{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "glass-drawer",
  "title": "Glass Drawer",
  "author": "Alex Chih (https://alexchih.com)",
  "description": "Bottom drawer as a rising veil with a grab handle, built on Vaul.",
  "dependencies": [
    "vaul"
  ],
  "registryDependencies": [
    "https://washiveil.alexchih.com/r/theme.json"
  ],
  "files": [
    {
      "path": "registry/washiveil/ui/glass-drawer.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport { Drawer as DrawerPrimitive } from 'vaul'\n\nimport { cn } from '@/lib/utils'\n\nfunction GlassDrawer({ shouldScaleBackground = false, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n  return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />\n}\nGlassDrawer.displayName = 'GlassDrawer'\n\nconst GlassDrawerTrigger = DrawerPrimitive.Trigger\n\nconst GlassDrawerPortal = DrawerPrimitive.Portal\n\nconst GlassDrawerClose = DrawerPrimitive.Close\n\nconst GlassDrawerOverlay = React.forwardRef<\n  React.ComponentRef<typeof DrawerPrimitive.Overlay>,\n  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n  <DrawerPrimitive.Overlay\n    ref={ref}\n    className={cn(\n      'fixed inset-0 z-50 bg-deep/20 backdrop-blur-sm dark:bg-black/40',\n      className,\n    )}\n    {...props}\n  />\n))\nGlassDrawerOverlay.displayName = 'GlassDrawerOverlay'\n\nconst GlassDrawerContent = React.forwardRef<\n  React.ComponentRef<typeof DrawerPrimitive.Content>,\n  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n  <GlassDrawerPortal>\n    <GlassDrawerOverlay />\n    <DrawerPrimitive.Content\n      ref={ref}\n      className={cn(\n        // after:hidden kills vaul's overscroll extension — it is built for\n        // edge-attached drawers and pokes square-cornered out of a floating one.\n        'fixed inset-x-2 bottom-2 z-50 flex h-auto max-h-[85svh] flex-col rounded-3xl border border-glass-edge bg-glass-stronger backdrop-blur-2xl backdrop-saturate-150 shadow-[0_16px_48px_rgba(28,25,20,0.12)] after:hidden',\n        className,\n      )}\n      {...props}\n    >\n      <div className=\"mx-auto mt-3 h-1.5 w-10 rounded-full bg-foreground/15\" />\n      {children}\n    </DrawerPrimitive.Content>\n  </GlassDrawerPortal>\n))\nGlassDrawerContent.displayName = 'GlassDrawerContent'\n\nfunction GlassDrawerHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n  return <div className={cn('grid gap-1.5 p-6 pb-0 text-center sm:text-left', className)} {...props} />\n}\nGlassDrawerHeader.displayName = 'GlassDrawerHeader'\n\nfunction GlassDrawerFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n  return <div className={cn('mt-auto flex flex-col gap-2 p-6', className)} {...props} />\n}\nGlassDrawerFooter.displayName = 'GlassDrawerFooter'\n\nconst GlassDrawerTitle = React.forwardRef<\n  React.ComponentRef<typeof DrawerPrimitive.Title>,\n  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n  <DrawerPrimitive.Title\n    ref={ref}\n    className={cn('font-display text-lg font-medium leading-none tracking-tight', className)}\n    {...props}\n  />\n))\nGlassDrawerTitle.displayName = 'GlassDrawerTitle'\n\nconst GlassDrawerDescription = React.forwardRef<\n  React.ComponentRef<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))\nGlassDrawerDescription.displayName = 'GlassDrawerDescription'\n\nexport {\n  GlassDrawer,\n  GlassDrawerPortal,\n  GlassDrawerOverlay,\n  GlassDrawerTrigger,\n  GlassDrawerClose,\n  GlassDrawerContent,\n  GlassDrawerHeader,\n  GlassDrawerFooter,\n  GlassDrawerTitle,\n  GlassDrawerDescription,\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}