{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sheet",
  "title": "Sheet",
  "description": "Drawer panel that slides in from edge.",
  "dependencies": [
    "@radix-ui/react-dialog"
  ],
  "files": [
    {
      "path": "registry/new-york/ui/sheet.tsx",
      "content": "\"use client\";\n\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\";\nimport { XIcon } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n  return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\nfunction SheetTrigger({\n  className,\n  ...props\n}: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n  return (\n    <SheetPrimitive.Trigger\n      className={cn(\"touch-manipulation\", className)}\n      data-slot=\"sheet-trigger\"\n      type=\"button\"\n      {...props}\n    />\n  );\n}\n\nfunction SheetClose({\n  className,\n  ...props\n}: React.ComponentProps<typeof SheetPrimitive.Close>) {\n  return (\n    <SheetPrimitive.Close\n      className={cn(\"touch-manipulation\", className)}\n      data-slot=\"sheet-close\"\n      type=\"button\"\n      {...props}\n    />\n  );\n}\n\nfunction SheetPortal({\n  ...props\n}: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n  return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />;\n}\n\nfunction SheetOverlay({\n  className,\n  ...props\n}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n  return (\n    <SheetPrimitive.Overlay\n      className={cn(\n        \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 touch-manipulation bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none\",\n        className\n      )}\n      data-slot=\"sheet-overlay\"\n      {...props}\n    />\n  );\n}\n\nfunction SheetContent({\n  className,\n  children,\n  side = \"right\",\n  ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n  side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n}) {\n  return (\n    <SheetPortal>\n      <SheetOverlay />\n      <SheetPrimitive.Content\n        className={cn(\n          \"fixed z-50 flex touch-manipulation flex-col gap-4 overscroll-contain bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:duration-300 data-[state=open]:duration-500 motion-reduce:animate-none\",\n          side === \"right\" &&\n            \"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm\",\n          side === \"left\" &&\n            \"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm\",\n          side === \"top\" &&\n            \"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b\",\n          side === \"bottom\" &&\n            \"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t\",\n          className\n        )}\n        data-slot=\"sheet-content\"\n        {...props}\n      >\n        {children}\n        <SheetPrimitive.Close\n          className=\"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary\"\n          type=\"button\"\n        >\n          <XIcon aria-hidden=\"true\" className=\"size-4\" />\n          <span className=\"sr-only\">Close</span>\n        </SheetPrimitive.Close>\n      </SheetPrimitive.Content>\n    </SheetPortal>\n  );\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      className={cn(\"flex flex-col gap-1.5 p-4\", className)}\n      data-slot=\"sheet-header\"\n      {...props}\n    />\n  );\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n      data-slot=\"sheet-footer\"\n      {...props}\n    />\n  );\n}\n\nfunction SheetTitle({\n  className,\n  ...props\n}: React.ComponentProps<typeof SheetPrimitive.Title>) {\n  return (\n    <SheetPrimitive.Title\n      className={cn(\"font-semibold text-foreground\", className)}\n      data-slot=\"sheet-title\"\n      {...props}\n    />\n  );\n}\n\nfunction SheetDescription({\n  className,\n  ...props\n}: React.ComponentProps<typeof SheetPrimitive.Description>) {\n  return (\n    <SheetPrimitive.Description\n      className={cn(\"text-muted-foreground text-sm\", className)}\n      data-slot=\"sheet-description\"\n      {...props}\n    />\n  );\n}\n\nexport {\n  Sheet,\n  SheetTrigger,\n  SheetClose,\n  SheetContent,\n  SheetHeader,\n  SheetFooter,\n  SheetTitle,\n  SheetDescription,\n};\n",
      "type": "registry:ui"
    }
  ],
  "meta": {
    "apiRef": "https://www.radix-ui.com/docs/primitives/components/dialog#api-reference"
  },
  "docs": "https://www.radix-ui.com/primitives/docs/components/dialog",
  "categories": [
    "component"
  ],
  "type": "registry:ui"
}