{"$schema":"https://ui.logic2b.com/schema/registry-item.json","name":"alert","type":"registry:ui","description":"Displays a callout for user attention with title and description. Variants: default, destructive.","dependencies":["class-variance-authority"],"registryDependencies":["utils"],"files":[{"path":"ui/alert.tsx","type":"registry:ui","content":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst alertVariants = cva(\n  \"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>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          \"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90\",\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  return (\n    <div\n      data-slot=\"alert\"\n      role=\"alert\"\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        \"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight\",\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-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nexport { Alert, AlertTitle, AlertDescription }\n"}],"categories":["feedback"],"accessibility":{"support":"native","pattern":"alert","primitive":"HTML role=alert","keyboard":[],"aria":["Uses role=alert so newly mounted urgent messages are announced."],"consumer":["Reserve it for important dynamic messages; avoid mounting routine static content as an alert."]},"api":{"source":"src/ui/alert.tsx","exports":[{"name":"Alert","kind":"component","propsType":"React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>","props":[{"name":"variant","type":"null | \"default\" | \"destructive\"","required":false}]},{"name":"AlertTitle","kind":"component","propsType":"React.ComponentProps<\"div\">"},{"name":"AlertDescription","kind":"component","propsType":"React.ComponentProps<\"div\">"}]}}