@iress-oss/ids-components 0.0.1-dev.2 → 0.0.1-dev.20

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 (239) hide show
  1. package/README.md +1 -1
  2. package/dist/{AutocompleteNoResults-ImNh0dmJ.js → AutocompleteNoResults-CogA3XZs.js} +1 -1
  3. package/dist/{ComboboxHiddenInput-BVhoQtv3.js → ComboboxHiddenInput-gTOjjF3f.js} +5 -5
  4. package/dist/{FieldAppendToLabel-CY2e0YuF.js → FieldAppendToLabel-DCv5E5th.js} +13 -11
  5. package/dist/{InputBase-LsLk3nX1.js → InputBase-BFK9n82f.js} +1 -1
  6. package/dist/Loading.module-g2pe-Gfx.js +13 -0
  7. package/dist/LoadingSuspense-BwlrIicY.js +5773 -0
  8. package/dist/LogoFromSrc-BnImWqt6.js +59 -0
  9. package/dist/MenuItem.module-BxcFZeSh.js +24 -0
  10. package/dist/Popover.module-BKrF_xRW.js +11 -0
  11. package/dist/PopoverProvider-d3hhpW2k.js +142 -0
  12. package/dist/{SelectControl-BJo08wJN.js → SelectControl-D1SJlplM.js} +1 -1
  13. package/dist/SlideoutProvider-CQh140HM.js +200 -0
  14. package/dist/{SliderTicks-MkaJGb9A.js → SliderTicks-DQN0Ka4d.js} +1 -1
  15. package/dist/TabSet.module-FRUnHgA1.js +13 -0
  16. package/dist/Table.module-r-RfIeLI.js +32 -0
  17. package/dist/components/Alert/Alert.js +1 -1
  18. package/dist/components/Alert/index.js +1 -1
  19. package/dist/components/Autocomplete/Autocomplete.js +8 -6
  20. package/dist/components/Autocomplete/components/AutocompleteInstructions.js +12 -0
  21. package/dist/components/Autocomplete/components/AutocompleteNoResults.js +1 -1
  22. package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +160 -95
  23. package/dist/components/Autocomplete/index.js +1 -1
  24. package/dist/components/Badge/Badge.js +4 -4
  25. package/dist/components/Button/Button.js +2 -2
  26. package/dist/components/Button/CloseButton/CloseButton.js +1 -1
  27. package/dist/components/Button/index.js +1 -1
  28. package/dist/components/ButtonGroup/ButtonGroup.js +2 -2
  29. package/dist/components/ButtonGroup/hooks/useIDSButtonGroupItem.js +1 -1
  30. package/dist/components/ButtonGroup/index.js +1 -1
  31. package/dist/components/Checkbox/Checkbox.js +1 -1
  32. package/dist/components/Checkbox/helpers/mapCheckboxGroupOptions.js +1 -1
  33. package/dist/components/Checkbox/index.js +1 -1
  34. package/dist/components/CheckboxGroup/CheckboxGroup.js +6 -6
  35. package/dist/components/CheckboxMark/CheckboxMark.types.js +2 -2
  36. package/dist/components/Combobox/Combobox.js +7 -5
  37. package/dist/components/Combobox/MultiCombobox/MultiCombobox.js +7 -5
  38. package/dist/components/Combobox/components/ComboboxHiddenInput.js +1 -1
  39. package/dist/components/Combobox/components/ComboboxResults.js +8 -6
  40. package/dist/components/Combobox/components/ComboboxResultsDescriptor.js +6 -4
  41. package/dist/components/Combobox/index.js +1 -1
  42. package/dist/components/Expander/Expander.js +1 -1
  43. package/dist/components/Field/Field.js +1 -1
  44. package/dist/components/Field/FieldGroup/FieldGroup.js +2 -2
  45. package/dist/components/Field/components/FieldAppendToLabel.js +7 -5
  46. package/dist/components/Filter/Filter.js +7 -5
  47. package/dist/components/Filter/components/FilterResetButton.js +6 -4
  48. package/dist/components/Filter/components/FilterSearch.js +6 -4
  49. package/dist/components/Filter/index.js +1 -1
  50. package/dist/components/Form/Form.js +1 -1
  51. package/dist/components/Form/FormField/FormField.js +45 -39
  52. package/dist/components/Form/FormField/FormFieldset.js +13 -11
  53. package/dist/components/Form/HookForm/HookForm.js +1 -1
  54. package/dist/components/Form/index.js +1 -1
  55. package/dist/components/Hide/Hide.js +1 -1
  56. package/dist/components/Hide/helpers/composeHideClasses.js +7 -5
  57. package/dist/components/Hide/index.js +1 -1
  58. package/dist/components/Icon/Icon.js +6 -4
  59. package/dist/components/Icon/index.js +1 -1
  60. package/dist/components/Inline/Inline.js +6 -4
  61. package/dist/components/Inline/index.js +1 -1
  62. package/dist/components/Input/ClearButton/ClearButton.js +1 -1
  63. package/dist/components/Input/Input.js +2 -2
  64. package/dist/components/Input/InputBase/InputBase.js +1 -1
  65. package/dist/components/Input/index.js +1 -1
  66. package/dist/components/InputCurrency/InputCurrency.js +1 -1
  67. package/dist/components/InputCurrency/index.js +1 -1
  68. package/dist/components/Label/LabelBase/LabelBase.js +1 -1
  69. package/dist/components/Menu/Menu.js +1 -1
  70. package/dist/components/Menu/MenuDivider/MenuDivider.js +6 -4
  71. package/dist/components/Menu/MenuHeading/MenuHeading.js +2 -2
  72. package/dist/components/Menu/MenuItem/MenuItem.js +1 -1
  73. package/dist/components/Menu/MenuItem/hooks/useMenuItemButtonProps.js +1 -1
  74. package/dist/components/Menu/MenuItem/hooks/useMenuItemComposite.js +2 -2
  75. package/dist/components/Menu/MenuItem/hooks/useMenuItemInteractions.js +41 -41
  76. package/dist/components/Menu/MenuText/MenuText.js +7 -5
  77. package/dist/components/Menu/helpers/mapMenuItems.js +1 -1
  78. package/dist/components/Menu/hooks/useMenuStyles.js +3 -3
  79. package/dist/components/Menu/index.js +1 -1
  80. package/dist/components/Modal/Modal.js +2 -2
  81. package/dist/components/Modal/hooks/useModal.js +17 -14
  82. package/dist/components/Modal/index.js +1 -1
  83. package/dist/components/Navbar/Navbar.js +2 -2
  84. package/dist/components/Navbar/components/HomeLinkContent.js +2 -2
  85. package/dist/components/Navbar/components/LogoFromSrc.js +1 -1
  86. package/dist/components/Navbar/components/NavbarLogo.js +2 -2
  87. package/dist/components/Navbar/index.js +1 -1
  88. package/dist/components/Placeholder/Placeholder.js +1 -1
  89. package/dist/components/Popover/InputPopover/InputPopover.js +36 -34
  90. package/dist/components/Popover/InputPopover/InputPopoverActivator.js +1 -1
  91. package/dist/components/Popover/InputPopover/InputPopoverProvider.js +72 -66
  92. package/dist/components/Popover/Popover.js +32 -30
  93. package/dist/components/Popover/PopoverProvider.js +13 -111
  94. package/dist/components/Popover/components/NestedPopoverActivator.js +9 -0
  95. package/dist/components/Popover/components/PopoverActivator.js +40 -41
  96. package/dist/components/Popover/components/PopoverContent.js +15 -15
  97. package/dist/components/Popover/helpers/composeFloatingProps.js +26 -22
  98. package/dist/components/Popover/helpers/handlePopoverTabKey.js +16 -13
  99. package/dist/components/Popover/helpers/waitUntilTrue.js +12 -0
  100. package/dist/components/Popover/hooks/usePopover.js +1 -1
  101. package/dist/components/Popover/hooks/usePopoverActivatorInteractions.js +25 -17
  102. package/dist/components/Popover/hooks/usePopoverItem.js +1 -1
  103. package/dist/components/Popover/hooks/usePopoverNavigation.js +1 -1
  104. package/dist/components/Progress/Progress.js +1 -1
  105. package/dist/components/Provider/Provider.js +38 -0
  106. package/dist/components/Provider/index.js +4 -0
  107. package/dist/components/Radio/Radio.js +1 -1
  108. package/dist/components/Radio/helpers/mapRadioGroupOptions.js +1 -1
  109. package/dist/components/Radio/index.js +1 -1
  110. package/dist/components/RadioGroup/RadioGroup.js +3 -3
  111. package/dist/components/Readonly/Readonly.js +7 -5
  112. package/dist/components/Readonly/index.js +1 -1
  113. package/dist/components/RichSelect/RichSelect.js +6 -4
  114. package/dist/components/RichSelect/SelectBody/SelectBody.js +7 -5
  115. package/dist/components/RichSelect/SelectCreate/SelectCreate.js +11 -9
  116. package/dist/components/RichSelect/SelectHeading/SelectHeading.js +6 -4
  117. package/dist/components/RichSelect/SelectLabel/SelectLabel.js +1 -1
  118. package/dist/components/RichSelect/SelectMenu/SelectMenu.js +6 -4
  119. package/dist/components/RichSelect/SelectMenu/SelectMenuItem.js +6 -4
  120. package/dist/components/RichSelect/SelectSearch/SelectSearch.js +5 -3
  121. package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.js +1 -1
  122. package/dist/components/RichSelect/SelectTags/SelectTags.js +5 -3
  123. package/dist/components/RichSelect/components/SelectActivator.js +1 -1
  124. package/dist/components/RichSelect/components/SelectOptions.js +6 -4
  125. package/dist/components/RichSelect/index.js +1 -1
  126. package/dist/components/Row/Row.js +6 -4
  127. package/dist/components/Row/index.js +1 -1
  128. package/dist/components/Select/Select.js +2 -2
  129. package/dist/components/Select/components/SelectControl.js +1 -1
  130. package/dist/components/Select/components/SelectReadonly.js +6 -4
  131. package/dist/components/Select/helpers/mapSelectOptions.js +1 -1
  132. package/dist/components/Select/helpers/nodesToSelectOptions.js +3 -3
  133. package/dist/components/Select/index.js +1 -1
  134. package/dist/components/Skeleton/Skeleton.js +2 -2
  135. package/dist/components/SkipLink/SkipLink.js +1 -1
  136. package/dist/components/Slideout/Slideout.js +5 -3
  137. package/dist/components/Slideout/SlideoutProvider.js +6 -89
  138. package/dist/components/Slideout/components/SlideoutInner.js +3 -2
  139. package/dist/components/Slideout/hooks/useIDSProvidedSlideout.js +1 -1
  140. package/dist/components/Slideout/hooks/useSlideout.js +17 -14
  141. package/dist/components/Slideout/index.js +7 -7
  142. package/dist/components/Slider/Slider.js +2 -2
  143. package/dist/components/Slider/components/SliderTicks.js +1 -1
  144. package/dist/components/Slider/index.js +1 -1
  145. package/dist/components/Spinner/Spinner.js +1 -1
  146. package/dist/components/Spinner/index.js +1 -1
  147. package/dist/components/TabSet/Tab/Tab.js +74 -62
  148. package/dist/components/TabSet/TabSet.js +2 -2
  149. package/dist/components/TabSet/components/TabSetItem.js +2 -2
  150. package/dist/components/Table/Table.js +4 -3
  151. package/dist/components/Table/TableBody/TableBody.js +2 -2
  152. package/dist/components/Table/TableProvider.js +29 -25
  153. package/dist/components/Table/components/TableEmpty.js +1 -1
  154. package/dist/components/Table/components/TableHeader.js +2 -2
  155. package/dist/components/Table/components/TableHeaderCell.js +2 -2
  156. package/dist/components/Table/components/TableRows.js +1 -1
  157. package/dist/components/Table/components/TableSortButton.js +2 -2
  158. package/dist/components/Table/helpers/composeIDSTableColumnDefs.js +5 -5
  159. package/dist/components/Table/hooks/useIDSTableColumnStyles.js +1 -1
  160. package/dist/components/Table/index.js +1 -1
  161. package/dist/components/Tag/Tag.js +1 -1
  162. package/dist/components/Tag/TagInput/TagInput.js +1 -1
  163. package/dist/components/Tag/components/TagListInput/TagListInput.js +1 -1
  164. package/dist/components/Tag/index.js +1 -1
  165. package/dist/components/Toaster/Toast/Toast.js +1 -1
  166. package/dist/components/Toaster/Toast/ToastAnimated.js +2 -2
  167. package/dist/components/Toaster/Toast/ToastIcon.js +1 -1
  168. package/dist/components/Toaster/Toaster.js +3 -3
  169. package/dist/components/Toaster/ToasterProvider.js +1 -1
  170. package/dist/components/Toaster/hooks/useToaster.js +24 -3
  171. package/dist/components/Toaster/index.js +11 -10
  172. package/dist/components/Toggle/Toggle.js +3 -3
  173. package/dist/components/Tooltip/Tooltip.js +18 -18
  174. package/dist/components/ValidationMessage/ValidationBase/ValidationBase.js +1 -1
  175. package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +1 -1
  176. package/dist/constants.js +11 -11
  177. package/dist/{floating-ui.react-D_ysmiM3.js → floating-ui.react-nmA48tb2.js} +1055 -1034
  178. package/dist/helpers/dom/closestCrossShadow.js +26 -0
  179. package/dist/helpers/dom/domUtils.js +12 -0
  180. package/dist/helpers/formatting/formatDateTime.js +21 -16
  181. package/dist/helpers/label-value/highlightQueryInLabelValue.js +6 -5
  182. package/dist/{index-CmsyHM_3.js → index-BQfnxwrU.js} +2 -2
  183. package/dist/{index-CtOScEKX.js → index-Dms7F5NM.js} +8 -8
  184. package/dist/main.js +185 -181
  185. package/dist/patterns/Loading/Loading.js +1 -1
  186. package/dist/patterns/Loading/LoadingSuspense.js +5 -49
  187. package/dist/patterns/Loading/components/ComponentLoading.js +2 -2
  188. package/dist/patterns/Loading/components/DefaultLoading.js +2 -2
  189. package/dist/patterns/Loading/components/LongLoading.js +2 -2
  190. package/dist/patterns/Loading/components/PageLoading.js +2 -2
  191. package/dist/patterns/Loading/components/StartUpLoading.js +2 -2
  192. package/dist/patterns/Loading/components/ValidateLoading.js +2 -2
  193. package/dist/patterns/Loading/index.js +3 -2
  194. package/dist/src/components/Autocomplete/Autocomplete.types.d.ts +38 -0
  195. package/dist/src/components/Autocomplete/components/AutocompleteInstructions.d.ts +2 -0
  196. package/dist/src/components/Autocomplete/hooks/useAutocompleteSearch.d.ts +5 -1
  197. package/dist/src/components/Form/Form.types.d.ts +10 -1
  198. package/dist/src/components/Form/FormField/FormField.d.ts +1 -1
  199. package/dist/src/components/Form/FormField/FormField.types.d.ts +8 -2
  200. package/dist/src/components/Modal/Modal.types.d.ts +4 -0
  201. package/dist/src/components/Popover/Popover.types.d.ts +3 -1
  202. package/dist/src/components/Popover/components/NestedPopoverActivator.d.ts +5 -0
  203. package/dist/src/components/Popover/helpers/handlePopoverTabKey.d.ts +1 -1
  204. package/dist/src/components/Popover/helpers/waitUntilTrue.d.ts +1 -0
  205. package/dist/src/components/Provider/Provider.d.ts +20 -0
  206. package/dist/src/components/Provider/index.d.ts +1 -0
  207. package/dist/src/components/RichSelect/RichSelect.types.d.ts +27 -1
  208. package/dist/src/components/RichSelect/SelectMenu/SelectMenuItem.d.ts +1 -1
  209. package/dist/src/components/RichSelect/components/SelectOptions.d.ts +4 -2
  210. package/dist/src/components/Slideout/Slideout.types.d.ts +5 -1
  211. package/dist/src/components/Table/Table.d.ts +7 -6
  212. package/dist/src/components/Table/Table.types.d.ts +10 -1
  213. package/dist/src/components/Table/TableProvider.d.ts +5 -2
  214. package/dist/src/components/Toaster/Toast/Toast.types.d.ts +2 -1
  215. package/dist/src/components/Toaster/ToasterProvider.d.ts +5 -2
  216. package/dist/src/components/Toaster/hooks/useToaster.d.ts +3 -3
  217. package/dist/src/constants.d.ts +7 -7
  218. package/dist/src/helpers/dom/closestCrossShadow.d.ts +9 -0
  219. package/dist/src/helpers/dom/domUtils.d.ts +5 -0
  220. package/dist/src/interfaces.d.ts +1 -0
  221. package/dist/src/main.d.ts +1 -0
  222. package/dist/src/patterns/Loading/LoadingSuspense.d.ts +1 -2
  223. package/dist/src/patterns/Loading/components/PageLoading.d.ts +3 -3
  224. package/dist/src/patterns/Loading/hooks/useShouldRenderLoading.d.ts +1 -0
  225. package/dist/src/patterns/Loading/index.d.ts +1 -0
  226. package/dist/style.css +1 -1
  227. package/dist/{useIDSButtonGroupItem-Y0ZSkNW8.js → useIDSButtonGroupItem-VfKx4O-O.js} +1 -1
  228. package/dist/vitest.config.d.ts +2 -0
  229. package/package.json +16 -28
  230. package/dist/Loading-rKDsRTjZ.js +0 -5638
  231. package/dist/Loading.module-C58kTwE4.js +0 -13
  232. package/dist/LogoFromSrc-KxC2Gztm.js +0 -59
  233. package/dist/MenuItem.module-3aqP1ZMw.js +0 -24
  234. package/dist/Popover.module-CLIdWyZD.js +0 -11
  235. package/dist/TabSet.module-DGDICWMf.js +0 -13
  236. package/dist/Table.module-Co33h7CZ.js +0 -32
  237. package/dist/components/Autocomplete/hooks/useAutocompleteFlags.js +0 -16
  238. package/dist/src/components/Autocomplete/hooks/useAutocompleteFlags.d.ts +0 -5
  239. /package/dist/{setupTests.d.ts → vitest.setup.d.ts} +0 -0
@@ -1,101 +1,107 @@
1
- import { jsx as H } from "react/jsx-runtime";
2
- import { forwardRef as N, useRef as V, useMemo as d } from "react";
3
- import { o as _, f as q, c as y, d as U, j as $, g as z, h as G, i as K } from "../../../floating-ui.react-D_ysmiM3.js";
4
- import { POPOVER_USE_MAX_HEIGHT as X } from "../Popover.types.js";
5
- import { usePopoverState as k } from "../hooks/usePopoverState.js";
6
- import { usePopoverNavigation as B } from "../hooks/usePopoverNavigation.js";
7
- import { usePopoverAria as J } from "../hooks/usePopoverAria.js";
8
- import { PopoverContext as L } from "../PopoverProvider.js";
9
- import { usePopoverImperativeHandle as Q } from "../hooks/usePopoverImperativeHandle.js";
10
- import { focusableElements as W } from "../../../helpers/dom/focusableElements.js";
11
- const Y = N(
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 = _(
12
12
  ({
13
- align: c,
14
- autoHighlight: h,
15
- children: w,
16
- defaultShow: v,
13
+ align: f,
14
+ autoHighlight: I,
15
+ children: O,
16
+ defaultShow: g,
17
17
  disabledAutoToggle: u,
18
- focusStartIndex: g,
19
- matchActivatorWidth: l = !0,
20
- onActivated: a,
21
- onDeactivated: m,
22
- onNavigate: I,
23
- show: O,
18
+ focusStartIndex: m,
19
+ matchActivatorWidth: x = !0,
20
+ onActivated: p,
21
+ onDeactivated: l,
22
+ onNavigate: F,
23
+ show: E,
24
24
  type: n
25
- }, F) => {
26
- const E = c === "auto", f = V(null), t = k({
27
- defaultShow: v,
28
- show: O
29
- }), R = d(() => {
30
- const o = [_(5), q({ padding: 5 })];
31
- return l && o.push(
32
- y({
33
- apply({ rects: r, availableHeight: s, elements: C }) {
25
+ }, R) => {
26
+ const b = f === "auto", v = k(null), r = J({
27
+ defaultShow: g,
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 }) {
34
34
  requestAnimationFrame(() => {
35
- Object.assign(C.floating.style, {
36
- width: `${r.reference.width}px`,
37
- maxHeight: s > X ? `${s}px` : void 0
35
+ Object.assign(S.floating.style, {
36
+ width: `${t.reference.width}px`,
37
+ maxHeight: s > B ? `${s}px` : void 0
38
38
  });
39
39
  });
40
40
  },
41
41
  padding: 5
42
42
  })
43
- ), o;
44
- }, [l]), e = U({
45
- open: t.show,
46
- onOpenChange: (o, r, s) => {
47
- t.setShow(o), o ? a == null || a(r, s, i) : m == null || m(r, s, i);
43
+ ), e;
44
+ }, [x]), o = z({
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);
48
48
  },
49
- middleware: R,
50
- placement: E ? void 0 : c,
51
- whileElementsMounted: $
52
- }), S = z(e.context, {
49
+ middleware: C,
50
+ placement: b ? void 0 : f,
51
+ whileElementsMounted: G
52
+ }), M = K(o.context, {
53
53
  enabled: !u,
54
54
  escapeKey: !1
55
- }), M = G(e.context, {
55
+ }), j = X(o.context, {
56
56
  role: n
57
- }), { activeIndex: i, list: x, listNav: b } = B(
58
- e.context,
57
+ }), { activeIndex: i, list: P, listNav: H, setActiveIndex: a } = L(
58
+ o.context,
59
59
  n,
60
60
  {
61
- focusItemOnOpen: h,
61
+ focusItemOnOpen: I,
62
62
  virtual: !0
63
63
  },
64
- I,
65
- g
66
- ), P = K([S, M, b]), p = J(), j = d(
64
+ F,
65
+ m
66
+ ), h = A([M, j, H]), c = Q(), w = q(() => {
67
+ a(m ?? null);
68
+ }, [m, a]), N = d(
67
69
  () => ({
68
- ...p,
69
- ...t,
70
+ ...c,
71
+ ...r,
70
72
  activeIndex: i,
71
- api: e,
73
+ api: o,
72
74
  disabledAutoToggle: u,
73
75
  getFocusableActivator: () => {
74
- const o = e.elements.reference;
75
- return (o == null ? void 0 : o.querySelector("[role=combobox]")) ?? W(o)[0];
76
+ const e = o.elements.reference;
77
+ return (e == null ? void 0 : e.querySelector("[role=combobox]")) ?? Z(e)[0];
76
78
  },
77
- getVirtualFocus: () => f.current,
78
- interactions: P,
79
- list: x,
80
- setShowWithReason: (o, r, s) => e.context.onOpenChange(o, r, s),
81
- setVirtualFocus: (o) => f.current = o,
79
+ getVirtualFocus: () => v.current,
80
+ interactions: h,
81
+ list: P,
82
+ resetActiveIndex: w,
83
+ setActiveIndex: a,
84
+ setShowWithReason: (e, t, s) => o.context.onOpenChange(e, t, s),
85
+ setVirtualFocus: (e) => v.current = e,
82
86
  type: n
83
87
  }),
84
88
  [
85
89
  i,
86
- e,
87
- p,
90
+ o,
91
+ c,
88
92
  u,
93
+ h,
89
94
  P,
90
- x,
91
- t,
95
+ w,
96
+ a,
97
+ r,
92
98
  n
93
99
  ]
94
100
  );
95
- return Q(F, e, p, t), /* @__PURE__ */ H(L.Provider, { value: j, children: w });
101
+ return Y(R, o, c, r), /* @__PURE__ */ V(W.Provider, { value: N, children: O });
96
102
  }
97
103
  );
98
- Y.displayName = "InputPopoverProvider";
104
+ T.displayName = "InputPopoverProvider";
99
105
  export {
100
- Y as InputPopoverProvider
106
+ T as InputPopoverProvider
101
107
  };
@@ -1,77 +1,79 @@
1
- import { jsx as t, jsxs as I } from "react/jsx-runtime";
2
- import { forwardRef as N, useRef as W } from "react";
1
+ import { jsx as t, jsxs as C } from "react/jsx-runtime";
2
+ import { forwardRef as I, useRef as W } from "react";
3
3
  import { c as j } from "../../index-2QXL0WYc.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-CLIdWyZD.js";
9
- import { PopoverProvider as F } from "./PopoverProvider.js";
8
+ import { s as E } from "../../Popover.module-BKrF_xRW.js";
9
+ import { P as F } from "../../PopoverProvider-d3hhpW2k.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";
13
- const q = ({
13
+ import { usePopover as q } from "./hooks/usePopover.js";
14
+ import { NestedPopoverActivator as z } from "./components/NestedPopoverActivator.js";
15
+ const B = ({
14
16
  activator: p,
15
17
  align: d = "auto",
16
18
  children: n,
17
- className: l,
18
- container: c,
19
- contentClassName: f,
20
- defaultShow: v,
19
+ className: c,
20
+ container: l,
21
+ contentClassName: v,
22
+ defaultShow: f,
21
23
  disabledAutoToggle: h,
22
24
  displayMode: e = "overlay",
23
- focusStartIndex: g,
24
- matchActivatorWidth: P,
25
+ focusStartIndex: P,
26
+ matchActivatorWidth: g,
25
27
  onActivated: y,
26
28
  onDeactivated: A,
27
- onNavigate: x,
28
- type: T,
29
- show: u,
29
+ onNavigate: u,
30
+ type: x,
31
+ show: N,
30
32
  width: r,
31
33
  virtualFocus: i,
32
34
  ...o
33
- }, w) => {
34
- const C = W(null), s = P && e === "overlay";
35
+ }, T) => {
36
+ const w = W(null), s = g && e === "overlay";
35
37
  return r !== void 0 && k(
36
38
  "IressPopover: The width prop is deprecated. Please use the --iress-width and --iress-max-width design token instead."
37
39
  ), /* @__PURE__ */ t(
38
40
  F,
39
41
  {
40
42
  align: d,
41
- defaultShow: v,
43
+ defaultShow: f,
42
44
  disabledAutoToggle: h,
43
- focusStartIndex: g,
45
+ focusStartIndex: P,
44
46
  matchActivatorWidth: s,
45
47
  onActivated: y,
46
48
  onDeactivated: A,
47
- onNavigate: x,
48
- ref: w,
49
- show: u,
50
- type: T,
49
+ onNavigate: u,
50
+ ref: T,
51
+ show: N,
52
+ type: x,
51
53
  virtualFocus: i,
52
- children: /* @__PURE__ */ I(
54
+ children: /* @__PURE__ */ C(
53
55
  "div",
54
56
  {
55
57
  ...o,
56
58
  className: j(
57
- l,
59
+ c,
58
60
  b.FormElement,
59
61
  E.popover
60
62
  ),
61
- ref: C,
63
+ ref: w,
62
64
  children: [
63
- /* @__PURE__ */ t(
65
+ /* @__PURE__ */ t(z, { parentPopover: q(), children: /* @__PURE__ */ t(
64
66
  G,
65
67
  {
66
68
  "data-testid": a(o["data-testid"], "activator"),
67
69
  children: p
68
70
  }
69
- ),
71
+ ) }),
70
72
  /* @__PURE__ */ t(
71
73
  L,
72
74
  {
73
- className: f,
74
- container: c,
75
+ className: v,
76
+ container: l,
75
77
  "data-testid": a(o["data-testid"], "content"),
76
78
  displayMode: e,
77
79
  style: {
@@ -87,7 +89,7 @@ const q = ({
87
89
  )
88
90
  }
89
91
  );
90
- }, m = N(q);
92
+ }, m = I(B);
91
93
  m.Align = S;
92
94
  m.Type = R;
93
95
  export {
@@ -1,113 +1,15 @@
1
- import { jsx as V } from "react/jsx-runtime";
2
- import { createContext as _, forwardRef as k, useRef as q, useMemo as f } from "react";
3
- import { o as U, b as $, f as y, s as z, c as G, d as X, e as B, g as J, h as K, i as L, j as Q } from "../../floating-ui.react-D_ysmiM3.js";
4
- import { POPOVER_USE_MAX_HEIGHT as W } from "./Popover.types.js";
5
- import { usePopoverState as Y } from "./hooks/usePopoverState.js";
6
- import { usePopoverNavigation as Z } from "./hooks/usePopoverNavigation.js";
7
- import { usePopoverAria as T } from "./hooks/usePopoverAria.js";
8
- import { usePopoverImperativeHandle as A } from "./hooks/usePopoverImperativeHandle.js";
9
- import { focusableElements as D } from "../../helpers/dom/focusableElements.js";
10
- const ee = _(
11
- void 0
12
- ), oe = k(
13
- ({
14
- align: x,
15
- children: C,
16
- defaultShow: E,
17
- disabledAutoToggle: n,
18
- focusStartIndex: I,
19
- matchActivatorWidth: P,
20
- onActivated: c,
21
- onDeactivated: m,
22
- onNavigate: R,
23
- type: i,
24
- show: S,
25
- virtualFocus: u
26
- }, b) => {
27
- const p = x === "auto", h = q(null), r = Y({
28
- defaultShow: E,
29
- show: S
30
- }), g = f(() => {
31
- const e = [
32
- U(5),
33
- p ? $() : y(),
34
- z()
35
- ];
36
- return P && e.push(
37
- G({
38
- apply({ rects: s, availableHeight: t, elements: H }) {
39
- requestAnimationFrame(() => {
40
- Object.assign(H.floating.style, {
41
- width: `${s.reference.width}px`,
42
- maxHeight: t > W ? `${t}px` : void 0
43
- });
44
- });
45
- },
46
- padding: 5
47
- })
48
- ), e;
49
- }, [p, P]), o = X({
50
- open: r.show,
51
- onOpenChange: (e, s, t) => {
52
- r.setShow(e), e ? c == null || c(s, t, a) : m == null || m(s, t, a);
53
- },
54
- middleware: g,
55
- placement: p ? void 0 : x,
56
- whileElementsMounted: Q
57
- }), M = B(o.context, {
58
- enabled: !n
59
- }), N = J(o.context, {
60
- enabled: !n
61
- }), j = K(o.context, {
62
- role: i
63
- }), { activeIndex: a, list: w, listNav: F } = Z(
64
- o.context,
65
- i,
66
- {
67
- focusItemOnOpen: !0,
68
- virtual: u
69
- },
70
- R,
71
- I
72
- ), l = T(), d = L([M, N, j, F]), v = f(() => u ? {
73
- getVirtualFocus: () => h.current,
74
- setVirtualFocus: (e) => {
75
- h.current = e;
76
- }
77
- } : {}, [u]), O = f(
78
- () => ({
79
- ...l,
80
- ...r,
81
- ...v,
82
- api: o,
83
- activeIndex: a,
84
- disabledAutoToggle: n,
85
- getFocusableActivator: () => {
86
- const e = o.elements.reference;
87
- return (e == null ? void 0 : e.querySelector("[role=combobox]")) ?? D(e)[0];
88
- },
89
- interactions: d,
90
- list: w,
91
- setShowWithReason: (e, s, t) => o.context.onOpenChange(e, s, t),
92
- type: i
93
- }),
94
- [
95
- a,
96
- o,
97
- l,
98
- n,
99
- d,
100
- w,
101
- r,
102
- i,
103
- v
104
- ]
105
- );
106
- return A(b, o, l, r, O), /* @__PURE__ */ V(ee.Provider, { value: O, children: C });
107
- }
108
- );
109
- oe.displayName = "PopoverProvider";
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "../../floating-ui.react-nmA48tb2.js";
4
+ import "./Popover.types.js";
5
+ import "./hooks/usePopoverState.js";
6
+ import "./hooks/usePopoverNavigation.js";
7
+ import "./hooks/usePopoverAria.js";
8
+ import "./hooks/usePopoverImperativeHandle.js";
9
+ import "../../helpers/dom/focusableElements.js";
10
+ import { a as d, P as f } from "../../PopoverProvider-d3hhpW2k.js";
11
+ import "../../helpers/dom/closestCrossShadow.js";
110
12
  export {
111
- ee as PopoverContext,
112
- oe as PopoverProvider
13
+ d as PopoverContext,
14
+ f as PopoverProvider
113
15
  };
@@ -0,0 +1,9 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { f as e } from "../../../floating-ui.react-nmA48tb2.js";
3
+ const f = ({
4
+ children: t,
5
+ parentPopover: o
6
+ }) => o ? /* @__PURE__ */ r(e, { elementsRef: o.list, children: t }) : t;
7
+ export {
8
+ f as NestedPopoverActivator
9
+ };
@@ -1,11 +1,12 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
- import { s as u } from "../../../Popover.module-CLIdWyZD.js";
3
- import { PopoverCssClass as l } from "../Popover.types.js";
4
- import { usePopover as m } from "../hooks/usePopover.js";
5
- import { useRef as A, useMemo as g, useEffect as b } from "react";
6
- import { focusableElements as v } from "../../../helpers/dom/focusableElements.js";
7
- import { usePopoverActivatorInteractions as T } from "../hooks/usePopoverActivatorInteractions.js";
8
- import { c as x } from "../../../index-2QXL0WYc.js";
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";
9
10
  const P = [
10
11
  "aria-controls",
11
12
  "aria-expanded",
@@ -14,75 +15,73 @@ const P = [
14
15
  "id",
15
16
  "role",
16
17
  "tabindex"
17
- ], y = (s, c) => {
18
- const t = s.querySelector("[id]"), a = t == null ? void 0 : t.getAttribute("id");
19
- t == null || t.removeAttribute("id"), P.forEach((e) => {
20
- const n = s.getAttribute(e);
21
- s.removeAttribute(e), n && c.setAttribute(e, n);
22
- }), a && c.setAttribute("id", a);
23
- }, F = ({
24
- children: s,
25
- ...c
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
26
27
  }) => {
27
- const t = m(), a = A(null), e = s == null ? void 0 : s.props, n = T(
28
+ const t = g(), a = A(null), s = o == null ? void 0 : o.props, n = x(
28
29
  t,
29
- e
30
- ), f = g(() => {
30
+ s
31
+ ), l = b(() => {
31
32
  if (t != null && t.show)
32
33
  return [
33
34
  ...t.getAriaControls(),
34
- e["aria-controls"],
35
+ s["aria-controls"],
35
36
  t.api.context.floatingId
36
37
  ].join(" ").trim();
37
- }, [e, t]);
38
- return b(() => {
39
- var r, o;
38
+ }, [s, t]);
39
+ return v(() => {
40
+ var r, e;
40
41
  !a.current || !(t != null && t.getVirtualFocus) || t.activeIndex === null || (setTimeout(
41
42
  () => {
42
- var i;
43
- return (i = t == null ? void 0 : t.api.refs.domReference.current) == null ? void 0 : i.removeAttribute(
43
+ var u;
44
+ return (u = t == null ? void 0 : t.api.refs.domReference.current) == null ? void 0 : u.removeAttribute(
44
45
  "aria-activedescendant"
45
46
  );
46
47
  }
47
48
  ), a.current.setAttribute(
48
49
  "aria-activedescendant",
49
- ((o = (r = t.list.current) == null ? void 0 : r[t.activeIndex]) == null ? void 0 : o.id) ?? ""
50
+ ((e = (r = t.list.current) == null ? void 0 : r[t.activeIndex]) == null ? void 0 : e.id) ?? ""
50
51
  ));
51
52
  }, [t]), /* @__PURE__ */ d(
52
53
  "div",
53
54
  {
54
- ...c,
55
- className: x(u.activator, {
56
- [l.Active]: t == null ? void 0 : t.show
55
+ ...i,
56
+ className: E(c.activator, {
57
+ [m.Active]: t == null ? void 0 : t.show
57
58
  }),
58
59
  ...t == null ? void 0 : t.interactions.getReferenceProps({
59
60
  ...n,
60
- "aria-controls": f,
61
- role: e.role,
61
+ "aria-controls": l,
62
+ role: s.role,
62
63
  ref: (r) => {
63
64
  if (!r) return;
64
65
  t == null || t.api.refs.setReference(r);
65
- const o = (r == null ? void 0 : r.querySelector("[role=combobox]")) ?? v(r)[0];
66
- o && (a.current = o, y(r, o));
66
+ const e = (r == null ? void 0 : r.querySelector("[role=combobox]")) ?? T(r)[0];
67
+ e && (a.current = e, y(r, e));
67
68
  },
68
69
  onBlur: (r) => {
69
- var o;
70
- (o = r.relatedTarget) != null && o.closest(`.${u.content}`) && (r.preventDefault(), r.stopPropagation());
70
+ r.relatedTarget instanceof Element && f(r.relatedTarget, `.${c.content}`) && (r.preventDefault(), r.stopPropagation());
71
71
  },
72
72
  onFocus: (r) => {
73
- var o;
74
- t != null && t.disabledAutoToggle || r.relatedTarget && (r.relatedTarget.hasAttribute("data-floating-ui-focus-guard") || (o = r.relatedTarget) != null && o.closest(`.${u.content}`)) && t.show && (setTimeout(() => {
75
- var i;
76
- (i = a.current) == null || i.focus();
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();
77
76
  }), setTimeout(() => {
78
77
  t.setShowWithReason(!1, r.nativeEvent, "focus");
79
78
  }, 300));
80
79
  }
81
80
  }),
82
- children: s
81
+ children: o
83
82
  }
84
83
  );
85
84
  };
86
85
  export {
87
- F as PopoverActivator
86
+ N as PopoverActivator
88
87
  };
@@ -1,25 +1,25 @@
1
- import { jsx as n } from "react/jsx-runtime";
1
+ import { jsx as e } from "react/jsx-runtime";
2
2
  import { c } from "../../../index-2QXL0WYc.js";
3
- import { s as m } from "../../../Popover.module-CLIdWyZD.js";
4
- import { usePopover as F } from "../hooks/usePopover.js";
5
- import { k as g, F as h, l as p, m as i, n as P, p as I, q as N } from "../../../floating-ui.react-D_ysmiM3.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
6
  import { composePopoverFloatingProps as x } from "../helpers/composeFloatingProps.js";
7
7
  const l = ({
8
- children: e,
8
+ children: n,
9
9
  className: o,
10
10
  displayMode: r,
11
11
  style: s,
12
12
  virtualFocus: a,
13
13
  ...f
14
14
  }) => {
15
- const t = F();
15
+ const t = g();
16
16
  if (!t) return null;
17
17
  const u = x(
18
18
  t,
19
19
  r,
20
20
  s
21
21
  );
22
- return /* @__PURE__ */ n(I, { elementsRef: t.list, children: /* @__PURE__ */ n(
22
+ return /* @__PURE__ */ e(I, { elementsRef: t.list, children: /* @__PURE__ */ e(
23
23
  N,
24
24
  {
25
25
  context: t.api.context,
@@ -27,7 +27,7 @@ const l = ({
27
27
  modal: !1,
28
28
  disabled: !(t != null && t.show),
29
29
  returnFocus: !a,
30
- children: /* @__PURE__ */ n(
30
+ children: /* @__PURE__ */ e(
31
31
  "div",
32
32
  {
33
33
  ...f,
@@ -35,25 +35,25 @@ const l = ({
35
35
  hidden: !(t != null && t.show),
36
36
  ref: t == null ? void 0 : t.api.refs.setFloating,
37
37
  ...u,
38
- children: e
38
+ children: n
39
39
  }
40
40
  )
41
41
  }
42
42
  ) });
43
43
  }, d = ({
44
- className: e,
44
+ className: n,
45
45
  container: o,
46
46
  ...r
47
47
  }) => {
48
48
  const s = p();
49
- return o ? /* @__PURE__ */ n(i, { id: s, children: /* @__PURE__ */ n(P, { root: o, preserveTabOrder: !0, children: /* @__PURE__ */ n(
49
+ return o ? /* @__PURE__ */ e(i, { id: s, children: /* @__PURE__ */ e(P, { root: o, preserveTabOrder: !0, children: /* @__PURE__ */ e(
50
50
  l,
51
51
  {
52
52
  ...r,
53
- className: c(e, m.portal)
53
+ className: c(n, m.portal)
54
54
  }
55
- ) }) }) : /* @__PURE__ */ n(i, { id: s, children: /* @__PURE__ */ n(l, { ...r, className: e }) });
56
- }, q = (e) => g() === null ? /* @__PURE__ */ n(h, { children: /* @__PURE__ */ n(d, { ...e }) }) : /* @__PURE__ */ n(d, { ...e });
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 });
57
57
  export {
58
- q as PopoverContent
58
+ y as PopoverContent
59
59
  };