UNPKG

@volverjs/ui-vue

Version:

@volverjs/ui-vue is a lightweight Vue 3 component library to accompany @volverjs/style.

95 lines (94 loc) 2.79 kB
import type { ExtractPropTypes, Ref } from 'vue'; import type { InputGroupState } from '../../types/group'; export declare const VvCheckboxProps: { /** * If true, the input will be indeterminated */ indeterminate: BooleanConstructor; /** * Value associated with the unchecked state */ uncheckedValue: (BooleanConstructor | StringConstructor | NumberConstructor)[]; /** * If true, the input will be displayed as a switch */ switch: BooleanConstructor; modifiers: { type: PropType<string | string[]>; default: undefined; }; value: { type: (BooleanConstructor | StringConstructor | NumberConstructor)[]; default: undefined; }; modelValue: { type: (ObjectConstructor | BooleanConstructor | StringConstructor | NumberConstructor)[]; default: undefined; }; loading: { type: BooleanConstructor; default: boolean; }; loadingLabel: { type: StringConstructor; default: string; }; label: { type: (StringConstructor | NumberConstructor)[]; default: undefined; }; readonly: { type: BooleanConstructor; default: boolean; }; disabled: { type: BooleanConstructor; default: boolean; }; hintLabel: { type: StringConstructor; default: string; }; invalid: { type: BooleanConstructor; default: boolean; }; invalidLabel: { type: (ArrayConstructor | StringConstructor)[]; default: undefined; }; valid: { type: BooleanConstructor; default: boolean; }; validLabel: { type: (ArrayConstructor | StringConstructor)[]; default: undefined; }; tabindex: { type: (StringConstructor | NumberConstructor)[]; default: number; }; name: { type: StringConstructor; required: boolean; }; id: (StringConstructor | NumberConstructor)[]; }; export declare const VvCheckboxEvents: string[]; export type VvCheckboxPropsTypes = ExtractPropTypes<typeof VvCheckboxProps>; /** * Merges local and group props */ export declare function useGroupProps(props: VvCheckboxPropsTypes, emit: (event: (typeof VvCheckboxEvents)[number], value: unknown) => void): { id: Ref<string | number | undefined, string | number | undefined> | undefined; propsSwitch: Ref<boolean, boolean>; indeterminate: Ref<boolean, boolean>; group: InputGroupState | undefined; isInGroup: globalThis.ComputedRef<boolean>; modelValue: Ref<unknown, unknown>; valid: Ref<boolean, boolean>; invalid: Ref<boolean, boolean>; readonly: globalThis.ComputedRef<boolean>; disabled: globalThis.ComputedRef<boolean>; };