impact-nova 2.5.9 → 2.5.10

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 (61) hide show
  1. package/dist/components/data/data-table/column-runtime-state-guard.js +42 -42
  2. package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +15 -0
  3. package/dist/components/data/data-table/data-table-column-tree-cache.js +109 -80
  4. package/dist/components/data/data-table/use-data-table-column-list-sync.js +65 -62
  5. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +2 -3
  6. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +2 -3
  7. package/dist/components/data-display/calendar/calendar-day-picker-classnames.d.ts +6 -1
  8. package/dist/components/data-display/calendar/calendar-day-picker-classnames.js +31 -23
  9. package/dist/components/data-display/calendar/calendar-day-picker-components.d.ts +2 -1
  10. package/dist/components/data-display/calendar/calendar-day-picker-components.js +194 -162
  11. package/dist/components/data-display/calendar/calendar-day-picker-view.d.ts +3 -2
  12. package/dist/components/data-display/calendar/calendar-day-picker-view.js +130 -129
  13. package/dist/components/data-display/calendar/calendar-padding-week.utils.d.ts +5 -1
  14. package/dist/components/data-display/calendar/calendar-padding-week.utils.js +20 -16
  15. package/dist/components/data-display/calendar/calendar-week-number-cell.d.ts +2 -1
  16. package/dist/components/data-display/calendar/calendar-week-number-cell.js +43 -42
  17. package/dist/components/data-display/calendar/calendar-week-utils.d.ts +6 -0
  18. package/dist/components/data-display/calendar/calendar-week-utils.js +51 -47
  19. package/dist/components/data-display/calendar/calendar.js +102 -100
  20. package/dist/components/data-display/calendar/calendar.types.d.ts +2 -0
  21. package/dist/components/data-display/calendar/use-calendar-day-picker-config.d.ts +4 -2
  22. package/dist/components/data-display/calendar/use-calendar-day-picker-config.js +77 -72
  23. package/dist/components/feedback/dialog/dialog.js +12 -12
  24. package/dist/components/feedback/sheet/sheet.js +22 -22
  25. package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
  26. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  27. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  28. package/dist/components/forms/date-picker/calendar-selection-adapters.d.ts +2 -0
  29. package/dist/components/forms/date-picker/calendar-selection-adapters.js +36 -31
  30. package/dist/components/forms/date-picker/date-input-behavior.d.ts +10 -0
  31. package/dist/components/forms/date-picker/date-input-behavior.js +111 -90
  32. package/dist/components/forms/date-picker/date-picker.js +71 -69
  33. package/dist/components/forms/date-picker/date-picker.types.d.ts +2 -0
  34. package/dist/components/forms/date-picker/date-range-picker.js +146 -144
  35. package/dist/components/forms/date-picker/fiscal-pass-through.d.ts +1 -0
  36. package/dist/components/forms/date-picker/fiscal-pass-through.js +1 -0
  37. package/dist/components/forms/date-picker/month-picker.js +82 -80
  38. package/dist/components/forms/date-picker/month-range-picker.js +145 -143
  39. package/dist/components/forms/date-picker/multi-date-picker.js +51 -49
  40. package/dist/components/forms/date-picker/multi-month-picker.js +49 -47
  41. package/dist/components/forms/date-picker/multi-quarter-picker.js +46 -44
  42. package/dist/components/forms/date-picker/multi-week-picker.js +53 -51
  43. package/dist/components/forms/date-picker/multi-year-picker.js +48 -46
  44. package/dist/components/forms/date-picker/picker-story-layout.d.ts +2 -0
  45. package/dist/components/forms/date-picker/quarter-picker.js +46 -44
  46. package/dist/components/forms/date-picker/quarter-range-picker.js +45 -43
  47. package/dist/components/forms/date-picker/week-picker.js +82 -80
  48. package/dist/components/forms/date-picker/week-range-picker.js +169 -164
  49. package/dist/components/forms/date-picker/year-picker.js +47 -45
  50. package/dist/components/forms/date-picker/year-range-picker.js +47 -45
  51. package/dist/components/forms/select/components/SelectMenuPanel.js +3 -2
  52. package/dist/components/forms/select/components/SelectTriggerValue.js +2 -3
  53. package/dist/components/forms/select/components/Submenu.js +2 -3
  54. package/dist/components/forms/select/select.js +1 -0
  55. package/dist/form-react/Fields/WeekRangePicker.js +47 -48
  56. package/dist/form-react/types/fields.types.d.ts +2 -0
  57. package/dist/impact-nova.css +1 -1
  58. package/dist/lib/overlay/overlay-portal-context.js +16 -16
  59. package/dist/llms/rules/installation.js +1 -1
  60. package/dist/llms/rules/requirements.js +1 -1
  61. package/package.json +1 -1
@@ -1,18 +1,18 @@
1
1
  import { jsx as r, jsxs as g } from "react/jsx-runtime";
2
2
  import * as t from "react";
3
- import { Cross as Y, CalendarMonth as Z } from "impact-nova-icons";
4
- import { cn as _ } from "../../../lib/utils.js";
5
- import { Input as q } from "../input/input.js";
6
- import { Calendar as ee } from "../../data-display/calendar/calendar.js";
3
+ import { Cross as Z, CalendarMonth as _ } from "impact-nova-icons";
4
+ import { cn as q } from "../../../lib/utils.js";
5
+ import { Input as ee } from "../input/input.js";
6
+ import { Calendar as re } from "../../data-display/calendar/calendar.js";
7
7
  import { Tooltip as C, TooltipTrigger as x, TooltipContent as b } from "../../feedback/tooltip/tooltip.js";
8
- import { useImpactNovaI18n as re } from "../../../i18n/use-impact-nova-i18n.js";
9
- import { buildDateBoundsMatcher as te } from "../../../lib/date-bounds-matcher.js";
10
- import { fiscalCalendarPassThrough as ne } from "./fiscal-pass-through.js";
11
- import { DatePickerShell as oe } from "./date-picker-shell.js";
12
- import { usePickerDismissActionsRef as ae, usePickerFooterDismissNudge as ie, handleReadonlyPickerKeyDown as ce, handlePickerSurfacePointerDown as se } from "./date-input-behavior.js";
8
+ import { useImpactNovaI18n as te } from "../../../i18n/use-impact-nova-i18n.js";
9
+ import { buildDateBoundsMatcher as ne } from "../../../lib/date-bounds-matcher.js";
10
+ import { fiscalCalendarPassThrough as oe } from "./fiscal-pass-through.js";
11
+ import { DatePickerShell as ae } from "./date-picker-shell.js";
12
+ import { usePickerDismissActionsRef as ie, usePickerFooterDismissNudge as ce, handleReadonlyPickerKeyDown as se, handlePickerSurfacePointerDown as le } from "./date-input-behavior.js";
13
13
  import { formatQuarterInput as D } from "../../data-display/calendar/calendar-fiscal-labels.js";
14
- import { viewMonthFromQuarter as le } from "../../data-display/calendar/calendar-quarter-utils.js";
15
- const fe = t.forwardRef(
14
+ import { viewMonthFromQuarter as fe } from "../../data-display/calendar/calendar-quarter-utils.js";
15
+ const pe = t.forwardRef(
16
16
  ({
17
17
  value: n,
18
18
  onChange: d,
@@ -31,26 +31,28 @@ const fe = t.forwardRef(
31
31
  fiscalYearStartMonth: K,
32
32
  fiscalConfig: j,
33
33
  showPresets: F,
34
- ...$
35
- }, z) => {
36
- const { t: a } = re(), E = Q ?? a("datePicker.selectQuarterRange"), m = t.useRef(null), y = t.useRef(null);
37
- t.useImperativeHandle(z, () => m.current);
38
- const [i, c] = t.useState(!1), u = t.useRef(!1), k = ae(), { footerFlashKey: H, footerFlashTarget: L, popoverHandlers: V } = ie(l, i, k, y), [P, f] = t.useState(n), [B, G] = t.useState(le(n?.from));
34
+ showPeriodBoundaries: $,
35
+ ...z
36
+ }, E) => {
37
+ const { t: a } = te(), H = Q ?? a("datePicker.selectQuarterRange"), m = t.useRef(null), y = t.useRef(null);
38
+ t.useImperativeHandle(E, () => m.current);
39
+ const [i, c] = t.useState(!1), u = t.useRef(!1), k = ie(), { footerFlashKey: L, footerFlashTarget: V, popoverHandlers: B } = ce(l, i, k, y), [P, f] = t.useState(n), [G, J] = t.useState(fe(n?.from));
39
40
  t.useEffect(() => {
40
41
  i || f(n);
41
42
  }, [i, n]);
42
- const p = t.useCallback(() => c(!1), []), J = ne({
43
+ const p = t.useCallback(() => c(!1), []), U = oe({
43
44
  calendarKind: M,
44
45
  fiscalMode: O,
45
46
  granularity: T,
46
47
  fiscalMonthPattern: w,
47
48
  fiscalYearStartMonth: K,
48
49
  fiscalConfig: j,
49
- showPresets: F
50
- }), U = (e) => {
50
+ showPresets: F,
51
+ showPeriodBoundaries: $
52
+ }), W = (e) => {
51
53
  const s = e && !Array.isArray(e) && ("from" in e || "to" in e) ? e : void 0;
52
54
  f(s), l || (d?.(s), s?.to && p());
53
- }, W = () => {
55
+ }, X = () => {
54
56
  d?.(P), p();
55
57
  }, h = () => {
56
58
  f(n), p();
@@ -60,9 +62,9 @@ const fe = t.forwardRef(
60
62
  t.useLayoutEffect(() => {
61
63
  k.current = { onDismiss: h, resolveFlash: () => "cancel" };
62
64
  });
63
- const X = n?.from ? `${D(n.from)}${n.to ? ` – ${D(n.to)}` : ""}` : "";
65
+ const Y = n?.from ? `${D(n.from)}${n.to ? ` – ${D(n.to)}` : ""}` : "";
64
66
  return /* @__PURE__ */ r(
65
- oe,
67
+ ae,
66
68
  {
67
69
  open: i,
68
70
  disabled: o,
@@ -73,26 +75,26 @@ const fe = t.forwardRef(
73
75
  onOpenAutoFocus: (e) => {
74
76
  u.current || e.preventDefault(), u.current = !1;
75
77
  },
76
- popoverHandlers: V,
78
+ popoverHandlers: B,
77
79
  trigger: /* @__PURE__ */ r(
78
80
  "div",
79
81
  {
80
82
  ref: y,
81
83
  "data-component": "quarter-range-picker",
82
84
  "data-state": i ? "open" : "closed",
83
- onPointerDown: (e) => se({
85
+ onPointerDown: (e) => le({
84
86
  disabled: o,
85
87
  event: e,
86
88
  onOpen: () => c(!0),
87
89
  focusField: () => m.current?.focus()
88
90
  }),
89
91
  children: /* @__PURE__ */ r(
90
- q,
92
+ ee,
91
93
  {
92
94
  ref: m,
93
- value: X,
95
+ value: Y,
94
96
  readOnly: !0,
95
- onKeyDown: (e) => ce(e, {
97
+ onKeyDown: (e) => se(e, {
96
98
  disabled: o,
97
99
  open: i,
98
100
  onOpen: () => c(!0),
@@ -102,10 +104,10 @@ const fe = t.forwardRef(
102
104
  }
103
105
  }),
104
106
  onClick: () => !o && c(!0),
105
- placeholder: E,
107
+ placeholder: H,
106
108
  disabled: o,
107
109
  "data-form-control": "input",
108
- className: _("cursor-pointer", I),
110
+ className: q("cursor-pointer", I),
109
111
  suffix: /* @__PURE__ */ g("div", { className: "flex items-center gap-1", children: [
110
112
  n?.from && !o ? /* @__PURE__ */ g(C, { children: [
111
113
  /* @__PURE__ */ r(x, { asChild: !0, children: /* @__PURE__ */ r(
@@ -118,7 +120,7 @@ const fe = t.forwardRef(
118
120
  e.stopPropagation(), R();
119
121
  },
120
122
  className: "inline-flex size-4 items-center justify-center border-none bg-transparent p-0",
121
- children: /* @__PURE__ */ r(Y, { className: "size-3 hover:text-content" })
123
+ children: /* @__PURE__ */ r(Z, { className: "size-3 hover:text-content" })
122
124
  }
123
125
  ) }),
124
126
  /* @__PURE__ */ r(b, { variant: "tertiary", side: "top", children: a("calendar.clear") })
@@ -135,43 +137,43 @@ const fe = t.forwardRef(
135
137
  e.stopPropagation(), o || c((s) => !s);
136
138
  },
137
139
  className: "inline-flex items-center justify-center border-none bg-transparent p-0",
138
- children: /* @__PURE__ */ r(Z, { className: "h-4 w-4 text-secondary-foreground" })
140
+ children: /* @__PURE__ */ r(_, { className: "h-4 w-4 text-secondary-foreground" })
139
141
  }
140
142
  ) }),
141
143
  /* @__PURE__ */ r(b, { variant: "tertiary", side: "top", children: a("datePicker.selectQuarterRange") })
142
144
  ] })
143
145
  ] }),
144
- ...$
146
+ ...z
145
147
  }
146
148
  )
147
149
  }
148
150
  ),
149
151
  children: /* @__PURE__ */ r(
150
- ee,
152
+ re,
151
153
  {
152
154
  pickerType: "quarter",
153
155
  monthMode: "range",
154
156
  selectedQuarters: P,
155
- footerFlashKey: H,
156
- footerFlashTarget: L,
157
- onQuarterSelect: U,
158
- month: B,
159
- onMonthChange: G,
160
- disabled: te(N, S),
157
+ footerFlashKey: L,
158
+ footerFlashTarget: V,
159
+ onQuarterSelect: W,
160
+ month: G,
161
+ onMonthChange: J,
162
+ disabled: ne(N, S),
161
163
  startMonth: v,
162
164
  endMonth: A,
163
165
  showFooter: l,
164
- onApply: W,
166
+ onApply: X,
165
167
  onCancel: h,
166
168
  onClear: R,
167
- ...J
169
+ ...U
168
170
  }
169
171
  )
170
172
  }
171
173
  );
172
174
  }
173
175
  );
174
- fe.displayName = "QuarterRangePicker";
176
+ pe.displayName = "QuarterRangePicker";
175
177
  export {
176
- fe as QuarterRangePicker
178
+ pe as QuarterRangePicker
177
179
  };
@@ -1,23 +1,23 @@
1
1
  import { jsxs as W, jsx as a } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import { Cross as be, CalendarMonth as xe } from "impact-nova-icons";
3
+ import { Cross as xe, CalendarMonth as Te } from "impact-nova-icons";
4
4
  import { format as j } from "date-fns";
5
- import { cn as Te } from "../../../lib/utils.js";
6
- import { usePickerDismissActionsRef as Se, usePickerFooterDismissNudge as Ee, isDateInputInvalid as Ae, resolveSingleValueDismissFlash as Ne, handlePickerSurfacePointerDown as we, resolveDateInputOnBlur as Ve, maskDateInput as Le, parseDateInput as Oe, resolveDateInputOnEnter as Me } from "./date-input-behavior.js";
7
- import { Input as je } from "../input/input.js";
8
- import { Popover as Be, PopoverAnchor as ze, PopoverContent as He } from "../../feedback/popover/popover.js";
9
- import { Calendar as $e } from "../../data-display/calendar/calendar.js";
5
+ import { cn as Ee } from "../../../lib/utils.js";
6
+ import { usePickerDismissActionsRef as Se, usePickerFooterDismissNudge as Ae, isDateInputInvalid as Ne, resolveSingleValueDismissFlash as we, handlePickerEscapeKeyDown as Ve, handlePickerSurfacePointerDown as Le, resolveDateInputOnBlur as Oe, maskDateInput as Me, parseDateInput as je, resolveDateInputOnEnter as Be } from "./date-input-behavior.js";
7
+ import { Input as ze } from "../input/input.js";
8
+ import { Popover as He, PopoverAnchor as Ke, PopoverContent as $e } from "../../feedback/popover/popover.js";
9
+ import { Calendar as qe } from "../../data-display/calendar/calendar.js";
10
10
  import { Tooltip as Z, TooltipTrigger as _, TooltipContent as Y } from "../../feedback/tooltip/tooltip.js";
11
- import { resolveWeekSelection as Ke } from "../../../lib/fiscal-calendar/week-selection.js";
12
- import { useImpactNovaI18n as qe } from "../../../i18n/use-impact-nova-i18n.js";
13
- import { getDateFnsLocale as Ge } from "../../../i18n/getDateFnsLocale.js";
14
- import { coerceSingleWeekApply as Je, coerceSingleWeek as Qe } from "./calendar-selection-adapters.js";
15
- import { buildDateBoundsMatcher as Ue } from "../../../lib/date-bounds-matcher.js";
16
- import { fiscalCalendarPassThrough as Xe } from "./fiscal-pass-through.js";
11
+ import { resolveWeekSelection as Ge } from "../../../lib/fiscal-calendar/week-selection.js";
12
+ import { useImpactNovaI18n as Je } from "../../../i18n/use-impact-nova-i18n.js";
13
+ import { getDateFnsLocale as Qe } from "../../../i18n/getDateFnsLocale.js";
14
+ import { coerceSingleWeekApply as Ue, coerceSingleWeek as Xe } from "./calendar-selection-adapters.js";
15
+ import { buildDateBoundsMatcher as Ze } from "../../../lib/date-bounds-matcher.js";
16
+ import { fiscalCalendarPassThrough as _e } from "./fiscal-pass-through.js";
17
17
  const F = (n, c = "MM/dd/yyyy", t) => {
18
18
  const R = j(n.startDate, c, t ? { locale: t } : {}), b = j(n.endDate, c, t ? { locale: t } : {});
19
19
  return `${R} - ${b}`;
20
- }, g = (n, c, t) => n ? j(n.startDate, c, t ? { locale: t } : {}) : "", Ze = s.forwardRef(
20
+ }, g = (n, c, t) => n ? j(n.startDate, c, t ? { locale: t } : {}) : "", Ye = s.forwardRef(
21
21
  ({
22
22
  value: n,
23
23
  onChange: c,
@@ -31,24 +31,25 @@ const F = (n, c = "MM/dd/yyyy", t) => {
31
31
  calendarKind: I,
32
32
  fiscalMode: x = "basic",
33
33
  granularity: T,
34
- fiscalMonthPattern: S,
35
- fiscalYearStartMonth: E = 1,
34
+ fiscalMonthPattern: E,
35
+ fiscalYearStartMonth: S = 1,
36
36
  fiscalConfig: re,
37
37
  weekStartsOn: A = 1,
38
38
  showPresets: se,
39
- comparison: oe,
40
- onComparisonChange: ie,
39
+ showPeriodBoundaries: oe,
40
+ comparison: ie,
41
+ onComparisonChange: ce,
41
42
  disabled: p,
42
- className: ce,
43
- ...ae
44
- }, le) => {
45
- const { locale: B, t: D } = qe(), i = s.useMemo(() => Ge(B), [B]), pe = R ?? D("datePicker.selectWeek"), v = I === "fiscal", N = s.useRef(null), z = s.useRef(null), C = s.useRef(!1);
46
- s.useImperativeHandle(le, () => N.current);
47
- const [o, H] = s.useState(!1), $ = Se(), { footerFlashKey: ue, footerFlashTarget: fe, popoverHandlers: de } = Ee(l, o, $, z), [me, w] = s.useState(!1), [u, f] = s.useState(n), [y, m] = s.useState(""), [ke, h] = s.useState(n?.startDate || /* @__PURE__ */ new Date()), De = n ? F(n, t, i) : "", K = u ? F(u, t, i) : "", V = o || me, ye = V ? y : K, q = s.useCallback(() => {
48
- f(n), m(g(n, t, i)), v || h(n?.startDate || /* @__PURE__ */ new Date());
49
- }, [n, t, i, v]), P = s.useCallback(() => {
50
- m(g(u ?? n, t, i)), v || h((u ?? n)?.startDate || /* @__PURE__ */ new Date());
51
- }, [u, n, t, i, v]);
43
+ className: ae,
44
+ ...le
45
+ }, pe) => {
46
+ const { locale: B, t: D } = Je(), i = s.useMemo(() => Qe(B), [B]), ue = R ?? D("datePicker.selectWeek"), C = I === "fiscal", N = s.useRef(null), z = s.useRef(null), v = s.useRef(!1);
47
+ s.useImperativeHandle(pe, () => N.current);
48
+ const [o, H] = s.useState(!1), K = Se(), { footerFlashKey: fe, footerFlashTarget: de, popoverHandlers: me } = Ae(l, o, K, z), [ke, w] = s.useState(!1), [u, f] = s.useState(n), [y, m] = s.useState(""), [De, h] = s.useState(n?.startDate || /* @__PURE__ */ new Date()), ye = n ? F(n, t, i) : "", $ = u ? F(u, t, i) : "", V = o || ke, he = V ? y : $, q = s.useCallback(() => {
49
+ f(n), m(g(n, t, i)), C || h(n?.startDate || /* @__PURE__ */ new Date());
50
+ }, [n, t, i, C]), P = s.useCallback(() => {
51
+ m(g(u ?? n, t, i)), C || h((u ?? n)?.startDate || /* @__PURE__ */ new Date());
52
+ }, [u, n, t, i, C]);
52
53
  s.useEffect(() => {
53
54
  o || f(n);
54
55
  }, [o, n]);
@@ -67,49 +68,49 @@ const F = (n, c = "MM/dd/yyyy", t) => {
67
68
  l || d();
68
69
  }
69
70
  }, L = s.useCallback(
70
- (e) => Ke(e, {
71
+ (e) => Ge(e, {
71
72
  calendarKind: I,
72
73
  fiscalMode: x,
73
74
  granularity: T,
74
- fiscalMonthPattern: S,
75
- fiscalYearStartMonth: E,
75
+ fiscalMonthPattern: E,
76
+ fiscalYearStartMonth: S,
76
77
  weekStartsOn: A
77
78
  }),
78
79
  [
79
80
  I,
80
81
  x,
81
82
  T,
82
- S,
83
83
  E,
84
+ S,
84
85
  A
85
86
  ]
86
- ), he = (e) => {
87
- const r = Qe(e);
88
- f(r), r && (m(g(r, t, i)), v || h(r.startDate)), l || (c?.(r), d());
87
+ ), ge = (e) => {
88
+ const r = Xe(e);
89
+ f(r), r && (m(g(r, t, i)), C || h(r.startDate)), l || (c?.(r), d());
89
90
  }, J = (e) => {
90
- const r = Je(e, u);
91
+ const r = Ue(e, u);
91
92
  c?.(r), d();
92
93
  }, O = () => {
93
94
  q(), d();
94
95
  }, Q = () => {
95
96
  f(void 0), m(""), c?.(void 0), l || d();
96
- }, ge = (e) => {
97
+ }, Ce = (e) => {
97
98
  const r = L(e);
98
99
  f(r), m(g(r, t, i)), h(e), c?.(r), d();
99
100
  }, ve = (e) => {
100
- const r = Le(e.target.value, t, y);
101
+ const r = Me(e.target.value, t, y);
101
102
  if (m(r), r === "") {
102
103
  f(void 0), l || c?.(void 0);
103
104
  return;
104
105
  }
105
- const { parsed: M, isValid: Re } = Oe(r, t, i);
106
- if (Re && M) {
106
+ const { parsed: M, isValid: be } = je(r, t, i);
107
+ if (be && M) {
107
108
  const X = L(M);
108
109
  f(X), h(M), l || c?.(X);
109
110
  }
110
- }, Ce = () => {
111
+ }, Ie = () => {
111
112
  if (w(!1), o) return;
112
- const e = Ve(
113
+ const e = Oe(
113
114
  y,
114
115
  t,
115
116
  g(u ?? n, t, i),
@@ -125,19 +126,19 @@ const F = (n, c = "MM/dd/yyyy", t) => {
125
126
  return;
126
127
  }
127
128
  y || (f(void 0), l || c?.(void 0));
128
- }, Ie = () => {
129
+ }, Pe = () => {
129
130
  if (o && l) {
130
131
  J();
131
132
  return;
132
133
  }
133
- const e = Me(y, t, i);
134
+ const e = Be(y, t, i);
134
135
  if (e.parsed) {
135
- l && ge(e.parsed);
136
+ l && Ce(e.parsed);
136
137
  return;
137
138
  }
138
- o || (C.current = !0, k(!0));
139
- }, U = De !== K, Pe = V && Ae(y, t, i), We = s.useCallback(
140
- () => Ne(
139
+ o || (v.current = !0, k(!0));
140
+ }, U = ye !== $, We = V && Ne(y, t, i), Re = s.useCallback(
141
+ () => we(
141
142
  u,
142
143
  n,
143
144
  (e, r) => e.startDate.getTime() === r.startDate.getTime()
@@ -145,45 +146,45 @@ const F = (n, c = "MM/dd/yyyy", t) => {
145
146
  [u, n]
146
147
  );
147
148
  return s.useLayoutEffect(() => {
148
- $.current = {
149
+ K.current = {
149
150
  onDismiss: O,
150
- resolveFlash: We
151
+ resolveFlash: Re
151
152
  };
152
- }), /* @__PURE__ */ W(Be, { open: p ? !1 : o, onOpenChange: k, children: [
153
- /* @__PURE__ */ a(ze, { asChild: !0, children: /* @__PURE__ */ a(
153
+ }), /* @__PURE__ */ W(He, { open: p ? !1 : o, onOpenChange: k, children: [
154
+ /* @__PURE__ */ a(Ke, { asChild: !0, children: /* @__PURE__ */ a(
154
155
  "div",
155
156
  {
156
157
  ref: z,
157
158
  "data-component": "week-picker",
158
159
  "data-state": o ? "open" : "closed",
159
160
  "data-pending": U || void 0,
160
- onPointerDown: (e) => we({
161
+ onPointerDown: (e) => Le({
161
162
  disabled: p,
162
163
  event: e,
163
164
  onOpen: () => k(!0),
164
165
  focusField: () => N.current?.focus()
165
166
  }),
166
167
  children: /* @__PURE__ */ a(
167
- je,
168
+ ze,
168
169
  {
169
170
  ref: N,
170
- value: ye,
171
+ value: he,
171
172
  onChange: ve,
172
173
  onFocus: () => {
173
174
  p || (w(!0), P());
174
175
  },
175
- onBlur: Ce,
176
+ onBlur: Ie,
176
177
  onClick: () => !p && k(!0),
177
178
  onKeyDown: (e) => {
178
- e.key === "Enter" && !p && (e.preventDefault(), Ie()), e.key === "ArrowDown" && !o && !p && (e.preventDefault(), C.current = !0, k(!0)), e.key === "Escape" && o && (e.preventDefault(), O());
179
+ e.key === "Enter" && !p && (e.preventDefault(), Pe()), e.key === "ArrowDown" && !o && !p && (e.preventDefault(), v.current = !0, k(!0)), e.key === "Escape" && o && Ve(e, { open: o, onCancel: O });
179
180
  },
180
- placeholder: V ? t : pe,
181
+ placeholder: V ? t : ue,
181
182
  disabled: p,
182
183
  "data-form-control": "input",
183
- className: Te(
184
+ className: Ee(
184
185
  "cursor-pointer",
185
- Pe ? "text-destructive" : U ? "text-content-placeholder" : "",
186
- ce
186
+ We ? "text-destructive" : U ? "text-content-placeholder" : "",
187
+ ae
187
188
  ),
188
189
  suffix: /* @__PURE__ */ W("div", { className: "flex items-center gap-1", children: [
189
190
  n && !p && /* @__PURE__ */ W(Z, { children: [
@@ -197,7 +198,7 @@ const F = (n, c = "MM/dd/yyyy", t) => {
197
198
  e.stopPropagation(), Q();
198
199
  },
199
200
  className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
200
- children: /* @__PURE__ */ a(be, { className: "size-3 hover:text-content" })
201
+ children: /* @__PURE__ */ a(xe, { className: "size-3 hover:text-content" })
201
202
  }
202
203
  ) }),
203
204
  /* @__PURE__ */ a(Y, { variant: "tertiary", side: "top", children: D("calendar.clear") })
@@ -213,56 +214,57 @@ const F = (n, c = "MM/dd/yyyy", t) => {
213
214
  e.stopPropagation(), p || (o ? d() : k(!0));
214
215
  },
215
216
  onKeyDown: (e) => {
216
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), p || (C.current = !0, o ? d() : k(!0)));
217
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), p || (v.current = !0, o ? d() : k(!0)));
217
218
  },
218
219
  className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer",
219
- children: /* @__PURE__ */ a(xe, { className: "h-4 w-4 text-secondary-foreground" })
220
+ children: /* @__PURE__ */ a(Te, { className: "h-4 w-4 text-secondary-foreground" })
220
221
  }
221
222
  ) }),
222
223
  /* @__PURE__ */ a(Y, { variant: "tertiary", side: "top", children: D("datePicker.selectWeek") })
223
224
  ] })
224
225
  ] }),
225
- ...ae
226
+ ...le
226
227
  }
227
228
  )
228
229
  }
229
230
  ) }),
230
231
  /* @__PURE__ */ a(
231
- He,
232
+ $e,
232
233
  {
233
234
  className: "w-auto p-0",
234
235
  align: "start",
235
236
  "aria-label": D("datePicker.selectWeek"),
236
237
  onOpenAutoFocus: (e) => {
237
- C.current || e.preventDefault(), C.current = !1;
238
+ v.current || e.preventDefault(), v.current = !1;
238
239
  },
239
- ...de,
240
+ ...me,
240
241
  children: /* @__PURE__ */ a(
241
- $e,
242
+ qe,
242
243
  {
243
244
  pickerType: "week",
244
245
  weekMode: "single",
245
246
  selectedWeeks: u,
246
- footerFlashKey: ue,
247
- footerFlashTarget: fe,
248
- onWeekSelect: he,
249
- month: ke,
247
+ footerFlashKey: fe,
248
+ footerFlashTarget: de,
249
+ onWeekSelect: ge,
250
+ month: De,
250
251
  onMonthChange: h,
251
- disabled: Ue(b, ee),
252
+ disabled: Ze(b, ee),
252
253
  startMonth: te,
253
254
  endMonth: ne,
254
255
  showFooter: l,
255
- ...Xe({
256
+ ..._e({
256
257
  calendarKind: I,
257
258
  fiscalMode: x,
258
259
  granularity: T,
259
- fiscalMonthPattern: S,
260
- fiscalYearStartMonth: E,
260
+ fiscalMonthPattern: E,
261
+ fiscalYearStartMonth: S,
261
262
  fiscalConfig: re,
262
263
  weekStartsOn: A,
263
264
  showPresets: se,
264
- comparison: oe,
265
- onComparisonChange: ie
265
+ showPeriodBoundaries: oe,
266
+ comparison: ie,
267
+ onComparisonChange: ce
266
268
  }),
267
269
  onApply: J,
268
270
  onCancel: O,
@@ -275,7 +277,7 @@ const F = (n, c = "MM/dd/yyyy", t) => {
275
277
  ] });
276
278
  }
277
279
  );
278
- Ze.displayName = "WeekPicker";
280
+ Ye.displayName = "WeekPicker";
279
281
  export {
280
- Ze as WeekPicker
282
+ Ye as WeekPicker
281
283
  };