@hortiview/shared-components 2.10.2 → 2.11.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 +12 -0
- package/README.md +29 -13
- package/dist/{AlertBanner-Dss0v6W0.js → AlertBanner-C6wpAQMj.js} +3 -3
- package/dist/{BigLoadingSpinner-BeHzqdOg.js → BigLoadingSpinner-CDbRVDNZ.js} +1 -1
- package/dist/{GenericCard-MjxZ1L7r.js → GenericCard-Co9bGU19.js} +3 -3
- package/dist/{ListAreaService-Dx9WBGHB.js → ListAreaService-CGJm5I23.js} +5 -5
- package/dist/{OfflineView-D168VIXv.js → OfflineView-NUM9WE0F.js} +3 -3
- package/dist/assets/FormSelect.css +1 -1
- package/dist/assets/Select.css +1 -1
- package/dist/assets/stepper.css +1 -1
- package/dist/components/AlertBanner/AlertBanner.js +4 -4
- package/dist/components/AlertBanner/AlertBanner.test.js +2 -2
- package/dist/components/AlertBanner/LinkBanner.js +3 -3
- package/dist/components/AlertBanner/LinkBanner.test.js +1 -1
- package/dist/components/BaseView/BaseView.js +5 -5
- package/dist/components/BaseView/BaseView.test.js +1 -1
- package/dist/components/BasicHeading/BasicHeading.js +4 -4
- package/dist/components/BasicHeading/BasicHeading.test.js +2 -2
- package/dist/components/BlockView/BlockView.js +2 -2
- package/dist/components/BlockView/BlockView.test.js +1 -1
- package/dist/components/ChipCard/ChipCard.js +438 -424
- package/dist/components/ChipCard/ChipCard.test.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +3 -3
- package/dist/components/ContextMenu/ContextMenu.test.js +1 -1
- package/dist/components/DeleteModal/DeleteModal.js +4 -4
- package/dist/components/DeleteModal/DeleteModal.test.js +1 -1
- package/dist/components/DetailContentWrapper/DetailContentWrapper.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.js +3 -3
- package/dist/components/Disclaimer/Disclaimer.test.js +1 -1
- package/dist/components/EmptyView/EmptyView.js +3 -3
- package/dist/components/EmptyView/EmptyView.test.js +1 -1
- package/dist/components/Filter/Filter.js +6 -6
- package/dist/components/Filter/Filter.test.js +1 -1
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +4 -4
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +1 -1
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +1 -1
- package/dist/components/FormComponents/FormNumber/FormNumber.test.js +1 -1
- package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
- package/dist/components/FormComponents/FormRadio/FormRadio.test.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +48 -48
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +2 -2
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
- package/dist/components/FormComponents/FormSlider/FormSlider.js +6 -6
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +1 -1
- package/dist/components/FormComponents/FormText/FormText.js +2 -2
- package/dist/components/FormComponents/FormText/FormText.test.js +1 -1
- package/dist/components/FormComponents/FormToggle/FormToggle.js +3 -3
- package/dist/components/FormComponents/FormToggle/FormToggle.test.js +1 -1
- package/dist/components/GenericTable/GenericTable.js +8225 -7444
- package/dist/components/GenericTable/GenericTable.test.js +1 -1
- package/dist/components/GenericTable/Mobile/GenericCard.js +4 -4
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +2 -2
- package/dist/components/GenericTable/Mobile/GenericCardList.js +4 -4
- package/dist/components/GenericTable/Mobile/GenericCardList.test.js +1 -1
- package/dist/components/HashTabView/HashTabView.js +6 -6
- package/dist/components/HashTabView/HashTabView.test.js +1 -1
- package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
- package/dist/components/HeaderFilter/HeaderFilter.test.js +1 -1
- package/dist/components/Iconify/Iconify.js +1 -1
- package/dist/components/Iconify/Iconify.test.js +1 -1
- package/dist/components/InfoCard/InfoCard.js +4 -4
- package/dist/components/InfoCard/InfoCard.test.js +1 -1
- package/dist/components/InfoGroup/InfoGroup.js +3 -3
- package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
- package/dist/components/ListArea/ListArea.js +5 -5
- package/dist/components/ListArea/ListArea.test.js +4 -4
- package/dist/components/ListArea/ListAreaService.js +6 -6
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +2 -2
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +6 -6
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +1 -1
- package/dist/components/Modal/Modal.d.ts +3 -1
- package/dist/components/Modal/Modal.js +116 -115
- package/dist/components/ModulePadding/ModulePadding.js +1 -1
- package/dist/components/ModulePadding/ModulePadding.test.js +1 -1
- package/dist/components/OfflineView/OfflineView.js +4 -4
- package/dist/components/OfflineView/OfflineView.test.js +2 -2
- package/dist/components/OnboardingBanner/OnboardingBanner.d.ts +1 -2
- package/dist/components/OnboardingBanner/OnboardingBanner.js +33 -25
- package/dist/components/OnboardingBanner/OnboardingBanner.test.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +3 -3
- package/dist/components/SafeForm/SafeForm.test.js +2 -2
- package/dist/components/Scrollbar/scrollbar.test.js +1 -1
- package/dist/components/SearchBar/SearchBar.js +2 -2
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/components/Select/Select.js +10 -10
- package/dist/components/Select/Select.test.js +1 -1
- package/dist/components/Stepper/Stepper.d.ts +7 -3
- package/dist/components/Stepper/Stepper.js +31 -21
- package/dist/components/Stepper/Stepper.test.js +127 -38
- package/dist/components/Stepper/components/StepperButton.d.ts +6 -2
- package/dist/components/Stepper/components/StepperButton.js +60 -46
- package/dist/components/Stepper/components/StepperHeader.d.ts +8 -2
- package/dist/components/Stepper/components/StepperHeader.js +60 -14
- package/dist/components/Stepper/components/StepperIndicator.js +2 -2
- package/dist/components/Stepper/stepperTypes.d.ts +35 -5
- package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
- package/dist/correct-is-regexp-logic-BBlm4UpN.js +44 -0
- package/dist/{defineProperty-CmuOyxyf.js → defineProperty-K2c2Cqi7.js} +56 -56
- package/dist/{es.string.iterator-DrqCBub-.js → es.string.iterator-5IsLbO9h.js} +25 -25
- package/dist/find-nTYsLuUo.js +95 -0
- package/dist/hooks/useBreakpoints.test.js +1 -1
- package/dist/{index-I7uTh4Tr.js → index-CkZYDkGd.js} +1 -1
- package/dist/{index-Cpb-8cAN.js → index-_ck2BRrZ.js} +36 -35
- package/dist/{index.es-DUcI2Zyr.js → index.es-B0QNuIUR.js} +4 -4
- package/dist/{index.es-CijDQQVg.js → index.es-B3-Acyxs.js} +4 -4
- package/dist/{index.es-vqlyMiew.js → index.es-BZ3r3ilq.js} +3 -3
- package/dist/{index.es-DNRm4vOy.js → index.es-Bw3LT0xk.js} +3 -3
- package/dist/{index.es-D_hWWij3.js → index.es-C19v_2Tu.js} +14 -14
- package/dist/{index.es-DsGuBR0Z.js → index.es-C1SajYlm.js} +3 -3
- package/dist/{index.es-BzdG6flH.js → index.es-C1u7zUBz.js} +25 -25
- package/dist/{index.es-Ds9rRj5B.js → index.es-CEPrAgSM.js} +4 -4
- package/dist/{index.es-Bo1Rhtyb.js → index.es-CIsLNz4j.js} +2 -2
- package/dist/{index.es-BRtk0Q33.js → index.es-CP6nYw6D.js} +1 -1
- package/dist/{index.es-BjvSa9Z-.js → index.es-C_feFtLb.js} +44 -43
- package/dist/{index.es-CmF6xAUJ.js → index.es-Ci73HfOg.js} +1 -1
- package/dist/{index.es-BLolvOHO.js → index.es-CvHDFF6V.js} +7 -7
- package/dist/{index.es-DYs8W4jv.js → index.es-DCYlADaN.js} +2 -2
- package/dist/{index.es-BLIkMu0q.js → index.es-DHSqxTgL.js} +5 -5
- package/dist/{index.es-Bus5gEri.js → index.es-DYViXXnI.js} +2 -2
- package/dist/{index.es-DDRyb2df.js → index.es-DZBGtuyV.js} +5 -5
- package/dist/{index.es-b2h35xzk.js → index.es-DiONypF4.js} +6 -6
- package/dist/{index.es-P5F6NJPB.js → index.es-DnEIFMjv.js} +228 -266
- package/dist/{index.es-CXq42ihP.js → index.es-HCdWwFg5.js} +13 -13
- package/dist/{index.es-DCSgIiJH.js → index.es-NEYPxnlS.js} +2 -2
- package/dist/{index.es-Dq_bXeGZ.js → index.es-fV9oWpEf.js} +2771 -2481
- package/dist/{index.es-CKdJX75f.js → index.es-nqOhHSs3.js} +1 -1
- package/dist/{keyboard-BfmK7HK_.js → keyboard-20bkocNM.js} +28 -28
- package/dist/main.js +2 -2
- package/dist/{map-LUrszKZW.js → map-Bx7eZRyR.js} +295 -302
- package/dist/{parse-int-qVAoFbOL.js → parse-int-Cmh59J6W.js} +5 -5
- package/dist/{react.esm-CX1WJ2Pp.js → react.esm-BbMrgZCM.js} +3 -2
- package/dist/{slicedToArray-uk6yv91z.js → slicedToArray-h0Nnkd_P.js} +67 -67
- package/dist/stepper.module-c-CWmpkt.js +15 -0
- package/package.json +4 -3
- package/dist/find-Dpy_M6vm.js +0 -88
- package/dist/stepper.module-HuqmDJPj.js +0 -12
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as o, jsxs as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { B as b } from "../../index.es-B0QNuIUR.js";
|
|
3
|
+
import { E as h } from "../../index.es-Bw3LT0xk.js";
|
|
4
|
+
import { G as u, a as g, b as a } from "../../index.es-BZ3r3ilq.js";
|
|
5
|
+
import { G as i } from "../../index.es-C1SajYlm.js";
|
|
6
|
+
import { I as f } from "../../index.es-DCYlADaN.js";
|
|
7
|
+
import { I as y } from "../../index.es-C1u7zUBz.js";
|
|
8
|
+
import { b as v, T as _ } from "../../index.es-NEYPxnlS.js";
|
|
9
9
|
import { u as C } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
10
10
|
import '../../assets/OnboardingBanner.css';const G = "_elevation_7z8y8_1", k = "_color_7z8y8_5", B = "_buttons_7z8y8_9", l = {
|
|
11
11
|
elevation: G,
|
|
@@ -21,57 +21,65 @@ import '../../assets/OnboardingBanner.css';const G = "_elevation_7z8y8_1", k = "
|
|
|
21
21
|
}) => {
|
|
22
22
|
const { isDesktop: d } = C();
|
|
23
23
|
return p ? /* @__PURE__ */ o(
|
|
24
|
-
|
|
24
|
+
h,
|
|
25
25
|
{
|
|
26
26
|
"data-testid": "onboarding-banner",
|
|
27
27
|
elevation: 2,
|
|
28
28
|
customPadding: "0.5rem 1rem 1rem",
|
|
29
29
|
rounded: !0,
|
|
30
30
|
className: l.elevation,
|
|
31
|
-
children: /* @__PURE__ */ o(
|
|
32
|
-
/* @__PURE__ */ o(
|
|
33
|
-
|
|
31
|
+
children: /* @__PURE__ */ o(u, { variant: "none", rowGap: "8px", columnGap: "8px", children: /* @__PURE__ */ r(g, { "data-testid": "onboarding-banner-content", children: [
|
|
32
|
+
/* @__PURE__ */ o(a, { desktopCol: 12, phoneCol: 4, tabletCol: 8, children: /* @__PURE__ */ r(
|
|
33
|
+
i,
|
|
34
34
|
{
|
|
35
35
|
"data-testid": "onboarding-banner-header-content",
|
|
36
36
|
primaryAlign: "space-between",
|
|
37
37
|
secondaryAlign: "center",
|
|
38
38
|
fullWidth: !0,
|
|
39
39
|
children: [
|
|
40
|
-
/* @__PURE__ */ o(
|
|
40
|
+
/* @__PURE__ */ o(v, { level: 6, children: s }),
|
|
41
41
|
/* @__PURE__ */ o(
|
|
42
|
-
|
|
42
|
+
y,
|
|
43
43
|
{
|
|
44
44
|
"data-testid": "onboarding-banner-close-button",
|
|
45
45
|
type: "button",
|
|
46
46
|
onClick: m,
|
|
47
|
-
icon: /* @__PURE__ */ o(
|
|
47
|
+
icon: /* @__PURE__ */ o(f, { icon: "clear" })
|
|
48
48
|
}
|
|
49
49
|
)
|
|
50
50
|
]
|
|
51
51
|
}
|
|
52
52
|
) }),
|
|
53
53
|
/* @__PURE__ */ o(
|
|
54
|
-
|
|
54
|
+
a,
|
|
55
55
|
{
|
|
56
56
|
desktopCol: n ? 10 : 12,
|
|
57
57
|
phoneCol: 4,
|
|
58
58
|
tabletCol: 8,
|
|
59
59
|
order: d ? 2 : 3,
|
|
60
|
-
children: /* @__PURE__ */ r(
|
|
61
|
-
/* @__PURE__ */ o(
|
|
62
|
-
e && e.length > 0 && /* @__PURE__ */ o(
|
|
63
|
-
|
|
60
|
+
children: /* @__PURE__ */ r(i, { direction: "vertical", gap: "dense", children: [
|
|
61
|
+
/* @__PURE__ */ o(_, { level: 2, className: l.color, children: c }),
|
|
62
|
+
e && e.length > 0 && /* @__PURE__ */ o(
|
|
63
|
+
i,
|
|
64
64
|
{
|
|
65
|
-
"data-testid":
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
"data-testid": "onboarding-banner-buttons",
|
|
66
|
+
direction: "horizontal",
|
|
67
|
+
className: l.buttons,
|
|
68
|
+
children: e?.map((t) => /* @__PURE__ */ o(
|
|
69
|
+
b,
|
|
70
|
+
{
|
|
71
|
+
"data-testid": `onboarding-banner-button-${t.id}`,
|
|
72
|
+
...t
|
|
73
|
+
},
|
|
74
|
+
t.id
|
|
75
|
+
))
|
|
76
|
+
}
|
|
77
|
+
)
|
|
70
78
|
] })
|
|
71
79
|
}
|
|
72
80
|
),
|
|
73
81
|
n && /* @__PURE__ */ o(
|
|
74
|
-
|
|
82
|
+
a,
|
|
75
83
|
{
|
|
76
84
|
horizontalAlign: "center",
|
|
77
85
|
"data-testid": "onboarding-banner-media-content",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n, Fragment as d } from "react/jsx-runtime";
|
|
2
|
-
import { a as o, s as e } from "../../react.esm-
|
|
2
|
+
import { a as o, s as e } from "../../react.esm-BbMrgZCM.js";
|
|
3
3
|
import { OnboardingBanner as i } from "./OnboardingBanner.js";
|
|
4
4
|
import { d as a, t as s, a as r, g as t } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
5
5
|
a("Onboarding Banner Test", () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as c, Fragment as m, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { T as p } from "../../index.es-
|
|
2
|
+
import { T as p } from "../../index.es-NEYPxnlS.js";
|
|
3
3
|
import { useState as d, useMemo as h, cloneElement as f } from "react";
|
|
4
4
|
import { M as w } from "../../react-tooltip.min-DSY6KDqS.js";
|
|
5
5
|
import { hasChildWithGreaterWidth as W } from "./OverflowTooltipService.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { b as n } from "../../index.es-
|
|
3
|
-
import { a as i, s as e, w as s } from "../../react.esm-
|
|
4
|
-
import { u as a } from "../../index-
|
|
2
|
+
import { b as n } from "../../index.es-NEYPxnlS.js";
|
|
3
|
+
import { a as i, s as e, w as s } from "../../react.esm-BbMrgZCM.js";
|
|
4
|
+
import { u as a } from "../../index-CkZYDkGd.js";
|
|
5
5
|
import { OverflowTooltip as c } from "./OverflowTooltip.js";
|
|
6
6
|
import { d as u, t as p, g as r } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
7
7
|
u("OverflowTooltip Test", () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { a as u, s as i, f as r } from "../../react.esm-
|
|
3
|
-
import { u as y } from "../../index-
|
|
2
|
+
import { a as u, s as i, f as r } from "../../react.esm-BbMrgZCM.js";
|
|
3
|
+
import { u as y } from "../../index-CkZYDkGd.js";
|
|
4
4
|
import { SafeForm as p } from "./SafeForm.js";
|
|
5
5
|
import { d as b, t as c, g as s, v as l } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
6
6
|
b("SafeForm", () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { a, s as e } from "../../react.esm-
|
|
2
|
+
import { a, s as e } from "../../react.esm-BbMrgZCM.js";
|
|
3
3
|
import { ScrollbarY as d, ScrollbarX as l } from "./Scrollbar.js";
|
|
4
4
|
import { d as c, t, g as o } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
5
5
|
c("Scrollbar", () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { I as l } from "../../index.es-
|
|
3
|
-
import { T as u } from "../../index.es-
|
|
2
|
+
import { I as l } from "../../index.es-C1u7zUBz.js";
|
|
3
|
+
import { T as u } from "../../index.es-CvHDFF6V.js";
|
|
4
4
|
import '../../assets/SearchBar.css';const b = "_searchbar_g83qp_1", d = {
|
|
5
5
|
searchbar: b
|
|
6
6
|
}, g = ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { a as r, s as t, f as h } from "../../react.esm-
|
|
2
|
+
import { a as r, s as t, f as h } from "../../react.esm-BbMrgZCM.js";
|
|
3
3
|
import { act as l } from "react";
|
|
4
4
|
import { SearchBar as s } from "./SearchBar.js";
|
|
5
5
|
import { d as m, t as o, a as n, g as e } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { S as f } from "../../index.es-
|
|
3
|
-
import { useEffect as
|
|
2
|
+
import { S as f } from "../../index.es-fV9oWpEf.js";
|
|
3
|
+
import { useEffect as u } from "react";
|
|
4
4
|
import { u as S } from "../../uniqueId-NU3-C36A.js";
|
|
5
|
-
import '../../assets/Select.css';const p = "
|
|
5
|
+
import '../../assets/Select.css';const p = "_customPortal_1u11g_1", $ = "_customSelect_1u11g_8", n = {
|
|
6
6
|
customPortal: p,
|
|
7
7
|
customSelect: $
|
|
8
8
|
}, P = ({
|
|
9
|
-
menuMaxHeight:
|
|
9
|
+
menuMaxHeight: r = "15rem",
|
|
10
10
|
portalClassName: o,
|
|
11
11
|
"data-testid": l = "custom-select",
|
|
12
|
-
className:
|
|
12
|
+
className: s,
|
|
13
13
|
hoisted: c,
|
|
14
14
|
...d
|
|
15
15
|
}) => {
|
|
16
16
|
const e = `custom-portal-${o ?? "default"}`, m = S("elementSelectForTestId-");
|
|
17
|
-
return
|
|
17
|
+
return u(() => {
|
|
18
18
|
if (c && !document.getElementById(e)) {
|
|
19
19
|
const t = document.createElement("div");
|
|
20
|
-
t.id = e, t.className = `${
|
|
20
|
+
t.id = e, t.className = `${n.customPortal} ${o ?? ""}`, document.body.appendChild(t);
|
|
21
21
|
}
|
|
22
|
-
}, [c, e, o]),
|
|
22
|
+
}, [c, e, o]), u(() => {
|
|
23
23
|
const t = document.querySelectorAll(`#${m} input[role="combobox"]`);
|
|
24
24
|
t && t.forEach((i) => {
|
|
25
25
|
i.setAttribute("data-testid", l);
|
|
@@ -27,11 +27,11 @@ import '../../assets/Select.css';const p = "_customPortal_1c12e_1", $ = "_custom
|
|
|
27
27
|
}, [l, m]), /* @__PURE__ */ a(
|
|
28
28
|
f,
|
|
29
29
|
{
|
|
30
|
-
menuMaxHeight:
|
|
30
|
+
menuMaxHeight: r,
|
|
31
31
|
hoisted: c,
|
|
32
32
|
id: m,
|
|
33
33
|
portalContainer: document.getElementById(e) ? `#${e}` : void 0,
|
|
34
|
-
className: `${
|
|
34
|
+
className: `${n.customSelect} ${s ?? ""}`,
|
|
35
35
|
...d
|
|
36
36
|
}
|
|
37
37
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { a, s as c } from "../../react.esm-
|
|
2
|
+
import { a, s as c } from "../../react.esm-BbMrgZCM.js";
|
|
3
3
|
import { Select as n } from "./Select.js";
|
|
4
4
|
import { d as l, t as m, g as e } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
5
5
|
l("Select", () => {
|
|
@@ -2,11 +2,15 @@ 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
|
|
5
|
+
* A component that displays a stepper with a header, content, and navigation buttons.<br />
|
|
6
|
+
* Available in two display types: 'default' (dots) and 'description' (numerical with description).
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
+
* **!! Be aware that the stepper is not a controlled component, so you need to manage the current step, content and loading state yourself. !!**
|
|
9
|
+
*
|
|
10
|
+
* @param stepperType - The type of the stepper indicator. Defaults to 'default' (dots).
|
|
8
11
|
* @param steps - An array of steps for the stepper.
|
|
9
12
|
* @param currentStep - The current step index.
|
|
13
|
+
* @param customTotalSteps - A custom total number of steps to display in the stepper header. Only applicable for 'description' type.
|
|
10
14
|
* @param children - The content to be displayed in the stepper.
|
|
11
15
|
* @param isStepLoading - A boolean indicating if the current step is loading. If true, the next button will be disabled and show a loading state.
|
|
12
16
|
* @param showStepperHeader - An indicator of whether to show the stepper header. Defaults to true.
|
|
@@ -14,4 +18,4 @@ import { StepperProps } from './stepperTypes';
|
|
|
14
18
|
* @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.
|
|
15
19
|
* @returns
|
|
16
20
|
*/
|
|
17
|
-
export declare const Stepper: ({ steps, currentStep, children, isStepLoading, showStepperHeader, stepperButtonAlignment, showPreviousButtonOnFirstStep, }: PropsWithChildren<StepperProps>) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const Stepper: ({ stepperType, steps, currentStep, customTotalSteps, children, isStepLoading, showStepperHeader, stepperButtonAlignment, showPreviousButtonOnFirstStep, }: PropsWithChildren<StepperProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { G as o } from "../../index.es-
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { StepperPreviousButton as
|
|
5
|
-
import { StepperHeader as
|
|
6
|
-
import { s as
|
|
7
|
-
const
|
|
2
|
+
import { G as o } from "../../index.es-C1SajYlm.js";
|
|
3
|
+
import { useMemo as u } from "react";
|
|
4
|
+
import { StepperPreviousButton as f, StepperNextButton as g } from "./components/StepperButton.js";
|
|
5
|
+
import { StepperHeader as y } from "./components/StepperHeader.js";
|
|
6
|
+
import { s as h } from "../../stepper.module-c-CWmpkt.js";
|
|
7
|
+
const j = ({
|
|
8
|
+
stepperType: n = "default",
|
|
8
9
|
steps: e,
|
|
9
10
|
currentStep: t,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
customTotalSteps: a,
|
|
12
|
+
children: l,
|
|
13
|
+
isStepLoading: p,
|
|
14
|
+
showStepperHeader: s = !0,
|
|
15
|
+
stepperButtonAlignment: d = "center",
|
|
16
|
+
showPreviousButtonOnFirstStep: m = !1
|
|
15
17
|
}) => {
|
|
16
|
-
const
|
|
18
|
+
const c = u(() => t === e.length - 1, [t, e.length]);
|
|
17
19
|
return /* @__PURE__ */ i(
|
|
18
20
|
o,
|
|
19
21
|
{
|
|
@@ -24,17 +26,25 @@ const P = ({
|
|
|
24
26
|
primaryAlign: "center",
|
|
25
27
|
secondaryAlign: "center",
|
|
26
28
|
children: [
|
|
27
|
-
|
|
29
|
+
s ? /* @__PURE__ */ r(
|
|
30
|
+
y,
|
|
31
|
+
{
|
|
32
|
+
stepperType: n,
|
|
33
|
+
steps: e,
|
|
34
|
+
currentStep: t,
|
|
35
|
+
customTotalSteps: a
|
|
36
|
+
}
|
|
37
|
+
) : null,
|
|
28
38
|
/* @__PURE__ */ r(
|
|
29
39
|
o,
|
|
30
40
|
{
|
|
31
41
|
"data-testid": "stepper-content",
|
|
32
42
|
fullWidth: !0,
|
|
33
|
-
className:
|
|
43
|
+
className: h.stepperContent,
|
|
34
44
|
gap: "airy",
|
|
35
45
|
secondaryAlign: "center",
|
|
36
46
|
direction: "vertical",
|
|
37
|
-
children:
|
|
47
|
+
children: l
|
|
38
48
|
}
|
|
39
49
|
),
|
|
40
50
|
/* @__PURE__ */ i(
|
|
@@ -43,15 +53,15 @@ const P = ({
|
|
|
43
53
|
"data-testid": "stepper-buttons",
|
|
44
54
|
fullWidth: !0,
|
|
45
55
|
secondaryAlign: "center",
|
|
46
|
-
primaryAlign:
|
|
56
|
+
primaryAlign: d,
|
|
47
57
|
children: [
|
|
48
|
-
(t !== 0 ||
|
|
58
|
+
(t !== 0 || m) && /* @__PURE__ */ r(f, { ...e[t].prevButtonProps }),
|
|
49
59
|
/* @__PURE__ */ r(
|
|
50
|
-
|
|
60
|
+
g,
|
|
51
61
|
{
|
|
52
62
|
...e[t].nextButtonProps,
|
|
53
|
-
isStepLoading:
|
|
54
|
-
isLastStep:
|
|
63
|
+
isStepLoading: p,
|
|
64
|
+
isLastStep: c
|
|
55
65
|
}
|
|
56
66
|
)
|
|
57
67
|
]
|
|
@@ -62,5 +72,5 @@ const P = ({
|
|
|
62
72
|
);
|
|
63
73
|
};
|
|
64
74
|
export {
|
|
65
|
-
|
|
75
|
+
j as Stepper
|
|
66
76
|
};
|
|
@@ -1,71 +1,160 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { a as
|
|
3
|
-
import { Stepper as
|
|
4
|
-
import { v as
|
|
5
|
-
const
|
|
2
|
+
import { a as p, s as t, f as u, c as l } from "../../react.esm-BbMrgZCM.js";
|
|
3
|
+
import { Stepper as o } from "./Stepper.js";
|
|
4
|
+
import { v as s, d as a, t as c, g as n } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
5
|
+
const i = [
|
|
6
6
|
{
|
|
7
7
|
name: "step1",
|
|
8
8
|
step: 0,
|
|
9
9
|
title: "Step 1",
|
|
10
10
|
optional: !1,
|
|
11
|
-
nextButtonProps: { onClick:
|
|
12
|
-
prevButtonProps: { onClick:
|
|
11
|
+
nextButtonProps: { onClick: s.fn(), label: "Next" },
|
|
12
|
+
prevButtonProps: { onClick: s.fn(), label: "Back" }
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
name: "step2",
|
|
16
16
|
step: 1,
|
|
17
17
|
title: "Step 2",
|
|
18
18
|
optional: !1,
|
|
19
|
-
nextButtonProps: { onClick:
|
|
20
|
-
prevButtonProps: { onClick:
|
|
19
|
+
nextButtonProps: { onClick: s.fn(), label: "Next" },
|
|
20
|
+
prevButtonProps: { onClick: s.fn(), label: "Back" }
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
name: "step3",
|
|
24
24
|
step: 2,
|
|
25
25
|
title: "Step 3",
|
|
26
26
|
optional: !0,
|
|
27
|
-
nextButtonProps: { onClick:
|
|
28
|
-
prevButtonProps: { onClick:
|
|
27
|
+
nextButtonProps: { onClick: s.fn(), label: "Finish" },
|
|
28
|
+
prevButtonProps: { onClick: s.fn(), label: "Back" }
|
|
29
29
|
}
|
|
30
30
|
];
|
|
31
31
|
a("Stepper", () => {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/* @__PURE__ */ e(
|
|
32
|
+
c("renders the stepper header and children", () => {
|
|
33
|
+
p(
|
|
34
|
+
/* @__PURE__ */ e(o, { steps: i, currentStep: 1, isStepLoading: !1, children: /* @__PURE__ */ e("div", { children: "Step Content" }) })
|
|
35
35
|
), n(t.queryByText("Step 1")).not.toBeInTheDocument(), n(t.getByText("Step 2")).toBeInTheDocument(), n(t.queryByText("Step 3")).not.toBeInTheDocument(), n(t.getByText("Step Content")).toBeInTheDocument();
|
|
36
|
-
}),
|
|
37
|
-
|
|
38
|
-
/* @__PURE__ */ e(
|
|
36
|
+
}), c("disables the next button when isStepLoading is true", () => {
|
|
37
|
+
p(
|
|
38
|
+
/* @__PURE__ */ e(o, { steps: i, currentStep: 1, isStepLoading: !0, children: /* @__PURE__ */ e("div", { children: "Step Content" }) })
|
|
39
39
|
);
|
|
40
40
|
const r = t.getByText("Next").closest("button");
|
|
41
41
|
n(r).toBeDisabled();
|
|
42
|
-
}),
|
|
43
|
-
const r =
|
|
44
|
-
|
|
45
|
-
/* @__PURE__ */ e(
|
|
46
|
-
),
|
|
47
|
-
}),
|
|
48
|
-
const r =
|
|
49
|
-
|
|
50
|
-
/* @__PURE__ */ e(
|
|
51
|
-
),
|
|
52
|
-
}),
|
|
53
|
-
|
|
54
|
-
/* @__PURE__ */ e(
|
|
42
|
+
}), c("calls nextButtonProps.onClick when next button is clicked", () => {
|
|
43
|
+
const r = s.fn();
|
|
44
|
+
i[1].nextButtonProps.onClick = r, p(
|
|
45
|
+
/* @__PURE__ */ e(o, { steps: i, currentStep: 1, isStepLoading: !1, children: /* @__PURE__ */ e("div", { children: "Step Content" }) })
|
|
46
|
+
), u.click(t.getByText("Next")), n(r).toHaveBeenCalled();
|
|
47
|
+
}), c("calls prevButtonProps.onClick when prev button is clicked", () => {
|
|
48
|
+
const r = s.fn();
|
|
49
|
+
i[1].prevButtonProps.onClick = r, p(
|
|
50
|
+
/* @__PURE__ */ e(o, { steps: i, currentStep: 1, isStepLoading: !1, children: /* @__PURE__ */ e("div", { children: "Step Content" }) })
|
|
51
|
+
), u.click(t.getByText("Back")), n(r).toHaveBeenCalled();
|
|
52
|
+
}), c("does not render the prev button on the first step", () => {
|
|
53
|
+
p(
|
|
54
|
+
/* @__PURE__ */ e(o, { steps: i, currentStep: 0, isStepLoading: !1, children: /* @__PURE__ */ e("div", { children: "Step Content" }) })
|
|
55
55
|
), n(t.queryByText("Back")).not.toBeInTheDocument();
|
|
56
|
-
}),
|
|
57
|
-
|
|
58
|
-
/* @__PURE__ */ e(
|
|
56
|
+
}), c("renders the next button as submit on last step", () => {
|
|
57
|
+
p(
|
|
58
|
+
/* @__PURE__ */ e(o, { steps: i, currentStep: 2, isStepLoading: !1, children: /* @__PURE__ */ e("div", { children: "Step Content" }) })
|
|
59
59
|
);
|
|
60
60
|
const r = t.getByText("Finish").closest("button");
|
|
61
61
|
n(r).toHaveAttribute("type", "submit");
|
|
62
|
-
}),
|
|
63
|
-
|
|
64
|
-
/* @__PURE__ */ e(
|
|
62
|
+
}), c("does not render the stepper header when showStepperHeader is false", () => {
|
|
63
|
+
p(
|
|
64
|
+
/* @__PURE__ */ e(o, { steps: i, currentStep: 1, isStepLoading: !1, showStepperHeader: !1, children: /* @__PURE__ */ e("div", { children: "Step Content" }) })
|
|
65
65
|
), n(t.queryByTestId("stepper-header")).not.toBeInTheDocument();
|
|
66
|
-
}),
|
|
67
|
-
|
|
68
|
-
/* @__PURE__ */ e(
|
|
66
|
+
}), c("does not render stepper button icons when showArrowIcon is false", () => {
|
|
67
|
+
i[1].nextButtonProps.showArrowIcon = !1, i[1].prevButtonProps.showArrowIcon = !1, p(
|
|
68
|
+
/* @__PURE__ */ e(o, { steps: i, currentStep: 1, isStepLoading: !1, children: /* @__PURE__ */ e("div", { children: "Step Content" }) })
|
|
69
69
|
), n(t.queryByText("arrow_forward")).not.toBeInTheDocument(), n(t.queryByText("arrow_back")).not.toBeInTheDocument();
|
|
70
70
|
});
|
|
71
71
|
});
|
|
72
|
+
const d = [
|
|
73
|
+
{
|
|
74
|
+
name: "Description Step 1",
|
|
75
|
+
step: 1,
|
|
76
|
+
title: "Description 1",
|
|
77
|
+
nextButtonProps: { onClick: s.fn(), label: "Next" },
|
|
78
|
+
prevButtonProps: { onClick: s.fn(), label: "Back" }
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "Description Step 2",
|
|
82
|
+
step: 2,
|
|
83
|
+
title: "Description 2",
|
|
84
|
+
nextButtonProps: { onClick: s.fn(), label: "Next" },
|
|
85
|
+
prevButtonProps: { onClick: s.fn(), label: "Back" }
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "Description Step 2.5",
|
|
89
|
+
step: 2.5,
|
|
90
|
+
title: "Description 2.5",
|
|
91
|
+
nextButtonProps: { onClick: s.fn(), label: "Next" },
|
|
92
|
+
prevButtonProps: { onClick: s.fn(), label: "Back" }
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: "Description Step 3",
|
|
96
|
+
step: 3,
|
|
97
|
+
title: "Description 3",
|
|
98
|
+
nextButtonProps: { onClick: s.fn(), label: "Finish" },
|
|
99
|
+
prevButtonProps: { onClick: s.fn(), label: "Back" }
|
|
100
|
+
}
|
|
101
|
+
];
|
|
102
|
+
a("stepper types", () => {
|
|
103
|
+
const r = /* @__PURE__ */ e("div", { children: "content" });
|
|
104
|
+
c("default type without prop", () => {
|
|
105
|
+
p(
|
|
106
|
+
/* @__PURE__ */ e(o, { steps: i, currentStep: 0, children: r })
|
|
107
|
+
), n(t.getByTestId("stepper-header")).toBeInTheDocument(), n(t.getByText("Step 1")).toBeInTheDocument();
|
|
108
|
+
}), c("default type via prop", () => {
|
|
109
|
+
p(
|
|
110
|
+
/* @__PURE__ */ e(o, { stepperType: "default", steps: i, currentStep: 0, children: r })
|
|
111
|
+
), n(t.getByTestId("stepper-header")).toBeInTheDocument(), n(t.getByText("Step 1")).toBeInTheDocument();
|
|
112
|
+
}), c("description type via prop", () => {
|
|
113
|
+
p(
|
|
114
|
+
/* @__PURE__ */ e(o, { stepperType: "description", steps: d, currentStep: 0, children: r })
|
|
115
|
+
), n(t.getByTestId("description-stepper-header")).toBeInTheDocument(), n(t.getByText("Description 1")).toBeInTheDocument();
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
a("description stepper header", () => {
|
|
119
|
+
const r = /* @__PURE__ */ e("div", { children: "content" });
|
|
120
|
+
c("render step process", () => {
|
|
121
|
+
p(
|
|
122
|
+
/* @__PURE__ */ e(o, { stepperType: "description", steps: d, currentStep: 0, children: r })
|
|
123
|
+
), n(t.getByTestId("description-stepper-header-progress")).toHaveTextContent("1/4"), l(), p(
|
|
124
|
+
/* @__PURE__ */ e(o, { stepperType: "description", steps: d, currentStep: 1, children: r })
|
|
125
|
+
), n(t.getByTestId("description-stepper-header-progress")).toHaveTextContent("2/4"), l(), p(
|
|
126
|
+
/* @__PURE__ */ e(o, { stepperType: "description", steps: d, currentStep: 2, children: r })
|
|
127
|
+
), n(t.getByTestId("description-stepper-header-progress")).toHaveTextContent("2.5/4"), l(), p(
|
|
128
|
+
/* @__PURE__ */ e(o, { stepperType: "description", steps: d, currentStep: 3, children: r })
|
|
129
|
+
), n(t.getByTestId("description-stepper-header-progress")).toHaveTextContent("3/4"), l(), p(
|
|
130
|
+
/* @__PURE__ */ e(
|
|
131
|
+
o,
|
|
132
|
+
{
|
|
133
|
+
stepperType: "description",
|
|
134
|
+
steps: d,
|
|
135
|
+
currentStep: 3,
|
|
136
|
+
customTotalSteps: 3,
|
|
137
|
+
children: r
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
), n(t.getByTestId("description-stepper-header-progress")).toHaveTextContent("3/3");
|
|
141
|
+
}), c("render description text", () => {
|
|
142
|
+
p(
|
|
143
|
+
/* @__PURE__ */ e(o, { stepperType: "description", steps: d, currentStep: 0, children: r })
|
|
144
|
+
), n(t.getByTestId("description-stepper-header-description")).toHaveTextContent(
|
|
145
|
+
"Description 1"
|
|
146
|
+
), l(), p(
|
|
147
|
+
/* @__PURE__ */ e(o, { stepperType: "description", steps: d, currentStep: 1, children: r })
|
|
148
|
+
), n(t.getByTestId("description-stepper-header-description")).toHaveTextContent(
|
|
149
|
+
"Description 2"
|
|
150
|
+
), l(), p(
|
|
151
|
+
/* @__PURE__ */ e(o, { stepperType: "description", steps: d, currentStep: 2, children: r })
|
|
152
|
+
), n(t.getByTestId("description-stepper-header-description")).toHaveTextContent(
|
|
153
|
+
"Description 2.5"
|
|
154
|
+
), l(), p(
|
|
155
|
+
/* @__PURE__ */ e(o, { stepperType: "description", steps: d, currentStep: 3, children: r })
|
|
156
|
+
), n(t.getByTestId("description-stepper-header-description")).toHaveTextContent(
|
|
157
|
+
"Description 3"
|
|
158
|
+
);
|
|
159
|
+
});
|
|
160
|
+
});
|
|
@@ -7,11 +7,13 @@ import { StepperButtonProps } from '../stepperTypes';
|
|
|
7
7
|
* @param disabled - Whether the button is disabled or not.
|
|
8
8
|
* @param className - Additional class names to apply to the button.
|
|
9
9
|
* @param showArrowIcon - Whether to show a leading arrow icon for the button. Defaults to true.
|
|
10
|
+
* @param leadingIcon - A custom leading icon for the button.
|
|
11
|
+
* @param trailingIcon - A custom trailing icon for the button.
|
|
10
12
|
* @param buttonSize - The size of the button, defaults to 'themeDefault'.
|
|
11
13
|
* @param fullWidth - Whether the button should take the full width of its container. Defaults to true.
|
|
12
14
|
* @returns
|
|
13
15
|
*/
|
|
14
|
-
export declare const StepperPreviousButton: ({ label, onClick, disabled, className, showArrowIcon, buttonSize, fullWidth, }: StepperButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const StepperPreviousButton: ({ label, onClick, disabled, className, showArrowIcon, leadingIcon, trailingIcon, buttonSize, fullWidth, }: StepperButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
/**
|
|
16
18
|
* A button component for the stepper that is used to go to the next step.
|
|
17
19
|
* @param label - The label of the button.
|
|
@@ -21,11 +23,13 @@ export declare const StepperPreviousButton: ({ label, onClick, disabled, classNa
|
|
|
21
23
|
* @param isStepLoading - A boolean indicating if the current step is loading. If true, the next button will show a loading state and be disabled.
|
|
22
24
|
* @param isLastStep - A boolean indicating if this is the last step. If true, the button will submit the form instead of going to the next step.
|
|
23
25
|
* @param showArrowIcon - Whether to show a trailing arrow icon for the button. Defaults to true.
|
|
26
|
+
* @param leadingIcon - A custom icon to display instead of the default arrow icon.
|
|
27
|
+
* @param trailingIcon - A custom icon to display instead of the default arrow icon.
|
|
24
28
|
* @param buttonSize - The size of the button, defaults to 'themeDefault'.
|
|
25
29
|
* @param fullWidth - Whether the button should take the full width of its container. Defaults to true.
|
|
26
30
|
* @returns
|
|
27
31
|
*/
|
|
28
|
-
export declare const StepperNextButton: ({ label, onClick, disabled, className, isStepLoading, isLastStep, showArrowIcon, buttonSize, fullWidth, }: StepperButtonProps & {
|
|
32
|
+
export declare const StepperNextButton: ({ label, onClick, disabled, className, isStepLoading, isLastStep, showArrowIcon, leadingIcon, trailingIcon, buttonSize, fullWidth, }: StepperButtonProps & {
|
|
29
33
|
isStepLoading?: boolean;
|
|
30
34
|
isLastStep?: boolean;
|
|
31
35
|
}) => import("react/jsx-runtime").JSX.Element;
|