import type { CSSResultGroup } from 'lit'; import { ShoelaceElement } from '../../shoelace-element'; import type { ShoelaceFormControl } from '../../shoelace-element'; /** * @summary (Internal) Date field allows the user to input a date. * * * @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-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. */ export default class DSAInternalDateField extends ShoelaceElement implements ShoelaceFormControl { static styles: CSSResultGroup; private readonly formControlController; private readonly localize; hiddenInput: HTMLInputElement; dayInput: HTMLInputElement; monthInput: HTMLInputElement; yearInput: HTMLInputElement; private focusedInput; private currentLocale; private selectedDay; private selectedMonth; private selectedYear; private dateOrder; private delimiter; private lastPressedKey; private internalValueChange; private previousTentativeDate; private previousSpinbuttonValue; /** The parent element accessible name */ parentName: string; /** A description for accessibility */ description: string; /** The name of the input, submitted as a name/value pair with form data. */ name: string; /** The current value of the input, submitted as a name/value pair with form data. */ value: string; /** The default value of the form control. Primarily used for resetting the form control. */ defaultValue: string; /** Disables the input. */ disabled: boolean; lang: string; /** Indicates whether the input should be in error state */ error: boolean; /** Makes the input readonly. */ readonly: boolean; /** * By default, form controls are associated with the nearest containing `