UNPKG

mui-tel-input

Version:

A phone number input designed for the React library MUI built with libphonenumber-js

19 lines (18 loc) 1.66 kB
import { MuiTelInputContinent } from '../constants/continents'; import { MuiTelInputCountry } from '../constants/countries'; type FilterCountriesOptions = { onlyCountries?: readonly MuiTelInputCountry[]; excludedCountries?: readonly MuiTelInputCountry[]; preferredCountries?: readonly MuiTelInputCountry[]; continents?: readonly MuiTelInputContinent[]; }; export declare function getCallingCodeOfCountry(isoCode: MuiTelInputCountry): string; export declare function getValidCountry(country?: MuiTelInputCountry): MuiTelInputCountry; export declare function sortPreferredCountries(countries: readonly MuiTelInputCountry[], preferredCountries: readonly MuiTelInputCountry[]): readonly MuiTelInputCountry[]; export declare function getCountriesOfContinents(continents: readonly MuiTelInputContinent[]): readonly MuiTelInputCountry[]; export declare function getOnlyCountries(countries: readonly MuiTelInputCountry[], onlyCountries: readonly MuiTelInputCountry[]): readonly MuiTelInputCountry[]; export declare function excludeCountries(countries: readonly MuiTelInputCountry[], excludedCountries?: readonly MuiTelInputCountry[]): readonly MuiTelInputCountry[]; export declare function sortAlphabeticallyCountryCodes(countryCodes: readonly MuiTelInputCountry[], displayNames: Intl.DisplayNames): readonly MuiTelInputCountry[]; export declare function filterCountries(countries: readonly MuiTelInputCountry[], displayNames: Intl.DisplayNames, options: FilterCountriesOptions): readonly MuiTelInputCountry[]; export declare function matchContinentsIncludeCountry(continents: MuiTelInputContinent[], isoCode: MuiTelInputCountry): boolean; export {};