@descope/web-components-ui 1.118.0 → 1.120.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/cjs/index.cjs.js +16 -2
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +16 -2
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/7092.js +1 -1
  6. package/dist/umd/7092.js.map +1 -1
  7. package/dist/umd/DescopeDev.js +1 -1
  8. package/dist/umd/DescopeDev.js.map +1 -1
  9. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  10. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -1
  11. package/dist/umd/descope-hybrid-field-index-js.js +1 -1
  12. package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
  13. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  14. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js.map +1 -1
  15. package/dist/umd/descope-new-password-index-js.js +1 -1
  16. package/dist/umd/descope-new-password-index-js.js.map +1 -1
  17. package/dist/umd/descope-passcode-index-js.js +1 -1
  18. package/dist/umd/descope-passcode-index-js.js.map +1 -1
  19. package/dist/umd/descope-password-index-js.js +1 -1
  20. package/dist/umd/descope-password-index-js.js.map +1 -1
  21. package/dist/umd/descope-scopes-list-index-js.js +1 -1
  22. package/dist/umd/descope-scopes-list-index-js.js.map +1 -1
  23. package/dist/umd/descope-text-area-index-js.js +1 -1
  24. package/dist/umd/descope-text-area-index-js.js.map +1 -1
  25. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  26. package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -1
  27. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
  28. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
  29. package/package.json +4 -4
  30. package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +4 -1
  31. package/src/components/descope-new-password/NewPasswordClass.js +1 -0
  32. package/src/components/descope-passcode/PasscodeClass.js +5 -1
  33. package/src/components/descope-password/PasswordClass.js +2 -0
  34. package/src/components/descope-text-area/TextAreaClass.js +1 -0
  35. package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +1 -0
  36. package/src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"phone-fields-descope-phone-input-box-field-index-js.js","mappings":";gOAKO,MAAMA,GAAgB,QAAiB,kCAExCC,EAAqB,CACzB,WACA,OACA,WACA,0BACA,OACA,YACA,eACA,cAEIC,EAAW,CACf,0BAA2B,eAGvBC,GAAiB,OAAqB,CAAEH,gBAAeI,aAAc,QAsP3E,EApPA,cAAiCD,EAC/B,6BAAWF,GACT,MAAO,GAAGI,OAAOF,EAAeF,oBAAsB,GAAIA,EAC5D,CAEA,GAEA,WAAAK,GACEC,QAEAC,KAAKC,UAAY,kIAMjBD,KAAKE,UAAYF,KAAKG,cAAc,qBACtC,CAGA,uBAAIC,GACF,OAAOJ,KAAKE,UAAUG,WAAWF,cAAc,QACjD,CAEA,mBAAIG,GACF,OAAO,OAAmBN,KAAKO,aAAa,gBAC9C,CAEA,eAAIC,GACF,OAAOR,KAAKO,aAAa,eAC3B,CAEA,0BAAIE,GACF,MAAyD,SAAlDT,KAAKO,aAAa,2BAC3B,CAEA,aAAIG,GACF,OAAOC,SAASX,KAAKO,aAAa,aAAc,KAAO,CACzD,CAEA,aAAIK,GACF,OAAOD,SAASX,KAAKO,aAAa,aAAc,KAAO,EACzD,CAEA,qBAAIM,GACF,OAAOb,KAAKO,aAAa,uBAAuBO,MAAM,KAAKC,OAAOC,UAAY,EAChF,CAEA,iBAAIC,GACF,MAA6C,SAAtCjB,KAAKO,aAAa,eAC3B,CAEA,sBAAIW,GACF,MAAkD,SAA3ClB,KAAKO,aAAa,oBAC3B,CAEA,SAAIY,GACF,IA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GAAkBpL,SAAWsL,GAAmBtL,MAAM","sources":["webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/PhoneFieldInternalInputBox.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/index.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/index.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/TextFieldClass.js","webpack://@descope/web-components-ui/./src/components/phone-fields/helpers.js"],"sourcesContent":["import { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport { getComponentName } from '../../../../helpers/componentHelpers';\nimport { getCountryByCodeId, matchingParenthesis } from '../../helpers';\nimport parsePhoneNumberFromString, { AsYouType } from 'libphonenumber-js/min';\n\nexport const componentName = getComponentName('phone-field-internal-input-box');\n\nconst observedAttributes = [\n 'disabled',\n 'size',\n 'readonly',\n 'phone-input-placeholder',\n 'name',\n 'maxlength',\n 'autocomplete',\n 'label-type',\n];\nconst mapAttrs = {\n 'phone-input-placeholder': 'placeholder',\n};\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass PhoneFieldInternal extends BaseInputClass {\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], observedAttributes);\n }\n\n #ayt;\n\n constructor() {\n super();\n\n this.innerHTML = `\n <div>\n <descope-text-field tabindex=\"1\" type=\"tel\" bordered=\"false\"></descope-text-field>\n </div>\n `;\n\n this.textField = this.querySelector('descope-text-field');\n }\n\n // notice: this function is exposed in parent component\n get phoneNumberInputEle() {\n return this.textField.shadowRoot.querySelector('input');\n }\n\n get defaultDialCode() {\n return getCountryByCodeId(this.getAttribute('default-code'));\n }\n\n get defaultCode() {\n return this.getAttribute('default-code');\n }\n\n get allowAlphanumericInput() {\n return this.getAttribute('allow-alphanumeric-input') === 'true';\n }\n\n get minLength() {\n return parseInt(this.getAttribute('minlength'), 10) || 0;\n }\n\n get maxLength() {\n return parseInt(this.getAttribute('maxlength'), 10) || 50;\n }\n\n get restrictCountries() {\n return this.getAttribute('restrict-countries')?.split(',').filter(Boolean) || [];\n }\n\n get isFormatValue() {\n return this.getAttribute('format-value') === 'true';\n }\n\n get isStrictValidation() {\n return this.getAttribute('strict-validation') === 'true';\n }\n\n get value() {\n if (!this.textField.value) return '';\n\n if (!this.isStrictValidation) {\n return this.#nonParsedValue();\n }\n\n const parsedVal = this.#parseWithCountryCode();\n\n if (parsedVal?.country && parsedVal?.countryCallingCode && parsedVal?.nationalNumber) {\n return `+${[parsedVal?.countryCallingCode, parsedVal?.nationalNumber].join('-')}`;\n }\n\n // if failed to parse or to find country code return text field value\n return this.textField.value;\n }\n\n set value(val) {\n this.textField.value = val;\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n // We want to ignore focus events we are dispatching\n if (e.isTrusted) this.textField.focus();\n });\n\n super.init?.();\n\n this.textField.addEventListener('input', this.#onInput.bind(this));\n this.handleFocusEventsDispatching([this.textField]);\n }\n\n getValidity() {\n const validPhonePattern = /^\\+?\\d{1,4}-?(?:\\d-?){1,15}$/;\n const stripValue = this.#sanitizeVal(this.textField.value || '');\n\n if (this.isRequired && !this.textField.value) {\n return { valueMissing: true };\n }\n\n if (this.textField.value) {\n if (stripValue.length < this.minLength) {\n return { tooShort: true };\n }\n\n if (\n // has `strict-validation` and not properly parsed\n (this.isStrictValidation && this.textField.value && !this.#isValidParsedValue()) ||\n // if no `strict-validation` then conform with naive pattern\n (!this.isStrictValidation && this.textField.value && !validPhonePattern.test(this.value))\n ) {\n return { patternMismatch: true };\n }\n }\n\n return {};\n }\n\n setSelectionRange(...args) {\n this.textField.setSelectionRange(...args);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback(attrName, oldValue, newValue);\n\n if (oldValue !== newValue && observedAttributes.includes(attrName)) {\n const attr = mapAttrs[attrName] || attrName;\n this.textField.setAttribute(attr, newValue);\n }\n }\n\n #onInput(e) {\n let sanitizedInput = this.#sanitizeInput(e.target.value);\n\n if (this.isFormatValue && this.#canFormat(sanitizedInput)) {\n sanitizedInput = this.#formatPhoneNumber(sanitizedInput);\n }\n\n e.target.value = sanitizedInput;\n }\n\n #nonParsedValue() {\n if (!this.defaultDialCode) {\n return this.textField.value;\n }\n\n const nationalNumber = this.#trimDuplicateCountryCode(this.textField.value);\n const sanitizedVal = this.#sanitizeVal(nationalNumber);\n\n return [this.defaultDialCode, sanitizedVal].join('-');\n }\n\n #parseWithCountryCode() {\n if (this.defaultDialCode) {\n return parsePhoneNumberFromString(\n [this.defaultDialCode, this.#sanitizeVal(this.textField.value)].filter(Boolean).join('')\n );\n }\n\n // if default-code or not parsed - try to extract country code from value\n return parsePhoneNumberFromString(this.textField.value);\n }\n\n #sanitizeVal(val) {\n return val.replace(/\\D/g, '');\n }\n\n #trimDuplicateCountryCode(val) {\n if (this.textField.value?.[0] === '+') {\n const dialCodePrefixPattern = new RegExp(`^\\\\${this.defaultDialCode}`);\n const trimmed = val.replace(dialCodePrefixPattern, '');\n return trimmed;\n }\n return val;\n }\n\n #isValidParsedValue() {\n const parsed = parsePhoneNumberFromString(this.value);\n return (\n !!parsed && // parsed successfully (not undefined)\n !!parsed.isValid?.() && // Parsed object is valid\n !!parsed.country && // Parsed object with a country code\n !!this.#isAllowedCountry(parsed.country) && // Parsed with allowed country code\n (this.defaultCode ? this.defaultCode === parsed.country : true) // In case default country code is set validate parsed country matches it\n );\n }\n\n #isAllowedCountry(countryCode) {\n if (!this.restrictCountries.length) {\n return true;\n }\n\n return this.restrictCountries.includes(countryCode);\n }\n\n #sanitizeInput(val) {\n val = val\n .replace(/^-+/, '') // dash as first char\n .replace(/(?!^)\\+/g, '') // multiple plus symbols\n .replace('--', '-') // consecutive dashes\n .replace('+-', '+'); // dash following plus symbol\n\n if (!this.allowAlphanumericInput) {\n const telDigitsRegExp = /^[+\\d-\\(\\)]+$/;\n val = val\n .split('')\n .filter((char) => telDigitsRegExp.test(char))\n .join('');\n }\n\n return val;\n }\n\n #formatPhoneNumber(phoneNumber = '') {\n // Get country code from `default-code or` from phone number\n const countryCode = this.defaultCode || this.#getCountryCodeFromValue(phoneNumber);\n\n // Skip formatting if no country code is available\n if (!countryCode) {\n return phoneNumber;\n }\n\n // Update AsYouType country code if needed\n if (!this.#ayt || this.#ayt.country !== countryCode) {\n this.#ayt = new AsYouType(countryCode);\n }\n\n // We need to reset AsYouType instance before setting new input\n this.#ayt.reset();\n\n // Set AsYouType input\n const formattedVal = this.#ayt.input(phoneNumber) || phoneNumber;\n\n return formattedVal;\n }\n\n #getCountryCodeFromValue(val) {\n const parsed = parsePhoneNumberFromString(val);\n return parsed?.country || '';\n }\n\n #canFormat(val) {\n if (!matchingParenthesis(val)) return false;\n return true;\n }\n}\n\nexport default PhoneFieldInternal;\n","import { componentName as descopeInternalComponentName } from './descope-phone-input-box-internal/PhoneFieldInternalInputBox';\nimport { forwardAttrs, getComponentName } from '../../../helpers/componentHelpers';\nimport { compose } from '../../../helpers';\nimport {\n createProxy,\n createStyleMixin,\n draggableMixin,\n inputOverrideValidConstraintsMixin,\n proxyInputMixin,\n} from '../../../mixins';\nimport { TextFieldClass } from '../../descope-text-field/TextFieldClass';\nimport CountryCodes from '../CountryCodes';\nimport {\n resetInputLabelPosition,\n resetInputCursor,\n resetInputFieldDefaultWidth,\n resetInputFieldInvalidBackgroundColor,\n useHostExternalPadding,\n inputFloatingLabelStyle,\n} from '../../../helpers/themeHelpers/resetHelpers';\n\nconst textVars = TextFieldClass.cssVarList;\n\nexport const componentName = getComponentName('phone-input-box-field');\n\nconst customMixin = (superclass) =>\n class PhoneFieldInputBoxMixinClass extends superclass {\n static get CountryCodes() {\n return CountryCodes;\n }\n\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n\n template.innerHTML = `\n\t\t\t\t<${descopeInternalComponentName}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\tslot=\"input\"\n\t\t\t\t></${descopeInternalComponentName}>\n `;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n\n forwardAttrs(this.shadowRoot.host, this.inputElement, {\n includeAttrs: [\n 'size',\n 'minlength',\n 'maxlength',\n 'default-code',\n 'disabled',\n 'phone-input-placeholder',\n 'label',\n 'label-type',\n 'allow-alphanumeric-input',\n 'restrict-countries',\n 'format-value',\n 'strict-validation',\n 'data-errormessage-type-mismatch',\n ],\n });\n }\n\n get phoneNumberInputEle() {\n return this.inputElement?.phoneNumberInputEle;\n }\n };\n\nconst {\n host,\n label,\n inputElement,\n requiredIndicator,\n inputField,\n internalComponent,\n internalComponentAfter,\n phoneInput,\n errorMessage,\n helperText,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n placeholder: { selector: '> input:placeholder-shown' },\n inputElement: { selector: 'input' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n inputField: { selector: () => 'vaadin-text-field::part(input-field)' },\n internalComponent: {\n selector: 'descope-phone-field-internal-input-box',\n },\n internalComponentAfter: {\n selector: 'descope-phone-field-internal-input-box::after',\n },\n phoneInput: { selector: () => 'descope-text-field' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const PhoneFieldInputBoxClass = compose(\n createStyleMixin({\n mappings: {\n fontSize: [\n host,\n inputField,\n {\n selector: TextFieldClass.componentName,\n property: TextFieldClass.cssVarList.fontSize,\n },\n ],\n fontFamily: [label, errorMessage, helperText],\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n\n inputHorizontalPadding: [\n { ...phoneInput, property: 'padding-left' },\n { ...phoneInput, property: 'padding-right' },\n ],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n ],\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n inputValueTextColor: { ...phoneInput, property: textVars.inputValueTextColor },\n\n inputPlaceholderTextColor: { ...phoneInput, property: textVars.inputPlaceholderColor },\n\n inputBorderStyle: { ...internalComponentAfter, property: 'border-style' },\n inputBorderWidth: { ...internalComponentAfter, property: 'border-width' },\n inputBorderColor: { ...internalComponentAfter, property: 'border-color' },\n inputBorderRadius: [\n { ...internalComponent, property: 'border-radius' },\n { ...internalComponentAfter, property: 'border-radius' },\n ],\n\n inputOutlineStyle: { ...internalComponent, property: 'outline-style' },\n inputOutlineColor: { ...internalComponent, property: 'outline-color' },\n inputOutlineWidth: { ...internalComponent, property: 'outline-width' },\n inputOutlineOffset: { ...internalComponent, property: 'outline-offset' },\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n valueInputHeight: { ...inputElement, property: 'height' },\n valueInputMarginBottom: {\n selector: TextFieldClass.componentName,\n property: textVars.valueInputMarginBottom,\n },\n },\n }),\n draggableMixin,\n inputOverrideValidConstraintsMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n customMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n :host {\n display: inline-flex;\n max-width: 100%;\n box-sizing: border-box;\n }\n ${useHostExternalPadding(PhoneFieldInputBoxClass.cssVarList)}\n ${resetInputCursor('vaadin-text-field')}\n ${resetInputFieldInvalidBackgroundColor('vaadin-text-field')}\n ${resetInputFieldDefaultWidth()}\n\n vaadin-text-field {\n width: 100%;\n box-sizing: border-box;\n padding: 0;\n }\n vaadin-text-field[focus-ring]::part(input-field) {\n box-shadow: none;\n }\n vaadin-text-field::before {\n height: 0;\n }\n vaadin-text-field::part(input-field) {\n padding: 0;\n background: transparent;\n -webkit-mask-image: none;\n }\n descope-phone-field-internal-input-box {\n -webkit-mask-image: none;\n padding: 0;\n width: 100%;\n }\n descope-phone-field-internal-input-box > div {\n width: 100%;\n }\n descope-phone-field-internal-input-box descope-text-field {\n ${textVars.inputOutlineWidth}: 0;\n ${textVars.inputOutlineOffset}: 0;\n }\n descope-phone-field-internal-input-box::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n pointer-events: none;\n }\n descope-text-field {\n flex-grow: 1;\n width: 100%;\n direction: ltr;\n }\n vaadin-text-field[readonly] > input:placeholder-shown {\n opacity: 1;\n }\n vaadin-text-field::part(input-field)::after {\n border: none;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] input:placeholder-shown {\n opacity: 0;\n }\n\n ${resetInputLabelPosition('vaadin-text-field')}\n ${inputFloatingLabelStyle()}\n\t\t`,\n excludeAttrsSync: ['tabindex'],\n componentName,\n })\n);\n\nexport default PhoneFieldInputBoxClass;\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","import '@vaadin/text-field';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, TextFieldClass } from './TextFieldClass';\n\ncustomElements.define(componentName, TextFieldClass);\n\nexport { TextFieldClass, componentName };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputController } from '@vaadin/field-base/src/input-controller.js';\nimport { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js';\nimport { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';\n\n/**\n * A mixin providing common text field functionality.\n *\n * @polymerMixin\n * @mixes InputFieldMixin\n */\nexport const TextFieldMixin = (superClass) =>\n class TextFieldMixinClass extends InputFieldMixin(superClass) {\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n\n /**\n * A regular expression that the value is checked against.\n * The pattern must match the entire value, not just some subset.\n */\n pattern: {\n type: String,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'maxlength', 'minlength', 'pattern'];\n }\n\n static get constraints() {\n return [...super.constraints, 'maxlength', 'minlength', 'pattern'];\n }\n\n constructor() {\n super();\n this._setType('text');\n }\n\n /** @protected */\n get clearElement() {\n return this.$.clearButton;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(\n new InputController(this, (input) => {\n this._setInputElement(input);\n this._setFocusElement(input);\n this.stateTarget = input;\n this.ariaTarget = input;\n }),\n );\n this.addController(new LabelledInputController(this.inputElement, this._labelController));\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/src/vaadin-input-container.js';\nimport { html, PolymerElement } from '@polymer/polymer';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { TextFieldMixin } from './vaadin-text-field-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, { moduleId: 'vaadin-text-field-styles' });\n\n/**\n * `<vaadin-text-field>` is a web component that allows the user to input and edit text.\n *\n * ```html\n * <vaadin-text-field label=\"First Name\"></vaadin-text-field>\n * ```\n *\n * ### Prefixes and suffixes\n *\n * These are child elements of a `<vaadin-text-field>` that are displayed\n * inline with the input, before or after.\n * In order for an element to be considered as a prefix, it must have the slot\n * attribute set to `prefix` (and similarly for `suffix`).\n *\n * ```html\n * <vaadin-text-field label=\"Email address\">\n * <div slot=\"prefix\">Sent to:</div>\n * <div slot=\"suffix\">@vaadin.com</div>\n * </vaadin-text-field>\n * ```\n *\n * ### Styling\n *\n * The following custom properties are available for styling:\n *\n * Custom property | Description | Default\n * -------------------------------|----------------------------|---------\n * `--vaadin-field-default-width` | Default width of the field | `12em`\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ---------------------|----------------\n * `label` | The label element\n * `input-field` | The element that wraps prefix, value and suffix\n * `clear-button` | The clear button\n * `error-message` | The error message element\n * `helper-text` | The helper text element wrapper\n * `required-indicator` | The `required` state indicator element\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description | Part name\n * --------------------|-------------|------------\n * `disabled` | Set to a disabled text field | :host\n * `has-value` | Set when the element has a value | :host\n * `has-label` | Set when the element has a label | :host\n * `has-helper` | Set when the element has helper text or slot | :host\n * `has-error-message` | Set when the element has an error message | :host\n * `invalid` | Set when the element is invalid | :host\n * `input-prevented` | Temporarily set when invalid input is prevented | :host\n * `focused` | Set when the element is focused | :host\n * `focus-ring` | Set when the element is keyboard focused | :host\n * `readonly` | Set to a readonly text field | :host\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ElementMixin\n * @mixes ThemableMixin\n * @mixes TextFieldMixin\n */\nexport class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(PolymerElement))) {\n static get is() {\n return 'vaadin-text-field';\n }\n\n static get template() {\n return html`\n <style>\n [part='input-field'] {\n flex-grow: 0;\n }\n </style>\n\n <div class=\"vaadin-field-container\">\n <div part=\"label\">\n <slot name=\"label\"></slot>\n <span part=\"required-indicator\" aria-hidden=\"true\" on-click=\"focus\"></span>\n </div>\n\n <vaadin-input-container\n part=\"input-field\"\n readonly=\"[[readonly]]\"\n disabled=\"[[disabled]]\"\n invalid=\"[[invalid]]\"\n theme$=\"[[_theme]]\"\n >\n <slot name=\"prefix\" slot=\"prefix\"></slot>\n <slot name=\"input\"></slot>\n <slot name=\"suffix\" slot=\"suffix\"></slot>\n <div id=\"clearButton\" part=\"clear-button\" slot=\"suffix\" aria-hidden=\"true\"></div>\n </vaadin-input-container>\n\n <div part=\"helper-text\">\n <slot name=\"helper\"></slot>\n </div>\n\n <div part=\"error-message\">\n <slot name=\"error-message\"></slot>\n </div>\n </div>\n <slot name=\"tooltip\"></slot>\n `;\n }\n\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n };\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this._tooltipController.setPosition('top');\n this._tooltipController.setAriaTarget(this.inputElement);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(TextField);\n","import './descope-phone-input-box-internal';\nimport '../../descope-text-field';\n\nimport { componentName, PhoneFieldInputBoxClass } from './PhoneFieldInputBoxClass';\n\ncustomElements.define(componentName, PhoneFieldInputBoxClass);\n\nexport { PhoneFieldInputBoxClass, componentName };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputControlMixin } from './input-control-mixin.js';\n\n/**\n * A mixin to provide logic for vaadin-text-field and related components.\n *\n * @polymerMixin\n * @mixes InputControlMixin\n */\nexport const InputFieldMixin = (superclass) =>\n class InputFieldMixinClass extends InputControlMixin(superclass) {\n static get properties() {\n return {\n /**\n * Whether the value of the control can be automatically completed by the browser.\n * List of available options at:\n * https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete\n */\n autocomplete: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari that is used to control whether\n * autocorrection should be enabled when the user is entering/editing the text.\n * Possible values are:\n * on: Enable autocorrection.\n * off: Disable autocorrection.\n */\n autocorrect: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari and Chrome that is used to control whether\n * autocapitalization should be enabled when the user is entering/editing the text.\n * Possible values are:\n * characters: Characters capitalization.\n * words: Words capitalization.\n * sentences: Sentences capitalization.\n * none: No capitalization.\n */\n autocapitalize: {\n type: String,\n reflectToAttribute: true,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'autocapitalize', 'autocomplete', 'autocorrect'];\n }\n\n // Workaround for https://github.com/Polymer/polymer/issues/5259\n get __data() {\n return this.__dataValue || {};\n }\n\n set __data(value) {\n this.__dataValue = value;\n }\n\n /**\n * @param {HTMLElement} input\n * @protected\n * @override\n */\n _inputElementChanged(input) {\n super._inputElementChanged(input);\n\n if (input) {\n // Discard value set on the custom slotted input.\n if (input.value && input.value !== this.value) {\n console.warn(`Please define value on the <${this.localName}> component!`);\n input.value = '';\n }\n\n if (this.value) {\n input.value = this.value;\n }\n }\n }\n\n /**\n * Override an event listener from `FocusMixin`.\n * @param {boolean} focused\n * @protected\n * @override\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n // Do not validate when focusout is caused by document\n // losing focus, which happens on browser tab switch.\n if (!focused && document.hasFocus()) {\n this.validate();\n }\n }\n\n /**\n * Override an event listener from `InputMixin`\n * to mark as valid after user started typing.\n * @param {Event} event\n * @protected\n * @override\n */\n _onInput(event) {\n super._onInput(event);\n\n if (this.invalid) {\n this.validate();\n }\n }\n\n /**\n * Override an observer from `InputMixin` to validate the field\n * when a new value is set programmatically.\n *\n * @param {string | undefined} newValue\n * @param {string | undefined} oldValue\n * @protected\n * @override\n */\n _valueChanged(newValue, oldValue) {\n super._valueChanged(newValue, oldValue);\n\n if (oldValue === undefined) {\n return;\n }\n\n if (this.invalid) {\n this.validate();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, {\n moduleId: 'lumo-text-field-styles',\n});\n","import '../../../descope-text-field';\n\nimport PhoneFieldInternalInputBox, { componentName } from './PhoneFieldInternalInputBox';\n\ncustomElements.define(componentName, PhoneFieldInternalInputBox);\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../mixins';\nimport textFieldMappings from './textFieldMappings';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n ...iconInitConfig,\n });\n\n this.baseElement.appendChild(this.icon);\n this.icon.addEventListener('click', () => {\n navigator.clipboard.writeText(this.value);\n Object.assign(this.icon, iconCopiedConfig);\n\n // we want the icon to go back to the initial state after 5 seconds\n setTimeout(() => {\n Object.assign(this.icon, iconInitConfig);\n }, 5000);\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import parsePhoneNumberFromString from 'libphonenumber-js/min';\nimport CountryCodes from './CountryCodes';\n\nexport const getCountryByCodeId = (countryCode) => {\n return CountryCodes.find((c) => c.code === countryCode)?.dialCode;\n};\n\nexport const matchingParenthesis = (val) => {\n const openParenMatches = val.match(/\\(/g);\n const closeParenMatches = val.match(/\\)/g);\n return openParenMatches?.length === closeParenMatches?.length;\n};\n"],"names":["componentName","observedAttributes","mapAttrs","BaseInputClass","baseSelector","concat","constructor","super","this","innerHTML","textField","querySelector","phoneNumberInputEle","shadowRoot","defaultDialCode","getAttribute","defaultCode","allowAlphanumericInput","minLength","parseInt","maxLength","restrictCountries","split","filter","Boolean","isFormatValue","isStrictValidation","value","parsedVal","country","countryCallingCode","nationalNumber","join","val","init","addEventListener","e","isTrusted","focus","bind","handleFocusEventsDispatching","getValidity","validPhonePattern","stripValue","isRequired","valueMissing","length","tooShort","test","patternMismatch","setSelectionRange","args","attributeChangedCallback","attrName","oldValue","newValue","includes","attr","setAttribute","sanitizedInput","target","sanitizedVal","replace","dialCodePrefixPattern","RegExp","parsed","isValid","countryCode","telDigitsRegExp","char","phoneNumber","reset","input","textVars","cssVarList","host","label","inputElement","requiredIndicator","inputField","internalComponent","internalComponentAfter","phoneInput","errorMessage","helperText","selector","placeholder","PhoneFieldInputBoxClass","mappings","fontSize","property","fontFamily","hostWidth","hostMinWidth","hostDirection","inputHorizontalPadding","labelFontSize","labelFontWeight","labelTextColor","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","inputValueTextColor","inputPlaceholderTextColor","inputPlaceholderColor","inputBorderStyle","inputBorderWidth","inputBorderColor","inputBorderRadius","inputOutlineStyle","inputOutlineColor","inputOutlineWidth","inputOutlineOffset","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","valueInputHeight","valueInputMarginBottom","proxyProps","superclass","CountryCodes","template","document","createElement","baseElement","appendChild","content","cloneNode","includeAttrs","slots","wrappedEleName","style","excludeAttrsSync","InputController","callback","initializer","node","type","id","defaultId","useUniqueId","customElements","define","TextFieldMixin","superClass","properties","maxlength","Number","minlength","pattern","String","delegateAttrs","constraints","_setType","clearElement","$","clearButton","ready","addController","_setInputElement","_setFocusElement","stateTarget","ariaTarget","_labelController","moduleId","TextField","is","_tooltipController","setPosition","setAriaTarget","InputFieldMixin","autocomplete","autocorrect","autocapitalize","reflectToAttribute","__data","__dataValue","_inputElementChanged","console","warn","localName","_setFocused","focused","hasFocus","validate","_onInput","event","invalid","_valueChanged","undefined","observedAttrs","TextFieldClass","useProxyTargets","icon","renderCopyToClipboard","shouldRender","remove","iconInitConfig","title","iconCopiedConfig","Object","assign","slot","navigator","clipboard","writeText","setTimeout","onLabelClick","oldVal","newVal","attributeChangeCallback","removeEventListener","getCountryByCodeId","find","c","code","dialCode","matchingParenthesis","openParenMatches","match","closeParenMatches"],"sourceRoot":""}
1
+ {"version":3,"file":"phone-fields-descope-phone-input-box-field-index-js.js","mappings":";gOAKO,MAAMA,GAAgB,QAAiB,kCAExCC,EAAqB,CACzB,WACA,OACA,WACA,0BACA,OACA,YACA,eACA,cAEIC,EAAW,CACf,0BAA2B,eAGvBC,GAAiB,OAAqB,CAAEH,gBAAeI,aAAc,QAsP3E,EApPA,cAAiCD,EAC/B,6BAAWF,GACT,MAAO,GAAGI,OAAOF,EAAeF,oBAAsB,GAAIA,EAC5D,CAEA,GAEA,WAAAK,GACEC,QAEAC,KAAKC,UAAY,kIAMjBD,KAAKE,UAAYF,KAAKG,cAAc,qBACtC,CAGA,uBAAIC,GACF,OAAOJ,KAAKE,UAAUG,WAAWF,cAAc,QACjD,CAEA,mBAAIG,GACF,OAAO,OAAmBN,KAAKO,aAAa,gBAC9C,CAEA,eAAIC,GACF,OAAOR,KAAKO,aAAa,eAC3B,CAEA,0BAAIE,GACF,MAAyD,SAAlDT,KAAKO,aAAa,2BAC3B,CAEA,aAAIG,GACF,OAAOC,SAASX,KAAKO,aAAa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,EAAe7H,WAAW2C,+cAc5B,QAAwB,gCAC3B,QAAuBkF,EAAe7H,uBACtC,QAAoB,oBAAqB6H,EAAe7H,uBACrD,iGAMJkE,iBAAkB,CAAC,WAAY,SAC/B5I,4ECxIG,MAAM4N,EAAsBzJ,GAC1B,IAAa0J,MAAMC,GAAMA,EAAEC,OAAS5J,KAAc6J,SAG9CC,EAAuBhM,IAClC,MAAMiM,EAAmBjM,EAAIkM,MAAM,OAC7BC,EAAoBnM,EAAIkM,MAAM,OACpC,OAAOD,GAAkBpL,SAAWsL,GAAmBtL,MAAM","sources":["webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/PhoneFieldInternalInputBox.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/index.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/index.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/TextFieldClass.js","webpack://@descope/web-components-ui/./src/components/phone-fields/helpers.js"],"sourcesContent":["import { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport { getComponentName } from '../../../../helpers/componentHelpers';\nimport { getCountryByCodeId, matchingParenthesis } from '../../helpers';\nimport parsePhoneNumberFromString, { AsYouType } from 'libphonenumber-js/min';\n\nexport const componentName = getComponentName('phone-field-internal-input-box');\n\nconst observedAttributes = [\n 'disabled',\n 'size',\n 'readonly',\n 'phone-input-placeholder',\n 'name',\n 'maxlength',\n 'autocomplete',\n 'label-type',\n];\nconst mapAttrs = {\n 'phone-input-placeholder': 'placeholder',\n};\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass PhoneFieldInternal extends BaseInputClass {\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], observedAttributes);\n }\n\n #ayt;\n\n constructor() {\n super();\n\n this.innerHTML = `\n <div>\n <descope-text-field tabindex=\"1\" type=\"tel\" bordered=\"false\"></descope-text-field>\n </div>\n `;\n\n this.textField = this.querySelector('descope-text-field');\n }\n\n // notice: this function is exposed in parent component\n get phoneNumberInputEle() {\n return this.textField.shadowRoot.querySelector('input');\n }\n\n get defaultDialCode() {\n return getCountryByCodeId(this.getAttribute('default-code'));\n }\n\n get defaultCode() {\n return this.getAttribute('default-code');\n }\n\n get allowAlphanumericInput() {\n return this.getAttribute('allow-alphanumeric-input') === 'true';\n }\n\n get minLength() {\n return parseInt(this.getAttribute('minlength'), 10) || 0;\n }\n\n get maxLength() {\n return parseInt(this.getAttribute('maxlength'), 10) || 50;\n }\n\n get restrictCountries() {\n return this.getAttribute('restrict-countries')?.split(',').filter(Boolean) || [];\n }\n\n get isFormatValue() {\n return this.getAttribute('format-value') === 'true';\n }\n\n get isStrictValidation() {\n return this.getAttribute('strict-validation') === 'true';\n }\n\n get value() {\n if (!this.textField.value) return '';\n\n if (!this.isStrictValidation) {\n return this.#nonParsedValue();\n }\n\n const parsedVal = this.#parseWithCountryCode();\n\n if (parsedVal?.country && parsedVal?.countryCallingCode && parsedVal?.nationalNumber) {\n return `+${[parsedVal?.countryCallingCode, parsedVal?.nationalNumber].join('-')}`;\n }\n\n // if failed to parse or to find country code return text field value\n return this.textField.value;\n }\n\n set value(val) {\n this.textField.value = val;\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n // We want to ignore focus events we are dispatching\n if (e.isTrusted) this.textField.focus();\n });\n\n super.init?.();\n\n this.textField.addEventListener('input', this.#onInput.bind(this));\n this.handleFocusEventsDispatching([this.textField]);\n }\n\n getValidity() {\n const validPhonePattern = /^\\+?\\d{1,4}-?(?:\\d-?){1,15}$/;\n const stripValue = this.#sanitizeVal(this.textField.value || '');\n\n if (this.isRequired && !this.textField.value) {\n return { valueMissing: true };\n }\n\n if (this.textField.value) {\n if (stripValue.length < this.minLength) {\n return { tooShort: true };\n }\n\n if (\n // has `strict-validation` and not properly parsed\n (this.isStrictValidation && this.textField.value && !this.#isValidParsedValue()) ||\n // if no `strict-validation` then conform with naive pattern\n (!this.isStrictValidation && this.textField.value && !validPhonePattern.test(this.value))\n ) {\n return { patternMismatch: true };\n }\n }\n\n return {};\n }\n\n setSelectionRange(...args) {\n this.textField.setSelectionRange(...args);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback(attrName, oldValue, newValue);\n\n if (oldValue !== newValue && observedAttributes.includes(attrName)) {\n const attr = mapAttrs[attrName] || attrName;\n this.textField.setAttribute(attr, newValue);\n }\n }\n\n #onInput(e) {\n let sanitizedInput = this.#sanitizeInput(e.target.value);\n\n if (this.isFormatValue && this.#canFormat(sanitizedInput)) {\n sanitizedInput = this.#formatPhoneNumber(sanitizedInput);\n }\n\n e.target.value = sanitizedInput;\n }\n\n #nonParsedValue() {\n if (!this.defaultDialCode) {\n return this.textField.value;\n }\n\n const nationalNumber = this.#trimDuplicateCountryCode(this.textField.value);\n const sanitizedVal = this.#sanitizeVal(nationalNumber);\n\n return [this.defaultDialCode, sanitizedVal].join('-');\n }\n\n #parseWithCountryCode() {\n if (this.defaultDialCode) {\n return parsePhoneNumberFromString(\n [this.defaultDialCode, this.#sanitizeVal(this.textField.value)].filter(Boolean).join('')\n );\n }\n\n // if default-code or not parsed - try to extract country code from value\n return parsePhoneNumberFromString(this.textField.value);\n }\n\n #sanitizeVal(val) {\n return val.replace(/\\D/g, '');\n }\n\n #trimDuplicateCountryCode(val) {\n if (this.textField.value?.[0] === '+') {\n const dialCodePrefixPattern = new RegExp(`^\\\\${this.defaultDialCode}`);\n const trimmed = val.replace(dialCodePrefixPattern, '');\n return trimmed;\n }\n return val;\n }\n\n #isValidParsedValue() {\n const parsed = parsePhoneNumberFromString(this.value);\n return (\n !!parsed && // parsed successfully (not undefined)\n !!parsed.isValid?.() && // Parsed object is valid\n !!parsed.country && // Parsed object with a country code\n !!this.#isAllowedCountry(parsed.country) && // Parsed with allowed country code\n (this.defaultCode ? this.defaultCode === parsed.country : true) // In case default country code is set validate parsed country matches it\n );\n }\n\n #isAllowedCountry(countryCode) {\n if (!this.restrictCountries.length) {\n return true;\n }\n\n return this.restrictCountries.includes(countryCode);\n }\n\n #sanitizeInput(val) {\n val = val\n .replace(/^-+/, '') // dash as first char\n .replace(/(?!^)\\+/g, '') // multiple plus symbols\n .replace('--', '-') // consecutive dashes\n .replace('+-', '+'); // dash following plus symbol\n\n if (!this.allowAlphanumericInput) {\n const telDigitsRegExp = /^[+\\d-\\(\\)]+$/;\n val = val\n .split('')\n .filter((char) => telDigitsRegExp.test(char))\n .join('');\n }\n\n return val;\n }\n\n #formatPhoneNumber(phoneNumber = '') {\n // Get country code from `default-code or` from phone number\n const countryCode = this.defaultCode || this.#getCountryCodeFromValue(phoneNumber);\n\n // Skip formatting if no country code is available\n if (!countryCode) {\n return phoneNumber;\n }\n\n // Update AsYouType country code if needed\n if (!this.#ayt || this.#ayt.country !== countryCode) {\n this.#ayt = new AsYouType(countryCode);\n }\n\n // We need to reset AsYouType instance before setting new input\n this.#ayt.reset();\n\n // Set AsYouType input\n const formattedVal = this.#ayt.input(phoneNumber) || phoneNumber;\n\n return formattedVal;\n }\n\n #getCountryCodeFromValue(val) {\n const parsed = parsePhoneNumberFromString(val);\n return parsed?.country || '';\n }\n\n #canFormat(val) {\n if (!matchingParenthesis(val)) return false;\n return true;\n }\n}\n\nexport default PhoneFieldInternal;\n","import { componentName as descopeInternalComponentName } from './descope-phone-input-box-internal/PhoneFieldInternalInputBox';\nimport { forwardAttrs, getComponentName } from '../../../helpers/componentHelpers';\nimport { compose } from '../../../helpers';\nimport {\n createProxy,\n createStyleMixin,\n draggableMixin,\n inputOverrideValidConstraintsMixin,\n proxyInputMixin,\n} from '../../../mixins';\nimport { TextFieldClass } from '../../descope-text-field/TextFieldClass';\nimport CountryCodes from '../CountryCodes';\nimport {\n resetInputLabelPosition,\n resetInputCursor,\n resetInputFieldDefaultWidth,\n resetInputFieldInvalidBackgroundColor,\n useHostExternalPadding,\n inputFloatingLabelStyle,\n} from '../../../helpers/themeHelpers/resetHelpers';\n\nconst textVars = TextFieldClass.cssVarList;\n\nexport const componentName = getComponentName('phone-input-box-field');\n\nconst customMixin = (superclass) =>\n class PhoneFieldInputBoxMixinClass extends superclass {\n static get CountryCodes() {\n return CountryCodes;\n }\n\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n\n template.innerHTML = `\n\t\t\t\t<${descopeInternalComponentName}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\tslot=\"input\"\n\t\t\t\t></${descopeInternalComponentName}>\n `;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n\n forwardAttrs(this.shadowRoot.host, this.inputElement, {\n includeAttrs: [\n 'size',\n 'minlength',\n 'maxlength',\n 'default-code',\n 'disabled',\n 'phone-input-placeholder',\n 'label',\n 'label-type',\n 'allow-alphanumeric-input',\n 'restrict-countries',\n 'format-value',\n 'strict-validation',\n 'data-errormessage-type-mismatch',\n ],\n });\n }\n\n get phoneNumberInputEle() {\n return this.inputElement?.phoneNumberInputEle;\n }\n };\n\nconst {\n host,\n label,\n inputElement,\n requiredIndicator,\n inputField,\n internalComponent,\n internalComponentAfter,\n phoneInput,\n errorMessage,\n helperText,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n placeholder: { selector: '> input:placeholder-shown' },\n inputElement: { selector: 'input' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n inputField: { selector: () => 'vaadin-text-field::part(input-field)' },\n internalComponent: {\n selector: 'descope-phone-field-internal-input-box',\n },\n internalComponentAfter: {\n selector: 'descope-phone-field-internal-input-box::after',\n },\n phoneInput: { selector: () => 'descope-text-field' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const PhoneFieldInputBoxClass = compose(\n createStyleMixin({\n mappings: {\n fontSize: [\n host,\n inputField,\n {\n selector: TextFieldClass.componentName,\n property: TextFieldClass.cssVarList.fontSize,\n },\n ],\n fontFamily: [label, errorMessage, helperText],\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n\n inputHorizontalPadding: [\n { ...phoneInput, property: 'padding-left' },\n { ...phoneInput, property: 'padding-right' },\n ],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n labelTextColor: [\n { ...label, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: 'color' },\n ],\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n inputValueTextColor: { ...phoneInput, property: textVars.inputValueTextColor },\n\n inputPlaceholderTextColor: { ...phoneInput, property: textVars.inputPlaceholderColor },\n\n inputBorderStyle: { ...internalComponentAfter, property: 'border-style' },\n inputBorderWidth: { ...internalComponentAfter, property: 'border-width' },\n inputBorderColor: { ...internalComponentAfter, property: 'border-color' },\n inputBorderRadius: [\n { ...internalComponent, property: 'border-radius' },\n { ...internalComponentAfter, property: 'border-radius' },\n ],\n\n inputOutlineStyle: { ...internalComponent, property: 'outline-style' },\n inputOutlineColor: { ...internalComponent, property: 'outline-color' },\n inputOutlineWidth: { ...internalComponent, property: 'outline-width' },\n inputOutlineOffset: { ...internalComponent, property: 'outline-offset' },\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n valueInputHeight: { ...inputElement, property: 'height' },\n valueInputMarginBottom: {\n selector: TextFieldClass.componentName,\n property: textVars.valueInputMarginBottom,\n },\n },\n }),\n draggableMixin,\n inputOverrideValidConstraintsMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n customMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n :host {\n display: inline-flex;\n max-width: 100%;\n box-sizing: border-box;\n }\n ${useHostExternalPadding(PhoneFieldInputBoxClass.cssVarList)}\n ${resetInputCursor('vaadin-text-field')}\n ${resetInputFieldInvalidBackgroundColor('vaadin-text-field')}\n ${resetInputFieldDefaultWidth()}\n\n vaadin-text-field {\n width: 100%;\n box-sizing: border-box;\n padding: 0;\n }\n vaadin-text-field[focus-ring]::part(input-field) {\n box-shadow: none;\n }\n vaadin-text-field::before {\n height: 0;\n }\n vaadin-text-field::part(input-field) {\n padding: 0;\n background: transparent;\n -webkit-mask-image: none;\n }\n descope-phone-field-internal-input-box {\n -webkit-mask-image: none;\n padding: 0;\n width: 100%;\n }\n descope-phone-field-internal-input-box > div {\n width: 100%;\n }\n descope-phone-field-internal-input-box descope-text-field {\n ${textVars.inputOutlineWidth}: 0;\n ${textVars.inputOutlineOffset}: 0;\n }\n descope-phone-field-internal-input-box::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n pointer-events: none;\n }\n descope-text-field {\n flex-grow: 1;\n width: 100%;\n direction: ltr;\n }\n vaadin-text-field[readonly] > input:placeholder-shown {\n opacity: 1;\n }\n vaadin-text-field::part(input-field)::after {\n border: none;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] input:placeholder-shown {\n opacity: 0;\n }\n\n ${resetInputLabelPosition('vaadin-text-field')}\n ${inputFloatingLabelStyle()}\n\t\t`,\n excludeAttrsSync: ['tabindex'],\n componentName,\n })\n);\n\nexport default PhoneFieldInputBoxClass;\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","import '@vaadin/text-field';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, TextFieldClass } from './TextFieldClass';\n\ncustomElements.define(componentName, TextFieldClass);\n\nexport { TextFieldClass, componentName };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputController } from '@vaadin/field-base/src/input-controller.js';\nimport { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js';\nimport { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';\n\n/**\n * A mixin providing common text field functionality.\n *\n * @polymerMixin\n * @mixes InputFieldMixin\n */\nexport const TextFieldMixin = (superClass) =>\n class TextFieldMixinClass extends InputFieldMixin(superClass) {\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n\n /**\n * A regular expression that the value is checked against.\n * The pattern must match the entire value, not just some subset.\n */\n pattern: {\n type: String,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'maxlength', 'minlength', 'pattern'];\n }\n\n static get constraints() {\n return [...super.constraints, 'maxlength', 'minlength', 'pattern'];\n }\n\n constructor() {\n super();\n this._setType('text');\n }\n\n /** @protected */\n get clearElement() {\n return this.$.clearButton;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(\n new InputController(this, (input) => {\n this._setInputElement(input);\n this._setFocusElement(input);\n this.stateTarget = input;\n this.ariaTarget = input;\n }),\n );\n this.addController(new LabelledInputController(this.inputElement, this._labelController));\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/src/vaadin-input-container.js';\nimport { html, PolymerElement } from '@polymer/polymer';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { TextFieldMixin } from './vaadin-text-field-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, { moduleId: 'vaadin-text-field-styles' });\n\n/**\n * `<vaadin-text-field>` is a web component that allows the user to input and edit text.\n *\n * ```html\n * <vaadin-text-field label=\"First Name\"></vaadin-text-field>\n * ```\n *\n * ### Prefixes and suffixes\n *\n * These are child elements of a `<vaadin-text-field>` that are displayed\n * inline with the input, before or after.\n * In order for an element to be considered as a prefix, it must have the slot\n * attribute set to `prefix` (and similarly for `suffix`).\n *\n * ```html\n * <vaadin-text-field label=\"Email address\">\n * <div slot=\"prefix\">Sent to:</div>\n * <div slot=\"suffix\">@vaadin.com</div>\n * </vaadin-text-field>\n * ```\n *\n * ### Styling\n *\n * The following custom properties are available for styling:\n *\n * Custom property | Description | Default\n * -------------------------------|----------------------------|---------\n * `--vaadin-field-default-width` | Default width of the field | `12em`\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ---------------------|----------------\n * `label` | The label element\n * `input-field` | The element that wraps prefix, value and suffix\n * `clear-button` | The clear button\n * `error-message` | The error message element\n * `helper-text` | The helper text element wrapper\n * `required-indicator` | The `required` state indicator element\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description | Part name\n * --------------------|-------------|------------\n * `disabled` | Set to a disabled text field | :host\n * `has-value` | Set when the element has a value | :host\n * `has-label` | Set when the element has a label | :host\n * `has-helper` | Set when the element has helper text or slot | :host\n * `has-error-message` | Set when the element has an error message | :host\n * `invalid` | Set when the element is invalid | :host\n * `input-prevented` | Temporarily set when invalid input is prevented | :host\n * `focused` | Set when the element is focused | :host\n * `focus-ring` | Set when the element is keyboard focused | :host\n * `readonly` | Set to a readonly text field | :host\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ElementMixin\n * @mixes ThemableMixin\n * @mixes TextFieldMixin\n */\nexport class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(PolymerElement))) {\n static get is() {\n return 'vaadin-text-field';\n }\n\n static get template() {\n return html`\n <style>\n [part='input-field'] {\n flex-grow: 0;\n }\n </style>\n\n <div class=\"vaadin-field-container\">\n <div part=\"label\">\n <slot name=\"label\"></slot>\n <span part=\"required-indicator\" aria-hidden=\"true\" on-click=\"focus\"></span>\n </div>\n\n <vaadin-input-container\n part=\"input-field\"\n readonly=\"[[readonly]]\"\n disabled=\"[[disabled]]\"\n invalid=\"[[invalid]]\"\n theme$=\"[[_theme]]\"\n >\n <slot name=\"prefix\" slot=\"prefix\"></slot>\n <slot name=\"input\"></slot>\n <slot name=\"suffix\" slot=\"suffix\"></slot>\n <div id=\"clearButton\" part=\"clear-button\" slot=\"suffix\" aria-hidden=\"true\"></div>\n </vaadin-input-container>\n\n <div part=\"helper-text\">\n <slot name=\"helper\"></slot>\n </div>\n\n <div part=\"error-message\">\n <slot name=\"error-message\"></slot>\n </div>\n </div>\n <slot name=\"tooltip\"></slot>\n `;\n }\n\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n };\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this._tooltipController.setPosition('top');\n this._tooltipController.setAriaTarget(this.inputElement);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(TextField);\n","import './descope-phone-input-box-internal';\nimport '../../descope-text-field';\n\nimport { componentName, PhoneFieldInputBoxClass } from './PhoneFieldInputBoxClass';\n\ncustomElements.define(componentName, PhoneFieldInputBoxClass);\n\nexport { PhoneFieldInputBoxClass, componentName };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputControlMixin } from './input-control-mixin.js';\n\n/**\n * A mixin to provide logic for vaadin-text-field and related components.\n *\n * @polymerMixin\n * @mixes InputControlMixin\n */\nexport const InputFieldMixin = (superclass) =>\n class InputFieldMixinClass extends InputControlMixin(superclass) {\n static get properties() {\n return {\n /**\n * Whether the value of the control can be automatically completed by the browser.\n * List of available options at:\n * https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete\n */\n autocomplete: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari that is used to control whether\n * autocorrection should be enabled when the user is entering/editing the text.\n * Possible values are:\n * on: Enable autocorrection.\n * off: Disable autocorrection.\n */\n autocorrect: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari and Chrome that is used to control whether\n * autocapitalization should be enabled when the user is entering/editing the text.\n * Possible values are:\n * characters: Characters capitalization.\n * words: Words capitalization.\n * sentences: Sentences capitalization.\n * none: No capitalization.\n */\n autocapitalize: {\n type: String,\n reflectToAttribute: true,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'autocapitalize', 'autocomplete', 'autocorrect'];\n }\n\n // Workaround for https://github.com/Polymer/polymer/issues/5259\n get __data() {\n return this.__dataValue || {};\n }\n\n set __data(value) {\n this.__dataValue = value;\n }\n\n /**\n * @param {HTMLElement} input\n * @protected\n * @override\n */\n _inputElementChanged(input) {\n super._inputElementChanged(input);\n\n if (input) {\n // Discard value set on the custom slotted input.\n if (input.value && input.value !== this.value) {\n console.warn(`Please define value on the <${this.localName}> component!`);\n input.value = '';\n }\n\n if (this.value) {\n input.value = this.value;\n }\n }\n }\n\n /**\n * Override an event listener from `FocusMixin`.\n * @param {boolean} focused\n * @protected\n * @override\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n // Do not validate when focusout is caused by document\n // losing focus, which happens on browser tab switch.\n if (!focused && document.hasFocus()) {\n this.validate();\n }\n }\n\n /**\n * Override an event listener from `InputMixin`\n * to mark as valid after user started typing.\n * @param {Event} event\n * @protected\n * @override\n */\n _onInput(event) {\n super._onInput(event);\n\n if (this.invalid) {\n this.validate();\n }\n }\n\n /**\n * Override an observer from `InputMixin` to validate the field\n * when a new value is set programmatically.\n *\n * @param {string | undefined} newValue\n * @param {string | undefined} oldValue\n * @protected\n * @override\n */\n _valueChanged(newValue, oldValue) {\n super._valueChanged(newValue, oldValue);\n\n if (oldValue === undefined) {\n return;\n }\n\n if (this.invalid) {\n this.validate();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, {\n moduleId: 'lumo-text-field-styles',\n});\n","import '../../../descope-text-field';\n\nimport PhoneFieldInternalInputBox, { componentName } from './PhoneFieldInternalInputBox';\n\ncustomElements.define(componentName, PhoneFieldInternalInputBox);\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../mixins';\nimport textFieldMappings from './textFieldMappings';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n ...iconInitConfig,\n });\n\n this.baseElement.appendChild(this.icon);\n this.icon.addEventListener('click', () => {\n navigator.clipboard.writeText(this.value);\n Object.assign(this.icon, iconCopiedConfig);\n\n // we want the icon to go back to the initial state after 5 seconds\n setTimeout(() => {\n Object.assign(this.icon, iconInitConfig);\n }, 5000);\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import parsePhoneNumberFromString from 'libphonenumber-js/min';\nimport CountryCodes from './CountryCodes';\n\nexport const getCountryByCodeId = (countryCode) => {\n return CountryCodes.find((c) => c.code === countryCode)?.dialCode;\n};\n\nexport const matchingParenthesis = (val) => {\n const openParenMatches = val.match(/\\(/g);\n const closeParenMatches = val.match(/\\)/g);\n return openParenMatches?.length === closeParenMatches?.length;\n};\n"],"names":["componentName","observedAttributes","mapAttrs","BaseInputClass","baseSelector","concat","constructor","super","this","innerHTML","textField","querySelector","phoneNumberInputEle","shadowRoot","defaultDialCode","getAttribute","defaultCode","allowAlphanumericInput","minLength","parseInt","maxLength","restrictCountries","split","filter","Boolean","isFormatValue","isStrictValidation","value","parsedVal","country","countryCallingCode","nationalNumber","join","val","init","addEventListener","e","isTrusted","focus","bind","handleFocusEventsDispatching","getValidity","validPhonePattern","stripValue","isRequired","valueMissing","length","tooShort","test","patternMismatch","setSelectionRange","args","attributeChangedCallback","attrName","oldValue","newValue","includes","attr","setAttribute","sanitizedInput","target","sanitizedVal","replace","dialCodePrefixPattern","RegExp","parsed","isValid","countryCode","telDigitsRegExp","char","phoneNumber","reset","input","textVars","cssVarList","host","label","inputElement","requiredIndicator","inputField","internalComponent","internalComponentAfter","phoneInput","errorMessage","helperText","selector","placeholder","PhoneFieldInputBoxClass","mappings","fontSize","property","fontFamily","hostWidth","hostMinWidth","hostDirection","inputHorizontalPadding","labelFontSize","labelFontWeight","labelTextColor","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","inputValueTextColor","inputPlaceholderTextColor","inputPlaceholderColor","inputBorderStyle","inputBorderWidth","inputBorderColor","inputBorderRadius","inputOutlineStyle","inputOutlineColor","inputOutlineWidth","inputOutlineOffset","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","valueInputHeight","valueInputMarginBottom","proxyProps","superclass","CountryCodes","template","document","createElement","baseElement","appendChild","content","cloneNode","includeAttrs","slots","wrappedEleName","style","excludeAttrsSync","InputController","callback","initializer","node","type","id","defaultId","useUniqueId","customElements","define","TextFieldMixin","superClass","properties","maxlength","Number","minlength","pattern","String","delegateAttrs","constraints","_setType","clearElement","$","clearButton","ready","addController","_setInputElement","_setFocusElement","stateTarget","ariaTarget","_labelController","moduleId","TextField","is","_tooltipController","setPosition","setAriaTarget","InputFieldMixin","autocomplete","autocorrect","autocapitalize","reflectToAttribute","__data","__dataValue","_inputElementChanged","console","warn","localName","_setFocused","focused","hasFocus","validate","_onInput","event","invalid","_valueChanged","undefined","observedAttrs","TextFieldClass","useProxyTargets","icon","renderCopyToClipboard","shouldRender","remove","iconInitConfig","title","iconCopiedConfig","Object","assign","slot","navigator","clipboard","writeText","setTimeout","onLabelClick","oldVal","newVal","attributeChangeCallback","removeEventListener","getCountryByCodeId","find","c","code","dialCode","matchingParenthesis","openParenMatches","match","closeParenMatches"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/web-components-ui",
3
- "version": "1.118.0",
3
+ "version": "1.120.0",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -81,9 +81,9 @@
81
81
  "@descope-ui/descope-icon": "0.0.17",
82
82
  "@descope-ui/descope-text": "0.0.19",
83
83
  "@descope-ui/descope-avatar": "0.0.19",
84
- "@descope-ui/descope-combo-box": "0.1.10",
85
- "@descope-ui/descope-autocomplete-field": "0.0.23",
86
- "@descope-ui/descope-address-field": "0.0.22",
84
+ "@descope-ui/descope-combo-box": "0.1.11",
85
+ "@descope-ui/descope-autocomplete-field": "0.0.24",
86
+ "@descope-ui/descope-address-field": "0.0.23",
87
87
  "@descope-ui/descope-timer": "0.0.17",
88
88
  "@descope-ui/descope-timer-button": "0.0.20",
89
89
  "@descope-ui/descope-list": "0.0.1",
@@ -42,7 +42,10 @@ export const SwitchToggleClass = compose(
42
42
  fontSize: [component, checkboxLabel, checkboxLabel],
43
43
  fontFamily: [checkboxLabel, helperText, errorMessage],
44
44
 
45
- labelTextColor: { ...checkboxLabel, property: 'color' },
45
+ labelTextColor: [
46
+ { ...checkboxLabel, property: 'color' },
47
+ { ...checkboxLabel, property: '-webkit-text-fill-color' },
48
+ ],
46
49
  labelSpacing: { ...checkboxLabel, property: 'padding-inline-start' },
47
50
  labelLineHeight: { ...checkboxLabel, property: 'line-height' },
48
51
  labelFontWeight: { ...checkboxLabel, property: 'font-weight' },
@@ -50,6 +50,7 @@ const customMixin = (superclass) =>
50
50
  'has-confirm',
51
51
  'invalid',
52
52
  'readonly',
53
+ 'disabled',
53
54
  'draggable',
54
55
  'has-validation',
55
56
  'policy-label',
@@ -76,7 +76,9 @@ const customMixin = (superclass) =>
76
76
 
77
77
  this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);
78
78
 
79
- forwardAttrs(this, this.inputElement, { includeAttrs: ['digits', 'size', 'loading'] });
79
+ forwardAttrs(this, this.inputElement, {
80
+ includeAttrs: ['digits', 'size', 'loading', 'disabled'],
81
+ });
80
82
  }
81
83
 
82
84
  attributeChangedCallback(attrName, oldValue, newValue) {
@@ -118,7 +120,9 @@ export const PasscodeClass = compose(
118
120
  fontFamily: [host, { ...label }],
119
121
  labelTextColor: [
120
122
  { ...label, property: 'color' },
123
+ { ...label, property: '-webkit-text-fill-color' },
121
124
  { ...requiredIndicator, property: 'color' },
125
+ { ...requiredIndicator, property: '-webkit-text-fill-color' },
122
126
  ],
123
127
  labelRequiredIndicator: { ...requiredIndicator, property: 'content' },
124
128
  errorMessageTextColor: { ...errorMessage, property: 'color' },
@@ -177,7 +177,9 @@ export const PasswordClass = compose(
177
177
  labelFontWeight: { ...label, property: 'font-weight' },
178
178
  labelTextColor: [
179
179
  { ...label, property: 'color' },
180
+ { ...label, property: '-webkit-text-fill-color' },
180
181
  { ...requiredIndicator, property: 'color' },
182
+ { ...requiredIndicator, property: '-webkit-text-fill-color' },
181
183
  ],
182
184
  labelRequiredIndicator: { ...requiredIndicator, property: 'content' },
183
185
  errorMessageTextColor: { ...errorMessage, property: 'color' },
@@ -48,6 +48,7 @@ export const TextAreaClass = compose(
48
48
  fontFamily: [label, inputField, helperText, errorMessage],
49
49
  labelTextColor: [
50
50
  { ...label, property: 'color' },
51
+ { ...label, property: '-webkit-text-fill-color' },
51
52
  { ...requiredIndicator, property: 'color' },
52
53
  ],
53
54
  labelRequiredIndicator: { ...requiredIndicator, property: 'content' },
@@ -175,6 +175,7 @@ export const PhoneFieldClass = compose(
175
175
 
176
176
  labelTextColor: [
177
177
  { ...label, property: 'color' },
178
+ { ...label, property: '-webkit-text-fill-color' },
178
179
  { ...requiredIndicator, property: 'color' },
179
180
  ],
180
181
  labelRequiredIndicator: { ...requiredIndicator, property: 'content' },
@@ -123,6 +123,7 @@ export const PhoneFieldInputBoxClass = compose(
123
123
  labelFontWeight: { ...label, property: 'font-weight' },
124
124
  labelTextColor: [
125
125
  { ...label, property: 'color' },
126
+ { ...label, property: '-webkit-text-fill-color' },
126
127
  { ...requiredIndicator, property: 'color' },
127
128
  ],
128
129
  labelRequiredIndicator: { ...requiredIndicator, property: 'content' },