UNPKG

@volverjs/ui-vue

Version:

@volverjs/ui-vue is a lightweight Vue 3 component library to accompany @volverjs/style.

307 lines (306 loc) 8.05 kB
import type { FactoryOpts } from 'imask'; import type { ExtractPropTypes, PropType } from 'vue'; import type { VvIconProps } from '../VvIcon'; export declare const INPUT_TYPES: { readonly TEXT: "text"; readonly PASSWORD: "password"; readonly NUMBER: "number"; readonly EMAIL: "email"; readonly TEL: "tel"; readonly URL: "url"; readonly COLOR: "color"; readonly SEARCH: "search"; readonly DATE: "date"; readonly TIME: "time"; readonly DATETIME_LOCAL: "datetime-local"; readonly MONTH: "month"; readonly WEEK: "week"; }; export type InputType = ValueOf<typeof INPUT_TYPES>; export declare const VvInputTextEvents: string[]; export declare const VvInputTextProps: { /** * Input value * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value */ modelValue: (StringConstructor | NumberConstructor | DateConstructor)[]; /** * Type of form control * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#type */ type: { type: PropType<InputType>; default: "text"; validator: (value: InputType) => boolean; }; /** * Minimum value * Available for input types: date, month, week, time, datetime-local, number, range. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#min */ min: (StringConstructor | NumberConstructor | DateConstructor)[]; /** * Maximum value * Available for input types: date, month, week, time, datetime-local, number, range. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#max */ max: (StringConstructor | NumberConstructor | DateConstructor)[]; /** * Incremental values that are valid * Available for input types: date, month, week, time, datetime-local and number * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step */ step: { type: (StringConstructor | NumberConstructor)[]; default: number; }; /** * Pattern the value must match to be valid * Available for input types: text, search, url, tel, email and password * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#pattern */ pattern: StringConstructor; /** * Whether to allow multiple values * Available for input type email * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#multiple */ multiple: BooleanConstructor; /** * VvIcon name for show password button * @see VvIcon */ iconShowPassword: { type: PropType<string | VvIconProps>; default: "eye-on"; }; /** * VvIcon name for hide password button * @see VvIcon */ iconHidePassword: { type: PropType<string | VvIconProps>; default: "eye-off"; }; /** * VvIcon name for clear button * @see VvIcon */ iconClear: { type: PropType<string | VvIconProps>; default: "close"; }; /** * VvIcon name for remove suggestion button * @see VvIcon */ iconRemoveSuggestion: { type: PropType<string | VvIconProps>; default: "trash"; }; /** * Label for step up button */ labelStepUp: { type: StringConstructor; default: string; }; /** * Label for step down button */ labelStepDown: { type: StringConstructor; default: string; }; /** * Label for show password button */ labelShowPassword: { type: StringConstructor; default: string; }; /** * Label for hide password button */ labelHidePassword: { type: StringConstructor; default: string; }; /** * Label for clear button */ labelClear: { type: StringConstructor; default: string; }; /** * Label for remove suggestion button */ labelRemoveSuggestion: { type: StringConstructor; default: string; }; /** * iMask options * @see https://imask.js.org/guide.html */ iMask: { type: PropType<FactoryOpts>; default: undefined; }; /** * Masked value */ masked: { type: StringConstructor; default: undefined; }; /** * Adjust input width to content */ autoWidth: { type: BooleanConstructor; default: boolean; }; /** * Hide type number, password and search actions */ hideActions: { type: BooleanConstructor; default: boolean; }; /** * Add unit label to input */ unit: { type: StringConstructor; }; /** * Select input text on focus */ selectOnFocus: { type: BooleanConstructor; default: boolean; }; /** * Maximum number of suggestions */ maxSuggestions: { type: NumberConstructor; default: number; }; /** * The input mode to use for the input * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode */ inputMode: { type: StringConstructor; default: string; }; storageType: { type: PropType<`${import("../../constants").StorageType}`>; default: import("../../constants").StorageType; validator: (value: import("../../constants").StorageType) => boolean; }; storageKey: StringConstructor; required: { type: BooleanConstructor; default: boolean; }; minlength: { type: (StringConstructor | NumberConstructor)[]; default: undefined; }; maxlength: { type: (StringConstructor | NumberConstructor)[]; default: undefined; }; placeholder: { type: StringConstructor; default: undefined; }; label: { type: (StringConstructor | NumberConstructor)[]; default: undefined; }; floating: { type: BooleanConstructor; default: boolean; }; icon: { type: PropType<string | VvIconProps>; default: undefined; }; iconPosition: { type: PropType<`${import("../../constants").Position}`>; default: import("../../constants").Position; validation: (value: import("../../constants").Position) => boolean; }; debounce: { type: (StringConstructor | NumberConstructor)[]; default: undefined; }; count: { type: (BooleanConstructor | StringConstructor)[]; default: boolean; validator: (value: string) => boolean; }; modifiers: { type: PropType<string | string[]>; default: undefined; }; loading: { type: BooleanConstructor; default: boolean; }; loadingLabel: { type: StringConstructor; default: string; }; hintLabel: { type: StringConstructor; default: string; }; invalid: { type: BooleanConstructor; default: boolean; }; invalidLabel: { type: (ArrayConstructor | StringConstructor)[]; default: undefined; }; valid: { type: BooleanConstructor; default: boolean; }; validLabel: { type: (ArrayConstructor | StringConstructor)[]; default: undefined; }; readonly: { type: BooleanConstructor; default: boolean; }; disabled: { type: BooleanConstructor; default: boolean; }; tabindex: { type: (StringConstructor | NumberConstructor)[]; default: number; }; autocomplete: { type: StringConstructor; default: string; }; autofocus: { type: BooleanConstructor; default: boolean; }; name: { type: StringConstructor; required: boolean; }; id: (StringConstructor | NumberConstructor)[]; }; export type VvInputTextPropsTypes = ExtractPropTypes<typeof VvInputTextProps>;