@bothub-chat/ui 2.58.0-feat-documentizer-d3737fca-22da-430f-8537-3c9730cb19c7 → 2.58.0-feat-documentizer-eebe0c83-75e9-495a-a653-aef8b3122e37

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.
@@ -1 +1 @@
1
- import{__rest as r}from"tslib";import{jsx as e}from"react/jsx-runtime";import{useRef as o,useCallback as t,useEffect as l}from"react";import{useTransition as n}from"@react-spring/web";import{BackdropStyled as c}from"./styled.js";const i=i=>{var{open:b,onClick:a,children:d}=i,s=r(i,["open","onClick","children"]);const m=o(null),p=t(r=>{r.target===m.current&&(null==a||a(r))},[a,m]);l(()=>(b?document.body.style.overflow="hidden":document.body.style.removeProperty("overflow"),()=>{document.body.style.removeProperty("overflow")}),[b]);return n(b,{from:{background:"rgba(0, 0, 0, 0)",backdropFilter:"blur(0px)"},enter:{background:"rgba(0, 0, 0, 0.55)",backdropFilter:"blur(5px)"},leave:{background:"rgba(0, 0, 0, 0)",backdropFilter:"blur(0px)"}})((r,o)=>o&&e(c,Object.assign({},s,{ref:m,onClick:p,style:Object.assign(Object.assign({},r),s.style||{}),children:d})))};export{i as Backdrop};
1
+ import{__rest as r}from"tslib";import{jsx as e}from"react/jsx-runtime";import{useRef as o,useCallback as t,useEffect as c}from"react";import{useTransition as l}from"@react-spring/web";import{BackdropStyled as n}from"./styled.js";const a=a=>{var{open:d,onClick:i,children:s,hasBackdrop:b=!0}=a,p=r(a,["open","onClick","children","hasBackdrop"]);const m=o(null),u=t(r=>{r.target===m.current&&(null==i||i(r))},[i,m]);c(()=>(d?document.body.style.overflow="hidden":document.body.style.removeProperty("overflow"),()=>{document.body.style.removeProperty("overflow")}),[d]);return l(d,{from:{background:"rgba(0, 0, 0, 0)",backdropFilter:"blur(0px)"},enter:{background:"rgba(0, 0, 0, 0.55)",backdropFilter:"blur(5px)"},leave:{background:"rgba(0, 0, 0, 0)",backdropFilter:"blur(0px)"}})((r,o)=>o&&e(n,Object.assign({},p,{hasBackdrop:b,ref:m,onClick:u,style:Object.assign(Object.assign({},r),p.style||{}),children:s})))};export{a as Backdrop};