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