impact-nova 2.5.11 → 2.5.12

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 (47) hide show
  1. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +2 -3
  2. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +2 -3
  3. package/dist/components/data-display/calendar/calendar-config.js +1 -1
  4. package/dist/components/data-display/calendar/calendar-day-picker-components.js +205 -146
  5. package/dist/components/data-display/calendar/calendar-fiscal-day-cell.d.ts +9 -0
  6. package/dist/components/data-display/calendar/calendar-fiscal-day-cell.js +45 -0
  7. package/dist/components/data-display/calendar/calendar-footer.js +21 -21
  8. package/dist/components/data-display/calendar/calendar-injected-week-row.d.ts +5 -0
  9. package/dist/components/data-display/calendar/calendar-injected-week-row.js +92 -0
  10. package/dist/components/data-display/calendar/calendar-leading-week.utils.d.ts +16 -0
  11. package/dist/components/data-display/calendar/calendar-leading-week.utils.js +51 -0
  12. package/dist/components/data-display/calendar/calendar-month-picker-panel.js +50 -49
  13. package/dist/components/data-display/calendar/calendar-orphan-week.d.ts +23 -0
  14. package/dist/components/data-display/calendar/calendar-padding-week.utils.d.ts +3 -1
  15. package/dist/components/data-display/calendar/calendar-padding-week.utils.js +7 -5
  16. package/dist/components/data-display/calendar/calendar-period-cell.js +45 -46
  17. package/dist/components/data-display/calendar/calendar-quarter-panes.js +33 -31
  18. package/dist/components/data-display/calendar/calendar-selection-appearance.d.ts +9 -0
  19. package/dist/components/data-display/calendar/calendar-selection-appearance.js +56 -43
  20. package/dist/components/data-display/calendar/calendar-selection.d.ts +25 -0
  21. package/dist/components/data-display/calendar/calendar-selection.js +52 -23
  22. package/dist/components/data-display/calendar/calendar-week-number-cell.js +33 -33
  23. package/dist/components/data-display/calendar/calendar-week-utils.d.ts +13 -3
  24. package/dist/components/data-display/calendar/calendar-week-utils.js +59 -50
  25. package/dist/components/data-display/calendar/calendar-year-panes.d.ts +1 -0
  26. package/dist/components/data-display/calendar/calendar-year-panes.js +53 -51
  27. package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
  28. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  29. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  30. package/dist/components/forms/date-picker/fiscal-picker-fixtures.d.ts +17 -0
  31. package/dist/components/forms/date-picker/multi-quarter-picker.js +51 -49
  32. package/dist/components/forms/date-picker/multi-year-picker.js +53 -51
  33. package/dist/components/forms/date-picker/quarter-picker.js +51 -49
  34. package/dist/components/forms/date-picker/quarter-range-picker.js +50 -48
  35. package/dist/components/forms/date-picker/year-picker.js +52 -50
  36. package/dist/components/forms/date-picker/year-range-picker.js +52 -50
  37. package/dist/components/forms/select/components/SelectTriggerValue.js +2 -3
  38. package/dist/components/forms/select/components/Submenu.js +2 -3
  39. package/dist/form-react/Fields/MultiWeekPickerField.js +33 -26
  40. package/dist/form-react/Fields/WeekRangePicker.js +16 -16
  41. package/dist/form-react/types/fields.types.d.ts +2 -0
  42. package/dist/impact-nova-components.css +13 -6
  43. package/dist/impact-nova.css +1 -1
  44. package/dist/lib/fiscal-calendar/week-selection.js +2 -2
  45. package/dist/llms/rules/installation.js +1 -1
  46. package/dist/llms/rules/requirements.js +1 -1
  47. package/package.json +1 -1
@@ -1,85 +1,94 @@
1
1
  import { civilFromLocalDate as l } from "../../../lib/fiscal-calendar/civil-date.js";
2
- import { resolveWeekSelection as W } from "../../../lib/fiscal-calendar/week-selection.js";
3
- function v(e, n) {
4
- const o = e.days[0]?.date;
5
- if (o)
6
- return n?.(o)?.fiscalPeriod;
2
+ import { resolveWeekSelection as S } from "../../../lib/fiscal-calendar/week-selection.js";
3
+ import { isCalendarPaddingWeek as y } from "./calendar-padding-week.utils.js";
4
+ function _(e, r) {
5
+ const a = e.days[0]?.date;
6
+ if (a)
7
+ return r?.(a)?.fiscalPeriod;
7
8
  }
8
- function A(e) {
9
+ function T(e) {
9
10
  return e.calendarKind !== "fiscal" || e.weekPeriod == null || e.panePeriod == null ? !1 : e.weekPeriod !== e.panePeriod;
10
11
  }
11
- function m(e, n) {
12
- return e.year === n.year && e.month === n.month && e.weekOfMonth === n.weekOfMonth;
12
+ function k(e) {
13
+ return e.calendarKind !== "fiscal" || e.weekPeriod == null || e.panePeriod == null ? !1 : e.weekPeriod === e.panePeriod;
13
14
  }
14
- function _(e, n) {
15
- const o = e instanceof Date ? e : e.days.find((t) => !t.outside)?.date ?? e.days[0]?.date ?? /* @__PURE__ */ new Date();
16
- return W(o, n);
15
+ function E(e, r) {
16
+ return k(r) ? !1 : y(e) || T(r);
17
17
  }
18
- function E(e, n, o) {
19
- if (o === "single") return e;
20
- if (o === "multiple") {
21
- const a = n || [];
22
- return a.some((f) => m(f, e)) ? a.filter((f) => !m(f, e)) : [...a, e];
18
+ function d(e, r) {
19
+ return e.year === r.year && e.month === r.month && e.weekOfMonth === r.weekOfMonth;
20
+ }
21
+ function F(e, r) {
22
+ const a = e instanceof Date ? e : e.days.find((t) => !t.outside)?.date ?? e.days[0]?.date ?? /* @__PURE__ */ new Date();
23
+ return S(a, r);
24
+ }
25
+ function H(e, r, a) {
26
+ if (a === "single") return e;
27
+ if (a === "multiple") {
28
+ const i = r || [];
29
+ return i.some((f) => d(f, e)) ? i.filter((f) => !d(f, e)) : [...i, e];
23
30
  }
24
- const t = n;
31
+ const t = r;
25
32
  if (!t?.from || t.to) return { from: e };
26
- if (m(e, t.from)) return t;
33
+ if (d(e, t.from)) return t;
27
34
  const s = { from: t.from, to: e };
28
35
  return e.startDate < t.from.startDate && (s.from = e, s.to = t.from), s;
29
36
  }
30
- function x(e) {
37
+ function R(e) {
31
38
  if (!e) return;
32
- const n = [], o = (t) => {
39
+ const r = [], a = (t) => {
33
40
  const s = new Date(t.startDate);
34
41
  s.setHours(0, 0, 0, 0);
35
- const a = new Date(t.endDate);
36
- for (a.setHours(0, 0, 0, 0); s <= a; )
37
- n.push(new Date(s)), s.setDate(s.getDate() + 1);
42
+ const i = new Date(t.endDate);
43
+ for (i.setHours(0, 0, 0, 0); s <= i; )
44
+ r.push(new Date(s)), s.setDate(s.getDate() + 1);
38
45
  };
39
46
  if (Array.isArray(e))
40
- e.forEach(o);
47
+ e.forEach(a);
41
48
  else if ("from" in e) {
42
49
  if (e.from)
43
50
  if (!e.to)
44
- o(e.from);
51
+ a(e.from);
45
52
  else {
46
53
  const t = new Date(e.from.startDate);
47
54
  t.setHours(0, 0, 0, 0);
48
55
  const s = new Date(e.to.endDate);
49
56
  for (s.setHours(0, 0, 0, 0); t <= s; )
50
- n.push(new Date(t)), t.setDate(t.getDate() + 1);
57
+ r.push(new Date(t)), t.setDate(t.getDate() + 1);
51
58
  }
52
59
  } else
53
- o(e);
54
- return n;
60
+ a(e);
61
+ return r;
55
62
  }
56
- function F(e, n, o) {
63
+ function x(e, r, a) {
57
64
  if (!e || e.length === 0)
58
65
  return { range_start: [], range_middle: [], range_end: [] };
59
- const t = [...e].sort((r, i) => r.getTime() - i.getTime()), s = [], a = [], u = [], f = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
60
- n === "multiple" && Array.isArray(o) && o.forEach((r) => {
61
- f.add(l(r.startDate)), d.add(l(r.endDate));
66
+ const t = [...e].sort((n, o) => n.getTime() - o.getTime()), s = [], i = [], u = [], f = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set();
67
+ r === "multiple" && Array.isArray(a) && a.forEach((n) => {
68
+ f.add(l(n.startDate)), m.add(l(n.endDate));
62
69
  });
63
- const D = (r, i) => {
64
- if (i === 0) return !1;
65
- const c = t[i - 1];
66
- return r.getTime() - c.getTime() <= 1440 * 60 * 1e3;
67
- }, p = (r, i) => i === t.length - 1 ? !1 : t[i + 1].getTime() - r.getTime() <= 1440 * 60 * 1e3;
68
- return t.forEach((r, i) => {
69
- const c = l(r), S = f.has(c), y = d.has(c), h = D(r, i), g = p(r, i);
70
- if (n === "multiple") {
71
- S ? s.push(r) : y ? u.push(r) : a.push(r);
70
+ const D = (n, o) => {
71
+ if (o === 0) return !1;
72
+ const c = t[o - 1];
73
+ return n.getTime() - c.getTime() <= 1440 * 60 * 1e3;
74
+ }, p = (n, o) => o === t.length - 1 ? !1 : t[o + 1].getTime() - n.getTime() <= 1440 * 60 * 1e3;
75
+ return t.forEach((n, o) => {
76
+ const c = l(n), W = f.has(c), P = m.has(c), h = D(n, o), g = p(n, o);
77
+ if (r === "multiple") {
78
+ W ? s.push(n) : P ? u.push(n) : i.push(n);
72
79
  return;
73
80
  }
74
- !h && !g ? (s.push(r), u.push(r)) : h ? g ? a.push(r) : u.push(r) : s.push(r);
75
- }), { range_start: s, range_middle: a, range_end: u };
81
+ !h && !g ? (s.push(n), u.push(n)) : h ? g ? i.push(n) : u.push(n) : s.push(n);
82
+ }), { range_start: s, range_middle: i, range_end: u };
76
83
  }
77
84
  export {
78
- _ as calculateWeekSelection,
79
- F as computeWeekRangeModifiers,
80
- v as fiscalPeriodForWeek,
81
- A as isForeignFiscalWeekRow,
82
- m as isSameWeek,
83
- E as nextWeekSelection,
84
- x as weekSelectionsToDates
85
+ F as calculateWeekSelection,
86
+ x as computeWeekRangeModifiers,
87
+ _ as fiscalPeriodForWeek,
88
+ T as isForeignFiscalWeekRow,
89
+ k as isOwnedFiscalWeekRow,
90
+ d as isSameWeek,
91
+ H as nextWeekSelection,
92
+ E as shouldHideCalendarWeekRow,
93
+ R as weekSelectionsToDates
85
94
  };
@@ -1,6 +1,7 @@
1
1
  import { YearRange, YearSelection } from './calendar.types';
2
2
  export declare const YEAR_PAGE_SIZE = 12;
3
3
  export declare const YEAR_CAPTION_PAGE_SIZE = 6;
4
+ export declare const YEAR_PANE_WIDTH_CLASS = "w-[320px] min-w-[320px] max-w-[320px]";
4
5
  export interface CalendarYearPanesProps {
5
6
  pickerYear: number;
6
7
  resolvedStartYear: number;
@@ -1,63 +1,64 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { ChevronRight as v } from "impact-nova-icons";
3
- import { cn as M } from "../../../lib/utils.js";
4
- import { Button as w } from "../../primitives/button/button.js";
5
- import { CalendarPeriodCell as Y } from "./calendar-period-cell.js";
6
- import { getYearRangeProps as Z, isYearRangeSelection as O } from "./calendar-year-utils.js";
7
- const T = 12, q = 6;
8
- function U({
9
- pickerYear: E,
2
+ import { ChevronRight as A } from "impact-nova-icons";
3
+ import { cn as N } from "../../../lib/utils.js";
4
+ import { Button as S } from "../../primitives/button/button.js";
5
+ import { CalendarPeriodCell as M } from "./calendar-period-cell.js";
6
+ import { PERIOD_RANGE_GRID_CLASSNAME as Y } from "./calendar-selection-appearance.js";
7
+ import { getYearRangeProps as O, isYearRangeSelection as T } from "./calendar-year-utils.js";
8
+ const Z = 12, H = 6, W = "w-[320px] min-w-[320px] max-w-[320px]";
9
+ function V({
10
+ pickerYear: _,
10
11
  resolvedStartYear: d,
11
12
  resolvedEndYear: m,
12
- previousYearLabel: N,
13
- nextYearLabel: S,
14
- yearLabels: a,
13
+ previousYearLabel: R,
14
+ nextYearLabel: u,
15
+ yearLabels: c,
15
16
  yearCaptions: p,
16
- showFooter: R = !0,
17
- pendingYearSelection: b,
18
- selectedYear: A,
19
- isYearSelected: C,
20
- isYearDisabled: _,
21
- onYearPageChange: g,
22
- onYearClick: z
17
+ showFooter: v = !0,
18
+ pendingYearSelection: w,
19
+ selectedYear: C,
20
+ isYearSelected: P,
21
+ isYearDisabled: b,
22
+ onYearPageChange: h,
23
+ onYearClick: I
23
24
  }) {
24
- const o = !!p, t = o ? q : T, i = Math.floor(E / t) * t, h = i + t - 1, s = Array.from({ length: t }, (n, l) => i + l).filter(
25
- (n) => n >= d && n <= m
26
- ), f = s[0] ?? i, x = s[s.length - 1] ?? h, c = R ? b : A, u = O(c) ? c : void 0;
25
+ const i = !!p, n = i ? H : Z, o = Math.floor(_ / n) * n, f = o + n - 1, s = Array.from({ length: n }, (t, l) => o + l).filter(
26
+ (t) => t >= d && t <= m
27
+ ), g = s[0] ?? o, E = s[s.length - 1] ?? f, a = v ? w : C, x = T(a) ? a : void 0;
27
28
  return /* @__PURE__ */ r(
28
29
  "div",
29
30
  {
30
31
  "data-slot": "year-panes",
31
- className: "flex w-[280px] min-w-[280px] max-w-[280px] flex-col gap-4 overflow-hidden p-3",
32
+ className: N("flex flex-col gap-4 overflow-hidden p-3", W),
32
33
  children: [
33
34
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: [
34
35
  /* @__PURE__ */ e(
35
- w,
36
+ S,
36
37
  {
37
38
  variant: "ghost",
38
39
  size: "icon",
39
40
  className: "h-7 w-7 shrink-0",
40
- "aria-label": N,
41
- disabled: i <= d,
42
- onClick: () => g(i - t),
43
- children: /* @__PURE__ */ e(v, { size: 16, className: "rotate-180" })
41
+ "aria-label": R,
42
+ disabled: o <= d,
43
+ onClick: () => h(o - n),
44
+ children: /* @__PURE__ */ e(A, { size: 16, className: "rotate-180" })
44
45
  }
45
46
  ),
46
47
  /* @__PURE__ */ r("div", { className: "text-sm font-medium text-content", children: [
47
- a?.(f) ?? f,
48
+ c?.(g) ?? g,
48
49
  " – ",
49
- a?.(x) ?? x
50
+ c?.(E) ?? E
50
51
  ] }),
51
52
  /* @__PURE__ */ e(
52
- w,
53
+ S,
53
54
  {
54
55
  variant: "ghost",
55
56
  size: "icon",
56
57
  className: "h-7 w-7",
57
- "aria-label": S,
58
- disabled: h >= m,
59
- onClick: () => g(i + t),
60
- children: /* @__PURE__ */ e(v, { className: "h-4 w-4" })
58
+ "aria-label": u,
59
+ disabled: f >= m,
60
+ onClick: () => h(o + n),
61
+ children: /* @__PURE__ */ e(A, { className: "h-4 w-4" })
61
62
  }
62
63
  )
63
64
  ] }),
@@ -65,26 +66,26 @@ function U({
65
66
  "div",
66
67
  {
67
68
  "data-period-grid": "",
68
- className: M("grid min-w-0 gap-2", o ? "grid-cols-2" : "grid-cols-3"),
69
- children: s.map((n) => {
70
- const l = C(n), P = _(n), k = !!u, { isStart: B, isEnd: j, isMiddle: I } = Z(n, c), G = p?.(n);
69
+ className: N(Y, i ? "grid-cols-2" : "grid-cols-3"),
70
+ children: s.map((t) => {
71
+ const l = P(t), z = b(t), k = !!x, { isStart: B, isEnd: G, isMiddle: j } = O(t, a), D = p?.(t);
71
72
  return /* @__PURE__ */ e(
72
- Y,
73
+ M,
73
74
  {
74
75
  selected: l,
75
- disabled: P,
76
+ disabled: z,
76
77
  isRange: k,
77
78
  isStart: B,
78
- isEnd: j,
79
- isMiddle: I,
80
- hasRangeEnd: !!u?.to,
81
- size: o ? "year-caption" : "year",
82
- columns: o ? 2 : 3,
83
- onClick: () => z(n),
84
- caption: G,
85
- children: a?.(n) ?? String(n)
79
+ isEnd: G,
80
+ isMiddle: j,
81
+ hasRangeEnd: !!x?.to,
82
+ size: i ? "year-caption" : "year",
83
+ columns: i ? 2 : 3,
84
+ onClick: () => I(t),
85
+ caption: D,
86
+ children: c?.(t) ?? String(t)
86
87
  },
87
- n
88
+ t
88
89
  );
89
90
  })
90
91
  }
@@ -94,7 +95,8 @@ function U({
94
95
  );
95
96
  }
96
97
  export {
97
- U as CalendarYearPanes,
98
- q as YEAR_CAPTION_PAGE_SIZE,
99
- T as YEAR_PAGE_SIZE
98
+ V as CalendarYearPanes,
99
+ H as YEAR_CAPTION_PAGE_SIZE,
100
+ Z as YEAR_PAGE_SIZE,
101
+ W as YEAR_PANE_WIDTH_CLASS
100
102
  };
@@ -1,7 +1,6 @@
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
- import "react";
4
- const p = (i, r, a) => /* @__PURE__ */ t(l, { children: [
3
+ const d = (i, r, a) => /* @__PURE__ */ t(l, { children: [
5
4
  /* @__PURE__ */ e(n, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "inline-flex items-center justify-center h-full w-full", children: i }) }),
6
5
  /* @__PURE__ */ e(o, { variant: "tertiary", className: a, children: r })
7
6
  ] }), h = (i, r) => /* @__PURE__ */ t(l, { children: [
@@ -10,5 +9,5 @@ const p = (i, r, a) => /* @__PURE__ */ t(l, { children: [
10
9
  ] });
11
10
  export {
12
11
  h as defaultAccordionTooltipRender,
13
- p as defaultTabTooltipRender
12
+ d as defaultTabTooltipRender
14
13
  };
@@ -2,17 +2,17 @@ import { jsx as r, jsxs as h, Fragment as z } from "react/jsx-runtime";
2
2
  import * as o from "react";
3
3
  import { Person as G, Monitor as U, PriorityAlert as q, Locked as O, Reset as B } from "impact-nova-icons";
4
4
  import { cn as p } from "../../../lib/utils.js";
5
- import { Kbd as $ } from "../../primitives/kbd/kbd.js";
6
- import { keybindingToString as H } from "../../primitives/kbd/keybinding-display.js";
7
5
  import { OverflowTooltip as A } from "../../feedback/tooltip/overflow-tooltip.js";
8
- import { ModuleRegistry as V, AllCommunityModule as J } from "ag-grid-community";
9
- import { AllEnterpriseModule as Q } from "ag-grid-enterprise";
10
- import { DataTable as X, DataTableContent as Y } from "../../data/data-table/data-table.js";
6
+ import { ModuleRegistry as $, AllCommunityModule as H } from "ag-grid-community";
7
+ import { AllEnterpriseModule as V } from "ag-grid-enterprise";
8
+ import { DataTable as J, DataTableContent as Q } from "../../data/data-table/data-table.js";
11
9
  import { AG_CELL_NO_PADDING as F } from "../../data/ag-grid-react/cell-renderers/index.js";
10
+ import { Kbd as X } from "../../primitives/kbd/kbd.js";
11
+ import { keybindingToString as Y } from "../../primitives/kbd/keybinding-display.js";
12
12
  import { useCommandPalette as Z } from "./use-command-palette.js";
13
13
  import { COMMAND_SOURCE_LABELS as m, keybindingFromEvent as W, isReservedShortcut as ee } from "./utils.js";
14
14
  import { BadgeCellRenderer as te } from "../../data/ag-grid-react/cell-renderers/badge-cell-renderer.js";
15
- V.registerModules([J, Q]);
15
+ $.registerModules([H, V]);
16
16
  function re(a) {
17
17
  const t = a.data;
18
18
  return t ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
@@ -69,7 +69,7 @@ function ne(a) {
69
69
  "flex items-center justify-end h-full w-full text-end",
70
70
  t.customisable ? "cursor-pointer" : "cursor-default opacity-70"
71
71
  ),
72
- children: /* @__PURE__ */ r($, { keybinding: t.keybinding, size: "sm" })
72
+ children: /* @__PURE__ */ r(X, { keybinding: t.keybinding, size: "sm" })
73
73
  }
74
74
  ) : t.customisable ? /* @__PURE__ */ r(
75
75
  "button",
@@ -133,7 +133,7 @@ function le({
133
133
  description: e.description || "",
134
134
  category: e.category || "General",
135
135
  keybinding: i,
136
- keybindingDisplay: i ? H(i) : "",
136
+ keybindingDisplay: i ? Y(i) : "",
137
137
  scope: e.scope,
138
138
  source: D,
139
139
  sourceColor: T ? "primary" : "neutral",
@@ -278,10 +278,10 @@ function le({
278
278
  u?.type === "conflict" ? /* @__PURE__ */ r(q, { className: "h-3.5 w-3.5 shrink-0" }) : u?.type === "reserved" ? /* @__PURE__ */ r(O, { className: "h-3.5 w-3.5 shrink-0" }) : c ? /* @__PURE__ */ r("span", { className: "shrink-0 text-base", children: "⌨️" }) : null,
279
279
  /* @__PURE__ */ r("span", { children: u ? u.text : L })
280
280
  ] }) : null;
281
- return /* @__PURE__ */ h(X, { className: p("flex flex-col w-full h-full border-t-0", a), children: [
281
+ return /* @__PURE__ */ h(J, { className: p("flex flex-col w-full h-full border-t-0", a), children: [
282
282
  s ? s(E) : E,
283
283
  /* @__PURE__ */ r(
284
- Y,
284
+ Q,
285
285
  {
286
286
  rowData: y,
287
287
  columnDefs: I,
@@ -6,8 +6,8 @@ import { cn as o } from "../../../lib/utils.js";
6
6
  import { MultiColorFilter as F, Cross as P, InfoBadge as u } from "impact-nova-icons";
7
7
  import { Button as D } from "../../primitives/button/button.js";
8
8
  import { Tooltip as c, TooltipTrigger as f, TooltipContent as h } from "../../feedback/tooltip/tooltip.js";
9
- import { Kbd as S } from "../../primitives/kbd/kbd.js";
10
- import { OverflowTooltip as j } from "../../feedback/tooltip/overflow-tooltip.js";
9
+ import { OverflowTooltip as S } from "../../feedback/tooltip/overflow-tooltip.js";
10
+ import { Kbd as j } from "../../primitives/kbd/kbd.js";
11
11
  import { useImpactNovaI18n as v } from "../../../i18n/use-impact-nova-i18n.js";
12
12
  import { useOverlayHostDismissNestedLayersOnNavigation as I } from "../../../lib/overlay/overlay-portal-context.js";
13
13
  import { preventDismissOnTooltipOutside as x } from "../../../lib/overlay/prevent-dismiss-on-tooltip-outside.js";
@@ -145,14 +145,14 @@ const O = ({
145
145
  ),
146
146
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1 min-w-0", children: [
147
147
  /* @__PURE__ */ e(
148
- j,
148
+ S,
149
149
  {
150
150
  triggerClassName: "truncate font-['Manrope'] block min-w-0",
151
151
  content: t.tooltipKeybinding ? /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
152
152
  t.label,
153
153
  " ",
154
154
  /* @__PURE__ */ e(
155
- S,
155
+ j,
156
156
  {
157
157
  keybinding: t.tooltipKeybinding,
158
158
  size: "sm"
@@ -0,0 +1,17 @@
1
+ /** Reusable fiscal picker configs. Named by pattern, week start, and FY start month. */
2
+ export declare const FISCAL_454_SUNDAY_FEBRUARY: {
3
+ calendarKind: "fiscal";
4
+ fiscalMode: "advanced";
5
+ fiscalYearStartMonth: number;
6
+ fiscalMonthPattern: number[];
7
+ weekStartsOn: 0;
8
+ };
9
+ export declare const FISCAL_454_MONDAY_JANUARY: {
10
+ calendarKind: "fiscal";
11
+ fiscalMode: "advanced";
12
+ fiscalYearStartMonth: number;
13
+ fiscalMonthPattern: number[];
14
+ weekStartsOn: 1;
15
+ };
16
+ /** Selectability bound only — do not copy onto startMonth. */
17
+ export declare const MIN_DATE_2025_08_17: Date;
@@ -1,18 +1,18 @@
1
1
  import { jsx as r, jsxs as g } from "react/jsx-runtime";
2
2
  import * as n from "react";
3
- import { Cross as Z, CalendarMonth as _ } from "impact-nova-icons";
4
- import { cn as $ } from "../../../lib/utils.js";
5
- import { Input as ee } from "../input/input.js";
6
- import { Calendar as te } from "../../data-display/calendar/calendar.js";
3
+ import { Cross as _, CalendarMonth as $ } from "impact-nova-icons";
4
+ import { cn as ee } from "../../../lib/utils.js";
5
+ import { Input as te } from "../input/input.js";
6
+ import { Calendar as re } from "../../data-display/calendar/calendar.js";
7
7
  import { Tooltip as M, TooltipTrigger as x, TooltipContent as b } from "../../feedback/tooltip/tooltip.js";
8
- import { useImpactNovaI18n as re } from "../../../i18n/use-impact-nova-i18n.js";
9
- import { buildDateBoundsMatcher as ne } from "../../../lib/date-bounds-matcher.js";
10
- import { fiscalCalendarPassThrough as oe } from "./fiscal-pass-through.js";
11
- import { DatePickerShell as ae } from "./date-picker-shell.js";
12
- import { usePickerDismissActionsRef as ie, usePickerFooterDismissNudge as ce, handleReadonlyPickerKeyDown as se, handlePickerSurfacePointerDown as le } from "./date-input-behavior.js";
13
- import { formatQuarterInput as pe } from "../../data-display/calendar/calendar-fiscal-labels.js";
14
- import { viewMonthFromQuarter as ue } from "../../data-display/calendar/calendar-quarter-utils.js";
15
- const fe = n.forwardRef(
8
+ import { useImpactNovaI18n as ne } from "../../../i18n/use-impact-nova-i18n.js";
9
+ import { buildDateBoundsMatcher as oe } from "../../../lib/date-bounds-matcher.js";
10
+ import { fiscalCalendarPassThrough as ae } from "./fiscal-pass-through.js";
11
+ import { DatePickerShell as ie } from "./date-picker-shell.js";
12
+ import { usePickerDismissActionsRef as ce, usePickerFooterDismissNudge as se, handleReadonlyPickerKeyDown as le, handlePickerSurfacePointerDown as pe } from "./date-input-behavior.js";
13
+ import { formatQuarterInput as ue } from "../../data-display/calendar/calendar-fiscal-labels.js";
14
+ import { viewMonthFromQuarter as fe } from "../../data-display/calendar/calendar-quarter-utils.js";
15
+ const de = n.forwardRef(
16
16
  ({
17
17
  value: t,
18
18
  onChange: u,
@@ -30,31 +30,33 @@ const fe = n.forwardRef(
30
30
  fiscalMonthPattern: w,
31
31
  fiscalYearStartMonth: v,
32
32
  fiscalConfig: K,
33
- showPresets: j,
34
- showPeriodBoundaries: F,
35
- autoNavigateToAvailable: z,
36
- ...E
37
- }, H) => {
38
- const { t: a } = re(), L = R ?? a("datePicker.selectMultipleQuarters"), f = n.useRef(null), y = n.useRef(null);
39
- n.useImperativeHandle(H, () => f.current);
40
- const [i, c] = n.useState(!1), d = n.useRef(!1), k = ie(), { footerFlashKey: V, footerFlashTarget: q, popoverHandlers: B } = ce(s, i, k, y), [P, l] = n.useState(t), [G, J] = n.useState(ue(t?.[0]));
33
+ weekStartsOn: j,
34
+ showPresets: F,
35
+ showPeriodBoundaries: z,
36
+ autoNavigateToAvailable: E,
37
+ ...H
38
+ }, L) => {
39
+ const { t: a } = ne(), V = R ?? a("datePicker.selectMultipleQuarters"), f = n.useRef(null), y = n.useRef(null);
40
+ n.useImperativeHandle(L, () => f.current);
41
+ const [i, c] = n.useState(!1), d = n.useRef(!1), k = ce(), { footerFlashKey: q, footerFlashTarget: B, popoverHandlers: G } = se(s, i, k, y), [P, l] = n.useState(t), [J, U] = n.useState(fe(t?.[0]));
41
42
  n.useEffect(() => {
42
43
  i || l(t);
43
44
  }, [i, t]);
44
- const m = n.useCallback(() => c(!1), []), U = oe({
45
+ const m = n.useCallback(() => c(!1), []), W = ae({
45
46
  calendarKind: I,
46
47
  fiscalMode: O,
47
48
  granularity: T,
48
49
  fiscalMonthPattern: w,
49
50
  fiscalYearStartMonth: v,
50
51
  fiscalConfig: K,
51
- showPresets: j,
52
- showPeriodBoundaries: F,
53
- autoNavigateToAvailable: z
54
- }), W = (e) => {
52
+ weekStartsOn: j,
53
+ showPresets: F,
54
+ showPeriodBoundaries: z,
55
+ autoNavigateToAvailable: E
56
+ }), X = (e) => {
55
57
  const p = Array.isArray(e) && e.length > 0 ? e : void 0;
56
58
  l(p), s || u?.(p);
57
- }, X = () => {
59
+ }, Y = () => {
58
60
  u?.(P), m();
59
61
  }, h = () => {
60
62
  l(t), m();
@@ -64,9 +66,9 @@ const fe = n.forwardRef(
64
66
  n.useLayoutEffect(() => {
65
67
  k.current = { onDismiss: h, resolveFlash: () => "cancel" };
66
68
  });
67
- const Y = t && t.length > 0 ? t.length === 1 ? pe(t[0]) : a("datePicker.quartersSelected", { count: t.length }) : "";
69
+ const Z = t && t.length > 0 ? t.length === 1 ? ue(t[0]) : a("datePicker.quartersSelected", { count: t.length }) : "";
68
70
  return /* @__PURE__ */ r(
69
- ae,
71
+ ie,
70
72
  {
71
73
  open: i,
72
74
  disabled: o,
@@ -77,26 +79,26 @@ const fe = n.forwardRef(
77
79
  onOpenAutoFocus: (e) => {
78
80
  d.current || e.preventDefault(), d.current = !1;
79
81
  },
80
- popoverHandlers: B,
82
+ popoverHandlers: G,
81
83
  trigger: /* @__PURE__ */ r(
82
84
  "div",
83
85
  {
84
86
  ref: y,
85
87
  "data-component": "multi-quarter-picker",
86
88
  "data-state": i ? "open" : "closed",
87
- onPointerDown: (e) => le({
89
+ onPointerDown: (e) => pe({
88
90
  disabled: o,
89
91
  event: e,
90
92
  onOpen: () => c(!0),
91
93
  focusField: () => f.current?.focus()
92
94
  }),
93
95
  children: /* @__PURE__ */ r(
94
- ee,
96
+ te,
95
97
  {
96
98
  ref: f,
97
- value: Y,
99
+ value: Z,
98
100
  readOnly: !0,
99
- onKeyDown: (e) => se(e, {
101
+ onKeyDown: (e) => le(e, {
100
102
  disabled: o,
101
103
  open: i,
102
104
  onOpen: () => c(!0),
@@ -106,10 +108,10 @@ const fe = n.forwardRef(
106
108
  }
107
109
  }),
108
110
  onClick: () => !o && c(!0),
109
- placeholder: L,
111
+ placeholder: V,
110
112
  disabled: o,
111
113
  "data-form-control": "input",
112
- className: $("cursor-pointer", A),
114
+ className: ee("cursor-pointer", A),
113
115
  suffix: /* @__PURE__ */ g("div", { className: "flex items-center gap-1", children: [
114
116
  t && t.length > 0 && !o ? /* @__PURE__ */ g(M, { children: [
115
117
  /* @__PURE__ */ r(x, { asChild: !0, children: /* @__PURE__ */ r(
@@ -122,7 +124,7 @@ const fe = n.forwardRef(
122
124
  e.stopPropagation(), C();
123
125
  },
124
126
  className: "inline-flex size-4 items-center justify-center border-none bg-transparent p-0",
125
- children: /* @__PURE__ */ r(Z, { className: "size-3 hover:text-content" })
127
+ children: /* @__PURE__ */ r(_, { className: "size-3 hover:text-content" })
126
128
  }
127
129
  ) }),
128
130
  /* @__PURE__ */ r(b, { variant: "tertiary", side: "top", children: a("calendar.clear") })
@@ -139,43 +141,43 @@ const fe = n.forwardRef(
139
141
  e.stopPropagation(), o || c((p) => !p);
140
142
  },
141
143
  className: "inline-flex items-center justify-center border-none bg-transparent p-0",
142
- children: /* @__PURE__ */ r(_, { className: "h-4 w-4 text-secondary-foreground" })
144
+ children: /* @__PURE__ */ r($, { className: "h-4 w-4 text-secondary-foreground" })
143
145
  }
144
146
  ) }),
145
147
  /* @__PURE__ */ r(b, { variant: "tertiary", side: "top", children: a("datePicker.selectMultipleQuarters") })
146
148
  ] })
147
149
  ] }),
148
- ...E
150
+ ...H
149
151
  }
150
152
  )
151
153
  }
152
154
  ),
153
155
  children: /* @__PURE__ */ r(
154
- te,
156
+ re,
155
157
  {
156
158
  pickerType: "quarter",
157
159
  monthMode: "multiple",
158
160
  selectedQuarters: P,
159
- footerFlashKey: V,
160
- footerFlashTarget: q,
161
- onQuarterSelect: W,
162
- month: G,
163
- onMonthChange: J,
164
- disabled: ne(D, Q),
161
+ footerFlashKey: q,
162
+ footerFlashTarget: B,
163
+ onQuarterSelect: X,
164
+ month: J,
165
+ onMonthChange: U,
166
+ disabled: oe(D, Q),
165
167
  startMonth: N,
166
168
  endMonth: S,
167
169
  showFooter: s,
168
- onApply: X,
170
+ onApply: Y,
169
171
  onCancel: h,
170
172
  onClear: C,
171
- ...U
173
+ ...W
172
174
  }
173
175
  )
174
176
  }
175
177
  );
176
178
  }
177
179
  );
178
- fe.displayName = "MultiQuarterPicker";
180
+ de.displayName = "MultiQuarterPicker";
179
181
  export {
180
- fe as MultiQuarterPicker
182
+ de as MultiQuarterPicker
181
183
  };