@m4l/components 9.67.2 → 9.68.0
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/components/Stepper/Stepper.styles.d.ts.map +1 -1
- package/components/Stepper/Stepper.styles.js +201 -122
- package/components/Stepper/store/StepperContext/index.d.ts.map +1 -1
- package/components/Stepper/store/StepperContext/index.js +52 -52
- package/components/Stepper/subcomponents/StepArea/hooks/useStepArea.d.ts +3 -0
- package/components/Stepper/subcomponents/StepArea/hooks/useStepArea.d.ts.map +1 -1
- package/components/Stepper/subcomponents/StepArea/hooks/useStepArea.js +58 -53
- package/components/Stepper/subcomponents/StepArea/index.d.ts.map +1 -1
- package/components/Stepper/subcomponents/StepArea/index.js +44 -37
- package/components/Stepper/subcomponents/StepArea/subcomponents/Inidicator/index.d.ts.map +1 -1
- package/components/Stepper/subcomponents/StepArea/subcomponents/Inidicator/index.js +68 -51
- package/components/Stepper/subcomponents/StepperButtons/StepperSubmitButton/index.js +5 -5
- package/components/WindowBase/WindowBase.styles.d.ts.map +1 -1
- package/components/WindowBase/WindowBase.styles.js +42 -37
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.d.ts.map +1 -1
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +58 -58
- package/package.json +7 -7
|
@@ -7,6 +7,9 @@ export declare function useStepArea(props: {
|
|
|
7
7
|
}): {
|
|
8
8
|
visibleTitle: boolean | undefined;
|
|
9
9
|
orientation: import('../../../types').Orientation | undefined;
|
|
10
|
+
indicatorType: import('../../../types').IndicatorType | undefined;
|
|
11
|
+
size: import('@m4l/styles').Sizes | undefined;
|
|
12
|
+
stepValidationStatus: Record<number, boolean>;
|
|
10
13
|
handleStepClick: (targetIndex: number) => Promise<void>;
|
|
11
14
|
steps: Step[];
|
|
12
15
|
currentStep: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStepArea.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/components/src/components/Stepper/subcomponents/StepArea/hooks/useStepArea.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,IAAI,EAAG,MAAM,gBAAgB,CAAC;AAEvC;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE;IAAE,YAAY,EAAE,IAAI,EAAE,CAAA;CAAE
|
|
1
|
+
{"version":3,"file":"useStepArea.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/components/src/components/Stepper/subcomponents/StepArea/hooks/useStepArea.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,IAAI,EAAG,MAAM,gBAAgB,CAAC;AAEvC;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE;IAAE,YAAY,EAAE,IAAI,EAAE,CAAA;CAAE;;;;;;mCA0CA,MAAM;;;EA8HhE"}
|
|
@@ -1,90 +1,95 @@
|
|
|
1
|
-
import { useCallback as
|
|
2
|
-
import { useFormContext as
|
|
3
|
-
import { useStepper as
|
|
4
|
-
import { useDynamicValidation as
|
|
1
|
+
import { useCallback as z, useMemo as D } from "react";
|
|
2
|
+
import { useFormContext as A } from "react-hook-form";
|
|
3
|
+
import { useStepper as M } from "../../../hooks/useStepper/index.js";
|
|
4
|
+
import { useDynamicValidation as N } from "../../../hooks/useDynamicValidation/index.js";
|
|
5
5
|
import { focusFirstErrorField as b } from "../../../helpers/focusFirstErrorField/index.js";
|
|
6
|
-
import { deepShallow as
|
|
7
|
-
function
|
|
8
|
-
const { visibleSteps: r } = I, { trigger:
|
|
9
|
-
activateFieldsValidation:
|
|
10
|
-
startExternalValidation:
|
|
11
|
-
endExternalValidation:
|
|
12
|
-
} =
|
|
13
|
-
currentStep:
|
|
6
|
+
import { deepShallow as j } from "../../../../../utils/deepShallow.js";
|
|
7
|
+
function Q(I) {
|
|
8
|
+
const { visibleSteps: r } = I, { trigger: c, clearErrors: u, setFocus: S, getFieldState: f } = A(), {
|
|
9
|
+
activateFieldsValidation: m,
|
|
10
|
+
startExternalValidation: y,
|
|
11
|
+
endExternalValidation: F
|
|
12
|
+
} = N(), {
|
|
13
|
+
currentStep: l,
|
|
14
14
|
steps: n,
|
|
15
15
|
visibleTitle: v,
|
|
16
|
-
setCurrentStep:
|
|
17
|
-
|
|
16
|
+
setCurrentStep: d,
|
|
17
|
+
indicatorType: g,
|
|
18
|
+
size: x,
|
|
19
|
+
orientation: C,
|
|
18
20
|
setStepValidationStatus: s,
|
|
19
|
-
stepValidationStatus:
|
|
20
|
-
} =
|
|
21
|
+
stepValidationStatus: p
|
|
22
|
+
} = M(
|
|
21
23
|
(t) => ({
|
|
22
24
|
currentStep: t.currentStep,
|
|
23
25
|
steps: t.steps,
|
|
24
26
|
visibleTitle: t.visibleTitle,
|
|
25
27
|
setCurrentStep: t.actions.setCurrentStep,
|
|
26
28
|
indicatorType: t.indicatorType,
|
|
29
|
+
size: t.size,
|
|
27
30
|
orientation: t.orientation,
|
|
28
31
|
setStepValidationStatus: t.actions.setStepValidationStatus,
|
|
29
32
|
stepValidationStatus: t.stepValidationStatus
|
|
30
33
|
}),
|
|
31
|
-
|
|
32
|
-
),
|
|
34
|
+
j
|
|
35
|
+
), T = z(async (t) => {
|
|
33
36
|
const a = r.findIndex(
|
|
34
|
-
(
|
|
37
|
+
(i) => i.key === n[l].key
|
|
35
38
|
);
|
|
36
39
|
if (t === a)
|
|
37
40
|
return;
|
|
38
|
-
const
|
|
39
|
-
(
|
|
41
|
+
const w = t > a, k = n.findIndex(
|
|
42
|
+
(i) => i.key === r[t].key
|
|
40
43
|
);
|
|
41
|
-
if (!
|
|
42
|
-
|
|
44
|
+
if (!w) {
|
|
45
|
+
d(k);
|
|
43
46
|
return;
|
|
44
47
|
}
|
|
45
48
|
if (t > a + 1)
|
|
46
|
-
for (let
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
51
|
-
|
|
49
|
+
for (let i = a; i < t; i++) {
|
|
50
|
+
const e = r[i], o = n.findIndex((h) => h.key === e.key);
|
|
51
|
+
y();
|
|
52
|
+
const V = await c(e.validationFields);
|
|
53
|
+
if (F(), !V) {
|
|
54
|
+
d(o), s(o, !1), m(e.validationFields || []), b(e.validationFields || [], f, S);
|
|
52
55
|
return;
|
|
53
56
|
}
|
|
54
57
|
s(o, !0);
|
|
55
58
|
}
|
|
56
59
|
else {
|
|
57
|
-
const
|
|
58
|
-
(
|
|
60
|
+
const i = r[a], e = n.findIndex(
|
|
61
|
+
(V) => V.key === i.key
|
|
59
62
|
);
|
|
60
|
-
|
|
61
|
-
const o = await
|
|
62
|
-
if (
|
|
63
|
-
s(
|
|
63
|
+
y();
|
|
64
|
+
const o = await c(i.validationFields);
|
|
65
|
+
if (F(), !o) {
|
|
66
|
+
s(e, !1), m(i.validationFields || []), b(i.validationFields || [], f, S);
|
|
64
67
|
return;
|
|
65
68
|
}
|
|
66
|
-
s(
|
|
69
|
+
s(e, !0);
|
|
67
70
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
71
|
+
d(k);
|
|
72
|
+
const E = r[a], O = n.findIndex(
|
|
73
|
+
(i) => i.key === E.key
|
|
74
|
+
);
|
|
75
|
+
if (p[O] !== !1) {
|
|
76
|
+
const e = r[t].validationFields || [];
|
|
77
|
+
e.length > 0 && (u(e), setTimeout(() => {
|
|
78
|
+
u(e), s(k, !0);
|
|
79
|
+
}, 100));
|
|
78
80
|
}
|
|
79
|
-
}, [r, n,
|
|
80
|
-
return
|
|
81
|
+
}, [r, n, d, l, y, c, F, s, m, p, u, f, S]);
|
|
82
|
+
return D(() => ({
|
|
81
83
|
visibleTitle: v,
|
|
82
|
-
orientation:
|
|
83
|
-
|
|
84
|
+
orientation: C,
|
|
85
|
+
indicatorType: g,
|
|
86
|
+
size: x,
|
|
87
|
+
stepValidationStatus: p,
|
|
88
|
+
handleStepClick: T,
|
|
84
89
|
steps: n,
|
|
85
|
-
currentStep:
|
|
86
|
-
}), [v, g,
|
|
90
|
+
currentStep: l
|
|
91
|
+
}), [v, C, g, x, p, T, n, l]);
|
|
87
92
|
}
|
|
88
93
|
export {
|
|
89
|
-
|
|
94
|
+
Q as useStepArea
|
|
90
95
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/Stepper/subcomponents/StepArea/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/Stepper/subcomponents/StepArea/index.tsx"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,wBAAgB,QAAQ,qDAgFvB"}
|
|
@@ -1,59 +1,66 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { StepAreaStyled as
|
|
3
|
-
import { Indicator as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx as n, jsxs as x } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { StepAreaStyled as w, StepStyled as z, StepNameStyled as T, StepNameTextStyled as V } from "../../slots/StepperSlot.js";
|
|
3
|
+
import { Indicator as A } from "./subcomponents/Inidicator/index.js";
|
|
4
|
+
import { useIsMobile as I } from "@m4l/graphics";
|
|
5
|
+
import { useStepArea as N } from "./hooks/useStepArea.js";
|
|
6
|
+
import { useVisibileSteps as j } from "./hooks/useVisibileSteps.js";
|
|
7
|
+
import { useComponentSize as D } from "../../../../hooks/useComponentSize/index.js";
|
|
8
|
+
function G() {
|
|
9
|
+
const p = I(), { visibleSteps: o } = j(), { handleStepClick: c, visibleTitle: l, orientation: r, steps: d, currentStep: t, indicatorType: m, size: u, stepValidationStatus: y } = N({ visibleSteps: o }), { currentSize: b } = D(u), f = r === "vertical" && !p, k = r !== "vertical" && !p, a = {
|
|
10
|
+
visibleTitle: l,
|
|
11
|
+
orientation: r,
|
|
12
|
+
totalSteps: o.length,
|
|
13
|
+
// Let the step styles know the real indicator size (it changes with the marker type and the error state).
|
|
14
|
+
indicatorType: m,
|
|
15
|
+
size: b,
|
|
16
|
+
stepValidationStatus: y
|
|
11
17
|
};
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
const
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
|
|
18
|
+
return /* @__PURE__ */ n(w, { ownerState: a, children: d.map((s, e) => {
|
|
19
|
+
const i = o.findIndex((C) => C.key === s.key), S = i !== -1, h = t > e, v = p ? "bodyStandard" : f && t === e || k && h ? "microStandard" : "microSlim";
|
|
20
|
+
return /* @__PURE__ */ x(
|
|
21
|
+
z,
|
|
16
22
|
{
|
|
17
23
|
role: "button",
|
|
18
|
-
onClick: () =>
|
|
24
|
+
onClick: () => S ? c(i) : void 0,
|
|
19
25
|
ownerState: {
|
|
20
|
-
...
|
|
21
|
-
currentStep:
|
|
22
|
-
step:
|
|
26
|
+
...a,
|
|
27
|
+
currentStep: t,
|
|
28
|
+
step: i,
|
|
23
29
|
// Usa el índice en la secuencia visible
|
|
24
|
-
|
|
30
|
+
originalStepIndex: e,
|
|
31
|
+
isStepVisible: S
|
|
25
32
|
},
|
|
26
|
-
"data-testid": `stepper-step-${
|
|
33
|
+
"data-testid": `stepper-step-${s.key}`,
|
|
27
34
|
children: [
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
l && /* @__PURE__ */ n(
|
|
36
|
+
T,
|
|
30
37
|
{
|
|
31
|
-
variant:
|
|
38
|
+
variant: v,
|
|
32
39
|
ownerState: {
|
|
33
|
-
...
|
|
34
|
-
currentStep:
|
|
35
|
-
step:
|
|
36
|
-
originalStepIndex:
|
|
37
|
-
isStepVisible:
|
|
40
|
+
...a,
|
|
41
|
+
currentStep: t,
|
|
42
|
+
step: i,
|
|
43
|
+
originalStepIndex: e,
|
|
44
|
+
isStepVisible: S
|
|
38
45
|
},
|
|
39
|
-
children: /* @__PURE__ */
|
|
46
|
+
children: /* @__PURE__ */ n(V, { ownerState: { orientation: r }, children: s.title })
|
|
40
47
|
}
|
|
41
48
|
),
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
|
|
49
|
+
/* @__PURE__ */ n(
|
|
50
|
+
A,
|
|
44
51
|
{
|
|
45
|
-
currentStep:
|
|
46
|
-
step:
|
|
47
|
-
totalSteps:
|
|
48
|
-
originalStepIndex:
|
|
52
|
+
currentStep: t,
|
|
53
|
+
step: i,
|
|
54
|
+
totalSteps: o.length,
|
|
55
|
+
originalStepIndex: e
|
|
49
56
|
}
|
|
50
57
|
)
|
|
51
58
|
]
|
|
52
59
|
},
|
|
53
|
-
|
|
60
|
+
s.key
|
|
54
61
|
);
|
|
55
62
|
}) });
|
|
56
63
|
}
|
|
57
64
|
export {
|
|
58
|
-
|
|
65
|
+
G as StepArea
|
|
59
66
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/Stepper/subcomponents/StepArea/subcomponents/Inidicator/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AASnD;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/Stepper/subcomponents/StepArea/subcomponents/Inidicator/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AASnD;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,oDAuI9C"}
|
|
@@ -1,77 +1,94 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { IndicatorStyled as
|
|
4
|
-
import { useStepper as
|
|
5
|
-
import { Icon as
|
|
1
|
+
import { jsx as o } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useMemo as h } from "react";
|
|
3
|
+
import { IndicatorStyled as w, TextNumberStyled as M } from "../../../../slots/StepperSlot.js";
|
|
4
|
+
import { useStepper as B } from "../../../../hooks/useStepper/index.js";
|
|
5
|
+
import { Icon as u, Tooltip as O } from "@m4l/base";
|
|
6
6
|
import { pathIcons as r } from "../../../../icons.js";
|
|
7
|
-
import { useIsMobile as
|
|
8
|
-
import { shallow as
|
|
9
|
-
import { useComponentSize as
|
|
10
|
-
function
|
|
11
|
-
const { step:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
import { useIsMobile as j } from "@m4l/graphics";
|
|
8
|
+
import { shallow as k } from "zustand/shallow";
|
|
9
|
+
import { useComponentSize as E } from "../../../../../../hooks/useComponentSize/index.js";
|
|
10
|
+
function Q(v) {
|
|
11
|
+
const { step: l, currentStep: i, totalSteps: x, originalStepIndex: t } = v, {
|
|
12
|
+
orientation: z,
|
|
13
|
+
size: I,
|
|
14
|
+
indicatorType: n,
|
|
15
|
+
stepValidationStatus: a,
|
|
16
|
+
steps: V,
|
|
17
|
+
visibleTitle: S
|
|
18
|
+
} = B(
|
|
19
|
+
(e) => ({
|
|
20
|
+
orientation: e.orientation,
|
|
21
|
+
size: e.size,
|
|
22
|
+
indicatorType: e.indicatorType,
|
|
23
|
+
stepValidationStatus: e.stepValidationStatus,
|
|
24
|
+
steps: e.steps,
|
|
25
|
+
visibleTitle: e.visibleTitle
|
|
17
26
|
}),
|
|
18
|
-
|
|
19
|
-
), { currentSize:
|
|
20
|
-
const
|
|
27
|
+
k
|
|
28
|
+
), { currentSize: C } = E(I), s = j(), c = h(() => s ? "dot" : n, [s, n]), { isCompleted: T, isValidStep: d, hasBeenValidated: f } = h(() => {
|
|
29
|
+
const e = i > t, y = a[t];
|
|
21
30
|
return {
|
|
22
|
-
isCompleted:
|
|
23
|
-
isValidStep:
|
|
24
|
-
hasBeenValidated:
|
|
31
|
+
isCompleted: e,
|
|
32
|
+
isValidStep: y === !0,
|
|
33
|
+
hasBeenValidated: y !== void 0
|
|
25
34
|
};
|
|
26
|
-
}, [
|
|
27
|
-
size:
|
|
28
|
-
currentStep:
|
|
29
|
-
step:
|
|
30
|
-
totalSteps:
|
|
31
|
-
orientation:
|
|
32
|
-
indicatorType:
|
|
33
|
-
|
|
35
|
+
}, [i, t, a]), p = {
|
|
36
|
+
size: C,
|
|
37
|
+
currentStep: i,
|
|
38
|
+
step: l,
|
|
39
|
+
totalSteps: x,
|
|
40
|
+
orientation: z,
|
|
41
|
+
indicatorType: n,
|
|
42
|
+
visibleTitle: S,
|
|
43
|
+
stepValidationStatus: a,
|
|
34
44
|
originalStepIndex: t,
|
|
35
|
-
isCompleted:
|
|
36
|
-
isCurrent:
|
|
37
|
-
isValidStep:
|
|
38
|
-
hasBeenValidated:
|
|
39
|
-
}
|
|
40
|
-
return /* @__PURE__ */ i(h, { ownerState: S, children: u && !c ? (
|
|
45
|
+
isCompleted: T,
|
|
46
|
+
isCurrent: i === t,
|
|
47
|
+
isValidStep: d,
|
|
48
|
+
hasBeenValidated: f
|
|
49
|
+
}, m = V[t]?.title, g = !S && !s && typeof m == "string" && m.length > 0, b = /* @__PURE__ */ o(w, { ownerState: p, children: f && !d ? (
|
|
41
50
|
// Mostrar error solo si ha sido validado y es inválido
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
|
|
51
|
+
/* @__PURE__ */ o(
|
|
52
|
+
u,
|
|
44
53
|
{
|
|
45
54
|
src: r.circleError,
|
|
46
55
|
size: "small",
|
|
47
56
|
color: "error.contrastText"
|
|
48
57
|
}
|
|
49
58
|
)
|
|
50
|
-
) :
|
|
59
|
+
) : T && d ? (
|
|
51
60
|
// Mostrar completado solo si está completado Y es válido
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
|
|
61
|
+
/* @__PURE__ */ o(
|
|
62
|
+
u,
|
|
54
63
|
{
|
|
55
|
-
src:
|
|
64
|
+
src: c === "number" ? r.circleCheck : r.dotOutline,
|
|
56
65
|
size: "small",
|
|
57
66
|
color: "primary.semanticText"
|
|
58
67
|
}
|
|
59
68
|
)
|
|
60
69
|
) : (
|
|
61
70
|
// Mostrar estado normal (número o dot) para pasos no validados o actuales
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
|
|
64
|
-
n >= 0 ? n + 1 : ""
|
|
65
|
-
) : /* @__PURE__ */ i(
|
|
66
|
-
d,
|
|
71
|
+
/* @__PURE__ */ o(
|
|
72
|
+
M,
|
|
67
73
|
{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
variant: c === "number" ? p.isCurrent ? "microStandard" : "microSlim" : "bodyStandard",
|
|
75
|
+
ownerState: p,
|
|
76
|
+
children: c === "number" ? (
|
|
77
|
+
// Solo mostrar número si el step es visible (step >= 0)
|
|
78
|
+
l >= 0 ? l + 1 : ""
|
|
79
|
+
) : /* @__PURE__ */ o(
|
|
80
|
+
u,
|
|
81
|
+
{
|
|
82
|
+
src: i === t ? r.dotSelected : r.dotOutline,
|
|
83
|
+
size: "small",
|
|
84
|
+
color: n === "dot" && !s ? i === t ? "primary.enabled" : "text.secondary" : i === t ? "primary.semanticText" : "text.disabled"
|
|
85
|
+
}
|
|
86
|
+
)
|
|
71
87
|
}
|
|
72
|
-
)
|
|
88
|
+
)
|
|
73
89
|
) });
|
|
90
|
+
return g ? /* @__PURE__ */ o(O, { title: m, children: b }) : b;
|
|
74
91
|
}
|
|
75
92
|
export {
|
|
76
|
-
|
|
93
|
+
Q as Indicator
|
|
77
94
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { DICTIONARY as
|
|
3
|
-
import { useModuleDictionary as
|
|
2
|
+
import { DICTIONARY as c } from "../../../dictionary.js";
|
|
3
|
+
import { useModuleDictionary as p } from "@m4l/core";
|
|
4
4
|
import { useIsMobile as u } from "@m4l/graphics";
|
|
5
5
|
import { pathIcons as l } from "../../../icons.js";
|
|
6
6
|
import { useFormContext as b } from "react-hook-form";
|
|
@@ -8,13 +8,13 @@ import { IconButton as f } from "../../../../extended/mui/IconButton/IconButton.
|
|
|
8
8
|
import { CircularProgress as d } from "../../../../extended/mui/CircularProgress/CircularProgress.js";
|
|
9
9
|
import { LoadingButton as I } from "../../../../extended/mui/LoadingButton/LoadingButton.js";
|
|
10
10
|
function x(i) {
|
|
11
|
-
const { label: e, forceIsMobile: o, ...m } = i, { getLabel: n } =
|
|
11
|
+
const { label: e, forceIsMobile: o, ...m } = i, { getLabel: n } = p(), s = u(), a = o !== void 0 ? o : s, { formState: { isSubmitting: r } } = b();
|
|
12
12
|
return a ? /* @__PURE__ */ t(
|
|
13
13
|
f,
|
|
14
14
|
{
|
|
15
15
|
type: "submit",
|
|
16
16
|
icon: r ? /* @__PURE__ */ t(d, { color: "default" }) : l.circleCheck,
|
|
17
|
-
"data-testid": "stepper-
|
|
17
|
+
"data-testid": "stepper-submit-button",
|
|
18
18
|
variant: "contained",
|
|
19
19
|
color: "primary"
|
|
20
20
|
}
|
|
@@ -22,7 +22,7 @@ function x(i) {
|
|
|
22
22
|
I,
|
|
23
23
|
{
|
|
24
24
|
type: "submit",
|
|
25
|
-
label: e || n(
|
|
25
|
+
label: e || n(c.LABEL_SUBMIT_BUTTON),
|
|
26
26
|
variant: "contained",
|
|
27
27
|
color: "primary",
|
|
28
28
|
"data-testid": "stepper-submit-button",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WindowBase.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/WindowBase/WindowBase.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAU3C;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"WindowBase.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/WindowBase/WindowBase.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAU3C;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAolB9B,CAAC"}
|