import type { HTMLAttributes, ReactNode } from 'react'; /** * Highlights the card, matching `ListItem`'s `spotlight`. * * - `active` — live content the user can act on. Raised, with a soft shadow and a hairline border. * - `inactive` — a feature the user has not set up yet. Recessed, with a dashed stroke. * * Without a spotlight the card is flat, with a solid stroke, for content that is present but not * actionable. */ export type CardContainerSpotlight = 'active' | 'inactive'; /** * - `md` — 8px, and 16px from the `md` breakpoint up. * - `none` — content runs to the card's edges. */ export type CardContainerPadding = 'md' | 'none'; export interface CardContainerProps extends HTMLAttributes { /** * Highlights the card as live content (`active`) or as a feature not set up yet (`inactive`). * Leave unset for a flat card. * @default undefined */ spotlight?: CardContainerSpotlight; /** * Space between the card's edge and its content. `none` lets content such as images or charts * run to the card's edges, clipped to its rounded corners. Anything clipped at the edges * includes focus rings, so use `none` for non-interactive content, and keep lists on `md`. * @default 'md' */ padding?: CardContainerPadding; /** * Content, stacked with no gap. * @default undefined */ children?: ReactNode; /** * Element rendered as the root. Use `section` when the card is a standalone, major part of the * page, or `article` for self-contained content such as a feed item. Leave most cards as a `div`, * so a page of cards doesn't fill the landmark list with a region per card. * @default 'div' */ as?: 'div' | 'section' | 'article'; /** * Shows the card as hovered or pressed while a direct child link (with an `href`) or enabled * button is, such as a link that fills the card, and as hovered while that child has keyboard * focus. When that link or button is the card's only child, it also covers the card's padding, * so the whole card is clickable. Otherwise the rest of the card, and controls nested deeper, * don't trigger the states, so the card is only shown as something to act on where it can be * clicked. * @default false */ interactive?: boolean; className?: string; 'data-testid'?: string; }