impact-nova 2.5.12 → 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 (127) 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/nested-list/components/NestedListContent.d.ts +10 -2
  25. package/dist/components/data/nested-list/components/NestedListContent.js +253 -138
  26. package/dist/components/data/nested-list/components/SortableItem.d.ts +2 -1
  27. package/dist/components/data/nested-list/components/SortableItem.js +62 -60
  28. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.d.ts +10 -20
  29. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.js +44 -233
  30. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.d.ts +24 -0
  31. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.js +128 -0
  32. package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -1
  33. package/dist/components/data/nested-list/nested-list-constants.js +10 -4
  34. package/dist/components/data/nested-list/nested-list-display-utils.d.ts +11 -0
  35. package/dist/components/data/nested-list/nested-list-display-utils.js +74 -0
  36. package/dist/components/data/nested-list/nested-list-drop-engine.d.ts +31 -0
  37. package/dist/components/data/nested-list/nested-list-drop-engine.js +209 -0
  38. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.d.ts +26 -0
  39. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.js +67 -0
  40. package/dist/components/data/nested-list/nested-list-item-tree-mutations.d.ts +4 -0
  41. package/dist/components/data/nested-list/nested-list-item-tree-mutations.js +43 -0
  42. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.d.ts +3 -0
  43. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.js +34 -0
  44. package/dist/components/data/nested-list/nested-list-row-estimates.d.ts +9 -0
  45. package/dist/components/data/nested-list/nested-list-row-estimates.js +14 -0
  46. package/dist/components/data/nested-list/nested-list-scroll-anchor.d.ts +36 -0
  47. package/dist/components/data/nested-list/nested-list-scroll-anchor.js +47 -0
  48. package/dist/components/data/nested-list/nested-list-virtual-drop.d.ts +59 -0
  49. package/dist/components/data/nested-list/nested-list-virtual-drop.js +341 -0
  50. package/dist/components/data/nested-list/nested-list.js +322 -336
  51. package/dist/components/data/nested-list/nested-list.types.d.ts +17 -0
  52. package/dist/components/data-display/calendar/calendar-apply-validation.d.ts +0 -2
  53. package/dist/components/data-display/calendar/calendar-apply-validation.js +67 -64
  54. package/dist/components/data-display/calendar/calendar-config.js +1 -1
  55. package/dist/components/data-display/calendar/calendar-day-picker-components.d.ts +2 -4
  56. package/dist/components/data-display/calendar/calendar-day-picker-components.js +164 -234
  57. package/dist/components/data-display/calendar/calendar-day-picker-view.js +76 -77
  58. package/dist/components/data-display/calendar/calendar-fiscal-period-nav.d.ts +0 -6
  59. package/dist/components/data-display/calendar/calendar-fiscal-period-nav.js +18 -34
  60. package/dist/components/data-display/calendar/calendar-footer.js +21 -21
  61. package/dist/components/data-display/calendar/calendar-month-picker-panel.js +49 -50
  62. package/dist/components/data-display/calendar/calendar-month-utils.d.ts +0 -5
  63. package/dist/components/data-display/calendar/calendar-month-utils.js +64 -85
  64. package/dist/components/data-display/calendar/calendar-padding-week.utils.d.ts +1 -3
  65. package/dist/components/data-display/calendar/calendar-padding-week.utils.js +5 -7
  66. package/dist/components/data-display/calendar/calendar-period-cell.js +46 -45
  67. package/dist/components/data-display/calendar/calendar-quarter-panes.js +31 -33
  68. package/dist/components/data-display/calendar/calendar-selection-appearance.d.ts +0 -10
  69. package/dist/components/data-display/calendar/calendar-selection-appearance.js +39 -53
  70. package/dist/components/data-display/calendar/calendar-selection.d.ts +0 -25
  71. package/dist/components/data-display/calendar/calendar-selection.js +23 -52
  72. package/dist/components/data-display/calendar/calendar-week-number-cell.d.ts +1 -2
  73. package/dist/components/data-display/calendar/calendar-week-number-cell.js +45 -59
  74. package/dist/components/data-display/calendar/calendar-week-utils.d.ts +3 -13
  75. package/dist/components/data-display/calendar/calendar-week-utils.js +50 -59
  76. package/dist/components/data-display/calendar/calendar-year-panes.d.ts +0 -3
  77. package/dist/components/data-display/calendar/calendar-year-panes.js +49 -53
  78. package/dist/components/data-display/calendar/calendar.js +143 -146
  79. package/dist/components/data-display/calendar/calendar.types.d.ts +0 -5
  80. package/dist/components/data-display/calendar/use-calendar-day-picker-config.d.ts +1 -2
  81. package/dist/components/data-display/calendar/use-calendar-day-picker-config.js +74 -79
  82. package/dist/components/data-display/calendar/use-calendar-state.d.ts +1 -3
  83. package/dist/components/data-display/calendar/use-calendar-state.js +325 -403
  84. package/dist/components/forms/date-picker/date-picker.js +58 -60
  85. package/dist/components/forms/date-picker/date-picker.types.d.ts +0 -5
  86. package/dist/components/forms/date-picker/date-range-picker.js +64 -66
  87. package/dist/components/forms/date-picker/fiscal-pass-through.d.ts +0 -1
  88. package/dist/components/forms/date-picker/fiscal-pass-through.js +2 -3
  89. package/dist/components/forms/date-picker/month-picker.js +59 -61
  90. package/dist/components/forms/date-picker/month-range-picker.js +61 -63
  91. package/dist/components/forms/date-picker/multi-date-picker.js +49 -51
  92. package/dist/components/forms/date-picker/multi-month-picker.js +47 -49
  93. package/dist/components/forms/date-picker/multi-quarter-picker.js +47 -51
  94. package/dist/components/forms/date-picker/multi-week-picker.js +51 -53
  95. package/dist/components/forms/date-picker/multi-year-picker.js +49 -53
  96. package/dist/components/forms/date-picker/quarter-picker.js +47 -51
  97. package/dist/components/forms/date-picker/quarter-range-picker.js +46 -50
  98. package/dist/components/forms/date-picker/week-picker.js +66 -68
  99. package/dist/components/forms/date-picker/week-range-picker.js +80 -82
  100. package/dist/components/forms/date-picker/year-picker.js +48 -52
  101. package/dist/components/forms/date-picker/year-range-picker.js +48 -52
  102. package/dist/form-react/Fields/DateInputField.js +50 -51
  103. package/dist/form-react/Fields/DateRangeField.js +13 -14
  104. package/dist/form-react/Fields/MonthRangeField.js +28 -29
  105. package/dist/form-react/Fields/MultiMonthPickerField.js +12 -13
  106. package/dist/form-react/Fields/MultiWeekPickerField.js +27 -35
  107. package/dist/form-react/Fields/WeekRangePicker.js +32 -33
  108. package/dist/form-react/types/fields.types.d.ts +0 -14
  109. package/dist/impact-nova-components.css +6 -13
  110. package/dist/impact-nova.css +1 -1
  111. package/dist/lib/fiscal-calendar/week-selection.js +2 -2
  112. package/dist/lib/hash/fnv1a128.d.ts +16 -0
  113. package/dist/lib/hash/fnv1a128.js +21 -0
  114. package/dist/llms/rules/ag-grid.js +1 -1
  115. package/dist/llms/rules/installation.js +1 -1
  116. package/dist/llms/rules/requirements.js +1 -1
  117. package/package.json +1 -1
  118. package/dist/components/data-display/calendar/calendar-available-view.d.ts +0 -27
  119. package/dist/components/data-display/calendar/calendar-available-view.js +0 -85
  120. package/dist/components/data-display/calendar/calendar-fiscal-day-cell.d.ts +0 -9
  121. package/dist/components/data-display/calendar/calendar-fiscal-day-cell.js +0 -45
  122. package/dist/components/data-display/calendar/calendar-injected-week-row.d.ts +0 -5
  123. package/dist/components/data-display/calendar/calendar-injected-week-row.js +0 -92
  124. package/dist/components/data-display/calendar/calendar-leading-week.utils.d.ts +0 -16
  125. package/dist/components/data-display/calendar/calendar-leading-week.utils.js +0 -51
  126. package/dist/components/data-display/calendar/calendar-orphan-week.d.ts +0 -23
  127. package/dist/components/forms/date-picker/fiscal-picker-fixtures.d.ts +0 -17
@@ -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
  };
@@ -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 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";
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 R } from "../../feedback/tooltip/tooltip.js";
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(
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(
16
16
  ({
17
17
  value: t,
18
18
  onChange: f,
@@ -30,34 +30,30 @@ const he = n.forwardRef(
30
30
  fiscalMonthPattern: v,
31
31
  fiscalYearStartMonth: K,
32
32
  fiscalConfig: g,
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]));
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]));
43
41
  n.useEffect(() => {
44
42
  i || l(t);
45
43
  }, [i, t]);
46
- const m = n.useCallback(() => s(!1), []), X = se({
44
+ const m = n.useCallback(() => s(!1), []), U = ae({
47
45
  calendarKind: O,
48
46
  fiscalMode: T,
49
47
  granularity: w,
50
48
  fiscalMonthPattern: v,
51
49
  fiscalYearStartMonth: K,
52
50
  fiscalConfig: g,
53
- weekStartsOn: j,
54
- showPresets: F,
55
- showPeriodBoundaries: L,
56
- autoNavigateToAvailable: z
57
- }), Z = (e) => {
51
+ showPresets: j,
52
+ showPeriodBoundaries: F
53
+ }), W = (e) => {
58
54
  const p = Array.isArray(e) && e.length > 0 ? e : void 0;
59
55
  l(p), c || f?.(p);
60
- }, _ = () => {
56
+ }, X = () => {
61
57
  f?.(C), m();
62
58
  }, h = () => {
63
59
  l(t), m();
@@ -67,9 +63,9 @@ const he = n.forwardRef(
67
63
  n.useLayoutEffect(() => {
68
64
  P.current = { onDismiss: h, resolveFlash: () => "cancel" };
69
65
  });
70
- const $ = t && t.length > 0 ? t.length === 1 ? ue(t[0], q) : a("datePicker.yearsSelected", { count: t.length }) : "";
66
+ const Z = t && t.length > 0 ? t.length === 1 ? fe(t[0], V) : a("datePicker.yearsSelected", { count: t.length }) : "";
71
67
  return /* @__PURE__ */ r(
72
- ce,
68
+ ie,
73
69
  {
74
70
  open: i,
75
71
  disabled: o,
@@ -80,26 +76,26 @@ const he = n.forwardRef(
80
76
  onOpenAutoFocus: (e) => {
81
77
  u.current || e.preventDefault(), u.current = !1;
82
78
  },
83
- popoverHandlers: Q,
79
+ popoverHandlers: G,
84
80
  trigger: /* @__PURE__ */ r(
85
81
  "div",
86
82
  {
87
83
  ref: k,
88
84
  "data-component": "multi-year-picker",
89
85
  "data-state": i ? "open" : "closed",
90
- onPointerDown: (e) => de({
86
+ onPointerDown: (e) => pe({
91
87
  disabled: o,
92
88
  event: e,
93
89
  onOpen: () => s(!0),
94
90
  focusField: () => d.current?.focus()
95
91
  }),
96
92
  children: /* @__PURE__ */ r(
97
- ne,
93
+ te,
98
94
  {
99
95
  ref: d,
100
- value: $,
96
+ value: Z,
101
97
  readOnly: !0,
102
- onKeyDown: (e) => fe(e, {
98
+ onKeyDown: (e) => le(e, {
103
99
  disabled: o,
104
100
  open: i,
105
101
  onOpen: () => s(!0),
@@ -109,10 +105,10 @@ const he = n.forwardRef(
109
105
  }
110
106
  }),
111
107
  onClick: () => !o && s(!0),
112
- placeholder: B,
108
+ placeholder: H,
113
109
  disabled: o,
114
110
  "data-form-control": "input",
115
- className: re("cursor-pointer", I),
111
+ className: ee("cursor-pointer", I),
116
112
  suffix: /* @__PURE__ */ y("div", { className: "flex items-center gap-1", children: [
117
113
  t && t.length > 0 && !o ? /* @__PURE__ */ y(M, { children: [
118
114
  /* @__PURE__ */ r(x, { asChild: !0, children: /* @__PURE__ */ r(
@@ -125,7 +121,7 @@ const he = n.forwardRef(
125
121
  e.stopPropagation(), b();
126
122
  },
127
123
  className: "inline-flex size-4 items-center justify-center border-none bg-transparent p-0",
128
- children: /* @__PURE__ */ r(ee, { className: "size-3 hover:text-content" })
124
+ children: /* @__PURE__ */ r(_, { className: "size-3 hover:text-content" })
129
125
  }
130
126
  ) }),
131
127
  /* @__PURE__ */ r(R, { variant: "tertiary", side: "top", children: a("calendar.clear") })
@@ -142,44 +138,44 @@ const he = n.forwardRef(
142
138
  e.stopPropagation(), o || s((p) => !p);
143
139
  },
144
140
  className: "inline-flex items-center justify-center border-none bg-transparent p-0",
145
- children: /* @__PURE__ */ r(te, { className: "h-4 w-4 text-secondary-foreground" })
141
+ children: /* @__PURE__ */ r($, { className: "h-4 w-4 text-secondary-foreground" })
146
142
  }
147
143
  ) }),
148
144
  /* @__PURE__ */ r(R, { variant: "tertiary", side: "top", children: a("datePicker.selectMultipleYears") })
149
145
  ] })
150
146
  ] }),
151
- ...H
147
+ ...z
152
148
  }
153
149
  )
154
150
  }
155
151
  ),
156
152
  children: /* @__PURE__ */ r(
157
- oe,
153
+ re,
158
154
  {
159
155
  pickerType: "year",
160
156
  yearMode: "multiple",
161
157
  selectedYear: C,
162
- footerFlashKey: G,
163
- footerFlashTarget: J,
164
- onYearSelect: Z,
165
- month: U,
166
- onMonthChange: W,
167
- disabled: ie(Y, N),
158
+ footerFlashKey: B,
159
+ footerFlashTarget: q,
160
+ onYearSelect: W,
161
+ month: J,
162
+ onMonthChange: Q,
163
+ disabled: oe(Y, N),
168
164
  startMonth: S,
169
165
  endMonth: A,
170
166
  showFooter: c,
171
- onApply: _,
167
+ onApply: X,
172
168
  onCancel: h,
173
169
  onClear: b,
174
- showIntervalCaption: E,
175
- ...X
170
+ showIntervalCaption: L,
171
+ ...U
176
172
  }
177
173
  )
178
174
  }
179
175
  );
180
176
  }
181
177
  );
182
- he.displayName = "MultiYearPicker";
178
+ ue.displayName = "MultiYearPicker";
183
179
  export {
184
- he as MultiYearPicker
180
+ ue as MultiYearPicker
185
181
  };
@@ -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 $, 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";
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";
7
7
  import { Tooltip as x, TooltipTrigger as b, 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 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(
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(
16
16
  ({
17
17
  value: n,
18
18
  onChange: u,
@@ -30,33 +30,29 @@ const de = t.forwardRef(
30
30
  fiscalMonthPattern: w,
31
31
  fiscalYearStartMonth: M,
32
32
  fiscalConfig: K,
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));
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));
42
40
  t.useEffect(() => {
43
41
  i || l(n);
44
42
  }, [i, n]);
45
- const p = t.useCallback(() => c(!1), []), X = ae({
43
+ const p = t.useCallback(() => c(!1), []), U = ne({
46
44
  calendarKind: I,
47
45
  fiscalMode: O,
48
46
  granularity: T,
49
47
  fiscalMonthPattern: w,
50
48
  fiscalYearStartMonth: M,
51
49
  fiscalConfig: K,
52
- weekStartsOn: j,
53
- showPresets: F,
54
- showPeriodBoundaries: z,
55
- autoNavigateToAvailable: E
56
- }), Y = (e) => {
50
+ showPresets: j,
51
+ showPeriodBoundaries: F
52
+ }), W = (e) => {
57
53
  const f = e && !Array.isArray(e) && !("from" in e) && !("to" in e) ? e : void 0;
58
54
  l(f), s || (u?.(f), p());
59
- }, Z = () => {
55
+ }, X = () => {
60
56
  u?.(g), p();
61
57
  }, h = () => {
62
58
  l(n), p();
@@ -66,9 +62,9 @@ const de = t.forwardRef(
66
62
  t.useLayoutEffect(() => {
67
63
  P.current = { onDismiss: h, resolveFlash: () => "cancel" };
68
64
  });
69
- const _ = n ? fe(n) : "";
65
+ const Y = n ? le(n) : "";
70
66
  return /* @__PURE__ */ r(
71
- ie,
67
+ oe,
72
68
  {
73
69
  open: i,
74
70
  disabled: o,
@@ -79,26 +75,26 @@ const de = t.forwardRef(
79
75
  onOpenAutoFocus: (e) => {
80
76
  m.current || e.preventDefault(), m.current = !1;
81
77
  },
82
- popoverHandlers: J,
78
+ popoverHandlers: B,
83
79
  trigger: /* @__PURE__ */ r(
84
80
  "div",
85
81
  {
86
82
  ref: k,
87
83
  "data-component": "quarter-picker",
88
84
  "data-state": i ? "open" : "closed",
89
- onPointerDown: (e) => pe({
85
+ onPointerDown: (e) => se({
90
86
  disabled: o,
91
87
  event: e,
92
88
  onOpen: () => c(!0),
93
89
  focusField: () => d.current?.focus()
94
90
  }),
95
91
  children: /* @__PURE__ */ r(
96
- re,
92
+ q,
97
93
  {
98
94
  ref: d,
99
- value: _,
95
+ value: Y,
100
96
  readOnly: !0,
101
- onKeyDown: (e) => le(e, {
97
+ onKeyDown: (e) => ce(e, {
102
98
  disabled: o,
103
99
  open: i,
104
100
  onOpen: () => c(!0),
@@ -108,10 +104,10 @@ const de = t.forwardRef(
108
104
  }
109
105
  }),
110
106
  onClick: () => !o && c(!0),
111
- placeholder: V,
107
+ placeholder: H,
112
108
  disabled: o,
113
109
  "data-form-control": "input",
114
- className: ee("cursor-pointer", A),
110
+ className: $("cursor-pointer", A),
115
111
  suffix: /* @__PURE__ */ y("div", { className: "flex items-center gap-1", children: [
116
112
  n && !o ? /* @__PURE__ */ y(x, { children: [
117
113
  /* @__PURE__ */ r(b, { asChild: !0, children: /* @__PURE__ */ r(
@@ -124,7 +120,7 @@ const de = t.forwardRef(
124
120
  e.stopPropagation(), C();
125
121
  },
126
122
  className: "inline-flex size-4 items-center justify-center border-none bg-transparent p-0",
127
- children: /* @__PURE__ */ r($, { className: "size-3 hover:text-content" })
123
+ children: /* @__PURE__ */ r(Z, { className: "size-3 hover:text-content" })
128
124
  }
129
125
  ) }),
130
126
  /* @__PURE__ */ r(R, { variant: "tertiary", side: "top", children: a("calendar.clear") })
@@ -141,42 +137,42 @@ const de = t.forwardRef(
141
137
  e.stopPropagation(), o || c((f) => !f);
142
138
  },
143
139
  className: "inline-flex items-center justify-center border-none bg-transparent p-0",
144
- children: /* @__PURE__ */ r(q, { className: "h-4 w-4 text-secondary-foreground" })
140
+ children: /* @__PURE__ */ r(_, { className: "h-4 w-4 text-secondary-foreground" })
145
141
  }
146
142
  ) }),
147
143
  /* @__PURE__ */ r(R, { variant: "tertiary", side: "top", children: a("datePicker.selectQuarter") })
148
144
  ] })
149
145
  ] }),
150
- ...H
146
+ ...z
151
147
  }
152
148
  )
153
149
  }
154
150
  ),
155
151
  children: /* @__PURE__ */ r(
156
- te,
152
+ ee,
157
153
  {
158
154
  pickerType: "quarter",
159
155
  selectedQuarters: g,
160
- footerFlashKey: B,
161
- footerFlashTarget: G,
162
- onQuarterSelect: Y,
163
- month: U,
164
- onMonthChange: W,
165
- disabled: oe(Q, v),
156
+ footerFlashKey: L,
157
+ footerFlashTarget: V,
158
+ onQuarterSelect: W,
159
+ month: G,
160
+ onMonthChange: J,
161
+ disabled: te(Q, v),
166
162
  startMonth: N,
167
163
  endMonth: S,
168
164
  showFooter: s,
169
- onApply: Z,
165
+ onApply: X,
170
166
  onCancel: h,
171
167
  onClear: C,
172
- ...X
168
+ ...U
173
169
  }
174
170
  )
175
171
  }
176
172
  );
177
173
  }
178
174
  );
179
- de.displayName = "QuarterPicker";
175
+ fe.displayName = "QuarterPicker";
180
176
  export {
181
- de as QuarterPicker
177
+ fe as QuarterPicker
182
178
  };