import { CSSProperties, ReactNode, default as React } from 'react'; import { ComboboxOptionState } from '../../../.deps/ui/core-web/src'; import { SelectKey } from './SingleSelect'; /** A flattened listbox row: a group heading, or a single option. */ export type SelectRow = { kind: 'heading'; key: string; label: string; } | { kind: 'option'; key: string; option: T; label: string; value: V; disabled: boolean; }; /** Estimated row heights and inner spacing for the virtualizer. */ export interface SelectVirtualizerLayout { rowHeight: number; headingHeight: number; gap: number; padding: number; } export interface SingleSelectVirtualizedListboxProps { rows: Array>; layout: SelectVirtualizerLayout; className: string; optionClassName: string; style?: CSSProperties; /** * CSS selector of the listbox's scrolling ancestor (the popover on desktop, the dialog body on * small screens). Resolved via `listbox.closest(scrollSelector)`. */ scrollSelector: string; /** Index (into `rows`) of the active option, or `null`; force-mounted so its id stays in the DOM. */ activeRowIndex: number | null; /** Index (into `rows`) of the selected option to reveal on open, or `null`. */ selectedRowIndex: number | null; /** Renders a single option row's inner content (indicators + `renderOption`) from the option state. */ renderOptionRow: (option: T, state: ComboboxOptionState) => ReactNode; } /** * The virtualized `Combobox.Listbox`: a `role="listbox"` holding an inner `role="presentation"` sizing * element (its height is the full list size) with the windowed rows positioned absolutely on top of it. * Positioning + the measure ref go directly on each `Combobox.Option` / heading element, so no * non-presentation wrapper sits between the listbox and its options. Shared by the desktop popover and * the small-screen dialog search paths. */ export declare function SingleSelectVirtualizedListbox({ rows, layout, className, optionClassName, style, scrollSelector, activeRowIndex, selectedRowIndex, renderOptionRow, ...rest }: SingleSelectVirtualizedListboxProps): React.JSX.Element;