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