@iress-oss/ids-components 5.20.0 → 5.20.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.
Files changed (253) hide show
  1. package/CHANGELOG.md +378 -0
  2. package/README.md +1 -1
  3. package/dist/{AutocompleteNoResults-CogA3XZs.js → AutocompleteNoResults-B7El1R2l.js} +1 -1
  4. package/dist/ComboboxHiddenInput-CWfIj-Zz.js +32 -0
  5. package/dist/{FieldAppendToLabel-CuSREliL.js → FieldAppendToLabel-BTdzhQ7Z.js} +5 -5
  6. package/dist/InputBase-Hc9D8St6.js +56 -0
  7. package/dist/Loading.module-BjceG0Wh.js +13 -0
  8. package/dist/LoadingSuspense-Bwd232Nt.js +5728 -0
  9. package/dist/LogoFromSrc-CAdoYYud.js +59 -0
  10. package/dist/MenuItem.module-BQw_K5D4.js +24 -0
  11. package/dist/Popover.module-ZU-08mVQ.js +11 -0
  12. package/dist/PopoverProvider-Cvg6ObBO.js +142 -0
  13. package/dist/{SelectControl-D1SJlplM.js → SelectControl-WoixPfwh.js} +2 -2
  14. package/dist/SliderTicks-D-B1uIdS.js +74 -0
  15. package/dist/TabSet.module-4ohNBuQS.js +13 -0
  16. package/dist/Table.module-BYwGboft.js +32 -0
  17. package/dist/components/Alert/Alert.js +2 -2
  18. package/dist/components/Alert/index.js +1 -1
  19. package/dist/components/Autocomplete/Autocomplete.js +4 -4
  20. package/dist/components/Autocomplete/components/AutocompleteInstructions.js +7 -7
  21. package/dist/components/Autocomplete/components/AutocompleteNoResults.js +1 -1
  22. package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +36 -35
  23. package/dist/components/Autocomplete/index.js +1 -1
  24. package/dist/components/Badge/Badge.js +5 -5
  25. package/dist/components/Button/Button.js +3 -3
  26. package/dist/components/Button/CloseButton/CloseButton.js +2 -2
  27. package/dist/components/Button/index.js +1 -1
  28. package/dist/components/ButtonGroup/ButtonGroup.js +3 -3
  29. package/dist/components/ButtonGroup/ButtonGroupProvider.js +22 -22
  30. package/dist/components/ButtonGroup/hooks/useIDSButtonGroupItem.js +2 -2
  31. package/dist/components/ButtonGroup/index.js +1 -1
  32. package/dist/components/Card/helpers/composeIDSCard.js +1 -1
  33. package/dist/components/Checkbox/Checkbox.js +2 -2
  34. package/dist/components/Checkbox/helpers/mapCheckboxGroupOptions.js +11 -11
  35. package/dist/components/Checkbox/index.js +1 -1
  36. package/dist/components/CheckboxGroup/CheckboxGroup.js +74 -75
  37. package/dist/components/CheckboxMark/CheckboxMark.js +1 -1
  38. package/dist/components/CheckboxMark/CheckboxMark.types.js +2 -2
  39. package/dist/components/Col/Col.js +1 -1
  40. package/dist/components/Combobox/Combobox.js +4 -4
  41. package/dist/components/Combobox/MultiCombobox/MultiCombobox.js +4 -4
  42. package/dist/components/Combobox/components/ComboboxHiddenInput.js +2 -2
  43. package/dist/components/Combobox/components/ComboboxResults.js +6 -6
  44. package/dist/components/Combobox/components/ComboboxResultsDescriptor.js +4 -4
  45. package/dist/components/Combobox/hooks/useComboboxInlineCompletion.js +34 -37
  46. package/dist/components/Combobox/index.js +1 -1
  47. package/dist/components/Container/Container.js +1 -1
  48. package/dist/components/Divider/Divider.js +1 -1
  49. package/dist/components/Expander/Expander.js +48 -48
  50. package/dist/components/Field/Field.js +47 -47
  51. package/dist/components/Field/FieldGroup/FieldGroup.js +59 -59
  52. package/dist/components/Field/components/FieldAppendToLabel.js +5 -5
  53. package/dist/components/Filter/Filter.js +4 -4
  54. package/dist/components/Filter/components/FilterResetButton.js +4 -4
  55. package/dist/components/Filter/components/FilterSearch.js +4 -4
  56. package/dist/components/Filter/index.js +1 -1
  57. package/dist/components/Form/Form.js +1 -1
  58. package/dist/components/Form/FormField/FormField.js +46 -49
  59. package/dist/components/Form/FormField/FormFieldset.js +42 -45
  60. package/dist/components/Form/FormField/helpers/getErrorTypeMessage.js +10 -10
  61. package/dist/components/Form/HookForm/HookForm.js +2 -2
  62. package/dist/components/Form/components/FormValidationSummary.js +15 -16
  63. package/dist/components/Form/index.js +1 -1
  64. package/dist/components/Hide/Hide.js +2 -2
  65. package/dist/components/Hide/helpers/composeHideClasses.js +4 -4
  66. package/dist/components/Hide/index.js +1 -1
  67. package/dist/components/Icon/Icon.js +4 -4
  68. package/dist/components/Icon/index.js +1 -1
  69. package/dist/components/Inline/Inline.js +4 -4
  70. package/dist/components/Inline/index.js +1 -1
  71. package/dist/components/Input/ClearButton/ClearButton.js +1 -1
  72. package/dist/components/Input/Input.js +3 -3
  73. package/dist/components/Input/InputBase/InputBase.js +2 -2
  74. package/dist/components/Input/index.js +1 -1
  75. package/dist/components/InputCurrency/InputCurrency.js +1 -1
  76. package/dist/components/InputCurrency/index.js +1 -1
  77. package/dist/components/Label/LabelBase/LabelBase.js +37 -37
  78. package/dist/components/Menu/Menu.js +1 -1
  79. package/dist/components/Menu/MenuDivider/MenuDivider.js +4 -4
  80. package/dist/components/Menu/MenuHeading/MenuHeading.js +3 -3
  81. package/dist/components/Menu/MenuItem/MenuItem.js +1 -1
  82. package/dist/components/Menu/MenuItem/hooks/useMenuItemAria.js +7 -7
  83. package/dist/components/Menu/MenuItem/hooks/useMenuItemButtonProps.js +30 -30
  84. package/dist/components/Menu/MenuItem/hooks/useMenuItemComposite.js +2 -2
  85. package/dist/components/Menu/MenuItem/hooks/useMenuItemInteractions.js +47 -49
  86. package/dist/components/Menu/MenuItem/hooks/useMenuItemRole.js +5 -5
  87. package/dist/components/Menu/MenuText/MenuText.js +5 -5
  88. package/dist/components/Menu/helpers/mapMenuItems.js +21 -21
  89. package/dist/components/Menu/hooks/useMenuAria.js +2 -2
  90. package/dist/components/Menu/hooks/useMenuComposite.js +6 -6
  91. package/dist/components/Menu/hooks/useMenuRole.js +10 -10
  92. package/dist/components/Menu/hooks/useMenuStyles.js +18 -18
  93. package/dist/components/Menu/index.js +1 -1
  94. package/dist/components/Modal/Modal.js +3 -3
  95. package/dist/components/Modal/hooks/useIDSProvidedModal.js +8 -8
  96. package/dist/components/Modal/index.js +1 -1
  97. package/dist/components/Navbar/Navbar.js +3 -3
  98. package/dist/components/Navbar/components/HomeLinkContent.js +2 -2
  99. package/dist/components/Navbar/components/LogoFromSrc.js +1 -1
  100. package/dist/components/Navbar/components/NavbarLogo.js +3 -3
  101. package/dist/components/Navbar/index.js +1 -1
  102. package/dist/components/Panel/Panel.js +1 -1
  103. package/dist/components/Placeholder/Placeholder.js +20 -20
  104. package/dist/components/Popover/InputPopover/InputPopover.js +2 -2
  105. package/dist/components/Popover/InputPopover/InputPopoverActivator.js +40 -43
  106. package/dist/components/Popover/InputPopover/InputPopoverProvider.js +61 -61
  107. package/dist/components/Popover/Popover.js +3 -3
  108. package/dist/components/Popover/PopoverProvider.js +2 -2
  109. package/dist/components/Popover/components/NestedPopoverActivator.js +1 -1
  110. package/dist/components/Popover/components/PopoverActivator.js +53 -58
  111. package/dist/components/Popover/components/PopoverContent.js +31 -31
  112. package/dist/components/Popover/helpers/composeFloatingProps.js +21 -24
  113. package/dist/components/Popover/helpers/handlePopoverTabKey.js +2 -2
  114. package/dist/components/Popover/hooks/usePopover.js +1 -1
  115. package/dist/components/Popover/hooks/usePopoverActivatorInteractions.js +23 -26
  116. package/dist/components/Popover/hooks/usePopoverImperativeHandle.js +17 -17
  117. package/dist/components/Popover/hooks/usePopoverItem.js +13 -14
  118. package/dist/components/Popover/hooks/usePopoverNavigation.js +22 -22
  119. package/dist/components/Progress/Progress.js +2 -2
  120. package/dist/components/Provider/Provider.js +1 -1
  121. package/dist/components/Radio/Radio.js +2 -2
  122. package/dist/components/Radio/helpers/mapRadioGroupOptions.js +8 -8
  123. package/dist/components/Radio/index.js +1 -1
  124. package/dist/components/RadioGroup/RadioGroup.js +68 -56
  125. package/dist/components/RadioGroup/index.js +6 -5
  126. package/dist/components/Readonly/Readonly.js +5 -5
  127. package/dist/components/Readonly/index.js +1 -1
  128. package/dist/components/RichSelect/RichSelect.js +3 -3
  129. package/dist/components/RichSelect/SelectBody/SelectBody.js +4 -4
  130. package/dist/components/RichSelect/SelectCreate/SelectCreate.js +4 -4
  131. package/dist/components/RichSelect/SelectHeading/SelectHeading.js +4 -4
  132. package/dist/components/RichSelect/SelectLabel/SelectLabel.js +2 -2
  133. package/dist/components/RichSelect/SelectMenu/SelectMenu.js +4 -4
  134. package/dist/components/RichSelect/SelectMenu/SelectMenuItem.js +4 -4
  135. package/dist/components/RichSelect/SelectSearch/SelectSearch.js +3 -3
  136. package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.js +2 -2
  137. package/dist/components/RichSelect/SelectTags/SelectTags.js +3 -3
  138. package/dist/components/RichSelect/components/SelectActivator.js +1 -1
  139. package/dist/components/RichSelect/components/SelectOptions.js +4 -4
  140. package/dist/components/RichSelect/index.js +1 -1
  141. package/dist/components/Row/Row.js +4 -4
  142. package/dist/components/Row/index.js +1 -1
  143. package/dist/components/Select/Select.js +3 -3
  144. package/dist/components/Select/components/SelectControl.js +2 -2
  145. package/dist/components/Select/components/SelectReadonly.js +4 -4
  146. package/dist/components/Select/helpers/mapSelectOptions.js +9 -9
  147. package/dist/components/Select/helpers/nodesToSelectOptions.js +1 -1
  148. package/dist/components/Select/index.js +1 -1
  149. package/dist/components/Skeleton/Skeleton.js +11 -11
  150. package/dist/components/SkipLink/SkipLink.js +2 -2
  151. package/dist/components/Slideout/Slideout.js +4 -4
  152. package/dist/components/Slideout/components/SlideoutInner.js +3 -3
  153. package/dist/components/Slideout/hooks/useIDSProvidedSlideout.js +7 -7
  154. package/dist/components/Slideout/index.js +1 -1
  155. package/dist/components/Slider/Slider.js +3 -3
  156. package/dist/components/Slider/components/SliderTicks.js +2 -2
  157. package/dist/components/Slider/index.js +1 -1
  158. package/dist/components/Spinner/Spinner.js +2 -2
  159. package/dist/components/Spinner/index.js +1 -1
  160. package/dist/components/Stack/Stack.js +1 -1
  161. package/dist/components/TabSet/Tab/Tab.js +52 -52
  162. package/dist/components/TabSet/TabSet.js +24 -24
  163. package/dist/components/TabSet/TabSetProvider.js +30 -30
  164. package/dist/components/TabSet/components/TabSetItem.js +31 -32
  165. package/dist/components/TabSet/helpers/mapTabs.js +19 -19
  166. package/dist/components/Table/Table.js +3 -3
  167. package/dist/components/Table/TableBody/TableBody.js +91 -91
  168. package/dist/components/Table/TableProvider.js +2 -2
  169. package/dist/components/Table/components/TableEmpty.js +8 -8
  170. package/dist/components/Table/components/TableHeader.js +2 -2
  171. package/dist/components/Table/components/TableHeaderCell.js +1 -1
  172. package/dist/components/Table/components/TableRows.js +34 -34
  173. package/dist/components/Table/components/TableSortButton.js +3 -3
  174. package/dist/components/Table/helpers/composeIDSTableColumnDefs.js +22 -22
  175. package/dist/components/Table/helpers/composeIDSTableInitialSorting.js +2 -2
  176. package/dist/components/Table/hooks/useIDSTableColumnSort.js +6 -6
  177. package/dist/components/Table/hooks/useIDSTableColumnStyles.js +14 -15
  178. package/dist/components/Table/index.js +1 -1
  179. package/dist/components/Tag/Tag.js +2 -2
  180. package/dist/components/Tag/TagInput/TagInput.js +1 -1
  181. package/dist/components/Tag/components/TagListInput/TagListInput.js +2 -2
  182. package/dist/components/Tag/index.js +1 -1
  183. package/dist/components/Text/Text.js +1 -1
  184. package/dist/components/Toaster/Toast/Toast.js +2 -2
  185. package/dist/components/Toaster/Toast/ToastAnimated.js +3 -3
  186. package/dist/components/Toaster/Toast/ToastIcon.js +1 -1
  187. package/dist/components/Toaster/Toaster.js +3 -3
  188. package/dist/components/Toaster/ToasterProvider.js +1 -1
  189. package/dist/components/Toaster/hooks/useToaster.js +1 -1
  190. package/dist/components/Toaster/index.js +1 -1
  191. package/dist/components/Toggle/Toggle.js +25 -25
  192. package/dist/components/Tooltip/Tooltip.js +3 -3
  193. package/dist/components/ValidationMessage/ValidationBase/ValidationBase.js +2 -2
  194. package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +2 -2
  195. package/dist/constants.js +1 -1
  196. package/dist/floating-ui.react-DYBeYtOf.js +3464 -0
  197. package/dist/fuzzysort-BNka47rs.js +395 -0
  198. package/dist/helpers/dom/closestCrossShadow.js +16 -17
  199. package/dist/helpers/dom/focusableElements.js +6 -6
  200. package/dist/helpers/dom/getActiveElement.js +5 -6
  201. package/dist/helpers/formatting/formatDateTime.js +8 -7
  202. package/dist/helpers/label-value/composeLabelValueDescriptor.js +8 -8
  203. package/dist/helpers/label-value/getQueryRangeExclusive.js +1 -1
  204. package/dist/helpers/label-value/getValueFromLabelValues.js +5 -6
  205. package/dist/helpers/label-value/highlightQueryInLabel.js +4 -7
  206. package/dist/helpers/label-value/searchLabelValues.js +1 -1
  207. package/dist/helpers/responsive/getResponsiveLayoutModifiers.js +4 -4
  208. package/dist/helpers/transition/getTransitionDuration.js +5 -8
  209. package/dist/hooks/useAriaRelationship.js +19 -21
  210. package/dist/hooks/useBreakpoint.js +8 -11
  211. package/dist/hooks/useControlledState.js +40 -40
  212. package/dist/{index-BQfnxwrU.js → index-BaVtNOfa.js} +41 -51
  213. package/dist/{index-Dms7F5NM.js → index-DLnR8XTt.js} +1 -11
  214. package/dist/{index-2QXL0WYc.js → index-cbHCAGLB.js} +2 -7
  215. package/dist/{index.esm-BnSuefUA.js → index.esm-CL8gh5wr.js} +1 -5
  216. package/dist/main.js +159 -158
  217. package/dist/patterns/Loading/Loading.js +1 -1
  218. package/dist/patterns/Loading/LoadingSuspense.js +1 -1
  219. package/dist/patterns/Loading/components/ComponentLoading.js +3 -3
  220. package/dist/patterns/Loading/components/DefaultLoading.js +3 -3
  221. package/dist/patterns/Loading/components/LongLoading.js +42 -42
  222. package/dist/patterns/Loading/components/PageLoading.js +3 -3
  223. package/dist/patterns/Loading/components/StartUpLoading.js +65 -65
  224. package/dist/patterns/Loading/components/ValidateLoading.js +3 -3
  225. package/dist/patterns/Loading/index.js +1 -1
  226. package/dist/src/components/InputCurrency/InputCurrency.d.ts +1 -2
  227. package/dist/src/components/RadioGroup/RadioGroup.d.ts +5 -0
  228. package/dist/src/components/TabSet/TabSet.types.d.ts +1 -1
  229. package/dist/src/components/Table/Table.types.d.ts +1 -1
  230. package/dist/src/components/Table/helpers/composeIDSTableColumnDefs.d.ts +1 -1
  231. package/dist/src/components/Table/helpers/findColumnByKey.d.ts +1 -1
  232. package/dist/src/components/Toaster/hooks/useToaster.d.ts +1 -1
  233. package/dist/style.css +1 -1
  234. package/dist/useIDSButtonGroupItem-BB7Moa3N.js +29 -0
  235. package/package.json +67 -38
  236. package/dist/ComboboxHiddenInput-gTOjjF3f.js +0 -32
  237. package/dist/InputBase-BFK9n82f.js +0 -56
  238. package/dist/Loading.module-g2pe-Gfx.js +0 -13
  239. package/dist/LoadingSuspense-D9nGJ3gx.js +0 -5773
  240. package/dist/LogoFromSrc-BnImWqt6.js +0 -59
  241. package/dist/MenuItem.module-BxcFZeSh.js +0 -24
  242. package/dist/Popover.module-BKrF_xRW.js +0 -11
  243. package/dist/PopoverProvider-d3hhpW2k.js +0 -142
  244. package/dist/SliderTicks-DQN0Ka4d.js +0 -78
  245. package/dist/TabSet.module-FRUnHgA1.js +0 -13
  246. package/dist/Table.module-r-RfIeLI.js +0 -32
  247. package/dist/floating-ui.react-nmA48tb2.js +0 -3463
  248. package/dist/fuzzysort-eoXOpoo6.js +0 -395
  249. package/dist/useIDSButtonGroupItem-VfKx4O-O.js +0 -30
  250. package/dist/vite.config.d.ts +0 -2
  251. package/dist/vitest.config.d.ts +0 -2
  252. package/dist/vitest.setup.d.ts +0 -0
  253. /package/{LICENSE.txt → LICENSE} +0 -0
@@ -1,62 +1,59 @@
1
- import { jsx as E } from "react/jsx-runtime";
2
- import { s as R } from "../../../Popover.module-BKrF_xRW.js";
3
- import { usePopover as k } from "../hooks/usePopover.js";
4
- import { useCallback as f, cloneElement as F } from "react";
5
- import { hasFocus as S } from "../helpers/hasFocus.js";
6
- import { usePopoverActivatorInteractions as W } from "../hooks/usePopoverActivatorInteractions.js";
7
- const M = ({
8
- children: c,
9
- disabledAutoToggle: o,
10
- minLength: m,
11
- ...h
1
+ import { jsx as w } from "react/jsx-runtime";
2
+ import { s as C } from "../../../Popover.module-ZU-08mVQ.js";
3
+ import { usePopover as E } from "../hooks/usePopover.js";
4
+ import { useCallback as i, cloneElement as R } from "react";
5
+ import { hasFocus as P } from "../helpers/hasFocus.js";
6
+ import { usePopoverActivatorInteractions as k } from "../hooks/usePopoverActivatorInteractions.js";
7
+ const L = ({
8
+ children: a,
9
+ disabledAutoToggle: s,
10
+ minLength: v,
11
+ ...f
12
12
  }) => {
13
- const t = k(), n = c == null ? void 0 : c.props, e = m ?? n.minLength ?? 1, i = "focus", v = f(
14
- (s) => {
15
- var r;
16
- const a = s.currentTarget.value;
17
- if (!o) {
18
- const u = a.length >= e;
19
- u && (t == null ? void 0 : t.show) === !1 ? t.setShowWithReason(!0, s.nativeEvent, i) : !u && (t != null && t.show) && t.setShowWithReason(!1, s.nativeEvent, i);
13
+ const t = E(), n = a?.props, o = v ?? n.minLength ?? 1, c = "focus", u = i(
14
+ (e) => {
15
+ const r = e.currentTarget.value;
16
+ if (!s) {
17
+ const h = r.length >= o;
18
+ h && t?.show === !1 ? t.setShowWithReason(!0, e.nativeEvent, c) : !h && t?.show && t.setShowWithReason(!1, e.nativeEvent, c);
20
19
  }
21
- (r = n.onChange) == null || r.call(n, s, a);
20
+ n.onChange?.(e, r);
22
21
  },
23
- [n, o, e, t]
24
- ), l = f(
25
- (s) => {
26
- var r;
27
- const a = s.currentTarget.value;
28
- (r = n.onClick) == null || r.call(n, s), !o && (t == null ? void 0 : t.show) === !1 && S(s.currentTarget) && a.length >= e && t.setShowWithReason(!0, s.nativeEvent, i);
22
+ [n, s, o, t]
23
+ ), p = i(
24
+ (e) => {
25
+ const r = e.currentTarget.value;
26
+ n.onClick?.(e), !s && t?.show === !1 && P(e.currentTarget) && r.length >= o && t.setShowWithReason(!0, e.nativeEvent, c);
29
27
  },
30
- [n, o, e, t]
31
- ), w = f(
32
- (s) => {
33
- var a;
34
- (a = n.onFocus) == null || a.call(n, s), !o && (!e || s.currentTarget.value.length >= e) && (t == null ? void 0 : t.show) === !1 && t.setShowWithReason(!0, s.nativeEvent, "focus");
28
+ [n, s, o, t]
29
+ ), l = i(
30
+ (e) => {
31
+ n.onFocus?.(e), !s && (!o || e.currentTarget.value.length >= o) && t?.show === !1 && t.setShowWithReason(!0, e.nativeEvent, "focus");
35
32
  },
36
- [n, o, e, t]
37
- ), C = W(
33
+ [n, s, o, t]
34
+ ), m = k(
38
35
  t,
39
36
  n
40
37
  );
41
- return /* @__PURE__ */ E(
38
+ return /* @__PURE__ */ w(
42
39
  "div",
43
40
  {
44
- ...h,
45
- className: R.activator,
46
- ref: t == null ? void 0 : t.api.refs.setReference,
47
- children: c && t && F(
48
- c,
41
+ ...f,
42
+ className: C.activator,
43
+ ref: t?.api.refs.setReference,
44
+ children: a && t && R(
45
+ a,
49
46
  t.interactions.getReferenceProps({
50
- ...C,
47
+ ...m,
51
48
  "aria-autocomplete": "list",
52
- onChange: v,
53
- onClick: l,
54
- onFocus: w
49
+ onChange: u,
50
+ onClick: p,
51
+ onFocus: l
55
52
  })
56
53
  )
57
54
  }
58
55
  );
59
56
  };
60
57
  export {
61
- M as InputPopoverActivator
58
+ L as InputPopoverActivator
62
59
  };
@@ -1,107 +1,107 @@
1
- import { jsx as V } from "react/jsx-runtime";
2
- import { forwardRef as _, useRef as k, useMemo as d, useCallback as q } from "react";
3
- import { o as y, h as U, s as $, i as z, j as G, k as K, l as X, m as A } from "../../../floating-ui.react-nmA48tb2.js";
4
- import { POPOVER_USE_MAX_HEIGHT as B } from "../Popover.types.js";
5
- import { usePopoverState as J } from "../hooks/usePopoverState.js";
6
- import { usePopoverNavigation as L } from "../hooks/usePopoverNavigation.js";
7
- import { usePopoverAria as Q } from "../hooks/usePopoverAria.js";
8
- import { a as W } from "../../../PopoverProvider-d3hhpW2k.js";
9
- import { usePopoverImperativeHandle as Y } from "../hooks/usePopoverImperativeHandle.js";
10
- import { focusableElements as Z } from "../../../helpers/dom/focusableElements.js";
11
- const T = _(
1
+ import { jsx as S } from "react/jsx-runtime";
2
+ import { forwardRef as V, useRef as _, useMemo as P, useCallback as k } from "react";
3
+ import { o as q, h as y, s as U, i as $, j as z, k as D, l as G, m as K } from "../../../floating-ui.react-DYBeYtOf.js";
4
+ import { POPOVER_USE_MAX_HEIGHT as X } from "../Popover.types.js";
5
+ import { usePopoverState as B } from "../hooks/usePopoverState.js";
6
+ import { usePopoverNavigation as J } from "../hooks/usePopoverNavigation.js";
7
+ import { usePopoverAria as L } from "../hooks/usePopoverAria.js";
8
+ import { a as Q } from "../../../PopoverProvider-Cvg6ObBO.js";
9
+ import { usePopoverImperativeHandle as W } from "../hooks/usePopoverImperativeHandle.js";
10
+ import { focusableElements as Y } from "../../../helpers/dom/focusableElements.js";
11
+ const Z = V(
12
12
  ({
13
- align: f,
14
- autoHighlight: I,
15
- children: O,
16
- defaultShow: g,
17
- disabledAutoToggle: u,
18
- focusStartIndex: m,
19
- matchActivatorWidth: x = !0,
20
- onActivated: p,
21
- onDeactivated: l,
13
+ align: p,
14
+ autoHighlight: h,
15
+ children: w,
16
+ defaultShow: I,
17
+ disabledAutoToggle: c,
18
+ focusStartIndex: u,
19
+ matchActivatorWidth: l = !0,
20
+ onActivated: O,
21
+ onDeactivated: g,
22
22
  onNavigate: F,
23
23
  show: E,
24
24
  type: n
25
25
  }, R) => {
26
- const b = f === "auto", v = k(null), r = J({
27
- defaultShow: g,
26
+ const b = p === "auto", f = _(null), r = B({
27
+ defaultShow: I,
28
28
  show: E
29
- }), C = d(() => {
30
- const e = [y(5), U({ padding: 5 })];
31
- return x && e.push(
32
- $({
33
- apply({ rects: t, availableHeight: s, elements: S }) {
29
+ }), A = P(() => {
30
+ const e = [q(5), y({ padding: 5 })];
31
+ return l && e.push(
32
+ U({
33
+ apply({ rects: s, availableHeight: t, elements: N }) {
34
34
  requestAnimationFrame(() => {
35
- Object.assign(S.floating.style, {
36
- width: `${t.reference.width}px`,
37
- maxHeight: s > B ? `${s}px` : void 0
35
+ Object.assign(N.floating.style, {
36
+ width: `${s.reference.width}px`,
37
+ maxHeight: t > X ? `${t}px` : void 0
38
38
  });
39
39
  });
40
40
  },
41
41
  padding: 5
42
42
  })
43
43
  ), e;
44
- }, [x]), o = z({
44
+ }, [l]), o = $({
45
45
  open: r.show,
46
- onOpenChange: (e, t, s) => {
47
- r.setShow(e), e ? p == null || p(t, s, i) : l == null || l(t, s, i);
46
+ onOpenChange: (e, s, t) => {
47
+ r.setShow(e), e ? O?.(s, t, i) : g?.(s, t, i);
48
48
  },
49
- middleware: C,
50
- placement: b ? void 0 : f,
51
- whileElementsMounted: G
52
- }), M = K(o.context, {
53
- enabled: !u,
49
+ middleware: A,
50
+ placement: b ? void 0 : p,
51
+ whileElementsMounted: z
52
+ }), C = D(o.context, {
53
+ enabled: !c,
54
54
  escapeKey: !1
55
- }), j = X(o.context, {
55
+ }), M = G(o.context, {
56
56
  role: n
57
- }), { activeIndex: i, list: P, listNav: H, setActiveIndex: a } = L(
57
+ }), { activeIndex: i, list: v, listNav: j, setActiveIndex: a } = J(
58
58
  o.context,
59
59
  n,
60
60
  {
61
- focusItemOnOpen: I,
61
+ focusItemOnOpen: h,
62
62
  virtual: !0
63
63
  },
64
64
  F,
65
- m
66
- ), h = A([M, j, H]), c = Q(), w = q(() => {
67
- a(m ?? null);
68
- }, [m, a]), N = d(
65
+ u
66
+ ), d = K([C, M, j]), m = L(), x = k(() => {
67
+ a(u ?? null);
68
+ }, [u, a]), H = P(
69
69
  () => ({
70
- ...c,
70
+ ...m,
71
71
  ...r,
72
72
  activeIndex: i,
73
73
  api: o,
74
- disabledAutoToggle: u,
74
+ disabledAutoToggle: c,
75
75
  getFocusableActivator: () => {
76
76
  const e = o.elements.reference;
77
- return (e == null ? void 0 : e.querySelector("[role=combobox]")) ?? Z(e)[0];
77
+ return e?.querySelector("[role=combobox]") ?? Y(e)[0];
78
78
  },
79
- getVirtualFocus: () => v.current,
80
- interactions: h,
81
- list: P,
82
- resetActiveIndex: w,
79
+ getVirtualFocus: () => f.current,
80
+ interactions: d,
81
+ list: v,
82
+ resetActiveIndex: x,
83
83
  setActiveIndex: a,
84
- setShowWithReason: (e, t, s) => o.context.onOpenChange(e, t, s),
85
- setVirtualFocus: (e) => v.current = e,
84
+ setShowWithReason: (e, s, t) => o.context.onOpenChange(e, s, t),
85
+ setVirtualFocus: (e) => f.current = e,
86
86
  type: n
87
87
  }),
88
88
  [
89
89
  i,
90
90
  o,
91
+ m,
91
92
  c,
92
- u,
93
- h,
94
- P,
95
- w,
93
+ d,
94
+ v,
95
+ x,
96
96
  a,
97
97
  r,
98
98
  n
99
99
  ]
100
100
  );
101
- return Y(R, o, c, r), /* @__PURE__ */ V(W.Provider, { value: N, children: O });
101
+ return W(R, o, m, r), /* @__PURE__ */ S(Q.Provider, { value: H, children: w });
102
102
  }
103
103
  );
104
- T.displayName = "InputPopoverProvider";
104
+ Z.displayName = "InputPopoverProvider";
105
105
  export {
106
- T as InputPopoverProvider
106
+ Z as InputPopoverProvider
107
107
  };
@@ -1,12 +1,12 @@
1
1
  import { jsx as t, jsxs as C } from "react/jsx-runtime";
2
2
  import { forwardRef as I, useRef as W } from "react";
3
- import { c as j } from "../../index-2QXL0WYc.js";
3
+ import { c as j } from "../../index-cbHCAGLB.js";
4
4
  import { PopoverType as R } from "./Popover.types.js";
5
5
  import { FloatingUIAlign as S, GlobalCSSClass as b } from "../../enums.js";
6
6
  import { idsLogger as k } from "../../helpers/utility/idsLogger.js";
7
7
  import { propagateTestid as a } from "../../helpers/utility/propagateTestid.js";
8
- import { s as E } from "../../Popover.module-BKrF_xRW.js";
9
- import { P as F } from "../../PopoverProvider-d3hhpW2k.js";
8
+ import { s as E } from "../../Popover.module-ZU-08mVQ.js";
9
+ import { P as F } from "../../PopoverProvider-Cvg6ObBO.js";
10
10
  import { PopoverActivator as G } from "./components/PopoverActivator.js";
11
11
  import { PopoverContent as L } from "./components/PopoverContent.js";
12
12
  import { composePopoverWidth as U } from "./helpers/composePopoverWidth.js";
@@ -1,13 +1,13 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import "../../floating-ui.react-nmA48tb2.js";
3
+ import "../../floating-ui.react-DYBeYtOf.js";
4
4
  import "./Popover.types.js";
5
5
  import "./hooks/usePopoverState.js";
6
6
  import "./hooks/usePopoverNavigation.js";
7
7
  import "./hooks/usePopoverAria.js";
8
8
  import "./hooks/usePopoverImperativeHandle.js";
9
9
  import "../../helpers/dom/focusableElements.js";
10
- import { a as d, P as f } from "../../PopoverProvider-d3hhpW2k.js";
10
+ import { a as d, P as f } from "../../PopoverProvider-Cvg6ObBO.js";
11
11
  import "../../helpers/dom/closestCrossShadow.js";
12
12
  export {
13
13
  d as PopoverContext,
@@ -1,5 +1,5 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { f as e } from "../../../floating-ui.react-nmA48tb2.js";
2
+ import { f as e } from "../../../floating-ui.react-DYBeYtOf.js";
3
3
  const f = ({
4
4
  children: t,
5
5
  parentPopover: o
@@ -1,13 +1,13 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { s as c } from "../../../Popover.module-BKrF_xRW.js";
3
- import { PopoverCssClass as m } from "../Popover.types.js";
4
- import { usePopover as g } from "../hooks/usePopover.js";
5
- import { useRef as A, useMemo as b, useEffect as v } from "react";
6
- import { focusableElements as T } from "../../../helpers/dom/focusableElements.js";
7
- import { safeClosest as f } from "../../../helpers/dom/domUtils.js";
8
- import { usePopoverActivatorInteractions as x } from "../hooks/usePopoverActivatorInteractions.js";
9
- import { c as E } from "../../../index-2QXL0WYc.js";
10
- const P = [
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { s as c } from "../../../Popover.module-ZU-08mVQ.js";
3
+ import { PopoverCssClass as d } from "../Popover.types.js";
4
+ import { usePopover as p } from "../hooks/usePopover.js";
5
+ import { useRef as m, useMemo as v, useEffect as g } from "react";
6
+ import { focusableElements as A } from "../../../helpers/dom/focusableElements.js";
7
+ import { safeClosest as u } from "../../../helpers/dom/domUtils.js";
8
+ import { usePopoverActivatorInteractions as b } from "../hooks/usePopoverActivatorInteractions.js";
9
+ import { c as T } from "../../../index-cbHCAGLB.js";
10
+ const h = [
11
11
  "aria-controls",
12
12
  "aria-expanded",
13
13
  "aria-haspopup",
@@ -15,73 +15,68 @@ const P = [
15
15
  "id",
16
16
  "role",
17
17
  "tabindex"
18
- ], y = (o, i) => {
19
- const t = o.querySelector("[id]"), a = t == null ? void 0 : t.getAttribute("id");
20
- t == null || t.removeAttribute("id"), P.forEach((s) => {
21
- const n = o.getAttribute(s);
22
- o.removeAttribute(s), n && i.setAttribute(s, n);
23
- }), a && i.setAttribute("id", a);
24
- }, N = ({
25
- children: o,
26
- ...i
18
+ ], x = (s, a) => {
19
+ const t = s.querySelector("[id]"), o = t?.getAttribute("id");
20
+ t?.removeAttribute("id"), h.forEach((r) => {
21
+ const i = s.getAttribute(r);
22
+ s.removeAttribute(r), i && a.setAttribute(r, i);
23
+ }), o && a.setAttribute("id", o);
24
+ }, q = ({
25
+ children: s,
26
+ ...a
27
27
  }) => {
28
- const t = g(), a = A(null), s = o == null ? void 0 : o.props, n = x(
28
+ const t = p(), o = m(null), r = s?.props, i = b(
29
29
  t,
30
- s
31
- ), l = b(() => {
32
- if (t != null && t.show)
30
+ r
31
+ ), f = v(() => {
32
+ if (t?.show)
33
33
  return [
34
34
  ...t.getAriaControls(),
35
- s["aria-controls"],
35
+ r["aria-controls"],
36
36
  t.api.context.floatingId
37
37
  ].join(" ").trim();
38
- }, [s, t]);
39
- return v(() => {
40
- var r, e;
41
- !a.current || !(t != null && t.getVirtualFocus) || t.activeIndex === null || (setTimeout(
42
- () => {
43
- var u;
44
- return (u = t == null ? void 0 : t.api.refs.domReference.current) == null ? void 0 : u.removeAttribute(
45
- "aria-activedescendant"
46
- );
47
- }
48
- ), a.current.setAttribute(
38
+ }, [r, t]);
39
+ return g(() => {
40
+ !o.current || !t?.getVirtualFocus || t.activeIndex === null || (setTimeout(
41
+ () => t?.api.refs.domReference.current?.removeAttribute(
42
+ "aria-activedescendant"
43
+ )
44
+ ), o.current.setAttribute(
49
45
  "aria-activedescendant",
50
- ((e = (r = t.list.current) == null ? void 0 : r[t.activeIndex]) == null ? void 0 : e.id) ?? ""
46
+ t.list.current?.[t.activeIndex]?.id ?? ""
51
47
  ));
52
- }, [t]), /* @__PURE__ */ d(
48
+ }, [t]), /* @__PURE__ */ l(
53
49
  "div",
54
50
  {
55
- ...i,
56
- className: E(c.activator, {
57
- [m.Active]: t == null ? void 0 : t.show
51
+ ...a,
52
+ className: T(c.activator, {
53
+ [d.Active]: t?.show
58
54
  }),
59
- ...t == null ? void 0 : t.interactions.getReferenceProps({
60
- ...n,
61
- "aria-controls": l,
62
- role: s.role,
63
- ref: (r) => {
64
- if (!r) return;
65
- t == null || t.api.refs.setReference(r);
66
- const e = (r == null ? void 0 : r.querySelector("[role=combobox]")) ?? T(r)[0];
67
- e && (a.current = e, y(r, e));
55
+ ...t?.interactions.getReferenceProps({
56
+ ...i,
57
+ "aria-controls": f,
58
+ role: r.role,
59
+ ref: (e) => {
60
+ if (!e) return;
61
+ t?.api.refs.setReference(e);
62
+ const n = e?.querySelector("[role=combobox]") ?? A(e)[0];
63
+ n && (o.current = n, x(e, n));
68
64
  },
69
- onBlur: (r) => {
70
- r.relatedTarget instanceof Element && f(r.relatedTarget, `.${c.content}`) && (r.preventDefault(), r.stopPropagation());
65
+ onBlur: (e) => {
66
+ e.relatedTarget instanceof Element && u(e.relatedTarget, `.${c.content}`) && (e.preventDefault(), e.stopPropagation());
71
67
  },
72
- onFocus: (r) => {
73
- t != null && t.disabledAutoToggle || r.relatedTarget instanceof Element && (r.relatedTarget.hasAttribute("data-floating-ui-focus-guard") || f(r.relatedTarget, `.${c.content}`)) && t.show && (setTimeout(() => {
74
- var e;
75
- (e = a.current) == null || e.focus();
68
+ onFocus: (e) => {
69
+ t?.disabledAutoToggle || e.relatedTarget instanceof Element && (e.relatedTarget.hasAttribute("data-floating-ui-focus-guard") || u(e.relatedTarget, `.${c.content}`)) && t.show && (setTimeout(() => {
70
+ o.current?.focus();
76
71
  }), setTimeout(() => {
77
- t.setShowWithReason(!1, r.nativeEvent, "focus");
72
+ t.setShowWithReason(!1, e.nativeEvent, "focus");
78
73
  }, 300));
79
74
  }
80
75
  }),
81
- children: o
76
+ children: s
82
77
  }
83
78
  );
84
79
  };
85
80
  export {
86
- N as PopoverActivator
81
+ q as PopoverActivator
87
82
  };
@@ -1,59 +1,59 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { c } from "../../../index-2QXL0WYc.js";
3
- import { s as m } from "../../../Popover.module-BKrF_xRW.js";
4
- import { usePopover as g } from "../hooks/usePopover.js";
5
- import { b as F, F as h, c as p, d as i, e as P, f as I, g as N } from "../../../floating-ui.react-nmA48tb2.js";
6
- import { composePopoverFloatingProps as x } from "../helpers/composeFloatingProps.js";
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { c } from "../../../index-cbHCAGLB.js";
3
+ import { s as p } from "../../../Popover.module-ZU-08mVQ.js";
4
+ import { usePopover as u } from "../hooks/usePopover.js";
5
+ import { b as g, F, c as h, d as i, e as P, f as v, g as I } from "../../../floating-ui.react-DYBeYtOf.js";
6
+ import { composePopoverFloatingProps as N } from "../helpers/composeFloatingProps.js";
7
7
  const l = ({
8
- children: n,
9
- className: o,
10
- displayMode: r,
8
+ children: e,
9
+ className: r,
10
+ displayMode: n,
11
11
  style: s,
12
12
  virtualFocus: a,
13
- ...f
13
+ ...m
14
14
  }) => {
15
- const t = g();
15
+ const t = u();
16
16
  if (!t) return null;
17
- const u = x(
17
+ const f = N(
18
18
  t,
19
- r,
19
+ n,
20
20
  s
21
21
  );
22
- return /* @__PURE__ */ e(I, { elementsRef: t.list, children: /* @__PURE__ */ e(
23
- N,
22
+ return /* @__PURE__ */ o(v, { elementsRef: t.list, children: /* @__PURE__ */ o(
23
+ I,
24
24
  {
25
25
  context: t.api.context,
26
26
  initialFocus: a ? -1 : 0,
27
27
  modal: !1,
28
- disabled: !(t != null && t.show),
28
+ disabled: !t?.show,
29
29
  returnFocus: !a,
30
- children: /* @__PURE__ */ e(
30
+ children: /* @__PURE__ */ o(
31
31
  "div",
32
32
  {
33
+ ...m,
34
+ className: c(r, p.content),
35
+ hidden: !t?.show,
36
+ ref: t?.api.refs.setFloating,
33
37
  ...f,
34
- className: c(o, m.content),
35
- hidden: !(t != null && t.show),
36
- ref: t == null ? void 0 : t.api.refs.setFloating,
37
- ...u,
38
- children: n
38
+ children: e
39
39
  }
40
40
  )
41
41
  }
42
42
  ) });
43
43
  }, d = ({
44
- className: n,
45
- container: o,
46
- ...r
44
+ className: e,
45
+ container: r,
46
+ ...n
47
47
  }) => {
48
- const s = p();
49
- return o ? /* @__PURE__ */ e(i, { id: s, children: /* @__PURE__ */ e(P, { root: o, preserveTabOrder: !0, children: /* @__PURE__ */ e(
48
+ const s = h();
49
+ return r ? /* @__PURE__ */ o(i, { id: s, children: /* @__PURE__ */ o(P, { root: r, preserveTabOrder: !0, children: /* @__PURE__ */ o(
50
50
  l,
51
51
  {
52
- ...r,
53
- className: c(n, m.portal)
52
+ ...n,
53
+ className: c(e, p.portal)
54
54
  }
55
- ) }) }) : /* @__PURE__ */ e(i, { id: s, children: /* @__PURE__ */ e(l, { ...r, className: n }) });
56
- }, y = (n) => F() === null ? /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(d, { ...n }) }) : /* @__PURE__ */ e(d, { ...n });
55
+ ) }) }) : /* @__PURE__ */ o(i, { id: s, children: /* @__PURE__ */ o(l, { ...n, className: e }) });
56
+ }, y = (e) => g() === null ? /* @__PURE__ */ o(F, { children: /* @__PURE__ */ o(d, { ...e }) }) : /* @__PURE__ */ o(d, { ...e });
57
57
  export {
58
58
  y as PopoverContent
59
59
  };
@@ -1,37 +1,34 @@
1
- import { getActiveElement as h } from "../../../helpers/dom/getActiveElement.js";
2
- import { handlePopoverTabKey as x } from "./handlePopoverTabKey.js";
3
- const I = (t, e, d) => {
4
- var c;
5
- const s = t != null && t.hasInnerRole() || t == null ? void 0 : t.type, g = s && ["listbox", "menu", "tree"].includes(s), m = s && ["application", "combobox", "composite", "group"].includes(s), f = e === "inline", y = () => {
1
+ import { getActiveElement as f } from "../../../helpers/dom/getActiveElement.js";
2
+ import { handlePopoverTabKey as m } from "./handlePopoverTabKey.js";
3
+ const x = (t, e, o) => {
4
+ const i = t?.hasInnerRole() ? void 0 : t?.type, c = i && ["listbox", "menu", "tree"].includes(i), l = i && ["application", "combobox", "composite", "group"].includes(i), r = e === "inline", u = () => {
6
5
  setTimeout(() => {
7
- var i, a;
8
- h() === t.api.elements.floating && !t.getVirtualFocus && ((a = (i = t.list.current) == null ? void 0 : i[0]) == null || a.focus());
6
+ f() === t.api.elements.floating && !t.getVirtualFocus && t.list.current?.[0]?.focus();
9
7
  });
10
- }, r = (i) => {
11
- var l, u;
8
+ }, d = (n) => {
12
9
  const a = t.getVirtualFocus !== void 0;
13
- if (i.key === "Tab" && x(t, i), i.key === "PageUp" && !a && ((l = t.list.current[0]) == null || l.focus()), i.key === "PageDown" && !a) {
14
- const b = Math.max((t == null ? void 0 : t.list.current.length) - 1, 0);
15
- (u = t.list.current[b]) == null || u.focus();
10
+ if (n.key === "Tab" && m(t, n), n.key === "PageUp" && !a && t.list.current[0]?.focus(), n.key === "PageDown" && !a) {
11
+ const g = Math.max(t?.list.current.length - 1, 0);
12
+ t.list.current[g]?.focus();
16
13
  }
17
- t.disabledAutoToggle || A(t, i);
18
- }, n = t.interactions.getFloatingProps({
19
- onFocus: y,
20
- onKeyDown: r
14
+ t.disabledAutoToggle || y(t, n);
15
+ }, s = t.interactions.getFloatingProps({
16
+ onFocus: u,
17
+ onKeyDown: d
21
18
  });
22
19
  return {
23
- ...n,
24
- "aria-activedescendant": m ? n == null ? void 0 : n["aria-activedescendant"] : void 0,
25
- "aria-orientation": g ? n == null ? void 0 : n["aria-orientation"] : void 0,
26
- role: s,
20
+ ...s,
21
+ "aria-activedescendant": l ? s?.["aria-activedescendant"] : void 0,
22
+ "aria-orientation": c ? s?.["aria-orientation"] : void 0,
23
+ role: i,
27
24
  style: {
28
- ...d,
29
- ...f ? {} : (c = t == null ? void 0 : t.api) == null ? void 0 : c.floatingStyles
25
+ ...o,
26
+ ...r ? {} : t?.api?.floatingStyles
30
27
  }
31
28
  };
32
- }, A = (t, e) => {
29
+ }, y = (t, e) => {
33
30
  t.type !== "listbox" || e.key !== "ArrowUp" || t.activeIndex !== 0 || t.setShowWithReason(!1, e.nativeEvent, "list-navigation");
34
31
  };
35
32
  export {
36
- I as composePopoverFloatingProps
33
+ x as composePopoverFloatingProps
37
34
  };
@@ -1,5 +1,5 @@
1
- import { t as f } from "../../../index.esm-BnSuefUA.js";
2
- import { s as c } from "../../../Popover.module-BKrF_xRW.js";
1
+ import { t as f } from "../../../index.esm-CL8gh5wr.js";
2
+ import { s as c } from "../../../Popover.module-ZU-08mVQ.js";
3
3
  import { FOCUSABLE_QUERY_SELECTOR as l } from "../../../constants.js";
4
4
  import { focusableElements as m } from "../../../helpers/dom/focusableElements.js";
5
5
  import { waitUntilTrue as u } from "./waitUntilTrue.js";
@@ -1,5 +1,5 @@
1
1
  import { useContext as o } from "react";
2
- import { a as t } from "../../../PopoverProvider-d3hhpW2k.js";
2
+ import { a as t } from "../../../PopoverProvider-Cvg6ObBO.js";
3
3
  const p = () => o(t);
4
4
  export {
5
5
  p as usePopover