import type { CSSResultGroup } from 'lit'; import DSAButton from '../button/button'; import DSAIconButton from '../icon-button/icon-button'; import DSAIcon from '../icon/icon'; import DSASearch from '../search/search'; import { ShoelaceElement } from '../../internal/shoelace-element'; /** * @summary The header-search adds a collapsible search interface inside the header. * @documentation https://dsa.service-public-autonomie.fr/latest/librairie-webcomponents/en-tete-header/recherche-d-en-tete-header-search/web-clHODcyh * * @dependency dsa-icon * @dependency dsa-icon-button * @dependency dsa-button * @dependency dsa-search * * @event dsa-expand - Emitted when the expand button is activated. * @event dsa-change - Emitted when an alteration to the search input control's value is committed by the user. * @event dsa-input - Emitted when the search input control receives input. * @event dsa-clear - Emitted when the clear button is activated. * @event dsa-focus - Emitted when the search input control gains focus. * @event dsa-blur - Emitted when the search input control loses focus. * @event dsa-submit - Emitted when the submit button is activated, or when the user presses 'Enter' on the input. * @event dsa-collapse - Emitted when the cancel button is activated. */ export default class DSAHeaderSearch extends ShoelaceElement { static styles: CSSResultGroup; static dependencies: { 'dsa-icon': typeof DSAIcon; 'dsa-icon-button': typeof DSAIconButton; 'dsa-button': typeof DSAButton; 'dsa-search': typeof DSASearch; }; private readonly localize; search: DSASearch; expandButton: HTMLButtonElement; cancelButton: HTMLButtonElement; /** The current value of the input */ value: string; /** Expands the search and displays the input */ expanded: boolean; /** Renders the search in an always opened state */ alwaysOpen: boolean; /** Controls whether the header search is rendered in its mobile version or in its desktop version */ mobile: boolean; /** Provides a custom placeholder for the search input */ placeholder: string; private handleExpandClick; private handleChange; private handleInput; private handleCancelClick; get input(): HTMLInputElement; get submitButton(): HTMLButtonElement; get clearButton(): DSAIconButton; render(): import("lit").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'dsa-header-search': DSAHeaderSearch; } }