@stenajs-webui/calendar 23.10.0 → 23.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/calendar-types/travel-date-calendar/TravelDateCalendar.d.ts +1 -0
- package/dist/components/calendar-types/travel-date-range-calendar/TravelDateRangeCalendar.d.ts +2 -0
- package/dist/components/input-types/travel-date-input/TravelDateInput.d.ts +1 -0
- package/dist/components/input-types/travel-date-range-input/TravelDateRangeInput.d.ts +2 -0
- package/dist/features/travel-calendar/components/TravelDateRangeTextInputFields.d.ts +2 -0
- package/dist/features/travel-calendar/components/TravelDateTextInput.d.ts +1 -0
- package/dist/features/travel-calendar/components/TravelDateTextInputField.d.ts +1 -0
- package/dist/index.es.js +1452 -1431
- 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,46 +1,46 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._calendar_hknk7_1{--swui-calendar-day-width: 48px;--swui-calendar-day-height: 48px;--swui-calendar-day-border-radius: var(--swui-max-border-radius);--swui-calendar-week-number-bg-color: transparent;--swui-calendar-week-number-text-color: var(--lhds-color-ui-500);--swui-calendar-week-number-clickable-text-color: var(--lhds-color-ui-500);--swui-calendar-week-day-text-color: var(--lhds-color-ui-500);--swui-calendar-week-day-clickable-text-color: var(--lhds-color-ui-500);--swui-calendar-wrapper-selected-border: var(--modern-blue);--swui-calendar-wrapper-selected-background: var(--modern-blue);--swui-calendar-wrapper-range-border: var(--lhds-color-blue-100);--swui-calendar-wrapper-range-background: var(--lhds-color-blue-100);--swui-calendar-wrapper-today-border: var(--lhds-color-ui-200);--swui-calendar-wrapper-today-background: var(--lhds-color-ui-50);--swui-calendar-text-selected-color: #fff;--swui-calendar-text-disabled-color: var(--swui-text-disabled-color);--swui-calendar-text-in-other-month-color: var(--swui-text-disabled-color)}._calendar_hknk7_1 table{border-spacing:0 4px}._calendar_hknk7_1 tr td:last-child{border-top-right-radius:var(--swui-calendar-day-border-radius);border-bottom-right-radius:var(--swui-calendar-day-border-radius)}._calendar_hknk7_1._weekNumberVisible_hknk7_41 tr td:nth-child(2),._calendar_hknk7_1:not(._weekNumberVisible_hknk7_41) tr td:first-child{border-top-left-radius:var(--swui-calendar-day-border-radius);border-bottom-left-radius:var(--swui-calendar-day-border-radius)}._calendar_hknk7_1 td{padding:0;width:var(--swui-calendar-day-width);height:var(--swui-calendar-day-height)}._timePicker_1w05d_1{overflow:hidden;width:180px}._timePickerColumn_1w05d_6{overflow-y:hidden;flex:1}._timePickerColumn_1w05d_6:hover{overflow-y:scroll}._travelDateCell_1t2af_1{position:relative}._travelDateCell_1t2af_1._smaller_1t2af_4{width:40px;height:40px}._travelDateCell_1t2af_1._small_1t2af_4{width:44px;height:44px}._travelDateCell_1t2af_1._medium_1t2af_14{width:48px;height:48px}._travelDateCell_1t2af_1._large_1t2af_19{width:56px;height:28px}._travelDateCell_1t2af_1{border-radius:var(--swui-max-border-radius)}._travelDateCell_1t2af_1:focus{outline:none}._travelDateCell_1t2af_1:focus-visible ._outline_1t2af_31{outline:var(--swui-focus-outline);outline-width:var(--swui-focus-outline-width);background:transparent;position:absolute;border-radius:var(--swui-max-border-radius);inset:0;z-index:10}._travelDateCell_1t2af_1:focus-visible ._contentWrapper_1t2af_44._contentWrapper_1t2af_44._contentWrapper_1t2af_44{border-color:transparent}._travelDateCell_1t2af_1 ._contentWrapper_1t2af_44{cursor:pointer;border-radius:var(--swui-max-border-radius);border-width:2px;border-style:solid;border-color:transparent;background:transparent;position:absolute;display:flex;align-items:center;justify-content:center;inset:0}._travelDateCell_1t2af_1 ._contentWrapper_1t2af_44._disabled_1t2af_65{cursor:not-allowed}._travelDateCell_1t2af_1 ._contentWrapper_1t2af_44._isToday_1t2af_68{border-color:var(--lhds-color-ui-400)}._travelDateCell_1t2af_1 ._contentWrapper_1t2af_44._isSelectionStart_1t2af_72,._travelDateCell_1t2af_1 ._contentWrapper_1t2af_44._isSelectionEnd_1t2af_73{border-color:var(--selection-background-color)}._travelDateCell_1t2af_1 ._contentWrapper_1t2af_44._isSelectionStart_1t2af_72{background:var(--selection-background-color)}._travelDateCell_1t2af_1 ._contentWrapper_1t2af_44._isSelectionStart_1t2af_72 span{color:#fff}._travelDateCell_1t2af_1 ._contentWrapper_1t2af_44._isSelectionEnd_1t2af_73:not(._isSelectionStart_1t2af_72){background:#fff}._travelDateCell_1t2af_1 ._contentWrapper_1t2af_44._hover_1t2af_88{border-color:var(--selection-background-color)}._travelDateCell_1t2af_1 ._contentWrapper_1t2af_44._hover_1t2af_88._startSelected_1t2af_91:not(._endSelected_1t2af_91):not(._isSelectionStart_1t2af_72){background:#fff}._travelDateCell_1t2af_1 ._contentWrapper_1t2af_44._hover_1t2af_88._startSelected_1t2af_91:not(._endSelected_1t2af_91):not(._isSelectionStart_1t2af_72) span{color:var(--swui-text-primary-color)}._travelDateCellBackground_45q5d_1._smaller_45q5d_2{width:20px;height:40px}._travelDateCellBackground_45q5d_1._small_45q5d_2{width:22px;height:44px}._travelDateCellBackground_45q5d_1._medium_45q5d_12{width:24px;height:48px}._travelDateCellBackground_45q5d_1._large_45q5d_17{width:28px;height:56px}._travelCalendar_ib2y4_1{border-spacing:0 4px;width:-webkit-fit-content;width:fit-content;--selection-background-color: var( --travel-calendar-selection-background-color, var(--modern-blue) );--selection-range-background-color: var( --travel-calendar-selection-range-background-color, var(--himmel) )}._travelCalendar_ib2y4_1 td{padding:0}._travelDateRangeInput_1j7rp_1 ._overlay_1j7rp_2{transition:opacity var(--swui-animation-time-fast) ease-in-out;opacity:1}._travelDateRangeInput_1j7rp_1 ._overlay_1j7rp_2:not(._travelDateRangeInput_1j7rp_1 ._overlay_1j7rp_2._calendarVisible_1j7rp_6){opacity:0}._travelDateInput_hmfbf_1 ._overlay_hmfbf_2{transition:opacity var(--swui-animation-time-fast) ease-in-out;opacity:1}._travelDateInput_hmfbf_1 ._overlay_hmfbf_2:not(._travelDateInput_hmfbf_1 ._overlay_hmfbf_2._calendarVisible_hmfbf_6){opacity:0}")),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
import { jsx as s, jsxs as
|
|
3
|
-
import { Box as L, Text as De, Clickable as
|
|
4
|
-
import { FlatButton as Q, stenaAngleDown as
|
|
5
|
-
import { isAfter as G, eachDayOfInterval as
|
|
6
|
-
import { enGB as
|
|
7
|
-
import { last as
|
|
8
|
-
import * as
|
|
9
|
-
import { useMemo as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { TextInput as pe, TextInputBox as
|
|
2
|
+
import { jsx as s, jsxs as T, Fragment as yt } from "react/jsx-runtime";
|
|
3
|
+
import { Box as L, Text as De, Clickable as nr, Row as z, Spacing as Pr, useToday as Ie, Column as Z, Heading as He, exhaustSwitchCase as wt, Space as Se, Indent as Ae, SeparatorLine as Yr, parseIntElseUndefined as Et, useBoolean as ht, useDelayedFalse as Lt, useOnClickOutside as ar } from "@stenajs-webui/core";
|
|
4
|
+
import { FlatButton as Q, stenaAngleDown as Dt, PrimaryButton as Re, stenaAngleLeft as Hr, stenaAngleRight as Wr, SecondaryButton as fe, stenaAngleLeftDouble as Or, stenaArrowLeft as tt, stenaArrowRight as We, stenaAngleRightDouble as $r, TextInputButton as Ur, stenaCalendar as Fe, Icon as or, stenaArrowWideRight as zr, stenaClock as sr, Label as Vr, BaseButton as jr, stenaBellFilled as qr, MenuButton as Kr, stenaAngleUp as Gr, CardBody as ir } from "@stenajs-webui/elements";
|
|
5
|
+
import { isAfter as G, eachDayOfInterval as lr, isSameDay as F, endOfMonth as cr, startOfMonth as dr, min as ur, addDays as te, max as _r, subDays as ve, format as j, getISOWeek as kt, getDate as rt, startOfWeek as Ze, addWeeks as Jr, getMonth as ye, getYear as Pe, getWeek as fr, getISODay as Zr, addHours as hr, isBefore as Te, parse as we, addMonths as Oe, isSameMonth as ge, addYears as Qr, subMonths as xt, subYears as Xr, setWeek as en, isValid as tn, isSameYear as rn, intlFormat as gr, isWithinInterval as nn } from "date-fns";
|
|
6
|
+
import { enGB as Qe, pl as At, fr as Ft, es as Pt, cs as Yt, fi as Ht, et as Wt, it as Ot, lt as $t, lv as Ut, da as zt, sv as Vt, nb as jt, de as qt, nl as Kt, nlBE as an, deAT as on, enIE as sn, enUS as ln } from "date-fns/locale";
|
|
7
|
+
import { last as cn, chunk as pr, debounce as dn, padStart as un, range as Ct } from "lodash-es";
|
|
8
|
+
import * as St from "react";
|
|
9
|
+
import { useMemo as I, useRef as $, useEffect as ae, useCallback as v, useId as Bt, useState as C, forwardRef as Mt, createContext as _n, useLayoutEffect as mr } from "react";
|
|
10
|
+
import oe from "classnames";
|
|
11
|
+
import ct from "@emotion/styled";
|
|
12
|
+
import { TextInput as pe, TextInputBox as fn, LabelledTextInput as hn } from "@stenajs-webui/forms";
|
|
13
13
|
import { ControlledPopover as $e } from "@stenajs-webui/tooltip";
|
|
14
|
-
import { cssColor as
|
|
15
|
-
import { useMaskedInput as
|
|
16
|
-
import { useMediaQuery as
|
|
17
|
-
const
|
|
14
|
+
import { cssColor as It } from "@stenajs-webui/theme";
|
|
15
|
+
import { useMaskedInput as gn } from "@stenajs-webui/input-mask";
|
|
16
|
+
import { useMediaQuery as Ke } from "react-responsive";
|
|
17
|
+
const de = {
|
|
18
18
|
yearAndMonth: "yyyy-MM",
|
|
19
19
|
fullDate: "yyyy-MM-dd",
|
|
20
20
|
fullMonthName: "LLLL"
|
|
21
21
|
}, Ye = (e = {}, t, r) => {
|
|
22
22
|
if (t && r && G(r, t))
|
|
23
|
-
return
|
|
23
|
+
return lr({ start: t, end: r }).reduce(
|
|
24
24
|
(a, o) => {
|
|
25
|
-
const i =
|
|
25
|
+
const i = F(o, t), l = F(o, r);
|
|
26
26
|
return he(a, o, i ? ["selected", "selectedStart", "range"] : l ? ["selected", "selectedEnd", "range"] : ["range"]);
|
|
27
27
|
},
|
|
28
28
|
e
|
|
29
29
|
);
|
|
30
30
|
let n = e;
|
|
31
31
|
return t && (n = he(n, t, ["selected", "singleSelected"])), r && (n = he(n, r, ["selected", "singleSelected"])), n;
|
|
32
|
-
},
|
|
32
|
+
}, pn = (e = {}, t, r, n) => mn(
|
|
33
33
|
e,
|
|
34
34
|
t,
|
|
35
35
|
r,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
),
|
|
36
|
+
dr(n),
|
|
37
|
+
cr(n)
|
|
38
|
+
), mn = (e = {}, t, r, n, a) => t && r ? Ye(
|
|
39
39
|
e,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
) : Ye(e, t, r),
|
|
43
|
-
const n =
|
|
40
|
+
_r([t, ve(n, 1)]),
|
|
41
|
+
ur([r, te(a, 1)])
|
|
42
|
+
) : Ye(e, t, r), Po = (e, t, r) => {
|
|
43
|
+
const n = j(t, de.yearAndMonth), a = kt(t), o = rt(t);
|
|
44
44
|
return {
|
|
45
45
|
...e,
|
|
46
46
|
[n]: {
|
|
@@ -54,8 +54,8 @@ const ue = {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
-
},
|
|
58
|
-
const n =
|
|
57
|
+
}, Yo = (e, t, r) => {
|
|
58
|
+
const n = j(t, de.yearAndMonth), a = kt(t), o = rt(t);
|
|
59
59
|
return {
|
|
60
60
|
...e,
|
|
61
61
|
[n]: {
|
|
@@ -72,21 +72,21 @@ const ue = {
|
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
}, he = (e, t, r) => {
|
|
75
|
-
const n = t.getMonth() + 1, a = `${t.getFullYear()}-${n < 10 ? "0" : ""}${n}`, o =
|
|
75
|
+
const n = t.getMonth() + 1, a = `${t.getFullYear()}-${n < 10 ? "0" : ""}${n}`, o = kt(t), i = rt(t), l = e && e[a] && e[a][o] && e[a][o][i];
|
|
76
76
|
return {
|
|
77
77
|
...e,
|
|
78
78
|
[a]: {
|
|
79
79
|
...e && e[a],
|
|
80
80
|
[o]: {
|
|
81
81
|
...e && e[a] && e[a][o],
|
|
82
|
-
[i]:
|
|
82
|
+
[i]: br(l, r)
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
|
-
},
|
|
86
|
+
}, br = (e, t) => ({
|
|
87
87
|
...e,
|
|
88
88
|
highlights: [...e?.highlights ?? [], ...t]
|
|
89
|
-
}),
|
|
89
|
+
}), Ho = (e, t, r) => {
|
|
90
90
|
const n = t.days[0].date, a = n.getMonth() + 1, o = `${n.getFullYear()}-${a < 10 ? "0" : ""}${a}`, i = t.weekNumber;
|
|
91
91
|
let l = e;
|
|
92
92
|
t.days.forEach((f) => {
|
|
@@ -103,77 +103,77 @@ const ue = {
|
|
|
103
103
|
[i]: u
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
|
-
},
|
|
106
|
+
}, bn = (e, t) => {
|
|
107
107
|
if (!t.days.length)
|
|
108
108
|
return { ...e };
|
|
109
|
-
const r = t.days[0].date, n =
|
|
109
|
+
const r = t.days[0].date, n = cn(t.days)?.date;
|
|
110
110
|
return {
|
|
111
111
|
...Ye(e, r, n)
|
|
112
112
|
};
|
|
113
|
-
},
|
|
114
|
-
var
|
|
115
|
-
const
|
|
113
|
+
}, vn = (e, t) => I(() => e ? he(t, /* @__PURE__ */ new Date(), ["today"]) : t, [e, t]), nt = (e) => e.length === 0 ? e : e.length === 1 ? e.toUpperCase() : e.charAt(0).toUpperCase() + e.slice(1);
|
|
114
|
+
var yn = /* @__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))(yn || {}), wn = /* @__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))(wn || {});
|
|
115
|
+
const Gt = (e, t, r, n) => {
|
|
116
116
|
const a = [];
|
|
117
117
|
for (let o = 0; o < r; o++)
|
|
118
|
-
a.push(
|
|
118
|
+
a.push(at(e, t + o, n));
|
|
119
119
|
return a;
|
|
120
|
-
},
|
|
120
|
+
}, at = (e, t, r) => {
|
|
121
121
|
if (isNaN(e) || isNaN(t))
|
|
122
122
|
throw new Error("getMonthInYear() received NaN.");
|
|
123
123
|
const n = e + Math.floor(t / 12), a = t % 12, o = new Date(n, a, 1);
|
|
124
124
|
return {
|
|
125
|
-
monthString:
|
|
126
|
-
name:
|
|
127
|
-
|
|
125
|
+
monthString: j(o, de.yearAndMonth),
|
|
126
|
+
name: nt(
|
|
127
|
+
j(o, de.fullMonthName, { locale: r })
|
|
128
128
|
),
|
|
129
129
|
year: n,
|
|
130
130
|
monthInYear: a,
|
|
131
|
-
weeks:
|
|
131
|
+
weeks: Dn(n, a, r)
|
|
132
132
|
};
|
|
133
|
-
},
|
|
134
|
-
const a = new Date(e, t, 1), o =
|
|
133
|
+
}, Dn = (e, t, r, n = !0) => {
|
|
134
|
+
const a = new Date(e, t, 1), o = Ze(a, { locale: r }), i = [];
|
|
135
135
|
for (let l = 0; l < 6; l++) {
|
|
136
|
-
const c =
|
|
136
|
+
const c = Rt(Jr(o, l), r);
|
|
137
137
|
if (l > 0 && c.startMonth !== t && !n)
|
|
138
138
|
return i;
|
|
139
139
|
i.push(c);
|
|
140
140
|
}
|
|
141
141
|
return i;
|
|
142
|
-
},
|
|
143
|
-
const r = ye(
|
|
142
|
+
}, Rt = (e, t) => {
|
|
143
|
+
const r = ye(te(e, 7)) !== ye(e);
|
|
144
144
|
return {
|
|
145
|
-
weekNumber:
|
|
145
|
+
weekNumber: fr(e, { locale: t }),
|
|
146
146
|
startMonth: ye(e),
|
|
147
147
|
startYear: Pe(e),
|
|
148
|
-
endMonth: ye(
|
|
149
|
-
endYear: Pe(
|
|
150
|
-
days:
|
|
148
|
+
endMonth: ye(te(e, 6)),
|
|
149
|
+
endYear: Pe(te(e, 6)),
|
|
150
|
+
days: xn(e, t),
|
|
151
151
|
isLastWeekOfMonth: r
|
|
152
152
|
};
|
|
153
|
-
},
|
|
154
|
-
const r =
|
|
153
|
+
}, kn = (e, t) => {
|
|
154
|
+
const r = Zr(e);
|
|
155
155
|
return {
|
|
156
156
|
date: e,
|
|
157
|
-
name:
|
|
158
|
-
fullName:
|
|
159
|
-
dateString:
|
|
160
|
-
weekNumber:
|
|
157
|
+
name: j(e, "EEE", t ? { locale: t } : void 0),
|
|
158
|
+
fullName: j(e, "EEEE", t ? { locale: t } : void 0),
|
|
159
|
+
dateString: j(hr(e, 12), de.fullDate),
|
|
160
|
+
weekNumber: fr(e, { locale: t }),
|
|
161
161
|
year: Pe(e),
|
|
162
162
|
month: ye(e),
|
|
163
|
-
dayOfMonth:
|
|
163
|
+
dayOfMonth: rt(e),
|
|
164
164
|
dayOfWeek: r,
|
|
165
165
|
isFirstDayOfWeek: r === 1,
|
|
166
166
|
isLastDayOfWeek: r === 7,
|
|
167
|
-
isFirstDayOfMonth:
|
|
168
|
-
isLastDayOfMonth:
|
|
167
|
+
isFirstDayOfMonth: F(dr(e), e),
|
|
168
|
+
isLastDayOfMonth: F(cr(e), e)
|
|
169
169
|
};
|
|
170
|
-
},
|
|
170
|
+
}, xn = (e, t) => lr({
|
|
171
171
|
start: e,
|
|
172
|
-
end:
|
|
173
|
-
}).map((r) =>
|
|
174
|
-
calendar:
|
|
175
|
-
weekNumberVisible:
|
|
176
|
-
},
|
|
172
|
+
end: te(e, 6)
|
|
173
|
+
}).map((r) => kn(r, t)), Cn = (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 }, Sn = "_calendar_hknk7_1", Bn = "_weekNumberVisible_hknk7_41", Jt = {
|
|
174
|
+
calendar: Sn,
|
|
175
|
+
weekNumberVisible: Bn
|
|
176
|
+
}, Mn = (e, t, r) => !!(t && t.indexOf(r) >= 0 || e && e.highlights && e.highlights.indexOf(r) >= 0), _e = (e, t, r, n, a) => {
|
|
177
177
|
if (r.length !== n.length)
|
|
178
178
|
throw new Error(
|
|
179
179
|
"Select highlight failed, number of values do not equal number of highlights."
|
|
@@ -181,14 +181,14 @@ const Kt = (e, t, r, n) => {
|
|
|
181
181
|
if (r.length === 0)
|
|
182
182
|
return a;
|
|
183
183
|
for (let o = 0; o < r.length; o++)
|
|
184
|
-
if (typeof r[o] == "boolean" && r[o] || typeof r[o] == "string" &&
|
|
184
|
+
if (typeof r[o] == "boolean" && r[o] || typeof r[o] == "string" && Mn(
|
|
185
185
|
e,
|
|
186
186
|
t,
|
|
187
187
|
r[o]
|
|
188
188
|
))
|
|
189
189
|
return n[o];
|
|
190
190
|
return a;
|
|
191
|
-
},
|
|
191
|
+
}, In = ({
|
|
192
192
|
selectedBackground: e,
|
|
193
193
|
todayBackground: t,
|
|
194
194
|
rangeBackground: r,
|
|
@@ -261,7 +261,7 @@ const Kt = (e, t, r, n) => {
|
|
|
261
261
|
"unset"
|
|
262
262
|
),
|
|
263
263
|
boxSizing: "border-box"
|
|
264
|
-
}),
|
|
264
|
+
}), Rn = ({
|
|
265
265
|
selectedColor: e,
|
|
266
266
|
disabledColor: t,
|
|
267
267
|
inOtherMonthColor: r,
|
|
@@ -295,12 +295,12 @@ const Kt = (e, t, r, n) => {
|
|
|
295
295
|
clickableTextColor: "var(--swui-calendar-week-day-clickable-text-color)"
|
|
296
296
|
},
|
|
297
297
|
CalendarDay: {
|
|
298
|
-
tdStyle:
|
|
298
|
+
tdStyle: In({
|
|
299
299
|
selectedBackground: "var(--swui-calendar-wrapper-selected-background)",
|
|
300
300
|
rangeBackground: "var(--swui-calendar-wrapper-range-background)",
|
|
301
301
|
todayBackground: "var(--swui-calendar-wrapper-today-background)"
|
|
302
302
|
}),
|
|
303
|
-
textProps:
|
|
303
|
+
textProps: Rn({
|
|
304
304
|
selectedColor: "var(--swui-calendar-text-selected-color)",
|
|
305
305
|
disabledColor: "var(--swui-calendar-text-disabled-color)",
|
|
306
306
|
inOtherMonthColor: "var(--swui-calendar-text-in-other-month-color)"
|
|
@@ -309,11 +309,11 @@ const Kt = (e, t, r, n) => {
|
|
|
309
309
|
CalendarMonth: {
|
|
310
310
|
headerTextColor: "var(--swui-calendar-week-day-text-color)"
|
|
311
311
|
}
|
|
312
|
-
},
|
|
312
|
+
}, Wo = {
|
|
313
313
|
...ke,
|
|
314
314
|
width: "37px",
|
|
315
315
|
height: "37px"
|
|
316
|
-
},
|
|
316
|
+
}, Tn = ({
|
|
317
317
|
onClickWeekDay: e,
|
|
318
318
|
day: t,
|
|
319
319
|
theme: r
|
|
@@ -336,7 +336,7 @@ const Kt = (e, t, r, n) => {
|
|
|
336
336
|
}
|
|
337
337
|
);
|
|
338
338
|
return e ? /* @__PURE__ */ s(
|
|
339
|
-
|
|
339
|
+
nr,
|
|
340
340
|
{
|
|
341
341
|
borderRadius: "var(--swui-calendar-day-border-radius)",
|
|
342
342
|
onClick: (a) => e(t.dayOfWeek, a),
|
|
@@ -344,7 +344,7 @@ const Kt = (e, t, r, n) => {
|
|
|
344
344
|
children: n
|
|
345
345
|
}
|
|
346
346
|
) : n;
|
|
347
|
-
},
|
|
347
|
+
}, vr = function({
|
|
348
348
|
day: t,
|
|
349
349
|
week: r,
|
|
350
350
|
month: n,
|
|
@@ -378,7 +378,7 @@ const Kt = (e, t, r, n) => {
|
|
|
378
378
|
}
|
|
379
379
|
)
|
|
380
380
|
}
|
|
381
|
-
), h =
|
|
381
|
+
), h = ct.td({
|
|
382
382
|
...l.CalendarDay.tdStyle && l.CalendarDay.tdStyle(
|
|
383
383
|
d,
|
|
384
384
|
a,
|
|
@@ -387,7 +387,7 @@ const Kt = (e, t, r, n) => {
|
|
|
387
387
|
n,
|
|
388
388
|
o
|
|
389
389
|
)
|
|
390
|
-
}), _ =
|
|
390
|
+
}), _ = ct.div({
|
|
391
391
|
...l.CalendarDay.innerWrapperStyle && l.CalendarDay.innerWrapperStyle(
|
|
392
392
|
d,
|
|
393
393
|
a,
|
|
@@ -398,7 +398,7 @@ const Kt = (e, t, r, n) => {
|
|
|
398
398
|
),
|
|
399
399
|
width: "100%",
|
|
400
400
|
height: "100%"
|
|
401
|
-
}),
|
|
401
|
+
}), p = ct.div({
|
|
402
402
|
...l.CalendarDay.cellWrapperStyle && l.CalendarDay.cellWrapperStyle(
|
|
403
403
|
d,
|
|
404
404
|
a,
|
|
@@ -410,12 +410,12 @@ const Kt = (e, t, r, n) => {
|
|
|
410
410
|
width: "100%",
|
|
411
411
|
height: "100%",
|
|
412
412
|
position: "relative"
|
|
413
|
-
}), y =
|
|
413
|
+
}), y = Nn(d, a);
|
|
414
414
|
return /* @__PURE__ */ s(
|
|
415
415
|
h,
|
|
416
416
|
{
|
|
417
|
-
onClick: y ? void 0 : (
|
|
418
|
-
children: /* @__PURE__ */ s(_, { children: /* @__PURE__ */ s(
|
|
417
|
+
onClick: y ? void 0 : (w) => i?.(t, o, w),
|
|
418
|
+
children: /* @__PURE__ */ s(_, { children: /* @__PURE__ */ s(p, { children: (t.month === n.monthInYear || u) && /* @__PURE__ */ T(yt, { children: [
|
|
419
419
|
c && /* @__PURE__ */ s(
|
|
420
420
|
c,
|
|
421
421
|
{
|
|
@@ -431,13 +431,13 @@ const Kt = (e, t, r, n) => {
|
|
|
431
431
|
] }) }) })
|
|
432
432
|
}
|
|
433
433
|
);
|
|
434
|
-
},
|
|
434
|
+
}, Nn = (e, t) => !!_e(
|
|
435
435
|
t,
|
|
436
436
|
e,
|
|
437
437
|
["enabled", "disabled"],
|
|
438
438
|
[!1, !0],
|
|
439
439
|
!1
|
|
440
|
-
),
|
|
440
|
+
), En = ({
|
|
441
441
|
onClickWeek: e,
|
|
442
442
|
theme: t,
|
|
443
443
|
week: r,
|
|
@@ -445,7 +445,7 @@ const Kt = (e, t, r, n) => {
|
|
|
445
445
|
backgroundColor: a,
|
|
446
446
|
prefix: o
|
|
447
447
|
}) => {
|
|
448
|
-
const i = /* @__PURE__ */
|
|
448
|
+
const i = /* @__PURE__ */ T(
|
|
449
449
|
L,
|
|
450
450
|
{
|
|
451
451
|
width: t.width,
|
|
@@ -454,7 +454,7 @@ const Kt = (e, t, r, n) => {
|
|
|
454
454
|
alignItems: "center",
|
|
455
455
|
children: [
|
|
456
456
|
n && /* @__PURE__ */ s(L, { position: "absolute", children: n }),
|
|
457
|
-
/* @__PURE__ */ s(L, { position: "absolute", children: /* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ s(L, { position: "absolute", children: /* @__PURE__ */ T(
|
|
458
458
|
De,
|
|
459
459
|
{
|
|
460
460
|
color: e ? t.WeekNumber.clickableTextColor : t.WeekNumber.textColor,
|
|
@@ -473,7 +473,7 @@ const Kt = (e, t, r, n) => {
|
|
|
473
473
|
background: a || t.WeekNumber.backgroundColor,
|
|
474
474
|
position: "relative",
|
|
475
475
|
children: e ? /* @__PURE__ */ s(
|
|
476
|
-
|
|
476
|
+
nr,
|
|
477
477
|
{
|
|
478
478
|
borderRadius: "var(--swui-calendar-day-border-radius)",
|
|
479
479
|
onClick: (l) => e(r, l),
|
|
@@ -483,7 +483,7 @@ const Kt = (e, t, r, n) => {
|
|
|
483
483
|
) : i
|
|
484
484
|
}
|
|
485
485
|
);
|
|
486
|
-
},
|
|
486
|
+
}, Ln = (e, t, r) => t && Te(e, t) ? F(e, t) : r && G(e, r) ? F(e, r) : !0, An = function({
|
|
487
487
|
dayComponent: t,
|
|
488
488
|
minDate: r,
|
|
489
489
|
maxDate: n,
|
|
@@ -491,15 +491,15 @@ const Kt = (e, t, r, n) => {
|
|
|
491
491
|
day: o,
|
|
492
492
|
...i
|
|
493
493
|
}) {
|
|
494
|
-
const l =
|
|
495
|
-
() =>
|
|
494
|
+
const l = I(
|
|
495
|
+
() => Ln(o.date, r, n) ? a : br(a, ["disabled"]),
|
|
496
496
|
[o.date, a, n, r]
|
|
497
497
|
);
|
|
498
498
|
return /* @__PURE__ */ s(t, { day: o, ...i, dayState: l });
|
|
499
499
|
};
|
|
500
|
-
function
|
|
500
|
+
function Fn({
|
|
501
501
|
month: e,
|
|
502
|
-
dayComponent: t =
|
|
502
|
+
dayComponent: t = vr,
|
|
503
503
|
statePerWeek: r,
|
|
504
504
|
userDataPerWeek: n,
|
|
505
505
|
minDate: a,
|
|
@@ -512,25 +512,25 @@ function Ln({
|
|
|
512
512
|
renderWeekDay: f,
|
|
513
513
|
headerRightContent: h,
|
|
514
514
|
theme: _ = ke,
|
|
515
|
-
extraDayContent:
|
|
515
|
+
extraDayContent: p,
|
|
516
516
|
defaultHighlights: y,
|
|
517
|
-
showWeekNumber:
|
|
517
|
+
showWeekNumber: w
|
|
518
518
|
}) {
|
|
519
|
-
return /* @__PURE__ */ s(
|
|
520
|
-
/* @__PURE__ */
|
|
521
|
-
|
|
519
|
+
return /* @__PURE__ */ s(yt, { children: /* @__PURE__ */ T(L, { alignItems: "stretch", children: [
|
|
520
|
+
/* @__PURE__ */ T(
|
|
521
|
+
z,
|
|
522
522
|
{
|
|
523
523
|
justifyContent: h ? "space-between" : "center",
|
|
524
524
|
alignItems: "center",
|
|
525
525
|
children: [
|
|
526
|
-
/* @__PURE__ */ s(
|
|
526
|
+
/* @__PURE__ */ s(z, { justifyContent: "center", alignItems: "center", children: d ? /* @__PURE__ */ s(
|
|
527
527
|
Q,
|
|
528
528
|
{
|
|
529
529
|
onClick: () => d(e),
|
|
530
530
|
label: e.name + " " + String(e.year),
|
|
531
|
-
rightIcon:
|
|
531
|
+
rightIcon: Dt
|
|
532
532
|
}
|
|
533
|
-
) : /* @__PURE__ */
|
|
533
|
+
) : /* @__PURE__ */ T(De, { whiteSpace: "nowrap", children: [
|
|
534
534
|
e.name,
|
|
535
535
|
" ",
|
|
536
536
|
e.year
|
|
@@ -539,52 +539,52 @@ function Ln({
|
|
|
539
539
|
]
|
|
540
540
|
}
|
|
541
541
|
),
|
|
542
|
-
/* @__PURE__ */ s("table", { children: /* @__PURE__ */
|
|
543
|
-
/* @__PURE__ */
|
|
544
|
-
|
|
545
|
-
e.weeks[0].days.map((
|
|
546
|
-
|
|
542
|
+
/* @__PURE__ */ s("table", { children: /* @__PURE__ */ T("tbody", { children: [
|
|
543
|
+
/* @__PURE__ */ T("tr", { children: [
|
|
544
|
+
w && /* @__PURE__ */ s("td", { children: /* @__PURE__ */ s(L, { width: _.width, height: _.height }) }),
|
|
545
|
+
e.weeks[0].days.map((D) => /* @__PURE__ */ s("td", { children: f ? f(D.name, _, c) : /* @__PURE__ */ s(
|
|
546
|
+
Tn,
|
|
547
547
|
{
|
|
548
|
-
day:
|
|
548
|
+
day: D,
|
|
549
549
|
onClickWeekDay: c,
|
|
550
550
|
theme: _
|
|
551
551
|
}
|
|
552
|
-
) },
|
|
552
|
+
) }, D.name))
|
|
553
553
|
] }),
|
|
554
|
-
e.weeks.map((
|
|
555
|
-
|
|
556
|
-
|
|
554
|
+
e.weeks.map((D) => /* @__PURE__ */ T("tr", { children: [
|
|
555
|
+
w && /* @__PURE__ */ s("td", { children: u ? u(D, _, l) : /* @__PURE__ */ s(
|
|
556
|
+
En,
|
|
557
557
|
{
|
|
558
|
-
week:
|
|
558
|
+
week: D,
|
|
559
559
|
onClickWeek: l,
|
|
560
560
|
theme: _
|
|
561
561
|
}
|
|
562
562
|
) }),
|
|
563
|
-
|
|
564
|
-
|
|
563
|
+
D.days.map((g) => /* @__PURE__ */ s(
|
|
564
|
+
An,
|
|
565
565
|
{
|
|
566
566
|
dayComponent: t,
|
|
567
|
-
day:
|
|
568
|
-
week:
|
|
567
|
+
day: g,
|
|
568
|
+
week: D,
|
|
569
569
|
month: e,
|
|
570
|
-
dayState: r && r[
|
|
571
|
-
userData: n && n[
|
|
570
|
+
dayState: r && r[D.weekNumber] && r[D.weekNumber][g.dayOfMonth],
|
|
571
|
+
userData: n && n[D.weekNumber] && n[D.weekNumber][g.dayOfMonth],
|
|
572
572
|
onClickDay: i,
|
|
573
573
|
theme: _,
|
|
574
|
-
extraDayContent:
|
|
574
|
+
extraDayContent: p,
|
|
575
575
|
defaultHighlights: y,
|
|
576
576
|
minDate: a,
|
|
577
577
|
maxDate: o
|
|
578
578
|
},
|
|
579
|
-
|
|
579
|
+
g.dateString
|
|
580
580
|
))
|
|
581
|
-
] },
|
|
581
|
+
] }, D.weekNumber))
|
|
582
582
|
] }) })
|
|
583
583
|
] }) });
|
|
584
584
|
}
|
|
585
|
-
function
|
|
585
|
+
function Pn({
|
|
586
586
|
monthRows: e,
|
|
587
|
-
dayComponent: t =
|
|
587
|
+
dayComponent: t = vr,
|
|
588
588
|
userDataPerMonth: r,
|
|
589
589
|
statePerMonth: n,
|
|
590
590
|
minDate: a,
|
|
@@ -597,26 +597,26 @@ function An({
|
|
|
597
597
|
renderWeekNumber: f,
|
|
598
598
|
headerRightContent: h,
|
|
599
599
|
extraDayContent: _,
|
|
600
|
-
defaultHighlights:
|
|
600
|
+
defaultHighlights: p,
|
|
601
601
|
showWeekNumber: y,
|
|
602
|
-
theme:
|
|
602
|
+
theme: w = ke
|
|
603
603
|
}) {
|
|
604
|
-
const
|
|
604
|
+
const D = I(
|
|
605
605
|
() => a ? we(a, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
|
|
606
606
|
[a]
|
|
607
|
-
),
|
|
607
|
+
), g = I(
|
|
608
608
|
() => o ? we(o, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
|
|
609
609
|
[o]
|
|
610
610
|
);
|
|
611
611
|
return /* @__PURE__ */ s(
|
|
612
612
|
"div",
|
|
613
613
|
{
|
|
614
|
-
className:
|
|
615
|
-
|
|
616
|
-
y &&
|
|
614
|
+
className: oe(
|
|
615
|
+
Jt.calendar,
|
|
616
|
+
y && Jt.weekNumberVisible
|
|
617
617
|
),
|
|
618
|
-
children: e.map((
|
|
619
|
-
|
|
618
|
+
children: e.map((b, m) => /* @__PURE__ */ s(Pr, { children: /* @__PURE__ */ s(z, { gap: 2, children: b.map((k) => /* @__PURE__ */ s(
|
|
619
|
+
Fn,
|
|
620
620
|
{
|
|
621
621
|
month: k,
|
|
622
622
|
dayComponent: t,
|
|
@@ -626,37 +626,37 @@ function An({
|
|
|
626
626
|
onClickWeekDay: l,
|
|
627
627
|
onClickWeek: c,
|
|
628
628
|
onClickMonth: d,
|
|
629
|
-
theme:
|
|
629
|
+
theme: w,
|
|
630
630
|
renderWeekNumber: f,
|
|
631
631
|
renderWeekDay: u,
|
|
632
632
|
headerRightContent: h,
|
|
633
633
|
extraDayContent: _,
|
|
634
|
-
defaultHighlights:
|
|
635
|
-
minDate:
|
|
636
|
-
maxDate:
|
|
634
|
+
defaultHighlights: p,
|
|
635
|
+
minDate: D,
|
|
636
|
+
maxDate: g,
|
|
637
637
|
showWeekNumber: y ?? !1
|
|
638
638
|
},
|
|
639
639
|
k.name
|
|
640
|
-
)) }) },
|
|
640
|
+
)) }) }, m))
|
|
641
641
|
}
|
|
642
642
|
);
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
const t =
|
|
644
|
+
function gt(e) {
|
|
645
|
+
const t = Yn(e.year, e.month, e.date), { year: r, month: n } = Cn(
|
|
646
646
|
t.year,
|
|
647
647
|
t.month
|
|
648
|
-
), a =
|
|
648
|
+
), a = Hn(
|
|
649
649
|
r,
|
|
650
650
|
n,
|
|
651
|
-
e.locale ??
|
|
651
|
+
e.locale ?? Qe,
|
|
652
652
|
e.numMonths,
|
|
653
653
|
e.monthsPerRow
|
|
654
|
-
), o =
|
|
654
|
+
), o = vn(
|
|
655
655
|
e.highlightToday,
|
|
656
656
|
e.statePerMonth
|
|
657
657
|
);
|
|
658
658
|
return /* @__PURE__ */ s(
|
|
659
|
-
|
|
659
|
+
Pn,
|
|
660
660
|
{
|
|
661
661
|
year: r,
|
|
662
662
|
month: n,
|
|
@@ -666,7 +666,7 @@ function ht(e) {
|
|
|
666
666
|
}
|
|
667
667
|
);
|
|
668
668
|
}
|
|
669
|
-
const
|
|
669
|
+
const Yn = (e, t, r) => {
|
|
670
670
|
if (t && e)
|
|
671
671
|
return {
|
|
672
672
|
month: t,
|
|
@@ -682,75 +682,75 @@ const Fn = (e, t, r) => {
|
|
|
682
682
|
month: ye(n),
|
|
683
683
|
year: Pe(n)
|
|
684
684
|
};
|
|
685
|
-
},
|
|
685
|
+
}, Hn = (e, t, r, n, a) => n == null ? [[at(e, t, r)]] : a == null ? [Gt(e, t, n, r)] : pr(Gt(e, t, n, r), a), yr = (e, t) => `${e.row}-${e.column}-${t}`, Wn = (e, t, r, n) => {
|
|
686
686
|
let a = t;
|
|
687
687
|
for (let o = 0; o < n; o++) {
|
|
688
|
-
a =
|
|
689
|
-
const i =
|
|
688
|
+
a = On(a, e, n);
|
|
689
|
+
const i = yr(a, r);
|
|
690
690
|
if (document.getElementById(i))
|
|
691
691
|
return i;
|
|
692
692
|
}
|
|
693
|
-
},
|
|
693
|
+
}, On = (e, t, r) => {
|
|
694
694
|
let n = e.row, a = e.column;
|
|
695
695
|
return t === "ArrowLeft" ? a-- : t === "ArrowUp" ? n-- : t === "ArrowRight" ? a++ : t === "ArrowDown" && n++, a < 0 && (a = r - 1, n--), a > r - 1 && (a = 0, n++), {
|
|
696
696
|
column: a,
|
|
697
697
|
row: n
|
|
698
698
|
};
|
|
699
|
-
},
|
|
700
|
-
en:
|
|
701
|
-
"en-US":
|
|
702
|
-
"en-GB":
|
|
703
|
-
"en-IE":
|
|
704
|
-
"de-AT":
|
|
705
|
-
"nl-BE":
|
|
706
|
-
"nl-NL":
|
|
707
|
-
"de-DE":
|
|
708
|
-
"nb-NO":
|
|
709
|
-
"sv-SE":
|
|
710
|
-
"da-DK":
|
|
711
|
-
"lv-LV":
|
|
712
|
-
"lt-LT":
|
|
713
|
-
"it-IT":
|
|
714
|
-
"et-EE":
|
|
715
|
-
"fi-FI":
|
|
716
|
-
"cs-CZ":
|
|
717
|
-
"es-ES":
|
|
718
|
-
"fr-FR":
|
|
719
|
-
"pl-PL":
|
|
720
|
-
nl:
|
|
721
|
-
de:
|
|
722
|
-
nb:
|
|
723
|
-
sv:
|
|
724
|
-
da:
|
|
725
|
-
lv:
|
|
726
|
-
lt:
|
|
727
|
-
it:
|
|
728
|
-
et:
|
|
729
|
-
fi:
|
|
730
|
-
cs:
|
|
731
|
-
es:
|
|
732
|
-
fr:
|
|
733
|
-
pl:
|
|
734
|
-
},
|
|
735
|
-
if (
|
|
699
|
+
}, Be = {
|
|
700
|
+
en: Qe,
|
|
701
|
+
"en-US": ln,
|
|
702
|
+
"en-GB": Qe,
|
|
703
|
+
"en-IE": sn,
|
|
704
|
+
"de-AT": on,
|
|
705
|
+
"nl-BE": an,
|
|
706
|
+
"nl-NL": Kt,
|
|
707
|
+
"de-DE": qt,
|
|
708
|
+
"nb-NO": jt,
|
|
709
|
+
"sv-SE": Vt,
|
|
710
|
+
"da-DK": zt,
|
|
711
|
+
"lv-LV": Ut,
|
|
712
|
+
"lt-LT": $t,
|
|
713
|
+
"it-IT": Ot,
|
|
714
|
+
"et-EE": Wt,
|
|
715
|
+
"fi-FI": Ht,
|
|
716
|
+
"cs-CZ": Yt,
|
|
717
|
+
"es-ES": Pt,
|
|
718
|
+
"fr-FR": Ft,
|
|
719
|
+
"pl-PL": At,
|
|
720
|
+
nl: Kt,
|
|
721
|
+
de: qt,
|
|
722
|
+
nb: jt,
|
|
723
|
+
sv: Vt,
|
|
724
|
+
da: zt,
|
|
725
|
+
lv: Ut,
|
|
726
|
+
lt: $t,
|
|
727
|
+
it: Ot,
|
|
728
|
+
et: Wt,
|
|
729
|
+
fi: Ht,
|
|
730
|
+
cs: Yt,
|
|
731
|
+
es: Pt,
|
|
732
|
+
fr: Ft,
|
|
733
|
+
pl: At
|
|
734
|
+
}, wr = "en-GB", Oo = "sv", Dr = (e, t, r) => {
|
|
735
|
+
if (Be[e])
|
|
736
736
|
return e;
|
|
737
737
|
if (t) {
|
|
738
|
-
const n =
|
|
738
|
+
const n = $n(e);
|
|
739
739
|
if (n)
|
|
740
740
|
return n;
|
|
741
741
|
}
|
|
742
742
|
return r;
|
|
743
|
-
},
|
|
744
|
-
const [t] = e.split("-"), r = Object.keys(
|
|
743
|
+
}, Me = (e) => Be[e], $n = (e) => {
|
|
744
|
+
const [t] = e.split("-"), r = Object.keys(Be);
|
|
745
745
|
for (const n of r)
|
|
746
746
|
if (n.startsWith(t))
|
|
747
747
|
return n;
|
|
748
|
-
},
|
|
749
|
-
const t = Object.keys(
|
|
748
|
+
}, $o = () => Be.sv, Un = (e) => {
|
|
749
|
+
const t = Object.keys(Be);
|
|
750
750
|
for (const r of t)
|
|
751
|
-
if (
|
|
751
|
+
if (Be[r].code === e.code)
|
|
752
752
|
return r;
|
|
753
|
-
},
|
|
753
|
+
}, zn = ({
|
|
754
754
|
month: e,
|
|
755
755
|
onClick: t,
|
|
756
756
|
selected: r,
|
|
@@ -760,33 +760,33 @@ const Fn = (e, t, r) => {
|
|
|
760
760
|
position: i,
|
|
761
761
|
size: l
|
|
762
762
|
}) => {
|
|
763
|
-
const c =
|
|
764
|
-
() =>
|
|
763
|
+
const c = I(
|
|
764
|
+
() => Me(n) ?? Me("en-GB"),
|
|
765
765
|
[n]
|
|
766
|
-
), d =
|
|
767
|
-
() =>
|
|
766
|
+
), d = I(
|
|
767
|
+
() => nt(j(e, "LLL", { locale: c })),
|
|
768
768
|
[c, e]
|
|
769
|
-
), u =
|
|
770
|
-
() =>
|
|
769
|
+
), u = I(
|
|
770
|
+
() => j(e, "LLLL", { locale: c }),
|
|
771
771
|
[c, e]
|
|
772
|
-
), f =
|
|
773
|
-
|
|
772
|
+
), f = $(null), h = yr(i, o), _ = r ? 0 : -1;
|
|
773
|
+
ae(() => {
|
|
774
774
|
f.current?.focus();
|
|
775
775
|
}, []);
|
|
776
|
-
const
|
|
776
|
+
const p = v(
|
|
777
777
|
(y) => {
|
|
778
|
-
const
|
|
778
|
+
const w = Wn(
|
|
779
779
|
y.key,
|
|
780
780
|
i,
|
|
781
781
|
o,
|
|
782
782
|
4
|
|
783
783
|
);
|
|
784
|
-
|
|
784
|
+
w && document.getElementById(w)?.focus();
|
|
785
785
|
},
|
|
786
786
|
[o, i]
|
|
787
787
|
);
|
|
788
|
-
return /* @__PURE__ */ s(
|
|
789
|
-
|
|
788
|
+
return /* @__PURE__ */ s(z, { justifyContent: "center", onKeyDown: p, children: r ? /* @__PURE__ */ s(
|
|
789
|
+
Re,
|
|
790
790
|
{
|
|
791
791
|
id: h,
|
|
792
792
|
"aria-label": u,
|
|
@@ -809,7 +809,7 @@ const Fn = (e, t, r) => {
|
|
|
809
809
|
tabIndex: _
|
|
810
810
|
}
|
|
811
811
|
) });
|
|
812
|
-
},
|
|
812
|
+
}, Vn = (e, t, r) => {
|
|
813
813
|
let n = e.getFullYear(), a = 0, o = 0, i = e;
|
|
814
814
|
const l = {
|
|
815
815
|
yearOrder: [],
|
|
@@ -844,41 +844,41 @@ const Fn = (e, t, r) => {
|
|
|
844
844
|
onCancel: o,
|
|
845
845
|
size: i = "medium"
|
|
846
846
|
}) => {
|
|
847
|
-
const l =
|
|
848
|
-
|
|
847
|
+
const l = Bt(), c = Ie(), d = a > 0 ? a : 12, [u, f] = C(!1), h = Vn(r, d, qn(i)), _ = I(() => Oe(r, d), [d, r]);
|
|
848
|
+
ae(() => {
|
|
849
849
|
f(!0);
|
|
850
850
|
}, []);
|
|
851
|
-
const
|
|
851
|
+
const p = v(
|
|
852
852
|
(y) => {
|
|
853
853
|
y.key === "Escape" && (o?.(), y.preventDefault(), y.stopPropagation());
|
|
854
854
|
},
|
|
855
855
|
[o]
|
|
856
856
|
);
|
|
857
|
-
return /* @__PURE__ */ s(Z, { gap: 1, maxWidth:
|
|
858
|
-
const { rows:
|
|
859
|
-
return /* @__PURE__ */
|
|
860
|
-
(
|
|
861
|
-
/* @__PURE__ */ s("table", { style: { borderSpacing: "0 8px" }, children: /* @__PURE__ */ s("tbody", { children:
|
|
862
|
-
const { columns:
|
|
863
|
-
return /* @__PURE__ */ s("tr", { children:
|
|
864
|
-
|
|
857
|
+
return /* @__PURE__ */ s(Z, { gap: 1, maxWidth: jn(i), onKeyDown: p, children: h.yearOrder.map((y, w) => {
|
|
858
|
+
const { rows: D } = h.years[y];
|
|
859
|
+
return /* @__PURE__ */ T(St.Fragment, { children: [
|
|
860
|
+
(w !== 0 || y !== c.getFullYear()) && /* @__PURE__ */ s(He, { variant: "h4", children: y }),
|
|
861
|
+
/* @__PURE__ */ s("table", { style: { borderSpacing: "0 8px" }, children: /* @__PURE__ */ s("tbody", { children: D.map((g) => {
|
|
862
|
+
const { columns: b } = h.rows[g];
|
|
863
|
+
return /* @__PURE__ */ s("tr", { children: b.map(({ month: m, position: k }) => /* @__PURE__ */ s("td", { children: /* @__PURE__ */ s(
|
|
864
|
+
zn,
|
|
865
865
|
{
|
|
866
|
-
month:
|
|
866
|
+
month: m,
|
|
867
867
|
firstAvailableMonth: r,
|
|
868
868
|
lastAvailableMonth: _,
|
|
869
869
|
localeCode: n,
|
|
870
|
-
selected: e ? ge(e,
|
|
870
|
+
selected: e ? ge(e, m) : !1,
|
|
871
871
|
autoFocus: u,
|
|
872
|
-
onClick: () => t?.(
|
|
872
|
+
onClick: () => t?.(m),
|
|
873
873
|
monthPickerId: l,
|
|
874
874
|
position: k,
|
|
875
875
|
size: i
|
|
876
876
|
}
|
|
877
|
-
) },
|
|
877
|
+
) }, m.getMonth())) }, g);
|
|
878
878
|
}) }) })
|
|
879
879
|
] }, y);
|
|
880
880
|
}) });
|
|
881
|
-
},
|
|
881
|
+
}, jn = (e) => {
|
|
882
882
|
switch (e) {
|
|
883
883
|
case "smaller":
|
|
884
884
|
return "280px";
|
|
@@ -889,9 +889,9 @@ const Fn = (e, t, r) => {
|
|
|
889
889
|
case "large":
|
|
890
890
|
return "448px";
|
|
891
891
|
default:
|
|
892
|
-
return
|
|
892
|
+
return wt(e, "336px");
|
|
893
893
|
}
|
|
894
|
-
},
|
|
894
|
+
}, qn = (e) => {
|
|
895
895
|
switch (e) {
|
|
896
896
|
case "smaller":
|
|
897
897
|
case "small":
|
|
@@ -900,9 +900,9 @@ const Fn = (e, t, r) => {
|
|
|
900
900
|
case "large":
|
|
901
901
|
return 4;
|
|
902
902
|
default:
|
|
903
|
-
return
|
|
903
|
+
return wt(e, 4);
|
|
904
904
|
}
|
|
905
|
-
},
|
|
905
|
+
}, Kn = (e) => [
|
|
906
906
|
{
|
|
907
907
|
label: "Past",
|
|
908
908
|
presets: [
|
|
@@ -915,19 +915,19 @@ const Fn = (e, t, r) => {
|
|
|
915
915
|
{
|
|
916
916
|
label: "Future",
|
|
917
917
|
presets: [
|
|
918
|
-
{ label: "Next 3 days", startDate: e, endDate:
|
|
919
|
-
{ label: "Next 7 days", startDate: e, endDate:
|
|
920
|
-
{ label: "Next 30 days", startDate: e, endDate:
|
|
921
|
-
{ label: "Next 45 days", startDate: e, endDate:
|
|
918
|
+
{ label: "Next 3 days", startDate: e, endDate: te(e, 2) },
|
|
919
|
+
{ label: "Next 7 days", startDate: e, endDate: te(e, 6) },
|
|
920
|
+
{ label: "Next 30 days", startDate: e, endDate: te(e, 29) },
|
|
921
|
+
{ label: "Next 45 days", startDate: e, endDate: te(e, 44) }
|
|
922
922
|
]
|
|
923
923
|
}
|
|
924
|
-
],
|
|
924
|
+
], Gn = ({
|
|
925
925
|
onClickPreset: e
|
|
926
926
|
}) => {
|
|
927
|
-
const [t, r] =
|
|
928
|
-
return /* @__PURE__ */
|
|
929
|
-
/* @__PURE__ */
|
|
930
|
-
|
|
927
|
+
const [t, r] = C(0), n = I(() => Kn(/* @__PURE__ */ new Date()), []), a = n[t] ?? n[0];
|
|
928
|
+
return /* @__PURE__ */ T(Z, { children: [
|
|
929
|
+
/* @__PURE__ */ T(
|
|
930
|
+
z,
|
|
931
931
|
{
|
|
932
932
|
justifyContent: "space-between",
|
|
933
933
|
alignItems: "center",
|
|
@@ -937,7 +937,7 @@ const Fn = (e, t, r) => {
|
|
|
937
937
|
Q,
|
|
938
938
|
{
|
|
939
939
|
size: "small",
|
|
940
|
-
leftIcon:
|
|
940
|
+
leftIcon: Hr,
|
|
941
941
|
disabled: t === 0,
|
|
942
942
|
onClick: () => r(t - 1)
|
|
943
943
|
}
|
|
@@ -947,7 +947,7 @@ const Fn = (e, t, r) => {
|
|
|
947
947
|
Q,
|
|
948
948
|
{
|
|
949
949
|
size: "small",
|
|
950
|
-
leftIcon:
|
|
950
|
+
leftIcon: Wr,
|
|
951
951
|
disabled: t === n.length - 1,
|
|
952
952
|
onClick: () => r(t + 1)
|
|
953
953
|
}
|
|
@@ -955,19 +955,19 @@ const Fn = (e, t, r) => {
|
|
|
955
955
|
]
|
|
956
956
|
}
|
|
957
957
|
),
|
|
958
|
-
/* @__PURE__ */ s(
|
|
959
|
-
/* @__PURE__ */ s(Z, { alignItems: "center", children: a.presets.map((o) => /* @__PURE__ */
|
|
958
|
+
/* @__PURE__ */ s(Se, {}),
|
|
959
|
+
/* @__PURE__ */ s(Z, { alignItems: "center", children: a.presets.map((o) => /* @__PURE__ */ T(St.Fragment, { children: [
|
|
960
960
|
/* @__PURE__ */ s(
|
|
961
|
-
|
|
961
|
+
Re,
|
|
962
962
|
{
|
|
963
963
|
label: o.label,
|
|
964
964
|
onClick: () => e(o)
|
|
965
965
|
}
|
|
966
966
|
),
|
|
967
|
-
/* @__PURE__ */ s(
|
|
967
|
+
/* @__PURE__ */ s(Se, {})
|
|
968
968
|
] }, o.label)) })
|
|
969
969
|
] });
|
|
970
|
-
},
|
|
970
|
+
}, Jn = function({
|
|
971
971
|
locale: t,
|
|
972
972
|
dateInFocus: r,
|
|
973
973
|
setDateInFocus: n,
|
|
@@ -978,21 +978,21 @@ const Fn = (e, t, r) => {
|
|
|
978
978
|
numMonthsInMonthPicker: c,
|
|
979
979
|
...d
|
|
980
980
|
}) {
|
|
981
|
-
const u =
|
|
982
|
-
() => t == null ? "en-GB" :
|
|
981
|
+
const u = I(
|
|
982
|
+
() => t == null ? "en-GB" : Un(t) ?? "en-GB",
|
|
983
983
|
[t]
|
|
984
|
-
), f =
|
|
985
|
-
(
|
|
986
|
-
n && n(
|
|
984
|
+
), f = Ie(), h = v(
|
|
985
|
+
(p) => {
|
|
986
|
+
n && n(p), o("calendar");
|
|
987
987
|
},
|
|
988
988
|
[n, o]
|
|
989
|
-
), _ =
|
|
989
|
+
), _ = v(() => {
|
|
990
990
|
o("month");
|
|
991
991
|
}, [o]);
|
|
992
992
|
switch (a) {
|
|
993
993
|
case "calendar":
|
|
994
994
|
return /* @__PURE__ */ s(
|
|
995
|
-
|
|
995
|
+
gt,
|
|
996
996
|
{
|
|
997
997
|
...d,
|
|
998
998
|
date: r,
|
|
@@ -1019,29 +1019,29 @@ const Fn = (e, t, r) => {
|
|
|
1019
1019
|
}
|
|
1020
1020
|
);
|
|
1021
1021
|
case "presets":
|
|
1022
|
-
return /* @__PURE__ */ s(
|
|
1022
|
+
return /* @__PURE__ */ s(Gn, { onClickPreset: () => {
|
|
1023
1023
|
} });
|
|
1024
1024
|
default:
|
|
1025
1025
|
return /* @__PURE__ */ s(L, { children: /* @__PURE__ */ s(
|
|
1026
|
-
|
|
1026
|
+
Re,
|
|
1027
1027
|
{
|
|
1028
1028
|
label: "Show calendar",
|
|
1029
1029
|
onClick: () => o("calendar")
|
|
1030
1030
|
}
|
|
1031
1031
|
) });
|
|
1032
1032
|
}
|
|
1033
|
-
},
|
|
1034
|
-
const a =
|
|
1033
|
+
}, Zn = (e, t, r, n) => {
|
|
1034
|
+
const a = v(() => {
|
|
1035
1035
|
const c = Oe(e, r ?? n ?? 1);
|
|
1036
1036
|
t?.(c);
|
|
1037
|
-
}, [t, e, r, n]), o =
|
|
1038
|
-
const c =
|
|
1037
|
+
}, [t, e, r, n]), o = v(() => {
|
|
1038
|
+
const c = Qr(e, 1);
|
|
1039
1039
|
t?.(c);
|
|
1040
|
-
}, [t, e]), i =
|
|
1041
|
-
const c =
|
|
1040
|
+
}, [t, e]), i = v(() => {
|
|
1041
|
+
const c = xt(e, r ?? n ?? 1);
|
|
1042
1042
|
t?.(c);
|
|
1043
|
-
}, [t, e, r, n]), l =
|
|
1044
|
-
const c =
|
|
1043
|
+
}, [t, e, r, n]), l = v(() => {
|
|
1044
|
+
const c = Xr(e, 1);
|
|
1045
1045
|
t?.(c);
|
|
1046
1046
|
}, [t, e]);
|
|
1047
1047
|
return {
|
|
@@ -1050,23 +1050,23 @@ const Fn = (e, t, r) => {
|
|
|
1050
1050
|
nextYear: o,
|
|
1051
1051
|
prevYear: l
|
|
1052
1052
|
};
|
|
1053
|
-
},
|
|
1053
|
+
}, Qn = ({
|
|
1054
1054
|
children: e,
|
|
1055
1055
|
prevMonth: t,
|
|
1056
1056
|
nextMonth: r,
|
|
1057
1057
|
prevYear: n,
|
|
1058
1058
|
nextYear: a
|
|
1059
|
-
}) => /* @__PURE__ */
|
|
1059
|
+
}) => /* @__PURE__ */ T("div", { children: [
|
|
1060
1060
|
e,
|
|
1061
|
-
/* @__PURE__ */ s(Ae, { children: /* @__PURE__ */
|
|
1062
|
-
/* @__PURE__ */ s(fe, { onClick: n, leftIcon:
|
|
1063
|
-
/* @__PURE__ */ s(fe, { onClick: t, leftIcon:
|
|
1061
|
+
/* @__PURE__ */ s(Ae, { children: /* @__PURE__ */ T(z, { gap: 1, children: [
|
|
1062
|
+
/* @__PURE__ */ s(fe, { onClick: n, leftIcon: Or }),
|
|
1063
|
+
/* @__PURE__ */ s(fe, { onClick: t, leftIcon: tt }),
|
|
1064
1064
|
/* @__PURE__ */ s(Ae, { num: 2 }),
|
|
1065
1065
|
/* @__PURE__ */ s(fe, { onClick: r, leftIcon: We }),
|
|
1066
|
-
/* @__PURE__ */ s(fe, { onClick: a, leftIcon:
|
|
1066
|
+
/* @__PURE__ */ s(fe, { onClick: a, leftIcon: $r })
|
|
1067
1067
|
] }) }),
|
|
1068
|
-
/* @__PURE__ */ s(
|
|
1069
|
-
] }),
|
|
1068
|
+
/* @__PURE__ */ s(Se, {})
|
|
1069
|
+
] }), Xn = () => {
|
|
1070
1070
|
};
|
|
1071
1071
|
function xe({
|
|
1072
1072
|
monthSwitcherPlacement: e,
|
|
@@ -1075,37 +1075,37 @@ function xe({
|
|
|
1075
1075
|
setDateInFocus: n,
|
|
1076
1076
|
currentPanel: a,
|
|
1077
1077
|
setCurrentPanel: o,
|
|
1078
|
-
onSelectPreset: i =
|
|
1078
|
+
onSelectPreset: i = Xn,
|
|
1079
1079
|
renderMonthPicker: l,
|
|
1080
1080
|
firstMonthInMonthPicker: c,
|
|
1081
1081
|
numMonthsInMonthPicker: d,
|
|
1082
1082
|
...u
|
|
1083
1083
|
}) {
|
|
1084
|
-
const { nextMonth: f, prevMonth: h, nextYear: _, prevYear:
|
|
1084
|
+
const { nextMonth: f, prevMonth: h, nextYear: _, prevYear: p } = Zn(
|
|
1085
1085
|
r,
|
|
1086
1086
|
n,
|
|
1087
1087
|
u.monthsPerRow,
|
|
1088
1088
|
u.numMonths
|
|
1089
1089
|
);
|
|
1090
|
-
switch (
|
|
1090
|
+
switch (ea(
|
|
1091
1091
|
e,
|
|
1092
1092
|
u.numMonths
|
|
1093
1093
|
)) {
|
|
1094
1094
|
case "below":
|
|
1095
1095
|
return /* @__PURE__ */ s(
|
|
1096
|
-
|
|
1096
|
+
Qn,
|
|
1097
1097
|
{
|
|
1098
1098
|
theme: t,
|
|
1099
1099
|
nextMonth: f,
|
|
1100
1100
|
prevMonth: h,
|
|
1101
1101
|
nextYear: _,
|
|
1102
|
-
prevYear:
|
|
1103
|
-
children: /* @__PURE__ */ s(
|
|
1102
|
+
prevYear: p,
|
|
1103
|
+
children: /* @__PURE__ */ s(gt, { ...u, theme: t, date: r })
|
|
1104
1104
|
}
|
|
1105
1105
|
);
|
|
1106
1106
|
case "header":
|
|
1107
1107
|
return /* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(
|
|
1108
|
-
|
|
1108
|
+
Jn,
|
|
1109
1109
|
{
|
|
1110
1110
|
...u,
|
|
1111
1111
|
theme: t,
|
|
@@ -1117,12 +1117,12 @@ function xe({
|
|
|
1117
1117
|
onSelectPreset: i,
|
|
1118
1118
|
firstMonthInMonthPicker: c,
|
|
1119
1119
|
numMonthsInMonthPicker: d,
|
|
1120
|
-
headerRightContent: /* @__PURE__ */
|
|
1120
|
+
headerRightContent: /* @__PURE__ */ T(z, { alignItems: "center", gap: 1, children: [
|
|
1121
1121
|
/* @__PURE__ */ s(
|
|
1122
1122
|
fe,
|
|
1123
1123
|
{
|
|
1124
1124
|
onClick: h,
|
|
1125
|
-
leftIcon:
|
|
1125
|
+
leftIcon: tt
|
|
1126
1126
|
}
|
|
1127
1127
|
),
|
|
1128
1128
|
/* @__PURE__ */ s(
|
|
@@ -1136,13 +1136,13 @@ function xe({
|
|
|
1136
1136
|
}
|
|
1137
1137
|
) });
|
|
1138
1138
|
default:
|
|
1139
|
-
return /* @__PURE__ */ s(
|
|
1139
|
+
return /* @__PURE__ */ s(gt, { ...u, theme: t, date: r });
|
|
1140
1140
|
}
|
|
1141
1141
|
}
|
|
1142
|
-
const
|
|
1143
|
-
startDate: e.startDate ?
|
|
1144
|
-
endDate: e.endDate ?
|
|
1145
|
-
}),
|
|
1142
|
+
const ea = (e, t) => e || (t || 1) > 1 ? "below" : "header", ta = (e) => ({
|
|
1143
|
+
startDate: e.startDate ? j(e.startDate, "yyyy-MM-dd") : void 0,
|
|
1144
|
+
endDate: e.endDate ? j(e.endDate, "yyyy-MM-dd") : void 0
|
|
1145
|
+
}), ra = ({
|
|
1146
1146
|
startDate: e,
|
|
1147
1147
|
endDate: t
|
|
1148
1148
|
}) => {
|
|
@@ -1151,21 +1151,21 @@ const Qn = (e, t) => e || (t || 1) > 1 ? "below" : "header", Xn = (e) => ({
|
|
|
1151
1151
|
startDate: e ? we(e, "yyyy-MM-dd", r) : void 0,
|
|
1152
1152
|
endDate: t ? we(t, "yyyy-MM-dd", r) : void 0
|
|
1153
1153
|
};
|
|
1154
|
-
},
|
|
1154
|
+
}, kr = ({
|
|
1155
1155
|
startDate: e,
|
|
1156
1156
|
endDate: t
|
|
1157
|
-
}) => !!(e && t && !
|
|
1157
|
+
}) => !!(e && t && !F(e, t) && G(e, t)), xr = (e) => kr(e) ? {
|
|
1158
1158
|
startDate: e.endDate,
|
|
1159
1159
|
endDate: e.startDate
|
|
1160
|
-
} : e,
|
|
1161
|
-
|
|
1162
|
-
) : e,
|
|
1160
|
+
} : e, Uo = (e) => e.startDate && e.endDate ? ta(
|
|
1161
|
+
xr(ra(e))
|
|
1162
|
+
) : e, na = (e, t, r, n) => v(
|
|
1163
1163
|
(a) => {
|
|
1164
1164
|
const o = {
|
|
1165
1165
|
startDate: r === "startDate" ? a.date : e?.startDate,
|
|
1166
1166
|
endDate: r === "endDate" ? a.date : e?.endDate
|
|
1167
1167
|
};
|
|
1168
|
-
|
|
1168
|
+
kr(o) || n(r === "startDate" ? "endDate" : "startDate"), t?.(xr(o));
|
|
1169
1169
|
},
|
|
1170
1170
|
[
|
|
1171
1171
|
r,
|
|
@@ -1174,8 +1174,8 @@ const Qn = (e, t) => e || (t || 1) > 1 ? "below" : "header", Xn = (e) => ({
|
|
|
1174
1174
|
e?.endDate,
|
|
1175
1175
|
e?.startDate
|
|
1176
1176
|
]
|
|
1177
|
-
),
|
|
1178
|
-
const [t, r] =
|
|
1177
|
+
), ot = (e) => {
|
|
1178
|
+
const [t, r] = C("calendar"), n = v(
|
|
1179
1179
|
(a) => {
|
|
1180
1180
|
r(a), e?.(a);
|
|
1181
1181
|
},
|
|
@@ -1185,7 +1185,7 @@ const Qn = (e, t) => e || (t || 1) > 1 ? "below" : "header", Xn = (e) => ({
|
|
|
1185
1185
|
currentPanel: t,
|
|
1186
1186
|
setCurrentPanel: n
|
|
1187
1187
|
};
|
|
1188
|
-
},
|
|
1188
|
+
}, aa = ({
|
|
1189
1189
|
focusedInput: e,
|
|
1190
1190
|
value: t,
|
|
1191
1191
|
onValueChange: r,
|
|
@@ -1194,14 +1194,14 @@ const Qn = (e, t) => e || (t || 1) > 1 ? "below" : "header", Xn = (e) => ({
|
|
|
1194
1194
|
onChangePanel: o,
|
|
1195
1195
|
initialDateInFocus: i
|
|
1196
1196
|
}) => {
|
|
1197
|
-
const { currentPanel: l, setCurrentPanel: c } =
|
|
1197
|
+
const { currentPanel: l, setCurrentPanel: c } = ot(o), [d, u] = C(
|
|
1198
1198
|
() => i ?? /* @__PURE__ */ new Date()
|
|
1199
|
-
), f =
|
|
1199
|
+
), f = na(
|
|
1200
1200
|
t,
|
|
1201
1201
|
r,
|
|
1202
1202
|
e,
|
|
1203
1203
|
n
|
|
1204
|
-
), h =
|
|
1204
|
+
), h = I(
|
|
1205
1205
|
() => Ye(
|
|
1206
1206
|
a,
|
|
1207
1207
|
t?.startDate,
|
|
@@ -1218,12 +1218,12 @@ const Qn = (e, t) => e || (t || 1) > 1 ? "below" : "header", Xn = (e) => ({
|
|
|
1218
1218
|
dateInFocus: d
|
|
1219
1219
|
};
|
|
1220
1220
|
};
|
|
1221
|
-
function
|
|
1222
|
-
const t =
|
|
1221
|
+
function zo(e) {
|
|
1222
|
+
const t = aa(e);
|
|
1223
1223
|
return /* @__PURE__ */ s(xe, { ...e, ...t });
|
|
1224
1224
|
}
|
|
1225
|
-
const
|
|
1226
|
-
const [e, t] =
|
|
1225
|
+
const Vo = () => {
|
|
1226
|
+
const [e, t] = C(), [r, n] = C(), [a, o] = C("startDate");
|
|
1227
1227
|
return {
|
|
1228
1228
|
startDate: e,
|
|
1229
1229
|
setStartDate: t,
|
|
@@ -1232,18 +1232,18 @@ const Uo = () => {
|
|
|
1232
1232
|
focusedInput: a,
|
|
1233
1233
|
setFocusedInput: o
|
|
1234
1234
|
};
|
|
1235
|
-
},
|
|
1235
|
+
}, oa = ({
|
|
1236
1236
|
onChange: e,
|
|
1237
1237
|
value: t,
|
|
1238
1238
|
statePerMonth: r,
|
|
1239
1239
|
onChangePanel: n
|
|
1240
1240
|
}) => {
|
|
1241
|
-
const { currentPanel: a, setCurrentPanel: o } =
|
|
1241
|
+
const { currentPanel: a, setCurrentPanel: o } = ot(n), [i, l] = C(() => t ?? /* @__PURE__ */ new Date()), c = v(
|
|
1242
1242
|
(u) => {
|
|
1243
1243
|
e && e(u.date);
|
|
1244
1244
|
},
|
|
1245
1245
|
[e]
|
|
1246
|
-
), d =
|
|
1246
|
+
), d = I(
|
|
1247
1247
|
() => t ? he(r, t, [
|
|
1248
1248
|
"selected",
|
|
1249
1249
|
"singleSelected"
|
|
@@ -1260,28 +1260,28 @@ const Uo = () => {
|
|
|
1260
1260
|
setDateInFocus: l
|
|
1261
1261
|
};
|
|
1262
1262
|
};
|
|
1263
|
-
function
|
|
1264
|
-
const t =
|
|
1263
|
+
function Cr(e) {
|
|
1264
|
+
const t = oa(e);
|
|
1265
1265
|
return /* @__PURE__ */ s(xe, { ...e, ...t });
|
|
1266
1266
|
}
|
|
1267
|
-
const
|
|
1267
|
+
const sa = ({
|
|
1268
1268
|
onChange: e,
|
|
1269
1269
|
value: t,
|
|
1270
1270
|
statePerMonth: r,
|
|
1271
1271
|
onChangePanel: n,
|
|
1272
1272
|
initialDateInFocus: a
|
|
1273
1273
|
}) => {
|
|
1274
|
-
const { currentPanel: o, setCurrentPanel: i } =
|
|
1274
|
+
const { currentPanel: o, setCurrentPanel: i } = ot(n), [l, c] = C(
|
|
1275
1275
|
a ?? /* @__PURE__ */ new Date()
|
|
1276
|
-
), d =
|
|
1276
|
+
), d = v(
|
|
1277
1277
|
(f) => {
|
|
1278
1278
|
if (!e)
|
|
1279
1279
|
return;
|
|
1280
|
-
const h = t && t.find((_) =>
|
|
1281
|
-
e(t && h ? t.filter((_) => !
|
|
1280
|
+
const h = t && t.find((_) => F(_, f.date));
|
|
1281
|
+
e(t && h ? t.filter((_) => !F(_, f.date)) : [...t || [], f.date]);
|
|
1282
1282
|
},
|
|
1283
1283
|
[e, t]
|
|
1284
|
-
), u =
|
|
1284
|
+
), u = I(() => t ? t.reduce(
|
|
1285
1285
|
(f, h) => he(f, h, ["selected"]),
|
|
1286
1286
|
r
|
|
1287
1287
|
) : r, [r, t]);
|
|
@@ -1294,35 +1294,35 @@ const aa = ({
|
|
|
1294
1294
|
setDateInFocus: c
|
|
1295
1295
|
};
|
|
1296
1296
|
};
|
|
1297
|
-
function
|
|
1298
|
-
const t =
|
|
1297
|
+
function jo(e) {
|
|
1298
|
+
const t = sa(e);
|
|
1299
1299
|
return /* @__PURE__ */ s(xe, { ...e, ...t });
|
|
1300
1300
|
}
|
|
1301
|
-
const
|
|
1301
|
+
const ia = ({
|
|
1302
1302
|
onChange: e,
|
|
1303
1303
|
value: t,
|
|
1304
1304
|
statePerMonth: r,
|
|
1305
1305
|
onChangePanel: n,
|
|
1306
|
-
locale: a =
|
|
1306
|
+
locale: a = Qe
|
|
1307
1307
|
}) => {
|
|
1308
|
-
const [o, i] =
|
|
1309
|
-
const _ =
|
|
1308
|
+
const [o, i] = C(() => {
|
|
1309
|
+
const _ = dt(t, a);
|
|
1310
1310
|
return _ ? _.days[0].date : /* @__PURE__ */ new Date();
|
|
1311
|
-
}), { currentPanel: l, setCurrentPanel: c } =
|
|
1311
|
+
}), { currentPanel: l, setCurrentPanel: c } = ot(n), d = v(
|
|
1312
1312
|
(_) => {
|
|
1313
|
-
e && e(
|
|
1313
|
+
e && e(Zt(Rt(_.date, a)));
|
|
1314
1314
|
},
|
|
1315
1315
|
[a, e]
|
|
1316
|
-
), u =
|
|
1316
|
+
), u = v(
|
|
1317
1317
|
(_) => {
|
|
1318
|
-
e && e(
|
|
1318
|
+
e && e(Zt(_));
|
|
1319
1319
|
},
|
|
1320
1320
|
[e]
|
|
1321
|
-
), f =
|
|
1322
|
-
const _ =
|
|
1323
|
-
return _ ?
|
|
1324
|
-
}, [t, a, r]), h =
|
|
1325
|
-
const _ =
|
|
1321
|
+
), f = I(() => {
|
|
1322
|
+
const _ = dt(t, a);
|
|
1323
|
+
return _ ? bn(r, _) : r;
|
|
1324
|
+
}, [t, a, r]), h = I(() => {
|
|
1325
|
+
const _ = dt(t, a);
|
|
1326
1326
|
return _ ? _.days[0].date : /* @__PURE__ */ new Date();
|
|
1327
1327
|
}, [a, t]);
|
|
1328
1328
|
return {
|
|
@@ -1335,25 +1335,25 @@ const oa = ({
|
|
|
1335
1335
|
currentPanel: l,
|
|
1336
1336
|
setCurrentPanel: c
|
|
1337
1337
|
};
|
|
1338
|
-
},
|
|
1338
|
+
}, Zt = (e) => {
|
|
1339
1339
|
if (e)
|
|
1340
1340
|
return `${e.endYear}-${e.weekNumber}`;
|
|
1341
|
-
},
|
|
1341
|
+
}, dt = (e, t) => {
|
|
1342
1342
|
if (!e)
|
|
1343
1343
|
return;
|
|
1344
1344
|
const r = e.split("-"), n = parseInt(r[1], 10), a = parseInt(r[0], 10), o = /* @__PURE__ */ new Date();
|
|
1345
1345
|
o.setFullYear(a);
|
|
1346
|
-
const i =
|
|
1347
|
-
return
|
|
1346
|
+
const i = Ze(en(o, n), { locale: t });
|
|
1347
|
+
return Rt(i, t);
|
|
1348
1348
|
};
|
|
1349
|
-
function
|
|
1350
|
-
const t =
|
|
1349
|
+
function qo(e) {
|
|
1350
|
+
const t = ia(e);
|
|
1351
1351
|
return /* @__PURE__ */ s(xe, { ...e, ...t });
|
|
1352
1352
|
}
|
|
1353
|
-
const ze = "bottom",
|
|
1354
|
-
const [n, a] =
|
|
1353
|
+
const ze = "bottom", la = (e, t, r) => {
|
|
1354
|
+
const [n, a] = C(r || !1), o = v(() => (a(!0), !0), [a]), i = v(() => {
|
|
1355
1355
|
a(!1), t && t();
|
|
1356
|
-
}, [a, t]), l =
|
|
1356
|
+
}, [a, t]), l = v(
|
|
1357
1357
|
(c) => {
|
|
1358
1358
|
e && e(c), setTimeout(i, 150);
|
|
1359
1359
|
},
|
|
@@ -1365,8 +1365,8 @@ const ze = "bottom", sa = (e, t, r) => {
|
|
|
1365
1365
|
showingCalendar: n,
|
|
1366
1366
|
onSelectDate: l
|
|
1367
1367
|
};
|
|
1368
|
-
}, Ve = "2999-12-31",
|
|
1369
|
-
displayFormat: e =
|
|
1368
|
+
}, Ve = "2999-12-31", Ko = ({
|
|
1369
|
+
displayFormat: e = de.fullDate,
|
|
1370
1370
|
placeholder: t = "Enter date",
|
|
1371
1371
|
value: r,
|
|
1372
1372
|
calendarTheme: n = ke,
|
|
@@ -1380,24 +1380,24 @@ const ze = "bottom", sa = (e, t, r) => {
|
|
|
1380
1380
|
maxDate: f = Ve,
|
|
1381
1381
|
disabled: h,
|
|
1382
1382
|
portalTarget: _,
|
|
1383
|
-
zIndex:
|
|
1383
|
+
zIndex: p
|
|
1384
1384
|
}) => {
|
|
1385
|
-
const { hideCalendar: y, showingCalendar:
|
|
1385
|
+
const { hideCalendar: y, showingCalendar: w, onSelectDate: D, showCalendar: g } = la(l, i, o);
|
|
1386
1386
|
return /* @__PURE__ */ s(L, { width: d, children: /* @__PURE__ */ s(
|
|
1387
1387
|
$e,
|
|
1388
1388
|
{
|
|
1389
1389
|
hideArrow: !0,
|
|
1390
|
-
open:
|
|
1390
|
+
open: w,
|
|
1391
1391
|
onRequestClose: y,
|
|
1392
1392
|
appendTo: _,
|
|
1393
|
-
zIndex:
|
|
1394
|
-
renderTrigger: (
|
|
1393
|
+
zIndex: p,
|
|
1394
|
+
renderTrigger: (b) => /* @__PURE__ */ s(L, { ...b, children: /* @__PURE__ */ s(
|
|
1395
1395
|
pe,
|
|
1396
1396
|
{
|
|
1397
1397
|
type: "date",
|
|
1398
|
-
onFocus:
|
|
1399
|
-
buttonRight: /* @__PURE__ */ s(
|
|
1400
|
-
value: r ?
|
|
1398
|
+
onFocus: g,
|
|
1399
|
+
buttonRight: /* @__PURE__ */ s(Ur, { onClick: g, icon: Fe }),
|
|
1400
|
+
value: r ? j(r, e) : "",
|
|
1401
1401
|
placeholder: t,
|
|
1402
1402
|
size: 9,
|
|
1403
1403
|
disabled: h,
|
|
@@ -1409,10 +1409,10 @@ const ze = "bottom", sa = (e, t, r) => {
|
|
|
1409
1409
|
) }),
|
|
1410
1410
|
placement: ze,
|
|
1411
1411
|
children: /* @__PURE__ */ s(
|
|
1412
|
-
|
|
1412
|
+
Cr,
|
|
1413
1413
|
{
|
|
1414
1414
|
...a,
|
|
1415
|
-
onChange:
|
|
1415
|
+
onChange: D,
|
|
1416
1416
|
value: r,
|
|
1417
1417
|
theme: n,
|
|
1418
1418
|
minDate: u,
|
|
@@ -1421,10 +1421,10 @@ const ze = "bottom", sa = (e, t, r) => {
|
|
|
1421
1421
|
)
|
|
1422
1422
|
}
|
|
1423
1423
|
) });
|
|
1424
|
-
},
|
|
1425
|
-
const r =
|
|
1424
|
+
}, ca = (e, t) => {
|
|
1425
|
+
const r = $(null), n = $(null), [a, o] = C(!1), [i, l] = C(void 0), c = v(() => (l("startDate"), o(!0), !0), [l, o]), d = v(() => (l("endDate"), o(!0), !0), [l, o]), u = v(() => {
|
|
1426
1426
|
o(!1);
|
|
1427
|
-
}, [o]), f =
|
|
1427
|
+
}, [o]), f = v(
|
|
1428
1428
|
(_) => {
|
|
1429
1429
|
i === "startDate" ? (t?.({
|
|
1430
1430
|
startDate: _.date,
|
|
@@ -1435,7 +1435,7 @@ const ze = "bottom", sa = (e, t, r) => {
|
|
|
1435
1435
|
}), e?.startDate ? setTimeout(u, 150) : (l("startDate"), r.current?.focus()));
|
|
1436
1436
|
},
|
|
1437
1437
|
[i, t, l, u, e]
|
|
1438
|
-
), h =
|
|
1438
|
+
), h = I(
|
|
1439
1439
|
() => e?.startDate && e?.endDate && G(e.startDate, e.endDate),
|
|
1440
1440
|
[e?.startDate, e?.endDate]
|
|
1441
1441
|
);
|
|
@@ -1452,8 +1452,8 @@ const ze = "bottom", sa = (e, t, r) => {
|
|
|
1452
1452
|
startDateIsAfterEnd: h
|
|
1453
1453
|
};
|
|
1454
1454
|
};
|
|
1455
|
-
function
|
|
1456
|
-
displayFormat: e =
|
|
1455
|
+
function Go({
|
|
1456
|
+
displayFormat: e = de.fullDate,
|
|
1457
1457
|
placeholderStartDate: t = "Start date",
|
|
1458
1458
|
placeholderEndDate: r = "End date",
|
|
1459
1459
|
value: n,
|
|
@@ -1467,19 +1467,19 @@ function qo({
|
|
|
1467
1467
|
portalTarget: f,
|
|
1468
1468
|
zIndex: h
|
|
1469
1469
|
}) {
|
|
1470
|
-
const [_,
|
|
1470
|
+
const [_, p] = C("calendar"), {
|
|
1471
1471
|
hideCalendar: y,
|
|
1472
|
-
showCalendarEndDate:
|
|
1473
|
-
showCalendarStartDate:
|
|
1474
|
-
showingCalendar:
|
|
1475
|
-
focusedInput:
|
|
1476
|
-
startDateInputRef:
|
|
1472
|
+
showCalendarEndDate: w,
|
|
1473
|
+
showCalendarStartDate: D,
|
|
1474
|
+
showingCalendar: g,
|
|
1475
|
+
focusedInput: b,
|
|
1476
|
+
startDateInputRef: m,
|
|
1477
1477
|
endDateInputRef: k,
|
|
1478
|
-
onClickDay:
|
|
1479
|
-
startDateIsAfterEnd:
|
|
1480
|
-
} =
|
|
1481
|
-
() => (
|
|
1482
|
-
),
|
|
1478
|
+
onClickDay: x,
|
|
1479
|
+
startDateIsAfterEnd: S
|
|
1480
|
+
} = ca(n, a), [N, B] = C(
|
|
1481
|
+
() => (b && n?.[b]) ?? /* @__PURE__ */ new Date()
|
|
1482
|
+
), R = I(
|
|
1483
1483
|
() => Ye(void 0, n?.startDate, n?.endDate),
|
|
1484
1484
|
[n]
|
|
1485
1485
|
);
|
|
@@ -1489,60 +1489,60 @@ function qo({
|
|
|
1489
1489
|
hideArrow: !0,
|
|
1490
1490
|
appendTo: f,
|
|
1491
1491
|
zIndex: h,
|
|
1492
|
-
renderTrigger: (A) => /* @__PURE__ */
|
|
1492
|
+
renderTrigger: (A) => /* @__PURE__ */ T(z, { alignItems: "center", ...A, children: [
|
|
1493
1493
|
/* @__PURE__ */ s(
|
|
1494
1494
|
pe,
|
|
1495
1495
|
{
|
|
1496
1496
|
iconLeft: Fe,
|
|
1497
|
-
onFocus:
|
|
1498
|
-
value: n?.startDate ?
|
|
1497
|
+
onFocus: D,
|
|
1498
|
+
value: n?.startDate ? j(n.startDate, e) : "",
|
|
1499
1499
|
placeholder: t,
|
|
1500
1500
|
width: o,
|
|
1501
1501
|
disabled: u,
|
|
1502
|
-
inputRef:
|
|
1502
|
+
inputRef: m,
|
|
1503
1503
|
size: 9,
|
|
1504
|
-
variant:
|
|
1504
|
+
variant: S ? "error" : void 0
|
|
1505
1505
|
}
|
|
1506
1506
|
),
|
|
1507
|
-
/* @__PURE__ */ s(
|
|
1507
|
+
/* @__PURE__ */ s(Se, {}),
|
|
1508
1508
|
/* @__PURE__ */ s(
|
|
1509
|
-
|
|
1509
|
+
or,
|
|
1510
1510
|
{
|
|
1511
|
-
icon:
|
|
1512
|
-
color:
|
|
1511
|
+
icon: zr,
|
|
1512
|
+
color: It("--lhds-color-ui-500"),
|
|
1513
1513
|
size: 14
|
|
1514
1514
|
}
|
|
1515
1515
|
),
|
|
1516
|
-
/* @__PURE__ */ s(
|
|
1516
|
+
/* @__PURE__ */ s(Se, {}),
|
|
1517
1517
|
/* @__PURE__ */ s(
|
|
1518
1518
|
pe,
|
|
1519
1519
|
{
|
|
1520
1520
|
iconLeft: Fe,
|
|
1521
|
-
onFocus:
|
|
1522
|
-
value: n?.endDate ?
|
|
1521
|
+
onFocus: w,
|
|
1522
|
+
value: n?.endDate ? j(n.endDate, e) : "",
|
|
1523
1523
|
placeholder: r,
|
|
1524
1524
|
width: o,
|
|
1525
1525
|
disabled: u,
|
|
1526
1526
|
inputRef: k,
|
|
1527
1527
|
size: 9,
|
|
1528
|
-
variant:
|
|
1528
|
+
variant: S ? "error" : void 0
|
|
1529
1529
|
}
|
|
1530
1530
|
)
|
|
1531
1531
|
] }),
|
|
1532
|
-
open:
|
|
1532
|
+
open: g,
|
|
1533
1533
|
placement: ze,
|
|
1534
1534
|
onRequestClose: y,
|
|
1535
1535
|
children: /* @__PURE__ */ s(
|
|
1536
1536
|
xe,
|
|
1537
1537
|
{
|
|
1538
1538
|
...l,
|
|
1539
|
-
dateInFocus:
|
|
1540
|
-
setDateInFocus:
|
|
1541
|
-
statePerMonth:
|
|
1539
|
+
dateInFocus: N,
|
|
1540
|
+
setDateInFocus: B,
|
|
1541
|
+
statePerMonth: R,
|
|
1542
1542
|
theme: i,
|
|
1543
|
-
onClickDay:
|
|
1543
|
+
onClickDay: x,
|
|
1544
1544
|
currentPanel: _,
|
|
1545
|
-
setCurrentPanel:
|
|
1545
|
+
setCurrentPanel: p,
|
|
1546
1546
|
minDate: c,
|
|
1547
1547
|
maxDate: d
|
|
1548
1548
|
}
|
|
@@ -1550,10 +1550,10 @@ function qo({
|
|
|
1550
1550
|
}
|
|
1551
1551
|
);
|
|
1552
1552
|
}
|
|
1553
|
-
const
|
|
1553
|
+
const Jo = ({
|
|
1554
1554
|
calendarProps: e,
|
|
1555
1555
|
closeOnCalendarSelectDate: t = !0,
|
|
1556
|
-
dateFormat: r =
|
|
1556
|
+
dateFormat: r = de.fullDate,
|
|
1557
1557
|
disableCalender: n = !1,
|
|
1558
1558
|
onValueChange: a,
|
|
1559
1559
|
placeholder: o = "yyyy-mm-dd",
|
|
@@ -1565,70 +1565,70 @@ const Ko = ({
|
|
|
1565
1565
|
maxDate: f = Ve,
|
|
1566
1566
|
variant: h,
|
|
1567
1567
|
portalTarget: _,
|
|
1568
|
-
zIndex:
|
|
1568
|
+
zIndex: p,
|
|
1569
1569
|
...y
|
|
1570
1570
|
}) => {
|
|
1571
|
-
const [
|
|
1572
|
-
|
|
1573
|
-
}, [
|
|
1574
|
-
|
|
1575
|
-
}, [
|
|
1576
|
-
(
|
|
1577
|
-
a && a(
|
|
1571
|
+
const [w, D] = C(!1), g = v(() => {
|
|
1572
|
+
D(!w);
|
|
1573
|
+
}, [D, w]), b = v(() => {
|
|
1574
|
+
D(!1);
|
|
1575
|
+
}, [D]), m = v(
|
|
1576
|
+
(R) => {
|
|
1577
|
+
a && a(R);
|
|
1578
1578
|
},
|
|
1579
1579
|
[a]
|
|
1580
|
-
), k =
|
|
1581
|
-
(
|
|
1582
|
-
|
|
1580
|
+
), k = v(
|
|
1581
|
+
(R) => {
|
|
1582
|
+
R && (m(j(R, r)), t && setTimeout(() => D(!w), 200));
|
|
1583
1583
|
},
|
|
1584
1584
|
[
|
|
1585
|
-
|
|
1585
|
+
m,
|
|
1586
1586
|
r,
|
|
1587
1587
|
t,
|
|
1588
|
-
|
|
1589
|
-
|
|
1588
|
+
D,
|
|
1589
|
+
w
|
|
1590
1590
|
]
|
|
1591
|
-
),
|
|
1591
|
+
), x = !!i && !/^[-/\\.0-9]+$/.test(i), S = !!i && tn(we(i, r, /* @__PURE__ */ new Date())), B = !!i && i.length >= r.length && !S || x;
|
|
1592
1592
|
return /* @__PURE__ */ s(L, { width: l, children: /* @__PURE__ */ s(
|
|
1593
1593
|
$e,
|
|
1594
1594
|
{
|
|
1595
1595
|
appendTo: _,
|
|
1596
|
-
zIndex:
|
|
1597
|
-
renderTrigger: ({ ref:
|
|
1596
|
+
zIndex: p,
|
|
1597
|
+
renderTrigger: ({ ref: R, ...A }) => /* @__PURE__ */ s(
|
|
1598
1598
|
pe,
|
|
1599
1599
|
{
|
|
1600
1600
|
...y,
|
|
1601
|
-
variant:
|
|
1601
|
+
variant: B ? "error" : h,
|
|
1602
1602
|
disableContentPaddingRight: !0,
|
|
1603
|
-
contentRight: d ? void 0 : /* @__PURE__ */ s(
|
|
1603
|
+
contentRight: d ? void 0 : /* @__PURE__ */ s(z, { alignItems: "center", indent: 0.5, children: /* @__PURE__ */ s(
|
|
1604
1604
|
Q,
|
|
1605
1605
|
{
|
|
1606
1606
|
size: "small",
|
|
1607
1607
|
disabled: y.disabled || n,
|
|
1608
1608
|
leftIcon: Fe,
|
|
1609
|
-
onClick:
|
|
1609
|
+
onClick: g
|
|
1610
1610
|
}
|
|
1611
1611
|
) }),
|
|
1612
|
-
onValueChange:
|
|
1612
|
+
onValueChange: m,
|
|
1613
1613
|
placeholder: o,
|
|
1614
1614
|
value: i || "",
|
|
1615
1615
|
min: u,
|
|
1616
1616
|
max: f,
|
|
1617
1617
|
size: 10,
|
|
1618
|
-
inputRef:
|
|
1618
|
+
inputRef: R,
|
|
1619
1619
|
...A
|
|
1620
1620
|
}
|
|
1621
1621
|
),
|
|
1622
1622
|
hideArrow: !0,
|
|
1623
|
-
open:
|
|
1623
|
+
open: w,
|
|
1624
1624
|
placement: ze,
|
|
1625
|
-
onRequestClose:
|
|
1625
|
+
onRequestClose: b,
|
|
1626
1626
|
children: /* @__PURE__ */ s(
|
|
1627
|
-
|
|
1627
|
+
Cr,
|
|
1628
1628
|
{
|
|
1629
1629
|
...e,
|
|
1630
1630
|
onChange: k,
|
|
1631
|
-
value: i &&
|
|
1631
|
+
value: i && S ? we(i, r, /* @__PURE__ */ new Date()) : void 0,
|
|
1632
1632
|
minDate: u,
|
|
1633
1633
|
maxDate: f,
|
|
1634
1634
|
theme: c
|
|
@@ -1636,7 +1636,7 @@ const Ko = ({
|
|
|
1636
1636
|
)
|
|
1637
1637
|
}
|
|
1638
1638
|
) });
|
|
1639
|
-
},
|
|
1639
|
+
}, Xe = (e) => {
|
|
1640
1640
|
if (e === "")
|
|
1641
1641
|
return "00";
|
|
1642
1642
|
const t = parseInt(e, 10);
|
|
@@ -1652,7 +1652,7 @@ const Ko = ({
|
|
|
1652
1652
|
default:
|
|
1653
1653
|
throw new Error("Invalid hour string");
|
|
1654
1654
|
}
|
|
1655
|
-
},
|
|
1655
|
+
}, et = (e) => {
|
|
1656
1656
|
if (e === "")
|
|
1657
1657
|
return "00";
|
|
1658
1658
|
const t = parseInt(e, 10);
|
|
@@ -1668,13 +1668,13 @@ const Ko = ({
|
|
|
1668
1668
|
default:
|
|
1669
1669
|
throw new Error("Invalid minute string");
|
|
1670
1670
|
}
|
|
1671
|
-
},
|
|
1672
|
-
if (!
|
|
1671
|
+
}, da = (e) => {
|
|
1672
|
+
if (!pt(e))
|
|
1673
1673
|
return { time: e, success: !1 };
|
|
1674
1674
|
const t = e && e.split(/-|:|,|;|[/]|[.]| /);
|
|
1675
1675
|
if (t && t.length === 2)
|
|
1676
1676
|
try {
|
|
1677
|
-
const r =
|
|
1677
|
+
const r = Xe(t[0]), n = et(t[1]);
|
|
1678
1678
|
return { time: `${r}:${n}`, success: !0 };
|
|
1679
1679
|
} catch {
|
|
1680
1680
|
return { time: e, success: !1 };
|
|
@@ -1703,7 +1703,7 @@ const Ko = ({
|
|
|
1703
1703
|
}
|
|
1704
1704
|
}
|
|
1705
1705
|
return { time: e, success: !1 };
|
|
1706
|
-
},
|
|
1706
|
+
}, pt = (e) => e ? /^[-:.,/; 0-9]+$/.test(e) : !0, Zo = ({
|
|
1707
1707
|
onValueChange: e,
|
|
1708
1708
|
showPlaceholder: t = !0,
|
|
1709
1709
|
useIcon: r = !0,
|
|
@@ -1712,15 +1712,15 @@ const Ko = ({
|
|
|
1712
1712
|
variant: o,
|
|
1713
1713
|
...i
|
|
1714
1714
|
}) => {
|
|
1715
|
-
const [l, c] =
|
|
1715
|
+
const [l, c] = C(() => pt(n)), d = "hh:mm", u = v(() => {
|
|
1716
1716
|
if (n) {
|
|
1717
|
-
const h =
|
|
1717
|
+
const h = da(n);
|
|
1718
1718
|
c(h.success), h.success && e && e(h.time);
|
|
1719
1719
|
}
|
|
1720
|
-
}, [n, e, c]), f =
|
|
1720
|
+
}, [n, e, c]), f = v(
|
|
1721
1721
|
(h) => {
|
|
1722
|
-
const _ = h.target.value,
|
|
1723
|
-
c(
|
|
1722
|
+
const _ = h.target.value, p = pt(_);
|
|
1723
|
+
c(p && _.length <= d.length), e && e(_);
|
|
1724
1724
|
},
|
|
1725
1725
|
[e, c]
|
|
1726
1726
|
);
|
|
@@ -1730,7 +1730,7 @@ const Ko = ({
|
|
|
1730
1730
|
...i,
|
|
1731
1731
|
type: "time",
|
|
1732
1732
|
variant: l ? o : "error",
|
|
1733
|
-
iconLeft: r ?
|
|
1733
|
+
iconLeft: r ? sr : void 0,
|
|
1734
1734
|
value: n,
|
|
1735
1735
|
placeholder: t ? d : void 0,
|
|
1736
1736
|
onChange: f,
|
|
@@ -1738,7 +1738,7 @@ const Ko = ({
|
|
|
1738
1738
|
width: a
|
|
1739
1739
|
}
|
|
1740
1740
|
);
|
|
1741
|
-
},
|
|
1741
|
+
}, Sr = ({
|
|
1742
1742
|
autoFocusLeft: e,
|
|
1743
1743
|
autoFocusRight: t,
|
|
1744
1744
|
onEsc: r,
|
|
@@ -1753,142 +1753,142 @@ const Ko = ({
|
|
|
1753
1753
|
onChangeLeft: f,
|
|
1754
1754
|
onChangeRight: h,
|
|
1755
1755
|
valueLeft: _,
|
|
1756
|
-
valueRight:
|
|
1756
|
+
valueRight: p,
|
|
1757
1757
|
minLeft: y,
|
|
1758
|
-
maxLeft:
|
|
1759
|
-
minRight:
|
|
1760
|
-
maxRight:
|
|
1761
|
-
onClickLeft:
|
|
1762
|
-
onClickRight:
|
|
1758
|
+
maxLeft: w,
|
|
1759
|
+
minRight: D,
|
|
1760
|
+
maxRight: g,
|
|
1761
|
+
onClickLeft: b,
|
|
1762
|
+
onClickRight: m,
|
|
1763
1763
|
onClickCalendar: k,
|
|
1764
|
-
onClickArrowDown:
|
|
1765
|
-
onBlurLeft:
|
|
1766
|
-
onBlurRight:
|
|
1767
|
-
onFocusLeft:
|
|
1768
|
-
onFocusRight:
|
|
1764
|
+
onClickArrowDown: x,
|
|
1765
|
+
onBlurLeft: S,
|
|
1766
|
+
onBlurRight: N,
|
|
1767
|
+
onFocusLeft: B,
|
|
1768
|
+
onFocusRight: R,
|
|
1769
1769
|
inputRefLeft: A,
|
|
1770
|
-
inputRefRight:
|
|
1771
|
-
variant:
|
|
1772
|
-
variantLeft:
|
|
1770
|
+
inputRefRight: H,
|
|
1771
|
+
variant: E,
|
|
1772
|
+
variantLeft: P,
|
|
1773
1773
|
variantRight: K,
|
|
1774
1774
|
onBlur: J,
|
|
1775
|
-
showPresets:
|
|
1776
|
-
widthLeft:
|
|
1777
|
-
widthRight:
|
|
1778
|
-
disabled:
|
|
1775
|
+
showPresets: M,
|
|
1776
|
+
widthLeft: q,
|
|
1777
|
+
widthRight: U,
|
|
1778
|
+
disabled: V
|
|
1779
1779
|
}) => {
|
|
1780
|
-
const W =
|
|
1781
|
-
() =>
|
|
1782
|
-
|
|
1780
|
+
const W = $(0), Y = I(
|
|
1781
|
+
() => dn((O) => {
|
|
1782
|
+
O === 0 && J?.();
|
|
1783
1783
|
}, 10),
|
|
1784
1784
|
[J]
|
|
1785
|
-
), X =
|
|
1786
|
-
(
|
|
1787
|
-
W.current++,
|
|
1785
|
+
), X = v(
|
|
1786
|
+
(O) => {
|
|
1787
|
+
W.current++, Y(W.current), B && B(O);
|
|
1788
1788
|
},
|
|
1789
|
-
[
|
|
1790
|
-
),
|
|
1791
|
-
(
|
|
1792
|
-
W.current++,
|
|
1789
|
+
[B, W, Y]
|
|
1790
|
+
), re = v(
|
|
1791
|
+
(O) => {
|
|
1792
|
+
W.current++, Y(W.current), R && R(O);
|
|
1793
1793
|
},
|
|
1794
|
-
[
|
|
1795
|
-
),
|
|
1796
|
-
(
|
|
1797
|
-
W.current--,
|
|
1794
|
+
[R, W, Y]
|
|
1795
|
+
), se = v(
|
|
1796
|
+
(O) => {
|
|
1797
|
+
W.current--, Y(W.current), S && S(O);
|
|
1798
1798
|
},
|
|
1799
|
-
[
|
|
1800
|
-
),
|
|
1801
|
-
(
|
|
1802
|
-
W.current--,
|
|
1799
|
+
[S, W, Y]
|
|
1800
|
+
), ue = v(
|
|
1801
|
+
(O) => {
|
|
1802
|
+
W.current--, Y(W.current), N && N(O);
|
|
1803
1803
|
},
|
|
1804
|
-
[
|
|
1804
|
+
[N, W, Y]
|
|
1805
1805
|
);
|
|
1806
|
-
return /* @__PURE__ */ s(L, { children: /* @__PURE__ */
|
|
1807
|
-
|
|
1806
|
+
return /* @__PURE__ */ s(L, { children: /* @__PURE__ */ T(
|
|
1807
|
+
fn,
|
|
1808
1808
|
{
|
|
1809
1809
|
disableContentPaddingRight: !0,
|
|
1810
|
-
disabled:
|
|
1811
|
-
variant:
|
|
1812
|
-
contentRight: /* @__PURE__ */
|
|
1810
|
+
disabled: V,
|
|
1811
|
+
variant: E,
|
|
1812
|
+
contentRight: /* @__PURE__ */ T(z, { alignItems: "center", children: [
|
|
1813
1813
|
/* @__PURE__ */ s(Ae, { num: 0.5, children: /* @__PURE__ */ s(
|
|
1814
1814
|
Q,
|
|
1815
1815
|
{
|
|
1816
1816
|
leftIcon: Fe,
|
|
1817
1817
|
onClick: k,
|
|
1818
|
-
disabled:
|
|
1818
|
+
disabled: V,
|
|
1819
1819
|
size: "small"
|
|
1820
1820
|
}
|
|
1821
1821
|
) }),
|
|
1822
|
-
|
|
1823
|
-
/* @__PURE__ */ s(
|
|
1822
|
+
M ? /* @__PURE__ */ T(yt, { children: [
|
|
1823
|
+
/* @__PURE__ */ s(z, { height: "22px", children: /* @__PURE__ */ s(Yr, { vertical: !0 }) }),
|
|
1824
1824
|
/* @__PURE__ */ s(Ae, { num: 0.5, children: /* @__PURE__ */ s(
|
|
1825
1825
|
Q,
|
|
1826
1826
|
{
|
|
1827
|
-
leftIcon:
|
|
1828
|
-
onClick:
|
|
1829
|
-
disabled:
|
|
1827
|
+
leftIcon: Dt,
|
|
1828
|
+
onClick: x,
|
|
1829
|
+
disabled: V,
|
|
1830
1830
|
size: "small"
|
|
1831
1831
|
}
|
|
1832
1832
|
) })
|
|
1833
1833
|
] }) : null
|
|
1834
1834
|
] }),
|
|
1835
1835
|
children: [
|
|
1836
|
-
/* @__PURE__ */ s(L, { width:
|
|
1836
|
+
/* @__PURE__ */ s(L, { width: q, children: /* @__PURE__ */ s(
|
|
1837
1837
|
pe,
|
|
1838
1838
|
{
|
|
1839
1839
|
onEsc: r,
|
|
1840
1840
|
onEnter: n,
|
|
1841
|
-
onClick:
|
|
1842
|
-
disabled:
|
|
1841
|
+
onClick: b,
|
|
1842
|
+
disabled: V,
|
|
1843
1843
|
hideBorder: !0,
|
|
1844
1844
|
placeholder: l,
|
|
1845
1845
|
value: _,
|
|
1846
1846
|
onValueChange: a,
|
|
1847
1847
|
onChange: f,
|
|
1848
|
-
onBlur:
|
|
1848
|
+
onBlur: se,
|
|
1849
1849
|
onFocus: X,
|
|
1850
1850
|
inputRef: A,
|
|
1851
|
-
variant:
|
|
1851
|
+
variant: P,
|
|
1852
1852
|
type: d,
|
|
1853
1853
|
autoFocus: e,
|
|
1854
1854
|
min: y,
|
|
1855
|
-
max:
|
|
1855
|
+
max: w
|
|
1856
1856
|
}
|
|
1857
1857
|
) }),
|
|
1858
|
-
/* @__PURE__ */ s(
|
|
1859
|
-
|
|
1858
|
+
/* @__PURE__ */ s(z, { indent: 0.5, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ s(
|
|
1859
|
+
or,
|
|
1860
1860
|
{
|
|
1861
1861
|
icon: i,
|
|
1862
1862
|
size: 12,
|
|
1863
|
-
color:
|
|
1863
|
+
color: It("--lhds-color-ui-500")
|
|
1864
1864
|
}
|
|
1865
1865
|
) }),
|
|
1866
|
-
/* @__PURE__ */ s(L, { width:
|
|
1866
|
+
/* @__PURE__ */ s(L, { width: U, children: /* @__PURE__ */ s(
|
|
1867
1867
|
pe,
|
|
1868
1868
|
{
|
|
1869
1869
|
onEsc: r,
|
|
1870
1870
|
onEnter: n,
|
|
1871
|
-
onClick:
|
|
1872
|
-
disabled:
|
|
1871
|
+
onClick: m,
|
|
1872
|
+
disabled: V,
|
|
1873
1873
|
hideBorder: !0,
|
|
1874
1874
|
placeholder: c,
|
|
1875
|
-
value:
|
|
1875
|
+
value: p,
|
|
1876
1876
|
onValueChange: o,
|
|
1877
1877
|
onChange: h,
|
|
1878
|
-
onBlur:
|
|
1879
|
-
onFocus:
|
|
1880
|
-
inputRef:
|
|
1878
|
+
onBlur: ue,
|
|
1879
|
+
onFocus: re,
|
|
1880
|
+
inputRef: H,
|
|
1881
1881
|
variant: K,
|
|
1882
1882
|
type: u,
|
|
1883
1883
|
autoFocus: t,
|
|
1884
|
-
min:
|
|
1885
|
-
max:
|
|
1884
|
+
min: D,
|
|
1885
|
+
max: g
|
|
1886
1886
|
}
|
|
1887
1887
|
) })
|
|
1888
1888
|
]
|
|
1889
1889
|
}
|
|
1890
1890
|
) });
|
|
1891
|
-
},
|
|
1891
|
+
}, ua = (e) => {
|
|
1892
1892
|
if (e == null)
|
|
1893
1893
|
throw new Error("Time is not set.");
|
|
1894
1894
|
if (e === "")
|
|
@@ -1910,38 +1910,38 @@ const Ko = ({
|
|
|
1910
1910
|
if (n < 0 || n > 59)
|
|
1911
1911
|
throw new Error("Invalid time.");
|
|
1912
1912
|
return r * 100 + n;
|
|
1913
|
-
},
|
|
1913
|
+
}, _a = (e) => {
|
|
1914
1914
|
try {
|
|
1915
|
-
return
|
|
1915
|
+
return ua(e), !0;
|
|
1916
1916
|
} catch {
|
|
1917
1917
|
return !1;
|
|
1918
1918
|
}
|
|
1919
|
-
},
|
|
1920
|
-
if (e &&
|
|
1919
|
+
}, Je = (e) => {
|
|
1920
|
+
if (e && _a(e)) {
|
|
1921
1921
|
const t = e.split(":");
|
|
1922
1922
|
return {
|
|
1923
|
-
hour:
|
|
1924
|
-
minute:
|
|
1923
|
+
hour: Et(t[0]),
|
|
1924
|
+
minute: Et(t[1])
|
|
1925
1925
|
};
|
|
1926
1926
|
}
|
|
1927
1927
|
return {
|
|
1928
1928
|
hour: void 0,
|
|
1929
1929
|
minute: void 0
|
|
1930
1930
|
};
|
|
1931
|
-
},
|
|
1931
|
+
}, fa = (e) => `${Xe(String(e.getHours()))}:${et(
|
|
1932
1932
|
String(e.getMinutes())
|
|
1933
|
-
)}`,
|
|
1934
|
-
timePicker:
|
|
1935
|
-
timePickerColumn:
|
|
1936
|
-
},
|
|
1933
|
+
)}`, ha = "_timePicker_1w05d_1", ga = "_timePickerColumn_1w05d_6", Br = {
|
|
1934
|
+
timePicker: ha,
|
|
1935
|
+
timePickerColumn: ga
|
|
1936
|
+
}, pa = ({
|
|
1937
1937
|
onClick: e,
|
|
1938
1938
|
item: t,
|
|
1939
1939
|
selected: r,
|
|
1940
1940
|
columnRef: n,
|
|
1941
1941
|
canScrollRef: a
|
|
1942
1942
|
}) => {
|
|
1943
|
-
const o =
|
|
1944
|
-
return
|
|
1943
|
+
const o = $(null);
|
|
1944
|
+
return ae(
|
|
1945
1945
|
function() {
|
|
1946
1946
|
if (r && n.current && o.current && a.current) {
|
|
1947
1947
|
const l = o.current.scrollHeight * Math.max(t - 2, 0);
|
|
@@ -1950,7 +1950,7 @@ const Ko = ({
|
|
|
1950
1950
|
},
|
|
1951
1951
|
[n, t, r, a]
|
|
1952
1952
|
), /* @__PURE__ */ s(
|
|
1953
|
-
|
|
1953
|
+
z,
|
|
1954
1954
|
{
|
|
1955
1955
|
width: "64px",
|
|
1956
1956
|
justifyContent: "center",
|
|
@@ -1958,9 +1958,9 @@ const Ko = ({
|
|
|
1958
1958
|
indent: 0.5,
|
|
1959
1959
|
ref: o,
|
|
1960
1960
|
children: r ? /* @__PURE__ */ s(
|
|
1961
|
-
|
|
1961
|
+
Re,
|
|
1962
1962
|
{
|
|
1963
|
-
label:
|
|
1963
|
+
label: un(String(t), 2, "0"),
|
|
1964
1964
|
onClick: () => e && e(t)
|
|
1965
1965
|
}
|
|
1966
1966
|
) : /* @__PURE__ */ s(
|
|
@@ -1972,15 +1972,15 @@ const Ko = ({
|
|
|
1972
1972
|
)
|
|
1973
1973
|
}
|
|
1974
1974
|
);
|
|
1975
|
-
},
|
|
1975
|
+
}, Qt = ({
|
|
1976
1976
|
onClick: e,
|
|
1977
1977
|
items: t,
|
|
1978
1978
|
selectedItem: r,
|
|
1979
1979
|
canScrollRef: n
|
|
1980
1980
|
}) => {
|
|
1981
|
-
const a =
|
|
1982
|
-
return /* @__PURE__ */ s(Z, { className:
|
|
1983
|
-
|
|
1981
|
+
const a = $(null);
|
|
1982
|
+
return /* @__PURE__ */ s(Z, { className: Br.timePickerColumn, ref: a, children: t.map((o) => /* @__PURE__ */ s(
|
|
1983
|
+
pa,
|
|
1984
1984
|
{
|
|
1985
1985
|
item: o,
|
|
1986
1986
|
onClick: e,
|
|
@@ -1990,37 +1990,37 @@ const Ko = ({
|
|
|
1990
1990
|
},
|
|
1991
1991
|
o
|
|
1992
1992
|
)) });
|
|
1993
|
-
},
|
|
1993
|
+
}, ma = Ct(0, 24), ba = Ct(0, 60), va = ({
|
|
1994
1994
|
value: e,
|
|
1995
1995
|
onValueChange: t
|
|
1996
1996
|
}) => {
|
|
1997
|
-
const r =
|
|
1998
|
-
|
|
1997
|
+
const r = $(!0), [n, a] = C(void 0), [o, i] = C(void 0);
|
|
1998
|
+
ae(() => {
|
|
1999
1999
|
if (e) {
|
|
2000
|
-
const { minute: d, hour: u } =
|
|
2000
|
+
const { minute: d, hour: u } = Je(e);
|
|
2001
2001
|
a(u), i(d);
|
|
2002
2002
|
}
|
|
2003
2003
|
}, [e]);
|
|
2004
|
-
const l =
|
|
2004
|
+
const l = v(
|
|
2005
2005
|
(d) => {
|
|
2006
2006
|
a(d), t?.(
|
|
2007
|
-
`${
|
|
2007
|
+
`${Xe(String(d ?? 0))}:${et(String(o ?? 0))}`
|
|
2008
2008
|
);
|
|
2009
2009
|
},
|
|
2010
2010
|
[o, t]
|
|
2011
|
-
), c =
|
|
2011
|
+
), c = v(
|
|
2012
2012
|
(d) => {
|
|
2013
2013
|
i(d), t?.(
|
|
2014
|
-
`${
|
|
2014
|
+
`${Xe(String(n ?? 0))}:${et(String(d ?? 0))}`
|
|
2015
2015
|
);
|
|
2016
2016
|
},
|
|
2017
2017
|
[n, t]
|
|
2018
2018
|
);
|
|
2019
|
-
return /* @__PURE__ */
|
|
2019
|
+
return /* @__PURE__ */ T(z, { className: Br.timePicker, children: [
|
|
2020
2020
|
/* @__PURE__ */ s(
|
|
2021
|
-
|
|
2021
|
+
Qt,
|
|
2022
2022
|
{
|
|
2023
|
-
items:
|
|
2023
|
+
items: ma,
|
|
2024
2024
|
onClick: l,
|
|
2025
2025
|
selectedItem: n,
|
|
2026
2026
|
canScrollRef: r
|
|
@@ -2028,22 +2028,22 @@ const Ko = ({
|
|
|
2028
2028
|
),
|
|
2029
2029
|
/* @__PURE__ */ s(Ae, {}),
|
|
2030
2030
|
/* @__PURE__ */ s(
|
|
2031
|
-
|
|
2031
|
+
Qt,
|
|
2032
2032
|
{
|
|
2033
|
-
items:
|
|
2033
|
+
items: ba,
|
|
2034
2034
|
onClick: c,
|
|
2035
2035
|
selectedItem: o,
|
|
2036
2036
|
canScrollRef: r
|
|
2037
2037
|
}
|
|
2038
2038
|
)
|
|
2039
2039
|
] });
|
|
2040
|
-
},
|
|
2041
|
-
|
|
2040
|
+
}, ya = (e, t, r) => {
|
|
2041
|
+
ae(
|
|
2042
2042
|
function() {
|
|
2043
2043
|
e && t(e);
|
|
2044
2044
|
},
|
|
2045
2045
|
[e, t]
|
|
2046
|
-
),
|
|
2046
|
+
), ae(
|
|
2047
2047
|
function() {
|
|
2048
2048
|
r.current && (e ? r.current.valueAsDate = new Date(
|
|
2049
2049
|
Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())
|
|
@@ -2051,7 +2051,7 @@ const Ko = ({
|
|
|
2051
2051
|
},
|
|
2052
2052
|
[e, r]
|
|
2053
2053
|
);
|
|
2054
|
-
},
|
|
2054
|
+
}, wa = (e, t, {
|
|
2055
2055
|
setDateInFocus: r,
|
|
2056
2056
|
showCalendarInternal: n,
|
|
2057
2057
|
hideCalendarInternal: a,
|
|
@@ -2062,23 +2062,23 @@ const Ko = ({
|
|
|
2062
2062
|
localDate: d,
|
|
2063
2063
|
setLocalDate: u
|
|
2064
2064
|
}, f) => {
|
|
2065
|
-
const h =
|
|
2066
|
-
(
|
|
2067
|
-
if (!
|
|
2065
|
+
const h = v(
|
|
2066
|
+
(g) => {
|
|
2067
|
+
if (!g)
|
|
2068
2068
|
return;
|
|
2069
|
-
const
|
|
2069
|
+
const b = new Date(g);
|
|
2070
2070
|
if (e)
|
|
2071
|
-
|
|
2071
|
+
b.setHours(e.getHours()), b.setMinutes(e.getMinutes()), t?.(b), u(void 0);
|
|
2072
2072
|
else if (l) {
|
|
2073
|
-
const { minute:
|
|
2074
|
-
|
|
2073
|
+
const { minute: m, hour: k } = Je(l);
|
|
2074
|
+
b.setHours(k ?? 0), b.setMinutes(m ?? 0), t?.(b), u(void 0);
|
|
2075
2075
|
} else
|
|
2076
|
-
u(
|
|
2077
|
-
r(
|
|
2076
|
+
u(b);
|
|
2077
|
+
r(b), f.current && (f.current.valueAsDate = new Date(
|
|
2078
2078
|
Date.UTC(
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2079
|
+
b.getFullYear(),
|
|
2080
|
+
b.getMonth(),
|
|
2081
|
+
b.getDate()
|
|
2082
2082
|
)
|
|
2083
2083
|
));
|
|
2084
2084
|
},
|
|
@@ -2090,44 +2090,44 @@ const Ko = ({
|
|
|
2090
2090
|
r,
|
|
2091
2091
|
u
|
|
2092
2092
|
]
|
|
2093
|
-
), _ =
|
|
2094
|
-
(
|
|
2095
|
-
if (
|
|
2093
|
+
), _ = v(
|
|
2094
|
+
(g) => {
|
|
2095
|
+
if (g)
|
|
2096
2096
|
if (e) {
|
|
2097
|
-
const
|
|
2098
|
-
|
|
2097
|
+
const b = Je(g), m = new Date(e);
|
|
2098
|
+
m.setHours(b.hour || 0), m.setMinutes(b.minute || 0), t?.(m), c(void 0);
|
|
2099
2099
|
} else if (d) {
|
|
2100
|
-
const
|
|
2101
|
-
|
|
2100
|
+
const b = Je(g), m = new Date(d);
|
|
2101
|
+
m.setHours(b.hour || 0), m.setMinutes(b.minute || 0), t?.(m), c(void 0);
|
|
2102
2102
|
} else
|
|
2103
|
-
c(
|
|
2103
|
+
c(g);
|
|
2104
2104
|
},
|
|
2105
2105
|
[t, e, d, c]
|
|
2106
|
-
),
|
|
2107
|
-
(
|
|
2108
|
-
|
|
2106
|
+
), p = v(
|
|
2107
|
+
(g) => {
|
|
2108
|
+
g.target.value[0] !== "0" && h(g.target.valueAsDate);
|
|
2109
2109
|
},
|
|
2110
2110
|
[h]
|
|
2111
|
-
), y =
|
|
2112
|
-
(
|
|
2111
|
+
), y = v(
|
|
2112
|
+
(g) => _(g.target.value),
|
|
2113
2113
|
[_]
|
|
2114
|
-
),
|
|
2114
|
+
), w = v(() => {
|
|
2115
2115
|
r(e || /* @__PURE__ */ new Date()), i("calendar"), n();
|
|
2116
|
-
}, [e, i, n, r]),
|
|
2116
|
+
}, [e, i, n, r]), D = v(() => {
|
|
2117
2117
|
o(void 0), a();
|
|
2118
2118
|
}, [o, a]);
|
|
2119
2119
|
return {
|
|
2120
|
-
inputLeftChangeHandler:
|
|
2120
|
+
inputLeftChangeHandler: p,
|
|
2121
2121
|
inputRightChangeHandler: y,
|
|
2122
|
-
hideCalendar:
|
|
2123
|
-
showCalendar:
|
|
2122
|
+
hideCalendar: D,
|
|
2123
|
+
showCalendar: w,
|
|
2124
2124
|
onChangeTime: _,
|
|
2125
2125
|
onChangeDate: h
|
|
2126
2126
|
};
|
|
2127
|
-
},
|
|
2128
|
-
const [t, r] =
|
|
2127
|
+
}, Da = (e) => {
|
|
2128
|
+
const [t, r] = C(void 0), [n, a] = C(void 0), [o, i, l] = ht(!1), [c, d, u] = ht(!1), [f, h] = C(void 0), [_, p] = C(
|
|
2129
2129
|
() => e ?? /* @__PURE__ */ new Date()
|
|
2130
|
-
), [y,
|
|
2130
|
+
), [y, w] = C("calendar");
|
|
2131
2131
|
return {
|
|
2132
2132
|
isCalendarVisible: o,
|
|
2133
2133
|
showCalendarInternal: i,
|
|
@@ -2135,9 +2135,9 @@ const Ko = ({
|
|
|
2135
2135
|
firstFocusedInput: f,
|
|
2136
2136
|
setFirstFocusedInput: h,
|
|
2137
2137
|
dateInFocus: _,
|
|
2138
|
-
setDateInFocus:
|
|
2138
|
+
setDateInFocus: p,
|
|
2139
2139
|
currentPanel: y,
|
|
2140
|
-
setCurrentPanel:
|
|
2140
|
+
setCurrentPanel: w,
|
|
2141
2141
|
isTimePickerVisible: c,
|
|
2142
2142
|
showTimePicker: d,
|
|
2143
2143
|
hideTimePicker: u,
|
|
@@ -2146,24 +2146,24 @@ const Ko = ({
|
|
|
2146
2146
|
localTime: n,
|
|
2147
2147
|
setLocalTime: a
|
|
2148
2148
|
};
|
|
2149
|
-
},
|
|
2149
|
+
}, ka = (e, t, r, n, {
|
|
2150
2150
|
isCalendarVisible: a,
|
|
2151
2151
|
setCurrentPanel: o,
|
|
2152
2152
|
showTimePicker: i,
|
|
2153
2153
|
hideTimePicker: l
|
|
2154
2154
|
}) => {
|
|
2155
|
-
const c =
|
|
2155
|
+
const c = v(() => {
|
|
2156
2156
|
a || r(), o("calendar"), l();
|
|
2157
|
-
}, [l, a, o, r]), d =
|
|
2157
|
+
}, [l, a, o, r]), d = v(() => {
|
|
2158
2158
|
n(), i();
|
|
2159
|
-
}, [n, i]), u =
|
|
2160
|
-
(
|
|
2161
|
-
e(
|
|
2159
|
+
}, [n, i]), u = v(
|
|
2160
|
+
(p) => {
|
|
2161
|
+
e(p.date), n(), i();
|
|
2162
2162
|
},
|
|
2163
2163
|
[e, n, i]
|
|
2164
|
-
), f =
|
|
2164
|
+
), f = v(() => {
|
|
2165
2165
|
o("presets"), r();
|
|
2166
|
-
}, [o, r]), h =
|
|
2166
|
+
}, [o, r]), h = v(() => {
|
|
2167
2167
|
a ? n() : (t.current?.focus(), o("calendar"), r());
|
|
2168
2168
|
}, [
|
|
2169
2169
|
a,
|
|
@@ -2171,9 +2171,9 @@ const Ko = ({
|
|
|
2171
2171
|
t,
|
|
2172
2172
|
o,
|
|
2173
2173
|
r
|
|
2174
|
-
]), _ =
|
|
2175
|
-
(
|
|
2176
|
-
|
|
2174
|
+
]), _ = v(
|
|
2175
|
+
(p) => {
|
|
2176
|
+
p.key === "Escape" && n();
|
|
2177
2177
|
},
|
|
2178
2178
|
[n]
|
|
2179
2179
|
);
|
|
@@ -2185,7 +2185,7 @@ const Ko = ({
|
|
|
2185
2185
|
onClickCalendarButton: h,
|
|
2186
2186
|
onKeyDownHandler: _
|
|
2187
2187
|
};
|
|
2188
|
-
},
|
|
2188
|
+
}, Qo = ({
|
|
2189
2189
|
value: e,
|
|
2190
2190
|
onValueChange: t,
|
|
2191
2191
|
onEnter: r,
|
|
@@ -2201,80 +2201,80 @@ const Ko = ({
|
|
|
2201
2201
|
zIndex: h,
|
|
2202
2202
|
appendTo: _
|
|
2203
2203
|
}) => {
|
|
2204
|
-
const
|
|
2205
|
-
setCurrentPanel:
|
|
2206
|
-
currentPanel:
|
|
2207
|
-
isCalendarVisible:
|
|
2208
|
-
dateInFocus:
|
|
2204
|
+
const p = $(null), y = $(null), w = Da(e), {
|
|
2205
|
+
setCurrentPanel: D,
|
|
2206
|
+
currentPanel: g,
|
|
2207
|
+
isCalendarVisible: b,
|
|
2208
|
+
dateInFocus: m,
|
|
2209
2209
|
setDateInFocus: k,
|
|
2210
|
-
isTimePickerVisible:
|
|
2211
|
-
hideTimePicker:
|
|
2212
|
-
localTime:
|
|
2213
|
-
localDate:
|
|
2214
|
-
} =
|
|
2215
|
-
showCalendar:
|
|
2210
|
+
isTimePickerVisible: x,
|
|
2211
|
+
hideTimePicker: S,
|
|
2212
|
+
localTime: N,
|
|
2213
|
+
localDate: B
|
|
2214
|
+
} = w, {
|
|
2215
|
+
showCalendar: R,
|
|
2216
2216
|
hideCalendar: A,
|
|
2217
|
-
inputLeftChangeHandler:
|
|
2218
|
-
inputRightChangeHandler:
|
|
2219
|
-
onChangeTime:
|
|
2217
|
+
inputLeftChangeHandler: H,
|
|
2218
|
+
inputRightChangeHandler: E,
|
|
2219
|
+
onChangeTime: P,
|
|
2220
2220
|
onChangeDate: K
|
|
2221
|
-
} =
|
|
2221
|
+
} = wa(e, t, w, p), {
|
|
2222
2222
|
onKeyDownHandler: J,
|
|
2223
|
-
onFocusRight:
|
|
2224
|
-
onFocusLeft:
|
|
2225
|
-
onClickDay:
|
|
2226
|
-
onClickCalendarButton:
|
|
2223
|
+
onFocusRight: M,
|
|
2224
|
+
onFocusLeft: q,
|
|
2225
|
+
onClickDay: U,
|
|
2226
|
+
onClickCalendarButton: V,
|
|
2227
2227
|
onClickArrowButton: W
|
|
2228
|
-
} =
|
|
2228
|
+
} = ka(
|
|
2229
2229
|
K,
|
|
2230
|
-
|
|
2231
|
-
|
|
2230
|
+
p,
|
|
2231
|
+
R,
|
|
2232
2232
|
A,
|
|
2233
|
-
|
|
2233
|
+
w
|
|
2234
2234
|
);
|
|
2235
|
-
|
|
2236
|
-
const
|
|
2237
|
-
const
|
|
2238
|
-
return
|
|
2235
|
+
ya(e, k, p);
|
|
2236
|
+
const Y = I(() => {
|
|
2237
|
+
const O = e || B;
|
|
2238
|
+
return O ? he(void 0, O, [
|
|
2239
2239
|
"singleSelected",
|
|
2240
2240
|
"selected"
|
|
2241
2241
|
]) : {};
|
|
2242
|
-
}, [
|
|
2243
|
-
A(),
|
|
2244
|
-
}, [A,
|
|
2245
|
-
() => e ?
|
|
2246
|
-
[e,
|
|
2247
|
-
),
|
|
2242
|
+
}, [B, e]), X = v(() => {
|
|
2243
|
+
A(), S();
|
|
2244
|
+
}, [A, S]), re = I(
|
|
2245
|
+
() => e ? fa(e) : N,
|
|
2246
|
+
[e, N]
|
|
2247
|
+
), se = Lt(b, 300), ue = Lt(x, 300);
|
|
2248
2248
|
return /* @__PURE__ */ s(L, { onKeyDown: J, children: /* @__PURE__ */ s(
|
|
2249
2249
|
$e,
|
|
2250
2250
|
{
|
|
2251
2251
|
hideArrow: !0,
|
|
2252
2252
|
zIndex: h,
|
|
2253
2253
|
appendTo: _,
|
|
2254
|
-
renderTrigger: (
|
|
2255
|
-
|
|
2254
|
+
renderTrigger: (O) => /* @__PURE__ */ s(L, { ...O, children: /* @__PURE__ */ s(
|
|
2255
|
+
Sr,
|
|
2256
2256
|
{
|
|
2257
2257
|
autoFocusLeft: o,
|
|
2258
2258
|
onEsc: n,
|
|
2259
2259
|
onEnter: r,
|
|
2260
2260
|
onBlur: a,
|
|
2261
2261
|
disabled: f,
|
|
2262
|
-
separatorIcon:
|
|
2262
|
+
separatorIcon: sr,
|
|
2263
2263
|
typeLeft: "date",
|
|
2264
2264
|
typeRight: "time",
|
|
2265
2265
|
placeholderLeft: "yyyy-mm-dd",
|
|
2266
2266
|
placeholderRight: "hh:mm",
|
|
2267
|
-
onChangeLeft:
|
|
2268
|
-
onChangeRight:
|
|
2267
|
+
onChangeLeft: H,
|
|
2268
|
+
onChangeRight: E,
|
|
2269
2269
|
onClickArrowDown: W,
|
|
2270
|
-
onClickCalendar:
|
|
2271
|
-
onFocusLeft:
|
|
2272
|
-
onFocusRight:
|
|
2273
|
-
onClickLeft:
|
|
2274
|
-
onClickRight:
|
|
2275
|
-
inputRefLeft:
|
|
2270
|
+
onClickCalendar: V,
|
|
2271
|
+
onFocusLeft: q,
|
|
2272
|
+
onFocusRight: M,
|
|
2273
|
+
onClickLeft: q,
|
|
2274
|
+
onClickRight: M,
|
|
2275
|
+
inputRefLeft: p,
|
|
2276
2276
|
inputRefRight: y,
|
|
2277
|
-
valueRight:
|
|
2277
|
+
valueRight: re ?? "",
|
|
2278
2278
|
widthLeft: l,
|
|
2279
2279
|
widthRight: c,
|
|
2280
2280
|
minLeft: i,
|
|
@@ -2283,61 +2283,61 @@ const Ko = ({
|
|
|
2283
2283
|
}
|
|
2284
2284
|
) }),
|
|
2285
2285
|
placement: ze,
|
|
2286
|
-
open:
|
|
2286
|
+
open: b || x,
|
|
2287
2287
|
onRequestClose: X,
|
|
2288
|
-
children: (
|
|
2288
|
+
children: (se || ue) && /* @__PURE__ */ s(Z, { children: se ? /* @__PURE__ */ s(
|
|
2289
2289
|
xe,
|
|
2290
2290
|
{
|
|
2291
|
-
statePerMonth:
|
|
2292
|
-
onClickDay:
|
|
2293
|
-
dateInFocus:
|
|
2291
|
+
statePerMonth: Y,
|
|
2292
|
+
onClickDay: U,
|
|
2293
|
+
dateInFocus: m,
|
|
2294
2294
|
setDateInFocus: k,
|
|
2295
|
-
currentPanel:
|
|
2296
|
-
setCurrentPanel:
|
|
2295
|
+
currentPanel: g,
|
|
2296
|
+
setCurrentPanel: D,
|
|
2297
2297
|
minDate: i,
|
|
2298
2298
|
maxDate: d
|
|
2299
2299
|
}
|
|
2300
|
-
) :
|
|
2300
|
+
) : ue ? /* @__PURE__ */ T(Z, { children: [
|
|
2301
2301
|
/* @__PURE__ */ s(Z, { overflow: "hidden", height: "250px", children: /* @__PURE__ */ s(
|
|
2302
|
-
|
|
2302
|
+
va,
|
|
2303
2303
|
{
|
|
2304
|
-
value:
|
|
2305
|
-
onValueChange:
|
|
2304
|
+
value: re ?? "",
|
|
2305
|
+
onValueChange: P
|
|
2306
2306
|
}
|
|
2307
2307
|
) }),
|
|
2308
|
-
/* @__PURE__ */ s(
|
|
2309
|
-
/* @__PURE__ */ s(
|
|
2308
|
+
/* @__PURE__ */ s(Se, {}),
|
|
2309
|
+
/* @__PURE__ */ s(z, { justifyContent: "flex-end", children: /* @__PURE__ */ s(Re, { label: "Done", onClick: S }) })
|
|
2310
2310
|
] }) : null })
|
|
2311
2311
|
}
|
|
2312
2312
|
) });
|
|
2313
|
-
},
|
|
2313
|
+
}, xa = ({
|
|
2314
2314
|
value: e,
|
|
2315
2315
|
onValueChange: t,
|
|
2316
2316
|
year: r
|
|
2317
2317
|
}) => {
|
|
2318
2318
|
const n = String(r);
|
|
2319
|
-
return /* @__PURE__ */ s(
|
|
2320
|
-
},
|
|
2319
|
+
return /* @__PURE__ */ s(z, { justifyContent: "center", children: e === r ? /* @__PURE__ */ s(Re, { label: n, onClick: () => t?.(r) }) : /* @__PURE__ */ s(Q, { label: n, onClick: () => t?.(r) }) });
|
|
2320
|
+
}, Xo = ({
|
|
2321
2321
|
value: e,
|
|
2322
2322
|
onValueChange: t,
|
|
2323
2323
|
initialLastYear: r
|
|
2324
2324
|
}) => {
|
|
2325
|
-
const [n, a] =
|
|
2325
|
+
const [n, a] = C(() => e ? e + 4 : r ?? (/* @__PURE__ */ new Date()).getFullYear() + 4), o = I(() => {
|
|
2326
2326
|
const i = n - 11;
|
|
2327
|
-
return
|
|
2327
|
+
return pr(Ct(i, n + 1), 3);
|
|
2328
2328
|
}, [n]);
|
|
2329
|
-
return
|
|
2330
|
-
a((i) =>
|
|
2331
|
-
}, [e]), /* @__PURE__ */
|
|
2329
|
+
return ae(() => {
|
|
2330
|
+
a((i) => Ca(e, i));
|
|
2331
|
+
}, [e]), /* @__PURE__ */ T(z, { children: [
|
|
2332
2332
|
/* @__PURE__ */ s(Z, { justifyContent: "center", children: /* @__PURE__ */ s(
|
|
2333
2333
|
Q,
|
|
2334
2334
|
{
|
|
2335
|
-
leftIcon:
|
|
2335
|
+
leftIcon: tt,
|
|
2336
2336
|
onClick: () => a(n - 3)
|
|
2337
2337
|
}
|
|
2338
2338
|
) }),
|
|
2339
|
-
/* @__PURE__ */ s(Z, { gap: 1, children: o.map((i) => /* @__PURE__ */ s(
|
|
2340
|
-
|
|
2339
|
+
/* @__PURE__ */ s(Z, { gap: 1, children: o.map((i) => /* @__PURE__ */ s(z, { gap: 1, children: i.map((l) => /* @__PURE__ */ s(
|
|
2340
|
+
xa,
|
|
2341
2341
|
{
|
|
2342
2342
|
year: l,
|
|
2343
2343
|
onValueChange: t,
|
|
@@ -2353,7 +2353,7 @@ const Ko = ({
|
|
|
2353
2353
|
}
|
|
2354
2354
|
) })
|
|
2355
2355
|
] });
|
|
2356
|
-
},
|
|
2356
|
+
}, Ca = (e, t) => {
|
|
2357
2357
|
if (e == null)
|
|
2358
2358
|
return t;
|
|
2359
2359
|
if (e > t) {
|
|
@@ -2366,18 +2366,18 @@ const Ko = ({
|
|
|
2366
2366
|
return t - o;
|
|
2367
2367
|
}
|
|
2368
2368
|
return t;
|
|
2369
|
-
},
|
|
2370
|
-
|
|
2369
|
+
}, Sa = (e, t, r, n, a) => {
|
|
2370
|
+
ae(
|
|
2371
2371
|
function() {
|
|
2372
2372
|
e && r(e);
|
|
2373
2373
|
},
|
|
2374
2374
|
[e, r]
|
|
2375
|
-
),
|
|
2375
|
+
), ae(
|
|
2376
2376
|
function() {
|
|
2377
2377
|
t && r(t);
|
|
2378
2378
|
},
|
|
2379
2379
|
[t, r]
|
|
2380
|
-
),
|
|
2380
|
+
), ae(
|
|
2381
2381
|
function() {
|
|
2382
2382
|
n.current && (e ? n.current.valueAsDate = new Date(
|
|
2383
2383
|
Date.UTC(
|
|
@@ -2388,7 +2388,7 @@ const Ko = ({
|
|
|
2388
2388
|
) : n.current.valueAsDate = null);
|
|
2389
2389
|
},
|
|
2390
2390
|
[e, n]
|
|
2391
|
-
),
|
|
2391
|
+
), ae(
|
|
2392
2392
|
function() {
|
|
2393
2393
|
a.current && (t ? a.current.valueAsDate = new Date(
|
|
2394
2394
|
Date.UTC(
|
|
@@ -2400,14 +2400,14 @@ const Ko = ({
|
|
|
2400
2400
|
},
|
|
2401
2401
|
[t, a]
|
|
2402
2402
|
);
|
|
2403
|
-
},
|
|
2403
|
+
}, Ba = (e, t, r, {
|
|
2404
2404
|
setDateInFocus: n,
|
|
2405
2405
|
showCalendarInternal: a,
|
|
2406
2406
|
hideCalendarInternal: o,
|
|
2407
2407
|
setFirstFocusedInput: i,
|
|
2408
2408
|
setCurrentPanel: l
|
|
2409
2409
|
}) => {
|
|
2410
|
-
const c =
|
|
2410
|
+
const c = v(
|
|
2411
2411
|
(h) => {
|
|
2412
2412
|
h.target.value[0] !== "0" && r?.({
|
|
2413
2413
|
startDate: h.target.valueAsDate ?? void 0,
|
|
@@ -2415,7 +2415,7 @@ const Ko = ({
|
|
|
2415
2415
|
});
|
|
2416
2416
|
},
|
|
2417
2417
|
[r, t]
|
|
2418
|
-
), d =
|
|
2418
|
+
), d = v(
|
|
2419
2419
|
(h) => {
|
|
2420
2420
|
h.target.value[0] !== "0" && r?.({
|
|
2421
2421
|
startDate: e,
|
|
@@ -2423,12 +2423,12 @@ const Ko = ({
|
|
|
2423
2423
|
});
|
|
2424
2424
|
},
|
|
2425
2425
|
[r, e]
|
|
2426
|
-
), u =
|
|
2426
|
+
), u = v(
|
|
2427
2427
|
(h) => {
|
|
2428
2428
|
h != null ? n(h) : n(e || t || /* @__PURE__ */ new Date()), l("calendar"), a();
|
|
2429
2429
|
},
|
|
2430
2430
|
[e, t, l, a, n]
|
|
2431
|
-
), f =
|
|
2431
|
+
), f = v(() => {
|
|
2432
2432
|
i(void 0), o();
|
|
2433
2433
|
}, [i, o]);
|
|
2434
2434
|
return {
|
|
@@ -2439,8 +2439,8 @@ const Ko = ({
|
|
|
2439
2439
|
setCurrentPanel: l,
|
|
2440
2440
|
showCalendar: u
|
|
2441
2441
|
};
|
|
2442
|
-
},
|
|
2443
|
-
const [r, n, a] =
|
|
2442
|
+
}, Ma = (e, t) => {
|
|
2443
|
+
const [r, n, a] = ht(!1), [o, i] = C(void 0), [l, c] = C("startDate"), [d, u] = C(() => (l === "startDate" ? e : l === "endDate" ? t : void 0) ?? /* @__PURE__ */ new Date()), [f, h] = C("calendar");
|
|
2444
2444
|
return {
|
|
2445
2445
|
isCalendarVisible: r,
|
|
2446
2446
|
showCalendarInternal: n,
|
|
@@ -2454,7 +2454,7 @@ const Ko = ({
|
|
|
2454
2454
|
currentPanel: f,
|
|
2455
2455
|
setCurrentPanel: h
|
|
2456
2456
|
};
|
|
2457
|
-
},
|
|
2457
|
+
}, Ia = (e, t, r, n, a, o, i, {
|
|
2458
2458
|
firstFocusedInput: l,
|
|
2459
2459
|
setFirstFocusedInput: c,
|
|
2460
2460
|
isCalendarVisible: d,
|
|
@@ -2463,7 +2463,7 @@ const Ko = ({
|
|
|
2463
2463
|
setCurrentPanel: h,
|
|
2464
2464
|
setDateInFocus: _
|
|
2465
2465
|
}) => {
|
|
2466
|
-
const
|
|
2466
|
+
const p = v(() => {
|
|
2467
2467
|
l == null && c("startDate"), u("startDate"), d ? e != null && _(e) : o(e);
|
|
2468
2468
|
}, [
|
|
2469
2469
|
l,
|
|
@@ -2473,7 +2473,7 @@ const Ko = ({
|
|
|
2473
2473
|
c,
|
|
2474
2474
|
o,
|
|
2475
2475
|
_
|
|
2476
|
-
]), y =
|
|
2476
|
+
]), y = v(() => {
|
|
2477
2477
|
l == null && c("endDate"), u("endDate"), d ? t != null && _(t) : o(t);
|
|
2478
2478
|
}, [
|
|
2479
2479
|
l,
|
|
@@ -2483,23 +2483,23 @@ const Ko = ({
|
|
|
2483
2483
|
c,
|
|
2484
2484
|
o,
|
|
2485
2485
|
_
|
|
2486
|
-
]),
|
|
2487
|
-
(
|
|
2488
|
-
f === "startDate" ? t != null && G(
|
|
2489
|
-
startDate:
|
|
2486
|
+
]), w = v(
|
|
2487
|
+
(m) => {
|
|
2488
|
+
f === "startDate" ? t != null && G(m.date, t) ? (r?.({
|
|
2489
|
+
startDate: m.date,
|
|
2490
2490
|
endDate: void 0
|
|
2491
2491
|
}), u("endDate"), a.current?.focus()) : (r?.({
|
|
2492
|
-
startDate:
|
|
2492
|
+
startDate: m.date,
|
|
2493
2493
|
endDate: t
|
|
2494
|
-
}), l === "startDate" ? (u("endDate"), a.current?.focus()) : setTimeout(i, 50)) : f === "endDate" && (e ? G(e,
|
|
2495
|
-
startDate:
|
|
2494
|
+
}), l === "startDate" ? (u("endDate"), a.current?.focus()) : setTimeout(i, 50)) : f === "endDate" && (e ? G(e, m.date) ? (r?.({
|
|
2495
|
+
startDate: m.date,
|
|
2496
2496
|
endDate: void 0
|
|
2497
2497
|
}), u("endDate"), a.current?.focus()) : (r?.({
|
|
2498
2498
|
startDate: e,
|
|
2499
|
-
endDate:
|
|
2499
|
+
endDate: m.date
|
|
2500
2500
|
}), setTimeout(i, 50)) : (r?.({
|
|
2501
2501
|
startDate: e,
|
|
2502
|
-
endDate:
|
|
2502
|
+
endDate: m.date
|
|
2503
2503
|
}), u("startDate"), n.current?.focus()));
|
|
2504
2504
|
},
|
|
2505
2505
|
[
|
|
@@ -2513,9 +2513,9 @@ const Ko = ({
|
|
|
2513
2513
|
e,
|
|
2514
2514
|
n
|
|
2515
2515
|
]
|
|
2516
|
-
),
|
|
2516
|
+
), D = v(() => {
|
|
2517
2517
|
h("presets"), o();
|
|
2518
|
-
}, [h, o]),
|
|
2518
|
+
}, [h, o]), g = v(() => {
|
|
2519
2519
|
d ? i() : (u("startDate"), c("startDate"), n.current?.focus(), h("calendar"), o());
|
|
2520
2520
|
}, [
|
|
2521
2521
|
d,
|
|
@@ -2525,22 +2525,22 @@ const Ko = ({
|
|
|
2525
2525
|
n,
|
|
2526
2526
|
h,
|
|
2527
2527
|
o
|
|
2528
|
-
]),
|
|
2529
|
-
(
|
|
2530
|
-
|
|
2528
|
+
]), b = v(
|
|
2529
|
+
(m) => {
|
|
2530
|
+
m.key === "Escape" && i();
|
|
2531
2531
|
},
|
|
2532
2532
|
[i]
|
|
2533
2533
|
);
|
|
2534
2534
|
return {
|
|
2535
|
-
onFocusLeft:
|
|
2535
|
+
onFocusLeft: p,
|
|
2536
2536
|
onFocusRight: y,
|
|
2537
|
-
onClickDay:
|
|
2538
|
-
onClickArrowButton:
|
|
2539
|
-
onClickCalendarButton:
|
|
2540
|
-
onKeyDownHandler:
|
|
2537
|
+
onClickDay: w,
|
|
2538
|
+
onClickArrowButton: D,
|
|
2539
|
+
onClickCalendarButton: g,
|
|
2540
|
+
onKeyDownHandler: b
|
|
2541
2541
|
};
|
|
2542
2542
|
};
|
|
2543
|
-
function
|
|
2543
|
+
function es({
|
|
2544
2544
|
value: e,
|
|
2545
2545
|
onValueChange: t,
|
|
2546
2546
|
autoFocus: r,
|
|
@@ -2555,57 +2555,57 @@ function Qo({
|
|
|
2555
2555
|
firstMonthInMonthPicker: f,
|
|
2556
2556
|
numMonthsInMonthPicker: h,
|
|
2557
2557
|
variant: _,
|
|
2558
|
-
disabled:
|
|
2558
|
+
disabled: p,
|
|
2559
2559
|
zIndex: y,
|
|
2560
|
-
appendTo:
|
|
2561
|
-
renderBelowCalendar:
|
|
2560
|
+
appendTo: w,
|
|
2561
|
+
renderBelowCalendar: D
|
|
2562
2562
|
}) {
|
|
2563
|
-
const { startDate:
|
|
2564
|
-
dateInFocus:
|
|
2565
|
-
setDateInFocus:
|
|
2566
|
-
isCalendarVisible:
|
|
2567
|
-
currentPanel:
|
|
2563
|
+
const { startDate: g, endDate: b } = e || {}, m = $(null), k = $(null), x = Ma(g, b), {
|
|
2564
|
+
dateInFocus: S,
|
|
2565
|
+
setDateInFocus: N,
|
|
2566
|
+
isCalendarVisible: B,
|
|
2567
|
+
currentPanel: R,
|
|
2568
2568
|
setCurrentPanel: A
|
|
2569
|
-
} =
|
|
2570
|
-
showCalendar:
|
|
2571
|
-
hideCalendar:
|
|
2572
|
-
inputLeftChangeHandler:
|
|
2569
|
+
} = x, {
|
|
2570
|
+
showCalendar: H,
|
|
2571
|
+
hideCalendar: E,
|
|
2572
|
+
inputLeftChangeHandler: P,
|
|
2573
2573
|
inputRightChangeHandler: K
|
|
2574
|
-
} =
|
|
2574
|
+
} = Ba(g, b, t, x), {
|
|
2575
2575
|
onKeyDownHandler: J,
|
|
2576
|
-
onFocusRight:
|
|
2577
|
-
onFocusLeft:
|
|
2578
|
-
onClickDay:
|
|
2579
|
-
onClickCalendarButton:
|
|
2576
|
+
onFocusRight: M,
|
|
2577
|
+
onFocusLeft: q,
|
|
2578
|
+
onClickDay: U,
|
|
2579
|
+
onClickCalendarButton: V,
|
|
2580
2580
|
onClickArrowButton: W
|
|
2581
|
-
} =
|
|
2582
|
-
p,
|
|
2583
|
-
v,
|
|
2584
|
-
t,
|
|
2581
|
+
} = Ia(
|
|
2585
2582
|
g,
|
|
2583
|
+
b,
|
|
2584
|
+
t,
|
|
2585
|
+
m,
|
|
2586
2586
|
k,
|
|
2587
|
-
|
|
2588
|
-
N,
|
|
2589
|
-
T
|
|
2590
|
-
);
|
|
2591
|
-
xa(
|
|
2592
|
-
p,
|
|
2593
|
-
v,
|
|
2587
|
+
H,
|
|
2594
2588
|
E,
|
|
2589
|
+
x
|
|
2590
|
+
);
|
|
2591
|
+
Sa(
|
|
2595
2592
|
g,
|
|
2593
|
+
b,
|
|
2594
|
+
N,
|
|
2595
|
+
m,
|
|
2596
2596
|
k
|
|
2597
2597
|
);
|
|
2598
|
-
const
|
|
2599
|
-
() =>
|
|
2600
|
-
[
|
|
2601
|
-
), X =
|
|
2602
|
-
() =>
|
|
2598
|
+
const Y = I(
|
|
2599
|
+
() => g && b && G(g, b),
|
|
2600
|
+
[g, b]
|
|
2601
|
+
), X = I(
|
|
2602
|
+
() => pn(
|
|
2603
2603
|
c?.statePerMonth,
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2604
|
+
g,
|
|
2605
|
+
b,
|
|
2606
|
+
S
|
|
2607
2607
|
),
|
|
2608
|
-
[c?.statePerMonth,
|
|
2608
|
+
[c?.statePerMonth, g, b, S]
|
|
2609
2609
|
);
|
|
2610
2610
|
return /* @__PURE__ */ s(L, { onKeyDown: J, children: /* @__PURE__ */ s(
|
|
2611
2611
|
$e,
|
|
@@ -2614,31 +2614,31 @@ function Qo({
|
|
|
2614
2614
|
restoreFocus: !1,
|
|
2615
2615
|
returnFocus: !1,
|
|
2616
2616
|
zIndex: y,
|
|
2617
|
-
appendTo:
|
|
2618
|
-
renderTrigger: (
|
|
2619
|
-
|
|
2617
|
+
appendTo: w,
|
|
2618
|
+
renderTrigger: (re) => /* @__PURE__ */ s(L, { ...re, children: /* @__PURE__ */ s(
|
|
2619
|
+
Sr,
|
|
2620
2620
|
{
|
|
2621
2621
|
autoFocusLeft: r,
|
|
2622
2622
|
onEsc: o,
|
|
2623
2623
|
onEnter: a,
|
|
2624
2624
|
onBlur: n,
|
|
2625
|
-
disabled:
|
|
2625
|
+
disabled: p,
|
|
2626
2626
|
separatorIcon: We,
|
|
2627
2627
|
typeLeft: "date",
|
|
2628
2628
|
typeRight: "date",
|
|
2629
2629
|
placeholderLeft: "Start date",
|
|
2630
2630
|
placeholderRight: "End date",
|
|
2631
|
-
onChangeLeft:
|
|
2631
|
+
onChangeLeft: P,
|
|
2632
2632
|
onChangeRight: K,
|
|
2633
2633
|
onClickArrowDown: W,
|
|
2634
|
-
onClickCalendar:
|
|
2635
|
-
onFocusLeft:
|
|
2636
|
-
onFocusRight:
|
|
2637
|
-
onClickLeft:
|
|
2638
|
-
onClickRight:
|
|
2639
|
-
inputRefLeft:
|
|
2634
|
+
onClickCalendar: V,
|
|
2635
|
+
onFocusLeft: q,
|
|
2636
|
+
onFocusRight: M,
|
|
2637
|
+
onClickLeft: q,
|
|
2638
|
+
onClickRight: M,
|
|
2639
|
+
inputRefLeft: m,
|
|
2640
2640
|
inputRefRight: k,
|
|
2641
|
-
variant:
|
|
2641
|
+
variant: Y ? "error" : _,
|
|
2642
2642
|
widthLeft: d,
|
|
2643
2643
|
widthRight: u,
|
|
2644
2644
|
minLeft: i,
|
|
@@ -2648,18 +2648,18 @@ function Qo({
|
|
|
2648
2648
|
}
|
|
2649
2649
|
) }),
|
|
2650
2650
|
placement: ze,
|
|
2651
|
-
onRequestClose:
|
|
2652
|
-
open:
|
|
2653
|
-
children: /* @__PURE__ */
|
|
2651
|
+
onRequestClose: E,
|
|
2652
|
+
open: B,
|
|
2653
|
+
children: /* @__PURE__ */ T(Z, { children: [
|
|
2654
2654
|
/* @__PURE__ */ s(
|
|
2655
2655
|
xe,
|
|
2656
2656
|
{
|
|
2657
|
-
onClickDay:
|
|
2658
|
-
dateInFocus:
|
|
2657
|
+
onClickDay: U,
|
|
2658
|
+
dateInFocus: S,
|
|
2659
2659
|
firstMonthInMonthPicker: f,
|
|
2660
2660
|
numMonthsInMonthPicker: h,
|
|
2661
|
-
setDateInFocus:
|
|
2662
|
-
currentPanel:
|
|
2661
|
+
setDateInFocus: N,
|
|
2662
|
+
currentPanel: R,
|
|
2663
2663
|
setCurrentPanel: A,
|
|
2664
2664
|
minDate: i,
|
|
2665
2665
|
maxDate: l,
|
|
@@ -2667,12 +2667,12 @@ function Qo({
|
|
|
2667
2667
|
statePerMonth: X
|
|
2668
2668
|
}
|
|
2669
2669
|
),
|
|
2670
|
-
|
|
2670
|
+
R === "calendar" && D
|
|
2671
2671
|
] })
|
|
2672
2672
|
}
|
|
2673
2673
|
) });
|
|
2674
2674
|
}
|
|
2675
|
-
const
|
|
2675
|
+
const mt = ({
|
|
2676
2676
|
onChange: e,
|
|
2677
2677
|
onValueChange: t,
|
|
2678
2678
|
readOnly: r,
|
|
@@ -2687,15 +2687,16 @@ const pt = ({
|
|
|
2687
2687
|
calendarSize: f,
|
|
2688
2688
|
onFocus: h,
|
|
2689
2689
|
onBlur: _,
|
|
2690
|
-
placeholderWhenBlurred:
|
|
2690
|
+
placeholderWhenBlurred: p,
|
|
2691
2691
|
placeholder: y,
|
|
2692
|
-
valueWhenBlurred:
|
|
2693
|
-
label:
|
|
2694
|
-
variant:
|
|
2695
|
-
|
|
2692
|
+
valueWhenBlurred: w,
|
|
2693
|
+
label: D,
|
|
2694
|
+
variant: g,
|
|
2695
|
+
autoFocus: b,
|
|
2696
|
+
...m
|
|
2696
2697
|
}) => {
|
|
2697
|
-
const
|
|
2698
|
-
|
|
2698
|
+
const k = $(null), [x, S] = C(!1), N = a ?? k, { onChange: B } = gn(
|
|
2699
|
+
N,
|
|
2699
2700
|
e,
|
|
2700
2701
|
t,
|
|
2701
2702
|
n,
|
|
@@ -2705,53 +2706,55 @@ const pt = ({
|
|
|
2705
2706
|
c,
|
|
2706
2707
|
d,
|
|
2707
2708
|
u,
|
|
2708
|
-
|
|
2709
|
-
),
|
|
2710
|
-
(
|
|
2711
|
-
h?.(
|
|
2709
|
+
x
|
|
2710
|
+
), R = v(
|
|
2711
|
+
(E) => {
|
|
2712
|
+
h?.(E), S(!0);
|
|
2712
2713
|
},
|
|
2713
2714
|
[h]
|
|
2714
|
-
),
|
|
2715
|
-
(
|
|
2716
|
-
_?.(
|
|
2715
|
+
), A = v(
|
|
2716
|
+
(E) => {
|
|
2717
|
+
_?.(E), S(!1);
|
|
2717
2718
|
},
|
|
2718
2719
|
[_]
|
|
2719
|
-
),
|
|
2720
|
-
return
|
|
2720
|
+
), H = x ? y : p ?? y;
|
|
2721
|
+
return g === "standard" ? /* @__PURE__ */ s(Vr, { text: D ?? "", children: /* @__PURE__ */ s(
|
|
2721
2722
|
pe,
|
|
2722
2723
|
{
|
|
2723
|
-
...
|
|
2724
|
+
...m,
|
|
2725
|
+
autoFocus: b,
|
|
2724
2726
|
readOnly: r,
|
|
2725
2727
|
inputMode: "numeric",
|
|
2726
2728
|
"aria-live": "polite",
|
|
2727
|
-
value: (
|
|
2728
|
-
inputRef:
|
|
2729
|
-
placeholder:
|
|
2730
|
-
onFocus:
|
|
2731
|
-
onBlur:
|
|
2732
|
-
onChange:
|
|
2733
|
-
width:
|
|
2729
|
+
value: (x ? i : w) ?? "",
|
|
2730
|
+
inputRef: N,
|
|
2731
|
+
placeholder: H,
|
|
2732
|
+
onFocus: R,
|
|
2733
|
+
onBlur: A,
|
|
2734
|
+
onChange: B,
|
|
2735
|
+
width: Xt(f),
|
|
2734
2736
|
alwaysShowPlaceholder: !0
|
|
2735
2737
|
}
|
|
2736
2738
|
) }) : /* @__PURE__ */ s(
|
|
2737
|
-
|
|
2739
|
+
hn,
|
|
2738
2740
|
{
|
|
2739
|
-
...
|
|
2741
|
+
...m,
|
|
2742
|
+
autoFocus: b,
|
|
2740
2743
|
readOnly: r,
|
|
2741
2744
|
inputMode: "numeric",
|
|
2742
|
-
label:
|
|
2745
|
+
label: D,
|
|
2743
2746
|
"aria-live": "polite",
|
|
2744
|
-
value: (
|
|
2745
|
-
ref:
|
|
2746
|
-
placeholder:
|
|
2747
|
-
onFocus:
|
|
2748
|
-
onBlur:
|
|
2749
|
-
onChange:
|
|
2750
|
-
width:
|
|
2747
|
+
value: (x ? i : w) ?? "",
|
|
2748
|
+
ref: N,
|
|
2749
|
+
placeholder: H,
|
|
2750
|
+
onFocus: R,
|
|
2751
|
+
onBlur: A,
|
|
2752
|
+
onChange: B,
|
|
2753
|
+
width: Xt(f),
|
|
2751
2754
|
size: f === "large" ? "large" : "medium"
|
|
2752
2755
|
}
|
|
2753
2756
|
);
|
|
2754
|
-
},
|
|
2757
|
+
}, Xt = (e) => {
|
|
2755
2758
|
switch (e) {
|
|
2756
2759
|
case "smaller":
|
|
2757
2760
|
return "140px";
|
|
@@ -2762,46 +2765,46 @@ const pt = ({
|
|
|
2762
2765
|
case "large":
|
|
2763
2766
|
return "196px";
|
|
2764
2767
|
default:
|
|
2765
|
-
return
|
|
2768
|
+
return wt(e, "168px");
|
|
2766
2769
|
}
|
|
2767
|
-
},
|
|
2770
|
+
}, Ra = [/[1-2]/, /\d/, /\d/, /\d/], Ta = [/[0-1]/, /\d/], Na = [/[0-3]/, /\d/], Mr = (e) => La(e).flatMap(Ea), Ea = (e) => {
|
|
2768
2771
|
switch (e) {
|
|
2769
2772
|
case "yyyy":
|
|
2770
|
-
return
|
|
2773
|
+
return Ra;
|
|
2771
2774
|
case "mm":
|
|
2772
2775
|
case "MM":
|
|
2773
|
-
return
|
|
2776
|
+
return Ta;
|
|
2774
2777
|
case "dd":
|
|
2775
2778
|
case "DD":
|
|
2776
|
-
return
|
|
2779
|
+
return Na;
|
|
2777
2780
|
default:
|
|
2778
2781
|
return [e];
|
|
2779
2782
|
}
|
|
2780
|
-
},
|
|
2783
|
+
}, La = (e) => {
|
|
2781
2784
|
if (e.length === 0) return [];
|
|
2782
2785
|
const t = [];
|
|
2783
2786
|
let r = e[0];
|
|
2784
2787
|
for (let n = 1; n < e.length; n++)
|
|
2785
2788
|
e[n] !== e[n - 1] ? (t.push(r), r = e[n]) : r += e[n];
|
|
2786
2789
|
return t.push(r), t;
|
|
2787
|
-
},
|
|
2790
|
+
}, Ne = (e) => {
|
|
2788
2791
|
const r = new Intl.DateTimeFormat(e, { dateStyle: "short" }).formatToParts(/* @__PURE__ */ new Date()), n = {
|
|
2789
2792
|
year: "yyyy",
|
|
2790
2793
|
month: "MM",
|
|
2791
2794
|
day: "dd"
|
|
2792
2795
|
};
|
|
2793
2796
|
return r.map((a) => n[a.type] || a.value).join("");
|
|
2794
|
-
},
|
|
2795
|
-
const n =
|
|
2797
|
+
}, ce = (e, t, r) => {
|
|
2798
|
+
const n = Dr(
|
|
2796
2799
|
t,
|
|
2797
2800
|
r?.matchLanguage ?? !1,
|
|
2798
|
-
r?.fallbackLocaleCode ??
|
|
2799
|
-
), a =
|
|
2801
|
+
r?.fallbackLocaleCode ?? wr
|
|
2802
|
+
), a = Me(n);
|
|
2800
2803
|
if (a == null)
|
|
2801
2804
|
return;
|
|
2802
2805
|
const o = we(
|
|
2803
2806
|
e,
|
|
2804
|
-
|
|
2807
|
+
Ne(n),
|
|
2805
2808
|
r?.referenceDate ?? /* @__PURE__ */ new Date(),
|
|
2806
2809
|
{
|
|
2807
2810
|
locale: a
|
|
@@ -2810,16 +2813,16 @@ const pt = ({
|
|
|
2810
2813
|
if (!isNaN(o.getTime()))
|
|
2811
2814
|
return o;
|
|
2812
2815
|
}, be = (e, t, r) => {
|
|
2813
|
-
const n =
|
|
2816
|
+
const n = Dr(
|
|
2814
2817
|
t,
|
|
2815
2818
|
r?.matchLanguage ?? !1,
|
|
2816
|
-
r?.fallbackLocaleCode ??
|
|
2819
|
+
r?.fallbackLocaleCode ?? wr
|
|
2817
2820
|
);
|
|
2818
|
-
return
|
|
2819
|
-
locale:
|
|
2821
|
+
return j(e, Ne(n), {
|
|
2822
|
+
locale: Me(n)
|
|
2820
2823
|
});
|
|
2821
|
-
},
|
|
2822
|
-
const r =
|
|
2824
|
+
}, bt = (e, t) => {
|
|
2825
|
+
const r = ce(e, t);
|
|
2823
2826
|
if (r != null)
|
|
2824
2827
|
return be(r, t);
|
|
2825
2828
|
};
|
|
@@ -2833,62 +2836,62 @@ const pt = ({
|
|
|
2833
2836
|
console.error("vite-plugin-css-injected-by-js", t);
|
|
2834
2837
|
}
|
|
2835
2838
|
})();
|
|
2836
|
-
const
|
|
2837
|
-
navBarButton:
|
|
2838
|
-
selected:
|
|
2839
|
+
const Aa = "_navBarButton_b3x3w_1", Fa = "_selected_b3x3w_14", er = {
|
|
2840
|
+
navBarButton: Aa,
|
|
2841
|
+
selected: Fa
|
|
2839
2842
|
};
|
|
2840
|
-
|
|
2843
|
+
Mt(
|
|
2841
2844
|
function({ selected: e, className: t, ...r }, n) {
|
|
2842
2845
|
return /* @__PURE__ */ s(
|
|
2843
2846
|
Q,
|
|
2844
2847
|
{
|
|
2845
2848
|
...r,
|
|
2846
2849
|
ref: n,
|
|
2847
|
-
className:
|
|
2848
|
-
|
|
2849
|
-
e &&
|
|
2850
|
+
className: oe(
|
|
2851
|
+
er.navBarButton,
|
|
2852
|
+
e && er.selected,
|
|
2850
2853
|
t
|
|
2851
2854
|
)
|
|
2852
2855
|
}
|
|
2853
2856
|
);
|
|
2854
2857
|
}
|
|
2855
2858
|
);
|
|
2856
|
-
const
|
|
2857
|
-
navBarNotificationButton:
|
|
2858
|
-
unread:
|
|
2859
|
-
icon:
|
|
2859
|
+
const Pa = "_navBarNotificationButton_1wt3y_1", Ya = "_unread_1wt3y_23", Ha = "_icon_1wt3y_23", Le = {
|
|
2860
|
+
navBarNotificationButton: Pa,
|
|
2861
|
+
unread: Ya,
|
|
2862
|
+
icon: Ha
|
|
2860
2863
|
};
|
|
2861
|
-
|
|
2864
|
+
Mt(function({
|
|
2862
2865
|
count: e,
|
|
2863
2866
|
unread: t = !1,
|
|
2864
2867
|
className: r,
|
|
2865
2868
|
labelClassName: n,
|
|
2866
2869
|
iconClassName: a,
|
|
2867
|
-
icon: o =
|
|
2870
|
+
icon: o = qr,
|
|
2868
2871
|
...i
|
|
2869
2872
|
}, l) {
|
|
2870
2873
|
const c = e > 1;
|
|
2871
2874
|
return /* @__PURE__ */ s(
|
|
2872
|
-
|
|
2875
|
+
jr,
|
|
2873
2876
|
{
|
|
2874
2877
|
...i,
|
|
2875
2878
|
ref: l,
|
|
2876
2879
|
leftIcon: o,
|
|
2877
|
-
className:
|
|
2880
|
+
className: oe(
|
|
2878
2881
|
Le.navBarNotificationButton,
|
|
2879
2882
|
t && Le.unread,
|
|
2880
2883
|
c && Le.hasCount,
|
|
2881
2884
|
r
|
|
2882
2885
|
),
|
|
2883
2886
|
label: c ? String(e) : void 0,
|
|
2884
|
-
labelClassName:
|
|
2885
|
-
iconClassName:
|
|
2887
|
+
labelClassName: oe(n, Le.label),
|
|
2888
|
+
iconClassName: oe(a, Le.icon)
|
|
2886
2889
|
}
|
|
2887
2890
|
);
|
|
2888
2891
|
});
|
|
2889
|
-
|
|
2892
|
+
Mt(
|
|
2890
2893
|
({ contentLeft: e, contentRight: t, collapsed: r = !1, ...n }, a) => /* @__PURE__ */ s(
|
|
2891
|
-
|
|
2894
|
+
Kr,
|
|
2892
2895
|
{
|
|
2893
2896
|
ref: a,
|
|
2894
2897
|
expandable: !0,
|
|
@@ -2900,25 +2903,25 @@ Bt(
|
|
|
2900
2903
|
}
|
|
2901
2904
|
)
|
|
2902
2905
|
);
|
|
2903
|
-
|
|
2904
|
-
const
|
|
2906
|
+
_n(!1);
|
|
2907
|
+
const tr = [
|
|
2905
2908
|
"small-mobile",
|
|
2906
2909
|
"mobile",
|
|
2907
2910
|
"tablet",
|
|
2908
2911
|
"tablet-wide",
|
|
2909
2912
|
"desktop"
|
|
2910
|
-
],
|
|
2911
|
-
const e =
|
|
2913
|
+
], Ir = () => {
|
|
2914
|
+
const e = Ke({
|
|
2912
2915
|
query: "(max-width: 768px)"
|
|
2913
|
-
}), t =
|
|
2916
|
+
}), t = Ke({
|
|
2914
2917
|
query: "(max-width: 395px)"
|
|
2915
|
-
}), r =
|
|
2918
|
+
}), r = Ke({
|
|
2916
2919
|
query: "(max-width: 1024px)"
|
|
2917
|
-
}), n =
|
|
2920
|
+
}), n = Ke({
|
|
2918
2921
|
query: "(max-width: 1160px)"
|
|
2919
2922
|
});
|
|
2920
2923
|
return { deviceSize: t ? "small-mobile" : e ? "mobile" : r ? "tablet" : n ? "tablet-wide" : "desktop" };
|
|
2921
|
-
},
|
|
2924
|
+
}, Rr = (e, t) => e === t || tr.indexOf(e) > tr.indexOf(t), Tr = ({
|
|
2922
2925
|
value: e,
|
|
2923
2926
|
onValueChange: t,
|
|
2924
2927
|
localeCode: r,
|
|
@@ -2933,82 +2936,86 @@ const er = [
|
|
|
2933
2936
|
placeholderWhenBlurredEndDate: f,
|
|
2934
2937
|
valueWhenBlurredStartDate: h,
|
|
2935
2938
|
valueWhenBlurredEndDate: _,
|
|
2936
|
-
variant:
|
|
2937
|
-
readOnlyOnMobile: y
|
|
2939
|
+
variant: p,
|
|
2940
|
+
readOnlyOnMobile: y,
|
|
2941
|
+
autoFocusStartDate: w,
|
|
2942
|
+
autoFocusEndDate: D
|
|
2938
2943
|
}) => {
|
|
2939
|
-
const { deviceSize:
|
|
2940
|
-
const
|
|
2944
|
+
const { deviceSize: g } = Ir(), b = y && !Rr(g, "tablet"), { mask: m, placeholder: k } = I(() => {
|
|
2945
|
+
const x = Ne(r);
|
|
2941
2946
|
return {
|
|
2942
|
-
mask:
|
|
2943
|
-
placeholder:
|
|
2947
|
+
mask: Mr(x),
|
|
2948
|
+
placeholder: x.toLowerCase()
|
|
2944
2949
|
};
|
|
2945
2950
|
}, [r]);
|
|
2946
|
-
return /* @__PURE__ */
|
|
2951
|
+
return /* @__PURE__ */ T(z, { children: [
|
|
2947
2952
|
/* @__PURE__ */ s(
|
|
2948
|
-
|
|
2953
|
+
mt,
|
|
2949
2954
|
{
|
|
2950
|
-
mask:
|
|
2955
|
+
mask: m,
|
|
2951
2956
|
ref: c,
|
|
2952
2957
|
value: e?.startDate,
|
|
2953
|
-
onValueChange: (
|
|
2954
|
-
t?.({ startDate:
|
|
2958
|
+
onValueChange: (x) => {
|
|
2959
|
+
t?.({ startDate: x });
|
|
2955
2960
|
},
|
|
2956
|
-
onBlur: (
|
|
2957
|
-
const
|
|
2958
|
-
|
|
2961
|
+
onBlur: (x) => {
|
|
2962
|
+
const S = bt(
|
|
2963
|
+
x.target.value,
|
|
2959
2964
|
r
|
|
2960
2965
|
);
|
|
2961
|
-
|
|
2966
|
+
S && S !== e?.startDate && t?.({ startDate: S }), i?.();
|
|
2962
2967
|
},
|
|
2963
2968
|
onFocus: () => o?.("startDate"),
|
|
2969
|
+
autoFocus: w,
|
|
2964
2970
|
label: n,
|
|
2965
2971
|
borderRadiusVariant: "onlyLeft",
|
|
2966
|
-
placeholder:
|
|
2972
|
+
placeholder: k,
|
|
2967
2973
|
placeholderWhenBlurred: u,
|
|
2968
2974
|
valueWhenBlurred: h,
|
|
2969
2975
|
calendarSize: l,
|
|
2970
|
-
variant:
|
|
2971
|
-
readOnly:
|
|
2976
|
+
variant: p,
|
|
2977
|
+
readOnly: b
|
|
2972
2978
|
}
|
|
2973
2979
|
),
|
|
2974
2980
|
/* @__PURE__ */ s(
|
|
2975
|
-
|
|
2981
|
+
mt,
|
|
2976
2982
|
{
|
|
2977
|
-
mask:
|
|
2983
|
+
mask: m,
|
|
2978
2984
|
ref: d,
|
|
2979
2985
|
value: e?.endDate,
|
|
2980
|
-
onValueChange: (
|
|
2981
|
-
onBlur: (
|
|
2982
|
-
const
|
|
2983
|
-
|
|
2986
|
+
onValueChange: (x) => t?.({ endDate: x }),
|
|
2987
|
+
onBlur: (x) => {
|
|
2988
|
+
const S = bt(
|
|
2989
|
+
x.target.value,
|
|
2984
2990
|
r
|
|
2985
2991
|
);
|
|
2986
|
-
|
|
2992
|
+
S && S !== e?.endDate && t?.({ endDate: S }), i?.();
|
|
2987
2993
|
},
|
|
2988
2994
|
onFocus: () => o?.("endDate"),
|
|
2995
|
+
autoFocus: D,
|
|
2989
2996
|
label: a,
|
|
2990
2997
|
borderRadiusVariant: "onlyRight",
|
|
2991
|
-
placeholder:
|
|
2998
|
+
placeholder: k,
|
|
2992
2999
|
placeholderWhenBlurred: f,
|
|
2993
3000
|
valueWhenBlurred: _,
|
|
2994
3001
|
calendarSize: l,
|
|
2995
|
-
variant:
|
|
2996
|
-
readOnly:
|
|
3002
|
+
variant: p,
|
|
3003
|
+
readOnly: b
|
|
2997
3004
|
}
|
|
2998
3005
|
)
|
|
2999
3006
|
] });
|
|
3000
|
-
},
|
|
3001
|
-
const n =
|
|
3002
|
-
return r.code.startsWith("en") ?
|
|
3007
|
+
}, vt = (e, t, r) => {
|
|
3008
|
+
const n = rn(e, t) ? "" : " y";
|
|
3009
|
+
return r.code.startsWith("en") ? j(e, "eee MMM d" + n, { locale: r }).replace(".", "") : j(e, "eee d MMM" + n, { locale: r }).replace(".", "");
|
|
3003
3010
|
};
|
|
3004
|
-
function
|
|
3011
|
+
function Wa(e, t, r) {
|
|
3005
3012
|
if (!e || !t || !r) return !1;
|
|
3006
3013
|
const n = r(e), a = r(t);
|
|
3007
|
-
return !n || !a || Number.isNaN(n.getTime()) || Number.isNaN(a.getTime()) ||
|
|
3014
|
+
return !n || !a || Number.isNaN(n.getTime()) || Number.isNaN(a.getTime()) || F(n, a) ? !1 : G(n, a);
|
|
3008
3015
|
}
|
|
3009
|
-
function
|
|
3016
|
+
function Oa(e, t, r) {
|
|
3010
3017
|
const { startDate: n, endDate: a } = e;
|
|
3011
|
-
return
|
|
3018
|
+
return Wa(n, a, t) ? r === "startDate" ? {
|
|
3012
3019
|
...e,
|
|
3013
3020
|
startDate: n,
|
|
3014
3021
|
endDate: n
|
|
@@ -3018,130 +3025,130 @@ function Ha(e, t, r) {
|
|
|
3018
3025
|
endDate: a
|
|
3019
3026
|
} : e;
|
|
3020
3027
|
}
|
|
3021
|
-
const
|
|
3022
|
-
const d =
|
|
3023
|
-
() =>
|
|
3028
|
+
const Nr = (e, t, r, n, a, o, i, l, c) => {
|
|
3029
|
+
const d = Me(n), u = Bt(), f = Ie(), h = $(null), _ = I(
|
|
3030
|
+
() => Ne(r),
|
|
3024
3031
|
[r]
|
|
3025
|
-
),
|
|
3026
|
-
() => e?.startDate?.length === _.length ?
|
|
3032
|
+
), p = I(
|
|
3033
|
+
() => e?.startDate?.length === _.length ? ce(e.startDate, r) : void 0,
|
|
3027
3034
|
[_.length, r, e?.startDate]
|
|
3028
|
-
), y =
|
|
3029
|
-
() => e?.endDate?.length === _.length ?
|
|
3035
|
+
), y = I(
|
|
3036
|
+
() => e?.endDate?.length === _.length ? ce(e.endDate, r) : void 0,
|
|
3030
3037
|
[_.length, r, e?.endDate]
|
|
3031
|
-
),
|
|
3032
|
-
() =>
|
|
3033
|
-
[d,
|
|
3034
|
-
),
|
|
3035
|
-
() => y != null ?
|
|
3038
|
+
), w = I(
|
|
3039
|
+
() => p != null ? vt(p, f, d) : void 0,
|
|
3040
|
+
[d, p, f]
|
|
3041
|
+
), D = I(
|
|
3042
|
+
() => y != null ? vt(y, f, d) : void 0,
|
|
3036
3043
|
[d, y, f]
|
|
3037
|
-
), [
|
|
3038
|
-
a ??
|
|
3039
|
-
),
|
|
3040
|
-
(
|
|
3041
|
-
ge(
|
|
3044
|
+
), [g, b] = C(
|
|
3045
|
+
a ?? p ?? /* @__PURE__ */ new Date()
|
|
3046
|
+
), m = v(
|
|
3047
|
+
(M) => {
|
|
3048
|
+
ge(M, f) || G(M, f) ? b(M) : b(f);
|
|
3042
3049
|
},
|
|
3043
3050
|
[f]
|
|
3044
|
-
), k =
|
|
3045
|
-
() =>
|
|
3046
|
-
|
|
3047
|
-
|
|
3051
|
+
), k = I(
|
|
3052
|
+
() => at(
|
|
3053
|
+
g.getFullYear(),
|
|
3054
|
+
g.getMonth(),
|
|
3048
3055
|
d
|
|
3049
3056
|
),
|
|
3050
|
-
[d,
|
|
3051
|
-
),
|
|
3052
|
-
|
|
3053
|
-
|
|
3057
|
+
[d, g]
|
|
3058
|
+
), x = I(() => nt(
|
|
3059
|
+
gr(
|
|
3060
|
+
g,
|
|
3054
3061
|
{ month: "long", year: "numeric" },
|
|
3055
3062
|
{ locale: d.code }
|
|
3056
3063
|
)
|
|
3057
|
-
), [d,
|
|
3058
|
-
(
|
|
3059
|
-
const
|
|
3060
|
-
|
|
3064
|
+
), [d, g]), S = I(() => ge(f, g), [f, g]), [N, B] = C(), [R, A] = C("calendar"), H = v(
|
|
3065
|
+
(M) => {
|
|
3066
|
+
const q = M?.startDate?.length === _.length ? ce(M.startDate, r) : void 0, U = M?.endDate?.length === _.length ? ce(M.endDate, r) : void 0;
|
|
3067
|
+
q ? m(q) : U && m(U), t?.({
|
|
3061
3068
|
...e,
|
|
3062
|
-
...
|
|
3069
|
+
...M
|
|
3063
3070
|
});
|
|
3064
3071
|
},
|
|
3065
3072
|
[
|
|
3066
3073
|
_.length,
|
|
3067
3074
|
r,
|
|
3068
3075
|
t,
|
|
3069
|
-
|
|
3076
|
+
m,
|
|
3070
3077
|
e
|
|
3071
3078
|
]
|
|
3072
|
-
),
|
|
3073
|
-
() =>
|
|
3074
|
-
[y,
|
|
3075
|
-
),
|
|
3076
|
-
const
|
|
3077
|
-
return
|
|
3078
|
-
}, [o, r, e?.endDate, e?.startDate]), K =
|
|
3079
|
-
if (
|
|
3079
|
+
), E = I(
|
|
3080
|
+
() => p && y ? G(y, p) || F(y, p) : !1,
|
|
3081
|
+
[y, p]
|
|
3082
|
+
), P = I(() => {
|
|
3083
|
+
const M = o === "startDate" ? e?.endDate : e?.startDate;
|
|
3084
|
+
return M ? ce(M, r) : void 0;
|
|
3085
|
+
}, [o, r, e?.endDate, e?.startDate]), K = I(() => {
|
|
3086
|
+
if (N && P) {
|
|
3080
3087
|
if (o === "endDate")
|
|
3081
3088
|
return "right";
|
|
3082
3089
|
if (o === "startDate")
|
|
3083
3090
|
return "left";
|
|
3084
3091
|
}
|
|
3085
|
-
}, [o,
|
|
3092
|
+
}, [o, P, N]);
|
|
3086
3093
|
return {
|
|
3087
|
-
onClickDate: (
|
|
3088
|
-
if (!(
|
|
3094
|
+
onClickDate: (M) => {
|
|
3095
|
+
if (!(M.getFullYear() === g.getFullYear() && M.getMonth() === g.getMonth()))
|
|
3089
3096
|
return;
|
|
3090
|
-
const
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
(
|
|
3097
|
+
const U = (V, W) => t?.(
|
|
3098
|
+
Oa(
|
|
3099
|
+
V,
|
|
3100
|
+
(Y) => ce(Y, r),
|
|
3094
3101
|
W
|
|
3095
3102
|
)
|
|
3096
3103
|
);
|
|
3097
|
-
o === "startDate" ? (
|
|
3104
|
+
o === "startDate" ? (U(
|
|
3098
3105
|
{
|
|
3099
|
-
startDate: be(
|
|
3106
|
+
startDate: be(M, r),
|
|
3100
3107
|
endDate: e?.endDate
|
|
3101
3108
|
},
|
|
3102
3109
|
"startDate"
|
|
3103
|
-
), e?.endDate ? (c?.(), i(void 0),
|
|
3110
|
+
), e?.endDate ? (c?.(), i(void 0), B(void 0)) : l("endDate")) : o === "endDate" ? (U(
|
|
3104
3111
|
{
|
|
3105
3112
|
startDate: e?.startDate,
|
|
3106
|
-
endDate: be(
|
|
3113
|
+
endDate: be(M, r)
|
|
3107
3114
|
},
|
|
3108
3115
|
"endDate"
|
|
3109
|
-
), c?.(), i(void 0),
|
|
3110
|
-
startDate: be(
|
|
3116
|
+
), c?.(), i(void 0), B(void 0)) : p && y == null ? Te(M, p) ? (t?.({
|
|
3117
|
+
startDate: be(M, r),
|
|
3111
3118
|
endDate: void 0
|
|
3112
3119
|
}), l("endDate")) : (t?.({
|
|
3113
3120
|
startDate: e?.startDate,
|
|
3114
|
-
endDate: be(
|
|
3115
|
-
}), c?.(), i(void 0),
|
|
3121
|
+
endDate: be(M, r)
|
|
3122
|
+
}), c?.(), i(void 0), B(void 0)) : (U(
|
|
3116
3123
|
{
|
|
3117
|
-
startDate: be(
|
|
3124
|
+
startDate: be(M, r),
|
|
3118
3125
|
endDate: void 0
|
|
3119
3126
|
},
|
|
3120
3127
|
"startDate"
|
|
3121
3128
|
), l("endDate"));
|
|
3122
3129
|
},
|
|
3123
|
-
onValueChangeByInputs:
|
|
3124
|
-
isValidDateRange:
|
|
3130
|
+
onValueChangeByInputs: H,
|
|
3131
|
+
isValidDateRange: E,
|
|
3125
3132
|
monthPickerButtonRef: h,
|
|
3126
3133
|
calendarId: u,
|
|
3127
|
-
monthPickerButtonLabel:
|
|
3128
|
-
visiblePanel:
|
|
3134
|
+
monthPickerButtonLabel: x,
|
|
3135
|
+
visiblePanel: R,
|
|
3129
3136
|
setVisiblePanel: A,
|
|
3130
|
-
setVisibleMonth:
|
|
3137
|
+
setVisibleMonth: b,
|
|
3131
3138
|
visibleMonthData: k,
|
|
3132
|
-
todayIsInVisibleMonth:
|
|
3133
|
-
hoverDate:
|
|
3134
|
-
setHoverDate:
|
|
3135
|
-
hoverAnchor:
|
|
3139
|
+
todayIsInVisibleMonth: S,
|
|
3140
|
+
hoverDate: N,
|
|
3141
|
+
setHoverDate: B,
|
|
3142
|
+
hoverAnchor: P,
|
|
3136
3143
|
hoverHighlightDirection: K,
|
|
3137
|
-
selectedStartDate:
|
|
3144
|
+
selectedStartDate: p,
|
|
3138
3145
|
selectedEndDate: y,
|
|
3139
3146
|
today: f,
|
|
3140
|
-
visibleMonth:
|
|
3141
|
-
valueWhenBlurredStartDate:
|
|
3142
|
-
valueWhenBlurredEndDate:
|
|
3147
|
+
visibleMonth: g,
|
|
3148
|
+
valueWhenBlurredStartDate: w,
|
|
3149
|
+
valueWhenBlurredEndDate: D
|
|
3143
3150
|
};
|
|
3144
|
-
},
|
|
3151
|
+
}, st = ({
|
|
3145
3152
|
previousMonthButtonAriaLabel: e,
|
|
3146
3153
|
nextMonthButtonAriaLabel: t,
|
|
3147
3154
|
monthPickerButtonLabel: r,
|
|
@@ -3157,13 +3164,13 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
3157
3164
|
nextMonthButtonTestId: h
|
|
3158
3165
|
}) => {
|
|
3159
3166
|
const _ = u === "smaller" || u === "small" ? "medium" : "large";
|
|
3160
|
-
return /* @__PURE__ */
|
|
3167
|
+
return /* @__PURE__ */ T(z, { alignSelf: "center", justifyContent: "space-between", width: "100%", children: [
|
|
3161
3168
|
/* @__PURE__ */ s(
|
|
3162
3169
|
Q,
|
|
3163
3170
|
{
|
|
3164
3171
|
"aria-live": "polite",
|
|
3165
3172
|
label: r,
|
|
3166
|
-
rightIcon: n === "calendar" ?
|
|
3173
|
+
rightIcon: n === "calendar" ? Dt : Gr,
|
|
3167
3174
|
onClick: () => a(
|
|
3168
3175
|
n === "calendar" ? "month-picker" : "calendar"
|
|
3169
3176
|
),
|
|
@@ -3171,12 +3178,12 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
3171
3178
|
size: _
|
|
3172
3179
|
}
|
|
3173
3180
|
),
|
|
3174
|
-
/* @__PURE__ */
|
|
3181
|
+
/* @__PURE__ */ T(z, { alignItems: "center", gap: 2, children: [
|
|
3175
3182
|
/* @__PURE__ */ s(
|
|
3176
3183
|
fe,
|
|
3177
3184
|
{
|
|
3178
|
-
leftIcon:
|
|
3179
|
-
onClick: () => i(
|
|
3185
|
+
leftIcon: tt,
|
|
3186
|
+
onClick: () => i(xt(l, 1)),
|
|
3180
3187
|
disabled: c?.(l),
|
|
3181
3188
|
"aria-label": e,
|
|
3182
3189
|
size: _,
|
|
@@ -3196,25 +3203,25 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
3196
3203
|
)
|
|
3197
3204
|
] })
|
|
3198
3205
|
] });
|
|
3199
|
-
},
|
|
3200
|
-
travelDateCell:
|
|
3201
|
-
smaller:
|
|
3202
|
-
small:
|
|
3203
|
-
medium:
|
|
3204
|
-
large:
|
|
3205
|
-
outline:
|
|
3206
|
-
contentWrapper:
|
|
3207
|
-
disabled:
|
|
3208
|
-
isToday:
|
|
3209
|
-
isSelectionStart:
|
|
3210
|
-
isSelectionEnd:
|
|
3211
|
-
hover:
|
|
3212
|
-
startSelected:
|
|
3213
|
-
endSelected:
|
|
3214
|
-
},
|
|
3206
|
+
}, $a = "_travelDateCell_1t2af_1", Ua = "_smaller_1t2af_4", za = "_small_1t2af_4", Va = "_medium_1t2af_14", ja = "_large_1t2af_19", qa = "_outline_1t2af_31", Ka = "_contentWrapper_1t2af_44", Ga = "_disabled_1t2af_65", Ja = "_isToday_1t2af_68", Za = "_isSelectionStart_1t2af_72", Qa = "_isSelectionEnd_1t2af_73", Xa = "_hover_1t2af_88", eo = "_startSelected_1t2af_91", to = "_endSelected_1t2af_91", ne = {
|
|
3207
|
+
travelDateCell: $a,
|
|
3208
|
+
smaller: Ua,
|
|
3209
|
+
small: za,
|
|
3210
|
+
medium: Va,
|
|
3211
|
+
large: ja,
|
|
3212
|
+
outline: qa,
|
|
3213
|
+
contentWrapper: Ka,
|
|
3214
|
+
disabled: Ga,
|
|
3215
|
+
isToday: Ja,
|
|
3216
|
+
isSelectionStart: Za,
|
|
3217
|
+
isSelectionEnd: Qa,
|
|
3218
|
+
hover: Xa,
|
|
3219
|
+
startSelected: eo,
|
|
3220
|
+
endSelected: to
|
|
3221
|
+
}, ie = "var(--selection-range-background-color)", ro = (e, t, r, n, a, o, i, l) => i ? t && r && !l ? {
|
|
3215
3222
|
left: "transparent",
|
|
3216
3223
|
right: "transparent"
|
|
3217
|
-
} : a && o && n ?
|
|
3224
|
+
} : a && o && n ? ao(
|
|
3218
3225
|
e,
|
|
3219
3226
|
n,
|
|
3220
3227
|
a,
|
|
@@ -3222,7 +3229,7 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
3222
3229
|
) : a ? {
|
|
3223
3230
|
left: "transparent",
|
|
3224
3231
|
right: "transparent"
|
|
3225
|
-
} :
|
|
3232
|
+
} : no(
|
|
3226
3233
|
e,
|
|
3227
3234
|
t,
|
|
3228
3235
|
r,
|
|
@@ -3230,37 +3237,37 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
3230
3237
|
) : {
|
|
3231
3238
|
left: "transparent",
|
|
3232
3239
|
right: "transparent"
|
|
3233
|
-
},
|
|
3234
|
-
if (t && r &&
|
|
3240
|
+
}, no = (e, t, r, n) => {
|
|
3241
|
+
if (t && r && F(t, r))
|
|
3235
3242
|
return {
|
|
3236
3243
|
left: "transparent",
|
|
3237
3244
|
right: "transparent"
|
|
3238
3245
|
};
|
|
3239
|
-
if (t && r ? G(e, t) &&
|
|
3246
|
+
if (t && r ? G(e, t) && Te(e, r) && !F(e, t) && !F(e, r) : !1)
|
|
3240
3247
|
return {
|
|
3241
|
-
left:
|
|
3242
|
-
right:
|
|
3248
|
+
left: ie,
|
|
3249
|
+
right: ie
|
|
3243
3250
|
};
|
|
3244
3251
|
if (t && r)
|
|
3245
|
-
return
|
|
3252
|
+
return F(e, t) ? {
|
|
3246
3253
|
left: "transparent",
|
|
3247
|
-
right:
|
|
3248
|
-
} :
|
|
3249
|
-
left:
|
|
3254
|
+
right: ie
|
|
3255
|
+
} : F(e, r) ? {
|
|
3256
|
+
left: ie,
|
|
3250
3257
|
right: "transparent"
|
|
3251
3258
|
} : {
|
|
3252
3259
|
left: "transparent",
|
|
3253
3260
|
right: "transparent"
|
|
3254
3261
|
};
|
|
3255
3262
|
if (t && n && G(n, t)) {
|
|
3256
|
-
if (
|
|
3263
|
+
if (F(e, t))
|
|
3257
3264
|
return {
|
|
3258
3265
|
left: "transparent",
|
|
3259
|
-
right:
|
|
3266
|
+
right: ie
|
|
3260
3267
|
};
|
|
3261
|
-
if (
|
|
3268
|
+
if (F(e, n))
|
|
3262
3269
|
return {
|
|
3263
|
-
left:
|
|
3270
|
+
left: ie,
|
|
3264
3271
|
right: "transparent"
|
|
3265
3272
|
};
|
|
3266
3273
|
}
|
|
@@ -3268,12 +3275,12 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
3268
3275
|
left: "transparent",
|
|
3269
3276
|
right: "transparent"
|
|
3270
3277
|
};
|
|
3271
|
-
},
|
|
3272
|
-
const a = G(r, n), o =
|
|
3273
|
-
start:
|
|
3274
|
-
end:
|
|
3275
|
-
}), i =
|
|
3276
|
-
return t === "right" &&
|
|
3278
|
+
}, ao = (e, t, r, n) => {
|
|
3279
|
+
const a = G(r, n), o = nn(e, {
|
|
3280
|
+
start: ur([r, n]),
|
|
3281
|
+
end: _r([r, n])
|
|
3282
|
+
}), i = F(e, r), l = F(e, n);
|
|
3283
|
+
return t === "right" && Te(r, n) ? {
|
|
3277
3284
|
left: "transparent",
|
|
3278
3285
|
right: "transparent"
|
|
3279
3286
|
} : t === "left" && G(r, n) ? {
|
|
@@ -3282,65 +3289,65 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
3282
3289
|
} : i && l ? {
|
|
3283
3290
|
left: "transparent",
|
|
3284
3291
|
right: "transparent"
|
|
3285
|
-
} : i ?
|
|
3292
|
+
} : i ? rr(a, {
|
|
3286
3293
|
left: "transparent",
|
|
3287
|
-
right:
|
|
3288
|
-
}) : l ?
|
|
3289
|
-
left:
|
|
3294
|
+
right: ie
|
|
3295
|
+
}) : l ? rr(a, {
|
|
3296
|
+
left: ie,
|
|
3290
3297
|
right: "transparent"
|
|
3291
3298
|
}) : o ? {
|
|
3292
|
-
left:
|
|
3293
|
-
right:
|
|
3299
|
+
left: ie,
|
|
3300
|
+
right: ie
|
|
3294
3301
|
} : {
|
|
3295
3302
|
left: "transparent",
|
|
3296
3303
|
right: "transparent"
|
|
3297
3304
|
};
|
|
3298
|
-
},
|
|
3305
|
+
}, rr = (e, { left: t, right: r }) => e ? {
|
|
3299
3306
|
left: r,
|
|
3300
3307
|
right: t
|
|
3301
|
-
} : { left: t, right: r },
|
|
3308
|
+
} : { left: t, right: r }, oo = (e, t) => {
|
|
3302
3309
|
switch (t) {
|
|
3303
3310
|
case "PageUp":
|
|
3304
|
-
return
|
|
3311
|
+
return xt(e, 1);
|
|
3305
3312
|
case "PageDown":
|
|
3306
3313
|
return Oe(e, 1);
|
|
3307
3314
|
case "Home":
|
|
3308
|
-
return
|
|
3315
|
+
return Ze(e);
|
|
3309
3316
|
case "End":
|
|
3310
|
-
return
|
|
3317
|
+
return te(Ze(e), 6);
|
|
3311
3318
|
case "ArrowLeft":
|
|
3312
3319
|
return ve(e, 1);
|
|
3313
3320
|
case "ArrowUp":
|
|
3314
3321
|
return ve(e, 7);
|
|
3315
3322
|
case "ArrowRight":
|
|
3316
|
-
return
|
|
3323
|
+
return te(e, 1);
|
|
3317
3324
|
case "ArrowDown":
|
|
3318
|
-
return
|
|
3325
|
+
return te(e, 7);
|
|
3319
3326
|
default:
|
|
3320
3327
|
return;
|
|
3321
3328
|
}
|
|
3322
|
-
},
|
|
3323
|
-
travelDateCellBackground:
|
|
3324
|
-
smaller:
|
|
3325
|
-
small:
|
|
3326
|
-
medium:
|
|
3327
|
-
large:
|
|
3328
|
-
},
|
|
3329
|
+
}, ut = (e, t) => j(hr(e, 12), de.fullDate) + t, so = "_travelDateCellBackground_45q5d_1", io = "_smaller_45q5d_2", lo = "_small_45q5d_2", co = "_medium_45q5d_12", uo = "_large_45q5d_17", Ge = {
|
|
3330
|
+
travelDateCellBackground: so,
|
|
3331
|
+
smaller: io,
|
|
3332
|
+
small: lo,
|
|
3333
|
+
medium: co,
|
|
3334
|
+
large: uo
|
|
3335
|
+
}, _o = ({ calendarSize: e, bgColorLeft: t, bgColorRight: r }) => /* @__PURE__ */ T(z, { children: [
|
|
3329
3336
|
/* @__PURE__ */ s(
|
|
3330
3337
|
L,
|
|
3331
3338
|
{
|
|
3332
|
-
className:
|
|
3339
|
+
className: oe(Ge.travelDateCellBackground, Ge[e]),
|
|
3333
3340
|
background: t
|
|
3334
3341
|
}
|
|
3335
3342
|
),
|
|
3336
3343
|
/* @__PURE__ */ s(
|
|
3337
3344
|
L,
|
|
3338
3345
|
{
|
|
3339
|
-
className:
|
|
3346
|
+
className: oe(Ge.travelDateCellBackground, Ge[e]),
|
|
3340
3347
|
background: r
|
|
3341
3348
|
}
|
|
3342
3349
|
)
|
|
3343
|
-
] }),
|
|
3350
|
+
] }), fo = ({
|
|
3344
3351
|
onClick: e,
|
|
3345
3352
|
visibleMonth: t,
|
|
3346
3353
|
onChangeVisibleMonth: r,
|
|
@@ -3355,82 +3362,82 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
3355
3362
|
today: f,
|
|
3356
3363
|
todayIsInVisibleMonth: h,
|
|
3357
3364
|
calendarId: _,
|
|
3358
|
-
isDateDisabled:
|
|
3365
|
+
isDateDisabled: p,
|
|
3359
3366
|
size: y,
|
|
3360
|
-
dateTestId:
|
|
3361
|
-
hoverHighlightDirection:
|
|
3367
|
+
dateTestId: w,
|
|
3368
|
+
hoverHighlightDirection: D
|
|
3362
3369
|
}) => {
|
|
3363
|
-
const
|
|
3364
|
-
async (
|
|
3365
|
-
const
|
|
3366
|
-
|
|
3367
|
-
document.getElementById(
|
|
3368
|
-
}, 10))), (
|
|
3370
|
+
const g = v(
|
|
3371
|
+
async (H) => {
|
|
3372
|
+
const E = oo(n.date, H.key), P = (E && p?.(E)) ?? !1;
|
|
3373
|
+
E && !P && (l(E), ge(n.date, E) ? document.getElementById(ut(E, _))?.focus() : (r(E), setTimeout(() => {
|
|
3374
|
+
document.getElementById(ut(E, _))?.focus();
|
|
3375
|
+
}, 10))), (H.key === "Enter" || H.code === "Space") && e(n.date);
|
|
3369
3376
|
},
|
|
3370
3377
|
[
|
|
3371
3378
|
_,
|
|
3372
3379
|
n.date,
|
|
3373
|
-
|
|
3380
|
+
p,
|
|
3374
3381
|
r,
|
|
3375
3382
|
e,
|
|
3376
3383
|
l
|
|
3377
3384
|
]
|
|
3378
|
-
),
|
|
3385
|
+
), b = n.month === t.getMonth(), m = p?.(n.date) ?? !1, k = d && u ? G(d, u) : !1, x = d && u ? F(k ? u : d, n.date) : !1, S = d && u ? F(k ? d : u, n.date) : !1, N = !d && o ? F(o, n.date) : !1, B = !d && i ? F(i, n.date) : !1, R = F(n.date, f), A = ro(
|
|
3379
3386
|
n.date,
|
|
3380
3387
|
o,
|
|
3381
3388
|
i,
|
|
3382
|
-
|
|
3389
|
+
D,
|
|
3383
3390
|
d,
|
|
3384
3391
|
u,
|
|
3385
|
-
|
|
3392
|
+
b,
|
|
3386
3393
|
a
|
|
3387
3394
|
);
|
|
3388
|
-
return /* @__PURE__ */
|
|
3395
|
+
return /* @__PURE__ */ T(
|
|
3389
3396
|
"td",
|
|
3390
3397
|
{
|
|
3391
|
-
className:
|
|
3392
|
-
onClick:
|
|
3393
|
-
onMouseOver:
|
|
3394
|
-
onMouseOut:
|
|
3395
|
-
tabIndex:
|
|
3398
|
+
className: oe(ne.travelDateCell, ne[y]),
|
|
3399
|
+
onClick: m ? void 0 : () => e(n.date),
|
|
3400
|
+
onMouseOver: m ? void 0 : () => b && l(n.date),
|
|
3401
|
+
onMouseOut: m ? void 0 : () => b && c(n.date),
|
|
3402
|
+
tabIndex: m ? void 0 : ho(
|
|
3396
3403
|
n,
|
|
3397
3404
|
o,
|
|
3398
|
-
|
|
3405
|
+
R,
|
|
3399
3406
|
t,
|
|
3400
3407
|
h
|
|
3401
3408
|
),
|
|
3402
|
-
id:
|
|
3403
|
-
onKeyDown:
|
|
3404
|
-
...
|
|
3405
|
-
"data-testid":
|
|
3409
|
+
id: m ? void 0 : ut(n.date, _),
|
|
3410
|
+
onKeyDown: m ? void 0 : g,
|
|
3411
|
+
...m ? void 0 : { "aria-selected": N || B },
|
|
3412
|
+
"data-testid": w?.(n.date),
|
|
3406
3413
|
children: [
|
|
3407
|
-
/* @__PURE__ */ s("div", { className:
|
|
3414
|
+
/* @__PURE__ */ s("div", { className: ne.outline }),
|
|
3408
3415
|
/* @__PURE__ */ s(
|
|
3409
|
-
|
|
3416
|
+
_o,
|
|
3410
3417
|
{
|
|
3411
3418
|
calendarSize: y,
|
|
3412
3419
|
bgColorLeft: A.left,
|
|
3413
3420
|
bgColorRight: A.right
|
|
3414
3421
|
}
|
|
3415
3422
|
),
|
|
3416
|
-
|
|
3423
|
+
b && /* @__PURE__ */ s(
|
|
3417
3424
|
"div",
|
|
3418
3425
|
{
|
|
3419
|
-
className:
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
o ?
|
|
3423
|
-
i ?
|
|
3424
|
-
d &&
|
|
3425
|
-
(
|
|
3426
|
-
(
|
|
3427
|
-
|
|
3426
|
+
className: oe(
|
|
3427
|
+
ne.contentWrapper,
|
|
3428
|
+
R ? ne.isToday : void 0,
|
|
3429
|
+
o ? ne.startSelected : void 0,
|
|
3430
|
+
i ? ne.endSelected : void 0,
|
|
3431
|
+
d && F(d, n.date) ? ne.hover : void 0,
|
|
3432
|
+
(N || x) && ne.isSelectionStart,
|
|
3433
|
+
(B || S) && ne.isSelectionEnd,
|
|
3434
|
+
m && ne.disabled
|
|
3428
3435
|
),
|
|
3429
3436
|
children: /* @__PURE__ */ s(
|
|
3430
3437
|
De,
|
|
3431
3438
|
{
|
|
3432
3439
|
variant: "bold",
|
|
3433
|
-
color:
|
|
3440
|
+
color: m ? It("--lhds-color-ui-500") : void 0,
|
|
3434
3441
|
children: n.dayOfMonth
|
|
3435
3442
|
}
|
|
3436
3443
|
)
|
|
@@ -3439,12 +3446,12 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
3439
3446
|
]
|
|
3440
3447
|
}
|
|
3441
3448
|
);
|
|
3442
|
-
},
|
|
3449
|
+
}, ho = (e, t, r, n, a) => {
|
|
3443
3450
|
const o = t ? ge(t, n) : !1;
|
|
3444
|
-
return (t && o ?
|
|
3445
|
-
},
|
|
3446
|
-
travelCalendar:
|
|
3447
|
-
},
|
|
3451
|
+
return (t && o ? F(e.date, t) : r) || !o && !a && e.date.getDate() === 1 ? 0 : -1;
|
|
3452
|
+
}, go = "_travelCalendar_ib2y4_1", po = {
|
|
3453
|
+
travelCalendar: go
|
|
3454
|
+
}, it = ({
|
|
3448
3455
|
visibleMonthData: e,
|
|
3449
3456
|
onClickDate: t,
|
|
3450
3457
|
setHoverDate: r,
|
|
@@ -3459,29 +3466,29 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
3459
3466
|
calendarId: f,
|
|
3460
3467
|
isDateDisabled: h,
|
|
3461
3468
|
todayIsInVisibleMonth: _,
|
|
3462
|
-
size:
|
|
3469
|
+
size: p = "medium",
|
|
3463
3470
|
multiSelectable: y,
|
|
3464
|
-
dateTestId:
|
|
3465
|
-
hoverHighlightDirection:
|
|
3471
|
+
dateTestId: w,
|
|
3472
|
+
hoverHighlightDirection: D
|
|
3466
3473
|
}) => /* @__PURE__ */ s(
|
|
3467
3474
|
"table",
|
|
3468
3475
|
{
|
|
3469
|
-
className:
|
|
3476
|
+
className: po.travelCalendar,
|
|
3470
3477
|
role: "grid",
|
|
3471
3478
|
...y ? { "aria-multiselectable": !0 } : void 0,
|
|
3472
|
-
children: /* @__PURE__ */
|
|
3473
|
-
/* @__PURE__ */ s("tr", { children: e.weeks[0].days.map((
|
|
3474
|
-
e.weeks.map((
|
|
3475
|
-
|
|
3479
|
+
children: /* @__PURE__ */ T("tbody", { children: [
|
|
3480
|
+
/* @__PURE__ */ s("tr", { children: e.weeks[0].days.map((g) => /* @__PURE__ */ s("th", { abbr: g.fullName, children: /* @__PURE__ */ s(De, { children: g.name }) }, g.name)) }),
|
|
3481
|
+
e.weeks.map((g) => /* @__PURE__ */ s(St.Fragment, { children: /* @__PURE__ */ s("tr", { children: g.days.map((b) => /* @__PURE__ */ s(
|
|
3482
|
+
fo,
|
|
3476
3483
|
{
|
|
3477
|
-
size:
|
|
3478
|
-
onClick: (
|
|
3484
|
+
size: p,
|
|
3485
|
+
onClick: (m) => t(m),
|
|
3479
3486
|
visibleMonth: a,
|
|
3480
3487
|
onChangeVisibleMonth: n,
|
|
3481
3488
|
isValidDateRange: o,
|
|
3482
|
-
day:
|
|
3483
|
-
onStartHover: (
|
|
3484
|
-
onEndHover: (
|
|
3489
|
+
day: b,
|
|
3490
|
+
onStartHover: (m) => r(m),
|
|
3491
|
+
onEndHover: (m) => r((k) => k && F(k, m) ? void 0 : k),
|
|
3485
3492
|
selectedStartDate: i,
|
|
3486
3493
|
selectedEndDate: l,
|
|
3487
3494
|
hoverDate: c,
|
|
@@ -3490,18 +3497,18 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
3490
3497
|
todayIsInVisibleMonth: _,
|
|
3491
3498
|
calendarId: f,
|
|
3492
3499
|
isDateDisabled: h,
|
|
3493
|
-
dateTestId:
|
|
3494
|
-
hoverHighlightDirection:
|
|
3500
|
+
dateTestId: w,
|
|
3501
|
+
hoverHighlightDirection: D
|
|
3495
3502
|
},
|
|
3496
|
-
|
|
3497
|
-
)) },
|
|
3503
|
+
b.dateString
|
|
3504
|
+
)) }, g.weekNumber) }, g.weekNumber))
|
|
3498
3505
|
] })
|
|
3499
3506
|
}
|
|
3500
|
-
),
|
|
3501
|
-
travelDateRangeInput:
|
|
3502
|
-
overlay:
|
|
3503
|
-
calendarVisible:
|
|
3504
|
-
},
|
|
3507
|
+
), mo = "_travelDateRangeInput_1j7rp_1", bo = "_overlay_1j7rp_2", vo = "_calendarVisible_1j7rp_6", _t = {
|
|
3508
|
+
travelDateRangeInput: mo,
|
|
3509
|
+
overlay: bo,
|
|
3510
|
+
calendarVisible: vo
|
|
3511
|
+
}, ts = ({
|
|
3505
3512
|
value: e,
|
|
3506
3513
|
onValueChange: t,
|
|
3507
3514
|
startDateLabel: r,
|
|
@@ -3516,156 +3523,160 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
3516
3523
|
heading: f,
|
|
3517
3524
|
headingLevel: h,
|
|
3518
3525
|
numMonthsInMonthPicker: _ = 12,
|
|
3519
|
-
isDateDisabled:
|
|
3526
|
+
isDateDisabled: p,
|
|
3520
3527
|
prevMonthDisabled: y,
|
|
3521
|
-
nextMonthDisabled:
|
|
3522
|
-
firstMonthInMonthPicker:
|
|
3523
|
-
zIndex:
|
|
3524
|
-
zIndexWhenClosed:
|
|
3525
|
-
onHideCalendar:
|
|
3528
|
+
nextMonthDisabled: w,
|
|
3529
|
+
firstMonthInMonthPicker: D = /* @__PURE__ */ new Date(),
|
|
3530
|
+
zIndex: g = 1e3,
|
|
3531
|
+
zIndexWhenClosed: b,
|
|
3532
|
+
onHideCalendar: m,
|
|
3526
3533
|
renderBelowCalendar: k,
|
|
3527
|
-
size:
|
|
3528
|
-
dateTestId:
|
|
3529
|
-
previousMonthButtonTestId:
|
|
3530
|
-
nextMonthButtonTestId:
|
|
3531
|
-
textInputVariant:
|
|
3534
|
+
size: x = "medium",
|
|
3535
|
+
dateTestId: S,
|
|
3536
|
+
previousMonthButtonTestId: N,
|
|
3537
|
+
nextMonthButtonTestId: B,
|
|
3538
|
+
textInputVariant: R = "standard",
|
|
3539
|
+
autoFocusStartDate: A,
|
|
3540
|
+
autoFocusEndDate: H
|
|
3532
3541
|
}) => {
|
|
3533
|
-
const [
|
|
3542
|
+
const [E, P] = C(!1), [K, J] = C(!1), [M, q] = C({
|
|
3534
3543
|
// Sane defaults, this will be updated with actual data from DOM.
|
|
3535
3544
|
width: 336,
|
|
3536
3545
|
height: 66
|
|
3537
|
-
}), [
|
|
3538
|
-
|
|
3539
|
-
},
|
|
3540
|
-
|
|
3541
|
-
|
|
3546
|
+
}), [U, V] = C(void 0), W = $(null), Y = $(null), X = (ee) => {
|
|
3547
|
+
ee === "startDate" ? W.current?.focus() : ee === "endDate" && Y.current?.focus();
|
|
3548
|
+
}, re = x === "large" ? "8.8rem" : "6.6rem", se = $(!1), ue = v((ee) => {
|
|
3549
|
+
V(ee), se.current = !0, J(!0), setTimeout(() => {
|
|
3550
|
+
P(!0);
|
|
3542
3551
|
}, 10);
|
|
3543
|
-
}, []),
|
|
3544
|
-
|
|
3545
|
-
|
|
3552
|
+
}, []), O = v(() => {
|
|
3553
|
+
K && (P(!1), se.current = !1, m?.(), setTimeout(() => {
|
|
3554
|
+
se.current || J(!1);
|
|
3546
3555
|
}, 120));
|
|
3547
|
-
}, [
|
|
3548
|
-
|
|
3549
|
-
const
|
|
3550
|
-
|
|
3551
|
-
}, [
|
|
3552
|
-
const me =
|
|
3556
|
+
}, [K, m]), je = $(null), Ce = $(null);
|
|
3557
|
+
ar(je, O), mr(() => {
|
|
3558
|
+
const ee = Ce.current?.offsetWidth, lt = Ce.current?.offsetHeight;
|
|
3559
|
+
ee != null && lt != null && (M.height !== lt || M.width !== ee) && q({ width: ee, height: lt });
|
|
3560
|
+
}, [M.height, M.width]);
|
|
3561
|
+
const me = Nr(
|
|
3553
3562
|
e,
|
|
3554
3563
|
t,
|
|
3555
3564
|
a,
|
|
3556
3565
|
o,
|
|
3557
3566
|
i,
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3567
|
+
U,
|
|
3568
|
+
V,
|
|
3569
|
+
X,
|
|
3570
|
+
O
|
|
3562
3571
|
), {
|
|
3563
|
-
visiblePanel:
|
|
3564
|
-
visibleMonth:
|
|
3565
|
-
onValueChangeByInputs:
|
|
3566
|
-
setVisibleMonth:
|
|
3567
|
-
setVisiblePanel:
|
|
3568
|
-
monthPickerButtonRef:
|
|
3569
|
-
} = me,
|
|
3570
|
-
(
|
|
3571
|
-
|
|
3572
|
+
visiblePanel: qe,
|
|
3573
|
+
visibleMonth: le,
|
|
3574
|
+
onValueChangeByInputs: Ee,
|
|
3575
|
+
setVisibleMonth: Ar,
|
|
3576
|
+
setVisiblePanel: Tt,
|
|
3577
|
+
monthPickerButtonRef: Nt
|
|
3578
|
+
} = me, Fr = v(
|
|
3579
|
+
(ee) => {
|
|
3580
|
+
ee.key === "Escape" && O();
|
|
3572
3581
|
},
|
|
3573
|
-
[
|
|
3582
|
+
[O]
|
|
3574
3583
|
);
|
|
3575
|
-
return /* @__PURE__ */
|
|
3584
|
+
return /* @__PURE__ */ T(
|
|
3576
3585
|
L,
|
|
3577
3586
|
{
|
|
3578
3587
|
position: "relative",
|
|
3579
|
-
className:
|
|
3580
|
-
ref:
|
|
3581
|
-
onKeyDown:
|
|
3582
|
-
height:
|
|
3583
|
-
width:
|
|
3588
|
+
className: _t.travelDateRangeInput,
|
|
3589
|
+
ref: je,
|
|
3590
|
+
onKeyDown: Fr,
|
|
3591
|
+
height: M.height,
|
|
3592
|
+
width: M.width,
|
|
3584
3593
|
children: [
|
|
3585
3594
|
/* @__PURE__ */ s(
|
|
3586
3595
|
L,
|
|
3587
3596
|
{
|
|
3588
3597
|
position: "absolute",
|
|
3589
|
-
ref:
|
|
3590
|
-
zIndex:
|
|
3598
|
+
ref: Ce,
|
|
3599
|
+
zIndex: K ? g : b,
|
|
3591
3600
|
children: /* @__PURE__ */ s(
|
|
3592
|
-
|
|
3601
|
+
Tr,
|
|
3593
3602
|
{
|
|
3594
3603
|
...me,
|
|
3595
3604
|
value: e,
|
|
3596
|
-
onValueChange:
|
|
3597
|
-
startDateRef:
|
|
3598
|
-
endDateRef:
|
|
3605
|
+
onValueChange: Ee,
|
|
3606
|
+
startDateRef: W,
|
|
3607
|
+
endDateRef: Y,
|
|
3599
3608
|
localeCode: a,
|
|
3600
3609
|
startDateLabel: r,
|
|
3601
3610
|
endDateLabel: n,
|
|
3602
|
-
onFocus:
|
|
3603
|
-
calendarSize:
|
|
3611
|
+
onFocus: ue,
|
|
3612
|
+
calendarSize: x,
|
|
3604
3613
|
placeholderWhenBlurredStartDate: d,
|
|
3605
3614
|
placeholderWhenBlurredEndDate: u,
|
|
3606
|
-
variant:
|
|
3615
|
+
variant: R,
|
|
3616
|
+
autoFocusStartDate: A,
|
|
3617
|
+
autoFocusEndDate: H,
|
|
3607
3618
|
readOnlyOnMobile: !0
|
|
3608
3619
|
}
|
|
3609
3620
|
)
|
|
3610
3621
|
}
|
|
3611
3622
|
),
|
|
3612
|
-
|
|
3623
|
+
K && /* @__PURE__ */ s(
|
|
3613
3624
|
L,
|
|
3614
3625
|
{
|
|
3615
3626
|
position: "absolute",
|
|
3616
|
-
zIndex:
|
|
3627
|
+
zIndex: g - 1,
|
|
3617
3628
|
left: "-2.4rem",
|
|
3618
3629
|
top: f ? "-8.0rem" : "-2.4rem",
|
|
3619
|
-
className:
|
|
3630
|
+
className: oe(_t.overlay, E && _t.calendarVisible),
|
|
3620
3631
|
children: /* @__PURE__ */ s(
|
|
3621
3632
|
L,
|
|
3622
3633
|
{
|
|
3623
3634
|
background: "white",
|
|
3624
3635
|
shadow: "popover",
|
|
3625
3636
|
borderRadius: "var(--swui-border-radius-large)",
|
|
3626
|
-
children: /* @__PURE__ */
|
|
3637
|
+
children: /* @__PURE__ */ T(ir, { gap: 3, children: [
|
|
3627
3638
|
f && /* @__PURE__ */ s(He, { variant: "h2", as: h, children: f }),
|
|
3628
|
-
/* @__PURE__ */ s(L, { height:
|
|
3639
|
+
/* @__PURE__ */ s(L, { height: re }),
|
|
3629
3640
|
/* @__PURE__ */ s(
|
|
3630
|
-
|
|
3641
|
+
st,
|
|
3631
3642
|
{
|
|
3632
3643
|
...me,
|
|
3633
3644
|
previousMonthButtonAriaLabel: l,
|
|
3634
3645
|
nextMonthButtonAriaLabel: c,
|
|
3635
|
-
calendarSize:
|
|
3646
|
+
calendarSize: x,
|
|
3636
3647
|
prevMonthDisabled: y,
|
|
3637
|
-
nextMonthDisabled:
|
|
3638
|
-
previousMonthButtonTestId:
|
|
3639
|
-
nextMonthButtonTestId:
|
|
3648
|
+
nextMonthDisabled: w,
|
|
3649
|
+
previousMonthButtonTestId: N,
|
|
3650
|
+
nextMonthButtonTestId: B
|
|
3640
3651
|
}
|
|
3641
3652
|
),
|
|
3642
|
-
|
|
3643
|
-
|
|
3653
|
+
qe === "calendar" && /* @__PURE__ */ s(
|
|
3654
|
+
it,
|
|
3644
3655
|
{
|
|
3645
3656
|
...me,
|
|
3646
|
-
size:
|
|
3657
|
+
size: x,
|
|
3647
3658
|
multiSelectable: !0,
|
|
3648
|
-
isDateDisabled:
|
|
3649
|
-
dateTestId:
|
|
3659
|
+
isDateDisabled: p,
|
|
3660
|
+
dateTestId: S
|
|
3650
3661
|
}
|
|
3651
3662
|
),
|
|
3652
|
-
|
|
3663
|
+
qe === "month-picker" && /* @__PURE__ */ s(
|
|
3653
3664
|
Ue,
|
|
3654
3665
|
{
|
|
3655
|
-
firstMonth:
|
|
3666
|
+
firstMonth: D,
|
|
3656
3667
|
numMonths: _,
|
|
3657
|
-
value:
|
|
3658
|
-
size:
|
|
3668
|
+
value: le,
|
|
3669
|
+
size: x,
|
|
3659
3670
|
localeCode: o,
|
|
3660
|
-
onValueChange: (
|
|
3661
|
-
|
|
3671
|
+
onValueChange: (ee) => {
|
|
3672
|
+
Ar(ee), Tt("calendar"), Nt.current?.focus();
|
|
3662
3673
|
},
|
|
3663
3674
|
onCancel: () => {
|
|
3664
|
-
|
|
3675
|
+
Tt("calendar"), Nt.current?.focus();
|
|
3665
3676
|
}
|
|
3666
3677
|
}
|
|
3667
3678
|
),
|
|
3668
|
-
k?.({ hideCalendar:
|
|
3679
|
+
k?.({ hideCalendar: O })
|
|
3669
3680
|
] })
|
|
3670
3681
|
}
|
|
3671
3682
|
)
|
|
@@ -3674,108 +3685,110 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
3674
3685
|
]
|
|
3675
3686
|
}
|
|
3676
3687
|
);
|
|
3677
|
-
},
|
|
3678
|
-
travelDateInput:
|
|
3679
|
-
overlay:
|
|
3680
|
-
calendarVisible:
|
|
3681
|
-
},
|
|
3688
|
+
}, yo = "_travelDateInput_hmfbf_1", wo = "_overlay_hmfbf_2", Do = "_calendarVisible_hmfbf_6", ft = {
|
|
3689
|
+
travelDateInput: yo,
|
|
3690
|
+
overlay: wo,
|
|
3691
|
+
calendarVisible: Do
|
|
3692
|
+
}, Er = ({
|
|
3682
3693
|
value: e,
|
|
3683
3694
|
onValueChange: t,
|
|
3684
3695
|
label: r = "Date",
|
|
3685
3696
|
localeCode: n,
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3697
|
+
autoFocus: a,
|
|
3698
|
+
onFocus: o,
|
|
3699
|
+
calendarSize: i,
|
|
3700
|
+
placeholderWhenBlurred: l,
|
|
3701
|
+
valueWhenBlurred: c,
|
|
3702
|
+
variant: d,
|
|
3703
|
+
readOnlyOnMobile: u
|
|
3692
3704
|
}) => {
|
|
3693
|
-
const { deviceSize:
|
|
3694
|
-
const
|
|
3705
|
+
const { deviceSize: f } = Ir(), h = u && !Rr(f, "tablet"), { mask: _, placeholder: p } = I(() => {
|
|
3706
|
+
const y = Ne(n);
|
|
3695
3707
|
return {
|
|
3696
|
-
mask:
|
|
3697
|
-
placeholder:
|
|
3708
|
+
mask: Mr(y),
|
|
3709
|
+
placeholder: y.toLowerCase()
|
|
3698
3710
|
};
|
|
3699
3711
|
}, [n]);
|
|
3700
|
-
return /* @__PURE__ */ s(
|
|
3701
|
-
|
|
3712
|
+
return /* @__PURE__ */ s(z, { children: /* @__PURE__ */ s(
|
|
3713
|
+
mt,
|
|
3702
3714
|
{
|
|
3703
|
-
mask:
|
|
3715
|
+
mask: _,
|
|
3704
3716
|
value: e,
|
|
3705
3717
|
onValueChange: t,
|
|
3706
|
-
onBlur: (
|
|
3707
|
-
const
|
|
3708
|
-
|
|
3718
|
+
onBlur: (y) => {
|
|
3719
|
+
const w = bt(y.target.value, n);
|
|
3720
|
+
w && w !== e && t?.(w);
|
|
3709
3721
|
},
|
|
3710
|
-
readOnly:
|
|
3711
|
-
onFocus:
|
|
3722
|
+
readOnly: h,
|
|
3723
|
+
onFocus: o,
|
|
3724
|
+
autoFocus: a,
|
|
3712
3725
|
label: r,
|
|
3713
|
-
placeholder:
|
|
3714
|
-
calendarSize:
|
|
3715
|
-
placeholderWhenBlurred:
|
|
3716
|
-
valueWhenBlurred:
|
|
3717
|
-
variant:
|
|
3726
|
+
placeholder: p,
|
|
3727
|
+
calendarSize: i,
|
|
3728
|
+
placeholderWhenBlurred: l,
|
|
3729
|
+
valueWhenBlurred: c,
|
|
3730
|
+
variant: d
|
|
3718
3731
|
}
|
|
3719
3732
|
) });
|
|
3720
|
-
},
|
|
3721
|
-
const i =
|
|
3722
|
-
() =>
|
|
3733
|
+
}, Lr = (e, t, r, n, a, o) => {
|
|
3734
|
+
const i = Me(n), l = Bt(), c = Ie(), d = $(null), u = I(
|
|
3735
|
+
() => Ne(r),
|
|
3723
3736
|
[r]
|
|
3724
|
-
), f =
|
|
3725
|
-
() => e?.length === u.length ?
|
|
3737
|
+
), f = I(
|
|
3738
|
+
() => e?.length === u.length ? ce(e, r) : void 0,
|
|
3726
3739
|
[u.length, r, e]
|
|
3727
|
-
), h =
|
|
3728
|
-
() => f != null ?
|
|
3740
|
+
), h = I(
|
|
3741
|
+
() => f != null ? vt(f, c, i) : void 0,
|
|
3729
3742
|
[i, f, c]
|
|
3730
|
-
), [_,
|
|
3743
|
+
), [_, p] = C(
|
|
3731
3744
|
a ?? f ?? /* @__PURE__ */ new Date()
|
|
3732
|
-
), y =
|
|
3733
|
-
(
|
|
3734
|
-
ge(
|
|
3745
|
+
), y = v(
|
|
3746
|
+
(B) => {
|
|
3747
|
+
ge(B, c) || G(B, c) ? p(B) : p(c);
|
|
3735
3748
|
},
|
|
3736
3749
|
[c]
|
|
3737
|
-
),
|
|
3738
|
-
() =>
|
|
3750
|
+
), w = I(
|
|
3751
|
+
() => at(
|
|
3739
3752
|
_.getFullYear(),
|
|
3740
3753
|
_.getMonth(),
|
|
3741
3754
|
i
|
|
3742
3755
|
),
|
|
3743
3756
|
[i, _]
|
|
3744
|
-
),
|
|
3745
|
-
|
|
3757
|
+
), D = I(() => nt(
|
|
3758
|
+
gr(
|
|
3746
3759
|
_,
|
|
3747
3760
|
{ month: "long", year: "numeric" },
|
|
3748
3761
|
{ locale: i.code }
|
|
3749
3762
|
)
|
|
3750
|
-
), [i, _]),
|
|
3751
|
-
(
|
|
3752
|
-
const
|
|
3753
|
-
|
|
3763
|
+
), [i, _]), g = I(() => ge(c, _), [c, _]), [b, m] = C(), [k, x] = C("calendar"), S = v(
|
|
3764
|
+
(B) => {
|
|
3765
|
+
const R = B?.length === u.length ? ce(B, r) : void 0;
|
|
3766
|
+
R && y(R), t?.(B);
|
|
3754
3767
|
},
|
|
3755
3768
|
[u.length, r, t, y]
|
|
3756
3769
|
);
|
|
3757
3770
|
return {
|
|
3758
|
-
onClickDate: (
|
|
3759
|
-
t?.(be(
|
|
3771
|
+
onClickDate: (B) => {
|
|
3772
|
+
t?.(be(B, r)), o?.(B);
|
|
3760
3773
|
},
|
|
3761
|
-
onValueChangeByInputs:
|
|
3774
|
+
onValueChangeByInputs: S,
|
|
3762
3775
|
monthPickerButtonRef: d,
|
|
3763
3776
|
calendarId: l,
|
|
3764
|
-
monthPickerButtonLabel:
|
|
3777
|
+
monthPickerButtonLabel: D,
|
|
3765
3778
|
visiblePanel: k,
|
|
3766
|
-
setVisiblePanel:
|
|
3767
|
-
setVisibleMonth:
|
|
3768
|
-
visibleMonthData:
|
|
3769
|
-
todayIsInVisibleMonth:
|
|
3770
|
-
hoverDate:
|
|
3779
|
+
setVisiblePanel: x,
|
|
3780
|
+
setVisibleMonth: p,
|
|
3781
|
+
visibleMonthData: w,
|
|
3782
|
+
todayIsInVisibleMonth: g,
|
|
3783
|
+
hoverDate: b,
|
|
3771
3784
|
hoverAnchor: void 0,
|
|
3772
|
-
setHoverDate:
|
|
3785
|
+
setHoverDate: m,
|
|
3773
3786
|
selectedDate: f,
|
|
3774
3787
|
today: c,
|
|
3775
3788
|
visibleMonth: _,
|
|
3776
3789
|
valueWhenBlurred: h
|
|
3777
3790
|
};
|
|
3778
|
-
},
|
|
3791
|
+
}, rs = ({
|
|
3779
3792
|
value: e,
|
|
3780
3793
|
onValueChange: t,
|
|
3781
3794
|
label: r,
|
|
@@ -3785,159 +3798,161 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
3785
3798
|
previousMonthButtonAriaLabel: i = "Previous month",
|
|
3786
3799
|
nextMonthButtonAriaLabel: l = "Next month",
|
|
3787
3800
|
placeholderWhenBlurred: c,
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3801
|
+
autoFocus: d,
|
|
3802
|
+
heading: u,
|
|
3803
|
+
headingLevel: f,
|
|
3804
|
+
numMonthsInMonthPicker: h = 12,
|
|
3805
|
+
isDateDisabled: _,
|
|
3806
|
+
prevMonthDisabled: p,
|
|
3807
|
+
nextMonthDisabled: y,
|
|
3808
|
+
firstMonthInMonthPicker: w = /* @__PURE__ */ new Date(),
|
|
3795
3809
|
zIndex: D = 1e3,
|
|
3796
|
-
zIndexWhenClosed:
|
|
3797
|
-
onHideCalendar:
|
|
3798
|
-
renderBelowCalendar:
|
|
3799
|
-
size:
|
|
3800
|
-
dateTestId:
|
|
3801
|
-
previousMonthButtonTestId:
|
|
3802
|
-
nextMonthButtonTestId:
|
|
3803
|
-
textInputVariant:
|
|
3810
|
+
zIndexWhenClosed: g,
|
|
3811
|
+
onHideCalendar: b,
|
|
3812
|
+
renderBelowCalendar: m,
|
|
3813
|
+
size: k = "medium",
|
|
3814
|
+
dateTestId: x,
|
|
3815
|
+
previousMonthButtonTestId: S,
|
|
3816
|
+
nextMonthButtonTestId: N,
|
|
3817
|
+
textInputVariant: B = "standard"
|
|
3804
3818
|
}) => {
|
|
3805
|
-
const [
|
|
3819
|
+
const [R, A] = C(!1), [H, E] = C(!1), [P, K] = C({
|
|
3806
3820
|
// Sane defaults, this will be updated with actual data from DOM.
|
|
3807
3821
|
width: 336,
|
|
3808
3822
|
height: 66
|
|
3809
|
-
}),
|
|
3810
|
-
|
|
3811
|
-
|
|
3823
|
+
}), J = k === "large" ? "8.8rem" : "6.6rem", M = $(!1), q = v(() => {
|
|
3824
|
+
M.current = !0, E(!0), setTimeout(() => {
|
|
3825
|
+
A(!0);
|
|
3812
3826
|
}, 10);
|
|
3813
|
-
}, []),
|
|
3814
|
-
|
|
3815
|
-
|
|
3827
|
+
}, []), U = v(() => {
|
|
3828
|
+
H && (A(!1), M.current = !1, b?.(), setTimeout(() => {
|
|
3829
|
+
M.current || E(!1);
|
|
3816
3830
|
}, 120));
|
|
3817
|
-
}, [
|
|
3831
|
+
}, [H, b]), V = v(() => {
|
|
3818
3832
|
setTimeout(() => {
|
|
3819
|
-
|
|
3833
|
+
U();
|
|
3820
3834
|
}, 250);
|
|
3821
|
-
}, [
|
|
3822
|
-
|
|
3823
|
-
const
|
|
3824
|
-
|
|
3825
|
-
}, [
|
|
3826
|
-
const
|
|
3835
|
+
}, [U]), W = $(null), Y = $(null);
|
|
3836
|
+
ar(W, U), mr(() => {
|
|
3837
|
+
const le = Y.current?.offsetWidth, Ee = Y.current?.offsetHeight;
|
|
3838
|
+
le != null && Ee != null && (P.height !== Ee || P.width !== le) && K({ width: le, height: Ee });
|
|
3839
|
+
}, [P.height, P.width]);
|
|
3840
|
+
const X = Lr(
|
|
3827
3841
|
e,
|
|
3828
3842
|
t,
|
|
3829
3843
|
n,
|
|
3830
3844
|
a,
|
|
3831
3845
|
o,
|
|
3832
|
-
|
|
3846
|
+
V
|
|
3833
3847
|
), {
|
|
3834
|
-
visiblePanel:
|
|
3835
|
-
visibleMonth:
|
|
3836
|
-
onValueChangeByInputs:
|
|
3837
|
-
selectedDate:
|
|
3838
|
-
setVisibleMonth:
|
|
3839
|
-
setVisiblePanel:
|
|
3840
|
-
monthPickerButtonRef:
|
|
3841
|
-
} =
|
|
3842
|
-
(
|
|
3843
|
-
|
|
3848
|
+
visiblePanel: re,
|
|
3849
|
+
visibleMonth: se,
|
|
3850
|
+
onValueChangeByInputs: ue,
|
|
3851
|
+
selectedDate: O,
|
|
3852
|
+
setVisibleMonth: je,
|
|
3853
|
+
setVisiblePanel: Ce,
|
|
3854
|
+
monthPickerButtonRef: me
|
|
3855
|
+
} = X, qe = v(
|
|
3856
|
+
(le) => {
|
|
3857
|
+
le.key === "Escape" && U();
|
|
3844
3858
|
},
|
|
3845
|
-
[
|
|
3859
|
+
[U]
|
|
3846
3860
|
);
|
|
3847
|
-
return /* @__PURE__ */
|
|
3861
|
+
return /* @__PURE__ */ T(
|
|
3848
3862
|
L,
|
|
3849
3863
|
{
|
|
3850
3864
|
position: "relative",
|
|
3851
|
-
className:
|
|
3852
|
-
ref:
|
|
3853
|
-
onKeyDown:
|
|
3854
|
-
height:
|
|
3855
|
-
width:
|
|
3865
|
+
className: ft.travelDateInput,
|
|
3866
|
+
ref: W,
|
|
3867
|
+
onKeyDown: qe,
|
|
3868
|
+
height: P.height,
|
|
3869
|
+
width: P.width,
|
|
3856
3870
|
children: [
|
|
3857
3871
|
/* @__PURE__ */ s(
|
|
3858
3872
|
L,
|
|
3859
3873
|
{
|
|
3860
3874
|
position: "absolute",
|
|
3861
|
-
ref:
|
|
3862
|
-
zIndex:
|
|
3875
|
+
ref: Y,
|
|
3876
|
+
zIndex: H ? D : g,
|
|
3863
3877
|
children: /* @__PURE__ */ s(
|
|
3864
|
-
|
|
3878
|
+
Er,
|
|
3865
3879
|
{
|
|
3866
|
-
...
|
|
3880
|
+
...X,
|
|
3881
|
+
autoFocus: d,
|
|
3867
3882
|
value: e,
|
|
3868
|
-
onValueChange:
|
|
3883
|
+
onValueChange: ue,
|
|
3869
3884
|
localeCode: n,
|
|
3870
3885
|
label: r,
|
|
3871
|
-
onFocus:
|
|
3872
|
-
calendarSize:
|
|
3886
|
+
onFocus: q,
|
|
3887
|
+
calendarSize: k,
|
|
3873
3888
|
placeholderWhenBlurred: c,
|
|
3874
|
-
variant:
|
|
3889
|
+
variant: B,
|
|
3875
3890
|
readOnlyOnMobile: !0
|
|
3876
3891
|
}
|
|
3877
3892
|
)
|
|
3878
3893
|
}
|
|
3879
3894
|
),
|
|
3880
|
-
|
|
3895
|
+
H && /* @__PURE__ */ s(
|
|
3881
3896
|
L,
|
|
3882
3897
|
{
|
|
3883
3898
|
position: "absolute",
|
|
3884
3899
|
zIndex: D - 1,
|
|
3885
3900
|
left: "-2.4rem",
|
|
3886
|
-
top:
|
|
3887
|
-
className:
|
|
3901
|
+
top: u ? "-8.0rem" : "-2.4rem",
|
|
3902
|
+
className: oe(ft.overlay, R && ft.calendarVisible),
|
|
3888
3903
|
children: /* @__PURE__ */ s(
|
|
3889
3904
|
L,
|
|
3890
3905
|
{
|
|
3891
3906
|
background: "white",
|
|
3892
3907
|
shadow: "popover",
|
|
3893
3908
|
borderRadius: "var(--swui-border-radius-large)",
|
|
3894
|
-
children: /* @__PURE__ */
|
|
3895
|
-
|
|
3896
|
-
/* @__PURE__ */ s(L, { height:
|
|
3909
|
+
children: /* @__PURE__ */ T(ir, { gap: 3, children: [
|
|
3910
|
+
u && /* @__PURE__ */ s(He, { variant: "h2", as: f, children: u }),
|
|
3911
|
+
/* @__PURE__ */ s(L, { height: J }),
|
|
3897
3912
|
/* @__PURE__ */ s(
|
|
3898
|
-
|
|
3913
|
+
st,
|
|
3899
3914
|
{
|
|
3900
|
-
...
|
|
3915
|
+
...X,
|
|
3901
3916
|
previousMonthButtonAriaLabel: i,
|
|
3902
3917
|
nextMonthButtonAriaLabel: l,
|
|
3903
|
-
calendarSize:
|
|
3904
|
-
prevMonthDisabled:
|
|
3905
|
-
nextMonthDisabled:
|
|
3906
|
-
previousMonthButtonTestId:
|
|
3907
|
-
nextMonthButtonTestId:
|
|
3918
|
+
calendarSize: k,
|
|
3919
|
+
prevMonthDisabled: p,
|
|
3920
|
+
nextMonthDisabled: y,
|
|
3921
|
+
previousMonthButtonTestId: S,
|
|
3922
|
+
nextMonthButtonTestId: N
|
|
3908
3923
|
}
|
|
3909
3924
|
),
|
|
3910
|
-
|
|
3911
|
-
|
|
3925
|
+
re === "calendar" && /* @__PURE__ */ s(
|
|
3926
|
+
it,
|
|
3912
3927
|
{
|
|
3913
|
-
...
|
|
3914
|
-
size:
|
|
3915
|
-
isValidDateRange: !!
|
|
3916
|
-
selectedStartDate:
|
|
3917
|
-
selectedEndDate:
|
|
3928
|
+
...X,
|
|
3929
|
+
size: k,
|
|
3930
|
+
isValidDateRange: !!O,
|
|
3931
|
+
selectedStartDate: O,
|
|
3932
|
+
selectedEndDate: O,
|
|
3918
3933
|
multiSelectable: !1,
|
|
3919
|
-
isDateDisabled:
|
|
3920
|
-
dateTestId:
|
|
3934
|
+
isDateDisabled: _,
|
|
3935
|
+
dateTestId: x,
|
|
3921
3936
|
hoverHighlightDirection: void 0
|
|
3922
3937
|
}
|
|
3923
3938
|
),
|
|
3924
|
-
|
|
3939
|
+
re === "month-picker" && /* @__PURE__ */ s(
|
|
3925
3940
|
Ue,
|
|
3926
3941
|
{
|
|
3927
|
-
firstMonth:
|
|
3928
|
-
numMonths:
|
|
3929
|
-
value:
|
|
3930
|
-
size:
|
|
3942
|
+
firstMonth: w,
|
|
3943
|
+
numMonths: h,
|
|
3944
|
+
value: se,
|
|
3945
|
+
size: k,
|
|
3931
3946
|
localeCode: n,
|
|
3932
|
-
onValueChange: (
|
|
3933
|
-
|
|
3947
|
+
onValueChange: (le) => {
|
|
3948
|
+
je(le), Ce("calendar"), me.current?.focus();
|
|
3934
3949
|
},
|
|
3935
3950
|
onCancel: () => {
|
|
3936
|
-
|
|
3951
|
+
Ce("calendar"), me.current?.focus();
|
|
3937
3952
|
}
|
|
3938
3953
|
}
|
|
3939
3954
|
),
|
|
3940
|
-
|
|
3955
|
+
m?.({ hideCalendar: U })
|
|
3941
3956
|
] })
|
|
3942
3957
|
}
|
|
3943
3958
|
)
|
|
@@ -3946,7 +3961,7 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
3946
3961
|
]
|
|
3947
3962
|
}
|
|
3948
3963
|
);
|
|
3949
|
-
},
|
|
3964
|
+
}, ns = ({
|
|
3950
3965
|
value: e,
|
|
3951
3966
|
onValueChange: t,
|
|
3952
3967
|
label: r,
|
|
@@ -3961,90 +3976,92 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
3961
3976
|
numMonthsInMonthPicker: f = 12,
|
|
3962
3977
|
isDateDisabled: h,
|
|
3963
3978
|
prevMonthDisabled: _,
|
|
3964
|
-
nextMonthDisabled:
|
|
3979
|
+
nextMonthDisabled: p,
|
|
3965
3980
|
firstMonthInMonthPicker: y = /* @__PURE__ */ new Date(),
|
|
3966
|
-
dateTestId:
|
|
3967
|
-
size:
|
|
3968
|
-
previousMonthButtonTestId:
|
|
3969
|
-
nextMonthButtonTestId:
|
|
3970
|
-
textInputVariant:
|
|
3981
|
+
dateTestId: w,
|
|
3982
|
+
size: D = "medium",
|
|
3983
|
+
previousMonthButtonTestId: g,
|
|
3984
|
+
nextMonthButtonTestId: b,
|
|
3985
|
+
textInputVariant: m = "standard",
|
|
3986
|
+
autoFocus: k
|
|
3971
3987
|
}) => {
|
|
3972
|
-
const
|
|
3988
|
+
const x = Lr(
|
|
3973
3989
|
e,
|
|
3974
3990
|
t,
|
|
3975
3991
|
n,
|
|
3976
3992
|
a,
|
|
3977
3993
|
o
|
|
3978
3994
|
), {
|
|
3979
|
-
visiblePanel:
|
|
3980
|
-
visibleMonth:
|
|
3981
|
-
onValueChangeByInputs:
|
|
3982
|
-
setVisibleMonth:
|
|
3983
|
-
setVisiblePanel:
|
|
3984
|
-
monthPickerButtonRef:
|
|
3985
|
-
selectedDate:
|
|
3986
|
-
} =
|
|
3987
|
-
return /* @__PURE__ */
|
|
3995
|
+
visiblePanel: S,
|
|
3996
|
+
visibleMonth: N,
|
|
3997
|
+
onValueChangeByInputs: B,
|
|
3998
|
+
setVisibleMonth: R,
|
|
3999
|
+
setVisiblePanel: A,
|
|
4000
|
+
monthPickerButtonRef: H,
|
|
4001
|
+
selectedDate: E
|
|
4002
|
+
} = x;
|
|
4003
|
+
return /* @__PURE__ */ T(Z, { gap: 3, children: [
|
|
3988
4004
|
d && /* @__PURE__ */ s(He, { variant: "h2", as: u, children: d }),
|
|
3989
4005
|
/* @__PURE__ */ s(
|
|
3990
|
-
|
|
4006
|
+
Er,
|
|
3991
4007
|
{
|
|
3992
|
-
...
|
|
4008
|
+
...x,
|
|
3993
4009
|
value: e,
|
|
3994
|
-
onValueChange:
|
|
4010
|
+
onValueChange: B,
|
|
3995
4011
|
localeCode: n,
|
|
3996
4012
|
label: r,
|
|
3997
|
-
calendarSize:
|
|
4013
|
+
calendarSize: D,
|
|
3998
4014
|
placeholderWhenBlurred: c,
|
|
3999
|
-
variant:
|
|
4000
|
-
readOnlyOnMobile: !1
|
|
4015
|
+
variant: m,
|
|
4016
|
+
readOnlyOnMobile: !1,
|
|
4017
|
+
autoFocus: k
|
|
4001
4018
|
}
|
|
4002
4019
|
),
|
|
4003
4020
|
/* @__PURE__ */ s(
|
|
4004
|
-
|
|
4021
|
+
st,
|
|
4005
4022
|
{
|
|
4006
|
-
...
|
|
4023
|
+
...x,
|
|
4007
4024
|
previousMonthButtonAriaLabel: i,
|
|
4008
4025
|
nextMonthButtonAriaLabel: l,
|
|
4009
|
-
calendarSize:
|
|
4026
|
+
calendarSize: D,
|
|
4010
4027
|
prevMonthDisabled: _,
|
|
4011
|
-
nextMonthDisabled:
|
|
4012
|
-
previousMonthButtonTestId:
|
|
4013
|
-
nextMonthButtonTestId:
|
|
4028
|
+
nextMonthDisabled: p,
|
|
4029
|
+
previousMonthButtonTestId: g,
|
|
4030
|
+
nextMonthButtonTestId: b
|
|
4014
4031
|
}
|
|
4015
4032
|
),
|
|
4016
|
-
|
|
4017
|
-
|
|
4033
|
+
S === "calendar" && /* @__PURE__ */ s(
|
|
4034
|
+
it,
|
|
4018
4035
|
{
|
|
4019
|
-
...
|
|
4020
|
-
size:
|
|
4021
|
-
selectedStartDate:
|
|
4022
|
-
selectedEndDate:
|
|
4023
|
-
isValidDateRange: !!
|
|
4036
|
+
...x,
|
|
4037
|
+
size: D,
|
|
4038
|
+
selectedStartDate: E,
|
|
4039
|
+
selectedEndDate: E,
|
|
4040
|
+
isValidDateRange: !!E,
|
|
4024
4041
|
isDateDisabled: h,
|
|
4025
4042
|
multiSelectable: !1,
|
|
4026
|
-
dateTestId:
|
|
4043
|
+
dateTestId: w,
|
|
4027
4044
|
hoverHighlightDirection: void 0
|
|
4028
4045
|
}
|
|
4029
4046
|
),
|
|
4030
|
-
|
|
4047
|
+
S === "month-picker" && /* @__PURE__ */ s(
|
|
4031
4048
|
Ue,
|
|
4032
4049
|
{
|
|
4033
4050
|
firstMonth: y,
|
|
4034
4051
|
numMonths: f,
|
|
4035
|
-
value:
|
|
4052
|
+
value: N,
|
|
4036
4053
|
localeCode: a,
|
|
4037
|
-
size:
|
|
4038
|
-
onValueChange: (
|
|
4039
|
-
|
|
4054
|
+
size: D,
|
|
4055
|
+
onValueChange: (P) => {
|
|
4056
|
+
R(P), A("calendar"), H.current?.focus();
|
|
4040
4057
|
},
|
|
4041
4058
|
onCancel: () => {
|
|
4042
|
-
|
|
4059
|
+
A("calendar"), H.current?.focus();
|
|
4043
4060
|
}
|
|
4044
4061
|
}
|
|
4045
4062
|
)
|
|
4046
4063
|
] });
|
|
4047
|
-
},
|
|
4064
|
+
}, as = ({
|
|
4048
4065
|
value: e,
|
|
4049
4066
|
onValueChange: t,
|
|
4050
4067
|
startDateLabel: r,
|
|
@@ -4059,180 +4076,184 @@ const Tr = (e, t, r, n, a, o, i, l, c) => {
|
|
|
4059
4076
|
numMonthsInMonthPicker: f = 12,
|
|
4060
4077
|
isDateDisabled: h,
|
|
4061
4078
|
prevMonthDisabled: _,
|
|
4062
|
-
nextMonthDisabled:
|
|
4079
|
+
nextMonthDisabled: p,
|
|
4063
4080
|
firstMonthInMonthPicker: y = /* @__PURE__ */ new Date(),
|
|
4064
|
-
size:
|
|
4065
|
-
dateTestId:
|
|
4066
|
-
previousMonthButtonTestId:
|
|
4067
|
-
nextMonthButtonTestId:
|
|
4068
|
-
placeholderWhenBlurredStartDate:
|
|
4081
|
+
size: w = "medium",
|
|
4082
|
+
dateTestId: D,
|
|
4083
|
+
previousMonthButtonTestId: g,
|
|
4084
|
+
nextMonthButtonTestId: b,
|
|
4085
|
+
placeholderWhenBlurredStartDate: m,
|
|
4069
4086
|
placeholderWhenBlurredEndDate: k,
|
|
4070
|
-
textInputVariant:
|
|
4087
|
+
textInputVariant: x = "standard",
|
|
4088
|
+
autoFocusStartDate: S,
|
|
4089
|
+
autoFocusEndDate: N
|
|
4071
4090
|
}) => {
|
|
4072
|
-
const [
|
|
4073
|
-
|
|
4074
|
-
}, []),
|
|
4091
|
+
const [B, R] = C(void 0), A = $(null), H = $(null), E = v((Y) => {
|
|
4092
|
+
Y === "startDate" ? A.current?.focus() : Y === "endDate" && H.current?.focus();
|
|
4093
|
+
}, []), P = Nr(
|
|
4075
4094
|
e,
|
|
4076
4095
|
t,
|
|
4077
4096
|
a,
|
|
4078
4097
|
o,
|
|
4079
4098
|
i,
|
|
4080
|
-
|
|
4099
|
+
B,
|
|
4100
|
+
R,
|
|
4081
4101
|
E,
|
|
4082
|
-
A,
|
|
4083
4102
|
void 0
|
|
4084
|
-
),
|
|
4085
|
-
|
|
4103
|
+
), K = v((Y) => {
|
|
4104
|
+
R(Y);
|
|
4086
4105
|
}, []), {
|
|
4087
|
-
visiblePanel:
|
|
4088
|
-
visibleMonth:
|
|
4089
|
-
onValueChangeByInputs:
|
|
4090
|
-
setVisibleMonth:
|
|
4091
|
-
setVisiblePanel:
|
|
4092
|
-
monthPickerButtonRef:
|
|
4093
|
-
} =
|
|
4094
|
-
return /* @__PURE__ */
|
|
4106
|
+
visiblePanel: J,
|
|
4107
|
+
visibleMonth: M,
|
|
4108
|
+
onValueChangeByInputs: q,
|
|
4109
|
+
setVisibleMonth: U,
|
|
4110
|
+
setVisiblePanel: V,
|
|
4111
|
+
monthPickerButtonRef: W
|
|
4112
|
+
} = P;
|
|
4113
|
+
return /* @__PURE__ */ T(Z, { gap: 3, children: [
|
|
4095
4114
|
d && /* @__PURE__ */ s(He, { variant: "h2", as: u, children: d }),
|
|
4096
4115
|
/* @__PURE__ */ s(
|
|
4097
|
-
|
|
4116
|
+
Tr,
|
|
4098
4117
|
{
|
|
4099
|
-
...
|
|
4118
|
+
...P,
|
|
4100
4119
|
value: e,
|
|
4101
|
-
onValueChange:
|
|
4102
|
-
startDateRef:
|
|
4103
|
-
endDateRef:
|
|
4120
|
+
onValueChange: q,
|
|
4121
|
+
startDateRef: A,
|
|
4122
|
+
endDateRef: H,
|
|
4104
4123
|
localeCode: a,
|
|
4105
4124
|
startDateLabel: r,
|
|
4106
4125
|
endDateLabel: n,
|
|
4107
|
-
onFocus:
|
|
4108
|
-
calendarSize:
|
|
4109
|
-
placeholderWhenBlurredStartDate:
|
|
4126
|
+
onFocus: K,
|
|
4127
|
+
calendarSize: w,
|
|
4128
|
+
placeholderWhenBlurredStartDate: m,
|
|
4110
4129
|
placeholderWhenBlurredEndDate: k,
|
|
4111
|
-
variant:
|
|
4130
|
+
variant: x,
|
|
4131
|
+
autoFocusStartDate: S,
|
|
4132
|
+
autoFocusEndDate: N,
|
|
4112
4133
|
readOnlyOnMobile: !1
|
|
4113
4134
|
}
|
|
4114
4135
|
),
|
|
4115
4136
|
/* @__PURE__ */ s(
|
|
4116
|
-
|
|
4137
|
+
st,
|
|
4117
4138
|
{
|
|
4118
|
-
...
|
|
4139
|
+
...P,
|
|
4119
4140
|
previousMonthButtonAriaLabel: l,
|
|
4120
4141
|
nextMonthButtonAriaLabel: c,
|
|
4121
|
-
calendarSize:
|
|
4142
|
+
calendarSize: w,
|
|
4122
4143
|
prevMonthDisabled: _,
|
|
4123
|
-
nextMonthDisabled:
|
|
4124
|
-
previousMonthButtonTestId:
|
|
4125
|
-
nextMonthButtonTestId:
|
|
4144
|
+
nextMonthDisabled: p,
|
|
4145
|
+
previousMonthButtonTestId: g,
|
|
4146
|
+
nextMonthButtonTestId: b
|
|
4126
4147
|
}
|
|
4127
4148
|
),
|
|
4128
|
-
|
|
4129
|
-
|
|
4149
|
+
J === "calendar" && /* @__PURE__ */ s(
|
|
4150
|
+
it,
|
|
4130
4151
|
{
|
|
4131
|
-
...
|
|
4132
|
-
size:
|
|
4152
|
+
...P,
|
|
4153
|
+
size: w,
|
|
4133
4154
|
multiSelectable: !0,
|
|
4134
4155
|
isDateDisabled: h,
|
|
4135
|
-
dateTestId:
|
|
4156
|
+
dateTestId: D
|
|
4136
4157
|
}
|
|
4137
4158
|
),
|
|
4138
|
-
|
|
4159
|
+
J === "month-picker" && /* @__PURE__ */ s(
|
|
4139
4160
|
Ue,
|
|
4140
4161
|
{
|
|
4141
4162
|
firstMonth: y,
|
|
4142
4163
|
numMonths: f,
|
|
4143
|
-
value:
|
|
4144
|
-
size:
|
|
4164
|
+
value: M,
|
|
4165
|
+
size: w,
|
|
4145
4166
|
localeCode: o,
|
|
4146
|
-
onValueChange: (
|
|
4147
|
-
|
|
4167
|
+
onValueChange: (Y) => {
|
|
4168
|
+
U(Y), V("calendar"), W.current?.focus();
|
|
4148
4169
|
},
|
|
4149
4170
|
onCancel: () => {
|
|
4150
|
-
|
|
4171
|
+
V("calendar"), W.current?.focus();
|
|
4151
4172
|
}
|
|
4152
4173
|
}
|
|
4153
4174
|
)
|
|
4154
4175
|
] });
|
|
4155
|
-
},
|
|
4156
|
-
const e =
|
|
4157
|
-
return
|
|
4158
|
-
(t) => !
|
|
4176
|
+
}, os = () => {
|
|
4177
|
+
const e = Ie();
|
|
4178
|
+
return v(
|
|
4179
|
+
(t) => !F(t, e) && Te(t, e),
|
|
4159
4180
|
[e]
|
|
4160
4181
|
);
|
|
4161
|
-
},
|
|
4162
|
-
const e =
|
|
4163
|
-
return
|
|
4164
|
-
(t) => ge(e, t) ||
|
|
4182
|
+
}, ss = () => {
|
|
4183
|
+
const e = Ie();
|
|
4184
|
+
return v(
|
|
4185
|
+
(t) => ge(e, t) || Te(t, e),
|
|
4165
4186
|
[e]
|
|
4166
4187
|
);
|
|
4167
4188
|
};
|
|
4168
4189
|
export {
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4190
|
+
gt as Calendar,
|
|
4191
|
+
vr as CalendarDay,
|
|
4192
|
+
Ko as DateInput,
|
|
4193
|
+
zo as DateRangeCalendar,
|
|
4194
|
+
es as DateRangeDualTextInput,
|
|
4195
|
+
Go as DateRangeInput,
|
|
4196
|
+
Jo as DateTextInput,
|
|
4197
|
+
Qo as DateTimeInput,
|
|
4198
|
+
yn as Month,
|
|
4178
4199
|
Ue as MonthPicker,
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4200
|
+
jo as MultiDateCalendar,
|
|
4201
|
+
Gn as PresetPicker,
|
|
4202
|
+
Cr as SingleDateCalendar,
|
|
4203
|
+
qo as SingleWeekCalendar,
|
|
4204
|
+
Zo as TimeTextInput,
|
|
4205
|
+
ns as TravelDateCalendar,
|
|
4206
|
+
rs as TravelDateInput,
|
|
4207
|
+
as as TravelDateRangeCalendar,
|
|
4208
|
+
ts as TravelDateRangeInput,
|
|
4209
|
+
wn as WeekDay,
|
|
4210
|
+
Tn as WeekDayCell,
|
|
4211
|
+
En as WeekNumberCell,
|
|
4212
|
+
Xo as YearPicker,
|
|
4192
4213
|
he as addDayStateHighlights,
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4214
|
+
br as addDayStateHighlightsOnSingleDay,
|
|
4215
|
+
bn as addWeekRangeHighlights,
|
|
4216
|
+
Ho as addWeekStateHighlights,
|
|
4196
4217
|
Ye as buildDayStateForDateRange,
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4218
|
+
mn as buildDayStateForRange,
|
|
4219
|
+
pn as buildDayStateForSingleMonth,
|
|
4220
|
+
Cn as calculateOverflowingMonth,
|
|
4221
|
+
kn as createDay,
|
|
4222
|
+
ta as dateRangeToStrings,
|
|
4223
|
+
Mn as dayHasHighlight,
|
|
4203
4224
|
_e as dayHighlightSelect,
|
|
4204
4225
|
ke as defaultCalendarTheme,
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4226
|
+
Rn as defaultTextPropsProvider,
|
|
4227
|
+
In as defaultWrapperStyleProvider,
|
|
4228
|
+
Wo as extranetCalendarTheme,
|
|
4229
|
+
wr as fallbackLocaleCode,
|
|
4230
|
+
Oo as fallbackLocaleCodeForFormatting,
|
|
4210
4231
|
be as formatLocalizedDate,
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4232
|
+
Ne as getDateFormatForLocaleCode,
|
|
4233
|
+
xn as getDaysForWeekForDate,
|
|
4234
|
+
$o as getDefaultLocaleForFormatting,
|
|
4235
|
+
Un as getLocaleCodeForLocale,
|
|
4236
|
+
Me as getLocaleForLocaleCode,
|
|
4237
|
+
at as getMonthInYear,
|
|
4238
|
+
Gt as getMonthsInYear,
|
|
4239
|
+
Dr as getSupportedLocaleCode,
|
|
4240
|
+
$n as getSupportedLocaleCodeMatchingLanguage,
|
|
4241
|
+
Rt as getWeekForDate,
|
|
4242
|
+
Dn as getWeeksForMonth,
|
|
4243
|
+
kr as isDateRangeInvalid,
|
|
4244
|
+
ce as parseLocalizedDateString,
|
|
4245
|
+
bt as reformatLocalizedDateString,
|
|
4246
|
+
Po as setDayStateValue,
|
|
4247
|
+
Yo as setDayStateValueFunction,
|
|
4248
|
+
ra as stringsToDateRange,
|
|
4249
|
+
Uo as toggleDateStringsIfEndIsEarlierThanStart,
|
|
4250
|
+
xr as toggleDatesIfEndIsEarlierThanStart,
|
|
4251
|
+
Vo as useDateRangeCalendarState,
|
|
4252
|
+
aa as useDateRangeSelection,
|
|
4253
|
+
os as useDisabledBeforeToday,
|
|
4254
|
+
sa as useMultiDateSelection,
|
|
4255
|
+
ss as usePrevMonthDisabledBeforeToday,
|
|
4256
|
+
oa as useSingleDateSelection,
|
|
4257
|
+
ia as useSingleWeekSelection
|
|
4237
4258
|
};
|
|
4238
4259
|
//# sourceMappingURL=index.es.js.map
|