@midas-ds/components 10.1.1 → 10.3.0

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 (383) hide show
  1. package/AccordionItem-BGWiWjxA.cjs +1 -0
  2. package/AccordionItem-ChHpW8EW.js +320 -0
  3. package/BadgeContainer-DM8TdyMT.js +37 -0
  4. package/BadgeContainer-I1XA3OCl.cjs +1 -0
  5. package/Breadcrumbs-CwDUNIqF.js +250 -0
  6. package/Breadcrumbs-DtjJ1UmU.cjs +1 -0
  7. package/Button-BoJl6JGM.cjs +1 -0
  8. package/Button-Csih3v23.js +38 -0
  9. package/Button-DjBChs7s.js +340 -0
  10. package/Button-htW9qIsS.cjs +1 -0
  11. package/Button.module-DEQtBYe5.cjs +1 -0
  12. package/Button.module-tti8HGxs.js +14 -0
  13. package/ButtonGroup-DUqW5dzM.cjs +1 -0
  14. package/ButtonGroup-DvVvear6.js +22 -0
  15. package/CHANGELOG.md +68 -0
  16. package/Card-0G0mj9q5.cjs +1 -0
  17. package/Card-yrtGzt70.js +131 -0
  18. package/CharacterCounter-BL_nZHya.js +22 -0
  19. package/CharacterCounter-CHcTDHO-.cjs +1 -0
  20. package/Checkbox-5HINZdGu.js +263 -0
  21. package/Checkbox-DqcPg5hz.cjs +1 -0
  22. package/CheckboxGroup-BBrSMuDY.cjs +1 -0
  23. package/CheckboxGroup-CLgixk2p.js +243 -0
  24. package/Collection-BIDsXNhi.cjs +1 -0
  25. package/Collection-Brgjpkne.js +576 -0
  26. package/ColorSchemeSwitch-BpzQ7g0b.js +106 -0
  27. package/ColorSchemeSwitch-C-qWuqkU.cjs +16 -0
  28. package/ComboBox-CVDyp2a-.js +1379 -0
  29. package/ComboBox-CWJUg9Xx.cjs +1 -0
  30. package/DateField-DeDhiYnW.cjs +1 -0
  31. package/DateField-DhU3q-rG.js +47 -0
  32. package/DateInputDivider-ADvOavHw.cjs +1 -0
  33. package/DateInputDivider-CF4xWsMT.js +2904 -0
  34. package/DateRangePicker-BsAHhy99.cjs +6 -0
  35. package/DateRangePicker-ziD1_k1W.js +881 -0
  36. package/Dialog-B8GTYbvu.cjs +1 -0
  37. package/Dialog-BOrYdX50.cjs +1 -0
  38. package/Dialog-CXNu48AC.js +208 -0
  39. package/Dialog-D14MbJ7o.js +1633 -0
  40. package/DragAndDrop-DNth776R.cjs +1 -0
  41. package/DragAndDrop-o3ruz_SR.js +60 -0
  42. package/Dropdown-CJ6My6EI.cjs +6 -0
  43. package/Dropdown-Df58j43I.js +84 -0
  44. package/FieldError-CAcjosk_.js +46 -0
  45. package/FieldError-CKBb2-mp.cjs +1 -0
  46. package/FileUpload-CxCOtyB9.cjs +2 -0
  47. package/FileUpload-D6qoEAjn.js +2373 -0
  48. package/FocusScope-5c9SVBcR.cjs +1 -0
  49. package/FocusScope-CxkURfoc.js +625 -0
  50. package/Form-BuOomA4T.cjs +1 -0
  51. package/Form-CXcEMuBf.js +5 -0
  52. package/Grid--OhtgCo6.js +27 -0
  53. package/Grid-DVQtOcu9.cjs +1 -0
  54. package/GridItem-DlbSdRmB.js +246 -0
  55. package/GridItem-XgHmZWXY.cjs +1 -0
  56. package/Group-B6EslsHZ.js +44 -0
  57. package/Group-CgiqQHH1.cjs +1 -0
  58. package/Heading-BFtiin0g.js +46 -0
  59. package/Heading-mHhCbGjY.cjs +1 -0
  60. package/Hidden-BxRZGdEW.cjs +1 -0
  61. package/Hidden-C9KWUR7b.js +34 -0
  62. package/InfoBanner-BLM-TJJ6.js +83 -0
  63. package/InfoBanner-C2kTIsrB.cjs +1 -0
  64. package/Input-BTzwcf72.js +41 -0
  65. package/Input-DKSAYvsw.cjs +1 -0
  66. package/Label-7Ybb99CE.cjs +1 -0
  67. package/Label-BwJrdqEE.js +70 -0
  68. package/Layout-1g6bMH62.cjs +16 -0
  69. package/Layout-Ey8flY7E.js +468 -0
  70. package/Link-B88l_oaE.cjs +6 -0
  71. package/Link-BQhauBuw.cjs +1 -0
  72. package/Link-DX5BbBnn.js +59 -0
  73. package/Link-yNO2-sqx.js +71 -0
  74. package/LinkButton-CBpGLETx.cjs +6 -0
  75. package/LinkButton-o6uS1XsR.js +69 -0
  76. package/ListBox-DP9M4H6R.cjs +1 -0
  77. package/ListBox-GnVK_Pdq.js +529 -0
  78. package/ListBoxButton-DPBrtXyv.cjs +1 -0
  79. package/ListBoxButton-D_J3jlP0.js +15 -0
  80. package/ListBoxSection-BGaigBnG.cjs +1 -0
  81. package/ListBoxSection-C0BGnpB4.js +1058 -0
  82. package/ListKeyboardDelegate-DNI8GQtX.js +167 -0
  83. package/ListKeyboardDelegate-DTg9h4v6.cjs +1 -0
  84. package/Logo-BIrOEINM.js +133 -0
  85. package/Logo-DT2_2O43.cjs +1 -0
  86. package/OverlayArrow-CDLXPTew.js +506 -0
  87. package/OverlayArrow-D75k-EMl.cjs +1 -0
  88. package/Popover-BGGXeD54.js +38 -0
  89. package/Popover-CqNWzPf-.cjs +1 -0
  90. package/ProgressBar-DMSg-Prr.js +53 -0
  91. package/ProgressBar-Jbg28j2a.cjs +1 -0
  92. package/RSPContexts-BW2SEIqe.js +11 -0
  93. package/RSPContexts-D8hmBfGm.cjs +1 -0
  94. package/Radio-BwqrdhQE.cjs +1 -0
  95. package/Radio-Cz29wPXd.js +311 -0
  96. package/RangeCalendar-BehUaydF.cjs +11 -0
  97. package/RangeCalendar-RAlAHlNL.js +1683 -0
  98. package/SearchField-CxMwDeUM.cjs +6 -0
  99. package/SearchField-IlvZ3Kh6.js +362 -0
  100. package/Select-2q1iSzAX.cjs +1 -0
  101. package/Select-BVQZtoi9.js +646 -0
  102. package/SelectionManager-B4ORduja.js +1032 -0
  103. package/SelectionManager-CwYux2h3.cjs +1 -0
  104. package/Separator-Cu9fYKUM.js +59 -0
  105. package/Separator-DECIYLtZ.cjs +1 -0
  106. package/Skeleton-BAwbfKBW.cjs +1 -0
  107. package/Skeleton-BePDRmrO.js +40 -0
  108. package/Spinner-D31SXm-U.js +41 -0
  109. package/Spinner-P35rvvsl.cjs +6 -0
  110. package/Table-B40CGLT-.cjs +16 -0
  111. package/Table-F4oYBtUM.js +2447 -0
  112. package/Tabs-B4oZJkZG.js +404 -0
  113. package/Tabs-DA2qXhzb.cjs +1 -0
  114. package/Tag-DPAGmcMK.cjs +1 -0
  115. package/Tag-Du7GvSv2.js +745 -0
  116. package/Text-3MNwRMpI.cjs +1 -0
  117. package/Text-B2K-BJKQ.cjs +1 -0
  118. package/Text-BoXuUVVH.js +15 -0
  119. package/Text-jWWg0B20.js +32 -0
  120. package/TextArea-C7JZ_pQd.cjs +1 -0
  121. package/TextArea-XeBCSyzl.js +191 -0
  122. package/TextField-BgNdhZi_.cjs +1 -0
  123. package/TextField-C-hTPukq.js +119 -0
  124. package/TextField.module-BcpPBWnD.js +13 -0
  125. package/TextField.module-Dw5Rtn9y.cjs +1 -0
  126. package/Toast-AbDA1BOs.cjs +1 -0
  127. package/Toast-Btg21Xge.js +989 -0
  128. package/ToggleButtonGroup-B5yz1tm2.js +210 -0
  129. package/ToggleButtonGroup-BFDoj0P6.cjs +1 -0
  130. package/Tooltip-CMLs7WMw.js +283 -0
  131. package/Tooltip-DeBuBKhS.cjs +1 -0
  132. package/VisuallyHidden-CLWHbz2n.cjs +1 -0
  133. package/VisuallyHidden-ZCYf65q4.js +40 -0
  134. package/accordion/index.cjs +1 -0
  135. package/accordion/index.js +5 -0
  136. package/arrow-right-Dg8sttFO.js +14 -0
  137. package/arrow-right-QJ2gXPKQ.cjs +6 -0
  138. package/assets/AccordionItem.css +1 -0
  139. package/assets/BadgeContainer.css +1 -0
  140. package/assets/Breadcrumbs.css +1 -0
  141. package/assets/Button.css +1 -0
  142. package/assets/ButtonGroup.css +1 -0
  143. package/assets/Card.css +1 -0
  144. package/assets/CharacterCounter.css +1 -0
  145. package/assets/Checkbox.css +1 -0
  146. package/assets/ColorSchemeSwitch.css +1 -0
  147. package/assets/ComboBox.css +1 -0
  148. package/assets/DateField.css +1 -0
  149. package/assets/DateInputDivider.css +1 -0
  150. package/assets/DateRangePicker.css +1 -0
  151. package/assets/Dialog.css +1 -0
  152. package/assets/Dropdown.css +1 -0
  153. package/assets/FieldError.css +1 -0
  154. package/assets/FileUpload.css +1 -0
  155. package/assets/GridItem.css +1 -0
  156. package/assets/Heading.css +1 -0
  157. package/assets/InfoBanner.css +1 -0
  158. package/assets/Label.css +1 -0
  159. package/assets/Layout.css +1 -0
  160. package/assets/Link.css +1 -0
  161. package/assets/LinkButton.css +1 -0
  162. package/assets/ListBoxSection.css +1 -0
  163. package/assets/Logo.css +1 -0
  164. package/assets/Popover.css +1 -0
  165. package/assets/ProgressBar.css +1 -0
  166. package/assets/Radio.css +1 -0
  167. package/assets/RangeCalendar.css +1 -0
  168. package/assets/SearchField.css +1 -0
  169. package/assets/Select.css +1 -0
  170. package/assets/Skeleton.css +1 -0
  171. package/assets/Spinner.css +1 -0
  172. package/assets/Table.css +1 -0
  173. package/assets/Tabs.css +1 -0
  174. package/assets/Tag.css +1 -0
  175. package/assets/Text.css +1 -0
  176. package/assets/TextField.css +1 -0
  177. package/assets/Toast.css +1 -0
  178. package/assets/ToggleButtonGroup.css +1 -0
  179. package/assets/Tooltip.css +1 -0
  180. package/badge/index.cjs +1 -0
  181. package/badge/index.js +5 -0
  182. package/breadcrumbs/index.cjs +1 -0
  183. package/breadcrumbs/index.js +4 -0
  184. package/button/index.cjs +1 -0
  185. package/button/index.js +6 -0
  186. package/calendar/CalendarHeader.d.ts +2 -1
  187. package/calendar/index.cjs +1 -0
  188. package/calendar/index.js +5 -0
  189. package/card/index.cjs +1 -0
  190. package/card/index.js +10 -0
  191. package/character-counter/index.cjs +1 -0
  192. package/character-counter/index.js +4 -0
  193. package/check-CLF6Yxza.js +11 -0
  194. package/check-D_KoootC.cjs +6 -0
  195. package/checkbox/Checkbox.d.ts +2 -2
  196. package/checkbox/CheckboxGroup.d.ts +8 -8
  197. package/checkbox/CheckboxGroupFieldError.d.ts +8 -0
  198. package/checkbox/CheckboxGroupItem.d.ts +3 -0
  199. package/checkbox/CheckboxInner.d.ts +2 -0
  200. package/checkbox/SingleCheckbox.d.ts +3 -0
  201. package/checkbox/context.d.ts +3 -0
  202. package/checkbox/index.cjs +1 -0
  203. package/checkbox/index.d.ts +2 -1
  204. package/checkbox/index.js +6 -0
  205. package/checkbox/intl/translations.json.d.ts +35 -0
  206. package/checkbox/types.d.ts +14 -0
  207. package/checkbox/useSelectAll.d.ts +7 -0
  208. package/chevron-down-Cd1bkzXT.js +13 -0
  209. package/chevron-down-jl83cllc.cjs +6 -0
  210. package/circle-check-B9HYcH7Z.js +26 -0
  211. package/circle-check-BGo8gML8.cjs +11 -0
  212. package/clsx-C11secjj.cjs +1 -0
  213. package/clsx-OuTLNxxd.js +16 -0
  214. package/color-scheme-switch/index.cjs +1 -0
  215. package/color-scheme-switch/index.js +4 -0
  216. package/combobox/ComboBox.d.ts +3 -1
  217. package/combobox/index.cjs +1 -0
  218. package/combobox/index.js +7 -0
  219. package/common/types.d.ts +2 -0
  220. package/context-C81gPYvC.js +80 -0
  221. package/context-DjwhtgxQ.cjs +1 -0
  222. package/createLucideIcon-Cg_wkoIA.cjs +21 -0
  223. package/createLucideIcon-DeWljiyi.js +79 -0
  224. package/date-field/DateField.d.ts +3 -0
  225. package/date-field/index.cjs +1 -0
  226. package/date-field/index.js +8 -0
  227. package/date-picker/DatePicker.d.ts +3 -0
  228. package/date-picker/DateRangePicker.d.ts +3 -0
  229. package/date-picker/index.cjs +1 -0
  230. package/date-picker/index.js +5 -0
  231. package/dropdown/index.cjs +1 -0
  232. package/dropdown/index.js +5 -0
  233. package/field-error/FieldError.d.ts +4 -1
  234. package/field-error/index.cjs +1 -0
  235. package/field-error/index.js +4 -0
  236. package/file-upload/FileUpload.d.ts +3 -0
  237. package/file-upload/index.cjs +1 -0
  238. package/file-upload/index.js +4 -0
  239. package/filterDOMProps-BS2lrgFA.cjs +1 -0
  240. package/filterDOMProps-D6KHYVBX.js +24 -0
  241. package/getScrollParent-BhFcYrwL.js +9 -0
  242. package/getScrollParent-DDJu9WHU.cjs +1 -0
  243. package/grid/Grid.d.ts +15 -4
  244. package/grid/GridItem.d.ts +31 -2
  245. package/grid/index.cjs +1 -0
  246. package/grid/index.d.ts +2 -2
  247. package/grid/index.js +8 -0
  248. package/heading/index.cjs +1 -0
  249. package/heading/index.js +4 -0
  250. package/index-CGRFP4CC.js +120 -0
  251. package/index-Dsz3aiWt.cjs +17 -0
  252. package/index.cjs +1 -169
  253. package/index.d.ts +1 -1
  254. package/index.js +129 -29979
  255. package/inertValue-B3AFhVG4.cjs +1 -0
  256. package/inertValue-B7loUihk.js +8 -0
  257. package/info-BZwphdye.js +15 -0
  258. package/info-CIEIENo6.cjs +6 -0
  259. package/info-banner/index.cjs +1 -0
  260. package/info-banner/index.js +4 -0
  261. package/label/InfoPopover.d.ts +9 -0
  262. package/label/LabelWrapper.d.ts +11 -0
  263. package/label/index.cjs +1 -0
  264. package/label/index.d.ts +1 -0
  265. package/label/index.js +4 -0
  266. package/layout/index.cjs +1 -0
  267. package/layout/index.js +8 -0
  268. package/link/index.cjs +1 -0
  269. package/link/index.js +6 -0
  270. package/link-button/index.cjs +1 -0
  271. package/link-button/index.js +6 -0
  272. package/list-box/index.cjs +1 -0
  273. package/list-box/index.js +9 -0
  274. package/logo/index.cjs +1 -0
  275. package/logo/index.js +4 -0
  276. package/modal/index.cjs +1 -0
  277. package/modal/index.js +6 -0
  278. package/number-BE8InLgI.js +6 -0
  279. package/number-E0x3H9cL.cjs +1 -0
  280. package/package.json +4 -4
  281. package/popover/Popover.d.ts +7 -0
  282. package/popover/index.cjs +1 -0
  283. package/popover/index.d.ts +1 -0
  284. package/popover/index.js +4 -0
  285. package/progress-bar/index.cjs +1 -0
  286. package/progress-bar/index.js +4 -0
  287. package/radio/Radio.d.ts +3 -0
  288. package/radio/index.cjs +1 -0
  289. package/radio/index.js +5 -0
  290. package/scrollIntoView-C8doLzDd.cjs +1 -0
  291. package/scrollIntoView-Hwb_aaNf.js +87 -0
  292. package/search-field/index.cjs +1 -0
  293. package/search-field/index.js +4 -0
  294. package/select/index.cjs +1 -0
  295. package/select/index.js +4 -0
  296. package/skeleton/Skeleton.d.ts +5 -0
  297. package/skeleton/index.cjs +1 -0
  298. package/skeleton/index.js +4 -0
  299. package/spinner/index.cjs +1 -0
  300. package/spinner/index.js +4 -0
  301. package/square-arrow-out-up-right-BkyqV2PN.js +15 -0
  302. package/square-arrow-out-up-right-V4Gd08uI.cjs +6 -0
  303. package/table/Table.d.ts +7 -1
  304. package/table/index.cjs +1 -0
  305. package/table/index.js +9 -0
  306. package/tabs/index.cjs +1 -0
  307. package/tabs/index.js +4 -0
  308. package/tag/index.cjs +1 -0
  309. package/tag/index.js +5 -0
  310. package/text/index.cjs +1 -0
  311. package/text/index.js +4 -0
  312. package/textfield/TextFieldBase.d.ts +2 -0
  313. package/textfield/index.cjs +1 -0
  314. package/textfield/index.js +7 -0
  315. package/theme/index.cjs +1 -0
  316. package/theme/index.d.ts +4 -0
  317. package/{theme.js → theme/index.js} +2 -2
  318. package/theme/tokens.d.ts +10 -0
  319. package/toast/index.cjs +1 -0
  320. package/toast/index.js +9 -0
  321. package/toggle-button/index.cjs +1 -0
  322. package/toggle-button/index.js +5 -0
  323. package/tokens-p6pg1Cea.cjs +1 -0
  324. package/{tokens-C0U7hdoO.js → tokens-xp-7KMK7.js} +18 -8
  325. package/tooltip/index.cjs +1 -0
  326. package/tooltip/index.js +5 -0
  327. package/triangle-alert-DJW8U7jL.cjs +6 -0
  328. package/triangle-alert-wxyxspAl.js +21 -0
  329. package/useButton-B8dB9sot.js +47 -0
  330. package/useButton-cpNi-fY4.cjs +1 -0
  331. package/useControlledState-D0L6S_5r.cjs +1 -0
  332. package/useControlledState-u436Wbp1.js +30 -0
  333. package/useDateFormatter-CnxoJ4jF.cjs +1 -0
  334. package/useDateFormatter-EHm4auIg.js +1571 -0
  335. package/useEvent-DxBxMX2V.cjs +1 -0
  336. package/useEvent-IsD2Awnh.js +21 -0
  337. package/useField-CXKYU74k.cjs +1 -0
  338. package/useField-DvpGZkw_.js +35 -0
  339. package/useFilter-BTgDWHVx.cjs +1 -0
  340. package/useFilter-CUq74PQ2.js +35 -0
  341. package/useFocusRing-CbImDrwF.cjs +1 -0
  342. package/useFocusRing-XnR3cZjO.js +82 -0
  343. package/useFocusable-C8uh8K4g.js +125 -0
  344. package/useFocusable-NUVSFcRC.cjs +1 -0
  345. package/useFormValidation-BIGzfO9h.js +215 -0
  346. package/useFormValidation-ClximP89.cjs +1 -0
  347. package/useHasTabbableChild-C-1mZUQe.js +34 -0
  348. package/useHasTabbableChild-DCBTulUQ.cjs +1 -0
  349. package/useHighlightSelectionDescription-CnBDT86u.js +567 -0
  350. package/useHighlightSelectionDescription-CzYucm61.cjs +1 -0
  351. package/useHover-DjIHtjGN.js +490 -0
  352. package/useHover-_mv5J4_q.cjs +1 -0
  353. package/useLabels-BDwkBYbE.js +17 -0
  354. package/useLabels-BLOfc6Y-.cjs +1 -0
  355. package/useListState-Bx8u4IFG.cjs +1 -0
  356. package/useListState-CrZFZffI.js +132 -0
  357. package/useLocalizedStringFormatter-BKoxGZf1.js +96 -0
  358. package/useLocalizedStringFormatter-BsxLt89S.cjs +1 -0
  359. package/useLocalizedStringFormatter-D3JQyjb4.js +21 -0
  360. package/useLocalizedStringFormatter-ioacM-Yt.cjs +1 -0
  361. package/useObserveElement-BdI4zgd7.js +27 -0
  362. package/useObserveElement-MhzEsCkX.cjs +1 -0
  363. package/usePress-0AjDbW9R.cjs +7 -0
  364. package/usePress-CNjmDzap.js +542 -0
  365. package/useSingleSelectListState-0AGHxvy3.js +34 -0
  366. package/useSingleSelectListState-Cl3KV5E1.cjs +1 -0
  367. package/useTextField--czJtyNd.cjs +1 -0
  368. package/useTextField-Cw-33OP_.js +86 -0
  369. package/useToggleState-Bz5rAf4C.js +18 -0
  370. package/useToggleState-DoIkSQdj.cjs +1 -0
  371. package/useUpdateEffect-C5YQs_1w.cjs +1 -0
  372. package/useUpdateEffect-CCDx8D4X.js +13 -0
  373. package/utils-BNtZbAib.cjs +1 -0
  374. package/utils-DIMfEPAt.js +308 -0
  375. package/x-H8Zrx8-x.cjs +6 -0
  376. package/x-JK7i-TQC.js +14 -0
  377. package/flex/Flex.d.ts +0 -17
  378. package/flex/FlexItem.d.ts +0 -15
  379. package/flex/index.d.ts +0 -2
  380. package/index.css +0 -1
  381. package/theme.cjs +0 -1
  382. package/tokens-COoF1t17.cjs +0 -1
  383. /package/{global.css → assets/global.css} +0 -0
@@ -0,0 +1,576 @@
1
+ import { a as H } from "./Hidden-C9KWUR7b.js";
2
+ import { createPortal as z } from "react-dom";
3
+ import { b as K } from "./useFocusable-C8uh8K4g.js";
4
+ import u, { useMemo as C, cloneElement as I, forwardRef as N, useContext as y, createContext as v, useCallback as m, useState as q, useRef as B, isValidElement as U } from "react";
5
+ import { $ as L, k as M } from "./utils-DIMfEPAt.js";
6
+ import { s as F } from "./index-CGRFP4CC.js";
7
+ class b {
8
+ get childNodes() {
9
+ throw new Error("childNodes is not supported");
10
+ }
11
+ clone() {
12
+ let e = new b(this.type, this.key);
13
+ return e.value = this.value, e.level = this.level, e.hasChildNodes = this.hasChildNodes, e.rendered = this.rendered, e.textValue = this.textValue, e["aria-label"] = this["aria-label"], e.index = this.index, e.parentKey = this.parentKey, e.prevKey = this.prevKey, e.nextKey = this.nextKey, e.firstChildKey = this.firstChildKey, e.lastChildKey = this.lastChildKey, e.props = this.props, e.render = this.render, e.colSpan = this.colSpan, e.colIndex = this.colIndex, e;
14
+ }
15
+ constructor(e, t) {
16
+ this.value = null, this.level = 0, this.hasChildNodes = !1, this.rendered = null, this.textValue = "", this["aria-label"] = void 0, this.index = 0, this.parentKey = null, this.prevKey = null, this.nextKey = null, this.firstChildKey = null, this.lastChildKey = null, this.props = {}, this.colSpan = null, this.colIndex = null, this.type = e, this.key = t;
17
+ }
18
+ }
19
+ class S {
20
+ get size() {
21
+ return this.keyMap.size;
22
+ }
23
+ getKeys() {
24
+ return this.keyMap.keys();
25
+ }
26
+ *[Symbol.iterator]() {
27
+ let e = this.firstKey != null ? this.keyMap.get(this.firstKey) : void 0;
28
+ for (; e; )
29
+ yield e, e = e.nextKey != null ? this.keyMap.get(e.nextKey) : void 0;
30
+ }
31
+ getChildren(e) {
32
+ let t = this.keyMap;
33
+ return {
34
+ *[Symbol.iterator]() {
35
+ let n = t.get(e), l = (n == null ? void 0 : n.firstChildKey) != null ? t.get(n.firstChildKey) : null;
36
+ for (; l; )
37
+ yield l, l = l.nextKey != null ? t.get(l.nextKey) : void 0;
38
+ }
39
+ };
40
+ }
41
+ getKeyBefore(e) {
42
+ let t = this.keyMap.get(e);
43
+ if (!t) return null;
44
+ if (t.prevKey != null) {
45
+ for (t = this.keyMap.get(t.prevKey); t && t.type !== "item" && t.lastChildKey != null; ) t = this.keyMap.get(t.lastChildKey);
46
+ var n;
47
+ return (n = t == null ? void 0 : t.key) !== null && n !== void 0 ? n : null;
48
+ }
49
+ return t.parentKey;
50
+ }
51
+ getKeyAfter(e) {
52
+ let t = this.keyMap.get(e);
53
+ if (!t) return null;
54
+ if (t.type !== "item" && t.firstChildKey != null) return t.firstChildKey;
55
+ for (; t; ) {
56
+ if (t.nextKey != null) return t.nextKey;
57
+ if (t.parentKey != null) t = this.keyMap.get(t.parentKey);
58
+ else return null;
59
+ }
60
+ return null;
61
+ }
62
+ getFirstKey() {
63
+ return this.firstKey;
64
+ }
65
+ getLastKey() {
66
+ let e = this.lastKey != null ? this.keyMap.get(this.lastKey) : null;
67
+ for (; (e == null ? void 0 : e.lastChildKey) != null; ) e = this.keyMap.get(e.lastChildKey);
68
+ var t;
69
+ return (t = e == null ? void 0 : e.key) !== null && t !== void 0 ? t : null;
70
+ }
71
+ getItem(e) {
72
+ var t;
73
+ return (t = this.keyMap.get(e)) !== null && t !== void 0 ? t : null;
74
+ }
75
+ at() {
76
+ throw new Error("Not implemented");
77
+ }
78
+ clone() {
79
+ let e = this.constructor, t = new e();
80
+ return t.keyMap = new Map(this.keyMap), t.firstKey = this.firstKey, t.lastKey = this.lastKey, t;
81
+ }
82
+ addNode(e) {
83
+ if (this.frozen) throw new Error("Cannot add a node to a frozen collection");
84
+ this.keyMap.set(e.key, e);
85
+ }
86
+ removeNode(e) {
87
+ if (this.frozen) throw new Error("Cannot remove a node to a frozen collection");
88
+ this.keyMap.delete(e);
89
+ }
90
+ commit(e, t, n = !1) {
91
+ if (this.frozen) throw new Error("Cannot commit a frozen collection");
92
+ this.firstKey = e, this.lastKey = t, this.frozen = !n;
93
+ }
94
+ // TODO: this is pretty specific to menu, will need to check if it is generic enough
95
+ // Will need to handle varying levels I assume but will revisit after I get searchable menu working for base menu
96
+ // TODO: an alternative is to simply walk the collection and add all item nodes that match the filter and any sections/separators we encounter
97
+ // to an array, then walk that new array and fix all the next/Prev keys while adding them to the new collection
98
+ UNSTABLE_filter(e) {
99
+ let t = new S(), n = null;
100
+ for (let l of this)
101
+ if (l.type === "section" && l.hasChildNodes) {
102
+ let i = l.clone(), o = null;
103
+ for (let d of this.getChildren(l.key)) if (k(d, e, this, t)) {
104
+ let s = d.clone();
105
+ o == null && (i.firstChildKey = s.key), t.firstKey == null && (t.firstKey = i.key), o && o.parentKey === s.parentKey ? (o.nextKey = s.key, s.prevKey = o.key) : s.prevKey = null, s.nextKey = null, t.addNode(s), o = s;
106
+ }
107
+ o && (o.type !== "header" ? (i.lastChildKey = o.key, n == null ? i.prevKey = null : (n.type === "section" || n.type === "separator") && (n.nextKey = i.key, i.prevKey = n.key), i.nextKey = null, n = i, t.addNode(i)) : (t.firstKey === i.key && (t.firstKey = null), t.removeNode(o.key)));
108
+ } else if (l.type === "separator") {
109
+ let i = l.clone();
110
+ i.nextKey = null, (n == null ? void 0 : n.type) === "section" && (n.nextKey = i.key, i.prevKey = n.key, n = i, t.addNode(i));
111
+ } else {
112
+ let i = l.clone();
113
+ k(i, e, this, t) && (t.firstKey == null && (t.firstKey = i.key), n != null && n.type !== "section" && n.type !== "separator" && n.parentKey === i.parentKey ? (n.nextKey = i.key, i.prevKey = n.key) : i.prevKey = null, i.nextKey = null, t.addNode(i), n = i);
114
+ }
115
+ if ((n == null ? void 0 : n.type) === "separator" && n.nextKey === null) {
116
+ let l;
117
+ n.prevKey != null && (l = t.getItem(n.prevKey), l.nextKey = null), t.removeNode(n.key), n = l;
118
+ }
119
+ return t.lastKey = (n == null ? void 0 : n.key) || null, t;
120
+ }
121
+ constructor() {
122
+ this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.frozen = !1;
123
+ }
124
+ }
125
+ function k(r, e, t, n) {
126
+ if (r.type === "subdialogtrigger" || r.type === "submenutrigger") {
127
+ let l = [
128
+ ...t.getChildren(r.key)
129
+ ][0];
130
+ if (l && e(l.textValue)) {
131
+ let i = l.clone();
132
+ return n.addNode(i), !0;
133
+ } else return !1;
134
+ } else return r.type === "header" ? !0 : e(r.textValue);
135
+ }
136
+ class D {
137
+ *[Symbol.iterator]() {
138
+ let e = this.firstChild;
139
+ for (; e; )
140
+ yield e, e = e.nextSibling;
141
+ }
142
+ get firstChild() {
143
+ return this._firstChild;
144
+ }
145
+ set firstChild(e) {
146
+ this._firstChild = e, this.ownerDocument.markDirty(this);
147
+ }
148
+ get lastChild() {
149
+ return this._lastChild;
150
+ }
151
+ set lastChild(e) {
152
+ this._lastChild = e, this.ownerDocument.markDirty(this);
153
+ }
154
+ get previousSibling() {
155
+ return this._previousSibling;
156
+ }
157
+ set previousSibling(e) {
158
+ this._previousSibling = e, this.ownerDocument.markDirty(this);
159
+ }
160
+ get nextSibling() {
161
+ return this._nextSibling;
162
+ }
163
+ set nextSibling(e) {
164
+ this._nextSibling = e, this.ownerDocument.markDirty(this);
165
+ }
166
+ get parentNode() {
167
+ return this._parentNode;
168
+ }
169
+ set parentNode(e) {
170
+ this._parentNode = e, this.ownerDocument.markDirty(this);
171
+ }
172
+ get isConnected() {
173
+ var e;
174
+ return ((e = this.parentNode) === null || e === void 0 ? void 0 : e.isConnected) || !1;
175
+ }
176
+ invalidateChildIndices(e) {
177
+ (this._minInvalidChildIndex == null || !this._minInvalidChildIndex.isConnected || e.index < this._minInvalidChildIndex.index) && (this._minInvalidChildIndex = e, this.ownerDocument.markDirty(this));
178
+ }
179
+ updateChildIndices() {
180
+ let e = this._minInvalidChildIndex;
181
+ for (; e; )
182
+ e.index = e.previousSibling ? e.previousSibling.index + 1 : 0, e = e.nextSibling;
183
+ this._minInvalidChildIndex = null;
184
+ }
185
+ appendChild(e) {
186
+ e.parentNode && e.parentNode.removeChild(e), this.firstChild == null && (this.firstChild = e), this.lastChild ? (this.lastChild.nextSibling = e, e.index = this.lastChild.index + 1, e.previousSibling = this.lastChild) : (e.previousSibling = null, e.index = 0), e.parentNode = this, e.nextSibling = null, this.lastChild = e, this.ownerDocument.markDirty(this), this.isConnected && this.ownerDocument.queueUpdate();
187
+ }
188
+ insertBefore(e, t) {
189
+ if (t == null) return this.appendChild(e);
190
+ e.parentNode && e.parentNode.removeChild(e), e.nextSibling = t, e.previousSibling = t.previousSibling, e.index = t.index - 1, this.firstChild === t ? this.firstChild = e : t.previousSibling && (t.previousSibling.nextSibling = e), t.previousSibling = e, e.parentNode = t.parentNode, this.invalidateChildIndices(e), this.isConnected && this.ownerDocument.queueUpdate();
191
+ }
192
+ removeChild(e) {
193
+ e.parentNode !== this || !this.ownerDocument.isMounted || (this._minInvalidChildIndex === e && (this._minInvalidChildIndex = null), e.nextSibling && (this.invalidateChildIndices(e.nextSibling), e.nextSibling.previousSibling = e.previousSibling), e.previousSibling && (e.previousSibling.nextSibling = e.nextSibling), this.firstChild === e && (this.firstChild = e.nextSibling), this.lastChild === e && (this.lastChild = e.previousSibling), e.parentNode = null, e.nextSibling = null, e.previousSibling = null, e.index = 0, this.ownerDocument.markDirty(e), this.isConnected && this.ownerDocument.queueUpdate());
194
+ }
195
+ addEventListener() {
196
+ }
197
+ removeEventListener() {
198
+ }
199
+ get previousVisibleSibling() {
200
+ let e = this.previousSibling;
201
+ for (; e && e.isHidden; ) e = e.previousSibling;
202
+ return e;
203
+ }
204
+ get nextVisibleSibling() {
205
+ let e = this.nextSibling;
206
+ for (; e && e.isHidden; ) e = e.nextSibling;
207
+ return e;
208
+ }
209
+ get firstVisibleChild() {
210
+ let e = this.firstChild;
211
+ for (; e && e.isHidden; ) e = e.nextSibling;
212
+ return e;
213
+ }
214
+ get lastVisibleChild() {
215
+ let e = this.lastChild;
216
+ for (; e && e.isHidden; ) e = e.previousSibling;
217
+ return e;
218
+ }
219
+ constructor(e) {
220
+ this._firstChild = null, this._lastChild = null, this._previousSibling = null, this._nextSibling = null, this._parentNode = null, this._minInvalidChildIndex = null, this.ownerDocument = e;
221
+ }
222
+ }
223
+ class p extends D {
224
+ get index() {
225
+ return this._index;
226
+ }
227
+ set index(e) {
228
+ this._index = e, this.ownerDocument.markDirty(this);
229
+ }
230
+ get level() {
231
+ return this.parentNode instanceof p ? this.parentNode.level + (this.node.type === "item" ? 1 : 0) : 0;
232
+ }
233
+ /**
234
+ * Lazily gets a mutable instance of a Node. If the node has already
235
+ * been cloned during this update cycle, it just returns the existing one.
236
+ */
237
+ getMutableNode() {
238
+ return this.isMutated || (this.node = this.node.clone(), this.isMutated = !0), this.ownerDocument.markDirty(this), this.node;
239
+ }
240
+ updateNode() {
241
+ var e, t, n;
242
+ let l = this.nextVisibleSibling, i = this.getMutableNode();
243
+ i.index = this.index, i.level = this.level, i.parentKey = this.parentNode instanceof p ? this.parentNode.node.key : null;
244
+ var o;
245
+ i.prevKey = (o = (e = this.previousVisibleSibling) === null || e === void 0 ? void 0 : e.node.key) !== null && o !== void 0 ? o : null;
246
+ var d;
247
+ i.nextKey = (d = l == null ? void 0 : l.node.key) !== null && d !== void 0 ? d : null, i.hasChildNodes = !!this.firstChild;
248
+ var s;
249
+ i.firstChildKey = (s = (t = this.firstVisibleChild) === null || t === void 0 ? void 0 : t.node.key) !== null && s !== void 0 ? s : null;
250
+ var a;
251
+ if (i.lastChildKey = (a = (n = this.lastVisibleChild) === null || n === void 0 ? void 0 : n.node.key) !== null && a !== void 0 ? a : null, (i.colSpan != null || i.colIndex != null) && l) {
252
+ var c, h;
253
+ let f = ((c = i.colIndex) !== null && c !== void 0 ? c : i.index) + ((h = i.colSpan) !== null && h !== void 0 ? h : 1);
254
+ if (f !== l.node.colIndex) {
255
+ let A = l.getMutableNode();
256
+ A.colIndex = f;
257
+ }
258
+ }
259
+ }
260
+ setProps(e, t, n, l) {
261
+ let i = this.getMutableNode(), { value: o, textValue: d, id: s, ...a } = e;
262
+ if (a.ref = t, i.props = a, i.rendered = n, i.render = l, i.value = o, i.textValue = d || (typeof a.children == "string" ? a.children : "") || e["aria-label"] || "", s != null && s !== i.key) {
263
+ if (this.hasSetProps) throw new Error("Cannot change the id of an item");
264
+ i.key = s;
265
+ }
266
+ a.colSpan != null && (i.colSpan = a.colSpan), this.hasSetProps = !0, this.isConnected && this.ownerDocument.queueUpdate();
267
+ }
268
+ get style() {
269
+ let e = this;
270
+ return {
271
+ get display() {
272
+ return e.isHidden ? "none" : "";
273
+ },
274
+ set display(t) {
275
+ let n = t === "none";
276
+ if (e.isHidden !== n) {
277
+ var l, i;
278
+ (((l = e.parentNode) === null || l === void 0 ? void 0 : l.firstVisibleChild) === e || ((i = e.parentNode) === null || i === void 0 ? void 0 : i.lastVisibleChild) === e) && e.ownerDocument.markDirty(e.parentNode);
279
+ let o = e.previousVisibleSibling, d = e.nextVisibleSibling;
280
+ o && e.ownerDocument.markDirty(o), d && e.ownerDocument.markDirty(d), e.isHidden = n, e.ownerDocument.markDirty(e);
281
+ }
282
+ }
283
+ };
284
+ }
285
+ hasAttribute() {
286
+ }
287
+ setAttribute() {
288
+ }
289
+ setAttributeNS() {
290
+ }
291
+ removeAttribute() {
292
+ }
293
+ constructor(e, t) {
294
+ super(t), this.nodeType = 8, this.isMutated = !0, this._index = 0, this.hasSetProps = !1, this.isHidden = !1, this.node = new b(e, `react-aria-${++t.nodeId}`);
295
+ }
296
+ }
297
+ class W extends D {
298
+ get isConnected() {
299
+ return this.isMounted;
300
+ }
301
+ createElement(e) {
302
+ return new p(e, this);
303
+ }
304
+ getMutableCollection() {
305
+ return this.nextCollection || (this.nextCollection = this.collection.clone()), this.nextCollection;
306
+ }
307
+ markDirty(e) {
308
+ this.dirtyNodes.add(e);
309
+ }
310
+ addNode(e) {
311
+ if (e.isHidden) return;
312
+ let t = this.getMutableCollection();
313
+ if (!t.getItem(e.node.key)) for (let n of e) this.addNode(n);
314
+ t.addNode(e.node);
315
+ }
316
+ removeNode(e) {
317
+ for (let n of e) this.removeNode(n);
318
+ this.getMutableCollection().removeNode(e.node.key);
319
+ }
320
+ /** Finalizes the collection update, updating all nodes and freezing the collection. */
321
+ getCollection() {
322
+ return this.inSubscription ? this.collection.clone() : (this.queuedRender = !1, this.updateCollection(), this.collection);
323
+ }
324
+ updateCollection() {
325
+ for (let i of this.dirtyNodes) i instanceof p && (!i.isConnected || i.isHidden) ? this.removeNode(i) : i.updateChildIndices();
326
+ for (let i of this.dirtyNodes) i instanceof p && (i.isConnected && !i.isHidden && (i.updateNode(), this.addNode(i)), i.isMutated = !1);
327
+ if (this.dirtyNodes.clear(), this.nextCollection) {
328
+ var e, t, n, l;
329
+ this.nextCollection.commit((n = (e = this.firstVisibleChild) === null || e === void 0 ? void 0 : e.node.key) !== null && n !== void 0 ? n : null, (l = (t = this.lastVisibleChild) === null || t === void 0 ? void 0 : t.node.key) !== null && l !== void 0 ? l : null, this.isSSR), this.isSSR || (this.collection = this.nextCollection, this.nextCollection = null);
330
+ }
331
+ }
332
+ queueUpdate() {
333
+ if (!(this.dirtyNodes.size === 0 || this.queuedRender)) {
334
+ this.queuedRender = !0, this.inSubscription = !0;
335
+ for (let e of this.subscriptions) e();
336
+ this.inSubscription = !1;
337
+ }
338
+ }
339
+ subscribe(e) {
340
+ return this.subscriptions.add(e), () => this.subscriptions.delete(e);
341
+ }
342
+ resetAfterSSR() {
343
+ this.isSSR && (this.isSSR = !1, this.firstChild = null, this.lastChild = null, this.nodeId = 0);
344
+ }
345
+ constructor(e) {
346
+ super(null), this.nodeType = 11, this.ownerDocument = this, this.dirtyNodes = /* @__PURE__ */ new Set(), this.isSSR = !1, this.nodeId = 0, this.nodesByProps = /* @__PURE__ */ new WeakMap(), this.isMounted = !0, this.nextCollection = null, this.subscriptions = /* @__PURE__ */ new Set(), this.queuedRender = !1, this.inSubscription = !1, this.collection = e, this.nextCollection = e;
347
+ }
348
+ }
349
+ function E(r) {
350
+ let { children: e, items: t, idScope: n, addIdAndValue: l, dependencies: i = [] } = r, o = C(() => /* @__PURE__ */ new WeakMap(), i);
351
+ return C(() => {
352
+ if (t && typeof e == "function") {
353
+ let a = [];
354
+ for (let c of t) {
355
+ let h = o.get(c);
356
+ if (!h) {
357
+ h = e(c);
358
+ var d, s;
359
+ let f = (s = (d = h.props.id) !== null && d !== void 0 ? d : c.key) !== null && s !== void 0 ? s : c.id;
360
+ if (f == null) throw new Error("Could not determine key for item");
361
+ n && (f = n + ":" + f), h = I(h, l ? {
362
+ key: f,
363
+ id: f,
364
+ value: c
365
+ } : {
366
+ key: f
367
+ }), o.set(c, h);
368
+ }
369
+ a.push(h);
370
+ }
371
+ return a;
372
+ } else if (typeof e != "function") return e;
373
+ }, [
374
+ e,
375
+ t,
376
+ o,
377
+ n,
378
+ l
379
+ ]);
380
+ }
381
+ const R = /* @__PURE__ */ v(!1), x = /* @__PURE__ */ v(null);
382
+ function ne(r) {
383
+ if (y(x))
384
+ return r.content;
385
+ let { collection: t, document: n } = G(r.createCollection);
386
+ return /* @__PURE__ */ u.createElement(u.Fragment, null, /* @__PURE__ */ u.createElement(H, null, /* @__PURE__ */ u.createElement(x.Provider, {
387
+ value: n
388
+ }, r.content)), /* @__PURE__ */ u.createElement(_, {
389
+ render: r.children,
390
+ collection: t
391
+ }));
392
+ }
393
+ function _({ collection: r, render: e }) {
394
+ return e(r);
395
+ }
396
+ function T(r, e, t) {
397
+ let n = M(), l = B(n);
398
+ l.current = n;
399
+ let i = m(() => l.current ? t() : e(), [
400
+ e,
401
+ t
402
+ ]);
403
+ return F.useSyncExternalStore(r, i);
404
+ }
405
+ const j = typeof u.useSyncExternalStore == "function" ? u.useSyncExternalStore : T;
406
+ function G(r) {
407
+ let [e] = q(() => new W((r == null ? void 0 : r()) || new S())), t = m((o) => e.subscribe(o), [
408
+ e
409
+ ]), n = m(() => {
410
+ let o = e.getCollection();
411
+ return e.isSSR && e.resetAfterSSR(), o;
412
+ }, [
413
+ e
414
+ ]), l = m(() => (e.isSSR = !0, e.getCollection()), [
415
+ e
416
+ ]), i = j(t, n, l);
417
+ return L(() => (e.isMounted = !0, () => {
418
+ e.isMounted = !1;
419
+ }), [
420
+ e
421
+ ]), {
422
+ collection: i,
423
+ document: e
424
+ };
425
+ }
426
+ const g = /* @__PURE__ */ v(null);
427
+ function V(r, e, t, n, l, i) {
428
+ let o = m((s) => {
429
+ s == null || s.setProps(e, t, n, i);
430
+ }, [
431
+ e,
432
+ t,
433
+ n,
434
+ i
435
+ ]), d = y(g);
436
+ if (d) {
437
+ let s = d.ownerDocument.nodesByProps.get(e);
438
+ return s || (s = d.ownerDocument.createElement(r), s.setProps(e, t, n, i), d.appendChild(s), d.ownerDocument.updateCollection(), d.ownerDocument.nodesByProps.set(e, s)), l ? /* @__PURE__ */ u.createElement(g.Provider, {
439
+ value: s
440
+ }, l) : null;
441
+ }
442
+ return /* @__PURE__ */ u.createElement(r, {
443
+ ref: o
444
+ }, l);
445
+ }
446
+ function le(r, e) {
447
+ let t = ({ node: l }) => e(l.props, l.props.ref, l), n = N((l, i) => {
448
+ let o = y(K);
449
+ if (!y(R)) {
450
+ if (e.length >= 3) throw new Error(e.name + " cannot be rendered outside a collection.");
451
+ return e(l, i);
452
+ }
453
+ return V(r, l, i, "children" in l ? l.children : null, null, (s) => (
454
+ // Forward FocusableContext to real DOM tree so tooltips work.
455
+ /* @__PURE__ */ u.createElement(K.Provider, {
456
+ value: o
457
+ }, /* @__PURE__ */ u.createElement(t, {
458
+ node: s
459
+ }))
460
+ ));
461
+ });
462
+ return n.displayName = e.name, n;
463
+ }
464
+ function re(r, e, t = P) {
465
+ let n = ({ node: i }) => e(i.props, i.props.ref, i), l = N((i, o) => {
466
+ let d = t(i);
467
+ var s;
468
+ return (s = V(r, i, o, null, d, (a) => /* @__PURE__ */ u.createElement(n, {
469
+ node: a
470
+ }))) !== null && s !== void 0 ? s : /* @__PURE__ */ u.createElement(u.Fragment, null);
471
+ });
472
+ return l.displayName = e.name, l;
473
+ }
474
+ function P(r) {
475
+ return E({
476
+ ...r,
477
+ addIdAndValue: !0
478
+ });
479
+ }
480
+ const $ = /* @__PURE__ */ v(null);
481
+ function se(r) {
482
+ let e = y($), t = ((e == null ? void 0 : e.dependencies) || []).concat(r.dependencies), n = r.idScope || (e == null ? void 0 : e.idScope), l = P({
483
+ ...r,
484
+ idScope: n,
485
+ dependencies: t
486
+ });
487
+ return y(x) && (l = /* @__PURE__ */ u.createElement(J, null, l)), e = C(() => ({
488
+ dependencies: t,
489
+ idScope: n
490
+ }), [
491
+ n,
492
+ ...t
493
+ ]), /* @__PURE__ */ u.createElement($.Provider, {
494
+ value: e
495
+ }, l);
496
+ }
497
+ function J({ children: r }) {
498
+ let e = y(x), t = C(() => /* @__PURE__ */ u.createElement(x.Provider, {
499
+ value: null
500
+ }, /* @__PURE__ */ u.createElement(R.Provider, {
501
+ value: !0
502
+ }, r)), [
503
+ r
504
+ ]);
505
+ return M() ? /* @__PURE__ */ u.createElement(g.Provider, {
506
+ value: e
507
+ }, t) : /* @__PURE__ */ z(t, e);
508
+ }
509
+ const oe = /* @__PURE__ */ v(null), O = {
510
+ CollectionRoot({ collection: r, renderDropIndicator: e }) {
511
+ return w(r, null, e);
512
+ },
513
+ CollectionBranch({ collection: r, parent: e, renderDropIndicator: t }) {
514
+ return w(r, e, t);
515
+ }
516
+ };
517
+ function w(r, e, t) {
518
+ return E({
519
+ items: e ? r.getChildren(e.key) : r,
520
+ dependencies: [
521
+ t
522
+ ],
523
+ children(n) {
524
+ let l = n.render(n);
525
+ return !t || n.type !== "item" ? l : /* @__PURE__ */ u.createElement(u.Fragment, null, t({
526
+ type: "item",
527
+ key: n.key,
528
+ dropPosition: "before"
529
+ }), l, Q(r, n, t));
530
+ }
531
+ });
532
+ }
533
+ function Q(r, e, t) {
534
+ let n = e.key, l = r.getKeyAfter(n), i = l != null ? r.getItem(l) : null;
535
+ for (; i != null && i.type !== "item"; )
536
+ l = r.getKeyAfter(i.key), i = l != null ? r.getItem(l) : null;
537
+ let o = e.nextKey != null ? r.getItem(e.nextKey) : null;
538
+ for (; o != null && o.type !== "item"; ) o = o.nextKey != null ? r.getItem(o.nextKey) : null;
539
+ let d = [];
540
+ if (o == null) {
541
+ let s = e;
542
+ for (; s && (!i || s.parentKey !== i.parentKey && i.level < s.level); ) {
543
+ let a = t({
544
+ type: "item",
545
+ key: s.key,
546
+ dropPosition: "after"
547
+ });
548
+ /* @__PURE__ */ U(a) && d.push(/* @__PURE__ */ I(a, {
549
+ key: `${s.key}-after`
550
+ })), s = s.parentKey != null ? r.getItem(s.parentKey) : null;
551
+ }
552
+ }
553
+ return d;
554
+ }
555
+ const de = /* @__PURE__ */ v(O);
556
+ function ue(r) {
557
+ return C(() => r != null ? /* @__PURE__ */ new Set([
558
+ r
559
+ ]) : null, [
560
+ r
561
+ ]);
562
+ }
563
+ export {
564
+ le as $,
565
+ re as a,
566
+ ne as b,
567
+ se as c,
568
+ de as d,
569
+ oe as e,
570
+ O as f,
571
+ ue as g,
572
+ Q as h,
573
+ E as i,
574
+ S as j,
575
+ b as k
576
+ };
@@ -0,0 +1,106 @@
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import * as d from "react";
3
+ import { a as h, T as a } from "./ToggleButtonGroup-B5yz1tm2.js";
4
+ import { c as s } from "./createLucideIcon-DeWljiyi.js";
5
+ import { $ as c } from "./VisuallyHidden-ZCYf65q4.js";
6
+ import './assets/ColorSchemeSwitch.css';/**
7
+ * @license lucide-react v0.453.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */
12
+ const p = s("Laptop", [
13
+ [
14
+ "path",
15
+ {
16
+ d: "M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",
17
+ key: "tarvll"
18
+ }
19
+ ]
20
+ ]);
21
+ /**
22
+ * @license lucide-react v0.453.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */
27
+ const u = s("Moon", [
28
+ ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
29
+ ]);
30
+ /**
31
+ * @license lucide-react v0.453.0 - ISC
32
+ *
33
+ * This source code is licensed under the ISC license.
34
+ * See the LICENSE file in the root directory of this source tree.
35
+ */
36
+ const y = s("Sun", [
37
+ ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
38
+ ["path", { d: "M12 2v2", key: "tus03m" }],
39
+ ["path", { d: "M12 20v2", key: "1lh1kg" }],
40
+ ["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
41
+ ["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }],
42
+ ["path", { d: "M2 12h2", key: "1t8f8n" }],
43
+ ["path", { d: "M20 12h2", key: "1q8mjw" }],
44
+ ["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
45
+ ["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
46
+ ]), k = "_button_1dy1i_1", r = {
47
+ button: k
48
+ }, b = ({
49
+ selector: o = "body",
50
+ defaultValue: i = /* @__PURE__ */ new Set(["light dark"])
51
+ }) => {
52
+ const [n, m] = d.useState(i);
53
+ return d.useEffect(() => {
54
+ const l = document.querySelector(o);
55
+ l ? l.style.setProperty(
56
+ "color-scheme",
57
+ Array.from(n).join(" ")
58
+ ) : console.warn(`No element found for selector: "${o}"`);
59
+ }, [n, o]), /* @__PURE__ */ t(
60
+ h,
61
+ {
62
+ selectionMode: "single",
63
+ selectedKeys: n,
64
+ onSelectionChange: m,
65
+ disallowEmptySelection: !0,
66
+ children: [
67
+ /* @__PURE__ */ t(
68
+ a,
69
+ {
70
+ id: "light dark",
71
+ className: r.button,
72
+ children: [
73
+ /* @__PURE__ */ e(p, {}),
74
+ /* @__PURE__ */ e(c, { children: "Systeminställning" })
75
+ ]
76
+ }
77
+ ),
78
+ /* @__PURE__ */ t(
79
+ a,
80
+ {
81
+ id: "light",
82
+ className: r.button,
83
+ children: [
84
+ /* @__PURE__ */ e(y, {}),
85
+ /* @__PURE__ */ e(c, { children: "Ljust läge" })
86
+ ]
87
+ }
88
+ ),
89
+ /* @__PURE__ */ t(
90
+ a,
91
+ {
92
+ id: "dark",
93
+ className: r.button,
94
+ children: [
95
+ /* @__PURE__ */ e(u, {}),
96
+ /* @__PURE__ */ e(c, { children: "Mörkt läge" })
97
+ ]
98
+ }
99
+ )
100
+ ]
101
+ }
102
+ );
103
+ };
104
+ export {
105
+ b as C
106
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";require('./assets/ColorSchemeSwitch.css');const e=require("react/jsx-runtime"),u=require("react"),r=require("./ToggleButtonGroup-BFDoj0P6.cjs"),l=require("./createLucideIcon-Cg_wkoIA.cjs"),s=require("./VisuallyHidden-CLWHbz2n.cjs");function h(t){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(c,o,n.get?n:{enumerable:!0,get:()=>t[o]})}}return c.default=t,Object.freeze(c)}const d=h(u);/**
2
+ * @license lucide-react v0.453.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const p=l.createLucideIcon("Laptop",[["path",{d:"M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",key:"tarvll"}]]);/**
7
+ * @license lucide-react v0.453.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const m=l.createLucideIcon("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
12
+ * @license lucide-react v0.453.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const g=l.createLucideIcon("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),y="_button_1dy1i_1",a={button:y},f=({selector:t="body",defaultValue:c=new Set(["light dark"])})=>{const[o,n]=d.useState(c);return d.useEffect(()=>{const i=document.querySelector(t);i?i.style.setProperty("color-scheme",Array.from(o).join(" ")):console.warn(`No element found for selector: "${t}"`)},[o,t]),e.jsxs(r.ToggleButtonGroup,{selectionMode:"single",selectedKeys:o,onSelectionChange:n,disallowEmptySelection:!0,children:[e.jsxs(r.ToggleButton,{id:"light dark",className:a.button,children:[e.jsx(p,{}),e.jsx(s.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:"Systeminställning"})]}),e.jsxs(r.ToggleButton,{id:"light",className:a.button,children:[e.jsx(g,{}),e.jsx(s.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:"Ljust läge"})]}),e.jsxs(r.ToggleButton,{id:"dark",className:a.button,children:[e.jsx(m,{}),e.jsx(s.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:"Mörkt läge"})]})]})};exports.ColorSchemeSwitch=f;