{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "alert",
  "title": "Alert",
  "description": "Inline callout for status messages, with default and destructive variants and an optional action.",
  "dependencies": [
    "class-variance-authority@^0.7.1"
  ],
  "files": [
    {
      "path": "registry/rapid/ui/alert/alert.tsx",
      "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\t\"group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 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\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: 'bg-background text-foreground *:[svg]:text-foreground',\n\t\t\t\tdestructive:\n\t\t\t\t\t'border-destructive-border bg-destructive-subtle text-foreground *:[svg]:text-destructive-subtle-foreground',\n\t\t\t\tinfo: 'border-info-border bg-info-subtle text-foreground *:[svg]:text-info-subtle-foreground',\n\t\t\t\tsuccess: 'border-success-border bg-success-subtle text-foreground *:[svg]:text-success-subtle-foreground',\n\t\t\t\twarning: 'border-warning-border bg-warning-subtle text-foreground *:[svg]:text-warning-subtle-foreground',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: 'default',\n\t\t},\n\t},\n)\n\n/**\n * A callout for an inline message.\n *\n * The default `role` follows the variant: `destructive` is `alert`, which screen readers announce at once and\n * interrupt the user for; every other variant is `status`, which is announced politely when the message appears after\n * the page has loaded and stays quiet when it is there from the start. Pass `role=\"alert\"` for an urgent message in\n * another variant, or `role=\"note\"` (or `role={undefined}`) for static text that should never be announced.\n */\nfunction Alert({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert\"\n\t\t\trole={variant === 'destructive' ? 'alert' : 'status'}\n\t\t\tclassName={cn(alertVariants({ variant }), className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<'h5'>) {\n\treturn (\n\t\t<h5\n\t\t\tdata-slot=\"alert-title\"\n\t\t\tclassName={cn(\n\t\t\t\t'font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction AlertDescription({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-description\"\n\t\t\tclassName={cn(\n\t\t\t\t'text-sm text-balance md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction AlertAction({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn <div data-slot=\"alert-action\" className={cn('absolute top-2 right-2', className)} {...props} />\n}\n\nexport { Alert, AlertTitle, AlertDescription, AlertAction }\n",
      "type": "registry:ui",
      "target": "components/ui/alert.tsx"
    }
  ],
  "type": "registry:ui"
}