/** * SvListBox - an inline single/multi-select list (WAI-ARIA listbox) with * roving highlight + full keyboard. Parity: Smart `smart-list-box`. Controlled * via `value` (scalar or array) + `onChange`. Scales to huge option sets with * `virtual` - windowing over the shared `createSvelteVirtualizer` (slot-keyed * DOM recycling), which also windows GROUPED lists and mixes row heights. * * Virtual mode uses a JS-DRIVEN scroller (like Smart): the option list does * NOT use native overflow scroll - a single `scrollOffset` state positions the * rows (`translateY`) AND drives the virtualizer window in the same reactive * flush. Native scroll is composited off the main thread, so it paints the * empty scrolled position a frame before JS can re-window (the "blank on a * fast thumb-drag" flash); driving the offset in JS removes that async gap. */ import { type Snippet } from 'svelte'; import { type ListOption, type RowHeight } from './list-option'; import { type SvEditorProps } from './editor-contract'; type Props = SvEditorProps & { options: ReadonlyArray; value?: string | number | ReadonlyArray | ReadonlySet | null; onChange?: (value: any) => void; multiple?: boolean; /** * Checklist styling: each row draws a checkbox and the selected-row accent * highlight is suppressed, because a list that starts fully selected (a * filter checklist) would otherwise paint every row. State reads off the * box; `aria-selected` still carries it for assistive tech. */ checkbox?: boolean; /** Stretch to the container width instead of the default 220px. */ block?: boolean; /** Visible height in rows before scrolling. */ rows?: number; /** Window the list (render only visible rows) for large option sets. */ virtual?: boolean; /** Row height in px - a number, or a per-option function for variable * heights. Must match the rendered row height. Default 32. */ rowHeight?: RowHeight; /** Height (px) of a group heading row when virtualized + grouped. Default 28. */ groupHeaderHeight?: number; /** Custom per-option content. Receives the option. */ item?: Snippet<[ListOption]>; /** @deprecated Use `item`. */ itemTemplate?: Snippet<[ListOption]>; }; declare const SvListBox: import("svelte").Component; type SvListBox = ReturnType; export default SvListBox;