/** Agent-readiness curated handle for PhoneInput. */ export interface PhoneInputHandle { getValue: () => string; setValue: (value: string) => void; clear: () => void; focus: () => void; } import { type CountryCode } from 'libphonenumber-js/min'; export interface PhoneInputChangeMeta { country: CountryCode; isValid: boolean; isPossible: boolean; type?: string; } export interface PhoneInputProps { value?: string; defaultValue?: string; /** * Country pre-selected when no value is supplied. Defaults to `IT` * (AlfaDocs's dominant user base is Italian). Pass a different * `CountryCode` to override, or enable `detectBrowserCountry` to * derive it from the browser locale. */ defaultCountry?: CountryCode; /** * When true, infer the default country from `navigator.language` / * `Intl.Locale` before falling back to `defaultCountry` (or `IT`). * Off by default — most AlfaDocs flows should stay on IT regardless * of the visitor's browser locale. */ detectBrowserCountry?: boolean; onChange?: (e164: string, meta: PhoneInputChangeMeta) => void; size?: 'sm' | 'md' | 'lg'; tone?: 'default' | 'error'; disabled?: boolean; readOnly?: boolean; placeholder?: string; popularCountries?: CountryCode[]; /** * Restrict the country picker to this set (ISO 3166-1 alpha-2 codes), in * the order given. Unsupported or duplicate codes are dropped; an empty / * all-invalid list is ignored (every country stays selectable). * `popularCountries` is intersected with this set. When the list resolves * to a single country the picker collapses to a fixed, non-interactive * dial code — only the national-number field stays editable. */ allowedCountries?: CountryCode[]; className?: string; id?: string; name?: string; /** * What `name` posts in a native form. `national` (the default) posts the * number field's own text, e.g. `333 123 4567`. `e164` posts the full * number from a hidden field instead, e.g. `+393331234567`: the string * `onChange` reports, so it is empty while the text is not yet a number. */ nameFormat?: 'national' | 'e164'; required?: boolean; /** * Fires once when focus has left the whole control. Moving between the * country picker and the number field does not fire it. It takes no * event: the control has several parts, so there is no single target. */ onBlur?: () => void; 'aria-label'?: string; } declare const phoneInputWrapperVariants: (props?: ({ size?: "sm" | "md" | "lg" | null | undefined; tone?: "default" | "error" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; declare const countryTriggerVariants: (props?: ({ size?: "sm" | "md" | "lg" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; declare const phoneNumberInputVariants: (props?: ({ size?: "sm" | "md" | "lg" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; export declare const PhoneInput: import("react").ForwardRefExoticComponent>; export { phoneInputWrapperVariants, countryTriggerVariants, phoneNumberInputVariants, }; //# sourceMappingURL=phone-input.d.ts.map