{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sheet",
  "dependencies": [
    "react-aria-components"
  ],
  "registryDependencies": [
    "https://taki-ui.com/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/new-york/ui/sheet.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport {\n  DialogTrigger,\n  Heading,\n  Modal,\n  ModalOverlay,\n  Dialog as RACDialog,\n  type HeadingProps,\n  type ModalOverlayProps,\n} from \"react-aria-components\"\n\nimport { cn } from \"@/lib/utils\"\n\ninterface SheetContextValue {\n  side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n}\n\nconst SheetContext = React.createContext<SheetContextValue>({})\n\ninterface SheetProps {\n  children: React.ReactNode\n  side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n}\n\nfunction Sheet({ children, side = \"right\" }: SheetProps) {\n  return (\n    <SheetContext.Provider value={{ side }}>\n      <DialogTrigger>{children}</DialogTrigger>\n    </SheetContext.Provider>\n  )\n}\n\nfunction SheetContent({\n  className,\n  children,\n  isDismissable = true,\n  ...props\n}: Omit<ModalOverlayProps, \"children\"> & {\n  children: React.ReactNode\n}) {\n  const { side = \"right\" } = React.useContext(SheetContext)\n\n  return (\n    <ModalOverlay\n      isDismissable={isDismissable}\n      data-slot=\"sheet-portal\"\n      className={cn(\n        \"data-[entering]:animate-in data-[exiting]:animate-out data-[exiting]:fade-out-0 data-[entering]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n        \"data-[entering]:duration-500 data-[exiting]:duration-300\"\n      )}\n      {...props}\n    >\n      <Modal\n        data-slot=\"sheet-content\"\n        className={({ isEntering, isExiting }) =>\n          cn(\n            \"bg-background fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out outline-none\",\n            isEntering && \"animate-in duration-500\",\n            isExiting && \"animate-out duration-300\",\n            side === \"right\" && [\n              \"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm\",\n              isEntering && \"slide-in-from-right\",\n              isExiting && \"slide-out-to-right\",\n            ],\n            side === \"left\" && [\n              \"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm\",\n              isEntering && \"slide-in-from-left\",\n              isExiting && \"slide-out-to-left\",\n            ],\n            side === \"top\" && [\n              \"inset-x-0 top-0 h-auto border-b\",\n              isEntering && \"slide-in-from-top\",\n              isExiting && \"slide-out-to-top\",\n            ],\n            side === \"bottom\" && [\n              \"inset-x-0 bottom-0 h-auto border-t\",\n              isEntering && \"slide-in-from-bottom\",\n              isExiting && \"slide-out-to-bottom\",\n            ],\n            className\n          )\n        }\n      >\n        <RACDialog className=\"relative flex h-full max-h-full flex-col overflow-auto outline-none\">\n          {children}\n        </RACDialog>\n      </Modal>\n    </ModalOverlay>\n  )\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"sheet-header\"\n      className={cn(\"flex flex-col gap-1.5 p-4\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"sheet-footer\"\n      className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction SheetTitle({ className, ...props }: HeadingProps) {\n  return (\n    <Heading\n      slot=\"title\"\n      data-slot=\"sheet-title\"\n      className={cn(\"text-foreground font-semibold\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction SheetDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n  return (\n    <p\n      data-slot=\"sheet-description\"\n      className={cn(\"text-muted-foreground text-sm\", className)}\n      {...props}\n    />\n  )\n}\n\nexport {\n  Sheet,\n  SheetContent,\n  SheetHeader,\n  SheetFooter,\n  SheetTitle,\n  SheetDescription,\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}