import { ElementType, HTMLAttributes, ReactNode } from "react"; import { BoxProps } from "@chakra-ui/react"; /** Controls badge/icon size, type scale, and spacing together. */ export type EmptyStateSize = "sm" | "md" | "lg"; /** Palette used to tint the icon badge — brand scale or semantic tone. */ export type EmptyStateColorScheme = "primary" | "secondary" | "tertiary" | "gray" | "success" | "error" | "warning" | "info"; /** Centered empty/zero-data placeholder; other `
` attributes (id, className, data-*, aria-*) land on the root. */ export interface EmptyStateProps extends Omit, "title" | "color" | "children" | "dangerouslySetInnerHTML"> { /** Heading text. Defaults to "No data found". */ title?: string; /** Heading element for the title; defaults to "h3" — pick the level that fits the page outline. */ titleAs?: "h2" | "h3" | "h4" | "h5" | "h6" | "p"; /** Supporting text under the title; a node (bold, link) is wrapped in the same muted block and renders above `action`. */ description?: ReactNode; /** A lucide-react (or any) icon component rendered inside the badge. */ icon?: ElementType; /** Illustration image URL. When provided it replaces the icon badge. */ image?: string; /** Alt text for `image`; defaults to "" (decorative) because the title already says it. */ imageAlt?: string; /** Controls spacing, icon and font sizes. */ size?: EmptyStateSize; /** Accent color for the icon badge. */ colorScheme?: EmptyStateColorScheme; /** "default" plain, "subtle" tinted card, "dashed" dashed-border drop zone. */ variant?: "default" | "subtle" | "dashed"; /** Action node(s) — usually a Button or a pair of buttons. */ action?: ReactNode; /** Float the icon gently to draw attention; off under reduced motion. */ animate?: boolean; /** Minimum height of the container. */ minH?: BoxProps["minH"]; /** Escape hatch for extra Chakra styles on the outer container. */ sx?: BoxProps["sx"]; } /** "Nothing matches your filters" panel; unlike a first-run empty list it names the filters and offers the undo. */ export interface FilteredEmptyStateProps { /** Defaults to "Nothing matched these filters". */ title?: string; /** Replaces the counted default; omit it and, with `filterCount`, a counted line is shown. */ description?: ReactNode; /** "card" renders at `sm` size with a 6rem floor so it fits inside a panel; "page" (default) owns the screen. */ scale?: "page" | "card"; /** Active filter count; drives the default description and the "Clear N filters" label. */ filterCount?: number; /** Renders the outline Clear button; omit it and no Clear button appears. */ onClearFilters?: () => void; /** Defaults to "Clear filters", or "Clear N filters" when `filterCount` is set. */ clearLabel?: string; /** Renders the primary button that drops only the filter doing the narrowing. */ onRemoveLastFilter?: () => void; /** Name that filter, e.g. `Remove "Status: Absent"`; defaults to "Remove last filter". */ removeLastFilterLabel?: string; /** Overrides the height floor that `scale` sets. */ minH?: EmptyStateProps["minH"]; }