impact-nova 2.5.13 → 2.5.14

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 (148) hide show
  1. package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +0 -1
  2. package/dist/components/data/data-table/build-column-tree-from-grid.js +50 -55
  3. package/dist/components/data/data-table/data-table-column-apply.d.ts +0 -2
  4. package/dist/components/data/data-table/data-table-column-apply.js +73 -84
  5. package/dist/components/data/data-table/data-table-column-list.js +64 -94
  6. package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +6 -12
  7. package/dist/components/data/data-table/data-table-column-tree-cache.js +131 -250
  8. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +0 -5
  9. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +11 -28
  10. package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +0 -10
  11. package/dist/components/data/data-table/use-data-table-column-list-sync.js +196 -250
  12. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
  13. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
  14. package/dist/components/data/nested-list/components/NestedListContent.d.ts +2 -10
  15. package/dist/components/data/nested-list/components/NestedListContent.js +138 -253
  16. package/dist/components/data/nested-list/components/SortableItem.d.ts +1 -2
  17. package/dist/components/data/nested-list/components/SortableItem.js +60 -62
  18. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.d.ts +20 -10
  19. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.js +233 -44
  20. package/dist/components/data/nested-list/nested-list-constants.d.ts +1 -4
  21. package/dist/components/data/nested-list/nested-list-constants.js +4 -10
  22. package/dist/components/data/nested-list/nested-list.js +336 -322
  23. package/dist/components/data/nested-list/nested-list.types.d.ts +0 -17
  24. package/dist/components/data-display/calendar/calendar-apply-validation.d.ts +2 -0
  25. package/dist/components/data-display/calendar/calendar-apply-validation.js +64 -67
  26. package/dist/components/data-display/calendar/calendar-available-view.d.ts +27 -0
  27. package/dist/components/data-display/calendar/calendar-available-view.js +85 -0
  28. package/dist/components/data-display/calendar/calendar-config.js +1 -1
  29. package/dist/components/data-display/calendar/calendar-day-picker-components.d.ts +4 -2
  30. package/dist/components/data-display/calendar/calendar-day-picker-components.js +234 -164
  31. package/dist/components/data-display/calendar/calendar-day-picker-view.js +77 -76
  32. package/dist/components/data-display/calendar/calendar-fiscal-day-cell.d.ts +9 -0
  33. package/dist/components/data-display/calendar/calendar-fiscal-day-cell.js +45 -0
  34. package/dist/components/data-display/calendar/calendar-fiscal-period-nav.d.ts +6 -0
  35. package/dist/components/data-display/calendar/calendar-fiscal-period-nav.js +34 -18
  36. package/dist/components/data-display/calendar/calendar-footer.js +21 -21
  37. package/dist/components/data-display/calendar/calendar-injected-week-row.d.ts +5 -0
  38. package/dist/components/data-display/calendar/calendar-injected-week-row.js +92 -0
  39. package/dist/components/data-display/calendar/calendar-leading-week.utils.d.ts +16 -0
  40. package/dist/components/data-display/calendar/calendar-leading-week.utils.js +51 -0
  41. package/dist/components/data-display/calendar/calendar-month-picker-panel.js +50 -49
  42. package/dist/components/data-display/calendar/calendar-month-utils.d.ts +5 -0
  43. package/dist/components/data-display/calendar/calendar-month-utils.js +85 -64
  44. package/dist/components/data-display/calendar/calendar-orphan-week.d.ts +23 -0
  45. package/dist/components/data-display/calendar/calendar-padding-week.utils.d.ts +3 -1
  46. package/dist/components/data-display/calendar/calendar-padding-week.utils.js +7 -5
  47. package/dist/components/data-display/calendar/calendar-period-cell.js +45 -46
  48. package/dist/components/data-display/calendar/calendar-quarter-panes.js +33 -31
  49. package/dist/components/data-display/calendar/calendar-selection-appearance.d.ts +10 -0
  50. package/dist/components/data-display/calendar/calendar-selection-appearance.js +53 -39
  51. package/dist/components/data-display/calendar/calendar-selection.d.ts +25 -0
  52. package/dist/components/data-display/calendar/calendar-selection.js +52 -23
  53. package/dist/components/data-display/calendar/calendar-week-number-cell.d.ts +2 -1
  54. package/dist/components/data-display/calendar/calendar-week-number-cell.js +59 -45
  55. package/dist/components/data-display/calendar/calendar-week-utils.d.ts +15 -4
  56. package/dist/components/data-display/calendar/calendar-week-utils.js +59 -50
  57. package/dist/components/data-display/calendar/calendar-year-panes.d.ts +3 -0
  58. package/dist/components/data-display/calendar/calendar-year-panes.js +53 -49
  59. package/dist/components/data-display/calendar/calendar.js +146 -143
  60. package/dist/components/data-display/calendar/calendar.types.d.ts +5 -0
  61. package/dist/components/data-display/calendar/use-calendar-day-picker-config.d.ts +2 -1
  62. package/dist/components/data-display/calendar/use-calendar-day-picker-config.js +79 -74
  63. package/dist/components/data-display/calendar/use-calendar-state.d.ts +3 -1
  64. package/dist/components/data-display/calendar/use-calendar-state.js +394 -314
  65. package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
  66. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  67. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  68. package/dist/components/forms/date-picker/date-picker.js +60 -58
  69. package/dist/components/forms/date-picker/date-picker.types.d.ts +5 -0
  70. package/dist/components/forms/date-picker/date-range-picker.js +66 -64
  71. package/dist/components/forms/date-picker/fiscal-pass-through.d.ts +1 -0
  72. package/dist/components/forms/date-picker/fiscal-pass-through.js +3 -2
  73. package/dist/components/forms/date-picker/fiscal-picker-fixtures.d.ts +17 -0
  74. package/dist/components/forms/date-picker/month-picker.js +61 -59
  75. package/dist/components/forms/date-picker/month-range-picker.js +63 -61
  76. package/dist/components/forms/date-picker/multi-date-picker.js +51 -49
  77. package/dist/components/forms/date-picker/multi-month-picker.js +49 -47
  78. package/dist/components/forms/date-picker/multi-quarter-picker.js +51 -47
  79. package/dist/components/forms/date-picker/multi-week-picker.js +53 -51
  80. package/dist/components/forms/date-picker/multi-year-picker.js +53 -49
  81. package/dist/components/forms/date-picker/quarter-picker.js +51 -47
  82. package/dist/components/forms/date-picker/quarter-range-picker.js +50 -46
  83. package/dist/components/forms/date-picker/week-picker.js +130 -126
  84. package/dist/components/forms/date-picker/week-range-picker.js +159 -155
  85. package/dist/components/forms/date-picker/year-picker.js +52 -48
  86. package/dist/components/forms/date-picker/year-range-picker.js +52 -48
  87. package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
  88. package/dist/components/forms/select/components/Submenu.js +3 -2
  89. package/dist/form-react/Fields/DateInputField.js +51 -50
  90. package/dist/form-react/Fields/DateRangeField.js +14 -13
  91. package/dist/form-react/Fields/MonthRangeField.js +29 -28
  92. package/dist/form-react/Fields/MultiMonthPickerField.js +13 -12
  93. package/dist/form-react/Fields/MultiWeekPickerField.js +35 -27
  94. package/dist/form-react/Fields/MultiYearPickerField.d.ts +8 -0
  95. package/dist/form-react/Fields/MultiYearPickerField.js +57 -0
  96. package/dist/form-react/Fields/WeekRangePicker.js +33 -32
  97. package/dist/form-react/Fields/YearPickerField.d.ts +8 -0
  98. package/dist/form-react/Fields/YearPickerField.js +57 -0
  99. package/dist/form-react/Fields/YearRangePickerField.d.ts +8 -0
  100. package/dist/form-react/Fields/YearRangePickerField.js +57 -0
  101. package/dist/form-react/registry/defaultFieldRegistrations.d.ts +1 -1
  102. package/dist/form-react/registry/defaultFieldRegistrations.js +16 -13
  103. package/dist/form-react/types/fields.types.d.ts +69 -1
  104. package/dist/form-react/types/fieldsOutput.types.d.ts +8 -2
  105. package/dist/form-react/utils/fieldDefaults.utils.js +1 -1
  106. package/dist/impact-nova-components.css +13 -6
  107. package/dist/impact-nova.css +1 -1
  108. package/dist/lib/fiscal-calendar/index.d.ts +2 -2
  109. package/dist/lib/fiscal-calendar/index.js +26 -28
  110. package/dist/lib/fiscal-calendar/types.d.ts +0 -7
  111. package/dist/lib/fiscal-calendar/week-selection.d.ts +3 -4
  112. package/dist/lib/fiscal-calendar/week-selection.js +52 -79
  113. package/dist/llms/rules/ag-grid.js +1 -1
  114. package/dist/llms/rules/installation.js +1 -1
  115. package/dist/llms/rules/requirements.js +1 -1
  116. package/package.json +1 -1
  117. package/dist/components/data/data-table/column-picker-authority.d.ts +0 -34
  118. package/dist/components/data/data-table/column-picker-authority.js +0 -116
  119. package/dist/components/data/data-table/column-picker-drop-validation.d.ts +0 -7
  120. package/dist/components/data/data-table/column-picker-drop-validation.js +0 -37
  121. package/dist/components/data/data-table/data-table-column-list-tree-apply.d.ts +0 -10
  122. package/dist/components/data/data-table/data-table-column-list-tree-apply.js +0 -79
  123. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +0 -26
  124. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +0 -195
  125. package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +0 -1
  126. package/dist/components/data/data-table/data-table-picker-column-eligibility.js +0 -7
  127. package/dist/components/data/data-table/reconcile-column-tree-from-grid.d.ts +0 -12
  128. package/dist/components/data/data-table/reconcile-column-tree-from-grid.js +0 -12
  129. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.d.ts +0 -24
  130. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.js +0 -128
  131. package/dist/components/data/nested-list/nested-list-display-utils.d.ts +0 -11
  132. package/dist/components/data/nested-list/nested-list-display-utils.js +0 -74
  133. package/dist/components/data/nested-list/nested-list-drop-engine.d.ts +0 -31
  134. package/dist/components/data/nested-list/nested-list-drop-engine.js +0 -209
  135. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.d.ts +0 -26
  136. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.js +0 -67
  137. package/dist/components/data/nested-list/nested-list-item-tree-mutations.d.ts +0 -4
  138. package/dist/components/data/nested-list/nested-list-item-tree-mutations.js +0 -43
  139. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.d.ts +0 -3
  140. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.js +0 -34
  141. package/dist/components/data/nested-list/nested-list-row-estimates.d.ts +0 -9
  142. package/dist/components/data/nested-list/nested-list-row-estimates.js +0 -14
  143. package/dist/components/data/nested-list/nested-list-scroll-anchor.d.ts +0 -36
  144. package/dist/components/data/nested-list/nested-list-scroll-anchor.js +0 -47
  145. package/dist/components/data/nested-list/nested-list-virtual-drop.d.ts +0 -59
  146. package/dist/components/data/nested-list/nested-list-virtual-drop.js +0 -341
  147. package/dist/lib/hash/fnv1a128.d.ts +0 -16
  148. package/dist/lib/hash/fnv1a128.js +0 -21
@@ -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 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";
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";
9
9
  import { Tooltip as P, TooltipTrigger as C, TooltipContent as k } from "../../feedback/tooltip/tooltip.js";
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(
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(
17
17
  ({
18
18
  value: t,
19
19
  onChange: m,
@@ -34,60 +34,61 @@ const ye = a.forwardRef(
34
34
  fiscalConfig: O,
35
35
  showPresets: w,
36
36
  showPeriodBoundaries: E,
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);
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);
42
43
  a.useEffect(() => {
43
44
  d(t);
44
45
  }, [i, t]);
45
- const J = (e) => {
46
- const c = pe(e);
46
+ const Q = (e) => {
47
+ const c = de(e);
47
48
  d(c), l || m?.(c);
48
- }, Q = (e) => {
49
- const c = le(e, p);
49
+ }, U = (e) => {
50
+ const c = pe(e, p);
50
51
  m?.(c), n(!1);
51
52
  }, g = () => {
52
53
  d(t), n(!1);
53
54
  }, D = () => {
54
55
  d(void 0), m?.(void 0), l || n(!1);
55
- }, U = t && t.length > 0 ? t.length === 1 ? ee(t[0], x, { locale: B }) : `${t.length} dates selected` : "", W = a.useCallback(() => {
56
+ }, W = t && t.length > 0 ? t.length === 1 ? te(t[0], x, { locale: H }) : `${t.length} dates selected` : "", X = a.useCallback(() => {
56
57
  const e = p?.length ?? 0, c = t?.length ?? 0;
57
58
  return e === c && (p ?? []).every(
58
- (X, Y) => X.getTime() === t?.[Y]?.getTime()
59
+ (Y, Z) => Y.getTime() === t?.[Z]?.getTime()
59
60
  ) ? "dismiss" : e > 0 ? "apply" : "cancel";
60
61
  }, [p, t]);
61
62
  return a.useLayoutEffect(() => {
62
63
  y.current = {
63
64
  onDismiss: g,
64
- resolveFlash: W
65
+ resolveFlash: X
65
66
  };
66
- }), /* @__PURE__ */ f(oe, { open: o ? !1 : i, onOpenChange: (e) => {
67
+ }), /* @__PURE__ */ f(ne, { open: o ? !1 : i, onOpenChange: (e) => {
67
68
  o || !e && l || n(e);
68
69
  }, children: [
69
- /* @__PURE__ */ r(ne, { asChild: !0, children: /* @__PURE__ */ r(
70
+ /* @__PURE__ */ r(ae, { asChild: !0, children: /* @__PURE__ */ r(
70
71
  "div",
71
72
  {
72
73
  ref: u,
73
- onPointerDown: (e) => me({
74
+ onPointerDown: (e) => ue({
74
75
  disabled: o,
75
76
  event: e,
76
77
  onOpen: () => n(!0),
77
78
  focusField: () => u.current?.querySelector("input")?.focus()
78
79
  }),
79
80
  children: /* @__PURE__ */ r(
80
- re,
81
+ oe,
81
82
  {
82
- ref: q,
83
- value: U,
84
- placeholder: H,
83
+ ref: B,
84
+ value: W,
85
+ placeholder: V,
85
86
  readOnly: !0,
86
87
  disabled: o,
87
88
  onClick: () => {
88
89
  !o && !i && n(!0);
89
90
  },
90
- className: te("cursor-pointer", R),
91
+ className: re("cursor-pointer", R),
91
92
  suffix: /* @__PURE__ */ f("div", { className: "flex items-center gap-1", children: [
92
93
  t && t.length > 0 && !o && /* @__PURE__ */ f(P, { children: [
93
94
  /* @__PURE__ */ r(C, { asChild: !0, children: /* @__PURE__ */ r(
@@ -100,7 +101,7 @@ const ye = a.forwardRef(
100
101
  e.stopPropagation(), D();
101
102
  },
102
103
  className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
103
- children: /* @__PURE__ */ r(Z, { className: "size-3 hover:text-content" })
104
+ children: /* @__PURE__ */ r(_, { className: "size-3 hover:text-content" })
104
105
  }
105
106
  ) }),
106
107
  /* @__PURE__ */ r(k, { variant: "tertiary", side: "top", children: s("calendar.clear") })
@@ -120,42 +121,42 @@ const ye = a.forwardRef(
120
121
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), o || n(!i));
121
122
  },
122
123
  className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer",
123
- children: /* @__PURE__ */ r(_, { className: "h-4 w-4 text-secondary-foreground" })
124
+ children: /* @__PURE__ */ r(ee, { className: "h-4 w-4 text-secondary-foreground" })
124
125
  }
125
126
  ) }),
126
127
  /* @__PURE__ */ r(k, { variant: "tertiary", side: "top", children: s("datePicker.selectMultipleDates") })
127
128
  ] })
128
129
  ] }),
129
- ...K
130
+ ...q
130
131
  }
131
132
  )
132
133
  }
133
134
  ) }),
134
135
  /* @__PURE__ */ r(
135
- ae,
136
+ se,
136
137
  {
137
138
  className: "w-auto p-0",
138
139
  align: "start",
139
140
  "aria-label": s("datePicker.selectMultipleDates"),
140
141
  onOpenAutoFocus: (e) => e.preventDefault(),
141
- ...G,
142
+ ...J,
142
143
  children: /* @__PURE__ */ r(
143
- se,
144
+ ie,
144
145
  {
145
146
  mode: "multiple",
146
147
  selected: p,
147
- footerFlashKey: V,
148
- footerFlashTarget: $,
149
- onSelect: J,
150
- disabled: ue(A, N),
148
+ footerFlashKey: $,
149
+ footerFlashTarget: G,
150
+ onSelect: Q,
151
+ disabled: he(A, N),
151
152
  startMonth: b,
152
153
  endMonth: T,
153
154
  showFooter: l,
154
- onApply: Q,
155
+ onApply: U,
155
156
  onCancel: g,
156
157
  onClear: D,
157
158
  captionLayout: "dropdown",
158
- ...he({
159
+ ...ye({
159
160
  calendarKind: S,
160
161
  fiscalMode: F,
161
162
  granularity: I,
@@ -164,8 +165,9 @@ const ye = a.forwardRef(
164
165
  fiscalConfig: O,
165
166
  showPresets: w,
166
167
  showPeriodBoundaries: E,
167
- comparison: v,
168
- onComparisonChange: z
168
+ autoNavigateToAvailable: v,
169
+ comparison: z,
170
+ onComparisonChange: K
169
171
  })
170
172
  }
171
173
  )
@@ -174,7 +176,7 @@ const ye = a.forwardRef(
174
176
  ] });
175
177
  }
176
178
  );
177
- ye.displayName = "MultiDatePicker";
179
+ ge.displayName = "MultiDatePicker";
178
180
  export {
179
- ye as MultiDatePicker
181
+ ge as MultiDatePicker
180
182
  };
@@ -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 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";
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";
8
8
  import { Tooltip as D, TooltipTrigger as b, TooltipContent as x } from "../../feedback/tooltip/tooltip.js";
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(
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(
15
15
  ({
16
16
  value: t,
17
17
  onChange: h,
@@ -31,27 +31,28 @@ const he = s.forwardRef(
31
31
  fiscalConfig: E,
32
32
  showPresets: F,
33
33
  showPeriodBoundaries: K,
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);
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);
39
40
  s.useEffect(() => {
40
41
  f(t);
41
42
  }, [c, t]);
42
- const J = (e) => {
43
- const a = ce(e);
43
+ const Q = (e) => {
44
+ const a = ae(e);
44
45
  f(a), l || h?.(a);
45
- }, Q = (e) => {
46
- const a = ie(e, p);
46
+ }, U = (e) => {
47
+ const a = ce(e, p);
47
48
  h?.(a), o(!1);
48
49
  }, M = () => {
49
50
  f(t), o(!1);
50
51
  }, P = () => {
51
52
  f(void 0), h?.(void 0), l || o(!1);
52
- }, U = t && t.length > 0 ? t.length === 1 ? `${t[0].month + 1}/${t[0].year}` : i("datePicker.monthsSelected", { count: t.length }) : "", W = (e) => {
53
+ }, W = t && t.length > 0 ? t.length === 1 ? `${t[0].month + 1}/${t[0].year}` : i("datePicker.monthsSelected", { count: t.length }) : "", X = (e) => {
53
54
  r || !e && l || o(e);
54
- }, X = s.useCallback(() => {
55
+ }, Y = s.useCallback(() => {
55
56
  const e = p?.length ?? 0, a = t?.length ?? 0;
56
57
  return e === a && (p ?? []).every(
57
58
  (C, k) => C.month === t?.[k]?.month && C.year === t?.[k]?.year
@@ -60,31 +61,31 @@ const he = s.forwardRef(
60
61
  return s.useLayoutEffect(() => {
61
62
  g.current = {
62
63
  onDismiss: M,
63
- resolveFlash: X
64
+ resolveFlash: Y
64
65
  };
65
- }), /* @__PURE__ */ d(te, { open: r ? !1 : c, onOpenChange: W, children: [
66
- /* @__PURE__ */ n(ne, { asChild: !0, children: /* @__PURE__ */ n(
66
+ }), /* @__PURE__ */ d(ne, { open: r ? !1 : c, onOpenChange: X, children: [
67
+ /* @__PURE__ */ n(re, { asChild: !0, children: /* @__PURE__ */ n(
67
68
  "div",
68
69
  {
69
70
  ref: m,
70
- onPointerDown: (e) => pe({
71
+ onPointerDown: (e) => fe({
71
72
  disabled: r,
72
73
  event: e,
73
74
  onOpen: () => o(!0),
74
75
  focusField: () => m.current?.querySelector("input")?.focus()
75
76
  }),
76
77
  children: /* @__PURE__ */ n(
77
- ee,
78
+ te,
78
79
  {
79
- ref: $,
80
- value: U,
81
- placeholder: q,
80
+ ref: q,
81
+ value: W,
82
+ placeholder: B,
82
83
  readOnly: !0,
83
84
  disabled: r,
84
85
  onClick: () => {
85
86
  !r && !c && o(!0);
86
87
  },
87
- className: _("cursor-pointer", S),
88
+ className: ee("cursor-pointer", S),
88
89
  suffix: /* @__PURE__ */ d("div", { className: "flex items-center gap-1", children: [
89
90
  t && t.length > 0 && !r && /* @__PURE__ */ d(D, { children: [
90
91
  /* @__PURE__ */ n(b, { asChild: !0, children: /* @__PURE__ */ n(
@@ -97,7 +98,7 @@ const he = s.forwardRef(
97
98
  e.stopPropagation(), P();
98
99
  },
99
100
  className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
100
- children: /* @__PURE__ */ n(Y, { className: "size-3 hover:text-content" })
101
+ children: /* @__PURE__ */ n(Z, { className: "size-3 hover:text-content" })
101
102
  }
102
103
  ) }),
103
104
  /* @__PURE__ */ n(x, { variant: "tertiary", side: "top", children: i("calendar.clear") })
@@ -117,19 +118,19 @@ const he = s.forwardRef(
117
118
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), r || (u.current = !0, o(!c)));
118
119
  },
119
120
  className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer",
120
- children: /* @__PURE__ */ n(Z, { className: "h-4 w-4 text-secondary-foreground" })
121
+ children: /* @__PURE__ */ n(_, { className: "h-4 w-4 text-secondary-foreground" })
121
122
  }
122
123
  ) }),
123
124
  /* @__PURE__ */ n(x, { variant: "tertiary", side: "top", children: i("datePicker.selectMultipleMonths") })
124
125
  ] })
125
126
  ] }),
126
- ...V
127
+ ...$
127
128
  }
128
129
  )
129
130
  }
130
131
  ) }),
131
132
  /* @__PURE__ */ n(
132
- re,
133
+ oe,
133
134
  {
134
135
  className: "w-auto p-0",
135
136
  align: "start",
@@ -137,26 +138,26 @@ const he = s.forwardRef(
137
138
  onOpenAutoFocus: (e) => {
138
139
  u.current || e.preventDefault(), u.current = !1;
139
140
  },
140
- ...G,
141
+ ...J,
141
142
  children: /* @__PURE__ */ n(
142
- oe,
143
+ se,
143
144
  {
144
145
  pickerType: "month",
145
146
  monthMode: "multiple",
146
147
  selectedMonths: p,
147
- footerFlashKey: B,
148
- footerFlashTarget: H,
149
- onMonthSelect: J,
150
- disabled: fe(y, N),
148
+ footerFlashKey: H,
149
+ footerFlashTarget: G,
150
+ onMonthSelect: Q,
151
+ disabled: de(y, N),
151
152
  startMonth: R,
152
153
  endMonth: T,
153
154
  defaultMonth: y,
154
155
  showFooter: l,
155
- onApply: Q,
156
+ onApply: U,
156
157
  onCancel: M,
157
158
  onClear: P,
158
159
  captionLayout: "dropdown",
159
- ...de({
160
+ ...he({
160
161
  calendarKind: I,
161
162
  fiscalMode: O,
162
163
  granularity: j,
@@ -165,8 +166,9 @@ const he = s.forwardRef(
165
166
  fiscalConfig: E,
166
167
  showPresets: F,
167
168
  showPeriodBoundaries: K,
168
- comparison: z,
169
- onComparisonChange: L
169
+ autoNavigateToAvailable: z,
170
+ comparison: L,
171
+ onComparisonChange: V
170
172
  })
171
173
  }
172
174
  )
@@ -175,7 +177,7 @@ const he = s.forwardRef(
175
177
  ] });
176
178
  }
177
179
  );
178
- he.displayName = "MultiMonthPicker";
180
+ ue.displayName = "MultiMonthPicker";
179
181
  export {
180
- he as MultiMonthPicker
182
+ ue as MultiMonthPicker
181
183
  };
@@ -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 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";
3
+ import { Cross as _, 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 { Calendar as re } 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 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(
8
+ import { useImpactNovaI18n as ne } from "../../../i18n/use-impact-nova-i18n.js";
9
+ import { buildDateBoundsMatcher as oe } from "../../../lib/date-bounds-matcher.js";
10
+ import { fiscalCalendarPassThrough as ae } from "./fiscal-pass-through.js";
11
+ import { DatePickerShell as ie } from "./date-picker-shell.js";
12
+ import { usePickerDismissActionsRef as ce, usePickerFooterDismissNudge as se, handleReadonlyPickerKeyDown as le, handlePickerSurfacePointerDown as pe } from "./date-input-behavior.js";
13
+ import { formatQuarterInput as ue } from "../../data-display/calendar/calendar-fiscal-labels.js";
14
+ import { viewMonthFromQuarter as fe } from "../../data-display/calendar/calendar-quarter-utils.js";
15
+ const de = n.forwardRef(
16
16
  ({
17
17
  value: t,
18
18
  onChange: u,
@@ -30,29 +30,33 @@ const ue = n.forwardRef(
30
30
  fiscalMonthPattern: w,
31
31
  fiscalYearStartMonth: v,
32
32
  fiscalConfig: K,
33
- showPresets: j,
34
- showPeriodBoundaries: F,
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]));
33
+ weekStartsOn: j,
34
+ showPresets: F,
35
+ showPeriodBoundaries: z,
36
+ autoNavigateToAvailable: E,
37
+ ...H
38
+ }, L) => {
39
+ const { t: a } = ne(), V = R ?? a("datePicker.selectMultipleQuarters"), f = n.useRef(null), y = n.useRef(null);
40
+ n.useImperativeHandle(L, () => f.current);
41
+ const [i, c] = n.useState(!1), d = n.useRef(!1), k = ce(), { footerFlashKey: q, footerFlashTarget: B, popoverHandlers: G } = se(s, i, k, y), [P, l] = n.useState(t), [J, U] = n.useState(fe(t?.[0]));
40
42
  n.useEffect(() => {
41
43
  i || l(t);
42
44
  }, [i, t]);
43
- const m = n.useCallback(() => c(!1), []), J = ne({
45
+ const m = n.useCallback(() => c(!1), []), W = ae({
44
46
  calendarKind: I,
45
47
  fiscalMode: O,
46
48
  granularity: T,
47
49
  fiscalMonthPattern: w,
48
50
  fiscalYearStartMonth: v,
49
51
  fiscalConfig: K,
50
- showPresets: j,
51
- showPeriodBoundaries: F
52
- }), U = (e) => {
52
+ weekStartsOn: j,
53
+ showPresets: F,
54
+ showPeriodBoundaries: z,
55
+ autoNavigateToAvailable: E
56
+ }), X = (e) => {
53
57
  const p = Array.isArray(e) && e.length > 0 ? e : void 0;
54
58
  l(p), s || u?.(p);
55
- }, W = () => {
59
+ }, Y = () => {
56
60
  u?.(P), m();
57
61
  }, h = () => {
58
62
  l(t), m();
@@ -62,9 +66,9 @@ const ue = n.forwardRef(
62
66
  n.useLayoutEffect(() => {
63
67
  k.current = { onDismiss: h, resolveFlash: () => "cancel" };
64
68
  });
65
- const X = t && t.length > 0 ? t.length === 1 ? le(t[0]) : a("datePicker.quartersSelected", { count: t.length }) : "";
69
+ const Z = t && t.length > 0 ? t.length === 1 ? ue(t[0]) : a("datePicker.quartersSelected", { count: t.length }) : "";
66
70
  return /* @__PURE__ */ r(
67
- oe,
71
+ ie,
68
72
  {
69
73
  open: i,
70
74
  disabled: o,
@@ -75,26 +79,26 @@ const ue = n.forwardRef(
75
79
  onOpenAutoFocus: (e) => {
76
80
  d.current || e.preventDefault(), d.current = !1;
77
81
  },
78
- popoverHandlers: q,
82
+ popoverHandlers: G,
79
83
  trigger: /* @__PURE__ */ r(
80
84
  "div",
81
85
  {
82
86
  ref: y,
83
87
  "data-component": "multi-quarter-picker",
84
88
  "data-state": i ? "open" : "closed",
85
- onPointerDown: (e) => se({
89
+ onPointerDown: (e) => pe({
86
90
  disabled: o,
87
91
  event: e,
88
92
  onOpen: () => c(!0),
89
93
  focusField: () => f.current?.focus()
90
94
  }),
91
95
  children: /* @__PURE__ */ r(
92
- $,
96
+ te,
93
97
  {
94
98
  ref: f,
95
- value: X,
99
+ value: Z,
96
100
  readOnly: !0,
97
- onKeyDown: (e) => ce(e, {
101
+ onKeyDown: (e) => le(e, {
98
102
  disabled: o,
99
103
  open: i,
100
104
  onOpen: () => c(!0),
@@ -104,10 +108,10 @@ const ue = n.forwardRef(
104
108
  }
105
109
  }),
106
110
  onClick: () => !o && c(!0),
107
- placeholder: H,
111
+ placeholder: V,
108
112
  disabled: o,
109
113
  "data-form-control": "input",
110
- className: _("cursor-pointer", A),
114
+ className: ee("cursor-pointer", A),
111
115
  suffix: /* @__PURE__ */ g("div", { className: "flex items-center gap-1", children: [
112
116
  t && t.length > 0 && !o ? /* @__PURE__ */ g(M, { children: [
113
117
  /* @__PURE__ */ r(x, { asChild: !0, children: /* @__PURE__ */ r(
@@ -120,7 +124,7 @@ const ue = n.forwardRef(
120
124
  e.stopPropagation(), C();
121
125
  },
122
126
  className: "inline-flex size-4 items-center justify-center border-none bg-transparent p-0",
123
- children: /* @__PURE__ */ r(Y, { className: "size-3 hover:text-content" })
127
+ children: /* @__PURE__ */ r(_, { className: "size-3 hover:text-content" })
124
128
  }
125
129
  ) }),
126
130
  /* @__PURE__ */ r(b, { variant: "tertiary", side: "top", children: a("calendar.clear") })
@@ -137,43 +141,43 @@ const ue = n.forwardRef(
137
141
  e.stopPropagation(), o || c((p) => !p);
138
142
  },
139
143
  className: "inline-flex items-center justify-center border-none bg-transparent p-0",
140
- children: /* @__PURE__ */ r(Z, { className: "h-4 w-4 text-secondary-foreground" })
144
+ children: /* @__PURE__ */ r($, { className: "h-4 w-4 text-secondary-foreground" })
141
145
  }
142
146
  ) }),
143
147
  /* @__PURE__ */ r(b, { variant: "tertiary", side: "top", children: a("datePicker.selectMultipleQuarters") })
144
148
  ] })
145
149
  ] }),
146
- ...z
150
+ ...H
147
151
  }
148
152
  )
149
153
  }
150
154
  ),
151
155
  children: /* @__PURE__ */ r(
152
- ee,
156
+ re,
153
157
  {
154
158
  pickerType: "quarter",
155
159
  monthMode: "multiple",
156
160
  selectedQuarters: P,
157
- footerFlashKey: L,
158
- footerFlashTarget: V,
159
- onQuarterSelect: U,
160
- month: B,
161
- onMonthChange: G,
162
- disabled: re(D, Q),
161
+ footerFlashKey: q,
162
+ footerFlashTarget: B,
163
+ onQuarterSelect: X,
164
+ month: J,
165
+ onMonthChange: U,
166
+ disabled: oe(D, Q),
163
167
  startMonth: N,
164
168
  endMonth: S,
165
169
  showFooter: s,
166
- onApply: W,
170
+ onApply: Y,
167
171
  onCancel: h,
168
172
  onClear: C,
169
- ...J
173
+ ...W
170
174
  }
171
175
  )
172
176
  }
173
177
  );
174
178
  }
175
179
  );
176
- ue.displayName = "MultiQuarterPicker";
180
+ de.displayName = "MultiQuarterPicker";
177
181
  export {
178
- ue as MultiQuarterPicker
182
+ de as MultiQuarterPicker
179
183
  };