UNPKG

maz-ui

Version:

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

56 lines (55 loc) 2.59 kB
import { HTMLAttributes } from 'vue'; import { MazColor, MazSize } from './types'; export type MazCheckboxValue = string | number | boolean; export interface MazCheckboxProps<T = boolean | (string | number)[]> { /** Style attribut of the component root element */ style?: HTMLAttributes['style']; /** Class attribut of the component root element */ class?: HTMLAttributes['class']; /** The model value of the checkbox */ modelValue?: T; /** The id of the checkbox */ id?: string; /** The color of the checkbox */ color?: MazColor; /** The value of the checkbox when selected */ value?: MazCheckboxValue; /** The name of the checkbox */ name?: string; /** The size of the checkbox */ size?: MazSize; /** Text label */ label?: string; /** If the checkbox 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 hint text to display below the input. */ hint?: string; } declare const _default: <T extends boolean | (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 onBlur?: ((value: FocusEvent) => any) | undefined; readonly onChange?: ((value: T) => any) | undefined; readonly onFocus?: ((value: FocusEvent) => any) | undefined; readonly "onUpdate:model-value"?: ((value: T) => any) | undefined; } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onFocus" | "onBlur" | "onChange" | "onUpdate:model-value"> & MazCheckboxProps<T> & Partial<{}>> & import('vue').PublicProps; expose(exposed: import('vue').ShallowUnwrapRef<{}>): void; attrs: any; slots: { default?(_: { value: MazCheckboxValue; }): any; }; emit: ((evt: "blur", value: FocusEvent) => void) & ((evt: "change", value: T) => void) & ((evt: "focus", value: FocusEvent) => void) & ((evt: "update:model-value", value: T) => void); }>) => import('vue').VNode & { __ctx?: Awaited<typeof __VLS_setup>; }; export default _default; type __VLS_PrettifyLocal<T> = { [K in keyof T]: T[K]; } & {};