import { type HTMLAttributes } from 'react'; /** The fields of the form, in the order they appear. */ export declare const SEND_REGISTRATION_LINK_FIELDS: readonly ["email", "emailConfirm", "phone", "phoneConfirm", "allowLoginUntil"]; export type SendRegistrationLinkField = (typeof SEND_REGISTRATION_LINK_FIELDS)[number]; /** What `onSubmit` receives once every check has passed. */ export interface SendRegistrationLinkValues { email: string; /** As typed. It matches `email` apart from case and outer spaces. */ emailConfirm: string; /** In E.164 form, e.g. `+393331234567`. */ phone: string; /** In E.164 form. Equal to `phone`. */ phoneConfirm: string; /** `yyyy-MM-dd`. */ allowLoginUntil: string; } /** Values to show when the form opens, e.g. after a refused post. * `allowLoginUntil` is `yyyy-MM-dd`. */ export type SendRegistrationLinkInitialValues = Partial; /** Messages from the server, already translated by the host: one per * field, plus `form` for a message about the whole form. */ export type SendRegistrationLinkErrors = Partial>; /** The host's own form field names, e.g. `send_registration_link[email]`. */ export type SendRegistrationLinkFieldNames = Partial>; /** Guidance for the person sending, in the host's own words. */ export interface SendRegistrationLinkGuidance { /** The notice's heading. Pass it translated. */ title: string; /** One short point each. Pass them translated. Plain text. */ points: readonly string[]; } /** The result of a send, shown instead of the form. */ export interface SendRegistrationLinkSent { /** The address the email went to. */ email: string; /** The last day the link allows login, `yyyy-MM-dd`. */ allowLoginUntil: string; } export interface SendRegistrationLinkFormProps extends Omit, 'title' | 'onSubmit'> { /** Replaces the heading "Send a registration link". Pass it translated. */ title?: string; /** The heading's level. Default 2, for a page that has its own `h1`. */ headingLevel?: 1 | 2 | 3; /** A warning-style notice above the form. The kit has no copy for it. */ guidance?: SendRegistrationLinkGuidance; /** The first day that can be chosen, `yyyy-MM-dd`. Default: tomorrow. */ minDate?: string; /** The last day that can be chosen, `yyyy-MM-dd`. Default: no limit. * Keep it equal to the server's. */ maxDate?: string; /** Values to show when the form opens. Read once. */ initialValues?: SendRegistrationLinkInitialValues; /** Messages from the server. Each shows on its field until the user * changes that field, and the form takes focus when they are present * at load. */ errors?: SendRegistrationLinkErrors; /** Fields that refuse paste, so the user types them. Default: none. * Refusing a paste in `phoneConfirm` is silent: use it with care. */ blockPaste?: readonly ('email' | 'emailConfirm' | 'phoneConfirm')[]; /** Replaces the button's "Send registration link". Translated. */ submitLabel?: string; /** True while a React host sends the values. */ submitting?: boolean; /** Shows the result instead of the form. */ sent?: SendRegistrationLinkSent; /** Where "Send another link" leads. Same-site path or full address. */ sendAnotherHref?: string; /** For a native form post: the host's field names. When set, the * browser posts the form. */ fieldNames?: SendRegistrationLinkFieldNames; /** Where the post goes. Default: the current address. Same site only. */ action?: string; /** Extra hidden inputs for a native post, by name: the CSRF token. */ hiddenFields?: Readonly>; /** For React hosts: called once every check has passed. Not called when * `fieldNames` is set. */ onSubmit?: (values: SendRegistrationLinkValues) => void; } export declare const SendRegistrationLinkForm: import("react").ForwardRefExoticComponent>; //# sourceMappingURL=send-registration-link-form.d.ts.map