allaw-ui 3.8.5 → 3.8.7

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.
@@ -90,7 +90,7 @@
90
90
  text-overflow: ellipsis;
91
91
  white-space: nowrap;
92
92
  color: var(--noir, #171e25);
93
- font-family: "Popins", sans-serif;
93
+ font-family: "Open Sans";
94
94
  font-size: 18px;
95
95
  font-weight: 600;
96
96
  line-height: 1.2;
@@ -12,6 +12,7 @@ export interface ContactCardProps {
12
12
  actionIconName?: string;
13
13
  clientOfStudy?: boolean;
14
14
  officeName?: "du cabinet" | "de l'étude";
15
+ birthDate?: Date;
15
16
  }
16
17
  declare const ContactCard: React.FC<ContactCardProps>;
17
18
  export default ContactCard;
@@ -3,14 +3,14 @@ import styles from "./contactCard.module.css";
3
3
  import OtherStatusTag from "../../atoms/tags/OtherStatusTag";
4
4
  import Link from "next/link";
5
5
  var ContactCard = function (_a) {
6
- var name = _a.name, status = _a.status, phone = _a.phone, email = _a.email, onClick = _a.onClick, actionsButton = _a.actionsButton, _b = _a.clientOfStudy, clientOfStudy = _b === void 0 ? false : _b, _c = _a.officeName, officeName = _c === void 0 ? "du cabinet" : _c;
6
+ var name = _a.name, status = _a.status, phone = _a.phone, email = _a.email, onClick = _a.onClick, birthDate = _a.birthDate, actionsButton = _a.actionsButton, _b = _a.clientOfStudy, clientOfStudy = _b === void 0 ? false : _b, _c = _a.officeName, officeName = _c === void 0 ? "du cabinet" : _c;
7
7
  var isPhoneEmpty = !phone || phone.trim() === "";
8
8
  var isEmailEmpty = !email || email.trim() === "";
9
9
  var displayClientLabel = clientOfStudy ? "Client ".concat(officeName) : "Non client";
10
10
  return (React.createElement("div", { className: styles.contactCard, onClick: function () { return onClick && onClick(); }, style: { cursor: onClick ? "pointer" : "default" } },
11
11
  React.createElement("div", { className: styles.contentContainer },
12
12
  React.createElement("div", { className: styles.nameTagContainer },
13
- React.createElement("h3", { className: styles.contactName }, name),
13
+ React.createElement("h3", { className: styles.contactName }, name === null || name === void 0 ? void 0 : name.toLowerCase()),
14
14
  React.createElement(OtherStatusTag, { label: status, type: "readonly" })),
15
15
  React.createElement("div", { className: styles.infoContainer },
16
16
  React.createElement("div", { className: styles.infoItem },
@@ -22,7 +22,12 @@ var ContactCard = function (_a) {
22
22
  React.createElement("span", { className: "".concat(styles.infoText, " ").concat(styles.contact, " ").concat(isPhoneEmpty ? styles.emptyField : "") }, isPhoneEmpty ? ("Non renseigné") : (React.createElement(Link, { style: { color: "#171E25", textDecoration: "underline" }, href: "tel:".concat(phone) }, phone)))),
23
23
  React.createElement("div", { className: styles.infoItem },
24
24
  React.createElement("i", { className: "allaw-icon-mail ".concat(styles.infoIcon, " ").concat(isEmailEmpty ? styles.infoIconDisabled : "") }),
25
- React.createElement("span", { className: "".concat(styles.infoText, " ").concat(styles.contact, " ").concat(isEmailEmpty ? styles.emptyField : "") }, isEmailEmpty ? ("Non renseigné") : (React.createElement(Link, { style: { color: "#171E25", textDecoration: "underline" }, href: "mailTo:".concat(email) }, email))))))),
25
+ React.createElement("span", { className: "".concat(styles.infoText, " ").concat(styles.contact, " ").concat(isEmailEmpty ? styles.emptyField : "") }, isEmailEmpty ? ("Non renseigné") : (React.createElement(Link, { style: { color: "#171E25", textDecoration: "underline" }, href: "mailTo:".concat(email) }, email)))),
26
+ birthDate &&
27
+ React.createElement("div", { className: styles.infoItem },
28
+ React.createElement("i", { className: "allaw-icon-user ".concat(styles.infoIcon) }),
29
+ React.createElement("span", { className: "".concat(styles.infoText, " ").concat(styles.contact, " ").concat(isEmailEmpty ? styles.emptyField : "") },
30
+ React.createElement("p", { style: { color: "#171E25" } }, new Date(birthDate).toLocaleDateString())))))),
26
31
  React.createElement("div", { className: styles.actionsContainer },
27
32
  actionsButton ? actionsButton : null,
28
33
  onClick && (React.createElement("div", { className: styles.actionButtonContainer },
@@ -65,4 +65,5 @@ export const WithCustomIcon: any;
65
65
  export const EmptyFields: any;
66
66
  export const PartiallyEmpty: any;
67
67
  export const CustomClientLabel: any;
68
+ export const WithBirthDate: any;
68
69
  import ContactCard from "./ContactCard";
@@ -78,3 +78,7 @@ export var CustomClientLabel = Template.bind({});
78
78
  CustomClientLabel.args = {
79
79
  clientLabel: "Utilisateur professionnel",
80
80
  };
81
+ export var WithBirthDate = Template.bind({});
82
+ WithBirthDate.args = {
83
+ birthDate: new Date("1990-05-15"),
84
+ };
@@ -45,6 +45,7 @@
45
45
  font-style: normal;
46
46
  font-weight: 600;
47
47
  line-height: 24px;
48
+ text-transform: capitalize;
48
49
  }
49
50
 
50
51
  .infoContainer {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "3.8.5",
3
+ "version": "3.8.7",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",