allaw-ui 1.0.41 → 1.0.43
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.
|
@@ -14,7 +14,7 @@ import "../../../styles/global.css";
|
|
|
14
14
|
import TinyInfo from "../typography/TinyInfo";
|
|
15
15
|
function Select(_a, ref) {
|
|
16
16
|
var _b;
|
|
17
|
-
var items = _a.items, selectedItem = _a.selectedItem, _c = _a.placeholder, placeholder = _c === void 0 ? "
|
|
17
|
+
var items = _a.items, selectedItem = _a.selectedItem, _c = _a.placeholder, placeholder = _c === void 0 ? "Choisir..." : _c, _d = _a.multiple, multiple = _d === void 0 ? false : _d, _e = _a.isRequired, isRequired = _e === void 0 ? false : _e, _f = _a.showError, showError = _f === void 0 ? false : _f, _g = _a.width, width = _g === void 0 ? 100 : _g, onChange = _a.onChange, onError = _a.onError;
|
|
18
18
|
var _h = useState(false), isOpen = _h[0], setIsOpen = _h[1];
|
|
19
19
|
var _j = useState((multiple ? selectedItem || [] : selectedItem || "")), selected = _j[0], setSelected = _j[1];
|
|
20
20
|
var _k = useState(""), error = _k[0], setError = _k[1];
|
|
@@ -345,7 +345,7 @@
|
|
|
345
345
|
font-size: 24px;
|
|
346
346
|
font-style: normal;
|
|
347
347
|
font-weight: 600;
|
|
348
|
-
line-height:
|
|
348
|
+
line-height: 24px;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
.contact-card.editable .info-container {
|
|
@@ -372,6 +372,10 @@
|
|
|
372
372
|
align-items: center;
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
+
.contact-card.editable .info-icon-disabled {
|
|
376
|
+
color: var(--Tags-Mid-grey, #728ea7);
|
|
377
|
+
}
|
|
378
|
+
|
|
375
379
|
.contact-card.editable .info-text {
|
|
376
380
|
color: var(--Primary-Mid-black, #171e25);
|
|
377
381
|
font-family: "Open Sans";
|
|
@@ -381,8 +385,9 @@
|
|
|
381
385
|
line-height: normal;
|
|
382
386
|
}
|
|
383
387
|
|
|
384
|
-
.contact-card.editable .info-text.contact {
|
|
385
|
-
color: var(--
|
|
388
|
+
.contact-card.editable .info-text.contact.empty {
|
|
389
|
+
color: var(--Tags-Mid-grey, #728ea7);
|
|
390
|
+
font-style: italic;
|
|
386
391
|
}
|
|
387
392
|
|
|
388
393
|
.contact-card.editable .telephone-email-items {
|
|
@@ -428,3 +433,13 @@
|
|
|
428
433
|
height: 100%;
|
|
429
434
|
align-self: stretch;
|
|
430
435
|
}
|
|
436
|
+
|
|
437
|
+
.contact-card .empty-field {
|
|
438
|
+
color: var(--Tags-Mid-grey, #728ea7) !important;
|
|
439
|
+
font-style: italic;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.contact-card.large .empty-field {
|
|
443
|
+
color: var(--Tags-Mid-grey, #728ea7) !important;
|
|
444
|
+
font-style: italic;
|
|
445
|
+
}
|
|
@@ -6,6 +6,8 @@ import Image from "next/image";
|
|
|
6
6
|
var NoPhoto = "/assets/NoPhoto.png";
|
|
7
7
|
var ContactCard = function (_a) {
|
|
8
8
|
var size = _a.size, name = _a.name, birthDate = _a.birthDate, avatarUrl = _a.avatarUrl, status = _a.status, address = _a.address, phone = _a.phone, email = _a.email, onEdit = _a.onEdit, gender = _a.gender, _b = _a.actionIconName, actionIconName = _b === void 0 ? "allaw-icon-edit-2" : _b;
|
|
9
|
+
var isPhoneEmpty = !phone || phone.trim() === "";
|
|
10
|
+
var isEmailEmpty = !email || email.trim() === "";
|
|
9
11
|
var renderContent = function () {
|
|
10
12
|
switch (size) {
|
|
11
13
|
case "small":
|
|
@@ -48,9 +50,9 @@ var ContactCard = function (_a) {
|
|
|
48
50
|
React.createElement("div", { className: "contact-telephone-email-container" },
|
|
49
51
|
React.createElement("p", { className: "info-label" }, "CONTACT"),
|
|
50
52
|
React.createElement("p", { className: "info-value" },
|
|
51
|
-
React.createElement("span", { className: "contact-phone" }, phone)),
|
|
53
|
+
React.createElement("span", { className: "contact-phone ".concat(isPhoneEmpty ? "empty-field" : "") }, isPhoneEmpty ? "Non renseigné" : phone)),
|
|
52
54
|
React.createElement("p", { className: "info-value" },
|
|
53
|
-
React.createElement("span", { className: "contact-phone" }, email))))),
|
|
55
|
+
React.createElement("span", { className: "contact-phone ".concat(isEmailEmpty ? "empty-field" : "") }, isEmailEmpty ? "Non renseigné" : email))))),
|
|
54
56
|
React.createElement("div", { className: "status-container" },
|
|
55
57
|
React.createElement(OtherStatusTag, { label: status, type: "readonly" }))));
|
|
56
58
|
case "editable":
|
|
@@ -67,11 +69,11 @@ var ContactCard = function (_a) {
|
|
|
67
69
|
" de l'\u00E9tude")),
|
|
68
70
|
React.createElement("div", { className: "telephone-email-items" },
|
|
69
71
|
React.createElement("div", { className: "info-item" },
|
|
70
|
-
React.createElement("i", { className: "allaw-icon-phone info-icon" }),
|
|
71
|
-
React.createElement("span", { className: "info-text contact" }, phone)),
|
|
72
|
+
React.createElement("i", { className: "allaw-icon-phone info-icon ".concat(isPhoneEmpty ? "info-icon-disabled" : "") }),
|
|
73
|
+
React.createElement("span", { className: "info-text contact ".concat(isPhoneEmpty ? "empty-field" : "") }, isPhoneEmpty ? "Non renseigné" : phone)),
|
|
72
74
|
React.createElement("div", { className: "info-item" },
|
|
73
|
-
React.createElement("i", { className: "allaw-icon-mail info-icon" }),
|
|
74
|
-
React.createElement("span", { className: "info-text contact" }, email))))),
|
|
75
|
+
React.createElement("i", { className: "allaw-icon-mail info-icon ".concat(isEmailEmpty ? "info-icon-disabled" : "") }),
|
|
76
|
+
React.createElement("span", { className: "info-text contact ".concat(isEmailEmpty ? "empty-field" : "") }, isEmailEmpty ? "Non renseigné" : email))))),
|
|
75
77
|
React.createElement("div", { className: "action-button-container" },
|
|
76
78
|
React.createElement(IconButton, { style: "largeFilled", iconName: actionIconName, onClick: onEdit }))));
|
|
77
79
|
}
|