UNPKG

intl-tel-input

Version:

A JavaScript plugin for entering and validating international telephone numbers

31 lines (30 loc) 1.19 kB
import { Country } from '../../intl-tel-input/data'; import { AllOptions, SelectedCountryData } from '../types/public-api'; export default class UI { #private; telInput: HTMLInputElement; countryContainer: HTMLElement; selectedCountry: HTMLElement; selectedCountryInner: HTMLElement; searchInput: HTMLInputElement; searchClearButton: HTMLButtonElement; countryList: HTMLElement; hiddenInput: HTMLInputElement; hiddenInputCountry: HTMLInputElement; highlightedItem: HTMLElement | null; readonly hadInitialPlaceholder: boolean; constructor(input: HTMLInputElement, options: AllOptions, id: number); static validateInput(input: unknown): void; generateMarkup(countries: Country[]): void; filterCountriesByQuery(query: string): void; handleSearchChange(): void; handleSearchClear(): void; scrollTo(element: HTMLElement): void; highlightListItem(listItem: HTMLElement | null, shouldFocus: boolean): void; handleUpDownKey(key: string): void; destroy(): void; openDropdown(): void; closeDropdown(): void; isDropdownClosed(): boolean; setCountry(selectedCountryData: SelectedCountryData): void; }