import * as React from 'react'; import { Mode, SubmitHandler } from 'react-hook-form'; import { ButtonProps } from '../Button'; import { FormContextProps } from '../ConnectedForm'; import { FormValues } from '../Form/types'; import { LayoutGridProps } from '../Layout'; import { GridFormSubmitProps } from './GridFormButtons'; import { GridFormFieldsProps, GridFormRequiredTextProps } from './types'; export * from './types'; export type GridFormProps = FormContextProps & GridFormRequiredTextProps & { children?: React.ReactNode; className?: string; /** * Layout grid column gap override. */ columnGap?: LayoutGridProps['columnGap']; /** * Descriptions of any fields or sections comprising the form. */ fields?: GridFormFieldsProps[]; /** * Renders a cancel button with the provided child text and onClick function. */ cancel?: ButtonProps; /** * If your form has a single visible field. You should only have to set this if you have a single field in addition to hidden custom rendered inputs, otherwise it should happen automatically. */ hasSoloField?: boolean; /** * Function called with field values on submit, if all validations have passed. */ onSubmit: SubmitHandler; /** * Whether to hide 'required' explanation at the start of forms - should be disabled only for forms without a required field. */ hideRequiredText?: boolean; /** * Layout grid row gap override between fields. */ rowGap?: LayoutGridProps['rowGap']; /** * Description of the submit button at the end of the form. */ submit: GridFormSubmitProps; /** * Which react hook form mode we are going to use for validation. * If you use the onChange mode the submit button will be disabled until all * required fields are completed. */ validation?: Exclude; }; export declare function GridForm>({ cancel, children, columnGap, fields, hasSoloField, hideRequiredText, requiredTextProps, rowGap, submit, validation, ...rest }: GridFormProps): import("react/jsx-runtime").JSX.Element;