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