@apipass/design-system 8.0.0 → 8.2.0
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/lib/embedded-styles.js +2 -2
- package/dist/lib/lib.index.cjs +1 -1
- package/dist/lib/lib.index.js +775 -773
- package/dist/lib/style.css +1 -1
- package/dist/lib/ui/primitives/DateRangePicker/DateRangePicker.cjs +1 -1
- package/dist/lib/ui/primitives/DateRangePicker/DateRangePicker.cjs.map +1 -1
- package/dist/lib/ui/primitives/DateRangePicker/DateRangePicker.js +235 -229
- package/dist/lib/ui/primitives/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/lib/ui/primitives/DateRangePicker/dateRangePresets.cjs +1 -1
- package/dist/lib/ui/primitives/DateRangePicker/dateRangePresets.cjs.map +1 -1
- package/dist/lib/ui/primitives/DateRangePicker/dateRangePresets.js +26 -21
- package/dist/lib/ui/primitives/DateRangePicker/dateRangePresets.js.map +1 -1
- package/dist/lib/ui/primitives/Select/MultiSelect.cjs +1 -1
- package/dist/lib/ui/primitives/Select/MultiSelect.cjs.map +1 -1
- package/dist/lib/ui/primitives/Select/MultiSelect.js +138 -68
- package/dist/lib/ui/primitives/Select/MultiSelect.js.map +1 -1
- package/dist/types/ui/primitives/DateRangePicker/DateRangePicker.d.ts +3 -2
- package/dist/types/ui/primitives/DateRangePicker/dateRangePresets.d.ts +5 -0
- package/dist/types/ui/primitives/Select/MultiSelect.d.ts +17 -3
- package/package.json +8 -2
|
@@ -1,249 +1,255 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { getLocalTimeZone as
|
|
3
|
-
import { clsx as
|
|
4
|
-
import { useMemo as
|
|
5
|
-
import { useLocale as
|
|
6
|
-
import { createDateRangePresets as
|
|
1
|
+
import { jsxs as l, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { getLocalTimeZone as Oe, toTimeZone as Ve, toCalendarDate as h, Time as H, toCalendarDateTime as Ze } from "@internationalized/date";
|
|
3
|
+
import { clsx as $e } from "../../../vendor/clsx/dist/clsx.js";
|
|
4
|
+
import { useMemo as Ge, useState as x, useEffect as ge, useContext as je } from "react";
|
|
5
|
+
import { useLocale as qe, DialogTrigger as ze, Button as j, Popover as He, Dialog as Ke, DateField as re, Label as se, Group as ie, DateInput as le, DateSegment as ce, RangeCalendar as Ue, Heading as _e, CalendarGrid as Je, CalendarCell as Me, I18nProvider as Qe, RangeCalendarStateContext as Xe } from "react-aria-components";
|
|
6
|
+
import { createDateRangePresets as Ye } from "./dateRangePresets.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import { IconCalendar as
|
|
9
|
-
import { IconChevronDown as
|
|
10
|
-
import { TextSmallStrong as
|
|
11
|
-
import { IconCheck as
|
|
12
|
-
import { IconChevronLeft as
|
|
13
|
-
import { IconChevronRight as
|
|
14
|
-
import { useOverlayPortalContainer as
|
|
15
|
-
import { Field as
|
|
16
|
-
import { ListBox as
|
|
17
|
-
import { Button as
|
|
18
|
-
const
|
|
19
|
-
function
|
|
20
|
-
onAnchorChange:
|
|
8
|
+
import { IconCalendar as q } from "../../icons/IconCalendar.js";
|
|
9
|
+
import { IconChevronDown as We } from "../../icons/IconChevronDown.js";
|
|
10
|
+
import { TextSmallStrong as oe, Text as et } from "../Text/Text.js";
|
|
11
|
+
import { IconCheck as tt } from "../../icons/IconCheck.js";
|
|
12
|
+
import { IconChevronLeft as at } from "../../icons/IconChevronLeft.js";
|
|
13
|
+
import { IconChevronRight as nt } from "../../icons/IconChevronRight.js";
|
|
14
|
+
import { useOverlayPortalContainer as rt } from "../../hooks/useOverlayPortal.js";
|
|
15
|
+
import { Field as st, Label as it, Description as lt } from "../Fieldset/Fieldset.js";
|
|
16
|
+
import { ListBox as ct, ListBoxItem as ot } from "../ListBox/ListBox.js";
|
|
17
|
+
import { Button as de } from "../Button/Button.js";
|
|
18
|
+
const z = () => new H(0, 0, 0), me = () => new H(23, 59, 59);
|
|
19
|
+
function dt({
|
|
20
|
+
onAnchorChange: t
|
|
21
21
|
}) {
|
|
22
|
-
const
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
}, [
|
|
22
|
+
const s = je(Xe), i = (s == null ? void 0 : s.anchorDate) ?? null, o = i == null ? void 0 : i.toString();
|
|
23
|
+
return ge(() => {
|
|
24
|
+
t(i);
|
|
25
|
+
}, [o]), null;
|
|
26
26
|
}
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
preset: a.preset
|
|
32
|
-
}, m = (a, l, c) => {
|
|
33
|
-
if (!a) return null;
|
|
34
|
-
const p = h(a);
|
|
35
|
-
return c || !l ? p : Ae(p, l);
|
|
36
|
-
}, ca = (a, l) => {
|
|
37
|
-
var c, p;
|
|
27
|
+
const T = (t) => t && "hour" in t ? new H(t.hour, t.minute, t.second) : null, w = (t, s) => "timeZone" in t ? Ve(t, s) : t, pe = (t, s) => {
|
|
28
|
+
if (!t || !t.start && !t.end)
|
|
29
|
+
return { range: null, startTime: null, endTime: null, preset: t == null ? void 0 : t.preset };
|
|
30
|
+
const i = t.start && w(t.start, s), o = t.end && w(t.end, s);
|
|
38
31
|
return {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
range: i && o ? { start: h(i), end: h(o) } : null,
|
|
33
|
+
startTime: T(i),
|
|
34
|
+
endTime: T(o),
|
|
35
|
+
preset: t.preset
|
|
36
|
+
};
|
|
37
|
+
}, p = (t, s, i) => {
|
|
38
|
+
if (!t) return null;
|
|
39
|
+
const o = h(t);
|
|
40
|
+
return i || !s ? o : Ze(o, s);
|
|
41
|
+
}, mt = (t, s) => {
|
|
42
|
+
var i, o;
|
|
43
|
+
return {
|
|
44
|
+
preset: t.preset,
|
|
45
|
+
start: p((i = t.range) == null ? void 0 : i.start, t.startTime, s),
|
|
46
|
+
end: p((o = t.range) == null ? void 0 : o.end, t.endTime, s)
|
|
42
47
|
};
|
|
43
48
|
};
|
|
44
|
-
function
|
|
45
|
-
className:
|
|
46
|
-
locale:
|
|
47
|
-
label:
|
|
48
|
-
"aria-label":
|
|
49
|
-
description:
|
|
50
|
-
errorMessage:
|
|
51
|
-
labels:
|
|
52
|
-
intervals:
|
|
53
|
-
presetKeys:
|
|
54
|
-
presetLabels:
|
|
55
|
-
hideTime:
|
|
56
|
-
minValue:
|
|
57
|
-
maxValue:
|
|
58
|
-
timezone:
|
|
59
|
-
|
|
49
|
+
function It({
|
|
50
|
+
className: t,
|
|
51
|
+
locale: s,
|
|
52
|
+
label: i,
|
|
53
|
+
"aria-label": o,
|
|
54
|
+
description: B,
|
|
55
|
+
errorMessage: I,
|
|
56
|
+
labels: he,
|
|
57
|
+
intervals: R,
|
|
58
|
+
presetKeys: E,
|
|
59
|
+
presetLabels: F,
|
|
60
|
+
hideTime: c = !1,
|
|
61
|
+
minValue: P,
|
|
62
|
+
maxValue: A,
|
|
63
|
+
timezone: O,
|
|
64
|
+
firstDayOfWeek: K,
|
|
65
|
+
isDisabled: ue = !1,
|
|
60
66
|
isRequired: fe = !1,
|
|
61
|
-
value:
|
|
62
|
-
defaultValue:
|
|
63
|
-
onChange:
|
|
67
|
+
value: S,
|
|
68
|
+
defaultValue: ke,
|
|
69
|
+
onChange: V
|
|
64
70
|
}) {
|
|
65
|
-
var
|
|
66
|
-
const
|
|
67
|
-
placeholder:
|
|
68
|
-
relativeLabel:
|
|
69
|
-
absoluteLabel:
|
|
70
|
-
startDateLabel:
|
|
71
|
-
endDateLabel:
|
|
72
|
-
cancelLabel:
|
|
73
|
-
applyLabel:
|
|
74
|
-
} =
|
|
75
|
-
if (
|
|
76
|
-
if (
|
|
77
|
-
if (!
|
|
71
|
+
var te, ae;
|
|
72
|
+
const Ne = rt(), { locale: Te } = qe(), be = s ?? Te ?? "pt-BR", u = O ?? Oe(), {
|
|
73
|
+
placeholder: U,
|
|
74
|
+
relativeLabel: _,
|
|
75
|
+
absoluteLabel: J,
|
|
76
|
+
startDateLabel: Ce,
|
|
77
|
+
endDateLabel: De,
|
|
78
|
+
cancelLabel: Z,
|
|
79
|
+
applyLabel: $
|
|
80
|
+
} = he, f = Ge(() => {
|
|
81
|
+
if (R) return R;
|
|
82
|
+
if (E) {
|
|
83
|
+
if (!F)
|
|
78
84
|
throw new Error(
|
|
79
85
|
"DateRangePicker: `presetLabels` is required when `presetKeys` is provided."
|
|
80
86
|
);
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
include:
|
|
85
|
-
labels:
|
|
87
|
+
return Ye({
|
|
88
|
+
timezone: O,
|
|
89
|
+
firstDayOfWeek: K,
|
|
90
|
+
include: E,
|
|
91
|
+
labels: F
|
|
86
92
|
});
|
|
87
93
|
}
|
|
88
|
-
}, [
|
|
89
|
-
() =>
|
|
90
|
-
), [g,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}, [
|
|
94
|
-
const
|
|
94
|
+
}, [R, E, F, K, O]), [m, M] = x(
|
|
95
|
+
() => pe(S ?? ke, u)
|
|
96
|
+
), [g, k] = x(m), [ve, b] = x(null), [Le, G] = x(!1);
|
|
97
|
+
ge(() => {
|
|
98
|
+
S !== void 0 && M(pe(S, u));
|
|
99
|
+
}, [S, u]);
|
|
100
|
+
const y = (e) => ({
|
|
95
101
|
...e,
|
|
96
102
|
preset: void 0
|
|
97
|
-
}),
|
|
103
|
+
}), Se = (e) => c ? e : {
|
|
98
104
|
...e,
|
|
99
|
-
startTime: e.startTime ??
|
|
100
|
-
endTime: e.endTime ??
|
|
105
|
+
startTime: e.startTime ?? z(),
|
|
106
|
+
endTime: e.endTime ?? me()
|
|
101
107
|
}, ye = (e) => {
|
|
102
|
-
e && (
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
range: { start: h(
|
|
108
|
-
startTime:
|
|
109
|
-
endTime:
|
|
108
|
+
e && (k(m), b(null)), G(e);
|
|
109
|
+
}, xe = (e) => {
|
|
110
|
+
b(null);
|
|
111
|
+
const r = e.getValue(), d = w(r.start, u), n = w(r.end, u);
|
|
112
|
+
k({
|
|
113
|
+
range: { start: h(d), end: h(n) },
|
|
114
|
+
startTime: T(d),
|
|
115
|
+
endTime: T(n),
|
|
110
116
|
preset: e
|
|
111
117
|
});
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
(
|
|
115
|
-
...
|
|
116
|
-
startTime:
|
|
118
|
+
}, we = (e) => {
|
|
119
|
+
b(e), e && !c && k(
|
|
120
|
+
(r) => y({
|
|
121
|
+
...r,
|
|
122
|
+
startTime: r.startTime ?? z()
|
|
117
123
|
})
|
|
118
124
|
);
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
},
|
|
125
|
+
}, Be = (e) => {
|
|
126
|
+
b(null), k((r) => Se(y({ ...r, range: e })));
|
|
127
|
+
}, Ie = (e) => {
|
|
122
128
|
if (!e) return;
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
var
|
|
127
|
-
const
|
|
128
|
-
(
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
),
|
|
132
|
-
return
|
|
133
|
-
...
|
|
129
|
+
b(null);
|
|
130
|
+
const r = h(e), d = T(e);
|
|
131
|
+
k((n) => {
|
|
132
|
+
var L, ne;
|
|
133
|
+
const N = c ? n.startTime : d ?? n.startTime ?? z(), C = p(r, N, c), D = p(
|
|
134
|
+
(L = n.range) == null ? void 0 : L.end,
|
|
135
|
+
n.endTime,
|
|
136
|
+
c
|
|
137
|
+
), v = !!(C && D && D.compare(C) < 0);
|
|
138
|
+
return y({
|
|
139
|
+
...n,
|
|
134
140
|
range: {
|
|
135
|
-
start:
|
|
136
|
-
end:
|
|
141
|
+
start: r,
|
|
142
|
+
end: v || !((ne = n.range) != null && ne.end) ? r : n.range.end
|
|
137
143
|
},
|
|
138
|
-
startTime:
|
|
139
|
-
endTime:
|
|
144
|
+
startTime: N,
|
|
145
|
+
endTime: v ? N : n.endTime
|
|
140
146
|
});
|
|
141
147
|
});
|
|
142
|
-
},
|
|
148
|
+
}, Re = (e) => {
|
|
143
149
|
if (!e) return;
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
var
|
|
147
|
-
const
|
|
148
|
-
(
|
|
149
|
-
|
|
150
|
-
|
|
150
|
+
const r = h(e), d = T(e);
|
|
151
|
+
k((n) => {
|
|
152
|
+
var v, L;
|
|
153
|
+
const N = c ? n.endTime : d ?? n.endTime ?? me(), C = p(r, N, c), D = p(
|
|
154
|
+
(v = n.range) == null ? void 0 : v.start,
|
|
155
|
+
n.startTime,
|
|
156
|
+
c
|
|
151
157
|
);
|
|
152
|
-
return
|
|
153
|
-
...
|
|
154
|
-
range: { start: ((
|
|
155
|
-
endTime:
|
|
158
|
+
return D && C && C.compare(D) < 0 ? n : y({
|
|
159
|
+
...n,
|
|
160
|
+
range: { start: ((L = n.range) == null ? void 0 : L.start) ?? r, end: r },
|
|
161
|
+
endTime: N
|
|
156
162
|
});
|
|
157
163
|
});
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
},
|
|
161
|
-
if (
|
|
162
|
-
if (
|
|
163
|
-
const e = (
|
|
164
|
+
}, Ee = () => {
|
|
165
|
+
M(g), V == null || V(mt(g, c)), G(!1);
|
|
166
|
+
}, Fe = () => G(!1), Pe = !!(Z || $), Q = (() => {
|
|
167
|
+
if (m.preset) return m.preset.label;
|
|
168
|
+
if (m.range) {
|
|
169
|
+
const e = (n) => n.toDate(u).toLocaleString(be, {
|
|
164
170
|
day: "2-digit",
|
|
165
171
|
month: "2-digit",
|
|
166
172
|
year: "numeric",
|
|
167
|
-
...
|
|
168
|
-
}),
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
),
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
...c ? {} : { hour: "2-digit", minute: "2-digit", second: "2-digit" }
|
|
174
|
+
}), r = p(
|
|
175
|
+
m.range.start,
|
|
176
|
+
m.startTime,
|
|
177
|
+
c
|
|
178
|
+
), d = p(
|
|
179
|
+
m.range.end,
|
|
180
|
+
m.endTime,
|
|
181
|
+
c
|
|
176
182
|
);
|
|
177
|
-
if (
|
|
183
|
+
if (r && d) return `${e(r)} — ${e(d)}`;
|
|
178
184
|
}
|
|
179
185
|
return null;
|
|
180
|
-
})(),
|
|
181
|
-
((
|
|
186
|
+
})(), Ae = !!(f && f.length > 0), X = c ? "day" : "second", Y = p(
|
|
187
|
+
((te = g.range) == null ? void 0 : te.start) ?? ve ?? void 0,
|
|
182
188
|
g.startTime,
|
|
183
|
-
|
|
184
|
-
), W =
|
|
185
|
-
((
|
|
189
|
+
c
|
|
190
|
+
), W = p(
|
|
191
|
+
((ae = g.range) == null ? void 0 : ae.end) ?? void 0,
|
|
186
192
|
g.endTime,
|
|
187
|
-
|
|
188
|
-
),
|
|
189
|
-
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
|
|
193
|
+
c
|
|
194
|
+
), ee = /* @__PURE__ */ l(st, { className: $e(t, "date-range-picker"), children: [
|
|
195
|
+
i && /* @__PURE__ */ a(it, { children: i }),
|
|
196
|
+
/* @__PURE__ */ l(ze, { isOpen: Le, onOpenChange: ye, children: [
|
|
197
|
+
/* @__PURE__ */ l(
|
|
198
|
+
j,
|
|
193
199
|
{
|
|
194
200
|
className: "date-range-picker-trigger",
|
|
195
|
-
isDisabled:
|
|
196
|
-
"aria-label":
|
|
201
|
+
isDisabled: ue,
|
|
202
|
+
"aria-label": i ? void 0 : o ?? U,
|
|
197
203
|
"aria-required": fe || void 0,
|
|
198
|
-
"data-invalid":
|
|
204
|
+
"data-invalid": I ? !0 : void 0,
|
|
199
205
|
children: [
|
|
200
|
-
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
|
|
203
|
-
] }) : /* @__PURE__ */
|
|
206
|
+
m.preset ? /* @__PURE__ */ l("span", { className: "date-range-picker-preset-badge", children: [
|
|
207
|
+
/* @__PURE__ */ a(q, { "aria-hidden": "true" }),
|
|
208
|
+
m.preset.label
|
|
209
|
+
] }) : /* @__PURE__ */ a(
|
|
204
210
|
"span",
|
|
205
211
|
{
|
|
206
212
|
className: "date-range-picker-value",
|
|
207
|
-
"data-placeholder":
|
|
208
|
-
children:
|
|
213
|
+
"data-placeholder": Q ? void 0 : !0,
|
|
214
|
+
children: Q ?? U
|
|
209
215
|
}
|
|
210
216
|
),
|
|
211
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ a(We, { "aria-hidden": "true" })
|
|
212
218
|
]
|
|
213
219
|
}
|
|
214
220
|
),
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
|
|
221
|
+
/* @__PURE__ */ a(
|
|
222
|
+
He,
|
|
217
223
|
{
|
|
218
224
|
className: "date-range-picker-popover",
|
|
219
225
|
placement: "bottom start",
|
|
220
|
-
UNSTABLE_portalContainer:
|
|
221
|
-
children: /* @__PURE__ */
|
|
222
|
-
/* @__PURE__ */
|
|
223
|
-
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
|
|
226
|
+
UNSTABLE_portalContainer: Ne,
|
|
227
|
+
children: /* @__PURE__ */ l(Ke, { className: "date-range-picker-dialog", children: [
|
|
228
|
+
/* @__PURE__ */ l("div", { className: "date-range-picker-body", children: [
|
|
229
|
+
Ae && /* @__PURE__ */ l("div", { className: "date-range-picker-presets", children: [
|
|
230
|
+
/* @__PURE__ */ a(oe, { className: "date-range-picker-section-title", children: _ }),
|
|
231
|
+
/* @__PURE__ */ a(
|
|
232
|
+
ct,
|
|
227
233
|
{
|
|
228
|
-
"aria-label":
|
|
234
|
+
"aria-label": _,
|
|
229
235
|
className: "date-range-picker-presets-list",
|
|
230
236
|
selectionMode: "single",
|
|
231
237
|
selectedKeys: g.preset ? [g.preset.id] : [],
|
|
232
238
|
items: f,
|
|
233
239
|
onSelectionChange: (e) => {
|
|
234
|
-
const [
|
|
235
|
-
|
|
240
|
+
const [r] = [...e], d = f == null ? void 0 : f.find((n) => n.id === r);
|
|
241
|
+
d && xe(d);
|
|
236
242
|
},
|
|
237
|
-
children: (e) => /* @__PURE__ */
|
|
238
|
-
|
|
243
|
+
children: (e) => /* @__PURE__ */ l(
|
|
244
|
+
ot,
|
|
239
245
|
{
|
|
240
246
|
id: e.id,
|
|
241
247
|
textValue: e.label,
|
|
242
248
|
className: "date-range-picker-preset-item",
|
|
243
249
|
children: [
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
-
|
|
250
|
+
/* @__PURE__ */ a("span", { children: e.label }),
|
|
251
|
+
/* @__PURE__ */ a(
|
|
252
|
+
tt,
|
|
247
253
|
{
|
|
248
254
|
"aria-hidden": "true",
|
|
249
255
|
className: "date-range-picker-preset-check"
|
|
@@ -255,78 +261,78 @@ function xa({
|
|
|
255
261
|
}
|
|
256
262
|
)
|
|
257
263
|
] }),
|
|
258
|
-
/* @__PURE__ */
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
|
|
264
|
+
/* @__PURE__ */ l("div", { className: "date-range-picker-absolute", children: [
|
|
265
|
+
/* @__PURE__ */ a(oe, { className: "date-range-picker-section-title", children: J }),
|
|
266
|
+
/* @__PURE__ */ l("div", { className: "date-range-picker-fields", children: [
|
|
267
|
+
/* @__PURE__ */ l(
|
|
268
|
+
re,
|
|
263
269
|
{
|
|
264
270
|
className: "date-range-picker-datefield",
|
|
265
|
-
granularity:
|
|
266
|
-
value:
|
|
267
|
-
minValue:
|
|
268
|
-
maxValue: W ??
|
|
269
|
-
onChange:
|
|
271
|
+
granularity: X,
|
|
272
|
+
value: Y,
|
|
273
|
+
minValue: P,
|
|
274
|
+
maxValue: W ?? A,
|
|
275
|
+
onChange: Ie,
|
|
270
276
|
children: [
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
-
/* @__PURE__ */
|
|
274
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ a(se, { className: "date-range-picker-field-label", children: Ce }),
|
|
278
|
+
/* @__PURE__ */ l(ie, { className: "date-range-picker-input", children: [
|
|
279
|
+
/* @__PURE__ */ a(le, { children: (e) => /* @__PURE__ */ a(ce, { segment: e }) }),
|
|
280
|
+
/* @__PURE__ */ a(q, { "aria-hidden": "true" })
|
|
275
281
|
] })
|
|
276
282
|
]
|
|
277
283
|
}
|
|
278
284
|
),
|
|
279
|
-
/* @__PURE__ */
|
|
280
|
-
|
|
285
|
+
/* @__PURE__ */ l(
|
|
286
|
+
re,
|
|
281
287
|
{
|
|
282
288
|
className: "date-range-picker-datefield",
|
|
283
|
-
granularity:
|
|
289
|
+
granularity: X,
|
|
284
290
|
value: W,
|
|
285
|
-
minValue:
|
|
286
|
-
maxValue:
|
|
287
|
-
onChange:
|
|
291
|
+
minValue: Y ?? P,
|
|
292
|
+
maxValue: A,
|
|
293
|
+
onChange: Re,
|
|
288
294
|
children: [
|
|
289
|
-
/* @__PURE__ */
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ a(se, { className: "date-range-picker-field-label", children: De }),
|
|
296
|
+
/* @__PURE__ */ l(ie, { className: "date-range-picker-input", children: [
|
|
297
|
+
/* @__PURE__ */ a(le, { children: (e) => /* @__PURE__ */ a(ce, { segment: e }) }),
|
|
298
|
+
/* @__PURE__ */ a(q, { "aria-hidden": "true" })
|
|
293
299
|
] })
|
|
294
300
|
]
|
|
295
301
|
}
|
|
296
302
|
)
|
|
297
303
|
] }),
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
-
|
|
304
|
+
/* @__PURE__ */ l(
|
|
305
|
+
Ue,
|
|
300
306
|
{
|
|
301
307
|
className: "date-range-picker-calendar",
|
|
302
|
-
"aria-label":
|
|
308
|
+
"aria-label": J,
|
|
303
309
|
value: g.range,
|
|
304
|
-
minValue:
|
|
305
|
-
maxValue:
|
|
306
|
-
onChange:
|
|
310
|
+
minValue: P,
|
|
311
|
+
maxValue: A,
|
|
312
|
+
onChange: Be,
|
|
307
313
|
children: [
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
-
/* @__PURE__ */
|
|
311
|
-
|
|
314
|
+
/* @__PURE__ */ a(dt, { onAnchorChange: we }),
|
|
315
|
+
/* @__PURE__ */ l("header", { className: "date-range-picker-calendar-header", children: [
|
|
316
|
+
/* @__PURE__ */ a(
|
|
317
|
+
j,
|
|
312
318
|
{
|
|
313
319
|
slot: "previous",
|
|
314
320
|
className: "date-range-picker-calendar-nav",
|
|
315
|
-
children: /* @__PURE__ */
|
|
321
|
+
children: /* @__PURE__ */ a(at, { "aria-hidden": "true" })
|
|
316
322
|
}
|
|
317
323
|
),
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
-
/* @__PURE__ */
|
|
320
|
-
|
|
324
|
+
/* @__PURE__ */ a(_e, { className: "date-range-picker-calendar-heading" }),
|
|
325
|
+
/* @__PURE__ */ a(
|
|
326
|
+
j,
|
|
321
327
|
{
|
|
322
328
|
slot: "next",
|
|
323
329
|
className: "date-range-picker-calendar-nav",
|
|
324
|
-
children: /* @__PURE__ */
|
|
330
|
+
children: /* @__PURE__ */ a(nt, { "aria-hidden": "true" })
|
|
325
331
|
}
|
|
326
332
|
)
|
|
327
333
|
] }),
|
|
328
|
-
/* @__PURE__ */
|
|
329
|
-
|
|
334
|
+
/* @__PURE__ */ a(Je, { className: "date-range-picker-calendar-grid", children: (e) => /* @__PURE__ */ a(
|
|
335
|
+
Me,
|
|
330
336
|
{
|
|
331
337
|
date: e,
|
|
332
338
|
className: "date-range-picker-calendar-cell"
|
|
@@ -337,20 +343,20 @@ function xa({
|
|
|
337
343
|
)
|
|
338
344
|
] })
|
|
339
345
|
] }),
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
346
|
+
Pe && /* @__PURE__ */ l("div", { className: "date-range-picker-actions", children: [
|
|
347
|
+
Z && /* @__PURE__ */ a(de, { variant: "neutral", size: "small", onPress: Fe, children: Z }),
|
|
348
|
+
$ && /* @__PURE__ */ a(de, { variant: "primary", size: "small", onPress: Ee, children: $ })
|
|
343
349
|
] })
|
|
344
350
|
] })
|
|
345
351
|
}
|
|
346
352
|
)
|
|
347
353
|
] }),
|
|
348
|
-
|
|
349
|
-
|
|
354
|
+
B && /* @__PURE__ */ a(lt, { children: B }),
|
|
355
|
+
I && /* @__PURE__ */ a(et, { className: "date-range-picker-error", elementType: "span", children: I })
|
|
350
356
|
] });
|
|
351
|
-
return
|
|
357
|
+
return s ? /* @__PURE__ */ a(Qe, { locale: s, children: ee }) : ee;
|
|
352
358
|
}
|
|
353
359
|
export {
|
|
354
|
-
|
|
360
|
+
It as DateRangePicker
|
|
355
361
|
};
|
|
356
362
|
//# sourceMappingURL=DateRangePicker.js.map
|