@proprioo/salatim 26.1.0 → 26.1.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## Changelog
2
2
 
3
+ **26.1.2**
4
+
5
+ * Modal: add z-index
6
+
7
+ **26.1.1**
8
+
9
+ * Modal: add missing tests
10
+
3
11
  **26.1.0**
4
12
 
5
13
  * Modal: use CSS and onAnimationEnd from React to handle fade in / out
package/lib/index.js CHANGED
@@ -2178,6 +2178,7 @@ function Q$(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,
2178
2178
  position: absolute;
2179
2179
  right: ${ee(8)};
2180
2180
  top: ${ee(8)};
2181
+ z-index: 1;
2181
2182
  height: ${ee(32)};
2182
2183
  width: ${ee(32)};
2183
2184
 
@@ -2214,6 +2215,7 @@ function Q$(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,
2214
2215
  position: fixed;
2215
2216
  left: 50%;
2216
2217
  top: 50%;
2218
+ z-index: 1001;
2217
2219
  display: flex;
2218
2220
  flex-direction: column;
2219
2221
  height: 100%;
@@ -2341,6 +2343,7 @@ function Q$(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,
2341
2343
  left: 0;
2342
2344
  right: 0;
2343
2345
  top: 0;
2346
+ z-index: 1000;
2344
2347
  background: ${Y(.2,Q.dark.base)};
2345
2348
  cursor: pointer;
2346
2349
 
@@ -2360,7 +2363,7 @@ function Q$(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,
2360
2363
  animation: ${kT} 0.3s linear;
2361
2364
  }
2362
2365
  `}
2363
- `;var DT;!function(e){e.IN="in",e.OUT="out"}(DT||(DT={}));const AT=({children:e,fade:r,icon:n,isAlternative:o=!1,isFullScreen:i,isLoading:l,noPadding:u,text:d,title:c,closeModal:f,setFadeOut:p})=>{const h=t.useRef(null),[y,b]=t.useState(0),g=({key:e})=>{"Escape"===e&&p()};return cD(h,p),t.useLayoutEffect((()=>{const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}),[]),t.useLayoutEffect((()=>{const e=document.getElementById("modal");return e&&b(e.scrollHeight),()=>b(0)}),[l]),t.useEffect((()=>(document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g))),[]),a.createPortal(s.default.createElement(CT,Object.assign({},{fade:r},{onAnimationEnd:()=>{r===DT.OUT&&f()}}),s.default.createElement(mT,Object.assign({},{isFullScreen:i,noPadding:u},{id:"modal",ref:h}),l&&s.default.createElement(gT,{loaderHeight:`${y.toString()}px`}),s.default.createElement(vT,{"data-test":"close-modal-icon",hasTitle:!!c,onClick:p},s.default.createElement(bT,null)),c&&s.default.createElement($T,null,c),(n||c||d)&&s.default.createElement(wT,null,n&&s.default.createElement(xT,{"data-test":"modal-icon"},n),c&&s.default.createElement(OT,Object.assign({},{isAlternative:o},{"data-test":"modal-title",dangerouslySetInnerHTML:{__html:c}})),d&&s.default.createElement(_T,{"data-test":"modal-text",dangerouslySetInnerHTML:{__html:d}})),s.default.createElement("div",null,e))),(null===document||void 0===document?void 0:document.body)||null)},IT=c.default.div`
2366
+ `;var DT;!function(e){e.IN="in",e.OUT="out"}(DT||(DT={}));const AT=({children:e,fade:r,icon:n,isAlternative:o=!1,isFullScreen:i,isLoading:l,noPadding:u,text:d,title:c,closeModal:f,setFadeOut:p})=>{const h=t.useRef(null),[y,b]=t.useState(0),g=({key:e})=>{"Escape"===e&&p()};return cD(h,p),t.useLayoutEffect((()=>{const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}),[]),t.useLayoutEffect((()=>{const e=document.getElementById("modal");return e&&b(e.scrollHeight),()=>b(0)}),[l]),t.useEffect((()=>(document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g))),[]),a.createPortal(s.default.createElement(CT,Object.assign({},{fade:r},{"data-test":"modal-background",onAnimationEnd:()=>{r===DT.OUT&&f()}}),s.default.createElement(mT,Object.assign({},{isFullScreen:i,noPadding:u},{id:"modal",ref:h}),l&&s.default.createElement(gT,{loaderHeight:`${y.toString()}px`}),s.default.createElement(vT,{"data-test":"close-modal-icon",hasTitle:!!c,onClick:p},s.default.createElement(bT,null)),c&&s.default.createElement($T,null,c),(n||c||d)&&s.default.createElement(wT,null,n&&s.default.createElement(xT,{"data-test":"modal-icon"},n),c&&s.default.createElement(OT,Object.assign({},{isAlternative:o},{"data-test":"modal-title",dangerouslySetInnerHTML:{__html:c}})),d&&s.default.createElement(_T,{"data-test":"modal-text",dangerouslySetInnerHTML:{__html:d}})),s.default.createElement("div",null,e))),(null===document||void 0===document?void 0:document.body)||null)},IT=c.default.div`
2364
2367
  position: relative;
2365
2368
  min-height: ${ee(56)};
2366
2369
  border: ${ee(1)} solid ${Q.grey.base60};