import type { TemplateResult, CSSResultArray } from 'lit'; import { FormElement } from '../base/form-element'; import { PharosIcon } from '../icon/pharos-icon'; import { PharosButton } from '../button/pharos-button'; import { PharosCheckbox } from '../checkbox/pharos-checkbox'; import { PharosTextInput } from '../text-input/pharos-text-input'; declare const PharosMultiselectDropdown_base: typeof FormElement; /** * Pharos multiselect-dropdown component. * * @tag pharos-multiselect-dropdown * * @slot label - Contains the label content. * @slot - Contains the available options for the multiselect-dropdown (the default slot). * @slot message - Contains message content to show below the input. * * @fires input - Fires when the value has changed via user input * @fires change - Fires when a selection has been made or cleared * * @cssprop {Color} --pharos-multiselect-dropdown-color-text-hover - Hovered multiselect-dropdown option font color. * @cssprop {Color} --pharos-multiselect-dropdown-color-text-selected - Selected multiselect-dropdown option font color. * @cssprop {Color} --pharos-multiselect-dropdown-color-icon-clear - Fill color for clear icon. * @cssprop {Color} --pharos-multiselect-dropdown-color-icon-dropdown - Fill color for dropdown icon. * @cssprop {Color} --pharos-multiselect-dropdown-color-icon-checkmark - Fill color for checkmark icon. * @cssprop {Color} --pharos-multiselect-dropdown-color-icon-focus - Fill color for focused icon. * @cssprop {Color} --pharos-multiselect-dropdown-size-height-list - Height of the dropdown list. * @cssprop {Color} --pharos-multiselect-dropdown-size-height-clear - Height of the clear button. */ export declare class PharosMultiselectDropdown extends PharosMultiselectDropdown_base { static elementDefinitions: { 'pharos-icon': typeof PharosIcon; 'pharos-button': typeof PharosButton; 'pharos-checkbox': typeof PharosCheckbox; 'pharos-text-input': typeof PharosTextInput; }; /** * Contains the currently selected options. * @attr selectedOptions */ selectedOptions: HTMLOptionElement[]; /** * How long the dropdown list should be displayed. * @attr displayCharacterCount */ displayCharacterCount: number; /** * Use loose matching when comparing search value to options. * @attr looseMatch */ looseMatch: boolean; /** * Add an option to select/deselect all options in the dropdown list. * @attr hideSelectAll * @default false */ hideSelectAll: boolean; /** * The list of options available in the multiselect-dropdown dropdown list * @readonly */ get options(): HTMLOptionElement[]; private _dropdown_button; private _searchInput; private _list; private _searchValue; private _open; private _pendingOptions; private _matchingOptions; private _isScrolling; private _scrollObserver; firstUpdated(): void; updated(changedProperties: Map): void; disconnectedCallback(): void; onChange(): void; /** * Sets up the IntersectionObserver to monitor the scroll state of the dropdown list. * It toggles the `_isScrolling` state based on whether the first item * in the list is fully visible within the scrollable container (`this._list`). */ private _setupScrollObserver; private _teardownScrollObserver; private _updateScrollObserver; private _setHighlightedOption; static get styles(): CSSResultArray; private _handleSearchInput; private _handleOptionClick; private _handleSelectAllClicked; private _handleSearchInputKeydown; private _handleComboboxNavigation; private _selectHighlightedOption; _handleFormdata(event: CustomEvent): void; _handleFormReset(): void; private _getButtonDisplayText; private _closeDropdown; private _toggleDropdown; private _handleDropdownButtonClick; private _handleDropdownKeydown; private _handleApplyClick; private _handleCancelClick; /** * Normalizes a string in the following order: * * 1 - Applies https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize * with the 'NFKD' parameters for compatibility * 2 - Removes all diacritic characters using a global regex * 3 - Lower case all characters * */ private _normalizeString; /** * Renders the checkbox icon used in the dropdown options from an svg * * The checkboxes displayed next to each option in this component are purely * decorative and serve as visual indicators of selection state. They are not * interactive elements themselves, so we can't use the pharos-checkbox * component. Instead, we render the checkbox icon using a SVG (like * pharos-checkbox does internally) to ensure it is accessible and * styled correctly. * */ private _renderCheckboxIcon; private _renderDropdownPanel; protected render(): TemplateResult; } export {}; //# sourceMappingURL=pharos-multiselect-dropdown.d.ts.map