@proprioo/salatim 26.1.0 → 26.1.1

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,9 @@
1
1
  ## Changelog
2
2
 
3
+ **26.1.1**
4
+
5
+ * Modal: add missing tests
6
+
3
7
  **26.1.0**
4
8
 
5
9
  * Modal: use CSS and onAnimationEnd from React to handle fade in / out
package/lib/index.js CHANGED
@@ -2360,7 +2360,7 @@ function Q$(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,
2360
2360
  animation: ${kT} 0.3s linear;
2361
2361
  }
2362
2362
  `}
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`
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},{"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
2364
  position: relative;
2365
2365
  min-height: ${ee(56)};
2366
2366
  border: ${ee(1)} solid ${Q.grey.base60};