{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"alert","title":"Alert","author":"brijr","description":"A callout for user attention.","dependencies":["class-variance-authority","cn"],"files":[{"path":"components/ui/alert.tsx","content":"import { renderElement, type PartProps } from \"@ui-sdk/react/primitive\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"cn\"\n\nconst alertVariants = cva(\n  \"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-3.5 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 [&>svg]:text-current\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-card text-card-foreground\",\n        destructive:\n          \"bg-card text-destructive *:data-[slot=alert-description]:text-destructive [&>svg]:text-current\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n    },\n  }\n)\n\nfunction Alert({\n  className,\n  variant = \"default\",\n  render,\n  ...props\n}: Omit<PartProps<\"div\">, \"className\"> &\n  VariantProps<typeof alertVariants> & { className?: string }) {\n  return renderElement(\n    \"div\",\n    {\n      \"data-slot\": \"alert\",\n      role: \"alert\",\n      className: cn(alertVariants({ variant }), className),\n      ...props,\n    },\n    render\n  )\n}\n\nfunction AlertTitle({\n  className,\n  render,\n  ...props\n}: Omit<PartProps<\"div\">, \"className\"> & { className?: string }) {\n  return renderElement(\n    \"div\",\n    {\n      \"data-slot\": \"alert-title\",\n      className: cn(\n        \"col-start-2 min-h-4 font-medium tracking-tight\",\n        className\n      ),\n      ...props,\n    },\n    render\n  )\n}\n\nfunction AlertDescription({\n  className,\n  render,\n  ...props\n}: Omit<PartProps<\"div\">, \"className\"> & { className?: string }) {\n  return renderElement(\n    \"div\",\n    {\n      \"data-slot\": \"alert-description\",\n      className: cn(\n        \"col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed\",\n        className\n      ),\n      ...props,\n    },\n    render\n  )\n}\n\nexport { Alert, AlertTitle, AlertDescription }\n","type":"registry:ui"}],"type":"registry:ui"}