vuetify
Version:
Vue Material Component Framework
145 lines (138 loc) • 5.98 kB
TypeScript
import * as vue from 'vue';
import { PropType, JSXComponent, ComputedRef, Ref } from 'vue';
type Density = null | 'default' | 'comfortable' | 'compact';
type EventProp<T = (...args: any[]) => any> = T | T[];
declare const EventProp: PropType<EventProp<(...args: any[]) => any>>;
type ValidationResult = string | boolean;
type ValidationRule = ValidationResult | PromiseLike<ValidationResult> | ((value: any) => ValidationResult) | ((value: any) => PromiseLike<ValidationResult>);
type IconValue = string | JSXComponent;
declare const IconValue: PropType<IconValue>;
interface VInputSlot {
id: ComputedRef<string>;
messagesId: ComputedRef<string>;
isDirty: ComputedRef<boolean>;
isDisabled: ComputedRef<boolean>;
isReadonly: ComputedRef<boolean>;
isPristine: Ref<boolean>;
isValid: ComputedRef<boolean | null>;
isValidating: Ref<boolean>;
reset: () => void;
resetValidation: () => void;
validate: () => void;
}
declare const VInput: vue.DefineComponent<{
error: boolean;
direction: "horizontal" | "vertical";
disabled: boolean;
readonly: boolean;
messages: string | string[];
density: Density;
focused: boolean;
errorMessages: string | string[];
maxErrors: string | number;
rules: ValidationRule[];
} & {
id?: string | undefined;
name?: string | undefined;
label?: string | undefined;
modelValue?: any;
prependIcon?: IconValue | undefined;
appendIcon?: IconValue | undefined;
'onClick:append'?: EventProp<(...args: any[]) => any> | undefined;
'onClick:prepend'?: EventProp<(...args: any[]) => any> | undefined;
validateOn?: "input" | "blur" | "submit" | undefined;
validationValue?: any;
hideDetails?: boolean | "auto" | undefined;
} & {
$children?: {} | vue.VNodeChild | {
default?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
prepend?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
append?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
details?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
};
$slots?: {
default?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
prepend?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
append?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
details?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
} | undefined;
'v-slots'?: {
default?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
prepend?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
append?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
details?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
"v-slot:prepend"?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
"v-slot:append"?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
"v-slot:details"?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
}, {
reset: () => void;
resetValidation: () => void;
validate: () => Promise<string[]>;
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
'update:modelValue': (val: any) => true;
}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, {
error: boolean;
direction: "horizontal" | "vertical";
disabled: boolean;
readonly: boolean;
messages: string | string[];
density: Density;
focused: boolean;
errorMessages: string | string[];
maxErrors: string | number;
rules: ValidationRule[];
} & {
id?: string | undefined;
name?: string | undefined;
label?: string | undefined;
modelValue?: any;
prependIcon?: IconValue | undefined;
appendIcon?: IconValue | undefined;
'onClick:append'?: EventProp<(...args: any[]) => any> | undefined;
'onClick:prepend'?: EventProp<(...args: any[]) => any> | undefined;
validateOn?: "input" | "blur" | "submit" | undefined;
validationValue?: any;
hideDetails?: boolean | "auto" | undefined;
} & {
$children?: {} | vue.VNodeChild | {
default?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
prepend?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
append?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
details?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
};
$slots?: {
default?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
prepend?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
append?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
details?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
} | undefined;
'v-slots'?: {
default?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
prepend?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
append?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
details?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
"v-slot:prepend"?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
"v-slot:append"?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
"v-slot:details"?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
} & {
"onUpdate:modelValue"?: ((val: any) => any) | undefined;
}, {
error: boolean;
direction: "horizontal" | "vertical";
disabled: boolean;
readonly: boolean;
messages: string | string[];
density: Density;
focused: boolean;
errorMessages: string | string[];
maxErrors: string | number;
rules: ValidationRule[];
}>;
type VInput = InstanceType<typeof VInput>;
export { VInput };