impact-nova 2.2.2 → 2.2.4

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 (58) hide show
  1. package/dist/components/data/ag-grid-react/headers/custom-header.js +133 -110
  2. package/dist/components/data/ag-grid-react/headers/header-search-input.js +23 -23
  3. package/dist/components/data/ag-grid-react/index.js +202 -206
  4. package/dist/components/data/data-table/build-column-tree-from-grid.js +65 -67
  5. package/dist/components/data/data-table/data-table-column-list-sync.js +5 -10
  6. package/dist/components/data/data-table/data-table-column-list.js +64 -61
  7. package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +29 -0
  8. package/dist/components/data/data-table/data-table-column-tree-cache.js +117 -0
  9. package/dist/components/data/data-table/data-table-constants.d.ts +2 -0
  10. package/dist/components/data/data-table/data-table-constants.js +3 -2
  11. package/dist/components/data/data-table/data-table-sheet.js +46 -49
  12. package/dist/components/data/data-table/data-table.js +137 -119
  13. package/dist/components/data/data-table/index.js +24 -23
  14. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +3 -0
  15. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +24 -0
  16. package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +2 -1
  17. package/dist/components/data/data-table/use-data-table-column-list-sync.js +249 -150
  18. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +6 -7
  19. package/dist/components/data/nested-list/components/NestedListContent.js +158 -96
  20. package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -0
  21. package/dist/components/data/nested-list/nested-list-constants.js +6 -0
  22. package/dist/components/data/nested-list/nested-list-tree-utils.d.ts +3 -0
  23. package/dist/components/data/nested-list/nested-list-tree-utils.js +24 -0
  24. package/dist/components/data/nested-list/nested-list.js +214 -215
  25. package/dist/components/data-display/calendar/calendar-day-picker-view.d.ts +3 -2
  26. package/dist/components/data-display/calendar/calendar-day-picker-view.js +70 -68
  27. package/dist/components/data-display/calendar/calendar-week-number-cell.js +29 -29
  28. package/dist/components/data-display/calendar/calendar.js +96 -94
  29. package/dist/components/data-display/calendar/calendar.types.d.ts +2 -0
  30. package/dist/components/data-display/card/card.js +6 -5
  31. package/dist/components/feedback/dialog/dialog.js +7 -5
  32. package/dist/components/feedback/sheet/sheet.js +28 -27
  33. package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
  34. package/dist/components/flows/filter-panel/filter-panel.js +61 -57
  35. package/dist/components/flows/filter-strip/filter-tag-list.js +33 -33
  36. package/dist/components/forms/combobox/combobox.js +110 -100
  37. package/dist/components/forms/date-picker/date-input-behavior.d.ts +9 -0
  38. package/dist/components/forms/date-picker/date-input-behavior.js +32 -19
  39. package/dist/components/forms/date-picker/date-picker.js +96 -90
  40. package/dist/components/forms/date-picker/date-range-picker.js +160 -152
  41. package/dist/components/forms/date-picker/month-picker.js +71 -65
  42. package/dist/components/forms/date-picker/month-range-picker.js +153 -145
  43. package/dist/components/forms/date-picker/multi-date-picker.js +127 -99
  44. package/dist/components/forms/date-picker/multi-month-picker.js +109 -97
  45. package/dist/components/forms/date-picker/multi-week-picker.js +98 -86
  46. package/dist/components/forms/date-picker/week-picker.js +82 -76
  47. package/dist/components/forms/date-picker/week-range-picker.js +127 -119
  48. package/dist/impact-nova-base.scss +10 -5
  49. package/dist/impact-nova-components.css +9 -5
  50. package/dist/impact-nova.css +1 -1
  51. package/dist/index.js +189 -188
  52. package/dist/lib/overlay/overlay-portal-context.d.ts +11 -2
  53. package/dist/lib/overlay/overlay-portal-context.js +39 -28
  54. package/dist/lib/primitives/create-compound.d.ts +5 -0
  55. package/dist/lib/primitives/create-compound.js +17 -16
  56. package/dist/llms/rules/installation.js +1 -1
  57. package/dist/llms/rules/requirements.js +1 -1
  58. package/package.json +2 -1
@@ -1,120 +1,148 @@
1
- import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
- import * as o from "react";
3
- import { Cross as $, CalendarMonth as q } from "impact-nova-icons";
4
- import { format as G } from "date-fns";
5
- import { cn as J } from "../../../lib/utils.js";
6
- import { Input as Q } from "../input/input.js";
7
- import { Popover as U, PopoverAnchor as W, PopoverContent as X } from "../../feedback/popover/popover.js";
8
- import { Calendar as Y } from "../../data-display/calendar/calendar.js";
9
- import { Tooltip as D, TooltipTrigger as P, TooltipContent as k } from "../../feedback/tooltip/tooltip.js";
10
- import { useImpactNovaI18n as Z } from "../../../i18n/use-impact-nova-i18n.js";
11
- import { getDateFnsLocale as _ } from "../../../i18n/getDateFnsLocale.js";
12
- import { coerceDateArrayApply as w, coerceDateArray as ee } from "./calendar-selection-adapters.js";
13
- import { usePickerDismissActionsRef as te, usePickerFooterDismissNudge as re } from "./date-input-behavior.js";
1
+ import { jsxs as f, jsx as r } from "react/jsx-runtime";
2
+ import * as a from "react";
3
+ import { Cross as H, CalendarMonth as V } from "impact-nova-icons";
4
+ import { format as $ } from "date-fns";
5
+ import { cn as G } from "../../../lib/utils.js";
6
+ import { Input as J } from "../input/input.js";
7
+ import { Popover as Q, PopoverAnchor as U, PopoverContent as W } from "../../feedback/popover/popover.js";
8
+ import { Calendar as X } from "../../data-display/calendar/calendar.js";
9
+ import { Tooltip as P, TooltipTrigger as C, TooltipContent as k } from "../../feedback/tooltip/tooltip.js";
10
+ import { useImpactNovaI18n as Y } from "../../../i18n/use-impact-nova-i18n.js";
11
+ import { getDateFnsLocale as Z } from "../../../i18n/getDateFnsLocale.js";
12
+ import { coerceDateArrayApply as _, coerceDateArray as ee } from "./calendar-selection-adapters.js";
13
+ import { usePickerDismissActionsRef as te, usePickerFooterDismissNudge as re, handlePickerSurfacePointerDown as ne } from "./date-input-behavior.js";
14
14
  import { buildDateBoundsMatcher as oe } from "../../../lib/date-bounds-matcher.js";
15
- const ne = o.forwardRef(
15
+ const ae = a.forwardRef(
16
16
  ({
17
- value: e,
18
- onChange: f,
19
- format: A = "MM/dd/yyyy",
17
+ value: t,
18
+ onChange: m,
19
+ format: x = "MM/dd/yyyy",
20
20
  placeholder: M,
21
- minDate: x,
21
+ minDate: A,
22
22
  maxDate: N,
23
- startMonth: T,
24
- endMonth: b,
25
- showFooter: s = !0,
26
- disabled: a,
23
+ startMonth: b,
24
+ endMonth: T,
25
+ showFooter: l = !0,
26
+ disabled: n,
27
27
  className: R,
28
- ...L
29
- }, v) => {
30
- const { locale: u, t: i } = Z(), F = o.useMemo(() => _(u), [u]), I = M ?? i("datePicker.selectMultipleDates"), [p, c] = o.useState(!1), h = o.useRef(null), y = te(), { footerFlashKey: S, footerFlashTarget: j, popoverHandlers: O } = re(s, p, y, h), [l, d] = o.useState(e);
31
- o.useEffect(() => {
32
- d(e);
33
- }, [p, e]);
34
- const z = (t) => {
35
- const n = ee(t);
36
- d(n), s || f?.(n);
37
- }, E = (t) => {
38
- const n = w(t, l);
39
- f?.(n), c(!1);
28
+ ...S
29
+ }, F) => {
30
+ const { locale: h, t: s } = Y(), I = a.useMemo(() => Z(h), [h]), L = M ?? s("datePicker.selectMultipleDates"), [i, o] = a.useState(!1), u = a.useRef(null), y = te(), { footerFlashKey: j, footerFlashTarget: O, popoverHandlers: w } = re(l, i, y, u), [p, d] = a.useState(t);
31
+ a.useEffect(() => {
32
+ d(t);
33
+ }, [i, t]);
34
+ const E = (e) => {
35
+ const c = ee(e);
36
+ d(c), l || m?.(c);
37
+ }, v = (e) => {
38
+ const c = _(e, p);
39
+ m?.(c), o(!1);
40
40
  }, g = () => {
41
- d(e), c(!1);
42
- }, C = () => {
43
- d(void 0), f?.(void 0), s || c(!1);
44
- }, B = e && e.length > 0 ? e.length === 1 ? G(e[0], A, { locale: F }) : `${e.length} dates selected` : "", H = o.useCallback(() => {
45
- const t = l?.length ?? 0, n = e?.length ?? 0;
46
- return t === n && (l ?? []).every(
47
- (K, V) => K.getTime() === e?.[V]?.getTime()
48
- ) ? "dismiss" : t > 0 ? "apply" : "cancel";
49
- }, [l, e]);
50
- return o.useLayoutEffect(() => {
41
+ d(t), o(!1);
42
+ }, D = () => {
43
+ d(void 0), m?.(void 0), l || o(!1);
44
+ }, z = t && t.length > 0 ? t.length === 1 ? $(t[0], x, { locale: I }) : `${t.length} dates selected` : "", K = a.useCallback(() => {
45
+ const e = p?.length ?? 0, c = t?.length ?? 0;
46
+ return e === c && (p ?? []).every(
47
+ (q, B) => q.getTime() === t?.[B]?.getTime()
48
+ ) ? "dismiss" : e > 0 ? "apply" : "cancel";
49
+ }, [p, t]);
50
+ return a.useLayoutEffect(() => {
51
51
  y.current = {
52
52
  onDismiss: g,
53
- resolveFlash: H
53
+ resolveFlash: K
54
54
  };
55
- }), /* @__PURE__ */ m(U, { open: a ? !1 : p, onOpenChange: (t) => {
56
- a || !t && s || c(t);
55
+ }), /* @__PURE__ */ f(Q, { open: n ? !1 : i, onOpenChange: (e) => {
56
+ n || !e && l || o(e);
57
57
  }, children: [
58
- /* @__PURE__ */ r(W, { asChild: !0, children: /* @__PURE__ */ r("div", { ref: h, children: /* @__PURE__ */ r(
59
- Q,
58
+ /* @__PURE__ */ r(U, { asChild: !0, children: /* @__PURE__ */ r(
59
+ "div",
60
60
  {
61
- ref: v,
62
- value: B,
63
- placeholder: I,
64
- readOnly: !0,
65
- disabled: a,
66
- onClick: () => {
67
- !a && !p && c(!0);
68
- },
69
- className: J("cursor-pointer", R),
70
- suffix: /* @__PURE__ */ m("div", { className: "flex items-center gap-1", children: [
71
- e && e.length > 0 && !a && /* @__PURE__ */ m(D, { children: [
72
- /* @__PURE__ */ r(P, { asChild: !0, children: /* @__PURE__ */ r(
73
- "button",
74
- {
75
- type: "button",
76
- tabIndex: 0,
77
- "aria-label": i("calendar.clear"),
78
- onClick: (t) => {
79
- t.stopPropagation(), C();
80
- },
81
- className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
82
- children: /* @__PURE__ */ r($, { className: "size-3 hover:text-content" })
83
- }
84
- ) }),
85
- /* @__PURE__ */ r(k, { variant: "tertiary", side: "top", children: i("calendar.clear") })
86
- ] }),
87
- /* @__PURE__ */ m(D, { children: [
88
- /* @__PURE__ */ r(P, { asChild: !0, children: /* @__PURE__ */ r(q, { className: "h-4 w-4 text-secondary-foreground" }) }),
89
- /* @__PURE__ */ r(k, { variant: "tertiary", side: "top", children: i("datePicker.selectMultipleDates") })
90
- ] })
91
- ] }),
92
- ...L
61
+ ref: u,
62
+ onPointerDown: (e) => ne({
63
+ disabled: n,
64
+ event: e,
65
+ onOpen: () => o(!0),
66
+ focusField: () => u.current?.querySelector("input")?.focus()
67
+ }),
68
+ children: /* @__PURE__ */ r(
69
+ J,
70
+ {
71
+ ref: F,
72
+ value: z,
73
+ placeholder: L,
74
+ readOnly: !0,
75
+ disabled: n,
76
+ onClick: () => {
77
+ !n && !i && o(!0);
78
+ },
79
+ className: G("cursor-pointer", R),
80
+ suffix: /* @__PURE__ */ f("div", { className: "flex items-center gap-1", children: [
81
+ t && t.length > 0 && !n && /* @__PURE__ */ f(P, { children: [
82
+ /* @__PURE__ */ r(C, { asChild: !0, children: /* @__PURE__ */ r(
83
+ "button",
84
+ {
85
+ type: "button",
86
+ tabIndex: 0,
87
+ "aria-label": s("calendar.clear"),
88
+ onClick: (e) => {
89
+ e.stopPropagation(), D();
90
+ },
91
+ className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
92
+ children: /* @__PURE__ */ r(H, { className: "size-3 hover:text-content" })
93
+ }
94
+ ) }),
95
+ /* @__PURE__ */ r(k, { variant: "tertiary", side: "top", children: s("calendar.clear") })
96
+ ] }),
97
+ /* @__PURE__ */ f(P, { children: [
98
+ /* @__PURE__ */ r(C, { asChild: !0, children: /* @__PURE__ */ r(
99
+ "button",
100
+ {
101
+ type: "button",
102
+ tabIndex: 0,
103
+ "data-component": "calendar-trigger",
104
+ "aria-label": s("datePicker.selectMultipleDates"),
105
+ onPointerDown: (e) => {
106
+ e.preventDefault(), e.stopPropagation(), n || o(!i);
107
+ },
108
+ onKeyDown: (e) => {
109
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), n || o(!i));
110
+ },
111
+ className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer",
112
+ children: /* @__PURE__ */ r(V, { className: "h-4 w-4 text-secondary-foreground" })
113
+ }
114
+ ) }),
115
+ /* @__PURE__ */ r(k, { variant: "tertiary", side: "top", children: s("datePicker.selectMultipleDates") })
116
+ ] })
117
+ ] }),
118
+ ...S
119
+ }
120
+ )
93
121
  }
94
- ) }) }),
122
+ ) }),
95
123
  /* @__PURE__ */ r(
96
- X,
124
+ W,
97
125
  {
98
126
  className: "w-auto p-0",
99
127
  align: "start",
100
- "aria-label": i("datePicker.selectMultipleDates"),
101
- onOpenAutoFocus: (t) => t.preventDefault(),
102
- ...O,
128
+ "aria-label": s("datePicker.selectMultipleDates"),
129
+ onOpenAutoFocus: (e) => e.preventDefault(),
130
+ ...w,
103
131
  children: /* @__PURE__ */ r(
104
- Y,
132
+ X,
105
133
  {
106
134
  mode: "multiple",
107
- selected: l,
108
- footerFlashKey: S,
109
- footerFlashTarget: j,
110
- onSelect: z,
111
- disabled: oe(x, N),
112
- startMonth: T,
113
- endMonth: b,
114
- showFooter: s,
115
- onApply: E,
135
+ selected: p,
136
+ footerFlashKey: j,
137
+ footerFlashTarget: O,
138
+ onSelect: E,
139
+ disabled: oe(A, N),
140
+ startMonth: b,
141
+ endMonth: T,
142
+ showFooter: l,
143
+ onApply: v,
116
144
  onCancel: g,
117
- onClear: C,
145
+ onClear: D,
118
146
  captionLayout: "dropdown"
119
147
  }
120
148
  )
@@ -123,7 +151,7 @@ const ne = o.forwardRef(
123
151
  ] });
124
152
  }
125
153
  );
126
- ne.displayName = "MultiDatePicker";
154
+ ae.displayName = "MultiDatePicker";
127
155
  export {
128
- ne as MultiDatePicker
156
+ ae as MultiDatePicker
129
157
  };
@@ -1,137 +1,149 @@
1
1
  import { jsxs as f, jsx as n } from "react/jsx-runtime";
2
- import * as r from "react";
3
- import { Cross as w, CalendarMonth as B } from "impact-nova-icons";
4
- import { cn as H } from "../../../lib/utils.js";
5
- import { Input as q } from "../input/input.js";
2
+ import * as s from "react";
3
+ import { Cross as $, CalendarMonth as q } from "impact-nova-icons";
4
+ import { cn as B } from "../../../lib/utils.js";
5
+ import { Input as H } from "../input/input.js";
6
6
  import { Popover as G, PopoverAnchor as J, PopoverContent as Q } from "../../feedback/popover/popover.js";
7
7
  import { Calendar as U } from "../../data-display/calendar/calendar.js";
8
- import { Tooltip as b, TooltipTrigger as x, TooltipContent as A } from "../../feedback/tooltip/tooltip.js";
8
+ import { Tooltip as D, TooltipTrigger as b, TooltipContent as x } from "../../feedback/tooltip/tooltip.js";
9
9
  import { useImpactNovaI18n as W } from "../../../i18n/use-impact-nova-i18n.js";
10
10
  import { coerceMonthArrayApply as X, coerceMonthArray as Y } from "./calendar-selection-adapters.js";
11
- import { usePickerDismissActionsRef as Z, usePickerFooterDismissNudge as _ } from "./date-input-behavior.js";
12
- import { buildDateBoundsMatcher as ee } from "../../../lib/date-bounds-matcher.js";
13
- const te = r.forwardRef(
11
+ import { usePickerDismissActionsRef as Z, usePickerFooterDismissNudge as _, handlePickerSurfacePointerDown as ee } from "./date-input-behavior.js";
12
+ import { buildDateBoundsMatcher as te } from "../../../lib/date-bounds-matcher.js";
13
+ const ne = s.forwardRef(
14
14
  ({
15
15
  value: t,
16
- onChange: h,
17
- placeholder: N,
18
- minDate: u,
19
- maxDate: D,
16
+ onChange: u,
17
+ placeholder: A,
18
+ minDate: y,
19
+ maxDate: N,
20
20
  startMonth: R,
21
- endMonth: T,
21
+ endMonth: S,
22
22
  showFooter: l = !0,
23
- disabled: o,
24
- className: I,
25
- ...S
26
- }, j) => {
27
- const { t: s } = W(), v = N ?? s("datePicker.selectMultipleMonths"), [c, i] = r.useState(!1), m = r.useRef(!1), y = r.useRef(null), g = Z(), { footerFlashKey: O, footerFlashTarget: E, popoverHandlers: K } = _(l, c, g, y), [p, d] = r.useState(t);
28
- r.useEffect(() => {
23
+ disabled: r,
24
+ className: T,
25
+ ...I
26
+ }, O) => {
27
+ const { t: i } = W(), j = A ?? i("datePicker.selectMultipleMonths"), [c, o] = s.useState(!1), h = s.useRef(!1), m = s.useRef(null), g = Z(), { footerFlashKey: v, footerFlashTarget: w, popoverHandlers: E } = _(l, c, g, m), [p, d] = s.useState(t);
28
+ s.useEffect(() => {
29
29
  d(t);
30
30
  }, [c, t]);
31
- const z = (e) => {
31
+ const F = (e) => {
32
32
  const a = Y(e);
33
- d(a), l || h?.(a);
34
- }, F = (e) => {
33
+ d(a), l || u?.(a);
34
+ }, K = (e) => {
35
35
  const a = X(e, p);
36
- h?.(a), i(!1);
36
+ u?.(a), o(!1);
37
37
  }, M = () => {
38
- d(t), i(!1);
39
- }, C = () => {
40
- d(void 0), h?.(void 0), l || i(!1);
41
- }, L = t && t.length > 0 ? t.length === 1 ? `${t[0].month + 1}/${t[0].year}` : s("datePicker.monthsSelected", { count: t.length }) : "", V = (e) => {
42
- o || !e && l || i(e);
43
- }, $ = r.useCallback(() => {
38
+ d(t), o(!1);
39
+ }, P = () => {
40
+ d(void 0), u?.(void 0), l || o(!1);
41
+ }, z = t && t.length > 0 ? t.length === 1 ? `${t[0].month + 1}/${t[0].year}` : i("datePicker.monthsSelected", { count: t.length }) : "", L = (e) => {
42
+ r || !e && l || o(e);
43
+ }, V = s.useCallback(() => {
44
44
  const e = p?.length ?? 0, a = t?.length ?? 0;
45
45
  return e === a && (p ?? []).every(
46
- (P, k) => P.month === t?.[k]?.month && P.year === t?.[k]?.year
46
+ (C, k) => C.month === t?.[k]?.month && C.year === t?.[k]?.year
47
47
  ) ? "dismiss" : e > 0 ? "apply" : "cancel";
48
48
  }, [p, t]);
49
- return r.useLayoutEffect(() => {
49
+ return s.useLayoutEffect(() => {
50
50
  g.current = {
51
51
  onDismiss: M,
52
- resolveFlash: $
52
+ resolveFlash: V
53
53
  };
54
- }), /* @__PURE__ */ f(G, { open: o ? !1 : c, onOpenChange: V, children: [
55
- /* @__PURE__ */ n(J, { asChild: !0, children: /* @__PURE__ */ n("div", { ref: y, children: /* @__PURE__ */ n(
56
- q,
54
+ }), /* @__PURE__ */ f(G, { open: r ? !1 : c, onOpenChange: L, children: [
55
+ /* @__PURE__ */ n(J, { asChild: !0, children: /* @__PURE__ */ n(
56
+ "div",
57
57
  {
58
- ref: j,
59
- value: L,
60
- placeholder: v,
61
- readOnly: !0,
62
- disabled: o,
63
- onClick: () => {
64
- !o && !c && i(!0);
65
- },
66
- className: H("cursor-pointer", I),
67
- suffix: /* @__PURE__ */ f("div", { className: "flex items-center gap-1", children: [
68
- t && t.length > 0 && !o && /* @__PURE__ */ f(b, { children: [
69
- /* @__PURE__ */ n(x, { asChild: !0, children: /* @__PURE__ */ n(
70
- "button",
71
- {
72
- type: "button",
73
- tabIndex: 0,
74
- "aria-label": s("calendar.clear"),
75
- onClick: (e) => {
76
- e.stopPropagation(), C();
77
- },
78
- className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
79
- children: /* @__PURE__ */ n(w, { className: "size-3 hover:text-content" })
80
- }
81
- ) }),
82
- /* @__PURE__ */ n(A, { variant: "tertiary", side: "top", children: s("calendar.clear") })
83
- ] }),
84
- /* @__PURE__ */ f(b, { children: [
85
- /* @__PURE__ */ n(x, { asChild: !0, children: /* @__PURE__ */ n(
86
- "button",
87
- {
88
- type: "button",
89
- tabIndex: 0,
90
- "data-component": "calendar-trigger",
91
- "aria-label": s("datePicker.selectMultipleMonths"),
92
- onPointerDown: (e) => {
93
- e.preventDefault(), e.stopPropagation(), o || i(!c);
94
- },
95
- onKeyDown: (e) => {
96
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), o || (m.current = !0, i(!c)));
97
- },
98
- className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer",
99
- children: /* @__PURE__ */ n(B, { className: "h-4 w-4 text-secondary-foreground" })
100
- }
101
- ) }),
102
- /* @__PURE__ */ n(A, { variant: "tertiary", side: "top", children: s("datePicker.selectMultipleMonths") })
103
- ] })
104
- ] }),
105
- ...S
58
+ ref: m,
59
+ onPointerDown: (e) => ee({
60
+ disabled: r,
61
+ event: e,
62
+ onOpen: () => o(!0),
63
+ focusField: () => m.current?.querySelector("input")?.focus()
64
+ }),
65
+ children: /* @__PURE__ */ n(
66
+ H,
67
+ {
68
+ ref: O,
69
+ value: z,
70
+ placeholder: j,
71
+ readOnly: !0,
72
+ disabled: r,
73
+ onClick: () => {
74
+ !r && !c && o(!0);
75
+ },
76
+ className: B("cursor-pointer", T),
77
+ suffix: /* @__PURE__ */ f("div", { className: "flex items-center gap-1", children: [
78
+ t && t.length > 0 && !r && /* @__PURE__ */ f(D, { children: [
79
+ /* @__PURE__ */ n(b, { asChild: !0, children: /* @__PURE__ */ n(
80
+ "button",
81
+ {
82
+ type: "button",
83
+ tabIndex: 0,
84
+ "aria-label": i("calendar.clear"),
85
+ onClick: (e) => {
86
+ e.stopPropagation(), P();
87
+ },
88
+ className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
89
+ children: /* @__PURE__ */ n($, { className: "size-3 hover:text-content" })
90
+ }
91
+ ) }),
92
+ /* @__PURE__ */ n(x, { variant: "tertiary", side: "top", children: i("calendar.clear") })
93
+ ] }),
94
+ /* @__PURE__ */ f(D, { children: [
95
+ /* @__PURE__ */ n(b, { asChild: !0, children: /* @__PURE__ */ n(
96
+ "button",
97
+ {
98
+ type: "button",
99
+ tabIndex: 0,
100
+ "data-component": "calendar-trigger",
101
+ "aria-label": i("datePicker.selectMultipleMonths"),
102
+ onPointerDown: (e) => {
103
+ e.preventDefault(), e.stopPropagation(), r || o(!c);
104
+ },
105
+ onKeyDown: (e) => {
106
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), r || (h.current = !0, o(!c)));
107
+ },
108
+ className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer",
109
+ children: /* @__PURE__ */ n(q, { className: "h-4 w-4 text-secondary-foreground" })
110
+ }
111
+ ) }),
112
+ /* @__PURE__ */ n(x, { variant: "tertiary", side: "top", children: i("datePicker.selectMultipleMonths") })
113
+ ] })
114
+ ] }),
115
+ ...I
116
+ }
117
+ )
106
118
  }
107
- ) }) }),
119
+ ) }),
108
120
  /* @__PURE__ */ n(
109
121
  Q,
110
122
  {
111
123
  className: "w-auto p-0",
112
124
  align: "start",
113
- "aria-label": s("datePicker.selectMultipleMonths"),
125
+ "aria-label": i("datePicker.selectMultipleMonths"),
114
126
  onOpenAutoFocus: (e) => {
115
- m.current || e.preventDefault(), m.current = !1;
127
+ h.current || e.preventDefault(), h.current = !1;
116
128
  },
117
- ...K,
129
+ ...E,
118
130
  children: /* @__PURE__ */ n(
119
131
  U,
120
132
  {
121
133
  pickerType: "month",
122
134
  monthMode: "multiple",
123
135
  selectedMonths: p,
124
- footerFlashKey: O,
125
- footerFlashTarget: E,
126
- onMonthSelect: z,
127
- disabled: ee(u, D),
136
+ footerFlashKey: v,
137
+ footerFlashTarget: w,
138
+ onMonthSelect: F,
139
+ disabled: te(y, N),
128
140
  startMonth: R,
129
- endMonth: T,
130
- defaultMonth: u,
141
+ endMonth: S,
142
+ defaultMonth: y,
131
143
  showFooter: l,
132
- onApply: F,
144
+ onApply: K,
133
145
  onCancel: M,
134
- onClear: C,
146
+ onClear: P,
135
147
  captionLayout: "dropdown"
136
148
  }
137
149
  )
@@ -140,7 +152,7 @@ const te = r.forwardRef(
140
152
  ] });
141
153
  }
142
154
  );
143
- te.displayName = "MultiMonthPicker";
155
+ ne.displayName = "MultiMonthPicker";
144
156
  export {
145
- te as MultiMonthPicker
157
+ ne as MultiMonthPicker
146
158
  };