@hortiview/shared-components 1.9.0 → 1.11.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.
Files changed (95) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +43 -1
  3. package/dist/{BigLoadingSpinner-CqSGYzZA.js → BigLoadingSpinner-BbXMCKpm.js} +3 -3
  4. package/dist/{GenericCard-CelFEWlW.js → GenericCard-DuNnB9Ve.js} +1 -1
  5. package/dist/{ListAreaService-DOwtdRa4.js → ListAreaService-Wq9IkwWN.js} +6 -6
  6. package/dist/assets/AlertBanner.css +1 -1
  7. package/dist/assets/BaseView.css +1 -1
  8. package/dist/assets/stepper.css +1 -0
  9. package/dist/components/AlertBanner/AlertBanner.d.ts +9 -2
  10. package/dist/components/AlertBanner/AlertBanner.js +19 -29
  11. package/dist/components/AlertBanner/AlertBanner.test.js +9 -9
  12. package/dist/components/BaseView/BaseView.d.ts +5 -1
  13. package/dist/components/BaseView/BaseView.js +74 -62
  14. package/dist/components/BaseView/BaseView.test.js +1 -1
  15. package/dist/components/BasicHeading/BasicHeading.js +1 -1
  16. package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
  17. package/dist/components/BlockView/BlockView.js +1 -1
  18. package/dist/components/BlockView/BlockView.test.js +1 -1
  19. package/dist/components/ChipCard/ChipCard.test.js +1 -1
  20. package/dist/components/ContextMenu/ContextMenu.js +1 -1
  21. package/dist/components/ContextMenu/ContextMenu.test.js +1 -1
  22. package/dist/components/DeleteModal/DeleteModal.js +1 -1
  23. package/dist/components/DeleteModal/DeleteModal.test.js +1 -1
  24. package/dist/components/Disclaimer/Disclaimer.js +1 -1
  25. package/dist/components/Disclaimer/Disclaimer.test.js +1 -1
  26. package/dist/components/EmptyView/EmptyView.js +9 -9
  27. package/dist/components/EmptyView/EmptyView.test.js +5 -5
  28. package/dist/components/Filter/Filter.js +2 -2
  29. package/dist/components/Filter/Filter.test.js +1 -1
  30. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
  31. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +1 -1
  32. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +6 -6
  33. package/dist/components/FormComponents/FormNumber/FormNumber.test.js +1 -1
  34. package/dist/components/FormComponents/FormRadio/FormRadio.test.js +1 -1
  35. package/dist/components/FormComponents/FormSelect/FormSelect.test.js +1 -1
  36. package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +1 -1
  37. package/dist/components/FormComponents/FormSlider/FormSlider.test.js +4 -4
  38. package/dist/components/FormComponents/FormText/FormText.js +1 -1
  39. package/dist/components/FormComponents/FormText/FormText.test.js +1 -1
  40. package/dist/components/FormComponents/FormToggle/FormToggle.js +1 -1
  41. package/dist/components/FormComponents/FormToggle/FormToggle.test.js +1 -1
  42. package/dist/components/GenericTable/GenericTable.js +4 -4
  43. package/dist/components/GenericTable/GenericTable.test.js +1 -1
  44. package/dist/components/GenericTable/Mobile/GenericCard.js +2 -2
  45. package/dist/components/GenericTable/Mobile/GenericCard.test.js +2 -2
  46. package/dist/components/GenericTable/Mobile/GenericCardList.js +2 -2
  47. package/dist/components/GenericTable/Mobile/GenericCardList.test.js +1 -1
  48. package/dist/components/HashTabView/HashTabView.test.js +1 -1
  49. package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
  50. package/dist/components/HeaderFilter/HeaderFilter.test.js +1 -1
  51. package/dist/components/HealthCheckFailed/HealthCheckFailed.js +1 -1
  52. package/dist/components/HealthCheckFailed/HealthCheckFailed.test.js +1 -1
  53. package/dist/components/Iconify/Iconify.test.js +1 -1
  54. package/dist/components/InfoGroup/InfoGroup.js +1 -1
  55. package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
  56. package/dist/components/ListArea/ListArea.js +2 -2
  57. package/dist/components/ListArea/ListArea.test.js +3 -3
  58. package/dist/components/ListArea/ListAreaService.js +2 -2
  59. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
  60. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +2 -2
  61. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +7 -7
  62. package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +1 -1
  63. package/dist/components/Modal/Modal.js +1 -1
  64. package/dist/components/ModulePadding/ModulePadding.js +1 -1
  65. package/dist/components/ModulePadding/ModulePadding.test.js +1 -1
  66. package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
  67. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +2 -2
  68. package/dist/components/Scrollbar/scrollbar.test.js +1 -1
  69. package/dist/components/SearchBar/SearchBar.test.js +1 -1
  70. package/dist/components/Select/Select.js +1 -1
  71. package/dist/components/Select/Select.test.js +1 -1
  72. package/dist/components/Stepper/Stepper.d.ts +16 -0
  73. package/dist/components/Stepper/Stepper.js +54 -0
  74. package/dist/components/Stepper/Stepper.test.d.ts +1 -0
  75. package/dist/components/Stepper/Stepper.test.js +95 -0
  76. package/dist/components/Stepper/components/StepperButton.d.ts +25 -0
  77. package/dist/components/Stepper/components/StepperButton.js +44 -0
  78. package/dist/components/Stepper/components/StepperHeader.d.ts +9 -0
  79. package/dist/components/Stepper/components/StepperHeader.js +34 -0
  80. package/dist/components/Stepper/components/StepperIndicator.d.ts +9 -0
  81. package/dist/components/Stepper/components/StepperIndicator.js +16 -0
  82. package/dist/components/Stepper/stepperTypes.d.ts +77 -0
  83. package/dist/components/Stepper/stepperTypes.js +1 -0
  84. package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
  85. package/dist/hooks/useBreakpoints.test.js +1 -1
  86. package/dist/{index.es-UHKFl8Da.js → index.es-BNHI3ZIK.js} +2 -2
  87. package/dist/{index.es-zr101OF5.js → index.es-CoFul5zR.js} +2 -2
  88. package/dist/{index.es-CF_xy2ns.js → index.es-D54RuMc_.js} +2 -2
  89. package/dist/{index.es-d5xhUpJZ.js → index.es-fnFnw2P1.js} +1 -1
  90. package/dist/main.d.ts +6 -2
  91. package/dist/main.js +51 -45
  92. package/dist/services/services.test.js +1 -1
  93. package/dist/stepper.module-HuqmDJPj.js +12 -0
  94. package/dist/{vi.CjhMlMwf-BCJNwXvu.js → vi.CjhMlMwf-CKxPQtd6.js} +2 -2
  95. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { T as n } from "../../index.es-CF_xy2ns.js";
2
+ import { b as n } from "../../index.es-D54RuMc_.js";
3
3
  import { a as i, s as e, w as s } from "../../react.esm-CX1WJ2Pp.js";
4
4
  import { u as a } from "../../index-I7uTh4Tr.js";
5
5
  import { OverflowTooltip as c } from "./OverflowTooltip.js";
6
- import { d as u, t as p, g as r } from "../../vi.CjhMlMwf-BCJNwXvu.js";
6
+ import { d as u, t as p, g as r } from "../../vi.CjhMlMwf-CKxPQtd6.js";
7
7
  u("OverflowTooltip Test", () => {
8
8
  p("should render OverflowTooltip on hover", async () => {
9
9
  Object.defineProperty(HTMLElement.prototype, "clientWidth", {
@@ -1,7 +1,7 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import { a, s as e } from "../../react.esm-CX1WJ2Pp.js";
3
3
  import { ScrollbarY as d, ScrollbarX as l } from "./Scrollbar.js";
4
- import { d as c, t, g as o } from "../../vi.CjhMlMwf-BCJNwXvu.js";
4
+ import { d as c, t, g as o } from "../../vi.CjhMlMwf-CKxPQtd6.js";
5
5
  c("Scrollbar", () => {
6
6
  t("should render Y correctly", () => {
7
7
  a(/* @__PURE__ */ s("div", { "data-testid": "div", className: d }));
@@ -2,7 +2,7 @@ import { jsx as a } from "react/jsx-runtime";
2
2
  import { a as r, s as t, f as h } from "../../react.esm-CX1WJ2Pp.js";
3
3
  import { act as l } from "react";
4
4
  import { SearchBar as s } from "./SearchBar.js";
5
- import { d as m, t as o, v as n, g as e } from "../../vi.CjhMlMwf-BCJNwXvu.js";
5
+ import { d as m, t as o, a as n, g as e } from "../../vi.CjhMlMwf-CKxPQtd6.js";
6
6
  m("SearchBar Test", () => {
7
7
  o("renders SearchBar component", () => {
8
8
  r(
@@ -1,5 +1,5 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { S as f } from "../../index.es-UHKFl8Da.js";
2
+ import { S as f } from "../../index.es-BNHI3ZIK.js";
3
3
  import { useEffect as n } from "react";
4
4
  import { u as S } from "../../uniqueId-NU3-C36A.js";
5
5
  import '../../assets/Select.css';const p = "_customPortal_8wq49_1", $ = "_customSelect_8wq49_7", r = {
@@ -1,7 +1,7 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import { a, s as c } from "../../react.esm-CX1WJ2Pp.js";
3
3
  import { Select as n } from "./Select.js";
4
- import { d as l, t as m, g as e } from "../../vi.CjhMlMwf-BCJNwXvu.js";
4
+ import { d as l, t as m, g as e } from "../../vi.CjhMlMwf-CKxPQtd6.js";
5
5
  l("Select", () => {
6
6
  const o = [
7
7
  { value: "1", text: "Option 1" },
@@ -0,0 +1,16 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { StepperProps } from './stepperTypes';
3
+
4
+ /**
5
+ * A component that displays a stepper with a header, content, and navigation buttons.
6
+ *
7
+ * !! Be aware that the stepper is not a controlled component, so you need to manage the current step, content and loading state yourself.
8
+ * @param steps - An array of steps for the stepper.
9
+ * @param currentStep - The current step index.
10
+ * @param children - The content to be displayed in the stepper.
11
+ * @param nextButtonProps - Props for the next button, including onClick, label, and disabled state.
12
+ * @param prevButtonProps - Props for the previous button, including onClick, label, and disabled state.
13
+ * @param isStepLoading - A boolean indicating if the current step is loading. If true, the next button will be disabled and show a loading state.
14
+ * @returns
15
+ */
16
+ export declare const Stepper: ({ steps, currentStep, children, isStepLoading, }: PropsWithChildren<StepperProps>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,54 @@
1
+ import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
+ import { G as o } from "../../index.es-DntoATwO.js";
3
+ import { useMemo as s } from "react";
4
+ import { StepperPreviousButton as l, StepperNextButton as d } from "./components/StepperButton.js";
5
+ import { StepperHeader as m } from "./components/StepperHeader.js";
6
+ import { s as c } from "../../stepper.module-HuqmDJPj.js";
7
+ const A = ({
8
+ steps: e,
9
+ currentStep: t,
10
+ children: n,
11
+ isStepLoading: a
12
+ }) => {
13
+ const p = s(() => t === e.length - 1, [t, e.length]);
14
+ return /* @__PURE__ */ i(
15
+ o,
16
+ {
17
+ "data-testid": "stepper",
18
+ fullWidth: !0,
19
+ direction: "vertical",
20
+ gap: "airy",
21
+ primaryAlign: "center",
22
+ secondaryAlign: "center",
23
+ children: [
24
+ /* @__PURE__ */ r(m, { steps: e, currentStep: t }),
25
+ /* @__PURE__ */ r(
26
+ o,
27
+ {
28
+ "data-testid": "stepper-content",
29
+ fullWidth: !0,
30
+ className: c.stepperContent,
31
+ gap: "airy",
32
+ secondaryAlign: "center",
33
+ direction: "vertical",
34
+ children: n
35
+ }
36
+ ),
37
+ /* @__PURE__ */ i(o, { "data-testid": "stepper-buttons", fullWidth: !0, secondaryAlign: "center", primaryAlign: "center", children: [
38
+ t !== 0 && /* @__PURE__ */ r(l, { ...e[t].prevButtonProps }),
39
+ /* @__PURE__ */ r(
40
+ d,
41
+ {
42
+ ...e[t].nextButtonProps,
43
+ isStepLoading: a,
44
+ isLastStep: p
45
+ }
46
+ )
47
+ ] })
48
+ ]
49
+ }
50
+ );
51
+ };
52
+ export {
53
+ A as Stepper
54
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,95 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { a as r, s as n, f as c } from "../../react.esm-CX1WJ2Pp.js";
3
+ import { Stepper as l } from "./Stepper.js";
4
+ import { v as s, d as a, t as p, g as o } from "../../vi.CjhMlMwf-CKxPQtd6.js";
5
+ const i = [
6
+ {
7
+ name: "step1",
8
+ step: 0,
9
+ title: "Step 1",
10
+ optional: !1,
11
+ nextButtonProps: { onClick: s.fn(), label: "Next" },
12
+ prevButtonProps: { onClick: s.fn(), label: "Back" }
13
+ },
14
+ {
15
+ name: "step2",
16
+ step: 1,
17
+ title: "Step 2",
18
+ optional: !1,
19
+ nextButtonProps: { onClick: s.fn(), label: "Next" },
20
+ prevButtonProps: { onClick: s.fn(), label: "Back" }
21
+ },
22
+ {
23
+ name: "step3",
24
+ step: 2,
25
+ title: "Step 3",
26
+ optional: !0,
27
+ nextButtonProps: { onClick: s.fn(), label: "Finish" },
28
+ prevButtonProps: { onClick: s.fn(), label: "Back" }
29
+ }
30
+ ];
31
+ a("Stepper", () => {
32
+ p("renders the stepper header and children", () => {
33
+ r(
34
+ /* @__PURE__ */ e(l, { steps: i, currentStep: 1, isStepLoading: !1, children: /* @__PURE__ */ e("div", { children: "Step Content" }) })
35
+ ), o(n.queryByText("Step 1")).not.toBeInTheDocument(), o(n.getByText("Step 2")).toBeInTheDocument(), o(n.queryByText("Step 3")).not.toBeInTheDocument(), o(n.getByText("Step Content")).toBeInTheDocument();
36
+ }), p("disables the next button when isStepLoading is true", () => {
37
+ r(
38
+ /* @__PURE__ */ e(l, { steps: i, currentStep: 1, isStepLoading: !0, children: /* @__PURE__ */ e("div", { children: "Step Content" }) })
39
+ );
40
+ const t = n.getByText("Next").closest("button");
41
+ o(t).toBeDisabled();
42
+ }), p("calls nextButtonProps.onClick when next button is clicked", () => {
43
+ const t = s.fn();
44
+ i[1].nextButtonProps.onClick = t, r(
45
+ /* @__PURE__ */ e(
46
+ l,
47
+ {
48
+ steps: i,
49
+ currentStep: 1,
50
+ isStepLoading: !1,
51
+ children: /* @__PURE__ */ e("div", { children: "Step Content" })
52
+ }
53
+ )
54
+ ), c.click(n.getByText("Next")), o(t).toHaveBeenCalled();
55
+ }), p("calls prevButtonProps.onClick when prev button is clicked", () => {
56
+ const t = s.fn();
57
+ i[1].prevButtonProps.onClick = t, r(
58
+ /* @__PURE__ */ e(
59
+ l,
60
+ {
61
+ steps: i,
62
+ currentStep: 1,
63
+ isStepLoading: !1,
64
+ children: /* @__PURE__ */ e("div", { children: "Step Content" })
65
+ }
66
+ )
67
+ ), c.click(n.getByText("Back")), o(t).toHaveBeenCalled();
68
+ }), p("does not render the prev button on the first step", () => {
69
+ r(
70
+ /* @__PURE__ */ e(
71
+ l,
72
+ {
73
+ steps: i,
74
+ currentStep: 0,
75
+ isStepLoading: !1,
76
+ children: /* @__PURE__ */ e("div", { children: "Step Content" })
77
+ }
78
+ )
79
+ ), o(n.queryByText("Back")).not.toBeInTheDocument();
80
+ }), p("renders the next button as submit on last step", () => {
81
+ r(
82
+ /* @__PURE__ */ e(
83
+ l,
84
+ {
85
+ steps: i,
86
+ currentStep: 2,
87
+ isStepLoading: !1,
88
+ children: /* @__PURE__ */ e("div", { children: "Step Content" })
89
+ }
90
+ )
91
+ );
92
+ const t = n.getByText("Finish").closest("button");
93
+ o(t).toHaveAttribute("type", "submit");
94
+ });
95
+ });
@@ -0,0 +1,25 @@
1
+ import { StepperButtonProps } from '../stepperTypes';
2
+
3
+ /**
4
+ * A button component for the stepper that is used to go to the previous step.
5
+ * @param label - The label of the button.
6
+ * @param onClick - The function to be called when the button is clicked.
7
+ * @param disabled - Whether the button is disabled or not.
8
+ * @param className - Additional class names to apply to the button.
9
+ * @returns
10
+ */
11
+ export declare const StepperPreviousButton: ({ label, onClick, disabled, className, }: StepperButtonProps) => import("react/jsx-runtime").JSX.Element;
12
+ /**
13
+ * A button component for the stepper that is used to go to the next step.
14
+ * @param label - The label of the button.
15
+ * @param onClick - The function to be called when the button is clicked.
16
+ * @param disabled - Whether the button is disabled or not.
17
+ * @param className - Additional class names to apply to the button.
18
+ * @param isStepLoading - A boolean indicating if the current step is loading. If true, the next button will show a loading state and be disabled.
19
+ * @param isLastStep - A boolean indicating if this is the last step. If true, the button will submit the form instead of going to the next step.
20
+ * @returns
21
+ */
22
+ export declare const StepperNextButton: ({ label, onClick, disabled, className, isStepLoading, isLastStep, }: StepperButtonProps & {
23
+ isStepLoading?: boolean;
24
+ isLastStep?: boolean;
25
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,44 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { B as p } from "../../../index.es-CiqbARoC.js";
3
+ import { s } from "../../../stepper.module-HuqmDJPj.js";
4
+ const c = ({
5
+ label: t,
6
+ onClick: r,
7
+ disabled: e,
8
+ className: o
9
+ }) => /* @__PURE__ */ a(
10
+ p,
11
+ {
12
+ "data-testid": "stepper-previous-button",
13
+ className: `${s.stepperButton} ${o ?? ""}`,
14
+ onClick: r,
15
+ disabled: e,
16
+ fullWidth: !0,
17
+ variant: "outlined",
18
+ leadingIcon: "arrow_back",
19
+ children: t
20
+ }
21
+ ), m = ({
22
+ label: t,
23
+ onClick: r,
24
+ disabled: e,
25
+ className: o,
26
+ isStepLoading: n,
27
+ isLastStep: u
28
+ }) => /* @__PURE__ */ a(
29
+ p,
30
+ {
31
+ "data-testid": "stepper-next-button",
32
+ className: `${s.stepperButton} ${n ? s.stepperButtonLoading : ""} ${o ?? ""}`,
33
+ onClick: r,
34
+ disabled: n || e,
35
+ fullWidth: !0,
36
+ trailingIcon: n || u ? void 0 : "arrow_forward",
37
+ type: u ? "submit" : "button",
38
+ children: t
39
+ }
40
+ );
41
+ export {
42
+ m as StepperNextButton,
43
+ c as StepperPreviousButton
44
+ };
@@ -0,0 +1,9 @@
1
+ import { StepperBaseProps } from '../stepperTypes';
2
+
3
+ /**
4
+ * A component that displays the header of the stepper, including the step indicator (see {@link StepperIndicator}) and title.
5
+ * @param steps - An array of steps for the stepper.
6
+ * @param currentStep - The current step index.
7
+ * @returns
8
+ */
9
+ export declare const StepperHeader: ({ steps, currentStep }: StepperBaseProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
+ import { G as o } from "../../../index.es-DntoATwO.js";
3
+ import { T as p } from "../../../index.es-D54RuMc_.js";
4
+ import { s as i } from "../../../stepper.module-HuqmDJPj.js";
5
+ import { StepperIndicator as s } from "./StepperIndicator.js";
6
+ const f = ({ steps: e, currentStep: r }) => /* @__PURE__ */ a(
7
+ o,
8
+ {
9
+ "data-testid": "stepper-header",
10
+ className: i.stepperContainer,
11
+ gap: "dense",
12
+ primaryAlign: "center",
13
+ secondaryAlign: "center",
14
+ direction: "vertical",
15
+ fullWidth: !0,
16
+ children: [
17
+ /* @__PURE__ */ t(s, { steps: e, currentStep: r }),
18
+ /* @__PURE__ */ t(
19
+ p,
20
+ {
21
+ "data-testid": "stepper-header-description",
22
+ level: 2,
23
+ bold: !0,
24
+ tag: "div",
25
+ className: i.stepperTitle,
26
+ children: e[r]?.title
27
+ }
28
+ )
29
+ ]
30
+ }
31
+ );
32
+ export {
33
+ f as StepperHeader
34
+ };
@@ -0,0 +1,9 @@
1
+ import { StepperBaseProps } from '../stepperTypes';
2
+
3
+ /**
4
+ * A component that displays the stepper indicator, showing the current step and optional steps.
5
+ * @param steps - An array of steps for the stepper.
6
+ * @param currentStep - The current step index.
7
+ * @returns
8
+ */
9
+ export declare const StepperIndicator: ({ steps, currentStep }: StepperBaseProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { G as p } from "../../../index.es-DntoATwO.js";
3
+ import { s as e } from "../../../stepper.module-HuqmDJPj.js";
4
+ const m = ({ steps: a, currentStep: i }) => /* @__PURE__ */ r(p, { gap: "dense", "data-testid": "stepper-indicator", children: a.map((t, o) => /* @__PURE__ */ r(
5
+ "div",
6
+ {
7
+ "data-testid": `stepper-indicator-${t.name}`,
8
+ className: `${e.stepperIndicatorItem}
9
+ ${t.optional ? e.stepperIndicatorItemOptional : ""}
10
+ ${o <= i ? e.stepperIndicatorItemActive : ""}`
11
+ },
12
+ `indicator_${t.name}`
13
+ )) });
14
+ export {
15
+ m as StepperIndicator
16
+ };
@@ -0,0 +1,77 @@
1
+ import { ButtonProps } from '@element-public/react-button';
2
+ import { ReactNode } from 'react';
3
+
4
+ /**
5
+ * @param {string} name - The unique name of the step.
6
+ * @param {number} step - The step number, starting from 0.
7
+ * @param {string} title - The title of the step showing in the Stepper.
8
+ * @param {boolean} optional - Whether the step is optional or not showing a different design.
9
+ * @param {StepperButtonProps} nextButtonProps - Props for the next button, including onClick, label, className and disabled state.
10
+ * @param {StepperButtonProps} prevButtonProps - Props for the previous button, including onClick, label, className and disabled state.
11
+ */
12
+ export type Step = {
13
+ /**
14
+ * The unique name of the step.
15
+ */
16
+ name: string;
17
+ /**
18
+ * The step number, starting from 0.
19
+ */
20
+ step: number;
21
+ /**
22
+ * The title of the step showing in the Stepper.
23
+ */
24
+ title: string;
25
+ /**
26
+ * Whether the step is optional or not showing a different design.
27
+ */
28
+ optional: boolean;
29
+ /**
30
+ * The props for the next button, including onClick, label, className and disabled state. {@link StepperButtonProps}
31
+ */
32
+ nextButtonProps: StepperButtonProps;
33
+ /**
34
+ * The props for the previous button, including onClick, label, className and disabled state. {@link StepperButtonProps}
35
+ */
36
+ prevButtonProps: StepperButtonProps;
37
+ };
38
+ /**
39
+ * @param {string} className - The class name for the button.
40
+ * @param {boolean} disabled - Whether the button is disabled or not.
41
+ * @param {() => void} onClick - The function to be called when the button is clicked.
42
+ * @param {string | ReactNode} label - The label of the button.
43
+ */
44
+ export type StepperButtonProps = Pick<ButtonProps, 'className' | 'disabled'> & {
45
+ /**
46
+ * The function to be called when the button is clicked.
47
+ */
48
+ onClick: () => void;
49
+ /**
50
+ * The label of the button.
51
+ */
52
+ label: string | ReactNode;
53
+ };
54
+ /**
55
+ * @param {Step[]} steps - An array of steps for the stepper.
56
+ * @param {number} currentStep - The current step index.
57
+ * @param {boolean} isStepLoading - A boolean indicating if the current step is loading. If true, the next button will be disabled and show a loading state.
58
+ */
59
+ export type StepperProps = {
60
+ /**
61
+ * An array of steps for the stepper.
62
+ */
63
+ steps: Step[];
64
+ /**
65
+ * The current step index.
66
+ */
67
+ currentStep: number;
68
+ /**
69
+ * a flag which indicates if the current step is loading.
70
+ */
71
+ isStepLoading?: boolean;
72
+ };
73
+ /**
74
+ * @param {Step[]} steps - An array of steps for the stepper.
75
+ * @param {number} currentStep - The current step index.
76
+ */
77
+ export type StepperBaseProps = Pick<StepperProps, 'steps' | 'currentStep'>;
@@ -1,7 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { a as r } from "../../react.esm-CX1WJ2Pp.js";
3
3
  import { VerticalDivider as s } from "./VerticalDivider.js";
4
- import { d as o, t as l, g as i } from "../../vi.CjhMlMwf-BCJNwXvu.js";
4
+ import { d as o, t as l, g as i } from "../../vi.CjhMlMwf-CKxPQtd6.js";
5
5
  o("VerticalDivider Test", () => {
6
6
  l("it should render with basic styling", () => {
7
7
  r(/* @__PURE__ */ e(s, {}));
@@ -1,6 +1,6 @@
1
1
  import { r as t, w as s } from "../react.esm-CX1WJ2Pp.js";
2
2
  import { u as o } from "../useBreakpoints-MzTZ0tCT.js";
3
- import { d as a, t as i, g as r } from "../vi.CjhMlMwf-BCJNwXvu.js";
3
+ import { d as a, t as i, g as r } from "../vi.CjhMlMwf-CKxPQtd6.js";
4
4
  a("useBreakpoint Test", () => {
5
5
  i("returns object", () => {
6
6
  const { result: e } = t(() => o());
@@ -5,9 +5,9 @@ import { f as Ar, e as yr, h as La, k as Ya, u as Ja, d as Zt } from "./index.es
5
5
  import { T as ka, F as xr, N as za } from "./index.es-41ztjcFT.js";
6
6
  import { createPortal as ja } from "react-dom";
7
7
  import { a as _a } from "./floating-ui.dom-CeD8zknG.js";
8
- import { a as Lt, b as ci, c as Ua, L as Jn } from "./index.es-d5xhUpJZ.js";
8
+ import { a as Lt, b as ci, c as Ua, L as Jn } from "./index.es-fnFnw2P1.js";
9
9
  import { S as Qa } from "./index.es-8GOVkuo-.js";
10
- import { d as $a, e as Ka } from "./index.es-CF_xy2ns.js";
10
+ import { d as $a, e as Ka } from "./index.es-D54RuMc_.js";
11
11
  import { B as Er } from "./index.es-CiqbARoC.js";
12
12
  import { C as Gr } from "./index.es-BvrQnJ3j.js";
13
13
  import { c as qa, I as eo } from "./index.es-3043KTnb.js";
@@ -1,8 +1,8 @@
1
1
  import { c as gt, _ as Xe, P as s } from "./identity-DLWZln-X.js";
2
2
  import H, { forwardRef as yt, useContext as $r, useState as G, useRef as Ue, useMemo as at, useCallback as J, useEffect as he, useImperativeHandle as wt, cloneElement as ir } from "react";
3
- import { a as Lr } from "./index.es-CF_xy2ns.js";
3
+ import { a as Lr } from "./index.es-D54RuMc_.js";
4
4
  import { I as Wt } from "./index.es-0lQcz8m1.js";
5
- import { c as bt, d as Qr, e as _, f as E, g as M, h as d, b as h, i as k, S as ht } from "./index.es-UHKFl8Da.js";
5
+ import { c as bt, d as Qr, e as _, f as E, g as M, h as d, b as h, i as k, S as ht } from "./index.es-BNHI3ZIK.js";
6
6
  import { H as Rr, f as or, u as sr, p as Br, d as Oe } from "./index.es-da0cf7oE.js";
7
7
  import { P as ur } from "./index.es-D6N-XWHe.js";
8
8
  import { c as Gr, I as Xr } from "./index.es-3043KTnb.js";
@@ -665,9 +665,9 @@ D.displayName = "Typography";
665
665
  D.propTypes = z;
666
666
  D.defaultProps = F;
667
667
  export {
668
- h as T,
668
+ f as T,
669
669
  P as a,
670
- f as b,
670
+ h as b,
671
671
  v as c,
672
672
  C as d,
673
673
  D as e
@@ -14,7 +14,7 @@ import { R as Gt } from "./index.es-BtjV0oNv.js";
14
14
  import { C as Vt } from "./index.es-BvrQnJ3j.js";
15
15
  import { S as zt } from "./index.es-8GOVkuo-.js";
16
16
  import { I as je } from "./index.es-3043KTnb.js";
17
- import { d as ct, a as Xt } from "./index.es-CF_xy2ns.js";
17
+ import { d as ct, a as Xt } from "./index.es-D54RuMc_.js";
18
18
  /**
19
19
  * @license
20
20
  * Copyright 2018 Google Inc.
package/dist/main.d.ts CHANGED
@@ -25,6 +25,9 @@ export { OverflowTooltip } from './components/OverflowTooltip/OverflowTooltip';
25
25
  export { ScrollbarX, ScrollbarY } from './components/Scrollbar/Scrollbar';
26
26
  export { SearchBar } from './components/SearchBar/SearchBar';
27
27
  export { Select } from './components/Select/Select';
28
+ export { StepperHeader } from './components/Stepper/components/StepperHeader';
29
+ export { StepperIndicator } from './components/Stepper/components/StepperIndicator';
30
+ export { Stepper } from './components/Stepper/Stepper';
28
31
  export { VerticalDivider } from './components/VerticalDivider/VerticalDivider';
29
32
  export { FormCheckBox } from './components/FormComponents/FormCheckBox/FormCheckBox';
30
33
  export { FormDatePicker } from './components/FormComponents/FormDatePicker/FormDatePicker';
@@ -37,16 +40,17 @@ export { FormToggle } from './components/FormComponents/FormToggle/FormToggle';
37
40
  export { AvailableCustomIcons } from './enums/AvailableCustomIcons';
38
41
  export { ThemeColor } from './enums/ThemeColor';
39
42
  export { useBreakpoints } from './hooks/useBreakpoints';
40
- export { capitalizeFirstLetters, getNumberAsLocaleString, trimLeadingAndTrailingSpaces, } from './services/UtilService';
43
+ export { capitalizeFirstLetters, getNumberAsLocaleString, trimLeadingAndTrailingSpaces } from './services/UtilService';
41
44
  export type { ActionProps } from './components/ContextMenu/ContextMenu';
42
45
  export type { FormSelectOption } from './components/FormComponents/FormSelect/FormSelect';
43
46
  export type { FormTextProps } from './components/FormComponents/FormText/FormText';
44
47
  export type { HealthCheckFailedProps } from './components/HealthCheckFailed/HealthCheckFailed';
45
48
  export type { FieldItem } from './components/InfoGroup/InfoGroup';
46
49
  export type { LoadingSpinnerProps } from './components/LoadingSpinner/Default/LoadingSpinner';
50
+ export type { Step, StepperBaseProps, StepperButtonProps, StepperProps } from './components/Stepper/stepperTypes';
47
51
  export type { FilterData, FilterOption, FilterSelection } from './types/Filter';
48
52
  export type { CellTemplate, CellTemplateProps, TableLayoutProps } from './types/GenericTable';
49
53
  export type { HashTab } from './types/HashTab';
50
54
  export type { BaseListElement, ListElement } from './types/ListElement';
51
- export { AVAILABLE_COUNTRY_KEYS, AVAILABLE_LOCALES, ENGLISH_LANGUAGE_ID, GERMAN_LANGUAGE_ID, LANGUAGE_CODES_MAPPER, LANGUAGE_ID_MAPPER, SPANISH_LANGUAGE_ID, TURKISH_LANGUAGE_ID, } from './types/Languages';
55
+ export { AVAILABLE_COUNTRY_KEYS, AVAILABLE_LOCALES, ENGLISH_LANGUAGE_ID, GERMAN_LANGUAGE_ID, LANGUAGE_CODES_MAPPER, LANGUAGE_ID_MAPPER, SPANISH_LANGUAGE_ID, TURKISH_LANGUAGE_ID } from './types/Languages';
52
56
  export type { AVAILABLE_LANGUAGE_CODES, LANGUAGE_COUNTRY_CODES } from './types/Languages';