@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,881 @@
1
+ import { jsxs as H, jsx as h } from "react/jsx-runtime";
2
+ import * as ce from "react";
3
+ import J, { useMemo as W, useRef as z, useState as L, forwardRef as De, createContext as ee, useCallback as xe } from "react";
4
+ import { c as Q } from "./clsx-OuTLNxxd.js";
5
+ import { $ as ta, a as da, C as na, R as ra } from "./RangeCalendar-uXwoBL-O.js";
6
+ import { c as Fe, d as Re, e as Ce, f as oa, g as Oe, h as sa, i as q, j, k as ua, l as Te, a as ne, D as re, b as ca } from "./DateInputDivider-Dx8n1Lxp.js";
7
+ import { F as Y } from "./FieldError-Dv3bBEjh.js";
8
+ import { L as Ie } from "./Label-C9ivwkAd.js";
9
+ import { T as Ze } from "./Text-BN-g1iWi.js";
10
+ import { a as fe, $ as fa } from "./Button-ZOQy9Ivu.js";
11
+ import { c as G, d as Me, a as Be, h as ke, i as we, j as _e, b as Ee, k as pe } from "./utils-HNTsIwux.js";
12
+ import { i as Se, m as Ue, n as Ne, b as ba, l as va } from "./Dialog-CYxThuMl.js";
13
+ import { $ as We } from "./FieldError-CZikNDxX.js";
14
+ import { $ as Le } from "./Form-CXcEMuBf.js";
15
+ import { a as be, $ as ma } from "./Group-CeSsSQVC.js";
16
+ import { $ as ve } from "./Label-DkDOsmUF.js";
17
+ import { a as me } from "./Text-B_H68Tvq.js";
18
+ import { $ as ae } from "./filterDOMProps-D6KHYVBX.js";
19
+ import { $ as Ke, g as je } from "./OverlayArrow-DorA4Rbr.js";
20
+ import { $ as A, a as oe, b as se } from "./useDateFormatter-C53Uxdli.js";
21
+ import { c as ue, d as Pe, e as Ve, $ as ze } from "./useFormValidation-R8hQIjWP.js";
22
+ import { $ as qe } from "./useControlledState-u436Wbp1.js";
23
+ import { b as Ge } from "./FocusScope-DwIqdYpQ.js";
24
+ import { $ as Ae } from "./useDescription-CVKhFa3c.js";
25
+ import { a as Xe, $ as He } from "./useFocusRing-BDGH3lpn.js";
26
+ import { $ as Je } from "./useField-BPMAlIbU.js";
27
+ import { $ as Qe } from "./context-B8cn10po.js";
28
+ import { $ as Ye } from "./useLocalizedStringFormatter-D07YB2e1.js";
29
+ import { c as $a } from "./createLucideIcon-DeWljiyi.js";
30
+ import './assets/DateRangePicker.css';function ha(e) {
31
+ return e && e.__esModule ? e.default : e;
32
+ }
33
+ function ga(e, a, i) {
34
+ let c = G(), f = G(), s = G(), u = Ye(ha(Ce), "@react-aria/datepicker"), { isInvalid: t, validationErrors: l, validationDetails: x } = a.displayValidation, { labelProps: B, fieldProps: b, descriptionProps: k, errorMessageProps: F } = Je({
35
+ ...e,
36
+ labelElementType: "span",
37
+ isInvalid: t,
38
+ errorMessage: e.errorMessage || l
39
+ }), R = Fe(a, i), C = b["aria-labelledby"] || b.id, { locale: v } = Qe(), O = a.formatValue(v, {
40
+ month: "long"
41
+ }), d = O ? u.format("selectedDateDescription", {
42
+ date: O
43
+ }) : "", T = Ae(d), I = [
44
+ T["aria-describedby"],
45
+ b["aria-describedby"]
46
+ ].filter(Boolean).join(" ") || void 0, P = ae(e), Z = W(() => Ge(i), [
47
+ i
48
+ ]), M = z(!1), { focusWithinProps: D } = Xe({
49
+ ...e,
50
+ isDisabled: a.isOpen,
51
+ onBlurWithin: (y) => {
52
+ let V = document.getElementById(f);
53
+ if (!(V != null && V.contains(y.relatedTarget))) {
54
+ var o, g;
55
+ M.current = !1, (o = e.onBlur) === null || o === void 0 || o.call(e, y), (g = e.onFocusChange) === null || g === void 0 || g.call(e, !1);
56
+ }
57
+ },
58
+ onFocusWithin: (y) => {
59
+ if (!M.current) {
60
+ var V, o;
61
+ M.current = !0, (V = e.onFocus) === null || V === void 0 || V.call(e, y), (o = e.onFocusChange) === null || o === void 0 || o.call(e, !0);
62
+ }
63
+ }
64
+ });
65
+ return {
66
+ groupProps: Me(P, R, b, T, D, {
67
+ role: "group",
68
+ "aria-disabled": e.isDisabled || null,
69
+ "aria-labelledby": C,
70
+ "aria-describedby": I,
71
+ onKeyDown(y) {
72
+ a.isOpen || e.onKeyDown && e.onKeyDown(y);
73
+ },
74
+ onKeyUp(y) {
75
+ a.isOpen || e.onKeyUp && e.onKeyUp(y);
76
+ }
77
+ }),
78
+ labelProps: {
79
+ ...B,
80
+ onClick: () => {
81
+ Z.focusFirst();
82
+ }
83
+ },
84
+ fieldProps: {
85
+ ...b,
86
+ id: s,
87
+ [Re]: "presentation",
88
+ "aria-describedby": I,
89
+ value: a.value,
90
+ onChange: a.setValue,
91
+ placeholderValue: e.placeholderValue,
92
+ hideTimeZone: e.hideTimeZone,
93
+ hourCycle: e.hourCycle,
94
+ shouldForceLeadingZeros: e.shouldForceLeadingZeros,
95
+ granularity: e.granularity,
96
+ isDisabled: e.isDisabled,
97
+ isReadOnly: e.isReadOnly,
98
+ isRequired: e.isRequired,
99
+ validationBehavior: e.validationBehavior,
100
+ // DatePicker owns the validation state for the date field.
101
+ [ue]: a,
102
+ autoFocus: e.autoFocus,
103
+ name: e.name
104
+ },
105
+ descriptionProps: k,
106
+ errorMessageProps: F,
107
+ buttonProps: {
108
+ ...T,
109
+ id: c,
110
+ "aria-haspopup": "dialog",
111
+ "aria-label": u.format("calendar"),
112
+ "aria-labelledby": `${c} ${C}`,
113
+ "aria-describedby": I,
114
+ "aria-expanded": a.isOpen,
115
+ isDisabled: e.isDisabled || e.isReadOnly,
116
+ onPress: () => a.setOpen(!0)
117
+ },
118
+ dialogProps: {
119
+ id: f,
120
+ "aria-labelledby": `${c} ${C}`
121
+ },
122
+ calendarProps: {
123
+ autoFocus: !0,
124
+ value: a.dateValue,
125
+ onChange: a.setDateValue,
126
+ minValue: e.minValue,
127
+ maxValue: e.maxValue,
128
+ isDisabled: e.isDisabled,
129
+ isReadOnly: e.isReadOnly,
130
+ isDateUnavailable: e.isDateUnavailable,
131
+ defaultFocusedValue: a.dateValue ? void 0 : e.placeholderValue,
132
+ isInvalid: a.isInvalid,
133
+ errorMessage: typeof e.errorMessage == "function" ? e.errorMessage(a.displayValidation) : e.errorMessage || a.displayValidation.validationErrors.join(" ")
134
+ },
135
+ isInvalid: t,
136
+ validationErrors: l,
137
+ validationDetails: x
138
+ };
139
+ }
140
+ function ya(e) {
141
+ return e && e.__esModule ? e.default : e;
142
+ }
143
+ function Pa(e, a, i) {
144
+ var c, f, s;
145
+ let u = Ye(ya(Ce), "@react-aria/datepicker"), { isInvalid: t, validationErrors: l, validationDetails: x } = a.displayValidation, { labelProps: B, fieldProps: b, descriptionProps: k, errorMessageProps: F } = Je({
146
+ ...e,
147
+ labelElementType: "span",
148
+ isInvalid: t,
149
+ errorMessage: e.errorMessage || l
150
+ }), R = b["aria-labelledby"] || b.id, { locale: C } = Qe(), v = a.formatValue(C, {
151
+ month: "long"
152
+ }), O = v ? u.format("selectedRangeDescription", {
153
+ startDate: v.start,
154
+ endDate: v.end
155
+ }) : "", d = Ae(O), T = {
156
+ "aria-label": u.format("startDate"),
157
+ "aria-labelledby": R
158
+ }, I = {
159
+ "aria-label": u.format("endDate"),
160
+ "aria-labelledby": R
161
+ }, P = G(), Z = G(), M = Fe(a, i), D = [
162
+ d["aria-describedby"],
163
+ b["aria-describedby"]
164
+ ].filter(Boolean).join(" ") || void 0, y = W(() => Ge(i, {
165
+ // Exclude the button from the focus manager.
166
+ accept: (r) => r.id !== P
167
+ }), [
168
+ i,
169
+ P
170
+ ]), V = {
171
+ [oa]: y,
172
+ [Re]: "presentation",
173
+ "aria-describedby": D,
174
+ placeholderValue: e.placeholderValue,
175
+ hideTimeZone: e.hideTimeZone,
176
+ hourCycle: e.hourCycle,
177
+ granularity: e.granularity,
178
+ shouldForceLeadingZeros: e.shouldForceLeadingZeros,
179
+ isDisabled: e.isDisabled,
180
+ isReadOnly: e.isReadOnly,
181
+ isRequired: e.isRequired,
182
+ validationBehavior: e.validationBehavior
183
+ }, o = ae(e), g = z(!1), { focusWithinProps: E } = Xe({
184
+ ...e,
185
+ isDisabled: a.isOpen,
186
+ onBlurWithin: (r) => {
187
+ let $ = document.getElementById(Z);
188
+ if (!($ != null && $.contains(r.relatedTarget))) {
189
+ var w, K;
190
+ g.current = !1, (w = e.onBlur) === null || w === void 0 || w.call(e, r), (K = e.onFocusChange) === null || K === void 0 || K.call(e, !1);
191
+ }
192
+ },
193
+ onFocusWithin: (r) => {
194
+ if (!g.current) {
195
+ var $, w;
196
+ g.current = !0, ($ = e.onFocus) === null || $ === void 0 || $.call(e, r), (w = e.onFocusChange) === null || w === void 0 || w.call(e, !0);
197
+ }
198
+ }
199
+ }), p = z(Pe), X = z(Pe);
200
+ var n, m;
201
+ return {
202
+ groupProps: Me(o, M, b, d, E, {
203
+ role: "group",
204
+ "aria-disabled": e.isDisabled || null,
205
+ "aria-describedby": D,
206
+ onKeyDown(r) {
207
+ a.isOpen || e.onKeyDown && e.onKeyDown(r);
208
+ },
209
+ onKeyUp(r) {
210
+ a.isOpen || e.onKeyUp && e.onKeyUp(r);
211
+ }
212
+ }),
213
+ labelProps: {
214
+ ...B,
215
+ onClick: () => {
216
+ y.focusFirst();
217
+ }
218
+ },
219
+ buttonProps: {
220
+ ...d,
221
+ id: P,
222
+ "aria-haspopup": "dialog",
223
+ "aria-label": u.format("calendar"),
224
+ "aria-labelledby": `${P} ${R}`,
225
+ "aria-describedby": D,
226
+ "aria-expanded": a.isOpen,
227
+ isDisabled: e.isDisabled || e.isReadOnly,
228
+ onPress: () => a.setOpen(!0)
229
+ },
230
+ dialogProps: {
231
+ id: Z,
232
+ "aria-labelledby": `${P} ${R}`
233
+ },
234
+ startFieldProps: {
235
+ ...T,
236
+ ...V,
237
+ value: (n = (c = a.value) === null || c === void 0 ? void 0 : c.start) !== null && n !== void 0 ? n : null,
238
+ onChange: (r) => a.setDateTime("start", r),
239
+ autoFocus: e.autoFocus,
240
+ name: e.startName,
241
+ [ue]: {
242
+ realtimeValidation: a.realtimeValidation,
243
+ displayValidation: a.displayValidation,
244
+ updateValidation(r) {
245
+ p.current = r, a.updateValidation(Ve(r, X.current));
246
+ },
247
+ resetValidation: a.resetValidation,
248
+ commitValidation: a.commitValidation
249
+ }
250
+ },
251
+ endFieldProps: {
252
+ ...I,
253
+ ...V,
254
+ value: (m = (f = a.value) === null || f === void 0 ? void 0 : f.end) !== null && m !== void 0 ? m : null,
255
+ onChange: (r) => a.setDateTime("end", r),
256
+ name: e.endName,
257
+ [ue]: {
258
+ realtimeValidation: a.realtimeValidation,
259
+ displayValidation: a.displayValidation,
260
+ updateValidation(r) {
261
+ X.current = r, a.updateValidation(Ve(p.current, r));
262
+ },
263
+ resetValidation: a.resetValidation,
264
+ commitValidation: a.commitValidation
265
+ }
266
+ },
267
+ descriptionProps: k,
268
+ errorMessageProps: F,
269
+ calendarProps: {
270
+ autoFocus: !0,
271
+ value: !((s = a.dateRange) === null || s === void 0) && s.start && a.dateRange.end ? a.dateRange : null,
272
+ onChange: a.setDateRange,
273
+ minValue: e.minValue,
274
+ maxValue: e.maxValue,
275
+ isDisabled: e.isDisabled,
276
+ isReadOnly: e.isReadOnly,
277
+ isDateUnavailable: e.isDateUnavailable,
278
+ allowsNonContiguousRanges: e.allowsNonContiguousRanges,
279
+ defaultFocusedValue: a.dateRange ? void 0 : e.placeholderValue,
280
+ isInvalid: a.isInvalid,
281
+ errorMessage: typeof e.errorMessage == "function" ? e.errorMessage(a.displayValidation) : e.errorMessage || a.displayValidation.validationErrors.join(" ")
282
+ },
283
+ isInvalid: t,
284
+ validationErrors: l,
285
+ validationDetails: x
286
+ };
287
+ }
288
+ function Va(e) {
289
+ let a = Ke(e), [i, c] = qe(e.value, e.defaultValue || null, e.onChange), f = i || e.placeholderValue || null, [s, u] = Oe(f, e.granularity), t = i != null ? i.toDate(u ?? "UTC") : null, l = s === "hour" || s === "minute" || s === "second";
290
+ var x;
291
+ let B = (x = e.shouldCloseOnSelect) !== null && x !== void 0 ? x : !0, [b, k] = L(null), [F, R] = L(null);
292
+ if (i && (b = i, "hour" in i && (F = i)), f && !(s in f)) throw new Error("Invalid granularity " + s + " for value " + f.toString());
293
+ let C = (i == null ? void 0 : i.calendar.identifier) === "gregory" && i.era === "BC", v = W(() => ({
294
+ granularity: s,
295
+ timeZone: u,
296
+ hideTimeZone: e.hideTimeZone,
297
+ hourCycle: e.hourCycle,
298
+ shouldForceLeadingZeros: e.shouldForceLeadingZeros,
299
+ showEra: C
300
+ }), [
301
+ s,
302
+ e.hourCycle,
303
+ e.shouldForceLeadingZeros,
304
+ u,
305
+ e.hideTimeZone,
306
+ C
307
+ ]), { minValue: O, maxValue: d, isDateUnavailable: T } = e, I = W(() => sa(i, O, d, T, v), [
308
+ i,
309
+ O,
310
+ d,
311
+ T,
312
+ v
313
+ ]), P = ze({
314
+ ...e,
315
+ value: i,
316
+ builtinValidation: I
317
+ }), Z = P.displayValidation.isInvalid, M = e.validationState || (Z ? "invalid" : null), D = (o, g) => {
318
+ c("timeZone" in g ? g.set(se(o)) : oe(o, g)), k(null), R(null), P.commitValidation();
319
+ };
320
+ return {
321
+ ...P,
322
+ value: i,
323
+ setValue: c,
324
+ dateValue: b,
325
+ timeValue: F,
326
+ setDateValue: (o) => {
327
+ let g = typeof B == "function" ? B() : B;
328
+ l ? F || g ? D(o, F || j(e.defaultValue || e.placeholderValue)) : k(o) : (c(o), P.commitValidation()), g && a.setOpen(!1);
329
+ },
330
+ setTimeValue: (o) => {
331
+ b && o ? D(b, o) : R(o);
332
+ },
333
+ granularity: s,
334
+ hasTime: l,
335
+ ...a,
336
+ setOpen(o) {
337
+ !o && !i && b && l && D(b, F || j(e.defaultValue || e.placeholderValue)), a.setOpen(o);
338
+ },
339
+ validationState: M,
340
+ isInvalid: Z,
341
+ formatValue(o, g) {
342
+ if (!t) return "";
343
+ let E = q(g, v);
344
+ return new A(o, E).format(t);
345
+ },
346
+ getDateFormatter(o, g) {
347
+ let E = {
348
+ ...v,
349
+ ...g
350
+ }, p = q({}, E);
351
+ return new A(o, p);
352
+ }
353
+ };
354
+ }
355
+ function Da(e) {
356
+ var a, i;
357
+ let c = Ke(e), [f, s] = qe(e.value, e.defaultValue || null, e.onChange), [u, t] = L(() => f || {
358
+ start: null,
359
+ end: null
360
+ });
361
+ f == null && u.start && u.end && (u = {
362
+ start: null,
363
+ end: null
364
+ }, t(u));
365
+ let l = f || u, x = (n) => {
366
+ t(n || {
367
+ start: null,
368
+ end: null
369
+ }), U(n) ? s(n) : s(null);
370
+ }, B = (l == null ? void 0 : l.start) || (l == null ? void 0 : l.end) || e.placeholderValue || null, [b, k] = Oe(B, e.granularity), F = b === "hour" || b === "minute" || b === "second";
371
+ var R;
372
+ let C = (R = e.shouldCloseOnSelect) !== null && R !== void 0 ? R : !0, [v, O] = L(null), [d, T] = L(null);
373
+ l && U(l) && (v = l, "hour" in l.start && (d = l));
374
+ let I = (n, m) => {
375
+ x({
376
+ start: "timeZone" in m.start ? m.start.set(se(n.start)) : oe(n.start, m.start),
377
+ end: "timeZone" in m.end ? m.end.set(se(n.end)) : oe(n.end, m.end)
378
+ }), O(null), T(null), E.commitValidation();
379
+ }, P = (n) => {
380
+ let m = typeof C == "function" ? C() : C;
381
+ F ? U(n) && (m || d != null && d.start && (d != null && d.end)) ? I(n, {
382
+ start: (d == null ? void 0 : d.start) || j(e.placeholderValue),
383
+ end: (d == null ? void 0 : d.end) || j(e.placeholderValue)
384
+ }) : O(n) : U(n) ? (x(n), E.commitValidation()) : O(n), m && c.setOpen(!1);
385
+ }, Z = (n) => {
386
+ U(v) && U(n) ? I(v, n) : T(n);
387
+ }, M = (l == null || (a = l.start) === null || a === void 0 ? void 0 : a.calendar.identifier) === "gregory" && l.start.era === "BC" || (l == null || (i = l.end) === null || i === void 0 ? void 0 : i.calendar.identifier) === "gregory" && l.end.era === "BC", D = W(() => ({
388
+ granularity: b,
389
+ timeZone: k,
390
+ hideTimeZone: e.hideTimeZone,
391
+ hourCycle: e.hourCycle,
392
+ shouldForceLeadingZeros: e.shouldForceLeadingZeros,
393
+ showEra: M
394
+ }), [
395
+ b,
396
+ e.hourCycle,
397
+ e.shouldForceLeadingZeros,
398
+ k,
399
+ e.hideTimeZone,
400
+ M
401
+ ]), { minValue: y, maxValue: V, isDateUnavailable: o } = e, g = W(() => ua(l, y, V, o, D), [
402
+ l,
403
+ y,
404
+ V,
405
+ o,
406
+ D
407
+ ]), E = ze({
408
+ ...e,
409
+ value: f,
410
+ name: W(() => [
411
+ e.startName,
412
+ e.endName
413
+ ].filter((n) => n != null), [
414
+ e.startName,
415
+ e.endName
416
+ ]),
417
+ builtinValidation: g
418
+ }), p = E.displayValidation.isInvalid, X = e.validationState || (p ? "invalid" : null);
419
+ return {
420
+ ...E,
421
+ value: l,
422
+ setValue: x,
423
+ dateRange: v,
424
+ timeRange: d,
425
+ granularity: b,
426
+ hasTime: F,
427
+ setDate(n, m) {
428
+ var r, $;
429
+ P(n === "start" ? {
430
+ start: m,
431
+ end: (r = v == null ? void 0 : v.end) !== null && r !== void 0 ? r : null
432
+ } : {
433
+ start: ($ = v == null ? void 0 : v.start) !== null && $ !== void 0 ? $ : null,
434
+ end: m
435
+ });
436
+ },
437
+ setTime(n, m) {
438
+ var r, $;
439
+ Z(n === "start" ? {
440
+ start: m,
441
+ end: (r = d == null ? void 0 : d.end) !== null && r !== void 0 ? r : null
442
+ } : {
443
+ start: ($ = d == null ? void 0 : d.start) !== null && $ !== void 0 ? $ : null,
444
+ end: m
445
+ });
446
+ },
447
+ setDateTime(n, m) {
448
+ var r, $;
449
+ x(n === "start" ? {
450
+ start: m,
451
+ end: (r = l == null ? void 0 : l.end) !== null && r !== void 0 ? r : null
452
+ } : {
453
+ start: ($ = l == null ? void 0 : l.start) !== null && $ !== void 0 ? $ : null,
454
+ end: m
455
+ });
456
+ },
457
+ setDateRange: P,
458
+ setTimeRange: Z,
459
+ ...c,
460
+ setOpen(n) {
461
+ !n && !(l != null && l.start && (l != null && l.end)) && U(v) && F && I(v, {
462
+ start: (d == null ? void 0 : d.start) || j(e.placeholderValue),
463
+ end: (d == null ? void 0 : d.end) || j(e.placeholderValue)
464
+ }), c.setOpen(n);
465
+ },
466
+ validationState: X,
467
+ isInvalid: p,
468
+ formatValue(n, m) {
469
+ if (!l || !l.start || !l.end) return null;
470
+ let r = "timeZone" in l.start ? l.start.timeZone : void 0, $ = e.granularity || (l.start && "minute" in l.start ? "minute" : "day"), w = "timeZone" in l.end ? l.end.timeZone : void 0, K = e.granularity || (l.end && "minute" in l.end ? "minute" : "day"), ia = q(m, {
471
+ granularity: $,
472
+ timeZone: r,
473
+ hideTimeZone: e.hideTimeZone,
474
+ hourCycle: e.hourCycle,
475
+ showEra: l.start.calendar.identifier === "gregory" && l.start.era === "BC" || l.end.calendar.identifier === "gregory" && l.end.era === "BC"
476
+ }), $e = l.start.toDate(r || "UTC"), he = l.end.toDate(w || "UTC"), le = new A(n, ia), ie;
477
+ if (r === w && $ === K && l.start.compare(l.end) !== 0) {
478
+ try {
479
+ let S = le.formatRangeToParts($e, he), te = -1;
480
+ for (let _ = 0; _ < S.length; _++) {
481
+ let de = S[_];
482
+ if (de.source === "shared" && de.type === "literal") te = _;
483
+ else if (de.source === "endRange") break;
484
+ }
485
+ let ge = "", ye = "";
486
+ for (let _ = 0; _ < S.length; _++)
487
+ _ < te ? ge += S[_].value : _ > te && (ye += S[_].value);
488
+ return {
489
+ start: ge,
490
+ end: ye
491
+ };
492
+ } catch {
493
+ }
494
+ ie = le;
495
+ } else {
496
+ let S = q(m, {
497
+ granularity: K,
498
+ timeZone: w,
499
+ hideTimeZone: e.hideTimeZone,
500
+ hourCycle: e.hourCycle
501
+ });
502
+ ie = new A(n, S);
503
+ }
504
+ return {
505
+ start: le.format($e),
506
+ end: ie.format(he)
507
+ };
508
+ },
509
+ getDateFormatter(n, m) {
510
+ let r = {
511
+ ...D,
512
+ ...m
513
+ }, $ = q({}, r);
514
+ return new A(n, $);
515
+ }
516
+ };
517
+ }
518
+ function U(e) {
519
+ return (e == null ? void 0 : e.start) != null && e.end != null;
520
+ }
521
+ const xa = /* @__PURE__ */ ee(null), Fa = /* @__PURE__ */ ee(null), Ra = /* @__PURE__ */ ee(null), Ca = /* @__PURE__ */ ee(null), ea = [
522
+ be,
523
+ fe,
524
+ ve,
525
+ me
526
+ ], Oa = /* @__PURE__ */ De(function(a, i) {
527
+ [a, i] = Be(a, i, xa);
528
+ let { validationBehavior: c } = ke(Le) || {};
529
+ var f, s;
530
+ let u = (s = (f = a.validationBehavior) !== null && f !== void 0 ? f : c) !== null && s !== void 0 ? s : "native", t = Va({
531
+ ...a,
532
+ validationBehavior: u
533
+ }), l = z(null), [x, B] = we(!a["aria-label"] && !a["aria-labelledby"]), { groupProps: b, labelProps: k, fieldProps: F, buttonProps: R, dialogProps: C, calendarProps: v, descriptionProps: O, errorMessageProps: d, ...T } = ga({
534
+ ..._e(a),
535
+ label: B,
536
+ validationBehavior: u
537
+ }, t, l), [I, P] = L(null), Z = xe(() => {
538
+ l.current && P(l.current.offsetWidth + "px");
539
+ }, []);
540
+ je({
541
+ ref: l,
542
+ onResize: Z
543
+ });
544
+ let { focusProps: M, isFocused: D, isFocusVisible: y } = He({
545
+ within: !0
546
+ }), V = Ee({
547
+ ...a,
548
+ values: {
549
+ state: t,
550
+ isFocusWithin: D,
551
+ isFocusVisible: y,
552
+ isDisabled: a.isDisabled || !1,
553
+ isInvalid: t.isInvalid,
554
+ isOpen: t.isOpen
555
+ },
556
+ defaultClassName: "react-aria-DatePicker"
557
+ }), o = ae(a);
558
+ return delete o.id, /* @__PURE__ */ J.createElement(pe, {
559
+ values: [
560
+ [
561
+ Ra,
562
+ t
563
+ ],
564
+ [
565
+ be,
566
+ {
567
+ ...b,
568
+ ref: l,
569
+ isInvalid: t.isInvalid
570
+ }
571
+ ],
572
+ [
573
+ Te,
574
+ F
575
+ ],
576
+ [
577
+ fe,
578
+ {
579
+ ...R,
580
+ isPressed: t.isOpen
581
+ }
582
+ ],
583
+ [
584
+ ve,
585
+ {
586
+ ...k,
587
+ ref: x,
588
+ elementType: "span"
589
+ }
590
+ ],
591
+ [
592
+ ta,
593
+ v
594
+ ],
595
+ [
596
+ Se,
597
+ t
598
+ ],
599
+ [
600
+ Ue,
601
+ {
602
+ trigger: "DatePicker",
603
+ triggerRef: l,
604
+ placement: "bottom start",
605
+ style: {
606
+ "--trigger-width": I
607
+ },
608
+ clearContexts: ea
609
+ }
610
+ ],
611
+ [
612
+ Ne,
613
+ C
614
+ ],
615
+ [
616
+ me,
617
+ {
618
+ slots: {
619
+ description: O,
620
+ errorMessage: d
621
+ }
622
+ }
623
+ ],
624
+ [
625
+ We,
626
+ T
627
+ ]
628
+ ]
629
+ }, /* @__PURE__ */ J.createElement("div", {
630
+ ...M,
631
+ ...o,
632
+ ...V,
633
+ ref: i,
634
+ slot: a.slot || void 0,
635
+ "data-focus-within": D || void 0,
636
+ "data-invalid": t.isInvalid || void 0,
637
+ "data-focus-visible": y || void 0,
638
+ "data-disabled": a.isDisabled || void 0,
639
+ "data-open": t.isOpen || void 0
640
+ }));
641
+ }), Ta = /* @__PURE__ */ De(function(a, i) {
642
+ [a, i] = Be(a, i, Fa);
643
+ let { validationBehavior: c } = ke(Le) || {};
644
+ var f, s;
645
+ let u = (s = (f = a.validationBehavior) !== null && f !== void 0 ? f : c) !== null && s !== void 0 ? s : "native", t = Da({
646
+ ...a,
647
+ validationBehavior: u
648
+ }), l = z(null), [x, B] = we(!a["aria-label"] && !a["aria-labelledby"]), { groupProps: b, labelProps: k, startFieldProps: F, endFieldProps: R, buttonProps: C, dialogProps: v, calendarProps: O, descriptionProps: d, errorMessageProps: T, ...I } = Pa({
649
+ ..._e(a),
650
+ label: B,
651
+ validationBehavior: u
652
+ }, t, l), [P, Z] = L(null), M = xe(() => {
653
+ l.current && Z(l.current.offsetWidth + "px");
654
+ }, []);
655
+ je({
656
+ ref: l,
657
+ onResize: M
658
+ });
659
+ let { focusProps: D, isFocused: y, isFocusVisible: V } = He({
660
+ within: !0
661
+ }), o = Ee({
662
+ ...a,
663
+ values: {
664
+ state: t,
665
+ isFocusWithin: y,
666
+ isFocusVisible: V,
667
+ isDisabled: a.isDisabled || !1,
668
+ isInvalid: t.isInvalid,
669
+ isOpen: t.isOpen
670
+ },
671
+ defaultClassName: "react-aria-DateRangePicker"
672
+ }), g = ae(a);
673
+ return delete g.id, /* @__PURE__ */ J.createElement(pe, {
674
+ values: [
675
+ [
676
+ Ca,
677
+ t
678
+ ],
679
+ [
680
+ be,
681
+ {
682
+ ...b,
683
+ ref: l,
684
+ isInvalid: t.isInvalid
685
+ }
686
+ ],
687
+ [
688
+ fe,
689
+ {
690
+ ...C,
691
+ isPressed: t.isOpen
692
+ }
693
+ ],
694
+ [
695
+ ve,
696
+ {
697
+ ...k,
698
+ ref: x,
699
+ elementType: "span"
700
+ }
701
+ ],
702
+ [
703
+ da,
704
+ O
705
+ ],
706
+ [
707
+ Se,
708
+ t
709
+ ],
710
+ [
711
+ Ue,
712
+ {
713
+ trigger: "DateRangePicker",
714
+ triggerRef: l,
715
+ placement: "bottom start",
716
+ style: {
717
+ "--trigger-width": P
718
+ },
719
+ clearContexts: ea
720
+ }
721
+ ],
722
+ [
723
+ Ne,
724
+ v
725
+ ],
726
+ [
727
+ Te,
728
+ {
729
+ slots: {
730
+ start: F,
731
+ end: R
732
+ }
733
+ }
734
+ ],
735
+ [
736
+ me,
737
+ {
738
+ slots: {
739
+ description: d,
740
+ errorMessage: T
741
+ }
742
+ }
743
+ ],
744
+ [
745
+ We,
746
+ I
747
+ ]
748
+ ]
749
+ }, /* @__PURE__ */ J.createElement("div", {
750
+ ...D,
751
+ ...g,
752
+ ...o,
753
+ ref: i,
754
+ slot: a.slot || void 0,
755
+ "data-focus-within": y || void 0,
756
+ "data-invalid": t.isInvalid || void 0,
757
+ "data-focus-visible": V || void 0,
758
+ "data-disabled": a.isDisabled || void 0,
759
+ "data-open": t.isOpen || void 0
760
+ }));
761
+ });
762
+ /**
763
+ * @license lucide-react v0.453.0 - ISC
764
+ *
765
+ * This source code is licensed under the ISC license.
766
+ * See the LICENSE file in the root directory of this source tree.
767
+ */
768
+ const Ia = $a("CalendarDays", [
769
+ ["path", { d: "M8 2v4", key: "1cmpym" }],
770
+ ["path", { d: "M16 2v4", key: "4m81vk" }],
771
+ ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
772
+ ["path", { d: "M3 10h18", key: "8toen8" }],
773
+ ["path", { d: "M8 14h.01", key: "6423bh" }],
774
+ ["path", { d: "M12 14h.01", key: "1etili" }],
775
+ ["path", { d: "M16 14h.01", key: "1gbofw" }],
776
+ ["path", { d: "M8 18h.01", key: "lrp35t" }],
777
+ ["path", { d: "M12 18h.01", key: "mhygvu" }],
778
+ ["path", { d: "M16 18h.01", key: "kzsmim" }]
779
+ ]), Za = "_datePicker_1ro4s_4", Ma = "_inputField_1ro4s_11", Ba = "_medium_1ro4s_23", ka = "_calendarButton_1ro4s_50", wa = "_dialog_1ro4s_97", N = {
780
+ datePicker: Za,
781
+ inputField: Ma,
782
+ medium: Ba,
783
+ calendarButton: ka,
784
+ dialog: wa
785
+ }, aa = ({
786
+ children: e,
787
+ isDisabled: a,
788
+ isInvalid: i,
789
+ size: c = "large"
790
+ }) => /* @__PURE__ */ H(
791
+ ma,
792
+ {
793
+ className: Q(N.inputField, {
794
+ [N.medium]: c === "medium"
795
+ }),
796
+ children: [
797
+ e,
798
+ /* @__PURE__ */ h(
799
+ fa,
800
+ {
801
+ className: Q(N.calendarButton, {
802
+ [N.medium]: c === "medium"
803
+ }),
804
+ "data-invalid": i || void 0,
805
+ isDisabled: a,
806
+ children: /* @__PURE__ */ h(
807
+ Ia,
808
+ {
809
+ "aria-hidden": !0,
810
+ size: 20
811
+ }
812
+ )
813
+ }
814
+ )
815
+ ]
816
+ }
817
+ ), la = ce.forwardRef(({ children: e }, a) => /* @__PURE__ */ h(
818
+ ba,
819
+ {
820
+ UNSTABLE_portalContainer: typeof a != "function" && (a == null ? void 0 : a.current) || void 0,
821
+ children: /* @__PURE__ */ h(va, { className: N.dialog, children: e })
822
+ }
823
+ )), sl = ({
824
+ className: e,
825
+ description: a,
826
+ errorMessage: i,
827
+ errorPosition: c = "top",
828
+ label: f,
829
+ ...s
830
+ }) => {
831
+ const u = ce.useRef(null);
832
+ return /* @__PURE__ */ H(
833
+ Oa,
834
+ {
835
+ className: Q(N.datePicker, e),
836
+ ref: u,
837
+ ...s,
838
+ children: [
839
+ /* @__PURE__ */ h(Ie, { children: f }),
840
+ a && /* @__PURE__ */ h(Ze, { slot: "description", children: a }),
841
+ c === "top" && /* @__PURE__ */ h(Y, { children: i }),
842
+ /* @__PURE__ */ h(aa, { ...s, children: /* @__PURE__ */ h(ne, { children: (t) => /* @__PURE__ */ h(re, { segment: t }) }) }),
843
+ c === "bottom" && /* @__PURE__ */ h(Y, { children: i }),
844
+ /* @__PURE__ */ h(la, { ref: u, children: /* @__PURE__ */ h(na, {}) })
845
+ ]
846
+ }
847
+ );
848
+ }, ul = ({
849
+ className: e,
850
+ description: a,
851
+ errorMessage: i,
852
+ errorPosition: c = "top",
853
+ label: f,
854
+ ...s
855
+ }) => {
856
+ const u = ce.useRef(null);
857
+ return /* @__PURE__ */ H(
858
+ Ta,
859
+ {
860
+ className: Q(N.datePicker, e),
861
+ ref: u,
862
+ ...s,
863
+ children: [
864
+ /* @__PURE__ */ h(Ie, { children: f }),
865
+ a && /* @__PURE__ */ h(Ze, { slot: "description", children: a }),
866
+ c === "top" && /* @__PURE__ */ h(Y, { children: i }),
867
+ /* @__PURE__ */ H(aa, { ...s, children: [
868
+ /* @__PURE__ */ h(ne, { slot: "start", children: (t) => /* @__PURE__ */ h(re, { segment: t }) }),
869
+ /* @__PURE__ */ h(ca, {}),
870
+ /* @__PURE__ */ h(ne, { slot: "end", children: (t) => /* @__PURE__ */ h(re, { segment: t }) })
871
+ ] }),
872
+ c === "bottom" && /* @__PURE__ */ h(Y, { children: i }),
873
+ /* @__PURE__ */ h(la, { ref: u, children: /* @__PURE__ */ h(ra, {}) })
874
+ ]
875
+ }
876
+ );
877
+ };
878
+ export {
879
+ sl as D,
880
+ ul as a
881
+ };