@easypost/easy-ui 1.0.0-alpha.60 → 1.0.0-alpha.62

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 (289) hide show
  1. package/Badge/index.js +14 -14
  2. package/Badge/index.mjs +14 -14
  3. package/Banner/index.js +5 -5
  4. package/Banner/index.mjs +5 -5
  5. package/Button/index.js +1 -1
  6. package/Button/index.mjs +1 -1
  7. package/CHANGELOG.md +12 -0
  8. package/Calendar/CalendarCell.d.ts.map +1 -1
  9. package/Calendar/index.js +2 -40
  10. package/Calendar/index.mjs +2 -40
  11. package/Card/index.js +1 -1
  12. package/Card/index.mjs +1 -1
  13. package/Checkbox/index.js +1 -1
  14. package/Checkbox/index.mjs +1 -1
  15. package/CodeBlock/index.js +14 -14
  16. package/CodeBlock/index.mjs +16 -16
  17. package/CodeSnippet/index.js +1 -1
  18. package/CodeSnippet/index.mjs +1 -1
  19. package/DataGrid/index.js +69 -68
  20. package/DataGrid/index.mjs +75 -74
  21. package/DatePicker/DateField.d.ts +14 -0
  22. package/DatePicker/DateField.d.ts.map +1 -0
  23. package/DatePicker/DatePicker.d.ts +91 -0
  24. package/DatePicker/DatePicker.d.ts.map +1 -0
  25. package/DatePicker/DatePicker.stories.d.ts +14 -0
  26. package/DatePicker/DatePicker.stories.d.ts.map +1 -0
  27. package/DatePicker/DatePicker.test.d.ts +2 -0
  28. package/DatePicker/DatePicker.test.d.ts.map +1 -0
  29. package/DatePicker/DatePickerBase.d.ts +32 -0
  30. package/DatePicker/DatePickerBase.d.ts.map +1 -0
  31. package/DatePicker/DatePickerOverlay.d.ts +12 -0
  32. package/DatePicker/DatePickerOverlay.d.ts.map +1 -0
  33. package/DatePicker/DatePickerTrigger.d.ts +20 -0
  34. package/DatePicker/DatePickerTrigger.d.ts.map +1 -0
  35. package/DatePicker/index.d.ts +2 -0
  36. package/DatePicker/index.d.ts.map +1 -0
  37. package/DatePicker/index.js +275 -0
  38. package/DatePicker/index.mjs +275 -0
  39. package/DateRangePicker/DateRangePicker.d.ts +89 -0
  40. package/DateRangePicker/DateRangePicker.d.ts.map +1 -0
  41. package/DateRangePicker/DateRangePicker.stories.d.ts +14 -0
  42. package/DateRangePicker/DateRangePicker.stories.d.ts.map +1 -0
  43. package/DateRangePicker/DateRangePicker.test.d.ts +2 -0
  44. package/DateRangePicker/DateRangePicker.test.d.ts.map +1 -0
  45. package/DateRangePicker/index.d.ts +2 -0
  46. package/DateRangePicker/index.d.ts.map +1 -0
  47. package/DateRangePicker/index.js +434 -0
  48. package/DateRangePicker/index.mjs +434 -0
  49. package/Drawer/index.js +25 -24
  50. package/Drawer/index.mjs +22 -21
  51. package/DropdownButton/index.js +13 -13
  52. package/DropdownButton/index.mjs +13 -13
  53. package/EmptyStateCard/index.js +8 -8
  54. package/EmptyStateCard/index.mjs +8 -8
  55. package/FocusedProductLayout/index.js +25 -78
  56. package/FocusedProductLayout/index.mjs +24 -61
  57. package/ForgeLayout/ForgeLayout.d.ts +14 -22
  58. package/ForgeLayout/ForgeLayout.d.ts.map +1 -1
  59. package/ForgeLayout/ForgeLayout.stories.d.ts.map +1 -1
  60. package/ForgeLayout/ForgeLayoutControls.d.ts +38 -0
  61. package/ForgeLayout/ForgeLayoutControls.d.ts.map +1 -0
  62. package/ForgeLayout/ForgeLayoutHeader.d.ts +18 -0
  63. package/ForgeLayout/ForgeLayoutHeader.d.ts.map +1 -0
  64. package/ForgeLayout/index.js +426 -62
  65. package/ForgeLayout/index.mjs +429 -65
  66. package/FormLayout/index.js +5 -5
  67. package/FormLayout/index.mjs +5 -5
  68. package/HorizontalGrid/index.js +1 -1
  69. package/HorizontalGrid/index.mjs +1 -1
  70. package/HorizontalStack/index.js +1 -1
  71. package/HorizontalStack/index.mjs +1 -1
  72. package/Icon/index.js +1 -1
  73. package/Icon/index.mjs +1 -1
  74. package/IconButton/index.js +13 -13
  75. package/IconButton/index.mjs +13 -13
  76. package/InputField/index.js +1 -1
  77. package/InputField/index.mjs +1 -1
  78. package/KebabButton/index.js +1 -1
  79. package/KebabButton/index.mjs +1 -1
  80. package/Menu/index.js +1 -1
  81. package/Menu/index.mjs +1 -1
  82. package/Modal/index.js +26 -25
  83. package/Modal/index.mjs +23 -22
  84. package/NexusLayout/index.js +30 -30
  85. package/NexusLayout/index.mjs +32 -32
  86. package/Notification/index.js +1 -1
  87. package/Notification/index.mjs +1 -1
  88. package/Pagination/index.js +8 -8
  89. package/Pagination/index.mjs +8 -8
  90. package/PillGroup/index.js +17 -16
  91. package/PillGroup/index.mjs +25 -24
  92. package/ProductLayout/index.js +28 -27
  93. package/ProductLayout/index.mjs +26 -25
  94. package/Provider/index.js +2 -2
  95. package/Provider/index.mjs +2 -2
  96. package/RadioButtonGroup/index.js +5 -5
  97. package/RadioButtonGroup/index.mjs +8 -8
  98. package/RadioGroup/index.js +3 -332
  99. package/RadioGroup/index.mjs +3 -332
  100. package/RangeCalendar/RangeCalendar.test.d.ts +2 -1
  101. package/RangeCalendar/RangeCalendar.test.d.ts.map +1 -1
  102. package/RangeCalendar/index.js +2 -226
  103. package/RangeCalendar/index.mjs +2 -226
  104. package/SearchNav/index.js +50 -86
  105. package/SearchNav/index.mjs +50 -86
  106. package/SectionCard/index.js +7 -7
  107. package/SectionCard/index.mjs +7 -7
  108. package/Select/index.js +8 -7
  109. package/Select/index.mjs +6 -5
  110. package/SelectorErrorTooltip/index.js +1 -1
  111. package/SelectorErrorTooltip/index.mjs +1 -1
  112. package/Spinner/index.js +1 -1
  113. package/Spinner/index.mjs +1 -1
  114. package/SplitToggleCard/index.js +4 -4
  115. package/SplitToggleCard/index.mjs +4 -4
  116. package/Stepper/index.js +1 -1
  117. package/Stepper/index.mjs +1 -1
  118. package/TabNav/index.js +1 -1
  119. package/TabNav/index.mjs +1 -1
  120. package/TabPanels/index.js +4 -4
  121. package/TabPanels/index.mjs +10 -10
  122. package/Tabs/index.js +1 -1
  123. package/Tabs/index.mjs +1 -1
  124. package/Text/index.js +1 -1
  125. package/Text/index.mjs +1 -1
  126. package/TextField/index.js +2 -43
  127. package/TextField/index.mjs +2 -43
  128. package/Textarea/index.js +1 -1
  129. package/Textarea/index.mjs +1 -1
  130. package/Toggle/index.js +1 -1
  131. package/Toggle/index.mjs +1 -1
  132. package/ToggleCard/index.js +2 -2
  133. package/ToggleCard/index.mjs +2 -2
  134. package/Tooltip/index.js +1 -1
  135. package/Tooltip/index.mjs +1 -1
  136. package/UnstyledButton/index.js +1 -1
  137. package/UnstyledButton/index.mjs +1 -1
  138. package/VerticalNav/index.js +25 -25
  139. package/VerticalNav/index.mjs +28 -28
  140. package/VerticalStack/index.js +1 -1
  141. package/VerticalStack/index.mjs +1 -1
  142. package/__chunks__/ArrowBack-BFS-tCpV.mjs +41 -0
  143. package/__chunks__/ArrowBack-C_LSatif.js +57 -0
  144. package/__chunks__/{Button-D8vjHIx8.js → Button-BvLvcmfd.js} +7 -3
  145. package/__chunks__/{Button-D0YAQvKG.mjs → Button-CDRssWxC.mjs} +13 -9
  146. package/__chunks__/{Button-bGGT-c6v.mjs → Button-D7ivIUf4.mjs} +18 -18
  147. package/__chunks__/{Button-DuqSI9GS.js → Button-Dcxti-xS.js} +18 -18
  148. package/__chunks__/Calendar-D9bC6_UA.js +41 -0
  149. package/__chunks__/Calendar-WxiJzkoO.mjs +42 -0
  150. package/__chunks__/{CalendarBase-CiBPzvL4.js → CalendarBase-BYEUj-DL.js} +97 -25
  151. package/__chunks__/{CalendarBase-DbXh9rhk.mjs → CalendarBase-B_2qDiO8.mjs} +104 -32
  152. package/__chunks__/{Card-93kQP9IL.js → Card-B0ACXPm1.js} +12 -12
  153. package/__chunks__/{Card-DdHvpDEw.mjs → Card-CwZYA0Rd.mjs} +12 -12
  154. package/__chunks__/{Checkbox-MbPCVxqs.js → Checkbox-CO5WIkp8.js} +22 -22
  155. package/__chunks__/{Checkbox-BRrfKcFE.mjs → Checkbox-DGX3jXaj.mjs} +24 -24
  156. package/__chunks__/{CodeSnippet-D9ZZXVs3.js → CodeSnippet-CY3KR9Ex.js} +2 -2
  157. package/__chunks__/{CodeSnippet-xb-psm_O.mjs → CodeSnippet-DIWeGxFL.mjs} +2 -2
  158. package/__chunks__/DatePickerBase-BP_jPq4G.mjs +3152 -0
  159. package/__chunks__/DatePickerBase-C6kR9zvT.js +3166 -0
  160. package/__chunks__/{FocusScope-Co1hHX8R.js → FocusScope-DFE0IeGl.js} +1 -1
  161. package/__chunks__/{FocusScope-CEeqhVmO.mjs → FocusScope-Qg8vUhZ_.mjs} +5 -5
  162. package/__chunks__/{HelpMenu-CCHBb1Kr.mjs → HelpMenu-QryDILTE.mjs} +7 -7
  163. package/__chunks__/{HelpMenu-E6z6tRl8.js → HelpMenu-nmkAgUqs.js} +7 -7
  164. package/__chunks__/{HorizontalGrid-vw7R2Tld.mjs → HorizontalGrid-CX45xj2U.mjs} +1 -1
  165. package/__chunks__/{HorizontalGrid-B7ijxURd.js → HorizontalGrid-cSfGLAIn.js} +1 -1
  166. package/__chunks__/{HorizontalStack-Dx9zYaH0.mjs → HorizontalStack-CdtNq_TW.mjs} +1 -1
  167. package/__chunks__/{HorizontalStack-1g4N72TF.js → HorizontalStack-D4ecxt6R.js} +1 -1
  168. package/__chunks__/{Icon-QGDwoR1f.mjs → Icon-BNi1LKXX.mjs} +2 -2
  169. package/__chunks__/{Icon-oPEVg2C8.js → Icon-Pxk1cmPj.js} +2 -2
  170. package/__chunks__/InputCaption-BzH_oClR.js +60 -0
  171. package/__chunks__/InputCaption-DaOqqN-Z.mjs +61 -0
  172. package/__chunks__/{InputField-BI73lSp6.mjs → InputField-0omK7H0I.mjs} +11 -10
  173. package/__chunks__/{InputField-BGBRvVMR.js → InputField-Blilgkum.js} +9 -8
  174. package/__chunks__/InputIcon-CUhKpP7V.mjs +112 -0
  175. package/__chunks__/InputIcon-DGOX-4el.js +111 -0
  176. package/__chunks__/{KebabButton-DBLcfQI6.mjs → KebabButton-CrkSDYoR.mjs} +5 -5
  177. package/__chunks__/{KebabButton-C15-V-k2.js → KebabButton-DH5KZwlY.js} +5 -5
  178. package/__chunks__/{LiveAnnouncer-Bi_Y3tfX.mjs → LiveAnnouncer-BSV5-C0m.mjs} +5 -1
  179. package/__chunks__/{LiveAnnouncer-Dwkwacle.js → LiveAnnouncer-CzeNwq2D.js} +4 -0
  180. package/__chunks__/{Menu-BELtbX2b.mjs → Menu-CbEch8RV.mjs} +23 -21
  181. package/__chunks__/{Menu-Cuqxc1iw.js → Menu-D8tCyOf5.js} +36 -34
  182. package/__chunks__/{Notification-lqESwByD.mjs → Notification-BS8B_D0s.mjs} +20 -20
  183. package/__chunks__/{Notification-D90-75ZN.js → Notification-COhKVqOV.js} +17 -17
  184. package/__chunks__/{Spinner-D3LMSY80.js → NumberFormatter-CXW1Iqpu.js} +1 -79
  185. package/__chunks__/{Spinner-tHEG0z1g.mjs → NumberFormatter-p5KNJNTT.mjs} +1 -79
  186. package/__chunks__/{Overlay-ZinDp2HW.js → Overlay-Dmwy9VjC.js} +59 -3
  187. package/__chunks__/{Overlay-CuhLUuXt.mjs → Overlay-DyfvFsGi.mjs} +64 -8
  188. package/__chunks__/RadioGroup-CCObCqda.js +333 -0
  189. package/__chunks__/RadioGroup-DZxaIqD6.mjs +334 -0
  190. package/__chunks__/RangeCalendar-CPEW2_Ij.mjs +228 -0
  191. package/__chunks__/RangeCalendar-V_YZXfhI.js +227 -0
  192. package/__chunks__/Search-BY7IgEyX.js +57 -0
  193. package/__chunks__/Search-Cyblmqo5.mjs +41 -0
  194. package/__chunks__/{SelectOverlay-pFcbx7UM.js → SelectOverlay-CvCbJFfX.js} +38 -36
  195. package/__chunks__/{SelectOverlay-CadnQpV0.mjs → SelectOverlay-DdC6a9yW.mjs} +36 -34
  196. package/__chunks__/{SelectionManager-IO4G_cI2.mjs → SelectionManager-DCO_d3m1.mjs} +2 -2
  197. package/__chunks__/{SelectorErrorTooltip-Cfzpo7X3.js → SelectorErrorTooltip-BK76kp1j.js} +4 -4
  198. package/__chunks__/{SelectorErrorTooltip-CFlgzXu5.mjs → SelectorErrorTooltip-Cja4A8Yq.mjs} +4 -4
  199. package/__chunks__/Spinner-BOumHc9g.js +100 -0
  200. package/__chunks__/Spinner-D5Cnx9wv.mjs +101 -0
  201. package/__chunks__/{Stepper-B0w3sKYh.mjs → Stepper-B4VoJaxe.mjs} +28 -28
  202. package/__chunks__/{Stepper-Bbihngk4.js → Stepper-CZsNTl_A.js} +26 -26
  203. package/__chunks__/{TabNav-2W0d3JQ0.mjs → TabNav-C0dTC1c_.mjs} +1 -1
  204. package/__chunks__/{TabNav-BHETvib0.js → TabNav-DFFWhGpM.js} +1 -1
  205. package/__chunks__/{Tabs-9dihRp0n.js → Tabs-DbfPjHiY.js} +17 -17
  206. package/__chunks__/{Tabs-C-D794Gi.mjs → Tabs-MBY9JDS4.mjs} +19 -19
  207. package/__chunks__/{Text-CEI17LPu.js → Text-Bbhl1fdd.js} +34 -34
  208. package/__chunks__/{Text-D8wg72pq.mjs → Text-tpkE6IlH.mjs} +34 -34
  209. package/__chunks__/TextField-B57OAIEI.mjs +45 -0
  210. package/__chunks__/TextField-Mi3s9lvx.js +44 -0
  211. package/__chunks__/{Toggle-DlIBs_Za.mjs → Toggle-CHcQwbtX.mjs} +14 -14
  212. package/__chunks__/{Toggle-4oQhSggV.js → Toggle-Ctc8EPUL.js} +12 -12
  213. package/__chunks__/{Tooltip-7wXzqEZl.js → Tooltip-Cf1iqjg9.js} +11 -11
  214. package/__chunks__/{Tooltip-Cxv7qnVD.mjs → Tooltip-DdaxfuX_.mjs} +13 -13
  215. package/__chunks__/{UnstyledButton-B7BScs8i.mjs → UnstyledButton-CrSLb-W8.mjs} +2 -2
  216. package/__chunks__/{UnstyledButton-Dn8KZHdh.js → UnstyledButton-DfjYrePV.js} +1 -1
  217. package/__chunks__/{VerticalStack-BTB8fX9P.js → VerticalStack-BkqSVZuy.js} +3 -3
  218. package/__chunks__/{VerticalStack-HnwP17N3.mjs → VerticalStack-CeDKl8Ee.mjs} +3 -3
  219. package/__chunks__/{VisuallyHidden-BttNIgVC.mjs → VisuallyHidden-BC5PXI9q.mjs} +2 -2
  220. package/__chunks__/{ariaHideOutside-DNGR3Fo6.js → ariaHideOutside-B6WqGXJj.js} +1 -25
  221. package/__chunks__/{ariaHideOutside-DcIkumuG.mjs → ariaHideOutside-CxWZQtI1.mjs} +5 -29
  222. package/__chunks__/{context-DEwqildc.mjs → context-BZCcafjG.mjs} +1 -1
  223. package/__chunks__/{context-C6CFGY_J.js → context-CYcq9Zvo.js} +12 -0
  224. package/__chunks__/{context-CgOWZch5.mjs → context-EpOG85wC.mjs} +13 -1
  225. package/__chunks__/{focusSafely-Dw7K4rnX.mjs → focusSafely-BWGCG3W3.mjs} +3 -3
  226. package/__chunks__/{focusSafely-sLifanM7.js → focusSafely-BvrXUhlW.js} +1 -1
  227. package/__chunks__/{isVirtualEvent-BFRy7P_p.mjs → isVirtualEvent-BPCuFO54.mjs} +2 -2
  228. package/__chunks__/{mergeProps-T961Q1yJ.mjs → mergeProps-DSi85raC.mjs} +4 -4
  229. package/__chunks__/{scrollIntoView-GfnXaOCE.mjs → scrollIntoView-CZM0k-rp.mjs} +1 -1
  230. package/__chunks__/{useButton-B1CurEpI.mjs → useButton-BK6hwK02.mjs} +3 -3
  231. package/__chunks__/{useButton-DvulUoU2.js → useButton-DZ0C3d-K.js} +2 -2
  232. package/__chunks__/useCollator-B-keb3wA.mjs +13 -0
  233. package/__chunks__/useCollator-DGrSWVh4.js +12 -0
  234. package/__chunks__/{useDialog-DAYxqkKY.mjs → useDialog-c-C07qhw.mjs} +5 -29
  235. package/__chunks__/{useDialog-Dsqz1M_N.js → useDialog-wy_ru95P.js} +3 -27
  236. package/__chunks__/{useEdgeInterceptors-BCHFmpf_.js → useEdgeInterceptors-CnwnUfBU.js} +5 -5
  237. package/__chunks__/{useEdgeInterceptors-CVxwDmQ0.mjs → useEdgeInterceptors-ax9tmtdh.mjs} +5 -5
  238. package/__chunks__/{useEvent-C5RCZjKr.mjs → useEvent-B0fsKtsf.mjs} +1 -1
  239. package/__chunks__/{useField-DWmSslhe.mjs → useField-B6VplZ_n.mjs} +2 -2
  240. package/__chunks__/{useFocus-DDj4i8Xy.mjs → useFocus-BJ7JikEx.mjs} +2 -2
  241. package/__chunks__/{useFocusRing-BE_dgxH5.mjs → useFocusRing-YOWeCHgO.mjs} +3 -3
  242. package/__chunks__/{useFocusVisible-CXSIZSY_.mjs → useFocusVisible-ng1Hn25t.mjs} +2 -2
  243. package/__chunks__/{useFocusWithin-CDX8m0Wu.mjs → useFocusWithin-B-vQAW9V.mjs} +1 -1
  244. package/__chunks__/{useFocusable-BfXLORiH.js → useFocusable-8kJcp2yc.js} +5 -5
  245. package/__chunks__/{useFocusable-DD5dAIXt.mjs → useFocusable-CNor_Zjt.mjs} +4 -4
  246. package/__chunks__/{useFormReset-CmXMJVpO.mjs → useFormReset-DA1Lwdha.mjs} +1 -1
  247. package/__chunks__/{useFormValidation-C2DoIczP.js → useFormValidation-DYz5WFze.js} +22 -0
  248. package/__chunks__/{useFormValidation-gwcVryr8.mjs → useFormValidation-v2O6VL2V.mjs} +26 -4
  249. package/__chunks__/{useHasTabbableChild-CRCY1COZ.mjs → useHasTabbableChild-BKgmY6ej.mjs} +2 -2
  250. package/__chunks__/{useHasTabbableChild-C34XhtMr.js → useHasTabbableChild-Cs10TUUE.js} +1 -1
  251. package/__chunks__/{useHighlightSelectionDescription-CsB-ufoX.js → useHighlightSelectionDescription-CT5XKTz0.js} +2 -2
  252. package/__chunks__/{useHighlightSelectionDescription-DnW5KkSs.mjs → useHighlightSelectionDescription-Cebr-N8X.mjs} +4 -4
  253. package/__chunks__/{useLabel-C0Q8946u.mjs → useLabel-D37VV43W.mjs} +2 -2
  254. package/__chunks__/{useLabels-Bly436JP.mjs → useLabels-5f58TiCH.mjs} +1 -1
  255. package/__chunks__/{useLink-BOdtE_Mk.js → useLink-DSnaSTQf.js} +2 -2
  256. package/__chunks__/{useLink-B__d3N9L.mjs → useLink-xdTgcuUM.mjs} +3 -3
  257. package/__chunks__/{useListState-CH1PXfc5.mjs → useListState-AFrlkW73.mjs} +1 -1
  258. package/__chunks__/{useLocalizedStringFormatter-B5ons_mh.mjs → useLocalizedStringFormatter-BHXy3Wtu.mjs} +5 -2
  259. package/__chunks__/{useLocalizedStringFormatter-D74_5d4h.js → useLocalizedStringFormatter-CaF1VsOH.js} +3 -0
  260. package/__chunks__/useModalOverlay-BljLSPJ0.js +47 -0
  261. package/__chunks__/useModalOverlay-S0R2uVTX.mjs +48 -0
  262. package/__chunks__/useObjectRef-BOGMJ5vM.js +18 -0
  263. package/__chunks__/useObjectRef-wU82Pkgx.mjs +19 -0
  264. package/__chunks__/{useOverlayPosition-B31NgShQ.mjs → useOverlayPosition-BjK7cu6U.mjs} +4 -4
  265. package/__chunks__/{useOverlayPosition-ucZjuzzI.js → useOverlayPosition-CMvGmqVL.js} +1 -1
  266. package/__chunks__/useOverlayTrigger-DDcXdZOM.mjs +28 -0
  267. package/__chunks__/useOverlayTrigger-Dp7RXQ9B.js +27 -0
  268. package/__chunks__/{usePress-Dz8YYpge.js → usePress-DNETV97g.js} +2 -3
  269. package/__chunks__/{usePress-lFMUra6S.mjs → usePress-Db4pSZfY.mjs} +3 -4
  270. package/__chunks__/{useSelectableItem-BdD2_J2D.mjs → useSelectableItem-D61t76J1.mjs} +10 -10
  271. package/__chunks__/{useSelectableItem-BGvBbIwY.js → useSelectableItem-DpEX9QBc.js} +4 -4
  272. package/__chunks__/{useSelectableList-D0uxeze4.mjs → useSelectableList-BdG5I7cy.mjs} +4 -14
  273. package/__chunks__/{useSelectableList-DlkRkps4.js → useSelectableList-UkBCcTuC.js} +3 -13
  274. package/__chunks__/{useSingleSelectListState-BuqfjUxj.mjs → useSingleSelectListState-DuCUY6dR.mjs} +1 -1
  275. package/__chunks__/{useToggle-b0GY9dCM.mjs → useToggle-BDx-p-Zv.mjs} +4 -4
  276. package/__chunks__/{useToggle-D7gzXCXF.js → useToggle-BfpHeO2F.js} +2 -2
  277. package/__chunks__/{useTreeState-BZxhJy4m.mjs → useTreeState-w_raYfy2.mjs} +1 -1
  278. package/__chunks__/{useTriggerWidth-DEToHKD3.mjs → useTriggerWidth-CRz8zSDa.mjs} +6 -335
  279. package/__chunks__/{useTriggerWidth-C7OT3WI9.js → useTriggerWidth-Dj7C0lza.js} +4 -333
  280. package/__chunks__/utilities-CaBPUKEB.js +353 -0
  281. package/__chunks__/utilities-DASknbaa.mjs +354 -0
  282. package/__chunks__/{utils-XuD3IFpv.mjs → utils-D4ddhsBL.mjs} +58 -21
  283. package/__chunks__/{utils-DXO9zsKE.js → utils-DIF5XAA2.js} +55 -18
  284. package/package.json +1 -1
  285. package/style.css +1851 -1635
  286. package/__chunks__/InputIcon-BGgFAA4L.mjs +0 -168
  287. package/__chunks__/InputIcon-CUOJRoq8.js +0 -167
  288. package/__chunks__/useSyncRef-CPg4onT-.js +0 -13
  289. package/__chunks__/useSyncRef-CpaiKz0R.mjs +0 -14
@@ -0,0 +1,334 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+ import React__default, { useMemo, useState, useContext } from "react";
33
+ import { T as Text } from "./Text-tpkE6IlH.mjs";
34
+ import { H as HorizontalStack } from "./HorizontalStack-CdtNq_TW.mjs";
35
+ import { S as SelectorErrorTooltip } from "./SelectorErrorTooltip-Cja4A8Yq.mjs";
36
+ import { classNames } from "../utilities/css.mjs";
37
+ import { $ as $3ef42575df84b30b$export$9d1611c77c2fe928, c as $bdb11010cef70236$export$f680877a34711e37 } from "./mergeProps-DSi85raC.mjs";
38
+ import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.mjs";
39
+ import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-DA1Lwdha.mjs";
40
+ import { $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-CNor_Zjt.mjs";
41
+ import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, d as $e93e671b31057976$export$b8473d3665f3a75a } from "./useFormValidation-v2O6VL2V.mjs";
42
+ import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-Db4pSZfY.mjs";
43
+ import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-YOWeCHgO.mjs";
44
+ import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./useHover-BOYR4wqI.mjs";
45
+ import { $ as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useControlledState-CFWhSD5C.mjs";
46
+ import { $ as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "./FocusScope-Qg8vUhZ_.mjs";
47
+ import { $ as $2baaea4c71418dea$export$294aa081a6c6f55d } from "./useField-B6VplZ_n.mjs";
48
+ import { $ as $9ab94262bd0047c7$export$420e68273165f4ec } from "./useFocusWithin-B-vQAW9V.mjs";
49
+ import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-BZCcafjG.mjs";
50
+ let $a54cdc5c1942b639$var$instance = Math.round(Math.random() * 1e10);
51
+ let $a54cdc5c1942b639$var$i = 0;
52
+ function $a54cdc5c1942b639$export$bca9d026f8e704eb(props) {
53
+ let name = useMemo(() => props.name || `radio-group-${$a54cdc5c1942b639$var$instance}-${++$a54cdc5c1942b639$var$i}`, [
54
+ props.name
55
+ ]);
56
+ var _props_defaultValue;
57
+ let [selectedValue, setSelected] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : null, props.onChange);
58
+ let [lastFocusedValue, setLastFocusedValue] = useState(null);
59
+ let validation = $e5be200c675c3b3a$export$fc1a364ae1f3ff10(__spreadProps(__spreadValues({}, props), {
60
+ value: selectedValue
61
+ }));
62
+ let setSelectedValue = (value) => {
63
+ if (!props.isReadOnly && !props.isDisabled) {
64
+ setSelected(value);
65
+ validation.commitValidation();
66
+ }
67
+ };
68
+ let isInvalid = validation.displayValidation.isInvalid;
69
+ return __spreadProps(__spreadValues({}, validation), {
70
+ name,
71
+ selectedValue,
72
+ setSelectedValue,
73
+ lastFocusedValue,
74
+ setLastFocusedValue,
75
+ isDisabled: props.isDisabled || false,
76
+ isReadOnly: props.isReadOnly || false,
77
+ isRequired: props.isRequired || false,
78
+ validationState: props.validationState || (isInvalid ? "invalid" : null),
79
+ isInvalid
80
+ });
81
+ }
82
+ const $884aeceb3d67f00f$export$37b65e5b5444d35c = /* @__PURE__ */ new WeakMap();
83
+ function $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref) {
84
+ let { value, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby } = props;
85
+ const isDisabled = props.isDisabled || state.isDisabled;
86
+ let hasChildren = children != null;
87
+ let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;
88
+ if (!hasChildren && !hasAriaLabel) console.warn("If you do not provide children, you must specify an aria-label for accessibility");
89
+ let checked = state.selectedValue === value;
90
+ let onChange = (e) => {
91
+ e.stopPropagation();
92
+ state.setSelectedValue(value);
93
+ };
94
+ let { pressProps, isPressed } = $f6c31cce2adf654f$export$45712eceda6fad21({
95
+ isDisabled
96
+ });
97
+ let { pressProps: labelProps, isPressed: isLabelPressed } = $f6c31cce2adf654f$export$45712eceda6fad21({
98
+ isDisabled,
99
+ onPress() {
100
+ state.setSelectedValue(value);
101
+ }
102
+ });
103
+ let { focusableProps } = $e6afbd83fe6ebbd2$export$4c014de7c8940b4c($3ef42575df84b30b$export$9d1611c77c2fe928(props, {
104
+ onFocus: () => state.setLastFocusedValue(value)
105
+ }), ref);
106
+ let interactions = $3ef42575df84b30b$export$9d1611c77c2fe928(pressProps, focusableProps);
107
+ let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
108
+ labelable: true
109
+ });
110
+ let tabIndex = -1;
111
+ if (state.selectedValue != null) {
112
+ if (state.selectedValue === value) tabIndex = 0;
113
+ } else if (state.lastFocusedValue === value || state.lastFocusedValue == null) tabIndex = 0;
114
+ if (isDisabled) tabIndex = void 0;
115
+ let { name, descriptionId, errorMessageId, validationBehavior } = $884aeceb3d67f00f$export$37b65e5b5444d35c.get(state);
116
+ $99facab73266f662$export$5add1d006293d136(ref, state.selectedValue, state.setSelectedValue);
117
+ $e93e671b31057976$export$b8473d3665f3a75a({
118
+ validationBehavior
119
+ }, state, ref);
120
+ return {
121
+ labelProps: $3ef42575df84b30b$export$9d1611c77c2fe928(labelProps, {
122
+ onClick: (e) => e.preventDefault()
123
+ }),
124
+ inputProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, __spreadProps(__spreadValues({}, interactions), {
125
+ type: "radio",
126
+ name,
127
+ tabIndex,
128
+ disabled: isDisabled,
129
+ required: state.isRequired && validationBehavior === "native",
130
+ checked,
131
+ value,
132
+ onChange,
133
+ "aria-describedby": [
134
+ props["aria-describedby"],
135
+ state.isInvalid ? errorMessageId : null,
136
+ descriptionId
137
+ ].filter(Boolean).join(" ") || void 0
138
+ })),
139
+ isDisabled,
140
+ isSelected: checked,
141
+ isPressed: isPressed || isLabelPressed
142
+ };
143
+ }
144
+ function $430f30ed08ec25fa$export$62b9571f283ff5c2(props, state) {
145
+ let { name, isReadOnly, isRequired, isDisabled, orientation = "vertical", validationBehavior = "aria" } = props;
146
+ let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
147
+ let { isInvalid, validationErrors, validationDetails } = state.displayValidation;
148
+ let { labelProps, fieldProps, descriptionProps, errorMessageProps } = $2baaea4c71418dea$export$294aa081a6c6f55d(__spreadProps(__spreadValues({}, props), {
149
+ // Radio group is not an HTML input element so it
150
+ // shouldn't be labeled by a <label> element.
151
+ labelElementType: "span",
152
+ isInvalid: state.isInvalid,
153
+ errorMessage: props.errorMessage || validationErrors
154
+ }));
155
+ let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
156
+ labelable: true
157
+ });
158
+ let { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
159
+ onBlurWithin(e) {
160
+ var _props_onBlur;
161
+ (_props_onBlur = props.onBlur) === null || _props_onBlur === void 0 ? void 0 : _props_onBlur.call(props, e);
162
+ if (!state.selectedValue) state.setLastFocusedValue(null);
163
+ },
164
+ onFocusWithin: props.onFocus,
165
+ onFocusWithinChange: props.onFocusChange
166
+ });
167
+ let onKeyDown = (e) => {
168
+ let nextDir;
169
+ switch (e.key) {
170
+ case "ArrowRight":
171
+ if (direction === "rtl" && orientation !== "vertical") nextDir = "prev";
172
+ else nextDir = "next";
173
+ break;
174
+ case "ArrowLeft":
175
+ if (direction === "rtl" && orientation !== "vertical") nextDir = "next";
176
+ else nextDir = "prev";
177
+ break;
178
+ case "ArrowDown":
179
+ nextDir = "next";
180
+ break;
181
+ case "ArrowUp":
182
+ nextDir = "prev";
183
+ break;
184
+ default:
185
+ return;
186
+ }
187
+ e.preventDefault();
188
+ let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(e.currentTarget, {
189
+ from: e.target
190
+ });
191
+ let nextElem;
192
+ if (nextDir === "next") {
193
+ nextElem = walker.nextNode();
194
+ if (!nextElem) {
195
+ walker.currentNode = e.currentTarget;
196
+ nextElem = walker.firstChild();
197
+ }
198
+ } else {
199
+ nextElem = walker.previousNode();
200
+ if (!nextElem) {
201
+ walker.currentNode = e.currentTarget;
202
+ nextElem = walker.lastChild();
203
+ }
204
+ }
205
+ if (nextElem) {
206
+ nextElem.focus();
207
+ state.setSelectedValue(nextElem.value);
208
+ }
209
+ };
210
+ let groupName = $bdb11010cef70236$export$f680877a34711e37(name);
211
+ $884aeceb3d67f00f$export$37b65e5b5444d35c.set(state, {
212
+ name: groupName,
213
+ descriptionId: descriptionProps.id,
214
+ errorMessageId: errorMessageProps.id,
215
+ validationBehavior
216
+ });
217
+ return {
218
+ radioGroupProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, __spreadValues(__spreadValues({
219
+ // https://www.w3.org/TR/wai-aria-1.2/#radiogroup
220
+ role: "radiogroup",
221
+ onKeyDown,
222
+ "aria-invalid": state.isInvalid || void 0,
223
+ "aria-errormessage": props["aria-errormessage"],
224
+ "aria-readonly": isReadOnly || void 0,
225
+ "aria-required": isRequired || void 0,
226
+ "aria-disabled": isDisabled || void 0,
227
+ "aria-orientation": orientation
228
+ }, fieldProps), focusWithinProps)),
229
+ labelProps,
230
+ descriptionProps,
231
+ errorMessageProps,
232
+ isInvalid,
233
+ validationErrors,
234
+ validationDetails
235
+ };
236
+ }
237
+ const RadioGroupContext = React__default.createContext(null);
238
+ const useRadioGroupContext = () => {
239
+ const radioGroupContext = useContext(RadioGroupContext);
240
+ if (!radioGroupContext) {
241
+ throw new Error("Must be within a RadioGroup");
242
+ }
243
+ return radioGroupContext;
244
+ };
245
+ const RadioGroupItem$1 = "_RadioGroupItem_g11br_5";
246
+ const label = "_label_g11br_11";
247
+ const radioOuter = "_radioOuter_g11br_29";
248
+ const radioInner = "_radioInner_g11br_30";
249
+ const focusVisible = "_focusVisible_g11br_44";
250
+ const selected = "_selected_g11br_63";
251
+ const invalid = "_invalid_g11br_67";
252
+ const disabled = "_disabled_g11br_71";
253
+ const hovered = "_hovered_g11br_83";
254
+ const readOnly = "_readOnly_g11br_83";
255
+ const styles$1 = {
256
+ RadioGroupItem: RadioGroupItem$1,
257
+ label,
258
+ radioOuter,
259
+ radioInner,
260
+ focusVisible,
261
+ selected,
262
+ invalid,
263
+ disabled,
264
+ hovered,
265
+ readOnly
266
+ };
267
+ function RadioGroupItem(props) {
268
+ const { children, errorText, validationState } = props;
269
+ const ref = React__default.useRef(null);
270
+ const state = useRadioGroupContext();
271
+ const { inputProps, isSelected, isDisabled } = $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref);
272
+ const { isFocusVisible, focusProps } = $f7dceffc5ad7768b$export$4e328f61c538687f();
273
+ const { isHovered, hoverProps } = $6179b936705e76d3$export$ae780daf29e6d456(props);
274
+ const className = classNames(styles$1.RadioGroupItem, isSelected && styles$1.selected, isDisabled && styles$1.disabled, isFocusVisible && styles$1.focusVisible, isHovered && styles$1.hovered, validationState === "invalid" && styles$1.invalid);
275
+ const textColor = isDisabled ? "neutral.300" : validationState === "invalid" ? "negative.600" : "primary.800";
276
+ return React__default.createElement("div", {
277
+ className
278
+ }, React__default.createElement(HorizontalStack, {
279
+ gap: "1",
280
+ blockAlign: "center"
281
+ }, React__default.createElement("label", {
282
+ className: styles$1.label
283
+ }, React__default.createElement(HorizontalStack, __spreadValues({
284
+ blockAlign: "start",
285
+ gap: "1",
286
+ wrap: false
287
+ }, hoverProps), React__default.createElement("input", __spreadProps(__spreadValues(__spreadValues({
288
+ "aria-invalid": validationState === "invalid"
289
+ }, inputProps), focusProps), {
290
+ className: styles$1.input,
291
+ ref
292
+ })), React__default.createElement("span", {
293
+ className: styles$1.radioOuter
294
+ }, React__default.createElement("span", {
295
+ className: styles$1.radioInner
296
+ })), React__default.createElement(Text, {
297
+ variant: "body1",
298
+ color: textColor
299
+ }, children))), validationState === "invalid" && errorText && React__default.createElement(SelectorErrorTooltip, {
300
+ content: errorText
301
+ })));
302
+ }
303
+ const RadioGroup$1 = "_RadioGroup_wn0sd_5";
304
+ const list = "_list_wn0sd_14";
305
+ const styles = {
306
+ RadioGroup: RadioGroup$1,
307
+ list
308
+ };
309
+ function RadioGroupContainer(props) {
310
+ const { children, label: label2 } = props;
311
+ const state = $a54cdc5c1942b639$export$bca9d026f8e704eb(props);
312
+ const { radioGroupProps, labelProps } = $430f30ed08ec25fa$export$62b9571f283ff5c2(props, state);
313
+ return React__default.createElement("fieldset", __spreadValues({
314
+ className: styles.RadioGroup
315
+ }, radioGroupProps), label2 && React__default.createElement("div", null, React__default.createElement(Text, __spreadValues({
316
+ as: "legend",
317
+ variant: "subtitle1",
318
+ color: "gray.bold"
319
+ }, labelProps), label2)), React__default.createElement(RadioGroupContext.Provider, {
320
+ value: state
321
+ }, children));
322
+ }
323
+ function RadioGroup(props) {
324
+ const _a = props, { children } = _a, containerProps = __objRest(_a, ["children"]);
325
+ return React__default.createElement(RadioGroupContainer, __spreadValues({}, containerProps), React__default.createElement("div", {
326
+ className: styles.list
327
+ }, children));
328
+ }
329
+ RadioGroup.Container = RadioGroupContainer;
330
+ RadioGroup.Item = RadioGroupItem;
331
+ export {
332
+ RadioGroup as R,
333
+ useRadioGroupContext as u
334
+ };
@@ -0,0 +1,228 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+ import React__default, { useState, useRef, useMemo } from "react";
33
+ import { c as $f62d864046160412$export$f4a51ff076cc9a09, d as $11d87f3f76e88657$export$93522d1a439f3617, e as $14e0f24ef4ac5c92$export$a75f2bff57811055, f as $14e0f24ef4ac5c92$export$5c333a116e949cdd, a as $131cf43a05231e1e$export$6d095e787d2b5e1f, g as $14e0f24ef4ac5c92$export$91b62ebf2ba703ee, h as $f62d864046160412$export$eac50920cf2fd59a, i as $f62d864046160412$export$4f5203c0d889109e, j as $f62d864046160412$export$a1d3911297b952d7, k as $11d87f3f76e88657$export$b4a036af3fc0b032, l as $3b62074eb05584b2$export$80ee6245ec4f29ec, $ as $c4acc1de3ab169cf$export$d652b3ea2d672d5b, b as $64244302c3013299$export$dd0bbc9b26defe37, C as CalendarBase } from "./CalendarBase-B_2qDiO8.mjs";
34
+ import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-BZCcafjG.mjs";
35
+ import { $ as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useControlledState-CFWhSD5C.mjs";
36
+ import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-B0fsKtsf.mjs";
37
+ function $9a36b6ba2fb1a7c5$export$9a987164d97ecc90(props) {
38
+ let _a = props, { value: valueProp, defaultValue, onChange, createCalendar, locale, visibleDuration = {
39
+ months: 1
40
+ }, minValue, maxValue } = _a, calendarProps = __objRest(_a, ["value", "defaultValue", "onChange", "createCalendar", "locale", "visibleDuration", "minValue", "maxValue"]);
41
+ let [value, setValue] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(valueProp, defaultValue || null, onChange);
42
+ let [anchorDate, setAnchorDateState] = useState(null);
43
+ let alignment = "center";
44
+ if (value && value.start && value.end) {
45
+ let start = $f62d864046160412$export$f4a51ff076cc9a09($11d87f3f76e88657$export$93522d1a439f3617(value.start), visibleDuration, locale, minValue, maxValue);
46
+ let end = start.add(visibleDuration).subtract({
47
+ days: 1
48
+ });
49
+ if (value.end.compare(end) > 0) alignment = "start";
50
+ }
51
+ let availableRangeRef = useRef(null);
52
+ let [availableRange, setAvailableRange] = useState(null);
53
+ let min = useMemo(() => $14e0f24ef4ac5c92$export$a75f2bff57811055(minValue, availableRange === null || availableRange === void 0 ? void 0 : availableRange.start), [
54
+ minValue,
55
+ availableRange
56
+ ]);
57
+ let max = useMemo(() => $14e0f24ef4ac5c92$export$5c333a116e949cdd(maxValue, availableRange === null || availableRange === void 0 ? void 0 : availableRange.end), [
58
+ maxValue,
59
+ availableRange
60
+ ]);
61
+ let calendar = $131cf43a05231e1e$export$6d095e787d2b5e1f(__spreadProps(__spreadValues({}, calendarProps), {
62
+ value: value && value.start,
63
+ createCalendar,
64
+ locale,
65
+ visibleDuration,
66
+ minValue: min,
67
+ maxValue: max,
68
+ selectionAlignment: alignment
69
+ }));
70
+ let updateAvailableRange = (date) => {
71
+ if (date && props.isDateUnavailable && !props.allowsNonContiguousRanges) {
72
+ const nextAvailableStartDate = $9a36b6ba2fb1a7c5$var$nextUnavailableDate(date, calendar, -1);
73
+ const nextAvailableEndDate = $9a36b6ba2fb1a7c5$var$nextUnavailableDate(date, calendar, 1);
74
+ availableRangeRef.current = {
75
+ start: nextAvailableStartDate,
76
+ end: nextAvailableEndDate
77
+ };
78
+ setAvailableRange(availableRangeRef.current);
79
+ } else {
80
+ availableRangeRef.current = null;
81
+ setAvailableRange(null);
82
+ }
83
+ };
84
+ let [lastVisibleRange, setLastVisibleRange] = useState(calendar.visibleRange);
85
+ if (!$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(calendar.visibleRange.start, lastVisibleRange.start) || !$14e0f24ef4ac5c92$export$91b62ebf2ba703ee(calendar.visibleRange.end, lastVisibleRange.end)) {
86
+ updateAvailableRange(anchorDate);
87
+ setLastVisibleRange(calendar.visibleRange);
88
+ }
89
+ let setAnchorDate = (date) => {
90
+ if (date) {
91
+ setAnchorDateState(date);
92
+ updateAvailableRange(date);
93
+ } else {
94
+ setAnchorDateState(null);
95
+ updateAvailableRange(null);
96
+ }
97
+ };
98
+ let highlightedRange = anchorDate ? $9a36b6ba2fb1a7c5$var$makeRange(anchorDate, calendar.focusedDate) : value && $9a36b6ba2fb1a7c5$var$makeRange(value.start, value.end);
99
+ let selectDate = (date) => {
100
+ if (props.isReadOnly) return;
101
+ const constrainedDate = $f62d864046160412$export$4f5203c0d889109e(date, min, max);
102
+ const previousAvailableConstrainedDate = $f62d864046160412$export$a1d3911297b952d7(constrainedDate, calendar.visibleRange.start, props.isDateUnavailable);
103
+ if (!previousAvailableConstrainedDate) return;
104
+ if (!anchorDate) setAnchorDate(previousAvailableConstrainedDate);
105
+ else {
106
+ let range = $9a36b6ba2fb1a7c5$var$makeRange(anchorDate, previousAvailableConstrainedDate);
107
+ if (range) setValue({
108
+ start: $9a36b6ba2fb1a7c5$var$convertValue(range.start, value === null || value === void 0 ? void 0 : value.start),
109
+ end: $9a36b6ba2fb1a7c5$var$convertValue(range.end, value === null || value === void 0 ? void 0 : value.end)
110
+ });
111
+ setAnchorDate(null);
112
+ }
113
+ };
114
+ let [isDragging, setDragging] = useState(false);
115
+ let { isDateUnavailable } = props;
116
+ let isInvalidSelection = useMemo(() => {
117
+ if (!value || anchorDate) return false;
118
+ if (isDateUnavailable && (isDateUnavailable(value.start) || isDateUnavailable(value.end))) return true;
119
+ return $f62d864046160412$export$eac50920cf2fd59a(value.start, minValue, maxValue) || $f62d864046160412$export$eac50920cf2fd59a(value.end, minValue, maxValue);
120
+ }, [
121
+ isDateUnavailable,
122
+ value,
123
+ anchorDate,
124
+ minValue,
125
+ maxValue
126
+ ]);
127
+ let isValueInvalid = props.isInvalid || props.validationState === "invalid" || isInvalidSelection;
128
+ let validationState = isValueInvalid ? "invalid" : null;
129
+ return __spreadProps(__spreadValues({}, calendar), {
130
+ value,
131
+ setValue,
132
+ anchorDate,
133
+ setAnchorDate,
134
+ highlightedRange,
135
+ validationState,
136
+ isValueInvalid,
137
+ selectFocusedDate() {
138
+ selectDate(calendar.focusedDate);
139
+ },
140
+ selectDate,
141
+ highlightDate(date) {
142
+ if (anchorDate) calendar.setFocusedDate(date);
143
+ },
144
+ isSelected(date) {
145
+ return Boolean(highlightedRange && date.compare(highlightedRange.start) >= 0 && date.compare(highlightedRange.end) <= 0 && !calendar.isCellDisabled(date) && !calendar.isCellUnavailable(date));
146
+ },
147
+ isInvalid(date) {
148
+ var _availableRangeRef_current, _availableRangeRef_current1;
149
+ return calendar.isInvalid(date) || $f62d864046160412$export$eac50920cf2fd59a(date, (_availableRangeRef_current = availableRangeRef.current) === null || _availableRangeRef_current === void 0 ? void 0 : _availableRangeRef_current.start, (_availableRangeRef_current1 = availableRangeRef.current) === null || _availableRangeRef_current1 === void 0 ? void 0 : _availableRangeRef_current1.end);
150
+ },
151
+ isDragging,
152
+ setDragging
153
+ });
154
+ }
155
+ function $9a36b6ba2fb1a7c5$var$makeRange(start, end) {
156
+ if (!start || !end) return null;
157
+ if (end.compare(start) < 0) [start, end] = [
158
+ end,
159
+ start
160
+ ];
161
+ return {
162
+ start: $11d87f3f76e88657$export$93522d1a439f3617(start),
163
+ end: $11d87f3f76e88657$export$93522d1a439f3617(end)
164
+ };
165
+ }
166
+ function $9a36b6ba2fb1a7c5$var$convertValue(newValue, oldValue) {
167
+ newValue = $11d87f3f76e88657$export$b4a036af3fc0b032(newValue, (oldValue === null || oldValue === void 0 ? void 0 : oldValue.calendar) || new $3b62074eb05584b2$export$80ee6245ec4f29ec());
168
+ if (oldValue && "hour" in oldValue) return oldValue.set(newValue);
169
+ return newValue;
170
+ }
171
+ function $9a36b6ba2fb1a7c5$var$nextUnavailableDate(anchorDate, state, dir) {
172
+ let nextDate = anchorDate.add({
173
+ days: dir
174
+ });
175
+ while ((dir < 0 ? nextDate.compare(state.visibleRange.start) >= 0 : nextDate.compare(state.visibleRange.end) <= 0) && !state.isCellUnavailable(nextDate)) nextDate = nextDate.add({
176
+ days: dir
177
+ });
178
+ if (state.isCellUnavailable(nextDate)) return nextDate.add({
179
+ days: -dir
180
+ });
181
+ }
182
+ function $46a4342aab3d8076$export$87e0539f600c24e5(props, state, ref) {
183
+ let res = $c4acc1de3ab169cf$export$d652b3ea2d672d5b(props, state);
184
+ let isVirtualClick = useRef(false);
185
+ let windowRef = useRef(typeof window !== "undefined" ? window : null);
186
+ $e9faafb641e167db$export$90fc3a17d93f704c(windowRef, "pointerdown", (e) => {
187
+ isVirtualClick.current = e.width === 0 && e.height === 0;
188
+ });
189
+ let endDragging = (e) => {
190
+ if (isVirtualClick.current) {
191
+ isVirtualClick.current = false;
192
+ return;
193
+ }
194
+ state.setDragging(false);
195
+ if (!state.anchorDate) return;
196
+ let target = e.target;
197
+ if (ref.current && ref.current.contains(document.activeElement) && (!ref.current.contains(target) || !target.closest('button, [role="button"]'))) state.selectFocusedDate();
198
+ };
199
+ $e9faafb641e167db$export$90fc3a17d93f704c(windowRef, "pointerup", endDragging);
200
+ res.calendarProps.onBlur = (e) => {
201
+ if (!ref.current) return;
202
+ if ((!e.relatedTarget || !ref.current.contains(e.relatedTarget)) && state.anchorDate) state.selectFocusedDate();
203
+ };
204
+ $e9faafb641e167db$export$90fc3a17d93f704c(ref, "touchmove", (e) => {
205
+ if (state.isDragging) e.preventDefault();
206
+ }, {
207
+ passive: false,
208
+ capture: true
209
+ });
210
+ return res;
211
+ }
212
+ function RangeCalendar(props) {
213
+ const { locale } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
214
+ const calendarRef = React__default.useRef(null);
215
+ const state = $9a36b6ba2fb1a7c5$export$9a987164d97ecc90(__spreadProps(__spreadValues({}, props), {
216
+ locale,
217
+ createCalendar: $64244302c3013299$export$dd0bbc9b26defe37
218
+ }));
219
+ const rangeCalendarProps = $46a4342aab3d8076$export$87e0539f600c24e5(props, state, calendarRef);
220
+ return React__default.createElement(CalendarBase, __spreadProps(__spreadValues(__spreadValues({}, props), rangeCalendarProps), {
221
+ state,
222
+ calendarRef
223
+ }));
224
+ }
225
+ RangeCalendar.displayName = "RangeCalendar";
226
+ export {
227
+ RangeCalendar as R
228
+ };