UNPKG

@jmt-code/phone-selector

Version:

Beautiful React component for country selection with flag images, phone input validation, and elegant glassmorphism design. Features dynamic mask templates and 150+ countries support.

34 lines (29 loc) 789 B
import React from 'react'; type Country = { name: string; iso2: string; dialCode: string; mask: string; flag: string; minDigits?: number; maxDigits?: number; }; type ChangePayload = { country: Country; raw: string; formatted: string; isValid: boolean; }; type CountryPhoneInputProps = { value?: string; onChange?: (payload: ChangePayload) => void; countries?: Country[]; initialCountry?: string; className?: string; placeholder?: string; size?: 'sm' | 'md' | 'lg'; disabled?: boolean; }; declare const CountryPhoneInput: React.FC<CountryPhoneInputProps>; declare const defaultCountries: Country[]; export { type ChangePayload, type Country, CountryPhoneInput, type CountryPhoneInputProps, defaultCountries };