impact-nova 1.1.0 → 1.1.2

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 (38) hide show
  1. package/dist/components/ui/accordion.js +37 -33
  2. package/dist/components/ui/alert.d.ts +2 -0
  3. package/dist/components/ui/alert.js +46 -31
  4. package/dist/components/ui/breadcrumb.d.ts +7 -2
  5. package/dist/components/ui/breadcrumb.js +98 -77
  6. package/dist/components/ui/calendar.d.ts +4 -4
  7. package/dist/components/ui/calendar.js +292 -286
  8. package/dist/components/ui/date-picker/date-picker.js +96 -90
  9. package/dist/components/ui/date-picker/date-range-picker.js +124 -117
  10. package/dist/components/ui/date-picker/month-picker.js +98 -91
  11. package/dist/components/ui/date-picker/month-range-picker.js +118 -111
  12. package/dist/components/ui/date-picker/multi-date-picker.js +76 -69
  13. package/dist/components/ui/date-picker/multi-month-picker.js +72 -65
  14. package/dist/components/ui/date-picker/multi-week-picker.js +88 -81
  15. package/dist/components/ui/date-picker/week-picker.js +107 -100
  16. package/dist/components/ui/date-picker/week-range-picker.js +144 -137
  17. package/dist/components/ui/dialog.js +65 -61
  18. package/dist/components/ui/drawer.d.ts +3 -1
  19. package/dist/components/ui/drawer.js +44 -29
  20. package/dist/components/ui/file-upload.d.ts +2 -1
  21. package/dist/components/ui/file-upload.js +159 -135
  22. package/dist/components/ui/filter-panel/filter-panel.js +89 -70
  23. package/dist/components/ui/filter-strip/filter-summary.js +117 -104
  24. package/dist/components/ui/filter-strip/filter-tag-list.js +81 -65
  25. package/dist/components/ui/popover.js +52 -48
  26. package/dist/components/ui/prompt.d.ts +2 -1
  27. package/dist/components/ui/prompt.js +81 -64
  28. package/dist/components/ui/sheet.js +91 -84
  29. package/dist/components/ui/sidebar.js +9 -8
  30. package/dist/components/ui/tabs.d.ts +2 -0
  31. package/dist/components/ui/tabs.js +58 -55
  32. package/dist/components/ui/tag.js +21 -20
  33. package/dist/components/ui/toast.js +41 -37
  34. package/dist/components/ui/tooltip.js +1 -1
  35. package/dist/components/ui/types/date-picker.types.d.ts +18 -18
  36. package/dist/impact-nova.css +1 -1
  37. package/dist/index.js +250 -248
  38. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
- import { jsxs as D, jsx as f } from "react/jsx-runtime";
1
+ import { jsxs as w, jsx as c } from "react/jsx-runtime";
2
2
  import * as d from "react";
3
- import { ChevronLeftIcon as we, ChevronRightIcon as De } from "lucide-react";
4
- import { getDefaultClassNames as Re, DayPicker as Ie } from "react-day-picker";
5
- import { cn as c } from "../../lib/utils.js";
6
- import { Button as E } from "./button.js";
7
- import { buttonVariants as Ne } from "./button-variants.js";
8
- import de from "./select/select.js";
9
- import { FISCAL_PATTERNS as Ue, resolveWeekSelection as He } from "../../lib/fiscal-calendar.js";
10
- const Pe = [
3
+ import { ChevronLeftIcon as be, ChevronRightIcon as pe } from "lucide-react";
4
+ import { getDefaultClassNames as ze, DayPicker as $e } from "react-day-picker";
5
+ import { cn as f } from "../../lib/utils.js";
6
+ import { Button as Y } from "./button.js";
7
+ import "./button-variants.js";
8
+ import ie from "./select/select.js";
9
+ import { FISCAL_PATTERNS as ke, resolveWeekSelection as Oe } from "../../lib/fiscal-calendar.js";
10
+ const Ee = [
11
11
  "January",
12
12
  "February",
13
13
  "March",
@@ -20,57 +20,53 @@ const Pe = [
20
20
  "October",
21
21
  "November",
22
22
  "December"
23
- ], Je = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
24
- function Qe({
25
- className: ae,
26
- classNames: G,
27
- showOutsideDays: p = !1,
28
- captionLayout: K = "dropdown",
29
- buttonVariant: P = "ghost",
30
- formatters: Q,
31
- components: Ce,
23
+ ], Re = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
24
+ function Te({
25
+ className: te,
26
+ classNames: T,
27
+ showOutsideDays: v = !1,
28
+ captionLayout: q = "dropdown",
29
+ buttonVariant: H = "ghost",
30
+ formatters: G,
31
+ components: ve,
32
32
  showFooter: h = !0,
33
- onApply: X,
34
- onCancel: me,
35
- onClear: ge,
36
- fromYear: se = 1900,
37
- toYear: le = 2100,
33
+ onApply: K,
34
+ onCancel: oe,
35
+ onClear: ce,
38
36
  mode: J = "single",
39
37
  selected: x,
40
- onSelect: k,
41
- fromDate: C,
42
- toDate: _,
43
- fromMonth: L,
44
- toMonth: W,
38
+ onSelect: O,
45
39
  // Week picker props
46
40
  pickerType: u = "date",
47
- weekMode: y = "single",
48
- selectedWeeks: S,
49
- onWeekSelect: A,
50
- calendarType: Y = "calendar",
51
- fiscalMode: Z = "basic",
52
- selectionMode: ie = "week",
53
- fiscalMonthPattern: oe,
54
- fiscalYearStartMonth: he = 1,
41
+ weekMode: D = "single",
42
+ selectedWeeks: C,
43
+ onWeekSelect: _,
44
+ calendarType: j = "calendar",
45
+ fiscalMode: Q = "basic",
46
+ selectionMode: re = "week",
47
+ fiscalMonthPattern: ne,
48
+ fiscalYearStartMonth: fe = 1,
55
49
  weekStartsOn: B = 1,
56
50
  // Default Monday
57
51
  // Month picker props
58
52
  monthMode: b = "single",
59
- selectedMonths: w,
53
+ selectedMonths: y,
60
54
  onMonthSelect: N,
61
55
  month: R,
62
- defaultMonth: xe,
63
- onMonthChange: _e,
64
- ...F
56
+ defaultMonth: ue,
57
+ onMonthChange: De,
58
+ startMonth: z,
59
+ endMonth: $,
60
+ ...de
65
61
  }) {
66
- const V = d.useMemo(() => {
67
- if (Y === "fiscal") {
68
- if (oe) return oe;
69
- if (Z === "advanced") return Ue["4-4-5"];
62
+ const X = d.useMemo(() => {
63
+ if (j === "fiscal") {
64
+ if (ne) return ne;
65
+ if (Q === "advanced") return ke["4-4-5"];
70
66
  }
71
- }, [Y, Z, oe]), m = Re(), [T, ee] = d.useState(x), [te, ce] = d.useState(() => {
67
+ }, [j, Q, ne]), m = ze(), [L, Z] = d.useState(x), [M, ae] = d.useState(() => {
72
68
  if (R) return R;
73
- if (xe) return xe;
69
+ if (ue) return ue;
74
70
  if (x) {
75
71
  if (Array.isArray(x))
76
72
  return x[0] || /* @__PURE__ */ new Date();
@@ -82,35 +78,35 @@ function Qe({
82
78
  return /* @__PURE__ */ new Date();
83
79
  });
84
80
  d.useEffect(() => {
85
- R && (ce(R), ve(R.getFullYear()));
81
+ R && (ae(R), ge(R.getFullYear()));
86
82
  }, [R]);
87
- const [I, re] = d.useState(S), [z, ne] = d.useState(w), [be, ve] = d.useState(te.getFullYear());
83
+ const [P, V] = d.useState(C), [A, ee] = d.useState(y), [me, ge] = d.useState(M.getFullYear());
88
84
  d.useEffect(() => {
89
- ee(x), re(S), ne(w);
90
- }, [x, S, w]);
91
- const M = (e) => {
92
- ce(e), ve(e.getFullYear()), _e?.(e);
93
- }, fe = d.useCallback((e) => {
85
+ Z(x), V(C), ee(y);
86
+ }, [x, C, y]);
87
+ const W = (e) => {
88
+ ae(e), ge(e.getFullYear()), De?.(e);
89
+ }, se = d.useCallback((e) => {
94
90
  let n;
95
- return e instanceof Date ? n = e : n = e.days.find((t) => !t.outside)?.date || e.days[0]?.date || /* @__PURE__ */ new Date(), He(n, {
96
- calendarType: Y,
97
- fiscalMode: Z,
98
- selectionMode: ie,
99
- fiscalMonthPattern: V,
100
- fiscalYearStartMonth: he,
91
+ return e instanceof Date ? n = e : n = e.days.find((t) => !t.outside)?.date || e.days[0]?.date || /* @__PURE__ */ new Date(), Oe(n, {
92
+ calendarType: j,
93
+ fiscalMode: Q,
94
+ selectionMode: re,
95
+ fiscalMonthPattern: X,
96
+ fiscalYearStartMonth: fe,
101
97
  weekStartsOn: B
102
98
  });
103
- }, [Y, Z, ie, V, he, B]), ue = d.useCallback((e) => {
99
+ }, [j, Q, re, X, fe, B]), le = d.useCallback((e) => {
104
100
  const n = (t, r) => t.year === r.year && t.month === r.month && t.weekOfMonth === r.weekOfMonth;
105
101
  if (h)
106
- re((t) => {
102
+ V((t) => {
107
103
  let r;
108
- if (y === "single")
104
+ if (D === "single")
109
105
  r = e;
110
- else if (y === "multiple") {
106
+ else if (D === "multiple") {
111
107
  const a = t || [];
112
108
  r = a.some((s) => n(s, e)) ? a.filter((s) => !n(s, e)) : [...a, e];
113
- } else if (y === "range") {
109
+ } else if (D === "range") {
114
110
  const a = t;
115
111
  if (!a?.from || a.to)
116
112
  r = { from: e };
@@ -119,26 +115,26 @@ function Qe({
119
115
  e.startDate < a.from.startDate && (l.from = e, l.to = a.from), r = l;
120
116
  }
121
117
  }
122
- return A?.(r), r;
118
+ return _?.(r), r;
123
119
  });
124
- else if (y === "single")
125
- A?.(e);
126
- else if (y === "multiple") {
127
- const t = S || [], a = t.some((l) => n(l, e)) ? t.filter((l) => !n(l, e)) : [...t, e];
128
- A?.(a.length > 0 ? a : void 0);
129
- } else if (y === "range") {
130
- const t = S;
120
+ else if (D === "single")
121
+ _?.(e);
122
+ else if (D === "multiple") {
123
+ const t = C || [], a = t.some((l) => n(l, e)) ? t.filter((l) => !n(l, e)) : [...t, e];
124
+ _?.(a.length > 0 ? a : void 0);
125
+ } else if (D === "range") {
126
+ const t = C;
131
127
  if (!t?.from || t.to)
132
- A?.({ from: e });
128
+ _?.({ from: e });
133
129
  else {
134
130
  const r = { from: t.from, to: e };
135
- e.startDate < t.from.startDate && (r.from = e, r.to = t.from), A?.(r);
131
+ e.startDate < t.from.startDate && (r.from = e, r.to = t.from), _?.(r);
136
132
  }
137
133
  }
138
- }, [y, h, S, A]), Se = d.useCallback((e, n) => {
134
+ }, [D, h, C, _]), ye = d.useCallback((e, n) => {
139
135
  const t = { year: e, month: n }, r = (a, l) => a.year === l.year && a.month === l.month;
140
136
  if (h)
141
- ne((a) => {
137
+ ee((a) => {
142
138
  let l;
143
139
  if (b === "single")
144
140
  l = t;
@@ -159,10 +155,10 @@ function Qe({
159
155
  else if (b === "single")
160
156
  N?.(t);
161
157
  else if (b === "multiple") {
162
- const a = w || [], s = a.some((i) => r(i, t)) ? a.filter((i) => !r(i, t)) : [...a, t];
158
+ const a = y || [], s = a.some((i) => r(i, t)) ? a.filter((i) => !r(i, t)) : [...a, t];
163
159
  N?.(s.length > 0 ? s : void 0);
164
160
  } else if (b === "range") {
165
- const a = w;
161
+ const a = y;
166
162
  if (!a?.from || a.to)
167
163
  N?.({ from: t });
168
164
  else {
@@ -170,22 +166,20 @@ function Qe({
170
166
  new Date(t.year, t.month, 1) < l ? N?.({ from: t, to: a.from }) : N?.({ from: a.from, to: t });
171
167
  }
172
168
  }
173
- }, [b, h, w, N]), pe = d.useCallback(() => {
174
- let e = se, n = le;
175
- C && (e = Math.max(e, C.getFullYear())), _ && (n = Math.min(n, _.getFullYear()));
176
- const t = [];
169
+ }, [b, h, y, N]), he = d.useCallback(() => {
170
+ const e = z ? z.getFullYear() : 1900, n = $ ? $.getFullYear() : 2100, t = [];
177
171
  for (let r = e; r <= n; r++)
178
172
  t.push({ label: r.toString(), value: r.toString() });
179
173
  return t;
180
- }, [se, le, C, _]), Ae = d.useCallback((e) => Pe.map((t, r) => ({
174
+ }, [z, $]), we = d.useCallback((e) => Ee.map((t, r) => ({
181
175
  label: t,
182
176
  value: r.toString()
183
177
  })).filter((t, r) => {
184
178
  const a = new Date(e, r, 1);
185
- return !(C && a < new Date(C.getFullYear(), C.getMonth(), 1) || _ && a > new Date(_.getFullYear(), _.getMonth(), 1) || L && a < new Date(L.getFullYear(), L.getMonth(), 1) || W && a > new Date(W.getFullYear(), W.getMonth(), 1));
186
- }), [C, _, L, W]), q = d.useMemo(() => {
179
+ return !(z && a < new Date(z.getFullYear(), z.getMonth(), 1) || $ && a > new Date($.getFullYear(), $.getMonth(), 1));
180
+ }), [z, $]), F = d.useMemo(() => {
187
181
  if (u !== "week") return;
188
- const e = h ? I : S;
182
+ const e = h ? P : C;
189
183
  if (!e) return;
190
184
  const n = [], t = (r) => {
191
185
  let a = new Date(r.startDate);
@@ -210,10 +204,10 @@ function Qe({
210
204
  } else
211
205
  t(e);
212
206
  return n;
213
- }, [u, h, I, S]), je = d.useMemo(() => {
214
- if (u !== "week" || !q || q.length === 0)
207
+ }, [u, h, P, C]), Ne = d.useMemo(() => {
208
+ if (u !== "week" || !F || F.length === 0)
215
209
  return { range_start: [], range_middle: [], range_end: [] };
216
- const e = [...q].sort((s, i) => s.getTime() - i.getTime()), n = [], t = [], r = [], a = (s, i) => {
210
+ const e = [...F].sort((s, i) => s.getTime() - i.getTime()), n = [], t = [], r = [], a = (s, i) => {
217
211
  if (i === 0) return !1;
218
212
  const o = e[i - 1];
219
213
  return s.getTime() - o.getTime() <= 1440 * 60 * 1e3;
@@ -226,24 +220,24 @@ function Qe({
226
220
  range_middle: t,
227
221
  range_end: r
228
222
  };
229
- }, [u, q]), ze = d.useCallback((e) => {
223
+ }, [u, F]), Ce = d.useCallback((e) => {
230
224
  if (u === "week" && e) {
231
225
  const n = Array.isArray(e) ? e[e.length - 1] : e instanceof Date ? e : void 0;
232
226
  if (n) {
233
- const t = fe(n);
234
- ue(t);
227
+ const t = se(n);
228
+ le(t);
235
229
  return;
236
230
  }
237
231
  }
238
- h && ee(e), k?.(e);
239
- }, [h, k, u, fe, ue]), Ye = d.useCallback(() => {
240
- u === "week" ? (A?.(I), X?.(I)) : u === "month" ? (N?.(z), X?.(z)) : (k?.(T), X?.(T));
241
- }, [T, I, z, k, A, N, X, u]), $e = d.useCallback(() => {
242
- u === "week" ? re(S) : u === "month" ? ne(w) : ee(x), me?.();
243
- }, [x, S, w, me, u]), ke = d.useCallback(() => {
244
- u === "week" ? (re(void 0), h || A?.(void 0)) : u === "month" ? (ne(void 0), h || N?.(void 0)) : (ee(void 0), h || k?.(void 0)), ge?.();
245
- }, [h, k, A, N, ge, u]), Oe = d.useCallback((e, n) => {
246
- const t = h ? z : w;
232
+ h && Z(e), O?.(e);
233
+ }, [h, O, u, se, le]), _e = d.useCallback(() => {
234
+ u === "week" ? (_?.(P), K?.(P)) : u === "month" ? (N?.(A), K?.(A)) : (O?.(L), K?.(L));
235
+ }, [L, P, A, O, _, N, K, u]), Se = d.useCallback(() => {
236
+ u === "week" ? V(C) : u === "month" ? ee(y) : Z(x), oe?.();
237
+ }, [x, C, y, oe, u]), Ae = d.useCallback(() => {
238
+ u === "week" ? (V(void 0), h || _?.(void 0)) : u === "month" ? (ee(void 0), h || N?.(void 0)) : (Z(void 0), h || O?.(void 0)), ce?.();
239
+ }, [h, O, _, N, ce, u]), Ye = d.useCallback((e, n) => {
240
+ const t = h ? A : y;
247
241
  if (!t) return !1;
248
242
  if (Array.isArray(t))
249
243
  return t.some((r) => r.year === e && r.month === n);
@@ -256,8 +250,8 @@ function Qe({
256
250
  const r = t;
257
251
  return r.year === e && r.month === n;
258
252
  }
259
- }, [h, z, w]), Ee = d.useCallback((e, n) => {
260
- const t = h ? z : w;
253
+ }, [h, A, y]), je = d.useCallback((e, n) => {
254
+ const t = h ? A : y;
261
255
  if (!t || !("from" in t)) return { isStart: !1, isEnd: !1, isMiddle: !1 };
262
256
  const r = t, a = r.from, l = r.to, s = new Date(e, n, 1).getTime(), i = new Date(a.year, a.month, 1).getTime();
263
257
  if (!l) return { isStart: s === i, isEnd: !1, isMiddle: !1 };
@@ -267,64 +261,66 @@ function Qe({
267
261
  isEnd: s === o,
268
262
  isMiddle: s > i && s < o
269
263
  };
270
- }, [h, z, w]), ye = ({ yearOffset: e = 0 }) => {
271
- const n = be + e;
272
- return /* @__PURE__ */ D("div", { className: "flex flex-col gap-4 p-3 min-w-[280px]", children: [
273
- /* @__PURE__ */ D("div", { className: "flex items-center justify-between", children: [
274
- e === 0 && /* @__PURE__ */ f(
275
- E,
264
+ }, [h, A, y]), xe = ({ yearOffset: e = 0 }) => {
265
+ const n = me + e;
266
+ return /* @__PURE__ */ w("div", { className: "flex flex-col gap-4 p-3 min-w-[280px]", children: [
267
+ /* @__PURE__ */ w("div", { className: "flex items-center justify-between", children: [
268
+ e === 0 && /* @__PURE__ */ c(
269
+ Y,
276
270
  {
277
271
  variant: "ghost",
278
- size: "sm",
279
- className: "h-7 w-7 p-0",
280
- onClick: () => M(new Date(n - 1, be % 12, 1)),
281
- children: /* @__PURE__ */ f(we, { className: "h-4 w-4" })
272
+ size: "icon",
273
+ className: "h-7 w-7",
274
+ "aria-label": "Previous Year",
275
+ onClick: () => W(new Date(n - 1, me % 12, 1)),
276
+ children: /* @__PURE__ */ c(be, { className: "h-4 w-4" })
282
277
  }
283
278
  ),
284
- /* @__PURE__ */ f("div", { className: "flex-1 flex justify-center items-center", children: /* @__PURE__ */ f(
285
- de,
279
+ /* @__PURE__ */ c("div", { className: "flex-1 flex justify-center items-center", children: /* @__PURE__ */ c(
280
+ ie,
286
281
  {
287
282
  value: { label: n.toString(), value: n.toString() },
288
283
  onChange: (t) => {
289
284
  if (t && "value" in t) {
290
285
  const r = parseInt(t.value) - e;
291
- M(new Date(r, 0, 1));
286
+ W(new Date(r, 0, 1));
292
287
  }
293
288
  },
294
289
  scrollToSelectedOnOpen: !0,
295
- options: pe(),
290
+ options: he(),
296
291
  parentClassName: "flex justify-center items-center",
297
292
  className: "w-[200px]",
298
293
  menuWidth: "140px"
299
294
  }
300
295
  ) }),
301
- (b !== "range" || e === 1) && /* @__PURE__ */ f(
302
- E,
296
+ (b === "single" || e === 1) && /* @__PURE__ */ c(
297
+ Y,
303
298
  {
304
299
  variant: "ghost",
305
- size: "sm",
306
- className: "h-7 w-7 p-0",
307
- onClick: () => M(new Date(n + 1, 0, 1)),
308
- children: /* @__PURE__ */ f(De, { className: "h-4 w-4" })
300
+ size: "icon",
301
+ className: "h-7 w-7",
302
+ "aria-label": "Next Year",
303
+ onClick: () => W(new Date(n + 1, 0, 1)),
304
+ children: /* @__PURE__ */ c(pe, { className: "h-4 w-4" })
309
305
  }
310
306
  )
311
307
  ] }),
312
- /* @__PURE__ */ f("div", { className: "grid grid-cols-4 gap-y-4 gap-x-0", children: Je.map((t, r) => {
313
- const a = Oe(n, r), { isStart: l, isEnd: s, isMiddle: i } = Ee(n, r), o = b === "range", g = h ? z : w, v = g && "to" in g && !!g.to;
314
- return /* @__PURE__ */ D("div", { className: "relative flex items-center justify-center h-10 w-full group", children: [
315
- o && v && (i || l || s) && /* @__PURE__ */ f("div", { className: c(
308
+ /* @__PURE__ */ c("div", { className: "grid grid-cols-4 gap-y-4 gap-x-0", children: Re.map((t, r) => {
309
+ const a = Ye(n, r), { isStart: l, isEnd: s, isMiddle: i } = je(n, r), o = b === "range", g = h ? A : y, p = g && "to" in g && !!g.to;
310
+ return /* @__PURE__ */ w("div", { className: "relative flex items-center justify-center h-10 w-full group", children: [
311
+ o && p && (i || l || s) && /* @__PURE__ */ c("div", { className: f(
316
312
  "absolute inset-y-0 inset-x-0 bg-accent",
317
313
  l && "rounded-l-full left-1/2 -ml-5",
318
314
  s && "rounded-r-full right-1/2 -mr-5",
319
315
  i && "inset-x-0",
320
316
  l && s && "rounded-full inset-x-2"
321
317
  ) }),
322
- /* @__PURE__ */ f(
323
- E,
318
+ /* @__PURE__ */ c(
319
+ Y,
324
320
  {
325
321
  variant: "ghost",
326
- onClick: () => Se(n, r),
327
- className: c(
322
+ onClick: () => ye(n, r),
323
+ className: f(
328
324
  "relative z-10 w-10 h-10 p-0 text-sm font-normal rounded-lg transition-all",
329
325
  a && !o && "bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground",
330
326
  o && (l || s) && "bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground rounded-lg",
@@ -338,162 +334,172 @@ function Qe({
338
334
  }) })
339
335
  ] });
340
336
  };
341
- return /* @__PURE__ */ D("div", { className: "flex flex-col ", "data-component": "calendar", children: [
342
- u === "month" ? /* @__PURE__ */ D("div", { className: "flex flex-col md:flex-row", children: [
343
- /* @__PURE__ */ f(ye, { yearOffset: 0 }),
344
- (b === "range" || b === "multiple") && /* @__PURE__ */ D("div", { className: "flex flex-row gap-0", children: [
345
- /* @__PURE__ */ f("div", { className: "w-[1px] bg-gray-200 my-4" }),
346
- /* @__PURE__ */ f(ye, { yearOffset: 1 })
337
+ return /* @__PURE__ */ w("div", { className: "flex flex-col ", "data-component": "calendar", children: [
338
+ u === "month" ? /* @__PURE__ */ w("div", { className: "flex flex-col md:flex-row", children: [
339
+ /* @__PURE__ */ c(xe, { yearOffset: 0 }),
340
+ (b === "range" || b === "multiple") && /* @__PURE__ */ w("div", { className: "flex flex-row gap-0", children: [
341
+ /* @__PURE__ */ c("div", { className: "w-[1px] bg-gray-200 my-4" }),
342
+ /* @__PURE__ */ c(xe, { yearOffset: 1 })
347
343
  ] })
348
344
  ] }) : (
349
345
  // @ts-ignore: TS mismatch due to dynamic union types.
350
346
  // FIX: Split rendering into separate `DayPicker` calls for 'single' | 'multiple' | 'range' to strictly match discriminated unions.
351
- /* @__PURE__ */ f(
352
- Ie,
347
+ /* @__PURE__ */ c(
348
+ $e,
353
349
  {
354
350
  mode: u === "week" ? "multiple" : J,
355
- selected: u === "week" ? q : h ? T : x,
356
- onSelect: ze,
357
- month: te,
358
- onMonthChange: M,
359
- showOutsideDays: Y === "fiscal" ? !0 : p,
351
+ selected: u === "week" ? F : h ? L : x,
352
+ onSelect: Ce,
353
+ month: M,
354
+ onMonthChange: W,
355
+ showOutsideDays: j === "fiscal" ? !0 : v,
360
356
  weekStartsOn: B,
361
- modifiers: u === "week" ? je : void 0,
362
- className: c(
357
+ modifiers: u === "week" ? Ne : void 0,
358
+ className: f(
363
359
  "bg-background group/calendar p-2 [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
364
360
  String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
365
361
  String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
366
- ae
362
+ te
367
363
  ),
368
- captionLayout: K,
369
- fromDate: C,
370
- toDate: _,
371
- disabled: [
372
- ...F.disabled ? Array.isArray(F.disabled) ? F.disabled : [F.disabled] : [],
373
- C ? { before: C } : void 0,
374
- _ ? { after: _ } : void 0
375
- ].filter(Boolean),
376
- fromMonth: L,
377
- toMonth: W,
378
- fromYear: se,
379
- toYear: le,
380
- numberOfMonths: J === "range" || J === "multiple" || y === "range" || y === "multiple" ? 2 : 1,
364
+ captionLayout: q,
365
+ startMonth: z,
366
+ endMonth: $,
367
+ disabled: de.disabled,
368
+ numberOfMonths: J === "range" || J === "multiple" || D === "range" || D === "multiple" ? 2 : 1,
381
369
  showWeekNumber: !0,
382
370
  formatters: {
383
371
  formatMonthDropdown: (e) => e.toLocaleString("default", { month: "short" }),
384
372
  formatWeekNumber: (e) => `W${e}`,
385
- ...Q
373
+ ...G
386
374
  },
387
375
  classNames: {
388
- root: c("w-fit", m.root),
389
- months: c(
376
+ root: f("w-fit", m.root),
377
+ months: f(
390
378
  "relative flex flex-col gap-2 md:flex-row",
391
379
  m.months
392
380
  ),
393
- month: c(
381
+ month: f(
394
382
  "flex flex-1 min-w-[252px] flex-col gap-2 relative after:absolute after:top-[5.5rem] after:bottom-0 after:left-[30px] after:w-[1px] after:bg-gray-200",
395
383
  m.month
396
384
  ),
397
- nav: c(
398
- "absolute inset-x-0 top-2 flex w-full items-center justify-between gap-1",
385
+ nav: f(
386
+ "absolute inset-x-0 top-[2px] h-[--cell-size] flex w-full items-center justify-between px-2 gap-1",
399
387
  m.nav
400
388
  ),
401
- button_previous: c(
402
- Ne({ variant: P }),
403
- "h-[--cell-size] w-[--cell-size] select-none p-0.2 z-10 aria-disabled:opacity-50 flex items-center justify-center relative",
389
+ button_previous: f(
390
+ "h-7 w-7 select-none p-0 z-10 aria-disabled:opacity-50 flex items-center justify-center relative",
404
391
  m.button_previous
405
392
  ),
406
- button_next: c(
407
- Ne({ variant: P }),
408
- "h-[--cell-size] w-[--cell-size] select-none p-0.2 z-10 aria-disabled:opacity-50 flex items-center justify-center relative",
393
+ button_next: f(
394
+ "h-7 w-7 select-none p-0 z-10 aria-disabled:opacity-50 flex items-center justify-center relative",
409
395
  m.button_next
410
396
  ),
411
- month_caption: c(
397
+ month_caption: f(
412
398
  "flex h-[--cell-size] w-full items-center justify-center px-[--cell-size] relative ",
413
399
  m.month_caption
414
400
  ),
415
- dropdowns: c(
401
+ dropdowns: f(
416
402
  "flex h-[--cell-size] gap-1 items-center justify-center text-sm font-medium relative ",
417
403
  m.dropdowns
418
404
  ),
419
- caption_label: c(
405
+ caption_label: f(
420
406
  "select-none font-medium text-sm",
421
407
  m.caption_label
422
408
  ),
423
409
  table: "w-full border-collapse",
424
- weekdays: c("flex w-full relative after:absolute after:bottom-0 after:right-0 after:h-[1px] after:bg-gray-200 after:left-[30px]", m.weekdays),
425
- weekday: c(
410
+ weekdays: f("flex w-full relative after:absolute after:bottom-0 after:right-0 after:h-[1px] after:bg-gray-200 after:left-[30px]", m.weekdays),
411
+ weekday: f(
426
412
  "flex-1 select-none rounded-md font-normal text-center",
427
413
  "text-[11px] text-[#757575] pb-2",
428
414
  "[&:nth-child(2)]:pl-2",
429
415
  m.weekday
430
416
  ),
431
- week: c("mt-1 flex w-full items-stretch group/week", m.week),
432
- week_number_header: c(
417
+ week: f("mt-1 flex w-full items-stretch group/week", m.week),
418
+ week_number_header: f(
433
419
  "select-none font-normal text-center h-[30px] flex items-center justify-center",
434
420
  "text-[11px] text-[#757575] w-[30px] flex-shrink-0",
435
421
  m.week_number_header
436
422
  ),
437
- week_number: c(
423
+ week_number: f(
438
424
  "select-none flex items-center justify-center h-[30px]",
439
425
  "text-[11px] text-[#757575] w-[30px] flex-shrink-0 transition-colors",
440
426
  u === "week" && "group-hover/week:bg-accent group-hover/week:rounded-l-lg",
441
427
  m.week_number
442
428
  ),
443
- day: c(
429
+ day: f(
444
430
  "group/day relative select-none p-0 text-center flex-1 h-[30px] flex items-center justify-center [&:nth-child(2)]:pl-2 rdp-day",
445
431
  u === "week" && "group-hover/week:bg-accent [&:nth-child(2)]:group-hover/week:rounded-l-full [&:nth-child(8)]:group-hover/week:rounded-r-full",
446
432
  u === "week" && "[&.rdp-selected:nth-child(2)]:rounded-l-full [&.rdp-selected:nth-child(8)]:rounded-r-full",
447
- G?.day
433
+ T?.day
448
434
  ),
449
- range_start: c(
435
+ range_start: f(
450
436
  "bg-accent rounded-l-full",
451
437
  m.range_start
452
438
  ),
453
- range_middle: c("bg-accent rounded-none", m.range_middle),
454
- range_end: c("bg-accent rounded-r-full", m.range_end),
455
- today: c(
439
+ range_middle: f("bg-accent rounded-none", m.range_middle),
440
+ range_end: f("bg-accent rounded-r-full", m.range_end),
441
+ today: f(
456
442
  "text-primary",
457
443
  m.today
458
444
  ),
459
- outside: c(
460
- Y === "fiscal" || p ? "text-muted-foreground opacity-50" : "invisible",
445
+ outside: f(
446
+ j === "fiscal" || v ? "text-muted-foreground opacity-50" : "invisible",
461
447
  m.outside
462
448
  ),
463
- disabled: c(
449
+ disabled: f(
464
450
  "text-muted-foreground opacity-50",
465
451
  m.disabled
466
452
  ),
467
- hidden: c("invisible", m.hidden),
468
- ...G
453
+ hidden: f("invisible", m.hidden),
454
+ ...T
469
455
  },
470
456
  components: {
471
- Root: ({ className: e, rootRef: n, ...t }) => /* @__PURE__ */ f(
457
+ Root: ({ className: e, rootRef: n, ...t }) => /* @__PURE__ */ c(
472
458
  "div",
473
459
  {
474
460
  "data-slot": "calendar",
475
461
  ref: n,
476
- className: c(e),
462
+ className: f(e),
477
463
  ...t
478
464
  }
479
465
  ),
480
- Chevron: ({ className: e, orientation: n, ...t }) => n === "left" ? /* @__PURE__ */ f(we, { className: c("size-4 text-foreground", e), ...t }) : n === "right" ? /* @__PURE__ */ f(
481
- De,
466
+ Chevron: ({ className: e, orientation: n, ...t }) => n === "left" ? /* @__PURE__ */ c(be, { className: f("size-4 text-foreground", e), ...t }) : n === "right" ? /* @__PURE__ */ c(
467
+ pe,
482
468
  {
483
- className: c("size-4 text-foreground", e),
469
+ className: f("size-4 text-foreground", e),
484
470
  ...t
485
471
  }
486
- ) : /* @__PURE__ */ f("span", {}),
472
+ ) : /* @__PURE__ */ c("span", {}),
473
+ PreviousMonthButton: (e) => /* @__PURE__ */ c(
474
+ Y,
475
+ {
476
+ variant: H,
477
+ size: "icon",
478
+ className: "h-7 w-7",
479
+ "aria-label": "Previous Month",
480
+ ...e
481
+ }
482
+ ),
483
+ NextMonthButton: (e) => /* @__PURE__ */ c(
484
+ Y,
485
+ {
486
+ variant: H,
487
+ size: "icon",
488
+ className: "h-7 w-7",
489
+ "aria-label": "Next Month",
490
+ ...e
491
+ }
492
+ ),
487
493
  MonthsDropdown: ({ value: e, onChange: n }) => {
488
- const t = te.getFullYear(), r = Ae(t);
489
- return /* @__PURE__ */ f(
490
- de,
494
+ const t = M.getFullYear(), r = we(t);
495
+ return /* @__PURE__ */ c(
496
+ ie,
491
497
  {
492
498
  value: r.find((a) => a.value === e?.toString()),
493
499
  onChange: (a) => {
494
500
  if (a && "value" in a) {
495
501
  const l = parseInt(a.value), s = new Date(t, l, 1);
496
- M(s), n?.(l);
502
+ W(s), n?.(l);
497
503
  }
498
504
  },
499
505
  scrollToSelectedOnOpen: !0,
@@ -507,15 +513,15 @@ function Qe({
507
513
  );
508
514
  },
509
515
  YearsDropdown: ({ value: e, onChange: n }) => {
510
- const t = pe();
511
- return /* @__PURE__ */ f(
512
- de,
516
+ const t = he();
517
+ return /* @__PURE__ */ c(
518
+ ie,
513
519
  {
514
520
  value: t.find((r) => r.value === e?.toString()),
515
521
  onChange: (r) => {
516
522
  if (r && "value" in r) {
517
- const a = parseInt(r.value), l = new Date(a, te.getMonth(), 1);
518
- ce(l), n?.(a);
523
+ const a = parseInt(r.value), l = new Date(a, M.getMonth(), 1);
524
+ ae(l), n?.(a);
519
525
  }
520
526
  },
521
527
  scrollToSelectedOnOpen: !0,
@@ -528,70 +534,70 @@ function Qe({
528
534
  }
529
535
  );
530
536
  },
531
- DayButton: (e) => /* @__PURE__ */ f(
532
- Le,
537
+ DayButton: (e) => /* @__PURE__ */ c(
538
+ Pe,
533
539
  {
534
540
  ...e,
535
541
  pickerType: u
536
542
  }
537
543
  ),
538
544
  WeekNumber: ({ week: e, ...n }) => {
539
- const t = e.days.find((H) => !H.outside)?.date;
545
+ const t = e.days.find((U) => !U.outside)?.date;
540
546
  if (!t)
541
- return /* @__PURE__ */ f("td", { ...n, className: c("select-none flex items-center justify-center h-8 text-[11px] text-[#757575] w-8 flex-shrink-0 rdp-week_number", n.className), children: /* @__PURE__ */ f("div", { className: "flex size-[--cell-size] items-center justify-center text-center" }) });
542
- const r = t.getFullYear(), a = t.getMonth(), i = (new Date(r, a, 1).getDay() + 7 - B) % 7, o = new Date(r, a, 1 - i), g = new Date(t), $ = (t.getDay() + 7 - B) % 7;
543
- g.setDate(t.getDate() - $);
544
- const j = Math.round((g.getTime() - o.getTime()) / (10080 * 60 * 1e3)) + 1, U = `Week ${j}`;
545
- return u === "week" ? /* @__PURE__ */ f(
547
+ return /* @__PURE__ */ c("td", { ...n, className: f("select-none flex items-center justify-center h-8 text-[11px] text-[#757575] w-8 flex-shrink-0 rdp-week_number", n.className), children: /* @__PURE__ */ c("div", { className: "flex size-[--cell-size] items-center justify-center text-center" }) });
548
+ const r = t.getFullYear(), a = t.getMonth(), i = (new Date(r, a, 1).getDay() + 7 - B) % 7, o = new Date(r, a, 1 - i), g = new Date(t), k = (t.getDay() + 7 - B) % 7;
549
+ g.setDate(t.getDate() - k);
550
+ const S = Math.round((g.getTime() - o.getTime()) / (10080 * 60 * 1e3)) + 1, I = `Week ${S}`;
551
+ return u === "week" ? /* @__PURE__ */ c(
546
552
  "td",
547
553
  {
548
554
  ...n,
549
- "aria-label": U,
550
- "data-week-index": j,
551
- "data-week-number": j,
552
- className: c(
555
+ "aria-label": I,
556
+ "data-week-index": S,
557
+ "data-week-number": S,
558
+ className: f(
553
559
  "select-none flex items-center justify-center h-[30px] w-[30px] flex-shrink-0 rdp-week_number cursor-pointer hover:bg-accent hover:text-accent-foreground group-hover/week:bg-accent group-hover/week:rounded-l-lg rounded-lg transition-colors",
554
560
  n.className
555
561
  ),
556
562
  scope: "row",
557
563
  role: "rowheader",
558
- onClick: (H) => {
559
- H.preventDefault(), H.stopPropagation(), ue(fe(e));
564
+ onClick: (U) => {
565
+ U.preventDefault(), U.stopPropagation(), le(se(e));
560
566
  },
561
- children: /* @__PURE__ */ D("div", { className: "flex h-8 w-full items-center justify-center text-center text-[11px] text-[#757575]", children: [
567
+ children: /* @__PURE__ */ w("div", { className: "flex h-8 w-full items-center justify-center text-center text-[11px] text-[#757575]", children: [
562
568
  "W",
563
- j
569
+ S
564
570
  ] })
565
571
  }
566
- ) : /* @__PURE__ */ f(
572
+ ) : /* @__PURE__ */ c(
567
573
  "td",
568
574
  {
569
575
  ...n,
570
- "aria-label": U,
571
- className: c(
576
+ "aria-label": I,
577
+ className: f(
572
578
  "select-none flex items-center justify-center h-[30px] text-[11px] text-[#757575] w-[30px] flex-shrink-0 rdp-week_number",
573
579
  n.className
574
580
  ),
575
581
  scope: "row",
576
582
  role: "rowheader",
577
- children: /* @__PURE__ */ D("div", { className: "flex h-8 w-full items-center justify-center text-center", children: [
583
+ children: /* @__PURE__ */ w("div", { className: "flex h-8 w-full items-center justify-center text-center", children: [
578
584
  "W",
579
- j
585
+ S
580
586
  ] })
581
587
  }
582
588
  );
583
589
  },
584
- ...Ce
590
+ ...ve
585
591
  },
586
- ...F
592
+ ...de
587
593
  }
588
594
  )
589
595
  ),
590
- h && /* @__PURE__ */ D("div", { className: c("flex items-center gap-2 border-t pt-3 p-3", u === "month" && b !== "single" || J === "range" || y === "range" || y === "multiple" ? "justify-between" : "justify-end"), children: [
591
- J === "range" && u === "date" && /* @__PURE__ */ D("div", { className: "flex flex-row items-center gap-1 text-[#60697d] text-xs leading-[18px] font-medium", children: [
596
+ h && /* @__PURE__ */ w("div", { className: f("flex items-center gap-2 border-t pt-3 p-3", u === "month" && b !== "single" || J === "range" || D === "range" || D === "multiple" ? "justify-between" : "justify-end"), children: [
597
+ J === "range" && u === "date" && /* @__PURE__ */ w("div", { className: "flex flex-row items-center gap-1 text-[#60697d] text-xs leading-[18px] font-medium", children: [
592
598
  "Selected:",
593
- /* @__PURE__ */ f("span", { className: "text-[#0d152c] font-semibold", children: (() => {
594
- const e = T;
599
+ /* @__PURE__ */ c("span", { className: "text-[#0d152c] font-semibold", children: (() => {
600
+ const e = L;
595
601
  if (e?.from && e?.to) {
596
602
  const n = Math.abs(e.to.getTime() - e.from.getTime()), t = Math.ceil(n / (1e3 * 60 * 60 * 24)) + 1;
597
603
  return `${t} day${t !== 1 ? "s" : ""}`;
@@ -599,15 +605,15 @@ function Qe({
599
605
  return "0 days";
600
606
  })() })
601
607
  ] }),
602
- u === "week" && (y === "range" || y === "multiple") && /* @__PURE__ */ D("div", { className: "flex flex-row items-center gap-1 text-[#60697d] text-xs leading-[18px] font-medium", children: [
608
+ u === "week" && (D === "range" || D === "multiple") && /* @__PURE__ */ w("div", { className: "flex flex-row items-center gap-1 text-[#60697d] text-xs leading-[18px] font-medium", children: [
603
609
  "Selected:",
604
- /* @__PURE__ */ f("span", { className: "text-[#0d152c] font-semibold", children: (() => {
605
- const e = I;
610
+ /* @__PURE__ */ c("span", { className: "text-[#0d152c] font-semibold", children: (() => {
611
+ const e = P;
606
612
  if (!e) return "0 weeks";
607
613
  const n = (i) => Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()), t = (i) => {
608
- const o = Math.floor(i / 7), g = i % 7, v = [];
609
- return o > 0 && v.push(`${o} week${o !== 1 ? "s" : ""}`), (g > 0 || o === 0) && v.push(`${g} day${g !== 1 ? "s" : ""}`), v.join(" ");
610
- }, r = Y === "fiscal" && ie === "fiscalMonth", a = Y === "fiscal", l = r ? "fiscal month" : a ? "fiscal week" : "week", s = r ? "fiscal months" : a ? "fiscal weeks" : "weeks";
614
+ const o = Math.floor(i / 7), g = i % 7, p = [];
615
+ return o > 0 && p.push(`${o} week${o !== 1 ? "s" : ""}`), (g > 0 || o === 0) && p.push(`${g} day${g !== 1 ? "s" : ""}`), p.join(" ");
616
+ }, r = j === "fiscal" && re === "fiscalMonth", a = j === "fiscal", l = r ? "fiscal month" : a ? "fiscal week" : "week", s = r ? "fiscal months" : a ? "fiscal weeks" : "weeks";
611
617
  if (Array.isArray(e))
612
618
  if (a || r) {
613
619
  const i = e.length;
@@ -615,36 +621,36 @@ function Qe({
615
621
  } else {
616
622
  let i = 0;
617
623
  return e.forEach((o) => {
618
- const g = n(o.startDate), v = n(o.endDate);
619
- i += Math.round((v - g) / (1e3 * 60 * 60 * 24)) + 1;
624
+ const g = n(o.startDate), p = n(o.endDate);
625
+ i += Math.round((p - g) / (1e3 * 60 * 60 * 24)) + 1;
620
626
  }), t(i);
621
627
  }
622
628
  else if ("from" in e) {
623
629
  const { from: i, to: o } = e;
624
630
  if (r) {
625
631
  if (!o) return `1 ${l}`;
626
- const g = n(i.startDate), v = n(o.endDate), $ = Math.round(Math.abs(v - g) / (1e3 * 60 * 60 * 24)) + 1, O = V ? V.reduce((U, H) => U + H, 0) / 12 : 4.33, j = Math.max(1, Math.round($ / (O * 7)));
627
- return `${j} ${j !== 1 ? s : l}`;
632
+ const g = n(i.startDate), p = n(o.endDate), k = Math.round(Math.abs(p - g) / (1e3 * 60 * 60 * 24)) + 1, E = X ? X.reduce((I, U) => I + U, 0) / 12 : 4.33, S = Math.max(1, Math.round(k / (E * 7)));
633
+ return `${S} ${S !== 1 ? s : l}`;
628
634
  } else if (a) {
629
635
  if (!o) return `1 ${l}`;
630
- const g = n(i.startDate), v = n(o.endDate), $ = Math.round((v - g) / (10080 * 60 * 1e3)), O = $ > 0 ? $ : 1;
631
- return `${O} ${O !== 1 ? s : l}`;
636
+ const g = n(i.startDate), p = n(o.endDate), k = Math.round((p - g) / (10080 * 60 * 1e3)), E = k > 0 ? k : 1;
637
+ return `${E} ${E !== 1 ? s : l}`;
632
638
  } else {
633
639
  if (!o) {
634
- const O = n(i.startDate), j = n(i.endDate), U = Math.round((j - O) / (1e3 * 60 * 60 * 24)) + 1;
635
- return t(U);
640
+ const E = n(i.startDate), S = n(i.endDate), I = Math.round((S - E) / (1e3 * 60 * 60 * 24)) + 1;
641
+ return t(I);
636
642
  }
637
- const g = n(i.startDate), v = n(o.endDate), $ = Math.round(Math.abs(v - g) / (1e3 * 60 * 60 * 24)) + 1;
638
- return t($);
643
+ const g = n(i.startDate), p = n(o.endDate), k = Math.round(Math.abs(p - g) / (1e3 * 60 * 60 * 24)) + 1;
644
+ return t(k);
639
645
  }
640
646
  } else
641
647
  return `1 ${l}`;
642
648
  })() })
643
649
  ] }),
644
- u === "month" && (b === "range" || b === "multiple") && /* @__PURE__ */ D("div", { className: "flex flex-row items-center gap-1 text-[#60697d] text-xs leading-[18px] font-medium", children: [
650
+ u === "month" && (b === "range" || b === "multiple") && /* @__PURE__ */ w("div", { className: "flex flex-row items-center gap-1 text-[#60697d] text-xs leading-[18px] font-medium", children: [
645
651
  "Selected:",
646
- /* @__PURE__ */ f("span", { className: "text-[#0d152c] font-semibold", children: (() => {
647
- const e = z;
652
+ /* @__PURE__ */ c("span", { className: "text-[#0d152c] font-semibold", children: (() => {
653
+ const e = A;
648
654
  if (!e) return "0 months";
649
655
  if (Array.isArray(e)) {
650
656
  const n = e.length;
@@ -658,31 +664,31 @@ function Qe({
658
664
  return "1 month";
659
665
  })() })
660
666
  ] }),
661
- /* @__PURE__ */ D("div", { className: "flex items-center gap-2", children: [
662
- /* @__PURE__ */ f(
663
- E,
667
+ /* @__PURE__ */ w("div", { className: "flex items-center gap-2", children: [
668
+ /* @__PURE__ */ c(
669
+ Y,
664
670
  {
665
671
  variant: "link",
666
672
  size: "sm",
667
- onClick: ke,
673
+ onClick: Ae,
668
674
  children: "Clear"
669
675
  }
670
676
  ),
671
- /* @__PURE__ */ f(
672
- E,
677
+ /* @__PURE__ */ c(
678
+ Y,
673
679
  {
674
680
  variant: "outline",
675
681
  size: "sm",
676
- onClick: $e,
682
+ onClick: Se,
677
683
  children: "Cancel"
678
684
  }
679
685
  ),
680
- /* @__PURE__ */ f(
681
- E,
686
+ /* @__PURE__ */ c(
687
+ Y,
682
688
  {
683
689
  variant: "default",
684
690
  size: "sm",
685
- onClick: Ye,
691
+ onClick: _e,
686
692
  children: "Apply"
687
693
  }
688
694
  )
@@ -690,46 +696,46 @@ function Qe({
690
696
  ] })
691
697
  ] });
692
698
  }
693
- function Le({
694
- className: ae,
695
- day: G,
696
- modifiers: p,
697
- pickerType: K,
698
- ...P
699
+ function Pe({
700
+ className: te,
701
+ day: T,
702
+ modifiers: v,
703
+ pickerType: q,
704
+ ...H
699
705
  }) {
700
- const Q = d.useRef(null);
706
+ const G = d.useRef(null);
701
707
  return d.useEffect(() => {
702
- p.focused && Q.current?.focus();
703
- }, [p.focused]), /* @__PURE__ */ f(
704
- E,
708
+ v.focused && G.current?.focus();
709
+ }, [v.focused]), /* @__PURE__ */ c(
710
+ Y,
705
711
  {
706
- ref: Q,
712
+ ref: G,
707
713
  variant: "ghost",
708
714
  size: "sm",
709
- "data-day": G.date.toLocaleDateString(),
710
- "data-selected-single": p.selected && !p.range_start && !p.range_end && !p.range_middle,
711
- "data-range-start": p.range_start,
712
- "data-range-end": p.range_end,
713
- "data-range-middle": p.range_middle,
714
- className: c(
715
+ "data-day": T.date.toLocaleDateString(),
716
+ "data-selected-single": v.selected && !v.range_start && !v.range_end && !v.range_middle,
717
+ "data-range-start": v.range_start,
718
+ "data-range-end": v.range_end,
719
+ "data-range-middle": v.range_middle,
720
+ className: f(
715
721
  "gap-2 whitespace-nowrap focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 px-3 rounded-lg flex items-center justify-center font-normal transition-colors w-5 h-5 border border-transparent focus-visible:outline-none text-sm rdp-day rdp-day_button",
716
722
  // Hover styling
717
- K !== "week" && "hover:bg-accent hover:text-accent-foreground hover:border-primary",
718
- K === "week" && "hover:bg-transparent hover:text-inherit hover:border-transparent",
723
+ q !== "week" && "hover:bg-accent hover:text-accent-foreground hover:border-primary",
724
+ q === "week" && "hover:bg-transparent hover:text-inherit hover:border-transparent",
719
725
  // Selection state
720
726
  "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[selected-single=true]:rounded-lg data-[selected-single=true]:border-transparent",
721
727
  "data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-start=true]:rounded-lg data-[range-start=true]:border-transparent",
722
728
  "data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-end=true]:rounded-lg data-[range-end=true]:border-transparent",
723
729
  "data-[range-middle=true]:text-accent-foreground data-[range-middle=true]:rounded-none",
724
- ae
730
+ te
725
731
  ),
726
732
  "data-component": "calendar-day",
727
- ...P,
728
- disabled: P.disabled || p.disabled
733
+ ...H,
734
+ disabled: H.disabled || v.disabled
729
735
  }
730
736
  );
731
737
  }
732
738
  export {
733
- Qe as Calendar,
734
- Le as CalendarDayButton
739
+ Te as Calendar,
740
+ Pe as CalendarDayButton
735
741
  };