UNPKG

@volverjs/ui-vue

Version:

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

58 lines (57 loc) 2.36 kB
import type { ExtractPropTypes, Ref, Slots } from 'vue'; export type HintSlotProps = Readonly<ExtractPropTypes<{ hintLabel: { type: StringConstructor; default: ''; required: true; }; modelValue: unknown; valid: BooleanConstructor; validLabel: (StringConstructor | ArrayConstructor)[]; invalid: BooleanConstructor; invalidLabel: (StringConstructor | ArrayConstructor)[]; loading: BooleanConstructor; loadingLabel: StringConstructor; }>>; /** * Return a vue component (HintSlot) to render and manage hint, errors, valid, loading state and messages * @param {HintSlotProps} propsOrRef vue props * @param {Slots} slots vue slots * @returns {Component} vue component */ export declare function HintSlotFactory(propsOrRef: HintSlotProps | Ref<HintSlotProps>, slots: Slots): { hasInvalidLabelOrSlot: globalThis.ComputedRef<boolean>; hasHintLabelOrSlot: globalThis.ComputedRef<boolean>; hasValidLabelOrSlot: globalThis.ComputedRef<boolean>; hasLoadingLabelOrSlot: globalThis.ComputedRef<boolean>; hintSlotScope: globalThis.ComputedRef<{ modelValue: unknown; valid: boolean; invalid: boolean; loading: boolean; }>; HintSlot: import("vue").DefineComponent<ExtractPropTypes<{ tag: { type: StringConstructor; default: string; }; }>, { isVisible: globalThis.ComputedRef<boolean>; invalidLabel: globalThis.ComputedRef<string | undefined>; validLabel: globalThis.ComputedRef<string | undefined>; loadingLabel: globalThis.ComputedRef<string | undefined>; hintLabel: globalThis.ComputedRef<string>; hasInvalidLabelOrSlot: globalThis.ComputedRef<boolean>; hasValidLabelOrSlot: globalThis.ComputedRef<boolean>; hasLoadingLabelOrSlot: globalThis.ComputedRef<boolean>; hasHintLabelOrSlot: globalThis.ComputedRef<boolean>; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{ tag: { type: StringConstructor; default: string; }; }>> & Readonly<{}>, { tag: string; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; }; export default HintSlotFactory;