allaw-ui 1.0.174 → 1.0.176
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/molecules/contactCard/{contactCard.module.css → ContactCard.css} +17 -17
- package/dist/components/molecules/contactCard/ContactCard.d.ts +1 -1
- package/dist/components/molecules/contactCard/ContactCard.js +12 -12
- package/dist/components/molecules/contactCard/ContactCard.stories.d.ts +0 -9
- package/dist/components/molecules/contactCard/ContactCard.stories.js +0 -9
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@import "../../../styles/colors.css";
|
|
2
2
|
|
|
3
|
-
.
|
|
3
|
+
.contact-card {
|
|
4
4
|
font-family: "Open Sans", sans-serif;
|
|
5
5
|
border-radius: 16px;
|
|
6
6
|
border: 1px solid var(--venom-grey, #e6edf5);
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
background: var(--Primary-Blanc, #fff);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.
|
|
19
|
+
.content-container {
|
|
20
20
|
display: flex;
|
|
21
21
|
flex-direction: row;
|
|
22
22
|
align-items: center;
|
|
23
23
|
gap: 24px;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
.name-tag-container {
|
|
27
27
|
display: flex;
|
|
28
28
|
flex-direction: column;
|
|
29
29
|
justify-content: center;
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
padding-left: 2px;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.
|
|
35
|
+
.contact-name {
|
|
36
36
|
color: var(--Primary-Mid-black, #171e25);
|
|
37
37
|
font-family: Poppins;
|
|
38
38
|
font-size: 24px;
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
line-height: 24px;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
.
|
|
44
|
+
.info-container {
|
|
45
45
|
display: flex;
|
|
46
46
|
flex-direction: column;
|
|
47
47
|
align-items: flex-start;
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
padding-left: 6px;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.
|
|
52
|
+
.info-item {
|
|
53
53
|
display: flex;
|
|
54
54
|
align-items: center;
|
|
55
55
|
gap: 8px;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.
|
|
58
|
+
.info-icon {
|
|
59
59
|
width: 24px;
|
|
60
60
|
height: 24px;
|
|
61
61
|
color: #25beeb;
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
align-items: center;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
.
|
|
68
|
+
.info-icon-disabled {
|
|
69
69
|
color: var(--Tags-Mid-grey, #728ea7);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
.
|
|
72
|
+
.info-text {
|
|
73
73
|
color: var(--Primary-Mid-black, #171e25);
|
|
74
74
|
font-family: "Open Sans";
|
|
75
75
|
font-size: 16px;
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
line-height: normal;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
.
|
|
81
|
+
.info-text.contact.empty-field {
|
|
82
82
|
color: var(--Tags-Mid-grey, #728ea7);
|
|
83
83
|
font-style: italic;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
.
|
|
86
|
+
.telephone-email-items {
|
|
87
87
|
display: flex;
|
|
88
88
|
flex-direction: row;
|
|
89
89
|
justify-content: center;
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
@media (max-width: 800px) {
|
|
95
|
-
.
|
|
95
|
+
.telephone-email-items {
|
|
96
96
|
flex-direction: column;
|
|
97
97
|
align-items: flex-start;
|
|
98
98
|
gap: 10px;
|
|
@@ -100,16 +100,16 @@
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
@media (max-width: 600px) {
|
|
103
|
-
.
|
|
103
|
+
.content-container {
|
|
104
104
|
flex-direction: column;
|
|
105
105
|
}
|
|
106
|
-
.
|
|
106
|
+
.name-tag-container {
|
|
107
107
|
align-items: flex-start;
|
|
108
108
|
width: 100%;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
.
|
|
112
|
+
.action-button-container {
|
|
113
113
|
display: flex;
|
|
114
114
|
flex-direction: column;
|
|
115
115
|
justify-content: center;
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
@media (max-width: 450px) {
|
|
122
|
-
.
|
|
122
|
+
.action-button-container {
|
|
123
123
|
display: block;
|
|
124
124
|
position: absolute;
|
|
125
125
|
top: 24px;
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
.
|
|
131
|
+
.empty-field {
|
|
132
132
|
color: var(--Tags-Mid-grey, #728ea7) !important;
|
|
133
133
|
font-style: italic;
|
|
134
134
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import "./ContactCard.css";
|
|
2
3
|
export interface ContactCardProps {
|
|
3
4
|
name: string;
|
|
4
5
|
status: string;
|
|
@@ -9,7 +10,6 @@ export interface ContactCardProps {
|
|
|
9
10
|
onClick?: () => void;
|
|
10
11
|
gender: "male" | "female";
|
|
11
12
|
actionIconName?: string;
|
|
12
|
-
clientLabel?: string;
|
|
13
13
|
}
|
|
14
14
|
declare const ContactCard: React.FC<ContactCardProps>;
|
|
15
15
|
export default ContactCard;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
2
|
+
import "./ContactCard.css";
|
|
3
3
|
import OtherStatusTag from "../../atoms/tags/OtherStatusTag";
|
|
4
4
|
import IconButton from "../../atoms/buttons/IconButton";
|
|
5
5
|
import Link from "next/link";
|
|
6
6
|
var ContactCard = function (_a) {
|
|
7
|
-
var name = _a.name, status = _a.status, phone = _a.phone, email = _a.email, isEditable = _a.isEditable, onEdit = _a.onEdit, onClick = _a.onClick, gender = _a.gender, _b = _a.actionIconName, actionIconName = _b === void 0 ? "allaw-icon-edit-2" : _b
|
|
7
|
+
var name = _a.name, status = _a.status, phone = _a.phone, email = _a.email, isEditable = _a.isEditable, onEdit = _a.onEdit, onClick = _a.onClick, gender = _a.gender, _b = _a.actionIconName, actionIconName = _b === void 0 ? "allaw-icon-edit-2" : _b;
|
|
8
8
|
var isPhoneEmpty = !phone || phone.trim() === "";
|
|
9
9
|
var isEmailEmpty = !email || email.trim() === "";
|
|
10
|
-
var defaultClientLabel = gender === "male" ? "Client" : "Cliente";
|
|
11
|
-
var displayClientLabel = clientLabel || "".concat(defaultClientLabel, " de l'\u00E9tude");
|
|
12
10
|
return (React.createElement("div", { className: "contact-card", onClick: function () { return onClick && onClick(); }, style: { cursor: "pointer" } },
|
|
13
11
|
React.createElement("div", { className: "content-container" },
|
|
14
12
|
React.createElement("div", { className: "name-tag-container" },
|
|
15
13
|
React.createElement("h3", { className: "contact-name" }, name),
|
|
16
14
|
React.createElement(OtherStatusTag, { label: status, type: "readonly" })),
|
|
17
|
-
React.createElement("div", { className:
|
|
18
|
-
React.createElement("div", { className:
|
|
19
|
-
React.createElement("i", { className: "allaw-icon-user "
|
|
20
|
-
React.createElement("span", { className:
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
React.createElement("div", { className: "info-container" },
|
|
16
|
+
React.createElement("div", { className: "info-item" },
|
|
17
|
+
React.createElement("i", { className: "allaw-icon-user info-icon" }),
|
|
18
|
+
React.createElement("span", { className: "info-text" },
|
|
19
|
+
gender === "male" ? "Client" : "Cliente",
|
|
20
|
+
" de l'\u00E9tude")),
|
|
21
|
+
React.createElement("div", { className: "telephone-email-items" },
|
|
22
|
+
React.createElement("div", { className: "info-item" },
|
|
23
23
|
React.createElement("i", { className: "allaw-icon-phone info-icon ".concat(isPhoneEmpty ? "info-icon-disabled" : "") }),
|
|
24
24
|
React.createElement("span", { className: "info-text contact ".concat(isPhoneEmpty ? "empty-field" : "") }, isPhoneEmpty ? ("Non renseigné") : (React.createElement(Link, { style: { color: "#171E25", textDecoration: "underline" }, href: "tel:".concat(phone) }, phone)))),
|
|
25
|
-
React.createElement("div", { className:
|
|
25
|
+
React.createElement("div", { className: "info-item" },
|
|
26
26
|
React.createElement("i", { className: "allaw-icon-mail info-icon ".concat(isEmailEmpty ? "info-icon-disabled" : "") }),
|
|
27
27
|
React.createElement("span", { className: "info-text contact ".concat(isEmailEmpty ? "empty-field" : "") }, isEmailEmpty ? ("Non renseigné") : (React.createElement(Link, { style: { color: "#171E25", textDecoration: "underline" }, href: "mailTo:".concat(email) }, email))))))),
|
|
28
|
-
isEditable && (React.createElement("div", { className:
|
|
28
|
+
isEditable && (React.createElement("div", { className: "action-button-container" },
|
|
29
29
|
React.createElement(IconButton, { style: "largeFilled", iconName: actionIconName, onClick: onEdit }))),
|
|
30
30
|
onClick && (React.createElement("div", { className: "action-button-container" },
|
|
31
31
|
React.createElement("i", { className: "allaw-icon-arrow-right" })))));
|
|
@@ -37,12 +37,6 @@ declare namespace _default {
|
|
|
37
37
|
export { control_6 as control };
|
|
38
38
|
export let description: string;
|
|
39
39
|
}
|
|
40
|
-
namespace clientLabel {
|
|
41
|
-
let control_7: string;
|
|
42
|
-
export { control_7 as control };
|
|
43
|
-
let description_1: string;
|
|
44
|
-
export { description_1 as description };
|
|
45
|
-
}
|
|
46
40
|
}
|
|
47
41
|
export namespace args {
|
|
48
42
|
let name_1: string;
|
|
@@ -59,8 +53,6 @@ declare namespace _default {
|
|
|
59
53
|
export { gender_1 as gender };
|
|
60
54
|
let actionIconName_1: string;
|
|
61
55
|
export { actionIconName_1 as actionIconName };
|
|
62
|
-
let clientLabel_1: string;
|
|
63
|
-
export { clientLabel_1 as clientLabel };
|
|
64
56
|
}
|
|
65
57
|
export namespace parameters {
|
|
66
58
|
namespace backgrounds {
|
|
@@ -79,5 +71,4 @@ export const Editable: any;
|
|
|
79
71
|
export const WithCustomIcon: any;
|
|
80
72
|
export const EmptyFields: any;
|
|
81
73
|
export const PartiallyEmpty: any;
|
|
82
|
-
export const CustomClientLabel: any;
|
|
83
74
|
import ContactCard from "./ContactCard";
|
|
@@ -33,10 +33,6 @@ export default {
|
|
|
33
33
|
control: "text",
|
|
34
34
|
description: "Nom de l'icône pour le bouton d'action",
|
|
35
35
|
},
|
|
36
|
-
clientLabel: {
|
|
37
|
-
control: "text",
|
|
38
|
-
description: "Texte personnalisé pour 'Client/Cliente de l'étude'",
|
|
39
|
-
},
|
|
40
36
|
},
|
|
41
37
|
args: {
|
|
42
38
|
name: "Jane DOE",
|
|
@@ -46,7 +42,6 @@ export default {
|
|
|
46
42
|
isEditable: false,
|
|
47
43
|
gender: "female",
|
|
48
44
|
actionIconName: "allaw-icon-edit-2",
|
|
49
|
-
clientLabel: "", // Valeur par défaut vide
|
|
50
45
|
},
|
|
51
46
|
parameters: {
|
|
52
47
|
backgrounds: {
|
|
@@ -80,7 +75,3 @@ PartiallyEmpty.args = {
|
|
|
80
75
|
phone: "06 12 34 56 78",
|
|
81
76
|
email: "",
|
|
82
77
|
};
|
|
83
|
-
export var CustomClientLabel = Template.bind({});
|
|
84
|
-
CustomClientLabel.args = {
|
|
85
|
-
clientLabel: "Utilisateur professionnel",
|
|
86
|
-
};
|