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