@stenajs-webui/calendar 23.4.0 → 23.5.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/multi-date-calendar/MultiDateCalendar.d.ts +1 -0
- package/dist/components/calendar-types/multi-date-calendar/UseMultiDateSelection.d.ts +1 -1
- package/dist/index.es.js +194 -191
- 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
|
@@ -377,7 +377,7 @@ const Wt = (e, t, n, r) => {
|
|
|
377
377
|
}
|
|
378
378
|
)
|
|
379
379
|
}
|
|
380
|
-
),
|
|
380
|
+
), g = st.td({
|
|
381
381
|
...i.CalendarDay.tdStyle && i.CalendarDay.tdStyle(
|
|
382
382
|
u,
|
|
383
383
|
s,
|
|
@@ -386,7 +386,7 @@ const Wt = (e, t, n, r) => {
|
|
|
386
386
|
r,
|
|
387
387
|
o
|
|
388
388
|
)
|
|
389
|
-
}),
|
|
389
|
+
}), f = st.div({
|
|
390
390
|
...i.CalendarDay.innerWrapperStyle && i.CalendarDay.innerWrapperStyle(
|
|
391
391
|
u,
|
|
392
392
|
s,
|
|
@@ -411,10 +411,10 @@ const Wt = (e, t, n, r) => {
|
|
|
411
411
|
position: "relative"
|
|
412
412
|
}), w = hr(u, s);
|
|
413
413
|
return /* @__PURE__ */ a(
|
|
414
|
-
|
|
414
|
+
g,
|
|
415
415
|
{
|
|
416
416
|
onClick: w ? void 0 : (y) => c?.(t, o, y),
|
|
417
|
-
children: /* @__PURE__ */ a(
|
|
417
|
+
children: /* @__PURE__ */ a(f, { children: /* @__PURE__ */ a(m, { children: (t.month === r.monthInYear || d) && /* @__PURE__ */ _(mt, { children: [
|
|
418
418
|
l && /* @__PURE__ */ a(
|
|
419
419
|
l,
|
|
420
420
|
{
|
|
@@ -509,8 +509,8 @@ function pr({
|
|
|
509
509
|
onClickMonth: u,
|
|
510
510
|
renderWeekNumber: d,
|
|
511
511
|
renderWeekDay: h,
|
|
512
|
-
headerRightContent:
|
|
513
|
-
theme:
|
|
512
|
+
headerRightContent: g,
|
|
513
|
+
theme: f = ve,
|
|
514
514
|
extraDayContent: m,
|
|
515
515
|
defaultHighlights: w,
|
|
516
516
|
showWeekNumber: y
|
|
@@ -519,7 +519,7 @@ function pr({
|
|
|
519
519
|
/* @__PURE__ */ _(
|
|
520
520
|
Y,
|
|
521
521
|
{
|
|
522
|
-
justifyContent:
|
|
522
|
+
justifyContent: g ? "space-between" : "center",
|
|
523
523
|
alignItems: "center",
|
|
524
524
|
children: [
|
|
525
525
|
/* @__PURE__ */ a(Y, { justifyContent: "center", alignItems: "center", children: u ? /* @__PURE__ */ a(
|
|
@@ -534,29 +534,29 @@ function pr({
|
|
|
534
534
|
" ",
|
|
535
535
|
e.year
|
|
536
536
|
] }) }),
|
|
537
|
-
|
|
537
|
+
g && /* @__PURE__ */ a(L, { alignItems: "center", children: g })
|
|
538
538
|
]
|
|
539
539
|
}
|
|
540
540
|
),
|
|
541
541
|
/* @__PURE__ */ a("table", { children: /* @__PURE__ */ _("tbody", { children: [
|
|
542
542
|
/* @__PURE__ */ _("tr", { children: [
|
|
543
|
-
y && /* @__PURE__ */ a("td", { children: /* @__PURE__ */ a(L, { width:
|
|
544
|
-
e.weeks[0].days.map((C) => /* @__PURE__ */ a("td", { children: h ? h(C.name,
|
|
543
|
+
y && /* @__PURE__ */ a("td", { children: /* @__PURE__ */ a(L, { width: f.width, height: f.height }) }),
|
|
544
|
+
e.weeks[0].days.map((C) => /* @__PURE__ */ a("td", { children: h ? h(C.name, f, l) : /* @__PURE__ */ a(
|
|
545
545
|
ur,
|
|
546
546
|
{
|
|
547
547
|
day: C,
|
|
548
548
|
onClickWeekDay: l,
|
|
549
|
-
theme:
|
|
549
|
+
theme: f
|
|
550
550
|
}
|
|
551
551
|
) }, C.name))
|
|
552
552
|
] }),
|
|
553
553
|
e.weeks.map((C) => /* @__PURE__ */ _("tr", { children: [
|
|
554
|
-
y && /* @__PURE__ */ a("td", { children: d ? d(C,
|
|
554
|
+
y && /* @__PURE__ */ a("td", { children: d ? d(C, f, i) : /* @__PURE__ */ a(
|
|
555
555
|
fr,
|
|
556
556
|
{
|
|
557
557
|
week: C,
|
|
558
558
|
onClickWeek: i,
|
|
559
|
-
theme:
|
|
559
|
+
theme: f
|
|
560
560
|
}
|
|
561
561
|
) }),
|
|
562
562
|
C.days.map((p) => /* @__PURE__ */ a(
|
|
@@ -569,7 +569,7 @@ function pr({
|
|
|
569
569
|
dayState: n && n[C.weekNumber] && n[C.weekNumber][p.dayOfMonth],
|
|
570
570
|
userData: r && r[C.weekNumber] && r[C.weekNumber][p.dayOfMonth],
|
|
571
571
|
onClickDay: c,
|
|
572
|
-
theme:
|
|
572
|
+
theme: f,
|
|
573
573
|
extraDayContent: m,
|
|
574
574
|
defaultHighlights: w,
|
|
575
575
|
minDate: s,
|
|
@@ -594,8 +594,8 @@ function Dr({
|
|
|
594
594
|
onClickMonth: u,
|
|
595
595
|
renderWeekDay: d,
|
|
596
596
|
renderWeekNumber: h,
|
|
597
|
-
headerRightContent:
|
|
598
|
-
extraDayContent:
|
|
597
|
+
headerRightContent: g,
|
|
598
|
+
extraDayContent: f,
|
|
599
599
|
defaultHighlights: m,
|
|
600
600
|
showWeekNumber: w,
|
|
601
601
|
theme: y = ve
|
|
@@ -628,8 +628,8 @@ function Dr({
|
|
|
628
628
|
theme: y,
|
|
629
629
|
renderWeekNumber: h,
|
|
630
630
|
renderWeekDay: d,
|
|
631
|
-
headerRightContent:
|
|
632
|
-
extraDayContent:
|
|
631
|
+
headerRightContent: g,
|
|
632
|
+
extraDayContent: f,
|
|
633
633
|
defaultHighlights: m,
|
|
634
634
|
minDate: C,
|
|
635
635
|
maxDate: p,
|
|
@@ -768,7 +768,7 @@ const br = (e, t, n) => {
|
|
|
768
768
|
), d = I(
|
|
769
769
|
() => W(e, "LLLL", { locale: l }),
|
|
770
770
|
[l, e]
|
|
771
|
-
), h = $(null),
|
|
771
|
+
), h = $(null), g = cn(c, o), f = n ? 0 : -1;
|
|
772
772
|
re(() => {
|
|
773
773
|
h.current?.focus();
|
|
774
774
|
}, []);
|
|
@@ -787,7 +787,7 @@ const br = (e, t, n) => {
|
|
|
787
787
|
return /* @__PURE__ */ a(Y, { justifyContent: "center", onKeyDown: m, children: n ? /* @__PURE__ */ a(
|
|
788
788
|
Re,
|
|
789
789
|
{
|
|
790
|
-
id:
|
|
790
|
+
id: g,
|
|
791
791
|
"aria-label": d,
|
|
792
792
|
label: u,
|
|
793
793
|
onClick: t,
|
|
@@ -795,17 +795,17 @@ const br = (e, t, n) => {
|
|
|
795
795
|
autoFocus: s,
|
|
796
796
|
ref: h,
|
|
797
797
|
size: i === "large" ? "large" : "medium",
|
|
798
|
-
tabIndex:
|
|
798
|
+
tabIndex: f
|
|
799
799
|
}
|
|
800
800
|
) : /* @__PURE__ */ a(
|
|
801
801
|
X,
|
|
802
802
|
{
|
|
803
|
-
id:
|
|
803
|
+
id: g,
|
|
804
804
|
label: u,
|
|
805
805
|
"aria-label": d,
|
|
806
806
|
onClick: t,
|
|
807
807
|
size: i === "large" ? "large" : "medium",
|
|
808
|
-
tabIndex:
|
|
808
|
+
tabIndex: f
|
|
809
809
|
}
|
|
810
810
|
) });
|
|
811
811
|
}, Mr = (e, t, n) => {
|
|
@@ -843,7 +843,7 @@ const br = (e, t, n) => {
|
|
|
843
843
|
onCancel: o,
|
|
844
844
|
size: c = "medium"
|
|
845
845
|
}) => {
|
|
846
|
-
const i = vt(), l = Te(), u = s > 0 ? s : 12, [d, h] = S(!1),
|
|
846
|
+
const i = vt(), l = Te(), u = s > 0 ? s : 12, [d, h] = S(!1), g = Mr(n, u, Tr(c)), f = I(() => He(n, u), [u, n]);
|
|
847
847
|
re(() => {
|
|
848
848
|
h(!0);
|
|
849
849
|
}, []);
|
|
@@ -853,18 +853,18 @@ const br = (e, t, n) => {
|
|
|
853
853
|
},
|
|
854
854
|
[o]
|
|
855
855
|
);
|
|
856
|
-
return /* @__PURE__ */ a(q, { gap: 1, maxWidth: Ir(c), onKeyDown: m, children:
|
|
857
|
-
const { rows: C } =
|
|
856
|
+
return /* @__PURE__ */ a(q, { gap: 1, maxWidth: Ir(c), onKeyDown: m, children: g.yearOrder.map((w, y) => {
|
|
857
|
+
const { rows: C } = g.years[w];
|
|
858
858
|
return /* @__PURE__ */ _(Ct.Fragment, { children: [
|
|
859
859
|
(y !== 0 || w !== l.getFullYear()) && /* @__PURE__ */ a(Ye, { variant: "h4", children: w }),
|
|
860
860
|
/* @__PURE__ */ a("table", { style: { borderSpacing: "0 8px" }, children: /* @__PURE__ */ a("tbody", { children: C.map((p) => {
|
|
861
|
-
const { columns: b } =
|
|
861
|
+
const { columns: b } = g.rows[p];
|
|
862
862
|
return /* @__PURE__ */ a("tr", { children: b.map(({ month: v, position: k }) => /* @__PURE__ */ a("td", { children: /* @__PURE__ */ a(
|
|
863
863
|
Sr,
|
|
864
864
|
{
|
|
865
865
|
month: v,
|
|
866
866
|
firstAvailableMonth: n,
|
|
867
|
-
lastAvailableMonth:
|
|
867
|
+
lastAvailableMonth: f,
|
|
868
868
|
localeCode: r,
|
|
869
869
|
selected: e ? he(e, v) : !1,
|
|
870
870
|
autoFocus: d,
|
|
@@ -980,12 +980,12 @@ const br = (e, t, n) => {
|
|
|
980
980
|
const d = I(
|
|
981
981
|
() => t == null ? "en-GB" : kr(t) ?? "en-GB",
|
|
982
982
|
[t]
|
|
983
|
-
), h = Te(),
|
|
983
|
+
), h = Te(), g = D(
|
|
984
984
|
(m) => {
|
|
985
985
|
r && r(m), o("calendar");
|
|
986
986
|
},
|
|
987
987
|
[r, o]
|
|
988
|
-
),
|
|
988
|
+
), f = D(() => {
|
|
989
989
|
o("month");
|
|
990
990
|
}, [o]);
|
|
991
991
|
switch (s) {
|
|
@@ -995,14 +995,14 @@ const br = (e, t, n) => {
|
|
|
995
995
|
{
|
|
996
996
|
...u,
|
|
997
997
|
date: n,
|
|
998
|
-
onClickMonth:
|
|
998
|
+
onClickMonth: f,
|
|
999
999
|
locale: t
|
|
1000
1000
|
}
|
|
1001
1001
|
);
|
|
1002
1002
|
case "month":
|
|
1003
1003
|
return c ? c({
|
|
1004
1004
|
value: n,
|
|
1005
|
-
onValueChange:
|
|
1005
|
+
onValueChange: g,
|
|
1006
1006
|
locale: t,
|
|
1007
1007
|
firstMonth: i ?? h,
|
|
1008
1008
|
numMonths: l ?? 24,
|
|
@@ -1011,7 +1011,7 @@ const br = (e, t, n) => {
|
|
|
1011
1011
|
We,
|
|
1012
1012
|
{
|
|
1013
1013
|
value: n,
|
|
1014
|
-
onValueChange:
|
|
1014
|
+
onValueChange: g,
|
|
1015
1015
|
localeCode: d,
|
|
1016
1016
|
firstMonth: i ?? h,
|
|
1017
1017
|
numMonths: l ?? 24
|
|
@@ -1080,7 +1080,7 @@ function ke({
|
|
|
1080
1080
|
numMonthsInMonthPicker: u,
|
|
1081
1081
|
...d
|
|
1082
1082
|
}) {
|
|
1083
|
-
const { nextMonth: h, prevMonth:
|
|
1083
|
+
const { nextMonth: h, prevMonth: g, nextYear: f, prevYear: m } = Er(
|
|
1084
1084
|
n,
|
|
1085
1085
|
r,
|
|
1086
1086
|
d.monthsPerRow,
|
|
@@ -1096,8 +1096,8 @@ function ke({
|
|
|
1096
1096
|
{
|
|
1097
1097
|
theme: t,
|
|
1098
1098
|
nextMonth: h,
|
|
1099
|
-
prevMonth:
|
|
1100
|
-
nextYear:
|
|
1099
|
+
prevMonth: g,
|
|
1100
|
+
nextYear: f,
|
|
1101
1101
|
prevYear: m,
|
|
1102
1102
|
children: /* @__PURE__ */ a(dt, { ...d, theme: t, date: n })
|
|
1103
1103
|
}
|
|
@@ -1120,7 +1120,7 @@ function ke({
|
|
|
1120
1120
|
/* @__PURE__ */ a(
|
|
1121
1121
|
de,
|
|
1122
1122
|
{
|
|
1123
|
-
onClick:
|
|
1123
|
+
onClick: g,
|
|
1124
1124
|
leftIcon: Je
|
|
1125
1125
|
}
|
|
1126
1126
|
),
|
|
@@ -1200,7 +1200,7 @@ const Nr = (e, t) => e || (t || 1) > 1 ? "below" : "header", Br = (e) => ({
|
|
|
1200
1200
|
n,
|
|
1201
1201
|
e,
|
|
1202
1202
|
r
|
|
1203
|
-
),
|
|
1203
|
+
), g = I(
|
|
1204
1204
|
() => Pe(
|
|
1205
1205
|
s,
|
|
1206
1206
|
t?.startDate,
|
|
@@ -1210,7 +1210,7 @@ const Nr = (e, t) => e || (t || 1) > 1 ? "below" : "header", Br = (e) => ({
|
|
|
1210
1210
|
);
|
|
1211
1211
|
return {
|
|
1212
1212
|
onClickDay: h,
|
|
1213
|
-
statePerMonth:
|
|
1213
|
+
statePerMonth: g,
|
|
1214
1214
|
currentPanel: i,
|
|
1215
1215
|
setCurrentPanel: l,
|
|
1216
1216
|
setDateInFocus: d,
|
|
@@ -1267,27 +1267,30 @@ const $r = ({
|
|
|
1267
1267
|
onChange: e,
|
|
1268
1268
|
value: t,
|
|
1269
1269
|
statePerMonth: n,
|
|
1270
|
-
onChangePanel: r
|
|
1270
|
+
onChangePanel: r,
|
|
1271
|
+
initialDateInFocus: s
|
|
1271
1272
|
}) => {
|
|
1272
|
-
const { currentPanel:
|
|
1273
|
-
(
|
|
1273
|
+
const { currentPanel: o, setCurrentPanel: c } = et(r), [i, l] = S(
|
|
1274
|
+
s ?? /* @__PURE__ */ new Date()
|
|
1275
|
+
), u = D(
|
|
1276
|
+
(h) => {
|
|
1274
1277
|
if (!e)
|
|
1275
1278
|
return;
|
|
1276
|
-
const
|
|
1277
|
-
e(t &&
|
|
1279
|
+
const g = t && t.find((f) => B(f, h.date));
|
|
1280
|
+
e(t && g ? t.filter((f) => !B(f, h.date)) : [...t || [], h.date]);
|
|
1278
1281
|
},
|
|
1279
1282
|
[e, t]
|
|
1280
|
-
),
|
|
1281
|
-
(
|
|
1283
|
+
), d = I(() => t ? t.reduce(
|
|
1284
|
+
(h, g) => ue(h, g, ["selected"]),
|
|
1282
1285
|
n
|
|
1283
1286
|
) : n, [n, t]);
|
|
1284
1287
|
return {
|
|
1285
|
-
onClickDay:
|
|
1286
|
-
statePerMonth:
|
|
1287
|
-
currentPanel:
|
|
1288
|
-
setCurrentPanel:
|
|
1289
|
-
dateInFocus:
|
|
1290
|
-
setDateInFocus:
|
|
1288
|
+
onClickDay: u,
|
|
1289
|
+
statePerMonth: d,
|
|
1290
|
+
currentPanel: o,
|
|
1291
|
+
setCurrentPanel: c,
|
|
1292
|
+
dateInFocus: i,
|
|
1293
|
+
setDateInFocus: l
|
|
1291
1294
|
};
|
|
1292
1295
|
};
|
|
1293
1296
|
function po(e) {
|
|
@@ -1302,28 +1305,28 @@ const Wr = ({
|
|
|
1302
1305
|
locale: s = qe
|
|
1303
1306
|
}) => {
|
|
1304
1307
|
const [o, c] = S(() => {
|
|
1305
|
-
const
|
|
1306
|
-
return
|
|
1308
|
+
const f = ot(t, s);
|
|
1309
|
+
return f ? f.days[0].date : /* @__PURE__ */ new Date();
|
|
1307
1310
|
}), { currentPanel: i, setCurrentPanel: l } = et(r), u = D(
|
|
1308
|
-
(
|
|
1309
|
-
e && e(Ut(St(
|
|
1311
|
+
(f) => {
|
|
1312
|
+
e && e(Ut(St(f.date, s)));
|
|
1310
1313
|
},
|
|
1311
1314
|
[s, e]
|
|
1312
1315
|
), d = D(
|
|
1313
|
-
(
|
|
1314
|
-
e && e(Ut(
|
|
1316
|
+
(f) => {
|
|
1317
|
+
e && e(Ut(f));
|
|
1315
1318
|
},
|
|
1316
1319
|
[e]
|
|
1317
1320
|
), h = I(() => {
|
|
1318
|
-
const
|
|
1319
|
-
return
|
|
1320
|
-
}, [t, s, n]),
|
|
1321
|
-
const
|
|
1322
|
-
return
|
|
1321
|
+
const f = ot(t, s);
|
|
1322
|
+
return f ? Qn(n, f) : n;
|
|
1323
|
+
}, [t, s, n]), g = I(() => {
|
|
1324
|
+
const f = ot(t, s);
|
|
1325
|
+
return f ? f.days[0].date : /* @__PURE__ */ new Date();
|
|
1323
1326
|
}, [s, t]);
|
|
1324
1327
|
return {
|
|
1325
1328
|
statePerMonth: h,
|
|
1326
|
-
date:
|
|
1329
|
+
date: g,
|
|
1327
1330
|
dateInFocus: o,
|
|
1328
1331
|
setDateInFocus: c,
|
|
1329
1332
|
onClickDay: u,
|
|
@@ -1374,8 +1377,8 @@ const Oe = "bottom", Or = (e, t, n) => {
|
|
|
1374
1377
|
width: u,
|
|
1375
1378
|
minDate: d,
|
|
1376
1379
|
maxDate: h = Ue,
|
|
1377
|
-
disabled:
|
|
1378
|
-
portalTarget:
|
|
1380
|
+
disabled: g,
|
|
1381
|
+
portalTarget: f,
|
|
1379
1382
|
zIndex: m
|
|
1380
1383
|
}) => {
|
|
1381
1384
|
const { hideCalendar: w, showingCalendar: y, onSelectDate: C, showCalendar: p } = Or(i, c, o);
|
|
@@ -1385,7 +1388,7 @@ const Oe = "bottom", Or = (e, t, n) => {
|
|
|
1385
1388
|
hideArrow: !0,
|
|
1386
1389
|
open: y,
|
|
1387
1390
|
onRequestClose: w,
|
|
1388
|
-
appendTo:
|
|
1391
|
+
appendTo: f,
|
|
1389
1392
|
zIndex: m,
|
|
1390
1393
|
renderTrigger: (b) => /* @__PURE__ */ a(L, { ...b, children: /* @__PURE__ */ a(
|
|
1391
1394
|
fe,
|
|
@@ -1396,7 +1399,7 @@ const Oe = "bottom", Or = (e, t, n) => {
|
|
|
1396
1399
|
value: n ? W(n, e) : "",
|
|
1397
1400
|
placeholder: t,
|
|
1398
1401
|
size: 9,
|
|
1399
|
-
disabled:
|
|
1402
|
+
disabled: g,
|
|
1400
1403
|
autoFocus: o,
|
|
1401
1404
|
variant: l,
|
|
1402
1405
|
min: d,
|
|
@@ -1421,17 +1424,17 @@ const Oe = "bottom", Or = (e, t, n) => {
|
|
|
1421
1424
|
const n = $(null), r = $(null), [s, o] = S(!1), [c, i] = S(void 0), l = D(() => (i("startDate"), o(!0), !0), [i, o]), u = D(() => (i("endDate"), o(!0), !0), [i, o]), d = D(() => {
|
|
1422
1425
|
o(!1);
|
|
1423
1426
|
}, [o]), h = D(
|
|
1424
|
-
(
|
|
1427
|
+
(f) => {
|
|
1425
1428
|
c === "startDate" ? (t?.({
|
|
1426
|
-
startDate:
|
|
1429
|
+
startDate: f.date,
|
|
1427
1430
|
endDate: e?.endDate
|
|
1428
1431
|
}), e?.endDate ? setTimeout(d, 150) : (i("endDate"), r.current?.focus())) : c === "endDate" && (t?.({
|
|
1429
1432
|
startDate: e?.startDate,
|
|
1430
|
-
endDate:
|
|
1433
|
+
endDate: f.date
|
|
1431
1434
|
}), e?.startDate ? setTimeout(d, 150) : (i("startDate"), n.current?.focus()));
|
|
1432
1435
|
},
|
|
1433
1436
|
[c, t, i, d, e]
|
|
1434
|
-
),
|
|
1437
|
+
), g = I(
|
|
1435
1438
|
() => e?.startDate && e?.endDate && Q(e.startDate, e.endDate),
|
|
1436
1439
|
[e?.startDate, e?.endDate]
|
|
1437
1440
|
);
|
|
@@ -1445,7 +1448,7 @@ const Oe = "bottom", Or = (e, t, n) => {
|
|
|
1445
1448
|
startDateInputRef: n,
|
|
1446
1449
|
endDateInputRef: r,
|
|
1447
1450
|
onClickDay: h,
|
|
1448
|
-
startDateIsAfterEnd:
|
|
1451
|
+
startDateIsAfterEnd: g
|
|
1449
1452
|
};
|
|
1450
1453
|
};
|
|
1451
1454
|
function wo({
|
|
@@ -1461,9 +1464,9 @@ function wo({
|
|
|
1461
1464
|
maxDate: u = Ue,
|
|
1462
1465
|
disabled: d,
|
|
1463
1466
|
portalTarget: h,
|
|
1464
|
-
zIndex:
|
|
1467
|
+
zIndex: g
|
|
1465
1468
|
}) {
|
|
1466
|
-
const [
|
|
1469
|
+
const [f, m] = S("calendar"), {
|
|
1467
1470
|
hideCalendar: w,
|
|
1468
1471
|
showCalendarEndDate: y,
|
|
1469
1472
|
showCalendarStartDate: C,
|
|
@@ -1484,7 +1487,7 @@ function wo({
|
|
|
1484
1487
|
{
|
|
1485
1488
|
hideArrow: !0,
|
|
1486
1489
|
appendTo: h,
|
|
1487
|
-
zIndex:
|
|
1490
|
+
zIndex: g,
|
|
1488
1491
|
renderTrigger: (M) => /* @__PURE__ */ _(Y, { alignItems: "center", ...M, children: [
|
|
1489
1492
|
/* @__PURE__ */ a(
|
|
1490
1493
|
fe,
|
|
@@ -1537,7 +1540,7 @@ function wo({
|
|
|
1537
1540
|
statePerMonth: A,
|
|
1538
1541
|
theme: c,
|
|
1539
1542
|
onClickDay: E,
|
|
1540
|
-
currentPanel:
|
|
1543
|
+
currentPanel: f,
|
|
1541
1544
|
setCurrentPanel: m,
|
|
1542
1545
|
minDate: l,
|
|
1543
1546
|
maxDate: u
|
|
@@ -1559,8 +1562,8 @@ const yo = ({
|
|
|
1559
1562
|
hideCalenderIcon: u = !1,
|
|
1560
1563
|
minDate: d,
|
|
1561
1564
|
maxDate: h = Ue,
|
|
1562
|
-
variant:
|
|
1563
|
-
portalTarget:
|
|
1565
|
+
variant: g,
|
|
1566
|
+
portalTarget: f,
|
|
1564
1567
|
zIndex: m,
|
|
1565
1568
|
...w
|
|
1566
1569
|
}) => {
|
|
@@ -1588,13 +1591,13 @@ const yo = ({
|
|
|
1588
1591
|
return /* @__PURE__ */ a(L, { width: i, children: /* @__PURE__ */ a(
|
|
1589
1592
|
$e,
|
|
1590
1593
|
{
|
|
1591
|
-
appendTo:
|
|
1594
|
+
appendTo: f,
|
|
1592
1595
|
zIndex: m,
|
|
1593
1596
|
renderTrigger: ({ ref: A, ...M }) => /* @__PURE__ */ a(
|
|
1594
1597
|
fe,
|
|
1595
1598
|
{
|
|
1596
1599
|
...w,
|
|
1597
|
-
variant: R ? "error" :
|
|
1600
|
+
variant: R ? "error" : g,
|
|
1598
1601
|
disableContentPaddingRight: !0,
|
|
1599
1602
|
contentRight: u ? void 0 : /* @__PURE__ */ a(Y, { alignItems: "center", indent: 0.5, children: /* @__PURE__ */ a(
|
|
1600
1603
|
X,
|
|
@@ -1710,13 +1713,13 @@ const yo = ({
|
|
|
1710
1713
|
}) => {
|
|
1711
1714
|
const [i, l] = S(() => ut(r)), u = "hh:mm", d = D(() => {
|
|
1712
1715
|
if (r) {
|
|
1713
|
-
const
|
|
1714
|
-
l(
|
|
1716
|
+
const g = Vr(r);
|
|
1717
|
+
l(g.success), g.success && e && e(g.time);
|
|
1715
1718
|
}
|
|
1716
1719
|
}, [r, e, l]), h = D(
|
|
1717
|
-
(
|
|
1718
|
-
const
|
|
1719
|
-
l(m &&
|
|
1720
|
+
(g) => {
|
|
1721
|
+
const f = g.target.value, m = ut(f);
|
|
1722
|
+
l(m && f.length <= u.length), e && e(f);
|
|
1720
1723
|
},
|
|
1721
1724
|
[e, l]
|
|
1722
1725
|
);
|
|
@@ -1747,8 +1750,8 @@ const yo = ({
|
|
|
1747
1750
|
typeLeft: u,
|
|
1748
1751
|
typeRight: d,
|
|
1749
1752
|
onChangeLeft: h,
|
|
1750
|
-
onChangeRight:
|
|
1751
|
-
valueLeft:
|
|
1753
|
+
onChangeRight: g,
|
|
1754
|
+
valueLeft: f,
|
|
1752
1755
|
valueRight: m,
|
|
1753
1756
|
minLeft: w,
|
|
1754
1757
|
maxLeft: y,
|
|
@@ -1838,7 +1841,7 @@ const yo = ({
|
|
|
1838
1841
|
disabled: V,
|
|
1839
1842
|
hideBorder: !0,
|
|
1840
1843
|
placeholder: i,
|
|
1841
|
-
value:
|
|
1844
|
+
value: f,
|
|
1842
1845
|
onValueChange: s,
|
|
1843
1846
|
onChange: h,
|
|
1844
1847
|
onBlur: ie,
|
|
@@ -1870,7 +1873,7 @@ const yo = ({
|
|
|
1870
1873
|
placeholder: l,
|
|
1871
1874
|
value: m,
|
|
1872
1875
|
onValueChange: o,
|
|
1873
|
-
onChange:
|
|
1876
|
+
onChange: g,
|
|
1874
1877
|
onBlur: se,
|
|
1875
1878
|
onFocus: te,
|
|
1876
1879
|
inputRef: F,
|
|
@@ -2058,7 +2061,7 @@ const yo = ({
|
|
|
2058
2061
|
localDate: u,
|
|
2059
2062
|
setLocalDate: d
|
|
2060
2063
|
}, h) => {
|
|
2061
|
-
const
|
|
2064
|
+
const g = D(
|
|
2062
2065
|
(p) => {
|
|
2063
2066
|
if (!p)
|
|
2064
2067
|
return;
|
|
@@ -2086,7 +2089,7 @@ const yo = ({
|
|
|
2086
2089
|
n,
|
|
2087
2090
|
d
|
|
2088
2091
|
]
|
|
2089
|
-
),
|
|
2092
|
+
), f = D(
|
|
2090
2093
|
(p) => {
|
|
2091
2094
|
if (p)
|
|
2092
2095
|
if (e) {
|
|
@@ -2101,12 +2104,12 @@ const yo = ({
|
|
|
2101
2104
|
[t, e, u, l]
|
|
2102
2105
|
), m = D(
|
|
2103
2106
|
(p) => {
|
|
2104
|
-
p.target.value[0] !== "0" &&
|
|
2107
|
+
p.target.value[0] !== "0" && g(p.target.valueAsDate);
|
|
2105
2108
|
},
|
|
2106
|
-
[f]
|
|
2107
|
-
), w = D(
|
|
2108
|
-
(p) => g(p.target.value),
|
|
2109
2109
|
[g]
|
|
2110
|
+
), w = D(
|
|
2111
|
+
(p) => f(p.target.value),
|
|
2112
|
+
[f]
|
|
2110
2113
|
), y = D(() => {
|
|
2111
2114
|
n(e || /* @__PURE__ */ new Date()), c("calendar"), r();
|
|
2112
2115
|
}, [e, c, r, n]), C = D(() => {
|
|
@@ -2117,11 +2120,11 @@ const yo = ({
|
|
|
2117
2120
|
inputRightChangeHandler: w,
|
|
2118
2121
|
hideCalendar: C,
|
|
2119
2122
|
showCalendar: y,
|
|
2120
|
-
onChangeTime:
|
|
2121
|
-
onChangeDate:
|
|
2123
|
+
onChangeTime: f,
|
|
2124
|
+
onChangeDate: g
|
|
2122
2125
|
};
|
|
2123
2126
|
}, ns = (e) => {
|
|
2124
|
-
const [t, n] = S(void 0), [r, s] = S(void 0), [o, c, i] = lt(!1), [l, u, d] = lt(!1), [h,
|
|
2127
|
+
const [t, n] = S(void 0), [r, s] = S(void 0), [o, c, i] = lt(!1), [l, u, d] = lt(!1), [h, g] = S(void 0), [f, m] = S(
|
|
2125
2128
|
() => e ?? /* @__PURE__ */ new Date()
|
|
2126
2129
|
), [w, y] = S("calendar");
|
|
2127
2130
|
return {
|
|
@@ -2129,8 +2132,8 @@ const yo = ({
|
|
|
2129
2132
|
showCalendarInternal: c,
|
|
2130
2133
|
hideCalendarInternal: i,
|
|
2131
2134
|
firstFocusedInput: h,
|
|
2132
|
-
setFirstFocusedInput:
|
|
2133
|
-
dateInFocus:
|
|
2135
|
+
setFirstFocusedInput: g,
|
|
2136
|
+
dateInFocus: f,
|
|
2134
2137
|
setDateInFocus: m,
|
|
2135
2138
|
currentPanel: w,
|
|
2136
2139
|
setCurrentPanel: y,
|
|
@@ -2159,7 +2162,7 @@ const yo = ({
|
|
|
2159
2162
|
[e, r, c]
|
|
2160
2163
|
), h = D(() => {
|
|
2161
2164
|
o("presets"), n();
|
|
2162
|
-
}, [o, n]),
|
|
2165
|
+
}, [o, n]), g = D(() => {
|
|
2163
2166
|
s ? r() : (t.current?.focus(), o("calendar"), n());
|
|
2164
2167
|
}, [
|
|
2165
2168
|
s,
|
|
@@ -2167,7 +2170,7 @@ const yo = ({
|
|
|
2167
2170
|
t,
|
|
2168
2171
|
o,
|
|
2169
2172
|
n
|
|
2170
|
-
]),
|
|
2173
|
+
]), f = D(
|
|
2171
2174
|
(m) => {
|
|
2172
2175
|
m.key === "Escape" && r();
|
|
2173
2176
|
},
|
|
@@ -2178,8 +2181,8 @@ const yo = ({
|
|
|
2178
2181
|
onFocusRight: u,
|
|
2179
2182
|
onClickDay: d,
|
|
2180
2183
|
onClickArrowButton: h,
|
|
2181
|
-
onClickCalendarButton:
|
|
2182
|
-
onKeyDownHandler:
|
|
2184
|
+
onClickCalendarButton: g,
|
|
2185
|
+
onKeyDownHandler: f
|
|
2183
2186
|
};
|
|
2184
2187
|
}, vo = ({
|
|
2185
2188
|
value: e,
|
|
@@ -2194,8 +2197,8 @@ const yo = ({
|
|
|
2194
2197
|
maxDate: u = Ue,
|
|
2195
2198
|
variant: d,
|
|
2196
2199
|
disabled: h,
|
|
2197
|
-
zIndex:
|
|
2198
|
-
appendTo:
|
|
2200
|
+
zIndex: g,
|
|
2201
|
+
appendTo: f
|
|
2199
2202
|
}) => {
|
|
2200
2203
|
const m = $(null), w = $(null), y = ns(e), {
|
|
2201
2204
|
setCurrentPanel: C,
|
|
@@ -2245,8 +2248,8 @@ const yo = ({
|
|
|
2245
2248
|
$e,
|
|
2246
2249
|
{
|
|
2247
2250
|
hideArrow: !0,
|
|
2248
|
-
zIndex:
|
|
2249
|
-
appendTo:
|
|
2251
|
+
zIndex: g,
|
|
2252
|
+
appendTo: f,
|
|
2250
2253
|
renderTrigger: (U) => /* @__PURE__ */ a(L, { ...U, children: /* @__PURE__ */ a(
|
|
2251
2254
|
gn,
|
|
2252
2255
|
{
|
|
@@ -2404,24 +2407,24 @@ const yo = ({
|
|
|
2404
2407
|
setCurrentPanel: i
|
|
2405
2408
|
}) => {
|
|
2406
2409
|
const l = D(
|
|
2407
|
-
(
|
|
2408
|
-
|
|
2409
|
-
startDate:
|
|
2410
|
+
(g) => {
|
|
2411
|
+
g.target.value[0] !== "0" && n?.({
|
|
2412
|
+
startDate: g.target.valueAsDate ?? void 0,
|
|
2410
2413
|
endDate: t
|
|
2411
2414
|
});
|
|
2412
2415
|
},
|
|
2413
2416
|
[n, t]
|
|
2414
2417
|
), u = D(
|
|
2415
|
-
(
|
|
2416
|
-
|
|
2418
|
+
(g) => {
|
|
2419
|
+
g.target.value[0] !== "0" && n?.({
|
|
2417
2420
|
startDate: e,
|
|
2418
|
-
endDate:
|
|
2421
|
+
endDate: g.target.valueAsDate ?? void 0
|
|
2419
2422
|
});
|
|
2420
2423
|
},
|
|
2421
2424
|
[n, e]
|
|
2422
2425
|
), d = D(
|
|
2423
|
-
(
|
|
2424
|
-
|
|
2426
|
+
(g) => {
|
|
2427
|
+
g != null ? r(g) : r(e || t || /* @__PURE__ */ new Date()), i("calendar"), s();
|
|
2425
2428
|
},
|
|
2426
2429
|
[e, t, i, s, r]
|
|
2427
2430
|
), h = D(() => {
|
|
@@ -2436,7 +2439,7 @@ const yo = ({
|
|
|
2436
2439
|
showCalendar: d
|
|
2437
2440
|
};
|
|
2438
2441
|
}, cs = (e, t) => {
|
|
2439
|
-
const [n, r, s] = lt(!1), [o, c] = S(void 0), [i, l] = S("startDate"), [u, d] = S(() => (i === "startDate" ? e : i === "endDate" ? t : void 0) ?? /* @__PURE__ */ new Date()), [h,
|
|
2442
|
+
const [n, r, s] = lt(!1), [o, c] = S(void 0), [i, l] = S("startDate"), [u, d] = S(() => (i === "startDate" ? e : i === "endDate" ? t : void 0) ?? /* @__PURE__ */ new Date()), [h, g] = S("calendar");
|
|
2440
2443
|
return {
|
|
2441
2444
|
isCalendarVisible: n,
|
|
2442
2445
|
showCalendarInternal: r,
|
|
@@ -2448,7 +2451,7 @@ const yo = ({
|
|
|
2448
2451
|
dateInFocus: u,
|
|
2449
2452
|
setDateInFocus: d,
|
|
2450
2453
|
currentPanel: h,
|
|
2451
|
-
setCurrentPanel:
|
|
2454
|
+
setCurrentPanel: g
|
|
2452
2455
|
};
|
|
2453
2456
|
}, ls = (e, t, n, r, s, o, c, {
|
|
2454
2457
|
firstFocusedInput: i,
|
|
@@ -2456,11 +2459,11 @@ const yo = ({
|
|
|
2456
2459
|
isCalendarVisible: u,
|
|
2457
2460
|
setFocusedInput: d,
|
|
2458
2461
|
focusedInput: h,
|
|
2459
|
-
setCurrentPanel:
|
|
2460
|
-
setDateInFocus:
|
|
2462
|
+
setCurrentPanel: g,
|
|
2463
|
+
setDateInFocus: f
|
|
2461
2464
|
}) => {
|
|
2462
2465
|
const m = D(() => {
|
|
2463
|
-
i == null && l("startDate"), d("startDate"), u ? e != null &&
|
|
2466
|
+
i == null && l("startDate"), d("startDate"), u ? e != null && f(e) : o(e);
|
|
2464
2467
|
}, [
|
|
2465
2468
|
i,
|
|
2466
2469
|
d,
|
|
@@ -2468,9 +2471,9 @@ const yo = ({
|
|
|
2468
2471
|
e,
|
|
2469
2472
|
l,
|
|
2470
2473
|
o,
|
|
2471
|
-
|
|
2474
|
+
f
|
|
2472
2475
|
]), w = D(() => {
|
|
2473
|
-
i == null && l("endDate"), d("endDate"), u ? t != null &&
|
|
2476
|
+
i == null && l("endDate"), d("endDate"), u ? t != null && f(t) : o(t);
|
|
2474
2477
|
}, [
|
|
2475
2478
|
i,
|
|
2476
2479
|
d,
|
|
@@ -2478,7 +2481,7 @@ const yo = ({
|
|
|
2478
2481
|
t,
|
|
2479
2482
|
l,
|
|
2480
2483
|
o,
|
|
2481
|
-
|
|
2484
|
+
f
|
|
2482
2485
|
]), y = D(
|
|
2483
2486
|
(v) => {
|
|
2484
2487
|
h === "startDate" ? t != null && Q(v.date, t) ? (n?.({
|
|
@@ -2510,16 +2513,16 @@ const yo = ({
|
|
|
2510
2513
|
r
|
|
2511
2514
|
]
|
|
2512
2515
|
), C = D(() => {
|
|
2513
|
-
|
|
2514
|
-
}, [
|
|
2515
|
-
u ? c() : (d("startDate"), l("startDate"), r.current?.focus(),
|
|
2516
|
+
g("presets"), o();
|
|
2517
|
+
}, [g, o]), p = D(() => {
|
|
2518
|
+
u ? c() : (d("startDate"), l("startDate"), r.current?.focus(), g("calendar"), o());
|
|
2516
2519
|
}, [
|
|
2517
2520
|
u,
|
|
2518
2521
|
c,
|
|
2519
2522
|
d,
|
|
2520
2523
|
l,
|
|
2521
2524
|
r,
|
|
2522
|
-
|
|
2525
|
+
g,
|
|
2523
2526
|
o
|
|
2524
2527
|
]), b = D(
|
|
2525
2528
|
(v) => {
|
|
@@ -2549,8 +2552,8 @@ function So({
|
|
|
2549
2552
|
widthLeft: u = 128,
|
|
2550
2553
|
widthRight: d = 128,
|
|
2551
2554
|
firstMonthInMonthPicker: h,
|
|
2552
|
-
numMonthsInMonthPicker:
|
|
2553
|
-
variant:
|
|
2555
|
+
numMonthsInMonthPicker: g,
|
|
2556
|
+
variant: f,
|
|
2554
2557
|
disabled: m,
|
|
2555
2558
|
zIndex: w,
|
|
2556
2559
|
appendTo: y,
|
|
@@ -2634,7 +2637,7 @@ function So({
|
|
|
2634
2637
|
onClickRight: ee,
|
|
2635
2638
|
inputRefLeft: v,
|
|
2636
2639
|
inputRefRight: k,
|
|
2637
|
-
variant: H ? "error" :
|
|
2640
|
+
variant: H ? "error" : f,
|
|
2638
2641
|
widthLeft: u,
|
|
2639
2642
|
widthRight: d,
|
|
2640
2643
|
minLeft: c,
|
|
@@ -2653,7 +2656,7 @@ function So({
|
|
|
2653
2656
|
onClickDay: oe,
|
|
2654
2657
|
dateInFocus: T,
|
|
2655
2658
|
firstMonthInMonthPicker: h,
|
|
2656
|
-
numMonthsInMonthPicker:
|
|
2659
|
+
numMonthsInMonthPicker: g,
|
|
2657
2660
|
setDateInFocus: x,
|
|
2658
2661
|
currentPanel: A,
|
|
2659
2662
|
setCurrentPanel: M,
|
|
@@ -2681,8 +2684,8 @@ const ht = ({
|
|
|
2681
2684
|
calendarSize: u,
|
|
2682
2685
|
onFocus: d,
|
|
2683
2686
|
onBlur: h,
|
|
2684
|
-
placeholderWhenBlurred:
|
|
2685
|
-
placeholder:
|
|
2687
|
+
placeholderWhenBlurred: g,
|
|
2688
|
+
placeholder: f,
|
|
2686
2689
|
valueWhenBlurred: m,
|
|
2687
2690
|
label: w,
|
|
2688
2691
|
variant: y,
|
|
@@ -2710,7 +2713,7 @@ const ht = ({
|
|
|
2710
2713
|
h?.(R), v(!1);
|
|
2711
2714
|
},
|
|
2712
2715
|
[h]
|
|
2713
|
-
), x = b ?
|
|
2716
|
+
), x = b ? f : g ?? f;
|
|
2714
2717
|
return y === "standard" ? /* @__PURE__ */ a(xn, { text: w ?? "", children: /* @__PURE__ */ a(
|
|
2715
2718
|
fe,
|
|
2716
2719
|
{
|
|
@@ -2826,7 +2829,7 @@ const ht = ({
|
|
|
2826
2829
|
valueWhenBlurredEndDate: d,
|
|
2827
2830
|
variant: h
|
|
2828
2831
|
}) => {
|
|
2829
|
-
const { mask:
|
|
2832
|
+
const { mask: g, placeholder: f } = I(() => {
|
|
2830
2833
|
const m = xe(n);
|
|
2831
2834
|
return {
|
|
2832
2835
|
mask: pn(m),
|
|
@@ -2837,7 +2840,7 @@ const ht = ({
|
|
|
2837
2840
|
/* @__PURE__ */ a(
|
|
2838
2841
|
ht,
|
|
2839
2842
|
{
|
|
2840
|
-
mask:
|
|
2843
|
+
mask: g,
|
|
2841
2844
|
value: e?.startDate,
|
|
2842
2845
|
onValueChange: (m) => {
|
|
2843
2846
|
t?.({ startDate: m });
|
|
@@ -2852,7 +2855,7 @@ const ht = ({
|
|
|
2852
2855
|
onFocus: o,
|
|
2853
2856
|
label: r,
|
|
2854
2857
|
borderRadiusVariant: "onlyLeft",
|
|
2855
|
-
placeholder:
|
|
2858
|
+
placeholder: f,
|
|
2856
2859
|
placeholderWhenBlurred: i,
|
|
2857
2860
|
valueWhenBlurred: u,
|
|
2858
2861
|
calendarSize: c,
|
|
@@ -2862,7 +2865,7 @@ const ht = ({
|
|
|
2862
2865
|
/* @__PURE__ */ a(
|
|
2863
2866
|
ht,
|
|
2864
2867
|
{
|
|
2865
|
-
mask:
|
|
2868
|
+
mask: g,
|
|
2866
2869
|
value: e?.endDate,
|
|
2867
2870
|
onValueChange: (m) => t?.({ endDate: m }),
|
|
2868
2871
|
onBlur: (m) => {
|
|
@@ -2875,7 +2878,7 @@ const ht = ({
|
|
|
2875
2878
|
onFocus: o,
|
|
2876
2879
|
label: s,
|
|
2877
2880
|
borderRadiusVariant: "onlyRight",
|
|
2878
|
-
placeholder:
|
|
2881
|
+
placeholder: f,
|
|
2879
2882
|
placeholderWhenBlurred: l,
|
|
2880
2883
|
valueWhenBlurred: d,
|
|
2881
2884
|
calendarSize: c,
|
|
@@ -2896,10 +2899,10 @@ const ht = ({
|
|
|
2896
2899
|
), h = I(
|
|
2897
2900
|
() => e?.endDate?.length === u.length ? De(e.endDate, n) : void 0,
|
|
2898
2901
|
[u.length, n, e?.endDate]
|
|
2899
|
-
),
|
|
2902
|
+
), g = I(
|
|
2900
2903
|
() => d != null ? gt(d, i, o) : void 0,
|
|
2901
2904
|
[o, d, i]
|
|
2902
|
-
),
|
|
2905
|
+
), f = I(
|
|
2903
2906
|
() => h != null ? gt(h, i, o) : void 0,
|
|
2904
2907
|
[o, h, i]
|
|
2905
2908
|
), [m, w] = S(
|
|
@@ -2970,8 +2973,8 @@ const ht = ({
|
|
|
2970
2973
|
selectedEndDate: h,
|
|
2971
2974
|
today: i,
|
|
2972
2975
|
visibleMonth: m,
|
|
2973
|
-
valueWhenBlurredStartDate:
|
|
2974
|
-
valueWhenBlurredEndDate:
|
|
2976
|
+
valueWhenBlurredStartDate: g,
|
|
2977
|
+
valueWhenBlurredEndDate: f
|
|
2975
2978
|
};
|
|
2976
2979
|
}, tt = ({
|
|
2977
2980
|
previousMonthButtonAriaLabel: e,
|
|
@@ -2986,9 +2989,9 @@ const ht = ({
|
|
|
2986
2989
|
nextMonthDisabled: u,
|
|
2987
2990
|
calendarSize: d,
|
|
2988
2991
|
previousMonthButtonTestId: h,
|
|
2989
|
-
nextMonthButtonTestId:
|
|
2992
|
+
nextMonthButtonTestId: g
|
|
2990
2993
|
}) => {
|
|
2991
|
-
const
|
|
2994
|
+
const f = d === "smaller" || d === "small" ? "medium" : "large";
|
|
2992
2995
|
return /* @__PURE__ */ _(Y, { alignSelf: "center", justifyContent: "space-between", width: "100%", children: [
|
|
2993
2996
|
/* @__PURE__ */ a(
|
|
2994
2997
|
X,
|
|
@@ -3000,7 +3003,7 @@ const ht = ({
|
|
|
3000
3003
|
r === "calendar" ? "month-picker" : "calendar"
|
|
3001
3004
|
),
|
|
3002
3005
|
ref: o,
|
|
3003
|
-
size:
|
|
3006
|
+
size: f
|
|
3004
3007
|
}
|
|
3005
3008
|
),
|
|
3006
3009
|
/* @__PURE__ */ _(Y, { alignItems: "center", gap: 2, children: [
|
|
@@ -3011,7 +3014,7 @@ const ht = ({
|
|
|
3011
3014
|
onClick: () => c(wt(i, 1)),
|
|
3012
3015
|
disabled: l?.(i),
|
|
3013
3016
|
"aria-label": e,
|
|
3014
|
-
size:
|
|
3017
|
+
size: f,
|
|
3015
3018
|
"data-testid": h
|
|
3016
3019
|
}
|
|
3017
3020
|
),
|
|
@@ -3022,8 +3025,8 @@ const ht = ({
|
|
|
3022
3025
|
onClick: () => c(He(i, 1)),
|
|
3023
3026
|
disabled: u?.(i),
|
|
3024
3027
|
"aria-label": t,
|
|
3025
|
-
size:
|
|
3026
|
-
"data-testid":
|
|
3028
|
+
size: f,
|
|
3029
|
+
"data-testid": g
|
|
3027
3030
|
}
|
|
3028
3031
|
)
|
|
3029
3032
|
] })
|
|
@@ -3150,27 +3153,27 @@ const ht = ({
|
|
|
3150
3153
|
hoverDate: u,
|
|
3151
3154
|
today: d,
|
|
3152
3155
|
todayIsInVisibleMonth: h,
|
|
3153
|
-
calendarId:
|
|
3154
|
-
isDateDisabled:
|
|
3156
|
+
calendarId: g,
|
|
3157
|
+
isDateDisabled: f,
|
|
3155
3158
|
size: m,
|
|
3156
3159
|
dateTestId: w
|
|
3157
3160
|
}) => {
|
|
3158
3161
|
const y = D(
|
|
3159
3162
|
async (T) => {
|
|
3160
|
-
const x = _s(r.date, T.key), R = (x &&
|
|
3161
|
-
x && !R && (i(x), he(r.date, x) ? document.getElementById(at(x,
|
|
3162
|
-
document.getElementById(at(x,
|
|
3163
|
+
const x = _s(r.date, T.key), R = (x && f?.(x)) ?? !1;
|
|
3164
|
+
x && !R && (i(x), he(r.date, x) ? document.getElementById(at(x, g))?.focus() : (n(x), setTimeout(() => {
|
|
3165
|
+
document.getElementById(at(x, g))?.focus();
|
|
3163
3166
|
}, 10))), (T.key === "Enter" || T.code === "Space") && e(r.date);
|
|
3164
3167
|
},
|
|
3165
3168
|
[
|
|
3166
|
-
f,
|
|
3167
|
-
r.date,
|
|
3168
3169
|
g,
|
|
3170
|
+
r.date,
|
|
3171
|
+
f,
|
|
3169
3172
|
n,
|
|
3170
3173
|
e,
|
|
3171
3174
|
i
|
|
3172
3175
|
]
|
|
3173
|
-
), C = r.month === t.getMonth(), p =
|
|
3176
|
+
), C = r.month === t.getMonth(), p = f?.(r.date) ?? !1, b = o ? B(o, r.date) : !1, v = c ? B(c, r.date) : !1, k = B(r.date, d), E = xs(
|
|
3174
3177
|
r.date,
|
|
3175
3178
|
o,
|
|
3176
3179
|
c,
|
|
@@ -3192,7 +3195,7 @@ const ht = ({
|
|
|
3192
3195
|
t,
|
|
3193
3196
|
h
|
|
3194
3197
|
),
|
|
3195
|
-
id: p ? void 0 : at(r.date,
|
|
3198
|
+
id: p ? void 0 : at(r.date, g),
|
|
3196
3199
|
onKeyDown: p ? void 0 : y,
|
|
3197
3200
|
...p ? void 0 : { "aria-selected": b || v },
|
|
3198
3201
|
"data-testid": w?.(r.date),
|
|
@@ -3250,8 +3253,8 @@ const ht = ({
|
|
|
3250
3253
|
today: u,
|
|
3251
3254
|
calendarId: d,
|
|
3252
3255
|
isDateDisabled: h,
|
|
3253
|
-
todayIsInVisibleMonth:
|
|
3254
|
-
size:
|
|
3256
|
+
todayIsInVisibleMonth: g,
|
|
3257
|
+
size: f = "medium",
|
|
3255
3258
|
multiSelectable: m,
|
|
3256
3259
|
dateTestId: w
|
|
3257
3260
|
}) => /* @__PURE__ */ a(
|
|
@@ -3265,7 +3268,7 @@ const ht = ({
|
|
|
3265
3268
|
e.weeks.map((y) => /* @__PURE__ */ a(Ct.Fragment, { children: /* @__PURE__ */ a("tr", { children: y.days.map((C) => /* @__PURE__ */ a(
|
|
3266
3269
|
Ys,
|
|
3267
3270
|
{
|
|
3268
|
-
size:
|
|
3271
|
+
size: f,
|
|
3269
3272
|
onClick: (p) => t(p),
|
|
3270
3273
|
visibleMonth: s,
|
|
3271
3274
|
onChangeVisibleMonth: r,
|
|
@@ -3277,7 +3280,7 @@ const ht = ({
|
|
|
3277
3280
|
selectedEndDate: i,
|
|
3278
3281
|
hoverDate: l,
|
|
3279
3282
|
today: u,
|
|
3280
|
-
todayIsInVisibleMonth:
|
|
3283
|
+
todayIsInVisibleMonth: g,
|
|
3281
3284
|
calendarId: d,
|
|
3282
3285
|
isDateDisabled: h,
|
|
3283
3286
|
dateTestId: w
|
|
@@ -3303,8 +3306,8 @@ const ht = ({
|
|
|
3303
3306
|
placeholderWhenBlurredStartDate: u,
|
|
3304
3307
|
placeholderWhenBlurredEndDate: d,
|
|
3305
3308
|
heading: h,
|
|
3306
|
-
headingLevel:
|
|
3307
|
-
numMonthsInMonthPicker:
|
|
3309
|
+
headingLevel: g,
|
|
3310
|
+
numMonthsInMonthPicker: f = 12,
|
|
3308
3311
|
isDateDisabled: m,
|
|
3309
3312
|
prevMonthDisabled: w,
|
|
3310
3313
|
nextMonthDisabled: y,
|
|
@@ -3404,7 +3407,7 @@ const ht = ({
|
|
|
3404
3407
|
shadow: "popover",
|
|
3405
3408
|
borderRadius: "var(--swui-border-radius-large)",
|
|
3406
3409
|
children: /* @__PURE__ */ _(Jt, { gap: 3, children: [
|
|
3407
|
-
h && /* @__PURE__ */ a(Ye, { variant: "h2", as:
|
|
3410
|
+
h && /* @__PURE__ */ a(Ye, { variant: "h2", as: g, children: h }),
|
|
3408
3411
|
/* @__PURE__ */ a(L, { height: ee }),
|
|
3409
3412
|
/* @__PURE__ */ a(
|
|
3410
3413
|
tt,
|
|
@@ -3433,7 +3436,7 @@ const ht = ({
|
|
|
3433
3436
|
We,
|
|
3434
3437
|
{
|
|
3435
3438
|
firstMonth: C,
|
|
3436
|
-
numMonths:
|
|
3439
|
+
numMonths: f,
|
|
3437
3440
|
value: ie,
|
|
3438
3441
|
size: E,
|
|
3439
3442
|
localeCode: s,
|
|
@@ -3483,8 +3486,8 @@ const ht = ({
|
|
|
3483
3486
|
value: e,
|
|
3484
3487
|
onValueChange: t,
|
|
3485
3488
|
onBlur: (h) => {
|
|
3486
|
-
const
|
|
3487
|
-
|
|
3489
|
+
const g = ft(h.target.value, r);
|
|
3490
|
+
g && g !== e && t?.(g);
|
|
3488
3491
|
},
|
|
3489
3492
|
onFocus: s,
|
|
3490
3493
|
label: n,
|
|
@@ -3502,10 +3505,10 @@ const ht = ({
|
|
|
3502
3505
|
), h = I(
|
|
3503
3506
|
() => e?.length === d.length ? De(e, n) : void 0,
|
|
3504
3507
|
[d.length, n, e]
|
|
3505
|
-
),
|
|
3508
|
+
), g = I(
|
|
3506
3509
|
() => h != null ? gt(h, l, c) : void 0,
|
|
3507
3510
|
[c, h, l]
|
|
3508
|
-
), [
|
|
3511
|
+
), [f, m] = S(
|
|
3509
3512
|
s ?? h ?? /* @__PURE__ */ new Date()
|
|
3510
3513
|
), w = D(
|
|
3511
3514
|
(R) => {
|
|
@@ -3514,18 +3517,18 @@ const ht = ({
|
|
|
3514
3517
|
[l]
|
|
3515
3518
|
), y = I(
|
|
3516
3519
|
() => Xe(
|
|
3517
|
-
|
|
3518
|
-
|
|
3520
|
+
f.getFullYear(),
|
|
3521
|
+
f.getMonth(),
|
|
3519
3522
|
c
|
|
3520
3523
|
),
|
|
3521
|
-
[c,
|
|
3524
|
+
[c, f]
|
|
3522
3525
|
), C = I(() => Qe(
|
|
3523
3526
|
nn(
|
|
3524
|
-
|
|
3527
|
+
f,
|
|
3525
3528
|
{ month: "long", year: "numeric" },
|
|
3526
3529
|
{ locale: c.code }
|
|
3527
3530
|
)
|
|
3528
|
-
), [c,
|
|
3531
|
+
), [c, f]), p = I(() => he(l, f), [l, f]), [b, v] = S(), [k, E] = S("calendar"), T = D(
|
|
3529
3532
|
(R) => {
|
|
3530
3533
|
const A = R?.length === d.length ? De(R, n) : void 0;
|
|
3531
3534
|
A && w(A), t?.(R);
|
|
@@ -3549,8 +3552,8 @@ const ht = ({
|
|
|
3549
3552
|
setHoverDate: v,
|
|
3550
3553
|
selectedDate: h,
|
|
3551
3554
|
today: l,
|
|
3552
|
-
visibleMonth:
|
|
3553
|
-
valueWhenBlurred:
|
|
3555
|
+
visibleMonth: f,
|
|
3556
|
+
valueWhenBlurred: g
|
|
3554
3557
|
};
|
|
3555
3558
|
}, Io = ({
|
|
3556
3559
|
value: e,
|
|
@@ -3565,8 +3568,8 @@ const ht = ({
|
|
|
3565
3568
|
heading: u,
|
|
3566
3569
|
headingLevel: d,
|
|
3567
3570
|
numMonthsInMonthPicker: h = 12,
|
|
3568
|
-
isDateDisabled:
|
|
3569
|
-
prevMonthDisabled:
|
|
3571
|
+
isDateDisabled: g,
|
|
3572
|
+
prevMonthDisabled: f,
|
|
3570
3573
|
nextMonthDisabled: m,
|
|
3571
3574
|
firstMonthInMonthPicker: w = /* @__PURE__ */ new Date(),
|
|
3572
3575
|
zIndex: y = 1e3,
|
|
@@ -3677,7 +3680,7 @@ const ht = ({
|
|
|
3677
3680
|
previousMonthButtonAriaLabel: c,
|
|
3678
3681
|
nextMonthButtonAriaLabel: i,
|
|
3679
3682
|
calendarSize: v,
|
|
3680
|
-
prevMonthDisabled:
|
|
3683
|
+
prevMonthDisabled: f,
|
|
3681
3684
|
nextMonthDisabled: m,
|
|
3682
3685
|
previousMonthButtonTestId: E,
|
|
3683
3686
|
nextMonthButtonTestId: T
|
|
@@ -3692,7 +3695,7 @@ const ht = ({
|
|
|
3692
3695
|
selectedStartDate: se,
|
|
3693
3696
|
selectedEndDate: se,
|
|
3694
3697
|
multiSelectable: !1,
|
|
3695
|
-
isDateDisabled:
|
|
3698
|
+
isDateDisabled: g,
|
|
3696
3699
|
dateTestId: k
|
|
3697
3700
|
}
|
|
3698
3701
|
),
|
|
@@ -3734,8 +3737,8 @@ const ht = ({
|
|
|
3734
3737
|
heading: u,
|
|
3735
3738
|
headingLevel: d,
|
|
3736
3739
|
numMonthsInMonthPicker: h = 12,
|
|
3737
|
-
isDateDisabled:
|
|
3738
|
-
prevMonthDisabled:
|
|
3740
|
+
isDateDisabled: g,
|
|
3741
|
+
prevMonthDisabled: f,
|
|
3739
3742
|
nextMonthDisabled: m,
|
|
3740
3743
|
firstMonthInMonthPicker: w = /* @__PURE__ */ new Date(),
|
|
3741
3744
|
dateTestId: y,
|
|
@@ -3781,7 +3784,7 @@ const ht = ({
|
|
|
3781
3784
|
previousMonthButtonAriaLabel: c,
|
|
3782
3785
|
nextMonthButtonAriaLabel: i,
|
|
3783
3786
|
calendarSize: C,
|
|
3784
|
-
prevMonthDisabled:
|
|
3787
|
+
prevMonthDisabled: f,
|
|
3785
3788
|
nextMonthDisabled: m,
|
|
3786
3789
|
previousMonthButtonTestId: p,
|
|
3787
3790
|
nextMonthButtonTestId: b
|
|
@@ -3795,7 +3798,7 @@ const ht = ({
|
|
|
3795
3798
|
selectedStartDate: F,
|
|
3796
3799
|
selectedEndDate: F,
|
|
3797
3800
|
isValidDateRange: !!F,
|
|
3798
|
-
isDateDisabled:
|
|
3801
|
+
isDateDisabled: g,
|
|
3799
3802
|
multiSelectable: !1,
|
|
3800
3803
|
dateTestId: y
|
|
3801
3804
|
}
|
|
@@ -3830,8 +3833,8 @@ const ht = ({
|
|
|
3830
3833
|
heading: u,
|
|
3831
3834
|
headingLevel: d,
|
|
3832
3835
|
numMonthsInMonthPicker: h = 12,
|
|
3833
|
-
isDateDisabled:
|
|
3834
|
-
prevMonthDisabled:
|
|
3836
|
+
isDateDisabled: g,
|
|
3837
|
+
prevMonthDisabled: f,
|
|
3835
3838
|
nextMonthDisabled: m,
|
|
3836
3839
|
firstMonthInMonthPicker: w = /* @__PURE__ */ new Date(),
|
|
3837
3840
|
size: y = "medium",
|
|
@@ -3880,7 +3883,7 @@ const ht = ({
|
|
|
3880
3883
|
previousMonthButtonAriaLabel: i,
|
|
3881
3884
|
nextMonthButtonAriaLabel: l,
|
|
3882
3885
|
calendarSize: y,
|
|
3883
|
-
prevMonthDisabled:
|
|
3886
|
+
prevMonthDisabled: f,
|
|
3884
3887
|
nextMonthDisabled: m,
|
|
3885
3888
|
previousMonthButtonTestId: p,
|
|
3886
3889
|
nextMonthButtonTestId: b
|
|
@@ -3892,7 +3895,7 @@ const ht = ({
|
|
|
3892
3895
|
...T,
|
|
3893
3896
|
size: y,
|
|
3894
3897
|
multiSelectable: !0,
|
|
3895
|
-
isDateDisabled:
|
|
3898
|
+
isDateDisabled: g,
|
|
3896
3899
|
dateTestId: C
|
|
3897
3900
|
}
|
|
3898
3901
|
),
|