import type { ChangeEvent, FocusEvent, KeyboardEvent } from "react"; import type { UseControllerReturn } from "react-hook-form"; import type { FormFieldProps, KeyBoardTypes } from "../FormFieldTypes"; export interface useAtlantisFormFieldProps extends Pick { /** * The html id for the field */ readonly id: string; /** * The name for the html input field if one if provided by consumers of the component */ readonly nameProp?: string; /** * The auto-generated name for the html input field if a nameProp is not provided */ readonly name: string; /** * The ref used to access the FieldActions of the field */ /** * The field returned from react-hook-form's useController */ readonly useControllerField: Omit; /** * The keyboard type for the field. This is used to provide hints to the browser about the type of keyboard to display on mobile devices */ readonly keyboard?: KeyBoardTypes; /** * The error message for the field */ readonly errorMessage: string; /** * Determines if the field has validations */ readonly validations: boolean; /** * Callback for when the field value changes */ handleChange: (event: ChangeEvent) => void; /** * Callback for when the field loses focus */ handleBlur: () => void; /** * Callback for when the field gains focus */ handleFocus: (event: FocusEvent) => void; /** * Callback for when keydown event is triggered on the field */ handleKeyDown: (event: KeyboardEvent) => void; /** * Callback that exposes the error message when the field is validated */ handleValidation: (message: string) => void; } /** * Provides the props for the html fields rendered by the FormField component */ export declare function useAtlantisFormField({ id, nameProp, name, useControllerField: useControllerField, description, disabled, readonly, keyboard, autofocus, pattern, type, value, handleChange, handleBlur, handleFocus, inline, validations, handleKeyDown, handleValidation, errorMessage, }: useAtlantisFormFieldProps): { textFieldProps: { autoFocus: boolean | undefined; onKeyDown: (event: KeyboardEvent) => void; "aria-describedby"?: string | undefined; id: string; className: string; name: string | undefined; disabled: boolean | undefined; readOnly: boolean | undefined; inputMode: KeyBoardTypes | undefined; onChange: (event: ChangeEvent) => void; onBlur: () => void; onFocus: (event: FocusEvent) => void; value: any; }; fieldProps: { "aria-describedby"?: string | undefined; id: string; className: string; name: string | undefined; disabled: boolean | undefined; readOnly: boolean | undefined; inputMode: KeyBoardTypes | undefined; onChange: (event: ChangeEvent) => void; onBlur: () => void; onFocus: (event: FocusEvent) => void; autoFocus: boolean | undefined; value: any; }; descriptionIdentifier: string; };