/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { FormComponentProps } from '@progress/kendo-vue-common'; /** * The arguments for a MaskedTextBox event. */ export interface MaskedTextBoxEvent { /** * A native DOM event. */ event: Event; /** * An event target. */ target: any; } /** * The arguments for the `change` event of the MaskedTextBox. */ export interface MaskedTextBoxChangeEvent extends MaskedTextBoxEvent { /** * Specifies the start of the selection which will be set to the MaskedTextBox when it is updated. */ selectionStart: number; /** * Specifies the end of the selection which will be set to the MaskedTextBox when it is updated. */ selectionEnd: number; /** * The current value of the component. */ value: any; } /** * Represents the props of the [Kendo UI for Vue MaskedTextBox component]({% slug overview_maskedtextbox %}). */ export interface MaskedTextBoxProps extends FormComponentProps { /** * Specifies the value of the MaskedTextBox. */ value?: string; /** * Specifies the initial value. Leaves the subsequent updates uncontrolled. */ defaultValue?: string; /** * Specifies the input placeholder. */ placeholder?: string; /** * Sets the title of the `input` element of the MaskedTextBox. */ title?: string; /** * Represents the `dir` HTML attribute. */ dir?: string; /** * Configures the `size` of the MaskedTextBox. * * The available options are: * - small * - medium * - large * * @default undefined */ size?: 'small' | 'medium' | 'large'; /** * Configures the `roundness` of the MaskedTextBox. * * The available options are: * - none * - small * - medium * - large * - full * * @default undefined */ rounded?: 'none' | 'small' | 'medium' | 'large' | 'full'; /** * Configures the `fillMode` of the MaskedTextBox. * * The available options are: * - solid * - outline * - flat * * @default undefined */ fillMode?: 'solid' | 'flat' | 'outline'; /** * Sets the `tabIndex` property of the MaskedTextBox. */ tabIndex?: number; /** * Specifies the `accessKey` of the MaskedTextBox. */ accessKey?: string; /** * Specifies the width of the MaskedTextBox. */ width?: number | string; /** * Determines whether the MaskedTextBox is disabled. */ disabled?: boolean; /** * Renders a floating label for the MaskedTextBox. */ label?: string; /** * Sets the `id` of the `input` DOM element. */ id?: string; /** * Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute). * For example these elements could contain error or hint message. */ ariaDescribedBy?: string; /** * Identifies the element(s) which will label the component. */ ariaLabelledBy?: string; /** * Determines whether the MaskedTextBox is in its read-only state. */ readonly?: boolean; /** * Represents a prompt character for the masked value. Defaults to `_`. */ prompt?: string; /** * Indicates a character which represents an empty position in the raw value. Defaults to ` `. */ promptPlaceholder?: string; /** * Indicates whether to include literals in the raw value. Defaults to `false`. */ includeLiterals?: boolean; /** * Determines whether the built-in mask validator is enforced when a form is validated. Defaults to `true`. */ maskValidation?: boolean; /** * Represents the current mask. If no mask is set, the component behaves as a standard `type="text"` input. */ mask?: string; /** * Represents the RegExp-based mask validation array. */ rules?: { [key: string]: RegExp; }; /** * Represents the beginning and ending of the selected portion of the input content that will be applied the next time when the MaskedTextBox is rendered. */ selection?: { start: number; end: number; }; /** * Determines the event handler that will be fired when the user edits the value. */ onChange?: (event: MaskedTextBoxChangeEvent) => void; /** * Fires each time the user focuses the MaskedTextBox. */ onFocus?: (event: MaskedTextBoxEvent) => void; /** * Fires each time the MaskedTextBox gets blurred. */ onBlur?: (event: MaskedTextBoxEvent) => void; /** * v-model raw value */ modelRawValue?: string; /** * v-model value */ modelValue?: string; /** * The type of the input - 'text' by default */ type?: string; /** * Defines a string prop that controls the input icon. This property works only with the Kendo UI for Vue FontIcons. * Check the [Icons]({% slug icons %}) article for more information about how the Font Icon can be loaded to your project. */ iconName?: String; /** * Defines if the inputPrefix will be shown. Accepts a slot name, a `render` function, or a Vue component. */ inputPrefix?: Boolean | String | Object | Function; /** * Defines if the inputSuffix will be shown. Accepts a slot name, a `render` function, or a Vue component. */ inputSuffix?: Boolean | String | Object | Function; /** * Defines a boolean prop that controls whether to show the validation icon. Defaults to 'false'. */ showValidationIcon?: Boolean; /** * Defines a boolean prop that controls whether to show the loading icon. Defaults to 'false'. */ showLoadingIcon?: Boolean; /** * Defines a boolean prop that controls whether to show the clear icon. Defaults to 'false'. */ showClearButton?: Boolean; /** * Defines additional class to the inner input element. */ inputClass?: String; /** * Defines additional class to the wrapper element. */ wrapperClass?: String; /** * Sets the built-in HTML attributes of the inner focusable input element. * Attributes which are essential for certain component functionalities cannot be changed. */ inputAttributes?: Object; }