@midas-ds/components 10.1.0 → 10.2.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 (401) hide show
  1. package/AccordionItem-DZT76sWu.js +320 -0
  2. package/AccordionItem-Z_c9MpAM.cjs +1 -0
  3. package/BadgeContainer-D3RtqcPF.js +37 -0
  4. package/BadgeContainer-DeUgqGqb.cjs +1 -0
  5. package/Breadcrumbs-CmZXtTiS.js +250 -0
  6. package/Breadcrumbs-Cx09jwZZ.cjs +1 -0
  7. package/Button-CbFRzRrF.js +38 -0
  8. package/Button-DnhqHU01.cjs +1 -0
  9. package/Button-ZOQy9Ivu.js +78 -0
  10. package/Button-iSiWjocA.cjs +1 -0
  11. package/Button.module-CMMhIrkn.js +14 -0
  12. package/Button.module-DO5s9hOk.cjs +1 -0
  13. package/ButtonGroup-DUqW5dzM.cjs +1 -0
  14. package/ButtonGroup-DvVvear6.js +22 -0
  15. package/CHANGELOG.md +81 -0
  16. package/Card-C0BFW3wJ.cjs +1 -0
  17. package/Card-CaKKKv9k.js +131 -0
  18. package/CharacterCounter-CPGdboVJ.js +22 -0
  19. package/CharacterCounter-CrY8QRuY.cjs +1 -0
  20. package/Checkbox-CvFsn_FL.js +380 -0
  21. package/Checkbox-DSxGAJX2.cjs +1 -0
  22. package/CheckboxGroup-Bk9DPq4I.cjs +1 -0
  23. package/CheckboxGroup-Dij9zKlF.js +54 -0
  24. package/Collection-C5ONNBqd.js +576 -0
  25. package/Collection-Csx3L9gh.cjs +1 -0
  26. package/ColorSchemeSwitch-CbAWIJCg.js +106 -0
  27. package/ColorSchemeSwitch-JRrCyYVv.cjs +16 -0
  28. package/ComboBox-BCaqPEIH.js +1375 -0
  29. package/ComboBox-gveQKHU3.cjs +1 -0
  30. package/DateField-CAQlzuDD.js +46 -0
  31. package/DateField-deVVFwKA.cjs +1 -0
  32. package/DateInputDivider-DnUxETEC.cjs +1 -0
  33. package/DateInputDivider-Dx8n1Lxp.js +2908 -0
  34. package/DateRangePicker-BmBvwqo6.js +881 -0
  35. package/DateRangePicker-BzfitoK0.cjs +6 -0
  36. package/Dialog-Bd5hK360.cjs +1 -0
  37. package/Dialog-Bxx8cBEq.js +208 -0
  38. package/Dialog-CYxThuMl.js +1609 -0
  39. package/Dialog-CwTEAujZ.cjs +1 -0
  40. package/DragAndDrop-CSwmPhxC.js +60 -0
  41. package/DragAndDrop-HvycSrKY.cjs +1 -0
  42. package/Dropdown-CaGon9OR.cjs +6 -0
  43. package/Dropdown-nkjzsVYX.js +84 -0
  44. package/FieldError-BZw8UzBk.cjs +1 -0
  45. package/FieldError-CZikNDxX.js +28 -0
  46. package/FieldError-DqdfJ3fs.cjs +1 -0
  47. package/FieldError-Dv3bBEjh.js +23 -0
  48. package/FileUpload-DYRZ0M9F.cjs +2 -0
  49. package/FileUpload-ULwcYDxs.js +2372 -0
  50. package/FocusScope-DwIqdYpQ.js +625 -0
  51. package/FocusScope-NaPbvuuS.cjs +1 -0
  52. package/Form-BuOomA4T.cjs +1 -0
  53. package/Form-CXcEMuBf.js +5 -0
  54. package/Grid--OhtgCo6.js +27 -0
  55. package/Grid-DVQtOcu9.cjs +1 -0
  56. package/GridItem-DlbSdRmB.js +246 -0
  57. package/GridItem-XgHmZWXY.cjs +1 -0
  58. package/Group-CeSsSQVC.js +44 -0
  59. package/Group-CgiqQHH1.cjs +1 -0
  60. package/Heading-BY5-QN4S.js +46 -0
  61. package/Heading-DoJAtYZf.cjs +1 -0
  62. package/Hidden-B5ir3Lei.js +34 -0
  63. package/Hidden-BxRZGdEW.cjs +1 -0
  64. package/InfoBanner-BS-dAfzO.cjs +1 -0
  65. package/InfoBanner-CVIBFSWx.js +82 -0
  66. package/Input-D8Ku_FQz.js +41 -0
  67. package/Input-DKSAYvsw.cjs +1 -0
  68. package/Label-C9ivwkAd.js +21 -0
  69. package/Label-CUV21CAv.cjs +1 -0
  70. package/Label-DkDOsmUF.js +16 -0
  71. package/Label-IMWAyoKb.cjs +1 -0
  72. package/Layout-BWeHHnqU.cjs +16 -0
  73. package/Layout-CCt_2L1k.js +468 -0
  74. package/Link-B-nus-FT.js +71 -0
  75. package/Link-DsnCtNeI.cjs +6 -0
  76. package/Link-SHMbeyIP.cjs +1 -0
  77. package/Link-uFowN4qv.js +59 -0
  78. package/LinkButton-CuBilDML.js +69 -0
  79. package/LinkButton-CymMrcGL.cjs +6 -0
  80. package/ListBox-CDOsQChA.cjs +1 -0
  81. package/ListBox-DOi_y_Lt.js +530 -0
  82. package/ListBoxButton-CFeNhJhr.cjs +1 -0
  83. package/ListBoxButton-O6zN3P4W.js +15 -0
  84. package/ListBoxSection-C1aLKL9p.js +1058 -0
  85. package/ListBoxSection-DGCP6xpf.cjs +1 -0
  86. package/ListKeyboardDelegate-BqMETvPv.cjs +1 -0
  87. package/ListKeyboardDelegate-DNOzQ8nc.js +158 -0
  88. package/LiveAnnouncer-B6177m92.js +51 -0
  89. package/LiveAnnouncer-CwEWPU8b.cjs +1 -0
  90. package/LocalizedStringFormatter-C0C54hjf.cjs +1 -0
  91. package/LocalizedStringFormatter-D-4Qyql0.js +77 -0
  92. package/Logo-BIrOEINM.js +133 -0
  93. package/Logo-DT2_2O43.cjs +1 -0
  94. package/NumberFormatter-DewVDY5w.cjs +1 -0
  95. package/NumberFormatter-DgOUVrge.js +119 -0
  96. package/OverlayArrow-D75k-EMl.cjs +1 -0
  97. package/OverlayArrow-DorA4Rbr.js +506 -0
  98. package/PressResponder-C06O3Z5P.cjs +1 -0
  99. package/PressResponder-CVEg5kND.js +33 -0
  100. package/ProgressBar-Bkw9zavs.cjs +1 -0
  101. package/ProgressBar-CEX2WNoW.js +77 -0
  102. package/ProgressBar-Dqh3ftSP.cjs +1 -0
  103. package/ProgressBar-gmAzSsrz.js +53 -0
  104. package/RSPContexts-BW2SEIqe.js +11 -0
  105. package/RSPContexts-D8hmBfGm.cjs +1 -0
  106. package/Radio-CDKrvQe4.cjs +1 -0
  107. package/Radio-_ukSkxPT.js +311 -0
  108. package/RangeCalendar-cbCKBPZv.cjs +11 -0
  109. package/RangeCalendar-uXwoBL-O.js +1685 -0
  110. package/SearchField-6yBGiojX.cjs +6 -0
  111. package/SearchField-DYl2uo7o.js +362 -0
  112. package/Select-CpHjd1tp.cjs +1 -0
  113. package/Select-PvCqY7Lp.js +646 -0
  114. package/SelectionManager-6H88Cv6B.js +1033 -0
  115. package/SelectionManager-C5NGBzvz.cjs +1 -0
  116. package/Separator-LYnFqh4L.js +60 -0
  117. package/Separator-nPra6kD-.cjs +1 -0
  118. package/Skeleton-BAwbfKBW.cjs +1 -0
  119. package/Skeleton-BePDRmrO.js +40 -0
  120. package/Spinner-D31SXm-U.js +41 -0
  121. package/Spinner-DAJtfxqJ.cjs +6 -0
  122. package/Table-B_N7wUmA.js +2451 -0
  123. package/Table-D9vNc_y-.cjs +16 -0
  124. package/Tabs-Ct6D83aR.js +404 -0
  125. package/Tabs-Dtcl2oK2.cjs +1 -0
  126. package/Tag-CVFkzg3s.cjs +1 -0
  127. package/Tag-g6HN-YCv.js +748 -0
  128. package/Text-3MNwRMpI.cjs +1 -0
  129. package/Text-B2K-BJKQ.cjs +1 -0
  130. package/Text-BN-g1iWi.js +32 -0
  131. package/Text-B_H68Tvq.js +15 -0
  132. package/TextArea-DSiQ578a.js +206 -0
  133. package/TextArea-cVyGBRbL.cjs +1 -0
  134. package/TextField-B70CL2qz.cjs +1 -0
  135. package/TextField-DBaRuNj7.js +119 -0
  136. package/TextField.module-BcpPBWnD.js +13 -0
  137. package/TextField.module-Dw5Rtn9y.cjs +1 -0
  138. package/Toast-CjpldAI8.js +988 -0
  139. package/Toast-DrkOGy4d.cjs +1 -0
  140. package/ToggleButtonGroup-BuU_6dYe.cjs +1 -0
  141. package/ToggleButtonGroup-Ceh9_yBM.js +210 -0
  142. package/Tooltip-BAIjaYax.js +283 -0
  143. package/Tooltip-CiWg4zIC.cjs +1 -0
  144. package/VisuallyHidden-CtXvK_Tw.cjs +1 -0
  145. package/VisuallyHidden-D-4z1VgU.js +40 -0
  146. package/accordion/index.cjs +1 -0
  147. package/accordion/index.js +5 -0
  148. package/arrow-right-Cw48o2oW.cjs +6 -0
  149. package/arrow-right-Dg8sttFO.js +14 -0
  150. package/assets/AccordionItem.css +1 -0
  151. package/assets/BadgeContainer.css +1 -0
  152. package/assets/Breadcrumbs.css +1 -0
  153. package/assets/Button.css +1 -0
  154. package/assets/ButtonGroup.css +1 -0
  155. package/assets/Card.css +1 -0
  156. package/assets/CharacterCounter.css +1 -0
  157. package/assets/Checkbox.css +1 -0
  158. package/assets/ColorSchemeSwitch.css +1 -0
  159. package/assets/ComboBox.css +1 -0
  160. package/assets/DateField.css +1 -0
  161. package/assets/DateInputDivider.css +1 -0
  162. package/assets/DateRangePicker.css +1 -0
  163. package/assets/Dialog.css +1 -0
  164. package/assets/Dropdown.css +1 -0
  165. package/assets/FieldError.css +1 -0
  166. package/assets/FileUpload.css +1 -0
  167. package/assets/GridItem.css +1 -0
  168. package/assets/Heading.css +1 -0
  169. package/assets/InfoBanner.css +1 -0
  170. package/assets/Label.css +1 -0
  171. package/assets/Layout.css +1 -0
  172. package/assets/Link.css +1 -0
  173. package/assets/LinkButton.css +1 -0
  174. package/assets/ListBoxSection.css +1 -0
  175. package/assets/Logo.css +1 -0
  176. package/assets/ProgressBar.css +1 -0
  177. package/assets/Radio.css +1 -0
  178. package/assets/RangeCalendar.css +1 -0
  179. package/assets/SearchField.css +1 -0
  180. package/assets/Select.css +1 -0
  181. package/assets/Skeleton.css +1 -0
  182. package/assets/Spinner.css +1 -0
  183. package/assets/Table.css +1 -0
  184. package/assets/Tabs.css +1 -0
  185. package/assets/Tag.css +1 -0
  186. package/assets/Text.css +1 -0
  187. package/assets/TextField.css +1 -0
  188. package/assets/Toast.css +1 -0
  189. package/assets/ToggleButtonGroup.css +1 -0
  190. package/assets/Tooltip.css +1 -0
  191. package/badge/index.cjs +1 -0
  192. package/badge/index.js +5 -0
  193. package/breadcrumbs/index.cjs +1 -0
  194. package/breadcrumbs/index.js +4 -0
  195. package/button/index.cjs +1 -0
  196. package/button/index.js +6 -0
  197. package/calendar/CalendarHeader.d.ts +2 -1
  198. package/calendar/index.cjs +1 -0
  199. package/calendar/index.js +5 -0
  200. package/card/Card.d.ts +3 -0
  201. package/card/index.cjs +1 -0
  202. package/card/index.js +10 -0
  203. package/character-counter/index.cjs +1 -0
  204. package/character-counter/index.js +4 -0
  205. package/check-CLF6Yxza.js +11 -0
  206. package/check-Dw9c62O4.cjs +6 -0
  207. package/checkbox/index.cjs +1 -0
  208. package/checkbox/index.js +6 -0
  209. package/chevron-down-C2E7aZ3N.cjs +6 -0
  210. package/chevron-down-Cd1bkzXT.js +13 -0
  211. package/clsx-C11secjj.cjs +1 -0
  212. package/clsx-OuTLNxxd.js +16 -0
  213. package/color-scheme-switch/index.cjs +1 -0
  214. package/color-scheme-switch/index.js +4 -0
  215. package/combobox/ComboBox.d.ts +9 -5
  216. package/combobox/index.cjs +1 -0
  217. package/combobox/index.d.ts +1 -1
  218. package/combobox/index.js +7 -0
  219. package/combobox/types.d.ts +6 -0
  220. package/combobox/utils.d.ts +3 -10
  221. package/common/types.d.ts +2 -0
  222. package/context-B8cn10po.js +80 -0
  223. package/context-DjwhtgxQ.cjs +1 -0
  224. package/createLucideIcon-DAY4oS-S.cjs +21 -0
  225. package/createLucideIcon-DeWljiyi.js +79 -0
  226. package/date-field/index.cjs +1 -0
  227. package/date-field/index.js +8 -0
  228. package/date-picker/index.cjs +1 -0
  229. package/date-picker/index.js +5 -0
  230. package/dropdown/index.cjs +1 -0
  231. package/dropdown/index.js +5 -0
  232. package/field-error/FieldError.d.ts +4 -1
  233. package/field-error/index.cjs +1 -0
  234. package/field-error/index.js +4 -0
  235. package/file-upload/index.cjs +1 -0
  236. package/file-upload/index.js +4 -0
  237. package/filterDOMProps-BS2lrgFA.cjs +1 -0
  238. package/filterDOMProps-D6KHYVBX.js +24 -0
  239. package/focusSafely-Bqfo_DH7.cjs +1 -0
  240. package/focusSafely-C48ucRUz.js +56 -0
  241. package/getScrollParent-DuKmPmUa.cjs +1 -0
  242. package/getScrollParent-Ru2U2LlM.js +9 -0
  243. package/grid/Grid.d.ts +15 -4
  244. package/grid/GridItem.d.ts +31 -2
  245. package/grid/index.cjs +1 -0
  246. package/grid/index.d.ts +2 -2
  247. package/grid/index.js +8 -0
  248. package/heading/index.cjs +1 -0
  249. package/heading/index.js +4 -0
  250. package/index-BSMrH_Du.js +120 -0
  251. package/index-D97L3EBk.cjs +17 -0
  252. package/index.cjs +1 -164
  253. package/index.d.ts +1 -1
  254. package/index.js +127 -30044
  255. package/inertValue-B7loUihk.js +8 -0
  256. package/inertValue-BWmZ1afe.cjs +1 -0
  257. package/info-DkzVqB8I.js +38 -0
  258. package/info-DlzSeKbc.cjs +16 -0
  259. package/info-banner/index.cjs +1 -0
  260. package/info-banner/index.js +4 -0
  261. package/label/index.cjs +1 -0
  262. package/label/index.js +4 -0
  263. package/layout/index.cjs +1 -0
  264. package/layout/index.js +8 -0
  265. package/link/Link.d.ts +4 -1
  266. package/link/index.cjs +1 -0
  267. package/link/index.js +6 -0
  268. package/link-button/LinkButton.d.ts +24 -1
  269. package/link-button/index.cjs +1 -0
  270. package/link-button/index.js +6 -0
  271. package/list-box/ListBox.d.ts +4 -0
  272. package/list-box/ListBoxButton.d.ts +2 -0
  273. package/list-box/ListBoxItem.d.ts +3 -0
  274. package/list-box/ListBoxPopover.d.ts +3 -0
  275. package/list-box/ListBoxSection.d.ts +8 -0
  276. package/list-box/index.cjs +1 -0
  277. package/list-box/index.d.ts +6 -0
  278. package/list-box/index.js +9 -0
  279. package/list-box/types.d.ts +23 -0
  280. package/logo/index.cjs +1 -0
  281. package/logo/index.js +4 -0
  282. package/modal/index.cjs +1 -0
  283. package/modal/index.js +6 -0
  284. package/number-BE8InLgI.js +6 -0
  285. package/number-E0x3H9cL.cjs +1 -0
  286. package/package.json +4 -4
  287. package/progress-bar/index.cjs +1 -0
  288. package/progress-bar/index.js +4 -0
  289. package/radio/index.cjs +1 -0
  290. package/radio/index.js +5 -0
  291. package/scrollIntoView-ClEACHUk.js +57 -0
  292. package/scrollIntoView-DRSoJp89.cjs +1 -0
  293. package/search-field/index.cjs +1 -0
  294. package/search-field/index.js +4 -0
  295. package/select/HiddenMultiSelect.d.ts +5 -4
  296. package/select/MultiSelectValueTag.d.ts +11 -0
  297. package/select/Select.d.ts +2 -77
  298. package/select/SelectFieldError.d.ts +8 -0
  299. package/select/SelectListBox.d.ts +4 -3
  300. package/select/SelectTrigger.d.ts +10 -0
  301. package/select/index.cjs +1 -0
  302. package/select/index.d.ts +1 -0
  303. package/select/index.js +4 -0
  304. package/select/types.d.ts +188 -0
  305. package/select/useMultiSelect.d.ts +4 -21
  306. package/select/useMultiSelectListState.d.ts +3 -15
  307. package/select/useMultiSelectState.d.ts +3 -19
  308. package/skeleton/Skeleton.d.ts +5 -0
  309. package/skeleton/index.cjs +1 -0
  310. package/skeleton/index.js +4 -0
  311. package/spinner/index.cjs +1 -0
  312. package/spinner/index.js +4 -0
  313. package/square-arrow-out-up-right-BCAO2eJs.cjs +6 -0
  314. package/square-arrow-out-up-right-BkyqV2PN.js +15 -0
  315. package/table/Table.d.ts +7 -1
  316. package/table/index.cjs +1 -0
  317. package/table/index.js +9 -0
  318. package/tabs/index.cjs +1 -0
  319. package/tabs/index.js +4 -0
  320. package/tag/index.cjs +1 -0
  321. package/tag/index.js +5 -0
  322. package/text/index.cjs +1 -0
  323. package/text/index.js +4 -0
  324. package/textfield/index.cjs +1 -0
  325. package/textfield/index.js +7 -0
  326. package/theme/index.cjs +1 -0
  327. package/theme/index.d.ts +4 -0
  328. package/{theme.js → theme/index.js} +2 -2
  329. package/theme/tokens.d.ts +10 -0
  330. package/toast/index.cjs +1 -0
  331. package/toast/index.js +9 -0
  332. package/toggle-button/index.cjs +1 -0
  333. package/toggle-button/index.js +5 -0
  334. package/tokens-p6pg1Cea.cjs +1 -0
  335. package/{tokens-C0U7hdoO.js → tokens-xp-7KMK7.js} +18 -8
  336. package/tooltip/index.cjs +1 -0
  337. package/tooltip/index.js +5 -0
  338. package/triangle-alert-C0lvfCYH.cjs +6 -0
  339. package/triangle-alert-wxyxspAl.js +21 -0
  340. package/useButton-B1Fa-6qE.cjs +1 -0
  341. package/useButton-C-Lq7CNY.js +47 -0
  342. package/useCollator-C_ozeWLo.cjs +1 -0
  343. package/useCollator-CgZcHC8N.js +11 -0
  344. package/useControlledState-D0L6S_5r.cjs +1 -0
  345. package/useControlledState-u436Wbp1.js +30 -0
  346. package/useDateFormatter-C53Uxdli.js +1571 -0
  347. package/useDateFormatter-g2maMTGH.cjs +1 -0
  348. package/useDescription-CVKhFa3c.js +32 -0
  349. package/useDescription-DmQYSEES.cjs +1 -0
  350. package/useEvent-CjkbBniY.cjs +1 -0
  351. package/useEvent-Cyd2ZL0c.js +21 -0
  352. package/useField-B1RU0GKs.cjs +1 -0
  353. package/useField-BPMAlIbU.js +35 -0
  354. package/useFilter-ChIbnALW.js +35 -0
  355. package/useFilter-CtIwF2qW.cjs +1 -0
  356. package/useFocusRing-BDGH3lpn.js +82 -0
  357. package/useFocusRing-CbImDrwF.cjs +1 -0
  358. package/useFocusable-CaedRTpB.js +74 -0
  359. package/useFocusable-CuPQ7Cm5.cjs +1 -0
  360. package/useFormValidation-ClximP89.cjs +1 -0
  361. package/useFormValidation-R8hQIjWP.js +215 -0
  362. package/useHasTabbableChild-DgphNvnk.cjs +1 -0
  363. package/useHasTabbableChild-DsD9AJwE.js +34 -0
  364. package/useHighlightSelectionDescription-BizKjvPU.cjs +1 -0
  365. package/useHighlightSelectionDescription-DFfcgbUj.js +567 -0
  366. package/useHover-_mv5J4_q.cjs +1 -0
  367. package/useHover-qRAon4nS.js +490 -0
  368. package/useLabel-DDdAJ1JO.js +23 -0
  369. package/useLabel-m_S5xkHy.cjs +1 -0
  370. package/useLabels-BLOfc6Y-.cjs +1 -0
  371. package/useLabels-BZjoZA1Z.js +17 -0
  372. package/useListState-Ca2-uZMO.cjs +1 -0
  373. package/useListState-DFQ9d-uE.js +132 -0
  374. package/useLocalizedStringFormatter-D07YB2e1.js +22 -0
  375. package/useLocalizedStringFormatter-u9SJaOwk.cjs +1 -0
  376. package/useObserveElement-BdI4zgd7.js +27 -0
  377. package/useObserveElement-BzEr5D32.cjs +1 -0
  378. package/usePress-BFa6cT9o.cjs +7 -0
  379. package/usePress-CUJ3pMOw.js +542 -0
  380. package/useSingleSelectListState-C-nB8cug.js +34 -0
  381. package/useSingleSelectListState-MGNxUTum.cjs +1 -0
  382. package/useTextField-5OZQPyOW.js +86 -0
  383. package/useTextField-CtUDWsUl.cjs +1 -0
  384. package/useToggleState-Bz5rAf4C.js +18 -0
  385. package/useToggleState-DoIkSQdj.cjs +1 -0
  386. package/useUpdateEffect-CCDx8D4X.js +13 -0
  387. package/useUpdateEffect-sk3kiVGz.cjs +1 -0
  388. package/utils/test.d.ts +1 -1
  389. package/utils-BNtZbAib.cjs +1 -0
  390. package/utils-HNTsIwux.js +308 -0
  391. package/x-CvxiAZTW.cjs +6 -0
  392. package/x-JK7i-TQC.js +14 -0
  393. package/flex/Flex.d.ts +0 -17
  394. package/flex/FlexItem.d.ts +0 -15
  395. package/flex/index.d.ts +0 -2
  396. package/index.css +0 -1
  397. package/select/SelectPopover.d.ts +0 -10
  398. package/theme.cjs +0 -1
  399. package/tokens-COoF1t17.cjs +0 -1
  400. /package/{global.css → assets/global.css} +0 -0
  401. /package/{select → list-box}/SectionedListLayout.d.ts +0 -0
@@ -0,0 +1,8 @@
1
+ import { version as e } from "react";
2
+ function c(r) {
3
+ const t = e.split(".");
4
+ return parseInt(t[0], 10) >= 19 ? r : r ? "true" : void 0;
5
+ }
6
+ export {
7
+ c as $
8
+ };
@@ -0,0 +1 @@
1
+ "use strict";const t=require("react");function c(r){const e=t.version.split(".");return parseInt(e[0],10)>=19?r:r?"true":void 0}exports.$cdc5a6778b766db2$export$a9d04c5684123369=c;
@@ -0,0 +1,38 @@
1
+ import { c as e } from "./createLucideIcon-DeWljiyi.js";
2
+ /**
3
+ * @license lucide-react v0.453.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const y = e("CircleAlert", [
9
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
10
+ ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
11
+ ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
12
+ ]);
13
+ /**
14
+ * @license lucide-react v0.453.0 - ISC
15
+ *
16
+ * This source code is licensed under the ISC license.
17
+ * See the LICENSE file in the root directory of this source tree.
18
+ */
19
+ const r = e("CircleCheck", [
20
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
21
+ ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
22
+ ]);
23
+ /**
24
+ * @license lucide-react v0.453.0 - ISC
25
+ *
26
+ * This source code is licensed under the ISC license.
27
+ * See the LICENSE file in the root directory of this source tree.
28
+ */
29
+ const l = e("Info", [
30
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
31
+ ["path", { d: "M12 16v-4", key: "1dtifu" }],
32
+ ["path", { d: "M12 8h.01", key: "e9boi3" }]
33
+ ]);
34
+ export {
35
+ y as C,
36
+ l as I,
37
+ r as a
38
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";const e=require("./createLucideIcon-DAY4oS-S.cjs");/**
2
+ * @license lucide-react v0.453.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const c=e.createLucideIcon("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
7
+ * @license lucide-react v0.453.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const r=e.createLucideIcon("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
12
+ * @license lucide-react v0.453.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const i=e.createLucideIcon("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);exports.CircleAlert=c;exports.CircleCheck=r;exports.Info=i;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../InfoBanner-BS-dAfzO.cjs");exports.InfoBanner=e.InfoBanner;
@@ -0,0 +1,4 @@
1
+ import { I as r } from "../InfoBanner-CVIBFSWx.js";
2
+ export {
3
+ r as InfoBanner
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Label-IMWAyoKb.cjs");exports.Label=e.Label;
package/label/index.js ADDED
@@ -0,0 +1,4 @@
1
+ import { L as o } from "../Label-C9ivwkAd.js";
2
+ export {
3
+ o as Label
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Layout-BWeHHnqU.cjs");exports.Header=e.Header;exports.Layout=e.Layout;exports.Navbar=e.Navbar;exports.Sidebar=e.Sidebar;exports.SidebarLink=e.SidebarLink;
@@ -0,0 +1,8 @@
1
+ import { H as e, L as s, N as b, S as d, a as i } from "../Layout-CCt_2L1k.js";
2
+ export {
3
+ e as Header,
4
+ s as Layout,
5
+ b as Navbar,
6
+ d as Sidebar,
7
+ i as SidebarLink
8
+ };
package/link/Link.d.ts CHANGED
@@ -9,8 +9,11 @@ interface MidasLinkProps<C extends React.ElementType> {
9
9
  /** Optional icon, placed to the left of the link */
10
10
  icon?: LucideIcon;
11
11
  className?: string;
12
+ /** Replace base component with any Client Side Routing link instead.
13
+ * @see {@link https://designsystem.migrationsverket.se/dev/client-side-routing/|Client side routing}
14
+ */
12
15
  as?: C;
13
16
  }
14
17
  export type LinkProps<C extends React.ElementType> = MidasLinkProps<C> & Omit<React.ComponentProps<C>, keyof MidasLinkProps<C>>;
15
- export declare const Link: <C extends React.ElementType = (props: import('react-aria-components').LinkProps & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null>({ children, standalone, stretched, icon: IconComponent, className, as, ...rest }: LinkProps<C>) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const Link: <C extends React.ElementType = (props: import('react-aria-components').LinkProps & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null>({ children, standalone, target, stretched, download, icon: IconComponent, className, as, ...rest }: LinkProps<C>) => import("react/jsx-runtime").JSX.Element;
16
19
  export { RouterProvider };
package/link/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Link-DsnCtNeI.cjs"),r=require("../usePress-BFa6cT9o.cjs");exports.Link=e.Link;exports.RouterProvider=r.$ea8dcbcb9ea1b556$export$323e4fc2fa4753fb;
package/link/index.js ADDED
@@ -0,0 +1,6 @@
1
+ import { L as e } from "../Link-uFowN4qv.js";
2
+ import { $ as a } from "../usePress-CUJ3pMOw.js";
3
+ export {
4
+ e as Link,
5
+ a as RouterProvider
6
+ };
@@ -1,18 +1,41 @@
1
1
  import { default as React } from 'react';
2
2
  import { Link as AriaLink, RouterProvider } from 'react-aria-components';
3
3
  import { LucideIcon } from 'lucide-react';
4
+ import { Size } from '../common/types';
4
5
  interface MidasLinkProps<C extends React.ElementType> {
5
6
  children: React.ReactNode;
7
+ /**
8
+ * Primary button is used as a positive action in a flow. Always use one primary button and never a seconday button on it's own. When using just an icon you must pass an aria-label
9
+ *
10
+ * @default 'primary'
11
+ * */
6
12
  variant?: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'icon';
13
+ /**
14
+ * Adds width: 100%; for the button to span entire width of parent
15
+ *
16
+ * @default false
17
+ */
7
18
  fullwidth?: boolean;
19
+ /** Display the icon on the left or right side of the button text */
8
20
  iconPlacement?: 'left' | 'right';
21
+ /** Add an icon from lucide-react
22
+ *
23
+ * @see {@link https://lucide.dev/icons/|Lucide}
24
+ */
9
25
  icon?: LucideIcon; /**Optional icon prop */
10
26
  className?: string;
27
+ /** Replace base component with any Client Side Routing link instead.
28
+ * @see {@link https://designsystem.migrationsverket.se/dev/client-side-routing/|Client side routing}
29
+ */
11
30
  as?: C;
31
+ /** Component size (large: height 48px, medium: height 40px)
32
+ * @default 'large'
33
+ **/
34
+ size?: Size;
12
35
  }
13
36
  export type LinkButtonProps<C extends React.ElementType> = MidasLinkProps<C> & Omit<React.ComponentProps<C>, keyof MidasLinkProps<C>>;
14
37
  /**
15
38
  * A link to be used when a user expects a button but web technologies force us to use a a-tag
16
39
  * */
17
- export declare const LinkButton: <C extends React.ElementType = (props: import('react-aria-components').LinkProps & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null>({ children, variant, fullwidth, icon: IconComponent, iconPlacement, className, as, ...rest }: LinkButtonProps<C>) => import("react/jsx-runtime").JSX.Element;
40
+ export declare const LinkButton: <C extends React.ElementType = (props: import('react-aria-components').LinkProps & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null>({ children, variant, fullwidth, icon: IconComponent, iconPlacement, className, as, size, ...rest }: LinkButtonProps<C>) => import("react/jsx-runtime").JSX.Element;
18
41
  export { RouterProvider };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../LinkButton-CymMrcGL.cjs"),t=require("../usePress-BFa6cT9o.cjs");exports.LinkButton=e.LinkButton;exports.RouterProvider=t.$ea8dcbcb9ea1b556$export$323e4fc2fa4753fb;
@@ -0,0 +1,6 @@
1
+ import { L as t } from "../LinkButton-CuBilDML.js";
2
+ import { $ as a } from "../usePress-CUJ3pMOw.js";
3
+ export {
4
+ t as LinkButton,
5
+ a as RouterProvider
6
+ };
@@ -0,0 +1,4 @@
1
+ import { ListBoxProps } from 'react-aria-components';
2
+ import { ListBoxOption } from './types';
3
+ import { Node } from '@react-types/shared';
4
+ export declare const ListBox: <T extends ListBoxOption | Node<ListBoxOption>>({ className, children, ...rest }: ListBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare const ListBoxButton: React.FC<React.HTMLAttributes<HTMLButtonElement>>;
@@ -0,0 +1,3 @@
1
+ import { ListBoxItemProps } from 'react-aria-components';
2
+ import { ListBoxItemElement } from './types';
3
+ export declare const ListBoxItem: <T extends ListBoxItemElement>({ children, className, ...rest }: ListBoxItemProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { PopoverProps } from 'react-aria-components';
2
+ import * as React from 'react';
3
+ export declare const ListBoxPopover: React.FC<PopoverProps>;
@@ -0,0 +1,8 @@
1
+ import { ListBoxSectionProps as AriaListBoxSectionProps } from 'react-aria-components';
2
+ import { ListBoxSectionElement } from './types';
3
+ import * as React from 'react';
4
+ export interface ListBoxSectionProps<T extends ListBoxSectionElement> extends Omit<AriaListBoxSectionProps<T>, 'children'> {
5
+ name: React.ReactNode;
6
+ children?: React.ReactNode;
7
+ }
8
+ export declare const ListBoxSection: <T extends ListBoxSectionElement>({ children, name, ...rest }: ListBoxSectionProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../ListBoxSection-DGCP6xpf.cjs"),o=require("../ListBoxButton-CFeNhJhr.cjs");exports.ListBox=t.ListBox;exports.ListBoxItem=t.ListBoxItem;exports.ListBoxPopover=t.ListBoxPopover;exports.ListBoxSection=t.ListBoxSection;exports.ListBoxButton=o.ListBoxButton;
@@ -0,0 +1,6 @@
1
+ export * from './ListBox';
2
+ export * from './ListBoxButton';
3
+ export * from './ListBoxItem';
4
+ export * from './ListBoxPopover';
5
+ export * from './ListBoxSection';
6
+ export * from './types';
@@ -0,0 +1,9 @@
1
+ import { L as s, a as x, b as L, c as a } from "../ListBoxSection-C1aLKL9p.js";
2
+ import { L as B } from "../ListBoxButton-O6zN3P4W.js";
3
+ export {
4
+ s as ListBox,
5
+ B as ListBoxButton,
6
+ x as ListBoxItem,
7
+ L as ListBoxPopover,
8
+ a as ListBoxSection
9
+ };
@@ -0,0 +1,23 @@
1
+ import { Key } from 'react-aria-components';
2
+ export type ListBoxItemElement = {
3
+ children?: never;
4
+ id: Key;
5
+ name: string | React.ReactNode;
6
+ /**
7
+ * Textual representation of `name` in case it is not a string. Used for searching.
8
+ */
9
+ textValue?: string;
10
+ /**
11
+ * Additional properties.
12
+ */
13
+ [prop: string]: unknown;
14
+ };
15
+ export type ListBoxSectionElement = {
16
+ children: ListBoxItemElement[];
17
+ name: string;
18
+ /**
19
+ * Additional properties for backwards compatibility.
20
+ */
21
+ [prop: string]: unknown;
22
+ };
23
+ export type ListBoxOption = ListBoxItemElement | ListBoxSectionElement;
package/logo/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../Logo-DT2_2O43.cjs");exports.Logo=o.Logo;
package/logo/index.js ADDED
@@ -0,0 +1,4 @@
1
+ import { L } from "../Logo-BIrOEINM.js";
2
+ export {
3
+ L as Logo
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Dialog-CwTEAujZ.cjs"),o=require("../Dialog-Bd5hK360.cjs");exports.Modal=e.Modal;exports.DialogTrigger=o.$de32f1b87079253c$export$2e1e1122cf0cba88;
package/modal/index.js ADDED
@@ -0,0 +1,6 @@
1
+ import { M as a } from "../Dialog-Bxx8cBEq.js";
2
+ import { $ as g } from "../Dialog-CYxThuMl.js";
3
+ export {
4
+ g as DialogTrigger,
5
+ a as Modal
6
+ };
@@ -0,0 +1,6 @@
1
+ function i(a, n = -1 / 0, t = 1 / 0) {
2
+ return Math.min(Math.max(a, n), t);
3
+ }
4
+ export {
5
+ i as $
6
+ };
@@ -0,0 +1 @@
1
+ "use strict";function n(a,t=-1/0,c=1/0){return Math.min(Math.max(a,t),c)}exports.$9446cca9a3875146$export$7d15b64cf5a3a4c4=n;
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "description": "Midas Components",
15
15
  "homepage": "https://designsystem.migrationsverket.se/",
16
16
  "license": "CC0-1.0",
17
- "version": "10.1.0",
17
+ "version": "10.2.0",
18
18
  "main": "./index.cjs",
19
19
  "module": "./index.js",
20
20
  "types": "./index.d.ts",
@@ -41,11 +41,11 @@
41
41
  },
42
42
  "./theme": {
43
43
  "types": "./theme/index.d.ts",
44
- "import": "./theme.js",
45
- "require": "./theme.cjs"
44
+ "import": "./theme/index.js",
45
+ "require": "./theme/index.cjs"
46
46
  },
47
47
  "./global.css": {
48
- "import": "./global.css"
48
+ "import": "./assets/global.css"
49
49
  }
50
50
  },
51
51
  "dependencies": {
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../ProgressBar-Dqh3ftSP.cjs");exports.ProgressBar=r.ProgressBar;
@@ -0,0 +1,4 @@
1
+ import { P as s } from "../ProgressBar-gmAzSsrz.js";
2
+ export {
3
+ s as ProgressBar
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../Radio-CDKrvQe4.cjs");exports.Radio=o.Radio;exports.RadioGroup=o.RadioGroup;
package/radio/index.js ADDED
@@ -0,0 +1,5 @@
1
+ import { R as r, a as R } from "../Radio-_ukSkxPT.js";
2
+ export {
3
+ r as Radio,
4
+ R as RadioGroup
5
+ };
@@ -0,0 +1,57 @@
1
+ function W(e, t) {
2
+ if (!e) return !1;
3
+ let l = window.getComputedStyle(e), o = /(auto|scroll)/.test(l.overflow + l.overflowX + l.overflowY);
4
+ return o && t && (o = e.scrollHeight !== e.clientHeight || e.scrollWidth !== e.clientWidth), o;
5
+ }
6
+ function S(e, t) {
7
+ const l = [];
8
+ for (; e && e !== document.documentElement; )
9
+ W(e, t) && l.push(e), e = e.parentElement;
10
+ return l;
11
+ }
12
+ function k(e, t) {
13
+ let l = g(e, t, "left"), o = g(e, t, "top"), f = t.offsetWidth, r = t.offsetHeight, d = e.scrollLeft, s = e.scrollTop, { borderTopWidth: i, borderLeftWidth: c, scrollPaddingTop: n, scrollPaddingRight: a, scrollPaddingBottom: L, scrollPaddingLeft: T } = getComputedStyle(e), x = d + parseInt(c, 10), u = s + parseInt(i, 10), b = x + e.clientWidth, p = u + e.clientHeight, v = parseInt(n, 10) || 0, P = parseInt(L, 10) || 0, h = parseInt(a, 10) || 0, $ = parseInt(T, 10) || 0;
14
+ l <= d + $ ? d = l - parseInt(c, 10) - $ : l + f > b - h && (d += l + f - b + h), o <= u + v ? s = o - parseInt(i, 10) - v : o + r > p - P && (s += o + r - p + P), e.scrollLeft = d, e.scrollTop = s;
15
+ }
16
+ function g(e, t, l) {
17
+ const o = l === "left" ? "offsetLeft" : "offsetTop";
18
+ let f = 0;
19
+ for (; t.offsetParent && (f += t[o], t.offsetParent !== e); ) {
20
+ if (t.offsetParent.contains(e)) {
21
+ f -= e[o];
22
+ break;
23
+ }
24
+ t = t.offsetParent;
25
+ }
26
+ return f;
27
+ }
28
+ function y(e, t) {
29
+ if (e && document.contains(e)) {
30
+ let d = document.scrollingElement || document.documentElement;
31
+ if (window.getComputedStyle(d).overflow === "hidden") {
32
+ let i = S(e);
33
+ for (let c of i) k(c, e);
34
+ } else {
35
+ var l;
36
+ let { left: i, top: c } = e.getBoundingClientRect();
37
+ e == null || (l = e.scrollIntoView) === null || l === void 0 || l.call(e, {
38
+ block: "nearest"
39
+ });
40
+ let { left: n, top: a } = e.getBoundingClientRect();
41
+ if (Math.abs(i - n) > 1 || Math.abs(c - a) > 1) {
42
+ var o, f, r;
43
+ t == null || (f = t.containingElement) === null || f === void 0 || (o = f.scrollIntoView) === null || o === void 0 || o.call(f, {
44
+ block: "center",
45
+ inline: "center"
46
+ }), (r = e.scrollIntoView) === null || r === void 0 || r.call(e, {
47
+ block: "nearest"
48
+ });
49
+ }
50
+ }
51
+ }
52
+ }
53
+ export {
54
+ W as $,
55
+ k as a,
56
+ y as b
57
+ };
@@ -0,0 +1 @@
1
+ "use strict";function x(e,t){if(!e)return!1;let o=window.getComputedStyle(e),l=/(auto|scroll)/.test(o.overflow+o.overflowX+o.overflowY);return l&&t&&(l=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),l}function k(e,t){const o=[];for(;e&&e!==document.documentElement;)x(e,t)&&o.push(e),e=e.parentElement;return o}function L(e,t){let o=g(e,t,"left"),l=g(e,t,"top"),f=t.offsetWidth,r=t.offsetHeight,d=e.scrollLeft,s=e.scrollTop,{borderTopWidth:c,borderLeftWidth:i,scrollPaddingTop:n,scrollPaddingRight:b,scrollPaddingBottom:T,scrollPaddingLeft:W}=getComputedStyle(e),S=d+parseInt(i,10),u=s+parseInt(c,10),a=S+e.clientWidth,p=u+e.clientHeight,$=parseInt(n,10)||0,v=parseInt(T,10)||0,P=parseInt(b,10)||0,h=parseInt(W,10)||0;o<=d+h?d=o-parseInt(i,10)-h:o+f>a-P&&(d+=o+f-a+P),l<=u+$?s=l-parseInt(c,10)-$:l+r>p-v&&(s+=l+r-p+v),e.scrollLeft=d,e.scrollTop=s}function g(e,t,o){const l=o==="left"?"offsetLeft":"offsetTop";let f=0;for(;t.offsetParent&&(f+=t[l],t.offsetParent!==e);){if(t.offsetParent.contains(e)){f-=e[l];break}t=t.offsetParent}return f}function y(e,t){if(e&&document.contains(e)){let d=document.scrollingElement||document.documentElement;if(window.getComputedStyle(d).overflow==="hidden"){let c=k(e);for(let i of c)L(i,e)}else{var o;let{left:c,top:i}=e.getBoundingClientRect();e==null||(o=e.scrollIntoView)===null||o===void 0||o.call(e,{block:"nearest"});let{left:n,top:b}=e.getBoundingClientRect();if(Math.abs(c-n)>1||Math.abs(i-b)>1){var l,f,r;t==null||(f=t.containingElement)===null||f===void 0||(l=f.scrollIntoView)===null||l===void 0||l.call(f,{block:"center",inline:"center"}),(r=e.scrollIntoView)===null||r===void 0||r.call(e,{block:"nearest"})}}}}exports.$2f04cbc44ee30ce0$export$53a0910f038337bd=L;exports.$2f04cbc44ee30ce0$export$c826860796309d1b=y;exports.$cc38e7bd3fc7b213$export$2bb74740c4e19def=x;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../SearchField-6yBGiojX.cjs");exports.SearchField=e.SearchField;
@@ -0,0 +1,4 @@
1
+ import { S as a } from "../SearchField-DYl2uo7o.js";
2
+ export {
3
+ a as SearchField
4
+ };
@@ -1,6 +1,7 @@
1
1
  import { FocusableElement, RefObject } from '@react-types/shared';
2
2
  import { default as React, ReactNode } from 'react';
3
- import { MultiSelectState } from './useMultiSelectState';
3
+ import { MultiSelectState } from './types';
4
+ import { ListBoxOption } from '../list-box';
4
5
  export interface AriaHiddenMultiSelectProps {
5
6
  /**
6
7
  * Describes the type of autocomplete functionality the input should provide if any. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautocomplete).
@@ -15,7 +16,7 @@ export interface AriaHiddenMultiSelectProps {
15
16
  /** Sets the required state of the select and input. */
16
17
  isRequired?: boolean;
17
18
  }
18
- export interface HiddenMultiSelectProps<T> extends AriaHiddenMultiSelectProps {
19
+ export interface HiddenMultiSelectProps<T extends ListBoxOption> extends AriaHiddenMultiSelectProps {
19
20
  /** State for the select. */
20
21
  state: MultiSelectState<T>;
21
22
  /** A ref to the trigger element. */
@@ -38,10 +39,10 @@ interface HiddenMultiSelectAria {
38
39
  * can be used in combination with `useSelect` to support browser form autofill, mobile form
39
40
  * navigation, and native HTML form submission.
40
41
  */
41
- export declare function useHiddenMultiSelect<T>({ autoComplete, name, isDisabled, isRequired, selectRef, }: AriaHiddenMultiSelectOptions, state: MultiSelectState<T>, triggerRef: RefObject<FocusableElement | null>): HiddenMultiSelectAria;
42
+ export declare function useHiddenMultiSelect<T extends ListBoxOption>({ autoComplete, name, isDisabled, isRequired, selectRef, }: AriaHiddenMultiSelectOptions, state: MultiSelectState<T>, triggerRef: RefObject<FocusableElement | null>): HiddenMultiSelectAria;
42
43
  /**
43
44
  * Renders a hidden native `<select>` element, which can be used to support browser
44
45
  * form autofill, mobile form navigation, and native form submission.
45
46
  */
46
- export declare function HiddenMultiSelect<T>(props: HiddenMultiSelectProps<T>): import("react/jsx-runtime").JSX.Element | null;
47
+ export declare function HiddenMultiSelect<T extends ListBoxOption>(props: HiddenMultiSelectProps<T>): import("react/jsx-runtime").JSX.Element | null;
47
48
  export {};
@@ -0,0 +1,11 @@
1
+ import { MultiSelectState, SelectProps } from './types';
2
+ import { ListBoxOption } from '../list-box';
3
+ import * as React from 'react';
4
+ interface MultiSelectValueTagProps extends SelectProps {
5
+ state: MultiSelectState<ListBoxOption>;
6
+ parentWidth: number;
7
+ onClear: () => void;
8
+ triggerRef: React.MutableRefObject<HTMLButtonElement | null>;
9
+ }
10
+ export declare const MultiSelectValueTag: React.FC<MultiSelectValueTagProps>;
11
+ export {};
@@ -1,80 +1,5 @@
1
- import { CollectionChildren, Key } from '@react-types/shared';
2
- import { useMultiSelectState } from './useMultiSelectState';
3
- import { Size } from '../common/types';
1
+ import { SelectProps } from './types';
4
2
  import * as React from 'react';
5
- export type OptionItem = {
6
- children?: never;
7
- id: Key;
8
- name: string | React.ReactNode;
9
- /** Textual representation of `name` in case it is not a string. Used for searching. */
10
- textValue?: string;
11
- /** Allow additional properties for an option. */
12
- [prop: string]: unknown;
13
- };
14
- type OptionSection = {
15
- children: OptionItem[];
16
- name: string;
17
- };
18
- export type Option = OptionItem | OptionSection;
19
- export type SelectionMode = 'single' | 'multiple';
20
- export type SelectProps = {
21
- /** Whether the element should receive focus on render. */
22
- autoFocus?: boolean;
23
- children: CollectionChildren<Option>;
24
- /** Sets the CSS [`className`](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. */
25
- className?: string;
26
- /** Sets the default open state of the field (uncontrolled). */
27
- defaultOpen?: boolean;
28
- /** The initial selected keys in the collection (uncontrolled). */
29
- defaultSelectedKeys?: Parameters<typeof useMultiSelectState>['0']['defaultSelectedKeys'];
30
- /** The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with. */
31
- disabledKeys?: Parameters<typeof useMultiSelectState>['0']['disabledKeys'];
32
- excludeFromTabOrder?: boolean;
33
- items: Option[];
34
- /** Whether the field can be emptied. */
35
- isClearable?: boolean;
36
- /** Whether the field is disabled. */
37
- isDisabled?: boolean;
38
- /** Whether to show a button to select all items. */
39
- isSelectableAll?: boolean;
40
- /** Sets the open state of the field (controlled). */
41
- isOpen?: boolean;
42
- /** The content to display as the label. */
43
- label: string;
44
- /** Optional description */
45
- description?: string;
46
- /** Placeholder value */
47
- placeholder?: string;
48
- /** Show selected items as tags below select */
49
- showTags?: boolean;
50
- /** Handler that is called when the select's open state changes. */
51
- onOpenChange?: Parameters<typeof useMultiSelectState>['0']['onOpenChange'];
52
- /** Handler that is called when the selection changes. */
53
- onSelectionChange?: Parameters<typeof useMultiSelectState>['0']['onSelectionChange'];
54
- /** The currently selected keys in the collection (controlled). */
55
- selectedKeys?: Parameters<typeof useMultiSelectState>['0']['selectedKeys'];
56
- /**
57
- * The type of selection that is allowed in the collection.
58
- * @default 'single'
59
- */
60
- selectionMode: SelectionMode;
61
- /** The selection is valid or not */
62
- isInvalid?: boolean;
63
- /** Error message to be displayed in case of invalid state*/
64
- errorMessage?: string;
65
- /** Whether the field is required. */
66
- isRequired?: boolean;
67
- /** Name of the field, for uncontrolled use */
68
- name?: string;
69
- errorPosition?: 'top' | 'bottom';
70
- /** Component size (large: height 48px, medium: height 40px)
71
- * @default 'large'
72
- * */
73
- size?: Size;
74
- };
75
- export declare const SelectComponent: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLButtonElement>>;
76
3
  export declare const Select: React.ForwardRefExoticComponent<Omit<SelectProps, "children" | "items"> & {
77
- /** Item objects in the collection. */
78
- options: Option[];
4
+ options: import('..').ListBoxOption[];
79
5
  } & React.RefAttributes<HTMLButtonElement>>;
80
- export {};
@@ -0,0 +1,8 @@
1
+ import { ListBoxOption } from '../list-box';
2
+ import { MultiSelectState, SelectProps } from './types';
3
+ import * as React from 'react';
4
+ interface SelectFieldErrorProps extends SelectProps {
5
+ state: MultiSelectState<ListBoxOption>;
6
+ }
7
+ export declare const SelectFieldError: React.FC<SelectFieldErrorProps>;
8
+ export {};
@@ -1,7 +1,8 @@
1
- import { MultiSelectState } from './useMultiSelectState';
1
+ import { ListBoxOption } from '../list-box';
2
2
  import { AriaListBoxOptions } from '@react-aria/listbox';
3
- interface ListBoxProps<T> extends AriaListBoxOptions<T> {
3
+ import { MultiSelectState } from './types';
4
+ interface ListBoxProps<T extends ListBoxOption> extends AriaListBoxOptions<T> {
4
5
  state: MultiSelectState<T>;
5
6
  }
6
- export declare const SelectListBox: <T>({ state, ...rest }: ListBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const SelectListBox: <T extends ListBoxOption>({ state, ...rest }: ListBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
7
8
  export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { AriaButtonProps } from 'react-aria';
3
+ import { SelectProps, MultiSelectState } from './types';
4
+ import { ListBoxOption } from '../list-box';
5
+ interface SelectTriggerProps extends Omit<SelectProps, 'children'>, AriaButtonProps<'button'> {
6
+ state: MultiSelectState<ListBoxOption>;
7
+ triggerRef: React.MutableRefObject<HTMLButtonElement | null>;
8
+ }
9
+ export declare const SelectTrigger: React.FC<SelectTriggerProps>;
10
+ export {};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Select-CpHjd1tp.cjs");exports.Select=e.Select;
package/select/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './Select';
2
+ export type { SelectContainerProps as SelectProps, SelectionMode, Option, OptionItem, OptionSection, } from './types';
@@ -0,0 +1,4 @@
1
+ import { S as r } from "../Select-PvCqY7Lp.js";
2
+ export {
3
+ r as Select
4
+ };