import type { CSSResultGroup } from 'lit'; import DSAIconButton from '../icon-button/icon-button'; import DSAPopup from '../popup/popup'; import DSAVisuallyHidden from '../visually-hidden/visually-hidden'; import { InputBase } from '../../internal/components/input-base/input-base'; import type { ShoelaceFormControl } from '../../internal/shoelace-element'; /** * @summary Custom input for time, with a custom dropdown component for selecting times and restriction capabilities. * * @dependency dsa-icon-button * @dependency dsa-popup * @dependency dsa-visually-hidden * @dependency dsa-error-text * @dependency dsa-success-text * * @slot label - The input's label. Alternatively, you can use the `label` attribute. * @slot prefix - Used to prepend a presentational icon or similar element to the input. * @slot suffix - Used to postpend a presentational icon or similar element to the input. * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute. * @slot tooltip - The tooltip slot allows additional information to be passed along the label. * * @event dsa-blur - Emitted when the control loses focus. * @event dsa-change - Emitted when an alteration to the control's value is committed by the user. * @event dsa-clear - Emitted when the clear button is activated. * @event dsa-focus - Emitted when the control gains focus. * @event dsa-input - Emitted when the control receives input. * @event dsa-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied. * @event dsa-show - Emitted when the picker opens. * @event dsa-after-show - Emitted after the picker opens and all animations are complete. * @event dsa-hide - Emitted when the picker closes. * @event dsa-after-hide - Emitted after the picker closes and all animations are complete. */ export default class DSAInputTime extends InputBase implements ShoelaceFormControl { static styles: CSSResultGroup; static dependencies: { 'dsa-icon-button': typeof DSAIconButton; 'dsa-popup': typeof DSAPopup; 'dsa-visually-hidden': typeof DSAVisuallyHidden; 'dsa-success-text': typeof import("../success-text/success-text").default; 'dsa-error-text': typeof import("../error-text/error-text").default; }; private readonly localize; timePickerButton: DSAIconButton; popup: DSAPopup; private isTimePickerOpen; private timeUnitArraysCache?; private timeUnitArraysCacheKey; /** The input's minimum value. */ min: string; /** The input's maximum value. */ max: string; /** * Allows the implementation of steps between each possible value, in seconds. Refer to * [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/step) for more information. */ step: number; /** * Enable this option to prevent the listbox from being clipped when the component is placed inside a container with * `overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios. */ hoist: boolean; connectedCallback(): void; private addOpenListeners; private removeOpenListeners; private handleDocumentFocusIn; private handleDocumentMouseDown; private handleDefaultKeyDown; protected handleKeyDown(event: KeyboardEvent): void; protected getDescriptionIds(): string; handleValueChange(): Promise; handleOpenChange(): Promise; /** Shows or hides the time picker */ private toggleTimePicker; /** Displays the time picker for an input element. */ showTimePicker(): Promise; /** Hides the time picker */ hideTimePicker(): Promise; private scrollSelectedTimeUnitsIntoView; private selectTimeUnit; protected handlePanelKeydown(event: KeyboardEvent): void; private handlePanelClick; private generateTimeUnitArrays; private generateTimeUnitList; renderInput(): import("lit").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'dsa-input-time': DSAInputTime; } }