allaw-ui 1.0.10 → 1.0.12
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/dist/components/atoms/progressBars/ProgressBar.css +16 -2
- package/dist/components/atoms/progressBars/ProgressBar.d.ts +2 -0
- package/dist/components/atoms/progressBars/ProgressBar.js +2 -2
- package/dist/components/molecules/caseCard/CaseCard.css +8 -12
- package/dist/components/molecules/caseCard/CaseCard.d.ts +2 -1
- package/dist/components/molecules/caseCard/CaseCard.js +3 -3
- package/package.json +1 -1
|
@@ -68,10 +68,25 @@
|
|
|
68
68
|
.progress-bar-fill {
|
|
69
69
|
height: 8px;
|
|
70
70
|
border-radius: 8px;
|
|
71
|
-
background: var(--primary-blue, #25beeb);
|
|
72
71
|
transition: width 0.35s ease;
|
|
73
72
|
}
|
|
74
73
|
|
|
74
|
+
.progress-bar-fill-blue {
|
|
75
|
+
background: var(--primary-blue, #25beeb);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.progress-bar-fill-red {
|
|
79
|
+
background: var(--actions-error, #e15151);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.progress-bar-fill-green {
|
|
83
|
+
background: var(--actions-valid, #29a36a);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.progress-bar-fill-grey {
|
|
87
|
+
background: var(--mid-grey, #728ea7);
|
|
88
|
+
}
|
|
89
|
+
|
|
75
90
|
.progress-bar-close {
|
|
76
91
|
display: flex;
|
|
77
92
|
flex-direction: row;
|
|
@@ -79,7 +94,6 @@
|
|
|
79
94
|
align-items: center;
|
|
80
95
|
width: 32px;
|
|
81
96
|
height: 32px;
|
|
82
|
-
/* padding: 5px; */
|
|
83
97
|
padding-right: 2px;
|
|
84
98
|
flex-shrink: 0;
|
|
85
99
|
cursor: pointer;
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import "./ProgressBar.css";
|
|
3
3
|
import "../../../styles/global.css";
|
|
4
4
|
import "../../../styles/icons.css";
|
|
5
|
+
export type BarColor = "blue" | "red" | "green" | "grey";
|
|
5
6
|
export interface ProgressBarProps {
|
|
6
7
|
steps: number;
|
|
7
8
|
currentStep: number;
|
|
@@ -10,6 +11,7 @@ export interface ProgressBarProps {
|
|
|
10
11
|
onStartIconClick?: () => void;
|
|
11
12
|
onEndIconClick?: () => void;
|
|
12
13
|
showProgressBar?: boolean;
|
|
14
|
+
barColor?: BarColor;
|
|
13
15
|
}
|
|
14
16
|
declare const ProgressBar: React.FC<ProgressBarProps>;
|
|
15
17
|
export default ProgressBar;
|
|
@@ -3,7 +3,7 @@ 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;
|
|
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;
|
|
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" },
|
|
@@ -11,7 +11,7 @@ var ProgressBar = function (_a) {
|
|
|
11
11
|
React.createElement("button", { className: "progress-bar-chevron", onClick: onStartIconClick },
|
|
12
12
|
React.createElement("i", { className: "allaw-icon-chevron-left" })))) : null,
|
|
13
13
|
React.createElement("div", { className: "progress-bar-background ".concat(showProgressBar ? "" : "hidden-content") },
|
|
14
|
-
React.createElement("div", { className: "progress-bar-fill", style: { width: "".concat(progressWidth, "%") } })),
|
|
14
|
+
React.createElement("div", { className: "progress-bar-fill progress-bar-fill-".concat(barColor), style: { width: "".concat(progressWidth, "%") } })),
|
|
15
15
|
endIcon && (React.createElement("button", { className: "progress-bar-close", onClick: onEndIconClick },
|
|
16
16
|
React.createElement("i", { className: "allaw-icon-close" })))));
|
|
17
17
|
};
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
justify-content: space-between;
|
|
43
43
|
align-items: flex-start;
|
|
44
44
|
align-self: stretch;
|
|
45
|
-
width: 100
|
|
45
|
+
width: calc(100% - 100px);
|
|
46
|
+
overflow: hidden;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
.case-card-header {
|
|
@@ -50,6 +51,8 @@
|
|
|
50
51
|
flex-direction: column;
|
|
51
52
|
align-items: flex-start;
|
|
52
53
|
gap: 8px;
|
|
54
|
+
width: 100%;
|
|
55
|
+
overflow: hidden;
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
.case-card-client-name {
|
|
@@ -62,12 +65,11 @@
|
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
.case-card-title {
|
|
65
|
-
|
|
66
|
-
-webkit-line-clamp: 2;
|
|
67
|
-
-webkit-box-orient: vertical;
|
|
68
|
+
max-width: 100%;
|
|
68
69
|
overflow: hidden;
|
|
69
|
-
color: var(--dark-grey, #171e25);
|
|
70
70
|
text-overflow: ellipsis;
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
color: var(--dark-grey, #171e25);
|
|
71
73
|
font-family: Inter, sans-serif;
|
|
72
74
|
font-size: 17px;
|
|
73
75
|
font-weight: 600;
|
|
@@ -75,8 +77,6 @@
|
|
|
75
77
|
letter-spacing: 0.1px;
|
|
76
78
|
padding-top: 4px;
|
|
77
79
|
margin: 0;
|
|
78
|
-
word-break: break-word;
|
|
79
|
-
width: 100%;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
.case-card-title.closed {
|
|
@@ -90,11 +90,7 @@
|
|
|
90
90
|
justify-content: center;
|
|
91
91
|
height: 100%;
|
|
92
92
|
min-width: 100px;
|
|
93
|
-
|
|
94
|
-
flex-shrink: 0; */
|
|
95
|
-
/* gap: 8px; */
|
|
96
|
-
/* padding-top: 6px;
|
|
97
|
-
padding-left: 16px; */
|
|
93
|
+
flex-shrink: 0;
|
|
98
94
|
}
|
|
99
95
|
|
|
100
96
|
.case-card-next-appointment-label {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./CaseCard.css";
|
|
3
|
+
import { BarColor } from "../../atoms/progressBars/ProgressBar";
|
|
3
4
|
export interface CaseCardProps {
|
|
4
5
|
clientName: string;
|
|
5
6
|
title: string;
|
|
@@ -10,10 +11,10 @@ export interface CaseCardProps {
|
|
|
10
11
|
categories: string[];
|
|
11
12
|
variant: "desktop" | "mobile" | "archived";
|
|
12
13
|
categoryLabelLimit?: number;
|
|
13
|
-
isClosed?: boolean;
|
|
14
14
|
isDisabled?: boolean;
|
|
15
15
|
dateStyle?: "horizontal" | "hybride" | "vertical";
|
|
16
16
|
dateLabel?: string;
|
|
17
|
+
barColor?: BarColor;
|
|
17
18
|
}
|
|
18
19
|
declare const CaseCard: React.FC<CaseCardProps>;
|
|
19
20
|
export default CaseCard;
|
|
@@ -4,14 +4,14 @@ import OtherStatusTag from "../../atoms/tags/OtherStatusTag";
|
|
|
4
4
|
import CardDate from "../../atoms/typography/CardDate";
|
|
5
5
|
import ProgressBar from "../../atoms/progressBars/ProgressBar";
|
|
6
6
|
var CaseCard = function (_a) {
|
|
7
|
-
var clientName = _a.clientName, title = _a.title, nextAppointment = _a.nextAppointment, categories = _a.categories, variant = _a.variant, _b = _a.categoryLabelLimit, categoryLabelLimit = _b === void 0 ? 20 : _b, _c = _a.
|
|
7
|
+
var clientName = _a.clientName, title = _a.title, nextAppointment = _a.nextAppointment, categories = _a.categories, variant = _a.variant, _b = _a.categoryLabelLimit, categoryLabelLimit = _b === void 0 ? 20 : _b, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.dateStyle, dateStyle = _d === void 0 ? "hybride" : _d, dateLabel = _a.dateLabel, _e = _a.barColor, barColor = _e === void 0 ? "blue" : _e;
|
|
8
8
|
return (React.createElement("div", { className: "case-card-wrapper case-card-".concat(variant) },
|
|
9
9
|
React.createElement("div", { className: "case-card-content" },
|
|
10
10
|
React.createElement("div", { className: "case-card-header" },
|
|
11
|
-
React.createElement("h2", { className: "case-card-title ".concat(
|
|
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: 100, currentStep: 50 })),
|
|
14
|
+
React.createElement(ProgressBar, { startIcon: false, endIcon: false, steps: 100, currentStep: 50, 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: variant === "desktop", variant: dateStyle, label: dateLabel, isDisabled: isDisabled })))));
|