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