impact-nova 2.0.8 → 2.0.9

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.
@@ -1,100 +1,119 @@
1
- import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
- import * as c from "react";
3
- import { Cross as j, CalendarMonth as v } from "impact-nova-icons";
4
- import { cn as w } from "../../../lib/utils.js";
5
- import { Input as z } from "../input.js";
6
- import { Popover as R, PopoverAnchor as $, PopoverContent as E } from "../popover.js";
7
- import { Calendar as L } from "../calendar.js";
8
- import { Tooltip as u, TooltipTrigger as y, TooltipContent as C } from "../tooltip.js";
9
- import { useImpactNovaI18n as V } from "../../../i18n/ImpactNovaI18nContext.js";
10
- const q = c.forwardRef(
1
+ import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
+ import * as l from "react";
3
+ import { Cross as j, CalendarMonth as w } from "impact-nova-icons";
4
+ import { cn as D } from "../../../lib/utils.js";
5
+ import { Input as R } from "../input.js";
6
+ import { Popover as z, PopoverAnchor as E, PopoverContent as K } from "../popover.js";
7
+ import { Calendar as V } from "../calendar.js";
8
+ import { Tooltip as y, TooltipTrigger as g, TooltipContent as M } from "../tooltip.js";
9
+ import { useImpactNovaI18n as $ } from "../../../i18n/ImpactNovaI18nContext.js";
10
+ const L = l.forwardRef(
11
11
  ({
12
- value: e,
13
- onChange: s,
14
- placeholder: g,
15
- minDate: h,
16
- maxDate: M,
17
- startMonth: P,
12
+ value: n,
13
+ onChange: p,
14
+ placeholder: C,
15
+ minDate: f,
16
+ maxDate: P,
17
+ startMonth: k,
18
18
  endMonth: x,
19
- showFooter: p = !0,
20
- disabled: l,
21
- className: k,
19
+ showFooter: d = !0,
20
+ disabled: r,
21
+ className: b,
22
22
  ...N
23
23
  }, T) => {
24
- const { t: o } = V(), A = g ?? o("datePicker.selectMultipleMonths"), [d, r] = c.useState(!1), [m, i] = c.useState(e);
25
- c.useEffect(() => {
26
- i(e);
27
- }, [d, e]);
28
- const O = (n) => {
29
- i(n), p || s?.(n);
30
- }, b = (n) => {
31
- s?.(n !== void 0 ? n : m), r(!1);
32
- }, S = () => {
33
- i(e), r(!1);
34
- }, f = () => {
35
- i(void 0), s?.(void 0), p || r(!1);
36
- }, I = e && e.length > 0 ? e.length === 1 ? `${e[0].month + 1}/${e[0].year}` : o("datePicker.monthsSelected", { count: e.length }) : "";
37
- return /* @__PURE__ */ a(R, { open: d, onOpenChange: (n) => {
38
- l || r(n);
24
+ const { t: o } = $(), A = C ?? o("datePicker.selectMultipleMonths"), [i, a] = l.useState(!1), h = l.useRef(!1), [m, c] = l.useState(n);
25
+ l.useEffect(() => {
26
+ c(n);
27
+ }, [i, n]);
28
+ const O = (e) => {
29
+ c(e), d || p?.(e);
30
+ }, v = (e) => {
31
+ p?.(e !== void 0 ? e : m), a(!1);
32
+ }, I = () => {
33
+ c(n), a(!1);
34
+ }, u = () => {
35
+ c(void 0), p?.(void 0), d || a(!1);
36
+ }, S = n && n.length > 0 ? n.length === 1 ? `${n[0].month + 1}/${n[0].year}` : o("datePicker.monthsSelected", { count: n.length }) : "";
37
+ return /* @__PURE__ */ s(z, { open: r ? !1 : i, onOpenChange: (e) => {
38
+ r || a(e);
39
39
  }, children: [
40
- /* @__PURE__ */ t($, { asChild: !0, children: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
41
- z,
40
+ /* @__PURE__ */ t(E, { asChild: !0, children: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
41
+ R,
42
42
  {
43
43
  ref: T,
44
- value: I,
44
+ value: S,
45
45
  placeholder: A,
46
46
  readOnly: !0,
47
- disabled: l,
47
+ disabled: r,
48
48
  onClick: () => {
49
- !l && !d && r(!0);
49
+ !r && !i && a(!0);
50
50
  },
51
- className: w("cursor-pointer", k),
52
- suffix: /* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
53
- e && e.length > 0 && !l && /* @__PURE__ */ a(u, { children: [
54
- /* @__PURE__ */ t(y, { asChild: !0, children: /* @__PURE__ */ t(
51
+ className: D("cursor-pointer", b),
52
+ suffix: /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
53
+ n && n.length > 0 && !r && /* @__PURE__ */ s(y, { children: [
54
+ /* @__PURE__ */ t(g, { asChild: !0, children: /* @__PURE__ */ t(
55
55
  "button",
56
56
  {
57
57
  type: "button",
58
58
  tabIndex: 0,
59
59
  "aria-label": o("calendar.clear"),
60
- onClick: (n) => {
61
- n.stopPropagation(), f();
60
+ onClick: (e) => {
61
+ e.stopPropagation(), u();
62
62
  },
63
63
  className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
64
64
  children: /* @__PURE__ */ t(j, { className: "size-3 hover:text-content" })
65
65
  }
66
66
  ) }),
67
- /* @__PURE__ */ t(C, { variant: "tertiary", side: "top", children: o("calendar.clear") })
67
+ /* @__PURE__ */ t(M, { variant: "tertiary", side: "top", children: o("calendar.clear") })
68
68
  ] }),
69
- /* @__PURE__ */ a(u, { children: [
70
- /* @__PURE__ */ t(y, { asChild: !0, children: /* @__PURE__ */ t(v, { className: "h-4 w-4 text-secondary-foreground" }) }),
71
- /* @__PURE__ */ t(C, { variant: "tertiary", side: "top", children: o("datePicker.selectMultipleMonths") })
69
+ /* @__PURE__ */ s(y, { children: [
70
+ /* @__PURE__ */ t(g, { asChild: !0, children: /* @__PURE__ */ t(
71
+ "button",
72
+ {
73
+ type: "button",
74
+ tabIndex: 0,
75
+ "data-component": "calendar-trigger",
76
+ "aria-label": o("datePicker.selectMultipleMonths"),
77
+ onPointerDown: (e) => {
78
+ e.preventDefault(), e.stopPropagation(), r || a(!i);
79
+ },
80
+ onKeyDown: (e) => {
81
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), r || (h.current = !0, a(!i)));
82
+ },
83
+ className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer",
84
+ children: /* @__PURE__ */ t(w, { className: "h-4 w-4 text-secondary-foreground" })
85
+ }
86
+ ) }),
87
+ /* @__PURE__ */ t(M, { variant: "tertiary", side: "top", children: o("datePicker.selectMultipleMonths") })
72
88
  ] })
73
89
  ] }),
74
90
  ...N
75
91
  }
76
92
  ) }) }),
77
93
  /* @__PURE__ */ t(
78
- E,
94
+ K,
79
95
  {
80
96
  className: "w-auto p-0",
81
97
  align: "start",
82
- onOpenAutoFocus: (n) => n.preventDefault(),
98
+ "aria-label": o("datePicker.selectMultipleMonths"),
99
+ onOpenAutoFocus: (e) => {
100
+ h.current || e.preventDefault(), h.current = !1;
101
+ },
83
102
  children: /* @__PURE__ */ t(
84
- L,
103
+ V,
85
104
  {
86
105
  pickerType: "month",
87
106
  monthMode: "multiple",
88
107
  selectedMonths: m,
89
108
  onMonthSelect: O,
90
- disabled: { before: h, after: M },
91
- startMonth: P,
109
+ disabled: { before: f, after: P },
110
+ startMonth: k,
92
111
  endMonth: x,
93
- defaultMonth: h,
94
- showFooter: p,
95
- onApply: b,
96
- onCancel: S,
97
- onClear: f,
112
+ defaultMonth: f,
113
+ showFooter: d,
114
+ onApply: v,
115
+ onCancel: I,
116
+ onClear: u,
98
117
  captionLayout: "dropdown"
99
118
  }
100
119
  )
@@ -103,7 +122,7 @@ const q = c.forwardRef(
103
122
  ] });
104
123
  }
105
124
  );
106
- q.displayName = "MultiMonthPicker";
125
+ L.displayName = "MultiMonthPicker";
107
126
  export {
108
- q as MultiMonthPicker
127
+ L as MultiMonthPicker
109
128
  };
@@ -1,117 +1,136 @@
1
- import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
- import * as s from "react";
1
+ import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
+ import * as c from "react";
3
3
  import { Cross as V, CalendarMonth as q } from "impact-nova-icons";
4
- import { format as g } from "date-fns";
4
+ import { format as C } from "date-fns";
5
5
  import { cn as B } from "../../../lib/utils.js";
6
6
  import { Input as F } from "../input.js";
7
7
  import { Popover as G, PopoverAnchor as H, PopoverContent as J } from "../popover.js";
8
- import { Calendar as K } from "../calendar.js";
9
- import { Tooltip as C, TooltipTrigger as x, TooltipContent as M } from "../tooltip.js";
10
- import { getDateFnsLocale as Q } from "../../../i18n/getDateFnsLocale.js";
11
- import { useImpactNovaI18n as U } from "../../../i18n/ImpactNovaI18nContext.js";
12
- const X = (e, n = "MM/dd/yyyy", o) => {
13
- const d = g(e.startDate, n, o ? { locale: o } : {}), m = g(e.endDate, n, o ? { locale: o } : {});
14
- return `${d} - ${m}`;
15
- }, Y = s.forwardRef(
8
+ import { Calendar as Q } from "../calendar.js";
9
+ import { Tooltip as P, TooltipTrigger as b, TooltipContent as x } from "../tooltip.js";
10
+ import { getDateFnsLocale as U } from "../../../i18n/getDateFnsLocale.js";
11
+ import { useImpactNovaI18n as X } from "../../../i18n/ImpactNovaI18nContext.js";
12
+ const Y = (t, a = "MM/dd/yyyy", s) => {
13
+ const f = C(t.startDate, a, s ? { locale: s } : {}), m = C(t.endDate, a, s ? { locale: s } : {});
14
+ return `${f} - ${m}`;
15
+ }, Z = c.forwardRef(
16
16
  ({
17
- value: e,
18
- onChange: n,
19
- format: o = "MM/dd/yyyy",
20
- placeholder: d,
17
+ value: t,
18
+ onChange: a,
19
+ format: s = "MM/dd/yyyy",
20
+ placeholder: f,
21
21
  minDate: m,
22
- maxDate: P,
23
- startMonth: N,
24
- endMonth: W,
25
- showFooter: f = !0,
26
- calendarType: T = "calendar",
27
- fiscalMode: b = "basic",
28
- selectionMode: w = "week",
29
- fiscalMonthPattern: A,
30
- fiscalYearStartMonth: O = 1,
31
- weekStartsOn: S = 1,
32
- disabled: c,
33
- className: v,
34
- ...D
35
- }, I) => {
36
- const { locale: u, t: i } = U(), L = s.useMemo(() => Q(u), [u]), j = d ?? i("datePicker.selectWeeks"), [h, a] = s.useState(!1), [y, l] = s.useState(e);
37
- s.useEffect(() => {
38
- l(e);
39
- }, [h, e]);
40
- const $ = (r) => {
41
- l(r), f || n?.(r);
42
- }, z = (r) => {
43
- n?.(r !== void 0 ? r : y), a(!1);
44
- }, R = () => {
45
- l(e), a(!1);
46
- }, k = () => {
47
- l(void 0), n?.(void 0), f || a(!1);
48
- }, E = e && e.length > 0 ? e.length === 1 ? X(e[0], o, L) : `${e.length} weeks selected` : "";
49
- return /* @__PURE__ */ p(G, { open: h, onOpenChange: (r) => {
50
- c || a(r);
22
+ maxDate: W,
23
+ startMonth: M,
24
+ endMonth: N,
25
+ showFooter: u = !0,
26
+ calendarType: w = "calendar",
27
+ fiscalMode: D = "basic",
28
+ selectionMode: T = "week",
29
+ fiscalMonthPattern: v,
30
+ fiscalYearStartMonth: A = 1,
31
+ weekStartsOn: O = 1,
32
+ disabled: n,
33
+ className: S,
34
+ ...I
35
+ }, j) => {
36
+ const { locale: y, t: i } = X(), L = c.useMemo(() => U(y), [y]), R = f ?? i("datePicker.selectWeeks"), [l, o] = c.useState(!1), h = c.useRef(!1), [k, p] = c.useState(t);
37
+ c.useEffect(() => {
38
+ p(t);
39
+ }, [l, t]);
40
+ const $ = (e) => {
41
+ p(e), u || a?.(e);
42
+ }, z = (e) => {
43
+ a?.(e !== void 0 ? e : k), o(!1);
44
+ }, E = () => {
45
+ p(t), o(!1);
46
+ }, g = () => {
47
+ p(void 0), a?.(void 0), u || o(!1);
48
+ }, K = t && t.length > 0 ? t.length === 1 ? Y(t[0], s, L) : `${t.length} weeks selected` : "";
49
+ return /* @__PURE__ */ d(G, { open: n ? !1 : l, onOpenChange: (e) => {
50
+ n || o(e);
51
51
  }, children: [
52
- /* @__PURE__ */ t(H, { asChild: !0, children: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
52
+ /* @__PURE__ */ r(H, { asChild: !0, children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
53
53
  F,
54
54
  {
55
- ref: I,
56
- value: E,
57
- placeholder: j,
55
+ ref: j,
56
+ value: K,
57
+ placeholder: R,
58
58
  readOnly: !0,
59
- disabled: c,
59
+ disabled: n,
60
60
  onClick: () => {
61
- !c && !h && a(!0);
61
+ !n && !l && o(!0);
62
62
  },
63
- className: B("cursor-pointer", v),
64
- suffix: /* @__PURE__ */ p("div", { className: "flex items-center gap-1", children: [
65
- e && e.length > 0 && !c && /* @__PURE__ */ p(C, { children: [
66
- /* @__PURE__ */ t(x, { asChild: !0, children: /* @__PURE__ */ t(
63
+ className: B("cursor-pointer", S),
64
+ suffix: /* @__PURE__ */ d("div", { className: "flex items-center gap-1", children: [
65
+ t && t.length > 0 && !n && /* @__PURE__ */ d(P, { children: [
66
+ /* @__PURE__ */ r(b, { asChild: !0, children: /* @__PURE__ */ r(
67
67
  "button",
68
68
  {
69
69
  type: "button",
70
70
  tabIndex: 0,
71
71
  "aria-label": i("calendar.clear"),
72
- onClick: (r) => {
73
- r.stopPropagation(), k();
72
+ onClick: (e) => {
73
+ e.stopPropagation(), g();
74
74
  },
75
75
  className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
76
- children: /* @__PURE__ */ t(V, { className: "size-3 hover:text-content" })
76
+ children: /* @__PURE__ */ r(V, { className: "size-3 hover:text-content" })
77
77
  }
78
78
  ) }),
79
- /* @__PURE__ */ t(M, { variant: "tertiary", side: "top", children: i("calendar.clear") })
79
+ /* @__PURE__ */ r(x, { variant: "tertiary", side: "top", children: i("calendar.clear") })
80
80
  ] }),
81
- /* @__PURE__ */ p(C, { children: [
82
- /* @__PURE__ */ t(x, { asChild: !0, children: /* @__PURE__ */ t(q, { className: "h-4 w-4 text-secondary-foreground" }) }),
83
- /* @__PURE__ */ t(M, { variant: "tertiary", side: "top", children: i("datePicker.selectWeeks") })
81
+ /* @__PURE__ */ d(P, { children: [
82
+ /* @__PURE__ */ r(b, { asChild: !0, children: /* @__PURE__ */ r(
83
+ "button",
84
+ {
85
+ type: "button",
86
+ tabIndex: 0,
87
+ "data-component": "calendar-trigger",
88
+ "aria-label": i("datePicker.selectWeeks"),
89
+ onPointerDown: (e) => {
90
+ e.preventDefault(), e.stopPropagation(), n || o(!l);
91
+ },
92
+ onKeyDown: (e) => {
93
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), n || (h.current = !0, o(!l)));
94
+ },
95
+ className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer",
96
+ children: /* @__PURE__ */ r(q, { className: "h-4 w-4 text-secondary-foreground" })
97
+ }
98
+ ) }),
99
+ /* @__PURE__ */ r(x, { variant: "tertiary", side: "top", children: i("datePicker.selectWeeks") })
84
100
  ] })
85
101
  ] }),
86
- ...D
102
+ ...I
87
103
  }
88
104
  ) }) }),
89
- /* @__PURE__ */ t(
105
+ /* @__PURE__ */ r(
90
106
  J,
91
107
  {
92
108
  className: "w-auto p-0",
93
109
  align: "start",
94
- onOpenAutoFocus: (r) => r.preventDefault(),
95
- children: /* @__PURE__ */ t(
96
- K,
110
+ "aria-label": i("datePicker.selectWeeks"),
111
+ onOpenAutoFocus: (e) => {
112
+ h.current || e.preventDefault(), h.current = !1;
113
+ },
114
+ children: /* @__PURE__ */ r(
115
+ Q,
97
116
  {
98
117
  pickerType: "week",
99
118
  weekMode: "multiple",
100
- selectedWeeks: y,
119
+ selectedWeeks: k,
101
120
  onWeekSelect: $,
102
- disabled: { before: m, after: P },
103
- startMonth: N,
104
- endMonth: W,
105
- showFooter: f,
106
- calendarType: T,
107
- fiscalMode: b,
108
- selectionMode: w,
109
- fiscalMonthPattern: A,
110
- fiscalYearStartMonth: O,
111
- weekStartsOn: S,
121
+ disabled: { before: m, after: W },
122
+ startMonth: M,
123
+ endMonth: N,
124
+ showFooter: u,
125
+ calendarType: w,
126
+ fiscalMode: D,
127
+ selectionMode: T,
128
+ fiscalMonthPattern: v,
129
+ fiscalYearStartMonth: A,
130
+ weekStartsOn: O,
112
131
  onApply: z,
113
- onCancel: R,
114
- onClear: k,
132
+ onCancel: E,
133
+ onClear: g,
115
134
  captionLayout: "dropdown"
116
135
  }
117
136
  )
@@ -120,7 +139,7 @@ const X = (e, n = "MM/dd/yyyy", o) => {
120
139
  ] });
121
140
  }
122
141
  );
123
- Y.displayName = "MultiWeekPicker";
142
+ Z.displayName = "MultiWeekPicker";
124
143
  export {
125
- Y as MultiWeekPicker
144
+ Z as MultiWeekPicker
126
145
  };
@@ -1,7 +1,7 @@
1
1
  import { jsxs as y, jsx as o } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
3
  import { Cross as te, CalendarMonth as re } from "impact-nova-icons";
4
- import { isValid as w, parse as I, format as B } from "date-fns";
4
+ import { isValid as w, parse as P, format as B } from "date-fns";
5
5
  import { cn as oe, padValidDateString as se, maskDate as ce } from "../../../lib/utils.js";
6
6
  import { Input as ie } from "../input.js";
7
7
  import { Popover as le, PopoverAnchor as ae, PopoverContent as pe } from "../popover.js";
@@ -24,17 +24,17 @@ const p = (e, c = "MM/dd/yyyy", n) => {
24
24
  startMonth: q,
25
25
  endMonth: G,
26
26
  showFooter: d = !0,
27
- calendarType: P = "calendar",
27
+ calendarType: I = "calendar",
28
28
  fiscalMode: S = "basic",
29
29
  selectionMode: N = "week",
30
- fiscalMonthPattern: V,
31
- fiscalYearStartMonth: b = 1,
30
+ fiscalMonthPattern: b,
31
+ fiscalYearStartMonth: V = 1,
32
32
  weekStartsOn: A = 1,
33
- disabled: k,
33
+ disabled: g,
34
34
  className: J,
35
35
  ...K
36
36
  }, Q) => {
37
- const { locale: M, t: g } = he(), r = s.useMemo(() => ue(M), [M]), U = C ?? g("datePicker.selectWeek"), T = s.useRef(null);
37
+ const { locale: M, t: m } = he(), r = s.useMemo(() => ue(M), [M]), U = C ?? m("datePicker.selectWeek"), T = s.useRef(null);
38
38
  s.useRef(null), s.useImperativeHandle(Q, () => T.current);
39
39
  const [i, f] = s.useState(!1), [L, l] = s.useState(e), [u, a] = s.useState(e ? p(e, n, r) : ""), [X, W] = s.useState(e?.startDate || /* @__PURE__ */ new Date());
40
40
  s.useEffect(() => {
@@ -51,34 +51,34 @@ const p = (e, c = "MM/dd/yyyy", n) => {
51
51
  }, R = () => {
52
52
  l(void 0), a(""), c?.(void 0), d || f(!1);
53
53
  }, j = (t) => fe(t, {
54
- calendarType: P,
54
+ calendarType: I,
55
55
  fiscalMode: S,
56
56
  selectionMode: N,
57
- fiscalMonthPattern: V,
58
- fiscalYearStartMonth: b,
57
+ fiscalMonthPattern: b,
58
+ fiscalYearStartMonth: V,
59
59
  weekStartsOn: A
60
60
  }), F = (t) => {
61
- const m = t.target.value, h = ce(m, n, u);
61
+ const k = t.target.value, h = ce(k, n, u);
62
62
  if (a(h), h === "") {
63
63
  l(void 0), d || c?.(void 0);
64
64
  return;
65
65
  }
66
- const x = I(h, n, /* @__PURE__ */ new Date(), { locale: r });
66
+ const x = P(h, n, /* @__PURE__ */ new Date(), { locale: r });
67
67
  if (w(x) && h.length === n.length) {
68
68
  const z = j(x);
69
69
  l(z), W(x), d || c?.(z);
70
70
  }
71
71
  }, ee = () => {
72
72
  if (i) return;
73
- const t = se(u, n), m = I(t, n, /* @__PURE__ */ new Date(), { locale: r });
74
- if (!w(m) || t.length !== n.length)
73
+ const t = se(u, n), k = P(t, n, /* @__PURE__ */ new Date(), { locale: r });
74
+ if (!w(k) || t.length !== n.length)
75
75
  a(e ? p(e, n, r) : ""), l(e);
76
76
  else if (a(t), !d) {
77
- const h = j(m);
77
+ const h = j(k);
78
78
  c?.(h);
79
79
  }
80
- }, v = (e ? p(e, n, r) : "") !== u, ne = u.length === n.length && !w(I(u, n, /* @__PURE__ */ new Date(), { locale: r }));
81
- return /* @__PURE__ */ y(le, { open: i, onOpenChange: (t) => !k && f(t), children: [
80
+ }, v = (e ? p(e, n, r) : "") !== u, ne = u.length === n.length && !w(P(u, n, /* @__PURE__ */ new Date(), { locale: r }));
81
+ return /* @__PURE__ */ y(le, { open: i, onOpenChange: (t) => !g && f(t), children: [
82
82
  /* @__PURE__ */ o(ae, { asChild: !0, children: /* @__PURE__ */ o("div", { "data-component": "week-picker", "data-state": i ? "open" : "closed", "data-pending": v || void 0, children: /* @__PURE__ */ o(
83
83
  ie,
84
84
  {
@@ -86,9 +86,9 @@ const p = (e, c = "MM/dd/yyyy", n) => {
86
86
  value: u,
87
87
  onChange: F,
88
88
  onBlur: ee,
89
- onClick: () => !k && f(!0),
89
+ onClick: () => !g && f(!0),
90
90
  placeholder: i ? n : U,
91
- disabled: k,
91
+ disabled: g,
92
92
  "data-form-control": "input",
93
93
  className: oe(
94
94
  "cursor-pointer",
@@ -96,13 +96,13 @@ const p = (e, c = "MM/dd/yyyy", n) => {
96
96
  J
97
97
  ),
98
98
  suffix: /* @__PURE__ */ y("div", { className: "flex items-center gap-1", children: [
99
- e && !k && /* @__PURE__ */ y(E, { children: [
99
+ e && !g && /* @__PURE__ */ y(E, { children: [
100
100
  /* @__PURE__ */ o(O, { asChild: !0, children: /* @__PURE__ */ o(
101
101
  "button",
102
102
  {
103
103
  type: "button",
104
104
  tabIndex: 0,
105
- "aria-label": g("calendar.clear"),
105
+ "aria-label": m("calendar.clear"),
106
106
  onClick: (t) => {
107
107
  t.stopPropagation(), R();
108
108
  },
@@ -110,11 +110,11 @@ const p = (e, c = "MM/dd/yyyy", n) => {
110
110
  children: /* @__PURE__ */ o(te, { className: "size-3 hover:text-content" })
111
111
  }
112
112
  ) }),
113
- /* @__PURE__ */ o($, { variant: "tertiary", side: "top", children: g("calendar.clear") })
113
+ /* @__PURE__ */ o($, { variant: "tertiary", side: "top", children: m("calendar.clear") })
114
114
  ] }),
115
115
  /* @__PURE__ */ y(E, { children: [
116
116
  /* @__PURE__ */ o(O, { asChild: !0, children: /* @__PURE__ */ o(re, { className: "h-4 w-4 text-secondary-foreground" }) }),
117
- /* @__PURE__ */ o($, { variant: "tertiary", side: "top", children: g("datePicker.selectWeek") })
117
+ /* @__PURE__ */ o($, { variant: "tertiary", side: "top", children: m("datePicker.selectWeek") })
118
118
  ] })
119
119
  ] }),
120
120
  ...K
@@ -125,6 +125,7 @@ const p = (e, c = "MM/dd/yyyy", n) => {
125
125
  {
126
126
  className: "w-auto p-0",
127
127
  align: "start",
128
+ "aria-label": m("datePicker.selectWeek"),
128
129
  onOpenAutoFocus: (t) => t.preventDefault(),
129
130
  children: /* @__PURE__ */ o(
130
131
  de,
@@ -139,11 +140,11 @@ const p = (e, c = "MM/dd/yyyy", n) => {
139
140
  startMonth: q,
140
141
  endMonth: G,
141
142
  showFooter: d,
142
- calendarType: P,
143
+ calendarType: I,
143
144
  fiscalMode: S,
144
145
  selectionMode: N,
145
- fiscalMonthPattern: V,
146
- fiscalYearStartMonth: b,
146
+ fiscalMonthPattern: b,
147
+ fiscalYearStartMonth: V,
147
148
  weekStartsOn: A,
148
149
  onApply: _,
149
150
  onCancel: Y,