allaw-ui 1.0.52 → 1.0.54
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.
|
@@ -3,14 +3,17 @@ import "./ProgressBar.css";
|
|
|
3
3
|
import "../../../styles/global.css";
|
|
4
4
|
import "../../../styles/icons.css";
|
|
5
5
|
var ProgressBar = function (_a) {
|
|
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, _e = _a.barColor, barColor = _e === void 0 ? "blue" : _e;
|
|
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, _e = _a.barColor, barColor = _e === void 0 ? "blue" : _e, _f = _a.isWrapperProgressBar, isWrapperProgressBar = _f === void 0 ? true : _f;
|
|
7
7
|
var constrainedCurrentStep = Math.max(0, Math.min(currentStep, steps));
|
|
8
8
|
var progressWidth = constrainedCurrentStep === 0 ? 0 : (constrainedCurrentStep / steps) * 100;
|
|
9
9
|
return (React.createElement("div", { className: "progress-bar-container" },
|
|
10
|
-
|
|
11
|
-
React.createElement("
|
|
12
|
-
|
|
13
|
-
React.createElement("
|
|
10
|
+
isWrapperProgressBar ?
|
|
11
|
+
React.createElement("div", { className: "progress-bar-icon-container" }, startIcon && currentStep > 1 ? (React.createElement("button", { className: "progress-bar-chevron", onClick: onStartIconClick },
|
|
12
|
+
React.createElement("i", { className: "allaw-icon-chevron-left" }))) : null) : React.createElement(React.Fragment, null, startIcon && currentStep > 1 ? (React.createElement("div", { className: "progress-bar-icon-container" },
|
|
13
|
+
React.createElement("button", { className: "progress-bar-chevron", onClick: onStartIconClick },
|
|
14
|
+
React.createElement("i", { className: "allaw-icon-chevron-left" })))) : null),
|
|
15
|
+
React.createElement("div", { className: "progress-bar-background ".concat(showProgressBar ? "" : "hidden-content"), style: { height: isWrapperProgressBar ? "6px" : "8px" } },
|
|
16
|
+
React.createElement("div", { className: "progress-bar-fill progress-bar-fill-".concat(barColor), style: { width: "".concat(progressWidth, "%"), height: isWrapperProgressBar ? "6px" : "8px" } })),
|
|
14
17
|
endIcon && (React.createElement("button", { className: "progress-bar-close", onClick: onEndIconClick },
|
|
15
18
|
React.createElement("i", { className: "allaw-icon-close" })))));
|
|
16
19
|
};
|
|
@@ -11,7 +11,7 @@ var CaseCard = function (_a) {
|
|
|
11
11
|
React.createElement("h2", { className: "case-card-title ".concat(isDisabled ? "closed" : ""), title: title }, title),
|
|
12
12
|
React.createElement("span", { className: "case-card-client-name" }, clientName)),
|
|
13
13
|
React.createElement("div", { className: "case-card-progress-bar" },
|
|
14
|
-
React.createElement(ProgressBar, { startIcon: false, endIcon: false, steps: steps, currentStep: currentStep, barColor: barColor })),
|
|
14
|
+
React.createElement(ProgressBar, { startIcon: false, endIcon: false, steps: steps, isWrapperProgressBar: false, currentStep: currentStep, barColor: barColor })),
|
|
15
15
|
React.createElement("div", { className: "case-card-categories" }, categories.map(function (category, index) { return (React.createElement(OtherStatusTag, { key: index, label: category, type: "readonly", labelLimit: categoryLabelLimit })); }))),
|
|
16
16
|
nextAppointment && variant !== "archived" && (React.createElement("div", { className: "case-card-next-appointment" },
|
|
17
17
|
React.createElement(CardDate, { date: nextAppointment.date, showYear: showYear, variant: dateStyle, label: dateLabel, isDisabled: isDisabled })))));
|