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.
Files changed (49) hide show
  1. package/Button/Button.d.ts +1 -0
  2. package/Button/Button.js +73 -70
  3. package/DesktopStepper/DesktopStepper.d.ts +24 -0
  4. package/DesktopStepper/DesktopStepper.js +204 -0
  5. package/DesktopStepper/index.d.ts +1 -0
  6. package/DesktopStepper/index.js +5 -0
  7. package/FieldGroup/FieldGroup.js +15 -12
  8. package/FieldVisibilityWrapper/FieldVisibilityWrapper.d.ts +11 -0
  9. package/FieldVisibilityWrapper/FieldVisibilityWrapper.js +48 -0
  10. package/FieldVisibilityWrapper/index.d.ts +1 -0
  11. package/FieldVisibilityWrapper/index.js +4 -0
  12. package/FormContext/createFormContext.js +91 -72
  13. package/FormContext/types.d.ts +8 -0
  14. package/FormFields/FormFields.d.ts +2 -2
  15. package/FormFields/FormFields.js +18 -18
  16. package/FormInput/FormInput.d.ts +4 -0
  17. package/FormInput/FormInput.js +39 -14
  18. package/LabeledCheckbox/LabeledCheckbox.js +4 -4
  19. package/LabeledCurrencyInput/LabeledCurrencyInput.js +33 -33
  20. package/LabeledInput/LabeledInput.d.ts +2 -0
  21. package/LabeledInput/LabeledInput.js +16 -14
  22. package/LabeledRadio/LabeledRadio.js +12 -12
  23. package/Nav/Nav.js +174 -151
  24. package/SelectableItemCard/SelectableItemCard.d.ts +9 -0
  25. package/SelectableItemCard/SelectableItemCard.js +24 -0
  26. package/SelectableItemCard/index.d.ts +1 -0
  27. package/SelectableItemCard/index.js +4 -0
  28. package/Stepper/Stepper.js +184 -226
  29. package/Table/Table.js +236 -234
  30. package/Tabs/Tabs.d.ts +42 -0
  31. package/Tabs/Tabs.js +121 -0
  32. package/Tabs/index.d.ts +1 -0
  33. package/Tabs/index.js +4 -0
  34. package/api.d.ts +16 -5
  35. package/api.js +42 -28
  36. package/assets/style.css +1 -1
  37. package/assets/tailwind.css +2 -2
  38. package/constants.js +1 -1
  39. package/formatters.d.ts +1 -0
  40. package/formatters.js +30 -17
  41. package/index.d.ts +2 -0
  42. package/index.js +64 -62
  43. package/package.json +1 -1
  44. package/problemDetails.d.ts +20 -0
  45. package/problemDetails.js +19 -0
  46. package/utils.d.ts +2 -2
  47. package/utils.js +35 -29
  48. package/validators.d.ts +8 -0
  49. package/validators.js +19 -9
@@ -1,24 +1,24 @@
1
- import { jsxs as S, jsx as n, Fragment as I } from "react/jsx-runtime";
2
- import * as N from "react";
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 M } from "react-dom";
5
- import { n as R } from "../.chunks/emotion-styled.browser.esm.js";
6
- import { k as A, c as P } from "../.chunks/emotion-react.browser.esm.js";
7
- import { Button as q } from "../Button/Button.js";
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 V, a as _, s as g, c as f, u as F, P as o, b as K, l as rr, f as er, h as tr } from "../.chunks/DefaultPropsProvider.js";
11
- import { c as O } from "../.chunks/clsx.js";
12
- import { m as w } from "../.chunks/memoTheme.js";
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 k } from "../.chunks/createSimplePaletteValueFilter.js";
16
- import { i as E } from "../.chunks/integerPropType.js";
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 V("MuiLinearProgress", e);
18
+ return U("MuiLinearProgress", e);
19
19
  }
20
- _("MuiLinearProgress", ["root", "colorPrimary", "colorSecondary", "determinate", "indeterminate", "buffer", "query", "dashed", "dashedColorPrimary", "dashedColorSecondary", "bar", "barColorPrimary", "barColorSecondary", "bar1Indeterminate", "bar1Determinate", "bar1Buffer", "bar2Indeterminate", "bar2Buffer"]);
21
- const $ = 4, j = A`
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
- `, ir = typeof j != "string" ? P`
37
- animation: ${j} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
38
- ` : null, B = A`
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
- `, sr = typeof B != "string" ? P`
54
- animation: ${B} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
55
- ` : null, L = A`
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 L != "string" ? P`
71
- animation: ${L} 3s infinite linear;
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: l
77
- } = e, u = {
78
- root: ["root", `color${f(l)}`, t],
79
- dashed: ["dashed", `dashedColor${f(l)}`],
80
- bar1: ["bar", `barColor${f(l)}`, (t === "indeterminate" || t === "query") && "bar1Indeterminate", t === "determinate" && "bar1Determinate", t === "buffer" && "bar1Buffer"],
81
- bar2: ["bar", t !== "buffer" && `barColor${f(l)}`, t === "buffer" && `color${f(l)}`, (t === "indeterminate" || t === "query") && "bar2Indeterminate", t === "buffer" && "bar2Buffer"]
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 K(u, nr, r);
84
- }, 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", {
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${f(t.color)}`], r[t.variant]];
91
+ return [r.root, r[`color${m(t.color)}`], r[t.variant]];
92
92
  }
93
- })(w(({
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(k()).map(([r]) => ({
105
+ variants: [...Object.entries(e.palette).filter(w()).map(([r]) => ({
106
106
  props: {
107
107
  color: r
108
108
  },
109
109
  style: {
110
- backgroundColor: D(e, r)
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 = g("span", {
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${f(t.color)}`]];
150
+ return [r.dashed, r[`dashedColor${m(t.color)}`]];
151
151
  }
152
- })(w(({
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(k()).map(([r]) => {
170
- const t = D(e, r);
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: `${L} 3s infinite linear`
183
- }), ur = g("span", {
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${f(t.color)}`], (t.variant === "indeterminate" || t.variant === "query") && r.bar1Indeterminate, t.variant === "determinate" && r.bar1Determinate, t.variant === "buffer" && r.bar1Buffer];
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
- })(w(({
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(k()).map(([r]) => ({
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 .${$}s linear`
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 .${$}s linear`
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: ir || {
243
- animation: `${j} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`
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 = g("span", {
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${f(t.color)}`], (t.variant === "indeterminate" || t.variant === "query") && r.bar2Indeterminate, t.variant === "buffer" && r.bar2Buffer];
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
- })(w(({
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(k()).map(([r]) => ({
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(k()).map(([r]) => ({
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: D(e, r),
300
- transition: `transform .${$}s linear`
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: sr || {
314
- animation: `${B} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`
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__ */ N.forwardRef(function(r, t) {
318
- const l = F({
317
+ }))), X = /* @__PURE__ */ k.forwardRef(function(r, t) {
318
+ const i = K({
319
319
  props: r,
320
320
  name: "MuiLinearProgress"
321
321
  }), {
322
- className: u,
323
- color: b = "primary",
324
- value: a,
325
- valueBuffer: h,
326
- variant: c = "indeterminate",
327
- ...v
328
- } = l, i = {
329
- ...l,
330
- color: b,
331
- variant: c
332
- }, s = pr(i), y = ar(), d = {}, m = {
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 (c === "determinate" || c === "buffer")
337
- if (a !== void 0) {
338
- d["aria-valuenow"] = Math.round(a), d["aria-valuemin"] = 0, d["aria-valuemax"] = 100;
339
- let p = a - 100;
340
- y && (p = -p), m.bar1.transform = `translateX(${p}%)`;
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 (c === "buffer")
343
- if (h !== void 0) {
344
- let p = (h || 0) - 100;
345
- y && (p = -p), m.bar2.transform = `translateX(${p}%)`;
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: O(s.root, u),
349
- ownerState: i,
348
+ className: N(n.root, d),
349
+ ownerState: l,
350
350
  role: "progressbar",
351
- ...d,
351
+ ...c,
352
352
  ref: t,
353
- ...v,
354
- children: [c === "buffer" ? /* @__PURE__ */ n(dr, {
355
- className: s.dashed,
356
- ownerState: i
357
- }) : null, /* @__PURE__ */ n(ur, {
358
- className: s.bar1,
359
- ownerState: i,
360
- style: m.bar1
361
- }), c === "determinate" ? null : /* @__PURE__ */ n(fr, {
362
- className: s.bar2,
363
- ownerState: i,
364
- style: m.bar2
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 V("MuiMobileStepper", e);
410
+ return U("MuiMobileStepper", e);
411
411
  }
412
- _("MuiMobileStepper", ["root", "positionBottom", "positionTop", "positionStatic", "dots", "dot", "dotActive", "progress"]);
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, l = {
418
- root: ["root", `position${f(t)}`],
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 K(l, mr, r);
425
- }, vr = g(or, {
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${f(t.position)}`]];
432
+ return [r.root, r[`position${m(t.position)}`]];
433
433
  }
434
- })(w(({
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 = g("div", {
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
- }), hr = g("div", {
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
- })(w(({
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
- }))), yr = g(X, {
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__ */ N.forwardRef(function(r, t) {
532
- const l = F({
531
+ }), Y = /* @__PURE__ */ k.forwardRef(function(r, t) {
532
+ const i = K({
533
533
  props: r,
534
534
  name: "MuiMobileStepper"
535
535
  }), {
536
- activeStep: u = 0,
537
- backButton: b,
538
- className: a,
539
- LinearProgressProps: h,
540
- nextButton: c,
541
- position: v = "bottom",
542
- steps: i,
543
- variant: s = "dots",
544
- ...y
545
- } = l, d = {
546
- ...l,
547
- activeStep: u,
548
- position: v,
549
- variant: s
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 m;
552
- s === "progress" && (i === 1 ? m = 100 : m = Math.ceil(u / (i - 1) * 100));
553
- const p = br(d);
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: O(p.root, a),
557
+ className: N(p.root, C),
558
558
  ref: t,
559
- ownerState: d,
560
- ...y,
561
- children: [b, s === "text" && /* @__PURE__ */ S(N.Fragment, {
562
- children: [u + 1, " / ", i]
563
- }), s === "dots" && /* @__PURE__ */ n(gr, {
564
- ownerState: d,
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(i)].map((C, x) => /* @__PURE__ */ n(hr, {
567
- className: O(p.dot, x === u && p.dotActive),
568
- ownerState: d,
569
- dotActive: x === u
570
- }, x))
571
- }), s === "progress" && /* @__PURE__ */ n(yr, {
572
- ownerState: d,
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: m,
576
- ...h
577
- }), c]
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: E,
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: E.isRequired,
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 = R("div", {
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: l,
681
- ...u
634
+ children: i,
635
+ ...d
682
636
  }) => {
683
- const b = Z(), [a, h] = T(0), [c, v] = T("forward"), i = G.toArray(l).filter(
684
- (C) => H(C)
685
- ), s = i.length, y = () => {
686
- a === s - 1 ? t == null || t() : (M(() => v("none")), M(() => v("forward")), h((C) => C + 1), e == null || e());
687
- }, d = () => {
688
- M(() => v("none")), M(() => v("reverse")), h((C) => C - 1), r == null || r();
689
- }, m = () => /* @__PURE__ */ n(
690
- q,
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: y,
694
- backgroundColor: b.themeColor,
695
- hoverColor: b.themeDark,
696
- children: a === s - 1 ? "Finish" : "Next"
651
+ onClick: c,
652
+ backgroundColor: u.themeColor,
653
+ hoverColor: u.themeDark,
654
+ children: a === b - 1 ? "Finish" : "Next"
697
655
  }
698
- ), p = () => /* @__PURE__ */ n(
699
- q,
656
+ ), D = () => /* @__PURE__ */ s(
657
+ _,
700
658
  {
701
659
  variant: "custom",
702
- onClick: d,
703
- backgroundColor: b.themeColor,
704
- hoverColor: b.themeDark,
660
+ onClick: v,
661
+ backgroundColor: u.themeColor,
662
+ hoverColor: u.themeDark,
705
663
  children: "Back"
706
664
  }
707
665
  );
708
- return /* @__PURE__ */ S(Cr, { className: "jcStepContainer", customTheme: b, children: [
709
- a === 0 && c === "forward" && /* @__PURE__ */ n(Sr, { className: "jcSlideContainer", children: i[a] ?? null }),
710
- a !== 0 && c === "forward" && /* @__PURE__ */ S(I, { children: [
711
- /* @__PURE__ */ n(U, { className: "jcSlideOutContainer", children: /* @__PURE__ */ n(J, { className: "jcSlideContainer", children: i[a - 1] ?? null }) }),
712
- /* @__PURE__ */ n(Q, { className: "jcSlideContainer", children: i[a] ?? null })
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 === s - 1 && c === "reverse" && /* @__PURE__ */ n(z, { className: "jcSlideContainer", children: i[a] ?? null }),
715
- a !== s - 1 && c === "reverse" && /* @__PURE__ */ S(I, { children: [
716
- /* @__PURE__ */ n(U, { className: "jcSlideOutContainer", children: /* @__PURE__ */ n(W, { className: "jcSlideContainer", children: i[a + 1] ?? null }) }),
717
- /* @__PURE__ */ n(z, { className: "jcSlideContainer", children: i[a] ?? null })
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__ */ n(
677
+ /* @__PURE__ */ s(
720
678
  Y,
721
679
  {
722
680
  variant: "progress",
723
- steps: s,
681
+ steps: b,
724
682
  position: "static",
725
683
  activeStep: a,
726
- nextButton: /* @__PURE__ */ n(m, {}),
727
- backButton: a === 0 ? /* @__PURE__ */ n("div", { style: { width: "103px" } }) : /* @__PURE__ */ n(p, {}),
728
- ...u
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
- Tr as default
692
+ qr as default
735
693
  };