import { ReactNode } from 'react'; import { UiCoreLocale } from '../../../helpers/uiCoreLocale'; import { CardHeadingLevel } from './Card.types'; /** Loading placeholder in the card's shape; hidden from assistive technology, the list says it is busy (CARD-17). */ export declare const CardSkeleton: () => JSX.Element; export interface CardListSelection { /** Controlled by the app, so the checked cards survive a visit to an item and back (CARD-13). */ checkedIds: readonly string[]; onCheckedChange: (id: string, checked: boolean) => void; disabledReason?: (id: string) => string | undefined; } export interface CardListProps { items: readonly T[]; getId: (item: T) => string; renderCard: (item: T) => ReactNode; /** * Heading level of every card title in the list, so they all match (CARD-8). Optional: a card's own * `headingLevel` wins; without either, cards use `h3`. */ cardHeadingLevel?: CardHeadingLevel; /** Language of every card's built-in strings. Defaults to `en`, as in the rest of ui-core. */ locale?: UiCoreLocale; /** `grid` (default): as many columns of at least 18 rem as fit, the cards of a row equally tall; each card stays ≤ 37.5 rem. `column`: one left-aligned column (CARD-16). */ layout?: 'column' | 'grid'; loading?: boolean; skeletonCount?: number; /** Says why the list is empty and what to do (CARD-17). */ empty?: ReactNode; /** Announced politely when an action the user took changed the list (4.1.3). */ statusMessage?: string; /** Puts focus back on this card's link, e.g. after returning from the item it opens (CARD-13). */ restoreFocusId?: string; selection?: CardListSelection; ariaLabel?: string; className?: string; dataTest: string; } /** * A group of cards is a list: `