import * as react_jsx_runtime from 'react/jsx-runtime';
import * as _radix_ui_react_context from '@radix-ui/react-context';
import { Scope } from '@radix-ui/react-context';
import * as React from 'react';
import { Label as Label$1 } from '@radix-ui/react-label';
import { Primitive } from '@radix-ui/react-primitive';
type ScopedProps
= P & {
__scopeForm?: Scope;
};
declare const createFormScope: _radix_ui_react_context.CreateScope;
type PrimitiveFormProps = React.ComponentPropsWithoutRef;
interface FormProps extends PrimitiveFormProps {
onClearServerErrors?(): void;
}
declare const Form: React.ForwardRefExoticComponent>;
type PrimitiveDivProps = React.ComponentPropsWithoutRef;
interface FormFieldProps extends PrimitiveDivProps {
name: string;
serverInvalid?: boolean;
}
declare const FormField: React.ForwardRefExoticComponent>;
type LabelProps = React.ComponentPropsWithoutRef;
interface FormLabelProps extends LabelProps {
}
declare const FormLabel: React.ForwardRefExoticComponent>;
type PrimitiveInputProps = React.ComponentPropsWithoutRef;
interface FormControlProps extends PrimitiveInputProps {
}
declare const FormControl: React.ForwardRefExoticComponent>;
declare const _validityMatchers: readonly ["badInput", "patternMismatch", "rangeOverflow", "rangeUnderflow", "stepMismatch", "tooLong", "tooShort", "typeMismatch", "valid", "valueMissing"];
type ValidityMatcher = (typeof _validityMatchers)[number];
interface FormMessageProps extends Omit {
match?: ValidityMatcher | CustomMatcher;
forceMatch?: boolean;
name?: string;
}
declare const FormMessage: React.ForwardRefExoticComponent>;
type PrimitiveSpanProps = React.ComponentPropsWithoutRef;
interface FormMessageImplProps extends PrimitiveSpanProps {
name: string;
}
interface FormValidityStateProps {
children(validity: ValidityState | undefined): React.ReactNode;
name?: string;
}
declare const FormValidityState: {
(props: ScopedProps): react_jsx_runtime.JSX.Element;
displayName: string;
};
type PrimitiveButtonProps = React.ComponentPropsWithoutRef;
interface FormSubmitProps extends PrimitiveButtonProps {
}
declare const FormSubmit: React.ForwardRefExoticComponent>;
type SyncCustomMatcher = (value: string, formData: FormData) => boolean;
type AsyncCustomMatcher = (value: string, formData: FormData) => Promise;
type CustomMatcher = SyncCustomMatcher | AsyncCustomMatcher;
declare const Root: React.ForwardRefExoticComponent>;
declare const Field: React.ForwardRefExoticComponent>;
declare const Label: React.ForwardRefExoticComponent>;
declare const Control: React.ForwardRefExoticComponent>;
declare const Message: React.ForwardRefExoticComponent>;
declare const ValidityState: {
(props: ScopedProps): react_jsx_runtime.JSX.Element;
displayName: string;
};
declare const Submit: React.ForwardRefExoticComponent>;
export { Control, Field, Form, FormControl, type FormControlProps, FormField, type FormFieldProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, type FormProps, FormSubmit, type FormSubmitProps, FormValidityState, type FormValidityStateProps, Label, Message, Root, Submit, ValidityState, createFormScope };