@pismo/marola 2.1.59 → 2.1.60
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.
|
@@ -23,14 +23,16 @@ export type StepperNavigatorProps = {
|
|
|
23
23
|
disableNext?: boolean;
|
|
24
24
|
/** Disables the "finish" button */
|
|
25
25
|
disableFinish?: boolean;
|
|
26
|
+
/** Show loading spinner in Finish button */
|
|
27
|
+
loading?: boolean;
|
|
26
28
|
/** Label to be used for the "previous" button */
|
|
27
|
-
labelPrevious?:
|
|
29
|
+
labelPrevious?: React.ReactNode;
|
|
28
30
|
/** Label to be used for the "cancel" button */
|
|
29
|
-
labelCancel?:
|
|
31
|
+
labelCancel?: React.ReactNode;
|
|
30
32
|
/** Label to be used for the "next" button */
|
|
31
|
-
labelNext?:
|
|
33
|
+
labelNext?: React.ReactNode;
|
|
32
34
|
/** Label to be used for the "finish" button */
|
|
33
|
-
labelFinish?:
|
|
35
|
+
labelFinish?: React.ReactNode;
|
|
34
36
|
/** Language to be used for the button labels. Default "en" */
|
|
35
37
|
lang?: StepperNavigatorLang;
|
|
36
38
|
/** CSS classes to be applied on the container element */
|
|
@@ -54,5 +56,5 @@ export type StepperNavigatorProps = {
|
|
|
54
56
|
/** Callback to be called when the "finish" button is clicked */
|
|
55
57
|
onFinish?: () => void;
|
|
56
58
|
};
|
|
57
|
-
export declare const StepperNavigator: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, previousButtonProps, cancelButtonProps, nextButtonProps, finishButtonProps, onNext, onPrevious, onCancel, onFinish, }: StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export declare const StepperNavigator: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, loading, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, previousButtonProps, cancelButtonProps, nextButtonProps, finishButtonProps, onNext, onPrevious, onCancel, onFinish, }: StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
58
60
|
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as _, jsx as I } from "react/jsx-runtime";
|
|
2
2
|
import { c as g } from "../../clsx-OuTLNxxd.js";
|
|
3
|
-
import { Button as
|
|
3
|
+
import { Button as e } from "../Button/Button.js";
|
|
4
4
|
import '../../assets/StepperNavigator.css';const b = {
|
|
5
5
|
"stepper-navigator": "_stepper-navigator_v6lmn_1",
|
|
6
6
|
"previous-button": "_previous-button_v6lmn_14",
|
|
7
7
|
"cancel-button": "_cancel-button_v6lmn_15",
|
|
8
8
|
"next-button": "_next-button_v6lmn_16",
|
|
9
9
|
"finish-button": "_finish-button_v6lmn_17"
|
|
10
|
-
},
|
|
10
|
+
}, N = {
|
|
11
11
|
en: {
|
|
12
12
|
previous: "Back",
|
|
13
13
|
cancel: "Cancel",
|
|
@@ -21,20 +21,21 @@ import '../../assets/StepperNavigator.css';const b = {
|
|
|
21
21
|
finish: "Finalizar"
|
|
22
22
|
}
|
|
23
23
|
}, R = ({
|
|
24
|
-
hideNext:
|
|
25
|
-
hidePrevious:
|
|
26
|
-
hideCancel:
|
|
27
|
-
hideFinish:
|
|
28
|
-
disableNext:
|
|
29
|
-
disablePrevious:
|
|
30
|
-
disableCancel:
|
|
31
|
-
disableFinish:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
hideNext: q = !1,
|
|
25
|
+
hidePrevious: w = !1,
|
|
26
|
+
hideCancel: A = !1,
|
|
27
|
+
hideFinish: D = !1,
|
|
28
|
+
disableNext: j = !1,
|
|
29
|
+
disablePrevious: z = !1,
|
|
30
|
+
disableCancel: S = !1,
|
|
31
|
+
disableFinish: V = !1,
|
|
32
|
+
loading: f = !1,
|
|
33
|
+
lang: c = "en",
|
|
34
|
+
labelNext: h,
|
|
35
|
+
labelPrevious: k,
|
|
35
36
|
labelCancel: y,
|
|
36
|
-
labelFinish:
|
|
37
|
-
className:
|
|
37
|
+
labelFinish: C,
|
|
38
|
+
className: E,
|
|
38
39
|
"data-testid": G = "stepper-navigator",
|
|
39
40
|
previousButtonProps: a,
|
|
40
41
|
cancelButtonProps: d,
|
|
@@ -48,32 +49,32 @@ import '../../assets/StepperNavigator.css';const b = {
|
|
|
48
49
|
},
|
|
49
50
|
onFinish: L = () => {
|
|
50
51
|
}
|
|
51
|
-
}) => (y = y ||
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
}) => (y = y || N[c].cancel, k = k || N[c].previous, h = h || N[c].next, C = C || N[c].finish, f && (j = !0, z = !0, S = !0, V = !0), /* @__PURE__ */ _("div", { className: g(b["stepper-navigator"], E), "data-testid": G, children: [
|
|
53
|
+
w ? /* @__PURE__ */ I("span", {}) : /* @__PURE__ */ _(
|
|
54
|
+
e,
|
|
54
55
|
{
|
|
55
56
|
variant: "default",
|
|
56
57
|
shape: "round",
|
|
57
58
|
className: g(b["previous-button"], a == null ? void 0 : a.className),
|
|
58
|
-
"data-testid": a == null ? void 0 : a["data-testid"],
|
|
59
|
-
disabled:
|
|
59
|
+
"data-testid": (a == null ? void 0 : a["data-testid"]) || "stepper-navigator-previous-button",
|
|
60
|
+
disabled: z,
|
|
60
61
|
onClick: J,
|
|
61
62
|
children: [
|
|
62
63
|
(a == null ? void 0 : a.leftIcon) && /* @__PURE__ */ I("span", { children: a == null ? void 0 : a.leftIcon }),
|
|
63
|
-
/* @__PURE__ */ I("span", { children:
|
|
64
|
+
/* @__PURE__ */ I("span", { children: k }),
|
|
64
65
|
(a == null ? void 0 : a.rightIcon) && /* @__PURE__ */ I("span", { children: a == null ? void 0 : a.rightIcon })
|
|
65
66
|
]
|
|
66
67
|
}
|
|
67
68
|
),
|
|
68
69
|
/* @__PURE__ */ _("span", { children: [
|
|
69
|
-
!
|
|
70
|
-
|
|
70
|
+
!A && /* @__PURE__ */ _(
|
|
71
|
+
e,
|
|
71
72
|
{
|
|
72
73
|
variant: "text",
|
|
73
74
|
shape: "round",
|
|
74
75
|
className: g(b["cancel-button"], d == null ? void 0 : d.className),
|
|
75
|
-
"data-testid": d == null ? void 0 : d["data-testid"],
|
|
76
|
-
disabled:
|
|
76
|
+
"data-testid": (d == null ? void 0 : d["data-testid"]) || "stepper-navigator-cancel-button",
|
|
77
|
+
disabled: S,
|
|
77
78
|
onClick: K,
|
|
78
79
|
children: [
|
|
79
80
|
(d == null ? void 0 : d.leftIcon) && /* @__PURE__ */ I("span", { children: d == null ? void 0 : d.leftIcon }),
|
|
@@ -82,34 +83,35 @@ import '../../assets/StepperNavigator.css';const b = {
|
|
|
82
83
|
]
|
|
83
84
|
}
|
|
84
85
|
),
|
|
85
|
-
!
|
|
86
|
-
|
|
86
|
+
!q && /* @__PURE__ */ _(
|
|
87
|
+
e,
|
|
87
88
|
{
|
|
88
89
|
variant: "primary",
|
|
89
90
|
shape: "round",
|
|
90
91
|
className: g(b["next-button"], m == null ? void 0 : m.className),
|
|
91
|
-
"data-testid": m == null ? void 0 : m["data-testid"],
|
|
92
|
-
disabled:
|
|
92
|
+
"data-testid": (m == null ? void 0 : m["data-testid"]) || "stepper-navigator-next-button",
|
|
93
|
+
disabled: j,
|
|
93
94
|
onClick: H,
|
|
94
95
|
children: [
|
|
95
96
|
(m == null ? void 0 : m.leftIcon) && /* @__PURE__ */ I("span", { children: m == null ? void 0 : m.leftIcon }),
|
|
96
|
-
/* @__PURE__ */ I("span", { children:
|
|
97
|
+
/* @__PURE__ */ I("span", { children: h }),
|
|
97
98
|
(m == null ? void 0 : m.rightIcon) && /* @__PURE__ */ I("span", { children: m == null ? void 0 : m.rightIcon })
|
|
98
99
|
]
|
|
99
100
|
}
|
|
100
101
|
),
|
|
101
|
-
!
|
|
102
|
-
|
|
102
|
+
!D && /* @__PURE__ */ _(
|
|
103
|
+
e,
|
|
103
104
|
{
|
|
104
105
|
variant: "primary",
|
|
105
106
|
shape: "round",
|
|
106
107
|
className: g(b["finish-button"], l == null ? void 0 : l.className),
|
|
107
|
-
"data-testid": l == null ? void 0 : l["data-testid"],
|
|
108
|
-
disabled:
|
|
108
|
+
"data-testid": (l == null ? void 0 : l["data-testid"]) || "stepper-navigator-finish-button",
|
|
109
|
+
disabled: V,
|
|
109
110
|
onClick: L,
|
|
111
|
+
loading: f,
|
|
110
112
|
children: [
|
|
111
113
|
(l == null ? void 0 : l.leftIcon) && /* @__PURE__ */ I("span", { children: l == null ? void 0 : l.leftIcon }),
|
|
112
|
-
/* @__PURE__ */ I("span", { children:
|
|
114
|
+
/* @__PURE__ */ I("span", { children: C }),
|
|
113
115
|
(l == null ? void 0 : l.rightIcon) && /* @__PURE__ */ I("span", { children: l == null ? void 0 : l.rightIcon })
|
|
114
116
|
]
|
|
115
117
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, previousButtonProps, cancelButtonProps, nextButtonProps, finishButtonProps, onNext, onPrevious, onCancel, onFinish, }: import('./StepperNavigator').StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, loading, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, previousButtonProps, cancelButtonProps, nextButtonProps, finishButtonProps, onNext, onPrevious, onCancel, onFinish, }: import('./StepperNavigator').StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: string;
|