import { EventEmitter } from '../../stencil-public-runtime'; /** * A field date component that combines an input with a calendar popover. * * @slot default - Child content of the component. * @slot leading-input - Content to be placed before the input text, within the input container. * @slot before-input - Content to be placed before the input text, outside the input container. * @slot after-input - Content to be placed after the input text, outside the input container. * @slot label - Content to be placed as the label, will override the label prop. * @slot description - Content to be placed as the description, will override the description prop. * @slot error-description - Content to be placed as the error description, will override the errorDescription prop. */ export declare class NvFielddate { el: HTMLNvFielddateElement; private inputElement; private popoverElement; private popoverId; /****************************************************************************/ /** * Sets the ID for the input element and the for attribute of the associated * label. If no ID is provided, a random one will be automatically generated. */ readonly inputId: string; /** * Text displayed as label. A slot label can override this prop. */ readonly label: string; /** * Description displayed below the input. A slot description can override this prop. */ readonly description: string; /** * Placeholder for the input field. */ readonly placeholder: string; /** * Name attribute for the input. */ readonly name: string; /** * Disables the input field. */ readonly disabled: boolean; /** * Sets the input field as read-only. */ readonly readonly: boolean; /** * Marks the input field as required. * @note This uses the native HTML `required` attribute, which triggers browser validation. */ readonly required: boolean; /** * Marks the input field as required for accessibility purposes without triggering * native HTML validation. Use this when implementing custom validation logic. * @note When set, this uses `aria-required` instead of the native `required` attribute. * This allows developers to implement custom validation while maintaining accessibility. * @note If this prop is not explicitly set, the component will check for the HTML attribute * 'aria-required' directly to determine if it should be applied. */ readonly ariaRequiredAttr: boolean; /** * Indicates an error state. */ readonly error: boolean; /** * Error description. A slot error-description can override this prop. */ readonly errorDescription?: string; /** * Indicates a success state. */ readonly success: boolean; /** * Autofocus the input when the component is mounted. */ readonly autofocus: boolean; /** * The initial value of the input (date in string format). * @bind value */ value: string; /** * The current value of the input date in string format. */ singleValue: string; /** * Controls the opening of the popover. */ open: boolean; /** * First day of the week 0 = Sunday, 1 = Monday, etc. * @default 1 */ readonly firstDayOfWeek: number; /** * Number of calendars to display * @default 1 */ readonly numberOfCalendars: number; /** * Minimum date for selection ISO string format, ex: 2025-01-01 */ readonly min?: string; /** * Maximum date for selection ISO string format, ex: 2025-12-31 */ readonly max?: string; /** Locale for date formatting * @default 'en-BE' */ readonly locale: string; /** Date format ex: YYYY-MM-DD, DD-MM-YYYY, etc. * @default 'YYYY-MM-DD' * @note If the date format is in UTC mode, the date will be displayed in UTC time. * @note If the date format is not in UTC mode, the date will be displayed in the local time. */ readonly dateFormat: string; /** * Footer placement * @default 'bottom' */ readonly shortcutsPlacement: 'bottom' | 'left' | 'right'; /** * Show action buttons * @default false */ readonly showActions: boolean; /** * Custom actions to display in the footer */ readonly shortcuts: HTMLNvCalendarElement['shortcuts']; /** * Show week numbers * @default true */ readonly showWeekNumbers: boolean; /** * Disabled dates ISO string array */ readonly disabledDates: Array; /** * Allows the field to stretch and fill the entire width of its container. */ readonly fluid: boolean; /****************************************************************************/ /** * Converts the nv-calendar date format to the format expected by Inputmask. * @param {string} format - The date format. * @returns {string} Format adapted for Inputmask. */ private convertToInputmaskFormat; /** * Closes the popover when a click is detected outside the component. * @param {MouseEvent} event - The click event. */ private handleClickOutside; /** * Focuses the input when the input container is clicked. * @param {MouseEvent} event - The click event. */ private handleInputContainerClick; /** * Handles the input event on the input element. * Updates internal state to keep UI in sync - events are only emitted on completion or clear. * @param {Event} event - The input event. */ private handleInput; /** * Handles focus events on the input element. * @param {FocusEvent} event - The focus event. */ private handleFocus; /** * Prevents the valueChanged event from the calendar from propagating up. * @param {CustomEvent} event - The valueChanged event from nv-calendar. */ private handleCalendarValueChanged; /** * Sets the reference to the popover element. * @param {HTMLNvPopoverElement} el - The popover element. */ private setPopoverRef; /** * Sets the reference to the input element. * @param {HTMLInputElement} el - The input element. */ private setInputRef; /** * Toggles the opening/closing of the popover. * @param {MouseEvent} event - The click event. */ private toggleCalendar; /** * Clears the current selection and resets the field to its initial state. * This method can be called programmatically to reset the field. */ clear(): Promise; private updateMask; /** * Handles the single date selection event from nv-calendar. * Updates the input value and closes the popover. * @param {CustomEvent} event - The event from nv-calendar. */ private handleSingleDateChange; /****************************************************************************/ componentWillLoad(): void; componentDidLoad(): void; componentDidRender(): void; disconnectedCallback(): void; /****************************************************************************/ /** * Emitted when the value changes (unified value binding). * @bind value */ valueChanged: EventEmitter; /****************************************************************************/ handleValueChange(newValue: string): void; handleOpenChange(newOpen: boolean): void; /****************************************************************************/ handleClosePopover(event: CustomEvent): void; handleDocumentClick(event: MouseEvent): void; handleKeyDown(event: KeyboardEvent): void; /****************************************************************************/ render(): any; }