{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "alert",
  "title": "Alert",
  "description": "A persistent, inline message that tells people something important about the page or task in front of them.",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "https://www.prfct.dev/r/utils.json"
  ],
  "files": [
    {
      "path": "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  [\n    \"group/alert relative grid w-full gap-1 rounded-xl border px-4 py-3.5 text-left text-sm\",\n    \"has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-3\",\n    \"has-data-[slot=alert-action]:pr-24\",\n    \"*:[svg]:row-span-2 *:[svg]:mt-0.5 *:[svg:not([class*='size-'])]:size-4\",\n  ],\n  {\n    variants: {\n      variant: {\n        default:\n          \"border-border bg-card text-card-foreground *:data-[slot=alert-description]:text-muted-foreground *:[svg]:text-muted-foreground\",\n        info: \"border-info-6 bg-info-2 text-info-12 *:data-[slot=alert-description]:text-info-11 *:[svg]:text-info-11\",\n        success:\n          \"border-success-6 bg-success-2 text-success-12 *:data-[slot=alert-description]:text-success-11 *:[svg]:text-success-11\",\n        warning:\n          \"border-warning-6 bg-warning-2 text-warning-12 *:data-[slot=alert-description]:text-warning-11 *:[svg]:text-warning-11\",\n        destructive:\n          \"border-danger-6 bg-danger-2 text-danger-12 *:data-[slot=alert-description]:text-danger-11 *:[svg]:text-danger-11\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n    },\n  }\n)\n\nfunction Alert({\n  className,\n  variant,\n  ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n  // Urgent variants interrupt assistive tech (`alert`); everything else is\n  // announced politely (`status`). Pass `role` to override.\n  const urgent = variant === \"destructive\" || variant === \"warning\"\n  return (\n    <div\n      data-slot=\"alert\"\n      data-variant={variant ?? \"default\"}\n      role={urgent ? \"alert\" : \"status\"}\n      className={cn(alertVariants({ variant }), 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        \"leading-5 font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-4\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction AlertDescription({\n  className,\n  ...props\n}: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"alert-description\"\n      className={cn(\n        \"text-sm leading-5 text-pretty group-has-[>svg]/alert:col-start-2 [&_a]:font-medium [&_a]:underline [&_a]:underline-offset-4 [&_p:not(:last-child)]:mb-3\",\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(\n        \"absolute top-1/2 right-3 flex -translate-y-1/2 items-center gap-2\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nexport { Alert, AlertTitle, AlertDescription, AlertAction }\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}