sate-lib 1.45.0 → 1.47.0
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/lib/components/drawer/drawer-gallery.d.ts.map +1 -1
- package/lib/components/drawer/drawer-gallery.js +1 -1
- package/lib/components/drawer/drawer-menu.d.ts.map +1 -1
- package/lib/components/drawer/drawer-menu.js +1 -1
- package/lib/components/drawer/drawer.d.ts.map +1 -1
- package/lib/components/drawer/drawer.js +1 -1
- package/lib/components/drawer/useDrawer.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-gallery.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/drawer-gallery.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,eAAe,EAAa,MAAM,aAAa,CAAC;AAG9D,MAAM,WAAW,WAAY,SAAQ,eAAe;CAAG;AAEvD,eAAO,MAAM,aAAa,GAAI,+CAM3B,WAAW,
|
|
1
|
+
{"version":3,"file":"drawer-gallery.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/drawer-gallery.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,eAAe,EAAa,MAAM,aAAa,CAAC;AAG9D,MAAM,WAAW,WAAY,SAAQ,eAAe;CAAG;AAEvD,eAAO,MAAM,aAAa,GAAI,+CAM3B,WAAW,mDAyCb,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Portal as a}from"@radix-ui/react-portal";import{
|
|
2
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Portal as a}from"@radix-ui/react-portal";import{Button as o}from"../button/button.js";import t from"./drawer.styles.module.js";import{useDrawer as i}from"./useDrawer.js";import{useMediaQuery as l}from"./useMediaQuery.js";let n=({open:n,onOpen:s,title:m,className:d,children:c})=>{let p=l("(min-width: 900px)"),{state:u,onClose:f,present:h}=i({onOpenChange:s,open:n}),j=[t.root,t.rootGallery,d].filter(Boolean).join(" ");return h?r(a,{children:[e("div",{"aria-hidden":!0,className:t.overlay,"data-state":u,onClick:f}),r("div",{"aria-label":m,"aria-modal":"true",className:j,"data-state":u,role:"dialog",tabIndex:-1,children:[e(o,{className:t.close,icon:"X",iconPosition:"left",onClick:f,size:"small",variant:p?"toned":"lightOnContent"}),e("div",{className:t.panel,children:c})]})]}):null};export{n as DrawerGallery};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-menu.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/drawer-menu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drawer-menu.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/drawer-menu.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,eAAe,EAAa,MAAM,aAAa,CAAC;AAE9D,MAAM,WAAW,WAAY,SAAQ,eAAe;CAAG;AAEvD,eAAO,MAAM,UAAU,GAAI,+CAMxB,WAAW,mDAwCb,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as e,jsxs as
|
|
2
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Portal as r}from"@radix-ui/react-portal";import{Button as o}from"../button/button.js";import t from"./drawer.styles.module.js";import{useDrawer as i}from"./useDrawer.js";let l=({open:l,onOpen:n,title:s,className:m,children:d})=>{let{state:c,onClose:u,present:p}=i({onOpenChange:n,open:l}),f=[t.root,t.rootMenu,m].filter(Boolean).join(" ");return p?a(r,{children:[e("div",{"aria-hidden":!0,className:t.overlay,"data-state":c,onClick:u}),a("div",{"aria-label":s,"aria-modal":"true",className:f,"data-state":c,role:"dialog",tabIndex:-1,children:[e(o,{className:t.close,icon:"X",iconPosition:"left",onClick:u,size:"small",variant:"lightOnContent"}),e("div",{className:t.panel,children:d})]})]}):null};export{l as DrawerMenu};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/drawer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/drawer.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,eAAe,EAAa,MAAM,aAAa,CAAC;AAE9D,MAAM,WAAW,WAAY,SAAQ,eAAe;IACnD,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,MAAM,GAAI,uDAOpB,WAAW,mDA8Cb,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as
|
|
2
|
+
import{jsx as a,jsxs as e}from"react/jsx-runtime";import{Portal as r}from"@radix-ui/react-portal";import{Button as t}from"../button/button.js";import{Typography as o}from"../typography/typography.js";import i from"./drawer.styles.module.js";import{useDrawer as l}from"./useDrawer.js";let s=({open:s,onOpen:n,title:d,className:m,nested:c,children:p})=>{let{state:h,onClose:u,present:f}=l({onOpenChange:n,open:s}),v=[i.root,m].filter(Boolean).join(" ");return f?e(r,{children:[a("div",{"aria-hidden":!0,className:`${i.overlay} ${c?i.nested:""}`,"data-state":h,onClick:u}),e("div",{"aria-label":d,"aria-modal":"true",className:v,"data-state":h,role:"dialog",tabIndex:-1,children:[a(t,{className:i.close,icon:"X",iconPosition:"left",onClick:u,size:"small",variant:"toned"}),e("div",{className:i.panel,children:[a("div",{className:i.header,children:a(o,{as:"h2",className:i.title,variant:"bodyLargeEmphasis",children:d})}),p]})]})]}):null};export{s as Drawer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useEffect as e,useLayoutEffect as t,useState as o}from"react";function n({open:n,onOpenChange:d}){let[r,
|
|
1
|
+
import{useEffect as e,useLayoutEffect as t,useState as o}from"react";function n({open:n,onOpenChange:d}){let[r,i]=o(n),[l,y]=o(!1);return e(()=>{if(n)i(!0);else{y(!1);let e=setTimeout(()=>i(!1),300);return()=>clearTimeout(e)}},[n]),t(()=>{if(!r)return;let e=requestAnimationFrame(()=>{y(!0)});return()=>{cancelAnimationFrame(e)}},[r]),e(()=>{if(!r)return;document.documentElement.style.scrollBehavior="auto",document.body.style.overflow="hidden",document.body.style.overscrollBehavior="contain",document.body.style.position="relative",document.body.style.paddingLeft="0px",document.body.style.paddingTop="0px",document.body.style.paddingRight="0px",document.body.style.marginLeft="0",document.body.style.marginTop="0",document.body.style.marginRight="0px";let e=e=>{"Escape"===e.key&&d(!1)};return window.addEventListener("keydown",e),()=>{document.documentElement.style.scrollBehavior="",document.body.style.overflow="",document.body.style.overscrollBehavior="",document.body.style.position="",document.body.style.paddingLeft="",document.body.style.paddingTop="",document.body.style.paddingRight="",document.body.style.marginLeft="",document.body.style.marginTop="",document.body.style.marginRight="",window.removeEventListener("keydown",e)}},[r,d]),{onClose:()=>d(!1),present:r,state:l?"open":"closed"}}export{n as useDrawer};
|