@accelint/design-system 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2,17 +2,19 @@ import * as react from 'react';
2
2
  import { RefAttributes, Context, PropsWithChildren, JSX, ReactHTML, ReactElement, MouseEvent, ReactNode, ForwardedRef, RefObject, RefCallback } from 'react';
3
3
  import * as react_aria_components from 'react-aria-components';
4
4
  import { ContextValue, SectionProps, SelectValueProps, CollectionRenderer, SlotProps, InputProps as InputProps$1, NumberFieldRenderProps, TextAreaProps as TextAreaProps$1, TextFieldRenderProps } from 'react-aria-components';
5
- import { B as ButtonProps, R as RenderPropsChildren, a as ButtonRenderProps, b as ButtonColors, c as ButtonMapping, d as ButtonSizes, e as ButtonVariants, L as LinkButtonProps, T as ToggleButtonProps, C as CheckboxProps, f as CheckboxRenderProps, g as CheckboxClassNames, h as CheckboxAlignment, i as CheckboxGroupProps, j as CheckboxGroupRenderProps, k as ChipProps, l as ChipItemProps, m as BaseChipProps, n as ChipListProps, o as ChipGroupProps, P as ProviderValues, p as ComboBoxProps, q as ComboBoxClassNames, r as ComboBoxMapping, s as ComboBoxSizes, D as DialogProps, t as DialogRenderProps, u as DialogMapping, v as DialogSizes, w as DrawerProps, x as DrawerTabListProps, y as DrawerTabProps, z as DrawerClassNames, A as DrawerMapping, G as GroupProps, E as BaseGroupProps, I as IconProps, F as IconSizes, H as InputProps, J as BaseInputProps, M as MenuProps, K as MenuClassNames, N as MenuMapping, O as MenuSizes, Q as MenuListProps, S as MenuItemProps, U as NumberFieldProps, V as NumberFieldClassNames, W as NumberFieldMapping, X as NumberFieldSizes, Y as OptionsProps, Z as OptionsClassNames, _ as OptionsMapping, $ as OptionsSizes, a0 as OptionsListProps, a1 as OptionsItemProps, a2 as PickerProps, a3 as PickerItemProps, a4 as PickerClassNames, a5 as PopoverProps, a6 as PopoverRenderProps, a7 as PopoverClassNames, a8 as PopoverMapping, a9 as QueryBuilderContextValue, aa as QueryBuilderProps, ab as RadioContextProps, ac as RadioRenderProps, ad as RadioClassNames, ae as RadioAlignment, af as RadioGroupProps, ag as SearchFieldProps, ah as SearchFieldClassNames, ai as SearchFieldMapping, aj as InputSize, ak as SearchFieldVariants, al as SelectProps, am as SelectClassNames, an as SelectMapping, ao as SelectSizes, ap as SwitchProps, aq as BaseSwitchProps, ar as TabsProps, as as TabsClassNames, at as TabListProps, au as TabListAlignment, av as TabListAnchor, aw as TabListSizes, ax as TabListVariants, ay as TabPanelsProps, az as TabPanelProps, aA as TextAreaProps, aB as BaseTextAreaProps, aC as TextFieldProps, aD as TextFieldClassNames, aE as TextFieldMapping, aF as TextFieldSizes, aG as TooltipProps, aH as TooltipClassNames, aI as TooltipMapping, aJ as TooltipRenderProps, aK as TooltipTargetProps, aL as TreeStateContextValue, aM as TreeProps, aN as TreeGroupProps, aO as TreeItemProps, aP as OmitProtectedProps, aQ as RadioProps, aR as TabProps, aS as DefaultsContext, aT as DefaultsProviderProps, aU as ClassNames, aV as AsType, aW as RGBA, aX as Contract, aY as ThemeContext, aZ as computeContract, a_ as ThemeProviderProps, a$ as UseTreeOptions, b0 as UseTreeResult } from './vanilla-Ibcop5d3.js';
6
- export { d3 as ButtonClassNames, d4 as ButtonState, d5 as CheckboxGroupState, d6 as CheckboxState, eU as ChildrenRenderProps, d7 as ChipClassNames, d8 as ChipColors, d9 as ChipMapping, da as ChipRenderProps, db as ChipSizes, dc as ChipState, eV as ClassNameRenderProps, dd as ComboBoxRenderProps, de as ComboBoxState, eW as CssVarFunction, df as DialogClassNames, dg as DialogState, dh as DrawerAnchor, di as DrawerDialogProps, dj as DrawerDialogState, dk as DrawerRenderProps, dl as DrawerState, dm as DrawerTabRenderProps, dn as GroupClassNames, dp as GroupState, dq as IconClassNames, dr as IconState, ds as InputClassNames, dt as InputMapping, du as InputRenderProps, dv as InputState, dw as InputType, eX as MapLeafNodes, dx as MenuItemRenderProps, dy as MenuItemState, dz as MenuState, dA as NumberFieldState, dB as OptionsItemState, dC as OptionsListState, dD as OptionsState, eY as PartialMapLeafNodes, dE as PickerItemRenderProps, dF as PickerItemState, dG as PickerState, dH as PopoverState, eZ as Primitive, e_ as ProviderValue, dI as QueryBuilderClassNames, dJ as QueryBuilderGroupState, dK as QueryBuilderMapping, dL as QueryBuilderRuleState, dM as QueryBuilderSizes, dN as QueryBuilderState, dO as QueryBuilderValueEditors, dP as RadioGroupState, dQ as RadioState, e$ as RenderProps, f0 as RenderPropsClassName, f1 as RenderPropsStyle, dR as SearchFieldRenderProps, dS as SearchFieldState, dT as SelectRenderProps, dU as SelectState, f2 as StylePropRenderProps, f3 as StyleRenderProps, dV as SwitchAlignment, dW as SwitchClassNames, dX as SwitchRenderProps, dY as SwitchState, dZ as TabListState, d_ as TabPanelRenderProps, d$ as TabPanelState, e0 as TabPanelsState, e1 as TabRenderProps, e2 as TabState, e3 as TextAreaClassNames, e4 as TextAreaRenderProps, e5 as TextAreaState, e6 as TextFieldState, ek as ThemeVars, e7 as TooltipState, e8 as TooltipTargetState, f4 as TreeActions, e9 as TreeClassNames, f5 as TreeGroupNode, ea as TreeGroupRenderProps, eb as TreeGroupState, ec as TreeIndicatorRenderProps, ed as TreeIndicatorState, f6 as TreeItemNode, ee as TreeItemRenderProps, ef as TreeItemState, eg as TreeMapping, f7 as TreeNode, f8 as TreeNodes, eh as TreeRenderProps, ei as TreeSizes, ej as TreeState, f9 as applyThemeVars, fa as assignPartialVars, el as bodies, b1 as buttonClassNames, b2 as buttonColorVars, b3 as buttonContainer, b4 as buttonSpaceVars, b5 as buttonStateVars, b6 as checkboxClassNames, b7 as checkboxColorVars, b8 as checkboxContainer, b9 as checkboxGroupStateVars, ba as checkboxSpaceVars, bb as checkboxStateVars, bc as chipClassNames, bd as chipColorVars, be as chipContainer, bf as chipSpaceVars, bg as chipStateVars, bh as comboBoxClassNames, bi as comboBoxColorVars, bj as comboBoxContainer, bk as comboBoxSpaceVars, bl as comboBoxStateVars, fb as containerQueries, fc as containerQuery, em as defaultElevationVarValues, en as defaultElevations, eo as defaultFocus, ep as defaultFocusVarValues, eq as defaultGenericColorVarValues, er as defaultGenericColors, es as defaultRadius, et as defaultRadiusVarValues, eu as defaultSemanticColorVarValues, ev as defaultSemanticColors, ew as defaultSizes, ex as defaultSizesVarValues, ey as defaultSpace, ez as defaultSpaceVarValues, eA as defaultTypography, eB as defaultTypographyVarValues, eC as defaultZIndex, eD as defaultZIndexVarValues, bm as dialogClassNames, bn as dialogColorVars, bo as dialogContainer, bp as dialogSpaceVars, bq as dialogStateVars, br as drawerAnimationVars, bs as drawerClassNames, bt as drawerColorVars, bu as drawerContainer, bv as drawerDialogStateVars, bw as drawerSpaceVars, bx as drawerStateVars, eE as elevationVars, eF as families, eG as focusOutlineStyle, eH as focusVars, eI as genericColorVars, by as groupClassNames, bz as groupContainer, bA as groupSpaceVars, bB as groupStateVars, eJ as headings, bC as iconClassNames, bD as iconColorVars, bE as iconContainer, bF as iconSpaceVars, bG as iconStateVars, fd as inlineVars, bH as inputClassNames, bI as inputColorVars, bJ as inputContainer, bK as inputSpaceVars, bL as inputStateVars, eK as inputs, eL as label, eM as layers, bM as menuColorVars, bN as menuItemStateVars, bO as menuSpaceVars, bP as menuStateVars, bQ as numberFieldClassNames, bR as numberFieldColorVars, bS as numberFieldContainer, bT as numberFieldSpaceVars, bU as numberFieldStateVars, bV as optionsClassNames, bW as optionsColorVars, bX as optionsContainers, bY as optionsItemStateVars, bZ as optionsListStateVars, b_ as optionsSpaceVars, b$ as optionsStateVars, c0 as pickerClassNames, c1 as pickerContainers, c2 as pickerItemColorVars, c3 as pickerItemStateVars, c4 as pickerSpaceVars, c5 as pickerStateVars, c6 as popoverClassNames, c7 as popoverColorVars, c8 as popoverSpaceVars, c9 as popoverStateVars, ca as queryBuilderClassNames, cb as queryBuilderColorVars, cc as queryBuilderContainers, cd as queryBuilderGroupStateVars, ce as queryBuilderRuleStateVars, cf as queryBuilderSpaceVars, cg as queryBuilderStateVars, ch as radioClassNames, ci as radioColorVars, cj as radioGroupStateVars, ck as radioSpaceVars, cl as radioStateVars, eN as radiusVars, cm as searchFieldClassNames, cn as searchFieldContainer, co as searchFieldSpaceVars, cp as searchFieldStateVars, cq as selectClassNames, cr as selectColorVars, cs as selectContainer, ct as selectSpaceVars, cu as selectStateVars, eO as semanticColorVars, eP as sizeVars, eQ as spaceVars, eR as surfaces, cv as switchClassNames, cw as switchColorVars, cx as switchContainer, cy as switchSpaceVars, cz as switchStateVars, cA as tabColorVars, cB as tabListStateVars, cC as tabPanelStateVars, cD as tabPanelsStateVars, cE as tabSpaceVars, cF as tabStateVars, cG as tabsClassNames, cH as tabsContainers, cI as textAreaClassNames, cJ as textAreaColorVars, cK as textAreaContainer, cL as textAreaSpaceVars, cM as textAreaStateVars, cN as textFieldClassNames, cO as textFieldColorVars, cP as textFieldContainer, cQ as textFieldSpaceVars, cR as textFieldStateVars, cS as tooltipClassNames, cT as tooltipContainers, cU as tooltipSpaceVars, cV as tooltipStateVars, cW as tooltipTargetStateVars, cX as treeClassNames, cY as treeColorVars, cZ as treeContainers, c_ as treeGroupStateVars, c$ as treeIndicatorStateVars, d0 as treeItemStateVars, d1 as treeSpaceVars, d2 as treeStateVars, eS as typographyVars, fe as unwrapCssVar, eT as zIndexVars } from './vanilla-Ibcop5d3.js';
7
- import * as react_aria from 'react-aria';
8
- import { PressEvent, PressHookProps } from 'react-aria';
9
- import * as react_jsx_runtime from 'react/jsx-runtime';
10
- import { Collection, Node } from 'react-stately';
5
+ import { B as ButtonProps, R as RenderPropsChildren, a as ButtonRenderProps, b as ButtonColors, c as ButtonMapping, d as ButtonSizes, e as ButtonVariants, L as LinkButtonProps, T as ToggleButtonProps, C as CheckboxProps, f as CheckboxRenderProps, g as CheckboxClassNames, h as CheckboxAlignment, i as CheckboxGroupProps, j as CheckboxGroupRenderProps, k as ChipProps, l as ChipItemProps, m as BaseChipProps, n as ChipListProps, o as ChipGroupProps, P as ProviderValues, p as ComboBoxProps, q as ComboBoxClassNames, r as ComboBoxMapping, s as ComboBoxSizes, D as DialogProps, t as DialogRenderProps, u as DialogMapping, v as DialogSizes, w as DrawerProps, x as DrawerTabListProps, y as DrawerTabProps, z as DrawerClassNames, A as DrawerMapping, G as GroupProps, E as BaseGroupProps, I as IconProps, F as IconSizes, H as InputProps, J as BaseInputProps, M as MenuProps, K as MenuClassNames, N as MenuMapping, O as MenuSizes, Q as MenuListProps, S as MenuItemProps, U as NumberFieldProps, V as NumberFieldClassNames, W as NumberFieldMapping, X as NumberFieldSizes, Y as OptionsProps, Z as OptionsClassNames, _ as OptionsMapping, $ as OptionsSizes, a0 as OptionsListProps, a1 as OptionsItemProps, a2 as PickerProps, a3 as PickerItemProps, a4 as PickerClassNames, a5 as PopoverProps, a6 as PopoverRenderProps, a7 as PopoverClassNames, a8 as PopoverMapping, a9 as QueryBuilderContextValue, aa as QueryBuilderProps, ab as RadioContextProps, ac as RadioRenderProps, ad as RadioClassNames, ae as RadioAlignment, af as RadioGroupProps, ag as SearchFieldProps, ah as SearchFieldClassNames, ai as SearchFieldMapping, aj as InputSize, ak as SearchFieldVariants, al as SelectProps, am as SelectClassNames, an as SelectMapping, ao as SelectSizes, ap as SwitchProps, aq as BaseSwitchProps, ar as TabsProps, as as TabsClassNames, at as TabListProps, au as TabListAlignment, av as TabListAnchor, aw as TabListSizes, ax as TabListVariants, ay as TabPanelsProps, az as TabPanelProps, aA as TextAreaProps, aB as BaseTextAreaProps, aC as TextFieldProps, aD as TextFieldClassNames, aE as TextFieldMapping, aF as TextFieldSizes, aG as TooltipProps, aH as TooltipClassNames, aI as TooltipMapping, aJ as TooltipRenderProps, aK as TooltipTargetProps, aL as TreeStateContextValue, aM as TreeProps, aN as TreeGroupProps, aO as TreeItemProps, aP as OmitProtectedProps, aQ as RadioProps, aR as TabProps, aS as DefaultsContext, aT as DefaultsProviderProps, aU as ClassNames, aV as AsType, aW as RGBA, aX as Contract, aY as ThemeContext, aZ as computeContract, a_ as ThemeProviderProps, a$ as UseTreeOptions, b0 as UseTreeResult } from './vanilla-oo0eN2ya.js';
6
+ export { d3 as ButtonClassNames, d4 as ButtonState, d5 as CheckboxGroupState, d6 as CheckboxState, eU as ChildrenRenderProps, d7 as ChipClassNames, d8 as ChipColors, d9 as ChipMapping, da as ChipRenderProps, db as ChipSizes, dc as ChipState, eV as ClassNameRenderProps, dd as ComboBoxRenderProps, de as ComboBoxState, eW as CssVarFunction, df as DialogClassNames, dg as DialogState, dh as DrawerAnchor, di as DrawerDialogProps, dj as DrawerDialogState, dk as DrawerRenderProps, dl as DrawerState, dm as DrawerTabRenderProps, dn as GroupClassNames, dp as GroupState, dq as IconClassNames, dr as IconState, ds as InputClassNames, dt as InputMapping, du as InputRenderProps, dv as InputState, dw as InputType, eX as MapLeafNodes, dx as MenuItemRenderProps, dy as MenuItemState, dz as MenuState, dA as NumberFieldState, dB as OptionsItemState, dC as OptionsListState, dD as OptionsState, eY as PartialMapLeafNodes, dE as PickerItemRenderProps, dF as PickerItemState, dG as PickerState, dH as PopoverState, eZ as Primitive, e_ as ProviderValue, dI as QueryBuilderClassNames, dJ as QueryBuilderGroupState, dK as QueryBuilderMapping, dL as QueryBuilderRuleState, dM as QueryBuilderSizes, dN as QueryBuilderState, dO as QueryBuilderValueEditors, dP as RadioGroupState, dQ as RadioState, e$ as RenderProps, f0 as RenderPropsClassName, f1 as RenderPropsStyle, dR as SearchFieldRenderProps, dS as SearchFieldState, dT as SelectRenderProps, dU as SelectState, f2 as StylePropRenderProps, f3 as StyleRenderProps, dV as SwitchAlignment, dW as SwitchClassNames, dX as SwitchRenderProps, dY as SwitchState, dZ as TabListState, d_ as TabPanelRenderProps, d$ as TabPanelState, e0 as TabPanelsState, e1 as TabRenderProps, e2 as TabState, e3 as TextAreaClassNames, e4 as TextAreaRenderProps, e5 as TextAreaState, e6 as TextFieldState, ek as ThemeVars, e7 as TooltipState, e8 as TooltipTargetState, f4 as TreeActions, e9 as TreeClassNames, f5 as TreeGroupNode, ea as TreeGroupRenderProps, eb as TreeGroupState, ec as TreeIndicatorRenderProps, ed as TreeIndicatorState, f6 as TreeItemNode, ee as TreeItemRenderProps, ef as TreeItemState, eg as TreeMapping, f7 as TreeNode, f8 as TreeNodes, eh as TreeRenderProps, ei as TreeSizes, ej as TreeState, f9 as applyThemeVars, fa as assignPartialVars, el as bodies, b1 as buttonClassNames, b2 as buttonColorVars, b3 as buttonContainer, b4 as buttonSpaceVars, b5 as buttonStateVars, b6 as checkboxClassNames, b7 as checkboxColorVars, b8 as checkboxContainer, b9 as checkboxGroupStateVars, ba as checkboxSpaceVars, bb as checkboxStateVars, bc as chipClassNames, bd as chipColorVars, be as chipContainer, bf as chipSpaceVars, bg as chipStateVars, bh as comboBoxClassNames, bi as comboBoxColorVars, bj as comboBoxContainer, bk as comboBoxSpaceVars, bl as comboBoxStateVars, fb as containerQueries, fc as containerQuery, em as defaultElevationVarValues, en as defaultElevations, eo as defaultFocus, ep as defaultFocusVarValues, eq as defaultGenericColorVarValues, er as defaultGenericColors, es as defaultRadius, et as defaultRadiusVarValues, eu as defaultSemanticColorVarValues, ev as defaultSemanticColors, ew as defaultSizes, ex as defaultSizesVarValues, ey as defaultSpace, ez as defaultSpaceVarValues, eA as defaultTypography, eB as defaultTypographyVarValues, eC as defaultZIndex, eD as defaultZIndexVarValues, bm as dialogClassNames, bn as dialogColorVars, bo as dialogContainer, bp as dialogSpaceVars, bq as dialogStateVars, br as drawerAnimationVars, bs as drawerClassNames, bt as drawerColorVars, bu as drawerContainer, bv as drawerDialogStateVars, bw as drawerSpaceVars, bx as drawerStateVars, eE as elevationVars, eF as families, eG as focusOutlineStyle, eH as focusVars, eI as genericColorVars, by as groupClassNames, bz as groupContainer, bA as groupSpaceVars, bB as groupStateVars, eJ as headings, bC as iconClassNames, bD as iconColorVars, bE as iconContainer, bF as iconSpaceVars, bG as iconStateVars, fd as inlineVars, bH as inputClassNames, bI as inputColorVars, bJ as inputContainer, bK as inputSpaceVars, bL as inputStateVars, eK as inputs, eL as label, eM as layers, bM as menuColorVars, bN as menuItemStateVars, bO as menuSpaceVars, bP as menuStateVars, bQ as numberFieldClassNames, bR as numberFieldColorVars, bS as numberFieldContainer, bT as numberFieldSpaceVars, bU as numberFieldStateVars, bV as optionsClassNames, bW as optionsColorVars, bX as optionsContainers, bY as optionsItemStateVars, bZ as optionsListStateVars, b_ as optionsSpaceVars, b$ as optionsStateVars, c0 as pickerClassNames, c1 as pickerContainers, c2 as pickerItemColorVars, c3 as pickerItemStateVars, c4 as pickerSpaceVars, c5 as pickerStateVars, c6 as popoverClassNames, c7 as popoverColorVars, c8 as popoverSpaceVars, c9 as popoverStateVars, ca as queryBuilderClassNames, cb as queryBuilderColorVars, cc as queryBuilderContainers, cd as queryBuilderGroupStateVars, ce as queryBuilderRuleStateVars, cf as queryBuilderSpaceVars, cg as queryBuilderStateVars, ch as radioClassNames, ci as radioColorVars, cj as radioGroupStateVars, ck as radioSpaceVars, cl as radioStateVars, eN as radiusVars, cm as searchFieldClassNames, cn as searchFieldContainer, co as searchFieldSpaceVars, cp as searchFieldStateVars, cq as selectClassNames, cr as selectColorVars, cs as selectContainer, ct as selectSpaceVars, cu as selectStateVars, eO as semanticColorVars, eP as sizeVars, eQ as spaceVars, eR as surfaces, cv as switchClassNames, cw as switchColorVars, cx as switchContainer, cy as switchSpaceVars, cz as switchStateVars, cA as tabColorVars, cB as tabListStateVars, cC as tabPanelStateVars, cD as tabPanelsStateVars, cE as tabSpaceVars, cF as tabStateVars, cG as tabsClassNames, cH as tabsContainers, cI as textAreaClassNames, cJ as textAreaColorVars, cK as textAreaContainer, cL as textAreaSpaceVars, cM as textAreaStateVars, cN as textFieldClassNames, cO as textFieldColorVars, cP as textFieldContainer, cQ as textFieldSpaceVars, cR as textFieldStateVars, cS as tooltipClassNames, cT as tooltipContainers, cU as tooltipSpaceVars, cV as tooltipStateVars, cW as tooltipTargetStateVars, cX as treeClassNames, cY as treeColorVars, cZ as treeContainers, c_ as treeGroupStateVars, c$ as treeIndicatorStateVars, d0 as treeItemStateVars, d1 as treeSpaceVars, d2 as treeStateVars, eS as typographyVars, fe as unwrapCssVar, eT as zIndexVars } from './vanilla-oo0eN2ya.js';
11
7
  import * as _react_types_shared from '@react-types/shared';
12
- import { ItemDropTarget } from '@react-types/shared';
8
+ import { Collection, Node, PressEvent, ItemDropTarget } from '@react-types/shared';
9
+ import * as react_jsx_runtime from 'react/jsx-runtime';
10
+ import * as _react_aria_interactions from '@react-aria/interactions';
11
+ import { PressHookProps } from '@react-aria/interactions';
13
12
  import { z } from 'zod';
14
13
  import 'type-fest';
14
+ import '@react-aria/overlays';
15
+ import '@react-stately/overlays';
15
16
  import 'react-querybuilder';
17
+ import '@react-stately/data';
16
18
  import '@vanilla-extract/css';
17
19
 
18
20
  declare const AriaFieldError: (props: react_aria_components.FieldErrorProps & RefAttributes<HTMLElement>) => react.ReactElement | null;
@@ -90,7 +92,7 @@ declare const CheckboxGroup: (props: Omit<react_aria_components.CheckboxGroupPro
90
92
  children?: RenderPropsChildren<CheckboxGroupRenderProps>;
91
93
  classNames?: CheckboxClassNames;
92
94
  label?: string;
93
- orientation?: react_aria.Orientation;
95
+ orientation?: _react_types_shared.Orientation;
94
96
  } & Pick<{
95
97
  children?: RenderPropsChildren<CheckboxRenderProps>;
96
98
  label?: string;
@@ -427,7 +429,7 @@ declare const TabListContext: react.Context<ContextValue<TabListProps<unknown>,
427
429
  declare const TabList: <T extends object>(props: Omit<react_aria_components.TabListProps<T>, "className" | "style"> & {
428
430
  align?: TabListAlignment;
429
431
  anchor?: TabListAnchor;
430
- orientation?: react_aria.Orientation;
432
+ orientation?: _react_types_shared.Orientation;
431
433
  size?: TabListSizes;
432
434
  variant?: TabListVariants;
433
435
  } & {
@@ -435,7 +437,7 @@ declare const TabList: <T extends object>(props: Omit<react_aria_components.TabL
435
437
  } & react.RefAttributes<HTMLDivElement>) => react.ReactElement | null;
436
438
  declare const TabContext: react.Context<ContextValue<Omit<Omit<react_aria_components.TabProps, "className" | "style"> & {
437
439
  id: string;
438
- } & react_aria.PressEvents & {
440
+ } & _react_types_shared.PressEvents & {
439
441
  classNames?: TabsClassNames;
440
442
  } & SlotProps, "id">, HTMLDivElement>>;
441
443
  /**
@@ -443,7 +445,7 @@ declare const TabContext: react.Context<ContextValue<Omit<Omit<react_aria_compon
443
445
  */
444
446
  declare const Tab: (props: Omit<react_aria_components.TabProps, "className" | "style"> & {
445
447
  id: string;
446
- } & react_aria.PressEvents & {
448
+ } & _react_types_shared.PressEvents & {
447
449
  classNames?: TabsClassNames;
448
450
  } & react.RefAttributes<HTMLDivElement>) => react.ReactElement | null;
449
451
  declare const TabPanelsContext: react.Context<ContextValue<TabPanelsProps, HTMLDivElement>>;
@@ -559,6 +561,13 @@ declare const TooltipTarget: (props: {
559
561
  } & react.RefAttributes<HTMLDivElement>) => react.ReactElement | null;
560
562
 
561
563
  declare const TreeStateContext: react.Context<TreeStateContextValue<any>>;
564
+ /**
565
+ * By default Tree only works as an uncontrolled input. However, if you need to use the Tree
566
+ * as a controlled input (passing state changes to the "nodes" props), you will need to add a
567
+ * "key" prop that is a hash of the "nodes" prop to trigger a rerender of the component and
568
+ * abandon it's previous state. Unfortunately, the underlying hooks don't provide a good way
569
+ * to update the internal state of the Tree onces it's been initialized.
570
+ */
562
571
  declare function Tree<T>(props: TreeProps<T>): react_jsx_runtime.JSX.Element;
563
572
  declare function TreeGroup<T>({ id, children, nodes, types, ...rest }: TreeGroupProps<T>): react_jsx_runtime.JSX.Element;
564
573
  declare function TreeItem<T>({ children: childrenProp, index, mapping: mappingProp, node, isFirstChild, isLastChild, ...rest }: TreeItemProps<T>): react_jsx_runtime.JSX.Element;
@@ -641,7 +650,7 @@ declare function DefaultsProvider({ children, defaults: defaultsProp, }: Default
641
650
  * continues propagation of press events. This allows for nested press event
642
651
  * listeners to not block press event listeners higher in the heirarchy
643
652
  */
644
- declare function usePropagatingPress(props: PressHookProps): react_aria.PressResult;
653
+ declare function usePropagatingPress(props: PressHookProps): _react_aria_interactions.PressResult;
645
654
 
646
655
  /**
647
656
  * Detects whether a slot has been utilized
package/dist/index.js CHANGED
@@ -4,18 +4,22 @@ import { createContext, forwardRef, useMemo, useCallback, Children, useState, us
4
4
  import { Section, SelectValue, Button as Button$1, Link, ToggleButton as ToggleButton$1, TextContext, Provider, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, Tag, TagGroup, Popover, Collection, UNSTABLE_CollectionRendererContext, ListBox, ListBoxItem, ComboBox as ComboBox$1, DEFAULT_SLOT, Modal, Dialog as Dialog$1, ModalOverlay, useContextProps as useContextProps$1, Tabs as Tabs$1, TabList as TabList$1, Tab as Tab$1, TabPanel as TabPanel$1, Tooltip as Tooltip$1, Menu as Menu$1, MenuItem as MenuItem$1, LabelContext, NumberField as NumberField$1, Radio as Radio$1, RadioGroup as RadioGroup$1, Select as Select$1, Switch as Switch$1, TextAreaContext as TextAreaContext$1, SearchField as SearchField$1, TextField as TextField$1, useSlottedContext, FieldError, Group, Header, Heading, Keyboard, Label, Separator, Text, TagList, InputContext as InputContext$1, ListStateContext, MenuStateContext, DropIndicator, useDragAndDrop, GridList, ButtonContext as ButtonContext$1, GridListItem, composeRenderProps } from 'react-aria-components';
5
5
  import { useCachedChildren } from '@react-aria/collections';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
- import { useObjectRef, mergeRefs, useLayoutEffect as useLayoutEffect$1 } from '@react-aria/utils';
7
+ import { mergeProps as mergeProps$1, useObjectRef, mergeRefs, useLayoutEffect as useLayoutEffect$1 } from '@react-aria/utils';
8
8
  import { clsx } from 'clsx';
9
9
  import mergeWith from 'lodash/mergeWith';
10
- import { useFocusRing, useHover, useFocusable, mergeProps as mergeProps$1, usePress, useOverlay, useFocusWithin, isTextDropItem } from 'react-aria';
11
10
  import { z } from 'zod';
11
+ import { useHover, usePress, useFocusWithin } from '@react-aria/interactions';
12
+ import { useTreeData } from '@react-stately/data';
12
13
  import isEqual from 'lodash/isEqual';
13
- import { useTreeData, useOverlayTriggerState } from 'react-stately';
14
14
  import { noop } from '@accelint/core';
15
15
  import { useControlledState } from '@react-stately/utils';
16
+ import { useFocusRing, useFocusable } from '@react-aria/focus';
16
17
  import { useIsSSR } from '@react-aria/ssr';
17
18
  import { toBoolean } from '@accelint/converters';
19
+ import { useOverlay } from '@react-aria/overlays';
20
+ import { useOverlayTriggerState } from '@react-stately/overlays';
18
21
  import { QueryBuilder as QueryBuilder$1, useRuleGroup, useStopEventPropagation, TestID, pathsAreEqual, isRuleGroup, isRuleGroupType, useRule, useValueSelector, isOptionGroupArray, useValueEditor } from 'react-querybuilder';
22
+ import { isTextDropItem } from '@react-aria/dnd';
19
23
 
20
24
  function useCollectionRender(collection, parent, renderDropIndicator) {
21
25
  return useCachedChildren({
@@ -443,20 +447,11 @@ function useTree({
443
447
  onUpdate
444
448
  }) {
445
449
  const rootKey = useId();
446
- const nodesRef = useRef(nodes);
447
450
  const list = useTreeData({
448
451
  initialItems: nodes,
449
452
  getChildren,
450
453
  getKey
451
454
  });
452
- useUpdateEffect(() => {
453
- if (isEqual(nodesRef.current, nodes)) return;
454
- nodesRef.current = nodes;
455
- list.remove(...list.items.map(({ key }) => key));
456
- if (nodes.length) {
457
- list.append(null, ...nodes);
458
- }
459
- }, [nodes]);
460
455
  useUpdateEffect(() => {
461
456
  if (selectionMode === "none" && list.selectedKeys.size) {
462
457
  list.setSelectedKeys(/* @__PURE__ */ new Set());
@@ -470,7 +465,9 @@ function useTree({
470
465
  children: list.items
471
466
  },
472
467
  (node) => {
473
- if (node.key === rootKey) return;
468
+ if (node.key === rootKey) {
469
+ return;
470
+ }
474
471
  node = lookup2[node.key] = getItem2(node.key);
475
472
  return node;
476
473
  }
@@ -482,7 +479,9 @@ function useTree({
482
479
  children: toggleVisibility(tree2.children)
483
480
  },
484
481
  (node) => {
485
- if (node.key === rootKey) return;
482
+ if (node.key === rootKey) {
483
+ return;
484
+ }
486
485
  lookup2[node.key] = node;
487
486
  return node;
488
487
  }
@@ -490,7 +489,9 @@ function useTree({
490
489
  }
491
490
  function getItem2(key) {
492
491
  let node = lookup2[key];
493
- if (node) return node;
492
+ if (node) {
493
+ return node;
494
+ }
494
495
  node = list.getItem(key);
495
496
  if ("nodes" in node.value) {
496
497
  return {
@@ -541,26 +542,34 @@ function useTree({
541
542
  }, [rootKey, list, allowsVisibility]);
542
543
  const treeRef = useRef(tree);
543
544
  useUpdateEffect(() => {
544
- if (isEqual(treeRef.current, tree)) return;
545
+ if (isEqual(treeRef.current, tree)) {
546
+ return;
547
+ }
545
548
  treeRef.current = tree;
546
549
  onUpdate?.(tree.children.map(({ value }) => value));
547
550
  }, [tree]);
548
551
  const previousExpansionValuesRef = useRef([]);
549
552
  const revertIsExpanded = useCallback(() => {
550
- if (!previousExpansionValuesRef.current.length) return;
551
- previousExpansionValuesRef.current.forEach(
552
- ({ key, patch }) => update(key, patch)
553
- );
553
+ if (!previousExpansionValuesRef.current.length) {
554
+ return;
555
+ }
556
+ for (const { key, patch } of previousExpansionValuesRef.current) {
557
+ update(key, patch);
558
+ }
554
559
  previousExpansionValuesRef.current = [];
555
560
  }, [update]);
556
561
  const toggleIsExpanded = useCallback(
557
562
  (selection = "all", isExpanded = void 0, isRevertable = false) => {
558
- if (!allowsExpansion && !isRevertable) return;
563
+ if (!(allowsExpansion || isRevertable)) {
564
+ return;
565
+ }
559
566
  if (!isRevertable) {
560
567
  previousExpansionValuesRef.current = [];
561
568
  }
562
569
  function toggle({ key, value }) {
563
- if (key === rootKey || !("nodes" in value)) return;
570
+ if (key === rootKey || !("nodes" in value)) {
571
+ return;
572
+ }
564
573
  if (isRevertable) {
565
574
  previousExpansionValuesRef.current.push({
566
575
  key,
@@ -573,7 +582,9 @@ function useTree({
573
582
  return mapTree(tree, toggle);
574
583
  }
575
584
  mapTree(tree, (node) => {
576
- if (!selection.has(node.key)) return;
585
+ if (!selection.has(node.key)) {
586
+ return;
587
+ }
577
588
  toggle(node);
578
589
  });
579
590
  },
@@ -608,10 +619,14 @@ function useTree({
608
619
  );
609
620
  const toggleIsViewable = useCallback(
610
621
  (selection = "all", isViewable = void 0) => {
611
- if (!allowsVisibility) return;
622
+ if (!allowsVisibility) {
623
+ return;
624
+ }
612
625
  if (selection === "all") {
613
626
  return mapTree(tree, ({ key, value }) => {
614
- if (key === rootKey) return;
627
+ if (key === rootKey) {
628
+ return;
629
+ }
615
630
  update(key, {
616
631
  isViewable: isViewable ?? !value.isViewable
617
632
  });
@@ -626,7 +641,9 @@ function useTree({
626
641
  )
627
642
  },
628
643
  ({ key, value }) => {
629
- if (key === rootKey) return;
644
+ if (key === rootKey) {
645
+ return;
646
+ }
630
647
  update(key, { isViewable: value.isViewable });
631
648
  }
632
649
  );