UNPKG

maz-ui

Version:

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

75 lines (74 loc) 3.28 kB
import { HTMLAttributes } from 'vue'; import { MazColor, MazSize } from './types'; export type MazRadioButtonsOption<T = string | number | boolean> = { /** The label of the option */ label: string; /** The value of the option */ value: T; /** The classes to apply to the option */ classes?: any; /** The style to apply to the option */ style?: HTMLAttributes['style']; } & Record<string, unknown>; export interface MazRadioButtonsProps<T = string | number | boolean, Option extends MazRadioButtonsOption<T> = MazRadioButtonsOption<T>> { /** @model The value of the selected option */ modelValue?: T; /** The options to display */ options: Option[]; /** The name of the radio group */ name?: string; /** The color of the selected radio buttons */ color?: MazColor | 'background'; /** Add elevation to the radio buttons */ elevation?: boolean; /** * The orientation of the radio buttons * @values 'row' | 'col' * @default 'row' */ orientation?: 'row' | 'col'; /** Disable the wrap of the radio buttons */ wrap?: boolean; /** Make all radio buttons the same size */ equalSize?: boolean; /** Display a selector icon */ selector?: boolean; /** The component will be displayed in full width */ block?: 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; /** * The size of the radio buttons * @default 'md' */ size?: MazSize; } declare const _default: <T extends string | number | boolean, Option extends MazRadioButtonsOption<T>>(__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: Option["value"]) => any) | undefined; readonly onFocus?: ((value: FocusEvent) => any) | undefined; readonly "onUpdate:model-value"?: ((value: Option["value"]) => any) | undefined; } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onFocus" | "onBlur" | "onChange" | "onUpdate:model-value"> & MazRadioButtonsProps<T, Option> & Partial<{}>> & import('vue').PublicProps; expose(exposed: import('vue').ShallowUnwrapRef<{}>): void; attrs: any; slots: { default?(_: { option: Option; selected: boolean; }): any; }; emit: ((evt: "blur", value: FocusEvent) => void) & ((evt: "change", value: Option["value"]) => void) & ((evt: "focus", value: FocusEvent) => void) & ((evt: "update:model-value", value: Option["value"]) => void); }>) => import('vue').VNode & { __ctx?: Awaited<typeof __VLS_setup>; }; export default _default; type __VLS_PrettifyLocal<T> = { [K in keyof T]: T[K]; } & {};