@midas-ds/components 14.0.0 → 14.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/AccordionItem-CAi-XFOc.js +343 -0
  2. package/AccordionItem-tWS22wDv.cjs +1 -0
  3. package/{Breadcrumbs-DpUPChG9.cjs → Breadcrumbs-BBDGxc68.cjs} +1 -1
  4. package/{Breadcrumbs-CV3rVTjR.js → Breadcrumbs-BenPNv8Z.js} +4 -4
  5. package/Button-1sEX8jKn.cjs +1 -0
  6. package/{Button-xc8A29pm.cjs → Button-BEWKXjlP.cjs} +1 -1
  7. package/{Button-CRIYvCRM.js → Button-CF97piBl.js} +1 -1
  8. package/{Button-B6lxIKPk.js → Button-CGe3Nyos.js} +121 -115
  9. package/CHANGELOG.md +26 -0
  10. package/{Card-CfosvMF5.js → Card-DJ8E5Rzd.js} +3 -3
  11. package/{Card-D2E3gviQ.cjs → Card-Db9xdzJ0.cjs} +1 -1
  12. package/{CharacterCounter-C-PFKoGg.cjs → CharacterCounter-CTpQ12f7.cjs} +1 -1
  13. package/{CharacterCounter-DpFONstE.js → CharacterCounter-gbDGfize.js} +2 -2
  14. package/Checkbox-BgrLxY6P.cjs +1 -0
  15. package/{Checkbox-Cr3MmHPE.js → Checkbox-CdN1D5pD.js} +94 -90
  16. package/{CheckboxGroup-DEY3JDEL.js → CheckboxGroup-B1b-6bKq.js} +7 -7
  17. package/{CheckboxGroup-f9Oa1MhQ.cjs → CheckboxGroup-BfZyy5yU.cjs} +1 -1
  18. package/{Collection-j_iWeuZo.js → Collection-BkxwF21i.js} +205 -213
  19. package/Collection-vGO6v3_U.cjs +1 -0
  20. package/{ColorSchemeSwitch-Cur7zN5_.cjs → ColorSchemeSwitch-BOooU0iy.cjs} +1 -1
  21. package/{ColorSchemeSwitch-ChFSNntp.js → ColorSchemeSwitch-KjnsdbDr.js} +2 -2
  22. package/{ComboBox-D7eKe-M5.js → ComboBox-D1ZSZ6m-.js} +254 -246
  23. package/ComboBox-Dztk_jtC.cjs +1 -0
  24. package/{DateField-BszKZodr.cjs → DateField-BogEOseq.cjs} +1 -1
  25. package/{DateField-xyhyDy7u.js → DateField-lsr_1fw4.js} +4 -4
  26. package/{DateInputDivider-2Wf2hlXA.js → DateInputDivider-CRv3YuXd.js} +191 -188
  27. package/DateInputDivider-CYqm6PZP.cjs +1 -0
  28. package/{DateRangePicker-YwKi0ukr.js → DateRangePicker-5k1swaEt.js} +119 -115
  29. package/DateRangePicker-CgNXWOT6.cjs +6 -0
  30. package/Dialog-B1N4Ndyx.js +256 -0
  31. package/{Dialog-DOyFzvUa.js → Dialog-BUAp30Wc.js} +712 -694
  32. package/Dialog-BgSxz1JW.cjs +1 -0
  33. package/Dialog-PrnV8KTh.cjs +6 -0
  34. package/{DragAndDrop-DQ_6tl6K.cjs → DragAndDrop-Cs-V-9ak.cjs} +1 -1
  35. package/{DragAndDrop-DPRU3Y0Y.js → DragAndDrop-DF0VoPJw.js} +1 -1
  36. package/{Dropdown-5rmvcHD_.cjs → Dropdown-DBFLb8Tl.cjs} +1 -1
  37. package/{Dropdown-uC9wc8vd.js → Dropdown-DaARa89l.js} +2 -2
  38. package/{FieldError-C4WBoCRc.cjs → FieldError-Cimgm8qD.cjs} +1 -1
  39. package/{FieldError-C4kD4yJZ.js → FieldError-l3xULRa0.js} +3 -3
  40. package/{FileUpload-01wGpykv.js → FileUpload-CN0HNJ_Y.js} +9 -9
  41. package/{FileUpload-CTbh7Gic.cjs → FileUpload-DHmsupSe.cjs} +1 -1
  42. package/Group-B0Wj9pI8.cjs +1 -0
  43. package/Group-BAd7alBM.js +46 -0
  44. package/{Heading-CEx2LJyM.js → Heading-CCoGfKQ8.js} +9 -9
  45. package/{Heading-CUShN98j.cjs → Heading-x7y3xadc.cjs} +1 -1
  46. package/{InfoBanner-CRSz8DK2.js → InfoBanner-BW3vy9mc.js} +1 -1
  47. package/{InfoBanner-D_pNj1J2.cjs → InfoBanner-_M_rGQiu.cjs} +1 -1
  48. package/{Input-CCuE9Sc5.cjs → Input-Bda0PCu5.cjs} +1 -1
  49. package/{Input-CkTOajNJ.js → Input-CQzv-D9g.js} +3 -3
  50. package/{Label-CV9p0K2n.js → Label-BGMXsSFb.js} +4 -4
  51. package/{Label-CkIRTC0_.cjs → Label-CNTODOFg.cjs} +1 -1
  52. package/Layout-BrEuHajQ.cjs +16 -0
  53. package/{Layout-IeVrHpT0.js → Layout-JL9l-y7w.js} +62 -63
  54. package/{Link-BFvUN5Sq.js → Link-BudFjYrw.js} +1 -1
  55. package/{Link-D2K7bDd3.cjs → Link-BvUSTIip.cjs} +1 -1
  56. package/{Link-a3Ymcnoa.cjs → Link-DRU6Qzia.cjs} +1 -1
  57. package/{Link-B9CQXWzE.js → Link-l-nMP-Zd.js} +5 -5
  58. package/{LinkButton-BCn5gR10.cjs → LinkButton-DGdnbTgR.cjs} +1 -1
  59. package/{LinkButton-DN3J1Agu.js → LinkButton-DP9W-E32.js} +1 -1
  60. package/ListBox-TGCxrXIJ.cjs +1 -0
  61. package/{ListBox-2eEa1l0M.js → ListBox-mOCZvKD4.js} +187 -176
  62. package/{ListBoxLoadMoreItem-IcGb_XwN.js → ListBoxLoadMoreItem-CLdTe6-z.js} +3 -3
  63. package/{ListBoxLoadMoreItem-BBE3OF4J.cjs → ListBoxLoadMoreItem-UX0jFQN4.cjs} +1 -1
  64. package/ListBoxSection-BNBHosou.cjs +1 -0
  65. package/{ListBoxSection-dksiACMZ.js → ListBoxSection-D_kTkvgG.js} +139 -140
  66. package/{ListKeyboardDelegate-Dyu4eFtP.js → ListKeyboardDelegate-BHnZMUhW.js} +36 -40
  67. package/ListKeyboardDelegate-CLRlDto7.cjs +1 -0
  68. package/{OverlayArrow-Bh_G2tJ3.js → OverlayArrow-CjGslX2c.js} +2 -2
  69. package/{OverlayArrow-DJ4nNscD.cjs → OverlayArrow-bcrb_syE.cjs} +1 -1
  70. package/{Popover-D7_IfJ3o.js → Popover-CZFi2YGz.js} +2 -2
  71. package/{Popover-BI2Koco0.cjs → Popover-uYTWBGHa.cjs} +1 -1
  72. package/{PressResponder-DUhG97jJ.js → PressResponder-BMj6Zvbn.js} +3 -3
  73. package/{PressResponder-AXK2I_yx.cjs → PressResponder-ChvCuOue.cjs} +1 -1
  74. package/{ProgressBar-B-TOuoAC.cjs → ProgressBar-BGemuJIq.cjs} +1 -1
  75. package/{ProgressBar-B0WEQkyq.js → ProgressBar-DhRmckYM.js} +2 -2
  76. package/{RSPContexts-BW2SEIqe.js → RSPContexts-B0lEq7qq.js} +5 -3
  77. package/RSPContexts-XUvspq3j.cjs +1 -0
  78. package/Radio-Bp_31Z59.js +340 -0
  79. package/Radio-D3RGVrEd.cjs +1 -0
  80. package/{RangeCalendar-D5TMu8GI.js → RangeCalendar-9C96gMvy.js} +58 -58
  81. package/{RangeCalendar-B6zKSDju.cjs → RangeCalendar-ChfmP_ql.cjs} +2 -2
  82. package/{SearchField-wojUSY2S.js → SearchField-DrEdzWAy.js} +3 -3
  83. package/{SearchField-DnBBlPT7.cjs → SearchField-JaDXLq5W.cjs} +1 -1
  84. package/Select-BCUH-Z7q.cjs +1 -0
  85. package/Select-CpPE78Ke.js +676 -0
  86. package/SelectionIndicator-BiSN1toV.cjs +1 -0
  87. package/{FocusScope-8ILtcq9W.js → SelectionIndicator-ant6jeC1.js} +256 -165
  88. package/SelectionManager-C469yQeD.js +1063 -0
  89. package/SelectionManager-uFYC4wpu.cjs +1 -0
  90. package/{Separator--4b7vckr.js → Separator-B6l5qSpR.js} +2 -2
  91. package/{Separator-COlhRmJF.js → Separator-BWAnBMVN.js} +4 -4
  92. package/{Separator-DcbM84B8.cjs → Separator-DbhmtwDa.cjs} +1 -1
  93. package/{Separator-BQkxEZC9.cjs → Separator-J0pLW4BN.cjs} +1 -1
  94. package/Spinner-D6Fcu_Dp.js +54 -0
  95. package/Spinner-DIapnvIz.cjs +6 -0
  96. package/TabList-C0tRVI6Q.cjs +1 -0
  97. package/TabList-DmkxO7MM.js +394 -0
  98. package/Table-BLqjyYKk.cjs +16 -0
  99. package/{Table-cCSOrPkK.js → Table-CyWZO9uf.js} +707 -703
  100. package/Tag-DJqYiBLR.js +774 -0
  101. package/Tag-FDHGu_WP.cjs +1 -0
  102. package/{Text-CkhG15SU.cjs → Text-0wXj3J8E.cjs} +1 -1
  103. package/{Text-BQe1I4-r.js → Text-BBFWBNAH.js} +1 -1
  104. package/{Text-CkhZTTV5.cjs → Text-D5OSv6Uv.cjs} +1 -1
  105. package/{Text-BpERRete.js → Text-bqP9NeVg.js} +1 -1
  106. package/{TextArea-B5TsyJxa.cjs → TextArea-CZxwvBcS.cjs} +1 -1
  107. package/{TextArea-Cado2arG.js → TextArea-CrY7P18c.js} +8 -8
  108. package/{TextField-5AI6T1ol.js → TextField-BWea-IT-.js} +10 -10
  109. package/TextField-DsN-kBfh.cjs +1 -0
  110. package/{Toast-Cs-Uvf1p.cjs → Toast-DUZ5jfG1.cjs} +1 -1
  111. package/{Toast-CgXRE33Y.js → Toast-Di3h8A14.js} +12 -12
  112. package/{ToggleButtonGroup-SKGgfFs4.js → ToggleButtonGroup-Bh4hP6Lk.js} +82 -78
  113. package/ToggleButtonGroup-D7r34GCt.cjs +1 -0
  114. package/{Tooltip-txk48Qof.js → Tooltip-CUdmOznK.js} +4 -4
  115. package/{Tooltip-BrupFzaI.cjs → Tooltip-D-ATlbIM.cjs} +1 -1
  116. package/{VisuallyHidden-Awup6QxT.cjs → VisuallyHidden-BMelU6B0.cjs} +1 -1
  117. package/{VisuallyHidden-D2ZXHTJs.js → VisuallyHidden-DuW70K-5.js} +1 -1
  118. package/accordion/index.cjs +1 -1
  119. package/accordion/index.js +1 -1
  120. package/assets/AccordionItem.css +1 -1
  121. package/assets/RangeCalendar.css +1 -1
  122. package/assets/Spinner.css +1 -1
  123. package/assets/TabList.css +1 -1
  124. package/assets/default.css +1 -1
  125. package/breadcrumbs/index.cjs +1 -1
  126. package/breadcrumbs/index.js +1 -1
  127. package/button/index.cjs +1 -1
  128. package/button/index.js +1 -1
  129. package/calendar/index.cjs +1 -1
  130. package/calendar/index.js +1 -1
  131. package/card/index.cjs +1 -1
  132. package/card/index.js +1 -1
  133. package/character-counter/index.cjs +1 -1
  134. package/character-counter/index.js +1 -1
  135. package/checkbox/index.cjs +1 -1
  136. package/checkbox/index.js +2 -2
  137. package/color-scheme-switch/index.cjs +1 -1
  138. package/color-scheme-switch/index.js +1 -1
  139. package/combobox/index.cjs +1 -1
  140. package/combobox/index.js +1 -1
  141. package/date-field/index.cjs +1 -1
  142. package/date-field/index.js +2 -2
  143. package/date-picker/index.cjs +1 -1
  144. package/date-picker/index.js +1 -1
  145. package/dropdown/index.cjs +1 -1
  146. package/dropdown/index.js +1 -1
  147. package/field-error/index.cjs +1 -1
  148. package/field-error/index.js +1 -1
  149. package/file-upload/index.cjs +1 -1
  150. package/file-upload/index.js +1 -1
  151. package/{getScrollParent-Ru2U2LlM.js → getScrollParent-DFCzfqHG.js} +1 -1
  152. package/{getScrollParent-DuKmPmUa.cjs → getScrollParent-DjULaF_q.cjs} +1 -1
  153. package/heading/index.cjs +1 -1
  154. package/heading/index.js +1 -1
  155. package/index.cjs +1 -1
  156. package/index.js +42 -42
  157. package/info-banner/index.cjs +1 -1
  158. package/info-banner/index.js +1 -1
  159. package/label/index.cjs +1 -1
  160. package/label/index.js +1 -1
  161. package/layout/index.cjs +1 -1
  162. package/layout/index.js +1 -1
  163. package/link/index.cjs +1 -1
  164. package/link/index.js +2 -2
  165. package/link-button/index.cjs +1 -1
  166. package/link-button/index.js +2 -2
  167. package/list-box/index.cjs +1 -1
  168. package/list-box/index.js +2 -2
  169. package/menu/index.cjs +1 -1
  170. package/menu/index.js +2 -2
  171. package/modal/index.cjs +1 -1
  172. package/modal/index.js +2 -2
  173. package/package.json +4 -4
  174. package/popover/index.cjs +1 -1
  175. package/popover/index.js +1 -1
  176. package/progress-bar/index.cjs +1 -1
  177. package/progress-bar/index.js +1 -1
  178. package/radio/index.cjs +1 -1
  179. package/radio/index.js +1 -1
  180. package/scrollIntoView-BVI21Y4-.js +65 -0
  181. package/scrollIntoView-BueMOyGp.cjs +1 -0
  182. package/search-field/index.cjs +1 -1
  183. package/search-field/index.js +1 -1
  184. package/select/index.cjs +1 -1
  185. package/select/index.js +1 -1
  186. package/select/types.d.ts +1 -1
  187. package/select/useMultiSelect.d.ts +2 -2
  188. package/spinner/Spinner.d.ts +5 -1
  189. package/spinner/index.cjs +1 -1
  190. package/spinner/index.js +1 -1
  191. package/table/index.cjs +1 -1
  192. package/table/index.js +1 -1
  193. package/tabs/Tabs.d.ts +2 -9
  194. package/tabs/index.cjs +1 -1
  195. package/tabs/index.d.ts +0 -1
  196. package/tabs/index.js +1 -1
  197. package/tag/index.cjs +1 -1
  198. package/tag/index.js +1 -1
  199. package/text/index.cjs +1 -1
  200. package/text/index.js +1 -1
  201. package/textfield/TextArea.d.ts +3 -2
  202. package/textfield/TextField.d.ts +3 -2
  203. package/textfield/index.cjs +1 -1
  204. package/textfield/index.js +1 -1
  205. package/toast/index.cjs +1 -1
  206. package/toast/index.js +1 -1
  207. package/toggle-button/index.cjs +1 -1
  208. package/toggle-button/index.js +1 -1
  209. package/tooltip/index.cjs +1 -1
  210. package/tooltip/index.js +1 -1
  211. package/{useButton-Bh3duhYL.cjs → useButton-C0r5nrqs.cjs} +1 -1
  212. package/{useButton-A-VOfwuT.js → useButton-CRgN6aZf.js} +2 -2
  213. package/useDateFormatter-BrrFo4nY.cjs +1 -0
  214. package/{useDateFormatter-CxlJTAki.js → useDateFormatter-Bs5A6Xtu.js} +353 -322
  215. package/{useField-sSWPm-He.js → useField-BhJ9dM2g.js} +1 -1
  216. package/{useField-CY4OYE5a.cjs → useField-DvszkIMx.cjs} +1 -1
  217. package/{useFilter-DHcouDzv.js → useFilter-BdUU-HQZ.js} +1 -1
  218. package/{useFilter-DlZLqsJD.cjs → useFilter-R2IPvbS8.cjs} +1 -1
  219. package/{useFocusRing-Cig5Y0l-.cjs → useFocusRing-C-XVcAE5.cjs} +1 -1
  220. package/{useFocusRing-Copf_tx8.js → useFocusRing-CcxI7nbg.js} +2 -2
  221. package/{useFocusWithin-BKopz9sr.js → useFocusWithin-DhXBuB2O.js} +1 -1
  222. package/{useFocusWithin-TryC2Kkw.cjs → useFocusWithin-GBjoTL5o.cjs} +1 -1
  223. package/{useFocusable-CCh54GIw.js → useFocusable-BJj-Bkig.js} +3 -3
  224. package/{useFocusable-DhdAtEw8.cjs → useFocusable-M4se1KJt.cjs} +1 -1
  225. package/{useFormValidation-DdIIVZ5j.js → useFormValidation-By7G-T7y.js} +1 -1
  226. package/{useFormValidation-BJNizNDf.cjs → useFormValidation-DV2Ioblb.cjs} +1 -1
  227. package/useHasTabbableChild-CIZGg_iG.cjs +1 -0
  228. package/{useHasTabbableChild-BbgOpdGQ.js → useHasTabbableChild-CnpSoDuJ.js} +1 -1
  229. package/{useHighlightSelectionDescription-D6F-YO6b.cjs → useHighlightSelectionDescription-CBZfyrhy.cjs} +1 -1
  230. package/{useHighlightSelectionDescription-BL_02EKv.js → useHighlightSelectionDescription-DPiqOr_Z.js} +2 -2
  231. package/{useHover-eU40luVI.cjs → useHover-DULSfLuK.cjs} +1 -1
  232. package/{useHover-zCCNtF6g.js → useHover-DkC5FyNd.js} +4 -4
  233. package/{useListState-BdC308Sq.cjs → useListState-DBawAMhF.cjs} +1 -1
  234. package/{useListState-D2yPZrFZ.js → useListState-PZF3ahpk.js} +1 -1
  235. package/{usePress-4yZ5a87p.js → usePress-BqQIhkNY.js} +43 -43
  236. package/usePress-DmU79HEg.cjs +7 -0
  237. package/{useSingleSelectListState-lyai-bC_.js → useSingleSelectListState-BLRBEJC7.js} +1 -1
  238. package/{useSingleSelectListState-b_SPhYG4.cjs → useSingleSelectListState-CNETmoj5.cjs} +1 -1
  239. package/{useTextField-DjxrmW7d.js → useTextField-B8pM0p6X.js} +4 -4
  240. package/{useTextField-DUEQl6sr.cjs → useTextField-CiWV3eeD.cjs} +1 -1
  241. package/utils/types.d.ts +5 -0
  242. package/utils-CtICjCYt.cjs +1 -0
  243. package/{utils-BMBoiyL7.js → utils-D2iKpxcZ.js} +43 -39
  244. package/utils-DRIRjPUS.cjs +1 -0
  245. package/{utils-CrT5PVBA.js → utils-Dxh86KaB.js} +19 -17
  246. package/AccordionItem-BJw5IKe0.js +0 -334
  247. package/AccordionItem-DhMimhYo.cjs +0 -1
  248. package/Button-BTX5G3le.cjs +0 -1
  249. package/Checkbox-D-CFY6QF.cjs +0 -1
  250. package/Collection-DaZzboRu.cjs +0 -1
  251. package/ComboBox-C4NybZ32.cjs +0 -1
  252. package/DateInputDivider-BgXKFwB0.cjs +0 -1
  253. package/DateRangePicker-DTPkr3hX.cjs +0 -6
  254. package/Dialog-DLnopN3Z.js +0 -237
  255. package/Dialog-DNu42oLH.cjs +0 -1
  256. package/Dialog-w6EBWT__.cjs +0 -1
  257. package/FocusScope-Dv0F-mG2.cjs +0 -1
  258. package/Group-C2hEIsGV.js +0 -45
  259. package/Group-cuyk9Hsy.cjs +0 -1
  260. package/Layout-CVnlO10z.cjs +0 -16
  261. package/ListBox-Bx9M5vqb.cjs +0 -1
  262. package/ListBoxSection-kujY2gUl.cjs +0 -1
  263. package/ListKeyboardDelegate-DJDPir-w.cjs +0 -1
  264. package/RSPContexts-D8hmBfGm.cjs +0 -1
  265. package/Radio-D6KNkSA2.js +0 -333
  266. package/Radio-DsVsutMH.cjs +0 -1
  267. package/Select-D9h_RQ2k.cjs +0 -1
  268. package/Select-Dc6y8gPR.js +0 -654
  269. package/SelectionManager-D-4ThfPZ.js +0 -1043
  270. package/SelectionManager-FYrDfe5v.cjs +0 -1
  271. package/Spinner-CTha503N.js +0 -47
  272. package/Spinner-DKQ9_SQB.cjs +0 -6
  273. package/TabList-BhC96APe.cjs +0 -1
  274. package/TabList-P5HnizZt.js +0 -393
  275. package/Table-BB8Ag5_3.cjs +0 -16
  276. package/Tag-D2vh0KRD.js +0 -765
  277. package/Tag-D32MGLjS.cjs +0 -1
  278. package/TextField-4xfAzdBI.cjs +0 -1
  279. package/ToggleButtonGroup-CiX2eXB8.cjs +0 -1
  280. package/scrollIntoView-ClEACHUk.js +0 -57
  281. package/scrollIntoView-DRSoJp89.cjs +0 -1
  282. package/useDateFormatter-D0bVjgIb.cjs +0 -1
  283. package/useHasTabbableChild-wH3RCjTd.cjs +0 -1
  284. package/useObserveElement-BdI4zgd7.js +0 -27
  285. package/useObserveElement-BzEr5D32.cjs +0 -1
  286. package/usePress-Dj3t18Pf.cjs +0 -7
  287. package/utils-I-LGXGYH.cjs +0 -1
  288. package/utils-cBvgilDa.cjs +0 -1
  289. package/variables-B3KEYyhW.cjs +0 -1
  290. package/variables-DzXcMW2k.js +0 -5
@@ -0,0 +1,676 @@
1
+ import { jsx as n, jsxs as g, Fragment as D } from "react/jsx-runtime";
2
+ import * as P from "react";
3
+ import x, { useMemo as E, useState as V, useCallback as O, useEffect as k, useRef as L } from "react";
4
+ import { c as B } from "./clsx-jbLnTBqA.js";
5
+ import { b as j } from "./utils-D2iKpxcZ.js";
6
+ import { a as R, $ as G, T as W } from "./Tag-DJqYiBLR.js";
7
+ import { $ as H } from "./TextField-BWea-IT-.js";
8
+ import { c as U } from "./Collection-BkxwF21i.js";
9
+ import { C as I } from "./Checkbox-CdN1D5pD.js";
10
+ import { L as q, c as X, a as J, b as Q } from "./ListBoxSection-D_kTkvgG.js";
11
+ import { C as Y } from "./check-B5h1DvDs.js";
12
+ import { d as Z } from "./useHover-DkC5FyNd.js";
13
+ import { p as ee, q as te } from "./Dialog-BUAp30Wc.js";
14
+ import { $ as le, a as ae } from "./ListKeyboardDelegate-BHnZMUhW.js";
15
+ import { h as oe } from "./SelectionManager-C469yQeD.js";
16
+ import { a as w, c as ne, e as re } from "./mergeProps-Ct8m5-xW.js";
17
+ import { $ as ie } from "./filterDOMProps-wsa9OcNI.js";
18
+ import { $ as ce } from "./useField-BhJ9dM2g.js";
19
+ import { $ as se, a as de, b as ue } from "./useFormValidation-By7G-T7y.js";
20
+ import { $ as fe } from "./useListState-PZF3ahpk.js";
21
+ import { a as me } from "./VisuallyHidden-DuW70K-5.js";
22
+ import { a as be, L as he } from "./Label-BGMXsSFb.js";
23
+ import { T as pe } from "./Text-BBFWBNAH.js";
24
+ import { X as ge } from "./x-C2xUHAEl.js";
25
+ import { u as N } from "./useLocalizedStringFormatter-aOhh7wdl.js";
26
+ import { $ as ye } from "./useButton-CRgN6aZf.js";
27
+ import { C as $e } from "./chevron-down-DmZMdOiC.js";
28
+ import { $ as ve, F as xe } from "./FieldError-l3xULRa0.js";
29
+ import './assets/Select.css';function A(e) {
30
+ return null;
31
+ }
32
+ A.getCollectionNode = function* (t, o) {
33
+ let { childItems: r, title: l, children: i } = t, a = t.title || t.children, s = t.textValue || (typeof a == "string" ? a : "") || t["aria-label"] || "";
34
+ !s && !(o != null && o.suppressTextValueWarning) && process.env.NODE_ENV !== "production" && console.warn("<Item> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop."), yield {
35
+ type: "item",
36
+ props: t,
37
+ rendered: a,
38
+ textValue: s,
39
+ "aria-label": t["aria-label"],
40
+ hasChildNodes: Se(t),
41
+ *childNodes() {
42
+ if (r) for (let c of r) yield {
43
+ type: "item",
44
+ value: c
45
+ };
46
+ else if (l) {
47
+ let c = [];
48
+ x.Children.forEach(i, (u) => {
49
+ c.push({
50
+ type: "item",
51
+ element: u
52
+ });
53
+ }), yield* c;
54
+ }
55
+ }
56
+ };
57
+ };
58
+ function Se(e) {
59
+ return e.hasChildItems != null ? e.hasChildItems : !!(e.childItems || e.title && x.Children.count(e.children) > 0);
60
+ }
61
+ let _ = A;
62
+ function M(e) {
63
+ return null;
64
+ }
65
+ M.getCollectionNode = function* (t) {
66
+ let { children: o, title: r, items: l } = t;
67
+ yield {
68
+ type: "section",
69
+ props: t,
70
+ hasChildNodes: !0,
71
+ rendered: r,
72
+ "aria-label": t["aria-label"],
73
+ *childNodes() {
74
+ if (typeof o == "function") {
75
+ if (!l) throw new Error("props.children was a function but props.items is missing");
76
+ for (let i of l) yield {
77
+ type: "item",
78
+ value: i,
79
+ renderer: o
80
+ };
81
+ } else {
82
+ let i = [];
83
+ x.Children.forEach(o, (a) => {
84
+ i.push({
85
+ type: "item",
86
+ element: a
87
+ });
88
+ }), yield* i;
89
+ }
90
+ }
91
+ };
92
+ };
93
+ let Ce = M;
94
+ const we = "_wrapper_1rw0v_7", _e = "_trigger_1rw0v_18", Ke = "_medium_1rw0v_32", Pe = "_icon_1rw0v_68", Ve = "_tagGroup_1rw0v_74", ke = "_listBoxItemCheckmark_1rw0v_90", Be = "_triggerContainer_1rw0v_95", Ie = "_selectValueTag_1rw0v_101", Ne = "_clearButton_1rw0v_117", Ae = "_truncate_1rw0v_129", Me = "_checkboxContainer_1rw0v_166", Te = "_selectAll_1rw0v_172", b = {
95
+ wrapper: we,
96
+ trigger: _e,
97
+ medium: Ke,
98
+ icon: Pe,
99
+ tagGroup: Ve,
100
+ listBoxItemCheckmark: ke,
101
+ triggerContainer: Be,
102
+ selectValueTag: Ie,
103
+ clearButton: Ne,
104
+ truncate: Ae,
105
+ checkboxContainer: Me,
106
+ selectAll: Te
107
+ }, T = ({ item: e }) => /* @__PURE__ */ n(
108
+ J,
109
+ {
110
+ ...e.value,
111
+ textValue: e.textValue,
112
+ "aria-label": e.textValue,
113
+ children: ({ isDisabled: t, isSelected: o, selectionMode: r }) => /* @__PURE__ */ g(D, { children: [
114
+ r === "multiple" ? /* @__PURE__ */ n(
115
+ "div",
116
+ {
117
+ className: b.checkboxContainer,
118
+ "aria-hidden": !0,
119
+ children: /* @__PURE__ */ n(
120
+ I,
121
+ {
122
+ isDisabled: t,
123
+ isSelected: o,
124
+ isReadOnly: !0,
125
+ excludeFromTabOrder: !0,
126
+ "aria-label": e.textValue
127
+ }
128
+ )
129
+ }
130
+ ) : null,
131
+ e.rendered,
132
+ o && r === "single" ? /* @__PURE__ */ n(
133
+ Y,
134
+ {
135
+ size: 20,
136
+ className: b.listBoxItemCheckmark
137
+ }
138
+ ) : null
139
+ ] })
140
+ }
141
+ ), ze = ({ section: e, state: t }) => /* @__PURE__ */ n(X, { ...e.value, children: t.collection.getChildren ? /* @__PURE__ */ n(U, { items: t.collection.getChildren(e.key), children: (o) => /* @__PURE__ */ n(T, { item: o }) }) : null }), Fe = ({
142
+ state: e,
143
+ ...t
144
+ }) => /* @__PURE__ */ n(
145
+ q,
146
+ {
147
+ ...t,
148
+ ...e,
149
+ escapeKeyBehavior: "none",
150
+ onSelectionChange: e.setSelectedKeys,
151
+ items: e.collection,
152
+ children: (o) => o.type === "section" ? /* @__PURE__ */ n(
153
+ ze,
154
+ {
155
+ state: e,
156
+ section: o
157
+ }
158
+ ) : /* @__PURE__ */ n(T, { item: o })
159
+ }
160
+ );
161
+ function De(e, t, o) {
162
+ const { disallowEmptySelection: r, isDisabled: l } = e, i = le({ usage: "search", sensitivity: "base" }), a = E(
163
+ () => new ae(
164
+ t.collection,
165
+ t.disabledKeys,
166
+ null,
167
+ i
168
+ ),
169
+ [t.collection, t.disabledKeys, i]
170
+ ), { menuTriggerProps: s, menuProps: c } = ee(
171
+ {
172
+ isDisabled: l,
173
+ type: "listbox"
174
+ },
175
+ t,
176
+ o
177
+ ), u = (f) => {
178
+ const { selectedKeys: v, selectionMode: F } = t, C = v.values().next().value;
179
+ if (F === "single")
180
+ switch (f.key) {
181
+ case "ArrowLeft": {
182
+ f.preventDefault();
183
+ const $ = v.size > 0 ? a.getKeyAbove(C) : a.getFirstKey();
184
+ $ && t.setSelectedKeys([$]);
185
+ break;
186
+ }
187
+ case "ArrowRight": {
188
+ f.preventDefault();
189
+ const $ = v.size > 0 ? a.getKeyBelow(C) : a.getFirstKey();
190
+ $ && t.setSelectedKeys([$]);
191
+ break;
192
+ }
193
+ }
194
+ }, { typeSelectProps: d } = oe({
195
+ keyboardDelegate: a,
196
+ selectionManager: t.selectionManager,
197
+ onTypeSelect(f) {
198
+ t.setSelectedKeys([f]);
199
+ }
200
+ }), { labelProps: y, fieldProps: h } = ce({
201
+ ...e,
202
+ labelElementType: "span"
203
+ });
204
+ d.onKeyDown = d.onKeyDownCapture, delete d.onKeyDownCapture;
205
+ const m = ie(e, { labelable: !0 }), p = w(d, s, h), S = ne();
206
+ return {
207
+ labelProps: {
208
+ ...y,
209
+ onClick: () => {
210
+ var f;
211
+ e.isDisabled || ((f = o.current) == null || f.focus(), Z("keyboard"));
212
+ }
213
+ },
214
+ triggerProps: w(m, {
215
+ ...p,
216
+ onKeyDown: re(
217
+ p.onKeyDown,
218
+ u,
219
+ e.onKeyDown
220
+ ),
221
+ onKeyUp: e.onKeyUp,
222
+ "aria-labelledby": [
223
+ p["aria-labelledby"],
224
+ p["aria-label"] && !p["aria-labelledby"] ? p.id : null,
225
+ S
226
+ ].filter(Boolean).join(" "),
227
+ onFocus(f) {
228
+ t.isFocused || (e.onFocus && e.onFocus(f), t.setFocused(!0));
229
+ },
230
+ onBlur(f) {
231
+ t.isOpen || (e.onBlur && e.onBlur(f), t.setFocused(!1));
232
+ }
233
+ }),
234
+ valueProps: {
235
+ id: S
236
+ },
237
+ menuProps: {
238
+ ...c,
239
+ disallowEmptySelection: r,
240
+ autoFocus: t.focusStrategy || !0,
241
+ shouldSelectOnPressUp: !0,
242
+ shouldFocusOnHover: !0,
243
+ onBlur: (f) => {
244
+ f.currentTarget.contains(f.relatedTarget) || (e.onBlur && e.onBlur(f), t.setFocused(!1));
245
+ },
246
+ "aria-labelledby": [
247
+ h["aria-labelledby"],
248
+ p["aria-label"] && !h["aria-labelledby"] ? p.id : null
249
+ ].filter(Boolean).join(" ")
250
+ }
251
+ };
252
+ }
253
+ function Ee(e) {
254
+ const {
255
+ collection: t,
256
+ disabledKeys: o,
257
+ selectionManager: r,
258
+ selectionManager: { setSelectedKeys: l, selectedKeys: i, selectionMode: a }
259
+ } = fe(e), s = [], c = i.size !== 0 ? Array.from(i).map((u) => {
260
+ const d = t.getItem(u);
261
+ return d || s.push(u), d;
262
+ }).filter(Boolean) : null;
263
+ return s.length && console.warn(
264
+ `Select: Keys "${s.join(
265
+ ", "
266
+ )}" passed to "selectedKeys" are not present in the collection.`
267
+ ), {
268
+ collection: t,
269
+ disabledKeys: o,
270
+ selectionManager: r,
271
+ selectionMode: a,
272
+ selectedKeys: i,
273
+ setSelectedKeys: l.bind(r),
274
+ selectedItems: c
275
+ };
276
+ }
277
+ function Oe(e) {
278
+ const [t, o] = V(!1), r = te(e), l = e.selectionMode === "single", i = Ee({
279
+ ...e,
280
+ onSelectionChange: (d) => {
281
+ e.onSelectionChange && e.onSelectionChange(d), l && r.close();
282
+ }
283
+ }), a = se({
284
+ ...e,
285
+ validationBehavior: "native",
286
+ value: i.selectedKeys
287
+ }), s = i.collection.size === 0, c = !!i.selectedKeys.size, u = O(() => {
288
+ a.resetValidation(), a.commitValidation();
289
+ }, [a]);
290
+ return k(() => {
291
+ l && c && u();
292
+ }, [c, l, u]), {
293
+ ...i,
294
+ ...r,
295
+ close() {
296
+ r.close(), c && u();
297
+ },
298
+ open() {
299
+ s || r.open();
300
+ },
301
+ toggle(d) {
302
+ s || r.toggle(d);
303
+ },
304
+ isFocused: t,
305
+ setFocused: o,
306
+ ...a
307
+ };
308
+ }
309
+ function Le(e, t = {}) {
310
+ const [o, r] = V({ width: 0, height: 0 }), l = t.delay === void 0 ? 500 : t.delay, i = !!t.includePadding;
311
+ return k(() => {
312
+ if (!e) return;
313
+ const a = new ResizeObserver(
314
+ je(([s]) => {
315
+ const { inlineSize: c, blockSize: u } = i ? s.borderBoxSize[0] : s.contentBoxSize[0];
316
+ r({ width: c, height: u });
317
+ }, l)
318
+ );
319
+ return a.observe(e), () => {
320
+ a.disconnect();
321
+ };
322
+ }, [l, e, i]), o;
323
+ }
324
+ function je(e, t) {
325
+ let o;
326
+ return (r, l) => {
327
+ clearTimeout(o), o = setTimeout(() => {
328
+ e(r, l);
329
+ }, t);
330
+ };
331
+ }
332
+ function Re({
333
+ autoComplete: e,
334
+ name: t,
335
+ isDisabled: o,
336
+ isRequired: r,
337
+ selectRef: l
338
+ }, i, a) {
339
+ const { visuallyHiddenProps: s } = me();
340
+ return de(l, i.selectedKeys, i.setSelectedKeys), ue(
341
+ {
342
+ validationBehavior: "native",
343
+ focus: () => {
344
+ var c;
345
+ return (c = a.current) == null ? void 0 : c.focus();
346
+ }
347
+ },
348
+ i,
349
+ l
350
+ ), {
351
+ containerProps: {
352
+ ...s,
353
+ "aria-hidden": !0,
354
+ // @ts-expect-error - data-a11y-ignore is not a standard attribute
355
+ "data-react-aria-prevent-focus": !0,
356
+ "data-a11y-ignore": "aria-hidden-focus"
357
+ },
358
+ inputProps: {
359
+ style: { display: "none" }
360
+ },
361
+ selectProps: {
362
+ tabIndex: -1,
363
+ autoComplete: e,
364
+ disabled: o,
365
+ required: r,
366
+ name: t,
367
+ value: Array.from(i.selectedKeys).map((c) => c.toString()),
368
+ onChange: (c) => i.setSelectedKeys(c.target.value),
369
+ multiple: !0
370
+ }
371
+ };
372
+ }
373
+ function Ge(e) {
374
+ const { state: t, triggerRef: o, name: r, isDisabled: l } = e, i = `${e.label}-hidden`, a = L(null), { containerProps: s, selectProps: c } = Re(
375
+ { ...e, selectRef: a },
376
+ t,
377
+ o
378
+ );
379
+ return t.collection.size <= 300 ? /* @__PURE__ */ n(
380
+ "div",
381
+ {
382
+ ...s,
383
+ "data-testid": "hidden-select-container",
384
+ children: /* @__PURE__ */ g("label", { children: [
385
+ i,
386
+ /* @__PURE__ */ g(
387
+ "select",
388
+ {
389
+ ...c,
390
+ ref: a,
391
+ children: [
392
+ /* @__PURE__ */ n("option", {}),
393
+ [...t.collection.getKeys()].map((u) => {
394
+ const d = t.collection.getItem(u);
395
+ return d && d.type === "item" ? /* @__PURE__ */ n(
396
+ "option",
397
+ {
398
+ value: d.key,
399
+ children: d.textValue
400
+ },
401
+ d.key
402
+ ) : null;
403
+ })
404
+ ]
405
+ }
406
+ )
407
+ ] })
408
+ }
409
+ ) : r ? /* @__PURE__ */ n(
410
+ "input",
411
+ {
412
+ type: "hidden",
413
+ autoComplete: c.autoComplete,
414
+ name: r,
415
+ disabled: l,
416
+ value: Array.from(t.selectedKeys).map((u) => u.toString()) ?? [""]
417
+ }
418
+ ) : null;
419
+ }
420
+ const We = { clearAll: "Clear all", selectAll: "Select all", selectedItems: "Selected items", chosen: "chosen" }, He = { clearAll: "Rensa alla", selectAll: "Välj alla", selectedItems: "Valda objekt", chosen: "valda" }, z = {
421
+ en: We,
422
+ sv: He
423
+ }, Ue = ({
424
+ state: { selectedItems: e },
425
+ isDisabled: t,
426
+ parentWidth: o,
427
+ onClear: r,
428
+ triggerRef: l,
429
+ isClearable: i
430
+ }) => {
431
+ const a = N(z);
432
+ return /* @__PURE__ */ g(
433
+ "div",
434
+ {
435
+ className: b.selectValueTag,
436
+ "data-disabled": t || void 0,
437
+ children: [
438
+ /* @__PURE__ */ n(
439
+ "span",
440
+ {
441
+ className: b.truncate,
442
+ style: { maxWidth: o - 92 },
443
+ children: e != null && e.length && e.length > 1 ? `${e.length} ${a.format("chosen")}` : e == null ? void 0 : e[0].textValue
444
+ }
445
+ ),
446
+ i && /* @__PURE__ */ n(
447
+ "button",
448
+ {
449
+ disabled: t,
450
+ "aria-label": a.format("clearAll"),
451
+ className: b.clearButton,
452
+ onClick: () => {
453
+ var s;
454
+ r(), (s = l == null ? void 0 : l.current) == null || s.focus();
455
+ },
456
+ children: /* @__PURE__ */ n(
457
+ ge,
458
+ {
459
+ width: 20,
460
+ height: 20
461
+ }
462
+ )
463
+ }
464
+ )
465
+ ]
466
+ }
467
+ );
468
+ }, qe = ({
469
+ autoFocus: e,
470
+ excludeFromTabOrder: t,
471
+ isDisabled: o,
472
+ size: r = "large",
473
+ isOpen: l,
474
+ isInvalid: i,
475
+ selectionMode: a,
476
+ state: { selectedItems: s },
477
+ placeholder: c,
478
+ children: u,
479
+ triggerRef: d,
480
+ ...y
481
+ }) => {
482
+ const { buttonProps: h } = ye(
483
+ { autoFocus: e, excludeFromTabOrder: t, isDisabled: o, ...y },
484
+ d
485
+ ), m = a === "multiple";
486
+ return /* @__PURE__ */ g(
487
+ "div",
488
+ {
489
+ className: b.triggerContainer,
490
+ "data-disabled": o || void 0,
491
+ children: [
492
+ /* @__PURE__ */ g(
493
+ "button",
494
+ {
495
+ ...h,
496
+ autoFocus: e,
497
+ className: B(b.trigger, {
498
+ [b.medium]: r === "medium"
499
+ }),
500
+ "data-disabled": o || void 0,
501
+ "data-invalid": i || void 0,
502
+ "data-open": l || void 0,
503
+ ref: d,
504
+ type: "button",
505
+ children: [
506
+ m && !s ? /* @__PURE__ */ n("span", { children: c }) : null,
507
+ m ? null : /* @__PURE__ */ n("span", { children: s ? s[0].textValue : c }),
508
+ /* @__PURE__ */ n(
509
+ "div",
510
+ {
511
+ className: b.icon,
512
+ "aria-hidden": "true",
513
+ children: /* @__PURE__ */ n($e, { size: 20 })
514
+ }
515
+ )
516
+ ]
517
+ }
518
+ ),
519
+ u
520
+ ]
521
+ }
522
+ );
523
+ }, K = ({
524
+ state: e,
525
+ errorMessage: t
526
+ }) => /* @__PURE__ */ n(ve.Provider, { value: { ...e.displayValidation }, children: /* @__PURE__ */ n(xe, { children: t }) }), Xe = P.forwardRef(
527
+ ({ isClearable: e = !0, popover: t, ...o }, r) => {
528
+ const l = {
529
+ selectionMode: "single",
530
+ errorPosition: "top",
531
+ disallowEmptySelection: !e,
532
+ isClearable: e,
533
+ size: "large",
534
+ popover: t,
535
+ ...o
536
+ }, i = j(r), a = Oe(l), s = N(z), { labelProps: c, triggerProps: u, valueProps: d, menuProps: y } = De(
537
+ l,
538
+ a,
539
+ i
540
+ ), { width: h } = Le(i.current, {
541
+ includePadding: !0
542
+ });
543
+ return /* @__PURE__ */ g(
544
+ H,
545
+ {
546
+ ...l,
547
+ className: B(b.wrapper, l.className),
548
+ children: [
549
+ /* @__PURE__ */ n(
550
+ Ge,
551
+ {
552
+ ...l,
553
+ state: a,
554
+ triggerRef: i
555
+ }
556
+ ),
557
+ /* @__PURE__ */ n(be, { popover: t, children: l.label && /* @__PURE__ */ n(
558
+ he,
559
+ {
560
+ ...c,
561
+ "data-disabled": l.isDisabled || void 0,
562
+ children: l.label
563
+ }
564
+ ) }),
565
+ l.description && /* @__PURE__ */ n(pe, { slot: "description", children: l.description }),
566
+ l.errorPosition === "top" && /* @__PURE__ */ n(
567
+ K,
568
+ {
569
+ ...l,
570
+ state: a
571
+ }
572
+ ),
573
+ /* @__PURE__ */ n(
574
+ qe,
575
+ {
576
+ ...l,
577
+ ...u,
578
+ isInvalid: a.displayValidation.isInvalid,
579
+ triggerRef: i,
580
+ state: a,
581
+ children: l.selectionMode === "multiple" && a.selectedItems ? /* @__PURE__ */ n("span", { ...d, children: /* @__PURE__ */ n(
582
+ Ue,
583
+ {
584
+ ...l,
585
+ state: a,
586
+ parentWidth: h,
587
+ onClear: () => a.selectionManager.clearSelection(),
588
+ triggerRef: i
589
+ }
590
+ ) }) : null
591
+ }
592
+ ),
593
+ l.errorPosition === "bottom" && /* @__PURE__ */ n(
594
+ K,
595
+ {
596
+ ...l,
597
+ state: a
598
+ }
599
+ ),
600
+ /* @__PURE__ */ g(
601
+ Q,
602
+ {
603
+ isOpen: a.isOpen,
604
+ onOpenChange: (m) => {
605
+ m || a.close();
606
+ },
607
+ triggerRef: i,
608
+ style: { width: h },
609
+ children: [
610
+ l.isSelectableAll && /* @__PURE__ */ n(
611
+ I,
612
+ {
613
+ isSelected: a.selectionManager.isSelectAll,
614
+ isIndeterminate: !a.selectionManager.isSelectAll && !a.selectionManager.isEmpty,
615
+ className: b.selectAll,
616
+ onChange: () => a.selectionManager.toggleSelectAll(),
617
+ children: s.format("selectAll")
618
+ }
619
+ ),
620
+ /* @__PURE__ */ n(
621
+ Fe,
622
+ {
623
+ ...y,
624
+ state: a
625
+ }
626
+ )
627
+ ]
628
+ }
629
+ ),
630
+ l.showTags && !!a.selectedItems && /* @__PURE__ */ n(
631
+ R,
632
+ {
633
+ "aria-label": s.format("selectedItems"),
634
+ selectionBehavior: "toggle",
635
+ onRemove: (m) => a.selectionManager.toggleSelection(Array.from(m)[0]),
636
+ className: b.tagGroup,
637
+ children: /* @__PURE__ */ n(G, { items: a.selectedItems, children: (m) => /* @__PURE__ */ n(
638
+ W,
639
+ {
640
+ textValue: m.textValue,
641
+ id: m.key,
642
+ dismissable: !0,
643
+ isDisabled: l.isDisabled,
644
+ children: m.textValue
645
+ },
646
+ m.key
647
+ ) })
648
+ }
649
+ )
650
+ ]
651
+ }
652
+ );
653
+ }
654
+ ), Je = P.forwardRef(
655
+ ({ options: e, ...t }, o) => /* @__PURE__ */ n(
656
+ Xe,
657
+ {
658
+ ...t,
659
+ items: e,
660
+ ref: o,
661
+ children: (r) => r.children ? /* @__PURE__ */ n(
662
+ Ce,
663
+ {
664
+ items: r.children,
665
+ title: r.name,
666
+ children: (l) => /* @__PURE__ */ n(_, { textValue: l.textValue, children: l.name })
667
+ },
668
+ r.name
669
+ ) : /* @__PURE__ */ n(_, { textValue: r.textValue, children: r.name })
670
+ }
671
+ )
672
+ );
673
+ Je.displayName = "Select";
674
+ export {
675
+ Je as S
676
+ };