import { type ColorTokens, type LayoutStyle, type MeasureProps, 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 MeasureProps { /** The options to render, top to bottom. */ items: ListboxItem[]; /** Accessible name of the option list or multi-select checkbox group. Defaults to "Options". */ accessibilityLabel?: string; /** * Multi-select: each row is a checkbox * * (a leading indicator on the web and Android, a trailing ✓ on iOS) * * * (a trailing ✓) * * * (a leading indicator) * * instead of a single choice. */ multi?: boolean; /** Wrap the list in a rounded, bordered content card with static glass in glass mode. */ 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; /** Composition within a parent only, never a restyle hook and never a width: the parent layout container provides the bounds. */ style?: LayoutStyle; } export interface ListboxSkin { /** A bordered container: rounded, hairline border, its fill and inset. */ containerBordered: (tokens: ColorTokens) => ViewStyle; /** Each row: a horizontal flex shell with the label stack and the trailing check. */ rowBase: ViewStyle; /** Per-row padding by size. */ rowSize: Record; /** The space between rows. */ rowGap: number; /** The fill of a pressed row. */ rowPressed: (tokens: ColorTokens) => ViewStyle; /** The instant look of a resting, unchosen row under the pointer; null where there is none. */ rowHover: ((tokens: ColorTokens) => ViewStyle) | null; /** The fill of every chosen row, in single and multi select alike. */ rowChosen: (tokens: ColorTokens) => ViewStyle; /** The trailing check a chosen row carries: its size (px) and ink. Its slot stays on every row. */ check: { size: number; color: (tokens: ColorTokens) => string; }; /** 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 press fill carries the feedback). */ pressedOpacity: number | null; /** Opacity of a disabled list. */ disabledOpacity: number; } export declare function modeOf(p: ListboxProps): Mode; export declare function sizeOf(p: ListboxProps): Size; /** 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