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

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 +13 -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-lb6KY-VK.mjs → Button-10mhxReQ.mjs} +18 -18
  124. package/__chunks__/{Button-CDRssWxC.mjs → Button-BqogJAQ3.mjs} +3 -3
  125. package/__chunks__/{Button-DXhw-VUb.js → Button-BxncM-fm.js} +18 -18
  126. package/__chunks__/{Button-BvLvcmfd.js → Button-Y550ybuK.js} +1 -1
  127. package/__chunks__/{Calendar-ChbA9Ste.mjs → Calendar-D0ysbR2X.mjs} +1 -1
  128. package/__chunks__/{Calendar-D-oFF4f4.js → Calendar-SdcIIg8-.js} +1 -1
  129. package/__chunks__/{CalendarBase-oPvH2YM1.js → CalendarBase-Vw2pBuuE.js} +18 -18
  130. package/__chunks__/{CalendarBase-DC8WR7md.mjs → CalendarBase-ncItGlBS.mjs} +18 -18
  131. package/__chunks__/{Card-CWv2re8Z.mjs → Card-B1cXTObc.mjs} +12 -12
  132. package/__chunks__/{Card-CRFM7MOD.js → Card-DaX-ZuLu.js} +12 -12
  133. package/__chunks__/{Checkbox-B7eahvPN.js → Checkbox-DSYdN5fC.js} +19 -19
  134. package/__chunks__/{Checkbox-XDmnzjIx.mjs → Checkbox-DdAWbHpa.mjs} +20 -20
  135. package/__chunks__/{CodeSnippet-CnjYkoJo.mjs → CodeSnippet-BbIqouQg.mjs} +2 -2
  136. package/__chunks__/{CodeSnippet-FCgb2RfQ.js → CodeSnippet-CPuuHMuI.js} +2 -2
  137. package/__chunks__/{DatePickerBase-DMmeUEou.js → DatePickerBase-D8v7yMaR.js} +18 -62
  138. package/__chunks__/{DatePickerBase-B9g5PeHi.mjs → DatePickerBase-DVA3ya0P.mjs} +20 -64
  139. package/__chunks__/Dialog-CFyC5TFs.js +232 -0
  140. package/__chunks__/Dialog-DnCSZh3s.mjs +233 -0
  141. package/__chunks__/{HelpMenu-BjEMVfGE.js → HelpMenu-CJK_EziM.js} +6 -6
  142. package/__chunks__/{HelpMenu-DWvUM5hz.mjs → HelpMenu-DeTGhGis.mjs} +6 -6
  143. package/__chunks__/{HorizontalGrid-BZX-WluO.js → HorizontalGrid-BYnV-Dy9.js} +1 -1
  144. package/__chunks__/{HorizontalGrid-DGrPEAhQ.mjs → HorizontalGrid-N2NkjG0P.mjs} +1 -1
  145. package/__chunks__/{HorizontalStack--Qc3cVBd.mjs → HorizontalStack-BjMnJAXd.mjs} +1 -1
  146. package/__chunks__/{HorizontalStack-VtCu2VMx.js → HorizontalStack-DqPlOkSw.js} +1 -1
  147. package/__chunks__/{Icon-BD88DLNr.mjs → Icon-QpfeMf4x.mjs} +2 -2
  148. package/__chunks__/{Icon-BDa4XL_V.js → Icon-SeXHAWa2.js} +2 -2
  149. package/__chunks__/{InputCaption-DYFfypKt.mjs → InputCaption-Bcjaxvqr.mjs} +2 -2
  150. package/__chunks__/{InputCaption-DKZRO84o.js → InputCaption-peDy98l4.js} +2 -2
  151. package/__chunks__/{InputField-Bv1SfmUB.mjs → InputField-CmJ6SAKl.mjs} +6 -89
  152. package/__chunks__/{InputField-C7Ti5JNz.js → InputField-DvSIzId4.js} +6 -89
  153. package/__chunks__/{InputIcon-VzRxuUky.mjs → InputIcon-BNR3_LeL.mjs} +31 -31
  154. package/__chunks__/{InputIcon-c-x0Whak.js → InputIcon-szDt09pM.js} +31 -31
  155. package/__chunks__/{KebabButton-TgeYkgj5.mjs → KebabButton-BcKtZQv2.mjs} +4 -4
  156. package/__chunks__/{KebabButton-CdlmuIRm.js → KebabButton-C4QJla9Y.js} +4 -4
  157. package/__chunks__/{Menu-C1Q0RfOp.js → Menu-C45BBC1Y.js} +22 -62
  158. package/__chunks__/{Menu-BL0okgwD.mjs → Menu-CW11-o2X.mjs} +22 -62
  159. package/__chunks__/{Notification-CZS59-s8.mjs → Notification-BJKPFSzJ.mjs} +14 -14
  160. package/__chunks__/{Notification-D7fRjiAH.js → Notification-CxrDF_Pg.js} +14 -14
  161. package/__chunks__/{Overlay-DyfvFsGi.mjs → Overlay-BEmOdNIB.mjs} +3 -3
  162. package/__chunks__/PillGroup-BUMKmU-f.js +2061 -0
  163. package/__chunks__/PillGroup-BtvBL5fM.mjs +2062 -0
  164. package/__chunks__/{RadioGroup-CYlZvoxh.js → RadioGroup-C0py9A-2.js} +15 -15
  165. package/__chunks__/{RadioGroup-D3RN5LLn.mjs → RadioGroup-DZXOUSXN.mjs} +16 -16
  166. package/__chunks__/{RangeCalendar-0Zt6GJAs.js → RangeCalendar-DBiN8Tu8.js} +1 -1
  167. package/__chunks__/{RangeCalendar-D5t6FuZp.mjs → RangeCalendar-DSEwJpHw.mjs} +1 -1
  168. package/__chunks__/{SelectOverlay-DAJ9-Wye.mjs → SelectOverlay-Cy3-vsZK.mjs} +29 -189
  169. package/__chunks__/{SelectOverlay-XRIcujy9.js → SelectOverlay-DBo4MARx.js} +28 -188
  170. package/__chunks__/{SelectorErrorTooltip-r2APVg60.js → SelectorErrorTooltip-DkECS0nt.js} +4 -4
  171. package/__chunks__/{SelectorErrorTooltip-BSNUFpGD.mjs → SelectorErrorTooltip-fPBKPgvD.mjs} +4 -4
  172. package/__chunks__/{Spinner-D9lZ3erf.js → Spinner-BadWfHqn.js} +5 -5
  173. package/__chunks__/{Spinner-C6CoASxe.mjs → Spinner-BjlaHcou.mjs} +5 -5
  174. package/__chunks__/{Stepper-BRecUCpd.mjs → Stepper-BB_ESAbw.mjs} +25 -25
  175. package/__chunks__/{Stepper-D0YDhoPF.js → Stepper-BqgzsSzg.js} +25 -25
  176. package/__chunks__/{TabNav-BzeG4JrK.mjs → TabNav-D77kh-Xx.mjs} +1 -1
  177. package/__chunks__/{TabNav-ipa33NIM.js → TabNav-DnnHglAy.js} +1 -1
  178. package/__chunks__/{Tabs-CsOlVyHJ.mjs → Tabs-C2FPFWA4.mjs} +17 -17
  179. package/__chunks__/{Tabs-CDUhh-Bz.js → Tabs-Y2WlJlna.js} +17 -17
  180. package/__chunks__/{Text-CntV2Frc.js → Text-Crcy_R7t.js} +34 -34
  181. package/__chunks__/{Text-BHyjSBcd.mjs → Text-V-yZP2s7.mjs} +34 -34
  182. package/__chunks__/{TextField-CBWpUHdy.js → TextField-D847huaI.js} +1 -1
  183. package/__chunks__/{TextField-Ca_M-pak.mjs → TextField-EkC5gsJ8.mjs} +1 -1
  184. package/__chunks__/{Toggle-C6ICkaF-.js → Toggle-CQIvcPcu.js} +11 -11
  185. package/__chunks__/{Toggle-BxtpUTDA.mjs → Toggle-H4aOxdc8.mjs} +11 -11
  186. package/__chunks__/{Tooltip-BK6l0C3n.mjs → Tooltip-CIS6DQEh.mjs} +10 -10
  187. package/__chunks__/{Tooltip-cqSETep4.js → Tooltip-DKFYEVdG.js} +8 -8
  188. package/__chunks__/{VerticalStack-BVtgNZrG.mjs → VerticalStack-Djj29NqV.mjs} +3 -3
  189. package/__chunks__/{VerticalStack-B7auhieq.js → VerticalStack-DjuWiMXF.js} +3 -3
  190. package/__chunks__/{useDialog-c-C07qhw.mjs → useDialog-h-MPfyGr.mjs} +1 -1
  191. package/__chunks__/{useEdgeInterceptors-DrJ9MQmY.mjs → useEdgeInterceptors-CJs5WRkG.mjs} +5 -5
  192. package/__chunks__/{useEdgeInterceptors-Bvg1fK8h.js → useEdgeInterceptors-ClXj8z7M.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 +2 -2
  217. package/style.css +1609 -1445
  218. package/utilities/storybook.d.ts +1 -0
  219. package/utilities/storybook.d.ts.map +1 -1
@@ -1,1683 +1,5 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __spreadValues = (a, b) => {
10
- for (var prop in b || (b = {}))
11
- if (__hasOwnProp.call(b, prop))
12
- __defNormalProp(a, prop, b[prop]);
13
- if (__getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(b)) {
15
- if (__propIsEnum.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- }
18
- return a;
19
- };
20
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
- var __objRest = (source, exclude) => {
22
- var target = {};
23
- for (var prop in source)
24
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
25
- target[prop] = source[prop];
26
- if (source != null && __getOwnPropSymbols)
27
- for (var prop of __getOwnPropSymbols(source)) {
28
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
29
- target[prop] = source[prop];
30
- }
31
- return target;
32
- };
33
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
34
- const React = require("react");
35
- const Button = require("../__chunks__/Button-BvLvcmfd.js");
36
- const utils = require("../__chunks__/utils-DIF5XAA2.js");
37
- const ReactDOM = require("react-dom");
38
- const mergeProps = require("../__chunks__/mergeProps-DniMwM6P.js");
39
- const index = require("../__chunks__/index-CTw89HMx.js");
40
- const filterDOMProps = require("../__chunks__/filterDOMProps-D3iOHP0H.js");
41
- const useObjectRef = require("../__chunks__/useObjectRef-BOGMJ5vM.js");
42
- const useListState = require("../__chunks__/useListState-I5rva0Fq.js");
43
- const useSelectableList = require("../__chunks__/useSelectableList-UkBCcTuC.js");
44
- const useField = require("../__chunks__/useField-BJW_bXVD.js");
45
- const useFocusWithin = require("../__chunks__/useFocusWithin-C1ioGWec.js");
46
- const useHighlightSelectionDescription = require("../__chunks__/useHighlightSelectionDescription-CT5XKTz0.js");
47
- const useHasTabbableChild = require("../__chunks__/useHasTabbableChild-Cs10TUUE.js");
48
- const context = require("../__chunks__/context-D3NeXov7.js");
49
- const usePress = require("../__chunks__/usePress-DNETV97g.js");
50
- const scrollIntoView = require("../__chunks__/scrollIntoView-DkcUbB3D.js");
51
- const getScrollParent = require("../__chunks__/getScrollParent-DNz2ReWu.js");
52
- const FocusScope = require("../__chunks__/FocusScope-DFE0IeGl.js");
53
- const focusSafely = require("../__chunks__/focusSafely-BvrXUhlW.js");
54
- const SelectionManager = require("../__chunks__/SelectionManager-DuX6geJg.js");
55
- const useFocusVisible = require("../__chunks__/useFocusVisible-PBQuklI8.js");
56
- const useSelectableItem = require("../__chunks__/useSelectableItem-DpEX9QBc.js");
57
- const useLocalizedStringFormatter = require("../__chunks__/useLocalizedStringFormatter-CaF1VsOH.js");
58
- const useFocusRing = require("../__chunks__/useFocusRing-DFRFvht_.js");
59
- const useHover = require("../__chunks__/useHover-BIKwjrCT.js");
60
- const Close = require("../__chunks__/Close-BQ2IlPyf.js");
61
- const Icon = require("../__chunks__/Icon-BDa4XL_V.js");
62
- const Text = require("../__chunks__/Text-CntV2Frc.js");
63
- const utilities_css = require("../utilities/css.js");
64
- function $0d86e9c8f07f9a7b$export$762f73dccccd255d(options) {
65
- let { initialItems = [], initialSelectedKeys, getKey = (item) => {
66
- var _item_id;
67
- return (_item_id = item.id) !== null && _item_id !== void 0 ? _item_id : item.key;
68
- }, filter, initialFilterText = "" } = options;
69
- let [state, setState] = React.useState({
70
- items: initialItems,
71
- selectedKeys: initialSelectedKeys === "all" ? "all" : new Set(initialSelectedKeys || []),
72
- filterText: initialFilterText
73
- });
74
- let filteredItems = React.useMemo(() => filter ? state.items.filter((item) => filter(item, state.filterText)) : state.items, [
75
- state.items,
76
- state.filterText,
77
- filter
78
- ]);
79
- return __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, state), {
80
- items: filteredItems
81
- }), $0d86e9c8f07f9a7b$export$79c0c687a5963b0a({
82
- getKey
83
- }, setState)), {
84
- getItem(key) {
85
- return state.items.find((item) => getKey(item) === key);
86
- }
87
- });
88
- }
89
- function $0d86e9c8f07f9a7b$export$79c0c687a5963b0a(opts, dispatch) {
90
- let { cursor, getKey } = opts;
91
- return {
92
- setSelectedKeys(selectedKeys) {
93
- dispatch((state) => __spreadProps(__spreadValues({}, state), {
94
- selectedKeys
95
- }));
96
- },
97
- setFilterText(filterText) {
98
- dispatch((state) => __spreadProps(__spreadValues({}, state), {
99
- filterText
100
- }));
101
- },
102
- insert(index2, ...values) {
103
- dispatch((state) => $0d86e9c8f07f9a7b$var$insert(state, index2, ...values));
104
- },
105
- insertBefore(key, ...values) {
106
- dispatch((state) => {
107
- let index2 = state.items.findIndex((item) => (getKey === null || getKey === void 0 ? void 0 : getKey(item)) === key);
108
- if (index2 === -1) {
109
- if (state.items.length === 0) index2 = 0;
110
- else return state;
111
- }
112
- return $0d86e9c8f07f9a7b$var$insert(state, index2, ...values);
113
- });
114
- },
115
- insertAfter(key, ...values) {
116
- dispatch((state) => {
117
- let index2 = state.items.findIndex((item) => (getKey === null || getKey === void 0 ? void 0 : getKey(item)) === key);
118
- if (index2 === -1) {
119
- if (state.items.length === 0) index2 = 0;
120
- else return state;
121
- }
122
- return $0d86e9c8f07f9a7b$var$insert(state, index2 + 1, ...values);
123
- });
124
- },
125
- prepend(...values) {
126
- dispatch((state) => $0d86e9c8f07f9a7b$var$insert(state, 0, ...values));
127
- },
128
- append(...values) {
129
- dispatch((state) => $0d86e9c8f07f9a7b$var$insert(state, state.items.length, ...values));
130
- },
131
- remove(...keys) {
132
- dispatch((state) => {
133
- let keySet = new Set(keys);
134
- let items = state.items.filter((item) => !keySet.has(getKey(item)));
135
- let selection = "all";
136
- if (state.selectedKeys !== "all") {
137
- selection = new Set(state.selectedKeys);
138
- for (let key of keys) selection.delete(key);
139
- }
140
- if (cursor == null && items.length === 0) selection = /* @__PURE__ */ new Set();
141
- return __spreadProps(__spreadValues({}, state), {
142
- items,
143
- selectedKeys: selection
144
- });
145
- });
146
- },
147
- removeSelectedItems() {
148
- dispatch((state) => {
149
- if (state.selectedKeys === "all") return __spreadProps(__spreadValues({}, state), {
150
- items: [],
151
- selectedKeys: /* @__PURE__ */ new Set()
152
- });
153
- let selectedKeys = state.selectedKeys;
154
- let items = state.items.filter((item) => !selectedKeys.has(getKey(item)));
155
- return __spreadProps(__spreadValues({}, state), {
156
- items,
157
- selectedKeys: /* @__PURE__ */ new Set()
158
- });
159
- });
160
- },
161
- move(key, toIndex) {
162
- dispatch((state) => {
163
- let index2 = state.items.findIndex((item2) => getKey(item2) === key);
164
- if (index2 === -1) return state;
165
- let copy = state.items.slice();
166
- let [item] = copy.splice(index2, 1);
167
- copy.splice(toIndex, 0, item);
168
- return __spreadProps(__spreadValues({}, state), {
169
- items: copy
170
- });
171
- });
172
- },
173
- moveBefore(key, keys) {
174
- dispatch((state) => {
175
- let toIndex = state.items.findIndex((item) => getKey(item) === key);
176
- if (toIndex === -1) return state;
177
- let keyArray = Array.isArray(keys) ? keys : [
178
- ...keys
179
- ];
180
- let indices = keyArray.map((key2) => state.items.findIndex((item) => getKey(item) === key2)).sort((a, b) => a - b);
181
- return $0d86e9c8f07f9a7b$var$move(state, indices, toIndex);
182
- });
183
- },
184
- moveAfter(key, keys) {
185
- dispatch((state) => {
186
- let toIndex = state.items.findIndex((item) => getKey(item) === key);
187
- if (toIndex === -1) return state;
188
- let keyArray = Array.isArray(keys) ? keys : [
189
- ...keys
190
- ];
191
- let indices = keyArray.map((key2) => state.items.findIndex((item) => getKey(item) === key2)).sort((a, b) => a - b);
192
- return $0d86e9c8f07f9a7b$var$move(state, indices, toIndex + 1);
193
- });
194
- },
195
- update(key, newValue) {
196
- dispatch((state) => {
197
- let index2 = state.items.findIndex((item) => getKey(item) === key);
198
- if (index2 === -1) return state;
199
- return __spreadProps(__spreadValues({}, state), {
200
- items: [
201
- ...state.items.slice(0, index2),
202
- newValue,
203
- ...state.items.slice(index2 + 1)
204
- ]
205
- });
206
- });
207
- }
208
- };
209
- }
210
- function $0d86e9c8f07f9a7b$var$insert(state, index2, ...values) {
211
- return __spreadProps(__spreadValues({}, state), {
212
- items: [
213
- ...state.items.slice(0, index2),
214
- ...values,
215
- ...state.items.slice(index2)
216
- ]
217
- });
218
- }
219
- function $0d86e9c8f07f9a7b$var$move(state, indices, toIndex) {
220
- toIndex -= indices.filter((index2) => index2 < toIndex).length;
221
- let moves = indices.map((from) => ({
222
- from,
223
- to: toIndex++
224
- }));
225
- for (let i = 0; i < moves.length; i++) {
226
- let a = moves[i].from;
227
- for (let j = i; j < moves.length; j++) {
228
- let b = moves[j].from;
229
- if (b > a) moves[j].from--;
230
- }
231
- }
232
- for (let i = 0; i < moves.length; i++) {
233
- let a = moves[i];
234
- for (let j = moves.length - 1; j > i; j--) {
235
- let b = moves[j];
236
- if (b.from < a.to) a.to++;
237
- else b.from++;
238
- }
239
- }
240
- let copy = state.items.slice();
241
- for (let move of moves) {
242
- let [item] = copy.splice(move.from, 1);
243
- copy.splice(move.to, 0, item);
244
- }
245
- return __spreadProps(__spreadValues({}, state), {
246
- items: copy
247
- });
248
- }
249
- const $ce9b18daab526bbd$export$5b9bb410392e3991 = /* @__PURE__ */ new WeakMap();
250
- function $ce9b18daab526bbd$export$f45c25170b9a99c2(state, key) {
251
- var _listMap_get;
252
- let { id } = (_listMap_get = $ce9b18daab526bbd$export$5b9bb410392e3991.get(state)) !== null && _listMap_get !== void 0 ? _listMap_get : {};
253
- if (!id) throw new Error("Unknown list");
254
- return `${id}-${$ce9b18daab526bbd$export$e0c709538cb8ae18(key)}`;
255
- }
256
- function $ce9b18daab526bbd$export$e0c709538cb8ae18(key) {
257
- if (typeof key === "string") return key.replace(/\s*/g, "");
258
- return "" + key;
259
- }
260
- function $f47efb0c3a859cf2$export$664f9155035607eb(props, state, ref) {
261
- let { isVirtualized, keyboardDelegate, layoutDelegate, onAction, linkBehavior = "action", keyboardNavigationBehavior = "arrow" } = props;
262
- if (!props["aria-label"] && !props["aria-labelledby"]) console.warn("An aria-label or aria-labelledby prop is required for accessibility.");
263
- let { listProps } = useSelectableList.$982254629710d113$export$b95089534ab7c1fd({
264
- selectionManager: state.selectionManager,
265
- collection: state.collection,
266
- disabledKeys: state.disabledKeys,
267
- ref,
268
- keyboardDelegate,
269
- layoutDelegate,
270
- isVirtualized,
271
- selectOnFocus: state.selectionManager.selectionBehavior === "replace",
272
- shouldFocusWrap: props.shouldFocusWrap,
273
- linkBehavior
274
- });
275
- let id = mergeProps.$bdb11010cef70236$export$f680877a34711e37(props.id);
276
- $ce9b18daab526bbd$export$5b9bb410392e3991.set(state, {
277
- id,
278
- onAction,
279
- linkBehavior,
280
- keyboardNavigationBehavior
281
- });
282
- let descriptionProps = useHighlightSelectionDescription.$5b9b5b5723db6ae1$export$be42ebdab07ae4c2({
283
- selectionManager: state.selectionManager,
284
- hasItemActions: !!onAction
285
- });
286
- let hasTabbableChild = useHasTabbableChild.$83013635b024ae3d$export$eac1895992b9f3d6(ref, {
287
- isDisabled: state.collection.size !== 0
288
- });
289
- let domProps = filterDOMProps.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
290
- labelable: true
291
- });
292
- let gridProps = mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(
293
- domProps,
294
- {
295
- role: "grid",
296
- id,
297
- "aria-multiselectable": state.selectionManager.selectionMode === "multiple" ? "true" : void 0
298
- },
299
- // If collection is empty, make sure the grid is tabbable unless there is a child tabbable element.
300
- state.collection.size === 0 ? {
301
- tabIndex: hasTabbableChild ? -1 : 0
302
- } : listProps,
303
- descriptionProps
304
- );
305
- if (isVirtualized) {
306
- gridProps["aria-rowcount"] = state.collection.size;
307
- gridProps["aria-colcount"] = 1;
308
- }
309
- useHighlightSelectionDescription.$92599c3fd427b763$export$137e594ef3218a10({}, state);
310
- return {
311
- gridProps
312
- };
313
- }
314
- const $4e8b0456ef72939f$var$EXPANSION_KEYS = {
315
- "expand": {
316
- ltr: "ArrowRight",
317
- rtl: "ArrowLeft"
318
- },
319
- "collapse": {
320
- ltr: "ArrowLeft",
321
- rtl: "ArrowRight"
322
- }
323
- };
324
- function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
325
- var _node_props, _node_props1;
326
- let { node, isVirtualized, shouldSelectOnPressUp } = props;
327
- let { direction } = context.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
328
- let { onAction, linkBehavior, keyboardNavigationBehavior } = $ce9b18daab526bbd$export$5b9bb410392e3991.get(state);
329
- let descriptionId = mergeProps.$bdb11010cef70236$export$b4cc09c592e8fdb8();
330
- let keyWhenFocused = React.useRef(null);
331
- let focus = () => {
332
- var _ref_current;
333
- if (ref.current !== null && (keyWhenFocused.current != null && node.key !== keyWhenFocused.current || !((_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.contains(document.activeElement)))) focusSafely.$6a99195332edec8b$export$80f3e147d781571c(ref.current);
334
- };
335
- let treeGridRowProps = {};
336
- let hasChildRows;
337
- let hasLink = state.selectionManager.isLink(node.key);
338
- if (node != null && "expandedKeys" in state) {
339
- var _state_collection_getChildren, _state_collection, _filter_at;
340
- let children = (_state_collection_getChildren = (_state_collection = state.collection).getChildren) === null || _state_collection_getChildren === void 0 ? void 0 : _state_collection_getChildren.call(_state_collection, node.key);
341
- hasChildRows = [
342
- ...children !== null && children !== void 0 ? children : []
343
- ].length > 1;
344
- if (onAction == null && !hasLink && state.selectionManager.selectionMode === "none" && hasChildRows) onAction = () => state.toggleKey(node.key);
345
- let isExpanded = hasChildRows ? state.expandedKeys.has(node.key) : void 0;
346
- let setSize = 1;
347
- var _filter_at_index;
348
- if (node.level > 0 && (node === null || node === void 0 ? void 0 : node.parentKey) != null) {
349
- let parent = state.collection.getItem(node.parentKey);
350
- if (parent) {
351
- var _state_collection_getChildren1, _state_collection1;
352
- let siblings = (_state_collection_getChildren1 = (_state_collection1 = state.collection).getChildren) === null || _state_collection_getChildren1 === void 0 ? void 0 : _state_collection_getChildren1.call(_state_collection1, parent.key);
353
- setSize = SelectionManager.$c5a24bc478652b5f$export$7475b2c64539e4cf(siblings).index + 1;
354
- }
355
- } else setSize = ((_filter_at_index = (_filter_at = [
356
- ...state.collection
357
- ].filter((row) => row.level === 0).at(-1)) === null || _filter_at === void 0 ? void 0 : _filter_at.index) !== null && _filter_at_index !== void 0 ? _filter_at_index : 0) + 1;
358
- treeGridRowProps = {
359
- "aria-expanded": isExpanded,
360
- "aria-level": node.level + 1,
361
- "aria-posinset": (node === null || node === void 0 ? void 0 : node.index) + 1,
362
- "aria-setsize": setSize
363
- };
364
- }
365
- let _a = useSelectableItem.$880e95eb8b93ba9a$export$ecf600387e221c37({
366
- selectionManager: state.selectionManager,
367
- key: node.key,
368
- ref,
369
- isVirtualized,
370
- shouldSelectOnPressUp,
371
- onAction: onAction || ((_node_props = node.props) === null || _node_props === void 0 ? void 0 : _node_props.onAction) ? mergeProps.$ff5963eb1fccf552$export$e08e3b67e392101e((_node_props1 = node.props) === null || _node_props1 === void 0 ? void 0 : _node_props1.onAction, onAction ? () => onAction(node.key) : void 0) : void 0,
372
- focus,
373
- linkBehavior
374
- }), { itemProps } = _a, itemStates = __objRest(_a, ["itemProps"]);
375
- let onKeyDown = (e) => {
376
- if (!e.currentTarget.contains(e.target) || !ref.current || !document.activeElement) return;
377
- let walker = FocusScope.$9bf71ea28793e738$export$2d6ec8fc375ceafa(ref.current);
378
- walker.currentNode = document.activeElement;
379
- if ("expandedKeys" in state && document.activeElement === ref.current) {
380
- if (e.key === $4e8b0456ef72939f$var$EXPANSION_KEYS["expand"][direction] && state.selectionManager.focusedKey === node.key && hasChildRows && !state.expandedKeys.has(node.key)) {
381
- state.toggleKey(node.key);
382
- e.stopPropagation();
383
- return;
384
- } else if (e.key === $4e8b0456ef72939f$var$EXPANSION_KEYS["collapse"][direction] && state.selectionManager.focusedKey === node.key && hasChildRows && state.expandedKeys.has(node.key)) {
385
- state.toggleKey(node.key);
386
- e.stopPropagation();
387
- return;
388
- }
389
- }
390
- switch (e.key) {
391
- case "ArrowLeft":
392
- if (keyboardNavigationBehavior === "arrow") {
393
- let focusable = direction === "rtl" ? walker.nextNode() : walker.previousNode();
394
- if (focusable) {
395
- e.preventDefault();
396
- e.stopPropagation();
397
- focusSafely.$6a99195332edec8b$export$80f3e147d781571c(focusable);
398
- scrollIntoView.$2f04cbc44ee30ce0$export$c826860796309d1b(focusable, {
399
- containingElement: getScrollParent.$62d8ded9296f3872$export$cfa2225e87938781(ref.current)
400
- });
401
- } else {
402
- e.preventDefault();
403
- e.stopPropagation();
404
- if (direction === "rtl") {
405
- focusSafely.$6a99195332edec8b$export$80f3e147d781571c(ref.current);
406
- scrollIntoView.$2f04cbc44ee30ce0$export$c826860796309d1b(ref.current, {
407
- containingElement: getScrollParent.$62d8ded9296f3872$export$cfa2225e87938781(ref.current)
408
- });
409
- } else {
410
- walker.currentNode = ref.current;
411
- let lastElement = $4e8b0456ef72939f$var$last(walker);
412
- if (lastElement) {
413
- focusSafely.$6a99195332edec8b$export$80f3e147d781571c(lastElement);
414
- scrollIntoView.$2f04cbc44ee30ce0$export$c826860796309d1b(lastElement, {
415
- containingElement: getScrollParent.$62d8ded9296f3872$export$cfa2225e87938781(ref.current)
416
- });
417
- }
418
- }
419
- }
420
- }
421
- break;
422
- case "ArrowRight":
423
- if (keyboardNavigationBehavior === "arrow") {
424
- let focusable = direction === "rtl" ? walker.previousNode() : walker.nextNode();
425
- if (focusable) {
426
- e.preventDefault();
427
- e.stopPropagation();
428
- focusSafely.$6a99195332edec8b$export$80f3e147d781571c(focusable);
429
- scrollIntoView.$2f04cbc44ee30ce0$export$c826860796309d1b(focusable, {
430
- containingElement: getScrollParent.$62d8ded9296f3872$export$cfa2225e87938781(ref.current)
431
- });
432
- } else {
433
- e.preventDefault();
434
- e.stopPropagation();
435
- if (direction === "ltr") {
436
- focusSafely.$6a99195332edec8b$export$80f3e147d781571c(ref.current);
437
- scrollIntoView.$2f04cbc44ee30ce0$export$c826860796309d1b(ref.current, {
438
- containingElement: getScrollParent.$62d8ded9296f3872$export$cfa2225e87938781(ref.current)
439
- });
440
- } else {
441
- walker.currentNode = ref.current;
442
- let lastElement = $4e8b0456ef72939f$var$last(walker);
443
- if (lastElement) {
444
- focusSafely.$6a99195332edec8b$export$80f3e147d781571c(lastElement);
445
- scrollIntoView.$2f04cbc44ee30ce0$export$c826860796309d1b(lastElement, {
446
- containingElement: getScrollParent.$62d8ded9296f3872$export$cfa2225e87938781(ref.current)
447
- });
448
- }
449
- }
450
- }
451
- }
452
- break;
453
- case "ArrowUp":
454
- case "ArrowDown":
455
- if (!e.altKey && ref.current.contains(e.target)) {
456
- var _ref_current_parentElement;
457
- e.stopPropagation();
458
- e.preventDefault();
459
- (_ref_current_parentElement = ref.current.parentElement) === null || _ref_current_parentElement === void 0 ? void 0 : _ref_current_parentElement.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent));
460
- }
461
- break;
462
- case "Tab":
463
- if (keyboardNavigationBehavior === "tab") {
464
- let walker2 = FocusScope.$9bf71ea28793e738$export$2d6ec8fc375ceafa(ref.current, {
465
- tabbable: true
466
- });
467
- walker2.currentNode = document.activeElement;
468
- let next = e.shiftKey ? walker2.previousNode() : walker2.nextNode();
469
- if (next) e.stopPropagation();
470
- }
471
- }
472
- };
473
- let onFocus = (e) => {
474
- keyWhenFocused.current = node.key;
475
- if (e.target !== ref.current) {
476
- if (!useFocusVisible.$507fabe10e71c6fb$export$b9b3dfddab17db27()) state.selectionManager.setFocusedKey(node.key);
477
- return;
478
- }
479
- };
480
- let syntheticLinkProps = usePress.$ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6(node.props);
481
- let linkProps = itemStates.hasAction ? syntheticLinkProps : {};
482
- let rowProps = mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(itemProps, linkProps, {
483
- role: "row",
484
- onKeyDownCapture: onKeyDown,
485
- onFocus,
486
- // 'aria-label': [(node.textValue || undefined), rowAnnouncement].filter(Boolean).join(', '),
487
- "aria-label": node.textValue || void 0,
488
- "aria-selected": state.selectionManager.canSelectItem(node.key) ? state.selectionManager.isSelected(node.key) : void 0,
489
- "aria-disabled": state.selectionManager.isDisabled(node.key) || void 0,
490
- "aria-labelledby": descriptionId && node.textValue ? `${$ce9b18daab526bbd$export$f45c25170b9a99c2(state, node.key)} ${descriptionId}` : void 0,
491
- id: $ce9b18daab526bbd$export$f45c25170b9a99c2(state, node.key)
492
- });
493
- if (isVirtualized) rowProps["aria-rowindex"] = node.index + 1;
494
- let gridCellProps = {
495
- role: "gridcell",
496
- "aria-colindex": 1
497
- };
498
- return __spreadValues({
499
- rowProps: __spreadValues({}, mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(rowProps, treeGridRowProps)),
500
- gridCellProps,
501
- descriptionProps: {
502
- id: descriptionId
503
- }
504
- }, itemStates);
505
- }
506
- function $4e8b0456ef72939f$var$last(walker) {
507
- let next = null;
508
- let last = null;
509
- do {
510
- last = walker.lastChild();
511
- if (last) next = last;
512
- } while (last);
513
- return next;
514
- }
515
- const $d7323bca8d074eeb$export$653eddfc964b0f8a = /* @__PURE__ */ new WeakMap();
516
- function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props, state, ref) {
517
- let { direction } = context.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
518
- let keyboardDelegate = props.keyboardDelegate || new useSelectableList.$2a25aae57d74318e$export$a05409b8bb224a5a({
519
- collection: state.collection,
520
- ref,
521
- orientation: "horizontal",
522
- direction,
523
- disabledKeys: state.disabledKeys,
524
- disabledBehavior: state.selectionManager.disabledBehavior
525
- });
526
- let { labelProps, fieldProps, descriptionProps, errorMessageProps } = useField.$2baaea4c71418dea$export$294aa081a6c6f55d(__spreadProps(__spreadValues({}, props), {
527
- labelElementType: "span"
528
- }));
529
- let { gridProps } = $f47efb0c3a859cf2$export$664f9155035607eb(__spreadProps(__spreadValues(__spreadValues({}, props), fieldProps), {
530
- keyboardDelegate,
531
- shouldFocusWrap: true,
532
- linkBehavior: "override"
533
- }), state, ref);
534
- let [isFocusWithin, setFocusWithin] = React.useState(false);
535
- let { focusWithinProps } = useFocusWithin.$9ab94262bd0047c7$export$420e68273165f4ec({
536
- onFocusWithinChange: setFocusWithin
537
- });
538
- let domProps = filterDOMProps.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props);
539
- let prevCount = React.useRef(state.collection.size);
540
- React.useEffect(() => {
541
- if (ref.current && prevCount.current > 0 && state.collection.size === 0 && isFocusWithin) ref.current.focus();
542
- prevCount.current = state.collection.size;
543
- }, [
544
- state.collection.size,
545
- isFocusWithin,
546
- ref
547
- ]);
548
- $d7323bca8d074eeb$export$653eddfc964b0f8a.set(state, {
549
- onRemove: props.onRemove
550
- });
551
- return {
552
- gridProps: mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(gridProps, domProps, __spreadValues(__spreadValues({
553
- role: state.collection.size ? "grid" : null,
554
- "aria-atomic": false,
555
- "aria-relevant": "additions",
556
- "aria-live": isFocusWithin ? "polite" : "off"
557
- }, focusWithinProps), fieldProps)),
558
- labelProps,
559
- descriptionProps,
560
- errorMessageProps
561
- };
562
- }
563
- var $84925f526f90eebd$exports = {};
564
- $84925f526f90eebd$exports = {
565
- "removeButtonLabel": `إزالة`,
566
- "removeDescription": `اضغط على مفتاح DELETE لإزالة علامة.`
567
- };
568
- var $c0650163dc1b6f9d$exports = {};
569
- $c0650163dc1b6f9d$exports = {
570
- "removeButtonLabel": `Премахване`,
571
- "removeDescription": `Натиснете Delete, за да премахнете маркера.`
572
- };
573
- var $b2b55661291de587$exports = {};
574
- $b2b55661291de587$exports = {
575
- "removeButtonLabel": `Odebrat`,
576
- "removeDescription": `Stisknutím klávesy Delete odeberete značku.`
577
- };
578
- var $deb83970956f6d5b$exports = {};
579
- $deb83970956f6d5b$exports = {
580
- "removeButtonLabel": `Fjern`,
581
- "removeDescription": `Tryk på Slet for at fjerne tag.`
582
- };
583
- var $aea1cb4c7ec97e1c$exports = {};
584
- $aea1cb4c7ec97e1c$exports = {
585
- "removeButtonLabel": `Entfernen`,
586
- "removeDescription": `Auf „Löschen“ drücken, um das Tag zu entfernen.`
587
- };
588
- var $3618d917e503a8d3$exports = {};
589
- $3618d917e503a8d3$exports = {
590
- "removeButtonLabel": `Κατάργηση`,
591
- "removeDescription": `Πατήστε Διαγραφή για να καταργήσετε την ετικέτα.`
592
- };
593
- var $9eb56bbbe8e31294$exports = {};
594
- $9eb56bbbe8e31294$exports = {
595
- "removeDescription": `Press Delete to remove tag.`,
596
- "removeButtonLabel": `Remove`
597
- };
598
- var $361c604b0fc269a3$exports = {};
599
- $361c604b0fc269a3$exports = {
600
- "removeButtonLabel": `Quitar`,
601
- "removeDescription": `Pulse Eliminar para quitar la etiqueta.`
602
- };
603
- var $2f00170f4ee3ca01$exports = {};
604
- $2f00170f4ee3ca01$exports = {
605
- "removeButtonLabel": `Eemalda`,
606
- "removeDescription": `Sildi eemaldamiseks vajutage kustutusklahvi Delete.`
607
- };
608
- var $80ee16b64fab9fb5$exports = {};
609
- $80ee16b64fab9fb5$exports = {
610
- "removeButtonLabel": `Poista`,
611
- "removeDescription": `Poista tunniste painamalla Poista-painiketta.`
612
- };
613
- var $be9d354476c08087$exports = {};
614
- $be9d354476c08087$exports = {
615
- "removeButtonLabel": `Supprimer`,
616
- "removeDescription": `Appuyez sur Supprimer pour supprimer l’étiquette.`
617
- };
618
- var $ffeb903ba092eb35$exports = {};
619
- $ffeb903ba092eb35$exports = {
620
- "removeButtonLabel": `הסר`,
621
- "removeDescription": `לחץ על מחק כדי להסיר תג.`
622
- };
623
- var $1df6722c6f19728b$exports = {};
624
- $1df6722c6f19728b$exports = {
625
- "removeButtonLabel": `Ukloni`,
626
- "removeDescription": `Pritisnite Delete za uklanjanje oznake.`
627
- };
628
- var $093d57e325bc9071$exports = {};
629
- $093d57e325bc9071$exports = {
630
- "removeButtonLabel": `Eltávolítás`,
631
- "removeDescription": `Nyomja meg a Delete billentyűt a címke eltávolításához.`
632
- };
633
- var $609dbdfbcad85bdb$exports = {};
634
- $609dbdfbcad85bdb$exports = {
635
- "removeButtonLabel": `Rimuovi`,
636
- "removeDescription": `Premi Elimina per rimuovere il tag.`
637
- };
638
- var $c08e84f882644048$exports = {};
639
- $c08e84f882644048$exports = {
640
- "removeButtonLabel": `削除`,
641
- "removeDescription": `タグを削除するには、Delete キーを押します。`
642
- };
643
- var $5cd130489822fa21$exports = {};
644
- $5cd130489822fa21$exports = {
645
- "removeButtonLabel": `제거`,
646
- "removeDescription": `태그를 제거하려면 Delete 키를 누르십시오.`
647
- };
648
- var $ab5183739b6c5e7e$exports = {};
649
- $ab5183739b6c5e7e$exports = {
650
- "removeButtonLabel": `Pašalinti`,
651
- "removeDescription": `Norėdami pašalinti žymą, paspauskite „Delete“ klavišą.`
652
- };
653
- var $dd84a0b574be3f23$exports = {};
654
- $dd84a0b574be3f23$exports = {
655
- "removeButtonLabel": `Noņemt`,
656
- "removeDescription": `Nospiediet Delete [Dzēst], lai noņemtu tagu.`
657
- };
658
- var $85eee97d14eef7b5$exports = {};
659
- $85eee97d14eef7b5$exports = {
660
- "removeButtonLabel": `Fjern`,
661
- "removeDescription": `Trykk på Slett for å fjerne taggen.`
662
- };
663
- var $18781839f93b0314$exports = {};
664
- $18781839f93b0314$exports = {
665
- "removeButtonLabel": `Verwijderen`,
666
- "removeDescription": `Druk op Verwijderen om de tag te verwijderen.`
667
- };
668
- var $1c40ffbbfe9f3bda$exports = {};
669
- $1c40ffbbfe9f3bda$exports = {
670
- "removeButtonLabel": `Usuń`,
671
- "removeDescription": `Naciśnij Usuń, aby usunąć znacznik.`
672
- };
673
- var $156880e329b1c717$exports = {};
674
- $156880e329b1c717$exports = {
675
- "removeButtonLabel": `Remover`,
676
- "removeDescription": `Pressione Delete para remover a tag.`
677
- };
678
- var $b6d50b1d20768ce4$exports = {};
679
- $b6d50b1d20768ce4$exports = {
680
- "removeButtonLabel": `Eliminar`,
681
- "removeDescription": `Prima Delete para eliminar a tag.`
682
- };
683
- var $d8c38c691b006187$exports = {};
684
- $d8c38c691b006187$exports = {
685
- "removeButtonLabel": `Îndepărtaţi`,
686
- "removeDescription": `Apăsați pe Delete (Ștergere) pentru a elimina eticheta.`
687
- };
688
- var $ed9b4bf7ce1fb1d7$exports = {};
689
- $ed9b4bf7ce1fb1d7$exports = {
690
- "removeButtonLabel": `Удалить`,
691
- "removeDescription": `Нажмите DELETE, чтобы удалить тег.`
692
- };
693
- var $51d8721afda4d678$exports = {};
694
- $51d8721afda4d678$exports = {
695
- "removeButtonLabel": `Odstrániť`,
696
- "removeDescription": `Ak chcete odstrániť značku, stlačte kláves Delete.`
697
- };
698
- var $fd37a27baae493e8$exports = {};
699
- $fd37a27baae493e8$exports = {
700
- "removeButtonLabel": `Odstrani`,
701
- "removeDescription": `Pritisnite Delete, da odstranite oznako.`
702
- };
703
- var $5505a1ca71ffd6f4$exports = {};
704
- $5505a1ca71ffd6f4$exports = {
705
- "removeButtonLabel": `Ukloni`,
706
- "removeDescription": `Pritisnite Obriši da biste uklonili oznaku.`
707
- };
708
- var $33670e148c84ad02$exports = {};
709
- $33670e148c84ad02$exports = {
710
- "removeButtonLabel": `Ta bort`,
711
- "removeDescription": `Tryck på Radera för att ta bort taggen.`
712
- };
713
- var $0bf46fdcdd7cb5f6$exports = {};
714
- $0bf46fdcdd7cb5f6$exports = {
715
- "removeButtonLabel": `Kaldır`,
716
- "removeDescription": `Etiketi kaldırmak için Sil tuşuna basın.`
717
- };
718
- var $9d9765222bc08ca2$exports = {};
719
- $9d9765222bc08ca2$exports = {
720
- "removeButtonLabel": `Вилучити`,
721
- "removeDescription": `Натисніть Delete, щоб вилучити тег.`
722
- };
723
- var $d737296cedcdee9f$exports = {};
724
- $d737296cedcdee9f$exports = {
725
- "removeButtonLabel": `删除`,
726
- "removeDescription": `按下“删除”以删除标记。`
727
- };
728
- var $09cd168ab18773f4$exports = {};
729
- $09cd168ab18773f4$exports = {
730
- "removeButtonLabel": `移除`,
731
- "removeDescription": `按 Delete 鍵以移除標記。`
732
- };
733
- var $3bb15cc24d006ec5$exports = {};
734
- $3bb15cc24d006ec5$exports = {
735
- "ar-AE": $84925f526f90eebd$exports,
736
- "bg-BG": $c0650163dc1b6f9d$exports,
737
- "cs-CZ": $b2b55661291de587$exports,
738
- "da-DK": $deb83970956f6d5b$exports,
739
- "de-DE": $aea1cb4c7ec97e1c$exports,
740
- "el-GR": $3618d917e503a8d3$exports,
741
- "en-US": $9eb56bbbe8e31294$exports,
742
- "es-ES": $361c604b0fc269a3$exports,
743
- "et-EE": $2f00170f4ee3ca01$exports,
744
- "fi-FI": $80ee16b64fab9fb5$exports,
745
- "fr-FR": $be9d354476c08087$exports,
746
- "he-IL": $ffeb903ba092eb35$exports,
747
- "hr-HR": $1df6722c6f19728b$exports,
748
- "hu-HU": $093d57e325bc9071$exports,
749
- "it-IT": $609dbdfbcad85bdb$exports,
750
- "ja-JP": $c08e84f882644048$exports,
751
- "ko-KR": $5cd130489822fa21$exports,
752
- "lt-LT": $ab5183739b6c5e7e$exports,
753
- "lv-LV": $dd84a0b574be3f23$exports,
754
- "nb-NO": $85eee97d14eef7b5$exports,
755
- "nl-NL": $18781839f93b0314$exports,
756
- "pl-PL": $1c40ffbbfe9f3bda$exports,
757
- "pt-BR": $156880e329b1c717$exports,
758
- "pt-PT": $b6d50b1d20768ce4$exports,
759
- "ro-RO": $d8c38c691b006187$exports,
760
- "ru-RU": $ed9b4bf7ce1fb1d7$exports,
761
- "sk-SK": $51d8721afda4d678$exports,
762
- "sl-SI": $fd37a27baae493e8$exports,
763
- "sr-SP": $5505a1ca71ffd6f4$exports,
764
- "sv-SE": $33670e148c84ad02$exports,
765
- "tr-TR": $0bf46fdcdd7cb5f6$exports,
766
- "uk-UA": $9d9765222bc08ca2$exports,
767
- "zh-CN": $d737296cedcdee9f$exports,
768
- "zh-TW": $09cd168ab18773f4$exports
769
- };
770
- function $parcel$interopDefault(a) {
771
- return a && a.__esModule ? a.default : a;
772
- }
773
- function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
774
- let { item } = props;
775
- let stringFormatter = useLocalizedStringFormatter.$fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($3bb15cc24d006ec5$exports), "@react-aria/tag");
776
- let buttonId = mergeProps.$bdb11010cef70236$export$f680877a34711e37();
777
- let { onRemove } = $d7323bca8d074eeb$export$653eddfc964b0f8a.get(state) || {};
778
- let _a = $4e8b0456ef72939f$export$9610e69494fadfd2({
779
- node: item
780
- }, state, ref), { rowProps, gridCellProps } = _a, states = __objRest(_a, ["rowProps", "gridCellProps"]);
781
- delete rowProps.onKeyDownCapture;
782
- let _b = states, { descriptionProps: _ } = _b, stateWithoutDescription = __objRest(_b, ["descriptionProps"]);
783
- let onKeyDown = (e) => {
784
- if (e.key === "Delete" || e.key === "Backspace") {
785
- e.preventDefault();
786
- if (state.selectionManager.isSelected(item.key)) onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set(state.selectionManager.selectedKeys));
787
- else onRemove === null || onRemove === void 0 ? void 0 : onRemove(/* @__PURE__ */ new Set([
788
- item.key
789
- ]));
790
- }
791
- };
792
- let modality = useFocusVisible.$507fabe10e71c6fb$export$98e20ec92f614cfe();
793
- if (modality === "virtual" && typeof window !== "undefined" && "ontouchstart" in window) modality = "pointer";
794
- let description = onRemove && (modality === "keyboard" || modality === "virtual") ? stringFormatter.format("removeDescription") : "";
795
- let descProps = scrollIntoView.$ef06256079686ba0$export$f8aeda7b10753fa1(description);
796
- let isFocused = item.key === state.selectionManager.focusedKey;
797
- let domProps = filterDOMProps.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(item.props);
798
- let linkProps = usePress.$ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6(item.props);
799
- return __spreadProps(__spreadValues({
800
- removeButtonProps: {
801
- "aria-label": stringFormatter.format("removeButtonLabel"),
802
- "aria-labelledby": `${buttonId} ${rowProps.id}`,
803
- isDisabled: state.disabledKeys.has(item.key) || item.props.isDisabled,
804
- id: buttonId,
805
- onPress: () => onRemove ? onRemove(/* @__PURE__ */ new Set([
806
- item.key
807
- ])) : null,
808
- excludeFromTabOrder: true
809
- },
810
- rowProps: mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(rowProps, domProps, linkProps, {
811
- tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1,
812
- onKeyDown: onRemove ? onKeyDown : void 0,
813
- "aria-describedby": descProps["aria-describedby"]
814
- }),
815
- gridCellProps: mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(gridCellProps, {
816
- "aria-errormessage": props["aria-errormessage"],
817
- "aria-label": props["aria-label"]
818
- })
819
- }, stateWithoutDescription), {
820
- allowsRemoving: !!onRemove
821
- });
822
- }
823
- class $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
824
- get childNodes() {
825
- throw new Error("childNodes is not supported");
826
- }
827
- clone() {
828
- let node = new $23b9f4fcf0fe224b$export$d68d59712b04d9d1(this.type, this.key);
829
- node.value = this.value;
830
- node.level = this.level;
831
- node.hasChildNodes = this.hasChildNodes;
832
- node.rendered = this.rendered;
833
- node.textValue = this.textValue;
834
- node["aria-label"] = this["aria-label"];
835
- node.index = this.index;
836
- node.parentKey = this.parentKey;
837
- node.prevKey = this.prevKey;
838
- node.nextKey = this.nextKey;
839
- node.firstChildKey = this.firstChildKey;
840
- node.lastChildKey = this.lastChildKey;
841
- node.props = this.props;
842
- node.render = this.render;
843
- return node;
844
- }
845
- constructor(type, key) {
846
- this.value = null;
847
- this.level = 0;
848
- this.hasChildNodes = false;
849
- this.rendered = null;
850
- this.textValue = "";
851
- this["aria-label"] = void 0;
852
- this.index = 0;
853
- this.parentKey = null;
854
- this.prevKey = null;
855
- this.nextKey = null;
856
- this.firstChildKey = null;
857
- this.lastChildKey = null;
858
- this.props = {};
859
- this.type = type;
860
- this.key = key;
861
- }
862
- }
863
- class $23b9f4fcf0fe224b$export$408d25a4e12db025 {
864
- get size() {
865
- return this.keyMap.size;
866
- }
867
- getKeys() {
868
- return this.keyMap.keys();
869
- }
870
- *[Symbol.iterator]() {
871
- let node = this.firstKey != null ? this.keyMap.get(this.firstKey) : void 0;
872
- while (node) {
873
- yield node;
874
- node = node.nextKey != null ? this.keyMap.get(node.nextKey) : void 0;
875
- }
876
- }
877
- getChildren(key) {
878
- let keyMap = this.keyMap;
879
- return {
880
- *[Symbol.iterator]() {
881
- let parent = keyMap.get(key);
882
- let node = (parent === null || parent === void 0 ? void 0 : parent.firstChildKey) != null ? keyMap.get(parent.firstChildKey) : null;
883
- while (node) {
884
- yield node;
885
- node = node.nextKey != null ? keyMap.get(node.nextKey) : void 0;
886
- }
887
- }
888
- };
889
- }
890
- getKeyBefore(key) {
891
- let node = this.keyMap.get(key);
892
- if (!node) return null;
893
- if (node.prevKey != null) {
894
- node = this.keyMap.get(node.prevKey);
895
- while (node && node.type !== "item" && node.lastChildKey != null) node = this.keyMap.get(node.lastChildKey);
896
- var _node_key;
897
- return (_node_key = node === null || node === void 0 ? void 0 : node.key) !== null && _node_key !== void 0 ? _node_key : null;
898
- }
899
- return node.parentKey;
900
- }
901
- getKeyAfter(key) {
902
- let node = this.keyMap.get(key);
903
- if (!node) return null;
904
- if (node.type !== "item" && node.firstChildKey != null) return node.firstChildKey;
905
- while (node) {
906
- if (node.nextKey != null) return node.nextKey;
907
- if (node.parentKey != null) node = this.keyMap.get(node.parentKey);
908
- else return null;
909
- }
910
- return null;
911
- }
912
- getFirstKey() {
913
- return this.firstKey;
914
- }
915
- getLastKey() {
916
- let node = this.lastKey != null ? this.keyMap.get(this.lastKey) : null;
917
- while ((node === null || node === void 0 ? void 0 : node.lastChildKey) != null) node = this.keyMap.get(node.lastChildKey);
918
- var _node_key;
919
- return (_node_key = node === null || node === void 0 ? void 0 : node.key) !== null && _node_key !== void 0 ? _node_key : null;
920
- }
921
- getItem(key) {
922
- var _this_keyMap_get;
923
- return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== void 0 ? _this_keyMap_get : null;
924
- }
925
- at() {
926
- throw new Error("Not implemented");
927
- }
928
- clone() {
929
- let Constructor = this.constructor;
930
- let collection = new Constructor();
931
- collection.keyMap = new Map(this.keyMap);
932
- collection.firstKey = this.firstKey;
933
- collection.lastKey = this.lastKey;
934
- return collection;
935
- }
936
- addNode(node) {
937
- if (this.frozen) throw new Error("Cannot add a node to a frozen collection");
938
- this.keyMap.set(node.key, node);
939
- }
940
- removeNode(key) {
941
- if (this.frozen) throw new Error("Cannot remove a node to a frozen collection");
942
- this.keyMap.delete(key);
943
- }
944
- commit(firstKey, lastKey, isSSR = false) {
945
- if (this.frozen) throw new Error("Cannot commit a frozen collection");
946
- this.firstKey = firstKey;
947
- this.lastKey = lastKey;
948
- this.frozen = !isSSR;
949
- }
950
- constructor() {
951
- this.keyMap = /* @__PURE__ */ new Map();
952
- this.firstKey = null;
953
- this.lastKey = null;
954
- this.frozen = false;
955
- }
956
- }
957
- class $681cc3c98f569e39$export$410b0c854570d131 {
958
- *[Symbol.iterator]() {
959
- let node = this.firstChild;
960
- while (node) {
961
- yield node;
962
- node = node.nextSibling;
963
- }
964
- }
965
- get firstChild() {
966
- return this._firstChild;
967
- }
968
- set firstChild(firstChild) {
969
- this._firstChild = firstChild;
970
- this.ownerDocument.markDirty(this);
971
- }
972
- get lastChild() {
973
- return this._lastChild;
974
- }
975
- set lastChild(lastChild) {
976
- this._lastChild = lastChild;
977
- this.ownerDocument.markDirty(this);
978
- }
979
- get previousSibling() {
980
- return this._previousSibling;
981
- }
982
- set previousSibling(previousSibling) {
983
- this._previousSibling = previousSibling;
984
- this.ownerDocument.markDirty(this);
985
- }
986
- get nextSibling() {
987
- return this._nextSibling;
988
- }
989
- set nextSibling(nextSibling) {
990
- this._nextSibling = nextSibling;
991
- this.ownerDocument.markDirty(this);
992
- }
993
- get parentNode() {
994
- return this._parentNode;
995
- }
996
- set parentNode(parentNode) {
997
- this._parentNode = parentNode;
998
- this.ownerDocument.markDirty(this);
999
- }
1000
- get isConnected() {
1001
- var _this_parentNode;
1002
- return ((_this_parentNode = this.parentNode) === null || _this_parentNode === void 0 ? void 0 : _this_parentNode.isConnected) || false;
1003
- }
1004
- appendChild(child) {
1005
- this.ownerDocument.startTransaction();
1006
- if (child.parentNode) child.parentNode.removeChild(child);
1007
- if (this.firstChild == null) this.firstChild = child;
1008
- if (this.lastChild) {
1009
- this.lastChild.nextSibling = child;
1010
- child.index = this.lastChild.index + 1;
1011
- child.previousSibling = this.lastChild;
1012
- } else {
1013
- child.previousSibling = null;
1014
- child.index = 0;
1015
- }
1016
- child.parentNode = this;
1017
- child.nextSibling = null;
1018
- this.lastChild = child;
1019
- this.ownerDocument.markDirty(this);
1020
- if (child.hasSetProps)
1021
- this.ownerDocument.addNode(child);
1022
- this.ownerDocument.endTransaction();
1023
- this.ownerDocument.queueUpdate();
1024
- }
1025
- insertBefore(newNode, referenceNode) {
1026
- if (referenceNode == null) return this.appendChild(newNode);
1027
- this.ownerDocument.startTransaction();
1028
- if (newNode.parentNode) newNode.parentNode.removeChild(newNode);
1029
- newNode.nextSibling = referenceNode;
1030
- newNode.previousSibling = referenceNode.previousSibling;
1031
- newNode.index = referenceNode.index;
1032
- if (this.firstChild === referenceNode) this.firstChild = newNode;
1033
- else if (referenceNode.previousSibling) referenceNode.previousSibling.nextSibling = newNode;
1034
- referenceNode.previousSibling = newNode;
1035
- newNode.parentNode = referenceNode.parentNode;
1036
- let node = referenceNode;
1037
- while (node) {
1038
- node.index++;
1039
- node = node.nextSibling;
1040
- }
1041
- if (newNode.hasSetProps) this.ownerDocument.addNode(newNode);
1042
- this.ownerDocument.endTransaction();
1043
- this.ownerDocument.queueUpdate();
1044
- }
1045
- removeChild(child) {
1046
- if (child.parentNode !== this || !this.ownerDocument.isMounted) return;
1047
- this.ownerDocument.startTransaction();
1048
- let node = child.nextSibling;
1049
- while (node) {
1050
- node.index--;
1051
- node = node.nextSibling;
1052
- }
1053
- if (child.nextSibling) child.nextSibling.previousSibling = child.previousSibling;
1054
- if (child.previousSibling) child.previousSibling.nextSibling = child.nextSibling;
1055
- if (this.firstChild === child) this.firstChild = child.nextSibling;
1056
- if (this.lastChild === child) this.lastChild = child.previousSibling;
1057
- child.parentNode = null;
1058
- child.nextSibling = null;
1059
- child.previousSibling = null;
1060
- child.index = 0;
1061
- this.ownerDocument.removeNode(child);
1062
- this.ownerDocument.endTransaction();
1063
- this.ownerDocument.queueUpdate();
1064
- }
1065
- addEventListener() {
1066
- }
1067
- removeEventListener() {
1068
- }
1069
- constructor(ownerDocument) {
1070
- this._firstChild = null;
1071
- this._lastChild = null;
1072
- this._previousSibling = null;
1073
- this._nextSibling = null;
1074
- this._parentNode = null;
1075
- this.ownerDocument = ownerDocument;
1076
- }
1077
- }
1078
- class $681cc3c98f569e39$export$dc064fe9e59310fd extends $681cc3c98f569e39$export$410b0c854570d131 {
1079
- get index() {
1080
- return this._index;
1081
- }
1082
- set index(index2) {
1083
- this._index = index2;
1084
- this.ownerDocument.markDirty(this);
1085
- }
1086
- get level() {
1087
- if (this.parentNode instanceof $681cc3c98f569e39$export$dc064fe9e59310fd) return this.parentNode.level + (this.node.type === "item" ? 1 : 0);
1088
- return 0;
1089
- }
1090
- updateNode() {
1091
- var _this_previousSibling, _this_nextSibling, _this_firstChild, _this_lastChild;
1092
- let node = this.ownerDocument.getMutableNode(this);
1093
- node.index = this.index;
1094
- node.level = this.level;
1095
- node.parentKey = this.parentNode instanceof $681cc3c98f569e39$export$dc064fe9e59310fd ? this.parentNode.node.key : null;
1096
- var _this_previousSibling_node_key;
1097
- node.prevKey = (_this_previousSibling_node_key = (_this_previousSibling = this.previousSibling) === null || _this_previousSibling === void 0 ? void 0 : _this_previousSibling.node.key) !== null && _this_previousSibling_node_key !== void 0 ? _this_previousSibling_node_key : null;
1098
- var _this_nextSibling_node_key;
1099
- node.nextKey = (_this_nextSibling_node_key = (_this_nextSibling = this.nextSibling) === null || _this_nextSibling === void 0 ? void 0 : _this_nextSibling.node.key) !== null && _this_nextSibling_node_key !== void 0 ? _this_nextSibling_node_key : null;
1100
- node.hasChildNodes = !!this.firstChild;
1101
- var _this_firstChild_node_key;
1102
- node.firstChildKey = (_this_firstChild_node_key = (_this_firstChild = this.firstChild) === null || _this_firstChild === void 0 ? void 0 : _this_firstChild.node.key) !== null && _this_firstChild_node_key !== void 0 ? _this_firstChild_node_key : null;
1103
- var _this_lastChild_node_key;
1104
- node.lastChildKey = (_this_lastChild_node_key = (_this_lastChild = this.lastChild) === null || _this_lastChild === void 0 ? void 0 : _this_lastChild.node.key) !== null && _this_lastChild_node_key !== void 0 ? _this_lastChild_node_key : null;
1105
- }
1106
- setProps(obj, ref, rendered, render) {
1107
- let node = this.ownerDocument.getMutableNode(this);
1108
- let _a = obj, { value, textValue, id } = _a, props = __objRest(_a, ["value", "textValue", "id"]);
1109
- props.ref = ref;
1110
- node.props = props;
1111
- node.rendered = rendered;
1112
- node.render = render;
1113
- node.value = value;
1114
- node.textValue = textValue || (typeof props.children === "string" ? props.children : "") || obj["aria-label"] || "";
1115
- if (id != null && id !== node.key) {
1116
- if (this.hasSetProps) throw new Error("Cannot change the id of an item");
1117
- node.key = id;
1118
- }
1119
- if (!this.hasSetProps) {
1120
- this.ownerDocument.addNode(this);
1121
- this.ownerDocument.endTransaction();
1122
- this.hasSetProps = true;
1123
- }
1124
- this.ownerDocument.queueUpdate();
1125
- }
1126
- get style() {
1127
- return {};
1128
- }
1129
- hasAttribute() {
1130
- }
1131
- setAttribute() {
1132
- }
1133
- setAttributeNS() {
1134
- }
1135
- removeAttribute() {
1136
- }
1137
- constructor(type, ownerDocument) {
1138
- super(ownerDocument), this.nodeType = 8, this._index = 0, this.hasSetProps = false;
1139
- this.node = new $23b9f4fcf0fe224b$export$d68d59712b04d9d1(type, `react-aria-${++ownerDocument.nodeId}`);
1140
- this.ownerDocument.startTransaction();
1141
- }
1142
- }
1143
- class $681cc3c98f569e39$export$b34a105447964f9f extends $681cc3c98f569e39$export$410b0c854570d131 {
1144
- get isConnected() {
1145
- return this.isMounted;
1146
- }
1147
- createElement(type) {
1148
- return new $681cc3c98f569e39$export$dc064fe9e59310fd(type, this);
1149
- }
1150
- /**
1151
- * Lazily gets a mutable instance of a Node. If the node has already
1152
- * been cloned during this update cycle, it just returns the existing one.
1153
- */
1154
- getMutableNode(element) {
1155
- let node = element.node;
1156
- if (!this.mutatedNodes.has(element)) {
1157
- node = element.node.clone();
1158
- this.mutatedNodes.add(element);
1159
- element.node = node;
1160
- }
1161
- this.markDirty(element);
1162
- return node;
1163
- }
1164
- getMutableCollection() {
1165
- if (!this.isSSR && !this.collectionMutated) {
1166
- this.collection = this.collection.clone();
1167
- this.collectionMutated = true;
1168
- }
1169
- return this.collection;
1170
- }
1171
- markDirty(node) {
1172
- this.dirtyNodes.add(node);
1173
- }
1174
- startTransaction() {
1175
- this.transactionCount++;
1176
- }
1177
- endTransaction() {
1178
- this.transactionCount--;
1179
- }
1180
- addNode(element) {
1181
- let collection = this.getMutableCollection();
1182
- if (!collection.getItem(element.node.key)) {
1183
- collection.addNode(element.node);
1184
- for (let child of element) this.addNode(child);
1185
- }
1186
- this.markDirty(element);
1187
- }
1188
- removeNode(node) {
1189
- for (let child of node) this.removeNode(child);
1190
- let collection = this.getMutableCollection();
1191
- collection.removeNode(node.node.key);
1192
- this.markDirty(node);
1193
- }
1194
- /** Finalizes the collection update, updating all nodes and freezing the collection. */
1195
- getCollection() {
1196
- if (this.transactionCount > 0) return this.collection;
1197
- this.updateCollection();
1198
- return this.collection;
1199
- }
1200
- updateCollection() {
1201
- for (let element of this.dirtyNodes) if (element instanceof $681cc3c98f569e39$export$dc064fe9e59310fd && element.isConnected) element.updateNode();
1202
- this.dirtyNodes.clear();
1203
- if (this.mutatedNodes.size || this.collectionMutated) {
1204
- var _this_firstChild, _this_lastChild;
1205
- let collection = this.getMutableCollection();
1206
- for (let element of this.mutatedNodes) if (element.isConnected) collection.addNode(element.node);
1207
- var _this_firstChild_node_key, _this_lastChild_node_key;
1208
- collection.commit((_this_firstChild_node_key = (_this_firstChild = this.firstChild) === null || _this_firstChild === void 0 ? void 0 : _this_firstChild.node.key) !== null && _this_firstChild_node_key !== void 0 ? _this_firstChild_node_key : null, (_this_lastChild_node_key = (_this_lastChild = this.lastChild) === null || _this_lastChild === void 0 ? void 0 : _this_lastChild.node.key) !== null && _this_lastChild_node_key !== void 0 ? _this_lastChild_node_key : null, this.isSSR);
1209
- this.mutatedNodes.clear();
1210
- }
1211
- this.collectionMutated = false;
1212
- }
1213
- queueUpdate() {
1214
- if (this.dirtyNodes.size === 0 || this.transactionCount > 0) return;
1215
- for (let fn of this.subscriptions) fn();
1216
- }
1217
- subscribe(fn) {
1218
- this.subscriptions.add(fn);
1219
- return () => this.subscriptions.delete(fn);
1220
- }
1221
- resetAfterSSR() {
1222
- if (this.isSSR) {
1223
- this.isSSR = false;
1224
- this.firstChild = null;
1225
- this.lastChild = null;
1226
- this.nodeId = 0;
1227
- }
1228
- }
1229
- constructor(collection) {
1230
- super(null), this.nodeType = 11, this.ownerDocument = this, this.dirtyNodes = /* @__PURE__ */ new Set(), this.isSSR = false, this.nodeId = 0, this.nodesByProps = /* @__PURE__ */ new WeakMap(), this.isMounted = true, this.mutatedNodes = /* @__PURE__ */ new Set(), this.subscriptions = /* @__PURE__ */ new Set(), this.transactionCount = 0;
1231
- this.collection = collection;
1232
- this.collectionMutated = true;
1233
- }
1234
- }
1235
- function $e948873055cbafe4$export$727c8fc270210f13(props) {
1236
- let { children, items, idScope, addIdAndValue, dependencies = [] } = props;
1237
- let cache = React.useMemo(() => /* @__PURE__ */ new WeakMap(), dependencies);
1238
- return React.useMemo(() => {
1239
- if (items && typeof children === "function") {
1240
- let res = [];
1241
- for (let item of items) {
1242
- let rendered = cache.get(item);
1243
- if (!rendered) {
1244
- rendered = children(item);
1245
- var _rendered_props_id, _ref;
1246
- let key = (_ref = (_rendered_props_id = rendered.props.id) !== null && _rendered_props_id !== void 0 ? _rendered_props_id : item.key) !== null && _ref !== void 0 ? _ref : item.id;
1247
- if (key == null) throw new Error("Could not determine key for item");
1248
- if (idScope) key = idScope + ":" + key;
1249
- rendered = React.cloneElement(rendered, addIdAndValue ? {
1250
- key,
1251
- id: key,
1252
- value: item
1253
- } : {
1254
- key
1255
- });
1256
- cache.set(item, rendered);
1257
- }
1258
- res.push(rendered);
1259
- }
1260
- return res;
1261
- } else if (typeof children !== "function") return children;
1262
- }, [
1263
- children,
1264
- items,
1265
- cache,
1266
- idScope,
1267
- addIdAndValue
1268
- ]);
1269
- }
1270
- const $e1995378a142960e$var$ShallowRenderContext = /* @__PURE__ */ React.createContext(false);
1271
- const $e1995378a142960e$var$CollectionDocumentContext = /* @__PURE__ */ React.createContext(null);
1272
- function $e1995378a142960e$export$bf788dd355e3a401(props) {
1273
- let doc = React.useContext($e1995378a142960e$var$CollectionDocumentContext);
1274
- if (doc)
1275
- return props.content;
1276
- let { collection, document: document2 } = $e1995378a142960e$var$useCollectionDocument(props.createCollection);
1277
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Button.$f39a9eba43920ace$export$8dc98ba7eadeaa56, null, /* @__PURE__ */ React.createElement($e1995378a142960e$var$CollectionDocumentContext.Provider, {
1278
- value: document2
1279
- }, props.content)), /* @__PURE__ */ React.createElement($e1995378a142960e$var$CollectionInner, {
1280
- render: props.children,
1281
- collection
1282
- }));
1283
- }
1284
- function $e1995378a142960e$var$CollectionInner({ collection, render }) {
1285
- return render(collection);
1286
- }
1287
- function $e1995378a142960e$var$useSyncExternalStoreFallback(subscribe, getSnapshot, getServerSnapshot) {
1288
- let isSSR = mergeProps.$b5e257d569688ac6$export$535bd6ca7f90a273();
1289
- let isSSRRef = React.useRef(isSSR);
1290
- isSSRRef.current = isSSR;
1291
- let getSnapshotWrapper = React.useCallback(() => {
1292
- return isSSRRef.current ? getServerSnapshot() : getSnapshot();
1293
- }, [
1294
- getSnapshot,
1295
- getServerSnapshot
1296
- ]);
1297
- return index.shimExports.useSyncExternalStore(subscribe, getSnapshotWrapper);
1298
- }
1299
- const $e1995378a142960e$var$useSyncExternalStore = typeof React["useSyncExternalStore"] === "function" ? React["useSyncExternalStore"] : $e1995378a142960e$var$useSyncExternalStoreFallback;
1300
- function $e1995378a142960e$var$useCollectionDocument(createCollection) {
1301
- let [document2] = React.useState(() => new $681cc3c98f569e39$export$b34a105447964f9f((createCollection === null || createCollection === void 0 ? void 0 : createCollection()) || new $23b9f4fcf0fe224b$export$408d25a4e12db025()));
1302
- let subscribe = React.useCallback((fn) => document2.subscribe(fn), [
1303
- document2
1304
- ]);
1305
- let getSnapshot = React.useCallback(() => {
1306
- let collection2 = document2.getCollection();
1307
- if (document2.isSSR)
1308
- document2.resetAfterSSR();
1309
- return collection2;
1310
- }, [
1311
- document2
1312
- ]);
1313
- let getServerSnapshot = React.useCallback(() => {
1314
- document2.isSSR = true;
1315
- return document2.getCollection();
1316
- }, [
1317
- document2
1318
- ]);
1319
- let collection = $e1995378a142960e$var$useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
1320
- mergeProps.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
1321
- document2.isMounted = true;
1322
- return () => {
1323
- document2.isMounted = false;
1324
- };
1325
- }, [
1326
- document2
1327
- ]);
1328
- return {
1329
- collection,
1330
- document: document2
1331
- };
1332
- }
1333
- const $e1995378a142960e$var$SSRContext = /* @__PURE__ */ React.createContext(null);
1334
- function $e1995378a142960e$var$useSSRCollectionNode(Type, props, ref, rendered, children, render) {
1335
- let itemRef = React.useCallback((element) => {
1336
- element === null || element === void 0 ? void 0 : element.setProps(props, ref, rendered, render);
1337
- }, [
1338
- props,
1339
- ref,
1340
- rendered,
1341
- render
1342
- ]);
1343
- let parentNode = React.useContext($e1995378a142960e$var$SSRContext);
1344
- if (parentNode) {
1345
- let element = parentNode.ownerDocument.nodesByProps.get(props);
1346
- if (!element) {
1347
- element = parentNode.ownerDocument.createElement(Type);
1348
- element.setProps(props, ref, rendered, render);
1349
- parentNode.appendChild(element);
1350
- parentNode.ownerDocument.updateCollection();
1351
- parentNode.ownerDocument.nodesByProps.set(props, element);
1352
- }
1353
- return children ? /* @__PURE__ */ React.createElement($e1995378a142960e$var$SSRContext.Provider, {
1354
- value: element
1355
- }, children) : null;
1356
- }
1357
- return /* @__PURE__ */ React.createElement(Type, {
1358
- ref: itemRef
1359
- }, children);
1360
- }
1361
- function $e1995378a142960e$export$18af5c7a9e9b3664(type, render) {
1362
- let Component = ({ node }) => render(node.props, node.props.ref, node);
1363
- let Result = React.forwardRef((props, ref) => {
1364
- let isShallow = React.useContext($e1995378a142960e$var$ShallowRenderContext);
1365
- if (!isShallow) {
1366
- if (render.length >= 3) throw new Error(render.name + " cannot be rendered outside a collection.");
1367
- return render(props, ref);
1368
- }
1369
- return $e1995378a142960e$var$useSSRCollectionNode(type, props, ref, "children" in props ? props.children : null, null, (node) => /* @__PURE__ */ React.createElement(Component, {
1370
- node
1371
- }));
1372
- });
1373
- Result.displayName = render.name;
1374
- return Result;
1375
- }
1376
- function $e1995378a142960e$var$useCollectionChildren(options) {
1377
- return $e948873055cbafe4$export$727c8fc270210f13(__spreadProps(__spreadValues({}, options), {
1378
- addIdAndValue: true
1379
- }));
1380
- }
1381
- const $e1995378a142960e$var$CollectionContext = /* @__PURE__ */ React.createContext(null);
1382
- function $e1995378a142960e$export$fb8073518f34e6ec(props) {
1383
- let ctx = React.useContext($e1995378a142960e$var$CollectionContext);
1384
- let dependencies = ((ctx === null || ctx === void 0 ? void 0 : ctx.dependencies) || []).concat(props.dependencies);
1385
- let idScope = props.idScope || (ctx === null || ctx === void 0 ? void 0 : ctx.idScope);
1386
- let children = $e1995378a142960e$var$useCollectionChildren(__spreadProps(__spreadValues({}, props), {
1387
- idScope,
1388
- dependencies
1389
- }));
1390
- let doc = React.useContext($e1995378a142960e$var$CollectionDocumentContext);
1391
- if (doc) children = /* @__PURE__ */ React.createElement($e1995378a142960e$var$CollectionRoot, null, children);
1392
- ctx = React.useMemo(() => ({
1393
- dependencies,
1394
- idScope
1395
- }), [
1396
- idScope,
1397
- ...dependencies
1398
- ]);
1399
- return /* @__PURE__ */ React.createElement($e1995378a142960e$var$CollectionContext.Provider, {
1400
- value: ctx
1401
- }, children);
1402
- }
1403
- function $e1995378a142960e$var$CollectionRoot({ children }) {
1404
- let doc = React.useContext($e1995378a142960e$var$CollectionDocumentContext);
1405
- let wrappedChildren = React.useMemo(() => /* @__PURE__ */ React.createElement($e1995378a142960e$var$CollectionDocumentContext.Provider, {
1406
- value: null
1407
- }, /* @__PURE__ */ React.createElement($e1995378a142960e$var$ShallowRenderContext.Provider, {
1408
- value: true
1409
- }, children)), [
1410
- children
1411
- ]);
1412
- return mergeProps.$b5e257d569688ac6$export$535bd6ca7f90a273() ? /* @__PURE__ */ React.createElement($e1995378a142960e$var$SSRContext.Provider, {
1413
- value: doc
1414
- }, wrappedChildren) : /* @__PURE__ */ ReactDOM.createPortal(wrappedChildren, doc);
1415
- }
1416
- const $7135fc7d473fd974$export$a164736487e3f0ae = {
1417
- CollectionRoot({ collection, renderDropIndicator }) {
1418
- return $7135fc7d473fd974$var$useCollectionRender(collection, null, renderDropIndicator);
1419
- },
1420
- CollectionBranch({ collection, parent, renderDropIndicator }) {
1421
- return $7135fc7d473fd974$var$useCollectionRender(collection, parent, renderDropIndicator);
1422
- }
1423
- };
1424
- function $7135fc7d473fd974$var$useCollectionRender(collection, parent, renderDropIndicator) {
1425
- return $e948873055cbafe4$export$727c8fc270210f13({
1426
- items: parent ? collection.getChildren(parent.key) : collection,
1427
- dependencies: [
1428
- renderDropIndicator
1429
- ],
1430
- children(node) {
1431
- var _collection_getItem;
1432
- let rendered = node.render(node);
1433
- if (!renderDropIndicator || node.type !== "item") return rendered;
1434
- let key = node.key;
1435
- let keyAfter = collection.getKeyAfter(key);
1436
- return /* @__PURE__ */ React.createElement(React.Fragment, null, renderDropIndicator({
1437
- type: "item",
1438
- key,
1439
- dropPosition: "before"
1440
- }), rendered, (keyAfter == null || ((_collection_getItem = collection.getItem(keyAfter)) === null || _collection_getItem === void 0 ? void 0 : _collection_getItem.type) !== "item") && renderDropIndicator({
1441
- type: "item",
1442
- key,
1443
- dropPosition: "after"
1444
- }));
1445
- }
1446
- });
1447
- }
1448
- const $7135fc7d473fd974$export$4feb769f8ddf26c5 = /* @__PURE__ */ React.createContext($7135fc7d473fd974$export$a164736487e3f0ae);
1449
- function $7135fc7d473fd974$export$90e00781bc59d8f9(focusedKey) {
1450
- return React.useMemo(() => focusedKey != null ? /* @__PURE__ */ new Set([
1451
- focusedKey
1452
- ]) : null, [
1453
- focusedKey
1454
- ]);
1455
- }
1456
- const $01b77f81d0f07f68$export$75b6ee27786ba447 = /* @__PURE__ */ React.createContext({});
1457
- function $01b77f81d0f07f68$var$Label(props, ref) {
1458
- [props, ref] = utils.$64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $01b77f81d0f07f68$export$75b6ee27786ba447);
1459
- let _a = props, { elementType: ElementType = "label" } = _a, labelProps = __objRest(_a, ["elementType"]);
1460
- return /* @__PURE__ */ React.createElement(ElementType, __spreadProps(__spreadValues({
1461
- className: "react-aria-Label"
1462
- }, labelProps), {
1463
- ref
1464
- }));
1465
- }
1466
- const $01b77f81d0f07f68$export$b04be29aa201d4f5 = /* @__PURE__ */ Button.$f39a9eba43920ace$export$86427a43e3e48ebb($01b77f81d0f07f68$var$Label);
1467
- const $514c0188e459b4c0$export$9afb8bc826b033ea = /* @__PURE__ */ React.createContext({});
1468
- const $eed445e0843c11d0$export$7c5906fe4f1f2af2 = /* @__PURE__ */ React.createContext(null);
1469
- const $eaf9e70818b436db$export$5b07b5dd2cbd96e3 = /* @__PURE__ */ React.createContext(null);
1470
- const $eaf9e70818b436db$export$e755ce3685dd0ca9 = /* @__PURE__ */ React.createContext(null);
1471
- function $eaf9e70818b436db$var$TagGroup(props, ref) {
1472
- [props, ref] = utils.$64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $eaf9e70818b436db$export$5b07b5dd2cbd96e3);
1473
- return /* @__PURE__ */ React.createElement($e1995378a142960e$export$bf788dd355e3a401, {
1474
- content: props.children
1475
- }, (collection) => /* @__PURE__ */ React.createElement($eaf9e70818b436db$var$TagGroupInner, {
1476
- props,
1477
- forwardedRef: ref,
1478
- collection
1479
- }));
1480
- }
1481
- function $eaf9e70818b436db$var$TagGroupInner({ props, forwardedRef: ref, collection }) {
1482
- let tagListRef = React.useRef(null);
1483
- let [labelRef, label] = utils.$64fa3d84918910a7$export$9d4c57ee4c6ffdd8();
1484
- let state = useListState.$e72dd72e1c76a225$export$2f645645f7bca764(__spreadProps(__spreadValues({}, props), {
1485
- children: void 0,
1486
- collection
1487
- }));
1488
- let domProps = filterDOMProps.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props);
1489
- let domPropOverrides = Object.fromEntries(Object.entries(domProps).map(([k]) => [
1490
- k,
1491
- void 0
1492
- ]));
1493
- let { gridProps, labelProps, descriptionProps, errorMessageProps } = $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(__spreadProps(__spreadValues(__spreadValues({}, props), domPropOverrides), {
1494
- label
1495
- }), state, tagListRef);
1496
- var _props_className;
1497
- return /* @__PURE__ */ React.createElement("div", __spreadProps(__spreadValues({}, domProps), {
1498
- ref,
1499
- slot: props.slot || void 0,
1500
- className: (_props_className = props.className) !== null && _props_className !== void 0 ? _props_className : "react-aria-TagGroup",
1501
- style: props.style
1502
- }), /* @__PURE__ */ React.createElement(utils.$64fa3d84918910a7$export$2881499e37b75b9a, {
1503
- values: [
1504
- [
1505
- $01b77f81d0f07f68$export$75b6ee27786ba447,
1506
- __spreadProps(__spreadValues({}, labelProps), {
1507
- elementType: "span",
1508
- ref: labelRef
1509
- })
1510
- ],
1511
- [
1512
- $eaf9e70818b436db$export$e755ce3685dd0ca9,
1513
- __spreadProps(__spreadValues({}, gridProps), {
1514
- ref: tagListRef
1515
- })
1516
- ],
1517
- [
1518
- $eed445e0843c11d0$export$7c5906fe4f1f2af2,
1519
- state
1520
- ],
1521
- [
1522
- $514c0188e459b4c0$export$9afb8bc826b033ea,
1523
- {
1524
- slots: {
1525
- description: descriptionProps,
1526
- errorMessage: errorMessageProps
1527
- }
1528
- }
1529
- ]
1530
- ]
1531
- }, props.children));
1532
- }
1533
- const $eaf9e70818b436db$export$67ea30858aaf75e3 = /* @__PURE__ */ React.forwardRef($eaf9e70818b436db$var$TagGroup);
1534
- function $eaf9e70818b436db$var$TagList(props, ref) {
1535
- let state = React.useContext($eed445e0843c11d0$export$7c5906fe4f1f2af2);
1536
- return state ? /* @__PURE__ */ React.createElement($eaf9e70818b436db$var$TagListInner, {
1537
- props,
1538
- forwardedRef: ref
1539
- }) : /* @__PURE__ */ React.createElement($e1995378a142960e$export$fb8073518f34e6ec, props);
1540
- }
1541
- function $eaf9e70818b436db$var$TagListInner({ props, forwardedRef }) {
1542
- let state = React.useContext($eed445e0843c11d0$export$7c5906fe4f1f2af2);
1543
- let { CollectionRoot } = React.useContext($7135fc7d473fd974$export$4feb769f8ddf26c5);
1544
- let [gridProps, ref] = utils.$64fa3d84918910a7$export$29f1550f4b0d4415(props, forwardedRef, $eaf9e70818b436db$export$e755ce3685dd0ca9);
1545
- delete gridProps.items;
1546
- delete gridProps.renderEmptyState;
1547
- let { focusProps, isFocused, isFocusVisible } = useFocusRing.$f7dceffc5ad7768b$export$4e328f61c538687f();
1548
- let renderValues = {
1549
- isEmpty: state.collection.size === 0,
1550
- isFocused,
1551
- isFocusVisible,
1552
- state
1553
- };
1554
- let renderProps = utils.$64fa3d84918910a7$export$4d86445c2cf5e3({
1555
- className: props.className,
1556
- style: props.style,
1557
- defaultClassName: "react-aria-TagList",
1558
- values: renderValues
1559
- });
1560
- let persistedKeys = $7135fc7d473fd974$export$90e00781bc59d8f9(state.selectionManager.focusedKey);
1561
- return /* @__PURE__ */ React.createElement("div", __spreadProps(__spreadValues(__spreadValues({}, mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(gridProps, focusProps)), renderProps), {
1562
- ref,
1563
- "data-empty": state.collection.size === 0 || void 0,
1564
- "data-focused": isFocused || void 0,
1565
- "data-focus-visible": isFocusVisible || void 0
1566
- }), state.collection.size === 0 && props.renderEmptyState ? props.renderEmptyState(renderValues) : /* @__PURE__ */ React.createElement(CollectionRoot, {
1567
- collection: state.collection,
1568
- persistedKeys
1569
- }));
1570
- }
1571
- const $eaf9e70818b436db$export$f9fef0f55402315b = /* @__PURE__ */ React.forwardRef($eaf9e70818b436db$var$TagList);
1572
- const $eaf9e70818b436db$export$3288d34c523a1192 = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664("item", (props, forwardedRef, item) => {
1573
- let state = React.useContext($eed445e0843c11d0$export$7c5906fe4f1f2af2);
1574
- let ref = useObjectRef.$df56164dff5785e2$export$4338b53315abf666(forwardedRef);
1575
- let { focusProps, isFocusVisible } = useFocusRing.$f7dceffc5ad7768b$export$4e328f61c538687f({
1576
- within: true
1577
- });
1578
- let _a = $fc6126c82a4601f1$export$3f568fff7dff2f03({
1579
- item
1580
- }, state, ref), { rowProps, gridCellProps, removeButtonProps } = _a, states = __objRest(_a, ["rowProps", "gridCellProps", "removeButtonProps"]);
1581
- let { hoverProps, isHovered } = useHover.$6179b936705e76d3$export$ae780daf29e6d456({
1582
- isDisabled: !states.allowsSelection,
1583
- onHoverStart: item.props.onHoverStart,
1584
- onHoverChange: item.props.onHoverChange,
1585
- onHoverEnd: item.props.onHoverEnd
1586
- });
1587
- let renderProps = utils.$64fa3d84918910a7$export$4d86445c2cf5e3(__spreadProps(__spreadValues({}, props), {
1588
- id: void 0,
1589
- children: item.rendered,
1590
- defaultClassName: "react-aria-Tag",
1591
- values: __spreadProps(__spreadValues({}, states), {
1592
- isFocusVisible,
1593
- isHovered,
1594
- selectionMode: state.selectionManager.selectionMode,
1595
- selectionBehavior: state.selectionManager.selectionBehavior
1596
- })
1597
- }));
1598
- React.useEffect(() => {
1599
- if (!item.textValue) console.warn("A `textValue` prop is required for <Tag> elements with non-plain text children for accessibility.");
1600
- }, [
1601
- item.textValue
1602
- ]);
1603
- return /* @__PURE__ */ React.createElement("div", __spreadProps(__spreadValues(__spreadValues({
1604
- ref
1605
- }, renderProps), mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(filterDOMProps.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props), rowProps, focusProps, hoverProps)), {
1606
- "data-selected": states.isSelected || void 0,
1607
- "data-disabled": states.isDisabled || void 0,
1608
- "data-hovered": isHovered || void 0,
1609
- "data-focused": states.isFocused || void 0,
1610
- "data-focus-visible": isFocusVisible || void 0,
1611
- "data-pressed": states.isPressed || void 0,
1612
- "data-allows-removing": states.allowsRemoving || void 0,
1613
- "data-selection-mode": state.selectionManager.selectionMode === "none" ? void 0 : state.selectionManager.selectionMode
1614
- }), /* @__PURE__ */ React.createElement("div", __spreadProps(__spreadValues({}, gridCellProps), {
1615
- style: {
1616
- display: "contents"
1617
- }
1618
- }), /* @__PURE__ */ React.createElement(utils.$64fa3d84918910a7$export$2881499e37b75b9a, {
1619
- values: [
1620
- [
1621
- Button.$d2b4bc8c273e7be6$export$24d547caef80ccd1,
1622
- {
1623
- slots: {
1624
- remove: removeButtonProps
1625
- }
1626
- }
1627
- ],
1628
- [
1629
- $7135fc7d473fd974$export$4feb769f8ddf26c5,
1630
- $7135fc7d473fd974$export$a164736487e3f0ae
1631
- ]
1632
- ]
1633
- }, renderProps.children)));
1634
- });
1635
- const Pill$1 = "_Pill_xqz4f_5";
1636
- const remove = "_remove_xqz4f_14";
1637
- const list = "_list_xqz4f_26";
1638
- const styles = {
1639
- Pill: Pill$1,
1640
- remove,
1641
- list
1642
- };
1643
- function usePillListState(initialItems) {
1644
- return $0d86e9c8f07f9a7b$export$762f73dccccd255d({
1645
- initialItems
1646
- });
1647
- }
1648
- function PillGroup(props) {
1649
- const { label, items, children, horizontalStackContainerProps = {} } = props;
1650
- const { align, blockAlign, gap, wrap = true, inline } = horizontalStackContainerProps;
1651
- const style = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, utilities_css.getResponsiveDesignToken("pill-group", "gap", "space", gap)), utilities_css.getComponentToken("pill-group", "align", align)), utilities_css.getComponentToken("pill-group", "block-align", blockAlign)), utilities_css.getComponentToken("pill-group", "wrap", wrap ? "wrap" : "nowrap")), utilities_css.getComponentToken("pill-group", "display", inline ? "inline-flex" : "flex"));
1652
- return React.createElement($eaf9e70818b436db$export$67ea30858aaf75e3, __spreadValues({}, props), React.createElement(Text.Text, {
1653
- visuallyHidden: true
1654
- }, React.createElement($01b77f81d0f07f68$export$b04be29aa201d4f5, null, label)), React.createElement($eaf9e70818b436db$export$f9fef0f55402315b, {
1655
- items,
1656
- className: styles.list,
1657
- style
1658
- }, children));
1659
- }
1660
- function Pill(props) {
1661
- const { label, icon } = props;
1662
- return React.createElement($eaf9e70818b436db$export$3288d34c523a1192, __spreadValues({
1663
- textValue: label,
1664
- className: styles.Pill
1665
- }, props), ({ allowsRemoving }) => React.createElement(React.Fragment, null, icon && React.createElement(Icon.Icon, {
1666
- size: "xs",
1667
- symbol: icon,
1668
- color: "primary.700"
1669
- }), React.createElement(Text.Text, {
1670
- color: "primary.800",
1671
- variant: "subtitle2"
1672
- }, label), allowsRemoving && React.createElement(Button.$d2b4bc8c273e7be6$export$353f5b6fc5456de1, {
1673
- className: styles.remove,
1674
- slot: "remove"
1675
- }, React.createElement(Icon.Icon, {
1676
- size: "xs",
1677
- symbol: Close.Close,
1678
- color: "primary.600"
1679
- }))));
1680
- }
1681
- PillGroup.Pill = Pill;
1682
- exports.PillGroup = PillGroup;
1683
- exports.usePillListState = usePillListState;
3
+ const PillGroup = require("../__chunks__/PillGroup-BUMKmU-f.js");
4
+ exports.PillGroup = PillGroup.PillGroup;
5
+ exports.usePillListState = PillGroup.usePillListState;