allaw-ui 2.7.6 → 2.7.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.
@@ -94,15 +94,14 @@
94
94
  left: 0;
95
95
  width: 100%;
96
96
  height: 100%;
97
- background: rgba(0, 0, 0, 0.5);
98
- z-index: 1000;
97
+ background-color: rgba(0, 0, 0, 0.5);
99
98
  display: flex;
100
99
  justify-content: center;
101
100
  align-items: center;
101
+ z-index: 3000;
102
102
  opacity: 0;
103
103
  visibility: hidden;
104
104
  transition: opacity 0.3s ease, visibility 0.3s ease;
105
- box-sizing: border-box;
106
105
  }
107
106
 
108
107
  .stepper-overlay.visible {
@@ -110,6 +109,14 @@
110
109
  visibility: visible;
111
110
  }
112
111
 
112
+ /* Classe pour bloquer le scroll du body */
113
+ body.stepper-open {
114
+ overflow: hidden;
115
+ position: fixed;
116
+ width: 100%;
117
+ height: 100%;
118
+ }
119
+
113
120
  @media (max-width: 800px) {
114
121
  .stepper-container {
115
122
  height: 96dvh;
@@ -125,7 +132,7 @@
125
132
  .stepper-overlay {
126
133
  padding-top: 0 !important;
127
134
  padding-bottom: 0 !important;
128
- z-index: 4000;
135
+ z-index: 5001;
129
136
  }
130
137
  }
131
138
 
@@ -50,6 +50,19 @@ var Stepper = function (_a) {
50
50
  var _m = useState(false), isVisible = _m[0], setIsVisible = _m[1];
51
51
  var portalContainerRef = useRef(null);
52
52
  var stepperContainerRef = useRef(null);
53
+ // Effet pour bloquer le scroll du body quand le stepper est visible
54
+ useEffect(function () {
55
+ if (isVisible) {
56
+ document.body.classList.add("stepper-open");
57
+ }
58
+ else {
59
+ document.body.classList.remove("stepper-open");
60
+ }
61
+ // Nettoyage lors du démontage du composant
62
+ return function () {
63
+ document.body.classList.remove("stepper-open");
64
+ };
65
+ }, [isVisible]);
53
66
  useEffect(function () {
54
67
  var container = document.createElement("div");
55
68
  document.body.appendChild(container);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "2.7.6",
3
+ "version": "2.7.8",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",