@midas-ds/components 11.2.0 → 12.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (465) hide show
  1. package/AccordionItem-C9dBt-tQ.js +335 -0
  2. package/AccordionItem-SOfjXh3V.cjs +1 -0
  3. package/BadgeContainer-iNNgJKD9.js +37 -0
  4. package/{BadgeContainer-DWVHS5dn.cjs → BadgeContainer-su0iCJKy.cjs} +1 -1
  5. package/Breadcrumbs-BAHJMPsu.js +271 -0
  6. package/Breadcrumbs-DUcHHI_2.cjs +1 -0
  7. package/Button-CMIbSc4-.cjs +1 -0
  8. package/{Button-CepQFEit.js → Button-DD5_S-tD.js} +154 -160
  9. package/{Button-BjMaGya2.js → Button-DYcmg49Z.js} +2 -2
  10. package/{Button-Dq6ugqxT.cjs → Button-DrL5Jv-s.cjs} +1 -1
  11. package/Button.module-BNLcvARn.cjs +1 -0
  12. package/Button.module-Bax2YU6N.js +14 -0
  13. package/ButtonGroup-ClYTgaRc.cjs +1 -0
  14. package/{ButtonGroup-DvVvear6.js → ButtonGroup-WZZDPu9Z.js} +1 -1
  15. package/CHANGELOG.md +114 -0
  16. package/Card-BDDyGAMA.js +131 -0
  17. package/Card-mj5lCIR4.cjs +1 -0
  18. package/{CharacterCounter-DSFBv3Rw.cjs → CharacterCounter-CnRv-iUP.cjs} +1 -1
  19. package/{CharacterCounter-DpBDwvLw.js → CharacterCounter-DT7A0wWP.js} +8 -8
  20. package/Checkbox-BtM2rFh9.js +278 -0
  21. package/Checkbox-CvdIG43J.cjs +1 -0
  22. package/CheckboxGroup-C94as9Xt.cjs +1 -0
  23. package/CheckboxGroup-CjcDYBRk.js +157 -0
  24. package/Collection-B0_WAieZ.js +625 -0
  25. package/Collection-BvWp2xBd.cjs +1 -0
  26. package/{ColorSchemeSwitch-PiEHptw1.js → ColorSchemeSwitch-C4PMYeD5.js} +17 -25
  27. package/{ColorSchemeSwitch-owUryjYz.cjs → ColorSchemeSwitch-CKcoGZM1.cjs} +1 -1
  28. package/ComboBox-B2EmfOyr.cjs +1 -0
  29. package/{ComboBox-DfJ_aJrf.js → ComboBox-BWXJZyOR.js} +522 -511
  30. package/DateField-CcQJYDLD.js +47 -0
  31. package/DateField-IpCiF81R.cjs +1 -0
  32. package/{DateInputDivider-BmvqW1Hk.js → DateInputDivider-CXkUdlzc.js} +936 -839
  33. package/DateInputDivider-Cf5GZHlM.cjs +1 -0
  34. package/DateRangePicker-B2BJO1KC.js +889 -0
  35. package/DateRangePicker-Dfwe9RhJ.cjs +6 -0
  36. package/Dialog-B8swxl24.js +1643 -0
  37. package/Dialog-DR6nEqMT.cjs +1 -0
  38. package/Dialog-DgJobm71.cjs +1 -0
  39. package/Dialog-P3frHOdq.js +240 -0
  40. package/DragAndDrop-Dw8JZmrn.cjs +1 -0
  41. package/DragAndDrop-PrUJv--B.js +75 -0
  42. package/{Dropdown-Cpc2EszJ.js → Dropdown-CIvWpN3v.js} +33 -32
  43. package/Dropdown-DJ2vWAqk.cjs +6 -0
  44. package/FieldError-Cornph2A.cjs +1 -0
  45. package/{FieldError-CDCvUjK5.js → FieldError-DdvFyIf4.js} +16 -14
  46. package/{FileUpload-BokzdXVc.js → FileUpload-D2gnQKdn.js} +76 -74
  47. package/{FileUpload-Bz9md5zc.cjs → FileUpload-D3RaARDV.cjs} +2 -2
  48. package/{FocusScope-DMsfA3bj.js → FocusScope-Bj40Ir-g.js} +192 -195
  49. package/FocusScope-Uy3DiY0-.cjs +1 -0
  50. package/Grid-WbEkSCGh.cjs +1 -0
  51. package/{Grid--OhtgCo6.js → Grid-s8ovKDi8.js} +6 -9
  52. package/GridItem-CIVF1fRW.cjs +1 -0
  53. package/GridItem-D3FZyyO-.js +243 -0
  54. package/{Group-DOpbdoAi.cjs → Group-BKYGeOBr.cjs} +1 -1
  55. package/{Group-B0vQfHDy.js → Group-C73mD_-i.js} +6 -6
  56. package/Heading-BQlmb5Tm.js +46 -0
  57. package/Heading-D3FR_KXb.cjs +1 -0
  58. package/InfoBanner-CqjnTYaa.cjs +1 -0
  59. package/InfoBanner-CrA8MS3v.js +83 -0
  60. package/{Input-n-Z20KbW.js → Input-BLVRv0FK.js} +4 -4
  61. package/{Input-MJji5hhq.cjs → Input-CzMx2mfl.cjs} +1 -1
  62. package/{Label-endv1fkJ.js → Label-BG7G0iyG.js} +23 -27
  63. package/Label-C00qz3kQ.cjs +1 -0
  64. package/Layout-Bta_Cpq_.cjs +16 -0
  65. package/Layout-CG-Qxr_1.js +482 -0
  66. package/{Link-ovwNVMfg.js → Link-BtxKZ0h3.js} +16 -16
  67. package/Link-Bx6avHVl.cjs +6 -0
  68. package/Link-CbFSuEI1.js +73 -0
  69. package/Link-wM7cVPlS.cjs +1 -0
  70. package/LinkButton-BvXu6vAH.cjs +6 -0
  71. package/LinkButton-D3EnZ65v.js +69 -0
  72. package/ListBox-ICZKGluC.cjs +1 -0
  73. package/ListBox-LncMQt6I.js +523 -0
  74. package/ListBoxLoadMoreItem-Ceo73a2q.cjs +1 -0
  75. package/ListBoxLoadMoreItem-W11V-Lef.js +41 -0
  76. package/ListBoxSection-BCPv9H50.js +1085 -0
  77. package/ListBoxSection-Dx75ZinL.cjs +1 -0
  78. package/{ListKeyboardDelegate-CHki611g.js → ListKeyboardDelegate-CVxkAn5D.js} +13 -9
  79. package/ListKeyboardDelegate-C_X1wLkh.cjs +1 -0
  80. package/{Logo-BpH0HC91.cjs → Logo-CFjZc5u2.cjs} +1 -1
  81. package/{Logo-ME4ffCue.js → Logo-DkagDdKQ.js} +14 -18
  82. package/OverlayArrow-ByH6lM-H.cjs +1 -0
  83. package/OverlayArrow-CvNuu3e3.js +519 -0
  84. package/{Popover-BDvKByTT.cjs → Popover-Bi5yJEoE.cjs} +1 -1
  85. package/{Popover-Tniqbaes.js → Popover-CyEVqpJ6.js} +11 -11
  86. package/{PressResponder-C3APAKsz.js → PressResponder-CxVtArtP.js} +4 -4
  87. package/{PressResponder-4jE_HLu3.cjs → PressResponder-DbnYqwGB.cjs} +1 -1
  88. package/ProgressBar-CdXHEJh6.js +53 -0
  89. package/ProgressBar-CjuHokVZ.cjs +1 -0
  90. package/Radio-Bll-7H8O.cjs +1 -0
  91. package/Radio-DoWx2AE1.js +333 -0
  92. package/RangeCalendar-A4WQIG7P.cjs +6 -0
  93. package/{RangeCalendar-BCruEq9d.js → RangeCalendar-D7eFVAPP.js} +637 -629
  94. package/{SearchField-QFyuaT-K.cjs → SearchField-BbrUZpQm.cjs} +2 -2
  95. package/{SearchField-nwlyszwt.js → SearchField-F2FKgYds.js} +27 -31
  96. package/Select-BnbDXwgD.cjs +1 -0
  97. package/Select-Dpi3LhbI.js +654 -0
  98. package/{SelectionManager-BKrZ_mMO.js → SelectionManager-Bq-Gw1UT.js} +291 -282
  99. package/SelectionManager-BtbHoHpA.cjs +1 -0
  100. package/Separator-CM0KPvsX.js +105 -0
  101. package/Separator-Cfv2pbWf.cjs +1 -0
  102. package/Separator-DH-5wu9X.js +77 -0
  103. package/Separator-Dgin8BNW.cjs +1 -0
  104. package/Skeleton-BpYj25p8.js +37 -0
  105. package/Skeleton-DMOxEwnd.cjs +1 -0
  106. package/Spinner-D1UBuLy4.cjs +6 -0
  107. package/Spinner-DTKb_LAA.js +47 -0
  108. package/TabList-D4WwgQY3.cjs +1 -0
  109. package/TabList-D9tl2s85.js +397 -0
  110. package/Table-C6k3PiiC.cjs +16 -0
  111. package/{Table-DGTwyh7U.js → Table-CkN3y69S.js} +883 -804
  112. package/Tag-7dHEMQum.cjs +1 -0
  113. package/Tag-BUJ20HHw.js +765 -0
  114. package/Text-BAFsaON-.cjs +1 -0
  115. package/{Text-DcZqSUN9.js → Text-Be7WIOwv.js} +1 -1
  116. package/{Text-CfcjRtke.cjs → Text-BtPiT2P1.cjs} +1 -1
  117. package/Text-CmlsaWMA.js +32 -0
  118. package/TextArea-BCikUXaD.cjs +1 -0
  119. package/TextArea-h5_oBQH1.js +125 -0
  120. package/TextField-Bm5916AD.cjs +1 -0
  121. package/TextField-_UY8CXtW.js +134 -0
  122. package/TextField.module-C9Zm9unF.js +13 -0
  123. package/TextField.module-GTQtNO0r.cjs +1 -0
  124. package/{Toast-CWt_mNIg.js → Toast-BBkWczCk.js} +234 -253
  125. package/Toast-DclaxvZM.cjs +1 -0
  126. package/ToggleButtonGroup-BGG64PK1.js +214 -0
  127. package/ToggleButtonGroup-Da330GRT.cjs +1 -0
  128. package/Tooltip-BHAtsp9k.js +281 -0
  129. package/Tooltip-CZa9n5sT.cjs +1 -0
  130. package/{VisuallyHidden-CYfmTSCD.js → VisuallyHidden-CGEtjAP7.js} +2 -2
  131. package/{VisuallyHidden-Doyzl0F7.cjs → VisuallyHidden-EjrqodVh.cjs} +1 -1
  132. package/accordion/Accordion.d.ts +8 -2
  133. package/accordion/AccordionContext.d.ts +4 -0
  134. package/accordion/AccordionItem.d.ts +6 -4
  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 -0
  180. package/assets/variables.css +1 -0
  181. package/badge/index.cjs +1 -1
  182. package/badge/index.js +1 -1
  183. package/breadcrumbs/Breadcrumbs.d.ts +0 -2
  184. package/breadcrumbs/index.cjs +1 -1
  185. package/breadcrumbs/index.js +1 -1
  186. package/button/index.cjs +1 -1
  187. package/button/index.js +2 -2
  188. package/calendar/index.cjs +1 -1
  189. package/calendar/index.js +1 -1
  190. package/card/index.cjs +1 -1
  191. package/card/index.js +1 -1
  192. package/character-counter/index.cjs +1 -1
  193. package/character-counter/index.js +1 -1
  194. package/checkbox/index.cjs +1 -1
  195. package/checkbox/index.js +2 -2
  196. package/chevron-right-0-sUFBiR.cjs +6 -0
  197. package/chevron-right-BYYHEJjK.js +11 -0
  198. package/color-scheme-switch/index.cjs +1 -1
  199. package/color-scheme-switch/index.js +1 -1
  200. package/combobox/ComboBox.d.ts +0 -4
  201. package/combobox/index.cjs +1 -1
  202. package/combobox/index.d.ts +1 -2
  203. package/combobox/index.js +2 -3
  204. package/combobox/intl/translations.json.d.ts +4 -2
  205. package/combobox/types.d.ts +0 -13
  206. package/common/icon-map.d.ts +6 -0
  207. package/common/types.d.ts +8 -0
  208. package/date-field/index.cjs +1 -1
  209. package/date-field/index.js +2 -2
  210. package/date-picker/index.cjs +1 -1
  211. package/date-picker/index.js +1 -1
  212. package/dropdown/Dropdown.d.ts +25 -1
  213. package/dropdown/index.cjs +1 -1
  214. package/dropdown/index.js +1 -1
  215. package/field-error/index.cjs +1 -1
  216. package/field-error/index.js +1 -1
  217. package/file-upload/index.cjs +1 -1
  218. package/file-upload/index.js +1 -1
  219. package/filterDOMProps-RRlKPKX0.cjs +1 -0
  220. package/filterDOMProps-wsa9OcNI.js +65 -0
  221. package/grid/Grid.d.ts +0 -8
  222. package/grid/GridItem.d.ts +0 -8
  223. package/grid/index.cjs +1 -1
  224. package/grid/index.d.ts +2 -2
  225. package/grid/index.js +4 -6
  226. package/heading/index.cjs +1 -1
  227. package/heading/index.js +1 -1
  228. package/icon-map-9XcghDra.cjs +11 -0
  229. package/icon-map-uS87FT_Q.js +43 -0
  230. package/{index-CGRFP4CC.js → index-BLPblar-.js} +34 -31
  231. package/index-DSFSh2sC.cjs +17 -0
  232. package/index.cjs +1 -1
  233. package/index.d.ts +2 -0
  234. package/index.js +133 -121
  235. package/info-banner/InfoBanner.d.ts +18 -10
  236. package/info-banner/index.cjs +1 -1
  237. package/info-banner/index.js +1 -1
  238. package/label/index.cjs +1 -1
  239. package/label/index.js +1 -1
  240. package/layout/index.cjs +1 -1
  241. package/layout/index.js +1 -1
  242. package/link/index.cjs +1 -1
  243. package/link/index.js +2 -2
  244. package/link-button/index.cjs +1 -1
  245. package/link-button/index.js +2 -2
  246. package/list-box/ListBoxLoadMoreItem.d.ts +4 -0
  247. package/list-box/index.cjs +1 -1
  248. package/list-box/index.d.ts +1 -0
  249. package/list-box/index.js +6 -5
  250. package/list-box/intl/translations.json.d.ts +11 -0
  251. package/logo/index.cjs +1 -1
  252. package/logo/index.js +1 -1
  253. package/menu/Menu.d.ts +13 -0
  254. package/menu/MenuItem.d.ts +5 -0
  255. package/menu/MenuPopover.d.ts +3 -0
  256. package/menu/MenuSection.d.ts +3 -0
  257. package/menu/Separator.d.ts +3 -0
  258. package/menu/index.cjs +1 -0
  259. package/menu/index.d.ts +5 -0
  260. package/menu/index.js +8 -0
  261. package/{mergeProps-C1U1OIeJ.js → mergeProps-BSsN7Bgk.js} +36 -34
  262. package/mergeProps-JhcJ7uJL.cjs +1 -0
  263. package/modal/index.cjs +1 -1
  264. package/modal/index.js +2 -2
  265. package/package.json +9 -4
  266. package/popover/index.cjs +1 -1
  267. package/popover/index.js +1 -1
  268. package/progress-bar/index.cjs +1 -1
  269. package/progress-bar/index.js +1 -1
  270. package/radio/index.cjs +1 -1
  271. package/radio/index.js +1 -1
  272. package/search-field/index.cjs +1 -1
  273. package/search-field/index.js +1 -1
  274. package/select/Select.d.ts +1 -1
  275. package/select/index.cjs +1 -1
  276. package/select/index.d.ts +1 -1
  277. package/select/index.js +1 -1
  278. package/select/types.d.ts +1 -13
  279. package/skeleton/index.cjs +1 -1
  280. package/skeleton/index.js +1 -1
  281. package/spinner/index.cjs +1 -1
  282. package/spinner/index.js +1 -1
  283. package/table/Table.d.ts +7 -12
  284. package/table/index.cjs +1 -1
  285. package/table/index.js +1 -1
  286. package/tabs/Tabs.d.ts +0 -12
  287. package/tabs/index.cjs +1 -1
  288. package/tabs/index.js +1 -1
  289. package/tag/Tag.d.ts +2 -1
  290. package/tag/index.cjs +1 -1
  291. package/tag/index.js +1 -1
  292. package/text/index.cjs +1 -1
  293. package/text/index.js +1 -1
  294. package/textfield/Input.d.ts +7 -2
  295. package/textfield/PasswordField.d.ts +1 -1
  296. package/textfield/index.cjs +1 -1
  297. package/textfield/index.js +1 -1
  298. package/theme/generated-object.d.ts +384 -0
  299. package/theme/generated-tokens.d.ts +334 -0
  300. package/theme/index.cjs +1 -1
  301. package/theme/index.d.ts +39 -12
  302. package/theme/index.js +4037 -13
  303. package/theme/tokens.d.ts +65 -18
  304. package/toast/Toast.d.ts +2 -1
  305. package/toast/index.cjs +1 -1
  306. package/toast/index.js +1 -1
  307. package/toggle-button/index.cjs +1 -1
  308. package/toggle-button/index.js +1 -1
  309. package/tokens-B3FfJ-rY.cjs +1 -0
  310. package/{tokens-CqvelUoA.js → tokens-B9ooUP4g.js} +69 -32
  311. package/tooltip/index.cjs +1 -1
  312. package/tooltip/index.js +1 -1
  313. package/useButton-D6iUB8cN.js +56 -0
  314. package/useButton-R8-i3HLC.cjs +1 -0
  315. package/useDateFormatter-2B0vgHc-.cjs +1 -0
  316. package/{useDateFormatter-C7BJgoDR.js → useDateFormatter-BJ1ZyaH1.js} +431 -407
  317. package/{useDescription-DYfKjGGU.js → useDescription-BLmIkYCq.js} +1 -1
  318. package/{useDescription-CPo72trh.cjs → useDescription-BMuiAqI5.cjs} +1 -1
  319. package/{useEvent-DPxMu-X9.cjs → useEvent-3ZO5TPSH.cjs} +1 -1
  320. package/{useEvent-CigwyJOw.js → useEvent-DpBHTuHJ.js} +1 -1
  321. package/{useField-CefQB81E.js → useField-BMegM8fA.js} +2 -2
  322. package/{useField-D1UkzeaI.cjs → useField-DyeD7MLj.cjs} +1 -1
  323. package/{useFilter-DsOxD9JB.js → useFilter-BFnSe_Eq.js} +1 -1
  324. package/{useFilter-BhM2yVO3.cjs → useFilter-aoggM85n.cjs} +1 -1
  325. package/{useFocusRing-B-A1OLhU.cjs → useFocusRing-BcbYske2.cjs} +1 -1
  326. package/{useFocusRing-DOfBqnUN.js → useFocusRing-DMo8ctYV.js} +2 -2
  327. package/{useFocusWithin-T1ifEM_s.js → useFocusWithin-ClMkhYcq.js} +1 -1
  328. package/{useFocusWithin-CG8mAt2D.cjs → useFocusWithin-DTnk0e8a.cjs} +1 -1
  329. package/{useFocusable-D7I1ujkW.cjs → useFocusable-CsG-IPuC.cjs} +1 -1
  330. package/{useFocusable-BjE42axF.js → useFocusable-DXlMChFC.js} +4 -4
  331. package/useFormValidation-BQIRxgbU.cjs +1 -0
  332. package/useFormValidation-L0UHvOsP.js +217 -0
  333. package/{useHasTabbableChild-BgEe5J35.js → useHasTabbableChild-BDaxMsGu.js} +2 -2
  334. package/{useHasTabbableChild-CoQRpNbC.cjs → useHasTabbableChild-CJcLnolh.cjs} +1 -1
  335. package/{useHighlightSelectionDescription-xr_16pKd.js → useHighlightSelectionDescription-BkEv9Jye.js} +4 -4
  336. package/{useHighlightSelectionDescription-DmbDkFGY.cjs → useHighlightSelectionDescription-CQaG611l.cjs} +1 -1
  337. package/{useHover-DQvJ3Y-W.js → useHover-D6bNIkU0.js} +76 -74
  338. package/useHover-DGAmG7jt.cjs +1 -0
  339. package/{useLabels-CSU0kbtJ.cjs → useLabels-CvUk-yS3.cjs} +1 -1
  340. package/{useLabels-LrKQiY11.js → useLabels-Kmq5JCp_.js} +1 -1
  341. package/useListState-D2IEg6_e.cjs +1 -0
  342. package/{useListState-B3c3xcNW.js → useListState-pixYqSLl.js} +43 -42
  343. package/usePress-CicXV7UO.cjs +7 -0
  344. package/{usePress-BW47IcyU.js → usePress-DMUpU0GU.js} +153 -149
  345. package/{useSingleSelectListState-DdBsBWKG.js → useSingleSelectListState-BlvpP8y-.js} +1 -1
  346. package/{useSingleSelectListState-DlO5H9N-.cjs → useSingleSelectListState-CwWK_Dx2.cjs} +1 -1
  347. package/{useTextField-DjxayZsV.js → useTextField-BC5X_AO_.js} +30 -27
  348. package/useTextField-Cxpfu0U3.cjs +1 -0
  349. package/useToggleState-BVOqL4hI.js +21 -0
  350. package/useToggleState-SqDyNfRi.cjs +1 -0
  351. package/utils/types.d.ts +4 -0
  352. package/{utils-DHNZrQmj.cjs → utils-CMHKYKlz.cjs} +1 -1
  353. package/{utils-KLjWgdLR.js → utils-Cpcjg55U.js} +1 -1
  354. package/utils-DFIwp4PB.js +262 -0
  355. package/utils-__vrf9VZ.cjs +1 -0
  356. package/AccordionItem-BPOQqTkQ.js +0 -323
  357. package/AccordionItem-CS-QKqrU.cjs +0 -1
  358. package/BadgeContainer-CKBIZWsc.js +0 -37
  359. package/Breadcrumbs-BBzSV4SK.js +0 -262
  360. package/Breadcrumbs-CFUryOhf.cjs +0 -1
  361. package/Button-DExMoP5f.cjs +0 -1
  362. package/Button.module-D-mPLRxe.js +0 -14
  363. package/Button.module-goCEz5qs.cjs +0 -1
  364. package/ButtonGroup-DUqW5dzM.cjs +0 -1
  365. package/Card-BRs1FKX5.js +0 -131
  366. package/Card-cdL5669N.cjs +0 -1
  367. package/Checkbox-Co3h0hur.cjs +0 -1
  368. package/Checkbox-EB_SCBEo.js +0 -264
  369. package/CheckboxGroup-CT_eqERw.cjs +0 -1
  370. package/CheckboxGroup-DvrN1oyw.js +0 -159
  371. package/Collection-BtBX5IMY.cjs +0 -1
  372. package/Collection-D2jVTmDW.js +0 -577
  373. package/ComboBox-D_jh7TKo.cjs +0 -1
  374. package/DateField-BURrxhil.cjs +0 -1
  375. package/DateField-DKCbEonm.js +0 -47
  376. package/DateInputDivider-ToFY-yjB.cjs +0 -1
  377. package/DateRangePicker-B5vx9onl.js +0 -870
  378. package/DateRangePicker-DkIAEIIj.cjs +0 -6
  379. package/Dialog-CxHiZorC.cjs +0 -1
  380. package/Dialog-D5c_dUnB.js +0 -1611
  381. package/Dialog-DtHk3eXI.cjs +0 -1
  382. package/Dialog-DuGcBeNN.js +0 -212
  383. package/DragAndDrop-CSg60YQE.cjs +0 -1
  384. package/DragAndDrop-DOXLfJaA.js +0 -60
  385. package/Dropdown-CYakzdJg.cjs +0 -6
  386. package/FieldError-Bv3Q6ZP-.cjs +0 -1
  387. package/FocusScope-vcXLOQiu.cjs +0 -1
  388. package/Grid-DVQtOcu9.cjs +0 -1
  389. package/GridItem-DlbSdRmB.js +0 -246
  390. package/GridItem-XgHmZWXY.cjs +0 -1
  391. package/Heading-CKTR4sOz.cjs +0 -1
  392. package/Heading-D2y_kiC0.js +0 -46
  393. package/InfoBanner-CzwbOdRG.cjs +0 -1
  394. package/InfoBanner-D05poAe3.js +0 -91
  395. package/Label-ChjDdBlv.cjs +0 -1
  396. package/Layout-D0E1fOgZ.cjs +0 -16
  397. package/Layout-DtyhUz-G.js +0 -498
  398. package/Link-CibH8uRY.js +0 -72
  399. package/Link-CidjjqHb.cjs +0 -1
  400. package/Link-ESjrl63P.cjs +0 -6
  401. package/LinkButton-B6AWNiRn.cjs +0 -6
  402. package/LinkButton-BkZULm2a.js +0 -69
  403. package/ListBox-B0E1hdEt.cjs +0 -1
  404. package/ListBox-Djy7244v.js +0 -531
  405. package/ListBoxButton-CIqNRR3y.cjs +0 -1
  406. package/ListBoxButton-sqirI6I4.js +0 -15
  407. package/ListBoxSection-BYJccE4T.cjs +0 -1
  408. package/ListBoxSection-Cicbu8pS.js +0 -1058
  409. package/ListKeyboardDelegate-ZKBk2IId.cjs +0 -1
  410. package/OverlayArrow-DB_aVTVM.js +0 -507
  411. package/OverlayArrow-DpZ1FqOd.cjs +0 -1
  412. package/ProgressBar-ClysdvqU.cjs +0 -1
  413. package/ProgressBar-DTn23Zkr.js +0 -53
  414. package/Radio-CCN3o3s-.js +0 -313
  415. package/Radio-Cz0vLIBw.cjs +0 -1
  416. package/RangeCalendar-BY82hPRu.cjs +0 -11
  417. package/Select-MwvnbChP.js +0 -664
  418. package/Select-lhIwwJL7.cjs +0 -1
  419. package/SelectionManager-BJjqIWtf.cjs +0 -1
  420. package/Separator-DPLEx950.cjs +0 -1
  421. package/Separator-DvvVAypT.js +0 -59
  422. package/Skeleton-BAwbfKBW.cjs +0 -1
  423. package/Skeleton-BePDRmrO.js +0 -40
  424. package/Spinner-VSyPhiJ9.js +0 -51
  425. package/Spinner-vof0Y9Hh.cjs +0 -6
  426. package/TabList-CWMlbijV.cjs +0 -1
  427. package/TabList-VpTv_Xff.js +0 -435
  428. package/Table-DGYC-sDq.cjs +0 -16
  429. package/Tag-bYq-wf5D.cjs +0 -1
  430. package/Tag-rI-NhuT0.js +0 -748
  431. package/Text-BPcfhYQ9.js +0 -32
  432. package/Text-DBHWi5gA.cjs +0 -1
  433. package/TextArea-CrEALC58.js +0 -119
  434. package/TextArea-DJKHFKuI.cjs +0 -1
  435. package/TextField-BAX93sq7.cjs +0 -1
  436. package/TextField-Dma22dnD.js +0 -120
  437. package/TextField.module-BcpPBWnD.js +0 -13
  438. package/TextField.module-Dw5Rtn9y.cjs +0 -1
  439. package/Toast-DdmSvNaO.cjs +0 -1
  440. package/ToggleButtonGroup-98z8Dw8-.js +0 -211
  441. package/ToggleButtonGroup-DZ_wo0qx.cjs +0 -1
  442. package/Tooltip-DjNc93tV.js +0 -285
  443. package/Tooltip-pN5W3IK6.cjs +0 -1
  444. package/circle-check-BErh6TKu.js +0 -26
  445. package/circle-check-OVUGxwp9.cjs +0 -11
  446. package/filterDOMProps-BS2lrgFA.cjs +0 -1
  447. package/filterDOMProps-D6KHYVBX.js +0 -24
  448. package/index-Dsz3aiWt.cjs +0 -17
  449. package/mergeProps-B5KXZAI3.cjs +0 -1
  450. package/tokens-5PzK5zK7.cjs +0 -1
  451. package/triangle-alert-B_qAPmWC.js +0 -21
  452. package/triangle-alert-BviJNFjf.cjs +0 -6
  453. package/useButton-BoIV3kDJ.js +0 -47
  454. package/useButton-D60q0SQw.cjs +0 -1
  455. package/useDateFormatter-BJBt0jk_.cjs +0 -1
  456. package/useFormValidation-BlFGdPZB.cjs +0 -1
  457. package/useFormValidation-BzzruZKm.js +0 -215
  458. package/useHover-BE_XKZKe.cjs +0 -1
  459. package/useListState-wLau6fXo.cjs +0 -1
  460. package/usePress-BooY_CAy.cjs +0 -7
  461. package/useTextField-DnRrCg5o.cjs +0 -1
  462. package/useToggleState-Bz5rAf4C.js +0 -18
  463. package/useToggleState-DoIkSQdj.cjs +0 -1
  464. package/utils-CoCR_Fce.js +0 -234
  465. package/utils-Dvdohqm9.cjs +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,117 @@
1
+ ## 12.1.0 (2025-09-10)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **menu:** new Menu component ([#744](https://github.com/migrationsverket/midas/pull/744))
6
+ - **combobox:** add loading indicator ([#772](https://github.com/migrationsverket/midas/pull/772), [#712](https://github.com/migrationsverket/midas/issues/712))
7
+
8
+ ### 🩹 Fixes
9
+
10
+ - repair broken tokens ([e905bbf788](https://github.com/migrationsverket/midas/commit/e905bbf788))
11
+ - **select:** minor screen reader announcement bugs ([#775](https://github.com/migrationsverket/midas/pull/775))
12
+ - **accordion:** add margin for focus indicator ([#780](https://github.com/migrationsverket/midas/pull/780))
13
+ - broken tokens ([#782](https://github.com/migrationsverket/midas/pull/782))
14
+ - **layout:** add basepath to active link comparison ([4dec0a45ef](https://github.com/migrationsverket/midas/commit/4dec0a45ef))
15
+ - **badge:** change background color in dark mode ([f40f2dad67](https://github.com/migrationsverket/midas/commit/f40f2dad67))
16
+ - **select:** add aria label to checkbox ([e6cb387a7f](https://github.com/migrationsverket/midas/commit/e6cb387a7f))
17
+ - **components:** export missing listbox types from component lib ([1f06b98610](https://github.com/migrationsverket/midas/commit/1f06b98610))
18
+ - **textfield:** remove duplicate props spreading ([#769](https://github.com/migrationsverket/midas/pull/769))
19
+ - **textfield:** make textarea resizable and remove size from controls storybook ([6d04e25308](https://github.com/migrationsverket/midas/commit/6d04e25308))
20
+
21
+ ### 💅 Refactors
22
+
23
+ - rename variables in \*.module.css ([42329bde56](https://github.com/migrationsverket/midas/commit/42329bde56))
24
+ - Migrate CSS custom properties from tokens.css to theme.css ([8a21fe5783](https://github.com/migrationsverket/midas/commit/8a21fe5783))
25
+
26
+ ### 📖 Documentation changes
27
+
28
+ - update tokens page with headers and remove tokens from list that are only refs ([ded9bfa8c7](https://github.com/migrationsverket/midas/commit/ded9bfa8c7))
29
+
30
+ ### 🔧 Maintenance
31
+
32
+ - **deps:** bump vite in the npm_and_yarn group across 1 directory ([7758e60274](https://github.com/migrationsverket/midas/commit/7758e60274))
33
+ - add css variable linting ([c39e488881](https://github.com/migrationsverket/midas/commit/c39e488881))
34
+ - add dummy comment ([0c12e51cec](https://github.com/migrationsverket/midas/commit/0c12e51cec))
35
+ - move sd config into components package ([4e61ffb05b](https://github.com/migrationsverket/midas/commit/4e61ffb05b))
36
+ - replace rgba() with hex color ([c03b3a7737](https://github.com/migrationsverket/midas/commit/c03b3a7737))
37
+ - set proper object relationship `white: {base: {$value: ...` ([a60bd1643e](https://github.com/migrationsverket/midas/commit/a60bd1643e))
38
+ - add comments to deprecations in tokens.ts ([1adf6a5ffa](https://github.com/migrationsverket/midas/commit/1adf6a5ffa))
39
+ - fix incorrect color generation for nested light-dark ([83b80912f9](https://github.com/migrationsverket/midas/commit/83b80912f9))
40
+ - deprecate tokens.ts and add a warning text to relevant docs ([3025708cc3](https://github.com/migrationsverket/midas/commit/3025708cc3))
41
+ - fix additional `base` variables ([f698b08f8f](https://github.com/migrationsverket/midas/commit/f698b08f8f))
42
+ - replace `@` with `base`, additional cleanup ([2c6bf1e35a](https://github.com/migrationsverket/midas/commit/2c6bf1e35a))
43
+ - correct badge style fixes ([dc8555d733](https://github.com/migrationsverket/midas/commit/dc8555d733))
44
+ - update new badge colors ([f287e78fab](https://github.com/migrationsverket/midas/commit/f287e78fab))
45
+ - add types to generated tokens ([ba3749bd68](https://github.com/migrationsverket/midas/commit/ba3749bd68))
46
+ - temporarily allow js to get a successful build ([2615fe4c40](https://github.com/migrationsverket/midas/commit/2615fe4c40))
47
+ - ignore variables.css in stylelint ([859dbfbd75](https://github.com/migrationsverket/midas/commit/859dbfbd75))
48
+ - start working on docs ([551e825e38](https://github.com/migrationsverket/midas/commit/551e825e38))
49
+ - clean and update style dictionary script ([4a9423ddb6](https://github.com/migrationsverket/midas/commit/4a9423ddb6))
50
+ - remove theme.css generator ([75adb9e1d5](https://github.com/migrationsverket/midas/commit/75adb9e1d5))
51
+ - rename custom css properties ([aa3eddcef9](https://github.com/migrationsverket/midas/commit/aa3eddcef9))
52
+ - update sd build script ([0b9eb9955e](https://github.com/migrationsverket/midas/commit/0b9eb9955e))
53
+ - add basic config and json input for style dictionary ([6af3212a6a](https://github.com/migrationsverket/midas/commit/6af3212a6a))
54
+ - **deps:** bump the npm_and_yarn group across 1 directory with 4 updates ([67b2b595a1](https://github.com/migrationsverket/midas/commit/67b2b595a1))
55
+ - relax stylelint config to allow media query syntax ([5b6955e604](https://github.com/migrationsverket/midas/commit/5b6955e604))
56
+ - remove check-values-import.js since it is no longer applicable ([f4c3ee95a4](https://github.com/migrationsverket/midas/commit/f4c3ee95a4))
57
+ - create separate storybook configs for serve and build ([642e155d8a](https://github.com/migrationsverket/midas/commit/642e155d8a))
58
+ - update dependencies ([#751](https://github.com/migrationsverket/midas/pull/751))
59
+
60
+ ### 🧪 Tests updated
61
+
62
+ - **table:** add a11y test with links in a striped table ([f3cd83cee2](https://github.com/migrationsverket/midas/commit/f3cd83cee2))
63
+ - **table:** remove flaky test ([9b309c1ade](https://github.com/migrationsverket/midas/commit/9b309c1ade))
64
+ - **tag:** add textValue to mute console.warn ([d5d68e4363](https://github.com/migrationsverket/midas/commit/d5d68e4363))
65
+
66
+ # 12.0.0 (2025-08-27)
67
+
68
+ ### 🚀 Features
69
+
70
+ - **info-banner:** add controlled state ([#754](https://github.com/migrationsverket/midas/pull/754))
71
+ - **modal:** change title to `h2`, remove margin and center vertically ([400b06702a](https://github.com/migrationsverket/midas/commit/400b06702a))
72
+ - **modal:** move modal title to the header ([4889b827d4](https://github.com/migrationsverket/midas/commit/4889b827d4))
73
+ - **theme:** Implement dynamic theme generation and CSS validation ([f50ee50a5b](https://github.com/migrationsverket/midas/commit/f50ee50a5b))
74
+ - ⚠️ Automate ESLint versioning and remove deprecated features ([577253d5bb](https://github.com/migrationsverket/midas/commit/577253d5bb))
75
+ - **dropdown:** add custom icon support ([6d34b3061a](https://github.com/migrationsverket/midas/commit/6d34b3061a))
76
+ - ⚠️ **components:** change feedback status icons to consistent pattern ([8075adb685](https://github.com/migrationsverket/midas/commit/8075adb685))
77
+ - **accordion:** add option to display more statuses ([3eb637fc17](https://github.com/migrationsverket/midas/commit/3eb637fc17))
78
+ - **table:** add virtualizer recipe ([#736](https://github.com/migrationsverket/midas/pull/736))
79
+
80
+ ### 🩹 Fixes
81
+
82
+ - **badge:** replace label color ([cfda450f4e](https://github.com/migrationsverket/midas/commit/cfda450f4e))
83
+ - **date-picker:** remove explicit height for calendar button ([3fe21636ea](https://github.com/migrationsverket/midas/commit/3fe21636ea))
84
+
85
+ ### 💅 Refactors
86
+
87
+ - extract `FeedbackStatus` type ([8396c9e628](https://github.com/migrationsverket/midas/commit/8396c9e628))
88
+
89
+ ### 🔧 Maintenance
90
+
91
+ - **theme:** export css variables in theme.css from @midas-ds/components package ([f9eddbf186](https://github.com/migrationsverket/midas/commit/f9eddbf186))
92
+ - remove storybook global size control ([#749](https://github.com/migrationsverket/midas/pull/749))
93
+ - deploy docweb from dev branch ([80f58e46d2](https://github.com/migrationsverket/midas/commit/80f58e46d2))
94
+
95
+ ### 🧪 Tests updated
96
+
97
+ - **button:** move interaction tests to a separate story ([9dfd1459cd](https://github.com/migrationsverket/midas/commit/9dfd1459cd))
98
+ - **link-button:** remove a11y test bypass ([a059db212a](https://github.com/migrationsverket/midas/commit/a059db212a))
99
+ - **search-field:** remove global size ([#759](https://github.com/migrationsverket/midas/pull/759))
100
+ - remove size test from button linkButton and table ([48a26e096e](https://github.com/migrationsverket/midas/commit/48a26e096e))
101
+ - **badge:** bypass a11y tests ([626ceaf98c](https://github.com/migrationsverket/midas/commit/626ceaf98c))
102
+ - **badge:** fix failing test in dark mode ([d91b690316](https://github.com/migrationsverket/midas/commit/d91b690316))
103
+ - **link-button:** bypass a11y test ([ad33fbfd58](https://github.com/migrationsverket/midas/commit/ad33fbfd58))
104
+ - emulate media in prepare test hook ([e4060227d4](https://github.com/migrationsverket/midas/commit/e4060227d4))
105
+
106
+ ### ⏪ Revert
107
+
108
+ - **theme:** Revert "fix(theme): change dark mode values for danger button" ([6cb506566e](https://github.com/migrationsverket/midas/commit/6cb506566e))
109
+
110
+ ### ⚠️ Breaking Changes
111
+
112
+ - ⚠️ Automate ESLint versioning and remove deprecated features ([577253d5bb](https://github.com/migrationsverket/midas/commit/577253d5bb))
113
+ - **components:** when using `type` (`'success'|'info'|'warning'|'important'`) the string `default` is
114
+
1
115
  ## 11.2.0 (2025-08-14)
2
116
 
3
117
  ### 🚀 Features
@@ -0,0 +1,131 @@
1
+ import { jsx as r, jsxs as l } from "react/jsx-runtime";
2
+ import { c as n } from "./clsx-OuTLNxxd.js";
3
+ import * as e from "react";
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 as x } from "./arrow-right-uemUGIg8.js";
8
+ import './assets/Card.css';const A = "_card_1tcxj_4", h = "_horizontal_1tcxj_10", I = "_cardLink_1tcxj_15", p = "_cardContent_1tcxj_20", u = "_cardActions_1tcxj_39", f = "_cardActionArea_1tcxj_49", z = "_cardImage_1tcxj_82", j = "_cardLinkIcon_1tcxj_114", o = {
9
+ card: A,
10
+ horizontal: h,
11
+ cardLink: I,
12
+ cardContent: p,
13
+ cardActions: u,
14
+ cardActionArea: f,
15
+ cardImage: z,
16
+ cardLinkIcon: j
17
+ }, d = e.createContext({
18
+ horizontal: void 0,
19
+ titleId: void 0
20
+ }), y = ({
21
+ horizontal: a,
22
+ className: c,
23
+ children: t,
24
+ ...s
25
+ }) => {
26
+ const i = `card-title-${e.useId()}`;
27
+ return /* @__PURE__ */ r(d.Provider, { value: { horizontal: a, titleId: i }, children: /* @__PURE__ */ r(
28
+ "div",
29
+ {
30
+ ...s,
31
+ className: n(
32
+ o.card,
33
+ a && o.horizontal,
34
+ c
35
+ ),
36
+ children: t
37
+ }
38
+ ) });
39
+ }, H = ({
40
+ children: a,
41
+ ...c
42
+ }) => {
43
+ const { horizontal: t } = e.useContext(d);
44
+ return /* @__PURE__ */ r(
45
+ "div",
46
+ {
47
+ ...c,
48
+ className: n(o.cardContent, t && o.horizontal),
49
+ children: a
50
+ }
51
+ );
52
+ }, R = ({
53
+ elementType: a = "h2",
54
+ children: c
55
+ }) => {
56
+ const { horizontal: t, titleId: s } = e.useContext(d);
57
+ return /* @__PURE__ */ r(
58
+ m,
59
+ {
60
+ level: t ? 5 : 3,
61
+ elementType: a,
62
+ isExpressive: t,
63
+ className: n(o.cardTitle, t && o.horizontal),
64
+ id: s,
65
+ children: c
66
+ }
67
+ );
68
+ }, T = ({
69
+ children: a,
70
+ ...c
71
+ }) => {
72
+ const { horizontal: t } = e.useContext(d);
73
+ return /* @__PURE__ */ r(
74
+ "div",
75
+ {
76
+ ...c,
77
+ className: n(o.cardActions, t && o.horizontal),
78
+ children: a
79
+ }
80
+ );
81
+ }, w = ({ children: a, className: c, ...t }) => {
82
+ const { titleId: s } = e.useContext(d);
83
+ return /* @__PURE__ */ r(
84
+ _,
85
+ {
86
+ ...t,
87
+ "aria-labelledby": s,
88
+ className: n(o.cardActionArea, c),
89
+ children: a
90
+ }
91
+ );
92
+ }, E = ({
93
+ as: a = "img",
94
+ className: c,
95
+ ...t
96
+ }) => /* @__PURE__ */ r(
97
+ a,
98
+ {
99
+ ...t,
100
+ className: n(o.cardImage, c)
101
+ }
102
+ ), P = ({
103
+ children: a,
104
+ as: c,
105
+ ...t
106
+ }) => /* @__PURE__ */ l(
107
+ c || C,
108
+ {
109
+ ...t,
110
+ className: n(o.cardLink, t.className),
111
+ children: [
112
+ a,
113
+ /* @__PURE__ */ r(
114
+ x,
115
+ {
116
+ className: o.cardLinkIcon,
117
+ size: 24
118
+ }
119
+ )
120
+ ]
121
+ }
122
+ );
123
+ export {
124
+ y as C,
125
+ H as a,
126
+ R as b,
127
+ T as c,
128
+ w as d,
129
+ E as e,
130
+ P as f
131
+ };
@@ -0,0 +1 @@
1
+ "use strict";require('./assets/Card.css');const a=require("react/jsx-runtime"),o=require("./clsx-C11secjj.cjs"),l=require("react"),x=require("./Heading-D3FR_KXb.cjs"),u=require("./Button-CMIbSc4-.cjs"),C=require("./Link-wM7cVPlS.cjs"),_=require("./arrow-right-BGd86zzR.cjs");function j(c){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const t in c)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(c,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>c[t]})}}return e.default=c,Object.freeze(e)}const s=j(l),m="_card_1tcxj_4",A="_horizontal_1tcxj_10",g="_cardLink_1tcxj_15",h="_cardContent_1tcxj_20",I="_cardActions_1tcxj_39",b="_cardActionArea_1tcxj_49",f="_cardImage_1tcxj_82",k="_cardLinkIcon_1tcxj_114",n={card:m,horizontal:A,cardLink:g,cardContent:h,cardActions:I,cardActionArea:b,cardImage:f,cardLinkIcon:k},i=s.createContext({horizontal:void 0,titleId:void 0}),z=({horizontal:c,className:e,children:t,...r})=>{const d=`card-title-${s.useId()}`;return a.jsx(i.Provider,{value:{horizontal:c,titleId:d},children:a.jsx("div",{...r,className:o.clsx(n.card,c&&n.horizontal,e),children:t})})},L=({children:c,...e})=>{const{horizontal:t}=s.useContext(i);return a.jsx("div",{...e,className:o.clsx(n.cardContent,t&&n.horizontal),children:c})},p=({elementType:c="h2",children:e})=>{const{horizontal:t,titleId:r}=s.useContext(i);return a.jsx(x.Heading,{level:t?5:3,elementType:c,isExpressive:t,className:o.clsx(n.cardTitle,t&&n.horizontal),id:r,children:e})},v=({children:c,...e})=>{const{horizontal:t}=s.useContext(i);return a.jsx("div",{...e,className:o.clsx(n.cardActions,t&&n.horizontal),children:c})},N=({children:c,className:e,...t})=>{const{titleId:r}=s.useContext(i);return a.jsx(u.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,{...t,"aria-labelledby":r,className:o.clsx(n.cardActionArea,e),children:c})},q=({as:c="img",className:e,...t})=>a.jsx(c,{...t,className:o.clsx(n.cardImage,e)}),$=({children:c,as:e,...t})=>{const r=e||C.$4f118338184dc1d9$export$a6c7ac8248d6e38a;return a.jsxs(r,{...t,className:o.clsx(n.cardLink,t.className),children:[c,a.jsx(_.ArrowRight,{className:n.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-DHNZrQmj.cjs"),d=require("./Input-MJji5hhq.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),h="_characterCounter_4224k_4",b={characterCounter:h},g=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=g;
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;
@@ -1,18 +1,18 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import * as d from "react";
3
- import { $ as f } from "./utils-KLjWgdLR.js";
4
- import { $ as i } from "./Input-n-Z20KbW.js";
5
- import './assets/CharacterCounter.css';const m = "_characterCounter_4224k_4", $ = {
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
6
  characterCounter: m
7
- }, l = d.forwardRef((t, c) => {
8
- [t] = f(t, c, i);
9
- const { maxLength: r, value: e, isLonely: n } = t, { length: a } = (e == null ? void 0 : e.toString()) ?? "", o = r !== void 0;
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
10
  return /* @__PURE__ */ s(
11
11
  "span",
12
12
  {
13
13
  className: $.characterCounter,
14
14
  "data-exceeded": o && a > r || void 0,
15
- "data-lonely": n || void 0,
15
+ "data-lonely": c || void 0,
16
16
  children: o ? `${a} / ${r}` : a
17
17
  }
18
18
  );
@@ -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 I } 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: g } = 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: G, isPressed: N } = I({
23
+ onPressStart: h,
24
+ onPressEnd: P,
25
+ onPressChange: f,
26
+ onPress: u,
27
+ onPressUp: r,
28
+ onClick: g,
29
+ isDisabled: d
30
+ }), { pressProps: L, isPressed: U } = I({
31
+ onPressStart: h,
32
+ onPressEnd: P,
33
+ onPressChange: f,
34
+ onPressUp: r,
35
+ onClick: g,
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: j } = ae(e, i), A = y(G, j), M = ee(e, {
42
+ labelable: !0
43
+ });
44
+ return X(i, a.defaultSelected, a.setSelected), {
45
+ labelProps: y(L, {
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: N || U,
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 } = I({
84
+ isDisabled: b || m,
85
+ onPress() {
86
+ let { [_]: r } = e, { commitValidation: g } = r || d;
87
+ g();
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_1a9gx_4", re = "_checkbox_1a9gx_4", ce = "_checkboxGroup_1a9gx_124", 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 = I({
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 r=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"),R=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"),O=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:o,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=g=>{g.stopPropagation(),i.setSelected(g.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(g){var S;u==null||u(g),i.toggle(),(S=a.current)===null||S===void 0||S.focus()},isDisabled:d||n}),{focusableProps:U}=K.$f645667febf57a63$export$4c014de7c8940b4c(e,a),A=R.$3ef42575df84b30b$export$9d1611c77c2fe928(F,U),H=J.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0});return m.$99facab73266f662$export$5add1d006293d136(a,i.defaultSelected,i.setSelected),{labelProps:R.$3ef42575df84b30b$export$9d1611c77c2fe928(M,{onClick:g=>g.preventDefault()}),inputProps:R.$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:o,form:l,type:"checkbox",...A}),isSelected:i.isSelected,isPressed:N||L,isDisabled:d,isReadOnly:n,isInvalid:$||v==="invalid"}}function _(e,i,a){let d=m.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:i.isSelected}),{isInvalid:n,validationErrors:s,validationDetails:o}=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:R.$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:o}}const j=new WeakMap;function ee(e,i,a){const d=O.$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:o,errorMessageId:l,validationBehavior:t}=j.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=_({...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,o].filter(Boolean).join(" ")||void 0}}}const B=k.createContext(null),ie="_checkboxInner_1a9gx_4",ae="_checkbox_1a9gx_4",de="_checkboxGroup_1a9gx_124",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:o,isFocusVisible:l,focusProps:t}=e.focusRingAria;return r.jsxs("label",{ref:i,...R.$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":o||void 0,"data-focus-visible":l||void 0,"data-required":e.isRequired||void 0,children:[r.jsx("div",{className:D.clsx(V.checkboxInner),children:r.jsx("svg",{width:16,height:16,viewBox:"0 0 18 18","aria-hidden":"true",children:e.isIndeterminate?r.jsx("rect",{x:4,y:8,width:10,height:2}):r.jsx("polyline",{points:"3,9 7,13 15,4"})})}),r.jsx(W.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:r.jsx("input",{...R.$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 r.jsx(p,{...e,...a,ref:i})}),te=y.forwardRef((e,i)=>{const a=_(e,O.$3017fa7ffdddec74$export$8042c6c013fd5226(e),e.inputRef);return r.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),o=Q.$6179b936705e76d3$export$ae780daf29e6d456(e),l=C.$f6c31cce2adf654f$export$45712eceda6fad21({ref:i,isDisabled:e.isDisabled}),t=X.$f7dceffc5ad7768b$export$4e328f61c538687f();return n?r.jsx(ne,{...e,state:n,inputRef:s,hoverResult:o,pressResult:l,focusRingAria:t,validationBehavior:d}):r.jsx(te,{...e,inputRef:s,hoverResult:o,pressResult:l,focusRingAria:t,validationBehavior:d})});exports.$1ae600c947479353$export$ec98120685d4f57d=j;exports.Checkbox=se;exports.CheckboxGroupContext=B;exports.styles=V;
@@ -0,0 +1 @@
1
+ "use strict";const s=require("react/jsx-runtime"),m=require("./Label-C00qz3kQ.cjs"),C=require("./Text-BAFsaON-.cjs"),$=require("react"),h=require("./Checkbox-CvdIG43J.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=_;