jcicl 1.0.5 → 1.0.7
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/CircularIconButton/CircularIconButton.js +22 -18
- package/DefaultTemplate/DefaultTemplate.js +3 -3
- package/DetailItemWithIcon/DetailItemWithIcon.js +31 -19
- package/DetailPageComponents/DetailPageComponents.d.ts +12 -4
- package/DetailPageComponents/DetailPageComponents.js +44 -28
- package/EditableDetailItemWithIcon/EditableDetailItemWithIcon.d.ts +1 -0
- package/EditableDetailItemWithIcon/EditableDetailItemWithIcon.js +63 -62
- package/EditableInfoCard/EditableInfoCard.js +107 -103
- package/FormComponents/FormComponents.d.ts +17 -10
- package/FormComponents/FormComponents.js +52 -46
- package/Icon/Icon.js +23 -22
- package/InfoCard/InfoCard.js +37 -33
- package/Input/Input.js +19 -15
- package/LabeledCheckbox/LabeledCheckbox.js +58 -55
- package/LabeledDropdown/LabeledDropdown.js +370 -366
- package/LabeledInput/LabeledInput.js +13 -13
- package/LabeledTextArea/LabeledTextArea.js +20 -13
- package/List/List.js +19 -18
- package/ListButton/ListButton.d.ts +2 -4
- package/ListButton/ListButton.js +21 -12
- package/Loading/Loading.js +14 -9
- package/Pill/Pill.js +13 -12
- package/Search/Search.js +64 -62
- package/SquareIcon/SquareIcon.js +28 -25
- package/SquareIconButton/SquareIconButton.js +24 -11
- package/Stepper/Stepper.js +166 -146
- package/Table/Table.js +233 -221
- package/WithLoading/WithLoading.js +16 -11
- package/package.json +1 -1
- package/theme.d.ts +17 -9
- package/theme.js +4 -0
- package/themeUtils.d.ts +5 -0
- package/themeUtils.js +81 -69
package/Stepper/Stepper.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsxs as S, jsx as
|
|
1
|
+
import { jsxs as S, jsx as n, Fragment as I } from "react/jsx-runtime";
|
|
2
2
|
import * as N from "react";
|
|
3
3
|
import { useState as T, Children as G, isValidElement as H } from "react";
|
|
4
4
|
import { flushSync as M } from "react-dom";
|
|
5
5
|
import { n as R } from "../.chunks/emotion-styled.browser.esm.js";
|
|
6
|
-
import { k as A, c as
|
|
6
|
+
import { k as A, c as P } from "../.chunks/emotion-react.browser.esm.js";
|
|
7
7
|
import { Button as q } from "../Button/Button.js";
|
|
8
|
-
import x from "../theme.js";
|
|
9
8
|
import { SlideOut as J, SlideIn as Q, SlideInReverse as z, SlideOutReverse as W } from "../animation/Slide/Slide.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
9
|
+
import { useThemeColors as Z } from "../ThemeContext.js";
|
|
10
|
+
import { g as V, a as _, s as g, c as f, u as F, b as O, P as o, d as K, l as rr, j as er, k as tr } from "../.chunks/DefaultPropsProvider.js";
|
|
11
|
+
import { m as w } from "../.chunks/memoTheme.js";
|
|
12
|
+
import { P as or } from "../.chunks/Paper.js";
|
|
13
|
+
import { u as ar } from "../.chunks/index.js";
|
|
14
|
+
import { c as k } from "../.chunks/createSimplePaletteValueFilter.js";
|
|
15
15
|
import { i as E } from "../.chunks/integerPropType.js";
|
|
16
|
-
function
|
|
16
|
+
function nr(e) {
|
|
17
17
|
return V("MuiLinearProgress", e);
|
|
18
18
|
}
|
|
19
19
|
_("MuiLinearProgress", ["root", "colorPrimary", "colorSecondary", "determinate", "indeterminate", "buffer", "query", "dashed", "dashedColorPrimary", "dashedColorSecondary", "bar", "barColorPrimary", "barColorSecondary", "bar1Indeterminate", "bar1Determinate", "bar1Buffer", "bar2Indeterminate", "bar2Buffer"]);
|
|
@@ -32,7 +32,7 @@ const $ = 4, j = A`
|
|
|
32
32
|
left: 100%;
|
|
33
33
|
right: -90%;
|
|
34
34
|
}
|
|
35
|
-
`,
|
|
35
|
+
`, ir = typeof j != "string" ? P`
|
|
36
36
|
animation: ${j} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
37
37
|
` : null, B = A`
|
|
38
38
|
0% {
|
|
@@ -49,7 +49,7 @@ const $ = 4, j = A`
|
|
|
49
49
|
left: 107%;
|
|
50
50
|
right: -8%;
|
|
51
51
|
}
|
|
52
|
-
`,
|
|
52
|
+
`, sr = typeof B != "string" ? P`
|
|
53
53
|
animation: ${B} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
|
|
54
54
|
` : null, L = A`
|
|
55
55
|
0% {
|
|
@@ -66,30 +66,30 @@ const $ = 4, j = A`
|
|
|
66
66
|
opacity: 1;
|
|
67
67
|
background-position: -200px -23px;
|
|
68
68
|
}
|
|
69
|
-
`,
|
|
69
|
+
`, lr = typeof L != "string" ? P`
|
|
70
70
|
animation: ${L} 3s infinite linear;
|
|
71
|
-
` : null,
|
|
71
|
+
` : null, pr = (e) => {
|
|
72
72
|
const {
|
|
73
73
|
classes: r,
|
|
74
74
|
variant: t,
|
|
75
75
|
color: l
|
|
76
76
|
} = e, u = {
|
|
77
|
-
root: ["root", `color${
|
|
78
|
-
dashed: ["dashed", `dashedColor${
|
|
79
|
-
bar1: ["bar", `barColor${
|
|
80
|
-
bar2: ["bar", t !== "buffer" && `barColor${
|
|
77
|
+
root: ["root", `color${f(l)}`, t],
|
|
78
|
+
dashed: ["dashed", `dashedColor${f(l)}`],
|
|
79
|
+
bar1: ["bar", `barColor${f(l)}`, (t === "indeterminate" || t === "query") && "bar1Indeterminate", t === "determinate" && "bar1Determinate", t === "buffer" && "bar1Buffer"],
|
|
80
|
+
bar2: ["bar", t !== "buffer" && `barColor${f(l)}`, t === "buffer" && `color${f(l)}`, (t === "indeterminate" || t === "query") && "bar2Indeterminate", t === "buffer" && "bar2Buffer"]
|
|
81
81
|
};
|
|
82
|
-
return
|
|
83
|
-
},
|
|
82
|
+
return K(u, nr, r);
|
|
83
|
+
}, D = (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 = g("span", {
|
|
84
84
|
name: "MuiLinearProgress",
|
|
85
85
|
slot: "Root",
|
|
86
86
|
overridesResolver: (e, r) => {
|
|
87
87
|
const {
|
|
88
88
|
ownerState: t
|
|
89
89
|
} = e;
|
|
90
|
-
return [r.root, r[`color${
|
|
90
|
+
return [r.root, r[`color${f(t.color)}`], r[t.variant]];
|
|
91
91
|
}
|
|
92
|
-
})(
|
|
92
|
+
})(w(({
|
|
93
93
|
theme: e
|
|
94
94
|
}) => ({
|
|
95
95
|
position: "relative",
|
|
@@ -101,12 +101,12 @@ const $ = 4, j = A`
|
|
|
101
101
|
"@media print": {
|
|
102
102
|
colorAdjust: "exact"
|
|
103
103
|
},
|
|
104
|
-
variants: [...Object.entries(e.palette).filter(
|
|
104
|
+
variants: [...Object.entries(e.palette).filter(k()).map(([r]) => ({
|
|
105
105
|
props: {
|
|
106
106
|
color: r
|
|
107
107
|
},
|
|
108
108
|
style: {
|
|
109
|
-
backgroundColor:
|
|
109
|
+
backgroundColor: D(e, r)
|
|
110
110
|
}
|
|
111
111
|
})), {
|
|
112
112
|
props: ({
|
|
@@ -139,16 +139,16 @@ const $ = 4, j = A`
|
|
|
139
139
|
transform: "rotate(180deg)"
|
|
140
140
|
}
|
|
141
141
|
}]
|
|
142
|
-
}))),
|
|
142
|
+
}))), dr = g("span", {
|
|
143
143
|
name: "MuiLinearProgress",
|
|
144
144
|
slot: "Dashed",
|
|
145
145
|
overridesResolver: (e, r) => {
|
|
146
146
|
const {
|
|
147
147
|
ownerState: t
|
|
148
148
|
} = e;
|
|
149
|
-
return [r.dashed, r[`dashedColor${
|
|
149
|
+
return [r.dashed, r[`dashedColor${f(t.color)}`]];
|
|
150
150
|
}
|
|
151
|
-
})(
|
|
151
|
+
})(w(({
|
|
152
152
|
theme: e
|
|
153
153
|
}) => ({
|
|
154
154
|
position: "absolute",
|
|
@@ -165,8 +165,8 @@ const $ = 4, j = A`
|
|
|
165
165
|
opacity: 0.3,
|
|
166
166
|
backgroundImage: "radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"
|
|
167
167
|
}
|
|
168
|
-
}, ...Object.entries(e.palette).filter(
|
|
169
|
-
const t =
|
|
168
|
+
}, ...Object.entries(e.palette).filter(k()).map(([r]) => {
|
|
169
|
+
const t = D(e, r);
|
|
170
170
|
return {
|
|
171
171
|
props: {
|
|
172
172
|
color: r
|
|
@@ -176,19 +176,19 @@ const $ = 4, j = A`
|
|
|
176
176
|
}
|
|
177
177
|
};
|
|
178
178
|
})]
|
|
179
|
-
})),
|
|
179
|
+
})), lr || {
|
|
180
180
|
// At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
|
|
181
181
|
animation: `${L} 3s infinite linear`
|
|
182
|
-
}),
|
|
182
|
+
}), ur = g("span", {
|
|
183
183
|
name: "MuiLinearProgress",
|
|
184
184
|
slot: "Bar1",
|
|
185
185
|
overridesResolver: (e, r) => {
|
|
186
186
|
const {
|
|
187
187
|
ownerState: t
|
|
188
188
|
} = e;
|
|
189
|
-
return [r.bar, r[`barColor${
|
|
189
|
+
return [r.bar, r[`barColor${f(t.color)}`], (t.variant === "indeterminate" || t.variant === "query") && r.bar1Indeterminate, t.variant === "determinate" && r.bar1Determinate, t.variant === "buffer" && r.bar1Buffer];
|
|
190
190
|
}
|
|
191
|
-
})(
|
|
191
|
+
})(w(({
|
|
192
192
|
theme: e
|
|
193
193
|
}) => ({
|
|
194
194
|
width: "100%",
|
|
@@ -205,7 +205,7 @@ const $ = 4, j = A`
|
|
|
205
205
|
style: {
|
|
206
206
|
backgroundColor: "currentColor"
|
|
207
207
|
}
|
|
208
|
-
}, ...Object.entries(e.palette).filter(
|
|
208
|
+
}, ...Object.entries(e.palette).filter(k()).map(([r]) => ({
|
|
209
209
|
props: {
|
|
210
210
|
color: r
|
|
211
211
|
},
|
|
@@ -238,20 +238,20 @@ const $ = 4, j = A`
|
|
|
238
238
|
props: ({
|
|
239
239
|
ownerState: r
|
|
240
240
|
}) => r.variant === "indeterminate" || r.variant === "query",
|
|
241
|
-
style:
|
|
241
|
+
style: ir || {
|
|
242
242
|
animation: `${j} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`
|
|
243
243
|
}
|
|
244
244
|
}]
|
|
245
|
-
}))),
|
|
245
|
+
}))), fr = g("span", {
|
|
246
246
|
name: "MuiLinearProgress",
|
|
247
247
|
slot: "Bar2",
|
|
248
248
|
overridesResolver: (e, r) => {
|
|
249
249
|
const {
|
|
250
250
|
ownerState: t
|
|
251
251
|
} = e;
|
|
252
|
-
return [r.bar, r[`barColor${
|
|
252
|
+
return [r.bar, r[`barColor${f(t.color)}`], (t.variant === "indeterminate" || t.variant === "query") && r.bar2Indeterminate, t.variant === "buffer" && r.bar2Buffer];
|
|
253
253
|
}
|
|
254
|
-
})(
|
|
254
|
+
})(w(({
|
|
255
255
|
theme: e
|
|
256
256
|
}) => ({
|
|
257
257
|
width: "100%",
|
|
@@ -261,7 +261,7 @@ const $ = 4, j = A`
|
|
|
261
261
|
top: 0,
|
|
262
262
|
transition: "transform 0.2s linear",
|
|
263
263
|
transformOrigin: "left",
|
|
264
|
-
variants: [...Object.entries(e.palette).filter(
|
|
264
|
+
variants: [...Object.entries(e.palette).filter(k()).map(([r]) => ({
|
|
265
265
|
props: {
|
|
266
266
|
color: r
|
|
267
267
|
},
|
|
@@ -289,13 +289,13 @@ const $ = 4, j = A`
|
|
|
289
289
|
style: {
|
|
290
290
|
opacity: 0.3
|
|
291
291
|
}
|
|
292
|
-
}, ...Object.entries(e.palette).filter(
|
|
292
|
+
}, ...Object.entries(e.palette).filter(k()).map(([r]) => ({
|
|
293
293
|
props: {
|
|
294
294
|
color: r,
|
|
295
295
|
variant: "buffer"
|
|
296
296
|
},
|
|
297
297
|
style: {
|
|
298
|
-
backgroundColor:
|
|
298
|
+
backgroundColor: D(e, r),
|
|
299
299
|
transition: `transform .${$}s linear`
|
|
300
300
|
}
|
|
301
301
|
})), {
|
|
@@ -309,58 +309,58 @@ const $ = 4, j = A`
|
|
|
309
309
|
props: ({
|
|
310
310
|
ownerState: r
|
|
311
311
|
}) => r.variant === "indeterminate" || r.variant === "query",
|
|
312
|
-
style:
|
|
312
|
+
style: sr || {
|
|
313
313
|
animation: `${B} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`
|
|
314
314
|
}
|
|
315
315
|
}]
|
|
316
316
|
}))), X = /* @__PURE__ */ N.forwardRef(function(r, t) {
|
|
317
|
-
const l =
|
|
317
|
+
const l = F({
|
|
318
318
|
props: r,
|
|
319
319
|
name: "MuiLinearProgress"
|
|
320
320
|
}), {
|
|
321
321
|
className: u,
|
|
322
|
-
color:
|
|
323
|
-
value:
|
|
324
|
-
valueBuffer:
|
|
325
|
-
variant:
|
|
326
|
-
...
|
|
327
|
-
} = l,
|
|
322
|
+
color: b = "primary",
|
|
323
|
+
value: a,
|
|
324
|
+
valueBuffer: h,
|
|
325
|
+
variant: c = "indeterminate",
|
|
326
|
+
...v
|
|
327
|
+
} = l, i = {
|
|
328
328
|
...l,
|
|
329
|
-
color:
|
|
330
|
-
variant:
|
|
331
|
-
},
|
|
329
|
+
color: b,
|
|
330
|
+
variant: c
|
|
331
|
+
}, s = pr(i), y = ar(), d = {}, m = {
|
|
332
332
|
bar1: {},
|
|
333
333
|
bar2: {}
|
|
334
334
|
};
|
|
335
|
-
if (
|
|
336
|
-
if (
|
|
337
|
-
d["aria-valuenow"] = Math.round(
|
|
338
|
-
let
|
|
339
|
-
|
|
335
|
+
if (c === "determinate" || c === "buffer")
|
|
336
|
+
if (a !== void 0) {
|
|
337
|
+
d["aria-valuenow"] = Math.round(a), d["aria-valuemin"] = 0, d["aria-valuemax"] = 100;
|
|
338
|
+
let p = a - 100;
|
|
339
|
+
y && (p = -p), m.bar1.transform = `translateX(${p}%)`;
|
|
340
340
|
} 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 .");
|
|
341
|
-
if (
|
|
342
|
-
if (
|
|
343
|
-
let
|
|
344
|
-
|
|
341
|
+
if (c === "buffer")
|
|
342
|
+
if (h !== void 0) {
|
|
343
|
+
let p = (h || 0) - 100;
|
|
344
|
+
y && (p = -p), m.bar2.transform = `translateX(${p}%)`;
|
|
345
345
|
} else process.env.NODE_ENV !== "production" && console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");
|
|
346
|
-
return /* @__PURE__ */ S(
|
|
347
|
-
className: O(
|
|
348
|
-
ownerState:
|
|
346
|
+
return /* @__PURE__ */ S(cr, {
|
|
347
|
+
className: O(s.root, u),
|
|
348
|
+
ownerState: i,
|
|
349
349
|
role: "progressbar",
|
|
350
350
|
...d,
|
|
351
351
|
ref: t,
|
|
352
|
-
...
|
|
353
|
-
children: [
|
|
354
|
-
className:
|
|
355
|
-
ownerState:
|
|
356
|
-
}) : null, /* @__PURE__ */
|
|
357
|
-
className:
|
|
358
|
-
ownerState:
|
|
359
|
-
style:
|
|
360
|
-
}),
|
|
361
|
-
className:
|
|
362
|
-
ownerState:
|
|
363
|
-
style:
|
|
352
|
+
...v,
|
|
353
|
+
children: [c === "buffer" ? /* @__PURE__ */ n(dr, {
|
|
354
|
+
className: s.dashed,
|
|
355
|
+
ownerState: i
|
|
356
|
+
}) : null, /* @__PURE__ */ n(ur, {
|
|
357
|
+
className: s.bar1,
|
|
358
|
+
ownerState: i,
|
|
359
|
+
style: m.bar1
|
|
360
|
+
}), c === "determinate" ? null : /* @__PURE__ */ n(fr, {
|
|
361
|
+
className: s.bar2,
|
|
362
|
+
ownerState: i,
|
|
363
|
+
style: m.bar2
|
|
364
364
|
})]
|
|
365
365
|
});
|
|
366
366
|
});
|
|
@@ -405,32 +405,32 @@ process.env.NODE_ENV !== "production" && (X.propTypes = {
|
|
|
405
405
|
*/
|
|
406
406
|
variant: o.oneOf(["buffer", "determinate", "indeterminate", "query"])
|
|
407
407
|
});
|
|
408
|
-
function
|
|
408
|
+
function mr(e) {
|
|
409
409
|
return V("MuiMobileStepper", e);
|
|
410
410
|
}
|
|
411
411
|
_("MuiMobileStepper", ["root", "positionBottom", "positionTop", "positionStatic", "dots", "dot", "dotActive", "progress"]);
|
|
412
|
-
const
|
|
412
|
+
const br = (e) => {
|
|
413
413
|
const {
|
|
414
414
|
classes: r,
|
|
415
415
|
position: t
|
|
416
416
|
} = e, l = {
|
|
417
|
-
root: ["root", `position${
|
|
417
|
+
root: ["root", `position${f(t)}`],
|
|
418
418
|
dots: ["dots"],
|
|
419
419
|
dot: ["dot"],
|
|
420
420
|
dotActive: ["dotActive"],
|
|
421
421
|
progress: ["progress"]
|
|
422
422
|
};
|
|
423
|
-
return
|
|
424
|
-
},
|
|
423
|
+
return K(l, mr, r);
|
|
424
|
+
}, vr = g(or, {
|
|
425
425
|
name: "MuiMobileStepper",
|
|
426
426
|
slot: "Root",
|
|
427
427
|
overridesResolver: (e, r) => {
|
|
428
428
|
const {
|
|
429
429
|
ownerState: t
|
|
430
430
|
} = e;
|
|
431
|
-
return [r.root, r[`position${
|
|
431
|
+
return [r.root, r[`position${f(t.position)}`]];
|
|
432
432
|
}
|
|
433
|
-
})(
|
|
433
|
+
})(w(({
|
|
434
434
|
theme: e
|
|
435
435
|
}) => ({
|
|
436
436
|
display: "flex",
|
|
@@ -464,7 +464,7 @@ const mr = (e) => {
|
|
|
464
464
|
bottom: 0
|
|
465
465
|
}
|
|
466
466
|
}]
|
|
467
|
-
}))),
|
|
467
|
+
}))), gr = g("div", {
|
|
468
468
|
name: "MuiMobileStepper",
|
|
469
469
|
slot: "Dots",
|
|
470
470
|
overridesResolver: (e, r) => r.dots
|
|
@@ -478,17 +478,17 @@ const mr = (e) => {
|
|
|
478
478
|
flexDirection: "row"
|
|
479
479
|
}
|
|
480
480
|
}]
|
|
481
|
-
}),
|
|
481
|
+
}), hr = g("div", {
|
|
482
482
|
name: "MuiMobileStepper",
|
|
483
483
|
slot: "Dot",
|
|
484
|
-
shouldForwardProp: (e) =>
|
|
484
|
+
shouldForwardProp: (e) => tr(e) && e !== "dotActive",
|
|
485
485
|
overridesResolver: (e, r) => {
|
|
486
486
|
const {
|
|
487
487
|
dotActive: t
|
|
488
488
|
} = e;
|
|
489
489
|
return [r.dot, t && r.dotActive];
|
|
490
490
|
}
|
|
491
|
-
})(
|
|
491
|
+
})(w(({
|
|
492
492
|
theme: e
|
|
493
493
|
}) => ({
|
|
494
494
|
variants: [{
|
|
@@ -514,7 +514,7 @@ const mr = (e) => {
|
|
|
514
514
|
backgroundColor: (e.vars || e).palette.primary.main
|
|
515
515
|
}
|
|
516
516
|
}]
|
|
517
|
-
}))), yr =
|
|
517
|
+
}))), yr = g(X, {
|
|
518
518
|
name: "MuiMobileStepper",
|
|
519
519
|
slot: "Progress",
|
|
520
520
|
overridesResolver: (e, r) => r.progress
|
|
@@ -528,52 +528,52 @@ const mr = (e) => {
|
|
|
528
528
|
}
|
|
529
529
|
}]
|
|
530
530
|
}), Y = /* @__PURE__ */ N.forwardRef(function(r, t) {
|
|
531
|
-
const l =
|
|
531
|
+
const l = F({
|
|
532
532
|
props: r,
|
|
533
533
|
name: "MuiMobileStepper"
|
|
534
534
|
}), {
|
|
535
535
|
activeStep: u = 0,
|
|
536
|
-
backButton:
|
|
537
|
-
className:
|
|
538
|
-
LinearProgressProps:
|
|
539
|
-
nextButton:
|
|
540
|
-
position:
|
|
541
|
-
steps:
|
|
542
|
-
variant:
|
|
543
|
-
...
|
|
536
|
+
backButton: b,
|
|
537
|
+
className: a,
|
|
538
|
+
LinearProgressProps: h,
|
|
539
|
+
nextButton: c,
|
|
540
|
+
position: v = "bottom",
|
|
541
|
+
steps: i,
|
|
542
|
+
variant: s = "dots",
|
|
543
|
+
...y
|
|
544
544
|
} = l, d = {
|
|
545
545
|
...l,
|
|
546
546
|
activeStep: u,
|
|
547
|
-
position:
|
|
548
|
-
variant:
|
|
547
|
+
position: v,
|
|
548
|
+
variant: s
|
|
549
549
|
};
|
|
550
|
-
let
|
|
551
|
-
|
|
552
|
-
const
|
|
553
|
-
return /* @__PURE__ */ S(
|
|
550
|
+
let m;
|
|
551
|
+
s === "progress" && (i === 1 ? m = 100 : m = Math.ceil(u / (i - 1) * 100));
|
|
552
|
+
const p = br(d);
|
|
553
|
+
return /* @__PURE__ */ S(vr, {
|
|
554
554
|
square: !0,
|
|
555
555
|
elevation: 0,
|
|
556
|
-
className: O(
|
|
556
|
+
className: O(p.root, a),
|
|
557
557
|
ref: t,
|
|
558
558
|
ownerState: d,
|
|
559
|
-
...
|
|
560
|
-
children: [
|
|
561
|
-
children: [u + 1, " / ",
|
|
562
|
-
}),
|
|
559
|
+
...y,
|
|
560
|
+
children: [b, s === "text" && /* @__PURE__ */ S(N.Fragment, {
|
|
561
|
+
children: [u + 1, " / ", i]
|
|
562
|
+
}), s === "dots" && /* @__PURE__ */ n(gr, {
|
|
563
563
|
ownerState: d,
|
|
564
|
-
className:
|
|
565
|
-
children: [...new Array(
|
|
566
|
-
className: O(
|
|
564
|
+
className: p.dots,
|
|
565
|
+
children: [...new Array(i)].map((C, x) => /* @__PURE__ */ n(hr, {
|
|
566
|
+
className: O(p.dot, x === u && p.dotActive),
|
|
567
567
|
ownerState: d,
|
|
568
|
-
dotActive:
|
|
569
|
-
},
|
|
570
|
-
}),
|
|
568
|
+
dotActive: x === u
|
|
569
|
+
}, x))
|
|
570
|
+
}), s === "progress" && /* @__PURE__ */ n(yr, {
|
|
571
571
|
ownerState: d,
|
|
572
|
-
className:
|
|
572
|
+
className: p.progress,
|
|
573
573
|
variant: "determinate",
|
|
574
|
-
value:
|
|
575
|
-
...
|
|
576
|
-
}),
|
|
574
|
+
value: m,
|
|
575
|
+
...h
|
|
576
|
+
}), c]
|
|
577
577
|
});
|
|
578
578
|
});
|
|
579
579
|
process.env.NODE_ENV !== "production" && (Y.propTypes = {
|
|
@@ -626,8 +626,10 @@ process.env.NODE_ENV !== "production" && (Y.propTypes = {
|
|
|
626
626
|
*/
|
|
627
627
|
variant: o.oneOf(["dots", "progress", "text"])
|
|
628
628
|
});
|
|
629
|
-
const
|
|
630
|
-
|
|
629
|
+
const Cr = R("div", {
|
|
630
|
+
shouldForwardProp: (e) => !["customTheme"].includes(e)
|
|
631
|
+
})(({ customTheme: e }) => ({
|
|
632
|
+
...P`
|
|
631
633
|
position: relative;
|
|
632
634
|
display: flex;
|
|
633
635
|
flex-direction: column;
|
|
@@ -650,65 +652,83 @@ const hr = R("div")(() => ({
|
|
|
650
652
|
.MuiLinearProgress-root {
|
|
651
653
|
padding: 9px;
|
|
652
654
|
margin: 0 9px;
|
|
653
|
-
background-color: ${
|
|
654
|
-
border-color: ${
|
|
655
|
+
background-color: ${e.themeLightA}; // whiteGreenA
|
|
656
|
+
border-color: ${e.themeColor}; // green
|
|
655
657
|
|
|
656
658
|
.MuiLinearProgress-bar {
|
|
657
|
-
background-color: ${
|
|
659
|
+
background-color: ${e.themeColor}; // green
|
|
658
660
|
}
|
|
659
661
|
}
|
|
660
662
|
`
|
|
661
663
|
})), U = R("div")(() => ({
|
|
662
|
-
...
|
|
664
|
+
...P`
|
|
663
665
|
position: absolute;
|
|
664
666
|
top: 0;
|
|
665
667
|
width: 100%;
|
|
666
668
|
height: 100%;
|
|
667
669
|
`
|
|
668
670
|
})), Sr = R("div")(() => ({
|
|
669
|
-
...
|
|
671
|
+
...P`
|
|
670
672
|
width: 100%;
|
|
671
673
|
height: 100%;
|
|
672
674
|
`
|
|
673
|
-
})),
|
|
675
|
+
})), Ir = ({
|
|
674
676
|
onNext: e,
|
|
675
677
|
onBack: r,
|
|
676
678
|
onFinish: t,
|
|
677
679
|
children: l,
|
|
678
680
|
...u
|
|
679
681
|
}) => {
|
|
680
|
-
const [
|
|
681
|
-
(
|
|
682
|
-
), s =
|
|
683
|
-
|
|
684
|
-
},
|
|
685
|
-
M(() =>
|
|
686
|
-
},
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
682
|
+
const b = Z(), [a, h] = T(0), [c, v] = T("forward"), i = G.toArray(l).filter(
|
|
683
|
+
(C) => H(C)
|
|
684
|
+
), s = i.length, y = () => {
|
|
685
|
+
a === s - 1 ? t == null || t() : (M(() => v("none")), M(() => v("forward")), h((C) => C + 1), e == null || e());
|
|
686
|
+
}, d = () => {
|
|
687
|
+
M(() => v("none")), M(() => v("reverse")), h((C) => C - 1), r == null || r();
|
|
688
|
+
}, m = () => /* @__PURE__ */ n(
|
|
689
|
+
q,
|
|
690
|
+
{
|
|
691
|
+
variant: "custom",
|
|
692
|
+
onClick: y,
|
|
693
|
+
backgroundColor: b.themeColor,
|
|
694
|
+
hoverColor: b.themeDark,
|
|
695
|
+
children: a === s - 1 ? "Finish" : "Next"
|
|
696
|
+
}
|
|
697
|
+
), p = () => /* @__PURE__ */ n(
|
|
698
|
+
q,
|
|
699
|
+
{
|
|
700
|
+
variant: "custom",
|
|
701
|
+
onClick: d,
|
|
702
|
+
backgroundColor: b.themeColor,
|
|
703
|
+
hoverColor: b.themeDark,
|
|
704
|
+
children: "Back"
|
|
705
|
+
}
|
|
706
|
+
);
|
|
707
|
+
return /* @__PURE__ */ S(Cr, { className: "jcStepContainer", customTheme: b, children: [
|
|
708
|
+
a === 0 && c === "forward" && /* @__PURE__ */ n(Sr, { className: "jcSlideContainer", children: i[a] ?? null }),
|
|
709
|
+
a !== 0 && c === "forward" && /* @__PURE__ */ S(I, { children: [
|
|
710
|
+
/* @__PURE__ */ n(U, { className: "jcSlideOutContainer", children: /* @__PURE__ */ n(J, { className: "jcSlideContainer", children: i[a - 1] ?? null }) }),
|
|
711
|
+
/* @__PURE__ */ n(Q, { className: "jcSlideContainer", children: i[a] ?? null })
|
|
692
712
|
] }),
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
/* @__PURE__ */
|
|
696
|
-
/* @__PURE__ */
|
|
713
|
+
a === s - 1 && c === "reverse" && /* @__PURE__ */ n(z, { className: "jcSlideContainer", children: i[a] ?? null }),
|
|
714
|
+
a !== s - 1 && c === "reverse" && /* @__PURE__ */ S(I, { children: [
|
|
715
|
+
/* @__PURE__ */ n(U, { className: "jcSlideOutContainer", children: /* @__PURE__ */ n(W, { className: "jcSlideContainer", children: i[a + 1] ?? null }) }),
|
|
716
|
+
/* @__PURE__ */ n(z, { className: "jcSlideContainer", children: i[a] ?? null })
|
|
697
717
|
] }),
|
|
698
|
-
/* @__PURE__ */
|
|
718
|
+
/* @__PURE__ */ n(
|
|
699
719
|
Y,
|
|
700
720
|
{
|
|
701
721
|
variant: "progress",
|
|
702
722
|
steps: s,
|
|
703
723
|
position: "static",
|
|
704
|
-
activeStep:
|
|
705
|
-
nextButton: /* @__PURE__ */
|
|
706
|
-
backButton:
|
|
724
|
+
activeStep: a,
|
|
725
|
+
nextButton: /* @__PURE__ */ n(m, {}),
|
|
726
|
+
backButton: a === 0 ? /* @__PURE__ */ n("div", { style: { width: "103px" } }) : /* @__PURE__ */ n(p, {}),
|
|
707
727
|
...u
|
|
708
728
|
}
|
|
709
729
|
)
|
|
710
730
|
] });
|
|
711
731
|
};
|
|
712
732
|
export {
|
|
713
|
-
|
|
733
|
+
Ir as default
|
|
714
734
|
};
|