import { Placement } from '@floating-ui/dom'; import { EventEmitter } from '../../stencil-public-runtime'; import { ErrorMap } from '../cat-form-hint/cat-form-hint'; import { FormatDateOptions } from 'cleave-zen'; /** * A date input component to select a date from a calendar in a dropdown. */ export declare class CatDate { private readonly language; private readonly locale; private input?; private dateInline?; private inputFocused; hostElement: HTMLElement; dateMaskOptions?: FormatDateOptions; /** * Whether the label need a marker to shown if the input is required or optional. */ requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!'; /** * Whether the label is on top or left. */ horizontal?: boolean; /** * If the horizontal value is not provided, this fallback value is used. Can be set by form-group. * @internal */ fallbackHorizontal?: boolean; /** * Hint for form autofill feature. */ autoComplete: string; /** * Whether the input should show a clear button. */ clearable: boolean; /** * Whether the input is disabled. */ disabled: boolean; /** * Optional hint text(s) to be displayed with the input. */ hint?: string | string[]; /** * The name of an icon to be displayed in the input. */ icon?: string; /** * Display the icon on the right. */ iconRight: boolean; /** * A unique identifier for the input. */ identifier?: string; /** * The label for the input. */ label: string; /** * Visually hide the label, but still show it to assistive technologies like screen readers. */ labelHidden: boolean; /** * A maximum value for the date, given in local ISO 8601 date format YYYY-MM-DD. */ max?: string; /** * A minimum value for the date, given in local ISO 8601 date format YYYY-MM-DD. */ min?: string; /** * The name of the form control. Submitted with the form as part of a name/value pair. */ name?: string; /** * The placeholder text to display within the input. */ placeholder?: string; /** * A textual prefix to be displayed in the input. */ textPrefix?: string; /** * A textual suffix to be displayed in the input. */ textSuffix?: string; /** * The value is not editable. */ readonly: boolean; /** * A value is required or must be check for the form to be submittable. */ required: boolean; /** * The value of the control, given in local ISO 8601 date format YYYY-MM-DD. */ value?: string; /** * The validation errors for this input. Will render a hint under the input * with the translated error message(s) `error.${key}`. If an object is * passed, the keys will be used as error keys and the values translation * parameters. * If the value is `true`, the input will be marked as invalid without any * hints under the input. */ errors?: boolean | string[] | ErrorMap; /** * Fine-grained control over when the errors are shown. Can be `false` to * never show errors, `true` to show errors on blur, or a number to show * errors change with the given delay in milliseconds or immediately on blur. */ errorUpdate: boolean | number; /** * Attributes that will be added to the native HTML input element. */ nativeAttributes?: { [key: string]: string; }; /** * A unique identifier for the underlying native element that is used for * testing purposes. The attribute is added as `data-test` attribute and acts * as a shorthand for `nativeAttributes={ 'data-test': 'test-Id' }`. */ testId?: string; /** * The placement of the dropdown. */ placement: Placement; onMinChanged(min?: string, oldMin?: string): void; onMaxChanged(max?: string, oldMax?: string): void; /** * Emitted when the value is changed. */ catChange: EventEmitter; /** * Emitted when the input received focus. */ catFocus: EventEmitter; /** * Emitted when the input loses focus. */ catBlur: EventEmitter; private get inputValue(); componentWillLoad(): void; /** * Programmatically move focus to the input. Use this method instead of * `input.focus()`. * * @param options An optional object providing options to control aspects of * the focusing process. */ doFocus(options?: FocusOptions): Promise; /** * Programmatically remove focus from the input. Use this method instead of * `input.blur()`. */ doBlur(): Promise; /** * Clear the input. */ clear(): Promise; render(): any; private getTriggerA11yLabel; private onInputBlur; private onDateChange; private parse; private reclamp; }