{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "dialog", "title": "Dialog", "description": "A modal dialog that interrupts the user with important content", "dependencies": ["@ark-ui/react", "lucide-react", "clsx", "tailwind-merge"], "files": [ { "path": "src/registry/thornberry/components/dialog.tsx", "content": "import { Dialog as ArkDialog } from \"@ark-ui/react/dialog\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport type { ComponentProps } from \"react\";\n\nconst DialogProvider = ArkDialog.RootProvider;\nconst DialogContext = ArkDialog.Context;\nconst DialogRoot = ArkDialog.Root;\n\nconst DialogTrigger = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst DialogBackdrop = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst DialogPositioner = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst DialogContent = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst DialogTitle = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst DialogDescription = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst DialogCloseTrigger = ({\n className,\n children,\n asChild,\n ...rest\n}: ComponentProps) => {\n // If there are no children, render the default X icon\n if (!children) {\n return (\n \n \n Close\n \n );\n }\n\n // If children are provided, use them inside the CloseTrigger\n // This is useful for creating buttons that close the dialog\n return (\n \n {children}\n \n );\n};\n\nexport {\n DialogRoot,\n DialogTrigger,\n DialogBackdrop,\n DialogPositioner,\n DialogContent,\n DialogTitle,\n DialogDescription,\n DialogCloseTrigger,\n DialogProvider,\n DialogContext,\n};\n", "type": "registry:ui" }, { "path": "src/lib/utils.ts", "content": "import { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nimport type { ClassValue } from \"clsx\";\n\nexport const cn = (...inputs: ClassValue[]) => {\n return twMerge(clsx(inputs));\n};\n", "type": "registry:lib", "target": "" } ], "type": "registry:ui" }