{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "alert",
  "type": "registry:ui",
  "title": "Alert",
  "description": "Inline message: default, info, success, warning, danger.",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "@wibo/utils"
  ],
  "files": [
    {
      "path": "src/components/alert.tsx",
      "type": "registry:ui",
      "content": "import type { ComponentProps } from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\n\nconst alertVariants = cva(\n  \"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5\",\n  {\n    variants: {\n      variant: {\n        default: \"border-border bg-card text-card-foreground [&>svg]:text-muted-foreground\",\n        info: \"border-info/25 bg-info/5 text-foreground [&>svg]:text-info\",\n        success: \"border-success/25 bg-success/5 text-foreground [&>svg]:text-success\",\n        warning: \"border-warning/30 bg-warning/5 text-foreground [&>svg]:text-warning\",\n        danger: \"border-danger/25 bg-danger/5 text-foreground [&>svg]:text-danger\",\n      },\n    },\n    defaultVariants: { variant: \"default\" },\n  },\n);\n\ntype AlertProps = ComponentProps<\"div\"> & VariantProps<typeof alertVariants>;\n\n/**\n * Inline message in the page flow. Put a Lucide icon as the first child.\n * Warning and danger alerts are announced (`role=\"alert\"`); others are `status`.\n */\nfunction Alert({ className, variant, role, ...props }: AlertProps) {\n  const resolved = variant ?? \"default\";\n  return (\n    <div\n      data-slot=\"alert\"\n      data-variant={resolved}\n      role={role ?? (resolved === \"danger\" || resolved === \"warning\" ? \"alert\" : \"status\")}\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\", 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        \"col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport { Alert, AlertDescription, AlertTitle, alertVariants };\n"
    }
  ]
}
