UNPKG

@ark-ui/vue

Version:

A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.

38 lines (37 loc) 1.12 kB
import { FieldsetHTMLAttributes, HTMLAttributes, MaybeRef, ComputedRef, Ref } from 'vue'; export interface UseFieldsetProps { /** * The id of the fieldset. */ id?: string; /** * Indicates whether the fieldset is disabled. */ disabled?: boolean | 'true' | 'false'; /** * Indicates whether the fieldset is invalid. */ invalid?: boolean; } export type UseFieldsetReturn = ReturnType<typeof useFieldset>; export declare const useFieldset: (props: MaybeRef<UseFieldsetProps>) => ComputedRef<{ refs: { rootRef: Ref<null, null>; }; disabled: boolean | "false" | "true" | undefined; invalid: boolean | undefined; getRootProps: () => FieldsetHTMLAttributes; getLegendProps: () => { 'data-disabled': boolean | "false" | "true"; 'data-invalid': boolean | "false" | "true"; "data-scope": string; "data-part": string; id: string; }; getHelperTextProps: () => { "data-scope": string; "data-part": string; id: string; }; getErrorTextProps: () => HTMLAttributes; }>;