import * as React from "react"; import {cn} from "@/lib/utilities"; import styles from "./empty.module.css"; /** Supported visual treatments for {@link EmptyMedia}. */ export type EmptyMediaVariant = "default" | "icon"; /** * Props for the {@link Empty} component. */ export type EmptyProps = React.ComponentPropsWithoutRef<"div">; /** * Props for the {@link EmptyHeader} component. */ export type EmptyHeaderProps = React.ComponentPropsWithoutRef<"div">; /** * Props for the {@link EmptyMedia} component. */ export interface EmptyMediaProps extends React.ComponentPropsWithoutRef<"div"> { /** Visual presentation applied to the media container. @default "default" */ variant?: EmptyMediaVariant; } /** * Props for the {@link EmptyTitle} component. */ export type EmptyTitleProps = React.ComponentPropsWithoutRef<"div">; /** * Props for the {@link EmptyDescription} component. */ export type EmptyDescriptionProps = React.ComponentPropsWithoutRef<"p">; /** * Props for the {@link EmptyContent} component. */ export type EmptyContentProps = React.ComponentPropsWithoutRef<"div">; /** * Creates a structured empty-state container. * * @remarks * - Pure CSS component (no Base UI primitive) * - Renders a `
` element * - Styling via CSS Modules with `--ac-*` custom properties * * @example * ```tsx * * * * ``` * * @see {@link EmptyProps} for available props */ const Empty = React.forwardRef( ({className, ...props}: Readonly, ref): React.JSX.Element => (
), ); /** * Groups the leading header content for an empty state. * * @remarks * - Pure CSS component (no Base UI primitive) * - Renders a `
` element * - Styling via CSS Modules with `--ac-*` custom properties * * @example * ```tsx * Nothing here yet * ``` * * @see {@link EmptyHeaderProps} for available props */ const EmptyHeader = React.forwardRef( ({className, ...props}: Readonly, ref): React.JSX.Element => (
), ); /** * Hosts media or icon content for an empty state. * * @remarks * - Pure CSS component (no Base UI primitive) * - Renders a `
` element * - Styling via CSS Modules with `--ac-*` custom properties * * @example * ```tsx * 📭 * ``` * * @see {@link EmptyMediaProps} for available props */ const EmptyMedia = React.forwardRef( ({className, variant = "default", ...props}: Readonly, ref): React.JSX.Element => (
), ); /** * Renders the primary title for an empty state. * * @remarks * - Pure CSS component (no Base UI primitive) * - Renders a `
` element * - Styling via CSS Modules with `--ac-*` custom properties * * @example * ```tsx * No results found * ``` * * @see {@link EmptyTitleProps} for available props */ const EmptyTitle = React.forwardRef( ({className, ...props}: Readonly, ref): React.JSX.Element => (
), ); /** * Renders supporting copy for an empty state. * * @remarks * - Pure CSS component (no Base UI primitive) * - Renders a `

` element * - Styling via CSS Modules with `--ac-*` custom properties * * @example * ```tsx * Try adjusting your filters. * ``` * * @see {@link EmptyDescriptionProps} for available props */ const EmptyDescription = React.forwardRef( ({className, ...props}: Readonly, ref): React.JSX.Element => (

), ); /** * Hosts trailing actions or supplemental content for an empty state. * * @remarks * - Pure CSS component (no Base UI primitive) * - Renders a `

` element * - Styling via CSS Modules with `--ac-*` custom properties * * @example * ```tsx * * * * ``` * * @see {@link EmptyContentProps} for available props */ const EmptyContent = React.forwardRef( ({className, ...props}: Readonly, ref): React.JSX.Element => (
), ); Empty.displayName = "Empty"; EmptyHeader.displayName = "EmptyHeader"; EmptyMedia.displayName = "EmptyMedia"; EmptyTitle.displayName = "EmptyTitle"; EmptyDescription.displayName = "EmptyDescription"; EmptyContent.displayName = "EmptyContent"; export {Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle};