import { type ComponentType } from "react"; import { type ColorTokens, type StyleProp, type ViewStyle, type TextStyle } from "../../style/index.js"; import { type AvatarProps, type AvatarGroupProps } from "../../atoms/avatar/avatar.shared.js"; import { type BadgeProps } from "../../atoms/badge/badge.shared.js"; import { type ButtonProps } from "../../atoms/button/button.shared.js"; /** One avatar in an `avatars` value row: a photo (`src`) or initials (`name`). */ export interface DescriptionListAvatar { src?: string; name?: string; } export interface DescriptionListItem { term: string; value: string; badge?: boolean; status?: boolean; mono?: boolean; /** * Append a ghost "Copy" button after the value. Pressing it invokes the * list's `onCopy` callback with this string (the kit ships no clipboard * dependency; the consumer performs the write). */ copyValue?: string; /** Render the value as an overlapping avatar stack (composed AvatarGroup). */ avatars?: DescriptionListAvatar[]; /** Extra members beyond `avatars`, collapsed into the stack's "+N" chip. */ overflow?: number; update?: boolean; } export interface DescriptionListProps { items: DescriptionListItem[]; title?: string; subtitle?: string; inline?: boolean; twoColumn?: boolean; stacked?: boolean; divided?: boolean; card?: boolean; /** Fires when a row's inline editor commits (Enter or Save): the item index and the new value. */ onUpdate?: (index: number, value: string) => void; /** Fires with a row's `copyValue` when its "Copy" button is pressed. */ onCopy?: (value: string) => void; /** E2E hook forwarded to the root element. */ testID?: string; /** Outer layout composition only (width/flex within a parent), never a restyle hook. */ style?: StyleProp; } export type AvatarComponent = ComponentType; export type AvatarGroupComponent = ComponentType; export type BadgeComponent = ComponentType; export type ButtonComponent = ComponentType; export interface DescriptionListSkin { /** Card surface corner radius (web 8, iOS 26 inset-grouped, M3 12). */ cardRadius: number; /** Card corner curve: iOS continuous (superellipse); circular elsewhere (no-op off iOS). */ cardCurve: "circular" | "continuous"; /** Card surface elevation: a soft shadow on web, flat on the iOS grouped list + Material 3. */ cardShadow: ViewStyle; /** Vertical gap between rows (and the rows-under-header group). */ rowGap: number; /** Card inner padding: all sides for a header-less card, horizontal inset for the header band + rows. */ cardPadding: number; /** Horizontal-row (inline / two-column) cross-axis alignment. */ rowAlign: "baseline" | "center"; /** Horizontal-row minimum height (iOS 52pt Lists row); omit for content height. */ rowMinHeight?: number; /** Divided-row bottom padding beneath the hairline rule. */ dividedPadBottom: number; /** Horizontal-row term type (size / line-height / weight / color / tracking). */ termType: (t: ColorTokens) => TextStyle; /** Horizontal-row value type (size / line-height / weight / color / tracking). */ valueType: (t: ColorTokens) => TextStyle; /** Stacked-layout term tracking (the small uppercase muted label). */ stackedTermTracking: TextStyle; /** Stacked-layout value type (full-weight foreground; per-OS tracking). */ stackedValueType: (t: ColorTokens) => TextStyle; /** Card header title type (size / line-height / weight / color / tracking). */ headerTitleType: (t: ColorTokens) => TextStyle; } /** * Build a DescriptionList component from a platform skin and the platform-correct * composed atoms. * * The composed atoms (Badge / Button) are passed in by each platform's thin * `.ios`/`.android` file, so a value row's status/metadata Badge and the trailing * Update link match the list's platform on every build path. This matters for the * WEB docs 3-up preview: a bare barrel import always resolves the WEB atoms in a * browser bundler, which would paint web-styled atoms inside the iOS/Android rows; * each platform file passes its own `.ios`/`.android` atoms so the row reads * native. On a real device Metro resolves the right atoms by extension regardless, * so the defaults (the web base) are correct there too. The iOS/Android Button * skins also carry the native minimum touch target (skin.minTarget: HIG 44pt / * M3 48dp), so threading them lifts the Update affordance to a compliant target. */ export declare function createDescriptionList(skin: DescriptionListSkin, Badge?: BadgeComponent, Button?: ButtonComponent, Avatar?: AvatarComponent, AvatarGroup?: AvatarGroupComponent): (props: DescriptionListProps) => import("react").JSX.Element; //# sourceMappingURL=description-lists.shared.d.ts.map