import { EventEmitter } from "../../stencil-public-runtime"; import { IcAriaLive, IcInformationStatusOrEmpty, IcSearchMatchPositions, IcMultiValueEventDetail, IcSizes, IcThemeMode } from "../../utils/types"; import { IcSelectOption, IcSelectOptionFlat } from "./ic-select.types"; import { IcOptionSelectEventDetail } from "../ic-menu/ic-menu.types"; /** * @slot helper-text - Content is set as the helper text for the select. * @slot icon - Content will be placed to the left of the select text input. */ export declare class Select { private inputId; private menu?; private menuId; private inheritedAttributes; private anchorEl?; private nativeSelectElement?; private hostMutationObserver; private clearButton?; private searchableSelectElement?; private timeoutTimer; private hasTimedOut; private selectElement?; private initialRender; private characterKeyPressTimer?; private pressedCharacters; el: HTMLIcSelectElement; ariaActiveDescendant?: string; debounceIcInput?: number; hiddenInputValue: string | null; hasError: boolean; searchableSelectInputValue: string; selectButtonAriaLiveText: string; selectInputAriaLiveText: string; /** * If `true`, the disabled state will be set. */ disabled: boolean; watchDisabledHandler(): void; /** * If `true`, the built in filtering will be disabled for a searchable variant. For example, if options will already be filtered from external source. */ disableAutoFiltering: boolean; /** * The text displayed when there are no options in the option list. */ emptyOptionListText: string; /** * The
element to associate the select with. */ form?: string; /** * If `true`, the select will fill the width of the container. */ fullWidth: boolean; /** * The helper text that will be displayed for additional field guidance. */ helperText: string; /** * If `true`, the label will be hidden and the required label value will be applied as an aria-label. */ hideLabel: boolean; /** * If `true`, descriptions of options will be included when filtering options in a searchable select. Only applies to built in filtering. */ includeDescriptionsInSearch: boolean; /** * If `true`, group titles of grouped options will be included when filtering options in a searchable select. Only applies to built in filtering. */ includeGroupTitlesInSearch: boolean; /** * The label for the select. */ label: string; /** * The message displayed when external loading times out. */ loadingErrorLabel: string; /** * The message displayed whilst the options are being loaded externally. */ loadingLabel: string; /** * If `true`, multiple options can be selected. */ multiple: boolean; /** * The name of the control, which is submitted with the form data. */ name: string; /** * The placeholder value to be displayed. */ placeholder: string; /** * If `true`, the readonly state will be set. */ readonly: boolean; /** * If `true`, the select will require a value. */ required: boolean; /** * If `true`, a searchable variant of the select will be displayed which can be typed in to filter options. This functionality is only available on the single-select variant of the select component. */ searchable: boolean; /** * Whether the search string of the searchable select should match the start of or anywhere in the options. Only applies to built in filtering. */ searchMatchPosition: IcSearchMatchPositions; /** * If `true`, the icOptionSelect event will be fired on enter instead of ArrowUp and ArrowDown on the single select. */ selectOnEnter: boolean; /** * If `true`, a button which clears the select input when clicked will be displayed. The button will always appear on the searchable select. */ showClearButton: boolean; /** * The size of the select. */ size: IcSizes; /** * If using external filtering, set a timeout for when loading takes too long. */ timeout?: number; /** * Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component. */ theme: IcThemeMode; /** * The value of the `aria-live` attribute on the validation message. */ validationAriaLive: IcAriaLive; /** * The validation status - e.g. 'error' | 'warning' | 'success'. */ validationStatus: IcInformationStatusOrEmpty; /** * The text to display as the validation message. */ validationText: string; /** * If `true` and on a mobile or tablet device, the native select element will be used instead of the custom select component for better usability. */ useNativeSelectOnMobile: boolean; /** * If `true`, the loading state will be triggered when fetching options asynchronously. */ loading: boolean; loadingHandler(newValue: boolean): void; private clearTimer; /** * The possible selection options. */ options: IcSelectOption[]; flatOptions: IcSelectOptionFlat[]; optionsChangedHandler(): void; /** * The amount of time, in milliseconds, to wait to trigger the `icInput` event after each keystroke. */ debounce: number; currDebounce: number; debounceChangedHandler(newValue: number): void; /** * The value of the select, reflected by the value of the currently selected option. * For the searchable variant, the value is also reflected by the user input. * For the multi-select variant, the value must be an array of option values. */ value: string | string[] | null; initialValue: string | string[] | null; valueChangedHandler(newValue: string | string[] | null): void; open: boolean; openChangedHandler(): void; /** * Emitted when the select loses focus. */ icBlur: EventEmitter; /** * Emitted when the value changes. */ icChange: EventEmitter; /** * Emitted when the clear or clear all button is clicked. */ icClear: EventEmitter; /** * Emitted when the select options menu is closed. */ icClose: EventEmitter; /** * Emitted when the select gains focus. */ icFocus: EventEmitter; /** * Emitted when a keyboard input occurred. */ icInput: EventEmitter; /** * Emitted when the select options menu is opened. */ icOpen: EventEmitter; /** * Emitted when an option is selected. * Selecting an option will also trigger an `icChange/onIcChange` due to the value being updated. */ icOptionSelect: EventEmitter; /** * Emitted when `multiple` is `true` and an option is deselected. */ icOptionDeselect: EventEmitter; /** * Emitted when the 'retry loading' button is clicked for a searchable variant. */ icRetryLoad: EventEmitter; /** * Sets focus on the select component. */ setFocus(): Promise; componentDidRender(): void; disconnectedCallback(): void; componentDidLoad(): void; private getValidatedValue; componentWillLoad(): void; private getFilteredOptions; private getOptions; private getFlatOptions; private unflattenOptions; private getLabelFromValue; private getLabelString; private handleClick; private handleExpandIconMouseDown; private handleBlur; private handleTimeoutBlur; private handleFocus; private handleClear; private setTextColor; private handleNativeSelectChange; private handleFocusIndicatorDisplay; private handleKeyDown; private handleCharacterKeyDown; private handleNativeSelectKeyDown; private handleSelectChange; private handleSelectAllChange; private handleFormReset; private handleRetry; private handleSearchableSelectInput; private hostMutationCallback; private updateSelectButtonAriaLive; private updateSearchableSelectResultAriaLive; private updateAriaActiveDescendant; private handleMenuChange; private getDeduplicatedOptions; private renderNativeOption; render(): any; }