@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?: string;
29
+ labelPrevious?: React.ReactNode;
28
30
  /** Label to be used for the "cancel" button */
29
- labelCancel?: string;
31
+ labelCancel?: React.ReactNode;
30
32
  /** Label to be used for the "next" button */
31
- labelNext?: string;
33
+ labelNext?: React.ReactNode;
32
34
  /** Label to be used for the "finish" button */
33
- labelFinish?: string;
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 c } from "../Button/Button.js";
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
- }, h = {
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: z = !1,
25
- hidePrevious: S = !1,
26
- hideCancel: V = !1,
27
- hideFinish: q = !1,
28
- disableNext: w = !1,
29
- disablePrevious: A = !1,
30
- disableCancel: D = !1,
31
- disableFinish: E = !1,
32
- lang: N = "en",
33
- labelNext: k,
34
- labelPrevious: C,
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: j,
37
- className: F,
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 || h[N].cancel, C = C || h[N].previous, k = k || h[N].next, j = j || h[N].finish, /* @__PURE__ */ _("div", { className: g(b["stepper-navigator"], F), "data-testid": G, children: [
52
- S ? /* @__PURE__ */ I("span", {}) : /* @__PURE__ */ _(
53
- c,
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: A,
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: C }),
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
- !V && /* @__PURE__ */ _(
70
- c,
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: D,
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
- !z && /* @__PURE__ */ _(
86
- c,
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: w,
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: k }),
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
- !q && /* @__PURE__ */ _(
102
- c,
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: E,
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: j }),
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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pismo/marola",
3
3
  "description": "CDX tribe component library",
4
- "version": "2.1.59",
4
+ "version": "2.1.60",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",