{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "alert",
  "title": "alert",
  "dependencies": [
    "class-variance-authority@^0.7"
  ],
  "registryDependencies": [
    "@dwellir/dwellir-theme",
    "@dwellir/utils"
  ],
  "files": [
    {
      "path": "components/ui/alert.tsx",
      "content": "import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\nimport { cn } from '@/lib/utils';\n\n/*\n * An inline message about the content around it. An icon, as the first child,\n * takes the left column. The tones reuse the badge tints, so they read on every\n * ground. The theme has no info colour: an info message is default with an\n * info icon.\n */\nconst alertVariants = cva(\n  'relative grid w-full grid-cols-[0_1fr] items-start gap-y-1 rounded-xl 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        /* The plain card surface: muted text on the muted tint misses AA in dark mode. */\n        default: 'border-border bg-card text-card-foreground',\n        /* Done or saved, such as a key that was created. */\n        success:\n          'border-accent-ink-30 bg-accent text-accent-foreground *:data-[slot=alert-description]:text-foreground',\n        /* The reader can go on, but should know, such as a quota that is almost used. */\n        warning:\n          'border-warning-ink-35 bg-warning-ink-5 text-warning-ink *:data-[slot=alert-description]:text-foreground',\n        /* Something failed or cannot be undone. */\n        destructive:\n          'border-destructive-35 bg-destructive-10 text-destructive *:data-[slot=alert-description]:text-foreground',\n      },\n    },\n    defaultVariants: { variant: 'default' },\n  },\n);\n\nfunction Alert({\n  className,\n  variant,\n  ...props\n}: ComponentProps<'div'> & VariantProps<typeof alertVariants>) {\n  return (\n    <div\n      data-slot=\"alert\"\n      data-variant={variant ?? 'default'}\n      role=\"alert\"\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 leading-snug font-bold', 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-2 text-sm text-muted-foreground [&_p]:leading-relaxed',\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport { Alert, AlertDescription, AlertTitle, alertVariants };\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}