{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "drawer",
  "title": "Drawer",
  "author": "Poyraz Avsever",
  "description": "Poyraz Soft Glass drawer component with standardized floating and overlay behavior.",
  "dependencies": [
    "vaul@^1.1.2"
  ],
  "registryDependencies": [
    "@poyraz/poyraz-utils",
    "@poyraz/poyraz-theme",
    "@poyraz/poyraz-recipes"
  ],
  "files": [
    {
      "path": "registry/poyraz/ui/phase6/molecules/drawer.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\n\nimport { cn } from \"@/lib/utils\";\nimport {\n  overlaySurfaceVariants,\n  overlayVariants,\n  type OverlayProps,\n  type OverlaySurfaceProps,\n} from \"@/components/ui/recipes\";\n\n/* ================================================================== */\n/*  DRAWER (vaul-based)                                                */\n/* ================================================================== */\n\nconst Drawer = ({\n  shouldScaleBackground = true,\n  ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\n  <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />\n);\nDrawer.displayName = \"Drawer\";\n\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\nconst DrawerPortal = DrawerPrimitive.Portal;\n\nconst DrawerClose = DrawerPrimitive.Close;\n\nconst DrawerOverlay = React.forwardRef<\n  React.ElementRef<typeof DrawerPrimitive.Overlay>,\n  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay> & OverlayProps\n>(({ className, tone, ...props }, ref) => (\n  <DrawerPrimitive.Overlay\n    ref={ref}\n    className={cn(overlayVariants({ tone }), className)}\n    {...props}\n  />\n));\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;\n\nconst DrawerContent = React.forwardRef<\n  React.ElementRef<typeof DrawerPrimitive.Content>,\n  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content> &\n    OverlaySurfaceProps & {\n      overlayTone?: NonNullable<OverlayProps[\"tone\"]>;\n      overlayClassName?: string;\n      handle?: boolean;\n    }\n>(\n  (\n    {\n      className,\n      children,\n      surface,\n      radius,\n      overlayTone,\n      overlayClassName,\n      handle = true,\n      ...props\n    },\n    ref,\n  ) => (\n    <DrawerPortal>\n      <DrawerOverlay tone={overlayTone} className={overlayClassName} />\n      <DrawerPrimitive.Content\n        ref={ref}\n        className={cn(\n          overlaySurfaceVariants({ surface, radius }),\n          \"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col\",\n          \"border-b-0\",\n          \"will-change-transform\",\n          className,\n        )}\n        {...props}\n      >\n        {/* Drag handle */}\n        {handle && (\n          <div className=\"mx-auto mt-4 h-1.5 w-[60px] rounded-full bg-border-strong transition-colors duration-150 ease-out\" />\n        )}\n        {children}\n      </DrawerPrimitive.Content>\n    </DrawerPortal>\n  ),\n);\nDrawerContent.displayName = \"DrawerContent\";\n\nconst DrawerHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n  <div className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)} {...props} />\n);\nDrawerHeader.displayName = \"DrawerHeader\";\n\nconst DrawerFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n  <div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} {...props} />\n);\nDrawerFooter.displayName = \"DrawerFooter\";\n\nconst DrawerTitle = React.forwardRef<\n  React.ElementRef<typeof DrawerPrimitive.Title>,\n  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n  <DrawerPrimitive.Title\n    ref={ref}\n    className={cn(\"text-base font-semibold leading-none tracking-tight\", className)}\n    {...props}\n  />\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\nconst DrawerDescription = React.forwardRef<\n  React.ElementRef<typeof DrawerPrimitive.Description>,\n  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n  <DrawerPrimitive.Description\n    ref={ref}\n    className={cn(\"text-sm text-muted-foreground\", className)}\n    {...props}\n  />\n));\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\nexport {\n  Drawer,\n  DrawerPortal,\n  DrawerOverlay,\n  DrawerTrigger,\n  DrawerClose,\n  DrawerContent,\n  DrawerHeader,\n  DrawerFooter,\n  DrawerTitle,\n  DrawerDescription,\n};\n",
      "type": "registry:ui",
      "target": "@ui/molecules/drawer.tsx"
    }
  ],
  "meta": {
    "category": "phase-6-interactive",
    "phase": "beta"
  },
  "type": "registry:ui"
}