jenosize-ui 0.2.2 → 0.3.1

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 (229) hide show
  1. package/README.md +183 -63
  2. package/THIRD-PARTY-NOTICES.md +95 -0
  3. package/dist/GradientPicker-Bv3V3vL_.d.ts +144 -0
  4. package/dist/{PaymentInput-Dn5WVQVy.d.ts → PaymentInput-s7_s3UDi.d.ts} +1 -1
  5. package/dist/{Select-Dt5ARIH8.d.ts → Select-r233iMaU.d.ts} +15 -1
  6. package/dist/{TagInput-BaBeve6L.d.ts → TagInput-w_l9Fp5i.d.ts} +1 -1
  7. package/dist/area-chart.d.ts +2 -2
  8. package/dist/area-chart.js +8 -6
  9. package/dist/at-least-one-BZ2dsck-.d.ts +18 -0
  10. package/dist/avatar.d.ts +1 -1
  11. package/dist/avatar.js +12 -10
  12. package/dist/badge.d.ts +1 -1
  13. package/dist/badge.js +7 -6
  14. package/dist/bar-chart.d.ts +2 -2
  15. package/dist/bar-chart.js +8 -6
  16. package/dist/breadcrumb.d.ts +1 -1
  17. package/dist/breadcrumb.js +5 -4
  18. package/dist/button.d.ts +1 -1
  19. package/dist/button.js +12 -10
  20. package/dist/calendar.d.ts +1 -1
  21. package/dist/calendar.js +16 -14
  22. package/dist/callout.d.ts +4 -2
  23. package/dist/callout.js +13 -11
  24. package/dist/card.d.ts +59 -3
  25. package/dist/card.js +4 -3
  26. package/dist/carousel.d.ts +169 -0
  27. package/dist/carousel.js +10 -0
  28. package/dist/catalog.json +11976 -0
  29. package/dist/checkbox.js +9 -7
  30. package/dist/{chunk-AIARANKE.js → chunk-2EUVBRKG.js} +4 -4
  31. package/dist/{chunk-5ZEUTSCV.js → chunk-2RRPWOKT.js} +6 -6
  32. package/dist/{chunk-DD5KJVFV.js → chunk-3JFSKCVU.js} +19 -19
  33. package/dist/{chunk-OACWA4TC.js → chunk-3ZZZPT5G.js} +6 -6
  34. package/dist/{chunk-LQURV7HQ.js → chunk-47EOHGXM.js} +4 -4
  35. package/dist/{chunk-CGHYXWTT.js → chunk-4KRCT3Q2.js} +4 -4
  36. package/dist/chunk-4P3JA653.js +1129 -0
  37. package/dist/{chunk-FWRHBMWT.js → chunk-4Y32RIC7.js} +5 -19
  38. package/dist/{chunk-BBKE4W3B.js → chunk-5Z26DU23.js} +7 -7
  39. package/dist/{chunk-7QXOGAN6.js → chunk-6CJYVYVN.js} +87 -538
  40. package/dist/{chunk-3HOHLQVP.js → chunk-6FGLABYH.js} +3 -3
  41. package/dist/{chunk-GQRSABRN.js → chunk-6Q4VVBFO.js} +4 -4
  42. package/dist/{chunk-MCQG4H6T.js → chunk-6T3QAO5K.js} +12 -4
  43. package/dist/chunk-7JOW3LEH.js +4852 -0
  44. package/dist/{chunk-AFYXSZGW.js → chunk-7LSUUEAF.js} +7 -5
  45. package/dist/{chunk-7VLYQR4D.js → chunk-7OFGPDYJ.js} +3 -3
  46. package/dist/{chunk-7GUPNTAH.js → chunk-7RD5RTHU.js} +7 -7
  47. package/dist/{chunk-X2VMIBK5.js → chunk-A36W77MQ.js} +4 -4
  48. package/dist/chunk-AZFHRLYF.js +67 -0
  49. package/dist/{chunk-CFFWYXDW.js → chunk-B6LYO33Y.js} +5 -5
  50. package/dist/{chunk-P6CON2R2.js → chunk-BH32X25C.js} +3 -3
  51. package/dist/{chunk-KHGW72BM.js → chunk-CH2XMCWX.js} +3 -3
  52. package/dist/{chunk-FNQJJO63.js → chunk-D46OKHTH.js} +4 -4
  53. package/dist/{chunk-LE44X5GS.js → chunk-D4YGYNNY.js} +9 -9
  54. package/dist/{chunk-T5574MXM.js → chunk-D7WD4SUC.js} +8 -8
  55. package/dist/{chunk-33TOK7ES.js → chunk-DCKVNHV5.js} +5 -5
  56. package/dist/chunk-EBZNUQ6E.js +525 -0
  57. package/dist/{chunk-22M75A3N.js → chunk-ED5UCYAV.js} +14 -11
  58. package/dist/{chunk-IQNVSQRK.js → chunk-EDVYLO2N.js} +5 -5
  59. package/dist/{chunk-N3RVMBPX.js → chunk-EJKQGUUM.js} +4 -4
  60. package/dist/{chunk-POQTE7JI.js → chunk-EKQLIUV5.js} +7 -7
  61. package/dist/{chunk-ULGCGKOE.js → chunk-EKV3CVTY.js} +4 -4
  62. package/dist/{chunk-LCG34A5T.js → chunk-EVINS473.js} +5 -3
  63. package/dist/{chunk-ZZSNTCCL.js → chunk-G7B2QUQP.js} +4 -4
  64. package/dist/{chunk-SB3DG572.js → chunk-GHRZC5LS.js} +6 -6
  65. package/dist/{chunk-5YWH2ANQ.js → chunk-GIC6T647.js} +11 -10
  66. package/dist/{chunk-7ZM7SNCZ.js → chunk-GPHGPY6T.js} +3 -3
  67. package/dist/chunk-GV2KTRRP.js +325 -0
  68. package/dist/{chunk-4RBIWI2Q.js → chunk-GYL4KOPT.js} +3 -3
  69. package/dist/{chunk-5KSD4WKN.js → chunk-HB6UA6EF.js} +5 -5
  70. package/dist/{chunk-CGZXQ7PA.js → chunk-HNNNJP3A.js} +3 -3
  71. package/dist/chunk-HTWGTTSF.js +1011 -0
  72. package/dist/chunk-IH2F5UNQ.js +109 -0
  73. package/dist/{chunk-QNIKRB62.js → chunk-INYUL4DX.js} +4 -4
  74. package/dist/{chunk-SKRR3ZMP.js → chunk-IUB5TSSH.js} +3 -3
  75. package/dist/chunk-JGGSRKHW.js +344 -0
  76. package/dist/{chunk-ZR6HNKSN.js → chunk-JHHJNIW2.js} +3 -3
  77. package/dist/chunk-KBI442IB.js +113 -0
  78. package/dist/chunk-KBQJIVUB.js +33 -0
  79. package/dist/{chunk-3QXLIZIX.js → chunk-KNGJ3CSB.js} +3 -3
  80. package/dist/chunk-KNKR5TUM.js +183 -0
  81. package/dist/{chunk-KZP6B6B3.js → chunk-KTWTYK5U.js} +16 -5
  82. package/dist/{chunk-5XPMY2LF.js → chunk-LKUAVDWP.js} +5 -5
  83. package/dist/{chunk-YHBI52P2.js → chunk-LPWSP523.js} +3 -3
  84. package/dist/{chunk-GLKFFA7N.js → chunk-LY7IJOUF.js} +5 -5
  85. package/dist/{chunk-R4Z7BINC.js → chunk-LYWQD5KL.js} +8 -8
  86. package/dist/{chunk-LLPWQDF7.js → chunk-MTOTPAYZ.js} +3 -3
  87. package/dist/{chunk-AZ7DKRBY.js → chunk-MVF7FA4D.js} +5 -5
  88. package/dist/{chunk-AIGYMTCU.js → chunk-MVUNB43J.js} +3 -3
  89. package/dist/{chunk-T4ZFZTY6.js → chunk-N7DLNDER.js} +4 -4
  90. package/dist/{chunk-E2YZ7IMT.js → chunk-NDRQETOQ.js} +15 -11
  91. package/dist/{chunk-ZD3MOLIB.js → chunk-O7CPRU67.js} +4 -4
  92. package/dist/{chunk-OLLD2BZN.js → chunk-OEYKTHG7.js} +3 -3
  93. package/dist/{chunk-TX57TNJS.js → chunk-OG3H3RP2.js} +9 -9
  94. package/dist/{chunk-UGBNYSBN.js → chunk-PFKPKE6O.js} +20 -34
  95. package/dist/chunk-PRWPFBA5.js +619 -0
  96. package/dist/{chunk-QDKETK7D.js → chunk-S55JKMG7.js} +5 -5
  97. package/dist/{chunk-QDYE5LVT.js → chunk-SF3HCW4G.js} +45 -4
  98. package/dist/{chunk-6MMBQVRO.js → chunk-TDKKZA63.js} +9 -9
  99. package/dist/{chunk-HHYEAFCL.js → chunk-TDXHBS2C.js} +11 -11
  100. package/dist/{chunk-74AIU53R.js → chunk-THGGU64E.js} +3 -3
  101. package/dist/chunk-UHSGD4CD.js +364 -0
  102. package/dist/{chunk-HV2W6HUR.js → chunk-URAURI6G.js} +10 -10
  103. package/dist/{chunk-D6XO4JVM.js → chunk-UU6KUS5O.js} +42 -20
  104. package/dist/{chunk-NKG4N6HA.js → chunk-V7KEEDSF.js} +5 -4
  105. package/dist/{chunk-IEAWNA3V.js → chunk-VDFWWWLL.js} +3 -3
  106. package/dist/chunk-VHAA22YE.js +11 -0
  107. package/dist/chunk-WJB5GWAZ.js +20 -0
  108. package/dist/{chunk-KJ5JUS53.js → chunk-WM6DGNIA.js} +9 -9
  109. package/dist/{chunk-MFFA5MXY.js → chunk-WUXMLJEC.js} +5 -5
  110. package/dist/{chunk-YPNL2NBD.js → chunk-XNXBO44X.js} +33 -11
  111. package/dist/chunk-XPY3XT7L.js +5671 -0
  112. package/dist/{chunk-54SIZR63.js → chunk-XVFRDKZJ.js} +7 -7
  113. package/dist/{chunk-LYXPJERB.js → chunk-YDD46AX2.js} +5 -5
  114. package/dist/{chunk-NC63TYNW.js → chunk-YHQJGNXD.js} +7 -7
  115. package/dist/{chunk-I6WMNXC7.js → chunk-YKRE5NIH.js} +6 -6
  116. package/dist/{chunk-RJTVCA62.js → chunk-ZIEGUI25.js} +3 -3
  117. package/dist/{chunk-5DP7W5HX.js → chunk-ZLDWYTDA.js} +3 -3
  118. package/dist/color-input.d.ts +93 -0
  119. package/dist/color-input.js +36 -0
  120. package/dist/color-picker.d.ts +268 -0
  121. package/dist/color-picker.js +29 -0
  122. package/dist/color-value-DYzChVOW.d.ts +129 -0
  123. package/dist/combobox.d.ts +1 -1
  124. package/dist/combobox.js +14 -12
  125. package/dist/data-map.d.ts +1673 -0
  126. package/dist/data-map.js +36 -0
  127. package/dist/date-calendar.d.ts +49 -0
  128. package/dist/date-calendar.js +13 -0
  129. package/dist/date-input.d.ts +1 -1
  130. package/dist/date-input.js +12 -10
  131. package/dist/date-picker.d.ts +15 -131
  132. package/dist/date-picker.js +26 -21
  133. package/dist/date-types-CLZek3W2.d.ts +100 -0
  134. package/dist/dialog.d.ts +1 -1
  135. package/dist/dialog.js +10 -9
  136. package/dist/drawer.d.ts +1 -1
  137. package/dist/drawer.js +9 -8
  138. package/dist/dropdown-menu.d.ts +1 -1
  139. package/dist/dropdown-menu.js +5 -4
  140. package/dist/dropzone.d.ts +3 -3
  141. package/dist/dropzone.js +18 -16
  142. package/dist/file-trigger.js +1 -0
  143. package/dist/form.d.ts +15 -5
  144. package/dist/form.js +75 -35
  145. package/dist/header-navigation.d.ts +2 -2
  146. package/dist/header-navigation.js +20 -18
  147. package/dist/helper.d.ts +1 -1
  148. package/dist/helper.js +1 -0
  149. package/dist/illustration.js +1 -0
  150. package/dist/index.d.ts +26 -11
  151. package/dist/index.js +92 -77
  152. package/dist/indicator.js +5 -4
  153. package/dist/inline-banner.d.ts +68 -0
  154. package/dist/inline-banner.js +21 -0
  155. package/dist/input.d.ts +1 -1
  156. package/dist/input.js +11 -9
  157. package/dist/kanban-board.d.ts +2 -2
  158. package/dist/kanban-board.js +15 -13
  159. package/dist/labels-CuSlirP_.d.ts +1381 -0
  160. package/dist/line-chart.d.ts +2 -2
  161. package/dist/line-chart.js +8 -6
  162. package/dist/mcp.js +231 -0
  163. package/dist/number-input.d.ts +1 -1
  164. package/dist/number-input.js +11 -9
  165. package/dist/pagination.d.ts +1 -1
  166. package/dist/pagination.js +15 -13
  167. package/dist/{card-D56VxyAe.d.ts → panel-CUGm_Mxy.d.ts} +9 -57
  168. package/dist/payment-input.d.ts +3 -3
  169. package/dist/payment-input.js +11 -9
  170. package/dist/picker-draft-BPV3MUPY.d.ts +9 -0
  171. package/dist/pie-chart.d.ts +2 -2
  172. package/dist/pie-chart.js +8 -6
  173. package/dist/popover.d.ts +65 -4
  174. package/dist/popover.js +9 -8
  175. package/dist/progress-steps.js +5 -4
  176. package/dist/progress.js +4 -3
  177. package/dist/provider.d.ts +1 -1
  178. package/dist/provider.js +4 -3
  179. package/dist/qr-code.d.ts +227 -0
  180. package/dist/qr-code.js +20 -0
  181. package/dist/radar-chart.d.ts +2 -2
  182. package/dist/radar-chart.js +8 -6
  183. package/dist/radial-chart.d.ts +2 -2
  184. package/dist/radial-chart.js +8 -6
  185. package/dist/radio.js +9 -7
  186. package/dist/rich-text-editor.d.ts +624 -0
  187. package/dist/rich-text-editor.js +52 -0
  188. package/dist/rich-text-highlight.d.ts +11 -0
  189. package/dist/rich-text-highlight.js +65 -0
  190. package/dist/rich-text-sanitize.d.ts +17 -0
  191. package/dist/rich-text-sanitize.js +176 -0
  192. package/dist/scroll-area.js +1 -0
  193. package/dist/select.d.ts +2 -2
  194. package/dist/select.js +17 -15
  195. package/dist/separator.js +3 -2
  196. package/dist/shared-CGf2D8ZX.d.ts +20 -0
  197. package/dist/sidebar-navigation.d.ts +73 -32
  198. package/dist/sidebar-navigation.js +15 -13
  199. package/dist/sidebar-state.d.ts +76 -0
  200. package/dist/sidebar-state.js +27 -0
  201. package/dist/skeleton.js +3 -2
  202. package/dist/slider.d.ts +321 -0
  203. package/dist/slider.js +14 -0
  204. package/dist/styles.css +1 -1
  205. package/dist/switch.d.ts +1 -1
  206. package/dist/switch.js +3 -2
  207. package/dist/table.d.ts +3 -19
  208. package/dist/table.js +34 -32
  209. package/dist/tabs.js +3 -2
  210. package/dist/tag-input.d.ts +3 -3
  211. package/dist/tag-input.js +14 -12
  212. package/dist/tag.d.ts +1 -1
  213. package/dist/tag.js +5 -4
  214. package/dist/textarea.js +9 -7
  215. package/dist/theme.css +965 -0
  216. package/dist/theme.js +13 -11
  217. package/dist/toast.d.ts +1 -1
  218. package/dist/toast.js +13 -11
  219. package/dist/tooltip.js +5 -3
  220. package/dist/tree.d.ts +1 -1
  221. package/dist/tree.js +7 -6
  222. package/dist/{types-DR9rAEy1.d.ts → types-BoZ6XeLB.d.ts} +1 -1
  223. package/dist/{use-uploads-KaPqDklo.d.ts → use-uploads-cHo2p7Gn.d.ts} +1 -1
  224. package/dist/verification-code-input.js +11 -9
  225. package/package.json +105 -8
  226. package/dist/chunk-BLIZ3CL3.js +0 -49
  227. package/dist/labels-DPrh0se9.d.ts +0 -627
  228. package/dist/panel-El4oI68p.d.ts +0 -9
  229. package/dist/shared-BYXJPnsN.d.ts +0 -11
@@ -0,0 +1,109 @@
1
+ import { DATE_PICKER_LABELS, toCalendarDate, DayGrid } from './chunk-JGGSRKHW.js';
2
+ import { DEFAULT_WEEK_START } from './chunk-4Y32RIC7.js';
3
+ import { useControllable } from './chunk-WJB5GWAZ.js';
4
+ import { useLocaleConfig } from './chunk-YIHKQ63K.js';
5
+ import { useLabels } from './chunk-ZIEGUI25.js';
6
+ import { enUS } from 'date-fns/locale';
7
+ import * as React from 'react';
8
+ import { jsx } from 'react/jsx-runtime';
9
+
10
+ function DateCalendar(props) {
11
+ const {
12
+ value,
13
+ defaultValue = null,
14
+ onValueChange,
15
+ min,
16
+ max,
17
+ disabledDates,
18
+ locale: localeProp,
19
+ weekStartsOn: weekStartsOnProp,
20
+ era: eraProp,
21
+ labels,
22
+ size = "md",
23
+ defaultMonth,
24
+ className
25
+ } = props;
26
+ const t = useLabels("datePicker", DATE_PICKER_LABELS, labels);
27
+ const app = useLocaleConfig();
28
+ const locale = localeProp ?? app.locale ?? enUS;
29
+ const era = eraProp ?? app.era ?? "ce";
30
+ const weekStartsOn = weekStartsOnProp ?? app.weekStartsOn ?? DEFAULT_WEEK_START;
31
+ const [selected, setSelected] = useControllable(value, defaultValue, onValueChange);
32
+ const normalized = React.useMemo(() => toCalendarDate(selected), [selected]);
33
+ return /* @__PURE__ */ jsx(
34
+ DayGrid,
35
+ {
36
+ mode: "single",
37
+ selected: normalized,
38
+ onSelect: (next) => setSelected(next),
39
+ min,
40
+ max,
41
+ disabledDates,
42
+ locale,
43
+ weekStartsOn,
44
+ era,
45
+ size,
46
+ defaultMonth,
47
+ ariaLabel: props["aria-label"] ?? t.calendarName,
48
+ className
49
+ }
50
+ );
51
+ }
52
+ DateCalendar.displayName = "DateCalendar";
53
+ var EMPTY_RANGE = { start: null, end: null };
54
+ function DateRangeCalendar(props) {
55
+ const {
56
+ value,
57
+ defaultValue = null,
58
+ onValueChange,
59
+ months = 2,
60
+ minNights,
61
+ maxNights,
62
+ min,
63
+ max,
64
+ disabledDates,
65
+ locale: localeProp,
66
+ weekStartsOn: weekStartsOnProp,
67
+ era: eraProp,
68
+ labels,
69
+ size = "md",
70
+ defaultMonth,
71
+ className
72
+ } = props;
73
+ const t = useLabels("datePicker", DATE_PICKER_LABELS, labels);
74
+ const app = useLocaleConfig();
75
+ const locale = localeProp ?? app.locale ?? enUS;
76
+ const era = eraProp ?? app.era ?? "ce";
77
+ const weekStartsOn = weekStartsOnProp ?? app.weekStartsOn ?? DEFAULT_WEEK_START;
78
+ const [selected, setSelected] = useControllable(value, defaultValue, (next) => onValueChange?.(next ?? EMPTY_RANGE));
79
+ const normalized = React.useMemo(
80
+ () => ({ start: toCalendarDate(selected?.start), end: toCalendarDate(selected?.end) }),
81
+ [selected?.start, selected?.end]
82
+ );
83
+ return /* @__PURE__ */ jsx(
84
+ DayGrid,
85
+ {
86
+ mode: "range",
87
+ selected: normalized,
88
+ onSelect: (next) => setSelected(next),
89
+ months,
90
+ minNights,
91
+ maxNights,
92
+ min,
93
+ max,
94
+ disabledDates,
95
+ locale,
96
+ weekStartsOn,
97
+ era,
98
+ size,
99
+ defaultMonth,
100
+ ariaLabel: props["aria-label"] ?? t.rangeCalendarName,
101
+ className
102
+ }
103
+ );
104
+ }
105
+ DateRangeCalendar.displayName = "DateRangeCalendar";
106
+
107
+ export { DateCalendar, DateRangeCalendar };
108
+ //# sourceMappingURL=chunk-IH2F5UNQ.js.map
109
+ //# sourceMappingURL=chunk-IH2F5UNQ.js.map
@@ -1,5 +1,5 @@
1
- import { PanelChrome } from './chunk-CGZXQ7PA.js';
2
- import { CloseButton } from './chunk-CGHYXWTT.js';
1
+ import { PanelChrome } from './chunk-HNNNJP3A.js';
2
+ import { CloseButton } from './chunk-4KRCT3Q2.js';
3
3
  import { BACKDROP_MOTION, DIALOG_POPUP_MOTION } from './chunk-O4GRKO3I.js';
4
4
  import { cn } from './chunk-ZSNJ6UA3.js';
5
5
  import { Dialog } from '@base-ui/react/dialog';
@@ -84,5 +84,5 @@ function DialogSurface(props) {
84
84
  }
85
85
 
86
86
  export { BACKDROP_TREATMENT, DialogSurface, OVERLAY_BACKDROPS, useControllableOpen };
87
- //# sourceMappingURL=chunk-QNIKRB62.js.map
88
- //# sourceMappingURL=chunk-QNIKRB62.js.map
87
+ //# sourceMappingURL=chunk-INYUL4DX.js.map
88
+ //# sourceMappingURL=chunk-INYUL4DX.js.map
@@ -1,4 +1,4 @@
1
- import { Cartesian } from './chunk-5DP7W5HX.js';
1
+ import { Cartesian } from './chunk-ZLDWYTDA.js';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
 
4
4
  function BarChart({ stacked = false, layout = "columns", ...rest }) {
@@ -6,5 +6,5 @@ function BarChart({ stacked = false, layout = "columns", ...rest }) {
6
6
  }
7
7
 
8
8
  export { BarChart };
9
- //# sourceMappingURL=chunk-SKRR3ZMP.js.map
10
- //# sourceMappingURL=chunk-SKRR3ZMP.js.map
9
+ //# sourceMappingURL=chunk-IUB5TSSH.js.map
10
+ //# sourceMappingURL=chunk-IUB5TSSH.js.map
@@ -0,0 +1,344 @@
1
+ import { weekStartIndex } from './chunk-4Y32RIC7.js';
2
+ import { BE_OFFSET } from './chunk-KNGJ3CSB.js';
3
+ import { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from './chunk-KBI442IB.js';
4
+ import { cn } from './chunk-ZSNJ6UA3.js';
5
+ import { warnPositiveInt } from './chunk-SF3HCW4G.js';
6
+ import { isValid, startOfDay, addYears, startOfMonth, format } from 'date-fns';
7
+ import * as React from 'react';
8
+ import { SelectionState, DayFlag, UI, DayPicker } from 'react-day-picker';
9
+ import { jsx } from 'react/jsx-runtime';
10
+
11
+ // src/components/date-picker/labels.ts
12
+ var DATE_PICKER_LABELS = {
13
+ /** The trigger's accessible name when the field has no `label`. */
14
+ openCalendar: "Choose a date",
15
+ openRange: "Choose a date range",
16
+ /** The two typed segments of a range. */
17
+ startDate: "Start date",
18
+ endDate: "End date",
19
+ /** The confirm footer, shown under `commit="confirm"`. */
20
+ cancel: "Cancel",
21
+ apply: "Apply",
22
+ /** Defaults behind the `placeholder` props — each prop still wins. */
23
+ placeholder: "Select date",
24
+ rangePlaceholder: "Select dates",
25
+ /** Defaults behind the standalone calendars' `aria-label`. */
26
+ calendarName: "Calendar",
27
+ rangeCalendarName: "Date range calendar",
28
+ /**
29
+ * Appended to the trigger's accessible name when the field is required, visually hidden —
30
+ * `aria-required` is illegal on `role="button"`, so the requirement has to travel in the NAME.
31
+ *
32
+ * Deliberately the bare word, NOT the `", required"` that `FIELD_LABELS` and `DROPZONE_LABELS`
33
+ * carry: this converts an existing literal and the pass's rule is that a default is byte-identical
34
+ * to what it replaced. The three spellings SHOULD agree — the comma is a pause a screen reader
35
+ * honours — but changing what a picker announces is a decision, not a conversion.
36
+ */
37
+ required: "required"
38
+ };
39
+ function toRdpRange(v) {
40
+ if (v == null || v.start == null) return void 0;
41
+ return { from: v.start, to: v.end ?? void 0 };
42
+ }
43
+ function fromRdpRange(r) {
44
+ if (r == null) return { start: null, end: null };
45
+ return { start: r.from ?? null, end: r.to ?? null };
46
+ }
47
+ function eraFormatters(era, locale) {
48
+ if (era === "ce") return void 0;
49
+ return {
50
+ formatCaption: (month) => `${format(month, "LLLL", { locale })} ${month.getFullYear() + BE_OFFSET}`,
51
+ // rdp v10 hands the year as a `Date`, not a number (v9 passed a number) — read it from the date.
52
+ formatYearDropdown: (year) => String(year.getFullYear() + BE_OFFSET)
53
+ };
54
+ }
55
+ function eraLabels(era, locale) {
56
+ if (era === "ce") return void 0;
57
+ return {
58
+ labelDayButton: (date) => `${format(date, "d LLLL", { locale })} ${date.getFullYear() + BE_OFFSET}`,
59
+ labelGrid: (date) => `${format(date, "LLLL", { locale })} ${date.getFullYear() + BE_OFFSET}`
60
+ };
61
+ }
62
+ function toCalendarDate(d) {
63
+ if (d == null || !isValid(d)) return null;
64
+ return startOfDay(d);
65
+ }
66
+
67
+ // src/lib/day-grid-classes.ts
68
+ var CELL_SIZE = {
69
+ sm: "size-8",
70
+ md: "size-10",
71
+ lg: "size-11"
72
+ };
73
+ var DAY_TEXT = { sm: "text-xs", md: "text-sm", lg: "text-sm" };
74
+ var CAPTION_TEXT = { sm: "text-sm", md: "text-sm", lg: "text-md" };
75
+ var MONTHS_GAP = { sm: "gap-4", md: "gap-6", lg: "gap-6" };
76
+ var FOCUS_RING = "outline-focus-ring focus-visible:outline-2 focus-visible:-outline-offset-2";
77
+ var DAY_RADIUS = "rounded-lg";
78
+ var SELECTED_FILL = cn(
79
+ "text-fg-white",
80
+ "[&>button]:bg-brand-solid [&>button]:font-medium [&>button]:text-fg-white [&>button]:hover:bg-brand-solid_hover",
81
+ "[&>button]:[--dot:var(--color-fg-white)]"
82
+ );
83
+ var NAV_BUTTON = cn(
84
+ "absolute top-0 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-lg",
85
+ "text-fg-quaternary transition-colors duration-100 ease-linear hover:bg-ghost-hover hover:text-secondary",
86
+ // See the header: rdp uses `aria-disabled`, never the attribute.
87
+ "aria-disabled:pointer-events-none aria-disabled:text-fg-disabled",
88
+ "[&>svg]:size-5 [&>svg]:shrink-0",
89
+ FOCUS_RING
90
+ );
91
+ function dayGridClasses(size, months, selection) {
92
+ return {
93
+ /* The root draws NO box — see the header. It sets the type family + base colour only, so a grid
94
+ dropped onto an unstyled surface still inherits the library's font.
95
+
96
+ The colour is `fg-secondary` (gray-700), not `fg` (gray-900), and it is set HERE rather than on
97
+ the day button so that the four per-day states can keep overriding it from the `<td>` by plain
98
+ inheritance — a `text-*` on `day_button` would out-specify every one of them. A calendar reads
99
+ as a field of values to choose between, not as body copy; gray-900 numerals made the whole grid
100
+ shout, and it is the one colour Untitled UI's grid and ours had genuinely different. */
101
+ root: "text-secondary",
102
+ /* Two months sit side by side and **wrap** when their parent is too narrow — plain `flex-wrap`,
103
+ deliberately NOT a container query.
104
+
105
+ Two reasons, both load-bearing. (1) A `@container` needs `container-type: inline-size`, which is
106
+ inline-size CONTAINMENT: the element's own width stops depending on its contents. The grid's host
107
+ inside a picker is a `w-max` (shrink-to-fit) popup, so a contained grid root would collapse the
108
+ popup it is meant to size. (2) A query threshold is a second truth about how wide two months are
109
+ — and `@md` (448px) was already wrong, because two `md` months are 584px, so the row engaged and
110
+ then overflowed. Wrapping needs no threshold at all: it reflows at exactly the width where the
111
+ months stop fitting, at every `size`. */
112
+ months: cn("flex flex-wrap", months === 2 && MONTHS_GAP[size]),
113
+ /* `relative`, because the two nav arrows are absolutely positioned into this month's caption row.
114
+ With `navLayout: "around"` rdp puts the PREVIOUS button in the first month and the NEXT button
115
+ in the last one, so at `months={2}` one pair of arrows spans both grids — which is the layout a
116
+ range picker wants — and at `months={1}` they flank that month's own caption.
117
+
118
+ `shrink-0` is what keeps the grid honest: a month is exactly 7 cells wide, and a shrinkable flex
119
+ item would be squeezed below that and spill its rows over the neighbouring month (which is
120
+ precisely what `min-w-0` here did). */
121
+ month: "relative flex shrink-0 flex-col gap-3",
122
+ /* `px-8` reserves both arrows' width, so a long month name in a locale like Thai can never slide
123
+ under a chevron — keep it equal to `NAV_BUTTON`'s box. */
124
+ month_caption: cn("flex h-8 items-center justify-center px-8", CAPTION_TEXT[size]),
125
+ /* Shared by the plain caption AND the dropdown's visible label (which appends its own chevron),
126
+ so it has to be a flex line rather than plain text. */
127
+ caption_label: "inline-flex items-center gap-1 font-semibold text-secondary",
128
+ button_previous: cn(NAV_BUTTON, "left-0"),
129
+ button_next: cn(NAV_BUTTON, "right-0"),
130
+ /* The dropdown caption — mounted only when the min/max span makes a year list useful (see
131
+ `day-grid.tsx`). rdp overlays a transparent native `<select>` on the label: the label carries
132
+ the visible chrome, the select carries the hit area and the keyboard. */
133
+ dropdowns: cn("flex items-center gap-1", CAPTION_TEXT[size]),
134
+ dropdown_root: "relative inline-flex cursor-pointer items-center rounded-lg px-1.5 hover:bg-ghost-hover has-[:focus-visible]:outline-2 has-[:focus-visible]:-outline-offset-2 has-[:focus-visible]:outline-focus-ring",
135
+ dropdown: "absolute inset-0 cursor-pointer appearance-none bg-transparent opacity-0",
136
+ /* `w-max`, not `w-full`: the rows are fixed-width flex lines (7 cells), so the table must size to
137
+ them rather than to a parent that may be narrower. */
138
+ month_grid: "w-max",
139
+ /* `weekdays` is a `<tr>` and `week` is a `<tr>`; `flex` on both is what makes the columns line up
140
+ with the fixed-size cells instead of with table auto-layout.
141
+
142
+ The `mb-1` on both is the grid's ROW RHYTHM: 4px of air under the weekday initials and between
143
+ every pair of week rows, so a range band reads as a run of separate weeks rather than one solid
144
+ block. It is a MARGIN, not a `gap`, precisely so the band stays gapless HORIZONTALLY. */
145
+ weekdays: "mb-1 flex",
146
+ weekday: cn(
147
+ "flex items-center justify-center font-medium text-secondary",
148
+ CELL_SIZE[size],
149
+ // Tracks the day type scale: the initials head their columns, so a smaller step made the header
150
+ // read as a caption floating above the grid rather than as part of it.
151
+ DAY_TEXT[size]
152
+ ),
153
+ week: "flex last:mb-0 mb-1",
154
+ /* The CELL is the range band's paint surface — a continuous band needs a gapless, un-rounded box —
155
+ so the wash lives here and the button on top stays transparent. `p-0` because a `<td>` would
156
+ otherwise take table padding and break the band.
157
+
158
+ `first:`/`last:` round the band where a WEEK ends, not only where the selection does: a band
159
+ that runs into Saturday and resumes on Sunday is two runs on screen, and a square cut on each
160
+ would read as a band clipped by the grid rather than as one that wraps. Invisible on any day
161
+ that carries no fill. */
162
+ day: cn("relative p-0 first:rounded-l-lg last:rounded-r-lg", CELL_SIZE[size]),
163
+ day_button: cn(
164
+ "relative flex size-full cursor-pointer items-center justify-center font-normal tabular-nums transition-colors duration-100 ease-linear",
165
+ DAY_RADIUS,
166
+ DAY_TEXT[size],
167
+ // A ghost's hover wash: the one deliberately TRANSLUCENT surface role, because a day rests with
168
+ // no fill and must step off an unknown host (a card, a popover, a range band). See the header's
169
+ // ladder — this is the same 6% step today's pill and the band wear.
170
+ "hover:bg-ghost-hover hover:font-medium",
171
+ FOCUS_RING
172
+ ),
173
+ /* Today: a brand dot under the numeral, plus the weight — and **no fill of its own**. Untitled UI
174
+ gives it a neutral pill as well; we deliberately do not, because the grid already spends its two
175
+ neutral washes on the hover and the range band, and a third static one made today read as a
176
+ permanently-hovered cell (identical value to the hover, by construction) and as a second kind of
177
+ "chosen" beside the brand chip. A dot is the whole marker: it is the only mark in the grid that
178
+ means "now" rather than "picked", so it should not borrow the vocabulary of either.
179
+
180
+ The dot is centred explicitly (`left-1/2` + `-translate-x-1/2`) rather than left to its static
181
+ position — the button is a flex line, so an absolute child with no inline offset lands after the
182
+ numeral, not under it.
183
+
184
+ **It travels on `--dot`,** published here on the `<td>` and republished on the `<button>` by
185
+ `SELECTED_FILL` — see its note for why an inherited-vs-own cascade beats a specificity contest.
186
+ `bg-current` used to do this job and can no longer: it followed the numeral, and the numeral is
187
+ now the grid's plain gray rather than brand. */
188
+ today: cn(
189
+ "[--dot:var(--color-text-brand-secondary)] [&>button]:font-medium",
190
+ "[&>button]:after:absolute [&>button]:after:bottom-1 [&>button]:after:left-1/2 [&>button]:after:size-1",
191
+ "[&>button]:after:-translate-x-1/2 [&>button]:after:rounded-full [&>button]:after:bg-(color:--dot)"
192
+ ),
193
+ /* A day belonging to the flanking month — **the one value NOT taken from Untitled UI.** Theirs is
194
+ `opacity-50` over secondary text, which measures #99A0AA: **2.58:1** on white. An outside day is
195
+ not disabled — it is clickable, and selecting one jumps the grid a month — so it owes AA like any
196
+ other control's text. `fg-subtle` (gray-500) is the faintest stop in the ramp that clears it, at
197
+ 4.98:1, and there is nothing between it and the failing one. (An `opacity-*` was never available
198
+ either — see the header: it would fade the focus ring with it.) */
199
+ outside: "text-quaternary",
200
+ /* No `opacity-*` — see the header. */
201
+ disabled: "pointer-events-none text-fg-disabled",
202
+ hidden: "invisible",
203
+ /* The brand fill. Yielded to the three range states ONLY once a range is complete enough for them
204
+ to be emitted — see the `selection` param's note. */
205
+ selected: selection === "range-complete" ? "" : SELECTED_FILL,
206
+ /* The range band. The wash is on the CELL, so it is gapless and continuous across the row; the two
207
+ ends put the solid brand fill on their BUTTON, which sits on top at the full cell size and covers
208
+ the wash under it. So a single-day range (`start === end`, which takes BOTH end classes) is a
209
+ plain rounded brand square, with no half-rounded seam to reconcile.
210
+
211
+ **The band is NEUTRAL, and the brand belongs to the two ends alone.** It was `bg-brand-soft`, and
212
+ a purple band next to purple endpoints left the ends — the only two days the user actually
213
+ chose — with nothing to stand out against. A gray run under two brand chips says "these two, and
214
+ everything between" in one read. The wash and its hover are the header's 6% / 10% ladder. */
215
+ range_start: cn("rounded-l-lg bg-ghost-hover", SELECTED_FILL),
216
+ range_end: cn("rounded-r-lg bg-ghost-hover", SELECTED_FILL),
217
+ range_middle: "bg-ghost-hover [&>button]:font-medium [&>button]:hover:bg-selected"
218
+ };
219
+ }
220
+ function disabledMatchers(min, max, disabledDates) {
221
+ const matchers = [];
222
+ if (min) matchers.push({ before: min });
223
+ if (max) matchers.push({ after: max });
224
+ if (typeof disabledDates === "function") matchers.push(disabledDates);
225
+ else if (disabledDates) matchers.push([...disabledDates]);
226
+ return matchers.length > 0 ? matchers : void 0;
227
+ }
228
+ function Chevron({ orientation }) {
229
+ if (orientation === "left") return /* @__PURE__ */ jsx(ChevronLeftIcon, {});
230
+ if (orientation === "right") return /* @__PURE__ */ jsx(ChevronRightIcon, {});
231
+ return /* @__PURE__ */ jsx(ChevronDownIcon, {});
232
+ }
233
+ function NamedRoot({ rootRef, ...rest }) {
234
+ return /* @__PURE__ */ jsx("div", { ...rest, ref: rootRef, role: "group" });
235
+ }
236
+ function DayGrid(props) {
237
+ const {
238
+ mode,
239
+ selected,
240
+ onSelect,
241
+ months = 1,
242
+ min,
243
+ max,
244
+ disabledDates,
245
+ locale,
246
+ weekStartsOn,
247
+ era,
248
+ size,
249
+ defaultMonth,
250
+ month,
251
+ onMonthChange,
252
+ minNights,
253
+ maxNights,
254
+ ariaLabel,
255
+ className
256
+ } = props;
257
+ const component = mode === "range" ? "DateRangeCalendar / DateRangePicker" : "DateCalendar / DatePicker";
258
+ warnPositiveInt(component, "minNights", minNights);
259
+ warnPositiveInt(component, "maxNights", maxNights);
260
+ const range = mode === "range" ? selected : null;
261
+ const selection = mode === "single" ? "single" : range?.start != null && range.end != null ? "range-complete" : "range-open";
262
+ const classes = dayGridClasses(size, months, selection);
263
+ const classNames = React.useMemo(
264
+ () => ({
265
+ [UI.Root]: cn(classes.root, className),
266
+ [UI.Months]: classes.months,
267
+ [UI.Month]: classes.month,
268
+ [UI.MonthCaption]: classes.month_caption,
269
+ [UI.CaptionLabel]: classes.caption_label,
270
+ [UI.PreviousMonthButton]: classes.button_previous,
271
+ [UI.NextMonthButton]: classes.button_next,
272
+ [UI.Dropdowns]: classes.dropdowns,
273
+ [UI.Dropdown]: classes.dropdown,
274
+ [UI.DropdownRoot]: classes.dropdown_root,
275
+ [UI.MonthGrid]: classes.month_grid,
276
+ [UI.Weekdays]: classes.weekdays,
277
+ [UI.Weekday]: classes.weekday,
278
+ [UI.Week]: classes.week,
279
+ [UI.Day]: classes.day,
280
+ [UI.DayButton]: classes.day_button,
281
+ [DayFlag.today]: classes.today,
282
+ [DayFlag.outside]: classes.outside,
283
+ [DayFlag.disabled]: classes.disabled,
284
+ [DayFlag.hidden]: classes.hidden,
285
+ [SelectionState.selected]: classes.selected,
286
+ [SelectionState.range_start]: classes.range_start,
287
+ [SelectionState.range_middle]: classes.range_middle,
288
+ [SelectionState.range_end]: classes.range_end
289
+ }),
290
+ [classes, className]
291
+ );
292
+ const spansYears = min != null && max != null && max.getTime() > addYears(min, 2).getTime();
293
+ const captionLayout = spansYears ? "dropdown" : "label";
294
+ const shared = {
295
+ numberOfMonths: months,
296
+ startMonth: min ? startOfMonth(min) : void 0,
297
+ endMonth: max ? startOfMonth(max) : void 0,
298
+ disabled: disabledMatchers(min, max, disabledDates),
299
+ locale,
300
+ // Explicit, and always set: rdp would otherwise read the week start off `locale`, which is the
301
+ // rule this prop replaced (`src/lib/date.ts`'s `WeekStart` records why).
302
+ weekStartsOn: weekStartIndex(weekStartsOn, locale),
303
+ formatters: eraFormatters(era, locale),
304
+ labels: eraLabels(era, locale),
305
+ classNames,
306
+ components: ariaLabel == null ? { Chevron } : { Chevron, Root: NamedRoot },
307
+ captionLayout,
308
+ // prev/next flanking the caption — the house pattern, and at `months={2}` rdp puts the two arrows
309
+ // in the FIRST and LAST month, so one pair spans both grids instead of repeating per month.
310
+ navLayout: "around",
311
+ // A six-row grid always, so opening a 5-row month next to a 6-row one does not jump the popover's
312
+ // height; the outside days are what fill it.
313
+ fixedWeeks: true,
314
+ showOutsideDays: true,
315
+ // Motion is ours (`overlay/motion.ts`). rdp's month slide would fight the popover's own
316
+ // enter/exit transform, and the two run on different timing curves.
317
+ animate: false,
318
+ defaultMonth,
319
+ month,
320
+ onMonthChange,
321
+ "aria-label": ariaLabel
322
+ };
323
+ if (mode === "range") {
324
+ const value2 = selected;
325
+ return /* @__PURE__ */ jsx(
326
+ DayPicker,
327
+ {
328
+ ...shared,
329
+ mode: "range",
330
+ selected: toRdpRange(value2),
331
+ onSelect: (next) => onSelect(fromRdpRange(next)),
332
+ resetOnSelect: true,
333
+ min: minNights,
334
+ max: maxNights
335
+ }
336
+ );
337
+ }
338
+ const value = selected;
339
+ return /* @__PURE__ */ jsx(DayPicker, { ...shared, mode: "single", selected: value ?? void 0, onSelect: (next) => onSelect(next ?? null) });
340
+ }
341
+
342
+ export { DATE_PICKER_LABELS, DayGrid, toCalendarDate };
343
+ //# sourceMappingURL=chunk-JGGSRKHW.js.map
344
+ //# sourceMappingURL=chunk-JGGSRKHW.js.map
@@ -1,4 +1,4 @@
1
- import { useControllableOpen, DialogSurface } from './chunk-QNIKRB62.js';
1
+ import { useControllableOpen, DialogSurface } from './chunk-INYUL4DX.js';
2
2
  import { EXPLICIT_CLOSE } from './chunk-S7NNXWIN.js';
3
3
  import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
4
4
  import * as React from 'react';
@@ -68,5 +68,5 @@ function Dialog(props) {
68
68
  Dialog.displayName = "Dialog";
69
69
 
70
70
  export { Dialog };
71
- //# sourceMappingURL=chunk-ZR6HNKSN.js.map
72
- //# sourceMappingURL=chunk-ZR6HNKSN.js.map
71
+ //# sourceMappingURL=chunk-JHHJNIW2.js.map
72
+ //# sourceMappingURL=chunk-JHHJNIW2.js.map
@@ -0,0 +1,113 @@
1
+ import { AlignCenter, AlignJustify, AlignLeft, AlignRight, AlignVerticalJustifyCenter, AlignVerticalJustifyEnd, AlignVerticalJustifyStart, ArrowDown, ArrowLeft, ArrowLeftRight, ArrowRight, ArrowUp, Asterisk, Baseline, Bell, BetweenHorizontalEnd, BetweenHorizontalStart, BetweenVerticalEnd, BetweenVerticalStart, Bold, Calendar, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsLeft, ChevronsLeftRight, ChevronsRight, ChevronsRightLeft, ChevronsUpDown, CircleAlert, CircleCheck, CircleHelp, Circle, CircleX, Code, Columns3, Crosshair, Download, Ellipsis, EllipsisVertical, ExternalLink, Eye, EyeOff, File, GripVertical, Heading1, Heading2, Heading3, Highlighter, Image, Inbox, IndentDecrease, IndentIncrease, Info, Italic, Layers, Link, List, ListOrdered, ListTodo, LoaderCircle, Maximize, Megaphone, Menu, Minimize, Minus, Moon, MoveHorizontal, Move, Paintbrush, Palette, PanelLeft, PanelTop, Pause, Pencil, Pilcrow, Pipette, Play, Plus, Quote, Redo2, RemoveFormatting, RotateCcw, RotateCw, Rows3, Search, Slash, SquareCode, Strikethrough, Subscript, Sun, Superscript, TableCellsMerge, TableCellsSplit, Table, TableRowsSplit, Trash2, TriangleAlert, Underline, Undo2, Unlink2, UploadCloud, User, X } from 'lucide-react';
2
+
3
+ // src/components/icons/core/index.ts
4
+ var AlignCenterIcon = AlignCenter;
5
+ var AlignJustifyIcon = AlignJustify;
6
+ var AlignLeftIcon = AlignLeft;
7
+ var AlignRightIcon = AlignRight;
8
+ var AlignVerticalJustifyCenterIcon = AlignVerticalJustifyCenter;
9
+ var AlignVerticalJustifyEndIcon = AlignVerticalJustifyEnd;
10
+ var AlignVerticalJustifyStartIcon = AlignVerticalJustifyStart;
11
+ var ArrowDownIcon = ArrowDown;
12
+ var ArrowLeftIcon = ArrowLeft;
13
+ var ArrowLeftRightIcon = ArrowLeftRight;
14
+ var ArrowRightIcon = ArrowRight;
15
+ var ArrowUpIcon = ArrowUp;
16
+ var AsteriskIcon = Asterisk;
17
+ var BaselineIcon = Baseline;
18
+ var BellIcon = Bell;
19
+ var BetweenHorizontalEndIcon = BetweenHorizontalEnd;
20
+ var BetweenHorizontalStartIcon = BetweenHorizontalStart;
21
+ var BetweenVerticalEndIcon = BetweenVerticalEnd;
22
+ var BetweenVerticalStartIcon = BetweenVerticalStart;
23
+ var BoldIcon = Bold;
24
+ var CalendarIcon = Calendar;
25
+ var CheckIcon = Check;
26
+ var ChevronDownIcon = ChevronDown;
27
+ var ChevronLeftIcon = ChevronLeft;
28
+ var ChevronRightIcon = ChevronRight;
29
+ var ChevronsLeftIcon = ChevronsLeft;
30
+ var ChevronsLeftRightIcon = ChevronsLeftRight;
31
+ var ChevronsRightIcon = ChevronsRight;
32
+ var ChevronsRightLeftIcon = ChevronsRightLeft;
33
+ var ChevronsUpDownIcon = ChevronsUpDown;
34
+ var ChevronUpIcon = ChevronUp;
35
+ var CircleIcon = Circle;
36
+ var CircleAlertIcon = CircleAlert;
37
+ var CircleCheckIcon = CircleCheck;
38
+ var CircleHelpIcon = CircleHelp;
39
+ var CircleXIcon = CircleX;
40
+ var CodeIcon = Code;
41
+ var Columns3Icon = Columns3;
42
+ var CrosshairIcon = Crosshair;
43
+ var DownloadIcon = Download;
44
+ var EllipsisIcon = Ellipsis;
45
+ var EllipsisVerticalIcon = EllipsisVertical;
46
+ var ExternalLinkIcon = ExternalLink;
47
+ var EyeIcon = Eye;
48
+ var EyeOffIcon = EyeOff;
49
+ var FileIcon = File;
50
+ var GripVerticalIcon = GripVertical;
51
+ var Heading1Icon = Heading1;
52
+ var Heading2Icon = Heading2;
53
+ var Heading3Icon = Heading3;
54
+ var HighlighterIcon = Highlighter;
55
+ var ImageIcon = Image;
56
+ var InboxIcon = Inbox;
57
+ var IndentDecreaseIcon = IndentDecrease;
58
+ var IndentIncreaseIcon = IndentIncrease;
59
+ var InfoIcon = Info;
60
+ var ItalicIcon = Italic;
61
+ var LayersIcon = Layers;
62
+ var LinkIcon = Link;
63
+ var ListIcon = List;
64
+ var ListOrderedIcon = ListOrdered;
65
+ var ListTodoIcon = ListTodo;
66
+ var LoaderCircleIcon = LoaderCircle;
67
+ var MaximizeIcon = Maximize;
68
+ var MegaphoneIcon = Megaphone;
69
+ var MenuIcon = Menu;
70
+ var MinimizeIcon = Minimize;
71
+ var MinusIcon = Minus;
72
+ var MoonIcon = Moon;
73
+ var MoveIcon = Move;
74
+ var MoveHorizontalIcon = MoveHorizontal;
75
+ var PaintbrushIcon = Paintbrush;
76
+ var PaletteIcon = Palette;
77
+ var PanelLeftIcon = PanelLeft;
78
+ var PanelTopIcon = PanelTop;
79
+ var PauseIcon = Pause;
80
+ var PencilIcon = Pencil;
81
+ var PilcrowIcon = Pilcrow;
82
+ var PipetteIcon = Pipette;
83
+ var PlayIcon = Play;
84
+ var PlusIcon = Plus;
85
+ var QuoteIcon = Quote;
86
+ var Redo2Icon = Redo2;
87
+ var RemoveFormattingIcon = RemoveFormatting;
88
+ var RotateCcwIcon = RotateCcw;
89
+ var RotateCwIcon = RotateCw;
90
+ var Rows3Icon = Rows3;
91
+ var SearchIcon = Search;
92
+ var SlashIcon = Slash;
93
+ var SquareCodeIcon = SquareCode;
94
+ var StrikethroughIcon = Strikethrough;
95
+ var SubscriptIcon = Subscript;
96
+ var SunIcon = Sun;
97
+ var SuperscriptIcon = Superscript;
98
+ var TableIcon = Table;
99
+ var TableCellsMergeIcon = TableCellsMerge;
100
+ var TableCellsSplitIcon = TableCellsSplit;
101
+ var TableRowsSplitIcon = TableRowsSplit;
102
+ var Trash2Icon = Trash2;
103
+ var TriangleAlertIcon = TriangleAlert;
104
+ var UnderlineIcon = Underline;
105
+ var Undo2Icon = Undo2;
106
+ var Unlink2Icon = Unlink2;
107
+ var UploadCloudIcon = UploadCloud;
108
+ var UserIcon = User;
109
+ var XIcon = X;
110
+
111
+ export { AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, AlignVerticalJustifyCenterIcon, AlignVerticalJustifyEndIcon, AlignVerticalJustifyStartIcon, ArrowDownIcon, ArrowLeftIcon, ArrowLeftRightIcon, ArrowRightIcon, ArrowUpIcon, AsteriskIcon, BaselineIcon, BellIcon, BetweenHorizontalEndIcon, BetweenHorizontalStartIcon, BetweenVerticalEndIcon, BetweenVerticalStartIcon, BoldIcon, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsLeftRightIcon, ChevronsRightIcon, ChevronsRightLeftIcon, ChevronsUpDownIcon, CircleAlertIcon, CircleCheckIcon, CircleHelpIcon, CircleIcon, CircleXIcon, CodeIcon, Columns3Icon, CrosshairIcon, DownloadIcon, EllipsisIcon, EllipsisVerticalIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileIcon, GripVerticalIcon, Heading1Icon, Heading2Icon, Heading3Icon, HighlighterIcon, ImageIcon, InboxIcon, IndentDecreaseIcon, IndentIncreaseIcon, InfoIcon, ItalicIcon, LayersIcon, LinkIcon, ListIcon, ListOrderedIcon, ListTodoIcon, LoaderCircleIcon, MaximizeIcon, MegaphoneIcon, MenuIcon, MinimizeIcon, MinusIcon, MoonIcon, MoveHorizontalIcon, MoveIcon, PaintbrushIcon, PaletteIcon, PanelLeftIcon, PanelTopIcon, PauseIcon, PencilIcon, PilcrowIcon, PipetteIcon, PlayIcon, PlusIcon, QuoteIcon, Redo2Icon, RemoveFormattingIcon, RotateCcwIcon, RotateCwIcon, Rows3Icon, SearchIcon, SlashIcon, SquareCodeIcon, StrikethroughIcon, SubscriptIcon, SunIcon, SuperscriptIcon, TableCellsMergeIcon, TableCellsSplitIcon, TableIcon, TableRowsSplitIcon, Trash2Icon, TriangleAlertIcon, UnderlineIcon, Undo2Icon, Unlink2Icon, UploadCloudIcon, UserIcon, XIcon };
112
+ //# sourceMappingURL=chunk-KBI442IB.js.map
113
+ //# sourceMappingURL=chunk-KBI442IB.js.map
@@ -0,0 +1,33 @@
1
+ import * as React from 'react';
2
+
3
+ // src/lib/picker-draft.ts
4
+ function usePickerDraft(committed, commit, setCommitted, onOpen) {
5
+ const [open, setOpen] = React.useState(false);
6
+ const [draft, setDraftState] = React.useState(committed);
7
+ const onOpenChange = (next) => {
8
+ if (next) {
9
+ setDraftState(committed);
10
+ onOpen?.(committed);
11
+ }
12
+ setOpen(next);
13
+ };
14
+ const setDraft = (next) => {
15
+ setDraftState(next);
16
+ if (commit === "instant") setCommitted(next);
17
+ };
18
+ return {
19
+ open,
20
+ draft,
21
+ setDraft,
22
+ onOpenChange,
23
+ apply: () => {
24
+ setCommitted(draft);
25
+ setOpen(false);
26
+ },
27
+ close: () => setOpen(false)
28
+ };
29
+ }
30
+
31
+ export { usePickerDraft };
32
+ //# sourceMappingURL=chunk-KBQJIVUB.js.map
33
+ //# sourceMappingURL=chunk-KBQJIVUB.js.map
@@ -1,4 +1,4 @@
1
- import { devWarn } from './chunk-QDYE5LVT.js';
1
+ import { devWarn } from './chunk-SF3HCW4G.js';
2
2
 
3
3
  // src/components/date-input/date-utils.ts
4
4
  var BE_OFFSET = 543;
@@ -323,5 +323,5 @@ function segValueText(seg, p, cfg) {
323
323
  }
324
324
 
325
325
  export { BE_OFFSET, DEFAULT_FORMAT, applyPastedDate, clamp, dispBounds, displaySeg, fromISO, getDisp, pad, parseFormat, parsePastedDate, segValueText, setDisp, toISO, wrap };
326
- //# sourceMappingURL=chunk-3QXLIZIX.js.map
327
- //# sourceMappingURL=chunk-3QXLIZIX.js.map
326
+ //# sourceMappingURL=chunk-KNGJ3CSB.js.map
327
+ //# sourceMappingURL=chunk-KNGJ3CSB.js.map