import type { CSSResultGroup } from 'lit'; import DSAButton from '../button/button'; import DSAIcon from '../icon/icon'; import DSAInput from '../input/input'; import DSAOption from '../option/option'; import DSAVisuallyHidden from '../visually-hidden/visually-hidden'; import { FilterBase } from '../../internal/components/filter-base/filter-base'; /** * @summary Filter selects allow you to choose filters from a menu of predefined options. * @documentation https://dsa.service-public-autonomie.fr/latest/librairie-webcomponents/filtres/filtre-de-selection-filter-select/web-rsaNX1Aj * * @dependency dsa-popup * @dependency dsa-filter-button * @dependency dsa-button * @dependency dsa-input * @dependency dsa-icon * @dependency dsa-visually-hidden * * @slot - The listbox options. Must be `` elements. * * @event dsa-change - Emitted when the filter value changes. * @event dsa-input - Emitted when the filter search receives input. * @event dsa-focus - Emitted when the filter gains focus. * @event dsa-blur - Emitted when the filter loses focus. * @event dsa-show - Emitted when the filter panel opens. * @event dsa-after-show - Emitted after the filter panel opens and all animations are complete. * @event dsa-hide - Emitted when the filter panel closes. * @event dsa-after-hide - Emitted after the filter panel closes and all animations are complete. */ export default class DSAFilterSelect extends FilterBase { static styles: CSSResultGroup; static dependencies: { 'dsa-button': typeof DSAButton; 'dsa-icon': typeof DSAIcon; 'dsa-input': typeof DSAInput; 'dsa-visually-hidden': typeof DSAVisuallyHidden; 'dsa-popup': typeof import("../popup/popup").default; 'dsa-filter-button': typeof import("../filter-button/filter-button").default; }; deselectAllButton: DSAButton; searchInput: DSAInput; listbox: HTMLSlotElement; seeAllButton: HTMLButtonElement; displayLabel: string; allOptions: DSAOption[]; currentOption: DSAOption; selectedOptions: DSAOption[]; displayedOptions: DSAOption[]; searchValue: string; nbOptions: number; seeAll: boolean; private debounceTimerId; private optionsByValue; private normalizedLabelsByValue; /** * The current value of the filter, representing a list of the selected options (or single option if “multiple” * is disabled). It can be used as a way to define which options are selected by default. Selected options are * designated by their value, and separated by a space. */ value: string | string[]; /** Allows more than one option to be selected. */ multiple: boolean; /** * The maximum number of options that will be displayed by default. The user will then have to press "See All" to * display the complete list. Set to 0 to remove the limit. */ maxVisibleListLength: number; /** Adds a search input to filter the options. */ searchable: boolean; /** * Delay between when a user types into the search input. It affects the `dsa-input` event. * @default 300 */ debounceTimeout: number; /** * Indicates whether the options are in the masculine or feminine form */ optionGender: 'feminine' | 'masculine'; /** * Indicates if the component is used as a columns filter */ columnsFilter: boolean; connectedCallback(): void; disconnectedCallback(): void; protected handleKeyDown(event: KeyboardEvent): void; private handleSearchInput; private handleOptionFocus; private handleOptionClick; private filterOptions; private handleMultipleHeaderButtonClick; private handleSearchClear; private handleSeeAllClick; private handleDefaultSlotChange; private getAllOptions; private getFirstOption; private setCurrentOption; private setSelectedOptions; private toggleOptionSelection; private selectionChanged; private getDisplayedOptionsList; handleSearchValueChange(): void; handleValueChange(): void; handleOpenChange(): Promise; handleSeeAllChange(): void; handleMultipleChange(): void; /** Hides the listbox. */ hide(): Promise; protected renderTrigger(): import("lit").TemplateResult<1>; private renderDeSelectAll; protected renderPanelContent(): import("lit").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'dsa-filter-select': DSAFilterSelect; } }