@hortiview/shared-components 2.15.0 → 2.16.1

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 (54) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/AlertBanner-aW6joVUm.js +35 -0
  3. package/dist/assets/ButtonCard.css +1 -0
  4. package/dist/assets/ConfirmationModal.css +1 -0
  5. package/dist/assets/InfoCard.css +1 -1
  6. package/dist/assets/stepper.css +1 -1
  7. package/dist/components/AlertBanner/AlertBanner.d.ts +5 -1
  8. package/dist/components/AlertBanner/AlertBanner.js +1 -1
  9. package/dist/components/AlertBanner/AlertBanner.test.js +9 -7
  10. package/dist/components/AlertBanner/LinkBanner.js +1 -1
  11. package/dist/components/AlertBanner/LinkBanner.test.js +3 -3
  12. package/dist/components/BaseView/BaseView.test.js +1 -1
  13. package/dist/components/ButtonCard/ButtonCard.d.ts +42 -0
  14. package/dist/components/ButtonCard/ButtonCard.js +51 -0
  15. package/dist/components/ButtonCard/ButtonCard.test.d.ts +1 -0
  16. package/dist/components/ButtonCard/ButtonCard.test.js +92 -0
  17. package/dist/components/ConfirmationModal/ConfirmationModal.d.ts +77 -0
  18. package/dist/components/ConfirmationModal/ConfirmationModal.js +90 -0
  19. package/dist/components/ConfirmationModal/ConfirmationModal.test.d.ts +1 -0
  20. package/dist/components/ConfirmationModal/ConfirmationModal.test.js +221 -0
  21. package/dist/components/DeleteModal/DeleteModal.js +6 -6
  22. package/dist/components/Filter/Filter.js +3 -3
  23. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +1 -1
  24. package/dist/components/FormComponents/FormNumber/CustomTextField.js +1 -1
  25. package/dist/components/FormComponents/FormSlider/FormSlider.js +1 -1
  26. package/dist/components/FormComponents/FormText/FormText.js +1 -1
  27. package/dist/components/GenericTable/GenericTable.js +4 -4
  28. package/dist/components/InfoCard/InfoCard.d.ts +6 -2
  29. package/dist/components/InfoCard/InfoCard.js +50 -37
  30. package/dist/components/InfoCard/InfoCard.test.js +40 -18
  31. package/dist/components/ModulePadding/ModulePadding.js +2 -2
  32. package/dist/components/SearchBar/SearchBar.js +1 -1
  33. package/dist/components/Stepper/Stepper.d.ts +19 -14
  34. package/dist/components/Stepper/Stepper.js +94 -39
  35. package/dist/components/Stepper/Stepper.test.js +305 -121
  36. package/dist/components/Stepper/components/StepperButton.js +1 -1
  37. package/dist/components/Stepper/components/StepperHeader.d.ts +2 -11
  38. package/dist/components/Stepper/components/StepperHeader.js +141 -70
  39. package/dist/components/Stepper/components/StepperItem.d.ts +8 -0
  40. package/dist/components/Stepper/components/StepperItem.js +44 -0
  41. package/dist/components/Stepper/stepperStyles.d.ts +5 -0
  42. package/dist/components/Stepper/stepperStyles.js +4 -0
  43. package/dist/components/Stepper/stepperTypes.d.ts +102 -47
  44. package/dist/{index.es-B74L_Dje.js → index.es-BYcQTTL8.js} +3 -3
  45. package/dist/{index.es-C7cC1Hdu.js → index.es-C32E1Lcb.js} +1 -1
  46. package/dist/main.d.ts +3 -1
  47. package/dist/main.js +120 -116
  48. package/dist/services/UtilService.js +2 -2
  49. package/dist/stepper.module-DR_FbENS.js +23 -0
  50. package/package.json +3 -2
  51. package/dist/AlertBanner-Ci-F-6S9.js +0 -26
  52. package/dist/components/Stepper/components/StepperIndicator.d.ts +0 -9
  53. package/dist/components/Stepper/components/StepperIndicator.js +0 -16
  54. package/dist/stepper.module-c-CWmpkt.js +0 -15
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { B as a } from "../../../index.es-B8p8KCdj.js";
3
3
  import { useMemo as v } from "react";
4
- import { s as f } from "../../../stepper.module-c-CWmpkt.js";
4
+ import { s as f } from "../../../stepper.module-DR_FbENS.js";
5
5
  const y = ({
6
6
  label: p,
7
7
  onClick: n,
@@ -1,15 +1,6 @@
1
- import { StepperBaseProps } from '../stepperTypes';
1
+ import { StepperBaseProps } from '../stepperTypes.ts';
2
2
 
3
3
  /**
4
4
  * A component that displays the specified type of stepper header based on the provided type prop.
5
- *
6
- * If the type is 'default', it displays a stepper indicator with dots and the title of the current step.
7
- * If the type is 'description', it shows the current step out of total steps and the title of the current step.
8
- *
9
- * @param stepperType - The type of the stepper indicator.
10
- * @param steps - An array of steps for the stepper.
11
- * @param currentStep - The current step index.
12
- * @param customTotalSteps - A custom total number of steps to display in the stepper header.
13
- * @returns
14
5
  */
15
- export declare const StepperHeader: ({ stepperType, steps, currentStep, customTotalSteps, }: StepperBaseProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const StepperHeader: ({ stepperStyle, stepsData, overwriteTotalSteps, }: StepperBaseProps) => import("react/jsx-runtime").JSX.Element | undefined;
@@ -1,72 +1,143 @@
1
- import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
- import { G as s } from "../../../index.es-oxil0uFe.js";
3
- import { T as n } from "../../../index.es-SjZ_-d7U.js";
4
- import { s as t } from "../../../stepper.module-c-CWmpkt.js";
5
- import { StepperIndicator as l } from "./StepperIndicator.js";
6
- const y = ({
7
- stepperType: d,
8
- steps: e,
9
- currentStep: i,
10
- customTotalSteps: p
11
- }) => d === "description" ? /* @__PURE__ */ a(
12
- s,
13
- {
14
- "data-testid": "description-stepper-header",
15
- className: t.stepperDescriptionContainer,
16
- secondaryAlign: "stretch",
17
- gap: "none",
18
- fullWidth: !0,
19
- children: [
20
- /* @__PURE__ */ r(
21
- s,
22
- {
23
- className: t.stepperDescriptionProgress,
24
- primaryAlign: "center",
25
- secondaryAlign: "center",
26
- children: /* @__PURE__ */ a(n, { "data-testid": "description-stepper-header-progress", level: 2, children: [
27
- e[i].step,
28
- "/",
29
- p ?? e.length
30
- ] })
31
- }
32
- ),
33
- /* @__PURE__ */ r(
34
- s,
35
- {
36
- className: t.stepperDescriptionText,
37
- primaryAlign: "start",
38
- secondaryAlign: "center",
39
- children: /* @__PURE__ */ r(n, { "data-testid": "description-stepper-header-description", level: 2, children: e[i].title ?? "" })
40
- }
41
- )
42
- ]
43
- }
44
- ) : /* @__PURE__ */ a(
45
- s,
46
- {
47
- "data-testid": "stepper-header",
48
- className: t.stepperContainer,
49
- gap: "dense",
50
- primaryAlign: "center",
51
- secondaryAlign: "center",
52
- direction: "vertical",
53
- fullWidth: !0,
54
- children: [
55
- /* @__PURE__ */ r(l, { steps: e, currentStep: i }),
56
- /* @__PURE__ */ r(
57
- n,
58
- {
59
- "data-testid": "stepper-header-description",
60
- level: 2,
61
- bold: !0,
62
- tag: "div",
63
- className: t.stepperTitle,
64
- children: e[i]?.title
65
- }
66
- )
67
- ]
68
- }
69
- );
1
+ import { jsx as r, jsxs as n } from "react/jsx-runtime";
2
+ import { G as i } from "../../../index.es-oxil0uFe.js";
3
+ import { T as o } from "../../../index.es-SjZ_-d7U.js";
4
+ import { useMemo as f, Fragment as A } from "react";
5
+ import { u as v } from "../../../useBreakpoints-MzTZ0tCT.js";
6
+ import { s as t } from "../../../stepper.module-DR_FbENS.js";
7
+ import { StepperItem as h } from "./StepperItem.js";
8
+ import { StepperStyle as c } from "../stepperStyles.js";
9
+ const T = ({
10
+ stepperStyle: d,
11
+ stepsData: l,
12
+ overwriteTotalSteps: u
13
+ }) => {
14
+ const { isMobile: g } = v(), { currentStepData: s, visibleSteps: p } = f(() => {
15
+ const e = l.filter((a) => a.isRendered);
16
+ return { currentStepData: e.find((a) => a.isActive) ?? e[e.length - 1], visibleSteps: e };
17
+ }, [l]);
18
+ if (d === c.DESKTOP)
19
+ return g ? /* @__PURE__ */ r(
20
+ i,
21
+ {
22
+ "data-testid": "desktop-stepper-header",
23
+ className: t.stepperDesktopHeaderContainer,
24
+ primaryAlign: "space-between",
25
+ secondaryAlign: "center",
26
+ gap: "standard",
27
+ fullWidth: !0,
28
+ children: /* @__PURE__ */ r(
29
+ h,
30
+ {
31
+ stepDefinition: s.step,
32
+ stepActive: !0,
33
+ stepCompleted: !1
34
+ },
35
+ s.step.id
36
+ )
37
+ }
38
+ ) : /* @__PURE__ */ r(
39
+ i,
40
+ {
41
+ "data-testid": "desktop-stepper-header",
42
+ className: t.stepperDesktopHeaderContainer,
43
+ primaryAlign: "space-between",
44
+ secondaryAlign: "center",
45
+ gap: "standard",
46
+ fullWidth: !0,
47
+ children: p.map((e, m) => /* @__PURE__ */ n(A, { children: [
48
+ m > 0 && /* @__PURE__ */ r(
49
+ "hr",
50
+ {
51
+ className: `${t.stepperItemConnector} ${e.isActive || e.isCompleted ? t.stepperItemConnectorCompleted : ""}`,
52
+ "aria-hidden": "true",
53
+ role: "presentation",
54
+ "data-testid": `stepper-connector-before-${e.step.id}`
55
+ }
56
+ ),
57
+ /* @__PURE__ */ r(
58
+ h,
59
+ {
60
+ maxWidth: `${100 / (p.length + 0.5)}%`,
61
+ stepDefinition: e.step,
62
+ stepActive: e.isActive,
63
+ stepCompleted: e.isCompleted
64
+ }
65
+ )
66
+ ] }, e.step.id))
67
+ }
68
+ );
69
+ if (d === c.SMALL)
70
+ return /* @__PURE__ */ n(
71
+ i,
72
+ {
73
+ "data-testid": "description-stepper-header",
74
+ className: t.stepperDescriptionContainer,
75
+ secondaryAlign: "stretch",
76
+ gap: "none",
77
+ fullWidth: !0,
78
+ children: [
79
+ /* @__PURE__ */ r(
80
+ i,
81
+ {
82
+ className: t.stepperDescriptionProgress,
83
+ primaryAlign: "center",
84
+ secondaryAlign: "center",
85
+ children: /* @__PURE__ */ n(o, { "data-testid": "description-stepper-header-progress", level: 2, children: [
86
+ s.step.stepNumber,
87
+ "/",
88
+ u ?? p.length
89
+ ] })
90
+ }
91
+ ),
92
+ /* @__PURE__ */ r(
93
+ i,
94
+ {
95
+ className: t.stepperDescriptionText,
96
+ primaryAlign: "start",
97
+ secondaryAlign: "center",
98
+ children: /* @__PURE__ */ r(o, { "data-testid": "description-stepper-header-description", level: 2, children: s.step.text })
99
+ }
100
+ )
101
+ ]
102
+ }
103
+ );
104
+ if (d === c.DOTS)
105
+ return /* @__PURE__ */ n(
106
+ i,
107
+ {
108
+ "data-testid": "dots-stepper-header",
109
+ className: t.stepperContainer,
110
+ gap: "dense",
111
+ primaryAlign: "center",
112
+ secondaryAlign: "center",
113
+ direction: "vertical",
114
+ fullWidth: !0,
115
+ children: [
116
+ /* @__PURE__ */ r(i, { gap: "dense", "data-testid": "stepper-indicator", children: p.map((e) => /* @__PURE__ */ r(
117
+ "div",
118
+ {
119
+ "data-testid": `stepper-indicator-${e.step.id}`,
120
+ className: `${t.stepperIndicatorItem}
121
+ ${e.step.optional ? t.stepperIndicatorItemOptional : ""}
122
+ ${e.isActive || e.isCompleted ? t.stepperIndicatorItemActive : ""}`
123
+ },
124
+ `indicator_${e.step.id}`
125
+ )) }),
126
+ /* @__PURE__ */ r(
127
+ o,
128
+ {
129
+ "data-testid": "stepper-header-description",
130
+ level: 2,
131
+ bold: !0,
132
+ tag: "div",
133
+ className: t.stepperTitle,
134
+ children: s.step.text
135
+ }
136
+ )
137
+ ]
138
+ }
139
+ );
140
+ };
70
141
  export {
71
- y as StepperHeader
142
+ T as StepperHeader
72
143
  };
@@ -0,0 +1,8 @@
1
+ import { StepperItemProps } from '../stepperTypes';
2
+
3
+ /**
4
+ * A component for the Desktop-style stepper. Shows the number of the step, title and description
5
+ * @param step - Step to be displayed in the stepper item.
6
+ * @returns
7
+ */
8
+ export declare const StepperItem: ({ maxWidth: maxWidth, stepDefinition, stepActive, stepCompleted, }: StepperItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,44 @@
1
+ import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
+ import { G as o } from "../../../index.es-oxil0uFe.js";
3
+ import { T as a } from "../../../index.es-SjZ_-d7U.js";
4
+ import { Iconify as i } from "../../Iconify/Iconify.js";
5
+ import { s as t } from "../../../stepper.module-DR_FbENS.js";
6
+ const N = ({
7
+ maxWidth: d,
8
+ stepDefinition: e,
9
+ stepActive: s,
10
+ stepCompleted: c
11
+ }) => {
12
+ const p = [
13
+ t.stepperItemNumber,
14
+ s || c ? t.stepperItemNumberActive : ""
15
+ ].filter(Boolean).join(" "), l = [t.itemText, s ? t.itemTextActive : ""].filter(Boolean).join(" ");
16
+ return /* @__PURE__ */ m(
17
+ o,
18
+ {
19
+ className: t.stepperItem,
20
+ style: { maxWidth: d },
21
+ gap: "dense",
22
+ secondaryAlign: "center",
23
+ "data-testid": `stepper-item-${e.id}`,
24
+ children: [
25
+ /* @__PURE__ */ r("div", { className: p, "data-testid": `stepper-item-circle-for-${e.id}`, children: c ? /* @__PURE__ */ r(
26
+ i,
27
+ {
28
+ icon: "check",
29
+ "aria-label": `Step ${e.stepNumber} completed`,
30
+ "data-testid": `stepper-item-check-for-${e.id}`
31
+ }
32
+ ) : /* @__PURE__ */ r(a, { children: e.stepNumber }) }),
33
+ /* @__PURE__ */ m(o, { direction: "vertical", secondaryAlign: "start", gap: "none", children: [
34
+ /* @__PURE__ */ r(a, { bold: !0, level: 1, className: l, children: e.text }),
35
+ e.secondaryText && /* @__PURE__ */ r(a, { level: 2, className: l, children: e.secondaryText })
36
+ ] })
37
+ ]
38
+ },
39
+ e.id
40
+ );
41
+ };
42
+ export {
43
+ N as StepperItem
44
+ };
@@ -0,0 +1,5 @@
1
+ export declare enum StepperStyle {
2
+ DESKTOP = "DESKTOP",
3
+ SMALL = "SMALL",
4
+ DOTS = "DOTS"
5
+ }
@@ -0,0 +1,4 @@
1
+ var L = /* @__PURE__ */ ((D) => (D.DESKTOP = "DESKTOP", D.SMALL = "SMALL", D.DOTS = "DOTS", D))(L || {});
2
+ export {
3
+ L as StepperStyle
4
+ };
@@ -1,54 +1,67 @@
1
1
  import { ButtonProps } from '@element-public/react-button';
2
- import { ReactNode } from 'react';
2
+ import { CSSProperties, ReactNode } from 'react';
3
+ import { StepperStyle } from './stepperStyles.ts';
3
4
 
4
5
  /**
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.
6
+ * Defines the structure of a step in the stepper
11
7
  */
12
8
  export type Step = {
13
9
  /**
14
- * The unique name of the step.
10
+ * The internal id of the step.
15
11
  */
16
- name: string;
12
+ id: string | number;
17
13
  /**
18
- * The step number that is displayed when the stepper type is 'description'.
19
- * @remarks This property is not visible within the stepper type 'default' and only serves as an identifier for the step.
14
+ * The step number that is displayed when the stepper shows a step number (StepperStyle.DESKTOP and StepperStyle.SMALL)
20
15
  */
21
- step: number;
16
+ stepNumber: number;
22
17
  /**
23
- * The title/description of the step showing in the Stepper.
18
+ * Whether to exclude the step from the header. Only applicable for StepperStyle.DESKTOP.
24
19
  */
25
- title: string | ReactNode;
20
+ excludeFromHeader?: boolean;
21
+ /**
22
+ * Whether activating this step should mark the previous step as completed. Only works in StepperStyle.DESKTOP
23
+ * @default false
24
+ *
25
+ * @remarks By default a step is treated as completed when the next visible step is active. This flag allows excluded steps (invisible ones) to complete the previous step.
26
+ *
27
+ * Example applications:
28
+ *
29
+ * Show a final completion step: [1 -> 2 -> 2.5 (excluded, excludedStepCompletesPreviousStep == true)] ---
30
+ * Step 2 is completed as soon as step 2.5 is active, to show a final "completion" step at the end without adding a header item.
31
+ */
32
+ excludedStepCompletesPreviousStep?: boolean;
33
+ /**
34
+ * The title of the step showing in the Stepper
35
+ */
36
+ text: string | ReactNode;
37
+ /**
38
+ * Additional secondary text showing in the Stepper. Only applicable for the 'desktop' type
39
+ */
40
+ secondaryText?: string | ReactNode;
26
41
  /**
27
42
  * Whether the step is optional or not showing a different design.
28
43
  *
29
44
  * @remarks There's no adjusted display logic for optional steps when using the description type stepper.
30
- * In that case, use the title prop / description to indicate that the step is optional.
45
+ * In that case, use the displayed text to indicate that the step is optional.
31
46
  */
32
47
  optional?: boolean;
33
48
  /**
34
- * The props for the next button, including onClick, label, className and disabled state. {@link StepperButtonProps}
49
+ * The props for the next button, including onClick, label, className and disabled state.
50
+ * Will print a console error if the button is embedded but no props are provided and return null for the entire stepper.
51
+ *
52
+ * See {@link StepperButtonProps} for details.
35
53
  */
36
- nextButtonProps: StepperButtonProps;
54
+ nextButtonProps: Partial<StepperButtonProps>;
37
55
  /**
38
- * The props for the previous button, including onClick, label, className and disabled state. {@link StepperButtonProps}
56
+ * The props for the previous button, including onClick, label, className and disabled state.
57
+ * Will print a console error if the button is embedded but no props are provided and return null for the entire stepper.
58
+ *
59
+ * See {@link StepperButtonProps} for details.
39
60
  */
40
- prevButtonProps: StepperButtonProps;
61
+ prevButtonProps: Partial<StepperButtonProps>;
41
62
  };
42
63
  /**
43
- * @param {string} className - The class name for the button.
44
- * @param {boolean} disabled - Whether the button is disabled or not.
45
- * @param {() => void} onClick - The function to be called when the button is clicked.
46
- * @param {string | ReactNode} label - The label of the button.
47
- * @param {string | ReactNode} leadingIcon - A custom leading icon for the button. Takes precedence over showArrowIcon.
48
- * @param {string | ReactNode} trailingIcon - A custom trailing icon for the button. Takes precedence over showArrowIcon.
49
- * @param {boolean} showArrowIcon - Whether to show a leading/trailing arrow icon for the button.
50
- * @param {string} buttonSize - The size of the button, defaults to 'themeDefault'.
51
- * @param {boolean} fullWidth - Whether the button should take the full width of its container. *
64
+ * Defines the props for the stepper buttons, including onClick, label, className and disabled state.
52
65
  */
53
66
  export type StepperButtonProps = Pick<ButtonProps, 'className' | 'disabled' | 'fullWidth'> & {
54
67
  /**
@@ -60,7 +73,8 @@ export type StepperButtonProps = Pick<ButtonProps, 'className' | 'disabled' | 'f
60
73
  */
61
74
  label: string | ReactNode;
62
75
  /**
63
- * Whether to show a leading/trailing arrow icon for the button.
76
+ * Show a right arrow (->) for the next button and a (<-) left arrow for the previous button.
77
+ * @remarks This is overridden by the presence of leadingIcon or trailingIcon.
64
78
  */
65
79
  showArrowIcon?: boolean;
66
80
  /**
@@ -77,7 +91,7 @@ export type StepperButtonProps = Pick<ButtonProps, 'className' | 'disabled' | 'f
77
91
  buttonSize?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'themeDefault';
78
92
  };
79
93
  /**
80
- * @param {string} stepperType - The type of the stepper indicator. Defaults to 'dots'.
94
+ * @param {StepperStyle} stepperStyle - The type of the stepper indicator. Defaults to StepperStyle.DESKTOP. See {@link StepperStyle}
81
95
  * @param {Step[]} steps - An array of steps for the stepper.
82
96
  * @param {number} currentStep - The current step index.
83
97
  * @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.
@@ -87,28 +101,31 @@ export type StepperButtonProps = Pick<ButtonProps, 'className' | 'disabled' | 'f
87
101
  */
88
102
  export type StepperProps = {
89
103
  /**
90
- * The display-type of the Stepper.
91
- * - `default` Shows a row of dots for each step.
92
- * - `description` Displays progress numerically (n/n) and the title next to it.
104
+ * The display-style of the Stepper.
105
+ * - StepperStyle.DESKTOP: EDS-like default stepper appearance. (also mobile optimized)
106
+ * - StepperStyle.SMALL: Compact version with n/n progress display.
107
+ * - StepperStyle.DOTS: Centered dots and title underneath.
93
108
  *
94
- * @default default
109
+ * @default StepperStyle.DESKTOP
95
110
  */
96
- stepperType?: 'default' | 'description';
111
+ stepperStyle?: StepperStyle;
97
112
  /**
98
113
  * An array of steps for the stepper.
99
114
  */
100
115
  steps: Step[];
101
116
  /**
102
- * A custom total number of steps to display in the stepper header.
103
- * @remarks This can be used to show a different total number of steps than the length of the steps array.
117
+ * The name of the current step, matching the name property of one of the steps in the steps array.
118
+ * This is used to determine which step is currently active and displayed in the stepper.
104
119
  */
105
- customTotalSteps?: number;
120
+ currentStepId: Step['id'];
106
121
  /**
107
- * The current step index.
122
+ * Set a custom number of total steps to display in the stepper header.
123
+ * Only applicable for StepperStyle.SMALL.
124
+ * @remarks This can be used to show a different total number of steps than the length of the steps array. (Think half steps -> 1, 1.5, 2)
108
125
  */
109
- currentStep: number;
126
+ overwriteTotalSteps?: number;
110
127
  /**
111
- * a flag which indicates if the current step is loading.
128
+ * Flag which indicates if the current step is loading.
112
129
  */
113
130
  isStepLoading?: boolean;
114
131
  /**
@@ -116,11 +133,16 @@ export type StepperProps = {
116
133
  * @default true
117
134
  */
118
135
  showStepperHeader?: boolean;
136
+ /**
137
+ * An indicator of whether to show the stepper buttons.
138
+ * @default true
139
+ */
140
+ showStepperButtons?: boolean;
119
141
  /**
120
142
  * The alignment of the stepper button group.
121
143
  * @default 'center'
122
144
  */
123
- stepperButtonAlignment?: 'center' | 'space-between';
145
+ stepperButtonAlignment?: Extract<CSSProperties['justifyContent'], 'center' | 'space-between'>;
124
146
  /**
125
147
  * A flag which indicates if the previous button should be shown on the first step.
126
148
  * This can be useful for canceling the stepper.
@@ -129,9 +151,42 @@ export type StepperProps = {
129
151
  showPreviousButtonOnFirstStep?: boolean;
130
152
  };
131
153
  /**
132
- * @param {string} type - The type of the stepper indicator.
133
- * @param {Step[]} steps - An array of steps for the stepper.
134
- * @param {number} currentStep - The current step index.
135
- * @param {number} customTotalSteps - A custom total number of steps to display in the stepper header.
154
+ * @param {StepperStyle} stepperStyle - The type of the stepper indicator.
155
+ * @param {number} overwriteTotalSteps - A custom total number of steps to display in the stepper header.
156
+ * @param {StepData[]} stepsData - An array of step data for rendering the steps @lookup {@link StepData}.
157
+ */
158
+ export type StepperBaseProps = Pick<StepperProps, 'stepperStyle' | 'overwriteTotalSteps'> & {
159
+ stepsData: StepData[];
160
+ };
161
+ /**
162
+ * Helper type for rendering steps
163
+ *
164
+ * @param {Step} step - The step data for the step.
165
+ * @param {boolean} isActive - Whether the step is currently active.
166
+ * @param {boolean} isCompleted - Whether the step is completed.
167
+ * @param {boolean} isRendered - Whether the step is visible/rendered.
168
+ * @param {boolean} isFirst - Whether the step is the first step in the steps array.
169
+ * @param {boolean} isLast - Whether the step is the last step in the steps array.
170
+ */
171
+ export type StepData = {
172
+ step: Step;
173
+ isActive: boolean;
174
+ isCompleted: boolean;
175
+ isRendered: boolean;
176
+ isFirst: boolean;
177
+ isLast: boolean;
178
+ };
179
+ /**
180
+ * Props for an DESKTOP-type stepper item, which shows the number of the step, title and description.
181
+ *
182
+ * @param maxWidth - The maximum width of the stepper item.
183
+ * @param stepDefinition - The step data for the step to be displayed in the stepper item.
184
+ * @param stepActive - Whether the step is currently active.
185
+ * @param stepCompleted - Whether the step is completed.
136
186
  */
137
- export type StepperBaseProps = Pick<StepperProps, 'stepperType' | 'steps' | 'currentStep' | 'customTotalSteps'>;
187
+ export type StepperItemProps = {
188
+ maxWidth?: CSSProperties['maxWidth'];
189
+ stepDefinition: Step;
190
+ stepActive: boolean;
191
+ stepCompleted: boolean;
192
+ };
@@ -8,7 +8,7 @@ import { M as Xn, a as Gn, N as zn, F as Ht, T as Yn } from "./index.es--C-VLspF
8
8
  import { b as A, c as f } from "./tslib.es6-BDCynO9F.js";
9
9
  import { M as ne, a as ie } from "./component-Bz_dtX1r.js";
10
10
  import { c as Kn, I as Yt } from "./index.es-Dgxrk6xW.js";
11
- import { a as pe, M as wt, b as Jn, m as Qn } from "./component-DEJuY56h.js";
11
+ import { a as pe, M as wt, m as Jn, b as Qn } from "./component-DEJuY56h.js";
12
12
  /**
13
13
  * @license
14
14
  * Copyright 2018 Google Inc.
@@ -1411,13 +1411,13 @@ var li = (
1411
1411
  if (i || o)
1412
1412
  return null;
1413
1413
  var s = f(f({}, wt.createAdapter(this)), { isSurfaceActive: function() {
1414
- return Qn(n.input_, ":active");
1414
+ return Jn(n.input_, ":active");
1415
1415
  }, registerInteractionHandler: function(_, p) {
1416
1416
  return n.input_.addEventListener(_, p, pe());
1417
1417
  }, deregisterInteractionHandler: function(_, p) {
1418
1418
  return n.input_.removeEventListener(_, p, pe());
1419
1419
  } });
1420
- return e(this.root, new Jn(s));
1420
+ return e(this.root, new Qn(s));
1421
1421
  }, t;
1422
1422
  })(ie)
1423
1423
  ), si = {
@@ -10,7 +10,7 @@ import { c as Ua, d as Ur, e as P, f as Y, g as M, h as f, b as v, i as O, S as
10
10
  import { _ as Ka, P as In } from "./index.es-DGoBge9W.js";
11
11
  import { _ as Qn } from "./find-CHg-_ooq.js";
12
12
  import { c as Er, I as Wr } from "./index.es-Dgxrk6xW.js";
13
- import { T as Hr } from "./index.es-B74L_Dje.js";
13
+ import { T as Hr } from "./index.es-BYcQTTL8.js";
14
14
  function ee(i) {
15
15
  if (i === null || i === !0 || i === !1)
16
16
  return NaN;
package/dist/main.d.ts CHANGED
@@ -3,7 +3,9 @@ export { LinkBanner } from './components/AlertBanner/LinkBanner';
3
3
  export { BaseView } from './components/BaseView/BaseView';
4
4
  export { BasicHeading } from './components/BasicHeading/BasicHeading';
5
5
  export { BlockView } from './components/BlockView/BlockView';
6
+ export { ButtonCard } from './components/ButtonCard/ButtonCard';
6
7
  export { ChipCard } from './components/ChipCard/ChipCard';
8
+ export { ConfirmationModal } from './components/ConfirmationModal/ConfirmationModal';
7
9
  export { ContextMenu } from './components/ContextMenu/ContextMenu';
8
10
  export { DeleteModal } from './components/DeleteModal/DeleteModal';
9
11
  export { DetailContentWrapper } from './components/DetailContentWrapper/DetailContentWrapper';
@@ -28,7 +30,6 @@ export { ScrollbarX, ScrollbarY } from './components/Scrollbar/Scrollbar';
28
30
  export { SearchBar } from './components/SearchBar/SearchBar';
29
31
  export { Select } from './components/Select/Select';
30
32
  export { StepperHeader } from './components/Stepper/components/StepperHeader';
31
- export { StepperIndicator } from './components/Stepper/components/StepperIndicator';
32
33
  export { Stepper } from './components/Stepper/Stepper';
33
34
  export { VerticalDivider } from './components/VerticalDivider/VerticalDivider';
34
35
  export { FormCheckBox } from './components/FormComponents/FormCheckBox/FormCheckBox';
@@ -51,6 +52,7 @@ export type { InfoCardProps } from './components/InfoCard/InfoCard';
51
52
  export type { FieldItem } from './components/InfoGroup/InfoGroup';
52
53
  export type { LoadingSpinnerProps } from './components/LoadingSpinner/Default/LoadingSpinner';
53
54
  export type { Step, StepperBaseProps, StepperButtonProps, StepperProps, } from './components/Stepper/stepperTypes';
55
+ export { StepperStyle } from './components/Stepper/stepperStyles';
54
56
  export type { FilterData, FilterOption, FilterSelection } from './types/Filter';
55
57
  export type { CellTemplate, CellTemplateProps, TableLayoutProps } from './types/GenericTable';
56
58
  export type { HashTab } from './types/HashTab';