import { FC, PropsWithChildren } from 'react'; import { PropsContext } from '../propsContext'; import { ClassValue } from 'clsx'; import { FlowComponentName } from '../../components/propTypes'; interface FieldComponentProps { className?: ClassValue; isRequired?: boolean; isDisabled?: boolean; "aria-describedby"?: string; } export interface UseFieldComponent { FieldErrorCaptureContext: FC; FieldErrorView: FC; fieldPropsContext: PropsContext; /** For the field's outer element. */ wrapperProps: { className: string; }; /** * For what assistive technology lands on — the input, or the group of a * grouped control. Where the react-aria root forwards `aria-describedby` to * its input itself, spread it on the root together with `wrapperProps`. * Spread it after `rest`: it already contains the consumer's * `aria-describedby`, which `rest` would otherwise put back alone. */ controlProps: { "aria-describedby"?: string; }; /** The id of the error while one is rendered, without the consumer's ids. */ renderedFieldErrorId?: string; } export declare const useFieldComponent: (props: FieldComponentProps, component: FlowComponentName) => UseFieldComponent; export {};