import * as React from 'react'; import { cn } from '../../shared/utils'; /** * Zero-state container for empty lists, tables, and search results. * * @description * Replaces raw "No data found" text or bare SVG placeholders with a * structured, accessible empty state. Composed from sub-primitives: * `Empty > EmptyIcon > EmptyTitle > EmptyDescription > EmptyAction`. * * @ai-rules * 1. NEVER render raw text like "No records found" — always use ` > > `. * 2. Align CTA buttons inside ``. * 3. Icons inside `` use `className="size-10 text-muted-foreground"`. * 4. When used inside a table, wrap in `` to fill the full row. */ const Empty = React.forwardRef>( ({ className, ...props }, ref) => (
) ); Empty.displayName = 'Empty'; const EmptyIcon = React.forwardRef>( ({ className, ...props }, ref) => (
) ); EmptyIcon.displayName = 'EmptyIcon'; const EmptyImage = React.forwardRef>( ({ className, alt, ...props }, ref) => ( {alt} ) ); EmptyImage.displayName = 'EmptyImage'; const EmptyTitle = React.forwardRef>( ({ className, ...props }, ref) => (

) ); EmptyTitle.displayName = 'EmptyTitle'; const EmptyDescription = React.forwardRef< HTMLParagraphElement, React.HTMLAttributes >(({ className, ...props }, ref) => (

)); EmptyDescription.displayName = 'EmptyDescription'; const EmptyAction = React.forwardRef>( ({ className, ...props }, ref) => (

) ); EmptyAction.displayName = 'EmptyAction'; export { Empty, EmptyIcon, EmptyImage, EmptyTitle, EmptyDescription, EmptyAction };