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,17 +1,17 @@
1
1
  import { jsxs as d, jsx as n } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import { Cross as Z, CalendarMonth as _ } from "impact-nova-icons";
4
- import { cn as ee } from "../../../lib/utils.js";
5
- import { Input as te } from "../input/input.js";
6
- import { Popover as ne, PopoverAnchor as re, PopoverContent as oe } from "../../feedback/popover/popover.js";
7
- import { Calendar as se } from "../../data-display/calendar/calendar.js";
3
+ import { Cross as Y, CalendarMonth as Z } from "impact-nova-icons";
4
+ import { cn as _ } from "../../../lib/utils.js";
5
+ import { Input as ee } from "../input/input.js";
6
+ import { Popover as te, PopoverAnchor as ne, PopoverContent as re } from "../../feedback/popover/popover.js";
7
+ import { Calendar as oe } from "../../data-display/calendar/calendar.js";
8
8
  import { Tooltip as D, TooltipTrigger as b, TooltipContent as x } from "../../feedback/tooltip/tooltip.js";
9
- import { useImpactNovaI18n as ie } from "../../../i18n/use-impact-nova-i18n.js";
10
- import { coerceMonthArrayApply as ce, coerceMonthArray as ae } from "./calendar-selection-adapters.js";
11
- import { usePickerDismissActionsRef as le, usePickerFooterDismissNudge as pe, handlePickerSurfacePointerDown as fe } from "./date-input-behavior.js";
12
- import { buildDateBoundsMatcher as de } from "../../../lib/date-bounds-matcher.js";
13
- import { fiscalCalendarPassThrough as he } from "./fiscal-pass-through.js";
14
- const ue = s.forwardRef(
9
+ import { useImpactNovaI18n as se } from "../../../i18n/use-impact-nova-i18n.js";
10
+ import { coerceMonthArrayApply as ie, coerceMonthArray as ce } from "./calendar-selection-adapters.js";
11
+ import { usePickerDismissActionsRef as ae, usePickerFooterDismissNudge as le, handlePickerSurfacePointerDown as pe } from "./date-input-behavior.js";
12
+ import { buildDateBoundsMatcher as fe } from "../../../lib/date-bounds-matcher.js";
13
+ import { fiscalCalendarPassThrough as de } from "./fiscal-pass-through.js";
14
+ const he = s.forwardRef(
15
15
  ({
16
16
  value: t,
17
17
  onChange: h,
@@ -31,28 +31,27 @@ const ue = s.forwardRef(
31
31
  fiscalConfig: E,
32
32
  showPresets: F,
33
33
  showPeriodBoundaries: K,
34
- autoNavigateToAvailable: z,
35
- comparison: L,
36
- onComparisonChange: V,
37
- ...$
38
- }, q) => {
39
- const { t: i } = ie(), B = A ?? i("datePicker.selectMultipleMonths"), [c, o] = s.useState(!1), u = s.useRef(!1), m = s.useRef(null), g = le(), { footerFlashKey: H, footerFlashTarget: G, popoverHandlers: J } = pe(l, c, g, m), [p, f] = s.useState(t);
34
+ comparison: z,
35
+ onComparisonChange: L,
36
+ ...V
37
+ }, $) => {
38
+ const { t: i } = se(), q = A ?? i("datePicker.selectMultipleMonths"), [c, o] = s.useState(!1), u = s.useRef(!1), m = s.useRef(null), g = ae(), { footerFlashKey: B, footerFlashTarget: H, popoverHandlers: G } = le(l, c, g, m), [p, f] = s.useState(t);
40
39
  s.useEffect(() => {
41
40
  f(t);
42
41
  }, [c, t]);
43
- const Q = (e) => {
44
- const a = ae(e);
42
+ const J = (e) => {
43
+ const a = ce(e);
45
44
  f(a), l || h?.(a);
46
- }, U = (e) => {
47
- const a = ce(e, p);
45
+ }, Q = (e) => {
46
+ const a = ie(e, p);
48
47
  h?.(a), o(!1);
49
48
  }, M = () => {
50
49
  f(t), o(!1);
51
50
  }, P = () => {
52
51
  f(void 0), h?.(void 0), l || o(!1);
53
- }, W = t && t.length > 0 ? t.length === 1 ? `${t[0].month + 1}/${t[0].year}` : i("datePicker.monthsSelected", { count: t.length }) : "", X = (e) => {
52
+ }, U = t && t.length > 0 ? t.length === 1 ? `${t[0].month + 1}/${t[0].year}` : i("datePicker.monthsSelected", { count: t.length }) : "", W = (e) => {
54
53
  r || !e && l || o(e);
55
- }, Y = s.useCallback(() => {
54
+ }, X = s.useCallback(() => {
56
55
  const e = p?.length ?? 0, a = t?.length ?? 0;
57
56
  return e === a && (p ?? []).every(
58
57
  (C, k) => C.month === t?.[k]?.month && C.year === t?.[k]?.year
@@ -61,31 +60,31 @@ const ue = s.forwardRef(
61
60
  return s.useLayoutEffect(() => {
62
61
  g.current = {
63
62
  onDismiss: M,
64
- resolveFlash: Y
63
+ resolveFlash: X
65
64
  };
66
- }), /* @__PURE__ */ d(ne, { open: r ? !1 : c, onOpenChange: X, children: [
67
- /* @__PURE__ */ n(re, { asChild: !0, children: /* @__PURE__ */ n(
65
+ }), /* @__PURE__ */ d(te, { open: r ? !1 : c, onOpenChange: W, children: [
66
+ /* @__PURE__ */ n(ne, { asChild: !0, children: /* @__PURE__ */ n(
68
67
  "div",
69
68
  {
70
69
  ref: m,
71
- onPointerDown: (e) => fe({
70
+ onPointerDown: (e) => pe({
72
71
  disabled: r,
73
72
  event: e,
74
73
  onOpen: () => o(!0),
75
74
  focusField: () => m.current?.querySelector("input")?.focus()
76
75
  }),
77
76
  children: /* @__PURE__ */ n(
78
- te,
77
+ ee,
79
78
  {
80
- ref: q,
81
- value: W,
82
- placeholder: B,
79
+ ref: $,
80
+ value: U,
81
+ placeholder: q,
83
82
  readOnly: !0,
84
83
  disabled: r,
85
84
  onClick: () => {
86
85
  !r && !c && o(!0);
87
86
  },
88
- className: ee("cursor-pointer", S),
87
+ className: _("cursor-pointer", S),
89
88
  suffix: /* @__PURE__ */ d("div", { className: "flex items-center gap-1", children: [
90
89
  t && t.length > 0 && !r && /* @__PURE__ */ d(D, { children: [
91
90
  /* @__PURE__ */ n(b, { asChild: !0, children: /* @__PURE__ */ n(
@@ -98,7 +97,7 @@ const ue = s.forwardRef(
98
97
  e.stopPropagation(), P();
99
98
  },
100
99
  className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
101
- children: /* @__PURE__ */ n(Z, { className: "size-3 hover:text-content" })
100
+ children: /* @__PURE__ */ n(Y, { className: "size-3 hover:text-content" })
102
101
  }
103
102
  ) }),
104
103
  /* @__PURE__ */ n(x, { variant: "tertiary", side: "top", children: i("calendar.clear") })
@@ -118,19 +117,19 @@ const ue = s.forwardRef(
118
117
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), r || (u.current = !0, o(!c)));
119
118
  },
120
119
  className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer",
121
- children: /* @__PURE__ */ n(_, { className: "h-4 w-4 text-secondary-foreground" })
120
+ children: /* @__PURE__ */ n(Z, { className: "h-4 w-4 text-secondary-foreground" })
122
121
  }
123
122
  ) }),
124
123
  /* @__PURE__ */ n(x, { variant: "tertiary", side: "top", children: i("datePicker.selectMultipleMonths") })
125
124
  ] })
126
125
  ] }),
127
- ...$
126
+ ...V
128
127
  }
129
128
  )
130
129
  }
131
130
  ) }),
132
131
  /* @__PURE__ */ n(
133
- oe,
132
+ re,
134
133
  {
135
134
  className: "w-auto p-0",
136
135
  align: "start",
@@ -138,26 +137,26 @@ const ue = s.forwardRef(
138
137
  onOpenAutoFocus: (e) => {
139
138
  u.current || e.preventDefault(), u.current = !1;
140
139
  },
141
- ...J,
140
+ ...G,
142
141
  children: /* @__PURE__ */ n(
143
- se,
142
+ oe,
144
143
  {
145
144
  pickerType: "month",
146
145
  monthMode: "multiple",
147
146
  selectedMonths: p,
148
- footerFlashKey: H,
149
- footerFlashTarget: G,
150
- onMonthSelect: Q,
151
- disabled: de(y, N),
147
+ footerFlashKey: B,
148
+ footerFlashTarget: H,
149
+ onMonthSelect: J,
150
+ disabled: fe(y, N),
152
151
  startMonth: R,
153
152
  endMonth: T,
154
153
  defaultMonth: y,
155
154
  showFooter: l,
156
- onApply: U,
155
+ onApply: Q,
157
156
  onCancel: M,
158
157
  onClear: P,
159
158
  captionLayout: "dropdown",
160
- ...he({
159
+ ...de({
161
160
  calendarKind: I,
162
161
  fiscalMode: O,
163
162
  granularity: j,
@@ -166,9 +165,8 @@ const ue = s.forwardRef(
166
165
  fiscalConfig: E,
167
166
  showPresets: F,
168
167
  showPeriodBoundaries: K,
169
- autoNavigateToAvailable: z,
170
- comparison: L,
171
- onComparisonChange: V
168
+ comparison: z,
169
+ onComparisonChange: L
172
170
  })
173
171
  }
174
172
  )
@@ -177,7 +175,7 @@ const ue = s.forwardRef(
177
175
  ] });
178
176
  }
179
177
  );
180
- ue.displayName = "MultiMonthPicker";
178
+ he.displayName = "MultiMonthPicker";
181
179
  export {
182
- ue as MultiMonthPicker
180
+ he as MultiMonthPicker
183
181
  };
@@ -1,18 +1,18 @@
1
1
  import { jsx as r, jsxs as g } from "react/jsx-runtime";
2
2
  import * as n from "react";
3
- import { Cross as Z, CalendarMonth as _ } from "impact-nova-icons";
4
- import { cn as $ } from "../../../lib/utils.js";
5
- import { Input as ee } from "../input/input.js";
6
- import { Calendar as te } from "../../data-display/calendar/calendar.js";
3
+ import { Cross as Y, CalendarMonth as Z } from "impact-nova-icons";
4
+ import { cn as _ } from "../../../lib/utils.js";
5
+ import { Input as $ } from "../input/input.js";
6
+ import { Calendar as ee } from "../../data-display/calendar/calendar.js";
7
7
  import { Tooltip as M, TooltipTrigger as x, TooltipContent as b } from "../../feedback/tooltip/tooltip.js";
8
- import { useImpactNovaI18n as re } from "../../../i18n/use-impact-nova-i18n.js";
9
- import { buildDateBoundsMatcher as ne } from "../../../lib/date-bounds-matcher.js";
10
- import { fiscalCalendarPassThrough as oe } from "./fiscal-pass-through.js";
11
- import { DatePickerShell as ae } from "./date-picker-shell.js";
12
- import { usePickerDismissActionsRef as ie, usePickerFooterDismissNudge as ce, handleReadonlyPickerKeyDown as se, handlePickerSurfacePointerDown as le } from "./date-input-behavior.js";
13
- import { formatQuarterInput as pe } from "../../data-display/calendar/calendar-fiscal-labels.js";
14
- import { viewMonthFromQuarter as ue } from "../../data-display/calendar/calendar-quarter-utils.js";
15
- const fe = n.forwardRef(
8
+ import { useImpactNovaI18n as te } from "../../../i18n/use-impact-nova-i18n.js";
9
+ import { buildDateBoundsMatcher as re } from "../../../lib/date-bounds-matcher.js";
10
+ import { fiscalCalendarPassThrough as ne } from "./fiscal-pass-through.js";
11
+ import { DatePickerShell as oe } from "./date-picker-shell.js";
12
+ import { usePickerDismissActionsRef as ae, usePickerFooterDismissNudge as ie, handleReadonlyPickerKeyDown as ce, handlePickerSurfacePointerDown as se } from "./date-input-behavior.js";
13
+ import { formatQuarterInput as le } from "../../data-display/calendar/calendar-fiscal-labels.js";
14
+ import { viewMonthFromQuarter as pe } from "../../data-display/calendar/calendar-quarter-utils.js";
15
+ const ue = n.forwardRef(
16
16
  ({
17
17
  value: t,
18
18
  onChange: u,
@@ -32,16 +32,15 @@ const fe = n.forwardRef(
32
32
  fiscalConfig: K,
33
33
  showPresets: j,
34
34
  showPeriodBoundaries: F,
35
- autoNavigateToAvailable: z,
36
- ...E
37
- }, H) => {
38
- const { t: a } = re(), L = R ?? a("datePicker.selectMultipleQuarters"), f = n.useRef(null), y = n.useRef(null);
39
- n.useImperativeHandle(H, () => f.current);
40
- const [i, c] = n.useState(!1), d = n.useRef(!1), k = ie(), { footerFlashKey: V, footerFlashTarget: q, popoverHandlers: B } = ce(s, i, k, y), [P, l] = n.useState(t), [G, J] = n.useState(ue(t?.[0]));
35
+ ...z
36
+ }, E) => {
37
+ const { t: a } = te(), H = R ?? a("datePicker.selectMultipleQuarters"), f = n.useRef(null), y = n.useRef(null);
38
+ n.useImperativeHandle(E, () => f.current);
39
+ const [i, c] = n.useState(!1), d = n.useRef(!1), k = ae(), { footerFlashKey: L, footerFlashTarget: V, popoverHandlers: q } = ie(s, i, k, y), [P, l] = n.useState(t), [B, G] = n.useState(pe(t?.[0]));
41
40
  n.useEffect(() => {
42
41
  i || l(t);
43
42
  }, [i, t]);
44
- const m = n.useCallback(() => c(!1), []), U = oe({
43
+ const m = n.useCallback(() => c(!1), []), J = ne({
45
44
  calendarKind: I,
46
45
  fiscalMode: O,
47
46
  granularity: T,
@@ -49,12 +48,11 @@ const fe = n.forwardRef(
49
48
  fiscalYearStartMonth: v,
50
49
  fiscalConfig: K,
51
50
  showPresets: j,
52
- showPeriodBoundaries: F,
53
- autoNavigateToAvailable: z
54
- }), W = (e) => {
51
+ showPeriodBoundaries: F
52
+ }), U = (e) => {
55
53
  const p = Array.isArray(e) && e.length > 0 ? e : void 0;
56
54
  l(p), s || u?.(p);
57
- }, X = () => {
55
+ }, W = () => {
58
56
  u?.(P), m();
59
57
  }, h = () => {
60
58
  l(t), m();
@@ -64,9 +62,9 @@ const fe = n.forwardRef(
64
62
  n.useLayoutEffect(() => {
65
63
  k.current = { onDismiss: h, resolveFlash: () => "cancel" };
66
64
  });
67
- const Y = t && t.length > 0 ? t.length === 1 ? pe(t[0]) : a("datePicker.quartersSelected", { count: t.length }) : "";
65
+ const X = t && t.length > 0 ? t.length === 1 ? le(t[0]) : a("datePicker.quartersSelected", { count: t.length }) : "";
68
66
  return /* @__PURE__ */ r(
69
- ae,
67
+ oe,
70
68
  {
71
69
  open: i,
72
70
  disabled: o,
@@ -77,26 +75,26 @@ const fe = n.forwardRef(
77
75
  onOpenAutoFocus: (e) => {
78
76
  d.current || e.preventDefault(), d.current = !1;
79
77
  },
80
- popoverHandlers: B,
78
+ popoverHandlers: q,
81
79
  trigger: /* @__PURE__ */ r(
82
80
  "div",
83
81
  {
84
82
  ref: y,
85
83
  "data-component": "multi-quarter-picker",
86
84
  "data-state": i ? "open" : "closed",
87
- onPointerDown: (e) => le({
85
+ onPointerDown: (e) => se({
88
86
  disabled: o,
89
87
  event: e,
90
88
  onOpen: () => c(!0),
91
89
  focusField: () => f.current?.focus()
92
90
  }),
93
91
  children: /* @__PURE__ */ r(
94
- ee,
92
+ $,
95
93
  {
96
94
  ref: f,
97
- value: Y,
95
+ value: X,
98
96
  readOnly: !0,
99
- onKeyDown: (e) => se(e, {
97
+ onKeyDown: (e) => ce(e, {
100
98
  disabled: o,
101
99
  open: i,
102
100
  onOpen: () => c(!0),
@@ -106,10 +104,10 @@ const fe = n.forwardRef(
106
104
  }
107
105
  }),
108
106
  onClick: () => !o && c(!0),
109
- placeholder: L,
107
+ placeholder: H,
110
108
  disabled: o,
111
109
  "data-form-control": "input",
112
- className: $("cursor-pointer", A),
110
+ className: _("cursor-pointer", A),
113
111
  suffix: /* @__PURE__ */ g("div", { className: "flex items-center gap-1", children: [
114
112
  t && t.length > 0 && !o ? /* @__PURE__ */ g(M, { children: [
115
113
  /* @__PURE__ */ r(x, { asChild: !0, children: /* @__PURE__ */ r(
@@ -122,7 +120,7 @@ const fe = n.forwardRef(
122
120
  e.stopPropagation(), C();
123
121
  },
124
122
  className: "inline-flex size-4 items-center justify-center border-none bg-transparent p-0",
125
- children: /* @__PURE__ */ r(Z, { className: "size-3 hover:text-content" })
123
+ children: /* @__PURE__ */ r(Y, { className: "size-3 hover:text-content" })
126
124
  }
127
125
  ) }),
128
126
  /* @__PURE__ */ r(b, { variant: "tertiary", side: "top", children: a("calendar.clear") })
@@ -139,43 +137,43 @@ const fe = n.forwardRef(
139
137
  e.stopPropagation(), o || c((p) => !p);
140
138
  },
141
139
  className: "inline-flex items-center justify-center border-none bg-transparent p-0",
142
- children: /* @__PURE__ */ r(_, { className: "h-4 w-4 text-secondary-foreground" })
140
+ children: /* @__PURE__ */ r(Z, { className: "h-4 w-4 text-secondary-foreground" })
143
141
  }
144
142
  ) }),
145
143
  /* @__PURE__ */ r(b, { variant: "tertiary", side: "top", children: a("datePicker.selectMultipleQuarters") })
146
144
  ] })
147
145
  ] }),
148
- ...E
146
+ ...z
149
147
  }
150
148
  )
151
149
  }
152
150
  ),
153
151
  children: /* @__PURE__ */ r(
154
- te,
152
+ ee,
155
153
  {
156
154
  pickerType: "quarter",
157
155
  monthMode: "multiple",
158
156
  selectedQuarters: P,
159
- footerFlashKey: V,
160
- footerFlashTarget: q,
161
- onQuarterSelect: W,
162
- month: G,
163
- onMonthChange: J,
164
- disabled: ne(D, Q),
157
+ footerFlashKey: L,
158
+ footerFlashTarget: V,
159
+ onQuarterSelect: U,
160
+ month: B,
161
+ onMonthChange: G,
162
+ disabled: re(D, Q),
165
163
  startMonth: N,
166
164
  endMonth: S,
167
165
  showFooter: s,
168
- onApply: X,
166
+ onApply: W,
169
167
  onCancel: h,
170
168
  onClear: C,
171
- ...U
169
+ ...J
172
170
  }
173
171
  )
174
172
  }
175
173
  );
176
174
  }
177
175
  );
178
- fe.displayName = "MultiQuarterPicker";
176
+ ue.displayName = "MultiQuarterPicker";
179
177
  export {
180
- fe as MultiQuarterPicker
178
+ ue as MultiQuarterPicker
181
179
  };
@@ -1,22 +1,22 @@
1
1
  import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
2
  import * as n from "react";
3
- import { Cross as ne, CalendarMonth as oe } from "impact-nova-icons";
3
+ import { Cross as re, CalendarMonth as ne } from "impact-nova-icons";
4
4
  import { format as b } from "date-fns";
5
- import { cn as se } from "../../../lib/utils.js";
6
- import { Input as ae } from "../input/input.js";
7
- import { Popover as ie, PopoverAnchor as ce, PopoverContent as le } from "../../feedback/popover/popover.js";
8
- import { Calendar as pe } from "../../data-display/calendar/calendar.js";
5
+ import { cn as oe } from "../../../lib/utils.js";
6
+ import { Input as se } from "../input/input.js";
7
+ import { Popover as ae, PopoverAnchor as ie, PopoverContent as ce } from "../../feedback/popover/popover.js";
8
+ import { Calendar as le } from "../../data-display/calendar/calendar.js";
9
9
  import { Tooltip as x, TooltipTrigger as A, TooltipContent as M } from "../../feedback/tooltip/tooltip.js";
10
- import { useImpactNovaI18n as de } from "../../../i18n/use-impact-nova-i18n.js";
11
- import { getDateFnsLocale as fe } from "../../../i18n/getDateFnsLocale.js";
12
- import { coerceWeekArrayApply as me, coerceWeekArray as ue } from "./calendar-selection-adapters.js";
13
- import { usePickerDismissActionsRef as he, usePickerFooterDismissNudge as ye, handlePickerSurfacePointerDown as ke } from "./date-input-behavior.js";
14
- import { buildDateBoundsMatcher as ge } from "../../../lib/date-bounds-matcher.js";
15
- import { fiscalCalendarPassThrough as Pe } from "./fiscal-pass-through.js";
16
- const Ce = (t, a = "MM/dd/yyyy", i) => {
10
+ import { useImpactNovaI18n as pe } from "../../../i18n/use-impact-nova-i18n.js";
11
+ import { getDateFnsLocale as de } from "../../../i18n/getDateFnsLocale.js";
12
+ import { coerceWeekArrayApply as fe, coerceWeekArray as me } from "./calendar-selection-adapters.js";
13
+ import { usePickerDismissActionsRef as ue, usePickerFooterDismissNudge as he, handlePickerSurfacePointerDown as ye } from "./date-input-behavior.js";
14
+ import { buildDateBoundsMatcher as ke } from "../../../lib/date-bounds-matcher.js";
15
+ import { fiscalCalendarPassThrough as ge } from "./fiscal-pass-through.js";
16
+ const Pe = (t, a = "MM/dd/yyyy", i) => {
17
17
  const h = b(t.startDate, a, i ? { locale: i } : {}), y = b(t.endDate, a, i ? { locale: i } : {});
18
18
  return `${h} - ${y}`;
19
- }, De = n.forwardRef(
19
+ }, Ce = n.forwardRef(
20
20
  ({
21
21
  value: t,
22
22
  onChange: a,
@@ -36,63 +36,62 @@ const Ce = (t, a = "MM/dd/yyyy", i) => {
36
36
  weekStartsOn: j = 1,
37
37
  showPresets: F,
38
38
  showPeriodBoundaries: E,
39
- autoNavigateToAvailable: K,
40
- comparison: $,
41
- onComparisonChange: z,
39
+ comparison: K,
40
+ onComparisonChange: $,
42
41
  disabled: o,
43
- className: V,
44
- ...q
45
- }, B) => {
46
- const { locale: P, t: c } = de(), H = n.useMemo(() => fe(P), [P]), G = h ?? c("datePicker.selectWeeks"), [l, s] = n.useState(!1), k = n.useRef(!1), g = n.useRef(null), C = he(), { footerFlashKey: J, footerFlashTarget: Q, popoverHandlers: U } = ye(d, l, C, g), [f, m] = n.useState(t);
42
+ className: z,
43
+ ...V
44
+ }, q) => {
45
+ const { locale: P, t: c } = pe(), B = n.useMemo(() => de(P), [P]), H = h ?? c("datePicker.selectWeeks"), [l, s] = n.useState(!1), k = n.useRef(!1), g = n.useRef(null), C = ue(), { footerFlashKey: G, footerFlashTarget: J, popoverHandlers: Q } = he(d, l, C, g), [f, m] = n.useState(t);
47
46
  n.useEffect(() => {
48
47
  m(t);
49
48
  }, [l, t]);
50
- const X = (e) => {
51
- const p = ue(e);
49
+ const U = (e) => {
50
+ const p = me(e);
52
51
  m(p), d || a?.(p);
53
- }, Y = (e) => {
54
- const p = me(e, f);
52
+ }, X = (e) => {
53
+ const p = fe(e, f);
55
54
  a?.(p), s(!1);
56
55
  }, D = () => {
57
56
  m(t), s(!1);
58
57
  }, W = () => {
59
58
  m(void 0), a?.(void 0), d || s(!1);
60
- }, Z = t && t.length > 0 ? t.length === 1 ? Ce(t[0], i, H) : `${t.length} weeks selected` : "", _ = (e) => {
59
+ }, Y = t && t.length > 0 ? t.length === 1 ? Pe(t[0], i, B) : `${t.length} weeks selected` : "", Z = (e) => {
61
60
  o || !e && d || s(e);
62
- }, ee = n.useCallback(() => {
61
+ }, _ = n.useCallback(() => {
63
62
  const e = f?.length ?? 0, p = t?.length ?? 0;
64
63
  return e === p && (f ?? []).every(
65
- (te, re) => te.startDate.getTime() === t?.[re]?.startDate.getTime()
64
+ (ee, te) => ee.startDate.getTime() === t?.[te]?.startDate.getTime()
66
65
  ) ? "dismiss" : e > 0 ? "apply" : "cancel";
67
66
  }, [f, t]);
68
67
  return n.useLayoutEffect(() => {
69
68
  C.current = {
70
69
  onDismiss: D,
71
- resolveFlash: ee
70
+ resolveFlash: _
72
71
  };
73
- }), /* @__PURE__ */ u(ie, { open: o ? !1 : l, onOpenChange: _, children: [
74
- /* @__PURE__ */ r(ce, { asChild: !0, children: /* @__PURE__ */ r(
72
+ }), /* @__PURE__ */ u(ae, { open: o ? !1 : l, onOpenChange: Z, children: [
73
+ /* @__PURE__ */ r(ie, { asChild: !0, children: /* @__PURE__ */ r(
75
74
  "div",
76
75
  {
77
76
  ref: g,
78
- onPointerDown: (e) => ke({
77
+ onPointerDown: (e) => ye({
79
78
  disabled: o,
80
79
  event: e,
81
80
  onOpen: () => s(!0),
82
81
  focusField: () => g.current?.querySelector("input")?.focus()
83
82
  }),
84
83
  children: /* @__PURE__ */ r(
85
- ae,
84
+ se,
86
85
  {
87
- ref: B,
88
- value: Z,
89
- placeholder: G,
86
+ ref: q,
87
+ value: Y,
88
+ placeholder: H,
90
89
  readOnly: !0,
91
90
  disabled: o,
92
91
  onClick: () => {
93
92
  !o && !l && s(!0);
94
93
  },
95
- className: se("cursor-pointer", V),
94
+ className: oe("cursor-pointer", z),
96
95
  suffix: /* @__PURE__ */ u("div", { className: "flex items-center gap-1", children: [
97
96
  t && t.length > 0 && !o && /* @__PURE__ */ u(x, { children: [
98
97
  /* @__PURE__ */ r(A, { asChild: !0, children: /* @__PURE__ */ r(
@@ -105,7 +104,7 @@ const Ce = (t, a = "MM/dd/yyyy", i) => {
105
104
  e.stopPropagation(), W();
106
105
  },
107
106
  className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
108
- children: /* @__PURE__ */ r(ne, { className: "size-3 hover:text-content" })
107
+ children: /* @__PURE__ */ r(re, { className: "size-3 hover:text-content" })
109
108
  }
110
109
  ) }),
111
110
  /* @__PURE__ */ r(M, { variant: "tertiary", side: "top", children: c("calendar.clear") })
@@ -125,19 +124,19 @@ const Ce = (t, a = "MM/dd/yyyy", i) => {
125
124
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), o || (k.current = !0, s(!l)));
126
125
  },
127
126
  className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer",
128
- children: /* @__PURE__ */ r(oe, { className: "h-4 w-4 text-secondary-foreground" })
127
+ children: /* @__PURE__ */ r(ne, { className: "h-4 w-4 text-secondary-foreground" })
129
128
  }
130
129
  ) }),
131
130
  /* @__PURE__ */ r(M, { variant: "tertiary", side: "top", children: c("datePicker.selectWeeks") })
132
131
  ] })
133
132
  ] }),
134
- ...q
133
+ ...V
135
134
  }
136
135
  )
137
136
  }
138
137
  ) }),
139
138
  /* @__PURE__ */ r(
140
- le,
139
+ ce,
141
140
  {
142
141
  className: "w-auto p-0",
143
142
  align: "start",
@@ -145,21 +144,21 @@ const Ce = (t, a = "MM/dd/yyyy", i) => {
145
144
  onOpenAutoFocus: (e) => {
146
145
  k.current || e.preventDefault(), k.current = !1;
147
146
  },
148
- ...U,
147
+ ...Q,
149
148
  children: /* @__PURE__ */ r(
150
- pe,
149
+ le,
151
150
  {
152
151
  pickerType: "week",
153
152
  weekMode: "multiple",
154
153
  selectedWeeks: f,
155
- footerFlashKey: J,
156
- footerFlashTarget: Q,
157
- onWeekSelect: X,
158
- disabled: ge(y, N),
154
+ footerFlashKey: G,
155
+ footerFlashTarget: J,
156
+ onWeekSelect: U,
157
+ disabled: ke(y, N),
159
158
  startMonth: T,
160
159
  endMonth: R,
161
160
  showFooter: d,
162
- ...Pe({
161
+ ...ge({
163
162
  calendarKind: S,
164
163
  fiscalMode: v,
165
164
  granularity: w,
@@ -169,11 +168,10 @@ const Ce = (t, a = "MM/dd/yyyy", i) => {
169
168
  weekStartsOn: j,
170
169
  showPresets: F,
171
170
  showPeriodBoundaries: E,
172
- autoNavigateToAvailable: K,
173
- comparison: $,
174
- onComparisonChange: z
171
+ comparison: K,
172
+ onComparisonChange: $
175
173
  }),
176
- onApply: Y,
174
+ onApply: X,
177
175
  onCancel: D,
178
176
  onClear: W,
179
177
  captionLayout: "dropdown"
@@ -184,7 +182,7 @@ const Ce = (t, a = "MM/dd/yyyy", i) => {
184
182
  ] });
185
183
  }
186
184
  );
187
- De.displayName = "MultiWeekPicker";
185
+ Ce.displayName = "MultiWeekPicker";
188
186
  export {
189
- De as MultiWeekPicker
187
+ Ce as MultiWeekPicker
190
188
  };