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,24 +1,24 @@
1
1
  import { jsx as u, jsxs as D } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import { Cross as qe, CalendarMonth as Le } from "impact-nova-icons";
3
+ import { Cross as Ge, CalendarMonth as Je } from "impact-nova-icons";
4
4
  import { cn as z } from "../../../lib/utils.js";
5
- import { usePickerDismissActionsRef as Ge, usePickerFooterDismissNudge as Je, createRangePickerOpenChangeHandler as Qe, parseDateInput as H, normalizeOrderedRange as ee, compareMonthSelection as V, flashRangeReorder as te, isDateInputInvalid as re, resolveRangeFieldBlur as A, resolveRangePickerDismissFlash as Ue, handlePickerSurfacePointerDown as We, deferRangeInputBlur as Xe, maskDateInput as oe, resolveDateInputOnBlur as O } from "./date-input-behavior.js";
6
- import { useFieldChrome as Ze } from "../../../lib/primitives/use-field-chrome.js";
7
- import { Popover as _e, PopoverAnchor as Fe, PopoverContent as et } from "../../feedback/popover/popover.js";
8
- import { Calendar as tt } from "../../data-display/calendar/calendar.js";
9
- import { Tooltip as ne, TooltipTrigger as se, TooltipContent as ie } from "../../feedback/tooltip/tooltip.js";
10
- import { useImpactNovaI18n as rt } from "../../../i18n/use-impact-nova-i18n.js";
11
- import { coerceMonthRangeApply as ot, isMonthRangeSelection as nt } from "./calendar-selection-adapters.js";
12
- import { buildDateBoundsMatcher as st } from "../../../lib/date-bounds-matcher.js";
13
- import { fiscalCalendarPassThrough as it } from "./fiscal-pass-through.js";
14
- import { formatFiscalPeriod as at } from "./fiscal-period-format.js";
5
+ import { usePickerDismissActionsRef as Qe, usePickerFooterDismissNudge as Ue, createRangePickerOpenChangeHandler as We, parseDateInput as H, normalizeOrderedRange as ee, compareMonthSelection as V, flashRangeReorder as te, isDateInputInvalid as re, resolveRangeFieldBlur as A, resolveRangePickerDismissFlash as Xe, handlePickerEscapeKeyDown as oe, handlePickerSurfacePointerDown as Ze, deferRangeInputBlur as _e, maskDateInput as ne, resolveDateInputOnBlur as O } from "./date-input-behavior.js";
6
+ import { useFieldChrome as Fe } from "../../../lib/primitives/use-field-chrome.js";
7
+ import { Popover as et, PopoverAnchor as tt, PopoverContent as rt } from "../../feedback/popover/popover.js";
8
+ import { Calendar as ot } from "../../data-display/calendar/calendar.js";
9
+ import { Tooltip as se, TooltipTrigger as ie, TooltipContent as ae } from "../../feedback/tooltip/tooltip.js";
10
+ import { useImpactNovaI18n as nt } from "../../../i18n/use-impact-nova-i18n.js";
11
+ import { coerceMonthRangeApply as st, isMonthRangeSelection as it } from "./calendar-selection-adapters.js";
12
+ import { buildDateBoundsMatcher as at } from "../../../lib/date-bounds-matcher.js";
13
+ import { fiscalCalendarPassThrough as ct } from "./fiscal-pass-through.js";
14
+ import { formatFiscalPeriod as ft } from "./fiscal-period-format.js";
15
15
  const h = (t, n = "MM/YYYY") => {
16
- const E = at(t);
16
+ const E = ft(t);
17
17
  if (E) return E;
18
18
  const k = (t.month + 1).toString().padStart(2, "0");
19
19
  return n === "YYYY/MM" ? `${t.year}/${k}` : `${k}/${t.year}`;
20
20
  };
21
- function ct(t, n) {
21
+ function dt(t, n) {
22
22
  if (!t && !n) return !0;
23
23
  if (!t || !n) return !1;
24
24
  const E = t.from === void 0 && n.from === void 0 || t.from !== void 0 && n.from !== void 0 && V(t.from, n.from) === 0, k = t.to === void 0 && n.to === void 0 || t.to !== void 0 && n.to !== void 0 && V(t.to, n.to) === 0;
@@ -27,58 +27,59 @@ function ct(t, n) {
27
27
  function b(t) {
28
28
  return { month: t.getMonth(), year: t.getFullYear() };
29
29
  }
30
- const ft = s.forwardRef(
30
+ const lt = s.forwardRef(
31
31
  ({
32
32
  value: t,
33
33
  onChange: n,
34
34
  placeholder: E,
35
35
  minDate: k,
36
- maxDate: ae,
37
- startMonth: ce,
38
- endMonth: fe,
36
+ maxDate: ce,
37
+ startMonth: fe,
38
+ endMonth: de,
39
39
  showFooter: g = !0,
40
40
  disabled: c,
41
- className: de,
42
- error: le,
43
- isError: me,
41
+ className: le,
42
+ error: me,
43
+ isError: pe,
44
44
  size: q,
45
- label: pe,
46
- helperText: ue,
47
- helperTextPosition: he = "absolute",
48
- required: ge,
49
- prefix: dt,
50
- prefixClick: lt,
45
+ label: ue,
46
+ helperText: he,
47
+ helperTextPosition: ge = "absolute",
48
+ required: Me,
49
+ prefix: mt,
50
+ prefixClick: pt,
51
51
  displayFormat: i = "MM/YYYY",
52
- calendarKind: Me,
53
- fiscalMode: Re,
54
- granularity: ye,
55
- fiscalMonthPattern: ke,
56
- fiscalYearStartMonth: ve,
57
- fiscalConfig: xe,
52
+ calendarKind: Re,
53
+ fiscalMode: ye,
54
+ granularity: ke,
55
+ fiscalMonthPattern: ve,
56
+ fiscalYearStartMonth: xe,
57
+ fiscalConfig: Ce,
58
58
  showPresets: Ye,
59
- comparison: Ce,
60
- onComparisonChange: Pe,
61
- ...be
62
- }, we) => {
63
- const L = le ?? me, Ie = Ze({
64
- label: pe,
65
- helperText: ue,
66
- helperTextPosition: he,
59
+ showPeriodBoundaries: Pe,
60
+ comparison: be,
61
+ onComparisonChange: we,
62
+ ...Ie
63
+ }, De) => {
64
+ const L = me ?? pe, Ee = Fe({
65
+ label: ue,
66
+ helperText: he,
67
+ helperTextPosition: ge,
67
68
  error: L,
68
- required: ge,
69
+ required: Me,
69
70
  disabled: c ?? void 0,
70
71
  rootClassName: "w-full min-w-[240px]"
71
- }), { t: Y } = rt(), K = s.useRef(null), G = s.useRef(null), J = s.useRef(null), S = s.useRef(null), j = s.useRef(null), d = s.useMemo(
72
+ }), { t: C } = nt(), K = s.useRef(null), G = s.useRef(null), J = s.useRef(null), S = s.useRef(null), j = s.useRef(null), l = s.useMemo(
72
73
  () => i === "YYYY/MM" ? "yyyy/MM" : "MM/yyyy",
73
74
  [i]
74
75
  );
75
- s.useImperativeHandle(we, () => K.current);
76
- const [m, M] = s.useState(!1), Q = Ge(), { footerFlashKey: De, footerFlashTarget: Ee, popoverHandlers: Se } = Je(g, m, Q, J), I = s.useRef(!1), [f, R] = s.useState(t), [p, v] = s.useState(t?.from ? h(t.from, i) : ""), [y, x] = s.useState(t?.to ? h(t.to, i) : ""), [Te, w] = s.useState(() => t?.from ? new Date(t.from.year, t.from.month, 1) : k || /* @__PURE__ */ new Date());
76
+ s.useImperativeHandle(De, () => K.current);
77
+ const [f, M] = s.useState(!1), Q = Qe(), { footerFlashKey: Se, footerFlashTarget: Te, popoverHandlers: Be } = Ue(g, f, Q, J), I = s.useRef(!1), [d, R] = s.useState(t), [p, v] = s.useState(t?.from ? h(t.from, i) : ""), [y, x] = s.useState(t?.to ? h(t.to, i) : ""), [Ne, w] = s.useState(() => t?.from ? new Date(t.from.year, t.from.month, 1) : k || /* @__PURE__ */ new Date());
77
78
  s.useEffect(() => {
78
79
  v(t?.from ? h(t.from, i) : ""), x(t?.to ? h(t.to, i) : ""), R(t);
79
80
  }, [t, i]);
80
- const Be = s.useCallback(
81
- (e) => Qe({
81
+ const Ae = s.useCallback(
82
+ (e) => We({
82
83
  disabled: c ?? void 0,
83
84
  showFooter: g,
84
85
  containerRef: S,
@@ -88,113 +89,113 @@ const ft = s.forwardRef(
88
89
  [c, g]
89
90
  ), U = s.useRef(!1);
90
91
  s.useEffect(() => {
91
- if (m && !U.current) {
92
- const e = H(p, d);
93
- e.parsed ? w(e.parsed) : f?.from ? w(new Date(f.from.year, f.from.month, 1)) : t?.from ? w(new Date(t.from.year, t.from.month, 1)) : k && w(k);
92
+ if (f && !U.current) {
93
+ const e = H(p, l);
94
+ e.parsed ? w(e.parsed) : d?.from ? w(new Date(d.from.year, d.from.month, 1)) : t?.from ? w(new Date(t.from.year, t.from.month, 1)) : k && w(k);
94
95
  }
95
- U.current = m;
96
- }, [m, p, d, f?.from, t?.from, k]);
97
- const Ne = (e) => {
98
- const r = nt(e) ? e : void 0;
96
+ U.current = f;
97
+ }, [f, p, l, d?.from, t?.from, k]);
98
+ const Oe = (e) => {
99
+ const r = it(e) ? e : void 0;
99
100
  R(r), r?.from && v(h(r.from, i)), r?.to && x(h(r.to, i)), !g && r?.from && r?.to && (r.from.month !== r.to.month || r.from.year !== r.to.year) && (n?.(r), M(!1));
100
101
  }, W = (e) => {
101
- const r = ot(e, f), o = ee(r?.from, r?.to, V);
102
+ const r = st(e, d), o = ee(r?.from, r?.to, V);
102
103
  o.swapped && (o.from && v(h(o.from, i)), o.to && x(h(o.to, i)), R({ from: o.from, to: o.to }), te(S.current)), n?.({ from: o.from, to: o.to }), M(!1);
103
104
  }, B = () => {
104
105
  R(t), v(t?.from ? h(t.from, i) : ""), x(t?.to ? h(t.to, i) : ""), M(!1);
105
106
  }, $ = () => {
106
107
  R(void 0), v(""), x(""), n?.(void 0), g || M(!1);
107
- }, Ae = (e) => {
108
- const r = oe(e.target.value, d, p);
108
+ }, Ve = (e) => {
109
+ const r = ne(e.target.value, l, p);
109
110
  if (v(r), r === "") {
110
- const l = { from: void 0, to: f?.to };
111
- R(l), g || n?.(l);
111
+ const m = { from: void 0, to: d?.to };
112
+ R(m), g || n?.(m);
112
113
  return;
113
114
  }
114
- const { parsed: o, isValid: a } = H(r, d);
115
+ const { parsed: o, isValid: a } = H(r, l);
115
116
  if (a && o) {
116
- const T = { from: b(o), to: f?.to };
117
+ const T = { from: b(o), to: d?.to };
117
118
  R(T), w(o), g || n?.(T);
118
119
  }
119
- }, Oe = (e) => {
120
- const r = oe(e.target.value, d, y);
120
+ }, Ke = (e) => {
121
+ const r = ne(e.target.value, l, y);
121
122
  if (x(r), r === "") {
122
- const l = { from: f?.from, to: void 0 };
123
- R(l), g || n?.(l);
123
+ const m = { from: d?.from, to: void 0 };
124
+ R(m), g || n?.(m);
124
125
  return;
125
126
  }
126
- const { parsed: o, isValid: a } = H(r, d);
127
+ const { parsed: o, isValid: a } = H(r, l);
127
128
  if (a && o) {
128
- const l = b(o), T = { from: f?.from, to: l };
129
+ const m = b(o), T = { from: d?.from, to: m };
129
130
  R(T), w(o), g || n?.(T);
130
131
  }
131
132
  }, N = s.useCallback((e, r) => {
132
133
  const o = ee(e, r, V);
133
134
  return o.swapped && (o.from && v(h(o.from, i)), o.to && x(h(o.to, i)), te(S.current)), { from: o.from, to: o.to };
134
- }, [i]), Ve = () => {
135
- const e = O(p, d, C), r = O(y, d, P);
136
- e.resetToCommitted ? v(C) : e.parsed && v(e.display), r.resetToCommitted ? x(P) : r.parsed && x(r.display);
137
- let o = e.parsed ? b(e.parsed) : f?.from, a = r.parsed ? b(r.parsed) : f?.to;
135
+ }, [i]), je = () => {
136
+ const e = O(p, l, Y), r = O(y, l, P);
137
+ e.resetToCommitted ? v(Y) : e.parsed && v(e.display), r.resetToCommitted ? x(P) : r.parsed && x(r.display);
138
+ let o = e.parsed ? b(e.parsed) : d?.from, a = r.parsed ? b(r.parsed) : d?.to;
138
139
  if ({ from: o, to: a } = N(o, a), o || a) {
139
- const l = { from: o, to: a };
140
- R(l), n?.(l);
140
+ const m = { from: o, to: a };
141
+ R(m), n?.(m);
141
142
  } else !p && !y && (R(void 0), n?.(void 0));
142
143
  }, X = () => {
143
- Xe(
144
+ _e(
144
145
  S,
145
146
  j,
146
147
  () => {
147
- const e = A(p, d, C), r = A(y, d, P);
148
- e.resetToCommitted ? v(C) : e.parsed && v(e.display), r.resetToCommitted ? x(P) : r.parsed && x(r.display);
149
- let o = e.parsed ? b(e.parsed) : e.resetToCommitted ? t?.from : f?.from, a = r.parsed ? b(r.parsed) : r.resetToCommitted ? t?.to : f?.to;
148
+ const e = A(p, l, Y), r = A(y, l, P);
149
+ e.resetToCommitted ? v(Y) : e.parsed && v(e.display), r.resetToCommitted ? x(P) : r.parsed && x(r.display);
150
+ let o = e.parsed ? b(e.parsed) : e.resetToCommitted ? t?.from : d?.from, a = r.parsed ? b(r.parsed) : r.resetToCommitted ? t?.to : d?.to;
150
151
  o && a && ({ from: o, to: a } = N(o, a));
151
- const l = o || a ? { from: o, to: a } : void 0;
152
- R(l), g || (l ? n?.(l) : !p && !y && n?.(void 0));
152
+ const m = o || a ? { from: o, to: a } : void 0;
153
+ R(m), g || (m ? n?.(m) : !p && !y && n?.(void 0));
153
154
  }
154
155
  );
155
156
  }, Z = () => {
156
- if (m && g) {
157
+ if (f && g) {
157
158
  W();
158
159
  return;
159
160
  }
160
- if (!m) {
161
+ if (!f) {
161
162
  if (g) {
162
- Ve();
163
+ je();
163
164
  return;
164
165
  }
165
- const e = O(p, d, C), r = O(y, d, P);
166
+ const e = O(p, l, Y), r = O(y, l, P);
166
167
  if (e.parsed || r.parsed) return;
167
168
  I.current = !0, M(!0);
168
169
  }
169
- }, C = t?.from ? h(t.from, i) : "", P = t?.to ? h(t.to, i) : "", Ke = p !== C, je = y !== P, $e = re(p, d), ze = re(y, d), _ = Y("datePicker.startMonth"), F = Y("datePicker.endMonth"), He = s.useCallback(() => {
170
- const e = A(p, d, C), r = A(y, d, P);
171
- let o = e.parsed ? b(e.parsed) : e.resetToCommitted ? t?.from : f?.from, a = r.parsed ? b(r.parsed) : r.resetToCommitted ? t?.to : f?.to;
170
+ }, Y = t?.from ? h(t.from, i) : "", P = t?.to ? h(t.to, i) : "", $e = p !== Y, ze = y !== P, He = re(p, l), qe = re(y, l), _ = C("datePicker.startMonth"), F = C("datePicker.endMonth"), Le = s.useCallback(() => {
171
+ const e = A(p, l, Y), r = A(y, l, P);
172
+ let o = e.parsed ? b(e.parsed) : e.resetToCommitted ? t?.from : d?.from, a = r.parsed ? b(r.parsed) : r.resetToCommitted ? t?.to : d?.to;
172
173
  o && a && ({ from: o, to: a } = N(o, a));
173
- const l = o || a ? { from: o, to: a } : void 0;
174
- return Ue({
174
+ const m = o || a ? { from: o, to: a } : void 0;
175
+ return Xe({
175
176
  startInput: p,
176
177
  endInput: y,
177
- committedStart: C,
178
+ committedStart: Y,
178
179
  committedEnd: P,
179
180
  committedRange: t,
180
- pendingRange: f,
181
- computeEffectiveRange: () => l,
182
- rangesEqual: ct
181
+ pendingRange: d,
182
+ computeEffectiveRange: () => m,
183
+ rangesEqual: dt
183
184
  });
184
185
  }, [
185
186
  p,
186
187
  y,
187
- C,
188
+ Y,
188
189
  P,
189
190
  t,
190
- f,
191
191
  d,
192
+ l,
192
193
  N
193
194
  ]);
194
195
  return s.useLayoutEffect(() => {
195
196
  Q.current = {
196
197
  onDismiss: B,
197
- resolveFlash: He
198
+ resolveFlash: Le
198
199
  };
199
200
  }), /* @__PURE__ */ u(
200
201
  "div",
@@ -202,14 +203,14 @@ const ft = s.forwardRef(
202
203
  ref: J,
203
204
  "data-component": "month-range-picker",
204
205
  "data-disabled": c || void 0,
205
- children: Ie.wrapControl(
206
- /* @__PURE__ */ D(_e, { open: c ? !1 : m, onOpenChange: Be, children: [
207
- /* @__PURE__ */ u(Fe, { asChild: !0, children: /* @__PURE__ */ D(
206
+ children: Ee.wrapControl(
207
+ /* @__PURE__ */ D(et, { open: c ? !1 : f, onOpenChange: Ae, children: [
208
+ /* @__PURE__ */ u(tt, { asChild: !0, children: /* @__PURE__ */ D(
208
209
  "div",
209
210
  {
210
211
  ref: S,
211
- "data-state": m ? "open" : "closed",
212
- onPointerDown: (e) => We({
212
+ "data-state": f ? "open" : "closed",
213
+ onPointerDown: (e) => Ze({
213
214
  disabled: c,
214
215
  event: e,
215
216
  onOpen: () => M(!0),
@@ -223,7 +224,7 @@ const ft = s.forwardRef(
223
224
  q === "sm" ? "h-6" : q === "md" ? "h-[28px]" : "h-8",
224
225
  c && "pointer-events-none opacity-100 bg-disabled-surface border-stroke text-disabled-foreground hover:border-stroke",
225
226
  "cursor-pointer",
226
- de
227
+ le
227
228
  ),
228
229
  children: [
229
230
  /* @__PURE__ */ D("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
@@ -233,21 +234,21 @@ const ft = s.forwardRef(
233
234
  ref: K,
234
235
  type: "text",
235
236
  value: p,
236
- onChange: Ae,
237
+ onChange: Ve,
237
238
  onBlur: X,
238
239
  onClick: () => !c && M(!0),
239
240
  onKeyDown: (e) => {
240
- e.key === "Enter" && !c && (e.preventDefault(), Z()), e.key === "ArrowDown" && !m && !c && (e.preventDefault(), I.current = !0, M(!0)), e.key === "Escape" && m && (e.preventDefault(), B());
241
+ e.key === "Enter" && !c && (e.preventDefault(), Z()), e.key === "ArrowDown" && !f && !c && (e.preventDefault(), I.current = !0, M(!0)), e.key === "Escape" && f && oe(e, { open: f, onCancel: B });
241
242
  },
242
- placeholder: m ? i === "YYYY/MM" ? "YYYY/MM" : Y("datePicker.monthYearFormat") : _,
243
+ placeholder: f ? i === "YYYY/MM" ? "YYYY/MM" : C("datePicker.monthYearFormat") : _,
243
244
  disabled: !!c,
244
245
  "aria-label": _,
245
246
  "data-field": "start",
246
247
  className: z(
247
248
  "flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-content-empty disabled:cursor-not-allowed disabled:opacity-50",
248
- $e ? "text-destructive" : Ke ? "text-content-placeholder" : ""
249
+ He ? "text-destructive" : $e ? "text-content-placeholder" : ""
249
250
  ),
250
- ...be
251
+ ...Ie
251
252
  }
252
253
  ),
253
254
  /* @__PURE__ */ u(
@@ -256,31 +257,31 @@ const ft = s.forwardRef(
256
257
  ref: G,
257
258
  type: "text",
258
259
  value: y,
259
- onChange: Oe,
260
+ onChange: Ke,
260
261
  onBlur: X,
261
262
  onClick: () => !c && M(!0),
262
263
  onKeyDown: (e) => {
263
- e.key === "Enter" && !c && (e.preventDefault(), Z()), e.key === "ArrowDown" && !m && !c && (e.preventDefault(), I.current = !0, M(!0)), e.key === "Escape" && m && (e.preventDefault(), B());
264
+ e.key === "Enter" && !c && (e.preventDefault(), Z()), e.key === "ArrowDown" && !f && !c && (e.preventDefault(), I.current = !0, M(!0)), e.key === "Escape" && f && oe(e, { open: f, onCancel: B });
264
265
  },
265
- placeholder: m ? i === "YYYY/MM" ? "YYYY/MM" : Y("datePicker.monthYearFormat") : F,
266
+ placeholder: f ? i === "YYYY/MM" ? "YYYY/MM" : C("datePicker.monthYearFormat") : F,
266
267
  disabled: !!c,
267
268
  "aria-label": F,
268
269
  "data-field": "end",
269
270
  className: z(
270
271
  "flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-content-empty disabled:cursor-not-allowed disabled:opacity-50",
271
- ze ? "text-destructive" : je ? "text-content-placeholder" : ""
272
+ qe ? "text-destructive" : ze ? "text-content-placeholder" : ""
272
273
  )
273
274
  }
274
275
  )
275
276
  ] }),
276
277
  /* @__PURE__ */ D("div", { className: "flex items-center gap-1 shrink-0", children: [
277
- t?.from && !c && /* @__PURE__ */ D(ne, { children: [
278
- /* @__PURE__ */ u(se, { asChild: !0, children: /* @__PURE__ */ u(
278
+ t?.from && !c && /* @__PURE__ */ D(se, { children: [
279
+ /* @__PURE__ */ u(ie, { asChild: !0, children: /* @__PURE__ */ u(
279
280
  "button",
280
281
  {
281
282
  type: "button",
282
283
  tabIndex: 0,
283
- "aria-label": Y("calendar.clear"),
284
+ "aria-label": C("calendar.clear"),
284
285
  onClick: (e) => {
285
286
  e.stopPropagation(), $();
286
287
  },
@@ -288,62 +289,63 @@ const ft = s.forwardRef(
288
289
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), $());
289
290
  },
290
291
  className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
291
- children: /* @__PURE__ */ u(qe, { className: "size-3 hover:text-content text-content-icon" })
292
+ children: /* @__PURE__ */ u(Ge, { className: "size-3 hover:text-content text-content-icon" })
292
293
  }
293
294
  ) }),
294
- /* @__PURE__ */ u(ie, { variant: "tertiary", side: "top", children: Y("calendar.clear") })
295
+ /* @__PURE__ */ u(ae, { variant: "tertiary", side: "top", children: C("calendar.clear") })
295
296
  ] }),
296
- /* @__PURE__ */ D(ne, { children: [
297
- /* @__PURE__ */ u(se, { asChild: !0, children: /* @__PURE__ */ u("button", { type: "button", tabIndex: 0, "aria-label": Y("datePicker.selectMonthRange"), onClick: (e) => {
298
- e.stopPropagation(), c || M(!m);
297
+ /* @__PURE__ */ D(se, { children: [
298
+ /* @__PURE__ */ u(ie, { asChild: !0, children: /* @__PURE__ */ u("button", { type: "button", tabIndex: 0, "aria-label": C("datePicker.selectMonthRange"), onClick: (e) => {
299
+ e.stopPropagation(), c || M(!f);
299
300
  }, onKeyDown: (e) => {
300
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), c || (I.current = !0, M(!m)));
301
- }, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ u(Le, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
302
- /* @__PURE__ */ u(ie, { variant: "tertiary", side: "top", children: Y("datePicker.selectMonthRange") })
301
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), c || (I.current = !0, M(!f)));
302
+ }, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ u(Je, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
303
+ /* @__PURE__ */ u(ae, { variant: "tertiary", side: "top", children: C("datePicker.selectMonthRange") })
303
304
  ] })
304
305
  ] })
305
306
  ]
306
307
  }
307
308
  ) }),
308
309
  /* @__PURE__ */ u(
309
- et,
310
+ rt,
310
311
  {
311
312
  ref: j,
312
313
  className: "w-auto p-0",
313
314
  align: "start",
314
- "aria-label": Y("datePicker.selectMonthRange"),
315
+ "aria-label": C("datePicker.selectMonthRange"),
315
316
  onOpenAutoFocus: (e) => {
316
317
  I.current || e.preventDefault(), I.current = !1;
317
318
  },
318
- ...Se,
319
+ ...Be,
319
320
  children: /* @__PURE__ */ u(
320
- tt,
321
+ ot,
321
322
  {
322
323
  pickerType: "month",
323
324
  monthMode: "range",
324
- selectedMonths: f,
325
- footerFlashKey: De,
326
- footerFlashTarget: Ee,
327
- onMonthSelect: Ne,
328
- month: Te,
325
+ selectedMonths: d,
326
+ footerFlashKey: Se,
327
+ footerFlashTarget: Te,
328
+ onMonthSelect: Oe,
329
+ month: Ne,
329
330
  onMonthChange: w,
330
- disabled: st(k, ae),
331
- startMonth: ce,
332
- endMonth: fe,
331
+ disabled: at(k, ce),
332
+ startMonth: fe,
333
+ endMonth: de,
333
334
  showFooter: g,
334
335
  onApply: W,
335
336
  onCancel: B,
336
337
  onClear: $,
337
- ...it({
338
- calendarKind: Me,
339
- fiscalMode: Re,
340
- granularity: ye,
341
- fiscalMonthPattern: ke,
342
- fiscalYearStartMonth: ve,
343
- fiscalConfig: xe,
338
+ ...ct({
339
+ calendarKind: Re,
340
+ fiscalMode: ye,
341
+ granularity: ke,
342
+ fiscalMonthPattern: ve,
343
+ fiscalYearStartMonth: xe,
344
+ fiscalConfig: Ce,
344
345
  showPresets: Ye,
345
- comparison: Ce,
346
- onComparisonChange: Pe
346
+ showPeriodBoundaries: Pe,
347
+ comparison: be,
348
+ onComparisonChange: we
347
349
  })
348
350
  }
349
351
  )
@@ -355,7 +357,7 @@ const ft = s.forwardRef(
355
357
  );
356
358
  }
357
359
  );
358
- ft.displayName = "MonthRangePicker";
360
+ lt.displayName = "MonthRangePicker";
359
361
  export {
360
- ft as MonthRangePicker
362
+ lt as MonthRangePicker
361
363
  };