import { type FieldWidthProps, type ColorTokens, type StyleProp, type ViewStyle, type TextStyle } from "../../style/index.js"; export type Mode = "single" | "multi"; export type Size = "small" | "medium" | "large"; export interface ListboxItem { /** The option's primary text. */ label: string; /** Optional secondary text shown under the label in a muted tone. */ detail?: string; /** Whether this option is initially selected (uncontrolled seed; prefer the top-level `defaultSelected`). */ selected?: boolean; } export interface ListboxProps extends FieldWidthProps { /** The options to render, top to bottom. */ items: ListboxItem[]; /** Multi-select: each row gets a leading Checkbox instead of a single ✓. */ multi?: boolean; /** Wrap the list in a rounded, bordered content card (solid, stays opaque under glass). */ bordered?: boolean; /** Tighter rows with smaller text. */ small?: boolean; /** Taller rows. */ large?: boolean; /** Dim the list and block selection. */ disabled?: boolean; /** * Selected option index(es) (CONTROLLED): a single index in single-select, an * array of indices in multi-select. Omit for uncontrolled use. */ selected?: number | number[]; /** * Initial selection for uncontrolled use (a bare listbox selects on press). * Falls back to the `selected` flags on `items` when omitted. */ defaultSelected?: number | number[]; /** Fired with the full new selection (an index in single-select, an index array in multi). */ onChange?: (selected: number | number[]) => void; /** Fired with the pressed option's index. */ onSelect?: (index: number) => void; /** E2E hook forwarded to the root list view. */ testID?: string; /** Outer flex composition within a parent only; width comes from the width axis (block/narrow/wide). Never a restyle hook. */ style?: StyleProp; } export interface ListboxSkin { /** A bordered container reads as a content card: rounded, hairline border, solid `card` fill, inset. */ containerBordered: (tokens: ColorTokens) => ViewStyle; /** Each row: a horizontal flex shell with a leading control + label stack. */ rowBase: ViewStyle; /** Per-row vertical padding by size. */ rowSize: Record; /** The accent fill used for a selected single-select row and the press state. */ rowSelected: (tokens: ColorTokens) => ViewStyle; /** Single-select checkmark column: a fixed-width gutter reserved on every row. */ checkmark: (tokens: ColorTokens) => TextStyle; /** Label/detail stack: grows to fill the remaining row width. */ textStack: ViewStyle; /** Label type + color per size. */ label: (tokens: ColorTokens, size: Size) => TextStyle; /** Muted detail line type + color. */ detail: (tokens: ColorTokens) => TextStyle; /** Android press ripple (a no-op off Android; null disables it). */ ripple: ((tokens: ColorTokens) => { color: string; borderless: boolean; }) | null; /** Pressed-row opacity dim (null leaves the look unchanged; the accent press fill carries the feedback). */ pressedOpacity: number | null; } /** Build a Listbox component from a platform skin. */ export declare function createListbox(skin: ListboxSkin): (props: ListboxProps) => import("react").JSX.Element; //# sourceMappingURL=listbox.shared.d.ts.map