@midas-ds/components 13.0.1 → 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 (409) hide show
  1. package/AccordionItem-CAi-XFOc.js +343 -0
  2. package/AccordionItem-tWS22wDv.cjs +1 -0
  3. package/BadgeContainer-BZl6mSeb.cjs +1 -0
  4. package/{BadgeContainer-iNNgJKD9.js → BadgeContainer-DilMiV6u.js} +9 -9
  5. package/{Breadcrumbs-BQLxFZVm.cjs → Breadcrumbs-BBDGxc68.cjs} +1 -1
  6. package/{Breadcrumbs-C6B4fyk3.js → Breadcrumbs-BenPNv8Z.js} +15 -15
  7. package/Button-1sEX8jKn.cjs +1 -0
  8. package/{Button-D_tRdPW9.cjs → Button-BEWKXjlP.cjs} +1 -1
  9. package/{Button-CUMHt7MG.js → Button-CF97piBl.js} +10 -4
  10. package/{Button-DD5_S-tD.js → Button-CGe3Nyos.js} +122 -116
  11. package/Button.module-COONZqNU.cjs +1 -0
  12. package/Button.module-Cm0H98vy.js +14 -0
  13. package/{ButtonGroup-zx-9mxbJ.cjs → ButtonGroup-BpvDDECt.cjs} +1 -1
  14. package/{ButtonGroup-DC8925jD.js → ButtonGroup-Swh2E6Es.js} +1 -1
  15. package/CHANGELOG.md +59 -0
  16. package/Card-DJ8E5Rzd.js +131 -0
  17. package/Card-Db9xdzJ0.cjs +1 -0
  18. package/{CharacterCounter-CnRv-iUP.cjs → CharacterCounter-CTpQ12f7.cjs} +1 -1
  19. package/{CharacterCounter-DT7A0wWP.js → CharacterCounter-gbDGfize.js} +8 -8
  20. package/Checkbox-BgrLxY6P.cjs +1 -0
  21. package/{Checkbox-DTuryJdM.js → Checkbox-CdN1D5pD.js} +91 -87
  22. package/{CheckboxGroup-BmFdy-K6.js → CheckboxGroup-B1b-6bKq.js} +12 -12
  23. package/{CheckboxGroup-LrqCwPET.cjs → CheckboxGroup-BfZyy5yU.cjs} +1 -1
  24. package/{Collection-B0_WAieZ.js → Collection-BkxwF21i.js} +205 -213
  25. package/Collection-vGO6v3_U.cjs +1 -0
  26. package/{ColorSchemeSwitch-D5juAHPc.cjs → ColorSchemeSwitch-BOooU0iy.cjs} +3 -3
  27. package/{ColorSchemeSwitch-CgZfgCG4.js → ColorSchemeSwitch-KjnsdbDr.js} +10 -10
  28. package/{ComboBox-B2btGwWe.js → ComboBox-D1ZSZ6m-.js} +286 -278
  29. package/ComboBox-Dztk_jtC.cjs +1 -0
  30. package/DateField-BogEOseq.cjs +1 -0
  31. package/DateField-lsr_1fw4.js +47 -0
  32. package/{DateInputDivider-LxS0Kw1H.js → DateInputDivider-CRv3YuXd.js} +199 -196
  33. package/DateInputDivider-CYqm6PZP.cjs +1 -0
  34. package/{DateRangePicker-BmPPDZIF.js → DateRangePicker-5k1swaEt.js} +123 -119
  35. package/DateRangePicker-CgNXWOT6.cjs +6 -0
  36. package/Dialog-B1N4Ndyx.js +256 -0
  37. package/{Dialog-COeUapMW.js → Dialog-BUAp30Wc.js} +710 -692
  38. package/Dialog-BgSxz1JW.cjs +1 -0
  39. package/Dialog-PrnV8KTh.cjs +6 -0
  40. package/{DragAndDrop-Dw8JZmrn.cjs → DragAndDrop-Cs-V-9ak.cjs} +1 -1
  41. package/{DragAndDrop-PrUJv--B.js → DragAndDrop-DF0VoPJw.js} +2 -2
  42. package/{Dropdown-C_W6Sizy.cjs → Dropdown-DBFLb8Tl.cjs} +2 -2
  43. package/{Dropdown-CGQbf7OT.js → Dropdown-DaARa89l.js} +8 -8
  44. package/FieldError-Cimgm8qD.cjs +1 -0
  45. package/FieldError-l3xULRa0.js +48 -0
  46. package/{FileUpload-D2gnQKdn.js → FileUpload-CN0HNJ_Y.js} +14 -14
  47. package/{FileUpload-D3RaARDV.cjs → FileUpload-DHmsupSe.cjs} +1 -1
  48. package/{Grid-BmX6arAO.js → Grid-0XOQPryP.js} +2 -2
  49. package/{Grid-Bn1bCTH8.cjs → Grid-B6G4PWn5.cjs} +1 -1
  50. package/{GridItem-luVsL9lu.cjs → GridItem-BZ8eOXMB.cjs} +1 -1
  51. package/{GridItem-BtO9kCX9.js → GridItem-YtIpL5V2.js} +1 -1
  52. package/Group-B0Wj9pI8.cjs +1 -0
  53. package/Group-BAd7alBM.js +46 -0
  54. package/Heading-CCoGfKQ8.js +48 -0
  55. package/Heading-x7y3xadc.cjs +1 -0
  56. package/{Hidden-C9KWUR7b.js → Hidden-B5ir3Lei.js} +2 -2
  57. package/InfoBanner-BW3vy9mc.js +72 -0
  58. package/InfoBanner-_M_rGQiu.cjs +1 -0
  59. package/{Input-CzMx2mfl.cjs → Input-Bda0PCu5.cjs} +1 -1
  60. package/{Input-BLVRv0FK.js → Input-CQzv-D9g.js} +9 -9
  61. package/{Label-1N6ddn5w.js → Label-BGMXsSFb.js} +15 -15
  62. package/Label-CNTODOFg.cjs +1 -0
  63. package/Layout-BrEuHajQ.cjs +16 -0
  64. package/{Layout-B-A-s7B0.js → Layout-JL9l-y7w.js} +144 -145
  65. package/{Link-lO-Ke97K.js → Link-BudFjYrw.js} +22 -22
  66. package/Link-BvUSTIip.cjs +6 -0
  67. package/{Link-wM7cVPlS.cjs → Link-DRU6Qzia.cjs} +1 -1
  68. package/{Link-CbFSuEI1.js → Link-l-nMP-Zd.js} +10 -10
  69. package/LinkButton-DGdnbTgR.cjs +6 -0
  70. package/LinkButton-DP9W-E32.js +69 -0
  71. package/ListBox-TGCxrXIJ.cjs +1 -0
  72. package/ListBox-mOCZvKD4.js +534 -0
  73. package/{ListBoxLoadMoreItem-C4jnDcYH.js → ListBoxLoadMoreItem-CLdTe6-z.js} +5 -5
  74. package/{ListBoxLoadMoreItem-3jGpi90m.cjs → ListBoxLoadMoreItem-UX0jFQN4.cjs} +1 -1
  75. package/ListBoxSection-BNBHosou.cjs +1 -0
  76. package/{ListBoxSection-D7BcbjUt.js → ListBoxSection-D_kTkvgG.js} +139 -140
  77. package/{ListKeyboardDelegate-CVxkAn5D.js → ListKeyboardDelegate-BHnZMUhW.js} +36 -40
  78. package/ListKeyboardDelegate-CLRlDto7.cjs +1 -0
  79. package/{Logo-CFjZc5u2.cjs → Logo-4tRnV4Su.cjs} +1 -1
  80. package/{Logo-DkagDdKQ.js → Logo-DLlt576_.js} +17 -17
  81. package/{OverlayArrow-CvNuu3e3.js → OverlayArrow-CjGslX2c.js} +4 -4
  82. package/{OverlayArrow-ByH6lM-H.cjs → OverlayArrow-bcrb_syE.cjs} +1 -1
  83. package/{Popover-Bf5YH53o.js → Popover-CZFi2YGz.js} +13 -13
  84. package/Popover-uYTWBGHa.cjs +1 -0
  85. package/{PressResponder-CxVtArtP.js → PressResponder-BMj6Zvbn.js} +9 -9
  86. package/PressResponder-ChvCuOue.cjs +1 -0
  87. package/ProgressBar-BGemuJIq.cjs +1 -0
  88. package/ProgressBar-DhRmckYM.js +53 -0
  89. package/{RSPContexts-BW2SEIqe.js → RSPContexts-B0lEq7qq.js} +5 -3
  90. package/RSPContexts-XUvspq3j.cjs +1 -0
  91. package/Radio-Bp_31Z59.js +340 -0
  92. package/Radio-D3RGVrEd.cjs +1 -0
  93. package/{RangeCalendar-Bi9jc61A.js → RangeCalendar-9C96gMvy.js} +146 -145
  94. package/RangeCalendar-ChfmP_ql.cjs +6 -0
  95. package/{SSRProvider-40TXmsUG.js → SSRProvider-D8lZ0o6A.js} +5 -5
  96. package/{SSRProvider-Bc-sMhsT.cjs → SSRProvider-DZRLwxPS.cjs} +1 -1
  97. package/{SearchField-BevjTbcW.js → SearchField-DrEdzWAy.js} +44 -44
  98. package/SearchField-JaDXLq5W.cjs +6 -0
  99. package/Select-BCUH-Z7q.cjs +1 -0
  100. package/{Select-CEwJo1BT.js → Select-CpPE78Ke.js} +210 -188
  101. package/SelectionIndicator-BiSN1toV.cjs +1 -0
  102. package/{FocusScope-Bj40Ir-g.js → SelectionIndicator-ant6jeC1.js} +256 -165
  103. package/SelectionManager-C469yQeD.js +1063 -0
  104. package/SelectionManager-uFYC4wpu.cjs +1 -0
  105. package/{Separator-Bj24aGrT.js → Separator-B6l5qSpR.js} +28 -28
  106. package/{Separator-CM0KPvsX.js → Separator-BWAnBMVN.js} +5 -5
  107. package/Separator-DbhmtwDa.cjs +1 -0
  108. package/{Separator-Dgin8BNW.cjs → Separator-J0pLW4BN.cjs} +1 -1
  109. package/Skeleton-8onymGEG.cjs +1 -0
  110. package/Skeleton-BjTEGRpe.js +35 -0
  111. package/Spinner-D6Fcu_Dp.js +54 -0
  112. package/Spinner-DIapnvIz.cjs +6 -0
  113. package/TabList-C0tRVI6Q.cjs +1 -0
  114. package/TabList-DmkxO7MM.js +394 -0
  115. package/Table-BLqjyYKk.cjs +16 -0
  116. package/{Table-BzJktg2G.js → Table-CyWZO9uf.js} +710 -706
  117. package/Tag-DJqYiBLR.js +774 -0
  118. package/Tag-FDHGu_WP.cjs +1 -0
  119. package/{Text-BtPiT2P1.cjs → Text-0wXj3J8E.cjs} +1 -1
  120. package/Text-BBFWBNAH.js +32 -0
  121. package/{Text-BAFsaON-.cjs → Text-D5OSv6Uv.cjs} +1 -1
  122. package/{Text-Be7WIOwv.js → Text-bqP9NeVg.js} +3 -3
  123. package/TextArea-CZxwvBcS.cjs +1 -0
  124. package/TextArea-CrY7P18c.js +125 -0
  125. package/{TextField-_UY8CXtW.js → TextField-BWea-IT-.js} +26 -26
  126. package/TextField-DsN-kBfh.cjs +1 -0
  127. package/TextField.module-C03d0VY9.js +13 -0
  128. package/TextField.module-DmRrFHra.cjs +1 -0
  129. package/{Toast-Cs0CEbRr.cjs → Toast-DUZ5jfG1.cjs} +1 -1
  130. package/{Toast-B74PMVL9.js → Toast-Di3h8A14.js} +101 -101
  131. package/{ToggleButtonGroup-CwHPu7w5.js → ToggleButtonGroup-Bh4hP6Lk.js} +83 -79
  132. package/ToggleButtonGroup-D7r34GCt.cjs +1 -0
  133. package/{Tooltip-BHAtsp9k.js → Tooltip-CUdmOznK.js} +13 -13
  134. package/{Tooltip-CZa9n5sT.cjs → Tooltip-D-ATlbIM.cjs} +1 -1
  135. package/{VisuallyHidden-EjrqodVh.cjs → VisuallyHidden-BMelU6B0.cjs} +1 -1
  136. package/{VisuallyHidden-CGEtjAP7.js → VisuallyHidden-DuW70K-5.js} +8 -8
  137. package/accordion/Accordion.d.ts +0 -1
  138. package/accordion/index.cjs +1 -1
  139. package/accordion/index.js +2 -3
  140. package/assets/AccordionItem.css +1 -1
  141. package/assets/Button.css +1 -1
  142. package/assets/Card.css +1 -1
  143. package/assets/Checkbox.css +1 -1
  144. package/assets/ComboBox.css +1 -1
  145. package/assets/DateField.css +1 -1
  146. package/assets/DateInputDivider.css +1 -1
  147. package/assets/DateRangePicker.css +1 -1
  148. package/assets/Dialog.css +1 -1
  149. package/assets/Dropdown.css +1 -1
  150. package/assets/FieldError.css +1 -1
  151. package/assets/Heading.css +1 -1
  152. package/assets/InfoBanner.css +1 -1
  153. package/assets/Label.css +1 -1
  154. package/assets/Layout.css +1 -1
  155. package/assets/Link.css +1 -1
  156. package/assets/LinkButton.css +1 -1
  157. package/assets/ListBoxSection.css +1 -1
  158. package/assets/Logo.css +1 -1
  159. package/assets/Popover.css +1 -1
  160. package/assets/ProgressBar.css +1 -1
  161. package/assets/Radio.css +1 -1
  162. package/assets/RangeCalendar.css +1 -1
  163. package/assets/SearchField.css +1 -1
  164. package/assets/Select.css +1 -1
  165. package/assets/Separator.css +1 -1
  166. package/assets/Skeleton.css +1 -1
  167. package/assets/Spinner.css +1 -1
  168. package/assets/TabList.css +1 -1
  169. package/assets/Text.css +1 -1
  170. package/assets/TextField.css +1 -1
  171. package/assets/Toast.css +1 -1
  172. package/assets/Tooltip.css +1 -1
  173. package/assets/default.css +1 -1
  174. package/badge/index.cjs +1 -1
  175. package/badge/index.js +1 -1
  176. package/breadcrumbs/index.cjs +1 -1
  177. package/breadcrumbs/index.js +1 -1
  178. package/button/index.cjs +1 -1
  179. package/button/index.js +2 -2
  180. package/calendar/index.cjs +1 -1
  181. package/calendar/index.js +1 -1
  182. package/card/index.cjs +1 -1
  183. package/card/index.js +1 -1
  184. package/character-counter/index.cjs +1 -1
  185. package/character-counter/index.js +1 -1
  186. package/checkbox/index.cjs +1 -1
  187. package/checkbox/index.js +2 -2
  188. package/clsx-DKOfLqne.cjs +1 -0
  189. package/clsx-jbLnTBqA.js +11 -0
  190. package/color-scheme-switch/index.cjs +1 -1
  191. package/color-scheme-switch/index.js +1 -1
  192. package/combobox/index.cjs +1 -1
  193. package/combobox/index.js +1 -1
  194. package/{context-CGNJ3grH.js → context-Dl_saGB6.js} +11 -11
  195. package/{context-Df3XbgBG.cjs → context-UOrD6Zxk.cjs} +1 -1
  196. package/date-field/index.cjs +1 -1
  197. package/date-field/index.js +2 -2
  198. package/date-picker/index.cjs +1 -1
  199. package/date-picker/index.js +1 -1
  200. package/dropdown/index.cjs +1 -1
  201. package/dropdown/index.js +1 -1
  202. package/field-error/index.cjs +1 -1
  203. package/field-error/index.js +1 -1
  204. package/file-upload/index.cjs +1 -1
  205. package/file-upload/index.js +1 -1
  206. package/{getScrollParent-Ru2U2LlM.js → getScrollParent-DFCzfqHG.js} +1 -1
  207. package/{getScrollParent-DuKmPmUa.cjs → getScrollParent-DjULaF_q.cjs} +1 -1
  208. package/grid/index.cjs +1 -1
  209. package/grid/index.js +2 -2
  210. package/heading/Heading.d.ts +6 -0
  211. package/heading/index.cjs +1 -1
  212. package/heading/index.js +1 -1
  213. package/{index-BLPblar-.js → index-DEx4upZl.js} +19 -19
  214. package/{index-DSFSh2sC.cjs → index-hURPlN0u.cjs} +2 -2
  215. package/index.cjs +1 -1
  216. package/index.js +126 -127
  217. package/inertValue-BWmZ1afe.cjs +1 -0
  218. package/info-banner/index.cjs +1 -1
  219. package/info-banner/index.js +1 -1
  220. package/label/index.cjs +1 -1
  221. package/label/index.js +1 -1
  222. package/layout/index.cjs +1 -1
  223. package/layout/index.js +1 -1
  224. package/link/index.cjs +1 -1
  225. package/link/index.js +2 -2
  226. package/link-button/index.cjs +1 -1
  227. package/link-button/index.js +2 -2
  228. package/list-box/index.cjs +1 -1
  229. package/list-box/index.js +2 -2
  230. package/logo/index.cjs +1 -1
  231. package/logo/index.js +1 -1
  232. package/menu/index.cjs +1 -1
  233. package/menu/index.js +2 -2
  234. package/{mergeProps-BSsN7Bgk.js → mergeProps-Ct8m5-xW.js} +1 -1
  235. package/{mergeProps-JhcJ7uJL.cjs → mergeProps-Du5A8xi8.cjs} +1 -1
  236. package/modal/Dialog.d.ts +16 -3
  237. package/modal/index.cjs +1 -1
  238. package/modal/index.d.ts +1 -1
  239. package/modal/index.js +2 -2
  240. package/package.json +4 -4
  241. package/popover/index.cjs +1 -1
  242. package/popover/index.js +1 -1
  243. package/progress-bar/index.cjs +1 -1
  244. package/progress-bar/index.js +1 -1
  245. package/radio/index.cjs +1 -1
  246. package/radio/index.js +1 -1
  247. package/scrollIntoView-BVI21Y4-.js +65 -0
  248. package/scrollIntoView-BueMOyGp.cjs +1 -0
  249. package/search-field/index.cjs +1 -1
  250. package/search-field/index.js +1 -1
  251. package/select/index.cjs +1 -1
  252. package/select/index.js +1 -1
  253. package/select/types.d.ts +1 -1
  254. package/select/useMultiSelect.d.ts +2 -2
  255. package/skeleton/index.cjs +1 -1
  256. package/skeleton/index.js +1 -1
  257. package/spinner/Spinner.d.ts +5 -1
  258. package/spinner/index.cjs +1 -1
  259. package/spinner/index.js +1 -1
  260. package/table/index.cjs +1 -1
  261. package/table/index.js +1 -1
  262. package/tabs/Tabs.d.ts +2 -9
  263. package/tabs/index.cjs +1 -1
  264. package/tabs/index.d.ts +0 -1
  265. package/tabs/index.js +1 -1
  266. package/tag/index.cjs +1 -1
  267. package/tag/index.js +1 -1
  268. package/text/index.cjs +1 -1
  269. package/text/index.js +1 -1
  270. package/textfield/TextArea.d.ts +3 -2
  271. package/textfield/TextField.d.ts +3 -2
  272. package/textfield/index.cjs +1 -1
  273. package/textfield/index.js +1 -1
  274. package/toast/index.cjs +1 -1
  275. package/toast/index.js +1 -1
  276. package/toggle-button/index.cjs +1 -1
  277. package/toggle-button/index.js +1 -1
  278. package/tooltip/index.cjs +1 -1
  279. package/tooltip/index.js +1 -1
  280. package/{useButton-R8-i3HLC.cjs → useButton-C0r5nrqs.cjs} +1 -1
  281. package/{useButton-D6iUB8cN.js → useButton-CRgN6aZf.js} +3 -3
  282. package/useDateFormatter-BrrFo4nY.cjs +1 -0
  283. package/{useDateFormatter-BJ1ZyaH1.js → useDateFormatter-Bs5A6Xtu.js} +353 -322
  284. package/{useDescription-BMuiAqI5.cjs → useDescription-6BYtQxe6.cjs} +1 -1
  285. package/{useDescription-BLmIkYCq.js → useDescription-BFwQx7Rp.js} +1 -1
  286. package/useEvent-C125NAue.cjs +1 -0
  287. package/{useEvent-DpBHTuHJ.js → useEvent-smuTnX4G.js} +1 -1
  288. package/{useField-BMegM8fA.js → useField-BhJ9dM2g.js} +2 -2
  289. package/{useField-DyeD7MLj.cjs → useField-DvszkIMx.cjs} +1 -1
  290. package/{useFilter-BFnSe_Eq.js → useFilter-BdUU-HQZ.js} +1 -1
  291. package/{useFilter-aoggM85n.cjs → useFilter-R2IPvbS8.cjs} +1 -1
  292. package/{useFocusRing-BcbYske2.cjs → useFocusRing-C-XVcAE5.cjs} +1 -1
  293. package/{useFocusRing-DMo8ctYV.js → useFocusRing-CcxI7nbg.js} +2 -2
  294. package/{useFocusWithin-ClMkhYcq.js → useFocusWithin-DhXBuB2O.js} +1 -1
  295. package/{useFocusWithin-DTnk0e8a.cjs → useFocusWithin-GBjoTL5o.cjs} +1 -1
  296. package/{useFocusable-DXlMChFC.js → useFocusable-BJj-Bkig.js} +14 -14
  297. package/{useFocusable-CsG-IPuC.cjs → useFocusable-M4se1KJt.cjs} +1 -1
  298. package/{useFormValidation-L0UHvOsP.js → useFormValidation-By7G-T7y.js} +2 -2
  299. package/{useFormValidation-BQIRxgbU.cjs → useFormValidation-DV2Ioblb.cjs} +1 -1
  300. package/useHasTabbableChild-CIZGg_iG.cjs +1 -0
  301. package/{useHasTabbableChild-BDaxMsGu.js → useHasTabbableChild-CnpSoDuJ.js} +2 -2
  302. package/{useHighlightSelectionDescription-CQaG611l.cjs → useHighlightSelectionDescription-CBZfyrhy.cjs} +1 -1
  303. package/{useHighlightSelectionDescription-BkEv9Jye.js → useHighlightSelectionDescription-DPiqOr_Z.js} +5 -5
  304. package/{useHover-DGAmG7jt.cjs → useHover-DULSfLuK.cjs} +1 -1
  305. package/{useHover-D6bNIkU0.js → useHover-DkC5FyNd.js} +5 -5
  306. package/{useLabels-CvUk-yS3.cjs → useLabels-B5pmat1S.cjs} +1 -1
  307. package/{useLabels-Kmq5JCp_.js → useLabels-D24on06F.js} +1 -1
  308. package/{useListState-D2IEg6_e.cjs → useListState-DBawAMhF.cjs} +1 -1
  309. package/{useListState-pixYqSLl.js → useListState-PZF3ahpk.js} +1 -1
  310. package/{useLocalizedStringFormatter-BO2iZEL0.cjs → useLocalizedStringFormatter-BSac43NO.cjs} +1 -1
  311. package/useLocalizedStringFormatter-CHAo1AyN.cjs +1 -0
  312. package/{useLocalizedStringFormatter-CL9MUZ8A.js → useLocalizedStringFormatter-CSEh15AZ.js} +1 -1
  313. package/{useLocalizedStringFormatter-N0AyjzbM.js → useLocalizedStringFormatter-aOhh7wdl.js} +1 -1
  314. package/{usePress-DMUpU0GU.js → usePress-BqQIhkNY.js} +54 -54
  315. package/usePress-DmU79HEg.cjs +7 -0
  316. package/{useSingleSelectListState-BlvpP8y-.js → useSingleSelectListState-BLRBEJC7.js} +1 -1
  317. package/{useSingleSelectListState-CwWK_Dx2.cjs → useSingleSelectListState-CNETmoj5.cjs} +1 -1
  318. package/{useTextField-BC5X_AO_.js → useTextField-B8pM0p6X.js} +7 -7
  319. package/{useTextField-Cxpfu0U3.cjs → useTextField-CiWV3eeD.cjs} +1 -1
  320. package/useToggleState-DaxmInOW.cjs +1 -0
  321. package/{useUpdateEffect-C5YQs_1w.cjs → useUpdateEffect-sk3kiVGz.cjs} +1 -1
  322. package/utils/clsx.d.ts +8 -0
  323. package/utils/types.d.ts +5 -0
  324. package/utils-CtICjCYt.cjs +1 -0
  325. package/{utils-Cpcjg55U.js → utils-D2iKpxcZ.js} +47 -43
  326. package/utils-DRIRjPUS.cjs +1 -0
  327. package/{utils-DFIwp4PB.js → utils-Dxh86KaB.js} +20 -18
  328. package/AccordionItem-Bq8nUKg4.cjs +0 -1
  329. package/AccordionItem-D2Y0gJZB.js +0 -335
  330. package/BadgeContainer-su0iCJKy.cjs +0 -1
  331. package/Button-CMIbSc4-.cjs +0 -1
  332. package/Button.module-BT9wZenr.cjs +0 -1
  333. package/Button.module-CGIVvzVm.js +0 -14
  334. package/Card-D2UbrhDW.js +0 -131
  335. package/Card-UolcSL5O.cjs +0 -1
  336. package/Checkbox-dtZfsSfx.cjs +0 -1
  337. package/Collection-BvWp2xBd.cjs +0 -1
  338. package/ComboBox-uMsVrOYu.cjs +0 -1
  339. package/DateField-B5dlDwdH.cjs +0 -1
  340. package/DateField-CEpRn4wR.js +0 -47
  341. package/DateInputDivider-BnSo_Aox.cjs +0 -1
  342. package/DateRangePicker-It4M98bT.cjs +0 -6
  343. package/Dialog-B1HuzqOX.js +0 -240
  344. package/Dialog-DR6nEqMT.cjs +0 -1
  345. package/Dialog-doGnVsJJ.cjs +0 -1
  346. package/FieldError-Cornph2A.cjs +0 -1
  347. package/FieldError-DdvFyIf4.js +0 -48
  348. package/FocusScope-Uy3DiY0-.cjs +0 -1
  349. package/Group-BKYGeOBr.cjs +0 -1
  350. package/Group-C73mD_-i.js +0 -45
  351. package/Heading-BQlmb5Tm.js +0 -46
  352. package/Heading-D3FR_KXb.cjs +0 -1
  353. package/InfoBanner-C82hcpzj.cjs +0 -1
  354. package/InfoBanner-Dz_0wVSa.js +0 -83
  355. package/Label-06gf6yKQ.cjs +0 -1
  356. package/Layout-DlE30BHE.cjs +0 -16
  357. package/Link-ePZ3nrAW.cjs +0 -6
  358. package/LinkButton-CJyZh3BS.js +0 -69
  359. package/LinkButton-Cw73pOM2.cjs +0 -6
  360. package/ListBox-ICZKGluC.cjs +0 -1
  361. package/ListBox-LncMQt6I.js +0 -523
  362. package/ListBoxSection-BeDwnVZx.cjs +0 -1
  363. package/ListKeyboardDelegate-C_X1wLkh.cjs +0 -1
  364. package/Popover-DIq3kp6B.cjs +0 -1
  365. package/PressResponder-DbnYqwGB.cjs +0 -1
  366. package/ProgressBar-DRhXkSE6.js +0 -53
  367. package/ProgressBar-i7almbvK.cjs +0 -1
  368. package/RSPContexts-D8hmBfGm.cjs +0 -1
  369. package/Radio-BpQoJB8e.cjs +0 -1
  370. package/Radio-D4wUZfW9.js +0 -333
  371. package/RangeCalendar-KcJooXYf.cjs +0 -6
  372. package/SearchField-BA-X9dzb.cjs +0 -6
  373. package/Select-1QuVY4f5.cjs +0 -1
  374. package/SelectionManager-Bq-Gw1UT.js +0 -1043
  375. package/SelectionManager-BtbHoHpA.cjs +0 -1
  376. package/Separator-Cfv2pbWf.cjs +0 -1
  377. package/Skeleton-Iovq135_.js +0 -35
  378. package/Skeleton-MaBUPqhT.cjs +0 -1
  379. package/Spinner-BZ7i01Kt.js +0 -47
  380. package/Spinner-DxWDMW6e.cjs +0 -6
  381. package/TabList-3fErCDyP.cjs +0 -1
  382. package/TabList-CXaxruLg.js +0 -397
  383. package/Table-Dyqa6_rE.cjs +0 -16
  384. package/Tag-BYUPXbhG.js +0 -765
  385. package/Tag-BweDKw1v.cjs +0 -1
  386. package/Text-CmlsaWMA.js +0 -32
  387. package/TextArea-B4BZUoJp.cjs +0 -1
  388. package/TextArea-Df1fR5R4.js +0 -124
  389. package/TextField-Bm5916AD.cjs +0 -1
  390. package/TextField.module-CH39P8ZE.js +0 -13
  391. package/TextField.module-gJ-ruFra.cjs +0 -1
  392. package/ToggleButtonGroup-DY9S3USc.cjs +0 -1
  393. package/inertValue-B3AFhVG4.cjs +0 -1
  394. package/scrollIntoView-ClEACHUk.js +0 -57
  395. package/scrollIntoView-DRSoJp89.cjs +0 -1
  396. package/useDateFormatter-2B0vgHc-.cjs +0 -1
  397. package/useEvent-3ZO5TPSH.cjs +0 -1
  398. package/useHasTabbableChild-CJcLnolh.cjs +0 -1
  399. package/useLocalizedStringFormatter-BiX5BTlb.cjs +0 -1
  400. package/useObserveElement-BdI4zgd7.js +0 -27
  401. package/useObserveElement-MhzEsCkX.cjs +0 -1
  402. package/usePress-CicXV7UO.cjs +0 -7
  403. package/useToggleState-SqDyNfRi.cjs +0 -1
  404. package/utils/storybook.d.ts +0 -5
  405. package/utils/test.d.ts +0 -11
  406. package/utils-CMHKYKlz.cjs +0 -1
  407. package/utils-__vrf9VZ.cjs +0 -1
  408. package/variables-B3KEYyhW.cjs +0 -1
  409. package/variables-DzXcMW2k.js +0 -5
@@ -0,0 +1,1063 @@
1
+ import H, { useRef as F, useEffect as q, useMemo as j, useState as se } from "react";
2
+ import { $ as Ie, b as we, m as ue, c as xe } from "./utils-Dxh86KaB.js";
3
+ import { $ as he, a as Y, c as Fe, d as ye, e as Ce } from "./mergeProps-Ct8m5-xW.js";
4
+ import { b as Pe, c as Te, f as Me } from "./usePress-BqQIhkNY.js";
5
+ import { $ as J } from "./useEvent-smuTnX4G.js";
6
+ import { a as Be, b as pe } from "./scrollIntoView-BVI21Y4-.js";
7
+ import { $ as Le } from "./SelectionIndicator-ant6jeC1.js";
8
+ import { h as Re, o as Oe, g as ve } from "./useHover-DkC5FyNd.js";
9
+ import { b as ae } from "./useFocusable-BJj-Bkig.js";
10
+ import { flushSync as Ue } from "react-dom";
11
+ import { $ as ze } from "./context-Dl_saGB6.js";
12
+ import { $ as Ve } from "./useDescription-BFwQx7Rp.js";
13
+ import { $ as He } from "./useControlledState-u436Wbp1.js";
14
+ function be(i, e) {
15
+ const t = F(!0), l = F(null);
16
+ he(() => (t.current = !0, () => {
17
+ t.current = !1;
18
+ }), []), he(() => {
19
+ t.current ? t.current = !1 : (!l.current || e.some((n, c) => !Object.is(n, l[c]))) && i(), l.current = e;
20
+ }, e);
21
+ }
22
+ function G(i) {
23
+ return Re() ? i.metaKey : i.ctrlKey;
24
+ }
25
+ const We = /* @__PURE__ */ new Set([
26
+ "checkbox",
27
+ "radio",
28
+ "range",
29
+ "color",
30
+ "file",
31
+ "image",
32
+ "button",
33
+ "submit",
34
+ "reset"
35
+ ]);
36
+ function gt(i) {
37
+ return i instanceof HTMLInputElement && !We.has(i.type) || i instanceof HTMLTextAreaElement || i instanceof HTMLElement && i.isContentEditable;
38
+ }
39
+ const Ge = "react-aria-clear-focus", qe = "react-aria-focus", je = 500;
40
+ function Ye(i) {
41
+ let { isDisabled: e, onLongPressStart: t, onLongPressEnd: l, onLongPress: n, threshold: c = je, accessibilityDescription: o } = i;
42
+ const d = F(void 0);
43
+ let { addGlobalListener: a, removeGlobalListener: w } = Ie(), { pressProps: k } = Pe({
44
+ isDisabled: e,
45
+ onPressStart(h) {
46
+ if (h.continuePropagation(), (h.pointerType === "mouse" || h.pointerType === "touch") && (t && t({
47
+ ...h,
48
+ type: "longpressstart"
49
+ }), d.current = setTimeout(() => {
50
+ h.target.dispatchEvent(new PointerEvent("pointercancel", {
51
+ bubbles: !0
52
+ })), we(h.target).activeElement !== h.target && ue(h.target), n && n({
53
+ ...h,
54
+ type: "longpress"
55
+ }), d.current = void 0;
56
+ }, c), h.pointerType === "touch")) {
57
+ let g = (v) => {
58
+ v.preventDefault();
59
+ };
60
+ a(h.target, "contextmenu", g, {
61
+ once: !0
62
+ }), a(window, "pointerup", () => {
63
+ setTimeout(() => {
64
+ w(h.target, "contextmenu", g);
65
+ }, 30);
66
+ }, {
67
+ once: !0
68
+ });
69
+ }
70
+ },
71
+ onPressEnd(h) {
72
+ d.current && clearTimeout(d.current), l && (h.pointerType === "mouse" || h.pointerType === "touch") && l({
73
+ ...h,
74
+ type: "longpressend"
75
+ });
76
+ }
77
+ }), m = Ve(n && !e ? o : void 0);
78
+ return {
79
+ longPressProps: Y(k, m)
80
+ };
81
+ }
82
+ function Ee(i) {
83
+ let e = Je(we(i));
84
+ e !== i && (e && Ze(e, i), i && De(i, e));
85
+ }
86
+ function Ze(i, e) {
87
+ i.dispatchEvent(new FocusEvent("blur", {
88
+ relatedTarget: e
89
+ })), i.dispatchEvent(new FocusEvent("focusout", {
90
+ bubbles: !0,
91
+ relatedTarget: e
92
+ }));
93
+ }
94
+ function De(i, e) {
95
+ i.dispatchEvent(new FocusEvent("focus", {
96
+ relatedTarget: e
97
+ })), i.dispatchEvent(new FocusEvent("focusin", {
98
+ bubbles: !0,
99
+ relatedTarget: e
100
+ }));
101
+ }
102
+ function Je(i) {
103
+ let e = xe(i), t = e == null ? void 0 : e.getAttribute("aria-activedescendant");
104
+ return t && i.getElementById(t) || e;
105
+ }
106
+ function fe(i) {
107
+ return Oe() ? i.altKey : i.ctrlKey;
108
+ }
109
+ function oe(i, e) {
110
+ var t, l;
111
+ let n = `[data-key="${CSS.escape(String(e))}"]`, c = (t = i.current) === null || t === void 0 ? void 0 : t.dataset.collection;
112
+ return c && (n = `[data-collection="${CSS.escape(c)}"]${n}`), (l = i.current) === null || l === void 0 ? void 0 : l.querySelector(n);
113
+ }
114
+ const ke = /* @__PURE__ */ new WeakMap();
115
+ function Qe(i) {
116
+ let e = Fe();
117
+ return ke.set(i, e), e;
118
+ }
119
+ function Xe(i) {
120
+ return ke.get(i);
121
+ }
122
+ const Ne = 1e3;
123
+ function _e(i) {
124
+ let { keyboardDelegate: e, selectionManager: t, onTypeSelect: l } = i, n = F({
125
+ search: "",
126
+ timeout: void 0
127
+ }).current, c = (o) => {
128
+ let d = et(o.key);
129
+ if (!(!d || o.ctrlKey || o.metaKey || !o.currentTarget.contains(o.target) || n.search.length === 0 && d === " ")) {
130
+ if (d === " " && n.search.trim().length > 0 && (o.preventDefault(), "continuePropagation" in o || o.stopPropagation()), n.search += d, e.getKeyForSearch != null) {
131
+ let a = e.getKeyForSearch(n.search, t.focusedKey);
132
+ a == null && (a = e.getKeyForSearch(n.search)), a != null && (t.setFocusedKey(a), l && l(a));
133
+ }
134
+ clearTimeout(n.timeout), n.timeout = setTimeout(() => {
135
+ n.search = "";
136
+ }, Ne);
137
+ }
138
+ };
139
+ return {
140
+ typeSelectProps: {
141
+ // Using a capturing listener to catch the keydown event before
142
+ // other hooks in order to handle the Spacebar event.
143
+ onKeyDownCapture: e.getKeyForSearch ? c : void 0
144
+ }
145
+ };
146
+ }
147
+ function et(i) {
148
+ return i.length === 1 || !/^[A-Z]/i.test(i) ? i : "";
149
+ }
150
+ function Kt(i) {
151
+ let { selectionManager: e, keyboardDelegate: t, ref: l, autoFocus: n = !1, shouldFocusWrap: c = !1, disallowEmptySelection: o = !1, disallowSelectAll: d = !1, escapeKeyBehavior: a = "clearSelection", selectOnFocus: w = e.selectionBehavior === "replace", disallowTypeAhead: k = !1, shouldUseVirtualFocus: m, allowsTabNavigation: h = !1, isVirtualized: g, scrollRef: v = l, linkBehavior: A = "action" } = i, { direction: y } = ze(), x = Te(), p = (r) => {
152
+ var f;
153
+ if (r.altKey && r.key === "Tab" && r.preventDefault(), !(!((f = l.current) === null || f === void 0) && f.contains(r.target))) return;
154
+ const $ = (u, z) => {
155
+ if (u != null) {
156
+ if (e.isLink(u) && A === "selection" && w && !fe(r)) {
157
+ Ue(() => {
158
+ e.setFocusedKey(u, z);
159
+ });
160
+ let V = oe(l, u), de = e.getItemProps(u);
161
+ V && x.open(V, r, de.href, de.routerOptions);
162
+ return;
163
+ }
164
+ if (e.setFocusedKey(u, z), e.isLink(u) && A === "override") return;
165
+ r.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(u) : w && !fe(r) && e.replaceSelection(u);
166
+ }
167
+ };
168
+ switch (r.key) {
169
+ case "ArrowDown":
170
+ if (t.getKeyBelow) {
171
+ var s, S, E;
172
+ let u = e.focusedKey != null ? (s = t.getKeyBelow) === null || s === void 0 ? void 0 : s.call(t, e.focusedKey) : (S = t.getFirstKey) === null || S === void 0 ? void 0 : S.call(t);
173
+ u == null && c && (u = (E = t.getFirstKey) === null || E === void 0 ? void 0 : E.call(t, e.focusedKey)), u != null && (r.preventDefault(), $(u));
174
+ }
175
+ break;
176
+ case "ArrowUp":
177
+ if (t.getKeyAbove) {
178
+ var B, O, N;
179
+ let u = e.focusedKey != null ? (B = t.getKeyAbove) === null || B === void 0 ? void 0 : B.call(t, e.focusedKey) : (O = t.getLastKey) === null || O === void 0 ? void 0 : O.call(t);
180
+ u == null && c && (u = (N = t.getLastKey) === null || N === void 0 ? void 0 : N.call(t, e.focusedKey)), u != null && (r.preventDefault(), $(u));
181
+ }
182
+ break;
183
+ case "ArrowLeft":
184
+ if (t.getKeyLeftOf) {
185
+ var _, ee, te;
186
+ let u = e.focusedKey != null ? (_ = t.getKeyLeftOf) === null || _ === void 0 ? void 0 : _.call(t, e.focusedKey) : null;
187
+ u == null && c && (u = y === "rtl" ? (ee = t.getFirstKey) === null || ee === void 0 ? void 0 : ee.call(t, e.focusedKey) : (te = t.getLastKey) === null || te === void 0 ? void 0 : te.call(t, e.focusedKey)), u != null && (r.preventDefault(), $(u, y === "rtl" ? "first" : "last"));
188
+ }
189
+ break;
190
+ case "ArrowRight":
191
+ if (t.getKeyRightOf) {
192
+ var le, ie, ne;
193
+ let u = e.focusedKey != null ? (le = t.getKeyRightOf) === null || le === void 0 ? void 0 : le.call(t, e.focusedKey) : null;
194
+ u == null && c && (u = y === "rtl" ? (ie = t.getLastKey) === null || ie === void 0 ? void 0 : ie.call(t, e.focusedKey) : (ne = t.getFirstKey) === null || ne === void 0 ? void 0 : ne.call(t, e.focusedKey)), u != null && (r.preventDefault(), $(u, y === "rtl" ? "last" : "first"));
195
+ }
196
+ break;
197
+ case "Home":
198
+ if (t.getFirstKey) {
199
+ if (e.focusedKey === null && r.shiftKey) return;
200
+ r.preventDefault();
201
+ let u = t.getFirstKey(e.focusedKey, G(r));
202
+ e.setFocusedKey(u), u != null && (G(r) && r.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(u) : w && e.replaceSelection(u));
203
+ }
204
+ break;
205
+ case "End":
206
+ if (t.getLastKey) {
207
+ if (e.focusedKey === null && r.shiftKey) return;
208
+ r.preventDefault();
209
+ let u = t.getLastKey(e.focusedKey, G(r));
210
+ e.setFocusedKey(u), u != null && (G(r) && r.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(u) : w && e.replaceSelection(u));
211
+ }
212
+ break;
213
+ case "PageDown":
214
+ if (t.getKeyPageBelow && e.focusedKey != null) {
215
+ let u = t.getKeyPageBelow(e.focusedKey);
216
+ u != null && (r.preventDefault(), $(u));
217
+ }
218
+ break;
219
+ case "PageUp":
220
+ if (t.getKeyPageAbove && e.focusedKey != null) {
221
+ let u = t.getKeyPageAbove(e.focusedKey);
222
+ u != null && (r.preventDefault(), $(u));
223
+ }
224
+ break;
225
+ case "a":
226
+ G(r) && e.selectionMode === "multiple" && d !== !0 && (r.preventDefault(), e.selectAll());
227
+ break;
228
+ case "Escape":
229
+ a === "clearSelection" && !o && e.selectedKeys.size !== 0 && (r.stopPropagation(), r.preventDefault(), e.clearSelection());
230
+ break;
231
+ case "Tab":
232
+ if (!h) {
233
+ if (r.shiftKey) l.current.focus();
234
+ else {
235
+ let u = Le(l.current, {
236
+ tabbable: !0
237
+ }), z, V;
238
+ do
239
+ V = u.lastChild(), V && (z = V);
240
+ while (V);
241
+ z && !z.contains(document.activeElement) && ue(z);
242
+ }
243
+ break;
244
+ }
245
+ }
246
+ }, b = F({
247
+ top: 0,
248
+ left: 0
249
+ });
250
+ J(v, "scroll", g ? void 0 : () => {
251
+ var r, f, $, s;
252
+ b.current = {
253
+ top: ($ = (r = v.current) === null || r === void 0 ? void 0 : r.scrollTop) !== null && $ !== void 0 ? $ : 0,
254
+ left: (s = (f = v.current) === null || f === void 0 ? void 0 : f.scrollLeft) !== null && s !== void 0 ? s : 0
255
+ };
256
+ });
257
+ let K = (r) => {
258
+ if (e.isFocused) {
259
+ r.currentTarget.contains(r.target) || e.setFocused(!1);
260
+ return;
261
+ }
262
+ if (r.currentTarget.contains(r.target)) {
263
+ if (e.setFocused(!0), e.focusedKey == null) {
264
+ var f, $;
265
+ let E = (O) => {
266
+ O != null && (e.setFocusedKey(O), w && !e.isSelected(O) && e.replaceSelection(O));
267
+ }, B = r.relatedTarget;
268
+ var s, S;
269
+ B && r.currentTarget.compareDocumentPosition(B) & Node.DOCUMENT_POSITION_FOLLOWING ? E((s = e.lastSelectedKey) !== null && s !== void 0 ? s : (f = t.getLastKey) === null || f === void 0 ? void 0 : f.call(t)) : E((S = e.firstSelectedKey) !== null && S !== void 0 ? S : ($ = t.getFirstKey) === null || $ === void 0 ? void 0 : $.call(t));
270
+ } else !g && v.current && (v.current.scrollTop = b.current.top, v.current.scrollLeft = b.current.left);
271
+ if (e.focusedKey != null && v.current) {
272
+ let E = oe(l, e.focusedKey);
273
+ E instanceof HTMLElement && (!E.contains(document.activeElement) && !m && ue(E), ve() === "keyboard" && pe(E, {
274
+ containingElement: l.current
275
+ }));
276
+ }
277
+ }
278
+ }, L = (r) => {
279
+ r.currentTarget.contains(r.relatedTarget) || e.setFocused(!1);
280
+ }, D = F(!1);
281
+ J(l, qe, m ? (r) => {
282
+ let { detail: f } = r;
283
+ r.stopPropagation(), e.setFocused(!0), (f == null ? void 0 : f.focusStrategy) === "first" && (D.current = !0);
284
+ } : void 0);
285
+ let C = ye(() => {
286
+ var r, f;
287
+ let $ = (f = (r = t.getFirstKey) === null || r === void 0 ? void 0 : r.call(t)) !== null && f !== void 0 ? f : null;
288
+ if ($ == null) {
289
+ let s = xe();
290
+ Ee(l.current), De(s, null), e.collection.size > 0 && (D.current = !1);
291
+ } else
292
+ e.setFocusedKey($), D.current = !1;
293
+ });
294
+ be(() => {
295
+ D.current && C();
296
+ }, [
297
+ e.collection,
298
+ C
299
+ ]);
300
+ let T = ye(() => {
301
+ e.collection.size > 0 && (D.current = !1);
302
+ });
303
+ be(() => {
304
+ T();
305
+ }, [
306
+ e.focusedKey,
307
+ T
308
+ ]), J(l, Ge, m ? (r) => {
309
+ var f;
310
+ r.stopPropagation(), e.setFocused(!1), !((f = r.detail) === null || f === void 0) && f.clearFocusKey && e.setFocusedKey(null);
311
+ } : void 0);
312
+ const W = F(n), U = F(!1);
313
+ q(() => {
314
+ if (W.current) {
315
+ var r, f;
316
+ let S = null;
317
+ var $;
318
+ n === "first" && (S = ($ = (r = t.getFirstKey) === null || r === void 0 ? void 0 : r.call(t)) !== null && $ !== void 0 ? $ : null);
319
+ var s;
320
+ n === "last" && (S = (s = (f = t.getLastKey) === null || f === void 0 ? void 0 : f.call(t)) !== null && s !== void 0 ? s : null);
321
+ let E = e.selectedKeys;
322
+ if (E.size) {
323
+ for (let B of E) if (e.canSelectItem(B)) {
324
+ S = B;
325
+ break;
326
+ }
327
+ }
328
+ e.setFocused(!0), e.setFocusedKey(S), S == null && !m && l.current && ae(l.current), e.collection.size > 0 && (W.current = !1, U.current = !0);
329
+ }
330
+ });
331
+ let R = F(e.focusedKey), M = F(null);
332
+ q(() => {
333
+ if (e.isFocused && e.focusedKey != null && (e.focusedKey !== R.current || U.current) && v.current && l.current) {
334
+ let r = ve(), f = oe(l, e.focusedKey);
335
+ if (!(f instanceof HTMLElement))
336
+ return;
337
+ (r === "keyboard" || U.current) && (M.current && cancelAnimationFrame(M.current), M.current = requestAnimationFrame(() => {
338
+ v.current && (Be(v.current, f), r !== "virtual" && pe(f, {
339
+ containingElement: l.current
340
+ }));
341
+ }));
342
+ }
343
+ !m && e.isFocused && e.focusedKey == null && R.current != null && l.current && ae(l.current), R.current = e.focusedKey, U.current = !1;
344
+ }), q(() => () => {
345
+ M.current && cancelAnimationFrame(M.current);
346
+ }, []), J(l, "react-aria-focus-scope-restore", (r) => {
347
+ r.preventDefault(), e.setFocused(!0);
348
+ });
349
+ let P = {
350
+ onKeyDown: p,
351
+ onFocus: K,
352
+ onBlur: L,
353
+ onMouseDown(r) {
354
+ v.current === r.target && r.preventDefault();
355
+ }
356
+ }, { typeSelectProps: Q } = _e({
357
+ keyboardDelegate: t,
358
+ selectionManager: e
359
+ });
360
+ k || (P = Y(Q, P));
361
+ let Z;
362
+ m || (Z = e.focusedKey == null ? 0 : -1);
363
+ let X = Qe(e.collection);
364
+ return {
365
+ collectionProps: Y(P, {
366
+ tabIndex: Z,
367
+ "data-collection": X
368
+ })
369
+ };
370
+ }
371
+ function St(i) {
372
+ let { id: e, selectionManager: t, key: l, ref: n, shouldSelectOnPressUp: c, shouldUseVirtualFocus: o, focus: d, isDisabled: a, onAction: w, allowsDifferentPressOrigin: k, linkBehavior: m = "action" } = i, h = Te();
373
+ e = Fe(e);
374
+ let g = (s) => {
375
+ if (s.pointerType === "keyboard" && fe(s)) t.toggleSelection(l);
376
+ else {
377
+ if (t.selectionMode === "none") return;
378
+ if (t.isLink(l)) {
379
+ if (m === "selection" && n.current) {
380
+ let S = t.getItemProps(l);
381
+ h.open(n.current, s, S.href, S.routerOptions), t.setSelectedKeys(t.selectedKeys);
382
+ return;
383
+ } else if (m === "override" || m === "none") return;
384
+ }
385
+ t.selectionMode === "single" ? t.isSelected(l) && !t.disallowEmptySelection ? t.toggleSelection(l) : t.replaceSelection(l) : s && s.shiftKey ? t.extendSelection(l) : t.selectionBehavior === "toggle" || s && (G(s) || s.pointerType === "touch" || s.pointerType === "virtual") ? t.toggleSelection(l) : t.replaceSelection(l);
386
+ }
387
+ };
388
+ q(() => {
389
+ l === t.focusedKey && t.isFocused && (o ? Ee(n.current) : d ? d() : document.activeElement !== n.current && n.current && ae(n.current));
390
+ }, [
391
+ n,
392
+ l,
393
+ t.focusedKey,
394
+ t.childFocusStrategy,
395
+ t.isFocused,
396
+ o
397
+ ]), a = a || t.isDisabled(l);
398
+ let v = {};
399
+ !o && !a ? v = {
400
+ tabIndex: l === t.focusedKey ? 0 : -1,
401
+ onFocus(s) {
402
+ s.target === n.current && t.setFocusedKey(l);
403
+ }
404
+ } : a && (v.onMouseDown = (s) => {
405
+ s.preventDefault();
406
+ });
407
+ let A = t.isLink(l) && m === "override", y = w && i.UNSTABLE_itemBehavior === "action", x = t.isLink(l) && m !== "selection" && m !== "none", p = !a && t.canSelectItem(l) && !A && !y, b = (w || x) && !a, K = b && (t.selectionBehavior === "replace" ? !p : !p || t.isEmpty), L = b && p && t.selectionBehavior === "replace", D = K || L, C = F(null), T = D && p, W = F(!1), U = F(!1), R = t.getItemProps(l), M = (s) => {
408
+ if (w) {
409
+ var S;
410
+ w(), (S = n.current) === null || S === void 0 || S.dispatchEvent(new CustomEvent("react-aria-item-action", {
411
+ bubbles: !0
412
+ }));
413
+ }
414
+ x && n.current && h.open(n.current, s, R.href, R.routerOptions);
415
+ }, P = {
416
+ ref: n
417
+ };
418
+ if (c ? (P.onPressStart = (s) => {
419
+ C.current = s.pointerType, W.current = T, s.pointerType === "keyboard" && (!D || me()) && g(s);
420
+ }, k ? (P.onPressUp = K ? void 0 : (s) => {
421
+ s.pointerType === "mouse" && p && g(s);
422
+ }, P.onPress = K ? M : (s) => {
423
+ s.pointerType !== "keyboard" && s.pointerType !== "mouse" && p && g(s);
424
+ }) : P.onPress = (s) => {
425
+ if (K || L && s.pointerType !== "mouse") {
426
+ if (s.pointerType === "keyboard" && !$e()) return;
427
+ M(s);
428
+ } else s.pointerType !== "keyboard" && p && g(s);
429
+ }) : (P.onPressStart = (s) => {
430
+ C.current = s.pointerType, W.current = T, U.current = K, p && (s.pointerType === "mouse" && !K || s.pointerType === "keyboard" && (!b || me())) && g(s);
431
+ }, P.onPress = (s) => {
432
+ (s.pointerType === "touch" || s.pointerType === "pen" || s.pointerType === "virtual" || s.pointerType === "keyboard" && D && $e() || s.pointerType === "mouse" && U.current) && (D ? M(s) : p && g(s));
433
+ }), v["data-collection"] = Xe(t.collection), v["data-key"] = l, P.preventFocusOnPress = o, o && (P = Y(P, {
434
+ onPressStart(s) {
435
+ s.pointerType !== "touch" && (t.setFocused(!0), t.setFocusedKey(l));
436
+ },
437
+ onPress(s) {
438
+ s.pointerType === "touch" && (t.setFocused(!0), t.setFocusedKey(l));
439
+ }
440
+ })), R)
441
+ for (let s of [
442
+ "onPressStart",
443
+ "onPressEnd",
444
+ "onPressChange",
445
+ "onPress",
446
+ "onPressUp",
447
+ "onClick"
448
+ ]) R[s] && (P[s] = Ce(P[s], R[s]));
449
+ let { pressProps: Q, isPressed: Z } = Pe(P), X = L ? (s) => {
450
+ C.current === "mouse" && (s.stopPropagation(), s.preventDefault(), M(s));
451
+ } : void 0, { longPressProps: r } = Ye({
452
+ isDisabled: !T,
453
+ onLongPress(s) {
454
+ s.pointerType === "touch" && (g(s), t.setSelectionBehavior("toggle"));
455
+ }
456
+ }), f = (s) => {
457
+ C.current === "touch" && W.current && s.preventDefault();
458
+ }, $ = m !== "none" && t.isLink(l) ? (s) => {
459
+ Me.isOpening || s.preventDefault();
460
+ } : void 0;
461
+ return {
462
+ itemProps: Y(
463
+ v,
464
+ p || K || o && !a ? Q : {},
465
+ T ? r : {},
466
+ {
467
+ onDoubleClick: X,
468
+ onDragStartCapture: f,
469
+ onClick: $,
470
+ id: e
471
+ },
472
+ // Prevent DOM focus from moving on mouse down when using virtual focus
473
+ o ? {
474
+ onMouseDown: (s) => s.preventDefault()
475
+ } : void 0
476
+ ),
477
+ isPressed: Z,
478
+ isSelected: t.isSelected(l),
479
+ isFocused: t.isFocused && t.focusedKey === l,
480
+ isDisabled: a,
481
+ allowsSelection: p,
482
+ hasAction: D
483
+ };
484
+ }
485
+ function $e() {
486
+ let i = window.event;
487
+ return (i == null ? void 0 : i.key) === "Enter";
488
+ }
489
+ function me() {
490
+ let i = window.event;
491
+ return (i == null ? void 0 : i.key) === " " || (i == null ? void 0 : i.code) === "Space";
492
+ }
493
+ class tt {
494
+ build(e, t) {
495
+ return this.context = t, ge(() => this.iterateCollection(e));
496
+ }
497
+ *iterateCollection(e) {
498
+ let { children: t, items: l } = e;
499
+ if (H.isValidElement(t) && t.type === H.Fragment) yield* this.iterateCollection({
500
+ children: t.props.children,
501
+ items: l
502
+ });
503
+ else if (typeof t == "function") {
504
+ if (!l) throw new Error("props.children was a function but props.items is missing");
505
+ let n = 0;
506
+ for (let c of l)
507
+ yield* this.getFullNode({
508
+ value: c,
509
+ index: n
510
+ }, {
511
+ renderer: t
512
+ }), n++;
513
+ } else {
514
+ let n = [];
515
+ H.Children.forEach(t, (o) => {
516
+ o && n.push(o);
517
+ });
518
+ let c = 0;
519
+ for (let o of n) {
520
+ let d = this.getFullNode({
521
+ element: o,
522
+ index: c
523
+ }, {});
524
+ for (let a of d)
525
+ c++, yield a;
526
+ }
527
+ }
528
+ }
529
+ getKey(e, t, l, n) {
530
+ if (e.key != null) return e.key;
531
+ if (t.type === "cell" && t.key != null) return `${n}${t.key}`;
532
+ let c = t.value;
533
+ if (c != null) {
534
+ var o;
535
+ let d = (o = c.key) !== null && o !== void 0 ? o : c.id;
536
+ if (d == null) throw new Error("No key found for item");
537
+ return d;
538
+ }
539
+ return n ? `${n}.${t.index}` : `$.${t.index}`;
540
+ }
541
+ getChildState(e, t) {
542
+ return {
543
+ renderer: t.renderer || e.renderer
544
+ };
545
+ }
546
+ *getFullNode(e, t, l, n) {
547
+ if (H.isValidElement(e.element) && e.element.type === H.Fragment) {
548
+ let y = [];
549
+ H.Children.forEach(e.element.props.children, (p) => {
550
+ y.push(p);
551
+ });
552
+ var c;
553
+ let x = (c = e.index) !== null && c !== void 0 ? c : 0;
554
+ for (const p of y) yield* this.getFullNode({
555
+ element: p,
556
+ index: x++
557
+ }, t, l, n);
558
+ return;
559
+ }
560
+ let o = e.element;
561
+ if (!o && e.value && t && t.renderer) {
562
+ let y = this.cache.get(e.value);
563
+ if (y && (!y.shouldInvalidate || !y.shouldInvalidate(this.context))) {
564
+ y.index = e.index, y.parentKey = n ? n.key : null, yield y;
565
+ return;
566
+ }
567
+ o = t.renderer(e.value);
568
+ }
569
+ if (H.isValidElement(o)) {
570
+ let y = o.type;
571
+ if (typeof y != "function" && typeof y.getCollectionNode != "function") {
572
+ let K = o.type;
573
+ throw new Error(`Unknown element <${K}> in collection.`);
574
+ }
575
+ let x = y.getCollectionNode(o.props, this.context);
576
+ var d;
577
+ let p = (d = e.index) !== null && d !== void 0 ? d : 0, b = x.next();
578
+ for (; !b.done && b.value; ) {
579
+ let K = b.value;
580
+ e.index = p;
581
+ var a;
582
+ let L = (a = K.key) !== null && a !== void 0 ? a : null;
583
+ L == null && (L = K.element ? null : this.getKey(o, e, t, l));
584
+ let C = [
585
+ ...this.getFullNode({
586
+ ...K,
587
+ key: L,
588
+ index: p,
589
+ wrapper: lt(e.wrapper, K.wrapper)
590
+ }, this.getChildState(t, K), l ? `${l}${o.key}` : o.key, n)
591
+ ];
592
+ for (let T of C) {
593
+ var w, k;
594
+ T.value = (k = (w = K.value) !== null && w !== void 0 ? w : e.value) !== null && k !== void 0 ? k : null, T.value && this.cache.set(T.value, T);
595
+ var m;
596
+ if (e.type && T.type !== e.type) throw new Error(`Unsupported type <${re(T.type)}> in <${re((m = n == null ? void 0 : n.type) !== null && m !== void 0 ? m : "unknown parent type")}>. Only <${re(e.type)}> is supported.`);
597
+ p++, yield T;
598
+ }
599
+ b = x.next(C);
600
+ }
601
+ return;
602
+ }
603
+ if (e.key == null || e.type == null) return;
604
+ let h = this;
605
+ var g, v;
606
+ let A = {
607
+ type: e.type,
608
+ props: e.props,
609
+ key: e.key,
610
+ parentKey: n ? n.key : null,
611
+ value: (g = e.value) !== null && g !== void 0 ? g : null,
612
+ level: n ? n.level + 1 : 0,
613
+ index: e.index,
614
+ rendered: e.rendered,
615
+ textValue: (v = e.textValue) !== null && v !== void 0 ? v : "",
616
+ "aria-label": e["aria-label"],
617
+ wrapper: e.wrapper,
618
+ shouldInvalidate: e.shouldInvalidate,
619
+ hasChildNodes: e.hasChildNodes || !1,
620
+ childNodes: ge(function* () {
621
+ if (!e.hasChildNodes || !e.childNodes) return;
622
+ let y = 0;
623
+ for (let x of e.childNodes()) {
624
+ x.key != null && (x.key = `${A.key}${x.key}`);
625
+ let p = h.getFullNode({
626
+ ...x,
627
+ index: y
628
+ }, h.getChildState(t, x), A.key, A);
629
+ for (let b of p)
630
+ y++, yield b;
631
+ }
632
+ })
633
+ };
634
+ yield A;
635
+ }
636
+ constructor() {
637
+ this.cache = /* @__PURE__ */ new WeakMap();
638
+ }
639
+ }
640
+ function ge(i) {
641
+ let e = [], t = null;
642
+ return {
643
+ *[Symbol.iterator]() {
644
+ for (let l of e) yield l;
645
+ t || (t = i());
646
+ for (let l of t)
647
+ e.push(l), yield l;
648
+ }
649
+ };
650
+ }
651
+ function lt(i, e) {
652
+ if (i && e) return (t) => i(e(t));
653
+ if (i) return i;
654
+ if (e) return e;
655
+ }
656
+ function re(i) {
657
+ return i[0].toUpperCase() + i.slice(1);
658
+ }
659
+ function wt(i, e, t) {
660
+ let l = j(() => new tt(), []), { children: n, items: c, collection: o } = i;
661
+ return j(() => {
662
+ if (o) return o;
663
+ let a = l.build({
664
+ children: n,
665
+ items: c
666
+ }, t);
667
+ return e(a);
668
+ }, [
669
+ l,
670
+ n,
671
+ c,
672
+ o,
673
+ t,
674
+ e
675
+ ]);
676
+ }
677
+ function it(i, e) {
678
+ return typeof e.getChildren == "function" ? e.getChildren(i.key) : i.childNodes;
679
+ }
680
+ function nt(i) {
681
+ return st(i, 0);
682
+ }
683
+ function st(i, e) {
684
+ if (e < 0) return;
685
+ let t = 0;
686
+ for (let l of i) {
687
+ if (t === e) return l;
688
+ t++;
689
+ }
690
+ }
691
+ function xt(i) {
692
+ let e;
693
+ for (let t of i) e = t;
694
+ return e;
695
+ }
696
+ function ce(i, e, t) {
697
+ if (e.parentKey === t.parentKey) return e.index - t.index;
698
+ let l = [
699
+ ...Ke(i, e),
700
+ e
701
+ ], n = [
702
+ ...Ke(i, t),
703
+ t
704
+ ], c = l.slice(0, n.length).findIndex((o, d) => o !== n[d]);
705
+ return c !== -1 ? (e = l[c], t = n[c], e.index - t.index) : l.findIndex((o) => o === t) >= 0 ? 1 : (n.findIndex((o) => o === e) >= 0, -1);
706
+ }
707
+ function Ke(i, e) {
708
+ let t = [], l = e;
709
+ for (; (l == null ? void 0 : l.parentKey) != null; )
710
+ l = i.getItem(l.parentKey), l && t.unshift(l);
711
+ return t;
712
+ }
713
+ class I extends Set {
714
+ constructor(e, t, l) {
715
+ super(e), e instanceof I ? (this.anchorKey = t ?? e.anchorKey, this.currentKey = l ?? e.currentKey) : (this.anchorKey = t ?? null, this.currentKey = l ?? null);
716
+ }
717
+ }
718
+ function ot(i, e) {
719
+ if (i.size !== e.size) return !1;
720
+ for (let t of i)
721
+ if (!e.has(t)) return !1;
722
+ return !0;
723
+ }
724
+ function Ft(i) {
725
+ let { selectionMode: e = "none", disallowEmptySelection: t = !1, allowDuplicateSelectionEvents: l, selectionBehavior: n = "toggle", disabledBehavior: c = "all" } = i, o = F(!1), [, d] = se(!1), a = F(null), w = F(null), [, k] = se(null), m = j(() => Se(i.selectedKeys), [
726
+ i.selectedKeys
727
+ ]), h = j(() => Se(i.defaultSelectedKeys, new I()), [
728
+ i.defaultSelectedKeys
729
+ ]), [g, v] = He(m, h, i.onSelectionChange), A = j(() => i.disabledKeys ? new Set(i.disabledKeys) : /* @__PURE__ */ new Set(), [
730
+ i.disabledKeys
731
+ ]), [y, x] = se(n);
732
+ n === "replace" && y === "toggle" && typeof g == "object" && g.size === 0 && x("replace");
733
+ let p = F(n);
734
+ return q(() => {
735
+ n !== p.current && (x(n), p.current = n);
736
+ }, [
737
+ n
738
+ ]), {
739
+ selectionMode: e,
740
+ disallowEmptySelection: t,
741
+ selectionBehavior: y,
742
+ setSelectionBehavior: x,
743
+ get isFocused() {
744
+ return o.current;
745
+ },
746
+ setFocused(b) {
747
+ o.current = b, d(b);
748
+ },
749
+ get focusedKey() {
750
+ return a.current;
751
+ },
752
+ get childFocusStrategy() {
753
+ return w.current;
754
+ },
755
+ setFocusedKey(b, K = "first") {
756
+ a.current = b, w.current = K, k(b);
757
+ },
758
+ selectedKeys: g,
759
+ setSelectedKeys(b) {
760
+ (l || !ot(b, g)) && v(b);
761
+ },
762
+ disabledKeys: A,
763
+ disabledBehavior: c
764
+ };
765
+ }
766
+ function Se(i, e) {
767
+ return i ? i === "all" ? "all" : new I(i) : e;
768
+ }
769
+ class Ae {
770
+ /**
771
+ * The type of selection that is allowed in the collection.
772
+ */
773
+ get selectionMode() {
774
+ return this.state.selectionMode;
775
+ }
776
+ /**
777
+ * Whether the collection allows empty selection.
778
+ */
779
+ get disallowEmptySelection() {
780
+ return this.state.disallowEmptySelection;
781
+ }
782
+ /**
783
+ * The selection behavior for the collection.
784
+ */
785
+ get selectionBehavior() {
786
+ return this.state.selectionBehavior;
787
+ }
788
+ /**
789
+ * Sets the selection behavior for the collection.
790
+ */
791
+ setSelectionBehavior(e) {
792
+ this.state.setSelectionBehavior(e);
793
+ }
794
+ /**
795
+ * Whether the collection is currently focused.
796
+ */
797
+ get isFocused() {
798
+ return this.state.isFocused;
799
+ }
800
+ /**
801
+ * Sets whether the collection is focused.
802
+ */
803
+ setFocused(e) {
804
+ this.state.setFocused(e);
805
+ }
806
+ /**
807
+ * The current focused key in the collection.
808
+ */
809
+ get focusedKey() {
810
+ return this.state.focusedKey;
811
+ }
812
+ /** Whether the first or last child of the focused key should receive focus. */
813
+ get childFocusStrategy() {
814
+ return this.state.childFocusStrategy;
815
+ }
816
+ /**
817
+ * Sets the focused key.
818
+ */
819
+ setFocusedKey(e, t) {
820
+ (e == null || this.collection.getItem(e)) && this.state.setFocusedKey(e, t);
821
+ }
822
+ /**
823
+ * The currently selected keys in the collection.
824
+ */
825
+ get selectedKeys() {
826
+ return this.state.selectedKeys === "all" ? new Set(this.getSelectAllKeys()) : this.state.selectedKeys;
827
+ }
828
+ /**
829
+ * The raw selection value for the collection.
830
+ * Either 'all' for select all, or a set of keys.
831
+ */
832
+ get rawSelection() {
833
+ return this.state.selectedKeys;
834
+ }
835
+ /**
836
+ * Returns whether a key is selected.
837
+ */
838
+ isSelected(e) {
839
+ if (this.state.selectionMode === "none") return !1;
840
+ let t = this.getKey(e);
841
+ return t == null ? !1 : this.state.selectedKeys === "all" ? this.canSelectItem(t) : this.state.selectedKeys.has(t);
842
+ }
843
+ /**
844
+ * Whether the selection is empty.
845
+ */
846
+ get isEmpty() {
847
+ return this.state.selectedKeys !== "all" && this.state.selectedKeys.size === 0;
848
+ }
849
+ /**
850
+ * Whether all items in the collection are selected.
851
+ */
852
+ get isSelectAll() {
853
+ if (this.isEmpty) return !1;
854
+ if (this.state.selectedKeys === "all") return !0;
855
+ if (this._isSelectAll != null) return this._isSelectAll;
856
+ let e = this.getSelectAllKeys(), t = this.state.selectedKeys;
857
+ return this._isSelectAll = e.every((l) => t.has(l)), this._isSelectAll;
858
+ }
859
+ get firstSelectedKey() {
860
+ let e = null;
861
+ for (let l of this.state.selectedKeys) {
862
+ let n = this.collection.getItem(l);
863
+ (!e || n && ce(this.collection, n, e) < 0) && (e = n);
864
+ }
865
+ var t;
866
+ return (t = e == null ? void 0 : e.key) !== null && t !== void 0 ? t : null;
867
+ }
868
+ get lastSelectedKey() {
869
+ let e = null;
870
+ for (let l of this.state.selectedKeys) {
871
+ let n = this.collection.getItem(l);
872
+ (!e || n && ce(this.collection, n, e) > 0) && (e = n);
873
+ }
874
+ var t;
875
+ return (t = e == null ? void 0 : e.key) !== null && t !== void 0 ? t : null;
876
+ }
877
+ get disabledKeys() {
878
+ return this.state.disabledKeys;
879
+ }
880
+ get disabledBehavior() {
881
+ return this.state.disabledBehavior;
882
+ }
883
+ /**
884
+ * Extends the selection to the given key.
885
+ */
886
+ extendSelection(e) {
887
+ if (this.selectionMode === "none") return;
888
+ if (this.selectionMode === "single") {
889
+ this.replaceSelection(e);
890
+ return;
891
+ }
892
+ let t = this.getKey(e);
893
+ if (t == null) return;
894
+ let l;
895
+ if (this.state.selectedKeys === "all") l = new I([
896
+ t
897
+ ], t, t);
898
+ else {
899
+ let o = this.state.selectedKeys;
900
+ var n;
901
+ let d = (n = o.anchorKey) !== null && n !== void 0 ? n : t;
902
+ l = new I(o, d, t);
903
+ var c;
904
+ for (let a of this.getKeyRange(d, (c = o.currentKey) !== null && c !== void 0 ? c : t)) l.delete(a);
905
+ for (let a of this.getKeyRange(t, d)) this.canSelectItem(a) && l.add(a);
906
+ }
907
+ this.state.setSelectedKeys(l);
908
+ }
909
+ getKeyRange(e, t) {
910
+ let l = this.collection.getItem(e), n = this.collection.getItem(t);
911
+ return l && n ? ce(this.collection, l, n) <= 0 ? this.getKeyRangeInternal(e, t) : this.getKeyRangeInternal(t, e) : [];
912
+ }
913
+ getKeyRangeInternal(e, t) {
914
+ var l;
915
+ if (!((l = this.layoutDelegate) === null || l === void 0) && l.getKeyRange) return this.layoutDelegate.getKeyRange(e, t);
916
+ let n = [], c = e;
917
+ for (; c != null; ) {
918
+ let o = this.collection.getItem(c);
919
+ if (o && (o.type === "item" || o.type === "cell" && this.allowsCellSelection) && n.push(c), c === t) return n;
920
+ c = this.collection.getKeyAfter(c);
921
+ }
922
+ return [];
923
+ }
924
+ getKey(e) {
925
+ let t = this.collection.getItem(e);
926
+ if (!t || t.type === "cell" && this.allowsCellSelection) return e;
927
+ for (; t && t.type !== "item" && t.parentKey != null; ) t = this.collection.getItem(t.parentKey);
928
+ return !t || t.type !== "item" ? null : t.key;
929
+ }
930
+ /**
931
+ * Toggles whether the given key is selected.
932
+ */
933
+ toggleSelection(e) {
934
+ if (this.selectionMode === "none") return;
935
+ if (this.selectionMode === "single" && !this.isSelected(e)) {
936
+ this.replaceSelection(e);
937
+ return;
938
+ }
939
+ let t = this.getKey(e);
940
+ if (t == null) return;
941
+ let l = new I(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
942
+ l.has(t) ? l.delete(t) : this.canSelectItem(t) && (l.add(t), l.anchorKey = t, l.currentKey = t), !(this.disallowEmptySelection && l.size === 0) && this.state.setSelectedKeys(l);
943
+ }
944
+ /**
945
+ * Replaces the selection with only the given key.
946
+ */
947
+ replaceSelection(e) {
948
+ if (this.selectionMode === "none") return;
949
+ let t = this.getKey(e);
950
+ if (t == null) return;
951
+ let l = this.canSelectItem(t) ? new I([
952
+ t
953
+ ], t, t) : new I();
954
+ this.state.setSelectedKeys(l);
955
+ }
956
+ /**
957
+ * Replaces the selection with the given keys.
958
+ */
959
+ setSelectedKeys(e) {
960
+ if (this.selectionMode === "none") return;
961
+ let t = new I();
962
+ for (let l of e) {
963
+ let n = this.getKey(l);
964
+ if (n != null && (t.add(n), this.selectionMode === "single"))
965
+ break;
966
+ }
967
+ this.state.setSelectedKeys(t);
968
+ }
969
+ getSelectAllKeys() {
970
+ let e = [], t = (l) => {
971
+ for (; l != null; ) {
972
+ if (this.canSelectItem(l)) {
973
+ var n;
974
+ let o = this.collection.getItem(l);
975
+ (o == null ? void 0 : o.type) === "item" && e.push(l);
976
+ var c;
977
+ o != null && o.hasChildNodes && (this.allowsCellSelection || o.type !== "item") && t((c = (n = nt(it(o, this.collection))) === null || n === void 0 ? void 0 : n.key) !== null && c !== void 0 ? c : null);
978
+ }
979
+ l = this.collection.getKeyAfter(l);
980
+ }
981
+ };
982
+ return t(this.collection.getFirstKey()), e;
983
+ }
984
+ /**
985
+ * Selects all items in the collection.
986
+ */
987
+ selectAll() {
988
+ !this.isSelectAll && this.selectionMode === "multiple" && this.state.setSelectedKeys("all");
989
+ }
990
+ /**
991
+ * Removes all keys from the selection.
992
+ */
993
+ clearSelection() {
994
+ !this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new I());
995
+ }
996
+ /**
997
+ * Toggles between select all and an empty selection.
998
+ */
999
+ toggleSelectAll() {
1000
+ this.isSelectAll ? this.clearSelection() : this.selectAll();
1001
+ }
1002
+ select(e, t) {
1003
+ this.selectionMode !== "none" && (this.selectionMode === "single" ? this.isSelected(e) && !this.disallowEmptySelection ? this.toggleSelection(e) : this.replaceSelection(e) : this.selectionBehavior === "toggle" || t && (t.pointerType === "touch" || t.pointerType === "virtual") ? this.toggleSelection(e) : this.replaceSelection(e));
1004
+ }
1005
+ /**
1006
+ * Returns whether the current selection is equal to the given selection.
1007
+ */
1008
+ isSelectionEqual(e) {
1009
+ if (e === this.state.selectedKeys) return !0;
1010
+ let t = this.selectedKeys;
1011
+ if (e.size !== t.size) return !1;
1012
+ for (let l of e)
1013
+ if (!t.has(l)) return !1;
1014
+ for (let l of t)
1015
+ if (!e.has(l)) return !1;
1016
+ return !0;
1017
+ }
1018
+ canSelectItem(e) {
1019
+ var t;
1020
+ if (this.state.selectionMode === "none" || this.state.disabledKeys.has(e)) return !1;
1021
+ let l = this.collection.getItem(e);
1022
+ return !(!l || !(l == null || (t = l.props) === null || t === void 0) && t.isDisabled || l.type === "cell" && !this.allowsCellSelection);
1023
+ }
1024
+ isDisabled(e) {
1025
+ var t, l;
1026
+ return this.state.disabledBehavior === "all" && (this.state.disabledKeys.has(e) || !!(!((l = this.collection.getItem(e)) === null || l === void 0 || (t = l.props) === null || t === void 0) && t.isDisabled));
1027
+ }
1028
+ isLink(e) {
1029
+ var t, l;
1030
+ return !!(!((l = this.collection.getItem(e)) === null || l === void 0 || (t = l.props) === null || t === void 0) && t.href);
1031
+ }
1032
+ getItemProps(e) {
1033
+ var t;
1034
+ return (t = this.collection.getItem(e)) === null || t === void 0 ? void 0 : t.props;
1035
+ }
1036
+ withCollection(e) {
1037
+ return new Ae(e, this.state, {
1038
+ allowsCellSelection: this.allowsCellSelection,
1039
+ layoutDelegate: this.layoutDelegate || void 0
1040
+ });
1041
+ }
1042
+ constructor(e, t, l) {
1043
+ this.collection = e, this.state = t;
1044
+ var n;
1045
+ this.allowsCellSelection = (n = l == null ? void 0 : l.allowsCellSelection) !== null && n !== void 0 ? n : !1, this._isSelectAll = null, this.layoutDelegate = (l == null ? void 0 : l.layoutDelegate) || null;
1046
+ }
1047
+ }
1048
+ export {
1049
+ Ft as $,
1050
+ wt as a,
1051
+ Ae as b,
1052
+ oe as c,
1053
+ St as d,
1054
+ Kt as e,
1055
+ it as f,
1056
+ gt as g,
1057
+ _e as h,
1058
+ De as i,
1059
+ xt as j,
1060
+ nt as k,
1061
+ st as l,
1062
+ Ye as m
1063
+ };