impact-nova 2.1.0-alpha.9 → 2.2.1
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/README.md +6 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-editor.js +73 -94
- package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-focus.d.ts +53 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-focus.js +98 -0
- package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +15 -13
- package/dist/components/data/ag-grid-react/headers/custom-header.js +56 -58
- package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.d.ts +12 -0
- package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.js +31 -0
- package/dist/components/data/ag-grid-react/headers/header-search-active-state.d.ts +10 -0
- package/dist/components/data/ag-grid-react/headers/header-search-active-state.js +38 -0
- package/dist/components/data/ag-grid-react/index.js +166 -163
- package/dist/components/data/ag-grid-react/notify-column-indicator-sync.d.ts +3 -4
- package/dist/components/data/ag-grid-react/theme.js +0 -2
- package/dist/components/data/data-table/data-table-column-list.js +1 -1
- package/dist/components/data/data-table/data-table-saved-views.js +1 -1
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +7 -6
- package/dist/components/data/nested-list/components/SortableItem.d.ts +3 -1
- package/dist/components/data/nested-list/components/SortableItem.js +111 -109
- package/dist/components/data-display/calendar/calendar-footer-emphasis.d.ts +28 -0
- package/dist/components/data-display/calendar/calendar-footer-emphasis.js +8 -0
- package/dist/components/data-display/calendar/calendar-footer.d.ts +4 -1
- package/dist/components/data-display/calendar/calendar-footer.js +60 -38
- package/dist/components/data-display/calendar/calendar.js +86 -82
- package/dist/components/data-display/calendar/calendar.types.d.ts +2 -0
- package/dist/components/data-display/calendar/use-calendar-state.d.ts +3 -0
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/flows/filter-strip/filter-strip.js +36 -29
- package/dist/components/flows/filter-strip/filter-summary.js +2 -2
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +118 -0
- package/dist/components/forms/date-picker/date-input-behavior.js +164 -0
- package/dist/components/forms/date-picker/date-picker.js +202 -138
- package/dist/components/forms/date-picker/date-range-picker.js +302 -215
- package/dist/components/forms/date-picker/month-picker.js +160 -119
- package/dist/components/forms/date-picker/month-range-picker.js +302 -245
- package/dist/components/forms/date-picker/multi-date-picker.js +94 -80
- package/dist/components/forms/date-picker/multi-month-picker.js +97 -83
- package/dist/components/forms/date-picker/multi-week-picker.js +107 -93
- package/dist/components/forms/date-picker/week-picker.js +230 -140
- package/dist/components/forms/date-picker/week-range-picker.js +332 -226
- package/dist/components/forms/file-upload/file-upload.js +312 -174
- package/dist/components/forms/file-upload/file-upload.types.d.ts +17 -2
- package/dist/components/layout/dynamic-layout/dynamic-layout.variants.d.ts +1 -1
- package/dist/components/layout/header/header.js +45 -38
- package/dist/components/layout/horizontal-scroller/index.d.ts +1 -0
- package/dist/components/layout/horizontal-scroller/index.js +3 -2
- package/dist/components/ui/local-raster-icons/assets/excel-error-icon.webp.js +4 -0
- package/dist/components/ui/local-raster-icons/assets/file-upload-error.webp.js +4 -0
- package/dist/components/ui/local-raster-icons/rasterIcons.d.ts +2 -0
- package/dist/components/ui/local-raster-icons/rasterIcons.js +32 -22
- package/dist/components/ui/show.d.ts +10 -0
- package/dist/components/ui/show.js +7 -0
- package/dist/components/ui/show.types.d.ts +5 -0
- package/dist/i18n/defaultMessages.d.ts +17 -0
- package/dist/i18n/defaultMessages.js +29 -17
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +12 -0
- package/dist/i18n/locales/es.js +12 -0
- package/dist/i18n/locales/hi.js +12 -0
- package/dist/i18n/locales/kn.js +12 -0
- package/dist/impact-nova-base.scss +6 -2
- package/dist/impact-nova-components.css +141 -16
- package/dist/impact-nova-tokens.scss +12 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +273 -271
- package/dist/lib/utils.js +40 -24
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/tailwind.config.js +36 -4
- package/dist/theme/tailwind-colors.js +3 -1
- package/package.json +15 -6
- package/tailwind.config.d.ts +3 -0
- package/dist/components/data/ag-grid-react/headers/custom-header-group.d.ts +0 -10
- package/dist/components/data/ag-grid-react/headers/custom-header-group.js +0 -58
|
@@ -1,106 +1,120 @@
|
|
|
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 {
|
|
14
|
-
|
|
1
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { Cross as q, CalendarMonth as G } from "impact-nova-icons";
|
|
4
|
+
import { format as J } from "date-fns";
|
|
5
|
+
import { cn as Q } from "../../../lib/utils.js";
|
|
6
|
+
import { Input as U } from "../input/input.js";
|
|
7
|
+
import { Popover as W, PopoverAnchor as X, PopoverContent as Y } from "../../feedback/popover/popover.js";
|
|
8
|
+
import { Calendar as Z } 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 _ } from "../../../i18n/use-impact-nova-i18n.js";
|
|
11
|
+
import { getDateFnsLocale as w } from "../../../i18n/getDateFnsLocale.js";
|
|
12
|
+
import { coerceDateArrayApply as ee, coerceDateArray as te } from "./calendar-selection-adapters.js";
|
|
13
|
+
import { usePickerDismissActionsRef as re, usePickerFooterDismissNudge as oe } from "./date-input-behavior.js";
|
|
14
|
+
import { buildDateBoundsMatcher as ne } from "../../../lib/date-bounds-matcher.js";
|
|
15
|
+
const se = o.forwardRef(
|
|
15
16
|
({
|
|
16
|
-
value:
|
|
17
|
-
onChange:
|
|
18
|
-
format:
|
|
17
|
+
value: e,
|
|
18
|
+
onChange: f,
|
|
19
|
+
format: A = "MM/dd/yyyy",
|
|
19
20
|
placeholder: M,
|
|
20
|
-
minDate:
|
|
21
|
-
maxDate:
|
|
22
|
-
startMonth:
|
|
23
|
-
endMonth:
|
|
24
|
-
showFooter:
|
|
25
|
-
disabled:
|
|
26
|
-
className:
|
|
27
|
-
...
|
|
28
|
-
},
|
|
29
|
-
const { locale:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}, [
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
21
|
+
minDate: x,
|
|
22
|
+
maxDate: N,
|
|
23
|
+
startMonth: T,
|
|
24
|
+
endMonth: b,
|
|
25
|
+
showFooter: s = !0,
|
|
26
|
+
disabled: a,
|
|
27
|
+
className: R,
|
|
28
|
+
...L
|
|
29
|
+
}, v) => {
|
|
30
|
+
const { locale: u, t: i } = _(), F = o.useMemo(() => w(u), [u]), I = M ?? i("datePicker.selectMultipleDates"), [p, c] = o.useState(!1), h = o.useRef(null), y = re(), { footerFlashKey: S, footerFlashTarget: j, popoverHandlers: O } = oe(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 = te(t);
|
|
36
|
+
d(n), s || f?.(n);
|
|
37
|
+
}, E = (t) => {
|
|
38
|
+
const n = ee(t, l);
|
|
39
|
+
f?.(n), c(!1);
|
|
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 ? J(e[0], A, { locale: F }) : `${e.length} dates selected` : "", H = o.useCallback(() => {
|
|
45
|
+
const t = l?.length ?? 0, n = e?.length ?? 0, K = t === n && (l ?? []).every(
|
|
46
|
+
(V, $) => V.getTime() === e?.[$]?.getTime()
|
|
47
|
+
);
|
|
48
|
+
return t > 0 && !K ? "apply" : "cancel";
|
|
49
|
+
}, [l, e]);
|
|
50
|
+
return o.useLayoutEffect(() => {
|
|
51
|
+
y.current = {
|
|
52
|
+
onDismiss: g,
|
|
53
|
+
resolveFlash: H
|
|
54
|
+
};
|
|
55
|
+
}), /* @__PURE__ */ m(W, { open: a ? !1 : p, onOpenChange: (t) => {
|
|
56
|
+
a || !t && s || c(t);
|
|
46
57
|
}, children: [
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
58
|
+
/* @__PURE__ */ r(X, { asChild: !0, children: /* @__PURE__ */ r("div", { ref: h, children: /* @__PURE__ */ r(
|
|
59
|
+
U,
|
|
49
60
|
{
|
|
50
|
-
ref:
|
|
51
|
-
value:
|
|
52
|
-
placeholder:
|
|
61
|
+
ref: v,
|
|
62
|
+
value: B,
|
|
63
|
+
placeholder: I,
|
|
53
64
|
readOnly: !0,
|
|
54
|
-
disabled:
|
|
65
|
+
disabled: a,
|
|
55
66
|
onClick: () => {
|
|
56
|
-
!
|
|
67
|
+
!a && !p && c(!0);
|
|
57
68
|
},
|
|
58
|
-
className:
|
|
59
|
-
suffix: /* @__PURE__ */
|
|
60
|
-
|
|
61
|
-
/* @__PURE__ */
|
|
69
|
+
className: Q("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(
|
|
62
73
|
"button",
|
|
63
74
|
{
|
|
64
75
|
type: "button",
|
|
65
76
|
tabIndex: 0,
|
|
66
|
-
"aria-label":
|
|
67
|
-
onClick: (
|
|
68
|
-
|
|
77
|
+
"aria-label": i("calendar.clear"),
|
|
78
|
+
onClick: (t) => {
|
|
79
|
+
t.stopPropagation(), C();
|
|
69
80
|
},
|
|
70
81
|
className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
|
|
71
|
-
children: /* @__PURE__ */
|
|
82
|
+
children: /* @__PURE__ */ r(q, { className: "size-3 hover:text-content" })
|
|
72
83
|
}
|
|
73
84
|
) }),
|
|
74
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ r(k, { variant: "tertiary", side: "top", children: i("calendar.clear") })
|
|
75
86
|
] }),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ m(D, { children: [
|
|
88
|
+
/* @__PURE__ */ r(P, { asChild: !0, children: /* @__PURE__ */ r(G, { className: "h-4 w-4 text-secondary-foreground" }) }),
|
|
89
|
+
/* @__PURE__ */ r(k, { variant: "tertiary", side: "top", children: i("datePicker.selectMultipleDates") })
|
|
79
90
|
] })
|
|
80
91
|
] }),
|
|
81
|
-
...
|
|
92
|
+
...L
|
|
82
93
|
}
|
|
83
94
|
) }) }),
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
|
|
95
|
+
/* @__PURE__ */ r(
|
|
96
|
+
Y,
|
|
86
97
|
{
|
|
87
98
|
className: "w-auto p-0",
|
|
88
99
|
align: "start",
|
|
89
|
-
"aria-label":
|
|
90
|
-
onOpenAutoFocus: (
|
|
91
|
-
|
|
92
|
-
|
|
100
|
+
"aria-label": i("datePicker.selectMultipleDates"),
|
|
101
|
+
onOpenAutoFocus: (t) => t.preventDefault(),
|
|
102
|
+
...O,
|
|
103
|
+
children: /* @__PURE__ */ r(
|
|
104
|
+
Z,
|
|
93
105
|
{
|
|
94
106
|
mode: "multiple",
|
|
95
|
-
selected:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
107
|
+
selected: l,
|
|
108
|
+
footerFlashKey: S,
|
|
109
|
+
footerFlashTarget: j,
|
|
110
|
+
onSelect: z,
|
|
111
|
+
disabled: ne(x, N),
|
|
112
|
+
startMonth: T,
|
|
113
|
+
endMonth: b,
|
|
114
|
+
showFooter: s,
|
|
115
|
+
onApply: E,
|
|
116
|
+
onCancel: g,
|
|
117
|
+
onClear: C,
|
|
104
118
|
captionLayout: "dropdown"
|
|
105
119
|
}
|
|
106
120
|
)
|
|
@@ -109,7 +123,7 @@ const U = l.forwardRef(
|
|
|
109
123
|
] });
|
|
110
124
|
}
|
|
111
125
|
);
|
|
112
|
-
|
|
126
|
+
se.displayName = "MultiDatePicker";
|
|
113
127
|
export {
|
|
114
|
-
|
|
128
|
+
se as MultiDatePicker
|
|
115
129
|
};
|
|
@@ -1,123 +1,137 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { Cross as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Input as
|
|
6
|
-
import { Popover as
|
|
7
|
-
import { Calendar as
|
|
8
|
-
import { Tooltip as
|
|
9
|
-
import { useImpactNovaI18n as
|
|
10
|
-
import { coerceMonthArrayApply as
|
|
11
|
-
import {
|
|
12
|
-
|
|
1
|
+
import { jsxs as f, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { Cross as B, CalendarMonth as H } from "impact-nova-icons";
|
|
4
|
+
import { cn as q } from "../../../lib/utils.js";
|
|
5
|
+
import { Input as G } from "../input/input.js";
|
|
6
|
+
import { Popover as J, PopoverAnchor as Q, PopoverContent as U } from "../../feedback/popover/popover.js";
|
|
7
|
+
import { Calendar as W } from "../../data-display/calendar/calendar.js";
|
|
8
|
+
import { Tooltip as b, TooltipTrigger as x, TooltipContent as A } from "../../feedback/tooltip/tooltip.js";
|
|
9
|
+
import { useImpactNovaI18n as X } from "../../../i18n/use-impact-nova-i18n.js";
|
|
10
|
+
import { coerceMonthArrayApply as Y, coerceMonthArray as Z } from "./calendar-selection-adapters.js";
|
|
11
|
+
import { usePickerDismissActionsRef as _, usePickerFooterDismissNudge as ee } from "./date-input-behavior.js";
|
|
12
|
+
import { buildDateBoundsMatcher as te } from "../../../lib/date-bounds-matcher.js";
|
|
13
|
+
const ne = r.forwardRef(
|
|
13
14
|
({
|
|
14
|
-
value:
|
|
15
|
-
onChange:
|
|
16
|
-
placeholder:
|
|
17
|
-
minDate:
|
|
18
|
-
maxDate:
|
|
19
|
-
startMonth:
|
|
20
|
-
endMonth:
|
|
21
|
-
showFooter:
|
|
22
|
-
disabled:
|
|
23
|
-
className:
|
|
24
|
-
...
|
|
25
|
-
},
|
|
26
|
-
const { t:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, [
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
15
|
+
value: t,
|
|
16
|
+
onChange: h,
|
|
17
|
+
placeholder: N,
|
|
18
|
+
minDate: u,
|
|
19
|
+
maxDate: D,
|
|
20
|
+
startMonth: R,
|
|
21
|
+
endMonth: T,
|
|
22
|
+
showFooter: l = !0,
|
|
23
|
+
disabled: o,
|
|
24
|
+
className: I,
|
|
25
|
+
...S
|
|
26
|
+
}, j) => {
|
|
27
|
+
const { t: s } = X(), v = N ?? s("datePicker.selectMultipleMonths"), [c, i] = r.useState(!1), m = r.useRef(!1), y = r.useRef(null), g = _(), { footerFlashKey: O, footerFlashTarget: E, popoverHandlers: K } = ee(l, c, g, y), [p, d] = r.useState(t);
|
|
28
|
+
r.useEffect(() => {
|
|
29
|
+
d(t);
|
|
30
|
+
}, [c, t]);
|
|
31
|
+
const z = (e) => {
|
|
32
|
+
const a = Z(e);
|
|
33
|
+
d(a), l || h?.(a);
|
|
34
|
+
}, F = (e) => {
|
|
35
|
+
const a = Y(e, p);
|
|
36
|
+
h?.(a), i(!1);
|
|
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(() => {
|
|
44
|
+
const e = p?.length ?? 0, a = t?.length ?? 0, w = e === a && (p ?? []).every(
|
|
45
|
+
(P, k) => P.month === t?.[k]?.month && P.year === t?.[k]?.year
|
|
46
|
+
);
|
|
47
|
+
return e > 0 && !w ? "apply" : "cancel";
|
|
48
|
+
}, [p, t]);
|
|
49
|
+
return r.useLayoutEffect(() => {
|
|
50
|
+
g.current = {
|
|
51
|
+
onDismiss: M,
|
|
52
|
+
resolveFlash: $
|
|
53
|
+
};
|
|
54
|
+
}), /* @__PURE__ */ f(J, { open: o ? !1 : c, onOpenChange: V, children: [
|
|
55
|
+
/* @__PURE__ */ n(Q, { asChild: !0, children: /* @__PURE__ */ n("div", { ref: y, children: /* @__PURE__ */ n(
|
|
56
|
+
G,
|
|
46
57
|
{
|
|
47
|
-
ref:
|
|
48
|
-
value:
|
|
49
|
-
placeholder:
|
|
58
|
+
ref: j,
|
|
59
|
+
value: L,
|
|
60
|
+
placeholder: v,
|
|
50
61
|
readOnly: !0,
|
|
51
|
-
disabled:
|
|
62
|
+
disabled: o,
|
|
52
63
|
onClick: () => {
|
|
53
|
-
!
|
|
64
|
+
!o && !c && i(!0);
|
|
54
65
|
},
|
|
55
|
-
className:
|
|
56
|
-
suffix: /* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
/* @__PURE__ */
|
|
66
|
+
className: q("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(
|
|
59
70
|
"button",
|
|
60
71
|
{
|
|
61
72
|
type: "button",
|
|
62
73
|
tabIndex: 0,
|
|
63
|
-
"aria-label":
|
|
74
|
+
"aria-label": s("calendar.clear"),
|
|
64
75
|
onClick: (e) => {
|
|
65
|
-
e.stopPropagation(),
|
|
76
|
+
e.stopPropagation(), C();
|
|
66
77
|
},
|
|
67
78
|
className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
|
|
68
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ n(B, { className: "size-3 hover:text-content" })
|
|
69
80
|
}
|
|
70
81
|
) }),
|
|
71
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ n(A, { variant: "tertiary", side: "top", children: s("calendar.clear") })
|
|
72
83
|
] }),
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ f(b, { children: [
|
|
85
|
+
/* @__PURE__ */ n(x, { asChild: !0, children: /* @__PURE__ */ n(
|
|
75
86
|
"button",
|
|
76
87
|
{
|
|
77
88
|
type: "button",
|
|
78
89
|
tabIndex: 0,
|
|
79
90
|
"data-component": "calendar-trigger",
|
|
80
|
-
"aria-label":
|
|
91
|
+
"aria-label": s("datePicker.selectMultipleMonths"),
|
|
81
92
|
onPointerDown: (e) => {
|
|
82
|
-
e.preventDefault(), e.stopPropagation(),
|
|
93
|
+
e.preventDefault(), e.stopPropagation(), o || i(!c);
|
|
83
94
|
},
|
|
84
95
|
onKeyDown: (e) => {
|
|
85
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(),
|
|
96
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), o || (m.current = !0, i(!c)));
|
|
86
97
|
},
|
|
87
98
|
className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer",
|
|
88
|
-
children: /* @__PURE__ */
|
|
99
|
+
children: /* @__PURE__ */ n(H, { className: "h-4 w-4 text-secondary-foreground" })
|
|
89
100
|
}
|
|
90
101
|
) }),
|
|
91
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ n(A, { variant: "tertiary", side: "top", children: s("datePicker.selectMultipleMonths") })
|
|
92
103
|
] })
|
|
93
104
|
] }),
|
|
94
|
-
...
|
|
105
|
+
...S
|
|
95
106
|
}
|
|
96
107
|
) }) }),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
|
|
108
|
+
/* @__PURE__ */ n(
|
|
109
|
+
U,
|
|
99
110
|
{
|
|
100
111
|
className: "w-auto p-0",
|
|
101
112
|
align: "start",
|
|
102
|
-
"aria-label":
|
|
113
|
+
"aria-label": s("datePicker.selectMultipleMonths"),
|
|
103
114
|
onOpenAutoFocus: (e) => {
|
|
104
|
-
|
|
115
|
+
m.current || e.preventDefault(), m.current = !1;
|
|
105
116
|
},
|
|
106
|
-
|
|
107
|
-
|
|
117
|
+
...K,
|
|
118
|
+
children: /* @__PURE__ */ n(
|
|
119
|
+
W,
|
|
108
120
|
{
|
|
109
121
|
pickerType: "month",
|
|
110
122
|
monthMode: "multiple",
|
|
111
|
-
selectedMonths:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
123
|
+
selectedMonths: p,
|
|
124
|
+
footerFlashKey: O,
|
|
125
|
+
footerFlashTarget: E,
|
|
126
|
+
onMonthSelect: z,
|
|
127
|
+
disabled: te(u, D),
|
|
128
|
+
startMonth: R,
|
|
129
|
+
endMonth: T,
|
|
130
|
+
defaultMonth: u,
|
|
131
|
+
showFooter: l,
|
|
132
|
+
onApply: F,
|
|
133
|
+
onCancel: M,
|
|
134
|
+
onClear: C,
|
|
121
135
|
captionLayout: "dropdown"
|
|
122
136
|
}
|
|
123
137
|
)
|
|
@@ -126,7 +140,7 @@ const H = l.forwardRef(
|
|
|
126
140
|
] });
|
|
127
141
|
}
|
|
128
142
|
);
|
|
129
|
-
|
|
143
|
+
ne.displayName = "MultiMonthPicker";
|
|
130
144
|
export {
|
|
131
|
-
|
|
145
|
+
ne as MultiMonthPicker
|
|
132
146
|
};
|