allaw-ui 3.1.6 → 3.1.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.
|
@@ -15,7 +15,7 @@ var Modal = function (_a) {
|
|
|
15
15
|
var container = document.createElement("div");
|
|
16
16
|
document.body.appendChild(container);
|
|
17
17
|
portalContainerRef.current = container;
|
|
18
|
-
document.body.
|
|
18
|
+
document.body.style.overflow = "hidden";
|
|
19
19
|
setIsVisible(true);
|
|
20
20
|
}
|
|
21
21
|
else {
|
|
@@ -23,7 +23,7 @@ var Modal = function (_a) {
|
|
|
23
23
|
if (portalContainerRef.current &&
|
|
24
24
|
document.body.contains(portalContainerRef.current)) {
|
|
25
25
|
document.body.removeChild(portalContainerRef.current);
|
|
26
|
-
document.body.
|
|
26
|
+
document.body.style.overflow = "";
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
return function () {
|
|
@@ -31,7 +31,7 @@ var Modal = function (_a) {
|
|
|
31
31
|
if (portalContainerRef.current &&
|
|
32
32
|
document.body.contains(portalContainerRef.current)) {
|
|
33
33
|
document.body.removeChild(portalContainerRef.current);
|
|
34
|
-
document.body.
|
|
34
|
+
document.body.style.overflow = "";
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
}, [show]);
|
|
@@ -43,13 +43,13 @@ var Modal = function (_a) {
|
|
|
43
43
|
};
|
|
44
44
|
if (!show || !isVisible || !portalContainerRef.current)
|
|
45
45
|
return null;
|
|
46
|
-
var modalContent = (React.createElement("div", { className: "".concat(style.modalOverlay, " ").concat(isVisible ? style.visible : ""), onClick: handleOutsideClick, style: {
|
|
46
|
+
var modalContent = (React.createElement("div", { className: "".concat(style.modalOverlay, " ").concat(isVisible ? style.visible : "", " ").concat(show ? style.modal : ""), onClick: handleOutsideClick, style: {
|
|
47
47
|
paddingTop: (verticalOffset === null || verticalOffset === void 0 ? void 0 : verticalOffset.top) ? "".concat(verticalOffset.top, "px") : undefined,
|
|
48
48
|
paddingBottom: (verticalOffset === null || verticalOffset === void 0 ? void 0 : verticalOffset.bottom)
|
|
49
49
|
? "".concat(verticalOffset.bottom, "px")
|
|
50
50
|
: undefined,
|
|
51
51
|
} },
|
|
52
|
-
React.createElement("div", { className: style.modalContent, ref: modalContentRef },
|
|
52
|
+
React.createElement("div", { className: "".concat(style.modalContent, " ").concat(show ? style.modal : ""), ref: modalContentRef },
|
|
53
53
|
React.createElement("div", { className: style.modalHeadingWrapper },
|
|
54
54
|
React.createElement(Heading, { text: title, variant: "h4", color: "noir", align: "left" })),
|
|
55
55
|
React.createElement("div", { className: style.modalParagraphWrapper },
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
/* Classe pour bloquer le scroll du body */
|
|
113
|
-
|
|
113
|
+
.modal-open {
|
|
114
114
|
overflow: hidden;
|
|
115
115
|
position: fixed;
|
|
116
116
|
width: 100%;
|
|
@@ -290,25 +290,6 @@ body.stepper-open {
|
|
|
290
290
|
flex: 1;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
-
/* Classe pour bloquer le scroll du body */
|
|
294
|
-
:global(body.modal-open) {
|
|
295
|
-
overflow: hidden;
|
|
296
|
-
position: fixed;
|
|
297
|
-
width: 100%;
|
|
298
|
-
height: 100%;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
@keyframes fadeIn {
|
|
302
|
-
from {
|
|
303
|
-
opacity: 0;
|
|
304
|
-
transform: scale(0.9);
|
|
305
|
-
}
|
|
306
|
-
to {
|
|
307
|
-
opacity: 1;
|
|
308
|
-
transform: scale(1);
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
293
|
@media (max-width: 1000px) {
|
|
313
294
|
.modalContent {
|
|
314
295
|
z-index: 5001;
|
|
@@ -336,3 +317,8 @@ body.stepper-open {
|
|
|
336
317
|
align-items: flex-end;
|
|
337
318
|
}
|
|
338
319
|
}
|
|
320
|
+
|
|
321
|
+
/* Ajoutez une classe locale pour le modal */
|
|
322
|
+
.modal {
|
|
323
|
+
/* Autres styles pour le modal */
|
|
324
|
+
}
|