@midas-ds/components 14.0.0 → 14.1.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 (290) hide show
  1. package/AccordionItem-CAi-XFOc.js +343 -0
  2. package/AccordionItem-tWS22wDv.cjs +1 -0
  3. package/{Breadcrumbs-DpUPChG9.cjs → Breadcrumbs-BBDGxc68.cjs} +1 -1
  4. package/{Breadcrumbs-CV3rVTjR.js → Breadcrumbs-BenPNv8Z.js} +4 -4
  5. package/Button-1sEX8jKn.cjs +1 -0
  6. package/{Button-xc8A29pm.cjs → Button-BEWKXjlP.cjs} +1 -1
  7. package/{Button-CRIYvCRM.js → Button-CF97piBl.js} +1 -1
  8. package/{Button-B6lxIKPk.js → Button-CGe3Nyos.js} +121 -115
  9. package/CHANGELOG.md +26 -0
  10. package/{Card-CfosvMF5.js → Card-DJ8E5Rzd.js} +3 -3
  11. package/{Card-D2E3gviQ.cjs → Card-Db9xdzJ0.cjs} +1 -1
  12. package/{CharacterCounter-C-PFKoGg.cjs → CharacterCounter-CTpQ12f7.cjs} +1 -1
  13. package/{CharacterCounter-DpFONstE.js → CharacterCounter-gbDGfize.js} +2 -2
  14. package/Checkbox-BgrLxY6P.cjs +1 -0
  15. package/{Checkbox-Cr3MmHPE.js → Checkbox-CdN1D5pD.js} +94 -90
  16. package/{CheckboxGroup-DEY3JDEL.js → CheckboxGroup-B1b-6bKq.js} +7 -7
  17. package/{CheckboxGroup-f9Oa1MhQ.cjs → CheckboxGroup-BfZyy5yU.cjs} +1 -1
  18. package/{Collection-j_iWeuZo.js → Collection-BkxwF21i.js} +205 -213
  19. package/Collection-vGO6v3_U.cjs +1 -0
  20. package/{ColorSchemeSwitch-Cur7zN5_.cjs → ColorSchemeSwitch-BOooU0iy.cjs} +1 -1
  21. package/{ColorSchemeSwitch-ChFSNntp.js → ColorSchemeSwitch-KjnsdbDr.js} +2 -2
  22. package/{ComboBox-D7eKe-M5.js → ComboBox-D1ZSZ6m-.js} +254 -246
  23. package/ComboBox-Dztk_jtC.cjs +1 -0
  24. package/{DateField-BszKZodr.cjs → DateField-BogEOseq.cjs} +1 -1
  25. package/{DateField-xyhyDy7u.js → DateField-lsr_1fw4.js} +4 -4
  26. package/{DateInputDivider-2Wf2hlXA.js → DateInputDivider-CRv3YuXd.js} +191 -188
  27. package/DateInputDivider-CYqm6PZP.cjs +1 -0
  28. package/{DateRangePicker-YwKi0ukr.js → DateRangePicker-5k1swaEt.js} +119 -115
  29. package/DateRangePicker-CgNXWOT6.cjs +6 -0
  30. package/Dialog-B1N4Ndyx.js +256 -0
  31. package/{Dialog-DOyFzvUa.js → Dialog-BUAp30Wc.js} +712 -694
  32. package/Dialog-BgSxz1JW.cjs +1 -0
  33. package/Dialog-PrnV8KTh.cjs +6 -0
  34. package/{DragAndDrop-DQ_6tl6K.cjs → DragAndDrop-Cs-V-9ak.cjs} +1 -1
  35. package/{DragAndDrop-DPRU3Y0Y.js → DragAndDrop-DF0VoPJw.js} +1 -1
  36. package/{Dropdown-5rmvcHD_.cjs → Dropdown-DBFLb8Tl.cjs} +1 -1
  37. package/{Dropdown-uC9wc8vd.js → Dropdown-DaARa89l.js} +2 -2
  38. package/{FieldError-C4WBoCRc.cjs → FieldError-Cimgm8qD.cjs} +1 -1
  39. package/{FieldError-C4kD4yJZ.js → FieldError-l3xULRa0.js} +3 -3
  40. package/{FileUpload-01wGpykv.js → FileUpload-CN0HNJ_Y.js} +9 -9
  41. package/{FileUpload-CTbh7Gic.cjs → FileUpload-DHmsupSe.cjs} +1 -1
  42. package/Group-B0Wj9pI8.cjs +1 -0
  43. package/Group-BAd7alBM.js +46 -0
  44. package/{Heading-CEx2LJyM.js → Heading-CCoGfKQ8.js} +9 -9
  45. package/{Heading-CUShN98j.cjs → Heading-x7y3xadc.cjs} +1 -1
  46. package/{InfoBanner-CRSz8DK2.js → InfoBanner-BW3vy9mc.js} +1 -1
  47. package/{InfoBanner-D_pNj1J2.cjs → InfoBanner-_M_rGQiu.cjs} +1 -1
  48. package/{Input-CCuE9Sc5.cjs → Input-Bda0PCu5.cjs} +1 -1
  49. package/{Input-CkTOajNJ.js → Input-CQzv-D9g.js} +3 -3
  50. package/{Label-CV9p0K2n.js → Label-BGMXsSFb.js} +4 -4
  51. package/{Label-CkIRTC0_.cjs → Label-CNTODOFg.cjs} +1 -1
  52. package/Layout-BrEuHajQ.cjs +16 -0
  53. package/{Layout-IeVrHpT0.js → Layout-JL9l-y7w.js} +62 -63
  54. package/{Link-BFvUN5Sq.js → Link-BudFjYrw.js} +1 -1
  55. package/{Link-D2K7bDd3.cjs → Link-BvUSTIip.cjs} +1 -1
  56. package/{Link-a3Ymcnoa.cjs → Link-DRU6Qzia.cjs} +1 -1
  57. package/{Link-B9CQXWzE.js → Link-l-nMP-Zd.js} +5 -5
  58. package/{LinkButton-BCn5gR10.cjs → LinkButton-DGdnbTgR.cjs} +1 -1
  59. package/{LinkButton-DN3J1Agu.js → LinkButton-DP9W-E32.js} +1 -1
  60. package/ListBox-TGCxrXIJ.cjs +1 -0
  61. package/{ListBox-2eEa1l0M.js → ListBox-mOCZvKD4.js} +187 -176
  62. package/{ListBoxLoadMoreItem-IcGb_XwN.js → ListBoxLoadMoreItem-CLdTe6-z.js} +3 -3
  63. package/{ListBoxLoadMoreItem-BBE3OF4J.cjs → ListBoxLoadMoreItem-UX0jFQN4.cjs} +1 -1
  64. package/ListBoxSection-BNBHosou.cjs +1 -0
  65. package/{ListBoxSection-dksiACMZ.js → ListBoxSection-D_kTkvgG.js} +139 -140
  66. package/{ListKeyboardDelegate-Dyu4eFtP.js → ListKeyboardDelegate-BHnZMUhW.js} +36 -40
  67. package/ListKeyboardDelegate-CLRlDto7.cjs +1 -0
  68. package/{OverlayArrow-Bh_G2tJ3.js → OverlayArrow-CjGslX2c.js} +2 -2
  69. package/{OverlayArrow-DJ4nNscD.cjs → OverlayArrow-bcrb_syE.cjs} +1 -1
  70. package/{Popover-D7_IfJ3o.js → Popover-CZFi2YGz.js} +2 -2
  71. package/{Popover-BI2Koco0.cjs → Popover-uYTWBGHa.cjs} +1 -1
  72. package/{PressResponder-DUhG97jJ.js → PressResponder-BMj6Zvbn.js} +3 -3
  73. package/{PressResponder-AXK2I_yx.cjs → PressResponder-ChvCuOue.cjs} +1 -1
  74. package/{ProgressBar-B-TOuoAC.cjs → ProgressBar-BGemuJIq.cjs} +1 -1
  75. package/{ProgressBar-B0WEQkyq.js → ProgressBar-DhRmckYM.js} +2 -2
  76. package/{RSPContexts-BW2SEIqe.js → RSPContexts-B0lEq7qq.js} +5 -3
  77. package/RSPContexts-XUvspq3j.cjs +1 -0
  78. package/Radio-Bp_31Z59.js +340 -0
  79. package/Radio-D3RGVrEd.cjs +1 -0
  80. package/{RangeCalendar-D5TMu8GI.js → RangeCalendar-9C96gMvy.js} +58 -58
  81. package/{RangeCalendar-B6zKSDju.cjs → RangeCalendar-ChfmP_ql.cjs} +2 -2
  82. package/{SearchField-wojUSY2S.js → SearchField-DrEdzWAy.js} +3 -3
  83. package/{SearchField-DnBBlPT7.cjs → SearchField-JaDXLq5W.cjs} +1 -1
  84. package/Select-BCUH-Z7q.cjs +1 -0
  85. package/Select-CpPE78Ke.js +676 -0
  86. package/SelectionIndicator-BiSN1toV.cjs +1 -0
  87. package/{FocusScope-8ILtcq9W.js → SelectionIndicator-ant6jeC1.js} +256 -165
  88. package/SelectionManager-C469yQeD.js +1063 -0
  89. package/SelectionManager-uFYC4wpu.cjs +1 -0
  90. package/{Separator--4b7vckr.js → Separator-B6l5qSpR.js} +2 -2
  91. package/{Separator-COlhRmJF.js → Separator-BWAnBMVN.js} +4 -4
  92. package/{Separator-DcbM84B8.cjs → Separator-DbhmtwDa.cjs} +1 -1
  93. package/{Separator-BQkxEZC9.cjs → Separator-J0pLW4BN.cjs} +1 -1
  94. package/Spinner-D6Fcu_Dp.js +54 -0
  95. package/Spinner-DIapnvIz.cjs +6 -0
  96. package/TabList-C0tRVI6Q.cjs +1 -0
  97. package/TabList-DmkxO7MM.js +394 -0
  98. package/Table-BLqjyYKk.cjs +16 -0
  99. package/{Table-cCSOrPkK.js → Table-CyWZO9uf.js} +707 -703
  100. package/Tag-DJqYiBLR.js +774 -0
  101. package/Tag-FDHGu_WP.cjs +1 -0
  102. package/{Text-CkhG15SU.cjs → Text-0wXj3J8E.cjs} +1 -1
  103. package/{Text-BQe1I4-r.js → Text-BBFWBNAH.js} +1 -1
  104. package/{Text-CkhZTTV5.cjs → Text-D5OSv6Uv.cjs} +1 -1
  105. package/{Text-BpERRete.js → Text-bqP9NeVg.js} +1 -1
  106. package/{TextArea-B5TsyJxa.cjs → TextArea-CZxwvBcS.cjs} +1 -1
  107. package/{TextArea-Cado2arG.js → TextArea-CrY7P18c.js} +8 -8
  108. package/{TextField-5AI6T1ol.js → TextField-BWea-IT-.js} +10 -10
  109. package/TextField-DsN-kBfh.cjs +1 -0
  110. package/{Toast-Cs-Uvf1p.cjs → Toast-DUZ5jfG1.cjs} +1 -1
  111. package/{Toast-CgXRE33Y.js → Toast-Di3h8A14.js} +12 -12
  112. package/{ToggleButtonGroup-SKGgfFs4.js → ToggleButtonGroup-Bh4hP6Lk.js} +82 -78
  113. package/ToggleButtonGroup-D7r34GCt.cjs +1 -0
  114. package/{Tooltip-txk48Qof.js → Tooltip-CUdmOznK.js} +4 -4
  115. package/{Tooltip-BrupFzaI.cjs → Tooltip-D-ATlbIM.cjs} +1 -1
  116. package/{VisuallyHidden-Awup6QxT.cjs → VisuallyHidden-BMelU6B0.cjs} +1 -1
  117. package/{VisuallyHidden-D2ZXHTJs.js → VisuallyHidden-DuW70K-5.js} +1 -1
  118. package/accordion/index.cjs +1 -1
  119. package/accordion/index.js +1 -1
  120. package/assets/AccordionItem.css +1 -1
  121. package/assets/RangeCalendar.css +1 -1
  122. package/assets/Spinner.css +1 -1
  123. package/assets/TabList.css +1 -1
  124. package/assets/default.css +1 -1
  125. package/breadcrumbs/index.cjs +1 -1
  126. package/breadcrumbs/index.js +1 -1
  127. package/button/index.cjs +1 -1
  128. package/button/index.js +1 -1
  129. package/calendar/index.cjs +1 -1
  130. package/calendar/index.js +1 -1
  131. package/card/index.cjs +1 -1
  132. package/card/index.js +1 -1
  133. package/character-counter/index.cjs +1 -1
  134. package/character-counter/index.js +1 -1
  135. package/checkbox/index.cjs +1 -1
  136. package/checkbox/index.js +2 -2
  137. package/color-scheme-switch/index.cjs +1 -1
  138. package/color-scheme-switch/index.js +1 -1
  139. package/combobox/index.cjs +1 -1
  140. package/combobox/index.js +1 -1
  141. package/date-field/index.cjs +1 -1
  142. package/date-field/index.js +2 -2
  143. package/date-picker/index.cjs +1 -1
  144. package/date-picker/index.js +1 -1
  145. package/dropdown/index.cjs +1 -1
  146. package/dropdown/index.js +1 -1
  147. package/field-error/index.cjs +1 -1
  148. package/field-error/index.js +1 -1
  149. package/file-upload/index.cjs +1 -1
  150. package/file-upload/index.js +1 -1
  151. package/{getScrollParent-Ru2U2LlM.js → getScrollParent-DFCzfqHG.js} +1 -1
  152. package/{getScrollParent-DuKmPmUa.cjs → getScrollParent-DjULaF_q.cjs} +1 -1
  153. package/heading/index.cjs +1 -1
  154. package/heading/index.js +1 -1
  155. package/index.cjs +1 -1
  156. package/index.js +42 -42
  157. package/info-banner/index.cjs +1 -1
  158. package/info-banner/index.js +1 -1
  159. package/label/index.cjs +1 -1
  160. package/label/index.js +1 -1
  161. package/layout/index.cjs +1 -1
  162. package/layout/index.js +1 -1
  163. package/link/index.cjs +1 -1
  164. package/link/index.js +2 -2
  165. package/link-button/index.cjs +1 -1
  166. package/link-button/index.js +2 -2
  167. package/list-box/index.cjs +1 -1
  168. package/list-box/index.js +2 -2
  169. package/menu/index.cjs +1 -1
  170. package/menu/index.js +2 -2
  171. package/modal/index.cjs +1 -1
  172. package/modal/index.js +2 -2
  173. package/package.json +4 -4
  174. package/popover/index.cjs +1 -1
  175. package/popover/index.js +1 -1
  176. package/progress-bar/index.cjs +1 -1
  177. package/progress-bar/index.js +1 -1
  178. package/radio/index.cjs +1 -1
  179. package/radio/index.js +1 -1
  180. package/scrollIntoView-BVI21Y4-.js +65 -0
  181. package/scrollIntoView-BueMOyGp.cjs +1 -0
  182. package/search-field/index.cjs +1 -1
  183. package/search-field/index.js +1 -1
  184. package/select/index.cjs +1 -1
  185. package/select/index.js +1 -1
  186. package/select/types.d.ts +1 -1
  187. package/select/useMultiSelect.d.ts +2 -2
  188. package/spinner/Spinner.d.ts +5 -1
  189. package/spinner/index.cjs +1 -1
  190. package/spinner/index.js +1 -1
  191. package/table/index.cjs +1 -1
  192. package/table/index.js +1 -1
  193. package/tabs/Tabs.d.ts +2 -9
  194. package/tabs/index.cjs +1 -1
  195. package/tabs/index.d.ts +0 -1
  196. package/tabs/index.js +1 -1
  197. package/tag/index.cjs +1 -1
  198. package/tag/index.js +1 -1
  199. package/text/index.cjs +1 -1
  200. package/text/index.js +1 -1
  201. package/textfield/TextArea.d.ts +3 -2
  202. package/textfield/TextField.d.ts +3 -2
  203. package/textfield/index.cjs +1 -1
  204. package/textfield/index.js +1 -1
  205. package/toast/index.cjs +1 -1
  206. package/toast/index.js +1 -1
  207. package/toggle-button/index.cjs +1 -1
  208. package/toggle-button/index.js +1 -1
  209. package/tooltip/index.cjs +1 -1
  210. package/tooltip/index.js +1 -1
  211. package/{useButton-Bh3duhYL.cjs → useButton-C0r5nrqs.cjs} +1 -1
  212. package/{useButton-A-VOfwuT.js → useButton-CRgN6aZf.js} +2 -2
  213. package/useDateFormatter-BrrFo4nY.cjs +1 -0
  214. package/{useDateFormatter-CxlJTAki.js → useDateFormatter-Bs5A6Xtu.js} +353 -322
  215. package/{useField-sSWPm-He.js → useField-BhJ9dM2g.js} +1 -1
  216. package/{useField-CY4OYE5a.cjs → useField-DvszkIMx.cjs} +1 -1
  217. package/{useFilter-DHcouDzv.js → useFilter-BdUU-HQZ.js} +1 -1
  218. package/{useFilter-DlZLqsJD.cjs → useFilter-R2IPvbS8.cjs} +1 -1
  219. package/{useFocusRing-Cig5Y0l-.cjs → useFocusRing-C-XVcAE5.cjs} +1 -1
  220. package/{useFocusRing-Copf_tx8.js → useFocusRing-CcxI7nbg.js} +2 -2
  221. package/{useFocusWithin-BKopz9sr.js → useFocusWithin-DhXBuB2O.js} +1 -1
  222. package/{useFocusWithin-TryC2Kkw.cjs → useFocusWithin-GBjoTL5o.cjs} +1 -1
  223. package/{useFocusable-CCh54GIw.js → useFocusable-BJj-Bkig.js} +3 -3
  224. package/{useFocusable-DhdAtEw8.cjs → useFocusable-M4se1KJt.cjs} +1 -1
  225. package/{useFormValidation-DdIIVZ5j.js → useFormValidation-By7G-T7y.js} +1 -1
  226. package/{useFormValidation-BJNizNDf.cjs → useFormValidation-DV2Ioblb.cjs} +1 -1
  227. package/useHasTabbableChild-CIZGg_iG.cjs +1 -0
  228. package/{useHasTabbableChild-BbgOpdGQ.js → useHasTabbableChild-CnpSoDuJ.js} +1 -1
  229. package/{useHighlightSelectionDescription-D6F-YO6b.cjs → useHighlightSelectionDescription-CBZfyrhy.cjs} +1 -1
  230. package/{useHighlightSelectionDescription-BL_02EKv.js → useHighlightSelectionDescription-DPiqOr_Z.js} +2 -2
  231. package/{useHover-eU40luVI.cjs → useHover-DULSfLuK.cjs} +1 -1
  232. package/{useHover-zCCNtF6g.js → useHover-DkC5FyNd.js} +4 -4
  233. package/{useListState-BdC308Sq.cjs → useListState-DBawAMhF.cjs} +1 -1
  234. package/{useListState-D2yPZrFZ.js → useListState-PZF3ahpk.js} +1 -1
  235. package/{usePress-4yZ5a87p.js → usePress-BqQIhkNY.js} +43 -43
  236. package/usePress-DmU79HEg.cjs +7 -0
  237. package/{useSingleSelectListState-lyai-bC_.js → useSingleSelectListState-BLRBEJC7.js} +1 -1
  238. package/{useSingleSelectListState-b_SPhYG4.cjs → useSingleSelectListState-CNETmoj5.cjs} +1 -1
  239. package/{useTextField-DjxrmW7d.js → useTextField-B8pM0p6X.js} +4 -4
  240. package/{useTextField-DUEQl6sr.cjs → useTextField-CiWV3eeD.cjs} +1 -1
  241. package/utils/types.d.ts +5 -0
  242. package/utils-CtICjCYt.cjs +1 -0
  243. package/{utils-BMBoiyL7.js → utils-D2iKpxcZ.js} +43 -39
  244. package/utils-DRIRjPUS.cjs +1 -0
  245. package/{utils-CrT5PVBA.js → utils-Dxh86KaB.js} +19 -17
  246. package/AccordionItem-BJw5IKe0.js +0 -334
  247. package/AccordionItem-DhMimhYo.cjs +0 -1
  248. package/Button-BTX5G3le.cjs +0 -1
  249. package/Checkbox-D-CFY6QF.cjs +0 -1
  250. package/Collection-DaZzboRu.cjs +0 -1
  251. package/ComboBox-C4NybZ32.cjs +0 -1
  252. package/DateInputDivider-BgXKFwB0.cjs +0 -1
  253. package/DateRangePicker-DTPkr3hX.cjs +0 -6
  254. package/Dialog-DLnopN3Z.js +0 -237
  255. package/Dialog-DNu42oLH.cjs +0 -1
  256. package/Dialog-w6EBWT__.cjs +0 -1
  257. package/FocusScope-Dv0F-mG2.cjs +0 -1
  258. package/Group-C2hEIsGV.js +0 -45
  259. package/Group-cuyk9Hsy.cjs +0 -1
  260. package/Layout-CVnlO10z.cjs +0 -16
  261. package/ListBox-Bx9M5vqb.cjs +0 -1
  262. package/ListBoxSection-kujY2gUl.cjs +0 -1
  263. package/ListKeyboardDelegate-DJDPir-w.cjs +0 -1
  264. package/RSPContexts-D8hmBfGm.cjs +0 -1
  265. package/Radio-D6KNkSA2.js +0 -333
  266. package/Radio-DsVsutMH.cjs +0 -1
  267. package/Select-D9h_RQ2k.cjs +0 -1
  268. package/Select-Dc6y8gPR.js +0 -654
  269. package/SelectionManager-D-4ThfPZ.js +0 -1043
  270. package/SelectionManager-FYrDfe5v.cjs +0 -1
  271. package/Spinner-CTha503N.js +0 -47
  272. package/Spinner-DKQ9_SQB.cjs +0 -6
  273. package/TabList-BhC96APe.cjs +0 -1
  274. package/TabList-P5HnizZt.js +0 -393
  275. package/Table-BB8Ag5_3.cjs +0 -16
  276. package/Tag-D2vh0KRD.js +0 -765
  277. package/Tag-D32MGLjS.cjs +0 -1
  278. package/TextField-4xfAzdBI.cjs +0 -1
  279. package/ToggleButtonGroup-CiX2eXB8.cjs +0 -1
  280. package/scrollIntoView-ClEACHUk.js +0 -57
  281. package/scrollIntoView-DRSoJp89.cjs +0 -1
  282. package/useDateFormatter-D0bVjgIb.cjs +0 -1
  283. package/useHasTabbableChild-wH3RCjTd.cjs +0 -1
  284. package/useObserveElement-BdI4zgd7.js +0 -27
  285. package/useObserveElement-BzEr5D32.cjs +0 -1
  286. package/usePress-Dj3t18Pf.cjs +0 -7
  287. package/utils-I-LGXGYH.cjs +0 -1
  288. package/utils-cBvgilDa.cjs +0 -1
  289. package/variables-B3KEYyhW.cjs +0 -1
  290. package/variables-DzXcMW2k.js +0 -5
@@ -1,8 +1,8 @@
1
1
  import { jsx as t, jsxs as m, Fragment as d } from "react/jsx-runtime";
2
2
  import { c as e } from "./clsx-jbLnTBqA.js";
3
- import { s as a } from "./ListBoxSection-dksiACMZ.js";
4
- import { $ as c } from "./ListBox-2eEa1l0M.js";
5
- import { S as l } from "./Spinner-CTha503N.js";
3
+ import { s as a } from "./ListBoxSection-D_kTkvgG.js";
4
+ import { $ as c } from "./ListBox-mOCZvKD4.js";
5
+ import { S as l } from "./Spinner-D6Fcu_Dp.js";
6
6
  import { u as p } from "./useLocalizedStringFormatter-aOhh7wdl.js";
7
7
  const S = ({ className: o, children: s, ...r }) => /* @__PURE__ */ t(
8
8
  "button",
@@ -1 +1 @@
1
- "use strict";const t=require("react/jsx-runtime"),r=require("./clsx-DKOfLqne.cjs"),n=require("./ListBoxSection-kujY2gUl.cjs"),c=require("./ListBox-Bx9M5vqb.cjs"),l=require("./Spinner-DKQ9_SQB.cjs"),d=require("./useLocalizedStringFormatter-BSac43NO.cjs"),x=({className:s,children:e,...o})=>t.jsx("button",{type:"button",className:r.clsx(n.styles.listBoxItem,n.styles.listBoxButton,s),...o,children:e}),u={"loading...":"Loading..."},m={"loading...":"Laddar..."},L={en:u,sv:m},B=({className:s,children:e,isLoading:o,...i})=>{const a=d.useLocalizedStringFormatter(L);return t.jsx(c.$eed445e0843c11d0$export$8e6d031a08cf56a1,{className:r.clsx(n.styles.listBoxLoadMoreItem,s),isLoading:o,...i,children:e||t.jsxs(t.Fragment,{children:[t.jsx(l.Spinner,{small:!0}),t.jsx("span",{"aria-hidden":!0,children:a.format("loading...")})]})})};exports.ListBoxButton=x;exports.ListBoxLoadMoreItem=B;
1
+ "use strict";const t=require("react/jsx-runtime"),r=require("./clsx-DKOfLqne.cjs"),n=require("./ListBoxSection-BNBHosou.cjs"),c=require("./ListBox-TGCxrXIJ.cjs"),l=require("./Spinner-DIapnvIz.cjs"),d=require("./useLocalizedStringFormatter-BSac43NO.cjs"),x=({className:s,children:e,...o})=>t.jsx("button",{type:"button",className:r.clsx(n.styles.listBoxItem,n.styles.listBoxButton,s),...o,children:e}),u={"loading...":"Loading..."},m={"loading...":"Laddar..."},L={en:u,sv:m},B=({className:s,children:e,isLoading:o,...i})=>{const a=d.useLocalizedStringFormatter(L);return t.jsx(c.$eed445e0843c11d0$export$8e6d031a08cf56a1,{className:r.clsx(n.styles.listBoxLoadMoreItem,s),isLoading:o,...i,children:e||t.jsxs(t.Fragment,{children:[t.jsx(l.Spinner,{small:!0}),t.jsx("span",{"aria-hidden":!0,children:a.format("loading...")})]})})};exports.ListBoxButton=x;exports.ListBoxLoadMoreItem=B;
@@ -0,0 +1 @@
1
+ "use strict";require('./assets/ListBoxSection.css');const S=require("react/jsx-runtime"),M=require("./ListBox-TGCxrXIJ.cjs"),Y=require("./Collection-vGO6v3_U.cjs"),c=require("react"),L=require("./mergeProps-Du5A8xi8.cjs"),D=require("./context-UOrD6Zxk.cjs"),T=require("react-dom"),Z=require("./OverlayArrow-bcrb_syE.cjs"),ee=require("./useEvent-C125NAue.cjs"),V=require("./clsx-DKOfLqne.cjs"),q=require("./SelectionManager-uFYC4wpu.cjs"),te=require("./Dialog-PrnV8KTh.cjs"),ie=require("./Separator-J0pLW4BN.cjs");class le{shouldInvalidate(e,t){return e.width!==t.width||e.height!==t.height}shouldInvalidateLayoutOptions(e,t){return e!==t}update(e){}getItemRect(e){var t,i;return(i=(t=this.getLayoutInfo(e))===null||t===void 0?void 0:t.rect)!==null&&i!==void 0?i:null}getVisibleRect(){return this.virtualizer.visibleRect}constructor(){this.virtualizer=null}}class b{copy(){let e=new b(this.type,this.key,this.rect.copy());return e.estimatedSize=this.estimatedSize,e.opacity=this.opacity,e.transform=this.transform,e.parentKey=this.parentKey,e.content=this.content,e.isSticky=this.isSticky,e.zIndex=this.zIndex,e.allowOverflow=this.allowOverflow,e}constructor(e,t,i){this.type=e,this.key=t,this.parentKey=null,this.content=null,this.rect=i,this.estimatedSize=!1,this.isSticky=!1,this.opacity=1,this.transform=null,this.zIndex=0,this.allowOverflow=!1}}class x{copy(){return new x(this.x,this.y)}equals(e){return this.x===e.x&&this.y===e.y}isOrigin(){return this.x===0&&this.y===0}constructor(e=0,t=0){this.x=e,this.y=t}}class g{get maxX(){return this.x+this.width}get maxY(){return this.y+this.height}get area(){return this.width*this.height}get topLeft(){return new x(this.x,this.y)}get topRight(){return new x(this.maxX,this.y)}get bottomLeft(){return new x(this.x,this.maxY)}get bottomRight(){return new x(this.maxX,this.maxY)}intersects(e){return(process.env.NODE_ENV==="test"&&!process.env.VIRT_ON||this.area>0&&e.area>0)&&this.x<=e.x+e.width&&e.x<=this.x+this.width&&this.y<=e.y+e.height&&e.y<=this.y+this.height}containsRect(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.maxX&&this.maxY>=e.maxY}containsPoint(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.x&&this.maxY>=e.y}getCornerInRect(e){for(let t of["topLeft","topRight","bottomLeft","bottomRight"])if(e.containsPoint(this[t]))return t;return null}equals(e){return e.x===this.x&&e.y===this.y&&e.width===this.width&&e.height===this.height}pointEquals(e){return this.x===e.x&&this.y===e.y}sizeEquals(e){return this.width===e.width&&this.height===e.height}union(e){let t=Math.min(this.x,e.x),i=Math.min(this.y,e.y),l=Math.max(this.maxX,e.maxX)-t,o=Math.max(this.maxY,e.maxY)-i;return new g(t,i,l,o)}intersection(e){if(!this.intersects(e))return new g(0,0,0,0);let t=Math.max(this.x,e.x),i=Math.max(this.y,e.y);return new g(t,i,Math.min(this.maxX,e.maxX)-t,Math.min(this.maxY,e.maxY)-i)}copy(){return new g(this.x,this.y,this.width,this.height)}constructor(e=0,t=0,i=0,l=0){this.x=e,this.y=t,this.width=i,this.height=l}}class z{copy(){return new z(this.width,this.height)}equals(e){return this.width===e.width&&this.height===e.height}get area(){return this.width*this.height}constructor(e=0,t=0){this.width=Math.max(e,0),this.height=Math.max(t,0)}}let oe=0;class W{prepareForReuse(){this.content=null,this.rendered=null,this.layoutInfo=null}getReusableView(e){let t=this.reusableViews.get(e);return t&&t.length>0?t.shift():new se(this.virtualizer,this,e)}reuseChild(e){e.prepareForReuse();let t=this.reusableViews.get(e.viewType);t||(t=[],this.reusableViews.set(e.viewType,t)),t.push(e)}constructor(e,t){this.virtualizer=e,this.key=++oe,this.viewType=t,this.children=new Set,this.reusableViews=new Map,this.layoutInfo=null,this.content=null,this.rendered=null}}class ne extends W{constructor(e){super(e,"root")}}class se extends W{constructor(e,t,i){super(e,i),this.parent=t}}function re(n,e){if(n===e)return!0;if(n.size!==e.size)return!1;for(let t of n)if(!e.has(t))return!1;return!0}class ae{setVisibleRect(e){let t=performance.now()-this.startTime;t<500&&(e.x!==this.visibleRect.x&&t>0&&(this.velocity.x=(e.x-this.visibleRect.x)/t),e.y!==this.visibleRect.y&&t>0&&(this.velocity.y=(e.y-this.visibleRect.y)/t)),this.startTime=performance.now(),this.visibleRect=e}getOverscannedRect(){let e=this.visibleRect.copy(),t=this.visibleRect.height/3;if(e.height+=t,this.velocity.y<0&&(e.y-=t),this.velocity.x!==0){let i=this.visibleRect.width/3;e.width+=i,this.velocity.x<0&&(e.x-=i)}return e}constructor(){this.startTime=0,this.velocity=new x(0,0),this.visibleRect=new g}}class he{isPersistedKey(e){if(this.persistedKeys.has(e))return!0;for(let t of this.persistedKeys)for(;t!=null;){let i=this.layout.getLayoutInfo(t);if(!i||i.parentKey==null)break;if(t=i.parentKey,t===e)return!0}return!1}getParentView(e){return e.parentKey!=null?this._visibleViews.get(e.parentKey):this._rootView}getReusableView(e){let i=this.getParentView(e).getReusableView(e.type);return i.layoutInfo=e,this._renderView(i),i}_renderView(e){if(e.layoutInfo){let{type:t,key:i,content:l}=e.layoutInfo;e.content=l||this.collection.getItem(i),e.rendered=this._renderContent(t,e.content)}}_renderContent(e,t){let i=t!=null?this._renderedContent.get(t):null;if(i!=null)return i;let l=this.delegate.renderView(e,t);return t&&this._renderedContent.set(t,l),l}keyAtPoint(e){let t=new g(e.x,e.y,1,1),i=t.area===0?[]:this.layout.getVisibleLayoutInfos(t);for(let l of i)if(l.rect.intersects(t))return l.key;return null}relayout(e={}){this.layout.update(e),this.contentSize=this.layout.getContentSize();let t=this.visibleRect,i=e.contentChanged?0:t.x,l=e.contentChanged?0:t.y;if(i=Math.max(0,Math.min(this.contentSize.width-t.width,i)),l=Math.max(0,Math.min(this.contentSize.height-t.height,l)),i!==t.x||l!==t.y){let o=new g(i,l,t.width,t.height);this.delegate.setVisibleRect(o)}else this.updateSubviews()}getVisibleLayoutInfos(){let e=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,t=e&&typeof HTMLElement<"u"&&Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientWidth"),i=e&&typeof HTMLElement<"u"&&Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientHeight"),l;e&&!(t&&i)?l=new g(0,0,this.contentSize.width,this.contentSize.height):l=this._overscanManager.getOverscannedRect();let o=this.layout.getVisibleLayoutInfos(l),s=new Map;for(let a of o)s.set(a.key,a);return s}updateSubviews(){let e=this.getVisibleLayoutInfos(),t=new Set;for(let[i,l]of this._visibleViews){let o=e.get(i);(!o||l.parent!==this.getParentView(o))&&(this._visibleViews.delete(i),l.parent.reuseChild(l),t.add(l))}for(let[i,l]of e){let o=this._visibleViews.get(i);if(!o)o=this.getReusableView(l),o.parent.children.add(o),this._visibleViews.set(i,o),t.delete(o);else{o.layoutInfo=l;let s=this.collection.getItem(l.key);o.content!==s&&(o.content!=null&&this._renderedContent.delete(o.content),this._renderView(o))}}for(let i of t)i.parent.children.delete(i),i.parent.reusableViews.clear();if(!this._isScrolling)for(let i of e.keys()){let l=this._visibleViews.get(i);l.parent.children.delete(l),l.parent.children.add(l)}}render(e){let t=this,i=!1,l=!1,o=!1,s=!1,a=!1,h=!1;return e.collection!==this.collection&&(t.collection=e.collection,i=!0),(e.layout!==this.layout||this.layout.virtualizer!==this)&&(this.layout&&(this.layout.virtualizer=null),e.layout.virtualizer=this,t.layout=e.layout,i=!0),e.persistedKeys&&!re(e.persistedKeys,this.persistedKeys)&&(t.persistedKeys=e.persistedKeys,h=!0),this.visibleRect.equals(e.visibleRect)||(this._overscanManager.setVisibleRect(e.visibleRect),this.layout.shouldInvalidate(e.visibleRect,this.visibleRect)?(l=!e.visibleRect.pointEquals(this.visibleRect),o=!e.visibleRect.sizeEquals(this.visibleRect),i=!0):h=!0,t.visibleRect=e.visibleRect),e.invalidationContext!==this._invalidationContext&&(e.invalidationContext&&(o||(o=e.invalidationContext.sizeChanged||!1),l||(l=e.invalidationContext.offsetChanged||!1),s||(s=e.invalidationContext.itemSizeChanged||!1),a||(a=e.invalidationContext.layoutOptions!=null&&this._invalidationContext.layoutOptions!=null&&e.invalidationContext.layoutOptions!==this._invalidationContext.layoutOptions&&this.layout.shouldInvalidateLayoutOptions(e.invalidationContext.layoutOptions,this._invalidationContext.layoutOptions)),i||(i=s||o||l||a)),this._invalidationContext=e.invalidationContext),e.isScrolling!==this._isScrolling&&(this._isScrolling=e.isScrolling,e.isScrolling||(h=!0)),i?this.relayout({offsetChanged:l,sizeChanged:o,itemSizeChanged:s,layoutOptionsChanged:a,layoutOptions:this._invalidationContext.layoutOptions}):h&&this.updateSubviews(),Array.from(this._rootView.children)}getVisibleView(e){return this._visibleViews.get(e)}invalidate(e){this.delegate.invalidate(e)}updateItemSize(e,t){if(!this.layout.updateItemSize)return;this.layout.updateItemSize(e,t)&&this.invalidate({itemSizeChanged:!0})}constructor(e){this.delegate=e.delegate,this.collection=e.collection,this.layout=e.layout,this.contentSize=new z,this.visibleRect=new g,this.persistedKeys=new Set,this._visibleViews=new Map,this._renderedContent=new WeakMap,this._rootView=new ne(this),this._isScrolling=!1,this._invalidationContext={},this._overscanManager=new ae}}const de=typeof document<"u"?c.useLayoutEffect:()=>{};function ce(n){let[e,t]=c.useState(new g(0,0,0,0)),[i,l]=c.useState(!1),[o,s]=c.useState({}),a=c.useRef(!1),[h]=c.useState(()=>new he({collection:n.collection,layout:n.layout,delegate:{setVisibleRect(p){t(p),a.current=!0},renderView:n.renderView,invalidate:s}}));de(()=>{a.current&&(a.current=!1,n.onVisibleRectChange(e))});let r=c.useMemo(()=>n.layoutOptions!=null?{...o,layoutOptions:n.layoutOptions}:o,[o,n.layoutOptions]),d=h.render({layout:n.layout,collection:n.collection,persistedKeys:n.persistedKeys,layoutOptions:n.layoutOptions,visibleRect:e,invalidationContext:r,isScrolling:i}),u=h.contentSize,f=c.useCallback(()=>{l(!0)},[]),v=c.useCallback(()=>{l(!1)},[]);return c.useMemo(()=>({virtualizer:h,visibleViews:d,setVisibleRect:t,contentSize:u,isScrolling:i,startScrolling:f,endScrolling:v}),[h,d,t,u,i,f,v])}const $=48;class ue extends le{get collection(){return this.virtualizer.collection}getLayoutInfo(e){var t;return this.ensureLayoutInfo(e),((t=this.layoutNodes.get(e))===null||t===void 0?void 0:t.layoutInfo)||null}getVisibleLayoutInfos(e){if(e.height>1){var t,i;let s=((i=(t=this.rowHeight)!==null&&t!==void 0?t:this.estimatedRowHeight)!==null&&i!==void 0?i:$)+this.gap;e.y=Math.floor(e.y/s)*s,e.height=Math.ceil(e.height/s)*s}this.layoutIfNeeded(e);let l=[],o=s=>{for(let a of s)this.isVisible(a,e)&&(l.push(a.layoutInfo),a.children&&o(a.children))};return o(this.rootNodes),l}layoutIfNeeded(e){if(this.lastCollection){this.requestedRect.containsRect(e)||(this.requestedRect=this.requestedRect.union(e),this.rootNodes=this.buildCollection());for(let t of this.virtualizer.persistedKeys)if(this.ensureLayoutInfo(t))return}}ensureLayoutInfo(e){return!this.layoutNodes.has(e)&&this.requestedRect.area<this.contentSize.area&&this.lastCollection?(this.requestedRect=new g(0,0,1/0,1/0),this.rootNodes=this.buildCollection(),this.requestedRect=new g(0,0,this.contentSize.width,this.contentSize.height),!0):!1}isVisible(e,t){return e.layoutInfo.rect.intersects(t)||e.layoutInfo.isSticky||e.layoutInfo.type==="header"||e.layoutInfo.type==="loader"||this.virtualizer.isPersistedKey(e.layoutInfo.key)}shouldInvalidateEverything(e){let t=e.layoutOptions;var i,l,o,s,a;return e.sizeChanged||this.rowHeight!==((i=t==null?void 0:t.rowHeight)!==null&&i!==void 0?i:this.rowHeight)||this.headingHeight!==((l=t==null?void 0:t.headingHeight)!==null&&l!==void 0?l:this.headingHeight)||this.loaderHeight!==((o=t==null?void 0:t.loaderHeight)!==null&&o!==void 0?o:this.loaderHeight)||this.gap!==((s=t==null?void 0:t.gap)!==null&&s!==void 0?s:this.gap)||this.padding!==((a=t==null?void 0:t.padding)!==null&&a!==void 0?a:this.padding)}shouldInvalidateLayoutOptions(e,t){return e.rowHeight!==t.rowHeight||e.estimatedRowHeight!==t.estimatedRowHeight||e.headingHeight!==t.headingHeight||e.estimatedHeadingHeight!==t.estimatedHeadingHeight||e.loaderHeight!==t.loaderHeight||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.gap!==t.gap||e.padding!==t.padding}update(e){let t=this.virtualizer.collection;this.invalidateEverything=this.shouldInvalidateEverything(e),this.invalidateEverything&&(this.requestedRect=this.virtualizer.visibleRect.copy(),this.layoutNodes.clear());let i=e.layoutOptions;var l;this.rowHeight=(l=i==null?void 0:i.rowHeight)!==null&&l!==void 0?l:this.rowHeight;var o;this.estimatedRowHeight=(o=i==null?void 0:i.estimatedRowHeight)!==null&&o!==void 0?o:this.estimatedRowHeight;var s;this.headingHeight=(s=i==null?void 0:i.headingHeight)!==null&&s!==void 0?s:this.headingHeight;var a;this.estimatedHeadingHeight=(a=i==null?void 0:i.estimatedHeadingHeight)!==null&&a!==void 0?a:this.estimatedHeadingHeight;var h;this.loaderHeight=(h=i==null?void 0:i.loaderHeight)!==null&&h!==void 0?h:this.loaderHeight;var r;this.dropIndicatorThickness=(r=i==null?void 0:i.dropIndicatorThickness)!==null&&r!==void 0?r:this.dropIndicatorThickness;var d;this.gap=(d=i==null?void 0:i.gap)!==null&&d!==void 0?d:this.gap;var u;if(this.padding=(u=i==null?void 0:i.padding)!==null&&u!==void 0?u:this.padding,this.rootNodes=this.buildCollection(),this.lastCollection&&t!==this.lastCollection)for(let f of this.lastCollection.getKeys())t.getItem(f)||this.layoutNodes.get(f)&&this.layoutNodes.delete(f);this.lastCollection=t,this.invalidateEverything=!1,this.validRect=this.requestedRect.copy()}buildCollection(e=this.padding){let t=this.virtualizer.collection,i=[...t],l=i.filter(r=>r.type==="loader"),o=[],s=(t==null?void 0:t.size)===0;s&&(e=0);for(let r of i){var a,h;let d=((h=(a=this.rowHeight)!==null&&a!==void 0?a:this.estimatedRowHeight)!==null&&h!==void 0?h:$)+this.gap;if(r.type==="item"&&e+d<this.requestedRect.y&&!this.isValid(r,e)){e+=d;continue}let u=this.buildChild(r,this.padding,e,null);if(e=u.layoutInfo.rect.maxY+this.gap,o.push(u),r.type==="loader"){let f=l.indexOf(r);l.splice(f,1)}if((r.type==="item"||r.type==="loader")&&e>this.requestedRect.maxY){let f=i.indexOf(r);for(let v of l){let y=i.indexOf(v);e+=(y-f-1)*d;let p=this.buildChild(v,this.padding,e,null);o.push(p),e=p.layoutInfo.rect.maxY,f=y}e+=(i.length-f-1)*d;break}}return e-=this.gap,e+=s?0:this.padding,this.contentSize=new z(this.virtualizer.visibleRect.width,e),o}isValid(e,t){let i=this.layoutNodes.get(e.key);return!this.invalidateEverything&&!!i&&i.node===e&&t===i.layoutInfo.rect.y&&i.layoutInfo.rect.intersects(this.validRect)&&i.validRect.containsRect(i.layoutInfo.rect.intersection(this.requestedRect))}buildChild(e,t,i,l){if(this.isValid(e,i))return this.layoutNodes.get(e.key);let o=this.buildNode(e,t,i);return o.layoutInfo.parentKey=l??null,o.layoutInfo.allowOverflow=!0,this.layoutNodes.set(e.key,o),o}buildNode(e,t,i){switch(e.type){case"section":return this.buildSection(e,t,i);case"item":return this.buildItem(e,t,i);case"header":return this.buildSectionHeader(e,t,i);case"loader":return this.buildLoader(e,t,i);case"separator":return this.buildItem(e,t,i);default:throw new Error("Unsupported node type: "+e.type)}}buildLoader(e,t,i){let l=new g(t,i,this.padding,0),o=new b("loader",e.key,l);l.width=this.virtualizer.contentSize.width-this.padding-t;var s,a,h;return l.height=e.props.isLoading?(h=(a=(s=this.loaderHeight)!==null&&s!==void 0?s:this.rowHeight)!==null&&a!==void 0?a:this.estimatedRowHeight)!==null&&h!==void 0?h:$:0,{layoutInfo:o,validRect:l.intersection(this.requestedRect)}}buildSection(e,t,i){let l=this.virtualizer.collection,o=this.virtualizer.visibleRect.width-this.padding,s=new g(t,i,o-t,0),a=new b(e.type,e.key,s),h=i,r=0,d=[];for(let v of q.$c5a24bc478652b5f$export$1005530eda016c13(e,l)){var u,f;let y=((f=(u=this.rowHeight)!==null&&u!==void 0?u:this.estimatedRowHeight)!==null&&f!==void 0?f:$)+this.gap;if(i+y<this.requestedRect.y&&!this.isValid(e,i)){i+=y,r++;continue}let p=this.buildChild(v,t,i,a.key);if(i=p.layoutInfo.rect.maxY+this.gap,d.push(p),i>this.requestedRect.maxY){i+=([...q.$c5a24bc478652b5f$export$1005530eda016c13(e,l)].length-(d.length+r))*y;break}}return i-=this.gap,s.height=i-h,{layoutInfo:a,children:d,validRect:a.rect.intersection(this.requestedRect),node:e}}buildSectionHeader(e,t,i){let l=this.virtualizer.visibleRect.width-this.padding,o=this.headingHeight,s=!1;if(o==null){let r=this.layoutNodes.get(e.key),d=r==null?void 0:r.layoutInfo;if(d){let u=this.virtualizer.collection.getItem(e.key),f=this.lastCollection?this.lastCollection.getItem(e.key):null;o=d.rect.height,s=l!==d.rect.width||u!==f||d.estimatedSize}else o=e.rendered?this.estimatedHeadingHeight:0,s=!0}o==null&&(o=$);let a=new g(t,i,l-t,o),h=new b("header",e.key,a);return h.estimatedSize=s,{layoutInfo:h,children:[],validRect:h.rect.intersection(this.requestedRect),node:e}}buildItem(e,t,i){let l=this.virtualizer.visibleRect.width-this.padding-t,o=this.rowHeight,s=!1;if(o==null){let r=this.layoutNodes.get(e.key);r?(o=r.layoutInfo.rect.height,s=l!==r.layoutInfo.rect.width||e!==r.node||r.layoutInfo.estimatedSize):(o=this.estimatedRowHeight,s=!0)}o==null&&(o=$);let a=new g(t,i,l,o),h=new b(e.type,e.key,a);return h.estimatedSize=s,{layoutInfo:h,children:[],validRect:h.rect,node:e}}updateItemSize(e,t){let i=this.layoutNodes.get(e);if(!i)return!1;let l=this.virtualizer.collection,o=i.layoutInfo;if(o.estimatedSize=!1,o.rect.height!==t.height){let s=o.copy();s.rect.height=t.height,i.layoutInfo=s,this.validRect.height=Math.min(this.validRect.height,o.rect.y-this.validRect.y),this.requestedRect.height+=s.rect.height-o.rect.height,this.updateLayoutNode(e,o,s);let a=o.parentKey!=null?l.getItem(o.parentKey):null;for(;a;)this.updateLayoutNode(a.key,o,s),a=a.parentKey!=null?l.getItem(a.parentKey):null;return!0}return!1}updateLayoutNode(e,t,i){let l=this.layoutNodes.get(e);l&&(l.validRect=l.validRect.intersection(this.validRect),l.layoutInfo===t&&(l.layoutInfo=i))}getContentSize(){return this.contentSize}getDropTargetFromPoint(e,t,i){e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let l=new g(e,Math.max(0,t-this.gap),1,Math.max(1,this.gap*2)),o=this.getVisibleLayoutInfos(l),s=null,a=1/0;for(let u of o){if(!u.rect.intersects(l))continue;let f=Math.abs(u.rect.y-t),v=Math.abs(u.rect.maxY-t),y=Math.min(f,v);y<a&&(a=y,s=u.key)}if(s==null||this.virtualizer.collection.size===0)return{type:"root"};let h=this.getLayoutInfo(s);if(!h)return null;let r=h.rect,d={type:"item",key:h.key,dropPosition:"on"};return i(d)?t<=r.y+10&&i({...d,dropPosition:"before"})?d.dropPosition="before":t>=r.maxY-10&&i({...d,dropPosition:"after"})&&(d.dropPosition="after"):t<=r.y+r.height/2&&i({...d,dropPosition:"before"})?d.dropPosition="before":i({...d,dropPosition:"after"})&&(d.dropPosition="after"),d}getDropTargetLayoutInfo(e){let t=this.getLayoutInfo(e.key),i;if(e.dropPosition==="before")i=new g(t.rect.x,Math.max(0,t.rect.y-this.dropIndicatorThickness/2),t.rect.width,this.dropIndicatorThickness);else if(e.dropPosition==="after"){let o=this.collection.getItem(e.key);if(o){var l;let s=(l=o.level)!==null&&l!==void 0?l:0,a=this.collection.getKeyAfter(e.key);for(;a!=null;){let h=this.collection.getItem(a);if(!h||h.level<=s)break;t=this.getLayoutInfo(a)||t,a=this.collection.getKeyAfter(a)}}i=new g(t.rect.x,t.rect.maxY-this.dropIndicatorThickness/2,t.rect.width,this.dropIndicatorThickness)}else i=t.rect;return new b("dropIndicator",e.key+":"+e.dropPosition,i)}constructor(e={}){super();var t;this.rowHeight=(t=e.rowHeight)!==null&&t!==void 0?t:null;var i;this.estimatedRowHeight=(i=e.estimatedRowHeight)!==null&&i!==void 0?i:null;var l;this.headingHeight=(l=e.headingHeight)!==null&&l!==void 0?l:null;var o;this.estimatedHeadingHeight=(o=e.estimatedHeadingHeight)!==null&&o!==void 0?o:null;var s;this.loaderHeight=(s=e.loaderHeight)!==null&&s!==void 0?s:null,this.dropIndicatorThickness=e.dropIndicatorThickness||2,this.gap=e.gap||0,this.padding=e.padding||0,this.layoutNodes=new Map,this.rootNodes=[],this.lastCollection=null,this.invalidateEverything=!1,this.validRect=new g,this.requestedRect=new g,this.contentSize=new z}}let R=null;function fe(n=!1){if(R===null||n){const e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";const i=document.createElement("div"),l=i.style;return l.width="100px",l.height="100px",e.appendChild(i),document.body.appendChild(e),e.scrollLeft>0?R="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?R="negative":R="positive-ascending"),document.body.removeChild(e),R}return R}function ge(n,e){let{scrollLeft:t}=n;if(e==="rtl"){let{scrollWidth:i,clientWidth:l}=n;switch(fe()){case"negative":t=-t;break;case"positive-descending":t=i-l-t;break}}return t}function ye(n,e){let{contentSize:t,onVisibleRectChange:i,innerStyle:l,onScrollStart:o,onScrollEnd:s,scrollDirection:a="both",...h}=n,r=c.useRef({scrollTop:0,scrollLeft:0,scrollEndTime:0,scrollTimeout:null,width:0,height:0,isScrolling:!1}).current,{direction:d}=D.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),[u,f]=c.useState(!1),v=c.useCallback(w=>{w.target===w.currentTarget&&(n.onScroll&&n.onScroll(w),T.flushSync(()=>{let m=w.currentTarget.scrollTop,H=ge(w.currentTarget,d);r.scrollTop=Math.max(0,Math.min(m,t.height-r.height)),r.scrollLeft=Math.max(0,Math.min(H,t.width-r.width)),i(new g(r.scrollLeft,r.scrollTop,r.width,r.height)),r.isScrolling||(r.isScrolling=!0,f(!0),window.dispatchEvent(new Event("tk.disconnect-observer")),o&&o());let _=Date.now();r.scrollEndTime<=_+50&&(r.scrollEndTime=_+300,r.scrollTimeout!=null&&clearTimeout(r.scrollTimeout),r.scrollTimeout=setTimeout(()=>{r.isScrolling=!1,f(!1),r.scrollTimeout=null,window.dispatchEvent(new Event("tk.connect-observer")),s&&s()},300))}))},[n,d,r,t,i,o,s]);ee.$e9faafb641e167db$export$90fc3a17d93f704c(e,"scroll",v),c.useEffect(()=>()=>{r.scrollTimeout!=null&&clearTimeout(r.scrollTimeout),r.isScrolling&&window.dispatchEvent(new Event("tk.connect-observer"))},[]);let y=c.useRef(!1),p=L.$8ae05eaa5c114e9c$export$7f54fc3180508a52(w=>{let m=e.current;if(!m||y.current)return;y.current=!0;let H=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,_=Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientWidth"),Q=Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientHeight"),O=m.clientWidth,P=m.clientHeight,N=H&&!_?1/0:O,E=H&&!Q?1/0:P;(r.width!==N||r.height!==E)&&(r.width=N,r.height=E,w(()=>{i(new g(r.scrollLeft,r.scrollTop,N,E))}),(!H&&O!==m.clientWidth||P!==m.clientHeight)&&(r.width=m.clientWidth,r.height=m.clientHeight,w(()=>{i(new g(r.scrollLeft,r.scrollTop,r.width,r.height))}))),y.current=!1}),k=c.useRef(null),[U,G]=c.useState({});L.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(!y.current&&(k.current==null||!t.equals(k.current)))if(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u"){G({}),k.current=t;return}else queueMicrotask(()=>p(T.flushSync));k.current=t}),L.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{p(w=>w())},[U]);let J=c.useCallback(()=>{p(T.flushSync)},[p]);Z.$9daab02d461809db$export$683480f191c0e3ea({ref:e,box:"border-box",onResize:J});let I={padding:0,...h.style};return a==="horizontal"?(I.overflowX="auto",I.overflowY="hidden"):a==="vertical"||t.width===r.width?(I.overflowY="auto",I.overflowX="hidden"):I.overflow="auto",l={width:Number.isFinite(t.width)?t.width:void 0,height:Number.isFinite(t.height)?t.height:void 0,pointerEvents:u?"none":"auto",position:"relative",...l},{isScrolling:u,scrollViewProps:{...h,style:I},contentProps:{role:"presentation",style:l}}}function ve(n){let{layoutInfo:e,virtualizer:t,ref:i}=n,l=e==null?void 0:e.key,o=c.useCallback(()=>{if(l!=null&&i.current){let s=pe(i.current);t.updateItemSize(l,s)}},[t,l,i]);return L.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{e!=null&&e.estimatedSize&&o()}),{updateSize:o}}function pe(n){let e=n.style.height;n.style.height="";let t=new z(n.scrollWidth,n.scrollHeight);return n.style.height=e,t}function X(n){let{style:e,className:t,layoutInfo:i,virtualizer:l,parent:o,children:s}=n,{direction:a}=D.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),h=c.useRef(null);return ve({layoutInfo:i,virtualizer:l,ref:h}),c.createElement("div",{role:"presentation",ref:h,className:t,style:{...we(i,a,o),...e}},s)}let B=new WeakMap;function we(n,e,t){let i=e==="rtl"?"right":"left",l=B.get(n);if(l&&l[i]!=null){if(!t)return l;let h=n.rect.y-t.rect.y,r=n.rect.x-t.rect.x;if(l.top===h&&l[i]===r)return l}let o={top:n.rect.y-(t&&!(t.allowOverflow&&n.isSticky)?t.rect.y:0),[i]:n.rect.x-(t&&!(t.allowOverflow&&n.isSticky)?t.rect.x:0),width:n.rect.width,height:n.rect.height};Object.entries(o).forEach(([h,r])=>{Number.isFinite(r)||(o[h]=void 0)});var s;let a={position:n.isSticky?"sticky":"absolute",display:n.isSticky?"inline-block":void 0,overflow:n.allowOverflow?"visible":"hidden",opacity:n.opacity,zIndex:n.zIndex,transform:(s=n.transform)!==null&&s!==void 0?s:void 0,contain:"size layout style",...o};return B.set(n,a),a}const j=c.createContext(null),A=c.createContext(null);function me(n){let{children:e,layout:t,layoutOptions:i}=n,l=c.useMemo(()=>typeof t=="function"?new t:t,[t]),o=c.useMemo(()=>({isVirtualized:!0,layoutDelegate:l,dropTargetDelegate:l.getDropTargetFromPoint?l:void 0,CollectionRoot:be,CollectionBranch:xe}),[l]);return c.createElement(Y.$7135fc7d473fd974$export$4feb769f8ddf26c5.Provider,{value:o},c.createElement(A.Provider,{value:{layout:l,layoutOptions:i}},e))}function be({collection:n,persistedKeys:e,scrollRef:t,renderDropIndicator:i}){var l;let{layout:o,layoutOptions:s}=c.useContext(A),a=(l=o.useLayoutOptions)===null||l===void 0?void 0:l.call(o),h=ce({layout:o,collection:n,renderView:(d,u)=>{var f;return u==null||(f=u.render)===null||f===void 0?void 0:f.call(u,u)},onVisibleRectChange(d){let u=t==null?void 0:t.current;u&&(u.scrollLeft=d.x,u.scrollTop=d.y)},persistedKeys:e,layoutOptions:c.useMemo(()=>s&&a?{...s,...a}:s||a,[s,a])}),{contentProps:r}=ye({onVisibleRectChange:h.setVisibleRect,contentSize:h.contentSize,onScrollStart:h.startScrolling,onScrollEnd:h.endScrolling},t);return c.createElement("div",r,c.createElement(j.Provider,{value:h},F(null,h.visibleViews,i)))}function xe({parent:n,renderDropIndicator:e}){let i=c.useContext(j).virtualizer.getVisibleView(n.key);return F(i,Array.from(i.children),e)}function F(n,e,t){return e.map(i=>Ie(n,i,t))}function Ie(n,e,t){let i=c.createElement(X,{key:e.key,layoutInfo:e.layoutInfo,virtualizer:e.virtualizer,parent:n==null?void 0:n.layoutInfo},e.rendered),{collection:l,layout:o}=e.virtualizer,s=e.content;return(s==null?void 0:s.type)==="item"&&t&&o.getDropTargetLayoutInfo&&(i=c.createElement(c.Fragment,{key:e.key},K(n,e,{type:"item",key:e.content.key,dropPosition:"before"},t),i,Y.$7135fc7d473fd974$export$2dbbd341daed716d(l,s,a=>K(n,e,a,t)))),i}function K(n,e,t,i){let l=i(t);if(l){let o=e.virtualizer.layout.getDropTargetLayoutInfo(t);l=c.createElement(X,{layoutInfo:o,virtualizer:e.virtualizer,parent:n==null?void 0:n.layoutInfo},l)}return l}class $e extends ue{getContentSize(){var t;const e=(t=this==null?void 0:this.virtualizer)==null?void 0:t.collection.getKeys();return Array.from(e||[]).forEach(i=>{this.getLayoutInfo(i)}),this.contentSize}}const Re="_listBox_ts7z5_4",Se="_listBoxPopover_ts7z5_16",ze="_listBoxSectionHeading_ts7z5_31",He="_listBoxButton_ts7z5_41",Ce="_listBoxItem_ts7z5_53",ke="_listBoxLoadMoreItem_ts7z5_99",C={listBox:Re,listBoxPopover:Se,listBoxSectionHeading:ze,listBoxButton:He,listBoxItem:Ce,listBoxLoadMoreItem:ke},_e=({className:n,children:e,...t})=>S.jsx(me,{layout:$e,layoutOptions:{headingHeight:44},children:S.jsx(M.$eed445e0843c11d0$export$41f133550aa26f48,{className:V.clsx(C.listBox,n),...t,children:e})}),Le=({children:n,className:e,...t})=>S.jsx(M.$eed445e0843c11d0$export$a11e76429ed99b4,{className:V.clsx(C.listBoxItem,e),...t,children:n}),Ne=({className:n,children:e,...t})=>S.jsx(te.$07b14b47974efb58$export$5b6b19405a83ff9d,{className:V.clsx(n,C.listBoxPopover),offset:0,...t,children:e}),Ee=({children:n,name:e,...t})=>S.jsxs(M.$eed445e0843c11d0$export$dca12b0bb56e4fc,{...t,children:[S.jsx(ie.$72a5793c14baf454$export$8b251419efc915eb,{className:C.listBoxSectionHeading,children:e}),n]});exports.ListBox=_e;exports.ListBoxItem=Le;exports.ListBoxPopover=Ne;exports.ListBoxSection=Ee;exports.styles=C;