import { RadiantElement } from '@ecopages/radiant'; import type { EventEmitter } from '@ecopages/radiant/tools/event-emitter'; export type RuiSelectSelectionMode = 'single' | 'multiple'; export type RuiSelectProps = { value?: string; /** Accessible name when there is no visible `RuiLabel` associated with the trigger. */ label?: string; placeholder?: string; disabled?: boolean; selectionMode?: RuiSelectSelectionMode; /** * When `selectionMode` is `multiple`, whether selecting an option closes the popup. * Defaults to false for multiple and true for single. */ shouldCloseOnSelect?: boolean; }; export type RuiSelectChangeDetail = { value: string; }; /** * `` — a select-only combobox with a button trigger and listbox popup. * * Implements the APG Combobox pattern (select-only variant). DOM focus stays on the * trigger button; visual focus moves into the popup via `aria-activedescendant`. * * Pair with `RuiLabel` (sibling, or via `RuiField`) for the visible name. * Compose with `data-select-trigger`, `data-select-toggle`, `data-select-value`, `data-select-listbox` * (popup shell), and `RuiListbox` with `embedded` for options. * * Wrap the listbox in `RuiAutocomplete` to add search filtering. * Use `RuiTagGroup` inside `RuiSelectValue` for multi-select chip display. * * @see https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/ * @element rui-select * @fires rui-change */ export declare class RuiSelect extends RadiantElement { value: string; label: string; placeholder: string; disabled: boolean; selectionMode: RuiSelectSelectionMode; shouldCloseOnSelect: boolean | undefined; changeEvent: EventEmitter; private open; private readonly uid; private readonly listboxBehavior; rootTarget: HTMLElement; private get listboxId(); private get triggerId(); private isMultiple; private closesOnSelect; private getSelectedValues; private setSelectedValues; private getSearchInput; private hasSearchInput; /** Element that receives `aria-activedescendant` while the popup is open. */ private getActiveDescendantHost; private resetSearchFilter; private syncSearchInput; private focusPopupInput; /** * Resolves the multi-select chip host inside the value slot. * * @remarks * During Storybook/SSR upgrade, `querySelector` can return the host before * `rui-tag-group` is defined — treat that as absent until `setItems` exists. */ private getTagGroup; private hasTagGroup; private syncTagGroup; private syncTagGroupPlaceholder; private removeSelectedValue; private getTrigger; private getToggle; private getValueElement; private getListboxPopup; private getListbox; private getListboxHost; private getOptions; private getOptionLabel; private getOptionValue; private ensureOptionIds; private getAccessibleName; private syncLabel; private syncTrigger; private syncToggle; private syncListboxHost; private syncValueDisplay; private syncOptionSelection; private setOpen; private selectOption; private handleListboxKeydown; private handleTriggerKeydown; private initialize; protected onConnected(): void; disconnectedCallback(): void; onPropsUpdated(): void; onTriggerClick(event: Event): void; onTriggerKeydown(event: KeyboardEvent): void; onSearchKeydown(event: KeyboardEvent): void; onSearchInput(): void; onTagRemove(event: Event): void; onTagClick(event: Event): void; onOptionPointerOver(event: Event): void; onOptionMouseDown(event: Event): void; onOptionClick(event: Event): void; onFocusOut(event: FocusEvent): void; onDocumentPointerDown(event: PointerEvent): void; }