{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "alert", "type": "registry:ui", "title": "Alert", "files": [ { "path": "ui/alert.tsrx", "type": "registry:ui", "target": "components/ui/alert.tsrx", "content": "// Base UI base alert — structure and cva strings from upstream `bases/base-ui/ui/alert.tsx`.\n//\n// Alert uses no headless primitive in any base, and this file's nine string literals were\n// verified byte-identical to the React Aria base's `alert.tsrx`. That is a finding, not an\n// assumption: the two bases DO diverge elsewhere (the Radix base's Skeleton is `bg-accent`\n// where aria's is `bg-muted`), so identity is checked per component rather than inherited.\n//\n// Octane adaptations: `React.ComponentProps<'div'>` → the package's `DivProps`; no\n// `\"use client\"` (octane has no Server Components). Pure template JSX, no consumer-children\n// interleave, so every part uses the `@{ … }` shorthand.\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\nimport type { DivProps } from '@/lib/types';\n\nexport const alertVariants = cva(\n\t'group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*=\\'size-\\'])]:size-4',\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: 'bg-card text-card-foreground',\n\t\t\t\tdestructive: 'bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: 'default',\n\t\t},\n\t},\n);\n\nexport interface AlertProps extends DivProps {\n\tvariant?: VariantProps['variant'];\n}\n\nexport function Alert({ className, variant, ...props }: AlertProps) @{\n\t\n}\n\nexport function AlertTitle({ className, ...props }: DivProps) @{\n\tsvg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground',\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n}\n\nexport function AlertDescription({ className, ...props }: DivProps) @{\n\t\n}\n\nexport function AlertAction({ className, ...props }: DivProps) @{\n\t
\n}\n" } ], "dependencies": [ "class-variance-authority" ], "registryDependencies": [ "@octane/types", "@octane/utils" ] }