import { EventEmitter } from '../../stencil-public-runtime'; /** * @slot - Unnamed slot. For dropdown option elements. */ export declare class TdsDropdown { host: HTMLElement; /** Name for the Dropdowns input element. */ name?: string; /** Sets the Dropdown in a disabled state */ disabled: boolean; /** Helper text for the Dropdown. */ helper?: string; /** Label text for the Dropdown. */ label?: string; /** Label text position */ labelPosition?: 'inside' | 'outside'; /** Mode variant of the component, based on current mode. */ modeVariant: 'primary' | 'secondary' | null; /** The direction the Dropdown should open, auto if not specified. */ openDirection: 'up' | 'down' | 'auto'; /** Placeholder text for the Dropdown. */ placeholder?: string; /** The size of the Dropdown. */ size: 'xs' | 'sm' | 'md' | 'lg'; animation: 'none' | 'slide'; /** Sets the Dropdown in an error state */ error: boolean; /** Enables multiselect in the Dropdown. */ multiselect: boolean; /** Enables filtration in the Dropdown. */ filter: boolean; /** Normalizes input text for fuzzier search */ normalizeText: boolean; /** Text that is displayed if filter is used and there are no options that matches the search. * Setting it to an empty string disables message from showing up. */ noResultText?: string; /** Default value selected in the Dropdown. */ defaultValue?: string | number; /** Value of the dropdown. For multiselect, provide array of strings/numbers. For single select, provide a string/number. */ value: string | number | (string | number)[] | null; /** Defines aria-label attribute for input */ tdsAriaLabel?: string; /** Enables Select All/Clear All actions in the Dropdown list. */ showSelectionActions: boolean; /** Select All text to allow for language support. Defaults to english. */ selectAllText: string; /** Select Filtered text to allow for language support. Defaults to english. */ selectFilteredText: string; /** Clear All text to allow for language support. Defaults to english. */ clearAllText: string; open: boolean; internalValue: string; filterResult: number | null; filterFocus: boolean; internalDefaultValue: string; private selectedOptions; filterQuery: string; direction: 'up' | 'down'; height: number; private dropdownList; private inputElement; private formElement?; private hasFocus; private readonly pendingInvalidValues; private readonly uuid; handleValueChange(newValue: string | number | (string | number)[]): void; private normalizeValue; private updateDropdownStateInternal; private updateDropdownStateFromUser; private updateDropdownState; private validateValues; private updateOptionElements; private updateDisplayValue; private emitChange; /** Method for setting the selected value of the Dropdown. * * Single selection example: * * * dropdown.setValue('option-1', 'Option 1'); * * * Multiselect example: * * * dropdown.setValue(['option-1', 'option-2']); * */ setValue(value: string | number | string[] | number[], label?: string): Promise<{ value: string | number | undefined; label: string | undefined; }[]>; reset(): Promise; removeValue(oldValue: string): Promise; /** Method that forces focus on the input element. */ focusElement(): Promise; /** Method for closing the Dropdown. */ close(): Promise; /** Method to force update the dropdown display value. * Use this method when you programmatically change the text content of dropdown options * to ensure the selected value display updates immediately. */ updateDisplay(): Promise; /** Change event for the Dropdown. */ tdsChange: EventEmitter<{ name: string | undefined; value: string | null; }>; /** Focus event for the Dropdown. */ tdsFocus: EventEmitter; /** Blur event for the Dropdown. */ tdsBlur: EventEmitter; /** Input event for the Dropdown. */ tdsInput: EventEmitter; /** Clear event for the Dropdown. */ tdsClear: EventEmitter<{ clearedValue: string; }>; onAnyClick(event: MouseEvent): void; onFocusIn(event: FocusEvent): void; onFocusOut(event: FocusEvent): void; onKeyDown(event: KeyboardEvent): Promise; private readonly handleArrowDown; private readonly handleArrowUp; private readonly handleEscape; /** If the Dropdown gets closed, this sets the value of the dropdown to the current selection labels or null if no selection is made. */ handleOpenState(): void; handleDefaultValueChange(newValue: string | number): void; componentWillLoad(): void; /** Method to handle slot changes */ private handleSlotChange; /** Warn for pending values that are still not matched, then clear pending */ private warnAndClearPending; /** Track unmatched selected values as pending for deferred warning */ private updatePendingInvalidValues; /** Method to check if we should normalize text */ private normalizeString; private readonly setDefaultOption; private readonly getChildren; private readonly getSelectedChildren; /** Function to return the number of existing options in the list. */ private getNumberOfAvailableOptions; /** Function to check whether the filtered options are all selected. */ private checkSelectedAndFilteredOptions; private readonly getSelectedChildrenLabels; private readonly getValue; private readonly setValueAttribute; /** * Returns the nearest vertically scrollable ancestor of the given element. * Used to determine the available space for the dropdown within its scroll * container. If no scrollable ancestor is found, the viewport is used instead. * * Note: This identifies the nearest scrollable ancestor, not necessarily the * clipping ancestor in more complex layouts. */ private getScrollParent; /** This auxiliary function is meant to calculate both the open direction when it is set as auto * as well as the ideal height, both for the dropdown list. It will prioritize opening down * whenever possible. Only triggers a re-render if the State variables direction and height have * changed. */ private readonly getListOpenDirectionAndHeight; private readonly handleToggleOpen; private readonly focusInputElement; private readonly handleFilter; private readonly focusInput; private readonly handleFilterReset; /** Multiselect + filter: two-step clear */ private readonly handleMultiselectFilterReset; /** Single select + filter: clear everything immediately */ private readonly handleSingleFilterReset; private readonly resetFilterVisibility; private readonly handleMultiselectClear; private readonly handleFocus; private readonly handleBlur; private readonly handleInputClick; /** * @internal */ appendValue(value: string): Promise; private readonly resetInput; private handleWindowChange; private handleSelectAll; private handleSelectFiltered; private handleClearAll; componentDidRender(): void; connectedCallback(): void; disconnectedCallback(): void; private updateDropdownListInertState; render(): any; }