@fangzsx/component-library 0.0.16 → 0.0.18
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.
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
1
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
2
|
+
|
|
4
3
|
interface HorizontalLinearStepperProps {
|
|
5
|
-
steps:
|
|
4
|
+
steps: string[];
|
|
6
5
|
activeStep?: number;
|
|
7
|
-
sx?:
|
|
8
|
-
stepperSx?:
|
|
6
|
+
sx?: SxProps<Theme>;
|
|
7
|
+
stepperSx?: SxProps<Theme>;
|
|
9
8
|
}
|
|
10
|
-
export declare function Stepper({ steps, activeStep, sx, stepperSx }: HorizontalLinearStepperProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function Stepper({ steps, activeStep, sx, stepperSx, }: HorizontalLinearStepperProps): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsxs as P, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { Stepper as ee } from "@mui/material";
|
|
3
3
|
import { B as te } from "../../Box-DPlM16yK.js";
|
|
4
|
-
import * as
|
|
5
|
-
import { g as
|
|
6
|
-
import { u as
|
|
4
|
+
import * as m from "react";
|
|
5
|
+
import { g as D, a as V, P as e } from "../../generateUtilityClasses-BCID9NF1.js";
|
|
6
|
+
import { u as W, s as C, c as j, a as _, m as R } from "../../useForkRef-gLJikozA.js";
|
|
7
7
|
import { i as oe } from "../../integerPropType-BihGt2aU.js";
|
|
8
|
-
import { u as
|
|
8
|
+
import { u as E } from "../../useSlot-jPRhj-MO.js";
|
|
9
9
|
import { c as H, S as ne } from "../../createSvgIcon-ChKzptBc.js";
|
|
10
|
-
const
|
|
11
|
-
process.env.NODE_ENV !== "production" && (
|
|
12
|
-
const
|
|
13
|
-
process.env.NODE_ENV !== "production" && (
|
|
10
|
+
const k = /* @__PURE__ */ m.createContext({});
|
|
11
|
+
process.env.NODE_ENV !== "production" && (k.displayName = "StepperContext");
|
|
12
|
+
const A = /* @__PURE__ */ m.createContext({});
|
|
13
|
+
process.env.NODE_ENV !== "production" && (A.displayName = "StepContext");
|
|
14
14
|
function re(t) {
|
|
15
|
-
return
|
|
15
|
+
return D("MuiStep", t);
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
V("MuiStep", ["root", "horizontal", "vertical", "alternativeLabel", "completed"]);
|
|
18
18
|
const ae = (t) => {
|
|
19
19
|
const {
|
|
20
20
|
classes: o,
|
|
@@ -22,7 +22,7 @@ const ae = (t) => {
|
|
|
22
22
|
alternativeLabel: r,
|
|
23
23
|
completed: a
|
|
24
24
|
} = t;
|
|
25
|
-
return
|
|
25
|
+
return _({
|
|
26
26
|
root: ["root", n, r && "alternativeLabel", a && "completed"]
|
|
27
27
|
}, re, o);
|
|
28
28
|
}, le = C("div", {
|
|
@@ -52,8 +52,8 @@ const ae = (t) => {
|
|
|
52
52
|
position: "relative"
|
|
53
53
|
}
|
|
54
54
|
}]
|
|
55
|
-
}), J = /* @__PURE__ */
|
|
56
|
-
const r =
|
|
55
|
+
}), J = /* @__PURE__ */ m.forwardRef(function(o, n) {
|
|
56
|
+
const r = W({
|
|
57
57
|
props: o,
|
|
58
58
|
name: "MuiStep"
|
|
59
59
|
}), {
|
|
@@ -62,50 +62,50 @@ const ae = (t) => {
|
|
|
62
62
|
className: b,
|
|
63
63
|
component: i = "div",
|
|
64
64
|
completed: p,
|
|
65
|
-
disabled:
|
|
65
|
+
disabled: u,
|
|
66
66
|
expanded: d = !1,
|
|
67
67
|
index: c,
|
|
68
68
|
last: S,
|
|
69
|
-
|
|
69
|
+
...$
|
|
70
70
|
} = r, {
|
|
71
|
-
activeStep:
|
|
71
|
+
activeStep: I,
|
|
72
72
|
connector: L,
|
|
73
|
-
alternativeLabel:
|
|
73
|
+
alternativeLabel: M,
|
|
74
74
|
orientation: w,
|
|
75
75
|
nonLinear: O
|
|
76
|
-
} =
|
|
77
|
-
let [x = !1,
|
|
78
|
-
|
|
79
|
-
const T =
|
|
76
|
+
} = m.useContext(k);
|
|
77
|
+
let [x = !1, g = !1, v = !1] = [a, p, u];
|
|
78
|
+
I === c ? x = a !== void 0 ? a : !0 : !O && I > c ? g = p !== void 0 ? p : !0 : !O && I < c && (v = u !== void 0 ? u : !0);
|
|
79
|
+
const T = m.useMemo(() => ({
|
|
80
80
|
index: c,
|
|
81
81
|
last: S,
|
|
82
82
|
expanded: d,
|
|
83
83
|
icon: c + 1,
|
|
84
84
|
active: x,
|
|
85
|
-
completed:
|
|
85
|
+
completed: g,
|
|
86
86
|
disabled: v
|
|
87
|
-
}), [c, S, d, x,
|
|
87
|
+
}), [c, S, d, x, g, v]), f = {
|
|
88
88
|
...r,
|
|
89
89
|
active: x,
|
|
90
90
|
orientation: w,
|
|
91
|
-
alternativeLabel:
|
|
92
|
-
completed:
|
|
91
|
+
alternativeLabel: M,
|
|
92
|
+
completed: g,
|
|
93
93
|
disabled: v,
|
|
94
94
|
expanded: d,
|
|
95
95
|
component: i
|
|
96
|
-
}, h = ae(f),
|
|
96
|
+
}, h = ae(f), N = /* @__PURE__ */ P(le, {
|
|
97
97
|
as: i,
|
|
98
98
|
className: j(h.root, b),
|
|
99
99
|
ref: n,
|
|
100
100
|
ownerState: f,
|
|
101
|
-
|
|
102
|
-
children: [L &&
|
|
101
|
+
...$,
|
|
102
|
+
children: [L && M && c !== 0 ? L : null, l]
|
|
103
103
|
});
|
|
104
|
-
return /* @__PURE__ */ s(
|
|
104
|
+
return /* @__PURE__ */ s(A.Provider, {
|
|
105
105
|
value: T,
|
|
106
|
-
children: L && !
|
|
107
|
-
children: [L,
|
|
108
|
-
}) :
|
|
106
|
+
children: L && !M && c !== 0 ? /* @__PURE__ */ P(m.Fragment, {
|
|
107
|
+
children: [L, N]
|
|
108
|
+
}) : N
|
|
109
109
|
});
|
|
110
110
|
});
|
|
111
111
|
process.env.NODE_ENV !== "production" && (J.propTypes = {
|
|
@@ -169,9 +169,9 @@ const se = H(/* @__PURE__ */ s("path", {
|
|
|
169
169
|
d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"
|
|
170
170
|
}), "Warning");
|
|
171
171
|
function ce(t) {
|
|
172
|
-
return
|
|
172
|
+
return D("MuiStepIcon", t);
|
|
173
173
|
}
|
|
174
|
-
const z =
|
|
174
|
+
const z = V("MuiStepIcon", ["root", "active", "completed", "error", "text"]);
|
|
175
175
|
var G;
|
|
176
176
|
const pe = (t) => {
|
|
177
177
|
const {
|
|
@@ -180,7 +180,7 @@ const pe = (t) => {
|
|
|
180
180
|
completed: r,
|
|
181
181
|
error: a
|
|
182
182
|
} = t;
|
|
183
|
-
return
|
|
183
|
+
return _({
|
|
184
184
|
root: ["root", n && "active", r && "completed", a && "error"],
|
|
185
185
|
text: ["text"]
|
|
186
186
|
}, ce, o);
|
|
@@ -213,8 +213,8 @@ const pe = (t) => {
|
|
|
213
213
|
fill: (t.vars || t).palette.primary.contrastText,
|
|
214
214
|
fontSize: t.typography.caption.fontSize,
|
|
215
215
|
fontFamily: t.typography.fontFamily
|
|
216
|
-
}))), K = /* @__PURE__ */
|
|
217
|
-
const r =
|
|
216
|
+
}))), K = /* @__PURE__ */ m.forwardRef(function(o, n) {
|
|
217
|
+
const r = W({
|
|
218
218
|
props: o,
|
|
219
219
|
name: "MuiStepIcon"
|
|
220
220
|
}), {
|
|
@@ -223,7 +223,7 @@ const pe = (t) => {
|
|
|
223
223
|
completed: b = !1,
|
|
224
224
|
error: i = !1,
|
|
225
225
|
icon: p,
|
|
226
|
-
...
|
|
226
|
+
...u
|
|
227
227
|
} = r, d = {
|
|
228
228
|
...r,
|
|
229
229
|
active: a,
|
|
@@ -237,18 +237,18 @@ const pe = (t) => {
|
|
|
237
237
|
className: S,
|
|
238
238
|
ref: n,
|
|
239
239
|
ownerState: d,
|
|
240
|
-
...
|
|
240
|
+
...u
|
|
241
241
|
}) : b ? /* @__PURE__ */ s(U, {
|
|
242
242
|
as: se,
|
|
243
243
|
className: S,
|
|
244
244
|
ref: n,
|
|
245
245
|
ownerState: d,
|
|
246
|
-
...
|
|
246
|
+
...u
|
|
247
247
|
}) : /* @__PURE__ */ P(U, {
|
|
248
248
|
className: S,
|
|
249
249
|
ref: n,
|
|
250
250
|
ownerState: d,
|
|
251
|
-
...
|
|
251
|
+
...u,
|
|
252
252
|
children: [G || (G = /* @__PURE__ */ s("circle", {
|
|
253
253
|
cx: "12",
|
|
254
254
|
cy: "12",
|
|
@@ -304,9 +304,9 @@ process.env.NODE_ENV !== "production" && (K.propTypes = {
|
|
|
304
304
|
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
305
305
|
});
|
|
306
306
|
function be(t) {
|
|
307
|
-
return
|
|
307
|
+
return D("MuiStepLabel", t);
|
|
308
308
|
}
|
|
309
|
-
const y =
|
|
309
|
+
const y = V("MuiStepLabel", ["root", "horizontal", "vertical", "label", "active", "completed", "error", "disabled", "iconContainer", "alternativeLabel", "labelContainer"]), me = (t) => {
|
|
310
310
|
const {
|
|
311
311
|
classes: o,
|
|
312
312
|
orientation: n,
|
|
@@ -316,13 +316,13 @@ const y = D("MuiStepLabel", ["root", "horizontal", "vertical", "label", "active"
|
|
|
316
316
|
disabled: b,
|
|
317
317
|
alternativeLabel: i
|
|
318
318
|
} = t;
|
|
319
|
-
return
|
|
319
|
+
return _({
|
|
320
320
|
root: ["root", n, l && "error", b && "disabled", i && "alternativeLabel"],
|
|
321
321
|
label: ["label", r && "active", a && "completed", l && "error", b && "disabled", i && "alternativeLabel"],
|
|
322
322
|
iconContainer: ["iconContainer", r && "active", a && "completed", l && "error", b && "disabled", i && "alternativeLabel"],
|
|
323
323
|
labelContainer: ["labelContainer", i && "alternativeLabel"]
|
|
324
324
|
}, be, o);
|
|
325
|
-
},
|
|
325
|
+
}, ue = C("span", {
|
|
326
326
|
name: "MuiStepLabel",
|
|
327
327
|
slot: "Root",
|
|
328
328
|
overridesResolver: (t, o) => {
|
|
@@ -395,8 +395,8 @@ const y = D("MuiStepLabel", ["root", "horizontal", "vertical", "label", "active"
|
|
|
395
395
|
[`&.${y.alternativeLabel}`]: {
|
|
396
396
|
textAlign: "center"
|
|
397
397
|
}
|
|
398
|
-
}))), F = /* @__PURE__ */
|
|
399
|
-
const r =
|
|
398
|
+
}))), F = /* @__PURE__ */ m.forwardRef(function(o, n) {
|
|
399
|
+
const r = W({
|
|
400
400
|
props: o,
|
|
401
401
|
name: "MuiStepLabel"
|
|
402
402
|
}), {
|
|
@@ -405,21 +405,21 @@ const y = D("MuiStepLabel", ["root", "horizontal", "vertical", "label", "active"
|
|
|
405
405
|
componentsProps: b = {},
|
|
406
406
|
error: i = !1,
|
|
407
407
|
icon: p,
|
|
408
|
-
optional:
|
|
408
|
+
optional: u,
|
|
409
409
|
slots: d = {},
|
|
410
410
|
slotProps: c = {},
|
|
411
411
|
StepIconComponent: S,
|
|
412
|
-
StepIconProps:
|
|
413
|
-
...
|
|
412
|
+
StepIconProps: $,
|
|
413
|
+
...I
|
|
414
414
|
} = r, {
|
|
415
415
|
alternativeLabel: L,
|
|
416
|
-
orientation:
|
|
417
|
-
} =
|
|
416
|
+
orientation: M
|
|
417
|
+
} = m.useContext(k), {
|
|
418
418
|
active: w,
|
|
419
419
|
disabled: O,
|
|
420
420
|
completed: x,
|
|
421
|
-
icon:
|
|
422
|
-
} =
|
|
421
|
+
icon: g
|
|
422
|
+
} = m.useContext(A), v = p || g;
|
|
423
423
|
let T = S;
|
|
424
424
|
v && !T && (T = K);
|
|
425
425
|
const f = {
|
|
@@ -429,30 +429,30 @@ const y = D("MuiStepLabel", ["root", "horizontal", "vertical", "label", "active"
|
|
|
429
429
|
completed: x,
|
|
430
430
|
disabled: O,
|
|
431
431
|
error: i,
|
|
432
|
-
orientation:
|
|
433
|
-
}, h =
|
|
432
|
+
orientation: M
|
|
433
|
+
}, h = me(f), N = {
|
|
434
434
|
slots: d,
|
|
435
435
|
slotProps: {
|
|
436
|
-
stepIcon:
|
|
436
|
+
stepIcon: $,
|
|
437
437
|
...b,
|
|
438
438
|
...c
|
|
439
439
|
}
|
|
440
|
-
}, [Q, X] =
|
|
441
|
-
elementType:
|
|
440
|
+
}, [Q, X] = E("root", {
|
|
441
|
+
elementType: ue,
|
|
442
442
|
externalForwardedProps: {
|
|
443
|
-
...
|
|
444
|
-
...
|
|
443
|
+
...N,
|
|
444
|
+
...I
|
|
445
445
|
},
|
|
446
446
|
ownerState: f,
|
|
447
447
|
ref: n,
|
|
448
448
|
className: j(h.root, l)
|
|
449
|
-
}), [Y, B] =
|
|
449
|
+
}), [Y, B] = E("label", {
|
|
450
450
|
elementType: fe,
|
|
451
|
-
externalForwardedProps:
|
|
451
|
+
externalForwardedProps: N,
|
|
452
452
|
ownerState: f
|
|
453
|
-
}), [q, Z] =
|
|
453
|
+
}), [q, Z] = E("stepIcon", {
|
|
454
454
|
elementType: T,
|
|
455
|
-
externalForwardedProps:
|
|
455
|
+
externalForwardedProps: N,
|
|
456
456
|
ownerState: f
|
|
457
457
|
});
|
|
458
458
|
return /* @__PURE__ */ P(Q, {
|
|
@@ -474,7 +474,7 @@ const y = D("MuiStepLabel", ["root", "horizontal", "vertical", "label", "active"
|
|
|
474
474
|
...B,
|
|
475
475
|
className: j(h.label, B?.className),
|
|
476
476
|
children: a
|
|
477
|
-
}) : null,
|
|
477
|
+
}) : null, u]
|
|
478
478
|
})]
|
|
479
479
|
});
|
|
480
480
|
});
|
|
@@ -550,58 +550,37 @@ process.env.NODE_ENV !== "production" && (F.propTypes = {
|
|
|
550
550
|
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
551
551
|
});
|
|
552
552
|
F.muiName = "StepLabel";
|
|
553
|
-
function
|
|
553
|
+
function Me({
|
|
554
554
|
steps: t,
|
|
555
555
|
activeStep: o = 0,
|
|
556
556
|
sx: n,
|
|
557
557
|
stepperSx: r
|
|
558
558
|
}) {
|
|
559
559
|
const a = {
|
|
560
|
-
"& .
|
|
561
|
-
color: "#
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
color: "#27A4E8"
|
|
560
|
+
"& .MuiStepIcon-root": {
|
|
561
|
+
color: "#bdbdbd",
|
|
562
|
+
width: 32,
|
|
563
|
+
height: 32,
|
|
564
|
+
"&.Mui-active": { color: "#27A4E8" },
|
|
565
|
+
"&.Mui-completed": { color: "#27A4E8" }
|
|
565
566
|
},
|
|
566
567
|
"& .MuiStepLabel-root .Mui-active .MuiStepIcon-text": {
|
|
567
568
|
fill: "white"
|
|
568
569
|
},
|
|
569
|
-
"& .MuiStepIcon-root": {
|
|
570
|
-
color: "#bdbdbd",
|
|
571
|
-
width: "32px",
|
|
572
|
-
height: "32px",
|
|
573
|
-
"&.Mui-active": {
|
|
574
|
-
color: "#27A4E8"
|
|
575
|
-
},
|
|
576
|
-
"&.Mui-completed": {
|
|
577
|
-
color: "#27A4E8"
|
|
578
|
-
}
|
|
579
|
-
},
|
|
580
570
|
"& .MuiStepLabel-label": {
|
|
581
571
|
color: "#6B7C93",
|
|
582
572
|
fontSize: "14px",
|
|
583
|
-
"&.Mui-active": {
|
|
584
|
-
|
|
585
|
-
fontWeight: 600
|
|
586
|
-
},
|
|
587
|
-
"&.Mui-completed": {
|
|
588
|
-
color: "#000000"
|
|
589
|
-
}
|
|
573
|
+
"&.Mui-active": { color: "#000000", fontWeight: 600 },
|
|
574
|
+
"&.Mui-completed": { color: "#000000" }
|
|
590
575
|
},
|
|
591
576
|
"& .MuiStepConnector-line": {
|
|
592
577
|
borderColor: "#e0e0e0",
|
|
593
578
|
borderTopWidth: 1
|
|
594
579
|
},
|
|
595
|
-
|
|
596
|
-
borderColor: "#e0e0e0"
|
|
597
|
-
},
|
|
598
|
-
"& .MuiStepConnector-root.Mui-completed .MuiStepConnector-line": {
|
|
599
|
-
borderColor: "#e0e0e0"
|
|
600
|
-
},
|
|
601
|
-
...r
|
|
580
|
+
...r ?? {}
|
|
602
581
|
};
|
|
603
|
-
return /* @__PURE__ */ s(te, { sx: { width: "100%", ...n }, children: /* @__PURE__ */ s(ee, { activeStep: o, sx: a, children: t.map((l) => /* @__PURE__ */ s(J, { children: /* @__PURE__ */ s(F, { children: l
|
|
582
|
+
return /* @__PURE__ */ s(te, { sx: { width: "100%", ...n ?? {} }, children: /* @__PURE__ */ s(ee, { activeStep: o, sx: a, children: t.map((l) => /* @__PURE__ */ s(J, { children: /* @__PURE__ */ s(F, { children: l }) }, l)) }) });
|
|
604
583
|
}
|
|
605
584
|
export {
|
|
606
|
-
|
|
585
|
+
Me as Stepper
|
|
607
586
|
};
|