impact-nova 2.5.12 → 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 (30) hide show
  1. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
  2. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
  3. package/dist/components/data-display/calendar/calendar-week-utils.d.ts +2 -1
  4. package/dist/components/data-display/calendar/use-calendar-state.js +159 -157
  5. package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
  6. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  7. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  8. package/dist/components/forms/date-picker/week-picker.js +81 -79
  9. package/dist/components/forms/date-picker/week-range-picker.js +89 -87
  10. package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
  11. package/dist/components/forms/select/components/Submenu.js +3 -2
  12. package/dist/form-react/Fields/MultiYearPickerField.d.ts +8 -0
  13. package/dist/form-react/Fields/MultiYearPickerField.js +57 -0
  14. package/dist/form-react/Fields/YearPickerField.d.ts +8 -0
  15. package/dist/form-react/Fields/YearPickerField.js +57 -0
  16. package/dist/form-react/Fields/YearRangePickerField.d.ts +8 -0
  17. package/dist/form-react/Fields/YearRangePickerField.js +57 -0
  18. package/dist/form-react/registry/defaultFieldRegistrations.d.ts +1 -1
  19. package/dist/form-react/registry/defaultFieldRegistrations.js +16 -13
  20. package/dist/form-react/types/fields.types.d.ts +55 -1
  21. package/dist/form-react/types/fieldsOutput.types.d.ts +8 -2
  22. package/dist/form-react/utils/fieldDefaults.utils.js +1 -1
  23. package/dist/lib/fiscal-calendar/index.d.ts +2 -2
  24. package/dist/lib/fiscal-calendar/index.js +26 -28
  25. package/dist/lib/fiscal-calendar/types.d.ts +0 -7
  26. package/dist/lib/fiscal-calendar/week-selection.d.ts +3 -4
  27. package/dist/lib/fiscal-calendar/week-selection.js +51 -78
  28. package/dist/llms/rules/installation.js +1 -1
  29. package/dist/llms/rules/requirements.js +1 -1
  30. package/package.json +1 -1
@@ -3,7 +3,8 @@ import { Badge as s } from "../../data-display/badge/badge.js";
3
3
  import { FilterPopoverContent as u } from "../../flows/filter-strip/filter-tag-list.js";
4
4
  import { Popover as b, PopoverTrigger as f } from "../../feedback/popover/popover.js";
5
5
  import { Tooltip as g, TooltipTrigger as v, TooltipContent as x } from "../../feedback/tooltip/tooltip.js";
6
- function w({
6
+ import "react";
7
+ function I({
7
8
  tags: o,
8
9
  title: l = "Attributes",
9
10
  maxVisibleTags: n = 4,
@@ -70,5 +71,5 @@ function w({
70
71
  );
71
72
  }
72
73
  export {
73
- w as ExpandableListItemAttributes
74
+ I as ExpandableListItemAttributes
74
75
  };
@@ -1,8 +1,9 @@
1
1
  import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
2
  import { ScrollOverflowAffordance as o } from "../../layout/horizontal-scroller/scroll-overflow-affordance.js";
3
+ import "react";
3
4
  import { OverflowTooltip as r } from "../../feedback/tooltip/overflow-tooltip.js";
4
5
  const m = 128;
5
- function x({
6
+ function f({
6
7
  columns: i,
7
8
  sectionId: l = "metrics"
8
9
  }) {
@@ -50,5 +51,5 @@ function x({
50
51
  );
51
52
  }
52
53
  export {
53
- x as ExpandableListItemMetrics
54
+ f as ExpandableListItemMetrics
54
55
  };
@@ -1,4 +1,4 @@
1
- import { CalendarKind, FiscalMode, FiscalMonthPattern, Granularity } from '../../../lib/fiscal-calendar';
1
+ import { CalendarKind, FiscalCalendarConfig, FiscalMode, FiscalMonthPattern, Granularity } from '../../../lib/fiscal-calendar';
2
2
  import { WeekRange, WeekSelection } from './calendar.types';
3
3
  export type WeekPickerInput = Date | {
4
4
  days: Array<{
@@ -37,6 +37,7 @@ export declare function calculateWeekSelection(weekOrDate: WeekPickerInput, opti
37
37
  fiscalMonthPattern?: FiscalMonthPattern;
38
38
  fiscalYearStartMonth: number;
39
39
  weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
40
+ fiscalConfig?: FiscalCalendarConfig;
40
41
  }): WeekSelection;
41
42
  export declare function nextWeekSelection(week: WeekSelection, prev: WeekSelection | WeekSelection[] | WeekRange | undefined, weekMode: "single" | "multiple" | "range"): WeekSelection | WeekSelection[] | WeekRange | undefined;
42
43
  export declare function weekSelectionsToDates(selection: WeekSelection | WeekSelection[] | WeekRange | undefined): Date[] | undefined;
@@ -1,21 +1,21 @@
1
- import * as r from "react";
1
+ import * as n from "react";
2
2
  import { parseCivilDate as ht, localDateFromCivil as J } from "../../../lib/fiscal-calendar/civil-date.js";
3
3
  import { buildFiscalYear as ft } from "../../../lib/fiscal-calendar/build-year.js";
4
4
  import { isCalendarApplyDisabled as pt } from "./calendar-apply-validation.js";
5
- import { isWeekSelectableInBounds as dt, nextMonthSelection as _t, getAvailableYears as tn, isMonthSelected as nn, getMonthRangeProps as rn, isMonthDisabled as un } from "./calendar-month-utils.js";
6
- import { calculateWeekSelection as an, nextWeekSelection as Vt, weekSelectionsToDates as fn, computeWeekRangeModifiers as sn } from "./calendar-week-utils.js";
7
- import { priorFyComparison as ln, flattenDateRanges as mn, multiRangeModifiers as cn, isDateRangeArray as st, dateSelectToCalendarSelection as Dn, presetIntervalToDateRange as $t, asDayPickerSelection as jt, isMultiRangeComplete as bn, asRangeSelection as gn, nextMultiRangeDateSelection as vn } from "./calendar-interval-utils.js";
8
- import { nextQuarterSelection as qt, isQuarterSelected as An, isQuarterDisabledForBounds as Rn } from "./calendar-quarter-utils.js";
9
- import { nextYearSelection as yt, isYearSelectedForSelection as xn, isYearDisabledForBounds as Pn } from "./calendar-year-utils.js";
10
- import { isSameCalendarMonth as Sn, DEFAULT_YEAR_PAGE_SIZE as En, boundsFromDisabled as In, resolveAvailableViewMonth as _n, hasCalendarValue as Q } from "./calendar-available-view.js";
11
- function Vn(n, i, a) {
12
- return n === "week" ? a === "range" || a === "multiple" || a === "multi-range" ? 2 : 1 : n === "date" && (i === "range" || i === "multiple" || i === "multi-range") ? 2 : 1;
5
+ import { isWeekSelectableInBounds as dt, nextMonthSelection as _t, getAvailableYears as tr, isMonthSelected as rr, getMonthRangeProps as nr, isMonthDisabled as ir } from "./calendar-month-utils.js";
6
+ import { calculateWeekSelection as ur, nextWeekSelection as Vt, weekSelectionsToDates as ar, computeWeekRangeModifiers as fr } from "./calendar-week-utils.js";
7
+ import { priorFyComparison as sr, flattenDateRanges as lr, multiRangeModifiers as mr, isDateRangeArray as st, dateSelectToCalendarSelection as cr, presetIntervalToDateRange as $t, asDayPickerSelection as jt, isMultiRangeComplete as Dr, asRangeSelection as br, nextMultiRangeDateSelection as vr } from "./calendar-interval-utils.js";
8
+ import { nextQuarterSelection as qt, isQuarterSelected as gr, isQuarterDisabledForBounds as Ar } from "./calendar-quarter-utils.js";
9
+ import { nextYearSelection as yt, isYearSelectedForSelection as Rr, isYearDisabledForBounds as xr } from "./calendar-year-utils.js";
10
+ import { isSameCalendarMonth as Pr, DEFAULT_YEAR_PAGE_SIZE as Sr, boundsFromDisabled as Er, resolveAvailableViewMonth as Ir, hasCalendarValue as Q } from "./calendar-available-view.js";
11
+ function _r(r, i, a) {
12
+ return r === "week" ? a === "range" || a === "multiple" || a === "multi-range" ? 2 : 1 : r === "date" && (i === "range" || i === "multiple" || i === "multi-range") ? 2 : 1;
13
13
  }
14
- function $n(n, i, a, l, k, f) {
15
- return n === "week" ? Q(a) : n === "month" ? Q(l) : n === "quarter" ? Q(k) : n === "year" ? Q(f) : Q(i);
14
+ function Vr(r, i, a, l, k, f) {
15
+ return r === "week" ? Q(a) : r === "month" ? Q(l) : r === "quarter" ? Q(k) : r === "year" ? Q(f) : Q(i);
16
16
  }
17
- function jn(n, i, a) {
18
- if (n) return n;
17
+ function $r(r, i, a) {
18
+ if (r) return r;
19
19
  if (i) return i;
20
20
  if (a) {
21
21
  if (Array.isArray(a)) {
@@ -27,15 +27,15 @@ function jn(n, i, a) {
27
27
  }
28
28
  return /* @__PURE__ */ new Date();
29
29
  }
30
- function Bt(n, i) {
31
- const { minDate: a, maxDate: l } = In(i.disabled);
32
- return _n({
33
- seed: n,
30
+ function Bt(r, i) {
31
+ const { minDate: a, maxDate: l } = Er(i.disabled);
32
+ return Ir({
33
+ seed: r,
34
34
  pickerType: i.pickerType,
35
35
  minDate: a,
36
36
  maxDate: l,
37
- numberOfMonths: Vn(i.pickerType, i.mode, i.weekMode),
38
- hasSelection: $n(
37
+ numberOfMonths: _r(i.pickerType, i.mode, i.weekMode),
38
+ hasSelection: Vr(
39
39
  i.pickerType,
40
40
  i.selected,
41
41
  i.selectedWeeks,
@@ -47,21 +47,21 @@ function Bt(n, i) {
47
47
  yearPageSize: i.yearPageSize
48
48
  });
49
49
  }
50
- function Un({
51
- showFooter: n,
50
+ function Or({
51
+ showFooter: r,
52
52
  mode: i,
53
53
  selected: a,
54
54
  onSelect: l,
55
55
  onSelectionChange: k,
56
56
  pickerType: f,
57
57
  weekMode: x,
58
- selectedWeeks: v,
58
+ selectedWeeks: g,
59
59
  onWeekSelect: j,
60
60
  calendarKind: P,
61
61
  fiscalMode: lt,
62
62
  granularity: z,
63
63
  resolvedFiscalPattern: mt,
64
- fiscalConfig: c,
64
+ fiscalConfig: m,
65
65
  fiscalYearStartMonth: ct,
66
66
  weekStartsOn: Dt,
67
67
  monthMode: $,
@@ -73,27 +73,27 @@ function Un({
73
73
  onYearSelect: B,
74
74
  yearMode: w = "single",
75
75
  comparison: h,
76
- onComparisonChange: C,
76
+ onComparisonChange: N,
77
77
  onRangesChange: X,
78
- month: N,
79
- defaultMonth: Ct,
78
+ month: Y,
79
+ defaultMonth: Nt,
80
80
  onMonthChange: e,
81
81
  resolvedStartMonth: bt,
82
- resolvedEndMonth: gt,
82
+ resolvedEndMonth: vt,
83
83
  disabled: A,
84
84
  autoNavigateToAvailable: p = !1,
85
- yearPageSize: d = En,
86
- onApply: Y,
87
- onCancel: vt,
85
+ yearPageSize: d = Sr,
86
+ onApply: C,
87
+ onCancel: gt,
88
88
  onClear: At
89
89
  }) {
90
- const tt = r.useRef(!1), Rt = r.useRef(e), [m, H] = r.useState(a), [xt, nt] = r.useState(
91
- () => Bt(jn(N, Ct, a), {
90
+ const tt = n.useRef(!1), Rt = n.useRef(e), [c, H] = n.useState(a), [xt, rt] = n.useState(
91
+ () => Bt($r(Y, Nt, a), {
92
92
  pickerType: f,
93
93
  mode: i,
94
94
  weekMode: x,
95
95
  selected: a,
96
- selectedWeeks: v,
96
+ selectedWeeks: g,
97
97
  selectedMonths: S,
98
98
  selectedQuarters: E,
99
99
  selectedYear: I,
@@ -101,23 +101,23 @@ function Un({
101
101
  autoNavigateToAvailable: p,
102
102
  yearPageSize: d
103
103
  })
104
- ), [_, M] = r.useState(v), [G, W] = r.useState(S), [L, K] = r.useState(E), [O, o] = r.useState(I), [Nt, rt] = r.useState(
104
+ ), [_, M] = n.useState(g), [G, W] = n.useState(S), [L, K] = n.useState(E), [O, F] = n.useState(I), [Yt, nt] = n.useState(
105
105
  xt.getFullYear()
106
106
  );
107
- r.useEffect(() => {
107
+ n.useEffect(() => {
108
108
  Rt.current = e;
109
- }, [e]), r.useEffect(() => {
110
- if (!N) return;
109
+ }, [e]), n.useEffect(() => {
110
+ if (!Y) return;
111
111
  if (tt.current) {
112
- tt.current = !1, nt(N), rt(N.getFullYear());
112
+ tt.current = !1, rt(Y), nt(Y.getFullYear());
113
113
  return;
114
114
  }
115
- const t = Bt(N, {
115
+ const t = Bt(Y, {
116
116
  pickerType: f,
117
117
  mode: i,
118
118
  weekMode: x,
119
119
  selected: a,
120
- selectedWeeks: v,
120
+ selectedWeeks: g,
121
121
  selectedMonths: S,
122
122
  selectedQuarters: E,
123
123
  selectedYear: I,
@@ -125,36 +125,37 @@ function Un({
125
125
  autoNavigateToAvailable: p,
126
126
  yearPageSize: d
127
127
  });
128
- nt(t), rt(t.getFullYear()), Sn(t, N) || Rt.current?.(t);
128
+ rt(t), nt(t.getFullYear()), Pr(t, Y) || Rt.current?.(t);
129
129
  }, [
130
- N,
130
+ Y,
131
131
  A,
132
132
  p,
133
133
  f,
134
134
  i,
135
135
  x,
136
136
  a,
137
- v,
137
+ g,
138
138
  S,
139
139
  E,
140
140
  I,
141
141
  d
142
- ]), r.useEffect(() => {
143
- H(a), M(v), W(S), K(E), o(I);
144
- }, [a, v, S, E, I]);
145
- const Yt = r.useCallback(
142
+ ]), n.useEffect(() => {
143
+ H(a), M(g), W(S), K(E), F(I);
144
+ }, [a, g, S, E, I]);
145
+ const Ct = n.useCallback(
146
146
  (t) => {
147
- tt.current = !0, nt(t), rt(t.getFullYear()), e?.(t);
147
+ tt.current = !0, rt(t), nt(t.getFullYear()), e?.(t);
148
148
  },
149
149
  [e]
150
- ), Pt = r.useMemo(
150
+ ), Pt = n.useMemo(
151
151
  () => ({
152
152
  calendarKind: P,
153
153
  fiscalMode: lt,
154
154
  granularity: z,
155
155
  fiscalMonthPattern: mt,
156
156
  fiscalYearStartMonth: ct,
157
- weekStartsOn: Dt
157
+ weekStartsOn: Dt,
158
+ fiscalConfig: m
158
159
  }),
159
160
  [
160
161
  P,
@@ -162,33 +163,34 @@ function Un({
162
163
  z,
163
164
  mt,
164
165
  ct,
165
- Dt
166
+ Dt,
167
+ m
166
168
  ]
167
- ), it = r.useCallback(
168
- (t) => an(t, Pt),
169
+ ), it = n.useCallback(
170
+ (t) => ur(t, Pt),
169
171
  [Pt]
170
- ), ut = r.useCallback(
172
+ ), ut = n.useCallback(
171
173
  (t) => {
172
174
  if (!dt(t.startDate, t.endDate, A, z)) return;
173
- if (n) {
175
+ if (r) {
174
176
  M((s) => {
175
177
  const D = Vt(t, s, x === "multi-range" ? "range" : x);
176
178
  return j?.(D), D;
177
179
  });
178
180
  return;
179
181
  }
180
- const u = Vt(t, v, x === "multi-range" ? "range" : x);
182
+ const u = Vt(t, g, x === "multi-range" ? "range" : x);
181
183
  j?.(
182
184
  x === "multiple" ? Array.isArray(u) && u.length > 0 ? u : void 0 : u
183
185
  );
184
186
  },
185
- [x, n, v, j, A, z]
186
- ), Gt = r.useCallback(
187
+ [x, r, g, j, A, z]
188
+ ), Gt = n.useCallback(
187
189
  (t, u) => {
188
190
  let s = { year: t, month: u };
189
- if (P === "fiscal" && c)
191
+ if (P === "fiscal" && m)
190
192
  try {
191
- const b = ft(c, t).periods[u];
193
+ const b = ft(m, t).periods[u];
192
194
  if (b) {
193
195
  const R = ht(b.start);
194
196
  s = {
@@ -202,11 +204,11 @@ function Un({
202
204
  }
203
205
  } catch {
204
206
  }
205
- if (n) {
206
- W((g) => {
207
+ if (r) {
208
+ W((v) => {
207
209
  const b = _t(
208
210
  s,
209
- g,
211
+ v,
210
212
  $ === "multi-range" ? "range" : $
211
213
  );
212
214
  return q?.(b), b;
@@ -222,8 +224,8 @@ function Un({
222
224
  $ === "multiple" ? Array.isArray(D) && D.length > 0 ? D : void 0 : D
223
225
  );
224
226
  },
225
- [$, n, S, q, P, c]
226
- ), Lt = r.useCallback(
227
+ [$, r, S, q, P, m]
228
+ ), Lt = n.useCallback(
227
229
  (t, u) => {
228
230
  let s = {
229
231
  year: t,
@@ -231,38 +233,38 @@ function Un({
231
233
  start: new Date(t, (u - 1) * 3, 1),
232
234
  end: new Date(t, u * 3, 0)
233
235
  };
234
- if (P === "fiscal" && c)
236
+ if (P === "fiscal" && m)
235
237
  try {
236
- const g = ft(c, t).quarters.find((b) => b.quarter === u);
237
- g && (s = {
238
+ const v = ft(m, t).quarters.find((b) => b.quarter === u);
239
+ v && (s = {
238
240
  year: t,
239
241
  quarter: u,
240
- fy: g.fy,
241
- start: J(g.start),
242
- end: J(g.end)
242
+ fy: v.fy,
243
+ start: J(v.start),
244
+ end: J(v.end)
243
245
  });
244
246
  } catch {
245
247
  }
246
- if (n) {
248
+ if (r) {
247
249
  K((D) => {
248
- const g = qt(s, D, $);
249
- return y?.(g), g;
250
+ const v = qt(s, D, $);
251
+ return y?.(v), v;
250
252
  });
251
253
  return;
252
254
  }
253
255
  y?.(qt(s, E, $));
254
256
  },
255
- [P, c, $, y, E, n]
256
- ), Ot = r.useCallback(
257
+ [P, m, $, y, E, r]
258
+ ), Ot = n.useCallback(
257
259
  (t) => {
258
260
  let u = {
259
261
  year: t,
260
262
  start: new Date(t, 0, 1),
261
263
  end: new Date(t, 11, 31)
262
264
  };
263
- if (P === "fiscal" && c)
265
+ if (P === "fiscal" && m)
264
266
  try {
265
- const s = ft(c, t);
267
+ const s = ft(m, t);
266
268
  u = {
267
269
  year: s.fy,
268
270
  fy: s.fy,
@@ -271,8 +273,8 @@ function Un({
271
273
  };
272
274
  } catch {
273
275
  }
274
- if (n) {
275
- o((s) => {
276
+ if (r) {
277
+ F((s) => {
276
278
  const D = yt(u, s, w);
277
279
  return B?.(D), D;
278
280
  });
@@ -280,40 +282,40 @@ function Un({
280
282
  }
281
283
  B?.(yt(u, I, w));
282
284
  },
283
- [P, c, B, I, n, w]
284
- ), U = r.useCallback(
285
+ [P, m, B, I, r, w]
286
+ ), U = n.useCallback(
285
287
  (t) => {
286
- if (h !== "prior-fy" || !c || !t?.from || !t.to) {
287
- h === "prior-fy" && C?.(void 0);
288
+ if (h !== "prior-fy" || !m || !t?.from || !t.to) {
289
+ h === "prior-fy" && N?.(void 0);
288
290
  return;
289
291
  }
290
- C?.(ln(c, t.from, t.to));
292
+ N?.(sr(m, t.from, t.to));
291
293
  },
292
- [h, c, C]
293
- ), Ut = r.useMemo(
294
- () => tn(bt, gt),
295
- [bt, gt]
296
- ), at = r.useMemo(() => f !== "week" ? void 0 : fn(n ? _ : v), [f, n, _, v]), Zt = r.useMemo(() => {
294
+ [h, m, N]
295
+ ), Ut = n.useMemo(
296
+ () => tr(bt, vt),
297
+ [bt, vt]
298
+ ), at = n.useMemo(() => f !== "week" ? void 0 : ar(r ? _ : g), [f, r, _, g]), Zt = n.useMemo(() => {
297
299
  if (i === "multi-range")
298
- return mn(n ? m : a);
299
- }, [i, n, m, a]), St = r.useMemo(() => {
300
+ return lr(r ? c : a);
301
+ }, [i, r, c, a]), St = n.useMemo(() => {
300
302
  if (i !== "multi-range") return;
301
- const t = n ? m : a;
302
- return cn(st(t) ? t : void 0);
303
- }, [i, n, m, a]), zt = r.useMemo(() => f !== "week" ? St ?? { range_start: [], range_middle: [], range_end: [] } : sn(at, x === "multi-range" ? "range" : x, n ? _ : v), [
303
+ const t = r ? c : a;
304
+ return mr(st(t) ? t : void 0);
305
+ }, [i, r, c, a]), zt = n.useMemo(() => f !== "week" ? St ?? { range_start: [], range_middle: [], range_end: [] } : fr(at, x === "multi-range" ? "range" : x, r ? _ : g), [
304
306
  f,
305
307
  at,
306
308
  x,
307
- n,
309
+ r,
308
310
  _,
309
- v,
311
+ g,
310
312
  St
311
- ]), V = r.useCallback(
313
+ ]), V = n.useCallback(
312
314
  (t) => {
313
- k?.(Dn(i, t));
315
+ k?.(cr(i, t));
314
316
  },
315
317
  [i, k]
316
- ), Ht = r.useCallback(
318
+ ), Ht = n.useCallback(
317
319
  (t, u) => {
318
320
  if (f === "week" && t) {
319
321
  const s = u ?? (Array.isArray(t) ? t[t.length - 1] : t instanceof Date ? t : void 0);
@@ -327,47 +329,47 @@ function Un({
327
329
  if (!s) return;
328
330
  const D = (R) => {
329
331
  const Z = st(R) ? R : R && typeof R == "object" && !(R instanceof Date) && !Array.isArray(R) && "from" in R ? [R] : void 0;
330
- return vn(s, Z);
332
+ return vr(s, Z);
331
333
  };
332
- if (n) {
334
+ if (r) {
333
335
  H((R) => {
334
336
  const Z = D(R), T = Z[Z.length - 1];
335
337
  return l?.(T), X?.(Z), V(Z), T?.from && T.to && U(T), Z;
336
338
  });
337
339
  return;
338
340
  }
339
- const g = D(a), b = g[g.length - 1];
340
- l?.(b), X?.(g), V(g), b?.from && b.to && U(b);
341
+ const v = D(a), b = v[v.length - 1];
342
+ l?.(b), X?.(v), V(v), b?.from && b.to && U(b);
341
343
  return;
342
344
  }
343
- n ? (H(t), l?.(t), V(t), t && typeof t == "object" && !(t instanceof Date) && !Array.isArray(t) && t.from && t.to && U(t)) : (l?.(t), V(t), t && typeof t == "object" && !(t instanceof Date) && !Array.isArray(t) && t.from && t.to && U(t));
345
+ r ? (H(t), l?.(t), V(t), t && typeof t == "object" && !(t instanceof Date) && !Array.isArray(t) && t.from && t.to && U(t)) : (l?.(t), V(t), t && typeof t == "object" && !(t instanceof Date) && !Array.isArray(t) && t.from && t.to && U(t));
344
346
  },
345
- [n, l, X, V, f, it, ut, i, a, U]
346
- ), Jt = r.useCallback(
347
+ [r, l, X, V, f, it, ut, i, a, U]
348
+ ), Jt = n.useCallback(
347
349
  (t) => {
348
350
  const u = $t(t.interval);
349
- n && H(u), l?.(u), V(u), t.comparison ? C?.({
351
+ r && H(u), l?.(u), V(u), t.comparison ? N?.({
350
352
  primary: u,
351
353
  comparison: $t(t.comparison)
352
354
  }) : U(u);
353
355
  },
354
- [U, V, C, l, n]
355
- ), Xt = r.useCallback(() => {
356
+ [U, V, N, l, r]
357
+ ), Xt = n.useCallback(() => {
356
358
  if (f === "week")
357
- j?.(_), Y?.(_);
359
+ j?.(_), C?.(_);
358
360
  else if (f === "month")
359
- q?.(G), Y?.(G);
361
+ q?.(G), C?.(G);
360
362
  else if (f === "quarter")
361
- y?.(L), Y?.(L);
363
+ y?.(L), C?.(L);
362
364
  else if (f === "year")
363
- B?.(O), Y?.(O);
364
- else if (st(m)) {
365
- const t = m[m.length - 1];
366
- l?.(t), X?.(m), V(m), Y?.(m);
365
+ B?.(O), C?.(O);
366
+ else if (st(c)) {
367
+ const t = c[c.length - 1];
368
+ l?.(t), X?.(c), V(c), C?.(c);
367
369
  } else
368
- l?.(jt(m)), V(m), Y?.(m);
370
+ l?.(jt(c)), V(c), C?.(c);
369
371
  }, [
370
- m,
372
+ c,
371
373
  _,
372
374
  G,
373
375
  L,
@@ -377,67 +379,67 @@ function Un({
377
379
  q,
378
380
  y,
379
381
  B,
380
- Y,
382
+ C,
381
383
  X,
382
384
  V,
383
385
  f
384
- ]), et = r.useCallback(() => {
385
- f === "week" ? M(v) : f === "month" ? W(S) : f === "quarter" ? K(E) : f === "year" ? o(I) : H(a), vt?.();
386
- }, [a, v, S, E, I, vt, f]), Qt = r.useCallback(() => {
387
- f === "week" ? (M(void 0), n || j?.(void 0)) : f === "month" ? (W(void 0), n || q?.(void 0)) : f === "quarter" ? (K(void 0), n || y?.(void 0)) : f === "year" ? (o(void 0), n || B?.(void 0)) : (H(void 0), n || l?.(void 0)), C?.(void 0), At?.();
386
+ ]), et = n.useCallback(() => {
387
+ f === "week" ? M(g) : f === "month" ? W(S) : f === "quarter" ? K(E) : f === "year" ? F(I) : H(a), gt?.();
388
+ }, [a, g, S, E, I, gt, f]), Qt = n.useCallback(() => {
389
+ f === "week" ? (M(void 0), r || j?.(void 0)) : f === "month" ? (W(void 0), r || q?.(void 0)) : f === "quarter" ? (K(void 0), r || y?.(void 0)) : f === "year" ? (F(void 0), r || B?.(void 0)) : (H(void 0), r || l?.(void 0)), N?.(void 0), At?.();
388
390
  }, [
389
- n,
391
+ r,
390
392
  l,
391
393
  j,
392
394
  q,
393
395
  y,
394
396
  B,
395
- C,
397
+ N,
396
398
  At,
397
399
  f
398
- ]), F = n ? G : S, Et = n ? L : E, kt = r.useCallback(
399
- (t, u) => nn(t, u, F),
400
- [F]
401
- ), Mt = r.useCallback(
402
- (t, u) => rn(t, u, F),
403
- [F]
404
- ), Wt = r.useCallback(
405
- (t, u) => un(t, u, A),
400
+ ]), o = r ? G : S, Et = r ? L : E, kt = n.useCallback(
401
+ (t, u) => rr(t, u, o),
402
+ [o]
403
+ ), Mt = n.useCallback(
404
+ (t, u) => nr(t, u, o),
405
+ [o]
406
+ ), Wt = n.useCallback(
407
+ (t, u) => ir(t, u, A),
406
408
  [A]
407
- ), Kt = r.useCallback(
408
- (t, u) => An(t, u, Et),
409
+ ), Kt = n.useCallback(
410
+ (t, u) => gr(t, u, Et),
409
411
  [Et]
410
- ), ot = r.useCallback(
411
- (t, u) => Rn(t, u, A, {
412
+ ), Ft = n.useCallback(
413
+ (t, u) => Ar(t, u, A, {
412
414
  calendarKind: P,
413
- fiscalConfig: c
415
+ fiscalConfig: m
414
416
  }),
415
- [P, A, c]
416
- ), It = n ? O : I, Ft = r.useCallback(
417
- (t) => xn(t, It),
417
+ [P, A, m]
418
+ ), It = r ? O : I, ot = n.useCallback(
419
+ (t) => Rr(t, It),
418
420
  [It]
419
- ), Tt = r.useCallback(
420
- (t) => Pn(t, A, {
421
+ ), Tt = n.useCallback(
422
+ (t) => xr(t, A, {
421
423
  calendarKind: P,
422
- fiscalConfig: c
424
+ fiscalConfig: m
423
425
  }),
424
- [P, A, c]
425
- ), wt = r.useMemo(() => i === "multi-range" && n && !bn(gn(m)) ? !0 : pt({
426
- showFooter: n,
426
+ [P, A, m]
427
+ ), wt = n.useMemo(() => i === "multi-range" && r && !Dr(br(c)) ? !0 : pt({
428
+ showFooter: r,
427
429
  pickerType: f,
428
430
  granularity: z,
429
431
  disabled: A,
430
- pendingSelection: jt(m),
432
+ pendingSelection: jt(c),
431
433
  pendingWeekSelection: _,
432
434
  pendingMonthSelection: G,
433
435
  pendingQuarterSelection: L,
434
436
  pendingYearSelection: O
435
437
  }), [
436
- n,
438
+ r,
437
439
  f,
438
440
  z,
439
441
  A,
440
- m,
442
+ c,
441
443
  _,
442
444
  G,
443
445
  L,
@@ -445,14 +447,14 @@ function Un({
445
447
  i
446
448
  ]);
447
449
  return {
448
- pendingSelection: m,
450
+ pendingSelection: c,
449
451
  currentMonth: xt,
450
452
  pendingWeekSelection: _,
451
453
  pendingMonthSelection: G,
452
454
  pendingQuarterSelection: L,
453
455
  pendingYearSelection: O,
454
- monthPickerYear: Nt,
455
- handleMonthChangeInternal: Yt,
456
+ monthPickerYear: Yt,
457
+ handleMonthChangeInternal: Ct,
456
458
  resolveWeekFromInput: it,
457
459
  handleWeekClick: ut,
458
460
  handleMonthClick: Gt,
@@ -471,12 +473,12 @@ function Un({
471
473
  getMonthRangeProps: Mt,
472
474
  isMonthDisabled: Wt,
473
475
  isQuarterSelected: Kt,
474
- isQuarterDisabled: ot,
475
- isYearSelected: Ft,
476
+ isQuarterDisabled: Ft,
477
+ isYearSelected: ot,
476
478
  isYearDisabled: Tt,
477
479
  isApplyDisabledInternal: wt
478
480
  };
479
481
  }
480
482
  export {
481
- Un as useCalendarState
483
+ Or as useCalendarState
482
484
  };
@@ -1,6 +1,7 @@
1
1
  import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
2
  import { Tooltip as l, TooltipTrigger as n, TooltipContent as o } from "./tooltip.js";
3
- const d = (i, r, a) => /* @__PURE__ */ t(l, { children: [
3
+ import "react";
4
+ const p = (i, r, a) => /* @__PURE__ */ t(l, { children: [
4
5
  /* @__PURE__ */ e(n, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "inline-flex items-center justify-center h-full w-full", children: i }) }),
5
6
  /* @__PURE__ */ e(o, { variant: "tertiary", className: a, children: r })
6
7
  ] }), h = (i, r) => /* @__PURE__ */ t(l, { children: [
@@ -9,5 +10,5 @@ const d = (i, r, a) => /* @__PURE__ */ t(l, { children: [
9
10
  ] });
10
11
  export {
11
12
  h as defaultAccordionTooltipRender,
12
- d as defaultTabTooltipRender
13
+ p as defaultTabTooltipRender
13
14
  };