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.
@@ -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,mDA2Cb,CAAC"}
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{Activity as o}from"react";import{Button as t}from"../button/button.js";import i from"./drawer.styles.module.js";import{useDrawer as l}from"./useDrawer.js";import{useMediaQuery as n}from"./useMediaQuery.js";let m=({open:m,onOpen:s,title:d,className:c,children:p})=>{let u=n("(min-width: 900px)"),{state:f,onClose:h,present:j}=l({onOpenChange:s,open:m}),v=[i.root,i.rootGallery,c].filter(Boolean).join(" ");return j?e(o,{mode:j?"visible":"hidden",children:r(a,{children:[e("div",{"aria-hidden":!0,className:i.overlay,"data-state":f,onClick:h}),r("div",{"aria-label":d,"aria-modal":"true",className:v,"data-state":f,role:"dialog",tabIndex:-1,children:[e(t,{className:i.close,icon:"X",iconPosition:"left",onClick:h,size:"small",variant:u?"toned":"lightOnContent"}),e("div",{className:i.panel,children:p})]})]})}):null};export{m as DrawerGallery};
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":"AAMA,OAAO,EAAE,KAAK,eAAe,EAAa,MAAM,aAAa,CAAC;AAE9D,MAAM,WAAW,WAAY,SAAQ,eAAe;CAAG;AAEvD,eAAO,MAAM,UAAU,GAAI,+CAMxB,WAAW,mDA0Cb,CAAC"}
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 r}from"react/jsx-runtime";import{Portal as a}from"@radix-ui/react-portal";import{Activity as o}from"react";import{Button as t}from"../button/button.js";import i from"./drawer.styles.module.js";import{useDrawer as l}from"./useDrawer.js";let n=({open:n,onOpen:s,title:m,className:d,children:c})=>{let{state:u,onClose:p,present:f}=l({onOpenChange:s,open:n}),h=[i.root,i.rootMenu,d].filter(Boolean).join(" ");return f?e(o,{mode:f?"visible":"hidden",children:r(a,{children:[e("div",{"aria-hidden":!0,className:i.overlay,"data-state":u,onClick:p}),r("div",{"aria-label":m,"aria-modal":"true",className:h,"data-state":u,role:"dialog",tabIndex:-1,children:[e(t,{className:i.close,icon:"X",iconPosition:"left",onClick:p,size:"small",variant:"lightOnContent"}),e("div",{className:i.panel,children:c})]})]})}):null};export{n as DrawerMenu};
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":"AAOA,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,mDAgDb,CAAC"}
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 e,jsxs as a}from"react/jsx-runtime";import{Portal as r}from"@radix-ui/react-portal";import{Activity as i}from"react";import{Button as o}from"../button/button.js";import{Typography as t}from"../typography/typography.js";import l from"./drawer.styles.module.js";import{useDrawer as s}from"./useDrawer.js";let n=({open:n,onOpen:d,title:m,className:c,nested:p,children:h})=>{let{state:f,onClose:u,present:v}=s({onOpenChange:d,open:n}),y=[l.root,c].filter(Boolean).join(" ");return v?e(i,{mode:v?"visible":"hidden",children:a(r,{children:[e("div",{"aria-hidden":!0,className:`${l.overlay} ${p?l.nested:""}`,"data-state":f,onClick:u}),a("div",{"aria-label":m,"aria-modal":"true",className:y,"data-state":f,role:"dialog",tabIndex:-1,children:[e(o,{className:l.close,icon:"X",iconPosition:"left",onClick:u,size:"small",variant:"toned"}),a("div",{className:l.panel,children:[e("div",{className:l.header,children:e(t,{as:"h2",className:l.title,variant:"bodyLargeEmphasis",children:m})}),h]})]})]})}):null};export{n as Drawer};
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,y]=o(n),[i,l]=o(!1);return e(()=>{if(n)y(!0);else{l(!1);let e=setTimeout(()=>y(!1),300);return()=>clearTimeout(e)}},[n]),t(()=>{if(!r)return;let e=requestAnimationFrame(()=>{l(!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",document.body.style.pointerEvents="none";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="",document.body.style.pointerEvents="",window.removeEventListener("keydown",e)}},[r,d]),{onClose:()=>d(!1),present:r,state:i?"open":"closed"}}export{n as useDrawer};
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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sate-lib",
3
- "version": "1.45.0",
3
+ "version": "1.47.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "keywords": [