import { type ReactNode } from "react"; import { type StyleProp, type ViewStyle, type TextStyle, type LayoutStyle } from "../../style/index.js"; import { type BoardCardProps } from "./card.board.js"; import * as s from "./card.styles.js"; import { type CardSkin, type Corner, type Elevation, type Density, type MediaWell } from "./card.styles.js"; export type { CardSkin } from "./card.styles.js"; export interface CardProps extends BoardCardProps { /** Original illustrated approval banner. */ featured?: boolean; /** Show only the authored artwork, filling bounds supplied by the parent. */ artwork?: boolean; /** Inset an illustration in authored artwork. */ illustration?: boolean; controls?: boolean; /** Original promotional gradient card. */ promo?: boolean; /** Stack the featured illustration above its content. */ stacked?: boolean; hue?: number; initials?: string; eyebrow?: string; badge?: string; caption?: string; metadata?: string; /** A compact unframed reference summary in a row. */ referenceInline?: boolean; /** A reference key/status row above its summary. */ referenceStacked?: boolean; /** A compact inset reference panel. */ referenceTile?: boolean; /** A roomy reference panel with context and source. */ referenceDetail?: boolean; referenceKey?: string; referenceSource?: string; /** Open the reference through the system browser. */ href?: string; children?: ReactNode; title?: string; /** * A glyph rendered before the title, for a section panel that names itself * with an icon. Takes effect on the data-driven path (a card given `title` * rather than raw children). */ icon?: ReactNode; /** * Trailing header content, typically a button. Sits opposite the title so the * header reads as one row: name on the left, action on the right. */ actions?: ReactNode; description?: string; body?: string; footer?: string; raised?: boolean; flat?: boolean; /** * The sunken well: the `surface-sunken` fill under the hairline with no shadow, the * hand-off's `--bg2` tiles, stages and panels set into a card. * * On Android it is the Material 3 filled card (the well's fill, no outline). * */ sunken?: boolean; /** The hairline on the card fill with no shadow (the hand-off component page's cards). */ outlined?: boolean; /** * The section hero's stage shadow: the medium step of the ladder (the hand-off's * `--sh-md`, canvas-hero.js `.st`), between the resting card and the raised one. */ heroShadow?: boolean; /** * An elevation sample: an empty card 72 px tall on the popover fill (the hand-off's * `--sf2`) that shows the elevation it is given, its edge the field border at the * `heroShadow` and `raised` steps (the Foundations page's depth tiles). Composes with * the elevation and corner axes; it takes no children. */ sample?: boolean; /** * The card floats over the page: under glass on the web it takes the floating material * (the functional layer's tint over the backdrop blur, design-language item 7), where a * resting card keeps its solid skin. Native glass and solid mode are unchanged. */ floating?: boolean; padded?: boolean; flush?: boolean; /** When set, the whole card becomes pressable (a card that behaves as a control). */ onPress?: () => void; /** A clickable container whose nested controls keep their own button/link roles. */ interactiveContents?: boolean; /** Keep the resting opacity while pressed; hover lift and native ripple remain. */ steadyPress?: boolean; /** * Active/selected surface: a primary border and a soft primary tint. For * selectable cards (a card-style radio or checkbox option that is chosen). */ selected?: boolean; /** * Grow to fill the main axis of a parent Row/Column (flexGrow: 1). On a card * that renders sections, the BODY takes up whatever slack the growth won, so * the content region fills the taller surface and a footer stays on its floor * rather than floating up under the content. Implied inside a Grid cell: the * grid stretches its cells to the row's height and the card fills that box, * so the tiles of one row are equal-height without being asked. */ grow?: boolean; compact?: boolean; comfortable?: boolean; /** Gap-free content densities, tightest first in precedence. */ dense?: boolean; snug?: boolean; cozy?: boolean; relaxed?: boolean; /** * The showcase card's density: a 24 px inset with a 20 px rhythm between flat children * (the hand-off's section page card). Unlike the other named densities it keeps the gap. */ roomy?: boolean; spacious?: boolean; insetContent?: boolean; rail?: boolean; summary?: boolean; metric?: boolean; request?: boolean; menu?: boolean; /** A section panel: an 18 px inset with a 12 px rhythm (the hand-off's accessibility cards and anatomy legend). */ panel?: boolean; /** A guidance card: 18 by 20 with a 10 px rhythm (the hand-off's usage guidance and "From the docs" cards). */ guide?: boolean; /** A link tile: 14 by 16 with a 6 px rhythm (the hand-off's related-component tiles). */ linkTile?: boolean; /** A well: a 16 px inset with a 12 px rhythm (the section pages' skeleton card and wizard preview). */ well?: boolean; /** A pager card: 16 by 18 with a 4 px rhythm (the hand-off's previous and next cards). */ pager?: boolean; /** Keep the reference inset without the compact density's flat-child gap. */ gapless?: boolean; borderless?: boolean; /** The tile corner. */ smallCorners?: boolean; /** The callout corner (14 on the web): a note under a table, a compact link tile. */ calloutCorners?: boolean; /** The section panel corner (18 on the web): a card framing a section of a page. */ largeCorners?: boolean; /** The stage corner (20 on the web): a staging frame, a figure and its legend. */ stageCorners?: boolean; /** The showcase card's corner (20 on the web): the v4 section page's card. */ showcaseCorners?: boolean; /** The hero stage's corner (24 on the web): the v4 section hero's stage (`.st`). */ heroCorners?: boolean; inset?: boolean; /** Original inset human-gate content panel. */ gatePanel?: boolean; /** Original compact version-history row. */ versionPanel?: boolean; /** Original inset metric-tool note. */ notePanel?: boolean; dimmed?: boolean; clip?: boolean; tileShadow?: boolean; rowShadow?: boolean; emptyShadow?: boolean; accessibilityLabel?: string; /** Reference harness: hold the existing hover lift. */ testOnly_hovered?: boolean; onLiftChange?: (raised: boolean) => void; /** E2E hook forwarded to the root element. */ testID?: string; /** Composition within a parent only, never a restyle hook and never a width: the parent layout container provides the bounds. */ style?: LayoutStyle; } export declare function panelOf(p: CardProps): "note" | "version" | "gate" | null; export declare function elevationOf(p: CardProps): Elevation; export declare function densityOf(p: CardProps): Density; export declare function cornerOf(p: CardProps): Corner; export declare function createCard(skin: CardSkin): (props: CardProps) => import("react").JSX.Element; export interface CardSectionProps { children?: ReactNode; /** Composition within a parent only, never a restyle hook and never a width: the parent layout container provides the bounds. */ style?: LayoutStyle; } export interface CardTextProps { children?: ReactNode; /** Outer layout composition only (width/flex within a parent), never a restyle hook. */ style?: StyleProp; } /** The labeled top of a Card, holding its title and description. */ export declare function CardHeader({ children, style }: CardSectionProps): import("react").JSX.Element; /** The Card heading for a skin: the skin supplies the title face. */ export declare function createCardTitle(skin: Pick): ({ children, style }: CardTextProps) => import("react").JSX.Element; /** The muted supporting line beneath a CardTitle. */ export declare function CardDescription({ children, style }: CardTextProps): import("react").JSX.Element; export interface CardContentProps extends CardSectionProps { /** The tightest inset, 10 x 14: a one-line label under a specimen well. */ dense?: boolean; /** A 12 x 16 inset: a short caption (a title over a meta line). */ compact?: boolean; /** A 14 x 16 inset: a fuller caption (a title, a note, a code line). */ cozy?: boolean; } /** The CardContent density a set of props selects, first match wins: `dense` > `compact` > `cozy`. */ export declare function contentDensityOf(p: Pick): keyof typeof s.contentDensity | null; /** * The body region of a Card. It carries the standard surface padding and the card's * flat-child rhythm, so its children space themselves with no wrapper. `dense`, `compact` * and `cozy` tighten the inset for a caption under a media well. */ export declare function CardContent({ children, style, ...density }: CardContentProps): import("react").JSX.Element; /** The bottom region of a Card, for actions or a summary line. */ export declare function CardFooter({ children, style }: CardSectionProps): import("react").JSX.Element; /** * The hairline that anchors a Card's header above its body. A card composing a header and * a body keeps this divider between them. */ export declare function CardSeparator({ style }: { style?: StyleProp; }): import("react").JSX.Element; export interface CardMediaProps { /** The cover image: a URI string (or a docs sample path), or a bundled `require(...)` asset. */ src?: string | number; /** Height of the image band in px (the image covers it edge to edge). The well that hosts `children` grows with its content instead, from the step its booleans pick. */ height?: number; /** Accessible name / alt text announced for the image. */ alt?: string; /** Accessible name for the image, as `alt` gives; when both are set it wins, as on Image. */ accessibilityLabel?: string; /** * Live content to stage in place of an image: CardMedia becomes a sunken well (the * page's `surface-sunken` fill, an ink tint under glass) that centers what it holds, * a specimen above a caption. Children win over `src` when both are passed. */ children?: ReactNode; /** A shorter well: 130 px at least, a 24 x 16 inset (a size or state specimen). */ compact?: boolean; /** A taller well: 240 px at least, a 32 x 20 inset (a platform skin specimen). */ tall?: boolean; /** A figure's stage: 320 px at least, an 80 x 40 inset (an anatomy figure under its marks). */ stage?: boolean; /** * A playground's stage: 340 px at least, a 44 x 28 inset, growing to the height and * the remaining width of a panel beside it (a live specimen beside its knobs). */ playground?: boolean; /** E2E hook forwarded to the image, or to the well. */ testID?: string; } export declare function mediaWellOf(p: Pick): MediaWell; export declare function createCardMedia(skin: CardSkin): (props: CardMediaProps) => import("react").JSX.Element; //# sourceMappingURL=card.shared.d.ts.map