jcicl 0.0.227 → 0.0.229
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/.chunks/AppContainer.js +17 -15
- package/.chunks/DefaultPropsProvider.js +8 -6
- package/.chunks/Paper.js +155 -0
- package/.chunks/Popper.js +1 -1
- package/.chunks/Portal.js +183 -201
- package/.chunks/TextField.js +1067 -1209
- package/.chunks/index.js +6 -83
- package/.chunks/integerPropType.js +31 -0
- package/.chunks/resolveComponentProps.js +80 -0
- package/.chunks/useSlot.js +41 -70
- package/.chunks/useTheme.js +23 -0
- package/Button/Button.js +1 -1
- package/LabeledDropdown/LabeledDropdown.js +21 -19
- package/Pagination/Pagination.js +139 -138
- package/Stepper/Stepper.d.ts +9 -0
- package/Stepper/Stepper.js +687 -0
- package/Stepper/index.d.ts +1 -0
- package/Stepper/index.js +4 -0
- package/Tooltip/Tooltip.js +20 -18
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { MobileStepperProps } from '@mui/material/MobileStepper';
|
|
3
|
+
export type StepperProps = {
|
|
4
|
+
onNext?: () => void;
|
|
5
|
+
onFinish: () => void;
|
|
6
|
+
onBack?: () => void;
|
|
7
|
+
} & Partial<MobileStepperProps>;
|
|
8
|
+
declare const Stepper: React.FC<PropsWithChildren<StepperProps>>;
|
|
9
|
+
export default Stepper;
|
|
@@ -0,0 +1,687 @@
|
|
|
1
|
+
import { jsxs as S, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import * as w from "react";
|
|
3
|
+
import { useState as V, Children as j } from "react";
|
|
4
|
+
import { n as K } from "../.chunks/emotion-styled.browser.esm.js";
|
|
5
|
+
import { k as R, c as M } from "../.chunks/emotion-react.browser.esm.js";
|
|
6
|
+
import { Button as I } from "../Button/Button.js";
|
|
7
|
+
import x from "../theme.js";
|
|
8
|
+
import { g as T, a as q, s as y, c, u as z, b as $, P as o, d as U, l as X, j as Y, k as F } from "../.chunks/DefaultPropsProvider.js";
|
|
9
|
+
import { m as h } from "../.chunks/memoTheme.js";
|
|
10
|
+
import { P as G } from "../.chunks/Paper.js";
|
|
11
|
+
import { u as H } from "../.chunks/index.js";
|
|
12
|
+
import { c as P } from "../.chunks/createSimplePaletteValueFilter.js";
|
|
13
|
+
import { i as D } from "../.chunks/integerPropType.js";
|
|
14
|
+
function J(e) {
|
|
15
|
+
return T("MuiLinearProgress", e);
|
|
16
|
+
}
|
|
17
|
+
q("MuiLinearProgress", ["root", "colorPrimary", "colorSecondary", "determinate", "indeterminate", "buffer", "query", "dashed", "dashedColorPrimary", "dashedColorSecondary", "bar", "barColorPrimary", "barColorSecondary", "bar1Indeterminate", "bar1Determinate", "bar1Buffer", "bar2Indeterminate", "bar2Buffer"]);
|
|
18
|
+
const B = 4, O = R`
|
|
19
|
+
0% {
|
|
20
|
+
left: -35%;
|
|
21
|
+
right: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
60% {
|
|
25
|
+
left: 100%;
|
|
26
|
+
right: -90%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
100% {
|
|
30
|
+
left: 100%;
|
|
31
|
+
right: -90%;
|
|
32
|
+
}
|
|
33
|
+
`, Q = typeof O != "string" ? M`
|
|
34
|
+
animation: ${O} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
35
|
+
` : null, L = R`
|
|
36
|
+
0% {
|
|
37
|
+
left: -200%;
|
|
38
|
+
right: 100%;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
60% {
|
|
42
|
+
left: 107%;
|
|
43
|
+
right: -8%;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
100% {
|
|
47
|
+
left: 107%;
|
|
48
|
+
right: -8%;
|
|
49
|
+
}
|
|
50
|
+
`, W = typeof L != "string" ? M`
|
|
51
|
+
animation: ${L} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
|
|
52
|
+
` : null, N = R`
|
|
53
|
+
0% {
|
|
54
|
+
opacity: 1;
|
|
55
|
+
background-position: 0 -23px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
60% {
|
|
59
|
+
opacity: 0;
|
|
60
|
+
background-position: 0 -23px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
100% {
|
|
64
|
+
opacity: 1;
|
|
65
|
+
background-position: -200px -23px;
|
|
66
|
+
}
|
|
67
|
+
`, Z = typeof N != "string" ? M`
|
|
68
|
+
animation: ${N} 3s infinite linear;
|
|
69
|
+
` : null, rr = (e) => {
|
|
70
|
+
const {
|
|
71
|
+
classes: r,
|
|
72
|
+
variant: t,
|
|
73
|
+
color: a
|
|
74
|
+
} = e, p = {
|
|
75
|
+
root: ["root", `color${c(a)}`, t],
|
|
76
|
+
dashed: ["dashed", `dashedColor${c(a)}`],
|
|
77
|
+
bar1: ["bar", `barColor${c(a)}`, (t === "indeterminate" || t === "query") && "bar1Indeterminate", t === "determinate" && "bar1Determinate", t === "buffer" && "bar1Buffer"],
|
|
78
|
+
bar2: ["bar", t !== "buffer" && `barColor${c(a)}`, t === "buffer" && `color${c(a)}`, (t === "indeterminate" || t === "query") && "bar2Indeterminate", t === "buffer" && "bar2Buffer"]
|
|
79
|
+
};
|
|
80
|
+
return U(p, J, r);
|
|
81
|
+
}, A = (e, r) => e.vars ? e.vars.palette.LinearProgress[`${r}Bg`] : e.palette.mode === "light" ? X(e.palette[r].main, 0.62) : Y(e.palette[r].main, 0.5), er = y("span", {
|
|
82
|
+
name: "MuiLinearProgress",
|
|
83
|
+
slot: "Root",
|
|
84
|
+
overridesResolver: (e, r) => {
|
|
85
|
+
const {
|
|
86
|
+
ownerState: t
|
|
87
|
+
} = e;
|
|
88
|
+
return [r.root, r[`color${c(t.color)}`], r[t.variant]];
|
|
89
|
+
}
|
|
90
|
+
})(h(({
|
|
91
|
+
theme: e
|
|
92
|
+
}) => ({
|
|
93
|
+
position: "relative",
|
|
94
|
+
overflow: "hidden",
|
|
95
|
+
display: "block",
|
|
96
|
+
height: 4,
|
|
97
|
+
// Fix Safari's bug during composition of different paint.
|
|
98
|
+
zIndex: 0,
|
|
99
|
+
"@media print": {
|
|
100
|
+
colorAdjust: "exact"
|
|
101
|
+
},
|
|
102
|
+
variants: [...Object.entries(e.palette).filter(P()).map(([r]) => ({
|
|
103
|
+
props: {
|
|
104
|
+
color: r
|
|
105
|
+
},
|
|
106
|
+
style: {
|
|
107
|
+
backgroundColor: A(e, r)
|
|
108
|
+
}
|
|
109
|
+
})), {
|
|
110
|
+
props: ({
|
|
111
|
+
ownerState: r
|
|
112
|
+
}) => r.color === "inherit" && r.variant !== "buffer",
|
|
113
|
+
style: {
|
|
114
|
+
"&::before": {
|
|
115
|
+
content: '""',
|
|
116
|
+
position: "absolute",
|
|
117
|
+
left: 0,
|
|
118
|
+
top: 0,
|
|
119
|
+
right: 0,
|
|
120
|
+
bottom: 0,
|
|
121
|
+
backgroundColor: "currentColor",
|
|
122
|
+
opacity: 0.3
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}, {
|
|
126
|
+
props: {
|
|
127
|
+
variant: "buffer"
|
|
128
|
+
},
|
|
129
|
+
style: {
|
|
130
|
+
backgroundColor: "transparent"
|
|
131
|
+
}
|
|
132
|
+
}, {
|
|
133
|
+
props: {
|
|
134
|
+
variant: "query"
|
|
135
|
+
},
|
|
136
|
+
style: {
|
|
137
|
+
transform: "rotate(180deg)"
|
|
138
|
+
}
|
|
139
|
+
}]
|
|
140
|
+
}))), tr = y("span", {
|
|
141
|
+
name: "MuiLinearProgress",
|
|
142
|
+
slot: "Dashed",
|
|
143
|
+
overridesResolver: (e, r) => {
|
|
144
|
+
const {
|
|
145
|
+
ownerState: t
|
|
146
|
+
} = e;
|
|
147
|
+
return [r.dashed, r[`dashedColor${c(t.color)}`]];
|
|
148
|
+
}
|
|
149
|
+
})(h(({
|
|
150
|
+
theme: e
|
|
151
|
+
}) => ({
|
|
152
|
+
position: "absolute",
|
|
153
|
+
marginTop: 0,
|
|
154
|
+
height: "100%",
|
|
155
|
+
width: "100%",
|
|
156
|
+
backgroundSize: "10px 10px",
|
|
157
|
+
backgroundPosition: "0 -23px",
|
|
158
|
+
variants: [{
|
|
159
|
+
props: {
|
|
160
|
+
color: "inherit"
|
|
161
|
+
},
|
|
162
|
+
style: {
|
|
163
|
+
opacity: 0.3,
|
|
164
|
+
backgroundImage: "radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"
|
|
165
|
+
}
|
|
166
|
+
}, ...Object.entries(e.palette).filter(P()).map(([r]) => {
|
|
167
|
+
const t = A(e, r);
|
|
168
|
+
return {
|
|
169
|
+
props: {
|
|
170
|
+
color: r
|
|
171
|
+
},
|
|
172
|
+
style: {
|
|
173
|
+
backgroundImage: `radial-gradient(${t} 0%, ${t} 16%, transparent 42%)`
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
})]
|
|
177
|
+
})), Z || {
|
|
178
|
+
// At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
|
|
179
|
+
animation: `${N} 3s infinite linear`
|
|
180
|
+
}), or = y("span", {
|
|
181
|
+
name: "MuiLinearProgress",
|
|
182
|
+
slot: "Bar1",
|
|
183
|
+
overridesResolver: (e, r) => {
|
|
184
|
+
const {
|
|
185
|
+
ownerState: t
|
|
186
|
+
} = e;
|
|
187
|
+
return [r.bar, r[`barColor${c(t.color)}`], (t.variant === "indeterminate" || t.variant === "query") && r.bar1Indeterminate, t.variant === "determinate" && r.bar1Determinate, t.variant === "buffer" && r.bar1Buffer];
|
|
188
|
+
}
|
|
189
|
+
})(h(({
|
|
190
|
+
theme: e
|
|
191
|
+
}) => ({
|
|
192
|
+
width: "100%",
|
|
193
|
+
position: "absolute",
|
|
194
|
+
left: 0,
|
|
195
|
+
bottom: 0,
|
|
196
|
+
top: 0,
|
|
197
|
+
transition: "transform 0.2s linear",
|
|
198
|
+
transformOrigin: "left",
|
|
199
|
+
variants: [{
|
|
200
|
+
props: {
|
|
201
|
+
color: "inherit"
|
|
202
|
+
},
|
|
203
|
+
style: {
|
|
204
|
+
backgroundColor: "currentColor"
|
|
205
|
+
}
|
|
206
|
+
}, ...Object.entries(e.palette).filter(P()).map(([r]) => ({
|
|
207
|
+
props: {
|
|
208
|
+
color: r
|
|
209
|
+
},
|
|
210
|
+
style: {
|
|
211
|
+
backgroundColor: (e.vars || e).palette[r].main
|
|
212
|
+
}
|
|
213
|
+
})), {
|
|
214
|
+
props: {
|
|
215
|
+
variant: "determinate"
|
|
216
|
+
},
|
|
217
|
+
style: {
|
|
218
|
+
transition: `transform .${B}s linear`
|
|
219
|
+
}
|
|
220
|
+
}, {
|
|
221
|
+
props: {
|
|
222
|
+
variant: "buffer"
|
|
223
|
+
},
|
|
224
|
+
style: {
|
|
225
|
+
zIndex: 1,
|
|
226
|
+
transition: `transform .${B}s linear`
|
|
227
|
+
}
|
|
228
|
+
}, {
|
|
229
|
+
props: ({
|
|
230
|
+
ownerState: r
|
|
231
|
+
}) => r.variant === "indeterminate" || r.variant === "query",
|
|
232
|
+
style: {
|
|
233
|
+
width: "auto"
|
|
234
|
+
}
|
|
235
|
+
}, {
|
|
236
|
+
props: ({
|
|
237
|
+
ownerState: r
|
|
238
|
+
}) => r.variant === "indeterminate" || r.variant === "query",
|
|
239
|
+
style: Q || {
|
|
240
|
+
animation: `${O} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`
|
|
241
|
+
}
|
|
242
|
+
}]
|
|
243
|
+
}))), ar = y("span", {
|
|
244
|
+
name: "MuiLinearProgress",
|
|
245
|
+
slot: "Bar2",
|
|
246
|
+
overridesResolver: (e, r) => {
|
|
247
|
+
const {
|
|
248
|
+
ownerState: t
|
|
249
|
+
} = e;
|
|
250
|
+
return [r.bar, r[`barColor${c(t.color)}`], (t.variant === "indeterminate" || t.variant === "query") && r.bar2Indeterminate, t.variant === "buffer" && r.bar2Buffer];
|
|
251
|
+
}
|
|
252
|
+
})(h(({
|
|
253
|
+
theme: e
|
|
254
|
+
}) => ({
|
|
255
|
+
width: "100%",
|
|
256
|
+
position: "absolute",
|
|
257
|
+
left: 0,
|
|
258
|
+
bottom: 0,
|
|
259
|
+
top: 0,
|
|
260
|
+
transition: "transform 0.2s linear",
|
|
261
|
+
transformOrigin: "left",
|
|
262
|
+
variants: [...Object.entries(e.palette).filter(P()).map(([r]) => ({
|
|
263
|
+
props: {
|
|
264
|
+
color: r
|
|
265
|
+
},
|
|
266
|
+
style: {
|
|
267
|
+
"--LinearProgressBar2-barColor": (e.vars || e).palette[r].main
|
|
268
|
+
}
|
|
269
|
+
})), {
|
|
270
|
+
props: ({
|
|
271
|
+
ownerState: r
|
|
272
|
+
}) => r.variant !== "buffer" && r.color !== "inherit",
|
|
273
|
+
style: {
|
|
274
|
+
backgroundColor: "var(--LinearProgressBar2-barColor, currentColor)"
|
|
275
|
+
}
|
|
276
|
+
}, {
|
|
277
|
+
props: ({
|
|
278
|
+
ownerState: r
|
|
279
|
+
}) => r.variant !== "buffer" && r.color === "inherit",
|
|
280
|
+
style: {
|
|
281
|
+
backgroundColor: "currentColor"
|
|
282
|
+
}
|
|
283
|
+
}, {
|
|
284
|
+
props: {
|
|
285
|
+
color: "inherit"
|
|
286
|
+
},
|
|
287
|
+
style: {
|
|
288
|
+
opacity: 0.3
|
|
289
|
+
}
|
|
290
|
+
}, ...Object.entries(e.palette).filter(P()).map(([r]) => ({
|
|
291
|
+
props: {
|
|
292
|
+
color: r,
|
|
293
|
+
variant: "buffer"
|
|
294
|
+
},
|
|
295
|
+
style: {
|
|
296
|
+
backgroundColor: A(e, r),
|
|
297
|
+
transition: `transform .${B}s linear`
|
|
298
|
+
}
|
|
299
|
+
})), {
|
|
300
|
+
props: ({
|
|
301
|
+
ownerState: r
|
|
302
|
+
}) => r.variant === "indeterminate" || r.variant === "query",
|
|
303
|
+
style: {
|
|
304
|
+
width: "auto"
|
|
305
|
+
}
|
|
306
|
+
}, {
|
|
307
|
+
props: ({
|
|
308
|
+
ownerState: r
|
|
309
|
+
}) => r.variant === "indeterminate" || r.variant === "query",
|
|
310
|
+
style: W || {
|
|
311
|
+
animation: `${L} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`
|
|
312
|
+
}
|
|
313
|
+
}]
|
|
314
|
+
}))), E = /* @__PURE__ */ w.forwardRef(function(r, t) {
|
|
315
|
+
const a = z({
|
|
316
|
+
props: r,
|
|
317
|
+
name: "MuiLinearProgress"
|
|
318
|
+
}), {
|
|
319
|
+
className: p,
|
|
320
|
+
color: f = "primary",
|
|
321
|
+
value: b,
|
|
322
|
+
valueBuffer: m,
|
|
323
|
+
variant: d = "indeterminate",
|
|
324
|
+
...C
|
|
325
|
+
} = a, i = {
|
|
326
|
+
...a,
|
|
327
|
+
color: f,
|
|
328
|
+
variant: d
|
|
329
|
+
}, s = rr(i), g = H(), u = {}, v = {
|
|
330
|
+
bar1: {},
|
|
331
|
+
bar2: {}
|
|
332
|
+
};
|
|
333
|
+
if (d === "determinate" || d === "buffer")
|
|
334
|
+
if (b !== void 0) {
|
|
335
|
+
u["aria-valuenow"] = Math.round(b), u["aria-valuemin"] = 0, u["aria-valuemax"] = 100;
|
|
336
|
+
let n = b - 100;
|
|
337
|
+
g && (n = -n), v.bar1.transform = `translateX(${n}%)`;
|
|
338
|
+
} 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 .");
|
|
339
|
+
if (d === "buffer")
|
|
340
|
+
if (m !== void 0) {
|
|
341
|
+
let n = (m || 0) - 100;
|
|
342
|
+
g && (n = -n), v.bar2.transform = `translateX(${n}%)`;
|
|
343
|
+
} else process.env.NODE_ENV !== "production" && console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");
|
|
344
|
+
return /* @__PURE__ */ S(er, {
|
|
345
|
+
className: $(s.root, p),
|
|
346
|
+
ownerState: i,
|
|
347
|
+
role: "progressbar",
|
|
348
|
+
...u,
|
|
349
|
+
ref: t,
|
|
350
|
+
...C,
|
|
351
|
+
children: [d === "buffer" ? /* @__PURE__ */ l(tr, {
|
|
352
|
+
className: s.dashed,
|
|
353
|
+
ownerState: i
|
|
354
|
+
}) : null, /* @__PURE__ */ l(or, {
|
|
355
|
+
className: s.bar1,
|
|
356
|
+
ownerState: i,
|
|
357
|
+
style: v.bar1
|
|
358
|
+
}), d === "determinate" ? null : /* @__PURE__ */ l(ar, {
|
|
359
|
+
className: s.bar2,
|
|
360
|
+
ownerState: i,
|
|
361
|
+
style: v.bar2
|
|
362
|
+
})]
|
|
363
|
+
});
|
|
364
|
+
});
|
|
365
|
+
process.env.NODE_ENV !== "production" && (E.propTypes = {
|
|
366
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
367
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
368
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
369
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
370
|
+
/**
|
|
371
|
+
* Override or extend the styles applied to the component.
|
|
372
|
+
*/
|
|
373
|
+
classes: o.object,
|
|
374
|
+
/**
|
|
375
|
+
* @ignore
|
|
376
|
+
*/
|
|
377
|
+
className: o.string,
|
|
378
|
+
/**
|
|
379
|
+
* The color of the component.
|
|
380
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
381
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
382
|
+
* @default 'primary'
|
|
383
|
+
*/
|
|
384
|
+
color: o.oneOfType([o.oneOf(["inherit", "primary", "secondary"]), o.string]),
|
|
385
|
+
/**
|
|
386
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
387
|
+
*/
|
|
388
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
|
|
389
|
+
/**
|
|
390
|
+
* The value of the progress indicator for the determinate and buffer variants.
|
|
391
|
+
* Value between 0 and 100.
|
|
392
|
+
*/
|
|
393
|
+
value: o.number,
|
|
394
|
+
/**
|
|
395
|
+
* The value for the buffer variant.
|
|
396
|
+
* Value between 0 and 100.
|
|
397
|
+
*/
|
|
398
|
+
valueBuffer: o.number,
|
|
399
|
+
/**
|
|
400
|
+
* The variant to use.
|
|
401
|
+
* Use indeterminate or query when there is no progress value.
|
|
402
|
+
* @default 'indeterminate'
|
|
403
|
+
*/
|
|
404
|
+
variant: o.oneOf(["buffer", "determinate", "indeterminate", "query"])
|
|
405
|
+
});
|
|
406
|
+
function nr(e) {
|
|
407
|
+
return T("MuiMobileStepper", e);
|
|
408
|
+
}
|
|
409
|
+
q("MuiMobileStepper", ["root", "positionBottom", "positionTop", "positionStatic", "dots", "dot", "dotActive", "progress"]);
|
|
410
|
+
const ir = (e) => {
|
|
411
|
+
const {
|
|
412
|
+
classes: r,
|
|
413
|
+
position: t
|
|
414
|
+
} = e, a = {
|
|
415
|
+
root: ["root", `position${c(t)}`],
|
|
416
|
+
dots: ["dots"],
|
|
417
|
+
dot: ["dot"],
|
|
418
|
+
dotActive: ["dotActive"],
|
|
419
|
+
progress: ["progress"]
|
|
420
|
+
};
|
|
421
|
+
return U(a, nr, r);
|
|
422
|
+
}, sr = y(G, {
|
|
423
|
+
name: "MuiMobileStepper",
|
|
424
|
+
slot: "Root",
|
|
425
|
+
overridesResolver: (e, r) => {
|
|
426
|
+
const {
|
|
427
|
+
ownerState: t
|
|
428
|
+
} = e;
|
|
429
|
+
return [r.root, r[`position${c(t.position)}`]];
|
|
430
|
+
}
|
|
431
|
+
})(h(({
|
|
432
|
+
theme: e
|
|
433
|
+
}) => ({
|
|
434
|
+
display: "flex",
|
|
435
|
+
flexDirection: "row",
|
|
436
|
+
justifyContent: "space-between",
|
|
437
|
+
alignItems: "center",
|
|
438
|
+
background: (e.vars || e).palette.background.default,
|
|
439
|
+
padding: 8,
|
|
440
|
+
variants: [{
|
|
441
|
+
props: ({
|
|
442
|
+
position: r
|
|
443
|
+
}) => r === "top" || r === "bottom",
|
|
444
|
+
style: {
|
|
445
|
+
position: "fixed",
|
|
446
|
+
left: 0,
|
|
447
|
+
right: 0,
|
|
448
|
+
zIndex: (e.vars || e).zIndex.mobileStepper
|
|
449
|
+
}
|
|
450
|
+
}, {
|
|
451
|
+
props: {
|
|
452
|
+
position: "top"
|
|
453
|
+
},
|
|
454
|
+
style: {
|
|
455
|
+
top: 0
|
|
456
|
+
}
|
|
457
|
+
}, {
|
|
458
|
+
props: {
|
|
459
|
+
position: "bottom"
|
|
460
|
+
},
|
|
461
|
+
style: {
|
|
462
|
+
bottom: 0
|
|
463
|
+
}
|
|
464
|
+
}]
|
|
465
|
+
}))), lr = y("div", {
|
|
466
|
+
name: "MuiMobileStepper",
|
|
467
|
+
slot: "Dots",
|
|
468
|
+
overridesResolver: (e, r) => r.dots
|
|
469
|
+
})({
|
|
470
|
+
variants: [{
|
|
471
|
+
props: {
|
|
472
|
+
variant: "dots"
|
|
473
|
+
},
|
|
474
|
+
style: {
|
|
475
|
+
display: "flex",
|
|
476
|
+
flexDirection: "row"
|
|
477
|
+
}
|
|
478
|
+
}]
|
|
479
|
+
}), pr = y("div", {
|
|
480
|
+
name: "MuiMobileStepper",
|
|
481
|
+
slot: "Dot",
|
|
482
|
+
shouldForwardProp: (e) => F(e) && e !== "dotActive",
|
|
483
|
+
overridesResolver: (e, r) => {
|
|
484
|
+
const {
|
|
485
|
+
dotActive: t
|
|
486
|
+
} = e;
|
|
487
|
+
return [r.dot, t && r.dotActive];
|
|
488
|
+
}
|
|
489
|
+
})(h(({
|
|
490
|
+
theme: e
|
|
491
|
+
}) => ({
|
|
492
|
+
variants: [{
|
|
493
|
+
props: {
|
|
494
|
+
variant: "dots"
|
|
495
|
+
},
|
|
496
|
+
style: {
|
|
497
|
+
transition: e.transitions.create("background-color", {
|
|
498
|
+
duration: e.transitions.duration.shortest
|
|
499
|
+
}),
|
|
500
|
+
backgroundColor: (e.vars || e).palette.action.disabled,
|
|
501
|
+
borderRadius: "50%",
|
|
502
|
+
width: 8,
|
|
503
|
+
height: 8,
|
|
504
|
+
margin: "0 2px"
|
|
505
|
+
}
|
|
506
|
+
}, {
|
|
507
|
+
props: {
|
|
508
|
+
variant: "dots",
|
|
509
|
+
dotActive: !0
|
|
510
|
+
},
|
|
511
|
+
style: {
|
|
512
|
+
backgroundColor: (e.vars || e).palette.primary.main
|
|
513
|
+
}
|
|
514
|
+
}]
|
|
515
|
+
}))), cr = y(E, {
|
|
516
|
+
name: "MuiMobileStepper",
|
|
517
|
+
slot: "Progress",
|
|
518
|
+
overridesResolver: (e, r) => r.progress
|
|
519
|
+
})({
|
|
520
|
+
variants: [{
|
|
521
|
+
props: {
|
|
522
|
+
variant: "progress"
|
|
523
|
+
},
|
|
524
|
+
style: {
|
|
525
|
+
width: "50%"
|
|
526
|
+
}
|
|
527
|
+
}]
|
|
528
|
+
}), _ = /* @__PURE__ */ w.forwardRef(function(r, t) {
|
|
529
|
+
const a = z({
|
|
530
|
+
props: r,
|
|
531
|
+
name: "MuiMobileStepper"
|
|
532
|
+
}), {
|
|
533
|
+
activeStep: p = 0,
|
|
534
|
+
backButton: f,
|
|
535
|
+
className: b,
|
|
536
|
+
LinearProgressProps: m,
|
|
537
|
+
nextButton: d,
|
|
538
|
+
position: C = "bottom",
|
|
539
|
+
steps: i,
|
|
540
|
+
variant: s = "dots",
|
|
541
|
+
...g
|
|
542
|
+
} = a, u = {
|
|
543
|
+
...a,
|
|
544
|
+
activeStep: p,
|
|
545
|
+
position: C,
|
|
546
|
+
variant: s
|
|
547
|
+
};
|
|
548
|
+
let v;
|
|
549
|
+
s === "progress" && (i === 1 ? v = 100 : v = Math.ceil(p / (i - 1) * 100));
|
|
550
|
+
const n = ir(u);
|
|
551
|
+
return /* @__PURE__ */ S(sr, {
|
|
552
|
+
square: !0,
|
|
553
|
+
elevation: 0,
|
|
554
|
+
className: $(n.root, b),
|
|
555
|
+
ref: t,
|
|
556
|
+
ownerState: u,
|
|
557
|
+
...g,
|
|
558
|
+
children: [f, s === "text" && /* @__PURE__ */ S(w.Fragment, {
|
|
559
|
+
children: [p + 1, " / ", i]
|
|
560
|
+
}), s === "dots" && /* @__PURE__ */ l(lr, {
|
|
561
|
+
ownerState: u,
|
|
562
|
+
className: n.dots,
|
|
563
|
+
children: [...new Array(i)].map((ur, k) => /* @__PURE__ */ l(pr, {
|
|
564
|
+
className: $(n.dot, k === p && n.dotActive),
|
|
565
|
+
ownerState: u,
|
|
566
|
+
dotActive: k === p
|
|
567
|
+
}, k))
|
|
568
|
+
}), s === "progress" && /* @__PURE__ */ l(cr, {
|
|
569
|
+
ownerState: u,
|
|
570
|
+
className: n.progress,
|
|
571
|
+
variant: "determinate",
|
|
572
|
+
value: v,
|
|
573
|
+
...m
|
|
574
|
+
}), d]
|
|
575
|
+
});
|
|
576
|
+
});
|
|
577
|
+
process.env.NODE_ENV !== "production" && (_.propTypes = {
|
|
578
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
579
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
580
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
581
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
582
|
+
/**
|
|
583
|
+
* Set the active step (zero based index).
|
|
584
|
+
* Defines which dot is highlighted when the variant is 'dots'.
|
|
585
|
+
* @default 0
|
|
586
|
+
*/
|
|
587
|
+
activeStep: D,
|
|
588
|
+
/**
|
|
589
|
+
* A back button element. For instance, it can be a `Button` or an `IconButton`.
|
|
590
|
+
*/
|
|
591
|
+
backButton: o.node,
|
|
592
|
+
/**
|
|
593
|
+
* Override or extend the styles applied to the component.
|
|
594
|
+
*/
|
|
595
|
+
classes: o.object,
|
|
596
|
+
/**
|
|
597
|
+
* @ignore
|
|
598
|
+
*/
|
|
599
|
+
className: o.string,
|
|
600
|
+
/**
|
|
601
|
+
* Props applied to the `LinearProgress` element.
|
|
602
|
+
*/
|
|
603
|
+
LinearProgressProps: o.object,
|
|
604
|
+
/**
|
|
605
|
+
* A next button element. For instance, it can be a `Button` or an `IconButton`.
|
|
606
|
+
*/
|
|
607
|
+
nextButton: o.node,
|
|
608
|
+
/**
|
|
609
|
+
* Set the positioning type.
|
|
610
|
+
* @default 'bottom'
|
|
611
|
+
*/
|
|
612
|
+
position: o.oneOf(["bottom", "static", "top"]),
|
|
613
|
+
/**
|
|
614
|
+
* The total steps.
|
|
615
|
+
*/
|
|
616
|
+
steps: D.isRequired,
|
|
617
|
+
/**
|
|
618
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
619
|
+
*/
|
|
620
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
|
|
621
|
+
/**
|
|
622
|
+
* The variant to use.
|
|
623
|
+
* @default 'dots'
|
|
624
|
+
*/
|
|
625
|
+
variant: o.oneOf(["dots", "progress", "text"])
|
|
626
|
+
});
|
|
627
|
+
const dr = K("div")(() => ({
|
|
628
|
+
...M`
|
|
629
|
+
position: relative;
|
|
630
|
+
display: flex;
|
|
631
|
+
flex-direction: column;
|
|
632
|
+
justify-content: center;
|
|
633
|
+
align-items: center;
|
|
634
|
+
width: 100%;
|
|
635
|
+
padding: 0;
|
|
636
|
+
margin: 0;
|
|
637
|
+
background-color: transparent;
|
|
638
|
+
|
|
639
|
+
.MuiPaper-root {
|
|
640
|
+
width: 100%;
|
|
641
|
+
background-color: transparent;
|
|
642
|
+
color: inherit;
|
|
643
|
+
padding: 9px 13px;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.MuiLinearProgress-root {
|
|
647
|
+
padding: 9px;
|
|
648
|
+
margin: 0 9px;
|
|
649
|
+
background-color: ${x.colors.whiteGreenA};
|
|
650
|
+
border-color: ${x.colors.green};
|
|
651
|
+
|
|
652
|
+
.MuiLinearProgress-bar {
|
|
653
|
+
background-color: ${x.colors.green};
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
`
|
|
657
|
+
})), xr = ({
|
|
658
|
+
onNext: e,
|
|
659
|
+
onBack: r,
|
|
660
|
+
onFinish: t,
|
|
661
|
+
children: a,
|
|
662
|
+
...p
|
|
663
|
+
}) => {
|
|
664
|
+
const [f, b] = V(0), m = j.toArray(a).length, d = () => {
|
|
665
|
+
f === m - 1 ? t == null || t() : (b((g) => g + 1), e == null || e());
|
|
666
|
+
}, C = () => {
|
|
667
|
+
b((g) => g - 1), r == null || r();
|
|
668
|
+
}, i = () => /* @__PURE__ */ l(I, { onClick: d, children: f === m - 1 ? "Finish" : "Next" }), s = () => /* @__PURE__ */ l(I, { onClick: C, children: "Back" });
|
|
669
|
+
return /* @__PURE__ */ S(dr, { children: [
|
|
670
|
+
j.toArray(a)[f] ?? null,
|
|
671
|
+
/* @__PURE__ */ l(
|
|
672
|
+
_,
|
|
673
|
+
{
|
|
674
|
+
variant: "progress",
|
|
675
|
+
steps: m,
|
|
676
|
+
position: "static",
|
|
677
|
+
activeStep: f,
|
|
678
|
+
nextButton: /* @__PURE__ */ l(i, {}),
|
|
679
|
+
backButton: f === 0 ? /* @__PURE__ */ l("div", { style: { width: "103px" } }) : /* @__PURE__ */ l(s, {}),
|
|
680
|
+
...p
|
|
681
|
+
}
|
|
682
|
+
)
|
|
683
|
+
] });
|
|
684
|
+
};
|
|
685
|
+
export {
|
|
686
|
+
xr as default
|
|
687
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type StepperProps } from './Stepper';
|
package/Stepper/index.js
ADDED