{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "alert",
  "title": "Alert",
  "description": "Callout for important messages on a neutral surface; default, success, warning and destructive tones colour the icon.",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "@corsair-ui/utils"
  ],
  "files": [
    {
      "path": "registry/default/ui/alert.tsx",
      "content": "import { cva, type VariantProps } from \"class-variance-authority\";\nimport type { ComponentProps } from \"react\";\n\nimport { cn } from \"@/registry/default/lib/utils\";\n\nconst alertVariants = cva(\n  [\n    \"bg-card text-card-foreground relative grid w-full grid-cols-[0_1fr] items-start gap-y-1 rounded-lg border px-4 py-3 text-sm\",\n    \"has-[>svg]:grid-cols-[1rem_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5\",\n  ],\n  {\n    variants: {\n      // Every tone shares the neutral surface; only the icon takes the colour.\n      variant: {\n        default: \"[&>svg]:text-foreground\",\n        destructive: \"[&>svg]:text-destructive\",\n        success: \"[&>svg]:text-success\",\n        warning: \"[&>svg]:text-warning\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n    },\n  }\n);\n\n/**\n * A message that draws attention. The tone shows on the icon, so put one\n * first; the title should still say what happened on its own.\n *\n * It uses `role=\"alert\"`, which interrupts screen readers: pass\n * `role=\"status\"` for messages that are not urgent.\n */\nfunction Alert({\n  className,\n  variant,\n  ...props\n}: ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n  return (\n    <div\n      role=\"alert\"\n      data-slot=\"alert\"\n      data-variant={variant ?? \"default\"}\n      className={cn(alertVariants({ variant }), className)}\n      {...props}\n    />\n  );\n}\n\nfunction AlertTitle({ className, ...props }: ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"alert-title\"\n      className={cn(\"col-start-2 min-h-4 leading-5 font-medium tracking-tight\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction AlertDescription({ className, ...props }: ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"alert-description\"\n      className={cn(\n        \"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed\",\n        className\n      )}\n      {...props}\n    />\n  );\n}\n\nexport { Alert, AlertDescription, AlertTitle, alertVariants };\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}