@stenajs-webui/calendar 23.21.9 → 23.21.11
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/calendar-types/travel-date-range-calendar/__tests__/TravelDateRangeCalendar.test.d.ts +1 -0
- package/dist/features/travel-calendar/components/TravelCalendar.d.ts +0 -1
- package/dist/features/travel-calendar/components/TravelDateCell.d.ts +2 -1
- package/dist/features/travel-calendar/util/CellBgColors.d.ts +6 -10
- package/dist/index.css +1 -1
- package/dist/index.es.js +1101 -1097
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as o, jsxs as _, Fragment as tt } from "react/jsx-runtime";
|
|
2
|
-
import { Box as
|
|
3
|
-
import { FlatButton as Z, stenaAngleDown as kt, PrimaryButton as _e, stenaAngleLeft as $n, stenaAngleRight as Un, SecondaryButton as fe, stenaAngleLeftDouble as Vn, stenaArrowLeft as nt, stenaArrowRight as Oe, stenaAngleRightDouble as jn, TextInputButton as zn, stenaCalendar as Pe, Icon as cn, stenaArrowWideRight as Kn, stenaClock as ln, Label as qn, FlatButtonLink as Gn, BaseButton as Jn, stenaBellFilled as Qn, MenuButton as Zn, stenaAngleUp as Xn, CardBody as
|
|
4
|
-
import { isAfter as Q, eachDayOfInterval as
|
|
5
|
-
import { enGB as Ze, pl as Pt, fr as Ft, es as Yt, cs as Ht, fi as Ot, et as Wt, it as $t, lt as Ut, lv as Vt, da as jt, sv as zt, nb as Kt, de as qt, nl as Gt, nlBE as
|
|
6
|
-
import { last as fr, chunk as wn, debounce as hr, padStart as gr, range as
|
|
7
|
-
import * as
|
|
8
|
-
import { useMemo as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
2
|
+
import { Box as B, Text as Ce, Clickable as an, Row as V, Spacing as On, useToday as xe, Column as J, Heading as He, exhaustSwitchCase as Ct, Space as Ie, Indent as Ae, SeparatorLine as Wn, parseIntElseUndefined as Lt, useBoolean as pt, useDelayedFalse as At, useOnClickOutside as on } from "@stenajs-webui/core";
|
|
3
|
+
import { FlatButton as Z, stenaAngleDown as kt, PrimaryButton as _e, stenaAngleLeft as $n, stenaAngleRight as Un, SecondaryButton as fe, stenaAngleLeftDouble as Vn, stenaArrowLeft as nt, stenaArrowRight as Oe, stenaAngleRightDouble as jn, TextInputButton as zn, stenaCalendar as Pe, Icon as cn, stenaArrowWideRight as Kn, stenaClock as ln, Label as qn, FlatButtonLink as Gn, BaseButton as Jn, stenaBellFilled as Qn, MenuButton as Zn, stenaAngleUp as Xn, CardBody as un } from "@stenajs-webui/elements";
|
|
4
|
+
import { isAfter as Q, eachDayOfInterval as dn, isSameDay as Y, endOfMonth as fn, startOfMonth as hn, min as gn, addDays as ne, max as mn, subDays as we, format as K, getISOWeek as St, getDate as rt, startOfWeek as Qe, addWeeks as er, getMonth as ye, getYear as Fe, getWeek as pn, getISODay as tr, addHours as Dn, isBefore as Ne, parse as ve, addMonths as We, isSameMonth as me, addYears as nr, subMonths as Mt, subYears as rr, setWeek as sr, isValid as ar, isSameYear as or, intlFormat as bn, isWithinInterval as cr } from "date-fns";
|
|
5
|
+
import { enGB as Ze, pl as Pt, fr as Ft, es as Yt, cs as Ht, fi as Ot, et as Wt, it as $t, lt as Ut, lv as Vt, da as jt, sv as zt, nb as Kt, de as qt, nl as Gt, nlBE as ir, deAT as lr, enIE as ur, enUS as dr } from "date-fns/locale";
|
|
6
|
+
import { last as fr, chunk as wn, debounce as hr, padStart as gr, range as It } from "lodash-es";
|
|
7
|
+
import * as Rt from "react";
|
|
8
|
+
import { useMemo as I, useRef as O, useEffect as re, useCallback as y, useId as Tt, useState as R, forwardRef as st, createContext as mr, useLayoutEffect as yn } from "react";
|
|
9
|
+
import se from "classnames";
|
|
10
|
+
import dt from "@emotion/styled";
|
|
11
11
|
import { TextInput as pe, TextInputBox as pr, LabelledTextInput as Dr } from "@stenajs-webui/forms";
|
|
12
12
|
import { ControlledPopover as $e } from "@stenajs-webui/tooltip";
|
|
13
13
|
import { cssColor as xt } from "@stenajs-webui/theme";
|
|
@@ -19,10 +19,10 @@ import './index.css';const le = {
|
|
|
19
19
|
fullMonthName: "LLLL"
|
|
20
20
|
}, Ye = (e = {}, t, n) => {
|
|
21
21
|
if (t && n && Q(n, t))
|
|
22
|
-
return
|
|
22
|
+
return dn({ start: t, end: n }).reduce(
|
|
23
23
|
(s, a) => {
|
|
24
|
-
const
|
|
25
|
-
return ge(s, a,
|
|
24
|
+
const c = Y(a, t), i = Y(a, n);
|
|
25
|
+
return ge(s, a, c ? ["selected", "selectedStart", "range"] : i ? ["selected", "selectedEnd", "range"] : ["range"]);
|
|
26
26
|
},
|
|
27
27
|
e
|
|
28
28
|
);
|
|
@@ -37,9 +37,9 @@ import './index.css';const le = {
|
|
|
37
37
|
), yr = (e = {}, t, n, r, s) => t && n ? Ye(
|
|
38
38
|
e,
|
|
39
39
|
mn([t, we(r, 1)]),
|
|
40
|
-
gn([n,
|
|
40
|
+
gn([n, ne(s, 1)])
|
|
41
41
|
) : Ye(e, t, n), Wa = (e, t, n) => {
|
|
42
|
-
const r =
|
|
42
|
+
const r = K(t, le.yearAndMonth), s = St(t), a = rt(t);
|
|
43
43
|
return {
|
|
44
44
|
...e,
|
|
45
45
|
[r]: {
|
|
@@ -54,7 +54,7 @@ import './index.css';const le = {
|
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
}, $a = (e, t, n) => {
|
|
57
|
-
const r =
|
|
57
|
+
const r = K(t, le.yearAndMonth), s = St(t), a = rt(t);
|
|
58
58
|
return {
|
|
59
59
|
...e,
|
|
60
60
|
[r]: {
|
|
@@ -71,14 +71,14 @@ import './index.css';const le = {
|
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
}, ge = (e, t, n) => {
|
|
74
|
-
const r = t.getMonth() + 1, s = `${t.getFullYear()}-${r < 10 ? "0" : ""}${r}`, a = St(t),
|
|
74
|
+
const r = t.getMonth() + 1, s = `${t.getFullYear()}-${r < 10 ? "0" : ""}${r}`, a = St(t), c = rt(t), i = e && e[s] && e[s][a] && e[s][a][c];
|
|
75
75
|
return {
|
|
76
76
|
...e,
|
|
77
77
|
[s]: {
|
|
78
78
|
...e && e[s],
|
|
79
79
|
[a]: {
|
|
80
80
|
...e && e[s] && e[s][a],
|
|
81
|
-
[
|
|
81
|
+
[c]: vn(i, n)
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
};
|
|
@@ -86,20 +86,20 @@ import './index.css';const le = {
|
|
|
86
86
|
...e,
|
|
87
87
|
highlights: [...e?.highlights ?? [], ...t]
|
|
88
88
|
}), Ua = (e, t, n) => {
|
|
89
|
-
const r = t.days[0].date, s = r.getMonth() + 1, a = `${r.getFullYear()}-${s < 10 ? "0" : ""}${s}`,
|
|
90
|
-
let
|
|
89
|
+
const r = t.days[0].date, s = r.getMonth() + 1, a = `${r.getFullYear()}-${s < 10 ? "0" : ""}${s}`, c = t.weekNumber;
|
|
90
|
+
let i = e;
|
|
91
91
|
t.days.forEach((h) => {
|
|
92
|
-
|
|
92
|
+
i = ge(i, h.date, n);
|
|
93
93
|
});
|
|
94
|
-
const l =
|
|
94
|
+
const l = i && i[a] ? i[a][c] : void 0, u = l && l.highlights ? [...l.highlights, ...n] : n, d = {
|
|
95
95
|
...l,
|
|
96
|
-
highlights:
|
|
96
|
+
highlights: u
|
|
97
97
|
};
|
|
98
98
|
return {
|
|
99
|
-
...
|
|
99
|
+
...i,
|
|
100
100
|
[a]: {
|
|
101
101
|
...e && e[a],
|
|
102
|
-
[
|
|
102
|
+
[c]: d
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
}, vr = (e, t) => {
|
|
@@ -109,7 +109,7 @@ import './index.css';const le = {
|
|
|
109
109
|
return {
|
|
110
110
|
...Ye(e, n, r)
|
|
111
111
|
};
|
|
112
|
-
}, Cr = (e, t) =>
|
|
112
|
+
}, Cr = (e, t) => I(() => e ? ge(t, /* @__PURE__ */ new Date(), ["today"]) : t, [e, t]), at = (e) => e.length === 0 ? e : e.length === 1 ? e.toUpperCase() : e.charAt(0).toUpperCase() + e.slice(1);
|
|
113
113
|
var kr = /* @__PURE__ */ ((e) => (e[e.JANUARY = 0] = "JANUARY", e[e.FEBRUARY = 1] = "FEBRUARY", e[e.MARCH = 2] = "MARCH", e[e.APRIL = 3] = "APRIL", e[e.MAY = 4] = "MAY", e[e.JUNE = 5] = "JUNE", e[e.JULY = 6] = "JULY", e[e.AUGUST = 7] = "AUGUST", e[e.SEPTEMBER = 8] = "SEPTEMBER", e[e.OCTOBER = 9] = "OCTOBER", e[e.NOVEMBER = 10] = "NOVEMBER", e[e.DECEMBER = 11] = "DECEMBER", e))(kr || {}), Sr = /* @__PURE__ */ ((e) => (e[e.SUNDAY = 0] = "SUNDAY", e[e.MONDAY = 1] = "MONDAY", e[e.TUESDAY = 2] = "TUESDAY", e[e.WEDNESDAY = 3] = "WEDNESDAY", e[e.THURSDAY = 4] = "THURSDAY", e[e.FRIDAY = 5] = "FRIDAY", e[e.SATURDAY = 6] = "SATURDAY", e))(Sr || {});
|
|
114
114
|
const Jt = (e, t, n, r) => {
|
|
115
115
|
const s = [];
|
|
@@ -121,41 +121,41 @@ const Jt = (e, t, n, r) => {
|
|
|
121
121
|
throw new Error("getMonthInYear() received NaN.");
|
|
122
122
|
const r = e + Math.floor(t / 12), s = t % 12, a = new Date(r, s, 1);
|
|
123
123
|
return {
|
|
124
|
-
monthString:
|
|
124
|
+
monthString: K(a, le.yearAndMonth),
|
|
125
125
|
name: at(
|
|
126
|
-
|
|
126
|
+
K(a, le.fullMonthName, { locale: n })
|
|
127
127
|
),
|
|
128
128
|
year: r,
|
|
129
129
|
monthInYear: s,
|
|
130
130
|
weeks: Mr(r, s, n)
|
|
131
131
|
};
|
|
132
132
|
}, Mr = (e, t, n, r = !0) => {
|
|
133
|
-
const s = new Date(e, t, 1), a = Qe(s, { locale: n }),
|
|
134
|
-
for (let
|
|
135
|
-
const l = _t(er(a,
|
|
136
|
-
if (
|
|
137
|
-
return
|
|
138
|
-
|
|
133
|
+
const s = new Date(e, t, 1), a = Qe(s, { locale: n }), c = [];
|
|
134
|
+
for (let i = 0; i < 6; i++) {
|
|
135
|
+
const l = _t(er(a, i), n);
|
|
136
|
+
if (i > 0 && l.startMonth !== t && !r)
|
|
137
|
+
return c;
|
|
138
|
+
c.push(l);
|
|
139
139
|
}
|
|
140
|
-
return
|
|
140
|
+
return c;
|
|
141
141
|
}, _t = (e, t) => {
|
|
142
|
-
const n = ye(
|
|
142
|
+
const n = ye(ne(e, 7)) !== ye(e);
|
|
143
143
|
return {
|
|
144
144
|
weekNumber: pn(e, { locale: t }),
|
|
145
145
|
startMonth: ye(e),
|
|
146
146
|
startYear: Fe(e),
|
|
147
|
-
endMonth: ye(
|
|
148
|
-
endYear: Fe(
|
|
149
|
-
days:
|
|
147
|
+
endMonth: ye(ne(e, 6)),
|
|
148
|
+
endYear: Fe(ne(e, 6)),
|
|
149
|
+
days: Rr(e, t),
|
|
150
150
|
isLastWeekOfMonth: n
|
|
151
151
|
};
|
|
152
|
-
},
|
|
152
|
+
}, Ir = (e, t) => {
|
|
153
153
|
const n = tr(e);
|
|
154
154
|
return {
|
|
155
155
|
date: e,
|
|
156
|
-
name:
|
|
157
|
-
fullName:
|
|
158
|
-
dateString:
|
|
156
|
+
name: K(e, "EEE", t ? { locale: t } : void 0),
|
|
157
|
+
fullName: K(e, "EEEE", t ? { locale: t } : void 0),
|
|
158
|
+
dateString: K(Dn(e, 12), le.fullDate),
|
|
159
159
|
weekNumber: pn(e, { locale: t }),
|
|
160
160
|
year: Fe(e),
|
|
161
161
|
month: ye(e),
|
|
@@ -166,13 +166,13 @@ const Jt = (e, t, n, r) => {
|
|
|
166
166
|
isFirstDayOfMonth: Y(hn(e), e),
|
|
167
167
|
isLastDayOfMonth: Y(fn(e), e)
|
|
168
168
|
};
|
|
169
|
-
},
|
|
169
|
+
}, Rr = (e, t) => dn({
|
|
170
170
|
start: e,
|
|
171
|
-
end:
|
|
172
|
-
}).map((n) =>
|
|
171
|
+
end: ne(e, 6)
|
|
172
|
+
}).map((n) => Ir(n, t)), Tr = (e, t) => t > 11 ? { year: e + Math.floor(t / 12), month: t % 12 } : t < 0 ? { year: e + Math.floor(t / 12), month: 12 + t % 12 } : { year: e, month: t }, xr = "_calendar_5yxz4_1", _r = "_weekNumberVisible_5yxz4_41", Qt = {
|
|
173
173
|
calendar: xr,
|
|
174
174
|
weekNumberVisible: _r
|
|
175
|
-
},
|
|
175
|
+
}, Nr = (e, t, n) => !!(t && t.indexOf(n) >= 0 || e && e.highlights && e.highlights.indexOf(n) >= 0), de = (e, t, n, r, s) => {
|
|
176
176
|
if (n.length !== r.length)
|
|
177
177
|
throw new Error(
|
|
178
178
|
"Select highlight failed, number of values do not equal number of highlights."
|
|
@@ -180,29 +180,29 @@ const Jt = (e, t, n, r) => {
|
|
|
180
180
|
if (n.length === 0)
|
|
181
181
|
return s;
|
|
182
182
|
for (let a = 0; a < n.length; a++)
|
|
183
|
-
if (typeof n[a] == "boolean" && n[a] || typeof n[a] == "string" &&
|
|
183
|
+
if (typeof n[a] == "boolean" && n[a] || typeof n[a] == "string" && Nr(
|
|
184
184
|
e,
|
|
185
185
|
t,
|
|
186
186
|
n[a]
|
|
187
187
|
))
|
|
188
188
|
return r[a];
|
|
189
189
|
return s;
|
|
190
|
-
},
|
|
190
|
+
}, Br = ({
|
|
191
191
|
selectedBackground: e,
|
|
192
192
|
todayBackground: t,
|
|
193
193
|
rangeBackground: n,
|
|
194
194
|
borderColor: r = "transparent"
|
|
195
|
-
}) => (s, a,
|
|
196
|
-
backgroundColor:
|
|
195
|
+
}) => (s, a, c, i, l) => ({
|
|
196
|
+
backgroundColor: de(
|
|
197
197
|
a,
|
|
198
198
|
s,
|
|
199
|
-
["selected", "range", "today",
|
|
199
|
+
["selected", "range", "today", c.month === l.monthInYear],
|
|
200
200
|
[e, n, t, "#fff"],
|
|
201
201
|
"transparent"
|
|
202
202
|
),
|
|
203
203
|
borderWidth: "1px",
|
|
204
204
|
borderStyle: "solid",
|
|
205
|
-
borderColor:
|
|
205
|
+
borderColor: de(
|
|
206
206
|
a,
|
|
207
207
|
s,
|
|
208
208
|
["selectedStart", "selectedEnd", "singleSelected", "range", "today"],
|
|
@@ -215,7 +215,7 @@ const Jt = (e, t, n, r) => {
|
|
|
215
215
|
],
|
|
216
216
|
r
|
|
217
217
|
),
|
|
218
|
-
borderTopLeftRadius:
|
|
218
|
+
borderTopLeftRadius: de(
|
|
219
219
|
a,
|
|
220
220
|
s,
|
|
221
221
|
["selectedStart", "singleSelected", "today"],
|
|
@@ -226,7 +226,7 @@ const Jt = (e, t, n, r) => {
|
|
|
226
226
|
],
|
|
227
227
|
"unset"
|
|
228
228
|
),
|
|
229
|
-
borderBottomLeftRadius:
|
|
229
|
+
borderBottomLeftRadius: de(
|
|
230
230
|
a,
|
|
231
231
|
s,
|
|
232
232
|
["selectedStart", "singleSelected", "today"],
|
|
@@ -237,7 +237,7 @@ const Jt = (e, t, n, r) => {
|
|
|
237
237
|
],
|
|
238
238
|
"unset"
|
|
239
239
|
),
|
|
240
|
-
borderTopRightRadius:
|
|
240
|
+
borderTopRightRadius: de(
|
|
241
241
|
a,
|
|
242
242
|
s,
|
|
243
243
|
["selectedEnd", "singleSelected", "today"],
|
|
@@ -248,7 +248,7 @@ const Jt = (e, t, n, r) => {
|
|
|
248
248
|
],
|
|
249
249
|
"unset"
|
|
250
250
|
),
|
|
251
|
-
borderBottomRightRadius:
|
|
251
|
+
borderBottomRightRadius: de(
|
|
252
252
|
a,
|
|
253
253
|
s,
|
|
254
254
|
["selectedEnd", "singleSelected", "today"],
|
|
@@ -265,13 +265,13 @@ const Jt = (e, t, n, r) => {
|
|
|
265
265
|
disabledColor: t,
|
|
266
266
|
inOtherMonthColor: n,
|
|
267
267
|
rangeTextColor: r
|
|
268
|
-
}) => (s, a,
|
|
269
|
-
const
|
|
268
|
+
}) => (s, a, c, i, l) => {
|
|
269
|
+
const u = c.month !== l.monthInYear;
|
|
270
270
|
return {
|
|
271
|
-
color:
|
|
271
|
+
color: de(
|
|
272
272
|
a,
|
|
273
273
|
s,
|
|
274
|
-
[
|
|
274
|
+
[u, "selected", "range", "enabled", "disabled"],
|
|
275
275
|
[
|
|
276
276
|
n,
|
|
277
277
|
e,
|
|
@@ -294,7 +294,7 @@ const Jt = (e, t, n, r) => {
|
|
|
294
294
|
clickableTextColor: "var(--swui-calendar-week-day-clickable-text-color)"
|
|
295
295
|
},
|
|
296
296
|
CalendarDay: {
|
|
297
|
-
tdStyle:
|
|
297
|
+
tdStyle: Br({
|
|
298
298
|
selectedBackground: "var(--swui-calendar-wrapper-selected-background)",
|
|
299
299
|
rangeBackground: "var(--swui-calendar-wrapper-range-background)",
|
|
300
300
|
todayBackground: "var(--swui-calendar-wrapper-today-background)"
|
|
@@ -318,7 +318,7 @@ const Jt = (e, t, n, r) => {
|
|
|
318
318
|
theme: n
|
|
319
319
|
}) => {
|
|
320
320
|
const r = /* @__PURE__ */ o(
|
|
321
|
-
|
|
321
|
+
B,
|
|
322
322
|
{
|
|
323
323
|
width: n.width,
|
|
324
324
|
height: n.height,
|
|
@@ -349,14 +349,14 @@ const Jt = (e, t, n, r) => {
|
|
|
349
349
|
month: r,
|
|
350
350
|
dayState: s,
|
|
351
351
|
userData: a,
|
|
352
|
-
onClickDay:
|
|
353
|
-
theme:
|
|
352
|
+
onClickDay: c,
|
|
353
|
+
theme: i,
|
|
354
354
|
extraDayContent: l,
|
|
355
|
-
defaultHighlights:
|
|
356
|
-
showDatesInOtherMonths:
|
|
355
|
+
defaultHighlights: u,
|
|
356
|
+
showDatesInOtherMonths: d
|
|
357
357
|
}) {
|
|
358
358
|
const h = /* @__PURE__ */ o(
|
|
359
|
-
|
|
359
|
+
B,
|
|
360
360
|
{
|
|
361
361
|
width: "100%",
|
|
362
362
|
height: "100%",
|
|
@@ -365,8 +365,8 @@ const Jt = (e, t, n, r) => {
|
|
|
365
365
|
children: /* @__PURE__ */ o(
|
|
366
366
|
Ce,
|
|
367
367
|
{
|
|
368
|
-
...
|
|
369
|
-
|
|
368
|
+
...i.CalendarDay.textProps && i.CalendarDay.textProps(
|
|
369
|
+
u,
|
|
370
370
|
s,
|
|
371
371
|
t,
|
|
372
372
|
n,
|
|
@@ -377,18 +377,18 @@ const Jt = (e, t, n, r) => {
|
|
|
377
377
|
}
|
|
378
378
|
)
|
|
379
379
|
}
|
|
380
|
-
), g =
|
|
381
|
-
...
|
|
382
|
-
|
|
380
|
+
), g = dt.td({
|
|
381
|
+
...i.CalendarDay.tdStyle && i.CalendarDay.tdStyle(
|
|
382
|
+
u,
|
|
383
383
|
s,
|
|
384
384
|
t,
|
|
385
385
|
n,
|
|
386
386
|
r,
|
|
387
387
|
a
|
|
388
388
|
)
|
|
389
|
-
}), f =
|
|
390
|
-
...
|
|
391
|
-
|
|
389
|
+
}), f = dt.div({
|
|
390
|
+
...i.CalendarDay.innerWrapperStyle && i.CalendarDay.innerWrapperStyle(
|
|
391
|
+
u,
|
|
392
392
|
s,
|
|
393
393
|
t,
|
|
394
394
|
n,
|
|
@@ -397,9 +397,9 @@ const Jt = (e, t, n, r) => {
|
|
|
397
397
|
),
|
|
398
398
|
width: "100%",
|
|
399
399
|
height: "100%"
|
|
400
|
-
}), p =
|
|
401
|
-
...
|
|
402
|
-
|
|
400
|
+
}), p = dt.div({
|
|
401
|
+
...i.CalendarDay.cellWrapperStyle && i.CalendarDay.cellWrapperStyle(
|
|
402
|
+
u,
|
|
403
403
|
s,
|
|
404
404
|
t,
|
|
405
405
|
n,
|
|
@@ -409,12 +409,12 @@ const Jt = (e, t, n, r) => {
|
|
|
409
409
|
width: "100%",
|
|
410
410
|
height: "100%",
|
|
411
411
|
position: "relative"
|
|
412
|
-
}), D = Ar(
|
|
412
|
+
}), D = Ar(u, s);
|
|
413
413
|
return /* @__PURE__ */ o(
|
|
414
414
|
g,
|
|
415
415
|
{
|
|
416
|
-
onClick: D ? void 0 : (C) =>
|
|
417
|
-
children: /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(p, { children: (t.month === r.monthInYear ||
|
|
416
|
+
onClick: D ? void 0 : (C) => c?.(t, a, C),
|
|
417
|
+
children: /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(p, { children: (t.month === r.monthInYear || d) && /* @__PURE__ */ _(tt, { children: [
|
|
418
418
|
l && /* @__PURE__ */ o(
|
|
419
419
|
l,
|
|
420
420
|
{
|
|
@@ -422,7 +422,7 @@ const Jt = (e, t, n, r) => {
|
|
|
422
422
|
month: r,
|
|
423
423
|
day: t,
|
|
424
424
|
dayState: s,
|
|
425
|
-
theme:
|
|
425
|
+
theme: i,
|
|
426
426
|
userData: a
|
|
427
427
|
}
|
|
428
428
|
),
|
|
@@ -430,7 +430,7 @@ const Jt = (e, t, n, r) => {
|
|
|
430
430
|
] }) }) })
|
|
431
431
|
}
|
|
432
432
|
);
|
|
433
|
-
}, Ar = (e, t) => !!
|
|
433
|
+
}, Ar = (e, t) => !!de(
|
|
434
434
|
t,
|
|
435
435
|
e,
|
|
436
436
|
["enabled", "disabled"],
|
|
@@ -444,16 +444,16 @@ const Jt = (e, t, n, r) => {
|
|
|
444
444
|
backgroundColor: s,
|
|
445
445
|
prefix: a
|
|
446
446
|
}) => {
|
|
447
|
-
const
|
|
448
|
-
|
|
447
|
+
const c = /* @__PURE__ */ _(
|
|
448
|
+
B,
|
|
449
449
|
{
|
|
450
450
|
width: t.width,
|
|
451
451
|
height: t.height,
|
|
452
452
|
justifyContent: "center",
|
|
453
453
|
alignItems: "center",
|
|
454
454
|
children: [
|
|
455
|
-
r && /* @__PURE__ */ o(
|
|
456
|
-
/* @__PURE__ */ o(
|
|
455
|
+
r && /* @__PURE__ */ o(B, { position: "absolute", children: r }),
|
|
456
|
+
/* @__PURE__ */ o(B, { position: "absolute", children: /* @__PURE__ */ _(
|
|
457
457
|
Ce,
|
|
458
458
|
{
|
|
459
459
|
color: e ? t.WeekNumber.clickableTextColor : t.WeekNumber.textColor,
|
|
@@ -467,7 +467,7 @@ const Jt = (e, t, n, r) => {
|
|
|
467
467
|
}
|
|
468
468
|
);
|
|
469
469
|
return /* @__PURE__ */ o(
|
|
470
|
-
|
|
470
|
+
B,
|
|
471
471
|
{
|
|
472
472
|
background: s || t.WeekNumber.backgroundColor,
|
|
473
473
|
position: "relative",
|
|
@@ -475,26 +475,26 @@ const Jt = (e, t, n, r) => {
|
|
|
475
475
|
an,
|
|
476
476
|
{
|
|
477
477
|
borderRadius: "var(--swui-calendar-day-border-radius)",
|
|
478
|
-
onClick: (
|
|
478
|
+
onClick: (i) => e(n, i),
|
|
479
479
|
disableFocusHighlight: !e,
|
|
480
|
-
children:
|
|
480
|
+
children: c
|
|
481
481
|
}
|
|
482
|
-
) :
|
|
482
|
+
) : c
|
|
483
483
|
}
|
|
484
484
|
);
|
|
485
|
-
}, Fr = (e, t, n) => t &&
|
|
485
|
+
}, Fr = (e, t, n) => t && Ne(e, t) ? Y(e, t) : n && Q(e, n) ? Y(e, n) : !0, Yr = function({
|
|
486
486
|
dayComponent: t,
|
|
487
487
|
minDate: n,
|
|
488
488
|
maxDate: r,
|
|
489
489
|
dayState: s,
|
|
490
490
|
day: a,
|
|
491
|
-
...
|
|
491
|
+
...c
|
|
492
492
|
}) {
|
|
493
|
-
const
|
|
493
|
+
const i = I(
|
|
494
494
|
() => Fr(a.date, n, r) ? s : vn(s, ["disabled"]),
|
|
495
495
|
[a.date, s, r, n]
|
|
496
496
|
);
|
|
497
|
-
return /* @__PURE__ */ o(t, { day: a, ...
|
|
497
|
+
return /* @__PURE__ */ o(t, { day: a, ...c, dayState: i });
|
|
498
498
|
};
|
|
499
499
|
function Hr({
|
|
500
500
|
month: e,
|
|
@@ -503,11 +503,11 @@ function Hr({
|
|
|
503
503
|
userDataPerWeek: r,
|
|
504
504
|
minDate: s,
|
|
505
505
|
maxDate: a,
|
|
506
|
-
onClickDay:
|
|
507
|
-
onClickWeek:
|
|
506
|
+
onClickDay: c,
|
|
507
|
+
onClickWeek: i,
|
|
508
508
|
onClickWeekDay: l,
|
|
509
|
-
onClickMonth:
|
|
510
|
-
renderWeekNumber:
|
|
509
|
+
onClickMonth: u,
|
|
510
|
+
renderWeekNumber: d,
|
|
511
511
|
renderWeekDay: h,
|
|
512
512
|
headerRightContent: g,
|
|
513
513
|
theme: f = ke,
|
|
@@ -515,17 +515,17 @@ function Hr({
|
|
|
515
515
|
defaultHighlights: D,
|
|
516
516
|
showWeekNumber: C
|
|
517
517
|
}) {
|
|
518
|
-
return /* @__PURE__ */ o(tt, { children: /* @__PURE__ */ _(
|
|
518
|
+
return /* @__PURE__ */ o(tt, { children: /* @__PURE__ */ _(B, { alignItems: "stretch", children: [
|
|
519
519
|
/* @__PURE__ */ _(
|
|
520
520
|
V,
|
|
521
521
|
{
|
|
522
522
|
justifyContent: g ? "space-between" : "center",
|
|
523
523
|
alignItems: "center",
|
|
524
524
|
children: [
|
|
525
|
-
/* @__PURE__ */ o(V, { justifyContent: "center", alignItems: "center", children:
|
|
525
|
+
/* @__PURE__ */ o(V, { justifyContent: "center", alignItems: "center", children: u ? /* @__PURE__ */ o(
|
|
526
526
|
Z,
|
|
527
527
|
{
|
|
528
|
-
onClick: () =>
|
|
528
|
+
onClick: () => u(e),
|
|
529
529
|
label: e.name + " " + String(e.year),
|
|
530
530
|
rightIcon: kt
|
|
531
531
|
}
|
|
@@ -534,13 +534,13 @@ function Hr({
|
|
|
534
534
|
" ",
|
|
535
535
|
e.year
|
|
536
536
|
] }) }),
|
|
537
|
-
g && /* @__PURE__ */ o(
|
|
537
|
+
g && /* @__PURE__ */ o(B, { alignItems: "center", children: g })
|
|
538
538
|
]
|
|
539
539
|
}
|
|
540
540
|
),
|
|
541
541
|
/* @__PURE__ */ o("table", { children: /* @__PURE__ */ _("tbody", { children: [
|
|
542
542
|
/* @__PURE__ */ _("tr", { children: [
|
|
543
|
-
C && /* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(
|
|
543
|
+
C && /* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(B, { width: f.width, height: f.height }) }),
|
|
544
544
|
e.weeks[0].days.map((v) => /* @__PURE__ */ o("td", { children: h ? h(v.name, f, l) : /* @__PURE__ */ o(
|
|
545
545
|
Lr,
|
|
546
546
|
{
|
|
@@ -551,11 +551,11 @@ function Hr({
|
|
|
551
551
|
) }, v.name))
|
|
552
552
|
] }),
|
|
553
553
|
e.weeks.map((v) => /* @__PURE__ */ _("tr", { children: [
|
|
554
|
-
C && /* @__PURE__ */ o("td", { children:
|
|
554
|
+
C && /* @__PURE__ */ o("td", { children: d ? d(v, f, i) : /* @__PURE__ */ o(
|
|
555
555
|
Pr,
|
|
556
556
|
{
|
|
557
557
|
week: v,
|
|
558
|
-
onClickWeek:
|
|
558
|
+
onClickWeek: i,
|
|
559
559
|
theme: f
|
|
560
560
|
}
|
|
561
561
|
) }),
|
|
@@ -568,7 +568,7 @@ function Hr({
|
|
|
568
568
|
month: e,
|
|
569
569
|
dayState: n && n[v.weekNumber] && n[v.weekNumber][b.dayOfMonth],
|
|
570
570
|
userData: r && r[v.weekNumber] && r[v.weekNumber][b.dayOfMonth],
|
|
571
|
-
onClickDay:
|
|
571
|
+
onClickDay: c,
|
|
572
572
|
theme: f,
|
|
573
573
|
extraDayContent: p,
|
|
574
574
|
defaultHighlights: D,
|
|
@@ -588,11 +588,11 @@ function Or({
|
|
|
588
588
|
statePerMonth: r,
|
|
589
589
|
minDate: s,
|
|
590
590
|
maxDate: a,
|
|
591
|
-
onClickDay:
|
|
592
|
-
onClickWeekDay:
|
|
591
|
+
onClickDay: c,
|
|
592
|
+
onClickWeekDay: i,
|
|
593
593
|
onClickWeek: l,
|
|
594
|
-
onClickMonth:
|
|
595
|
-
renderWeekDay:
|
|
594
|
+
onClickMonth: u,
|
|
595
|
+
renderWeekDay: d,
|
|
596
596
|
renderWeekNumber: h,
|
|
597
597
|
headerRightContent: g,
|
|
598
598
|
extraDayContent: f,
|
|
@@ -600,34 +600,34 @@ function Or({
|
|
|
600
600
|
showWeekNumber: D,
|
|
601
601
|
theme: C = ke
|
|
602
602
|
}) {
|
|
603
|
-
const v =
|
|
603
|
+
const v = I(
|
|
604
604
|
() => s ? ve(s, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
|
|
605
605
|
[s]
|
|
606
|
-
), b =
|
|
606
|
+
), b = I(
|
|
607
607
|
() => a ? ve(a, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
|
|
608
608
|
[a]
|
|
609
609
|
);
|
|
610
610
|
return /* @__PURE__ */ o(
|
|
611
611
|
"div",
|
|
612
612
|
{
|
|
613
|
-
className:
|
|
613
|
+
className: se(
|
|
614
614
|
Qt.calendar,
|
|
615
615
|
D && Qt.weekNumberVisible
|
|
616
616
|
),
|
|
617
|
-
children: e.map((m, w) => /* @__PURE__ */ o(On, { children: /* @__PURE__ */ o(V, { gap: 2, children: m.map((
|
|
617
|
+
children: e.map((m, w) => /* @__PURE__ */ o(On, { children: /* @__PURE__ */ o(V, { gap: 2, children: m.map((k) => /* @__PURE__ */ o(
|
|
618
618
|
Hr,
|
|
619
619
|
{
|
|
620
|
-
month:
|
|
620
|
+
month: k,
|
|
621
621
|
dayComponent: t,
|
|
622
|
-
userDataPerWeek: n && n[
|
|
623
|
-
statePerWeek: r && r[
|
|
624
|
-
onClickDay:
|
|
625
|
-
onClickWeekDay:
|
|
622
|
+
userDataPerWeek: n && n[k.monthString],
|
|
623
|
+
statePerWeek: r && r[k.monthString],
|
|
624
|
+
onClickDay: c,
|
|
625
|
+
onClickWeekDay: i,
|
|
626
626
|
onClickWeek: l,
|
|
627
|
-
onClickMonth:
|
|
627
|
+
onClickMonth: u,
|
|
628
628
|
theme: C,
|
|
629
629
|
renderWeekNumber: h,
|
|
630
|
-
renderWeekDay:
|
|
630
|
+
renderWeekDay: d,
|
|
631
631
|
headerRightContent: g,
|
|
632
632
|
extraDayContent: f,
|
|
633
633
|
defaultHighlights: p,
|
|
@@ -635,13 +635,13 @@ function Or({
|
|
|
635
635
|
maxDate: b,
|
|
636
636
|
showWeekNumber: D ?? !1
|
|
637
637
|
},
|
|
638
|
-
|
|
638
|
+
k.name
|
|
639
639
|
)) }) }, w))
|
|
640
640
|
}
|
|
641
641
|
);
|
|
642
642
|
}
|
|
643
643
|
function Dt(e) {
|
|
644
|
-
const t = Wr(e.year, e.month, e.date), { year: n, month: r } =
|
|
644
|
+
const t = Wr(e.year, e.month, e.date), { year: n, month: r } = Tr(
|
|
645
645
|
t.year,
|
|
646
646
|
t.month
|
|
647
647
|
), s = $r(
|
|
@@ -685,9 +685,9 @@ const Wr = (e, t, n) => {
|
|
|
685
685
|
let s = t;
|
|
686
686
|
for (let a = 0; a < r; a++) {
|
|
687
687
|
s = Vr(s, e, r);
|
|
688
|
-
const
|
|
689
|
-
if (document.getElementById(
|
|
690
|
-
return
|
|
688
|
+
const c = kn(s, n);
|
|
689
|
+
if (document.getElementById(c))
|
|
690
|
+
return c;
|
|
691
691
|
}
|
|
692
692
|
}, Vr = (e, t, n) => {
|
|
693
693
|
let r = e.row, s = e.column;
|
|
@@ -695,13 +695,13 @@ const Wr = (e, t, n) => {
|
|
|
695
695
|
column: s,
|
|
696
696
|
row: r
|
|
697
697
|
};
|
|
698
|
-
},
|
|
698
|
+
}, Re = {
|
|
699
699
|
en: Ze,
|
|
700
|
-
"en-US":
|
|
700
|
+
"en-US": dr,
|
|
701
701
|
"en-GB": Ze,
|
|
702
|
-
"en-IE":
|
|
702
|
+
"en-IE": ur,
|
|
703
703
|
"de-AT": lr,
|
|
704
|
-
"nl-BE":
|
|
704
|
+
"nl-BE": ir,
|
|
705
705
|
"nl-NL": Gt,
|
|
706
706
|
"de-DE": qt,
|
|
707
707
|
"nb-NO": Kt,
|
|
@@ -731,7 +731,7 @@ const Wr = (e, t, n) => {
|
|
|
731
731
|
fr: Ft,
|
|
732
732
|
pl: Pt
|
|
733
733
|
}, Sn = "en-GB", ja = "sv", Mn = (e, t, n) => {
|
|
734
|
-
if (
|
|
734
|
+
if (Re[e])
|
|
735
735
|
return e;
|
|
736
736
|
if (t) {
|
|
737
737
|
const r = jr(e);
|
|
@@ -739,15 +739,15 @@ const Wr = (e, t, n) => {
|
|
|
739
739
|
return r;
|
|
740
740
|
}
|
|
741
741
|
return n;
|
|
742
|
-
},
|
|
743
|
-
const [t] = e.split("-"), n = Object.keys(
|
|
742
|
+
}, Te = (e) => Re[e], jr = (e) => {
|
|
743
|
+
const [t] = e.split("-"), n = Object.keys(Re);
|
|
744
744
|
for (const r of n)
|
|
745
745
|
if (r.startsWith(t))
|
|
746
746
|
return r;
|
|
747
|
-
}, za = () =>
|
|
748
|
-
const t = Object.keys(
|
|
747
|
+
}, za = () => Re.sv, zr = (e) => {
|
|
748
|
+
const t = Object.keys(Re);
|
|
749
749
|
for (const n of t)
|
|
750
|
-
if (
|
|
750
|
+
if (Re[n].code === e.code)
|
|
751
751
|
return n;
|
|
752
752
|
}, Kr = ({
|
|
753
753
|
month: e,
|
|
@@ -756,61 +756,61 @@ const Wr = (e, t, n) => {
|
|
|
756
756
|
localeCode: r,
|
|
757
757
|
autoFocus: s,
|
|
758
758
|
monthPickerId: a,
|
|
759
|
-
position:
|
|
760
|
-
size:
|
|
759
|
+
position: c,
|
|
760
|
+
size: i
|
|
761
761
|
}) => {
|
|
762
|
-
const l =
|
|
763
|
-
() =>
|
|
762
|
+
const l = I(
|
|
763
|
+
() => Te(r) ?? Te("en-GB"),
|
|
764
764
|
[r]
|
|
765
|
-
),
|
|
766
|
-
() => at(
|
|
765
|
+
), u = I(
|
|
766
|
+
() => at(K(e, "LLL", { locale: l })),
|
|
767
767
|
[l, e]
|
|
768
|
-
),
|
|
769
|
-
() =>
|
|
768
|
+
), d = I(
|
|
769
|
+
() => K(e, "LLLL", { locale: l }),
|
|
770
770
|
[l, e]
|
|
771
|
-
), h =
|
|
772
|
-
|
|
771
|
+
), h = O(null), g = kn(c, a), f = n ? 0 : -1;
|
|
772
|
+
re(() => {
|
|
773
773
|
h.current?.focus();
|
|
774
774
|
}, []);
|
|
775
775
|
const p = y(
|
|
776
776
|
(D) => {
|
|
777
777
|
const C = Ur(
|
|
778
778
|
D.key,
|
|
779
|
-
|
|
779
|
+
c,
|
|
780
780
|
a,
|
|
781
781
|
4
|
|
782
782
|
);
|
|
783
783
|
C && document.getElementById(C)?.focus();
|
|
784
784
|
},
|
|
785
|
-
[a,
|
|
785
|
+
[a, c]
|
|
786
786
|
);
|
|
787
787
|
return /* @__PURE__ */ o(V, { justifyContent: "center", onKeyDown: p, children: n ? /* @__PURE__ */ o(
|
|
788
788
|
_e,
|
|
789
789
|
{
|
|
790
790
|
id: g,
|
|
791
|
-
"aria-label":
|
|
792
|
-
label:
|
|
791
|
+
"aria-label": d,
|
|
792
|
+
label: u,
|
|
793
793
|
onClick: t,
|
|
794
794
|
"aria-selected": !0,
|
|
795
795
|
autoFocus: s,
|
|
796
796
|
ref: h,
|
|
797
|
-
size:
|
|
797
|
+
size: i === "large" ? "large" : "medium",
|
|
798
798
|
tabIndex: f
|
|
799
799
|
}
|
|
800
800
|
) : /* @__PURE__ */ o(
|
|
801
801
|
Z,
|
|
802
802
|
{
|
|
803
803
|
id: g,
|
|
804
|
-
label:
|
|
805
|
-
"aria-label":
|
|
804
|
+
label: u,
|
|
805
|
+
"aria-label": d,
|
|
806
806
|
onClick: t,
|
|
807
|
-
size:
|
|
807
|
+
size: i === "large" ? "large" : "medium",
|
|
808
808
|
tabIndex: f
|
|
809
809
|
}
|
|
810
810
|
) });
|
|
811
811
|
}, qr = (e, t, n) => {
|
|
812
|
-
let r = e.getFullYear(), s = 0, a = 0,
|
|
813
|
-
const
|
|
812
|
+
let r = e.getFullYear(), s = 0, a = 0, c = e;
|
|
813
|
+
const i = {
|
|
814
814
|
yearOrder: [],
|
|
815
815
|
rows: [],
|
|
816
816
|
years: {},
|
|
@@ -818,22 +818,22 @@ const Wr = (e, t, n) => {
|
|
|
818
818
|
lastMonthRow: -1
|
|
819
819
|
};
|
|
820
820
|
for (let l = 0; l < t; l++) {
|
|
821
|
-
if (
|
|
821
|
+
if (i.years[r] == null && (i.yearOrder.push(r), i.years[r] = { year: r, rows: [] }), i.rows[s] = i.rows[s] ?? {
|
|
822
822
|
columns: [],
|
|
823
823
|
rowIndex: s
|
|
824
|
-
},
|
|
824
|
+
}, i.rows[s].columns[a] = {
|
|
825
825
|
position: {
|
|
826
826
|
column: a,
|
|
827
827
|
row: s
|
|
828
828
|
},
|
|
829
|
-
month:
|
|
829
|
+
month: c
|
|
830
830
|
}, l === t - 1) {
|
|
831
|
-
|
|
831
|
+
i.years[r].rows.push(s);
|
|
832
832
|
break;
|
|
833
833
|
}
|
|
834
|
-
|
|
834
|
+
c = We(c, 1), c.getFullYear() !== r ? (i.years[r].rows.push(s), r++, a = 0, s++) : (a++, a > n - 1 && (i.years[r].rows.push(s), a = 0, s++));
|
|
835
835
|
}
|
|
836
|
-
return
|
|
836
|
+
return i.lastMonthColumn = a, i.lastMonthRow = s, i;
|
|
837
837
|
}, Ue = ({
|
|
838
838
|
value: e,
|
|
839
839
|
onValueChange: t,
|
|
@@ -841,10 +841,10 @@ const Wr = (e, t, n) => {
|
|
|
841
841
|
localeCode: r,
|
|
842
842
|
numMonths: s,
|
|
843
843
|
onCancel: a,
|
|
844
|
-
size:
|
|
844
|
+
size: c = "medium"
|
|
845
845
|
}) => {
|
|
846
|
-
const
|
|
847
|
-
|
|
846
|
+
const i = Tt(), l = xe(), u = s > 0 ? s : 12, [d, h] = R(!1), g = qr(n, u, Jr(c)), f = I(() => We(n, u), [u, n]);
|
|
847
|
+
re(() => {
|
|
848
848
|
h(!0);
|
|
849
849
|
}, []);
|
|
850
850
|
const p = y(
|
|
@@ -853,13 +853,13 @@ const Wr = (e, t, n) => {
|
|
|
853
853
|
},
|
|
854
854
|
[a]
|
|
855
855
|
);
|
|
856
|
-
return /* @__PURE__ */ o(J, { gap: 1, maxWidth: Gr(
|
|
856
|
+
return /* @__PURE__ */ o(J, { gap: 1, maxWidth: Gr(c), onKeyDown: p, children: g.yearOrder.map((D, C) => {
|
|
857
857
|
const { rows: v } = g.years[D];
|
|
858
|
-
return /* @__PURE__ */ _(
|
|
858
|
+
return /* @__PURE__ */ _(Rt.Fragment, { children: [
|
|
859
859
|
(C !== 0 || D !== l.getFullYear()) && /* @__PURE__ */ o(He, { variant: "h4", children: D }),
|
|
860
860
|
/* @__PURE__ */ o("table", { style: { borderSpacing: "0 8px" }, children: /* @__PURE__ */ o("tbody", { children: v.map((b) => {
|
|
861
861
|
const { columns: m } = g.rows[b];
|
|
862
|
-
return /* @__PURE__ */ o("tr", { children: m.map(({ month: w, position:
|
|
862
|
+
return /* @__PURE__ */ o("tr", { children: m.map(({ month: w, position: k }) => /* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(
|
|
863
863
|
Kr,
|
|
864
864
|
{
|
|
865
865
|
month: w,
|
|
@@ -867,11 +867,11 @@ const Wr = (e, t, n) => {
|
|
|
867
867
|
lastAvailableMonth: f,
|
|
868
868
|
localeCode: r,
|
|
869
869
|
selected: e ? me(e, w) : !1,
|
|
870
|
-
autoFocus:
|
|
870
|
+
autoFocus: d,
|
|
871
871
|
onClick: () => t?.(w),
|
|
872
|
-
monthPickerId:
|
|
873
|
-
position:
|
|
874
|
-
size:
|
|
872
|
+
monthPickerId: i,
|
|
873
|
+
position: k,
|
|
874
|
+
size: c
|
|
875
875
|
}
|
|
876
876
|
) }, w.getMonth())) }, b);
|
|
877
877
|
}) }) })
|
|
@@ -914,16 +914,16 @@ const Wr = (e, t, n) => {
|
|
|
914
914
|
{
|
|
915
915
|
label: "Future",
|
|
916
916
|
presets: [
|
|
917
|
-
{ label: "Next 3 days", startDate: e, endDate:
|
|
918
|
-
{ label: "Next 7 days", startDate: e, endDate:
|
|
919
|
-
{ label: "Next 30 days", startDate: e, endDate:
|
|
920
|
-
{ label: "Next 45 days", startDate: e, endDate:
|
|
917
|
+
{ label: "Next 3 days", startDate: e, endDate: ne(e, 2) },
|
|
918
|
+
{ label: "Next 7 days", startDate: e, endDate: ne(e, 6) },
|
|
919
|
+
{ label: "Next 30 days", startDate: e, endDate: ne(e, 29) },
|
|
920
|
+
{ label: "Next 45 days", startDate: e, endDate: ne(e, 44) }
|
|
921
921
|
]
|
|
922
922
|
}
|
|
923
923
|
], Zr = ({
|
|
924
924
|
onClickPreset: e
|
|
925
925
|
}) => {
|
|
926
|
-
const [t, n] =
|
|
926
|
+
const [t, n] = R(0), r = I(() => Qr(/* @__PURE__ */ new Date()), []), s = r[t] ?? r[0];
|
|
927
927
|
return /* @__PURE__ */ _(J, { children: [
|
|
928
928
|
/* @__PURE__ */ _(
|
|
929
929
|
V,
|
|
@@ -954,8 +954,8 @@ const Wr = (e, t, n) => {
|
|
|
954
954
|
]
|
|
955
955
|
}
|
|
956
956
|
),
|
|
957
|
-
/* @__PURE__ */ o(
|
|
958
|
-
/* @__PURE__ */ o(J, { alignItems: "center", children: s.presets.map((a) => /* @__PURE__ */ _(
|
|
957
|
+
/* @__PURE__ */ o(Ie, {}),
|
|
958
|
+
/* @__PURE__ */ o(J, { alignItems: "center", children: s.presets.map((a) => /* @__PURE__ */ _(Rt.Fragment, { children: [
|
|
959
959
|
/* @__PURE__ */ o(
|
|
960
960
|
_e,
|
|
961
961
|
{
|
|
@@ -963,7 +963,7 @@ const Wr = (e, t, n) => {
|
|
|
963
963
|
onClick: () => e(a)
|
|
964
964
|
}
|
|
965
965
|
),
|
|
966
|
-
/* @__PURE__ */ o(
|
|
966
|
+
/* @__PURE__ */ o(Ie, {})
|
|
967
967
|
] }, a.label)) })
|
|
968
968
|
] });
|
|
969
969
|
}, Xr = function({
|
|
@@ -972,12 +972,12 @@ const Wr = (e, t, n) => {
|
|
|
972
972
|
setDateInFocus: r,
|
|
973
973
|
currentPanel: s,
|
|
974
974
|
setCurrentPanel: a,
|
|
975
|
-
renderMonthPicker:
|
|
976
|
-
firstMonthInMonthPicker:
|
|
975
|
+
renderMonthPicker: c,
|
|
976
|
+
firstMonthInMonthPicker: i,
|
|
977
977
|
numMonthsInMonthPicker: l,
|
|
978
|
-
...
|
|
978
|
+
...u
|
|
979
979
|
}) {
|
|
980
|
-
const
|
|
980
|
+
const d = I(
|
|
981
981
|
() => t == null ? "en-GB" : zr(t) ?? "en-GB",
|
|
982
982
|
[t]
|
|
983
983
|
), h = xe(), g = y(
|
|
@@ -993,18 +993,18 @@ const Wr = (e, t, n) => {
|
|
|
993
993
|
return /* @__PURE__ */ o(
|
|
994
994
|
Dt,
|
|
995
995
|
{
|
|
996
|
-
...
|
|
996
|
+
...u,
|
|
997
997
|
date: n,
|
|
998
998
|
onClickMonth: f,
|
|
999
999
|
locale: t
|
|
1000
1000
|
}
|
|
1001
1001
|
);
|
|
1002
1002
|
case "month":
|
|
1003
|
-
return
|
|
1003
|
+
return c ? c({
|
|
1004
1004
|
value: n,
|
|
1005
1005
|
onValueChange: g,
|
|
1006
1006
|
locale: t,
|
|
1007
|
-
firstMonth:
|
|
1007
|
+
firstMonth: i ?? h,
|
|
1008
1008
|
numMonths: l ?? 24,
|
|
1009
1009
|
dateInFocus: n
|
|
1010
1010
|
}) : /* @__PURE__ */ o(
|
|
@@ -1012,8 +1012,8 @@ const Wr = (e, t, n) => {
|
|
|
1012
1012
|
{
|
|
1013
1013
|
value: n,
|
|
1014
1014
|
onValueChange: g,
|
|
1015
|
-
localeCode:
|
|
1016
|
-
firstMonth:
|
|
1015
|
+
localeCode: d,
|
|
1016
|
+
firstMonth: i ?? h,
|
|
1017
1017
|
numMonths: l ?? 24
|
|
1018
1018
|
}
|
|
1019
1019
|
);
|
|
@@ -1021,7 +1021,7 @@ const Wr = (e, t, n) => {
|
|
|
1021
1021
|
return /* @__PURE__ */ o(Zr, { onClickPreset: () => {
|
|
1022
1022
|
} });
|
|
1023
1023
|
default:
|
|
1024
|
-
return /* @__PURE__ */ o(
|
|
1024
|
+
return /* @__PURE__ */ o(B, { children: /* @__PURE__ */ o(
|
|
1025
1025
|
_e,
|
|
1026
1026
|
{
|
|
1027
1027
|
label: "Show calendar",
|
|
@@ -1036,18 +1036,18 @@ const Wr = (e, t, n) => {
|
|
|
1036
1036
|
}, [t, e, n, r]), a = y(() => {
|
|
1037
1037
|
const l = nr(e, 1);
|
|
1038
1038
|
t?.(l);
|
|
1039
|
-
}, [t, e]),
|
|
1039
|
+
}, [t, e]), c = y(() => {
|
|
1040
1040
|
const l = Mt(e, n ?? r ?? 1);
|
|
1041
1041
|
t?.(l);
|
|
1042
|
-
}, [t, e, n, r]),
|
|
1042
|
+
}, [t, e, n, r]), i = y(() => {
|
|
1043
1043
|
const l = rr(e, 1);
|
|
1044
1044
|
t?.(l);
|
|
1045
1045
|
}, [t, e]);
|
|
1046
1046
|
return {
|
|
1047
1047
|
nextMonth: s,
|
|
1048
|
-
prevMonth:
|
|
1048
|
+
prevMonth: c,
|
|
1049
1049
|
nextYear: a,
|
|
1050
|
-
prevYear:
|
|
1050
|
+
prevYear: i
|
|
1051
1051
|
};
|
|
1052
1052
|
}, ts = ({
|
|
1053
1053
|
children: e,
|
|
@@ -1064,7 +1064,7 @@ const Wr = (e, t, n) => {
|
|
|
1064
1064
|
/* @__PURE__ */ o(fe, { onClick: n, leftIcon: Oe }),
|
|
1065
1065
|
/* @__PURE__ */ o(fe, { onClick: s, leftIcon: jn })
|
|
1066
1066
|
] }) }),
|
|
1067
|
-
/* @__PURE__ */ o(
|
|
1067
|
+
/* @__PURE__ */ o(Ie, {})
|
|
1068
1068
|
] }), ns = () => {
|
|
1069
1069
|
};
|
|
1070
1070
|
function Se({
|
|
@@ -1074,21 +1074,21 @@ function Se({
|
|
|
1074
1074
|
setDateInFocus: r,
|
|
1075
1075
|
currentPanel: s,
|
|
1076
1076
|
setCurrentPanel: a,
|
|
1077
|
-
onSelectPreset:
|
|
1078
|
-
renderMonthPicker:
|
|
1077
|
+
onSelectPreset: c = ns,
|
|
1078
|
+
renderMonthPicker: i,
|
|
1079
1079
|
firstMonthInMonthPicker: l,
|
|
1080
|
-
numMonthsInMonthPicker:
|
|
1081
|
-
...
|
|
1080
|
+
numMonthsInMonthPicker: u,
|
|
1081
|
+
...d
|
|
1082
1082
|
}) {
|
|
1083
1083
|
const { nextMonth: h, prevMonth: g, nextYear: f, prevYear: p } = es(
|
|
1084
1084
|
n,
|
|
1085
1085
|
r,
|
|
1086
|
-
|
|
1087
|
-
|
|
1086
|
+
d.monthsPerRow,
|
|
1087
|
+
d.numMonths
|
|
1088
1088
|
);
|
|
1089
1089
|
switch (rs(
|
|
1090
1090
|
e,
|
|
1091
|
-
|
|
1091
|
+
d.numMonths
|
|
1092
1092
|
)) {
|
|
1093
1093
|
case "below":
|
|
1094
1094
|
return /* @__PURE__ */ o(
|
|
@@ -1099,23 +1099,23 @@ function Se({
|
|
|
1099
1099
|
prevMonth: g,
|
|
1100
1100
|
nextYear: f,
|
|
1101
1101
|
prevYear: p,
|
|
1102
|
-
children: /* @__PURE__ */ o(Dt, { ...
|
|
1102
|
+
children: /* @__PURE__ */ o(Dt, { ...d, theme: t, date: n })
|
|
1103
1103
|
}
|
|
1104
1104
|
);
|
|
1105
1105
|
case "header":
|
|
1106
1106
|
return /* @__PURE__ */ o(J, { children: /* @__PURE__ */ o(
|
|
1107
1107
|
Xr,
|
|
1108
1108
|
{
|
|
1109
|
-
...
|
|
1109
|
+
...d,
|
|
1110
1110
|
theme: t,
|
|
1111
|
-
renderMonthPicker:
|
|
1111
|
+
renderMonthPicker: i,
|
|
1112
1112
|
dateInFocus: n,
|
|
1113
1113
|
setDateInFocus: r,
|
|
1114
1114
|
currentPanel: s,
|
|
1115
1115
|
setCurrentPanel: a,
|
|
1116
|
-
onSelectPreset:
|
|
1116
|
+
onSelectPreset: c,
|
|
1117
1117
|
firstMonthInMonthPicker: l,
|
|
1118
|
-
numMonthsInMonthPicker:
|
|
1118
|
+
numMonthsInMonthPicker: u,
|
|
1119
1119
|
headerRightContent: /* @__PURE__ */ _(V, { alignItems: "center", gap: 1, children: [
|
|
1120
1120
|
/* @__PURE__ */ o(
|
|
1121
1121
|
fe,
|
|
@@ -1135,12 +1135,12 @@ function Se({
|
|
|
1135
1135
|
}
|
|
1136
1136
|
) });
|
|
1137
1137
|
default:
|
|
1138
|
-
return /* @__PURE__ */ o(Dt, { ...
|
|
1138
|
+
return /* @__PURE__ */ o(Dt, { ...d, theme: t, date: n });
|
|
1139
1139
|
}
|
|
1140
1140
|
}
|
|
1141
1141
|
const rs = (e, t) => e || (t || 1) > 1 ? "below" : "header", ss = (e) => ({
|
|
1142
|
-
startDate: e.startDate ?
|
|
1143
|
-
endDate: e.endDate ?
|
|
1142
|
+
startDate: e.startDate ? K(e.startDate, "yyyy-MM-dd") : void 0,
|
|
1143
|
+
endDate: e.endDate ? K(e.endDate, "yyyy-MM-dd") : void 0
|
|
1144
1144
|
}), as = ({
|
|
1145
1145
|
startDate: e,
|
|
1146
1146
|
endDate: t
|
|
@@ -1150,21 +1150,21 @@ const rs = (e, t) => e || (t || 1) > 1 ? "below" : "header", ss = (e) => ({
|
|
|
1150
1150
|
startDate: e ? ve(e, "yyyy-MM-dd", n) : void 0,
|
|
1151
1151
|
endDate: t ? ve(t, "yyyy-MM-dd", n) : void 0
|
|
1152
1152
|
};
|
|
1153
|
-
},
|
|
1153
|
+
}, In = ({
|
|
1154
1154
|
startDate: e,
|
|
1155
1155
|
endDate: t
|
|
1156
|
-
}) => !!(e && t && !Y(e, t) && Q(e, t)),
|
|
1156
|
+
}) => !!(e && t && !Y(e, t) && Q(e, t)), Rn = (e) => In(e) ? {
|
|
1157
1157
|
startDate: e.endDate,
|
|
1158
1158
|
endDate: e.startDate
|
|
1159
1159
|
} : e, Ka = (e) => e.startDate && e.endDate ? ss(
|
|
1160
|
-
|
|
1160
|
+
Rn(as(e))
|
|
1161
1161
|
) : e, os = (e, t, n, r) => y(
|
|
1162
1162
|
(s) => {
|
|
1163
1163
|
const a = {
|
|
1164
1164
|
startDate: n === "startDate" ? s.date : e?.startDate,
|
|
1165
1165
|
endDate: n === "endDate" ? s.date : e?.endDate
|
|
1166
1166
|
};
|
|
1167
|
-
|
|
1167
|
+
In(a) || r(n === "startDate" ? "endDate" : "startDate"), t?.(Rn(a));
|
|
1168
1168
|
},
|
|
1169
1169
|
[
|
|
1170
1170
|
n,
|
|
@@ -1173,8 +1173,8 @@ const rs = (e, t) => e || (t || 1) > 1 ? "below" : "header", ss = (e) => ({
|
|
|
1173
1173
|
e?.endDate,
|
|
1174
1174
|
e?.startDate
|
|
1175
1175
|
]
|
|
1176
|
-
),
|
|
1177
|
-
const [t, n] =
|
|
1176
|
+
), ct = (e) => {
|
|
1177
|
+
const [t, n] = R("calendar"), r = y(
|
|
1178
1178
|
(s) => {
|
|
1179
1179
|
n(s), e?.(s);
|
|
1180
1180
|
},
|
|
@@ -1184,23 +1184,23 @@ const rs = (e, t) => e || (t || 1) > 1 ? "below" : "header", ss = (e) => ({
|
|
|
1184
1184
|
currentPanel: t,
|
|
1185
1185
|
setCurrentPanel: r
|
|
1186
1186
|
};
|
|
1187
|
-
},
|
|
1187
|
+
}, cs = ({
|
|
1188
1188
|
focusedInput: e,
|
|
1189
1189
|
value: t,
|
|
1190
1190
|
onValueChange: n,
|
|
1191
1191
|
setFocusedInput: r,
|
|
1192
1192
|
statePerMonth: s,
|
|
1193
1193
|
onChangePanel: a,
|
|
1194
|
-
initialDateInFocus:
|
|
1194
|
+
initialDateInFocus: c
|
|
1195
1195
|
}) => {
|
|
1196
|
-
const { currentPanel:
|
|
1197
|
-
() =>
|
|
1196
|
+
const { currentPanel: i, setCurrentPanel: l } = ct(a), [u, d] = R(
|
|
1197
|
+
() => c ?? /* @__PURE__ */ new Date()
|
|
1198
1198
|
), h = os(
|
|
1199
1199
|
t,
|
|
1200
1200
|
n,
|
|
1201
1201
|
e,
|
|
1202
1202
|
r
|
|
1203
|
-
), g =
|
|
1203
|
+
), g = I(
|
|
1204
1204
|
() => Ye(
|
|
1205
1205
|
s,
|
|
1206
1206
|
t?.startDate,
|
|
@@ -1211,18 +1211,18 @@ const rs = (e, t) => e || (t || 1) > 1 ? "below" : "header", ss = (e) => ({
|
|
|
1211
1211
|
return {
|
|
1212
1212
|
onClickDay: h,
|
|
1213
1213
|
statePerMonth: g,
|
|
1214
|
-
currentPanel:
|
|
1214
|
+
currentPanel: i,
|
|
1215
1215
|
setCurrentPanel: l,
|
|
1216
|
-
setDateInFocus:
|
|
1217
|
-
dateInFocus:
|
|
1216
|
+
setDateInFocus: d,
|
|
1217
|
+
dateInFocus: u
|
|
1218
1218
|
};
|
|
1219
1219
|
};
|
|
1220
1220
|
function qa(e) {
|
|
1221
|
-
const t =
|
|
1221
|
+
const t = cs(e);
|
|
1222
1222
|
return /* @__PURE__ */ o(Se, { ...e, ...t });
|
|
1223
1223
|
}
|
|
1224
1224
|
const Ga = () => {
|
|
1225
|
-
const [e, t] =
|
|
1225
|
+
const [e, t] = R(), [n, r] = R(), [s, a] = R("startDate");
|
|
1226
1226
|
return {
|
|
1227
1227
|
startDate: e,
|
|
1228
1228
|
setStartDate: t,
|
|
@@ -1231,18 +1231,18 @@ const Ga = () => {
|
|
|
1231
1231
|
focusedInput: s,
|
|
1232
1232
|
setFocusedInput: a
|
|
1233
1233
|
};
|
|
1234
|
-
},
|
|
1234
|
+
}, is = ({
|
|
1235
1235
|
onChange: e,
|
|
1236
1236
|
value: t,
|
|
1237
1237
|
statePerMonth: n,
|
|
1238
1238
|
onChangePanel: r
|
|
1239
1239
|
}) => {
|
|
1240
|
-
const { currentPanel: s, setCurrentPanel: a } =
|
|
1241
|
-
(
|
|
1242
|
-
e && e(
|
|
1240
|
+
const { currentPanel: s, setCurrentPanel: a } = ct(r), [c, i] = R(() => t ?? /* @__PURE__ */ new Date()), l = y(
|
|
1241
|
+
(d) => {
|
|
1242
|
+
e && e(d.date);
|
|
1243
1243
|
},
|
|
1244
1244
|
[e]
|
|
1245
|
-
),
|
|
1245
|
+
), u = I(
|
|
1246
1246
|
() => t ? ge(n, t, [
|
|
1247
1247
|
"selected",
|
|
1248
1248
|
"singleSelected"
|
|
@@ -1251,16 +1251,16 @@ const Ga = () => {
|
|
|
1251
1251
|
);
|
|
1252
1252
|
return {
|
|
1253
1253
|
onClickDay: l,
|
|
1254
|
-
statePerMonth:
|
|
1254
|
+
statePerMonth: u,
|
|
1255
1255
|
date: t,
|
|
1256
1256
|
currentPanel: s,
|
|
1257
1257
|
setCurrentPanel: a,
|
|
1258
|
-
dateInFocus:
|
|
1259
|
-
setDateInFocus:
|
|
1258
|
+
dateInFocus: c,
|
|
1259
|
+
setDateInFocus: i
|
|
1260
1260
|
};
|
|
1261
1261
|
};
|
|
1262
|
-
function
|
|
1263
|
-
const t =
|
|
1262
|
+
function Tn(e) {
|
|
1263
|
+
const t = is(e);
|
|
1264
1264
|
return /* @__PURE__ */ o(Se, { ...e, ...t });
|
|
1265
1265
|
}
|
|
1266
1266
|
const ls = ({
|
|
@@ -1270,9 +1270,9 @@ const ls = ({
|
|
|
1270
1270
|
onChangePanel: r,
|
|
1271
1271
|
initialDateInFocus: s
|
|
1272
1272
|
}) => {
|
|
1273
|
-
const { currentPanel: a, setCurrentPanel:
|
|
1273
|
+
const { currentPanel: a, setCurrentPanel: c } = ct(r), [i, l] = R(
|
|
1274
1274
|
s ?? /* @__PURE__ */ new Date()
|
|
1275
|
-
),
|
|
1275
|
+
), u = y(
|
|
1276
1276
|
(h) => {
|
|
1277
1277
|
if (!e)
|
|
1278
1278
|
return;
|
|
@@ -1280,16 +1280,16 @@ const ls = ({
|
|
|
1280
1280
|
e(t && g ? t.filter((f) => !Y(f, h.date)) : [...t || [], h.date]);
|
|
1281
1281
|
},
|
|
1282
1282
|
[e, t]
|
|
1283
|
-
),
|
|
1283
|
+
), d = I(() => t ? t.reduce(
|
|
1284
1284
|
(h, g) => ge(h, g, ["selected"]),
|
|
1285
1285
|
n
|
|
1286
1286
|
) : n, [n, t]);
|
|
1287
1287
|
return {
|
|
1288
|
-
onClickDay:
|
|
1289
|
-
statePerMonth:
|
|
1288
|
+
onClickDay: u,
|
|
1289
|
+
statePerMonth: d,
|
|
1290
1290
|
currentPanel: a,
|
|
1291
|
-
setCurrentPanel:
|
|
1292
|
-
dateInFocus:
|
|
1291
|
+
setCurrentPanel: c,
|
|
1292
|
+
dateInFocus: i,
|
|
1293
1293
|
setDateInFocus: l
|
|
1294
1294
|
};
|
|
1295
1295
|
};
|
|
@@ -1297,30 +1297,30 @@ function Ja(e) {
|
|
|
1297
1297
|
const t = ls(e);
|
|
1298
1298
|
return /* @__PURE__ */ o(Se, { ...e, ...t });
|
|
1299
1299
|
}
|
|
1300
|
-
const
|
|
1300
|
+
const us = ({
|
|
1301
1301
|
onChange: e,
|
|
1302
1302
|
value: t,
|
|
1303
1303
|
statePerMonth: n,
|
|
1304
1304
|
onChangePanel: r,
|
|
1305
1305
|
locale: s = Ze
|
|
1306
1306
|
}) => {
|
|
1307
|
-
const [a,
|
|
1307
|
+
const [a, c] = R(() => {
|
|
1308
1308
|
const f = ft(t, s);
|
|
1309
1309
|
return f ? f.days[0].date : /* @__PURE__ */ new Date();
|
|
1310
|
-
}), { currentPanel:
|
|
1310
|
+
}), { currentPanel: i, setCurrentPanel: l } = ct(r), u = y(
|
|
1311
1311
|
(f) => {
|
|
1312
1312
|
e && e(Zt(_t(f.date, s)));
|
|
1313
1313
|
},
|
|
1314
1314
|
[s, e]
|
|
1315
|
-
),
|
|
1315
|
+
), d = y(
|
|
1316
1316
|
(f) => {
|
|
1317
1317
|
e && e(Zt(f));
|
|
1318
1318
|
},
|
|
1319
1319
|
[e]
|
|
1320
|
-
), h =
|
|
1320
|
+
), h = I(() => {
|
|
1321
1321
|
const f = ft(t, s);
|
|
1322
1322
|
return f ? vr(n, f) : n;
|
|
1323
|
-
}, [t, s, n]), g =
|
|
1323
|
+
}, [t, s, n]), g = I(() => {
|
|
1324
1324
|
const f = ft(t, s);
|
|
1325
1325
|
return f ? f.days[0].date : /* @__PURE__ */ new Date();
|
|
1326
1326
|
}, [s, t]);
|
|
@@ -1328,10 +1328,10 @@ const ds = ({
|
|
|
1328
1328
|
statePerMonth: h,
|
|
1329
1329
|
date: g,
|
|
1330
1330
|
dateInFocus: a,
|
|
1331
|
-
setDateInFocus:
|
|
1332
|
-
onClickDay:
|
|
1333
|
-
onClickWeek:
|
|
1334
|
-
currentPanel:
|
|
1331
|
+
setDateInFocus: c,
|
|
1332
|
+
onClickDay: u,
|
|
1333
|
+
onClickWeek: d,
|
|
1334
|
+
currentPanel: i,
|
|
1335
1335
|
setCurrentPanel: l
|
|
1336
1336
|
};
|
|
1337
1337
|
}, Zt = (e) => {
|
|
@@ -1342,27 +1342,27 @@ const ds = ({
|
|
|
1342
1342
|
return;
|
|
1343
1343
|
const n = e.split("-"), r = parseInt(n[1], 10), s = parseInt(n[0], 10), a = /* @__PURE__ */ new Date();
|
|
1344
1344
|
a.setFullYear(s);
|
|
1345
|
-
const
|
|
1346
|
-
return _t(
|
|
1345
|
+
const c = Qe(sr(a, r), { locale: t });
|
|
1346
|
+
return _t(c, t);
|
|
1347
1347
|
};
|
|
1348
1348
|
function Qa(e) {
|
|
1349
|
-
const t =
|
|
1349
|
+
const t = us(e);
|
|
1350
1350
|
return /* @__PURE__ */ o(Se, { ...e, ...t });
|
|
1351
1351
|
}
|
|
1352
|
-
const Ve = "bottom",
|
|
1353
|
-
const [r, s] =
|
|
1352
|
+
const Ve = "bottom", ds = (e, t, n) => {
|
|
1353
|
+
const [r, s] = R(n || !1), a = y(() => (s(!0), !0), [s]), c = y(() => {
|
|
1354
1354
|
s(!1), t && t();
|
|
1355
|
-
}, [s, t]),
|
|
1355
|
+
}, [s, t]), i = y(
|
|
1356
1356
|
(l) => {
|
|
1357
|
-
e && e(l), setTimeout(
|
|
1357
|
+
e && e(l), setTimeout(c, 150);
|
|
1358
1358
|
},
|
|
1359
|
-
[e,
|
|
1359
|
+
[e, c]
|
|
1360
1360
|
);
|
|
1361
1361
|
return {
|
|
1362
1362
|
showCalendar: a,
|
|
1363
|
-
hideCalendar:
|
|
1363
|
+
hideCalendar: c,
|
|
1364
1364
|
showingCalendar: r,
|
|
1365
|
-
onSelectDate:
|
|
1365
|
+
onSelectDate: i
|
|
1366
1366
|
};
|
|
1367
1367
|
}, je = "2999-12-31", Za = ({
|
|
1368
1368
|
displayFormat: e = le.fullDate,
|
|
@@ -1371,18 +1371,18 @@ const Ve = "bottom", us = (e, t, n) => {
|
|
|
1371
1371
|
calendarTheme: r = ke,
|
|
1372
1372
|
calendarProps: s,
|
|
1373
1373
|
openOnMount: a,
|
|
1374
|
-
onClose:
|
|
1375
|
-
onChange:
|
|
1374
|
+
onClose: c,
|
|
1375
|
+
onChange: i,
|
|
1376
1376
|
variant: l,
|
|
1377
|
-
width:
|
|
1378
|
-
minDate:
|
|
1377
|
+
width: u,
|
|
1378
|
+
minDate: d,
|
|
1379
1379
|
maxDate: h = je,
|
|
1380
1380
|
disabled: g,
|
|
1381
1381
|
portalTarget: f,
|
|
1382
1382
|
zIndex: p
|
|
1383
1383
|
}) => {
|
|
1384
|
-
const { hideCalendar: D, showingCalendar: C, onSelectDate: v, showCalendar: b } =
|
|
1385
|
-
return /* @__PURE__ */ o(
|
|
1384
|
+
const { hideCalendar: D, showingCalendar: C, onSelectDate: v, showCalendar: b } = ds(i, c, a);
|
|
1385
|
+
return /* @__PURE__ */ o(B, { width: u, children: /* @__PURE__ */ o(
|
|
1386
1386
|
$e,
|
|
1387
1387
|
{
|
|
1388
1388
|
hideArrow: !0,
|
|
@@ -1392,61 +1392,61 @@ const Ve = "bottom", us = (e, t, n) => {
|
|
|
1392
1392
|
onRequestClose: D,
|
|
1393
1393
|
appendTo: f,
|
|
1394
1394
|
zIndex: p,
|
|
1395
|
-
renderTrigger: (m) => /* @__PURE__ */ o(
|
|
1395
|
+
renderTrigger: (m) => /* @__PURE__ */ o(B, { ...m, children: /* @__PURE__ */ o(
|
|
1396
1396
|
pe,
|
|
1397
1397
|
{
|
|
1398
1398
|
type: "date",
|
|
1399
1399
|
onFocus: b,
|
|
1400
1400
|
buttonRight: /* @__PURE__ */ o(zn, { onClick: b, icon: Pe }),
|
|
1401
|
-
value: n ?
|
|
1401
|
+
value: n ? K(n, e) : "",
|
|
1402
1402
|
placeholder: t,
|
|
1403
1403
|
size: 9,
|
|
1404
1404
|
disabled: g,
|
|
1405
1405
|
autoFocus: a,
|
|
1406
1406
|
variant: l,
|
|
1407
|
-
min:
|
|
1407
|
+
min: d,
|
|
1408
1408
|
max: h
|
|
1409
1409
|
}
|
|
1410
1410
|
) }),
|
|
1411
1411
|
placement: Ve,
|
|
1412
1412
|
children: /* @__PURE__ */ o(
|
|
1413
|
-
|
|
1413
|
+
Tn,
|
|
1414
1414
|
{
|
|
1415
1415
|
...s,
|
|
1416
1416
|
onChange: v,
|
|
1417
1417
|
value: n,
|
|
1418
1418
|
theme: r,
|
|
1419
|
-
minDate:
|
|
1419
|
+
minDate: d,
|
|
1420
1420
|
maxDate: h
|
|
1421
1421
|
}
|
|
1422
1422
|
)
|
|
1423
1423
|
}
|
|
1424
1424
|
) });
|
|
1425
1425
|
}, fs = (e, t) => {
|
|
1426
|
-
const n =
|
|
1426
|
+
const n = O(null), r = O(null), [s, a] = R(!1), [c, i] = R(void 0), l = y(() => (i("startDate"), a(!0), !0), [i, a]), u = y(() => (i("endDate"), a(!0), !0), [i, a]), d = y(() => {
|
|
1427
1427
|
a(!1);
|
|
1428
1428
|
}, [a]), h = y(
|
|
1429
1429
|
(f) => {
|
|
1430
|
-
|
|
1430
|
+
c === "startDate" ? (t?.({
|
|
1431
1431
|
startDate: f.date,
|
|
1432
1432
|
endDate: e?.endDate
|
|
1433
|
-
}), e?.endDate ? setTimeout(
|
|
1433
|
+
}), e?.endDate ? setTimeout(d, 150) : (i("endDate"), r.current?.focus())) : c === "endDate" && (t?.({
|
|
1434
1434
|
startDate: e?.startDate,
|
|
1435
1435
|
endDate: f.date
|
|
1436
|
-
}), e?.startDate ? setTimeout(
|
|
1436
|
+
}), e?.startDate ? setTimeout(d, 150) : (i("startDate"), n.current?.focus()));
|
|
1437
1437
|
},
|
|
1438
|
-
[
|
|
1439
|
-
), g =
|
|
1438
|
+
[c, t, i, d, e]
|
|
1439
|
+
), g = I(
|
|
1440
1440
|
() => e?.startDate && e?.endDate && Q(e.startDate, e.endDate),
|
|
1441
1441
|
[e?.startDate, e?.endDate]
|
|
1442
1442
|
);
|
|
1443
1443
|
return {
|
|
1444
1444
|
showingCalendar: s,
|
|
1445
|
-
hideCalendar:
|
|
1446
|
-
showCalendarEndDate:
|
|
1445
|
+
hideCalendar: d,
|
|
1446
|
+
showCalendarEndDate: u,
|
|
1447
1447
|
showCalendarStartDate: l,
|
|
1448
|
-
focusedInput:
|
|
1449
|
-
setFocusedInput:
|
|
1448
|
+
focusedInput: c,
|
|
1449
|
+
setFocusedInput: i,
|
|
1450
1450
|
startDateInputRef: n,
|
|
1451
1451
|
endDateInputRef: r,
|
|
1452
1452
|
onClickDay: h,
|
|
@@ -1460,27 +1460,27 @@ function Xa({
|
|
|
1460
1460
|
value: r,
|
|
1461
1461
|
onValueChange: s,
|
|
1462
1462
|
width: a,
|
|
1463
|
-
calendarTheme:
|
|
1464
|
-
calendarProps:
|
|
1463
|
+
calendarTheme: c = ke,
|
|
1464
|
+
calendarProps: i,
|
|
1465
1465
|
minDate: l,
|
|
1466
|
-
maxDate:
|
|
1467
|
-
disabled:
|
|
1466
|
+
maxDate: u = je,
|
|
1467
|
+
disabled: d,
|
|
1468
1468
|
portalTarget: h,
|
|
1469
1469
|
zIndex: g
|
|
1470
1470
|
}) {
|
|
1471
|
-
const [f, p] =
|
|
1471
|
+
const [f, p] = R("calendar"), {
|
|
1472
1472
|
hideCalendar: D,
|
|
1473
1473
|
showCalendarEndDate: C,
|
|
1474
1474
|
showCalendarStartDate: v,
|
|
1475
1475
|
showingCalendar: b,
|
|
1476
1476
|
focusedInput: m,
|
|
1477
1477
|
startDateInputRef: w,
|
|
1478
|
-
endDateInputRef:
|
|
1479
|
-
onClickDay:
|
|
1480
|
-
startDateIsAfterEnd:
|
|
1481
|
-
} = fs(r, s), [N,
|
|
1478
|
+
endDateInputRef: k,
|
|
1479
|
+
onClickDay: S,
|
|
1480
|
+
startDateIsAfterEnd: T
|
|
1481
|
+
} = fs(r, s), [N, E] = R(
|
|
1482
1482
|
() => (m && r?.[m]) ?? /* @__PURE__ */ new Date()
|
|
1483
|
-
), M =
|
|
1483
|
+
), M = I(
|
|
1484
1484
|
() => Ye(void 0, r?.startDate, r?.endDate),
|
|
1485
1485
|
[r]
|
|
1486
1486
|
);
|
|
@@ -1492,22 +1492,22 @@ function Xa({
|
|
|
1492
1492
|
returnFocus: !1,
|
|
1493
1493
|
appendTo: h,
|
|
1494
1494
|
zIndex: g,
|
|
1495
|
-
renderTrigger: (
|
|
1495
|
+
renderTrigger: (L) => /* @__PURE__ */ _(V, { alignItems: "center", ...L, children: [
|
|
1496
1496
|
/* @__PURE__ */ o(
|
|
1497
1497
|
pe,
|
|
1498
1498
|
{
|
|
1499
1499
|
iconLeft: Pe,
|
|
1500
1500
|
onFocus: v,
|
|
1501
|
-
value: r?.startDate ?
|
|
1501
|
+
value: r?.startDate ? K(r.startDate, e) : "",
|
|
1502
1502
|
placeholder: t,
|
|
1503
1503
|
width: a,
|
|
1504
|
-
disabled:
|
|
1504
|
+
disabled: d,
|
|
1505
1505
|
inputRef: w,
|
|
1506
1506
|
size: 9,
|
|
1507
|
-
variant:
|
|
1507
|
+
variant: T ? "error" : void 0
|
|
1508
1508
|
}
|
|
1509
1509
|
),
|
|
1510
|
-
/* @__PURE__ */ o(
|
|
1510
|
+
/* @__PURE__ */ o(Ie, {}),
|
|
1511
1511
|
/* @__PURE__ */ o(
|
|
1512
1512
|
cn,
|
|
1513
1513
|
{
|
|
@@ -1516,19 +1516,19 @@ function Xa({
|
|
|
1516
1516
|
size: 14
|
|
1517
1517
|
}
|
|
1518
1518
|
),
|
|
1519
|
-
/* @__PURE__ */ o(
|
|
1519
|
+
/* @__PURE__ */ o(Ie, {}),
|
|
1520
1520
|
/* @__PURE__ */ o(
|
|
1521
1521
|
pe,
|
|
1522
1522
|
{
|
|
1523
1523
|
iconLeft: Pe,
|
|
1524
1524
|
onFocus: C,
|
|
1525
|
-
value: r?.endDate ?
|
|
1525
|
+
value: r?.endDate ? K(r.endDate, e) : "",
|
|
1526
1526
|
placeholder: n,
|
|
1527
1527
|
width: a,
|
|
1528
|
-
disabled:
|
|
1529
|
-
inputRef:
|
|
1528
|
+
disabled: d,
|
|
1529
|
+
inputRef: k,
|
|
1530
1530
|
size: 9,
|
|
1531
|
-
variant:
|
|
1531
|
+
variant: T ? "error" : void 0
|
|
1532
1532
|
}
|
|
1533
1533
|
)
|
|
1534
1534
|
] }),
|
|
@@ -1538,16 +1538,16 @@ function Xa({
|
|
|
1538
1538
|
children: /* @__PURE__ */ o(
|
|
1539
1539
|
Se,
|
|
1540
1540
|
{
|
|
1541
|
-
...
|
|
1541
|
+
...i,
|
|
1542
1542
|
dateInFocus: N,
|
|
1543
|
-
setDateInFocus:
|
|
1543
|
+
setDateInFocus: E,
|
|
1544
1544
|
statePerMonth: M,
|
|
1545
|
-
theme:
|
|
1546
|
-
onClickDay:
|
|
1545
|
+
theme: c,
|
|
1546
|
+
onClickDay: S,
|
|
1547
1547
|
currentPanel: f,
|
|
1548
1548
|
setCurrentPanel: p,
|
|
1549
1549
|
minDate: l,
|
|
1550
|
-
maxDate:
|
|
1550
|
+
maxDate: u
|
|
1551
1551
|
}
|
|
1552
1552
|
)
|
|
1553
1553
|
}
|
|
@@ -1560,18 +1560,18 @@ const eo = ({
|
|
|
1560
1560
|
disableCalender: r = !1,
|
|
1561
1561
|
onValueChange: s,
|
|
1562
1562
|
placeholder: a = "yyyy-mm-dd",
|
|
1563
|
-
value:
|
|
1564
|
-
width:
|
|
1563
|
+
value: c,
|
|
1564
|
+
width: i = "130px",
|
|
1565
1565
|
calendarTheme: l = ke,
|
|
1566
|
-
hideCalenderIcon:
|
|
1567
|
-
minDate:
|
|
1566
|
+
hideCalenderIcon: u = !1,
|
|
1567
|
+
minDate: d,
|
|
1568
1568
|
maxDate: h = je,
|
|
1569
1569
|
variant: g,
|
|
1570
1570
|
portalTarget: f,
|
|
1571
1571
|
zIndex: p,
|
|
1572
1572
|
...D
|
|
1573
1573
|
}) => {
|
|
1574
|
-
const [C, v] =
|
|
1574
|
+
const [C, v] = R(!1), b = y(() => {
|
|
1575
1575
|
v(!C);
|
|
1576
1576
|
}, [v, C]), m = y(() => {
|
|
1577
1577
|
v(!1);
|
|
@@ -1580,9 +1580,9 @@ const eo = ({
|
|
|
1580
1580
|
s && s(M);
|
|
1581
1581
|
},
|
|
1582
1582
|
[s]
|
|
1583
|
-
),
|
|
1583
|
+
), k = y(
|
|
1584
1584
|
(M) => {
|
|
1585
|
-
M && (w(
|
|
1585
|
+
M && (w(K(M, n)), t && setTimeout(() => v(!C), 200));
|
|
1586
1586
|
},
|
|
1587
1587
|
[
|
|
1588
1588
|
w,
|
|
@@ -1591,19 +1591,19 @@ const eo = ({
|
|
|
1591
1591
|
v,
|
|
1592
1592
|
C
|
|
1593
1593
|
]
|
|
1594
|
-
),
|
|
1595
|
-
return /* @__PURE__ */ o(
|
|
1594
|
+
), S = !!c && !/^[-/\\.0-9]+$/.test(c), T = !!c && ar(ve(c, n, /* @__PURE__ */ new Date())), E = !!c && c.length >= n.length && !T || S;
|
|
1595
|
+
return /* @__PURE__ */ o(B, { width: i, children: /* @__PURE__ */ o(
|
|
1596
1596
|
$e,
|
|
1597
1597
|
{
|
|
1598
1598
|
appendTo: f,
|
|
1599
1599
|
zIndex: p,
|
|
1600
|
-
renderTrigger: ({ ref: M, ...
|
|
1600
|
+
renderTrigger: ({ ref: M, ...L }) => /* @__PURE__ */ o(
|
|
1601
1601
|
pe,
|
|
1602
1602
|
{
|
|
1603
1603
|
...D,
|
|
1604
|
-
variant:
|
|
1604
|
+
variant: E ? "error" : g,
|
|
1605
1605
|
disableContentPaddingRight: !0,
|
|
1606
|
-
contentRight:
|
|
1606
|
+
contentRight: u ? void 0 : /* @__PURE__ */ o(V, { alignItems: "center", indent: 0.5, children: /* @__PURE__ */ o(
|
|
1607
1607
|
Z,
|
|
1608
1608
|
{
|
|
1609
1609
|
size: "small",
|
|
@@ -1614,12 +1614,12 @@ const eo = ({
|
|
|
1614
1614
|
) }),
|
|
1615
1615
|
onValueChange: w,
|
|
1616
1616
|
placeholder: a,
|
|
1617
|
-
value:
|
|
1618
|
-
min:
|
|
1617
|
+
value: c || "",
|
|
1618
|
+
min: d,
|
|
1619
1619
|
max: h,
|
|
1620
1620
|
size: 10,
|
|
1621
1621
|
inputRef: M,
|
|
1622
|
-
...
|
|
1622
|
+
...L
|
|
1623
1623
|
}
|
|
1624
1624
|
),
|
|
1625
1625
|
hideArrow: !0,
|
|
@@ -1627,12 +1627,12 @@ const eo = ({
|
|
|
1627
1627
|
placement: Ve,
|
|
1628
1628
|
onRequestClose: m,
|
|
1629
1629
|
children: /* @__PURE__ */ o(
|
|
1630
|
-
|
|
1630
|
+
Tn,
|
|
1631
1631
|
{
|
|
1632
1632
|
...e,
|
|
1633
|
-
onChange:
|
|
1634
|
-
value:
|
|
1635
|
-
minDate:
|
|
1633
|
+
onChange: k,
|
|
1634
|
+
value: c && T ? ve(c, n, /* @__PURE__ */ new Date()) : void 0,
|
|
1635
|
+
minDate: d,
|
|
1636
1636
|
maxDate: h,
|
|
1637
1637
|
theme: l
|
|
1638
1638
|
}
|
|
@@ -1713,9 +1713,9 @@ const eo = ({
|
|
|
1713
1713
|
value: r,
|
|
1714
1714
|
width: s = "85px",
|
|
1715
1715
|
variant: a,
|
|
1716
|
-
...
|
|
1716
|
+
...c
|
|
1717
1717
|
}) => {
|
|
1718
|
-
const [
|
|
1718
|
+
const [i, l] = R(() => bt(r)), u = "hh:mm", d = y(() => {
|
|
1719
1719
|
if (r) {
|
|
1720
1720
|
const g = hs(r);
|
|
1721
1721
|
l(g.success), g.success && e && e(g.time);
|
|
@@ -1723,21 +1723,21 @@ const eo = ({
|
|
|
1723
1723
|
}, [r, e, l]), h = y(
|
|
1724
1724
|
(g) => {
|
|
1725
1725
|
const f = g.target.value, p = bt(f);
|
|
1726
|
-
l(p && f.length <=
|
|
1726
|
+
l(p && f.length <= u.length), e && e(f);
|
|
1727
1727
|
},
|
|
1728
1728
|
[e, l]
|
|
1729
1729
|
);
|
|
1730
1730
|
return /* @__PURE__ */ o(
|
|
1731
1731
|
pe,
|
|
1732
1732
|
{
|
|
1733
|
-
...
|
|
1733
|
+
...c,
|
|
1734
1734
|
type: "time",
|
|
1735
|
-
variant:
|
|
1735
|
+
variant: i ? a : "error",
|
|
1736
1736
|
iconLeft: n ? ln : void 0,
|
|
1737
1737
|
value: r,
|
|
1738
|
-
placeholder: t ?
|
|
1738
|
+
placeholder: t ? u : void 0,
|
|
1739
1739
|
onChange: h,
|
|
1740
|
-
onBlur:
|
|
1740
|
+
onBlur: d,
|
|
1741
1741
|
width: s
|
|
1742
1742
|
}
|
|
1743
1743
|
);
|
|
@@ -1748,11 +1748,11 @@ const eo = ({
|
|
|
1748
1748
|
onEnter: r,
|
|
1749
1749
|
onValueChangeLeft: s,
|
|
1750
1750
|
onValueChangeRight: a,
|
|
1751
|
-
separatorIcon:
|
|
1752
|
-
placeholderLeft:
|
|
1751
|
+
separatorIcon: c,
|
|
1752
|
+
placeholderLeft: i,
|
|
1753
1753
|
placeholderRight: l,
|
|
1754
|
-
typeLeft:
|
|
1755
|
-
typeRight:
|
|
1754
|
+
typeLeft: u,
|
|
1755
|
+
typeRight: d,
|
|
1756
1756
|
onChangeLeft: h,
|
|
1757
1757
|
onChangeRight: g,
|
|
1758
1758
|
valueLeft: f,
|
|
@@ -1763,62 +1763,62 @@ const eo = ({
|
|
|
1763
1763
|
maxRight: b,
|
|
1764
1764
|
onClickLeft: m,
|
|
1765
1765
|
onClickRight: w,
|
|
1766
|
-
onClickCalendar:
|
|
1767
|
-
onClickArrowDown:
|
|
1768
|
-
onBlurLeft:
|
|
1766
|
+
onClickCalendar: k,
|
|
1767
|
+
onClickArrowDown: S,
|
|
1768
|
+
onBlurLeft: T,
|
|
1769
1769
|
onBlurRight: N,
|
|
1770
|
-
onFocusLeft:
|
|
1770
|
+
onFocusLeft: E,
|
|
1771
1771
|
onFocusRight: M,
|
|
1772
|
-
inputRefLeft:
|
|
1773
|
-
inputRefRight:
|
|
1774
|
-
variant:
|
|
1775
|
-
variantLeft:
|
|
1776
|
-
variantRight:
|
|
1777
|
-
onBlur:
|
|
1772
|
+
inputRefLeft: L,
|
|
1773
|
+
inputRefRight: $,
|
|
1774
|
+
variant: j,
|
|
1775
|
+
variantLeft: A,
|
|
1776
|
+
variantRight: H,
|
|
1777
|
+
onBlur: q,
|
|
1778
1778
|
showPresets: x,
|
|
1779
|
-
widthLeft:
|
|
1779
|
+
widthLeft: G,
|
|
1780
1780
|
widthRight: U,
|
|
1781
|
-
disabled:
|
|
1781
|
+
disabled: z
|
|
1782
1782
|
}) => {
|
|
1783
|
-
const F =
|
|
1784
|
-
() => hr((
|
|
1785
|
-
|
|
1783
|
+
const F = O(0), P = I(
|
|
1784
|
+
() => hr((W) => {
|
|
1785
|
+
W === 0 && q?.();
|
|
1786
1786
|
}, 10),
|
|
1787
|
-
[
|
|
1787
|
+
[q]
|
|
1788
1788
|
), X = y(
|
|
1789
|
-
(
|
|
1790
|
-
F.current++, P(F.current),
|
|
1789
|
+
(W) => {
|
|
1790
|
+
F.current++, P(F.current), E && E(W);
|
|
1791
1791
|
},
|
|
1792
|
-
[
|
|
1793
|
-
),
|
|
1794
|
-
(
|
|
1795
|
-
F.current++, P(F.current), M && M(
|
|
1792
|
+
[E, F, P]
|
|
1793
|
+
), ae = y(
|
|
1794
|
+
(W) => {
|
|
1795
|
+
F.current++, P(F.current), M && M(W);
|
|
1796
1796
|
},
|
|
1797
1797
|
[M, F, P]
|
|
1798
1798
|
), oe = y(
|
|
1799
|
-
(
|
|
1800
|
-
F.current--, P(F.current),
|
|
1799
|
+
(W) => {
|
|
1800
|
+
F.current--, P(F.current), T && T(W);
|
|
1801
1801
|
},
|
|
1802
|
-
[
|
|
1803
|
-
),
|
|
1804
|
-
(
|
|
1805
|
-
F.current--, P(F.current), N && N(
|
|
1802
|
+
[T, F, P]
|
|
1803
|
+
), ue = y(
|
|
1804
|
+
(W) => {
|
|
1805
|
+
F.current--, P(F.current), N && N(W);
|
|
1806
1806
|
},
|
|
1807
1807
|
[N, F, P]
|
|
1808
1808
|
);
|
|
1809
|
-
return /* @__PURE__ */ o(
|
|
1809
|
+
return /* @__PURE__ */ o(B, { children: /* @__PURE__ */ _(
|
|
1810
1810
|
pr,
|
|
1811
1811
|
{
|
|
1812
1812
|
disableContentPaddingRight: !0,
|
|
1813
|
-
disabled:
|
|
1814
|
-
variant:
|
|
1813
|
+
disabled: z,
|
|
1814
|
+
variant: j,
|
|
1815
1815
|
contentRight: /* @__PURE__ */ _(V, { alignItems: "center", children: [
|
|
1816
1816
|
/* @__PURE__ */ o(Ae, { num: 0.5, children: /* @__PURE__ */ o(
|
|
1817
1817
|
Z,
|
|
1818
1818
|
{
|
|
1819
1819
|
leftIcon: Pe,
|
|
1820
|
-
onClick:
|
|
1821
|
-
disabled:
|
|
1820
|
+
onClick: k,
|
|
1821
|
+
disabled: z,
|
|
1822
1822
|
size: "small"
|
|
1823
1823
|
}
|
|
1824
1824
|
) }),
|
|
@@ -1828,31 +1828,31 @@ const eo = ({
|
|
|
1828
1828
|
Z,
|
|
1829
1829
|
{
|
|
1830
1830
|
leftIcon: kt,
|
|
1831
|
-
onClick:
|
|
1832
|
-
disabled:
|
|
1831
|
+
onClick: S,
|
|
1832
|
+
disabled: z,
|
|
1833
1833
|
size: "small"
|
|
1834
1834
|
}
|
|
1835
1835
|
) })
|
|
1836
1836
|
] }) : null
|
|
1837
1837
|
] }),
|
|
1838
1838
|
children: [
|
|
1839
|
-
/* @__PURE__ */ o(
|
|
1839
|
+
/* @__PURE__ */ o(B, { width: G, children: /* @__PURE__ */ o(
|
|
1840
1840
|
pe,
|
|
1841
1841
|
{
|
|
1842
1842
|
onEsc: n,
|
|
1843
1843
|
onEnter: r,
|
|
1844
1844
|
onClick: m,
|
|
1845
|
-
disabled:
|
|
1845
|
+
disabled: z,
|
|
1846
1846
|
hideBorder: !0,
|
|
1847
|
-
placeholder:
|
|
1847
|
+
placeholder: i,
|
|
1848
1848
|
value: f,
|
|
1849
1849
|
onValueChange: s,
|
|
1850
1850
|
onChange: h,
|
|
1851
1851
|
onBlur: oe,
|
|
1852
1852
|
onFocus: X,
|
|
1853
|
-
inputRef:
|
|
1854
|
-
variant:
|
|
1855
|
-
type:
|
|
1853
|
+
inputRef: L,
|
|
1854
|
+
variant: A,
|
|
1855
|
+
type: u,
|
|
1856
1856
|
autoFocus: e,
|
|
1857
1857
|
min: D,
|
|
1858
1858
|
max: C
|
|
@@ -1861,28 +1861,28 @@ const eo = ({
|
|
|
1861
1861
|
/* @__PURE__ */ o(V, { indent: 0.5, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ o(
|
|
1862
1862
|
cn,
|
|
1863
1863
|
{
|
|
1864
|
-
icon:
|
|
1864
|
+
icon: c,
|
|
1865
1865
|
size: 12,
|
|
1866
1866
|
color: xt("--lhds-color-ui-500")
|
|
1867
1867
|
}
|
|
1868
1868
|
) }),
|
|
1869
|
-
/* @__PURE__ */ o(
|
|
1869
|
+
/* @__PURE__ */ o(B, { width: U, children: /* @__PURE__ */ o(
|
|
1870
1870
|
pe,
|
|
1871
1871
|
{
|
|
1872
1872
|
onEsc: n,
|
|
1873
1873
|
onEnter: r,
|
|
1874
1874
|
onClick: w,
|
|
1875
|
-
disabled:
|
|
1875
|
+
disabled: z,
|
|
1876
1876
|
hideBorder: !0,
|
|
1877
1877
|
placeholder: l,
|
|
1878
1878
|
value: p,
|
|
1879
1879
|
onValueChange: a,
|
|
1880
1880
|
onChange: g,
|
|
1881
|
-
onBlur:
|
|
1882
|
-
onFocus:
|
|
1883
|
-
inputRef:
|
|
1884
|
-
variant:
|
|
1885
|
-
type:
|
|
1881
|
+
onBlur: ue,
|
|
1882
|
+
onFocus: ae,
|
|
1883
|
+
inputRef: $,
|
|
1884
|
+
variant: H,
|
|
1885
|
+
type: d,
|
|
1886
1886
|
autoFocus: t,
|
|
1887
1887
|
min: v,
|
|
1888
1888
|
max: b
|
|
@@ -1943,12 +1943,12 @@ const eo = ({
|
|
|
1943
1943
|
columnRef: r,
|
|
1944
1944
|
canScrollRef: s
|
|
1945
1945
|
}) => {
|
|
1946
|
-
const a =
|
|
1947
|
-
return
|
|
1946
|
+
const a = O(null);
|
|
1947
|
+
return re(
|
|
1948
1948
|
function() {
|
|
1949
1949
|
if (n && r.current && a.current && s.current) {
|
|
1950
|
-
const
|
|
1951
|
-
r.current.scrollTo(0,
|
|
1950
|
+
const i = a.current.scrollHeight * Math.max(t - 2, 0);
|
|
1951
|
+
r.current.scrollTo(0, i), s.current = !1;
|
|
1952
1952
|
}
|
|
1953
1953
|
},
|
|
1954
1954
|
[r, t, n, s]
|
|
@@ -1981,7 +1981,7 @@ const eo = ({
|
|
|
1981
1981
|
selectedItem: n,
|
|
1982
1982
|
canScrollRef: r
|
|
1983
1983
|
}) => {
|
|
1984
|
-
const s =
|
|
1984
|
+
const s = O(null);
|
|
1985
1985
|
return /* @__PURE__ */ o(J, { className: _n.timePickerColumn, ref: s, children: t.map((a) => /* @__PURE__ */ o(
|
|
1986
1986
|
ws,
|
|
1987
1987
|
{
|
|
@@ -1993,28 +1993,28 @@ const eo = ({
|
|
|
1993
1993
|
},
|
|
1994
1994
|
a
|
|
1995
1995
|
)) });
|
|
1996
|
-
}, ys =
|
|
1996
|
+
}, ys = It(0, 24), vs = It(0, 60), Cs = ({
|
|
1997
1997
|
value: e,
|
|
1998
1998
|
onValueChange: t
|
|
1999
1999
|
}) => {
|
|
2000
|
-
const n =
|
|
2001
|
-
|
|
2000
|
+
const n = O(!0), [r, s] = R(void 0), [a, c] = R(void 0);
|
|
2001
|
+
re(() => {
|
|
2002
2002
|
if (e) {
|
|
2003
|
-
const { minute:
|
|
2004
|
-
s(
|
|
2003
|
+
const { minute: u, hour: d } = Je(e);
|
|
2004
|
+
s(d), c(u);
|
|
2005
2005
|
}
|
|
2006
2006
|
}, [e]);
|
|
2007
|
-
const
|
|
2008
|
-
(
|
|
2009
|
-
s(
|
|
2010
|
-
`${Xe(String(
|
|
2007
|
+
const i = y(
|
|
2008
|
+
(u) => {
|
|
2009
|
+
s(u), t?.(
|
|
2010
|
+
`${Xe(String(u ?? 0))}:${et(String(a ?? 0))}`
|
|
2011
2011
|
);
|
|
2012
2012
|
},
|
|
2013
2013
|
[a, t]
|
|
2014
2014
|
), l = y(
|
|
2015
|
-
(
|
|
2016
|
-
|
|
2017
|
-
`${Xe(String(r ?? 0))}:${et(String(
|
|
2015
|
+
(u) => {
|
|
2016
|
+
c(u), t?.(
|
|
2017
|
+
`${Xe(String(r ?? 0))}:${et(String(u ?? 0))}`
|
|
2018
2018
|
);
|
|
2019
2019
|
},
|
|
2020
2020
|
[r, t]
|
|
@@ -2024,7 +2024,7 @@ const eo = ({
|
|
|
2024
2024
|
Xt,
|
|
2025
2025
|
{
|
|
2026
2026
|
items: ys,
|
|
2027
|
-
onClick:
|
|
2027
|
+
onClick: i,
|
|
2028
2028
|
selectedItem: r,
|
|
2029
2029
|
canScrollRef: n
|
|
2030
2030
|
}
|
|
@@ -2041,12 +2041,12 @@ const eo = ({
|
|
|
2041
2041
|
)
|
|
2042
2042
|
] });
|
|
2043
2043
|
}, ks = (e, t, n) => {
|
|
2044
|
-
|
|
2044
|
+
re(
|
|
2045
2045
|
function() {
|
|
2046
2046
|
e && t(e);
|
|
2047
2047
|
},
|
|
2048
2048
|
[e, t]
|
|
2049
|
-
),
|
|
2049
|
+
), re(
|
|
2050
2050
|
function() {
|
|
2051
2051
|
n.current && (e ? n.current.valueAsDate = new Date(
|
|
2052
2052
|
Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())
|
|
@@ -2059,11 +2059,11 @@ const eo = ({
|
|
|
2059
2059
|
showCalendarInternal: r,
|
|
2060
2060
|
hideCalendarInternal: s,
|
|
2061
2061
|
setFirstFocusedInput: a,
|
|
2062
|
-
setCurrentPanel:
|
|
2063
|
-
localTime:
|
|
2062
|
+
setCurrentPanel: c,
|
|
2063
|
+
localTime: i,
|
|
2064
2064
|
setLocalTime: l,
|
|
2065
|
-
localDate:
|
|
2066
|
-
setLocalDate:
|
|
2065
|
+
localDate: u,
|
|
2066
|
+
setLocalDate: d
|
|
2067
2067
|
}, h) => {
|
|
2068
2068
|
const g = y(
|
|
2069
2069
|
(b) => {
|
|
@@ -2071,12 +2071,12 @@ const eo = ({
|
|
|
2071
2071
|
return;
|
|
2072
2072
|
const m = new Date(b);
|
|
2073
2073
|
if (e)
|
|
2074
|
-
m.setHours(e.getHours()), m.setMinutes(e.getMinutes()), t?.(m),
|
|
2075
|
-
else if (
|
|
2076
|
-
const { minute: w, hour:
|
|
2077
|
-
m.setHours(
|
|
2074
|
+
m.setHours(e.getHours()), m.setMinutes(e.getMinutes()), t?.(m), d(void 0);
|
|
2075
|
+
else if (i) {
|
|
2076
|
+
const { minute: w, hour: k } = Je(i);
|
|
2077
|
+
m.setHours(k ?? 0), m.setMinutes(w ?? 0), t?.(m), d(void 0);
|
|
2078
2078
|
} else
|
|
2079
|
-
|
|
2079
|
+
d(m);
|
|
2080
2080
|
n(m), h.current && (h.current.valueAsDate = new Date(
|
|
2081
2081
|
Date.UTC(
|
|
2082
2082
|
m.getFullYear(),
|
|
@@ -2088,10 +2088,10 @@ const eo = ({
|
|
|
2088
2088
|
[
|
|
2089
2089
|
e,
|
|
2090
2090
|
h,
|
|
2091
|
-
|
|
2091
|
+
i,
|
|
2092
2092
|
t,
|
|
2093
2093
|
n,
|
|
2094
|
-
|
|
2094
|
+
d
|
|
2095
2095
|
]
|
|
2096
2096
|
), f = y(
|
|
2097
2097
|
(b) => {
|
|
@@ -2099,13 +2099,13 @@ const eo = ({
|
|
|
2099
2099
|
if (e) {
|
|
2100
2100
|
const m = Je(b), w = new Date(e);
|
|
2101
2101
|
w.setHours(m.hour || 0), w.setMinutes(m.minute || 0), t?.(w), l(void 0);
|
|
2102
|
-
} else if (
|
|
2103
|
-
const m = Je(b), w = new Date(
|
|
2102
|
+
} else if (u) {
|
|
2103
|
+
const m = Je(b), w = new Date(u);
|
|
2104
2104
|
w.setHours(m.hour || 0), w.setMinutes(m.minute || 0), t?.(w), l(void 0);
|
|
2105
2105
|
} else
|
|
2106
2106
|
l(b);
|
|
2107
2107
|
},
|
|
2108
|
-
[t, e,
|
|
2108
|
+
[t, e, u, l]
|
|
2109
2109
|
), p = y(
|
|
2110
2110
|
(b) => {
|
|
2111
2111
|
b.target.value[0] !== "0" && g(b.target.valueAsDate);
|
|
@@ -2115,8 +2115,8 @@ const eo = ({
|
|
|
2115
2115
|
(b) => f(b.target.value),
|
|
2116
2116
|
[f]
|
|
2117
2117
|
), C = y(() => {
|
|
2118
|
-
n(e || /* @__PURE__ */ new Date()),
|
|
2119
|
-
}, [e,
|
|
2118
|
+
n(e || /* @__PURE__ */ new Date()), c("calendar"), r();
|
|
2119
|
+
}, [e, c, r, n]), v = y(() => {
|
|
2120
2120
|
a(void 0), s();
|
|
2121
2121
|
}, [a, s]);
|
|
2122
2122
|
return {
|
|
@@ -2128,13 +2128,13 @@ const eo = ({
|
|
|
2128
2128
|
onChangeDate: g
|
|
2129
2129
|
};
|
|
2130
2130
|
}, Ms = (e) => {
|
|
2131
|
-
const [t, n] =
|
|
2131
|
+
const [t, n] = R(void 0), [r, s] = R(void 0), [a, c, i] = pt(!1), [l, u, d] = pt(!1), [h, g] = R(void 0), [f, p] = R(
|
|
2132
2132
|
() => e ?? /* @__PURE__ */ new Date()
|
|
2133
|
-
), [D, C] =
|
|
2133
|
+
), [D, C] = R("calendar");
|
|
2134
2134
|
return {
|
|
2135
2135
|
isCalendarVisible: a,
|
|
2136
|
-
showCalendarInternal:
|
|
2137
|
-
hideCalendarInternal:
|
|
2136
|
+
showCalendarInternal: c,
|
|
2137
|
+
hideCalendarInternal: i,
|
|
2138
2138
|
firstFocusedInput: h,
|
|
2139
2139
|
setFirstFocusedInput: g,
|
|
2140
2140
|
dateInFocus: f,
|
|
@@ -2142,28 +2142,28 @@ const eo = ({
|
|
|
2142
2142
|
currentPanel: D,
|
|
2143
2143
|
setCurrentPanel: C,
|
|
2144
2144
|
isTimePickerVisible: l,
|
|
2145
|
-
showTimePicker:
|
|
2146
|
-
hideTimePicker:
|
|
2145
|
+
showTimePicker: u,
|
|
2146
|
+
hideTimePicker: d,
|
|
2147
2147
|
localDate: t,
|
|
2148
2148
|
setLocalDate: n,
|
|
2149
2149
|
localTime: r,
|
|
2150
2150
|
setLocalTime: s
|
|
2151
2151
|
};
|
|
2152
|
-
},
|
|
2152
|
+
}, Is = (e, t, n, r, {
|
|
2153
2153
|
isCalendarVisible: s,
|
|
2154
2154
|
setCurrentPanel: a,
|
|
2155
|
-
showTimePicker:
|
|
2156
|
-
hideTimePicker:
|
|
2155
|
+
showTimePicker: c,
|
|
2156
|
+
hideTimePicker: i
|
|
2157
2157
|
}) => {
|
|
2158
2158
|
const l = y(() => {
|
|
2159
|
-
s || n(), a("calendar"),
|
|
2160
|
-
}, [
|
|
2161
|
-
r(),
|
|
2162
|
-
}, [r,
|
|
2159
|
+
s || n(), a("calendar"), i();
|
|
2160
|
+
}, [i, s, a, n]), u = y(() => {
|
|
2161
|
+
r(), c();
|
|
2162
|
+
}, [r, c]), d = y(
|
|
2163
2163
|
(p) => {
|
|
2164
|
-
e(p.date), r(),
|
|
2164
|
+
e(p.date), r(), c();
|
|
2165
2165
|
},
|
|
2166
|
-
[e, r,
|
|
2166
|
+
[e, r, c]
|
|
2167
2167
|
), h = y(() => {
|
|
2168
2168
|
a("presets"), n();
|
|
2169
2169
|
}, [a, n]), g = y(() => {
|
|
@@ -2182,8 +2182,8 @@ const eo = ({
|
|
|
2182
2182
|
);
|
|
2183
2183
|
return {
|
|
2184
2184
|
onFocusLeft: l,
|
|
2185
|
-
onFocusRight:
|
|
2186
|
-
onClickDay:
|
|
2185
|
+
onFocusRight: u,
|
|
2186
|
+
onClickDay: d,
|
|
2187
2187
|
onClickArrowButton: h,
|
|
2188
2188
|
onClickCalendarButton: g,
|
|
2189
2189
|
onKeyDownHandler: f
|
|
@@ -2195,60 +2195,60 @@ const eo = ({
|
|
|
2195
2195
|
onEsc: r,
|
|
2196
2196
|
onBlur: s,
|
|
2197
2197
|
autoFocus: a,
|
|
2198
|
-
minDate:
|
|
2199
|
-
widthLeft:
|
|
2198
|
+
minDate: c,
|
|
2199
|
+
widthLeft: i = 128,
|
|
2200
2200
|
widthRight: l = 80,
|
|
2201
|
-
maxDate:
|
|
2202
|
-
variant:
|
|
2201
|
+
maxDate: u = je,
|
|
2202
|
+
variant: d,
|
|
2203
2203
|
disabled: h,
|
|
2204
2204
|
zIndex: g,
|
|
2205
2205
|
appendTo: f
|
|
2206
2206
|
}) => {
|
|
2207
|
-
const p =
|
|
2207
|
+
const p = O(null), D = O(null), C = Ms(e), {
|
|
2208
2208
|
setCurrentPanel: v,
|
|
2209
2209
|
currentPanel: b,
|
|
2210
2210
|
isCalendarVisible: m,
|
|
2211
2211
|
dateInFocus: w,
|
|
2212
|
-
setDateInFocus:
|
|
2213
|
-
isTimePickerVisible:
|
|
2214
|
-
hideTimePicker:
|
|
2212
|
+
setDateInFocus: k,
|
|
2213
|
+
isTimePickerVisible: S,
|
|
2214
|
+
hideTimePicker: T,
|
|
2215
2215
|
localTime: N,
|
|
2216
|
-
localDate:
|
|
2216
|
+
localDate: E
|
|
2217
2217
|
} = C, {
|
|
2218
2218
|
showCalendar: M,
|
|
2219
|
-
hideCalendar:
|
|
2220
|
-
inputLeftChangeHandler:
|
|
2221
|
-
inputRightChangeHandler:
|
|
2222
|
-
onChangeTime:
|
|
2223
|
-
onChangeDate:
|
|
2219
|
+
hideCalendar: L,
|
|
2220
|
+
inputLeftChangeHandler: $,
|
|
2221
|
+
inputRightChangeHandler: j,
|
|
2222
|
+
onChangeTime: A,
|
|
2223
|
+
onChangeDate: H
|
|
2224
2224
|
} = Ss(e, t, C, p), {
|
|
2225
|
-
onKeyDownHandler:
|
|
2225
|
+
onKeyDownHandler: q,
|
|
2226
2226
|
onFocusRight: x,
|
|
2227
|
-
onFocusLeft:
|
|
2227
|
+
onFocusLeft: G,
|
|
2228
2228
|
onClickDay: U,
|
|
2229
|
-
onClickCalendarButton:
|
|
2229
|
+
onClickCalendarButton: z,
|
|
2230
2230
|
onClickArrowButton: F
|
|
2231
|
-
} =
|
|
2232
|
-
|
|
2231
|
+
} = Is(
|
|
2232
|
+
H,
|
|
2233
2233
|
p,
|
|
2234
2234
|
M,
|
|
2235
|
-
|
|
2235
|
+
L,
|
|
2236
2236
|
C
|
|
2237
2237
|
);
|
|
2238
|
-
ks(e,
|
|
2239
|
-
const P =
|
|
2240
|
-
const
|
|
2241
|
-
return
|
|
2238
|
+
ks(e, k, p);
|
|
2239
|
+
const P = I(() => {
|
|
2240
|
+
const W = e || E;
|
|
2241
|
+
return W ? ge(void 0, W, [
|
|
2242
2242
|
"singleSelected",
|
|
2243
2243
|
"selected"
|
|
2244
2244
|
]) : {};
|
|
2245
|
-
}, [
|
|
2246
|
-
|
|
2247
|
-
}, [
|
|
2245
|
+
}, [E, e]), X = y(() => {
|
|
2246
|
+
L(), T();
|
|
2247
|
+
}, [L, T]), ae = I(
|
|
2248
2248
|
() => e ? ps(e) : N,
|
|
2249
2249
|
[e, N]
|
|
2250
|
-
), oe = At(m, 300),
|
|
2251
|
-
return /* @__PURE__ */ o(
|
|
2250
|
+
), oe = At(m, 300), ue = At(S, 300);
|
|
2251
|
+
return /* @__PURE__ */ o(B, { onKeyDown: q, children: /* @__PURE__ */ o(
|
|
2252
2252
|
$e,
|
|
2253
2253
|
{
|
|
2254
2254
|
hideArrow: !0,
|
|
@@ -2256,7 +2256,7 @@ const eo = ({
|
|
|
2256
2256
|
returnFocus: !1,
|
|
2257
2257
|
zIndex: g,
|
|
2258
2258
|
appendTo: f,
|
|
2259
|
-
renderTrigger: (
|
|
2259
|
+
renderTrigger: (W) => /* @__PURE__ */ o(B, { ...W, children: /* @__PURE__ */ o(
|
|
2260
2260
|
xn,
|
|
2261
2261
|
{
|
|
2262
2262
|
autoFocusLeft: a,
|
|
@@ -2269,53 +2269,53 @@ const eo = ({
|
|
|
2269
2269
|
typeRight: "time",
|
|
2270
2270
|
placeholderLeft: "yyyy-mm-dd",
|
|
2271
2271
|
placeholderRight: "hh:mm",
|
|
2272
|
-
onChangeLeft:
|
|
2273
|
-
onChangeRight:
|
|
2272
|
+
onChangeLeft: $,
|
|
2273
|
+
onChangeRight: j,
|
|
2274
2274
|
onClickArrowDown: F,
|
|
2275
|
-
onClickCalendar:
|
|
2276
|
-
onFocusLeft:
|
|
2275
|
+
onClickCalendar: z,
|
|
2276
|
+
onFocusLeft: G,
|
|
2277
2277
|
onFocusRight: x,
|
|
2278
|
-
onClickLeft:
|
|
2278
|
+
onClickLeft: G,
|
|
2279
2279
|
onClickRight: x,
|
|
2280
2280
|
inputRefLeft: p,
|
|
2281
2281
|
inputRefRight: D,
|
|
2282
|
-
valueRight:
|
|
2283
|
-
widthLeft:
|
|
2282
|
+
valueRight: ae ?? "",
|
|
2283
|
+
widthLeft: i,
|
|
2284
2284
|
widthRight: l,
|
|
2285
|
-
minLeft:
|
|
2286
|
-
maxLeft:
|
|
2287
|
-
variant:
|
|
2285
|
+
minLeft: c,
|
|
2286
|
+
maxLeft: u,
|
|
2287
|
+
variant: d
|
|
2288
2288
|
}
|
|
2289
2289
|
) }),
|
|
2290
2290
|
placement: Ve,
|
|
2291
|
-
open: m ||
|
|
2291
|
+
open: m || S,
|
|
2292
2292
|
onRequestClose: X,
|
|
2293
|
-
children: (oe ||
|
|
2293
|
+
children: (oe || ue) && /* @__PURE__ */ o(J, { children: oe ? /* @__PURE__ */ o(
|
|
2294
2294
|
Se,
|
|
2295
2295
|
{
|
|
2296
2296
|
statePerMonth: P,
|
|
2297
2297
|
onClickDay: U,
|
|
2298
2298
|
dateInFocus: w,
|
|
2299
|
-
setDateInFocus:
|
|
2299
|
+
setDateInFocus: k,
|
|
2300
2300
|
currentPanel: b,
|
|
2301
2301
|
setCurrentPanel: v,
|
|
2302
|
-
minDate:
|
|
2303
|
-
maxDate:
|
|
2302
|
+
minDate: c,
|
|
2303
|
+
maxDate: u
|
|
2304
2304
|
}
|
|
2305
|
-
) :
|
|
2305
|
+
) : ue ? /* @__PURE__ */ _(J, { children: [
|
|
2306
2306
|
/* @__PURE__ */ o(J, { overflow: "hidden", height: "250px", children: /* @__PURE__ */ o(
|
|
2307
2307
|
Cs,
|
|
2308
2308
|
{
|
|
2309
|
-
value:
|
|
2310
|
-
onValueChange:
|
|
2309
|
+
value: ae ?? "",
|
|
2310
|
+
onValueChange: A
|
|
2311
2311
|
}
|
|
2312
2312
|
) }),
|
|
2313
|
-
/* @__PURE__ */ o(
|
|
2314
|
-
/* @__PURE__ */ o(V, { justifyContent: "flex-end", children: /* @__PURE__ */ o(_e, { label: "Done", onClick:
|
|
2313
|
+
/* @__PURE__ */ o(Ie, {}),
|
|
2314
|
+
/* @__PURE__ */ o(V, { justifyContent: "flex-end", children: /* @__PURE__ */ o(_e, { label: "Done", onClick: T }) })
|
|
2315
2315
|
] }) : null })
|
|
2316
2316
|
}
|
|
2317
2317
|
) });
|
|
2318
|
-
},
|
|
2318
|
+
}, Rs = ({
|
|
2319
2319
|
value: e,
|
|
2320
2320
|
onValueChange: t,
|
|
2321
2321
|
year: n
|
|
@@ -2327,12 +2327,12 @@ const eo = ({
|
|
|
2327
2327
|
onValueChange: t,
|
|
2328
2328
|
initialLastYear: n
|
|
2329
2329
|
}) => {
|
|
2330
|
-
const [r, s] =
|
|
2331
|
-
const
|
|
2332
|
-
return wn(
|
|
2330
|
+
const [r, s] = R(() => e ? e + 4 : n ?? (/* @__PURE__ */ new Date()).getFullYear() + 4), a = I(() => {
|
|
2331
|
+
const c = r - 11;
|
|
2332
|
+
return wn(It(c, r + 1), 3);
|
|
2333
2333
|
}, [r]);
|
|
2334
|
-
return
|
|
2335
|
-
s((
|
|
2334
|
+
return re(() => {
|
|
2335
|
+
s((c) => Ts(e, c));
|
|
2336
2336
|
}, [e]), /* @__PURE__ */ _(V, { children: [
|
|
2337
2337
|
/* @__PURE__ */ o(J, { justifyContent: "center", children: /* @__PURE__ */ o(
|
|
2338
2338
|
Z,
|
|
@@ -2341,15 +2341,15 @@ const eo = ({
|
|
|
2341
2341
|
onClick: () => s(r - 3)
|
|
2342
2342
|
}
|
|
2343
2343
|
) }),
|
|
2344
|
-
/* @__PURE__ */ o(J, { gap: 1, children: a.map((
|
|
2345
|
-
|
|
2344
|
+
/* @__PURE__ */ o(J, { gap: 1, children: a.map((c) => /* @__PURE__ */ o(V, { gap: 1, children: c.map((i) => /* @__PURE__ */ o(
|
|
2345
|
+
Rs,
|
|
2346
2346
|
{
|
|
2347
|
-
year:
|
|
2347
|
+
year: i,
|
|
2348
2348
|
onValueChange: t,
|
|
2349
2349
|
value: e
|
|
2350
2350
|
},
|
|
2351
|
-
|
|
2352
|
-
)) },
|
|
2351
|
+
i
|
|
2352
|
+
)) }, c[0])) }),
|
|
2353
2353
|
/* @__PURE__ */ o(J, { justifyContent: "center", children: /* @__PURE__ */ o(
|
|
2354
2354
|
Z,
|
|
2355
2355
|
{
|
|
@@ -2358,7 +2358,7 @@ const eo = ({
|
|
|
2358
2358
|
}
|
|
2359
2359
|
) })
|
|
2360
2360
|
] });
|
|
2361
|
-
},
|
|
2361
|
+
}, Ts = (e, t) => {
|
|
2362
2362
|
if (e == null)
|
|
2363
2363
|
return t;
|
|
2364
2364
|
if (e > t) {
|
|
@@ -2372,17 +2372,17 @@ const eo = ({
|
|
|
2372
2372
|
}
|
|
2373
2373
|
return t;
|
|
2374
2374
|
}, xs = (e, t, n, r, s) => {
|
|
2375
|
-
|
|
2375
|
+
re(
|
|
2376
2376
|
function() {
|
|
2377
2377
|
e && n(e);
|
|
2378
2378
|
},
|
|
2379
2379
|
[e, n]
|
|
2380
|
-
),
|
|
2380
|
+
), re(
|
|
2381
2381
|
function() {
|
|
2382
2382
|
t && n(t);
|
|
2383
2383
|
},
|
|
2384
2384
|
[t, n]
|
|
2385
|
-
),
|
|
2385
|
+
), re(
|
|
2386
2386
|
function() {
|
|
2387
2387
|
r.current && (e ? r.current.valueAsDate = new Date(
|
|
2388
2388
|
Date.UTC(
|
|
@@ -2393,7 +2393,7 @@ const eo = ({
|
|
|
2393
2393
|
) : r.current.valueAsDate = null);
|
|
2394
2394
|
},
|
|
2395
2395
|
[e, r]
|
|
2396
|
-
),
|
|
2396
|
+
), re(
|
|
2397
2397
|
function() {
|
|
2398
2398
|
s.current && (t ? s.current.valueAsDate = new Date(
|
|
2399
2399
|
Date.UTC(
|
|
@@ -2409,8 +2409,8 @@ const eo = ({
|
|
|
2409
2409
|
setDateInFocus: r,
|
|
2410
2410
|
showCalendarInternal: s,
|
|
2411
2411
|
hideCalendarInternal: a,
|
|
2412
|
-
setFirstFocusedInput:
|
|
2413
|
-
setCurrentPanel:
|
|
2412
|
+
setFirstFocusedInput: c,
|
|
2413
|
+
setCurrentPanel: i
|
|
2414
2414
|
}) => {
|
|
2415
2415
|
const l = y(
|
|
2416
2416
|
(g) => {
|
|
@@ -2420,7 +2420,7 @@ const eo = ({
|
|
|
2420
2420
|
});
|
|
2421
2421
|
},
|
|
2422
2422
|
[n, t]
|
|
2423
|
-
),
|
|
2423
|
+
), u = y(
|
|
2424
2424
|
(g) => {
|
|
2425
2425
|
g.target.value[0] !== "0" && n?.({
|
|
2426
2426
|
startDate: e,
|
|
@@ -2428,62 +2428,62 @@ const eo = ({
|
|
|
2428
2428
|
});
|
|
2429
2429
|
},
|
|
2430
2430
|
[n, e]
|
|
2431
|
-
),
|
|
2431
|
+
), d = y(
|
|
2432
2432
|
(g) => {
|
|
2433
|
-
g != null ? r(g) : r(e || t || /* @__PURE__ */ new Date()),
|
|
2433
|
+
g != null ? r(g) : r(e || t || /* @__PURE__ */ new Date()), i("calendar"), s();
|
|
2434
2434
|
},
|
|
2435
|
-
[e, t,
|
|
2435
|
+
[e, t, i, s, r]
|
|
2436
2436
|
), h = y(() => {
|
|
2437
|
-
|
|
2438
|
-
}, [
|
|
2437
|
+
c(void 0), a();
|
|
2438
|
+
}, [c, a]);
|
|
2439
2439
|
return {
|
|
2440
2440
|
inputLeftChangeHandler: l,
|
|
2441
|
-
inputRightChangeHandler:
|
|
2441
|
+
inputRightChangeHandler: u,
|
|
2442
2442
|
hideCalendar: h,
|
|
2443
2443
|
setDateInFocus: r,
|
|
2444
|
-
setCurrentPanel:
|
|
2445
|
-
showCalendar:
|
|
2444
|
+
setCurrentPanel: i,
|
|
2445
|
+
showCalendar: d
|
|
2446
2446
|
};
|
|
2447
|
-
},
|
|
2448
|
-
const [n, r, s] = pt(!1), [a,
|
|
2447
|
+
}, Ns = (e, t) => {
|
|
2448
|
+
const [n, r, s] = pt(!1), [a, c] = R(void 0), [i, l] = R("startDate"), [u, d] = R(() => (i === "startDate" ? e : i === "endDate" ? t : void 0) ?? /* @__PURE__ */ new Date()), [h, g] = R("calendar");
|
|
2449
2449
|
return {
|
|
2450
2450
|
isCalendarVisible: n,
|
|
2451
2451
|
showCalendarInternal: r,
|
|
2452
2452
|
hideCalendarInternal: s,
|
|
2453
2453
|
firstFocusedInput: a,
|
|
2454
|
-
setFirstFocusedInput:
|
|
2455
|
-
focusedInput:
|
|
2454
|
+
setFirstFocusedInput: c,
|
|
2455
|
+
focusedInput: i,
|
|
2456
2456
|
setFocusedInput: l,
|
|
2457
|
-
dateInFocus:
|
|
2458
|
-
setDateInFocus:
|
|
2457
|
+
dateInFocus: u,
|
|
2458
|
+
setDateInFocus: d,
|
|
2459
2459
|
currentPanel: h,
|
|
2460
2460
|
setCurrentPanel: g
|
|
2461
2461
|
};
|
|
2462
|
-
},
|
|
2463
|
-
firstFocusedInput:
|
|
2462
|
+
}, Bs = (e, t, n, r, s, a, c, {
|
|
2463
|
+
firstFocusedInput: i,
|
|
2464
2464
|
setFirstFocusedInput: l,
|
|
2465
|
-
isCalendarVisible:
|
|
2466
|
-
setFocusedInput:
|
|
2465
|
+
isCalendarVisible: u,
|
|
2466
|
+
setFocusedInput: d,
|
|
2467
2467
|
focusedInput: h,
|
|
2468
2468
|
setCurrentPanel: g,
|
|
2469
2469
|
setDateInFocus: f
|
|
2470
2470
|
}) => {
|
|
2471
2471
|
const p = y(() => {
|
|
2472
|
-
|
|
2472
|
+
i == null && l("startDate"), d("startDate"), u ? e != null && f(e) : a(e);
|
|
2473
2473
|
}, [
|
|
2474
|
-
|
|
2475
|
-
u,
|
|
2474
|
+
i,
|
|
2476
2475
|
d,
|
|
2476
|
+
u,
|
|
2477
2477
|
e,
|
|
2478
2478
|
l,
|
|
2479
2479
|
a,
|
|
2480
2480
|
f
|
|
2481
2481
|
]), D = y(() => {
|
|
2482
|
-
|
|
2482
|
+
i == null && l("endDate"), d("endDate"), u ? t != null && f(t) : a(t);
|
|
2483
2483
|
}, [
|
|
2484
|
-
|
|
2485
|
-
u,
|
|
2484
|
+
i,
|
|
2486
2485
|
d,
|
|
2486
|
+
u,
|
|
2487
2487
|
t,
|
|
2488
2488
|
l,
|
|
2489
2489
|
a,
|
|
@@ -2493,48 +2493,48 @@ const eo = ({
|
|
|
2493
2493
|
h === "startDate" ? t != null && Q(w.date, t) ? (n?.({
|
|
2494
2494
|
startDate: w.date,
|
|
2495
2495
|
endDate: void 0
|
|
2496
|
-
}),
|
|
2496
|
+
}), d("endDate"), s.current?.focus()) : (n?.({
|
|
2497
2497
|
startDate: w.date,
|
|
2498
2498
|
endDate: t
|
|
2499
|
-
}),
|
|
2499
|
+
}), i === "startDate" ? (d("endDate"), s.current?.focus()) : setTimeout(c, 50)) : h === "endDate" && (e ? Q(e, w.date) ? (n?.({
|
|
2500
2500
|
startDate: w.date,
|
|
2501
2501
|
endDate: void 0
|
|
2502
|
-
}),
|
|
2502
|
+
}), d("endDate"), s.current?.focus()) : (n?.({
|
|
2503
2503
|
startDate: e,
|
|
2504
2504
|
endDate: w.date
|
|
2505
|
-
}), setTimeout(
|
|
2505
|
+
}), setTimeout(c, 50)) : (n?.({
|
|
2506
2506
|
startDate: e,
|
|
2507
2507
|
endDate: w.date
|
|
2508
|
-
}),
|
|
2508
|
+
}), d("startDate"), r.current?.focus()));
|
|
2509
2509
|
},
|
|
2510
2510
|
[
|
|
2511
2511
|
h,
|
|
2512
2512
|
n,
|
|
2513
2513
|
t,
|
|
2514
|
-
c,
|
|
2515
|
-
u,
|
|
2516
|
-
s,
|
|
2517
2514
|
i,
|
|
2515
|
+
d,
|
|
2516
|
+
s,
|
|
2517
|
+
c,
|
|
2518
2518
|
e,
|
|
2519
2519
|
r
|
|
2520
2520
|
]
|
|
2521
2521
|
), v = y(() => {
|
|
2522
2522
|
g("presets"), a();
|
|
2523
2523
|
}, [g, a]), b = y(() => {
|
|
2524
|
-
|
|
2524
|
+
u ? c() : (d("startDate"), l("startDate"), r.current?.focus(), g("calendar"), a());
|
|
2525
2525
|
}, [
|
|
2526
|
-
d,
|
|
2527
|
-
i,
|
|
2528
2526
|
u,
|
|
2527
|
+
c,
|
|
2528
|
+
d,
|
|
2529
2529
|
l,
|
|
2530
2530
|
r,
|
|
2531
2531
|
g,
|
|
2532
2532
|
a
|
|
2533
2533
|
]), m = y(
|
|
2534
2534
|
(w) => {
|
|
2535
|
-
w.key === "Escape" &&
|
|
2535
|
+
w.key === "Escape" && c();
|
|
2536
2536
|
},
|
|
2537
|
-
[
|
|
2537
|
+
[c]
|
|
2538
2538
|
);
|
|
2539
2539
|
return {
|
|
2540
2540
|
onFocusLeft: p,
|
|
@@ -2552,11 +2552,11 @@ function so({
|
|
|
2552
2552
|
onBlur: r,
|
|
2553
2553
|
onEnter: s,
|
|
2554
2554
|
onEsc: a,
|
|
2555
|
-
minDate:
|
|
2556
|
-
maxDate:
|
|
2555
|
+
minDate: c,
|
|
2556
|
+
maxDate: i = je,
|
|
2557
2557
|
calendarProps: l,
|
|
2558
|
-
widthLeft:
|
|
2559
|
-
widthRight:
|
|
2558
|
+
widthLeft: u = 128,
|
|
2559
|
+
widthRight: d = 128,
|
|
2560
2560
|
firstMonthInMonthPicker: h,
|
|
2561
2561
|
numMonthsInMonthPicker: g,
|
|
2562
2562
|
variant: f,
|
|
@@ -2565,54 +2565,54 @@ function so({
|
|
|
2565
2565
|
appendTo: C,
|
|
2566
2566
|
renderBelowCalendar: v
|
|
2567
2567
|
}) {
|
|
2568
|
-
const { startDate: b, endDate: m } = e || {}, w =
|
|
2569
|
-
dateInFocus:
|
|
2568
|
+
const { startDate: b, endDate: m } = e || {}, w = O(null), k = O(null), S = Ns(b, m), {
|
|
2569
|
+
dateInFocus: T,
|
|
2570
2570
|
setDateInFocus: N,
|
|
2571
|
-
isCalendarVisible:
|
|
2571
|
+
isCalendarVisible: E,
|
|
2572
2572
|
currentPanel: M,
|
|
2573
|
-
setCurrentPanel:
|
|
2574
|
-
} =
|
|
2575
|
-
showCalendar:
|
|
2576
|
-
hideCalendar:
|
|
2577
|
-
inputLeftChangeHandler:
|
|
2578
|
-
inputRightChangeHandler:
|
|
2579
|
-
} = _s(b, m, t,
|
|
2580
|
-
onKeyDownHandler:
|
|
2573
|
+
setCurrentPanel: L
|
|
2574
|
+
} = S, {
|
|
2575
|
+
showCalendar: $,
|
|
2576
|
+
hideCalendar: j,
|
|
2577
|
+
inputLeftChangeHandler: A,
|
|
2578
|
+
inputRightChangeHandler: H
|
|
2579
|
+
} = _s(b, m, t, S), {
|
|
2580
|
+
onKeyDownHandler: q,
|
|
2581
2581
|
onFocusRight: x,
|
|
2582
|
-
onFocusLeft:
|
|
2582
|
+
onFocusLeft: G,
|
|
2583
2583
|
onClickDay: U,
|
|
2584
|
-
onClickCalendarButton:
|
|
2584
|
+
onClickCalendarButton: z,
|
|
2585
2585
|
onClickArrowButton: F
|
|
2586
|
-
} =
|
|
2586
|
+
} = Bs(
|
|
2587
2587
|
b,
|
|
2588
2588
|
m,
|
|
2589
2589
|
t,
|
|
2590
2590
|
w,
|
|
2591
|
-
|
|
2592
|
-
W,
|
|
2591
|
+
k,
|
|
2593
2592
|
$,
|
|
2594
|
-
|
|
2593
|
+
j,
|
|
2594
|
+
S
|
|
2595
2595
|
);
|
|
2596
2596
|
xs(
|
|
2597
2597
|
b,
|
|
2598
2598
|
m,
|
|
2599
2599
|
N,
|
|
2600
2600
|
w,
|
|
2601
|
-
|
|
2601
|
+
k
|
|
2602
2602
|
);
|
|
2603
|
-
const P =
|
|
2603
|
+
const P = I(
|
|
2604
2604
|
() => b && m && Q(b, m),
|
|
2605
2605
|
[b, m]
|
|
2606
|
-
), X =
|
|
2606
|
+
), X = I(
|
|
2607
2607
|
() => wr(
|
|
2608
2608
|
l?.statePerMonth,
|
|
2609
2609
|
b,
|
|
2610
2610
|
m,
|
|
2611
|
-
|
|
2611
|
+
T
|
|
2612
2612
|
),
|
|
2613
|
-
[l?.statePerMonth, b, m,
|
|
2613
|
+
[l?.statePerMonth, b, m, T]
|
|
2614
2614
|
);
|
|
2615
|
-
return /* @__PURE__ */ o(
|
|
2615
|
+
return /* @__PURE__ */ o(B, { onKeyDown: q, children: /* @__PURE__ */ o(
|
|
2616
2616
|
$e,
|
|
2617
2617
|
{
|
|
2618
2618
|
hideArrow: !0,
|
|
@@ -2620,7 +2620,7 @@ function so({
|
|
|
2620
2620
|
returnFocus: !1,
|
|
2621
2621
|
zIndex: D,
|
|
2622
2622
|
appendTo: C,
|
|
2623
|
-
renderTrigger: (
|
|
2623
|
+
renderTrigger: (ae) => /* @__PURE__ */ o(B, { ...ae, children: /* @__PURE__ */ o(
|
|
2624
2624
|
xn,
|
|
2625
2625
|
{
|
|
2626
2626
|
autoFocusLeft: n,
|
|
@@ -2633,41 +2633,41 @@ function so({
|
|
|
2633
2633
|
typeRight: "date",
|
|
2634
2634
|
placeholderLeft: "Start date",
|
|
2635
2635
|
placeholderRight: "End date",
|
|
2636
|
-
onChangeLeft:
|
|
2637
|
-
onChangeRight:
|
|
2636
|
+
onChangeLeft: A,
|
|
2637
|
+
onChangeRight: H,
|
|
2638
2638
|
onClickArrowDown: F,
|
|
2639
|
-
onClickCalendar:
|
|
2640
|
-
onFocusLeft:
|
|
2639
|
+
onClickCalendar: z,
|
|
2640
|
+
onFocusLeft: G,
|
|
2641
2641
|
onFocusRight: x,
|
|
2642
|
-
onClickLeft:
|
|
2642
|
+
onClickLeft: G,
|
|
2643
2643
|
onClickRight: x,
|
|
2644
2644
|
inputRefLeft: w,
|
|
2645
|
-
inputRefRight:
|
|
2645
|
+
inputRefRight: k,
|
|
2646
2646
|
variant: P ? "error" : f,
|
|
2647
|
-
widthLeft:
|
|
2648
|
-
widthRight:
|
|
2649
|
-
minLeft:
|
|
2650
|
-
maxLeft:
|
|
2651
|
-
minRight:
|
|
2652
|
-
maxRight:
|
|
2647
|
+
widthLeft: u,
|
|
2648
|
+
widthRight: d,
|
|
2649
|
+
minLeft: c,
|
|
2650
|
+
maxLeft: i,
|
|
2651
|
+
minRight: c,
|
|
2652
|
+
maxRight: i
|
|
2653
2653
|
}
|
|
2654
2654
|
) }),
|
|
2655
2655
|
placement: Ve,
|
|
2656
|
-
onRequestClose:
|
|
2657
|
-
open:
|
|
2656
|
+
onRequestClose: j,
|
|
2657
|
+
open: E,
|
|
2658
2658
|
children: /* @__PURE__ */ _(J, { children: [
|
|
2659
2659
|
/* @__PURE__ */ o(
|
|
2660
2660
|
Se,
|
|
2661
2661
|
{
|
|
2662
2662
|
onClickDay: U,
|
|
2663
|
-
dateInFocus:
|
|
2663
|
+
dateInFocus: T,
|
|
2664
2664
|
firstMonthInMonthPicker: h,
|
|
2665
2665
|
numMonthsInMonthPicker: g,
|
|
2666
2666
|
setDateInFocus: N,
|
|
2667
2667
|
currentPanel: M,
|
|
2668
|
-
setCurrentPanel:
|
|
2669
|
-
minDate:
|
|
2670
|
-
maxDate:
|
|
2668
|
+
setCurrentPanel: L,
|
|
2669
|
+
minDate: c,
|
|
2670
|
+
maxDate: i,
|
|
2671
2671
|
...l,
|
|
2672
2672
|
statePerMonth: X
|
|
2673
2673
|
}
|
|
@@ -2684,11 +2684,11 @@ const wt = ({
|
|
|
2684
2684
|
mask: r,
|
|
2685
2685
|
ref: s,
|
|
2686
2686
|
pipe: a,
|
|
2687
|
-
value:
|
|
2688
|
-
guide:
|
|
2687
|
+
value: c,
|
|
2688
|
+
guide: i,
|
|
2689
2689
|
keepCharPositions: l,
|
|
2690
|
-
placeholderChar:
|
|
2691
|
-
showMask:
|
|
2690
|
+
placeholderChar: u,
|
|
2691
|
+
showMask: d,
|
|
2692
2692
|
calendarSize: h,
|
|
2693
2693
|
onFocus: g,
|
|
2694
2694
|
onBlur: f,
|
|
@@ -2700,29 +2700,29 @@ const wt = ({
|
|
|
2700
2700
|
autoFocus: m,
|
|
2701
2701
|
...w
|
|
2702
2702
|
}) => {
|
|
2703
|
-
const
|
|
2703
|
+
const k = O(null), [S, T] = R(!1), N = s ?? k, { onChange: E } = br(
|
|
2704
2704
|
N,
|
|
2705
2705
|
e,
|
|
2706
2706
|
t,
|
|
2707
2707
|
r,
|
|
2708
2708
|
a,
|
|
2709
|
-
i,
|
|
2710
2709
|
c,
|
|
2710
|
+
i,
|
|
2711
2711
|
l,
|
|
2712
|
-
d,
|
|
2713
2712
|
u,
|
|
2714
|
-
|
|
2713
|
+
d,
|
|
2714
|
+
S
|
|
2715
2715
|
), M = y(
|
|
2716
|
-
(
|
|
2717
|
-
g?.(
|
|
2716
|
+
(j) => {
|
|
2717
|
+
g?.(j), T(!0);
|
|
2718
2718
|
},
|
|
2719
2719
|
[g]
|
|
2720
|
-
),
|
|
2721
|
-
(
|
|
2722
|
-
f?.(
|
|
2720
|
+
), L = y(
|
|
2721
|
+
(j) => {
|
|
2722
|
+
f?.(j), T(!1);
|
|
2723
2723
|
},
|
|
2724
2724
|
[f]
|
|
2725
|
-
),
|
|
2725
|
+
), $ = S ? D : p ?? D;
|
|
2726
2726
|
return b === "standard" ? /* @__PURE__ */ o(qn, { text: v ?? "", children: /* @__PURE__ */ o(
|
|
2727
2727
|
pe,
|
|
2728
2728
|
{
|
|
@@ -2731,12 +2731,12 @@ const wt = ({
|
|
|
2731
2731
|
readOnly: n,
|
|
2732
2732
|
inputMode: "numeric",
|
|
2733
2733
|
"aria-live": "polite",
|
|
2734
|
-
value: (
|
|
2734
|
+
value: (S ? c : C) ?? "",
|
|
2735
2735
|
inputRef: N,
|
|
2736
|
-
placeholder:
|
|
2736
|
+
placeholder: $,
|
|
2737
2737
|
onFocus: M,
|
|
2738
|
-
onBlur:
|
|
2739
|
-
onChange:
|
|
2738
|
+
onBlur: L,
|
|
2739
|
+
onChange: E,
|
|
2740
2740
|
width: en(h),
|
|
2741
2741
|
alwaysShowPlaceholder: !0
|
|
2742
2742
|
}
|
|
@@ -2749,12 +2749,12 @@ const wt = ({
|
|
|
2749
2749
|
inputMode: "numeric",
|
|
2750
2750
|
label: v,
|
|
2751
2751
|
"aria-live": "polite",
|
|
2752
|
-
value: (
|
|
2752
|
+
value: (S ? c : C) ?? "",
|
|
2753
2753
|
ref: N,
|
|
2754
|
-
placeholder:
|
|
2754
|
+
placeholder: $,
|
|
2755
2755
|
onFocus: M,
|
|
2756
|
-
onBlur:
|
|
2757
|
-
onChange:
|
|
2756
|
+
onBlur: L,
|
|
2757
|
+
onChange: E,
|
|
2758
2758
|
width: en(h),
|
|
2759
2759
|
size: h === "large" ? "large" : "medium"
|
|
2760
2760
|
}
|
|
@@ -2772,7 +2772,7 @@ const wt = ({
|
|
|
2772
2772
|
default:
|
|
2773
2773
|
return Ct(e, "168px");
|
|
2774
2774
|
}
|
|
2775
|
-
}, Es = [/[1-2]/, /\d/, /\d/, /\d/], Ls = [/[0-1]/, /\d/], As = [/[0-3]/, /\d/],
|
|
2775
|
+
}, Es = [/[1-2]/, /\d/, /\d/, /\d/], Ls = [/[0-1]/, /\d/], As = [/[0-3]/, /\d/], Nn = (e) => Fs(e).flatMap(Ps), Ps = (e) => {
|
|
2776
2776
|
switch (e) {
|
|
2777
2777
|
case "yyyy":
|
|
2778
2778
|
return Es;
|
|
@@ -2792,24 +2792,24 @@ const wt = ({
|
|
|
2792
2792
|
for (let r = 1; r < e.length; r++)
|
|
2793
2793
|
e[r] !== e[r - 1] ? (t.push(n), n = e[r]) : n += e[r];
|
|
2794
2794
|
return t.push(n), t;
|
|
2795
|
-
},
|
|
2795
|
+
}, Be = (e) => {
|
|
2796
2796
|
const n = new Intl.DateTimeFormat(e, { dateStyle: "short" }).formatToParts(/* @__PURE__ */ new Date()), r = {
|
|
2797
2797
|
year: "yyyy",
|
|
2798
2798
|
month: "MM",
|
|
2799
2799
|
day: "dd"
|
|
2800
2800
|
};
|
|
2801
2801
|
return n.map((s) => r[s.type] || s.value).join("");
|
|
2802
|
-
},
|
|
2802
|
+
}, ie = (e, t, n) => {
|
|
2803
2803
|
const r = Mn(
|
|
2804
2804
|
t,
|
|
2805
2805
|
n?.matchLanguage ?? !1,
|
|
2806
2806
|
n?.fallbackLocaleCode ?? Sn
|
|
2807
|
-
), s =
|
|
2807
|
+
), s = Te(r);
|
|
2808
2808
|
if (s == null)
|
|
2809
2809
|
return;
|
|
2810
2810
|
const a = ve(
|
|
2811
2811
|
e,
|
|
2812
|
-
|
|
2812
|
+
Be(r),
|
|
2813
2813
|
n?.referenceDate ?? /* @__PURE__ */ new Date(),
|
|
2814
2814
|
{
|
|
2815
2815
|
locale: s
|
|
@@ -2823,11 +2823,11 @@ const wt = ({
|
|
|
2823
2823
|
n?.matchLanguage ?? !1,
|
|
2824
2824
|
n?.fallbackLocaleCode ?? Sn
|
|
2825
2825
|
);
|
|
2826
|
-
return
|
|
2827
|
-
locale:
|
|
2826
|
+
return K(e, Be(r), {
|
|
2827
|
+
locale: Te(r)
|
|
2828
2828
|
});
|
|
2829
2829
|
}, yt = (e, t) => {
|
|
2830
|
-
const n =
|
|
2830
|
+
const n = ie(e, t);
|
|
2831
2831
|
if (n != null)
|
|
2832
2832
|
return be(n, t);
|
|
2833
2833
|
}, Ys = "_navBarButton_b3x3w_1", Hs = "_selected_b3x3w_14", tn = {
|
|
@@ -2841,7 +2841,7 @@ st(
|
|
|
2841
2841
|
{
|
|
2842
2842
|
...n,
|
|
2843
2843
|
ref: r,
|
|
2844
|
-
className:
|
|
2844
|
+
className: se(
|
|
2845
2845
|
tn.navBarButton,
|
|
2846
2846
|
e && tn.selected,
|
|
2847
2847
|
t
|
|
@@ -2861,7 +2861,7 @@ st(
|
|
|
2861
2861
|
{
|
|
2862
2862
|
...n,
|
|
2863
2863
|
ref: r,
|
|
2864
|
-
className:
|
|
2864
|
+
className: se(
|
|
2865
2865
|
nn.navBarLink,
|
|
2866
2866
|
e && nn.selected,
|
|
2867
2867
|
t
|
|
@@ -2882,24 +2882,24 @@ st(function({
|
|
|
2882
2882
|
labelClassName: r,
|
|
2883
2883
|
iconClassName: s,
|
|
2884
2884
|
icon: a = Qn,
|
|
2885
|
-
...
|
|
2886
|
-
},
|
|
2885
|
+
...c
|
|
2886
|
+
}, i) {
|
|
2887
2887
|
const l = e > 1;
|
|
2888
2888
|
return /* @__PURE__ */ o(
|
|
2889
2889
|
Jn,
|
|
2890
2890
|
{
|
|
2891
|
-
...
|
|
2892
|
-
ref:
|
|
2891
|
+
...c,
|
|
2892
|
+
ref: i,
|
|
2893
2893
|
leftIcon: a,
|
|
2894
|
-
className:
|
|
2894
|
+
className: se(
|
|
2895
2895
|
Le.navBarNotificationButton,
|
|
2896
2896
|
t && Le.unread,
|
|
2897
2897
|
l && Le.hasCount,
|
|
2898
2898
|
n
|
|
2899
2899
|
),
|
|
2900
2900
|
label: l ? String(e) : void 0,
|
|
2901
|
-
labelClassName:
|
|
2902
|
-
iconClassName:
|
|
2901
|
+
labelClassName: se(r, Le.label),
|
|
2902
|
+
iconClassName: se(s, Le.icon)
|
|
2903
2903
|
}
|
|
2904
2904
|
);
|
|
2905
2905
|
});
|
|
@@ -2924,7 +2924,7 @@ const rn = [
|
|
|
2924
2924
|
"tablet",
|
|
2925
2925
|
"tablet-wide",
|
|
2926
2926
|
"desktop"
|
|
2927
|
-
],
|
|
2927
|
+
], Bn = () => {
|
|
2928
2928
|
const e = qe({
|
|
2929
2929
|
query: "(max-width: 768px)"
|
|
2930
2930
|
}), t = qe({
|
|
@@ -2942,11 +2942,11 @@ const rn = [
|
|
|
2942
2942
|
startDateLabel: r = "From",
|
|
2943
2943
|
endDateLabel: s = "To",
|
|
2944
2944
|
onFocus: a,
|
|
2945
|
-
onBlur:
|
|
2946
|
-
calendarSize:
|
|
2945
|
+
onBlur: c,
|
|
2946
|
+
calendarSize: i,
|
|
2947
2947
|
startDateRef: l,
|
|
2948
|
-
endDateRef:
|
|
2949
|
-
placeholderWhenBlurredStartDate:
|
|
2948
|
+
endDateRef: u,
|
|
2949
|
+
placeholderWhenBlurredStartDate: d,
|
|
2950
2950
|
placeholderWhenBlurredEndDate: h,
|
|
2951
2951
|
valueWhenBlurredStartDate: g,
|
|
2952
2952
|
valueWhenBlurredEndDate: f,
|
|
@@ -2955,11 +2955,11 @@ const rn = [
|
|
|
2955
2955
|
autoFocusStartDate: C,
|
|
2956
2956
|
autoFocusEndDate: v
|
|
2957
2957
|
}) => {
|
|
2958
|
-
const { deviceSize: b } =
|
|
2959
|
-
const
|
|
2958
|
+
const { deviceSize: b } = Bn(), m = D && !En(b, "tablet"), { mask: w, placeholder: k } = I(() => {
|
|
2959
|
+
const S = Be(n);
|
|
2960
2960
|
return {
|
|
2961
|
-
mask:
|
|
2962
|
-
placeholder:
|
|
2961
|
+
mask: Nn(S),
|
|
2962
|
+
placeholder: S.toLowerCase()
|
|
2963
2963
|
};
|
|
2964
2964
|
}, [n]);
|
|
2965
2965
|
return /* @__PURE__ */ _(V, { children: [
|
|
@@ -2969,24 +2969,24 @@ const rn = [
|
|
|
2969
2969
|
mask: w,
|
|
2970
2970
|
ref: l,
|
|
2971
2971
|
value: e?.startDate,
|
|
2972
|
-
onValueChange: (
|
|
2973
|
-
t?.({ startDate:
|
|
2972
|
+
onValueChange: (S) => {
|
|
2973
|
+
t?.({ startDate: S });
|
|
2974
2974
|
},
|
|
2975
|
-
onBlur: (
|
|
2976
|
-
const
|
|
2977
|
-
|
|
2975
|
+
onBlur: (S) => {
|
|
2976
|
+
const T = yt(
|
|
2977
|
+
S.target.value,
|
|
2978
2978
|
n
|
|
2979
2979
|
);
|
|
2980
|
-
|
|
2980
|
+
T && T !== e?.startDate && t?.({ startDate: T }), c?.();
|
|
2981
2981
|
},
|
|
2982
2982
|
onFocus: () => a?.("startDate"),
|
|
2983
2983
|
autoFocus: C,
|
|
2984
2984
|
label: r,
|
|
2985
2985
|
borderRadiusVariant: "onlyLeft",
|
|
2986
|
-
placeholder:
|
|
2987
|
-
placeholderWhenBlurred:
|
|
2986
|
+
placeholder: k,
|
|
2987
|
+
placeholderWhenBlurred: d,
|
|
2988
2988
|
valueWhenBlurred: g,
|
|
2989
|
-
calendarSize:
|
|
2989
|
+
calendarSize: i,
|
|
2990
2990
|
variant: p,
|
|
2991
2991
|
readOnly: m
|
|
2992
2992
|
}
|
|
@@ -2995,24 +2995,24 @@ const rn = [
|
|
|
2995
2995
|
wt,
|
|
2996
2996
|
{
|
|
2997
2997
|
mask: w,
|
|
2998
|
-
ref:
|
|
2998
|
+
ref: u,
|
|
2999
2999
|
value: e?.endDate,
|
|
3000
|
-
onValueChange: (
|
|
3001
|
-
onBlur: (
|
|
3002
|
-
const
|
|
3003
|
-
|
|
3000
|
+
onValueChange: (S) => t?.({ endDate: S }),
|
|
3001
|
+
onBlur: (S) => {
|
|
3002
|
+
const T = yt(
|
|
3003
|
+
S.target.value,
|
|
3004
3004
|
n
|
|
3005
3005
|
);
|
|
3006
|
-
|
|
3006
|
+
T && T !== e?.endDate && t?.({ endDate: T }), c?.();
|
|
3007
3007
|
},
|
|
3008
3008
|
onFocus: () => a?.("endDate"),
|
|
3009
3009
|
autoFocus: v,
|
|
3010
3010
|
label: s,
|
|
3011
3011
|
borderRadiusVariant: "onlyRight",
|
|
3012
|
-
placeholder:
|
|
3012
|
+
placeholder: k,
|
|
3013
3013
|
placeholderWhenBlurred: h,
|
|
3014
3014
|
valueWhenBlurred: f,
|
|
3015
|
-
calendarSize:
|
|
3015
|
+
calendarSize: i,
|
|
3016
3016
|
variant: p,
|
|
3017
3017
|
readOnly: m
|
|
3018
3018
|
}
|
|
@@ -3020,7 +3020,7 @@ const rn = [
|
|
|
3020
3020
|
] });
|
|
3021
3021
|
}, vt = (e, t, n) => {
|
|
3022
3022
|
const r = or(e, t) ? "" : " y";
|
|
3023
|
-
return n.code.startsWith("en") ?
|
|
3023
|
+
return n.code.startsWith("en") ? K(e, "eee MMM d" + r, { locale: n }).replace(".", "") : K(e, "eee d MMM" + r, { locale: n }).replace(".", "");
|
|
3024
3024
|
};
|
|
3025
3025
|
function js(e, t, n) {
|
|
3026
3026
|
if (!e || !t || !n) return !1;
|
|
@@ -3039,46 +3039,46 @@ function zs(e, t, n) {
|
|
|
3039
3039
|
endDate: s
|
|
3040
3040
|
} : e;
|
|
3041
3041
|
}
|
|
3042
|
-
const An = (e, t, n, r, s, a,
|
|
3043
|
-
const
|
|
3044
|
-
() =>
|
|
3042
|
+
const An = (e, t, n, r, s, a, c, i, l) => {
|
|
3043
|
+
const u = Te(r), d = Tt(), h = xe(), g = O(null), f = I(
|
|
3044
|
+
() => Be(n),
|
|
3045
3045
|
[n]
|
|
3046
|
-
), p =
|
|
3047
|
-
() => e?.startDate?.length === f.length ?
|
|
3046
|
+
), p = I(
|
|
3047
|
+
() => e?.startDate?.length === f.length ? ie(e.startDate, n) : void 0,
|
|
3048
3048
|
[f.length, n, e?.startDate]
|
|
3049
|
-
), D =
|
|
3050
|
-
() => e?.endDate?.length === f.length ?
|
|
3049
|
+
), D = I(
|
|
3050
|
+
() => e?.endDate?.length === f.length ? ie(e.endDate, n) : void 0,
|
|
3051
3051
|
[f.length, n, e?.endDate]
|
|
3052
|
-
), C =
|
|
3053
|
-
() => p != null ? vt(p, h,
|
|
3054
|
-
[
|
|
3055
|
-
), v =
|
|
3056
|
-
() => D != null ? vt(D, h,
|
|
3057
|
-
[
|
|
3058
|
-
), [b, m] =
|
|
3052
|
+
), C = I(
|
|
3053
|
+
() => p != null ? vt(p, h, u) : void 0,
|
|
3054
|
+
[u, p, h]
|
|
3055
|
+
), v = I(
|
|
3056
|
+
() => D != null ? vt(D, h, u) : void 0,
|
|
3057
|
+
[u, D, h]
|
|
3058
|
+
), [b, m] = R(
|
|
3059
3059
|
s ?? p ?? /* @__PURE__ */ new Date()
|
|
3060
3060
|
), w = y(
|
|
3061
3061
|
(x) => {
|
|
3062
3062
|
me(x, h) || Q(x, h) ? m(x) : m(h);
|
|
3063
3063
|
},
|
|
3064
3064
|
[h]
|
|
3065
|
-
),
|
|
3065
|
+
), k = I(
|
|
3066
3066
|
() => ot(
|
|
3067
3067
|
b.getFullYear(),
|
|
3068
3068
|
b.getMonth(),
|
|
3069
|
-
|
|
3069
|
+
u
|
|
3070
3070
|
),
|
|
3071
|
-
[
|
|
3072
|
-
),
|
|
3071
|
+
[u, b]
|
|
3072
|
+
), S = I(() => at(
|
|
3073
3073
|
bn(
|
|
3074
3074
|
b,
|
|
3075
3075
|
{ month: "long", year: "numeric" },
|
|
3076
|
-
{ locale:
|
|
3076
|
+
{ locale: u.code }
|
|
3077
3077
|
)
|
|
3078
|
-
), [
|
|
3078
|
+
), [u, b]), T = I(() => me(h, b), [h, b]), [N, E] = R(), [M, L] = R("calendar"), $ = y(
|
|
3079
3079
|
(x) => {
|
|
3080
|
-
const
|
|
3081
|
-
|
|
3080
|
+
const G = x?.startDate?.length === f.length ? ie(x.startDate, n) : void 0, U = x?.endDate?.length === f.length ? ie(x.endDate, n) : void 0;
|
|
3081
|
+
G ? w(G) : U && w(U), t?.({
|
|
3082
3082
|
...e,
|
|
3083
3083
|
...x
|
|
3084
3084
|
});
|
|
@@ -3090,28 +3090,28 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3090
3090
|
w,
|
|
3091
3091
|
e
|
|
3092
3092
|
]
|
|
3093
|
-
),
|
|
3093
|
+
), j = I(
|
|
3094
3094
|
() => p && D ? Q(D, p) || Y(D, p) : !1,
|
|
3095
3095
|
[D, p]
|
|
3096
|
-
),
|
|
3096
|
+
), A = I(() => {
|
|
3097
3097
|
const x = a === "startDate" ? e?.endDate : e?.startDate;
|
|
3098
|
-
return x ?
|
|
3099
|
-
}, [a, n, e?.endDate, e?.startDate]),
|
|
3100
|
-
if (N &&
|
|
3098
|
+
return x ? ie(x, n) : void 0;
|
|
3099
|
+
}, [a, n, e?.endDate, e?.startDate]), H = I(() => {
|
|
3100
|
+
if (N && A) {
|
|
3101
3101
|
if (a === "endDate")
|
|
3102
3102
|
return "right";
|
|
3103
3103
|
if (a === "startDate")
|
|
3104
3104
|
return "left";
|
|
3105
3105
|
}
|
|
3106
|
-
}, [a,
|
|
3106
|
+
}, [a, A, N]);
|
|
3107
3107
|
return {
|
|
3108
3108
|
onClickDate: (x) => {
|
|
3109
3109
|
if (!(x.getFullYear() === b.getFullYear() && x.getMonth() === b.getMonth()))
|
|
3110
3110
|
return;
|
|
3111
|
-
const U = (
|
|
3111
|
+
const U = (z, F) => t?.(
|
|
3112
3112
|
zs(
|
|
3113
|
-
|
|
3114
|
-
(P) =>
|
|
3113
|
+
z,
|
|
3114
|
+
(P) => ie(P, n),
|
|
3115
3115
|
F
|
|
3116
3116
|
)
|
|
3117
3117
|
);
|
|
@@ -3121,40 +3121,40 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3121
3121
|
endDate: e?.endDate
|
|
3122
3122
|
},
|
|
3123
3123
|
"startDate"
|
|
3124
|
-
), e?.endDate ? (l?.(),
|
|
3124
|
+
), e?.endDate ? (l?.(), c(void 0), E(void 0)) : i("endDate")) : a === "endDate" ? (U(
|
|
3125
3125
|
{
|
|
3126
3126
|
startDate: e?.startDate,
|
|
3127
3127
|
endDate: be(x, n)
|
|
3128
3128
|
},
|
|
3129
3129
|
"endDate"
|
|
3130
|
-
), l?.(),
|
|
3130
|
+
), l?.(), c(void 0), E(void 0)) : p && D == null ? Ne(x, p) ? (t?.({
|
|
3131
3131
|
startDate: be(x, n),
|
|
3132
3132
|
endDate: void 0
|
|
3133
|
-
}),
|
|
3133
|
+
}), i("endDate")) : (t?.({
|
|
3134
3134
|
startDate: e?.startDate,
|
|
3135
3135
|
endDate: be(x, n)
|
|
3136
|
-
}), l?.(),
|
|
3136
|
+
}), l?.(), c(void 0), E(void 0)) : (U(
|
|
3137
3137
|
{
|
|
3138
3138
|
startDate: be(x, n),
|
|
3139
3139
|
endDate: void 0
|
|
3140
3140
|
},
|
|
3141
3141
|
"startDate"
|
|
3142
|
-
),
|
|
3142
|
+
), i("endDate"));
|
|
3143
3143
|
},
|
|
3144
|
-
onValueChangeByInputs:
|
|
3145
|
-
isValidDateRange:
|
|
3144
|
+
onValueChangeByInputs: $,
|
|
3145
|
+
isValidDateRange: j,
|
|
3146
3146
|
monthPickerButtonRef: g,
|
|
3147
|
-
calendarId:
|
|
3148
|
-
monthPickerButtonLabel:
|
|
3147
|
+
calendarId: d,
|
|
3148
|
+
monthPickerButtonLabel: S,
|
|
3149
3149
|
visiblePanel: M,
|
|
3150
|
-
setVisiblePanel:
|
|
3150
|
+
setVisiblePanel: L,
|
|
3151
3151
|
setVisibleMonth: m,
|
|
3152
|
-
visibleMonthData:
|
|
3153
|
-
todayIsInVisibleMonth:
|
|
3152
|
+
visibleMonthData: k,
|
|
3153
|
+
todayIsInVisibleMonth: T,
|
|
3154
3154
|
hoverDate: N,
|
|
3155
|
-
setHoverDate:
|
|
3156
|
-
hoverAnchor:
|
|
3157
|
-
hoverHighlightDirection:
|
|
3155
|
+
setHoverDate: E,
|
|
3156
|
+
hoverAnchor: A,
|
|
3157
|
+
hoverHighlightDirection: H,
|
|
3158
3158
|
selectedStartDate: p,
|
|
3159
3159
|
selectedEndDate: D,
|
|
3160
3160
|
today: h,
|
|
@@ -3162,22 +3162,22 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3162
3162
|
valueWhenBlurredStartDate: C,
|
|
3163
3163
|
valueWhenBlurredEndDate: v
|
|
3164
3164
|
};
|
|
3165
|
-
},
|
|
3165
|
+
}, it = ({
|
|
3166
3166
|
previousMonthButtonAriaLabel: e,
|
|
3167
3167
|
nextMonthButtonAriaLabel: t,
|
|
3168
3168
|
monthPickerButtonLabel: n,
|
|
3169
3169
|
visiblePanel: r,
|
|
3170
3170
|
setVisiblePanel: s,
|
|
3171
3171
|
monthPickerButtonRef: a,
|
|
3172
|
-
setVisibleMonth:
|
|
3173
|
-
visibleMonth:
|
|
3172
|
+
setVisibleMonth: c,
|
|
3173
|
+
visibleMonth: i,
|
|
3174
3174
|
prevMonthDisabled: l,
|
|
3175
|
-
nextMonthDisabled:
|
|
3176
|
-
calendarSize:
|
|
3175
|
+
nextMonthDisabled: u,
|
|
3176
|
+
calendarSize: d,
|
|
3177
3177
|
previousMonthButtonTestId: h,
|
|
3178
3178
|
nextMonthButtonTestId: g
|
|
3179
3179
|
}) => {
|
|
3180
|
-
const f =
|
|
3180
|
+
const f = d === "smaller" || d === "small" ? "medium" : "large";
|
|
3181
3181
|
return /* @__PURE__ */ _(V, { alignSelf: "center", justifyContent: "space-between", width: "100%", children: [
|
|
3182
3182
|
/* @__PURE__ */ o(
|
|
3183
3183
|
Z,
|
|
@@ -3197,8 +3197,8 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3197
3197
|
fe,
|
|
3198
3198
|
{
|
|
3199
3199
|
leftIcon: nt,
|
|
3200
|
-
onClick: () =>
|
|
3201
|
-
disabled: l?.(
|
|
3200
|
+
onClick: () => c(Mt(i, 1)),
|
|
3201
|
+
disabled: l?.(i),
|
|
3202
3202
|
"aria-label": e,
|
|
3203
3203
|
size: f,
|
|
3204
3204
|
"data-testid": h
|
|
@@ -3208,8 +3208,8 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3208
3208
|
fe,
|
|
3209
3209
|
{
|
|
3210
3210
|
leftIcon: Oe,
|
|
3211
|
-
onClick: () =>
|
|
3212
|
-
disabled:
|
|
3211
|
+
onClick: () => c(We(i, 1)),
|
|
3212
|
+
disabled: u?.(i),
|
|
3213
3213
|
"aria-label": t,
|
|
3214
3214
|
size: f,
|
|
3215
3215
|
"data-testid": g
|
|
@@ -3217,43 +3217,44 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3217
3217
|
)
|
|
3218
3218
|
] })
|
|
3219
3219
|
] });
|
|
3220
|
-
}, Ks = "
|
|
3220
|
+
}, Ks = "_travelDateCell_uaroa_1", qs = "_smaller_uaroa_4", Gs = "_small_uaroa_4", Js = "_medium_uaroa_14", Qs = "_large_uaroa_19", Zs = "_clickable_uaroa_27", Xs = "_disabled_uaroa_31", ea = "_outline_uaroa_40", ta = "_contentWrapper_uaroa_53", na = "_todayDot_uaroa_78", ra = "_isSelectionStart_uaroa_90", sa = "_isSelectionEnd_uaroa_95", aa = "_hover_uaroa_110", oa = "_startSelected_uaroa_113", ca = "_endSelected_uaroa_113", te = {
|
|
3221
3221
|
travelDateCell: Ks,
|
|
3222
3222
|
smaller: qs,
|
|
3223
3223
|
small: Gs,
|
|
3224
3224
|
medium: Js,
|
|
3225
3225
|
large: Qs,
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3226
|
+
clickable: Zs,
|
|
3227
|
+
disabled: Xs,
|
|
3228
|
+
outline: ea,
|
|
3229
|
+
contentWrapper: ta,
|
|
3230
|
+
todayDot: na,
|
|
3231
|
+
isSelectionStart: ra,
|
|
3232
|
+
isSelectionEnd: sa,
|
|
3233
|
+
hover: aa,
|
|
3234
|
+
startSelected: oa,
|
|
3235
|
+
endSelected: ca
|
|
3236
|
+
}, he = "var(--selection-range-background-color)", ia = (e, t, n, r, s, a, c, i) => c ? t && n && !i ? {
|
|
3236
3237
|
left: "transparent",
|
|
3237
3238
|
right: "transparent"
|
|
3238
|
-
} : s && a && r ?
|
|
3239
|
+
} : s && a && r ? ua(
|
|
3239
3240
|
e,
|
|
3240
3241
|
r,
|
|
3241
3242
|
s,
|
|
3242
3243
|
a
|
|
3243
|
-
) : s && !
|
|
3244
|
+
) : s && !i ? {
|
|
3244
3245
|
left: "transparent",
|
|
3245
3246
|
right: "transparent"
|
|
3246
|
-
} :
|
|
3247
|
+
} : la(
|
|
3247
3248
|
e,
|
|
3248
3249
|
t,
|
|
3249
3250
|
n
|
|
3250
3251
|
) : {
|
|
3251
3252
|
left: "transparent",
|
|
3252
3253
|
right: "transparent"
|
|
3253
|
-
},
|
|
3254
|
+
}, la = (e, t, n, r) => t && n && Y(t, n) ? {
|
|
3254
3255
|
left: "transparent",
|
|
3255
3256
|
right: "transparent"
|
|
3256
|
-
} : (t && n ? Q(e, t) &&
|
|
3257
|
+
} : (t && n ? Q(e, t) && Ne(e, n) && !Y(e, t) && !Y(e, n) : !1) ? {
|
|
3257
3258
|
left: he,
|
|
3258
3259
|
right: he
|
|
3259
3260
|
} : t && n ? Y(e, t) ? {
|
|
@@ -3268,24 +3269,24 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3268
3269
|
} : {
|
|
3269
3270
|
left: "transparent",
|
|
3270
3271
|
right: "transparent"
|
|
3271
|
-
},
|
|
3272
|
-
const s = Q(n, r), a =
|
|
3272
|
+
}, ua = (e, t, n, r) => {
|
|
3273
|
+
const s = Q(n, r), a = cr(e, {
|
|
3273
3274
|
start: gn([n, r]),
|
|
3274
3275
|
end: mn([n, r])
|
|
3275
|
-
}),
|
|
3276
|
-
return t === "right" &&
|
|
3276
|
+
}), c = Y(e, n), i = Y(e, r);
|
|
3277
|
+
return t === "right" && Ne(n, r) ? {
|
|
3277
3278
|
left: "transparent",
|
|
3278
3279
|
right: "transparent"
|
|
3279
3280
|
} : t === "left" && Q(n, r) ? {
|
|
3280
3281
|
left: "transparent",
|
|
3281
3282
|
right: "transparent"
|
|
3282
|
-
} :
|
|
3283
|
+
} : c && i ? {
|
|
3283
3284
|
left: "transparent",
|
|
3284
3285
|
right: "transparent"
|
|
3285
|
-
} :
|
|
3286
|
+
} : c ? sn(s, {
|
|
3286
3287
|
left: "transparent",
|
|
3287
3288
|
right: he
|
|
3288
|
-
}) :
|
|
3289
|
+
}) : i ? sn(s, {
|
|
3289
3290
|
left: he,
|
|
3290
3291
|
right: "transparent"
|
|
3291
3292
|
}) : a ? {
|
|
@@ -3307,53 +3308,53 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3307
3308
|
case "Home":
|
|
3308
3309
|
return Qe(e);
|
|
3309
3310
|
case "End":
|
|
3310
|
-
return
|
|
3311
|
+
return ne(Qe(e), 6);
|
|
3311
3312
|
case "ArrowLeft":
|
|
3312
3313
|
return we(e, 1);
|
|
3313
3314
|
case "ArrowUp":
|
|
3314
3315
|
return we(e, 7);
|
|
3315
3316
|
case "ArrowRight":
|
|
3316
|
-
return
|
|
3317
|
+
return ne(e, 1);
|
|
3317
3318
|
case "ArrowDown":
|
|
3318
|
-
return
|
|
3319
|
+
return ne(e, 7);
|
|
3319
3320
|
default:
|
|
3320
3321
|
return;
|
|
3321
3322
|
}
|
|
3322
|
-
}, ht = (e, t) =>
|
|
3323
|
-
travelDateCellBackground:
|
|
3324
|
-
smaller:
|
|
3325
|
-
small:
|
|
3326
|
-
medium:
|
|
3327
|
-
large:
|
|
3328
|
-
},
|
|
3323
|
+
}, ht = (e, t) => K(Dn(e, 12), le.fullDate) + t, fa = "_travelDateCellBackground_1xk35_1", ha = "_smaller_1xk35_9", ga = "_small_1xk35_9", ma = "_medium_1xk35_19", pa = "_large_1xk35_24", Ge = {
|
|
3324
|
+
travelDateCellBackground: fa,
|
|
3325
|
+
smaller: ha,
|
|
3326
|
+
small: ga,
|
|
3327
|
+
medium: ma,
|
|
3328
|
+
large: pa
|
|
3329
|
+
}, Da = ({ calendarSize: e, bgColorLeft: t, bgColorRight: n }) => /* @__PURE__ */ _(V, { children: [
|
|
3329
3330
|
/* @__PURE__ */ o(
|
|
3330
|
-
|
|
3331
|
+
B,
|
|
3331
3332
|
{
|
|
3332
|
-
className:
|
|
3333
|
+
className: se(Ge.travelDateCellBackground, Ge[e]),
|
|
3333
3334
|
background: t
|
|
3334
3335
|
}
|
|
3335
3336
|
),
|
|
3336
3337
|
/* @__PURE__ */ o(
|
|
3337
|
-
|
|
3338
|
+
B,
|
|
3338
3339
|
{
|
|
3339
|
-
className:
|
|
3340
|
+
className: se(Ge.travelDateCellBackground, Ge[e]),
|
|
3340
3341
|
background: n
|
|
3341
3342
|
}
|
|
3342
3343
|
)
|
|
3343
|
-
] }),
|
|
3344
|
+
] }), ba = ({
|
|
3344
3345
|
onClick: e,
|
|
3345
3346
|
visibleMonth: t,
|
|
3346
3347
|
onChangeVisibleMonth: n,
|
|
3347
3348
|
day: r,
|
|
3348
3349
|
isValidDateRange: s,
|
|
3349
3350
|
selectedStartDate: a,
|
|
3350
|
-
selectedEndDate:
|
|
3351
|
-
onStartHover:
|
|
3351
|
+
selectedEndDate: c,
|
|
3352
|
+
onStartHover: i,
|
|
3352
3353
|
onEndHover: l,
|
|
3353
|
-
hoverDate:
|
|
3354
|
-
hoverAnchor:
|
|
3354
|
+
hoverDate: u,
|
|
3355
|
+
hoverAnchor: d,
|
|
3355
3356
|
today: h,
|
|
3356
|
-
|
|
3357
|
+
focusableDate: g,
|
|
3357
3358
|
calendarId: f,
|
|
3358
3359
|
isDateDisabled: p,
|
|
3359
3360
|
size: D,
|
|
@@ -3361,11 +3362,11 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3361
3362
|
hoverHighlightDirection: v
|
|
3362
3363
|
}) => {
|
|
3363
3364
|
const b = y(
|
|
3364
|
-
async (
|
|
3365
|
-
const
|
|
3366
|
-
|
|
3367
|
-
document.getElementById(ht(
|
|
3368
|
-
}, 10))), (
|
|
3365
|
+
async (A) => {
|
|
3366
|
+
const H = da(r.date, A.key), q = (H && p?.(H)) ?? !1;
|
|
3367
|
+
H && !q && (i(H), me(r.date, H) ? document.getElementById(ht(H, f))?.focus() : (n(H), setTimeout(() => {
|
|
3368
|
+
document.getElementById(ht(H, f))?.focus();
|
|
3369
|
+
}, 10))), (A.key === "Enter" || A.code === "Space") && e(r.date);
|
|
3369
3370
|
},
|
|
3370
3371
|
[
|
|
3371
3372
|
f,
|
|
@@ -3373,79 +3374,69 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3373
3374
|
p,
|
|
3374
3375
|
n,
|
|
3375
3376
|
e,
|
|
3376
|
-
|
|
3377
|
+
i
|
|
3377
3378
|
]
|
|
3378
|
-
), m = r.month === t.getMonth(), w = p?.(r.date) ?? !1,
|
|
3379
|
+
), m = r.month === t.getMonth(), w = p?.(r.date) ?? !1, k = u && d ? Q(u, d) : !1, S = !!(u && d && v), T = u && d && v ? Y(k ? d : u, r.date) : !1, N = u && d && v ? Y(k ? u : d, r.date) : !1, E = a && !S ? Y(a, r.date) : !1, M = c && !S ? Y(c, r.date) : !1, L = Y(r.date, h), $ = ia(
|
|
3379
3380
|
r.date,
|
|
3380
3381
|
a,
|
|
3381
|
-
|
|
3382
|
+
c,
|
|
3382
3383
|
v,
|
|
3383
|
-
d,
|
|
3384
3384
|
u,
|
|
3385
|
+
d,
|
|
3385
3386
|
m,
|
|
3386
3387
|
s
|
|
3387
|
-
);
|
|
3388
|
+
), j = m ? w ? te.disabled : te.clickable : void 0;
|
|
3388
3389
|
return /* @__PURE__ */ _(
|
|
3389
3390
|
"td",
|
|
3390
3391
|
{
|
|
3391
|
-
className:
|
|
3392
|
+
className: se(te.travelDateCell, te[D], j),
|
|
3392
3393
|
onClick: w ? void 0 : () => m && e(r.date),
|
|
3393
|
-
onMouseOver: w ? void 0 : () => m &&
|
|
3394
|
+
onMouseOver: w ? void 0 : () => m && i(r.date),
|
|
3394
3395
|
onMouseOut: w ? void 0 : () => m && l(r.date),
|
|
3395
|
-
tabIndex: w ? void 0 :
|
|
3396
|
-
r,
|
|
3397
|
-
m,
|
|
3398
|
-
a,
|
|
3399
|
-
A,
|
|
3400
|
-
t,
|
|
3401
|
-
g
|
|
3402
|
-
),
|
|
3396
|
+
tabIndex: w ? void 0 : g && Y(r.date, g) ? 0 : -1,
|
|
3403
3397
|
id: w ? void 0 : ht(r.date, f),
|
|
3404
3398
|
onKeyDown: w ? void 0 : b,
|
|
3405
|
-
...w ? void 0 : { "aria-selected":
|
|
3399
|
+
...w ? void 0 : { "aria-selected": E || M },
|
|
3400
|
+
"aria-current": L && m ? "date" : void 0,
|
|
3406
3401
|
"data-testid": C?.(r.date),
|
|
3407
3402
|
children: [
|
|
3408
|
-
/* @__PURE__ */ o("div", { className:
|
|
3403
|
+
/* @__PURE__ */ o("div", { className: te.outline }),
|
|
3409
3404
|
/* @__PURE__ */ o(
|
|
3410
|
-
|
|
3405
|
+
Da,
|
|
3411
3406
|
{
|
|
3412
3407
|
calendarSize: D,
|
|
3413
|
-
bgColorLeft:
|
|
3414
|
-
bgColorRight:
|
|
3408
|
+
bgColorLeft: $.left,
|
|
3409
|
+
bgColorRight: $.right
|
|
3415
3410
|
}
|
|
3416
3411
|
),
|
|
3417
|
-
m && /* @__PURE__ */
|
|
3412
|
+
m && /* @__PURE__ */ _(
|
|
3418
3413
|
"div",
|
|
3419
3414
|
{
|
|
3420
|
-
className:
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
(
|
|
3427
|
-
(M || N) && ae.isSelectionEnd,
|
|
3428
|
-
w && ae.disabled
|
|
3415
|
+
className: se(
|
|
3416
|
+
te.contentWrapper,
|
|
3417
|
+
a ? te.startSelected : void 0,
|
|
3418
|
+
c ? te.endSelected : void 0,
|
|
3419
|
+
u && Y(u, r.date) ? te.hover : void 0,
|
|
3420
|
+
(E || T) && te.isSelectionStart,
|
|
3421
|
+
(M || N) && te.isSelectionEnd
|
|
3429
3422
|
),
|
|
3430
|
-
children:
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3423
|
+
children: [
|
|
3424
|
+
/* @__PURE__ */ o(
|
|
3425
|
+
Ce,
|
|
3426
|
+
{
|
|
3427
|
+
variant: "bold",
|
|
3428
|
+
color: w ? xt("--lhds-color-ui-500") : void 0,
|
|
3429
|
+
children: r.dayOfMonth
|
|
3430
|
+
}
|
|
3431
|
+
),
|
|
3432
|
+
L && /* @__PURE__ */ o("div", { className: te.todayDot })
|
|
3433
|
+
]
|
|
3438
3434
|
}
|
|
3439
3435
|
)
|
|
3440
3436
|
]
|
|
3441
3437
|
}
|
|
3442
3438
|
);
|
|
3443
|
-
},
|
|
3444
|
-
if (!t)
|
|
3445
|
-
return -1;
|
|
3446
|
-
const i = n ? me(n, s) : !1;
|
|
3447
|
-
return (n && i ? Y(e.date, n) : r) || !i && !a && e.date.getDate() === 1 ? 0 : -1;
|
|
3448
|
-
}, wa = "_travelCalendar_167ir_1", ya = {
|
|
3439
|
+
}, wa = "_travelCalendar_3zr00_1", ya = {
|
|
3449
3440
|
travelCalendar: wa
|
|
3450
3441
|
}, lt = ({
|
|
3451
3442
|
visibleMonthData: e,
|
|
@@ -3454,55 +3445,68 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3454
3445
|
setVisibleMonth: r,
|
|
3455
3446
|
visibleMonth: s,
|
|
3456
3447
|
isValidDateRange: a,
|
|
3457
|
-
selectedStartDate:
|
|
3458
|
-
selectedEndDate:
|
|
3448
|
+
selectedStartDate: c,
|
|
3449
|
+
selectedEndDate: i,
|
|
3459
3450
|
hoverDate: l,
|
|
3460
|
-
hoverAnchor:
|
|
3461
|
-
today:
|
|
3451
|
+
hoverAnchor: u,
|
|
3452
|
+
today: d,
|
|
3462
3453
|
calendarId: h,
|
|
3463
3454
|
isDateDisabled: g,
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3455
|
+
size: f = "medium",
|
|
3456
|
+
multiSelectable: p,
|
|
3457
|
+
dateTestId: D,
|
|
3458
|
+
hoverHighlightDirection: C,
|
|
3459
|
+
ariaLabel: v
|
|
3460
|
+
}) => {
|
|
3461
|
+
const b = I(() => {
|
|
3462
|
+
const m = e.weeks.flatMap((k) => k.days).filter((k) => k.month === s.getMonth()).map((k) => k.date);
|
|
3463
|
+
return [c, d, ...m].filter(
|
|
3464
|
+
(k) => k != null && me(k, s) && !g?.(k)
|
|
3465
|
+
)[0];
|
|
3466
|
+
}, [
|
|
3467
|
+
g,
|
|
3468
|
+
c,
|
|
3469
|
+
d,
|
|
3470
|
+
s,
|
|
3471
|
+
e.weeks
|
|
3472
|
+
]);
|
|
3473
|
+
return /* @__PURE__ */ o(
|
|
3474
|
+
"table",
|
|
3475
|
+
{
|
|
3476
|
+
className: ya.travelCalendar,
|
|
3477
|
+
role: "grid",
|
|
3478
|
+
"aria-label": v,
|
|
3479
|
+
...p ? { "aria-multiselectable": !0 } : void 0,
|
|
3480
|
+
children: /* @__PURE__ */ _("tbody", { children: [
|
|
3481
|
+
/* @__PURE__ */ o("tr", { children: e.weeks[0].days.map((m) => /* @__PURE__ */ o("th", { abbr: m.fullName, children: /* @__PURE__ */ o(Ce, { children: m.name }) }, m.name)) }),
|
|
3482
|
+
e.weeks.map((m) => /* @__PURE__ */ o(Rt.Fragment, { children: /* @__PURE__ */ o("tr", { children: m.days.map((w) => /* @__PURE__ */ o(
|
|
3483
|
+
ba,
|
|
3484
|
+
{
|
|
3485
|
+
size: f,
|
|
3486
|
+
onClick: (k) => t(k),
|
|
3487
|
+
visibleMonth: s,
|
|
3488
|
+
onChangeVisibleMonth: r,
|
|
3489
|
+
isValidDateRange: a,
|
|
3490
|
+
day: w,
|
|
3491
|
+
onStartHover: (k) => n(k),
|
|
3492
|
+
onEndHover: (k) => n((S) => S && Y(S, k) ? void 0 : S),
|
|
3493
|
+
selectedStartDate: c,
|
|
3494
|
+
selectedEndDate: i,
|
|
3495
|
+
hoverDate: l,
|
|
3496
|
+
hoverAnchor: u,
|
|
3497
|
+
today: d,
|
|
3498
|
+
focusableDate: b,
|
|
3499
|
+
calendarId: h,
|
|
3500
|
+
isDateDisabled: g,
|
|
3501
|
+
dateTestId: D,
|
|
3502
|
+
hoverHighlightDirection: C
|
|
3503
|
+
},
|
|
3504
|
+
w.dateString
|
|
3505
|
+
)) }, m.weekNumber) }, m.weekNumber))
|
|
3506
|
+
] })
|
|
3507
|
+
}
|
|
3508
|
+
);
|
|
3509
|
+
}, va = "_travelDateRangeInput_1j7rp_1", Ca = "_overlay_1j7rp_2", ka = "_calendarVisible_1j7rp_6", gt = {
|
|
3506
3510
|
travelDateRangeInput: va,
|
|
3507
3511
|
overlay: Ca,
|
|
3508
3512
|
calendarVisible: ka
|
|
@@ -3513,11 +3517,11 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3513
3517
|
endDateLabel: r,
|
|
3514
3518
|
localeCode: s = "sv",
|
|
3515
3519
|
languageLocaleCode: a = s,
|
|
3516
|
-
initialMonthInFocus:
|
|
3517
|
-
previousMonthButtonAriaLabel:
|
|
3520
|
+
initialMonthInFocus: c,
|
|
3521
|
+
previousMonthButtonAriaLabel: i = "Previous month",
|
|
3518
3522
|
nextMonthButtonAriaLabel: l = "Next month",
|
|
3519
|
-
placeholderWhenBlurredStartDate:
|
|
3520
|
-
placeholderWhenBlurredEndDate:
|
|
3523
|
+
placeholderWhenBlurredStartDate: u,
|
|
3524
|
+
placeholderWhenBlurredEndDate: d,
|
|
3521
3525
|
heading: h,
|
|
3522
3526
|
headingLevel: g,
|
|
3523
3527
|
numMonthsInMonthPicker: f = 12,
|
|
@@ -3528,59 +3532,59 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3528
3532
|
zIndex: b = 1e3,
|
|
3529
3533
|
zIndexWhenClosed: m,
|
|
3530
3534
|
onHideCalendar: w,
|
|
3531
|
-
renderBelowCalendar:
|
|
3532
|
-
size:
|
|
3533
|
-
dateTestId:
|
|
3535
|
+
renderBelowCalendar: k,
|
|
3536
|
+
size: S = "medium",
|
|
3537
|
+
dateTestId: T,
|
|
3534
3538
|
previousMonthButtonTestId: N,
|
|
3535
|
-
nextMonthButtonTestId:
|
|
3539
|
+
nextMonthButtonTestId: E,
|
|
3536
3540
|
textInputVariant: M = "standard",
|
|
3537
|
-
autoFocusStartDate:
|
|
3538
|
-
autoFocusEndDate:
|
|
3541
|
+
autoFocusStartDate: L,
|
|
3542
|
+
autoFocusEndDate: $
|
|
3539
3543
|
}) => {
|
|
3540
|
-
const [
|
|
3544
|
+
const [j, A] = R(!1), [H, q] = R(!1), [x, G] = R({
|
|
3541
3545
|
// Sane defaults, this will be updated with actual data from DOM.
|
|
3542
3546
|
width: 336,
|
|
3543
3547
|
height: 66
|
|
3544
|
-
}), [U,
|
|
3548
|
+
}), [U, z] = R(void 0), F = O(null), P = O(null), X = (ee) => {
|
|
3545
3549
|
ee === "startDate" ? F.current?.focus() : ee === "endDate" && P.current?.focus();
|
|
3546
|
-
},
|
|
3547
|
-
|
|
3548
|
-
|
|
3550
|
+
}, ae = S === "large" ? "8.8rem" : "6.6rem", oe = O(!1), ue = y((ee) => {
|
|
3551
|
+
z(ee), oe.current = !0, q(!0), setTimeout(() => {
|
|
3552
|
+
A(!0);
|
|
3549
3553
|
}, 10);
|
|
3550
|
-
}, []),
|
|
3551
|
-
|
|
3552
|
-
oe.current ||
|
|
3554
|
+
}, []), W = y(() => {
|
|
3555
|
+
H && (A(!1), oe.current = !1, w?.(), setTimeout(() => {
|
|
3556
|
+
oe.current || q(!1);
|
|
3553
3557
|
}, 120));
|
|
3554
|
-
}, [
|
|
3555
|
-
on(ze,
|
|
3556
|
-
const ee = Me.current?.offsetWidth,
|
|
3557
|
-
ee != null &&
|
|
3558
|
+
}, [H, w]), ze = O(null), Me = O(null);
|
|
3559
|
+
on(ze, W), yn(() => {
|
|
3560
|
+
const ee = Me.current?.offsetWidth, ut = Me.current?.offsetHeight;
|
|
3561
|
+
ee != null && ut != null && (x.height !== ut || x.width !== ee) && G({ width: ee, height: ut });
|
|
3558
3562
|
}, [x.height, x.width]);
|
|
3559
3563
|
const De = An(
|
|
3560
3564
|
e,
|
|
3561
3565
|
t,
|
|
3562
3566
|
s,
|
|
3563
3567
|
a,
|
|
3564
|
-
|
|
3568
|
+
c,
|
|
3565
3569
|
U,
|
|
3566
|
-
|
|
3570
|
+
z,
|
|
3567
3571
|
X,
|
|
3568
|
-
|
|
3572
|
+
W
|
|
3569
3573
|
), {
|
|
3570
3574
|
visiblePanel: Ke,
|
|
3571
|
-
visibleMonth:
|
|
3575
|
+
visibleMonth: ce,
|
|
3572
3576
|
onValueChangeByInputs: Ee,
|
|
3573
3577
|
setVisibleMonth: Yn,
|
|
3574
|
-
setVisiblePanel:
|
|
3578
|
+
setVisiblePanel: Bt,
|
|
3575
3579
|
monthPickerButtonRef: Et
|
|
3576
3580
|
} = De, Hn = y(
|
|
3577
3581
|
(ee) => {
|
|
3578
|
-
ee.key === "Escape" &&
|
|
3582
|
+
ee.key === "Escape" && W();
|
|
3579
3583
|
},
|
|
3580
|
-
[
|
|
3584
|
+
[W]
|
|
3581
3585
|
);
|
|
3582
3586
|
return /* @__PURE__ */ _(
|
|
3583
|
-
|
|
3587
|
+
B,
|
|
3584
3588
|
{
|
|
3585
3589
|
position: "relative",
|
|
3586
3590
|
className: gt.travelDateRangeInput,
|
|
@@ -3590,11 +3594,11 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3590
3594
|
width: x.width,
|
|
3591
3595
|
children: [
|
|
3592
3596
|
/* @__PURE__ */ o(
|
|
3593
|
-
|
|
3597
|
+
B,
|
|
3594
3598
|
{
|
|
3595
3599
|
position: "absolute",
|
|
3596
3600
|
ref: Me,
|
|
3597
|
-
zIndex:
|
|
3601
|
+
zIndex: H ? b : m,
|
|
3598
3602
|
children: /* @__PURE__ */ o(
|
|
3599
3603
|
Ln,
|
|
3600
3604
|
{
|
|
@@ -3606,56 +3610,56 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3606
3610
|
localeCode: s,
|
|
3607
3611
|
startDateLabel: n,
|
|
3608
3612
|
endDateLabel: r,
|
|
3609
|
-
onFocus:
|
|
3610
|
-
calendarSize:
|
|
3611
|
-
placeholderWhenBlurredStartDate:
|
|
3612
|
-
placeholderWhenBlurredEndDate:
|
|
3613
|
+
onFocus: ue,
|
|
3614
|
+
calendarSize: S,
|
|
3615
|
+
placeholderWhenBlurredStartDate: u,
|
|
3616
|
+
placeholderWhenBlurredEndDate: d,
|
|
3613
3617
|
variant: M,
|
|
3614
|
-
autoFocusStartDate:
|
|
3615
|
-
autoFocusEndDate:
|
|
3618
|
+
autoFocusStartDate: L,
|
|
3619
|
+
autoFocusEndDate: $,
|
|
3616
3620
|
readOnlyOnMobile: !0
|
|
3617
3621
|
}
|
|
3618
3622
|
)
|
|
3619
3623
|
}
|
|
3620
3624
|
),
|
|
3621
|
-
|
|
3622
|
-
|
|
3625
|
+
H && /* @__PURE__ */ o(
|
|
3626
|
+
B,
|
|
3623
3627
|
{
|
|
3624
3628
|
position: "absolute",
|
|
3625
3629
|
zIndex: b - 1,
|
|
3626
3630
|
left: "-2.4rem",
|
|
3627
3631
|
top: h ? "-8.0rem" : "-2.4rem",
|
|
3628
|
-
className:
|
|
3632
|
+
className: se(gt.overlay, j && gt.calendarVisible),
|
|
3629
3633
|
children: /* @__PURE__ */ o(
|
|
3630
|
-
|
|
3634
|
+
B,
|
|
3631
3635
|
{
|
|
3632
3636
|
background: "white",
|
|
3633
3637
|
shadow: "popover",
|
|
3634
3638
|
borderRadius: "var(--swui-border-radius-large)",
|
|
3635
|
-
children: /* @__PURE__ */ _(
|
|
3639
|
+
children: /* @__PURE__ */ _(un, { gap: 3, children: [
|
|
3636
3640
|
h && /* @__PURE__ */ o(He, { variant: "h2", as: g, children: h }),
|
|
3637
|
-
/* @__PURE__ */ o(
|
|
3641
|
+
/* @__PURE__ */ o(B, { height: ae }),
|
|
3638
3642
|
/* @__PURE__ */ o(
|
|
3639
|
-
|
|
3643
|
+
it,
|
|
3640
3644
|
{
|
|
3641
3645
|
...De,
|
|
3642
|
-
previousMonthButtonAriaLabel:
|
|
3646
|
+
previousMonthButtonAriaLabel: i,
|
|
3643
3647
|
nextMonthButtonAriaLabel: l,
|
|
3644
|
-
calendarSize:
|
|
3648
|
+
calendarSize: S,
|
|
3645
3649
|
prevMonthDisabled: D,
|
|
3646
3650
|
nextMonthDisabled: C,
|
|
3647
3651
|
previousMonthButtonTestId: N,
|
|
3648
|
-
nextMonthButtonTestId:
|
|
3652
|
+
nextMonthButtonTestId: E
|
|
3649
3653
|
}
|
|
3650
3654
|
),
|
|
3651
3655
|
Ke === "calendar" && /* @__PURE__ */ o(
|
|
3652
3656
|
lt,
|
|
3653
3657
|
{
|
|
3654
3658
|
...De,
|
|
3655
|
-
size:
|
|
3659
|
+
size: S,
|
|
3656
3660
|
multiSelectable: !0,
|
|
3657
3661
|
isDateDisabled: p,
|
|
3658
|
-
dateTestId:
|
|
3662
|
+
dateTestId: T
|
|
3659
3663
|
}
|
|
3660
3664
|
),
|
|
3661
3665
|
Ke === "month-picker" && /* @__PURE__ */ o(
|
|
@@ -3663,18 +3667,18 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3663
3667
|
{
|
|
3664
3668
|
firstMonth: v,
|
|
3665
3669
|
numMonths: f,
|
|
3666
|
-
value:
|
|
3667
|
-
size:
|
|
3670
|
+
value: ce,
|
|
3671
|
+
size: S,
|
|
3668
3672
|
localeCode: a,
|
|
3669
3673
|
onValueChange: (ee) => {
|
|
3670
|
-
Yn(ee),
|
|
3674
|
+
Yn(ee), Bt("calendar"), Et.current?.focus();
|
|
3671
3675
|
},
|
|
3672
3676
|
onCancel: () => {
|
|
3673
|
-
|
|
3677
|
+
Bt("calendar"), Et.current?.focus();
|
|
3674
3678
|
}
|
|
3675
3679
|
}
|
|
3676
3680
|
),
|
|
3677
|
-
|
|
3681
|
+
k?.({ hideCalendar: W })
|
|
3678
3682
|
] })
|
|
3679
3683
|
}
|
|
3680
3684
|
)
|
|
@@ -3683,10 +3687,10 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3683
3687
|
]
|
|
3684
3688
|
}
|
|
3685
3689
|
);
|
|
3686
|
-
}, Sa = "_travelDateInput_hmfbf_1", Ma = "_overlay_hmfbf_2",
|
|
3690
|
+
}, Sa = "_travelDateInput_hmfbf_1", Ma = "_overlay_hmfbf_2", Ia = "_calendarVisible_hmfbf_6", mt = {
|
|
3687
3691
|
travelDateInput: Sa,
|
|
3688
3692
|
overlay: Ma,
|
|
3689
|
-
calendarVisible:
|
|
3693
|
+
calendarVisible: Ia
|
|
3690
3694
|
}, Pn = ({
|
|
3691
3695
|
value: e,
|
|
3692
3696
|
onValueChange: t,
|
|
@@ -3694,16 +3698,16 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3694
3698
|
localeCode: r,
|
|
3695
3699
|
autoFocus: s,
|
|
3696
3700
|
onFocus: a,
|
|
3697
|
-
calendarSize:
|
|
3698
|
-
placeholderWhenBlurred:
|
|
3701
|
+
calendarSize: c,
|
|
3702
|
+
placeholderWhenBlurred: i,
|
|
3699
3703
|
valueWhenBlurred: l,
|
|
3700
|
-
variant:
|
|
3701
|
-
readOnlyOnMobile:
|
|
3704
|
+
variant: u,
|
|
3705
|
+
readOnlyOnMobile: d
|
|
3702
3706
|
}) => {
|
|
3703
|
-
const { deviceSize: h } =
|
|
3704
|
-
const D =
|
|
3707
|
+
const { deviceSize: h } = Bn(), g = d && !En(h, "tablet"), { mask: f, placeholder: p } = I(() => {
|
|
3708
|
+
const D = Be(r);
|
|
3705
3709
|
return {
|
|
3706
|
-
mask:
|
|
3710
|
+
mask: Nn(D),
|
|
3707
3711
|
placeholder: D.toLowerCase()
|
|
3708
3712
|
};
|
|
3709
3713
|
}, [r]);
|
|
@@ -3722,72 +3726,72 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3722
3726
|
autoFocus: s,
|
|
3723
3727
|
label: n,
|
|
3724
3728
|
placeholder: p,
|
|
3725
|
-
calendarSize:
|
|
3726
|
-
placeholderWhenBlurred:
|
|
3729
|
+
calendarSize: c,
|
|
3730
|
+
placeholderWhenBlurred: i,
|
|
3727
3731
|
valueWhenBlurred: l,
|
|
3728
|
-
variant:
|
|
3732
|
+
variant: u
|
|
3729
3733
|
}
|
|
3730
3734
|
) });
|
|
3731
|
-
},
|
|
3732
|
-
const
|
|
3733
|
-
() =>
|
|
3735
|
+
}, Nt = (e, t, n, r, s, a) => {
|
|
3736
|
+
const c = Te(r), i = Tt(), l = xe(), u = O(null), d = I(
|
|
3737
|
+
() => Be(n),
|
|
3734
3738
|
[n]
|
|
3735
|
-
), h =
|
|
3736
|
-
() => e?.length ===
|
|
3737
|
-
[
|
|
3738
|
-
), g =
|
|
3739
|
-
() => h != null ? vt(h, l,
|
|
3740
|
-
[
|
|
3741
|
-
), [f, p] =
|
|
3739
|
+
), h = I(
|
|
3740
|
+
() => e?.length === d.length ? ie(e, n) : void 0,
|
|
3741
|
+
[d.length, n, e]
|
|
3742
|
+
), g = I(
|
|
3743
|
+
() => h != null ? vt(h, l, c) : void 0,
|
|
3744
|
+
[c, h, l]
|
|
3745
|
+
), [f, p] = R(
|
|
3742
3746
|
s ?? h ?? /* @__PURE__ */ new Date()
|
|
3743
3747
|
), D = y(
|
|
3744
3748
|
(M) => {
|
|
3745
3749
|
me(M, l) || Q(M, l) ? p(M) : p(l);
|
|
3746
3750
|
},
|
|
3747
3751
|
[l]
|
|
3748
|
-
), C =
|
|
3749
|
-
|
|
3752
|
+
), C = O(h?.getTime());
|
|
3753
|
+
re(() => {
|
|
3750
3754
|
if (!h)
|
|
3751
3755
|
return;
|
|
3752
3756
|
const M = h.getTime();
|
|
3753
3757
|
M !== C.current && (C.current = M, D(h));
|
|
3754
3758
|
}, [h, D]);
|
|
3755
|
-
const v =
|
|
3759
|
+
const v = I(
|
|
3756
3760
|
() => ot(
|
|
3757
3761
|
f.getFullYear(),
|
|
3758
3762
|
f.getMonth(),
|
|
3759
|
-
|
|
3763
|
+
c
|
|
3760
3764
|
),
|
|
3761
|
-
[
|
|
3762
|
-
), b =
|
|
3765
|
+
[c, f]
|
|
3766
|
+
), b = I(() => at(
|
|
3763
3767
|
bn(
|
|
3764
3768
|
f,
|
|
3765
3769
|
{ month: "long", year: "numeric" },
|
|
3766
|
-
{ locale:
|
|
3770
|
+
{ locale: c.code }
|
|
3767
3771
|
)
|
|
3768
|
-
), [
|
|
3772
|
+
), [c, f]), m = I(() => me(l, f), [l, f]), [w, k] = R(), [S, T] = R("calendar"), N = y(
|
|
3769
3773
|
(M) => {
|
|
3770
|
-
const
|
|
3771
|
-
|
|
3774
|
+
const L = M?.length === d.length ? ie(M, n) : void 0;
|
|
3775
|
+
L && D(L), t?.(M);
|
|
3772
3776
|
},
|
|
3773
|
-
[
|
|
3777
|
+
[d.length, n, t, D]
|
|
3774
3778
|
);
|
|
3775
3779
|
return {
|
|
3776
3780
|
onClickDate: (M) => {
|
|
3777
3781
|
t?.(be(M, n)), a?.(M);
|
|
3778
3782
|
},
|
|
3779
3783
|
onValueChangeByInputs: N,
|
|
3780
|
-
monthPickerButtonRef:
|
|
3781
|
-
calendarId:
|
|
3784
|
+
monthPickerButtonRef: u,
|
|
3785
|
+
calendarId: i,
|
|
3782
3786
|
monthPickerButtonLabel: b,
|
|
3783
|
-
visiblePanel:
|
|
3784
|
-
setVisiblePanel:
|
|
3787
|
+
visiblePanel: S,
|
|
3788
|
+
setVisiblePanel: T,
|
|
3785
3789
|
setVisibleMonth: p,
|
|
3786
3790
|
visibleMonthData: v,
|
|
3787
3791
|
todayIsInVisibleMonth: m,
|
|
3788
3792
|
hoverDate: w,
|
|
3789
3793
|
hoverAnchor: void 0,
|
|
3790
|
-
setHoverDate:
|
|
3794
|
+
setHoverDate: k,
|
|
3791
3795
|
selectedDate: h,
|
|
3792
3796
|
today: l,
|
|
3793
3797
|
visibleMonth: f,
|
|
@@ -3800,11 +3804,11 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3800
3804
|
localeCode: r = "sv",
|
|
3801
3805
|
languageLocaleCode: s = r,
|
|
3802
3806
|
initialMonthInFocus: a,
|
|
3803
|
-
previousMonthButtonAriaLabel:
|
|
3804
|
-
nextMonthButtonAriaLabel:
|
|
3807
|
+
previousMonthButtonAriaLabel: c = "Previous month",
|
|
3808
|
+
nextMonthButtonAriaLabel: i = "Next month",
|
|
3805
3809
|
placeholderWhenBlurred: l,
|
|
3806
|
-
autoFocus:
|
|
3807
|
-
heading:
|
|
3810
|
+
autoFocus: u,
|
|
3811
|
+
heading: d,
|
|
3808
3812
|
headingLevel: h,
|
|
3809
3813
|
numMonthsInMonthPicker: g = 12,
|
|
3810
3814
|
isDateDisabled: f,
|
|
@@ -3815,142 +3819,142 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3815
3819
|
zIndexWhenClosed: b,
|
|
3816
3820
|
onHideCalendar: m,
|
|
3817
3821
|
renderBelowCalendar: w,
|
|
3818
|
-
size:
|
|
3819
|
-
dateTestId:
|
|
3820
|
-
previousMonthButtonTestId:
|
|
3822
|
+
size: k = "medium",
|
|
3823
|
+
dateTestId: S,
|
|
3824
|
+
previousMonthButtonTestId: T,
|
|
3821
3825
|
nextMonthButtonTestId: N,
|
|
3822
|
-
textInputVariant:
|
|
3826
|
+
textInputVariant: E = "standard"
|
|
3823
3827
|
}) => {
|
|
3824
|
-
const [M,
|
|
3828
|
+
const [M, L] = R(!1), [$, j] = R(!1), [A, H] = R({
|
|
3825
3829
|
// Sane defaults, this will be updated with actual data from DOM.
|
|
3826
3830
|
width: 336,
|
|
3827
3831
|
height: 66
|
|
3828
|
-
}),
|
|
3829
|
-
x.current = !0,
|
|
3830
|
-
|
|
3832
|
+
}), q = k === "large" ? "8.8rem" : "6.6rem", x = O(!1), G = y(() => {
|
|
3833
|
+
x.current = !0, j(!0), setTimeout(() => {
|
|
3834
|
+
L(!0);
|
|
3831
3835
|
}, 10);
|
|
3832
3836
|
}, []), U = y(() => {
|
|
3833
|
-
|
|
3834
|
-
x.current ||
|
|
3837
|
+
$ && (L(!1), x.current = !1, m?.(), setTimeout(() => {
|
|
3838
|
+
x.current || j(!1);
|
|
3835
3839
|
}, 120));
|
|
3836
|
-
}, [
|
|
3840
|
+
}, [$, m]), z = y(() => {
|
|
3837
3841
|
setTimeout(() => {
|
|
3838
3842
|
U();
|
|
3839
3843
|
}, 250);
|
|
3840
|
-
}, [U]), F =
|
|
3844
|
+
}, [U]), F = O(null), P = O(null);
|
|
3841
3845
|
on(F, U), yn(() => {
|
|
3842
|
-
const
|
|
3843
|
-
|
|
3844
|
-
}, [
|
|
3845
|
-
const X =
|
|
3846
|
+
const ce = P.current?.offsetWidth, Ee = P.current?.offsetHeight;
|
|
3847
|
+
ce != null && Ee != null && (A.height !== Ee || A.width !== ce) && H({ width: ce, height: Ee });
|
|
3848
|
+
}, [A.height, A.width]);
|
|
3849
|
+
const X = Nt(
|
|
3846
3850
|
e,
|
|
3847
3851
|
t,
|
|
3848
3852
|
r,
|
|
3849
3853
|
s,
|
|
3850
3854
|
a,
|
|
3851
|
-
|
|
3855
|
+
z
|
|
3852
3856
|
), {
|
|
3853
|
-
visiblePanel:
|
|
3857
|
+
visiblePanel: ae,
|
|
3854
3858
|
visibleMonth: oe,
|
|
3855
|
-
onValueChangeByInputs:
|
|
3856
|
-
selectedDate:
|
|
3859
|
+
onValueChangeByInputs: ue,
|
|
3860
|
+
selectedDate: W,
|
|
3857
3861
|
setVisibleMonth: ze,
|
|
3858
3862
|
setVisiblePanel: Me,
|
|
3859
3863
|
monthPickerButtonRef: De
|
|
3860
3864
|
} = X, Ke = y(
|
|
3861
|
-
(
|
|
3862
|
-
|
|
3865
|
+
(ce) => {
|
|
3866
|
+
ce.key === "Escape" && U();
|
|
3863
3867
|
},
|
|
3864
3868
|
[U]
|
|
3865
3869
|
);
|
|
3866
3870
|
return /* @__PURE__ */ _(
|
|
3867
|
-
|
|
3871
|
+
B,
|
|
3868
3872
|
{
|
|
3869
3873
|
position: "relative",
|
|
3870
3874
|
className: mt.travelDateInput,
|
|
3871
3875
|
ref: F,
|
|
3872
3876
|
onKeyDown: Ke,
|
|
3873
|
-
height:
|
|
3874
|
-
width:
|
|
3877
|
+
height: A.height,
|
|
3878
|
+
width: A.width,
|
|
3875
3879
|
children: [
|
|
3876
3880
|
/* @__PURE__ */ o(
|
|
3877
|
-
|
|
3881
|
+
B,
|
|
3878
3882
|
{
|
|
3879
3883
|
position: "absolute",
|
|
3880
3884
|
ref: P,
|
|
3881
|
-
zIndex:
|
|
3885
|
+
zIndex: $ ? v : b,
|
|
3882
3886
|
children: /* @__PURE__ */ o(
|
|
3883
3887
|
Pn,
|
|
3884
3888
|
{
|
|
3885
3889
|
...X,
|
|
3886
|
-
autoFocus:
|
|
3890
|
+
autoFocus: u,
|
|
3887
3891
|
value: e,
|
|
3888
|
-
onValueChange:
|
|
3892
|
+
onValueChange: ue,
|
|
3889
3893
|
localeCode: r,
|
|
3890
3894
|
label: n,
|
|
3891
|
-
onFocus:
|
|
3892
|
-
calendarSize:
|
|
3895
|
+
onFocus: G,
|
|
3896
|
+
calendarSize: k,
|
|
3893
3897
|
placeholderWhenBlurred: l,
|
|
3894
|
-
variant:
|
|
3898
|
+
variant: E,
|
|
3895
3899
|
readOnlyOnMobile: !0
|
|
3896
3900
|
}
|
|
3897
3901
|
)
|
|
3898
3902
|
}
|
|
3899
3903
|
),
|
|
3900
|
-
|
|
3901
|
-
|
|
3904
|
+
$ && /* @__PURE__ */ o(
|
|
3905
|
+
B,
|
|
3902
3906
|
{
|
|
3903
3907
|
position: "absolute",
|
|
3904
3908
|
zIndex: v - 1,
|
|
3905
3909
|
left: "-2.4rem",
|
|
3906
|
-
top:
|
|
3907
|
-
className:
|
|
3910
|
+
top: d ? "-8.0rem" : "-2.4rem",
|
|
3911
|
+
className: se(mt.overlay, M && mt.calendarVisible),
|
|
3908
3912
|
children: /* @__PURE__ */ o(
|
|
3909
|
-
|
|
3913
|
+
B,
|
|
3910
3914
|
{
|
|
3911
3915
|
background: "white",
|
|
3912
3916
|
shadow: "popover",
|
|
3913
3917
|
borderRadius: "var(--swui-border-radius-large)",
|
|
3914
|
-
children: /* @__PURE__ */ _(
|
|
3915
|
-
|
|
3916
|
-
/* @__PURE__ */ o(
|
|
3918
|
+
children: /* @__PURE__ */ _(un, { gap: 3, children: [
|
|
3919
|
+
d && /* @__PURE__ */ o(He, { variant: "h2", as: h, children: d }),
|
|
3920
|
+
/* @__PURE__ */ o(B, { height: q }),
|
|
3917
3921
|
/* @__PURE__ */ o(
|
|
3918
|
-
|
|
3922
|
+
it,
|
|
3919
3923
|
{
|
|
3920
3924
|
...X,
|
|
3921
|
-
previousMonthButtonAriaLabel:
|
|
3922
|
-
nextMonthButtonAriaLabel:
|
|
3923
|
-
calendarSize:
|
|
3925
|
+
previousMonthButtonAriaLabel: c,
|
|
3926
|
+
nextMonthButtonAriaLabel: i,
|
|
3927
|
+
calendarSize: k,
|
|
3924
3928
|
prevMonthDisabled: p,
|
|
3925
3929
|
nextMonthDisabled: D,
|
|
3926
|
-
previousMonthButtonTestId:
|
|
3930
|
+
previousMonthButtonTestId: T,
|
|
3927
3931
|
nextMonthButtonTestId: N
|
|
3928
3932
|
}
|
|
3929
3933
|
),
|
|
3930
|
-
|
|
3934
|
+
ae === "calendar" && /* @__PURE__ */ o(
|
|
3931
3935
|
lt,
|
|
3932
3936
|
{
|
|
3933
3937
|
...X,
|
|
3934
|
-
size:
|
|
3935
|
-
isValidDateRange: !!
|
|
3936
|
-
selectedStartDate:
|
|
3937
|
-
selectedEndDate:
|
|
3938
|
+
size: k,
|
|
3939
|
+
isValidDateRange: !!W,
|
|
3940
|
+
selectedStartDate: W,
|
|
3941
|
+
selectedEndDate: W,
|
|
3938
3942
|
multiSelectable: !1,
|
|
3939
3943
|
isDateDisabled: f,
|
|
3940
|
-
dateTestId:
|
|
3944
|
+
dateTestId: S,
|
|
3941
3945
|
hoverHighlightDirection: void 0
|
|
3942
3946
|
}
|
|
3943
3947
|
),
|
|
3944
|
-
|
|
3948
|
+
ae === "month-picker" && /* @__PURE__ */ o(
|
|
3945
3949
|
Ue,
|
|
3946
3950
|
{
|
|
3947
3951
|
firstMonth: C,
|
|
3948
3952
|
numMonths: g,
|
|
3949
3953
|
value: oe,
|
|
3950
|
-
size:
|
|
3954
|
+
size: k,
|
|
3951
3955
|
localeCode: r,
|
|
3952
|
-
onValueChange: (
|
|
3953
|
-
ze(
|
|
3956
|
+
onValueChange: (ce) => {
|
|
3957
|
+
ze(ce), Me("calendar"), De.current?.focus();
|
|
3954
3958
|
},
|
|
3955
3959
|
onCancel: () => {
|
|
3956
3960
|
Me("calendar"), De.current?.focus();
|
|
@@ -3973,11 +3977,11 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3973
3977
|
nextMonthButtonAriaLabel: r,
|
|
3974
3978
|
firstMonthInMonthPicker: s,
|
|
3975
3979
|
numMonthsInMonthPicker: a,
|
|
3976
|
-
isDateDisabled:
|
|
3977
|
-
prevMonthDisabled:
|
|
3980
|
+
isDateDisabled: c,
|
|
3981
|
+
prevMonthDisabled: i,
|
|
3978
3982
|
nextMonthDisabled: l,
|
|
3979
|
-
size:
|
|
3980
|
-
dateTestId:
|
|
3983
|
+
size: u,
|
|
3984
|
+
dateTestId: d,
|
|
3981
3985
|
previousMonthButtonTestId: h,
|
|
3982
3986
|
nextMonthButtonTestId: g,
|
|
3983
3987
|
calendarAriaLabel: f
|
|
@@ -3992,13 +3996,13 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
3992
3996
|
} = e;
|
|
3993
3997
|
return /* @__PURE__ */ _(tt, { children: [
|
|
3994
3998
|
/* @__PURE__ */ o(
|
|
3995
|
-
|
|
3999
|
+
it,
|
|
3996
4000
|
{
|
|
3997
4001
|
...e,
|
|
3998
4002
|
previousMonthButtonAriaLabel: n,
|
|
3999
4003
|
nextMonthButtonAriaLabel: r,
|
|
4000
|
-
calendarSize:
|
|
4001
|
-
prevMonthDisabled:
|
|
4004
|
+
calendarSize: u,
|
|
4005
|
+
prevMonthDisabled: i,
|
|
4002
4006
|
nextMonthDisabled: l,
|
|
4003
4007
|
previousMonthButtonTestId: h,
|
|
4004
4008
|
nextMonthButtonTestId: g
|
|
@@ -4008,13 +4012,13 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
4008
4012
|
lt,
|
|
4009
4013
|
{
|
|
4010
4014
|
...e,
|
|
4011
|
-
size:
|
|
4015
|
+
size: u,
|
|
4012
4016
|
selectedStartDate: m,
|
|
4013
4017
|
selectedEndDate: m,
|
|
4014
4018
|
isValidDateRange: !!m,
|
|
4015
|
-
isDateDisabled:
|
|
4019
|
+
isDateDisabled: c,
|
|
4016
4020
|
multiSelectable: !1,
|
|
4017
|
-
dateTestId:
|
|
4021
|
+
dateTestId: d,
|
|
4018
4022
|
hoverHighlightDirection: void 0,
|
|
4019
4023
|
ariaLabel: f
|
|
4020
4024
|
}
|
|
@@ -4026,7 +4030,7 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
4026
4030
|
numMonths: a,
|
|
4027
4031
|
value: D,
|
|
4028
4032
|
localeCode: t,
|
|
4029
|
-
size:
|
|
4033
|
+
size: u,
|
|
4030
4034
|
onValueChange: (w) => {
|
|
4031
4035
|
C(w), v("calendar"), b.current?.focus();
|
|
4032
4036
|
},
|
|
@@ -4036,18 +4040,18 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
4036
4040
|
}
|
|
4037
4041
|
)
|
|
4038
4042
|
] });
|
|
4039
|
-
},
|
|
4043
|
+
}, co = ({
|
|
4040
4044
|
value: e,
|
|
4041
4045
|
onValueChange: t,
|
|
4042
4046
|
label: n,
|
|
4043
4047
|
localeCode: r = "sv",
|
|
4044
4048
|
languageLocaleCode: s = r,
|
|
4045
4049
|
initialMonthInFocus: a,
|
|
4046
|
-
previousMonthButtonAriaLabel:
|
|
4047
|
-
nextMonthButtonAriaLabel:
|
|
4050
|
+
previousMonthButtonAriaLabel: c = "Previous month",
|
|
4051
|
+
nextMonthButtonAriaLabel: i = "Next month",
|
|
4048
4052
|
placeholderWhenBlurred: l,
|
|
4049
|
-
heading:
|
|
4050
|
-
headingLevel:
|
|
4053
|
+
heading: u,
|
|
4054
|
+
headingLevel: d,
|
|
4051
4055
|
numMonthsInMonthPicker: h = 12,
|
|
4052
4056
|
isDateDisabled: g,
|
|
4053
4057
|
prevMonthDisabled: f,
|
|
@@ -4058,42 +4062,42 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
4058
4062
|
previousMonthButtonTestId: b,
|
|
4059
4063
|
nextMonthButtonTestId: m,
|
|
4060
4064
|
textInputVariant: w = "standard",
|
|
4061
|
-
autoFocus:
|
|
4065
|
+
autoFocus: k
|
|
4062
4066
|
}) => {
|
|
4063
|
-
const
|
|
4067
|
+
const S = Nt(
|
|
4064
4068
|
e,
|
|
4065
4069
|
t,
|
|
4066
4070
|
r,
|
|
4067
4071
|
s,
|
|
4068
4072
|
a
|
|
4069
|
-
), { onValueChangeByInputs:
|
|
4073
|
+
), { onValueChangeByInputs: T } = S, N = I(
|
|
4070
4074
|
() => D ?? /* @__PURE__ */ new Date(),
|
|
4071
4075
|
[D]
|
|
4072
4076
|
);
|
|
4073
4077
|
return /* @__PURE__ */ _(J, { gap: 3, children: [
|
|
4074
|
-
|
|
4078
|
+
u && /* @__PURE__ */ o(He, { variant: "h2", as: d, children: u }),
|
|
4075
4079
|
/* @__PURE__ */ o(
|
|
4076
4080
|
Pn,
|
|
4077
4081
|
{
|
|
4078
|
-
...
|
|
4082
|
+
...S,
|
|
4079
4083
|
value: e,
|
|
4080
|
-
onValueChange:
|
|
4084
|
+
onValueChange: T,
|
|
4081
4085
|
localeCode: r,
|
|
4082
4086
|
label: n,
|
|
4083
4087
|
calendarSize: v,
|
|
4084
4088
|
placeholderWhenBlurred: l,
|
|
4085
4089
|
variant: w,
|
|
4086
4090
|
readOnlyOnMobile: !1,
|
|
4087
|
-
autoFocus:
|
|
4091
|
+
autoFocus: k
|
|
4088
4092
|
}
|
|
4089
4093
|
),
|
|
4090
4094
|
/* @__PURE__ */ o(
|
|
4091
4095
|
Fn,
|
|
4092
4096
|
{
|
|
4093
|
-
inputProps:
|
|
4097
|
+
inputProps: S,
|
|
4094
4098
|
languageLocaleCode: s,
|
|
4095
|
-
previousMonthButtonAriaLabel:
|
|
4096
|
-
nextMonthButtonAriaLabel:
|
|
4099
|
+
previousMonthButtonAriaLabel: c,
|
|
4100
|
+
nextMonthButtonAriaLabel: i,
|
|
4097
4101
|
firstMonthInMonthPicker: N,
|
|
4098
4102
|
numMonthsInMonthPicker: h,
|
|
4099
4103
|
isDateDisabled: g,
|
|
@@ -4106,18 +4110,18 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
4106
4110
|
}
|
|
4107
4111
|
)
|
|
4108
4112
|
] });
|
|
4109
|
-
},
|
|
4113
|
+
}, io = ({
|
|
4110
4114
|
value: e,
|
|
4111
4115
|
onValueChange: t,
|
|
4112
4116
|
localeCode: n = "sv",
|
|
4113
4117
|
languageLocaleCode: r = n,
|
|
4114
4118
|
initialMonthInFocus: s,
|
|
4115
4119
|
previousMonthButtonAriaLabel: a = "Previous month",
|
|
4116
|
-
nextMonthButtonAriaLabel:
|
|
4117
|
-
numMonthsInMonthPicker:
|
|
4120
|
+
nextMonthButtonAriaLabel: c = "Next month",
|
|
4121
|
+
numMonthsInMonthPicker: i = 12,
|
|
4118
4122
|
isDateDisabled: l,
|
|
4119
|
-
prevMonthDisabled:
|
|
4120
|
-
nextMonthDisabled:
|
|
4123
|
+
prevMonthDisabled: u,
|
|
4124
|
+
nextMonthDisabled: d,
|
|
4121
4125
|
firstMonthInMonthPicker: h,
|
|
4122
4126
|
dateTestId: g,
|
|
4123
4127
|
size: f = "medium",
|
|
@@ -4125,13 +4129,13 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
4125
4129
|
nextMonthButtonTestId: D,
|
|
4126
4130
|
calendarAriaLabel: C
|
|
4127
4131
|
}) => {
|
|
4128
|
-
const v =
|
|
4132
|
+
const v = Nt(
|
|
4129
4133
|
e,
|
|
4130
4134
|
t,
|
|
4131
4135
|
n,
|
|
4132
4136
|
r,
|
|
4133
4137
|
s
|
|
4134
|
-
), b =
|
|
4138
|
+
), b = I(
|
|
4135
4139
|
() => h ?? /* @__PURE__ */ new Date(),
|
|
4136
4140
|
[h]
|
|
4137
4141
|
);
|
|
@@ -4141,12 +4145,12 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
4141
4145
|
inputProps: v,
|
|
4142
4146
|
languageLocaleCode: r,
|
|
4143
4147
|
previousMonthButtonAriaLabel: a,
|
|
4144
|
-
nextMonthButtonAriaLabel:
|
|
4148
|
+
nextMonthButtonAriaLabel: c,
|
|
4145
4149
|
firstMonthInMonthPicker: b,
|
|
4146
|
-
numMonthsInMonthPicker:
|
|
4150
|
+
numMonthsInMonthPicker: i,
|
|
4147
4151
|
isDateDisabled: l,
|
|
4148
|
-
prevMonthDisabled:
|
|
4149
|
-
nextMonthDisabled:
|
|
4152
|
+
prevMonthDisabled: u,
|
|
4153
|
+
nextMonthDisabled: d,
|
|
4150
4154
|
size: f,
|
|
4151
4155
|
dateTestId: g,
|
|
4152
4156
|
previousMonthButtonTestId: p,
|
|
@@ -4161,11 +4165,11 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
4161
4165
|
endDateLabel: r,
|
|
4162
4166
|
localeCode: s = "sv",
|
|
4163
4167
|
languageLocaleCode: a = s,
|
|
4164
|
-
initialMonthInFocus:
|
|
4165
|
-
previousMonthButtonAriaLabel:
|
|
4168
|
+
initialMonthInFocus: c,
|
|
4169
|
+
previousMonthButtonAriaLabel: i = "Previous month",
|
|
4166
4170
|
nextMonthButtonAriaLabel: l = "Next month",
|
|
4167
|
-
heading:
|
|
4168
|
-
headingLevel:
|
|
4171
|
+
heading: u,
|
|
4172
|
+
headingLevel: d,
|
|
4169
4173
|
numMonthsInMonthPicker: h = 12,
|
|
4170
4174
|
isDateDisabled: g,
|
|
4171
4175
|
prevMonthDisabled: f,
|
|
@@ -4176,61 +4180,61 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
4176
4180
|
previousMonthButtonTestId: b,
|
|
4177
4181
|
nextMonthButtonTestId: m,
|
|
4178
4182
|
placeholderWhenBlurredStartDate: w,
|
|
4179
|
-
placeholderWhenBlurredEndDate:
|
|
4180
|
-
textInputVariant:
|
|
4181
|
-
autoFocusStartDate:
|
|
4183
|
+
placeholderWhenBlurredEndDate: k,
|
|
4184
|
+
textInputVariant: S = "standard",
|
|
4185
|
+
autoFocusStartDate: T,
|
|
4182
4186
|
autoFocusEndDate: N
|
|
4183
4187
|
}) => {
|
|
4184
|
-
const [
|
|
4185
|
-
P === "startDate" ?
|
|
4186
|
-
}, []),
|
|
4188
|
+
const [E, M] = R(void 0), L = O(null), $ = O(null), j = y((P) => {
|
|
4189
|
+
P === "startDate" ? L.current?.focus() : P === "endDate" && $.current?.focus();
|
|
4190
|
+
}, []), A = An(
|
|
4187
4191
|
e,
|
|
4188
4192
|
t,
|
|
4189
4193
|
s,
|
|
4190
4194
|
a,
|
|
4191
|
-
|
|
4192
|
-
|
|
4195
|
+
c,
|
|
4196
|
+
E,
|
|
4193
4197
|
M,
|
|
4194
|
-
|
|
4198
|
+
j,
|
|
4195
4199
|
void 0
|
|
4196
|
-
),
|
|
4200
|
+
), H = y((P) => {
|
|
4197
4201
|
M(P);
|
|
4198
4202
|
}, []), {
|
|
4199
|
-
visiblePanel:
|
|
4203
|
+
visiblePanel: q,
|
|
4200
4204
|
visibleMonth: x,
|
|
4201
|
-
onValueChangeByInputs:
|
|
4205
|
+
onValueChangeByInputs: G,
|
|
4202
4206
|
setVisibleMonth: U,
|
|
4203
|
-
setVisiblePanel:
|
|
4207
|
+
setVisiblePanel: z,
|
|
4204
4208
|
monthPickerButtonRef: F
|
|
4205
|
-
} =
|
|
4209
|
+
} = A;
|
|
4206
4210
|
return /* @__PURE__ */ _(J, { gap: 3, children: [
|
|
4207
|
-
|
|
4211
|
+
u && /* @__PURE__ */ o(He, { variant: "h2", as: d, children: u }),
|
|
4208
4212
|
/* @__PURE__ */ o(
|
|
4209
4213
|
Ln,
|
|
4210
4214
|
{
|
|
4211
|
-
...
|
|
4215
|
+
...A,
|
|
4212
4216
|
value: e,
|
|
4213
|
-
onValueChange:
|
|
4214
|
-
startDateRef:
|
|
4215
|
-
endDateRef:
|
|
4217
|
+
onValueChange: G,
|
|
4218
|
+
startDateRef: L,
|
|
4219
|
+
endDateRef: $,
|
|
4216
4220
|
localeCode: s,
|
|
4217
4221
|
startDateLabel: n,
|
|
4218
4222
|
endDateLabel: r,
|
|
4219
|
-
onFocus:
|
|
4223
|
+
onFocus: H,
|
|
4220
4224
|
calendarSize: C,
|
|
4221
4225
|
placeholderWhenBlurredStartDate: w,
|
|
4222
|
-
placeholderWhenBlurredEndDate:
|
|
4223
|
-
variant:
|
|
4224
|
-
autoFocusStartDate:
|
|
4226
|
+
placeholderWhenBlurredEndDate: k,
|
|
4227
|
+
variant: S,
|
|
4228
|
+
autoFocusStartDate: T,
|
|
4225
4229
|
autoFocusEndDate: N,
|
|
4226
4230
|
readOnlyOnMobile: !1
|
|
4227
4231
|
}
|
|
4228
4232
|
),
|
|
4229
4233
|
/* @__PURE__ */ o(
|
|
4230
|
-
|
|
4234
|
+
it,
|
|
4231
4235
|
{
|
|
4232
|
-
...
|
|
4233
|
-
previousMonthButtonAriaLabel:
|
|
4236
|
+
...A,
|
|
4237
|
+
previousMonthButtonAriaLabel: i,
|
|
4234
4238
|
nextMonthButtonAriaLabel: l,
|
|
4235
4239
|
calendarSize: C,
|
|
4236
4240
|
prevMonthDisabled: f,
|
|
@@ -4239,17 +4243,17 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
4239
4243
|
nextMonthButtonTestId: m
|
|
4240
4244
|
}
|
|
4241
4245
|
),
|
|
4242
|
-
|
|
4246
|
+
q === "calendar" && /* @__PURE__ */ o(
|
|
4243
4247
|
lt,
|
|
4244
4248
|
{
|
|
4245
|
-
...
|
|
4249
|
+
...A,
|
|
4246
4250
|
size: C,
|
|
4247
4251
|
multiSelectable: !0,
|
|
4248
4252
|
isDateDisabled: g,
|
|
4249
4253
|
dateTestId: v
|
|
4250
4254
|
}
|
|
4251
4255
|
),
|
|
4252
|
-
|
|
4256
|
+
q === "month-picker" && /* @__PURE__ */ o(
|
|
4253
4257
|
Ue,
|
|
4254
4258
|
{
|
|
4255
4259
|
firstMonth: D,
|
|
@@ -4258,10 +4262,10 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
4258
4262
|
size: C,
|
|
4259
4263
|
localeCode: a,
|
|
4260
4264
|
onValueChange: (P) => {
|
|
4261
|
-
U(P),
|
|
4265
|
+
U(P), z("calendar"), F.current?.focus();
|
|
4262
4266
|
},
|
|
4263
4267
|
onCancel: () => {
|
|
4264
|
-
|
|
4268
|
+
z("calendar"), F.current?.focus();
|
|
4265
4269
|
}
|
|
4266
4270
|
}
|
|
4267
4271
|
)
|
|
@@ -4269,13 +4273,13 @@ const An = (e, t, n, r, s, a, i, c, l) => {
|
|
|
4269
4273
|
}, uo = () => {
|
|
4270
4274
|
const e = xe();
|
|
4271
4275
|
return y(
|
|
4272
|
-
(t) => !Y(t, e) &&
|
|
4276
|
+
(t) => !Y(t, e) && Ne(t, e),
|
|
4273
4277
|
[e]
|
|
4274
4278
|
);
|
|
4275
4279
|
}, fo = () => {
|
|
4276
4280
|
const e = xe();
|
|
4277
4281
|
return y(
|
|
4278
|
-
(t) => me(e, t) ||
|
|
4282
|
+
(t) => me(e, t) || Ne(t, e),
|
|
4279
4283
|
[e]
|
|
4280
4284
|
);
|
|
4281
4285
|
};
|
|
@@ -4292,11 +4296,11 @@ export {
|
|
|
4292
4296
|
Ue as MonthPicker,
|
|
4293
4297
|
Ja as MultiDateCalendar,
|
|
4294
4298
|
Zr as PresetPicker,
|
|
4295
|
-
|
|
4299
|
+
Tn as SingleDateCalendar,
|
|
4296
4300
|
Qa as SingleWeekCalendar,
|
|
4297
4301
|
to as TimeTextInput,
|
|
4298
|
-
|
|
4299
|
-
|
|
4302
|
+
co as TravelDateCalendar,
|
|
4303
|
+
io as TravelDateCalendarPanel,
|
|
4300
4304
|
oo as TravelDateInput,
|
|
4301
4305
|
lo as TravelDateRangeCalendar,
|
|
4302
4306
|
ao as TravelDateRangeInput,
|
|
@@ -4311,43 +4315,43 @@ export {
|
|
|
4311
4315
|
Ye as buildDayStateForDateRange,
|
|
4312
4316
|
yr as buildDayStateForRange,
|
|
4313
4317
|
wr as buildDayStateForSingleMonth,
|
|
4314
|
-
|
|
4315
|
-
|
|
4318
|
+
Tr as calculateOverflowingMonth,
|
|
4319
|
+
Ir as createDay,
|
|
4316
4320
|
ss as dateRangeToStrings,
|
|
4317
|
-
|
|
4318
|
-
|
|
4321
|
+
Nr as dayHasHighlight,
|
|
4322
|
+
de as dayHighlightSelect,
|
|
4319
4323
|
ke as defaultCalendarTheme,
|
|
4320
4324
|
Er as defaultTextPropsProvider,
|
|
4321
|
-
|
|
4325
|
+
Br as defaultWrapperStyleProvider,
|
|
4322
4326
|
Va as extranetCalendarTheme,
|
|
4323
4327
|
Sn as fallbackLocaleCode,
|
|
4324
4328
|
ja as fallbackLocaleCodeForFormatting,
|
|
4325
4329
|
be as formatLocalizedDate,
|
|
4326
|
-
|
|
4327
|
-
|
|
4330
|
+
Be as getDateFormatForLocaleCode,
|
|
4331
|
+
Rr as getDaysForWeekForDate,
|
|
4328
4332
|
za as getDefaultLocaleForFormatting,
|
|
4329
4333
|
zr as getLocaleCodeForLocale,
|
|
4330
|
-
|
|
4334
|
+
Te as getLocaleForLocaleCode,
|
|
4331
4335
|
ot as getMonthInYear,
|
|
4332
4336
|
Jt as getMonthsInYear,
|
|
4333
4337
|
Mn as getSupportedLocaleCode,
|
|
4334
4338
|
jr as getSupportedLocaleCodeMatchingLanguage,
|
|
4335
4339
|
_t as getWeekForDate,
|
|
4336
4340
|
Mr as getWeeksForMonth,
|
|
4337
|
-
|
|
4338
|
-
|
|
4341
|
+
In as isDateRangeInvalid,
|
|
4342
|
+
ie as parseLocalizedDateString,
|
|
4339
4343
|
yt as reformatLocalizedDateString,
|
|
4340
4344
|
Wa as setDayStateValue,
|
|
4341
4345
|
$a as setDayStateValueFunction,
|
|
4342
4346
|
as as stringsToDateRange,
|
|
4343
4347
|
Ka as toggleDateStringsIfEndIsEarlierThanStart,
|
|
4344
|
-
|
|
4348
|
+
Rn as toggleDatesIfEndIsEarlierThanStart,
|
|
4345
4349
|
Ga as useDateRangeCalendarState,
|
|
4346
|
-
|
|
4350
|
+
cs as useDateRangeSelection,
|
|
4347
4351
|
uo as useDisabledBeforeToday,
|
|
4348
4352
|
ls as useMultiDateSelection,
|
|
4349
4353
|
fo as usePrevMonthDisabledBeforeToday,
|
|
4350
|
-
|
|
4351
|
-
|
|
4354
|
+
is as useSingleDateSelection,
|
|
4355
|
+
us as useSingleWeekSelection
|
|
4352
4356
|
};
|
|
4353
4357
|
//# sourceMappingURL=index.es.js.map
|