allaw-ui 1.0.8 → 1.0.9
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/typography/CardDate.d.ts +1 -0
- package/dist/components/atoms/typography/CardDate.js +13 -5
- package/dist/components/atoms/typography/cardDate.css +18 -0
- package/dist/components/molecules/caseCard/CaseCard.css +6 -2
- package/dist/components/molecules/caseCard/CaseCard.d.ts +1 -0
- package/dist/components/molecules/caseCard/CaseCard.js +3 -3
- package/package.json +1 -1
|
@@ -17,21 +17,29 @@ var MONTHS_FR = [
|
|
|
17
17
|
"déc.",
|
|
18
18
|
];
|
|
19
19
|
var CardDate = function (_a) {
|
|
20
|
-
var date = _a.date, _b = _a.showYear, showYear = _b === void 0 ? true : _b;
|
|
20
|
+
var date = _a.date, _b = _a.showYear, showYear = _b === void 0 ? true : _b, _c = _a.variant, variant = _c === void 0 ? "normal" : _c;
|
|
21
21
|
var parseDate = function (dateString) {
|
|
22
22
|
var d = new Date(dateString);
|
|
23
23
|
return {
|
|
24
24
|
weekDay: DAYS_FR[d.getDay()],
|
|
25
25
|
day: d.getDate(),
|
|
26
26
|
month: MONTHS_FR[d.getMonth()],
|
|
27
|
-
|
|
27
|
+
yearFull: d.getFullYear(),
|
|
28
|
+
yearShort: d.getFullYear().toString().slice(-2),
|
|
28
29
|
};
|
|
29
30
|
};
|
|
30
|
-
var
|
|
31
|
-
return (React.createElement("div", { className: "card-date" },
|
|
31
|
+
var _d = parseDate(date), weekDay = _d.weekDay, day = _d.day, month = _d.month, yearFull = _d.yearFull, yearShort = _d.yearShort;
|
|
32
|
+
return (React.createElement(React.Fragment, null, variant === "small" ? (React.createElement("div", { className: "card-date" },
|
|
33
|
+
React.createElement("span", { className: "card-date-closed-at" }, "Cl\u00F4tur\u00E9 le"),
|
|
34
|
+
React.createElement("span", { className: "card-date-small" },
|
|
35
|
+
day,
|
|
36
|
+
" ",
|
|
37
|
+
month,
|
|
38
|
+
" ",
|
|
39
|
+
yearShort))) : (React.createElement("div", { className: "card-date" },
|
|
32
40
|
React.createElement("span", { className: "card-date-weekday" }, weekDay),
|
|
33
41
|
React.createElement("span", { className: "card-date-day" }, day),
|
|
34
42
|
React.createElement("span", { className: "card-date-month" }, month),
|
|
35
|
-
showYear && React.createElement("span", { className: "card-date-year" },
|
|
43
|
+
showYear && React.createElement("span", { className: "card-date-year" }, yearFull)))));
|
|
36
44
|
};
|
|
37
45
|
export default CardDate;
|
|
@@ -36,3 +36,21 @@
|
|
|
36
36
|
font-family: "Inter", sans-serif;
|
|
37
37
|
font-size: 12px;
|
|
38
38
|
}
|
|
39
|
+
|
|
40
|
+
.card-date-closed-at {
|
|
41
|
+
color: var(--mid-grey, #728ea7);
|
|
42
|
+
font-family: "Inter", sans-serif;
|
|
43
|
+
font-size: 14px;
|
|
44
|
+
text-transform: lowercase;
|
|
45
|
+
line-height: 1;
|
|
46
|
+
padding-bottom: 5px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.card-date-small {
|
|
50
|
+
color: var(--mid-grey, #728ea7);
|
|
51
|
+
font-family: "Inter", sans-serif;
|
|
52
|
+
font-size: 14px;
|
|
53
|
+
font-weight: 400;
|
|
54
|
+
line-height: 0.7;
|
|
55
|
+
padding-bottom: 3px;
|
|
56
|
+
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
.case-card-wrapper:active {
|
|
29
29
|
transform: scale(1.01);
|
|
30
|
-
background-color: var(--grey-light);
|
|
30
|
+
background-color: var(--grey-light), #f6fcfe;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.case-card-wrapper.case-card-mobile,
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
-webkit-line-clamp: 2;
|
|
65
65
|
-webkit-box-orient: vertical;
|
|
66
66
|
overflow: hidden;
|
|
67
|
-
color: var(--
|
|
67
|
+
color: var(--dark-grey, #171e25);
|
|
68
68
|
text-overflow: ellipsis;
|
|
69
69
|
font-family: Inter, sans-serif;
|
|
70
70
|
font-size: 17px;
|
|
@@ -77,6 +77,10 @@
|
|
|
77
77
|
width: 100%;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
.case-card-title.closed {
|
|
81
|
+
color: var(--mid-grey, #728ea7);
|
|
82
|
+
}
|
|
83
|
+
|
|
80
84
|
.case-card-next-appointment {
|
|
81
85
|
display: flex;
|
|
82
86
|
flex-direction: column;
|
|
@@ -3,14 +3,14 @@ import "./CaseCard.css";
|
|
|
3
3
|
import OtherStatusTag from "../../atoms/tags/OtherStatusTag";
|
|
4
4
|
import CardDate from "../../atoms/typography/CardDate";
|
|
5
5
|
var CaseCard = function (_a) {
|
|
6
|
-
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;
|
|
6
|
+
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.isClosed, isClosed = _c === void 0 ? false : _c;
|
|
7
7
|
return (React.createElement("div", { className: "case-card-wrapper case-card-".concat(variant) },
|
|
8
8
|
React.createElement("div", { className: "case-card-content" },
|
|
9
9
|
React.createElement("div", { className: "case-card-header" },
|
|
10
|
-
React.createElement("h2", { className: "case-card-title", title: title }, title),
|
|
10
|
+
React.createElement("h2", { className: "case-card-title ".concat(isClosed ? "closed" : ""), title: title }, title),
|
|
11
11
|
React.createElement("span", { className: "case-card-client-name" }, clientName)),
|
|
12
12
|
React.createElement("div", { className: "case-card-categories" }, categories.map(function (category, index) { return (React.createElement(OtherStatusTag, { key: index, label: category, type: "readonly", labelLimit: categoryLabelLimit })); }))),
|
|
13
13
|
nextAppointment && variant !== "archived" && (React.createElement("div", { className: "case-card-next-appointment" },
|
|
14
|
-
React.createElement(CardDate, { date: nextAppointment.date, showYear: variant === "desktop" })))));
|
|
14
|
+
React.createElement(CardDate, { date: nextAppointment.date, showYear: variant === "desktop", variant: isClosed ? "small" : "normal" })))));
|
|
15
15
|
};
|
|
16
16
|
export default CaseCard;
|