@clearstory/drywall-react 5.1.0 → 5.2.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/{AdapterDayjs-DxEdpe9o.js → AdapterDayjs-BkUCTS9t.js} +1 -1
- package/dist/{Datepicker-BQ9gxoUL.js → Datepicker-CE6vashk.js} +779 -763
- package/dist/components/Datepicker/Datepicker.d.ts +1 -0
- package/dist/components/Datepicker/Datepicker.js +1 -1
- package/dist/components/Datepicker/index.js +2 -2
- package/dist/components/DatepickerControl/DatepickerControl.d.ts +1 -0
- package/dist/components/DatepickerControl/DatepickerControl.js +37 -35
- package/dist/main.js +2 -2
- package/package.json +2 -2
|
@@ -579,23 +579,23 @@ const es = {
|
|
|
579
579
|
InputLabelProps: m,
|
|
580
580
|
inputProps: P,
|
|
581
581
|
InputProps: S,
|
|
582
|
-
inputRef:
|
|
582
|
+
inputRef: x,
|
|
583
583
|
label: k,
|
|
584
|
-
maxRows:
|
|
584
|
+
maxRows: v,
|
|
585
585
|
minRows: A,
|
|
586
|
-
multiline:
|
|
587
|
-
name:
|
|
586
|
+
multiline: T = !1,
|
|
587
|
+
name: B,
|
|
588
588
|
onBlur: R,
|
|
589
|
-
onChange:
|
|
590
|
-
onFocus:
|
|
589
|
+
onChange: F,
|
|
590
|
+
onFocus: O,
|
|
591
591
|
placeholder: w,
|
|
592
|
-
required:
|
|
592
|
+
required: I = !1,
|
|
593
593
|
rows: V,
|
|
594
594
|
select: N = !1,
|
|
595
|
-
SelectProps:
|
|
596
|
-
slots:
|
|
595
|
+
SelectProps: L,
|
|
596
|
+
slots: M = {},
|
|
597
597
|
slotProps: Q = {},
|
|
598
|
-
type:
|
|
598
|
+
type: $,
|
|
599
599
|
value: re,
|
|
600
600
|
variant: W = "outlined",
|
|
601
601
|
...X
|
|
@@ -606,24 +606,24 @@ const es = {
|
|
|
606
606
|
disabled: d,
|
|
607
607
|
error: h,
|
|
608
608
|
fullWidth: b,
|
|
609
|
-
multiline:
|
|
610
|
-
required:
|
|
609
|
+
multiline: T,
|
|
610
|
+
required: I,
|
|
611
611
|
select: N,
|
|
612
612
|
variant: W
|
|
613
613
|
}, te = ts(ie);
|
|
614
614
|
process.env.NODE_ENV !== "production" && N && !i && console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");
|
|
615
615
|
const ue = Bt(D), oe = y && ue ? `${ue}-helper-text` : void 0, de = k && ue ? `${ue}-label` : void 0, he = es[W], ee = {
|
|
616
|
-
slots:
|
|
616
|
+
slots: M,
|
|
617
617
|
slotProps: {
|
|
618
618
|
input: S,
|
|
619
619
|
inputLabel: m,
|
|
620
620
|
htmlInput: P,
|
|
621
621
|
formHelperText: g,
|
|
622
|
-
select:
|
|
622
|
+
select: L,
|
|
623
623
|
...Q
|
|
624
624
|
}
|
|
625
625
|
}, U = {}, _ = ee.slotProps.inputLabel;
|
|
626
|
-
W === "outlined" && (_ && typeof _.shrink < "u" && (U.notched = _.shrink), U.label = k), N && ((!
|
|
626
|
+
W === "outlined" && (_ && typeof _.shrink < "u" && (U.notched = _.shrink), U.label = k), N && ((!L || !L.native) && (U.id = void 0), U["aria-describedby"] = void 0);
|
|
627
627
|
const [Y, ne] = ct("root", {
|
|
628
628
|
elementType: ns,
|
|
629
629
|
shouldForwardComponentProp: !0,
|
|
@@ -638,7 +638,7 @@ const es = {
|
|
|
638
638
|
disabled: d,
|
|
639
639
|
error: h,
|
|
640
640
|
fullWidth: b,
|
|
641
|
-
required:
|
|
641
|
+
required: I,
|
|
642
642
|
color: l,
|
|
643
643
|
variant: W
|
|
644
644
|
}
|
|
@@ -647,7 +647,7 @@ const es = {
|
|
|
647
647
|
externalForwardedProps: ee,
|
|
648
648
|
additionalProps: U,
|
|
649
649
|
ownerState: ie
|
|
650
|
-
}), [
|
|
650
|
+
}), [j, E] = ct("inputLabel", {
|
|
651
651
|
elementType: cn,
|
|
652
652
|
externalForwardedProps: ee,
|
|
653
653
|
ownerState: ie
|
|
@@ -669,28 +669,28 @@ const es = {
|
|
|
669
669
|
autoFocus: a,
|
|
670
670
|
defaultValue: u,
|
|
671
671
|
fullWidth: b,
|
|
672
|
-
multiline:
|
|
673
|
-
name:
|
|
672
|
+
multiline: T,
|
|
673
|
+
name: B,
|
|
674
674
|
rows: V,
|
|
675
|
-
maxRows:
|
|
675
|
+
maxRows: v,
|
|
676
676
|
minRows: A,
|
|
677
|
-
type:
|
|
677
|
+
type: $,
|
|
678
678
|
value: re,
|
|
679
679
|
id: ue,
|
|
680
|
-
inputRef:
|
|
680
|
+
inputRef: x,
|
|
681
681
|
onBlur: R,
|
|
682
|
-
onChange:
|
|
683
|
-
onFocus:
|
|
682
|
+
onChange: F,
|
|
683
|
+
onFocus: O,
|
|
684
684
|
placeholder: w,
|
|
685
685
|
inputProps: pe,
|
|
686
686
|
slots: {
|
|
687
|
-
input:
|
|
687
|
+
input: M.htmlInput ? G : void 0
|
|
688
688
|
},
|
|
689
689
|
...Z
|
|
690
690
|
});
|
|
691
691
|
return /* @__PURE__ */ ge(Y, {
|
|
692
692
|
...ne,
|
|
693
|
-
children: [k != null && k !== "" && /* @__PURE__ */ C(
|
|
693
|
+
children: [k != null && k !== "" && /* @__PURE__ */ C(j, {
|
|
694
694
|
htmlFor: ue,
|
|
695
695
|
id: de,
|
|
696
696
|
...E,
|
|
@@ -2232,11 +2232,11 @@ function ca(e) {
|
|
|
2232
2232
|
viewContainerRole: m
|
|
2233
2233
|
} = Fe();
|
|
2234
2234
|
f.useEffect(() => {
|
|
2235
|
-
function
|
|
2235
|
+
function M(Q) {
|
|
2236
2236
|
c && Q.key === "Escape" && g();
|
|
2237
2237
|
}
|
|
2238
|
-
return document.addEventListener("keydown",
|
|
2239
|
-
document.removeEventListener("keydown",
|
|
2238
|
+
return document.addEventListener("keydown", M), () => {
|
|
2239
|
+
document.removeEventListener("keydown", M);
|
|
2240
2240
|
};
|
|
2241
2241
|
}, [g, c]);
|
|
2242
2242
|
const P = f.useRef(null);
|
|
@@ -2245,13 +2245,13 @@ function ca(e) {
|
|
|
2245
2245
|
P.current instanceof HTMLElement && P.current.focus();
|
|
2246
2246
|
}));
|
|
2247
2247
|
}, [c, m, b, h]);
|
|
2248
|
-
const S = ra(i),
|
|
2248
|
+
const S = ra(i), x = H(() => {
|
|
2249
2249
|
m === "tooltip" ? ta(() => {
|
|
2250
2250
|
h.current?.contains(Ne(h.current)) || l.current?.contains(Ne(l.current)) || g();
|
|
2251
2251
|
}) : g();
|
|
2252
|
-
}), [k,
|
|
2253
|
-
|
|
2254
|
-
},
|
|
2252
|
+
}), [k, v, A] = la(c, x), T = f.useRef(null), B = Ve(T, l), R = Ve(B, k), F = (M) => {
|
|
2253
|
+
M.key === "Escape" && (M.stopPropagation(), g());
|
|
2254
|
+
}, O = s?.desktopTransition ?? u ? Lt : Nr, w = s?.desktopTrapFocus ?? Ar, I = s?.desktopPaper ?? aa, V = s?.popper ?? sa, N = me({
|
|
2255
2255
|
elementType: V,
|
|
2256
2256
|
externalSlotProps: a?.popper,
|
|
2257
2257
|
additionalProps: {
|
|
@@ -2260,16 +2260,16 @@ function ca(e) {
|
|
|
2260
2260
|
open: c,
|
|
2261
2261
|
placement: r,
|
|
2262
2262
|
anchorEl: D,
|
|
2263
|
-
onKeyDown:
|
|
2263
|
+
onKeyDown: F
|
|
2264
2264
|
},
|
|
2265
2265
|
className: S.root,
|
|
2266
2266
|
ownerState: d
|
|
2267
|
-
}),
|
|
2267
|
+
}), L = f.useMemo(() => p({}, d, {
|
|
2268
2268
|
popperPlacement: N.placement
|
|
2269
2269
|
}), [d, N.placement]);
|
|
2270
2270
|
return /* @__PURE__ */ C(V, p({}, N, {
|
|
2271
2271
|
children: ({
|
|
2272
|
-
TransitionProps:
|
|
2272
|
+
TransitionProps: M
|
|
2273
2273
|
}) => /* @__PURE__ */ C(w, p({
|
|
2274
2274
|
open: c,
|
|
2275
2275
|
disableAutoFocus: !0,
|
|
@@ -2277,15 +2277,15 @@ function ca(e) {
|
|
|
2277
2277
|
disableEnforceFocus: m === "tooltip",
|
|
2278
2278
|
isEnabled: () => !0
|
|
2279
2279
|
}, a?.desktopTrapFocus, {
|
|
2280
|
-
children: /* @__PURE__ */ C(
|
|
2280
|
+
children: /* @__PURE__ */ C(O, p({}, M, a?.desktopTransition, {
|
|
2281
2281
|
onExited: (Q) => {
|
|
2282
|
-
y?.(), a?.desktopTransition?.onExited?.(Q),
|
|
2282
|
+
y?.(), a?.desktopTransition?.onExited?.(Q), M?.onExited?.();
|
|
2283
2283
|
},
|
|
2284
2284
|
children: /* @__PURE__ */ C(No, {
|
|
2285
|
-
PaperComponent:
|
|
2286
|
-
ownerState:
|
|
2285
|
+
PaperComponent: I,
|
|
2286
|
+
ownerState: L,
|
|
2287
2287
|
ref: R,
|
|
2288
|
-
onPaperClick:
|
|
2288
|
+
onPaperClick: v,
|
|
2289
2289
|
onPaperTouchStart: A,
|
|
2290
2290
|
paperClasses: S.paper,
|
|
2291
2291
|
paperSlotProps: a?.desktopPaper,
|
|
@@ -2366,36 +2366,36 @@ function Bo({
|
|
|
2366
2366
|
f.useEffect(() => {
|
|
2367
2367
|
(u.current && u.current !== o || d.current && d.current.some((R) => !s.includes(R))) && (b(s.includes(o) ? o : s[0]), d.current = s, u.current = o);
|
|
2368
2368
|
}, [o, b, g, s]);
|
|
2369
|
-
const S = s.indexOf(g),
|
|
2370
|
-
m(
|
|
2369
|
+
const S = s.indexOf(g), x = s[S - 1] ?? null, k = s[S + 1] ?? null, v = H((R, F) => {
|
|
2370
|
+
m(F ? R : (O) => R === O ? null : O), c?.(R, F);
|
|
2371
2371
|
}), A = H((R) => {
|
|
2372
|
-
|
|
2373
|
-
}),
|
|
2372
|
+
v(R, !0), R !== g && (b(R), n && n(R));
|
|
2373
|
+
}), T = H(() => {
|
|
2374
2374
|
k && A(k);
|
|
2375
|
-
}),
|
|
2376
|
-
const w =
|
|
2375
|
+
}), B = H((R, F, O) => {
|
|
2376
|
+
const w = F === "finish", I = O ? (
|
|
2377
2377
|
// handles case like `DateTimePicker`, where a view might return a `finish` selection state
|
|
2378
2378
|
// but when it's not the final view given all `views` -> overall selection state should be `partial`.
|
|
2379
|
-
s.indexOf(
|
|
2379
|
+
s.indexOf(O) < s.length - 1
|
|
2380
2380
|
) : !!k;
|
|
2381
|
-
e(R, w &&
|
|
2381
|
+
e(R, w && I ? "partial" : F, O);
|
|
2382
2382
|
let N = null;
|
|
2383
|
-
if (
|
|
2383
|
+
if (O != null && O !== g ? N = O : w && (N = g), N == null)
|
|
2384
2384
|
return;
|
|
2385
|
-
const
|
|
2386
|
-
|
|
2385
|
+
const L = s[s.indexOf(N) + 1];
|
|
2386
|
+
L == null || !P.areViewsInSameStep(N, L) || A(L);
|
|
2387
2387
|
});
|
|
2388
2388
|
return p({}, P, {
|
|
2389
2389
|
view: g,
|
|
2390
2390
|
setView: A,
|
|
2391
2391
|
focusedView: D,
|
|
2392
|
-
setFocusedView:
|
|
2392
|
+
setFocusedView: v,
|
|
2393
2393
|
nextView: k,
|
|
2394
|
-
previousView:
|
|
2394
|
+
previousView: x,
|
|
2395
2395
|
// Always return up-to-date default view instead of the initial one (i.e. defaultView.current)
|
|
2396
2396
|
defaultView: s.includes(o) ? o : s[0],
|
|
2397
|
-
goToNextView:
|
|
2398
|
-
setValueAndGoToNextView:
|
|
2397
|
+
goToNextView: T,
|
|
2398
|
+
setValueAndGoToNextView: B
|
|
2399
2399
|
});
|
|
2400
2400
|
}
|
|
2401
2401
|
function to() {
|
|
@@ -2468,7 +2468,7 @@ function ma(e) {
|
|
|
2468
2468
|
}, [JSON.stringify(y)]));
|
|
2469
2469
|
const {
|
|
2470
2470
|
timezone: S,
|
|
2471
|
-
value:
|
|
2471
|
+
value: x,
|
|
2472
2472
|
handleValueChange: k
|
|
2473
2473
|
} = Ft({
|
|
2474
2474
|
name: "a picker component",
|
|
@@ -2478,36 +2478,36 @@ function ma(e) {
|
|
|
2478
2478
|
referenceDate: c,
|
|
2479
2479
|
onChange: i,
|
|
2480
2480
|
valueManager: o
|
|
2481
|
-
}), [
|
|
2481
|
+
}), [v, A] = f.useState(() => ({
|
|
2482
2482
|
open: !1,
|
|
2483
|
-
lastExternalValue:
|
|
2483
|
+
lastExternalValue: x,
|
|
2484
2484
|
clockShallowValue: void 0,
|
|
2485
|
-
lastCommittedValue:
|
|
2485
|
+
lastCommittedValue: x,
|
|
2486
2486
|
hasBeenModifiedSinceMount: !1
|
|
2487
2487
|
})), {
|
|
2488
|
-
getValidationErrorForNewValue:
|
|
2488
|
+
getValidationErrorForNewValue: T
|
|
2489
2489
|
} = Fo({
|
|
2490
2490
|
props: n,
|
|
2491
2491
|
validator: r,
|
|
2492
2492
|
timezone: S,
|
|
2493
|
-
value:
|
|
2493
|
+
value: x,
|
|
2494
2494
|
onError: n.onError
|
|
2495
|
-
}),
|
|
2496
|
-
const
|
|
2495
|
+
}), B = H((w) => {
|
|
2496
|
+
const I = typeof w == "function" ? w(v.open) : w;
|
|
2497
2497
|
m || A((V) => p({}, V, {
|
|
2498
|
-
open:
|
|
2499
|
-
})),
|
|
2500
|
-
}), R = H((w,
|
|
2498
|
+
open: I
|
|
2499
|
+
})), I && g && g(), I || b?.();
|
|
2500
|
+
}), R = H((w, I) => {
|
|
2501
2501
|
const {
|
|
2502
2502
|
changeImportance: V = "accept",
|
|
2503
2503
|
skipPublicationIfPristine: N = !1,
|
|
2504
|
-
validationError:
|
|
2505
|
-
shortcut:
|
|
2504
|
+
validationError: L,
|
|
2505
|
+
shortcut: M,
|
|
2506
2506
|
source: Q,
|
|
2507
|
-
shouldClose:
|
|
2508
|
-
} =
|
|
2507
|
+
shouldClose: $ = V === "accept"
|
|
2508
|
+
} = I ?? {};
|
|
2509
2509
|
let re, W;
|
|
2510
|
-
!N && !D && !
|
|
2510
|
+
!N && !D && !v.hasBeenModifiedSinceMount ? (re = !0, W = V === "accept") : (re = !o.areValuesEqual(P, w, x), W = V === "accept" && !o.areValuesEqual(P, w, v.lastCommittedValue)), A((te) => p({}, te, {
|
|
2511
2511
|
// We reset the shallow value whenever we fire onChange.
|
|
2512
2512
|
clockShallowValue: re ? void 0 : te.clockShallowValue,
|
|
2513
2513
|
lastCommittedValue: W ? w : te.lastCommittedValue,
|
|
@@ -2517,22 +2517,22 @@ function ma(e) {
|
|
|
2517
2517
|
const ie = () => {
|
|
2518
2518
|
if (!X) {
|
|
2519
2519
|
let te;
|
|
2520
|
-
Q ? te = Q :
|
|
2521
|
-
validationError:
|
|
2520
|
+
Q ? te = Q : M ? te = "view" : te = "unknown", X = {
|
|
2521
|
+
validationError: L ?? T(w),
|
|
2522
2522
|
source: te
|
|
2523
|
-
},
|
|
2523
|
+
}, M && (X.shortcut = M);
|
|
2524
2524
|
}
|
|
2525
2525
|
return X;
|
|
2526
2526
|
};
|
|
2527
|
-
re && k(w, ie()), W && u && u(w, ie()),
|
|
2527
|
+
re && k(w, ie()), W && u && u(w, ie()), $ && B(!1);
|
|
2528
2528
|
});
|
|
2529
|
-
|
|
2530
|
-
lastExternalValue:
|
|
2529
|
+
x !== v.lastExternalValue && A((w) => p({}, w, {
|
|
2530
|
+
lastExternalValue: x,
|
|
2531
2531
|
clockShallowValue: void 0,
|
|
2532
2532
|
hasBeenModifiedSinceMount: !0
|
|
2533
2533
|
}));
|
|
2534
|
-
const
|
|
2535
|
-
if (
|
|
2534
|
+
const F = H((w, I = "partial") => {
|
|
2535
|
+
if (I === "shallow") {
|
|
2536
2536
|
A((V) => p({}, V, {
|
|
2537
2537
|
clockShallowValue: w,
|
|
2538
2538
|
hasBeenModifiedSinceMount: !0
|
|
@@ -2540,7 +2540,7 @@ function ma(e) {
|
|
|
2540
2540
|
return;
|
|
2541
2541
|
}
|
|
2542
2542
|
R(w, {
|
|
2543
|
-
changeImportance:
|
|
2543
|
+
changeImportance: I === "finish" && d ? "accept" : "set",
|
|
2544
2544
|
source: "view"
|
|
2545
2545
|
});
|
|
2546
2546
|
});
|
|
@@ -2553,15 +2553,15 @@ function ma(e) {
|
|
|
2553
2553
|
}));
|
|
2554
2554
|
}
|
|
2555
2555
|
}, [m, h]);
|
|
2556
|
-
const
|
|
2556
|
+
const O = f.useMemo(() => o.cleanValue(P, v.clockShallowValue === void 0 ? x : v.clockShallowValue), [P, o, v.clockShallowValue, x]);
|
|
2557
2557
|
return {
|
|
2558
2558
|
timezone: S,
|
|
2559
|
-
state:
|
|
2559
|
+
state: v,
|
|
2560
2560
|
setValue: R,
|
|
2561
|
-
setValueFromView:
|
|
2562
|
-
setOpen:
|
|
2563
|
-
value:
|
|
2564
|
-
viewValue:
|
|
2561
|
+
setValueFromView: F,
|
|
2562
|
+
setOpen: B,
|
|
2563
|
+
value: x,
|
|
2564
|
+
viewValue: O
|
|
2565
2565
|
};
|
|
2566
2566
|
}
|
|
2567
2567
|
const ha = ["className", "sx"], $o = ({
|
|
@@ -2587,25 +2587,25 @@ const ha = ["className", "sx"], $o = ({
|
|
|
2587
2587
|
viewRenderers: m,
|
|
2588
2588
|
reduceAnimations: P,
|
|
2589
2589
|
orientation: S,
|
|
2590
|
-
disableOpenPicker:
|
|
2590
|
+
disableOpenPicker: x,
|
|
2591
2591
|
closeOnSelect: k,
|
|
2592
2592
|
// Form props
|
|
2593
|
-
disabled:
|
|
2593
|
+
disabled: v,
|
|
2594
2594
|
readOnly: A,
|
|
2595
2595
|
// Field props
|
|
2596
|
-
formatDensity:
|
|
2597
|
-
enableAccessibleFieldDOMStructure:
|
|
2596
|
+
formatDensity: T,
|
|
2597
|
+
enableAccessibleFieldDOMStructure: B,
|
|
2598
2598
|
selectedSections: R,
|
|
2599
|
-
onSelectedSectionsChange:
|
|
2600
|
-
format:
|
|
2599
|
+
onSelectedSectionsChange: F,
|
|
2600
|
+
format: O,
|
|
2601
2601
|
label: w,
|
|
2602
2602
|
// Other props
|
|
2603
|
-
autoFocus:
|
|
2603
|
+
autoFocus: I,
|
|
2604
2604
|
name: V
|
|
2605
2605
|
} = n, {
|
|
2606
2606
|
className: N,
|
|
2607
|
-
sx:
|
|
2608
|
-
} = n,
|
|
2607
|
+
sx: L
|
|
2608
|
+
} = n, M = J(n, ha), Q = Bt(), $ = be(), re = Ao(P), W = fa(g, S), {
|
|
2609
2609
|
current: X
|
|
2610
2610
|
} = f.useRef(y ?? null), [ie, te] = f.useState(null), ue = f.useRef(null), oe = f.useRef(null), de = f.useRef(null), he = Ve(e, de), {
|
|
2611
2611
|
timezone: ee,
|
|
@@ -2620,7 +2620,7 @@ const ha = ["className", "sx"], $o = ({
|
|
|
2620
2620
|
valueManager: o,
|
|
2621
2621
|
validator: a
|
|
2622
2622
|
}), {
|
|
2623
|
-
view:
|
|
2623
|
+
view: j,
|
|
2624
2624
|
setView: E,
|
|
2625
2625
|
defaultView: G,
|
|
2626
2626
|
focusedView: pe,
|
|
@@ -2639,7 +2639,7 @@ const ha = ["className", "sx"], $o = ({
|
|
|
2639
2639
|
getStepNavigation: h
|
|
2640
2640
|
}), Le = H(() => Y(o.emptyValue, {
|
|
2641
2641
|
source: "view"
|
|
2642
|
-
})), Ke = H(() => Y(o.getTodayValue(
|
|
2642
|
+
})), Ke = H(() => Y(o.getTodayValue($, ee, r), {
|
|
2643
2643
|
source: "view"
|
|
2644
2644
|
})), it = H(() => Y(z, {
|
|
2645
2645
|
source: "view"
|
|
@@ -2662,25 +2662,25 @@ const ha = ["className", "sx"], $o = ({
|
|
|
2662
2662
|
hasUIView: !1,
|
|
2663
2663
|
viewModeLookup: {},
|
|
2664
2664
|
timeViewsCount: 0
|
|
2665
|
-
}), [m, g]), Oe = fe[
|
|
2666
|
-
ve !==
|
|
2665
|
+
}), [m, g]), Oe = fe[j], Ie = H(() => Oe), [ve, je] = f.useState(Oe === "UI" ? j : null);
|
|
2666
|
+
ve !== j && fe[j] === "UI" && je(j), Ue(() => {
|
|
2667
2667
|
Oe === "field" && U.open && (_(!1), setTimeout(() => {
|
|
2668
|
-
oe?.current?.setSelectedSections(
|
|
2668
|
+
oe?.current?.setSelectedSections(j), oe?.current?.focusField(j);
|
|
2669
2669
|
}));
|
|
2670
|
-
}, [
|
|
2670
|
+
}, [j]), Ue(() => {
|
|
2671
2671
|
if (!U.open)
|
|
2672
2672
|
return;
|
|
2673
|
-
let Te =
|
|
2674
|
-
Oe === "field" && ve != null && (Te = ve), Te !== G && fe[Te] === "UI" && fe[G] === "UI" && (Te = G), Te !==
|
|
2673
|
+
let Te = j;
|
|
2674
|
+
Oe === "field" && ve != null && (Te = ve), Te !== G && fe[Te] === "UI" && fe[G] === "UI" && (Te = G), Te !== j && E(Te), K(Te, !0);
|
|
2675
2675
|
}, [U.open]);
|
|
2676
2676
|
const ce = f.useMemo(() => ({
|
|
2677
|
-
isPickerValueEmpty: o.areValuesEqual(
|
|
2677
|
+
isPickerValueEmpty: o.areValuesEqual($, z, o.emptyValue),
|
|
2678
2678
|
isPickerOpen: U.open,
|
|
2679
2679
|
isPickerDisabled: n.disabled ?? !1,
|
|
2680
2680
|
isPickerReadOnly: n.readOnly ?? !1,
|
|
2681
2681
|
pickerOrientation: W,
|
|
2682
2682
|
pickerVariant: s
|
|
2683
|
-
}), [
|
|
2683
|
+
}), [$, o, z, U.open, W, s, n.disabled, n.readOnly]), Re = f.useMemo(() => x || !le ? "hidden" : v || A ? "disabled" : "enabled", [x, le, v, A]), Ee = H(Se), Be = f.useMemo(() => k && !Me ? [] : ["cancel", "nextOrAccept"], [k, Me]), St = f.useMemo(() => ({
|
|
2684
2684
|
setValue: Y,
|
|
2685
2685
|
setOpen: _,
|
|
2686
2686
|
clearValue: Le,
|
|
@@ -2696,9 +2696,9 @@ const ha = ["className", "sx"], $o = ({
|
|
|
2696
2696
|
views: g,
|
|
2697
2697
|
view: ve,
|
|
2698
2698
|
initialView: X,
|
|
2699
|
-
disabled:
|
|
2699
|
+
disabled: v ?? !1,
|
|
2700
2700
|
readOnly: A ?? !1,
|
|
2701
|
-
autoFocus:
|
|
2701
|
+
autoFocus: I ?? !1,
|
|
2702
2702
|
variant: s,
|
|
2703
2703
|
orientation: W,
|
|
2704
2704
|
popupRef: ue,
|
|
@@ -2706,13 +2706,13 @@ const ha = ["className", "sx"], $o = ({
|
|
|
2706
2706
|
triggerRef: te,
|
|
2707
2707
|
triggerStatus: Re,
|
|
2708
2708
|
hasNextStep: Ce,
|
|
2709
|
-
fieldFormat:
|
|
2709
|
+
fieldFormat: O ?? "",
|
|
2710
2710
|
name: V,
|
|
2711
2711
|
label: w,
|
|
2712
|
-
rootSx:
|
|
2712
|
+
rootSx: L,
|
|
2713
2713
|
rootRef: he,
|
|
2714
2714
|
rootClassName: N
|
|
2715
|
-
}), [St, z, he, s, W, re,
|
|
2715
|
+
}), [St, z, he, s, W, re, v, A, O, N, V, w, L, Re, Ce, ee, U.open, ve, g, X, I]), br = f.useMemo(() => ({
|
|
2716
2716
|
dismissViews: ae,
|
|
2717
2717
|
ownerState: ce,
|
|
2718
2718
|
hasUIView: le,
|
|
@@ -2724,12 +2724,12 @@ const ha = ["className", "sx"], $o = ({
|
|
|
2724
2724
|
defaultActionBarActions: Be,
|
|
2725
2725
|
onPopperExited: i
|
|
2726
2726
|
}), [ae, ce, le, Ie, Q, ie, d, Be, i]), gr = f.useMemo(() => ({
|
|
2727
|
-
formatDensity:
|
|
2728
|
-
enableAccessibleFieldDOMStructure:
|
|
2727
|
+
formatDensity: T,
|
|
2728
|
+
enableAccessibleFieldDOMStructure: B,
|
|
2729
2729
|
selectedSections: R,
|
|
2730
|
-
onSelectedSectionsChange:
|
|
2730
|
+
onSelectedSectionsChange: F,
|
|
2731
2731
|
fieldRef: oe
|
|
2732
|
-
}), [
|
|
2732
|
+
}), [T, B, R, F, oe]);
|
|
2733
2733
|
return {
|
|
2734
2734
|
providerProps: {
|
|
2735
2735
|
localeText: u,
|
|
@@ -2739,7 +2739,7 @@ const ha = ["className", "sx"], $o = ({
|
|
|
2739
2739
|
fieldPrivateContextValue: gr,
|
|
2740
2740
|
isValidContextValue: (Te) => {
|
|
2741
2741
|
const Ge = a({
|
|
2742
|
-
adapter:
|
|
2742
|
+
adapter: $,
|
|
2743
2743
|
value: Te,
|
|
2744
2744
|
timezone: ee,
|
|
2745
2745
|
props: n
|
|
@@ -2753,7 +2753,7 @@ const ha = ["className", "sx"], $o = ({
|
|
|
2753
2753
|
const Te = m[ve];
|
|
2754
2754
|
if (Te == null)
|
|
2755
2755
|
return null;
|
|
2756
|
-
const Ge = p({},
|
|
2756
|
+
const Ge = p({}, M, {
|
|
2757
2757
|
views: g,
|
|
2758
2758
|
timezone: ee,
|
|
2759
2759
|
value: Z,
|
|
@@ -3002,22 +3002,22 @@ const xa = (e, n) => {
|
|
|
3002
3002
|
externalSlotProps: c?.toolbar,
|
|
3003
3003
|
className: d.toolbar,
|
|
3004
3004
|
ownerState: u
|
|
3005
|
-
}), P = Ca(m) && D ? /* @__PURE__ */ C(D, p({}, m)) : null, S = a,
|
|
3005
|
+
}), P = Ca(m) && D ? /* @__PURE__ */ C(D, p({}, m)) : null, S = a, x = i?.tabs, k = r && x ? /* @__PURE__ */ C(x, p({
|
|
3006
3006
|
className: d.tabs
|
|
3007
|
-
}, c?.tabs)) : null,
|
|
3008
|
-
elementType:
|
|
3007
|
+
}, c?.tabs)) : null, v = i?.shortcuts ?? Ho, A = me({
|
|
3008
|
+
elementType: v,
|
|
3009
3009
|
externalSlotProps: c?.shortcuts,
|
|
3010
3010
|
className: d.shortcuts,
|
|
3011
3011
|
ownerState: u
|
|
3012
|
-
}),
|
|
3012
|
+
}), T = Array.isArray(A?.items) && A.items.length > 0, B = r && v ? /* @__PURE__ */ C(v, p({}, A)) : null;
|
|
3013
3013
|
return {
|
|
3014
3014
|
toolbar: P,
|
|
3015
3015
|
content: S,
|
|
3016
3016
|
tabs: k,
|
|
3017
3017
|
actionBar: y,
|
|
3018
|
-
shortcuts:
|
|
3018
|
+
shortcuts: B,
|
|
3019
3019
|
ownerState: p({}, u, {
|
|
3020
|
-
hasShortcuts:
|
|
3020
|
+
hasShortcuts: T
|
|
3021
3021
|
})
|
|
3022
3022
|
};
|
|
3023
3023
|
}, ka = (e, n) => {
|
|
@@ -3212,16 +3212,16 @@ const Ia = ["props", "steps"], Ra = ["ownerState"], Ta = (e) => {
|
|
|
3212
3212
|
}),
|
|
3213
3213
|
ownerState: g
|
|
3214
3214
|
}), P = J(m, Ra), S = s.layout ?? qt;
|
|
3215
|
-
let
|
|
3216
|
-
y && (i ?
|
|
3215
|
+
let x = b;
|
|
3216
|
+
y && (i ? x = `${b}-label` : x = void 0);
|
|
3217
3217
|
const k = p({}, a, {
|
|
3218
3218
|
toolbar: p({}, a?.toolbar, {
|
|
3219
3219
|
titleId: b
|
|
3220
3220
|
}),
|
|
3221
3221
|
popper: p({
|
|
3222
|
-
"aria-labelledby":
|
|
3222
|
+
"aria-labelledby": x
|
|
3223
3223
|
}, a?.popper)
|
|
3224
|
-
}),
|
|
3224
|
+
}), v = () => /* @__PURE__ */ ge(vo, p({}, d, {
|
|
3225
3225
|
children: [/* @__PURE__ */ C(D, p({}, P, {
|
|
3226
3226
|
slots: p({}, s, P.slots),
|
|
3227
3227
|
slotProps: p({}, k, P.slotProps),
|
|
@@ -3236,8 +3236,8 @@ const Ia = ["props", "steps"], Ra = ["ownerState"], Ta = (e) => {
|
|
|
3236
3236
|
}))
|
|
3237
3237
|
})]
|
|
3238
3238
|
}));
|
|
3239
|
-
return process.env.NODE_ENV !== "production" && (
|
|
3240
|
-
renderPicker:
|
|
3239
|
+
return process.env.NODE_ENV !== "production" && (v.displayName = "renderPicker"), {
|
|
3240
|
+
renderPicker: v
|
|
3241
3241
|
};
|
|
3242
3242
|
}, ut = (e) => e.saveQuery != null, zo = ({
|
|
3243
3243
|
stateResponse: {
|
|
@@ -3258,13 +3258,13 @@ const Ia = ["props", "steps"], Ra = ["ownerState"], Ta = (e) => {
|
|
|
3258
3258
|
}, b, y) => {
|
|
3259
3259
|
const D = h.toLowerCase(), m = o.sections[g];
|
|
3260
3260
|
if (o.characterQuery != null && (!y || y(o.characterQuery.value)) && o.characterQuery.sectionIndex === g) {
|
|
3261
|
-
const S = `${o.characterQuery.value}${D}`,
|
|
3262
|
-
if (!ut(
|
|
3261
|
+
const S = `${o.characterQuery.value}${D}`, x = b(S, m);
|
|
3262
|
+
if (!ut(x))
|
|
3263
3263
|
return s({
|
|
3264
3264
|
sectionIndex: g,
|
|
3265
3265
|
value: S,
|
|
3266
3266
|
sectionType: m.type
|
|
3267
|
-
}),
|
|
3267
|
+
}), x;
|
|
3268
3268
|
}
|
|
3269
3269
|
const P = b(D, m);
|
|
3270
3270
|
return ut(P) && !P.saveQuery ? (s(null), null) : (s({
|
|
@@ -3274,7 +3274,7 @@ const Ia = ["props", "steps"], Ra = ["ownerState"], Ta = (e) => {
|
|
|
3274
3274
|
}), ut(P) ? null : P);
|
|
3275
3275
|
}, u = (h) => {
|
|
3276
3276
|
const g = (D, m, P) => {
|
|
3277
|
-
const S = m.filter((
|
|
3277
|
+
const S = m.filter((x) => x.toLowerCase().startsWith(P));
|
|
3278
3278
|
return S.length === 0 ? {
|
|
3279
3279
|
saveQuery: !1
|
|
3280
3280
|
} : {
|
|
@@ -3282,15 +3282,15 @@ const Ia = ["props", "steps"], Ra = ["ownerState"], Ta = (e) => {
|
|
|
3282
3282
|
shouldGoToNextSection: S.length === 1
|
|
3283
3283
|
};
|
|
3284
3284
|
}, b = (D, m, P, S) => {
|
|
3285
|
-
const
|
|
3285
|
+
const x = (k) => wo(c, r, m.type, k);
|
|
3286
3286
|
if (m.contentType === "letter")
|
|
3287
|
-
return g(m.format,
|
|
3287
|
+
return g(m.format, x(m.format), D);
|
|
3288
3288
|
if (P && S != null && fn(c, P).contentType === "letter") {
|
|
3289
|
-
const k =
|
|
3290
|
-
return ut(
|
|
3289
|
+
const k = x(P), v = g(P, k, D);
|
|
3290
|
+
return ut(v) ? {
|
|
3291
3291
|
saveQuery: !1
|
|
3292
|
-
} : p({},
|
|
3293
|
-
sectionValue: S(
|
|
3292
|
+
} : p({}, v, {
|
|
3293
|
+
sectionValue: S(v.sectionValue, k)
|
|
3294
3294
|
});
|
|
3295
3295
|
}
|
|
3296
3296
|
return {
|
|
@@ -3304,7 +3304,7 @@ const Ia = ["props", "steps"], Ra = ["ownerState"], Ta = (e) => {
|
|
|
3304
3304
|
return b(D, m, c.formats.month, P);
|
|
3305
3305
|
}
|
|
3306
3306
|
case "weekDay": {
|
|
3307
|
-
const P = (S,
|
|
3307
|
+
const P = (S, x) => x.indexOf(S).toString();
|
|
3308
3308
|
return b(D, m, c.formats.weekday, P);
|
|
3309
3309
|
}
|
|
3310
3310
|
case "meridiem":
|
|
@@ -3321,22 +3321,22 @@ const Ia = ["props", "steps"], Ra = ["ownerState"], Ta = (e) => {
|
|
|
3321
3321
|
skipIfBelowMinimum: D,
|
|
3322
3322
|
section: m
|
|
3323
3323
|
}) => {
|
|
3324
|
-
const P = rt(y, e), S = Number(P),
|
|
3324
|
+
const P = rt(y, e), S = Number(P), x = n[m.type]({
|
|
3325
3325
|
currentDate: null,
|
|
3326
3326
|
format: m.format,
|
|
3327
3327
|
contentType: m.contentType
|
|
3328
3328
|
});
|
|
3329
|
-
if (S >
|
|
3329
|
+
if (S > x.maximum)
|
|
3330
3330
|
return {
|
|
3331
3331
|
saveQuery: !1
|
|
3332
3332
|
};
|
|
3333
|
-
if (D && S <
|
|
3333
|
+
if (D && S < x.minimum)
|
|
3334
3334
|
return {
|
|
3335
3335
|
saveQuery: !0
|
|
3336
3336
|
};
|
|
3337
|
-
const k = S * 10 >
|
|
3337
|
+
const k = S * 10 > x.maximum || P.length === x.maximum.toString().length;
|
|
3338
3338
|
return {
|
|
3339
|
-
sectionValue: Do(c, S,
|
|
3339
|
+
sectionValue: Do(c, S, x, e, m),
|
|
3340
3340
|
shouldGoToNextSection: k
|
|
3341
3341
|
};
|
|
3342
3342
|
};
|
|
@@ -3419,15 +3419,15 @@ const Ia = ["props", "steps"], Ra = ["ownerState"], Ta = (e) => {
|
|
|
3419
3419
|
onSelectedSectionsChange: m,
|
|
3420
3420
|
shouldRespectLeadingZeros: P = !1,
|
|
3421
3421
|
timezone: S,
|
|
3422
|
-
enableAccessibleFieldDOMStructure:
|
|
3422
|
+
enableAccessibleFieldDOMStructure: x = !0
|
|
3423
3423
|
},
|
|
3424
3424
|
forwardedProps: {
|
|
3425
3425
|
error: k
|
|
3426
3426
|
}
|
|
3427
3427
|
} = e, {
|
|
3428
|
-
value:
|
|
3428
|
+
value: v,
|
|
3429
3429
|
handleValueChange: A,
|
|
3430
|
-
timezone:
|
|
3430
|
+
timezone: T
|
|
3431
3431
|
} = Ft({
|
|
3432
3432
|
name: "a field component",
|
|
3433
3433
|
timezone: S,
|
|
@@ -3436,34 +3436,34 @@ const Ia = ["props", "steps"], Ra = ["ownerState"], Ta = (e) => {
|
|
|
3436
3436
|
referenceDate: h,
|
|
3437
3437
|
onChange: g,
|
|
3438
3438
|
valueManager: i
|
|
3439
|
-
}),
|
|
3439
|
+
}), B = f.useRef(v);
|
|
3440
3440
|
f.useEffect(() => {
|
|
3441
|
-
|
|
3442
|
-
}, [
|
|
3441
|
+
B.current = v;
|
|
3442
|
+
}, [v]);
|
|
3443
3443
|
const {
|
|
3444
3444
|
hasValidationError: R
|
|
3445
3445
|
} = Fo({
|
|
3446
3446
|
props: l,
|
|
3447
3447
|
validator: s,
|
|
3448
|
-
timezone:
|
|
3449
|
-
value:
|
|
3448
|
+
timezone: T,
|
|
3449
|
+
value: v,
|
|
3450
3450
|
onError: l.onError
|
|
3451
|
-
}),
|
|
3451
|
+
}), F = f.useMemo(() => bs(n), [n]), O = f.useMemo(() => ws(n, F, T), [n, F, T]), w = f.useCallback((E) => c.getSectionsFromValue(E, (G) => Zn({
|
|
3452
3452
|
adapter: n,
|
|
3453
3453
|
localeText: o,
|
|
3454
|
-
localizedDigits:
|
|
3454
|
+
localizedDigits: F,
|
|
3455
3455
|
format: b,
|
|
3456
3456
|
date: G,
|
|
3457
3457
|
formatDensity: y,
|
|
3458
3458
|
shouldRespectLeadingZeros: P,
|
|
3459
|
-
enableAccessibleFieldDOMStructure:
|
|
3459
|
+
enableAccessibleFieldDOMStructure: x,
|
|
3460
3460
|
isRtl: r
|
|
3461
|
-
})), [c, b, o,
|
|
3462
|
-
const E = w(
|
|
3461
|
+
})), [c, b, o, F, r, P, n, y, x]), [I, V] = f.useState(() => {
|
|
3462
|
+
const E = w(v);
|
|
3463
3463
|
Gn(E, a);
|
|
3464
3464
|
const G = {
|
|
3465
3465
|
sections: E,
|
|
3466
|
-
lastExternalValue:
|
|
3466
|
+
lastExternalValue: v,
|
|
3467
3467
|
lastSectionsDependencies: {
|
|
3468
3468
|
format: b,
|
|
3469
3469
|
isRtl: r,
|
|
@@ -3473,52 +3473,52 @@ const Ia = ["props", "steps"], Ra = ["ownerState"], Ta = (e) => {
|
|
|
3473
3473
|
characterQuery: null
|
|
3474
3474
|
}, pe = fs(E), K = i.getInitialReferenceValue({
|
|
3475
3475
|
referenceDate: h,
|
|
3476
|
-
value:
|
|
3476
|
+
value: v,
|
|
3477
3477
|
adapter: n,
|
|
3478
3478
|
props: l,
|
|
3479
3479
|
granularity: pe,
|
|
3480
|
-
timezone:
|
|
3480
|
+
timezone: T
|
|
3481
3481
|
});
|
|
3482
3482
|
return p({}, G, {
|
|
3483
3483
|
referenceValue: K
|
|
3484
3484
|
});
|
|
3485
|
-
}), [N,
|
|
3485
|
+
}), [N, L] = bt({
|
|
3486
3486
|
controlled: D,
|
|
3487
3487
|
default: null,
|
|
3488
3488
|
name: "useField",
|
|
3489
3489
|
state: "selectedSections"
|
|
3490
|
-
}),
|
|
3491
|
-
|
|
3492
|
-
}, Q = f.useMemo(() => on(N,
|
|
3493
|
-
if (
|
|
3490
|
+
}), M = (E) => {
|
|
3491
|
+
L(E), m?.(E);
|
|
3492
|
+
}, Q = f.useMemo(() => on(N, I.sections), [N, I.sections]), $ = Q === "all" ? 0 : Q, re = f.useMemo(() => xs(I.sections, r && !x), [I.sections, r, x]), W = f.useMemo(() => I.sections.every((E) => E.value === ""), [I.sections]), X = f.useMemo(() => {
|
|
3493
|
+
if ($ != null)
|
|
3494
3494
|
return !1;
|
|
3495
|
-
const E =
|
|
3496
|
-
return E.length > 0 &&
|
|
3497
|
-
}, [
|
|
3495
|
+
const E = I.sections.filter((G) => G.value !== "");
|
|
3496
|
+
return E.length > 0 && I.sections.length - E.length > 0;
|
|
3497
|
+
}, [I.sections, $]), ie = f.useMemo(() => k !== void 0 ? k : R || X, [R, X, k]), te = (E) => {
|
|
3498
3498
|
const G = {
|
|
3499
3499
|
validationError: s({
|
|
3500
3500
|
adapter: n,
|
|
3501
3501
|
value: E,
|
|
3502
|
-
timezone:
|
|
3502
|
+
timezone: T,
|
|
3503
3503
|
props: l
|
|
3504
3504
|
})
|
|
3505
3505
|
};
|
|
3506
3506
|
A(E, G);
|
|
3507
3507
|
}, ue = (E, G) => {
|
|
3508
|
-
const pe = [...
|
|
3508
|
+
const pe = [...I.sections];
|
|
3509
3509
|
return pe[E] = p({}, pe[E], {
|
|
3510
3510
|
value: G,
|
|
3511
3511
|
modified: !0
|
|
3512
3512
|
}), pe;
|
|
3513
3513
|
}, oe = f.useRef(null), de = ft(), he = (E) => {
|
|
3514
|
-
|
|
3515
|
-
sectionIndex:
|
|
3514
|
+
$ != null && (oe.current = {
|
|
3515
|
+
sectionIndex: $,
|
|
3516
3516
|
value: E
|
|
3517
3517
|
}, de.start(0, () => {
|
|
3518
3518
|
oe.current = null;
|
|
3519
3519
|
}));
|
|
3520
3520
|
}, ee = () => {
|
|
3521
|
-
i.areValuesEqual(n,
|
|
3521
|
+
i.areValuesEqual(n, v, i.emptyValue) ? V((E) => p({}, E, {
|
|
3522
3522
|
sections: E.sections.map((G) => p({}, G, {
|
|
3523
3523
|
value: ""
|
|
3524
3524
|
})),
|
|
@@ -3528,16 +3528,16 @@ const Ia = ["props", "steps"], Ra = ["ownerState"], Ta = (e) => {
|
|
|
3528
3528
|
characterQuery: null
|
|
3529
3529
|
})), te(i.emptyValue));
|
|
3530
3530
|
}, U = () => {
|
|
3531
|
-
if (
|
|
3531
|
+
if ($ == null)
|
|
3532
3532
|
return;
|
|
3533
|
-
const E =
|
|
3534
|
-
E.value !== "" && (he(""), c.getDateFromSection(
|
|
3535
|
-
sections: ue(
|
|
3533
|
+
const E = I.sections[$];
|
|
3534
|
+
E.value !== "" && (he(""), c.getDateFromSection(v, E) === null ? V((G) => p({}, G, {
|
|
3535
|
+
sections: ue($, ""),
|
|
3536
3536
|
tempValueStrAndroid: null,
|
|
3537
3537
|
characterQuery: null
|
|
3538
3538
|
})) : (V((G) => p({}, G, {
|
|
3539
3539
|
characterQuery: null
|
|
3540
|
-
})), te(c.updateDateInValue(
|
|
3540
|
+
})), te(c.updateDateInValue(v, E, null))));
|
|
3541
3541
|
}, _ = (E) => {
|
|
3542
3542
|
const G = (K, se) => {
|
|
3543
3543
|
const Se = n.parse(K, b);
|
|
@@ -3546,16 +3546,16 @@ const Ia = ["props", "steps"], Ra = ["ownerState"], Ta = (e) => {
|
|
|
3546
3546
|
const Ce = Zn({
|
|
3547
3547
|
adapter: n,
|
|
3548
3548
|
localeText: o,
|
|
3549
|
-
localizedDigits:
|
|
3549
|
+
localizedDigits: F,
|
|
3550
3550
|
format: b,
|
|
3551
3551
|
date: Se,
|
|
3552
3552
|
formatDensity: y,
|
|
3553
3553
|
shouldRespectLeadingZeros: P,
|
|
3554
|
-
enableAccessibleFieldDOMStructure:
|
|
3554
|
+
enableAccessibleFieldDOMStructure: x,
|
|
3555
3555
|
isRtl: r
|
|
3556
3556
|
});
|
|
3557
3557
|
return Xn(n, Se, Ce, se, !1);
|
|
3558
|
-
}, pe = c.parseValueStr(E,
|
|
3558
|
+
}, pe = c.parseValueStr(E, I.referenceValue, G);
|
|
3559
3559
|
te(pe);
|
|
3560
3560
|
}, Y = ft(), ne = ({
|
|
3561
3561
|
section: E,
|
|
@@ -3563,19 +3563,19 @@ const Ia = ["props", "steps"], Ra = ["ownerState"], Ta = (e) => {
|
|
|
3563
3563
|
shouldGoToNextSection: pe
|
|
3564
3564
|
}) => {
|
|
3565
3565
|
de.clear(), Y.clear();
|
|
3566
|
-
const K = c.getDateFromSection(
|
|
3567
|
-
pe &&
|
|
3568
|
-
const se = ue(
|
|
3566
|
+
const K = c.getDateFromSection(v, E);
|
|
3567
|
+
pe && $ < I.sections.length - 1 && M($ + 1);
|
|
3568
|
+
const se = ue($, G), Se = c.getDateSectionsFromValue(se, E), Ce = ys(n, Se, F);
|
|
3569
3569
|
if (n.isValid(Ce)) {
|
|
3570
|
-
const Me = Xn(n, Ce, Se, c.getDateFromSection(
|
|
3570
|
+
const Me = Xn(n, Ce, Se, c.getDateFromSection(I.referenceValue, E), !0);
|
|
3571
3571
|
return K == null && Y.start(0, () => {
|
|
3572
|
-
|
|
3573
|
-
sections: c.clearDateSections(
|
|
3572
|
+
B.current === v && V((Le) => p({}, Le, {
|
|
3573
|
+
sections: c.clearDateSections(I.sections, E),
|
|
3574
3574
|
tempValueStrAndroid: null
|
|
3575
3575
|
}));
|
|
3576
|
-
}), te(c.updateDateInValue(
|
|
3576
|
+
}), te(c.updateDateInValue(v, E, Me));
|
|
3577
3577
|
}
|
|
3578
|
-
return Se.every((Me) => Me.value !== "") && (K == null || n.isValid(K)) ? (he(G), te(c.updateDateInValue(
|
|
3578
|
+
return Se.every((Me) => Me.value !== "") && (K == null || n.isValid(K)) ? (he(G), te(c.updateDateInValue(v, E, Ce))) : (K != null && (he(G), te(c.updateDateInValue(v, E, Ce))), V((Me) => p({}, Me, {
|
|
3579
3579
|
sections: se,
|
|
3580
3580
|
tempValueStrAndroid: null
|
|
3581
3581
|
})));
|
|
@@ -3586,23 +3586,23 @@ const Ia = ["props", "steps"], Ra = ["ownerState"], Ta = (e) => {
|
|
|
3586
3586
|
characterQuery: E
|
|
3587
3587
|
}));
|
|
3588
3588
|
});
|
|
3589
|
-
if (
|
|
3590
|
-
const E = oe.current != null && !n.isValid(c.getDateFromSection(
|
|
3589
|
+
if (v !== I.lastExternalValue) {
|
|
3590
|
+
const E = oe.current != null && !n.isValid(c.getDateFromSection(v, I.sections[oe.current.sectionIndex]));
|
|
3591
3591
|
let G;
|
|
3592
|
-
E ? G = ue(oe.current.sectionIndex, oe.current.value) : G = w(
|
|
3593
|
-
lastExternalValue:
|
|
3592
|
+
E ? G = ue(oe.current.sectionIndex, oe.current.value) : G = w(v), V((pe) => p({}, pe, {
|
|
3593
|
+
lastExternalValue: v,
|
|
3594
3594
|
sections: G,
|
|
3595
3595
|
sectionsDependencies: {
|
|
3596
3596
|
format: b,
|
|
3597
3597
|
isRtl: r,
|
|
3598
3598
|
locale: n.locale
|
|
3599
3599
|
},
|
|
3600
|
-
referenceValue: E ? pe.referenceValue : c.updateReferenceValue(n,
|
|
3600
|
+
referenceValue: E ? pe.referenceValue : c.updateReferenceValue(n, v, pe.referenceValue),
|
|
3601
3601
|
tempValueStrAndroid: null
|
|
3602
3602
|
}));
|
|
3603
3603
|
}
|
|
3604
|
-
if (r !==
|
|
3605
|
-
const E = w(
|
|
3604
|
+
if (r !== I.lastSectionsDependencies.isRtl || b !== I.lastSectionsDependencies.format || n.locale !== I.lastSectionsDependencies.locale) {
|
|
3605
|
+
const E = w(v);
|
|
3606
3606
|
Gn(E, a), V((G) => p({}, G, {
|
|
3607
3607
|
lastSectionsDependencies: {
|
|
3608
3608
|
format: b,
|
|
@@ -3614,30 +3614,30 @@ const Ia = ["props", "steps"], Ra = ["ownerState"], Ta = (e) => {
|
|
|
3614
3614
|
characterQuery: null
|
|
3615
3615
|
}));
|
|
3616
3616
|
}
|
|
3617
|
-
|
|
3617
|
+
I.characterQuery != null && !ie && $ == null && Z(null), I.characterQuery != null && I.sections[I.characterQuery.sectionIndex]?.type !== I.characterQuery.sectionType && Z(null), f.useEffect(() => {
|
|
3618
3618
|
oe.current != null && (oe.current = null);
|
|
3619
3619
|
});
|
|
3620
|
-
const
|
|
3621
|
-
return f.useEffect(() => (
|
|
3622
|
-
}), [
|
|
3623
|
-
|
|
3624
|
-
}, [
|
|
3620
|
+
const j = ft();
|
|
3621
|
+
return f.useEffect(() => (I.characterQuery != null && j.start(Fa, () => Z(null)), () => {
|
|
3622
|
+
}), [I.characterQuery, Z, j]), f.useEffect(() => {
|
|
3623
|
+
I.tempValueStrAndroid != null && $ != null && U();
|
|
3624
|
+
}, [I.sections]), {
|
|
3625
3625
|
// States and derived states
|
|
3626
|
-
activeSectionIndex:
|
|
3626
|
+
activeSectionIndex: $,
|
|
3627
3627
|
areAllSectionsEmpty: W,
|
|
3628
3628
|
error: ie,
|
|
3629
|
-
localizedDigits:
|
|
3629
|
+
localizedDigits: F,
|
|
3630
3630
|
parsedSelectedSections: Q,
|
|
3631
3631
|
sectionOrder: re,
|
|
3632
|
-
sectionsValueBoundaries:
|
|
3633
|
-
state:
|
|
3634
|
-
timezone:
|
|
3635
|
-
value:
|
|
3632
|
+
sectionsValueBoundaries: O,
|
|
3633
|
+
state: I,
|
|
3634
|
+
timezone: T,
|
|
3635
|
+
value: v,
|
|
3636
3636
|
// Methods to update the states
|
|
3637
3637
|
clearValue: ee,
|
|
3638
3638
|
clearActiveSection: U,
|
|
3639
3639
|
setCharacterQuery: Z,
|
|
3640
|
-
setSelectedSections:
|
|
3640
|
+
setSelectedSections: M,
|
|
3641
3641
|
setTempAndroidValueStr: z,
|
|
3642
3642
|
updateSectionValue: ne,
|
|
3643
3643
|
updateValueFromValueStr: _,
|
|
@@ -3740,8 +3740,8 @@ function Ko(e) {
|
|
|
3740
3740
|
else if (u === "all")
|
|
3741
3741
|
m(b.endIndex);
|
|
3742
3742
|
else {
|
|
3743
|
-
const
|
|
3744
|
-
|
|
3743
|
+
const x = b.neighbors[u].rightIndex;
|
|
3744
|
+
x !== null && m(x);
|
|
3745
3745
|
}
|
|
3746
3746
|
break;
|
|
3747
3747
|
}
|
|
@@ -3752,8 +3752,8 @@ function Ko(e) {
|
|
|
3752
3752
|
else if (u === "all")
|
|
3753
3753
|
m(b.startIndex);
|
|
3754
3754
|
else {
|
|
3755
|
-
const
|
|
3756
|
-
|
|
3755
|
+
const x = b.neighbors[u].leftIndex;
|
|
3756
|
+
x !== null && m(x);
|
|
3757
3757
|
}
|
|
3758
3758
|
break;
|
|
3759
3759
|
}
|
|
@@ -3769,11 +3769,11 @@ function Ko(e) {
|
|
|
3769
3769
|
if (S.preventDefault(), a || l == null)
|
|
3770
3770
|
break;
|
|
3771
3771
|
u === "all" && m(l);
|
|
3772
|
-
const
|
|
3772
|
+
const x = i.sections[l], k = Ea(n, g, x, S.key, d, h, o.getDateFromSection(c, x), {
|
|
3773
3773
|
minutesStep: r
|
|
3774
3774
|
});
|
|
3775
3775
|
P({
|
|
3776
|
-
section:
|
|
3776
|
+
section: x,
|
|
3777
3777
|
newSectionValue: k,
|
|
3778
3778
|
shouldGoToNextSection: !1
|
|
3779
3779
|
});
|
|
@@ -3850,59 +3850,59 @@ function Na(e) {
|
|
|
3850
3850
|
manager: n,
|
|
3851
3851
|
internalPropsWithDefaults: c,
|
|
3852
3852
|
stateResponse: a
|
|
3853
|
-
}), S = ft(),
|
|
3853
|
+
}), S = ft(), x = H((B) => {
|
|
3854
3854
|
D || !s.isReady() || (r(!0), l === "all" ? S.start(0, () => {
|
|
3855
3855
|
const R = document.getSelection().getRangeAt(0).startOffset;
|
|
3856
3856
|
if (R === 0) {
|
|
3857
3857
|
b(u.startIndex);
|
|
3858
3858
|
return;
|
|
3859
3859
|
}
|
|
3860
|
-
let
|
|
3861
|
-
for (;
|
|
3862
|
-
const w = d.sections[
|
|
3863
|
-
|
|
3860
|
+
let F = 0, O = 0;
|
|
3861
|
+
for (; O < R && F < d.sections.length; ) {
|
|
3862
|
+
const w = d.sections[F];
|
|
3863
|
+
F += 1, O += `${w.startSeparator}${w.value || w.placeholder}${w.endSeparator}`.length;
|
|
3864
3864
|
}
|
|
3865
|
-
b(
|
|
3866
|
-
}) : o ? s.getRoot().contains(
|
|
3867
|
-
}), k = H((
|
|
3865
|
+
b(F - 1);
|
|
3866
|
+
}) : o ? s.getRoot().contains(B.target) || b(u.startIndex) : (r(!0), b(u.startIndex)));
|
|
3867
|
+
}), k = H((B) => {
|
|
3868
3868
|
if (!s.isReady() || l !== "all")
|
|
3869
3869
|
return;
|
|
3870
|
-
const
|
|
3871
|
-
s.getRoot().innerHTML = d.sections.map((
|
|
3870
|
+
const F = B.target.textContent ?? "";
|
|
3871
|
+
s.getRoot().innerHTML = d.sections.map((O) => `${O.startSeparator}${O.value || O.placeholder}${O.endSeparator}`).join(""), vn({
|
|
3872
3872
|
focused: o,
|
|
3873
3873
|
domGetters: s,
|
|
3874
3874
|
stateResponse: a
|
|
3875
|
-
}),
|
|
3876
|
-
keyPressed:
|
|
3875
|
+
}), F.length === 0 || F.charCodeAt(0) === 10 ? (h(), b("all")) : F.length > 1 ? y(F) : (l === "all" && b(0), i({
|
|
3876
|
+
keyPressed: F,
|
|
3877
3877
|
sectionIndex: 0
|
|
3878
3878
|
}));
|
|
3879
|
-
}),
|
|
3879
|
+
}), v = H((B) => {
|
|
3880
3880
|
if (m || l !== "all") {
|
|
3881
|
-
|
|
3881
|
+
B.preventDefault();
|
|
3882
3882
|
return;
|
|
3883
3883
|
}
|
|
3884
|
-
const R =
|
|
3885
|
-
|
|
3884
|
+
const R = B.clipboardData.getData("text");
|
|
3885
|
+
B.preventDefault(), g(null), y(R);
|
|
3886
3886
|
}), A = H(() => {
|
|
3887
3887
|
if (o || D || !s.isReady())
|
|
3888
3888
|
return;
|
|
3889
|
-
const
|
|
3890
|
-
r(!0), s.getSectionIndexFromDOMElement(
|
|
3891
|
-
}),
|
|
3889
|
+
const B = Ne(s.getRoot());
|
|
3890
|
+
r(!0), s.getSectionIndexFromDOMElement(B) != null || b(u.startIndex);
|
|
3891
|
+
}), T = H(() => {
|
|
3892
3892
|
setTimeout(() => {
|
|
3893
3893
|
if (!s.isReady())
|
|
3894
3894
|
return;
|
|
3895
|
-
const
|
|
3896
|
-
!s.getRoot().contains(
|
|
3895
|
+
const B = Ne(s.getRoot());
|
|
3896
|
+
!s.getRoot().contains(B) && (r(!1), b(null));
|
|
3897
3897
|
});
|
|
3898
3898
|
});
|
|
3899
3899
|
return {
|
|
3900
3900
|
// Event handlers
|
|
3901
3901
|
onKeyDown: P,
|
|
3902
|
-
onBlur:
|
|
3902
|
+
onBlur: T,
|
|
3903
3903
|
onFocus: A,
|
|
3904
|
-
onClick:
|
|
3905
|
-
onPaste:
|
|
3904
|
+
onClick: x,
|
|
3905
|
+
onPaste: v,
|
|
3906
3906
|
onInput: k,
|
|
3907
3907
|
// Other
|
|
3908
3908
|
contentEditable: l === "all",
|
|
@@ -3973,91 +3973,91 @@ function Ba(e) {
|
|
|
3973
3973
|
disabled: P = !1,
|
|
3974
3974
|
readOnly: S = !1
|
|
3975
3975
|
}
|
|
3976
|
-
} = e,
|
|
3976
|
+
} = e, x = l === "all", k = !x && !P && !S, v = H((O) => {
|
|
3977
3977
|
if (!s.isReady())
|
|
3978
3978
|
return;
|
|
3979
|
-
const w = d.sections[
|
|
3980
|
-
s.getSectionContent(
|
|
3979
|
+
const w = d.sections[O];
|
|
3980
|
+
s.getSectionContent(O).innerHTML = w.value || w.placeholder, vn({
|
|
3981
3981
|
focused: r,
|
|
3982
3982
|
domGetters: s,
|
|
3983
3983
|
stateResponse: a
|
|
3984
3984
|
});
|
|
3985
|
-
}), A = H((
|
|
3985
|
+
}), A = H((O) => {
|
|
3986
3986
|
if (!s.isReady())
|
|
3987
3987
|
return;
|
|
3988
|
-
const w =
|
|
3988
|
+
const w = O.target, I = w.textContent ?? "", V = s.getSectionIndexFromDOMElement(w), N = d.sections[V];
|
|
3989
3989
|
if (S) {
|
|
3990
|
-
|
|
3990
|
+
v(V);
|
|
3991
3991
|
return;
|
|
3992
3992
|
}
|
|
3993
|
-
if (
|
|
3993
|
+
if (I.length === 0) {
|
|
3994
3994
|
if (N.value === "") {
|
|
3995
|
-
|
|
3995
|
+
v(V);
|
|
3996
3996
|
return;
|
|
3997
3997
|
}
|
|
3998
|
-
const
|
|
3999
|
-
if (
|
|
4000
|
-
|
|
3998
|
+
const L = O.nativeEvent.inputType;
|
|
3999
|
+
if (L === "insertParagraph" || L === "insertLineBreak") {
|
|
4000
|
+
v(V);
|
|
4001
4001
|
return;
|
|
4002
4002
|
}
|
|
4003
|
-
|
|
4003
|
+
v(V), g();
|
|
4004
4004
|
return;
|
|
4005
4005
|
}
|
|
4006
4006
|
i({
|
|
4007
|
-
keyPressed:
|
|
4007
|
+
keyPressed: I,
|
|
4008
4008
|
sectionIndex: V
|
|
4009
|
-
}),
|
|
4010
|
-
}),
|
|
4011
|
-
|
|
4012
|
-
}),
|
|
4013
|
-
if (
|
|
4009
|
+
}), v(V);
|
|
4010
|
+
}), T = H((O) => {
|
|
4011
|
+
O.preventDefault();
|
|
4012
|
+
}), B = H((O) => {
|
|
4013
|
+
if (O.preventDefault(), S || P || typeof l != "number")
|
|
4014
4014
|
return;
|
|
4015
|
-
const w = d.sections[l],
|
|
4016
|
-
w.contentType === "letter" && V || w.contentType === "digit" && N || w.contentType === "digit-with-letter" &&
|
|
4015
|
+
const w = d.sections[l], I = O.clipboardData.getData("text"), V = /^[a-zA-Z]+$/.test(I), N = /^[0-9]+$/.test(I), L = /^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(I);
|
|
4016
|
+
w.contentType === "letter" && V || w.contentType === "digit" && N || w.contentType === "digit-with-letter" && L ? (b(null), D({
|
|
4017
4017
|
section: w,
|
|
4018
|
-
newSectionValue:
|
|
4018
|
+
newSectionValue: I,
|
|
4019
4019
|
shouldGoToNextSection: !0
|
|
4020
|
-
})) : !V && !N && (b(null), m(
|
|
4021
|
-
}), R = H((
|
|
4022
|
-
|
|
4023
|
-
}),
|
|
4024
|
-
P || y(
|
|
4020
|
+
})) : !V && !N && (b(null), m(I));
|
|
4021
|
+
}), R = H((O) => {
|
|
4022
|
+
O.preventDefault(), O.dataTransfer.dropEffect = "none";
|
|
4023
|
+
}), F = f.useCallback((O) => () => {
|
|
4024
|
+
P || y(O);
|
|
4025
4025
|
}, [P, y]);
|
|
4026
|
-
return f.useCallback((
|
|
4027
|
-
const
|
|
4028
|
-
currentDate: c.getDateFromSection(h,
|
|
4029
|
-
contentType:
|
|
4030
|
-
format:
|
|
4026
|
+
return f.useCallback((O, w) => {
|
|
4027
|
+
const I = u[O.type]({
|
|
4028
|
+
currentDate: c.getDateFromSection(h, O),
|
|
4029
|
+
contentType: O.contentType,
|
|
4030
|
+
format: O.format
|
|
4031
4031
|
});
|
|
4032
4032
|
return {
|
|
4033
4033
|
// Event handlers
|
|
4034
4034
|
onInput: A,
|
|
4035
|
-
onPaste:
|
|
4036
|
-
onMouseUp:
|
|
4035
|
+
onPaste: B,
|
|
4036
|
+
onMouseUp: T,
|
|
4037
4037
|
onDragOver: R,
|
|
4038
|
-
onFocus:
|
|
4038
|
+
onFocus: F(w),
|
|
4039
4039
|
// Aria attributes
|
|
4040
4040
|
"aria-readonly": S,
|
|
4041
|
-
"aria-valuenow": ja(
|
|
4042
|
-
"aria-valuemin":
|
|
4043
|
-
"aria-valuemax":
|
|
4044
|
-
"aria-valuetext":
|
|
4045
|
-
"aria-label": o[
|
|
4041
|
+
"aria-valuenow": ja(O, n),
|
|
4042
|
+
"aria-valuemin": I.minimum,
|
|
4043
|
+
"aria-valuemax": I.maximum,
|
|
4044
|
+
"aria-valuetext": O.value ? $a(O, n) : o.empty,
|
|
4045
|
+
"aria-label": o[O.type],
|
|
4046
4046
|
"aria-disabled": P,
|
|
4047
4047
|
// Other
|
|
4048
|
-
tabIndex: !k ||
|
|
4049
|
-
contentEditable: !
|
|
4048
|
+
tabIndex: !k || x || w > 0 ? -1 : 0,
|
|
4049
|
+
contentEditable: !x && !P && !S,
|
|
4050
4050
|
role: "spinbutton",
|
|
4051
|
-
"data-range-position":
|
|
4051
|
+
"data-range-position": O.dateName || void 0,
|
|
4052
4052
|
spellCheck: k ? !1 : void 0,
|
|
4053
4053
|
// Firefox hydrates this as `'none`' instead of `'off'`. No problems in chromium with both values.
|
|
4054
4054
|
// For reference https://github.com/mui/mui-x/issues/19012
|
|
4055
4055
|
autoCapitalize: k ? "none" : void 0,
|
|
4056
4056
|
autoCorrect: k ? "off" : void 0,
|
|
4057
|
-
children:
|
|
4058
|
-
inputMode:
|
|
4057
|
+
children: O.value || O.placeholder,
|
|
4058
|
+
inputMode: O.contentType === "letter" ? "text" : "numeric"
|
|
4059
4059
|
};
|
|
4060
|
-
}, [u,
|
|
4060
|
+
}, [u, x, P, S, k, o, n, A, B, T, R, F, c, h]);
|
|
4061
4061
|
}
|
|
4062
4062
|
function $a(e, n) {
|
|
4063
4063
|
if (e.value)
|
|
@@ -4131,121 +4131,121 @@ const _a = (e) => {
|
|
|
4131
4131
|
clearable: P
|
|
4132
4132
|
} = c, {
|
|
4133
4133
|
disabled: S = !1,
|
|
4134
|
-
readOnly:
|
|
4134
|
+
readOnly: x = !1,
|
|
4135
4135
|
autoFocus: k = !1,
|
|
4136
|
-
focused:
|
|
4136
|
+
focused: v,
|
|
4137
4137
|
unstableFieldRef: A
|
|
4138
|
-
} = l,
|
|
4139
|
-
isReady: () =>
|
|
4140
|
-
getRoot: () =>
|
|
4141
|
-
getSectionContainer: (
|
|
4142
|
-
getSectionContent: (
|
|
4143
|
-
getSectionIndexFromDOMElement: (
|
|
4144
|
-
}), [
|
|
4138
|
+
} = l, T = f.useRef(null), B = Ve(u, T), R = f.useMemo(() => ({
|
|
4139
|
+
isReady: () => T.current != null,
|
|
4140
|
+
getRoot: () => T.current.getRoot(),
|
|
4141
|
+
getSectionContainer: (j) => T.current.getSectionContainer(j),
|
|
4142
|
+
getSectionContent: (j) => T.current.getSectionContent(j),
|
|
4143
|
+
getSectionIndexFromDOMElement: (j) => T.current.getSectionIndexFromDOMElement(j)
|
|
4144
|
+
}), [T]), F = Uo({
|
|
4145
4145
|
manager: o,
|
|
4146
4146
|
internalPropsWithDefaults: l,
|
|
4147
4147
|
forwardedProps: c
|
|
4148
4148
|
}), {
|
|
4149
4149
|
// States and derived states
|
|
4150
|
-
areAllSectionsEmpty:
|
|
4150
|
+
areAllSectionsEmpty: O,
|
|
4151
4151
|
error: w,
|
|
4152
|
-
parsedSelectedSections:
|
|
4152
|
+
parsedSelectedSections: I,
|
|
4153
4153
|
sectionOrder: V,
|
|
4154
4154
|
state: N,
|
|
4155
|
-
value:
|
|
4155
|
+
value: L,
|
|
4156
4156
|
// Methods to update the states
|
|
4157
|
-
clearValue:
|
|
4157
|
+
clearValue: M,
|
|
4158
4158
|
setSelectedSections: Q
|
|
4159
|
-
} =
|
|
4160
|
-
stateResponse:
|
|
4161
|
-
}), re = a(
|
|
4162
|
-
function ie(
|
|
4163
|
-
if (S || !
|
|
4164
|
-
no(
|
|
4159
|
+
} = F, $ = zo({
|
|
4160
|
+
stateResponse: F
|
|
4161
|
+
}), re = a(L), [W, X] = f.useState(!1);
|
|
4162
|
+
function ie(j = 0) {
|
|
4163
|
+
if (S || !T.current || // if the field is already focused, we don't need to focus it again
|
|
4164
|
+
no(T) != null)
|
|
4165
4165
|
return;
|
|
4166
|
-
const E = on(
|
|
4167
|
-
X(!0),
|
|
4166
|
+
const E = on(j, N.sections);
|
|
4167
|
+
X(!0), T.current.getSectionContent(E).focus();
|
|
4168
4168
|
}
|
|
4169
4169
|
const te = Na({
|
|
4170
4170
|
manager: o,
|
|
4171
4171
|
internalPropsWithDefaults: l,
|
|
4172
|
-
stateResponse:
|
|
4173
|
-
applyCharacterEditing:
|
|
4172
|
+
stateResponse: F,
|
|
4173
|
+
applyCharacterEditing: $,
|
|
4174
4174
|
focused: W,
|
|
4175
4175
|
setFocused: X,
|
|
4176
4176
|
domGetters: R
|
|
4177
4177
|
}), ue = Aa({
|
|
4178
4178
|
manager: o,
|
|
4179
|
-
stateResponse:
|
|
4179
|
+
stateResponse: F
|
|
4180
4180
|
}), oe = La({
|
|
4181
|
-
stateResponse:
|
|
4181
|
+
stateResponse: F,
|
|
4182
4182
|
internalPropsWithDefaults: l
|
|
4183
4183
|
}), de = Ba({
|
|
4184
4184
|
manager: o,
|
|
4185
|
-
stateResponse:
|
|
4186
|
-
applyCharacterEditing:
|
|
4185
|
+
stateResponse: F,
|
|
4186
|
+
applyCharacterEditing: $,
|
|
4187
4187
|
internalPropsWithDefaults: l,
|
|
4188
4188
|
domGetters: R,
|
|
4189
4189
|
focused: W
|
|
4190
|
-
}), he = H((
|
|
4191
|
-
D?.(
|
|
4192
|
-
}), ee = H((
|
|
4193
|
-
d?.(
|
|
4194
|
-
}), U = H((
|
|
4195
|
-
g?.(
|
|
4196
|
-
}), _ = H((
|
|
4197
|
-
|
|
4198
|
-
}), Y = H((
|
|
4199
|
-
y?.(
|
|
4200
|
-
}), ne = H((
|
|
4201
|
-
b?.(
|
|
4202
|
-
}), z = H((
|
|
4203
|
-
|
|
4204
|
-
}), Z = f.useMemo(() => N.sections.map((
|
|
4205
|
-
const G = de(
|
|
4190
|
+
}), he = H((j) => {
|
|
4191
|
+
D?.(j), te.onKeyDown(j);
|
|
4192
|
+
}), ee = H((j) => {
|
|
4193
|
+
d?.(j), te.onBlur(j);
|
|
4194
|
+
}), U = H((j) => {
|
|
4195
|
+
g?.(j), te.onFocus(j);
|
|
4196
|
+
}), _ = H((j) => {
|
|
4197
|
+
j.isDefaultPrevented() || (h?.(j), te.onClick(j));
|
|
4198
|
+
}), Y = H((j) => {
|
|
4199
|
+
y?.(j), te.onPaste(j);
|
|
4200
|
+
}), ne = H((j) => {
|
|
4201
|
+
b?.(j), te.onInput(j);
|
|
4202
|
+
}), z = H((j, ...E) => {
|
|
4203
|
+
j.preventDefault(), m?.(j, ...E), M(), oo(T) ? Q(V.startIndex) : ie(0);
|
|
4204
|
+
}), Z = f.useMemo(() => N.sections.map((j, E) => {
|
|
4205
|
+
const G = de(j, E);
|
|
4206
4206
|
return {
|
|
4207
4207
|
container: oe(E),
|
|
4208
|
-
content: de(
|
|
4208
|
+
content: de(j, E),
|
|
4209
4209
|
before: {
|
|
4210
|
-
children:
|
|
4210
|
+
children: j.startSeparator
|
|
4211
4211
|
},
|
|
4212
4212
|
after: {
|
|
4213
|
-
children:
|
|
4214
|
-
"data-range-position":
|
|
4213
|
+
children: j.endSeparator,
|
|
4214
|
+
"data-range-position": j.isEndFormatSeparator ? G["data-range-position"] : void 0
|
|
4215
4215
|
}
|
|
4216
4216
|
};
|
|
4217
4217
|
}), [N.sections, oe, de]);
|
|
4218
4218
|
return f.useEffect(() => {
|
|
4219
|
-
if (
|
|
4219
|
+
if (T.current == null)
|
|
4220
4220
|
throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`", "You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.", "", "If you want to keep using an `<input />` HTML element for the editing, please add the `enableAccessibleFieldDOMStructure={false}` prop to your Picker or Field component:", "", "<DatePicker enableAccessibleFieldDOMStructure={false} slots={{ textField: MyCustomTextField }} />", "", "Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(`
|
|
4221
4221
|
`));
|
|
4222
|
-
k && !S &&
|
|
4222
|
+
k && !S && T.current && T.current.getSectionContent(V.startIndex).focus();
|
|
4223
4223
|
}, []), Ue(() => {
|
|
4224
|
-
if (!(!W || !
|
|
4225
|
-
if (
|
|
4226
|
-
|
|
4227
|
-
else if (typeof
|
|
4228
|
-
const
|
|
4229
|
-
|
|
4224
|
+
if (!(!W || !T.current)) {
|
|
4225
|
+
if (I === "all")
|
|
4226
|
+
T.current.getRoot().focus();
|
|
4227
|
+
else if (typeof I == "number") {
|
|
4228
|
+
const j = T.current.getSectionContent(I);
|
|
4229
|
+
j && j.focus();
|
|
4230
4230
|
}
|
|
4231
4231
|
}
|
|
4232
|
-
}, [
|
|
4232
|
+
}, [I, W]), Ue(() => {
|
|
4233
4233
|
vn({
|
|
4234
4234
|
focused: W,
|
|
4235
4235
|
domGetters: R,
|
|
4236
|
-
stateResponse:
|
|
4236
|
+
stateResponse: F
|
|
4237
4237
|
});
|
|
4238
4238
|
}), f.useImperativeHandle(A, () => ({
|
|
4239
4239
|
getSections: () => N.sections,
|
|
4240
|
-
getActiveSectionIndex: () => no(
|
|
4241
|
-
setSelectedSections: (
|
|
4242
|
-
if (S || !
|
|
4240
|
+
getActiveSectionIndex: () => no(T),
|
|
4241
|
+
setSelectedSections: (j) => {
|
|
4242
|
+
if (S || !T.current)
|
|
4243
4243
|
return;
|
|
4244
|
-
const E = on(
|
|
4245
|
-
X((E === "all" ? 0 : E) !== null), Q(
|
|
4244
|
+
const E = on(j, N.sections);
|
|
4245
|
+
X((E === "all" ? 0 : E) !== null), Q(j);
|
|
4246
4246
|
},
|
|
4247
4247
|
focusField: ie,
|
|
4248
|
-
isFieldFocused: () => oo(
|
|
4248
|
+
isFieldFocused: () => oo(T)
|
|
4249
4249
|
})), p({}, c, te, {
|
|
4250
4250
|
onBlur: ee,
|
|
4251
4251
|
onClick: _,
|
|
@@ -4256,15 +4256,15 @@ const _a = (e) => {
|
|
|
4256
4256
|
onClear: z
|
|
4257
4257
|
}, ue, {
|
|
4258
4258
|
error: w,
|
|
4259
|
-
clearable: !!(P && !
|
|
4260
|
-
focused:
|
|
4261
|
-
sectionListRef:
|
|
4259
|
+
clearable: !!(P && !O && !x && !S),
|
|
4260
|
+
focused: v ?? W,
|
|
4261
|
+
sectionListRef: B,
|
|
4262
4262
|
// Additional
|
|
4263
4263
|
enableAccessibleFieldDOMStructure: !0,
|
|
4264
4264
|
elements: Z,
|
|
4265
|
-
areAllSectionsEmpty:
|
|
4265
|
+
areAllSectionsEmpty: O,
|
|
4266
4266
|
disabled: S,
|
|
4267
|
-
readOnly:
|
|
4267
|
+
readOnly: x,
|
|
4268
4268
|
autoFocus: k,
|
|
4269
4269
|
openPickerAriaLabel: re
|
|
4270
4270
|
});
|
|
@@ -4314,27 +4314,27 @@ const pt = (e) => e.replace(/[\u2066\u2067\u2068\u2069]/g, ""), Wa = (e, n, o) =
|
|
|
4314
4314
|
onPaste: m,
|
|
4315
4315
|
onBlur: P,
|
|
4316
4316
|
onKeyDown: S,
|
|
4317
|
-
onClear:
|
|
4317
|
+
onClear: x,
|
|
4318
4318
|
clearable: k,
|
|
4319
|
-
inputRef:
|
|
4319
|
+
inputRef: v,
|
|
4320
4320
|
placeholder: A
|
|
4321
4321
|
} = g, {
|
|
4322
|
-
readOnly:
|
|
4323
|
-
disabled:
|
|
4322
|
+
readOnly: T = !1,
|
|
4323
|
+
disabled: B = !1,
|
|
4324
4324
|
autoFocus: R = !1,
|
|
4325
|
-
focused:
|
|
4326
|
-
unstableFieldRef:
|
|
4327
|
-
} = b, w = f.useRef(null),
|
|
4325
|
+
focused: F,
|
|
4326
|
+
unstableFieldRef: O
|
|
4327
|
+
} = b, w = f.useRef(null), I = Ve(v, w), V = Uo({
|
|
4328
4328
|
manager: a,
|
|
4329
4329
|
internalPropsWithDefaults: b,
|
|
4330
4330
|
forwardedProps: g
|
|
4331
4331
|
}), {
|
|
4332
4332
|
// States and derived states
|
|
4333
4333
|
activeSectionIndex: N,
|
|
4334
|
-
areAllSectionsEmpty:
|
|
4335
|
-
error:
|
|
4334
|
+
areAllSectionsEmpty: L,
|
|
4335
|
+
error: M,
|
|
4336
4336
|
localizedDigits: Q,
|
|
4337
|
-
parsedSelectedSections:
|
|
4337
|
+
parsedSelectedSections: $,
|
|
4338
4338
|
sectionOrder: re,
|
|
4339
4339
|
state: W,
|
|
4340
4340
|
value: X,
|
|
@@ -4361,7 +4361,7 @@ const pt = (e) => e.replace(/[\u2066\u2067\u2068\u2069]/g, ""), Wa = (e, n, o) =
|
|
|
4361
4361
|
function Z(ae = 0) {
|
|
4362
4362
|
Ne(w.current) !== w.current && (w.current?.focus(), oe(ae));
|
|
4363
4363
|
}
|
|
4364
|
-
const
|
|
4364
|
+
const j = H((ae) => {
|
|
4365
4365
|
y?.(ae);
|
|
4366
4366
|
const le = w.current;
|
|
4367
4367
|
o.start(0, () => {
|
|
@@ -4371,11 +4371,11 @@ const pt = (e) => e.replace(/[\u2066\u2067\u2068\u2069]/g, ""), Wa = (e, n, o) =
|
|
|
4371
4371
|
}), E = H((ae, ...le) => {
|
|
4372
4372
|
ae.isDefaultPrevented() || (D?.(ae, ...le), z());
|
|
4373
4373
|
}), G = H((ae) => {
|
|
4374
|
-
if (m?.(ae), ae.preventDefault(),
|
|
4374
|
+
if (m?.(ae), ae.preventDefault(), T || B)
|
|
4375
4375
|
return;
|
|
4376
4376
|
const le = ae.clipboardData.getData("text");
|
|
4377
|
-
if (typeof
|
|
4378
|
-
const fe = W.sections[
|
|
4377
|
+
if (typeof $ == "number") {
|
|
4378
|
+
const fe = W.sections[$], we = /^[a-zA-Z]+$/.test(le), Oe = /^[0-9]+$/.test(le), Ie = /^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(le);
|
|
4379
4379
|
if (fe.contentType === "letter" && we || fe.contentType === "digit" && Oe || fe.contentType === "digit-with-letter" && Ie) {
|
|
4380
4380
|
ue(null), he({
|
|
4381
4381
|
section: fe,
|
|
@@ -4391,7 +4391,7 @@ const pt = (e) => e.replace(/[\u2066\u2067\u2068\u2069]/g, ""), Wa = (e, n, o) =
|
|
|
4391
4391
|
}), pe = H((ae) => {
|
|
4392
4392
|
P?.(ae), oe(null);
|
|
4393
4393
|
}), K = H((ae) => {
|
|
4394
|
-
if (
|
|
4394
|
+
if (T)
|
|
4395
4395
|
return;
|
|
4396
4396
|
const le = ae.target.value;
|
|
4397
4397
|
if (le === "") {
|
|
@@ -4399,12 +4399,12 @@ const pt = (e) => e.replace(/[\u2066\u2067\u2068\u2069]/g, ""), Wa = (e, n, o) =
|
|
|
4399
4399
|
return;
|
|
4400
4400
|
}
|
|
4401
4401
|
const fe = ae.nativeEvent.data, we = fe && fe.length > 1, Oe = we ? fe : le, Ie = pt(Oe);
|
|
4402
|
-
if (
|
|
4402
|
+
if ($ === "all" && oe(N), N == null || we) {
|
|
4403
4403
|
ee(we ? fe : Ie);
|
|
4404
4404
|
return;
|
|
4405
4405
|
}
|
|
4406
4406
|
let ve;
|
|
4407
|
-
if (
|
|
4407
|
+
if ($ === "all" && Ie.length === 1)
|
|
4408
4408
|
ve = Ie;
|
|
4409
4409
|
else {
|
|
4410
4410
|
const je = pt(u.getV6InputValueFromSections(ne, Q, n));
|
|
@@ -4426,7 +4426,7 @@ const pt = (e) => e.replace(/[\u2066\u2067\u2068\u2069]/g, ""), Wa = (e, n, o) =
|
|
|
4426
4426
|
sectionIndex: N
|
|
4427
4427
|
});
|
|
4428
4428
|
}), se = H((ae, ...le) => {
|
|
4429
|
-
ae.preventDefault(),
|
|
4429
|
+
ae.preventDefault(), x?.(ae, ...le), ie(), ro(w) ? oe(re.startIndex) : Z(0);
|
|
4430
4430
|
}), Se = Ko({
|
|
4431
4431
|
manager: a,
|
|
4432
4432
|
internalPropsWithDefaults: b,
|
|
@@ -4440,17 +4440,17 @@ const pt = (e) => e.replace(/[\u2066\u2067\u2068\u2069]/g, ""), Wa = (e, n, o) =
|
|
|
4440
4440
|
function ae() {
|
|
4441
4441
|
if (!w.current)
|
|
4442
4442
|
return;
|
|
4443
|
-
if (
|
|
4443
|
+
if ($ == null) {
|
|
4444
4444
|
w.current.scrollLeft && (w.current.scrollLeft = 0);
|
|
4445
4445
|
return;
|
|
4446
4446
|
}
|
|
4447
4447
|
if (w.current !== Ne(w.current))
|
|
4448
4448
|
return;
|
|
4449
4449
|
const le = w.current.scrollTop;
|
|
4450
|
-
if (
|
|
4450
|
+
if ($ === "all")
|
|
4451
4451
|
w.current.select();
|
|
4452
4452
|
else {
|
|
4453
|
-
const fe = ne[
|
|
4453
|
+
const fe = ne[$], we = fe.type === "empty" ? fe.startInInput - fe.startSeparator.length : fe.startInInput, Oe = fe.type === "empty" ? fe.endInInput + fe.endSeparator.length : fe.endInInput;
|
|
4454
4454
|
(we !== w.current.selectionStart || Oe !== w.current.selectionEnd) && w.current === Ne(w.current) && w.current.setSelectionRange(we, Oe), r.start(0, () => {
|
|
4455
4455
|
w.current && w.current === Ne(w.current) && // The section might loose all selection, where `selectionStart === selectionEnd`
|
|
4456
4456
|
// https://github.com/mui/mui-x/pull/13652
|
|
@@ -4461,8 +4461,8 @@ const pt = (e) => e.replace(/[\u2066\u2067\u2068\u2069]/g, ""), Wa = (e, n, o) =
|
|
|
4461
4461
|
}
|
|
4462
4462
|
ae();
|
|
4463
4463
|
});
|
|
4464
|
-
const Ke = f.useMemo(() => N == null || W.sections[N].contentType === "letter" ? "text" : "numeric", [N, W.sections]), lt = !(w.current && w.current === Ne(w.current)) &&
|
|
4465
|
-
return f.useImperativeHandle(
|
|
4464
|
+
const Ke = f.useMemo(() => N == null || W.sections[N].contentType === "letter" ? "text" : "numeric", [N, W.sections]), lt = !(w.current && w.current === Ne(w.current)) && L;
|
|
4465
|
+
return f.useImperativeHandle(O, () => ({
|
|
4466
4466
|
getSections: () => W.sections,
|
|
4467
4467
|
getActiveSectionIndex: () => {
|
|
4468
4468
|
const ae = w.current.selectionStart ?? 0, le = w.current.selectionEnd ?? 0;
|
|
@@ -4475,16 +4475,16 @@ const pt = (e) => e.replace(/[\u2066\u2067\u2068\u2069]/g, ""), Wa = (e, n, o) =
|
|
|
4475
4475
|
focusField: Z,
|
|
4476
4476
|
isFieldFocused: () => ro(w)
|
|
4477
4477
|
})), p({}, g, {
|
|
4478
|
-
error:
|
|
4479
|
-
"aria-invalid":
|
|
4480
|
-
clearable: !!(k && !
|
|
4478
|
+
error: M,
|
|
4479
|
+
"aria-invalid": M,
|
|
4480
|
+
clearable: !!(k && !L && !T && !B),
|
|
4481
4481
|
onBlur: pe,
|
|
4482
4482
|
onClick: E,
|
|
4483
|
-
onFocus:
|
|
4483
|
+
onFocus: j,
|
|
4484
4484
|
onPaste: G,
|
|
4485
4485
|
onKeyDown: Ce,
|
|
4486
4486
|
onClear: se,
|
|
4487
|
-
inputRef:
|
|
4487
|
+
inputRef: I,
|
|
4488
4488
|
// Additional
|
|
4489
4489
|
enableAccessibleFieldDOMStructure: !1,
|
|
4490
4490
|
placeholder: Me,
|
|
@@ -4492,9 +4492,9 @@ const pt = (e) => e.replace(/[\u2066\u2067\u2068\u2069]/g, ""), Wa = (e, n, o) =
|
|
|
4492
4492
|
autoComplete: "off",
|
|
4493
4493
|
value: lt ? "" : Le,
|
|
4494
4494
|
onChange: K,
|
|
4495
|
-
focused:
|
|
4496
|
-
disabled:
|
|
4497
|
-
readOnly:
|
|
4495
|
+
focused: F,
|
|
4496
|
+
disabled: B,
|
|
4497
|
+
readOnly: T,
|
|
4498
4498
|
autoFocus: R,
|
|
4499
4499
|
openPickerAriaLabel: Y
|
|
4500
4500
|
});
|
|
@@ -4690,8 +4690,8 @@ const zt = /* @__PURE__ */ f.forwardRef(function(n, o) {
|
|
|
4690
4690
|
const S = y("getSectionIndexFromDOMElement");
|
|
4691
4691
|
if (P == null || !S.contains(P))
|
|
4692
4692
|
return null;
|
|
4693
|
-
let
|
|
4694
|
-
return P.classList.contains(dt.section) ?
|
|
4693
|
+
let x = null;
|
|
4694
|
+
return P.classList.contains(dt.section) ? x = P : P.classList.contains(dt.sectionContent) && (x = P.parentElement), x == null ? null : Number(x.dataset.sectionindex);
|
|
4695
4695
|
}
|
|
4696
4696
|
}));
|
|
4697
4697
|
const D = s?.root ?? Zo, m = me({
|
|
@@ -4709,8 +4709,8 @@ const zt = /* @__PURE__ */ f.forwardRef(function(n, o) {
|
|
|
4709
4709
|
children: m.contentEditable ? i.map(({
|
|
4710
4710
|
content: P,
|
|
4711
4711
|
before: S,
|
|
4712
|
-
after:
|
|
4713
|
-
}) => `${S.children}${P.children}${
|
|
4712
|
+
after: x
|
|
4713
|
+
}) => `${S.children}${P.children}${x.children}`).join("") : /* @__PURE__ */ C(f.Fragment, {
|
|
4714
4714
|
children: i.map((P, S) => /* @__PURE__ */ C(nr, {
|
|
4715
4715
|
slots: s,
|
|
4716
4716
|
slotProps: a,
|
|
@@ -4991,20 +4991,20 @@ const Vt = /* @__PURE__ */ f.forwardRef(function(n, o) {
|
|
|
4991
4991
|
onInput: m,
|
|
4992
4992
|
onPaste: P,
|
|
4993
4993
|
onKeyDown: S,
|
|
4994
|
-
name:
|
|
4994
|
+
name: x,
|
|
4995
4995
|
readOnly: k,
|
|
4996
|
-
inputProps:
|
|
4996
|
+
inputProps: v,
|
|
4997
4997
|
inputRef: A,
|
|
4998
|
-
sectionListRef:
|
|
4999
|
-
onFocus:
|
|
4998
|
+
sectionListRef: T,
|
|
4999
|
+
onFocus: B,
|
|
5000
5000
|
onBlur: R,
|
|
5001
|
-
classes:
|
|
5002
|
-
ownerState:
|
|
5003
|
-
} = r, w = J(r, Ja),
|
|
5004
|
-
if (
|
|
5001
|
+
classes: F,
|
|
5002
|
+
ownerState: O
|
|
5003
|
+
} = r, w = J(r, Ja), I = Ut(), V = f.useRef(null), N = f.useRef(null), L = f.useRef([]), M = Ve(o, V), Q = Ve(v?.ref, A), $ = an();
|
|
5004
|
+
if (!$)
|
|
5005
5005
|
throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");
|
|
5006
|
-
const re =
|
|
5007
|
-
|
|
5006
|
+
const re = O ?? I, W = (U) => {
|
|
5007
|
+
$.onFocus?.(U), B?.(U);
|
|
5008
5008
|
}, X = (U) => {
|
|
5009
5009
|
W(U);
|
|
5010
5010
|
}, ie = (U) => {
|
|
@@ -5017,20 +5017,20 @@ const Vt = /* @__PURE__ */ f.forwardRef(function(n, o) {
|
|
|
5017
5017
|
U.preventDefault(), _.requestSubmit(Y);
|
|
5018
5018
|
}
|
|
5019
5019
|
}, te = (U) => {
|
|
5020
|
-
|
|
5020
|
+
$.onBlur?.(U), R?.(U);
|
|
5021
5021
|
};
|
|
5022
5022
|
f.useEffect(() => {
|
|
5023
|
-
|
|
5024
|
-
}, [
|
|
5025
|
-
|
|
5026
|
-
}, [
|
|
5027
|
-
const ue = ai(
|
|
5023
|
+
$ && $.setAdornedStart(!!d);
|
|
5024
|
+
}, [$, d]), f.useEffect(() => {
|
|
5025
|
+
$ && (a ? $.onEmpty() : $.onFilled());
|
|
5026
|
+
}, [$, a]);
|
|
5027
|
+
const ue = ai(F, re), oe = g?.root || Yt, de = me({
|
|
5028
5028
|
elementType: oe,
|
|
5029
5029
|
externalSlotProps: b?.root,
|
|
5030
5030
|
externalForwardedProps: w,
|
|
5031
5031
|
additionalProps: {
|
|
5032
|
-
"aria-invalid":
|
|
5033
|
-
ref:
|
|
5032
|
+
"aria-invalid": $.error,
|
|
5033
|
+
ref: M
|
|
5034
5034
|
},
|
|
5035
5035
|
className: ue.root,
|
|
5036
5036
|
ownerState: re
|
|
@@ -5042,10 +5042,10 @@ const Vt = /* @__PURE__ */ f.forwardRef(function(n, o) {
|
|
|
5042
5042
|
activeBarWidth: U,
|
|
5043
5043
|
sectionOffsets: _
|
|
5044
5044
|
} = ii(s, V);
|
|
5045
|
-
|
|
5045
|
+
L.current = [_[0], _[1]], N.current && (N.current.style.width = `${U}px`);
|
|
5046
5046
|
}, [s, ee, re.isPickerOpen]), /* @__PURE__ */ ge(oe, p({}, de, {
|
|
5047
5047
|
children: [d, /* @__PURE__ */ C(zt, {
|
|
5048
|
-
sectionListRef:
|
|
5048
|
+
sectionListRef: T,
|
|
5049
5049
|
elements: s,
|
|
5050
5050
|
contentEditable: y,
|
|
5051
5051
|
tabIndex: D,
|
|
@@ -5074,8 +5074,8 @@ const Vt = /* @__PURE__ */ f.forwardRef(function(n, o) {
|
|
|
5074
5074
|
className: U === "before" ? ht.sectionBefore : ht.sectionAfter
|
|
5075
5075
|
})
|
|
5076
5076
|
}
|
|
5077
|
-
}), u, h ? h(p({},
|
|
5078
|
-
name:
|
|
5077
|
+
}), u, h ? h(p({}, $)) : null, /* @__PURE__ */ C(ri, p({
|
|
5078
|
+
name: x,
|
|
5079
5079
|
className: ue.input,
|
|
5080
5080
|
value: i,
|
|
5081
5081
|
onChange: c,
|
|
@@ -5083,16 +5083,16 @@ const Vt = /* @__PURE__ */ f.forwardRef(function(n, o) {
|
|
|
5083
5083
|
"aria-hidden": "true",
|
|
5084
5084
|
tabIndex: -1,
|
|
5085
5085
|
readOnly: k,
|
|
5086
|
-
required:
|
|
5087
|
-
disabled:
|
|
5086
|
+
required: $.required,
|
|
5087
|
+
disabled: $.disabled,
|
|
5088
5088
|
onFocus: X
|
|
5089
|
-
},
|
|
5089
|
+
}, v, {
|
|
5090
5090
|
ref: Q
|
|
5091
5091
|
})), ee && /* @__PURE__ */ C(si, {
|
|
5092
5092
|
className: ue.activeBar,
|
|
5093
5093
|
ref: N,
|
|
5094
5094
|
ownerState: {
|
|
5095
|
-
sectionOffsets:
|
|
5095
|
+
sectionOffsets: L.current
|
|
5096
5096
|
}
|
|
5097
5097
|
})]
|
|
5098
5098
|
}));
|
|
@@ -5971,57 +5971,57 @@ const ki = ["onFocus", "onBlur", "className", "classes", "color", "disabled", "e
|
|
|
5971
5971
|
inputRef: m,
|
|
5972
5972
|
sectionListRef: P,
|
|
5973
5973
|
elements: S,
|
|
5974
|
-
areAllSectionsEmpty:
|
|
5974
|
+
areAllSectionsEmpty: x,
|
|
5975
5975
|
onClick: k,
|
|
5976
|
-
onKeyDown:
|
|
5976
|
+
onKeyDown: v,
|
|
5977
5977
|
onKeyUp: A,
|
|
5978
|
-
onPaste:
|
|
5979
|
-
onInput:
|
|
5978
|
+
onPaste: T,
|
|
5979
|
+
onInput: B,
|
|
5980
5980
|
endAdornment: R,
|
|
5981
|
-
startAdornment:
|
|
5982
|
-
tabIndex:
|
|
5981
|
+
startAdornment: F,
|
|
5982
|
+
tabIndex: O,
|
|
5983
5983
|
contentEditable: w,
|
|
5984
|
-
focused:
|
|
5984
|
+
focused: I,
|
|
5985
5985
|
value: V,
|
|
5986
5986
|
onChange: N,
|
|
5987
|
-
fullWidth:
|
|
5988
|
-
id:
|
|
5987
|
+
fullWidth: L,
|
|
5988
|
+
id: M,
|
|
5989
5989
|
name: Q,
|
|
5990
5990
|
// Props used by FormHelperText
|
|
5991
|
-
helperText:
|
|
5991
|
+
helperText: $,
|
|
5992
5992
|
FormHelperTextProps: re,
|
|
5993
5993
|
// Props used by InputLabel
|
|
5994
5994
|
label: W,
|
|
5995
5995
|
InputLabelProps: X,
|
|
5996
5996
|
// @ts-ignore
|
|
5997
5997
|
"data-active-range-position": ie
|
|
5998
|
-
} = r, te = J(r, ki), ue = f.useRef(null), oe = Ve(o, ue), de = Bt(
|
|
5998
|
+
} = r, te = J(r, ki), ue = f.useRef(null), oe = Ve(o, ue), de = Bt(M), he = $ && de ? `${de}-helper-text` : void 0, ee = W && de ? `${de}-label` : void 0, U = kn({
|
|
5999
5999
|
disabled: r.disabled,
|
|
6000
6000
|
required: r.required,
|
|
6001
6001
|
readOnly: y?.readOnly
|
|
6002
6002
|
}), _ = f.useMemo(() => p({}, U, {
|
|
6003
|
-
isFieldValueEmpty:
|
|
6004
|
-
isFieldFocused:
|
|
6003
|
+
isFieldValueEmpty: x,
|
|
6004
|
+
isFieldFocused: I ?? !1,
|
|
6005
6005
|
hasFieldError: d ?? !1,
|
|
6006
6006
|
inputSize: r.size ?? "medium",
|
|
6007
6007
|
inputColor: l ?? "primary",
|
|
6008
|
-
isInputInFullWidth:
|
|
6009
|
-
hasStartAdornment: !!(
|
|
6008
|
+
isInputInFullWidth: L ?? !1,
|
|
6009
|
+
hasStartAdornment: !!(F ?? y?.startAdornment),
|
|
6010
6010
|
hasEndAdornment: !!(R ?? y?.endAdornment),
|
|
6011
6011
|
inputHasLabel: !!W,
|
|
6012
6012
|
isLabelShrunk: !!X?.shrink
|
|
6013
|
-
}), [U,
|
|
6013
|
+
}), [U, x, I, d, r.size, l, L, F, R, y?.startAdornment, y?.endAdornment, W, X?.shrink]), Y = Ii(c, _), ne = Oi[h], z = {};
|
|
6014
6014
|
return h === "outlined" ? (X && typeof X.shrink < "u" && (z.notched = X.shrink), z.label = W) : h === "filled" && (z.hiddenLabel = b), /* @__PURE__ */ C(On.Provider, {
|
|
6015
6015
|
value: _,
|
|
6016
6016
|
children: /* @__PURE__ */ ge(Mi, p({
|
|
6017
6017
|
className: ke(Y.root, i),
|
|
6018
6018
|
ref: oe,
|
|
6019
|
-
focused:
|
|
6019
|
+
focused: I,
|
|
6020
6020
|
disabled: u,
|
|
6021
6021
|
variant: h,
|
|
6022
6022
|
error: d,
|
|
6023
6023
|
color: l,
|
|
6024
|
-
fullWidth:
|
|
6024
|
+
fullWidth: L,
|
|
6025
6025
|
required: g,
|
|
6026
6026
|
ownerState: _
|
|
6027
6027
|
}, te, {
|
|
@@ -6032,22 +6032,22 @@ const ki = ["onFocus", "onBlur", "className", "classes", "color", "disabled", "e
|
|
|
6032
6032
|
children: W
|
|
6033
6033
|
})), /* @__PURE__ */ C(ne, p({
|
|
6034
6034
|
elements: S,
|
|
6035
|
-
areAllSectionsEmpty:
|
|
6035
|
+
areAllSectionsEmpty: x,
|
|
6036
6036
|
onClick: k,
|
|
6037
|
-
onKeyDown:
|
|
6037
|
+
onKeyDown: v,
|
|
6038
6038
|
onKeyUp: A,
|
|
6039
|
-
onInput:
|
|
6040
|
-
onPaste:
|
|
6039
|
+
onInput: B,
|
|
6040
|
+
onPaste: T,
|
|
6041
6041
|
onFocus: s,
|
|
6042
6042
|
onBlur: a,
|
|
6043
6043
|
endAdornment: R,
|
|
6044
|
-
startAdornment:
|
|
6045
|
-
tabIndex:
|
|
6044
|
+
startAdornment: F,
|
|
6045
|
+
tabIndex: O,
|
|
6046
6046
|
contentEditable: w,
|
|
6047
6047
|
value: V,
|
|
6048
6048
|
onChange: N,
|
|
6049
6049
|
id: de,
|
|
6050
|
-
fullWidth:
|
|
6050
|
+
fullWidth: L,
|
|
6051
6051
|
inputProps: D,
|
|
6052
6052
|
inputRef: m,
|
|
6053
6053
|
sectionListRef: P,
|
|
@@ -6058,10 +6058,10 @@ const ki = ["onFocus", "onBlur", "className", "classes", "color", "disabled", "e
|
|
|
6058
6058
|
"aria-describedby": he,
|
|
6059
6059
|
"aria-live": he ? "polite" : void 0,
|
|
6060
6060
|
"data-active-range-position": ie
|
|
6061
|
-
}, z, y)),
|
|
6061
|
+
}, z, y)), $ && /* @__PURE__ */ C(go, p({
|
|
6062
6062
|
id: he
|
|
6063
6063
|
}, re, {
|
|
6064
|
-
children:
|
|
6064
|
+
children: $
|
|
6065
6065
|
}))]
|
|
6066
6066
|
}))
|
|
6067
6067
|
});
|
|
@@ -6187,28 +6187,28 @@ const Ri = ["enableAccessibleFieldDOMStructure"], Ti = ["InputProps", "readOnly"
|
|
|
6187
6187
|
if (n) {
|
|
6188
6188
|
const {
|
|
6189
6189
|
InputProps: S,
|
|
6190
|
-
readOnly:
|
|
6190
|
+
readOnly: x,
|
|
6191
6191
|
onClear: k,
|
|
6192
|
-
clearable:
|
|
6192
|
+
clearable: v,
|
|
6193
6193
|
clearButtonPosition: A,
|
|
6194
|
-
openPickerButtonPosition:
|
|
6195
|
-
openPickerAriaLabel:
|
|
6196
|
-
} = o, R = J(o, Ti),
|
|
6194
|
+
openPickerButtonPosition: T,
|
|
6195
|
+
openPickerAriaLabel: B
|
|
6196
|
+
} = o, R = J(o, Ti), F = Qe >= 6 && R?.slotProps?.input ? kt(R?.slotProps?.input, S) : nn;
|
|
6197
6197
|
return {
|
|
6198
|
-
clearable:
|
|
6198
|
+
clearable: v,
|
|
6199
6199
|
onClear: k,
|
|
6200
6200
|
clearButtonPosition: A,
|
|
6201
|
-
openPickerButtonPosition:
|
|
6202
|
-
openPickerAriaLabel:
|
|
6201
|
+
openPickerButtonPosition: T,
|
|
6202
|
+
openPickerAriaLabel: B,
|
|
6203
6203
|
textFieldProps: p({}, R, Qe >= 6 && R?.slotProps?.input ? {
|
|
6204
6204
|
slotProps: p({}, R?.slotProps, {
|
|
6205
|
-
input: (
|
|
6206
|
-
readOnly:
|
|
6205
|
+
input: (O) => p({}, He(F, O), {
|
|
6206
|
+
readOnly: x
|
|
6207
6207
|
})
|
|
6208
6208
|
})
|
|
6209
6209
|
} : {
|
|
6210
6210
|
InputProps: p({}, S ?? {}, {
|
|
6211
|
-
readOnly:
|
|
6211
|
+
readOnly: x
|
|
6212
6212
|
})
|
|
6213
6213
|
})
|
|
6214
6214
|
};
|
|
@@ -6276,7 +6276,7 @@ function $i(e) {
|
|
|
6276
6276
|
openPickerButtonPosition: h = "end"
|
|
6277
6277
|
} = Bi(n), g = kn(i), b = H((re) => {
|
|
6278
6278
|
re.preventDefault(), s?.setOpen((W) => !W);
|
|
6279
|
-
}), y = s ? s.triggerStatus : "hidden", D = l ? d : null, m = y !== "hidden" ? h : null, P = a.slots.textField ?? (n.enableAccessibleFieldDOMStructure === !1 ? Po : Xt), S = a.slots.inputAdornment ?? Er,
|
|
6279
|
+
}), y = s ? s.triggerStatus : "hidden", D = l ? d : null, m = y !== "hidden" ? h : null, P = a.slots.textField ?? (n.enableAccessibleFieldDOMStructure === !1 ? Po : Xt), S = a.slots.inputAdornment ?? Er, x = me({
|
|
6280
6280
|
elementType: S,
|
|
6281
6281
|
externalSlotProps: a.slotProps.inputAdornment,
|
|
6282
6282
|
additionalProps: {
|
|
@@ -6285,7 +6285,7 @@ function $i(e) {
|
|
|
6285
6285
|
ownerState: p({}, g, {
|
|
6286
6286
|
position: "start"
|
|
6287
6287
|
})
|
|
6288
|
-
}), k = J(
|
|
6288
|
+
}), k = J(x, Vi), v = me({
|
|
6289
6289
|
elementType: S,
|
|
6290
6290
|
externalSlotProps: a.slotProps.inputAdornment,
|
|
6291
6291
|
additionalProps: {
|
|
@@ -6294,8 +6294,8 @@ function $i(e) {
|
|
|
6294
6294
|
ownerState: p({}, g, {
|
|
6295
6295
|
position: "end"
|
|
6296
6296
|
})
|
|
6297
|
-
}), A = J(
|
|
6298
|
-
elementType:
|
|
6297
|
+
}), A = J(v, Ei), T = a.slots.openPickerButton ?? gt, B = me({
|
|
6298
|
+
elementType: T,
|
|
6299
6299
|
externalSlotProps: a.slotProps.openPickerButton,
|
|
6300
6300
|
additionalProps: {
|
|
6301
6301
|
disabled: y === "disabled",
|
|
@@ -6307,11 +6307,11 @@ function $i(e) {
|
|
|
6307
6307
|
)
|
|
6308
6308
|
},
|
|
6309
6309
|
ownerState: g
|
|
6310
|
-
}), R = J(
|
|
6311
|
-
elementType:
|
|
6310
|
+
}), R = J(B, Ni), F = a.slots.openPickerIcon ?? o, O = me({
|
|
6311
|
+
elementType: F,
|
|
6312
6312
|
externalSlotProps: a.slotProps.openPickerIcon,
|
|
6313
6313
|
ownerState: g
|
|
6314
|
-
}), w = a.slots.clearButton ?? gt,
|
|
6314
|
+
}), w = a.slots.clearButton ?? gt, I = me({
|
|
6315
6315
|
elementType: w,
|
|
6316
6316
|
externalSlotProps: a.slotProps.clearButton,
|
|
6317
6317
|
className: "clearButton",
|
|
@@ -6326,7 +6326,7 @@ function $i(e) {
|
|
|
6326
6326
|
)
|
|
6327
6327
|
},
|
|
6328
6328
|
ownerState: g
|
|
6329
|
-
}), V = J(
|
|
6329
|
+
}), V = J(I, Ai), N = a.slots.clearIcon ?? Xo, L = me({
|
|
6330
6330
|
elementType: N,
|
|
6331
6331
|
externalSlotProps: a.slotProps.clearIcon,
|
|
6332
6332
|
additionalProps: {
|
|
@@ -6335,20 +6335,20 @@ function $i(e) {
|
|
|
6335
6335
|
ownerState: g
|
|
6336
6336
|
});
|
|
6337
6337
|
i.ref = Ve(i.ref, s?.rootRef);
|
|
6338
|
-
const
|
|
6339
|
-
s && (
|
|
6340
|
-
children: [m === "start" && /* @__PURE__ */ C(
|
|
6341
|
-
children: /* @__PURE__ */ C(
|
|
6338
|
+
const M = {}, Q = He((Qe >= 6 && i?.slotProps?.input) ?? i.InputProps, g);
|
|
6339
|
+
s && (M.ref = s.triggerRef), !Q?.startAdornment && (D === "start" || m === "start") && (M.startAdornment = /* @__PURE__ */ ge(S, p({}, k, {
|
|
6340
|
+
children: [m === "start" && /* @__PURE__ */ C(T, p({}, R, {
|
|
6341
|
+
children: /* @__PURE__ */ C(F, p({}, O))
|
|
6342
6342
|
})), D === "start" && /* @__PURE__ */ C(w, p({}, V, {
|
|
6343
|
-
children: /* @__PURE__ */ C(N, p({},
|
|
6343
|
+
children: /* @__PURE__ */ C(N, p({}, L))
|
|
6344
6344
|
}))]
|
|
6345
|
-
}))), !Q?.endAdornment && (D === "end" || m === "end") && (
|
|
6345
|
+
}))), !Q?.endAdornment && (D === "end" || m === "end") && (M.endAdornment = /* @__PURE__ */ ge(S, p({}, A, {
|
|
6346
6346
|
children: [D === "end" && /* @__PURE__ */ C(w, p({}, V, {
|
|
6347
|
-
children: /* @__PURE__ */ C(N, p({},
|
|
6348
|
-
})), m === "end" && /* @__PURE__ */ C(
|
|
6349
|
-
children: /* @__PURE__ */ C(
|
|
6347
|
+
children: /* @__PURE__ */ C(N, p({}, L))
|
|
6348
|
+
})), m === "end" && /* @__PURE__ */ C(T, p({}, R, {
|
|
6349
|
+
children: /* @__PURE__ */ C(F, p({}, O))
|
|
6350
6350
|
}))]
|
|
6351
|
-
}))), !
|
|
6351
|
+
}))), !M?.endAdornment && !M?.startAdornment && a.slots.inputAdornment && (M.endAdornment = /* @__PURE__ */ C(S, p({}, A))), D != null && (i.sx = [{
|
|
6352
6352
|
"& .clearButton": {
|
|
6353
6353
|
opacity: 1
|
|
6354
6354
|
},
|
|
@@ -6363,9 +6363,9 @@ function $i(e) {
|
|
|
6363
6363
|
}
|
|
6364
6364
|
}
|
|
6365
6365
|
}, ...Array.isArray(i.sx) ? i.sx : [i.sx]]);
|
|
6366
|
-
const
|
|
6366
|
+
const $ = Qe >= 6 && i?.slotProps?.input ? He(kt(Q, M), g) : p({}, Q, M);
|
|
6367
6367
|
return i.inputProps = Qe >= 6 && i?.slotProps?.htmlInput ? He(i.slotProps.htmlInput, g) : i.inputProps, delete i?.slotProps?.input, n.enableAccessibleFieldDOMStructure && delete i?.slotProps, /* @__PURE__ */ C(P, p({}, i, {
|
|
6368
|
-
InputProps:
|
|
6368
|
+
InputProps: $
|
|
6369
6369
|
}));
|
|
6370
6370
|
}
|
|
6371
6371
|
function kt(e, n) {
|
|
@@ -6808,7 +6808,11 @@ const or = ({
|
|
|
6808
6808
|
), [m, P] = f.useReducer(y, {
|
|
6809
6809
|
isMonthSwitchingAnimating: !1,
|
|
6810
6810
|
focusedDay: D,
|
|
6811
|
-
|
|
6811
|
+
// Keep the time from the reference date when computing the current month anchor.
|
|
6812
|
+
// Using startOfMonth would reset the time to 00:00 which breaks expectations
|
|
6813
|
+
// that month selections preserve the referenceDate time when no value is provided.
|
|
6814
|
+
// See tests: "should use `referenceDate` when no value defined".
|
|
6815
|
+
currentMonth: b.setDate(D, 1),
|
|
6812
6816
|
slideDirection: "left"
|
|
6813
6817
|
}), S = or({
|
|
6814
6818
|
shouldDisableDate: d,
|
|
@@ -6824,36 +6828,36 @@ const or = ({
|
|
|
6824
6828
|
newTimezone: b.getTimezone(D)
|
|
6825
6829
|
});
|
|
6826
6830
|
}, [D, b]);
|
|
6827
|
-
const
|
|
6828
|
-
target:
|
|
6831
|
+
const x = H(({
|
|
6832
|
+
target: v,
|
|
6829
6833
|
reason: A
|
|
6830
6834
|
}) => {
|
|
6831
|
-
if (A === "cell-interaction" && m.focusedDay != null && b.isSameDay(
|
|
6835
|
+
if (A === "cell-interaction" && m.focusedDay != null && b.isSameDay(v, m.focusedDay))
|
|
6832
6836
|
return;
|
|
6833
|
-
const
|
|
6834
|
-
let
|
|
6837
|
+
const T = A === "cell-interaction";
|
|
6838
|
+
let B, R;
|
|
6835
6839
|
if (A === "cell-interaction")
|
|
6836
|
-
|
|
6837
|
-
else if (
|
|
6838
|
-
const w = b.startOfMonth(
|
|
6840
|
+
B = g(v, m.currentMonth), R = v;
|
|
6841
|
+
else if (B = b.isSameMonth(v, m.currentMonth) ? m.currentMonth : b.startOfMonth(v), R = v, S(R)) {
|
|
6842
|
+
const w = b.startOfMonth(v), I = b.endOfMonth(v);
|
|
6839
6843
|
R = Mt({
|
|
6840
6844
|
adapter: b,
|
|
6841
6845
|
date: R,
|
|
6842
6846
|
minDate: b.isBefore(i, w) ? w : i,
|
|
6843
|
-
maxDate: b.isAfter(a,
|
|
6847
|
+
maxDate: b.isAfter(a, I) ? I : a,
|
|
6844
6848
|
disablePast: s,
|
|
6845
6849
|
disableFuture: r,
|
|
6846
6850
|
isDateDisabled: S,
|
|
6847
6851
|
timezone: h
|
|
6848
6852
|
});
|
|
6849
6853
|
}
|
|
6850
|
-
const
|
|
6851
|
-
|
|
6854
|
+
const F = !b.isSameMonth(m.currentMonth, B), O = !b.isSameYear(m.currentMonth, B);
|
|
6855
|
+
F && c?.(B), O && l?.(b.startOfYear(B)), P({
|
|
6852
6856
|
type: "setVisibleDate",
|
|
6853
|
-
month:
|
|
6854
|
-
direction: b.isAfterDay(
|
|
6857
|
+
month: B,
|
|
6858
|
+
direction: b.isAfterDay(B, m.currentMonth) ? "left" : "right",
|
|
6855
6859
|
focusedDay: m.focusedDay != null && R != null && b.isSameDay(R, m.focusedDay) ? m.focusedDay : R,
|
|
6856
|
-
skipAnimation:
|
|
6860
|
+
skipAnimation: T
|
|
6857
6861
|
});
|
|
6858
6862
|
}), k = f.useCallback(() => {
|
|
6859
6863
|
P({
|
|
@@ -6863,7 +6867,7 @@ const or = ({
|
|
|
6863
6867
|
return {
|
|
6864
6868
|
referenceDate: D,
|
|
6865
6869
|
calendarState: m,
|
|
6866
|
-
setVisibleDate:
|
|
6870
|
+
setVisibleDate: x,
|
|
6867
6871
|
isDateDisabled: S,
|
|
6868
6872
|
onMonthSwitchingAnimationEnd: k
|
|
6869
6873
|
};
|
|
@@ -7056,48 +7060,48 @@ const Qi = ["autoFocus", "className", "classes", "hidden", "isAnimating", "onCli
|
|
|
7056
7060
|
day: m,
|
|
7057
7061
|
selected: P,
|
|
7058
7062
|
disabled: S,
|
|
7059
|
-
today:
|
|
7063
|
+
today: x,
|
|
7060
7064
|
outsideCurrentMonth: k,
|
|
7061
|
-
disableMargin:
|
|
7065
|
+
disableMargin: v,
|
|
7062
7066
|
disableHighlightToday: A,
|
|
7063
|
-
showDaysOutsideCurrentMonth:
|
|
7064
|
-
} = r,
|
|
7067
|
+
showDaysOutsideCurrentMonth: T
|
|
7068
|
+
} = r, B = J(r, Qi), R = sr({
|
|
7065
7069
|
day: m,
|
|
7066
7070
|
selected: P,
|
|
7067
7071
|
disabled: S,
|
|
7068
|
-
today:
|
|
7072
|
+
today: x,
|
|
7069
7073
|
outsideCurrentMonth: k,
|
|
7070
|
-
disableMargin:
|
|
7074
|
+
disableMargin: v,
|
|
7071
7075
|
disableHighlightToday: A,
|
|
7072
|
-
showDaysOutsideCurrentMonth:
|
|
7073
|
-
}),
|
|
7076
|
+
showDaysOutsideCurrentMonth: T
|
|
7077
|
+
}), F = Xi(i, R), O = be(), w = f.useRef(null), I = Ve(w, o);
|
|
7074
7078
|
Ue(() => {
|
|
7075
7079
|
s && !S && !c && !k && w.current.focus();
|
|
7076
7080
|
}, [s, S, c, k]);
|
|
7077
|
-
const V = (
|
|
7078
|
-
b(
|
|
7079
|
-
}, N = (
|
|
7080
|
-
|
|
7081
|
+
const V = (L) => {
|
|
7082
|
+
b(L), k && L.preventDefault();
|
|
7083
|
+
}, N = (L) => {
|
|
7084
|
+
L.defaultMuiPrevented = !0, S || u(m), k && L.currentTarget.focus(), l && l(L);
|
|
7081
7085
|
};
|
|
7082
|
-
return k && !
|
|
7083
|
-
className: ke(
|
|
7086
|
+
return k && !T ? /* @__PURE__ */ C(Ji, {
|
|
7087
|
+
className: ke(F.root, F.hiddenDaySpacingFiller, a),
|
|
7084
7088
|
ownerState: R,
|
|
7085
|
-
role:
|
|
7089
|
+
role: B.role
|
|
7086
7090
|
}) : /* @__PURE__ */ C(Zi, p({
|
|
7087
|
-
className: ke(
|
|
7088
|
-
ref:
|
|
7091
|
+
className: ke(F.root, a),
|
|
7092
|
+
ref: I,
|
|
7089
7093
|
centerRipple: !0,
|
|
7090
7094
|
disabled: S,
|
|
7091
7095
|
tabIndex: P ? 0 : -1,
|
|
7092
|
-
onKeyDown: (
|
|
7093
|
-
onFocus: (
|
|
7094
|
-
onBlur: (
|
|
7095
|
-
onMouseEnter: (
|
|
7096
|
+
onKeyDown: (L) => g(L, m),
|
|
7097
|
+
onFocus: (L) => d(L, m),
|
|
7098
|
+
onBlur: (L) => h(L, m),
|
|
7099
|
+
onMouseEnter: (L) => y(L, m),
|
|
7096
7100
|
onClick: N,
|
|
7097
7101
|
onMouseDown: V
|
|
7098
|
-
},
|
|
7102
|
+
}, B, {
|
|
7099
7103
|
ownerState: R,
|
|
7100
|
-
children: D ??
|
|
7104
|
+
children: D ?? O.format(m, "dayOfMonth")
|
|
7101
7105
|
}));
|
|
7102
7106
|
});
|
|
7103
7107
|
process.env.NODE_ENV !== "production" && (In.displayName = "PickersDayRaw");
|
|
@@ -7471,17 +7475,17 @@ function yl(e) {
|
|
|
7471
7475
|
slots: b,
|
|
7472
7476
|
slotProps: y,
|
|
7473
7477
|
timezone: D
|
|
7474
|
-
} = n, m = be(), P = _t(D), S = r != null && m.isSameDay(o, r),
|
|
7478
|
+
} = n, m = be(), P = _t(D), S = r != null && m.isSameDay(o, r), x = c && S, k = s.some((V) => m.isSameDay(V, o)), v = m.isSameDay(o, P), A = f.useMemo(() => u || a(o), [u, a, o]), T = f.useMemo(() => m.getMonth(o) !== i, [m, o, i]), B = sr({
|
|
7475
7479
|
day: o,
|
|
7476
7480
|
selected: k,
|
|
7477
7481
|
disabled: A,
|
|
7478
|
-
today:
|
|
7479
|
-
outsideCurrentMonth:
|
|
7482
|
+
today: v,
|
|
7483
|
+
outsideCurrentMonth: T,
|
|
7480
7484
|
disableMargin: void 0,
|
|
7481
7485
|
// This prop can only be defined using slotProps.day so the ownerState for useSlotProps cannot have its value.
|
|
7482
7486
|
disableHighlightToday: d,
|
|
7483
7487
|
showDaysOutsideCurrentMonth: g
|
|
7484
|
-
}), R = b?.day ?? lr,
|
|
7488
|
+
}), R = b?.day ?? lr, F = me({
|
|
7485
7489
|
elementType: R,
|
|
7486
7490
|
externalSlotProps: y?.day,
|
|
7487
7491
|
additionalProps: p({
|
|
@@ -7492,30 +7496,30 @@ function yl(e) {
|
|
|
7492
7496
|
// it is used in date range dragging logic by accessing `dataset.timestamp`
|
|
7493
7497
|
"data-timestamp": m.toJsDate(o).valueOf()
|
|
7494
7498
|
}, l),
|
|
7495
|
-
ownerState: p({},
|
|
7499
|
+
ownerState: p({}, B, {
|
|
7496
7500
|
day: o,
|
|
7497
7501
|
isDayDisabled: A,
|
|
7498
7502
|
isDaySelected: k
|
|
7499
7503
|
})
|
|
7500
|
-
}),
|
|
7504
|
+
}), O = J(F, il), w = f.useMemo(() => {
|
|
7501
7505
|
const V = m.startOfMonth(m.setMonth(o, i));
|
|
7502
7506
|
return g ? m.isSameDay(o, m.startOfWeek(V)) : m.isSameDay(o, V);
|
|
7503
|
-
}, [i, o, g, m]),
|
|
7507
|
+
}, [i, o, g, m]), I = f.useMemo(() => {
|
|
7504
7508
|
const V = m.endOfMonth(m.setMonth(o, i));
|
|
7505
7509
|
return g ? m.isSameDay(o, m.endOfWeek(V)) : m.isSameDay(o, V);
|
|
7506
7510
|
}, [i, o, g, m]);
|
|
7507
|
-
return /* @__PURE__ */ C(R, p({},
|
|
7511
|
+
return /* @__PURE__ */ C(R, p({}, O, {
|
|
7508
7512
|
day: o,
|
|
7509
7513
|
disabled: A,
|
|
7510
|
-
autoFocus: !
|
|
7511
|
-
today:
|
|
7512
|
-
outsideCurrentMonth:
|
|
7514
|
+
autoFocus: !T && x,
|
|
7515
|
+
today: v,
|
|
7516
|
+
outsideCurrentMonth: T,
|
|
7513
7517
|
isFirstVisibleCell: w,
|
|
7514
|
-
isLastVisibleCell:
|
|
7518
|
+
isLastVisibleCell: I,
|
|
7515
7519
|
selected: k,
|
|
7516
7520
|
tabIndex: S ? 0 : -1,
|
|
7517
7521
|
"aria-selected": k,
|
|
7518
|
-
"aria-current":
|
|
7522
|
+
"aria-current": v ? "date" : void 0
|
|
7519
7523
|
}));
|
|
7520
7524
|
}
|
|
7521
7525
|
function Pl(e) {
|
|
@@ -7541,31 +7545,31 @@ function Pl(e) {
|
|
|
7541
7545
|
TransitionProps: m,
|
|
7542
7546
|
disablePast: P,
|
|
7543
7547
|
disableFuture: S,
|
|
7544
|
-
minDate:
|
|
7548
|
+
minDate: x,
|
|
7545
7549
|
maxDate: k,
|
|
7546
|
-
shouldDisableDate:
|
|
7550
|
+
shouldDisableDate: v,
|
|
7547
7551
|
shouldDisableMonth: A,
|
|
7548
|
-
shouldDisableYear:
|
|
7549
|
-
dayOfWeekFormatter:
|
|
7552
|
+
shouldDisableYear: T,
|
|
7553
|
+
dayOfWeekFormatter: B = (_) => o.format(_, "weekdayShort").charAt(0).toUpperCase(),
|
|
7550
7554
|
hasFocus: R,
|
|
7551
|
-
onFocusedViewChange:
|
|
7552
|
-
gridLabelId:
|
|
7555
|
+
onFocusedViewChange: F,
|
|
7556
|
+
gridLabelId: O,
|
|
7553
7557
|
displayWeekNumber: w,
|
|
7554
|
-
fixedWeekNumber:
|
|
7558
|
+
fixedWeekNumber: I,
|
|
7555
7559
|
timezone: V
|
|
7556
|
-
} = n, N = _t(V),
|
|
7557
|
-
shouldDisableDate:
|
|
7560
|
+
} = n, N = _t(V), L = ll(a), M = Ye(), Q = or({
|
|
7561
|
+
shouldDisableDate: v,
|
|
7558
7562
|
shouldDisableMonth: A,
|
|
7559
|
-
shouldDisableYear:
|
|
7560
|
-
minDate:
|
|
7563
|
+
shouldDisableYear: T,
|
|
7564
|
+
minDate: x,
|
|
7561
7565
|
maxDate: k,
|
|
7562
7566
|
disablePast: P,
|
|
7563
7567
|
disableFuture: S,
|
|
7564
7568
|
timezone: V
|
|
7565
|
-
}),
|
|
7569
|
+
}), $ = Ze(), re = H((_) => {
|
|
7566
7570
|
g || d(_);
|
|
7567
7571
|
}), W = (_) => {
|
|
7568
|
-
Q(_) || (r(_),
|
|
7572
|
+
Q(_) || (r(_), F?.(!0));
|
|
7569
7573
|
}, X = H((_, Y) => {
|
|
7570
7574
|
switch (_.key) {
|
|
7571
7575
|
case "ArrowUp":
|
|
@@ -7575,11 +7579,11 @@ function Pl(e) {
|
|
|
7575
7579
|
W(o.addDays(Y, 7)), _.preventDefault();
|
|
7576
7580
|
break;
|
|
7577
7581
|
case "ArrowLeft": {
|
|
7578
|
-
const ne = o.addDays(Y,
|
|
7582
|
+
const ne = o.addDays(Y, M ? 1 : -1), z = o.addMonths(Y, M ? 1 : -1), Z = Mt({
|
|
7579
7583
|
adapter: o,
|
|
7580
7584
|
date: ne,
|
|
7581
|
-
minDate:
|
|
7582
|
-
maxDate:
|
|
7585
|
+
minDate: M ? ne : o.startOfMonth(z),
|
|
7586
|
+
maxDate: M ? o.endOfMonth(z) : ne,
|
|
7583
7587
|
isDateDisabled: Q,
|
|
7584
7588
|
timezone: V
|
|
7585
7589
|
});
|
|
@@ -7587,11 +7591,11 @@ function Pl(e) {
|
|
|
7587
7591
|
break;
|
|
7588
7592
|
}
|
|
7589
7593
|
case "ArrowRight": {
|
|
7590
|
-
const ne = o.addDays(Y,
|
|
7594
|
+
const ne = o.addDays(Y, M ? -1 : 1), z = o.addMonths(Y, M ? -1 : 1), Z = Mt({
|
|
7591
7595
|
adapter: o,
|
|
7592
7596
|
date: ne,
|
|
7593
|
-
minDate:
|
|
7594
|
-
maxDate:
|
|
7597
|
+
minDate: M ? o.startOfMonth(z) : ne,
|
|
7598
|
+
maxDate: M ? ne : o.endOfMonth(z),
|
|
7595
7599
|
isDateDisabled: Q,
|
|
7596
7600
|
timezone: V
|
|
7597
7601
|
});
|
|
@@ -7612,62 +7616,62 @@ function Pl(e) {
|
|
|
7612
7616
|
break;
|
|
7613
7617
|
}
|
|
7614
7618
|
}), ie = H((_, Y) => W(Y)), te = H((_, Y) => {
|
|
7615
|
-
l != null && o.isSameDay(l, Y) &&
|
|
7619
|
+
l != null && o.isSameDay(l, Y) && F?.(!1);
|
|
7616
7620
|
}), ue = o.getMonth(i), oe = o.getYear(i), de = f.useMemo(() => c.filter((_) => !!_).map((_) => o.startOfDay(_)), [o, c]), he = `${oe}-${ue}`, ee = f.useMemo(() => /* @__PURE__ */ f.createRef(), [he]), U = f.useMemo(() => {
|
|
7617
7621
|
const _ = o.getWeekArray(i);
|
|
7618
7622
|
let Y = o.addMonths(i, 1);
|
|
7619
|
-
for (;
|
|
7623
|
+
for (; I && _.length < I; ) {
|
|
7620
7624
|
const ne = o.getWeekArray(Y), z = o.isSameDay(_[_.length - 1][0], ne[0][0]);
|
|
7621
7625
|
ne.slice(z ? 1 : 0).forEach((Z) => {
|
|
7622
|
-
_.length <
|
|
7626
|
+
_.length < I && _.push(Z);
|
|
7623
7627
|
}), Y = o.addMonths(Y, 1);
|
|
7624
7628
|
}
|
|
7625
7629
|
return _;
|
|
7626
|
-
}, [i,
|
|
7630
|
+
}, [i, I, o]);
|
|
7627
7631
|
return /* @__PURE__ */ ge(cl, {
|
|
7628
7632
|
role: "grid",
|
|
7629
|
-
"aria-labelledby":
|
|
7630
|
-
className:
|
|
7633
|
+
"aria-labelledby": O,
|
|
7634
|
+
className: L.root,
|
|
7631
7635
|
children: [/* @__PURE__ */ ge(ul, {
|
|
7632
7636
|
role: "row",
|
|
7633
|
-
className:
|
|
7637
|
+
className: L.header,
|
|
7634
7638
|
children: [w && /* @__PURE__ */ C(pl, {
|
|
7635
7639
|
variant: "caption",
|
|
7636
7640
|
role: "columnheader",
|
|
7637
|
-
"aria-label":
|
|
7638
|
-
className:
|
|
7639
|
-
children:
|
|
7641
|
+
"aria-label": $.calendarWeekNumberHeaderLabel,
|
|
7642
|
+
className: L.weekNumberLabel,
|
|
7643
|
+
children: $.calendarWeekNumberHeaderText
|
|
7640
7644
|
}), cs(o, N).map((_, Y) => /* @__PURE__ */ C(dl, {
|
|
7641
7645
|
variant: "caption",
|
|
7642
7646
|
role: "columnheader",
|
|
7643
7647
|
"aria-label": o.format(_, "weekday"),
|
|
7644
|
-
className:
|
|
7645
|
-
children:
|
|
7648
|
+
className: L.weekDayLabel,
|
|
7649
|
+
children: B(_)
|
|
7646
7650
|
}, Y.toString()))]
|
|
7647
7651
|
}), u ? /* @__PURE__ */ C(ml, {
|
|
7648
|
-
className:
|
|
7652
|
+
className: L.loadingContainer,
|
|
7649
7653
|
children: y()
|
|
7650
7654
|
}) : /* @__PURE__ */ C(hl, p({
|
|
7651
7655
|
transKey: he,
|
|
7652
7656
|
onExited: h,
|
|
7653
7657
|
reduceAnimations: b,
|
|
7654
7658
|
slideDirection: D,
|
|
7655
|
-
className: ke(s,
|
|
7659
|
+
className: ke(s, L.slideTransition)
|
|
7656
7660
|
}, m, {
|
|
7657
7661
|
nodeRef: ee,
|
|
7658
7662
|
children: /* @__PURE__ */ C(bl, {
|
|
7659
7663
|
ref: ee,
|
|
7660
7664
|
role: "rowgroup",
|
|
7661
|
-
className:
|
|
7665
|
+
className: L.monthContainer,
|
|
7662
7666
|
children: U.map((_, Y) => /* @__PURE__ */ ge(gl, {
|
|
7663
7667
|
role: "row",
|
|
7664
|
-
className:
|
|
7668
|
+
className: L.weekContainer,
|
|
7665
7669
|
"aria-rowindex": Y + 1,
|
|
7666
7670
|
children: [w && /* @__PURE__ */ C(fl, {
|
|
7667
|
-
className:
|
|
7671
|
+
className: L.weekNumber,
|
|
7668
7672
|
role: "rowheader",
|
|
7669
|
-
"aria-label":
|
|
7670
|
-
children:
|
|
7673
|
+
"aria-label": $.calendarWeekNumberAriaLabelText(o.getWeekNumber(_[0])),
|
|
7674
|
+
children: $.calendarWeekNumberText(o.getWeekNumber(_[0]))
|
|
7671
7675
|
}), _.map((ne, z) => /* @__PURE__ */ C(yl, {
|
|
7672
7676
|
parentProps: n,
|
|
7673
7677
|
day: ne,
|
|
@@ -7757,7 +7761,7 @@ const Et = xe("MuiMonthCalendar", ["root", "button", "disabled", "selected"]), S
|
|
|
7757
7761
|
Ue(() => {
|
|
7758
7762
|
o && y.current?.focus();
|
|
7759
7763
|
}, [o]);
|
|
7760
|
-
const S = h?.monthButton ?? Dl,
|
|
7764
|
+
const S = h?.monthButton ?? Dl, x = me({
|
|
7761
7765
|
elementType: S,
|
|
7762
7766
|
externalSlotProps: g?.monthButton,
|
|
7763
7767
|
externalForwardedProps: b,
|
|
@@ -7775,7 +7779,7 @@ const Et = xe("MuiMonthCalendar", ["root", "button", "disabled", "selected"]), S
|
|
|
7775
7779
|
ownerState: m,
|
|
7776
7780
|
className: P.button
|
|
7777
7781
|
});
|
|
7778
|
-
return /* @__PURE__ */ C(S, p({},
|
|
7782
|
+
return /* @__PURE__ */ C(S, p({}, x));
|
|
7779
7783
|
});
|
|
7780
7784
|
process.env.NODE_ENV !== "production" && (dr.displayName = "MonthCalendarButton");
|
|
7781
7785
|
const Cl = ["autoFocus", "className", "currentMonth", "classes", "value", "defaultValue", "referenceDate", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onChange", "shouldDisableMonth", "readOnly", "disableHighlightToday", "onMonthFocus", "hasFocus", "onFocusedViewChange", "monthsPerRow", "timezone", "gridLabelId", "slots", "slotProps"], xl = (e) => ye({
|
|
@@ -7835,32 +7839,32 @@ const io = (e, n, o, r, s) => !!(e === n && r && s.isSameYear(o, r)), kl = q("di
|
|
|
7835
7839
|
onChange: m,
|
|
7836
7840
|
shouldDisableMonth: P,
|
|
7837
7841
|
readOnly: S,
|
|
7838
|
-
onMonthFocus:
|
|
7842
|
+
onMonthFocus: x,
|
|
7839
7843
|
hasFocus: k,
|
|
7840
|
-
onFocusedViewChange:
|
|
7844
|
+
onFocusedViewChange: v,
|
|
7841
7845
|
monthsPerRow: A,
|
|
7842
|
-
timezone:
|
|
7843
|
-
gridLabelId:
|
|
7846
|
+
timezone: T,
|
|
7847
|
+
gridLabelId: B,
|
|
7844
7848
|
slots: R,
|
|
7845
|
-
slotProps:
|
|
7846
|
-
} = r,
|
|
7849
|
+
slotProps: F
|
|
7850
|
+
} = r, O = J(r, Cl), {
|
|
7847
7851
|
value: w,
|
|
7848
|
-
handleValueChange:
|
|
7852
|
+
handleValueChange: I,
|
|
7849
7853
|
timezone: V
|
|
7850
7854
|
} = Ft({
|
|
7851
7855
|
name: "MonthCalendar",
|
|
7852
|
-
timezone:
|
|
7856
|
+
timezone: T,
|
|
7853
7857
|
value: l,
|
|
7854
7858
|
defaultValue: u,
|
|
7855
7859
|
referenceDate: d,
|
|
7856
7860
|
onChange: m,
|
|
7857
7861
|
valueManager: qe
|
|
7858
|
-
}), N = _t(V),
|
|
7862
|
+
}), N = _t(V), L = Ye(), M = be(), {
|
|
7859
7863
|
ownerState: Q
|
|
7860
|
-
} = Fe(),
|
|
7864
|
+
} = Fe(), $ = f.useMemo(
|
|
7861
7865
|
() => qe.getInitialReferenceValue({
|
|
7862
7866
|
value: w,
|
|
7863
|
-
adapter:
|
|
7867
|
+
adapter: M,
|
|
7864
7868
|
props: r,
|
|
7865
7869
|
timezone: V,
|
|
7866
7870
|
referenceDate: d,
|
|
@@ -7868,23 +7872,23 @@ const io = (e, n, o, r, s) => !!(e === n && r && s.isSameYear(o, r)), kl = q("di
|
|
|
7868
7872
|
}),
|
|
7869
7873
|
[]
|
|
7870
7874
|
// eslint-disable-line react-hooks/exhaustive-deps
|
|
7871
|
-
), re = xl(c), W = f.useMemo(() =>
|
|
7875
|
+
), re = xl(c), W = f.useMemo(() => M.getMonth(N), [M, N]), X = f.useMemo(() => w != null ? M.getMonth(w) : null, [w, M]), [ie, te] = f.useState(() => X || M.getMonth($)), [ue, oe] = bt({
|
|
7872
7876
|
name: "MonthCalendar",
|
|
7873
7877
|
state: "hasFocus",
|
|
7874
7878
|
controlled: k,
|
|
7875
7879
|
default: s ?? !1
|
|
7876
7880
|
}), de = H((z) => {
|
|
7877
|
-
oe(z),
|
|
7881
|
+
oe(z), v && v(z);
|
|
7878
7882
|
}), he = f.useCallback((z) => {
|
|
7879
|
-
const Z =
|
|
7880
|
-
return
|
|
7881
|
-
}, [g, b, y, D, N, P,
|
|
7883
|
+
const Z = M.startOfMonth(b && M.isAfter(N, D) ? N : D), j = M.startOfMonth(g && M.isBefore(N, y) ? N : y), E = M.startOfMonth(z);
|
|
7884
|
+
return M.isBefore(E, Z) || M.isAfter(E, j) ? !0 : P ? P(E) : !1;
|
|
7885
|
+
}, [g, b, y, D, N, P, M]), ee = H((z, Z) => {
|
|
7882
7886
|
if (S)
|
|
7883
7887
|
return;
|
|
7884
|
-
const
|
|
7885
|
-
|
|
7888
|
+
const E = (w && i && !M.isSameYear(w, i) ? M.setYear(w, M.getYear(i)) : w) ?? i ?? $, G = M.setMonth(E, Z);
|
|
7889
|
+
I(G);
|
|
7886
7890
|
}), U = H((z) => {
|
|
7887
|
-
he(
|
|
7891
|
+
he(M.setMonth(w ?? i ?? $, z)) || (te(z), de(!0), x && x(z));
|
|
7888
7892
|
});
|
|
7889
7893
|
f.useEffect(() => {
|
|
7890
7894
|
te((z) => X !== null && z !== X ? X : z);
|
|
@@ -7898,10 +7902,10 @@ const io = (e, n, o, r, s) => !!(e === n && r && s.isSameYear(o, r)), kl = q("di
|
|
|
7898
7902
|
U((12 + Z + 3) % 12), z.preventDefault();
|
|
7899
7903
|
break;
|
|
7900
7904
|
case "ArrowLeft":
|
|
7901
|
-
U((12 + Z + (
|
|
7905
|
+
U((12 + Z + (L ? 1 : -1)) % 12), z.preventDefault();
|
|
7902
7906
|
break;
|
|
7903
7907
|
case "ArrowRight":
|
|
7904
|
-
U((12 + Z + (
|
|
7908
|
+
U((12 + Z + (L ? -1 : 1)) % 12), z.preventDefault();
|
|
7905
7909
|
break;
|
|
7906
7910
|
}
|
|
7907
7911
|
}), Y = H((z, Z) => {
|
|
@@ -7914,11 +7918,11 @@ const io = (e, n, o, r, s) => !!(e === n && r && s.isSameYear(o, r)), kl = q("di
|
|
|
7914
7918
|
className: ke(re.root, a),
|
|
7915
7919
|
ownerState: Q,
|
|
7916
7920
|
role: "radiogroup",
|
|
7917
|
-
"aria-labelledby":
|
|
7921
|
+
"aria-labelledby": B,
|
|
7918
7922
|
monthsPerRow: A
|
|
7919
|
-
},
|
|
7920
|
-
children: dn(
|
|
7921
|
-
const Z =
|
|
7923
|
+
}, O, {
|
|
7924
|
+
children: dn(M, i ?? w ?? $).map((z) => {
|
|
7925
|
+
const Z = M.getMonth(z), j = M.format(z, "monthShort"), E = M.format(z, "month"), G = io(Z, X, z, w, M), pe = h || he(z);
|
|
7922
7926
|
return /* @__PURE__ */ C(dr, {
|
|
7923
7927
|
selected: G,
|
|
7924
7928
|
value: Z,
|
|
@@ -7929,13 +7933,13 @@ const io = (e, n, o, r, s) => !!(e === n && r && s.isSameYear(o, r)), kl = q("di
|
|
|
7929
7933
|
tabIndex: Z === ie && !pe ? 0 : -1,
|
|
7930
7934
|
onFocus: Y,
|
|
7931
7935
|
onBlur: ne,
|
|
7932
|
-
"aria-current": io(Z, W, z, N,
|
|
7936
|
+
"aria-current": io(Z, W, z, N, M) ? "date" : void 0,
|
|
7933
7937
|
"aria-label": E,
|
|
7934
7938
|
slots: R,
|
|
7935
|
-
slotProps:
|
|
7939
|
+
slotProps: F,
|
|
7936
7940
|
classes: c,
|
|
7937
|
-
children:
|
|
7938
|
-
},
|
|
7941
|
+
children: j
|
|
7942
|
+
}, j);
|
|
7939
7943
|
})
|
|
7940
7944
|
}));
|
|
7941
7945
|
});
|
|
@@ -8117,7 +8121,7 @@ const Nt = xe("MuiYearCalendar", ["root", "button", "disabled", "selected"]), Ol
|
|
|
8117
8121
|
Ue(() => {
|
|
8118
8122
|
o && y.current?.focus();
|
|
8119
8123
|
}, [o]);
|
|
8120
|
-
const S = h?.yearButton ?? Il,
|
|
8124
|
+
const S = h?.yearButton ?? Il, x = me({
|
|
8121
8125
|
elementType: S,
|
|
8122
8126
|
externalSlotProps: g?.yearButton,
|
|
8123
8127
|
externalForwardedProps: b,
|
|
@@ -8135,7 +8139,7 @@ const Nt = xe("MuiYearCalendar", ["root", "button", "disabled", "selected"]), Ol
|
|
|
8135
8139
|
ownerState: m,
|
|
8136
8140
|
className: P.button
|
|
8137
8141
|
});
|
|
8138
|
-
return /* @__PURE__ */ C(S, p({},
|
|
8142
|
+
return /* @__PURE__ */ C(S, p({}, x));
|
|
8139
8143
|
});
|
|
8140
8144
|
process.env.NODE_ENV !== "production" && (fr.displayName = "YearCalendarButton");
|
|
8141
8145
|
const Rl = ["autoFocus", "className", "classes", "value", "defaultValue", "referenceDate", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onChange", "readOnly", "shouldDisableYear", "disableHighlightToday", "onYearFocus", "hasFocus", "onFocusedViewChange", "yearsOrder", "yearsPerRow", "timezone", "gridLabelId", "slots", "slotProps"], Tl = (e) => ye({
|
|
@@ -8207,32 +8211,32 @@ const Vl = q("div", {
|
|
|
8207
8211
|
readOnly: m,
|
|
8208
8212
|
shouldDisableYear: P,
|
|
8209
8213
|
onYearFocus: S,
|
|
8210
|
-
hasFocus:
|
|
8214
|
+
hasFocus: x,
|
|
8211
8215
|
onFocusedViewChange: k,
|
|
8212
|
-
yearsOrder:
|
|
8216
|
+
yearsOrder: v,
|
|
8213
8217
|
yearsPerRow: A,
|
|
8214
|
-
timezone:
|
|
8215
|
-
gridLabelId:
|
|
8218
|
+
timezone: T,
|
|
8219
|
+
gridLabelId: B,
|
|
8216
8220
|
slots: R,
|
|
8217
|
-
slotProps:
|
|
8218
|
-
} = r,
|
|
8221
|
+
slotProps: F
|
|
8222
|
+
} = r, O = J(r, Rl), {
|
|
8219
8223
|
value: w,
|
|
8220
|
-
handleValueChange:
|
|
8224
|
+
handleValueChange: I,
|
|
8221
8225
|
timezone: V
|
|
8222
8226
|
} = Ft({
|
|
8223
8227
|
name: "YearCalendar",
|
|
8224
|
-
timezone:
|
|
8228
|
+
timezone: T,
|
|
8225
8229
|
value: c,
|
|
8226
8230
|
defaultValue: l,
|
|
8227
8231
|
referenceDate: u,
|
|
8228
8232
|
onChange: D,
|
|
8229
8233
|
valueManager: qe
|
|
8230
|
-
}), N = _t(V),
|
|
8234
|
+
}), N = _t(V), L = Ye(), M = be(), {
|
|
8231
8235
|
ownerState: Q
|
|
8232
|
-
} = Fe(),
|
|
8236
|
+
} = Fe(), $ = f.useMemo(
|
|
8233
8237
|
() => qe.getInitialReferenceValue({
|
|
8234
8238
|
value: w,
|
|
8235
|
-
adapter:
|
|
8239
|
+
adapter: M,
|
|
8236
8240
|
props: r,
|
|
8237
8241
|
timezone: V,
|
|
8238
8242
|
referenceDate: u,
|
|
@@ -8240,32 +8244,32 @@ const Vl = q("div", {
|
|
|
8240
8244
|
}),
|
|
8241
8245
|
[]
|
|
8242
8246
|
// eslint-disable-line react-hooks/exhaustive-deps
|
|
8243
|
-
), re = Tl(i), W = f.useMemo(() =>
|
|
8247
|
+
), re = Tl(i), W = f.useMemo(() => M.getYear(N), [M, N]), X = f.useMemo(() => w != null ? M.getYear(w) : null, [w, M]), [ie, te] = f.useState(() => X || M.getYear($)), [ue, oe] = bt({
|
|
8244
8248
|
name: "YearCalendar",
|
|
8245
8249
|
state: "hasFocus",
|
|
8246
|
-
controlled:
|
|
8250
|
+
controlled: x,
|
|
8247
8251
|
default: s ?? !1
|
|
8248
8252
|
}), de = H((K) => {
|
|
8249
8253
|
oe(K), k && k(K);
|
|
8250
8254
|
}), he = f.useCallback((K) => {
|
|
8251
|
-
if (g &&
|
|
8255
|
+
if (g && M.isBeforeYear(K, N) || h && M.isAfterYear(K, N) || y && M.isBeforeYear(K, y) || b && M.isAfterYear(K, b))
|
|
8252
8256
|
return !0;
|
|
8253
8257
|
if (!P)
|
|
8254
8258
|
return !1;
|
|
8255
|
-
const se =
|
|
8259
|
+
const se = M.startOfYear(K);
|
|
8256
8260
|
return P(se);
|
|
8257
|
-
}, [h, g, b, y, N, P,
|
|
8261
|
+
}, [h, g, b, y, N, P, M]), ee = H((K, se) => {
|
|
8258
8262
|
if (m)
|
|
8259
8263
|
return;
|
|
8260
|
-
const Se =
|
|
8261
|
-
|
|
8264
|
+
const Se = M.setYear(w ?? $, se);
|
|
8265
|
+
I(Se);
|
|
8262
8266
|
}), U = H((K) => {
|
|
8263
|
-
he(
|
|
8267
|
+
he(M.setYear(w ?? $, K)) || (te(K), de(!0), S?.(K));
|
|
8264
8268
|
});
|
|
8265
8269
|
f.useEffect(() => {
|
|
8266
8270
|
te((K) => X !== null && K !== X ? X : K);
|
|
8267
8271
|
}, [X]);
|
|
8268
|
-
const _ =
|
|
8272
|
+
const _ = v !== "desc" ? A * 1 : A * -1, Y = L && v === "asc" || !L && v === "desc" ? -1 : 1, ne = H((K, se) => {
|
|
8269
8273
|
switch (K.key) {
|
|
8270
8274
|
case "ArrowUp":
|
|
8271
8275
|
U(se - _), K.preventDefault();
|
|
@@ -8284,29 +8288,29 @@ const Vl = q("div", {
|
|
|
8284
8288
|
U(se);
|
|
8285
8289
|
}), Z = H((K, se) => {
|
|
8286
8290
|
ie === se && de(!1);
|
|
8287
|
-
}),
|
|
8291
|
+
}), j = f.useRef(null), E = Ve(o, j);
|
|
8288
8292
|
f.useEffect(() => {
|
|
8289
|
-
if (s ||
|
|
8293
|
+
if (s || j.current === null)
|
|
8290
8294
|
return;
|
|
8291
|
-
const K =
|
|
8295
|
+
const K = j.current.querySelector('[tabindex="0"]');
|
|
8292
8296
|
if (!K)
|
|
8293
8297
|
return;
|
|
8294
|
-
const se = K.offsetHeight, Se = K.offsetTop, Ce =
|
|
8295
|
-
se > Ce || Se < Me || (
|
|
8298
|
+
const se = K.offsetHeight, Se = K.offsetTop, Ce = j.current.clientHeight, Me = j.current.scrollTop, Le = Se + se;
|
|
8299
|
+
se > Ce || Se < Me || (j.current.scrollTop = Le - Ce / 2 - se / 2);
|
|
8296
8300
|
}, [s]);
|
|
8297
|
-
const G =
|
|
8298
|
-
|
|
8301
|
+
const G = M.getYearRange([y, b]);
|
|
8302
|
+
v === "desc" && G.reverse();
|
|
8299
8303
|
let pe = A - G.length % A;
|
|
8300
8304
|
return pe === A && (pe = 0), /* @__PURE__ */ ge(Vl, p({
|
|
8301
8305
|
ref: E,
|
|
8302
8306
|
className: ke(re.root, a),
|
|
8303
8307
|
ownerState: Q,
|
|
8304
8308
|
role: "radiogroup",
|
|
8305
|
-
"aria-labelledby":
|
|
8309
|
+
"aria-labelledby": B,
|
|
8306
8310
|
yearsPerRow: A
|
|
8307
|
-
},
|
|
8311
|
+
}, O, {
|
|
8308
8312
|
children: [G.map((K) => {
|
|
8309
|
-
const se =
|
|
8313
|
+
const se = M.getYear(K), Se = se === X, Ce = d || he(K);
|
|
8310
8314
|
return /* @__PURE__ */ C(fr, {
|
|
8311
8315
|
selected: Se,
|
|
8312
8316
|
value: se,
|
|
@@ -8319,10 +8323,10 @@ const Vl = q("div", {
|
|
|
8319
8323
|
onBlur: Z,
|
|
8320
8324
|
"aria-current": W === se ? "date" : void 0,
|
|
8321
8325
|
slots: R,
|
|
8322
|
-
slotProps:
|
|
8326
|
+
slotProps: F,
|
|
8323
8327
|
classes: i,
|
|
8324
|
-
children:
|
|
8325
|
-
},
|
|
8328
|
+
children: M.format(K, "year")
|
|
8329
|
+
}, M.format(K, "year"));
|
|
8326
8330
|
}), Array.from({
|
|
8327
8331
|
length: pe
|
|
8328
8332
|
}, (K, se) => /* @__PURE__ */ C(El, {}, se))]
|
|
@@ -8497,35 +8501,35 @@ const Bl = ["children", "className", "slots", "slotProps", "isNextDisabled", "is
|
|
|
8497
8501
|
previousLabel: m,
|
|
8498
8502
|
labelId: P,
|
|
8499
8503
|
classes: S
|
|
8500
|
-
} = s,
|
|
8504
|
+
} = s, x = J(s, Bl), {
|
|
8501
8505
|
ownerState: k
|
|
8502
|
-
} = Fe(),
|
|
8506
|
+
} = Fe(), v = Hl(S), A = {
|
|
8503
8507
|
isDisabled: u,
|
|
8504
8508
|
isHidden: d,
|
|
8505
8509
|
goTo: h,
|
|
8506
8510
|
label: g
|
|
8507
|
-
},
|
|
8511
|
+
}, T = {
|
|
8508
8512
|
isDisabled: b,
|
|
8509
8513
|
isHidden: y,
|
|
8510
8514
|
goTo: D,
|
|
8511
8515
|
label: m
|
|
8512
|
-
},
|
|
8513
|
-
elementType:
|
|
8516
|
+
}, B = c?.previousIconButton ?? lo, R = me({
|
|
8517
|
+
elementType: B,
|
|
8514
8518
|
externalSlotProps: l?.previousIconButton,
|
|
8515
8519
|
additionalProps: {
|
|
8516
8520
|
size: "medium",
|
|
8517
|
-
title:
|
|
8518
|
-
"aria-label":
|
|
8519
|
-
disabled:
|
|
8521
|
+
title: T.label,
|
|
8522
|
+
"aria-label": T.label,
|
|
8523
|
+
disabled: T.isDisabled,
|
|
8520
8524
|
edge: "end",
|
|
8521
|
-
onClick:
|
|
8525
|
+
onClick: T.goTo
|
|
8522
8526
|
},
|
|
8523
8527
|
ownerState: p({}, k, {
|
|
8524
|
-
isButtonHidden:
|
|
8528
|
+
isButtonHidden: T.isHidden ?? !1
|
|
8525
8529
|
}),
|
|
8526
|
-
className: ke(
|
|
8527
|
-
}),
|
|
8528
|
-
elementType:
|
|
8530
|
+
className: ke(v.button, v.previousIconButton)
|
|
8531
|
+
}), F = c?.nextIconButton ?? lo, O = me({
|
|
8532
|
+
elementType: F,
|
|
8529
8533
|
externalSlotProps: l?.nextIconButton,
|
|
8530
8534
|
additionalProps: {
|
|
8531
8535
|
size: "medium",
|
|
@@ -8538,41 +8542,41 @@ const Bl = ["children", "className", "slots", "slotProps", "isNextDisabled", "is
|
|
|
8538
8542
|
ownerState: p({}, k, {
|
|
8539
8543
|
isButtonHidden: A.isHidden ?? !1
|
|
8540
8544
|
}),
|
|
8541
|
-
className: ke(
|
|
8542
|
-
}), w = c?.leftArrowIcon ?? Ua,
|
|
8545
|
+
className: ke(v.button, v.nextIconButton)
|
|
8546
|
+
}), w = c?.leftArrowIcon ?? Ua, I = me({
|
|
8543
8547
|
elementType: w,
|
|
8544
8548
|
externalSlotProps: l?.leftArrowIcon,
|
|
8545
8549
|
additionalProps: {
|
|
8546
8550
|
fontSize: "inherit"
|
|
8547
8551
|
},
|
|
8548
8552
|
ownerState: k,
|
|
8549
|
-
className:
|
|
8550
|
-
}), V = J(
|
|
8553
|
+
className: v.leftArrowIcon
|
|
8554
|
+
}), V = J(I, $l), N = c?.rightArrowIcon ?? Ya, L = me({
|
|
8551
8555
|
elementType: N,
|
|
8552
8556
|
externalSlotProps: l?.rightArrowIcon,
|
|
8553
8557
|
additionalProps: {
|
|
8554
8558
|
fontSize: "inherit"
|
|
8555
8559
|
},
|
|
8556
8560
|
ownerState: k,
|
|
8557
|
-
className:
|
|
8558
|
-
}),
|
|
8561
|
+
className: v.rightArrowIcon
|
|
8562
|
+
}), M = J(L, jl);
|
|
8559
8563
|
return /* @__PURE__ */ ge(_l, p({
|
|
8560
8564
|
ref: o,
|
|
8561
|
-
className: ke(
|
|
8565
|
+
className: ke(v.root, i),
|
|
8562
8566
|
ownerState: k
|
|
8563
|
-
},
|
|
8564
|
-
children: [/* @__PURE__ */ C(
|
|
8565
|
-
children: r ? /* @__PURE__ */ C(N, p({},
|
|
8567
|
+
}, x, {
|
|
8568
|
+
children: [/* @__PURE__ */ C(B, p({}, R, {
|
|
8569
|
+
children: r ? /* @__PURE__ */ C(N, p({}, M)) : /* @__PURE__ */ C(w, p({}, V))
|
|
8566
8570
|
})), a ? /* @__PURE__ */ C(Pt, {
|
|
8567
8571
|
variant: "subtitle1",
|
|
8568
8572
|
component: "span",
|
|
8569
8573
|
id: P,
|
|
8570
8574
|
children: a
|
|
8571
8575
|
}) : /* @__PURE__ */ C(Wl, {
|
|
8572
|
-
className:
|
|
8576
|
+
className: v.spacer,
|
|
8573
8577
|
ownerState: k
|
|
8574
|
-
}), /* @__PURE__ */ C(
|
|
8575
|
-
children: r ? /* @__PURE__ */ C(w, p({}, V)) : /* @__PURE__ */ C(N, p({},
|
|
8578
|
+
}), /* @__PURE__ */ C(F, p({}, O, {
|
|
8579
|
+
children: r ? /* @__PURE__ */ C(w, p({}, V)) : /* @__PURE__ */ C(N, p({}, M))
|
|
8576
8580
|
}))]
|
|
8577
8581
|
}));
|
|
8578
8582
|
});
|
|
@@ -8678,15 +8682,15 @@ const Ul = ["slots", "slotProps", "currentMonth", "disabled", "disableFuture", "
|
|
|
8678
8682
|
view: m,
|
|
8679
8683
|
reduceAnimations: P,
|
|
8680
8684
|
views: S,
|
|
8681
|
-
labelId:
|
|
8685
|
+
labelId: x,
|
|
8682
8686
|
className: k,
|
|
8683
|
-
classes:
|
|
8687
|
+
classes: v,
|
|
8684
8688
|
timezone: A,
|
|
8685
|
-
format:
|
|
8686
|
-
} = a,
|
|
8689
|
+
format: T = `${s.formats.month} ${s.formats.year}`
|
|
8690
|
+
} = a, B = J(a, Ul), {
|
|
8687
8691
|
ownerState: R
|
|
8688
|
-
} = Fe(),
|
|
8689
|
-
elementType:
|
|
8692
|
+
} = Fe(), F = Kl(v), O = i?.switchViewButton ?? Zl, w = me({
|
|
8693
|
+
elementType: O,
|
|
8690
8694
|
externalSlotProps: c?.switchViewButton,
|
|
8691
8695
|
additionalProps: {
|
|
8692
8696
|
size: "small",
|
|
@@ -8695,17 +8699,17 @@ const Ul = ["slots", "slotProps", "currentMonth", "disabled", "disableFuture", "
|
|
|
8695
8699
|
ownerState: p({}, R, {
|
|
8696
8700
|
view: m
|
|
8697
8701
|
}),
|
|
8698
|
-
className:
|
|
8699
|
-
}),
|
|
8700
|
-
elementType:
|
|
8702
|
+
className: F.switchViewButton
|
|
8703
|
+
}), I = i?.switchViewIcon ?? Jl, V = me({
|
|
8704
|
+
elementType: I,
|
|
8701
8705
|
externalSlotProps: c?.switchViewIcon,
|
|
8702
8706
|
ownerState: R,
|
|
8703
|
-
className:
|
|
8704
|
-
}), N = J(V, Yl),
|
|
8707
|
+
className: F.switchViewIcon
|
|
8708
|
+
}), N = J(V, Yl), L = () => y(s.addMonths(l, 1)), M = () => y(s.addMonths(l, -1)), Q = ql(l, {
|
|
8705
8709
|
disableFuture: d,
|
|
8706
8710
|
maxDate: g,
|
|
8707
8711
|
timezone: A
|
|
8708
|
-
}),
|
|
8712
|
+
}), $ = zl(l, {
|
|
8709
8713
|
disablePast: h,
|
|
8710
8714
|
minDate: b,
|
|
8711
8715
|
timezone: A
|
|
@@ -8720,28 +8724,28 @@ const Ul = ["slots", "slotProps", "currentMonth", "disabled", "disableFuture", "
|
|
|
8720
8724
|
};
|
|
8721
8725
|
if (S.length === 1 && S[0] === "year")
|
|
8722
8726
|
return null;
|
|
8723
|
-
const W = s.formatByString(l,
|
|
8724
|
-
return /* @__PURE__ */ ge(Gl, p({},
|
|
8727
|
+
const W = s.formatByString(l, T);
|
|
8728
|
+
return /* @__PURE__ */ ge(Gl, p({}, B, {
|
|
8725
8729
|
ownerState: R,
|
|
8726
|
-
className: ke(
|
|
8730
|
+
className: ke(F.root, k),
|
|
8727
8731
|
ref: o,
|
|
8728
8732
|
children: [/* @__PURE__ */ ge(Ql, {
|
|
8729
8733
|
role: "presentation",
|
|
8730
8734
|
onClick: re,
|
|
8731
8735
|
ownerState: R,
|
|
8732
8736
|
"aria-live": "polite",
|
|
8733
|
-
className:
|
|
8737
|
+
className: F.labelContainer,
|
|
8734
8738
|
children: [/* @__PURE__ */ C(rr, {
|
|
8735
8739
|
reduceAnimations: P,
|
|
8736
8740
|
transKey: W,
|
|
8737
8741
|
children: /* @__PURE__ */ C(Xl, {
|
|
8738
|
-
id:
|
|
8742
|
+
id: x,
|
|
8739
8743
|
ownerState: R,
|
|
8740
|
-
className:
|
|
8744
|
+
className: F.label,
|
|
8741
8745
|
children: W
|
|
8742
8746
|
})
|
|
8743
|
-
}), S.length > 1 && !u && /* @__PURE__ */ C(
|
|
8744
|
-
children: /* @__PURE__ */ C(
|
|
8747
|
+
}), S.length > 1 && !u && /* @__PURE__ */ C(O, p({}, w, {
|
|
8748
|
+
children: /* @__PURE__ */ C(I, p({}, N))
|
|
8745
8749
|
}))]
|
|
8746
8750
|
}), /* @__PURE__ */ C(Lt, {
|
|
8747
8751
|
in: m === "day",
|
|
@@ -8750,10 +8754,10 @@ const Ul = ["slots", "slotProps", "currentMonth", "disabled", "disableFuture", "
|
|
|
8750
8754
|
children: /* @__PURE__ */ C(mr, {
|
|
8751
8755
|
slots: i,
|
|
8752
8756
|
slotProps: c,
|
|
8753
|
-
onGoToPrevious:
|
|
8754
|
-
isPreviousDisabled:
|
|
8757
|
+
onGoToPrevious: M,
|
|
8758
|
+
isPreviousDisabled: $,
|
|
8755
8759
|
previousLabel: r.previousMonth,
|
|
8756
|
-
onGoToNext:
|
|
8760
|
+
onGoToNext: L,
|
|
8757
8761
|
isNextDisabled: Q,
|
|
8758
8762
|
nextLabel: r.nextMonth
|
|
8759
8763
|
})
|
|
@@ -8860,23 +8864,23 @@ const sc = q(ec, {
|
|
|
8860
8864
|
reduceAnimations: m,
|
|
8861
8865
|
shouldDisableDate: P,
|
|
8862
8866
|
shouldDisableMonth: S,
|
|
8863
|
-
shouldDisableYear:
|
|
8867
|
+
shouldDisableYear: x,
|
|
8864
8868
|
view: k,
|
|
8865
|
-
views:
|
|
8869
|
+
views: v,
|
|
8866
8870
|
openTo: A,
|
|
8867
|
-
className:
|
|
8868
|
-
classes:
|
|
8871
|
+
className: T,
|
|
8872
|
+
classes: B,
|
|
8869
8873
|
disabled: R,
|
|
8870
|
-
readOnly:
|
|
8871
|
-
minDate:
|
|
8874
|
+
readOnly: F,
|
|
8875
|
+
minDate: O,
|
|
8872
8876
|
maxDate: w,
|
|
8873
|
-
disableHighlightToday:
|
|
8877
|
+
disableHighlightToday: I,
|
|
8874
8878
|
focusedView: V,
|
|
8875
8879
|
onFocusedViewChange: N,
|
|
8876
|
-
showDaysOutsideCurrentMonth:
|
|
8877
|
-
fixedWeekNumber:
|
|
8880
|
+
showDaysOutsideCurrentMonth: L,
|
|
8881
|
+
fixedWeekNumber: M,
|
|
8878
8882
|
dayOfWeekFormatter: Q,
|
|
8879
|
-
slots:
|
|
8883
|
+
slots: $,
|
|
8880
8884
|
slotProps: re,
|
|
8881
8885
|
loading: W,
|
|
8882
8886
|
renderLoading: X,
|
|
@@ -8902,11 +8906,11 @@ const sc = q(ec, {
|
|
|
8902
8906
|
setView: ne,
|
|
8903
8907
|
focusedView: z,
|
|
8904
8908
|
setFocusedView: Z,
|
|
8905
|
-
goToNextView:
|
|
8909
|
+
goToNextView: j,
|
|
8906
8910
|
setValueAndGoToNextView: E
|
|
8907
8911
|
} = Bo({
|
|
8908
8912
|
view: k,
|
|
8909
|
-
views:
|
|
8913
|
+
views: v,
|
|
8910
8914
|
openTo: A,
|
|
8911
8915
|
onChange: U,
|
|
8912
8916
|
onViewChange: l,
|
|
@@ -8924,18 +8928,18 @@ const sc = q(ec, {
|
|
|
8924
8928
|
referenceDate: h,
|
|
8925
8929
|
reduceAnimations: m,
|
|
8926
8930
|
onMonthChange: D,
|
|
8927
|
-
minDate:
|
|
8931
|
+
minDate: O,
|
|
8928
8932
|
maxDate: w,
|
|
8929
8933
|
shouldDisableDate: P,
|
|
8930
8934
|
disablePast: b,
|
|
8931
8935
|
disableFuture: g,
|
|
8932
8936
|
timezone: _,
|
|
8933
8937
|
getCurrentMonthFromVisibleDate: (ce, Re) => r.isSameMonth(ce, Re) ? Re : r.startOfMonth(ce)
|
|
8934
|
-
}), Ce = R && ee ||
|
|
8938
|
+
}), Ce = R && ee || O, Me = R && ee || w, Le = `${a}-grid-label`, Ke = z !== null, it = $?.calendarHeader ?? Fn, lt = me({
|
|
8935
8939
|
elementType: it,
|
|
8936
8940
|
externalSlotProps: re?.calendarHeader,
|
|
8937
8941
|
additionalProps: {
|
|
8938
|
-
views:
|
|
8942
|
+
views: v,
|
|
8939
8943
|
view: Y,
|
|
8940
8944
|
currentMonth: pe.currentMonth,
|
|
8941
8945
|
onViewChange: ne,
|
|
@@ -8957,7 +8961,7 @@ const sc = q(ec, {
|
|
|
8957
8961
|
const Re = r.startOfMonth(ce), Ee = r.endOfMonth(ce), Be = se(ce) ? Mt({
|
|
8958
8962
|
adapter: r,
|
|
8959
8963
|
date: ce,
|
|
8960
|
-
minDate: r.isBefore(
|
|
8964
|
+
minDate: r.isBefore(O, Re) ? Re : O,
|
|
8961
8965
|
maxDate: r.isAfter(w, Ee) ? Ee : w,
|
|
8962
8966
|
disablePast: b,
|
|
8963
8967
|
disableFuture: g,
|
|
@@ -8967,7 +8971,7 @@ const sc = q(ec, {
|
|
|
8967
8971
|
Be ? (E(Be, "finish"), K({
|
|
8968
8972
|
target: Be,
|
|
8969
8973
|
reason: "cell-interaction"
|
|
8970
|
-
})) : (
|
|
8974
|
+
})) : (j(), K({
|
|
8971
8975
|
target: Re,
|
|
8972
8976
|
reason: "cell-interaction"
|
|
8973
8977
|
}));
|
|
@@ -8975,7 +8979,7 @@ const sc = q(ec, {
|
|
|
8975
8979
|
const Re = r.startOfYear(ce), Ee = r.endOfYear(ce), Be = se(ce) ? Mt({
|
|
8976
8980
|
adapter: r,
|
|
8977
8981
|
date: ce,
|
|
8978
|
-
minDate: r.isBefore(
|
|
8982
|
+
minDate: r.isBefore(O, Re) ? Re : O,
|
|
8979
8983
|
maxDate: r.isAfter(w, Ee) ? Ee : w,
|
|
8980
8984
|
disablePast: b,
|
|
8981
8985
|
disableFuture: g,
|
|
@@ -8985,7 +8989,7 @@ const sc = q(ec, {
|
|
|
8985
8989
|
Be ? (E(Be, "finish"), K({
|
|
8986
8990
|
target: Be,
|
|
8987
8991
|
reason: "cell-interaction"
|
|
8988
|
-
})) : (
|
|
8992
|
+
})) : (j(), K({
|
|
8989
8993
|
target: Re,
|
|
8990
8994
|
reason: "cell-interaction"
|
|
8991
8995
|
}));
|
|
@@ -8996,18 +9000,18 @@ const sc = q(ec, {
|
|
|
8996
9000
|
reason: "controlled-value-change"
|
|
8997
9001
|
});
|
|
8998
9002
|
}, [ee]);
|
|
8999
|
-
const we = oc(
|
|
9003
|
+
const we = oc(B), Oe = {
|
|
9000
9004
|
disablePast: b,
|
|
9001
9005
|
disableFuture: g,
|
|
9002
9006
|
maxDate: w,
|
|
9003
|
-
minDate:
|
|
9007
|
+
minDate: O
|
|
9004
9008
|
}, Ie = {
|
|
9005
|
-
disableHighlightToday:
|
|
9006
|
-
readOnly:
|
|
9009
|
+
disableHighlightToday: I,
|
|
9010
|
+
readOnly: F,
|
|
9007
9011
|
disabled: R,
|
|
9008
9012
|
timezone: _,
|
|
9009
9013
|
gridLabelId: Le,
|
|
9010
|
-
slots:
|
|
9014
|
+
slots: $,
|
|
9011
9015
|
slotProps: re
|
|
9012
9016
|
}, ve = f.useRef(Y);
|
|
9013
9017
|
f.useEffect(() => {
|
|
@@ -9016,11 +9020,11 @@ const sc = q(ec, {
|
|
|
9016
9020
|
const je = f.useMemo(() => [ee], [ee]);
|
|
9017
9021
|
return /* @__PURE__ */ ge(sc, p({
|
|
9018
9022
|
ref: o,
|
|
9019
|
-
className: ke(we.root,
|
|
9023
|
+
className: ke(we.root, T),
|
|
9020
9024
|
ownerState: s
|
|
9021
9025
|
}, he, {
|
|
9022
9026
|
children: [/* @__PURE__ */ C(it, p({}, lt, {
|
|
9023
|
-
slots:
|
|
9027
|
+
slots: $,
|
|
9024
9028
|
slotProps: re
|
|
9025
9029
|
})), /* @__PURE__ */ C(ac, {
|
|
9026
9030
|
reduceAnimations: m,
|
|
@@ -9031,7 +9035,7 @@ const sc = q(ec, {
|
|
|
9031
9035
|
children: [Y === "year" && /* @__PURE__ */ C(Tn, p({}, Oe, Ie, {
|
|
9032
9036
|
value: ee,
|
|
9033
9037
|
onChange: le,
|
|
9034
|
-
shouldDisableYear:
|
|
9038
|
+
shouldDisableYear: x,
|
|
9035
9039
|
hasFocus: Ke,
|
|
9036
9040
|
onFocusedViewChange: (ce) => Z("year", ce),
|
|
9037
9041
|
yearsOrder: te,
|
|
@@ -9040,7 +9044,7 @@ const sc = q(ec, {
|
|
|
9040
9044
|
})), Y === "month" && /* @__PURE__ */ C(Rn, p({}, Oe, Ie, {
|
|
9041
9045
|
currentMonth: pe.currentMonth,
|
|
9042
9046
|
hasFocus: Ke,
|
|
9043
|
-
className:
|
|
9047
|
+
className: T,
|
|
9044
9048
|
value: ee,
|
|
9045
9049
|
onChange: ae,
|
|
9046
9050
|
shouldDisableMonth: S,
|
|
@@ -9059,10 +9063,10 @@ const sc = q(ec, {
|
|
|
9059
9063
|
onSelectedDaysChange: fe,
|
|
9060
9064
|
shouldDisableDate: P,
|
|
9061
9065
|
shouldDisableMonth: S,
|
|
9062
|
-
shouldDisableYear:
|
|
9066
|
+
shouldDisableYear: x,
|
|
9063
9067
|
onFocusedViewChange: (ce) => Z("day", ce),
|
|
9064
|
-
showDaysOutsideCurrentMonth:
|
|
9065
|
-
fixedWeekNumber:
|
|
9068
|
+
showDaysOutsideCurrentMonth: L,
|
|
9069
|
+
fixedWeekNumber: M,
|
|
9066
9070
|
dayOfWeekFormatter: Q,
|
|
9067
9071
|
displayWeekNumber: ie,
|
|
9068
9072
|
loading: W,
|
|
@@ -9318,23 +9322,23 @@ const ot = ({
|
|
|
9318
9322
|
shouldDisableMonth: m,
|
|
9319
9323
|
shouldDisableYear: P,
|
|
9320
9324
|
reduceAnimations: S,
|
|
9321
|
-
onMonthChange:
|
|
9325
|
+
onMonthChange: x,
|
|
9322
9326
|
monthsPerRow: k,
|
|
9323
|
-
onYearChange:
|
|
9327
|
+
onYearChange: v,
|
|
9324
9328
|
yearsOrder: A,
|
|
9325
|
-
yearsPerRow:
|
|
9326
|
-
slots:
|
|
9329
|
+
yearsPerRow: T,
|
|
9330
|
+
slots: B,
|
|
9327
9331
|
slotProps: R,
|
|
9328
|
-
loading:
|
|
9329
|
-
renderLoading:
|
|
9332
|
+
loading: F,
|
|
9333
|
+
renderLoading: O,
|
|
9330
9334
|
disableHighlightToday: w,
|
|
9331
|
-
readOnly:
|
|
9335
|
+
readOnly: I,
|
|
9332
9336
|
disabled: V,
|
|
9333
9337
|
showDaysOutsideCurrentMonth: N,
|
|
9334
|
-
dayOfWeekFormatter:
|
|
9335
|
-
sx:
|
|
9338
|
+
dayOfWeekFormatter: L,
|
|
9339
|
+
sx: M,
|
|
9336
9340
|
autoFocus: Q,
|
|
9337
|
-
fixedWeekNumber:
|
|
9341
|
+
fixedWeekNumber: $,
|
|
9338
9342
|
displayWeekNumber: re,
|
|
9339
9343
|
timezone: W
|
|
9340
9344
|
}) => /* @__PURE__ */ C(Vn, {
|
|
@@ -9357,23 +9361,23 @@ const ot = ({
|
|
|
9357
9361
|
shouldDisableMonth: m,
|
|
9358
9362
|
shouldDisableYear: P,
|
|
9359
9363
|
reduceAnimations: S,
|
|
9360
|
-
onMonthChange:
|
|
9364
|
+
onMonthChange: x,
|
|
9361
9365
|
monthsPerRow: k,
|
|
9362
|
-
onYearChange:
|
|
9366
|
+
onYearChange: v,
|
|
9363
9367
|
yearsOrder: A,
|
|
9364
|
-
yearsPerRow:
|
|
9365
|
-
slots:
|
|
9368
|
+
yearsPerRow: T,
|
|
9369
|
+
slots: B,
|
|
9366
9370
|
slotProps: R,
|
|
9367
|
-
loading:
|
|
9368
|
-
renderLoading:
|
|
9371
|
+
loading: F,
|
|
9372
|
+
renderLoading: O,
|
|
9369
9373
|
disableHighlightToday: w,
|
|
9370
|
-
readOnly:
|
|
9374
|
+
readOnly: I,
|
|
9371
9375
|
disabled: V,
|
|
9372
9376
|
showDaysOutsideCurrentMonth: N,
|
|
9373
|
-
dayOfWeekFormatter:
|
|
9374
|
-
sx:
|
|
9377
|
+
dayOfWeekFormatter: L,
|
|
9378
|
+
sx: M,
|
|
9375
9379
|
autoFocus: Q,
|
|
9376
|
-
fixedWeekNumber:
|
|
9380
|
+
fixedWeekNumber: $,
|
|
9377
9381
|
displayWeekNumber: re,
|
|
9378
9382
|
timezone: W
|
|
9379
9383
|
});
|
|
@@ -9801,16 +9805,16 @@ const uc = ["props", "steps"], dc = ["ownerState"], pc = (e) => {
|
|
|
9801
9805
|
}),
|
|
9802
9806
|
ownerState: g
|
|
9803
9807
|
}), P = J(m, dc), S = s.layout ?? qt;
|
|
9804
|
-
let
|
|
9805
|
-
y && (i ?
|
|
9808
|
+
let x = b;
|
|
9809
|
+
y && (i ? x = `${b}-label` : x = void 0);
|
|
9806
9810
|
const k = p({}, a, {
|
|
9807
9811
|
toolbar: p({}, a?.toolbar, {
|
|
9808
9812
|
titleId: b
|
|
9809
9813
|
}),
|
|
9810
9814
|
mobilePaper: p({
|
|
9811
|
-
"aria-labelledby":
|
|
9815
|
+
"aria-labelledby": x
|
|
9812
9816
|
}, a?.mobilePaper)
|
|
9813
|
-
}),
|
|
9817
|
+
}), v = () => /* @__PURE__ */ ge(vo, p({}, d, {
|
|
9814
9818
|
children: [/* @__PURE__ */ C(D, p({}, P, {
|
|
9815
9819
|
slots: p({}, s, P.slots),
|
|
9816
9820
|
slotProps: p({}, k, P.slotProps),
|
|
@@ -9825,8 +9829,8 @@ const uc = ["props", "steps"], dc = ["ownerState"], pc = (e) => {
|
|
|
9825
9829
|
}))
|
|
9826
9830
|
})]
|
|
9827
9831
|
}));
|
|
9828
|
-
return process.env.NODE_ENV !== "production" && (
|
|
9829
|
-
renderPicker:
|
|
9832
|
+
return process.env.NODE_ENV !== "production" && (v.displayName = "renderPicker"), {
|
|
9833
|
+
renderPicker: v
|
|
9830
9834
|
};
|
|
9831
9835
|
}, Nn = /* @__PURE__ */ f.forwardRef(function(n, o) {
|
|
9832
9836
|
const r = be(), s = Vo(n, "MuiMobileDatePicker"), a = p({
|
|
@@ -10526,8 +10530,8 @@ const mc = {
|
|
|
10526
10530
|
name: "DateField",
|
|
10527
10531
|
slot: "Root",
|
|
10528
10532
|
shouldForwardProp: (e) => e !== "error" && e !== "disabled" && e !== "slotProps" && e !== "inputRef"
|
|
10529
|
-
})(({ theme: e, error: n, color: o = "primary", disabled: r }) => {
|
|
10530
|
-
const
|
|
10533
|
+
})(({ theme: e, error: n, color: o = "primary", disabled: r, size: s = "small" }) => {
|
|
10534
|
+
const a = n ? e.vars?.palette.error.main : o && e.vars?.palette[o]?.main, i = n ? e.vars?.palette.error.light : o && e.vars?.palette[o]?.light;
|
|
10531
10535
|
return {
|
|
10532
10536
|
display: "flex",
|
|
10533
10537
|
alignItems: "center",
|
|
@@ -10536,9 +10540,10 @@ const mc = {
|
|
|
10536
10540
|
borderRadius: e.shape.borderRadius,
|
|
10537
10541
|
borderStyle: "solid",
|
|
10538
10542
|
borderWidth: "1px",
|
|
10543
|
+
minHeight: s === "medium" ? "40px" : "32px",
|
|
10539
10544
|
"&:focus-within": {
|
|
10540
|
-
borderColor:
|
|
10541
|
-
outlineColor:
|
|
10545
|
+
borderColor: a,
|
|
10546
|
+
outlineColor: i,
|
|
10542
10547
|
outlineStyle: "solid",
|
|
10543
10548
|
outlineWidth: "2px"
|
|
10544
10549
|
},
|
|
@@ -10561,12 +10566,12 @@ const mc = {
|
|
|
10561
10566
|
}), bc = q("div", {
|
|
10562
10567
|
name: "DateField",
|
|
10563
10568
|
slot: "Content",
|
|
10564
|
-
shouldForwardProp: (e) => e !== "disabled"
|
|
10565
|
-
})(({ theme: e, disabled: n }) => ({
|
|
10569
|
+
shouldForwardProp: (e) => e !== "disabled" && e !== "size"
|
|
10570
|
+
})(({ theme: e, disabled: n, size: o = "small" }) => ({
|
|
10566
10571
|
flexGrow: 1,
|
|
10567
|
-
fontSize: "0.875rem",
|
|
10568
|
-
lineHeight: "20px",
|
|
10569
|
-
padding: "5px 10px",
|
|
10572
|
+
fontSize: o === "medium" ? "1rem" : "0.875rem",
|
|
10573
|
+
lineHeight: o === "medium" ? "24px" : "20px",
|
|
10574
|
+
padding: o === "medium" ? "8px 12px" : "5px 10px",
|
|
10570
10575
|
whiteSpace: "nowrap",
|
|
10571
10576
|
color: n ? e.vars?.palette.text.disabled : void 0
|
|
10572
10577
|
})), hr = co(
|
|
@@ -10595,29 +10600,31 @@ const mc = {
|
|
|
10595
10600
|
readOnly: P,
|
|
10596
10601
|
// Extract custom props
|
|
10597
10602
|
color: S,
|
|
10603
|
+
size: x,
|
|
10598
10604
|
// Exclude non-DOM props from spreading to the root element
|
|
10599
10605
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10600
|
-
enableAccessibleFieldDOMStructure:
|
|
10606
|
+
enableAccessibleFieldDOMStructure: k,
|
|
10601
10607
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10602
|
-
areAllSectionsEmpty:
|
|
10603
|
-
error:
|
|
10608
|
+
areAllSectionsEmpty: v,
|
|
10609
|
+
error: A,
|
|
10604
10610
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10605
|
-
focused:
|
|
10606
|
-
...
|
|
10607
|
-
} = o,
|
|
10611
|
+
focused: T,
|
|
10612
|
+
...B
|
|
10613
|
+
} = o, R = at(), F = Ve(
|
|
10608
10614
|
n,
|
|
10609
|
-
Ve(
|
|
10615
|
+
Ve(R.triggerRef, R.rootRef)
|
|
10610
10616
|
);
|
|
10611
10617
|
return /* @__PURE__ */ ge(
|
|
10612
10618
|
hc,
|
|
10613
10619
|
{
|
|
10614
|
-
...
|
|
10615
|
-
ref:
|
|
10616
|
-
error:
|
|
10620
|
+
...B,
|
|
10621
|
+
ref: F,
|
|
10622
|
+
error: A,
|
|
10617
10623
|
color: S,
|
|
10618
10624
|
disabled: m,
|
|
10625
|
+
size: x,
|
|
10619
10626
|
children: [
|
|
10620
|
-
/* @__PURE__ */ C(bc, { disabled: m, children: /* @__PURE__ */ C(
|
|
10627
|
+
/* @__PURE__ */ C(bc, { disabled: m, size: x, children: /* @__PURE__ */ C(
|
|
10621
10628
|
zt,
|
|
10622
10629
|
{
|
|
10623
10630
|
elements: r,
|
|
@@ -10637,8 +10644,12 @@ const mc = {
|
|
|
10637
10644
|
"aria-label": "Clear date",
|
|
10638
10645
|
disabled: !!m || !!P,
|
|
10639
10646
|
onClick: y,
|
|
10640
|
-
onMouseDown: (
|
|
10641
|
-
sx: {
|
|
10647
|
+
onMouseDown: (O) => O.preventDefault(),
|
|
10648
|
+
sx: {
|
|
10649
|
+
marginLeft: 1,
|
|
10650
|
+
padding: x === "medium" ? "6px" : "5px",
|
|
10651
|
+
fontSize: x === "medium" ? "1.125rem" : "1rem"
|
|
10652
|
+
},
|
|
10642
10653
|
tabIndex: -1,
|
|
10643
10654
|
children: /* @__PURE__ */ C(Xo, {})
|
|
10644
10655
|
}
|
|
@@ -10648,11 +10659,15 @@ const mc = {
|
|
|
10648
10659
|
{
|
|
10649
10660
|
"aria-label": g || "Open date picker",
|
|
10650
10661
|
"aria-haspopup": "dialog",
|
|
10651
|
-
"aria-expanded":
|
|
10662
|
+
"aria-expanded": R.open ? !0 : void 0,
|
|
10652
10663
|
disabled: !!m || !!P,
|
|
10653
|
-
onClick: () =>
|
|
10654
|
-
onMouseDown: (
|
|
10655
|
-
sx: {
|
|
10664
|
+
onClick: () => R.setOpen((O) => !O),
|
|
10665
|
+
onMouseDown: (O) => O.preventDefault(),
|
|
10666
|
+
sx: {
|
|
10667
|
+
marginLeft: 1,
|
|
10668
|
+
padding: x === "medium" ? "6px" : "5px",
|
|
10669
|
+
fontSize: x === "medium" ? "1.125rem" : "1rem"
|
|
10670
|
+
},
|
|
10656
10671
|
tabIndex: -1,
|
|
10657
10672
|
children: /* @__PURE__ */ C(Qo, {})
|
|
10658
10673
|
}
|
|
@@ -10665,11 +10680,11 @@ const mc = {
|
|
|
10665
10680
|
hr.displayName = "DateField";
|
|
10666
10681
|
const gc = co(
|
|
10667
10682
|
(e, n) => {
|
|
10668
|
-
const { clearable: o, error: r, color: s,
|
|
10683
|
+
const { clearable: o, error: r, color: s, size: a, ...i } = e;
|
|
10669
10684
|
return /* @__PURE__ */ C(
|
|
10670
10685
|
An,
|
|
10671
10686
|
{
|
|
10672
|
-
...
|
|
10687
|
+
...i,
|
|
10673
10688
|
slots: { field: hr, ...e.slots },
|
|
10674
10689
|
slotProps: {
|
|
10675
10690
|
...e.slotProps,
|
|
@@ -10677,7 +10692,8 @@ const gc = co(
|
|
|
10677
10692
|
...e.slotProps?.field,
|
|
10678
10693
|
clearable: o,
|
|
10679
10694
|
error: r,
|
|
10680
|
-
color: s
|
|
10695
|
+
color: s,
|
|
10696
|
+
size: a
|
|
10681
10697
|
}
|
|
10682
10698
|
},
|
|
10683
10699
|
ref: n
|