import { FormEvent } from "react"; //#region src/vocabulary/collectFormValues.d.ts /** * The subset of `HTMLInputElement`/`HTMLSelectElement`/`HTMLTextAreaElement` that {@link collectFormValues} reads. A structural type rather than the DOM interfaces themselves, so a plain object can stand in for a form control in tests. */ export type FormControlElementLike = { readonly name: string; readonly type: string; readonly value: string; readonly checked?: boolean; readonly disabled: boolean; readonly hasAttribute: (name: string) => boolean; readonly matches?: ((selector: string) => boolean) | undefined; }; /** * Collects a submitted form's named control values into a plain object, keyed by `name`, in document order. Reads each control's live DOM state rather than `FormData`, so a checkbox resolves to its `checked` boolean instead of an on/off string. A radio group resolves to its checked option's `value`, or `undefined` if none is checked. Any other repeated `name` resolves to an array of its controls' values, in document order. Controls without a `name`, that carry `data-aui-generated-name`, or that are effectively disabled, including through an ancestor disabled fieldset outside its first legend, are skipped entirely. */ export declare function collectFormValues(elements: ArrayLike): Record; /** * Convenience wrapper around {@link collectFormValues} for a native form submit event; the cast from `HTMLFormControlsCollection` to `ArrayLike` lives here once instead of at every call site. */ export declare function collectFormValuesFromEvent(event: FormEvent): Record; //#endregion //# sourceMappingURL=collectFormValues.d.ts.map