{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "drawer",
  "dependencies": ["@base-ui/react"],
  "registryDependencies": ["utils"],
  "files": [
    {
      "path": "registry/ui/drawer.tsx",
      "content": "'use client';\n\n/**\n * CSS custom properties:\n * --backdrop-opacity    Backdrop darkness at rest (default: 0.4)\n *\n * Slots: drawer, drawer-trigger, drawer-portal, drawer-backdrop,\n *        drawer-viewport, drawer-popup, drawer-content,\n *        drawer-title, drawer-description, drawer-close\n */\n\nimport * as React from 'react';\nimport { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\n\nimport { cn } from '@/registry/lib/utils';\n\nfunction Drawer({ ...props }: DrawerPrimitive.Root.Props) {\n  return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />;\n}\n\nfunction DrawerTrigger({ ...props }: DrawerPrimitive.Trigger.Props) {\n  return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\nfunction DrawerPortal({ ...props }: DrawerPrimitive.Portal.Props) {\n  return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />;\n}\n\nfunction DrawerBackdrop({ className, ...props }: DrawerPrimitive.Backdrop.Props) {\n  return (\n    <DrawerPrimitive.Backdrop\n      data-slot=\"drawer-backdrop\"\n      className={cn(\n        '[--backdrop-opacity:0.4] fixed inset-0 z-40 bg-black',\n        'opacity-[calc(var(--backdrop-opacity)*(1-var(--drawer-swipe-progress)))]',\n        'transition-opacity duration-500 ease-out',\n        'data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 data-[ending-style]:duration-[350ms]',\n        className\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction DrawerViewport({ className, ...props }: DrawerPrimitive.Viewport.Props) {\n  return (\n    <DrawerPrimitive.Viewport\n      data-slot=\"drawer-viewport\"\n      className={cn('fixed inset-0 z-50 flex flex-col justify-end', className)}\n      {...props}\n    />\n  );\n}\n\nfunction DrawerPopup({ className, ...props }: DrawerPrimitive.Popup.Props) {\n  return (\n    <DrawerPrimitive.Popup\n      data-slot=\"drawer-popup\"\n      className={cn(\n        'w-full outline-none',\n        '[transform:translateY(var(--drawer-swipe-movement-y))]',\n        'transition-transform duration-500 ease-[cubic-bezier(0.45,1.005,0,1.005)]',\n        'data-[starting-style]:translate-y-full data-[ending-style]:translate-y-full',\n        'data-[ending-style]:duration-[350ms] data-[ending-style]:ease-in',\n        'data-[swiping]:select-none',\n        className\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction DrawerContent({ className, ...props }: DrawerPrimitive.Content.Props) {\n  return (\n    <DrawerPrimitive.Content\n      data-slot=\"drawer-content\"\n      className={cn(\n        'rounded-t-xl bg-overlay border border-b-0 border-line-subtle shadow-lg',\n        className\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction DrawerTitle({ className, ...props }: DrawerPrimitive.Title.Props) {\n  return (\n    <DrawerPrimitive.Title\n      data-slot=\"drawer-title\"\n      className={cn('text-base font-semibold text-primary', className)}\n      {...props}\n    />\n  );\n}\n\nfunction DrawerDescription({ className, ...props }: DrawerPrimitive.Description.Props) {\n  return (\n    <DrawerPrimitive.Description\n      data-slot=\"drawer-description\"\n      className={cn('text-sm text-secondary', className)}\n      {...props}\n    />\n  );\n}\n\nfunction DrawerClose({ ...props }: DrawerPrimitive.Close.Props) {\n  return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />;\n}\n\nexport {\n  Drawer,\n  DrawerTrigger,\n  DrawerPortal,\n  DrawerBackdrop,\n  DrawerViewport,\n  DrawerPopup,\n  DrawerContent,\n  DrawerTitle,\n  DrawerDescription,\n  DrawerClose,\n};\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}
