import { EventEmitter } from '../../stencil-public-runtime'; import { PickerValidityStateTracker } from '../input/input.util'; import { IxInputFieldComponent, ValidationResults } from '../utils/input'; import type { DateInputValidityState } from './date-input.types'; /** * @form-ready * * @slot start - Element will be displayed at the start of the input * @slot end - Element will be displayed at the end of the input */ export declare class DateInput implements IxInputFieldComponent { hostElement: HTMLIxDateInputElement; formInternals: ElementInternals; /** * Name of the input element. */ name?: string; /** * Placeholder of the input element. */ placeholder?: string; /** * Value of the input element. */ value?: string; watchValuePropHandler(newValue: string): void; /** * The earliest date that can be selected by the date input/picker. * If not set there will be no restriction. */ minDate: string; /** * The latest date that can be selected by the date input/picker. * If not set there will be no restriction. */ maxDate: string; /** * Locale identifier (e.g. 'en' or 'de'). * The locale is used to translate the labels for weekdays and months. * It also determines the default order of weekdays based on the locale's conventions. * When the locale changes, the weekday labels are rotated according to the `weekStartIndex`. * It does not affect the values returned by methods and events. */ locale?: string; /** * Date format string. * See {@link https://moment.github.io/luxon/#/formatting?id=table-of-tokens} for all available tokens. */ format: string; /** * Required attribute. */ required?: boolean; /** * Helper text below the input field. */ helperText?: string; /** * Label of the input field. */ label?: string; /** * ARIA label for the calendar icon button. * Will be set as aria-label on the nested HTML button element. * * @since 3.2.0 */ ariaLabelCalendarButton?: string; /** * Error text below the input field. */ invalidText?: string; /** * Readonly attribute. */ readonly: boolean; /** * Disabled attribute. */ disabled: boolean; /** * Info text below the input field. */ infoText?: string; /** * Warning text below the input field. */ warningText?: string; /** * Valid text below the input field. */ validText?: string; /** * Show text as tooltip. */ showTextAsTooltip?: boolean; /** * I18n string for the error message when the date is not parsable. */ i18nErrorDateUnparsable: string; /** * Shows week numbers displayed on the left side of the date picker. * * @since 3.0.0 */ showWeekNumbers: boolean; /** * The index of which day to start the week on, based on the Locale#weekdays array. * E.g. if the locale is en-us, weekStartIndex = 1 results in starting the week on Monday. */ weekStartIndex: number; /** * ARIA label for the previous month icon button. * Will be set as aria-label on the nested HTML button element. */ ariaLabelPreviousMonthButton?: string; /** * ARIA label for the next month icon button. * Will be set as aria-label on the nested HTML button element. */ ariaLabelNextMonthButton?: string; /** * If false, pressing Enter will submit the form (if inside a form). * Set to true to suppress submit on Enter. */ suppressSubmitOnEnter: boolean; /** * Text alignment within the date input. 'start' aligns the text to the start of the input, 'end' aligns the text to the end of the input. */ textAlignment: 'start' | 'end'; /** * Enable Popover API rendering for dropdown. * * @default false * @since 4.3.0 */ enableTopLayer: boolean; /** * Value change event. Emitted when the input value changes. */ valueChange: EventEmitter; /** * Validation state change event. Emitted when the validation state changes. */ validityStateChange: EventEmitter; /** @internal */ ixFocus: EventEmitter; /** @internal */ ixBlur: EventEmitter; /** * Change event. Emitted when the date input loses focus and the value has changed. * * @since 4.4.0 */ ixChange: EventEmitter; show: boolean; from?: string | null; isInputInvalid: boolean; isInvalid: boolean; isValid: boolean; isInfo: boolean; isWarning: boolean; focus: boolean; private readonly slotStartRef; private readonly slotEndRef; private readonly datepickerRef; private readonly inputElementRef; private readonly dropdownElementRef; private classObserver?; /** @internal */ initialValue?: string; /** @internal */ invalidReason?: string; /** @internal */ touched: boolean; /** @internal */ validityTracker: PickerValidityStateTracker; private disposableChangesAndVisibilityObservers?; updateFormInternalValue(value: string | undefined): void; connectedCallback(): void; componentWillLoad(): void; private updatePaddings; disconnectedCallback(): void; watchValue(): void; /** @internal */ hasValidValue(): Promise; /** @internal */ getAssociatedFormElement(): Promise; onInput(value: string | undefined): Promise; onCalenderClick(event: Event): void; openDropdown(): Promise; closeDropdown(): Promise; private checkClassList; private handleInputKeyDown; private renderInput; hookValidationLifecycle({ isInfo, isInvalid, isInvalidByRequired, isValid, isWarning, }: ValidationResults): void; private emitValidityStateChangeIfChanged; /** @internal */ getValidityState(): Promise; /** * Get the native input element */ getNativeInputElement(): Promise; /** * Focuses the input field */ focusInput(): Promise; /** * Returns whether the text field has been touched. * @internal */ isTouched(): Promise; render(): any; }