import { RadiantElement } from '@ecopages/radiant'; import type { EventEmitter } from '@ecopages/radiant/tools/event-emitter'; export type RuiComboboxProps = { value?: string; /** Accessible name when there is no visible `RuiLabel` associated with the input. */ label?: string; placeholder?: string; disabled?: boolean; /** * When true, focusing the input opens the listbox (visual focus stays on the * input until ArrowDown / ArrowUp). Defaults to false — APG list autocomplete * opens on ArrowDown, typing, or the trigger button. */ openOnFocus?: boolean; }; export type RuiComboboxChangeDetail = { value: string; }; /** * `` — a composition-first combobox with a listbox popup. * * Implements the APG Combobox pattern (list autocomplete, manual selection). * DOM focus stays on the combobox input; visual focus moves into the popup via * `aria-activedescendant` when the user presses ArrowDown / ArrowUp. * * Pair with `RuiLabel` (sibling, or via `RuiField`) for the visible name. * Compose with `data-combobox-input`, optional `data-combobox-trigger`, * `data-combobox-listbox` (popup shell), and an embedded `RuiListbox`. * * @see https://www.w3.org/WAI/ARIA/apg/patterns/combobox/ * @see https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-autocomplete-list/ * * @element rui-combobox * * @attr {string} value - Selected option value. Default: `''`. * @attr {string} label - Accessible name when there is no visible `RuiLabel`. Default: `''`. * @attr {string} placeholder - Placeholder text for the input. Default: `''`. * @attr {boolean} disabled - Disable the input and trigger. Default: `false`. * @attr {boolean} open-on-focus - Open the listbox when the input gains focus. Default: `false`. * * @fires rui-change - Emitted when an option is selected; detail carries `value`. * * @cssclass rui-combobox - Root surface. */ export declare class RuiCombobox extends RadiantElement { value: string; label: string; placeholder: string; disabled: boolean; openOnFocus: boolean; changeEvent: EventEmitter; private open; private skipNextFocusOpen; private readonly uid; private readonly listboxBehavior; rootTarget: HTMLElement; private get listboxId(); private get inputId(); private getInput; private getTrigger; private getListboxPopup; private getListbox; private getListboxHost; private getOptions; private getOptionLabel; private ensureOptionIds; private getAccessibleName; private isComboboxInput; private syncLabel; private syncTrigger; private syncInput; private syncListboxHost; private syncOptionSelection; private setVisualFocusCombobox; private setOpen; private getAutocomplete; private syncAutocompleteFilter; /** Restores the unfiltered collection when arrow navigation has no match to enter. */ private showAllOptions; private syncFilter; private select; private syncFromValue; private initialize; protected onConnected(): void; disconnectedCallback(): void; onPropsUpdated(): void; onRootFocusIn(event: FocusEvent): void; /** @remarks Typing returns visual focus to the textbox. */ onRootInput(event: Event): void; onRootKeydown(event: KeyboardEvent): void; private handleInputKeydown; onTriggerClick(event: Event): void; onOptionPointerOver(event: Event): void; onOptionMouseDown(event: Event): void; onOptionClick(event: Event): void; onFocusOut(event: FocusEvent): void; onDocumentPointerDown(event: PointerEvent): void; }