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

258 lines (257 loc) 10.9 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 m, defaultValue as s, 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 A, cloneArray as E, cloneDate as g, cloneObject as b, cloneValue as D } from "./clone.mjs"; import { applyTrappedFocus as T, disableNavigatableContainer as v, enableNavigatableContainer as B, firstFocusableChild as M, focusFirstFocusableChild as S, focusLastFocusableChild as L, focusableChildren as y, keepFocusInContainer as F, 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 me, getItemPath as se, mapTree as ne, mapTreeItem as ie } from "./treeDataOperations.mjs"; import { hasValidLicense as fe, validatePackage as le } from "./validate-package.mjs"; import { hasRelativeStackingContext as de } from "./hasRelativeStackingContext.mjs"; import { WatermarkOverlay as Ie } from "./watermark/WatermarkOverlay.mjs"; import { applyDefaultProps as he } from "./apply-default-props.mjs"; import { dispatchEvent as Ee } from "./events/dispatchEvent.mjs"; import { AsyncFocusBlur as be } from "./hocs/AsyncFocusBlur.mjs"; import { createPropsContext as Pe, withPropsContext as Te } from "./hocs/withPropsContext.mjs"; import { withIdHOC as Be } from "./hocs/use-id-hoc.mjs"; import { withUnstyledHOC as Se } from "./hocs/use-unstyled-hoc.mjs"; import { withAdaptiveModeContext as ye } from "./hocs/use-adaptive-mode-hoc.mjs"; import { withZIndexContext as we } from "./hocs/withzIndexContext.mjs"; import { useDir as Oe } from "./hooks/useDir.mjs"; import { useAsyncFocusBlur as Re } from "./hooks/useAsyncFocusBlur.mjs"; import { useRtl as _e } from "./hooks/useRtl.mjs"; import { useMouse as We } from "./hooks/useMouse.mjs"; import { useCustomComponent as He } from "./hooks/useCustomComponent.mjs"; import { usePropsContext as je } from "./hooks/usePropsContext.mjs"; import { COLLECTION_ACTION as ze, useCollection as Xe } from "./hooks/useCollection.mjs"; import { useDocument as qe } from "./hooks/useDocument.mjs"; import { useWindow as Qe } from "./hooks/useWindow.mjs"; import { useId as eo } from "./hooks/use-id.mjs"; import { useIsomorphicLayoutEffect as ro } from "./hooks/use-isomorphic-layout-effect.mjs"; import { useImmediateInheritState as po } from "./hooks/use-immediate-inherit-state.mjs"; import { Icon as mo } from "./icons/Icon.mjs"; import { SvgIcon as no } from "./icons/SvgIcon.mjs"; import { IconWrap as xo } from "./icons/IconWrap.mjs"; import { IconsContext as lo } from "./icons/IconsContext.mjs"; import { svgIconPropType as co, toIconClass as Io, toIconName as Co } from "./icons/utils.mjs"; import { Typography as Ao } from "./typography/Typography.mjs"; import { DragAndDrop as go } from "./drag-n-drop/index.mjs"; import { Draggable as Do } from "./Draggable.mjs"; import { Droppable as To } from "./Droppable.mjs"; import { useDraggable as Bo } from "./hooks/useDraggable.mjs"; import { useDroppable as So } from "./hooks/useDroppable.mjs"; import { kendoThemeMaps as yo } from "./theme.mjs"; import { memoizeOne as wo } from "./memoize.mjs"; import { Navigation as Oo } from "./navigation.mjs"; import { getActiveElement as Ro, getInnerActiveElement as Uo } from "./getActiveElement.mjs"; import { TreeFieldsService as Vo } from "./tree-utils/FieldsService.mjs"; import { SortedPublicItemIds as Go } from "./tree-utils/SortedPublicItemIds.mjs"; import { addItem as Ko, areAllDirectChildrenChecked as jo, getAllDirectIndirectChildrenIds as Zo, getAllParents as zo, hasChildren as Xo, isEnabledAndAllParentsEnabled as Yo, isItemExpandedAndWithChildren as qo, removeItem as Jo, resolveItemId as Qo, resolveItemsIds as $o, updateItem as er } from "./tree-utils/itemUtils.mjs"; import { getNestedValue as rr, isArray as tr } from "./tree-utils/misc.mjs"; import { RowHeightService as ar } from "./rowHeightService.mjs"; import { UnstyledContext as sr, useUnstyled as nr } from "./unstyled/main.mjs"; import { deepMerge as xr, isObject as fr, isPromise as lr } from "./deep-merge.mjs"; import { uAnimation as dr } from "./unstyled/animations.mjs"; import { uSvgIcon as Ir } from "./unstyled/icons.mjs"; import { uButton as hr, uButtonGroup as Ar, uDropDownButton as Er } from "./unstyled/buttons.mjs"; import { uComboBox as br, uDropDownList as Dr, uDropDownsActionSheet as Pr, uDropDownsBase as Tr } from "./unstyled/dropdowns.mjs"; import { uCalendar as Br, uDateInput as Mr, uDateTimePicker as Sr, uTime as Lr, uTimePicker as yr } from "./unstyled/dateinputs.mjs"; import { radioButtonClasses as wr, radioGroupClasses as Nr, uInput as Or, uMaskedTextBox as kr, uRadioButton as Rr, uRadioGroup as Ur, uTextBox as _r } from "./unstyled/inputs.mjs"; import { uError as Wr, uFloatingLabel as Gr, uHint as Hr, uLabel as Kr } from "./unstyled/labels.mjs"; import { uForm as Zr } from "./unstyled/form.mjs"; import { uPopup as Xr } from "./unstyled/popup.mjs"; import { uGrid as qr } from "./unstyled/grid.mjs"; import { actions as Qr, animationStyles as $r, base as et, buttonPrefix as ot, calendarPrefix as rt, comboBoxPrefix as tt, components as pt, containers as at, cssUtils as mt, cursor as st, dateInputs as nt, ddbPrefix as it, dimensions as xt, directionMap as ft, dropDownListPrefix as lt, elements as ut, fillModeMap as dt, forms as ct, grid as It, gridPrefix as Ct, gridRowReorder as ht, icon as At, inputPrefix as Et, inputs as gt, jsonTheme as bt, labels as Dt, maskedPrefix as Pt, orientationMap as Tt, pickerPrefix as vt, popup as Bt, radioPrefix as Mt, roundedMap as St, sizeMap as Lt, states as yt, themeColorMap as Ft } from "./unstyled/json-classes.mjs"; export { $ as ADAPTIVE_MEDIUM_BREAKPOINT, ee as ADAPTIVE_SMALL_BREAKPOINT, m as AdaptiveModeContext, be as AsyncFocusBlur, x as BrowserSupportService, ze as COLLECTION_ACTION, go as DragAndDrop, Do as Draggable, To as Droppable, oe as FIELD_REGEX, re as FOCUSABLE_ELEMENTS, te as FOCUSABLE_ELEMENTS_BASE, O as FormComponent, mo as Icon, xo as IconWrap, lo as IconsContext, H as KEYS, K as Keys, Oo as Navigation, ar as RowHeightService, Go as SortedPublicItemIds, no as SvgIcon, pe as TABBABLE_ELEMENTS, Vo as TreeFieldsService, Ao as Typography, sr as UnstyledContext, Ie as WatermarkOverlay, t as ZIndexContext, Qr as actions, Ko as addItem, $r as animationStyles, he as applyDefaultProps, T as applyTrappedFocus, jo as areAllDirectChildrenChecked, et as base, ot as buttonPrefix, rt as calendarPrefix, l as canUseDOM, d as canUseRef, I as classNames, A as clone, E as cloneArray, g as cloneDate, b as cloneObject, D as cloneValue, tt as comboBoxPrefix, pt as components, at as containers, Pe as createPropsContext, mt as cssUtils, st as cursor, nt as dateInputs, it as ddbPrefix, xr as deepMerge, s as defaultValue, xt as dimensions, ft as directionMap, v as disableNavigatableContainer, Ee as dispatchEvent, lt as dropDownListPrefix, ut as elements, B as enableNavigatableContainer, me as extendDataItem, dt as fillModeMap, M as firstFocusableChild, S as focusFirstFocusableChild, L as focusLastFocusableChild, y as focusableChildren, ct as forms, Ro as getActiveElement, Zo as getAllDirectIndirectChildrenIds, zo as getAllParents, Uo as getInnerActiveElement, se as getItemPath, rr as getNestedValue, X as getScrollbarWidth, R as getTabIndex, _ as getter, It as grid, Ct as gridPrefix, ht as gridRowReorder, W as guid, Xo as hasChildren, de as hasRelativeStackingContext, fe as hasValidLicense, At as icon, Et as inputPrefix, gt as inputs, tr as isArray, Yo as isEnabledAndAllParentsEnabled, qo as isItemExpandedAndWithChildren, fr as isObject, lr as isPromise, bt as jsonTheme, F as keepFocusInContainer, yo as kendoThemeMaps, Dt as labels, w as lastFocusableChild, ne as mapTree, ie as mapTreeItem, Pt as maskedPrefix, wo as memoizeOne, Z as noop, Tt as orientationMap, vt as pickerPrefix, Bt as popup, wr as radioButtonClasses, Nr as radioGroupClasses, Mt as radioPrefix, Jo as removeItem, Qo as resolveItemId, $o as resolveItemsIds, St as roundedMap, Y as setScrollbarWidth, J as setter, Lt as sizeMap, yt as states, C as strippedClassNames, co as svgIconPropType, Ft as themeColorMap, Io as toIconClass, Co as toIconName, e as treeIdUtils, dr as uAnimation, hr as uButton, Ar as uButtonGroup, Br as uCalendar, br as uComboBox, Mr as uDateInput, Sr as uDateTimePicker, Er as uDropDownButton, Dr as uDropDownList, Pr as uDropDownsActionSheet, Tr as uDropDownsBase, Wr as uError, Gr as uFloatingLabel, Zr as uForm, qr as uGrid, Hr as uHint, Or as uInput, Kr as uLabel, kr as uMaskedTextBox, Xr as uPopup, Rr as uRadioButton, Ur as uRadioGroup, Ir as uSvgIcon, _r as uTextBox, Lr as uTime, yr as uTimePicker, er as updateItem, n as useAdaptiveModeContext, Re as useAsyncFocusBlur, Xe as useCollection, He as useCustomComponent, Oe as useDir, qe as useDocument, Bo as useDraggable, So as useDroppable, eo as useId, po as useImmediateInheritState, ro as useIsomorphicLayoutEffect, We as useMouse, je as usePropsContext, _e as useRtl, nr as useUnstyled, Qe as useWindow, p as useZIndexContext, le as validatePackage, ye as withAdaptiveModeContext, Be as withIdHOC, Te as withPropsContext, Se as withUnstyledHOC, we as withZIndexContext };