@hortiview/shared-components 2.16.0 → 2.16.2
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 +12 -0
- package/dist/assets/Modal.css +1 -1
- package/dist/components/Modal/Modal.js +22 -22
- package/dist/components/Stepper/Stepper.d.ts +18 -20
- package/dist/components/Stepper/Stepper.js +7 -7
- package/dist/components/Stepper/Stepper.test.js +43 -43
- package/dist/components/Stepper/components/StepperHeader.d.ts +2 -2
- package/dist/components/Stepper/components/StepperHeader.js +4 -4
- package/dist/components/Stepper/components/StepperItem.d.ts +1 -1
- package/dist/components/Stepper/stepperStyles.d.ts +5 -0
- package/dist/components/Stepper/stepperStyles.js +4 -0
- package/dist/components/Stepper/stepperTypes.d.ts +14 -18
- package/dist/components/Stepper/stepperTypes.js +1 -4
- package/dist/main.d.ts +1 -0
- package/dist/main.js +35 -33
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [2.16.2](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.16.1...v2.16.2) (2026-02-24)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* adjust modal border radius to exclude fullscreen mode ([88981ad](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/88981adcde776e88f76abda8a90b1e91b4f9557b))
|
|
6
|
+
|
|
7
|
+
## [2.16.1](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.16.0...v2.16.1) (2026-02-23)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* stepperStyle export ([a0937a8](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/a0937a8f4db9985ea1a8409c8ed8f601d2c3d9a2))
|
|
12
|
+
|
|
1
13
|
## [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
14
|
|
|
3
15
|
### Features
|
package/dist/assets/Modal.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._modal_mu9y6_1 div[class*=lmnt-modal__surface]{max-height:100svh!important;max-width:100svw!important}._modal_mu9y6_1 div:not([class*=mdc-dialog--fullscreen]) div[class*=lmnt-modal__surface]{border-radius:1rem!important}._modal_mu9y6_1 footer{margin-bottom:0!important}._gap_mu9y6_14{gap:4px!important}._title_mu9y6_18{header{display:flex;justify-content:start;padding-left:.5rem!important;>div{width:100%;margin-left:0!important}}}._titleWithoutCloseIcon_mu9y6_31{margin-left:1rem!important}._closeButton_mu9y6_35{color:var(--lmnt-theme-on-surface-inactive)}._closeButton_mu9y6_35:before{display:none!important}._closeButton_mu9y6_35:hover{background-color:var(--lmnt-theme-surface-variant)!important}
|
|
@@ -8,8 +8,8 @@ import { w as Mt, r as ne, c as D, a as oe } from "../../index.es-Da7ok-B-.js";
|
|
|
8
8
|
import { b as xt, c as Pt, d as ie } from "../../tslib.es6-BDCynO9F.js";
|
|
9
9
|
import { M as ae, a as re } from "../../component-Bz_dtX1r.js";
|
|
10
10
|
import { M as se, c as le, m as ce } from "../../component-DEJuY56h.js";
|
|
11
|
-
import { A as
|
|
12
|
-
import { P as
|
|
11
|
+
import { A as ue } from "../../animationframe-BVKDmEXe.js";
|
|
12
|
+
import { P as de } from "../../index.es-BanVdXEd.js";
|
|
13
13
|
import { b as me } from "../../index.es-SjZ_-d7U.js";
|
|
14
14
|
import { Iconify as fe } from "../Iconify/Iconify.js";
|
|
15
15
|
import { O as pe } from "../../OfflineView-CIwV08EQ.js";
|
|
@@ -105,12 +105,12 @@ var X = "mdc-dom-focus-sentinel", ve = (
|
|
|
105
105
|
}, o.prototype.getFocusableElements = function(e) {
|
|
106
106
|
var t = [].slice.call(e.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button"));
|
|
107
107
|
return t.filter(function(n) {
|
|
108
|
-
var i = n.getAttribute("aria-disabled") === "true" || n.getAttribute("disabled") != null || n.getAttribute("hidden") != null || n.getAttribute("aria-hidden") === "true", a = n.tabIndex >= 0 && n.getBoundingClientRect().width > 0 && !n.classList.contains(X) && !i,
|
|
108
|
+
var i = n.getAttribute("aria-disabled") === "true" || n.getAttribute("disabled") != null || n.getAttribute("hidden") != null || n.getAttribute("aria-hidden") === "true", a = n.tabIndex >= 0 && n.getBoundingClientRect().width > 0 && !n.classList.contains(X) && !i, d = !1;
|
|
109
109
|
if (a) {
|
|
110
110
|
var h = getComputedStyle(n);
|
|
111
|
-
|
|
111
|
+
d = h.display === "none" || h.visibility === "hidden";
|
|
112
112
|
}
|
|
113
|
-
return a && !
|
|
113
|
+
return a && !d;
|
|
114
114
|
});
|
|
115
115
|
}, o.prototype.createSentinel = function() {
|
|
116
116
|
var e = document.createElement("div");
|
|
@@ -229,7 +229,7 @@ var $t = (
|
|
|
229
229
|
xt(e, o);
|
|
230
230
|
function e(t) {
|
|
231
231
|
var n = o.call(this, Pt(Pt({}, e.defaultAdapter), t)) || this;
|
|
232
|
-
return n.dialogOpen = !1, n.isFullscreen = !1, n.animationFrame = 0, n.animationTimer = 0, n.escapeKeyAction = O.CLOSE_ACTION, n.scrimClickAction = O.CLOSE_ACTION, n.autoStackButtons = !0, n.areButtonsStacked = !1, n.suppressDefaultPressSelector = O.SUPPRESS_DEFAULT_PRESS_SELECTOR, n.animFrame = new
|
|
232
|
+
return n.dialogOpen = !1, n.isFullscreen = !1, n.animationFrame = 0, n.animationTimer = 0, n.escapeKeyAction = O.CLOSE_ACTION, n.scrimClickAction = O.CLOSE_ACTION, n.autoStackButtons = !0, n.areButtonsStacked = !1, n.suppressDefaultPressSelector = O.SUPPRESS_DEFAULT_PRESS_SELECTOR, n.animFrame = new ue(), n.contentScrollHandler = function() {
|
|
233
233
|
n.handleScrollEvent();
|
|
234
234
|
}, n.windowResizeHandler = function() {
|
|
235
235
|
n.layout();
|
|
@@ -379,8 +379,8 @@ var $t = (
|
|
|
379
379
|
if (n) {
|
|
380
380
|
var i = this.adapter.getActionFromEvent(t);
|
|
381
381
|
if (!i) {
|
|
382
|
-
var a = t.composedPath ? t.composedPath()[0] : t.target,
|
|
383
|
-
n &&
|
|
382
|
+
var a = t.composedPath ? t.composedPath()[0] : t.target, d = this.suppressDefaultPressSelector ? !this.adapter.eventTargetMatches(a, this.suppressDefaultPressSelector) : !0;
|
|
383
|
+
n && d && this.adapter.clickDefaultButton();
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
}, e.prototype.handleDocumentKeydown = function(t) {
|
|
@@ -487,7 +487,7 @@ var f = $t.strings, Se = (
|
|
|
487
487
|
throw new Error("Dialog component requires a " + f.CONTAINER_SELECTOR + " container element");
|
|
488
488
|
this.container = a, this.content = this.root.querySelector(f.CONTENT_SELECTOR), this.buttons = [].slice.call(this.root.querySelectorAll(f.BUTTON_SELECTOR)), this.defaultButton = this.root.querySelector("[" + f.BUTTON_DEFAULT_ATTRIBUTE + "]"), this.focusTrapFactory = t, this.buttonRipples = [];
|
|
489
489
|
try {
|
|
490
|
-
for (var
|
|
490
|
+
for (var d = ie(this.buttons), h = d.next(); !h.done; h = d.next()) {
|
|
491
491
|
var y = h.value;
|
|
492
492
|
this.buttonRipples.push(new se(y));
|
|
493
493
|
}
|
|
@@ -495,7 +495,7 @@ var f = $t.strings, Se = (
|
|
|
495
495
|
n = { error: g };
|
|
496
496
|
} finally {
|
|
497
497
|
try {
|
|
498
|
-
h && !h.done && (i =
|
|
498
|
+
h && !h.done && (i = d.return) && i.call(d);
|
|
499
499
|
} finally {
|
|
500
500
|
if (n) throw n.error;
|
|
501
501
|
}
|
|
@@ -794,7 +794,7 @@ var f = $t.strings, Se = (
|
|
|
794
794
|
scrollable: !1,
|
|
795
795
|
title: null
|
|
796
796
|
}, Ae = ["actionButton", "actionIcons", "badge", "backButton", "children", "className", "content", "defaultButton", "dismissiveButton", "footerSupplemental", "headerActions", "hideCloseIcon", "indicator", "initialFocus", "mobileStackedButtons", "modalSize", "nextButton", "noActions", "onClose", "onClosed", "onOpen", "onOpened", "open", "preventClose", "preventPrimaryAccept", "primaryButton", "returnFocusSelector", "scrollable", "title"], r = Oe, et = /* @__PURE__ */ Zt(function(o, e) {
|
|
797
|
-
var t = o.actionButton, n = t === void 0 ? r.actionButton : t, i = o.actionIcons, a = i === void 0 ? r.actionIcons : i,
|
|
797
|
+
var t = o.actionButton, n = t === void 0 ? r.actionButton : t, i = o.actionIcons, a = i === void 0 ? r.actionIcons : i, d = o.badge, h = d === void 0 ? r.badge : d, y = o.backButton, g = y === void 0 ? r.backButton : y, S = o.children, B = S === void 0 ? r.children : S, v = o.className, U = v === void 0 ? r.className : v, nt = o.content, ot = nt === void 0 ? r.content : nt, it = o.defaultButton, T = it === void 0 ? r.defaultButton : it, at = o.dismissiveButton, F = at === void 0 ? r.dismissiveButton : at, rt = o.footerSupplemental, L = rt === void 0 ? r.footerSupplemental : rt, st = o.headerActions, lt = st === void 0 ? r.headerActions : st, ct = o.hideCloseIcon, G = ct === void 0 ? r.hideCloseIcon : ct, ut = o.indicator, Ut = ut === void 0 ? r.indicator : ut, dt = o.initialFocus, b = dt === void 0 ? r.initialFocus : dt, mt = o.mobileStackedButtons, K = mt === void 0 ? r.mobileStackedButtons : mt, ft = o.modalSize, C = ft === void 0 ? r.modalSize : ft, pt = o.nextButton, I = pt === void 0 ? r.nextButton : pt, ht = o.noActions, N = ht === void 0 ? r.noActions : ht, gt = o.onClose, W = gt === void 0 ? r.onClose : gt, Ct = o.onClosed, V = Ct === void 0 ? r.onClosed : Ct, _t = o.onOpen, R = _t === void 0 ? r.onOpen : _t, Et = o.onOpened, w = Et === void 0 ? r.onOpened : Et, vt = o.open, St = vt === void 0 ? r.open : vt, yt = o.preventClose, z = yt === void 0 ? r.preventClose : yt, Ot = o.preventPrimaryAccept, At = Ot === void 0 ? r.preventPrimaryAccept : Ot, Tt = o.primaryButton, u = Tt === void 0 ? r.primaryButton : Tt, bt = o.returnFocusSelector, j = bt === void 0 ? r.returnFocusSelector : bt, It = o.scrollable, Nt = It === void 0 ? r.scrollable : It, Dt = o.title, Bt = Dt === void 0 ? r.title : Dt, Gt = Qt(o, Ae), k = wt(), c = wt();
|
|
798
798
|
te(e, function() {
|
|
799
799
|
return k.current;
|
|
800
800
|
}, []);
|
|
@@ -862,12 +862,12 @@ var f = $t.strings, Se = (
|
|
|
862
862
|
var p = {
|
|
863
863
|
className: "lmnt-modal__button mdc-dialog__button",
|
|
864
864
|
"data-mdc-dialog-action": At ? "" : "accept",
|
|
865
|
-
elevation:
|
|
866
|
-
variant:
|
|
865
|
+
elevation: u?.props.elevation !== "default" ? u?.props.elevation : "flat",
|
|
866
|
+
variant: u?.props.variant || "filled"
|
|
867
867
|
};
|
|
868
868
|
return T === "primary" && (p["data-mdc-dialog-button-default"] = !0), b === "primary" && (p["data-mdc-dialog-initial-focus"] = !0), p;
|
|
869
869
|
};
|
|
870
|
-
}, [At, T, b,
|
|
870
|
+
}, [At, T, b, u?.props.elevation, u?.props.variant]);
|
|
871
871
|
return /* @__PURE__ */ m.createElement("aside", Xt({
|
|
872
872
|
ref: k,
|
|
873
873
|
className: x("lmnt", "lmnt-modal", "mdc-dialog", Nt && "lmnt-modal--scrollable mdc-dialog--scrollable", U),
|
|
@@ -891,20 +891,20 @@ var f = $t.strings, Se = (
|
|
|
891
891
|
}
|
|
892
892
|
}, h)), (ot || B) && /* @__PURE__ */ m.createElement("section", {
|
|
893
893
|
className: "lmnt-modal__content mdc-dialog__content"
|
|
894
|
-
}, ot || B), Ut, (n || g || F || I ||
|
|
894
|
+
}, ot || B), Ut, (n || g || F || I || u || L) && /* @__PURE__ */ m.createElement("footer", {
|
|
895
895
|
className: x("lmnt-modal__actions", "mdc-dialog__actions", q && "lmnt-dialog__actions__mobile", L && "lmnt-modal__actions--supplemental-btn", q && K && "lmnt-modal_actions-mobile-stacked")
|
|
896
896
|
}, !Y && L && /* @__PURE__ */ m.createElement("div", {
|
|
897
897
|
className: "lmnt-dialog__actions__supplemental"
|
|
898
898
|
}, D(L, function() {
|
|
899
899
|
var p = {};
|
|
900
900
|
return T === "footerSupplemental" && (p["data-mdc-dialog-button-default"] = !0), b === "footerSupplemental" && (p["data-mdc-dialog-initial-focus"] = !0), p;
|
|
901
|
-
})), !Y && (n || F ||
|
|
901
|
+
})), !Y && (n || F || u) && /* @__PURE__ */ m.createElement("div", {
|
|
902
902
|
className: "lmnt-dialog__actions__right-align lmnt-modal_actions_button"
|
|
903
903
|
}, F && D(F, {
|
|
904
904
|
variant: "text",
|
|
905
905
|
className: "lmnt-modal__button mdc-dialog__button",
|
|
906
906
|
"data-mdc-dialog-action": "close"
|
|
907
|
-
}), n && !
|
|
907
|
+
}), n && !u && D(n, jt), u && D(u, qt)), Y && /* @__PURE__ */ m.createElement("div", {
|
|
908
908
|
className: "lmnt-modal_actions_button lmnt-dialog__actions__directional"
|
|
909
909
|
}, /* @__PURE__ */ m.createElement("div", null, oe(g, "lmnt-modal__button")), /* @__PURE__ */ m.createElement("div", null, D(I, {
|
|
910
910
|
className: "lmnt-modal__button",
|
|
@@ -915,7 +915,7 @@ var f = $t.strings, Se = (
|
|
|
915
915
|
});
|
|
916
916
|
et.displayName = "Modal";
|
|
917
917
|
et.propTypes = ye;
|
|
918
|
-
const Te = "
|
|
918
|
+
const Te = "_modal_mu9y6_1", be = "_gap_mu9y6_14", Ie = "_title_mu9y6_18", Ne = "_titleWithoutCloseIcon_mu9y6_31", De = "_closeButton_mu9y6_35", A = {
|
|
919
919
|
modal: Te,
|
|
920
920
|
gap: be,
|
|
921
921
|
title: Ie,
|
|
@@ -928,7 +928,7 @@ const Te = "_modal_95xon_1", be = "_gap_95xon_11", Ie = "_title_95xon_15", Ne =
|
|
|
928
928
|
actionButton: n,
|
|
929
929
|
hideCloseIcon: i,
|
|
930
930
|
closeIcon: a = "close",
|
|
931
|
-
leadingIcon:
|
|
931
|
+
leadingIcon: d,
|
|
932
932
|
isOnline: h = !0,
|
|
933
933
|
offlineViewProps: y,
|
|
934
934
|
children: g,
|
|
@@ -953,12 +953,12 @@ const Te = "_modal_95xon_1", be = "_gap_95xon_11", Ie = "_title_95xon_15", Ne =
|
|
|
953
953
|
className: A.closeButton
|
|
954
954
|
}
|
|
955
955
|
),
|
|
956
|
-
|
|
956
|
+
d ? /* @__PURE__ */ E(de, { customPadding: "0.25rem 0 0 0.75rem", children: /* @__PURE__ */ E(fe, { icon: d }) }) : /* @__PURE__ */ E(Jt, {}),
|
|
957
957
|
/* @__PURE__ */ E(
|
|
958
958
|
me,
|
|
959
959
|
{
|
|
960
960
|
level: 6,
|
|
961
|
-
className: i && !
|
|
961
|
+
className: i && !d ? A.titleWithoutCloseIcon : "",
|
|
962
962
|
children: e
|
|
963
963
|
}
|
|
964
964
|
)
|
|
@@ -974,7 +974,7 @@ const Te = "_modal_95xon_1", be = "_gap_95xon_11", Ie = "_title_95xon_15", Ne =
|
|
|
974
974
|
action: /* @__PURE__ */ E(J, { className: A.gap, children: t }, "action-group")
|
|
975
975
|
};
|
|
976
976
|
return [v, U];
|
|
977
|
-
}, [t, i, a,
|
|
977
|
+
}, [t, i, a, d, o, e]);
|
|
978
978
|
return /* @__PURE__ */ E(
|
|
979
979
|
et,
|
|
980
980
|
{
|
|
@@ -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
|
|
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
|
-
* -
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
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
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* @param
|
|
16
|
-
* @param
|
|
17
|
-
* @param
|
|
18
|
-
* the
|
|
19
|
-
* @param
|
|
20
|
-
* @param
|
|
21
|
-
* @param
|
|
22
|
-
* @param
|
|
23
|
-
* @
|
|
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: ({
|
|
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
|
|
7
|
-
import {
|
|
8
|
-
const
|
|
9
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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
|
|
3
|
-
import { a as
|
|
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 {
|
|
6
|
-
import { d as
|
|
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
|
-
|
|
36
|
+
B("Generic Stepper Tests (StepperStyle.DESKTOP)", () => {
|
|
37
37
|
let o;
|
|
38
|
-
|
|
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
|
-
),
|
|
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
|
-
),
|
|
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
|
-
|
|
140
|
+
B("Stepper Type DESKTOP Tests", () => {
|
|
141
141
|
let o;
|
|
142
|
-
|
|
142
|
+
h(() => {
|
|
143
143
|
o = m();
|
|
144
144
|
}), c("renders numbers, text and secondary text", () => {
|
|
145
145
|
p(
|
|
146
|
-
/* @__PURE__ */ n(s, {
|
|
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, {
|
|
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, {
|
|
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, {
|
|
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"),
|
|
207
|
-
e(r.className).toContain("stepperItemNumberActive"), e(d.className).toContain("stepperItemConnectorCompleted"), e(l.className).toContain("stepperItemNumberActive"), e(u.className).not.toContain("stepperItemConnectorCompleted"), e(
|
|
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, {
|
|
211
|
-
), d = t.getByTestId("stepper-item-circle-for-step1"), l = t.getByTestId("stepper-connector-before-step2"), u = t.getByTestId("stepper-item-circle-for-step2"),
|
|
212
|
-
e(d.className).toContain("stepperItemNumberActive"), e(l.className).not.toContain("stepperItemConnectorCompleted"), e(u.className).not.toContain("stepperItemNumberActive"), e(
|
|
213
|
-
/* @__PURE__ */ n(s, {
|
|
214
|
-
), e(d.className).toContain("stepperItemNumberActive"), e(l.className).toContain("stepperItemConnectorCompleted"), e(u.className).toContain("stepperItemNumberActive"), e(
|
|
215
|
-
/* @__PURE__ */ n(s, {
|
|
216
|
-
), e(d.className).toContain("stepperItemNumberActive"), e(l.className).toContain("stepperItemConnectorCompleted"), e(u.className).toContain("stepperItemNumberActive"), e(
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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, {
|
|
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(
|
|
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
|
-
|
|
270
|
+
B("Stepper Type DOTS Tests", () => {
|
|
271
271
|
let o;
|
|
272
|
-
|
|
272
|
+
h(() => {
|
|
273
273
|
o = m();
|
|
274
274
|
}), c("renders dots and text", () => {
|
|
275
275
|
p(
|
|
276
|
-
/* @__PURE__ */ n(s, {
|
|
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, {
|
|
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, {
|
|
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, {
|
|
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, {
|
|
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, {
|
|
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
|
-
|
|
310
|
+
B("Stepper Type SMALL Tests", () => {
|
|
311
311
|
let o;
|
|
312
|
-
|
|
312
|
+
h(() => {
|
|
313
313
|
o = m();
|
|
314
314
|
}), c("renders step number, total steps and text", () => {
|
|
315
315
|
p(
|
|
316
|
-
/* @__PURE__ */ n(s, {
|
|
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, {
|
|
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, {
|
|
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, {
|
|
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
|
-
|
|
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: ({
|
|
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
|
-
|
|
10
|
-
|
|
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
|
-
|
|
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-
|
|
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
|
*/
|
|
@@ -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 (
|
|
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
|
|
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
|
|
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 {
|
|
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-
|
|
109
|
-
* -
|
|
110
|
-
* -
|
|
111
|
-
* -
|
|
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
|
|
109
|
+
* @default StepperStyle.DESKTOP
|
|
114
110
|
*/
|
|
115
|
-
|
|
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
|
|
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 {
|
|
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, '
|
|
158
|
+
export type StepperBaseProps = Pick<StepperProps, 'stepperStyle' | 'overwriteTotalSteps'> & {
|
|
163
159
|
stepsData: StepData[];
|
|
164
160
|
};
|
|
165
161
|
/**
|
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
|
|
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
|
|
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 {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
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
|
-
|
|
59
|
-
|
|
59
|
+
Zr as AVAILABLE_COUNTRY_KEYS,
|
|
60
|
+
$r as AVAILABLE_LOCALES,
|
|
60
61
|
e as AlertBanner,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
71
|
+
E as ConfirmationModal,
|
|
71
72
|
L as ContextMenu,
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
|
|
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
|
-
|
|
90
|
+
oo as GERMAN_LANGUAGE_ID,
|
|
90
91
|
w as GenericTable,
|
|
91
|
-
|
|
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
|
-
|
|
98
|
-
|
|
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
|
-
|
|
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
|
-
|
|
114
|
+
co as SharedComponentsPermissionProvider,
|
|
114
115
|
sr as Stepper,
|
|
115
116
|
lr as StepperHeader,
|
|
116
|
-
|
|
117
|
-
|
|
117
|
+
zr as StepperStyle,
|
|
118
|
+
Jr as TIME_FORMAT,
|
|
119
|
+
po as TURKISH_LANGUAGE_ID,
|
|
118
120
|
Hr as ThemeColor,
|
|
119
|
-
|
|
121
|
+
Sr as VerticalDivider,
|
|
120
122
|
vr as capitalizeFirstLetters,
|
|
121
|
-
|
|
123
|
+
_o as createPermissionWrapper,
|
|
122
124
|
yr as getFormattedDateTime,
|
|
123
125
|
Wr as getNumberAsLocaleString,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
so as getPermissionsFromModulePermissionToken,
|
|
127
|
+
Fo as renderWithPermissions,
|
|
126
128
|
Yr as trimLeadingAndTrailingSpaces,
|
|
127
129
|
hr as useBreakpoints,
|
|
128
|
-
|
|
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.
|
|
4
|
+
"version": "2.16.2",
|
|
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>",
|