@descope/web-components-ui 3.23.3 → 3.25.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.
- package/dist/cjs/index.cjs.js +2131 -1364
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3009 -2033
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/8961.js +1 -1
- package/dist/umd/8961.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
- package/dist/umd/descope-email-field.js +55 -0
- package/dist/umd/descope-email-field.js.map +1 -0
- package/dist/umd/descope-hybrid-field-index-js.js +3 -3
- package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
- package/dist/umd/descope-new-email.js +55 -0
- package/dist/umd/descope-new-email.js.LICENSE.txt +11 -0
- package/dist/umd/descope-new-email.js.map +1 -0
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +45 -43
- package/src/components/button-selection-group-fields/baseButtonSelectionGroup.js +7 -0
- package/src/components/button-selection-group-fields/descope-button-selection-group-item/ButtonSelectionGroupItemClass.js +1 -0
- package/src/components/descope-hybrid-field/index.js +1 -1
- package/src/index.cjs.js +0 -1
- package/src/index.js +0 -1
- package/src/theme/components/buttonSelectionGroup/baseButtonSelectionGroup.js +11 -0
- package/src/theme/components/buttonSelectionGroup/buttonSelectionGroupItem.js +1 -0
- package/src/theme/components/index.js +3 -1
- package/stories/descope-button-multi-selection-group.stories.js +7 -0
- package/stories/descope-button-selection-group.stories.js +7 -0
- package/stories/descope-email-field.stories.js +1 -1
- package/dist/umd/descope-email-field-index-js.js +0 -55
- package/dist/umd/descope-email-field-index-js.js.map +0 -1
- package/src/components/descope-email-field/EmailFieldClass.js +0 -138
- package/src/components/descope-email-field/emailPattern.js +0 -7
- package/src/components/descope-email-field/index.js +0 -6
- package/src/theme/components/emailField.js +0 -55
- /package/dist/umd/{descope-email-field-index-js.js.LICENSE.txt → descope-email-field.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descope-hybrid-field-index-js.js","mappings":";mOAQA,MAAAA,EAAmBC,EAAAC,EAAG;;;;;;;;GAUtB,EAAAD,EAAAE,IAAc,sBAAwBC,EAAAC,EAAgBL,GAAA,CACtDM,SAAA,+CCXO,MAAAC,WAAyBL,EAAG;;;;;;;;;GCEnC,EAAAD,EAAAE,IAAc,qBAAuBI,EAAgB,CAAID,SAAA,8BAyBlD,MAAAE,UAAyBC,EAAAC,EAChC,aAAAC,GACA,0BACA,CAEA,WAAAC,GACAC,QACAC,KAAAC,SAAA,SACAD,KAAAE,QAAA,gEACA,CAGA,KAAAC,GACAJ,MAAAI,QAEAH,KAAAI,eACAJ,KAAAI,aAAAC,eAAA,MAEA,GAGA,EAAAC,EAAAC,GAAmBb,6DCrCZ,MAAAc,GAAsB,EAAAC,EAAAC,IAAgB,eAG7CC,EAAA,QAiEOC,GAAwB,EAAAC,EAAAC,KAC7B,EAAAC,EAAAC,IAAgB,CAClBC,SAAcC,EAAAtB,IAEZmB,EAAAI,IACA,EAAAJ,EAAAK,IAAkB,CACpBC,UAAA,QACAC,UAAA,QACAC,iBAAA,WACAC,aAAA,qCAEE,EAAAT,EAAAU,IAAe,CAAGC,WAAA,2BAAAC,iBAAA,IAClBZ,EAAAa,GA3EFC,GACA,cAAAA,EAMA,kBAAAC,GACA,gBAAA9B,KAAA+B,aAAA,iBACA,CAEA,I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,QAAA,eACAA,QAAA,UACAA,QAAA,WAEArK,KAAAoP,uBAAA,CACA,MAAA8C,EAAA,gBACAxK,EAAAA,EACA+H,MAAA,IACApN,OAAA8P,GAAAD,EAAA7I,KAAA8I,IACAjC,KAAA,GACA,CAEA,OAAAxI,CACA,CAEA,EAAA+J,CAAAW,EAAA,IAEA,MAAA1N,EAAA1E,KAAAoH,aAAApH,MAAAqS,EAAAD,GAGA,OAAA1N,GAKA1E,MAAA+O,GAAA/O,MAAA+O,EAAAgB,UAAArL,IACA1E,MAAA+O,EAAA,IAAsBuD,EAAAnD,EAASzK,IAI/B1E,MAAA+O,EAAAwD,QAGAvS,MAAA+O,EAAAvM,MAAA4P,IAAAA,GAZAA,CAeA,CAEA,EAAAC,CAAA3K,GACA,MAAAqK,GAAmB,EAAAJ,EAAAC,GAA0BlK,GAC7C,OAAAqK,GAAAhC,SAAA,EACA,CAEA,EAAAyB,CAAA9J,GACA,SAAS,EAAAwH,EAAAsD,GAAmB9K,EAE5B,+CC9QAvD,eAAAC,OAAsBqO,EAAA3E,EAAe2E,EAAA7S,0HCCrCuE,eAAAC,OAAsBsO,EAAAC,GAAeD,EAAA9M,0DCF9B,MAAAgN,EAAAlO,GACLmO,EAAAjT,EAAYqK,KAAAC,GAAAA,EAAAJ,OAAApF,IAAAyF,SAEP2I,EAAApL,IACP,MAAAqL,EAAArL,EAAAqC,MAAA,OACAiJ,EAAAtL,EAAAqC,MAAA,OACA,OAAAgJ,GAAAlI,SAAAmI,GAAAnI","sources":["webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/email-field/theme/lumo/vaadin-email-field-styles.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/email-field/src/vaadin-email-field-styles.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/email-field/src/vaadin-email-field.js","webpack://@descope/web-components-ui/./src/components/descope-email-field/EmailFieldClass.js","webpack://@descope/web-components-ui/./src/components/descope-email-field/emailPattern.js","webpack://@descope/web-components-ui/./src/components/descope-email-field/index.js","webpack://@descope/web-components-ui/./src/components/descope-hybrid-field/helpers.js","webpack://@descope/web-components-ui/./src/components/descope-hybrid-field/HybridFieldClass.js","webpack://@descope/web-components-ui/./src/components/descope-hybrid-field/index.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js","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/descope-phone-input-box-internal/index.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/index.js","webpack://@descope/web-components-ui/./src/components/phone-fields/helpers.js"],"sourcesContent":["/**\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 { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst emailField = css`\n :host([dir='rtl']) [part='input-field'] ::slotted(input) {\n --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);\n }\n\n :host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {\n --_lumo-text-field-overflow-mask-image: none;\n }\n`;\n\nregisterStyles('vaadin-email-field', [inputFieldShared, emailField], {\n moduleId: 'lumo-email-field',\n});\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 { css } from 'lit';\n\n// See https://github.com/vaadin/vaadin-text-field/issues/466\nexport const emailFieldStyles = css`\n :host([dir='rtl']) [part='input-field'] {\n direction: ltr;\n }\n\n :host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {\n direction: rtl;\n text-align: left;\n }\n`;\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 { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { TextField } from '@vaadin/text-field/src/vaadin-text-field.js';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { emailFieldStyles } from './vaadin-email-field-styles.js';\n\nregisterStyles('vaadin-email-field', emailFieldStyles, { moduleId: 'vaadin-email-field-styles' });\n\n/**\n * `<vaadin-email-field>` is a Web Component for email field control in forms.\n *\n * ```html\n * <vaadin-email-field label=\"Email\"></vaadin-email-field>\n * ```\n *\n * ### Styling\n *\n * `<vaadin-email-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\n * See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.\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 TextField\n */\nexport class EmailField extends TextField {\n static get is() {\n return 'vaadin-email-field';\n }\n\n constructor() {\n super();\n this._setType('email');\n this.pattern = '^([a-zA-Z0-9_\\\\.\\\\-+])+@[a-zA-Z0-9\\\\-.]+\\\\.[a-zA-Z0-9\\\\-]{2,}$';\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n if (this.inputElement) {\n this.inputElement.autocapitalize = 'off';\n }\n }\n}\n\ndefineCustomElement(EmailField);\n","import textFieldMappings from '@descope-ui/descope-text-field/mappings';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n externalInputMixin,\n} from '../../mixins';\nimport { compose } from '../../helpers';\nimport { asciiPattern, unicodePattern } from './emailPattern';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('email-field');\n\nconst defaultAutocomplete = 'username';\nconst defaultInputMode = 'email';\n\nconst customMixin = (superclass) =>\n class EmailFieldMixinClass extends superclass {\n // On by default - `accept-unicode=\"false\"` restores the pre-unicode field:\n // native `type=\"email\"` validation and the ASCII pattern.\n //\n // Read once, in `init`. Changing the attribute afterwards has no effect; it\n // is static configuration, which is how every consumer sets it.\n get acceptsUnicode() {\n return this.getAttribute('accept-unicode') !== 'false';\n }\n\n init() {\n super.init?.();\n\n // we need to set the pattern on the base element because vaadin-email-field is overriding it\n this.baseElement.setAttribute('pattern', asciiPattern);\n\n if (!this.getAttribute('autocomplete')) {\n this.setAttribute('autocomplete', defaultAutocomplete);\n }\n\n this.createExternalInput();\n\n [this.inputElement, this.externalInput].filter(Boolean).forEach((input) => {\n input.addEventListener('change', this.stripSurroundingWhitespace);\n });\n\n if (this.acceptsUnicode) {\n this.enableUnicode();\n }\n }\n\n enableUnicode() {\n this.baseElement.setAttribute('pattern', unicodePattern);\n\n // native `type=\"email\"` validation is ASCII only and sets typeMismatch\n // before `pattern` is consulted, so `text` is what lets the pattern decide.\n // Through vaadin's `_setType` because `type` is a readOnly property bound\n // to the inner input - assigning `input.type` is re-applied over.\n this.baseElement._setType('text');\n\n if (this.externalInput) {\n this.externalInput.type = 'text';\n }\n\n // `type=\"text\"` loses the email keyboard on mobile\n if (!this.getAttribute('inputmode')) {\n this.setAttribute('inputmode', defaultInputMode);\n }\n\n this.externalInput?.setAttribute('inputmode', defaultInputMode);\n }\n\n stripSurroundingWhitespace = (e) => {\n const trimmed = e.target.value.trim();\n if (trimmed === e.target.value) return;\n this.value = trimmed;\n\n // validity is cached and was computed against the untrimmed value\n this.inputElement.dispatchEvent(new Event('input', { bubbles: true, composed: true }));\n };\n };\n\nexport const EmailFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n externalInputMixin({\n inputType: 'email',\n inputName: 'email',\n autocompleteType: 'username',\n includeAttrs: ['disabled', 'readonly', 'pattern'],\n }),\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: ['', 'suffix'],\n wrappedEleName: 'vaadin-email-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(${EmailFieldClass.cssVarList.inputOutlineWidth}) + var(${\n EmailFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n ${resetInputLabelPosition('vaadin-email-field')}\n\t\t\t${useHostExternalPadding(EmailFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-email-field', EmailFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-email-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-email-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\n vaadin-email-field[external-input=\"true\"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","// Kept in its own module (with no imports) so it can be unit tested without\n// pulling in the whole component / vaadin dependency chain.\n\nexport const asciiPattern = \"^[\\\\w\\\\.\\\\%\\\\+\\\\-']+@[\\\\w\\\\.\\\\-]+\\\\.[A-Za-z]{2,}$\";\n\nexport const unicodePattern =\n \"^[\\\\p{L}\\\\p{M}\\\\p{N}._%+'\\\\-]+@[\\\\p{L}\\\\p{M}\\\\p{N}.\\\\-]+\\\\.[\\\\p{L}\\\\p{M}][\\\\p{L}\\\\p{M}\\\\p{N}\\\\-]+$\";\n","import '@vaadin/email-field';\nimport { componentName, EmailFieldClass } from './EmailFieldClass';\n\ncustomElements.define(componentName, EmailFieldClass);\n\nexport { EmailFieldClass, componentName };\n","// Matches any character that is not a digit, whitespace, or phone formatting character (+, -, (, ))\nconst INVALID_PHONE_CHARS_RE = /[^\\d\\s+\\-()]/;\n\nexport const isNumericValue = (val) => !!val && !INVALID_PHONE_CHARS_RE.test(val);\n\nexport const sanitizeCountryCodePrefix = (val) => val.replace(/\\+\\d+-/, '');\n","import { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';\nimport { isNumericValue, sanitizeCountryCodePrefix as sanitizeValue } from './helpers';\nimport { PhoneFieldClass } from '../phone-fields/descope-phone-field/PhoneFieldClass';\nimport { PhoneFieldInputBoxClass } from '../phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass';\n\nexport const componentName = getComponentName('hybrid-field');\n\nconst attrs = {\n shared: [\n 'label',\n 'bordered',\n 'full-width',\n 'label-type',\n 'size',\n 'disabled',\n 'readonly',\n 'required',\n 'st-host-direction',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n ],\n email: [\n 'placeholder',\n 'data-errormessage-value-missing-email',\n 'data-errormessage-pattern-mismatch-email',\n 'external-input',\n ],\n phone: {\n countryCode: [\n 'phone-input-label',\n 'country-input-label',\n 'country-input-placeholder',\n 'restrict-countries',\n 'default-code',\n 'phone-minlength',\n 'phone-format-value',\n 'phone-strict-validation',\n 'phone-input-type',\n 'data-errormessage-value-missing-phone',\n ],\n inputBox: [\n 'restrict-countries',\n 'default-code',\n 'phone-minlength',\n 'phone-format-value',\n 'phone-strict-validation',\n 'phone-input-type',\n 'data-errormessage-value-missing-phone',\n ],\n },\n};\n\nconst attrMap = {\n email: {\n 'data-errormessage-value-missing-email': 'data-errormessage-value-missing',\n 'data-errormessage-pattern-mismatch-email': 'data-errormessage-pattern-mismatch',\n },\n phone: {\n 'phone-input-label': 'label',\n 'phone-minlength': 'minlength',\n 'phone-format-value': 'format-value',\n 'phone-strict-validation': 'strict-validation',\n 'data-errormessage-value-missing-phone': 'data-errormessage-value-missing',\n },\n};\n\nconst EMAIL_FIELD = 'descope-email-field';\nconst PHONE_FIELD = 'descope-phone-field';\nconst PHONE_INPUT_BOX_FIELD = 'descope-phone-input-box-field';\n\nconst BaseClass = createBaseClass({\n componentName,\n baseSelector: 'div',\n});\n\nclass RawHybridField extends BaseClass {\n #isReportedValidity = false;\n\n #selectionStart;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <descope-email-field external-input=\"${this.isExternalInput}\"></descope-email-field>\n <descope-phone-field allow-alphanumeric-input=\"true\" phone-input-type=\"text\"></descope-phone-field>\n <descope-phone-input-box-field allow-alphanumeric-input=\"true\" phone-input-type=\"text\"></descope-phone-input-box-field>\n </div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n box-sizing: border-box;\n padding: 0;\n gap: 0;\n }\n .wrapper {\n display: grid;\n width: 100%;\n }\n descope-email-field,\n descope-phone-field,\n descope-phone-input-box-field {\n grid-area: 1/1;\n width: 100%;\n height: 100%;\n }\n .hidden {\n visibility: hidden;\n }\n `,\n this\n );\n }\n\n get isExternalInput() {\n return this.getAttribute('external-input') === 'true';\n }\n\n get emailInputEle() {\n return this.isExternalInput ? this.emailInput.externalInput : this.emailInput.inputElement;\n }\n\n get phoneVariant() {\n const isInputBox = this.getAttribute('phone-variant') === 'inputBox';\n return isInputBox ? this.phoneInputBoxInput : this.phoneCountryCodeInput;\n }\n\n get defaultCode() {\n const firstItem = this.phoneCountryCodeInput.countryCodes?.[0] || '';\n return this.getAttribute('default-code') || firstItem;\n }\n\n get activeInputEle() {\n if (this.activeInput === this.emailInput) {\n return this.emailInputEle;\n }\n return this.phoneVariant.phoneNumberInputEle;\n }\n\n get value() {\n return this.activeInput?.value || '';\n }\n\n set value(val) {\n this.handleActiveInput(val);\n setTimeout(() => {\n this.activeInput.value = val;\n });\n }\n\n async init() {\n super.init?.();\n\n this.initInputs();\n this.updateAttrs();\n this.toggleInputVisibility();\n\n await this.waitForInputs();\n\n this.initInputEles();\n this.overrideEmailInputType();\n this.overrideEmailSetAttribute();\n }\n\n waitForInputs() {\n return new Promise((resolve) => {\n const check = setInterval(() => {\n if (this.emailInputEle) {\n clearInterval(check);\n resolve();\n }\n });\n });\n }\n\n initInputs() {\n this.emailInput = this.shadowRoot.querySelector(EMAIL_FIELD);\n this.phoneCountryCodeInput = this.shadowRoot.querySelector(PHONE_FIELD);\n this.phoneInputBoxInput = this.shadowRoot.querySelector(PHONE_INPUT_BOX_FIELD);\n\n this.inputs = [this.emailInput, this.phoneCountryCodeInput, this.phoneInputBoxInput];\n\n this.activeInput = this.emailInput;\n }\n\n // we need to listen on the inner `input` element itself, otherwise we don't always get an `input` event\n initInputEles() {\n const inputEles = [\n this.emailInputEle,\n this.phoneCountryCodeInput.phoneNumberInputEle,\n this.phoneInputBoxInput.phoneNumberInputEle,\n ];\n\n inputEles.forEach((ele) => {\n ele.addEventListener('input', this.onValueChange.bind(this));\n });\n }\n\n overrideEmailInputType() {\n this.emailInputEle.addEventListener('focus', () => {\n this.emailInputEle.setAttribute('type', 'text');\n });\n this.emailInputEle.addEventListener('blur', () => {\n setTimeout(() => {\n this.emailInputEle.setAttribute('type', 'email');\n });\n });\n }\n\n // We want to prevent Vaadin from changing the input type to `email`\n // otherwise, we cannot get the selectionStart from the input.\n overrideEmailSetAttribute() {\n const origEmailSetAttr = this.emailInput.setAttribute.bind(this.emailInputEle);\n this.emailInputEle.setAttribute = (name, value) => {\n if (name !== 'type' || value !== 'email' || !this.emailInput.hasAttribute('focused')) {\n return origEmailSetAttr(name, value);\n }\n return false;\n };\n }\n\n updateAttrs() {\n forwardAttrs(this, this.emailInput, { includeAttrs: attrs.email, mapAttrs: attrMap.email });\n\n forwardAttrs(this, this.phoneCountryCodeInput, {\n includeAttrs: attrs.phone.countryCode,\n mapAttrs: attrMap.phone,\n });\n\n forwardAttrs(this, this.phoneInputBoxInput, {\n includeAttrs: attrs.phone.inputBox,\n mapAttrs: attrMap.phone,\n });\n\n this.inputs.forEach((input) => forwardAttrs(this, input, { includeAttrs: attrs.shared }));\n\n setTimeout(() => this.phoneCountryCodeInput.setAttribute('default-code', this.defaultCode));\n }\n\n onValueChange() {\n this.#selectionStart = this.activeInputEle.selectionStart;\n // phone components expose an API to their inputElement; in case of phone variants like\n // phone-input-box-field, we want to make sure that the value being passed\n // is raw value from input, and not the value with a dial-code prefix, or other decorations\n // applied behind the scenes by the phone components\n this.handleActiveInput(this.activeInputEle.value || this.activeInput.value);\n }\n\n handleActiveInput(val) {\n const expectedActiveInput = isNumericValue(val) ? this.phoneVariant : this.emailInput;\n\n if (this.activeInput !== expectedActiveInput) {\n this.setActiveInput(expectedActiveInput);\n }\n }\n\n setActiveInput(expectedActiveInput) {\n // phone components expose an API to their inputElement; in case of phone variants like\n // phone-input-box-field, we want to make sure that the value being passed\n // is raw value from input, and not the value with a dial-code prefix, or other decorations\n // applied behind the scenes by the phone components\n const val = this.activeInputEle.value || this.activeInput.value;\n\n this.activeInput = expectedActiveInput;\n this.setActiveInputValue(val);\n if (this.#isReportedValidity) this.activeInput.reportValidity();\n this.setActiveInputSelectionStart();\n this.toggleInputVisibility();\n }\n\n setActiveInputSelectionStart() {\n setTimeout(() => {\n const ele = this.activeInputEle;\n ele.focus();\n // setSelectionRange throws InvalidStateError on input types that do not\n // support selection (e.g. `email`). The focus handler usually switches\n // type to `text` first, but that can race with the blur timer or fail\n // to fire (e.g. background tab). Restoring the caret is best-effort.\n try {\n ele.setSelectionRange?.(this.#selectionStart, this.#selectionStart);\n } catch {\n /* noop */\n }\n });\n }\n\n #getDefaultDialCode() {\n const code = this.getAttribute('default-code');\n const match = code && PhoneFieldClass.CountryCodes.find((c) => c.code === code);\n return match?.dialCode || PhoneFieldClass.CountryCodes[0]?.dialCode || '';\n }\n\n setActiveInputValue(val) {\n const sanitizedVal = sanitizeValue(val);\n const isPhoneField = this.activeInput.localName === PHONE_FIELD;\n if (isPhoneField) {\n const dialCode = this.phoneCountryCodeInput.countryCodeItems || this.#getDefaultDialCode();\n this.activeInput.value = `${dialCode}-${sanitizedVal}`;\n } else {\n this.activeInput.value = sanitizedVal;\n }\n }\n\n toggleInputVisibility() {\n this.inputs.forEach((input) => {\n input !== this.activeInput ? input.classList.add('hidden') : input.classList.remove('hidden');\n });\n }\n\n reportValidity() {\n this.#isReportedValidity = true;\n\n const ele = this.activeInputEle;\n\n // On reportValidity we want to set the caret at the end of the input value.\n // Since checkValidity triggers `focus` on the input, it sets the caret at the start of the input,\n // regardless the existing value.\n const origInputType = ele.type;\n ele.setAttribute('type', 'text');\n setTimeout(() => {\n ele.setSelectionRange?.(ele.value.length, ele.value.length);\n ele.setAttribute('type', origInputType);\n });\n\n return this.activeInput.reportValidity();\n }\n\n checkValidity() {\n return this.activeInput.checkValidity();\n }\n}\n\nexport const HybridFieldClass = compose(\n createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDirection: [\n { selector: () => 'descope-email-field', property: 'direction' },\n { selector: () => 'descope-phone-field', property: 'direction' },\n { selector: () => 'descope-phone-input-box-field', property: 'direction' },\n ],\n errorMessageIcon: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIcon,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIcon,\n },\n ],\n errorMessageIconSize: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIconSize,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconSize,\n },\n ],\n errorMessageIconPadding: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIconPadding,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconPadding,\n },\n ],\n errorMessageIconRepeat: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIconRepeat,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconRepeat,\n },\n ],\n errorMessageIconPosition: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIconPosition,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconPosition,\n },\n ],\n errorMessageFontSize: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageFontSize,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageFontSize,\n },\n ],\n labelFontWeight: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.labelFontWeight,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.labelFontWeight,\n },\n ],\n inputValueFontWeight: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.inputValueFontWeight,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.inputValueFontWeight,\n },\n ],\n inputPlaceholderFontWeight: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.inputPlaceholderFontWeight,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.inputPlaceholderFontWeight,\n },\n ],\n helperTextFontWeight: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.helperTextFontWeight,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.helperTextFontWeight,\n },\n ],\n errorMessageFontWeight: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageFontWeight,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageFontWeight,\n },\n ],\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawHybridField);\n","import '../descope-email-field';\nimport '../phone-fields/descope-phone-field';\nimport '../phone-fields/descope-phone-input-box-field';\n\nimport { componentName, HybridFieldClass } from './HybridFieldClass';\n\ncustomElements.define(componentName, HybridFieldClass);\n\nexport { HybridFieldClass, componentName };\n","import { syncAttrs } from '@descope-ui/common/components-helpers';\nimport { TextFieldClass } from '@descope-ui/descope-text-field/class';\nimport { 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 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 syncAttrs(this, this.inputElement, { includeAttrs: ['has-value'] });\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 'phone-input-type',\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 inputValueFontWeight: { ...phoneInput, property: textVars.inputValueFontWeight },\n inputPlaceholderFontWeight: { ...phoneInput, property: textVars.inputPlaceholderFontWeight },\n helperTextFontWeight: { ...helperText, property: 'font-weight' },\n errorMessageFontWeight: { ...errorMessage, 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', 'style'],\n componentName,\n })\n);\n\nexport default PhoneFieldInputBoxClass;\n","import { forwardAttrs } from '@descope-ui/common/components-helpers';\nimport parsePhoneNumberFromString, { AsYouType } from 'libphonenumber-js/min';\nimport { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport { getComponentName } from '../../../../helpers/componentHelpers';\nimport { getCountryByCodeId, matchingParenthesis } from '../../helpers';\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 'phone-input-type',\n];\nconst mapAttrs = {\n 'phone-input-placeholder': 'placeholder',\n 'phone-input-type': 'type',\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 forwardAttrs(this.textField, this, { includeAttrs: ['has-value'] });\n\n forwardAttrs(this, this.textField, {\n includeAttrs: ['phone-input-type'],\n mapAttrs: { 'phone-input-type': 'type' },\n });\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 '@descope-ui/descope-text-field';\n\nimport PhoneFieldInternalInputBox, { componentName } from './PhoneFieldInternalInputBox';\n\ncustomElements.define(componentName, PhoneFieldInternalInputBox);\n","import './descope-phone-input-box-internal';\nimport '@descope-ui/descope-text-field';\n\nimport { componentName, PhoneFieldInputBoxClass } from './PhoneFieldInputBoxClass';\n\ncustomElements.define(componentName, PhoneFieldInputBoxClass);\n\nexport { PhoneFieldInputBoxClass, componentName };\n","import parsePhoneNumberFromString from 'libphonenumber-js/min';\nimport CountryCodes from './CountryCodes';\n\nexport const getCountryByCodeId = (countryCode) =>\n CountryCodes.find((c) => c.code === countryCode)?.dialCode;\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":["emailField","vaadin_themable_mixin","AH","SF","input_field_shared","k","moduleId","emailFieldStyles","EmailField","src_vaadin_text_field","A","is","constructor","super","this","_setType","pattern","ready","inputElement","autocapitalize","src_define","X","componentName","componentHelpers","xE","defaultInputMode","EmailFieldClass","helpers","Zz","mixins","RF","mappings","textFieldMappings","VO","RV","inputType","inputName","autocompleteType","includeAttrs","OZ","proxyProps","useProxyTargets","tQ","superclass","acceptsUnicode","getAttribute","init","baseElement","setAttribute","createExternalInput","externalInput","filter","Boolean","forEach","input","addEventListener","stripSurroundingWhitespace","enableUnicode","type","e","trimmed","target","value","trim","dispatchEvent","Event","bubbles","composed","tz","slots","wrappedEleName","style","cssVarList","inputOutlineWidth","inputOutlineOffset","resetHelpers","$J","cy","LJ","Kl","excludeAttrsSync","customElements","define","INVALID_PHONE_CHARS_RE","attrs","shared","email","phone","countryCode","inputBox","attrMap","PHONE_FIELD","BaseClass","createBaseClass","q","baseSelector","HybridFieldClass","componentNameOverride","hostWidth","selector","property","hostDirection","errorMessageIcon","PhoneFieldClass","NF","PhoneFieldInputBoxClass","Ul","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","labelFontWeight","inputValueFontWeight","inputPlaceholderFontWeight","helperTextFontWeight","errorMessageFontWeight","isReportedValidity","selectionStart","attachShadow","mode","innerHTML","isExternalInput","componentsHelpers","fz","emailInputEle","emailInput","phoneVariant","phoneInputBoxInput","phoneCountryCodeInput","defaultCode","firstItem","countryCodes","activeInputEle","activeInput","phoneNumberInputEle","val","handleActiveInput","setTimeout","initInputs","updateAttrs","toggleInputVisibility","waitForInputs","initInputEles","overrideEmailInputType","overrideEmailSetAttribute","Promise","resolve","check","setInterval","clearInterval","shadowRoot","querySelector","inputs","ele","onValueChange","bind","origEmailSetAttr","name","hasAttribute","EA","mapAttrs","expectedActiveInput","test","isNumericValue","setActiveInput","setActiveInputValue","reportValidity","setActiveInputSelectionStart","focus","setSelectionRange","getDefaultDialCode","code","match","CountryCodes","find","c","dialCode","sanitizedVal","replace","sanitizeCountryCodePrefix","localName","countryCodeItems","classList","add","remove","origInputType","length","checkValidity","textVars","_descope_ui_descope_text_field_class__WEBPACK_IMPORTED_MODULE_1__","w","_helpers_componentHelpers__WEBPACK_IMPORTED_MODULE_3__","host","label","requiredIndicator","inputField","internalComponent","internalComponentAfter","phoneInput","errorMessage","helperText","placeholder","_helpers__WEBPACK_IMPORTED_MODULE_4__","_mixins__WEBPACK_IMPORTED_MODULE_5__","fontSize","fontFamily","hostMinWidth","inputHorizontalPadding","labelFontSize","labelTextColor","labelRequiredIndicator","errorMessageTextColor","inputValueTextColor","inputPlaceholderTextColor","inputPlaceholderColor","inputBorderStyle","inputBorderWidth","inputBorderColor","inputBorderRadius","inputOutlineStyle","inputOutlineColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","valueInputHeight","valueInputMarginBottom","Yg","_CountryCodes__WEBPACK_IMPORTED_MODULE_6__","template","document","createElement","_descope_phone_input_box_internal_PhoneFieldInternalInputBox__WEBPACK_IMPORTED_MODULE_2__","T","appendChild","content","cloneNode","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_0__","Gh","_helpers_themeHelpers_resetHelpers__WEBPACK_IMPORTED_MODULE_7__","I4","kG","X6","_helpers_componentHelpers__WEBPACK_IMPORTED_MODULE_4__","observedAttributes","BaseInputClass","_baseClasses_createBaseInputClass__WEBPACK_IMPORTED_MODULE_3__","y","__WEBPACK_DEFAULT_EXPORT__","concat","ayt","textField","defaultDialCode","_helpers__WEBPACK_IMPORTED_MODULE_5__","Q","allowAlphanumericInput","minLength","parseInt","maxLength","restrictCountries","split","isFormatValue","isStrictValidation","nonParsedValue","parsedVal","parseWithCountryCode","country","countryCallingCode","nationalNumber","join","isTrusted","onInput","handleFocusEventsDispatching","getValidity","validPhonePattern","stripValue","sanitizeVal","isRequired","valueMissing","tooShort","isValidParsedValue","patternMismatch","args","attributeChangedCallback","attrName","oldValue","newValue","includes","attr","sanitizedInput","sanitizeInput","canFormat","formatPhoneNumber","trimDuplicateCountryCode","libphonenumber_js_min__WEBPACK_IMPORTED_MODULE_1__","l","dialCodePrefixPattern","RegExp","parsed","isValid","isAllowedCountry","telDigitsRegExp","char","phoneNumber","getCountryCodeFromValue","libphonenumber_js_min__WEBPACK_IMPORTED_MODULE_2__","reset","W","_PhoneFieldInternalInputBox__WEBPACK_IMPORTED_MODULE_1__","_PhoneFieldInputBoxClass__WEBPACK_IMPORTED_MODULE_2__","TQ","getCountryByCodeId","_CountryCodes__WEBPACK_IMPORTED_MODULE_0__","matchingParenthesis","openParenMatches","closeParenMatches"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"descope-hybrid-field-index-js.js","mappings":";0NAkBO,MAAAA,GAAsB,EAAAC,EAAAC,IAAgB,eAG7CC,EAAA,SAyFAC,KACAA,EAAAC,MACAA,EAAAC,YACAA,EAAAC,kBACAA,EAAAC,WACAA,EAAAC,MACAA,EAAAC,UACAA,EAAAC,WACAA,EAAAC,aACAA,EAAAC,oBACAA,EAAAC,cACAA,EAAAC,UACAA,EAAAC,cACAA,EAAAC,sBACAA,EAAAC,oBACAA,EAAAC,4BACAA,GACE,CACFf,KAAA,CAAUgB,SAAA,aACVf,MAAA,CAAWe,SAAA,iBACXb,kBAAA,CACAa,SAAA,+CAEAd,YAAA,CACA,CAAMc,SAAA,6BACN,CAAMA,SAAA,gDAENP,oBAAA,CAAyBO,SAAA,iCACzBZ,WAAA,CAAgBY,SAAA,uBAChBX,MAAA,CAAWW,SAAA,SACXV,UAAA,CAAeU,SAAA,+BACfN,cAAA,CAAmBM,SAAA,kBACnBT,WAAA,CAAgBS,SAAA,uBAChBR,aAAA,CAAkBQ,SAAA,yBAClBL,UAAA,CAAeK,SAAA,eACfJ,cAAA,CAAmBI,SAAA,wBACnBH,sBAAA,CAA2BG,SAAA,iCAC3BF,oBAAA,CAAyBE,SAAA,0CACzBD,4BAAA,CACAC,SAAA,+CAIOC,GAAwB,EAAAC,EAAAC,KAC7B,EAAAC,EAAAC,IAAgB,CAClBC,SAAA,CAEAC,SAAA,IAAmBvB,GACnBwB,WAAA,CAAAvB,EAAAG,EAAAG,EAAAC,GAEAiB,cAAA,IAAuBxB,EAAAyB,SAAA,aACvBC,gBAAA,IAAyB1B,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uBAAA,CACA,MAAA8C,EAAA,gBACAxI,EAAAA,EACA+F,MAAA,IACAhM,OAAA0O,GAAAD,EAAA7G,KAAA8G,IACAjC,KAAA,GACA,CAEA,OAAAxG,CACA,CAEA,EAAA+H,CAAAW,EAAA,IAEA,MAAA7K,EAAAzE,KAAAsG,aAAAtG,MAAAuP,EAAAD,GAGA,OAAA7K,GAKAzE,MAAAiM,GAAAjM,MAAAiM,EAAAgB,UAAAxI,IACAzE,MAAAiM,EAAA,IAAsBuD,EAAAnD,EAAS5H,IAI/BzE,MAAAiM,EAAAwD,QAGAzP,MAAAiM,EAAApR,MAAAyU,IAAAA,GAZAA,CAeA,CAEA,EAAAC,CAAA3I,GACA,MAAAqI,GAAmB,EAAAJ,EAAAC,GAA0BlI,GAC7C,OAAAqI,GAAAhC,SAAA,EACA,CAEA,EAAAyB,CAAA9H,GACA,SAAS,EAAAwF,EAAAsD,GAAmB9I,EAE5B,+CC9QA7C,eAAAC,OAAsB2L,EAAA1L,EAAe0L,EAAApM,0HCCrCQ,eAAAC,OAAsB4L,EAAAC,GAAeD,EAAApK,0DCF9B,MAAAsK,EAAArL,GACLsL,EAAAxM,EAAY4F,KAAAC,GAAAA,EAAAJ,OAAAvE,IAAA4E,SAEP2G,EAAApJ,IACP,MAAAqJ,EAAArJ,EAAAqC,MAAA,OACAiH,EAAAtJ,EAAAqC,MAAA,OACA,OAAAgH,GAAAlG,SAAAmG,GAAAnG","sources":["webpack://@descope/web-components-ui/../components/descope-email-field/src/component/EmailFieldClass.js","webpack://@descope/web-components-ui/../components/descope-email-field/src/component/emailPattern.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/email-field/theme/lumo/vaadin-email-field-styles.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/email-field/src/vaadin-email-field-styles.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/email-field/src/vaadin-email-field.js","webpack://@descope/web-components-ui/../components/descope-email-field/src/component/index.js","webpack://@descope/web-components-ui/./src/components/descope-hybrid-field/helpers.js","webpack://@descope/web-components-ui/./src/components/descope-hybrid-field/HybridFieldClass.js","webpack://@descope/web-components-ui/./src/components/descope-hybrid-field/index.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js","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/descope-phone-input-box-internal/index.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/index.js","webpack://@descope/web-components-ui/./src/components/phone-fields/helpers.js"],"sourcesContent":["import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n externalInputMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport { asciiPattern, unicodePattern } from './emailPattern';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '@descope-ui/common/theme-helpers';\n\nexport const componentName = getComponentName('email-field');\n\nconst defaultAutocomplete = 'username';\nconst defaultInputMode = 'email';\n\nconst customMixin = (superclass) =>\n class EmailFieldMixinClass extends superclass {\n // On by default - `accept-unicode=\"false\"` restores the pre-unicode field:\n // native `type=\"email\"` validation and the ASCII pattern.\n //\n // Read once, in `init`. Changing the attribute afterwards has no effect; it\n // is static configuration, which is how every consumer sets it.\n get acceptsUnicode() {\n return this.getAttribute('accept-unicode') !== 'false';\n }\n\n // On by default - `validate-format=\"false\"` drops the field's own format\n // check (the pattern and native `type=\"email\"`), for composites that check\n // the format themselves (descope-new-email). Read once, in `init`.\n get validatesFormat() {\n return this.getAttribute('validate-format') !== 'false';\n }\n\n init() {\n super.init?.();\n\n // we need to set the pattern on the base element because vaadin-email-field is overriding it\n this.baseElement.setAttribute('pattern', asciiPattern);\n\n if (!this.getAttribute('autocomplete')) {\n this.setAttribute('autocomplete', defaultAutocomplete);\n }\n\n this.createExternalInput();\n\n [this.inputElement, this.externalInput]\n .filter(Boolean)\n .forEach((input) => {\n input.addEventListener('change', this.stripSurroundingWhitespace);\n });\n\n if (this.acceptsUnicode) {\n this.enableUnicode();\n }\n\n if (!this.validatesFormat) {\n this.disableFormatValidation();\n }\n }\n\n enableUnicode() {\n this.baseElement.setAttribute('pattern', unicodePattern);\n this.useTextType();\n }\n\n disableFormatValidation() {\n // removed rather than left unset: vaadin-email-field has a default pattern\n this.baseElement.removeAttribute('pattern');\n this.useTextType();\n }\n\n useTextType() {\n // native `type=\"email\"` validation is ASCII only and sets typeMismatch\n // before `pattern` is consulted, so `text` is what lets the pattern decide.\n // Through vaadin's `_setType` because `type` is a readOnly property bound\n // to the inner input - assigning `input.type` is re-applied over.\n this.baseElement._setType('text');\n\n if (this.externalInput) {\n this.externalInput.type = 'text';\n }\n\n // `type=\"text\"` loses the email keyboard on mobile\n if (!this.getAttribute('inputmode')) {\n this.setAttribute('inputmode', defaultInputMode);\n }\n\n this.externalInput?.setAttribute('inputmode', defaultInputMode);\n }\n\n stripSurroundingWhitespace = (e) => {\n const trimmed = e.target.value.trim();\n if (trimmed === e.target.value) return;\n this.value = trimmed;\n\n // validity is cached and was computed against the untrimmed value\n this.inputElement.dispatchEvent(\n new Event('input', { bubbles: true, composed: true }),\n );\n };\n };\n\nconst {\n host,\n label,\n placeholder,\n requiredIndicator,\n inputField,\n input,\n inputMask,\n helperText,\n errorMessage,\n disabledPlaceholder,\n inputDisabled,\n inputIcon,\n externalInput,\n externalInputDisabled,\n externalPlaceholder,\n externalDisabledPlaceholder,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: {\n selector: '[required]::part(required-indicator)::after',\n },\n placeholder: [\n { selector: '> input:placeholder-shown' },\n { selector: () => ':host::slotted(input:placeholder-shown)' },\n ],\n disabledPlaceholder: { selector: '> input:disabled::placeholder' },\n inputField: { selector: '::part(input-field)' },\n input: { selector: 'input' },\n inputMask: { selector: '::part(input-field)::before' },\n inputDisabled: { selector: 'input:disabled' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n inputIcon: { selector: 'vaadin-icon' },\n externalInput: { selector: () => '::slotted(input)' },\n externalInputDisabled: { selector: () => '::slotted(input:disabled)' },\n externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },\n externalDisabledPlaceholder: {\n selector: () => '::slotted(input:disabled::placeholder)',\n },\n};\n\nexport const EmailFieldClass = compose(\n createStyleMixin({\n mappings: {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n inputValueFontWeight: [\n { ...input, property: 'font-weight' },\n { ...externalInput, property: 'font-weight' },\n ],\n inputPlaceholderFontWeight: [\n {\n selector: () => ':host input:placeholder-shown',\n property: 'font-weight',\n },\n { ...externalPlaceholder, property: 'font-weight' },\n ],\n helperTextFontWeight: { ...helperText, property: 'font-weight' },\n errorMessageFontWeight: { ...errorMessage, property: 'font-weight' },\n\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: '-webkit-text-fill-color' },\n ],\n\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n inputDirection: { ...input, property: 'direction' },\n\n inputBackgroundColor: [\n { ...inputField, property: 'background-color' },\n { ...inputMask, property: 'background-color' },\n ],\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: {\n ...errorMessage,\n property: 'padding-inline-start',\n },\n errorMessageIconRepeat: {\n ...errorMessage,\n property: 'background-repeat',\n },\n errorMessageIconPosition: {\n ...errorMessage,\n property: 'background-position',\n },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n helperTextColor: { ...helperText, property: '-webkit-text-fill-color' },\n\n inputValueTextColor: [\n { ...inputField, property: 'color' },\n { ...inputDisabled, property: '-webkit-text-fill-color' },\n { ...externalInputDisabled, property: '-webkit-text-fill-color' },\n ],\n inputCaretTextColor: [\n { ...input, property: 'caret-color' },\n { ...externalInput, property: 'caret-color' },\n ],\n\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...input, property: 'padding-left' },\n { ...input, property: 'padding-right' },\n { ...externalInput, property: 'padding-left' },\n { ...externalInput, property: 'padding-right' },\n ],\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n\n textAlign: {},\n\n inputTextAlign: [\n { ...input, property: 'text-align' },\n { ...externalInput, property: 'text-align' },\n ],\n\n inputPlaceholderColor: [\n { selector: () => ':host input:placeholder-shown', property: 'color' },\n { ...externalPlaceholder, property: 'color' },\n { ...placeholder, property: 'color' },\n { ...disabledPlaceholder, property: '-webkit-text-fill-color' },\n { ...externalDisabledPlaceholder, property: '-webkit-text-fill-color' },\n ],\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 placeholderOpacity: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...externalPlaceholder, property: 'opacity' },\n ],\n inputVerticalAlignment: [\n { ...inputField, property: 'align-items' },\n { ...externalInput, property: 'align-items' },\n ],\n valueInputHeight: [\n { ...input, property: 'height' },\n { ...externalInput, property: 'height' },\n ],\n valueInputMarginBottom: [\n { ...input, property: 'margin-bottom' },\n { ...externalInput, property: 'margin-bottom' },\n ],\n\n inputIconOffset: [\n { ...inputIcon, property: 'margin-right' },\n { ...inputIcon, property: 'margin-left' },\n ],\n inputIconSize: { ...inputIcon, property: 'font-size' },\n inputIconColor: { ...inputIcon, property: 'color' },\n inputTextSecurity: [\n { ...input, property: '-webkit-text-security' },\n { ...input, property: 'text-security' },\n { ...externalInput, property: '-webkit-text-security' },\n { ...externalInput, property: 'text-security' },\n ],\n },\n }),\n draggableMixin,\n externalInputMixin({\n inputType: 'email',\n inputName: 'email',\n autocompleteType: 'username',\n includeAttrs: ['disabled', 'readonly', 'pattern'],\n }),\n proxyInputMixin({\n proxyProps: ['value', 'selectionStart'],\n useProxyTargets: true,\n }),\n componentNameValidationMixin,\n customMixin,\n)(\n createProxy({\n slots: ['', 'suffix'],\n wrappedEleName: 'vaadin-email-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(${EmailFieldClass.cssVarList.inputOutlineWidth}) + var(${\n EmailFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n ${resetInputLabelPosition('vaadin-email-field')}\n\t\t\t${useHostExternalPadding(EmailFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-email-field', EmailFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-email-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-email-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\n vaadin-email-field[external-input=\"true\"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n }),\n);\n","// Kept in its own module (with no imports) so it can be unit tested without\n// pulling in the whole component / vaadin dependency chain.\n\n// domain: dot-separated labels, each starting and ending with a letter or digit\n// (no empty labels, no leading/trailing hyphen), then the TLD\nexport const asciiPattern =\n \"^[\\\\w\\\\.\\\\%\\\\+\\\\-']+@(?:[A-Za-z0-9](?:[A-Za-z0-9\\\\-]*[A-Za-z0-9])?\\\\.)+[A-Za-z]{2,}$\";\n\nexport const unicodePattern =\n \"^[\\\\p{L}\\\\p{M}\\\\p{N}._%+'\\\\-]+@(?:[\\\\p{L}\\\\p{M}\\\\p{N}](?:[\\\\p{L}\\\\p{M}\\\\p{N}\\\\-]*[\\\\p{L}\\\\p{M}\\\\p{N}])?\\\\.)+[\\\\p{L}\\\\p{M}][\\\\p{L}\\\\p{M}\\\\p{N}\\\\-]+$\";\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 { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst emailField = css`\n :host([dir='rtl']) [part='input-field'] ::slotted(input) {\n --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);\n }\n\n :host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {\n --_lumo-text-field-overflow-mask-image: none;\n }\n`;\n\nregisterStyles('vaadin-email-field', [inputFieldShared, emailField], {\n moduleId: 'lumo-email-field',\n});\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 { css } from 'lit';\n\n// See https://github.com/vaadin/vaadin-text-field/issues/466\nexport const emailFieldStyles = css`\n :host([dir='rtl']) [part='input-field'] {\n direction: ltr;\n }\n\n :host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {\n direction: rtl;\n text-align: left;\n }\n`;\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 { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { TextField } from '@vaadin/text-field/src/vaadin-text-field.js';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { emailFieldStyles } from './vaadin-email-field-styles.js';\n\nregisterStyles('vaadin-email-field', emailFieldStyles, { moduleId: 'vaadin-email-field-styles' });\n\n/**\n * `<vaadin-email-field>` is a Web Component for email field control in forms.\n *\n * ```html\n * <vaadin-email-field label=\"Email\"></vaadin-email-field>\n * ```\n *\n * ### Styling\n *\n * `<vaadin-email-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\n * See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.\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 TextField\n */\nexport class EmailField extends TextField {\n static get is() {\n return 'vaadin-email-field';\n }\n\n constructor() {\n super();\n this._setType('email');\n this.pattern = '^([a-zA-Z0-9_\\\\.\\\\-+])+@[a-zA-Z0-9\\\\-.]+\\\\.[a-zA-Z0-9\\\\-]{2,}$';\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n if (this.inputElement) {\n this.inputElement.autocapitalize = 'off';\n }\n }\n}\n\ndefineCustomElement(EmailField);\n","import '@vaadin/email-field';\nimport { componentName, EmailFieldClass } from './EmailFieldClass';\n\ncustomElements.define(componentName, EmailFieldClass);\n\nexport { EmailFieldClass, componentName };\n","// Matches any character that is not a digit, whitespace, or phone formatting character (+, -, (, ))\nconst INVALID_PHONE_CHARS_RE = /[^\\d\\s+\\-()]/;\n\nexport const isNumericValue = (val) => !!val && !INVALID_PHONE_CHARS_RE.test(val);\n\nexport const sanitizeCountryCodePrefix = (val) => val.replace(/\\+\\d+-/, '');\n","import { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';\nimport { isNumericValue, sanitizeCountryCodePrefix as sanitizeValue } from './helpers';\nimport { PhoneFieldClass } from '../phone-fields/descope-phone-field/PhoneFieldClass';\nimport { PhoneFieldInputBoxClass } from '../phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass';\n\nexport const componentName = getComponentName('hybrid-field');\n\nconst attrs = {\n shared: [\n 'label',\n 'bordered',\n 'full-width',\n 'label-type',\n 'size',\n 'disabled',\n 'readonly',\n 'required',\n 'st-host-direction',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n ],\n email: [\n 'placeholder',\n 'data-errormessage-value-missing-email',\n 'data-errormessage-pattern-mismatch-email',\n 'external-input',\n ],\n phone: {\n countryCode: [\n 'phone-input-label',\n 'country-input-label',\n 'country-input-placeholder',\n 'restrict-countries',\n 'default-code',\n 'phone-minlength',\n 'phone-format-value',\n 'phone-strict-validation',\n 'phone-input-type',\n 'data-errormessage-value-missing-phone',\n ],\n inputBox: [\n 'restrict-countries',\n 'default-code',\n 'phone-minlength',\n 'phone-format-value',\n 'phone-strict-validation',\n 'phone-input-type',\n 'data-errormessage-value-missing-phone',\n ],\n },\n};\n\nconst attrMap = {\n email: {\n 'data-errormessage-value-missing-email': 'data-errormessage-value-missing',\n 'data-errormessage-pattern-mismatch-email': 'data-errormessage-pattern-mismatch',\n },\n phone: {\n 'phone-input-label': 'label',\n 'phone-minlength': 'minlength',\n 'phone-format-value': 'format-value',\n 'phone-strict-validation': 'strict-validation',\n 'data-errormessage-value-missing-phone': 'data-errormessage-value-missing',\n },\n};\n\nconst EMAIL_FIELD = 'descope-email-field';\nconst PHONE_FIELD = 'descope-phone-field';\nconst PHONE_INPUT_BOX_FIELD = 'descope-phone-input-box-field';\n\nconst BaseClass = createBaseClass({\n componentName,\n baseSelector: 'div',\n});\n\nclass RawHybridField extends BaseClass {\n #isReportedValidity = false;\n\n #selectionStart;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <descope-email-field external-input=\"${this.isExternalInput}\"></descope-email-field>\n <descope-phone-field allow-alphanumeric-input=\"true\" phone-input-type=\"text\"></descope-phone-field>\n <descope-phone-input-box-field allow-alphanumeric-input=\"true\" phone-input-type=\"text\"></descope-phone-input-box-field>\n </div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n box-sizing: border-box;\n padding: 0;\n gap: 0;\n }\n .wrapper {\n display: grid;\n width: 100%;\n }\n descope-email-field,\n descope-phone-field,\n descope-phone-input-box-field {\n grid-area: 1/1;\n width: 100%;\n height: 100%;\n }\n .hidden {\n visibility: hidden;\n }\n `,\n this\n );\n }\n\n get isExternalInput() {\n return this.getAttribute('external-input') === 'true';\n }\n\n get emailInputEle() {\n return this.isExternalInput ? this.emailInput.externalInput : this.emailInput.inputElement;\n }\n\n get phoneVariant() {\n const isInputBox = this.getAttribute('phone-variant') === 'inputBox';\n return isInputBox ? this.phoneInputBoxInput : this.phoneCountryCodeInput;\n }\n\n get defaultCode() {\n const firstItem = this.phoneCountryCodeInput.countryCodes?.[0] || '';\n return this.getAttribute('default-code') || firstItem;\n }\n\n get activeInputEle() {\n if (this.activeInput === this.emailInput) {\n return this.emailInputEle;\n }\n return this.phoneVariant.phoneNumberInputEle;\n }\n\n get value() {\n return this.activeInput?.value || '';\n }\n\n set value(val) {\n this.handleActiveInput(val);\n setTimeout(() => {\n this.activeInput.value = val;\n });\n }\n\n async init() {\n super.init?.();\n\n this.initInputs();\n this.updateAttrs();\n this.toggleInputVisibility();\n\n await this.waitForInputs();\n\n this.initInputEles();\n this.overrideEmailInputType();\n this.overrideEmailSetAttribute();\n }\n\n waitForInputs() {\n return new Promise((resolve) => {\n const check = setInterval(() => {\n if (this.emailInputEle) {\n clearInterval(check);\n resolve();\n }\n });\n });\n }\n\n initInputs() {\n this.emailInput = this.shadowRoot.querySelector(EMAIL_FIELD);\n this.phoneCountryCodeInput = this.shadowRoot.querySelector(PHONE_FIELD);\n this.phoneInputBoxInput = this.shadowRoot.querySelector(PHONE_INPUT_BOX_FIELD);\n\n this.inputs = [this.emailInput, this.phoneCountryCodeInput, this.phoneInputBoxInput];\n\n this.activeInput = this.emailInput;\n }\n\n // we need to listen on the inner `input` element itself, otherwise we don't always get an `input` event\n initInputEles() {\n const inputEles = [\n this.emailInputEle,\n this.phoneCountryCodeInput.phoneNumberInputEle,\n this.phoneInputBoxInput.phoneNumberInputEle,\n ];\n\n inputEles.forEach((ele) => {\n ele.addEventListener('input', this.onValueChange.bind(this));\n });\n }\n\n overrideEmailInputType() {\n this.emailInputEle.addEventListener('focus', () => {\n this.emailInputEle.setAttribute('type', 'text');\n });\n this.emailInputEle.addEventListener('blur', () => {\n setTimeout(() => {\n this.emailInputEle.setAttribute('type', 'email');\n });\n });\n }\n\n // We want to prevent Vaadin from changing the input type to `email`\n // otherwise, we cannot get the selectionStart from the input.\n overrideEmailSetAttribute() {\n const origEmailSetAttr = this.emailInput.setAttribute.bind(this.emailInputEle);\n this.emailInputEle.setAttribute = (name, value) => {\n if (name !== 'type' || value !== 'email' || !this.emailInput.hasAttribute('focused')) {\n return origEmailSetAttr(name, value);\n }\n return false;\n };\n }\n\n updateAttrs() {\n forwardAttrs(this, this.emailInput, { includeAttrs: attrs.email, mapAttrs: attrMap.email });\n\n forwardAttrs(this, this.phoneCountryCodeInput, {\n includeAttrs: attrs.phone.countryCode,\n mapAttrs: attrMap.phone,\n });\n\n forwardAttrs(this, this.phoneInputBoxInput, {\n includeAttrs: attrs.phone.inputBox,\n mapAttrs: attrMap.phone,\n });\n\n this.inputs.forEach((input) => forwardAttrs(this, input, { includeAttrs: attrs.shared }));\n\n setTimeout(() => this.phoneCountryCodeInput.setAttribute('default-code', this.defaultCode));\n }\n\n onValueChange() {\n this.#selectionStart = this.activeInputEle.selectionStart;\n // phone components expose an API to their inputElement; in case of phone variants like\n // phone-input-box-field, we want to make sure that the value being passed\n // is raw value from input, and not the value with a dial-code prefix, or other decorations\n // applied behind the scenes by the phone components\n this.handleActiveInput(this.activeInputEle.value || this.activeInput.value);\n }\n\n handleActiveInput(val) {\n const expectedActiveInput = isNumericValue(val) ? this.phoneVariant : this.emailInput;\n\n if (this.activeInput !== expectedActiveInput) {\n this.setActiveInput(expectedActiveInput);\n }\n }\n\n setActiveInput(expectedActiveInput) {\n // phone components expose an API to their inputElement; in case of phone variants like\n // phone-input-box-field, we want to make sure that the value being passed\n // is raw value from input, and not the value with a dial-code prefix, or other decorations\n // applied behind the scenes by the phone components\n const val = this.activeInputEle.value || this.activeInput.value;\n\n this.activeInput = expectedActiveInput;\n this.setActiveInputValue(val);\n if (this.#isReportedValidity) this.activeInput.reportValidity();\n this.setActiveInputSelectionStart();\n this.toggleInputVisibility();\n }\n\n setActiveInputSelectionStart() {\n setTimeout(() => {\n const ele = this.activeInputEle;\n ele.focus();\n // setSelectionRange throws InvalidStateError on input types that do not\n // support selection (e.g. `email`). The focus handler usually switches\n // type to `text` first, but that can race with the blur timer or fail\n // to fire (e.g. background tab). Restoring the caret is best-effort.\n try {\n ele.setSelectionRange?.(this.#selectionStart, this.#selectionStart);\n } catch {\n /* noop */\n }\n });\n }\n\n #getDefaultDialCode() {\n const code = this.getAttribute('default-code');\n const match = code && PhoneFieldClass.CountryCodes.find((c) => c.code === code);\n return match?.dialCode || PhoneFieldClass.CountryCodes[0]?.dialCode || '';\n }\n\n setActiveInputValue(val) {\n const sanitizedVal = sanitizeValue(val);\n const isPhoneField = this.activeInput.localName === PHONE_FIELD;\n if (isPhoneField) {\n const dialCode = this.phoneCountryCodeInput.countryCodeItems || this.#getDefaultDialCode();\n this.activeInput.value = `${dialCode}-${sanitizedVal}`;\n } else {\n this.activeInput.value = sanitizedVal;\n }\n }\n\n toggleInputVisibility() {\n this.inputs.forEach((input) => {\n input !== this.activeInput ? input.classList.add('hidden') : input.classList.remove('hidden');\n });\n }\n\n reportValidity() {\n this.#isReportedValidity = true;\n\n const ele = this.activeInputEle;\n\n // On reportValidity we want to set the caret at the end of the input value.\n // Since checkValidity triggers `focus` on the input, it sets the caret at the start of the input,\n // regardless the existing value.\n const origInputType = ele.type;\n ele.setAttribute('type', 'text');\n setTimeout(() => {\n ele.setSelectionRange?.(ele.value.length, ele.value.length);\n ele.setAttribute('type', origInputType);\n });\n\n return this.activeInput.reportValidity();\n }\n\n checkValidity() {\n return this.activeInput.checkValidity();\n }\n}\n\nexport const HybridFieldClass = compose(\n createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDirection: [\n { selector: () => 'descope-email-field', property: 'direction' },\n { selector: () => 'descope-phone-field', property: 'direction' },\n { selector: () => 'descope-phone-input-box-field', property: 'direction' },\n ],\n errorMessageIcon: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIcon,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIcon,\n },\n ],\n errorMessageIconSize: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIconSize,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconSize,\n },\n ],\n errorMessageIconPadding: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIconPadding,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconPadding,\n },\n ],\n errorMessageIconRepeat: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIconRepeat,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconRepeat,\n },\n ],\n errorMessageIconPosition: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIconPosition,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconPosition,\n },\n ],\n errorMessageFontSize: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageFontSize,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageFontSize,\n },\n ],\n labelFontWeight: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.labelFontWeight,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.labelFontWeight,\n },\n ],\n inputValueFontWeight: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.inputValueFontWeight,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.inputValueFontWeight,\n },\n ],\n inputPlaceholderFontWeight: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.inputPlaceholderFontWeight,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.inputPlaceholderFontWeight,\n },\n ],\n helperTextFontWeight: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.helperTextFontWeight,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.helperTextFontWeight,\n },\n ],\n errorMessageFontWeight: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageFontWeight,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageFontWeight,\n },\n ],\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawHybridField);\n","import '@descope-ui/descope-email-field';\nimport '../phone-fields/descope-phone-field';\nimport '../phone-fields/descope-phone-input-box-field';\n\nimport { componentName, HybridFieldClass } from './HybridFieldClass';\n\ncustomElements.define(componentName, HybridFieldClass);\n\nexport { HybridFieldClass, componentName };\n","import { syncAttrs } from '@descope-ui/common/components-helpers';\nimport { TextFieldClass } from '@descope-ui/descope-text-field/class';\nimport { 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 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 syncAttrs(this, this.inputElement, { includeAttrs: ['has-value'] });\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 'phone-input-type',\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 inputValueFontWeight: { ...phoneInput, property: textVars.inputValueFontWeight },\n inputPlaceholderFontWeight: { ...phoneInput, property: textVars.inputPlaceholderFontWeight },\n helperTextFontWeight: { ...helperText, property: 'font-weight' },\n errorMessageFontWeight: { ...errorMessage, 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', 'style'],\n componentName,\n })\n);\n\nexport default PhoneFieldInputBoxClass;\n","import { forwardAttrs } from '@descope-ui/common/components-helpers';\nimport parsePhoneNumberFromString, { AsYouType } from 'libphonenumber-js/min';\nimport { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport { getComponentName } from '../../../../helpers/componentHelpers';\nimport { getCountryByCodeId, matchingParenthesis } from '../../helpers';\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 'phone-input-type',\n];\nconst mapAttrs = {\n 'phone-input-placeholder': 'placeholder',\n 'phone-input-type': 'type',\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 forwardAttrs(this.textField, this, { includeAttrs: ['has-value'] });\n\n forwardAttrs(this, this.textField, {\n includeAttrs: ['phone-input-type'],\n mapAttrs: { 'phone-input-type': 'type' },\n });\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 '@descope-ui/descope-text-field';\n\nimport PhoneFieldInternalInputBox, { componentName } from './PhoneFieldInternalInputBox';\n\ncustomElements.define(componentName, PhoneFieldInternalInputBox);\n","import './descope-phone-input-box-internal';\nimport '@descope-ui/descope-text-field';\n\nimport { componentName, PhoneFieldInputBoxClass } from './PhoneFieldInputBoxClass';\n\ncustomElements.define(componentName, PhoneFieldInputBoxClass);\n\nexport { PhoneFieldInputBoxClass, componentName };\n","import parsePhoneNumberFromString from 'libphonenumber-js/min';\nimport CountryCodes from './CountryCodes';\n\nexport const getCountryByCodeId = (countryCode) =>\n CountryCodes.find((c) => c.code === countryCode)?.dialCode;\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","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_3__","xE","defaultInputMode","host","label","placeholder","requiredIndicator","inputField","input","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","selector","EmailFieldClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_1__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","RF","mappings","fontSize","fontFamily","labelFontSize","property","labelFontWeight","inputValueFontWeight","inputPlaceholderFontWeight","helperTextFontWeight","errorMessageFontWeight","labelTextColor","hostWidth","hostMinWidth","hostDirection","inputDirection","inputBackgroundColor","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","helperTextColor","inputValueTextColor","inputCaretTextColor","labelRequiredIndicator","inputBorderColor","inputBorderWidth","inputBorderStyle","inputBorderRadius","inputHeight","inputHorizontalPadding","inputOutlineColor","inputOutlineStyle","inputOutlineWidth","inputOutlineOffset","textAlign","inputTextAlign","inputPlaceholderColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","valueInputMarginBottom","inputIconOffset","inputIconSize","inputIconColor","inputTextSecurity","VO","RV","inputType","inputName","autocompleteType","includeAttrs","OZ","proxyProps","useProxyTargets","tQ","superclass","acceptsUnicode","this","getAttribute","validatesFormat","init","super","baseElement","setAttribute","_emailPattern__WEBPACK_IMPORTED_MODULE_2__","a","createExternalInput","inputElement","filter","Boolean","forEach","addEventListener","stripSurroundingWhitespace","enableUnicode","disableFormatValidation","g","useTextType","removeAttribute","_setType","type","e","trimmed","target","value","trim","dispatchEvent","Event","bubbles","composed","tz","slots","wrappedEleName","style","cssVarList","_descope_ui_common_theme_helpers__WEBPACK_IMPORTED_MODULE_4__","$J","cy","LJ","Kl","excludeAttrsSync","asciiPattern","unicodePattern","emailField","vaadin_themable_mixin","AH","SF","input_field_shared","k","moduleId","emailFieldStyles","EmailField","src_vaadin_text_field","A","is","constructor","pattern","ready","autocapitalize","src_define","X","customElements","define","T","v","INVALID_PHONE_CHARS_RE","componentHelpers","attrs","shared","email","phone","countryCode","inputBox","attrMap","PHONE_FIELD","BaseClass","createBaseClass","q","baseSelector","HybridFieldClass","helpers","mixins","componentNameOverride","PhoneFieldClass","NF","PhoneFieldInputBoxClass","Ul","isReportedValidity","selectionStart","attachShadow","mode","innerHTML","isExternalInput","componentsHelpers","fz","emailInputEle","emailInput","phoneVariant","phoneInputBoxInput","phoneCountryCodeInput","defaultCode","firstItem","countryCodes","activeInputEle","activeInput","phoneNumberInputEle","val","handleActiveInput","setTimeout","initInputs","updateAttrs","toggleInputVisibility","waitForInputs","initInputEles","overrideEmailInputType","overrideEmailSetAttribute","Promise","resolve","check","setInterval","clearInterval","shadowRoot","querySelector","inputs","ele","onValueChange","bind","origEmailSetAttr","name","hasAttribute","EA","mapAttrs","expectedActiveInput","test","isNumericValue","setActiveInput","setActiveInputValue","reportValidity","setActiveInputSelectionStart","focus","setSelectionRange","getDefaultDialCode","code","match","CountryCodes","find","c","dialCode","sanitizedVal","replace","sanitizeCountryCodePrefix","localName","countryCodeItems","classList","add","remove","origInputType","length","checkValidity","textVars","_descope_ui_descope_text_field_class__WEBPACK_IMPORTED_MODULE_1__","w","_helpers_componentHelpers__WEBPACK_IMPORTED_MODULE_3__","internalComponent","internalComponentAfter","phoneInput","_helpers__WEBPACK_IMPORTED_MODULE_4__","_mixins__WEBPACK_IMPORTED_MODULE_5__","inputPlaceholderTextColor","Yg","_CountryCodes__WEBPACK_IMPORTED_MODULE_6__","template","document","createElement","_descope_phone_input_box_internal_PhoneFieldInternalInputBox__WEBPACK_IMPORTED_MODULE_2__","appendChild","content","cloneNode","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_0__","Gh","_helpers_themeHelpers_resetHelpers__WEBPACK_IMPORTED_MODULE_7__","I4","kG","X6","_helpers_componentHelpers__WEBPACK_IMPORTED_MODULE_4__","observedAttributes","BaseInputClass","_baseClasses_createBaseInputClass__WEBPACK_IMPORTED_MODULE_3__","y","__WEBPACK_DEFAULT_EXPORT__","concat","ayt","textField","defaultDialCode","_helpers__WEBPACK_IMPORTED_MODULE_5__","Q","allowAlphanumericInput","minLength","parseInt","maxLength","restrictCountries","split","isFormatValue","isStrictValidation","nonParsedValue","parsedVal","parseWithCountryCode","country","countryCallingCode","nationalNumber","join","isTrusted","onInput","handleFocusEventsDispatching","getValidity","validPhonePattern","stripValue","sanitizeVal","isRequired","valueMissing","tooShort","isValidParsedValue","patternMismatch","args","attributeChangedCallback","attrName","oldValue","newValue","includes","attr","sanitizedInput","sanitizeInput","canFormat","formatPhoneNumber","trimDuplicateCountryCode","libphonenumber_js_min__WEBPACK_IMPORTED_MODULE_1__","l","dialCodePrefixPattern","RegExp","parsed","isValid","isAllowedCountry","telDigitsRegExp","char","phoneNumber","getCountryCodeFromValue","libphonenumber_js_min__WEBPACK_IMPORTED_MODULE_2__","reset","W","_PhoneFieldInternalInputBox__WEBPACK_IMPORTED_MODULE_1__","_PhoneFieldInputBoxClass__WEBPACK_IMPORTED_MODULE_2__","TQ","getCountryByCodeId","_CountryCodes__WEBPACK_IMPORTED_MODULE_0__","matchingParenthesis","openParenMatches","closeParenMatches"],"sourceRoot":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*! For license information please see descope-new-email.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3034,4232,4838],{67383(t,e,i){i.d(e,{T:()=>s,v:()=>S});var r=i(88961),n=i(63200),a=i(92985),o=i(25964),l=i(79673);const s=(0,o.xE)("email-field"),p="email",{host:d,label:u,placeholder:c,requiredIndicator:h,inputField:m,input:g,inputMask:y,helperText:f,errorMessage:b,disabledPlaceholder:v,inputDisabled:x,inputIcon:I,externalInput:w,externalInputDisabled:A,externalPlaceholder:E,externalDisabledPlaceholder:k}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},S=(0,n.Zz)((0,r.RF)({mappings:{fontSize:[{},d],fontFamily:[u,m,f,b],labelFontSize:{...u,property:"font-size"},labelFontWeight:{...u,property:"font-weight"},inputValueFontWeight:[{...g,property:"font-weight"},{...w,property:"font-weight"}],inputPlaceholderFontWeight:[{selector:()=>":host input:placeholder-shown",property:"font-weight"},{...E,property:"font-weight"}],helperTextFontWeight:{...f,property:"font-weight"},errorMessageFontWeight:{...b,property:"font-weight"},labelTextColor:[{...u,property:"color"},{...h,property:"color"},{...u,property:"-webkit-text-fill-color"},{...h,property:"-webkit-text-fill-color"}],hostWidth:{...d,property:"width"},hostMinWidth:{...d,property:"min-width"},hostDirection:{...d,property:"direction"},inputDirection:{...g,property:"direction"},inputBackgroundColor:[{...m,property:"background-color"},{...y,property:"background-color"}],errorMessageTextColor:{...b,property:"color"},errorMessageIcon:{...b,property:"background-image"},errorMessageIconSize:{...b,property:"background-size"},errorMessageIconPadding:{...b,property:"padding-inline-start"},errorMessageIconRepeat:{...b,property:"background-repeat"},errorMessageIconPosition:{...b,property:"background-position"},errorMessageFontSize:{...b,property:"font-size"},helperTextColor:{...f,property:"-webkit-text-fill-color"},inputValueTextColor:[{...m,property:"color"},{...x,property:"-webkit-text-fill-color"},{...A,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...g,property:"caret-color"},{...w,property:"caret-color"}],labelRequiredIndicator:{...h,property:"content"},inputBorderColor:{...m,property:"border-color"},inputBorderWidth:{...m,property:"border-width"},inputBorderStyle:{...m,property:"border-style"},inputBorderRadius:{...m,property:"border-radius"},inputHeight:{...m,property:"height"},inputHorizontalPadding:[{...g,property:"padding-left"},{...g,property:"padding-right"},{...w,property:"padding-left"},{...w,property:"padding-right"}],inputOutlineColor:{...m,property:"outline-color"},inputOutlineStyle:{...m,property:"outline-style"},inputOutlineWidth:{...m,property:"outline-width"},inputOutlineOffset:{...m,property:"outline-offset"},textAlign:{},inputTextAlign:[{...g,property:"text-align"},{...w,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...E,property:"color"},{...c,property:"color"},{...v,property:"-webkit-text-fill-color"},{...k,property:"-webkit-text-fill-color"}],labelPosition:{...u,property:"position"},labelTopPosition:{...u,property:"top"},labelHorizontalPosition:[{...u,property:"left"},{...u,property:"right"}],inputTransformY:{...u,property:"transform"},inputTransition:{...u,property:"transition"},marginInlineStart:{...u,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...E,property:"opacity"}],inputVerticalAlignment:[{...m,property:"align-items"},{...w,property:"align-items"}],valueInputHeight:[{...g,property:"height"},{...w,property:"height"}],valueInputMarginBottom:[{...g,property:"margin-bottom"},{...w,property:"margin-bottom"}],inputIconOffset:[{...I,property:"margin-right"},{...I,property:"margin-left"}],inputIconSize:{...I,property:"font-size"},inputIconColor:{...I,property:"color"},inputTextSecurity:[{...g,property:"-webkit-text-security"},{...g,property:"text-security"},{...w,property:"-webkit-text-security"},{...w,property:"text-security"}]}}),r.VO,(0,r.RV)({inputType:"email",inputName:"email",autocompleteType:"username",includeAttrs:["disabled","readonly","pattern"]}),(0,r.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),r.tQ,t=>class extends t{get acceptsUnicode(){return"false"!==this.getAttribute("accept-unicode")}get validatesFormat(){return"false"!==this.getAttribute("validate-format")}init(){super.init?.(),this.baseElement.setAttribute("pattern",a.a),this.getAttribute("autocomplete")||this.setAttribute("autocomplete","username"),this.createExternalInput(),[this.inputElement,this.externalInput].filter(Boolean).forEach(t=>{t.addEventListener("change",this.stripSurroundingWhitespace)}),this.acceptsUnicode&&this.enableUnicode(),this.validatesFormat||this.disableFormatValidation()}enableUnicode(){this.baseElement.setAttribute("pattern",a.g),this.useTextType()}disableFormatValidation(){this.baseElement.removeAttribute("pattern"),this.useTextType()}useTextType(){this.baseElement._setType("text"),this.externalInput&&(this.externalInput.type="text"),this.getAttribute("inputmode")||this.setAttribute("inputmode",p),this.externalInput?.setAttribute("inputmode",p)}stripSurroundingWhitespace=t=>{const e=t.target.value.trim();e!==t.target.value&&(this.value=e,this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))}})((0,r.tz)({slots:["","suffix"],wrappedEleName:"vaadin-email-field",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(${S.cssVarList.inputOutlineWidth}) + var(${S.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${(0,l.$J)("vaadin-email-field")}\n\t\t\t${(0,l.cy)(S.cssVarList)}\n\t\t\t${(0,l.LJ)("vaadin-email-field",S.cssVarList)}\n ${(0,l.Kl)()}\n\n vaadin-email-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\n vaadin-email-field[external-input="true"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:s}))},92985(t,e,i){i.d(e,{a:()=>r,g:()=>n});const r="^[\\w\\.\\%\\+\\-']+@(?:[A-Za-z0-9](?:[A-Za-z0-9\\-]*[A-Za-z0-9])?\\.)+[A-Za-z]{2,}$",n="^[\\p{L}\\p{M}\\p{N}._%+'\\-]+@(?:[\\p{L}\\p{M}\\p{N}](?:[\\p{L}\\p{M}\\p{N}\\-]*[\\p{L}\\p{M}\\p{N}])?\\.)+[\\p{L}\\p{M}][\\p{L}\\p{M}\\p{N}\\-]+$"},30133(t,e,i){i.r(e),i.d(e,{EmailFieldClass:()=>d.v,componentName:()=>d.T}),i(52733);var r=i(47642),n=i(87550);const a=n.AH`
|
|
3
|
+
:host([dir='rtl']) [part='input-field'] ::slotted(input) {
|
|
4
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
|
|
8
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
9
|
+
}
|
|
10
|
+
`;(0,n.SF)("vaadin-email-field",[r.k,a],{moduleId:"lumo-email-field"});var o=i(82901),l=i(27136);const s=i(51450).AH`
|
|
11
|
+
:host([dir='rtl']) [part='input-field'] {
|
|
12
|
+
direction: ltr;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {
|
|
16
|
+
direction: rtl;
|
|
17
|
+
text-align: left;
|
|
18
|
+
}
|
|
19
|
+
`;(0,n.SF)("vaadin-email-field",s,{moduleId:"vaadin-email-field-styles"});class p extends l.A{static get is(){return"vaadin-email-field"}constructor(){super(),this._setType("email"),this.pattern="^([a-zA-Z0-9_\\.\\-+])+@[a-zA-Z0-9\\-.]+\\.[a-zA-Z0-9\\-]{2,}$"}ready(){super.ready(),this.inputElement&&(this.inputElement.autocapitalize="off")}}(0,o.X)(p);var d=i(67383);customElements.define(d.T,d.v)},94216(t,e,i){i.r(e),i.d(e,{NewEmailClass:()=>b,componentName:()=>u}),i(11284),i(30133);var r=i(25964),n=i(72270),a=i(92985),o=i(88961),l=i(63200),s=i(79673),p=i(67383);const d=(0,r.xE)("new-email-internal"),u=(0,r.xE)("new-email"),{host:c,label:h,internalInputsWrapper:m,errorMessage:g,helperText:y,emailInput:f}={host:{selector:()=>":host"},label:{selector:"::part(label)"},internalInputsWrapper:{selector:"descope-new-email-internal .wrapper"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},emailInput:{selector:"descope-email-field"}},b=(0,l.Zz)((0,o.RF)({mappings:{fontSize:[c,{},{selector:p.v.componentName,property:p.v.cssVarList.fontSize}],fontFamily:[h,g,y],labelFontSize:{...h,property:"font-size"},labelFontWeight:{...h,property:"font-weight"},inputValueFontWeight:{...f,property:p.v.cssVarList.inputValueFontWeight},inputPlaceholderFontWeight:{...f,property:p.v.cssVarList.inputPlaceholderFontWeight},helperTextFontWeight:{...y,property:"font-weight"},errorMessageFontWeight:{...g,property:"font-weight"},labelTextColor:{...h,property:"color"},errorMessageTextColor:{...g,property:"color"},errorMessageIcon:{...g,property:"background-image"},errorMessageIconSize:{...g,property:"background-size"},errorMessageIconPadding:{...g,property:"padding-inline-start"},errorMessageIconRepeat:{...g,property:"background-repeat"},errorMessageIconPosition:{...g,property:"background-position"},errorMessageFontSize:{...g,property:"font-size"},hostWidth:{...c,property:"width"},hostMinWidth:{...c,property:"min-width"},hostDirection:[{...c,property:"direction"},{...f,property:p.v.cssVarList.hostDirection}],inputsRequiredIndicator:{...c,property:"content"},spaceBetweenInputs:{...m,property:"gap"},valueInputHeight:{...f,property:p.v.cssVarList.valueInputHeight},valueInputMarginBottom:{...f,property:p.v.cssVarList.valueInputMarginBottom}}}),o.VO,o.Yg,(0,o.OZ)({proxyProps:["value","selectionStart"]}),t=>class extends t{init(){super.init?.();const t=document.createElement("template"),e="true"===this.getAttribute("external-input"),i="false"!==this.getAttribute("accept-unicode");t.innerHTML=`\n\t\t\t<${d}\n\t\t\t\tname="new-email"\n\t\t\t\ttabindex="-1"\n\t\t\t\tslot="input"\n external-input="${e}"\n accept-unicode="${i}"\n\t\t\t>\n </${d}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(d),e&&this.initExternalInput(),(0,r.EA)(this,this.inputElement,{includeAttrs:["email-label","email-placeholder","confirm-label","confirm-placeholder","full-width","size","bordered","invalid","readonly","disabled","draggable","label-type"]})}createSlottedExternalInput(t,e,i){const r=t.querySelector("input"),n=document.createElement("slot"),a=r.getAttribute("slot");return n.setAttribute("name",e),n.setAttribute("slot",a),t.appendChild(n),r.setAttribute("slot",e),r.setAttribute("name",i),r.setAttribute("data-hidden-input","true"),this.appendChild(r),r}initExternalInput(){this.emailInput=this.inputElement.querySelector('[data-id="email"]'),this.confirmInput=this.inputElement.querySelector('[data-id="confirm"]'),this.createSlottedExternalInput(this.emailInput,"external-email-input",this.getAttribute("name")),this.createSlottedExternalInput(this.confirmInput,"external-confirm-input",`${this.getAttribute("name")}-confirm`).setAttribute("data-exclude-field","true")}})((0,o.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t\tmax-width: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t}\n :host ::part(error-message) {\n direction: ltr;\n }\n\t\t${(0,s.cy)(p.v.cssVarList)}\n\t\tvaadin-text-field {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t\tvaadin-text-field::part(input-field) {\n\t\t\tmin-height: 0;\n\t\t\tbackground: transparent;\n\t\t\tbox-shadow: none;\n\t\t\tpadding: 0;\n\t\t}\n\t\tvaadin-text-field::part(input-field)::after {\n\t\t\tbackground: transparent;\n\t\t\topacity: 0;\n\t\t}\n\t\tdescope-new-email-internal {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\twidth: 100%;\n\t\t\tpadding: 0;\n\t\t}\n\t\tdescope-new-email-internal > .wrapper {\n -webkit-mask-image: none;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\tdescope-email-field {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t}\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:u})),v=/^email-/,x=/^confirm-/,I=(t,e)=>t.replace(e,""),w=["email-label","email-placeholder"],A=["confirm-label","confirm-placeholder"],E=["disabled","bordered","size","full-width","invalid","readonly","draggable","label-type"],k=[].concat(E,w,A),S=(0,n.yc)({componentName:d,baseSelector:"div"});customElements.define(d,class extends S{static get observedAttributes(){return[].concat(S.observedAttributes||[],k)}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper"></div>\n\t\t',this.wrapperEle=this.querySelector(".wrapper")}get value(){return this.emailInput?.value||""}set value(t){t!==this.value&&(this.emailInput.value=t)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:this.value&&!this.emailFormat.test(this.value)?{patternMismatch:!0}:this.value!==(this.confirmInput?.value||"")?{typeMismatch:!0}:{}}init(){this.addEventListener("focus",t=>{t.isTrusted&&this.emailInput.focus()}),super.init?.(),this.renderInputs()}renderInputs(){const t="true"===this.getAttribute("external-input"),e="false"!==this.getAttribute("accept-unicode");this.emailFormat=e?new RegExp(a.g,"u"):new RegExp(a.a);const i=`\n <descope-email-field\n data-id="email"\n external-input="${t}"\n accept-unicode="${e}"\n validate-format="false"\n ></descope-email-field>\n <descope-email-field\n data-id="confirm"\n external-input="${t}"\n accept-unicode="${e}"\n validate-format="false"\n autocomplete="off"\n ></descope-email-field>\n `;this.wrapperEle.innerHTML=i,this.emailInput=this.querySelector('[data-id="email"]'),this.confirmInput=this.querySelector('[data-id="confirm"]'),this.inputs=[this.emailInput,this.confirmInput],this.initInputs()}handleIndicatorStyle(){this.inputs.forEach(t=>{(0,r.fz)(`\n\t\t\t\t:host ::part(required-indicator)::after {\n\t\t\t\t\tcontent: var(${b.cssVarList.inputsRequiredIndicator});\n width: 1em;\n text-align: center;\n\t\t\t\t}\n :host ::part(required-indicator) {\n display: inline-flex;\n }\n\t\t\t\t`,t)})}get isInvalid(){return this.hasAttribute("invalid")&&"false"!==this.getAttribute("invalid")}handleInputsInvalidAttribute(){this.inputs.forEach(t=>{t&&(0,r.mx)(t,e=>{if(e.includes("invalid")){const e=t.getAttribute("invalid"),i=this.getAttribute("invalid");this.isInvalid&&i!==e&&t.setAttribute("invalid","true")}},{})})}initInputs(){this.handleIndicatorStyle(),this.handleInputsInvalidAttribute(),this.handleFocusEventsDispatching(this.inputs)}toggleBooleanAttribute(t,e,i){null===i?t?.removeAttribute(e):t?.setAttribute(e,i)}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&(E.includes(t)?this.inputs?.forEach(e=>this.toggleBooleanAttribute(e,t,i)):w.includes(t)?this.toggleBooleanAttribute(this.emailInput,I(t,v),i):A.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,I(t,x),i))}}),customElements.define(u,b)},18330(t,e,i){i.d(e,{f:()=>n});var r=i(44099);class n extends r.r{constructor(t,e){super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},37436(t,e,i){i.d(e,{a:()=>n});var r=i(44218);const n=t=>class extends((0,r.R)(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}},27136(t,e,i){i.d(e,{A:()=>h}),i(86689);var r=i(13256),n=i(82901),a=i(72562),o=i(81488),l=i(86314),s=i(87550),p=i(18330),d=i(37436),u=i(37720);const c=t=>class extends((0,d.a)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new p.f(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t})),this.addController(new u.q(this.inputElement,this._labelController))}};(0,s.SF)("vaadin-text-field",l.k,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,s.cp)((0,a.q)(r.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return r.qy`
|
|
20
|
+
<style>
|
|
21
|
+
[part='input-field'] {
|
|
22
|
+
flex-grow: 0;
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
25
|
+
|
|
26
|
+
<div class="vaadin-field-container">
|
|
27
|
+
<div part="label">
|
|
28
|
+
<slot name="label"></slot>
|
|
29
|
+
<span part="required-indicator" aria-hidden="true" on-click="focus"></span>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<vaadin-input-container
|
|
33
|
+
part="input-field"
|
|
34
|
+
readonly="[[readonly]]"
|
|
35
|
+
disabled="[[disabled]]"
|
|
36
|
+
invalid="[[invalid]]"
|
|
37
|
+
theme$="[[_theme]]"
|
|
38
|
+
>
|
|
39
|
+
<slot name="prefix" slot="prefix"></slot>
|
|
40
|
+
<slot name="input"></slot>
|
|
41
|
+
<slot name="suffix" slot="suffix"></slot>
|
|
42
|
+
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
43
|
+
</vaadin-input-container>
|
|
44
|
+
|
|
45
|
+
<div part="helper-text">
|
|
46
|
+
<slot name="helper"></slot>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div part="error-message">
|
|
50
|
+
<slot name="error-message"></slot>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<slot name="tooltip"></slot>
|
|
54
|
+
`}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new o.I(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}(0,n.X)(h)},52733(t,e,i){i(27397);var r=i(47642);(0,i(87550).SF)("vaadin-text-field",r.k,{moduleId:"lumo-text-field-styles"}),i(27136)},11284(t,e,i){i(52733),i(27136)}}]);
|
|
55
|
+
//# sourceMappingURL=descope-new-email.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
10
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11
|
+
*/
|