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