UNPKG

maz-ui

Version:

A standalone components library for Vue.Js 3 & Nuxt.Js 3

50 lines (49 loc) 2.31 kB
import { HTMLAttributes } from 'vue'; import { MazColor } from './types'; export type MazInputCodeSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'; export interface MazInputCodeProps<T = string | number> { /** The style of the component. */ style?: HTMLAttributes['style']; /** The class of the component. */ class?: HTMLAttributes['class']; /** The value of the component (v-model). */ modelValue?: T; /** The length of the code. */ codeLength?: number; /** The type of the input field. */ type?: 'text' | 'number'; /** Whether to accept alpha characters. */ acceptAlpha?: boolean; /** Whether the input is required. */ required?: boolean; /** Whether the input is disabled. */ disabled?: boolean; /** Whether there is an error with the input. */ error?: boolean; /** Whether the input is successful. */ success?: boolean; /** Whether there is a warning with the input. */ warning?: boolean; /** The size of the component. */ size?: MazInputCodeSize; /** The color of the component. */ color?: MazColor; /** The hint text to display below the input. */ hint?: string; } declare const _default: <T extends string | number>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{ readonly "onUpdate:model-value"?: ((value?: T | undefined) => any) | undefined; readonly onCompleted?: ((value?: void | undefined) => any) | undefined; } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:model-value" | "onCompleted"> & MazInputCodeProps<T> & Partial<{}>> & import('vue').PublicProps; expose(exposed: import('vue').ShallowUnwrapRef<{}>): void; attrs: any; slots: {}; emit: ((evt: "update:model-value", value?: T | undefined) => void) & ((evt: "completed", value: void) => void); }>) => import('vue').VNode & { __ctx?: Awaited<typeof __VLS_setup>; }; export default _default; type __VLS_PrettifyLocal<T> = { [K in keyof T]: T[K]; } & {};