@gostudent/shared-ui-library 1.19.0 → 1.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +96 -96
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -86,10 +86,10 @@ function Bn(e) {
|
|
|
86
86
|
d.setUTCSeconds(0);
|
|
87
87
|
const u = s > 0 ? d.getSeconds() : (d.getSeconds() - 60) % 60, f = Math.round(-(He(e.timeZone, e) * 60)) % 60;
|
|
88
88
|
(f || u) && (e.internal.setUTCSeconds(e.internal.getUTCSeconds() + f), Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + f + u));
|
|
89
|
-
const h = He(e.timeZone, e), _ = h > 0 ? Math.floor(h) : Math.ceil(h), v = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - _,
|
|
90
|
-
if (
|
|
89
|
+
const h = He(e.timeZone, e), _ = h > 0 ? Math.floor(h) : Math.ceil(h), v = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - _, b = _ !== n, x = v - c;
|
|
90
|
+
if (b && x) {
|
|
91
91
|
Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + x);
|
|
92
|
-
const
|
|
92
|
+
const k = He(e.timeZone, e), C = k > 0 ? Math.floor(k) : Math.ceil(k), S = _ - C;
|
|
93
93
|
S && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + S), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + S));
|
|
94
94
|
}
|
|
95
95
|
}
|
|
@@ -1410,30 +1410,30 @@ function Fo(e, t, n) {
|
|
|
1410
1410
|
}
|
|
1411
1411
|
const Vo = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, qo = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ao = /^'([^]*?)'?$/, Zo = /''/g, Uo = /[a-zA-Z]/;
|
|
1412
1412
|
function $e(e, t, n) {
|
|
1413
|
-
var u, f, h, _, p, v,
|
|
1414
|
-
const o = ct(), s = (n == null ? void 0 : n.locale) ?? o.locale ?? je, r = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((f = (u = n == null ? void 0 : n.locale) == null ? void 0 : u.options) == null ? void 0 : f.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((_ = (h = o.locale) == null ? void 0 : h.options) == null ? void 0 : _.firstWeekContainsDate) ?? 1, a = (n == null ? void 0 : n.weekStartsOn) ?? ((v = (p = n == null ? void 0 : n.locale) == null ? void 0 : p.options) == null ? void 0 : v.weekStartsOn) ?? o.weekStartsOn ?? ((x = (
|
|
1413
|
+
var u, f, h, _, p, v, b, x;
|
|
1414
|
+
const o = ct(), s = (n == null ? void 0 : n.locale) ?? o.locale ?? je, r = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((f = (u = n == null ? void 0 : n.locale) == null ? void 0 : u.options) == null ? void 0 : f.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((_ = (h = o.locale) == null ? void 0 : h.options) == null ? void 0 : _.firstWeekContainsDate) ?? 1, a = (n == null ? void 0 : n.weekStartsOn) ?? ((v = (p = n == null ? void 0 : n.locale) == null ? void 0 : p.options) == null ? void 0 : v.weekStartsOn) ?? o.weekStartsOn ?? ((x = (b = o.locale) == null ? void 0 : b.options) == null ? void 0 : x.weekStartsOn) ?? 0, i = Y(e, n == null ? void 0 : n.in);
|
|
1415
1415
|
if (!J1(i))
|
|
1416
1416
|
throw new RangeError("Invalid time value");
|
|
1417
|
-
let c = t.match(qo).map((
|
|
1418
|
-
const C =
|
|
1417
|
+
let c = t.match(qo).map((k) => {
|
|
1418
|
+
const C = k[0];
|
|
1419
1419
|
if (C === "p" || C === "P") {
|
|
1420
1420
|
const S = Eo[C];
|
|
1421
|
-
return S(
|
|
1421
|
+
return S(k, s.formatLong);
|
|
1422
1422
|
}
|
|
1423
|
-
return
|
|
1424
|
-
}).join("").match(Vo).map((
|
|
1425
|
-
if (
|
|
1423
|
+
return k;
|
|
1424
|
+
}).join("").match(Vo).map((k) => {
|
|
1425
|
+
if (k === "''")
|
|
1426
1426
|
return { isToken: !1, value: "'" };
|
|
1427
|
-
const C =
|
|
1427
|
+
const C = k[0];
|
|
1428
1428
|
if (C === "'")
|
|
1429
|
-
return { isToken: !1, value: Qo(
|
|
1429
|
+
return { isToken: !1, value: Qo(k) };
|
|
1430
1430
|
if (fn[C])
|
|
1431
|
-
return { isToken: !0, value:
|
|
1431
|
+
return { isToken: !0, value: k };
|
|
1432
1432
|
if (C.match(Uo))
|
|
1433
1433
|
throw new RangeError(
|
|
1434
1434
|
"Format string contains an unescaped latin alphabet character `" + C + "`"
|
|
1435
1435
|
);
|
|
1436
|
-
return { isToken: !1, value:
|
|
1436
|
+
return { isToken: !1, value: k };
|
|
1437
1437
|
});
|
|
1438
1438
|
s.localize.preprocessor && (c = s.localize.preprocessor(i, c));
|
|
1439
1439
|
const d = {
|
|
@@ -1441,9 +1441,9 @@ function $e(e, t, n) {
|
|
|
1441
1441
|
weekStartsOn: a,
|
|
1442
1442
|
locale: s
|
|
1443
1443
|
};
|
|
1444
|
-
return c.map((
|
|
1445
|
-
if (!
|
|
1446
|
-
const C =
|
|
1444
|
+
return c.map((k) => {
|
|
1445
|
+
if (!k.isToken) return k.value;
|
|
1446
|
+
const C = k.value;
|
|
1447
1447
|
(!(n != null && n.useAdditionalWeekYearTokens) && jo(C) || !(n != null && n.useAdditionalDayOfYearTokens) && Ro(C)) && Xo(C, t, String(e));
|
|
1448
1448
|
const S = fn[C[0]];
|
|
1449
1449
|
return S(i, C, s.localize, d);
|
|
@@ -2047,7 +2047,7 @@ function De(e, t, n = ke) {
|
|
|
2047
2047
|
});
|
|
2048
2048
|
}
|
|
2049
2049
|
function Xs(e, t, n, o, s) {
|
|
2050
|
-
const { disabled: r, hidden: a, modifiers: i, showOutsideDays: c, broadcastCalendar: d, today: u = s.today() } = t, { isSameDay: f, isSameMonth: h, startOfMonth: _, isBefore: p, endOfMonth: v, isAfter:
|
|
2050
|
+
const { disabled: r, hidden: a, modifiers: i, showOutsideDays: c, broadcastCalendar: d, today: u = s.today() } = t, { isSameDay: f, isSameMonth: h, startOfMonth: _, isBefore: p, endOfMonth: v, isAfter: b } = s, x = n && _(n), k = o && v(o), C = {
|
|
2051
2051
|
[X.focused]: [],
|
|
2052
2052
|
[X.outside]: [],
|
|
2053
2053
|
[X.disabled]: [],
|
|
@@ -2055,7 +2055,7 @@ function Xs(e, t, n, o, s) {
|
|
|
2055
2055
|
[X.today]: []
|
|
2056
2056
|
}, S = {};
|
|
2057
2057
|
for (const w of e) {
|
|
2058
|
-
const { date: m, displayMonth: O } = w, $ = !!(O && !h(m, O)), W = !!(x && p(m, x)), R = !!(
|
|
2058
|
+
const { date: m, displayMonth: O } = w, $ = !!(O && !h(m, O)), W = !!(x && p(m, x)), R = !!(k && b(m, k)), T = !!(r && De(m, r, s)), de = !!(a && De(m, a, s)) || W || R || // Broadcast calendar will show outside days as default
|
|
2059
2059
|
!d && !c && $ || d && c === !1 && $, ve = f(m, u);
|
|
2060
2060
|
$ && C.outside.push(w), T && C.disabled.push(w), de && C.hidden.push(w), ve && C.today.push(w), i && Object.keys(i).forEach((ue) => {
|
|
2061
2061
|
const Ie = i == null ? void 0 : i[ue];
|
|
@@ -2391,12 +2391,12 @@ function pr(e, t, { classNames: n, months: o, focused: s, dateLib: r }) {
|
|
|
2391
2391
|
}), a.current = v) : a.current = null, c.current || u || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
|
|
2392
2392
|
s)
|
|
2393
2393
|
return;
|
|
2394
|
-
const
|
|
2395
|
-
if (x != null && x.every((
|
|
2394
|
+
const b = p instanceof HTMLElement ? Ot(p) : [], x = Ot(e.current);
|
|
2395
|
+
if (x != null && x.every((k) => k instanceof HTMLElement) && b && b.every((k) => k instanceof HTMLElement)) {
|
|
2396
2396
|
c.current = !0, e.current.style.isolation = "isolate";
|
|
2397
|
-
const
|
|
2398
|
-
|
|
2399
|
-
const w =
|
|
2397
|
+
const k = _r(e.current);
|
|
2398
|
+
k && (k.style.zIndex = "1"), x.forEach((C, S) => {
|
|
2399
|
+
const w = b[S];
|
|
2400
2400
|
if (!w)
|
|
2401
2401
|
return;
|
|
2402
2402
|
C.style.position = "relative", C.style.overflow = "hidden";
|
|
@@ -2405,7 +2405,7 @@ function pr(e, t, { classNames: n, months: o, focused: s, dateLib: r }) {
|
|
|
2405
2405
|
const O = zt(C);
|
|
2406
2406
|
O && O.classList.add(_);
|
|
2407
2407
|
const $ = () => {
|
|
2408
|
-
c.current = !1, e.current && (e.current.style.isolation = ""),
|
|
2408
|
+
c.current = !1, e.current && (e.current.style.isolation = ""), k && (k.style.zIndex = ""), m && m.classList.remove(h), O && O.classList.remove(_), C.style.position = "", C.style.overflow = "", C.contains(w) && C.removeChild(w);
|
|
2409
2409
|
};
|
|
2410
2410
|
w.style.pointerEvents = "none", w.style.position = "absolute", w.style.overflow = "hidden", w.setAttribute("aria-hidden", "true");
|
|
2411
2411
|
const W = Cr(w);
|
|
@@ -2419,7 +2419,7 @@ function pr(e, t, { classNames: n, months: o, focused: s, dateLib: r }) {
|
|
|
2419
2419
|
});
|
|
2420
2420
|
}
|
|
2421
2421
|
function gr(e, t, n, o) {
|
|
2422
|
-
const s = e[0], r = e[e.length - 1], { ISOWeek: a, fixedWeeks: i, broadcastCalendar: c } = n ?? {}, { addDays: d, differenceInCalendarDays: u, differenceInCalendarMonths: f, endOfBroadcastWeek: h, endOfISOWeek: _, endOfMonth: p, endOfWeek: v, isAfter:
|
|
2422
|
+
const s = e[0], r = e[e.length - 1], { ISOWeek: a, fixedWeeks: i, broadcastCalendar: c } = n ?? {}, { addDays: d, differenceInCalendarDays: u, differenceInCalendarMonths: f, endOfBroadcastWeek: h, endOfISOWeek: _, endOfMonth: p, endOfWeek: v, isAfter: b, startOfBroadcastWeek: x, startOfISOWeek: k, startOfWeek: C } = o, S = c ? x(s, o) : a ? k(s) : C(s), w = c ? h(r) : a ? _(p(r)) : v(p(r)), m = t && (c ? h(t) : a ? _(t) : v(t)), O = m && b(w, m) ? m : w, $ = u(O, S), W = f(r, s) + 1, R = [];
|
|
2423
2423
|
for (let ve = 0; ve <= $; ve++) {
|
|
2424
2424
|
const ue = d(S, ve);
|
|
2425
2425
|
R.push(ue);
|
|
@@ -2462,19 +2462,19 @@ function pn(e, t, n, o) {
|
|
|
2462
2462
|
return t && d(c, t) < 0 && (c = t), f(c);
|
|
2463
2463
|
}
|
|
2464
2464
|
function br(e, t, n, o) {
|
|
2465
|
-
const { addDays: s, endOfBroadcastWeek: r, endOfISOWeek: a, endOfMonth: i, endOfWeek: c, getISOWeek: d, getWeek: u, startOfBroadcastWeek: f, startOfISOWeek: h, startOfWeek: _ } = o, p = e.reduce((v,
|
|
2466
|
-
const x = n.broadcastCalendar ? f(
|
|
2465
|
+
const { addDays: s, endOfBroadcastWeek: r, endOfISOWeek: a, endOfMonth: i, endOfWeek: c, getISOWeek: d, getWeek: u, startOfBroadcastWeek: f, startOfISOWeek: h, startOfWeek: _ } = o, p = e.reduce((v, b) => {
|
|
2466
|
+
const x = n.broadcastCalendar ? f(b, o) : n.ISOWeek ? h(b) : _(b), k = n.broadcastCalendar ? r(b) : n.ISOWeek ? a(i(b)) : c(i(b)), C = t.filter((O) => O >= x && O <= k), S = n.broadcastCalendar ? 35 : 42;
|
|
2467
2467
|
if (n.fixedWeeks && C.length < S) {
|
|
2468
2468
|
const O = t.filter(($) => {
|
|
2469
2469
|
const W = S - C.length;
|
|
2470
|
-
return $ >
|
|
2470
|
+
return $ > k && $ <= s(k, W);
|
|
2471
2471
|
});
|
|
2472
2472
|
C.push(...O);
|
|
2473
2473
|
}
|
|
2474
2474
|
const w = C.reduce((O, $) => {
|
|
2475
|
-
const W = n.ISOWeek ? d($) : u($), R = O.find((de) => de.weekNumber === W), T = new An($,
|
|
2475
|
+
const W = n.ISOWeek ? d($) : u($), R = O.find((de) => de.weekNumber === W), T = new An($, b, o);
|
|
2476
2476
|
return R ? R.days.push(T) : O.push(new Cs(W, [T])), O;
|
|
2477
|
-
}, []), m = new _s(
|
|
2477
|
+
}, []), m = new _s(b, w);
|
|
2478
2478
|
return v.push(m), v;
|
|
2479
2479
|
}, []);
|
|
2480
2480
|
return n.reverseMonths ? p.reverse() : p;
|
|
@@ -2483,8 +2483,8 @@ function kr(e, t) {
|
|
|
2483
2483
|
let { startMonth: n, endMonth: o } = e;
|
|
2484
2484
|
const { startOfYear: s, startOfDay: r, startOfMonth: a, endOfMonth: i, addYears: c, endOfYear: d, newDate: u, today: f } = t, { fromYear: h, toYear: _, fromMonth: p, toMonth: v } = e;
|
|
2485
2485
|
!n && p && (n = p), !n && h && (n = t.newDate(h, 0, 1)), !o && v && (o = v), !o && _ && (o = u(_, 11, 31));
|
|
2486
|
-
const
|
|
2487
|
-
return n ? n = a(n) : h ? n = u(h, 0, 1) : !n &&
|
|
2486
|
+
const b = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
|
|
2487
|
+
return n ? n = a(n) : h ? n = u(h, 0, 1) : !n && b && (n = s(c(e.today ?? f(), -100))), o ? o = i(o) : _ ? o = u(_, 11, 31) : !o && b && (o = d(e.today ?? f())), [
|
|
2488
2488
|
n && r(n),
|
|
2489
2489
|
o && r(o)
|
|
2490
2490
|
];
|
|
@@ -2557,7 +2557,7 @@ function Sr(e, t) {
|
|
|
2557
2557
|
e.numberOfMonths,
|
|
2558
2558
|
e.pagedNavigation,
|
|
2559
2559
|
e.reverseMonths
|
|
2560
|
-
]), { disableNavigation: p, onMonthChange: v } = e,
|
|
2560
|
+
]), { disableNavigation: p, onMonthChange: v } = e, b = (w) => u.some((m) => m.days.some((O) => O.isEqualTo(w))), x = (w) => {
|
|
2561
2561
|
if (p)
|
|
2562
2562
|
return;
|
|
2563
2563
|
let m = s(w);
|
|
@@ -2573,7 +2573,7 @@ function Sr(e, t) {
|
|
|
2573
2573
|
nextMonth: _,
|
|
2574
2574
|
goToMonth: x,
|
|
2575
2575
|
goToDay: (w) => {
|
|
2576
|
-
|
|
2576
|
+
b(w) || x(w.date);
|
|
2577
2577
|
}
|
|
2578
2578
|
};
|
|
2579
2579
|
}
|
|
@@ -2593,16 +2593,16 @@ function Nr(e, t, n, o) {
|
|
|
2593
2593
|
return s || (s = e.find((a) => gn(t(a)))), s;
|
|
2594
2594
|
}
|
|
2595
2595
|
function Dr(e, t, n, o, s, r, a) {
|
|
2596
|
-
const { ISOWeek: i, broadcastCalendar: c } = r, { addDays: d, addMonths: u, addWeeks: f, addYears: h, endOfBroadcastWeek: _, endOfISOWeek: p, endOfWeek: v, max:
|
|
2596
|
+
const { ISOWeek: i, broadcastCalendar: c } = r, { addDays: d, addMonths: u, addWeeks: f, addYears: h, endOfBroadcastWeek: _, endOfISOWeek: p, endOfWeek: v, max: b, min: x, startOfBroadcastWeek: k, startOfISOWeek: C, startOfWeek: S } = a;
|
|
2597
2597
|
let m = {
|
|
2598
2598
|
day: d,
|
|
2599
2599
|
week: f,
|
|
2600
2600
|
month: u,
|
|
2601
2601
|
year: h,
|
|
2602
|
-
startOfWeek: (O) => c ?
|
|
2602
|
+
startOfWeek: (O) => c ? k(O, a) : i ? C(O) : S(O),
|
|
2603
2603
|
endOfWeek: (O) => c ? _(O) : i ? p(O) : v(O)
|
|
2604
2604
|
}[e](n, t === "after" ? 1 : -1);
|
|
2605
|
-
return t === "before" && o ? m =
|
|
2605
|
+
return t === "before" && o ? m = b([o, m]) : t === "after" && s && (m = x([s, m])), m;
|
|
2606
2606
|
}
|
|
2607
2607
|
function l1(e, t, n, o, s, r, a, i = 0) {
|
|
2608
2608
|
if (i > 365)
|
|
@@ -2619,10 +2619,10 @@ function Or(e, t, n, o, s) {
|
|
|
2619
2619
|
blur: () => {
|
|
2620
2620
|
i(d), u(void 0);
|
|
2621
2621
|
},
|
|
2622
|
-
moveFocus: (v,
|
|
2622
|
+
moveFocus: (v, b) => {
|
|
2623
2623
|
if (!d)
|
|
2624
2624
|
return;
|
|
2625
|
-
const x = l1(v,
|
|
2625
|
+
const x = l1(v, b, d, t.navStart, t.navEnd, e, s);
|
|
2626
2626
|
x && (e.disableNavigation && !t.days.some((C) => C.isEqualTo(x)) || (t.goToDay(x), u(x)));
|
|
2627
2627
|
}
|
|
2628
2628
|
};
|
|
@@ -2632,14 +2632,14 @@ function Br(e, t) {
|
|
|
2632
2632
|
return {
|
|
2633
2633
|
selected: i,
|
|
2634
2634
|
select: (_, p, v) => {
|
|
2635
|
-
let
|
|
2635
|
+
let b = [...i ?? []];
|
|
2636
2636
|
if (d(_)) {
|
|
2637
2637
|
if ((i == null ? void 0 : i.length) === u || o && (i == null ? void 0 : i.length) === 1)
|
|
2638
2638
|
return;
|
|
2639
|
-
|
|
2639
|
+
b = i == null ? void 0 : i.filter((x) => !c(x, _));
|
|
2640
2640
|
} else
|
|
2641
|
-
(i == null ? void 0 : i.length) === f ?
|
|
2642
|
-
return s || a(
|
|
2641
|
+
(i == null ? void 0 : i.length) === f ? b = [_] : b = [...b, _];
|
|
2642
|
+
return s || a(b), s == null || s(b, _, p, v), b;
|
|
2643
2643
|
},
|
|
2644
2644
|
isSelected: d
|
|
2645
2645
|
};
|
|
@@ -2710,13 +2710,13 @@ function Gr(e, t) {
|
|
|
2710
2710
|
return {
|
|
2711
2711
|
selected: u,
|
|
2712
2712
|
select: (_, p, v) => {
|
|
2713
|
-
const { min:
|
|
2714
|
-
let
|
|
2713
|
+
const { min: b, max: x } = e;
|
|
2714
|
+
let k;
|
|
2715
2715
|
if (_) {
|
|
2716
2716
|
const C = u == null ? void 0 : u.from, S = u == null ? void 0 : u.to, w = !!C && !!S, m = !!C && !!S && t.isSameDay(C, S) && t.isSameDay(_, C);
|
|
2717
|
-
s && (w || !(u != null && u.from)) ? !a && m ?
|
|
2717
|
+
s && (w || !(u != null && u.from)) ? !a && m ? k = void 0 : k = { from: _, to: void 0 } : k = zr(_, u, b, x, a, t);
|
|
2718
2718
|
}
|
|
2719
|
-
return o && n && (
|
|
2719
|
+
return o && n && (k != null && k.from) && k.to && Tr({ from: k.from, to: k.to }, n, t) && (k.from = _, k.to = void 0), i || d(k), i == null || i(k, _, p, v), k;
|
|
2720
2720
|
},
|
|
2721
2721
|
isSelected: (_) => u && Ne(u, _, !1, t)
|
|
2722
2722
|
};
|
|
@@ -2823,7 +2823,7 @@ function Pr(e) {
|
|
|
2823
2823
|
t.classNames
|
|
2824
2824
|
]);
|
|
2825
2825
|
t.today || (t = { ...t, today: a.today() });
|
|
2826
|
-
const { captionLayout: d, mode: u, navLayout: f, numberOfMonths: h = 1, onDayBlur: _, onDayClick: p, onDayFocus: v, onDayKeyDown:
|
|
2826
|
+
const { captionLayout: d, mode: u, navLayout: f, numberOfMonths: h = 1, onDayBlur: _, onDayClick: p, onDayFocus: v, onDayKeyDown: b, onDayMouseEnter: x, onDayMouseLeave: k, onNextClick: C, onPrevClick: S, showWeekNumber: w, styles: m } = t, { formatCaption: O, formatDay: $, formatMonthDropdown: W, formatWeekNumber: R, formatWeekNumberHeader: T, formatWeekdayName: de, formatYearDropdown: ve } = s, ue = Sr(t, a), { days: Ie, months: dt, navStart: bt, navEnd: kt, previousMonth: Ce, nextMonth: pe, goToMonth: Me } = ue, vt = Xs(Ie, t, bt, kt, a), { isSelected: Ue, select: Qe, selected: ut } = $r(t, a) ?? {}, { blur: tn, focused: ft, isFocusTarget: _1, moveFocus: nn, setFocused: mt } = Or(t, ue, vt, Ue ?? (() => !1), a), { labelDayButton: C1, labelGridcell: p1, labelGrid: g1, labelMonthDropdown: y1, labelNav: on, labelPrevious: w1, labelNext: b1, labelWeekday: k1, labelWeekNumber: v1, labelWeekNumberHeader: M1, labelYearDropdown: x1 } = r, S1 = st(() => ur(a, t.ISOWeek, t.broadcastCalendar, t.today), [a, t.ISOWeek, t.broadcastCalendar, t.today]), sn = u !== void 0 || p !== void 0, Mt = j(() => {
|
|
2827
2827
|
Ce && (Me(Ce), S == null || S(Ce));
|
|
2828
2828
|
}, [Ce, Me, S]), xt = j(() => {
|
|
2829
2829
|
pe && (Me(pe), C == null || C(pe));
|
|
@@ -2855,12 +2855,12 @@ function Pr(e) {
|
|
|
2855
2855
|
const [re, z] = G[D.key];
|
|
2856
2856
|
nn(re, z);
|
|
2857
2857
|
}
|
|
2858
|
-
|
|
2859
|
-
}, [nn,
|
|
2858
|
+
b == null || b(B.date, P, D);
|
|
2859
|
+
}, [nn, b, t.dir]), z1 = j((B, P) => (D) => {
|
|
2860
2860
|
x == null || x(B.date, P, D);
|
|
2861
2861
|
}, [x]), W1 = j((B, P) => (D) => {
|
|
2862
|
-
|
|
2863
|
-
}, [
|
|
2862
|
+
k == null || k(B.date, P, D);
|
|
2863
|
+
}, [k]), T1 = j((B) => (P) => {
|
|
2864
2864
|
const D = Number(P.target.value), G = a.setMonth(a.startOfMonth(B), D);
|
|
2865
2865
|
Me(G);
|
|
2866
2866
|
}, [a, Me]), G1 = j((B) => (P) => {
|
|
@@ -3033,20 +3033,20 @@ function Ee({
|
|
|
3033
3033
|
forceFocus: _,
|
|
3034
3034
|
forceActive: p
|
|
3035
3035
|
}) {
|
|
3036
|
-
const v = Array.isArray(t) ? t[0] : t,
|
|
3036
|
+
const v = Array.isArray(t) ? t[0] : t, b = Array.isArray(t) ? t[1] : void 0, x = [
|
|
3037
3037
|
V.root,
|
|
3038
3038
|
aa[e],
|
|
3039
3039
|
sa[v],
|
|
3040
|
-
|
|
3040
|
+
b && ra[b],
|
|
3041
3041
|
_ && V.focused,
|
|
3042
3042
|
p && V.pressed,
|
|
3043
3043
|
a
|
|
3044
|
-
].filter(Boolean).join(" "),
|
|
3044
|
+
].filter(Boolean).join(" "), k = /* @__PURE__ */ g(_e, { children: [
|
|
3045
3045
|
s && /* @__PURE__ */ l("span", { className: V.icon, children: s }),
|
|
3046
3046
|
n && /* @__PURE__ */ l("span", { className: V.label, children: n }),
|
|
3047
3047
|
r && /* @__PURE__ */ l("span", { className: V.icon, children: r })
|
|
3048
3048
|
] });
|
|
3049
|
-
return d ? /* @__PURE__ */ l("a", { href: d, target: u, rel: f, onClick: i, className: x, "data-testid": h, children:
|
|
3049
|
+
return d ? /* @__PURE__ */ l("a", { href: d, target: u, rel: f, onClick: i, className: x, "data-testid": h, children: k }) : /* @__PURE__ */ l("button", { type: c, disabled: o, onClick: i, className: x, "data-testid": h, children: k });
|
|
3050
3050
|
}
|
|
3051
3051
|
const ia = "_root_16590_1", ca = "_spacingTopNone_16590_10", la = "_spacingTopXxs_16590_11", da = "_spacingTopXs_16590_12", ua = "_spacingTopSm_16590_13", fa = "_spacingTopMd_16590_14", ma = "_spacingTopLg_16590_15", ha = "_spacingTopXl_16590_16", _a = "_spacingTop2xl_16590_17", Ca = "_spacingTop3xl_16590_18", pa = "_spacingBottomNone_16590_22", ga = "_spacingBottomXxs_16590_23", ya = "_spacingBottomXs_16590_24", wa = "_spacingBottomSm_16590_25", ba = "_spacingBottomMd_16590_26", ka = "_spacingBottomLg_16590_27", va = "_spacingBottomXl_16590_28", Ma = "_spacingBottom2xl_16590_29", xa = "_spacingBottom3xl_16590_30", A = {
|
|
3052
3052
|
root: ia,
|
|
@@ -3308,9 +3308,9 @@ function vi({
|
|
|
3308
3308
|
}) {
|
|
3309
3309
|
const [p, v] = ne(
|
|
3310
3310
|
() => e ? Tt(e) : /* @__PURE__ */ new Date()
|
|
3311
|
-
),
|
|
3311
|
+
), b = st(() => a ?? hs, [a]), x = j((W) => {
|
|
3312
3312
|
v(W), n == null || n(W);
|
|
3313
|
-
}, [n]),
|
|
3313
|
+
}, [n]), k = j(() => {
|
|
3314
3314
|
const W = Tt(/* @__PURE__ */ new Date());
|
|
3315
3315
|
v(W), t == null || t(W), n == null || n(W);
|
|
3316
3316
|
}, [t, n]);
|
|
@@ -3322,8 +3322,8 @@ function vi({
|
|
|
3322
3322
|
ki,
|
|
3323
3323
|
{
|
|
3324
3324
|
...W,
|
|
3325
|
-
onTodayClick:
|
|
3326
|
-
locale:
|
|
3325
|
+
onTodayClick: k,
|
|
3326
|
+
locale: b,
|
|
3327
3327
|
todayLabel: u,
|
|
3328
3328
|
previousMonthLabel: f,
|
|
3329
3329
|
nextMonthLabel: h,
|
|
@@ -3331,7 +3331,7 @@ function vi({
|
|
|
3331
3331
|
splitNav: w
|
|
3332
3332
|
}
|
|
3333
3333
|
),
|
|
3334
|
-
[
|
|
3334
|
+
[b, u, f, h, k, S, w]
|
|
3335
3335
|
), O = o && o.length > 0, $ = [H.card, _ === "bottomSheet" ? H.bottomSheet : ""].filter(Boolean).join(" ");
|
|
3336
3336
|
return /* @__PURE__ */ g("div", { className: $, "aria-label": d, role: "region", children: [
|
|
3337
3337
|
/* @__PURE__ */ l(
|
|
@@ -3343,7 +3343,7 @@ function vi({
|
|
|
3343
3343
|
month: p,
|
|
3344
3344
|
onMonthChange: x,
|
|
3345
3345
|
weekStartsOn: i,
|
|
3346
|
-
locale:
|
|
3346
|
+
locale: b,
|
|
3347
3347
|
modifiers: { marked: o ?? [] },
|
|
3348
3348
|
disabled: r ?? [],
|
|
3349
3349
|
modifiersClassNames: {
|
|
@@ -3526,13 +3526,13 @@ function d1({
|
|
|
3526
3526
|
[e, t]
|
|
3527
3527
|
);
|
|
3528
3528
|
ce(() => (document.addEventListener("keydown", v), () => document.removeEventListener("keydown", v)), [v]);
|
|
3529
|
-
const
|
|
3529
|
+
const b = [
|
|
3530
3530
|
xe.panel,
|
|
3531
3531
|
xe[n],
|
|
3532
3532
|
e ? xe.open : "",
|
|
3533
3533
|
d ? xe.fullScreenOnMobile : "",
|
|
3534
3534
|
f
|
|
3535
|
-
].filter(Boolean).join(" "),
|
|
3535
|
+
].filter(Boolean).join(" "), k = n === "top" || n === "bottom" ? { height: s ?? o } : { "--drawer-panel-width": o };
|
|
3536
3536
|
return typeof document > "u" ? null : jt(
|
|
3537
3537
|
/* @__PURE__ */ g(_e, { children: [
|
|
3538
3538
|
c && e && /* @__PURE__ */ l(
|
|
@@ -3551,8 +3551,8 @@ function d1({
|
|
|
3551
3551
|
"aria-modal": e ? "true" : void 0,
|
|
3552
3552
|
"aria-hidden": e ? void 0 : !0,
|
|
3553
3553
|
"aria-label": h,
|
|
3554
|
-
className:
|
|
3555
|
-
style:
|
|
3554
|
+
className: b,
|
|
3555
|
+
style: k,
|
|
3556
3556
|
children: [
|
|
3557
3557
|
r && /* @__PURE__ */ l("div", { className: xe.header, children: r }),
|
|
3558
3558
|
/* @__PURE__ */ l("div", { className: u ? xe.body : xe.bodyFixed, children: i }),
|
|
@@ -3586,8 +3586,8 @@ function S8({
|
|
|
3586
3586
|
"aria-label": p = "Calendar"
|
|
3587
3587
|
}) {
|
|
3588
3588
|
const v = j(
|
|
3589
|
-
(
|
|
3590
|
-
o == null || o(
|
|
3589
|
+
(b) => {
|
|
3590
|
+
o == null || o(b), f && t();
|
|
3591
3591
|
},
|
|
3592
3592
|
[o, t, f]
|
|
3593
3593
|
);
|
|
@@ -4438,7 +4438,7 @@ function Sn({
|
|
|
4438
4438
|
"aria-label": i,
|
|
4439
4439
|
error: c
|
|
4440
4440
|
}) {
|
|
4441
|
-
const [d, u] = ne(!1), [f, h] = ne(!1), _ = Z(null), p = Z(null), v = e.find((w) => w.value === t),
|
|
4441
|
+
const [d, u] = ne(!1), [f, h] = ne(!1), _ = Z(null), p = Z(null), v = e.find((w) => w.value === t), b = () => {
|
|
4442
4442
|
if (!r) {
|
|
4443
4443
|
if (!d && p.current) {
|
|
4444
4444
|
const w = p.current.getBoundingClientRect();
|
|
@@ -4449,14 +4449,14 @@ function Sn({
|
|
|
4449
4449
|
}, x = (w) => {
|
|
4450
4450
|
var m;
|
|
4451
4451
|
n == null || n(w), u(!1), (m = p.current) == null || m.focus();
|
|
4452
|
-
},
|
|
4452
|
+
}, k = j(
|
|
4453
4453
|
(w) => {
|
|
4454
4454
|
var m;
|
|
4455
4455
|
w.key === "Escape" && d && (u(!1), (m = p.current) == null || m.focus());
|
|
4456
4456
|
},
|
|
4457
4457
|
[d]
|
|
4458
4458
|
);
|
|
4459
|
-
ce(() => (document.addEventListener("keydown",
|
|
4459
|
+
ce(() => (document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k)), [k]), ce(() => {
|
|
4460
4460
|
if (!d) return;
|
|
4461
4461
|
const w = (m) => {
|
|
4462
4462
|
_.current && !_.current.contains(m.target) && u(!1);
|
|
@@ -4481,7 +4481,7 @@ function Sn({
|
|
|
4481
4481
|
ref: p,
|
|
4482
4482
|
type: "button",
|
|
4483
4483
|
className: S,
|
|
4484
|
-
onClick:
|
|
4484
|
+
onClick: b,
|
|
4485
4485
|
"aria-haspopup": "listbox",
|
|
4486
4486
|
"aria-expanded": d,
|
|
4487
4487
|
"aria-label": i,
|
|
@@ -4701,7 +4701,7 @@ function E8({
|
|
|
4701
4701
|
labels: h,
|
|
4702
4702
|
className: _
|
|
4703
4703
|
}) {
|
|
4704
|
-
const p = { ...Q7, ...h }, v = t && t.length > 0,
|
|
4704
|
+
const p = { ...Q7, ...h }, v = t && t.length > 0, b = !!n, [x, k] = ne(!1), [C, S] = ne(!1), w = Z(null), m = j(() => k(!1), []);
|
|
4705
4705
|
ce(() => {
|
|
4706
4706
|
const T = (de) => {
|
|
4707
4707
|
de.key === "Escape" && m();
|
|
@@ -4759,7 +4759,7 @@ function E8({
|
|
|
4759
4759
|
{
|
|
4760
4760
|
type: "button",
|
|
4761
4761
|
className: E.userSection,
|
|
4762
|
-
onClick: () =>
|
|
4762
|
+
onClick: () => k((T) => !T),
|
|
4763
4763
|
"aria-haspopup": "true",
|
|
4764
4764
|
"aria-expanded": x,
|
|
4765
4765
|
children: [
|
|
@@ -4812,7 +4812,7 @@ function E8({
|
|
|
4812
4812
|
] })
|
|
4813
4813
|
] })
|
|
4814
4814
|
] }),
|
|
4815
|
-
|
|
4815
|
+
b && /* @__PURE__ */ l(
|
|
4816
4816
|
"button",
|
|
4817
4817
|
{
|
|
4818
4818
|
type: "button",
|
|
@@ -4824,7 +4824,7 @@ function E8({
|
|
|
4824
4824
|
)
|
|
4825
4825
|
] })
|
|
4826
4826
|
] }) }),
|
|
4827
|
-
|
|
4827
|
+
b && /* @__PURE__ */ l(
|
|
4828
4828
|
d1,
|
|
4829
4829
|
{
|
|
4830
4830
|
isOpen: C,
|
|
@@ -4983,20 +4983,20 @@ function zc({
|
|
|
4983
4983
|
onReviewFeedback: _,
|
|
4984
4984
|
labels: p
|
|
4985
4985
|
}) {
|
|
4986
|
-
const [v,
|
|
4986
|
+
const [v, b] = ne(!1), x = Z(null);
|
|
4987
4987
|
ce(() => {
|
|
4988
4988
|
if (!v) return;
|
|
4989
4989
|
function C(w) {
|
|
4990
|
-
x.current && !x.current.contains(w.target) &&
|
|
4990
|
+
x.current && !x.current.contains(w.target) && b(!1);
|
|
4991
4991
|
}
|
|
4992
4992
|
function S(w) {
|
|
4993
|
-
w.key === "Escape" &&
|
|
4993
|
+
w.key === "Escape" && b(!1);
|
|
4994
4994
|
}
|
|
4995
4995
|
return document.addEventListener("mousedown", C), document.addEventListener("keydown", S), () => {
|
|
4996
4996
|
document.removeEventListener("mousedown", C), document.removeEventListener("keydown", S);
|
|
4997
4997
|
};
|
|
4998
4998
|
}, [v]);
|
|
4999
|
-
const
|
|
4999
|
+
const k = /* @__PURE__ */ g("div", { className: L.metaRow, children: [
|
|
5000
5000
|
/* @__PURE__ */ l(Re, { icon: /* @__PURE__ */ l(r5, { size: "md" }), children: s }),
|
|
5001
5001
|
/* @__PURE__ */ l(Re, { icon: /* @__PURE__ */ l(a5, { size: "md" }), children: r }),
|
|
5002
5002
|
/* @__PURE__ */ l(Re, { icon: /* @__PURE__ */ l(i5, { size: "md" }), children: a }),
|
|
@@ -5016,7 +5016,7 @@ function zc({
|
|
|
5016
5016
|
o.map((C) => /* @__PURE__ */ l(Kt, { size: ["md", "sm"], children: C }, C))
|
|
5017
5017
|
] })
|
|
5018
5018
|
] }),
|
|
5019
|
-
|
|
5019
|
+
k
|
|
5020
5020
|
] }),
|
|
5021
5021
|
(h && h.length > 0 || f) && /* @__PURE__ */ g("div", { className: L.headerRight, children: [
|
|
5022
5022
|
h && h.length > 0 && /* @__PURE__ */ g("div", { className: L.menuWrapper, ref: x, children: [
|
|
@@ -5026,7 +5026,7 @@ function zc({
|
|
|
5026
5026
|
icon: /* @__PURE__ */ l(s5, { size: "lg" }),
|
|
5027
5027
|
"aria-label": p.lessonOptions,
|
|
5028
5028
|
size: "md",
|
|
5029
|
-
onClick: () =>
|
|
5029
|
+
onClick: () => b((C) => !C)
|
|
5030
5030
|
}
|
|
5031
5031
|
),
|
|
5032
5032
|
v && /* @__PURE__ */ l("div", { className: L.dropdown, children: /* @__PURE__ */ l(m2, { children: h.map((C) => /* @__PURE__ */ l(
|
|
@@ -5034,7 +5034,7 @@ function zc({
|
|
|
5034
5034
|
{
|
|
5035
5035
|
icon: C.icon,
|
|
5036
5036
|
onClick: () => {
|
|
5037
|
-
C.onClick(),
|
|
5037
|
+
C.onClick(), b(!1);
|
|
5038
5038
|
},
|
|
5039
5039
|
children: C.label
|
|
5040
5040
|
},
|
|
@@ -5072,12 +5072,12 @@ function I8({
|
|
|
5072
5072
|
menuItems: _,
|
|
5073
5073
|
feedbackState: p = "pending",
|
|
5074
5074
|
pendingFeedbackCount: v = 0,
|
|
5075
|
-
onLeaveFeedback:
|
|
5075
|
+
onLeaveFeedback: b,
|
|
5076
5076
|
onReviewFeedback: x,
|
|
5077
|
-
labels:
|
|
5077
|
+
labels: k,
|
|
5078
5078
|
className: C
|
|
5079
5079
|
}) {
|
|
5080
|
-
const S = { ...Wc, ...
|
|
5080
|
+
const S = { ...Wc, ...k }, w = i === "upcoming", m = i === "completed";
|
|
5081
5081
|
return /* @__PURE__ */ g(f1, { padding: "lg", radius: "sm", bordered: !0, className: [L.root, C].filter(Boolean).join(" "), children: [
|
|
5082
5082
|
/* @__PURE__ */ l(
|
|
5083
5083
|
zc,
|
|
@@ -5110,13 +5110,13 @@ function I8({
|
|
|
5110
5110
|
labels: S
|
|
5111
5111
|
}
|
|
5112
5112
|
),
|
|
5113
|
-
m && /* @__PURE__ */ l(
|
|
5113
|
+
m && (b || x) && /* @__PURE__ */ l(
|
|
5114
5114
|
Nc,
|
|
5115
5115
|
{
|
|
5116
5116
|
feedbackState: p,
|
|
5117
5117
|
pendingFeedbackCount: v,
|
|
5118
5118
|
students: c,
|
|
5119
|
-
onLeaveFeedback:
|
|
5119
|
+
onLeaveFeedback: b,
|
|
5120
5120
|
onReviewFeedback: x,
|
|
5121
5121
|
labels: S
|
|
5122
5122
|
}
|
|
@@ -5366,7 +5366,7 @@ function Y8({
|
|
|
5366
5366
|
className: a,
|
|
5367
5367
|
style: i
|
|
5368
5368
|
}) {
|
|
5369
|
-
const [c, d, u] = It(t), [f, h, _] = It(n), [p, v,
|
|
5369
|
+
const [c, d, u] = It(t), [f, h, _] = It(n), [p, v, b] = o == null ? [void 0, void 0, void 0] : It(o), x = [
|
|
5370
5370
|
y.root,
|
|
5371
5371
|
y3[c],
|
|
5372
5372
|
d && w3[d],
|
|
@@ -5376,7 +5376,7 @@ function Y8({
|
|
|
5376
5376
|
_ && M3[_],
|
|
5377
5377
|
p && x3[p],
|
|
5378
5378
|
v && S3[v],
|
|
5379
|
-
|
|
5379
|
+
b && N3[b],
|
|
5380
5380
|
D3[s],
|
|
5381
5381
|
a
|
|
5382
5382
|
].filter(Boolean).join(" ");
|
|
@@ -5414,10 +5414,10 @@ function R8({
|
|
|
5414
5414
|
var p, v;
|
|
5415
5415
|
if (e) {
|
|
5416
5416
|
f.current = document.activeElement;
|
|
5417
|
-
const
|
|
5417
|
+
const b = (p = u.current) == null ? void 0 : p.querySelector(
|
|
5418
5418
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
5419
5419
|
);
|
|
5420
|
-
|
|
5420
|
+
b == null || b.focus();
|
|
5421
5421
|
} else
|
|
5422
5422
|
(v = f.current) == null || v.focus();
|
|
5423
5423
|
}, [e]);
|
|
@@ -5504,7 +5504,7 @@ function j8(e) {
|
|
|
5504
5504
|
p && K3[p],
|
|
5505
5505
|
n ? me.inputError : "",
|
|
5506
5506
|
r ?? ""
|
|
5507
|
-
].filter(Boolean).join(" "),
|
|
5507
|
+
].filter(Boolean).join(" "), b = {
|
|
5508
5508
|
id: f,
|
|
5509
5509
|
disabled: i,
|
|
5510
5510
|
"aria-invalid": n ? !0 : void 0,
|
|
@@ -5516,7 +5516,7 @@ function j8(e) {
|
|
|
5516
5516
|
t && /* @__PURE__ */ l("label", { className: me.label, htmlFor: f, children: t }),
|
|
5517
5517
|
o && /* @__PURE__ */ l("span", { className: me.tooltipSlot, children: o })
|
|
5518
5518
|
] }),
|
|
5519
|
-
c ? /* @__PURE__ */ l("textarea", { ...
|
|
5519
|
+
c ? /* @__PURE__ */ l("textarea", { ...b, ...d }) : /* @__PURE__ */ l("input", { ...b, ...d }),
|
|
5520
5520
|
n && /* @__PURE__ */ l("p", { id: h, className: me.errorMessage, role: "alert", children: n })
|
|
5521
5521
|
] });
|
|
5522
5522
|
}
|