impact-nova 2.5.11 → 2.5.13

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