@easypost/easy-ui 1.0.0-alpha.65 → 1.0.0-alpha.66

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 (219) hide show
  1. package/Badge/index.js +14 -14
  2. package/Badge/index.mjs +14 -14
  3. package/Banner/index.js +5 -5
  4. package/Banner/index.mjs +5 -5
  5. package/Button/index.js +1 -1
  6. package/Button/index.mjs +1 -1
  7. package/CHANGELOG.md +6 -0
  8. package/Calendar/index.js +1 -1
  9. package/Calendar/index.mjs +1 -1
  10. package/Card/index.js +1 -1
  11. package/Card/index.mjs +1 -1
  12. package/Checkbox/index.js +1 -1
  13. package/Checkbox/index.mjs +1 -1
  14. package/CodeBlock/index.js +13 -13
  15. package/CodeBlock/index.mjs +13 -13
  16. package/CodeSnippet/index.js +1 -1
  17. package/CodeSnippet/index.mjs +1 -1
  18. package/DataGrid/index.js +57 -57
  19. package/DataGrid/index.mjs +58 -58
  20. package/DatePicker/index.js +3 -3
  21. package/DatePicker/index.mjs +5 -5
  22. package/DateRangePicker/index.js +3 -3
  23. package/DateRangePicker/index.mjs +5 -5
  24. package/Drawer/index.js +18 -18
  25. package/Drawer/index.mjs +22 -22
  26. package/DropdownButton/index.js +12 -12
  27. package/DropdownButton/index.mjs +12 -12
  28. package/EmptyStateCard/index.js +8 -8
  29. package/EmptyStateCard/index.mjs +8 -8
  30. package/FocusedProductLayout/index.js +23 -23
  31. package/FocusedProductLayout/index.mjs +23 -23
  32. package/ForgeLayout/index.js +41 -231
  33. package/ForgeLayout/index.mjs +40 -230
  34. package/FormLayout/index.js +5 -5
  35. package/FormLayout/index.mjs +5 -5
  36. package/HorizontalGrid/index.js +1 -1
  37. package/HorizontalGrid/index.mjs +1 -1
  38. package/HorizontalStack/index.js +1 -1
  39. package/HorizontalStack/index.mjs +1 -1
  40. package/Icon/index.js +1 -1
  41. package/Icon/index.mjs +1 -1
  42. package/IconButton/index.js +12 -12
  43. package/IconButton/index.mjs +12 -12
  44. package/InputField/index.js +1 -1
  45. package/InputField/index.mjs +1 -1
  46. package/KebabButton/index.js +1 -1
  47. package/KebabButton/index.mjs +1 -1
  48. package/Menu/MenuOverlay.d.ts.map +1 -1
  49. package/Menu/index.js +1 -1
  50. package/Menu/index.mjs +1 -1
  51. package/Menu/utilities.d.ts +3 -0
  52. package/Menu/utilities.d.ts.map +1 -1
  53. package/Modal/index.js +19 -19
  54. package/Modal/index.mjs +23 -23
  55. package/MultiSelect/MultiSelect.d.ts +123 -0
  56. package/MultiSelect/MultiSelect.d.ts.map +1 -0
  57. package/MultiSelect/MultiSelect.stories.d.ts +11 -0
  58. package/MultiSelect/MultiSelect.stories.d.ts.map +1 -0
  59. package/MultiSelect/MultiSelect.test.d.ts +2 -0
  60. package/MultiSelect/MultiSelect.test.d.ts.map +1 -0
  61. package/MultiSelect/MultiSelectDropdown.d.ts +22 -0
  62. package/MultiSelect/MultiSelectDropdown.d.ts.map +1 -0
  63. package/MultiSelect/index.d.ts +2 -0
  64. package/MultiSelect/index.d.ts.map +1 -0
  65. package/MultiSelect/index.js +1989 -0
  66. package/MultiSelect/index.mjs +1974 -0
  67. package/MultiSelect/utilities.d.ts +3 -0
  68. package/MultiSelect/utilities.d.ts.map +1 -0
  69. package/NexusLayout/index.js +28 -28
  70. package/NexusLayout/index.mjs +28 -28
  71. package/Notification/index.js +1 -1
  72. package/Notification/index.mjs +1 -1
  73. package/Pagination/index.js +7 -7
  74. package/Pagination/index.mjs +7 -7
  75. package/PillGroup/index.js +3 -1681
  76. package/PillGroup/index.mjs +3 -1681
  77. package/ProductLayout/index.js +21 -21
  78. package/ProductLayout/index.mjs +25 -25
  79. package/Provider/index.js +1 -1
  80. package/Provider/index.mjs +1 -1
  81. package/RadioButtonGroup/index.js +3 -3
  82. package/RadioButtonGroup/index.mjs +3 -3
  83. package/RadioGroup/index.js +1 -1
  84. package/RadioGroup/index.mjs +1 -1
  85. package/RangeCalendar/index.js +1 -1
  86. package/RangeCalendar/index.mjs +1 -1
  87. package/SearchNav/index.js +29 -29
  88. package/SearchNav/index.mjs +29 -29
  89. package/SectionCard/index.js +7 -7
  90. package/SectionCard/index.mjs +7 -7
  91. package/Select/index.js +5 -5
  92. package/Select/index.mjs +5 -5
  93. package/SelectorErrorTooltip/index.js +1 -1
  94. package/SelectorErrorTooltip/index.mjs +1 -1
  95. package/Spinner/index.js +1 -1
  96. package/Spinner/index.mjs +1 -1
  97. package/SplitToggleCard/index.js +4 -4
  98. package/SplitToggleCard/index.mjs +4 -4
  99. package/Stepper/index.js +1 -1
  100. package/Stepper/index.mjs +1 -1
  101. package/TabNav/index.js +1 -1
  102. package/TabNav/index.mjs +1 -1
  103. package/TabPanels/index.js +1 -1
  104. package/TabPanels/index.mjs +2 -2
  105. package/Tabs/index.js +1 -1
  106. package/Tabs/index.mjs +1 -1
  107. package/Text/index.js +1 -1
  108. package/Text/index.mjs +1 -1
  109. package/TextField/index.js +1 -1
  110. package/TextField/index.mjs +1 -1
  111. package/Textarea/index.js +1 -1
  112. package/Textarea/index.mjs +1 -1
  113. package/Toggle/index.js +1 -1
  114. package/Toggle/index.mjs +1 -1
  115. package/ToggleCard/index.js +2 -2
  116. package/ToggleCard/index.mjs +2 -2
  117. package/Tooltip/index.js +1 -1
  118. package/Tooltip/index.mjs +1 -1
  119. package/VerticalNav/index.js +24 -24
  120. package/VerticalNav/index.mjs +24 -24
  121. package/VerticalStack/index.js +1 -1
  122. package/VerticalStack/index.mjs +1 -1
  123. package/__chunks__/{Button-CDRssWxC.mjs → Button-BqogJAQ3.mjs} +3 -3
  124. package/__chunks__/{Button-DXhw-VUb.js → Button-CVaEK94Q.js} +18 -18
  125. package/__chunks__/{Button-lb6KY-VK.mjs → Button-CVbi-24J.mjs} +18 -18
  126. package/__chunks__/{Button-BvLvcmfd.js → Button-Y550ybuK.js} +1 -1
  127. package/__chunks__/{Calendar-ChbA9Ste.mjs → Calendar-C2JlXaSY.mjs} +1 -1
  128. package/__chunks__/{Calendar-D-oFF4f4.js → Calendar-CmF_v-Dn.js} +1 -1
  129. package/__chunks__/{CalendarBase-oPvH2YM1.js → CalendarBase-Cavy4k_H.js} +18 -18
  130. package/__chunks__/{CalendarBase-DC8WR7md.mjs → CalendarBase-aeU9JZC2.mjs} +18 -18
  131. package/__chunks__/{Card-CWv2re8Z.mjs → Card-B5c1vM8E.mjs} +12 -12
  132. package/__chunks__/{Card-CRFM7MOD.js → Card-BHZOcCVB.js} +12 -12
  133. package/__chunks__/{Checkbox-B7eahvPN.js → Checkbox-BmtLwm3J.js} +19 -19
  134. package/__chunks__/{Checkbox-XDmnzjIx.mjs → Checkbox-IhSMESiF.mjs} +20 -20
  135. package/__chunks__/{CodeSnippet-CnjYkoJo.mjs → CodeSnippet-DA3SuGi9.mjs} +2 -2
  136. package/__chunks__/{CodeSnippet-FCgb2RfQ.js → CodeSnippet-HAojQDBb.js} +2 -2
  137. package/__chunks__/{DatePickerBase-B9g5PeHi.mjs → DatePickerBase-DYuliQ2j.mjs} +20 -64
  138. package/__chunks__/{DatePickerBase-DMmeUEou.js → DatePickerBase-PqJZhPW5.js} +18 -62
  139. package/__chunks__/Dialog-CFyC5TFs.js +232 -0
  140. package/__chunks__/Dialog-DnCSZh3s.mjs +233 -0
  141. package/__chunks__/{HelpMenu-BjEMVfGE.js → HelpMenu-DttT1pkc.js} +6 -6
  142. package/__chunks__/{HelpMenu-DWvUM5hz.mjs → HelpMenu-dPaIsmEG.mjs} +6 -6
  143. package/__chunks__/{HorizontalGrid-BZX-WluO.js → HorizontalGrid-BFqXCljf.js} +1 -1
  144. package/__chunks__/{HorizontalGrid-DGrPEAhQ.mjs → HorizontalGrid-CyBrrh6k.mjs} +1 -1
  145. package/__chunks__/{HorizontalStack-VtCu2VMx.js → HorizontalStack-BG-lZii5.js} +1 -1
  146. package/__chunks__/{HorizontalStack--Qc3cVBd.mjs → HorizontalStack-p9m9muAJ.mjs} +1 -1
  147. package/__chunks__/{Icon-BDa4XL_V.js → Icon-BHbBKuGB.js} +2 -2
  148. package/__chunks__/{Icon-BD88DLNr.mjs → Icon-ZRjQkfey.mjs} +2 -2
  149. package/__chunks__/{InputCaption-DKZRO84o.js → InputCaption-BQw7pLl1.js} +2 -2
  150. package/__chunks__/{InputCaption-DYFfypKt.mjs → InputCaption-DE7SnGJr.mjs} +2 -2
  151. package/__chunks__/{InputField-Bv1SfmUB.mjs → InputField-1toY1X94.mjs} +6 -89
  152. package/__chunks__/{InputField-C7Ti5JNz.js → InputField-e2dBsTrQ.js} +6 -89
  153. package/__chunks__/{InputIcon-VzRxuUky.mjs → InputIcon-CKwsgYvg.mjs} +31 -31
  154. package/__chunks__/{InputIcon-c-x0Whak.js → InputIcon-DM19rdNu.js} +31 -31
  155. package/__chunks__/{KebabButton-CdlmuIRm.js → KebabButton-3APOVOtc.js} +4 -4
  156. package/__chunks__/{KebabButton-TgeYkgj5.mjs → KebabButton-CGvwEB3q.mjs} +4 -4
  157. package/__chunks__/{Menu-C1Q0RfOp.js → Menu-90Db_wYM.js} +22 -62
  158. package/__chunks__/{Menu-BL0okgwD.mjs → Menu-D7JiGJt4.mjs} +22 -62
  159. package/__chunks__/{Notification-CZS59-s8.mjs → Notification-C4gEE6IM.mjs} +14 -14
  160. package/__chunks__/{Notification-D7fRjiAH.js → Notification-DZ0uDsoT.js} +14 -14
  161. package/__chunks__/{Overlay-DyfvFsGi.mjs → Overlay-BEmOdNIB.mjs} +3 -3
  162. package/__chunks__/PillGroup-BetDOSFz.js +2061 -0
  163. package/__chunks__/PillGroup-Bp5vfk6Z.mjs +2062 -0
  164. package/__chunks__/{RadioGroup-D3RN5LLn.mjs → RadioGroup-DPJOnxCi.mjs} +16 -16
  165. package/__chunks__/{RadioGroup-CYlZvoxh.js → RadioGroup-Qn2c29rT.js} +15 -15
  166. package/__chunks__/{RangeCalendar-D5t6FuZp.mjs → RangeCalendar-BNySCRAa.mjs} +1 -1
  167. package/__chunks__/{RangeCalendar-0Zt6GJAs.js → RangeCalendar-lhIzCnWl.js} +1 -1
  168. package/__chunks__/{SelectOverlay-XRIcujy9.js → SelectOverlay-CoOED545.js} +28 -188
  169. package/__chunks__/{SelectOverlay-DAJ9-Wye.mjs → SelectOverlay-D12QgA_I.mjs} +29 -189
  170. package/__chunks__/{SelectorErrorTooltip-r2APVg60.js → SelectorErrorTooltip-CNinvIcU.js} +4 -4
  171. package/__chunks__/{SelectorErrorTooltip-BSNUFpGD.mjs → SelectorErrorTooltip-Cz7Uw_O_.mjs} +4 -4
  172. package/__chunks__/{Spinner-C6CoASxe.mjs → Spinner-Co64ezt-.mjs} +5 -5
  173. package/__chunks__/{Spinner-D9lZ3erf.js → Spinner-DTH0xdij.js} +5 -5
  174. package/__chunks__/{Stepper-D0YDhoPF.js → Stepper-DqcfNOrn.js} +25 -25
  175. package/__chunks__/{Stepper-BRecUCpd.mjs → Stepper-OFWKfhi3.mjs} +25 -25
  176. package/__chunks__/{TabNav-BzeG4JrK.mjs → TabNav-B44TuB70.mjs} +1 -1
  177. package/__chunks__/{TabNav-ipa33NIM.js → TabNav-DzF57oTN.js} +1 -1
  178. package/__chunks__/{Tabs-CsOlVyHJ.mjs → Tabs-ClOwavjv.mjs} +17 -17
  179. package/__chunks__/{Tabs-CDUhh-Bz.js → Tabs-CsxDAl1X.js} +17 -17
  180. package/__chunks__/{Text-CntV2Frc.js → Text-BwXTDw77.js} +34 -34
  181. package/__chunks__/{Text-BHyjSBcd.mjs → Text-DYLBjpe-.mjs} +34 -34
  182. package/__chunks__/{TextField-Ca_M-pak.mjs → TextField-DVWDMYaM.mjs} +1 -1
  183. package/__chunks__/{TextField-CBWpUHdy.js → TextField-YD_1oSnk.js} +1 -1
  184. package/__chunks__/{Toggle-BxtpUTDA.mjs → Toggle-DiK1wHdG.mjs} +11 -11
  185. package/__chunks__/{Toggle-C6ICkaF-.js → Toggle-gPKUf7QS.js} +11 -11
  186. package/__chunks__/{Tooltip-BK6l0C3n.mjs → Tooltip-BX_C7x_7.mjs} +10 -10
  187. package/__chunks__/{Tooltip-cqSETep4.js → Tooltip-DPZMv6Ia.js} +8 -8
  188. package/__chunks__/{VerticalStack-BVtgNZrG.mjs → VerticalStack-C466n8W1.mjs} +3 -3
  189. package/__chunks__/{VerticalStack-B7auhieq.js → VerticalStack-DIpmkisq.js} +3 -3
  190. package/__chunks__/{useDialog-c-C07qhw.mjs → useDialog-h-MPfyGr.mjs} +1 -1
  191. package/__chunks__/{useEdgeInterceptors-DrJ9MQmY.mjs → useEdgeInterceptors-BORL2txk.mjs} +5 -5
  192. package/__chunks__/{useEdgeInterceptors-Bvg1fK8h.js → useEdgeInterceptors-DU8I_hQ1.js} +5 -5
  193. package/__chunks__/useFilter-D-K0Oj-7.mjs +65 -0
  194. package/__chunks__/useFilter-DpnZ54nd.js +64 -0
  195. package/__chunks__/{useFormValidation-v2O6VL2V.mjs → useFormValidation-B3euLzzR.mjs} +4 -4
  196. package/__chunks__/useListBoxSection-BlFRlBZy.js +192 -0
  197. package/__chunks__/useListBoxSection-BsSdeGKp.mjs +193 -0
  198. package/__chunks__/{useTriggerWidth-CRz8zSDa.mjs → useMenuTrigger-D4pQ727R.mjs} +3 -130
  199. package/__chunks__/{useTriggerWidth-Dj7C0lza.js → useMenuTrigger-qbIPy-fg.js} +0 -127
  200. package/__chunks__/useMenuTriggerState-Cf_X36NC.mjs +67 -0
  201. package/__chunks__/useMenuTriggerState-Dai3rheB.js +66 -0
  202. package/__chunks__/{useModalOverlay-S0R2uVTX.mjs → useModalOverlay-CkOujl0G.mjs} +1 -1
  203. package/__chunks__/{useOverlayPosition-BjK7cu6U.mjs → useOverlayPosition-dua8TTSS.mjs} +1 -1
  204. package/__chunks__/{useOverlayTrigger-DDcXdZOM.mjs → useOverlayTrigger-BS8c6XEz.mjs} +1 -1
  205. package/__chunks__/{useSelectableItem-D61t76J1.mjs → useSelectableItem-B8l2VAQ8.mjs} +2 -2
  206. package/__chunks__/{useSelectableList-UkBCcTuC.js → useSelectableList-CzTJAukw.js} +15 -0
  207. package/__chunks__/{useSelectableList-BdG5I7cy.mjs → useSelectableList-DsUuWr0P.mjs} +18 -3
  208. package/__chunks__/useTextField-CErFc3WZ.js +106 -0
  209. package/__chunks__/useTextField-Dd-YTxI4.mjs +107 -0
  210. package/__chunks__/useTriggerWidth-B-IM2wNY.js +132 -0
  211. package/__chunks__/useTriggerWidth-CAYuGPNq.mjs +133 -0
  212. package/__chunks__/{utilities-CaBPUKEB.js → utilities-BDABIMDb.js} +4 -0
  213. package/__chunks__/{utilities-DASknbaa.mjs → utilities-DpKIaDkW.mjs} +5 -1
  214. package/__chunks__/{utils-D4ddhsBL.mjs → utils-Dt6xdGol.mjs} +10 -2
  215. package/__chunks__/{utils-DIF5XAA2.js → utils-eHk7b-OB.js} +8 -0
  216. package/package.json +1 -1
  217. package/style.css +1609 -1445
  218. package/utilities/storybook.d.ts +1 -0
  219. package/utilities/storybook.d.ts.map +1 -1
@@ -0,0 +1,1974 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+ var __async = (__this, __arguments, generator) => {
33
+ return new Promise((resolve, reject) => {
34
+ var fulfilled = (value) => {
35
+ try {
36
+ step(generator.next(value));
37
+ } catch (e) {
38
+ reject(e);
39
+ }
40
+ };
41
+ var rejected = (value) => {
42
+ try {
43
+ step(generator.throw(value));
44
+ } catch (e) {
45
+ reject(e);
46
+ }
47
+ };
48
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
49
+ step((generator = generator.apply(__this, __arguments)).next());
50
+ });
51
+ };
52
+ import * as React from "react";
53
+ import React__default, { useState, useMemo, useRef, useCallback, useEffect, useReducer, createContext, forwardRef } from "react";
54
+ import { c as $f39a9eba43920ace$export$86427a43e3e48ebb, a as $d2b4bc8c273e7be6$export$24d547caef80ccd1, b as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../__chunks__/Button-BqogJAQ3.mjs";
55
+ import { $ as $64fa3d84918910a7$export$29f1550f4b0d4415, a as $64fa3d84918910a7$export$4d86445c2cf5e3, f as $64fa3d84918910a7$export$fabf2dc03a41866e, g as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, h as $64fa3d84918910a7$export$ef03459518577ad4, d as $64fa3d84918910a7$export$2881499e37b75b9a } from "../__chunks__/utils-Dt6xdGol.mjs";
56
+ import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../__chunks__/useHover-BOYR4wqI.mjs";
57
+ import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../__chunks__/useFocusRing-YOWeCHgO.mjs";
58
+ import { f as $ff5963eb1fccf552$export$e08e3b67e392101e, $ as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "../__chunks__/mergeProps-DSi85raC.mjs";
59
+ import { $ as $0d86e9c8f07f9a7b$export$79c0c687a5963b0a, a as $eed445e0843c11d0$export$7ff8f37d2d81a48d, b as $e1995378a142960e$export$bf788dd355e3a401, c as $01b77f81d0f07f68$export$75b6ee27786ba447, d as $eed445e0843c11d0$export$7c5906fe4f1f2af2, e as $514c0188e459b4c0$export$9afb8bc826b033ea, f as $eed445e0843c11d0$export$41f133550aa26f48, g as $eed445e0843c11d0$export$a11e76429ed99b4, P as PillGroup } from "../__chunks__/PillGroup-Bp5vfk6Z.mjs";
60
+ import { h } from "../__chunks__/PillGroup-Bp5vfk6Z.mjs";
61
+ import { c as $de32f1b87079253c$export$d2f961adcb0afbe, d as $07b14b47974efb58$export$9b9a0cd73afb7ca4, a as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../__chunks__/Dialog-DnCSZh3s.mjs";
62
+ import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../__chunks__/filterDOMProps-EDDcM64A.mjs";
63
+ import { $ as $9daab02d461809db$export$683480f191c0e3ea } from "../__chunks__/useResizeObserver-Dyb4wvuA.mjs";
64
+ import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../__chunks__/useFilter-D-K0Oj-7.mjs";
65
+ import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, c as $e5be200c675c3b3a$export$a763b9476acd3eb } from "../__chunks__/useFormValidation-B3euLzzR.mjs";
66
+ import { c as $c5a24bc478652b5f$export$1005530eda016c13 } from "../__chunks__/SelectionManager-DCO_d3m1.mjs";
67
+ import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "../__chunks__/useSingleSelectListState-DuCUY6dR.mjs";
68
+ import { a as $a02d57049d202695$export$d085fb9e920b5ca7 } from "../__chunks__/useListState-AFrlkW73.mjs";
69
+ import { $ as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../__chunks__/useControlledState-CFWhSD5C.mjs";
70
+ import { a as $fc909762b330b746$export$61c6a8c84e605fb6 } from "../__chunks__/Overlay-BEmOdNIB.mjs";
71
+ import { $ as $319e236875307eab$export$a9b970dcc4ae71a9 } from "../__chunks__/LiveAnnouncer-BSV5-C0m.mjs";
72
+ import { b as $5e3802645cc19319$export$1c3ebcada18427bf } from "../__chunks__/ariaHideOutside-CxWZQtI1.mjs";
73
+ import { c as $b1f0cad8af73213b$export$3585ede4d035bf14, d as $b1f0cad8af73213b$export$9145995848b05025 } from "../__chunks__/useListBoxSection-BsSdeGKp.mjs";
74
+ import { a as $ea8dcbcb9ea1b556$export$9a302a45f65d0572 } from "../__chunks__/usePress-Db4pSZfY.mjs";
75
+ import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../__chunks__/useLabels-5f58TiCH.mjs";
76
+ import { f as $c87311424ea30a05$export$e1865c3bedcd822b } from "../__chunks__/isVirtualEvent-BPCuFO54.mjs";
77
+ import { b as $2a25aae57d74318e$export$a05409b8bb224a5a, a as $453cc9f0df89c0a5$export$77d5aafae4e095b2 } from "../__chunks__/useSelectableList-DsUuWr0P.mjs";
78
+ import { a as $ae20dd8cbca75726$export$d6daf82dcd84e87c } from "../__chunks__/useSelectableItem-B8l2VAQ8.mjs";
79
+ import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "../__chunks__/useLocalizedStringFormatter-BHXy3Wtu.mjs";
80
+ import { $ as $168583247155ddda$export$dc9c12ed27dd1b49 } from "../__chunks__/useMenuTrigger-D4pQ727R.mjs";
81
+ import { $ as $2d73ec29415bd339$export$712718f7aec83d5 } from "../__chunks__/useTextField-Dd-YTxI4.mjs";
82
+ import { I as Icon } from "../__chunks__/Icon-ZRjQkfey.mjs";
83
+ import { I as ITEM_HEIGHT, Y as Y_PADDING_INSIDE_OVERLAY, h as getMenuPopoverMaxHeight, b as DEFAULT_MAX_ITEMS_UNTIL_SCROLL } from "../__chunks__/utilities-DpKIaDkW.mjs";
84
+ import { S as Spinner } from "../__chunks__/Spinner-Co64ezt-.mjs";
85
+ import { T as Text } from "../__chunks__/Text-DYLBjpe-.mjs";
86
+ import { getComponentToken, pxToRem } from "../utilities/css.mjs";
87
+ import { useScrollbar } from "../utilities/useScrollbar.mjs";
88
+ import { a as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../__chunks__/VisuallyHidden-BC5PXI9q.mjs";
89
+ function $a9e7382a7d111cb5$export$b453a3bfd4a5fa9e(props) {
90
+ var _collection_getItem;
91
+ let { defaultFilter, menuTrigger = "input", allowsEmptyCollection = false, allowsCustomValue, shouldCloseOnBlur = true } = props;
92
+ let [showAllItems, setShowAllItems] = useState(false);
93
+ let [isFocused, setFocusedState] = useState(false);
94
+ let [focusStrategy, setFocusStrategy] = useState(null);
95
+ let onSelectionChange = (key) => {
96
+ if (props.onSelectionChange) props.onSelectionChange(key);
97
+ if (key === selectedKey) {
98
+ resetInputValue();
99
+ closeMenu();
100
+ }
101
+ };
102
+ var _props_items;
103
+ let { collection, selectionManager, selectedKey, setSelectedKey, selectedItem, disabledKeys } = $a0d645289fe9b86b$export$e7f05e985daf4b5f(__spreadProps(__spreadValues({}, props), {
104
+ onSelectionChange,
105
+ items: (_props_items = props.items) !== null && _props_items !== void 0 ? _props_items : props.defaultItems
106
+ }));
107
+ let defaultInputValue = props.defaultInputValue;
108
+ if (defaultInputValue == null) {
109
+ var _collection_getItem1;
110
+ var _collection_getItem_textValue;
111
+ if (selectedKey == null) defaultInputValue = "";
112
+ else defaultInputValue = (_collection_getItem_textValue = (_collection_getItem1 = collection.getItem(selectedKey)) === null || _collection_getItem1 === void 0 ? void 0 : _collection_getItem1.textValue) !== null && _collection_getItem_textValue !== void 0 ? _collection_getItem_textValue : "";
113
+ }
114
+ let [inputValue, setInputValue] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.inputValue, defaultInputValue, props.onInputChange);
115
+ let originalCollection = collection;
116
+ let filteredCollection = useMemo(() => (
117
+ // No default filter if items are controlled.
118
+ props.items != null || !defaultFilter ? collection : $a9e7382a7d111cb5$var$filterCollection(collection, inputValue, defaultFilter)
119
+ ), [
120
+ collection,
121
+ inputValue,
122
+ defaultFilter,
123
+ props.items
124
+ ]);
125
+ let [lastCollection, setLastCollection] = useState(filteredCollection);
126
+ let menuOpenTrigger = useRef("focus");
127
+ let onOpenChange = (open2) => {
128
+ if (props.onOpenChange) props.onOpenChange(open2, open2 ? menuOpenTrigger.current : void 0);
129
+ selectionManager.setFocused(open2);
130
+ if (!open2) selectionManager.setFocusedKey(null);
131
+ };
132
+ let triggerState = $fc909762b330b746$export$61c6a8c84e605fb6(__spreadProps(__spreadValues({}, props), {
133
+ onOpenChange,
134
+ isOpen: void 0,
135
+ defaultOpen: void 0
136
+ }));
137
+ let open = (focusStrategy2 = null, trigger) => {
138
+ let displayAllItems = trigger === "manual" || trigger === "focus" && menuTrigger === "focus";
139
+ if (allowsEmptyCollection || filteredCollection.size > 0 || displayAllItems && originalCollection.size > 0 || props.items) {
140
+ if (displayAllItems && !triggerState.isOpen && props.items === void 0)
141
+ setShowAllItems(true);
142
+ menuOpenTrigger.current = trigger;
143
+ setFocusStrategy(focusStrategy2);
144
+ triggerState.open();
145
+ }
146
+ };
147
+ let toggle = (focusStrategy2 = null, trigger) => {
148
+ let displayAllItems = trigger === "manual" || trigger === "focus" && menuTrigger === "focus";
149
+ if (!(allowsEmptyCollection || filteredCollection.size > 0 || displayAllItems && originalCollection.size > 0 || props.items) && !triggerState.isOpen) return;
150
+ if (displayAllItems && !triggerState.isOpen && props.items === void 0)
151
+ setShowAllItems(true);
152
+ if (!triggerState.isOpen) menuOpenTrigger.current = trigger;
153
+ toggleMenu(focusStrategy2);
154
+ };
155
+ let updateLastCollection = useCallback(() => {
156
+ setLastCollection(showAllItems ? originalCollection : filteredCollection);
157
+ }, [
158
+ showAllItems,
159
+ originalCollection,
160
+ filteredCollection
161
+ ]);
162
+ let toggleMenu = useCallback((focusStrategy2 = null) => {
163
+ if (triggerState.isOpen) updateLastCollection();
164
+ setFocusStrategy(focusStrategy2);
165
+ triggerState.toggle();
166
+ }, [
167
+ triggerState,
168
+ updateLastCollection
169
+ ]);
170
+ let closeMenu = useCallback(() => {
171
+ if (triggerState.isOpen) {
172
+ updateLastCollection();
173
+ triggerState.close();
174
+ }
175
+ }, [
176
+ triggerState,
177
+ updateLastCollection
178
+ ]);
179
+ let [lastValue, setLastValue] = useState(inputValue);
180
+ let resetInputValue = () => {
181
+ var _collection_getItem2;
182
+ var _collection_getItem_textValue2;
183
+ let itemText = selectedKey != null ? (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "" : "";
184
+ setLastValue(itemText);
185
+ setInputValue(itemText);
186
+ };
187
+ var _props_selectedKey, _ref;
188
+ let lastSelectedKey = useRef((_ref = (_props_selectedKey = props.selectedKey) !== null && _props_selectedKey !== void 0 ? _props_selectedKey : props.defaultSelectedKey) !== null && _ref !== void 0 ? _ref : null);
189
+ var _collection_getItem_textValue1;
190
+ let lastSelectedKeyText = useRef(selectedKey != null ? (_collection_getItem_textValue1 = (_collection_getItem = collection.getItem(selectedKey)) === null || _collection_getItem === void 0 ? void 0 : _collection_getItem.textValue) !== null && _collection_getItem_textValue1 !== void 0 ? _collection_getItem_textValue1 : "" : "");
191
+ useEffect(() => {
192
+ var _collection_getItem2;
193
+ if (isFocused && (filteredCollection.size > 0 || allowsEmptyCollection) && !triggerState.isOpen && inputValue !== lastValue && menuTrigger !== "manual") open(null, "input");
194
+ if (!showAllItems && !allowsEmptyCollection && triggerState.isOpen && filteredCollection.size === 0) closeMenu();
195
+ if (selectedKey != null && selectedKey !== lastSelectedKey.current) closeMenu();
196
+ if (inputValue !== lastValue) {
197
+ selectionManager.setFocusedKey(null);
198
+ setShowAllItems(false);
199
+ if (inputValue === "" && (props.inputValue === void 0 || props.selectedKey === void 0)) setSelectedKey(null);
200
+ }
201
+ if (selectedKey !== lastSelectedKey.current && (props.inputValue === void 0 || props.selectedKey === void 0)) resetInputValue();
202
+ else if (lastValue !== inputValue) setLastValue(inputValue);
203
+ var _collection_getItem_textValue2;
204
+ let selectedItemText = selectedKey != null ? (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "" : "";
205
+ if (!isFocused && selectedKey != null && props.inputValue === void 0 && selectedKey === lastSelectedKey.current) {
206
+ if (lastSelectedKeyText.current !== selectedItemText) {
207
+ setLastValue(selectedItemText);
208
+ setInputValue(selectedItemText);
209
+ }
210
+ }
211
+ lastSelectedKey.current = selectedKey;
212
+ lastSelectedKeyText.current = selectedItemText;
213
+ });
214
+ let validation = $e5be200c675c3b3a$export$fc1a364ae1f3ff10(__spreadProps(__spreadValues({}, props), {
215
+ value: useMemo(() => ({
216
+ inputValue,
217
+ selectedKey
218
+ }), [
219
+ inputValue,
220
+ selectedKey
221
+ ])
222
+ }));
223
+ let revert = () => {
224
+ if (allowsCustomValue && selectedKey == null) commitCustomValue();
225
+ else commitSelection();
226
+ };
227
+ let commitCustomValue = () => {
228
+ lastSelectedKey.current = null;
229
+ setSelectedKey(null);
230
+ closeMenu();
231
+ };
232
+ let commitSelection = () => {
233
+ if (props.selectedKey !== void 0 && props.inputValue !== void 0) {
234
+ var _props_onSelectionChange, _collection_getItem2;
235
+ (_props_onSelectionChange = props.onSelectionChange) === null || _props_onSelectionChange === void 0 ? void 0 : _props_onSelectionChange.call(props, selectedKey);
236
+ var _collection_getItem_textValue2;
237
+ let itemText = selectedKey != null ? (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "" : "";
238
+ setLastValue(itemText);
239
+ closeMenu();
240
+ } else {
241
+ resetInputValue();
242
+ closeMenu();
243
+ }
244
+ };
245
+ const commitValue = () => {
246
+ if (allowsCustomValue) {
247
+ var _collection_getItem2;
248
+ var _collection_getItem_textValue2;
249
+ const itemText = selectedKey != null ? (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "" : "";
250
+ inputValue === itemText ? commitSelection() : commitCustomValue();
251
+ } else
252
+ commitSelection();
253
+ };
254
+ let commit = () => {
255
+ if (triggerState.isOpen && selectionManager.focusedKey != null) {
256
+ if (selectedKey === selectionManager.focusedKey) commitSelection();
257
+ else setSelectedKey(selectionManager.focusedKey);
258
+ } else commitValue();
259
+ };
260
+ let valueOnFocus = useRef(inputValue);
261
+ let setFocused = (isFocused2) => {
262
+ if (isFocused2) {
263
+ valueOnFocus.current = inputValue;
264
+ if (menuTrigger === "focus" && !props.isReadOnly) open(null, "focus");
265
+ } else {
266
+ if (shouldCloseOnBlur) commitValue();
267
+ if (inputValue !== valueOnFocus.current) validation.commitValidation();
268
+ }
269
+ setFocusedState(isFocused2);
270
+ };
271
+ let displayedCollection = useMemo(() => {
272
+ if (triggerState.isOpen) {
273
+ if (showAllItems) return originalCollection;
274
+ else return filteredCollection;
275
+ } else return lastCollection;
276
+ }, [
277
+ triggerState.isOpen,
278
+ originalCollection,
279
+ filteredCollection,
280
+ showAllItems,
281
+ lastCollection
282
+ ]);
283
+ return __spreadProps(__spreadValues(__spreadValues({}, validation), triggerState), {
284
+ focusStrategy,
285
+ toggle,
286
+ open,
287
+ close: commitValue,
288
+ selectionManager,
289
+ selectedKey,
290
+ setSelectedKey,
291
+ disabledKeys,
292
+ isFocused,
293
+ setFocused,
294
+ selectedItem,
295
+ collection: displayedCollection,
296
+ inputValue,
297
+ setInputValue,
298
+ commit,
299
+ revert
300
+ });
301
+ }
302
+ function $a9e7382a7d111cb5$var$filterCollection(collection, inputValue, filter) {
303
+ return new $a02d57049d202695$export$d085fb9e920b5ca7($a9e7382a7d111cb5$var$filterNodes(collection, collection, inputValue, filter));
304
+ }
305
+ function $a9e7382a7d111cb5$var$filterNodes(collection, nodes, inputValue, filter) {
306
+ let filteredNode = [];
307
+ for (let node of nodes) {
308
+ if (node.type === "section" && node.hasChildNodes) {
309
+ let filtered = $a9e7382a7d111cb5$var$filterNodes(collection, $c5a24bc478652b5f$export$1005530eda016c13(node, collection), inputValue, filter);
310
+ if ([
311
+ ...filtered
312
+ ].some((node2) => node2.type === "item")) filteredNode.push(__spreadProps(__spreadValues({}, node), {
313
+ childNodes: filtered
314
+ }));
315
+ } else if (node.type === "item" && filter(node.textValue, inputValue)) filteredNode.push(__spreadValues({}, node));
316
+ else if (node.type !== "item") filteredNode.push(__spreadValues({}, node));
317
+ }
318
+ return filteredNode;
319
+ }
320
+ function $f86e6c1ec7da6ebb$var$reducer(data, action) {
321
+ let selectedKeys;
322
+ switch (data.state) {
323
+ case "idle":
324
+ case "error":
325
+ switch (action.type) {
326
+ case "loading":
327
+ case "loadingMore":
328
+ case "sorting":
329
+ case "filtering":
330
+ var _action_filterText, _action_sortDescriptor;
331
+ return __spreadProps(__spreadValues({}, data), {
332
+ filterText: (_action_filterText = action.filterText) !== null && _action_filterText !== void 0 ? _action_filterText : data.filterText,
333
+ state: action.type,
334
+ // Reset items to an empty list if loading, but not when sorting.
335
+ items: action.type === "loading" ? [] : data.items,
336
+ sortDescriptor: (_action_sortDescriptor = action.sortDescriptor) !== null && _action_sortDescriptor !== void 0 ? _action_sortDescriptor : data.sortDescriptor,
337
+ abortController: action.abortController
338
+ });
339
+ case "update":
340
+ var _action_updater;
341
+ return __spreadValues(__spreadValues({}, data), (_action_updater = action.updater) === null || _action_updater === void 0 ? void 0 : _action_updater.call(action, data));
342
+ case "success":
343
+ case "error":
344
+ return data;
345
+ default:
346
+ throw new Error(`Invalid action "${action.type}" in state "${data.state}"`);
347
+ }
348
+ case "loading":
349
+ case "sorting":
350
+ case "filtering":
351
+ switch (action.type) {
352
+ case "success":
353
+ if (action.abortController !== data.abortController) return data;
354
+ var _action_selectedKeys;
355
+ selectedKeys = (_action_selectedKeys = action.selectedKeys) !== null && _action_selectedKeys !== void 0 ? _action_selectedKeys : data.selectedKeys;
356
+ var _action_filterText1, _action_items, _action_sortDescriptor1;
357
+ return __spreadProps(__spreadValues({}, data), {
358
+ filterText: (_action_filterText1 = action.filterText) !== null && _action_filterText1 !== void 0 ? _action_filterText1 : data.filterText,
359
+ state: "idle",
360
+ items: [
361
+ ...(_action_items = action.items) !== null && _action_items !== void 0 ? _action_items : []
362
+ ],
363
+ selectedKeys: selectedKeys === "all" ? "all" : new Set(selectedKeys),
364
+ sortDescriptor: (_action_sortDescriptor1 = action.sortDescriptor) !== null && _action_sortDescriptor1 !== void 0 ? _action_sortDescriptor1 : data.sortDescriptor,
365
+ abortController: void 0,
366
+ cursor: action.cursor
367
+ });
368
+ case "error":
369
+ if (action.abortController !== data.abortController) return data;
370
+ return __spreadProps(__spreadValues({}, data), {
371
+ state: "error",
372
+ error: action.error,
373
+ abortController: void 0
374
+ });
375
+ case "loading":
376
+ case "loadingMore":
377
+ case "sorting":
378
+ case "filtering":
379
+ var _data_abortController;
380
+ (_data_abortController = data.abortController) === null || _data_abortController === void 0 ? void 0 : _data_abortController.abort();
381
+ var _action_filterText2;
382
+ return __spreadProps(__spreadValues({}, data), {
383
+ filterText: (_action_filterText2 = action.filterText) !== null && _action_filterText2 !== void 0 ? _action_filterText2 : data.filterText,
384
+ state: action.type,
385
+ // Reset items to an empty list if loading, but not when sorting.
386
+ items: action.type === "loading" ? [] : data.items,
387
+ abortController: action.abortController
388
+ });
389
+ case "update":
390
+ var _action_updater1;
391
+ return __spreadValues(__spreadValues({}, data), (_action_updater1 = action.updater) === null || _action_updater1 === void 0 ? void 0 : _action_updater1.call(action, data));
392
+ default:
393
+ throw new Error(`Invalid action "${action.type}" in state "${data.state}"`);
394
+ }
395
+ case "loadingMore":
396
+ switch (action.type) {
397
+ case "success":
398
+ var _action_selectedKeys1;
399
+ selectedKeys = data.selectedKeys === "all" || action.selectedKeys === "all" ? "all" : /* @__PURE__ */ new Set([
400
+ ...data.selectedKeys,
401
+ ...(_action_selectedKeys1 = action.selectedKeys) !== null && _action_selectedKeys1 !== void 0 ? _action_selectedKeys1 : []
402
+ ]);
403
+ var _action_items1, _action_sortDescriptor2;
404
+ return __spreadProps(__spreadValues({}, data), {
405
+ state: "idle",
406
+ items: [
407
+ ...data.items,
408
+ ...(_action_items1 = action.items) !== null && _action_items1 !== void 0 ? _action_items1 : []
409
+ ],
410
+ selectedKeys,
411
+ sortDescriptor: (_action_sortDescriptor2 = action.sortDescriptor) !== null && _action_sortDescriptor2 !== void 0 ? _action_sortDescriptor2 : data.sortDescriptor,
412
+ abortController: void 0,
413
+ cursor: action.cursor
414
+ });
415
+ case "error":
416
+ if (action.abortController !== data.abortController) return data;
417
+ return __spreadProps(__spreadValues({}, data), {
418
+ state: "error",
419
+ error: action.error
420
+ });
421
+ case "loading":
422
+ case "sorting":
423
+ case "filtering":
424
+ var _data_abortController1;
425
+ (_data_abortController1 = data.abortController) === null || _data_abortController1 === void 0 ? void 0 : _data_abortController1.abort();
426
+ var _action_filterText3;
427
+ return __spreadProps(__spreadValues({}, data), {
428
+ filterText: (_action_filterText3 = action.filterText) !== null && _action_filterText3 !== void 0 ? _action_filterText3 : data.filterText,
429
+ state: action.type,
430
+ // Reset items to an empty list if loading, but not when sorting.
431
+ items: action.type === "loading" ? [] : data.items,
432
+ abortController: action.abortController
433
+ });
434
+ case "loadingMore":
435
+ var _action_abortController;
436
+ (_action_abortController = action.abortController) === null || _action_abortController === void 0 ? void 0 : _action_abortController.abort();
437
+ return data;
438
+ case "update":
439
+ var _action_updater2;
440
+ return __spreadValues(__spreadValues({}, data), (_action_updater2 = action.updater) === null || _action_updater2 === void 0 ? void 0 : _action_updater2.call(action, data));
441
+ default:
442
+ throw new Error(`Invalid action "${action.type}" in state "${data.state}"`);
443
+ }
444
+ default:
445
+ throw new Error(`Invalid state "${data.state}"`);
446
+ }
447
+ }
448
+ function $f86e6c1ec7da6ebb$export$bc3384a35de93d66(options) {
449
+ const { load, sort, initialSelectedKeys, initialSortDescriptor, getKey = (item) => item.id || item.key, initialFilterText = "" } = options;
450
+ let [data, dispatch] = useReducer($f86e6c1ec7da6ebb$var$reducer, {
451
+ state: "idle",
452
+ error: void 0,
453
+ items: [],
454
+ selectedKeys: initialSelectedKeys === "all" ? "all" : new Set(initialSelectedKeys),
455
+ sortDescriptor: initialSortDescriptor,
456
+ filterText: initialFilterText
457
+ });
458
+ const dispatchFetch = (action, fn) => __async(this, null, function* () {
459
+ let abortController = new AbortController();
460
+ try {
461
+ dispatch(__spreadProps(__spreadValues({}, action), {
462
+ abortController
463
+ }));
464
+ var _action_filterText;
465
+ let previousFilterText = (_action_filterText = action.filterText) !== null && _action_filterText !== void 0 ? _action_filterText : data.filterText;
466
+ var _action_sortDescriptor;
467
+ let response = yield fn({
468
+ items: data.items.slice(),
469
+ selectedKeys: data.selectedKeys,
470
+ sortDescriptor: (_action_sortDescriptor = action.sortDescriptor) !== null && _action_sortDescriptor !== void 0 ? _action_sortDescriptor : data.sortDescriptor,
471
+ signal: abortController.signal,
472
+ cursor: action.type === "loadingMore" ? data.cursor : void 0,
473
+ filterText: previousFilterText
474
+ });
475
+ var _response_filterText;
476
+ let filterText = (_response_filterText = response.filterText) !== null && _response_filterText !== void 0 ? _response_filterText : previousFilterText;
477
+ dispatch(__spreadProps(__spreadValues({
478
+ type: "success"
479
+ }, response), {
480
+ abortController
481
+ }));
482
+ if (filterText && filterText !== previousFilterText && !abortController.signal.aborted) dispatchFetch({
483
+ type: "filtering",
484
+ filterText
485
+ }, load);
486
+ } catch (e) {
487
+ dispatch({
488
+ type: "error",
489
+ error: e,
490
+ abortController
491
+ });
492
+ }
493
+ });
494
+ let didDispatchInitialFetch = useRef(false);
495
+ useEffect(() => {
496
+ if (!didDispatchInitialFetch.current) {
497
+ dispatchFetch({
498
+ type: "loading"
499
+ }, load);
500
+ didDispatchInitialFetch.current = true;
501
+ }
502
+ }, []);
503
+ return __spreadProps(__spreadValues({
504
+ items: data.items,
505
+ selectedKeys: data.selectedKeys,
506
+ sortDescriptor: data.sortDescriptor,
507
+ isLoading: data.state === "loading" || data.state === "loadingMore" || data.state === "sorting" || data.state === "filtering",
508
+ loadingState: data.state,
509
+ error: data.error,
510
+ filterText: data.filterText,
511
+ getItem(key) {
512
+ return data.items.find((item) => getKey(item) === key);
513
+ },
514
+ reload() {
515
+ dispatchFetch({
516
+ type: "loading"
517
+ }, load);
518
+ },
519
+ loadMore() {
520
+ if (data.state === "loadingMore" || data.state === "filtering" || data.cursor == null) return;
521
+ dispatchFetch({
522
+ type: "loadingMore"
523
+ }, load);
524
+ },
525
+ sort(sortDescriptor) {
526
+ dispatchFetch({
527
+ type: "sorting",
528
+ sortDescriptor
529
+ }, sort || load);
530
+ }
531
+ }, $0d86e9c8f07f9a7b$export$79c0c687a5963b0a(__spreadProps(__spreadValues({}, options), {
532
+ getKey,
533
+ cursor: data.cursor
534
+ }), (fn) => {
535
+ dispatch({
536
+ type: "update",
537
+ updater: fn
538
+ });
539
+ })), {
540
+ setFilterText(filterText) {
541
+ dispatchFetch({
542
+ type: "filtering",
543
+ filterText
544
+ }, load);
545
+ }
546
+ });
547
+ }
548
+ var $02cb4c75c506befe$exports = {};
549
+ $02cb4c75c506befe$exports = {
550
+ "buttonLabel": `عرض المقترحات`,
551
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
552
+ one: () => `${formatter.number(args.optionCount)} خيار`,
553
+ other: () => `${formatter.number(args.optionCount)} خيارات`
554
+ })} متاحة.`,
555
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
556
+ true: () => `المجموعة المدخلة ${args.groupTitle}, مع ${formatter.plural(args.groupCount, {
557
+ one: () => `${formatter.number(args.groupCount)} خيار`,
558
+ other: () => `${formatter.number(args.groupCount)} خيارات`
559
+ })}. `,
560
+ other: ``
561
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
562
+ true: `, محدد`,
563
+ other: ``
564
+ }, args.isSelected)}`,
565
+ "listboxLabel": `مقترحات`,
566
+ "selectedAnnouncement": (args) => `${args.optionText}، محدد`
567
+ };
568
+ var $568b8163f1e56faf$exports = {};
569
+ $568b8163f1e56faf$exports = {
570
+ "buttonLabel": `Покажи предложения`,
571
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
572
+ one: () => `${formatter.number(args.optionCount)} опция`,
573
+ other: () => `${formatter.number(args.optionCount)} опции`
574
+ })} на разположение.`,
575
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
576
+ true: () => `Въведена група ${args.groupTitle}, с ${formatter.plural(args.groupCount, {
577
+ one: () => `${formatter.number(args.groupCount)} опция`,
578
+ other: () => `${formatter.number(args.groupCount)} опции`
579
+ })}. `,
580
+ other: ``
581
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
582
+ true: `, избрани`,
583
+ other: ``
584
+ }, args.isSelected)}`,
585
+ "listboxLabel": `Предложения`,
586
+ "selectedAnnouncement": (args) => `${args.optionText}, избрани`
587
+ };
588
+ var $87581c0202d106b8$exports = {};
589
+ $87581c0202d106b8$exports = {
590
+ "buttonLabel": `Zobrazit doporučení`,
591
+ "countAnnouncement": (args, formatter) => `K dispozici ${formatter.plural(args.optionCount, {
592
+ one: () => `je ${formatter.number(args.optionCount)} možnost`,
593
+ other: () => `jsou/je ${formatter.number(args.optionCount)} možnosti/-í`
594
+ })}.`,
595
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
596
+ true: () => `Zadaná skupina „${args.groupTitle}“ ${formatter.plural(args.groupCount, {
597
+ one: () => `s ${formatter.number(args.groupCount)} možností`,
598
+ other: () => `se ${formatter.number(args.groupCount)} možnostmi`
599
+ })}. `,
600
+ other: ``
601
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
602
+ true: ` (vybráno)`,
603
+ other: ``
604
+ }, args.isSelected)}`,
605
+ "listboxLabel": `Návrhy`,
606
+ "selectedAnnouncement": (args) => `${args.optionText}, vybráno`
607
+ };
608
+ var $a10a0369f5433ed1$exports = {};
609
+ $a10a0369f5433ed1$exports = {
610
+ "buttonLabel": `Vis forslag`,
611
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
612
+ one: () => `${formatter.number(args.optionCount)} mulighed tilgængelig`,
613
+ other: () => `${formatter.number(args.optionCount)} muligheder tilgængelige`
614
+ })}.`,
615
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
616
+ true: () => `Angivet gruppe ${args.groupTitle}, med ${formatter.plural(args.groupCount, {
617
+ one: () => `${formatter.number(args.groupCount)} mulighed`,
618
+ other: () => `${formatter.number(args.groupCount)} muligheder`
619
+ })}. `,
620
+ other: ``
621
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
622
+ true: `, valgt`,
623
+ other: ``
624
+ }, args.isSelected)}`,
625
+ "listboxLabel": `Forslag`,
626
+ "selectedAnnouncement": (args) => `${args.optionText}, valgt`
627
+ };
628
+ var $bfd288727d5cb166$exports = {};
629
+ $bfd288727d5cb166$exports = {
630
+ "buttonLabel": `Empfehlungen anzeigen`,
631
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
632
+ one: () => `${formatter.number(args.optionCount)} Option`,
633
+ other: () => `${formatter.number(args.optionCount)} Optionen`
634
+ })} verfügbar.`,
635
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
636
+ true: () => `Eingetretene Gruppe ${args.groupTitle}, mit ${formatter.plural(args.groupCount, {
637
+ one: () => `${formatter.number(args.groupCount)} Option`,
638
+ other: () => `${formatter.number(args.groupCount)} Optionen`
639
+ })}. `,
640
+ other: ``
641
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
642
+ true: `, ausgewählt`,
643
+ other: ``
644
+ }, args.isSelected)}`,
645
+ "listboxLabel": `Empfehlungen`,
646
+ "selectedAnnouncement": (args) => `${args.optionText}, ausgewählt`
647
+ };
648
+ var $ca177778f9a74e3c$exports = {};
649
+ $ca177778f9a74e3c$exports = {
650
+ "buttonLabel": `Προβολή προτάσεων`,
651
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
652
+ one: () => `${formatter.number(args.optionCount)} επιλογή`,
653
+ other: () => `${formatter.number(args.optionCount)} επιλογές `
654
+ })} διαθέσιμες.`,
655
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
656
+ true: () => `Εισαγμένη ομάδα ${args.groupTitle}, με ${formatter.plural(args.groupCount, {
657
+ one: () => `${formatter.number(args.groupCount)} επιλογή`,
658
+ other: () => `${formatter.number(args.groupCount)} επιλογές`
659
+ })}. `,
660
+ other: ``
661
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
662
+ true: `, επιλεγμένο`,
663
+ other: ``
664
+ }, args.isSelected)}`,
665
+ "listboxLabel": `Προτάσεις`,
666
+ "selectedAnnouncement": (args) => `${args.optionText}, επιλέχθηκε`
667
+ };
668
+ var $9b5aa79ef84beb6c$exports = {};
669
+ $9b5aa79ef84beb6c$exports = {
670
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
671
+ true: () => `Entered group ${args.groupTitle}, with ${formatter.plural(args.groupCount, {
672
+ one: () => `${formatter.number(args.groupCount)} option`,
673
+ other: () => `${formatter.number(args.groupCount)} options`
674
+ })}. `,
675
+ other: ``
676
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
677
+ true: `, selected`,
678
+ other: ``
679
+ }, args.isSelected)}`,
680
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
681
+ one: () => `${formatter.number(args.optionCount)} option`,
682
+ other: () => `${formatter.number(args.optionCount)} options`
683
+ })} available.`,
684
+ "selectedAnnouncement": (args) => `${args.optionText}, selected`,
685
+ "buttonLabel": `Show suggestions`,
686
+ "listboxLabel": `Suggestions`
687
+ };
688
+ var $57968e8209de2557$exports = {};
689
+ $57968e8209de2557$exports = {
690
+ "buttonLabel": `Mostrar sugerencias`,
691
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
692
+ one: () => `${formatter.number(args.optionCount)} opción`,
693
+ other: () => `${formatter.number(args.optionCount)} opciones`
694
+ })} disponible(s).`,
695
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
696
+ true: () => `Se ha unido al grupo ${args.groupTitle}, con ${formatter.plural(args.groupCount, {
697
+ one: () => `${formatter.number(args.groupCount)} opción`,
698
+ other: () => `${formatter.number(args.groupCount)} opciones`
699
+ })}. `,
700
+ other: ``
701
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
702
+ true: `, seleccionado`,
703
+ other: ``
704
+ }, args.isSelected)}`,
705
+ "listboxLabel": `Sugerencias`,
706
+ "selectedAnnouncement": (args) => `${args.optionText}, seleccionado`
707
+ };
708
+ var $60690790bf4c1c6a$exports = {};
709
+ $60690790bf4c1c6a$exports = {
710
+ "buttonLabel": `Kuva soovitused`,
711
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
712
+ one: () => `${formatter.number(args.optionCount)} valik`,
713
+ other: () => `${formatter.number(args.optionCount)} valikud`
714
+ })} saadaval.`,
715
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
716
+ true: () => `Sisestatud rühm ${args.groupTitle}, valikuga ${formatter.plural(args.groupCount, {
717
+ one: () => `${formatter.number(args.groupCount)} valik`,
718
+ other: () => `${formatter.number(args.groupCount)} valikud`
719
+ })}. `,
720
+ other: ``
721
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
722
+ true: `, valitud`,
723
+ other: ``
724
+ }, args.isSelected)}`,
725
+ "listboxLabel": `Soovitused`,
726
+ "selectedAnnouncement": (args) => `${args.optionText}, valitud`
727
+ };
728
+ var $1101246e8c7d9357$exports = {};
729
+ $1101246e8c7d9357$exports = {
730
+ "buttonLabel": `Näytä ehdotukset`,
731
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
732
+ one: () => `${formatter.number(args.optionCount)} vaihtoehto`,
733
+ other: () => `${formatter.number(args.optionCount)} vaihtoehdot`
734
+ })} saatavilla.`,
735
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
736
+ true: () => `Mentiin ryhmään ${args.groupTitle}, ${formatter.plural(args.groupCount, {
737
+ one: () => `${formatter.number(args.groupCount)} vaihtoehdon`,
738
+ other: () => `${formatter.number(args.groupCount)} vaihtoehdon`
739
+ })} kanssa.`,
740
+ other: ``
741
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
742
+ true: `, valittu`,
743
+ other: ``
744
+ }, args.isSelected)}`,
745
+ "listboxLabel": `Ehdotukset`,
746
+ "selectedAnnouncement": (args) => `${args.optionText}, valittu`
747
+ };
748
+ var $6404b5cb5b241730$exports = {};
749
+ $6404b5cb5b241730$exports = {
750
+ "buttonLabel": `Afficher les suggestions`,
751
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
752
+ one: () => `${formatter.number(args.optionCount)} option`,
753
+ other: () => `${formatter.number(args.optionCount)} options`
754
+ })} disponible(s).`,
755
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
756
+ true: () => `Groupe ${args.groupTitle} rejoint, avec ${formatter.plural(args.groupCount, {
757
+ one: () => `${formatter.number(args.groupCount)} option`,
758
+ other: () => `${formatter.number(args.groupCount)} options`
759
+ })}. `,
760
+ other: ``
761
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
762
+ true: `, sélectionné(s)`,
763
+ other: ``
764
+ }, args.isSelected)}`,
765
+ "listboxLabel": `Suggestions`,
766
+ "selectedAnnouncement": (args) => `${args.optionText}, sélectionné`
767
+ };
768
+ var $dfeafa702e92e31f$exports = {};
769
+ $dfeafa702e92e31f$exports = {
770
+ "buttonLabel": `הצג הצעות`,
771
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
772
+ one: () => `אפשרות ${formatter.number(args.optionCount)}`,
773
+ other: () => `${formatter.number(args.optionCount)} אפשרויות`
774
+ })} במצב זמין.`,
775
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
776
+ true: () => `נכנס לקבוצה ${args.groupTitle}, עם ${formatter.plural(args.groupCount, {
777
+ one: () => `אפשרות ${formatter.number(args.groupCount)}`,
778
+ other: () => `${formatter.number(args.groupCount)} אפשרויות`
779
+ })}. `,
780
+ other: ``
781
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
782
+ true: `, נבחר`,
783
+ other: ``
784
+ }, args.isSelected)}`,
785
+ "listboxLabel": `הצעות`,
786
+ "selectedAnnouncement": (args) => `${args.optionText}, נבחר`
787
+ };
788
+ var $2d125e0b34676352$exports = {};
789
+ $2d125e0b34676352$exports = {
790
+ "buttonLabel": `Prikaži prijedloge`,
791
+ "countAnnouncement": (args, formatter) => `Dostupno još: ${formatter.plural(args.optionCount, {
792
+ one: () => `${formatter.number(args.optionCount)} opcija`,
793
+ other: () => `${formatter.number(args.optionCount)} opcije/a`
794
+ })}.`,
795
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
796
+ true: () => `Unesena skupina ${args.groupTitle}, s ${formatter.plural(args.groupCount, {
797
+ one: () => `${formatter.number(args.groupCount)} opcijom`,
798
+ other: () => `${formatter.number(args.groupCount)} opcije/a`
799
+ })}. `,
800
+ other: ``
801
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
802
+ true: `, odabranih`,
803
+ other: ``
804
+ }, args.isSelected)}`,
805
+ "listboxLabel": `Prijedlozi`,
806
+ "selectedAnnouncement": (args) => `${args.optionText}, odabrano`
807
+ };
808
+ var $ea029611d7634059$exports = {};
809
+ $ea029611d7634059$exports = {
810
+ "buttonLabel": `Javaslatok megjelenítése`,
811
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
812
+ one: () => `${formatter.number(args.optionCount)} lehetőség`,
813
+ other: () => `${formatter.number(args.optionCount)} lehetőség`
814
+ })} áll rendelkezésre.`,
815
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
816
+ true: () => `Belépett a(z) ${args.groupTitle} csoportba, amely ${formatter.plural(args.groupCount, {
817
+ one: () => `${formatter.number(args.groupCount)} lehetőséget`,
818
+ other: () => `${formatter.number(args.groupCount)} lehetőséget`
819
+ })} tartalmaz. `,
820
+ other: ``
821
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
822
+ true: `, kijelölve`,
823
+ other: ``
824
+ }, args.isSelected)}`,
825
+ "listboxLabel": `Javaslatok`,
826
+ "selectedAnnouncement": (args) => `${args.optionText}, kijelölve`
827
+ };
828
+ var $77f075bb86ad7091$exports = {};
829
+ $77f075bb86ad7091$exports = {
830
+ "buttonLabel": `Mostra suggerimenti`,
831
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
832
+ one: () => `${formatter.number(args.optionCount)} opzione disponibile`,
833
+ other: () => `${formatter.number(args.optionCount)} opzioni disponibili`
834
+ })}.`,
835
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
836
+ true: () => `Ingresso nel gruppo ${args.groupTitle}, con ${formatter.plural(args.groupCount, {
837
+ one: () => `${formatter.number(args.groupCount)} opzione`,
838
+ other: () => `${formatter.number(args.groupCount)} opzioni`
839
+ })}. `,
840
+ other: ``
841
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
842
+ true: `, selezionato`,
843
+ other: ``
844
+ }, args.isSelected)}`,
845
+ "listboxLabel": `Suggerimenti`,
846
+ "selectedAnnouncement": (args) => `${args.optionText}, selezionato`
847
+ };
848
+ var $6e87462e84907983$exports = {};
849
+ $6e87462e84907983$exports = {
850
+ "buttonLabel": `候補を表示`,
851
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
852
+ one: () => `${formatter.number(args.optionCount)} 個のオプション`,
853
+ other: () => `${formatter.number(args.optionCount)} 個のオプション`
854
+ })}を利用できます。`,
855
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
856
+ true: () => `入力されたグループ ${args.groupTitle}、${formatter.plural(args.groupCount, {
857
+ one: () => `${formatter.number(args.groupCount)} 個のオプション`,
858
+ other: () => `${formatter.number(args.groupCount)} 個のオプション`
859
+ })}を含む。`,
860
+ other: ``
861
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
862
+ true: `、選択済み`,
863
+ other: ``
864
+ }, args.isSelected)}`,
865
+ "listboxLabel": `候補`,
866
+ "selectedAnnouncement": (args) => `${args.optionText}、選択済み`
867
+ };
868
+ var $9246f2c6edc6b232$exports = {};
869
+ $9246f2c6edc6b232$exports = {
870
+ "buttonLabel": `제안 사항 표시`,
871
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
872
+ one: () => `${formatter.number(args.optionCount)}개 옵션`,
873
+ other: () => `${formatter.number(args.optionCount)}개 옵션`
874
+ })}을 사용할 수 있습니다.`,
875
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
876
+ true: () => `입력한 그룹 ${args.groupTitle}, ${formatter.plural(args.groupCount, {
877
+ one: () => `${formatter.number(args.groupCount)}개 옵션`,
878
+ other: () => `${formatter.number(args.groupCount)}개 옵션`
879
+ })}. `,
880
+ other: ``
881
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
882
+ true: `, 선택됨`,
883
+ other: ``
884
+ }, args.isSelected)}`,
885
+ "listboxLabel": `제안`,
886
+ "selectedAnnouncement": (args) => `${args.optionText}, 선택됨`
887
+ };
888
+ var $e587accc6c0a434c$exports = {};
889
+ $e587accc6c0a434c$exports = {
890
+ "buttonLabel": `Rodyti pasiūlymus`,
891
+ "countAnnouncement": (args, formatter) => `Yra ${formatter.plural(args.optionCount, {
892
+ one: () => `${formatter.number(args.optionCount)} parinktis`,
893
+ other: () => `${formatter.number(args.optionCount)} parinktys (-ių)`
894
+ })}.`,
895
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
896
+ true: () => `Įvesta grupė ${args.groupTitle}, su ${formatter.plural(args.groupCount, {
897
+ one: () => `${formatter.number(args.groupCount)} parinktimi`,
898
+ other: () => `${formatter.number(args.groupCount)} parinktimis (-ių)`
899
+ })}. `,
900
+ other: ``
901
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
902
+ true: `, pasirinkta`,
903
+ other: ``
904
+ }, args.isSelected)}`,
905
+ "listboxLabel": `Pasiūlymai`,
906
+ "selectedAnnouncement": (args) => `${args.optionText}, pasirinkta`
907
+ };
908
+ var $03a1900e7400b5ab$exports = {};
909
+ $03a1900e7400b5ab$exports = {
910
+ "buttonLabel": `Rādīt ieteikumus`,
911
+ "countAnnouncement": (args, formatter) => `Pieejamo opciju skaits: ${formatter.plural(args.optionCount, {
912
+ one: () => `${formatter.number(args.optionCount)} opcija`,
913
+ other: () => `${formatter.number(args.optionCount)} opcijas`
914
+ })}.`,
915
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
916
+ true: () => `Ievadīta grupa ${args.groupTitle}, ar ${formatter.plural(args.groupCount, {
917
+ one: () => `${formatter.number(args.groupCount)} opciju`,
918
+ other: () => `${formatter.number(args.groupCount)} opcijām`
919
+ })}. `,
920
+ other: ``
921
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
922
+ true: `, atlasīta`,
923
+ other: ``
924
+ }, args.isSelected)}`,
925
+ "listboxLabel": `Ieteikumi`,
926
+ "selectedAnnouncement": (args) => `${args.optionText}, atlasīta`
927
+ };
928
+ var $1387676441be6cf6$exports = {};
929
+ $1387676441be6cf6$exports = {
930
+ "buttonLabel": `Vis forslag`,
931
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
932
+ one: () => `${formatter.number(args.optionCount)} alternativ`,
933
+ other: () => `${formatter.number(args.optionCount)} alternativer`
934
+ })} finnes.`,
935
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
936
+ true: () => `Angitt gruppe ${args.groupTitle}, med ${formatter.plural(args.groupCount, {
937
+ one: () => `${formatter.number(args.groupCount)} alternativ`,
938
+ other: () => `${formatter.number(args.groupCount)} alternativer`
939
+ })}. `,
940
+ other: ``
941
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
942
+ true: `, valgt`,
943
+ other: ``
944
+ }, args.isSelected)}`,
945
+ "listboxLabel": `Forslag`,
946
+ "selectedAnnouncement": (args) => `${args.optionText}, valgt`
947
+ };
948
+ var $17e82ebf0f8ab91f$exports = {};
949
+ $17e82ebf0f8ab91f$exports = {
950
+ "buttonLabel": `Suggesties weergeven`,
951
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
952
+ one: () => `${formatter.number(args.optionCount)} optie`,
953
+ other: () => `${formatter.number(args.optionCount)} opties`
954
+ })} beschikbaar.`,
955
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
956
+ true: () => `Groep ${args.groupTitle} ingevoerd met ${formatter.plural(args.groupCount, {
957
+ one: () => `${formatter.number(args.groupCount)} optie`,
958
+ other: () => `${formatter.number(args.groupCount)} opties`
959
+ })}. `,
960
+ other: ``
961
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
962
+ true: `, geselecteerd`,
963
+ other: ``
964
+ }, args.isSelected)}`,
965
+ "listboxLabel": `Suggesties`,
966
+ "selectedAnnouncement": (args) => `${args.optionText}, geselecteerd`
967
+ };
968
+ var $2f5377d3471630e5$exports = {};
969
+ $2f5377d3471630e5$exports = {
970
+ "buttonLabel": `Wyświetlaj sugestie`,
971
+ "countAnnouncement": (args, formatter) => `dostępna/dostępne(-nych) ${formatter.plural(args.optionCount, {
972
+ one: () => `${formatter.number(args.optionCount)} opcja`,
973
+ other: () => `${formatter.number(args.optionCount)} opcje(-i)`
974
+ })}.`,
975
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
976
+ true: () => `Dołączono do grupy ${args.groupTitle}, z ${formatter.plural(args.groupCount, {
977
+ one: () => `${formatter.number(args.groupCount)} opcją`,
978
+ other: () => `${formatter.number(args.groupCount)} opcjami`
979
+ })}. `,
980
+ other: ``
981
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
982
+ true: `, wybrano`,
983
+ other: ``
984
+ }, args.isSelected)}`,
985
+ "listboxLabel": `Sugestie`,
986
+ "selectedAnnouncement": (args) => `${args.optionText}, wybrano`
987
+ };
988
+ var $dee9868b6fa95ffe$exports = {};
989
+ $dee9868b6fa95ffe$exports = {
990
+ "buttonLabel": `Mostrar sugestões`,
991
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
992
+ one: () => `${formatter.number(args.optionCount)} opção`,
993
+ other: () => `${formatter.number(args.optionCount)} opções`
994
+ })} disponível.`,
995
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
996
+ true: () => `Grupo inserido ${args.groupTitle}, com ${formatter.plural(args.groupCount, {
997
+ one: () => `${formatter.number(args.groupCount)} opção`,
998
+ other: () => `${formatter.number(args.groupCount)} opções`
999
+ })}. `,
1000
+ other: ``
1001
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
1002
+ true: `, selecionado`,
1003
+ other: ``
1004
+ }, args.isSelected)}`,
1005
+ "listboxLabel": `Sugestões`,
1006
+ "selectedAnnouncement": (args) => `${args.optionText}, selecionado`
1007
+ };
1008
+ var $f8b2e63637cbb5a6$exports = {};
1009
+ $f8b2e63637cbb5a6$exports = {
1010
+ "buttonLabel": `Apresentar sugestões`,
1011
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
1012
+ one: () => `${formatter.number(args.optionCount)} opção`,
1013
+ other: () => `${formatter.number(args.optionCount)} opções`
1014
+ })} disponível.`,
1015
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
1016
+ true: () => `Grupo introduzido ${args.groupTitle}, com ${formatter.plural(args.groupCount, {
1017
+ one: () => `${formatter.number(args.groupCount)} opção`,
1018
+ other: () => `${formatter.number(args.groupCount)} opções`
1019
+ })}. `,
1020
+ other: ``
1021
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
1022
+ true: `, selecionado`,
1023
+ other: ``
1024
+ }, args.isSelected)}`,
1025
+ "listboxLabel": `Sugestões`,
1026
+ "selectedAnnouncement": (args) => `${args.optionText}, selecionado`
1027
+ };
1028
+ var $46a885db3b44ea95$exports = {};
1029
+ $46a885db3b44ea95$exports = {
1030
+ "buttonLabel": `Afișare sugestii`,
1031
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
1032
+ one: () => `${formatter.number(args.optionCount)} opțiune`,
1033
+ other: () => `${formatter.number(args.optionCount)} opțiuni`
1034
+ })} disponibile.`,
1035
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
1036
+ true: () => `Grup ${args.groupTitle} introdus, cu ${formatter.plural(args.groupCount, {
1037
+ one: () => `${formatter.number(args.groupCount)} opțiune`,
1038
+ other: () => `${formatter.number(args.groupCount)} opțiuni`
1039
+ })}. `,
1040
+ other: ``
1041
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
1042
+ true: `, selectat`,
1043
+ other: ``
1044
+ }, args.isSelected)}`,
1045
+ "listboxLabel": `Sugestii`,
1046
+ "selectedAnnouncement": (args) => `${args.optionText}, selectat`
1047
+ };
1048
+ var $50d8a8f0afa9dee5$exports = {};
1049
+ $50d8a8f0afa9dee5$exports = {
1050
+ "buttonLabel": `Показать предложения`,
1051
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
1052
+ one: () => `${formatter.number(args.optionCount)} параметр`,
1053
+ other: () => `${formatter.number(args.optionCount)} параметров`
1054
+ })} доступно.`,
1055
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
1056
+ true: () => `Введенная группа ${args.groupTitle}, с ${formatter.plural(args.groupCount, {
1057
+ one: () => `${formatter.number(args.groupCount)} параметром`,
1058
+ other: () => `${formatter.number(args.groupCount)} параметрами`
1059
+ })}. `,
1060
+ other: ``
1061
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
1062
+ true: `, выбранными`,
1063
+ other: ``
1064
+ }, args.isSelected)}`,
1065
+ "listboxLabel": `Предложения`,
1066
+ "selectedAnnouncement": (args) => `${args.optionText}, выбрано`
1067
+ };
1068
+ var $2867ee6173245507$exports = {};
1069
+ $2867ee6173245507$exports = {
1070
+ "buttonLabel": `Zobraziť návrhy`,
1071
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
1072
+ one: () => `${formatter.number(args.optionCount)} možnosť`,
1073
+ other: () => `${formatter.number(args.optionCount)} možnosti/-í`
1074
+ })} k dispozícii.`,
1075
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
1076
+ true: () => `Zadaná skupina ${args.groupTitle}, s ${formatter.plural(args.groupCount, {
1077
+ one: () => `${formatter.number(args.groupCount)} možnosťou`,
1078
+ other: () => `${formatter.number(args.groupCount)} možnosťami`
1079
+ })}. `,
1080
+ other: ``
1081
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
1082
+ true: `, vybraté`,
1083
+ other: ``
1084
+ }, args.isSelected)}`,
1085
+ "listboxLabel": `Návrhy`,
1086
+ "selectedAnnouncement": (args) => `${args.optionText}, vybraté`
1087
+ };
1088
+ var $0631b65beeb09b50$exports = {};
1089
+ $0631b65beeb09b50$exports = {
1090
+ "buttonLabel": `Prikaži predloge`,
1091
+ "countAnnouncement": (args, formatter) => `Na voljo je ${formatter.plural(args.optionCount, {
1092
+ one: () => `${formatter.number(args.optionCount)} opcija`,
1093
+ other: () => `${formatter.number(args.optionCount)} opcije`
1094
+ })}.`,
1095
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
1096
+ true: () => `Vnesena skupina ${args.groupTitle}, z ${formatter.plural(args.groupCount, {
1097
+ one: () => `${formatter.number(args.groupCount)} opcija`,
1098
+ other: () => `${formatter.number(args.groupCount)} opcije`
1099
+ })}. `,
1100
+ other: ``
1101
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
1102
+ true: `, izbrano`,
1103
+ other: ``
1104
+ }, args.isSelected)}`,
1105
+ "listboxLabel": `Predlogi`,
1106
+ "selectedAnnouncement": (args) => `${args.optionText}, izbrano`
1107
+ };
1108
+ var $65fc749265dcd686$exports = {};
1109
+ $65fc749265dcd686$exports = {
1110
+ "buttonLabel": `Prikaži predloge`,
1111
+ "countAnnouncement": (args, formatter) => `Dostupno još: ${formatter.plural(args.optionCount, {
1112
+ one: () => `${formatter.number(args.optionCount)} opcija`,
1113
+ other: () => `${formatter.number(args.optionCount)} opcije/a`
1114
+ })}.`,
1115
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
1116
+ true: () => `Unesena grupa ${args.groupTitle}, s ${formatter.plural(args.groupCount, {
1117
+ one: () => `${formatter.number(args.groupCount)} opcijom`,
1118
+ other: () => `${formatter.number(args.groupCount)} optione/a`
1119
+ })}. `,
1120
+ other: ``
1121
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
1122
+ true: `, izabranih`,
1123
+ other: ``
1124
+ }, args.isSelected)}`,
1125
+ "listboxLabel": `Predlozi`,
1126
+ "selectedAnnouncement": (args) => `${args.optionText}, izabrano`
1127
+ };
1128
+ var $69ba655c7853c08e$exports = {};
1129
+ $69ba655c7853c08e$exports = {
1130
+ "buttonLabel": `Visa förslag`,
1131
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
1132
+ one: () => `${formatter.number(args.optionCount)} alternativ`,
1133
+ other: () => `${formatter.number(args.optionCount)} alternativ`
1134
+ })} tillgängliga.`,
1135
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
1136
+ true: () => `Ingick i gruppen ${args.groupTitle} med ${formatter.plural(args.groupCount, {
1137
+ one: () => `${formatter.number(args.groupCount)} alternativ`,
1138
+ other: () => `${formatter.number(args.groupCount)} alternativ`
1139
+ })}. `,
1140
+ other: ``
1141
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
1142
+ true: `, valda`,
1143
+ other: ``
1144
+ }, args.isSelected)}`,
1145
+ "listboxLabel": `Förslag`,
1146
+ "selectedAnnouncement": (args) => `${args.optionText}, valda`
1147
+ };
1148
+ var $a79794784d61577c$exports = {};
1149
+ $a79794784d61577c$exports = {
1150
+ "buttonLabel": `Önerileri göster`,
1151
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
1152
+ one: () => `${formatter.number(args.optionCount)} seçenek`,
1153
+ other: () => `${formatter.number(args.optionCount)} seçenekler`
1154
+ })} kullanılabilir.`,
1155
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
1156
+ true: () => `Girilen grup ${args.groupTitle}, ile ${formatter.plural(args.groupCount, {
1157
+ one: () => `${formatter.number(args.groupCount)} seçenek`,
1158
+ other: () => `${formatter.number(args.groupCount)} seçenekler`
1159
+ })}. `,
1160
+ other: ``
1161
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
1162
+ true: `, seçildi`,
1163
+ other: ``
1164
+ }, args.isSelected)}`,
1165
+ "listboxLabel": `Öneriler`,
1166
+ "selectedAnnouncement": (args) => `${args.optionText}, seçildi`
1167
+ };
1168
+ var $c2845791417ebaf4$exports = {};
1169
+ $c2845791417ebaf4$exports = {
1170
+ "buttonLabel": `Показати пропозиції`,
1171
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
1172
+ one: () => `${formatter.number(args.optionCount)} параметр`,
1173
+ other: () => `${formatter.number(args.optionCount)} параметри(-ів)`
1174
+ })} доступно.`,
1175
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
1176
+ true: () => `Введена група ${args.groupTitle}, з ${formatter.plural(args.groupCount, {
1177
+ one: () => `${formatter.number(args.groupCount)} параметр`,
1178
+ other: () => `${formatter.number(args.groupCount)} параметри(-ів)`
1179
+ })}. `,
1180
+ other: ``
1181
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
1182
+ true: `, вибрано`,
1183
+ other: ``
1184
+ }, args.isSelected)}`,
1185
+ "listboxLabel": `Пропозиції`,
1186
+ "selectedAnnouncement": (args) => `${args.optionText}, вибрано`
1187
+ };
1188
+ var $29b642d0025cc7a4$exports = {};
1189
+ $29b642d0025cc7a4$exports = {
1190
+ "buttonLabel": `显示建议`,
1191
+ "countAnnouncement": (args, formatter) => `有 ${formatter.plural(args.optionCount, {
1192
+ one: () => `${formatter.number(args.optionCount)} 个选项`,
1193
+ other: () => `${formatter.number(args.optionCount)} 个选项`
1194
+ })}可用。`,
1195
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
1196
+ true: () => `进入了 ${args.groupTitle} 组,其中有 ${formatter.plural(args.groupCount, {
1197
+ one: () => `${formatter.number(args.groupCount)} 个选项`,
1198
+ other: () => `${formatter.number(args.groupCount)} 个选项`
1199
+ })}. `,
1200
+ other: ``
1201
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
1202
+ true: `, 已选择`,
1203
+ other: ``
1204
+ }, args.isSelected)}`,
1205
+ "listboxLabel": `建议`,
1206
+ "selectedAnnouncement": (args) => `${args.optionText}, 已选择`
1207
+ };
1208
+ var $cd36dd33f9d46936$exports = {};
1209
+ $cd36dd33f9d46936$exports = {
1210
+ "buttonLabel": `顯示建議`,
1211
+ "countAnnouncement": (args, formatter) => `${formatter.plural(args.optionCount, {
1212
+ one: () => `${formatter.number(args.optionCount)} 選項`,
1213
+ other: () => `${formatter.number(args.optionCount)} 選項`
1214
+ })} 可用。`,
1215
+ "focusAnnouncement": (args, formatter) => `${formatter.select({
1216
+ true: () => `輸入的群組 ${args.groupTitle}, 有 ${formatter.plural(args.groupCount, {
1217
+ one: () => `${formatter.number(args.groupCount)} 選項`,
1218
+ other: () => `${formatter.number(args.groupCount)} 選項`
1219
+ })}. `,
1220
+ other: ``
1221
+ }, args.isGroupChange)}${args.optionText}${formatter.select({
1222
+ true: `, 已選取`,
1223
+ other: ``
1224
+ }, args.isSelected)}`,
1225
+ "listboxLabel": `建議`,
1226
+ "selectedAnnouncement": (args) => `${args.optionText}, 已選取`
1227
+ };
1228
+ var $de5926a92e8ebc5b$exports = {};
1229
+ $de5926a92e8ebc5b$exports = {
1230
+ "ar-AE": $02cb4c75c506befe$exports,
1231
+ "bg-BG": $568b8163f1e56faf$exports,
1232
+ "cs-CZ": $87581c0202d106b8$exports,
1233
+ "da-DK": $a10a0369f5433ed1$exports,
1234
+ "de-DE": $bfd288727d5cb166$exports,
1235
+ "el-GR": $ca177778f9a74e3c$exports,
1236
+ "en-US": $9b5aa79ef84beb6c$exports,
1237
+ "es-ES": $57968e8209de2557$exports,
1238
+ "et-EE": $60690790bf4c1c6a$exports,
1239
+ "fi-FI": $1101246e8c7d9357$exports,
1240
+ "fr-FR": $6404b5cb5b241730$exports,
1241
+ "he-IL": $dfeafa702e92e31f$exports,
1242
+ "hr-HR": $2d125e0b34676352$exports,
1243
+ "hu-HU": $ea029611d7634059$exports,
1244
+ "it-IT": $77f075bb86ad7091$exports,
1245
+ "ja-JP": $6e87462e84907983$exports,
1246
+ "ko-KR": $9246f2c6edc6b232$exports,
1247
+ "lt-LT": $e587accc6c0a434c$exports,
1248
+ "lv-LV": $03a1900e7400b5ab$exports,
1249
+ "nb-NO": $1387676441be6cf6$exports,
1250
+ "nl-NL": $17e82ebf0f8ab91f$exports,
1251
+ "pl-PL": $2f5377d3471630e5$exports,
1252
+ "pt-BR": $dee9868b6fa95ffe$exports,
1253
+ "pt-PT": $f8b2e63637cbb5a6$exports,
1254
+ "ro-RO": $46a885db3b44ea95$exports,
1255
+ "ru-RU": $50d8a8f0afa9dee5$exports,
1256
+ "sk-SK": $2867ee6173245507$exports,
1257
+ "sl-SI": $0631b65beeb09b50$exports,
1258
+ "sr-SP": $65fc749265dcd686$exports,
1259
+ "sv-SE": $69ba655c7853c08e$exports,
1260
+ "tr-TR": $a79794784d61577c$exports,
1261
+ "uk-UA": $c2845791417ebaf4$exports,
1262
+ "zh-CN": $29b642d0025cc7a4$exports,
1263
+ "zh-TW": $cd36dd33f9d46936$exports
1264
+ };
1265
+ function $parcel$interopDefault(a) {
1266
+ return a && a.__esModule ? a.default : a;
1267
+ }
1268
+ function $c350ade66beef0af$export$8c18d1b4f7232bbf(props, state) {
1269
+ let { buttonRef, popoverRef, inputRef, listBoxRef, keyboardDelegate, layoutDelegate, shouldFocusWrap, isReadOnly, isDisabled } = props;
1270
+ let backupBtnRef = useRef(null);
1271
+ buttonRef = buttonRef !== null && buttonRef !== void 0 ? buttonRef : backupBtnRef;
1272
+ let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($de5926a92e8ebc5b$exports), "@react-aria/combobox");
1273
+ let { menuTriggerProps, menuProps } = $168583247155ddda$export$dc9c12ed27dd1b49({
1274
+ type: "listbox",
1275
+ isDisabled: isDisabled || isReadOnly
1276
+ }, state, buttonRef);
1277
+ $b1f0cad8af73213b$export$3585ede4d035bf14.set(state, {
1278
+ id: menuProps.id
1279
+ });
1280
+ let { collection } = state;
1281
+ let { disabledKeys } = state.selectionManager;
1282
+ let delegate = useMemo(() => keyboardDelegate || new $2a25aae57d74318e$export$a05409b8bb224a5a({
1283
+ collection,
1284
+ disabledKeys,
1285
+ ref: listBoxRef,
1286
+ layoutDelegate
1287
+ }), [
1288
+ keyboardDelegate,
1289
+ layoutDelegate,
1290
+ collection,
1291
+ disabledKeys,
1292
+ listBoxRef
1293
+ ]);
1294
+ let { collectionProps } = $ae20dd8cbca75726$export$d6daf82dcd84e87c({
1295
+ selectionManager: state.selectionManager,
1296
+ keyboardDelegate: delegate,
1297
+ disallowTypeAhead: true,
1298
+ disallowEmptySelection: true,
1299
+ shouldFocusWrap,
1300
+ ref: inputRef,
1301
+ // Prevent item scroll behavior from being applied here, should be handled in the user's Popover + ListBox component
1302
+ isVirtualized: true
1303
+ });
1304
+ let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
1305
+ let onKeyDown = (e) => {
1306
+ if (e.nativeEvent.isComposing) return;
1307
+ switch (e.key) {
1308
+ case "Enter":
1309
+ case "Tab":
1310
+ if (state.isOpen && e.key === "Enter") e.preventDefault();
1311
+ if (state.isOpen && listBoxRef.current && state.selectionManager.focusedKey != null && state.selectionManager.isLink(state.selectionManager.focusedKey)) {
1312
+ let item = listBoxRef.current.querySelector(`[data-key="${CSS.escape(state.selectionManager.focusedKey.toString())}"]`);
1313
+ if (e.key === "Enter" && item instanceof HTMLAnchorElement) {
1314
+ let collectionItem = state.collection.getItem(state.selectionManager.focusedKey);
1315
+ if (collectionItem) router.open(item, e, collectionItem.props.href, collectionItem.props.routerOptions);
1316
+ }
1317
+ state.close();
1318
+ } else state.commit();
1319
+ break;
1320
+ case "Escape":
1321
+ if (state.selectedKey !== null || state.inputValue === "" || props.allowsCustomValue) e.continuePropagation();
1322
+ state.revert();
1323
+ break;
1324
+ case "ArrowDown":
1325
+ state.open("first", "manual");
1326
+ break;
1327
+ case "ArrowUp":
1328
+ state.open("last", "manual");
1329
+ break;
1330
+ case "ArrowLeft":
1331
+ case "ArrowRight":
1332
+ state.selectionManager.setFocusedKey(null);
1333
+ break;
1334
+ }
1335
+ };
1336
+ let onBlur = (e) => {
1337
+ var _popoverRef_current;
1338
+ let blurFromButton = (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) && buttonRef.current === e.relatedTarget;
1339
+ let blurIntoPopover = (_popoverRef_current = popoverRef.current) === null || _popoverRef_current === void 0 ? void 0 : _popoverRef_current.contains(e.relatedTarget);
1340
+ if (blurFromButton || blurIntoPopover) return;
1341
+ if (props.onBlur) props.onBlur(e);
1342
+ state.setFocused(false);
1343
+ };
1344
+ let onFocus = (e) => {
1345
+ if (state.isFocused) return;
1346
+ if (props.onFocus) props.onFocus(e);
1347
+ state.setFocused(true);
1348
+ };
1349
+ let { isInvalid, validationErrors, validationDetails } = state.displayValidation;
1350
+ let { labelProps, inputProps, descriptionProps, errorMessageProps } = $2d73ec29415bd339$export$712718f7aec83d5(__spreadProps(__spreadValues({}, props), {
1351
+ onChange: state.setInputValue,
1352
+ onKeyDown: !isReadOnly ? $ff5963eb1fccf552$export$e08e3b67e392101e(state.isOpen && collectionProps.onKeyDown, onKeyDown, props.onKeyDown) : props.onKeyDown,
1353
+ onBlur,
1354
+ value: state.inputValue,
1355
+ onFocus,
1356
+ autoComplete: "off",
1357
+ validate: void 0,
1358
+ [$e5be200c675c3b3a$export$a763b9476acd3eb]: state
1359
+ }), inputRef);
1360
+ let onPress = (e) => {
1361
+ if (e.pointerType === "touch") {
1362
+ var _inputRef_current;
1363
+ (_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
1364
+ state.toggle(null, "manual");
1365
+ }
1366
+ };
1367
+ let onPressStart = (e) => {
1368
+ if (e.pointerType !== "touch") {
1369
+ var _inputRef_current;
1370
+ (_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
1371
+ state.toggle(e.pointerType === "keyboard" || e.pointerType === "virtual" ? "first" : null, "manual");
1372
+ }
1373
+ };
1374
+ let triggerLabelProps = $313b98861ee5dd6c$export$d6875122194c7b44({
1375
+ id: menuTriggerProps.id,
1376
+ "aria-label": stringFormatter.format("buttonLabel"),
1377
+ "aria-labelledby": props["aria-labelledby"] || labelProps.id
1378
+ });
1379
+ let listBoxProps = $313b98861ee5dd6c$export$d6875122194c7b44({
1380
+ id: menuProps.id,
1381
+ "aria-label": stringFormatter.format("listboxLabel"),
1382
+ "aria-labelledby": props["aria-labelledby"] || labelProps.id
1383
+ });
1384
+ let lastEventTime = useRef(0);
1385
+ let onTouchEnd = (e) => {
1386
+ if (isDisabled || isReadOnly) return;
1387
+ if (e.timeStamp - lastEventTime.current < 500) {
1388
+ var _inputRef_current;
1389
+ e.preventDefault();
1390
+ (_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
1391
+ return;
1392
+ }
1393
+ let rect = e.target.getBoundingClientRect();
1394
+ let touch = e.changedTouches[0];
1395
+ let centerX = Math.ceil(rect.left + 0.5 * rect.width);
1396
+ let centerY = Math.ceil(rect.top + 0.5 * rect.height);
1397
+ if (touch.clientX === centerX && touch.clientY === centerY) {
1398
+ var _inputRef_current1;
1399
+ e.preventDefault();
1400
+ (_inputRef_current1 = inputRef.current) === null || _inputRef_current1 === void 0 ? void 0 : _inputRef_current1.focus();
1401
+ state.toggle(null, "manual");
1402
+ lastEventTime.current = e.timeStamp;
1403
+ }
1404
+ };
1405
+ let focusedItem = state.selectionManager.focusedKey != null && state.isOpen ? state.collection.getItem(state.selectionManager.focusedKey) : void 0;
1406
+ var _focusedItem_parentKey;
1407
+ let sectionKey = (_focusedItem_parentKey = focusedItem === null || focusedItem === void 0 ? void 0 : focusedItem.parentKey) !== null && _focusedItem_parentKey !== void 0 ? _focusedItem_parentKey : null;
1408
+ var _state_selectionManager_focusedKey;
1409
+ let itemKey = (_state_selectionManager_focusedKey = state.selectionManager.focusedKey) !== null && _state_selectionManager_focusedKey !== void 0 ? _state_selectionManager_focusedKey : null;
1410
+ let lastSection = useRef(sectionKey);
1411
+ let lastItem = useRef(itemKey);
1412
+ useEffect(() => {
1413
+ if ($c87311424ea30a05$export$e1865c3bedcd822b() && focusedItem != null && itemKey != null && itemKey !== lastItem.current) {
1414
+ let isSelected = state.selectionManager.isSelected(itemKey);
1415
+ let section = sectionKey != null ? state.collection.getItem(sectionKey) : null;
1416
+ let sectionTitle = (section === null || section === void 0 ? void 0 : section["aria-label"]) || (typeof (section === null || section === void 0 ? void 0 : section.rendered) === "string" ? section.rendered : "") || "";
1417
+ var _ref;
1418
+ let announcement = stringFormatter.format("focusAnnouncement", {
1419
+ isGroupChange: (_ref = section && sectionKey !== lastSection.current) !== null && _ref !== void 0 ? _ref : false,
1420
+ groupTitle: sectionTitle,
1421
+ groupCount: section ? [
1422
+ ...$c5a24bc478652b5f$export$1005530eda016c13(section, state.collection)
1423
+ ].length : 0,
1424
+ optionText: focusedItem["aria-label"] || focusedItem.textValue || "",
1425
+ isSelected
1426
+ });
1427
+ $319e236875307eab$export$a9b970dcc4ae71a9(announcement);
1428
+ }
1429
+ lastSection.current = sectionKey;
1430
+ lastItem.current = itemKey;
1431
+ });
1432
+ let optionCount = $453cc9f0df89c0a5$export$77d5aafae4e095b2(state.collection);
1433
+ let lastSize = useRef(optionCount);
1434
+ let lastOpen = useRef(state.isOpen);
1435
+ useEffect(() => {
1436
+ let didOpenWithoutFocusedItem = state.isOpen !== lastOpen.current && (state.selectionManager.focusedKey == null || $c87311424ea30a05$export$e1865c3bedcd822b());
1437
+ if (state.isOpen && (didOpenWithoutFocusedItem || optionCount !== lastSize.current)) {
1438
+ let announcement = stringFormatter.format("countAnnouncement", {
1439
+ optionCount
1440
+ });
1441
+ $319e236875307eab$export$a9b970dcc4ae71a9(announcement);
1442
+ }
1443
+ lastSize.current = optionCount;
1444
+ lastOpen.current = state.isOpen;
1445
+ });
1446
+ let lastSelectedKey = useRef(state.selectedKey);
1447
+ useEffect(() => {
1448
+ if ($c87311424ea30a05$export$e1865c3bedcd822b() && state.isFocused && state.selectedItem && state.selectedKey !== lastSelectedKey.current) {
1449
+ let optionText = state.selectedItem["aria-label"] || state.selectedItem.textValue || "";
1450
+ let announcement = stringFormatter.format("selectedAnnouncement", {
1451
+ optionText
1452
+ });
1453
+ $319e236875307eab$export$a9b970dcc4ae71a9(announcement);
1454
+ }
1455
+ lastSelectedKey.current = state.selectedKey;
1456
+ });
1457
+ useEffect(() => {
1458
+ if (state.isOpen) return $5e3802645cc19319$export$1c3ebcada18427bf([
1459
+ inputRef.current,
1460
+ popoverRef.current
1461
+ ].filter((element) => element != null));
1462
+ }, [
1463
+ state.isOpen,
1464
+ inputRef,
1465
+ popoverRef
1466
+ ]);
1467
+ return {
1468
+ labelProps,
1469
+ buttonProps: __spreadProps(__spreadValues(__spreadValues({}, menuTriggerProps), triggerLabelProps), {
1470
+ excludeFromTabOrder: true,
1471
+ preventFocusOnPress: true,
1472
+ onPress,
1473
+ onPressStart,
1474
+ isDisabled: isDisabled || isReadOnly
1475
+ }),
1476
+ inputProps: $3ef42575df84b30b$export$9d1611c77c2fe928(inputProps, {
1477
+ role: "combobox",
1478
+ "aria-expanded": menuTriggerProps["aria-expanded"],
1479
+ "aria-controls": state.isOpen ? menuProps.id : void 0,
1480
+ // TODO: readd proper logic for completionMode = complete (aria-autocomplete: both)
1481
+ "aria-autocomplete": "list",
1482
+ "aria-activedescendant": focusedItem ? $b1f0cad8af73213b$export$9145995848b05025(state, focusedItem.key) : void 0,
1483
+ onTouchEnd,
1484
+ // This disable's iOS's autocorrect suggestions, since the combo box provides its own suggestions.
1485
+ autoCorrect: "off",
1486
+ // This disable's the macOS Safari spell check auto corrections.
1487
+ spellCheck: "false"
1488
+ }),
1489
+ listBoxProps: $3ef42575df84b30b$export$9d1611c77c2fe928(menuProps, listBoxProps, {
1490
+ autoFocus: state.focusStrategy,
1491
+ shouldUseVirtualFocus: true,
1492
+ shouldSelectOnPressUp: true,
1493
+ shouldFocusOnHover: true,
1494
+ linkBehavior: "selection"
1495
+ }),
1496
+ descriptionProps,
1497
+ errorMessageProps,
1498
+ isInvalid,
1499
+ validationErrors,
1500
+ validationDetails
1501
+ };
1502
+ }
1503
+ const $ee014567cb39d3f0$export$ff05c3ac10437e03 = /* @__PURE__ */ createContext(null);
1504
+ const $d3e0e05bdfcf66bd$export$c24727297075ec6a = /* @__PURE__ */ createContext(null);
1505
+ const $3985021b0ad6602f$export$37fb8590cf2c088c = /* @__PURE__ */ createContext({});
1506
+ let $3985021b0ad6602f$var$filterHoverProps = (props) => {
1507
+ let _a = props, { onHoverStart, onHoverChange, onHoverEnd } = _a, otherProps = __objRest(_a, ["onHoverStart", "onHoverChange", "onHoverEnd"]);
1508
+ return otherProps;
1509
+ };
1510
+ function $3985021b0ad6602f$var$Input(props, ref) {
1511
+ [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $3985021b0ad6602f$export$37fb8590cf2c088c);
1512
+ let { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456(props);
1513
+ let { isFocused, isFocusVisible, focusProps } = $f7dceffc5ad7768b$export$4e328f61c538687f({
1514
+ isTextInput: true,
1515
+ autoFocus: props.autoFocus
1516
+ });
1517
+ let isInvalid = !!props["aria-invalid"] && props["aria-invalid"] !== "false";
1518
+ let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3(__spreadProps(__spreadValues({}, props), {
1519
+ values: {
1520
+ isHovered,
1521
+ isFocused,
1522
+ isFocusVisible,
1523
+ isDisabled: props.disabled || false,
1524
+ isInvalid
1525
+ },
1526
+ defaultClassName: "react-aria-Input"
1527
+ }));
1528
+ return /* @__PURE__ */ React__default.createElement("input", __spreadProps(__spreadValues(__spreadValues({}, $3ef42575df84b30b$export$9d1611c77c2fe928($3985021b0ad6602f$var$filterHoverProps(props), focusProps, hoverProps)), renderProps), {
1529
+ ref,
1530
+ "data-focused": isFocused || void 0,
1531
+ "data-disabled": props.disabled || void 0,
1532
+ "data-hovered": isHovered || void 0,
1533
+ "data-focus-visible": isFocusVisible || void 0,
1534
+ "data-invalid": isInvalid || void 0
1535
+ }));
1536
+ }
1537
+ const $3985021b0ad6602f$export$f5b8910cec6cf069 = /* @__PURE__ */ $f39a9eba43920ace$export$86427a43e3e48ebb($3985021b0ad6602f$var$Input);
1538
+ const $a049562f99e7db0e$export$f9c6924e160136d1 = /* @__PURE__ */ createContext({});
1539
+ const $d01f2c01039c0eec$export$d414ccceff7063c3 = /* @__PURE__ */ createContext(null);
1540
+ const $d01f2c01039c0eec$export$c02625b26074192c = /* @__PURE__ */ createContext(null);
1541
+ function $d01f2c01039c0eec$var$ComboBox(props, ref) {
1542
+ [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $d01f2c01039c0eec$export$d414ccceff7063c3);
1543
+ let { children, isDisabled = false, isInvalid = false, isRequired = false } = props;
1544
+ let content = useMemo(() => {
1545
+ var _props_items;
1546
+ return /* @__PURE__ */ React__default.createElement($eed445e0843c11d0$export$7ff8f37d2d81a48d.Provider, {
1547
+ value: {
1548
+ items: (_props_items = props.items) !== null && _props_items !== void 0 ? _props_items : props.defaultItems
1549
+ }
1550
+ }, typeof children === "function" ? children({
1551
+ isOpen: false,
1552
+ isDisabled,
1553
+ isInvalid,
1554
+ isRequired,
1555
+ defaultChildren: null
1556
+ }) : children);
1557
+ }, [
1558
+ children,
1559
+ isDisabled,
1560
+ isInvalid,
1561
+ isRequired,
1562
+ props.items,
1563
+ props.defaultItems
1564
+ ]);
1565
+ return /* @__PURE__ */ React__default.createElement($e1995378a142960e$export$bf788dd355e3a401, {
1566
+ content
1567
+ }, (collection) => /* @__PURE__ */ React__default.createElement($d01f2c01039c0eec$var$ComboBoxInner, {
1568
+ props,
1569
+ collection,
1570
+ comboBoxRef: ref
1571
+ }));
1572
+ }
1573
+ function $d01f2c01039c0eec$var$ComboBoxInner({ props, collection, comboBoxRef: ref }) {
1574
+ let { name, formValue = "key", allowsCustomValue } = props;
1575
+ if (allowsCustomValue) formValue = "text";
1576
+ let { validationBehavior: formValidationBehavior } = $64fa3d84918910a7$export$fabf2dc03a41866e($d3e0e05bdfcf66bd$export$c24727297075ec6a) || {};
1577
+ var _props_validationBehavior, _ref;
1578
+ let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== void 0 ? _ref : "native";
1579
+ let { contains } = $bb77f239b46e8c72$export$3274cf84b703fff({
1580
+ sensitivity: "base"
1581
+ });
1582
+ let state = $a9e7382a7d111cb5$export$b453a3bfd4a5fa9e(__spreadProps(__spreadValues({
1583
+ defaultFilter: props.defaultFilter || contains
1584
+ }, props), {
1585
+ // If props.items isn't provided, rely on collection filtering (aka listbox.items is provided or defaultItems provided to Combobox)
1586
+ items: props.items,
1587
+ children: void 0,
1588
+ collection,
1589
+ validationBehavior
1590
+ }));
1591
+ let buttonRef = useRef(null);
1592
+ let inputRef = useRef(null);
1593
+ let listBoxRef = useRef(null);
1594
+ let popoverRef = useRef(null);
1595
+ let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8();
1596
+ let _a = $c350ade66beef0af$export$8c18d1b4f7232bbf(__spreadProps(__spreadValues({}, $64fa3d84918910a7$export$ef03459518577ad4(props)), {
1597
+ label,
1598
+ inputRef,
1599
+ buttonRef,
1600
+ listBoxRef,
1601
+ popoverRef,
1602
+ name: formValue === "text" ? name : void 0,
1603
+ validationBehavior
1604
+ }), state), { buttonProps, inputProps, listBoxProps, labelProps, descriptionProps, errorMessageProps } = _a, validation = __objRest(_a, ["buttonProps", "inputProps", "listBoxProps", "labelProps", "descriptionProps", "errorMessageProps"]);
1605
+ let [menuWidth, setMenuWidth] = useState(null);
1606
+ let onResize = useCallback(() => {
1607
+ if (inputRef.current) {
1608
+ var _buttonRef_current;
1609
+ let buttonRect = (_buttonRef_current = buttonRef.current) === null || _buttonRef_current === void 0 ? void 0 : _buttonRef_current.getBoundingClientRect();
1610
+ let inputRect = inputRef.current.getBoundingClientRect();
1611
+ let minX = buttonRect ? Math.min(buttonRect.left, inputRect.left) : inputRect.left;
1612
+ let maxX = buttonRect ? Math.max(buttonRect.right, inputRect.right) : inputRect.right;
1613
+ setMenuWidth(maxX - minX + "px");
1614
+ }
1615
+ }, [
1616
+ buttonRef,
1617
+ inputRef,
1618
+ setMenuWidth
1619
+ ]);
1620
+ $9daab02d461809db$export$683480f191c0e3ea({
1621
+ ref: inputRef,
1622
+ onResize
1623
+ });
1624
+ let renderPropsState = useMemo(() => ({
1625
+ isOpen: state.isOpen,
1626
+ isDisabled: props.isDisabled || false,
1627
+ isInvalid: validation.isInvalid || false,
1628
+ isRequired: props.isRequired || false
1629
+ }), [
1630
+ state.isOpen,
1631
+ props.isDisabled,
1632
+ validation.isInvalid,
1633
+ props.isRequired
1634
+ ]);
1635
+ let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3(__spreadProps(__spreadValues({}, props), {
1636
+ values: renderPropsState,
1637
+ defaultClassName: "react-aria-ComboBox"
1638
+ }));
1639
+ let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props);
1640
+ delete DOMProps.id;
1641
+ var _state_selectedKey;
1642
+ return /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
1643
+ values: [
1644
+ [
1645
+ $d01f2c01039c0eec$export$c02625b26074192c,
1646
+ state
1647
+ ],
1648
+ [
1649
+ $01b77f81d0f07f68$export$75b6ee27786ba447,
1650
+ __spreadProps(__spreadValues({}, labelProps), {
1651
+ ref: labelRef
1652
+ })
1653
+ ],
1654
+ [
1655
+ $d2b4bc8c273e7be6$export$24d547caef80ccd1,
1656
+ __spreadProps(__spreadValues({}, buttonProps), {
1657
+ ref: buttonRef,
1658
+ isPressed: state.isOpen
1659
+ })
1660
+ ],
1661
+ [
1662
+ $3985021b0ad6602f$export$37fb8590cf2c088c,
1663
+ __spreadProps(__spreadValues({}, inputProps), {
1664
+ ref: inputRef
1665
+ })
1666
+ ],
1667
+ [
1668
+ $de32f1b87079253c$export$d2f961adcb0afbe,
1669
+ state
1670
+ ],
1671
+ [
1672
+ $07b14b47974efb58$export$9b9a0cd73afb7ca4,
1673
+ {
1674
+ ref: popoverRef,
1675
+ triggerRef: inputRef,
1676
+ scrollRef: listBoxRef,
1677
+ placement: "bottom start",
1678
+ isNonModal: true,
1679
+ trigger: "ComboBox",
1680
+ style: {
1681
+ "--trigger-width": menuWidth
1682
+ }
1683
+ }
1684
+ ],
1685
+ [
1686
+ $eed445e0843c11d0$export$7ff8f37d2d81a48d,
1687
+ __spreadProps(__spreadValues({}, listBoxProps), {
1688
+ ref: listBoxRef
1689
+ })
1690
+ ],
1691
+ [
1692
+ $eed445e0843c11d0$export$7c5906fe4f1f2af2,
1693
+ state
1694
+ ],
1695
+ [
1696
+ $514c0188e459b4c0$export$9afb8bc826b033ea,
1697
+ {
1698
+ slots: {
1699
+ description: descriptionProps,
1700
+ errorMessage: errorMessageProps
1701
+ }
1702
+ }
1703
+ ],
1704
+ [
1705
+ $a049562f99e7db0e$export$f9c6924e160136d1,
1706
+ {
1707
+ isInvalid: validation.isInvalid,
1708
+ isDisabled: props.isDisabled || false
1709
+ }
1710
+ ],
1711
+ [
1712
+ $ee014567cb39d3f0$export$ff05c3ac10437e03,
1713
+ validation
1714
+ ]
1715
+ ]
1716
+ }, /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues(__spreadValues({}, DOMProps), renderProps), {
1717
+ ref,
1718
+ slot: props.slot || void 0,
1719
+ "data-focused": state.isFocused || void 0,
1720
+ "data-open": state.isOpen || void 0,
1721
+ "data-disabled": props.isDisabled || void 0,
1722
+ "data-invalid": validation.isInvalid || void 0,
1723
+ "data-required": props.isRequired || void 0
1724
+ })), name && formValue === "key" && /* @__PURE__ */ React__default.createElement("input", {
1725
+ type: "hidden",
1726
+ name,
1727
+ value: (_state_selectedKey = state.selectedKey) !== null && _state_selectedKey !== void 0 ? _state_selectedKey : ""
1728
+ }));
1729
+ }
1730
+ const $d01f2c01039c0eec$export$72b9695b8216309a = /* @__PURE__ */ forwardRef($d01f2c01039c0eec$var$ComboBox);
1731
+ var __defProp2 = Object.defineProperty;
1732
+ var __getOwnPropSymbols2 = Object.getOwnPropertySymbols;
1733
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1734
+ var __propIsEnum2 = Object.prototype.propertyIsEnumerable;
1735
+ var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, {
1736
+ enumerable: true,
1737
+ configurable: true,
1738
+ writable: true,
1739
+ value
1740
+ }) : obj[key] = value;
1741
+ var __spreadValues2 = (a, b) => {
1742
+ for (var prop in b || (b = {})) if (__hasOwnProp2.call(b, prop)) __defNormalProp2(a, prop, b[prop]);
1743
+ if (__getOwnPropSymbols2) for (var prop of __getOwnPropSymbols2(b)) {
1744
+ if (__propIsEnum2.call(b, prop)) __defNormalProp2(a, prop, b[prop]);
1745
+ }
1746
+ return a;
1747
+ };
1748
+ var __objRest2 = (source, exclude) => {
1749
+ var target = {};
1750
+ for (var prop in source) if (__hasOwnProp2.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
1751
+ if (source != null && __getOwnPropSymbols2) for (var prop of __getOwnPropSymbols2(source)) {
1752
+ if (exclude.indexOf(prop) < 0 && __propIsEnum2.call(source, prop)) target[prop] = source[prop];
1753
+ }
1754
+ return target;
1755
+ };
1756
+ const KeyboardArrowDown = (_a) => {
1757
+ var _b = _a, { title, titleId } = _b, props = __objRest2(_b, ["title", "titleId"]);
1758
+ return React.createElement("svg", __spreadValues2({
1759
+ xmlns: "http://www.w3.org/2000/svg",
1760
+ viewBox: "0 -960 960 960",
1761
+ "aria-labelledby": titleId
1762
+ }, props), title ? React.createElement("title", {
1763
+ id: titleId
1764
+ }, title) : null, React.createElement("path", {
1765
+ d: "M480-357.85 253.85-584l32.61-32.61L480-423.08l193.54-193.53L706.15-584 480-357.85Z"
1766
+ }));
1767
+ };
1768
+ const popover = "_popover_c33uy_5";
1769
+ const menu = "_menu_c33uy_23";
1770
+ const option = "_option_c33uy_28";
1771
+ const listEmptyState = "_listEmptyState_c33uy_29";
1772
+ const spinnerContainer = "_spinnerContainer_c33uy_53";
1773
+ const spinner = "_spinner_c33uy_53";
1774
+ const styles$1 = {
1775
+ popover,
1776
+ menu,
1777
+ option,
1778
+ listEmptyState,
1779
+ spinnerContainer,
1780
+ spinner
1781
+ };
1782
+ function MultiSelectDropdown(props) {
1783
+ const { children, maxItemsUntilScroll = DEFAULT_MAX_ITEMS_UNTIL_SCROLL, isLoading, triggerRef, menuRef, width } = props;
1784
+ const style = __spreadValues(__spreadValues({
1785
+ width
1786
+ }, getComponentToken("menu", "item_height", `${pxToRem(ITEM_HEIGHT)}rem`)), getComponentToken("menu", "padding.y", `${pxToRem(Y_PADDING_INSIDE_OVERLAY)}rem`));
1787
+ return React__default.createElement($07b14b47974efb58$export$5b6b19405a83ff9d, {
1788
+ isNonModal: true,
1789
+ className: styles$1.popover,
1790
+ style,
1791
+ triggerRef,
1792
+ scrollRef: menuRef,
1793
+ trigger: "ComboBox",
1794
+ maxHeight: getMenuPopoverMaxHeight({
1795
+ maxItemsUntilScroll
1796
+ })
1797
+ }, isLoading ? React__default.createElement("div", {
1798
+ className: styles$1.spinnerContainer
1799
+ }, React__default.createElement("div", {
1800
+ className: styles$1.spinner
1801
+ }, React__default.createElement(Spinner, {
1802
+ isIndeterminate: true,
1803
+ "aria-label": "Loading",
1804
+ size: "sm"
1805
+ }))) : React__default.createElement(ScrollContainer, {
1806
+ scrollRef: menuRef
1807
+ }, React__default.createElement($eed445e0843c11d0$export$41f133550aa26f48, {
1808
+ renderEmptyState: () => React__default.createElement("div", {
1809
+ className: styles$1.listEmptyState
1810
+ }, React__default.createElement(Text, {
1811
+ variant: "subtitle2",
1812
+ color: "neutral.400"
1813
+ }, "No results found")),
1814
+ selectionMode: "multiple"
1815
+ }, children)));
1816
+ }
1817
+ function MultiSelectDropdownOption(props) {
1818
+ return React__default.createElement($eed445e0843c11d0$export$a11e76429ed99b4, __spreadProps(__spreadValues({}, props), {
1819
+ className: styles$1.option
1820
+ }));
1821
+ }
1822
+ function MultiSelectDropdownOptionText(props) {
1823
+ return React__default.createElement(Text, __spreadValues({
1824
+ variant: "body1"
1825
+ }, props));
1826
+ }
1827
+ function ScrollContainer({ scrollRef, children }) {
1828
+ useScrollbar(scrollRef, "ezui-os-theme-overlay");
1829
+ return React__default.createElement("div", {
1830
+ className: styles$1.menu,
1831
+ ref: scrollRef
1832
+ }, children);
1833
+ }
1834
+ function useElementWidth(elementRef) {
1835
+ const [width, setWidth] = useState(0);
1836
+ $9daab02d461809db$export$683480f191c0e3ea({
1837
+ ref: elementRef,
1838
+ onResize() {
1839
+ if (elementRef.current) {
1840
+ const { width: width2 } = elementRef.current.getBoundingClientRect();
1841
+ setWidth(width2);
1842
+ }
1843
+ }
1844
+ });
1845
+ return width;
1846
+ }
1847
+ const MultiSelect$1 = "_MultiSelect_1g32f_5";
1848
+ const input = "_input_1g32f_38";
1849
+ const comboBoxContainer = "_comboBoxContainer_1g32f_43";
1850
+ const comboBox = "_comboBox_1g32f_43";
1851
+ const inputContainer = "_inputContainer_1g32f_53";
1852
+ const dropdownArrowButton = "_dropdownArrowButton_1g32f_84";
1853
+ const styles = {
1854
+ MultiSelect: MultiSelect$1,
1855
+ input,
1856
+ comboBoxContainer,
1857
+ comboBox,
1858
+ inputContainer,
1859
+ dropdownArrowButton
1860
+ };
1861
+ function MultiSelect(props) {
1862
+ const { children, disabledKeys, dropdownItems = [], inputValue, isLoading, maxItemsUntilScroll = DEFAULT_MAX_ITEMS_UNTIL_SCROLL, onInputChange = () => {
1863
+ }, onSelectionChange, placeholder, renderPill, selectedItems } = props;
1864
+ const rootRef = useRef(null);
1865
+ const clearComboBoxButtonRef = useRef(null);
1866
+ const menuRef = useRef(null);
1867
+ const [tempSelectedKey, setTempSelectedKey] = useState(null);
1868
+ const rootWidth = useElementWidth(rootRef);
1869
+ const onRemoveSelectedItem = (keys) => {
1870
+ const key = keys.values().next().value;
1871
+ if (key) {
1872
+ onSelectionChange(selectedItems.filter((k) => k.key !== key));
1873
+ onInputChange("");
1874
+ setTempSelectedKey(null);
1875
+ }
1876
+ };
1877
+ const onComboBoxSelectionChange = (key) => {
1878
+ if (!key) {
1879
+ return;
1880
+ }
1881
+ const item = [...dropdownItems].find((i) => i.key === key);
1882
+ if (!item) {
1883
+ return;
1884
+ }
1885
+ if (!selectedItems.map((i) => i.key).includes(key)) {
1886
+ onSelectionChange([...selectedItems, item]);
1887
+ setTempSelectedKey(key);
1888
+ }
1889
+ onInputChange("");
1890
+ };
1891
+ const onComboBoxInputChange = (value) => {
1892
+ onInputChange(value);
1893
+ setTempSelectedKey((prevSelectedKey) => value === "" ? null : prevSelectedKey);
1894
+ };
1895
+ const onComboBoxInputKeyDownCapture = (e) => {
1896
+ if (e.key === "Backspace" && inputValue === "") {
1897
+ if (selectedItems.length === 0) {
1898
+ return;
1899
+ }
1900
+ if (selectedItems.length > 0) {
1901
+ const endItem = selectedItems[selectedItems.length - 1];
1902
+ onSelectionChange(selectedItems.filter((k) => k.key !== endItem.key));
1903
+ }
1904
+ onInputChange("");
1905
+ setTempSelectedKey(null);
1906
+ }
1907
+ };
1908
+ const onComboBoxInputBlur = () => {
1909
+ onInputChange("");
1910
+ setTempSelectedKey(null);
1911
+ };
1912
+ return React__default.createElement("div", {
1913
+ ref: rootRef,
1914
+ className: styles.MultiSelect
1915
+ }, selectedItems.length > 0 ? React__default.createElement(PillGroup, {
1916
+ items: selectedItems,
1917
+ horizontalStackContainerProps: {
1918
+ gap: "1"
1919
+ },
1920
+ onRemove: onRemoveSelectedItem,
1921
+ label: "Selected items"
1922
+ }, renderPill) : React__default.createElement($5c3e21d68f1c4674$export$439d29a4e110a164, null, React__default.createElement(Text, null, "No selected items")), React__default.createElement("div", {
1923
+ className: styles.comboBoxContainer
1924
+ }, React__default.createElement($d01f2c01039c0eec$export$72b9695b8216309a, {
1925
+ className: styles.comboBox,
1926
+ allowsEmptyCollection: true,
1927
+ "aria-label": "Available items",
1928
+ selectedKey: tempSelectedKey,
1929
+ onSelectionChange: onComboBoxSelectionChange,
1930
+ items: dropdownItems,
1931
+ inputValue,
1932
+ onInputChange: onComboBoxInputChange,
1933
+ disabledKeys
1934
+ }, React__default.createElement("div", {
1935
+ className: styles.inputContainer
1936
+ }, React__default.createElement($3985021b0ad6602f$export$f5b8910cec6cf069, {
1937
+ placeholder,
1938
+ className: styles.input,
1939
+ onBlur: onComboBoxInputBlur,
1940
+ onKeyDownCapture: onComboBoxInputKeyDownCapture
1941
+ }), React__default.createElement($5c3e21d68f1c4674$export$439d29a4e110a164, null, React__default.createElement($d2b4bc8c273e7be6$export$353f5b6fc5456de1, {
1942
+ type: "button",
1943
+ slot: "remove",
1944
+ "aria-label": "Clear",
1945
+ ref: clearComboBoxButtonRef
1946
+ }))), React__default.createElement(MultiSelectDropdown, {
1947
+ triggerRef: rootRef,
1948
+ menuRef,
1949
+ maxItemsUntilScroll,
1950
+ isLoading,
1951
+ width: rootWidth
1952
+ }, children)), React__default.createElement("button", {
1953
+ type: "button",
1954
+ className: styles.dropdownArrowButton,
1955
+ onClick: () => {
1956
+ var _a;
1957
+ return (_a = clearComboBoxButtonRef.current) == null ? void 0 : _a.click();
1958
+ },
1959
+ tabIndex: -1
1960
+ }, React__default.createElement(Text, {
1961
+ visuallyHidden: true
1962
+ }, "Open dropdown"), React__default.createElement(Icon, {
1963
+ symbol: KeyboardArrowDown
1964
+ }))));
1965
+ }
1966
+ MultiSelect.Pill = PillGroup.Pill;
1967
+ MultiSelect.Option = MultiSelectDropdownOption;
1968
+ MultiSelect.OptionText = MultiSelectDropdownOptionText;
1969
+ export {
1970
+ MultiSelect,
1971
+ $f86e6c1ec7da6ebb$export$bc3384a35de93d66 as useAsyncList,
1972
+ $bb77f239b46e8c72$export$3274cf84b703fff as useFilter,
1973
+ h as useListData
1974
+ };