impact-nova 2.2.3 → 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.
- package/dist/components/data/ag-grid-react/headers/custom-header.js +133 -110
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +23 -23
- package/dist/components/data/ag-grid-react/index.js +202 -206
- package/dist/components/data/data-table/build-column-tree-from-grid.js +65 -67
- package/dist/components/data/data-table/data-table-column-list-sync.js +5 -10
- package/dist/components/data/data-table/data-table-column-list.js +64 -61
- package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +29 -0
- package/dist/components/data/data-table/data-table-column-tree-cache.js +117 -0
- package/dist/components/data/data-table/data-table-constants.d.ts +2 -0
- package/dist/components/data/data-table/data-table-constants.js +3 -2
- package/dist/components/data/data-table/data-table-sheet.js +46 -49
- package/dist/components/data/data-table/data-table.js +137 -119
- package/dist/components/data/data-table/index.js +24 -23
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +3 -0
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +24 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +2 -1
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +249 -150
- package/dist/components/data/nested-list/components/NestedListContent.js +158 -96
- package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -0
- package/dist/components/data/nested-list/nested-list-constants.js +6 -0
- package/dist/components/data/nested-list/nested-list-tree-utils.d.ts +3 -0
- package/dist/components/data/nested-list/nested-list-tree-utils.js +24 -0
- package/dist/components/data/nested-list/nested-list.js +214 -215
- package/dist/components/data-display/card/card.js +6 -5
- package/dist/components/feedback/dialog/dialog.js +7 -5
- package/dist/components/feedback/sheet/sheet.js +28 -27
- package/dist/components/flows/filter-panel/filter-panel.js +36 -35
- package/dist/components/flows/filter-strip/filter-tag-list.js +33 -33
- package/dist/components/forms/combobox/combobox.js +110 -100
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +9 -0
- package/dist/components/forms/date-picker/date-input-behavior.js +32 -19
- package/dist/components/forms/date-picker/date-picker.js +96 -90
- package/dist/components/forms/date-picker/date-range-picker.js +160 -152
- package/dist/components/forms/date-picker/month-picker.js +71 -65
- package/dist/components/forms/date-picker/month-range-picker.js +153 -145
- package/dist/components/forms/date-picker/multi-date-picker.js +127 -99
- package/dist/components/forms/date-picker/multi-month-picker.js +109 -97
- package/dist/components/forms/date-picker/multi-week-picker.js +98 -86
- package/dist/components/forms/date-picker/week-picker.js +82 -76
- package/dist/components/forms/date-picker/week-range-picker.js +127 -119
- package/dist/impact-nova-base.scss +10 -5
- package/dist/impact-nova-components.css +9 -5
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +189 -188
- package/dist/lib/overlay/overlay-portal-context.d.ts +11 -2
- package/dist/lib/overlay/overlay-portal-context.js +39 -28
- package/dist/lib/primitives/create-compound.d.ts +5 -0
- package/dist/lib/primitives/create-compound.js +17 -16
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
|
@@ -1,120 +1,148 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { Cross as
|
|
4
|
-
import { format as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Input as
|
|
7
|
-
import { Popover as
|
|
8
|
-
import { Calendar as
|
|
9
|
-
import { Tooltip as
|
|
10
|
-
import { useImpactNovaI18n as
|
|
11
|
-
import { getDateFnsLocale as
|
|
12
|
-
import { coerceDateArrayApply as
|
|
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
|
|
15
|
+
const ae = a.forwardRef(
|
|
16
16
|
({
|
|
17
|
-
value:
|
|
18
|
-
onChange:
|
|
19
|
-
format:
|
|
17
|
+
value: t,
|
|
18
|
+
onChange: m,
|
|
19
|
+
format: x = "MM/dd/yyyy",
|
|
20
20
|
placeholder: M,
|
|
21
|
-
minDate:
|
|
21
|
+
minDate: A,
|
|
22
22
|
maxDate: N,
|
|
23
|
-
startMonth:
|
|
24
|
-
endMonth:
|
|
25
|
-
showFooter:
|
|
26
|
-
disabled:
|
|
23
|
+
startMonth: b,
|
|
24
|
+
endMonth: T,
|
|
25
|
+
showFooter: l = !0,
|
|
26
|
+
disabled: n,
|
|
27
27
|
className: R,
|
|
28
|
-
...
|
|
29
|
-
},
|
|
30
|
-
const { locale:
|
|
31
|
-
|
|
32
|
-
d(
|
|
33
|
-
}, [
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
d(
|
|
37
|
-
},
|
|
38
|
-
const
|
|
39
|
-
|
|
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(
|
|
42
|
-
},
|
|
43
|
-
d(void 0),
|
|
44
|
-
},
|
|
45
|
-
const
|
|
46
|
-
return
|
|
47
|
-
(
|
|
48
|
-
) ? "dismiss" :
|
|
49
|
-
}, [
|
|
50
|
-
return
|
|
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:
|
|
53
|
+
resolveFlash: K
|
|
54
54
|
};
|
|
55
|
-
}), /* @__PURE__ */
|
|
56
|
-
|
|
55
|
+
}), /* @__PURE__ */ f(Q, { open: n ? !1 : i, onOpenChange: (e) => {
|
|
56
|
+
n || !e && l || o(e);
|
|
57
57
|
}, children: [
|
|
58
|
-
/* @__PURE__ */ r(
|
|
59
|
-
|
|
58
|
+
/* @__PURE__ */ r(U, { asChild: !0, children: /* @__PURE__ */ r(
|
|
59
|
+
"div",
|
|
60
60
|
{
|
|
61
|
-
ref:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
124
|
+
W,
|
|
97
125
|
{
|
|
98
126
|
className: "w-auto p-0",
|
|
99
127
|
align: "start",
|
|
100
|
-
"aria-label":
|
|
101
|
-
onOpenAutoFocus: (
|
|
102
|
-
...
|
|
128
|
+
"aria-label": s("datePicker.selectMultipleDates"),
|
|
129
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
130
|
+
...w,
|
|
103
131
|
children: /* @__PURE__ */ r(
|
|
104
|
-
|
|
132
|
+
X,
|
|
105
133
|
{
|
|
106
134
|
mode: "multiple",
|
|
107
|
-
selected:
|
|
108
|
-
footerFlashKey:
|
|
109
|
-
footerFlashTarget:
|
|
110
|
-
onSelect:
|
|
111
|
-
disabled: oe(
|
|
112
|
-
startMonth:
|
|
113
|
-
endMonth:
|
|
114
|
-
showFooter:
|
|
115
|
-
onApply:
|
|
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:
|
|
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
|
-
|
|
154
|
+
ae.displayName = "MultiDatePicker";
|
|
127
155
|
export {
|
|
128
|
-
|
|
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
|
|
3
|
-
import { Cross as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Input as
|
|
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
|
|
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
|
|
13
|
-
const
|
|
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:
|
|
17
|
-
placeholder:
|
|
18
|
-
minDate:
|
|
19
|
-
maxDate:
|
|
16
|
+
onChange: u,
|
|
17
|
+
placeholder: A,
|
|
18
|
+
minDate: y,
|
|
19
|
+
maxDate: N,
|
|
20
20
|
startMonth: R,
|
|
21
|
-
endMonth:
|
|
21
|
+
endMonth: S,
|
|
22
22
|
showFooter: l = !0,
|
|
23
|
-
disabled:
|
|
24
|
-
className:
|
|
25
|
-
...
|
|
26
|
-
},
|
|
27
|
-
const { t:
|
|
28
|
-
|
|
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
|
|
31
|
+
const F = (e) => {
|
|
32
32
|
const a = Y(e);
|
|
33
|
-
d(a), l ||
|
|
34
|
-
},
|
|
33
|
+
d(a), l || u?.(a);
|
|
34
|
+
}, K = (e) => {
|
|
35
35
|
const a = X(e, p);
|
|
36
|
-
|
|
36
|
+
u?.(a), o(!1);
|
|
37
37
|
}, M = () => {
|
|
38
|
-
d(t),
|
|
39
|
-
},
|
|
40
|
-
d(void 0),
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
},
|
|
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
|
-
(
|
|
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
|
|
49
|
+
return s.useLayoutEffect(() => {
|
|
50
50
|
g.current = {
|
|
51
51
|
onDismiss: M,
|
|
52
|
-
resolveFlash:
|
|
52
|
+
resolveFlash: V
|
|
53
53
|
};
|
|
54
|
-
}), /* @__PURE__ */ f(G, { open:
|
|
55
|
-
/* @__PURE__ */ n(J, { asChild: !0, children: /* @__PURE__ */ n(
|
|
56
|
-
|
|
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:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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":
|
|
125
|
+
"aria-label": i("datePicker.selectMultipleMonths"),
|
|
114
126
|
onOpenAutoFocus: (e) => {
|
|
115
|
-
|
|
127
|
+
h.current || e.preventDefault(), h.current = !1;
|
|
116
128
|
},
|
|
117
|
-
...
|
|
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:
|
|
125
|
-
footerFlashTarget:
|
|
126
|
-
onMonthSelect:
|
|
127
|
-
disabled:
|
|
136
|
+
footerFlashKey: v,
|
|
137
|
+
footerFlashTarget: w,
|
|
138
|
+
onMonthSelect: F,
|
|
139
|
+
disabled: te(y, N),
|
|
128
140
|
startMonth: R,
|
|
129
|
-
endMonth:
|
|
130
|
-
defaultMonth:
|
|
141
|
+
endMonth: S,
|
|
142
|
+
defaultMonth: y,
|
|
131
143
|
showFooter: l,
|
|
132
|
-
onApply:
|
|
144
|
+
onApply: K,
|
|
133
145
|
onCancel: M,
|
|
134
|
-
onClear:
|
|
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
|
-
|
|
155
|
+
ne.displayName = "MultiMonthPicker";
|
|
144
156
|
export {
|
|
145
|
-
|
|
157
|
+
ne as MultiMonthPicker
|
|
146
158
|
};
|