maz-ui
Version:
A standalone components library for Vue.Js 3 & Nuxt.Js 3
53 lines (52 loc) • 2.4 kB
TypeScript
import type { Color } from './types';
import { type HTMLAttributes } from 'vue';
export type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
export interface Props<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?: Size;
/** The color of the component. */
color?: Color;
/** The hint text to display below the input. */
hint?: string;
}
export type { Color } from './types';
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"> & Partial<{}> & Props<T>> & 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<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}> & {
__ctx?: Awaited<typeof __VLS_setup>;
};
export default _default;
type __VLS_PrettifyLocal<T> = {
[K in keyof T]: T[K];
} & {};