@midas-ds/components 12.0.0 → 12.1.1

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 (457) hide show
  1. package/AccordionItem-CV9Hrare.cjs +1 -0
  2. package/AccordionItem-Dd9VLdsb.js +335 -0
  3. package/{BadgeContainer-DGJGJMPi.js → BadgeContainer-iNNgJKD9.js} +8 -8
  4. package/BadgeContainer-su0iCJKy.cjs +1 -0
  5. package/Breadcrumbs-BQLxFZVm.cjs +1 -0
  6. package/Breadcrumbs-C6B4fyk3.js +271 -0
  7. package/Button-CMIbSc4-.cjs +1 -0
  8. package/{Button-akT6Hvug.js → Button-CUMHt7MG.js} +2 -2
  9. package/{Button-DtC_ZOyd.js → Button-DD5_S-tD.js} +155 -161
  10. package/{Button-DQm2iqKU.cjs → Button-D_tRdPW9.cjs} +1 -1
  11. package/Button.module-BT9wZenr.cjs +1 -0
  12. package/Button.module-CGIVvzVm.js +14 -0
  13. package/{ButtonGroup-DvVvear6.js → ButtonGroup-DC8925jD.js} +1 -1
  14. package/ButtonGroup-zx-9mxbJ.cjs +1 -0
  15. package/CHANGELOG.md +82 -0
  16. package/{Card-CwwVnA_a.js → Card-D2UbrhDW.js} +42 -42
  17. package/Card-UolcSL5O.cjs +1 -0
  18. package/{CharacterCounter-DQJVM-mZ.cjs → CharacterCounter-CnRv-iUP.cjs} +1 -1
  19. package/CharacterCounter-DT7A0wWP.js +22 -0
  20. package/Checkbox-DTuryJdM.js +278 -0
  21. package/Checkbox-dtZfsSfx.cjs +1 -0
  22. package/CheckboxGroup-BmCK0XG9.js +157 -0
  23. package/CheckboxGroup-DbmYdQEv.cjs +1 -0
  24. package/Collection-B0_WAieZ.js +625 -0
  25. package/Collection-BvWp2xBd.cjs +1 -0
  26. package/{ColorSchemeSwitch-DyZ9FAKG.js → ColorSchemeSwitch-CgZfgCG4.js} +20 -28
  27. package/{ColorSchemeSwitch-DtyJ9-5B.cjs → ColorSchemeSwitch-D5juAHPc.cjs} +3 -3
  28. package/{ComboBox-Dn3tQzri.js → ComboBox-Cl6jBB-8.js} +518 -503
  29. package/ComboBox-CvD0t2T2.cjs +1 -0
  30. package/DateField-D2IqGDL5.js +47 -0
  31. package/DateField-DJAQH95Q.cjs +1 -0
  32. package/DateInputDivider-BnSo_Aox.cjs +1 -0
  33. package/{DateInputDivider-CJEGWmG0.js → DateInputDivider-LxS0Kw1H.js} +936 -839
  34. package/DateRangePicker-CNPXbRqx.js +889 -0
  35. package/DateRangePicker-CljQy8oD.cjs +6 -0
  36. package/Dialog-B8swxl24.js +1643 -0
  37. package/Dialog-COpVrq8B.js +240 -0
  38. package/Dialog-DR6nEqMT.cjs +1 -0
  39. package/Dialog-doGnVsJJ.cjs +1 -0
  40. package/DragAndDrop-Dw8JZmrn.cjs +1 -0
  41. package/DragAndDrop-PrUJv--B.js +75 -0
  42. package/{Dropdown-CJ-sujKv.cjs → Dropdown-C_W6Sizy.cjs} +2 -2
  43. package/{Dropdown-BWbdSQ9U.js → Dropdown-DbeUiGYo.js} +8 -8
  44. package/FieldError-Cornph2A.cjs +1 -0
  45. package/FieldError-DdvFyIf4.js +48 -0
  46. package/{FileUpload-B89QfnCB.js → FileUpload-D2gnQKdn.js} +76 -74
  47. package/{FileUpload-KQ1XAKAc.cjs → FileUpload-D3RaARDV.cjs} +2 -2
  48. package/{FocusScope-CEgd3xCY.js → FocusScope-Bj40Ir-g.js} +192 -195
  49. package/FocusScope-Uy3DiY0-.cjs +1 -0
  50. package/{Grid-B2av0vt8.js → Grid-BmX6arAO.js} +1 -1
  51. package/{Grid-Db5wZrw6.cjs → Grid-Bn1bCTH8.cjs} +1 -1
  52. package/GridItem-BtO9kCX9.js +237 -0
  53. package/GridItem-luVsL9lu.cjs +1 -0
  54. package/{Group-Cdy6z9ra.cjs → Group-BKYGeOBr.cjs} +1 -1
  55. package/{Group-B3mRMVy7.js → Group-C73mD_-i.js} +13 -13
  56. package/Heading-BQlmb5Tm.js +46 -0
  57. package/Heading-D3FR_KXb.cjs +1 -0
  58. package/{Hidden-B5ir3Lei.js → Hidden-C9KWUR7b.js} +2 -2
  59. package/InfoBanner-CgmPdsH8.js +83 -0
  60. package/InfoBanner-Y-f3hKVR.cjs +1 -0
  61. package/{Input-BnpBRnJz.js → Input-BLVRv0FK.js} +9 -9
  62. package/{Input-DIhhWEPW.cjs → Input-CzMx2mfl.cjs} +1 -1
  63. package/{Label-ByWt6Lfh.js → Label-C5TNJ0Ku.js} +24 -28
  64. package/Label-Dp85Vue3.cjs +1 -0
  65. package/Layout-Bxd0-ao3.cjs +16 -0
  66. package/Layout-CcXu63hP.js +482 -0
  67. package/Link-CbFSuEI1.js +73 -0
  68. package/Link-ePZ3nrAW.cjs +6 -0
  69. package/Link-lO-Ke97K.js +60 -0
  70. package/Link-wM7cVPlS.cjs +1 -0
  71. package/LinkButton-CJyZh3BS.js +69 -0
  72. package/LinkButton-Cw73pOM2.cjs +6 -0
  73. package/ListBox-ICZKGluC.cjs +1 -0
  74. package/ListBox-LncMQt6I.js +523 -0
  75. package/ListBoxLoadMoreItem-3jGpi90m.cjs +1 -0
  76. package/ListBoxLoadMoreItem-CIFJ3liN.js +41 -0
  77. package/ListBoxSection-BBY8-t3_.js +1085 -0
  78. package/ListBoxSection-BeDwnVZx.cjs +1 -0
  79. package/{ListKeyboardDelegate-mcrZobNa.js → ListKeyboardDelegate-CVxkAn5D.js} +13 -9
  80. package/ListKeyboardDelegate-C_X1wLkh.cjs +1 -0
  81. package/{Logo-BW5NXAdu.cjs → Logo-CFjZc5u2.cjs} +1 -1
  82. package/{Logo-qkVS1MCN.js → Logo-DkagDdKQ.js} +15 -19
  83. package/OverlayArrow-ByH6lM-H.cjs +1 -0
  84. package/OverlayArrow-CvNuu3e3.js +519 -0
  85. package/{Popover-C5chAY42.cjs → Popover-Bi5yJEoE.cjs} +1 -1
  86. package/{Popover-viLqHHX2.js → Popover-CyEVqpJ6.js} +11 -11
  87. package/{PressResponder-B_Zqu7b1.js → PressResponder-CxVtArtP.js} +9 -9
  88. package/PressResponder-DbnYqwGB.cjs +1 -0
  89. package/ProgressBar-BYb9d2kC.js +53 -0
  90. package/ProgressBar-CgbE08QT.cjs +1 -0
  91. package/Radio-BagVPvJX.cjs +1 -0
  92. package/Radio-C98ly9yx.js +333 -0
  93. package/{RangeCalendar-DGGMbb0j.js → RangeCalendar-Bi9jc61A.js} +637 -629
  94. package/RangeCalendar-KcJooXYf.cjs +6 -0
  95. package/{SSRProvider-D8lZ0o6A.js → SSRProvider-40TXmsUG.js} +5 -5
  96. package/{SSRProvider-DZRLwxPS.cjs → SSRProvider-Bc-sMhsT.cjs} +1 -1
  97. package/{SearchField-Ma3KB8Em.cjs → SearchField-BA-X9dzb.cjs} +2 -2
  98. package/{SearchField-B0dlPqsW.js → SearchField-BevjTbcW.js} +52 -56
  99. package/Select-BECa8IyZ.js +654 -0
  100. package/Select-xBp51JSl.cjs +1 -0
  101. package/{SelectionManager-BdKKuso-.js → SelectionManager-Bq-Gw1UT.js} +291 -282
  102. package/SelectionManager-BtbHoHpA.cjs +1 -0
  103. package/Separator-CM0KPvsX.js +105 -0
  104. package/Separator-Cfv2pbWf.cjs +1 -0
  105. package/Separator-DH-5wu9X.js +77 -0
  106. package/Separator-Dgin8BNW.cjs +1 -0
  107. package/Skeleton-Iovq135_.js +35 -0
  108. package/Skeleton-MaBUPqhT.cjs +1 -0
  109. package/Spinner-BZ7i01Kt.js +47 -0
  110. package/{Spinner-yHx_DX_4.cjs → Spinner-DxWDMW6e.cjs} +2 -2
  111. package/TabList-BMyKYLlY.cjs +1 -0
  112. package/TabList-C0mZgIzV.js +397 -0
  113. package/Table-BHY1uCZ0.cjs +16 -0
  114. package/{Table-CTS0J_sQ.js → Table-DzbfeVO7.js} +856 -798
  115. package/Tag-BYUPXbhG.js +765 -0
  116. package/Tag-BweDKw1v.cjs +1 -0
  117. package/Text-BAFsaON-.cjs +1 -0
  118. package/{Text--KL3Auo7.js → Text-Be7WIOwv.js} +3 -3
  119. package/{Text-wuw0HQoa.cjs → Text-BtPiT2P1.cjs} +1 -1
  120. package/Text-CmlsaWMA.js +32 -0
  121. package/TextArea-CDoLq124.js +125 -0
  122. package/TextArea-DJCtwrqV.cjs +1 -0
  123. package/TextField-Bm5916AD.cjs +1 -0
  124. package/TextField-_UY8CXtW.js +134 -0
  125. package/TextField.module-CH39P8ZE.js +13 -0
  126. package/TextField.module-gJ-ruFra.cjs +1 -0
  127. package/{Toast-BEh5yYzO.cjs → Toast-BN3vRCsH.cjs} +1 -1
  128. package/{Toast-BnzpC_5v.js → Toast-DZnQTLDr.js} +129 -143
  129. package/ToggleButtonGroup-CwHPu7w5.js +214 -0
  130. package/ToggleButtonGroup-DY9S3USc.cjs +1 -0
  131. package/Tooltip-BHAtsp9k.js +281 -0
  132. package/Tooltip-CZa9n5sT.cjs +1 -0
  133. package/{VisuallyHidden-BKslUoMJ.js → VisuallyHidden-CGEtjAP7.js} +8 -8
  134. package/{VisuallyHidden-DxDOcIsh.cjs → VisuallyHidden-EjrqodVh.cjs} +1 -1
  135. package/accordion/index.cjs +1 -1
  136. package/accordion/index.js +1 -1
  137. package/assets/AccordionItem.css +1 -1
  138. package/assets/BadgeContainer.css +1 -1
  139. package/assets/Breadcrumbs.css +1 -1
  140. package/assets/Button.css +1 -1
  141. package/assets/ButtonGroup.css +1 -1
  142. package/assets/Card.css +1 -1
  143. package/assets/CharacterCounter.css +1 -1
  144. package/assets/Checkbox.css +1 -1
  145. package/assets/ComboBox.css +1 -1
  146. package/assets/DateField.css +1 -1
  147. package/assets/DateInputDivider.css +1 -1
  148. package/assets/DateRangePicker.css +1 -1
  149. package/assets/Dialog.css +1 -1
  150. package/assets/Dropdown.css +1 -1
  151. package/assets/FieldError.css +1 -1
  152. package/assets/FileUpload.css +1 -1
  153. package/assets/GridItem.css +1 -1
  154. package/assets/Heading.css +1 -1
  155. package/assets/InfoBanner.css +1 -1
  156. package/assets/Label.css +1 -1
  157. package/assets/Layout.css +1 -1
  158. package/assets/Link.css +1 -1
  159. package/assets/LinkButton.css +1 -1
  160. package/assets/ListBoxSection.css +1 -1
  161. package/assets/Logo.css +1 -1
  162. package/assets/Popover.css +1 -1
  163. package/assets/ProgressBar.css +1 -1
  164. package/assets/Radio.css +1 -1
  165. package/assets/RangeCalendar.css +1 -1
  166. package/assets/SearchField.css +1 -1
  167. package/assets/Select.css +1 -1
  168. package/assets/Separator.css +1 -0
  169. package/assets/Skeleton.css +1 -1
  170. package/assets/Spinner.css +1 -1
  171. package/assets/TabList.css +1 -1
  172. package/assets/Table.css +1 -1
  173. package/assets/Tag.css +1 -1
  174. package/assets/Text.css +1 -1
  175. package/assets/TextField.css +1 -1
  176. package/assets/Toast.css +1 -1
  177. package/assets/ToggleButtonGroup.css +1 -1
  178. package/assets/Tooltip.css +1 -1
  179. package/assets/theme.css +1 -1
  180. package/assets/variables.css +1 -0
  181. package/badge/index.cjs +1 -1
  182. package/badge/index.js +1 -1
  183. package/breadcrumbs/index.cjs +1 -1
  184. package/breadcrumbs/index.js +1 -1
  185. package/button/index.cjs +1 -1
  186. package/button/index.js +2 -2
  187. package/calendar/index.cjs +1 -1
  188. package/calendar/index.js +1 -1
  189. package/card/index.cjs +1 -1
  190. package/card/index.js +1 -1
  191. package/character-counter/index.cjs +1 -1
  192. package/character-counter/index.js +1 -1
  193. package/checkbox/index.cjs +1 -1
  194. package/checkbox/index.js +2 -2
  195. package/chevron-right-0-sUFBiR.cjs +6 -0
  196. package/chevron-right-BYYHEJjK.js +11 -0
  197. package/color-scheme-switch/index.cjs +1 -1
  198. package/color-scheme-switch/index.js +1 -1
  199. package/combobox/index.cjs +1 -1
  200. package/combobox/index.d.ts +1 -1
  201. package/combobox/index.js +1 -1
  202. package/combobox/intl/translations.json.d.ts +4 -2
  203. package/{context-Dl_saGB6.js → context-CGNJ3grH.js} +11 -11
  204. package/{context-UOrD6Zxk.cjs → context-Df3XbgBG.cjs} +1 -1
  205. package/date-field/index.cjs +1 -1
  206. package/date-field/index.js +2 -2
  207. package/date-picker/index.cjs +1 -1
  208. package/date-picker/index.js +1 -1
  209. package/dropdown/Dropdown.d.ts +18 -0
  210. package/dropdown/index.cjs +1 -1
  211. package/dropdown/index.js +1 -1
  212. package/field-error/index.cjs +1 -1
  213. package/field-error/index.js +1 -1
  214. package/file-upload/index.cjs +1 -1
  215. package/file-upload/index.js +1 -1
  216. package/filterDOMProps-RRlKPKX0.cjs +1 -0
  217. package/filterDOMProps-wsa9OcNI.js +65 -0
  218. package/grid/index.cjs +1 -1
  219. package/grid/index.js +2 -2
  220. package/heading/index.cjs +1 -1
  221. package/heading/index.js +1 -1
  222. package/{index-BSMrH_Du.js → index-BLPblar-.js} +33 -30
  223. package/{index-D97L3EBk.cjs → index-DSFSh2sC.cjs} +3 -3
  224. package/index.cjs +1 -1
  225. package/index.d.ts +2 -0
  226. package/index.js +140 -125
  227. package/inertValue-B3AFhVG4.cjs +1 -0
  228. package/info-banner/index.cjs +1 -1
  229. package/info-banner/index.js +1 -1
  230. package/label/index.cjs +1 -1
  231. package/label/index.js +1 -1
  232. package/layout/index.cjs +1 -1
  233. package/layout/index.js +1 -1
  234. package/link/index.cjs +1 -1
  235. package/link/index.js +2 -2
  236. package/link-button/index.cjs +1 -1
  237. package/link-button/index.js +2 -2
  238. package/list-box/ListBoxLoadMoreItem.d.ts +4 -0
  239. package/list-box/index.cjs +1 -1
  240. package/list-box/index.d.ts +1 -0
  241. package/list-box/index.js +6 -5
  242. package/list-box/intl/translations.json.d.ts +11 -0
  243. package/logo/index.cjs +1 -1
  244. package/logo/index.js +1 -1
  245. package/menu/Menu.d.ts +13 -0
  246. package/menu/MenuItem.d.ts +5 -0
  247. package/menu/MenuPopover.d.ts +3 -0
  248. package/menu/MenuSection.d.ts +3 -0
  249. package/menu/Separator.d.ts +3 -0
  250. package/menu/index.cjs +1 -0
  251. package/menu/index.d.ts +5 -0
  252. package/menu/index.js +8 -0
  253. package/mergeProps-BSsN7Bgk.js +117 -0
  254. package/mergeProps-JhcJ7uJL.cjs +1 -0
  255. package/modal/index.cjs +1 -1
  256. package/modal/index.js +2 -2
  257. package/package.json +6 -4
  258. package/popover/index.cjs +1 -1
  259. package/popover/index.js +1 -1
  260. package/progress-bar/index.cjs +1 -1
  261. package/progress-bar/index.js +1 -1
  262. package/radio/index.cjs +1 -1
  263. package/radio/index.js +1 -1
  264. package/search-field/index.cjs +1 -1
  265. package/search-field/index.js +1 -1
  266. package/select/Select.d.ts +1 -1
  267. package/select/index.cjs +1 -1
  268. package/select/index.js +1 -1
  269. package/skeleton/index.cjs +1 -1
  270. package/skeleton/index.js +1 -1
  271. package/spinner/index.cjs +1 -1
  272. package/spinner/index.js +1 -1
  273. package/table/index.cjs +1 -1
  274. package/table/index.js +1 -1
  275. package/tabs/index.cjs +1 -1
  276. package/tabs/index.js +1 -1
  277. package/tag/index.cjs +1 -1
  278. package/tag/index.js +1 -1
  279. package/text/index.cjs +1 -1
  280. package/text/index.js +1 -1
  281. package/textfield/Input.d.ts +7 -2
  282. package/textfield/PasswordField.d.ts +1 -1
  283. package/textfield/index.cjs +1 -1
  284. package/textfield/index.js +1 -1
  285. package/theme/generated-object.d.ts +381 -0
  286. package/theme/generated-tokens.d.ts +331 -0
  287. package/theme/index.cjs +1 -1
  288. package/theme/index.d.ts +4 -1
  289. package/theme/index.js +3989 -14
  290. package/theme/tokens.d.ts +30 -1
  291. package/toast/index.cjs +1 -1
  292. package/toast/index.js +1 -1
  293. package/toggle-button/index.cjs +1 -1
  294. package/toggle-button/index.js +1 -1
  295. package/{tokens-BWo7EvNX.cjs → tokens-B3FfJ-rY.cjs} +1 -1
  296. package/{tokens-BtEBd3jO.js → tokens-B9ooUP4g.js} +1 -2
  297. package/tooltip/index.cjs +1 -1
  298. package/tooltip/index.js +1 -1
  299. package/useButton-D6iUB8cN.js +56 -0
  300. package/useButton-R8-i3HLC.cjs +1 -0
  301. package/useDateFormatter-2B0vgHc-.cjs +1 -0
  302. package/{useDateFormatter-DiIUdTak.js → useDateFormatter-BJ1ZyaH1.js} +431 -407
  303. package/{useDescription-LmB1V4Tg.js → useDescription-BLmIkYCq.js} +1 -1
  304. package/{useDescription-ByNlNIRU.cjs → useDescription-BMuiAqI5.cjs} +1 -1
  305. package/useEvent-3ZO5TPSH.cjs +1 -0
  306. package/{useEvent-DqWz89vg.js → useEvent-DpBHTuHJ.js} +1 -1
  307. package/{useField-5CEdtfab.js → useField-BMegM8fA.js} +2 -2
  308. package/{useField-CoQAzygg.cjs → useField-DyeD7MLj.cjs} +1 -1
  309. package/{useFilter-BKQT28sh.js → useFilter-BFnSe_Eq.js} +1 -1
  310. package/{useFilter-Bjh5dq2Q.cjs → useFilter-aoggM85n.cjs} +1 -1
  311. package/{useFocusRing-BM-zcH6L.cjs → useFocusRing-BcbYske2.cjs} +1 -1
  312. package/{useFocusRing-HoJn20X5.js → useFocusRing-DMo8ctYV.js} +2 -2
  313. package/{useFocusWithin-Cn18Myw6.js → useFocusWithin-ClMkhYcq.js} +1 -1
  314. package/{useFocusWithin-o0WjCpEB.cjs → useFocusWithin-DTnk0e8a.cjs} +1 -1
  315. package/{useFocusable-DbmryjUH.cjs → useFocusable-CsG-IPuC.cjs} +1 -1
  316. package/{useFocusable-ZjCKo1ed.js → useFocusable-DXlMChFC.js} +14 -14
  317. package/useFormValidation-BQIRxgbU.cjs +1 -0
  318. package/useFormValidation-L0UHvOsP.js +217 -0
  319. package/{useHasTabbableChild-CyOmqumh.js → useHasTabbableChild-BDaxMsGu.js} +2 -2
  320. package/useHasTabbableChild-CJcLnolh.cjs +1 -0
  321. package/{useHighlightSelectionDescription-DTxHtOsw.js → useHighlightSelectionDescription-BkEv9Jye.js} +5 -5
  322. package/{useHighlightSelectionDescription-DAhPdEG6.cjs → useHighlightSelectionDescription-CQaG611l.cjs} +1 -1
  323. package/{useHover-D8fja4GW.js → useHover-D6bNIkU0.js} +81 -79
  324. package/useHover-DGAmG7jt.cjs +1 -0
  325. package/{useLabels-BtDN_ALM.cjs → useLabels-CvUk-yS3.cjs} +1 -1
  326. package/{useLabels-DZlvh4P4.js → useLabels-Kmq5JCp_.js} +1 -1
  327. package/useListState-D2IEg6_e.cjs +1 -0
  328. package/{useListState-e7cL-FOK.js → useListState-pixYqSLl.js} +43 -42
  329. package/{useLocalizedStringFormatter-BSac43NO.cjs → useLocalizedStringFormatter-BO2iZEL0.cjs} +1 -1
  330. package/useLocalizedStringFormatter-BiX5BTlb.cjs +1 -0
  331. package/{useLocalizedStringFormatter-CSEh15AZ.js → useLocalizedStringFormatter-CL9MUZ8A.js} +1 -1
  332. package/{useLocalizedStringFormatter-aOhh7wdl.js → useLocalizedStringFormatter-N0AyjzbM.js} +1 -1
  333. package/useObserveElement-MhzEsCkX.cjs +1 -0
  334. package/usePress-CicXV7UO.cjs +7 -0
  335. package/{usePress-B_jgTf4k.js → usePress-DMUpU0GU.js} +84 -80
  336. package/{useSingleSelectListState-D7LjjoUJ.js → useSingleSelectListState-BlvpP8y-.js} +1 -1
  337. package/{useSingleSelectListState-BiJMNaOl.cjs → useSingleSelectListState-CwWK_Dx2.cjs} +1 -1
  338. package/useTextField-BC5X_AO_.js +89 -0
  339. package/useTextField-Cxpfu0U3.cjs +1 -0
  340. package/useToggleState-BVOqL4hI.js +21 -0
  341. package/useToggleState-SqDyNfRi.cjs +1 -0
  342. package/{useUpdateEffect-sk3kiVGz.cjs → useUpdateEffect-C5YQs_1w.cjs} +1 -1
  343. package/utils/types.d.ts +4 -0
  344. package/{utils-BM2vxlNA.cjs → utils-CMHKYKlz.cjs} +1 -1
  345. package/{utils-KYuflGZt.js → utils-Cpcjg55U.js} +10 -10
  346. package/utils-DFIwp4PB.js +262 -0
  347. package/utils-__vrf9VZ.cjs +1 -0
  348. package/AccordionItem-DEiRuizp.js +0 -361
  349. package/AccordionItem-Dhr7uo8u.cjs +0 -1
  350. package/BadgeContainer-CxVmqJ7g.cjs +0 -1
  351. package/Breadcrumbs-CEyKlcGU.js +0 -262
  352. package/Breadcrumbs-CnGzvtbn.cjs +0 -1
  353. package/Button-DZzQGk-L.cjs +0 -1
  354. package/Button.module-D-mPLRxe.js +0 -14
  355. package/Button.module-goCEz5qs.cjs +0 -1
  356. package/ButtonGroup-DUqW5dzM.cjs +0 -1
  357. package/Card-DPfOZC7f.cjs +0 -1
  358. package/CharacterCounter-DPphWPzA.js +0 -22
  359. package/Checkbox-BN_3F2Hl.js +0 -264
  360. package/Checkbox-CZtCj4yR.cjs +0 -1
  361. package/CheckboxGroup--xgOT1Do.js +0 -159
  362. package/CheckboxGroup-DGHaqRvb.cjs +0 -1
  363. package/Collection-B1xL4EdF.cjs +0 -1
  364. package/Collection-C5vE9MtJ.js +0 -577
  365. package/ComboBox-UadZMhiR.cjs +0 -1
  366. package/DateField-CNEoLyf5.cjs +0 -1
  367. package/DateField-CZmLugT0.js +0 -47
  368. package/DateInputDivider-CCjiq90K.cjs +0 -1
  369. package/DateRangePicker-DhgLEa9P.cjs +0 -6
  370. package/DateRangePicker-WQ97Psz7.js +0 -870
  371. package/Dialog-BT0tVGQb.cjs +0 -1
  372. package/Dialog-BuJdAr0D.js +0 -1611
  373. package/Dialog-DYK8lySl.cjs +0 -1
  374. package/Dialog-L53DWF0Z.js +0 -220
  375. package/DragAndDrop-DKxsUpmW.js +0 -60
  376. package/DragAndDrop-Dgfq6uJ0.cjs +0 -1
  377. package/FieldError-BlKkw9YL.js +0 -46
  378. package/FieldError-BvU0sueN.cjs +0 -1
  379. package/FocusScope-CAgWgk3N.cjs +0 -1
  380. package/GridItem-BnyULDnc.cjs +0 -1
  381. package/GridItem-orSzD7H5.js +0 -243
  382. package/Heading-DDhdwRAW.js +0 -46
  383. package/Heading-OUPkdoEJ.cjs +0 -1
  384. package/InfoBanner-DpLcq_1R.cjs +0 -1
  385. package/InfoBanner-U5hxOipC.js +0 -99
  386. package/Label-COpr4xVt.cjs +0 -1
  387. package/Layout-BR3Or1Ga.cjs +0 -16
  388. package/Layout-Bdqauktv.js +0 -498
  389. package/Link-CM2N5Jq-.js +0 -72
  390. package/Link-Dnnv00g9.js +0 -60
  391. package/Link-Dq8IFDBx.cjs +0 -6
  392. package/Link-ceVlGaWQ.cjs +0 -1
  393. package/LinkButton-BJA9_HzL.cjs +0 -6
  394. package/LinkButton-DH3Nfdis.js +0 -69
  395. package/ListBox-D0u9svwm.cjs +0 -1
  396. package/ListBox-y_dw__MI.js +0 -531
  397. package/ListBoxButton-C2zp-gXD.cjs +0 -1
  398. package/ListBoxButton-DiseS_LX.js +0 -15
  399. package/ListBoxSection-Cv-gN76G.js +0 -1058
  400. package/ListBoxSection-DtsigmC1.cjs +0 -1
  401. package/ListKeyboardDelegate-fZKXmHAk.cjs +0 -1
  402. package/OverlayArrow-8praV_Xy.cjs +0 -1
  403. package/OverlayArrow-DfkRZlgG.js +0 -507
  404. package/PressResponder-Bm3_RM9c.cjs +0 -1
  405. package/ProgressBar-D5mNQTID.cjs +0 -1
  406. package/ProgressBar-wQirOG1N.js +0 -53
  407. package/Radio-BIomn_sP.js +0 -313
  408. package/Radio-CxvJ5Wrl.cjs +0 -1
  409. package/RangeCalendar-BvvZ2SBj.cjs +0 -11
  410. package/Select-769RSZ9V.js +0 -664
  411. package/Select-Go5x0zWl.cjs +0 -1
  412. package/SelectionManager-BvREZgeu.cjs +0 -1
  413. package/Separator-CggS0R7Q.js +0 -59
  414. package/Separator-DBsDhqCr.cjs +0 -1
  415. package/Skeleton-BAwbfKBW.cjs +0 -1
  416. package/Skeleton-BePDRmrO.js +0 -40
  417. package/Spinner-AXFRWuT6.js +0 -51
  418. package/TabList-0gj27e_e.js +0 -386
  419. package/TabList-Cqpup53E.cjs +0 -1
  420. package/Table-BhtlNY9P.cjs +0 -16
  421. package/Tag-B9M-nBTM.js +0 -748
  422. package/Tag-DkW6zaIS.cjs +0 -1
  423. package/Text-BUDAzDjW.js +0 -32
  424. package/Text-DA_gK6a2.cjs +0 -1
  425. package/TextArea-CSrrYY05.cjs +0 -1
  426. package/TextArea-DphcH6wE.js +0 -119
  427. package/TextField-CsyRTSEG.js +0 -120
  428. package/TextField-P5yICj5z.cjs +0 -1
  429. package/TextField.module-BcpPBWnD.js +0 -13
  430. package/TextField.module-Dw5Rtn9y.cjs +0 -1
  431. package/ToggleButtonGroup-BwFAhFEi.cjs +0 -1
  432. package/ToggleButtonGroup-CuxAKB3-.js +0 -211
  433. package/Tooltip-Bz0xCZSw.cjs +0 -1
  434. package/Tooltip-EuEQtHZj.js +0 -285
  435. package/filterDOMProps-BS2lrgFA.cjs +0 -1
  436. package/filterDOMProps-D6KHYVBX.js +0 -24
  437. package/inertValue-BWmZ1afe.cjs +0 -1
  438. package/mergeProps-BYJQ6N1s.js +0 -115
  439. package/mergeProps-C7Sx47fA.cjs +0 -1
  440. package/useButton-CWHoXYnj.js +0 -47
  441. package/useButton-CwOQUGtY.cjs +0 -1
  442. package/useDateFormatter-bzjwqA2K.cjs +0 -1
  443. package/useEvent-CGRyLM2c.cjs +0 -1
  444. package/useFormValidation-BW2NSTM4.js +0 -215
  445. package/useFormValidation-DSRwb9US.cjs +0 -1
  446. package/useHasTabbableChild-CogBR_6o.cjs +0 -1
  447. package/useHover-CaFzQrR_.cjs +0 -1
  448. package/useListState-TtWy_rDI.cjs +0 -1
  449. package/useLocalizedStringFormatter-CHAo1AyN.cjs +0 -1
  450. package/useObserveElement-BzEr5D32.cjs +0 -1
  451. package/usePress-BOGIOlm8.cjs +0 -7
  452. package/useTextField-BVIOd8Ld.cjs +0 -1
  453. package/useTextField-DFkSHoQN.js +0 -86
  454. package/useToggleState-Bz5rAf4C.js +0 -18
  455. package/useToggleState-DoIkSQdj.cjs +0 -1
  456. package/utils-C5-CzvX2.cjs +0 -1
  457. package/utils-CuqJqFqQ.js +0 -234
@@ -1,119 +1,119 @@
1
1
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
2
2
  import { c as n } from "./clsx-OuTLNxxd.js";
3
3
  import * as e from "react";
4
- import { H as m } from "./Heading-DDhdwRAW.js";
5
- import { $ as _ } from "./Button-DtC_ZOyd.js";
6
- import { $ as h } from "./Link-CM2N5Jq-.js";
7
- import { A as C } from "./arrow-right-uemUGIg8.js";
8
- import './assets/Card.css';const A = "_card_1hl11_4", I = "_horizontal_1hl11_10", p = "_cardLink_1hl11_15", u = "_cardContent_1hl11_20", x = "_cardActions_1hl11_39", f = "_cardActionArea_1hl11_49", z = "_cardImage_1hl11_82", $ = "_cardLinkIcon_1hl11_114", r = {
9
- card: A,
4
+ import { H as m } from "./Heading-BQlmb5Tm.js";
5
+ import { $ as _ } from "./Button-DD5_S-tD.js";
6
+ import { $ as C } from "./Link-CbFSuEI1.js";
7
+ import { A } from "./arrow-right-uemUGIg8.js";
8
+ import './assets/Card.css';const h = "_card_18rs3_1", I = "_horizontal_18rs3_7", p = "_cardLink_18rs3_12", u = "_cardContent_18rs3_17", x = "_cardActions_18rs3_36", f = "_cardActionArea_18rs3_46", z = "_cardImage_18rs3_79", k = "_cardLinkIcon_18rs3_111", o = {
9
+ card: h,
10
10
  horizontal: I,
11
11
  cardLink: p,
12
12
  cardContent: u,
13
13
  cardActions: x,
14
14
  cardActionArea: f,
15
15
  cardImage: z,
16
- cardLinkIcon: $
16
+ cardLinkIcon: k
17
17
  }, d = e.createContext({
18
18
  horizontal: void 0,
19
19
  titleId: void 0
20
20
  }), y = ({
21
- horizontal: t,
22
- className: o,
21
+ horizontal: r,
22
+ className: t,
23
23
  children: a,
24
24
  ...s
25
25
  }) => {
26
26
  const i = `card-title-${e.useId()}`;
27
- return /* @__PURE__ */ c(d.Provider, { value: { horizontal: t, titleId: i }, children: /* @__PURE__ */ c(
27
+ return /* @__PURE__ */ c(d.Provider, { value: { horizontal: r, titleId: i }, children: /* @__PURE__ */ c(
28
28
  "div",
29
29
  {
30
30
  ...s,
31
31
  className: n(
32
- r.card,
33
- t && r.horizontal,
34
- o
32
+ o.card,
33
+ r && o.horizontal,
34
+ t
35
35
  ),
36
36
  children: a
37
37
  }
38
38
  ) });
39
39
  }, H = ({
40
- children: t,
41
- ...o
40
+ children: r,
41
+ ...t
42
42
  }) => {
43
43
  const { horizontal: a } = e.useContext(d);
44
44
  return /* @__PURE__ */ c(
45
45
  "div",
46
46
  {
47
- ...o,
48
- className: n(r.cardContent, a && r.horizontal),
49
- children: t
47
+ ...t,
48
+ className: n(o.cardContent, a && o.horizontal),
49
+ children: r
50
50
  }
51
51
  );
52
52
  }, R = ({
53
- elementType: t = "h2",
54
- children: o
53
+ elementType: r = "h2",
54
+ children: t
55
55
  }) => {
56
56
  const { horizontal: a, titleId: s } = e.useContext(d);
57
57
  return /* @__PURE__ */ c(
58
58
  m,
59
59
  {
60
60
  level: a ? 5 : 3,
61
- elementType: t,
61
+ elementType: r,
62
62
  isExpressive: a,
63
- className: n(r.cardTitle, a && r.horizontal),
63
+ className: n(o.cardTitle, a && o.horizontal),
64
64
  id: s,
65
- children: o
65
+ children: t
66
66
  }
67
67
  );
68
68
  }, T = ({
69
- children: t,
70
- ...o
69
+ children: r,
70
+ ...t
71
71
  }) => {
72
72
  const { horizontal: a } = e.useContext(d);
73
73
  return /* @__PURE__ */ c(
74
74
  "div",
75
75
  {
76
- ...o,
77
- className: n(r.cardActions, a && r.horizontal),
78
- children: t
76
+ ...t,
77
+ className: n(o.cardActions, a && o.horizontal),
78
+ children: r
79
79
  }
80
80
  );
81
- }, w = ({ children: t, className: o, ...a }) => {
81
+ }, w = ({ children: r, className: t, ...a }) => {
82
82
  const { titleId: s } = e.useContext(d);
83
83
  return /* @__PURE__ */ c(
84
84
  _,
85
85
  {
86
86
  ...a,
87
87
  "aria-labelledby": s,
88
- className: n(r.cardActionArea, o),
89
- children: t
88
+ className: n(o.cardActionArea, t),
89
+ children: r
90
90
  }
91
91
  );
92
92
  }, E = ({
93
- as: t = "img",
94
- className: o,
93
+ as: r = "img",
94
+ className: t,
95
95
  ...a
96
96
  }) => /* @__PURE__ */ c(
97
- t,
97
+ r,
98
98
  {
99
99
  ...a,
100
- className: n(r.cardImage, o)
100
+ className: n(o.cardImage, t)
101
101
  }
102
102
  ), P = ({
103
- children: t,
104
- as: o,
103
+ children: r,
104
+ as: t,
105
105
  ...a
106
106
  }) => /* @__PURE__ */ l(
107
- o || h,
107
+ t || C,
108
108
  {
109
109
  ...a,
110
- className: n(r.cardLink, a.className),
110
+ className: n(o.cardLink, a.className),
111
111
  children: [
112
- t,
112
+ r,
113
113
  /* @__PURE__ */ c(
114
- C,
114
+ A,
115
115
  {
116
- className: r.cardLinkIcon,
116
+ className: o.cardLinkIcon,
117
117
  size: 24
118
118
  }
119
119
  )
@@ -0,0 +1 @@
1
+ "use strict";require('./assets/Card.css');const a=require("react/jsx-runtime"),o=require("./clsx-C11secjj.cjs"),l=require("react"),u=require("./Heading-D3FR_KXb.cjs"),C=require("./Button-CMIbSc4-.cjs"),x=require("./Link-wM7cVPlS.cjs"),_=require("./arrow-right-BGd86zzR.cjs");function m(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const s=m(l),A="_card_18rs3_1",g="_horizontal_18rs3_7",h="_cardLink_18rs3_12",I="_cardContent_18rs3_17",j="_cardActions_18rs3_36",b="_cardActionArea_18rs3_46",f="_cardImage_18rs3_79",k="_cardLinkIcon_18rs3_111",c={card:A,horizontal:g,cardLink:h,cardContent:I,cardActions:j,cardActionArea:b,cardImage:f,cardLinkIcon:k},i=s.createContext({horizontal:void 0,titleId:void 0}),z=({horizontal:r,className:e,children:t,...n})=>{const d=`card-title-${s.useId()}`;return a.jsx(i.Provider,{value:{horizontal:r,titleId:d},children:a.jsx("div",{...n,className:o.clsx(c.card,r&&c.horizontal,e),children:t})})},L=({children:r,...e})=>{const{horizontal:t}=s.useContext(i);return a.jsx("div",{...e,className:o.clsx(c.cardContent,t&&c.horizontal),children:r})},p=({elementType:r="h2",children:e})=>{const{horizontal:t,titleId:n}=s.useContext(i);return a.jsx(u.Heading,{level:t?5:3,elementType:r,isExpressive:t,className:o.clsx(c.cardTitle,t&&c.horizontal),id:n,children:e})},v=({children:r,...e})=>{const{horizontal:t}=s.useContext(i);return a.jsx("div",{...e,className:o.clsx(c.cardActions,t&&c.horizontal),children:r})},N=({children:r,className:e,...t})=>{const{titleId:n}=s.useContext(i);return a.jsx(C.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,{...t,"aria-labelledby":n,className:o.clsx(c.cardActionArea,e),children:r})},q=({as:r="img",className:e,...t})=>a.jsx(r,{...t,className:o.clsx(c.cardImage,e)}),$=({children:r,as:e,...t})=>{const n=e||x.$4f118338184dc1d9$export$a6c7ac8248d6e38a;return a.jsxs(n,{...t,className:o.clsx(c.cardLink,t.className),children:[r,a.jsx(_.ArrowRight,{className:c.cardLinkIcon,size:24})]})};exports.Card=z;exports.CardActionArea=N;exports.CardActions=v;exports.CardContent=L;exports.CardImage=q;exports.CardLink=$;exports.CardTitle=p;
@@ -1 +1 @@
1
- "use strict";require('./assets/CharacterCounter.css');const s=require("react/jsx-runtime"),u=require("react"),i=require("./utils-BM2vxlNA.cjs"),d=require("./Input-DIhhWEPW.cjs");function f(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const l=f(u),$="_characterCounter_4224k_4",b={characterCounter:$},h=l.forwardRef((e,n)=>{[e]=i.$64fa3d84918910a7$export$29f1550f4b0d4415(e,n,d.$3985021b0ad6602f$export$37fb8590cf2c088c);const{maxLength:t,value:r,isLonely:o}=e,{length:c}=(r==null?void 0:r.toString())??"",a=t!==void 0;return s.jsx("span",{className:b.characterCounter,"data-exceeded":a&&c>t||void 0,"data-lonely":o||void 0,children:a?`${c} / ${t}`:c})});exports.CharacterCounter=h;
1
+ "use strict";require('./assets/CharacterCounter.css');const s=require("react/jsx-runtime"),u=require("react"),i=require("./utils-CMHKYKlz.cjs"),f=require("./Input-CzMx2mfl.cjs");function d(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const l=d(u),h="_characterCounter_4nrnf_1",b={characterCounter:h},g=l.forwardRef((e,n)=>{[e]=i.$64fa3d84918910a7$export$29f1550f4b0d4415(e,n,f.$3985021b0ad6602f$export$37fb8590cf2c088c);const{maxLength:t,value:r,isLonely:o}=e,{length:c}=(r==null?void 0:r.toString())??"",a=t!==void 0;return s.jsx("span",{className:b.characterCounter,"data-exceeded":a&&c>t||void 0,"data-lonely":o||void 0,children:a?`${c} / ${t}`:c})});exports.CharacterCounter=g;
@@ -0,0 +1,22 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import * as f from "react";
3
+ import { $ as d } from "./utils-Cpcjg55U.js";
4
+ import { $ as i } from "./Input-BLVRv0FK.js";
5
+ import './assets/CharacterCounter.css';const m = "_characterCounter_4nrnf_1", $ = {
6
+ characterCounter: m
7
+ }, l = f.forwardRef((t, n) => {
8
+ [t] = d(t, n, i);
9
+ const { maxLength: r, value: e, isLonely: c } = t, { length: a } = (e == null ? void 0 : e.toString()) ?? "", o = r !== void 0;
10
+ return /* @__PURE__ */ s(
11
+ "span",
12
+ {
13
+ className: $.characterCounter,
14
+ "data-exceeded": o && a > r || void 0,
15
+ "data-lonely": c || void 0,
16
+ children: o ? `${a} / ${r}` : a
17
+ }
18
+ );
19
+ });
20
+ export {
21
+ l as C
22
+ };
@@ -0,0 +1,278 @@
1
+ import { jsxs as F, jsx as c } from "react/jsx-runtime";
2
+ import * as R from "react";
3
+ import H, { useEffect as S, useRef as W } from "react";
4
+ import { a as z } from "./RSPContexts-BW2SEIqe.js";
5
+ import { $ as J, c as K } from "./utils-Cpcjg55U.js";
6
+ import { $ as Q } from "./Form-CXcEMuBf.js";
7
+ import { c as V } from "./clsx-OuTLNxxd.js";
8
+ import { a as y } from "./mergeProps-BSsN7Bgk.js";
9
+ import { $ as T } from "./VisuallyHidden-CGEtjAP7.js";
10
+ import { a as X, $ as D, b as Y, d as _, e as Z } from "./useFormValidation-L0UHvOsP.js";
11
+ import { b as g } from "./usePress-DMUpU0GU.js";
12
+ import { $ as ee } from "./filterDOMProps-wsa9OcNI.js";
13
+ import { a as ae } from "./useFocusable-DXlMChFC.js";
14
+ import { $ as B } from "./useToggleState-BVOqL4hI.js";
15
+ import { $ as ie } from "./useHover-D6bNIkU0.js";
16
+ import { $ as de } from "./useFocusRing-DMo8ctYV.js";
17
+ import './assets/Checkbox.css';function ne(e, a, i) {
18
+ let { isDisabled: d = !1, isReadOnly: n = !1, value: o, name: s, form: t, children: l, "aria-label": v, "aria-labelledby": $, validationState: b = "valid", isInvalid: m, onPressStart: h, onPressEnd: P, onPressChange: f, onPress: u, onPressUp: r, onClick: I } = e, E = (x) => {
19
+ x.stopPropagation(), a.setSelected(x.target.checked);
20
+ }, p = l != null, w = v != null || $ != null;
21
+ !p && !w && process.env.NODE_ENV !== "production" && console.warn("If you do not provide children, you must specify an aria-label for accessibility");
22
+ let { pressProps: j, isPressed: G } = g({
23
+ onPressStart: h,
24
+ onPressEnd: P,
25
+ onPressChange: f,
26
+ onPress: u,
27
+ onPressUp: r,
28
+ onClick: I,
29
+ isDisabled: d
30
+ }), { pressProps: N, isPressed: L } = g({
31
+ onPressStart: h,
32
+ onPressEnd: P,
33
+ onPressChange: f,
34
+ onPressUp: r,
35
+ onClick: I,
36
+ onPress(x) {
37
+ var k;
38
+ u == null || u(x), a.toggle(), (k = i.current) === null || k === void 0 || k.focus();
39
+ },
40
+ isDisabled: d || n
41
+ }), { focusableProps: U } = ae(e, i), A = y(j, U), M = ee(e, {
42
+ labelable: !0
43
+ });
44
+ return X(i, a.defaultSelected, a.setSelected), {
45
+ labelProps: y(N, {
46
+ onClick: (x) => x.preventDefault()
47
+ }),
48
+ inputProps: y(M, {
49
+ "aria-invalid": m || b === "invalid" || void 0,
50
+ "aria-errormessage": e["aria-errormessage"],
51
+ "aria-controls": e["aria-controls"],
52
+ "aria-readonly": n || void 0,
53
+ onChange: E,
54
+ disabled: d,
55
+ ...o == null ? {} : {
56
+ value: o
57
+ },
58
+ name: s,
59
+ form: t,
60
+ type: "checkbox",
61
+ ...A
62
+ }),
63
+ isSelected: a.isSelected,
64
+ isPressed: G || L,
65
+ isDisabled: d,
66
+ isReadOnly: n,
67
+ isInvalid: m || b === "invalid"
68
+ };
69
+ }
70
+ function O(e, a, i) {
71
+ let d = D({
72
+ ...e,
73
+ value: a.isSelected
74
+ }), { isInvalid: n, validationErrors: o, validationDetails: s } = d.displayValidation, { labelProps: t, inputProps: l, isSelected: v, isPressed: $, isDisabled: b, isReadOnly: m } = ne({
75
+ ...e,
76
+ isInvalid: n
77
+ }, a, i);
78
+ Y(e, d, i);
79
+ let { isIndeterminate: h, isRequired: P, validationBehavior: f = "aria" } = e;
80
+ S(() => {
81
+ i.current && (i.current.indeterminate = !!h);
82
+ });
83
+ let { pressProps: u } = g({
84
+ isDisabled: b || m,
85
+ onPress() {
86
+ let { [_]: r } = e, { commitValidation: I } = r || d;
87
+ I();
88
+ }
89
+ });
90
+ return {
91
+ labelProps: y(t, u),
92
+ inputProps: {
93
+ ...l,
94
+ checked: v,
95
+ "aria-required": P && f === "aria" || void 0,
96
+ required: P && f === "native"
97
+ },
98
+ isSelected: v,
99
+ isPressed: $,
100
+ isDisabled: b,
101
+ isReadOnly: m,
102
+ isInvalid: n,
103
+ validationErrors: o,
104
+ validationDetails: s
105
+ };
106
+ }
107
+ const le = /* @__PURE__ */ new WeakMap();
108
+ function oe(e, a, i) {
109
+ const d = B({
110
+ isReadOnly: e.isReadOnly || a.isReadOnly,
111
+ isSelected: a.isSelected(e.value),
112
+ defaultSelected: a.defaultValue.includes(e.value),
113
+ onChange(r) {
114
+ r ? a.addValue(e.value) : a.removeValue(e.value), e.onChange && e.onChange(r);
115
+ }
116
+ });
117
+ let { name: n, form: o, descriptionId: s, errorMessageId: t, validationBehavior: l } = le.get(a);
118
+ var v;
119
+ l = (v = e.validationBehavior) !== null && v !== void 0 ? v : l;
120
+ let { realtimeValidation: $ } = D({
121
+ ...e,
122
+ value: d.isSelected,
123
+ // Server validation is handled at the group level.
124
+ name: void 0,
125
+ validationBehavior: "aria"
126
+ }), b = W(Z), m = () => {
127
+ a.setInvalid(e.value, $.isInvalid ? $ : b.current);
128
+ };
129
+ S(m);
130
+ let h = a.realtimeValidation.isInvalid ? a.realtimeValidation : $, P = l === "native" ? a.displayValidation : h;
131
+ var f;
132
+ let u = O({
133
+ ...e,
134
+ isReadOnly: e.isReadOnly || a.isReadOnly,
135
+ isDisabled: e.isDisabled || a.isDisabled,
136
+ name: e.name || n,
137
+ form: e.form || o,
138
+ isRequired: (f = e.isRequired) !== null && f !== void 0 ? f : a.isRequired,
139
+ validationBehavior: l,
140
+ [_]: {
141
+ realtimeValidation: h,
142
+ displayValidation: P,
143
+ resetValidation: a.resetValidation,
144
+ commitValidation: a.commitValidation,
145
+ updateValidation(r) {
146
+ b.current = r, m();
147
+ }
148
+ }
149
+ }, d, i);
150
+ return {
151
+ ...u,
152
+ inputProps: {
153
+ ...u.inputProps,
154
+ "aria-describedby": [
155
+ e["aria-describedby"],
156
+ a.isInvalid ? t : null,
157
+ s
158
+ ].filter(Boolean).join(" ") || void 0
159
+ }
160
+ };
161
+ }
162
+ const se = H.createContext(null), te = "_checkboxInner_1jfol_1", re = "_checkbox_1jfol_1", ce = "_checkboxGroup_1jfol_121", C = {
163
+ checkboxInner: te,
164
+ checkbox: re,
165
+ checkboxGroup: ce
166
+ }, q = R.forwardRef((e, a) => {
167
+ const { hoverProps: i, isHovered: d } = e.hoverResult, { pressProps: n, isPressed: o } = e.pressResult, { isFocused: s, isFocusVisible: t, focusProps: l } = e.focusRingAria;
168
+ return /* @__PURE__ */ F(
169
+ "label",
170
+ {
171
+ ref: a,
172
+ ...y(i, n, e.labelProps),
173
+ slot: e.slot || void 0,
174
+ className: V(C.checkbox, e.className),
175
+ "data-hovered": d || void 0,
176
+ "data-selected": e.isSelected || void 0,
177
+ "data-indeterminate": e.isIndeterminate || void 0,
178
+ "data-pressed": o || void 0,
179
+ "data-disabled": e.isDisabled || void 0,
180
+ "data-readonly": e.isReadOnly || void 0,
181
+ "data-invalid": e.isInvalid || void 0,
182
+ "data-focused": s || void 0,
183
+ "data-focus-visible": t || void 0,
184
+ "data-required": e.isRequired || void 0,
185
+ children: [
186
+ /* @__PURE__ */ c("div", { className: V(C.checkboxInner), children: /* @__PURE__ */ c(
187
+ "svg",
188
+ {
189
+ width: 16,
190
+ height: 16,
191
+ viewBox: "0 0 18 18",
192
+ "aria-hidden": "true",
193
+ children: e.isIndeterminate ? /* @__PURE__ */ c(
194
+ "rect",
195
+ {
196
+ x: 4,
197
+ y: 8,
198
+ width: 10,
199
+ height: 2
200
+ }
201
+ ) : /* @__PURE__ */ c("polyline", { points: "3,9 7,13 15,4" })
202
+ }
203
+ ) }),
204
+ /* @__PURE__ */ c(T, { children: /* @__PURE__ */ c(
205
+ "input",
206
+ {
207
+ ...y(e.inputProps, l),
208
+ ref: e.inputRef
209
+ }
210
+ ) }),
211
+ e.children
212
+ ]
213
+ }
214
+ );
215
+ }), fe = R.forwardRef((e, a) => {
216
+ const i = oe(
217
+ {
218
+ ...e,
219
+ value: e.value || ""
220
+ },
221
+ e.state,
222
+ e.inputRef
223
+ );
224
+ return /* @__PURE__ */ c(
225
+ q,
226
+ {
227
+ ...e,
228
+ ...i,
229
+ ref: a
230
+ }
231
+ );
232
+ }), ue = R.forwardRef((e, a) => {
233
+ const i = O(e, B(e), e.inputRef);
234
+ return /* @__PURE__ */ c(
235
+ q,
236
+ {
237
+ ...e,
238
+ ...i,
239
+ ref: a
240
+ }
241
+ );
242
+ }), De = R.forwardRef(
243
+ (e, a) => {
244
+ [e, a] = J(e, a, z);
245
+ const i = K(Q), d = e.validationBehavior ?? (i == null ? void 0 : i.validationBehavior) ?? "native", n = R.useContext(se), o = R.useRef(null), s = ie(e), t = g({
246
+ ref: a,
247
+ isDisabled: e.isDisabled
248
+ }), l = de();
249
+ return n ? /* @__PURE__ */ c(
250
+ fe,
251
+ {
252
+ ...e,
253
+ state: n,
254
+ inputRef: o,
255
+ hoverResult: s,
256
+ pressResult: t,
257
+ focusRingAria: l,
258
+ validationBehavior: d
259
+ }
260
+ ) : /* @__PURE__ */ c(
261
+ ue,
262
+ {
263
+ ...e,
264
+ inputRef: o,
265
+ hoverResult: s,
266
+ pressResult: t,
267
+ focusRingAria: l,
268
+ validationBehavior: d
269
+ }
270
+ );
271
+ }
272
+ );
273
+ export {
274
+ le as $,
275
+ De as C,
276
+ se as a,
277
+ C as s
278
+ };
@@ -0,0 +1 @@
1
+ "use strict";require('./assets/Checkbox.css');const o=require("react/jsx-runtime"),k=require("react"),T=require("./RSPContexts-D8hmBfGm.cjs"),q=require("./utils-CMHKYKlz.cjs"),z=require("./Form-BuOomA4T.cjs"),D=require("./clsx-C11secjj.cjs"),g=require("./mergeProps-JhcJ7uJL.cjs"),W=require("./VisuallyHidden-EjrqodVh.cjs"),m=require("./useFormValidation-BQIRxgbU.cjs"),C=require("./usePress-CicXV7UO.cjs"),J=require("./filterDOMProps-RRlKPKX0.cjs"),K=require("./useFocusable-CsG-IPuC.cjs"),j=require("./useToggleState-SqDyNfRi.cjs"),Q=require("./useHover-DGAmG7jt.cjs"),X=require("./useFocusRing-BcbYske2.cjs");function Y(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const d=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(i,a,d.get?d:{enumerable:!0,get:()=>e[a]})}}return i.default=e,Object.freeze(i)}const y=Y(k);function Z(e,i,a){let{isDisabled:d=!1,isReadOnly:n=!1,value:s,name:r,form:l,children:t,"aria-label":b,"aria-labelledby":x,validationState:v="valid",isInvalid:$,onPressStart:h,onPressEnd:P,onPressChange:f,onPress:u,onPressUp:c,onClick:I}=e,E=R=>{R.stopPropagation(),i.setSelected(R.target.checked)},w=t!=null,G=b!=null||x!=null;!w&&!G&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:F,isPressed:N}=C.$f6c31cce2adf654f$export$45712eceda6fad21({onPressStart:h,onPressEnd:P,onPressChange:f,onPress:u,onPressUp:c,onClick:I,isDisabled:d}),{pressProps:M,isPressed:L}=C.$f6c31cce2adf654f$export$45712eceda6fad21({onPressStart:h,onPressEnd:P,onPressChange:f,onPressUp:c,onClick:I,onPress(R){var S;u==null||u(R),i.toggle(),(S=a.current)===null||S===void 0||S.focus()},isDisabled:d||n}),{focusableProps:U}=K.$f645667febf57a63$export$4c014de7c8940b4c(e,a),A=g.$3ef42575df84b30b$export$9d1611c77c2fe928(F,U),H=J.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0});return m.$99facab73266f662$export$5add1d006293d136(a,i.defaultSelected,i.setSelected),{labelProps:g.$3ef42575df84b30b$export$9d1611c77c2fe928(M,{onClick:R=>R.preventDefault()}),inputProps:g.$3ef42575df84b30b$export$9d1611c77c2fe928(H,{"aria-invalid":$||v==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":n||void 0,onChange:E,disabled:d,...s==null?{}:{value:s},name:r,form:l,type:"checkbox",...A}),isSelected:i.isSelected,isPressed:N||L,isDisabled:d,isReadOnly:n,isInvalid:$||v==="invalid"}}function O(e,i,a){let d=m.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:i.isSelected}),{isInvalid:n,validationErrors:s,validationDetails:r}=d.displayValidation,{labelProps:l,inputProps:t,isSelected:b,isPressed:x,isDisabled:v,isReadOnly:$}=Z({...e,isInvalid:n},i,a);m.$e93e671b31057976$export$b8473d3665f3a75a(e,d,a);let{isIndeterminate:h,isRequired:P,validationBehavior:f="aria"}=e;k.useEffect(()=>{a.current&&(a.current.indeterminate=!!h)});let{pressProps:u}=C.$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:v||$,onPress(){let{[m.$e5be200c675c3b3a$export$a763b9476acd3eb]:c}=e,{commitValidation:I}=c||d;I()}});return{labelProps:g.$3ef42575df84b30b$export$9d1611c77c2fe928(l,u),inputProps:{...t,checked:b,"aria-required":P&&f==="aria"||void 0,required:P&&f==="native"},isSelected:b,isPressed:x,isDisabled:v,isReadOnly:$,isInvalid:n,validationErrors:s,validationDetails:r}}const _=new WeakMap;function ee(e,i,a){const d=j.$3017fa7ffdddec74$export$8042c6c013fd5226({isReadOnly:e.isReadOnly||i.isReadOnly,isSelected:i.isSelected(e.value),defaultSelected:i.defaultValue.includes(e.value),onChange(c){c?i.addValue(e.value):i.removeValue(e.value),e.onChange&&e.onChange(c)}});let{name:n,form:s,descriptionId:r,errorMessageId:l,validationBehavior:t}=_.get(i);var b;t=(b=e.validationBehavior)!==null&&b!==void 0?b:t;let{realtimeValidation:x}=m.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:d.isSelected,name:void 0,validationBehavior:"aria"}),v=k.useRef(m.$e5be200c675c3b3a$export$dad6ae84456c676a),$=()=>{i.setInvalid(e.value,x.isInvalid?x:v.current)};k.useEffect($);let h=i.realtimeValidation.isInvalid?i.realtimeValidation:x,P=t==="native"?i.displayValidation:h;var f;let u=O({...e,isReadOnly:e.isReadOnly||i.isReadOnly,isDisabled:e.isDisabled||i.isDisabled,name:e.name||n,form:e.form||s,isRequired:(f=e.isRequired)!==null&&f!==void 0?f:i.isRequired,validationBehavior:t,[m.$e5be200c675c3b3a$export$a763b9476acd3eb]:{realtimeValidation:h,displayValidation:P,resetValidation:i.resetValidation,commitValidation:i.commitValidation,updateValidation(c){v.current=c,$()}}},d,a);return{...u,inputProps:{...u.inputProps,"aria-describedby":[e["aria-describedby"],i.isInvalid?l:null,r].filter(Boolean).join(" ")||void 0}}}const B=k.createContext(null),ie="_checkboxInner_1jfol_1",ae="_checkbox_1jfol_1",de="_checkboxGroup_1jfol_121",V={checkboxInner:ie,checkbox:ae,checkboxGroup:de},p=y.forwardRef((e,i)=>{const{hoverProps:a,isHovered:d}=e.hoverResult,{pressProps:n,isPressed:s}=e.pressResult,{isFocused:r,isFocusVisible:l,focusProps:t}=e.focusRingAria;return o.jsxs("label",{ref:i,...g.$3ef42575df84b30b$export$9d1611c77c2fe928(a,n,e.labelProps),slot:e.slot||void 0,className:D.clsx(V.checkbox,e.className),"data-hovered":d||void 0,"data-selected":e.isSelected||void 0,"data-indeterminate":e.isIndeterminate||void 0,"data-pressed":s||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-invalid":e.isInvalid||void 0,"data-focused":r||void 0,"data-focus-visible":l||void 0,"data-required":e.isRequired||void 0,children:[o.jsx("div",{className:D.clsx(V.checkboxInner),children:o.jsx("svg",{width:16,height:16,viewBox:"0 0 18 18","aria-hidden":"true",children:e.isIndeterminate?o.jsx("rect",{x:4,y:8,width:10,height:2}):o.jsx("polyline",{points:"3,9 7,13 15,4"})})}),o.jsx(W.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:o.jsx("input",{...g.$3ef42575df84b30b$export$9d1611c77c2fe928(e.inputProps,t),ref:e.inputRef})}),e.children]})}),ne=y.forwardRef((e,i)=>{const a=ee({...e,value:e.value||""},e.state,e.inputRef);return o.jsx(p,{...e,...a,ref:i})}),te=y.forwardRef((e,i)=>{const a=O(e,j.$3017fa7ffdddec74$export$8042c6c013fd5226(e),e.inputRef);return o.jsx(p,{...e,...a,ref:i})}),se=y.forwardRef((e,i)=>{[e,i]=q.$64fa3d84918910a7$export$29f1550f4b0d4415(e,i,T.$4e85f108e88277b8$export$b085522c77523c51);const a=q.$64fa3d84918910a7$export$fabf2dc03a41866e(z.$d3e0e05bdfcf66bd$export$c24727297075ec6a),d=e.validationBehavior??(a==null?void 0:a.validationBehavior)??"native",n=y.useContext(B),s=y.useRef(null),r=Q.$6179b936705e76d3$export$ae780daf29e6d456(e),l=C.$f6c31cce2adf654f$export$45712eceda6fad21({ref:i,isDisabled:e.isDisabled}),t=X.$f7dceffc5ad7768b$export$4e328f61c538687f();return n?o.jsx(ne,{...e,state:n,inputRef:s,hoverResult:r,pressResult:l,focusRingAria:t,validationBehavior:d}):o.jsx(te,{...e,inputRef:s,hoverResult:r,pressResult:l,focusRingAria:t,validationBehavior:d})});exports.$1ae600c947479353$export$ec98120685d4f57d=_;exports.Checkbox=se;exports.CheckboxGroupContext=B;exports.styles=V;
@@ -0,0 +1,157 @@
1
+ import { jsx as s, jsxs as g } from "react/jsx-runtime";
2
+ import { a as P, L as V } from "./Label-C5TNJ0Ku.js";
3
+ import { T as C } from "./Text-CmlsaWMA.js";
4
+ import * as m from "react";
5
+ import { useState as S, useRef as y } from "react";
6
+ import { $ as p, C as v, s as D, a as I } from "./Checkbox-DTuryJdM.js";
7
+ import { $ as R, F as k } from "./FieldError-DdvFyIf4.js";
8
+ import { $ as F, c as A } from "./useFormValidation-L0UHvOsP.js";
9
+ import { $ as E } from "./useControlledState-u436Wbp1.js";
10
+ import { a as M } from "./mergeProps-BSsN7Bgk.js";
11
+ import { $ as O } from "./filterDOMProps-wsa9OcNI.js";
12
+ import { $ as W } from "./useField-BMegM8fA.js";
13
+ import { $ as B } from "./useFocusWithin-ClMkhYcq.js";
14
+ import { u as L } from "./useLocalizedStringFormatter-N0AyjzbM.js";
15
+ function G(e, a) {
16
+ let { isDisabled: t, name: c, form: f, validationBehavior: n = "aria" } = e, { isInvalid: r, validationErrors: d, validationDetails: l } = a.displayValidation, { labelProps: u, fieldProps: $, descriptionProps: i, errorMessageProps: o } = W({
17
+ ...e,
18
+ // Checkbox group is not an HTML input element so it
19
+ // shouldn't be labeled by a <label> element.
20
+ labelElementType: "span",
21
+ isInvalid: r,
22
+ errorMessage: e.errorMessage || d
23
+ });
24
+ p.set(a, {
25
+ name: c,
26
+ form: f,
27
+ descriptionId: i.id,
28
+ errorMessageId: o.id,
29
+ validationBehavior: n
30
+ });
31
+ let b = O(e, {
32
+ labelable: !0
33
+ }), { focusWithinProps: x } = B({
34
+ onBlurWithin: e.onBlur,
35
+ onFocusWithin: e.onFocus,
36
+ onFocusWithinChange: e.onFocusChange
37
+ });
38
+ return {
39
+ groupProps: M(b, {
40
+ role: "group",
41
+ "aria-disabled": t || void 0,
42
+ ...$,
43
+ ...x
44
+ }),
45
+ labelProps: u,
46
+ descriptionProps: i,
47
+ errorMessageProps: o,
48
+ isInvalid: r,
49
+ validationErrors: d,
50
+ validationDetails: l
51
+ };
52
+ }
53
+ function _(e = {}) {
54
+ let [a, t] = E(e.value, e.defaultValue || [], e.onChange), [c] = S(a), f = !!e.isRequired && a.length === 0, n = y(/* @__PURE__ */ new Map()), r = F({
55
+ ...e,
56
+ value: a
57
+ }), d = r.displayValidation.isInvalid;
58
+ var l, u;
59
+ return {
60
+ ...r,
61
+ value: a,
62
+ defaultValue: (l = e.defaultValue) !== null && l !== void 0 ? l : c,
63
+ setValue(i) {
64
+ e.isReadOnly || e.isDisabled || t(i);
65
+ },
66
+ isDisabled: e.isDisabled || !1,
67
+ isReadOnly: e.isReadOnly || !1,
68
+ isSelected(i) {
69
+ return a.includes(i);
70
+ },
71
+ addValue(i) {
72
+ e.isReadOnly || e.isDisabled || a.includes(i) || (a = a.concat(i), t(a));
73
+ },
74
+ removeValue(i) {
75
+ e.isReadOnly || e.isDisabled || a.includes(i) && t(a.filter((o) => o !== i));
76
+ },
77
+ toggleValue(i) {
78
+ e.isReadOnly || e.isDisabled || (a.includes(i) ? t(a.filter((o) => o !== i)) : t(a.concat(i)));
79
+ },
80
+ setInvalid(i, o) {
81
+ let b = new Map(n.current);
82
+ o.isInvalid ? b.set(i, o) : b.delete(i), n.current = b, r.updateValidation(A(...b.values()));
83
+ },
84
+ validationState: (u = e.validationState) !== null && u !== void 0 ? u : d ? "invalid" : null,
85
+ isInvalid: d,
86
+ isRequired: f
87
+ };
88
+ }
89
+ const j = (e, { value: a }) => {
90
+ const t = m.Children.toArray(e).filter(
91
+ (l) => m.isValidElement(l) && l.type === v
92
+ ), c = m.Children.count(t), f = m.Children.toArray(e).filter((l) => m.isValidElement(l)).filter((l) => !!l && l.type === v).map((l) => l.props.value), n = a.length === 0, r = a.length === c;
93
+ return {
94
+ allSelected: r,
95
+ someSelected: !n && !r,
96
+ checkboxValues: f
97
+ };
98
+ }, h = ({ state: e, errorMessage: a }) => /* @__PURE__ */ s(R.Provider, { value: e.displayValidation, children: /* @__PURE__ */ s(k, { children: a }) }), q = { selectAll: "Select all" }, w = { selectAll: "Välj alla" }, T = {
99
+ en: q,
100
+ sv: w
101
+ };
102
+ function le(e) {
103
+ const a = _(e), t = L(T), { groupProps: c, labelProps: f, descriptionProps: n } = G(
104
+ e,
105
+ a
106
+ ), { allSelected: r, someSelected: d, checkboxValues: l } = j(
107
+ e.children,
108
+ a
109
+ ), u = ($) => {
110
+ a.setValue($ ? l : []);
111
+ };
112
+ return /* @__PURE__ */ g(
113
+ "div",
114
+ {
115
+ ...c,
116
+ className: D.checkboxGroup,
117
+ children: [
118
+ /* @__PURE__ */ s(P, { popover: e.popover, children: e.label && /* @__PURE__ */ s(V, { ...f, children: e.label }) }),
119
+ e.description && /* @__PURE__ */ s(
120
+ C,
121
+ {
122
+ slot: "description",
123
+ ...n,
124
+ children: e.description
125
+ }
126
+ ),
127
+ e.errorPosition === "top" && /* @__PURE__ */ s(
128
+ h,
129
+ {
130
+ ...e,
131
+ state: a
132
+ }
133
+ ),
134
+ e.showSelectAll && /* @__PURE__ */ s(
135
+ v,
136
+ {
137
+ isSelected: r,
138
+ isIndeterminate: d,
139
+ onChange: u,
140
+ children: e.selectAllLabel || t.format("selectAll")
141
+ }
142
+ ),
143
+ /* @__PURE__ */ s(I.Provider, { value: a, children: e.children }),
144
+ e.errorPosition === "bottom" && /* @__PURE__ */ s(
145
+ h,
146
+ {
147
+ ...e,
148
+ state: a
149
+ }
150
+ )
151
+ ]
152
+ }
153
+ );
154
+ }
155
+ export {
156
+ le as C
157
+ };
@@ -0,0 +1 @@
1
+ "use strict";const s=require("react/jsx-runtime"),m=require("./Label-Dp85Vue3.cjs"),C=require("./Text-BAFsaON-.cjs"),$=require("react"),h=require("./Checkbox-dtZfsSfx.cjs"),g=require("./FieldError-Cornph2A.cjs"),P=require("./useFormValidation-BQIRxgbU.cjs"),y=require("./useControlledState-D0L6S_5r.cjs"),j=require("./mergeProps-JhcJ7uJL.cjs"),q=require("./filterDOMProps-RRlKPKX0.cjs"),k=require("./useField-DyeD7MLj.cjs"),D=require("./useFocusWithin-DTnk0e8a.cjs"),F=require("./useLocalizedStringFormatter-BO2iZEL0.cjs");function O(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const v=O($);function R(e,t){let{isDisabled:a,name:n,form:u,validationBehavior:c="aria"}=e,{isInvalid:r,validationErrors:d,validationDetails:l}=t.displayValidation,{labelProps:f,fieldProps:x,descriptionProps:i,errorMessageProps:o}=k.$2baaea4c71418dea$export$294aa081a6c6f55d({...e,labelElementType:"span",isInvalid:r,errorMessage:e.errorMessage||d});h.$1ae600c947479353$export$ec98120685d4f57d.set(t,{name:n,form:u,descriptionId:i.id,errorMessageId:o.id,validationBehavior:c});let b=q.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0}),{focusWithinProps:S}=D.$9ab94262bd0047c7$export$420e68273165f4ec({onBlurWithin:e.onBlur,onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange});return{groupProps:j.$3ef42575df84b30b$export$9d1611c77c2fe928(b,{role:"group","aria-disabled":a||void 0,...x,...S}),labelProps:f,descriptionProps:i,errorMessageProps:o,isInvalid:r,validationErrors:d,validationDetails:l}}function I(e={}){let[t,a]=y.$458b0a5536c1a7cf$export$40bfa8c7b0832715(e.value,e.defaultValue||[],e.onChange),[n]=$.useState(t),u=!!e.isRequired&&t.length===0,c=$.useRef(new Map),r=P.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:t}),d=r.displayValidation.isInvalid;var l,f;return{...r,value:t,defaultValue:(l=e.defaultValue)!==null&&l!==void 0?l:n,setValue(i){e.isReadOnly||e.isDisabled||a(i)},isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isSelected(i){return t.includes(i)},addValue(i){e.isReadOnly||e.isDisabled||t.includes(i)||(t=t.concat(i),a(t))},removeValue(i){e.isReadOnly||e.isDisabled||t.includes(i)&&a(t.filter(o=>o!==i))},toggleValue(i){e.isReadOnly||e.isDisabled||(t.includes(i)?a(t.filter(o=>o!==i)):a(t.concat(i)))},setInvalid(i,o){let b=new Map(c.current);o.isInvalid?b.set(i,o):b.delete(i),c.current=b,r.updateValidation(P.$e5be200c675c3b3a$export$75ee7c75d68f5b0e(...b.values()))},validationState:(f=e.validationState)!==null&&f!==void 0?f:d?"invalid":null,isInvalid:d,isRequired:u}}const M=(e,{value:t})=>{const a=v.Children.toArray(e).filter(l=>v.isValidElement(l)&&l.type===h.Checkbox),n=v.Children.count(a),u=v.Children.toArray(e).filter(l=>v.isValidElement(l)).filter(l=>!!l&&l.type===h.Checkbox).map(l=>l.props.value),c=t.length===0,r=t.length===n;return{allSelected:r,someSelected:!c&&!r,checkboxValues:u}},V=({state:e,errorMessage:t})=>s.jsx(g.$ee014567cb39d3f0$export$ff05c3ac10437e03.Provider,{value:e.displayValidation,children:s.jsx(g.FieldError,{children:t})}),E={selectAll:"Select all"},A={selectAll:"Välj alla"},W={en:E,sv:A};function _(e){const t=I(e),a=F.useLocalizedStringFormatter(W),{groupProps:n,labelProps:u,descriptionProps:c}=R(e,t),{allSelected:r,someSelected:d,checkboxValues:l}=M(e.children,t),f=x=>{t.setValue(x?l:[])};return s.jsxs("div",{...n,className:h.styles.checkboxGroup,children:[s.jsx(m.LabelWrapper,{popover:e.popover,children:e.label&&s.jsx(m.Label,{...u,children:e.label})}),e.description&&s.jsx(C.Text,{slot:"description",...c,children:e.description}),e.errorPosition==="top"&&s.jsx(V,{...e,state:t}),e.showSelectAll&&s.jsx(h.Checkbox,{isSelected:r,isIndeterminate:d,onChange:f,children:e.selectAllLabel||a.format("selectAll")}),s.jsx(h.CheckboxGroupContext.Provider,{value:t,children:e.children}),e.errorPosition==="bottom"&&s.jsx(V,{...e,state:t})]})}exports.CheckboxGroup=_;