impact-nova 2.5.9 → 2.5.11

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