@jamsrui/drawer 0.0.2 → 0.0.3

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.
Files changed (69) hide show
  1. package/dist/drawer-body.mjs +1 -1
  2. package/dist/drawer-close-button.mjs +1 -1
  3. package/dist/drawer-close-trigger.mjs +1 -1
  4. package/dist/drawer-config.mjs +1 -1
  5. package/dist/drawer-content.mjs +1 -1
  6. package/dist/drawer-context.mjs +1 -1
  7. package/dist/drawer-footer.mjs +1 -1
  8. package/dist/drawer-header.mjs +1 -1
  9. package/dist/drawer-popover.mjs +1 -1
  10. package/dist/drawer-trigger.mjs +1 -1
  11. package/dist/drawer.mjs +1 -1
  12. package/dist/index.mjs +1 -1
  13. package/dist/styles.mjs +1 -1
  14. package/dist/use-drawer.mjs +1 -1
  15. package/package.json +6 -6
  16. package/dist/chunk-5LGURIDY.js +0 -1
  17. package/dist/chunk-6XYRR3IV.mjs +0 -1
  18. package/dist/chunk-BP77MJVR.mjs +0 -1
  19. package/dist/chunk-DIVLCNEY.js +0 -1
  20. package/dist/chunk-EBAXPVZK.js +0 -1
  21. package/dist/chunk-FLLYJJRJ.mjs +0 -1
  22. package/dist/chunk-GUMSFI7G.mjs +0 -1
  23. package/dist/chunk-IEFAZ5FA.js +0 -1
  24. package/dist/chunk-ILBTUKZ5.mjs +0 -1
  25. package/dist/chunk-KNT3NBAB.mjs +0 -1
  26. package/dist/chunk-KWIHRWXQ.mjs +0 -1
  27. package/dist/chunk-L4VK5JCO.js +0 -1
  28. package/dist/chunk-LJQ6DDUH.js +0 -1
  29. package/dist/chunk-LVXR3WXC.mjs +0 -1
  30. package/dist/chunk-MIPPECRL.mjs +0 -1
  31. package/dist/chunk-ND7OMDLN.js +0 -1
  32. package/dist/chunk-PNQ3EGNQ.js +0 -1
  33. package/dist/chunk-RD4N3HAN.js +0 -1
  34. package/dist/chunk-SOXQFYXF.mjs +0 -1
  35. package/dist/chunk-UM7Z4GKN.mjs +0 -1
  36. package/dist/chunk-VIEG7KXL.js +0 -1
  37. package/dist/chunk-WBBF5BOV.mjs +0 -1
  38. package/dist/chunk-X6T6A5NL.mjs +0 -1
  39. package/dist/chunk-YIBRX4K7.js +0 -1
  40. package/dist/chunk-YVT26KKP.js +0 -1
  41. package/dist/chunk-ZLIR7YT7.js +0 -1
  42. package/dist/drawer-body.d.ts +0 -10
  43. package/dist/drawer-body.js +0 -1
  44. package/dist/drawer-close-button.d.ts +0 -10
  45. package/dist/drawer-close-button.js +0 -1
  46. package/dist/drawer-close-trigger.d.ts +0 -10
  47. package/dist/drawer-close-trigger.js +0 -1
  48. package/dist/drawer-config.d.ts +0 -27
  49. package/dist/drawer-config.js +0 -1
  50. package/dist/drawer-content.d.ts +0 -11
  51. package/dist/drawer-content.js +0 -1
  52. package/dist/drawer-context.d.ts +0 -23
  53. package/dist/drawer-context.js +0 -1
  54. package/dist/drawer-footer.d.ts +0 -10
  55. package/dist/drawer-footer.js +0 -1
  56. package/dist/drawer-header.d.ts +0 -10
  57. package/dist/drawer-header.js +0 -1
  58. package/dist/drawer-popover.d.ts +0 -10
  59. package/dist/drawer-popover.js +0 -1
  60. package/dist/drawer-trigger.d.ts +0 -10
  61. package/dist/drawer-trigger.js +0 -1
  62. package/dist/drawer.d.ts +0 -23
  63. package/dist/drawer.js +0 -1
  64. package/dist/index.d.ts +0 -19
  65. package/dist/index.js +0 -1
  66. package/dist/styles.d.ts +0 -273
  67. package/dist/styles.js +0 -1
  68. package/dist/use-drawer.d.ts +0 -53
  69. package/dist/use-drawer.js +0 -1
@@ -1 +1 @@
1
- import{a}from"./chunk-KWIHRWXQ.mjs";import"./chunk-6XYRR3IV.mjs";export{a as DrawerBody};
1
+ import{useRenderElement as o}from"@jamsrui/hooks";import{useDrawerContext as t}from"./drawer-context";const m=r=>{const{getBodyProps:e}=t();return o("div",{props:[e(r)]})};export{m as DrawerBody};
@@ -1 +1 @@
1
- import{a}from"./chunk-UM7Z4GKN.mjs";import"./chunk-6XYRR3IV.mjs";export{a as DrawerCloseButton};
1
+ import{IconButton as e}from"@jamsrui/icon-button";import{CloseIcon as r}from"@jamsrui/icons";import{useDrawerContext as n}from"./drawer-context";const l=o=>{const{getCloseButtonProps:t}=n();return React.createElement(e,{label:"Close Drawer",...t(o)},React.createElement(r,{className:"size-4"}))};export{l as DrawerCloseButton};
@@ -1 +1 @@
1
- import{a}from"./chunk-MIPPECRL.mjs";import"./chunk-6XYRR3IV.mjs";export{a as DrawerCloseTrigger};
1
+ import{cloneElement as t,isValidElement as n}from"react";import{useDrawerContext as l}from"./drawer-context";const a=r=>{const{children:e}=r,{getTriggerCloseProps:o}=l();return n(e)?t(e,o()):(console.warn("Invalid children passed to DialogCloseTrigger"),null)};export{a as DrawerCloseTrigger};
@@ -1 +1 @@
1
- import{a,b}from"./chunk-GUMSFI7G.mjs";export{a as DrawerConfig,b as useDrawerConfig};
1
+ import{createConfigContext as r}from"@jamsrui/utils";const[e,a]=r({displayName:"DrawerConfig"});export{e as DrawerConfig,a as useDrawerConfig};
@@ -1 +1 @@
1
- import{a}from"./chunk-SOXQFYXF.mjs";import"./chunk-WBBF5BOV.mjs";import"./chunk-UM7Z4GKN.mjs";import"./chunk-6XYRR3IV.mjs";export{a as DrawerContent};
1
+ import{FloatingOverlay as a,FloatingPortal as m}from"@floating-ui/react";import{AnimatePresence as p,motion as s}from"motion/react";import{DrawerCloseButton as l}from"./drawer-close-button";import{useDrawerContext as c}from"./drawer-context";import{DrawerPopover as P}from"./drawer-popover";const D=o=>{const{children:r}=o,{getContentProps:e,isOpen:t,getBackdropProps:n,hideCloseButton:i}=c();return React.createElement(p,null,t?React.createElement(m,null,React.createElement(a,{...n()},React.createElement(P,null,React.createElement(s.div,{...e(o)},!i&&React.createElement(l,null),r)))):null)};export{D as DrawerContent};
@@ -1 +1 @@
1
- import{a,b}from"./chunk-6XYRR3IV.mjs";export{a as DrawerContext,b as useDrawerContext};
1
+ import{createContext as r,use as t}from"react";const o=r(null),s=()=>{const e=t(o);if(!e)throw new Error("useDrawerContext must be used within DrawerContext");return e};export{o as DrawerContext,s as useDrawerContext};
@@ -1 +1 @@
1
- import{a}from"./chunk-BP77MJVR.mjs";import"./chunk-6XYRR3IV.mjs";export{a as DrawerFooter};
1
+ import{useRenderElement as o}from"@jamsrui/hooks";import{useDrawerContext as t}from"./drawer-context";const m=r=>{const{getFooterProps:e}=t();return o("div",{props:[e(r)]})};export{m as DrawerFooter};
@@ -1 +1 @@
1
- import{a}from"./chunk-KNT3NBAB.mjs";import"./chunk-6XYRR3IV.mjs";export{a as DrawerHeader};
1
+ import{useRenderElement as t}from"@jamsrui/hooks";import{useDrawerContext as o}from"./drawer-context";const a=e=>{const{getHeaderProps:r}=o();return t("div",{props:[r(e)]})};export{a as DrawerHeader};
@@ -1 +1 @@
1
- import{a}from"./chunk-WBBF5BOV.mjs";import"./chunk-6XYRR3IV.mjs";export{a as DrawerPopover};
1
+ import{useRenderElement as o}from"@jamsrui/hooks";import{useDrawerContext as t}from"./drawer-context";const m=r=>{const{getPopoverProps:e}=t();return o("div",{props:[e(r)]})};export{m as DrawerPopover};
@@ -1 +1 @@
1
- import{a}from"./chunk-ILBTUKZ5.mjs";import"./chunk-6XYRR3IV.mjs";export{a as DrawerTrigger};
1
+ import{cloneElement as n,isValidElement as o}from"react";import{useDrawerContext as i}from"./drawer-context";const c=e=>{const{children:r}=e,{getTriggerProps:t}=i();return o(r)?n(r,t()):(console.warn("Invalid children passed to DialogTrigger"),null)};export{c as DrawerTrigger};
package/dist/drawer.mjs CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-LVXR3WXC.mjs";import"./chunk-FLLYJJRJ.mjs";import"./chunk-X6T6A5NL.mjs";import"./chunk-GUMSFI7G.mjs";import"./chunk-6XYRR3IV.mjs";export{a as Drawer};
1
+ import{mergeConfigProps as a}from"@jamsrui/utils";import{useDrawerConfig as s}from"./drawer-config";import{DrawerContext as c}from"./drawer-context";import{useDrawer as m}from"./use-drawer";const D=r=>{const{children:o}=r,e=s(),t=a(e,e,r),n=m(t);return React.createElement(c,{value:n},o)};export{D as Drawer};
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- "use client";import{a as m}from"./chunk-ILBTUKZ5.mjs";import{a as p}from"./chunk-LVXR3WXC.mjs";import"./chunk-FLLYJJRJ.mjs";import"./chunk-X6T6A5NL.mjs";import{a as r}from"./chunk-KWIHRWXQ.mjs";import{a as o}from"./chunk-MIPPECRL.mjs";import{a as t,b as a}from"./chunk-GUMSFI7G.mjs";import{a as f}from"./chunk-SOXQFYXF.mjs";import"./chunk-WBBF5BOV.mjs";import{a as e}from"./chunk-UM7Z4GKN.mjs";import{a as w}from"./chunk-BP77MJVR.mjs";import{a as D}from"./chunk-KNT3NBAB.mjs";import"./chunk-6XYRR3IV.mjs";export{p as Drawer,r as DrawerBody,e as DrawerCloseButton,o as DrawerCloseTrigger,t as DrawerConfig,f as DrawerContent,w as DrawerFooter,D as DrawerHeader,m as DrawerTrigger,a as useDrawerConfig};
1
+ "use client";import{Drawer as o}from"./drawer";import{DrawerBody as a}from"./drawer-body";import{DrawerCloseButton as w}from"./drawer-close-button";import{DrawerCloseTrigger as m}from"./drawer-close-trigger";import{DrawerConfig as x,useDrawerConfig as g}from"./drawer-config";import{DrawerContent as i}from"./drawer-content";import{DrawerFooter as s}from"./drawer-footer";import{DrawerHeader as u}from"./drawer-header";import{DrawerTrigger as B}from"./drawer-trigger";export{o as Drawer,a as DrawerBody,w as DrawerCloseButton,m as DrawerCloseTrigger,x as DrawerConfig,i as DrawerContent,s as DrawerFooter,u as DrawerHeader,B as DrawerTrigger,g as useDrawerConfig};
package/dist/styles.mjs CHANGED
@@ -1 +1 @@
1
- import{a,b}from"./chunk-X6T6A5NL.mjs";export{b as drawerVariants,a as test};
1
+ import{radiusVariant as t,tv as o}from"@jamsrui/utils";const e="",a=o({slots:{backdrop:"z-backdrop !overflow-hidden",popover:"z-dialog",content:"absolute flex w-full flex-col overflow-y-auto bg-surface shadow-sm",header:"p-4",footer:"flex justify-end gap-2 p-4",body:"grow p-4",closeButton:"absolute right-4 top-4"},variants:{anchor:{left:{content:"left-0 top-0 h-dvh"},right:{content:"right-0 top-0 h-dvh"},top:{content:"left-0 top-0"},bottom:{content:"bottom-0 left-0"}},size:{xs:{content:"max-w-xs"},sm:{content:"max-w-sm"},md:{content:"max-w-md"},lg:{content:"max-w-lg"},xl:{content:"max-w-xl"},"2xl":{content:"max-w-2xl"},"3xl":{content:"max-w-3xl"},"4xl":{content:"max-w-4xl"},"5xl":{content:"max-w-5xl"},full:{content:"m-0 h-dvh max-w-full !rounded-none sm:m-0"}},isBordered:{true:{header:"border-b border-divider",footer:"border-t border-storke-primary"}},scrollBehavior:{inside:{body:"overflow-y-auto"},outside:{}},backdrop:{transparent:{backdrop:""},opaque:{backdrop:"bg-black/50"},blur:{backdrop:"bg-black/30 backdrop-blur-md backdrop-saturate-150"}},radius:t("content")},compoundVariants:[{anchor:["top","bottom"],className:{content:"w-full !max-w-full"}}],defaultVariants:{scrollBehavior:"inside",size:"lg",isBordered:!1,backdrop:"opaque",anchor:"right",radius:"none"}});export{a as drawerVariants,e as test};
@@ -1 +1 @@
1
- import{a}from"./chunk-FLLYJJRJ.mjs";import"./chunk-X6T6A5NL.mjs";export{a as useDrawer};
1
+ import{useCallback as t,useMemo as j}from"react";import{useClick as z,useDismiss as A,useFloating as E,useInteractions as $,useRole as q}from"@floating-ui/react";import{useControlledState as J}from"@jamsrui/hooks";import{cn as a,dataAttrDev as n,mapPropsVariants as L,mergeProps as p}from"@jamsrui/utils";import{drawerVariants as O}from"./styles";const _=k=>{const[x,G]=L(k,O.variantKeys),{classNames:s,slotProps:e,defaultOpen:S,isOpen:T,onOpenChange:H,isDismissible:I,isKeyboardDismissible:K,hideCloseButton:d=!1}=x,r=O(G),[i,m]=J({defaultProp:S,onChange:H,prop:T}),{context:l,refs:{setFloating:P,setReference:u}}=E({open:i,onOpenChange:m}),M=z(l,{enabled:!0}),V=A(l,{escapeKey:K,outsidePressEvent:"click",outsidePress:I}),R=q(l),U=$([M,V,R]),{getFloatingProps:f,getReferenceProps:g}=U,c=t(()=>{m(!1)},[m]),y=t(o=>({...p(e?.header,o),"data-slot":n("header"),className:r.header({className:a(e?.header?.className,s?.header,o.className)})}),[s?.header,e?.header,r]),w=t(o=>({...p(e?.footer,o),"data-slot":n("footer"),className:r.footer({className:a(e?.footer?.className,s?.footer,o.className)})}),[s?.footer,e?.footer,r]),D=t(o=>({...p(e?.body,o),"data-slot":n("body"),className:r.body({className:a(e?.body?.className,s?.body,o.className)})}),[s?.body,e?.body,r]),N=t(o=>({...p(e?.popover,o),"data-slot":n("popover"),className:r.popover({className:a(e?.popover?.className,s?.popover,o.className)}),ref:P,...f()}),[s?.popover,f,P,e?.popover,r]),b=t(o=>({...p(e?.content,o),"data-slot":n("content"),className:r.content({className:a(e?.content?.className,s?.content,o.className)}),initial:{opacity:0,x:"100%",transition:{type:"spring",stiffness:180,damping:30,mass:.9}},animate:{opacity:1,x:0,transition:{type:"spring",stiffness:120,damping:20,mass:.8}},exit:{opacity:0,x:"100%",transition:{type:"spring",stiffness:300,damping:30,mass:.6}}}),[s?.content,e?.content,r]),C=t(o=>({...p(e?.closeButton,o),"data-slot":n("closeButton"),className:r.closeButton({className:a(e?.closeButton?.className,s?.closeButton,o.className)}),radius:"full",size:"xs",onClick:c}),[s?.closeButton,c,e?.closeButton,r]),v=t(()=>({lockScroll:!0,"data-slot":n("backdrop"),className:r.backdrop({className:a(s?.backdrop)})}),[s?.backdrop,r]),B=t(()=>({context:l,modal:!0}),[l]),h=t(()=>({...g({ref:u})}),[g,u]),F=t(()=>({onClick:c}),[c]);return j(()=>({getHeaderProps:y,getFooterProps:w,getBodyProps:D,getContentProps:b,getCloseButtonProps:C,getBackdropProps:v,getFocusManagerProps:B,getTriggerProps:h,getTriggerCloseProps:F,isOpen:i,getPopoverProps:N,hideCloseButton:d}),[y,w,D,b,C,v,B,h,F,i,N,d])};export{_ as useDrawer};
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@jamsrui/drawer",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "peerDependencies": {
5
5
  "motion": ">=12",
6
6
  "react": ">=19"
7
7
  },
8
8
  "dependencies": {
9
9
  "@floating-ui/react": ">=0.27",
10
- "@jamsrui/hooks": "^0.0.2",
11
- "@jamsrui/icon-button": "^0.0.2",
12
- "@jamsrui/icons": "^0.0.2",
13
- "@jamsrui/core": "^0.0.2",
14
- "@jamsrui/utils": "^0.0.2"
10
+ "@jamsrui/core": "^0.0.3",
11
+ "@jamsrui/icon-button": "^0.0.3",
12
+ "@jamsrui/utils": "^0.0.3",
13
+ "@jamsrui/hooks": "^0.0.3",
14
+ "@jamsrui/icons": "^0.0.3"
15
15
  },
16
16
  "exports": {
17
17
  ".": {
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkL4VK5JCOjs = require('./chunk-L4VK5JCO.js');var _iconbutton = require('@jamsrui/icon-button');var _icons = require('@jamsrui/icons');var l=t=>{let{getCloseButtonProps:e}=_chunkL4VK5JCOjs.b.call(void 0, );return React.createElement(_iconbutton.IconButton,{label:"Close Drawer",...e(t)},React.createElement(_icons.CloseIcon,{className:"size-4"}))};exports.a = l;
@@ -1 +0,0 @@
1
- import{createContext as r,use as t}from"react";var o=r(null),s=()=>{let e=t(o);if(!e)throw new Error("useDrawerContext must be used within DrawerContext");return e};export{o as a,s as b};
@@ -1 +0,0 @@
1
- import{b as r}from"./chunk-6XYRR3IV.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var m=e=>{let{getFooterProps:o}=r();return t("div",{props:[o(e)]})};export{m as a};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkL4VK5JCOjs = require('./chunk-L4VK5JCO.js');var _hooks = require('@jamsrui/hooks');var m=e=>{let{getBodyProps:o}=_chunkL4VK5JCOjs.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "div",{props:[o(e)]})};exports.a = m;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _utils = require('@jamsrui/utils');var e="",a= exports.b =_utils.tv.call(void 0, {slots:{backdrop:"z-backdrop !overflow-hidden",popover:"z-dialog",content:"absolute flex w-full flex-col overflow-y-auto bg-surface shadow-sm",header:"p-4",footer:"flex justify-end gap-2 p-4",body:"grow p-4",closeButton:"absolute right-4 top-4"},variants:{anchor:{left:{content:"left-0 top-0 h-dvh"},right:{content:"right-0 top-0 h-dvh"},top:{content:"left-0 top-0"},bottom:{content:"bottom-0 left-0"}},size:{xs:{content:"max-w-xs"},sm:{content:"max-w-sm"},md:{content:"max-w-md"},lg:{content:"max-w-lg"},xl:{content:"max-w-xl"},"2xl":{content:"max-w-2xl"},"3xl":{content:"max-w-3xl"},"4xl":{content:"max-w-4xl"},"5xl":{content:"max-w-5xl"},full:{content:"m-0 h-dvh max-w-full !rounded-none sm:m-0"}},isBordered:{true:{header:"border-b border-divider",footer:"border-t border-storke-primary"}},scrollBehavior:{inside:{body:"overflow-y-auto"},outside:{}},backdrop:{transparent:{backdrop:""},opaque:{backdrop:"bg-black/50"},blur:{backdrop:"bg-black/30 backdrop-blur-md backdrop-saturate-150"}},radius:_utils.radiusVariant.call(void 0, "content")},compoundVariants:[{anchor:["top","bottom"],className:{content:"w-full !max-w-full"}}],defaultVariants:{scrollBehavior:"inside",size:"lg",isBordered:!1,backdrop:"opaque",anchor:"right",radius:"none"}});exports.a = e; exports.b = a;
@@ -1 +0,0 @@
1
- import{b as d}from"./chunk-X6T6A5NL.mjs";import{useCallback as t,useMemo as j}from"react";import{useClick as z,useDismiss as A,useFloating as E,useInteractions as $,useRole as q}from"@floating-ui/react";import{useControlledState as J}from"@jamsrui/hooks";import{cn as a,dataAttrDev as n,mapPropsVariants as L,mergeProps as p}from"@jamsrui/utils";var _=k=>{let[x,G]=L(k,d.variantKeys),{classNames:s,slotProps:e,defaultOpen:S,isOpen:T,onOpenChange:H,isDismissible:I,isKeyboardDismissible:K,hideCloseButton:P=!1}=x,r=d(G),[i,m]=J({defaultProp:S,onChange:H,prop:T}),{context:l,refs:{setFloating:u,setReference:f}}=E({open:i,onOpenChange:m}),M=z(l,{enabled:!0}),V=A(l,{escapeKey:K,outsidePressEvent:"click",outsidePress:I}),R=q(l),U=$([M,V,R]),{getFloatingProps:g,getReferenceProps:y}=U,c=t(()=>{m(!1)},[m]),w=t(o=>({...p(e?.header,o),"data-slot":n("header"),className:r.header({className:a(e?.header?.className,s?.header,o.className)})}),[s?.header,e?.header,r]),D=t(o=>({...p(e?.footer,o),"data-slot":n("footer"),className:r.footer({className:a(e?.footer?.className,s?.footer,o.className)})}),[s?.footer,e?.footer,r]),N=t(o=>({...p(e?.body,o),"data-slot":n("body"),className:r.body({className:a(e?.body?.className,s?.body,o.className)})}),[s?.body,e?.body,r]),b=t(o=>({...p(e?.popover,o),"data-slot":n("popover"),className:r.popover({className:a(e?.popover?.className,s?.popover,o.className)}),ref:u,...g()}),[s?.popover,g,u,e?.popover,r]),C=t(o=>({...p(e?.content,o),"data-slot":n("content"),className:r.content({className:a(e?.content?.className,s?.content,o.className)}),initial:{opacity:0,x:"100%",transition:{type:"spring",stiffness:180,damping:30,mass:.9}},animate:{opacity:1,x:0,transition:{type:"spring",stiffness:120,damping:20,mass:.8}},exit:{opacity:0,x:"100%",transition:{type:"spring",stiffness:300,damping:30,mass:.6}}}),[s?.content,e?.content,r]),v=t(o=>({...p(e?.closeButton,o),"data-slot":n("closeButton"),className:r.closeButton({className:a(e?.closeButton?.className,s?.closeButton,o.className)}),radius:"full",size:"xs",onClick:c}),[s?.closeButton,c,e?.closeButton,r]),B=t(()=>({lockScroll:!0,"data-slot":n("backdrop"),className:r.backdrop({className:a(s?.backdrop)})}),[s?.backdrop,r]),h=t(()=>({context:l,modal:!0}),[l]),F=t(()=>({...y({ref:f})}),[y,f]),O=t(()=>({onClick:c}),[c]);return j(()=>({getHeaderProps:w,getFooterProps:D,getBodyProps:N,getContentProps:C,getCloseButtonProps:v,getBackdropProps:B,getFocusManagerProps:h,getTriggerProps:F,getTriggerCloseProps:O,isOpen:i,getPopoverProps:b,hideCloseButton:P}),[w,D,N,C,v,B,h,F,O,i,b,P])};export{_ as a};
@@ -1 +0,0 @@
1
- import{createConfigContext as r}from"@jamsrui/utils";var[e,a]=r({displayName:"DrawerConfig"});export{e as a,a as b};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkL4VK5JCOjs = require('./chunk-L4VK5JCO.js');var _react = require('react');var c=t=>{let{children:r}=t,{getTriggerProps:n}=_chunkL4VK5JCOjs.b.call(void 0, );return _react.isValidElement.call(void 0, r)?_react.cloneElement.call(void 0, r,n()):(console.warn("Invalid children passed to DialogTrigger"),null)};exports.a = c;
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk-6XYRR3IV.mjs";import{cloneElement as o,isValidElement as i}from"react";var c=t=>{let{children:r}=t,{getTriggerProps:n}=e();return i(r)?o(r,n()):(console.warn("Invalid children passed to DialogTrigger"),null)};export{c as a};
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk-6XYRR3IV.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var a=r=>{let{getHeaderProps:t}=e();return o("div",{props:[t(r)]})};export{a};
@@ -1 +0,0 @@
1
- import{b as r}from"./chunk-6XYRR3IV.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var m=e=>{let{getBodyProps:o}=r();return t("div",{props:[o(e)]})};export{m as a};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _react = require('react');var o=_react.createContext.call(void 0, null),s= exports.b =()=>{let e=_react.use.call(void 0, o);if(!e)throw new Error("useDrawerContext must be used within DrawerContext");return e};exports.a = o; exports.b = s;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkL4VK5JCOjs = require('./chunk-L4VK5JCO.js');var _hooks = require('@jamsrui/hooks');var m=e=>{let{getPopoverProps:o}=_chunkL4VK5JCOjs.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "div",{props:[o(e)]})};exports.a = m;
@@ -1 +0,0 @@
1
- import{a as n}from"./chunk-FLLYJJRJ.mjs";import{b as t}from"./chunk-GUMSFI7G.mjs";import{a as o}from"./chunk-6XYRR3IV.mjs";import{mergeConfigProps as m}from"@jamsrui/utils";var D=r=>{let{children:a}=r,e=t(),s=m(e,e,r),c=n(s);return React.createElement(o,{value:c},a)};export{D as a};
@@ -1 +0,0 @@
1
- import{b as r}from"./chunk-6XYRR3IV.mjs";import{cloneElement as n,isValidElement as l}from"react";var a=o=>{let{children:e}=o,{getTriggerCloseProps:t}=r();return l(e)?n(e,t()):(console.warn("Invalid children passed to DialogCloseTrigger"),null)};export{a};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkEBAXPVZKjs = require('./chunk-EBAXPVZK.js');var _react = require('react');var _react3 = require('@floating-ui/react');var _hooks = require('@jamsrui/hooks');var _utils = require('@jamsrui/utils');var _=k=>{let[x,G]=_utils.mapPropsVariants.call(void 0, k,_chunkEBAXPVZKjs.b.variantKeys),{classNames:s,slotProps:e,defaultOpen:S,isOpen:T,onOpenChange:H,isDismissible:I,isKeyboardDismissible:K,hideCloseButton:P=!1}=x,r=_chunkEBAXPVZKjs.b.call(void 0, G),[i,m]=_hooks.useControlledState.call(void 0, {defaultProp:S,onChange:H,prop:T}),{context:l,refs:{setFloating:u,setReference:f}}=_react3.useFloating.call(void 0, {open:i,onOpenChange:m}),M=_react3.useClick.call(void 0, l,{enabled:!0}),V=_react3.useDismiss.call(void 0, l,{escapeKey:K,outsidePressEvent:"click",outsidePress:I}),R=_react3.useRole.call(void 0, l),U=_react3.useInteractions.call(void 0, [M,V,R]),{getFloatingProps:g,getReferenceProps:y}=U,c=_react.useCallback.call(void 0, ()=>{m(!1)},[m]),w=_react.useCallback.call(void 0, o=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _2 => _2.header]),o),"data-slot":_utils.dataAttrDev.call(void 0, "header"),className:r.header({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _3 => _3.header, 'optionalAccess', _4 => _4.className]),_optionalChain([s, 'optionalAccess', _5 => _5.header]),o.className)})}),[_optionalChain([s, 'optionalAccess', _6 => _6.header]),_optionalChain([e, 'optionalAccess', _7 => _7.header]),r]),D=_react.useCallback.call(void 0, o=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _8 => _8.footer]),o),"data-slot":_utils.dataAttrDev.call(void 0, "footer"),className:r.footer({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _9 => _9.footer, 'optionalAccess', _10 => _10.className]),_optionalChain([s, 'optionalAccess', _11 => _11.footer]),o.className)})}),[_optionalChain([s, 'optionalAccess', _12 => _12.footer]),_optionalChain([e, 'optionalAccess', _13 => _13.footer]),r]),N=_react.useCallback.call(void 0, o=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _14 => _14.body]),o),"data-slot":_utils.dataAttrDev.call(void 0, "body"),className:r.body({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _15 => _15.body, 'optionalAccess', _16 => _16.className]),_optionalChain([s, 'optionalAccess', _17 => _17.body]),o.className)})}),[_optionalChain([s, 'optionalAccess', _18 => _18.body]),_optionalChain([e, 'optionalAccess', _19 => _19.body]),r]),b=_react.useCallback.call(void 0, o=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _20 => _20.popover]),o),"data-slot":_utils.dataAttrDev.call(void 0, "popover"),className:r.popover({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _21 => _21.popover, 'optionalAccess', _22 => _22.className]),_optionalChain([s, 'optionalAccess', _23 => _23.popover]),o.className)}),ref:u,...g()}),[_optionalChain([s, 'optionalAccess', _24 => _24.popover]),g,u,_optionalChain([e, 'optionalAccess', _25 => _25.popover]),r]),C=_react.useCallback.call(void 0, o=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _26 => _26.content]),o),"data-slot":_utils.dataAttrDev.call(void 0, "content"),className:r.content({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _27 => _27.content, 'optionalAccess', _28 => _28.className]),_optionalChain([s, 'optionalAccess', _29 => _29.content]),o.className)}),initial:{opacity:0,x:"100%",transition:{type:"spring",stiffness:180,damping:30,mass:.9}},animate:{opacity:1,x:0,transition:{type:"spring",stiffness:120,damping:20,mass:.8}},exit:{opacity:0,x:"100%",transition:{type:"spring",stiffness:300,damping:30,mass:.6}}}),[_optionalChain([s, 'optionalAccess', _30 => _30.content]),_optionalChain([e, 'optionalAccess', _31 => _31.content]),r]),v=_react.useCallback.call(void 0, o=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _32 => _32.closeButton]),o),"data-slot":_utils.dataAttrDev.call(void 0, "closeButton"),className:r.closeButton({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _33 => _33.closeButton, 'optionalAccess', _34 => _34.className]),_optionalChain([s, 'optionalAccess', _35 => _35.closeButton]),o.className)}),radius:"full",size:"xs",onClick:c}),[_optionalChain([s, 'optionalAccess', _36 => _36.closeButton]),c,_optionalChain([e, 'optionalAccess', _37 => _37.closeButton]),r]),B=_react.useCallback.call(void 0, ()=>({lockScroll:!0,"data-slot":_utils.dataAttrDev.call(void 0, "backdrop"),className:r.backdrop({className:_utils.cn.call(void 0, _optionalChain([s, 'optionalAccess', _38 => _38.backdrop]))})}),[_optionalChain([s, 'optionalAccess', _39 => _39.backdrop]),r]),h=_react.useCallback.call(void 0, ()=>({context:l,modal:!0}),[l]),F=_react.useCallback.call(void 0, ()=>({...y({ref:f})}),[y,f]),O=_react.useCallback.call(void 0, ()=>({onClick:c}),[c]);return _react.useMemo.call(void 0, ()=>({getHeaderProps:w,getFooterProps:D,getBodyProps:N,getContentProps:C,getCloseButtonProps:v,getBackdropProps:B,getFocusManagerProps:h,getTriggerProps:F,getTriggerCloseProps:O,isOpen:i,getPopoverProps:b,hideCloseButton:P}),[w,D,N,C,v,B,h,F,O,i,b,P])};exports.a = _;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkL4VK5JCOjs = require('./chunk-L4VK5JCO.js');var _react = require('react');var a=o=>{let{children:e}=o,{getTriggerCloseProps:t}=_chunkL4VK5JCOjs.b.call(void 0, );return _react.isValidElement.call(void 0, e)?_react.cloneElement.call(void 0, e,t()):(console.warn("Invalid children passed to DialogCloseTrigger"),null)};exports.a = a;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkND7OMDLNjs = require('./chunk-ND7OMDLN.js');var _chunkZLIR7YT7js = require('./chunk-ZLIR7YT7.js');var _chunkL4VK5JCOjs = require('./chunk-L4VK5JCO.js');var _utils = require('@jamsrui/utils');var D=r=>{let{children:a}=r,e=_chunkZLIR7YT7js.b.call(void 0, ),s=_utils.mergeConfigProps.call(void 0, e,e,r),c=_chunkND7OMDLNjs.a.call(void 0, s);return React.createElement(_chunkL4VK5JCOjs.a,{value:c},a)};exports.a = D;
@@ -1 +0,0 @@
1
- import{a as t}from"./chunk-WBBF5BOV.mjs";import{a as e}from"./chunk-UM7Z4GKN.mjs";import{b as r}from"./chunk-6XYRR3IV.mjs";import{FloatingOverlay as s,FloatingPortal as l}from"@floating-ui/react";import{AnimatePresence as c,motion as P}from"motion/react";var D=o=>{let{children:n}=o,{getContentProps:i,isOpen:a,getBackdropProps:m,hideCloseButton:p}=r();return React.createElement(c,null,a?React.createElement(l,null,React.createElement(s,{...m()},React.createElement(t,null,React.createElement(P.div,{...i(o)},!p&&React.createElement(e,null),n)))):null)};export{D as a};
@@ -1 +0,0 @@
1
- import{b as o}from"./chunk-6XYRR3IV.mjs";import{IconButton as r}from"@jamsrui/icon-button";import{CloseIcon as n}from"@jamsrui/icons";var l=t=>{let{getCloseButtonProps:e}=o();return React.createElement(r,{label:"Close Drawer",...e(t)},React.createElement(n,{className:"size-4"}))};export{l as a};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLJQ6DDUHjs = require('./chunk-LJQ6DDUH.js');var _chunk5LGURIDYjs = require('./chunk-5LGURIDY.js');var _chunkL4VK5JCOjs = require('./chunk-L4VK5JCO.js');var _react = require('@floating-ui/react');var _react3 = require('motion/react');var D=o=>{let{children:n}=o,{getContentProps:i,isOpen:a,getBackdropProps:m,hideCloseButton:p}=_chunkL4VK5JCOjs.b.call(void 0, );return React.createElement(_react3.AnimatePresence,null,a?React.createElement(_react.FloatingPortal,null,React.createElement(_react.FloatingOverlay,{...m()},React.createElement(_chunkLJQ6DDUHjs.a,null,React.createElement(_react3.motion.div,{...i(o)},!p&&React.createElement(_chunk5LGURIDYjs.a,null),n)))):null)};exports.a = D;
@@ -1 +0,0 @@
1
- import{b as r}from"./chunk-6XYRR3IV.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var m=e=>{let{getPopoverProps:o}=r();return t("div",{props:[o(e)]})};export{m as a};
@@ -1 +0,0 @@
1
- import{radiusVariant as t,tv as o}from"@jamsrui/utils";var e="",a=o({slots:{backdrop:"z-backdrop !overflow-hidden",popover:"z-dialog",content:"absolute flex w-full flex-col overflow-y-auto bg-surface shadow-sm",header:"p-4",footer:"flex justify-end gap-2 p-4",body:"grow p-4",closeButton:"absolute right-4 top-4"},variants:{anchor:{left:{content:"left-0 top-0 h-dvh"},right:{content:"right-0 top-0 h-dvh"},top:{content:"left-0 top-0"},bottom:{content:"bottom-0 left-0"}},size:{xs:{content:"max-w-xs"},sm:{content:"max-w-sm"},md:{content:"max-w-md"},lg:{content:"max-w-lg"},xl:{content:"max-w-xl"},"2xl":{content:"max-w-2xl"},"3xl":{content:"max-w-3xl"},"4xl":{content:"max-w-4xl"},"5xl":{content:"max-w-5xl"},full:{content:"m-0 h-dvh max-w-full !rounded-none sm:m-0"}},isBordered:{true:{header:"border-b border-divider",footer:"border-t border-storke-primary"}},scrollBehavior:{inside:{body:"overflow-y-auto"},outside:{}},backdrop:{transparent:{backdrop:""},opaque:{backdrop:"bg-black/50"},blur:{backdrop:"bg-black/30 backdrop-blur-md backdrop-saturate-150"}},radius:t("content")},compoundVariants:[{anchor:["top","bottom"],className:{content:"w-full !max-w-full"}}],defaultVariants:{scrollBehavior:"inside",size:"lg",isBordered:!1,backdrop:"opaque",anchor:"right",radius:"none"}});export{e as a,a as b};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkL4VK5JCOjs = require('./chunk-L4VK5JCO.js');var _hooks = require('@jamsrui/hooks');var m=e=>{let{getFooterProps:o}=_chunkL4VK5JCOjs.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "div",{props:[o(e)]})};exports.a = m;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkL4VK5JCOjs = require('./chunk-L4VK5JCO.js');var _hooks = require('@jamsrui/hooks');var a=r=>{let{getHeaderProps:t}=_chunkL4VK5JCOjs.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "div",{props:[t(r)]})};exports.a = a;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _utils = require('@jamsrui/utils');var[e,a]=_utils.createConfigContext.call(void 0, {displayName:"DrawerConfig"});exports.a = e; exports.b = a;
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import { UIProps } from '@jamsrui/utils';
3
-
4
- declare const DrawerBody: (props: DrawerBody.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
5
- declare namespace DrawerBody {
6
- interface Props extends UIProps<"div"> {
7
- }
8
- }
9
-
10
- export { DrawerBody };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDIVLCNEYjs = require('./chunk-DIVLCNEY.js');require('./chunk-L4VK5JCO.js');exports.DrawerBody = _chunkDIVLCNEYjs.a;
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import { IconButton } from '@jamsrui/icon-button';
3
-
4
- declare const DrawerCloseButton: (props: DrawerCloseButton.Props) => react.JSX.Element;
5
- declare namespace DrawerCloseButton {
6
- interface Props extends Partial<IconButton.Props> {
7
- }
8
- }
9
-
10
- export { DrawerCloseButton };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5LGURIDYjs = require('./chunk-5LGURIDY.js');require('./chunk-L4VK5JCO.js');exports.DrawerCloseButton = _chunk5LGURIDYjs.a;
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
-
3
- declare const DrawerCloseTrigger: (props: DrawerCloseTrigger.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
4
- declare namespace DrawerCloseTrigger {
5
- interface Props {
6
- children: React.ReactElement;
7
- }
8
- }
9
-
10
- export { DrawerCloseTrigger };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkPNQ3EGNQjs = require('./chunk-PNQ3EGNQ.js');require('./chunk-L4VK5JCO.js');exports.DrawerCloseTrigger = _chunkPNQ3EGNQjs.a;
@@ -1,27 +0,0 @@
1
- import * as react from 'react';
2
- import { GlobalConfigProps } from '@jamsrui/core';
3
- import { Drawer } from './drawer.js';
4
- import './use-drawer.js';
5
- import '@floating-ui/react';
6
- import '@jamsrui/utils';
7
- import './drawer-body.js';
8
- import './drawer-close-button.js';
9
- import '@jamsrui/icon-button';
10
- import './drawer-content.js';
11
- import 'motion/react';
12
- import './drawer-footer.js';
13
- import './drawer-header.js';
14
- import './drawer-popover.js';
15
- import './styles.js';
16
- import 'tailwind-variants';
17
-
18
- declare const useDrawerConfig: () => DrawerConfig.Props;
19
- declare const DrawerConfig: (props: DrawerConfig.Props & {
20
- merge?: boolean;
21
- }) => react.JSX.Element;
22
- declare namespace DrawerConfig {
23
- interface Props extends Drawer.Props, GlobalConfigProps<Drawer.Props> {
24
- }
25
- }
26
-
27
- export { DrawerConfig, useDrawerConfig };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZLIR7YT7js = require('./chunk-ZLIR7YT7.js');exports.DrawerConfig = _chunkZLIR7YT7js.a; exports.useDrawerConfig = _chunkZLIR7YT7js.b;
@@ -1,11 +0,0 @@
1
- import * as react from 'react';
2
- import { HTMLMotionProps } from 'motion/react';
3
-
4
- declare const DrawerContent: (props: DrawerContent.Props) => react.JSX.Element;
5
- declare namespace DrawerContent {
6
- interface Props extends Omit<HTMLMotionProps<"div">, "children"> {
7
- children: React.ReactNode;
8
- }
9
- }
10
-
11
- export { DrawerContent };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVIEG7KXLjs = require('./chunk-VIEG7KXL.js');require('./chunk-LJQ6DDUH.js');require('./chunk-5LGURIDY.js');require('./chunk-L4VK5JCO.js');exports.DrawerContent = _chunkVIEG7KXLjs.a;
@@ -1,23 +0,0 @@
1
- import * as react from 'react';
2
- import { useDrawer } from './use-drawer.js';
3
- import '@floating-ui/react';
4
- import '@jamsrui/utils';
5
- import './drawer-body.js';
6
- import './drawer-close-button.js';
7
- import '@jamsrui/icon-button';
8
- import './drawer-content.js';
9
- import 'motion/react';
10
- import './drawer-footer.js';
11
- import './drawer-header.js';
12
- import './drawer-popover.js';
13
- import './styles.js';
14
- import 'tailwind-variants';
15
-
16
- declare const useDrawerContext: () => DrawerContext.Props;
17
- declare const DrawerContext: react.Context<DrawerContext.Props | null>;
18
- declare namespace DrawerContext {
19
- interface Props extends ReturnType<typeof useDrawer> {
20
- }
21
- }
22
-
23
- export { DrawerContext, useDrawerContext };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkL4VK5JCOjs = require('./chunk-L4VK5JCO.js');exports.DrawerContext = _chunkL4VK5JCOjs.a; exports.useDrawerContext = _chunkL4VK5JCOjs.b;
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import { UIProps } from '@jamsrui/utils';
3
-
4
- declare const DrawerFooter: (props: DrawerFooter.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
5
- declare namespace DrawerFooter {
6
- interface Props extends UIProps<"div"> {
7
- }
8
- }
9
-
10
- export { DrawerFooter };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYIBRX4K7js = require('./chunk-YIBRX4K7.js');require('./chunk-L4VK5JCO.js');exports.DrawerFooter = _chunkYIBRX4K7js.a;
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import { UIProps } from '@jamsrui/utils';
3
-
4
- declare const DrawerHeader: (props: DrawerHeader.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
5
- declare namespace DrawerHeader {
6
- interface Props extends UIProps<"div"> {
7
- }
8
- }
9
-
10
- export { DrawerHeader };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYVT26KKPjs = require('./chunk-YVT26KKP.js');require('./chunk-L4VK5JCO.js');exports.DrawerHeader = _chunkYVT26KKPjs.a;
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import { UIProps } from '@jamsrui/utils';
3
-
4
- declare const DrawerPopover: (props: DrawerPopover.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
5
- declare namespace DrawerPopover {
6
- interface Props extends UIProps<"div"> {
7
- }
8
- }
9
-
10
- export { DrawerPopover };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLJQ6DDUHjs = require('./chunk-LJQ6DDUH.js');require('./chunk-L4VK5JCO.js');exports.DrawerPopover = _chunkLJQ6DDUHjs.a;
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
-
3
- declare const DrawerTrigger: (props: DrawerTrigger.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
4
- declare namespace DrawerTrigger {
5
- interface Props {
6
- children: React.ReactElement;
7
- }
8
- }
9
-
10
- export { DrawerTrigger };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIEFAZ5FAjs = require('./chunk-IEFAZ5FA.js');require('./chunk-L4VK5JCO.js');exports.DrawerTrigger = _chunkIEFAZ5FAjs.a;
package/dist/drawer.d.ts DELETED
@@ -1,23 +0,0 @@
1
- import * as react from 'react';
2
- import { useDrawer } from './use-drawer.js';
3
- import '@floating-ui/react';
4
- import '@jamsrui/utils';
5
- import './drawer-body.js';
6
- import './drawer-close-button.js';
7
- import '@jamsrui/icon-button';
8
- import './drawer-content.js';
9
- import 'motion/react';
10
- import './drawer-footer.js';
11
- import './drawer-header.js';
12
- import './drawer-popover.js';
13
- import './styles.js';
14
- import 'tailwind-variants';
15
-
16
- declare const Drawer: (props: Drawer.Props) => react.JSX.Element;
17
- declare namespace Drawer {
18
- interface Props extends useDrawer.Props {
19
- children: React.ReactNode;
20
- }
21
- }
22
-
23
- export { Drawer };
package/dist/drawer.js DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRD4N3HANjs = require('./chunk-RD4N3HAN.js');require('./chunk-ND7OMDLN.js');require('./chunk-EBAXPVZK.js');require('./chunk-ZLIR7YT7.js');require('./chunk-L4VK5JCO.js');exports.Drawer = _chunkRD4N3HANjs.a;
package/dist/index.d.ts DELETED
@@ -1,19 +0,0 @@
1
- export { Drawer } from './drawer.js';
2
- export { DrawerBody } from './drawer-body.js';
3
- export { DrawerCloseButton } from './drawer-close-button.js';
4
- export { DrawerCloseTrigger } from './drawer-close-trigger.js';
5
- export { DrawerConfig, useDrawerConfig } from './drawer-config.js';
6
- export { DrawerContent } from './drawer-content.js';
7
- export { DrawerFooter } from './drawer-footer.js';
8
- export { DrawerHeader } from './drawer-header.js';
9
- export { DrawerTrigger } from './drawer-trigger.js';
10
- import 'react';
11
- import './use-drawer.js';
12
- import '@floating-ui/react';
13
- import '@jamsrui/utils';
14
- import './drawer-popover.js';
15
- import './styles.js';
16
- import 'tailwind-variants';
17
- import '@jamsrui/icon-button';
18
- import '@jamsrui/core';
19
- import 'motion/react';
package/dist/index.js DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkIEFAZ5FAjs = require('./chunk-IEFAZ5FA.js');var _chunkRD4N3HANjs = require('./chunk-RD4N3HAN.js');require('./chunk-ND7OMDLN.js');require('./chunk-EBAXPVZK.js');var _chunkDIVLCNEYjs = require('./chunk-DIVLCNEY.js');var _chunkPNQ3EGNQjs = require('./chunk-PNQ3EGNQ.js');var _chunkZLIR7YT7js = require('./chunk-ZLIR7YT7.js');var _chunkVIEG7KXLjs = require('./chunk-VIEG7KXL.js');require('./chunk-LJQ6DDUH.js');var _chunk5LGURIDYjs = require('./chunk-5LGURIDY.js');var _chunkYIBRX4K7js = require('./chunk-YIBRX4K7.js');var _chunkYVT26KKPjs = require('./chunk-YVT26KKP.js');require('./chunk-L4VK5JCO.js');exports.Drawer = _chunkRD4N3HANjs.a; exports.DrawerBody = _chunkDIVLCNEYjs.a; exports.DrawerCloseButton = _chunk5LGURIDYjs.a; exports.DrawerCloseTrigger = _chunkPNQ3EGNQjs.a; exports.DrawerConfig = _chunkZLIR7YT7js.a; exports.DrawerContent = _chunkVIEG7KXLjs.a; exports.DrawerFooter = _chunkYIBRX4K7js.a; exports.DrawerHeader = _chunkYVT26KKPjs.a; exports.DrawerTrigger = _chunkIEFAZ5FAjs.a; exports.useDrawerConfig = _chunkZLIR7YT7js.b;
package/dist/styles.d.ts DELETED
@@ -1,273 +0,0 @@
1
- import * as tailwind_variants from 'tailwind-variants';
2
- import { VariantProps } from '@jamsrui/utils';
3
-
4
- declare const test = "";
5
- declare const drawerVariants: tailwind_variants.TVReturnType<{
6
- anchor: {
7
- left: {
8
- content: string;
9
- };
10
- right: {
11
- content: string;
12
- };
13
- top: {
14
- content: string;
15
- };
16
- bottom: {
17
- content: string;
18
- };
19
- };
20
- size: {
21
- xs: {
22
- content: string;
23
- };
24
- sm: {
25
- content: string;
26
- };
27
- md: {
28
- content: string;
29
- };
30
- lg: {
31
- content: string;
32
- };
33
- xl: {
34
- content: string;
35
- };
36
- "2xl": {
37
- content: string;
38
- };
39
- "3xl": {
40
- content: string;
41
- };
42
- "4xl": {
43
- content: string;
44
- };
45
- "5xl": {
46
- content: string;
47
- };
48
- full: {
49
- content: string;
50
- };
51
- };
52
- isBordered: {
53
- true: {
54
- header: string;
55
- footer: string;
56
- };
57
- };
58
- scrollBehavior: {
59
- inside: {
60
- body: string;
61
- };
62
- outside: {};
63
- };
64
- backdrop: {
65
- transparent: {
66
- backdrop: string;
67
- };
68
- opaque: {
69
- backdrop: string;
70
- };
71
- blur: {
72
- backdrop: string;
73
- };
74
- };
75
- radius: {
76
- sm: {};
77
- md: {};
78
- lg: {};
79
- xl: {};
80
- "2xl": {};
81
- "3xl": {};
82
- full: {};
83
- none: {};
84
- };
85
- }, {
86
- backdrop: string;
87
- popover: string;
88
- content: string;
89
- header: string;
90
- footer: string;
91
- body: string;
92
- closeButton: string;
93
- }, undefined, {
94
- anchor: {
95
- left: {
96
- content: string;
97
- };
98
- right: {
99
- content: string;
100
- };
101
- top: {
102
- content: string;
103
- };
104
- bottom: {
105
- content: string;
106
- };
107
- };
108
- size: {
109
- xs: {
110
- content: string;
111
- };
112
- sm: {
113
- content: string;
114
- };
115
- md: {
116
- content: string;
117
- };
118
- lg: {
119
- content: string;
120
- };
121
- xl: {
122
- content: string;
123
- };
124
- "2xl": {
125
- content: string;
126
- };
127
- "3xl": {
128
- content: string;
129
- };
130
- "4xl": {
131
- content: string;
132
- };
133
- "5xl": {
134
- content: string;
135
- };
136
- full: {
137
- content: string;
138
- };
139
- };
140
- isBordered: {
141
- true: {
142
- header: string;
143
- footer: string;
144
- };
145
- };
146
- scrollBehavior: {
147
- inside: {
148
- body: string;
149
- };
150
- outside: {};
151
- };
152
- backdrop: {
153
- transparent: {
154
- backdrop: string;
155
- };
156
- opaque: {
157
- backdrop: string;
158
- };
159
- blur: {
160
- backdrop: string;
161
- };
162
- };
163
- radius: {
164
- sm: {};
165
- md: {};
166
- lg: {};
167
- xl: {};
168
- "2xl": {};
169
- "3xl": {};
170
- full: {};
171
- none: {};
172
- };
173
- }, {
174
- backdrop: string;
175
- popover: string;
176
- content: string;
177
- header: string;
178
- footer: string;
179
- body: string;
180
- closeButton: string;
181
- }, tailwind_variants.TVReturnType<{
182
- anchor: {
183
- left: {
184
- content: string;
185
- };
186
- right: {
187
- content: string;
188
- };
189
- top: {
190
- content: string;
191
- };
192
- bottom: {
193
- content: string;
194
- };
195
- };
196
- size: {
197
- xs: {
198
- content: string;
199
- };
200
- sm: {
201
- content: string;
202
- };
203
- md: {
204
- content: string;
205
- };
206
- lg: {
207
- content: string;
208
- };
209
- xl: {
210
- content: string;
211
- };
212
- "2xl": {
213
- content: string;
214
- };
215
- "3xl": {
216
- content: string;
217
- };
218
- "4xl": {
219
- content: string;
220
- };
221
- "5xl": {
222
- content: string;
223
- };
224
- full: {
225
- content: string;
226
- };
227
- };
228
- isBordered: {
229
- true: {
230
- header: string;
231
- footer: string;
232
- };
233
- };
234
- scrollBehavior: {
235
- inside: {
236
- body: string;
237
- };
238
- outside: {};
239
- };
240
- backdrop: {
241
- transparent: {
242
- backdrop: string;
243
- };
244
- opaque: {
245
- backdrop: string;
246
- };
247
- blur: {
248
- backdrop: string;
249
- };
250
- };
251
- radius: {
252
- sm: {};
253
- md: {};
254
- lg: {};
255
- xl: {};
256
- "2xl": {};
257
- "3xl": {};
258
- full: {};
259
- none: {};
260
- };
261
- }, {
262
- backdrop: string;
263
- popover: string;
264
- content: string;
265
- header: string;
266
- footer: string;
267
- body: string;
268
- closeButton: string;
269
- }, undefined, unknown, unknown, undefined>>;
270
- type DrawerVariants = VariantProps<typeof drawerVariants>;
271
- type DrawerSlots = keyof ReturnType<typeof drawerVariants>;
272
-
273
- export { type DrawerSlots, type DrawerVariants, drawerVariants, test };
package/dist/styles.js DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEBAXPVZKjs = require('./chunk-EBAXPVZK.js');exports.drawerVariants = _chunkEBAXPVZKjs.b; exports.test = _chunkEBAXPVZKjs.a;
@@ -1,53 +0,0 @@
1
- import { FloatingOverlayProps, FloatingFocusManagerProps } from '@floating-ui/react';
2
- import { PropGetter, UIProps, SlotsToClassNames } from '@jamsrui/utils';
3
- import { DrawerBody } from './drawer-body.js';
4
- import { DrawerCloseButton } from './drawer-close-button.js';
5
- import { DrawerContent } from './drawer-content.js';
6
- import { DrawerFooter } from './drawer-footer.js';
7
- import { DrawerHeader } from './drawer-header.js';
8
- import { DrawerPopover } from './drawer-popover.js';
9
- import { DrawerVariants, DrawerSlots } from './styles.js';
10
- import 'react';
11
- import '@jamsrui/icon-button';
12
- import 'motion/react';
13
- import 'tailwind-variants';
14
-
15
- declare const useDrawer: (props: useDrawer.Props) => {
16
- getHeaderProps: PropGetter<DrawerHeader.Props>;
17
- getFooterProps: PropGetter<DrawerFooter.Props>;
18
- getBodyProps: PropGetter<DrawerBody.Props>;
19
- getContentProps: PropGetter<DrawerContent.Props>;
20
- getCloseButtonProps: PropGetter<DrawerCloseButton.Props>;
21
- getBackdropProps: () => FloatingOverlayProps & UIProps<"div">;
22
- getFocusManagerProps: () => Omit<FloatingFocusManagerProps, "children">;
23
- getTriggerProps: () => {
24
- [x: string]: unknown;
25
- };
26
- getTriggerCloseProps: () => {
27
- onClick: () => void;
28
- };
29
- isOpen: boolean;
30
- getPopoverProps: PropGetter<DrawerPopover.Props>;
31
- hideCloseButton: boolean;
32
- };
33
- declare namespace useDrawer {
34
- interface Props extends DrawerVariants {
35
- classNames?: SlotsToClassNames<DrawerSlots>;
36
- slotProps?: {
37
- popover?: DrawerPopover.Props;
38
- header?: DrawerHeader.Props;
39
- footer?: DrawerFooter.Props;
40
- content?: DrawerContent.Props;
41
- body?: DrawerBody.Props;
42
- closeButton?: DrawerCloseButton.Props;
43
- };
44
- defaultOpen?: boolean;
45
- isOpen?: boolean;
46
- onOpenChange?: (open: boolean) => void;
47
- isDismissible?: boolean;
48
- isKeyboardDismissible?: boolean;
49
- hideCloseButton?: boolean;
50
- }
51
- }
52
-
53
- export { useDrawer };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkND7OMDLNjs = require('./chunk-ND7OMDLN.js');require('./chunk-EBAXPVZK.js');exports.useDrawer = _chunkND7OMDLNjs.a;