jcicl 1.1.5 → 1.2.2
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/Button/Button.d.ts +1 -0
- package/Button/Button.js +73 -70
- package/DesktopStepper/DesktopStepper.d.ts +24 -0
- package/DesktopStepper/DesktopStepper.js +204 -0
- package/DesktopStepper/index.d.ts +1 -0
- package/DesktopStepper/index.js +5 -0
- package/FieldGroup/FieldGroup.js +15 -12
- package/FieldVisibilityWrapper/FieldVisibilityWrapper.d.ts +11 -0
- package/FieldVisibilityWrapper/FieldVisibilityWrapper.js +48 -0
- package/FieldVisibilityWrapper/index.d.ts +1 -0
- package/FieldVisibilityWrapper/index.js +4 -0
- package/FormContext/createFormContext.js +91 -72
- package/FormContext/types.d.ts +8 -0
- package/FormFields/FormFields.d.ts +2 -2
- package/FormFields/FormFields.js +18 -18
- package/FormInput/FormInput.d.ts +4 -0
- package/FormInput/FormInput.js +39 -14
- package/LabeledCheckbox/LabeledCheckbox.js +4 -4
- package/LabeledCurrencyInput/LabeledCurrencyInput.js +33 -33
- package/LabeledInput/LabeledInput.d.ts +2 -0
- package/LabeledInput/LabeledInput.js +16 -14
- package/LabeledRadio/LabeledRadio.js +12 -12
- package/Nav/Nav.js +174 -151
- package/SelectableItemCard/SelectableItemCard.d.ts +9 -0
- package/SelectableItemCard/SelectableItemCard.js +24 -0
- package/SelectableItemCard/index.d.ts +1 -0
- package/SelectableItemCard/index.js +4 -0
- package/Stepper/Stepper.js +184 -226
- package/Table/Table.js +236 -234
- package/Tabs/Tabs.d.ts +42 -0
- package/Tabs/Tabs.js +121 -0
- package/Tabs/index.d.ts +1 -0
- package/Tabs/index.js +4 -0
- package/api.d.ts +16 -5
- package/api.js +42 -28
- package/assets/style.css +1 -1
- package/assets/tailwind.css +2 -2
- package/constants.js +1 -1
- package/formatters.d.ts +1 -0
- package/formatters.js +30 -17
- package/index.d.ts +2 -0
- package/index.js +64 -62
- package/package.json +1 -1
- package/problemDetails.d.ts +20 -0
- package/problemDetails.js +19 -0
- package/utils.d.ts +2 -2
- package/utils.js +35 -29
- package/validators.d.ts +8 -0
- package/validators.js +19 -9
package/Stepper/Stepper.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsxs as S, jsx as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsxs as S, jsx as s, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import * as k from "react";
|
|
3
3
|
import { useState as T, Children as G, isValidElement as H } from "react";
|
|
4
|
-
import { flushSync as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { SlideOut as J, SlideIn as Q, SlideInReverse as z, SlideOutReverse as W } from "../animation/Slide/Slide.js";
|
|
4
|
+
import { flushSync as x } from "react-dom";
|
|
5
|
+
import { cn as M } from "../cn.js";
|
|
6
|
+
import { Button as _ } from "../Button/Button.js";
|
|
7
|
+
import { SlideOut as J, SlideIn as Q, SlideInReverse as q, SlideOutReverse as W } from "../animation/Slide/Slide.js";
|
|
9
8
|
import { useThemeColors as Z } from "../ThemeContext.js";
|
|
10
|
-
import { g as
|
|
11
|
-
import { c as
|
|
12
|
-
import { m as
|
|
9
|
+
import { g as U, a as V, s as h, c as m, u as K, P as o, b as F, l as rr, f as er, h as tr } from "../.chunks/DefaultPropsProvider.js";
|
|
10
|
+
import { c as N } from "../.chunks/clsx.js";
|
|
11
|
+
import { m as P } from "../.chunks/memoTheme.js";
|
|
13
12
|
import { P as or } from "../.chunks/Paper.js";
|
|
14
13
|
import { u as ar } from "../.chunks/index.js";
|
|
15
|
-
import { c as
|
|
16
|
-
import {
|
|
14
|
+
import { c as w } from "../.chunks/createSimplePaletteValueFilter.js";
|
|
15
|
+
import { k as B, c as R } from "../.chunks/emotion-react.browser.esm.js";
|
|
16
|
+
import { i as z } from "../.chunks/integerPropType.js";
|
|
17
17
|
function nr(e) {
|
|
18
|
-
return
|
|
18
|
+
return U("MuiLinearProgress", e);
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
const
|
|
20
|
+
V("MuiLinearProgress", ["root", "colorPrimary", "colorSecondary", "determinate", "indeterminate", "buffer", "query", "dashed", "dashedColorPrimary", "dashedColorSecondary", "bar", "barColorPrimary", "barColorSecondary", "bar1Indeterminate", "bar1Determinate", "bar1Buffer", "bar2Indeterminate", "bar2Buffer"]);
|
|
21
|
+
const O = 4, L = B`
|
|
22
22
|
0% {
|
|
23
23
|
left: -35%;
|
|
24
24
|
right: 100%;
|
|
@@ -33,9 +33,9 @@ const $ = 4, j = A`
|
|
|
33
33
|
left: 100%;
|
|
34
34
|
right: -90%;
|
|
35
35
|
}
|
|
36
|
-
`,
|
|
37
|
-
animation: ${
|
|
38
|
-
` : null,
|
|
36
|
+
`, sr = typeof L != "string" ? R`
|
|
37
|
+
animation: ${L} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
38
|
+
` : null, j = B`
|
|
39
39
|
0% {
|
|
40
40
|
left: -200%;
|
|
41
41
|
right: 100%;
|
|
@@ -50,9 +50,9 @@ const $ = 4, j = A`
|
|
|
50
50
|
left: 107%;
|
|
51
51
|
right: -8%;
|
|
52
52
|
}
|
|
53
|
-
`,
|
|
54
|
-
animation: ${
|
|
55
|
-
` : null,
|
|
53
|
+
`, ir = typeof j != "string" ? R`
|
|
54
|
+
animation: ${j} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
|
|
55
|
+
` : null, $ = B`
|
|
56
56
|
0% {
|
|
57
57
|
opacity: 1;
|
|
58
58
|
background-position: 0 -23px;
|
|
@@ -67,30 +67,30 @@ const $ = 4, j = A`
|
|
|
67
67
|
opacity: 1;
|
|
68
68
|
background-position: -200px -23px;
|
|
69
69
|
}
|
|
70
|
-
`, lr = typeof
|
|
71
|
-
animation: ${
|
|
70
|
+
`, lr = typeof $ != "string" ? R`
|
|
71
|
+
animation: ${$} 3s infinite linear;
|
|
72
72
|
` : null, pr = (e) => {
|
|
73
73
|
const {
|
|
74
74
|
classes: r,
|
|
75
75
|
variant: t,
|
|
76
|
-
color:
|
|
77
|
-
} = e,
|
|
78
|
-
root: ["root", `color${
|
|
79
|
-
dashed: ["dashed", `dashedColor${
|
|
80
|
-
bar1: ["bar", `barColor${
|
|
81
|
-
bar2: ["bar", t !== "buffer" && `barColor${
|
|
76
|
+
color: i
|
|
77
|
+
} = e, d = {
|
|
78
|
+
root: ["root", `color${m(i)}`, t],
|
|
79
|
+
dashed: ["dashed", `dashedColor${m(i)}`],
|
|
80
|
+
bar1: ["bar", `barColor${m(i)}`, (t === "indeterminate" || t === "query") && "bar1Indeterminate", t === "determinate" && "bar1Determinate", t === "buffer" && "bar1Buffer"],
|
|
81
|
+
bar2: ["bar", t !== "buffer" && `barColor${m(i)}`, t === "buffer" && `color${m(i)}`, (t === "indeterminate" || t === "query") && "bar2Indeterminate", t === "buffer" && "bar2Buffer"]
|
|
82
82
|
};
|
|
83
|
-
return
|
|
84
|
-
},
|
|
83
|
+
return F(d, nr, r);
|
|
84
|
+
}, A = (e, r) => e.vars ? e.vars.palette.LinearProgress[`${r}Bg`] : e.palette.mode === "light" ? rr(e.palette[r].main, 0.62) : er(e.palette[r].main, 0.5), cr = h("span", {
|
|
85
85
|
name: "MuiLinearProgress",
|
|
86
86
|
slot: "Root",
|
|
87
87
|
overridesResolver: (e, r) => {
|
|
88
88
|
const {
|
|
89
89
|
ownerState: t
|
|
90
90
|
} = e;
|
|
91
|
-
return [r.root, r[`color${
|
|
91
|
+
return [r.root, r[`color${m(t.color)}`], r[t.variant]];
|
|
92
92
|
}
|
|
93
|
-
})(
|
|
93
|
+
})(P(({
|
|
94
94
|
theme: e
|
|
95
95
|
}) => ({
|
|
96
96
|
position: "relative",
|
|
@@ -102,12 +102,12 @@ const $ = 4, j = A`
|
|
|
102
102
|
"@media print": {
|
|
103
103
|
colorAdjust: "exact"
|
|
104
104
|
},
|
|
105
|
-
variants: [...Object.entries(e.palette).filter(
|
|
105
|
+
variants: [...Object.entries(e.palette).filter(w()).map(([r]) => ({
|
|
106
106
|
props: {
|
|
107
107
|
color: r
|
|
108
108
|
},
|
|
109
109
|
style: {
|
|
110
|
-
backgroundColor:
|
|
110
|
+
backgroundColor: A(e, r)
|
|
111
111
|
}
|
|
112
112
|
})), {
|
|
113
113
|
props: ({
|
|
@@ -140,16 +140,16 @@ const $ = 4, j = A`
|
|
|
140
140
|
transform: "rotate(180deg)"
|
|
141
141
|
}
|
|
142
142
|
}]
|
|
143
|
-
}))), dr =
|
|
143
|
+
}))), dr = h("span", {
|
|
144
144
|
name: "MuiLinearProgress",
|
|
145
145
|
slot: "Dashed",
|
|
146
146
|
overridesResolver: (e, r) => {
|
|
147
147
|
const {
|
|
148
148
|
ownerState: t
|
|
149
149
|
} = e;
|
|
150
|
-
return [r.dashed, r[`dashedColor${
|
|
150
|
+
return [r.dashed, r[`dashedColor${m(t.color)}`]];
|
|
151
151
|
}
|
|
152
|
-
})(
|
|
152
|
+
})(P(({
|
|
153
153
|
theme: e
|
|
154
154
|
}) => ({
|
|
155
155
|
position: "absolute",
|
|
@@ -166,8 +166,8 @@ const $ = 4, j = A`
|
|
|
166
166
|
opacity: 0.3,
|
|
167
167
|
backgroundImage: "radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"
|
|
168
168
|
}
|
|
169
|
-
}, ...Object.entries(e.palette).filter(
|
|
170
|
-
const t =
|
|
169
|
+
}, ...Object.entries(e.palette).filter(w()).map(([r]) => {
|
|
170
|
+
const t = A(e, r);
|
|
171
171
|
return {
|
|
172
172
|
props: {
|
|
173
173
|
color: r
|
|
@@ -179,17 +179,17 @@ const $ = 4, j = A`
|
|
|
179
179
|
})]
|
|
180
180
|
})), lr || {
|
|
181
181
|
// At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
|
|
182
|
-
animation: `${
|
|
183
|
-
}), ur =
|
|
182
|
+
animation: `${$} 3s infinite linear`
|
|
183
|
+
}), ur = h("span", {
|
|
184
184
|
name: "MuiLinearProgress",
|
|
185
185
|
slot: "Bar1",
|
|
186
186
|
overridesResolver: (e, r) => {
|
|
187
187
|
const {
|
|
188
188
|
ownerState: t
|
|
189
189
|
} = e;
|
|
190
|
-
return [r.bar, r[`barColor${
|
|
190
|
+
return [r.bar, r[`barColor${m(t.color)}`], (t.variant === "indeterminate" || t.variant === "query") && r.bar1Indeterminate, t.variant === "determinate" && r.bar1Determinate, t.variant === "buffer" && r.bar1Buffer];
|
|
191
191
|
}
|
|
192
|
-
})(
|
|
192
|
+
})(P(({
|
|
193
193
|
theme: e
|
|
194
194
|
}) => ({
|
|
195
195
|
width: "100%",
|
|
@@ -206,7 +206,7 @@ const $ = 4, j = A`
|
|
|
206
206
|
style: {
|
|
207
207
|
backgroundColor: "currentColor"
|
|
208
208
|
}
|
|
209
|
-
}, ...Object.entries(e.palette).filter(
|
|
209
|
+
}, ...Object.entries(e.palette).filter(w()).map(([r]) => ({
|
|
210
210
|
props: {
|
|
211
211
|
color: r
|
|
212
212
|
},
|
|
@@ -218,7 +218,7 @@ const $ = 4, j = A`
|
|
|
218
218
|
variant: "determinate"
|
|
219
219
|
},
|
|
220
220
|
style: {
|
|
221
|
-
transition: `transform .${
|
|
221
|
+
transition: `transform .${O}s linear`
|
|
222
222
|
}
|
|
223
223
|
}, {
|
|
224
224
|
props: {
|
|
@@ -226,7 +226,7 @@ const $ = 4, j = A`
|
|
|
226
226
|
},
|
|
227
227
|
style: {
|
|
228
228
|
zIndex: 1,
|
|
229
|
-
transition: `transform .${
|
|
229
|
+
transition: `transform .${O}s linear`
|
|
230
230
|
}
|
|
231
231
|
}, {
|
|
232
232
|
props: ({
|
|
@@ -239,20 +239,20 @@ const $ = 4, j = A`
|
|
|
239
239
|
props: ({
|
|
240
240
|
ownerState: r
|
|
241
241
|
}) => r.variant === "indeterminate" || r.variant === "query",
|
|
242
|
-
style:
|
|
243
|
-
animation: `${
|
|
242
|
+
style: sr || {
|
|
243
|
+
animation: `${L} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`
|
|
244
244
|
}
|
|
245
245
|
}]
|
|
246
|
-
}))), fr =
|
|
246
|
+
}))), fr = h("span", {
|
|
247
247
|
name: "MuiLinearProgress",
|
|
248
248
|
slot: "Bar2",
|
|
249
249
|
overridesResolver: (e, r) => {
|
|
250
250
|
const {
|
|
251
251
|
ownerState: t
|
|
252
252
|
} = e;
|
|
253
|
-
return [r.bar, r[`barColor${
|
|
253
|
+
return [r.bar, r[`barColor${m(t.color)}`], (t.variant === "indeterminate" || t.variant === "query") && r.bar2Indeterminate, t.variant === "buffer" && r.bar2Buffer];
|
|
254
254
|
}
|
|
255
|
-
})(
|
|
255
|
+
})(P(({
|
|
256
256
|
theme: e
|
|
257
257
|
}) => ({
|
|
258
258
|
width: "100%",
|
|
@@ -262,7 +262,7 @@ const $ = 4, j = A`
|
|
|
262
262
|
top: 0,
|
|
263
263
|
transition: "transform 0.2s linear",
|
|
264
264
|
transformOrigin: "left",
|
|
265
|
-
variants: [...Object.entries(e.palette).filter(
|
|
265
|
+
variants: [...Object.entries(e.palette).filter(w()).map(([r]) => ({
|
|
266
266
|
props: {
|
|
267
267
|
color: r
|
|
268
268
|
},
|
|
@@ -290,14 +290,14 @@ const $ = 4, j = A`
|
|
|
290
290
|
style: {
|
|
291
291
|
opacity: 0.3
|
|
292
292
|
}
|
|
293
|
-
}, ...Object.entries(e.palette).filter(
|
|
293
|
+
}, ...Object.entries(e.palette).filter(w()).map(([r]) => ({
|
|
294
294
|
props: {
|
|
295
295
|
color: r,
|
|
296
296
|
variant: "buffer"
|
|
297
297
|
},
|
|
298
298
|
style: {
|
|
299
|
-
backgroundColor:
|
|
300
|
-
transition: `transform .${
|
|
299
|
+
backgroundColor: A(e, r),
|
|
300
|
+
transition: `transform .${O}s linear`
|
|
301
301
|
}
|
|
302
302
|
})), {
|
|
303
303
|
props: ({
|
|
@@ -310,58 +310,58 @@ const $ = 4, j = A`
|
|
|
310
310
|
props: ({
|
|
311
311
|
ownerState: r
|
|
312
312
|
}) => r.variant === "indeterminate" || r.variant === "query",
|
|
313
|
-
style:
|
|
314
|
-
animation: `${
|
|
313
|
+
style: ir || {
|
|
314
|
+
animation: `${j} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`
|
|
315
315
|
}
|
|
316
316
|
}]
|
|
317
|
-
}))), X = /* @__PURE__ */
|
|
318
|
-
const
|
|
317
|
+
}))), X = /* @__PURE__ */ k.forwardRef(function(r, t) {
|
|
318
|
+
const i = K({
|
|
319
319
|
props: r,
|
|
320
320
|
name: "MuiLinearProgress"
|
|
321
321
|
}), {
|
|
322
|
-
className:
|
|
323
|
-
color:
|
|
324
|
-
value:
|
|
325
|
-
valueBuffer:
|
|
326
|
-
variant:
|
|
327
|
-
...
|
|
328
|
-
} =
|
|
329
|
-
...
|
|
330
|
-
color:
|
|
331
|
-
variant:
|
|
332
|
-
},
|
|
322
|
+
className: d,
|
|
323
|
+
color: u = "primary",
|
|
324
|
+
value: C,
|
|
325
|
+
valueBuffer: a,
|
|
326
|
+
variant: f = "indeterminate",
|
|
327
|
+
...y
|
|
328
|
+
} = i, l = {
|
|
329
|
+
...i,
|
|
330
|
+
color: u,
|
|
331
|
+
variant: f
|
|
332
|
+
}, n = pr(l), b = ar(), c = {}, v = {
|
|
333
333
|
bar1: {},
|
|
334
334
|
bar2: {}
|
|
335
335
|
};
|
|
336
|
-
if (
|
|
337
|
-
if (
|
|
338
|
-
|
|
339
|
-
let p =
|
|
340
|
-
|
|
336
|
+
if (f === "determinate" || f === "buffer")
|
|
337
|
+
if (C !== void 0) {
|
|
338
|
+
c["aria-valuenow"] = Math.round(C), c["aria-valuemin"] = 0, c["aria-valuemax"] = 100;
|
|
339
|
+
let p = C - 100;
|
|
340
|
+
b && (p = -p), v.bar1.transform = `translateX(${p}%)`;
|
|
341
341
|
} else process.env.NODE_ENV !== "production" && console.error("MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress .");
|
|
342
|
-
if (
|
|
343
|
-
if (
|
|
344
|
-
let p = (
|
|
345
|
-
|
|
342
|
+
if (f === "buffer")
|
|
343
|
+
if (a !== void 0) {
|
|
344
|
+
let p = (a || 0) - 100;
|
|
345
|
+
b && (p = -p), v.bar2.transform = `translateX(${p}%)`;
|
|
346
346
|
} else process.env.NODE_ENV !== "production" && console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");
|
|
347
347
|
return /* @__PURE__ */ S(cr, {
|
|
348
|
-
className:
|
|
349
|
-
ownerState:
|
|
348
|
+
className: N(n.root, d),
|
|
349
|
+
ownerState: l,
|
|
350
350
|
role: "progressbar",
|
|
351
|
-
...
|
|
351
|
+
...c,
|
|
352
352
|
ref: t,
|
|
353
|
-
...
|
|
354
|
-
children: [
|
|
355
|
-
className:
|
|
356
|
-
ownerState:
|
|
357
|
-
}) : null, /* @__PURE__ */
|
|
358
|
-
className:
|
|
359
|
-
ownerState:
|
|
360
|
-
style:
|
|
361
|
-
}),
|
|
362
|
-
className:
|
|
363
|
-
ownerState:
|
|
364
|
-
style:
|
|
353
|
+
...y,
|
|
354
|
+
children: [f === "buffer" ? /* @__PURE__ */ s(dr, {
|
|
355
|
+
className: n.dashed,
|
|
356
|
+
ownerState: l
|
|
357
|
+
}) : null, /* @__PURE__ */ s(ur, {
|
|
358
|
+
className: n.bar1,
|
|
359
|
+
ownerState: l,
|
|
360
|
+
style: v.bar1
|
|
361
|
+
}), f === "determinate" ? null : /* @__PURE__ */ s(fr, {
|
|
362
|
+
className: n.bar2,
|
|
363
|
+
ownerState: l,
|
|
364
|
+
style: v.bar2
|
|
365
365
|
})]
|
|
366
366
|
});
|
|
367
367
|
});
|
|
@@ -407,31 +407,31 @@ process.env.NODE_ENV !== "production" && (X.propTypes = {
|
|
|
407
407
|
variant: o.oneOf(["buffer", "determinate", "indeterminate", "query"])
|
|
408
408
|
});
|
|
409
409
|
function mr(e) {
|
|
410
|
-
return
|
|
410
|
+
return U("MuiMobileStepper", e);
|
|
411
411
|
}
|
|
412
|
-
|
|
412
|
+
V("MuiMobileStepper", ["root", "positionBottom", "positionTop", "positionStatic", "dots", "dot", "dotActive", "progress"]);
|
|
413
413
|
const br = (e) => {
|
|
414
414
|
const {
|
|
415
415
|
classes: r,
|
|
416
416
|
position: t
|
|
417
|
-
} = e,
|
|
418
|
-
root: ["root", `position${
|
|
417
|
+
} = e, i = {
|
|
418
|
+
root: ["root", `position${m(t)}`],
|
|
419
419
|
dots: ["dots"],
|
|
420
420
|
dot: ["dot"],
|
|
421
421
|
dotActive: ["dotActive"],
|
|
422
422
|
progress: ["progress"]
|
|
423
423
|
};
|
|
424
|
-
return
|
|
425
|
-
}, vr =
|
|
424
|
+
return F(i, mr, r);
|
|
425
|
+
}, vr = h(or, {
|
|
426
426
|
name: "MuiMobileStepper",
|
|
427
427
|
slot: "Root",
|
|
428
428
|
overridesResolver: (e, r) => {
|
|
429
429
|
const {
|
|
430
430
|
ownerState: t
|
|
431
431
|
} = e;
|
|
432
|
-
return [r.root, r[`position${
|
|
432
|
+
return [r.root, r[`position${m(t.position)}`]];
|
|
433
433
|
}
|
|
434
|
-
})(
|
|
434
|
+
})(P(({
|
|
435
435
|
theme: e
|
|
436
436
|
}) => ({
|
|
437
437
|
display: "flex",
|
|
@@ -465,7 +465,7 @@ const br = (e) => {
|
|
|
465
465
|
bottom: 0
|
|
466
466
|
}
|
|
467
467
|
}]
|
|
468
|
-
}))), gr =
|
|
468
|
+
}))), gr = h("div", {
|
|
469
469
|
name: "MuiMobileStepper",
|
|
470
470
|
slot: "Dots",
|
|
471
471
|
overridesResolver: (e, r) => r.dots
|
|
@@ -479,7 +479,7 @@ const br = (e) => {
|
|
|
479
479
|
flexDirection: "row"
|
|
480
480
|
}
|
|
481
481
|
}]
|
|
482
|
-
}),
|
|
482
|
+
}), yr = h("div", {
|
|
483
483
|
name: "MuiMobileStepper",
|
|
484
484
|
slot: "Dot",
|
|
485
485
|
shouldForwardProp: (e) => tr(e) && e !== "dotActive",
|
|
@@ -489,7 +489,7 @@ const br = (e) => {
|
|
|
489
489
|
} = e;
|
|
490
490
|
return [r.dot, t && r.dotActive];
|
|
491
491
|
}
|
|
492
|
-
})(
|
|
492
|
+
})(P(({
|
|
493
493
|
theme: e
|
|
494
494
|
}) => ({
|
|
495
495
|
variants: [{
|
|
@@ -515,7 +515,7 @@ const br = (e) => {
|
|
|
515
515
|
backgroundColor: (e.vars || e).palette.primary.main
|
|
516
516
|
}
|
|
517
517
|
}]
|
|
518
|
-
}))),
|
|
518
|
+
}))), hr = h(X, {
|
|
519
519
|
name: "MuiMobileStepper",
|
|
520
520
|
slot: "Progress",
|
|
521
521
|
overridesResolver: (e, r) => r.progress
|
|
@@ -528,53 +528,53 @@ const br = (e) => {
|
|
|
528
528
|
width: "50%"
|
|
529
529
|
}
|
|
530
530
|
}]
|
|
531
|
-
}), Y = /* @__PURE__ */
|
|
532
|
-
const
|
|
531
|
+
}), Y = /* @__PURE__ */ k.forwardRef(function(r, t) {
|
|
532
|
+
const i = K({
|
|
533
533
|
props: r,
|
|
534
534
|
name: "MuiMobileStepper"
|
|
535
535
|
}), {
|
|
536
|
-
activeStep:
|
|
537
|
-
backButton:
|
|
538
|
-
className:
|
|
539
|
-
LinearProgressProps:
|
|
540
|
-
nextButton:
|
|
541
|
-
position:
|
|
542
|
-
steps:
|
|
543
|
-
variant:
|
|
544
|
-
...
|
|
545
|
-
} =
|
|
546
|
-
...
|
|
547
|
-
activeStep:
|
|
548
|
-
position:
|
|
549
|
-
variant:
|
|
536
|
+
activeStep: d = 0,
|
|
537
|
+
backButton: u,
|
|
538
|
+
className: C,
|
|
539
|
+
LinearProgressProps: a,
|
|
540
|
+
nextButton: f,
|
|
541
|
+
position: y = "bottom",
|
|
542
|
+
steps: l,
|
|
543
|
+
variant: n = "dots",
|
|
544
|
+
...b
|
|
545
|
+
} = i, c = {
|
|
546
|
+
...i,
|
|
547
|
+
activeStep: d,
|
|
548
|
+
position: y,
|
|
549
|
+
variant: n
|
|
550
550
|
};
|
|
551
|
-
let
|
|
552
|
-
|
|
553
|
-
const p = br(
|
|
551
|
+
let v;
|
|
552
|
+
n === "progress" && (l === 1 ? v = 100 : v = Math.ceil(d / (l - 1) * 100));
|
|
553
|
+
const p = br(c);
|
|
554
554
|
return /* @__PURE__ */ S(vr, {
|
|
555
555
|
square: !0,
|
|
556
556
|
elevation: 0,
|
|
557
|
-
className:
|
|
557
|
+
className: N(p.root, C),
|
|
558
558
|
ref: t,
|
|
559
|
-
ownerState:
|
|
560
|
-
...
|
|
561
|
-
children: [
|
|
562
|
-
children: [
|
|
563
|
-
}),
|
|
564
|
-
ownerState:
|
|
559
|
+
ownerState: c,
|
|
560
|
+
...b,
|
|
561
|
+
children: [u, n === "text" && /* @__PURE__ */ S(k.Fragment, {
|
|
562
|
+
children: [d + 1, " / ", l]
|
|
563
|
+
}), n === "dots" && /* @__PURE__ */ s(gr, {
|
|
564
|
+
ownerState: c,
|
|
565
565
|
className: p.dots,
|
|
566
|
-
children: [...new Array(
|
|
567
|
-
className:
|
|
568
|
-
ownerState:
|
|
569
|
-
dotActive:
|
|
570
|
-
},
|
|
571
|
-
}),
|
|
572
|
-
ownerState:
|
|
566
|
+
children: [...new Array(l)].map((D, g) => /* @__PURE__ */ s(yr, {
|
|
567
|
+
className: N(p.dot, g === d && p.dotActive),
|
|
568
|
+
ownerState: c,
|
|
569
|
+
dotActive: g === d
|
|
570
|
+
}, g))
|
|
571
|
+
}), n === "progress" && /* @__PURE__ */ s(hr, {
|
|
572
|
+
ownerState: c,
|
|
573
573
|
className: p.progress,
|
|
574
574
|
variant: "determinate",
|
|
575
|
-
value:
|
|
576
|
-
...
|
|
577
|
-
}),
|
|
575
|
+
value: v,
|
|
576
|
+
...a
|
|
577
|
+
}), f]
|
|
578
578
|
});
|
|
579
579
|
});
|
|
580
580
|
process.env.NODE_ENV !== "production" && (Y.propTypes = {
|
|
@@ -587,7 +587,7 @@ process.env.NODE_ENV !== "production" && (Y.propTypes = {
|
|
|
587
587
|
* Defines which dot is highlighted when the variant is 'dots'.
|
|
588
588
|
* @default 0
|
|
589
589
|
*/
|
|
590
|
-
activeStep:
|
|
590
|
+
activeStep: z,
|
|
591
591
|
/**
|
|
592
592
|
* A back button element. For instance, it can be a `Button` or an `IconButton`.
|
|
593
593
|
*/
|
|
@@ -616,7 +616,7 @@ process.env.NODE_ENV !== "production" && (Y.propTypes = {
|
|
|
616
616
|
/**
|
|
617
617
|
* The total steps.
|
|
618
618
|
*/
|
|
619
|
-
steps:
|
|
619
|
+
steps: z.isRequired,
|
|
620
620
|
/**
|
|
621
621
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
622
622
|
*/
|
|
@@ -627,109 +627,67 @@ process.env.NODE_ENV !== "production" && (Y.propTypes = {
|
|
|
627
627
|
*/
|
|
628
628
|
variant: o.oneOf(["dots", "progress", "text"])
|
|
629
629
|
});
|
|
630
|
-
const Cr =
|
|
631
|
-
shouldForwardProp: (e) => !["customTheme"].includes(e)
|
|
632
|
-
})(({ customTheme: e }) => ({
|
|
633
|
-
...P`
|
|
634
|
-
position: relative;
|
|
635
|
-
display: flex;
|
|
636
|
-
flex-direction: column;
|
|
637
|
-
align-items: center;
|
|
638
|
-
width: 100%;
|
|
639
|
-
height: 100%;
|
|
640
|
-
justify-content: space-between;
|
|
641
|
-
padding: 0;
|
|
642
|
-
margin: 0;
|
|
643
|
-
background-color: transparent;
|
|
644
|
-
overflow: hidden;
|
|
645
|
-
|
|
646
|
-
.MuiPaper-root {
|
|
647
|
-
width: 100%;
|
|
648
|
-
background-color: transparent;
|
|
649
|
-
color: inherit;
|
|
650
|
-
padding: 9px 13px;
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
.MuiLinearProgress-root {
|
|
654
|
-
padding: 9px;
|
|
655
|
-
margin: 0 9px;
|
|
656
|
-
background-color: ${e.themeLightA}; // whiteGreenA
|
|
657
|
-
border-color: ${e.themeColor}; // green
|
|
658
|
-
|
|
659
|
-
.MuiLinearProgress-bar {
|
|
660
|
-
background-color: ${e.themeColor}; // green
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
`
|
|
664
|
-
})), U = R("div")(() => ({
|
|
665
|
-
...P`
|
|
666
|
-
position: absolute;
|
|
667
|
-
top: 0;
|
|
668
|
-
width: 100%;
|
|
669
|
-
height: 100%;
|
|
670
|
-
`
|
|
671
|
-
})), Sr = R("div")(() => ({
|
|
672
|
-
...P`
|
|
673
|
-
width: 100%;
|
|
674
|
-
height: 100%;
|
|
675
|
-
`
|
|
676
|
-
})), Tr = ({
|
|
630
|
+
const Cr = "relative w-full h-full flex items-center justify-between flex-col p-0 m-0 bg-transparent overflow-hidden", Sr = "[&_.MuiPaper-root]:w-full [&_.MuiPaper-root]:bg-transparent [&_.MuiPaper-root]:color-inherit [&_.MuiPaper-root]:p-[9px_13px]", Pr = "[&_.MuiLinearProgress-root]:p-[9px] [&_.MuiLinearProgress-root]:m-[0_9px] [&_.MuiLinearProgress-root]:bg-[var(--progress-bar-bg)] [&_.MuiLinearProgress-root]:border-[var(--progress-bar-border)] [&_.MuiLinearProgress-bar]:bg-[var(--progress-bar-color)]", Mr = M(Cr, Sr, Pr), E = "absolute top-0 w-full h-full", qr = ({
|
|
677
631
|
onNext: e,
|
|
678
632
|
onBack: r,
|
|
679
633
|
onFinish: t,
|
|
680
|
-
children:
|
|
681
|
-
...
|
|
634
|
+
children: i,
|
|
635
|
+
...d
|
|
682
636
|
}) => {
|
|
683
|
-
const
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
},
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
637
|
+
const u = Z(), C = {
|
|
638
|
+
"--progress-bar-bg": u.themeLightA,
|
|
639
|
+
"--progress-bar-border": u.themeColor,
|
|
640
|
+
"--progress-bar-color": u.themeColor
|
|
641
|
+
}, [a, f] = T(0), [y, l] = T("forward"), n = G.toArray(i).filter(
|
|
642
|
+
(g) => H(g)
|
|
643
|
+
), b = n.length, c = () => {
|
|
644
|
+
a === b - 1 ? t == null || t() : (x(() => l("none")), x(() => l("forward")), f((g) => g + 1), e == null || e());
|
|
645
|
+
}, v = () => {
|
|
646
|
+
x(() => l("none")), x(() => l("reverse")), f((g) => g - 1), r == null || r();
|
|
647
|
+
}, p = () => /* @__PURE__ */ s(
|
|
648
|
+
_,
|
|
691
649
|
{
|
|
692
650
|
variant: "custom",
|
|
693
|
-
onClick:
|
|
694
|
-
backgroundColor:
|
|
695
|
-
hoverColor:
|
|
696
|
-
children: a ===
|
|
651
|
+
onClick: c,
|
|
652
|
+
backgroundColor: u.themeColor,
|
|
653
|
+
hoverColor: u.themeDark,
|
|
654
|
+
children: a === b - 1 ? "Finish" : "Next"
|
|
697
655
|
}
|
|
698
|
-
),
|
|
699
|
-
|
|
656
|
+
), D = () => /* @__PURE__ */ s(
|
|
657
|
+
_,
|
|
700
658
|
{
|
|
701
659
|
variant: "custom",
|
|
702
|
-
onClick:
|
|
703
|
-
backgroundColor:
|
|
704
|
-
hoverColor:
|
|
660
|
+
onClick: v,
|
|
661
|
+
backgroundColor: u.themeColor,
|
|
662
|
+
hoverColor: u.themeDark,
|
|
705
663
|
children: "Back"
|
|
706
664
|
}
|
|
707
665
|
);
|
|
708
|
-
return /* @__PURE__ */ S(
|
|
709
|
-
a === 0 &&
|
|
710
|
-
a !== 0 &&
|
|
711
|
-
/* @__PURE__ */
|
|
712
|
-
/* @__PURE__ */
|
|
666
|
+
return /* @__PURE__ */ S("div", { className: M("jcStepContainer", Mr), style: C, children: [
|
|
667
|
+
a === 0 && y === "forward" && /* @__PURE__ */ s("div", { className: M("jcSlideContainer", "w-full h-full"), children: n[a] ?? null }),
|
|
668
|
+
a !== 0 && y === "forward" && /* @__PURE__ */ S(I, { children: [
|
|
669
|
+
/* @__PURE__ */ s("div", { className: M("jcSlideOutContainer", E), children: /* @__PURE__ */ s(J, { className: "jcSlideContainer", children: n[a - 1] ?? null }) }),
|
|
670
|
+
/* @__PURE__ */ s(Q, { className: "jcSlideContainer", children: n[a] ?? null })
|
|
713
671
|
] }),
|
|
714
|
-
a ===
|
|
715
|
-
a !==
|
|
716
|
-
/* @__PURE__ */
|
|
717
|
-
/* @__PURE__ */
|
|
672
|
+
a === b - 1 && y === "reverse" && /* @__PURE__ */ s(q, { className: "jcSlideContainer", children: n[a] ?? null }),
|
|
673
|
+
a !== b - 1 && y === "reverse" && /* @__PURE__ */ S(I, { children: [
|
|
674
|
+
/* @__PURE__ */ s("div", { className: M("jcSlideOutContainer", E), children: /* @__PURE__ */ s(W, { className: "jcSlideContainer", children: n[a + 1] ?? null }) }),
|
|
675
|
+
/* @__PURE__ */ s(q, { className: "jcSlideContainer", children: n[a] ?? null })
|
|
718
676
|
] }),
|
|
719
|
-
/* @__PURE__ */
|
|
677
|
+
/* @__PURE__ */ s(
|
|
720
678
|
Y,
|
|
721
679
|
{
|
|
722
680
|
variant: "progress",
|
|
723
|
-
steps:
|
|
681
|
+
steps: b,
|
|
724
682
|
position: "static",
|
|
725
683
|
activeStep: a,
|
|
726
|
-
nextButton:
|
|
727
|
-
backButton: a === 0 ? /* @__PURE__ */
|
|
728
|
-
...
|
|
684
|
+
nextButton: p(),
|
|
685
|
+
backButton: a === 0 ? /* @__PURE__ */ s("div", { className: "w-[103px]" }) : D(),
|
|
686
|
+
...d
|
|
729
687
|
}
|
|
730
688
|
)
|
|
731
689
|
] });
|
|
732
690
|
};
|
|
733
691
|
export {
|
|
734
|
-
|
|
692
|
+
qr as default
|
|
735
693
|
};
|