maz-ui
Version:
A standalone components library for Vue.Js 3 & Nuxt.Js 3
59 lines (58 loc) • 2.62 kB
TypeScript
import type { Color, Size } from './types';
import { type HTMLAttributes } from 'vue';
export interface Props<T = string | number | boolean> {
/** Style attribut of the component root element */
style?: HTMLAttributes['style'];
/** Class attribut of the component root element */
class?: HTMLAttributes['class'];
/** The id of the radio */
id?: string;
/** @model The value of the radio */
modelValue?: T;
/** The value of the radio */
value: T;
/** The name of the radio */
name: string;
/** The label of the radio */
label?: string;
/** The color of the radio */
color?: Color;
/** The size of the radio */
size?: Size;
/** The disabled state of the radio */
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;
}
export type { Color, Size } from './types';
declare const _default: <T extends string | number | boolean>(__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"> & Partial<{}> & Props<T>> & import("vue").PublicProps;
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
attrs: any;
slots: {
default?(_: {
isSelected: boolean;
value: T;
}): 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<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];
} & {};