sate-lib 1.54.1 → 1.54.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.
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as r,jsxs as e}from"react/jsx-runtime";import{Portal as a}from"@radix-ui/react-portal";import{Activity as o}from"react";import{RemoveScroll as i}from"react-remove-scroll";import{Button as t}from"../button/button.js";import{Typography as l}from"../typography/typography.js";import s from"./drawer.styles.module.js";import{useDrawer as m}from"./useDrawer.js";let d=({open:d,onOpen:n,title:c,className:p,children:h})=>{let{state:f,onClose:v,present:y}=m({onOpenChange:n,open:d}),u=[s.root,s.rootGallery,p].filter(Boolean).join(" ");return r(o,{mode:y?"visible":"hidden",children:e(a,{children:[r("div",{"aria-hidden":!0,className:s.overlay,"data-state":f,onClick:v}),r(i,{forwardProps:!0,children:e("div",{"aria-label":c,"aria-modal":"true",className:u,"data-state":f,role:"dialog",tabIndex:-1,children:[e("div",{className:s.header,children:[r(t,{className:s.close,icon:"X",iconPosition:"left",onClick:v,size:"small",variant:"toned"}),r(l,{as:"h2",className:s.title,variant:"bodyLargeEmphasis",children:c})]}),r("div",{className:s.panel,children:h})]})})]})})};export{d as DrawerGallery};
2
+ import{jsx as r,jsxs as e}from"react/jsx-runtime";import{Portal as a}from"@radix-ui/react-portal";import{Activity as o}from"react";import{RemoveScroll as i}from"react-remove-scroll";import{Button as l}from"../button/button.js";import{Typography as t}from"../typography/typography.js";import s from"./drawer.styles.module.js";import{useDrawer as d}from"./useDrawer.js";let m=({open:m,onOpen:n,title:c,className:p,children:h})=>{let{state:f,onClose:v,present:y}=d({onOpenChange:n,open:m}),u=[s.root,s.rootGallery,p].filter(Boolean).join(" ");return r(o,{mode:y?"visible":"hidden",children:e(a,{children:[r("div",{"aria-hidden":!0,className:s.overlay,"data-state":f,onClick:v}),r(i,{forwardProps:!0,children:e("div",{"aria-label":c,"aria-modal":"true",className:u,"data-state":f,role:"dialog",children:[e("div",{className:s.header,children:[r("div",{className:s.close,children:r(l,{icon:"X",iconPosition:"left",onClick:v,size:"small",variant:"toned"})}),r(t,{as:"h2",className:s.title,variant:"bodyLargeEmphasis",children:c})]}),r("div",{className:s.panel,children:h})]})})]})})};export{m as DrawerGallery};
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-menu.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/drawer-menu.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,eAAe,EAAa,MAAM,aAAa,CAAC;AAE9D,MAAM,WAAW,WAAY,SAAQ,eAAe;CAAG;AAEvD,eAAO,MAAM,UAAU,GAAI,+CAMxB,WAAW,4CA0Cb,CAAC"}
1
+ {"version":3,"file":"drawer-menu.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/drawer-menu.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,eAAe,EAAa,MAAM,aAAa,CAAC;AAE9D,MAAM,WAAW,WAAY,SAAQ,eAAe;CAAG;AAEvD,eAAO,MAAM,UAAU,GAAI,+CAMxB,WAAW,4CAyCb,CAAC"}
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as r,jsxs as e}from"react/jsx-runtime";import{Portal as o}from"@radix-ui/react-portal";import{Activity as a}from"react";import{RemoveScroll as t}from"react-remove-scroll";import{Button as i}from"../button/button.js";import l from"./drawer.styles.module.js";import{useDrawer as n}from"./useDrawer.js";let m=({open:m,onOpen:s,title:d,className:c,children:p})=>{let{state:u,onClose:f,present:h}=n({onOpenChange:s,open:m}),v=[l.root,l.rootMenu,c].filter(Boolean).join(" ");return r(a,{mode:h?"visible":"hidden",children:e(o,{children:[r("div",{"aria-hidden":!0,className:l.overlay,"data-state":u,onClick:f}),r(t,{forwardProps:!0,children:e("div",{"aria-label":d,"aria-modal":"true",className:v,"data-state":u,role:"dialog",tabIndex:-1,children:[r(i,{className:l.menuClose,icon:"X",iconPosition:"left",onClick:f,size:"small",variant:"lightOnContent"}),r("div",{className:l.panel,children:p})]})})]})})};export{m as DrawerMenu};
2
+ import{jsx as r,jsxs as e}from"react/jsx-runtime";import{Portal as o}from"@radix-ui/react-portal";import{Activity as a}from"react";import{RemoveScroll as t}from"react-remove-scroll";import{Button as i}from"../button/button.js";import l from"./drawer.styles.module.js";import{useDrawer as n}from"./useDrawer.js";let m=({open:m,onOpen:s,title:d,className:c,children:p})=>{let{state:u,onClose:f,present:h}=n({onOpenChange:s,open:m}),v=[l.root,l.rootMenu,c].filter(Boolean).join(" ");return r(a,{mode:h?"visible":"hidden",children:e(o,{children:[r("div",{"aria-hidden":!0,className:l.overlay,"data-state":u,onClick:f}),r(t,{forwardProps:!0,children:e("div",{"aria-label":d,"aria-modal":"true",className:v,"data-state":u,role:"dialog",children:[r(i,{className:l.menuClose,icon:"X",iconPosition:"left",onClick:f,size:"small",variant:"lightOnContent"}),r("div",{className:l.panel,children:p})]})})]})})};export{m as DrawerMenu};
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/drawer.tsx"],"names":[],"mappings":"AAQA,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,4CA+Cb,CAAC"}
1
+ {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/drawer.tsx"],"names":[],"mappings":"AAQA,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,4CA8Cb,CAAC"}
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as r,jsxs as e}from"react/jsx-runtime";import{Portal as a}from"@radix-ui/react-portal";import{Activity as o}from"react";import{RemoveScroll as i}from"react-remove-scroll";import{Button as t}from"../button/button.js";import{Typography as l}from"../typography/typography.js";import s from"./drawer.styles.module.js";import{useDrawer as d}from"./useDrawer.js";let n=({open:n,onOpen:m,title:c,className:p,nested:h,children:f})=>{let{state:v,onClose:u,present:y}=d({onOpenChange:m,open:n}),b=[s.root,p].filter(Boolean).join(" ");return r(o,{mode:y?"visible":"hidden",children:e(a,{children:[r("div",{"aria-hidden":!0,className:`${s.overlay} ${h?s.nested:""}`,"data-state":v,onClick:u}),r(i,{forwardProps:!0,children:e("div",{"aria-label":c,"aria-modal":"true",className:b,"data-state":v,role:"dialog",tabIndex:-1,children:[e("div",{className:s.header,children:[r("div",{className:s.close,children:r(t,{icon:"X",iconPosition:"left",onClick:u,size:"small",variant:"toned"})}),r(l,{as:"h2",className:s.title,variant:"bodyLargeEmphasis",children:c})]}),r("div",{className:s.panel,children:f})]})})]})})};export{n as Drawer};
2
+ import{jsx as r,jsxs as e}from"react/jsx-runtime";import{Portal as a}from"@radix-ui/react-portal";import{Activity as o}from"react";import{RemoveScroll as i}from"react-remove-scroll";import{Button as t}from"../button/button.js";import{Typography as l}from"../typography/typography.js";import s from"./drawer.styles.module.js";import{useDrawer as d}from"./useDrawer.js";let m=({open:m,onOpen:n,title:c,className:p,nested:h,children:f})=>{let{state:v,onClose:u,present:y}=d({onOpenChange:n,open:m}),j=[s.root,p].filter(Boolean).join(" ");return r(o,{mode:y?"visible":"hidden",children:e(a,{children:[r("div",{"aria-hidden":!0,className:`${s.overlay} ${h?s.nested:""}`,"data-state":v,onClick:u}),r(i,{forwardProps:!0,children:e("div",{"aria-label":c,"aria-modal":"true",className:j,"data-state":v,role:"dialog",children:[e("div",{className:s.header,children:[r("div",{className:s.close,children:r(t,{icon:"X",iconPosition:"left",onClick:u,size:"small",variant:"toned"})}),r(l,{as:"h2",className:s.title,variant:"bodyLargeEmphasis",children:c})]}),r("div",{className:s.panel,children:f})]})})]})})};export{m as Drawer};
@@ -1 +1 @@
1
- {"version":3,"file":"useDrawer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/useDrawer.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,KAAK,gBAAgB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,KAAK,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;AAI/B,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,gBAAgB;;;;EAmDjE"}
1
+ {"version":3,"file":"useDrawer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/useDrawer.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,KAAK,gBAAgB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,KAAK,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;AAI/B,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,gBAAgB;;;;EAsDjE"}
@@ -1 +1 @@
1
- import{useEffect as e,useLayoutEffect as t,useState as n}from"react";function o({open:o,onOpenChange:r}){let[i,l]=n(o),[s,u]=n(!1);return e(()=>{if(o)l(!0);else{u(!1);let e=setTimeout(()=>l(!1),350);return()=>clearTimeout(e)}},[o]),t(()=>{if(!i)return;let e=requestAnimationFrame(()=>{u(!0)});return()=>{cancelAnimationFrame(e)}},[i]),e(()=>{if(!i)return;document.documentElement.style.scrollBehavior="auto",document.body.style.pointerEvents="none";let e=e=>{"Escape"===e.key&&r(!1)};return window.addEventListener("keydown",e),()=>{document.documentElement.style.scrollBehavior="",document.body.style.pointerEvents="",window.removeEventListener("keydown",e)}},[i,r]),{onClose:()=>r(!1),present:i,state:s?"open":"closed"}}export{o as useDrawer};
1
+ import{useEffect as e,useLayoutEffect as t,useState as n}from"react";function r({open:r,onOpenChange:o}){let[i,u]=n(r),[m,l]=n(!1);return e(()=>{if(r)u(!0);else{l(!1);let e=setTimeout(()=>u(!1),350);return()=>clearTimeout(e)}},[r]),t(()=>{if(!i)return;let e=requestAnimationFrame(()=>{l(!0)});return()=>{cancelAnimationFrame(e)}},[i]),e(()=>{if(!i)return;document.documentElement.style.scrollBehavior="auto",document.body.style.pointerEvents="none",document.querySelector("main")?.setAttribute("inert","");let e=e=>{"Escape"===e.key&&o(!1)};return window.addEventListener("keydown",e),()=>{document.documentElement.style.scrollBehavior="",document.body.style.pointerEvents="",document.querySelector("main")?.removeAttribute("inert"),window.removeEventListener("keydown",e)}},[i,o]),{onClose:()=>o(!1),present:i,state:m?"open":"closed"}}export{r as useDrawer};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sate-lib",
3
- "version": "1.54.1",
3
+ "version": "1.54.2",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "keywords": [