impact-nova 2.0.7 → 2.0.9
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/ui/ag-grid-react/headers/header-search-input.d.ts +2 -2
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +210 -204
- package/dist/components/ui/ag-grid-react/headers/use-header-search-editing-state.d.ts +34 -0
- package/dist/components/ui/ag-grid-react/headers/use-header-search-editing-state.js +70 -0
- package/dist/components/ui/date-picker/date-picker.js +33 -32
- package/dist/components/ui/date-picker/date-range-picker.js +1 -0
- package/dist/components/ui/date-picker/month-picker.js +48 -47
- package/dist/components/ui/date-picker/month-range-picker.js +32 -31
- package/dist/components/ui/date-picker/multi-date-picker.js +20 -19
- package/dist/components/ui/date-picker/multi-month-picker.js +80 -61
- package/dist/components/ui/date-picker/multi-week-picker.js +100 -81
- package/dist/components/ui/date-picker/week-picker.js +26 -25
- package/dist/components/ui/date-picker/week-range-picker.js +24 -23
- package/dist/components/ui/select/select.js +34 -37
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as l from "react";
|
|
3
3
|
import { Cross as j, CalendarMonth as w } from "impact-nova-icons";
|
|
4
4
|
import { format as z } from "date-fns";
|
|
5
5
|
import { cn as R } from "../../../lib/utils.js";
|
|
@@ -9,36 +9,36 @@ import { Calendar as q } from "../calendar.js";
|
|
|
9
9
|
import { Tooltip as u, TooltipTrigger as y, TooltipContent as g } from "../tooltip.js";
|
|
10
10
|
import { getDateFnsLocale as B } from "../../../i18n/getDateFnsLocale.js";
|
|
11
11
|
import { useImpactNovaI18n as G } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
12
|
-
const H =
|
|
12
|
+
const H = l.forwardRef(
|
|
13
13
|
({
|
|
14
14
|
value: t,
|
|
15
15
|
onChange: s,
|
|
16
16
|
format: C = "MM/dd/yyyy",
|
|
17
|
-
placeholder:
|
|
18
|
-
minDate:
|
|
17
|
+
placeholder: P,
|
|
18
|
+
minDate: x,
|
|
19
19
|
maxDate: M,
|
|
20
|
-
startMonth:
|
|
21
|
-
endMonth:
|
|
20
|
+
startMonth: D,
|
|
21
|
+
endMonth: N,
|
|
22
22
|
showFooter: p = !0,
|
|
23
23
|
disabled: o,
|
|
24
24
|
className: k,
|
|
25
25
|
...A
|
|
26
26
|
}, T) => {
|
|
27
|
-
const { locale: m, t:
|
|
28
|
-
|
|
27
|
+
const { locale: m, t: n } = G(), b = l.useMemo(() => B(m), [m]), v = P ?? n("datePicker.selectMultipleDates"), [d, a] = l.useState(!1), [f, i] = l.useState(t);
|
|
28
|
+
l.useEffect(() => {
|
|
29
29
|
i(t);
|
|
30
30
|
}, [d, t]);
|
|
31
31
|
const I = (r) => {
|
|
32
32
|
i(r), p || s?.(r);
|
|
33
33
|
}, L = (r) => {
|
|
34
|
-
s?.(r !== void 0 ? r : f),
|
|
34
|
+
s?.(r !== void 0 ? r : f), a(!1);
|
|
35
35
|
}, O = () => {
|
|
36
|
-
i(t),
|
|
36
|
+
i(t), a(!1);
|
|
37
37
|
}, h = () => {
|
|
38
|
-
i(void 0), s?.(void 0), p ||
|
|
38
|
+
i(void 0), s?.(void 0), p || a(!1);
|
|
39
39
|
}, S = t && t.length > 0 ? t.length === 1 ? z(t[0], C, { locale: b }) : `${t.length} dates selected` : "";
|
|
40
40
|
return /* @__PURE__ */ c(F, { open: o ? !1 : d, onOpenChange: (r) => {
|
|
41
|
-
o ||
|
|
41
|
+
o || a(r);
|
|
42
42
|
}, children: [
|
|
43
43
|
/* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
44
44
|
E,
|
|
@@ -49,7 +49,7 @@ const H = a.forwardRef(
|
|
|
49
49
|
readOnly: !0,
|
|
50
50
|
disabled: o,
|
|
51
51
|
onClick: () => {
|
|
52
|
-
!o && !d &&
|
|
52
|
+
!o && !d && a(!0);
|
|
53
53
|
},
|
|
54
54
|
className: R("cursor-pointer", k),
|
|
55
55
|
suffix: /* @__PURE__ */ c("div", { className: "flex items-center gap-1", children: [
|
|
@@ -59,7 +59,7 @@ const H = a.forwardRef(
|
|
|
59
59
|
{
|
|
60
60
|
type: "button",
|
|
61
61
|
tabIndex: 0,
|
|
62
|
-
"aria-label":
|
|
62
|
+
"aria-label": n("calendar.clear"),
|
|
63
63
|
onClick: (r) => {
|
|
64
64
|
r.stopPropagation(), h();
|
|
65
65
|
},
|
|
@@ -67,11 +67,11 @@ const H = a.forwardRef(
|
|
|
67
67
|
children: /* @__PURE__ */ e(j, { className: "size-3 hover:text-content" })
|
|
68
68
|
}
|
|
69
69
|
) }),
|
|
70
|
-
/* @__PURE__ */ e(g, { variant: "tertiary", side: "top", children:
|
|
70
|
+
/* @__PURE__ */ e(g, { variant: "tertiary", side: "top", children: n("calendar.clear") })
|
|
71
71
|
] }),
|
|
72
72
|
/* @__PURE__ */ c(u, { children: [
|
|
73
73
|
/* @__PURE__ */ e(y, { asChild: !0, children: /* @__PURE__ */ e(w, { className: "h-4 w-4 text-secondary-foreground" }) }),
|
|
74
|
-
/* @__PURE__ */ e(g, { variant: "tertiary", side: "top", children:
|
|
74
|
+
/* @__PURE__ */ e(g, { variant: "tertiary", side: "top", children: n("datePicker.selectMultipleDates") })
|
|
75
75
|
] })
|
|
76
76
|
] }),
|
|
77
77
|
...A
|
|
@@ -82,6 +82,7 @@ const H = a.forwardRef(
|
|
|
82
82
|
{
|
|
83
83
|
className: "w-auto p-0",
|
|
84
84
|
align: "start",
|
|
85
|
+
"aria-label": n("datePicker.selectMultipleDates"),
|
|
85
86
|
onOpenAutoFocus: (r) => r.preventDefault(),
|
|
86
87
|
children: /* @__PURE__ */ e(
|
|
87
88
|
q,
|
|
@@ -89,9 +90,9 @@ const H = a.forwardRef(
|
|
|
89
90
|
mode: "multiple",
|
|
90
91
|
selected: f,
|
|
91
92
|
onSelect: I,
|
|
92
|
-
disabled: { before:
|
|
93
|
-
startMonth:
|
|
94
|
-
endMonth:
|
|
93
|
+
disabled: { before: x, after: M },
|
|
94
|
+
startMonth: D,
|
|
95
|
+
endMonth: N,
|
|
95
96
|
showFooter: p,
|
|
96
97
|
onApply: L,
|
|
97
98
|
onCancel: O,
|
|
@@ -1,100 +1,119 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { Cross as j, CalendarMonth 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
|
-
const
|
|
1
|
+
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { Cross as j, CalendarMonth as w } from "impact-nova-icons";
|
|
4
|
+
import { cn as D } from "../../../lib/utils.js";
|
|
5
|
+
import { Input as R } from "../input.js";
|
|
6
|
+
import { Popover as z, PopoverAnchor as E, PopoverContent as K } from "../popover.js";
|
|
7
|
+
import { Calendar as V } from "../calendar.js";
|
|
8
|
+
import { Tooltip as y, TooltipTrigger as g, TooltipContent as M } from "../tooltip.js";
|
|
9
|
+
import { useImpactNovaI18n as $ } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
10
|
+
const L = l.forwardRef(
|
|
11
11
|
({
|
|
12
|
-
value:
|
|
13
|
-
onChange:
|
|
14
|
-
placeholder:
|
|
15
|
-
minDate:
|
|
16
|
-
maxDate:
|
|
17
|
-
startMonth:
|
|
12
|
+
value: n,
|
|
13
|
+
onChange: p,
|
|
14
|
+
placeholder: C,
|
|
15
|
+
minDate: f,
|
|
16
|
+
maxDate: P,
|
|
17
|
+
startMonth: k,
|
|
18
18
|
endMonth: x,
|
|
19
|
-
showFooter:
|
|
20
|
-
disabled:
|
|
21
|
-
className:
|
|
19
|
+
showFooter: d = !0,
|
|
20
|
+
disabled: r,
|
|
21
|
+
className: b,
|
|
22
22
|
...N
|
|
23
23
|
}, T) => {
|
|
24
|
-
const { t: o } =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}, [
|
|
28
|
-
const O = (
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
|
|
24
|
+
const { t: o } = $(), A = C ?? o("datePicker.selectMultipleMonths"), [i, a] = l.useState(!1), h = l.useRef(!1), [m, c] = l.useState(n);
|
|
25
|
+
l.useEffect(() => {
|
|
26
|
+
c(n);
|
|
27
|
+
}, [i, n]);
|
|
28
|
+
const O = (e) => {
|
|
29
|
+
c(e), d || p?.(e);
|
|
30
|
+
}, v = (e) => {
|
|
31
|
+
p?.(e !== void 0 ? e : m), a(!1);
|
|
32
|
+
}, I = () => {
|
|
33
|
+
c(n), a(!1);
|
|
34
|
+
}, u = () => {
|
|
35
|
+
c(void 0), p?.(void 0), d || a(!1);
|
|
36
|
+
}, S = n && n.length > 0 ? n.length === 1 ? `${n[0].month + 1}/${n[0].year}` : o("datePicker.monthsSelected", { count: n.length }) : "";
|
|
37
|
+
return /* @__PURE__ */ s(z, { open: r ? !1 : i, onOpenChange: (e) => {
|
|
38
|
+
r || a(e);
|
|
39
39
|
}, children: [
|
|
40
|
-
/* @__PURE__ */ t(
|
|
41
|
-
|
|
40
|
+
/* @__PURE__ */ t(E, { asChild: !0, children: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
41
|
+
R,
|
|
42
42
|
{
|
|
43
43
|
ref: T,
|
|
44
|
-
value:
|
|
44
|
+
value: S,
|
|
45
45
|
placeholder: A,
|
|
46
46
|
readOnly: !0,
|
|
47
|
-
disabled:
|
|
47
|
+
disabled: r,
|
|
48
48
|
onClick: () => {
|
|
49
|
-
!
|
|
49
|
+
!r && !i && a(!0);
|
|
50
50
|
},
|
|
51
|
-
className:
|
|
52
|
-
suffix: /* @__PURE__ */
|
|
53
|
-
|
|
54
|
-
/* @__PURE__ */ t(
|
|
51
|
+
className: D("cursor-pointer", b),
|
|
52
|
+
suffix: /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
53
|
+
n && n.length > 0 && !r && /* @__PURE__ */ s(y, { children: [
|
|
54
|
+
/* @__PURE__ */ t(g, { asChild: !0, children: /* @__PURE__ */ t(
|
|
55
55
|
"button",
|
|
56
56
|
{
|
|
57
57
|
type: "button",
|
|
58
58
|
tabIndex: 0,
|
|
59
59
|
"aria-label": o("calendar.clear"),
|
|
60
|
-
onClick: (
|
|
61
|
-
|
|
60
|
+
onClick: (e) => {
|
|
61
|
+
e.stopPropagation(), u();
|
|
62
62
|
},
|
|
63
63
|
className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
|
|
64
64
|
children: /* @__PURE__ */ t(j, { className: "size-3 hover:text-content" })
|
|
65
65
|
}
|
|
66
66
|
) }),
|
|
67
|
-
/* @__PURE__ */ t(
|
|
67
|
+
/* @__PURE__ */ t(M, { variant: "tertiary", side: "top", children: o("calendar.clear") })
|
|
68
68
|
] }),
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
/* @__PURE__ */ t(
|
|
71
|
-
|
|
69
|
+
/* @__PURE__ */ s(y, { children: [
|
|
70
|
+
/* @__PURE__ */ t(g, { asChild: !0, children: /* @__PURE__ */ t(
|
|
71
|
+
"button",
|
|
72
|
+
{
|
|
73
|
+
type: "button",
|
|
74
|
+
tabIndex: 0,
|
|
75
|
+
"data-component": "calendar-trigger",
|
|
76
|
+
"aria-label": o("datePicker.selectMultipleMonths"),
|
|
77
|
+
onPointerDown: (e) => {
|
|
78
|
+
e.preventDefault(), e.stopPropagation(), r || a(!i);
|
|
79
|
+
},
|
|
80
|
+
onKeyDown: (e) => {
|
|
81
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), r || (h.current = !0, a(!i)));
|
|
82
|
+
},
|
|
83
|
+
className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer",
|
|
84
|
+
children: /* @__PURE__ */ t(w, { className: "h-4 w-4 text-secondary-foreground" })
|
|
85
|
+
}
|
|
86
|
+
) }),
|
|
87
|
+
/* @__PURE__ */ t(M, { variant: "tertiary", side: "top", children: o("datePicker.selectMultipleMonths") })
|
|
72
88
|
] })
|
|
73
89
|
] }),
|
|
74
90
|
...N
|
|
75
91
|
}
|
|
76
92
|
) }) }),
|
|
77
93
|
/* @__PURE__ */ t(
|
|
78
|
-
|
|
94
|
+
K,
|
|
79
95
|
{
|
|
80
96
|
className: "w-auto p-0",
|
|
81
97
|
align: "start",
|
|
82
|
-
|
|
98
|
+
"aria-label": o("datePicker.selectMultipleMonths"),
|
|
99
|
+
onOpenAutoFocus: (e) => {
|
|
100
|
+
h.current || e.preventDefault(), h.current = !1;
|
|
101
|
+
},
|
|
83
102
|
children: /* @__PURE__ */ t(
|
|
84
|
-
|
|
103
|
+
V,
|
|
85
104
|
{
|
|
86
105
|
pickerType: "month",
|
|
87
106
|
monthMode: "multiple",
|
|
88
107
|
selectedMonths: m,
|
|
89
108
|
onMonthSelect: O,
|
|
90
|
-
disabled: { before:
|
|
91
|
-
startMonth:
|
|
109
|
+
disabled: { before: f, after: P },
|
|
110
|
+
startMonth: k,
|
|
92
111
|
endMonth: x,
|
|
93
|
-
defaultMonth:
|
|
94
|
-
showFooter:
|
|
95
|
-
onApply:
|
|
96
|
-
onCancel:
|
|
97
|
-
onClear:
|
|
112
|
+
defaultMonth: f,
|
|
113
|
+
showFooter: d,
|
|
114
|
+
onApply: v,
|
|
115
|
+
onCancel: I,
|
|
116
|
+
onClear: u,
|
|
98
117
|
captionLayout: "dropdown"
|
|
99
118
|
}
|
|
100
119
|
)
|
|
@@ -103,7 +122,7 @@ const q = c.forwardRef(
|
|
|
103
122
|
] });
|
|
104
123
|
}
|
|
105
124
|
);
|
|
106
|
-
|
|
125
|
+
L.displayName = "MultiMonthPicker";
|
|
107
126
|
export {
|
|
108
|
-
|
|
127
|
+
L as MultiMonthPicker
|
|
109
128
|
};
|
|
@@ -1,117 +1,136 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsxs as d, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as c from "react";
|
|
3
3
|
import { Cross as V, CalendarMonth as q } from "impact-nova-icons";
|
|
4
|
-
import { format as
|
|
4
|
+
import { format as C } from "date-fns";
|
|
5
5
|
import { cn as B } from "../../../lib/utils.js";
|
|
6
6
|
import { Input as F } from "../input.js";
|
|
7
7
|
import { Popover as G, PopoverAnchor as H, PopoverContent as J } from "../popover.js";
|
|
8
|
-
import { Calendar as
|
|
9
|
-
import { Tooltip as
|
|
10
|
-
import { getDateFnsLocale as
|
|
11
|
-
import { useImpactNovaI18n as
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
return `${
|
|
15
|
-
},
|
|
8
|
+
import { Calendar as Q } from "../calendar.js";
|
|
9
|
+
import { Tooltip as P, TooltipTrigger as b, TooltipContent as x } from "../tooltip.js";
|
|
10
|
+
import { getDateFnsLocale as U } from "../../../i18n/getDateFnsLocale.js";
|
|
11
|
+
import { useImpactNovaI18n as X } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
12
|
+
const Y = (t, a = "MM/dd/yyyy", s) => {
|
|
13
|
+
const f = C(t.startDate, a, s ? { locale: s } : {}), m = C(t.endDate, a, s ? { locale: s } : {});
|
|
14
|
+
return `${f} - ${m}`;
|
|
15
|
+
}, Z = c.forwardRef(
|
|
16
16
|
({
|
|
17
|
-
value:
|
|
18
|
-
onChange:
|
|
19
|
-
format:
|
|
20
|
-
placeholder:
|
|
17
|
+
value: t,
|
|
18
|
+
onChange: a,
|
|
19
|
+
format: s = "MM/dd/yyyy",
|
|
20
|
+
placeholder: f,
|
|
21
21
|
minDate: m,
|
|
22
|
-
maxDate:
|
|
23
|
-
startMonth:
|
|
24
|
-
endMonth:
|
|
25
|
-
showFooter:
|
|
26
|
-
calendarType:
|
|
27
|
-
fiscalMode:
|
|
28
|
-
selectionMode:
|
|
29
|
-
fiscalMonthPattern:
|
|
30
|
-
fiscalYearStartMonth:
|
|
31
|
-
weekStartsOn:
|
|
32
|
-
disabled:
|
|
33
|
-
className:
|
|
34
|
-
...
|
|
35
|
-
},
|
|
36
|
-
const { locale:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}, [
|
|
40
|
-
const $ = (
|
|
41
|
-
|
|
42
|
-
}, z = (
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
|
|
22
|
+
maxDate: W,
|
|
23
|
+
startMonth: M,
|
|
24
|
+
endMonth: N,
|
|
25
|
+
showFooter: u = !0,
|
|
26
|
+
calendarType: w = "calendar",
|
|
27
|
+
fiscalMode: D = "basic",
|
|
28
|
+
selectionMode: T = "week",
|
|
29
|
+
fiscalMonthPattern: v,
|
|
30
|
+
fiscalYearStartMonth: A = 1,
|
|
31
|
+
weekStartsOn: O = 1,
|
|
32
|
+
disabled: n,
|
|
33
|
+
className: S,
|
|
34
|
+
...I
|
|
35
|
+
}, j) => {
|
|
36
|
+
const { locale: y, t: i } = X(), L = c.useMemo(() => U(y), [y]), R = f ?? i("datePicker.selectWeeks"), [l, o] = c.useState(!1), h = c.useRef(!1), [k, p] = c.useState(t);
|
|
37
|
+
c.useEffect(() => {
|
|
38
|
+
p(t);
|
|
39
|
+
}, [l, t]);
|
|
40
|
+
const $ = (e) => {
|
|
41
|
+
p(e), u || a?.(e);
|
|
42
|
+
}, z = (e) => {
|
|
43
|
+
a?.(e !== void 0 ? e : k), o(!1);
|
|
44
|
+
}, E = () => {
|
|
45
|
+
p(t), o(!1);
|
|
46
|
+
}, g = () => {
|
|
47
|
+
p(void 0), a?.(void 0), u || o(!1);
|
|
48
|
+
}, K = t && t.length > 0 ? t.length === 1 ? Y(t[0], s, L) : `${t.length} weeks selected` : "";
|
|
49
|
+
return /* @__PURE__ */ d(G, { open: n ? !1 : l, onOpenChange: (e) => {
|
|
50
|
+
n || o(e);
|
|
51
51
|
}, children: [
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ r(H, { asChild: !0, children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
|
|
53
53
|
F,
|
|
54
54
|
{
|
|
55
|
-
ref:
|
|
56
|
-
value:
|
|
57
|
-
placeholder:
|
|
55
|
+
ref: j,
|
|
56
|
+
value: K,
|
|
57
|
+
placeholder: R,
|
|
58
58
|
readOnly: !0,
|
|
59
|
-
disabled:
|
|
59
|
+
disabled: n,
|
|
60
60
|
onClick: () => {
|
|
61
|
-
!
|
|
61
|
+
!n && !l && o(!0);
|
|
62
62
|
},
|
|
63
|
-
className: B("cursor-pointer",
|
|
64
|
-
suffix: /* @__PURE__ */
|
|
65
|
-
|
|
66
|
-
/* @__PURE__ */
|
|
63
|
+
className: B("cursor-pointer", S),
|
|
64
|
+
suffix: /* @__PURE__ */ d("div", { className: "flex items-center gap-1", children: [
|
|
65
|
+
t && t.length > 0 && !n && /* @__PURE__ */ d(P, { children: [
|
|
66
|
+
/* @__PURE__ */ r(b, { asChild: !0, children: /* @__PURE__ */ r(
|
|
67
67
|
"button",
|
|
68
68
|
{
|
|
69
69
|
type: "button",
|
|
70
70
|
tabIndex: 0,
|
|
71
71
|
"aria-label": i("calendar.clear"),
|
|
72
|
-
onClick: (
|
|
73
|
-
|
|
72
|
+
onClick: (e) => {
|
|
73
|
+
e.stopPropagation(), g();
|
|
74
74
|
},
|
|
75
75
|
className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
|
|
76
|
-
children: /* @__PURE__ */
|
|
76
|
+
children: /* @__PURE__ */ r(V, { className: "size-3 hover:text-content" })
|
|
77
77
|
}
|
|
78
78
|
) }),
|
|
79
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ r(x, { variant: "tertiary", side: "top", children: i("calendar.clear") })
|
|
80
80
|
] }),
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
|
|
81
|
+
/* @__PURE__ */ d(P, { children: [
|
|
82
|
+
/* @__PURE__ */ r(b, { asChild: !0, children: /* @__PURE__ */ r(
|
|
83
|
+
"button",
|
|
84
|
+
{
|
|
85
|
+
type: "button",
|
|
86
|
+
tabIndex: 0,
|
|
87
|
+
"data-component": "calendar-trigger",
|
|
88
|
+
"aria-label": i("datePicker.selectWeeks"),
|
|
89
|
+
onPointerDown: (e) => {
|
|
90
|
+
e.preventDefault(), e.stopPropagation(), n || o(!l);
|
|
91
|
+
},
|
|
92
|
+
onKeyDown: (e) => {
|
|
93
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), n || (h.current = !0, o(!l)));
|
|
94
|
+
},
|
|
95
|
+
className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer",
|
|
96
|
+
children: /* @__PURE__ */ r(q, { className: "h-4 w-4 text-secondary-foreground" })
|
|
97
|
+
}
|
|
98
|
+
) }),
|
|
99
|
+
/* @__PURE__ */ r(x, { variant: "tertiary", side: "top", children: i("datePicker.selectWeeks") })
|
|
84
100
|
] })
|
|
85
101
|
] }),
|
|
86
|
-
...
|
|
102
|
+
...I
|
|
87
103
|
}
|
|
88
104
|
) }) }),
|
|
89
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ r(
|
|
90
106
|
J,
|
|
91
107
|
{
|
|
92
108
|
className: "w-auto p-0",
|
|
93
109
|
align: "start",
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
110
|
+
"aria-label": i("datePicker.selectWeeks"),
|
|
111
|
+
onOpenAutoFocus: (e) => {
|
|
112
|
+
h.current || e.preventDefault(), h.current = !1;
|
|
113
|
+
},
|
|
114
|
+
children: /* @__PURE__ */ r(
|
|
115
|
+
Q,
|
|
97
116
|
{
|
|
98
117
|
pickerType: "week",
|
|
99
118
|
weekMode: "multiple",
|
|
100
|
-
selectedWeeks:
|
|
119
|
+
selectedWeeks: k,
|
|
101
120
|
onWeekSelect: $,
|
|
102
|
-
disabled: { before: m, after:
|
|
103
|
-
startMonth:
|
|
104
|
-
endMonth:
|
|
105
|
-
showFooter:
|
|
106
|
-
calendarType:
|
|
107
|
-
fiscalMode:
|
|
108
|
-
selectionMode:
|
|
109
|
-
fiscalMonthPattern:
|
|
110
|
-
fiscalYearStartMonth:
|
|
111
|
-
weekStartsOn:
|
|
121
|
+
disabled: { before: m, after: W },
|
|
122
|
+
startMonth: M,
|
|
123
|
+
endMonth: N,
|
|
124
|
+
showFooter: u,
|
|
125
|
+
calendarType: w,
|
|
126
|
+
fiscalMode: D,
|
|
127
|
+
selectionMode: T,
|
|
128
|
+
fiscalMonthPattern: v,
|
|
129
|
+
fiscalYearStartMonth: A,
|
|
130
|
+
weekStartsOn: O,
|
|
112
131
|
onApply: z,
|
|
113
|
-
onCancel:
|
|
114
|
-
onClear:
|
|
132
|
+
onCancel: E,
|
|
133
|
+
onClear: g,
|
|
115
134
|
captionLayout: "dropdown"
|
|
116
135
|
}
|
|
117
136
|
)
|
|
@@ -120,7 +139,7 @@ const X = (e, n = "MM/dd/yyyy", o) => {
|
|
|
120
139
|
] });
|
|
121
140
|
}
|
|
122
141
|
);
|
|
123
|
-
|
|
142
|
+
Z.displayName = "MultiWeekPicker";
|
|
124
143
|
export {
|
|
125
|
-
|
|
144
|
+
Z as MultiWeekPicker
|
|
126
145
|
};
|