allaw-ui 3.8.6 → 3.8.8
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.d.ts +1 -0
- package/dist/components/molecules/contactCard/ContactCard.js +8 -3
- package/dist/components/molecules/contactCard/ContactCard.stories.d.ts +1 -0
- package/dist/components/molecules/contactCard/ContactCard.stories.js +4 -0
- package/dist/components/molecules/contactCard/contactCard.module.css +1 -0
- package/dist/components/molecules/stepper/Stepper.d.ts +1 -0
- package/dist/components/molecules/stepper/Stepper.js +3 -3
- package/dist/components/molecules/stepper/Stepper.stories.d.ts +10 -0
- package/dist/components/molecules/stepper/Stepper.stories.js +9 -0
- package/package.json +1 -1
|
@@ -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 },
|
|
@@ -46,8 +46,8 @@ import SecondaryButton from "../../atoms/buttons/SecondaryButton";
|
|
|
46
46
|
import ConfirmationModal from "./ConfirmationModal";
|
|
47
47
|
var Stepper = function (_a) {
|
|
48
48
|
var _b, _c, _d, _e, _f;
|
|
49
|
-
var steps = _a.steps, currentStep = _a.currentStep, _g = _a.startIcon, startIcon = _g === void 0 ? [] : _g, _h = _a.endIcon, endIcon = _h === void 0 ? true : _h, children = _a.children, _j = _a.secondaryButton, secondaryButton = _j === void 0 ? [] : _j, _k = _a.primaryButton, primaryButton = _k === void 0 ? [] : _k, _l = _a.showProgressBar, showProgressBar = _l === void 0 ? [] : _l, onClose = _a.onClose, validateStep = _a.validateStep, confirmationModal = _a.confirmationModal, onModalCancel = _a.onModalCancel, onModalConfirm = _a.onModalConfirm, verticalOffset = _a.verticalOffset;
|
|
50
|
-
var
|
|
49
|
+
var steps = _a.steps, currentStep = _a.currentStep, _g = _a.startIcon, startIcon = _g === void 0 ? [] : _g, _h = _a.endIcon, endIcon = _h === void 0 ? true : _h, children = _a.children, _j = _a.secondaryButton, secondaryButton = _j === void 0 ? [] : _j, _k = _a.primaryButton, primaryButton = _k === void 0 ? [] : _k, _l = _a.showProgressBar, showProgressBar = _l === void 0 ? [] : _l, onClose = _a.onClose, validateStep = _a.validateStep, confirmationModal = _a.confirmationModal, onModalCancel = _a.onModalCancel, onModalConfirm = _a.onModalConfirm, verticalOffset = _a.verticalOffset, _m = _a.maxWidth, maxWidth = _m === void 0 ? 768 : _m;
|
|
50
|
+
var _o = useState(false), isVisible = _o[0], setIsVisible = _o[1];
|
|
51
51
|
var portalContainerRef = useRef(null);
|
|
52
52
|
var stepperContainerRef = useRef(null);
|
|
53
53
|
// Effet pour bloquer le scroll du body quand le stepper est visible
|
|
@@ -138,7 +138,7 @@ var Stepper = function (_a) {
|
|
|
138
138
|
? "".concat(verticalOffset.bottom, "px")
|
|
139
139
|
: undefined,
|
|
140
140
|
} },
|
|
141
|
-
React.createElement("div", { className: "stepper-container ".concat((confirmationModal === null || confirmationModal === void 0 ? void 0 : confirmationModal.show) ? "modal-active" : ""), onClick: function (e) { return e.stopPropagation(); }, ref: stepperContainerRef },
|
|
141
|
+
React.createElement("div", { className: "stepper-container ".concat((confirmationModal === null || confirmationModal === void 0 ? void 0 : confirmationModal.show) ? "modal-active" : ""), onClick: function (e) { return e.stopPropagation(); }, ref: stepperContainerRef, style: { maxWidth: "".concat(maxWidth, "px") } },
|
|
142
142
|
React.createElement(ProgressBar, { steps: steps, currentStep: currentStep, startIcon: currentShowStartIcon, endIcon: endIcon, onStartIconClick: handlePrevious, onEndIconClick: handleClose, showProgressBar: currentShowProgressBar }),
|
|
143
143
|
React.createElement("div", { className: "stepper-content" }, children[currentStep - 1]),
|
|
144
144
|
React.createElement("div", { className: "stepper-buttons ".concat(!(currentSecondaryButton === null || currentSecondaryButton === void 0 ? void 0 : currentSecondaryButton.show) && !(currentPrimaryButton === null || currentPrimaryButton === void 0 ? void 0 : currentPrimaryButton.show)
|
|
@@ -34,6 +34,15 @@ declare namespace _default {
|
|
|
34
34
|
let description_2: string;
|
|
35
35
|
export { description_2 as description };
|
|
36
36
|
}
|
|
37
|
+
namespace maxWidth {
|
|
38
|
+
export namespace control_4 {
|
|
39
|
+
let type_4: string;
|
|
40
|
+
export { type_4 as type };
|
|
41
|
+
}
|
|
42
|
+
export { control_4 as control };
|
|
43
|
+
let description_3: string;
|
|
44
|
+
export { description_3 as description };
|
|
45
|
+
}
|
|
37
46
|
}
|
|
38
47
|
export namespace parameters {
|
|
39
48
|
namespace backgrounds {
|
|
@@ -49,4 +58,5 @@ declare namespace _default {
|
|
|
49
58
|
export default _default;
|
|
50
59
|
export const Default: any;
|
|
51
60
|
export const WithLargeOffset: any;
|
|
61
|
+
export const WithCustomWidth: any;
|
|
52
62
|
import Stepper from "./Stepper";
|
|
@@ -77,6 +77,12 @@ export default {
|
|
|
77
77
|
},
|
|
78
78
|
description: "Décalage vertical du stepper (en px) pour éviter les barres de navigation",
|
|
79
79
|
},
|
|
80
|
+
maxWidth: {
|
|
81
|
+
control: {
|
|
82
|
+
type: "number",
|
|
83
|
+
},
|
|
84
|
+
description: "Largeur maximale du stepper en pixels (défaut: 768px)",
|
|
85
|
+
},
|
|
80
86
|
},
|
|
81
87
|
parameters: {
|
|
82
88
|
backgrounds: {
|
|
@@ -204,3 +210,6 @@ WithLargeOffset.args = __assign(__assign({}, Default.args), { verticalOffset: {
|
|
|
204
210
|
top: 120,
|
|
205
211
|
bottom: 80,
|
|
206
212
|
} });
|
|
213
|
+
// Ajouter une story avec une largeur personnalisée
|
|
214
|
+
export var WithCustomWidth = Template.bind({});
|
|
215
|
+
WithCustomWidth.args = __assign(__assign({}, Default.args), { maxWidth: 580 });
|