{
  "name": "alert",
  "type": "registry:ui",
  "title": "Alert",
  "description": "Alert presents important inline information, success, warning, or error feedback in the content flow.",
  "registryDependencies": [
    "@siteplane/base"
  ],
  "dependencies": [
    "class-variance-authority@0.7.1"
  ],
  "files": [
    {
      "path": "src/components/ui/alert.tsx",
      "type": "registry:ui",
      "content": "import { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nconst alertVariants = cva(\n  \"relative grid w-full items-start gap-x-2 gap-y-0.5 rounded-xl border px-3.5 py-3 text-card-foreground text-sm has-[>svg]:has-data-[slot=alert-action]:grid-cols-[calc(var(--spacing)*4)_1fr_auto] has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:gap-x-2 [&>svg]:h-lh [&>svg]:w-4\",\n  {\n    defaultVariants: {\n      variant: \"default\",\n    },\n    variants: {\n      variant: {\n        default:\n          \"bg-transparent dark:bg-input/32 [&>svg]:text-muted-foreground\",\n        error:\n          \"border-destructive/32 bg-destructive/4 [&>svg]:text-destructive\",\n        info: \"border-info/32 bg-info/4 [&>svg]:text-info\",\n        success: \"border-success/32 bg-success/4 [&>svg]:text-success\",\n        warning: \"border-warning/32 bg-warning/4 [&>svg]:text-warning\",\n      },\n    },\n  },\n);\n\nexport function Alert({\n  className,\n  variant,\n  ...props\n}: React.ComponentProps<\"div\"> &\n  VariantProps<typeof alertVariants>): React.ReactElement {\n  return (\n    <div\n      className={cn(alertVariants({ variant }), className)}\n      data-slot=\"alert\"\n      role=\"alert\"\n      {...props}\n    />\n  );\n}\n\nexport function AlertTitle({\n  className,\n  ...props\n}: React.ComponentProps<\"div\">): React.ReactElement {\n  return (\n    <div\n      className={cn(\"font-medium [svg~&]:col-start-2\", className)}\n      data-slot=\"alert-title\"\n      {...props}\n    />\n  );\n}\n\nexport function AlertDescription({\n  className,\n  ...props\n}: React.ComponentProps<\"div\">): React.ReactElement {\n  return (\n    <div\n      className={cn(\n        \"flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2\",\n        className,\n      )}\n      data-slot=\"alert-description\"\n      {...props}\n    />\n  );\n}\n\nexport function AlertAction({\n  className,\n  ...props\n}: React.ComponentProps<\"div\">): React.ReactElement {\n  return (\n    <div\n      className={cn(\n        \"flex gap-1 max-sm:col-start-2 max-sm:mt-2 sm:row-start-1 sm:row-end-3 sm:self-center sm:[[data-slot=alert-description]~&]:col-start-2 sm:[[data-slot=alert-title]~&]:col-start-2 sm:[svg~&]:col-start-2 sm:[svg~[data-slot=alert-description]~&]:col-start-3 sm:[svg~[data-slot=alert-title]~&]:col-start-3\",\n        className,\n      )}\n      data-slot=\"alert-action\"\n      {...props}\n    />\n  );\n}\n"
    }
  ],
  "categories": [
    "feedback"
  ],
  "docs": "# Alert\n\n> Siteplane UI release `0.1.1`.\n\n## Public Purpose\n\nAlert presents important inline information in the content flow. Use semantic\nvariants for information, success, warning, and error feedback that should\nremain visible while the user continues working.\n\n## Import\n\n`import { Alert, AlertAction, AlertDescription, AlertTitle } from \"@/components/ui/alert\";`\n\n## Public API\n\n- `variant` accepts `\"default\"`, `\"info\"`, `\"success\"`, `\"warning\"`,\n  and `\"error\"`.\n- Use `AlertTitle` for the short summary, `AlertDescription` for supporting\n  detail, and `AlertAction` for optional real Button or link controls.\n- Use Alert Dialog when a decision must block the workflow.\n\n## Public Motion\n\n- Alert has no mount or exit animation.\n- Actions use their own Button or link interaction states; do not animate the\n  Alert container locally.\n\n## Public Accessibility\n\n- `Alert` renders with `role=\"alert\"`.\n- Keep the title and description concise so announcements remain useful.\n- Do not communicate severity through color alone; the copy must identify the\n  outcome or risk.\n- Actions require visible focus and an accessible name.\n\n## Public Agent Guidance\n\n- Match the variant to the message semantics.\n- Use Alert Dialog for blocking confirmation and Toast for transient system\n  feedback.\n- Keep native slots, variants, and accessibility behavior intact.\n\n## Public Links\n\n- [Documentation and preview](https://ui.siteplane.io/docs/components/feedback/alert)\n\n- [Registry source](https://ui.siteplane.io/r/alert.json)\n",
  "meta": {
    "siteplane:agentContractVersion": 1,
    "siteplane:docs": "https://ui.siteplane.io/docs/components/feedback/alert",
    "siteplane:releaseVersion": "0.1.1",
    "siteplane:sourceOwned": true
  },
  "devDependencies": []
}
