Search

Find components, guides, and documentation

Input Tel: API Table

class: LionInputTel, lion-input-tel

Fields

NamePrivacyTypeDefaultDescriptionInherited From
activePhoneNumberTypepublicType of phone number, derived from textbox value. Enum with values: -‘fixed-line’ -‘fixed-line-or-mobile’ -‘mobile’ -‘pager’ -‘personal-number’ -‘premium-rate’ -‘shared-cost’ -‘toll-free’ -‘uan’ -‘voip’ -‘unknown’ See https://www.npmjs.com/package/awesome-phonenumber
activeRegionpublicstringCurrently active region based on: 1. allowed regions: get the region from configured allowed regions (if one entry) 2. user input: try to derive active region from user input 3. locale: try to get the region from locale (`html[lang]` attribute)
allowedRegionspublicRegionCode[][]The regions that should be considered when international phone numbers are detected. (when not configured, all regions worldwide will be considered)
autocompletepublicstring'tel'
fieldNamepublicSet a default name for this field, so that validation feedback will be always accessible and linguistically correct
formatCountryCodeStylepublicstring'default'Extra styling of the format strategy default | parentheses
formatStrategypublicPhoneNumberFormat'international'Determines what the formatter output should look like. Formatting strategies as provided by google-libphonenumber See: https://www.npmjs.com/package/google-libphonenumber
placeholderpublicstring''LionInput
preferredRegionspublicRegionCode[][]Regions that will be shown on top of the dropdown
readOnlypublicbooleanfalseA Boolean attribute which, if present, indicates that the user should not be able to edit the value of the input. The difference between disabled and readonly is that read-only controls can still function, whereas disabled controls generally do not function as controls until they are enabled. (From: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly)LionInput
slotspublicLionInput
typepublicstring'text'LionInput
_allowedOrAllRegionsprotectedRegionCode[]Used for rendering the region/country list
_feedbackConditionMetaprotectedLionField
_focusableNodeprotectedLionField
_inputNodeprotectedHTMLInputElementLionInput
_langIsoprotectedRegionCode | undefinedundefined
_phoneUtilprotectedAwesomePhoneNumber|null
_phoneUtilLoadCompleteprotectedPromise<PhoneNumber>

Methods

NamePrivacyDescriptionParametersReturnInherited From
clearpublicClears modelValue. Interaction states are not cleared (use resetInteractionState for this)LionField
formatterpublicmodelValue: stringstring
onLocaleUpdatedpublic
parserpublicviewValue: stringstring
preprocessorpublicviewValue: string, { currentCaretIndex, prevViewValue }, options: @param {string} options.prevViewValue * @param {number} options.currentCaretIndex * { viewValue: string; caretIndex: number; } | undefined
resetpublicResets modelValue to initial value. Interaction states are clearedLionField
resetInteractionStatepublicLionField
_onChangeprotectedDispatches custom bubble eventev: Event=LionField
_onPhoneNumberUtilReadyprotected
_reflectBackOnprotectedDo not reflect back .formattedValue during typing (this normally wouldn’t happen when FormatMixin calls _calculateValues based on user input, but for LionInputTel we need to call it on .activeRegion change)boolean
_setActiveRegionprotectedProtected setter for activeRegion, only meant for subclassersnewValue: RegionCode|undefined

Events

NameTypeDescriptionInherited From
user-input-changedEventLionField

Attributes

NameFieldInherited From
allowedRegionsallowedRegions
format-strategyformatStrategy
format-country-code-styleformatCountryCodeStyle
activeRegionactiveRegion
preferredRegionspreferredRegions
_phoneUtil_phoneUtil
readonlyreadOnlyLionInput
typetypeLionInput
placeholderplaceholderLionInput