{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "alert",
  "title": "Alert",
  "description": "A flat notice in neutral, info, attention or danger tone, with title, description and an optional wrapping action area. Static notices carry no live role; use role=\"alert\" only for an event that just happened.",
  "dependencies": [
    "class-variance-authority@0.7.1"
  ],
  "registryDependencies": [
    "@waimakers/utils",
    "@waimakers/theme"
  ],
  "files": [
    {
      "path": "src/components/ui/alert.tsx",
      "content": "import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../lib/utils\";\n\nconst alertVariants = cva(\n  \"group/alert relative grid w-full gap-0.5 rounded-md border border-border p-4 text-left text-sm has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4\",\n  {\n    variants: {\n      tone: {\n        neutral: \"bg-card text-card-foreground\",\n        info: \"bg-[var(--info-wash,var(--surface))] text-info-text\",\n        attention: \"bg-[var(--attention-wash,var(--surface))] text-attention-text\",\n        danger: \"bg-[var(--danger-wash,var(--surface))] text-danger-text\",\n      },\n    },\n    defaultVariants: {\n      tone: \"neutral\",\n    },\n  },\n);\n\nfunction Alert({\n  className,\n  tone,\n  ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n  return (\n    <div\n      data-slot=\"alert\"\n      data-tone={tone ?? \"neutral\"}\n      className={cn(alertVariants({ tone }), className)}\n      {...props}\n    />\n  );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"alert-title\"\n      className={cn(\n        \"font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction AlertDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"alert-description\"\n      className={cn(\n        \"text-sm text-pretty group-data-[tone=neutral]/alert:text-muted-foreground [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction AlertAction({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"alert-action\"\n      className={cn(\"mt-3 flex flex-wrap gap-2 group-has-[>svg]/alert:col-start-2\", className)}\n      {...props}\n    />\n  );\n}\n\nexport { Alert, AlertTitle, AlertDescription, AlertAction };\n",
      "type": "registry:ui",
      "target": "components/ui/alert.tsx"
    }
  ],
  "type": "registry:ui"
}