{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "dialog",
  "title": "Dialog",
  "description": "Tetsu dialog on @ui-sdk/react, styled with the @tetsustudio/tokens variables.",
  "dependencies": [
    "@ui-sdk/react@0.1.0-beta.5",
    "cn@^0.4.0",
    "lucide-react@^1.16.0"
  ],
  "registryDependencies": [
    "https://library.tetsustudio.com/r/button.json"
  ],
  "files": [
    {
      "path": "registry/ui/dialog.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport { cn } from 'cn'\nimport {\n  Dialog as DialogPrimitive,\n  DialogBackdrop,\n  DialogClose as DialogClosePrimitive,\n  DialogContent as DialogContentPrimitive,\n  DialogDescription as DialogDescriptionPrimitive,\n  DialogTitle as DialogTitlePrimitive,\n  DialogTrigger as DialogTriggerPrimitive,\n} from '@ui-sdk/react/dialog'\n\nimport { buttonVariants } from '@/components/ui/button'\nimport { XIcon } from 'lucide-react'\n\ntype WithClassName<T extends React.ElementType> = Omit<React.ComponentProps<T>, 'className'> & {\n  className?: string\n}\ntype Composed<T extends React.ElementType> = Omit<WithClassName<T>, 'children'> & {\n  children?: React.ReactNode\n}\n\nfunction Dialog(props: React.ComponentProps<typeof DialogPrimitive>) {\n  return <DialogPrimitive {...props} />\n}\n\nfunction DialogTrigger(props: React.ComponentProps<typeof DialogTriggerPrimitive>) {\n  return <DialogTriggerPrimitive {...props} />\n}\n\nfunction DialogClose(props: React.ComponentProps<typeof DialogClosePrimitive>) {\n  return <DialogClosePrimitive {...props} />\n}\n\nfunction DialogOverlay({ className, ...props }: WithClassName<typeof DialogBackdrop>) {\n  return (\n    <DialogBackdrop\n      className={cn(\n        'fixed inset-0 isolate z-50 bg-black/50 backdrop-blur-xs duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0',\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction DialogContent({\n  className,\n  children,\n  showCloseButton = true,\n  ...props\n}: Composed<typeof DialogContentPrimitive> & {\n  showCloseButton?: boolean\n}) {\n  return (\n    <>\n      <DialogOverlay />\n      <DialogContentPrimitive\n        className={cn(\n          'fixed top-1/2 left-1/2 z-50 m-0 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border bg-popover p-6 text-sm text-popover-foreground shadow-lg duration-100 outline-none backdrop:bg-transparent sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n          className,\n        )}\n        {...props}\n      >\n        {children}\n        {showCloseButton && (\n          <DialogClosePrimitive\n            aria-label=\"Close\"\n            className={cn(\n              buttonVariants({ variant: 'ghost', size: 'icon-sm' }),\n              'absolute top-4 right-4',\n            )}\n          >\n            <XIcon aria-hidden=\"true\" />\n          </DialogClosePrimitive>\n        )}\n      </DialogContentPrimitive>\n    </>\n  )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n  return (\n    <div data-slot=\"dialog-header\" className={cn('flex flex-col gap-2', className)} {...props} />\n  )\n}\n\nfunction DialogFooter({\n  className,\n  showCloseButton = false,\n  children,\n  ...props\n}: React.ComponentProps<'div'> & {\n  showCloseButton?: boolean\n}) {\n  return (\n    <div\n      data-slot=\"dialog-footer\"\n      className={cn(\n        '-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end',\n        className,\n      )}\n      {...props}\n    >\n      {children}\n      {showCloseButton && (\n        <DialogClosePrimitive className={buttonVariants({ variant: 'outline' })}>\n          Close\n        </DialogClosePrimitive>\n      )}\n    </div>\n  )\n}\n\nfunction DialogTitle({ className, ...props }: WithClassName<typeof DialogTitlePrimitive>) {\n  return (\n    <DialogTitlePrimitive\n      className={cn('font-heading text-base leading-none font-medium', className)}\n      {...props}\n    />\n  )\n}\n\nfunction DialogDescription({\n  className,\n  ...props\n}: WithClassName<typeof DialogDescriptionPrimitive>) {\n  return (\n    <DialogDescriptionPrimitive\n      className={cn(\n        'text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nexport {\n  Dialog,\n  DialogClose,\n  DialogContent,\n  DialogDescription,\n  DialogFooter,\n  DialogHeader,\n  DialogOverlay,\n  DialogTitle,\n  DialogTrigger,\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}