UNPKG

@progress/kendo-react-common

Version:

React Common package delivers common utilities that can be used with the KendoReact UI components. KendoReact Common Utilities package

261 lines (260 loc) 11 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import * as e from "./tree-utils/itemIdUtils.mjs"; import { ZIndexContext as t, useZIndexContext as p } from "./contexts/ZIndexContext.mjs"; import { AdaptiveModeContext as a, defaultValue as m, useAdaptiveModeContext as n } from "./contexts/AdaptiveModeContext.mjs"; import { BrowserSupportService as x } from "./browser-support.service.mjs"; import { canUseDOM as l } from "./canUseDOM.mjs"; import { canUseRef as d } from "./canUseRef.mjs"; import { classNames as I, strippedClassNames as C } from "./classNames.mjs"; import { clone as E, cloneArray as h, cloneDate as A, cloneObject as b, cloneValue as D } from "./clone.mjs"; import { applyTrappedFocus as T, disableNavigatableContainer as M, enableNavigatableContainer as v, firstFocusableChild as B, focusFirstFocusableChild as S, focusLastFocusableChild as L, focusableChildren as F, keepFocusInContainer as y, lastFocusableChild as w } from "./trappedFocus.mjs"; import { FormComponent as O } from "./FormComponent.mjs"; import { getTabIndex as R } from "./getTabIndex.mjs"; import { getter as _ } from "./getter.mjs"; import { guid as W } from "./guid.mjs"; import { KEYS as H, Keys as K } from "./keys.mjs"; import { noop as Z } from "./noop.mjs"; import { getScrollbarWidth as X, setScrollbarWidth as Y } from "./scrollbarWidth.mjs"; import { setter as J } from "./setter.mjs"; import { ADAPTIVE_MEDIUM_BREAKPOINT as $, ADAPTIVE_SMALL_BREAKPOINT as ee, FIELD_REGEX as oe, FOCUSABLE_ELEMENTS as re, FOCUSABLE_ELEMENTS_BASE as te, TABBABLE_ELEMENTS as pe } from "./constants/main.mjs"; import { extendDataItem as ae, getItemPath as me, mapTree as ne, mapTreeItem as ie } from "./treeDataOperations.mjs"; import { getLicenseMessage as fe, hasValidLicense as le, validatePackage as ue } from "./validate-package.mjs"; import { hasRelativeStackingContext as ce } from "./hasRelativeStackingContext.mjs"; import { WatermarkOverlay as Ce } from "./watermark/WatermarkOverlay.mjs"; import { applyDefaultProps as Ee } from "./apply-default-props.mjs"; import { dispatchEvent as Ae } from "./events/dispatchEvent.mjs"; import { AsyncFocusBlur as De } from "./hocs/AsyncFocusBlur.mjs"; import { createPropsContext as Te, withPropsContext as Me } from "./hocs/withPropsContext.mjs"; import { withIdHOC as Be } from "./hocs/use-id-hoc.mjs"; import { withUnstyledHOC as Le } from "./hocs/use-unstyled-hoc.mjs"; import { withAdaptiveModeContext as ye } from "./hocs/use-adaptive-mode-hoc.mjs"; import { withZIndexContext as Ne } from "./hocs/withzIndexContext.mjs"; import { useDir as ke } from "./hooks/useDir.mjs"; import { useAsyncFocusBlur as Ue } from "./hooks/useAsyncFocusBlur.mjs"; import { useRtl as Ve } from "./hooks/useRtl.mjs"; import { useMouse as Ge } from "./hooks/useMouse.mjs"; import { useCustomComponent as Ke } from "./hooks/useCustomComponent.mjs"; import { usePropsContext as Ze } from "./hooks/usePropsContext.mjs"; import { COLLECTION_ACTION as Xe, useCollection as Ye } from "./hooks/useCollection.mjs"; import { useDocument as Je } from "./hooks/useDocument.mjs"; import { useWindow as $e } from "./hooks/useWindow.mjs"; import { useId as oo } from "./hooks/use-id.mjs"; import { useIsomorphicLayoutEffect as to } from "./hooks/use-isomorphic-layout-effect.mjs"; import { useImmediateInheritState as so } from "./hooks/use-immediate-inherit-state.mjs"; import { Icon as mo } from "./icons/Icon.mjs"; import { SvgIcon as io } from "./icons/SvgIcon.mjs"; import { IconWrap as fo } from "./icons/IconWrap.mjs"; import { IconsContext as uo } from "./icons/IconsContext.mjs"; import { svgIconPropType as Io, toIconClass as Co, toIconName as go } from "./icons/utils.mjs"; import { Typography as ho } from "./typography/Typography.mjs"; import { DragAndDrop as bo } from "./drag-n-drop/index.mjs"; import { Draggable as Po } from "./Draggable.mjs"; import { Droppable as Mo } from "./Droppable.mjs"; import { useDraggable as Bo } from "./hooks/useDraggable.mjs"; import { useDroppable as Lo } from "./hooks/useDroppable.mjs"; import { kendoThemeMaps as yo } from "./theme.mjs"; import { memoizeOne as No } from "./memoize.mjs"; import { Navigation as ko } from "./navigation.mjs"; import { getActiveElement as Uo, getInnerActiveElement as _o } from "./getActiveElement.mjs"; import { getFileExtensionIcon as Wo } from "./fileExtensionIcon.mjs"; import { TreeFieldsService as Ho } from "./tree-utils/FieldsService.mjs"; import { SortedPublicItemIds as jo } from "./tree-utils/SortedPublicItemIds.mjs"; import { addItem as zo, areAllDirectChildrenChecked as Xo, getAllDirectIndirectChildrenIds as Yo, getAllParents as qo, hasChildren as Jo, isEnabledAndAllParentsEnabled as Qo, isItemExpandedAndWithChildren as $o, removeItem as er, resolveItemId as or, resolveItemsIds as rr, updateItem as tr } from "./tree-utils/itemUtils.mjs"; import { getNestedValue as sr, isArray as ar } from "./tree-utils/misc.mjs"; import { RowHeightService as nr } from "./rowHeightService.mjs"; import { UnstyledContext as xr, useUnstyled as fr } from "./unstyled/main.mjs"; import { deepMerge as ur, isObject as dr, isPromise as cr } from "./deep-merge.mjs"; import { uAnimation as Cr } from "./unstyled/animations.mjs"; import { uSvgIcon as Er } from "./unstyled/icons.mjs"; import { uButton as Ar, uButtonGroup as br, uDropDownButton as Dr } from "./unstyled/buttons.mjs"; import { uComboBox as Tr, uDropDownList as Mr, uDropDownsActionSheet as vr, uDropDownsBase as Br } from "./unstyled/dropdowns.mjs"; import { uCalendar as Lr, uDateInput as Fr, uDateTimePicker as yr, uTime as wr, uTimePicker as Nr } from "./unstyled/dateinputs.mjs"; import { radioButtonClasses as kr, radioGroupClasses as Rr, uInput as Ur, uMaskedTextBox as _r, uRadioButton as Vr, uRadioGroup as Wr, uTextBox as Gr } from "./unstyled/inputs.mjs"; import { uError as Kr, uFloatingLabel as jr, uHint as Zr, uLabel as zr } from "./unstyled/labels.mjs"; import { uForm as Yr } from "./unstyled/form.mjs"; import { uPopup as Jr } from "./unstyled/popup.mjs"; import { uGrid as $r } from "./unstyled/grid.mjs"; import { actions as ot, animationStyles as rt, base as tt, buttonPrefix as pt, calendarPrefix as st, comboBoxPrefix as at, components as mt, containers as nt, cssUtils as it, cursor as xt, dateInputs as ft, ddbPrefix as lt, dimensions as ut, directionMap as dt, dropDownListPrefix as ct, elements as It, fillModeMap as Ct, forms as gt, grid as Et, gridPrefix as ht, gridRowReorder as At, icon as bt, inputPrefix as Dt, inputs as Pt, jsonTheme as Tt, labels as Mt, maskedPrefix as vt, orientationMap as Bt, pickerPrefix as St, popup as Lt, radioPrefix as Ft, roundedMap as yt, sizeMap as wt, states as Nt, themeColorMap as Ot } from "./unstyled/json-classes.mjs"; export { $ as ADAPTIVE_MEDIUM_BREAKPOINT, ee as ADAPTIVE_SMALL_BREAKPOINT, a as AdaptiveModeContext, De as AsyncFocusBlur, x as BrowserSupportService, Xe as COLLECTION_ACTION, bo as DragAndDrop, Po as Draggable, Mo as Droppable, oe as FIELD_REGEX, re as FOCUSABLE_ELEMENTS, te as FOCUSABLE_ELEMENTS_BASE, O as FormComponent, mo as Icon, fo as IconWrap, uo as IconsContext, H as KEYS, K as Keys, ko as Navigation, nr as RowHeightService, jo as SortedPublicItemIds, io as SvgIcon, pe as TABBABLE_ELEMENTS, Ho as TreeFieldsService, ho as Typography, xr as UnstyledContext, Ce as WatermarkOverlay, t as ZIndexContext, ot as actions, zo as addItem, rt as animationStyles, Ee as applyDefaultProps, T as applyTrappedFocus, Xo as areAllDirectChildrenChecked, tt as base, pt as buttonPrefix, st as calendarPrefix, l as canUseDOM, d as canUseRef, I as classNames, E as clone, h as cloneArray, A as cloneDate, b as cloneObject, D as cloneValue, at as comboBoxPrefix, mt as components, nt as containers, Te as createPropsContext, it as cssUtils, xt as cursor, ft as dateInputs, lt as ddbPrefix, ur as deepMerge, m as defaultValue, ut as dimensions, dt as directionMap, M as disableNavigatableContainer, Ae as dispatchEvent, ct as dropDownListPrefix, It as elements, v as enableNavigatableContainer, ae as extendDataItem, Ct as fillModeMap, B as firstFocusableChild, S as focusFirstFocusableChild, L as focusLastFocusableChild, F as focusableChildren, gt as forms, Uo as getActiveElement, Yo as getAllDirectIndirectChildrenIds, qo as getAllParents, Wo as getFileExtensionIcon, _o as getInnerActiveElement, me as getItemPath, fe as getLicenseMessage, sr as getNestedValue, X as getScrollbarWidth, R as getTabIndex, _ as getter, Et as grid, ht as gridPrefix, At as gridRowReorder, W as guid, Jo as hasChildren, ce as hasRelativeStackingContext, le as hasValidLicense, bt as icon, Dt as inputPrefix, Pt as inputs, ar as isArray, Qo as isEnabledAndAllParentsEnabled, $o as isItemExpandedAndWithChildren, dr as isObject, cr as isPromise, Tt as jsonTheme, y as keepFocusInContainer, yo as kendoThemeMaps, Mt as labels, w as lastFocusableChild, ne as mapTree, ie as mapTreeItem, vt as maskedPrefix, No as memoizeOne, Z as noop, Bt as orientationMap, St as pickerPrefix, Lt as popup, kr as radioButtonClasses, Rr as radioGroupClasses, Ft as radioPrefix, er as removeItem, or as resolveItemId, rr as resolveItemsIds, yt as roundedMap, Y as setScrollbarWidth, J as setter, wt as sizeMap, Nt as states, C as strippedClassNames, Io as svgIconPropType, Ot as themeColorMap, Co as toIconClass, go as toIconName, e as treeIdUtils, Cr as uAnimation, Ar as uButton, br as uButtonGroup, Lr as uCalendar, Tr as uComboBox, Fr as uDateInput, yr as uDateTimePicker, Dr as uDropDownButton, Mr as uDropDownList, vr as uDropDownsActionSheet, Br as uDropDownsBase, Kr as uError, jr as uFloatingLabel, Yr as uForm, $r as uGrid, Zr as uHint, Ur as uInput, zr as uLabel, _r as uMaskedTextBox, Jr as uPopup, Vr as uRadioButton, Wr as uRadioGroup, Er as uSvgIcon, Gr as uTextBox, wr as uTime, Nr as uTimePicker, tr as updateItem, n as useAdaptiveModeContext, Ue as useAsyncFocusBlur, Ye as useCollection, Ke as useCustomComponent, ke as useDir, Je as useDocument, Bo as useDraggable, Lo as useDroppable, oo as useId, so as useImmediateInheritState, to as useIsomorphicLayoutEffect, Ge as useMouse, Ze as usePropsContext, Ve as useRtl, fr as useUnstyled, $e as useWindow, p as useZIndexContext, ue as validatePackage, ye as withAdaptiveModeContext, Be as withIdHOC, Me as withPropsContext, Le as withUnstyledHOC, Ne as withZIndexContext };