{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sheet",
  "type": "registry:ui",
  "title": "Sheet",
  "description": "Slide-out side drawer panel with spring animation and ESC dismissal.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react",
    "motion"
  ],
  "devDependencies": [],
  "registryDependencies": [],
  "files": [
    {
      "path": "components/ui/sheet.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport * as SheetPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\nimport { cn } from '@/lib/utils'\n\nexport const SheetRoot = SheetPrimitive.Root\nexport const SheetTrigger = SheetPrimitive.Trigger\nexport const SheetClose = SheetPrimitive.Close\n\nconst sideClasses = {\n  top: 'inset-x-0 top-0 border-b-3 border-r-0 border-l-0 border-t-0 rounded-b-[28px]',\n  bottom: 'inset-x-0 bottom-0 border-t-3 border-r-0 border-l-0 border-b-0 rounded-t-[28px]',\n  left: 'inset-y-0 left-0 w-full max-w-sm border-r-3 border-t-0 border-b-0 border-l-0 rounded-r-[28px]',\n  right: 'inset-y-0 right-0 w-full max-w-sm border-l-3 border-t-0 border-b-0 border-r-0 rounded-l-[28px]',\n} as const\n\nconst translateClasses = {\n  top: 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-top-full data-[state=open]:slide-in-from-top-full',\n  bottom: 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom-full data-[state=open]:slide-in-from-bottom-full',\n  left: 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-left-full data-[state=open]:slide-in-from-left-full',\n  right: 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-right-full',\n} as const\n\nexport interface SheetContentProps\n  extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> {\n  side?: 'top' | 'bottom' | 'left' | 'right'\n  closeLabel?: string\n}\n\nexport const SheetOverlay = React.forwardRef<\n  React.ElementRef<typeof SheetPrimitive.Overlay>,\n  React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n  <SheetPrimitive.Overlay\n    ref={ref}\n    className={cn(\n      'fixed inset-0 z-[70] bg-rk-ink/40 backdrop-blur-xs data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n      className\n    )}\n    {...props}\n  />\n))\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName\n\nexport const SheetContent = React.forwardRef<\n  React.ElementRef<typeof SheetPrimitive.Content>,\n  SheetContentProps\n>(({ className, side = 'right', closeLabel = 'Close panel', children, ...props }, ref) => (\n  <SheetPrimitive.Portal>\n    <SheetOverlay />\n    <SheetPrimitive.Content\n      ref={ref}\n      className={cn(\n        'fixed z-[80] flex flex-col bg-rk-surface font-sans rk-border rk-shadow-xl transition-all duration-200',\n        sideClasses[side],\n        translateClasses[side],\n        className\n      )}\n      {...props}\n    >\n      <div className=\"flex items-start justify-between gap-4 p-5 border-b-3 border-rk-ink/20\">\n        {children}\n      </div>\n      <SheetPrimitive.Close\n        type=\"button\"\n        aria-label={closeLabel}\n        className=\"absolute top-5 right-5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-white rk-border-sm rk-shadow-sm transition-all hover:bg-rk-primary active:translate-x-[2px] active:translate-y-[2px] active:shadow-none focus:outline-none focus:ring-4 focus:ring-black cursor-pointer\"\n      >\n        <X className=\"h-4 w-4 stroke-[3]\" aria-hidden=\"true\" />\n      </SheetPrimitive.Close>\n    </SheetPrimitive.Content>\n  </SheetPrimitive.Portal>\n))\nSheetContent.displayName = SheetPrimitive.Content.displayName\n\nexport const SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n  <div className={cn('flex flex-col space-y-1 text-left', className)} {...props} />\n)\nSheetHeader.displayName = 'SheetHeader'\n\nexport const SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n  <div className={cn('mt-auto flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />\n)\nSheetFooter.displayName = 'SheetFooter'\n\nexport const SheetTitle = React.forwardRef<\n  React.ElementRef<typeof SheetPrimitive.Title>,\n  React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n  <SheetPrimitive.Title\n    ref={ref}\n    className={cn('font-display text-xl font-black pr-8', className)}\n    {...props}\n  />\n))\nSheetTitle.displayName = SheetPrimitive.Title.displayName\n\nexport const SheetDescription = React.forwardRef<\n  React.ElementRef<typeof SheetPrimitive.Description>,\n  React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n  <SheetPrimitive.Description\n    ref={ref}\n    className={cn('mt-1 text-xs font-bold opacity-60', className)}\n    {...props}\n  />\n))\nSheetDescription.displayName = SheetPrimitive.Description.displayName\n\nexport interface SheetProps {\n  open: boolean\n  onClose: () => void\n  side?: 'left' | 'right'\n  title?: React.ReactNode\n  description?: React.ReactNode\n  children?: React.ReactNode\n  className?: string\n  closeLabel?: string\n}\n\nexport function Sheet({\n  open,\n  onClose,\n  side = 'right',\n  title,\n  description,\n  children,\n  className,\n  closeLabel = 'Close panel',\n}: SheetProps) {\n  return (\n    <SheetRoot open={open} onOpenChange={(next) => !next && onClose()}>\n      <SheetContent side={side} closeLabel={closeLabel} className={className}>\n        <SheetHeader>\n          {title && <SheetTitle>{title}</SheetTitle>}\n          {description && <SheetDescription>{description}</SheetDescription>}\n        </SheetHeader>\n        <div className=\"flex-1 overflow-y-auto p-5\">{children}</div>\n      </SheetContent>\n    </SheetRoot>\n  )\n}\n",
      "type": "registry:ui",
      "target": "components/ui/sheet.tsx"
    }
  ]
}