@alkimi.org/ui-kit 0.6.2 → 0.6.4

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 (47) hide show
  1. package/dist/{chunk-4D3HVOPZ.mjs → chunk-54C6455D.mjs} +2 -2
  2. package/dist/{chunk-HFPE6JXI.mjs → chunk-63WBWGD4.mjs} +2 -2
  3. package/dist/chunk-63WBWGD4.mjs.map +1 -0
  4. package/dist/{chunk-DJHDJF5E.mjs → chunk-AAHRBPPJ.mjs} +2 -2
  5. package/dist/chunk-CDWSOB6B.mjs +3 -0
  6. package/dist/chunk-CDWSOB6B.mjs.map +1 -0
  7. package/dist/{chunk-WKZFO6I3.js → chunk-CV23OQIA.js} +2 -2
  8. package/dist/{chunk-WKZFO6I3.js.map → chunk-CV23OQIA.js.map} +1 -1
  9. package/dist/{chunk-4YTBKYYK.js → chunk-J2IURKGU.js} +2 -2
  10. package/dist/{chunk-4YTBKYYK.js.map → chunk-J2IURKGU.js.map} +1 -1
  11. package/dist/chunk-M3DW2W2P.js +3 -0
  12. package/dist/chunk-M3DW2W2P.js.map +1 -0
  13. package/dist/chunk-O4YZQS4C.mjs +3 -0
  14. package/dist/chunk-O4YZQS4C.mjs.map +1 -0
  15. package/dist/{chunk-ORCCYZMU.js → chunk-QBP3JXZY.js} +2 -2
  16. package/dist/chunk-QBP3JXZY.js.map +1 -0
  17. package/dist/chunk-U32CS2M6.js +3 -0
  18. package/dist/{chunk-MGFKSA3M.js.map → chunk-U32CS2M6.js.map} +1 -1
  19. package/dist/components/checkbox.js +2 -2
  20. package/dist/components/checkbox.js.map +1 -1
  21. package/dist/components/checkbox.mjs +1 -1
  22. package/dist/components/checkbox.mjs.map +1 -1
  23. package/dist/components/combobox.js +1 -1
  24. package/dist/components/combobox.mjs +1 -1
  25. package/dist/components/command.js +1 -1
  26. package/dist/components/command.mjs +1 -1
  27. package/dist/components/dialog.js +1 -1
  28. package/dist/components/dialog.mjs +1 -1
  29. package/dist/components/drawer.js +1 -1
  30. package/dist/components/drawer.mjs +1 -1
  31. package/dist/index.css +1 -1
  32. package/dist/index.css.map +1 -1
  33. package/dist/index.d.mts +2 -0
  34. package/dist/index.d.ts +2 -0
  35. package/dist/index.js +1 -1
  36. package/dist/index.js.map +1 -1
  37. package/dist/index.mjs +1 -1
  38. package/dist/styles.css +1 -1
  39. package/dist/styles.css.map +1 -1
  40. package/package.json +1 -1
  41. package/dist/chunk-DDNTB3TM.mjs +0 -3
  42. package/dist/chunk-DDNTB3TM.mjs.map +0 -1
  43. package/dist/chunk-HFPE6JXI.mjs.map +0 -1
  44. package/dist/chunk-MGFKSA3M.js +0 -3
  45. package/dist/chunk-ORCCYZMU.js.map +0 -1
  46. /package/dist/{chunk-4D3HVOPZ.mjs.map → chunk-54C6455D.mjs.map} +0 -0
  47. /package/dist/{chunk-DJHDJF5E.mjs.map → chunk-AAHRBPPJ.mjs.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alkimi.org/ui-kit",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "packageManager": "pnpm@10.26.0",
5
5
  "description": "A React component library built with shadcn/ui and Tailwind CSS",
6
6
  "main": "./dist/index.js",
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a as f}from"./chunk-4LR7SOCY.mjs";import{b as w}from"./chunk-2YRLGFWP.mjs";import{a as i}from"./chunk-S5TKCF6T.mjs";import*as r from"react";import{X as D}from"lucide-react";import{Drawer as d}from"vaul";import{jsx as t,jsxs as s}from"react/jsx-runtime";var x="24rem",u=r.createContext(null);function R(){let e=r.useContext(u);if(!e)throw new Error("useDrawer must be used within a Drawer component.");return e}var h=r.forwardRef(({isOpen:e,onClose:o,width:a=x,children:n,...l},c)=>{let p=r.useRef(null),m=f("lg"),v=r.useMemo(()=>({isOpen:e,onClose:o,width:a}),[e,o,a]);return s(u.Provider,{value:v,children:[!m&&t(d.Root,{open:e,onOpenChange:b=>{b||o()},direction:"left",children:s(d.Portal,{children:[t(d.Overlay,{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm"}),s(d.Content,{className:"fixed bottom-0 left-0 z-50 flex h-auto max-h-[80vh] w-full flex-col bg-sidebar border-r border-sidebar-border text-primary-accent shadow-lg outline-none","aria-describedby":void 0,children:[t(d.Title,{className:"sr-only",children:"Drawer"}),n]})]})}),m&&s("div",{ref:c,className:"group/drawer peer","data-state":e?"open":"closed",...l,children:[t("div",{className:i("relative bg-sidebar transition-[width] duration-200 ease-linear",e?"":"w-0"),style:{width:e?a:"0"}}),t("div",{ref:p,className:i("fixed inset-y-0 right-0 z-40 h-svh transition-[right,width] duration-200 ease-linear flex",e?"right-0":"right-[calc(var(--drawer-width)*-1)]"),style:{"--drawer-width":a,width:a},children:t("div",{"data-drawer":"drawer",className:"flex h-full w-full flex-col",children:t("div",{className:"flex flex-col my-2.5 mr-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-full shadow",children:n})})})]})]})});h.displayName="Drawer";var y=r.forwardRef(({className:e,showCloseButton:o=!0,children:a,...n},l)=>{let{onClose:c}=R();return s("div",{ref:l,"data-drawer":"header",className:i("flex w-full items-start justify-between gap-2 p-4 border-b border-sidebar-border",e),...n,children:[t("div",{className:"flex-1",children:a}),o&&s(w,{variant:"secondary",size:"icon",onClick:c,className:"h-8 w-8 shrink-0 rounded-full",children:[t(D,{size:16}),t("span",{className:"sr-only",children:"Close drawer"})]})]})});y.displayName="DrawerHeader";var C=r.forwardRef(({className:e,...o},a)=>t("h2",{ref:a,className:i("text-lg font-semibold text-primary-accent",e),...o}));C.displayName="DrawerTitle";var N=r.forwardRef(({className:e,...o},a)=>t("div",{ref:a,"data-drawer":"body",className:i("flex-1 overflow-auto p-4",e),...o}));N.displayName="DrawerBody";var g=r.forwardRef(({className:e,...o},a)=>t("div",{ref:a,"data-drawer":"footer",className:i("flex flex-col gap-2 p-4 border-t border-sidebar-border",e),...o}));g.displayName="DrawerFooter";export{R as a,h as b,y as c,C as d,N as e,g as f};
3
- //# sourceMappingURL=chunk-DDNTB3TM.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/drawer.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { X } from \"lucide-react\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/button\"\nimport { useMediaQuery } from \"@/lib/use-media-query\"\n\nconst DRAWER_WIDTH = \"24rem\"\n\n// Drawer Context\ntype DrawerContextProps = {\n isOpen: boolean\n onClose: () => void\n width?: string\n}\n\nconst DrawerContext = React.createContext<DrawerContextProps | null>(null)\n\nfunction useDrawer() {\n const context = React.useContext(DrawerContext)\n if (!context) {\n throw new Error(\"useDrawer must be used within a Drawer component.\")\n }\n return context\n}\n\n// Main Unified Drawer Component (Responsive)\nconst Drawer = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n isOpen: boolean\n onClose: () => void\n width?: string\n }\n>(({ isOpen, onClose, width = DRAWER_WIDTH, children, ...props }, ref) => {\n const drawerRef = React.useRef<HTMLDivElement>(null)\n const isDesktop = useMediaQuery(\"lg\")\n\n const contextValue = React.useMemo<DrawerContextProps>(\n () => ({\n isOpen,\n onClose,\n width,\n }),\n [isOpen, onClose, width]\n )\n\n return (\n <DrawerContext.Provider value={contextValue}>\n {/* Mobile Drawer: visible < md breakpoint */}\n {!isDesktop && (\n <DrawerPrimitive.Root\n open={isOpen}\n onOpenChange={(open) => {\n if (!open) onClose()\n }}\n direction=\"left\"\n >\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm\" />\n <DrawerPrimitive.Content\n className=\"fixed bottom-0 left-0 z-50 flex h-auto max-h-[80vh] w-full flex-col bg-sidebar border-r border-sidebar-border text-primary-accent shadow-lg outline-none\"\n aria-describedby={undefined}\n >\n <DrawerPrimitive.Title className=\"sr-only\">\n Drawer\n </DrawerPrimitive.Title>\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n </DrawerPrimitive.Root>\n )}\n\n {/* Desktop Drawer: visible >= md breakpoint */}\n {isDesktop && (\n <div\n ref={ref}\n className=\"group/drawer peer\"\n data-state={isOpen ? \"open\" : \"closed\"}\n {...props}\n >\n {/* Spacer to push content */}\n <div\n className={cn(\n \"relative bg-sidebar transition-[width] duration-200 ease-linear\",\n isOpen ? \"\" : \"w-0\"\n )}\n style={\n {\n width: isOpen ? width : \"0\",\n } as React.CSSProperties\n }\n />\n\n {/* Fixed drawer panel */}\n <div\n ref={drawerRef}\n className={cn(\n \"fixed inset-y-0 right-0 z-40 h-svh transition-[right,width] duration-200 ease-linear flex\",\n isOpen ? \"right-0\" : \"right-[calc(var(--drawer-width)*-1)]\"\n )}\n style={\n {\n \"--drawer-width\": width,\n width: width,\n } as React.CSSProperties\n }\n >\n <div data-drawer=\"drawer\" className=\"flex h-full w-full flex-col\">\n <div className=\"flex flex-col my-2.5 mr-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-full shadow\">\n {children}\n </div>\n </div>\n </div>\n </div>\n )}\n </DrawerContext.Provider>\n )\n})\nDrawer.displayName = \"Drawer\"\n\n// Drawer Header\nconst DrawerHeader = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n }\n>(({ className, showCloseButton = true, children, ...props }, ref) => {\n const { onClose } = useDrawer()\n\n return (\n <div\n ref={ref}\n data-drawer=\"header\"\n className={cn(\n \"flex w-full items-start justify-between gap-2 p-4 border-b border-sidebar-border\",\n className\n )}\n {...props}\n >\n <div className=\"flex-1\">{children}</div>\n {showCloseButton && (\n <Button\n variant=\"secondary\"\n size=\"icon\"\n onClick={onClose}\n className=\"h-8 w-8 shrink-0 rounded-full\"\n >\n <X size={16} />\n <span className=\"sr-only\">Close drawer</span>\n </Button>\n )}\n </div>\n )\n})\nDrawerHeader.displayName = \"DrawerHeader\"\n\n// Drawer Title\nconst DrawerTitle = React.forwardRef<\n HTMLHeadingElement,\n React.ComponentProps<\"h2\">\n>(({ className, ...props }, ref) => {\n return (\n <h2\n ref={ref}\n className={cn(\"text-lg font-semibold text-primary-accent\", className)}\n {...props}\n />\n )\n})\nDrawerTitle.displayName = \"DrawerTitle\"\n\n// Drawer Body/Content\nconst DrawerBody = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-drawer=\"body\"\n className={cn(\"flex-1 overflow-auto p-4\", className)}\n {...props}\n />\n )\n})\nDrawerBody.displayName = \"DrawerBody\"\n\n// Drawer Footer\nconst DrawerFooter = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-drawer=\"footer\"\n className={cn(\n \"flex flex-col gap-2 p-4 border-t border-sidebar-border\",\n className\n )}\n {...props}\n />\n )\n})\nDrawerFooter.displayName = \"DrawerFooter\"\n\nexport {\n Drawer,\n DrawerHeader,\n DrawerTitle,\n DrawerBody,\n DrawerFooter,\n useDrawer,\n}\n"],"mappings":";2HAEA,UAAYA,MAAW,QACvB,OAAS,KAAAC,MAAS,eAClB,OAAS,UAAUC,MAAuB,OA0D9B,cAAAC,EACA,QAAAC,MADA,oBApDZ,IAAMC,EAAe,QASfC,EAAsB,gBAAyC,IAAI,EAEzE,SAASC,GAAY,CACnB,IAAMC,EAAgB,aAAWF,CAAa,EAC9C,GAAI,CAACE,EACH,MAAM,IAAI,MAAM,mDAAmD,EAErE,OAAOA,CACT,CAGA,IAAMC,EAAe,aAOnB,CAAC,CAAE,OAAAC,EAAQ,QAAAC,EAAS,MAAAC,EAAQP,EAAc,SAAAQ,EAAU,GAAGC,CAAM,EAAGC,IAAQ,CACxE,IAAMC,EAAkB,SAAuB,IAAI,EAC7CC,EAAYC,EAAc,IAAI,EAE9BC,EAAqB,UACzB,KAAO,CACL,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AACsB,EAAA,CACC,QAAQ,YACR,KAAK,OACL,QAASf,EACT,UAAU,gCAEV,UAAAR,EAACwB,EAAA,CAAE,KAAM,GAAI,EACbxB,EAAC,QAAK,UAAU,UAAU,wBAAY,GACxC,GAEJ,CAEJ,CAAC,EACDoB,EAAa,YAAc,eAG3B,IAAMK,EAAoB,aAGxB,CAAC,CAAE,UAAAJ,EAAW,GAAGV,CAAM,EAAGC,IAExBZ,EAAC,MACC,IAAKY,EACL,UAAWO,EAAG,4CAA6CE,CAAS,EACnE,GAAGV,EACN,CAEH,EACDc,EAAY,YAAc,cAG1B,IAAMC,EAAmB,aAGvB,CAAC,CAAE,UAAAL,EAAW,GAAGV,CAAM,EAAGC,IAExBZ,EAAC,OACC,IAAKY,EACL,cAAY,OACZ,UAAWO,EAAG,2BAA4BE,CAAS,EAClD,GAAGV,EACN,CAEH,EACDe,EAAW,YAAc,aAGzB,IAAMC,EAAqB,aAGzB,CAAC,CAAE,UAAAN,EAAW,GAAGV,CAAM,EAAGC,IAExBZ,EAAC,OACC,IAAKY,EACL,cAAY,SACZ,UAAWO,EACT,yDACAE,CACF,EACC,GAAGV,EACN,CAEH,EACDgB,EAAa,YAAc","names":["React","X","DrawerPrimitive","jsx","jsxs","DRAWER_WIDTH","DrawerContext","useDrawer","context","Drawer","isOpen","onClose","width","children","props","ref","drawerRef","isDesktop","useMediaQuery","contextValue","DrawerPrimitive","open","cn","DrawerHeader","className","showCloseButton","Button","X","DrawerTitle","DrawerBody","DrawerFooter"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/dialog.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"./button\"\nimport { useMediaQuery } from \"@/lib/use-media-query\"\n\ninterface DialogContentContextValue {\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}\n\nconst DialogContentContext = React.createContext<DialogContentContextValue>({})\n\nconst Dialog = ({\n children,\n open: controlledOpen,\n onOpenChange: controlledOnOpenChange,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) => {\n // Use internal state when Dialog is uncontrolled\n const [internalOpen, setInternalOpen] = React.useState(false)\n\n const isControlled = controlledOpen !== undefined\n const open = isControlled ? controlledOpen : internalOpen\n const onOpenChange = isControlled\n ? controlledOnOpenChange\n : (newOpen: boolean) => {\n setInternalOpen(newOpen)\n }\n\n return (\n <DialogPrimitive.Root open={open} onOpenChange={onOpenChange} {...props}>\n <DialogContentContext.Provider value={{ open, onOpenChange }}>\n {children}\n </DialogContentContext.Provider>\n </DialogPrimitive.Root>\n )\n}\nDialog.displayName = \"Dialog\"\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n closeOnOverlayClick?: boolean\n }\n>(\n (\n {\n className,\n children,\n showCloseButton = true,\n closeOnOverlayClick = true,\n ...props\n },\n ref\n ) => {\n const isDesktop = useMediaQuery(\"md\")\n const context = React.useContext(DialogContentContext)\n\n if (!isDesktop) {\n // Mobile: Render as bottom drawer\n return (\n <DialogPortal>\n <DrawerPrimitive.Root\n open={context.open}\n onOpenChange={context.onOpenChange}\n dismissible={closeOnOverlayClick}\n >\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm\" />\n <DrawerPrimitive.Content\n ref={ref as any}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex flex-col rounded-t-3xl border border-border bg-background shadow-lg outline-none\",\n className\n )}\n aria-describedby={undefined}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n <div className=\"mx-auto mt-2 h-2 w-[100px] rounded-full bg-muted\" />\n <div>{children}</div>\n {showCloseButton && (\n <button\n onClick={() => context.onOpenChange?.(false)}\n className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\"\n >\n <Button variant=\"secondary\" size=\"icon\">\n <X className=\"h-4 w-4\" />\n </Button>\n <span className=\"sr-only\">Close</span>\n </button>\n )}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n </DrawerPrimitive.Root>\n </DialogPortal>\n )\n }\n\n // Desktop: Render as centered dialog\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-3xl overflow-auto\",\n className\n )}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\">\n <Button variant=\"secondary\" size=\"icon\">\n <X className=\"h-4 w-4\" />\n </Button>\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n }\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],"mappings":";2HAEA,UAAYA,MAAW,QACvB,UAAY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ACC,UAAWoB,EACT,gEACAF,CACF,EACC,GAAGX,EACN,EAEFyB,EAAa,YAAc,eAE3B,IAAMC,EAAoB,aAGxB,CAAC,CAAE,UAAAf,EAAW,GAAGX,CAAM,EAAGY,IAC1BnB,EAAiB,QAAhB,CACC,IAAKmB,EACL,UAAWC,EACT,oDACAF,CACF,EACC,GAAGX,EACN,CACD,EACD0B,EAAY,YAA8B,QAAM,YAEhD,IAAMC,EAA0B,aAG9B,CAAC,CAAE,UAAAhB,EAAW,GAAGX,CAAM,EAAGY,IAC1BnB,EAAiB,cAAhB,CACC,IAAKmB,EACL,UAAWC,EAAG,gCAAiCF,CAAS,EACvD,GAAGX,EACN,CACD,EACD2B,EAAkB,YAA8B,cAAY","names":["React","DialogPrimitive","DrawerPrimitive","X","jsx","jsxs","DialogContentContext","Dialog","children","controlledOpen","controlledOnOpenChange","props","internalOpen","setInternalOpen","isControlled","open","onOpenChange","newOpen","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","ref","cn","DialogContent","showCloseButton","closeOnOverlayClick","isDesktop","useMediaQuery","context","e","Button","X","DrawerPrimitive","DialogHeader","DialogFooter","DialogTitle","DialogDescription"]}
@@ -1,3 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
2
- var _chunk3BVMHDYAjs = require('./chunk-3BVMHDYA.js');var _chunkQKOZTOYUjs = require('./chunk-QKOZTOYU.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var r = _interopRequireWildcard(_react);var _lucidereact = require('lucide-react');var _vaul = require('vaul');var _jsxruntime = require('react/jsx-runtime');var x="24rem",u=r.createContext(null);function R(){let e=r.useContext(u);if(!e)throw new Error("useDrawer must be used within a Drawer component.");return e}var h=r.forwardRef(({isOpen:e,onClose:o,width:a=x,children:n,...l},c)=>{let p=r.useRef(null),m=_chunk3BVMHDYAjs.a.call(void 0, "lg"),v=r.useMemo(()=>({isOpen:e,onClose:o,width:a}),[e,o,a]);return _jsxruntime.jsxs.call(void 0, u.Provider,{value:v,children:[!m&&_jsxruntime.jsx.call(void 0, _vaul.Drawer.Root,{open:e,onOpenChange:b=>{b||o()},direction:"left",children:_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Portal,{children:[_jsxruntime.jsx.call(void 0, _vaul.Drawer.Overlay,{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm"}),_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Content,{className:"fixed bottom-0 left-0 z-50 flex h-auto max-h-[80vh] w-full flex-col bg-sidebar border-r border-sidebar-border text-primary-accent shadow-lg outline-none","aria-describedby":void 0,children:[_jsxruntime.jsx.call(void 0, _vaul.Drawer.Title,{className:"sr-only",children:"Drawer"}),n]})]})}),m&&_jsxruntime.jsxs.call(void 0, "div",{ref:c,className:"group/drawer peer","data-state":e?"open":"closed",...l,children:[_jsxruntime.jsx.call(void 0, "div",{className:_chunkFUYXCJOQjs.a.call(void 0, "relative bg-sidebar transition-[width] duration-200 ease-linear",e?"":"w-0"),style:{width:e?a:"0"}}),_jsxruntime.jsx.call(void 0, "div",{ref:p,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed inset-y-0 right-0 z-40 h-svh transition-[right,width] duration-200 ease-linear flex",e?"right-0":"right-[calc(var(--drawer-width)*-1)]"),style:{"--drawer-width":a,width:a},children:_jsxruntime.jsx.call(void 0, "div",{"data-drawer":"drawer",className:"flex h-full w-full flex-col",children:_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-col my-2.5 mr-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-full shadow",children:n})})})]})]})});h.displayName="Drawer";var y=r.forwardRef(({className:e,showCloseButton:o=!0,children:a,...n},l)=>{let{onClose:c}=R();return _jsxruntime.jsxs.call(void 0, "div",{ref:l,"data-drawer":"header",className:_chunkFUYXCJOQjs.a.call(void 0, "flex w-full items-start justify-between gap-2 p-4 border-b border-sidebar-border",e),...n,children:[_jsxruntime.jsx.call(void 0, "div",{className:"flex-1",children:a}),o&&_jsxruntime.jsxs.call(void 0, _chunkQKOZTOYUjs.b,{variant:"secondary",size:"icon",onClick:c,className:"h-8 w-8 shrink-0 rounded-full",children:[_jsxruntime.jsx.call(void 0, _lucidereact.X,{size:16}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close drawer"})]})]})});y.displayName="DrawerHeader";var C=r.forwardRef(({className:e,...o},a)=>_jsxruntime.jsx.call(void 0, "h2",{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "text-lg font-semibold text-primary-accent",e),...o}));C.displayName="DrawerTitle";var N=r.forwardRef(({className:e,...o},a)=>_jsxruntime.jsx.call(void 0, "div",{ref:a,"data-drawer":"body",className:_chunkFUYXCJOQjs.a.call(void 0, "flex-1 overflow-auto p-4",e),...o}));N.displayName="DrawerBody";var g=r.forwardRef(({className:e,...o},a)=>_jsxruntime.jsx.call(void 0, "div",{ref:a,"data-drawer":"footer",className:_chunkFUYXCJOQjs.a.call(void 0, "flex flex-col gap-2 p-4 border-t border-sidebar-border",e),...o}));g.displayName="DrawerFooter";exports.a = R; exports.b = h; exports.c = y; exports.d = C; exports.e = N; exports.f = g;
3
- //# sourceMappingURL=chunk-MGFKSA3M.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-ORCCYZMU.js","../src/components/dialog.tsx"],"names":["DialogContentContext","Dialog","children","controlledOpen","controlledOnOpenChange","props","internalOpen","setInternalOpen","isControlled","open","onOpenChange","newOpen","jsx","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","ref","cn","DialogContent","showCloseButton","closeOnOverlayClick","isDesktop","useMediaQuery","context","jsxs","e","Button","X","DrawerPrimitive","DialogHeader","DialogF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AAA,CAAM,WAAA,CAEhD,IAAMC,CAAAA,CAA0B,CAAA,CAAA,UAAA,CAG9B,CAAC,CAAE,SAAA,CAAAjB,CAAAA,CAAW,GAAGZ,CAAM,CAAA,CAAGa,CAAAA,CAAAA,EAC1BN,6BAAAA,CAAiB,CAAA,WAAA,CAAhB,CACC,GAAA,CAAKM,CAAAA,CACL,SAAA,CAAWC,gCAAAA,+BAAG,CAAiCF,CAAS,CAAA,CACvD,GAAGZ,CAAAA,CACN,CACD,CAAA,CACD6B,CAAAA,CAAkB,WAAA,CAA8B,CAAA,CAAA,WAAA,CAAY,WAAA,CAAA,qJAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-ORCCYZMU.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"./button\"\nimport { useMediaQuery } from \"@/lib/use-media-query\"\n\ninterface DialogContentContextValue {\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}\n\nconst DialogContentContext = React.createContext<DialogContentContextValue>({})\n\nconst Dialog = ({\n children,\n open: controlledOpen,\n onOpenChange: controlledOnOpenChange,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) => {\n // Use internal state when Dialog is uncontrolled\n const [internalOpen, setInternalOpen] = React.useState(false)\n\n const isControlled = controlledOpen !== undefined\n const open = isControlled ? controlledOpen : internalOpen\n const onOpenChange = isControlled\n ? controlledOnOpenChange\n : (newOpen: boolean) => {\n setInternalOpen(newOpen)\n }\n\n return (\n <DialogPrimitive.Root open={open} onOpenChange={onOpenChange} {...props}>\n <DialogContentContext.Provider value={{ open, onOpenChange }}>\n {children}\n </DialogContentContext.Provider>\n </DialogPrimitive.Root>\n )\n}\nDialog.displayName = \"Dialog\"\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n closeOnOverlayClick?: boolean\n }\n>(\n (\n {\n className,\n children,\n showCloseButton = true,\n closeOnOverlayClick = true,\n ...props\n },\n ref\n ) => {\n const isDesktop = useMediaQuery(\"md\")\n const context = React.useContext(DialogContentContext)\n\n if (!isDesktop) {\n // Mobile: Render as bottom drawer\n return (\n <DialogPortal>\n <DrawerPrimitive.Root\n open={context.open}\n onOpenChange={context.onOpenChange}\n dismissible={closeOnOverlayClick}\n >\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm\" />\n <DrawerPrimitive.Content\n ref={ref as any}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex flex-col rounded-t-3xl border border-border bg-background shadow-lg outline-none\",\n className\n )}\n aria-describedby={undefined}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n <div className=\"mx-auto mt-2 h-2 w-[100px] rounded-full bg-muted\" />\n <div>{children}</div>\n {showCloseButton && (\n <button\n onClick={() => context.onOpenChange?.(false)}\n className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\"\n >\n <Button variant=\"secondary\" size=\"icon\">\n <X className=\"h-4 w-4\" />\n </Button>\n <span className=\"sr-only\">Close</span>\n </button>\n )}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n </DrawerPrimitive.Root>\n </DialogPortal>\n )\n }\n\n // Desktop: Render as centered dialog\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-3xl overflow-auto\",\n className\n )}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\">\n <Button variant=\"secondary\" size=\"icon\">\n <X className=\"h-4 w-4\" />\n </Button>\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n }\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"]}