allaw-ui 1.0.180 → 1.0.182

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.
@@ -8,6 +8,7 @@ export interface ContactCardProps {
8
8
  onEdit?: () => void;
9
9
  onClick?: () => void;
10
10
  gender: "male" | "female";
11
+ onAddAppointment?: () => void;
11
12
  actionIconName?: string;
12
13
  clientLabel?: string;
13
14
  }
@@ -4,7 +4,7 @@ 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, _b = _a.actionIconName, actionIconName = _b === void 0 ? "allaw-icon-edit-2" : _b, clientLabel = _a.clientLabel;
7
+ var name = _a.name, status = _a.status, phone = _a.phone, email = _a.email, isEditable = _a.isEditable, onEdit = _a.onEdit, onClick = _a.onClick, onAddAppointment = _a.onAddAppointment, _b = _a.actionIconName, actionIconName = _b === void 0 ? "allaw-icon-edit-2" : _b, clientLabel = _a.clientLabel;
8
8
  var isPhoneEmpty = !phone || phone.trim() === "";
9
9
  var isEmailEmpty = !email || email.trim() === "";
10
10
  var displayClientLabel = clientLabel || "Client de l'\u00E9tude";
@@ -24,9 +24,12 @@ var ContactCard = function (_a) {
24
24
  React.createElement("div", { className: styles.infoItem },
25
25
  React.createElement("i", { className: "allaw-icon-mail ".concat(styles.infoIcon, " ").concat(isEmailEmpty ? styles.infoIconDisabled : "") }),
26
26
  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))))))),
27
- isEditable && (React.createElement("div", { className: styles.actionButtonContainer },
28
- React.createElement(IconButton, { style: "largeFilled", iconName: actionIconName, onClick: onEdit }))),
29
- onClick && (React.createElement("div", { className: styles.actionButtonContainer },
30
- React.createElement("i", { className: "allaw-icon-right ".concat(styles.infoIcon) })))));
27
+ React.createElement("div", { className: styles.actionsContainer },
28
+ onAddAppointment && (React.createElement("div", { className: styles.actionButtonContainer },
29
+ React.createElement(IconButton, { style: "largeFilled", iconName: "allaw-icon-calendar", onClick: onAddAppointment }))),
30
+ isEditable && (React.createElement("div", { className: styles.actionButtonContainer },
31
+ React.createElement(IconButton, { style: "largeFilled", iconName: actionIconName, onClick: onEdit }))),
32
+ onClick && (React.createElement("div", { className: styles.actionButtonContainer },
33
+ React.createElement("i", { className: "allaw-icon-right ".concat(styles.infoIcon) }))))));
31
34
  };
32
35
  export default ContactCard;
@@ -14,6 +14,14 @@
14
14
  border-radius: 16px;
15
15
  }
16
16
 
17
+ .actionsContainer {
18
+ display: flex;
19
+ flex-direction: row;
20
+ gap: 1rem;
21
+ align-items: center;
22
+ justify-content: end;
23
+ }
24
+
17
25
  .contentContainer {
18
26
  display: flex;
19
27
  flex-direction: row;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "1.0.180",
3
+ "version": "1.0.182",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",