@hortiview/shared-components 2.16.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [2.16.1](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.16.0...v2.16.1) (2026-02-23)
2
+
3
+ ### Bug Fixes
4
+
5
+ * stepperStyle export ([a0937a8](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/a0937a8f4db9985ea1a8409c8ed8f601d2c3d9a2))
6
+
1
7
  ## [2.16.0](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.15.0...v2.16.0) (2026-02-20)
2
8
 
3
9
  ### Features
@@ -2,27 +2,25 @@ import { PropsWithChildren } from 'react';
2
2
  import { StepperProps } from './stepperTypes';
3
3
 
4
4
  /**
5
- * A component that displays a stepper with a header, content, and navigation buttons.<br />
6
- * Available in three display types: 'desktop', 'small' and 'dots'.<br />
5
+ * A component that displays a stepper with a header, content area, and navigation buttons.<br />
6
+ * Available in three styles: 'DESKTOP', 'SMALL', and 'DOTS'.<br />
7
7
  *
8
- * - Desktop: Default EDS-like styling
9
- * - Small: A compact version of the desktop stepper showing only the current step and total steps in the header, as well as the title of the current step.
10
- * - Dots: A minimal version showing only centered dots for each step and the title of the current step in the header.
8
+ * - DESKTOP: Default EDS-style appearance.
9
+ * - SMALL: A compact version of the desktop stepper that shows only the current step, the total number of steps in the header, and the title of the current step.
10
+ * - DOTS: A minimal version that displays centered dots for each step and the title of the current step in the header.
11
11
  *
12
+ * **Note: The stepper is not a controlled component. You must manage the current step, content, and loading state yourself.**
12
13
  *
13
- * **!! Be aware that the stepper is not a controlled component, so you need to manage the current step, content and loading state yourself. !!**
14
- *
15
- * @param stepperType - The type of the stepper indicator. Defaults to 'desktop'.
16
- * @param steps - An array of steps for the stepper.
17
- * @param currentStepId - The current step id, matching the id property of one of the steps in
18
- * the steps array.
19
- * @param overwriteTotalSteps - A custom total number of steps to display in the stepper header. Only applicable for 'small' stepper.
20
- * @param isStepLoading - A boolean indicating if the current step is loading. If true, the next button will be disabled and show a loading state.
21
- * @param showStepperHeader - An indicator of whether to show the stepper header. Defaults to true.
22
- * @param showStepperButtons - An indicator of whether to show the stepper buttons. Defaults to true.
23
- * @param stepperButtonAlignment - The alignment of the stepper button group. Defaults to 'center'.
24
- * @param showPreviousButtonOnFirstStep - A flag which indicates if the previous button should be shown on the first step. This can be useful for canceling the stepper. Defaults to false.
25
- * @param children - The content to be displayed in the stepper.
26
- * @returns
14
+ * @param stepperStyle - The style of stepper indicator. Defaults to `StepperStyle.DESKTOP`. See {@link StepperStyle}.
15
+ * @param steps - An array of step definitions for the stepper.
16
+ * @param currentStepId - The ID of the current step. Must match the `id` property of one of the steps in the `steps` array.
17
+ * @param overwriteTotalSteps - A custom total number of steps to display in the header. Only applicable to the 'SMALL' stepper.
18
+ * @param isStepLoading - Indicates whether the current step is loading. If `true`, the next button is disabled and displays a loading state.
19
+ * @param showStepperHeader - Indicates whether the stepper header is displayed. Defaults to `true`.
20
+ * @param showStepperButtons - Indicates whether the stepper navigation buttons are displayed. Defaults to `true`.
21
+ * @param stepperButtonAlignment - The alignment of the stepper button group. Defaults to `'center'`.
22
+ * @param showPreviousButtonOnFirstStep - Indicates whether the previous button is shown on the first step. This can be useful for providing a cancel action. Defaults to `false`.
23
+ * @param children - The content to render inside the stepper.
24
+ * @returns The rendered stepper component.
27
25
  */
28
- export declare const Stepper: ({ stepperType, steps, currentStepId, overwriteTotalSteps, isStepLoading, showStepperHeader, showStepperButtons, stepperButtonAlignment, showPreviousButtonOnFirstStep, children, }: PropsWithChildren<StepperProps>) => import("react/jsx-runtime").JSX.Element | null;
26
+ export declare const Stepper: ({ stepperStyle, steps, currentStepId, overwriteTotalSteps, isStepLoading, showStepperHeader, showStepperButtons, stepperButtonAlignment, showPreviousButtonOnFirstStep, children, }: PropsWithChildren<StepperProps>) => import("react/jsx-runtime").JSX.Element | null;
@@ -3,10 +3,10 @@ import { G as u } from "../../index.es-oxil0uFe.js";
3
3
  import { useMemo as v } from "react";
4
4
  import { StepperPreviousButton as g, StepperNextButton as A } from "./components/StepperButton.js";
5
5
  import { StepperHeader as k } from "./components/StepperHeader.js";
6
- import { s as D } from "../../stepper.module-DR_FbENS.js";
7
- import { StepperType as S } from "./stepperTypes.js";
8
- const T = ({
9
- stepperType: h = S.DESKTOP,
6
+ import { s as S } from "../../stepper.module-DR_FbENS.js";
7
+ import { StepperStyle as D } from "./stepperStyles.js";
8
+ const W = ({
9
+ stepperStyle: h = D.DESKTOP,
10
10
  steps: i,
11
11
  currentStepId: o,
12
12
  overwriteTotalSteps: P,
@@ -76,7 +76,7 @@ const T = ({
76
76
  y ? /* @__PURE__ */ n(
77
77
  k,
78
78
  {
79
- stepperType: h,
79
+ stepperStyle: h,
80
80
  stepsData: p,
81
81
  overwriteTotalSteps: P
82
82
  }
@@ -86,7 +86,7 @@ const T = ({
86
86
  {
87
87
  "data-testid": "stepper-content",
88
88
  fullWidth: !0,
89
- className: D.stepperContent,
89
+ className: S.stepperContent,
90
90
  gap: "airy",
91
91
  secondaryAlign: "center",
92
92
  direction: "vertical",
@@ -127,5 +127,5 @@ const T = ({
127
127
  );
128
128
  };
129
129
  export {
130
- T as Stepper
130
+ W as Stepper
131
131
  };
@@ -1,9 +1,9 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { a as p, s as t, f as y, c as C } from "../../react.esm-Bm0cAgpZ.js";
3
- import { a as S } from "../../useBreakpoints-MzTZ0tCT.js";
2
+ import { a as p, s as t, f as S, c as C } from "../../react.esm-Bm0cAgpZ.js";
3
+ import { a as y } from "../../useBreakpoints-MzTZ0tCT.js";
4
4
  import { Stepper as s } from "./Stepper.js";
5
- import { StepperType as i } from "./stepperTypes.js";
6
- import { d as I, b as B, t as c, g as e, v as a } from "../../vi.bdSIJ99Y-B308Q-4w.js";
5
+ import { StepperStyle as i } from "./stepperStyles.js";
6
+ import { d as B, b as h, t as c, g as e, v as a } from "../../vi.bdSIJ99Y-B308Q-4w.js";
7
7
  const m = () => [
8
8
  {
9
9
  id: "step1",
@@ -33,9 +33,9 @@ const m = () => [
33
33
  prevButtonProps: { onClick: a.fn(), label: "Back" }
34
34
  }
35
35
  ];
36
- I("Generic Stepper Tests (StepperType.DESKTOP)", () => {
36
+ B("Generic Stepper Tests (StepperStyle.DESKTOP)", () => {
37
37
  let o;
38
- B(() => {
38
+ h(() => {
39
39
  o = m();
40
40
  }), c("Default Render", () => {
41
41
  p(
@@ -69,12 +69,12 @@ I("Generic Stepper Tests (StepperType.DESKTOP)", () => {
69
69
  const r = a.fn();
70
70
  o[1].nextButtonProps.onClick = r, p(
71
71
  /* @__PURE__ */ n(s, { steps: o, currentStepId: "step2", isStepLoading: !1, children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
72
- ), y.click(t.getByText("Next")), e(r).toHaveBeenCalled();
72
+ ), S.click(t.getByText("Next")), e(r).toHaveBeenCalled();
73
73
  }), c("calls prevButtonProps.onClick when prev button is clicked", () => {
74
74
  const r = a.fn();
75
75
  o[1].prevButtonProps.onClick = r, p(
76
76
  /* @__PURE__ */ n(s, { steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
77
- ), y.click(t.getByText("Back")), e(r).toHaveBeenCalled();
77
+ ), S.click(t.getByText("Back")), e(r).toHaveBeenCalled();
78
78
  }), c("does not render the prev button on the first step", () => {
79
79
  p(
80
80
  /* @__PURE__ */ n(s, { steps: o, currentStepId: "step1", isStepLoading: !1, children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
@@ -137,13 +137,13 @@ I("Generic Stepper Tests (StepperType.DESKTOP)", () => {
137
137
  ), r.mockRestore();
138
138
  });
139
139
  });
140
- I("Stepper Type DESKTOP Tests", () => {
140
+ B("Stepper Type DESKTOP Tests", () => {
141
141
  let o;
142
- B(() => {
142
+ h(() => {
143
143
  o = m();
144
144
  }), c("renders numbers, text and secondary text", () => {
145
145
  p(
146
- /* @__PURE__ */ n(s, { stepperType: i.DESKTOP, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
146
+ /* @__PURE__ */ n(s, { stepperStyle: i.DESKTOP, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
147
147
  ), e(t.getByTestId("desktop-stepper-header")).toBeInTheDocument(), e(t.getByText(
148
148
  1
149
149
  /* STEP_1 */
@@ -176,7 +176,7 @@ I("Stepper Type DESKTOP Tests", () => {
176
176
  ).not.toBeInTheDocument(), e(t.getByText("Step Content")).toBeInTheDocument(), e(t.getByText("Next")).toBeInTheDocument();
177
177
  }), c("show numbers for active and incompleted step", () => {
178
178
  p(
179
- /* @__PURE__ */ n(s, { stepperType: i.DESKTOP, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
179
+ /* @__PURE__ */ n(s, { stepperStyle: i.DESKTOP, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
180
180
  ), e(t.queryByText(
181
181
  1
182
182
  /* STEP_1 */
@@ -189,7 +189,7 @@ I("Stepper Type DESKTOP Tests", () => {
189
189
  )).toBeInTheDocument();
190
190
  }), c("show checkmark for completed step", () => {
191
191
  p(
192
- /* @__PURE__ */ n(s, { stepperType: i.DESKTOP, steps: o, currentStepId: "step3", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
192
+ /* @__PURE__ */ n(s, { stepperStyle: i.DESKTOP, steps: o, currentStepId: "step3", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
193
193
  ), e(t.queryByText(
194
194
  1
195
195
  /* STEP_1 */
@@ -199,21 +199,21 @@ I("Stepper Type DESKTOP Tests", () => {
199
199
  )).not.toBeInTheDocument(), e(t.getByTestId("stepper-item-check-for-step1")).toBeInTheDocument(), e(t.getByTestId("stepper-item-check-for-step2")).toBeInTheDocument();
200
200
  }), c("has correct color styles for completed and active steps", () => {
201
201
  p(
202
- /* @__PURE__ */ n(s, { stepperType: i.DESKTOP, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
202
+ /* @__PURE__ */ n(s, { stepperStyle: i.DESKTOP, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
203
203
  );
204
204
  const r = t.getByTestId("stepper-item-circle-for-step1"), d = t.getByTestId(
205
205
  "stepper-connector-before-step2"
206
- ), l = t.getByTestId("stepper-item-circle-for-step2"), u = t.getByTestId("stepper-connector-before-step3"), T = t.getByTestId("stepper-item-circle-for-step3");
207
- e(r.className).toContain("stepperItemNumberActive"), e(d.className).toContain("stepperItemConnectorCompleted"), e(l.className).toContain("stepperItemNumberActive"), e(u.className).not.toContain("stepperItemConnectorCompleted"), e(T.className).not.toContain("stepperItemNumberActive");
206
+ ), l = t.getByTestId("stepper-item-circle-for-step2"), u = t.getByTestId("stepper-connector-before-step3"), I = t.getByTestId("stepper-item-circle-for-step3");
207
+ e(r.className).toContain("stepperItemNumberActive"), e(d.className).toContain("stepperItemConnectorCompleted"), e(l.className).toContain("stepperItemNumberActive"), e(u.className).not.toContain("stepperItemConnectorCompleted"), e(I.className).not.toContain("stepperItemNumberActive");
208
208
  }), c("advancing step changes number to checkmark and adjusts color", () => {
209
209
  const { rerender: r } = p(
210
- /* @__PURE__ */ n(s, { stepperType: i.DESKTOP, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
211
- ), d = t.getByTestId("stepper-item-circle-for-step1"), l = t.getByTestId("stepper-connector-before-step2"), u = t.getByTestId("stepper-item-circle-for-step2"), T = t.getByTestId("stepper-connector-before-step3"), h = t.getByTestId("stepper-item-circle-for-step3");
212
- e(d.className).toContain("stepperItemNumberActive"), e(l.className).not.toContain("stepperItemConnectorCompleted"), e(u.className).not.toContain("stepperItemNumberActive"), e(T.className).not.toContain("stepperItemConnectorCompleted"), e(h.className).not.toContain("stepperItemNumberActive"), r(
213
- /* @__PURE__ */ n(s, { stepperType: i.DESKTOP, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
214
- ), e(d.className).toContain("stepperItemNumberActive"), e(l.className).toContain("stepperItemConnectorCompleted"), e(u.className).toContain("stepperItemNumberActive"), e(T.className).not.toContain("stepperItemConnectorCompleted"), e(h.className).not.toContain("stepperItemNumberActive"), r(
215
- /* @__PURE__ */ n(s, { stepperType: i.DESKTOP, steps: o, currentStepId: "step3", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
216
- ), e(d.className).toContain("stepperItemNumberActive"), e(l.className).toContain("stepperItemConnectorCompleted"), e(u.className).toContain("stepperItemNumberActive"), e(T.className).toContain("stepperItemConnectorCompleted"), e(h.className).toContain("stepperItemNumberActive");
210
+ /* @__PURE__ */ n(s, { stepperStyle: i.DESKTOP, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
211
+ ), d = t.getByTestId("stepper-item-circle-for-step1"), l = t.getByTestId("stepper-connector-before-step2"), u = t.getByTestId("stepper-item-circle-for-step2"), I = t.getByTestId("stepper-connector-before-step3"), T = t.getByTestId("stepper-item-circle-for-step3");
212
+ e(d.className).toContain("stepperItemNumberActive"), e(l.className).not.toContain("stepperItemConnectorCompleted"), e(u.className).not.toContain("stepperItemNumberActive"), e(I.className).not.toContain("stepperItemConnectorCompleted"), e(T.className).not.toContain("stepperItemNumberActive"), r(
213
+ /* @__PURE__ */ n(s, { stepperStyle: i.DESKTOP, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
214
+ ), e(d.className).toContain("stepperItemNumberActive"), e(l.className).toContain("stepperItemConnectorCompleted"), e(u.className).toContain("stepperItemNumberActive"), e(I.className).not.toContain("stepperItemConnectorCompleted"), e(T.className).not.toContain("stepperItemNumberActive"), r(
215
+ /* @__PURE__ */ n(s, { stepperStyle: i.DESKTOP, steps: o, currentStepId: "step3", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
216
+ ), e(d.className).toContain("stepperItemNumberActive"), e(l.className).toContain("stepperItemConnectorCompleted"), e(u.className).toContain("stepperItemNumberActive"), e(I.className).toContain("stepperItemConnectorCompleted"), e(T.className).toContain("stepperItemNumberActive");
217
217
  }), c("custom button icons are shown as expected", () => {
218
218
  o[1].nextButtonProps.showArrowIcon = !1, o[1].nextButtonProps.trailingIcon = "flag", o[1].prevButtonProps.showArrowIcon = !1, o[1].prevButtonProps.leadingIcon = "wifi", p(
219
219
  /* @__PURE__ */ n(s, { steps: o, currentStepId: "step2", isStepLoading: !1, children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
@@ -233,7 +233,7 @@ I("Stepper Type DESKTOP Tests", () => {
233
233
  /* @__PURE__ */ n(
234
234
  s,
235
235
  {
236
- stepperType: i.DESKTOP,
236
+ stepperStyle: i.DESKTOP,
237
237
  steps: r,
238
238
  currentStepId: "step2",
239
239
  children: /* @__PURE__ */ n("div", { children: "Step Content" })
@@ -245,7 +245,7 @@ I("Stepper Type DESKTOP Tests", () => {
245
245
  /* @__PURE__ */ n(
246
246
  s,
247
247
  {
248
- stepperType: i.DESKTOP,
248
+ stepperStyle: i.DESKTOP,
249
249
  steps: r,
250
250
  currentStepId: "step4",
251
251
  children: /* @__PURE__ */ n("div", { children: "Step Content" })
@@ -257,23 +257,23 @@ I("Stepper Type DESKTOP Tests", () => {
257
257
  t.queryByTestId("stepper-item-check-for-step3")
258
258
  ).not.toBeInTheDocument();
259
259
  }), c("shows mobile view breakpoint is triggered (<600px)", () => {
260
- a.spyOn(S, "useBreakpoints").mockReturnValue({
260
+ a.spyOn(y, "useBreakpoints").mockReturnValue({
261
261
  isMobile: !0,
262
262
  isDesktop: !1,
263
263
  isDesktopNavbar: !1,
264
264
  isTablet: !1
265
265
  }), p(
266
- /* @__PURE__ */ n(s, { stepperType: i.DESKTOP, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
267
- ), e(t.getByTestId("desktop-stepper-header")).toBeInTheDocument(), e(t.getByTestId("stepper-item-step2")).toBeInTheDocument(), e(t.queryByTestId("stepper-item-step1")).not.toBeInTheDocument(), e(t.queryByTestId("stepper-item-step3")).not.toBeInTheDocument(), a.spyOn(S, "useBreakpoints").mockRestore();
266
+ /* @__PURE__ */ n(s, { stepperStyle: i.DESKTOP, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
267
+ ), e(t.getByTestId("desktop-stepper-header")).toBeInTheDocument(), e(t.getByTestId("stepper-item-step2")).toBeInTheDocument(), e(t.queryByTestId("stepper-item-step1")).not.toBeInTheDocument(), e(t.queryByTestId("stepper-item-step3")).not.toBeInTheDocument(), a.spyOn(y, "useBreakpoints").mockRestore();
268
268
  });
269
269
  });
270
- I("Stepper Type DOTS Tests", () => {
270
+ B("Stepper Type DOTS Tests", () => {
271
271
  let o;
272
- B(() => {
272
+ h(() => {
273
273
  o = m();
274
274
  }), c("renders dots and text", () => {
275
275
  p(
276
- /* @__PURE__ */ n(s, { stepperType: i.DOTS, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
276
+ /* @__PURE__ */ n(s, { stepperStyle: i.DOTS, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
277
277
  ), e(t.getByTestId("dots-stepper-header")).toBeInTheDocument(), e(t.getByTestId("stepper-indicator")).toBeInTheDocument(), e(t.getByTestId("stepper-indicator-step1")).toBeInTheDocument(), e(t.getByTestId("stepper-indicator-step2")).toBeInTheDocument(), e(t.getByTestId("stepper-indicator-step3")).toBeInTheDocument(), e(t.getByText(
278
278
  "Description 1"
279
279
  /* STEP_1 */
@@ -286,53 +286,53 @@ I("Stepper Type DOTS Tests", () => {
286
286
  )).not.toBeInTheDocument(), e(t.getByText("Step Content")).toBeInTheDocument(), e(t.getByText("Next")).toBeInTheDocument();
287
287
  }), c("show active style for completed, active and incompleted steps", () => {
288
288
  p(
289
- /* @__PURE__ */ n(s, { stepperType: i.DOTS, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
289
+ /* @__PURE__ */ n(s, { stepperStyle: i.DOTS, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
290
290
  );
291
291
  const r = t.getByTestId("stepper-indicator-step1"), d = t.getByTestId("stepper-indicator-step2"), l = t.getByTestId("stepper-indicator-step3");
292
292
  e(r.className).toContain("stepperIndicatorItemActive"), e(d.className).toContain("stepperIndicatorItemActive"), e(l.className).not.toContain("stepperIndicatorItemActive");
293
293
  }), c("show optional style", () => {
294
294
  p(
295
- /* @__PURE__ */ n(s, { stepperType: i.DOTS, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
295
+ /* @__PURE__ */ n(s, { stepperStyle: i.DOTS, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
296
296
  );
297
297
  const r = t.getByTestId("stepper-indicator-step3");
298
298
  e(r.className).toContain("stepperIndicatorItemOptional");
299
299
  }), c("advancing step adjusts styles accordingly", () => {
300
300
  const { rerender: r } = p(
301
- /* @__PURE__ */ n(s, { stepperType: i.DOTS, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
301
+ /* @__PURE__ */ n(s, { stepperStyle: i.DOTS, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
302
302
  ), d = t.getByTestId("stepper-indicator-step1"), l = t.getByTestId("stepper-indicator-step2"), u = t.getByTestId("stepper-indicator-step3");
303
303
  e(d.className).toContain("stepperIndicatorItemActive"), e(l.className).not.toContain("stepperIndicatorItemActive"), e(u.className).not.toContain("stepperIndicatorItemActive"), r(
304
- /* @__PURE__ */ n(s, { stepperType: i.DOTS, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
304
+ /* @__PURE__ */ n(s, { stepperStyle: i.DOTS, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
305
305
  ), e(d.className).toContain("stepperIndicatorItemActive"), e(l.className).toContain("stepperIndicatorItemActive"), e(u.className).not.toContain("stepperIndicatorItemActive"), r(
306
- /* @__PURE__ */ n(s, { stepperType: i.DOTS, steps: o, currentStepId: "step3", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
306
+ /* @__PURE__ */ n(s, { stepperStyle: i.DOTS, steps: o, currentStepId: "step3", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
307
307
  ), e(d.className).toContain("stepperIndicatorItemActive"), e(l.className).toContain("stepperIndicatorItemActive"), e(u.className).toContain("stepperIndicatorItemActive");
308
308
  });
309
309
  });
310
- I("Stepper Type SMALL Tests", () => {
310
+ B("Stepper Type SMALL Tests", () => {
311
311
  let o;
312
- B(() => {
312
+ h(() => {
313
313
  o = m();
314
314
  }), c("renders step number, total steps and text", () => {
315
315
  p(
316
- /* @__PURE__ */ n(s, { stepperType: i.SMALL, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
316
+ /* @__PURE__ */ n(s, { stepperStyle: i.SMALL, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
317
317
  ), e(t.getByTestId("description-stepper-header")).toBeInTheDocument(), e(t.getByTestId("description-stepper-header-progress")).toHaveTextContent("1/3"), e(t.getByTestId("description-stepper-header-description")).toHaveTextContent(
318
318
  "Description 1"
319
319
  /* STEP_1 */
320
320
  ), e(t.getByText("Step Content")).toBeInTheDocument(), e(t.getByText("Next")).toBeInTheDocument();
321
321
  }), c("advancing step adjusts progress accordingly", () => {
322
322
  const { rerender: r } = p(
323
- /* @__PURE__ */ n(s, { stepperType: i.SMALL, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
323
+ /* @__PURE__ */ n(s, { stepperStyle: i.SMALL, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
324
324
  );
325
325
  e(t.getByTestId("description-stepper-header-progress")).toHaveTextContent("1/3"), r(
326
- /* @__PURE__ */ n(s, { stepperType: i.SMALL, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
326
+ /* @__PURE__ */ n(s, { stepperStyle: i.SMALL, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
327
327
  ), e(t.getByTestId("description-stepper-header-progress")).toHaveTextContent("2/3"), r(
328
- /* @__PURE__ */ n(s, { stepperType: i.SMALL, steps: o, currentStepId: "step3", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
328
+ /* @__PURE__ */ n(s, { stepperStyle: i.SMALL, steps: o, currentStepId: "step3", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
329
329
  ), e(t.getByTestId("description-stepper-header-progress")).toHaveTextContent("3/3");
330
330
  }), c("overwriting total steps accordingly", () => {
331
331
  p(
332
332
  /* @__PURE__ */ n(
333
333
  s,
334
334
  {
335
- stepperType: i.SMALL,
335
+ stepperStyle: i.SMALL,
336
336
  steps: o,
337
337
  currentStepId: "step3",
338
338
  overwriteTotalSteps: 5,
@@ -1,6 +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
5
  */
6
- export declare const StepperHeader: ({ stepperType, stepsData, overwriteTotalSteps, }: StepperBaseProps) => import("react/jsx-runtime").JSX.Element | undefined;
6
+ export declare const StepperHeader: ({ stepperStyle, stepsData, overwriteTotalSteps, }: StepperBaseProps) => import("react/jsx-runtime").JSX.Element | undefined;
@@ -4,10 +4,10 @@ import { T as o } from "../../../index.es-SjZ_-d7U.js";
4
4
  import { useMemo as f, Fragment as A } from "react";
5
5
  import { u as v } from "../../../useBreakpoints-MzTZ0tCT.js";
6
6
  import { s as t } from "../../../stepper.module-DR_FbENS.js";
7
- import { StepperType as c } from "../stepperTypes.js";
8
7
  import { StepperItem as h } from "./StepperItem.js";
9
- const k = ({
10
- stepperType: d,
8
+ import { StepperStyle as c } from "../stepperStyles.js";
9
+ const T = ({
10
+ stepperStyle: d,
11
11
  stepsData: l,
12
12
  overwriteTotalSteps: u
13
13
  }) => {
@@ -139,5 +139,5 @@ const k = ({
139
139
  );
140
140
  };
141
141
  export {
142
- k as StepperHeader
142
+ T as StepperHeader
143
143
  };
@@ -1,7 +1,7 @@
1
1
  import { StepperItemProps } from '../stepperTypes';
2
2
 
3
3
  /**
4
- * A component for the Desktop-type stepper. Shows the number of the step, title and description
4
+ * A component for the Desktop-style stepper. Shows the number of the step, title and description
5
5
  * @param step - Step to be displayed in the stepper item.
6
6
  * @returns
7
7
  */
@@ -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,11 +1,7 @@
1
1
  import { ButtonProps } from '@element-public/react-button';
2
2
  import { CSSProperties, ReactNode } from 'react';
3
+ import { StepperStyle } from './stepperStyles.ts';
3
4
 
4
- export declare enum StepperType {
5
- DESKTOP = "DESKTOP",
6
- SMALL = "SMALL",
7
- DOTS = "DOTS"
8
- }
9
5
  /**
10
6
  * Defines the structure of a step in the stepper
11
7
  */
@@ -15,15 +11,15 @@ export type Step = {
15
11
  */
16
12
  id: string | number;
17
13
  /**
18
- * The step number that is displayed when the stepper shows a step number (StepperType.DESKTOP and StepperType.SMALL)
14
+ * The step number that is displayed when the stepper shows a step number (StepperStyle.DESKTOP and StepperStyle.SMALL)
19
15
  */
20
16
  stepNumber: number;
21
17
  /**
22
- * Whether to exclude the step from the header. Only applicable for StepperType.DESKTOP.
18
+ * Whether to exclude the step from the header. Only applicable for StepperStyle.DESKTOP.
23
19
  */
24
20
  excludeFromHeader?: boolean;
25
21
  /**
26
- * Whether activating this step should mark the previous step as completed. Only works in StepperType.DESKTOP
22
+ * Whether activating this step should mark the previous step as completed. Only works in StepperStyle.DESKTOP
27
23
  * @default false
28
24
  *
29
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.
@@ -95,7 +91,7 @@ export type StepperButtonProps = Pick<ButtonProps, 'className' | 'disabled' | 'f
95
91
  buttonSize?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'themeDefault';
96
92
  };
97
93
  /**
98
- * @param {StepperType} stepperType - The type of the stepper indicator. Defaults to StepperType.DESKTOP. See {@link StepperType}
94
+ * @param {StepperStyle} stepperStyle - The type of the stepper indicator. Defaults to StepperStyle.DESKTOP. See {@link StepperStyle}
99
95
  * @param {Step[]} steps - An array of steps for the stepper.
100
96
  * @param {number} currentStep - The current step index.
101
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.
@@ -105,14 +101,14 @@ export type StepperButtonProps = Pick<ButtonProps, 'className' | 'disabled' | 'f
105
101
  */
106
102
  export type StepperProps = {
107
103
  /**
108
- * The display-type of the Stepper.
109
- * - StepperType.DESKTOP: EDS-like default stepper appearance. (Do not use on mobile)
110
- * - StepperType.SMALL: Compact version with n/n progress display.
111
- * - StepperType.DOTS: Centered dots and title underneath.
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.
112
108
  *
113
- * @default StepperType.DESKTOP
109
+ * @default StepperStyle.DESKTOP
114
110
  */
115
- stepperType?: StepperType;
111
+ stepperStyle?: StepperStyle;
116
112
  /**
117
113
  * An array of steps for the stepper.
118
114
  */
@@ -124,7 +120,7 @@ export type StepperProps = {
124
120
  currentStepId: Step['id'];
125
121
  /**
126
122
  * Set a custom number of total steps to display in the stepper header.
127
- * Only applicable for StepperType.SMALL.
123
+ * Only applicable for StepperStyle.SMALL.
128
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)
129
125
  */
130
126
  overwriteTotalSteps?: number;
@@ -155,11 +151,11 @@ export type StepperProps = {
155
151
  showPreviousButtonOnFirstStep?: boolean;
156
152
  };
157
153
  /**
158
- * @param {StepperType} stepperType - The type of the stepper indicator.
154
+ * @param {StepperStyle} stepperStyle - The type of the stepper indicator.
159
155
  * @param {number} overwriteTotalSteps - A custom total number of steps to display in the stepper header.
160
156
  * @param {StepData[]} stepsData - An array of step data for rendering the steps @lookup {@link StepData}.
161
157
  */
162
- export type StepperBaseProps = Pick<StepperProps, 'stepperType' | 'overwriteTotalSteps'> & {
158
+ export type StepperBaseProps = Pick<StepperProps, 'stepperStyle' | 'overwriteTotalSteps'> & {
163
159
  stepsData: StepData[];
164
160
  };
165
161
  /**
@@ -1,4 +1 @@
1
- var L = /* @__PURE__ */ ((D) => (D.DESKTOP = "DESKTOP", D.SMALL = "SMALL", D.DOTS = "DOTS", D))(L || {});
2
- export {
3
- L as StepperType
4
- };
1
+
package/dist/main.d.ts CHANGED
@@ -52,6 +52,7 @@ export type { InfoCardProps } from './components/InfoCard/InfoCard';
52
52
  export type { FieldItem } from './components/InfoGroup/InfoGroup';
53
53
  export type { LoadingSpinnerProps } from './components/LoadingSpinner/Default/LoadingSpinner';
54
54
  export type { Step, StepperBaseProps, StepperButtonProps, StepperProps, } from './components/Stepper/stepperTypes';
55
+ export { StepperStyle } from './components/Stepper/stepperStyles';
55
56
  export type { FilterData, FilterOption, FilterSelection } from './types/Filter';
56
57
  export type { CellTemplate, CellTemplateProps, TableLayoutProps } from './types/GenericTable';
57
58
  export type { HashTab } from './types/HashTab';
package/dist/main.js CHANGED
@@ -5,7 +5,7 @@ import { BasicHeading as i } from "./components/BasicHeading/BasicHeading.js";
5
5
  import { BlockView as n } from "./components/BlockView/BlockView.js";
6
6
  import { ButtonCard as A } from "./components/ButtonCard/ButtonCard.js";
7
7
  import { ChipCard as d } from "./components/ChipCard/ChipCard.js";
8
- import { ConfirmationModal as S } from "./components/ConfirmationModal/ConfirmationModal.js";
8
+ import { ConfirmationModal as E } from "./components/ConfirmationModal/ConfirmationModal.js";
9
9
  import { ContextMenu as L } from "./components/ContextMenu/ContextMenu.js";
10
10
  import { DeleteModal as F } from "./components/DeleteModal/DeleteModal.js";
11
11
  import { DetailContentWrapper as T } from "./components/DetailContentWrapper/DetailContentWrapper.js";
@@ -31,7 +31,7 @@ import { SearchBar as xr } from "./components/SearchBar/SearchBar.js";
31
31
  import { Select as ar } from "./components/Select/Select.js";
32
32
  import { StepperHeader as lr } from "./components/Stepper/components/StepperHeader.js";
33
33
  import { Stepper as sr } from "./components/Stepper/Stepper.js";
34
- import { VerticalDivider as Er } from "./components/VerticalDivider/VerticalDivider.js";
34
+ import { VerticalDivider as Sr } from "./components/VerticalDivider/VerticalDivider.js";
35
35
  import { FormCheckBox as cr } from "./components/FormComponents/FormCheckBox/FormCheckBox.js";
36
36
  import { FormDatePicker as _r } from "./components/FormComponents/FormDatePicker/FormDatePicker.js";
37
37
  import { FormNumber as Ir } from "./components/FormComponents/FormNumber/FormNumber.js";
@@ -45,36 +45,37 @@ import { AvailableCustomIcons as Rr } from "./enums/AvailableCustomIcons.js";
45
45
  import { ThemeColor as Hr } from "./enums/ThemeColor.js";
46
46
  import { u as hr } from "./useBreakpoints-MzTZ0tCT.js";
47
47
  import { capitalizeFirstLetters as vr, getFormattedDateTime as yr, getNumberAsLocaleString as Wr, trimLeadingAndTrailingSpaces as Yr } from "./services/UtilService.js";
48
- import { DATE_FORMAT as zr, DATE_TIME_FORMAT as Xr, TIME_FORMAT as jr } from "./types/Time.js";
49
- import { AVAILABLE_COUNTRY_KEYS as Jr, AVAILABLE_LOCALES as Qr, ENGLISH_LANGUAGE_ID as Zr, GERMAN_LANGUAGE_ID as $r, LANGUAGE_CODES_MAPPER as ro, LANGUAGE_ID_MAPPER as oo, SPANISH_LANGUAGE_ID as eo, TURKISH_LANGUAGE_ID as to } from "./types/Languages.js";
50
- import { Allowed as po } from "./components/Allowed/Allowed.js";
51
- import { AllowedButton as xo } from "./components/AllowedButton/AllowedButton.js";
52
- import { AllowedIconButton as ao } from "./components/AllowedIconButton/AllowedIconButton.js";
53
- import { getPermissionsFromModulePermissionToken as lo, useIsAllowed as Ao } from "./components/PermissionChecks/PermissionService.js";
54
- import { SharedComponentsPermissionProvider as Eo } from "./components/SharedComponentsPermissionProvider/SharedComponentsPermissionProvider.js";
55
- import { createPermissionWrapper as co, renderWithPermissions as Lo } from "./test-utils.js";
56
- import { HVMainPermissions as Fo } from "./types/Permission.js";
48
+ import { StepperStyle as zr } from "./components/Stepper/stepperStyles.js";
49
+ import { DATE_FORMAT as jr, DATE_TIME_FORMAT as qr, TIME_FORMAT as Jr } from "./types/Time.js";
50
+ import { AVAILABLE_COUNTRY_KEYS as Zr, AVAILABLE_LOCALES as $r, ENGLISH_LANGUAGE_ID as ro, GERMAN_LANGUAGE_ID as oo, LANGUAGE_CODES_MAPPER as eo, LANGUAGE_ID_MAPPER as to, SPANISH_LANGUAGE_ID as mo, TURKISH_LANGUAGE_ID as po } from "./types/Languages.js";
51
+ import { Allowed as xo } from "./components/Allowed/Allowed.js";
52
+ import { AllowedButton as ao } from "./components/AllowedButton/AllowedButton.js";
53
+ import { AllowedIconButton as lo } from "./components/AllowedIconButton/AllowedIconButton.js";
54
+ import { getPermissionsFromModulePermissionToken as so, useIsAllowed as So } from "./components/PermissionChecks/PermissionService.js";
55
+ import { SharedComponentsPermissionProvider as co } from "./components/SharedComponentsPermissionProvider/SharedComponentsPermissionProvider.js";
56
+ import { createPermissionWrapper as _o, renderWithPermissions as Fo } from "./test-utils.js";
57
+ import { HVMainPermissions as To } from "./types/Permission.js";
57
58
  export {
58
- Jr as AVAILABLE_COUNTRY_KEYS,
59
- Qr as AVAILABLE_LOCALES,
59
+ Zr as AVAILABLE_COUNTRY_KEYS,
60
+ $r as AVAILABLE_LOCALES,
60
61
  e as AlertBanner,
61
- po as Allowed,
62
- xo as AllowedButton,
63
- ao as AllowedIconButton,
62
+ xo as Allowed,
63
+ ao as AllowedButton,
64
+ lo as AllowedIconButton,
64
65
  Rr as AvailableCustomIcons,
65
66
  f as BaseView,
66
67
  i as BasicHeading,
67
68
  n as BlockView,
68
69
  A as ButtonCard,
69
70
  d as ChipCard,
70
- S as ConfirmationModal,
71
+ E as ConfirmationModal,
71
72
  L as ContextMenu,
72
- zr as DATE_FORMAT,
73
- Xr as DATE_TIME_FORMAT,
73
+ jr as DATE_FORMAT,
74
+ qr as DATE_TIME_FORMAT,
74
75
  F as DeleteModal,
75
76
  T as DetailContentWrapper,
76
77
  D as Disclaimer,
77
- Zr as ENGLISH_LANGUAGE_ID,
78
+ ro as ENGLISH_LANGUAGE_ID,
78
79
  u as EmptyView,
79
80
  C as Filter,
80
81
  cr as FormCheckBox,
@@ -86,16 +87,16 @@ export {
86
87
  Pr as FormText,
87
88
  gr as FormToggle,
88
89
  N as FormattedNumberDisplay,
89
- $r as GERMAN_LANGUAGE_ID,
90
+ oo as GERMAN_LANGUAGE_ID,
90
91
  w as GenericTable,
91
- Fo as HVMainPermissions,
92
+ To as HVMainPermissions,
92
93
  b as HashTabView,
93
94
  V as HeaderFilter,
94
95
  U as Iconify,
95
96
  k as InfoCard,
96
97
  y as InfoGroup,
97
- ro as LANGUAGE_CODES_MAPPER,
98
- oo as LANGUAGE_ID_MAPPER,
98
+ eo as LANGUAGE_CODES_MAPPER,
99
+ to as LANGUAGE_ID_MAPPER,
99
100
  m as LinkBanner,
100
101
  Y as ListArea,
101
102
  z as LoadingSpinner,
@@ -104,26 +105,27 @@ export {
104
105
  Z as OfflineView,
105
106
  rr as OnboardingBanner,
106
107
  er as OverflowTooltip,
107
- eo as SPANISH_LANGUAGE_ID,
108
+ mo as SPANISH_LANGUAGE_ID,
108
109
  Or as SafeForm,
109
110
  mr as ScrollbarX,
110
111
  pr as ScrollbarY,
111
112
  xr as SearchBar,
112
113
  ar as Select,
113
- Eo as SharedComponentsPermissionProvider,
114
+ co as SharedComponentsPermissionProvider,
114
115
  sr as Stepper,
115
116
  lr as StepperHeader,
116
- jr as TIME_FORMAT,
117
- to as TURKISH_LANGUAGE_ID,
117
+ zr as StepperStyle,
118
+ Jr as TIME_FORMAT,
119
+ po as TURKISH_LANGUAGE_ID,
118
120
  Hr as ThemeColor,
119
- Er as VerticalDivider,
121
+ Sr as VerticalDivider,
120
122
  vr as capitalizeFirstLetters,
121
- co as createPermissionWrapper,
123
+ _o as createPermissionWrapper,
122
124
  yr as getFormattedDateTime,
123
125
  Wr as getNumberAsLocaleString,
124
- lo as getPermissionsFromModulePermissionToken,
125
- Lo as renderWithPermissions,
126
+ so as getPermissionsFromModulePermissionToken,
127
+ Fo as renderWithPermissions,
126
128
  Yr as trimLeadingAndTrailingSpaces,
127
129
  hr as useBreakpoints,
128
- Ao as useIsAllowed
130
+ So as useIsAllowed
129
131
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hortiview/shared-components",
3
3
  "description": "This is a shared component library. It should used in the HortiView platform and its modules.",
4
- "version": "2.16.0",
4
+ "version": "2.16.1",
5
5
  "type": "module",
6
6
  "repository": "https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared",
7
7
  "author": "Falk Menge <falk.menge.ext@bayer.com>",