import { InputMask, FactoryOpts } from 'imask'; import { PropertyValues, TemplateResult } from 'lit'; import { DDSFormElement } from "../../base/index.cjs"; import { DaikinInputGroup } from "../input-group/index.cjs"; export type { FactoryOpts, InputMask }; /** * The text masked field component is a UI element that allows users to input single-line text data with input masking support. * It functions similarly to the HTML `` tag, providing a simple and efficient way for users to enter and edit short pieces of texts with masking functionality using IMask.js. * Can be used within `daikin-input-group` component. * * Hierarchies: * - `daikin-text-masked-field` (can be used solely) * - `daikin-input-group` > `daikin-text-masked-field` * * @attr form - The form the component belongs to. * @attr name - The form name, submitted as a name/value pair when submitting the form. * @attr value - The initial form value, submitted as a name/value pair when submitting the form. * @prop {String} formAttr - The form the component belongs to. * @prop {String} name - The form name, submitted as a name/value pair when submitting the form. * @prop {String} value - The form value, submitted as a name/value pair when submitting the form. * * @fires change - A cloned event of a [change event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event) emitted from the inner `` element. * @fires input - A retargeted event of a [input event](https://developer.mozilla.org/en-US/docs/Web/API/Element/input_event). * * @slot left-icon - Specify the icon you want to use on the left. You can also use something other than `daikin-icon`. * * @slot right-icon - Specify the icon you want to use on the right. You can also use something other than `daikin-icon`. * * @example * * ```js * import "@daikin-oss/design-system-web-components/components/text-masked-field/index.js"; * ``` * * ```html * * * * * ``` */ export declare class DaikinTextMaskedField extends DDSFormElement { static readonly styles: import('lit').CSSResult; /** * Placeholder text. */ placeholder: string; /** * Whether the text masked field is readonly. */ readonly: boolean; /** * Whether the text masked field is disabled. * Controlled by `daikin-input-group` when used within `daikin-input-group`. */ disabled: boolean; /** * Whether the text masked field is required. * Controlled by `daikin-input-group` when used within `daikin-input-group`. */ required: boolean; /** * Whether or not to display error states. * Ignored if the `disabled` is `true`. * Controlled by `daikin-input-group` when used within `daikin-input-group`. */ error: boolean; /** * Minimum length of value. */ minlength: number | null; /** * Maximum length of value. */ maxlength: number | null; /** * The pattern of value. */ pattern: string | null; /** * Input mask configuration. When provided as a string, it will be used as `{ mask: string, lazy: false }`. * When provided as an object, it will be passed directly to IMask. * * Pattern symbols: * - `0` - any digit * - `a` - any letter * - `*` - any char * - `[]` - make input optional * - `{}` - include fixed part in unmasked value * - `` ` `` - prevent symbols shift back * - Other chars are treated as fixed * - Use `\\` to escape definition characters (e.g., `\\0`) * * Examples: * - `"00/00/0000"` - date format (MM/DD/YYYY) * - `"{#}000[aaa]/NIC-\`*[**]"` - complex pattern with optional parts * * For more details, see: https://imask.js.org/guide.html#masked-pattern */ mask: string | FactoryOpts | null; /** * Value of `autocomplete` attribute of the internal ``. */ autocomplete: HTMLInputElement["autocomplete"]; private _unmaskedValue; /** * The label text used as the value of aria-label. * Set automatically by `reflectInputGroup` method. */ private _label; private _hasLeftSlot; private _hasRightSlot; private _inputRef; private _maskInstance; private _initializeMask; private _destroyMask; /** * The unmasked value of the input. */ get unmaskedValue(): string; set unmaskedValue(value: string); connectedCallback(): void; disconnectedCallback(): void; private _handleChange; private _handleSlotChange; private _handleInput; /** * Focuses on the inner input. * @param options focus options */ focus(options?: FocusOptions): void; private _createIcon; render(): TemplateResult<1>; updated(changedProperties: PropertyValues): void; /** * This method is used by `daikin-input-group` to reflect it's attributes to this component. * @private */ reflectInputGroup(inputGroup: DaikinInputGroup): void; } declare global { interface HTMLElementTagNameMap { "daikin-text-masked-field": DaikinTextMaskedField; } }