@carto/meridian-ds 1.0.0-alpha-muiv6.1 → 1.1.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/CHANGELOG.md +5 -2
- package/dist/{Alert-CAXy8Ryb.js → Alert-DDz3-_16.js} +1 -1
- package/dist/{Alert-C0iusY_y.cjs → Alert-FLV5jJYV.cjs} +1 -1
- package/dist/MenuItem-CtbgleBi.cjs +9 -0
- package/dist/{MenuItem-DlGBm9LU.js → MenuItem-DB0A65bz.js} +248 -255
- package/dist/TablePaginationActions-DyJEKn3l.cjs +9 -0
- package/dist/{TablePaginationActions-DdTjHDJ5.js → TablePaginationActions-GazQOp5y.js} +479 -528
- package/dist/components/index.cjs +5 -5
- package/dist/components/index.js +1317 -1337
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.js +41 -51
- package/dist/types/components/molecules/UploadField/StyledUploadField.d.ts +8 -0
- package/dist/types/components/molecules/UploadField/StyledUploadField.d.ts.map +1 -0
- package/dist/types/theme/carto-theme.d.ts +119 -119
- package/dist/types/theme/sections/components/data-display.d.ts +1 -2
- package/dist/types/theme/sections/components/data-display.d.ts.map +1 -1
- package/dist/types/theme/sections/components/date-pickers.d.ts.map +1 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts +2 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.styled.d.ts +32 -0
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.styled.d.ts.map +1 -0
- package/dist/types/widgets/SkeletonWidgets.d.ts +20 -0
- package/dist/types/widgets/SkeletonWidgets.d.ts.map +1 -0
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.styled.d.ts +45 -0
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.styled.d.ts.map +1 -0
- package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/FormulaLabel.d.ts.map +1 -1
- package/dist/types/widgets/legend/LegendLayer.d.ts.map +1 -1
- package/dist/types/widgets/legend/LegendWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/legend/LegendWidgetUI.styles.d.ts +31 -0
- package/dist/types/widgets/legend/LegendWidgetUI.styles.d.ts.map +1 -0
- package/dist/types/widgets/legend/legend-types/LegendProportion.d.ts.map +1 -1
- package/dist/widgets/index.cjs +13 -13
- package/dist/widgets/index.js +1547 -1539
- package/package.json +11 -9
- package/dist/MenuItem-CYbg2TdD.cjs +0 -9
- package/dist/TablePaginationActions-DfvzICj9.cjs +0 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as p from "react";
|
|
2
2
|
import { jsx as C, jsxs as Se } from "react/jsx-runtime";
|
|
3
|
-
import { P as a } from "./TablePaginationActions-
|
|
3
|
+
import { P as a, _ as E } from "./TablePaginationActions-GazQOp5y.js";
|
|
4
4
|
import { useThemeProps as pe, styled as B, alpha as $e } from "@mui/material/styles";
|
|
5
5
|
import pt from "@mui/material/MenuItem";
|
|
6
6
|
import ht from "@mui/material/MenuList";
|
|
@@ -8,14 +8,14 @@ import Ye from "@mui/material/IconButton";
|
|
|
8
8
|
import gt from "@mui/material/Typography";
|
|
9
9
|
import { createSvgIcon as Ce } from "@mui/material/utils";
|
|
10
10
|
import { styled as $t, MenuItem as Lt } from "@mui/material";
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
function ie(e, t) {
|
|
12
|
+
if (e == null) return {};
|
|
13
|
+
var n = {};
|
|
14
|
+
for (var o in e) if ({}.hasOwnProperty.call(e, o)) {
|
|
15
|
+
if (t.includes(o)) continue;
|
|
16
|
+
n[o] = e[o];
|
|
17
|
+
}
|
|
18
|
+
return n;
|
|
19
19
|
}
|
|
20
20
|
function bt(e) {
|
|
21
21
|
var t, n, o = "";
|
|
@@ -32,20 +32,14 @@ function te() {
|
|
|
32
32
|
}
|
|
33
33
|
const Ht = /* @__PURE__ */ p.createContext();
|
|
34
34
|
process.env.NODE_ENV !== "production" && (a.node, a.bool);
|
|
35
|
-
const yt = () =>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
for (var o in e) if ({}.hasOwnProperty.call(e, o)) {
|
|
40
|
-
if (t.includes(o)) continue;
|
|
41
|
-
n[o] = e[o];
|
|
42
|
-
}
|
|
43
|
-
return n;
|
|
44
|
-
}
|
|
35
|
+
const yt = () => {
|
|
36
|
+
const e = p.useContext(Ht);
|
|
37
|
+
return e ?? !1;
|
|
38
|
+
};
|
|
45
39
|
function Ft(e, t) {
|
|
46
40
|
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
47
41
|
}
|
|
48
|
-
const
|
|
42
|
+
const wt = typeof window < "u" ? p.useLayoutEffect : p.useEffect;
|
|
49
43
|
let nt = 0;
|
|
50
44
|
function Bt(e) {
|
|
51
45
|
const [t, n] = p.useState(e), o = e || t;
|
|
@@ -92,7 +86,7 @@ function We({
|
|
|
92
86
|
}
|
|
93
87
|
function ae(e) {
|
|
94
88
|
const t = p.useRef(e);
|
|
95
|
-
return
|
|
89
|
+
return wt(() => {
|
|
96
90
|
t.current = e;
|
|
97
91
|
}), p.useRef((...n) => (
|
|
98
92
|
// @ts-expect-error hide `this`
|
|
@@ -272,7 +266,7 @@ const Jt = function(t) {
|
|
|
272
266
|
dateLibInstance: f,
|
|
273
267
|
adapterLocale: m,
|
|
274
268
|
localeText: b
|
|
275
|
-
} = i, g = p.useMemo(() =>
|
|
269
|
+
} = i, g = p.useMemo(() => E({}, b, s, n), [b, s, n]), d = p.useMemo(() => {
|
|
276
270
|
if (!l)
|
|
277
271
|
return r || null;
|
|
278
272
|
const P = new l({
|
|
@@ -356,7 +350,7 @@ const Qt = (e) => ({
|
|
|
356
350
|
components: {
|
|
357
351
|
MuiLocalizationProvider: {
|
|
358
352
|
defaultProps: {
|
|
359
|
-
localeText:
|
|
353
|
+
localeText: E({}, e)
|
|
360
354
|
}
|
|
361
355
|
}
|
|
362
356
|
}
|
|
@@ -371,7 +365,7 @@ const Qt = (e) => ({
|
|
|
371
365
|
const i = s !== null && t.isValid(s) ? t.format(s, n) : null;
|
|
372
366
|
return (r ?? o)(s, t, i);
|
|
373
367
|
};
|
|
374
|
-
},
|
|
368
|
+
}, vt = {
|
|
375
369
|
// Calendar navigation
|
|
376
370
|
previousMonth: "Previous month",
|
|
377
371
|
nextMonth: "Next month",
|
|
@@ -435,8 +429,8 @@ const Qt = (e) => ({
|
|
|
435
429
|
meridiem: "Meridiem",
|
|
436
430
|
// Common
|
|
437
431
|
empty: "Empty"
|
|
438
|
-
}, en =
|
|
439
|
-
Qt(
|
|
432
|
+
}, en = vt;
|
|
433
|
+
Qt(vt);
|
|
440
434
|
const qe = () => {
|
|
441
435
|
const e = p.useContext(Le);
|
|
442
436
|
if (e === null)
|
|
@@ -445,8 +439,8 @@ const qe = () => {
|
|
|
445
439
|
if (e.utils === null)
|
|
446
440
|
throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.", "It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(`
|
|
447
441
|
`));
|
|
448
|
-
const t = p.useMemo(() =>
|
|
449
|
-
return p.useMemo(() =>
|
|
442
|
+
const t = p.useMemo(() => E({}, en, e.localeText), [e.localeText]);
|
|
443
|
+
return p.useMemo(() => E({}, e, {
|
|
450
444
|
localeText: t
|
|
451
445
|
}), [e, t]);
|
|
452
446
|
}, ge = () => qe().utils, Bo = () => qe().defaultDates, Ze = (e) => {
|
|
@@ -539,7 +533,7 @@ const rn = ["children", "className", "slots", "slotProps", "isNextDisabled", "is
|
|
|
539
533
|
onGoToPrevious: y,
|
|
540
534
|
previousLabel: k,
|
|
541
535
|
labelId: P
|
|
542
|
-
} = r, M = ie(r, rn), V = r, N = un(V),
|
|
536
|
+
} = r, M = ie(r, rn), V = r, N = un(V), R = {
|
|
543
537
|
isDisabled: c,
|
|
544
538
|
isHidden: f,
|
|
545
539
|
goTo: m,
|
|
@@ -560,7 +554,7 @@ const rn = ["children", "className", "slots", "slotProps", "isNextDisabled", "is
|
|
|
560
554
|
edge: "end",
|
|
561
555
|
onClick: H.goTo
|
|
562
556
|
},
|
|
563
|
-
ownerState:
|
|
557
|
+
ownerState: E({}, V, {
|
|
564
558
|
hidden: H.isHidden
|
|
565
559
|
}),
|
|
566
560
|
className: te(N.button, N.previousIconButton)
|
|
@@ -569,14 +563,14 @@ const rn = ["children", "className", "slots", "slotProps", "isNextDisabled", "is
|
|
|
569
563
|
externalSlotProps: l == null ? void 0 : l.nextIconButton,
|
|
570
564
|
additionalProps: {
|
|
571
565
|
size: "medium",
|
|
572
|
-
title:
|
|
573
|
-
"aria-label":
|
|
574
|
-
disabled:
|
|
566
|
+
title: R.label,
|
|
567
|
+
"aria-label": R.label,
|
|
568
|
+
disabled: R.isDisabled,
|
|
575
569
|
edge: "start",
|
|
576
|
-
onClick:
|
|
570
|
+
onClick: R.goTo
|
|
577
571
|
},
|
|
578
|
-
ownerState:
|
|
579
|
-
hidden:
|
|
572
|
+
ownerState: E({}, V, {
|
|
573
|
+
hidden: R.isHidden
|
|
580
574
|
}),
|
|
581
575
|
className: te(N.button, N.nextIconButton)
|
|
582
576
|
}), I = (u == null ? void 0 : u.leftArrowIcon) ?? tn, K = Ne({
|
|
@@ -596,13 +590,13 @@ const rn = ["children", "className", "slots", "slotProps", "isNextDisabled", "is
|
|
|
596
590
|
ownerState: V,
|
|
597
591
|
className: N.rightArrowIcon
|
|
598
592
|
}), le = ie(oe, an);
|
|
599
|
-
return /* @__PURE__ */ Se(ln,
|
|
593
|
+
return /* @__PURE__ */ Se(ln, E({
|
|
600
594
|
ref: n,
|
|
601
595
|
className: te(N.root, i),
|
|
602
596
|
ownerState: V
|
|
603
597
|
}, M, {
|
|
604
|
-
children: [/* @__PURE__ */ C(h,
|
|
605
|
-
children: o ? /* @__PURE__ */ C(ne,
|
|
598
|
+
children: [/* @__PURE__ */ C(h, E({}, x, {
|
|
599
|
+
children: o ? /* @__PURE__ */ C(ne, E({}, le)) : /* @__PURE__ */ C(I, E({}, _))
|
|
606
600
|
})), s ? /* @__PURE__ */ C(gt, {
|
|
607
601
|
variant: "subtitle1",
|
|
608
602
|
component: "span",
|
|
@@ -611,8 +605,8 @@ const rn = ["children", "className", "slots", "slotProps", "isNextDisabled", "is
|
|
|
611
605
|
}) : /* @__PURE__ */ C(cn, {
|
|
612
606
|
className: N.spacer,
|
|
613
607
|
ownerState: V
|
|
614
|
-
}), /* @__PURE__ */ C(O,
|
|
615
|
-
children: o ? /* @__PURE__ */ C(I,
|
|
608
|
+
}), /* @__PURE__ */ C(O, E({}, $, {
|
|
609
|
+
children: o ? /* @__PURE__ */ C(I, E({}, _)) : /* @__PURE__ */ C(ne, E({}, le))
|
|
616
610
|
}))]
|
|
617
611
|
}));
|
|
618
612
|
}), ue = (e, t) => e.length !== t.length ? !1 : t.every((n) => e.includes(n)), Go = ({
|
|
@@ -678,7 +672,7 @@ function Ke({
|
|
|
678
672
|
y(x ? h : (O) => h === O ? null : O), u == null || u(h, x);
|
|
679
673
|
}), N = ae((h) => {
|
|
680
674
|
V(h, !0), h !== m && (b(h), t && t(h));
|
|
681
|
-
}),
|
|
675
|
+
}), R = ae(() => {
|
|
682
676
|
M && N(M);
|
|
683
677
|
}), H = ae((h, x, O) => {
|
|
684
678
|
const $ = x === "finish", I = O ? (
|
|
@@ -689,7 +683,7 @@ function Ke({
|
|
|
689
683
|
if (e(h, $ && I ? "partial" : x, O), O && O !== m) {
|
|
690
684
|
const _ = r[r.indexOf(O) + 1];
|
|
691
685
|
_ && N(_);
|
|
692
|
-
} else $ &&
|
|
686
|
+
} else $ && R();
|
|
693
687
|
});
|
|
694
688
|
return {
|
|
695
689
|
view: m,
|
|
@@ -700,7 +694,7 @@ function Ke({
|
|
|
700
694
|
previousView: P,
|
|
701
695
|
// Always return up-to-date default view instead of the initial one (i.e. defaultView.current)
|
|
702
696
|
defaultView: r.includes(n) ? n : r[0],
|
|
703
|
-
goToNextView:
|
|
697
|
+
goToNextView: R,
|
|
704
698
|
setValueAndGoToNextView: H
|
|
705
699
|
};
|
|
706
700
|
}
|
|
@@ -754,9 +748,9 @@ const Te = 220, fe = 36, Pe = {
|
|
|
754
748
|
}, Dt = {
|
|
755
749
|
x: Pe.x,
|
|
756
750
|
y: 0
|
|
757
|
-
}, yn = Dt.x - Pe.x,
|
|
758
|
-
const o = t - Pe.x, r = n - Pe.y, s = Math.atan2(yn,
|
|
759
|
-
let i =
|
|
751
|
+
}, yn = Dt.x - Pe.x, wn = Dt.y - Pe.y, vn = (e) => e * (180 / Math.PI), kt = (e, t, n) => {
|
|
752
|
+
const o = t - Pe.x, r = n - Pe.y, s = Math.atan2(yn, wn) - Math.atan2(o, r);
|
|
753
|
+
let i = vn(s);
|
|
760
754
|
i = Math.round(i / e) * e, i %= 360;
|
|
761
755
|
const u = Math.floor(i / e) || 0, l = o ** 2 + r ** 2, c = Math.sqrt(l);
|
|
762
756
|
return {
|
|
@@ -848,10 +842,10 @@ function In(e) {
|
|
|
848
842
|
p.useEffect(() => {
|
|
849
843
|
u.current = r;
|
|
850
844
|
}, [r]);
|
|
851
|
-
const l =
|
|
845
|
+
const l = E({}, t, {
|
|
852
846
|
shouldAnimate: u.current !== r
|
|
853
847
|
}), c = kn(l);
|
|
854
|
-
return /* @__PURE__ */ C(xn,
|
|
848
|
+
return /* @__PURE__ */ C(xn, E({
|
|
855
849
|
style: (() => {
|
|
856
850
|
let b = 360 / (r === "hours" ? 12 : 60) * s;
|
|
857
851
|
return r === "hours" && s > 12 && (b -= 360), {
|
|
@@ -1034,7 +1028,7 @@ const Ue = (e, t, n) => {
|
|
|
1034
1028
|
overridesResolver: (e, t) => t.amButton
|
|
1035
1029
|
})(({
|
|
1036
1030
|
theme: e
|
|
1037
|
-
}) =>
|
|
1031
|
+
}) => E({}, Tt(e, "am"), {
|
|
1038
1032
|
// keeping it here to make TS happy
|
|
1039
1033
|
position: "absolute",
|
|
1040
1034
|
left: 8
|
|
@@ -1044,7 +1038,7 @@ const Ue = (e, t, n) => {
|
|
|
1044
1038
|
overridesResolver: (e, t) => t.pmButton
|
|
1045
1039
|
})(({
|
|
1046
1040
|
theme: e
|
|
1047
|
-
}) =>
|
|
1041
|
+
}) => E({}, Tt(e, "pm"), {
|
|
1048
1042
|
// keeping it here to make TS happy
|
|
1049
1043
|
position: "absolute",
|
|
1050
1044
|
right: 8
|
|
@@ -1079,7 +1073,7 @@ function _n(e) {
|
|
|
1079
1073
|
disabled: P = !1,
|
|
1080
1074
|
readOnly: M,
|
|
1081
1075
|
className: V
|
|
1082
|
-
} = t, N = t,
|
|
1076
|
+
} = t, N = t, R = ge(), H = Be(), h = p.useRef(!1), x = Rn(N), O = l(d, g), $ = !n && g === "hours" && (d < 1 || d > 12), I = (D, A) => {
|
|
1083
1077
|
P || M || l(D, g) || m(D, A);
|
|
1084
1078
|
}, K = (D, A) => {
|
|
1085
1079
|
let {
|
|
@@ -1101,7 +1095,7 @@ function _n(e) {
|
|
|
1101
1095
|
}, le = (D) => {
|
|
1102
1096
|
h.current && (h.current = !1), K(D.nativeEvent, "finish");
|
|
1103
1097
|
}, ce = p.useMemo(() => g === "hours" ? !0 : d % 5 === 0, [g, d]), X = g === "minutes" ? f : 1, de = p.useRef(null);
|
|
1104
|
-
|
|
1098
|
+
wt(() => {
|
|
1105
1099
|
r && de.current.focus();
|
|
1106
1100
|
}, [r]);
|
|
1107
1101
|
const F = (D) => Math.max(y, Math.min(k, D)), z = (D) => (D + (k + 1)) % (k + 1), G = (D) => {
|
|
@@ -1156,7 +1150,7 @@ function _n(e) {
|
|
|
1156
1150
|
})]
|
|
1157
1151
|
}), /* @__PURE__ */ C($n, {
|
|
1158
1152
|
"aria-activedescendant": b,
|
|
1159
|
-
"aria-label": H.clockLabelText(g, i,
|
|
1153
|
+
"aria-label": H.clockLabelText(g, i, R, i == null ? null : R.format(i, "fullTime")),
|
|
1160
1154
|
ref: de,
|
|
1161
1155
|
role: "listbox",
|
|
1162
1156
|
onKeyDown: G,
|
|
@@ -1170,22 +1164,22 @@ function _n(e) {
|
|
|
1170
1164
|
disabled: P || c === null,
|
|
1171
1165
|
ownerState: N,
|
|
1172
1166
|
className: x.amButton,
|
|
1173
|
-
title: xe(
|
|
1167
|
+
title: xe(R, "am"),
|
|
1174
1168
|
children: /* @__PURE__ */ C(lt, {
|
|
1175
1169
|
variant: "caption",
|
|
1176
1170
|
className: x.meridiemText,
|
|
1177
|
-
children: xe(
|
|
1171
|
+
children: xe(R, "am")
|
|
1178
1172
|
})
|
|
1179
1173
|
}), /* @__PURE__ */ C(Bn, {
|
|
1180
1174
|
disabled: P || c === null,
|
|
1181
1175
|
onClick: M ? void 0 : () => u("pm"),
|
|
1182
1176
|
ownerState: N,
|
|
1183
1177
|
className: x.pmButton,
|
|
1184
|
-
title: xe(
|
|
1178
|
+
title: xe(R, "pm"),
|
|
1185
1179
|
children: /* @__PURE__ */ C(lt, {
|
|
1186
1180
|
variant: "caption",
|
|
1187
1181
|
className: x.meridiemText,
|
|
1188
|
-
children: xe(
|
|
1182
|
+
children: xe(R, "pm")
|
|
1189
1183
|
})
|
|
1190
1184
|
})]
|
|
1191
1185
|
})]
|
|
@@ -1238,7 +1232,7 @@ const Ae = De("MuiClockNumber", ["root", "selected", "disabled"]), jn = ["classN
|
|
|
1238
1232
|
props: {
|
|
1239
1233
|
inner: !0
|
|
1240
1234
|
},
|
|
1241
|
-
style:
|
|
1235
|
+
style: E({}, e.typography.body2, {
|
|
1242
1236
|
color: (e.vars || e).palette.text.secondary
|
|
1243
1237
|
})
|
|
1244
1238
|
}]
|
|
@@ -1255,7 +1249,7 @@ function It(e) {
|
|
|
1255
1249
|
label: i,
|
|
1256
1250
|
selected: u
|
|
1257
1251
|
} = t, l = ie(t, jn), c = t, f = Wn(c), m = r % 12 / 12 * Math.PI * 2 - Math.PI / 2, b = (Te - fe - 2) / 2 * (s ? 0.65 : 1), g = Math.round(Math.cos(m) * b), d = Math.round(Math.sin(m) * b);
|
|
1258
|
-
return /* @__PURE__ */ C(Un,
|
|
1252
|
+
return /* @__PURE__ */ C(Un, E({
|
|
1259
1253
|
className: te(f.root, n),
|
|
1260
1254
|
"aria-disabled": o ? !0 : void 0,
|
|
1261
1255
|
"aria-selected": u ? !0 : void 0,
|
|
@@ -1359,7 +1353,7 @@ const Yn = ({
|
|
|
1359
1353
|
onChange: c,
|
|
1360
1354
|
valueManager: i
|
|
1361
1355
|
});
|
|
1362
|
-
},
|
|
1356
|
+
}, ve = {
|
|
1363
1357
|
year: 1,
|
|
1364
1358
|
month: 2,
|
|
1365
1359
|
day: 3,
|
|
@@ -1367,15 +1361,15 @@ const Yn = ({
|
|
|
1367
1361
|
minutes: 5,
|
|
1368
1362
|
seconds: 6,
|
|
1369
1363
|
milliseconds: 7
|
|
1370
|
-
}, ar = (e) => Math.max(...e.map((t) =>
|
|
1371
|
-
if (t ===
|
|
1364
|
+
}, ar = (e) => Math.max(...e.map((t) => ve[t.type] ?? 1)), Ve = (e, t, n) => {
|
|
1365
|
+
if (t === ve.year)
|
|
1372
1366
|
return e.startOfYear(n);
|
|
1373
|
-
if (t ===
|
|
1367
|
+
if (t === ve.month)
|
|
1374
1368
|
return e.startOfMonth(n);
|
|
1375
|
-
if (t ===
|
|
1369
|
+
if (t === ve.day)
|
|
1376
1370
|
return e.startOfDay(n);
|
|
1377
1371
|
let o = n;
|
|
1378
|
-
return t <
|
|
1372
|
+
return t < ve.minutes && (o = e.setMinutes(o, 0)), t < ve.seconds && (o = e.setSeconds(o, 0)), t < ve.milliseconds && (o = e.setMilliseconds(o, 0)), o;
|
|
1379
1373
|
}, qn = ({
|
|
1380
1374
|
props: e,
|
|
1381
1375
|
utils: t,
|
|
@@ -1713,7 +1707,7 @@ const pr = (e, t) => {
|
|
|
1713
1707
|
return n === -1 ? null : n;
|
|
1714
1708
|
}
|
|
1715
1709
|
return e;
|
|
1716
|
-
},
|
|
1710
|
+
}, wr = (e, t) => {
|
|
1717
1711
|
if (e.value)
|
|
1718
1712
|
switch (e.type) {
|
|
1719
1713
|
case "month": {
|
|
@@ -1729,7 +1723,7 @@ const pr = (e, t) => {
|
|
|
1729
1723
|
default:
|
|
1730
1724
|
return;
|
|
1731
1725
|
}
|
|
1732
|
-
},
|
|
1726
|
+
}, vr = (e, t) => {
|
|
1733
1727
|
if (e.value)
|
|
1734
1728
|
switch (e.type) {
|
|
1735
1729
|
case "weekDay":
|
|
@@ -1794,7 +1788,7 @@ const pr = (e, t) => {
|
|
|
1794
1788
|
utils: n,
|
|
1795
1789
|
props: o,
|
|
1796
1790
|
referenceDate: t,
|
|
1797
|
-
granularity:
|
|
1791
|
+
granularity: ve.day,
|
|
1798
1792
|
timezone: r,
|
|
1799
1793
|
getTodayDate: () => Je(n, r, "date")
|
|
1800
1794
|
}),
|
|
@@ -1848,7 +1842,7 @@ const pr = (e, t) => {
|
|
|
1848
1842
|
minutesStep: M = 1,
|
|
1849
1843
|
shouldDisableTime: V,
|
|
1850
1844
|
showViewSwitcher: N,
|
|
1851
|
-
onChange:
|
|
1845
|
+
onChange: R,
|
|
1852
1846
|
view: H,
|
|
1853
1847
|
views: h = uo,
|
|
1854
1848
|
openTo: x,
|
|
@@ -1869,7 +1863,7 @@ const pr = (e, t) => {
|
|
|
1869
1863
|
value: f,
|
|
1870
1864
|
defaultValue: m,
|
|
1871
1865
|
referenceDate: b,
|
|
1872
|
-
onChange:
|
|
1866
|
+
onChange: R,
|
|
1873
1867
|
valueManager: ze
|
|
1874
1868
|
}), F = tt({
|
|
1875
1869
|
value: ce,
|
|
@@ -1895,10 +1889,10 @@ const pr = (e, t) => {
|
|
|
1895
1889
|
meridiemMode: q,
|
|
1896
1890
|
handleMeridiemChange: be
|
|
1897
1891
|
} = Ct(F, s, ee), me = p.useCallback((W, U) => {
|
|
1898
|
-
const
|
|
1892
|
+
const w = _e(g, o), L = U === "hours" || U === "minutes" && h.includes("seconds"), v = ({
|
|
1899
1893
|
start: T,
|
|
1900
1894
|
end: J
|
|
1901
|
-
}) => !(y &&
|
|
1895
|
+
}) => !(y && w(y, J) || d && w(T, d) || k && w(T, G) || P && w(G, L ? J : T)), S = (T, J = 1) => {
|
|
1902
1896
|
if (T % J !== 0)
|
|
1903
1897
|
return !1;
|
|
1904
1898
|
if (V)
|
|
@@ -1919,22 +1913,22 @@ const pr = (e, t) => {
|
|
|
1919
1913
|
const T = Oe(W, q, s), J = o.setHours(F, T);
|
|
1920
1914
|
if (o.getHours(J) !== T)
|
|
1921
1915
|
return !0;
|
|
1922
|
-
const
|
|
1923
|
-
return !
|
|
1924
|
-
start:
|
|
1916
|
+
const we = o.setSeconds(o.setMinutes(J, 0), 0), Ie = o.setSeconds(o.setMinutes(J, 59), 59);
|
|
1917
|
+
return !v({
|
|
1918
|
+
start: we,
|
|
1925
1919
|
end: Ie
|
|
1926
1920
|
}) || !S(T);
|
|
1927
1921
|
}
|
|
1928
1922
|
case "minutes": {
|
|
1929
|
-
const T = o.setMinutes(F, W), J = o.setSeconds(T, 0),
|
|
1930
|
-
return !
|
|
1923
|
+
const T = o.setMinutes(F, W), J = o.setSeconds(T, 0), we = o.setSeconds(T, 59);
|
|
1924
|
+
return !v({
|
|
1931
1925
|
start: J,
|
|
1932
|
-
end:
|
|
1926
|
+
end: we
|
|
1933
1927
|
}) || !S(W, M);
|
|
1934
1928
|
}
|
|
1935
1929
|
case "seconds": {
|
|
1936
1930
|
const T = o.setSeconds(F, W);
|
|
1937
|
-
return !
|
|
1931
|
+
return !v({
|
|
1938
1932
|
start: T,
|
|
1939
1933
|
end: T
|
|
1940
1934
|
}) || !S(W);
|
|
@@ -1945,12 +1939,12 @@ const pr = (e, t) => {
|
|
|
1945
1939
|
}, [s, F, g, d, q, y, M, V, o, k, P, G, h]), Z = zt(), ke = p.useMemo(() => {
|
|
1946
1940
|
switch (D) {
|
|
1947
1941
|
case "hours": {
|
|
1948
|
-
const W = (L,
|
|
1942
|
+
const W = (L, v) => {
|
|
1949
1943
|
const S = Oe(L, q, s);
|
|
1950
|
-
ee(o.setHours(F, S),
|
|
1944
|
+
ee(o.setHours(F, S), v, "hours");
|
|
1951
1945
|
}, U = o.getHours(F);
|
|
1952
|
-
let
|
|
1953
|
-
return s ? U > 12 ?
|
|
1946
|
+
let w;
|
|
1947
|
+
return s ? U > 12 ? w = [12, 23] : w = [0, 11] : w = [0, 23], {
|
|
1954
1948
|
onChange: W,
|
|
1955
1949
|
viewValue: U,
|
|
1956
1950
|
children: Yn({
|
|
@@ -1962,12 +1956,12 @@ const pr = (e, t) => {
|
|
|
1962
1956
|
isDisabled: (L) => _ || me(L, "hours"),
|
|
1963
1957
|
selectedId: Z
|
|
1964
1958
|
}),
|
|
1965
|
-
viewRange:
|
|
1959
|
+
viewRange: w
|
|
1966
1960
|
};
|
|
1967
1961
|
}
|
|
1968
1962
|
case "minutes": {
|
|
1969
|
-
const W = o.getMinutes(F), U = (
|
|
1970
|
-
ee(o.setMinutes(F,
|
|
1963
|
+
const W = o.getMinutes(F), U = (w, L) => {
|
|
1964
|
+
ee(o.setMinutes(F, w), L, "minutes");
|
|
1971
1965
|
};
|
|
1972
1966
|
return {
|
|
1973
1967
|
viewValue: W,
|
|
@@ -1977,15 +1971,15 @@ const pr = (e, t) => {
|
|
|
1977
1971
|
value: W,
|
|
1978
1972
|
onChange: U,
|
|
1979
1973
|
getClockNumberText: z.minutesClockNumberText,
|
|
1980
|
-
isDisabled: (
|
|
1974
|
+
isDisabled: (w) => _ || me(w, "minutes"),
|
|
1981
1975
|
selectedId: Z
|
|
1982
1976
|
}),
|
|
1983
1977
|
viewRange: [0, 59]
|
|
1984
1978
|
};
|
|
1985
1979
|
}
|
|
1986
1980
|
case "seconds": {
|
|
1987
|
-
const W = o.getSeconds(F), U = (
|
|
1988
|
-
ee(o.setSeconds(F,
|
|
1981
|
+
const W = o.getSeconds(F), U = (w, L) => {
|
|
1982
|
+
ee(o.setSeconds(F, w), L, "seconds");
|
|
1989
1983
|
};
|
|
1990
1984
|
return {
|
|
1991
1985
|
viewValue: W,
|
|
@@ -1995,7 +1989,7 @@ const pr = (e, t) => {
|
|
|
1995
1989
|
value: W,
|
|
1996
1990
|
onChange: U,
|
|
1997
1991
|
getClockNumberText: z.secondsClockNumberText,
|
|
1998
|
-
isDisabled: (
|
|
1992
|
+
isDisabled: (w) => _ || me(w, "seconds"),
|
|
1999
1993
|
selectedId: Z
|
|
2000
1994
|
}),
|
|
2001
1995
|
viewRange: [0, 59]
|
|
@@ -2005,12 +1999,12 @@ const pr = (e, t) => {
|
|
|
2005
1999
|
throw new Error("You must provide the type for ClockView");
|
|
2006
2000
|
}
|
|
2007
2001
|
}, [D, o, ce, s, z.hoursClockNumberText, z.minutesClockNumberText, z.secondsClockNumberText, q, ee, F, me, Z, _]), re = r, ye = io(re);
|
|
2008
|
-
return /* @__PURE__ */ Se(lo,
|
|
2002
|
+
return /* @__PURE__ */ Se(lo, E({
|
|
2009
2003
|
ref: n,
|
|
2010
2004
|
className: te(ye.root, K),
|
|
2011
2005
|
ownerState: re
|
|
2012
2006
|
}, le, {
|
|
2013
|
-
children: [/* @__PURE__ */ C(_n,
|
|
2007
|
+
children: [/* @__PURE__ */ C(_n, E({
|
|
2014
2008
|
autoFocus: u ?? !!$,
|
|
2015
2009
|
ampmInClock: i && h.includes("hours"),
|
|
2016
2010
|
value: ce,
|
|
@@ -2285,7 +2279,7 @@ const Dr = (e, t) => (n) => {
|
|
|
2285
2279
|
minTime: M,
|
|
2286
2280
|
disableFuture: V,
|
|
2287
2281
|
disablePast: N,
|
|
2288
|
-
minutesStep:
|
|
2282
|
+
minutesStep: R = 1,
|
|
2289
2283
|
shouldDisableTime: H,
|
|
2290
2284
|
onChange: h,
|
|
2291
2285
|
view: x,
|
|
@@ -2311,7 +2305,7 @@ const Dr = (e, t) => (n) => {
|
|
|
2311
2305
|
referenceDate: y,
|
|
2312
2306
|
onChange: h,
|
|
2313
2307
|
valueManager: ze
|
|
2314
|
-
}), D = Be(), A = Ze(G), Q = p.useMemo(() =>
|
|
2308
|
+
}), D = Be(), A = Ze(G), Q = p.useMemo(() => E({}, u, {
|
|
2315
2309
|
alreadyRendered: !!r.current
|
|
2316
2310
|
}), [u]), j = po(Q), ee = (m == null ? void 0 : m.digitalClockItem) ?? bo, q = Ne({
|
|
2317
2311
|
elementType: ee,
|
|
@@ -2324,7 +2318,7 @@ const Dr = (e, t) => (n) => {
|
|
|
2324
2318
|
utils: o,
|
|
2325
2319
|
props: u,
|
|
2326
2320
|
timezone: G
|
|
2327
|
-
}), me = ae((
|
|
2321
|
+
}), me = ae((w) => z(w, "finish", "hours")), {
|
|
2328
2322
|
setValueAndGoToNextView: Z
|
|
2329
2323
|
} = Ke({
|
|
2330
2324
|
view: x,
|
|
@@ -2334,42 +2328,42 @@ const Dr = (e, t) => (n) => {
|
|
|
2334
2328
|
onChange: me,
|
|
2335
2329
|
focusedView: I,
|
|
2336
2330
|
onFocusedViewChange: K
|
|
2337
|
-
}), ke = ae((
|
|
2338
|
-
Z(
|
|
2331
|
+
}), ke = ae((w) => {
|
|
2332
|
+
Z(w, "finish");
|
|
2339
2333
|
});
|
|
2340
2334
|
p.useEffect(() => {
|
|
2341
2335
|
if (r.current === null)
|
|
2342
2336
|
return;
|
|
2343
|
-
const
|
|
2344
|
-
if (!
|
|
2337
|
+
const w = r.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');
|
|
2338
|
+
if (!w)
|
|
2345
2339
|
return;
|
|
2346
|
-
const L =
|
|
2347
|
-
(f || I) &&
|
|
2340
|
+
const L = w.offsetTop;
|
|
2341
|
+
(f || I) && w.focus(), r.current.scrollTop = L - 4;
|
|
2348
2342
|
});
|
|
2349
|
-
const re = p.useCallback((
|
|
2350
|
-
const L = _e(k, o),
|
|
2351
|
-
return !
|
|
2352
|
-
}, [k, o, M, P, V, A, N,
|
|
2353
|
-
const
|
|
2354
|
-
let
|
|
2355
|
-
for (; o.isSameDay(be,
|
|
2356
|
-
|
|
2357
|
-
return
|
|
2358
|
-
}, [be, c, o]), W = ye.findIndex((
|
|
2359
|
-
switch (
|
|
2343
|
+
const re = p.useCallback((w) => {
|
|
2344
|
+
const L = _e(k, o), v = () => !(M && L(M, w) || P && L(w, P) || V && L(w, A) || N && L(A, w)), S = () => o.getMinutes(w) % R !== 0 ? !1 : H ? !H(w, "hours") : !0;
|
|
2345
|
+
return !v() || !S();
|
|
2346
|
+
}, [k, o, M, P, V, A, N, R, H]), ye = p.useMemo(() => {
|
|
2347
|
+
const w = [];
|
|
2348
|
+
let v = o.startOfDay(be);
|
|
2349
|
+
for (; o.isSameDay(be, v); )
|
|
2350
|
+
w.push(v), v = o.addMinutes(v, c);
|
|
2351
|
+
return w;
|
|
2352
|
+
}, [be, c, o]), W = ye.findIndex((w) => o.isEqual(w, be)), U = (w) => {
|
|
2353
|
+
switch (w.key) {
|
|
2360
2354
|
case "PageUp": {
|
|
2361
|
-
const L = Fe(i.current) - 5,
|
|
2362
|
-
T && T.focus(),
|
|
2355
|
+
const L = Fe(i.current) - 5, v = i.current.children, S = Math.max(0, L), T = v[S];
|
|
2356
|
+
T && T.focus(), w.preventDefault();
|
|
2363
2357
|
break;
|
|
2364
2358
|
}
|
|
2365
2359
|
case "PageDown": {
|
|
2366
|
-
const L = Fe(i.current) + 5,
|
|
2367
|
-
T && T.focus(),
|
|
2360
|
+
const L = Fe(i.current) + 5, v = i.current.children, S = Math.min(v.length - 1, L), T = v[S];
|
|
2361
|
+
T && T.focus(), w.preventDefault();
|
|
2368
2362
|
break;
|
|
2369
2363
|
}
|
|
2370
2364
|
}
|
|
2371
2365
|
};
|
|
2372
|
-
return /* @__PURE__ */ C(ho,
|
|
2366
|
+
return /* @__PURE__ */ C(ho, E({
|
|
2373
2367
|
ref: s,
|
|
2374
2368
|
className: te(j.root, _),
|
|
2375
2369
|
ownerState: Q
|
|
@@ -2380,22 +2374,22 @@ const Dr = (e, t) => (n) => {
|
|
|
2380
2374
|
"aria-label": D.timePickerToolbarTitle,
|
|
2381
2375
|
className: j.list,
|
|
2382
2376
|
onKeyDown: U,
|
|
2383
|
-
children: ye.map((
|
|
2384
|
-
if (ce && re(
|
|
2377
|
+
children: ye.map((w, L) => {
|
|
2378
|
+
if (ce && re(w))
|
|
2385
2379
|
return null;
|
|
2386
|
-
const
|
|
2387
|
-
return /* @__PURE__ */ C(ee,
|
|
2388
|
-
onClick: () => !oe && ke(
|
|
2389
|
-
selected:
|
|
2390
|
-
disabled: ne || re(
|
|
2380
|
+
const v = o.isEqual(w, F), S = o.format(w, l ? "fullTime12h" : "fullTime24h"), T = W === L || W === -1 && L === 0 ? 0 : -1;
|
|
2381
|
+
return /* @__PURE__ */ C(ee, E({
|
|
2382
|
+
onClick: () => !oe && ke(w),
|
|
2383
|
+
selected: v,
|
|
2384
|
+
disabled: ne || re(w),
|
|
2391
2385
|
disableRipple: oe,
|
|
2392
2386
|
role: "option",
|
|
2393
2387
|
"aria-disabled": oe,
|
|
2394
|
-
"aria-selected":
|
|
2388
|
+
"aria-selected": v,
|
|
2395
2389
|
tabIndex: T
|
|
2396
2390
|
}, q, {
|
|
2397
2391
|
children: S
|
|
2398
|
-
}), `${
|
|
2392
|
+
}), `${w.valueOf()}-${S}`);
|
|
2399
2393
|
})
|
|
2400
2394
|
})
|
|
2401
2395
|
}));
|
|
@@ -2566,17 +2560,17 @@ function yo(e) {
|
|
|
2566
2560
|
return he("MuiMultiSectionDigitalClock", e);
|
|
2567
2561
|
}
|
|
2568
2562
|
const xr = De("MuiMultiSectionDigitalClock", ["root"]);
|
|
2569
|
-
function
|
|
2563
|
+
function wo(e) {
|
|
2570
2564
|
return he("MuiMultiSectionDigitalClockSection", e);
|
|
2571
2565
|
}
|
|
2572
|
-
const Tr = De("MuiMultiSectionDigitalClockSection", ["root", "item"]),
|
|
2566
|
+
const Tr = De("MuiMultiSectionDigitalClockSection", ["root", "item"]), vo = ["autoFocus", "onChange", "className", "disabled", "readOnly", "items", "active", "slots", "slotProps", "skipDisabled"], So = (e) => {
|
|
2573
2567
|
const {
|
|
2574
2568
|
classes: t
|
|
2575
2569
|
} = e;
|
|
2576
2570
|
return Me({
|
|
2577
2571
|
root: ["root"],
|
|
2578
2572
|
item: ["item"]
|
|
2579
|
-
},
|
|
2573
|
+
}, wo, t);
|
|
2580
2574
|
}, Co = B(ht, {
|
|
2581
2575
|
name: "MuiMultiSectionDigitalClockSection",
|
|
2582
2576
|
slot: "Root",
|
|
@@ -2660,7 +2654,7 @@ const Tr = De("MuiMultiSectionDigitalClockSection", ["root", "item"]), wo = ["au
|
|
|
2660
2654
|
slots: d,
|
|
2661
2655
|
slotProps: y,
|
|
2662
2656
|
skipDisabled: k
|
|
2663
|
-
} = i, P = ie(i,
|
|
2657
|
+
} = i, P = ie(i, vo), M = p.useMemo(() => E({}, i, {
|
|
2664
2658
|
alreadyRendered: !!o.current
|
|
2665
2659
|
}), [i]), V = So(M), N = (d == null ? void 0 : d.digitalClockSectionItem) ?? Mo;
|
|
2666
2660
|
p.useEffect(() => {
|
|
@@ -2673,7 +2667,7 @@ const Tr = De("MuiMultiSectionDigitalClockSection", ["root", "item"]), wo = ["au
|
|
|
2673
2667
|
const x = h.offsetTop;
|
|
2674
2668
|
o.current.scrollTop = x - 4;
|
|
2675
2669
|
});
|
|
2676
|
-
const
|
|
2670
|
+
const R = b.findIndex((h) => h.isFocused(h.value)), H = (h) => {
|
|
2677
2671
|
switch (h.key) {
|
|
2678
2672
|
case "PageUp": {
|
|
2679
2673
|
const x = Fe(o.current) - 5, O = o.current.children, $ = Math.max(0, x), I = O[$];
|
|
@@ -2687,7 +2681,7 @@ const Tr = De("MuiMultiSectionDigitalClockSection", ["root", "item"]), wo = ["au
|
|
|
2687
2681
|
}
|
|
2688
2682
|
}
|
|
2689
2683
|
};
|
|
2690
|
-
return /* @__PURE__ */ C(Co,
|
|
2684
|
+
return /* @__PURE__ */ C(Co, E({
|
|
2691
2685
|
ref: r,
|
|
2692
2686
|
className: te(V.root, c),
|
|
2693
2687
|
ownerState: M,
|
|
@@ -2700,8 +2694,8 @@ const Tr = De("MuiMultiSectionDigitalClockSection", ["root", "item"]), wo = ["au
|
|
|
2700
2694
|
const O = (_ = h.isDisabled) == null ? void 0 : _.call(h, h.value), $ = f || O;
|
|
2701
2695
|
if (k && $)
|
|
2702
2696
|
return null;
|
|
2703
|
-
const I = h.isSelected(h.value), K =
|
|
2704
|
-
return /* @__PURE__ */ C(N,
|
|
2697
|
+
const I = h.isSelected(h.value), K = R === x || R === -1 && x === 0 ? 0 : -1;
|
|
2698
|
+
return /* @__PURE__ */ C(N, E({
|
|
2705
2699
|
onClick: () => !m && l(h.value),
|
|
2706
2700
|
selected: I,
|
|
2707
2701
|
disabled: $,
|
|
@@ -2805,7 +2799,7 @@ const Tr = De("MuiMultiSectionDigitalClockSection", ["root", "item"]), wo = ["au
|
|
|
2805
2799
|
disablePast: M,
|
|
2806
2800
|
minutesStep: V = 1,
|
|
2807
2801
|
shouldDisableTime: N,
|
|
2808
|
-
onChange:
|
|
2802
|
+
onChange: R,
|
|
2809
2803
|
view: H,
|
|
2810
2804
|
views: h = ["hours", "minutes"],
|
|
2811
2805
|
openTo: x,
|
|
@@ -2827,9 +2821,9 @@ const Tr = De("MuiMultiSectionDigitalClockSection", ["root", "item"]), wo = ["au
|
|
|
2827
2821
|
value: m,
|
|
2828
2822
|
defaultValue: b,
|
|
2829
2823
|
referenceDate: g,
|
|
2830
|
-
onChange:
|
|
2824
|
+
onChange: R,
|
|
2831
2825
|
valueManager: ze
|
|
2832
|
-
}), z = Be(), G = Ze(F), D = p.useMemo(() =>
|
|
2826
|
+
}), z = Be(), G = Ze(F), D = p.useMemo(() => E({
|
|
2833
2827
|
hours: 1,
|
|
2834
2828
|
minutes: 5,
|
|
2835
2829
|
seconds: 5
|
|
@@ -2839,7 +2833,7 @@ const Tr = De("MuiMultiSectionDigitalClockSection", ["root", "item"]), wo = ["au
|
|
|
2839
2833
|
utils: o,
|
|
2840
2834
|
props: s,
|
|
2841
2835
|
timezone: F
|
|
2842
|
-
}), Q = ae((
|
|
2836
|
+
}), Q = ae((v, S, T) => de(v, S, T)), j = p.useMemo(() => !i || !h.includes("hours") || h.includes("meridiem") ? h : [...h, "meridiem"], [i, h]), {
|
|
2843
2837
|
view: ee,
|
|
2844
2838
|
setValueAndGoToNextView: q,
|
|
2845
2839
|
focusedView: be
|
|
@@ -2851,13 +2845,13 @@ const Tr = De("MuiMultiSectionDigitalClockSection", ["root", "item"]), wo = ["au
|
|
|
2851
2845
|
onChange: Q,
|
|
2852
2846
|
focusedView: $,
|
|
2853
2847
|
onFocusedViewChange: I
|
|
2854
|
-
}), me = ae((
|
|
2855
|
-
q(
|
|
2848
|
+
}), me = ae((v) => {
|
|
2849
|
+
q(v, "finish", "meridiem");
|
|
2856
2850
|
}), {
|
|
2857
2851
|
meridiemMode: Z,
|
|
2858
2852
|
handleMeridiemChange: ke
|
|
2859
|
-
} = Ct(A, i, me, "finish"), re = p.useCallback((
|
|
2860
|
-
const T = _e(d, o), J = S === "hours" || S === "minutes" && j.includes("seconds"),
|
|
2853
|
+
} = Ct(A, i, me, "finish"), re = p.useCallback((v, S) => {
|
|
2854
|
+
const T = _e(d, o), J = S === "hours" || S === "minutes" && j.includes("seconds"), we = ({
|
|
2861
2855
|
start: Y,
|
|
2862
2856
|
end: se
|
|
2863
2857
|
}) => !(k && T(k, se) || y && T(Y, y) || P && T(Y, G) || M && T(G, J ? se : Y)), Ie = (Y, se = 1) => {
|
|
@@ -2878,34 +2872,34 @@ const Tr = De("MuiMultiSectionDigitalClockSection", ["root", "item"]), wo = ["au
|
|
|
2878
2872
|
};
|
|
2879
2873
|
switch (S) {
|
|
2880
2874
|
case "hours": {
|
|
2881
|
-
const Y = Oe(
|
|
2875
|
+
const Y = Oe(v, Z, i), se = o.setHours(A, Y);
|
|
2882
2876
|
if (o.getHours(se) !== Y)
|
|
2883
2877
|
return !0;
|
|
2884
2878
|
const Ee = o.setSeconds(o.setMinutes(se, 0), 0), At = o.setSeconds(o.setMinutes(se, 59), 59);
|
|
2885
|
-
return !
|
|
2879
|
+
return !we({
|
|
2886
2880
|
start: Ee,
|
|
2887
2881
|
end: At
|
|
2888
2882
|
}) || !Ie(Y);
|
|
2889
2883
|
}
|
|
2890
2884
|
case "minutes": {
|
|
2891
|
-
const Y = o.setMinutes(A,
|
|
2892
|
-
return !
|
|
2885
|
+
const Y = o.setMinutes(A, v), se = o.setSeconds(Y, 0), Ee = o.setSeconds(Y, 59);
|
|
2886
|
+
return !we({
|
|
2893
2887
|
start: se,
|
|
2894
2888
|
end: Ee
|
|
2895
|
-
}) || !Ie(
|
|
2889
|
+
}) || !Ie(v, V);
|
|
2896
2890
|
}
|
|
2897
2891
|
case "seconds": {
|
|
2898
|
-
const Y = o.setSeconds(A,
|
|
2899
|
-
return !
|
|
2892
|
+
const Y = o.setSeconds(A, v);
|
|
2893
|
+
return !we({
|
|
2900
2894
|
start: Y,
|
|
2901
2895
|
end: Y
|
|
2902
|
-
}) || !Ie(
|
|
2896
|
+
}) || !Ie(v);
|
|
2903
2897
|
}
|
|
2904
2898
|
default:
|
|
2905
2899
|
throw new Error("not supported");
|
|
2906
2900
|
}
|
|
2907
|
-
}, [i, A, d, y, Z, k, V, N, o, P, M, G, j]), ye = p.useCallback((
|
|
2908
|
-
switch (
|
|
2901
|
+
}, [i, A, d, y, Z, k, V, N, o, P, M, G, j]), ye = p.useCallback((v) => {
|
|
2902
|
+
switch (v) {
|
|
2909
2903
|
case "hours":
|
|
2910
2904
|
return {
|
|
2911
2905
|
onChange: (S) => {
|
|
@@ -2973,34 +2967,34 @@ const Tr = De("MuiMultiSectionDigitalClockSection", ["root", "item"]), wo = ["au
|
|
|
2973
2967
|
};
|
|
2974
2968
|
}
|
|
2975
2969
|
default:
|
|
2976
|
-
throw new Error(`Unknown view: ${
|
|
2970
|
+
throw new Error(`Unknown view: ${v} found.`);
|
|
2977
2971
|
}
|
|
2978
2972
|
}, [G, X, i, o, D.hours, D.minutes, D.seconds, z.hoursClockNumberText, z.minutesClockNumberText, z.secondsClockNumberText, Z, q, A, re, ke]), W = p.useMemo(() => {
|
|
2979
2973
|
if (!r)
|
|
2980
2974
|
return j;
|
|
2981
|
-
const
|
|
2982
|
-
return
|
|
2983
|
-
}, [r, j]), U = p.useMemo(() => j.reduce((
|
|
2975
|
+
const v = j.filter((S) => S !== "meridiem");
|
|
2976
|
+
return v.reverse(), j.includes("meridiem") && v.push("meridiem"), v;
|
|
2977
|
+
}, [r, j]), U = p.useMemo(() => j.reduce((v, S) => E({}, v, {
|
|
2984
2978
|
[S]: ye(S)
|
|
2985
|
-
}), {}), [j, ye]),
|
|
2986
|
-
return /* @__PURE__ */ C(Io,
|
|
2979
|
+
}), {}), [j, ye]), w = s, L = To(w);
|
|
2980
|
+
return /* @__PURE__ */ C(Io, E({
|
|
2987
2981
|
ref: n,
|
|
2988
2982
|
className: te(L.root, K),
|
|
2989
|
-
ownerState:
|
|
2983
|
+
ownerState: w,
|
|
2990
2984
|
role: "group"
|
|
2991
2985
|
}, ce, {
|
|
2992
|
-
children: W.map((
|
|
2993
|
-
items: U[
|
|
2994
|
-
onChange: U[
|
|
2995
|
-
active: ee ===
|
|
2996
|
-
autoFocus: l ?? be ===
|
|
2986
|
+
children: W.map((v) => /* @__PURE__ */ C(Do, {
|
|
2987
|
+
items: U[v].items,
|
|
2988
|
+
onChange: U[v].onChange,
|
|
2989
|
+
active: ee === v,
|
|
2990
|
+
autoFocus: l ?? be === v,
|
|
2997
2991
|
disabled: _,
|
|
2998
2992
|
readOnly: ne,
|
|
2999
2993
|
slots: c,
|
|
3000
2994
|
slotProps: f,
|
|
3001
2995
|
skipDisabled: oe,
|
|
3002
|
-
"aria-label": z.selectViewText(
|
|
3003
|
-
},
|
|
2996
|
+
"aria-label": z.selectViewText(v)
|
|
2997
|
+
}, v))
|
|
3004
2998
|
}));
|
|
3005
2999
|
});
|
|
3006
3000
|
process.env.NODE_ENV !== "production" && (Et.propTypes = {
|
|
@@ -3191,7 +3185,7 @@ const Ir = ({
|
|
|
3191
3185
|
ampmInClock: M,
|
|
3192
3186
|
slots: V,
|
|
3193
3187
|
slotProps: N,
|
|
3194
|
-
readOnly:
|
|
3188
|
+
readOnly: R,
|
|
3195
3189
|
disabled: H,
|
|
3196
3190
|
sx: h,
|
|
3197
3191
|
autoFocus: x,
|
|
@@ -3220,7 +3214,7 @@ const Ir = ({
|
|
|
3220
3214
|
ampmInClock: M,
|
|
3221
3215
|
slots: V,
|
|
3222
3216
|
slotProps: N,
|
|
3223
|
-
readOnly:
|
|
3217
|
+
readOnly: R,
|
|
3224
3218
|
disabled: H,
|
|
3225
3219
|
sx: h,
|
|
3226
3220
|
autoFocus: x,
|
|
@@ -3249,7 +3243,7 @@ const Ir = ({
|
|
|
3249
3243
|
slots: M,
|
|
3250
3244
|
slotProps: V,
|
|
3251
3245
|
readOnly: N,
|
|
3252
|
-
disabled:
|
|
3246
|
+
disabled: R,
|
|
3253
3247
|
sx: H,
|
|
3254
3248
|
autoFocus: h,
|
|
3255
3249
|
disableIgnoringDatePartForTimeValidation: x,
|
|
@@ -3278,7 +3272,7 @@ const Ir = ({
|
|
|
3278
3272
|
slots: M,
|
|
3279
3273
|
slotProps: V,
|
|
3280
3274
|
readOnly: N,
|
|
3281
|
-
disabled:
|
|
3275
|
+
disabled: R,
|
|
3282
3276
|
sx: H,
|
|
3283
3277
|
autoFocus: h,
|
|
3284
3278
|
disableIgnoringDatePartForTimeValidation: x,
|
|
@@ -3307,7 +3301,7 @@ const Ir = ({
|
|
|
3307
3301
|
slots: M,
|
|
3308
3302
|
slotProps: V,
|
|
3309
3303
|
readOnly: N,
|
|
3310
|
-
disabled:
|
|
3304
|
+
disabled: R,
|
|
3311
3305
|
sx: H,
|
|
3312
3306
|
autoFocus: h,
|
|
3313
3307
|
disableIgnoringDatePartForTimeValidation: x,
|
|
@@ -3336,7 +3330,7 @@ const Ir = ({
|
|
|
3336
3330
|
slots: M,
|
|
3337
3331
|
slotProps: V,
|
|
3338
3332
|
readOnly: N,
|
|
3339
|
-
disabled:
|
|
3333
|
+
disabled: R,
|
|
3340
3334
|
sx: H,
|
|
3341
3335
|
autoFocus: h,
|
|
3342
3336
|
disableIgnoringDatePartForTimeValidation: x,
|
|
@@ -3471,95 +3465,94 @@ function Or(e) {
|
|
|
3471
3465
|
return /* @__PURE__ */ C(Vo, { ...e });
|
|
3472
3466
|
}
|
|
3473
3467
|
export {
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3468
|
+
tr as $,
|
|
3469
|
+
We as A,
|
|
3470
|
+
yr as B,
|
|
3471
|
+
mr as C,
|
|
3478
3472
|
Jo as D,
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3473
|
+
hr as E,
|
|
3474
|
+
lr as F,
|
|
3475
|
+
ur as G,
|
|
3476
|
+
et as H,
|
|
3477
|
+
to as I,
|
|
3478
|
+
Xn as J,
|
|
3479
|
+
zt as K,
|
|
3480
|
+
Pt as L,
|
|
3487
3481
|
Or as M,
|
|
3488
|
-
|
|
3482
|
+
vr as N,
|
|
3489
3483
|
wr as O,
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3484
|
+
gr as P,
|
|
3485
|
+
Vt as Q,
|
|
3486
|
+
br as R,
|
|
3487
|
+
cr as S,
|
|
3488
|
+
Ne as T,
|
|
3489
|
+
Yo as U,
|
|
3490
|
+
Jt as V,
|
|
3491
|
+
Bo as W,
|
|
3492
|
+
Sr as X,
|
|
3493
|
+
ve as Y,
|
|
3494
|
+
Ze as Z,
|
|
3495
|
+
ie as _,
|
|
3502
3496
|
he as a,
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
Tr as az,
|
|
3497
|
+
sr as a0,
|
|
3498
|
+
pn as a1,
|
|
3499
|
+
Qe as a2,
|
|
3500
|
+
xt as a3,
|
|
3501
|
+
er as a4,
|
|
3502
|
+
_o as a5,
|
|
3503
|
+
Ko as a6,
|
|
3504
|
+
Xo as a7,
|
|
3505
|
+
dn as a8,
|
|
3506
|
+
Xe as a9,
|
|
3507
|
+
hn as aa,
|
|
3508
|
+
Ke as ab,
|
|
3509
|
+
Ue as ac,
|
|
3510
|
+
rr as ad,
|
|
3511
|
+
Go as ae,
|
|
3512
|
+
He as af,
|
|
3513
|
+
Mr as ag,
|
|
3514
|
+
or as ah,
|
|
3515
|
+
zo as ai,
|
|
3516
|
+
Kt as aj,
|
|
3517
|
+
Fo as ak,
|
|
3518
|
+
Dr as al,
|
|
3519
|
+
kr as am,
|
|
3520
|
+
Ct as an,
|
|
3521
|
+
xe as ao,
|
|
3522
|
+
Zo as ap,
|
|
3523
|
+
qo as aq,
|
|
3524
|
+
Nr as ar,
|
|
3525
|
+
jo as as,
|
|
3526
|
+
Ir as at,
|
|
3527
|
+
Wo as au,
|
|
3528
|
+
Uo as av,
|
|
3529
|
+
gn as aw,
|
|
3530
|
+
xr as ax,
|
|
3531
|
+
Tr as ay,
|
|
3532
|
+
Cr as az,
|
|
3540
3533
|
Qo as b,
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3534
|
+
Ge as c,
|
|
3535
|
+
wt as d,
|
|
3536
|
+
te as e,
|
|
3537
|
+
Me as f,
|
|
3545
3538
|
De as g,
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3539
|
+
nr as h,
|
|
3540
|
+
_e as i,
|
|
3541
|
+
qe as j,
|
|
3542
|
+
ae as k,
|
|
3543
|
+
Zn as l,
|
|
3544
|
+
dr as m,
|
|
3545
|
+
Qn as n,
|
|
3546
|
+
eo as o,
|
|
3547
|
+
Re as p,
|
|
3548
|
+
Be as q,
|
|
3556
3549
|
Vr as r,
|
|
3557
3550
|
ze as s,
|
|
3558
|
-
|
|
3551
|
+
yt as t,
|
|
3559
3552
|
ge as u,
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3553
|
+
Gn as v,
|
|
3554
|
+
ir as w,
|
|
3555
|
+
fr as x,
|
|
3556
|
+
pr as y,
|
|
3557
|
+
ar as z
|
|
3565
3558
|
};
|