{"$schema":"https://ui.shadcn.com/schema/registry-item.json","author":"Eduardo Calvo <edu@smoothui.dev>","css":{},"dependencies":[],"description":"Inline Alert for SmoothUI — info, success, warning, and destructive banners.","devDependencies":[],"files":[{"content":"\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport type { ComponentProps, ReactNode } from \"react\";\n\nexport type AlertVariant = \"info\" | \"success\" | \"warning\" | \"destructive\";\n\nexport interface AlertProps extends Omit<ComponentProps<\"div\">, \"title\"> {\n  /** Body copy under the title */\n  children?: ReactNode;\n  /** Optional leading icon */\n  icon?: ReactNode;\n  /** Bold heading line */\n  title?: ReactNode;\n  /** Semantic tone */\n  variant?: AlertVariant;\n}\n\nconst VARIANT_CLASS: Record<AlertVariant, string> = {\n  destructive:\n    \"border-destructive/30 bg-destructive/10 text-destructive dark:border-destructive/40\",\n  info: \"border-foreground/15 bg-foreground/5 text-foreground\",\n  success:\n    \"border-emerald-500/30 bg-emerald-500/10 text-emerald-800 dark:text-emerald-300\",\n  warning:\n    \"border-amber-500/30 bg-amber-500/10 text-amber-900 dark:text-amber-300\",\n};\n\n/**\n * SmoothUI Alert — inline page/form notice (not a dialog). SmoothUI-owned.\n */\nexport default function Alert({\n  children,\n  className,\n  icon,\n  title,\n  variant = \"info\",\n  ...props\n}: AlertProps) {\n  return (\n    <div\n      className={cn(\n        \"relative flex w-full gap-3 rounded-lg border px-4 py-3 text-sm\",\n        VARIANT_CLASS[variant],\n        className\n      )}\n      data-slot=\"alert\"\n      data-variant={variant}\n      role=\"alert\"\n      {...props}\n    >\n      {icon ? (\n        <span\n          aria-hidden\n          className=\"mt-0.5 shrink-0 [&_svg]:size-4\"\n          data-slot=\"alert-icon\"\n        >\n          {icon}\n        </span>\n      ) : null}\n      <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n        {title ? (\n          <div className=\"font-medium leading-none\" data-slot=\"alert-title\">\n            {title}\n          </div>\n        ) : null}\n        {children ? (\n          <div\n            className=\"text-current/80 leading-relaxed [&_a]:underline\"\n            data-slot=\"alert-description\"\n          >\n            {children}\n          </div>\n        ) : null}\n      </div>\n    </div>\n  );\n}\n","path":"index.tsx","target":"components/smoothui/alert/index.tsx","type":"registry:ui"}],"name":"alert","registryDependencies":[],"title":"Alert","type":"registry:ui"}