import { default as React, FocusEventHandler, KeyboardEventHandler, Ref } from 'react'; import { Country } from './country'; export type PhoneInputProps = { ref?: Ref; /** * className for the element */ className?: string; /** * The list of countries to display in the country dropdown of the phone input */ countries: Country[]; /** * The selected country for the phone number (e.g. FR) */ country: string; /** * The calling code for the phone number (e.g. +33) */ callingCode: string; /** * Whether the PhoneInput should fit its parent or content * @default content */ fit?: 'content' | 'parent'; /** * The id of the PhoneInput */ id?: string; /** * Whether the PhoneInput is disabled. */ isDisabled?: boolean; /** * Whether the PhoneInput is invalid. */ isInvalid?: boolean; /** * The name of the PhoneInput, used when submitting an HTML form */ name?: string; /** * Temporary text that occupies the PhoneInput when it is empty. */ placeholder?: string; /** * The current value (controlled). */ value: string | null; /** * Handler that is called when the country changes. */ onSelectCountry: (selectedCountry: Country) => void; /** * Handler that is called when the value changes. */ onChange: (newValue: string) => void; /** * Handler that is called when the element receives focus. */ onFocus?: FocusEventHandler; /** * Handler that is called when the element loses focus. */ onBlur?: FocusEventHandler; /** * Handler that is called when a key is pressed. */ onKeyDown?: KeyboardEventHandler; /** * Function which formats the phone number (for example with spaces or removing the leading zero) */ formatPhoneNumber: (value: string | null, country: string, callingCode: string) => string; }; export declare const PhoneInput: ({ className, countries, country, callingCode, fit, id, isDisabled, isInvalid, name, placeholder, value, onChange, onFocus, onBlur, onKeyDown, onSelectCountry, formatPhoneNumber, ref, ...rest }: PhoneInputProps) => React.JSX.Element; //# sourceMappingURL=PhoneInput.d.ts.map