@hortiview/shared-components 1.10.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +43 -1
- package/dist/{BigLoadingSpinner-CqSGYzZA.js → BigLoadingSpinner-BbXMCKpm.js} +3 -3
- package/dist/{GenericCard-CelFEWlW.js → GenericCard-DuNnB9Ve.js} +1 -1
- package/dist/{ListAreaService-DOwtdRa4.js → ListAreaService-Wq9IkwWN.js} +6 -6
- package/dist/assets/GenericTable.css +1 -1
- package/dist/assets/stepper.css +1 -0
- package/dist/components/AlertBanner/AlertBanner.js +3 -3
- package/dist/components/AlertBanner/AlertBanner.test.js +1 -1
- package/dist/components/BaseView/BaseView.test.js +1 -1
- package/dist/components/BasicHeading/BasicHeading.js +1 -1
- package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
- package/dist/components/BlockView/BlockView.js +1 -1
- package/dist/components/BlockView/BlockView.test.js +1 -1
- package/dist/components/ChipCard/ChipCard.test.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.test.js +1 -1
- package/dist/components/DeleteModal/DeleteModal.js +1 -1
- package/dist/components/DeleteModal/DeleteModal.test.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.test.js +1 -1
- package/dist/components/EmptyView/EmptyView.js +9 -9
- package/dist/components/EmptyView/EmptyView.test.js +5 -5
- package/dist/components/Filter/Filter.js +1 -1
- package/dist/components/Filter/Filter.test.js +1 -1
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +6 -6
- package/dist/components/FormComponents/FormNumber/FormNumber.test.js +1 -1
- package/dist/components/FormComponents/FormRadio/FormRadio.test.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +1 -1
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +1 -1
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +4 -4
- package/dist/components/FormComponents/FormText/FormText.js +1 -1
- package/dist/components/FormComponents/FormText/FormText.test.js +1 -1
- package/dist/components/FormComponents/FormToggle/FormToggle.js +1 -1
- package/dist/components/FormComponents/FormToggle/FormToggle.test.js +1 -1
- package/dist/components/GenericTable/GenericTable.d.ts +4 -1
- package/dist/components/GenericTable/GenericTable.js +1591 -1578
- package/dist/components/GenericTable/GenericTable.test.js +1 -1
- package/dist/components/GenericTable/GenericTableService.js +13 -12
- package/dist/components/GenericTable/Mobile/GenericCard.js +2 -2
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +2 -2
- package/dist/components/GenericTable/Mobile/GenericCardList.js +2 -2
- package/dist/components/GenericTable/Mobile/GenericCardList.test.js +1 -1
- 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/HealthCheckFailed/HealthCheckFailed.js +1 -1
- package/dist/components/HealthCheckFailed/HealthCheckFailed.test.js +1 -1
- package/dist/components/Iconify/Iconify.test.js +1 -1
- package/dist/components/InfoGroup/InfoGroup.js +1 -1
- package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
- package/dist/components/ListArea/ListArea.js +2 -2
- package/dist/components/ListArea/ListArea.test.js +3 -3
- package/dist/components/ListArea/ListAreaService.js +2 -2
- 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 +7 -7
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/ModulePadding/ModulePadding.test.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +2 -2
- package/dist/components/Scrollbar/scrollbar.test.js +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +4 -14
- package/dist/components/SearchBar/SearchBar.js +13 -12
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Select/Select.test.js +1 -1
- package/dist/components/Stepper/Stepper.d.ts +16 -0
- package/dist/components/Stepper/Stepper.js +54 -0
- package/dist/components/Stepper/Stepper.test.d.ts +1 -0
- package/dist/components/Stepper/Stepper.test.js +95 -0
- package/dist/components/Stepper/components/StepperButton.d.ts +25 -0
- package/dist/components/Stepper/components/StepperButton.js +44 -0
- package/dist/components/Stepper/components/StepperHeader.d.ts +9 -0
- package/dist/components/Stepper/components/StepperHeader.js +34 -0
- package/dist/components/Stepper/components/StepperIndicator.d.ts +9 -0
- package/dist/components/Stepper/components/StepperIndicator.js +16 -0
- package/dist/components/Stepper/stepperTypes.d.ts +77 -0
- package/dist/components/Stepper/stepperTypes.js +1 -0
- package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
- package/dist/hooks/useBreakpoints.test.js +1 -1
- package/dist/{index.es-UHKFl8Da.js → index.es-BNHI3ZIK.js} +2 -2
- package/dist/{index.es-zr101OF5.js → index.es-CoFul5zR.js} +2 -2
- package/dist/{index.es-CF_xy2ns.js → index.es-D54RuMc_.js} +2 -2
- package/dist/{index.es-d5xhUpJZ.js → index.es-fnFnw2P1.js} +1 -1
- package/dist/main.d.ts +6 -2
- package/dist/main.js +51 -45
- package/dist/services/services.test.js +1 -1
- package/dist/stepper.module-HuqmDJPj.js +12 -0
- package/dist/types/GenericTable.d.ts +15 -0
- package/dist/{vi.CjhMlMwf-BCJNwXvu.js → vi.CjhMlMwf-CKxPQtd6.js} +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { a as r, s as n, f as c } from "../../react.esm-CX1WJ2Pp.js";
|
|
3
|
+
import { Stepper as l } from "./Stepper.js";
|
|
4
|
+
import { v as s, d as a, t as p, g as o } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
5
|
+
const i = [
|
|
6
|
+
{
|
|
7
|
+
name: "step1",
|
|
8
|
+
step: 0,
|
|
9
|
+
title: "Step 1",
|
|
10
|
+
optional: !1,
|
|
11
|
+
nextButtonProps: { onClick: s.fn(), label: "Next" },
|
|
12
|
+
prevButtonProps: { onClick: s.fn(), label: "Back" }
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: "step2",
|
|
16
|
+
step: 1,
|
|
17
|
+
title: "Step 2",
|
|
18
|
+
optional: !1,
|
|
19
|
+
nextButtonProps: { onClick: s.fn(), label: "Next" },
|
|
20
|
+
prevButtonProps: { onClick: s.fn(), label: "Back" }
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "step3",
|
|
24
|
+
step: 2,
|
|
25
|
+
title: "Step 3",
|
|
26
|
+
optional: !0,
|
|
27
|
+
nextButtonProps: { onClick: s.fn(), label: "Finish" },
|
|
28
|
+
prevButtonProps: { onClick: s.fn(), label: "Back" }
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
a("Stepper", () => {
|
|
32
|
+
p("renders the stepper header and children", () => {
|
|
33
|
+
r(
|
|
34
|
+
/* @__PURE__ */ e(l, { steps: i, currentStep: 1, isStepLoading: !1, children: /* @__PURE__ */ e("div", { children: "Step Content" }) })
|
|
35
|
+
), o(n.queryByText("Step 1")).not.toBeInTheDocument(), o(n.getByText("Step 2")).toBeInTheDocument(), o(n.queryByText("Step 3")).not.toBeInTheDocument(), o(n.getByText("Step Content")).toBeInTheDocument();
|
|
36
|
+
}), p("disables the next button when isStepLoading is true", () => {
|
|
37
|
+
r(
|
|
38
|
+
/* @__PURE__ */ e(l, { steps: i, currentStep: 1, isStepLoading: !0, children: /* @__PURE__ */ e("div", { children: "Step Content" }) })
|
|
39
|
+
);
|
|
40
|
+
const t = n.getByText("Next").closest("button");
|
|
41
|
+
o(t).toBeDisabled();
|
|
42
|
+
}), p("calls nextButtonProps.onClick when next button is clicked", () => {
|
|
43
|
+
const t = s.fn();
|
|
44
|
+
i[1].nextButtonProps.onClick = t, r(
|
|
45
|
+
/* @__PURE__ */ e(
|
|
46
|
+
l,
|
|
47
|
+
{
|
|
48
|
+
steps: i,
|
|
49
|
+
currentStep: 1,
|
|
50
|
+
isStepLoading: !1,
|
|
51
|
+
children: /* @__PURE__ */ e("div", { children: "Step Content" })
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
), c.click(n.getByText("Next")), o(t).toHaveBeenCalled();
|
|
55
|
+
}), p("calls prevButtonProps.onClick when prev button is clicked", () => {
|
|
56
|
+
const t = s.fn();
|
|
57
|
+
i[1].prevButtonProps.onClick = t, r(
|
|
58
|
+
/* @__PURE__ */ e(
|
|
59
|
+
l,
|
|
60
|
+
{
|
|
61
|
+
steps: i,
|
|
62
|
+
currentStep: 1,
|
|
63
|
+
isStepLoading: !1,
|
|
64
|
+
children: /* @__PURE__ */ e("div", { children: "Step Content" })
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
), c.click(n.getByText("Back")), o(t).toHaveBeenCalled();
|
|
68
|
+
}), p("does not render the prev button on the first step", () => {
|
|
69
|
+
r(
|
|
70
|
+
/* @__PURE__ */ e(
|
|
71
|
+
l,
|
|
72
|
+
{
|
|
73
|
+
steps: i,
|
|
74
|
+
currentStep: 0,
|
|
75
|
+
isStepLoading: !1,
|
|
76
|
+
children: /* @__PURE__ */ e("div", { children: "Step Content" })
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
), o(n.queryByText("Back")).not.toBeInTheDocument();
|
|
80
|
+
}), p("renders the next button as submit on last step", () => {
|
|
81
|
+
r(
|
|
82
|
+
/* @__PURE__ */ e(
|
|
83
|
+
l,
|
|
84
|
+
{
|
|
85
|
+
steps: i,
|
|
86
|
+
currentStep: 2,
|
|
87
|
+
isStepLoading: !1,
|
|
88
|
+
children: /* @__PURE__ */ e("div", { children: "Step Content" })
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
);
|
|
92
|
+
const t = n.getByText("Finish").closest("button");
|
|
93
|
+
o(t).toHaveAttribute("type", "submit");
|
|
94
|
+
});
|
|
95
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StepperButtonProps } from '../stepperTypes';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A button component for the stepper that is used to go to the previous step.
|
|
5
|
+
* @param label - The label of the button.
|
|
6
|
+
* @param onClick - The function to be called when the button is clicked.
|
|
7
|
+
* @param disabled - Whether the button is disabled or not.
|
|
8
|
+
* @param className - Additional class names to apply to the button.
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare const StepperPreviousButton: ({ label, onClick, disabled, className, }: StepperButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* A button component for the stepper that is used to go to the next step.
|
|
14
|
+
* @param label - The label of the button.
|
|
15
|
+
* @param onClick - The function to be called when the button is clicked.
|
|
16
|
+
* @param disabled - Whether the button is disabled or not.
|
|
17
|
+
* @param className - Additional class names to apply to the button.
|
|
18
|
+
* @param isStepLoading - A boolean indicating if the current step is loading. If true, the next button will show a loading state and be disabled.
|
|
19
|
+
* @param isLastStep - A boolean indicating if this is the last step. If true, the button will submit the form instead of going to the next step.
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
export declare const StepperNextButton: ({ label, onClick, disabled, className, isStepLoading, isLastStep, }: StepperButtonProps & {
|
|
23
|
+
isStepLoading?: boolean;
|
|
24
|
+
isLastStep?: boolean;
|
|
25
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { B as p } from "../../../index.es-CiqbARoC.js";
|
|
3
|
+
import { s } from "../../../stepper.module-HuqmDJPj.js";
|
|
4
|
+
const c = ({
|
|
5
|
+
label: t,
|
|
6
|
+
onClick: r,
|
|
7
|
+
disabled: e,
|
|
8
|
+
className: o
|
|
9
|
+
}) => /* @__PURE__ */ a(
|
|
10
|
+
p,
|
|
11
|
+
{
|
|
12
|
+
"data-testid": "stepper-previous-button",
|
|
13
|
+
className: `${s.stepperButton} ${o ?? ""}`,
|
|
14
|
+
onClick: r,
|
|
15
|
+
disabled: e,
|
|
16
|
+
fullWidth: !0,
|
|
17
|
+
variant: "outlined",
|
|
18
|
+
leadingIcon: "arrow_back",
|
|
19
|
+
children: t
|
|
20
|
+
}
|
|
21
|
+
), m = ({
|
|
22
|
+
label: t,
|
|
23
|
+
onClick: r,
|
|
24
|
+
disabled: e,
|
|
25
|
+
className: o,
|
|
26
|
+
isStepLoading: n,
|
|
27
|
+
isLastStep: u
|
|
28
|
+
}) => /* @__PURE__ */ a(
|
|
29
|
+
p,
|
|
30
|
+
{
|
|
31
|
+
"data-testid": "stepper-next-button",
|
|
32
|
+
className: `${s.stepperButton} ${n ? s.stepperButtonLoading : ""} ${o ?? ""}`,
|
|
33
|
+
onClick: r,
|
|
34
|
+
disabled: n || e,
|
|
35
|
+
fullWidth: !0,
|
|
36
|
+
trailingIcon: n || u ? void 0 : "arrow_forward",
|
|
37
|
+
type: u ? "submit" : "button",
|
|
38
|
+
children: t
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
export {
|
|
42
|
+
m as StepperNextButton,
|
|
43
|
+
c as StepperPreviousButton
|
|
44
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StepperBaseProps } from '../stepperTypes';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A component that displays the header of the stepper, including the step indicator (see {@link StepperIndicator}) and title.
|
|
5
|
+
* @param steps - An array of steps for the stepper.
|
|
6
|
+
* @param currentStep - The current step index.
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const StepperHeader: ({ steps, currentStep }: StepperBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { G as o } from "../../../index.es-DntoATwO.js";
|
|
3
|
+
import { T as p } from "../../../index.es-D54RuMc_.js";
|
|
4
|
+
import { s as i } from "../../../stepper.module-HuqmDJPj.js";
|
|
5
|
+
import { StepperIndicator as s } from "./StepperIndicator.js";
|
|
6
|
+
const f = ({ steps: e, currentStep: r }) => /* @__PURE__ */ a(
|
|
7
|
+
o,
|
|
8
|
+
{
|
|
9
|
+
"data-testid": "stepper-header",
|
|
10
|
+
className: i.stepperContainer,
|
|
11
|
+
gap: "dense",
|
|
12
|
+
primaryAlign: "center",
|
|
13
|
+
secondaryAlign: "center",
|
|
14
|
+
direction: "vertical",
|
|
15
|
+
fullWidth: !0,
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ t(s, { steps: e, currentStep: r }),
|
|
18
|
+
/* @__PURE__ */ t(
|
|
19
|
+
p,
|
|
20
|
+
{
|
|
21
|
+
"data-testid": "stepper-header-description",
|
|
22
|
+
level: 2,
|
|
23
|
+
bold: !0,
|
|
24
|
+
tag: "div",
|
|
25
|
+
className: i.stepperTitle,
|
|
26
|
+
children: e[r]?.title
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
export {
|
|
33
|
+
f as StepperHeader
|
|
34
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StepperBaseProps } from '../stepperTypes';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A component that displays the stepper indicator, showing the current step and optional steps.
|
|
5
|
+
* @param steps - An array of steps for the stepper.
|
|
6
|
+
* @param currentStep - The current step index.
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const StepperIndicator: ({ steps, currentStep }: StepperBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { G as p } from "../../../index.es-DntoATwO.js";
|
|
3
|
+
import { s as e } from "../../../stepper.module-HuqmDJPj.js";
|
|
4
|
+
const m = ({ steps: a, currentStep: i }) => /* @__PURE__ */ r(p, { gap: "dense", "data-testid": "stepper-indicator", children: a.map((t, o) => /* @__PURE__ */ r(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
"data-testid": `stepper-indicator-${t.name}`,
|
|
8
|
+
className: `${e.stepperIndicatorItem}
|
|
9
|
+
${t.optional ? e.stepperIndicatorItemOptional : ""}
|
|
10
|
+
${o <= i ? e.stepperIndicatorItemActive : ""}`
|
|
11
|
+
},
|
|
12
|
+
`indicator_${t.name}`
|
|
13
|
+
)) });
|
|
14
|
+
export {
|
|
15
|
+
m as StepperIndicator
|
|
16
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ButtonProps } from '@element-public/react-button';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @param {string} name - The unique name of the step.
|
|
6
|
+
* @param {number} step - The step number, starting from 0.
|
|
7
|
+
* @param {string} title - The title of the step showing in the Stepper.
|
|
8
|
+
* @param {boolean} optional - Whether the step is optional or not showing a different design.
|
|
9
|
+
* @param {StepperButtonProps} nextButtonProps - Props for the next button, including onClick, label, className and disabled state.
|
|
10
|
+
* @param {StepperButtonProps} prevButtonProps - Props for the previous button, including onClick, label, className and disabled state.
|
|
11
|
+
*/
|
|
12
|
+
export type Step = {
|
|
13
|
+
/**
|
|
14
|
+
* The unique name of the step.
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
17
|
+
/**
|
|
18
|
+
* The step number, starting from 0.
|
|
19
|
+
*/
|
|
20
|
+
step: number;
|
|
21
|
+
/**
|
|
22
|
+
* The title of the step showing in the Stepper.
|
|
23
|
+
*/
|
|
24
|
+
title: string;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the step is optional or not showing a different design.
|
|
27
|
+
*/
|
|
28
|
+
optional: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The props for the next button, including onClick, label, className and disabled state. {@link StepperButtonProps}
|
|
31
|
+
*/
|
|
32
|
+
nextButtonProps: StepperButtonProps;
|
|
33
|
+
/**
|
|
34
|
+
* The props for the previous button, including onClick, label, className and disabled state. {@link StepperButtonProps}
|
|
35
|
+
*/
|
|
36
|
+
prevButtonProps: StepperButtonProps;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* @param {string} className - The class name for the button.
|
|
40
|
+
* @param {boolean} disabled - Whether the button is disabled or not.
|
|
41
|
+
* @param {() => void} onClick - The function to be called when the button is clicked.
|
|
42
|
+
* @param {string | ReactNode} label - The label of the button.
|
|
43
|
+
*/
|
|
44
|
+
export type StepperButtonProps = Pick<ButtonProps, 'className' | 'disabled'> & {
|
|
45
|
+
/**
|
|
46
|
+
* The function to be called when the button is clicked.
|
|
47
|
+
*/
|
|
48
|
+
onClick: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* The label of the button.
|
|
51
|
+
*/
|
|
52
|
+
label: string | ReactNode;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* @param {Step[]} steps - An array of steps for the stepper.
|
|
56
|
+
* @param {number} currentStep - The current step index.
|
|
57
|
+
* @param {boolean} isStepLoading - A boolean indicating if the current step is loading. If true, the next button will be disabled and show a loading state.
|
|
58
|
+
*/
|
|
59
|
+
export type StepperProps = {
|
|
60
|
+
/**
|
|
61
|
+
* An array of steps for the stepper.
|
|
62
|
+
*/
|
|
63
|
+
steps: Step[];
|
|
64
|
+
/**
|
|
65
|
+
* The current step index.
|
|
66
|
+
*/
|
|
67
|
+
currentStep: number;
|
|
68
|
+
/**
|
|
69
|
+
* a flag which indicates if the current step is loading.
|
|
70
|
+
*/
|
|
71
|
+
isStepLoading?: boolean;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* @param {Step[]} steps - An array of steps for the stepper.
|
|
75
|
+
* @param {number} currentStep - The current step index.
|
|
76
|
+
*/
|
|
77
|
+
export type StepperBaseProps = Pick<StepperProps, 'steps' | 'currentStep'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { a as r } from "../../react.esm-CX1WJ2Pp.js";
|
|
3
3
|
import { VerticalDivider as s } from "./VerticalDivider.js";
|
|
4
|
-
import { d as o, t as l, g as i } from "../../vi.CjhMlMwf-
|
|
4
|
+
import { d as o, t as l, g as i } from "../../vi.CjhMlMwf-CKxPQtd6.js";
|
|
5
5
|
o("VerticalDivider Test", () => {
|
|
6
6
|
l("it should render with basic styling", () => {
|
|
7
7
|
r(/* @__PURE__ */ e(s, {}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as t, w as s } from "../react.esm-CX1WJ2Pp.js";
|
|
2
2
|
import { u as o } from "../useBreakpoints-MzTZ0tCT.js";
|
|
3
|
-
import { d as a, t as i, g as r } from "../vi.CjhMlMwf-
|
|
3
|
+
import { d as a, t as i, g as r } from "../vi.CjhMlMwf-CKxPQtd6.js";
|
|
4
4
|
a("useBreakpoint Test", () => {
|
|
5
5
|
i("returns object", () => {
|
|
6
6
|
const { result: e } = t(() => o());
|
|
@@ -5,9 +5,9 @@ import { f as Ar, e as yr, h as La, k as Ya, u as Ja, d as Zt } from "./index.es
|
|
|
5
5
|
import { T as ka, F as xr, N as za } from "./index.es-41ztjcFT.js";
|
|
6
6
|
import { createPortal as ja } from "react-dom";
|
|
7
7
|
import { a as _a } from "./floating-ui.dom-CeD8zknG.js";
|
|
8
|
-
import { a as Lt, b as ci, c as Ua, L as Jn } from "./index.es-
|
|
8
|
+
import { a as Lt, b as ci, c as Ua, L as Jn } from "./index.es-fnFnw2P1.js";
|
|
9
9
|
import { S as Qa } from "./index.es-8GOVkuo-.js";
|
|
10
|
-
import { d as $a, e as Ka } from "./index.es-
|
|
10
|
+
import { d as $a, e as Ka } from "./index.es-D54RuMc_.js";
|
|
11
11
|
import { B as Er } from "./index.es-CiqbARoC.js";
|
|
12
12
|
import { C as Gr } from "./index.es-BvrQnJ3j.js";
|
|
13
13
|
import { c as qa, I as eo } from "./index.es-3043KTnb.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as gt, _ as Xe, P as s } from "./identity-DLWZln-X.js";
|
|
2
2
|
import H, { forwardRef as yt, useContext as $r, useState as G, useRef as Ue, useMemo as at, useCallback as J, useEffect as he, useImperativeHandle as wt, cloneElement as ir } from "react";
|
|
3
|
-
import { a as Lr } from "./index.es-
|
|
3
|
+
import { a as Lr } from "./index.es-D54RuMc_.js";
|
|
4
4
|
import { I as Wt } from "./index.es-0lQcz8m1.js";
|
|
5
|
-
import { c as bt, d as Qr, e as _, f as E, g as M, h as d, b as h, i as k, S as ht } from "./index.es-
|
|
5
|
+
import { c as bt, d as Qr, e as _, f as E, g as M, h as d, b as h, i as k, S as ht } from "./index.es-BNHI3ZIK.js";
|
|
6
6
|
import { H as Rr, f as or, u as sr, p as Br, d as Oe } from "./index.es-da0cf7oE.js";
|
|
7
7
|
import { P as ur } from "./index.es-D6N-XWHe.js";
|
|
8
8
|
import { c as Gr, I as Xr } from "./index.es-3043KTnb.js";
|
|
@@ -14,7 +14,7 @@ import { R as Gt } from "./index.es-BtjV0oNv.js";
|
|
|
14
14
|
import { C as Vt } from "./index.es-BvrQnJ3j.js";
|
|
15
15
|
import { S as zt } from "./index.es-8GOVkuo-.js";
|
|
16
16
|
import { I as je } from "./index.es-3043KTnb.js";
|
|
17
|
-
import { d as ct, a as Xt } from "./index.es-
|
|
17
|
+
import { d as ct, a as Xt } from "./index.es-D54RuMc_.js";
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2018 Google Inc.
|
package/dist/main.d.ts
CHANGED
|
@@ -25,6 +25,9 @@ export { OverflowTooltip } from './components/OverflowTooltip/OverflowTooltip';
|
|
|
25
25
|
export { ScrollbarX, ScrollbarY } from './components/Scrollbar/Scrollbar';
|
|
26
26
|
export { SearchBar } from './components/SearchBar/SearchBar';
|
|
27
27
|
export { Select } from './components/Select/Select';
|
|
28
|
+
export { StepperHeader } from './components/Stepper/components/StepperHeader';
|
|
29
|
+
export { StepperIndicator } from './components/Stepper/components/StepperIndicator';
|
|
30
|
+
export { Stepper } from './components/Stepper/Stepper';
|
|
28
31
|
export { VerticalDivider } from './components/VerticalDivider/VerticalDivider';
|
|
29
32
|
export { FormCheckBox } from './components/FormComponents/FormCheckBox/FormCheckBox';
|
|
30
33
|
export { FormDatePicker } from './components/FormComponents/FormDatePicker/FormDatePicker';
|
|
@@ -37,16 +40,17 @@ export { FormToggle } from './components/FormComponents/FormToggle/FormToggle';
|
|
|
37
40
|
export { AvailableCustomIcons } from './enums/AvailableCustomIcons';
|
|
38
41
|
export { ThemeColor } from './enums/ThemeColor';
|
|
39
42
|
export { useBreakpoints } from './hooks/useBreakpoints';
|
|
40
|
-
export { capitalizeFirstLetters, getNumberAsLocaleString, trimLeadingAndTrailingSpaces
|
|
43
|
+
export { capitalizeFirstLetters, getNumberAsLocaleString, trimLeadingAndTrailingSpaces } from './services/UtilService';
|
|
41
44
|
export type { ActionProps } from './components/ContextMenu/ContextMenu';
|
|
42
45
|
export type { FormSelectOption } from './components/FormComponents/FormSelect/FormSelect';
|
|
43
46
|
export type { FormTextProps } from './components/FormComponents/FormText/FormText';
|
|
44
47
|
export type { HealthCheckFailedProps } from './components/HealthCheckFailed/HealthCheckFailed';
|
|
45
48
|
export type { FieldItem } from './components/InfoGroup/InfoGroup';
|
|
46
49
|
export type { LoadingSpinnerProps } from './components/LoadingSpinner/Default/LoadingSpinner';
|
|
50
|
+
export type { Step, StepperBaseProps, StepperButtonProps, StepperProps } from './components/Stepper/stepperTypes';
|
|
47
51
|
export type { FilterData, FilterOption, FilterSelection } from './types/Filter';
|
|
48
52
|
export type { CellTemplate, CellTemplateProps, TableLayoutProps } from './types/GenericTable';
|
|
49
53
|
export type { HashTab } from './types/HashTab';
|
|
50
54
|
export type { BaseListElement, ListElement } from './types/ListElement';
|
|
51
|
-
export { AVAILABLE_COUNTRY_KEYS, AVAILABLE_LOCALES, ENGLISH_LANGUAGE_ID, GERMAN_LANGUAGE_ID, LANGUAGE_CODES_MAPPER, LANGUAGE_ID_MAPPER, SPANISH_LANGUAGE_ID, TURKISH_LANGUAGE_ID
|
|
55
|
+
export { AVAILABLE_COUNTRY_KEYS, AVAILABLE_LOCALES, ENGLISH_LANGUAGE_ID, GERMAN_LANGUAGE_ID, LANGUAGE_CODES_MAPPER, LANGUAGE_ID_MAPPER, SPANISH_LANGUAGE_ID, TURKISH_LANGUAGE_ID } from './types/Languages';
|
|
52
56
|
export type { AVAILABLE_LANGUAGE_CODES, LANGUAGE_COUNTRY_CODES } from './types/Languages';
|
package/dist/main.js
CHANGED
|
@@ -6,15 +6,15 @@ import { BlockView as i } from "./components/BlockView/BlockView.js";
|
|
|
6
6
|
import { ChipCard as A } from "./components/ChipCard/ChipCard.js";
|
|
7
7
|
import { ContextMenu as c } from "./components/ContextMenu/ContextMenu.js";
|
|
8
8
|
import { DeleteModal as d } from "./components/DeleteModal/DeleteModal.js";
|
|
9
|
-
import { DetailContentWrapper as
|
|
9
|
+
import { DetailContentWrapper as E } from "./components/DetailContentWrapper/DetailContentWrapper.js";
|
|
10
10
|
import { Disclaimer as s } from "./components/Disclaimer/Disclaimer.js";
|
|
11
|
-
import { EmptyView as
|
|
11
|
+
import { EmptyView as I } from "./components/EmptyView/EmptyView.js";
|
|
12
12
|
import { Filter as N } from "./components/Filter/Filter.js";
|
|
13
13
|
import { FormattedNumberDisplay as C } from "./components/FormattedNumberDisplay/FormattedNumberDisplay.js";
|
|
14
14
|
import { GenericTable as u } from "./components/GenericTable/GenericTable.js";
|
|
15
15
|
import { HashTabView as T } from "./components/HashTabView/HashTabView.js";
|
|
16
|
-
import { HeaderFilter as
|
|
17
|
-
import { HealthCheckFailed as
|
|
16
|
+
import { HeaderFilter as H } from "./components/HeaderFilter/HeaderFilter.js";
|
|
17
|
+
import { HealthCheckFailed as h } from "./components/HealthCheckFailed/HealthCheckFailed.js";
|
|
18
18
|
import { Iconify as P } from "./components/Iconify/Iconify.js";
|
|
19
19
|
import { InfoGroup as R } from "./components/InfoGroup/InfoGroup.js";
|
|
20
20
|
import { ListArea as w } from "./components/ListArea/ListArea.js";
|
|
@@ -25,69 +25,75 @@ import { OverflowTooltip as X } from "./components/OverflowTooltip/OverflowToolt
|
|
|
25
25
|
import { ScrollbarX as q, ScrollbarY as J } from "./components/Scrollbar/Scrollbar.js";
|
|
26
26
|
import { SearchBar as Z } from "./components/SearchBar/SearchBar.js";
|
|
27
27
|
import { Select as rr } from "./components/Select/Select.js";
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
28
|
+
import { StepperHeader as er } from "./components/Stepper/components/StepperHeader.js";
|
|
29
|
+
import { StepperIndicator as mr } from "./components/Stepper/components/StepperIndicator.js";
|
|
30
|
+
import { Stepper as fr } from "./components/Stepper/Stepper.js";
|
|
31
|
+
import { VerticalDivider as ar } from "./components/VerticalDivider/VerticalDivider.js";
|
|
32
|
+
import { FormCheckBox as lr } from "./components/FormComponents/FormCheckBox/FormCheckBox.js";
|
|
33
|
+
import { FormDatePicker as nr } from "./components/FormComponents/FormDatePicker/FormDatePicker.js";
|
|
34
|
+
import { FormNumber as Sr } from "./components/FormComponents/FormNumber/FormNumber.js";
|
|
35
|
+
import { FormRadio as Lr } from "./components/FormComponents/FormRadio/FormRadio.js";
|
|
36
|
+
import { FormSelect as Gr } from "./components/FormComponents/FormSelect/FormSelect.js";
|
|
37
|
+
import { FormSlider as _r } from "./components/FormComponents/FormSlider/FormSlider.js";
|
|
38
|
+
import { FormText as Fr } from "./components/FormComponents/FormText/FormText.js";
|
|
39
|
+
import { FormToggle as Dr } from "./components/FormComponents/FormToggle/FormToggle.js";
|
|
40
|
+
import { AvailableCustomIcons as gr } from "./enums/AvailableCustomIcons.js";
|
|
41
|
+
import { ThemeColor as Br } from "./enums/ThemeColor.js";
|
|
42
|
+
import { u as br } from "./useBreakpoints-MzTZ0tCT.js";
|
|
43
|
+
import { capitalizeFirstLetters as Ur, getNumberAsLocaleString as hr, trimLeadingAndTrailingSpaces as Mr } from "./services/UtilService.js";
|
|
44
|
+
import { AVAILABLE_COUNTRY_KEYS as Vr, AVAILABLE_LOCALES as Rr, ENGLISH_LANGUAGE_ID as kr, GERMAN_LANGUAGE_ID as wr, LANGUAGE_CODES_MAPPER as Or, LANGUAGE_ID_MAPPER as vr, SPANISH_LANGUAGE_ID as yr, TURKISH_LANGUAGE_ID as Yr } from "./types/Languages.js";
|
|
42
45
|
export {
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
Vr as AVAILABLE_COUNTRY_KEYS,
|
|
47
|
+
Rr as AVAILABLE_LOCALES,
|
|
45
48
|
t as AlertBanner,
|
|
46
|
-
|
|
49
|
+
gr as AvailableCustomIcons,
|
|
47
50
|
p as BaseView,
|
|
48
51
|
x as BasicHeading,
|
|
49
52
|
i as BlockView,
|
|
50
53
|
A as ChipCard,
|
|
51
54
|
c as ContextMenu,
|
|
52
55
|
d as DeleteModal,
|
|
53
|
-
|
|
56
|
+
E as DetailContentWrapper,
|
|
54
57
|
s as Disclaimer,
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
kr as ENGLISH_LANGUAGE_ID,
|
|
59
|
+
I as EmptyView,
|
|
57
60
|
N as Filter,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
lr as FormCheckBox,
|
|
62
|
+
nr as FormDatePicker,
|
|
63
|
+
Sr as FormNumber,
|
|
64
|
+
Lr as FormRadio,
|
|
65
|
+
Gr as FormSelect,
|
|
66
|
+
_r as FormSlider,
|
|
67
|
+
Fr as FormText,
|
|
68
|
+
Dr as FormToggle,
|
|
66
69
|
C as FormattedNumberDisplay,
|
|
67
|
-
|
|
70
|
+
wr as GERMAN_LANGUAGE_ID,
|
|
68
71
|
u as GenericTable,
|
|
69
72
|
T as HashTabView,
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
H as HeaderFilter,
|
|
74
|
+
h as HealthCheckFailed,
|
|
72
75
|
P as Iconify,
|
|
73
76
|
R as InfoGroup,
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
Or as LANGUAGE_CODES_MAPPER,
|
|
78
|
+
vr as LANGUAGE_ID_MAPPER,
|
|
76
79
|
w as ListArea,
|
|
77
80
|
v as LoadingSpinner,
|
|
78
81
|
Y as Modal,
|
|
79
82
|
z as ModulePadding,
|
|
80
83
|
X as OverflowTooltip,
|
|
81
|
-
|
|
84
|
+
yr as SPANISH_LANGUAGE_ID,
|
|
82
85
|
q as ScrollbarX,
|
|
83
86
|
J as ScrollbarY,
|
|
84
87
|
Z as SearchBar,
|
|
85
88
|
rr as Select,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
fr as Stepper,
|
|
90
|
+
er as StepperHeader,
|
|
91
|
+
mr as StepperIndicator,
|
|
92
|
+
Yr as TURKISH_LANGUAGE_ID,
|
|
93
|
+
Br as ThemeColor,
|
|
94
|
+
ar as VerticalDivider,
|
|
95
|
+
Ur as capitalizeFirstLetters,
|
|
96
|
+
hr as getNumberAsLocaleString,
|
|
97
|
+
Mr as trimLeadingAndTrailingSpaces,
|
|
98
|
+
br as useBreakpoints
|
|
93
99
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getBlockNumberByDto as r } from "./BlockService.js";
|
|
2
2
|
import { capitalizeFirstLetters as a, trimLeadingAndTrailingSpaces as o } from "./UtilService.js";
|
|
3
|
-
import { d as n, t as e, g as s } from "../vi.CjhMlMwf-
|
|
3
|
+
import { d as n, t as e, g as s } from "../vi.CjhMlMwf-CKxPQtd6.js";
|
|
4
4
|
n("Services Test", () => {
|
|
5
5
|
n("capitalizeFirstLetters", () => {
|
|
6
6
|
e("should capitalize first letters of a lower case string", () => {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './assets/stepper.css';const t = "_stepperIndicatorItem_78nle_1", e = "_stepperIndicatorItemActive_78nle_8", p = "_stepperIndicatorItemOptional_78nle_12", n = "_stepperContainer_78nle_16", r = "_stepperTitle_78nle_23", o = "_stepperButton_78nle_28", s = "_stepperButtonLoading_78nle_32", i = {
|
|
2
|
+
stepperIndicatorItem: t,
|
|
3
|
+
stepperIndicatorItemActive: e,
|
|
4
|
+
stepperIndicatorItemOptional: p,
|
|
5
|
+
stepperContainer: n,
|
|
6
|
+
stepperTitle: r,
|
|
7
|
+
stepperButton: o,
|
|
8
|
+
stepperButtonLoading: s
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
i as s
|
|
12
|
+
};
|
|
@@ -41,6 +41,11 @@ export type TableLayoutProps<T> = {
|
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
43
|
tableActions?: JSX.Element[];
|
|
44
|
+
/**
|
|
45
|
+
* position of the table actions, can be 'start' or 'end'
|
|
46
|
+
* @default 'end'
|
|
47
|
+
*/
|
|
48
|
+
tableActionPosition?: 'start' | 'end';
|
|
44
49
|
/**
|
|
45
50
|
* text to be displayed when no data is available
|
|
46
51
|
*/
|
|
@@ -99,6 +104,16 @@ export type TableLayoutProps<T> = {
|
|
|
99
104
|
* @default 'Rows per page'
|
|
100
105
|
*/
|
|
101
106
|
rowsPerPageTranslation?: string;
|
|
107
|
+
/**
|
|
108
|
+
* the elevation level of the table, used to set the shadow of the table
|
|
109
|
+
* @default 1
|
|
110
|
+
*/
|
|
111
|
+
tableElevationLevel?: number;
|
|
112
|
+
/**
|
|
113
|
+
* the layout of the table, can be 'standard' or 'flex'
|
|
114
|
+
* @default 'standard'
|
|
115
|
+
*/
|
|
116
|
+
tableLayout?: 'standard' | 'flex';
|
|
102
117
|
};
|
|
103
118
|
/**
|
|
104
119
|
* Props for the CellTemplate component {@link CellTemplate}
|
|
@@ -12183,10 +12183,10 @@ function wt(e) {
|
|
|
12183
12183
|
return Eu(n[r + 1])?.file || "";
|
|
12184
12184
|
}
|
|
12185
12185
|
export {
|
|
12186
|
-
|
|
12186
|
+
ny as a,
|
|
12187
12187
|
iy as b,
|
|
12188
12188
|
oy as d,
|
|
12189
12189
|
Mg as g,
|
|
12190
12190
|
sy as t,
|
|
12191
|
-
|
|
12191
|
+
Dn as v
|
|
12192
12192
|
};
|
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": "1.
|
|
4
|
+
"version": "1.12.0",
|
|
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>",
|