import { JSXInterface } from '../jsx'; import { TemplateMap } from '@refinitiv-ui/core/directives/template-map.js'; import '../icon/index.js'; import { TextField } from '../text-field/index.js'; /** * A form control element for email. * * @fires value-changed - Fired when the user commits a value change. The event is not triggered if `value` property is changed programmatically. * @fires error-changed - Fired when the user inputs an invalid value. The event is not triggered if `error` property is changed programmatically. * @fires icon-click - Fired when the user taps on icon added into control's slot. * * @attr {boolean} disabled - Set disabled state * @prop {boolean} [disabled=false] - Set disabled state * * @attr {boolean} error - Set error state * @prop {boolean} [error=false] - Set error state * * @attr {string} icon - Specify icon to display in input. Value can be icon name * @prop {string | null} [icon=null] - Specify icon to display in input. Value can be icon name * * @attr {boolean} icon-has-action - Specify when icon need to be clickable * @prop {boolean} [iconHasAction=false] - Specify when icon need to be clickable * * @attr {string} placeholder - Set placeholder text * @prop {string} [placeholder=""] - Set placeholder text * * @attr {boolean} readonly - Set readonly state * @prop {boolean} [readonly=false] - Set readonly state * * @attr {boolean} transparent - Disables all other states and border/background styles. * @prop {boolean} [transparent=false] - Disables all other states and border/background styles. * * @attr {boolean} warning - Set warning state * @prop {boolean} [warning=false] - Set warning state * * @attr {string} value - Input's value * @prop {string} [value=""] - Input's value * * @attr {boolean} clears - Show clears button * @prop {boolean} [clears=false] - Show clears button */ export declare class EmailField extends TextField { /** * Set to multiple mode, allows multiple emails in a single input */ multiple: boolean; /** * Set regular expression for input validation */ pattern: string | null; /** * Set character max limit */ maxLength: number | null; /** * Set character min limit */ minLength: number | null; /** * Returns `true` if the element input is valid; otherwise, returns `false`. * @returns element input validity */ checkValidity(): boolean; /** * Validate the element input and mark it as error if its input is invalid. * @returns `true` if the element input is valid; otherwise, returns `false`. */ reportValidity(): boolean; /** * Returns whether input of the element should be validated or not based on the existence of validation constraints * @returns true if there is at least one validation constraint */ protected shouldValidate(): boolean; /** * Decorate `` element with common properties extended from text-field: * type="email" - always `email` * multiple - defined if supports multiple emails * @returns template map */ protected get decorateInputMap(): TemplateMap; } declare global { interface HTMLElementTagNameMap { 'ef-email-field': EmailField; } } declare global { interface HTMLElementTagNameMap { 'ef-email-field': EmailField; } namespace JSX { interface IntrinsicElements { 'ef-email-field': Partial | JSXInterface.HTMLAttributes; } } } export {};