allaw-ui 0.1.29 → 0.1.31
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.
|
@@ -4,8 +4,8 @@ import "../../../styles/global.css";
|
|
|
4
4
|
import "../../../styles/icons.css";
|
|
5
5
|
var ProgressBar = function (_a) {
|
|
6
6
|
var steps = _a.steps, currentStep = _a.currentStep, _b = _a.startIcon, startIcon = _b === void 0 ? true : _b, _c = _a.endIcon, endIcon = _c === void 0 ? true : _c, onStartIconClick = _a.onStartIconClick, onEndIconClick = _a.onEndIconClick, _d = _a.showProgressBar, showProgressBar = _d === void 0 ? true : _d;
|
|
7
|
-
var constrainedCurrentStep = Math.max(
|
|
8
|
-
var progressWidth =
|
|
7
|
+
var constrainedCurrentStep = Math.max(0, Math.min(currentStep, steps));
|
|
8
|
+
var progressWidth = constrainedCurrentStep === 0 ? 0 : (constrainedCurrentStep / steps) * 100;
|
|
9
9
|
return (React.createElement("div", { className: "progress-bar-container" },
|
|
10
10
|
startIcon && currentStep > 1 && (React.createElement("div", { className: "progress-bar-icon-container" },
|
|
11
11
|
React.createElement("button", { className: "progress-bar-chevron", onClick: onStartIconClick },
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
cursor: pointer;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
.select:hover {
|
|
17
|
+
background: var(--grey-venom, #e6edf5);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.select:focus {
|
|
21
|
+
background: var(--grey-venom, #e6edf5);
|
|
22
|
+
}
|
|
23
|
+
|
|
16
24
|
.select-text {
|
|
17
25
|
color: var(--Primary-Mid-black, var(--primary-black, #171e25));
|
|
18
26
|
font-family: "Open Sans";
|
|
@@ -54,6 +62,8 @@
|
|
|
54
62
|
top: 100%;
|
|
55
63
|
left: 0;
|
|
56
64
|
z-index: 1000;
|
|
65
|
+
border: 1px solid var(--grey-venom, #e6edf5);
|
|
66
|
+
box-shadow: 0px 4px 8px 0px rgba(9, 30, 66, 0.15);
|
|
57
67
|
}
|
|
58
68
|
|
|
59
69
|
.select-pressed .select-list {
|
|
@@ -11,7 +11,10 @@ export interface StepperProps {
|
|
|
11
11
|
secondaryButton?: {
|
|
12
12
|
show: boolean;
|
|
13
13
|
label: string;
|
|
14
|
-
|
|
14
|
+
startIcon?: React.ReactNode;
|
|
15
|
+
endIcon?: React.ReactNode;
|
|
16
|
+
startIconName?: string;
|
|
17
|
+
endIconName?: string;
|
|
15
18
|
onSecondaryButtonClick?: (step: number) => void;
|
|
16
19
|
}[];
|
|
17
20
|
primaryButton?: {
|
|
@@ -113,7 +113,7 @@ var Stepper = function (_a) {
|
|
|
113
113
|
React.createElement("div", { className: "stepper-content" }, children[step - 1]),
|
|
114
114
|
React.createElement("div", { className: "stepper-buttons ".concat(!(currentSecondaryButton === null || currentSecondaryButton === void 0 ? void 0 : currentSecondaryButton.show) && !(currentPrimaryButton === null || currentPrimaryButton === void 0 ? void 0 : currentPrimaryButton.show) ? "no-buttons" : "") },
|
|
115
115
|
(currentSecondaryButton === null || currentSecondaryButton === void 0 ? void 0 : currentSecondaryButton.show) && (React.createElement("div", { className: "stepper-button-container secondary-button-container" },
|
|
116
|
-
React.createElement(SecondaryButton, { label: currentSecondaryButton.label, startIcon: currentSecondaryButton.
|
|
116
|
+
React.createElement(SecondaryButton, { label: currentSecondaryButton.label, startIcon: currentSecondaryButton.startIconName ? true : undefined, endIcon: currentSecondaryButton.endIconName ? true : undefined, startIconName: currentSecondaryButton.startIconName, endIconName: currentSecondaryButton.endIconName, onClick: function () { var _a; return (_a = currentSecondaryButton.onSecondaryButtonClick) === null || _a === void 0 ? void 0 : _a.call(currentSecondaryButton, step); } }))),
|
|
117
117
|
(currentPrimaryButton === null || currentPrimaryButton === void 0 ? void 0 : currentPrimaryButton.show) && (React.createElement("div", { className: "stepper-button-container primary-button-container" },
|
|
118
118
|
React.createElement(PrimaryButton, { label: currentPrimaryButton.label, startIcon: currentPrimaryButton.startIconName ? true : undefined, endIcon: currentPrimaryButton.endIconName ? true : undefined, startIconName: currentPrimaryButton.startIconName, endIconName: currentPrimaryButton.endIconName, onClick: handleNext })))))));
|
|
119
119
|
return portalContainerRef.current && isVisible
|