{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "drawer",
  "title": "Drawer",
  "description": "Drawer component built on Base UI, styled with sc1m tokens.",
  "dependencies": [
    "@base-ui/react"
  ],
  "registryDependencies": [
    "https://sc1m.vercel.app/r/tokens.json",
    "https://sc1m.vercel.app/r/cn.json"
  ],
  "files": [
    {
      "path": "src/components/ui/drawer/drawer.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as BaseDrawer } from \"@base-ui/react/drawer\";\nimport { cn } from \"@/lib/cn\";\n\nexport const Drawer = BaseDrawer.Root;\nexport const DrawerTrigger = BaseDrawer.Trigger;\n\n// Bottom sheet: anchored to the bottom edge, dismissed via swipe-down by\n// default (Drawer.Root's `swipeDirection` defaults to \"down\").\nexport function DrawerContent({\n  className,\n  children,\n  ...props\n}: React.ComponentProps<typeof BaseDrawer.Popup>) {\n  return (\n    <BaseDrawer.Portal>\n      <BaseDrawer.Backdrop className=\"fixed inset-0 bg-black/40 transition-opacity duration-fast data-starting-style:opacity-0 data-ending-style:opacity-0\" />\n      {/* p-4 insets the sheet from the screen edges so it floats */}\n      <BaseDrawer.Viewport className=\"fixed inset-0 flex items-end justify-center p-4\">\n        <BaseDrawer.Popup\n          className={cn(\n            \"w-full max-w-lg rounded-xl border border-line bg-surface-raised p-6 text-fg shadow-overlay\",\n            \"[transform:translateY(var(--drawer-swipe-movement-y))] transition-transform duration-fast ease-out-quad\",\n            // +1rem clears the viewport's bottom inset so the exit fully leaves the screen\n            \"data-starting-style:[transform:translateY(calc(100%+1rem))] data-ending-style:[transform:translateY(calc(100%+1rem))]\",\n            className,\n          )}\n          {...props}\n        >\n          <div\n            aria-hidden\n            className=\"mx-auto mb-4 h-1.5 w-10 shrink-0 rounded-full bg-line-strong\"\n          />\n          <BaseDrawer.Content className=\"mx-auto w-full\">\n            {children}\n          </BaseDrawer.Content>\n        </BaseDrawer.Popup>\n      </BaseDrawer.Viewport>\n    </BaseDrawer.Portal>\n  );\n}\n\nexport const DrawerTitle = BaseDrawer.Title;\nexport const DrawerDescription = BaseDrawer.Description;\nexport const DrawerClose = BaseDrawer.Close;\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}