import type * as React from 'react'; import type { PolymorphicTag, PrimitivePropsWithRef } from '../utils/primitive.js'; /** Props for {@link CardRoot}: {@link CardProps} minus the derived-anatomy-only props. */ export interface CardRootProps extends PrimitivePropsWithRef<'div'> { /** * Element name to render instead of the default tag, from the library's allowlist of tags. * @default 'div' */ as?: PolymorphicTag | undefined; /** * Shadow rung the skin lifts the card by, mirrored to `data-elevation`. * @default undefined — the skin's own flat surface. */ elevation?: 'raised' | (string & {}) | undefined; /** * Gives the card the skin's hover and focus affordances, mirrored as a bare `data-interactive`. * @default undefined — a static surface with no affordances. */ interactive?: boolean | undefined; /** * Marks the card as the chosen one of a set, mirrored as a bare `data-selected`. * @default undefined — an unselected surface. */ selected?: boolean | undefined; } /** * Props for the {@link Card} recipe, which always wraps its children in derived anatomy and has no `asChild`. */ export interface CardProps extends Omit { /** * The card's heading, rendered into a derived `CardTitle` inside a derived `CardHeader`. * @default undefined — no title is rendered. */ title?: string | undefined; /** * Supporting text below the title, rendered into a derived `CardDescription` * inside the same derived `CardHeader`. * @default undefined — no description is rendered. */ description?: string | undefined; /** * An edge-to-edge image or video, rendered into a derived `CardMedia` region * ahead of the header so the skin can clip it against the card's radius. * @default undefined — no media region is rendered. */ media?: React.ReactNode | undefined; /** * The card's actions, rendered into a derived `CardFooter` after the body. * @default undefined — no footer is rendered. */ footer?: React.ReactNode | undefined; /** * Which heading element derived `CardTitle` renders, `

` through `

`. * @default 3 */ headingLevel?: 1 | 2 | 3 | 4 | 5 | 6 | undefined; } /** Props for {@link CardMedia}, the card's edge-to-edge image/video region. */ export interface CardMediaProps extends PrimitivePropsWithRef<'div'> { } /** Props for {@link CardHeader}, a container for `CardTitle`/`CardDescription`. */ export interface CardHeaderProps extends PrimitivePropsWithRef<'div'> { } /** Props for {@link CardTitle}, the card's heading. */ export interface CardTitleProps extends PrimitivePropsWithRef<'h3'> { /** * Which heading element to render, `

` through `

`. * @default 3 */ level?: 1 | 2 | 3 | 4 | 5 | 6 | undefined; } /** Props for {@link CardDescription}, supporting text below the title. */ export interface CardDescriptionProps extends PrimitivePropsWithRef<'p'> { } /** Props for {@link CardContent}, the card's main body. */ export interface CardContentProps extends PrimitivePropsWithRef<'div'> { } /** Props for {@link CardFooter}, a container for actions at the bottom of the card. */ export interface CardFooterProps extends PrimitivePropsWithRef<'div'> { }