import { EventEmitter } from '../../stencil-public-runtime'; import type { SelectValue, SelectChangeEventDetail, SelectValidateEventDetail, SelectOption, SelectPlacement } from '../../utils/select'; import { FormControlState } from '../../utils/form-control'; /** * @slot - Content containing seki-select-trigger and seki-select-content */ export declare class SekiSelect { el: HTMLElement; internals: ElementInternals; private formControl?; /** Current selected value (controlled mode) */ value?: SelectValue; /** Initial selected value (uncontrolled mode) */ defaultValue?: SelectValue; /** Enable multi-select mode */ multiple: boolean; /** Placeholder text shown when no selection */ placeholder: string; /** Disable all interactions */ disabled: boolean; /** Mark as required for form validation */ required: boolean; /** Control dropdown open state (controlled mode) */ open?: boolean; /** Initial dropdown open state (uncontrolled mode) */ defaultOpen: boolean; /** Form field name for form submission */ name?: string; /** Maximum visible pills in multi-select mode */ maxVisiblePills: number; /** Accessible label for screen readers */ ariaLabel?: string; /** ID of element that labels this select */ ariaLabelledby?: string; /** ID of element that describes this select */ ariaDescribedby?: string; /** * Text that describes this control. Set by `seki-field` from its description * (and error) slot, because an `aria-describedby` id cannot cross the shadow * boundary to the inner element (#358). */ ariaDescription?: string; /** Marks the control invalid for assistive technology. Set by `seki-field` (#358). */ ariaInvalid?: string; /** Preferred dropdown placement */ placement: SelectPlacement; /** Maximum dropdown height */ maxHeight: string; /** Emitted when selected value changes */ sekiChange: EventEmitter; /** Emitted when dropdown open state changes; `detail` is the new open state as a bare boolean */ sekiOpenChange: EventEmitter; /** Emitted when validation state changes */ sekiValidate: EventEmitter; /** * Internal: emitted whenever selectContext's value/open/focus/disabled state * changes (including programmatic prop assignment, which sekiChange doesn't * cover — it's reserved for user-driven selection), so descendant options * know to imperatively refresh their aria-selected/data-selected/ * data-focused state. Not part of the public change API — use sekiChange * for that. */ sekiSelectContextChange: EventEmitter; internalValue: SelectValue; isOpen: boolean; focusedOptionValue: string | number | null; registeredOptions: SelectOption[]; hasBeenActivated: boolean; searchBuffer: string; searchActive: boolean; private contentId; private triggerId; private searchTimeoutId; private searchDebounce; private clickOutsideListener?; componentWillLoad(): void; componentDidLoad(): void; componentDidRender(): void; disconnectedCallback(): void; /** * The trigger already closes the list on Escape; this also covers focus * anywhere else and keeps an enclosing dialog open. * Place on the overlay stack (utils/overlay.ts): Escape reaches this * component only when nothing is open on top of it, so one key press closes * one layer (#332). */ private layer; handleValuePropChange(newValue: SelectValue): void; handleOpenPropChange(newOpen: boolean): void; handleIsOpenChange(): void; handleInternalValueChange(): void; handleDisabledChange(): void; /** * The trigger's label comes from the registered options, so registering an * option must notify the parts. Before #323 this was only a silent property * write in componentDidRender, and a trigger that rendered before the * selected option registered stayed on the placeholder. */ handleRegisteredOptionsChange(): void; private registrationPublishQueued; formResetCallback(): void; formDisabledCallback(disabled: boolean): void; formStateRestoreCallback(state: FormControlState): void; /** Put the selection back to `next` without emitting `sekiChange` (reset is not a user edit). */ private setValueFromForm; private isValueEmpty; private getFormValue; handleFocusedOptionValueChange(): void; private updateContextOnElement; /** * Mirror the current selection into the associated form via ElementInternals. * Replaces the previous hidden native control, which lived inside the shadow * root and therefore never participated in form submission. */ private syncFormValue; private handleClickOutside; /** Programmatically open the dropdown */ openDropdown(): Promise; /** Programmatically close the dropdown */ closeDropdown(): Promise; /** Focus the trigger element */ focusTrigger(): Promise; /** Clear all selections */ clearSelection(): Promise; /** Handle keyboard navigation (arrow keys, typeahead, etc.) */ handleKeyboard(event: KeyboardEvent): Promise; private focusNextOption; private focusPreviousOption; private addToSearchBuffer; handleValueChange: (newValue: SelectValue) => void; handleOpenChange: (open: boolean) => void; handleOptionFocus: (value: string | number) => void; handleOptionSelect: (value: string | number) => void; isValueSelected: (value: string | number) => boolean; getSelectedOptions: () => SelectOption[]; registerOption: (option: SelectOption) => void; unregisterOption: (value: string | number) => void; validateRequired: () => void; handleValidate: (valid: boolean, errorMessage?: string) => void; private buildSelectContext; render(): any; }