@mortenbrudvik/waveui 0.9.0 → 0.11.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 (264) hide show
  1. package/README.md +758 -152
  2. package/dist/components/button/Toolbar.cjs +1 -1
  3. package/dist/components/button/Toolbar.cjs.map +1 -1
  4. package/dist/components/button/Toolbar.mjs +25 -30
  5. package/dist/components/button/Toolbar.mjs.map +1 -1
  6. package/dist/components/button/Toolbar.navigation.cjs +2 -0
  7. package/dist/components/button/Toolbar.navigation.cjs.map +1 -0
  8. package/dist/components/button/Toolbar.navigation.mjs +17 -0
  9. package/dist/components/button/Toolbar.navigation.mjs.map +1 -0
  10. package/dist/components/data-display/Avatar.cjs +1 -1
  11. package/dist/components/data-display/Avatar.cjs.map +1 -1
  12. package/dist/components/data-display/Avatar.context.cjs +2 -0
  13. package/dist/components/data-display/Avatar.context.cjs.map +1 -0
  14. package/dist/components/data-display/Avatar.context.mjs +9 -0
  15. package/dist/components/data-display/Avatar.context.mjs.map +1 -0
  16. package/dist/components/data-display/Avatar.mjs +66 -61
  17. package/dist/components/data-display/Avatar.mjs.map +1 -1
  18. package/dist/components/data-display/InteractionTag.cjs +2 -0
  19. package/dist/components/data-display/InteractionTag.cjs.map +1 -0
  20. package/dist/components/data-display/InteractionTag.mjs +234 -0
  21. package/dist/components/data-display/InteractionTag.mjs.map +1 -0
  22. package/dist/components/data-display/Tag.cjs +1 -1
  23. package/dist/components/data-display/Tag.cjs.map +1 -1
  24. package/dist/components/data-display/Tag.mjs +222 -90
  25. package/dist/components/data-display/Tag.mjs.map +1 -1
  26. package/dist/components/data-display/TagGroup.cjs +2 -0
  27. package/dist/components/data-display/TagGroup.cjs.map +1 -0
  28. package/dist/components/data-display/TagGroup.context.cjs +2 -0
  29. package/dist/components/data-display/TagGroup.context.cjs.map +1 -0
  30. package/dist/components/data-display/TagGroup.context.mjs +113 -0
  31. package/dist/components/data-display/TagGroup.context.mjs.map +1 -0
  32. package/dist/components/data-display/TagGroup.mjs +149 -0
  33. package/dist/components/data-display/TagGroup.mjs.map +1 -0
  34. package/dist/components/data-display/tagStyles.cjs +2 -0
  35. package/dist/components/data-display/tagStyles.cjs.map +1 -0
  36. package/dist/components/data-display/tagStyles.mjs +108 -0
  37. package/dist/components/data-display/tagStyles.mjs.map +1 -0
  38. package/dist/components/feedback/Toaster.cjs +1 -1
  39. package/dist/components/feedback/Toaster.cjs.map +1 -1
  40. package/dist/components/feedback/Toaster.mjs +213 -181
  41. package/dist/components/feedback/Toaster.mjs.map +1 -1
  42. package/dist/components/input/Calendar.cjs +2 -0
  43. package/dist/components/input/Calendar.cjs.map +1 -0
  44. package/dist/components/input/Calendar.mjs +352 -0
  45. package/dist/components/input/Calendar.mjs.map +1 -0
  46. package/dist/components/input/Calendar.views.cjs +2 -0
  47. package/dist/components/input/Calendar.views.cjs.map +1 -0
  48. package/dist/components/input/Calendar.views.mjs +194 -0
  49. package/dist/components/input/Calendar.views.mjs.map +1 -0
  50. package/dist/components/input/ColorArea.cjs +1 -1
  51. package/dist/components/input/ColorArea.cjs.map +1 -1
  52. package/dist/components/input/ColorArea.mjs +18 -18
  53. package/dist/components/input/ColorArea.mjs.map +1 -1
  54. package/dist/components/input/Combobox.cjs +1 -1
  55. package/dist/components/input/Combobox.cjs.map +1 -1
  56. package/dist/components/input/Combobox.expand.cjs +1 -1
  57. package/dist/components/input/Combobox.expand.cjs.map +1 -1
  58. package/dist/components/input/Combobox.expand.mjs +7 -7
  59. package/dist/components/input/Combobox.expand.mjs.map +1 -1
  60. package/dist/components/input/Combobox.mjs +232 -156
  61. package/dist/components/input/Combobox.mjs.map +1 -1
  62. package/dist/components/input/Combobox.text.cjs +2 -0
  63. package/dist/components/input/Combobox.text.cjs.map +1 -0
  64. package/dist/components/input/Combobox.text.mjs +24 -0
  65. package/dist/components/input/Combobox.text.mjs.map +1 -0
  66. package/dist/components/input/DatePicker.cjs +1 -1
  67. package/dist/components/input/DatePicker.cjs.map +1 -1
  68. package/dist/components/input/DatePicker.mjs +203 -288
  69. package/dist/components/input/DatePicker.mjs.map +1 -1
  70. package/dist/components/input/Dropdown.cjs +1 -1
  71. package/dist/components/input/Dropdown.cjs.map +1 -1
  72. package/dist/components/input/Dropdown.mjs +135 -109
  73. package/dist/components/input/Dropdown.mjs.map +1 -1
  74. package/dist/components/input/Listbox.cjs +2 -0
  75. package/dist/components/input/Listbox.cjs.map +1 -0
  76. package/dist/components/input/Listbox.mjs +134 -0
  77. package/dist/components/input/Listbox.mjs.map +1 -0
  78. package/dist/components/input/Option.cjs +1 -1
  79. package/dist/components/input/Option.cjs.map +1 -1
  80. package/dist/components/input/Option.mjs +163 -97
  81. package/dist/components/input/Option.mjs.map +1 -1
  82. package/dist/components/input/SwatchPicker.cjs +1 -1
  83. package/dist/components/input/SwatchPicker.cjs.map +1 -1
  84. package/dist/components/input/SwatchPicker.context.cjs +2 -0
  85. package/dist/components/input/SwatchPicker.context.cjs.map +1 -0
  86. package/dist/components/input/SwatchPicker.context.mjs +35 -0
  87. package/dist/components/input/SwatchPicker.context.mjs.map +1 -0
  88. package/dist/components/input/SwatchPicker.mjs +131 -103
  89. package/dist/components/input/SwatchPicker.mjs.map +1 -1
  90. package/dist/components/input/SwatchPicker.swatches.cjs +2 -0
  91. package/dist/components/input/SwatchPicker.swatches.cjs.map +1 -0
  92. package/dist/components/input/SwatchPicker.swatches.mjs +207 -0
  93. package/dist/components/input/SwatchPicker.swatches.mjs.map +1 -0
  94. package/dist/components/input/TagPicker.cjs +1 -1
  95. package/dist/components/input/TagPicker.cjs.map +1 -1
  96. package/dist/components/input/TagPicker.context.cjs +2 -0
  97. package/dist/components/input/TagPicker.context.cjs.map +1 -0
  98. package/dist/components/input/TagPicker.context.mjs +20 -0
  99. package/dist/components/input/TagPicker.context.mjs.map +1 -0
  100. package/dist/components/input/TagPicker.create.cjs +2 -0
  101. package/dist/components/input/TagPicker.create.cjs.map +1 -0
  102. package/dist/components/input/TagPicker.create.mjs +24 -0
  103. package/dist/components/input/TagPicker.create.mjs.map +1 -0
  104. package/dist/components/input/TagPicker.mjs +13 -274
  105. package/dist/components/input/TagPicker.mjs.map +1 -1
  106. package/dist/components/input/TagPicker.option.cjs +2 -0
  107. package/dist/components/input/TagPicker.option.cjs.map +1 -0
  108. package/dist/components/input/TagPicker.option.mjs +45 -0
  109. package/dist/components/input/TagPicker.option.mjs.map +1 -0
  110. package/dist/components/input/TagPicker.overflow.cjs +2 -0
  111. package/dist/components/input/TagPicker.overflow.cjs.map +1 -0
  112. package/dist/components/input/TagPicker.overflow.mjs +153 -0
  113. package/dist/components/input/TagPicker.overflow.mjs.map +1 -0
  114. package/dist/components/input/TagPicker.parts.cjs +2 -0
  115. package/dist/components/input/TagPicker.parts.cjs.map +1 -0
  116. package/dist/components/input/TagPicker.parts.mjs +425 -0
  117. package/dist/components/input/TagPicker.parts.mjs.map +1 -0
  118. package/dist/components/input/TagPicker.root.cjs +2 -0
  119. package/dist/components/input/TagPicker.root.cjs.map +1 -0
  120. package/dist/components/input/TagPicker.root.mjs +416 -0
  121. package/dist/components/input/TagPicker.root.mjs.map +1 -0
  122. package/dist/components/input/TimePicker.cjs +1 -1
  123. package/dist/components/input/TimePicker.cjs.map +1 -1
  124. package/dist/components/input/TimePicker.mjs +77 -77
  125. package/dist/components/input/TimePicker.mjs.map +1 -1
  126. package/dist/components/input/dateUtils.cjs +1 -1
  127. package/dist/components/input/dateUtils.cjs.map +1 -1
  128. package/dist/components/input/dateUtils.mjs +114 -96
  129. package/dist/components/input/dateUtils.mjs.map +1 -1
  130. package/dist/components/input/pickerLabels.cjs +2 -0
  131. package/dist/components/input/pickerLabels.cjs.map +1 -0
  132. package/dist/components/input/pickerLabels.mjs +16 -0
  133. package/dist/components/input/pickerLabels.mjs.map +1 -0
  134. package/dist/components/input/pickerValues.cjs +2 -0
  135. package/dist/components/input/pickerValues.cjs.map +1 -0
  136. package/dist/components/input/pickerValues.mjs +24 -0
  137. package/dist/components/input/pickerValues.mjs.map +1 -0
  138. package/dist/components/layout/Accordion.cjs.map +1 -1
  139. package/dist/components/layout/Accordion.mjs.map +1 -1
  140. package/dist/components/navigation/Hamburger.cjs +2 -0
  141. package/dist/components/navigation/Hamburger.cjs.map +1 -0
  142. package/dist/components/navigation/Hamburger.mjs +54 -0
  143. package/dist/components/navigation/Hamburger.mjs.map +1 -0
  144. package/dist/components/navigation/Nav.cjs +1 -1
  145. package/dist/components/navigation/Nav.cjs.map +1 -1
  146. package/dist/components/navigation/Nav.context.cjs +2 -0
  147. package/dist/components/navigation/Nav.context.cjs.map +1 -0
  148. package/dist/components/navigation/Nav.context.mjs +137 -0
  149. package/dist/components/navigation/Nav.context.mjs.map +1 -0
  150. package/dist/components/navigation/Nav.mjs +151 -258
  151. package/dist/components/navigation/Nav.mjs.map +1 -1
  152. package/dist/components/navigation/Nav.parts.cjs +2 -0
  153. package/dist/components/navigation/Nav.parts.cjs.map +1 -0
  154. package/dist/components/navigation/Nav.parts.mjs +77 -0
  155. package/dist/components/navigation/Nav.parts.mjs.map +1 -0
  156. package/dist/components/navigation/Nav.root.cjs +2 -0
  157. package/dist/components/navigation/Nav.root.cjs.map +1 -0
  158. package/dist/components/navigation/Nav.root.mjs +78 -0
  159. package/dist/components/navigation/Nav.root.mjs.map +1 -0
  160. package/dist/components/navigation/NavDrawer.cjs +2 -0
  161. package/dist/components/navigation/NavDrawer.cjs.map +1 -0
  162. package/dist/components/navigation/NavDrawer.context.cjs +2 -0
  163. package/dist/components/navigation/NavDrawer.context.cjs.map +1 -0
  164. package/dist/components/navigation/NavDrawer.context.mjs +11 -0
  165. package/dist/components/navigation/NavDrawer.context.mjs.map +1 -0
  166. package/dist/components/navigation/NavDrawer.mjs +179 -0
  167. package/dist/components/navigation/NavDrawer.mjs.map +1 -0
  168. package/dist/components/overlays/Dialog.cjs +1 -1
  169. package/dist/components/overlays/Dialog.cjs.map +1 -1
  170. package/dist/components/overlays/Dialog.mjs +190 -125
  171. package/dist/components/overlays/Dialog.mjs.map +1 -1
  172. package/dist/components/overlays/Dialog.shared.cjs +1 -1
  173. package/dist/components/overlays/Dialog.shared.cjs.map +1 -1
  174. package/dist/components/overlays/Dialog.shared.mjs +157 -81
  175. package/dist/components/overlays/Dialog.shared.mjs.map +1 -1
  176. package/dist/components/overlays/Dialog.slots.cjs +2 -0
  177. package/dist/components/overlays/Dialog.slots.cjs.map +1 -0
  178. package/dist/components/overlays/Dialog.slots.mjs +129 -0
  179. package/dist/components/overlays/Dialog.slots.mjs.map +1 -0
  180. package/dist/components/overlays/Drawer.cjs +1 -1
  181. package/dist/components/overlays/Drawer.cjs.map +1 -1
  182. package/dist/components/overlays/Drawer.context.cjs +2 -0
  183. package/dist/components/overlays/Drawer.context.cjs.map +1 -0
  184. package/dist/components/overlays/Drawer.context.mjs +29 -0
  185. package/dist/components/overlays/Drawer.context.mjs.map +1 -0
  186. package/dist/components/overlays/Drawer.mjs +12 -187
  187. package/dist/components/overlays/Drawer.mjs.map +1 -1
  188. package/dist/components/overlays/Drawer.panel.cjs +2 -0
  189. package/dist/components/overlays/Drawer.panel.cjs.map +1 -0
  190. package/dist/components/overlays/Drawer.panel.mjs +159 -0
  191. package/dist/components/overlays/Drawer.panel.mjs.map +1 -0
  192. package/dist/components/overlays/Drawer.parts.cjs +2 -0
  193. package/dist/components/overlays/Drawer.parts.cjs.map +1 -0
  194. package/dist/components/overlays/Drawer.parts.mjs +152 -0
  195. package/dist/components/overlays/Drawer.parts.mjs.map +1 -0
  196. package/dist/components/overlays/Drawer.root.cjs +2 -0
  197. package/dist/components/overlays/Drawer.root.cjs.map +1 -0
  198. package/dist/components/overlays/Drawer.root.mjs +207 -0
  199. package/dist/components/overlays/Drawer.root.mjs.map +1 -0
  200. package/dist/components/overlays/Drawer.scroll.cjs +2 -0
  201. package/dist/components/overlays/Drawer.scroll.cjs.map +1 -0
  202. package/dist/components/overlays/Drawer.scroll.mjs +42 -0
  203. package/dist/components/overlays/Drawer.scroll.mjs.map +1 -0
  204. package/dist/components/table/useGridNavigation.cjs +1 -1
  205. package/dist/components/table/useGridNavigation.cjs.map +1 -1
  206. package/dist/components/table/useGridNavigation.mjs +67 -70
  207. package/dist/components/table/useGridNavigation.mjs.map +1 -1
  208. package/dist/hooks/useActiveDescendant.cjs +2 -0
  209. package/dist/hooks/useActiveDescendant.cjs.map +1 -0
  210. package/dist/hooks/useActiveDescendant.mjs +56 -0
  211. package/dist/hooks/useActiveDescendant.mjs.map +1 -0
  212. package/dist/hooks/useDismiss.cjs.map +1 -1
  213. package/dist/hooks/useDismiss.mjs.map +1 -1
  214. package/dist/hooks/useFocusTrap.cjs +1 -1
  215. package/dist/hooks/useFocusTrap.cjs.map +1 -1
  216. package/dist/hooks/useFocusTrap.mjs +115 -98
  217. package/dist/hooks/useFocusTrap.mjs.map +1 -1
  218. package/dist/hooks/useListbox.cjs +1 -1
  219. package/dist/hooks/useListbox.cjs.map +1 -1
  220. package/dist/hooks/useListbox.mjs +250 -210
  221. package/dist/hooks/useListbox.mjs.map +1 -1
  222. package/dist/hooks/useModalLayer.cjs +1 -1
  223. package/dist/hooks/useModalLayer.cjs.map +1 -1
  224. package/dist/hooks/useModalLayer.mjs +35 -22
  225. package/dist/hooks/useModalLayer.mjs.map +1 -1
  226. package/dist/hooks/useRestoreFocus.cjs +1 -1
  227. package/dist/hooks/useRestoreFocus.cjs.map +1 -1
  228. package/dist/hooks/useRestoreFocus.mjs +91 -78
  229. package/dist/hooks/useRestoreFocus.mjs.map +1 -1
  230. package/dist/hooks/useRovingGrid.cjs +2 -0
  231. package/dist/hooks/useRovingGrid.cjs.map +1 -0
  232. package/dist/hooks/useRovingGrid.mjs +69 -0
  233. package/dist/hooks/useRovingGrid.mjs.map +1 -0
  234. package/dist/hooks/useRovingTabIndex.cjs +1 -1
  235. package/dist/hooks/useRovingTabIndex.cjs.map +1 -1
  236. package/dist/hooks/useRovingTabIndex.mjs +102 -78
  237. package/dist/hooks/useRovingTabIndex.mjs.map +1 -1
  238. package/dist/index.cjs +1 -1
  239. package/dist/index.d.cts +4391 -394
  240. package/dist/index.d.ts +4391 -394
  241. package/dist/index.mjs +115 -101
  242. package/dist/lib/classNames.cjs +1 -1
  243. package/dist/lib/classNames.cjs.map +1 -1
  244. package/dist/lib/classNames.mjs +170 -74
  245. package/dist/lib/classNames.mjs.map +1 -1
  246. package/dist/lib/date.cjs +2 -0
  247. package/dist/lib/date.cjs.map +1 -0
  248. package/dist/lib/date.mjs +44 -0
  249. package/dist/lib/date.mjs.map +1 -0
  250. package/dist/lib/focus.cjs +1 -1
  251. package/dist/lib/focus.cjs.map +1 -1
  252. package/dist/lib/focus.mjs +5 -2
  253. package/dist/lib/focus.mjs.map +1 -1
  254. package/dist/lib/icons.cjs +1 -1
  255. package/dist/lib/icons.cjs.map +1 -1
  256. package/dist/lib/icons.mjs +13 -6
  257. package/dist/lib/icons.mjs.map +1 -1
  258. package/dist/lib/layers.cjs +1 -1
  259. package/dist/lib/layers.cjs.map +1 -1
  260. package/dist/lib/layers.mjs +53 -47
  261. package/dist/lib/layers.mjs.map +1 -1
  262. package/dist/styles.css +1 -1
  263. package/package.json +1 -1
  264. package/src/styles/tokens.css +25 -0
@@ -3,343 +3,258 @@ import { cn as e } from "../../lib/cn.mjs";
3
3
  import { warnDeprecated as t, warnOnce as n } from "../../lib/dev.mjs";
4
4
  import { composeEventHandlers as r } from "../../lib/composeEventHandlers.mjs";
5
5
  import { datePickerClassNames as i } from "../../lib/classNames.mjs";
6
- import { useControllable as a } from "../../hooks/useControllable.mjs";
7
- import { useId as o } from "../../hooks/useId.mjs";
8
- import { getArrowIntent as ee, getDirection as te } from "../../lib/direction.mjs";
9
- import { FOCUSABLE_SELECTOR as ne } from "../../lib/focus.mjs";
10
- import { useMergedRefs as re } from "../../hooks/useMergedRefs.mjs";
11
- import { useIsClient as ie } from "../../hooks/useIsClient.mjs";
12
- import { focusableDisabledProps as s, joinIds as ae, preventIfDisabled as oe } from "../../lib/aria.mjs";
13
- import { useFieldContext as se, useFieldControl as ce } from "../../hooks/useFieldControl.mjs";
14
- import { useDismiss as le } from "../../hooks/useDismiss.mjs";
15
- import { Portal as ue } from "../portal/Portal.mjs";
16
- import { disabledStyles as de, focusRing as fe, forcedColors as pe, inputAppearanceClasses as me, inputFocus as he, inputHeightClasses as ge, inputPaddingClasses as _e, inputTextClasses as ve } from "../../lib/styles.mjs";
17
- import { CalendarIcon as ye, ChevronLeftIcon as be, ChevronRightIcon as xe, DismissIcon as Se } from "../../lib/icons.mjs";
18
- import { useInputLook as Ce } from "./inputLook.mjs";
19
- import { isInvalidLook as we } from "./Input.mjs";
20
- import { useFormReset as Te } from "../../hooks/useFormReset.mjs";
21
- import { HiddenInput as Ee } from "../internal/HiddenInput.mjs";
22
- import { pickerButtonOffset as De, pickerEndPadding as Oe, pickerGlyphSize as ke, pickerIconButtonClasses as Ae } from "./pickerStyles.mjs";
23
- import { usePopupPosition as je } from "../../hooks/usePopupPosition.mjs";
24
- import { addDays as c, addMonths as l, clampDate as u, formatDate as Me, formatDayLabel as Ne, formatDayNumber as Pe, formatISODate as d, formatMonthYear as Fe, getCalendarDays as Ie, getLocaleDateFormat as Le, getWeekdayNames as Re, isDateInRange as ze, isSameDay as f, isSameMonth as p, isValidLocaleTag as Be, parseDate as Ve, startOfDay as m, startOfMonth as He } from "./dateUtils.mjs";
25
- import { useFocusTrap as Ue } from "../../hooks/useFocusTrap.mjs";
26
- import { useRestoreFocus as We } from "../../hooks/useRestoreFocus.mjs";
27
- import * as h from "react";
28
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
29
- import { flushSync as Ge } from "react-dom";
6
+ import { isSameDay as ee, startOfDay as a } from "../../lib/date.mjs";
7
+ import { useControllable as o } from "../../hooks/useControllable.mjs";
8
+ import { useId as s } from "../../hooks/useId.mjs";
9
+ import { FOCUSABLE_SELECTOR as te } from "../../lib/focus.mjs";
10
+ import { useMergedRefs as ne } from "../../hooks/useMergedRefs.mjs";
11
+ import { useIsClient as re } from "../../hooks/useIsClient.mjs";
12
+ import { joinIds as ie } from "../../lib/aria.mjs";
13
+ import { useFieldContext as ae, useFieldControl as oe } from "../../hooks/useFieldControl.mjs";
14
+ import { useDismiss as se } from "../../hooks/useDismiss.mjs";
15
+ import { Portal as ce } from "../portal/Portal.mjs";
16
+ import { disabledStyles as le, focusRing as ue, inputAppearanceClasses as de, inputFocus as fe, inputHeightClasses as pe, inputPaddingClasses as me, inputTextClasses as he } from "../../lib/styles.mjs";
17
+ import { CalendarIcon as ge, DismissIcon as _e } from "../../lib/icons.mjs";
18
+ import { useInputLook as ve } from "./inputLook.mjs";
19
+ import { isInvalidLook as ye } from "./Input.mjs";
20
+ import { useFormReset as be } from "../../hooks/useFormReset.mjs";
21
+ import { HiddenInput as xe } from "../internal/HiddenInput.mjs";
22
+ import { pickerButtonOffset as c, pickerEndPadding as Se, pickerGlyphSize as l, pickerIconButtonClasses as u } from "./pickerStyles.mjs";
23
+ import { usePopupPosition as Ce } from "../../hooks/usePopupPosition.mjs";
24
+ import { formatDate as we, formatISODate as d, getLocaleDateFormat as Te, isDateInRange as Ee, isValidLocaleTag as De, parseDate as Oe } from "./dateUtils.mjs";
25
+ import { useFocusTrap as ke } from "../../hooks/useFocusTrap.mjs";
26
+ import { useRestoreFocus as Ae } from "../../hooks/useRestoreFocus.mjs";
27
+ import { CalendarView as je } from "./Calendar.mjs";
28
+ import * as f from "react";
29
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
30
+ import { flushSync as Me } from "react-dom";
30
31
  //#region src/components/input/DatePicker.tsx
31
- var Ke = (e) => e ? `Enter a date in the format ${e}.` : "Enter a valid date.", qe = (e, t) => e !== void 0 && t !== void 0 ? `Enter a date between ${e} and ${t}.` : e === void 0 ? `Enter a date on or before ${t}.` : `Enter a date on or after ${e}.`, Je = "flex h-8 w-8 items-center justify-center rounded bg-transparent p-0 text-foreground not-disabled:not-aria-disabled:hover:bg-subtle-hover", Ye = "flex h-8 w-8 items-center justify-center rounded bg-transparent p-0 text-caption-1 text-foreground not-disabled:not-aria-disabled:hover:bg-subtle-hover data-[outside]:text-muted-foreground data-[today]:border data-[today]:border-primary data-[today]:font-semibold data-[selected]:bg-primary data-[selected]:font-semibold data-[selected]:text-primary-foreground not-disabled:not-aria-disabled:data-[selected]:hover:bg-primary-hover aria-disabled:line-through";
32
- function Xe(e) {
33
- let t = [];
34
- for (let n = 0; n < e.length; n += 7) t.push(e.slice(n, n + 7));
35
- return t;
36
- }
37
- var Ze = (Ze) => {
38
- let { value: Qe, defaultValue: $e, onValueChange: et, onChange: tt, formatDate: v, parseDate: y, locale: b, minDate: x, maxDate: S, disabledDates: nt, placeholder: rt = "Select a date", disabled: C = !1, size: it, appearance: at, readOnly: w, clearable: ot = !1, firstDayOfWeek: T = 0, open: st, defaultOpen: ct, onOpenChange: lt, onInvalidInput: ut, labels: E, name: dt, form: ft, required: pt, autoComplete: mt = "off", autoCapitalize: ht, autoCorrect: gt, enterKeyHint: _t, inputMode: vt, spellCheck: yt, autoFocus: bt, tabIndex: xt, id: St, "aria-label": Ct, "aria-labelledby": wt, "aria-describedby": Tt, "aria-invalid": Et, "aria-required": Dt, "aria-errormessage": Ot, "aria-details": kt, onFocus: At, onBlur: jt, onKeyDown: Mt, onKeyUp: Nt, controlRef: Pt, className: Ft, ref: It, ...Lt } = Ze;
39
- tt !== void 0 && t("DatePicker", "onChange", "onValueChange");
40
- let { size: D, appearance: O } = Ce(it, at), Rt = v !== void 0, k = y !== void 0;
41
- h.useEffect(() => {
42
- Rt && !k && n("DatePicker:formatDate-without-parseDate", "DatePicker: `formatDate` is set without `parseDate`. Typed dates are parsed with the default parser for `locale` (its numeric format or yyyy-mm-dd), which may not read your format; pass `parseDate` as the inverse of `formatDate`.");
43
- }, [Rt, k]), h.useEffect(() => {
44
- b !== void 0 && !Be(b) && n(`DatePicker:invalid-locale:${b}`, `DatePicker: \`locale\` "${b}" is not a valid BCP 47 language tag (use hyphens, as in "en-US"). The runtime default locale formats and parses the dates instead, so the server and the browser may render different text.`);
45
- }, [b]);
46
- let [A, zt] = a(Qe, $e ?? null, (e) => {
47
- et?.(e), tt?.(e);
48
- }), j = !C && !w, [M, N] = a(st, (ct ?? !1) && j, lt), Bt = ie(), P = M && j && Bt, Vt = st !== void 0;
49
- h.useEffect(() => {
50
- !j && M && !Vt && N(!1);
32
+ var Ne = (e) => e ? `Enter a date in the format ${e}.` : "Enter a valid date.", Pe = (e, t) => e !== void 0 && t !== void 0 ? `Enter a date between ${e} and ${t}.` : e === void 0 ? `Enter a date on or before ${t}.` : `Enter a date on or after ${e}.`, Fe = {
33
+ header: i.header,
34
+ previousMonthButton: i.previousMonthButton,
35
+ heading: i.heading,
36
+ headingButton: i.headingButton,
37
+ nextMonthButton: i.nextMonthButton,
38
+ grid: i.grid,
39
+ weekday: i.weekday,
40
+ day: i.day,
41
+ month: i.month,
42
+ year: i.year,
43
+ weekNumberHeader: i.weekNumberHeader,
44
+ weekNumber: i.weekNumber,
45
+ markedDot: i.markedDot,
46
+ footer: i.footer,
47
+ todayButton: i.todayButton,
48
+ closeButton: i.closeButton
49
+ }, h = (h) => {
50
+ let { value: Ie, defaultValue: Le, onValueChange: Re, onChange: g, formatDate: _, parseDate: v, locale: y, minDate: b, maxDate: x, disabledDates: S, placeholder: ze = "Select a date", disabled: C = !1, size: Be, appearance: Ve, readOnly: w, clearable: He = !1, firstDayOfWeek: Ue = 0, today: We, initialVisibleDate: Ge, showMonthPicker: Ke, showWeekNumbers: qe, firstWeekOfYear: Je, showGoToToday: Ye, showCloseButton: Xe = !1, markedDates: Ze, renderDay: Qe, dayLabel: $e, open: T, defaultOpen: et, onOpenChange: tt, onInvalidInput: nt, labels: E, name: rt, form: it, required: at, autoComplete: ot = "off", autoCapitalize: st, autoCorrect: ct, enterKeyHint: lt, inputMode: ut, spellCheck: dt, autoFocus: ft, tabIndex: pt, id: mt, "aria-label": ht, "aria-labelledby": gt, "aria-describedby": _t, "aria-invalid": vt, "aria-required": yt, "aria-errormessage": bt, "aria-details": xt, onFocus: St, onBlur: Ct, onKeyDown: wt, onKeyUp: Tt, controlRef: Et, className: Dt, ref: Ot, ...kt } = h;
51
+ g !== void 0 && t("DatePicker", "onChange", "onValueChange");
52
+ let { size: D, appearance: O } = ve(Be, Ve), k = _ !== void 0, A = v !== void 0;
53
+ f.useEffect(() => {
54
+ k && !A && n("DatePicker:formatDate-without-parseDate", "DatePicker: `formatDate` is set without `parseDate`. Typed dates are parsed with the default parser for `locale` (its numeric format or yyyy-mm-dd), which may not read your format; pass `parseDate` as the inverse of `formatDate`.");
55
+ }, [k, A]), f.useEffect(() => {
56
+ y !== void 0 && !De(y) && n(`DatePicker:invalid-locale:${y}`, `DatePicker: \`locale\` "${y}" is not a valid BCP 47 language tag (use hyphens, as in "en-US"). The runtime default locale formats and parses the dates instead, so the server and the browser may render different text.`);
57
+ }, [y]);
58
+ let [j, At] = o(Ie, Le ?? null, (e) => {
59
+ Re?.(e), g?.(e);
60
+ }), M = !C && !w, [N, P] = o(T, (et ?? !1) && M, tt), jt = re(), F = N && M && jt, Mt = T !== void 0;
61
+ f.useEffect(() => {
62
+ !M && N && !Mt && P(!1);
51
63
  }, [
52
- j,
53
64
  M,
54
- Vt,
55
- N
65
+ N,
66
+ Mt,
67
+ P
56
68
  ]);
57
- let F = (e) => v ? v(e) : Me(e, b), Ht = (e) => y ? y(e) : Ve(e, b), [I, L] = h.useState(null), [R, z] = h.useState(null), [Ut, Wt] = h.useState(j);
58
- Ut !== j && (Wt(j), j || (L(null), z(null)));
59
- let B = A ? d(A) : "", [Gt, Kt] = h.useState(B);
60
- Gt !== B && (Kt(B), R !== null && (L(null), z(null)));
61
- let qt = (e) => !ze(e, x, S) || !!nt?.(m(e)), V = (e) => {
62
- let t = e ? m(e) : null;
63
- (t ? f(t, A) : A === null) || zt(t), L(null), z(null);
64
- }, H = (e) => {
65
- if (!e.trim()) return V(null), !0;
66
- let t = Ht(e), n = null;
67
- if (!t || Number.isNaN(t.getTime()) ? n = "unparseable" : ze(t, x, S) ? nt?.(m(t)) && (n = "disabled") : n = "out-of-range", n || !t) {
69
+ let I = (e) => _ ? _(e) : we(e, y), Nt = (e) => v ? v(e) : Oe(e, y), [L, R] = f.useState(null), [z, B] = f.useState(null), [Pt, Ft] = f.useState(M);
70
+ Pt !== M && (Ft(M), M || (R(null), B(null)));
71
+ let V = j ? d(j) : "", [It, Lt] = f.useState(V);
72
+ It !== V && (Lt(V), z !== null && (R(null), B(null)));
73
+ let H = (e) => {
74
+ let t = e ? a(e) : null;
75
+ (t ? ee(t, j) : j === null) || At(t), R(null), B(null);
76
+ }, U = (e) => {
77
+ if (!e.trim()) return H(null), !0;
78
+ let t = Nt(e), n = null;
79
+ if (!t || Number.isNaN(t.getTime()) ? n = "unparseable" : Ee(t, b, x) ? S?.(a(t)) && (n = "disabled") : n = "out-of-range", n || !t) {
68
80
  let t = n ?? "unparseable";
69
- return z(t), ut?.(e, t), !1;
81
+ return B(t), nt?.(e, t), !1;
70
82
  }
71
- return V(t), !0;
72
- }, U = m(/* @__PURE__ */ new Date()), Jt = () => He(u(A ?? U, x, S)), [W, Yt] = h.useState(Jt), [Xt, G] = h.useState(null), [Zt, Qt] = h.useState(!1), [$t, en] = h.useState(P);
73
- $t !== P && (en(P), P && (Yt(Jt()), G(null))), Zt && !P && Qt(!1);
74
- let K = h.useMemo(() => Xe(Ie(W, T)), [W, T]), tn = (e) => !!e && p(e, W), nn = (e) => !!e && e >= K[0][0] && e <= K[K.length - 1][6], rn = u(U, x, S), an = u(W, x, S), q = nn(Xt) ? Xt : tn(A) ? m(A) : tn(rn) ? rn : tn(an) ? an : W, on = d(q), sn = (e) => {
75
- let t = u(e, x, S);
76
- G(t), p(t, W) || Yt(He(t));
77
- }, cn = (e) => {
78
- let t = l(W, e), n = u(l(q, e), x, S);
79
- Yt(t), G(p(n, t) ? n : null);
80
- }, ln = (e) => {
81
- f(e, q) || G(e);
82
- }, un = !!x && c(W, -1) < m(x), dn = !!S && l(W, 1) > m(S), fn = h.useMemo(() => Re(b, T), [b, T]), J = h.useRef(null), Y = h.useRef(null), pn = h.useRef(null), mn = h.useRef(null), X = h.useRef(null), [hn, gn] = h.useState(null), _n = re(Pt, J), vn = o("datepicker-dialog"), yn = o("datepicker-heading"), Z = o("datepicker-grid"), bn = o("datepicker-error"), xn = (e) => {
83
- X.current = e, N(!1);
84
- }, { layerId: Sn } = le({
85
- open: P,
83
+ return H(t), !0;
84
+ }, [W, G] = f.useState(!1);
85
+ W && !F && G(!1);
86
+ let K = f.useRef(null), q = f.useRef(null), J = f.useRef(null), Y = f.useRef(null), [Rt, zt] = f.useState(null), Bt = ne(Et, K), Vt = s("datepicker-dialog"), Ht = s("datepicker-heading"), X = s("datepicker-error"), Z = (e) => {
87
+ Y.current = e, P(!1);
88
+ }, { layerId: Ut } = se({
89
+ open: F,
86
90
  onDismiss: (e, t) => {
87
- let n = e === "outside-press" && t.target instanceof Element ? t.target.closest(ne) : null;
88
- xn(n ?? (Zt ? J.current : null));
91
+ let n = e === "outside-press" && t.target instanceof Element ? t.target.closest(te) : null;
92
+ Z(n ?? (W ? K.current : null));
89
93
  },
90
- refs: [mn, Y],
91
- anchorRef: Y,
94
+ refs: [J, q],
95
+ anchorRef: q,
92
96
  kind: "modal"
93
- }), { setReference: Cn, setFloating: wn, floatingProps: Tn } = je({
94
- open: P,
97
+ }), { setReference: Wt, setFloating: Gt, floatingProps: Kt } = Ce({
98
+ open: F,
95
99
  side: "bottom",
96
100
  align: "start"
97
- }), En = re(mn, gn, wn);
98
- Ue(hn, {
99
- enabled: P,
100
- layerId: Sn,
101
- initialFocus: () => pn.current?.querySelector("button[tabindex=\"0\"]") ?? null
102
- }), We({
103
- enabled: P,
104
- container: hn,
105
- triggerRef: Y,
106
- finalFocusRef: X,
101
+ }), qt = ne(J, zt, Gt);
102
+ ke(Rt, {
103
+ enabled: F,
104
+ layerId: Ut,
105
+ initialFocus: () => J.current?.querySelector("[data-wave-calendar-grid] button[tabindex=\"0\"]") ?? null
106
+ }), Ae({
107
+ enabled: F,
108
+ container: Rt,
109
+ triggerRef: q,
110
+ finalFocusRef: Y,
107
111
  onlyIfFocusInside: !0
108
- }), h.useLayoutEffect(() => {
109
- P && (X.current = null);
110
- }, [P]), h.useLayoutEffect(() => {
111
- let e = pn.current;
112
- if (!e) return;
113
- let t = e.ownerDocument.activeElement;
114
- if (!t || !e.contains(t)) return;
115
- let n = e.querySelector(`button[data-date="${on}"]`);
116
- n && n !== t && n.focus();
117
- }, [on]);
118
- let Dn = se(), On = (pt ?? Dn?.required ?? !1) && !w, kn = R !== null && !Dn?.hasErrorMessage, An = ce({
119
- id: St,
120
- "aria-label": Ct,
121
- "aria-labelledby": wt,
122
- "aria-describedby": ae(Tt, kn ? bn : void 0),
123
- "aria-invalid": R !== null || Et,
124
- "aria-required": Dt ?? pt
125
- }), jn = we(!1, An["aria-invalid"]);
126
- Te(J, () => V($e ?? null), ft);
127
- let Q = ot && !w && A !== null, Mn = (e) => {
128
- j && (L(e.target.value), z(null));
129
- }, Nn = r(Mt, (e) => {
130
- j && !e.nativeEvent.isComposing && (e.key === "Enter" && I !== null ? (e.preventDefault(), H(I)) : e.key === "Tab" && !e.shiftKey && Q && I !== null && !I.trim() ? Ge(() => H(I)) : e.key === "ArrowDown" && e.altKey && !P && (e.preventDefault(), I !== null && R === null && H(I), Qt(!0), N(!0)));
131
- }), Pn = r(jt, () => {
132
- j && I !== null && R === null && H(I);
133
- }), Fn = () => {
134
- j && (X.current = null, Qt(!1), N(!P));
135
- }, In = () => {
136
- j && (V(null), J.current?.focus());
137
- }, Ln = (e) => {
112
+ }), f.useLayoutEffect(() => {
113
+ F && (Y.current = null);
114
+ }, [F]);
115
+ let Jt = ae(), Yt = (at ?? Jt?.required ?? !1) && !w, Xt = z !== null && !Jt?.hasErrorMessage, Zt = oe({
116
+ id: mt,
117
+ "aria-label": ht,
118
+ "aria-labelledby": gt,
119
+ "aria-describedby": ie(_t, Xt ? X : void 0),
120
+ "aria-invalid": z !== null || vt,
121
+ "aria-required": yt ?? at
122
+ }), Qt = ye(!1, Zt["aria-invalid"]);
123
+ be(K, () => H(Le ?? null), it);
124
+ let Q = He && !w && j !== null, $t = (e) => {
125
+ M && (R(e.target.value), B(null));
126
+ }, en = r(wt, (e) => {
127
+ M && !e.nativeEvent.isComposing && (e.key === "Enter" && L !== null ? (e.preventDefault(), U(L)) : e.key === "Tab" && !e.shiftKey && Q && L !== null && !L.trim() ? Me(() => U(L)) : e.key === "ArrowDown" && e.altKey && !F && (e.preventDefault(), L !== null && z === null && U(L), G(!0), P(!0)));
128
+ }), tn = r(Ct, () => {
129
+ M && L !== null && z === null && U(L);
130
+ }), nn = () => {
131
+ M && (Y.current = null, G(!1), P(!F));
132
+ }, rn = () => {
133
+ M && (H(null), K.current?.focus());
134
+ }, an = (e) => {
138
135
  e.preventDefault();
139
- }, Rn = (e) => {
140
- j && !qt(e) && (V(e), xn(J.current));
141
- }, zn = (e) => {
142
- e.key !== "Escape" || e.defaultPrevented || e.nativeEvent.isComposing || (e.preventDefault(), xn(Zt ? J.current : null));
143
- }, Bn = (e) => {
144
- if (e.altKey || e.ctrlKey || e.metaKey) return;
145
- let t = (q.getDay() - T + 7) % 7, n;
146
- switch (e.key) {
147
- case "ArrowLeft":
148
- case "ArrowRight": {
149
- let t = ee(e.key, {
150
- orientation: "horizontal",
151
- dir: te(e.currentTarget)
152
- });
153
- n = c(q, t === "next" ? 1 : -1);
154
- break;
155
- }
156
- case "ArrowDown":
157
- n = c(q, 7);
158
- break;
159
- case "ArrowUp":
160
- n = c(q, -7);
161
- break;
162
- case "PageDown":
163
- n = l(q, e.shiftKey ? 12 : 1);
164
- break;
165
- case "PageUp":
166
- n = l(q, e.shiftKey ? -12 : -1);
167
- break;
168
- case "Home":
169
- n = c(q, -t);
170
- break;
171
- case "End":
172
- n = c(q, 6 - t);
173
- break;
174
- default: return;
175
- }
176
- e.preventDefault(), sn(n);
177
- }, Vn = I ?? (A ? F(A) : ""), $ = "";
178
- return R === "unparseable" ? $ = (E?.invalidDate ?? Ke)(k ? void 0 : Le(b).pattern) : R === "out-of-range" && (x || S) ? $ = (E?.outOfRange ?? qe)(x ? F(m(x)) : void 0, S ? F(m(S)) : void 0) : R === "disabled" && ($ = E?.unavailableDate ?? "This date is not available."), /* @__PURE__ */ _("div", {
136
+ }, on = (e) => {
137
+ M && (H(e), Z(K.current));
138
+ }, sn = () => Z(W ? K.current : null), cn = (e) => {
139
+ e.key !== "Escape" || e.defaultPrevented || e.nativeEvent.isComposing || (e.preventDefault(), sn());
140
+ }, ln = L ?? (j ? I(j) : ""), $ = "";
141
+ return z === "unparseable" ? $ = (E?.invalidDate ?? Ne)(A ? void 0 : Te(y).pattern) : z === "out-of-range" && (b || x) ? $ = (E?.outOfRange ?? Pe)(b ? I(a(b)) : void 0, x ? I(a(x)) : void 0) : z === "disabled" && ($ = E?.unavailableDate ?? "This date is not available."), /* @__PURE__ */ m("div", {
179
142
  "data-size": D,
180
143
  "data-appearance": O,
181
- ...Lt,
182
- ref: It,
183
- className: e(i.root, "relative inline-flex flex-col", Ft),
144
+ ...kt,
145
+ ref: Ot,
146
+ className: e(i.root, "relative inline-flex flex-col", Dt),
184
147
  children: [
185
- /* @__PURE__ */ _("div", {
186
- ref: Cn,
148
+ /* @__PURE__ */ m("div", {
149
+ ref: Wt,
187
150
  className: "relative flex items-center",
188
151
  children: [
189
- /* @__PURE__ */ g("input", {
190
- ref: _n,
152
+ /* @__PURE__ */ p("input", {
153
+ ref: Bt,
191
154
  type: "text",
192
- ...An,
193
- "aria-errormessage": Ot,
194
- "aria-details": kt,
195
- value: Vn,
196
- onChange: Mn,
197
- onFocus: At,
198
- onBlur: Pn,
199
- onKeyDown: Nn,
200
- onKeyUp: Nt,
201
- placeholder: rt,
155
+ ...Zt,
156
+ "aria-errormessage": bt,
157
+ "aria-details": xt,
158
+ value: ln,
159
+ onChange: $t,
160
+ onFocus: St,
161
+ onBlur: tn,
162
+ onKeyDown: en,
163
+ onKeyUp: Tt,
164
+ placeholder: ze,
202
165
  disabled: C,
203
166
  readOnly: w,
204
- autoComplete: mt,
205
- autoCapitalize: ht,
206
- autoCorrect: gt,
207
- enterKeyHint: _t,
208
- inputMode: vt,
209
- spellCheck: yt,
210
- autoFocus: bt,
211
- tabIndex: xt,
212
- className: e(i.input, ge[D], "w-full", _e[D], ve[D], me[O], "text-foreground placeholder:text-muted-foreground", he, de, jn && "border-destructive", Oe(Q ? 2 : 1, D))
167
+ autoComplete: ot,
168
+ autoCapitalize: st,
169
+ autoCorrect: ct,
170
+ enterKeyHint: lt,
171
+ inputMode: ut,
172
+ spellCheck: dt,
173
+ autoFocus: ft,
174
+ tabIndex: pt,
175
+ className: e(i.input, pe[D], "w-full", me[D], he[D], de[O], "text-foreground placeholder:text-muted-foreground", fe, le, Qt && "border-destructive", Se(Q ? 2 : 1, D))
213
176
  }),
214
- Q && /* @__PURE__ */ g("button", {
177
+ Q && /* @__PURE__ */ p("button", {
215
178
  type: "button",
216
179
  "aria-label": E?.clear ?? "Clear date",
217
180
  disabled: C,
218
- onMouseDown: Ln,
219
- onClick: In,
220
- className: e(i.clearButton, Ae(D, O), De(D, 2), "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", "disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:focus-visible:opacity-100"),
221
- children: /* @__PURE__ */ g(Se, { size: ke(D, "icon") })
181
+ onMouseDown: an,
182
+ onClick: rn,
183
+ className: e(i.clearButton, u(D, O), c(D, 2), "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", "disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:focus-visible:opacity-100"),
184
+ children: /* @__PURE__ */ p(_e, { size: l(D, "icon") })
222
185
  }),
223
- /* @__PURE__ */ g("button", {
224
- ref: Y,
186
+ /* @__PURE__ */ p("button", {
187
+ ref: q,
225
188
  type: "button",
226
189
  "aria-label": E?.openCalendar ?? "Open calendar",
227
190
  "aria-haspopup": "dialog",
228
- "aria-expanded": P,
229
- "aria-controls": P ? vn : void 0,
191
+ "aria-expanded": F,
192
+ "aria-controls": F ? Vt : void 0,
230
193
  disabled: C || w,
231
- onClick: Fn,
232
- className: e(i.openCalendarButton, Ae(D, O), De(D, 1), fe, de),
233
- children: /* @__PURE__ */ g(ye, { size: ke(D, "icon") })
194
+ onClick: nn,
195
+ className: e(i.openCalendarButton, u(D, O), c(D, 1), ue, le),
196
+ children: /* @__PURE__ */ p(ge, { size: l(D, "icon") })
234
197
  })
235
198
  ]
236
199
  }),
237
- kn && /* @__PURE__ */ g("p", {
238
- id: bn,
200
+ Xt && /* @__PURE__ */ p("p", {
201
+ id: X,
239
202
  role: "alert",
240
203
  className: e(i.errorMessage, "mt-1 text-caption-1 text-error"),
241
204
  children: $
242
205
  }),
243
- /* @__PURE__ */ g(Ee, {
244
- name: dt,
245
- form: ft,
206
+ /* @__PURE__ */ p(xe, {
207
+ name: rt,
208
+ form: it,
246
209
  disabled: C,
247
- value: A ? d(A) : "",
210
+ value: j ? d(j) : "",
248
211
  type: "text",
249
- required: On,
250
- onInvalid: () => J.current?.focus()
212
+ required: Yt,
213
+ onInvalid: () => K.current?.focus()
251
214
  }),
252
- P && /* @__PURE__ */ g(ue, {
253
- layerId: Sn,
254
- children: /* @__PURE__ */ _("div", {
255
- ref: En,
256
- id: vn,
215
+ F && /* @__PURE__ */ p(ce, {
216
+ layerId: Ut,
217
+ children: /* @__PURE__ */ p("div", {
218
+ ref: qt,
219
+ id: Vt,
257
220
  role: "dialog",
258
221
  "aria-modal": "true",
259
- "aria-labelledby": yn,
260
- ...Tn,
222
+ "aria-labelledby": Ht,
223
+ ...Kt,
261
224
  "data-state": "open",
262
- onKeyDown: zn,
225
+ onKeyDown: cn,
263
226
  className: e(i.surface, "rounded-md border border-border bg-background p-3 text-foreground shadow-16"),
264
- children: [/* @__PURE__ */ _("div", {
265
- className: e(i.header, "mb-2 flex items-center justify-between gap-2"),
266
- children: [
267
- /* @__PURE__ */ g("button", {
268
- type: "button",
269
- "aria-label": E?.previousMonth ?? "Previous month",
270
- "aria-controls": Z,
271
- ...s(un),
272
- onClick: oe(un, () => cn(-1)),
273
- className: e(i.previousMonthButton, Je, "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", "disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:focus-visible:opacity-100"),
274
- children: /* @__PURE__ */ g(be, { className: "wave-rtl:-scale-x-100" })
275
- }),
276
- /* @__PURE__ */ g("h2", {
277
- id: yn,
278
- "aria-live": "polite",
279
- className: e(i.heading, "text-body-1 font-semibold"),
280
- children: Fe(W, b)
281
- }),
282
- /* @__PURE__ */ g("button", {
283
- type: "button",
284
- "aria-label": E?.nextMonth ?? "Next month",
285
- "aria-controls": Z,
286
- ...s(dn),
287
- onClick: oe(dn, () => cn(1)),
288
- className: e(i.nextMonthButton, Je, "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", "disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:focus-visible:opacity-100"),
289
- children: /* @__PURE__ */ g(xe, { className: "wave-rtl:-scale-x-100" })
290
- })
291
- ]
292
- }), /* @__PURE__ */ _("table", {
293
- ref: pn,
294
- id: Z,
295
- role: "grid",
296
- "aria-labelledby": yn,
297
- onKeyDown: Bn,
298
- className: e(i.grid, "border-collapse"),
299
- children: [/* @__PURE__ */ g("thead", { children: /* @__PURE__ */ g("tr", { children: fn.map((t) => /* @__PURE__ */ _("th", {
300
- scope: "col",
301
- abbr: t.long,
302
- "aria-label": t.long,
303
- className: e(i.weekday, "h-8 w-8 text-center text-caption-1 font-normal text-muted-foreground"),
304
- children: [/* @__PURE__ */ g("span", {
305
- "aria-hidden": "true",
306
- children: t.short
307
- }), /* @__PURE__ */ g("span", {
308
- className: "sr-only",
309
- children: t.long
310
- })]
311
- }, t.long)) }) }), /* @__PURE__ */ g("tbody", { children: K.map((t, n) => /* @__PURE__ */ g("tr", { children: t.map((t, n) => {
312
- let r = d(t), a = f(t, A), o = f(t, U), ee = r === on, te = qt(t);
313
- return /* @__PURE__ */ g("td", {
314
- role: "gridcell",
315
- "aria-selected": a,
316
- className: "p-0",
317
- children: /* @__PURE__ */ g("button", {
318
- type: "button",
319
- tabIndex: ee ? 0 : -1,
320
- "aria-label": Ne(t, b),
321
- "aria-pressed": a || void 0,
322
- "aria-current": o ? "date" : void 0,
323
- ...s(te),
324
- "data-date": r,
325
- "data-selected": a ? "" : void 0,
326
- "data-today": o ? "" : void 0,
327
- "data-outside": p(t, W) ? void 0 : "",
328
- onFocus: () => ln(t),
329
- onClick: () => Rn(t),
330
- className: e(i.day, Ye, "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", "disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:focus-visible:opacity-100", a && pe.selectedLeaf),
331
- children: Pe(t, b)
332
- })
333
- }, n);
334
- }) }, n)) })]
335
- })]
227
+ children: /* @__PURE__ */ p(je, {
228
+ value: j,
229
+ onPick: on,
230
+ minDate: b,
231
+ maxDate: x,
232
+ disabledDates: S,
233
+ firstDayOfWeek: Ue,
234
+ locale: y,
235
+ today: We,
236
+ initialVisibleDate: Ge,
237
+ showMonthPicker: Ke,
238
+ showWeekNumbers: qe,
239
+ firstWeekOfYear: Je,
240
+ showGoToToday: Ye,
241
+ markedDates: Ze,
242
+ renderDay: Qe,
243
+ dayLabel: $e,
244
+ onClose: Xe ? sn : void 0,
245
+ closeLabel: E?.close,
246
+ labels: E,
247
+ headingAs: "h2",
248
+ headingId: Ht,
249
+ partClassNames: Fe
250
+ })
336
251
  })
337
252
  })
338
253
  ]
339
254
  });
340
255
  };
341
- Ze.displayName = "DatePicker";
256
+ h.displayName = "DatePicker";
342
257
  //#endregion
343
- export { Ze as DatePicker };
258
+ export { h as DatePicker };
344
259
 
345
260
  //# sourceMappingURL=DatePicker.mjs.map