vue3-otp-input
Version:
A fully customizable, OTP (one-time password) input component built with Vue 3.x and Vue Composition API.
81 lines (80 loc) • 2.87 kB
TypeScript
type Props = {
inputType?: "number" | "tel" | "letter-numeric" | "password";
inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
value: string;
separator: string;
focus: boolean;
inputClasses: string | string[];
conditionalClass: string;
shouldAutoFocus: boolean;
isLastChild: boolean;
placeholder: string;
isDisabled: boolean;
};
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
inputType: string;
inputmode: string;
separator: string;
focus: boolean;
inputClasses: string;
conditionalClass: string;
shouldAutoFocus: boolean;
isLastChild: boolean;
placeholder: string;
isDisabled: boolean;
value: string;
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
"on-change": (value: string | number) => void;
"on-keydown": (event: KeyboardEvent) => void;
"on-paste": (event: ClipboardEvent) => void;
"on-focus": () => void;
"on-blur": () => void;
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
inputType: string;
inputmode: string;
separator: string;
focus: boolean;
inputClasses: string;
conditionalClass: string;
shouldAutoFocus: boolean;
isLastChild: boolean;
placeholder: string;
isDisabled: boolean;
value: string;
}>>> & Readonly<{
"onOn-change"?: ((value: string | number) => any) | undefined;
"onOn-keydown"?: ((event: KeyboardEvent) => any) | undefined;
"onOn-paste"?: ((event: ClipboardEvent) => any) | undefined;
"onOn-focus"?: (() => any) | undefined;
"onOn-blur"?: (() => any) | undefined;
}>, {
focus: boolean;
inputType: "number" | "tel" | "letter-numeric" | "password";
inputmode: "tel" | "none" | "text" | "url" | "email" | "numeric" | "decimal" | "search";
value: string;
separator: string;
inputClasses: string | string[];
conditionalClass: string;
shouldAutoFocus: boolean;
isLastChild: boolean;
placeholder: string;
isDisabled: boolean;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
type __VLS_TypePropsToRuntimeProps<T> = {
[K in keyof T]-?: {} extends Pick<T, K> ? {
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
} : {
type: import('vue').PropType<T[K]>;
required: true;
};
};
type __VLS_WithDefaults<P, D> = {
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
default: D[K];
}> : P[K];
};
type __VLS_Prettify<T> = {
[K in keyof T]: T[K];
} & {};