import { Form as FormPrimitive } from '@base-ui/react/form'; import type * as React from 'react'; export type FormValidationMode = 'onSubmit' | 'onBlur' | 'onChange'; export interface FormProps = Record> extends Omit, 'onSubmit'> { /** * Determines when the form should be validated. * - `onSubmit` (default): validates when the form is submitted * - `onBlur`: validates when a field loses focus * - `onChange`: validates on every change * @default 'onSubmit' */ validationMode?: FormValidationMode; /** * External validation errors (e.g., from server). * Keys should match field `name` attributes. */ errors?: Record; /** * Called when the form is submitted. * `preventDefault()` is automatically called. */ onFormSubmit?: (formValues: FormValues, eventDetails: FormPrimitive.SubmitEventDetails) => void; } /** * Form - A native form element with consolidated error handling. * Works with Field components for structured form management. */ declare function Form = Record>({ className, validationMode, errors, onFormSubmit, ...props }: FormProps): React.JSX.Element; declare namespace Form { var displayName: string; } export { Form };