{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "button", "type": "registry:ui", "title": "Button", "description": "Delego button — primary (indigo glow), secondary, ghost, outline, link, plus protocol-semantic allow/deny actions.", "dependencies": [ "class-variance-authority", "@radix-ui/react-slot" ], "registryDependencies": [ "@delego/delego-theme" ], "files": [ { "path": "registry/delego/ui/button.tsx", "content": "import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\n// Delego button — ports the design-system primary/secondary/ghost set, plus the\n// protocol-semantic allow/deny actions used in the approval flow. The primary\n// carries the indigo glow; allow/deny map to the decision palette.\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[--radius] text-sm font-medium tracking-[-0.01em] transition-all duration-200 outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-40 [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow-lg shadow-primary/30 hover:bg-primary/90 active:scale-[0.98]\",\n secondary:\n \"bg-card text-foreground border border-border hover:bg-accent hover:border-border/80\",\n ghost: \"bg-transparent text-muted-foreground hover:bg-card hover:text-foreground\",\n outline:\n \"border border-border bg-transparent text-foreground hover:bg-accent\",\n allow:\n \"bg-[var(--delego-allow)] text-[oklch(0.15_0.02_265)] font-semibold hover:brightness-110 active:scale-[0.98]\",\n deny: \"bg-[var(--delego-deny)] text-white font-semibold hover:brightness-110 active:scale-[0.98]\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-[18px] py-[11px]\",\n sm: \"h-9 px-3.5 text-[13px]\",\n lg: \"h-11 px-6\",\n icon: \"size-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps & {\n asChild?: boolean\n }) {\n const Comp = asChild ? Slot : \"button\"\n return (\n \n )\n}\n\nexport { Button, buttonVariants }\n", "type": "registry:ui", "target": "components/ui/button.tsx" } ] }