@stenajs-webui/calendar 21.1.0 → 21.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/TravelDateSingleTextInputField.d.ts +2 -0
- package/dist/features/travel-calendar/components/TravelDateTextInput.d.ts +2 -0
- package/dist/features/travel-calendar/components/TravelDateTextInputFields.d.ts +4 -0
- package/dist/features/travel-calendar/hooks/UseTravelDateInput.d.ts +1 -0
- package/dist/features/travel-calendar/hooks/UseTravelDateRangeInput.d.ts +2 -0
- package/dist/features/travel-calendar/util/DateDescriptionFormatter.d.ts +3 -0
- package/dist/index.es.js +1573 -1509
- 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,19 +1,19 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._calendar_1b766_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-red);--swui-calendar-wrapper-selected-background: var(--modern-red);--swui-calendar-wrapper-range-border: var(--lhds-color-red-100);--swui-calendar-wrapper-range-background: var(--lhds-color-red-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_1b766_1 table{border-spacing:0 4px}._calendar_1b766_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_1b766_1._weekNumberVisible_1b766_41 tr td:nth-child(2),._calendar_1b766_1:not(._weekNumberVisible_1b766_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_1b766_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_h6vcn_1{position:relative}._travelDateCell_h6vcn_1._small_h6vcn_4{width:40px;height:40px}._travelDateCell_h6vcn_1._medium_h6vcn_9{width:48px;height:48px}._travelDateCell_h6vcn_1._large_h6vcn_14{width:56px;height:28px}._travelDateCell_h6vcn_1{border-radius:var(--swui-max-border-radius)}._travelDateCell_h6vcn_1:focus{outline:none}._travelDateCell_h6vcn_1:focus-visible ._outline_h6vcn_26{outline:var(--swui-focus-outline);outline-width:var(--swui-focus-outline-width);background:transparent;position:absolute;border-radius:var(--swui-max-border-radius);top:0;bottom:0;left:0;right:0;z-index:10}._travelDateCell_h6vcn_1:focus-visible ._contentWrapper_h6vcn_39._contentWrapper_h6vcn_39._contentWrapper_h6vcn_39{border-color:transparent}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39{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;left:0;right:0;top:0;bottom:0}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._disabled_h6vcn_60{cursor:not-allowed}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._isToday_h6vcn_63{border-color:var(--lhds-color-ui-400)}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._isSelectionStart_h6vcn_67,._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._isSelectionEnd_h6vcn_68{border-color:var(--modern-red)}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._isSelectionStart_h6vcn_67{background:var(--modern-red)}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._isSelectionStart_h6vcn_67 span{color:#fff}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._isSelectionEnd_h6vcn_68:not(._isSelectionStart_h6vcn_67){background:#fff}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._hover_h6vcn_83{border-color:var(--modern-red)}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._hover_h6vcn_83._startSelected_h6vcn_86:not(._endSelected_h6vcn_86):not(._isSelectionStart_h6vcn_67){background:#fff}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._hover_h6vcn_83._startSelected_h6vcn_86:not(._endSelected_h6vcn_86):not(._isSelectionStart_h6vcn_67) span{color:var(--swui-text-primary-color)}._travelDateCellBackground_1k07m_1._small_1k07m_2{width:20px;height:40px}._travelDateCellBackground_1k07m_1._medium_1k07m_7{width:24px;height:48px}._travelDateCellBackground_1k07m_1._large_1k07m_12{width:28px;height:56px}._travelCalendar_18pjj_1{border-spacing:0 4px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}._travelCalendar_18pjj_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(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { Box as
|
|
4
|
-
import { FlatButton as
|
|
5
|
-
import { isAfter as
|
|
6
|
-
import { enGB as
|
|
7
|
-
import { last as
|
|
8
|
-
import * as
|
|
9
|
-
import { useMemo as
|
|
2
|
+
import { jsx as c, jsxs as _, Fragment as de } from "react/jsx-runtime";
|
|
3
|
+
import { Box as L, Text as wt, Clickable as Ee, Row as B, Spacing as er, Column as J, Heading as Lt, exhaustSwitchCase as ue, Space as kt, Indent as xt, SeparatorLine as rr, parseIntElseUndefined as Me, useBoolean as se, useDelayedFalse as ke, useOnClickOutside as Ae } from "@stenajs-webui/core";
|
|
4
|
+
import { FlatButton as tt, stenaAngleDown as fe, PrimaryButton as St, stenaAngleLeft as nr, stenaAngleRight as sr, SecondaryButton as ut, stenaAngleLeftDouble as ir, stenaArrowLeft as Ct, stenaArrowRight as Pt, stenaAngleRightDouble as or, TextInputButton as cr, stenaCalendar as Et, Icon as _e, stenaArrowWideRight as ar, stenaClock as Ne, stenaAngleUp as lr, CardBody as Le } from "@stenajs-webui/elements";
|
|
5
|
+
import { isAfter as V, eachDayOfInterval as Pe, isSameDay as P, endOfMonth as Ye, startOfMonth as Be, min as dr, addDays as Z, max as ur, subDays as ht, format as v, getISOWeek as he, getDate as Kt, startOfWeek as Ut, addWeeks as fr, getMonth as mt, getWeek as ve, getYear as At, getISODay as hr, addHours as He, isBefore as ot, parse as pt, addMonths as Yt, isSameMonth as ct, addYears as mr, subMonths as me, subYears as gr, setWeek as pr, isValid as Dr, isSameYear as br } from "date-fns";
|
|
6
|
+
import { enGB as zt, enUS as wr, deAT as yr, de as Se, fr as Mr, es as kr, sv as Sr, pl as Tr, da as Rr, nl as Ir, nb as xr } from "date-fns/locale";
|
|
7
|
+
import { last as Er, startCase as _t, chunk as We, debounce as Ar, padStart as _r, range as ge } from "lodash-es";
|
|
8
|
+
import * as pe from "react";
|
|
9
|
+
import { useMemo as x, useRef as W, useEffect as rt, useCallback as D, useId as De, useState as I, useLayoutEffect as $e } from "react";
|
|
10
10
|
import Dt from "classnames";
|
|
11
|
-
import
|
|
12
|
-
import { TextInput as bt, TextInputBox as
|
|
13
|
-
import { ControlledPopover as
|
|
14
|
-
import { cssColor as
|
|
15
|
-
import { useMaskedInput as
|
|
16
|
-
const
|
|
11
|
+
import Vt from "@emotion/styled";
|
|
12
|
+
import { TextInput as bt, TextInputBox as Nr, LabelledTextInput as Lr } from "@stenajs-webui/forms";
|
|
13
|
+
import { ControlledPopover as Bt } from "@stenajs-webui/tooltip";
|
|
14
|
+
import { cssColor as qt } from "@stenajs-webui/theme";
|
|
15
|
+
import { useMaskedInput as Pr } from "@stenajs-webui/input-mask";
|
|
16
|
+
const at = {
|
|
17
17
|
yearAndMonth: "yyyy-MM",
|
|
18
18
|
fullDate: "yyyy-MM-dd",
|
|
19
19
|
fullMonthName: "LLLL",
|
|
@@ -27,29 +27,29 @@ const ot = {
|
|
|
27
27
|
// 2 Jan
|
|
28
28
|
monthAndDate: "MMM do"
|
|
29
29
|
// Jan 2nd
|
|
30
|
-
},
|
|
31
|
-
if (e && r &&
|
|
32
|
-
return
|
|
30
|
+
}, Nt = (t = {}, e, r) => {
|
|
31
|
+
if (e && r && V(r, e))
|
|
32
|
+
return Pe({ start: e, end: r }).reduce(
|
|
33
33
|
(s, i) => {
|
|
34
|
-
const
|
|
35
|
-
return
|
|
34
|
+
const o = P(i, e), a = P(i, r);
|
|
35
|
+
return ft(s, i, o ? ["selected", "selectedStart", "range"] : a ? ["selected", "selectedEnd", "range"] : ["range"]);
|
|
36
36
|
},
|
|
37
37
|
t
|
|
38
38
|
);
|
|
39
39
|
let n = t;
|
|
40
|
-
return e && (n =
|
|
41
|
-
},
|
|
40
|
+
return e && (n = ft(n, e, ["selected", "singleSelected"])), r && (n = ft(n, r, ["selected", "singleSelected"])), n;
|
|
41
|
+
}, Yr = (t = {}, e, r, n) => Br(
|
|
42
42
|
t,
|
|
43
43
|
e,
|
|
44
44
|
r,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
),
|
|
45
|
+
Be(n),
|
|
46
|
+
Ye(n)
|
|
47
|
+
), Br = (t = {}, e, r, n, s) => e && r ? Nt(
|
|
48
48
|
t,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
) :
|
|
52
|
-
const n =
|
|
49
|
+
ur([e, ht(n, 1)]),
|
|
50
|
+
dr([r, Z(s, 1)])
|
|
51
|
+
) : Nt(t, e, r), Fs = (t, e, r) => {
|
|
52
|
+
const n = v(e, at.yearAndMonth), s = he(e), i = Kt(e);
|
|
53
53
|
return {
|
|
54
54
|
...t,
|
|
55
55
|
[n]: {
|
|
@@ -63,8 +63,8 @@ const ot = {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
|
-
},
|
|
67
|
-
const n =
|
|
66
|
+
}, js = (t, e, r) => {
|
|
67
|
+
const n = v(e, at.yearAndMonth), s = he(e), i = Kt(e);
|
|
68
68
|
return {
|
|
69
69
|
...t,
|
|
70
70
|
[n]: {
|
|
@@ -80,28 +80,28 @@ const ot = {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
|
-
},
|
|
84
|
-
const n = e.getMonth() + 1, s = `${e.getFullYear()}-${n < 10 ? "0" : ""}${n}`, i =
|
|
83
|
+
}, ft = (t, e, r) => {
|
|
84
|
+
const n = e.getMonth() + 1, s = `${e.getFullYear()}-${n < 10 ? "0" : ""}${n}`, i = he(e), o = Kt(e), a = t && t[s] && t[s][i] && t[s][i][o];
|
|
85
85
|
return {
|
|
86
86
|
...t,
|
|
87
87
|
[s]: {
|
|
88
88
|
...t && t[s],
|
|
89
89
|
[i]: {
|
|
90
90
|
...t && t[s] && t[s][i],
|
|
91
|
-
[
|
|
91
|
+
[o]: Oe(a, r)
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
-
},
|
|
95
|
+
}, Oe = (t, e) => ({
|
|
96
96
|
...t,
|
|
97
97
|
highlights: [...(t == null ? void 0 : t.highlights) ?? [], ...e]
|
|
98
|
-
}),
|
|
99
|
-
const n = e.days[0].date, s = n.getMonth() + 1, i = `${n.getFullYear()}-${s < 10 ? "0" : ""}${s}`,
|
|
98
|
+
}), Cs = (t, e, r) => {
|
|
99
|
+
const n = e.days[0].date, s = n.getMonth() + 1, i = `${n.getFullYear()}-${s < 10 ? "0" : ""}${s}`, o = e.weekNumber;
|
|
100
100
|
let a = t;
|
|
101
|
-
e.days.forEach((
|
|
102
|
-
a =
|
|
101
|
+
e.days.forEach((m) => {
|
|
102
|
+
a = ft(a, m.date, r);
|
|
103
103
|
});
|
|
104
|
-
const l = a && a[i] ? a[i][
|
|
104
|
+
const l = a && a[i] ? a[i][o] : void 0, d = l && l.highlights ? [...l.highlights, ...r] : r, u = {
|
|
105
105
|
...l,
|
|
106
106
|
highlights: d
|
|
107
107
|
};
|
|
@@ -109,81 +109,81 @@ const ot = {
|
|
|
109
109
|
...a,
|
|
110
110
|
[i]: {
|
|
111
111
|
...t && t[i],
|
|
112
|
-
[
|
|
112
|
+
[o]: u
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
|
-
},
|
|
115
|
+
}, vr = (t, e) => {
|
|
116
116
|
var s;
|
|
117
117
|
if (!e.days.length)
|
|
118
118
|
return { ...t };
|
|
119
|
-
const r = e.days[0].date, n = (s =
|
|
119
|
+
const r = e.days[0].date, n = (s = Er(e.days)) == null ? void 0 : s.date;
|
|
120
120
|
return {
|
|
121
|
-
...
|
|
121
|
+
...Nt(t, r, n)
|
|
122
122
|
};
|
|
123
|
-
},
|
|
124
|
-
var
|
|
125
|
-
const
|
|
123
|
+
}, Hr = (t, e) => x(() => t ? ft(e, /* @__PURE__ */ new Date(), ["today"]) : e, [t, e]);
|
|
124
|
+
var Wr = /* @__PURE__ */ ((t) => (t[t.JANUARY = 0] = "JANUARY", t[t.FEBRUARY = 1] = "FEBRUARY", t[t.MARCH = 2] = "MARCH", t[t.APRIL = 3] = "APRIL", t[t.MAY = 4] = "MAY", t[t.JUNE = 5] = "JUNE", t[t.JULY = 6] = "JULY", t[t.AUGUST = 7] = "AUGUST", t[t.SEPTEMBER = 8] = "SEPTEMBER", t[t.OCTOBER = 9] = "OCTOBER", t[t.NOVEMBER = 10] = "NOVEMBER", t[t.DECEMBER = 11] = "DECEMBER", t))(Wr || {}), $r = /* @__PURE__ */ ((t) => (t[t.SUNDAY = 0] = "SUNDAY", t[t.MONDAY = 1] = "MONDAY", t[t.TUESDAY = 2] = "TUESDAY", t[t.WEDNESDAY = 3] = "WEDNESDAY", t[t.THURSDAY = 4] = "THURSDAY", t[t.FRIDAY = 5] = "FRIDAY", t[t.SATURDAY = 6] = "SATURDAY", t))($r || {});
|
|
125
|
+
const Te = (t, e, r, n) => {
|
|
126
126
|
const s = [];
|
|
127
127
|
for (let i = 0; i < r; i++)
|
|
128
|
-
s.push(
|
|
128
|
+
s.push(Jt(t, e + i, n));
|
|
129
129
|
return s;
|
|
130
|
-
},
|
|
130
|
+
}, Jt = (t, e, r) => {
|
|
131
131
|
if (isNaN(t) || isNaN(e))
|
|
132
132
|
throw new Error("getMonthInYear() received NaN.");
|
|
133
133
|
const n = t + Math.floor(e / 12), s = e % 12, i = new Date(n, s, 1);
|
|
134
134
|
return {
|
|
135
|
-
monthString:
|
|
136
|
-
name:
|
|
137
|
-
|
|
135
|
+
monthString: v(i, at.yearAndMonth),
|
|
136
|
+
name: _t(
|
|
137
|
+
v(i, at.fullMonthName, { locale: r })
|
|
138
138
|
),
|
|
139
139
|
year: n,
|
|
140
140
|
monthInYear: s,
|
|
141
|
-
weeks:
|
|
141
|
+
weeks: Or(n, s, r)
|
|
142
142
|
};
|
|
143
|
-
},
|
|
144
|
-
const s = new Date(t, e, 1), i =
|
|
143
|
+
}, Or = (t, e, r, n = !0) => {
|
|
144
|
+
const s = new Date(t, e, 1), i = Ut(s, { locale: r }), o = [];
|
|
145
145
|
for (let a = 0; a < 6; a++) {
|
|
146
|
-
const l =
|
|
146
|
+
const l = be(fr(i, a), r);
|
|
147
147
|
if (a > 0 && l.startMonth !== e && !n)
|
|
148
|
-
return
|
|
149
|
-
|
|
148
|
+
return o;
|
|
149
|
+
o.push(l);
|
|
150
150
|
}
|
|
151
|
-
return
|
|
152
|
-
},
|
|
153
|
-
const r = mt(
|
|
151
|
+
return o;
|
|
152
|
+
}, be = (t, e) => {
|
|
153
|
+
const r = mt(Z(t, 7)) !== mt(t);
|
|
154
154
|
return {
|
|
155
|
-
weekNumber:
|
|
155
|
+
weekNumber: ve(t, { locale: e }),
|
|
156
156
|
startMonth: mt(t),
|
|
157
|
-
startYear:
|
|
158
|
-
endMonth: mt(
|
|
159
|
-
endYear:
|
|
160
|
-
days:
|
|
157
|
+
startYear: At(t),
|
|
158
|
+
endMonth: mt(Z(t, 6)),
|
|
159
|
+
endYear: At(Z(t, 6)),
|
|
160
|
+
days: Fr(t, e),
|
|
161
161
|
isLastWeekOfMonth: r
|
|
162
162
|
};
|
|
163
|
-
},
|
|
164
|
-
const r =
|
|
163
|
+
}, Ur = (t, e) => {
|
|
164
|
+
const r = hr(t);
|
|
165
165
|
return {
|
|
166
166
|
date: t,
|
|
167
|
-
name:
|
|
168
|
-
fullName:
|
|
169
|
-
dateString:
|
|
170
|
-
weekNumber:
|
|
171
|
-
year:
|
|
167
|
+
name: v(t, "EEE", e ? { locale: e } : void 0),
|
|
168
|
+
fullName: v(t, "EEEE", e ? { locale: e } : void 0),
|
|
169
|
+
dateString: v(He(t, 12), at.fullDate),
|
|
170
|
+
weekNumber: ve(t, { locale: e }),
|
|
171
|
+
year: At(t),
|
|
172
172
|
month: mt(t),
|
|
173
|
-
dayOfMonth:
|
|
173
|
+
dayOfMonth: Kt(t),
|
|
174
174
|
dayOfWeek: r,
|
|
175
175
|
isFirstDayOfWeek: r === 1,
|
|
176
176
|
isLastDayOfWeek: r === 7,
|
|
177
|
-
isFirstDayOfMonth:
|
|
178
|
-
isLastDayOfMonth:
|
|
177
|
+
isFirstDayOfMonth: P(Be(t), t),
|
|
178
|
+
isLastDayOfMonth: P(Ye(t), t)
|
|
179
179
|
};
|
|
180
|
-
},
|
|
180
|
+
}, Fr = (t, e) => Pe({
|
|
181
181
|
start: t,
|
|
182
|
-
end:
|
|
183
|
-
}).map((r) =>
|
|
184
|
-
calendar:
|
|
185
|
-
weekNumberVisible:
|
|
186
|
-
},
|
|
182
|
+
end: Z(t, 6)
|
|
183
|
+
}).map((r) => Ur(r, e)), jr = (t, e) => e > 11 ? { year: t + Math.floor(e / 12), month: e % 12 } : e < 0 ? { year: t + Math.floor(e / 12), month: 12 + e % 12 } : { year: t, month: e }, Cr = "_calendar_1b766_1", Kr = "_weekNumberVisible_1b766_41", Re = {
|
|
184
|
+
calendar: Cr,
|
|
185
|
+
weekNumberVisible: Kr
|
|
186
|
+
}, zr = (t, e, r) => !!(e && e.indexOf(r) >= 0 || t && t.highlights && t.highlights.indexOf(r) >= 0), dt = (t, e, r, n, s) => {
|
|
187
187
|
if (r.length !== n.length)
|
|
188
188
|
throw new Error(
|
|
189
189
|
"Select highlight failed, number of values do not equal number of highlights."
|
|
@@ -191,29 +191,29 @@ const Me = (t, e, r, n) => {
|
|
|
191
191
|
if (r.length === 0)
|
|
192
192
|
return s;
|
|
193
193
|
for (let i = 0; i < r.length; i++)
|
|
194
|
-
if (typeof r[i] == "boolean" && r[i] || typeof r[i] == "string" &&
|
|
194
|
+
if (typeof r[i] == "boolean" && r[i] || typeof r[i] == "string" && zr(
|
|
195
195
|
t,
|
|
196
196
|
e,
|
|
197
197
|
r[i]
|
|
198
198
|
))
|
|
199
199
|
return n[i];
|
|
200
200
|
return s;
|
|
201
|
-
},
|
|
201
|
+
}, qr = ({
|
|
202
202
|
selectedBackground: t,
|
|
203
203
|
todayBackground: e,
|
|
204
204
|
rangeBackground: r,
|
|
205
205
|
borderColor: n = "transparent"
|
|
206
|
-
}) => (s, i,
|
|
207
|
-
backgroundColor:
|
|
206
|
+
}) => (s, i, o, a, l) => ({
|
|
207
|
+
backgroundColor: dt(
|
|
208
208
|
i,
|
|
209
209
|
s,
|
|
210
|
-
["selected", "range", "today",
|
|
210
|
+
["selected", "range", "today", o.month === l.monthInYear],
|
|
211
211
|
[t, r, e, "#fff"],
|
|
212
212
|
"transparent"
|
|
213
213
|
),
|
|
214
214
|
borderWidth: "1px",
|
|
215
215
|
borderStyle: "solid",
|
|
216
|
-
borderColor:
|
|
216
|
+
borderColor: dt(
|
|
217
217
|
i,
|
|
218
218
|
s,
|
|
219
219
|
["selectedStart", "selectedEnd", "singleSelected", "range", "today"],
|
|
@@ -226,7 +226,7 @@ const Me = (t, e, r, n) => {
|
|
|
226
226
|
],
|
|
227
227
|
n
|
|
228
228
|
),
|
|
229
|
-
borderTopLeftRadius:
|
|
229
|
+
borderTopLeftRadius: dt(
|
|
230
230
|
i,
|
|
231
231
|
s,
|
|
232
232
|
["selectedStart", "singleSelected", "today"],
|
|
@@ -237,7 +237,7 @@ const Me = (t, e, r, n) => {
|
|
|
237
237
|
],
|
|
238
238
|
"unset"
|
|
239
239
|
),
|
|
240
|
-
borderBottomLeftRadius:
|
|
240
|
+
borderBottomLeftRadius: dt(
|
|
241
241
|
i,
|
|
242
242
|
s,
|
|
243
243
|
["selectedStart", "singleSelected", "today"],
|
|
@@ -248,7 +248,7 @@ const Me = (t, e, r, n) => {
|
|
|
248
248
|
],
|
|
249
249
|
"unset"
|
|
250
250
|
),
|
|
251
|
-
borderTopRightRadius:
|
|
251
|
+
borderTopRightRadius: dt(
|
|
252
252
|
i,
|
|
253
253
|
s,
|
|
254
254
|
["selectedEnd", "singleSelected", "today"],
|
|
@@ -259,7 +259,7 @@ const Me = (t, e, r, n) => {
|
|
|
259
259
|
],
|
|
260
260
|
"unset"
|
|
261
261
|
),
|
|
262
|
-
borderBottomRightRadius:
|
|
262
|
+
borderBottomRightRadius: dt(
|
|
263
263
|
i,
|
|
264
264
|
s,
|
|
265
265
|
["selectedEnd", "singleSelected", "today"],
|
|
@@ -271,15 +271,15 @@ const Me = (t, e, r, n) => {
|
|
|
271
271
|
"unset"
|
|
272
272
|
),
|
|
273
273
|
boxSizing: "border-box"
|
|
274
|
-
}),
|
|
274
|
+
}), Jr = ({
|
|
275
275
|
selectedColor: t,
|
|
276
276
|
disabledColor: e,
|
|
277
277
|
inOtherMonthColor: r,
|
|
278
278
|
rangeTextColor: n
|
|
279
|
-
}) => (s, i,
|
|
280
|
-
const d =
|
|
279
|
+
}) => (s, i, o, a, l) => {
|
|
280
|
+
const d = o.month !== l.monthInYear;
|
|
281
281
|
return {
|
|
282
|
-
color:
|
|
282
|
+
color: dt(
|
|
283
283
|
i,
|
|
284
284
|
s,
|
|
285
285
|
[d, "selected", "range", "enabled", "disabled"],
|
|
@@ -305,12 +305,12 @@ const Me = (t, e, r, n) => {
|
|
|
305
305
|
clickableTextColor: "var(--swui-calendar-week-day-clickable-text-color)"
|
|
306
306
|
},
|
|
307
307
|
CalendarDay: {
|
|
308
|
-
tdStyle:
|
|
308
|
+
tdStyle: qr({
|
|
309
309
|
selectedBackground: "var(--swui-calendar-wrapper-selected-background)",
|
|
310
310
|
rangeBackground: "var(--swui-calendar-wrapper-range-background)",
|
|
311
311
|
todayBackground: "var(--swui-calendar-wrapper-today-background)"
|
|
312
312
|
}),
|
|
313
|
-
textProps:
|
|
313
|
+
textProps: Jr({
|
|
314
314
|
selectedColor: "var(--swui-calendar-text-selected-color)",
|
|
315
315
|
disabledColor: "var(--swui-calendar-text-disabled-color)",
|
|
316
316
|
inOtherMonthColor: "var(--swui-calendar-text-in-other-month-color)"
|
|
@@ -319,23 +319,23 @@ const Me = (t, e, r, n) => {
|
|
|
319
319
|
CalendarMonth: {
|
|
320
320
|
headerTextColor: "var(--swui-calendar-week-day-text-color)"
|
|
321
321
|
}
|
|
322
|
-
},
|
|
322
|
+
}, Ks = {
|
|
323
323
|
...yt,
|
|
324
324
|
width: "37px",
|
|
325
325
|
height: "37px"
|
|
326
|
-
},
|
|
326
|
+
}, Gr = ({
|
|
327
327
|
onClickWeekDay: t,
|
|
328
328
|
day: e,
|
|
329
329
|
theme: r
|
|
330
330
|
}) => {
|
|
331
|
-
const n = /* @__PURE__ */
|
|
332
|
-
|
|
331
|
+
const n = /* @__PURE__ */ c(
|
|
332
|
+
L,
|
|
333
333
|
{
|
|
334
334
|
width: r.width,
|
|
335
335
|
height: r.height,
|
|
336
336
|
justifyContent: "center",
|
|
337
337
|
alignItems: "center",
|
|
338
|
-
children: /* @__PURE__ */
|
|
338
|
+
children: /* @__PURE__ */ c(
|
|
339
339
|
wt,
|
|
340
340
|
{
|
|
341
341
|
size: "small",
|
|
@@ -345,8 +345,8 @@ const Me = (t, e, r, n) => {
|
|
|
345
345
|
)
|
|
346
346
|
}
|
|
347
347
|
);
|
|
348
|
-
return t ? /* @__PURE__ */
|
|
349
|
-
|
|
348
|
+
return t ? /* @__PURE__ */ c(
|
|
349
|
+
Ee,
|
|
350
350
|
{
|
|
351
351
|
borderRadius: "var(--swui-calendar-day-border-radius)",
|
|
352
352
|
onClick: (s) => t(e.dayOfWeek, s),
|
|
@@ -354,25 +354,25 @@ const Me = (t, e, r, n) => {
|
|
|
354
354
|
children: n
|
|
355
355
|
}
|
|
356
356
|
) : n;
|
|
357
|
-
},
|
|
357
|
+
}, Ue = function({
|
|
358
358
|
day: e,
|
|
359
359
|
week: r,
|
|
360
360
|
month: n,
|
|
361
361
|
dayState: s,
|
|
362
362
|
userData: i,
|
|
363
|
-
onClickDay:
|
|
363
|
+
onClickDay: o,
|
|
364
364
|
theme: a,
|
|
365
365
|
extraDayContent: l,
|
|
366
366
|
defaultHighlights: d
|
|
367
367
|
}) {
|
|
368
|
-
const u = /* @__PURE__ */
|
|
369
|
-
|
|
368
|
+
const u = /* @__PURE__ */ c(
|
|
369
|
+
L,
|
|
370
370
|
{
|
|
371
371
|
width: "100%",
|
|
372
372
|
height: "100%",
|
|
373
373
|
justifyContent: "center",
|
|
374
374
|
alignItems: "center",
|
|
375
|
-
children: /* @__PURE__ */
|
|
375
|
+
children: /* @__PURE__ */ c(
|
|
376
376
|
wt,
|
|
377
377
|
{
|
|
378
378
|
...a.CalendarDay.textProps && a.CalendarDay.textProps(
|
|
@@ -387,7 +387,7 @@ const Me = (t, e, r, n) => {
|
|
|
387
387
|
}
|
|
388
388
|
)
|
|
389
389
|
}
|
|
390
|
-
),
|
|
390
|
+
), m = Vt.td({
|
|
391
391
|
...a.CalendarDay.tdStyle && a.CalendarDay.tdStyle(
|
|
392
392
|
d,
|
|
393
393
|
s,
|
|
@@ -396,7 +396,7 @@ const Me = (t, e, r, n) => {
|
|
|
396
396
|
n,
|
|
397
397
|
i
|
|
398
398
|
)
|
|
399
|
-
}),
|
|
399
|
+
}), h = Vt.div({
|
|
400
400
|
...a.CalendarDay.innerWrapperStyle && a.CalendarDay.innerWrapperStyle(
|
|
401
401
|
d,
|
|
402
402
|
s,
|
|
@@ -407,7 +407,7 @@ const Me = (t, e, r, n) => {
|
|
|
407
407
|
),
|
|
408
408
|
width: "100%",
|
|
409
409
|
height: "100%"
|
|
410
|
-
}),
|
|
410
|
+
}), f = Vt.div({
|
|
411
411
|
...a.CalendarDay.cellWrapperStyle && a.CalendarDay.cellWrapperStyle(
|
|
412
412
|
d,
|
|
413
413
|
s,
|
|
@@ -419,13 +419,13 @@ const Me = (t, e, r, n) => {
|
|
|
419
419
|
width: "100%",
|
|
420
420
|
height: "100%",
|
|
421
421
|
position: "relative"
|
|
422
|
-
}), g =
|
|
423
|
-
return /* @__PURE__ */
|
|
424
|
-
|
|
422
|
+
}), g = Qr(d, s);
|
|
423
|
+
return /* @__PURE__ */ c(
|
|
424
|
+
m,
|
|
425
425
|
{
|
|
426
|
-
onClick: g ? void 0 : (
|
|
427
|
-
children: /* @__PURE__ */
|
|
428
|
-
l && /* @__PURE__ */
|
|
426
|
+
onClick: g ? void 0 : (w) => o == null ? void 0 : o(e, i, w),
|
|
427
|
+
children: /* @__PURE__ */ c(h, { children: /* @__PURE__ */ c(f, { children: e.month === n.monthInYear && /* @__PURE__ */ _(de, { children: [
|
|
428
|
+
l && /* @__PURE__ */ c(
|
|
429
429
|
l,
|
|
430
430
|
{
|
|
431
431
|
week: r,
|
|
@@ -440,13 +440,13 @@ const Me = (t, e, r, n) => {
|
|
|
440
440
|
] }) }) })
|
|
441
441
|
}
|
|
442
442
|
);
|
|
443
|
-
},
|
|
443
|
+
}, Qr = (t, e) => !!dt(
|
|
444
444
|
e,
|
|
445
445
|
t,
|
|
446
446
|
["disabled"],
|
|
447
447
|
[!0],
|
|
448
448
|
!1
|
|
449
|
-
),
|
|
449
|
+
), Xr = ({
|
|
450
450
|
onClickWeek: t,
|
|
451
451
|
theme: e,
|
|
452
452
|
week: r,
|
|
@@ -454,16 +454,16 @@ const Me = (t, e, r, n) => {
|
|
|
454
454
|
backgroundColor: s,
|
|
455
455
|
prefix: i
|
|
456
456
|
}) => {
|
|
457
|
-
const
|
|
458
|
-
|
|
457
|
+
const o = /* @__PURE__ */ _(
|
|
458
|
+
L,
|
|
459
459
|
{
|
|
460
460
|
width: e.width,
|
|
461
461
|
height: e.height,
|
|
462
462
|
justifyContent: "center",
|
|
463
463
|
alignItems: "center",
|
|
464
464
|
children: [
|
|
465
|
-
n && /* @__PURE__ */
|
|
466
|
-
/* @__PURE__ */
|
|
465
|
+
n && /* @__PURE__ */ c(L, { position: "absolute", children: n }),
|
|
466
|
+
/* @__PURE__ */ c(L, { position: "absolute", children: /* @__PURE__ */ _(
|
|
467
467
|
wt,
|
|
468
468
|
{
|
|
469
469
|
color: t ? e.WeekNumber.clickableTextColor : e.WeekNumber.textColor,
|
|
@@ -476,196 +476,196 @@ const Me = (t, e, r, n) => {
|
|
|
476
476
|
]
|
|
477
477
|
}
|
|
478
478
|
);
|
|
479
|
-
return /* @__PURE__ */
|
|
480
|
-
|
|
479
|
+
return /* @__PURE__ */ c(
|
|
480
|
+
L,
|
|
481
481
|
{
|
|
482
482
|
background: s || e.WeekNumber.backgroundColor,
|
|
483
483
|
position: "relative",
|
|
484
|
-
children: t ? /* @__PURE__ */
|
|
485
|
-
|
|
484
|
+
children: t ? /* @__PURE__ */ c(
|
|
485
|
+
Ee,
|
|
486
486
|
{
|
|
487
487
|
borderRadius: "var(--swui-calendar-day-border-radius)",
|
|
488
488
|
onClick: (a) => t(r, a),
|
|
489
489
|
disableFocusHighlight: !t,
|
|
490
|
-
children:
|
|
490
|
+
children: o
|
|
491
491
|
}
|
|
492
|
-
) :
|
|
492
|
+
) : o
|
|
493
493
|
}
|
|
494
494
|
);
|
|
495
|
-
},
|
|
495
|
+
}, Zr = (t, e, r) => e && ot(t, e) ? P(t, e) : r && V(t, r) ? P(t, r) : !0, Vr = function({
|
|
496
496
|
dayComponent: e,
|
|
497
497
|
minDate: r,
|
|
498
498
|
maxDate: n,
|
|
499
499
|
dayState: s,
|
|
500
500
|
day: i,
|
|
501
|
-
...
|
|
501
|
+
...o
|
|
502
502
|
}) {
|
|
503
|
-
const a =
|
|
504
|
-
() =>
|
|
503
|
+
const a = x(
|
|
504
|
+
() => Zr(i.date, r, n) ? s : Oe(s, ["disabled"]),
|
|
505
505
|
[i.date, s, n, r]
|
|
506
506
|
);
|
|
507
|
-
return /* @__PURE__ */
|
|
507
|
+
return /* @__PURE__ */ c(e, { day: i, ...o, dayState: a });
|
|
508
508
|
};
|
|
509
|
-
function
|
|
509
|
+
function tn({
|
|
510
510
|
month: t,
|
|
511
|
-
dayComponent: e =
|
|
511
|
+
dayComponent: e = Ue,
|
|
512
512
|
statePerWeek: r,
|
|
513
513
|
userDataPerWeek: n,
|
|
514
514
|
minDate: s,
|
|
515
515
|
maxDate: i,
|
|
516
|
-
onClickDay:
|
|
516
|
+
onClickDay: o,
|
|
517
517
|
onClickWeek: a,
|
|
518
518
|
onClickWeekDay: l,
|
|
519
519
|
onClickMonth: d,
|
|
520
520
|
renderWeekNumber: u,
|
|
521
|
-
renderWeekDay:
|
|
522
|
-
headerRightContent:
|
|
523
|
-
theme:
|
|
521
|
+
renderWeekDay: m,
|
|
522
|
+
headerRightContent: h,
|
|
523
|
+
theme: f = yt,
|
|
524
524
|
extraDayContent: g,
|
|
525
|
-
defaultHighlights:
|
|
525
|
+
defaultHighlights: w,
|
|
526
526
|
showWeekNumber: y
|
|
527
527
|
}) {
|
|
528
|
-
return /* @__PURE__ */
|
|
529
|
-
/* @__PURE__ */
|
|
530
|
-
|
|
528
|
+
return /* @__PURE__ */ c(de, { children: /* @__PURE__ */ _(L, { alignItems: "stretch", children: [
|
|
529
|
+
/* @__PURE__ */ _(
|
|
530
|
+
B,
|
|
531
531
|
{
|
|
532
|
-
justifyContent:
|
|
532
|
+
justifyContent: h ? "space-between" : "center",
|
|
533
533
|
alignItems: "center",
|
|
534
534
|
children: [
|
|
535
|
-
/* @__PURE__ */
|
|
536
|
-
|
|
535
|
+
/* @__PURE__ */ c(B, { justifyContent: "center", alignItems: "center", children: d ? /* @__PURE__ */ c(
|
|
536
|
+
tt,
|
|
537
537
|
{
|
|
538
538
|
onClick: () => d(t),
|
|
539
539
|
label: t.name + " " + String(t.year),
|
|
540
|
-
rightIcon:
|
|
540
|
+
rightIcon: fe
|
|
541
541
|
}
|
|
542
|
-
) : /* @__PURE__ */
|
|
542
|
+
) : /* @__PURE__ */ _(wt, { whiteSpace: "nowrap", children: [
|
|
543
543
|
t.name,
|
|
544
544
|
" ",
|
|
545
545
|
t.year
|
|
546
546
|
] }) }),
|
|
547
|
-
|
|
547
|
+
h && /* @__PURE__ */ c(L, { alignItems: "center", children: h })
|
|
548
548
|
]
|
|
549
549
|
}
|
|
550
550
|
),
|
|
551
|
-
/* @__PURE__ */
|
|
552
|
-
/* @__PURE__ */
|
|
553
|
-
y && /* @__PURE__ */
|
|
554
|
-
t.weeks[0].days.map((M) => /* @__PURE__ */
|
|
555
|
-
|
|
551
|
+
/* @__PURE__ */ c("table", { children: /* @__PURE__ */ _("tbody", { children: [
|
|
552
|
+
/* @__PURE__ */ _("tr", { children: [
|
|
553
|
+
y && /* @__PURE__ */ c("td", { children: /* @__PURE__ */ c(L, { width: f.width, height: f.height }) }),
|
|
554
|
+
t.weeks[0].days.map((M) => /* @__PURE__ */ c("td", { children: m ? m(M.name, f, l) : /* @__PURE__ */ c(
|
|
555
|
+
Gr,
|
|
556
556
|
{
|
|
557
557
|
day: M,
|
|
558
558
|
onClickWeekDay: l,
|
|
559
|
-
theme:
|
|
559
|
+
theme: f
|
|
560
560
|
}
|
|
561
561
|
) }, M.name))
|
|
562
562
|
] }),
|
|
563
|
-
t.weeks.map((M) => /* @__PURE__ */
|
|
564
|
-
y && /* @__PURE__ */
|
|
565
|
-
|
|
563
|
+
t.weeks.map((M) => /* @__PURE__ */ _("tr", { children: [
|
|
564
|
+
y && /* @__PURE__ */ c("td", { children: u ? u(M, f, a) : /* @__PURE__ */ c(
|
|
565
|
+
Xr,
|
|
566
566
|
{
|
|
567
567
|
week: M,
|
|
568
568
|
onClickWeek: a,
|
|
569
|
-
theme:
|
|
569
|
+
theme: f
|
|
570
570
|
}
|
|
571
571
|
) }),
|
|
572
|
-
M.days.map((
|
|
573
|
-
|
|
572
|
+
M.days.map((p) => /* @__PURE__ */ c(
|
|
573
|
+
Vr,
|
|
574
574
|
{
|
|
575
575
|
dayComponent: e,
|
|
576
|
-
day:
|
|
576
|
+
day: p,
|
|
577
577
|
week: M,
|
|
578
578
|
month: t,
|
|
579
|
-
dayState: r && r[M.weekNumber] && r[M.weekNumber][
|
|
580
|
-
userData: n && n[M.weekNumber] && n[M.weekNumber][
|
|
581
|
-
onClickDay:
|
|
582
|
-
theme:
|
|
579
|
+
dayState: r && r[M.weekNumber] && r[M.weekNumber][p.dayOfMonth],
|
|
580
|
+
userData: n && n[M.weekNumber] && n[M.weekNumber][p.dayOfMonth],
|
|
581
|
+
onClickDay: o,
|
|
582
|
+
theme: f,
|
|
583
583
|
extraDayContent: g,
|
|
584
|
-
defaultHighlights:
|
|
584
|
+
defaultHighlights: w,
|
|
585
585
|
minDate: s,
|
|
586
586
|
maxDate: i
|
|
587
587
|
},
|
|
588
|
-
|
|
588
|
+
p.dateString
|
|
589
589
|
))
|
|
590
590
|
] }, M.weekNumber))
|
|
591
591
|
] }) })
|
|
592
592
|
] }) });
|
|
593
593
|
}
|
|
594
|
-
function
|
|
594
|
+
function en({
|
|
595
595
|
monthRows: t,
|
|
596
|
-
dayComponent: e =
|
|
596
|
+
dayComponent: e = Ue,
|
|
597
597
|
userDataPerMonth: r,
|
|
598
598
|
statePerMonth: n,
|
|
599
599
|
minDate: s,
|
|
600
600
|
maxDate: i,
|
|
601
|
-
onClickDay:
|
|
601
|
+
onClickDay: o,
|
|
602
602
|
onClickWeekDay: a,
|
|
603
603
|
onClickWeek: l,
|
|
604
604
|
onClickMonth: d,
|
|
605
605
|
renderWeekDay: u,
|
|
606
|
-
renderWeekNumber:
|
|
607
|
-
headerRightContent:
|
|
608
|
-
extraDayContent:
|
|
606
|
+
renderWeekNumber: m,
|
|
607
|
+
headerRightContent: h,
|
|
608
|
+
extraDayContent: f,
|
|
609
609
|
defaultHighlights: g,
|
|
610
|
-
showWeekNumber:
|
|
610
|
+
showWeekNumber: w,
|
|
611
611
|
theme: y = yt
|
|
612
612
|
}) {
|
|
613
|
-
const M =
|
|
613
|
+
const M = x(
|
|
614
614
|
() => s ? pt(s, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
|
|
615
615
|
[s]
|
|
616
|
-
),
|
|
616
|
+
), p = x(
|
|
617
617
|
() => i ? pt(i, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
|
|
618
618
|
[i]
|
|
619
619
|
);
|
|
620
|
-
return /* @__PURE__ */
|
|
620
|
+
return /* @__PURE__ */ c(
|
|
621
621
|
"div",
|
|
622
622
|
{
|
|
623
623
|
className: Dt(
|
|
624
|
-
|
|
625
|
-
|
|
624
|
+
Re.calendar,
|
|
625
|
+
w && Re.weekNumberVisible
|
|
626
626
|
),
|
|
627
|
-
children: t.map((
|
|
628
|
-
|
|
627
|
+
children: t.map((b, S) => /* @__PURE__ */ c(er, { children: /* @__PURE__ */ c(B, { gap: 2, children: b.map((T) => /* @__PURE__ */ c(
|
|
628
|
+
tn,
|
|
629
629
|
{
|
|
630
630
|
month: T,
|
|
631
631
|
dayComponent: e,
|
|
632
632
|
userDataPerWeek: r && r[T.monthString],
|
|
633
633
|
statePerWeek: n && n[T.monthString],
|
|
634
|
-
onClickDay:
|
|
634
|
+
onClickDay: o,
|
|
635
635
|
onClickWeekDay: a,
|
|
636
636
|
onClickWeek: l,
|
|
637
637
|
onClickMonth: d,
|
|
638
638
|
theme: y,
|
|
639
|
-
renderWeekNumber:
|
|
639
|
+
renderWeekNumber: m,
|
|
640
640
|
renderWeekDay: u,
|
|
641
|
-
headerRightContent:
|
|
642
|
-
extraDayContent:
|
|
641
|
+
headerRightContent: h,
|
|
642
|
+
extraDayContent: f,
|
|
643
643
|
defaultHighlights: g,
|
|
644
644
|
minDate: M,
|
|
645
|
-
maxDate:
|
|
646
|
-
showWeekNumber:
|
|
645
|
+
maxDate: p,
|
|
646
|
+
showWeekNumber: w ?? !1
|
|
647
647
|
},
|
|
648
648
|
T.name
|
|
649
649
|
)) }) }, S))
|
|
650
650
|
}
|
|
651
651
|
);
|
|
652
652
|
}
|
|
653
|
-
function
|
|
654
|
-
const e =
|
|
653
|
+
function ie(t) {
|
|
654
|
+
const e = rn(t.year, t.month, t.date), { year: r, month: n } = jr(
|
|
655
655
|
e.year,
|
|
656
656
|
e.month
|
|
657
|
-
), s =
|
|
657
|
+
), s = nn(
|
|
658
658
|
r,
|
|
659
659
|
n,
|
|
660
|
-
t.locale ??
|
|
660
|
+
t.locale ?? zt,
|
|
661
661
|
t.numMonths,
|
|
662
662
|
t.monthsPerRow
|
|
663
|
-
), i =
|
|
663
|
+
), i = Hr(
|
|
664
664
|
t.highlightToday,
|
|
665
665
|
t.statePerMonth
|
|
666
666
|
);
|
|
667
|
-
return /* @__PURE__ */
|
|
668
|
-
|
|
667
|
+
return /* @__PURE__ */ c(
|
|
668
|
+
en,
|
|
669
669
|
{
|
|
670
670
|
year: r,
|
|
671
671
|
month: n,
|
|
@@ -675,7 +675,7 @@ function se(t) {
|
|
|
675
675
|
}
|
|
676
676
|
);
|
|
677
677
|
}
|
|
678
|
-
const
|
|
678
|
+
const rn = (t, e, r) => {
|
|
679
679
|
if (e && t)
|
|
680
680
|
return {
|
|
681
681
|
month: e,
|
|
@@ -684,65 +684,65 @@ const Zr = (t, e, r) => {
|
|
|
684
684
|
if (r)
|
|
685
685
|
return {
|
|
686
686
|
month: mt(r),
|
|
687
|
-
year:
|
|
687
|
+
year: At(r)
|
|
688
688
|
};
|
|
689
689
|
const n = /* @__PURE__ */ new Date();
|
|
690
690
|
return {
|
|
691
691
|
month: mt(n),
|
|
692
|
-
year:
|
|
692
|
+
year: At(n)
|
|
693
693
|
};
|
|
694
|
-
},
|
|
694
|
+
}, nn = (t, e, r, n, s) => n == null ? [[Jt(t, e, r)]] : s == null ? [Te(t, e, n, r)] : We(Te(t, e, n, r), s), Fe = (t, e) => `${t.row}-${t.column}-${e}`, sn = (t, e, r, n) => {
|
|
695
695
|
let s = e;
|
|
696
696
|
for (let i = 0; i < n; i++) {
|
|
697
|
-
s =
|
|
698
|
-
const
|
|
699
|
-
if (document.getElementById(
|
|
700
|
-
return
|
|
697
|
+
s = on(s, t, n);
|
|
698
|
+
const o = Fe(s, r);
|
|
699
|
+
if (document.getElementById(o))
|
|
700
|
+
return o;
|
|
701
701
|
}
|
|
702
|
-
},
|
|
702
|
+
}, on = (t, e, r) => {
|
|
703
703
|
let n = t.row, s = t.column;
|
|
704
704
|
return e === "ArrowLeft" ? s-- : e === "ArrowUp" ? n-- : e === "ArrowRight" ? s++ : e === "ArrowDown" && n++, s < 0 && (s = r - 1, n--), s > r - 1 && (s = 0, n++), {
|
|
705
705
|
column: s,
|
|
706
706
|
row: n
|
|
707
707
|
};
|
|
708
|
-
},
|
|
708
|
+
}, cn = ({
|
|
709
709
|
month: t,
|
|
710
710
|
onClick: e,
|
|
711
711
|
selected: r,
|
|
712
712
|
locale: n,
|
|
713
713
|
autoFocus: s,
|
|
714
714
|
monthPickerId: i,
|
|
715
|
-
position:
|
|
715
|
+
position: o,
|
|
716
716
|
size: a
|
|
717
717
|
}) => {
|
|
718
|
-
const l =
|
|
719
|
-
() =>
|
|
718
|
+
const l = x(
|
|
719
|
+
() => _t(v(t, "MMM", { locale: n })),
|
|
720
720
|
[n, t]
|
|
721
|
-
), d =
|
|
722
|
-
() =>
|
|
721
|
+
), d = x(
|
|
722
|
+
() => _t(v(t, "MMMM", { locale: n })),
|
|
723
723
|
[n, t]
|
|
724
|
-
), u =
|
|
725
|
-
|
|
724
|
+
), u = W(null), m = Fe(o, i), h = r ? 0 : -1;
|
|
725
|
+
rt(() => {
|
|
726
726
|
var g;
|
|
727
727
|
(g = u.current) == null || g.focus();
|
|
728
728
|
}, []);
|
|
729
|
-
const
|
|
729
|
+
const f = D(
|
|
730
730
|
(g) => {
|
|
731
731
|
var y;
|
|
732
|
-
const
|
|
732
|
+
const w = sn(
|
|
733
733
|
g.key,
|
|
734
|
-
|
|
734
|
+
o,
|
|
735
735
|
i,
|
|
736
736
|
4
|
|
737
737
|
);
|
|
738
|
-
|
|
738
|
+
w && ((y = document.getElementById(w)) == null || y.focus());
|
|
739
739
|
},
|
|
740
|
-
[i,
|
|
740
|
+
[i, o]
|
|
741
741
|
);
|
|
742
|
-
return /* @__PURE__ */
|
|
742
|
+
return /* @__PURE__ */ c(B, { justifyContent: "center", onKeyDown: f, children: r ? /* @__PURE__ */ c(
|
|
743
743
|
St,
|
|
744
744
|
{
|
|
745
|
-
id:
|
|
745
|
+
id: m,
|
|
746
746
|
"aria-label": d,
|
|
747
747
|
label: l,
|
|
748
748
|
onClick: e,
|
|
@@ -750,21 +750,21 @@ const Zr = (t, e, r) => {
|
|
|
750
750
|
autoFocus: s,
|
|
751
751
|
ref: u,
|
|
752
752
|
size: a === "large" ? "large" : "medium",
|
|
753
|
-
tabIndex:
|
|
753
|
+
tabIndex: h
|
|
754
754
|
}
|
|
755
|
-
) : /* @__PURE__ */
|
|
756
|
-
|
|
755
|
+
) : /* @__PURE__ */ c(
|
|
756
|
+
tt,
|
|
757
757
|
{
|
|
758
|
-
id:
|
|
758
|
+
id: m,
|
|
759
759
|
label: l,
|
|
760
760
|
"aria-label": d,
|
|
761
761
|
onClick: e,
|
|
762
762
|
size: a === "large" ? "large" : "medium",
|
|
763
|
-
tabIndex:
|
|
763
|
+
tabIndex: h
|
|
764
764
|
}
|
|
765
765
|
) });
|
|
766
|
-
},
|
|
767
|
-
let n = t.getFullYear(), s = 0, i = 0,
|
|
766
|
+
}, an = (t, e, r) => {
|
|
767
|
+
let n = t.getFullYear(), s = 0, i = 0, o = t;
|
|
768
768
|
const a = {
|
|
769
769
|
yearOrder: [],
|
|
770
770
|
rows: [],
|
|
@@ -781,58 +781,58 @@ const Zr = (t, e, r) => {
|
|
|
781
781
|
column: i,
|
|
782
782
|
row: s
|
|
783
783
|
},
|
|
784
|
-
month:
|
|
784
|
+
month: o
|
|
785
785
|
}, l === e - 1) {
|
|
786
786
|
a.years[n].rows.push(s);
|
|
787
787
|
break;
|
|
788
788
|
}
|
|
789
|
-
|
|
789
|
+
o = Yt(o, 1), o.getFullYear() !== n ? (a.years[n].rows.push(s), n++, i = 0, s++) : (i++, i > r - 1 && (a.years[n].rows.push(s), i = 0, s++));
|
|
790
790
|
}
|
|
791
791
|
return a.lastMonthColumn = i, a.lastMonthRow = s, a;
|
|
792
|
-
},
|
|
792
|
+
}, we = () => x(() => /* @__PURE__ */ new Date(), []), vt = ({
|
|
793
793
|
value: t,
|
|
794
794
|
onValueChange: e,
|
|
795
|
-
locale: r =
|
|
795
|
+
locale: r = zt,
|
|
796
796
|
firstMonth: n,
|
|
797
797
|
numMonths: s,
|
|
798
798
|
onCancel: i,
|
|
799
|
-
size:
|
|
799
|
+
size: o = "medium"
|
|
800
800
|
}) => {
|
|
801
|
-
const a =
|
|
802
|
-
|
|
803
|
-
|
|
801
|
+
const a = De(), l = we(), d = s > 0 ? s : 12, [u, m] = I(!1), h = an(n, d, dn(o)), f = x(() => Yt(n, d), [d, n]);
|
|
802
|
+
rt(() => {
|
|
803
|
+
m(!0);
|
|
804
804
|
}, []);
|
|
805
805
|
const g = D(
|
|
806
|
-
(
|
|
807
|
-
|
|
806
|
+
(w) => {
|
|
807
|
+
w.key === "Escape" && (i == null || i(), w.preventDefault(), w.stopPropagation());
|
|
808
808
|
},
|
|
809
809
|
[i]
|
|
810
810
|
);
|
|
811
|
-
return /* @__PURE__ */
|
|
812
|
-
const { rows: M } =
|
|
813
|
-
return /* @__PURE__ */
|
|
814
|
-
(y !== 0 ||
|
|
815
|
-
/* @__PURE__ */
|
|
816
|
-
const { columns:
|
|
817
|
-
return /* @__PURE__ */
|
|
818
|
-
|
|
811
|
+
return /* @__PURE__ */ c(J, { gap: 1, maxWidth: ln(o), onKeyDown: g, children: h.yearOrder.map((w, y) => {
|
|
812
|
+
const { rows: M } = h.years[w];
|
|
813
|
+
return /* @__PURE__ */ _(pe.Fragment, { children: [
|
|
814
|
+
(y !== 0 || w !== l.getFullYear()) && /* @__PURE__ */ c(Lt, { variant: "h4", children: w }),
|
|
815
|
+
/* @__PURE__ */ c("table", { style: { borderSpacing: "0 8px" }, children: /* @__PURE__ */ c("tbody", { children: M.map((p) => {
|
|
816
|
+
const { columns: b } = h.rows[p];
|
|
817
|
+
return /* @__PURE__ */ c("tr", { children: b.map(({ month: S, position: T }) => /* @__PURE__ */ c("td", { children: /* @__PURE__ */ c(
|
|
818
|
+
cn,
|
|
819
819
|
{
|
|
820
820
|
month: S,
|
|
821
821
|
firstAvailableMonth: n,
|
|
822
|
-
lastAvailableMonth:
|
|
822
|
+
lastAvailableMonth: f,
|
|
823
823
|
locale: r,
|
|
824
|
-
selected: t ?
|
|
824
|
+
selected: t ? ct(t, S) : !1,
|
|
825
825
|
autoFocus: u,
|
|
826
826
|
onClick: () => e == null ? void 0 : e(S),
|
|
827
827
|
monthPickerId: a,
|
|
828
828
|
position: T,
|
|
829
|
-
size:
|
|
829
|
+
size: o
|
|
830
830
|
}
|
|
831
|
-
) }, S.getMonth())) },
|
|
831
|
+
) }, S.getMonth())) }, p);
|
|
832
832
|
}) }) })
|
|
833
|
-
] },
|
|
833
|
+
] }, w);
|
|
834
834
|
}) });
|
|
835
|
-
},
|
|
835
|
+
}, ln = (t) => {
|
|
836
836
|
switch (t) {
|
|
837
837
|
case "small":
|
|
838
838
|
return "280px";
|
|
@@ -841,9 +841,9 @@ const Zr = (t, e, r) => {
|
|
|
841
841
|
case "large":
|
|
842
842
|
return "448px";
|
|
843
843
|
default:
|
|
844
|
-
return
|
|
844
|
+
return ue(t, "336px");
|
|
845
845
|
}
|
|
846
|
-
},
|
|
846
|
+
}, dn = (t) => {
|
|
847
847
|
switch (t) {
|
|
848
848
|
case "small":
|
|
849
849
|
return 3;
|
|
@@ -852,9 +852,9 @@ const Zr = (t, e, r) => {
|
|
|
852
852
|
case "large":
|
|
853
853
|
return 5;
|
|
854
854
|
default:
|
|
855
|
-
return
|
|
855
|
+
return ue(t, 4);
|
|
856
856
|
}
|
|
857
|
-
},
|
|
857
|
+
}, un = (t) => [
|
|
858
858
|
{
|
|
859
859
|
label: "Past",
|
|
860
860
|
presets: [
|
|
@@ -867,39 +867,39 @@ const Zr = (t, e, r) => {
|
|
|
867
867
|
{
|
|
868
868
|
label: "Future",
|
|
869
869
|
presets: [
|
|
870
|
-
{ label: "Next 3 days", startDate: t, endDate:
|
|
871
|
-
{ label: "Next 7 days", startDate: t, endDate:
|
|
872
|
-
{ label: "Next 30 days", startDate: t, endDate:
|
|
873
|
-
{ label: "Next 45 days", startDate: t, endDate:
|
|
870
|
+
{ label: "Next 3 days", startDate: t, endDate: Z(t, 2) },
|
|
871
|
+
{ label: "Next 7 days", startDate: t, endDate: Z(t, 6) },
|
|
872
|
+
{ label: "Next 30 days", startDate: t, endDate: Z(t, 29) },
|
|
873
|
+
{ label: "Next 45 days", startDate: t, endDate: Z(t, 44) }
|
|
874
874
|
]
|
|
875
875
|
}
|
|
876
|
-
],
|
|
876
|
+
], fn = ({
|
|
877
877
|
onClickPreset: t
|
|
878
878
|
}) => {
|
|
879
|
-
const [e, r] =
|
|
880
|
-
return /* @__PURE__ */
|
|
881
|
-
/* @__PURE__ */
|
|
882
|
-
|
|
879
|
+
const [e, r] = I(0), n = x(() => un(/* @__PURE__ */ new Date()), []), s = n[e] ?? n[0];
|
|
880
|
+
return /* @__PURE__ */ _(J, { children: [
|
|
881
|
+
/* @__PURE__ */ _(
|
|
882
|
+
B,
|
|
883
883
|
{
|
|
884
884
|
justifyContent: "space-between",
|
|
885
885
|
alignItems: "center",
|
|
886
886
|
width: "200px",
|
|
887
887
|
children: [
|
|
888
|
-
/* @__PURE__ */
|
|
889
|
-
|
|
888
|
+
/* @__PURE__ */ c(
|
|
889
|
+
tt,
|
|
890
890
|
{
|
|
891
891
|
size: "small",
|
|
892
|
-
leftIcon:
|
|
892
|
+
leftIcon: nr,
|
|
893
893
|
disabled: e === 0,
|
|
894
894
|
onClick: () => r(e - 1)
|
|
895
895
|
}
|
|
896
896
|
),
|
|
897
|
-
/* @__PURE__ */
|
|
898
|
-
/* @__PURE__ */
|
|
899
|
-
|
|
897
|
+
/* @__PURE__ */ c(wt, { children: s.label }),
|
|
898
|
+
/* @__PURE__ */ c(
|
|
899
|
+
tt,
|
|
900
900
|
{
|
|
901
901
|
size: "small",
|
|
902
|
-
leftIcon:
|
|
902
|
+
leftIcon: sr,
|
|
903
903
|
disabled: e === n.length - 1,
|
|
904
904
|
onClick: () => r(e + 1)
|
|
905
905
|
}
|
|
@@ -907,25 +907,25 @@ const Zr = (t, e, r) => {
|
|
|
907
907
|
]
|
|
908
908
|
}
|
|
909
909
|
),
|
|
910
|
-
/* @__PURE__ */
|
|
911
|
-
/* @__PURE__ */
|
|
912
|
-
/* @__PURE__ */
|
|
910
|
+
/* @__PURE__ */ c(kt, {}),
|
|
911
|
+
/* @__PURE__ */ c(J, { alignItems: "center", children: s.presets.map((i) => /* @__PURE__ */ _(pe.Fragment, { children: [
|
|
912
|
+
/* @__PURE__ */ c(
|
|
913
913
|
St,
|
|
914
914
|
{
|
|
915
915
|
label: i.label,
|
|
916
916
|
onClick: () => t(i)
|
|
917
917
|
}
|
|
918
918
|
),
|
|
919
|
-
/* @__PURE__ */
|
|
919
|
+
/* @__PURE__ */ c(kt, {})
|
|
920
920
|
] }, i.label)) })
|
|
921
921
|
] });
|
|
922
|
-
},
|
|
922
|
+
}, hn = function({
|
|
923
923
|
locale: e,
|
|
924
924
|
dateInFocus: r,
|
|
925
925
|
setDateInFocus: n,
|
|
926
926
|
currentPanel: s,
|
|
927
927
|
setCurrentPanel: i,
|
|
928
|
-
renderMonthPicker:
|
|
928
|
+
renderMonthPicker: o,
|
|
929
929
|
...a
|
|
930
930
|
}) {
|
|
931
931
|
const l = D(
|
|
@@ -938,8 +938,8 @@ const Zr = (t, e, r) => {
|
|
|
938
938
|
}, [i]);
|
|
939
939
|
switch (s) {
|
|
940
940
|
case "calendar":
|
|
941
|
-
return /* @__PURE__ */
|
|
942
|
-
|
|
941
|
+
return /* @__PURE__ */ c(
|
|
942
|
+
ie,
|
|
943
943
|
{
|
|
944
944
|
...a,
|
|
945
945
|
date: r,
|
|
@@ -948,15 +948,15 @@ const Zr = (t, e, r) => {
|
|
|
948
948
|
}
|
|
949
949
|
);
|
|
950
950
|
case "month":
|
|
951
|
-
return
|
|
951
|
+
return o ? o({
|
|
952
952
|
value: r,
|
|
953
953
|
onValueChange: l,
|
|
954
954
|
locale: e,
|
|
955
955
|
firstMonth: /* @__PURE__ */ new Date(),
|
|
956
956
|
numMonths: 24,
|
|
957
957
|
dateInFocus: r
|
|
958
|
-
}) : /* @__PURE__ */
|
|
959
|
-
|
|
958
|
+
}) : /* @__PURE__ */ c(
|
|
959
|
+
vt,
|
|
960
960
|
{
|
|
961
961
|
value: r,
|
|
962
962
|
onValueChange: l,
|
|
@@ -966,10 +966,10 @@ const Zr = (t, e, r) => {
|
|
|
966
966
|
}
|
|
967
967
|
);
|
|
968
968
|
case "presets":
|
|
969
|
-
return /* @__PURE__ */
|
|
969
|
+
return /* @__PURE__ */ c(fn, { onClickPreset: () => {
|
|
970
970
|
} });
|
|
971
971
|
default:
|
|
972
|
-
return /* @__PURE__ */
|
|
972
|
+
return /* @__PURE__ */ c(L, { children: /* @__PURE__ */ c(
|
|
973
973
|
St,
|
|
974
974
|
{
|
|
975
975
|
label: "Show calendar",
|
|
@@ -977,43 +977,43 @@ const Zr = (t, e, r) => {
|
|
|
977
977
|
}
|
|
978
978
|
) });
|
|
979
979
|
}
|
|
980
|
-
},
|
|
980
|
+
}, mn = (t, e, r, n) => {
|
|
981
981
|
const s = D(() => {
|
|
982
982
|
const l = Yt(t, r ?? n ?? 1);
|
|
983
983
|
e == null || e(l);
|
|
984
984
|
}, [e, t, r, n]), i = D(() => {
|
|
985
|
-
const l =
|
|
985
|
+
const l = mr(t, 1);
|
|
986
986
|
e == null || e(l);
|
|
987
|
-
}, [e, t]),
|
|
988
|
-
const l =
|
|
987
|
+
}, [e, t]), o = D(() => {
|
|
988
|
+
const l = me(t, r ?? n ?? 1);
|
|
989
989
|
e == null || e(l);
|
|
990
990
|
}, [e, t, r, n]), a = D(() => {
|
|
991
|
-
const l =
|
|
991
|
+
const l = gr(t, 1);
|
|
992
992
|
e == null || e(l);
|
|
993
993
|
}, [e, t]);
|
|
994
994
|
return {
|
|
995
995
|
nextMonth: s,
|
|
996
|
-
prevMonth:
|
|
996
|
+
prevMonth: o,
|
|
997
997
|
nextYear: i,
|
|
998
998
|
prevYear: a
|
|
999
999
|
};
|
|
1000
|
-
},
|
|
1000
|
+
}, gn = ({
|
|
1001
1001
|
children: t,
|
|
1002
1002
|
prevMonth: e,
|
|
1003
1003
|
nextMonth: r,
|
|
1004
1004
|
prevYear: n,
|
|
1005
1005
|
nextYear: s
|
|
1006
|
-
}) => /* @__PURE__ */
|
|
1006
|
+
}) => /* @__PURE__ */ _("div", { children: [
|
|
1007
1007
|
t,
|
|
1008
|
-
/* @__PURE__ */
|
|
1009
|
-
/* @__PURE__ */
|
|
1010
|
-
/* @__PURE__ */
|
|
1011
|
-
/* @__PURE__ */
|
|
1012
|
-
/* @__PURE__ */
|
|
1013
|
-
/* @__PURE__ */
|
|
1008
|
+
/* @__PURE__ */ c(xt, { children: /* @__PURE__ */ _(B, { gap: 1, children: [
|
|
1009
|
+
/* @__PURE__ */ c(ut, { onClick: n, leftIcon: ir }),
|
|
1010
|
+
/* @__PURE__ */ c(ut, { onClick: e, leftIcon: Ct }),
|
|
1011
|
+
/* @__PURE__ */ c(xt, { num: 2 }),
|
|
1012
|
+
/* @__PURE__ */ c(ut, { onClick: r, leftIcon: Pt }),
|
|
1013
|
+
/* @__PURE__ */ c(ut, { onClick: s, leftIcon: or })
|
|
1014
1014
|
] }) }),
|
|
1015
|
-
/* @__PURE__ */
|
|
1016
|
-
] }),
|
|
1015
|
+
/* @__PURE__ */ c(kt, {})
|
|
1016
|
+
] }), pn = () => {
|
|
1017
1017
|
};
|
|
1018
1018
|
function Mt({
|
|
1019
1019
|
monthSwitcherPlacement: t,
|
|
@@ -1022,35 +1022,35 @@ function Mt({
|
|
|
1022
1022
|
setDateInFocus: n,
|
|
1023
1023
|
currentPanel: s,
|
|
1024
1024
|
setCurrentPanel: i,
|
|
1025
|
-
onSelectPreset:
|
|
1025
|
+
onSelectPreset: o = pn,
|
|
1026
1026
|
renderMonthPicker: a,
|
|
1027
1027
|
...l
|
|
1028
1028
|
}) {
|
|
1029
|
-
const { nextMonth: d, prevMonth: u, nextYear:
|
|
1029
|
+
const { nextMonth: d, prevMonth: u, nextYear: m, prevYear: h } = mn(
|
|
1030
1030
|
r,
|
|
1031
1031
|
n,
|
|
1032
1032
|
l.monthsPerRow,
|
|
1033
1033
|
l.numMonths
|
|
1034
1034
|
);
|
|
1035
|
-
switch (
|
|
1035
|
+
switch (Dn(
|
|
1036
1036
|
t,
|
|
1037
1037
|
l.numMonths
|
|
1038
1038
|
)) {
|
|
1039
1039
|
case "below":
|
|
1040
|
-
return /* @__PURE__ */
|
|
1041
|
-
|
|
1040
|
+
return /* @__PURE__ */ c(
|
|
1041
|
+
gn,
|
|
1042
1042
|
{
|
|
1043
1043
|
theme: e,
|
|
1044
1044
|
nextMonth: d,
|
|
1045
1045
|
prevMonth: u,
|
|
1046
|
-
nextYear:
|
|
1047
|
-
prevYear:
|
|
1048
|
-
children: /* @__PURE__ */
|
|
1046
|
+
nextYear: m,
|
|
1047
|
+
prevYear: h,
|
|
1048
|
+
children: /* @__PURE__ */ c(ie, { ...l, theme: e, date: r })
|
|
1049
1049
|
}
|
|
1050
1050
|
);
|
|
1051
1051
|
case "header":
|
|
1052
|
-
return /* @__PURE__ */
|
|
1053
|
-
|
|
1052
|
+
return /* @__PURE__ */ c(J, { children: /* @__PURE__ */ c(
|
|
1053
|
+
hn,
|
|
1054
1054
|
{
|
|
1055
1055
|
...l,
|
|
1056
1056
|
theme: e,
|
|
@@ -1059,33 +1059,33 @@ function Mt({
|
|
|
1059
1059
|
setDateInFocus: n,
|
|
1060
1060
|
currentPanel: s,
|
|
1061
1061
|
setCurrentPanel: i,
|
|
1062
|
-
onSelectPreset:
|
|
1063
|
-
headerRightContent: /* @__PURE__ */
|
|
1064
|
-
/* @__PURE__ */
|
|
1065
|
-
|
|
1062
|
+
onSelectPreset: o,
|
|
1063
|
+
headerRightContent: /* @__PURE__ */ _(B, { alignItems: "center", gap: 1, children: [
|
|
1064
|
+
/* @__PURE__ */ c(
|
|
1065
|
+
ut,
|
|
1066
1066
|
{
|
|
1067
1067
|
onClick: u,
|
|
1068
|
-
leftIcon:
|
|
1068
|
+
leftIcon: Ct
|
|
1069
1069
|
}
|
|
1070
1070
|
),
|
|
1071
|
-
/* @__PURE__ */
|
|
1072
|
-
|
|
1071
|
+
/* @__PURE__ */ c(
|
|
1072
|
+
ut,
|
|
1073
1073
|
{
|
|
1074
1074
|
onClick: d,
|
|
1075
|
-
leftIcon:
|
|
1075
|
+
leftIcon: Pt
|
|
1076
1076
|
}
|
|
1077
1077
|
)
|
|
1078
1078
|
] })
|
|
1079
1079
|
}
|
|
1080
1080
|
) });
|
|
1081
1081
|
default:
|
|
1082
|
-
return /* @__PURE__ */
|
|
1082
|
+
return /* @__PURE__ */ c(ie, { ...l, theme: e, date: r });
|
|
1083
1083
|
}
|
|
1084
1084
|
}
|
|
1085
|
-
const
|
|
1086
|
-
startDate: t.startDate ?
|
|
1087
|
-
endDate: t.endDate ?
|
|
1088
|
-
}),
|
|
1085
|
+
const Dn = (t, e) => t || (e || 1) > 1 ? "below" : "header", bn = (t) => ({
|
|
1086
|
+
startDate: t.startDate ? v(t.startDate, "yyyy-MM-dd") : void 0,
|
|
1087
|
+
endDate: t.endDate ? v(t.endDate, "yyyy-MM-dd") : void 0
|
|
1088
|
+
}), wn = ({
|
|
1089
1089
|
startDate: t,
|
|
1090
1090
|
endDate: e
|
|
1091
1091
|
}) => {
|
|
@@ -1094,21 +1094,21 @@ const hn = (t, e) => t || (e || 1) > 1 ? "below" : "header", mn = (t) => ({
|
|
|
1094
1094
|
startDate: t ? pt(t, "yyyy-MM-dd", r) : void 0,
|
|
1095
1095
|
endDate: e ? pt(e, "yyyy-MM-dd", r) : void 0
|
|
1096
1096
|
};
|
|
1097
|
-
},
|
|
1097
|
+
}, je = ({
|
|
1098
1098
|
startDate: t,
|
|
1099
1099
|
endDate: e
|
|
1100
|
-
}) => !!(t && e && !
|
|
1100
|
+
}) => !!(t && e && !P(t, e) && V(t, e)), Ce = (t) => je(t) ? {
|
|
1101
1101
|
startDate: t.endDate,
|
|
1102
1102
|
endDate: t.startDate
|
|
1103
|
-
} : t,
|
|
1104
|
-
|
|
1105
|
-
) : t,
|
|
1103
|
+
} : t, zs = (t) => t.startDate && t.endDate ? bn(
|
|
1104
|
+
Ce(wn(t))
|
|
1105
|
+
) : t, yn = (t, e, r, n) => D(
|
|
1106
1106
|
(s) => {
|
|
1107
1107
|
const i = {
|
|
1108
1108
|
startDate: r === "startDate" ? s.date : t == null ? void 0 : t.startDate,
|
|
1109
1109
|
endDate: r === "endDate" ? s.date : t == null ? void 0 : t.endDate
|
|
1110
1110
|
};
|
|
1111
|
-
|
|
1111
|
+
je(i) || n(r === "startDate" ? "endDate" : "startDate"), e == null || e(Ce(i));
|
|
1112
1112
|
},
|
|
1113
1113
|
[
|
|
1114
1114
|
r,
|
|
@@ -1117,8 +1117,8 @@ const hn = (t, e) => t || (e || 1) > 1 ? "below" : "header", mn = (t) => ({
|
|
|
1117
1117
|
t == null ? void 0 : t.endDate,
|
|
1118
1118
|
t == null ? void 0 : t.startDate
|
|
1119
1119
|
]
|
|
1120
|
-
),
|
|
1121
|
-
const [e, r] =
|
|
1120
|
+
), Gt = (t) => {
|
|
1121
|
+
const [e, r] = I("calendar"), n = D(
|
|
1122
1122
|
(s) => {
|
|
1123
1123
|
r(s), t == null || t(s);
|
|
1124
1124
|
},
|
|
@@ -1128,24 +1128,24 @@ const hn = (t, e) => t || (e || 1) > 1 ? "below" : "header", mn = (t) => ({
|
|
|
1128
1128
|
currentPanel: e,
|
|
1129
1129
|
setCurrentPanel: n
|
|
1130
1130
|
};
|
|
1131
|
-
},
|
|
1131
|
+
}, Mn = ({
|
|
1132
1132
|
focusedInput: t,
|
|
1133
1133
|
value: e,
|
|
1134
1134
|
onValueChange: r,
|
|
1135
1135
|
setFocusedInput: n,
|
|
1136
1136
|
statePerMonth: s,
|
|
1137
1137
|
onChangePanel: i,
|
|
1138
|
-
initialDateInFocus:
|
|
1138
|
+
initialDateInFocus: o
|
|
1139
1139
|
}) => {
|
|
1140
|
-
const { currentPanel: a, setCurrentPanel: l } =
|
|
1141
|
-
() =>
|
|
1142
|
-
),
|
|
1140
|
+
const { currentPanel: a, setCurrentPanel: l } = Gt(i), [d, u] = I(
|
|
1141
|
+
() => o ?? /* @__PURE__ */ new Date()
|
|
1142
|
+
), m = yn(
|
|
1143
1143
|
e,
|
|
1144
1144
|
r,
|
|
1145
1145
|
t,
|
|
1146
1146
|
n
|
|
1147
|
-
),
|
|
1148
|
-
() =>
|
|
1147
|
+
), h = x(
|
|
1148
|
+
() => Nt(
|
|
1149
1149
|
s,
|
|
1150
1150
|
e == null ? void 0 : e.startDate,
|
|
1151
1151
|
e == null ? void 0 : e.endDate
|
|
@@ -1153,20 +1153,20 @@ const hn = (t, e) => t || (e || 1) > 1 ? "below" : "header", mn = (t) => ({
|
|
|
1153
1153
|
[s, e == null ? void 0 : e.endDate, e == null ? void 0 : e.startDate]
|
|
1154
1154
|
);
|
|
1155
1155
|
return {
|
|
1156
|
-
onClickDay:
|
|
1157
|
-
statePerMonth:
|
|
1156
|
+
onClickDay: m,
|
|
1157
|
+
statePerMonth: h,
|
|
1158
1158
|
currentPanel: a,
|
|
1159
1159
|
setCurrentPanel: l,
|
|
1160
1160
|
setDateInFocus: u,
|
|
1161
1161
|
dateInFocus: d
|
|
1162
1162
|
};
|
|
1163
1163
|
};
|
|
1164
|
-
function
|
|
1165
|
-
const e =
|
|
1166
|
-
return /* @__PURE__ */
|
|
1164
|
+
function qs(t) {
|
|
1165
|
+
const e = Mn(t);
|
|
1166
|
+
return /* @__PURE__ */ c(Mt, { ...t, ...e });
|
|
1167
1167
|
}
|
|
1168
|
-
const
|
|
1169
|
-
const [t, e] =
|
|
1168
|
+
const Js = () => {
|
|
1169
|
+
const [t, e] = I(), [r, n] = I(), [s, i] = I("startDate");
|
|
1170
1170
|
return {
|
|
1171
1171
|
startDate: t,
|
|
1172
1172
|
setStartDate: e,
|
|
@@ -1175,19 +1175,19 @@ const Cs = () => {
|
|
|
1175
1175
|
focusedInput: s,
|
|
1176
1176
|
setFocusedInput: i
|
|
1177
1177
|
};
|
|
1178
|
-
},
|
|
1178
|
+
}, kn = ({
|
|
1179
1179
|
onChange: t,
|
|
1180
1180
|
value: e,
|
|
1181
1181
|
statePerMonth: r,
|
|
1182
1182
|
onChangePanel: n
|
|
1183
1183
|
}) => {
|
|
1184
|
-
const { currentPanel: s, setCurrentPanel: i } =
|
|
1184
|
+
const { currentPanel: s, setCurrentPanel: i } = Gt(n), [o, a] = I(() => e ?? /* @__PURE__ */ new Date()), l = D(
|
|
1185
1185
|
(u) => {
|
|
1186
1186
|
t && t(u.date);
|
|
1187
1187
|
},
|
|
1188
1188
|
[t]
|
|
1189
|
-
), d =
|
|
1190
|
-
() => e ?
|
|
1189
|
+
), d = x(
|
|
1190
|
+
() => e ? ft(r, e, [
|
|
1191
1191
|
"selected",
|
|
1192
1192
|
"singleSelected"
|
|
1193
1193
|
]) : r,
|
|
@@ -1199,30 +1199,30 @@ const Cs = () => {
|
|
|
1199
1199
|
date: e,
|
|
1200
1200
|
currentPanel: s,
|
|
1201
1201
|
setCurrentPanel: i,
|
|
1202
|
-
dateInFocus:
|
|
1202
|
+
dateInFocus: o,
|
|
1203
1203
|
setDateInFocus: a
|
|
1204
1204
|
};
|
|
1205
1205
|
};
|
|
1206
|
-
function
|
|
1207
|
-
const e =
|
|
1208
|
-
return /* @__PURE__ */
|
|
1206
|
+
function Ke(t) {
|
|
1207
|
+
const e = kn(t);
|
|
1208
|
+
return /* @__PURE__ */ c(Mt, { ...t, ...e });
|
|
1209
1209
|
}
|
|
1210
|
-
const
|
|
1210
|
+
const Sn = ({
|
|
1211
1211
|
onChange: t,
|
|
1212
1212
|
value: e,
|
|
1213
1213
|
statePerMonth: r,
|
|
1214
1214
|
onChangePanel: n
|
|
1215
1215
|
}) => {
|
|
1216
|
-
const { currentPanel: s, setCurrentPanel: i } =
|
|
1216
|
+
const { currentPanel: s, setCurrentPanel: i } = Gt(n), [o, a] = I(() => /* @__PURE__ */ new Date()), l = D(
|
|
1217
1217
|
(u) => {
|
|
1218
1218
|
if (!t)
|
|
1219
1219
|
return;
|
|
1220
|
-
const
|
|
1221
|
-
t(e &&
|
|
1220
|
+
const m = e && e.find((h) => P(h, u.date));
|
|
1221
|
+
t(e && m ? e.filter((h) => !P(h, u.date)) : [...e || [], u.date]);
|
|
1222
1222
|
},
|
|
1223
1223
|
[t, e]
|
|
1224
|
-
), d =
|
|
1225
|
-
(u,
|
|
1224
|
+
), d = x(() => e ? e.reduce(
|
|
1225
|
+
(u, m) => ft(u, m, ["selected"]),
|
|
1226
1226
|
r
|
|
1227
1227
|
) : r, [r, e]);
|
|
1228
1228
|
return {
|
|
@@ -1230,149 +1230,149 @@ const wn = ({
|
|
|
1230
1230
|
statePerMonth: d,
|
|
1231
1231
|
currentPanel: s,
|
|
1232
1232
|
setCurrentPanel: i,
|
|
1233
|
-
dateInFocus:
|
|
1233
|
+
dateInFocus: o,
|
|
1234
1234
|
setDateInFocus: a
|
|
1235
1235
|
};
|
|
1236
1236
|
};
|
|
1237
|
-
function
|
|
1238
|
-
const e =
|
|
1239
|
-
return /* @__PURE__ */
|
|
1237
|
+
function Gs(t) {
|
|
1238
|
+
const e = Sn(t);
|
|
1239
|
+
return /* @__PURE__ */ c(Mt, { ...t, ...e });
|
|
1240
1240
|
}
|
|
1241
|
-
const
|
|
1241
|
+
const Tn = ({
|
|
1242
1242
|
onChange: t,
|
|
1243
1243
|
value: e,
|
|
1244
1244
|
statePerMonth: r,
|
|
1245
1245
|
onChangePanel: n,
|
|
1246
|
-
locale: s =
|
|
1246
|
+
locale: s = zt
|
|
1247
1247
|
}) => {
|
|
1248
|
-
const [i,
|
|
1249
|
-
const
|
|
1250
|
-
return
|
|
1251
|
-
}), { currentPanel: a, setCurrentPanel: l } =
|
|
1252
|
-
(
|
|
1253
|
-
t && t(
|
|
1248
|
+
const [i, o] = I(() => {
|
|
1249
|
+
const f = te(e, s);
|
|
1250
|
+
return f ? f.days[0].date : /* @__PURE__ */ new Date();
|
|
1251
|
+
}), { currentPanel: a, setCurrentPanel: l } = Gt(n), d = D(
|
|
1252
|
+
(f) => {
|
|
1253
|
+
t && t(Ie(be(f.date, s)));
|
|
1254
1254
|
},
|
|
1255
1255
|
[s, t]
|
|
1256
1256
|
), u = D(
|
|
1257
|
-
(
|
|
1258
|
-
t && t(
|
|
1257
|
+
(f) => {
|
|
1258
|
+
t && t(Ie(f));
|
|
1259
1259
|
},
|
|
1260
1260
|
[t]
|
|
1261
|
-
),
|
|
1262
|
-
const
|
|
1263
|
-
return
|
|
1264
|
-
}, [e, s, r]),
|
|
1265
|
-
const
|
|
1266
|
-
return
|
|
1261
|
+
), m = x(() => {
|
|
1262
|
+
const f = te(e, s);
|
|
1263
|
+
return f ? vr(r, f) : r;
|
|
1264
|
+
}, [e, s, r]), h = x(() => {
|
|
1265
|
+
const f = te(e, s);
|
|
1266
|
+
return f ? f.days[0].date : /* @__PURE__ */ new Date();
|
|
1267
1267
|
}, [s, e]);
|
|
1268
1268
|
return {
|
|
1269
|
-
statePerMonth:
|
|
1270
|
-
date:
|
|
1269
|
+
statePerMonth: m,
|
|
1270
|
+
date: h,
|
|
1271
1271
|
dateInFocus: i,
|
|
1272
|
-
setDateInFocus:
|
|
1272
|
+
setDateInFocus: o,
|
|
1273
1273
|
onClickDay: d,
|
|
1274
1274
|
onClickWeek: u,
|
|
1275
1275
|
currentPanel: a,
|
|
1276
1276
|
setCurrentPanel: l
|
|
1277
1277
|
};
|
|
1278
|
-
},
|
|
1278
|
+
}, Ie = (t) => {
|
|
1279
1279
|
if (t)
|
|
1280
1280
|
return `${t.endYear}-${t.weekNumber}`;
|
|
1281
|
-
},
|
|
1281
|
+
}, te = (t, e) => {
|
|
1282
1282
|
if (!t)
|
|
1283
1283
|
return;
|
|
1284
1284
|
const r = t.split("-"), n = parseInt(r[1], 10), s = parseInt(r[0], 10), i = /* @__PURE__ */ new Date();
|
|
1285
1285
|
i.setFullYear(s);
|
|
1286
|
-
const
|
|
1287
|
-
return
|
|
1286
|
+
const o = Ut(pr(i, n), { locale: e });
|
|
1287
|
+
return be(o, e);
|
|
1288
1288
|
};
|
|
1289
|
-
function
|
|
1290
|
-
const e =
|
|
1291
|
-
return /* @__PURE__ */
|
|
1289
|
+
function Qs(t) {
|
|
1290
|
+
const e = Tn(t);
|
|
1291
|
+
return /* @__PURE__ */ c(Mt, { ...t, ...e });
|
|
1292
1292
|
}
|
|
1293
|
-
const Ht = "bottom",
|
|
1294
|
-
const [n, s] =
|
|
1293
|
+
const Ht = "bottom", Rn = (t, e, r) => {
|
|
1294
|
+
const [n, s] = I(r || !1), i = D(() => (s(!0), !0), [s]), o = D(() => {
|
|
1295
1295
|
s(!1), e && e();
|
|
1296
1296
|
}, [s, e]), a = D(
|
|
1297
1297
|
(l) => {
|
|
1298
|
-
t && t(l), setTimeout(
|
|
1298
|
+
t && t(l), setTimeout(o, 150);
|
|
1299
1299
|
},
|
|
1300
|
-
[t,
|
|
1300
|
+
[t, o]
|
|
1301
1301
|
);
|
|
1302
1302
|
return {
|
|
1303
1303
|
showCalendar: i,
|
|
1304
|
-
hideCalendar:
|
|
1304
|
+
hideCalendar: o,
|
|
1305
1305
|
showingCalendar: n,
|
|
1306
1306
|
onSelectDate: a
|
|
1307
1307
|
};
|
|
1308
|
-
},
|
|
1309
|
-
displayFormat: t =
|
|
1308
|
+
}, Wt = "2999-12-31", Xs = ({
|
|
1309
|
+
displayFormat: t = at.fullDate,
|
|
1310
1310
|
placeholder: e = "Enter date",
|
|
1311
1311
|
value: r,
|
|
1312
1312
|
calendarTheme: n = yt,
|
|
1313
1313
|
calendarProps: s,
|
|
1314
1314
|
openOnMount: i,
|
|
1315
|
-
onClose:
|
|
1315
|
+
onClose: o,
|
|
1316
1316
|
onChange: a,
|
|
1317
1317
|
variant: l,
|
|
1318
1318
|
width: d,
|
|
1319
1319
|
minDate: u,
|
|
1320
|
-
maxDate:
|
|
1321
|
-
disabled:
|
|
1320
|
+
maxDate: m = Wt,
|
|
1321
|
+
disabled: h
|
|
1322
1322
|
}) => {
|
|
1323
|
-
const { hideCalendar:
|
|
1324
|
-
return /* @__PURE__ */
|
|
1325
|
-
|
|
1323
|
+
const { hideCalendar: f, showingCalendar: g, onSelectDate: w, showCalendar: y } = Rn(a, o, i);
|
|
1324
|
+
return /* @__PURE__ */ c(L, { width: d, children: /* @__PURE__ */ c(
|
|
1325
|
+
Bt,
|
|
1326
1326
|
{
|
|
1327
1327
|
hideArrow: !0,
|
|
1328
1328
|
open: g,
|
|
1329
|
-
onRequestClose:
|
|
1330
|
-
renderTrigger: (M) => /* @__PURE__ */
|
|
1329
|
+
onRequestClose: f,
|
|
1330
|
+
renderTrigger: (M) => /* @__PURE__ */ c(L, { ...M, children: /* @__PURE__ */ c(
|
|
1331
1331
|
bt,
|
|
1332
1332
|
{
|
|
1333
1333
|
type: "date",
|
|
1334
1334
|
onFocus: y,
|
|
1335
|
-
buttonRight: /* @__PURE__ */
|
|
1336
|
-
value: r ?
|
|
1335
|
+
buttonRight: /* @__PURE__ */ c(cr, { onClick: y, icon: Et }),
|
|
1336
|
+
value: r ? v(r, t) : "",
|
|
1337
1337
|
placeholder: e,
|
|
1338
1338
|
size: 9,
|
|
1339
|
-
disabled:
|
|
1339
|
+
disabled: h,
|
|
1340
1340
|
autoFocus: i,
|
|
1341
1341
|
variant: l,
|
|
1342
1342
|
min: u,
|
|
1343
|
-
max:
|
|
1343
|
+
max: m
|
|
1344
1344
|
}
|
|
1345
1345
|
) }),
|
|
1346
1346
|
placement: Ht,
|
|
1347
|
-
children: /* @__PURE__ */
|
|
1348
|
-
|
|
1347
|
+
children: /* @__PURE__ */ c(
|
|
1348
|
+
Ke,
|
|
1349
1349
|
{
|
|
1350
1350
|
...s,
|
|
1351
|
-
onChange:
|
|
1351
|
+
onChange: w,
|
|
1352
1352
|
value: r,
|
|
1353
1353
|
theme: n,
|
|
1354
1354
|
minDate: u,
|
|
1355
|
-
maxDate:
|
|
1355
|
+
maxDate: m
|
|
1356
1356
|
}
|
|
1357
1357
|
)
|
|
1358
1358
|
}
|
|
1359
1359
|
) });
|
|
1360
|
-
},
|
|
1361
|
-
const r =
|
|
1360
|
+
}, In = (t, e) => {
|
|
1361
|
+
const r = W(null), n = W(null), [s, i] = I(!1), [o, a] = I(void 0), l = D(() => (a("startDate"), i(!0), !0), [a, i]), d = D(() => (a("endDate"), i(!0), !0), [a, i]), u = D(() => {
|
|
1362
1362
|
i(!1);
|
|
1363
|
-
}, [i]),
|
|
1364
|
-
(
|
|
1365
|
-
|
|
1366
|
-
startDate:
|
|
1363
|
+
}, [i]), m = D(
|
|
1364
|
+
(f) => {
|
|
1365
|
+
o === "startDate" ? (e == null || e({
|
|
1366
|
+
startDate: f.date,
|
|
1367
1367
|
endDate: t == null ? void 0 : t.endDate
|
|
1368
|
-
}), t != null && t.endDate ? setTimeout(u, 150) : (a("endDate"), n.current && n.current.focus())) :
|
|
1368
|
+
}), t != null && t.endDate ? setTimeout(u, 150) : (a("endDate"), n.current && n.current.focus())) : o === "endDate" && (e == null || e({
|
|
1369
1369
|
startDate: t == null ? void 0 : t.startDate,
|
|
1370
|
-
endDate:
|
|
1370
|
+
endDate: f.date
|
|
1371
1371
|
}), t != null && t.startDate ? setTimeout(u, 150) : (a("startDate"), r.current && r.current.focus()));
|
|
1372
1372
|
},
|
|
1373
|
-
[
|
|
1374
|
-
),
|
|
1375
|
-
() => (t == null ? void 0 : t.startDate) && (t == null ? void 0 : t.endDate) &&
|
|
1373
|
+
[o, e, a, u, t]
|
|
1374
|
+
), h = x(
|
|
1375
|
+
() => (t == null ? void 0 : t.startDate) && (t == null ? void 0 : t.endDate) && V(t.startDate, t.endDate),
|
|
1376
1376
|
[t == null ? void 0 : t.startDate, t == null ? void 0 : t.endDate]
|
|
1377
1377
|
);
|
|
1378
1378
|
return {
|
|
@@ -1380,82 +1380,82 @@ const Ht = "bottom", Mn = (t, e, r) => {
|
|
|
1380
1380
|
hideCalendar: u,
|
|
1381
1381
|
showCalendarEndDate: d,
|
|
1382
1382
|
showCalendarStartDate: l,
|
|
1383
|
-
focusedInput:
|
|
1383
|
+
focusedInput: o,
|
|
1384
1384
|
setFocusedInput: a,
|
|
1385
1385
|
startDateInputRef: r,
|
|
1386
1386
|
endDateInputRef: n,
|
|
1387
|
-
onClickDay:
|
|
1388
|
-
startDateIsAfterEnd:
|
|
1387
|
+
onClickDay: m,
|
|
1388
|
+
startDateIsAfterEnd: h
|
|
1389
1389
|
};
|
|
1390
1390
|
};
|
|
1391
|
-
function
|
|
1392
|
-
displayFormat: t =
|
|
1391
|
+
function Zs({
|
|
1392
|
+
displayFormat: t = at.fullDate,
|
|
1393
1393
|
placeholderStartDate: e = "Start date",
|
|
1394
1394
|
placeholderEndDate: r = "End date",
|
|
1395
1395
|
value: n,
|
|
1396
1396
|
onValueChange: s,
|
|
1397
1397
|
width: i,
|
|
1398
|
-
calendarTheme:
|
|
1398
|
+
calendarTheme: o = yt,
|
|
1399
1399
|
calendarProps: a,
|
|
1400
1400
|
minDate: l,
|
|
1401
|
-
maxDate: d =
|
|
1401
|
+
maxDate: d = Wt,
|
|
1402
1402
|
disabled: u
|
|
1403
1403
|
}) {
|
|
1404
|
-
const [
|
|
1405
|
-
hideCalendar:
|
|
1404
|
+
const [m, h] = I("calendar"), {
|
|
1405
|
+
hideCalendar: f,
|
|
1406
1406
|
showCalendarEndDate: g,
|
|
1407
|
-
showCalendarStartDate:
|
|
1407
|
+
showCalendarStartDate: w,
|
|
1408
1408
|
showingCalendar: y,
|
|
1409
1409
|
focusedInput: M,
|
|
1410
|
-
startDateInputRef:
|
|
1411
|
-
endDateInputRef:
|
|
1410
|
+
startDateInputRef: p,
|
|
1411
|
+
endDateInputRef: b,
|
|
1412
1412
|
onClickDay: S,
|
|
1413
1413
|
startDateIsAfterEnd: T
|
|
1414
|
-
} =
|
|
1414
|
+
} = In(n, s), [N, A] = I(
|
|
1415
1415
|
() => (M && (n == null ? void 0 : n[M])) ?? /* @__PURE__ */ new Date()
|
|
1416
|
-
), k =
|
|
1417
|
-
() =>
|
|
1416
|
+
), k = x(
|
|
1417
|
+
() => Nt(void 0, n == null ? void 0 : n.startDate, n == null ? void 0 : n.endDate),
|
|
1418
1418
|
[n]
|
|
1419
1419
|
);
|
|
1420
|
-
return /* @__PURE__ */
|
|
1421
|
-
|
|
1420
|
+
return /* @__PURE__ */ c(
|
|
1421
|
+
Bt,
|
|
1422
1422
|
{
|
|
1423
1423
|
hideArrow: !0,
|
|
1424
|
-
renderTrigger: (
|
|
1425
|
-
/* @__PURE__ */
|
|
1424
|
+
renderTrigger: (R) => /* @__PURE__ */ _(B, { alignItems: "center", ...R, children: [
|
|
1425
|
+
/* @__PURE__ */ c(
|
|
1426
1426
|
bt,
|
|
1427
1427
|
{
|
|
1428
|
-
iconLeft:
|
|
1429
|
-
onFocus:
|
|
1430
|
-
value: n != null && n.startDate ?
|
|
1428
|
+
iconLeft: Et,
|
|
1429
|
+
onFocus: w,
|
|
1430
|
+
value: n != null && n.startDate ? v(n.startDate, t) : "",
|
|
1431
1431
|
placeholder: e,
|
|
1432
1432
|
width: i,
|
|
1433
1433
|
disabled: u,
|
|
1434
|
-
inputRef:
|
|
1434
|
+
inputRef: p,
|
|
1435
1435
|
size: 9,
|
|
1436
1436
|
variant: T ? "error" : void 0
|
|
1437
1437
|
}
|
|
1438
1438
|
),
|
|
1439
|
-
/* @__PURE__ */
|
|
1440
|
-
/* @__PURE__ */
|
|
1441
|
-
|
|
1439
|
+
/* @__PURE__ */ c(kt, {}),
|
|
1440
|
+
/* @__PURE__ */ c(
|
|
1441
|
+
_e,
|
|
1442
1442
|
{
|
|
1443
|
-
icon:
|
|
1444
|
-
color:
|
|
1443
|
+
icon: ar,
|
|
1444
|
+
color: qt("--lhds-color-ui-500"),
|
|
1445
1445
|
size: 14
|
|
1446
1446
|
}
|
|
1447
1447
|
),
|
|
1448
|
-
/* @__PURE__ */
|
|
1449
|
-
/* @__PURE__ */
|
|
1448
|
+
/* @__PURE__ */ c(kt, {}),
|
|
1449
|
+
/* @__PURE__ */ c(
|
|
1450
1450
|
bt,
|
|
1451
1451
|
{
|
|
1452
|
-
iconLeft:
|
|
1452
|
+
iconLeft: Et,
|
|
1453
1453
|
onFocus: g,
|
|
1454
|
-
value: n != null && n.endDate ?
|
|
1454
|
+
value: n != null && n.endDate ? v(n.endDate, t) : "",
|
|
1455
1455
|
placeholder: r,
|
|
1456
1456
|
width: i,
|
|
1457
1457
|
disabled: u,
|
|
1458
|
-
inputRef:
|
|
1458
|
+
inputRef: b,
|
|
1459
1459
|
size: 9,
|
|
1460
1460
|
variant: T ? "error" : void 0
|
|
1461
1461
|
}
|
|
@@ -1463,18 +1463,18 @@ function Js({
|
|
|
1463
1463
|
] }),
|
|
1464
1464
|
open: y,
|
|
1465
1465
|
placement: Ht,
|
|
1466
|
-
onRequestClose:
|
|
1467
|
-
children: /* @__PURE__ */
|
|
1466
|
+
onRequestClose: f,
|
|
1467
|
+
children: /* @__PURE__ */ c(
|
|
1468
1468
|
Mt,
|
|
1469
1469
|
{
|
|
1470
1470
|
...a,
|
|
1471
|
-
dateInFocus:
|
|
1472
|
-
setDateInFocus:
|
|
1471
|
+
dateInFocus: N,
|
|
1472
|
+
setDateInFocus: A,
|
|
1473
1473
|
statePerMonth: k,
|
|
1474
|
-
theme:
|
|
1474
|
+
theme: o,
|
|
1475
1475
|
onClickDay: S,
|
|
1476
|
-
currentPanel:
|
|
1477
|
-
setCurrentPanel:
|
|
1476
|
+
currentPanel: m,
|
|
1477
|
+
setCurrentPanel: h,
|
|
1478
1478
|
minDate: l,
|
|
1479
1479
|
maxDate: d
|
|
1480
1480
|
}
|
|
@@ -1482,60 +1482,60 @@ function Js({
|
|
|
1482
1482
|
}
|
|
1483
1483
|
);
|
|
1484
1484
|
}
|
|
1485
|
-
const
|
|
1485
|
+
const Vs = ({
|
|
1486
1486
|
calendarProps: t,
|
|
1487
1487
|
closeOnCalendarSelectDate: e = !0,
|
|
1488
|
-
dateFormat: r =
|
|
1488
|
+
dateFormat: r = at.fullDate,
|
|
1489
1489
|
disableCalender: n = !1,
|
|
1490
1490
|
onValueChange: s,
|
|
1491
1491
|
placeholder: i = "yyyy-mm-dd",
|
|
1492
|
-
value:
|
|
1492
|
+
value: o,
|
|
1493
1493
|
width: a = "130px",
|
|
1494
1494
|
calendarTheme: l = yt,
|
|
1495
1495
|
hideCalenderIcon: d = !1,
|
|
1496
1496
|
minDate: u,
|
|
1497
|
-
maxDate:
|
|
1498
|
-
variant:
|
|
1499
|
-
...
|
|
1497
|
+
maxDate: m = Wt,
|
|
1498
|
+
variant: h,
|
|
1499
|
+
...f
|
|
1500
1500
|
}) => {
|
|
1501
|
-
const [g,
|
|
1502
|
-
|
|
1503
|
-
}, [
|
|
1504
|
-
|
|
1505
|
-
}, [
|
|
1501
|
+
const [g, w] = I(!1), y = D(() => {
|
|
1502
|
+
w(!g);
|
|
1503
|
+
}, [w, g]), M = D(() => {
|
|
1504
|
+
w(!1);
|
|
1505
|
+
}, [w]), p = D(
|
|
1506
1506
|
(k) => {
|
|
1507
1507
|
s && s(k);
|
|
1508
1508
|
},
|
|
1509
1509
|
[s]
|
|
1510
|
-
),
|
|
1510
|
+
), b = D(
|
|
1511
1511
|
(k) => {
|
|
1512
|
-
k && (
|
|
1512
|
+
k && (p(v(k, r)), e && setTimeout(() => w(!g), 200));
|
|
1513
1513
|
},
|
|
1514
|
-
[
|
|
1515
|
-
), S = !!
|
|
1516
|
-
return /* @__PURE__ */
|
|
1517
|
-
|
|
1514
|
+
[p, r, e, w, g]
|
|
1515
|
+
), S = !!o && !/^[-/\\.0-9]+$/.test(o), T = !!o && Dr(pt(o, r, /* @__PURE__ */ new Date())), A = !!o && o.length >= r.length && !T || S;
|
|
1516
|
+
return /* @__PURE__ */ c(L, { width: a, children: /* @__PURE__ */ c(
|
|
1517
|
+
Bt,
|
|
1518
1518
|
{
|
|
1519
|
-
renderTrigger: (k) => /* @__PURE__ */
|
|
1519
|
+
renderTrigger: (k) => /* @__PURE__ */ c(
|
|
1520
1520
|
bt,
|
|
1521
1521
|
{
|
|
1522
|
-
...
|
|
1523
|
-
variant:
|
|
1522
|
+
...f,
|
|
1523
|
+
variant: A ? "error" : h,
|
|
1524
1524
|
disableContentPaddingRight: !0,
|
|
1525
|
-
contentRight: d ? void 0 : /* @__PURE__ */
|
|
1526
|
-
|
|
1525
|
+
contentRight: d ? void 0 : /* @__PURE__ */ c(B, { alignItems: "center", indent: 0.5, children: /* @__PURE__ */ c(
|
|
1526
|
+
tt,
|
|
1527
1527
|
{
|
|
1528
1528
|
size: "small",
|
|
1529
|
-
disabled:
|
|
1530
|
-
leftIcon:
|
|
1529
|
+
disabled: f.disabled || n,
|
|
1530
|
+
leftIcon: Et,
|
|
1531
1531
|
onClick: y
|
|
1532
1532
|
}
|
|
1533
1533
|
) }),
|
|
1534
|
-
onValueChange:
|
|
1534
|
+
onValueChange: p,
|
|
1535
1535
|
placeholder: i,
|
|
1536
|
-
value:
|
|
1536
|
+
value: o || "",
|
|
1537
1537
|
min: u,
|
|
1538
|
-
max:
|
|
1538
|
+
max: m,
|
|
1539
1539
|
size: 10,
|
|
1540
1540
|
...k
|
|
1541
1541
|
}
|
|
@@ -1544,20 +1544,20 @@ const Gs = ({
|
|
|
1544
1544
|
open: g,
|
|
1545
1545
|
placement: Ht,
|
|
1546
1546
|
onRequestClose: M,
|
|
1547
|
-
children: /* @__PURE__ */
|
|
1548
|
-
|
|
1547
|
+
children: /* @__PURE__ */ c(
|
|
1548
|
+
Ke,
|
|
1549
1549
|
{
|
|
1550
1550
|
...t,
|
|
1551
|
-
onChange:
|
|
1552
|
-
value:
|
|
1551
|
+
onChange: b,
|
|
1552
|
+
value: o && T ? pt(o, r, /* @__PURE__ */ new Date()) : void 0,
|
|
1553
1553
|
minDate: u,
|
|
1554
|
-
maxDate:
|
|
1554
|
+
maxDate: m,
|
|
1555
1555
|
theme: l
|
|
1556
1556
|
}
|
|
1557
1557
|
)
|
|
1558
1558
|
}
|
|
1559
1559
|
) });
|
|
1560
|
-
},
|
|
1560
|
+
}, Ft = (t) => {
|
|
1561
1561
|
if (t === "")
|
|
1562
1562
|
return "00";
|
|
1563
1563
|
const e = parseInt(t, 10);
|
|
@@ -1573,7 +1573,7 @@ const Gs = ({
|
|
|
1573
1573
|
default:
|
|
1574
1574
|
throw new Error("Invalid hour string");
|
|
1575
1575
|
}
|
|
1576
|
-
},
|
|
1576
|
+
}, jt = (t) => {
|
|
1577
1577
|
if (t === "")
|
|
1578
1578
|
return "00";
|
|
1579
1579
|
const e = parseInt(t, 10);
|
|
@@ -1589,13 +1589,13 @@ const Gs = ({
|
|
|
1589
1589
|
default:
|
|
1590
1590
|
throw new Error("Invalid minute string");
|
|
1591
1591
|
}
|
|
1592
|
-
},
|
|
1593
|
-
if (!
|
|
1592
|
+
}, xn = (t) => {
|
|
1593
|
+
if (!oe(t))
|
|
1594
1594
|
return { time: t, success: !1 };
|
|
1595
1595
|
const e = t && t.split(/-|:|,|;|[/]|[.]| /);
|
|
1596
1596
|
if (e && e.length === 2)
|
|
1597
1597
|
try {
|
|
1598
|
-
const r =
|
|
1598
|
+
const r = Ft(e[0]), n = jt(e[1]);
|
|
1599
1599
|
return { time: `${r}:${n}`, success: !0 };
|
|
1600
1600
|
} catch {
|
|
1601
1601
|
return { time: t, success: !1 };
|
|
@@ -1624,192 +1624,192 @@ const Gs = ({
|
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
1626
|
return { time: t, success: !1 };
|
|
1627
|
-
},
|
|
1627
|
+
}, oe = (t) => t ? /^[-:.,/; 0-9]+$/.test(t) : !0, ti = ({
|
|
1628
1628
|
onValueChange: t,
|
|
1629
1629
|
showPlaceholder: e = !0,
|
|
1630
1630
|
useIcon: r = !0,
|
|
1631
1631
|
value: n,
|
|
1632
1632
|
width: s = "85px",
|
|
1633
1633
|
variant: i,
|
|
1634
|
-
...
|
|
1634
|
+
...o
|
|
1635
1635
|
}) => {
|
|
1636
|
-
const [a, l] =
|
|
1636
|
+
const [a, l] = I(() => oe(n)), d = "hh:mm", u = D(() => {
|
|
1637
1637
|
if (n) {
|
|
1638
|
-
const
|
|
1639
|
-
l(
|
|
1638
|
+
const h = xn(n);
|
|
1639
|
+
l(h.success), h.success && t && t(h.time);
|
|
1640
1640
|
}
|
|
1641
|
-
}, [n, t, l]),
|
|
1642
|
-
(
|
|
1643
|
-
const
|
|
1644
|
-
l(g &&
|
|
1641
|
+
}, [n, t, l]), m = D(
|
|
1642
|
+
(h) => {
|
|
1643
|
+
const f = h.target.value, g = oe(f);
|
|
1644
|
+
l(g && f.length <= d.length), t && t(f);
|
|
1645
1645
|
},
|
|
1646
1646
|
[t, l]
|
|
1647
1647
|
);
|
|
1648
|
-
return /* @__PURE__ */
|
|
1648
|
+
return /* @__PURE__ */ c(
|
|
1649
1649
|
bt,
|
|
1650
1650
|
{
|
|
1651
|
-
...
|
|
1651
|
+
...o,
|
|
1652
1652
|
type: "time",
|
|
1653
1653
|
variant: a ? i : "error",
|
|
1654
|
-
iconLeft: r ?
|
|
1654
|
+
iconLeft: r ? Ne : void 0,
|
|
1655
1655
|
value: n,
|
|
1656
1656
|
placeholder: e ? d : void 0,
|
|
1657
|
-
onChange:
|
|
1657
|
+
onChange: m,
|
|
1658
1658
|
onBlur: u,
|
|
1659
1659
|
width: s
|
|
1660
1660
|
}
|
|
1661
1661
|
);
|
|
1662
|
-
},
|
|
1662
|
+
}, ze = ({
|
|
1663
1663
|
autoFocusLeft: t,
|
|
1664
1664
|
autoFocusRight: e,
|
|
1665
1665
|
onEsc: r,
|
|
1666
1666
|
onEnter: n,
|
|
1667
1667
|
onValueChangeLeft: s,
|
|
1668
1668
|
onValueChangeRight: i,
|
|
1669
|
-
separatorIcon:
|
|
1669
|
+
separatorIcon: o,
|
|
1670
1670
|
placeholderLeft: a,
|
|
1671
1671
|
placeholderRight: l,
|
|
1672
1672
|
typeLeft: d,
|
|
1673
1673
|
typeRight: u,
|
|
1674
|
-
onChangeLeft:
|
|
1675
|
-
onChangeRight:
|
|
1676
|
-
valueLeft:
|
|
1674
|
+
onChangeLeft: m,
|
|
1675
|
+
onChangeRight: h,
|
|
1676
|
+
valueLeft: f,
|
|
1677
1677
|
valueRight: g,
|
|
1678
|
-
minLeft:
|
|
1678
|
+
minLeft: w,
|
|
1679
1679
|
maxLeft: y,
|
|
1680
1680
|
minRight: M,
|
|
1681
|
-
maxRight:
|
|
1682
|
-
onClickLeft:
|
|
1681
|
+
maxRight: p,
|
|
1682
|
+
onClickLeft: b,
|
|
1683
1683
|
onClickRight: S,
|
|
1684
1684
|
onClickCalendar: T,
|
|
1685
|
-
onClickArrowDown:
|
|
1686
|
-
onBlurLeft:
|
|
1685
|
+
onClickArrowDown: N,
|
|
1686
|
+
onBlurLeft: A,
|
|
1687
1687
|
onBlurRight: k,
|
|
1688
|
-
onFocusLeft:
|
|
1689
|
-
onFocusRight:
|
|
1690
|
-
inputRefLeft:
|
|
1691
|
-
inputRefRight:
|
|
1692
|
-
variant:
|
|
1693
|
-
variantLeft:
|
|
1694
|
-
variantRight:
|
|
1695
|
-
onBlur:
|
|
1696
|
-
showPresets:
|
|
1697
|
-
widthLeft:
|
|
1698
|
-
widthRight:
|
|
1699
|
-
disabled:
|
|
1688
|
+
onFocusLeft: R,
|
|
1689
|
+
onFocusRight: Y,
|
|
1690
|
+
inputRefLeft: G,
|
|
1691
|
+
inputRefRight: E,
|
|
1692
|
+
variant: $,
|
|
1693
|
+
variantLeft: z,
|
|
1694
|
+
variantRight: j,
|
|
1695
|
+
onBlur: H,
|
|
1696
|
+
showPresets: Q,
|
|
1697
|
+
widthLeft: X,
|
|
1698
|
+
widthRight: nt,
|
|
1699
|
+
disabled: q
|
|
1700
1700
|
}) => {
|
|
1701
|
-
const
|
|
1702
|
-
() =>
|
|
1703
|
-
|
|
1701
|
+
const C = W(0), K = x(
|
|
1702
|
+
() => Ar((F) => {
|
|
1703
|
+
F === 0 && (H == null || H());
|
|
1704
1704
|
}, 10),
|
|
1705
|
-
[
|
|
1706
|
-
),
|
|
1707
|
-
(
|
|
1708
|
-
|
|
1705
|
+
[H]
|
|
1706
|
+
), st = D(
|
|
1707
|
+
(F) => {
|
|
1708
|
+
C.current++, K(C.current), R && R(F);
|
|
1709
1709
|
},
|
|
1710
|
-
[
|
|
1711
|
-
),
|
|
1712
|
-
(
|
|
1713
|
-
|
|
1710
|
+
[R, C, K]
|
|
1711
|
+
), it = D(
|
|
1712
|
+
(F) => {
|
|
1713
|
+
C.current++, K(C.current), Y && Y(F);
|
|
1714
1714
|
},
|
|
1715
|
-
[
|
|
1716
|
-
),
|
|
1717
|
-
(
|
|
1718
|
-
|
|
1715
|
+
[Y, C, K]
|
|
1716
|
+
), O = D(
|
|
1717
|
+
(F) => {
|
|
1718
|
+
C.current--, K(C.current), A && A(F);
|
|
1719
1719
|
},
|
|
1720
|
-
[
|
|
1721
|
-
),
|
|
1722
|
-
(
|
|
1723
|
-
|
|
1720
|
+
[A, C, K]
|
|
1721
|
+
), U = D(
|
|
1722
|
+
(F) => {
|
|
1723
|
+
C.current--, K(C.current), k && k(F);
|
|
1724
1724
|
},
|
|
1725
|
-
[k,
|
|
1725
|
+
[k, C, K]
|
|
1726
1726
|
);
|
|
1727
|
-
return /* @__PURE__ */
|
|
1728
|
-
|
|
1727
|
+
return /* @__PURE__ */ c(L, { children: /* @__PURE__ */ _(
|
|
1728
|
+
Nr,
|
|
1729
1729
|
{
|
|
1730
1730
|
disableContentPaddingRight: !0,
|
|
1731
|
-
disabled:
|
|
1732
|
-
variant:
|
|
1733
|
-
contentRight: /* @__PURE__ */
|
|
1734
|
-
/* @__PURE__ */
|
|
1735
|
-
|
|
1731
|
+
disabled: q,
|
|
1732
|
+
variant: $,
|
|
1733
|
+
contentRight: /* @__PURE__ */ _(B, { alignItems: "center", children: [
|
|
1734
|
+
/* @__PURE__ */ c(xt, { num: 0.5, children: /* @__PURE__ */ c(
|
|
1735
|
+
tt,
|
|
1736
1736
|
{
|
|
1737
|
-
leftIcon:
|
|
1737
|
+
leftIcon: Et,
|
|
1738
1738
|
onClick: T,
|
|
1739
|
-
disabled:
|
|
1739
|
+
disabled: q,
|
|
1740
1740
|
size: "small"
|
|
1741
1741
|
}
|
|
1742
1742
|
) }),
|
|
1743
|
-
|
|
1744
|
-
/* @__PURE__ */
|
|
1745
|
-
/* @__PURE__ */
|
|
1746
|
-
|
|
1743
|
+
Q ? /* @__PURE__ */ _(de, { children: [
|
|
1744
|
+
/* @__PURE__ */ c(B, { height: "22px", children: /* @__PURE__ */ c(rr, { vertical: !0 }) }),
|
|
1745
|
+
/* @__PURE__ */ c(xt, { num: 0.5, children: /* @__PURE__ */ c(
|
|
1746
|
+
tt,
|
|
1747
1747
|
{
|
|
1748
|
-
leftIcon:
|
|
1749
|
-
onClick:
|
|
1750
|
-
disabled:
|
|
1748
|
+
leftIcon: fe,
|
|
1749
|
+
onClick: N,
|
|
1750
|
+
disabled: q,
|
|
1751
1751
|
size: "small"
|
|
1752
1752
|
}
|
|
1753
1753
|
) })
|
|
1754
1754
|
] }) : null
|
|
1755
1755
|
] }),
|
|
1756
1756
|
children: [
|
|
1757
|
-
/* @__PURE__ */
|
|
1757
|
+
/* @__PURE__ */ c(L, { width: X, children: /* @__PURE__ */ c(
|
|
1758
1758
|
bt,
|
|
1759
1759
|
{
|
|
1760
1760
|
onEsc: r,
|
|
1761
1761
|
onEnter: n,
|
|
1762
|
-
onClick:
|
|
1763
|
-
disabled:
|
|
1762
|
+
onClick: b,
|
|
1763
|
+
disabled: q,
|
|
1764
1764
|
hideBorder: !0,
|
|
1765
1765
|
placeholder: a,
|
|
1766
|
-
value:
|
|
1766
|
+
value: f,
|
|
1767
1767
|
onValueChange: s,
|
|
1768
|
-
onChange:
|
|
1769
|
-
onBlur:
|
|
1770
|
-
onFocus:
|
|
1771
|
-
inputRef:
|
|
1772
|
-
variant:
|
|
1768
|
+
onChange: m,
|
|
1769
|
+
onBlur: O,
|
|
1770
|
+
onFocus: st,
|
|
1771
|
+
inputRef: G,
|
|
1772
|
+
variant: z,
|
|
1773
1773
|
type: d,
|
|
1774
1774
|
autoFocus: t,
|
|
1775
|
-
min:
|
|
1775
|
+
min: w,
|
|
1776
1776
|
max: y
|
|
1777
1777
|
}
|
|
1778
1778
|
) }),
|
|
1779
|
-
/* @__PURE__ */
|
|
1780
|
-
|
|
1779
|
+
/* @__PURE__ */ c(B, { indent: 0.5, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ c(
|
|
1780
|
+
_e,
|
|
1781
1781
|
{
|
|
1782
|
-
icon:
|
|
1782
|
+
icon: o,
|
|
1783
1783
|
size: 12,
|
|
1784
|
-
color:
|
|
1784
|
+
color: qt("--lhds-color-ui-500")
|
|
1785
1785
|
}
|
|
1786
1786
|
) }),
|
|
1787
|
-
/* @__PURE__ */
|
|
1787
|
+
/* @__PURE__ */ c(L, { width: nt, children: /* @__PURE__ */ c(
|
|
1788
1788
|
bt,
|
|
1789
1789
|
{
|
|
1790
1790
|
onEsc: r,
|
|
1791
1791
|
onEnter: n,
|
|
1792
1792
|
onClick: S,
|
|
1793
|
-
disabled:
|
|
1793
|
+
disabled: q,
|
|
1794
1794
|
hideBorder: !0,
|
|
1795
1795
|
placeholder: l,
|
|
1796
1796
|
value: g,
|
|
1797
1797
|
onValueChange: i,
|
|
1798
|
-
onChange:
|
|
1799
|
-
onBlur:
|
|
1800
|
-
onFocus:
|
|
1801
|
-
inputRef:
|
|
1802
|
-
variant:
|
|
1798
|
+
onChange: h,
|
|
1799
|
+
onBlur: U,
|
|
1800
|
+
onFocus: it,
|
|
1801
|
+
inputRef: E,
|
|
1802
|
+
variant: j,
|
|
1803
1803
|
type: u,
|
|
1804
1804
|
autoFocus: e,
|
|
1805
1805
|
min: M,
|
|
1806
|
-
max:
|
|
1806
|
+
max: p
|
|
1807
1807
|
}
|
|
1808
1808
|
) })
|
|
1809
1809
|
]
|
|
1810
1810
|
}
|
|
1811
1811
|
) });
|
|
1812
|
-
},
|
|
1812
|
+
}, En = (t) => {
|
|
1813
1813
|
if (t == null)
|
|
1814
1814
|
throw new Error("Time is not set.");
|
|
1815
1815
|
if (t === "")
|
|
@@ -1831,38 +1831,38 @@ const Gs = ({
|
|
|
1831
1831
|
if (n < 0 || n > 59)
|
|
1832
1832
|
throw new Error("Invalid time.");
|
|
1833
1833
|
return r * 100 + n;
|
|
1834
|
-
},
|
|
1834
|
+
}, An = (t) => {
|
|
1835
1835
|
try {
|
|
1836
|
-
return
|
|
1836
|
+
return En(t), !0;
|
|
1837
1837
|
} catch {
|
|
1838
1838
|
return !1;
|
|
1839
1839
|
}
|
|
1840
1840
|
}, Ot = (t) => {
|
|
1841
|
-
if (t &&
|
|
1841
|
+
if (t && An(t)) {
|
|
1842
1842
|
const e = t.split(":");
|
|
1843
1843
|
return {
|
|
1844
|
-
hour:
|
|
1845
|
-
minute:
|
|
1844
|
+
hour: Me(e[0]),
|
|
1845
|
+
minute: Me(e[1])
|
|
1846
1846
|
};
|
|
1847
1847
|
}
|
|
1848
1848
|
return {
|
|
1849
1849
|
hour: void 0,
|
|
1850
1850
|
minute: void 0
|
|
1851
1851
|
};
|
|
1852
|
-
},
|
|
1852
|
+
}, _n = (t) => `${Ft(String(t.getHours()))}:${jt(
|
|
1853
1853
|
String(t.getMinutes())
|
|
1854
|
-
)}`,
|
|
1855
|
-
timePicker:
|
|
1856
|
-
timePickerColumn:
|
|
1857
|
-
},
|
|
1854
|
+
)}`, Nn = "_timePicker_1w05d_1", Ln = "_timePickerColumn_1w05d_6", qe = {
|
|
1855
|
+
timePicker: Nn,
|
|
1856
|
+
timePickerColumn: Ln
|
|
1857
|
+
}, Pn = ({
|
|
1858
1858
|
onClick: t,
|
|
1859
1859
|
item: e,
|
|
1860
1860
|
selected: r,
|
|
1861
1861
|
columnRef: n,
|
|
1862
1862
|
canScrollRef: s
|
|
1863
1863
|
}) => {
|
|
1864
|
-
const i =
|
|
1865
|
-
return
|
|
1864
|
+
const i = W(null);
|
|
1865
|
+
return rt(
|
|
1866
1866
|
function() {
|
|
1867
1867
|
if (r && n.current && i.current && s.current) {
|
|
1868
1868
|
const a = i.current.scrollHeight * Math.max(e - 2, 0);
|
|
@@ -1870,22 +1870,22 @@ const Gs = ({
|
|
|
1870
1870
|
}
|
|
1871
1871
|
},
|
|
1872
1872
|
[n, e, r, s]
|
|
1873
|
-
), /* @__PURE__ */
|
|
1874
|
-
|
|
1873
|
+
), /* @__PURE__ */ c(
|
|
1874
|
+
B,
|
|
1875
1875
|
{
|
|
1876
1876
|
width: "64px",
|
|
1877
1877
|
justifyContent: "center",
|
|
1878
1878
|
spacing: 0.5,
|
|
1879
1879
|
indent: 0.5,
|
|
1880
1880
|
ref: i,
|
|
1881
|
-
children: r ? /* @__PURE__ */
|
|
1881
|
+
children: r ? /* @__PURE__ */ c(
|
|
1882
1882
|
St,
|
|
1883
1883
|
{
|
|
1884
|
-
label:
|
|
1884
|
+
label: _r(String(e), 2, "0"),
|
|
1885
1885
|
onClick: () => t && t(e)
|
|
1886
1886
|
}
|
|
1887
|
-
) : /* @__PURE__ */
|
|
1888
|
-
|
|
1887
|
+
) : /* @__PURE__ */ c(
|
|
1888
|
+
tt,
|
|
1889
1889
|
{
|
|
1890
1890
|
label: String(e).padStart(2, "0"),
|
|
1891
1891
|
onClick: () => t && t(e)
|
|
@@ -1893,15 +1893,15 @@ const Gs = ({
|
|
|
1893
1893
|
)
|
|
1894
1894
|
}
|
|
1895
1895
|
);
|
|
1896
|
-
},
|
|
1896
|
+
}, xe = ({
|
|
1897
1897
|
onClick: t,
|
|
1898
1898
|
items: e,
|
|
1899
1899
|
selectedItem: r,
|
|
1900
1900
|
canScrollRef: n
|
|
1901
1901
|
}) => {
|
|
1902
|
-
const s =
|
|
1903
|
-
return /* @__PURE__ */
|
|
1904
|
-
|
|
1902
|
+
const s = W(null);
|
|
1903
|
+
return /* @__PURE__ */ c(J, { className: qe.timePickerColumn, ref: s, children: e.map((i) => /* @__PURE__ */ c(
|
|
1904
|
+
Pn,
|
|
1905
1905
|
{
|
|
1906
1906
|
item: i,
|
|
1907
1907
|
onClick: t,
|
|
@@ -1911,60 +1911,60 @@ const Gs = ({
|
|
|
1911
1911
|
},
|
|
1912
1912
|
i
|
|
1913
1913
|
)) });
|
|
1914
|
-
},
|
|
1914
|
+
}, Yn = ge(0, 24), Bn = ge(0, 60), vn = ({
|
|
1915
1915
|
value: t,
|
|
1916
1916
|
onValueChange: e
|
|
1917
1917
|
}) => {
|
|
1918
|
-
const r =
|
|
1919
|
-
|
|
1918
|
+
const r = W(!0), [n, s] = I(void 0), [i, o] = I(void 0);
|
|
1919
|
+
rt(() => {
|
|
1920
1920
|
if (t) {
|
|
1921
1921
|
const { minute: d, hour: u } = Ot(t);
|
|
1922
|
-
s(u),
|
|
1922
|
+
s(u), o(d);
|
|
1923
1923
|
}
|
|
1924
1924
|
}, [t]);
|
|
1925
1925
|
const a = D(
|
|
1926
1926
|
(d) => {
|
|
1927
1927
|
s(d), e == null || e(
|
|
1928
|
-
`${
|
|
1928
|
+
`${Ft(String(d ?? 0))}:${jt(String(i ?? 0))}`
|
|
1929
1929
|
);
|
|
1930
1930
|
},
|
|
1931
1931
|
[i, e]
|
|
1932
1932
|
), l = D(
|
|
1933
1933
|
(d) => {
|
|
1934
|
-
|
|
1935
|
-
`${
|
|
1934
|
+
o(d), e == null || e(
|
|
1935
|
+
`${Ft(String(n ?? 0))}:${jt(String(d ?? 0))}`
|
|
1936
1936
|
);
|
|
1937
1937
|
},
|
|
1938
1938
|
[n, e]
|
|
1939
1939
|
);
|
|
1940
|
-
return /* @__PURE__ */
|
|
1941
|
-
/* @__PURE__ */
|
|
1942
|
-
|
|
1940
|
+
return /* @__PURE__ */ _(B, { className: qe.timePicker, children: [
|
|
1941
|
+
/* @__PURE__ */ c(
|
|
1942
|
+
xe,
|
|
1943
1943
|
{
|
|
1944
|
-
items:
|
|
1944
|
+
items: Yn,
|
|
1945
1945
|
onClick: a,
|
|
1946
1946
|
selectedItem: n,
|
|
1947
1947
|
canScrollRef: r
|
|
1948
1948
|
}
|
|
1949
1949
|
),
|
|
1950
|
-
/* @__PURE__ */
|
|
1951
|
-
/* @__PURE__ */
|
|
1952
|
-
|
|
1950
|
+
/* @__PURE__ */ c(xt, {}),
|
|
1951
|
+
/* @__PURE__ */ c(
|
|
1952
|
+
xe,
|
|
1953
1953
|
{
|
|
1954
|
-
items:
|
|
1954
|
+
items: Bn,
|
|
1955
1955
|
onClick: l,
|
|
1956
1956
|
selectedItem: i,
|
|
1957
1957
|
canScrollRef: r
|
|
1958
1958
|
}
|
|
1959
1959
|
)
|
|
1960
1960
|
] });
|
|
1961
|
-
},
|
|
1962
|
-
|
|
1961
|
+
}, Hn = (t, e, r) => {
|
|
1962
|
+
rt(
|
|
1963
1963
|
function() {
|
|
1964
1964
|
t && e(t);
|
|
1965
1965
|
},
|
|
1966
1966
|
[t, e]
|
|
1967
|
-
),
|
|
1967
|
+
), rt(
|
|
1968
1968
|
function() {
|
|
1969
1969
|
r.current && (t ? r.current.valueAsDate = new Date(
|
|
1970
1970
|
Date.UTC(t.getFullYear(), t.getMonth(), t.getDate())
|
|
@@ -1972,81 +1972,81 @@ const Gs = ({
|
|
|
1972
1972
|
},
|
|
1973
1973
|
[t, r]
|
|
1974
1974
|
);
|
|
1975
|
-
},
|
|
1975
|
+
}, Wn = (t, e, {
|
|
1976
1976
|
setDateInFocus: r,
|
|
1977
1977
|
showCalendarInternal: n,
|
|
1978
1978
|
hideCalendarInternal: s,
|
|
1979
1979
|
setFirstFocusedInput: i,
|
|
1980
|
-
setCurrentPanel:
|
|
1980
|
+
setCurrentPanel: o,
|
|
1981
1981
|
localTime: a,
|
|
1982
1982
|
setLocalTime: l,
|
|
1983
1983
|
localDate: d,
|
|
1984
1984
|
setLocalDate: u
|
|
1985
|
-
},
|
|
1986
|
-
const
|
|
1987
|
-
(
|
|
1988
|
-
if (!
|
|
1985
|
+
}, m) => {
|
|
1986
|
+
const h = D(
|
|
1987
|
+
(p) => {
|
|
1988
|
+
if (!p)
|
|
1989
1989
|
return;
|
|
1990
|
-
const
|
|
1990
|
+
const b = new Date(p);
|
|
1991
1991
|
if (t)
|
|
1992
|
-
|
|
1992
|
+
b.setHours(t.getHours()), b.setMinutes(t.getMinutes()), e == null || e(b), u(void 0);
|
|
1993
1993
|
else if (a) {
|
|
1994
1994
|
const { minute: S, hour: T } = Ot(a);
|
|
1995
|
-
|
|
1995
|
+
b.setHours(T ?? 0), b.setMinutes(S ?? 0), e == null || e(b), u(void 0);
|
|
1996
1996
|
} else
|
|
1997
|
-
u(
|
|
1998
|
-
r(
|
|
1999
|
-
Date.UTC(
|
|
1997
|
+
u(b);
|
|
1998
|
+
r(b), m.current && (m.current.valueAsDate = new Date(
|
|
1999
|
+
Date.UTC(b.getFullYear(), b.getMonth(), b.getDate())
|
|
2000
2000
|
));
|
|
2001
2001
|
},
|
|
2002
|
-
[t,
|
|
2003
|
-
),
|
|
2004
|
-
(
|
|
2005
|
-
if (
|
|
2002
|
+
[t, m, a, e, r, u]
|
|
2003
|
+
), f = D(
|
|
2004
|
+
(p) => {
|
|
2005
|
+
if (p)
|
|
2006
2006
|
if (t) {
|
|
2007
|
-
const
|
|
2008
|
-
S.setHours(
|
|
2007
|
+
const b = Ot(p), S = new Date(t);
|
|
2008
|
+
S.setHours(b.hour || 0), S.setMinutes(b.minute || 0), e == null || e(S), l(void 0);
|
|
2009
2009
|
} else if (d) {
|
|
2010
|
-
const
|
|
2011
|
-
S.setHours(
|
|
2010
|
+
const b = Ot(p), S = new Date(d);
|
|
2011
|
+
S.setHours(b.hour || 0), S.setMinutes(b.minute || 0), e == null || e(S), l(void 0);
|
|
2012
2012
|
} else
|
|
2013
|
-
l(
|
|
2013
|
+
l(p);
|
|
2014
2014
|
},
|
|
2015
2015
|
[e, t, d, l]
|
|
2016
2016
|
), g = D(
|
|
2017
|
-
(
|
|
2018
|
-
|
|
2017
|
+
(p) => {
|
|
2018
|
+
p.target.value[0] !== "0" && h(p.target.valueAsDate);
|
|
2019
2019
|
},
|
|
2020
|
+
[h]
|
|
2021
|
+
), w = D(
|
|
2022
|
+
(p) => f(p.target.value),
|
|
2020
2023
|
[f]
|
|
2021
|
-
), p = D(
|
|
2022
|
-
(b) => m(b.target.value),
|
|
2023
|
-
[m]
|
|
2024
2024
|
), y = D(() => {
|
|
2025
|
-
r(t || /* @__PURE__ */ new Date()),
|
|
2026
|
-
}, [t,
|
|
2025
|
+
r(t || /* @__PURE__ */ new Date()), o("calendar"), n();
|
|
2026
|
+
}, [t, o, n, r]), M = D(() => {
|
|
2027
2027
|
i(void 0), s();
|
|
2028
2028
|
}, [i, s]);
|
|
2029
2029
|
return {
|
|
2030
2030
|
inputLeftChangeHandler: g,
|
|
2031
|
-
inputRightChangeHandler:
|
|
2031
|
+
inputRightChangeHandler: w,
|
|
2032
2032
|
hideCalendar: M,
|
|
2033
2033
|
showCalendar: y,
|
|
2034
|
-
onChangeTime:
|
|
2035
|
-
onChangeDate:
|
|
2034
|
+
onChangeTime: f,
|
|
2035
|
+
onChangeDate: h
|
|
2036
2036
|
};
|
|
2037
|
-
},
|
|
2038
|
-
const [e, r] =
|
|
2037
|
+
}, $n = (t) => {
|
|
2038
|
+
const [e, r] = I(void 0), [n, s] = I(void 0), [i, o, a] = se(!1), [l, d, u] = se(!1), [m, h] = I(void 0), [f, g] = I(
|
|
2039
2039
|
() => t ?? /* @__PURE__ */ new Date()
|
|
2040
|
-
), [
|
|
2040
|
+
), [w, y] = I("calendar");
|
|
2041
2041
|
return {
|
|
2042
2042
|
isCalendarVisible: i,
|
|
2043
|
-
showCalendarInternal:
|
|
2043
|
+
showCalendarInternal: o,
|
|
2044
2044
|
hideCalendarInternal: a,
|
|
2045
|
-
firstFocusedInput:
|
|
2046
|
-
setFirstFocusedInput:
|
|
2047
|
-
dateInFocus:
|
|
2045
|
+
firstFocusedInput: m,
|
|
2046
|
+
setFirstFocusedInput: h,
|
|
2047
|
+
dateInFocus: f,
|
|
2048
2048
|
setDateInFocus: g,
|
|
2049
|
-
currentPanel:
|
|
2049
|
+
currentPanel: w,
|
|
2050
2050
|
setCurrentPanel: y,
|
|
2051
2051
|
isTimePickerVisible: l,
|
|
2052
2052
|
showTimePicker: d,
|
|
@@ -2056,24 +2056,24 @@ const Gs = ({
|
|
|
2056
2056
|
localTime: n,
|
|
2057
2057
|
setLocalTime: s
|
|
2058
2058
|
};
|
|
2059
|
-
},
|
|
2059
|
+
}, On = (t, e, r, n, {
|
|
2060
2060
|
isCalendarVisible: s,
|
|
2061
2061
|
setCurrentPanel: i,
|
|
2062
|
-
showTimePicker:
|
|
2062
|
+
showTimePicker: o,
|
|
2063
2063
|
hideTimePicker: a
|
|
2064
2064
|
}) => {
|
|
2065
2065
|
const l = D(() => {
|
|
2066
2066
|
s || r(), i("calendar"), a();
|
|
2067
2067
|
}, [a, s, i, r]), d = D(() => {
|
|
2068
|
-
n(),
|
|
2069
|
-
}, [n,
|
|
2068
|
+
n(), o();
|
|
2069
|
+
}, [n, o]), u = D(
|
|
2070
2070
|
(g) => {
|
|
2071
|
-
t(g.date), n(),
|
|
2071
|
+
t(g.date), n(), o();
|
|
2072
2072
|
},
|
|
2073
|
-
[t, n,
|
|
2074
|
-
),
|
|
2073
|
+
[t, n, o]
|
|
2074
|
+
), m = D(() => {
|
|
2075
2075
|
i("presets"), r();
|
|
2076
|
-
}, [i, r]),
|
|
2076
|
+
}, [i, r]), h = D(() => {
|
|
2077
2077
|
var g;
|
|
2078
2078
|
s ? n() : ((g = e.current) == null || g.focus(), i("calendar"), r());
|
|
2079
2079
|
}, [
|
|
@@ -2082,7 +2082,7 @@ const Gs = ({
|
|
|
2082
2082
|
e,
|
|
2083
2083
|
i,
|
|
2084
2084
|
r
|
|
2085
|
-
]),
|
|
2085
|
+
]), f = D(
|
|
2086
2086
|
(g) => {
|
|
2087
2087
|
g.key === "Escape" && n();
|
|
2088
2088
|
},
|
|
@@ -2092,175 +2092,175 @@ const Gs = ({
|
|
|
2092
2092
|
onFocusLeft: l,
|
|
2093
2093
|
onFocusRight: d,
|
|
2094
2094
|
onClickDay: u,
|
|
2095
|
-
onClickArrowButton:
|
|
2096
|
-
onClickCalendarButton:
|
|
2097
|
-
onKeyDownHandler:
|
|
2095
|
+
onClickArrowButton: m,
|
|
2096
|
+
onClickCalendarButton: h,
|
|
2097
|
+
onKeyDownHandler: f
|
|
2098
2098
|
};
|
|
2099
|
-
},
|
|
2099
|
+
}, ei = ({
|
|
2100
2100
|
value: t,
|
|
2101
2101
|
onValueChange: e,
|
|
2102
2102
|
onEnter: r,
|
|
2103
2103
|
onEsc: n,
|
|
2104
2104
|
onBlur: s,
|
|
2105
2105
|
autoFocus: i,
|
|
2106
|
-
minDate:
|
|
2106
|
+
minDate: o,
|
|
2107
2107
|
widthLeft: a = 128,
|
|
2108
2108
|
widthRight: l = 80,
|
|
2109
|
-
maxDate: d =
|
|
2109
|
+
maxDate: d = Wt,
|
|
2110
2110
|
variant: u,
|
|
2111
|
-
disabled:
|
|
2111
|
+
disabled: m
|
|
2112
2112
|
}) => {
|
|
2113
|
-
const
|
|
2114
|
-
setCurrentPanel:
|
|
2113
|
+
const h = W(null), f = W(null), g = $n(t), {
|
|
2114
|
+
setCurrentPanel: w,
|
|
2115
2115
|
currentPanel: y,
|
|
2116
2116
|
isCalendarVisible: M,
|
|
2117
|
-
dateInFocus:
|
|
2118
|
-
setDateInFocus:
|
|
2117
|
+
dateInFocus: p,
|
|
2118
|
+
setDateInFocus: b,
|
|
2119
2119
|
isTimePickerVisible: S,
|
|
2120
2120
|
hideTimePicker: T,
|
|
2121
|
-
localTime:
|
|
2122
|
-
localDate:
|
|
2121
|
+
localTime: N,
|
|
2122
|
+
localDate: A
|
|
2123
2123
|
} = g, {
|
|
2124
2124
|
showCalendar: k,
|
|
2125
|
-
hideCalendar:
|
|
2126
|
-
inputLeftChangeHandler:
|
|
2127
|
-
inputRightChangeHandler:
|
|
2128
|
-
onChangeTime:
|
|
2129
|
-
onChangeDate:
|
|
2130
|
-
} =
|
|
2131
|
-
onKeyDownHandler:
|
|
2132
|
-
onFocusRight:
|
|
2133
|
-
onFocusLeft:
|
|
2134
|
-
onClickDay:
|
|
2135
|
-
onClickCalendarButton:
|
|
2136
|
-
onClickArrowButton:
|
|
2137
|
-
} =
|
|
2138
|
-
|
|
2139
|
-
|
|
2125
|
+
hideCalendar: R,
|
|
2126
|
+
inputLeftChangeHandler: Y,
|
|
2127
|
+
inputRightChangeHandler: G,
|
|
2128
|
+
onChangeTime: E,
|
|
2129
|
+
onChangeDate: $
|
|
2130
|
+
} = Wn(t, e, g, h), {
|
|
2131
|
+
onKeyDownHandler: z,
|
|
2132
|
+
onFocusRight: j,
|
|
2133
|
+
onFocusLeft: H,
|
|
2134
|
+
onClickDay: Q,
|
|
2135
|
+
onClickCalendarButton: X,
|
|
2136
|
+
onClickArrowButton: nt
|
|
2137
|
+
} = On(
|
|
2138
|
+
$,
|
|
2139
|
+
h,
|
|
2140
2140
|
k,
|
|
2141
|
-
|
|
2141
|
+
R,
|
|
2142
2142
|
g
|
|
2143
2143
|
);
|
|
2144
|
-
|
|
2145
|
-
const
|
|
2146
|
-
const
|
|
2147
|
-
return
|
|
2144
|
+
Hn(t, b, h);
|
|
2145
|
+
const q = x(() => {
|
|
2146
|
+
const O = t || A;
|
|
2147
|
+
return O ? ft(void 0, O, [
|
|
2148
2148
|
"singleSelected",
|
|
2149
2149
|
"selected"
|
|
2150
2150
|
]) : {};
|
|
2151
|
-
}, [
|
|
2152
|
-
|
|
2153
|
-
}, [
|
|
2154
|
-
() => t ?
|
|
2155
|
-
[t,
|
|
2156
|
-
),
|
|
2157
|
-
return /* @__PURE__ */
|
|
2158
|
-
|
|
2151
|
+
}, [A, t]), C = D(() => {
|
|
2152
|
+
R(), T();
|
|
2153
|
+
}, [R, T]), K = x(
|
|
2154
|
+
() => t ? _n(t) : N,
|
|
2155
|
+
[t, N]
|
|
2156
|
+
), st = ke(M, 300), it = ke(S, 300);
|
|
2157
|
+
return /* @__PURE__ */ c(L, { onKeyDown: z, children: /* @__PURE__ */ c(
|
|
2158
|
+
Bt,
|
|
2159
2159
|
{
|
|
2160
2160
|
hideArrow: !0,
|
|
2161
|
-
renderTrigger: (
|
|
2162
|
-
|
|
2161
|
+
renderTrigger: (O) => /* @__PURE__ */ c(L, { ...O, children: /* @__PURE__ */ c(
|
|
2162
|
+
ze,
|
|
2163
2163
|
{
|
|
2164
2164
|
autoFocusLeft: i,
|
|
2165
2165
|
onEsc: n,
|
|
2166
2166
|
onEnter: r,
|
|
2167
2167
|
onBlur: s,
|
|
2168
|
-
disabled:
|
|
2169
|
-
separatorIcon:
|
|
2168
|
+
disabled: m,
|
|
2169
|
+
separatorIcon: Ne,
|
|
2170
2170
|
typeLeft: "date",
|
|
2171
2171
|
typeRight: "time",
|
|
2172
2172
|
placeholderLeft: "yyyy-mm-dd",
|
|
2173
2173
|
placeholderRight: "hh:mm",
|
|
2174
|
-
onChangeLeft:
|
|
2175
|
-
onChangeRight:
|
|
2176
|
-
onClickArrowDown:
|
|
2177
|
-
onClickCalendar:
|
|
2178
|
-
onFocusLeft:
|
|
2179
|
-
onFocusRight:
|
|
2180
|
-
onClickLeft:
|
|
2181
|
-
onClickRight:
|
|
2182
|
-
inputRefLeft:
|
|
2183
|
-
inputRefRight:
|
|
2184
|
-
valueRight:
|
|
2174
|
+
onChangeLeft: Y,
|
|
2175
|
+
onChangeRight: G,
|
|
2176
|
+
onClickArrowDown: nt,
|
|
2177
|
+
onClickCalendar: X,
|
|
2178
|
+
onFocusLeft: H,
|
|
2179
|
+
onFocusRight: j,
|
|
2180
|
+
onClickLeft: H,
|
|
2181
|
+
onClickRight: j,
|
|
2182
|
+
inputRefLeft: h,
|
|
2183
|
+
inputRefRight: f,
|
|
2184
|
+
valueRight: K ?? "",
|
|
2185
2185
|
widthLeft: a,
|
|
2186
2186
|
widthRight: l,
|
|
2187
|
-
minLeft:
|
|
2187
|
+
minLeft: o,
|
|
2188
2188
|
maxLeft: d,
|
|
2189
2189
|
variant: u
|
|
2190
2190
|
}
|
|
2191
2191
|
) }),
|
|
2192
2192
|
placement: Ht,
|
|
2193
2193
|
open: M || S,
|
|
2194
|
-
onRequestClose:
|
|
2195
|
-
children: (
|
|
2194
|
+
onRequestClose: C,
|
|
2195
|
+
children: (st || it) && /* @__PURE__ */ c(J, { children: st ? /* @__PURE__ */ c(
|
|
2196
2196
|
Mt,
|
|
2197
2197
|
{
|
|
2198
|
-
statePerMonth:
|
|
2199
|
-
onClickDay:
|
|
2200
|
-
dateInFocus:
|
|
2201
|
-
setDateInFocus:
|
|
2198
|
+
statePerMonth: q,
|
|
2199
|
+
onClickDay: Q,
|
|
2200
|
+
dateInFocus: p,
|
|
2201
|
+
setDateInFocus: b,
|
|
2202
2202
|
currentPanel: y,
|
|
2203
|
-
setCurrentPanel:
|
|
2204
|
-
minDate:
|
|
2203
|
+
setCurrentPanel: w,
|
|
2204
|
+
minDate: o,
|
|
2205
2205
|
maxDate: d
|
|
2206
2206
|
}
|
|
2207
|
-
) :
|
|
2208
|
-
/* @__PURE__ */
|
|
2209
|
-
|
|
2207
|
+
) : it ? /* @__PURE__ */ _(J, { children: [
|
|
2208
|
+
/* @__PURE__ */ c(J, { overflow: "hidden", height: "250px", children: /* @__PURE__ */ c(
|
|
2209
|
+
vn,
|
|
2210
2210
|
{
|
|
2211
|
-
value:
|
|
2212
|
-
onValueChange:
|
|
2211
|
+
value: K ?? "",
|
|
2212
|
+
onValueChange: E
|
|
2213
2213
|
}
|
|
2214
2214
|
) }),
|
|
2215
|
-
/* @__PURE__ */
|
|
2216
|
-
/* @__PURE__ */
|
|
2215
|
+
/* @__PURE__ */ c(kt, {}),
|
|
2216
|
+
/* @__PURE__ */ c(B, { justifyContent: "flex-end", children: /* @__PURE__ */ c(St, { label: "Done", onClick: T }) })
|
|
2217
2217
|
] }) : null })
|
|
2218
2218
|
}
|
|
2219
2219
|
) });
|
|
2220
|
-
},
|
|
2220
|
+
}, Un = ({
|
|
2221
2221
|
value: t,
|
|
2222
2222
|
onValueChange: e,
|
|
2223
2223
|
year: r
|
|
2224
2224
|
}) => {
|
|
2225
2225
|
const n = String(r);
|
|
2226
|
-
return /* @__PURE__ */
|
|
2227
|
-
},
|
|
2226
|
+
return /* @__PURE__ */ c(B, { justifyContent: "center", children: t === r ? /* @__PURE__ */ c(St, { label: n, onClick: () => e == null ? void 0 : e(r) }) : /* @__PURE__ */ c(tt, { label: n, onClick: () => e == null ? void 0 : e(r) }) });
|
|
2227
|
+
}, ri = ({
|
|
2228
2228
|
value: t,
|
|
2229
2229
|
onValueChange: e,
|
|
2230
2230
|
initialLastYear: r
|
|
2231
2231
|
}) => {
|
|
2232
|
-
const [n, s] =
|
|
2233
|
-
const
|
|
2234
|
-
return
|
|
2232
|
+
const [n, s] = I(() => t ? t + 4 : r ?? (/* @__PURE__ */ new Date()).getFullYear() + 4), i = x(() => {
|
|
2233
|
+
const o = n - 11;
|
|
2234
|
+
return We(ge(o, n + 1), 3);
|
|
2235
2235
|
}, [n]);
|
|
2236
|
-
return
|
|
2237
|
-
s((
|
|
2238
|
-
}, [t]), /* @__PURE__ */
|
|
2239
|
-
/* @__PURE__ */
|
|
2240
|
-
|
|
2236
|
+
return rt(() => {
|
|
2237
|
+
s((o) => Fn(t, o));
|
|
2238
|
+
}, [t]), /* @__PURE__ */ _(B, { children: [
|
|
2239
|
+
/* @__PURE__ */ c(J, { justifyContent: "center", children: /* @__PURE__ */ c(
|
|
2240
|
+
tt,
|
|
2241
2241
|
{
|
|
2242
|
-
leftIcon:
|
|
2242
|
+
leftIcon: Ct,
|
|
2243
2243
|
onClick: () => s(n - 3)
|
|
2244
2244
|
}
|
|
2245
2245
|
) }),
|
|
2246
|
-
/* @__PURE__ */
|
|
2247
|
-
|
|
2246
|
+
/* @__PURE__ */ c(J, { gap: 1, children: i.map((o) => /* @__PURE__ */ c(B, { gap: 1, children: o.map((a) => /* @__PURE__ */ c(
|
|
2247
|
+
Un,
|
|
2248
2248
|
{
|
|
2249
2249
|
year: a,
|
|
2250
2250
|
onValueChange: e,
|
|
2251
2251
|
value: t
|
|
2252
2252
|
},
|
|
2253
2253
|
a
|
|
2254
|
-
)) },
|
|
2255
|
-
/* @__PURE__ */
|
|
2256
|
-
|
|
2254
|
+
)) }, o[0])) }),
|
|
2255
|
+
/* @__PURE__ */ c(J, { justifyContent: "center", children: /* @__PURE__ */ c(
|
|
2256
|
+
tt,
|
|
2257
2257
|
{
|
|
2258
|
-
leftIcon:
|
|
2258
|
+
leftIcon: Pt,
|
|
2259
2259
|
onClick: () => s(n + 3)
|
|
2260
2260
|
}
|
|
2261
2261
|
) })
|
|
2262
2262
|
] });
|
|
2263
|
-
},
|
|
2263
|
+
}, Fn = (t, e) => {
|
|
2264
2264
|
if (t == null)
|
|
2265
2265
|
return e;
|
|
2266
2266
|
if (t > e) {
|
|
@@ -2273,18 +2273,18 @@ const Gs = ({
|
|
|
2273
2273
|
return e - i;
|
|
2274
2274
|
}
|
|
2275
2275
|
return e;
|
|
2276
|
-
},
|
|
2277
|
-
|
|
2276
|
+
}, jn = (t, e, r, n, s) => {
|
|
2277
|
+
rt(
|
|
2278
2278
|
function() {
|
|
2279
2279
|
t && r(t);
|
|
2280
2280
|
},
|
|
2281
2281
|
[t, r]
|
|
2282
|
-
),
|
|
2282
|
+
), rt(
|
|
2283
2283
|
function() {
|
|
2284
2284
|
e && r(e);
|
|
2285
2285
|
},
|
|
2286
2286
|
[e, r]
|
|
2287
|
-
),
|
|
2287
|
+
), rt(
|
|
2288
2288
|
function() {
|
|
2289
2289
|
n.current && (t ? n.current.valueAsDate = new Date(
|
|
2290
2290
|
Date.UTC(
|
|
@@ -2295,7 +2295,7 @@ const Gs = ({
|
|
|
2295
2295
|
) : n.current.valueAsDate = null);
|
|
2296
2296
|
},
|
|
2297
2297
|
[t, n]
|
|
2298
|
-
),
|
|
2298
|
+
), rt(
|
|
2299
2299
|
function() {
|
|
2300
2300
|
s.current && (e ? s.current.valueAsDate = new Date(
|
|
2301
2301
|
Date.UTC(
|
|
@@ -2307,26 +2307,26 @@ const Gs = ({
|
|
|
2307
2307
|
},
|
|
2308
2308
|
[e, s]
|
|
2309
2309
|
);
|
|
2310
|
-
},
|
|
2310
|
+
}, Cn = (t, e, r, {
|
|
2311
2311
|
setDateInFocus: n,
|
|
2312
2312
|
showCalendarInternal: s,
|
|
2313
2313
|
hideCalendarInternal: i,
|
|
2314
|
-
setFirstFocusedInput:
|
|
2314
|
+
setFirstFocusedInput: o,
|
|
2315
2315
|
setCurrentPanel: a
|
|
2316
2316
|
}) => {
|
|
2317
2317
|
const l = D(
|
|
2318
|
-
(
|
|
2319
|
-
|
|
2320
|
-
startDate:
|
|
2318
|
+
(h) => {
|
|
2319
|
+
h.target.value[0] !== "0" && (r == null || r({
|
|
2320
|
+
startDate: h.target.valueAsDate ?? void 0,
|
|
2321
2321
|
endDate: e
|
|
2322
2322
|
}));
|
|
2323
2323
|
},
|
|
2324
2324
|
[r, e]
|
|
2325
2325
|
), d = D(
|
|
2326
|
-
(
|
|
2327
|
-
|
|
2326
|
+
(h) => {
|
|
2327
|
+
h.target.value[0] !== "0" && (r == null || r({
|
|
2328
2328
|
startDate: t,
|
|
2329
|
-
endDate:
|
|
2329
|
+
endDate: h.target.valueAsDate ?? void 0
|
|
2330
2330
|
}));
|
|
2331
2331
|
},
|
|
2332
2332
|
[r, t]
|
|
@@ -2338,41 +2338,41 @@ const Gs = ({
|
|
|
2338
2338
|
a,
|
|
2339
2339
|
s,
|
|
2340
2340
|
n
|
|
2341
|
-
]),
|
|
2342
|
-
|
|
2343
|
-
}, [
|
|
2341
|
+
]), m = D(() => {
|
|
2342
|
+
o(void 0), i();
|
|
2343
|
+
}, [o, i]);
|
|
2344
2344
|
return {
|
|
2345
2345
|
inputLeftChangeHandler: l,
|
|
2346
2346
|
inputRightChangeHandler: d,
|
|
2347
|
-
hideCalendar:
|
|
2347
|
+
hideCalendar: m,
|
|
2348
2348
|
setDateInFocus: n,
|
|
2349
2349
|
setCurrentPanel: a,
|
|
2350
2350
|
showCalendar: u
|
|
2351
2351
|
};
|
|
2352
|
-
},
|
|
2353
|
-
const [r, n, s] =
|
|
2352
|
+
}, Kn = (t, e) => {
|
|
2353
|
+
const [r, n, s] = se(!1), [i, o] = I(void 0), [a, l] = I("startDate"), [d, u] = I(() => (a === "startDate" ? t : a === "endDate" ? e : void 0) ?? /* @__PURE__ */ new Date()), [m, h] = I("calendar");
|
|
2354
2354
|
return {
|
|
2355
2355
|
isCalendarVisible: r,
|
|
2356
2356
|
showCalendarInternal: n,
|
|
2357
2357
|
hideCalendarInternal: s,
|
|
2358
2358
|
firstFocusedInput: i,
|
|
2359
|
-
setFirstFocusedInput:
|
|
2359
|
+
setFirstFocusedInput: o,
|
|
2360
2360
|
focusedInput: a,
|
|
2361
2361
|
setFocusedInput: l,
|
|
2362
2362
|
dateInFocus: d,
|
|
2363
2363
|
setDateInFocus: u,
|
|
2364
|
-
currentPanel:
|
|
2365
|
-
setCurrentPanel:
|
|
2364
|
+
currentPanel: m,
|
|
2365
|
+
setCurrentPanel: h
|
|
2366
2366
|
};
|
|
2367
|
-
},
|
|
2367
|
+
}, zn = (t, e, r, n, s, i, o, {
|
|
2368
2368
|
firstFocusedInput: a,
|
|
2369
2369
|
setFirstFocusedInput: l,
|
|
2370
2370
|
isCalendarVisible: d,
|
|
2371
2371
|
setFocusedInput: u,
|
|
2372
|
-
focusedInput:
|
|
2373
|
-
setCurrentPanel:
|
|
2372
|
+
focusedInput: m,
|
|
2373
|
+
setCurrentPanel: h
|
|
2374
2374
|
}) => {
|
|
2375
|
-
const
|
|
2375
|
+
const f = D(() => {
|
|
2376
2376
|
a == null && l("startDate"), u("startDate"), d || i();
|
|
2377
2377
|
}, [
|
|
2378
2378
|
d,
|
|
@@ -2388,221 +2388,242 @@ const Gs = ({
|
|
|
2388
2388
|
i,
|
|
2389
2389
|
l,
|
|
2390
2390
|
a
|
|
2391
|
-
]),
|
|
2392
|
-
(
|
|
2393
|
-
var S, T,
|
|
2394
|
-
|
|
2395
|
-
startDate:
|
|
2391
|
+
]), w = D(
|
|
2392
|
+
(b) => {
|
|
2393
|
+
var S, T, N, A;
|
|
2394
|
+
m === "startDate" ? e != null && V(b.date, e) ? (r == null || r({
|
|
2395
|
+
startDate: b.date,
|
|
2396
2396
|
endDate: void 0
|
|
2397
2397
|
}), u("endDate"), (S = s.current) == null || S.focus()) : (r == null || r({
|
|
2398
|
-
startDate:
|
|
2398
|
+
startDate: b.date,
|
|
2399
2399
|
endDate: e
|
|
2400
|
-
}), a === "startDate" ? (u("endDate"), (T = s.current) == null || T.focus()) : setTimeout(
|
|
2401
|
-
startDate:
|
|
2400
|
+
}), a === "startDate" ? (u("endDate"), (T = s.current) == null || T.focus()) : setTimeout(o, 50)) : m === "endDate" && (t ? V(t, b.date) ? (r == null || r({
|
|
2401
|
+
startDate: b.date,
|
|
2402
2402
|
endDate: void 0
|
|
2403
|
-
}), u("endDate"), (
|
|
2403
|
+
}), u("endDate"), (A = s.current) == null || A.focus()) : (r == null || r({
|
|
2404
2404
|
startDate: t,
|
|
2405
|
-
endDate:
|
|
2406
|
-
}), setTimeout(
|
|
2405
|
+
endDate: b.date
|
|
2406
|
+
}), setTimeout(o, 50)) : (r == null || r({
|
|
2407
2407
|
startDate: t,
|
|
2408
|
-
endDate:
|
|
2409
|
-
}), u("startDate"), (
|
|
2408
|
+
endDate: b.date
|
|
2409
|
+
}), u("startDate"), (N = n.current) == null || N.focus()));
|
|
2410
2410
|
},
|
|
2411
2411
|
[
|
|
2412
|
-
|
|
2412
|
+
m,
|
|
2413
2413
|
r,
|
|
2414
2414
|
e,
|
|
2415
2415
|
a,
|
|
2416
2416
|
u,
|
|
2417
2417
|
s,
|
|
2418
|
-
|
|
2418
|
+
o,
|
|
2419
2419
|
t,
|
|
2420
2420
|
n
|
|
2421
2421
|
]
|
|
2422
2422
|
), y = D(() => {
|
|
2423
|
-
|
|
2424
|
-
}, [
|
|
2425
|
-
var
|
|
2426
|
-
d ?
|
|
2423
|
+
h("presets"), i();
|
|
2424
|
+
}, [h, i]), M = D(() => {
|
|
2425
|
+
var b;
|
|
2426
|
+
d ? o() : (u("startDate"), l("startDate"), (b = n.current) == null || b.focus(), h("calendar"), i());
|
|
2427
2427
|
}, [
|
|
2428
2428
|
d,
|
|
2429
|
-
|
|
2429
|
+
o,
|
|
2430
2430
|
u,
|
|
2431
2431
|
l,
|
|
2432
2432
|
n,
|
|
2433
|
-
|
|
2433
|
+
h,
|
|
2434
2434
|
i
|
|
2435
|
-
]),
|
|
2436
|
-
(
|
|
2437
|
-
|
|
2435
|
+
]), p = D(
|
|
2436
|
+
(b) => {
|
|
2437
|
+
b.key === "Escape" && o();
|
|
2438
2438
|
},
|
|
2439
|
-
[
|
|
2439
|
+
[o]
|
|
2440
2440
|
);
|
|
2441
2441
|
return {
|
|
2442
|
-
onFocusLeft:
|
|
2442
|
+
onFocusLeft: f,
|
|
2443
2443
|
onFocusRight: g,
|
|
2444
|
-
onClickDay:
|
|
2444
|
+
onClickDay: w,
|
|
2445
2445
|
onClickArrowButton: y,
|
|
2446
2446
|
onClickCalendarButton: M,
|
|
2447
|
-
onKeyDownHandler:
|
|
2447
|
+
onKeyDownHandler: p
|
|
2448
2448
|
};
|
|
2449
2449
|
};
|
|
2450
|
-
function
|
|
2450
|
+
function ni({
|
|
2451
2451
|
value: t,
|
|
2452
2452
|
onValueChange: e,
|
|
2453
2453
|
autoFocus: r,
|
|
2454
2454
|
onBlur: n,
|
|
2455
2455
|
onEnter: s,
|
|
2456
2456
|
onEsc: i,
|
|
2457
|
-
minDate:
|
|
2458
|
-
maxDate: a =
|
|
2457
|
+
minDate: o,
|
|
2458
|
+
maxDate: a = Wt,
|
|
2459
2459
|
calendarProps: l,
|
|
2460
2460
|
widthLeft: d = 128,
|
|
2461
2461
|
widthRight: u = 128,
|
|
2462
|
-
variant:
|
|
2463
|
-
disabled:
|
|
2462
|
+
variant: m,
|
|
2463
|
+
disabled: h
|
|
2464
2464
|
}) {
|
|
2465
|
-
const { startDate:
|
|
2466
|
-
dateInFocus:
|
|
2467
|
-
setDateInFocus:
|
|
2465
|
+
const { startDate: f, endDate: g } = t || {}, w = W(null), y = W(null), M = Kn(f, g), {
|
|
2466
|
+
dateInFocus: p,
|
|
2467
|
+
setDateInFocus: b,
|
|
2468
2468
|
isCalendarVisible: S,
|
|
2469
2469
|
currentPanel: T,
|
|
2470
|
-
setCurrentPanel:
|
|
2470
|
+
setCurrentPanel: N
|
|
2471
2471
|
} = M, {
|
|
2472
|
-
showCalendar:
|
|
2472
|
+
showCalendar: A,
|
|
2473
2473
|
hideCalendar: k,
|
|
2474
|
-
inputLeftChangeHandler:
|
|
2475
|
-
inputRightChangeHandler:
|
|
2476
|
-
} =
|
|
2477
|
-
onKeyDownHandler:
|
|
2478
|
-
onFocusRight:
|
|
2479
|
-
onFocusLeft:
|
|
2480
|
-
onClickDay:
|
|
2481
|
-
onClickCalendarButton:
|
|
2482
|
-
onClickArrowButton:
|
|
2483
|
-
} =
|
|
2484
|
-
|
|
2474
|
+
inputLeftChangeHandler: R,
|
|
2475
|
+
inputRightChangeHandler: Y
|
|
2476
|
+
} = Cn(f, g, e, M), {
|
|
2477
|
+
onKeyDownHandler: G,
|
|
2478
|
+
onFocusRight: E,
|
|
2479
|
+
onFocusLeft: $,
|
|
2480
|
+
onClickDay: z,
|
|
2481
|
+
onClickCalendarButton: j,
|
|
2482
|
+
onClickArrowButton: H
|
|
2483
|
+
} = zn(
|
|
2484
|
+
f,
|
|
2485
2485
|
g,
|
|
2486
2486
|
e,
|
|
2487
|
-
|
|
2487
|
+
w,
|
|
2488
2488
|
y,
|
|
2489
|
-
|
|
2489
|
+
A,
|
|
2490
2490
|
k,
|
|
2491
2491
|
M
|
|
2492
2492
|
);
|
|
2493
|
-
|
|
2494
|
-
|
|
2493
|
+
jn(
|
|
2494
|
+
f,
|
|
2495
2495
|
g,
|
|
2496
|
+
b,
|
|
2496
2497
|
w,
|
|
2497
|
-
p,
|
|
2498
2498
|
y
|
|
2499
2499
|
);
|
|
2500
|
-
const
|
|
2501
|
-
() =>
|
|
2502
|
-
[
|
|
2503
|
-
),
|
|
2504
|
-
() =>
|
|
2500
|
+
const Q = x(
|
|
2501
|
+
() => f && g && V(f, g),
|
|
2502
|
+
[f, g]
|
|
2503
|
+
), X = x(
|
|
2504
|
+
() => Yr(
|
|
2505
2505
|
l == null ? void 0 : l.statePerMonth,
|
|
2506
|
-
|
|
2506
|
+
f,
|
|
2507
2507
|
g,
|
|
2508
|
-
|
|
2508
|
+
p
|
|
2509
2509
|
),
|
|
2510
|
-
[l == null ? void 0 : l.statePerMonth,
|
|
2510
|
+
[l == null ? void 0 : l.statePerMonth, f, g, p]
|
|
2511
2511
|
);
|
|
2512
|
-
return /* @__PURE__ */
|
|
2513
|
-
|
|
2512
|
+
return /* @__PURE__ */ c(L, { onKeyDown: G, children: /* @__PURE__ */ c(
|
|
2513
|
+
Bt,
|
|
2514
2514
|
{
|
|
2515
2515
|
hideArrow: !0,
|
|
2516
2516
|
restoreFocus: !1,
|
|
2517
2517
|
returnFocus: !1,
|
|
2518
|
-
renderTrigger: (
|
|
2519
|
-
|
|
2518
|
+
renderTrigger: (nt) => /* @__PURE__ */ c(L, { ...nt, children: /* @__PURE__ */ c(
|
|
2519
|
+
ze,
|
|
2520
2520
|
{
|
|
2521
2521
|
autoFocusLeft: r,
|
|
2522
2522
|
onEsc: i,
|
|
2523
2523
|
onEnter: s,
|
|
2524
2524
|
onBlur: n,
|
|
2525
|
-
disabled:
|
|
2526
|
-
separatorIcon:
|
|
2525
|
+
disabled: h,
|
|
2526
|
+
separatorIcon: Pt,
|
|
2527
2527
|
typeLeft: "date",
|
|
2528
2528
|
typeRight: "date",
|
|
2529
2529
|
placeholderLeft: "Start date",
|
|
2530
2530
|
placeholderRight: "End date",
|
|
2531
|
-
onChangeLeft:
|
|
2532
|
-
onChangeRight:
|
|
2533
|
-
onClickArrowDown:
|
|
2534
|
-
onClickCalendar:
|
|
2535
|
-
onFocusLeft:
|
|
2536
|
-
onFocusRight:
|
|
2537
|
-
onClickLeft:
|
|
2538
|
-
onClickRight:
|
|
2539
|
-
inputRefLeft:
|
|
2531
|
+
onChangeLeft: R,
|
|
2532
|
+
onChangeRight: Y,
|
|
2533
|
+
onClickArrowDown: H,
|
|
2534
|
+
onClickCalendar: j,
|
|
2535
|
+
onFocusLeft: $,
|
|
2536
|
+
onFocusRight: E,
|
|
2537
|
+
onClickLeft: $,
|
|
2538
|
+
onClickRight: E,
|
|
2539
|
+
inputRefLeft: w,
|
|
2540
2540
|
inputRefRight: y,
|
|
2541
|
-
variant:
|
|
2541
|
+
variant: Q ? "error" : m,
|
|
2542
2542
|
widthLeft: d,
|
|
2543
2543
|
widthRight: u,
|
|
2544
|
-
minLeft:
|
|
2544
|
+
minLeft: o,
|
|
2545
2545
|
maxLeft: a,
|
|
2546
|
-
minRight:
|
|
2546
|
+
minRight: o,
|
|
2547
2547
|
maxRight: a
|
|
2548
2548
|
}
|
|
2549
2549
|
) }),
|
|
2550
2550
|
placement: Ht,
|
|
2551
2551
|
onRequestClose: k,
|
|
2552
2552
|
open: S,
|
|
2553
|
-
children: /* @__PURE__ */
|
|
2553
|
+
children: /* @__PURE__ */ c(
|
|
2554
2554
|
Mt,
|
|
2555
2555
|
{
|
|
2556
|
-
onClickDay:
|
|
2557
|
-
dateInFocus:
|
|
2558
|
-
setDateInFocus:
|
|
2556
|
+
onClickDay: z,
|
|
2557
|
+
dateInFocus: p,
|
|
2558
|
+
setDateInFocus: b,
|
|
2559
2559
|
currentPanel: T,
|
|
2560
|
-
setCurrentPanel:
|
|
2561
|
-
minDate:
|
|
2560
|
+
setCurrentPanel: N,
|
|
2561
|
+
minDate: o,
|
|
2562
2562
|
maxDate: a,
|
|
2563
2563
|
...l,
|
|
2564
|
-
statePerMonth:
|
|
2564
|
+
statePerMonth: X
|
|
2565
2565
|
}
|
|
2566
2566
|
)
|
|
2567
2567
|
}
|
|
2568
2568
|
) });
|
|
2569
2569
|
}
|
|
2570
|
-
const
|
|
2570
|
+
const ce = ({
|
|
2571
2571
|
onChange: t,
|
|
2572
2572
|
onValueChange: e,
|
|
2573
2573
|
mask: r,
|
|
2574
2574
|
pipe: n,
|
|
2575
2575
|
value: s,
|
|
2576
2576
|
guide: i,
|
|
2577
|
-
keepCharPositions:
|
|
2577
|
+
keepCharPositions: o,
|
|
2578
2578
|
placeholderChar: a,
|
|
2579
2579
|
showMask: l,
|
|
2580
2580
|
calendarSize: d,
|
|
2581
|
-
|
|
2581
|
+
onFocus: u,
|
|
2582
|
+
onBlur: m,
|
|
2583
|
+
placeholderWhenBlurred: h,
|
|
2584
|
+
placeholder: f,
|
|
2585
|
+
valueWhenBlurred: g,
|
|
2586
|
+
...w
|
|
2582
2587
|
}) => {
|
|
2583
|
-
const
|
|
2584
|
-
|
|
2588
|
+
const y = W(null), [M, p] = I(!1), { onChange: b } = Pr(
|
|
2589
|
+
y,
|
|
2585
2590
|
t,
|
|
2586
2591
|
e,
|
|
2587
2592
|
r,
|
|
2588
2593
|
n,
|
|
2589
2594
|
s,
|
|
2590
2595
|
i,
|
|
2591
|
-
|
|
2596
|
+
o,
|
|
2592
2597
|
a,
|
|
2593
|
-
l
|
|
2598
|
+
l,
|
|
2599
|
+
M
|
|
2600
|
+
), S = D(
|
|
2601
|
+
(A) => {
|
|
2602
|
+
u == null || u(A), p(!0);
|
|
2603
|
+
},
|
|
2604
|
+
[u]
|
|
2605
|
+
), T = D(
|
|
2606
|
+
(A) => {
|
|
2607
|
+
m == null || m(A), p(!1);
|
|
2608
|
+
},
|
|
2609
|
+
[m]
|
|
2594
2610
|
);
|
|
2595
|
-
return /* @__PURE__ */
|
|
2596
|
-
|
|
2611
|
+
return /* @__PURE__ */ c(
|
|
2612
|
+
Lr,
|
|
2597
2613
|
{
|
|
2598
|
-
...
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2614
|
+
...w,
|
|
2615
|
+
"aria-live": "polite",
|
|
2616
|
+
value: (M ? s : g) ?? "",
|
|
2617
|
+
ref: y,
|
|
2618
|
+
placeholder: M ? f : h ?? f,
|
|
2619
|
+
onFocus: S,
|
|
2620
|
+
onBlur: T,
|
|
2621
|
+
onChange: b,
|
|
2622
|
+
width: qn(d),
|
|
2602
2623
|
size: d === "large" ? "large" : "medium"
|
|
2603
2624
|
}
|
|
2604
2625
|
);
|
|
2605
|
-
},
|
|
2626
|
+
}, qn = (t) => {
|
|
2606
2627
|
switch (t) {
|
|
2607
2628
|
case "small":
|
|
2608
2629
|
return "140px";
|
|
@@ -2611,22 +2632,22 @@ const oe = ({
|
|
|
2611
2632
|
case "large":
|
|
2612
2633
|
return "196px";
|
|
2613
2634
|
default:
|
|
2614
|
-
return
|
|
2635
|
+
return ue(t, "168px");
|
|
2615
2636
|
}
|
|
2616
|
-
},
|
|
2637
|
+
}, Jn = [/[1-2]/, /\d/, /\d/, /\d/], Gn = [/[0-1]/, /\d/], Qn = [/[0-3]/, /\d/], Je = (t) => Zn(t).flatMap(Xn), Xn = (t) => {
|
|
2617
2638
|
switch (t) {
|
|
2618
2639
|
case "yyyy":
|
|
2619
|
-
return
|
|
2640
|
+
return Jn;
|
|
2620
2641
|
case "mm":
|
|
2621
2642
|
case "MM":
|
|
2622
|
-
return
|
|
2643
|
+
return Gn;
|
|
2623
2644
|
case "dd":
|
|
2624
2645
|
case "DD":
|
|
2625
|
-
return
|
|
2646
|
+
return Qn;
|
|
2626
2647
|
default:
|
|
2627
2648
|
return [t];
|
|
2628
2649
|
}
|
|
2629
|
-
},
|
|
2650
|
+
}, Zn = (t) => {
|
|
2630
2651
|
if (t.length === 0)
|
|
2631
2652
|
return [];
|
|
2632
2653
|
const e = [];
|
|
@@ -2641,21 +2662,21 @@ const oe = ({
|
|
|
2641
2662
|
day: "dd"
|
|
2642
2663
|
};
|
|
2643
2664
|
return r.map((s) => n[s.type] || s.value).join("");
|
|
2644
|
-
},
|
|
2645
|
-
"en-US":
|
|
2646
|
-
"en-GB":
|
|
2647
|
-
"de-AT":
|
|
2648
|
-
"de-DE":
|
|
2649
|
-
fr:
|
|
2650
|
-
de:
|
|
2651
|
-
es:
|
|
2652
|
-
sv:
|
|
2653
|
-
pl:
|
|
2654
|
-
da:
|
|
2655
|
-
nl:
|
|
2656
|
-
nb:
|
|
2657
|
-
},
|
|
2658
|
-
const n =
|
|
2665
|
+
}, Ge = {
|
|
2666
|
+
"en-US": wr,
|
|
2667
|
+
"en-GB": zt,
|
|
2668
|
+
"de-AT": yr,
|
|
2669
|
+
"de-DE": Se,
|
|
2670
|
+
fr: Mr,
|
|
2671
|
+
de: Se,
|
|
2672
|
+
es: kr,
|
|
2673
|
+
sv: Sr,
|
|
2674
|
+
pl: Tr,
|
|
2675
|
+
da: Rr,
|
|
2676
|
+
nl: Ir,
|
|
2677
|
+
nb: xr
|
|
2678
|
+
}, Qt = (t) => Ge[t], Qe = () => Ge.sv, gt = (t, e, r) => {
|
|
2679
|
+
const n = Qt(e);
|
|
2659
2680
|
if (n == null)
|
|
2660
2681
|
return;
|
|
2661
2682
|
const s = pt(
|
|
@@ -2668,180 +2689,199 @@ const oe = ({
|
|
|
2668
2689
|
);
|
|
2669
2690
|
if (!isNaN(s.getTime()))
|
|
2670
2691
|
return s;
|
|
2671
|
-
},
|
|
2672
|
-
locale:
|
|
2673
|
-
}),
|
|
2692
|
+
}, It = (t, e) => v(t, Tt(e), {
|
|
2693
|
+
locale: Qt(e)
|
|
2694
|
+
}), ae = (t, e) => {
|
|
2674
2695
|
const r = gt(t, e);
|
|
2675
2696
|
if (r != null)
|
|
2676
|
-
return
|
|
2677
|
-
},
|
|
2697
|
+
return It(r, e);
|
|
2698
|
+
}, Xe = ({
|
|
2678
2699
|
value: t,
|
|
2679
2700
|
onValueChange: e,
|
|
2680
2701
|
localeCode: r,
|
|
2681
2702
|
startDateLabel: n = "From",
|
|
2682
2703
|
endDateLabel: s = "To",
|
|
2683
2704
|
onFocus: i,
|
|
2684
|
-
calendarSize:
|
|
2705
|
+
calendarSize: o,
|
|
2706
|
+
placeholderWhenBlurredStartDate: a,
|
|
2707
|
+
placeholderWhenBlurredEndDate: l,
|
|
2708
|
+
valueWhenBlurredStartDate: d,
|
|
2709
|
+
valueWhenBlurredEndDate: u
|
|
2685
2710
|
}) => {
|
|
2686
|
-
const { mask:
|
|
2687
|
-
const
|
|
2711
|
+
const { mask: m, placeholder: h } = x(() => {
|
|
2712
|
+
const f = Tt(r);
|
|
2688
2713
|
return {
|
|
2689
|
-
mask:
|
|
2690
|
-
placeholder:
|
|
2714
|
+
mask: Je(f),
|
|
2715
|
+
placeholder: f.toLowerCase()
|
|
2691
2716
|
};
|
|
2692
2717
|
}, [r]);
|
|
2693
|
-
return /* @__PURE__ */
|
|
2694
|
-
/* @__PURE__ */
|
|
2695
|
-
|
|
2718
|
+
return /* @__PURE__ */ _(B, { children: [
|
|
2719
|
+
/* @__PURE__ */ c(
|
|
2720
|
+
ce,
|
|
2696
2721
|
{
|
|
2697
|
-
mask:
|
|
2722
|
+
mask: m,
|
|
2698
2723
|
value: t == null ? void 0 : t.startDate,
|
|
2699
|
-
onValueChange: (
|
|
2700
|
-
e == null || e({ startDate:
|
|
2724
|
+
onValueChange: (f) => {
|
|
2725
|
+
e == null || e({ startDate: f });
|
|
2701
2726
|
},
|
|
2702
|
-
onBlur: (
|
|
2703
|
-
const
|
|
2704
|
-
|
|
2727
|
+
onBlur: (f) => {
|
|
2728
|
+
const g = ae(
|
|
2729
|
+
f.target.value,
|
|
2705
2730
|
r
|
|
2706
2731
|
);
|
|
2707
|
-
|
|
2732
|
+
g && g !== (t == null ? void 0 : t.startDate) && (e == null || e({ startDate: g }));
|
|
2708
2733
|
},
|
|
2709
2734
|
onFocus: i,
|
|
2710
2735
|
label: n,
|
|
2711
2736
|
borderRadiusVariant: "onlyLeft",
|
|
2712
|
-
placeholder:
|
|
2713
|
-
|
|
2737
|
+
placeholder: h,
|
|
2738
|
+
placeholderWhenBlurred: a,
|
|
2739
|
+
valueWhenBlurred: d,
|
|
2740
|
+
calendarSize: o
|
|
2714
2741
|
}
|
|
2715
2742
|
),
|
|
2716
|
-
/* @__PURE__ */
|
|
2717
|
-
|
|
2743
|
+
/* @__PURE__ */ c(
|
|
2744
|
+
ce,
|
|
2718
2745
|
{
|
|
2719
|
-
mask:
|
|
2746
|
+
mask: m,
|
|
2720
2747
|
value: t == null ? void 0 : t.endDate,
|
|
2721
|
-
onValueChange: (
|
|
2722
|
-
onBlur: (
|
|
2723
|
-
const
|
|
2724
|
-
|
|
2748
|
+
onValueChange: (f) => e == null ? void 0 : e({ endDate: f }),
|
|
2749
|
+
onBlur: (f) => {
|
|
2750
|
+
const g = ae(
|
|
2751
|
+
f.target.value,
|
|
2725
2752
|
r
|
|
2726
2753
|
);
|
|
2727
|
-
|
|
2754
|
+
g && g !== (t == null ? void 0 : t.endDate) && (e == null || e({ endDate: g }));
|
|
2728
2755
|
},
|
|
2729
2756
|
onFocus: i,
|
|
2730
2757
|
label: s,
|
|
2731
2758
|
borderRadiusVariant: "onlyRight",
|
|
2732
|
-
placeholder:
|
|
2733
|
-
|
|
2759
|
+
placeholder: h,
|
|
2760
|
+
placeholderWhenBlurred: l,
|
|
2761
|
+
valueWhenBlurred: u,
|
|
2762
|
+
calendarSize: o
|
|
2734
2763
|
}
|
|
2735
2764
|
)
|
|
2736
2765
|
] });
|
|
2737
|
-
},
|
|
2738
|
-
const
|
|
2766
|
+
}, le = (t, e, r) => {
|
|
2767
|
+
const n = br(t, e) ? "" : " y";
|
|
2768
|
+
return r.code.startsWith("en") ? v(t, "eee MMM d" + n, { locale: r }).replace(".", "") : v(t, "eee d MMM" + n, { locale: r }).replace(".", "");
|
|
2769
|
+
}, Ze = (t, e, r, n) => {
|
|
2770
|
+
const s = Qt(r) ?? Qe(), i = De(), o = we(), a = W(null), l = x(
|
|
2739
2771
|
() => Tt(r),
|
|
2740
2772
|
[r]
|
|
2741
|
-
), d =
|
|
2773
|
+
), d = x(
|
|
2742
2774
|
() => {
|
|
2743
|
-
var
|
|
2744
|
-
return ((
|
|
2775
|
+
var E;
|
|
2776
|
+
return ((E = t == null ? void 0 : t.startDate) == null ? void 0 : E.length) === l.length ? gt(t.startDate, r) : void 0;
|
|
2745
2777
|
},
|
|
2746
2778
|
[l.length, r, t == null ? void 0 : t.startDate]
|
|
2747
|
-
), u =
|
|
2779
|
+
), u = x(
|
|
2748
2780
|
() => {
|
|
2749
|
-
var
|
|
2750
|
-
return ((
|
|
2781
|
+
var E;
|
|
2782
|
+
return ((E = t == null ? void 0 : t.endDate) == null ? void 0 : E.length) === l.length ? gt(t.endDate, r) : void 0;
|
|
2751
2783
|
},
|
|
2752
2784
|
[l.length, r, t == null ? void 0 : t.endDate]
|
|
2753
|
-
),
|
|
2785
|
+
), m = x(
|
|
2786
|
+
() => d != null ? le(d, o, s) : void 0,
|
|
2787
|
+
[s, d, o]
|
|
2788
|
+
), h = x(
|
|
2789
|
+
() => u != null ? le(u, o, s) : void 0,
|
|
2790
|
+
[s, u, o]
|
|
2791
|
+
), [f, g] = I(
|
|
2754
2792
|
n ?? d ?? /* @__PURE__ */ new Date()
|
|
2755
|
-
),
|
|
2756
|
-
(
|
|
2757
|
-
|
|
2793
|
+
), w = D(
|
|
2794
|
+
(E) => {
|
|
2795
|
+
ct(E, o) || V(E, o) ? g(E) : g(o);
|
|
2758
2796
|
},
|
|
2759
|
-
[
|
|
2760
|
-
),
|
|
2761
|
-
() =>
|
|
2762
|
-
|
|
2763
|
-
|
|
2797
|
+
[o]
|
|
2798
|
+
), y = x(
|
|
2799
|
+
() => Jt(
|
|
2800
|
+
f.getFullYear(),
|
|
2801
|
+
f.getMonth(),
|
|
2764
2802
|
s
|
|
2765
2803
|
),
|
|
2766
|
-
[s,
|
|
2767
|
-
),
|
|
2768
|
-
(
|
|
2769
|
-
var
|
|
2770
|
-
const
|
|
2771
|
-
|
|
2804
|
+
[s, f]
|
|
2805
|
+
), M = x(() => _t(v(f, "MMMM yyyy", { locale: s })), [s, f]), p = x(() => ct(o, f), [o, f]), [b, S] = I(), [T, N] = I("calendar"), A = D(
|
|
2806
|
+
(E) => {
|
|
2807
|
+
var j, H;
|
|
2808
|
+
const $ = ((j = E == null ? void 0 : E.startDate) == null ? void 0 : j.length) === l.length ? gt(E.startDate, r) : void 0, z = ((H = E == null ? void 0 : E.endDate) == null ? void 0 : H.length) === l.length ? gt(E.endDate, r) : void 0;
|
|
2809
|
+
$ ? w($) : z && w(z), e == null || e({
|
|
2772
2810
|
...t,
|
|
2773
|
-
...
|
|
2811
|
+
...E
|
|
2774
2812
|
});
|
|
2775
2813
|
},
|
|
2776
2814
|
[
|
|
2777
2815
|
l.length,
|
|
2778
2816
|
r,
|
|
2779
2817
|
e,
|
|
2780
|
-
|
|
2818
|
+
w,
|
|
2781
2819
|
t
|
|
2782
2820
|
]
|
|
2783
|
-
),
|
|
2784
|
-
() =>
|
|
2785
|
-
[
|
|
2786
|
-
),
|
|
2787
|
-
() => (d && u && (
|
|
2821
|
+
), k = x(
|
|
2822
|
+
() => ct(o, f) || ot(f, o),
|
|
2823
|
+
[o, f]
|
|
2824
|
+
), R = x(
|
|
2825
|
+
() => (d && u && (P(d, u) || ot(d, u))) ?? !1,
|
|
2788
2826
|
[u, d]
|
|
2789
2827
|
);
|
|
2790
2828
|
return {
|
|
2791
2829
|
isDateDisabled: D(
|
|
2792
|
-
(
|
|
2793
|
-
[
|
|
2830
|
+
(E) => !P(E, o) && ot(E, o),
|
|
2831
|
+
[o]
|
|
2794
2832
|
),
|
|
2795
|
-
onClickDate: (
|
|
2796
|
-
|
|
2797
|
-
startDate:
|
|
2833
|
+
onClickDate: (E) => {
|
|
2834
|
+
E.getFullYear() === f.getFullYear() && E.getMonth() === f.getMonth() && (d && u == null ? ot(E, d) ? e == null || e({
|
|
2835
|
+
startDate: It(E, r),
|
|
2798
2836
|
endDate: void 0
|
|
2799
2837
|
}) : e == null || e({
|
|
2800
2838
|
startDate: t == null ? void 0 : t.startDate,
|
|
2801
|
-
endDate:
|
|
2839
|
+
endDate: It(E, r)
|
|
2802
2840
|
}) : e == null || e({
|
|
2803
|
-
startDate:
|
|
2841
|
+
startDate: It(E, r),
|
|
2804
2842
|
endDate: void 0
|
|
2805
2843
|
}));
|
|
2806
2844
|
},
|
|
2807
|
-
onValueChangeByInputs:
|
|
2808
|
-
isValidDateRange:
|
|
2809
|
-
prevMonthDisabled:
|
|
2845
|
+
onValueChangeByInputs: A,
|
|
2846
|
+
isValidDateRange: R,
|
|
2847
|
+
prevMonthDisabled: k,
|
|
2810
2848
|
monthPickerButtonRef: a,
|
|
2811
2849
|
calendarId: i,
|
|
2812
|
-
monthPickerButtonLabel:
|
|
2813
|
-
visiblePanel:
|
|
2814
|
-
setVisiblePanel:
|
|
2815
|
-
setVisibleMonth:
|
|
2816
|
-
visibleMonthData:
|
|
2817
|
-
todayIsInVisibleMonth:
|
|
2818
|
-
hoverDate:
|
|
2819
|
-
setHoverDate:
|
|
2850
|
+
monthPickerButtonLabel: M,
|
|
2851
|
+
visiblePanel: T,
|
|
2852
|
+
setVisiblePanel: N,
|
|
2853
|
+
setVisibleMonth: g,
|
|
2854
|
+
visibleMonthData: y,
|
|
2855
|
+
todayIsInVisibleMonth: p,
|
|
2856
|
+
hoverDate: b,
|
|
2857
|
+
setHoverDate: S,
|
|
2820
2858
|
selectedStartDate: d,
|
|
2821
2859
|
selectedEndDate: u,
|
|
2822
|
-
today:
|
|
2823
|
-
visibleMonth:
|
|
2860
|
+
today: o,
|
|
2861
|
+
visibleMonth: f,
|
|
2862
|
+
valueWhenBlurredStartDate: m,
|
|
2863
|
+
valueWhenBlurredEndDate: h
|
|
2824
2864
|
};
|
|
2825
|
-
},
|
|
2865
|
+
}, Xt = ({
|
|
2826
2866
|
previousMonthButtonAriaLabel: t,
|
|
2827
2867
|
nextMonthButtonAriaLabel: e,
|
|
2828
2868
|
monthPickerButtonLabel: r,
|
|
2829
2869
|
visiblePanel: n,
|
|
2830
2870
|
setVisiblePanel: s,
|
|
2831
2871
|
monthPickerButtonRef: i,
|
|
2832
|
-
setVisibleMonth:
|
|
2872
|
+
setVisibleMonth: o,
|
|
2833
2873
|
visibleMonth: a,
|
|
2834
2874
|
prevMonthDisabled: l,
|
|
2835
2875
|
calendarSize: d,
|
|
2836
2876
|
previousMonthButtonTestId: u,
|
|
2837
|
-
nextMonthButtonTestId:
|
|
2838
|
-
}) => /* @__PURE__ */
|
|
2839
|
-
/* @__PURE__ */
|
|
2840
|
-
|
|
2877
|
+
nextMonthButtonTestId: m
|
|
2878
|
+
}) => /* @__PURE__ */ _(B, { alignSelf: "center", justifyContent: "space-between", width: "100%", children: [
|
|
2879
|
+
/* @__PURE__ */ c(
|
|
2880
|
+
tt,
|
|
2841
2881
|
{
|
|
2842
2882
|
"aria-live": "polite",
|
|
2843
2883
|
label: r,
|
|
2844
|
-
rightIcon: n === "calendar" ?
|
|
2884
|
+
rightIcon: n === "calendar" ? fe : lr,
|
|
2845
2885
|
onClick: () => s(
|
|
2846
2886
|
n === "calendar" ? "month-picker" : "calendar"
|
|
2847
2887
|
),
|
|
@@ -2849,50 +2889,50 @@ const oe = ({
|
|
|
2849
2889
|
size: d === "small" ? "medium" : "large"
|
|
2850
2890
|
}
|
|
2851
2891
|
),
|
|
2852
|
-
/* @__PURE__ */
|
|
2853
|
-
/* @__PURE__ */
|
|
2854
|
-
|
|
2892
|
+
/* @__PURE__ */ _(B, { alignItems: "center", gap: 2, children: [
|
|
2893
|
+
/* @__PURE__ */ c(
|
|
2894
|
+
ut,
|
|
2855
2895
|
{
|
|
2856
|
-
leftIcon:
|
|
2857
|
-
onClick: () =>
|
|
2896
|
+
leftIcon: Ct,
|
|
2897
|
+
onClick: () => o(me(a, 1)),
|
|
2858
2898
|
disabled: l,
|
|
2859
2899
|
"aria-label": t,
|
|
2860
2900
|
size: d === "small" ? "medium" : "large",
|
|
2861
2901
|
"data-testid": u
|
|
2862
2902
|
}
|
|
2863
2903
|
),
|
|
2864
|
-
/* @__PURE__ */
|
|
2865
|
-
|
|
2904
|
+
/* @__PURE__ */ c(
|
|
2905
|
+
ut,
|
|
2866
2906
|
{
|
|
2867
|
-
leftIcon:
|
|
2868
|
-
onClick: () =>
|
|
2907
|
+
leftIcon: Pt,
|
|
2908
|
+
onClick: () => o(Yt(a, 1)),
|
|
2869
2909
|
"aria-label": e,
|
|
2870
2910
|
size: d === "small" ? "medium" : "large",
|
|
2871
|
-
"data-testid":
|
|
2911
|
+
"data-testid": m
|
|
2872
2912
|
}
|
|
2873
2913
|
)
|
|
2874
2914
|
] })
|
|
2875
|
-
] }),
|
|
2876
|
-
travelDateCell:
|
|
2877
|
-
small:
|
|
2878
|
-
medium:
|
|
2879
|
-
large:
|
|
2880
|
-
outline:
|
|
2881
|
-
contentWrapper:
|
|
2882
|
-
disabled:
|
|
2883
|
-
isToday:
|
|
2884
|
-
isSelectionStart:
|
|
2885
|
-
isSelectionEnd:
|
|
2886
|
-
hover:
|
|
2887
|
-
startSelected:
|
|
2888
|
-
endSelected:
|
|
2889
|
-
},
|
|
2915
|
+
] }), Vn = "_travelDateCell_h6vcn_1", ts = "_small_h6vcn_4", es = "_medium_h6vcn_9", rs = "_large_h6vcn_14", ns = "_outline_h6vcn_26", ss = "_contentWrapper_h6vcn_39", is = "_disabled_h6vcn_60", os = "_isToday_h6vcn_63", cs = "_isSelectionStart_h6vcn_67", as = "_isSelectionEnd_h6vcn_68", ls = "_hover_h6vcn_83", ds = "_startSelected_h6vcn_86", us = "_endSelected_h6vcn_86", et = {
|
|
2916
|
+
travelDateCell: Vn,
|
|
2917
|
+
small: ts,
|
|
2918
|
+
medium: es,
|
|
2919
|
+
large: rs,
|
|
2920
|
+
outline: ns,
|
|
2921
|
+
contentWrapper: ss,
|
|
2922
|
+
disabled: is,
|
|
2923
|
+
isToday: os,
|
|
2924
|
+
isSelectionStart: cs,
|
|
2925
|
+
isSelectionEnd: as,
|
|
2926
|
+
hover: ls,
|
|
2927
|
+
startSelected: ds,
|
|
2928
|
+
endSelected: us
|
|
2929
|
+
}, lt = qt("--lhds-color-red-100"), fs = (t, e, r, n, s, i) => {
|
|
2890
2930
|
if (!s)
|
|
2891
2931
|
return {
|
|
2892
2932
|
left: "transparent",
|
|
2893
2933
|
right: "transparent"
|
|
2894
2934
|
};
|
|
2895
|
-
if (e && r &&
|
|
2935
|
+
if (e && r && P(e, r))
|
|
2896
2936
|
return {
|
|
2897
2937
|
left: "transparent",
|
|
2898
2938
|
right: "transparent"
|
|
@@ -2902,172 +2942,172 @@ const oe = ({
|
|
|
2902
2942
|
left: "transparent",
|
|
2903
2943
|
right: "transparent"
|
|
2904
2944
|
};
|
|
2905
|
-
const
|
|
2906
|
-
if (
|
|
2945
|
+
const o = e && r ? V(t, e) && ot(t, r) && !P(t, e) && !P(t, r) : !1, a = e && n ? V(t, e) && ot(t, n) && !P(t, e) && !P(t, n) : !1;
|
|
2946
|
+
if (o)
|
|
2907
2947
|
return {
|
|
2908
|
-
left:
|
|
2909
|
-
right:
|
|
2948
|
+
left: lt,
|
|
2949
|
+
right: lt
|
|
2910
2950
|
};
|
|
2911
2951
|
if (e && r)
|
|
2912
|
-
return
|
|
2952
|
+
return P(t, e) ? {
|
|
2913
2953
|
left: "transparent",
|
|
2914
|
-
right:
|
|
2915
|
-
} :
|
|
2916
|
-
left:
|
|
2954
|
+
right: lt
|
|
2955
|
+
} : P(t, r) ? {
|
|
2956
|
+
left: lt,
|
|
2917
2957
|
right: "transparent"
|
|
2918
2958
|
} : {
|
|
2919
2959
|
left: "transparent",
|
|
2920
2960
|
right: "transparent"
|
|
2921
2961
|
};
|
|
2922
|
-
if (e && n &&
|
|
2923
|
-
if (
|
|
2962
|
+
if (e && n && V(n, e)) {
|
|
2963
|
+
if (P(t, e))
|
|
2924
2964
|
return {
|
|
2925
2965
|
left: "transparent",
|
|
2926
|
-
right:
|
|
2966
|
+
right: lt
|
|
2927
2967
|
};
|
|
2928
|
-
if (
|
|
2968
|
+
if (P(t, n))
|
|
2929
2969
|
return {
|
|
2930
|
-
left:
|
|
2970
|
+
left: lt,
|
|
2931
2971
|
right: "transparent"
|
|
2932
2972
|
};
|
|
2933
2973
|
}
|
|
2934
2974
|
return a ? {
|
|
2935
|
-
left:
|
|
2936
|
-
right:
|
|
2975
|
+
left: lt,
|
|
2976
|
+
right: lt
|
|
2937
2977
|
} : {
|
|
2938
2978
|
left: "transparent",
|
|
2939
2979
|
right: "transparent"
|
|
2940
2980
|
};
|
|
2941
|
-
},
|
|
2981
|
+
}, hs = (t, e) => {
|
|
2942
2982
|
switch (e) {
|
|
2943
2983
|
case "PageUp":
|
|
2944
|
-
return
|
|
2984
|
+
return me(t, 1);
|
|
2945
2985
|
case "PageDown":
|
|
2946
2986
|
return Yt(t, 1);
|
|
2947
2987
|
case "Home":
|
|
2948
|
-
return
|
|
2988
|
+
return Ut(t);
|
|
2949
2989
|
case "End":
|
|
2950
|
-
return
|
|
2990
|
+
return Z(Ut(t), 6);
|
|
2951
2991
|
case "ArrowLeft":
|
|
2952
2992
|
return ht(t, 1);
|
|
2953
2993
|
case "ArrowUp":
|
|
2954
2994
|
return ht(t, 7);
|
|
2955
2995
|
case "ArrowRight":
|
|
2956
|
-
return
|
|
2996
|
+
return Z(t, 1);
|
|
2957
2997
|
case "ArrowDown":
|
|
2958
|
-
return
|
|
2998
|
+
return Z(t, 7);
|
|
2959
2999
|
default:
|
|
2960
3000
|
return;
|
|
2961
3001
|
}
|
|
2962
|
-
},
|
|
2963
|
-
travelDateCellBackground:
|
|
2964
|
-
small:
|
|
2965
|
-
medium:
|
|
2966
|
-
large:
|
|
2967
|
-
},
|
|
2968
|
-
/* @__PURE__ */
|
|
2969
|
-
|
|
3002
|
+
}, ee = (t, e) => v(He(t, 12), at.fullDate) + e, ms = "_travelDateCellBackground_1k07m_1", gs = "_small_1k07m_2", ps = "_medium_1k07m_7", Ds = "_large_1k07m_12", $t = {
|
|
3003
|
+
travelDateCellBackground: ms,
|
|
3004
|
+
small: gs,
|
|
3005
|
+
medium: ps,
|
|
3006
|
+
large: Ds
|
|
3007
|
+
}, bs = ({ calendarSize: t, bgColorLeft: e, bgColorRight: r }) => /* @__PURE__ */ _(B, { children: [
|
|
3008
|
+
/* @__PURE__ */ c(
|
|
3009
|
+
L,
|
|
2970
3010
|
{
|
|
2971
|
-
className: Dt(
|
|
3011
|
+
className: Dt($t.travelDateCellBackground, $t[t]),
|
|
2972
3012
|
background: e
|
|
2973
3013
|
}
|
|
2974
3014
|
),
|
|
2975
|
-
/* @__PURE__ */
|
|
2976
|
-
|
|
3015
|
+
/* @__PURE__ */ c(
|
|
3016
|
+
L,
|
|
2977
3017
|
{
|
|
2978
|
-
className: Dt(
|
|
3018
|
+
className: Dt($t.travelDateCellBackground, $t[t]),
|
|
2979
3019
|
background: r
|
|
2980
3020
|
}
|
|
2981
3021
|
)
|
|
2982
|
-
] }),
|
|
3022
|
+
] }), ws = ({
|
|
2983
3023
|
onClick: t,
|
|
2984
3024
|
visibleMonth: e,
|
|
2985
3025
|
onChangeVisibleMonth: r,
|
|
2986
3026
|
day: n,
|
|
2987
3027
|
isValidDateRange: s,
|
|
2988
3028
|
selectedStartDate: i,
|
|
2989
|
-
selectedEndDate:
|
|
3029
|
+
selectedEndDate: o,
|
|
2990
3030
|
onStartHover: a,
|
|
2991
3031
|
onEndHover: l,
|
|
2992
3032
|
hoverDate: d,
|
|
2993
3033
|
today: u,
|
|
2994
|
-
todayIsInVisibleMonth:
|
|
2995
|
-
calendarId:
|
|
2996
|
-
isDateDisabled:
|
|
3034
|
+
todayIsInVisibleMonth: m,
|
|
3035
|
+
calendarId: h,
|
|
3036
|
+
isDateDisabled: f,
|
|
2997
3037
|
size: g,
|
|
2998
|
-
dateTestId:
|
|
3038
|
+
dateTestId: w
|
|
2999
3039
|
}) => {
|
|
3000
3040
|
const y = D(
|
|
3001
|
-
async (
|
|
3002
|
-
var
|
|
3003
|
-
const k =
|
|
3004
|
-
k && !
|
|
3005
|
-
var
|
|
3006
|
-
(
|
|
3007
|
-
}, 10))), (
|
|
3041
|
+
async (A) => {
|
|
3042
|
+
var R;
|
|
3043
|
+
const k = hs(n.date, A.key);
|
|
3044
|
+
k && !f(k) && (a(k), ct(n.date, k) ? (R = document.getElementById(ee(k, h))) == null || R.focus() : (r(k), setTimeout(() => {
|
|
3045
|
+
var Y;
|
|
3046
|
+
(Y = document.getElementById(ee(k, h))) == null || Y.focus();
|
|
3047
|
+
}, 10))), (A.key === "Enter" || A.code === "Space") && t(n.date);
|
|
3008
3048
|
},
|
|
3009
3049
|
[
|
|
3010
|
-
|
|
3050
|
+
h,
|
|
3011
3051
|
n.date,
|
|
3012
|
-
|
|
3052
|
+
f,
|
|
3013
3053
|
r,
|
|
3014
3054
|
t,
|
|
3015
3055
|
a
|
|
3016
3056
|
]
|
|
3017
|
-
), M = n.month === e.getMonth(),
|
|
3057
|
+
), M = n.month === e.getMonth(), p = f(n.date), b = i ? P(i, n.date) : !1, S = o ? P(o, n.date) : !1, T = P(n.date, u), N = fs(
|
|
3018
3058
|
n.date,
|
|
3019
3059
|
i,
|
|
3020
|
-
|
|
3060
|
+
o,
|
|
3021
3061
|
d,
|
|
3022
3062
|
M,
|
|
3023
3063
|
s
|
|
3024
3064
|
);
|
|
3025
|
-
return /* @__PURE__ */
|
|
3065
|
+
return /* @__PURE__ */ _(
|
|
3026
3066
|
"td",
|
|
3027
3067
|
{
|
|
3028
|
-
className: Dt(
|
|
3029
|
-
onClick:
|
|
3030
|
-
onMouseOver:
|
|
3031
|
-
onMouseOut:
|
|
3032
|
-
tabIndex:
|
|
3068
|
+
className: Dt(et.travelDateCell, et[g]),
|
|
3069
|
+
onClick: p ? void 0 : () => t(n.date),
|
|
3070
|
+
onMouseOver: p ? void 0 : () => M && a(n.date),
|
|
3071
|
+
onMouseOut: p ? void 0 : () => M && l(n.date),
|
|
3072
|
+
tabIndex: p ? void 0 : ys(
|
|
3033
3073
|
n,
|
|
3034
3074
|
i,
|
|
3035
3075
|
T,
|
|
3036
3076
|
e,
|
|
3037
|
-
|
|
3077
|
+
m
|
|
3038
3078
|
),
|
|
3039
|
-
id:
|
|
3040
|
-
onKeyDown:
|
|
3041
|
-
...
|
|
3042
|
-
"data-testid":
|
|
3079
|
+
id: p ? void 0 : ee(n.date, h),
|
|
3080
|
+
onKeyDown: p ? void 0 : y,
|
|
3081
|
+
...p ? void 0 : { "aria-selected": b || S },
|
|
3082
|
+
"data-testid": w == null ? void 0 : w(n.date),
|
|
3043
3083
|
children: [
|
|
3044
|
-
/* @__PURE__ */
|
|
3045
|
-
/* @__PURE__ */
|
|
3046
|
-
|
|
3084
|
+
/* @__PURE__ */ c("div", { className: et.outline }),
|
|
3085
|
+
/* @__PURE__ */ c(
|
|
3086
|
+
bs,
|
|
3047
3087
|
{
|
|
3048
3088
|
calendarSize: g,
|
|
3049
|
-
bgColorLeft:
|
|
3050
|
-
bgColorRight:
|
|
3089
|
+
bgColorLeft: N.left,
|
|
3090
|
+
bgColorRight: N.right
|
|
3051
3091
|
}
|
|
3052
3092
|
),
|
|
3053
|
-
M && /* @__PURE__ */
|
|
3093
|
+
M && /* @__PURE__ */ c(
|
|
3054
3094
|
"div",
|
|
3055
3095
|
{
|
|
3056
3096
|
className: Dt(
|
|
3057
|
-
|
|
3058
|
-
T ?
|
|
3059
|
-
i ?
|
|
3060
|
-
|
|
3061
|
-
d &&
|
|
3062
|
-
|
|
3063
|
-
S &&
|
|
3064
|
-
|
|
3097
|
+
et.contentWrapper,
|
|
3098
|
+
T ? et.isToday : void 0,
|
|
3099
|
+
i ? et.startSelected : void 0,
|
|
3100
|
+
o ? et.endSelected : void 0,
|
|
3101
|
+
d && P(d, n.date) ? et.hover : void 0,
|
|
3102
|
+
b && et.isSelectionStart,
|
|
3103
|
+
S && et.isSelectionEnd,
|
|
3104
|
+
p && et.disabled
|
|
3065
3105
|
),
|
|
3066
|
-
children: /* @__PURE__ */
|
|
3106
|
+
children: /* @__PURE__ */ c(
|
|
3067
3107
|
wt,
|
|
3068
3108
|
{
|
|
3069
3109
|
variant: "bold",
|
|
3070
|
-
color:
|
|
3110
|
+
color: p ? qt("--lhds-color-ui-500") : void 0,
|
|
3071
3111
|
children: n.dayOfMonth
|
|
3072
3112
|
}
|
|
3073
3113
|
)
|
|
@@ -3076,207 +3116,212 @@ const oe = ({
|
|
|
3076
3116
|
]
|
|
3077
3117
|
}
|
|
3078
3118
|
);
|
|
3079
|
-
},
|
|
3080
|
-
const i = e ?
|
|
3081
|
-
return (e && i ?
|
|
3082
|
-
},
|
|
3083
|
-
travelCalendar:
|
|
3084
|
-
},
|
|
3119
|
+
}, ys = (t, e, r, n, s) => {
|
|
3120
|
+
const i = e ? ct(e, n) : !1;
|
|
3121
|
+
return (e && i ? P(t.date, e) : r) || !i && !s && t.date.getDate() === 1 ? 0 : -1;
|
|
3122
|
+
}, Ms = "_travelCalendar_18pjj_1", ks = {
|
|
3123
|
+
travelCalendar: Ms
|
|
3124
|
+
}, Zt = ({
|
|
3085
3125
|
visibleMonthData: t,
|
|
3086
3126
|
onClickDate: e,
|
|
3087
3127
|
setHoverDate: r,
|
|
3088
3128
|
setVisibleMonth: n,
|
|
3089
3129
|
visibleMonth: s,
|
|
3090
3130
|
isValidDateRange: i,
|
|
3091
|
-
selectedStartDate:
|
|
3131
|
+
selectedStartDate: o,
|
|
3092
3132
|
selectedEndDate: a,
|
|
3093
3133
|
hoverDate: l,
|
|
3094
3134
|
today: d,
|
|
3095
3135
|
calendarId: u,
|
|
3096
|
-
isDateDisabled:
|
|
3097
|
-
todayIsInVisibleMonth:
|
|
3098
|
-
size:
|
|
3136
|
+
isDateDisabled: m,
|
|
3137
|
+
todayIsInVisibleMonth: h,
|
|
3138
|
+
size: f = "medium",
|
|
3099
3139
|
multiSelectable: g,
|
|
3100
|
-
dateTestId:
|
|
3101
|
-
}) => /* @__PURE__ */
|
|
3140
|
+
dateTestId: w
|
|
3141
|
+
}) => /* @__PURE__ */ c(
|
|
3102
3142
|
"table",
|
|
3103
3143
|
{
|
|
3104
|
-
className:
|
|
3144
|
+
className: ks.travelCalendar,
|
|
3105
3145
|
role: "grid",
|
|
3106
3146
|
...g ? { "aria-multiselectable": !0 } : void 0,
|
|
3107
|
-
children: /* @__PURE__ */
|
|
3108
|
-
/* @__PURE__ */
|
|
3109
|
-
t.weeks.map((y) => /* @__PURE__ */
|
|
3110
|
-
|
|
3147
|
+
children: /* @__PURE__ */ _("tbody", { children: [
|
|
3148
|
+
/* @__PURE__ */ c("tr", { children: t.weeks[0].days.map((y) => /* @__PURE__ */ c("th", { abbr: y.fullName, children: /* @__PURE__ */ c(wt, { children: y.name }) }, y.name)) }),
|
|
3149
|
+
t.weeks.map((y) => /* @__PURE__ */ c(pe.Fragment, { children: /* @__PURE__ */ c("tr", { children: y.days.map((M) => /* @__PURE__ */ c(
|
|
3150
|
+
ws,
|
|
3111
3151
|
{
|
|
3112
|
-
size:
|
|
3113
|
-
onClick: (
|
|
3152
|
+
size: f,
|
|
3153
|
+
onClick: (p) => e(p),
|
|
3114
3154
|
visibleMonth: s,
|
|
3115
3155
|
onChangeVisibleMonth: n,
|
|
3116
3156
|
isValidDateRange: i,
|
|
3117
3157
|
day: M,
|
|
3118
|
-
onStartHover: (
|
|
3119
|
-
onEndHover: (
|
|
3120
|
-
selectedStartDate:
|
|
3158
|
+
onStartHover: (p) => r(p),
|
|
3159
|
+
onEndHover: (p) => r((b) => b && P(b, p) ? void 0 : b),
|
|
3160
|
+
selectedStartDate: o,
|
|
3121
3161
|
selectedEndDate: a,
|
|
3122
3162
|
hoverDate: l,
|
|
3123
3163
|
today: d,
|
|
3124
|
-
todayIsInVisibleMonth:
|
|
3164
|
+
todayIsInVisibleMonth: h,
|
|
3125
3165
|
calendarId: u,
|
|
3126
|
-
isDateDisabled:
|
|
3127
|
-
dateTestId:
|
|
3166
|
+
isDateDisabled: m,
|
|
3167
|
+
dateTestId: w
|
|
3128
3168
|
},
|
|
3129
3169
|
M.dateString
|
|
3130
3170
|
)) }, y.weekNumber) }, y.weekNumber))
|
|
3131
3171
|
] })
|
|
3132
3172
|
}
|
|
3133
|
-
),
|
|
3134
|
-
travelDateRangeInput:
|
|
3135
|
-
overlay:
|
|
3136
|
-
calendarVisible:
|
|
3137
|
-
},
|
|
3173
|
+
), Ss = "_travelDateRangeInput_1j7rp_1", Ts = "_overlay_1j7rp_2", Rs = "_calendarVisible_1j7rp_6", re = {
|
|
3174
|
+
travelDateRangeInput: Ss,
|
|
3175
|
+
overlay: Ts,
|
|
3176
|
+
calendarVisible: Rs
|
|
3177
|
+
}, si = ({
|
|
3138
3178
|
value: t,
|
|
3139
3179
|
onValueChange: e,
|
|
3140
3180
|
startDateLabel: r,
|
|
3141
3181
|
endDateLabel: n,
|
|
3142
3182
|
localeCode: s = "sv",
|
|
3143
3183
|
initialMonthInFocus: i,
|
|
3144
|
-
previousMonthButtonAriaLabel:
|
|
3184
|
+
previousMonthButtonAriaLabel: o = "Previous month",
|
|
3145
3185
|
nextMonthButtonAriaLabel: a = "Next month",
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3186
|
+
placeholderWhenBlurredStartDate: l,
|
|
3187
|
+
placeholderWhenBlurredEndDate: d,
|
|
3188
|
+
heading: u,
|
|
3189
|
+
headingLevel: m,
|
|
3190
|
+
numMonthsInMonthPicker: h = 12,
|
|
3191
|
+
firstMonthInMonthPicker: f = /* @__PURE__ */ new Date(),
|
|
3192
|
+
zIndex: g = 1e3,
|
|
3193
|
+
zIndexWhenClosed: w,
|
|
3194
|
+
onHideCalendar: y,
|
|
3195
|
+
renderBelowCalendar: M,
|
|
3196
|
+
size: p = "medium",
|
|
3197
|
+
dateTestId: b,
|
|
3198
|
+
previousMonthButtonTestId: S,
|
|
3199
|
+
nextMonthButtonTestId: T
|
|
3158
3200
|
}) => {
|
|
3159
|
-
const [
|
|
3201
|
+
const [N, A] = I(!1), [k, R] = I(!1), [Y, G] = I({
|
|
3160
3202
|
// Sane defaults, this will be updated with actual data from DOM.
|
|
3161
3203
|
width: 336,
|
|
3162
3204
|
height: 66
|
|
3163
|
-
}),
|
|
3164
|
-
|
|
3165
|
-
|
|
3205
|
+
}), E = p === "large" ? "8.8rem" : "6.6rem", $ = W(!1), z = D(() => {
|
|
3206
|
+
$.current = !0, R(!0), setTimeout(() => {
|
|
3207
|
+
A(!0);
|
|
3166
3208
|
}, 10);
|
|
3167
|
-
}, []),
|
|
3168
|
-
|
|
3169
|
-
|
|
3209
|
+
}, []), j = D(() => {
|
|
3210
|
+
k && (A(!1), $.current = !1, y == null || y(), setTimeout(() => {
|
|
3211
|
+
$.current || R(!1);
|
|
3170
3212
|
}, 120));
|
|
3171
|
-
}, [
|
|
3172
|
-
|
|
3173
|
-
var
|
|
3174
|
-
const
|
|
3175
|
-
|
|
3176
|
-
}, [
|
|
3177
|
-
const
|
|
3213
|
+
}, [k, y]), H = W(null), Q = W(null);
|
|
3214
|
+
Ae(H, j), $e(() => {
|
|
3215
|
+
var Rt, ye;
|
|
3216
|
+
const U = (Rt = Q.current) == null ? void 0 : Rt.offsetWidth, F = (ye = Q.current) == null ? void 0 : ye.offsetHeight;
|
|
3217
|
+
U != null && F != null && (Y.height !== F || Y.width !== U) && G({ width: U, height: F });
|
|
3218
|
+
}, [Y.height, Y.width]);
|
|
3219
|
+
const X = Ze(
|
|
3178
3220
|
t,
|
|
3179
3221
|
e,
|
|
3180
3222
|
s,
|
|
3181
3223
|
i
|
|
3182
3224
|
), {
|
|
3183
|
-
visiblePanel:
|
|
3184
|
-
visibleMonth:
|
|
3185
|
-
onValueChangeByInputs:
|
|
3186
|
-
setVisibleMonth:
|
|
3187
|
-
setVisiblePanel:
|
|
3188
|
-
monthPickerButtonRef:
|
|
3189
|
-
} =
|
|
3190
|
-
(
|
|
3191
|
-
|
|
3225
|
+
visiblePanel: nt,
|
|
3226
|
+
visibleMonth: q,
|
|
3227
|
+
onValueChangeByInputs: C,
|
|
3228
|
+
setVisibleMonth: K,
|
|
3229
|
+
setVisiblePanel: st,
|
|
3230
|
+
monthPickerButtonRef: it
|
|
3231
|
+
} = X, O = D(
|
|
3232
|
+
(U) => {
|
|
3233
|
+
U.key === "Escape" && j();
|
|
3192
3234
|
},
|
|
3193
|
-
[
|
|
3235
|
+
[j]
|
|
3194
3236
|
);
|
|
3195
|
-
return /* @__PURE__ */
|
|
3196
|
-
|
|
3237
|
+
return /* @__PURE__ */ _(
|
|
3238
|
+
L,
|
|
3197
3239
|
{
|
|
3198
3240
|
position: "relative",
|
|
3199
|
-
className:
|
|
3200
|
-
ref:
|
|
3201
|
-
onKeyDown:
|
|
3202
|
-
height:
|
|
3203
|
-
width:
|
|
3241
|
+
className: re.travelDateRangeInput,
|
|
3242
|
+
ref: H,
|
|
3243
|
+
onKeyDown: O,
|
|
3244
|
+
height: Y.height,
|
|
3245
|
+
width: Y.width,
|
|
3204
3246
|
children: [
|
|
3205
|
-
/* @__PURE__ */
|
|
3206
|
-
|
|
3247
|
+
/* @__PURE__ */ c(
|
|
3248
|
+
L,
|
|
3207
3249
|
{
|
|
3208
3250
|
position: "absolute",
|
|
3209
|
-
ref:
|
|
3210
|
-
zIndex:
|
|
3211
|
-
children: /* @__PURE__ */
|
|
3212
|
-
|
|
3251
|
+
ref: Q,
|
|
3252
|
+
zIndex: k ? g : w,
|
|
3253
|
+
children: /* @__PURE__ */ c(
|
|
3254
|
+
Xe,
|
|
3213
3255
|
{
|
|
3256
|
+
...X,
|
|
3214
3257
|
value: t,
|
|
3215
|
-
onValueChange:
|
|
3258
|
+
onValueChange: C,
|
|
3216
3259
|
localeCode: s,
|
|
3217
3260
|
startDateLabel: r,
|
|
3218
3261
|
endDateLabel: n,
|
|
3219
|
-
onFocus:
|
|
3220
|
-
calendarSize:
|
|
3262
|
+
onFocus: z,
|
|
3263
|
+
calendarSize: p,
|
|
3264
|
+
placeholderWhenBlurredStartDate: l,
|
|
3265
|
+
placeholderWhenBlurredEndDate: d
|
|
3221
3266
|
}
|
|
3222
3267
|
)
|
|
3223
3268
|
}
|
|
3224
3269
|
),
|
|
3225
|
-
|
|
3226
|
-
|
|
3270
|
+
k && /* @__PURE__ */ c(
|
|
3271
|
+
L,
|
|
3227
3272
|
{
|
|
3228
3273
|
position: "absolute",
|
|
3229
|
-
zIndex:
|
|
3274
|
+
zIndex: g - 1,
|
|
3230
3275
|
left: "-2.4rem",
|
|
3231
|
-
top:
|
|
3232
|
-
className: Dt(
|
|
3233
|
-
children: /* @__PURE__ */
|
|
3234
|
-
|
|
3276
|
+
top: u ? "-8.0rem" : "-2.4rem",
|
|
3277
|
+
className: Dt(re.overlay, N && re.calendarVisible),
|
|
3278
|
+
children: /* @__PURE__ */ c(
|
|
3279
|
+
L,
|
|
3235
3280
|
{
|
|
3236
3281
|
background: "white",
|
|
3237
3282
|
shadow: "popover",
|
|
3238
3283
|
borderRadius: "var(--swui-border-radius-large)",
|
|
3239
|
-
children: /* @__PURE__ */
|
|
3240
|
-
|
|
3241
|
-
/* @__PURE__ */
|
|
3242
|
-
/* @__PURE__ */
|
|
3243
|
-
|
|
3284
|
+
children: /* @__PURE__ */ _(Le, { gap: 3, children: [
|
|
3285
|
+
u && /* @__PURE__ */ c(Lt, { variant: "h2", as: m, children: u }),
|
|
3286
|
+
/* @__PURE__ */ c(L, { height: E }),
|
|
3287
|
+
/* @__PURE__ */ c(
|
|
3288
|
+
Xt,
|
|
3244
3289
|
{
|
|
3245
|
-
...
|
|
3246
|
-
previousMonthButtonAriaLabel:
|
|
3290
|
+
...X,
|
|
3291
|
+
previousMonthButtonAriaLabel: o,
|
|
3247
3292
|
nextMonthButtonAriaLabel: a,
|
|
3248
|
-
calendarSize:
|
|
3249
|
-
previousMonthButtonTestId:
|
|
3250
|
-
nextMonthButtonTestId:
|
|
3293
|
+
calendarSize: p,
|
|
3294
|
+
previousMonthButtonTestId: S,
|
|
3295
|
+
nextMonthButtonTestId: T
|
|
3251
3296
|
}
|
|
3252
3297
|
),
|
|
3253
|
-
|
|
3254
|
-
|
|
3298
|
+
nt === "calendar" && /* @__PURE__ */ c(
|
|
3299
|
+
Zt,
|
|
3255
3300
|
{
|
|
3256
|
-
...
|
|
3257
|
-
size:
|
|
3301
|
+
...X,
|
|
3302
|
+
size: p,
|
|
3258
3303
|
multiSelectable: !0,
|
|
3259
|
-
dateTestId:
|
|
3304
|
+
dateTestId: b
|
|
3260
3305
|
}
|
|
3261
3306
|
),
|
|
3262
|
-
|
|
3263
|
-
|
|
3307
|
+
nt === "month-picker" && /* @__PURE__ */ c(
|
|
3308
|
+
vt,
|
|
3264
3309
|
{
|
|
3265
|
-
firstMonth:
|
|
3266
|
-
numMonths:
|
|
3267
|
-
value:
|
|
3268
|
-
size:
|
|
3269
|
-
onValueChange: (
|
|
3270
|
-
var
|
|
3271
|
-
|
|
3310
|
+
firstMonth: f,
|
|
3311
|
+
numMonths: h,
|
|
3312
|
+
value: q,
|
|
3313
|
+
size: p,
|
|
3314
|
+
onValueChange: (U) => {
|
|
3315
|
+
var F;
|
|
3316
|
+
K(U), st("calendar"), (F = it.current) == null || F.focus();
|
|
3272
3317
|
},
|
|
3273
3318
|
onCancel: () => {
|
|
3274
|
-
var
|
|
3275
|
-
|
|
3319
|
+
var U;
|
|
3320
|
+
st("calendar"), (U = it.current) == null || U.focus();
|
|
3276
3321
|
}
|
|
3277
3322
|
}
|
|
3278
3323
|
),
|
|
3279
|
-
|
|
3324
|
+
M == null ? void 0 : M({ hideCalendar: j })
|
|
3280
3325
|
] })
|
|
3281
3326
|
}
|
|
3282
3327
|
)
|
|
@@ -3285,241 +3330,252 @@ const oe = ({
|
|
|
3285
3330
|
]
|
|
3286
3331
|
}
|
|
3287
3332
|
);
|
|
3288
|
-
},
|
|
3289
|
-
travelDateInput:
|
|
3290
|
-
overlay:
|
|
3291
|
-
calendarVisible:
|
|
3292
|
-
},
|
|
3333
|
+
}, Is = "_travelDateInput_hmfbf_1", xs = "_overlay_hmfbf_2", Es = "_calendarVisible_hmfbf_6", ne = {
|
|
3334
|
+
travelDateInput: Is,
|
|
3335
|
+
overlay: xs,
|
|
3336
|
+
calendarVisible: Es
|
|
3337
|
+
}, Ve = ({
|
|
3293
3338
|
value: t,
|
|
3294
3339
|
onValueChange: e,
|
|
3295
3340
|
label: r = "Date",
|
|
3296
3341
|
localeCode: n,
|
|
3297
3342
|
onFocus: s,
|
|
3298
|
-
calendarSize: i
|
|
3343
|
+
calendarSize: i,
|
|
3344
|
+
placeholderWhenBlurred: o,
|
|
3345
|
+
valueWhenBlurred: a
|
|
3299
3346
|
}) => {
|
|
3300
|
-
const { mask:
|
|
3301
|
-
const
|
|
3347
|
+
const { mask: l, placeholder: d } = x(() => {
|
|
3348
|
+
const u = Tt(n);
|
|
3302
3349
|
return {
|
|
3303
|
-
mask:
|
|
3304
|
-
placeholder:
|
|
3350
|
+
mask: Je(u),
|
|
3351
|
+
placeholder: u.toLowerCase()
|
|
3305
3352
|
};
|
|
3306
3353
|
}, [n]);
|
|
3307
|
-
return /* @__PURE__ */
|
|
3308
|
-
|
|
3354
|
+
return /* @__PURE__ */ c(B, { children: /* @__PURE__ */ c(
|
|
3355
|
+
ce,
|
|
3309
3356
|
{
|
|
3310
|
-
mask:
|
|
3357
|
+
mask: l,
|
|
3311
3358
|
value: t,
|
|
3312
3359
|
onValueChange: e,
|
|
3313
|
-
onBlur: (
|
|
3314
|
-
const
|
|
3315
|
-
|
|
3360
|
+
onBlur: (u) => {
|
|
3361
|
+
const m = ae(u.target.value, n);
|
|
3362
|
+
m && m !== t && (e == null || e(m));
|
|
3316
3363
|
},
|
|
3317
3364
|
onFocus: s,
|
|
3318
3365
|
label: r,
|
|
3319
|
-
placeholder:
|
|
3320
|
-
calendarSize: i
|
|
3366
|
+
placeholder: d,
|
|
3367
|
+
calendarSize: i,
|
|
3368
|
+
placeholderWhenBlurred: o,
|
|
3369
|
+
valueWhenBlurred: a
|
|
3321
3370
|
}
|
|
3322
3371
|
) });
|
|
3323
|
-
},
|
|
3324
|
-
const s =
|
|
3372
|
+
}, tr = (t, e, r, n) => {
|
|
3373
|
+
const s = Qt(r) ?? Qe(), i = De(), o = we(), a = W(null), l = x(
|
|
3325
3374
|
() => Tt(r),
|
|
3326
3375
|
[r]
|
|
3327
|
-
), d =
|
|
3376
|
+
), d = x(
|
|
3328
3377
|
() => (t == null ? void 0 : t.length) === l.length ? gt(t, r) : void 0,
|
|
3329
3378
|
[l.length, r, t]
|
|
3330
|
-
),
|
|
3379
|
+
), u = x(
|
|
3380
|
+
() => d != null ? le(d, o, s) : void 0,
|
|
3381
|
+
[s, d, o]
|
|
3382
|
+
), [m, h] = I(
|
|
3331
3383
|
n ?? d ?? /* @__PURE__ */ new Date()
|
|
3332
3384
|
), f = D(
|
|
3333
|
-
(
|
|
3334
|
-
|
|
3385
|
+
(R) => {
|
|
3386
|
+
ct(R, o) || V(R, o) ? h(R) : h(o);
|
|
3335
3387
|
},
|
|
3336
|
-
[
|
|
3337
|
-
),
|
|
3338
|
-
() =>
|
|
3339
|
-
|
|
3340
|
-
|
|
3388
|
+
[o]
|
|
3389
|
+
), g = x(
|
|
3390
|
+
() => Jt(
|
|
3391
|
+
m.getFullYear(),
|
|
3392
|
+
m.getMonth(),
|
|
3341
3393
|
s
|
|
3342
3394
|
),
|
|
3343
|
-
[s,
|
|
3344
|
-
),
|
|
3345
|
-
(
|
|
3346
|
-
const
|
|
3347
|
-
|
|
3395
|
+
[s, m]
|
|
3396
|
+
), w = x(() => _t(v(m, "MMMM yyyy", { locale: s })), [s, m]), y = x(() => ct(o, m), [o, m]), [M, p] = I(), [b, S] = I("calendar"), T = D(
|
|
3397
|
+
(R) => {
|
|
3398
|
+
const Y = (R == null ? void 0 : R.length) === l.length ? gt(R, r) : void 0;
|
|
3399
|
+
Y && f(Y), e == null || e(R);
|
|
3348
3400
|
},
|
|
3349
3401
|
[l.length, r, e, f]
|
|
3350
|
-
),
|
|
3351
|
-
() =>
|
|
3352
|
-
[
|
|
3402
|
+
), N = x(
|
|
3403
|
+
() => ct(o, m) || ot(m, o),
|
|
3404
|
+
[o, m]
|
|
3353
3405
|
);
|
|
3354
3406
|
return {
|
|
3355
3407
|
isDateDisabled: D(
|
|
3356
|
-
(
|
|
3357
|
-
[
|
|
3408
|
+
(R) => !P(R, o) && ot(R, o),
|
|
3409
|
+
[o]
|
|
3358
3410
|
),
|
|
3359
|
-
onClickDate: (
|
|
3360
|
-
e == null || e(
|
|
3411
|
+
onClickDate: (R) => {
|
|
3412
|
+
e == null || e(It(R, r));
|
|
3361
3413
|
},
|
|
3362
|
-
onValueChangeByInputs:
|
|
3363
|
-
prevMonthDisabled:
|
|
3414
|
+
onValueChangeByInputs: T,
|
|
3415
|
+
prevMonthDisabled: N,
|
|
3364
3416
|
monthPickerButtonRef: a,
|
|
3365
3417
|
calendarId: i,
|
|
3366
|
-
monthPickerButtonLabel:
|
|
3418
|
+
monthPickerButtonLabel: w,
|
|
3367
3419
|
visiblePanel: b,
|
|
3368
|
-
setVisiblePanel:
|
|
3420
|
+
setVisiblePanel: S,
|
|
3369
3421
|
setVisibleMonth: h,
|
|
3370
|
-
visibleMonthData:
|
|
3371
|
-
todayIsInVisibleMonth:
|
|
3372
|
-
hoverDate:
|
|
3373
|
-
setHoverDate:
|
|
3422
|
+
visibleMonthData: g,
|
|
3423
|
+
todayIsInVisibleMonth: y,
|
|
3424
|
+
hoverDate: M,
|
|
3425
|
+
setHoverDate: p,
|
|
3374
3426
|
selectedDate: d,
|
|
3375
|
-
today:
|
|
3376
|
-
visibleMonth:
|
|
3427
|
+
today: o,
|
|
3428
|
+
visibleMonth: m,
|
|
3429
|
+
valueWhenBlurred: u
|
|
3377
3430
|
};
|
|
3378
|
-
},
|
|
3431
|
+
}, ii = ({
|
|
3379
3432
|
value: t,
|
|
3380
3433
|
onValueChange: e,
|
|
3381
3434
|
label: r,
|
|
3382
3435
|
localeCode: n = "sv",
|
|
3383
3436
|
initialMonthInFocus: s,
|
|
3384
3437
|
previousMonthButtonAriaLabel: i = "Previous month",
|
|
3385
|
-
nextMonthButtonAriaLabel:
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3438
|
+
nextMonthButtonAriaLabel: o = "Next month",
|
|
3439
|
+
placeholderWhenBlurred: a,
|
|
3440
|
+
heading: l,
|
|
3441
|
+
headingLevel: d,
|
|
3442
|
+
numMonthsInMonthPicker: u = 12,
|
|
3443
|
+
firstMonthInMonthPicker: m = /* @__PURE__ */ new Date(),
|
|
3390
3444
|
zIndex: h = 1e3,
|
|
3391
3445
|
zIndexWhenClosed: f,
|
|
3392
|
-
onHideCalendar:
|
|
3393
|
-
renderBelowCalendar:
|
|
3394
|
-
size:
|
|
3395
|
-
dateTestId:
|
|
3396
|
-
previousMonthButtonTestId:
|
|
3446
|
+
onHideCalendar: g,
|
|
3447
|
+
renderBelowCalendar: w,
|
|
3448
|
+
size: y = "medium",
|
|
3449
|
+
dateTestId: M,
|
|
3450
|
+
previousMonthButtonTestId: p,
|
|
3397
3451
|
nextMonthButtonTestId: b
|
|
3398
3452
|
}) => {
|
|
3399
|
-
const [
|
|
3453
|
+
const [S, T] = I(!1), [N, A] = I(!1), [k, R] = I({
|
|
3400
3454
|
// Sane defaults, this will be updated with actual data from DOM.
|
|
3401
3455
|
width: 336,
|
|
3402
3456
|
height: 66
|
|
3403
|
-
}),
|
|
3404
|
-
|
|
3405
|
-
|
|
3457
|
+
}), Y = y === "large" ? "8.8rem" : "6.6rem", G = W(!1), E = D(() => {
|
|
3458
|
+
G.current = !0, A(!0), setTimeout(() => {
|
|
3459
|
+
T(!0);
|
|
3406
3460
|
}, 10);
|
|
3407
|
-
}, []),
|
|
3408
|
-
|
|
3409
|
-
|
|
3461
|
+
}, []), $ = D(() => {
|
|
3462
|
+
N && (T(!1), G.current = !1, g == null || g(), setTimeout(() => {
|
|
3463
|
+
G.current || A(!1);
|
|
3410
3464
|
}, 120));
|
|
3411
|
-
}, [
|
|
3412
|
-
|
|
3413
|
-
var
|
|
3414
|
-
const
|
|
3415
|
-
|
|
3416
|
-
}, [
|
|
3417
|
-
const
|
|
3465
|
+
}, [N, g]), z = W(null), j = W(null);
|
|
3466
|
+
Ae(z, $), $e(() => {
|
|
3467
|
+
var F, Rt;
|
|
3468
|
+
const O = (F = j.current) == null ? void 0 : F.offsetWidth, U = (Rt = j.current) == null ? void 0 : Rt.offsetHeight;
|
|
3469
|
+
O != null && U != null && (k.height !== U || k.width !== O) && R({ width: O, height: U });
|
|
3470
|
+
}, [k.height, k.width]);
|
|
3471
|
+
const H = tr(
|
|
3418
3472
|
t,
|
|
3419
3473
|
e,
|
|
3420
3474
|
n,
|
|
3421
3475
|
s
|
|
3422
3476
|
), {
|
|
3423
|
-
visiblePanel:
|
|
3424
|
-
visibleMonth:
|
|
3477
|
+
visiblePanel: Q,
|
|
3478
|
+
visibleMonth: X,
|
|
3425
3479
|
onValueChangeByInputs: nt,
|
|
3426
|
-
selectedDate:
|
|
3427
|
-
setVisibleMonth:
|
|
3428
|
-
setVisiblePanel:
|
|
3429
|
-
monthPickerButtonRef:
|
|
3430
|
-
} =
|
|
3431
|
-
(
|
|
3432
|
-
|
|
3480
|
+
selectedDate: q,
|
|
3481
|
+
setVisibleMonth: C,
|
|
3482
|
+
setVisiblePanel: K,
|
|
3483
|
+
monthPickerButtonRef: st
|
|
3484
|
+
} = H, it = D(
|
|
3485
|
+
(O) => {
|
|
3486
|
+
O.key === "Escape" && $();
|
|
3433
3487
|
},
|
|
3434
|
-
[
|
|
3488
|
+
[$]
|
|
3435
3489
|
);
|
|
3436
|
-
return /* @__PURE__ */
|
|
3437
|
-
|
|
3490
|
+
return /* @__PURE__ */ _(
|
|
3491
|
+
L,
|
|
3438
3492
|
{
|
|
3439
3493
|
position: "relative",
|
|
3440
|
-
className:
|
|
3441
|
-
ref:
|
|
3442
|
-
onKeyDown:
|
|
3443
|
-
height:
|
|
3444
|
-
width:
|
|
3494
|
+
className: ne.travelDateInput,
|
|
3495
|
+
ref: z,
|
|
3496
|
+
onKeyDown: it,
|
|
3497
|
+
height: k.height,
|
|
3498
|
+
width: k.width,
|
|
3445
3499
|
children: [
|
|
3446
|
-
/* @__PURE__ */
|
|
3447
|
-
|
|
3500
|
+
/* @__PURE__ */ c(
|
|
3501
|
+
L,
|
|
3448
3502
|
{
|
|
3449
3503
|
position: "absolute",
|
|
3450
|
-
ref:
|
|
3451
|
-
zIndex:
|
|
3452
|
-
children: /* @__PURE__ */
|
|
3453
|
-
|
|
3504
|
+
ref: j,
|
|
3505
|
+
zIndex: N ? h : f,
|
|
3506
|
+
children: /* @__PURE__ */ c(
|
|
3507
|
+
Ve,
|
|
3454
3508
|
{
|
|
3509
|
+
...H,
|
|
3455
3510
|
value: t,
|
|
3456
3511
|
onValueChange: nt,
|
|
3457
3512
|
localeCode: n,
|
|
3458
3513
|
label: r,
|
|
3459
|
-
onFocus:
|
|
3460
|
-
calendarSize:
|
|
3514
|
+
onFocus: E,
|
|
3515
|
+
calendarSize: y,
|
|
3516
|
+
placeholderWhenBlurred: a
|
|
3461
3517
|
}
|
|
3462
3518
|
)
|
|
3463
3519
|
}
|
|
3464
3520
|
),
|
|
3465
|
-
|
|
3466
|
-
|
|
3521
|
+
N && /* @__PURE__ */ c(
|
|
3522
|
+
L,
|
|
3467
3523
|
{
|
|
3468
3524
|
position: "absolute",
|
|
3469
3525
|
zIndex: h - 1,
|
|
3470
3526
|
left: "-2.4rem",
|
|
3471
|
-
top:
|
|
3472
|
-
className: Dt(
|
|
3473
|
-
children: /* @__PURE__ */
|
|
3474
|
-
|
|
3527
|
+
top: l ? "-8.0rem" : "-2.4rem",
|
|
3528
|
+
className: Dt(ne.overlay, S && ne.calendarVisible),
|
|
3529
|
+
children: /* @__PURE__ */ c(
|
|
3530
|
+
L,
|
|
3475
3531
|
{
|
|
3476
3532
|
background: "white",
|
|
3477
3533
|
shadow: "popover",
|
|
3478
3534
|
borderRadius: "var(--swui-border-radius-large)",
|
|
3479
|
-
children: /* @__PURE__ */
|
|
3480
|
-
|
|
3481
|
-
/* @__PURE__ */
|
|
3482
|
-
/* @__PURE__ */
|
|
3483
|
-
|
|
3535
|
+
children: /* @__PURE__ */ _(Le, { gap: 3, children: [
|
|
3536
|
+
l && /* @__PURE__ */ c(Lt, { variant: "h2", as: d, children: l }),
|
|
3537
|
+
/* @__PURE__ */ c(L, { height: Y }),
|
|
3538
|
+
/* @__PURE__ */ c(
|
|
3539
|
+
Xt,
|
|
3484
3540
|
{
|
|
3485
|
-
...
|
|
3541
|
+
...H,
|
|
3486
3542
|
previousMonthButtonAriaLabel: i,
|
|
3487
|
-
nextMonthButtonAriaLabel:
|
|
3488
|
-
calendarSize:
|
|
3489
|
-
previousMonthButtonTestId:
|
|
3543
|
+
nextMonthButtonAriaLabel: o,
|
|
3544
|
+
calendarSize: y,
|
|
3545
|
+
previousMonthButtonTestId: p,
|
|
3490
3546
|
nextMonthButtonTestId: b
|
|
3491
3547
|
}
|
|
3492
3548
|
),
|
|
3493
|
-
|
|
3494
|
-
|
|
3549
|
+
Q === "calendar" && /* @__PURE__ */ c(
|
|
3550
|
+
Zt,
|
|
3495
3551
|
{
|
|
3496
|
-
...
|
|
3497
|
-
size:
|
|
3498
|
-
isValidDateRange: !!
|
|
3499
|
-
selectedStartDate:
|
|
3500
|
-
selectedEndDate:
|
|
3552
|
+
...H,
|
|
3553
|
+
size: y,
|
|
3554
|
+
isValidDateRange: !!q,
|
|
3555
|
+
selectedStartDate: q,
|
|
3556
|
+
selectedEndDate: q,
|
|
3501
3557
|
multiSelectable: !1,
|
|
3502
|
-
dateTestId:
|
|
3558
|
+
dateTestId: M
|
|
3503
3559
|
}
|
|
3504
3560
|
),
|
|
3505
|
-
|
|
3506
|
-
|
|
3561
|
+
Q === "month-picker" && /* @__PURE__ */ c(
|
|
3562
|
+
vt,
|
|
3507
3563
|
{
|
|
3508
|
-
firstMonth:
|
|
3509
|
-
numMonths:
|
|
3510
|
-
value:
|
|
3511
|
-
size:
|
|
3512
|
-
onValueChange: (
|
|
3513
|
-
var
|
|
3514
|
-
|
|
3564
|
+
firstMonth: m,
|
|
3565
|
+
numMonths: u,
|
|
3566
|
+
value: X,
|
|
3567
|
+
size: y,
|
|
3568
|
+
onValueChange: (O) => {
|
|
3569
|
+
var U;
|
|
3570
|
+
C(O), K("calendar"), (U = st.current) == null || U.focus();
|
|
3515
3571
|
},
|
|
3516
3572
|
onCancel: () => {
|
|
3517
|
-
var
|
|
3518
|
-
|
|
3573
|
+
var O;
|
|
3574
|
+
K("calendar"), (O = st.current) == null || O.focus();
|
|
3519
3575
|
}
|
|
3520
3576
|
}
|
|
3521
3577
|
),
|
|
3522
|
-
|
|
3578
|
+
w == null ? void 0 : w({ hideCalendar: $ })
|
|
3523
3579
|
] })
|
|
3524
3580
|
}
|
|
3525
3581
|
)
|
|
@@ -3528,234 +3584,242 @@ const oe = ({
|
|
|
3528
3584
|
]
|
|
3529
3585
|
}
|
|
3530
3586
|
);
|
|
3531
|
-
},
|
|
3587
|
+
}, oi = ({
|
|
3532
3588
|
value: t,
|
|
3533
3589
|
onValueChange: e,
|
|
3534
3590
|
label: r,
|
|
3535
3591
|
localeCode: n = "sv",
|
|
3536
3592
|
initialMonthInFocus: s,
|
|
3537
3593
|
previousMonthButtonAriaLabel: i = "Previous month",
|
|
3538
|
-
nextMonthButtonAriaLabel:
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3594
|
+
nextMonthButtonAriaLabel: o = "Next month",
|
|
3595
|
+
placeholderWhenBlurred: a,
|
|
3596
|
+
heading: l,
|
|
3597
|
+
headingLevel: d,
|
|
3598
|
+
numMonthsInMonthPicker: u = 12,
|
|
3599
|
+
firstMonthInMonthPicker: m = /* @__PURE__ */ new Date(),
|
|
3543
3600
|
dateTestId: h,
|
|
3544
3601
|
size: f = "medium",
|
|
3545
|
-
previousMonthButtonTestId:
|
|
3546
|
-
nextMonthButtonTestId:
|
|
3602
|
+
previousMonthButtonTestId: g,
|
|
3603
|
+
nextMonthButtonTestId: w
|
|
3547
3604
|
}) => {
|
|
3548
|
-
const
|
|
3605
|
+
const y = tr(
|
|
3549
3606
|
t,
|
|
3550
3607
|
e,
|
|
3551
3608
|
n,
|
|
3552
3609
|
s
|
|
3553
3610
|
), {
|
|
3554
|
-
visiblePanel:
|
|
3555
|
-
visibleMonth:
|
|
3611
|
+
visiblePanel: M,
|
|
3612
|
+
visibleMonth: p,
|
|
3556
3613
|
onValueChangeByInputs: b,
|
|
3557
|
-
setVisibleMonth:
|
|
3558
|
-
setVisiblePanel:
|
|
3559
|
-
monthPickerButtonRef:
|
|
3560
|
-
selectedDate:
|
|
3561
|
-
} =
|
|
3562
|
-
return /* @__PURE__ */
|
|
3563
|
-
|
|
3564
|
-
/* @__PURE__ */
|
|
3565
|
-
|
|
3614
|
+
setVisibleMonth: S,
|
|
3615
|
+
setVisiblePanel: T,
|
|
3616
|
+
monthPickerButtonRef: N,
|
|
3617
|
+
selectedDate: A
|
|
3618
|
+
} = y;
|
|
3619
|
+
return /* @__PURE__ */ _(J, { gap: 3, children: [
|
|
3620
|
+
l && /* @__PURE__ */ c(Lt, { variant: "h2", as: d, children: l }),
|
|
3621
|
+
/* @__PURE__ */ c(
|
|
3622
|
+
Ve,
|
|
3566
3623
|
{
|
|
3624
|
+
...y,
|
|
3567
3625
|
value: t,
|
|
3568
3626
|
onValueChange: b,
|
|
3569
3627
|
localeCode: n,
|
|
3570
3628
|
label: r,
|
|
3571
|
-
calendarSize: f
|
|
3629
|
+
calendarSize: f,
|
|
3630
|
+
placeholderWhenBlurred: a
|
|
3572
3631
|
}
|
|
3573
3632
|
),
|
|
3574
|
-
/* @__PURE__ */
|
|
3575
|
-
|
|
3633
|
+
/* @__PURE__ */ c(
|
|
3634
|
+
Xt,
|
|
3576
3635
|
{
|
|
3577
|
-
...
|
|
3636
|
+
...y,
|
|
3578
3637
|
previousMonthButtonAriaLabel: i,
|
|
3579
|
-
nextMonthButtonAriaLabel:
|
|
3638
|
+
nextMonthButtonAriaLabel: o,
|
|
3580
3639
|
calendarSize: f,
|
|
3581
|
-
previousMonthButtonTestId:
|
|
3582
|
-
nextMonthButtonTestId:
|
|
3640
|
+
previousMonthButtonTestId: g,
|
|
3641
|
+
nextMonthButtonTestId: w
|
|
3583
3642
|
}
|
|
3584
3643
|
),
|
|
3585
|
-
|
|
3586
|
-
|
|
3644
|
+
M === "calendar" && /* @__PURE__ */ c(
|
|
3645
|
+
Zt,
|
|
3587
3646
|
{
|
|
3588
|
-
...
|
|
3647
|
+
...y,
|
|
3589
3648
|
size: f,
|
|
3590
|
-
selectedStartDate:
|
|
3591
|
-
selectedEndDate:
|
|
3592
|
-
isValidDateRange: !!
|
|
3649
|
+
selectedStartDate: A,
|
|
3650
|
+
selectedEndDate: A,
|
|
3651
|
+
isValidDateRange: !!A,
|
|
3593
3652
|
multiSelectable: !1,
|
|
3594
3653
|
dateTestId: h
|
|
3595
3654
|
}
|
|
3596
3655
|
),
|
|
3597
|
-
|
|
3598
|
-
|
|
3656
|
+
M === "month-picker" && /* @__PURE__ */ c(
|
|
3657
|
+
vt,
|
|
3599
3658
|
{
|
|
3600
|
-
firstMonth:
|
|
3601
|
-
numMonths:
|
|
3602
|
-
value:
|
|
3659
|
+
firstMonth: m,
|
|
3660
|
+
numMonths: u,
|
|
3661
|
+
value: p,
|
|
3603
3662
|
size: f,
|
|
3604
|
-
onValueChange: (
|
|
3605
|
-
var
|
|
3606
|
-
|
|
3663
|
+
onValueChange: (k) => {
|
|
3664
|
+
var R;
|
|
3665
|
+
S(k), T("calendar"), (R = N.current) == null || R.focus();
|
|
3607
3666
|
},
|
|
3608
3667
|
onCancel: () => {
|
|
3609
|
-
var
|
|
3610
|
-
|
|
3668
|
+
var k;
|
|
3669
|
+
T("calendar"), (k = N.current) == null || k.focus();
|
|
3611
3670
|
}
|
|
3612
3671
|
}
|
|
3613
3672
|
)
|
|
3614
3673
|
] });
|
|
3615
|
-
},
|
|
3674
|
+
}, ci = ({
|
|
3616
3675
|
value: t,
|
|
3617
3676
|
onValueChange: e,
|
|
3618
3677
|
startDateLabel: r,
|
|
3619
3678
|
endDateLabel: n,
|
|
3620
3679
|
localeCode: s = "sv",
|
|
3621
3680
|
initialMonthInFocus: i,
|
|
3622
|
-
previousMonthButtonAriaLabel:
|
|
3681
|
+
previousMonthButtonAriaLabel: o = "Previous month",
|
|
3623
3682
|
nextMonthButtonAriaLabel: a = "Next month",
|
|
3624
3683
|
heading: l,
|
|
3625
3684
|
headingLevel: d,
|
|
3626
3685
|
numMonthsInMonthPicker: u = 12,
|
|
3627
|
-
firstMonthInMonthPicker:
|
|
3628
|
-
size:
|
|
3629
|
-
dateTestId:
|
|
3686
|
+
firstMonthInMonthPicker: m = /* @__PURE__ */ new Date(),
|
|
3687
|
+
size: h = "medium",
|
|
3688
|
+
dateTestId: f,
|
|
3630
3689
|
previousMonthButtonTestId: g,
|
|
3631
|
-
nextMonthButtonTestId:
|
|
3690
|
+
nextMonthButtonTestId: w,
|
|
3691
|
+
placeholderWhenBlurredStartDate: y,
|
|
3692
|
+
placeholderWhenBlurredEndDate: M
|
|
3632
3693
|
}) => {
|
|
3633
|
-
const
|
|
3694
|
+
const p = Ze(
|
|
3634
3695
|
t,
|
|
3635
3696
|
e,
|
|
3636
3697
|
s,
|
|
3637
3698
|
i
|
|
3638
3699
|
), {
|
|
3639
|
-
visiblePanel:
|
|
3640
|
-
visibleMonth:
|
|
3641
|
-
onValueChangeByInputs:
|
|
3642
|
-
setVisibleMonth:
|
|
3643
|
-
setVisiblePanel:
|
|
3644
|
-
monthPickerButtonRef:
|
|
3645
|
-
} =
|
|
3646
|
-
return /* @__PURE__ */
|
|
3647
|
-
l && /* @__PURE__ */
|
|
3648
|
-
/* @__PURE__ */
|
|
3649
|
-
|
|
3700
|
+
visiblePanel: b,
|
|
3701
|
+
visibleMonth: S,
|
|
3702
|
+
onValueChangeByInputs: T,
|
|
3703
|
+
setVisibleMonth: N,
|
|
3704
|
+
setVisiblePanel: A,
|
|
3705
|
+
monthPickerButtonRef: k
|
|
3706
|
+
} = p;
|
|
3707
|
+
return /* @__PURE__ */ _(J, { gap: 3, children: [
|
|
3708
|
+
l && /* @__PURE__ */ c(Lt, { variant: "h2", as: d, children: l }),
|
|
3709
|
+
/* @__PURE__ */ c(
|
|
3710
|
+
Xe,
|
|
3650
3711
|
{
|
|
3712
|
+
...p,
|
|
3651
3713
|
value: t,
|
|
3652
|
-
onValueChange:
|
|
3714
|
+
onValueChange: T,
|
|
3653
3715
|
localeCode: s,
|
|
3654
3716
|
startDateLabel: r,
|
|
3655
3717
|
endDateLabel: n,
|
|
3656
|
-
calendarSize:
|
|
3718
|
+
calendarSize: h,
|
|
3719
|
+
placeholderWhenBlurredStartDate: y,
|
|
3720
|
+
placeholderWhenBlurredEndDate: M
|
|
3657
3721
|
}
|
|
3658
3722
|
),
|
|
3659
|
-
/* @__PURE__ */
|
|
3660
|
-
|
|
3723
|
+
/* @__PURE__ */ c(
|
|
3724
|
+
Xt,
|
|
3661
3725
|
{
|
|
3662
|
-
...
|
|
3663
|
-
previousMonthButtonAriaLabel:
|
|
3726
|
+
...p,
|
|
3727
|
+
previousMonthButtonAriaLabel: o,
|
|
3664
3728
|
nextMonthButtonAriaLabel: a,
|
|
3665
|
-
calendarSize:
|
|
3729
|
+
calendarSize: h,
|
|
3666
3730
|
previousMonthButtonTestId: g,
|
|
3667
|
-
nextMonthButtonTestId:
|
|
3731
|
+
nextMonthButtonTestId: w
|
|
3668
3732
|
}
|
|
3669
3733
|
),
|
|
3670
|
-
|
|
3671
|
-
|
|
3734
|
+
b === "calendar" && /* @__PURE__ */ c(
|
|
3735
|
+
Zt,
|
|
3672
3736
|
{
|
|
3673
|
-
...
|
|
3674
|
-
size:
|
|
3737
|
+
...p,
|
|
3738
|
+
size: h,
|
|
3675
3739
|
multiSelectable: !0,
|
|
3676
|
-
dateTestId:
|
|
3740
|
+
dateTestId: f
|
|
3677
3741
|
}
|
|
3678
3742
|
),
|
|
3679
|
-
|
|
3680
|
-
|
|
3743
|
+
b === "month-picker" && /* @__PURE__ */ c(
|
|
3744
|
+
vt,
|
|
3681
3745
|
{
|
|
3682
|
-
firstMonth:
|
|
3746
|
+
firstMonth: m,
|
|
3683
3747
|
numMonths: u,
|
|
3684
|
-
value:
|
|
3685
|
-
size:
|
|
3686
|
-
onValueChange: (
|
|
3687
|
-
var
|
|
3688
|
-
|
|
3748
|
+
value: S,
|
|
3749
|
+
size: h,
|
|
3750
|
+
onValueChange: (R) => {
|
|
3751
|
+
var Y;
|
|
3752
|
+
N(R), A("calendar"), (Y = k.current) == null || Y.focus();
|
|
3689
3753
|
},
|
|
3690
3754
|
onCancel: () => {
|
|
3691
|
-
var
|
|
3692
|
-
|
|
3755
|
+
var R;
|
|
3756
|
+
A("calendar"), (R = k.current) == null || R.focus();
|
|
3693
3757
|
}
|
|
3694
3758
|
}
|
|
3695
3759
|
)
|
|
3696
3760
|
] });
|
|
3697
3761
|
};
|
|
3698
3762
|
export {
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3763
|
+
ie as Calendar,
|
|
3764
|
+
Ue as CalendarDay,
|
|
3765
|
+
Xs as DateInput,
|
|
3766
|
+
qs as DateRangeCalendar,
|
|
3767
|
+
ni as DateRangeDualTextInput,
|
|
3768
|
+
Zs as DateRangeInput,
|
|
3769
|
+
Vs as DateTextInput,
|
|
3770
|
+
ei as DateTimeInput,
|
|
3771
|
+
Wr as Month,
|
|
3772
|
+
vt as MonthPicker,
|
|
3773
|
+
Gs as MultiDateCalendar,
|
|
3774
|
+
fn as PresetPicker,
|
|
3775
|
+
Ke as SingleDateCalendar,
|
|
3776
|
+
Qs as SingleWeekCalendar,
|
|
3777
|
+
ti as TimeTextInput,
|
|
3778
|
+
oi as TravelDateCalendar,
|
|
3779
|
+
ii as TravelDateInput,
|
|
3780
|
+
ci as TravelDateRangeCalendar,
|
|
3781
|
+
si as TravelDateRangeInput,
|
|
3782
|
+
$r as WeekDay,
|
|
3783
|
+
Gr as WeekDayCell,
|
|
3784
|
+
Xr as WeekNumberCell,
|
|
3785
|
+
ri as YearPicker,
|
|
3786
|
+
ft as addDayStateHighlights,
|
|
3787
|
+
Oe as addDayStateHighlightsOnSingleDay,
|
|
3788
|
+
vr as addWeekRangeHighlights,
|
|
3789
|
+
Cs as addWeekStateHighlights,
|
|
3790
|
+
Nt as buildDayStateForDateRange,
|
|
3791
|
+
Br as buildDayStateForRange,
|
|
3792
|
+
Yr as buildDayStateForSingleMonth,
|
|
3793
|
+
jr as calculateOverflowingMonth,
|
|
3794
|
+
Ur as createDay,
|
|
3795
|
+
bn as dateRangeToStrings,
|
|
3796
|
+
zr as dayHasHighlight,
|
|
3797
|
+
dt as dayHighlightSelect,
|
|
3734
3798
|
yt as defaultCalendarTheme,
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3799
|
+
Jr as defaultTextPropsProvider,
|
|
3800
|
+
qr as defaultWrapperStyleProvider,
|
|
3801
|
+
Ks as extranetCalendarTheme,
|
|
3802
|
+
It as formatLocalizedDate,
|
|
3739
3803
|
Tt as getDateFormatForLocaleCode,
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3804
|
+
Fr as getDaysForWeekForDate,
|
|
3805
|
+
Qe as getDefaultLocaleForFormatting,
|
|
3806
|
+
Qt as getLocaleForLocaleCode,
|
|
3807
|
+
Jt as getMonthInYear,
|
|
3808
|
+
Te as getMonthsInYear,
|
|
3809
|
+
be as getWeekForDate,
|
|
3810
|
+
Or as getWeeksForMonth,
|
|
3811
|
+
je as isDateRangeInvalid,
|
|
3748
3812
|
gt as parseLocalizedDateString,
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3813
|
+
ae as reformatLocalizedDateString,
|
|
3814
|
+
Fs as setDayStateValue,
|
|
3815
|
+
js as setDayStateValueFunction,
|
|
3816
|
+
wn as stringsToDateRange,
|
|
3817
|
+
zs as toggleDateStringsIfEndIsEarlierThanStart,
|
|
3818
|
+
Ce as toggleDatesIfEndIsEarlierThanStart,
|
|
3819
|
+
Js as useDateRangeCalendarState,
|
|
3820
|
+
Mn as useDateRangeSelection,
|
|
3821
|
+
Sn as useMultiDateSelection,
|
|
3822
|
+
kn as useSingleDateSelection,
|
|
3823
|
+
Tn as useSingleWeekSelection
|
|
3760
3824
|
};
|
|
3761
3825
|
//# sourceMappingURL=index.es.js.map
|