@midas-ds/components 12.0.0 → 12.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 (458) hide show
  1. package/AccordionItem-C9dBt-tQ.js +335 -0
  2. package/AccordionItem-SOfjXh3V.cjs +1 -0
  3. package/{BadgeContainer-DGJGJMPi.js → BadgeContainer-iNNgJKD9.js} +8 -8
  4. package/BadgeContainer-su0iCJKy.cjs +1 -0
  5. package/Breadcrumbs-BAHJMPsu.js +271 -0
  6. package/Breadcrumbs-DUcHHI_2.cjs +1 -0
  7. package/Button-CMIbSc4-.cjs +1 -0
  8. package/{Button-DtC_ZOyd.js → Button-DD5_S-tD.js} +155 -161
  9. package/{Button-akT6Hvug.js → Button-DYcmg49Z.js} +2 -2
  10. package/{Button-DQm2iqKU.cjs → Button-DrL5Jv-s.cjs} +1 -1
  11. package/Button.module-BNLcvARn.cjs +1 -0
  12. package/Button.module-Bax2YU6N.js +14 -0
  13. package/ButtonGroup-ClYTgaRc.cjs +1 -0
  14. package/{ButtonGroup-DvVvear6.js → ButtonGroup-WZZDPu9Z.js} +1 -1
  15. package/CHANGELOG.md +65 -0
  16. package/Card-BDDyGAMA.js +131 -0
  17. package/Card-mj5lCIR4.cjs +1 -0
  18. package/{CharacterCounter-DQJVM-mZ.cjs → CharacterCounter-CnRv-iUP.cjs} +1 -1
  19. package/CharacterCounter-DT7A0wWP.js +22 -0
  20. package/Checkbox-BtM2rFh9.js +278 -0
  21. package/Checkbox-CvdIG43J.cjs +1 -0
  22. package/CheckboxGroup-C94as9Xt.cjs +1 -0
  23. package/CheckboxGroup-CjcDYBRk.js +157 -0
  24. package/Collection-B0_WAieZ.js +625 -0
  25. package/Collection-BvWp2xBd.cjs +1 -0
  26. package/{ColorSchemeSwitch-DyZ9FAKG.js → ColorSchemeSwitch-C4PMYeD5.js} +20 -28
  27. package/{ColorSchemeSwitch-DtyJ9-5B.cjs → ColorSchemeSwitch-CKcoGZM1.cjs} +3 -3
  28. package/ComboBox-B2EmfOyr.cjs +1 -0
  29. package/{ComboBox-Dn3tQzri.js → ComboBox-BWXJZyOR.js} +522 -507
  30. package/DateField-CcQJYDLD.js +47 -0
  31. package/DateField-IpCiF81R.cjs +1 -0
  32. package/{DateInputDivider-CJEGWmG0.js → DateInputDivider-CXkUdlzc.js} +936 -839
  33. package/DateInputDivider-Cf5GZHlM.cjs +1 -0
  34. package/DateRangePicker-B2BJO1KC.js +889 -0
  35. package/DateRangePicker-Dfwe9RhJ.cjs +6 -0
  36. package/Dialog-B8swxl24.js +1643 -0
  37. package/Dialog-DR6nEqMT.cjs +1 -0
  38. package/Dialog-DgJobm71.cjs +1 -0
  39. package/Dialog-P3frHOdq.js +240 -0
  40. package/DragAndDrop-Dw8JZmrn.cjs +1 -0
  41. package/DragAndDrop-PrUJv--B.js +75 -0
  42. package/{Dropdown-BWbdSQ9U.js → Dropdown-CIvWpN3v.js} +8 -8
  43. package/{Dropdown-CJ-sujKv.cjs → Dropdown-DJ2vWAqk.cjs} +2 -2
  44. package/FieldError-Cornph2A.cjs +1 -0
  45. package/FieldError-DdvFyIf4.js +48 -0
  46. package/{FileUpload-B89QfnCB.js → FileUpload-D2gnQKdn.js} +76 -74
  47. package/{FileUpload-KQ1XAKAc.cjs → FileUpload-D3RaARDV.cjs} +2 -2
  48. package/{FocusScope-CEgd3xCY.js → FocusScope-Bj40Ir-g.js} +192 -195
  49. package/FocusScope-Uy3DiY0-.cjs +1 -0
  50. package/{Grid-Db5wZrw6.cjs → Grid-WbEkSCGh.cjs} +1 -1
  51. package/{Grid-B2av0vt8.js → Grid-s8ovKDi8.js} +1 -1
  52. package/GridItem-CIVF1fRW.cjs +1 -0
  53. package/GridItem-D3FZyyO-.js +243 -0
  54. package/{Group-Cdy6z9ra.cjs → Group-BKYGeOBr.cjs} +1 -1
  55. package/{Group-B3mRMVy7.js → Group-C73mD_-i.js} +13 -13
  56. package/Heading-BQlmb5Tm.js +46 -0
  57. package/Heading-D3FR_KXb.cjs +1 -0
  58. package/{Hidden-B5ir3Lei.js → Hidden-C9KWUR7b.js} +2 -2
  59. package/InfoBanner-CqjnTYaa.cjs +1 -0
  60. package/InfoBanner-CrA8MS3v.js +83 -0
  61. package/{Input-BnpBRnJz.js → Input-BLVRv0FK.js} +9 -9
  62. package/{Input-DIhhWEPW.cjs → Input-CzMx2mfl.cjs} +1 -1
  63. package/{Label-ByWt6Lfh.js → Label-BG7G0iyG.js} +24 -28
  64. package/Label-C00qz3kQ.cjs +1 -0
  65. package/Layout-Bta_Cpq_.cjs +16 -0
  66. package/Layout-CG-Qxr_1.js +482 -0
  67. package/{Link-Dnnv00g9.js → Link-BtxKZ0h3.js} +16 -16
  68. package/Link-Bx6avHVl.cjs +6 -0
  69. package/Link-CbFSuEI1.js +73 -0
  70. package/Link-wM7cVPlS.cjs +1 -0
  71. package/LinkButton-BvXu6vAH.cjs +6 -0
  72. package/LinkButton-D3EnZ65v.js +69 -0
  73. package/ListBox-ICZKGluC.cjs +1 -0
  74. package/ListBox-LncMQt6I.js +523 -0
  75. package/ListBoxLoadMoreItem-Ceo73a2q.cjs +1 -0
  76. package/ListBoxLoadMoreItem-W11V-Lef.js +41 -0
  77. package/ListBoxSection-BCPv9H50.js +1085 -0
  78. package/ListBoxSection-Dx75ZinL.cjs +1 -0
  79. package/{ListKeyboardDelegate-mcrZobNa.js → ListKeyboardDelegate-CVxkAn5D.js} +13 -9
  80. package/ListKeyboardDelegate-C_X1wLkh.cjs +1 -0
  81. package/{Logo-BW5NXAdu.cjs → Logo-CFjZc5u2.cjs} +1 -1
  82. package/{Logo-qkVS1MCN.js → Logo-DkagDdKQ.js} +15 -19
  83. package/OverlayArrow-ByH6lM-H.cjs +1 -0
  84. package/OverlayArrow-CvNuu3e3.js +519 -0
  85. package/{Popover-C5chAY42.cjs → Popover-Bi5yJEoE.cjs} +1 -1
  86. package/{Popover-viLqHHX2.js → Popover-CyEVqpJ6.js} +11 -11
  87. package/{PressResponder-B_Zqu7b1.js → PressResponder-CxVtArtP.js} +9 -9
  88. package/PressResponder-DbnYqwGB.cjs +1 -0
  89. package/ProgressBar-CdXHEJh6.js +53 -0
  90. package/ProgressBar-CjuHokVZ.cjs +1 -0
  91. package/Radio-Bll-7H8O.cjs +1 -0
  92. package/Radio-DoWx2AE1.js +333 -0
  93. package/RangeCalendar-A4WQIG7P.cjs +6 -0
  94. package/{RangeCalendar-DGGMbb0j.js → RangeCalendar-D7eFVAPP.js} +638 -630
  95. package/{SSRProvider-D8lZ0o6A.js → SSRProvider-40TXmsUG.js} +5 -5
  96. package/{SSRProvider-DZRLwxPS.cjs → SSRProvider-Bc-sMhsT.cjs} +1 -1
  97. package/{SearchField-Ma3KB8Em.cjs → SearchField-BbrUZpQm.cjs} +2 -2
  98. package/{SearchField-B0dlPqsW.js → SearchField-F2FKgYds.js} +29 -33
  99. package/Select-BnbDXwgD.cjs +1 -0
  100. package/Select-Dpi3LhbI.js +654 -0
  101. package/{SelectionManager-BdKKuso-.js → SelectionManager-Bq-Gw1UT.js} +291 -282
  102. package/SelectionManager-BtbHoHpA.cjs +1 -0
  103. package/Separator-CM0KPvsX.js +105 -0
  104. package/Separator-Cfv2pbWf.cjs +1 -0
  105. package/Separator-DH-5wu9X.js +77 -0
  106. package/Separator-Dgin8BNW.cjs +1 -0
  107. package/Skeleton-BpYj25p8.js +37 -0
  108. package/Skeleton-DMOxEwnd.cjs +1 -0
  109. package/Spinner-D1UBuLy4.cjs +6 -0
  110. package/Spinner-DTKb_LAA.js +47 -0
  111. package/TabList-D4WwgQY3.cjs +1 -0
  112. package/TabList-D9tl2s85.js +397 -0
  113. package/Table-C6k3PiiC.cjs +16 -0
  114. package/{Table-CTS0J_sQ.js → Table-CkN3y69S.js} +856 -798
  115. package/Tag-7dHEMQum.cjs +1 -0
  116. package/Tag-BUJ20HHw.js +765 -0
  117. package/Text-BAFsaON-.cjs +1 -0
  118. package/{Text--KL3Auo7.js → Text-Be7WIOwv.js} +3 -3
  119. package/{Text-wuw0HQoa.cjs → Text-BtPiT2P1.cjs} +1 -1
  120. package/Text-CmlsaWMA.js +32 -0
  121. package/TextArea-BCikUXaD.cjs +1 -0
  122. package/TextArea-h5_oBQH1.js +125 -0
  123. package/TextField-Bm5916AD.cjs +1 -0
  124. package/TextField-_UY8CXtW.js +134 -0
  125. package/TextField.module-C9Zm9unF.js +13 -0
  126. package/TextField.module-GTQtNO0r.cjs +1 -0
  127. package/{Toast-BnzpC_5v.js → Toast-BBkWczCk.js} +202 -214
  128. package/{Toast-BEh5yYzO.cjs → Toast-DclaxvZM.cjs} +1 -1
  129. package/ToggleButtonGroup-BGG64PK1.js +214 -0
  130. package/ToggleButtonGroup-Da330GRT.cjs +1 -0
  131. package/Tooltip-BHAtsp9k.js +281 -0
  132. package/Tooltip-CZa9n5sT.cjs +1 -0
  133. package/{VisuallyHidden-BKslUoMJ.js → VisuallyHidden-CGEtjAP7.js} +8 -8
  134. package/{VisuallyHidden-DxDOcIsh.cjs → VisuallyHidden-EjrqodVh.cjs} +1 -1
  135. package/accordion/index.cjs +1 -1
  136. package/accordion/index.js +1 -1
  137. package/assets/AccordionItem.css +1 -1
  138. package/assets/BadgeContainer.css +1 -1
  139. package/assets/Breadcrumbs.css +1 -1
  140. package/assets/Button.css +1 -1
  141. package/assets/ButtonGroup.css +1 -1
  142. package/assets/Card.css +1 -1
  143. package/assets/CharacterCounter.css +1 -1
  144. package/assets/Checkbox.css +1 -1
  145. package/assets/ComboBox.css +1 -1
  146. package/assets/DateField.css +1 -1
  147. package/assets/DateInputDivider.css +1 -1
  148. package/assets/DateRangePicker.css +1 -1
  149. package/assets/Dialog.css +1 -1
  150. package/assets/Dropdown.css +1 -1
  151. package/assets/FieldError.css +1 -1
  152. package/assets/FileUpload.css +1 -1
  153. package/assets/GridItem.css +1 -1
  154. package/assets/Heading.css +1 -1
  155. package/assets/InfoBanner.css +1 -1
  156. package/assets/Label.css +1 -1
  157. package/assets/Layout.css +1 -1
  158. package/assets/Link.css +1 -1
  159. package/assets/LinkButton.css +1 -1
  160. package/assets/ListBoxSection.css +1 -1
  161. package/assets/Logo.css +1 -1
  162. package/assets/Popover.css +1 -1
  163. package/assets/ProgressBar.css +1 -1
  164. package/assets/Radio.css +1 -1
  165. package/assets/RangeCalendar.css +1 -1
  166. package/assets/SearchField.css +1 -1
  167. package/assets/Select.css +1 -1
  168. package/assets/Separator.css +1 -0
  169. package/assets/Skeleton.css +1 -1
  170. package/assets/Spinner.css +1 -1
  171. package/assets/TabList.css +1 -1
  172. package/assets/Table.css +1 -1
  173. package/assets/Tag.css +1 -1
  174. package/assets/Text.css +1 -1
  175. package/assets/TextField.css +1 -1
  176. package/assets/Toast.css +1 -1
  177. package/assets/ToggleButtonGroup.css +1 -1
  178. package/assets/Tooltip.css +1 -1
  179. package/assets/theme.css +1 -1
  180. package/assets/variables.css +1 -0
  181. package/badge/index.cjs +1 -1
  182. package/badge/index.js +1 -1
  183. package/breadcrumbs/index.cjs +1 -1
  184. package/breadcrumbs/index.js +1 -1
  185. package/button/index.cjs +1 -1
  186. package/button/index.js +2 -2
  187. package/calendar/index.cjs +1 -1
  188. package/calendar/index.js +1 -1
  189. package/card/index.cjs +1 -1
  190. package/card/index.js +1 -1
  191. package/character-counter/index.cjs +1 -1
  192. package/character-counter/index.js +1 -1
  193. package/checkbox/index.cjs +1 -1
  194. package/checkbox/index.js +2 -2
  195. package/chevron-right-0-sUFBiR.cjs +6 -0
  196. package/chevron-right-BYYHEJjK.js +11 -0
  197. package/color-scheme-switch/index.cjs +1 -1
  198. package/color-scheme-switch/index.js +1 -1
  199. package/combobox/index.cjs +1 -1
  200. package/combobox/index.d.ts +1 -1
  201. package/combobox/index.js +1 -1
  202. package/combobox/intl/translations.json.d.ts +4 -2
  203. package/{context-Dl_saGB6.js → context-CGNJ3grH.js} +11 -11
  204. package/{context-UOrD6Zxk.cjs → context-Df3XbgBG.cjs} +1 -1
  205. package/date-field/index.cjs +1 -1
  206. package/date-field/index.js +2 -2
  207. package/date-picker/index.cjs +1 -1
  208. package/date-picker/index.js +1 -1
  209. package/dropdown/Dropdown.d.ts +18 -0
  210. package/dropdown/index.cjs +1 -1
  211. package/dropdown/index.js +1 -1
  212. package/field-error/index.cjs +1 -1
  213. package/field-error/index.js +1 -1
  214. package/file-upload/index.cjs +1 -1
  215. package/file-upload/index.js +1 -1
  216. package/filterDOMProps-RRlKPKX0.cjs +1 -0
  217. package/filterDOMProps-wsa9OcNI.js +65 -0
  218. package/grid/index.cjs +1 -1
  219. package/grid/index.js +2 -2
  220. package/heading/index.cjs +1 -1
  221. package/heading/index.js +1 -1
  222. package/{index-BSMrH_Du.js → index-BLPblar-.js} +33 -30
  223. package/{index-D97L3EBk.cjs → index-DSFSh2sC.cjs} +3 -3
  224. package/index.cjs +1 -1
  225. package/index.d.ts +2 -0
  226. package/index.js +140 -125
  227. package/inertValue-B3AFhVG4.cjs +1 -0
  228. package/info-banner/index.cjs +1 -1
  229. package/info-banner/index.js +1 -1
  230. package/label/index.cjs +1 -1
  231. package/label/index.js +1 -1
  232. package/layout/index.cjs +1 -1
  233. package/layout/index.js +1 -1
  234. package/link/index.cjs +1 -1
  235. package/link/index.js +2 -2
  236. package/link-button/index.cjs +1 -1
  237. package/link-button/index.js +2 -2
  238. package/list-box/ListBoxLoadMoreItem.d.ts +4 -0
  239. package/list-box/index.cjs +1 -1
  240. package/list-box/index.d.ts +1 -0
  241. package/list-box/index.js +6 -5
  242. package/list-box/intl/translations.json.d.ts +11 -0
  243. package/logo/index.cjs +1 -1
  244. package/logo/index.js +1 -1
  245. package/menu/Menu.d.ts +13 -0
  246. package/menu/MenuItem.d.ts +5 -0
  247. package/menu/MenuPopover.d.ts +3 -0
  248. package/menu/MenuSection.d.ts +3 -0
  249. package/menu/Separator.d.ts +3 -0
  250. package/menu/index.cjs +1 -0
  251. package/menu/index.d.ts +5 -0
  252. package/menu/index.js +8 -0
  253. package/mergeProps-BSsN7Bgk.js +117 -0
  254. package/mergeProps-JhcJ7uJL.cjs +1 -0
  255. package/modal/index.cjs +1 -1
  256. package/modal/index.js +2 -2
  257. package/package.json +6 -4
  258. package/popover/index.cjs +1 -1
  259. package/popover/index.js +1 -1
  260. package/progress-bar/index.cjs +1 -1
  261. package/progress-bar/index.js +1 -1
  262. package/radio/index.cjs +1 -1
  263. package/radio/index.js +1 -1
  264. package/search-field/index.cjs +1 -1
  265. package/search-field/index.js +1 -1
  266. package/select/Select.d.ts +1 -1
  267. package/select/index.cjs +1 -1
  268. package/select/index.js +1 -1
  269. package/skeleton/index.cjs +1 -1
  270. package/skeleton/index.js +1 -1
  271. package/spinner/index.cjs +1 -1
  272. package/spinner/index.js +1 -1
  273. package/table/index.cjs +1 -1
  274. package/table/index.js +1 -1
  275. package/tabs/index.cjs +1 -1
  276. package/tabs/index.js +1 -1
  277. package/tag/index.cjs +1 -1
  278. package/tag/index.js +1 -1
  279. package/text/index.cjs +1 -1
  280. package/text/index.js +1 -1
  281. package/textfield/Input.d.ts +7 -2
  282. package/textfield/PasswordField.d.ts +1 -1
  283. package/textfield/index.cjs +1 -1
  284. package/textfield/index.js +1 -1
  285. package/theme/generated-object.d.ts +384 -0
  286. package/theme/generated-tokens.d.ts +334 -0
  287. package/theme/index.cjs +1 -1
  288. package/theme/index.d.ts +4 -1
  289. package/theme/index.js +4037 -14
  290. package/theme/tokens.d.ts +30 -1
  291. package/toast/index.cjs +1 -1
  292. package/toast/index.js +1 -1
  293. package/toggle-button/index.cjs +1 -1
  294. package/toggle-button/index.js +1 -1
  295. package/{tokens-BWo7EvNX.cjs → tokens-B3FfJ-rY.cjs} +1 -1
  296. package/{tokens-BtEBd3jO.js → tokens-B9ooUP4g.js} +1 -2
  297. package/tooltip/index.cjs +1 -1
  298. package/tooltip/index.js +1 -1
  299. package/useButton-D6iUB8cN.js +56 -0
  300. package/useButton-R8-i3HLC.cjs +1 -0
  301. package/useDateFormatter-2B0vgHc-.cjs +1 -0
  302. package/{useDateFormatter-DiIUdTak.js → useDateFormatter-BJ1ZyaH1.js} +431 -407
  303. package/{useDescription-LmB1V4Tg.js → useDescription-BLmIkYCq.js} +1 -1
  304. package/{useDescription-ByNlNIRU.cjs → useDescription-BMuiAqI5.cjs} +1 -1
  305. package/useEvent-3ZO5TPSH.cjs +1 -0
  306. package/{useEvent-DqWz89vg.js → useEvent-DpBHTuHJ.js} +1 -1
  307. package/{useField-5CEdtfab.js → useField-BMegM8fA.js} +2 -2
  308. package/{useField-CoQAzygg.cjs → useField-DyeD7MLj.cjs} +1 -1
  309. package/{useFilter-BKQT28sh.js → useFilter-BFnSe_Eq.js} +1 -1
  310. package/{useFilter-Bjh5dq2Q.cjs → useFilter-aoggM85n.cjs} +1 -1
  311. package/{useFocusRing-BM-zcH6L.cjs → useFocusRing-BcbYske2.cjs} +1 -1
  312. package/{useFocusRing-HoJn20X5.js → useFocusRing-DMo8ctYV.js} +2 -2
  313. package/{useFocusWithin-Cn18Myw6.js → useFocusWithin-ClMkhYcq.js} +1 -1
  314. package/{useFocusWithin-o0WjCpEB.cjs → useFocusWithin-DTnk0e8a.cjs} +1 -1
  315. package/{useFocusable-DbmryjUH.cjs → useFocusable-CsG-IPuC.cjs} +1 -1
  316. package/{useFocusable-ZjCKo1ed.js → useFocusable-DXlMChFC.js} +14 -14
  317. package/useFormValidation-BQIRxgbU.cjs +1 -0
  318. package/useFormValidation-L0UHvOsP.js +217 -0
  319. package/{useHasTabbableChild-CyOmqumh.js → useHasTabbableChild-BDaxMsGu.js} +2 -2
  320. package/useHasTabbableChild-CJcLnolh.cjs +1 -0
  321. package/{useHighlightSelectionDescription-DTxHtOsw.js → useHighlightSelectionDescription-BkEv9Jye.js} +5 -5
  322. package/{useHighlightSelectionDescription-DAhPdEG6.cjs → useHighlightSelectionDescription-CQaG611l.cjs} +1 -1
  323. package/{useHover-D8fja4GW.js → useHover-D6bNIkU0.js} +81 -79
  324. package/useHover-DGAmG7jt.cjs +1 -0
  325. package/{useLabels-BtDN_ALM.cjs → useLabels-CvUk-yS3.cjs} +1 -1
  326. package/{useLabels-DZlvh4P4.js → useLabels-Kmq5JCp_.js} +1 -1
  327. package/useListState-D2IEg6_e.cjs +1 -0
  328. package/{useListState-e7cL-FOK.js → useListState-pixYqSLl.js} +43 -42
  329. package/{useLocalizedStringFormatter-BSac43NO.cjs → useLocalizedStringFormatter-BO2iZEL0.cjs} +1 -1
  330. package/useLocalizedStringFormatter-BiX5BTlb.cjs +1 -0
  331. package/{useLocalizedStringFormatter-CSEh15AZ.js → useLocalizedStringFormatter-CL9MUZ8A.js} +1 -1
  332. package/{useLocalizedStringFormatter-aOhh7wdl.js → useLocalizedStringFormatter-N0AyjzbM.js} +1 -1
  333. package/useObserveElement-MhzEsCkX.cjs +1 -0
  334. package/usePress-CicXV7UO.cjs +7 -0
  335. package/{usePress-B_jgTf4k.js → usePress-DMUpU0GU.js} +84 -80
  336. package/{useSingleSelectListState-D7LjjoUJ.js → useSingleSelectListState-BlvpP8y-.js} +1 -1
  337. package/{useSingleSelectListState-BiJMNaOl.cjs → useSingleSelectListState-CwWK_Dx2.cjs} +1 -1
  338. package/useTextField-BC5X_AO_.js +89 -0
  339. package/useTextField-Cxpfu0U3.cjs +1 -0
  340. package/useToggleState-BVOqL4hI.js +21 -0
  341. package/useToggleState-SqDyNfRi.cjs +1 -0
  342. package/{useUpdateEffect-sk3kiVGz.cjs → useUpdateEffect-C5YQs_1w.cjs} +1 -1
  343. package/utils/types.d.ts +4 -0
  344. package/{utils-BM2vxlNA.cjs → utils-CMHKYKlz.cjs} +1 -1
  345. package/{utils-KYuflGZt.js → utils-Cpcjg55U.js} +10 -10
  346. package/utils-DFIwp4PB.js +262 -0
  347. package/utils-__vrf9VZ.cjs +1 -0
  348. package/AccordionItem-DEiRuizp.js +0 -361
  349. package/AccordionItem-Dhr7uo8u.cjs +0 -1
  350. package/BadgeContainer-CxVmqJ7g.cjs +0 -1
  351. package/Breadcrumbs-CEyKlcGU.js +0 -262
  352. package/Breadcrumbs-CnGzvtbn.cjs +0 -1
  353. package/Button-DZzQGk-L.cjs +0 -1
  354. package/Button.module-D-mPLRxe.js +0 -14
  355. package/Button.module-goCEz5qs.cjs +0 -1
  356. package/ButtonGroup-DUqW5dzM.cjs +0 -1
  357. package/Card-CwwVnA_a.js +0 -131
  358. package/Card-DPfOZC7f.cjs +0 -1
  359. package/CharacterCounter-DPphWPzA.js +0 -22
  360. package/Checkbox-BN_3F2Hl.js +0 -264
  361. package/Checkbox-CZtCj4yR.cjs +0 -1
  362. package/CheckboxGroup--xgOT1Do.js +0 -159
  363. package/CheckboxGroup-DGHaqRvb.cjs +0 -1
  364. package/Collection-B1xL4EdF.cjs +0 -1
  365. package/Collection-C5vE9MtJ.js +0 -577
  366. package/ComboBox-UadZMhiR.cjs +0 -1
  367. package/DateField-CNEoLyf5.cjs +0 -1
  368. package/DateField-CZmLugT0.js +0 -47
  369. package/DateInputDivider-CCjiq90K.cjs +0 -1
  370. package/DateRangePicker-DhgLEa9P.cjs +0 -6
  371. package/DateRangePicker-WQ97Psz7.js +0 -870
  372. package/Dialog-BT0tVGQb.cjs +0 -1
  373. package/Dialog-BuJdAr0D.js +0 -1611
  374. package/Dialog-DYK8lySl.cjs +0 -1
  375. package/Dialog-L53DWF0Z.js +0 -220
  376. package/DragAndDrop-DKxsUpmW.js +0 -60
  377. package/DragAndDrop-Dgfq6uJ0.cjs +0 -1
  378. package/FieldError-BlKkw9YL.js +0 -46
  379. package/FieldError-BvU0sueN.cjs +0 -1
  380. package/FocusScope-CAgWgk3N.cjs +0 -1
  381. package/GridItem-BnyULDnc.cjs +0 -1
  382. package/GridItem-orSzD7H5.js +0 -243
  383. package/Heading-DDhdwRAW.js +0 -46
  384. package/Heading-OUPkdoEJ.cjs +0 -1
  385. package/InfoBanner-DpLcq_1R.cjs +0 -1
  386. package/InfoBanner-U5hxOipC.js +0 -99
  387. package/Label-COpr4xVt.cjs +0 -1
  388. package/Layout-BR3Or1Ga.cjs +0 -16
  389. package/Layout-Bdqauktv.js +0 -498
  390. package/Link-CM2N5Jq-.js +0 -72
  391. package/Link-Dq8IFDBx.cjs +0 -6
  392. package/Link-ceVlGaWQ.cjs +0 -1
  393. package/LinkButton-BJA9_HzL.cjs +0 -6
  394. package/LinkButton-DH3Nfdis.js +0 -69
  395. package/ListBox-D0u9svwm.cjs +0 -1
  396. package/ListBox-y_dw__MI.js +0 -531
  397. package/ListBoxButton-C2zp-gXD.cjs +0 -1
  398. package/ListBoxButton-DiseS_LX.js +0 -15
  399. package/ListBoxSection-Cv-gN76G.js +0 -1058
  400. package/ListBoxSection-DtsigmC1.cjs +0 -1
  401. package/ListKeyboardDelegate-fZKXmHAk.cjs +0 -1
  402. package/OverlayArrow-8praV_Xy.cjs +0 -1
  403. package/OverlayArrow-DfkRZlgG.js +0 -507
  404. package/PressResponder-Bm3_RM9c.cjs +0 -1
  405. package/ProgressBar-D5mNQTID.cjs +0 -1
  406. package/ProgressBar-wQirOG1N.js +0 -53
  407. package/Radio-BIomn_sP.js +0 -313
  408. package/Radio-CxvJ5Wrl.cjs +0 -1
  409. package/RangeCalendar-BvvZ2SBj.cjs +0 -11
  410. package/Select-769RSZ9V.js +0 -664
  411. package/Select-Go5x0zWl.cjs +0 -1
  412. package/SelectionManager-BvREZgeu.cjs +0 -1
  413. package/Separator-CggS0R7Q.js +0 -59
  414. package/Separator-DBsDhqCr.cjs +0 -1
  415. package/Skeleton-BAwbfKBW.cjs +0 -1
  416. package/Skeleton-BePDRmrO.js +0 -40
  417. package/Spinner-AXFRWuT6.js +0 -51
  418. package/Spinner-yHx_DX_4.cjs +0 -6
  419. package/TabList-0gj27e_e.js +0 -386
  420. package/TabList-Cqpup53E.cjs +0 -1
  421. package/Table-BhtlNY9P.cjs +0 -16
  422. package/Tag-B9M-nBTM.js +0 -748
  423. package/Tag-DkW6zaIS.cjs +0 -1
  424. package/Text-BUDAzDjW.js +0 -32
  425. package/Text-DA_gK6a2.cjs +0 -1
  426. package/TextArea-CSrrYY05.cjs +0 -1
  427. package/TextArea-DphcH6wE.js +0 -119
  428. package/TextField-CsyRTSEG.js +0 -120
  429. package/TextField-P5yICj5z.cjs +0 -1
  430. package/TextField.module-BcpPBWnD.js +0 -13
  431. package/TextField.module-Dw5Rtn9y.cjs +0 -1
  432. package/ToggleButtonGroup-BwFAhFEi.cjs +0 -1
  433. package/ToggleButtonGroup-CuxAKB3-.js +0 -211
  434. package/Tooltip-Bz0xCZSw.cjs +0 -1
  435. package/Tooltip-EuEQtHZj.js +0 -285
  436. package/filterDOMProps-BS2lrgFA.cjs +0 -1
  437. package/filterDOMProps-D6KHYVBX.js +0 -24
  438. package/inertValue-BWmZ1afe.cjs +0 -1
  439. package/mergeProps-BYJQ6N1s.js +0 -115
  440. package/mergeProps-C7Sx47fA.cjs +0 -1
  441. package/useButton-CWHoXYnj.js +0 -47
  442. package/useButton-CwOQUGtY.cjs +0 -1
  443. package/useDateFormatter-bzjwqA2K.cjs +0 -1
  444. package/useEvent-CGRyLM2c.cjs +0 -1
  445. package/useFormValidation-BW2NSTM4.js +0 -215
  446. package/useFormValidation-DSRwb9US.cjs +0 -1
  447. package/useHasTabbableChild-CogBR_6o.cjs +0 -1
  448. package/useHover-CaFzQrR_.cjs +0 -1
  449. package/useListState-TtWy_rDI.cjs +0 -1
  450. package/useLocalizedStringFormatter-CHAo1AyN.cjs +0 -1
  451. package/useObserveElement-BzEr5D32.cjs +0 -1
  452. package/usePress-BOGIOlm8.cjs +0 -7
  453. package/useTextField-BVIOd8Ld.cjs +0 -1
  454. package/useTextField-DFkSHoQN.js +0 -86
  455. package/useToggleState-Bz5rAf4C.js +0 -18
  456. package/useToggleState-DoIkSQdj.cjs +0 -1
  457. package/utils-C5-CzvX2.cjs +0 -1
  458. package/utils-CuqJqFqQ.js +0 -234
@@ -0,0 +1,1085 @@
1
+ import { jsx as k, jsxs as ne } from "react/jsx-runtime";
2
+ import { a as se, b as re, c as ae } from "./ListBox-LncMQt6I.js";
3
+ import { g as he, m as de } from "./Collection-B0_WAieZ.js";
4
+ import w, { useState as $, useRef as C, useMemo as L, useCallback as z, useEffect as ce, createContext as F, useContext as j } from "react";
5
+ import { $ as V, d as ue } from "./mergeProps-BSsN7Bgk.js";
6
+ import { $ as U } from "./context-CGNJ3grH.js";
7
+ import { flushSync as B } from "react-dom";
8
+ import { g as fe } from "./OverlayArrow-CvNuu3e3.js";
9
+ import { $ as W } from "./useEvent-DpBHTuHJ.js";
10
+ import { c as K } from "./clsx-OuTLNxxd.js";
11
+ import { f as D } from "./SelectionManager-Bq-Gw1UT.js";
12
+ import { a as ge } from "./Dialog-B8swxl24.js";
13
+ import { e as ye } from "./Separator-CM0KPvsX.js";
14
+ import './assets/ListBoxSection.css';class ve {
15
+ /**
16
+ * Returns whether the layout should invalidate in response to
17
+ * visible rectangle changes. By default, it only invalidates
18
+ * when the virtualizer's size changes. Return true always
19
+ * to make the layout invalidate while scrolling (e.g. sticky headers).
20
+ */
21
+ shouldInvalidate(e, t) {
22
+ return e.width !== t.width || e.height !== t.height;
23
+ }
24
+ /**
25
+ * Returns whether the layout should invalidate when the layout options change.
26
+ * By default it invalidates when the object identity changes. Override this
27
+ * method to optimize layout updates based on specific option changes.
28
+ */
29
+ shouldInvalidateLayoutOptions(e, t) {
30
+ return e !== t;
31
+ }
32
+ /**
33
+ * This method allows the layout to perform any pre-computation
34
+ * it needs to in order to prepare LayoutInfos for retrieval.
35
+ * Called by the virtualizer before `getVisibleLayoutInfos`
36
+ * or `getLayoutInfo` are called.
37
+ */
38
+ update(e) {
39
+ }
40
+ /** @private */
41
+ getItemRect(e) {
42
+ var t, i;
43
+ return (i = (t = this.getLayoutInfo(e)) === null || t === void 0 ? void 0 : t.rect) !== null && i !== void 0 ? i : null;
44
+ }
45
+ /** @private */
46
+ getVisibleRect() {
47
+ return this.virtualizer.visibleRect;
48
+ }
49
+ constructor() {
50
+ this.virtualizer = null;
51
+ }
52
+ }
53
+ class b {
54
+ /**
55
+ * Returns a copy of the LayoutInfo.
56
+ */
57
+ copy() {
58
+ let e = new b(this.type, this.key, this.rect.copy());
59
+ 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;
60
+ }
61
+ /**
62
+ * @param type The type of element represented by this LayoutInfo. Should match the `type` of the corresponding collection node.
63
+ * @param key A unique key for this LayoutInfo. Should match the `key` of the corresponding collection node.
64
+ * @param rect The rectangle describing the size and position of this element.
65
+ */
66
+ constructor(e, t, i) {
67
+ 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;
68
+ }
69
+ }
70
+ class x {
71
+ /**
72
+ * Returns a copy of this point.
73
+ */
74
+ copy() {
75
+ return new x(this.x, this.y);
76
+ }
77
+ /**
78
+ * Checks if two points are equal.
79
+ */
80
+ equals(e) {
81
+ return this.x === e.x && this.y === e.y;
82
+ }
83
+ /**
84
+ * Returns true if this point is the origin.
85
+ */
86
+ isOrigin() {
87
+ return this.x === 0 && this.y === 0;
88
+ }
89
+ constructor(e = 0, t = 0) {
90
+ this.x = e, this.y = t;
91
+ }
92
+ }
93
+ class f {
94
+ /**
95
+ * The maximum x-coordinate in the rectangle.
96
+ */
97
+ get maxX() {
98
+ return this.x + this.width;
99
+ }
100
+ /**
101
+ * The maximum y-coordinate in the rectangle.
102
+ */
103
+ get maxY() {
104
+ return this.y + this.height;
105
+ }
106
+ /**
107
+ * The area of the rectangle.
108
+ */
109
+ get area() {
110
+ return this.width * this.height;
111
+ }
112
+ /**
113
+ * The top left corner of the rectangle.
114
+ */
115
+ get topLeft() {
116
+ return new x(this.x, this.y);
117
+ }
118
+ /**
119
+ * The top right corner of the rectangle.
120
+ */
121
+ get topRight() {
122
+ return new x(this.maxX, this.y);
123
+ }
124
+ /**
125
+ * The bottom left corner of the rectangle.
126
+ */
127
+ get bottomLeft() {
128
+ return new x(this.x, this.maxY);
129
+ }
130
+ /**
131
+ * The bottom right corner of the rectangle.
132
+ */
133
+ get bottomRight() {
134
+ return new x(this.maxX, this.maxY);
135
+ }
136
+ /**
137
+ * Returns whether this rectangle intersects another rectangle.
138
+ * @param rect - The rectangle to check.
139
+ */
140
+ intersects(e) {
141
+ 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;
142
+ }
143
+ /**
144
+ * Returns whether this rectangle fully contains another rectangle.
145
+ * @param rect - The rectangle to check.
146
+ */
147
+ containsRect(e) {
148
+ return this.x <= e.x && this.y <= e.y && this.maxX >= e.maxX && this.maxY >= e.maxY;
149
+ }
150
+ /**
151
+ * Returns whether the rectangle contains the given point.
152
+ * @param point - The point to check.
153
+ */
154
+ containsPoint(e) {
155
+ return this.x <= e.x && this.y <= e.y && this.maxX >= e.x && this.maxY >= e.y;
156
+ }
157
+ /**
158
+ * Returns the first corner of this rectangle (from top to bottom, left to right)
159
+ * that is contained in the given rectangle, or null of the rectangles do not intersect.
160
+ * @param rect - The rectangle to check.
161
+ */
162
+ getCornerInRect(e) {
163
+ for (let t of [
164
+ "topLeft",
165
+ "topRight",
166
+ "bottomLeft",
167
+ "bottomRight"
168
+ ])
169
+ if (e.containsPoint(this[t])) return t;
170
+ return null;
171
+ }
172
+ equals(e) {
173
+ return e.x === this.x && e.y === this.y && e.width === this.width && e.height === this.height;
174
+ }
175
+ pointEquals(e) {
176
+ return this.x === e.x && this.y === e.y;
177
+ }
178
+ sizeEquals(e) {
179
+ return this.width === e.width && this.height === e.height;
180
+ }
181
+ /**
182
+ * Returns the union of this Rect and another.
183
+ */
184
+ union(e) {
185
+ 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;
186
+ return new f(t, i, l, o);
187
+ }
188
+ /**
189
+ * Returns the intersection of this Rect with another.
190
+ * If the rectangles do not intersect, an all zero Rect is returned.
191
+ */
192
+ intersection(e) {
193
+ if (!this.intersects(e)) return new f(0, 0, 0, 0);
194
+ let t = Math.max(this.x, e.x), i = Math.max(this.y, e.y);
195
+ return new f(t, i, Math.min(this.maxX, e.maxX) - t, Math.min(this.maxY, e.maxY) - i);
196
+ }
197
+ /**
198
+ * Returns a copy of this rectangle.
199
+ */
200
+ copy() {
201
+ return new f(this.x, this.y, this.width, this.height);
202
+ }
203
+ constructor(e = 0, t = 0, i = 0, l = 0) {
204
+ this.x = e, this.y = t, this.width = i, this.height = l;
205
+ }
206
+ }
207
+ class H {
208
+ /**
209
+ * Returns a copy of this size.
210
+ */
211
+ copy() {
212
+ return new H(this.width, this.height);
213
+ }
214
+ /**
215
+ * Returns whether this size is equal to another one.
216
+ */
217
+ equals(e) {
218
+ return this.width === e.width && this.height === e.height;
219
+ }
220
+ /**
221
+ * The total area of the Size.
222
+ */
223
+ get area() {
224
+ return this.width * this.height;
225
+ }
226
+ constructor(e = 0, t = 0) {
227
+ this.width = Math.max(e, 0), this.height = Math.max(t, 0);
228
+ }
229
+ }
230
+ let pe = 0;
231
+ class G {
232
+ /**
233
+ * Prepares the view for reuse. Called just before the view is removed from the DOM.
234
+ */
235
+ prepareForReuse() {
236
+ this.content = null, this.rendered = null, this.layoutInfo = null;
237
+ }
238
+ getReusableView(e) {
239
+ let t = this.reusableViews.get(e);
240
+ return t && t.length > 0 ? t.shift() : new we(this.virtualizer, this, e);
241
+ }
242
+ reuseChild(e) {
243
+ e.prepareForReuse();
244
+ let t = this.reusableViews.get(e.viewType);
245
+ t || (t = [], this.reusableViews.set(e.viewType, t)), t.push(e);
246
+ }
247
+ constructor(e, t) {
248
+ this.virtualizer = e, this.key = ++pe, this.viewType = t, this.children = /* @__PURE__ */ new Set(), this.reusableViews = /* @__PURE__ */ new Map(), this.layoutInfo = null, this.content = null, this.rendered = null;
249
+ }
250
+ }
251
+ class me extends G {
252
+ constructor(e) {
253
+ super(e, "root");
254
+ }
255
+ }
256
+ class we extends G {
257
+ constructor(e, t, i) {
258
+ super(e, i), this.parent = t;
259
+ }
260
+ }
261
+ function be(n, e) {
262
+ if (n === e) return !0;
263
+ if (n.size !== e.size) return !1;
264
+ for (let t of n)
265
+ if (!e.has(t)) return !1;
266
+ return !0;
267
+ }
268
+ class xe {
269
+ setVisibleRect(e) {
270
+ let t = performance.now() - this.startTime;
271
+ 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;
272
+ }
273
+ getOverscannedRect() {
274
+ let e = this.visibleRect.copy(), t = this.visibleRect.height / 3;
275
+ if (e.height += t, this.velocity.y < 0 && (e.y -= t), this.velocity.x !== 0) {
276
+ let i = this.visibleRect.width / 3;
277
+ e.width += i, this.velocity.x < 0 && (e.x -= i);
278
+ }
279
+ return e;
280
+ }
281
+ constructor() {
282
+ this.startTime = 0, this.velocity = new x(0, 0), this.visibleRect = new f();
283
+ }
284
+ }
285
+ class Ie {
286
+ /** Returns whether the given key, or an ancestor, is persisted. */
287
+ isPersistedKey(e) {
288
+ if (this.persistedKeys.has(e)) return !0;
289
+ for (let t of this.persistedKeys) for (; t != null; ) {
290
+ let i = this.layout.getLayoutInfo(t);
291
+ if (!i || i.parentKey == null) break;
292
+ if (t = i.parentKey, t === e) return !0;
293
+ }
294
+ return !1;
295
+ }
296
+ getParentView(e) {
297
+ return e.parentKey != null ? this._visibleViews.get(e.parentKey) : this._rootView;
298
+ }
299
+ getReusableView(e) {
300
+ let i = this.getParentView(e).getReusableView(e.type);
301
+ return i.layoutInfo = e, this._renderView(i), i;
302
+ }
303
+ _renderView(e) {
304
+ if (e.layoutInfo) {
305
+ let { type: t, key: i, content: l } = e.layoutInfo;
306
+ e.content = l || this.collection.getItem(i), e.rendered = this._renderContent(t, e.content);
307
+ }
308
+ }
309
+ _renderContent(e, t) {
310
+ let i = t != null ? this._renderedContent.get(t) : null;
311
+ if (i != null) return i;
312
+ let l = this.delegate.renderView(e, t);
313
+ return t && this._renderedContent.set(t, l), l;
314
+ }
315
+ /**
316
+ * Returns the key for the item view currently at the given point.
317
+ */
318
+ keyAtPoint(e) {
319
+ let t = new f(e.x, e.y, 1, 1), i = t.area === 0 ? [] : this.layout.getVisibleLayoutInfos(t);
320
+ for (let l of i)
321
+ if (l.rect.intersects(t)) return l.key;
322
+ return null;
323
+ }
324
+ relayout(e = {}) {
325
+ this.layout.update(e), this.contentSize = this.layout.getContentSize();
326
+ let t = this.visibleRect, i = e.contentChanged ? 0 : t.x, l = e.contentChanged ? 0 : t.y;
327
+ 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) {
328
+ let o = new f(i, l, t.width, t.height);
329
+ this.delegate.setVisibleRect(o);
330
+ } else this.updateSubviews();
331
+ }
332
+ getVisibleLayoutInfos() {
333
+ 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;
334
+ e && !(t && i) ? l = new f(0, 0, this.contentSize.width, this.contentSize.height) : l = this._overscanManager.getOverscannedRect();
335
+ let o = this.layout.getVisibleLayoutInfos(l), s = /* @__PURE__ */ new Map();
336
+ for (let a of o) s.set(a.key, a);
337
+ return s;
338
+ }
339
+ updateSubviews() {
340
+ let e = this.getVisibleLayoutInfos(), t = /* @__PURE__ */ new Set();
341
+ for (let [i, l] of this._visibleViews) {
342
+ let o = e.get(i);
343
+ (!o || l.parent !== this.getParentView(o)) && (this._visibleViews.delete(i), l.parent.reuseChild(l), t.add(l));
344
+ }
345
+ for (let [i, l] of e) {
346
+ let o = this._visibleViews.get(i);
347
+ if (!o)
348
+ o = this.getReusableView(l), o.parent.children.add(o), this._visibleViews.set(i, o), t.delete(o);
349
+ else {
350
+ o.layoutInfo = l;
351
+ let s = this.collection.getItem(l.key);
352
+ o.content !== s && (o.content != null && this._renderedContent.delete(o.content), this._renderView(o));
353
+ }
354
+ }
355
+ for (let i of t)
356
+ i.parent.children.delete(i), i.parent.reusableViews.clear();
357
+ if (!this._isScrolling)
358
+ for (let i of e.keys()) {
359
+ let l = this._visibleViews.get(i);
360
+ l.parent.children.delete(l), l.parent.children.add(l);
361
+ }
362
+ }
363
+ /** Performs layout and updates visible views as needed. */
364
+ render(e) {
365
+ let t = this, i = !1, l = !1, o = !1, s = !1, a = !1, h = !1;
366
+ 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 && !be(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({
367
+ offsetChanged: l,
368
+ sizeChanged: o,
369
+ itemSizeChanged: s,
370
+ layoutOptionsChanged: a,
371
+ layoutOptions: this._invalidationContext.layoutOptions
372
+ }) : h && this.updateSubviews(), Array.from(this._rootView.children);
373
+ }
374
+ getVisibleView(e) {
375
+ return this._visibleViews.get(e);
376
+ }
377
+ invalidate(e) {
378
+ this.delegate.invalidate(e);
379
+ }
380
+ updateItemSize(e, t) {
381
+ if (!this.layout.updateItemSize) return;
382
+ this.layout.updateItemSize(e, t) && this.invalidate({
383
+ itemSizeChanged: !0
384
+ });
385
+ }
386
+ constructor(e) {
387
+ this.delegate = e.delegate, this.collection = e.collection, this.layout = e.layout, this.contentSize = new H(), this.visibleRect = new f(), this.persistedKeys = /* @__PURE__ */ new Set(), this._visibleViews = /* @__PURE__ */ new Map(), this._renderedContent = /* @__PURE__ */ new WeakMap(), this._rootView = new me(this), this._isScrolling = !1, this._invalidationContext = {}, this._overscanManager = new xe();
388
+ }
389
+ }
390
+ function Re(n) {
391
+ let [e, t] = $(new f(0, 0, 0, 0)), [i, l] = $(!1), [o, s] = $({}), a = C(!1), [h] = $(() => new Ie({
392
+ collection: n.collection,
393
+ layout: n.layout,
394
+ delegate: {
395
+ setVisibleRect(v) {
396
+ t(v), a.current = !0;
397
+ },
398
+ // TODO: should changing these invalidate the entire cache?
399
+ renderView: n.renderView,
400
+ invalidate: s
401
+ }
402
+ }));
403
+ V(() => {
404
+ a.current && (a.current = !1, n.onVisibleRectChange(e));
405
+ });
406
+ let r = L(() => n.layoutOptions != null ? {
407
+ ...o,
408
+ layoutOptions: n.layoutOptions
409
+ } : o, [
410
+ o,
411
+ n.layoutOptions
412
+ ]), d = h.render({
413
+ layout: n.layout,
414
+ collection: n.collection,
415
+ persistedKeys: n.persistedKeys,
416
+ layoutOptions: n.layoutOptions,
417
+ visibleRect: e,
418
+ invalidationContext: r,
419
+ isScrolling: i
420
+ }), c = h.contentSize, u = z(() => {
421
+ l(!0);
422
+ }, []), g = z(() => {
423
+ l(!1);
424
+ }, []);
425
+ return L(() => ({
426
+ virtualizer: h,
427
+ visibleViews: d,
428
+ setVisibleRect: t,
429
+ contentSize: c,
430
+ isScrolling: i,
431
+ startScrolling: u,
432
+ endScrolling: g
433
+ }), [
434
+ h,
435
+ d,
436
+ t,
437
+ c,
438
+ i,
439
+ u,
440
+ g
441
+ ]);
442
+ }
443
+ const R = 48;
444
+ class Se extends ve {
445
+ // Backward compatibility for subclassing.
446
+ get collection() {
447
+ return this.virtualizer.collection;
448
+ }
449
+ getLayoutInfo(e) {
450
+ var t;
451
+ return this.ensureLayoutInfo(e), ((t = this.layoutNodes.get(e)) === null || t === void 0 ? void 0 : t.layoutInfo) || null;
452
+ }
453
+ getVisibleLayoutInfos(e) {
454
+ if (e.height > 1) {
455
+ var t, i;
456
+ let s = ((i = (t = this.rowHeight) !== null && t !== void 0 ? t : this.estimatedRowHeight) !== null && i !== void 0 ? i : R) + this.gap;
457
+ e.y = Math.floor(e.y / s) * s, e.height = Math.ceil(e.height / s) * s;
458
+ }
459
+ this.layoutIfNeeded(e);
460
+ let l = [], o = (s) => {
461
+ for (let a of s) this.isVisible(a, e) && (l.push(a.layoutInfo), a.children && o(a.children));
462
+ };
463
+ return o(this.rootNodes), l;
464
+ }
465
+ layoutIfNeeded(e) {
466
+ if (this.lastCollection) {
467
+ this.requestedRect.containsRect(e) || (this.requestedRect = this.requestedRect.union(e), this.rootNodes = this.buildCollection());
468
+ for (let t of this.virtualizer.persistedKeys)
469
+ if (this.ensureLayoutInfo(t)) return;
470
+ }
471
+ }
472
+ ensureLayoutInfo(e) {
473
+ return !this.layoutNodes.has(e) && this.requestedRect.area < this.contentSize.area && this.lastCollection ? (this.requestedRect = new f(0, 0, 1 / 0, 1 / 0), this.rootNodes = this.buildCollection(), this.requestedRect = new f(0, 0, this.contentSize.width, this.contentSize.height), !0) : !1;
474
+ }
475
+ isVisible(e, t) {
476
+ return e.layoutInfo.rect.intersects(t) || e.layoutInfo.isSticky || e.layoutInfo.type === "header" || e.layoutInfo.type === "loader" || this.virtualizer.isPersistedKey(e.layoutInfo.key);
477
+ }
478
+ shouldInvalidateEverything(e) {
479
+ let t = e.layoutOptions;
480
+ var i, l, o, s, a;
481
+ 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);
482
+ }
483
+ shouldInvalidateLayoutOptions(e, t) {
484
+ 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;
485
+ }
486
+ update(e) {
487
+ let t = this.virtualizer.collection;
488
+ this.invalidateEverything = this.shouldInvalidateEverything(e), this.invalidateEverything && (this.requestedRect = this.virtualizer.visibleRect.copy(), this.layoutNodes.clear());
489
+ let i = e.layoutOptions;
490
+ var l;
491
+ this.rowHeight = (l = i == null ? void 0 : i.rowHeight) !== null && l !== void 0 ? l : this.rowHeight;
492
+ var o;
493
+ this.estimatedRowHeight = (o = i == null ? void 0 : i.estimatedRowHeight) !== null && o !== void 0 ? o : this.estimatedRowHeight;
494
+ var s;
495
+ this.headingHeight = (s = i == null ? void 0 : i.headingHeight) !== null && s !== void 0 ? s : this.headingHeight;
496
+ var a;
497
+ this.estimatedHeadingHeight = (a = i == null ? void 0 : i.estimatedHeadingHeight) !== null && a !== void 0 ? a : this.estimatedHeadingHeight;
498
+ var h;
499
+ this.loaderHeight = (h = i == null ? void 0 : i.loaderHeight) !== null && h !== void 0 ? h : this.loaderHeight;
500
+ var r;
501
+ this.dropIndicatorThickness = (r = i == null ? void 0 : i.dropIndicatorThickness) !== null && r !== void 0 ? r : this.dropIndicatorThickness;
502
+ var d;
503
+ this.gap = (d = i == null ? void 0 : i.gap) !== null && d !== void 0 ? d : this.gap;
504
+ var c;
505
+ if (this.padding = (c = i == null ? void 0 : i.padding) !== null && c !== void 0 ? c : this.padding, this.rootNodes = this.buildCollection(), this.lastCollection && t !== this.lastCollection)
506
+ for (let u of this.lastCollection.getKeys()) t.getItem(u) || this.layoutNodes.get(u) && this.layoutNodes.delete(u);
507
+ this.lastCollection = t, this.invalidateEverything = !1, this.validRect = this.requestedRect.copy();
508
+ }
509
+ buildCollection(e = this.padding) {
510
+ let t = this.virtualizer.collection, i = [
511
+ ...t
512
+ ], l = i.filter((r) => r.type === "loader"), o = [], s = (t == null ? void 0 : t.size) === 0;
513
+ s && (e = 0);
514
+ for (let r of i) {
515
+ var a, h;
516
+ let d = ((h = (a = this.rowHeight) !== null && a !== void 0 ? a : this.estimatedRowHeight) !== null && h !== void 0 ? h : R) + this.gap;
517
+ if (r.type === "item" && e + d < this.requestedRect.y && !this.isValid(r, e)) {
518
+ e += d;
519
+ continue;
520
+ }
521
+ let c = this.buildChild(r, this.padding, e, null);
522
+ if (e = c.layoutInfo.rect.maxY + this.gap, o.push(c), r.type === "loader") {
523
+ let u = l.indexOf(r);
524
+ l.splice(u, 1);
525
+ }
526
+ if ((r.type === "item" || r.type === "loader") && e > this.requestedRect.maxY) {
527
+ let u = i.indexOf(r);
528
+ for (let g of l) {
529
+ let y = i.indexOf(g);
530
+ e += (y - u - 1) * d;
531
+ let v = this.buildChild(g, this.padding, e, null);
532
+ o.push(v), e = v.layoutInfo.rect.maxY, u = y;
533
+ }
534
+ e += (i.length - u - 1) * d;
535
+ break;
536
+ }
537
+ }
538
+ return e -= this.gap, e += s ? 0 : this.padding, this.contentSize = new H(this.virtualizer.visibleRect.width, e), o;
539
+ }
540
+ isValid(e, t) {
541
+ let i = this.layoutNodes.get(e.key);
542
+ 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));
543
+ }
544
+ buildChild(e, t, i, l) {
545
+ if (this.isValid(e, i)) return this.layoutNodes.get(e.key);
546
+ let o = this.buildNode(e, t, i);
547
+ return o.layoutInfo.parentKey = l ?? null, o.layoutInfo.allowOverflow = !0, this.layoutNodes.set(e.key, o), o;
548
+ }
549
+ buildNode(e, t, i) {
550
+ switch (e.type) {
551
+ case "section":
552
+ return this.buildSection(e, t, i);
553
+ case "item":
554
+ return this.buildItem(e, t, i);
555
+ case "header":
556
+ return this.buildSectionHeader(e, t, i);
557
+ case "loader":
558
+ return this.buildLoader(e, t, i);
559
+ case "separator":
560
+ return this.buildItem(e, t, i);
561
+ default:
562
+ throw new Error("Unsupported node type: " + e.type);
563
+ }
564
+ }
565
+ buildLoader(e, t, i) {
566
+ let l = new f(t, i, this.padding, 0), o = new b("loader", e.key, l);
567
+ l.width = this.virtualizer.contentSize.width - this.padding - t;
568
+ var s, a, h;
569
+ 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 : R : 0, {
570
+ layoutInfo: o,
571
+ validRect: l.intersection(this.requestedRect)
572
+ };
573
+ }
574
+ buildSection(e, t, i) {
575
+ let l = this.virtualizer.collection, o = this.virtualizer.visibleRect.width - this.padding, s = new f(t, i, o - t, 0), a = new b(e.type, e.key, s), h = i, r = 0, d = [];
576
+ for (let g of D(e, l)) {
577
+ var c, u;
578
+ let y = ((u = (c = this.rowHeight) !== null && c !== void 0 ? c : this.estimatedRowHeight) !== null && u !== void 0 ? u : R) + this.gap;
579
+ if (i + y < this.requestedRect.y && !this.isValid(e, i)) {
580
+ i += y, r++;
581
+ continue;
582
+ }
583
+ let v = this.buildChild(g, t, i, a.key);
584
+ if (i = v.layoutInfo.rect.maxY + this.gap, d.push(v), i > this.requestedRect.maxY) {
585
+ i += ([
586
+ ...D(e, l)
587
+ ].length - (d.length + r)) * y;
588
+ break;
589
+ }
590
+ }
591
+ return i -= this.gap, s.height = i - h, {
592
+ layoutInfo: a,
593
+ children: d,
594
+ validRect: a.rect.intersection(this.requestedRect),
595
+ node: e
596
+ };
597
+ }
598
+ buildSectionHeader(e, t, i) {
599
+ let l = this.virtualizer.visibleRect.width - this.padding, o = this.headingHeight, s = !1;
600
+ if (o == null) {
601
+ let r = this.layoutNodes.get(e.key), d = r == null ? void 0 : r.layoutInfo;
602
+ if (d) {
603
+ let c = this.virtualizer.collection.getItem(e.key), u = this.lastCollection ? this.lastCollection.getItem(e.key) : null;
604
+ o = d.rect.height, s = l !== d.rect.width || c !== u || d.estimatedSize;
605
+ } else
606
+ o = e.rendered ? this.estimatedHeadingHeight : 0, s = !0;
607
+ }
608
+ o == null && (o = R);
609
+ let a = new f(t, i, l - t, o), h = new b("header", e.key, a);
610
+ return h.estimatedSize = s, {
611
+ layoutInfo: h,
612
+ children: [],
613
+ validRect: h.rect.intersection(this.requestedRect),
614
+ node: e
615
+ };
616
+ }
617
+ buildItem(e, t, i) {
618
+ let l = this.virtualizer.visibleRect.width - this.padding - t, o = this.rowHeight, s = !1;
619
+ if (o == null) {
620
+ let r = this.layoutNodes.get(e.key);
621
+ r ? (o = r.layoutInfo.rect.height, s = l !== r.layoutInfo.rect.width || e !== r.node || r.layoutInfo.estimatedSize) : (o = this.estimatedRowHeight, s = !0);
622
+ }
623
+ o == null && (o = R);
624
+ let a = new f(t, i, l, o), h = new b(e.type, e.key, a);
625
+ return h.estimatedSize = s, {
626
+ layoutInfo: h,
627
+ children: [],
628
+ validRect: h.rect,
629
+ node: e
630
+ };
631
+ }
632
+ updateItemSize(e, t) {
633
+ let i = this.layoutNodes.get(e);
634
+ if (!i) return !1;
635
+ let l = this.virtualizer.collection, o = i.layoutInfo;
636
+ if (o.estimatedSize = !1, o.rect.height !== t.height) {
637
+ let s = o.copy();
638
+ 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);
639
+ let a = o.parentKey != null ? l.getItem(o.parentKey) : null;
640
+ for (; a; )
641
+ this.updateLayoutNode(a.key, o, s), a = a.parentKey != null ? l.getItem(a.parentKey) : null;
642
+ return !0;
643
+ }
644
+ return !1;
645
+ }
646
+ updateLayoutNode(e, t, i) {
647
+ let l = this.layoutNodes.get(e);
648
+ l && (l.validRect = l.validRect.intersection(this.validRect), l.layoutInfo === t && (l.layoutInfo = i));
649
+ }
650
+ getContentSize() {
651
+ return this.contentSize;
652
+ }
653
+ getDropTargetFromPoint(e, t, i) {
654
+ e += this.virtualizer.visibleRect.x, t += this.virtualizer.visibleRect.y;
655
+ let l = new f(e, Math.max(0, t - this.gap), 1, Math.max(1, this.gap * 2)), o = this.getVisibleLayoutInfos(l), s = null, a = 1 / 0;
656
+ for (let c of o) {
657
+ if (!c.rect.intersects(l)) continue;
658
+ let u = Math.abs(c.rect.y - t), g = Math.abs(c.rect.maxY - t), y = Math.min(u, g);
659
+ y < a && (a = y, s = c.key);
660
+ }
661
+ if (s == null || this.virtualizer.collection.size === 0) return {
662
+ type: "root"
663
+ };
664
+ let h = this.getLayoutInfo(s);
665
+ if (!h) return null;
666
+ let r = h.rect, d = {
667
+ type: "item",
668
+ key: h.key,
669
+ dropPosition: "on"
670
+ };
671
+ return i(d) ? t <= r.y + 10 && i({
672
+ ...d,
673
+ dropPosition: "before"
674
+ }) ? d.dropPosition = "before" : t >= r.maxY - 10 && i({
675
+ ...d,
676
+ dropPosition: "after"
677
+ }) && (d.dropPosition = "after") : t <= r.y + r.height / 2 && i({
678
+ ...d,
679
+ dropPosition: "before"
680
+ }) ? d.dropPosition = "before" : i({
681
+ ...d,
682
+ dropPosition: "after"
683
+ }) && (d.dropPosition = "after"), d;
684
+ }
685
+ getDropTargetLayoutInfo(e) {
686
+ let t = this.getLayoutInfo(e.key), i;
687
+ if (e.dropPosition === "before") i = new f(t.rect.x, Math.max(0, t.rect.y - this.dropIndicatorThickness / 2), t.rect.width, this.dropIndicatorThickness);
688
+ else if (e.dropPosition === "after") {
689
+ let o = this.collection.getItem(e.key);
690
+ if (o) {
691
+ var l;
692
+ let s = (l = o.level) !== null && l !== void 0 ? l : 0, a = this.collection.getKeyAfter(e.key);
693
+ for (; a != null; ) {
694
+ let h = this.collection.getItem(a);
695
+ if (!h || h.level <= s) break;
696
+ t = this.getLayoutInfo(a) || t, a = this.collection.getKeyAfter(a);
697
+ }
698
+ }
699
+ i = new f(t.rect.x, t.rect.maxY - this.dropIndicatorThickness / 2, t.rect.width, this.dropIndicatorThickness);
700
+ } else i = t.rect;
701
+ return new b("dropIndicator", e.key + ":" + e.dropPosition, i);
702
+ }
703
+ /**
704
+ * Creates a new ListLayout with options. See the list of properties below for a description
705
+ * of the options that can be provided.
706
+ */
707
+ constructor(e = {}) {
708
+ super();
709
+ var t;
710
+ this.rowHeight = (t = e.rowHeight) !== null && t !== void 0 ? t : null;
711
+ var i;
712
+ this.estimatedRowHeight = (i = e.estimatedRowHeight) !== null && i !== void 0 ? i : null;
713
+ var l;
714
+ this.headingHeight = (l = e.headingHeight) !== null && l !== void 0 ? l : null;
715
+ var o;
716
+ this.estimatedHeadingHeight = (o = e.estimatedHeadingHeight) !== null && o !== void 0 ? o : null;
717
+ var s;
718
+ 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 = /* @__PURE__ */ new Map(), this.rootNodes = [], this.lastCollection = null, this.invalidateEverything = !1, this.validRect = new f(), this.requestedRect = new f(), this.contentSize = new H();
719
+ }
720
+ }
721
+ let S = null;
722
+ function $e(n = !1) {
723
+ if (S === null || n) {
724
+ const e = document.createElement("div"), t = e.style;
725
+ t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
726
+ const i = document.createElement("div"), l = i.style;
727
+ return l.width = "100px", l.height = "100px", e.appendChild(i), document.body.appendChild(e), e.scrollLeft > 0 ? S = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? S = "negative" : S = "positive-ascending"), document.body.removeChild(e), S;
728
+ }
729
+ return S;
730
+ }
731
+ function ze(n, e) {
732
+ let { scrollLeft: t } = n;
733
+ if (e === "rtl") {
734
+ let { scrollWidth: i, clientWidth: l } = n;
735
+ switch ($e()) {
736
+ case "negative":
737
+ t = -t;
738
+ break;
739
+ case "positive-descending":
740
+ t = i - l - t;
741
+ break;
742
+ }
743
+ }
744
+ return t;
745
+ }
746
+ function He(n, e) {
747
+ let { contentSize: t, onVisibleRectChange: i, innerStyle: l, onScrollStart: o, onScrollEnd: s, scrollDirection: a = "both", ...h } = n, r = C({
748
+ scrollTop: 0,
749
+ scrollLeft: 0,
750
+ scrollEndTime: 0,
751
+ scrollTimeout: null,
752
+ width: 0,
753
+ height: 0,
754
+ isScrolling: !1
755
+ }).current, { direction: d } = U(), [c, u] = $(!1), g = z(() => {
756
+ r.isScrolling = !1, u(!1), r.scrollTimeout = null, window.dispatchEvent(new Event("tk.connect-observer")), s == null || s();
757
+ }, [
758
+ r,
759
+ s
760
+ ]), y = z((p) => {
761
+ p.target === p.currentTarget && (n.onScroll && n.onScroll(p), B(() => {
762
+ let m = p.currentTarget.scrollTop, _ = ze(p.currentTarget, d);
763
+ r.scrollTop = Math.max(0, Math.min(m, t.height - r.height)), r.scrollLeft = Math.max(0, Math.min(_, t.width - r.width)), i(new f(r.scrollLeft, r.scrollTop, r.width, r.height)), r.isScrolling || (r.isScrolling = !0, u(!0), window.dispatchEvent(new Event("tk.disconnect-observer")), o && o());
764
+ let E = Date.now();
765
+ !("onscrollend" in window) && r.scrollEndTime <= E + 50 && (r.scrollEndTime = E + 300, r.scrollTimeout != null && clearTimeout(r.scrollTimeout), r.scrollTimeout = setTimeout(g, 300));
766
+ }));
767
+ }, [
768
+ n,
769
+ d,
770
+ r,
771
+ t,
772
+ i,
773
+ o,
774
+ g
775
+ ]);
776
+ W(e, "scroll", y), W(e, "scrollend", g), ce(() => () => {
777
+ r.scrollTimeout != null && clearTimeout(r.scrollTimeout), r.isScrolling && window.dispatchEvent(new Event("tk.connect-observer"));
778
+ }, []);
779
+ let v = C(!1), N = ue((p) => {
780
+ let m = e.current;
781
+ if (!m || v.current) return;
782
+ v.current = !0;
783
+ let _ = process.env.NODE_ENV === "test" && !process.env.VIRT_ON, E = Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientWidth"), oe = Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientHeight"), q = m.clientWidth, Y = m.clientHeight, O = _ && !E ? 1 / 0 : q, P = _ && !oe ? 1 / 0 : Y;
784
+ (r.width !== O || r.height !== P) && (r.width = O, r.height = P, p(() => {
785
+ i(new f(r.scrollLeft, r.scrollTop, O, P));
786
+ }), (!_ && q !== m.clientWidth || Y !== m.clientHeight) && (r.width = m.clientWidth, r.height = m.clientHeight, p(() => {
787
+ i(new f(r.scrollLeft, r.scrollTop, r.width, r.height));
788
+ }))), v.current = !1;
789
+ }), T = C(null), [te, ie] = $({});
790
+ V(() => {
791
+ if (!v.current && (T.current == null || !t.equals(T.current)))
792
+ if (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest < "u") {
793
+ ie({}), T.current = t;
794
+ return;
795
+ } else queueMicrotask(() => N(B));
796
+ T.current = t;
797
+ }), V(() => {
798
+ N((p) => p());
799
+ }, [
800
+ te
801
+ ]);
802
+ let le = z(() => {
803
+ N(B);
804
+ }, [
805
+ N
806
+ ]);
807
+ fe({
808
+ ref: e,
809
+ box: "border-box",
810
+ onResize: le
811
+ });
812
+ let I = {
813
+ // Reset padding so that relative positioning works correctly. Padding will be done in JS layout.
814
+ padding: 0,
815
+ ...h.style
816
+ };
817
+ 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 = {
818
+ width: Number.isFinite(t.width) ? t.width : void 0,
819
+ height: Number.isFinite(t.height) ? t.height : void 0,
820
+ pointerEvents: c ? "none" : "auto",
821
+ position: "relative",
822
+ ...l
823
+ }, {
824
+ isScrolling: c,
825
+ scrollViewProps: {
826
+ ...h,
827
+ style: I
828
+ },
829
+ contentProps: {
830
+ role: "presentation",
831
+ style: l
832
+ }
833
+ };
834
+ }
835
+ function _e(n) {
836
+ let { layoutInfo: e, virtualizer: t, ref: i } = n, l = e == null ? void 0 : e.key, o = z(() => {
837
+ if (l != null && i.current) {
838
+ let s = Ce(i.current);
839
+ t.updateItemSize(l, s);
840
+ }
841
+ }, [
842
+ t,
843
+ l,
844
+ i
845
+ ]);
846
+ return V(() => {
847
+ e != null && e.estimatedSize && o();
848
+ }), {
849
+ updateSize: o
850
+ };
851
+ }
852
+ function Ce(n) {
853
+ let e = n.style.height;
854
+ n.style.height = "";
855
+ let t = new H(n.scrollWidth, n.scrollHeight);
856
+ return n.style.height = e, t;
857
+ }
858
+ function J(n) {
859
+ let { style: e, className: t, layoutInfo: i, virtualizer: l, parent: o, children: s } = n, { direction: a } = U(), h = C(null);
860
+ return _e({
861
+ layoutInfo: i,
862
+ virtualizer: l,
863
+ ref: h
864
+ }), /* @__PURE__ */ w.createElement("div", {
865
+ role: "presentation",
866
+ ref: h,
867
+ className: t,
868
+ style: {
869
+ ...ke(i, a, o),
870
+ ...e
871
+ }
872
+ }, s);
873
+ }
874
+ let X = /* @__PURE__ */ new WeakMap();
875
+ function ke(n, e, t) {
876
+ let i = e === "rtl" ? "right" : "left", l = X.get(n);
877
+ if (l && l[i] != null) {
878
+ if (!t) return l;
879
+ let h = n.rect.y - t.rect.y, r = n.rect.x - t.rect.x;
880
+ if (l.top === h && l[i] === r) return l;
881
+ }
882
+ let o = {
883
+ // TODO: For layoutInfos that are sticky that have parents with overflow visible, their "top" will be relative to the to the nearest scrolling container
884
+ // which WON'T be the parent since the parent has overflow visible. This means we shouldn't offset the height by the parent's position
885
+ // Not 100% about this change here since it is quite ambigious what the scrolling container maybe and how its top is positioned with respect to the
886
+ // calculated layoutInfo.y here
887
+ top: n.rect.y - (t && !(t.allowOverflow && n.isSticky) ? t.rect.y : 0),
888
+ [i]: n.rect.x - (t && !(t.allowOverflow && n.isSticky) ? t.rect.x : 0),
889
+ width: n.rect.width,
890
+ height: n.rect.height
891
+ };
892
+ Object.entries(o).forEach(([h, r]) => {
893
+ Number.isFinite(r) || (o[h] = void 0);
894
+ });
895
+ var s;
896
+ let a = {
897
+ position: n.isSticky ? "sticky" : "absolute",
898
+ // Sticky elements are positioned in normal document flow. Display inline-block so that they don't push other sticky columns onto the following rows.
899
+ display: n.isSticky ? "inline-block" : void 0,
900
+ overflow: n.allowOverflow ? "visible" : "hidden",
901
+ opacity: n.opacity,
902
+ zIndex: n.zIndex,
903
+ transform: (s = n.transform) !== null && s !== void 0 ? s : void 0,
904
+ contain: "size layout style",
905
+ ...o
906
+ };
907
+ return X.set(n, a), a;
908
+ }
909
+ const Q = /* @__PURE__ */ F(null), Z = /* @__PURE__ */ F(null);
910
+ function Le(n) {
911
+ let { children: e, layout: t, layoutOptions: i } = n, l = L(() => typeof t == "function" ? new t() : t, [
912
+ t
913
+ ]), o = L(() => ({
914
+ isVirtualized: !0,
915
+ layoutDelegate: l,
916
+ dropTargetDelegate: l.getDropTargetFromPoint ? l : void 0,
917
+ CollectionRoot: Ne,
918
+ CollectionBranch: Te
919
+ }), [
920
+ l
921
+ ]);
922
+ return /* @__PURE__ */ w.createElement(he.Provider, {
923
+ value: o
924
+ }, /* @__PURE__ */ w.createElement(Z.Provider, {
925
+ value: {
926
+ layout: l,
927
+ layoutOptions: i
928
+ }
929
+ }, e));
930
+ }
931
+ function Ne({ collection: n, persistedKeys: e, scrollRef: t, renderDropIndicator: i }) {
932
+ var l;
933
+ let { layout: o, layoutOptions: s } = j(Z), a = (l = o.useLayoutOptions) === null || l === void 0 ? void 0 : l.call(o), h = Re({
934
+ layout: o,
935
+ collection: n,
936
+ renderView: (d, c) => {
937
+ var u;
938
+ return c == null || (u = c.render) === null || u === void 0 ? void 0 : u.call(c, c);
939
+ },
940
+ onVisibleRectChange(d) {
941
+ let c = t == null ? void 0 : t.current;
942
+ c && (c.scrollLeft = d.x, c.scrollTop = d.y);
943
+ },
944
+ persistedKeys: e,
945
+ layoutOptions: L(() => s && a ? {
946
+ ...s,
947
+ ...a
948
+ } : s || a, [
949
+ s,
950
+ a
951
+ ])
952
+ }), { contentProps: r } = He({
953
+ onVisibleRectChange: h.setVisibleRect,
954
+ contentSize: h.contentSize,
955
+ onScrollStart: h.startScrolling,
956
+ onScrollEnd: h.endScrolling
957
+ }, t);
958
+ return /* @__PURE__ */ w.createElement("div", r, /* @__PURE__ */ w.createElement(Q.Provider, {
959
+ value: h
960
+ }, ee(null, h.visibleViews, i)));
961
+ }
962
+ function Te({ parent: n, renderDropIndicator: e }) {
963
+ let i = j(Q).virtualizer.getVisibleView(n.key);
964
+ return ee(i, Array.from(i.children), e);
965
+ }
966
+ function ee(n, e, t) {
967
+ return e.map((i) => Ee(n, i, t));
968
+ }
969
+ function Ee(n, e, t) {
970
+ let i = /* @__PURE__ */ w.createElement(J, {
971
+ key: e.key,
972
+ layoutInfo: e.layoutInfo,
973
+ virtualizer: e.virtualizer,
974
+ parent: n == null ? void 0 : n.layoutInfo
975
+ }, e.rendered), { collection: l, layout: o } = e.virtualizer, s = e.content;
976
+ return (s == null ? void 0 : s.type) === "item" && t && o.getDropTargetLayoutInfo && (i = /* @__PURE__ */ w.createElement(w.Fragment, {
977
+ key: e.key
978
+ }, A(n, e, {
979
+ type: "item",
980
+ key: e.content.key,
981
+ dropPosition: "before"
982
+ }, t), i, de(l, s, (a) => A(n, e, a, t)))), i;
983
+ }
984
+ function A(n, e, t, i) {
985
+ let l = i(t);
986
+ if (l) {
987
+ let o = e.virtualizer.layout.getDropTargetLayoutInfo(t);
988
+ l = /* @__PURE__ */ w.createElement(J, {
989
+ layoutInfo: o,
990
+ virtualizer: e.virtualizer,
991
+ parent: n == null ? void 0 : n.layoutInfo
992
+ }, l);
993
+ }
994
+ return l;
995
+ }
996
+ class Ve extends Se {
997
+ /**
998
+ * When using the ListLayout our scroll container height is not calculated properly when the content is partially sectioned.
999
+ * ```ts
1000
+ * const partiallySectionedContent = [
1001
+ * {
1002
+ * name: 'fruit section',
1003
+ * children: [{ id: 'kiwi', name: 'Kiwi' }]
1004
+ * },
1005
+ * // berries have no section, because it's optional
1006
+ * { id: 'lingonberries', name: 'Lingonberries' }
1007
+ * ];
1008
+ * ```
1009
+ * If we load the layout info for each key in the collection the calculation is correct.
1010
+ *
1011
+ * This might not be optional for performance, FYI
1012
+ */
1013
+ getContentSize() {
1014
+ var t;
1015
+ const e = (t = this == null ? void 0 : this.virtualizer) == null ? void 0 : t.collection.getKeys();
1016
+ return Array.from(e || []).forEach((i) => {
1017
+ this.getLayoutInfo(i);
1018
+ }), this.contentSize;
1019
+ }
1020
+ }
1021
+ const Me = "_listBox_1ns4v_7", Oe = "_listBoxPopover_1ns4v_19", Pe = "_listBoxSectionHeading_1ns4v_34", Be = "_listBoxButton_1ns4v_44", Ke = "_listBoxItem_1ns4v_56", qe = "_listBoxLoadMoreItem_1ns4v_101", M = {
1022
+ listBox: Me,
1023
+ listBoxPopover: Oe,
1024
+ listBoxSectionHeading: Pe,
1025
+ listBoxButton: Be,
1026
+ listBoxItem: Ke,
1027
+ listBoxLoadMoreItem: qe
1028
+ }, tt = ({
1029
+ className: n,
1030
+ children: e,
1031
+ ...t
1032
+ }) => /* @__PURE__ */ k(
1033
+ Le,
1034
+ {
1035
+ layout: Ve,
1036
+ layoutOptions: {
1037
+ headingHeight: 44
1038
+ },
1039
+ children: /* @__PURE__ */ k(
1040
+ se,
1041
+ {
1042
+ className: K(M.listBox, n),
1043
+ ...t,
1044
+ children: e
1045
+ }
1046
+ )
1047
+ }
1048
+ ), it = ({
1049
+ children: n,
1050
+ className: e,
1051
+ ...t
1052
+ }) => /* @__PURE__ */ k(
1053
+ re,
1054
+ {
1055
+ className: K(M.listBoxItem, e),
1056
+ ...t,
1057
+ children: n
1058
+ }
1059
+ ), lt = ({
1060
+ className: n,
1061
+ children: e,
1062
+ ...t
1063
+ }) => /* @__PURE__ */ k(
1064
+ ge,
1065
+ {
1066
+ className: K(n, M.listBoxPopover),
1067
+ offset: 0,
1068
+ ...t,
1069
+ children: e
1070
+ }
1071
+ ), ot = ({
1072
+ children: n,
1073
+ name: e,
1074
+ ...t
1075
+ }) => /* @__PURE__ */ ne(ae, { ...t, children: [
1076
+ /* @__PURE__ */ k(ye, { className: M.listBoxSectionHeading, children: e }),
1077
+ n
1078
+ ] });
1079
+ export {
1080
+ tt as L,
1081
+ it as a,
1082
+ lt as b,
1083
+ ot as c,
1084
+ M as s
1085
+ };