@descope/web-components-ui 3.16.4 → 3.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/cjs/index.cjs.js +2998 -1114
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +3294 -1405
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/1408.js +8 -8
  6. package/dist/umd/1408.js.map +1 -1
  7. package/dist/umd/5260.js +1 -1
  8. package/dist/umd/5260.js.map +1 -1
  9. package/dist/umd/6618.js +1 -1
  10. package/dist/umd/6618.js.map +1 -1
  11. package/dist/umd/67.js +2 -0
  12. package/dist/umd/67.js.map +1 -0
  13. package/dist/umd/7092.js +1 -1
  14. package/dist/umd/7092.js.map +1 -1
  15. package/dist/umd/7939.js +1 -1
  16. package/dist/umd/7939.js.map +1 -1
  17. package/dist/umd/8350.js +1 -1
  18. package/dist/umd/8350.js.map +1 -1
  19. package/dist/umd/9439.js +2 -0
  20. package/dist/umd/9439.js.map +1 -0
  21. package/dist/umd/DescopeDev.js +1 -1
  22. package/dist/umd/DescopeDev.js.map +1 -1
  23. package/dist/umd/descope-attachment.js +1 -1
  24. package/dist/umd/descope-attachment.js.map +1 -1
  25. package/dist/umd/descope-badge.js +1 -1
  26. package/dist/umd/descope-badge.js.map +1 -1
  27. package/dist/umd/descope-date-field-descope-calendar-index-js.js +10 -10
  28. package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
  29. package/dist/umd/descope-date-field-index-js.js +1 -1
  30. package/dist/umd/descope-date-field-index-js.js.map +1 -1
  31. package/dist/umd/descope-filter.js +2 -0
  32. package/dist/umd/descope-filter.js.map +1 -0
  33. package/dist/umd/descope-month-day-field.js +1 -1
  34. package/dist/umd/descope-month-day-field.js.map +1 -1
  35. package/dist/umd/descope-multi-line-mappings.js +4 -4
  36. package/dist/umd/descope-multi-line-mappings.js.LICENSE.txt +6 -0
  37. package/dist/umd/descope-multi-line-mappings.js.map +1 -1
  38. package/dist/umd/descope-multi-select-combo-box.js +2 -1
  39. package/dist/umd/descope-multi-select-combo-box.js.LICENSE.txt +5 -0
  40. package/dist/umd/descope-multi-select-combo-box.js.map +1 -1
  41. package/dist/umd/descope-multi-sso.js +1 -1
  42. package/dist/umd/descope-multi-sso.js.map +1 -1
  43. package/dist/umd/descope-new-password-index-js.js +1 -1
  44. package/dist/umd/descope-new-password-index-js.js.map +1 -1
  45. package/dist/umd/descope-passcode-index-js.js +1 -1
  46. package/dist/umd/descope-passcode-index-js.js.map +1 -1
  47. package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
  48. package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -1
  49. package/dist/umd/descope-security-questions-verify-index-js.js +1 -1
  50. package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
  51. package/dist/umd/descope-text-field.js +1 -1
  52. package/dist/umd/descope-text-field.js.map +1 -1
  53. package/dist/umd/descope-trusted-devices.js +1 -1
  54. package/dist/umd/descope-trusted-devices.js.map +1 -1
  55. package/dist/umd/descope-user-attribute-index-js.js +2 -2
  56. package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
  57. package/dist/umd/descope-user-auth-method-index-js.js +1 -1
  58. package/dist/umd/descope-user-auth-method-index-js.js.map +1 -1
  59. package/dist/umd/index.js +1 -1
  60. package/dist/umd/index.js.map +1 -1
  61. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  62. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
  63. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
  64. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
  65. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
  66. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js.map +1 -1
  67. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  68. package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -1
  69. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
  70. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map +1 -1
  71. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
  72. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
  73. package/package.json +42 -41
  74. package/src/components/descope-user-attribute/UserAttributeClass.js +91 -6
  75. package/src/components/descope-user-attribute/check.svg +3 -0
  76. package/src/components/descope-user-attribute/copy.svg +3 -0
  77. package/src/theme/components/index.js +2 -0
  78. package/stories/descope-user-attribute.stories.js +12 -0
@@ -1 +1 @@
1
- {"version":3,"file":"phone-fields-descope-phone-input-box-field-index-js.js","mappings":";oOAiBO,MAAMA,GAAgB,QAAiB,cAExCC,EAAgB,CAAC,OAAQ,aAAc,qBA+EhCC,GAAiB,SAC5B,QAAiB,CACfC,SAAU,MAEZ,MACA,QAAgB,CACdC,WAAY,CAAC,QAAS,iBAAkB,gBACxCC,iBAAiB,IAEnB,KAtFmBC,GACnB,cAA6BA,EAC3B,6BAAWC,GACT,OAAON,EAAcO,OAAOF,EAAWC,oBAAsB,GAC/D,CAEAE,KAEA,IAAAC,GACEC,MAAMD,QACR,CAEA,qBAAAE,CAAsBC,GACpB,IAAKA,EAEH,YADAC,KAAKL,MAAMM,SAIb,MAAMC,EAAiB,CACrBP,KAAM,gBACNQ,MAAO,OACPC,MAAO,mBAGHC,EAAmB,CACvBV,KAAM,wBACNQ,MAAO,SACPC,MAAO,mBAGTJ,KAAKL,KAAOW,OAAOC,OAAOC,SAASC,cAAc,eAAgB,CAC/DC,KAAM,YACHR,IAGLF,KAAKW,YAAYC,YAAYZ,KAAKL,MAClCK,KAAKL,KAAKkB,iBAAiB,QAAS,KAClCC,UAAUC,UAAUC,UAAUhB,KAAKiB,OACnCX,OAAOC,OAAOP,KAAKL,KAAMU,GA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,iBAAiBtD,GACtB3J,KAAKkN,YAAcvD,EACnB3J,KAAKmN,WAAaxD,KAGtB3J,KAAK+M,cAAc,IAAI,IAAwB/M,KAAKuC,aAAcvC,KAAKoN,kBACzE,IC5DJ,QAAe,oBAAqB,IAAkB,CAAEC,SAAU,6BAuE3D,MAAMC,UAAkBlB,GAAe,SAAc,OAAa,SACvE,aAAWmB,GACT,MAAO,mBACT,CAEA,mBAAW7H,GACT,OAAO,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoCb,CAEA,qBAAWoF,GACT,MAAO,CAILwB,UAAW,CACT7B,KAAM8B,QAMRC,UAAW,CACT/B,KAAM8B,QAGZ,CAGA,KAAAO,GACEjN,MAAMiN,QAEN9M,KAAKwN,mBAAqB,IAAI,IAAkBxN,MAChDA,KAAKwN,mBAAmBC,YAAY,OACpCzN,KAAKwN,mBAAmBE,cAAc1N,KAAKuC,cAC3CvC,KAAK+M,cAAc/M,KAAKwN,mBAC1B,GAGF,OAAoBF,E,wCCrJpB,E,SAAA,IAAe,oBAAqB,IAAkB,CACpDD,SAAU,2B","sources":["webpack://@descope/web-components-ui/../components/descope-text-field/src/component/TextFieldClass.js","webpack://@descope/web-components-ui/../components/descope-text-field/src/component/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","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js"],"sourcesContent":["import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '@descope-ui/common/theme-helpers';\nimport textFieldMappings from './textFieldMappings';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n ...iconInitConfig,\n });\n\n this.baseElement.appendChild(this.icon);\n this.icon.addEventListener('click', () => {\n navigator.clipboard.writeText(this.value);\n Object.assign(this.icon, iconCopiedConfig);\n\n // we want the icon to go back to the initial state after 5 seconds\n setTimeout(() => {\n Object.assign(this.icon, iconInitConfig);\n }, 5000);\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({\n proxyProps: ['value', 'selectionStart', 'selectionEnd'],\n useProxyTargets: true,\n }),\n componentNameValidationMixin,\n customMixin,\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n }),\n);\n","import '@vaadin/text-field';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, TextFieldClass } from './TextFieldClass';\n\ncustomElements.define(componentName, TextFieldClass);\n\nexport { TextFieldClass, componentName };\n","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","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputControlMixin } from './input-control-mixin.js';\n\n/**\n * A mixin to provide logic for vaadin-text-field and related components.\n *\n * @polymerMixin\n * @mixes InputControlMixin\n */\nexport const InputFieldMixin = (superclass) =>\n class InputFieldMixinClass extends InputControlMixin(superclass) {\n static get properties() {\n return {\n /**\n * Whether the value of the control can be automatically completed by the browser.\n * List of available options at:\n * https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete\n */\n autocomplete: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari that is used to control whether\n * autocorrection should be enabled when the user is entering/editing the text.\n * Possible values are:\n * on: Enable autocorrection.\n * off: Disable autocorrection.\n */\n autocorrect: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari and Chrome that is used to control whether\n * autocapitalization should be enabled when the user is entering/editing the text.\n * Possible values are:\n * characters: Characters capitalization.\n * words: Words capitalization.\n * sentences: Sentences capitalization.\n * none: No capitalization.\n */\n autocapitalize: {\n type: String,\n reflectToAttribute: true,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'autocapitalize', 'autocomplete', 'autocorrect'];\n }\n\n // Workaround for https://github.com/Polymer/polymer/issues/5259\n get __data() {\n return this.__dataValue || {};\n }\n\n set __data(value) {\n this.__dataValue = value;\n }\n\n /**\n * @param {HTMLElement} input\n * @protected\n * @override\n */\n _inputElementChanged(input) {\n super._inputElementChanged(input);\n\n if (input) {\n // Discard value set on the custom slotted input.\n if (input.value && input.value !== this.value) {\n console.warn(`Please define value on the <${this.localName}> component!`);\n input.value = '';\n }\n\n if (this.value) {\n input.value = this.value;\n }\n }\n }\n\n /**\n * Override an event listener from `FocusMixin`.\n * @param {boolean} focused\n * @protected\n * @override\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n // Do not validate when focusout is caused by document\n // losing focus, which happens on browser tab switch.\n if (!focused && document.hasFocus()) {\n this.validate();\n }\n }\n\n /**\n * Override an event listener from `InputMixin`\n * to mark as valid after user started typing.\n * @param {Event} event\n * @protected\n * @override\n */\n _onInput(event) {\n super._onInput(event);\n\n if (this.invalid) {\n this.validate();\n }\n }\n\n /**\n * Override an observer from `InputMixin` to validate the field\n * when a new value is set programmatically.\n *\n * @param {string | undefined} newValue\n * @param {string | undefined} oldValue\n * @protected\n * @override\n */\n _valueChanged(newValue, oldValue) {\n super._valueChanged(newValue, oldValue);\n\n if (oldValue === undefined) {\n return;\n }\n\n if (this.invalid) {\n this.validate();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputController } from '@vaadin/field-base/src/input-controller.js';\nimport { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js';\nimport { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';\n\n/**\n * A mixin providing common text field functionality.\n *\n * @polymerMixin\n * @mixes InputFieldMixin\n */\nexport const TextFieldMixin = (superClass) =>\n class TextFieldMixinClass extends InputFieldMixin(superClass) {\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n\n /**\n * A regular expression that the value is checked against.\n * The pattern must match the entire value, not just some subset.\n */\n pattern: {\n type: String,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'maxlength', 'minlength', 'pattern'];\n }\n\n static get constraints() {\n return [...super.constraints, 'maxlength', 'minlength', 'pattern'];\n }\n\n constructor() {\n super();\n this._setType('text');\n }\n\n /** @protected */\n get clearElement() {\n return this.$.clearButton;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(\n new InputController(this, (input) => {\n this._setInputElement(input);\n this._setFocusElement(input);\n this.stateTarget = input;\n this.ariaTarget = input;\n }),\n );\n this.addController(new LabelledInputController(this.inputElement, this._labelController));\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/src/vaadin-input-container.js';\nimport { html, PolymerElement } from '@polymer/polymer';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { TextFieldMixin } from './vaadin-text-field-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, { moduleId: 'vaadin-text-field-styles' });\n\n/**\n * `<vaadin-text-field>` is a web component that allows the user to input and edit text.\n *\n * ```html\n * <vaadin-text-field label=\"First Name\"></vaadin-text-field>\n * ```\n *\n * ### Prefixes and suffixes\n *\n * These are child elements of a `<vaadin-text-field>` that are displayed\n * inline with the input, before or after.\n * In order for an element to be considered as a prefix, it must have the slot\n * attribute set to `prefix` (and similarly for `suffix`).\n *\n * ```html\n * <vaadin-text-field label=\"Email address\">\n * <div slot=\"prefix\">Sent to:</div>\n * <div slot=\"suffix\">@vaadin.com</div>\n * </vaadin-text-field>\n * ```\n *\n * ### Styling\n *\n * The following custom properties are available for styling:\n *\n * Custom property | Description | Default\n * -------------------------------|----------------------------|---------\n * `--vaadin-field-default-width` | Default width of the field | `12em`\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ---------------------|----------------\n * `label` | The label element\n * `input-field` | The element that wraps prefix, value and suffix\n * `clear-button` | The clear button\n * `error-message` | The error message element\n * `helper-text` | The helper text element wrapper\n * `required-indicator` | The `required` state indicator element\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description | Part name\n * --------------------|-------------|------------\n * `disabled` | Set to a disabled text field | :host\n * `has-value` | Set when the element has a value | :host\n * `has-label` | Set when the element has a label | :host\n * `has-helper` | Set when the element has helper text or slot | :host\n * `has-error-message` | Set when the element has an error message | :host\n * `invalid` | Set when the element is invalid | :host\n * `input-prevented` | Temporarily set when invalid input is prevented | :host\n * `focused` | Set when the element is focused | :host\n * `focus-ring` | Set when the element is keyboard focused | :host\n * `readonly` | Set to a readonly text field | :host\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ElementMixin\n * @mixes ThemableMixin\n * @mixes TextFieldMixin\n */\nexport class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(PolymerElement))) {\n static get is() {\n return 'vaadin-text-field';\n }\n\n static get template() {\n return html`\n <style>\n [part='input-field'] {\n flex-grow: 0;\n }\n </style>\n\n <div class=\"vaadin-field-container\">\n <div part=\"label\">\n <slot name=\"label\"></slot>\n <span part=\"required-indicator\" aria-hidden=\"true\" on-click=\"focus\"></span>\n </div>\n\n <vaadin-input-container\n part=\"input-field\"\n readonly=\"[[readonly]]\"\n disabled=\"[[disabled]]\"\n invalid=\"[[invalid]]\"\n theme$=\"[[_theme]]\"\n >\n <slot name=\"prefix\" slot=\"prefix\"></slot>\n <slot name=\"input\"></slot>\n <slot name=\"suffix\" slot=\"suffix\"></slot>\n <div id=\"clearButton\" part=\"clear-button\" slot=\"suffix\" aria-hidden=\"true\"></div>\n </vaadin-input-container>\n\n <div part=\"helper-text\">\n <slot name=\"helper\"></slot>\n </div>\n\n <div part=\"error-message\">\n <slot name=\"error-message\"></slot>\n </div>\n </div>\n <slot name=\"tooltip\"></slot>\n `;\n }\n\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n };\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this._tooltipController.setPosition('top');\n this._tooltipController.setAriaTarget(this.inputElement);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(TextField);\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, {\n moduleId: 'lumo-text-field-styles',\n});\n"],"names":["componentName","observedAttrs","TextFieldClass","mappings","proxyProps","useProxyTargets","superclass","observedAttributes","concat","icon","init","super","renderCopyToClipboard","shouldRender","this","remove","iconInitConfig","title","style","iconCopiedConfig","Object","assign","document","createElement","slot","baseElement","appendChild","addEventListener","navigator","clipboard","writeText","value","setTimeout","onLabelClick","focus","attributeChangedCallback","attrName","oldVal","newVal","attributeChangeCallback","_setType","removeEventListener","slots","wrappedEleName","cssVarList","inputOutlineWidth","inputOutlineOffset","excludeAttrsSync","customElements","define","textVars","host","label","inputElement","requiredIndicator","inputField","internalComponent","internalComponentAfter","phoneInput","errorMessage","helperText","selector","placeholder","PhoneFieldInputBoxClass","fontSize","property","fontFamily","hostWidth","hostMinWidth","hostDirection","inputHorizontalPadding","labelFontSize","labelFontWeight","inputValueFontWeight","inputPlaceholderFontWeight","helperTextFontWeight","errorMessageFontWeight","labelTextColor","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","inputValueTextColor","inputPlaceholderTextColor","inputPlaceholderColor","inputBorderStyle","inputBorderWidth","inputBorderColor","inputBorderRadius","inputOutlineStyle","inputOutlineColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","valueInputHeight","valueInputMarginBottom","CountryCodes","template","innerHTML","content","cloneNode","shadowRoot","querySelector","includeAttrs","phoneNumberInputEle","mapAttrs","BaseInputClass","baseSelector","constructor","textField","defaultDialCode","getAttribute","defaultCode","allowAlphanumericInput","minLength","parseInt","maxLength","restrictCountries","split","filter","Boolean","isFormatValue","isStrictValidation","parsedVal","country","countryCallingCode","nationalNumber","join","val","e","isTrusted","bind","handleFocusEventsDispatching","getValidity","validPhonePattern","stripValue","isRequired","valueMissing","length","tooShort","test","patternMismatch","setSelectionRange","args","oldValue","newValue","includes","attr","setAttribute","sanitizedInput","target","sanitizedVal","replace","dialCodePrefixPattern","RegExp","parsed","isValid","countryCode","telDigitsRegExp","char","phoneNumber","reset","input","getCountryByCodeId","find","c","code","dialCode","matchingParenthesis","openParenMatches","match","closeParenMatches","InputController","callback","initializer","node","type","id","defaultId","useUniqueId","InputFieldMixin","properties","autocomplete","String","autocorrect","autocapitalize","reflectToAttribute","delegateAttrs","__data","__dataValue","_inputElementChanged","console","warn","localName","_setFocused","focused","hasFocus","validate","_onInput","event","invalid","_valueChanged","undefined","TextFieldMixin","superClass","maxlength","Number","minlength","pattern","constraints","clearElement","$","clearButton","ready","addController","_setInputElement","_setFocusElement","stateTarget","ariaTarget","_labelController","moduleId","TextField","is","_tooltipController","setPosition","setAriaTarget"],"sourceRoot":""}
1
+ {"version":3,"file":"phone-fields-descope-phone-input-box-field-index-js.js","mappings":";oOAoBO,MAAMA,GAAgB,QAAiB,cAExCC,EAAgB,CAAC,OAAQ,aAAc,qBAmFhCC,GAAiB,SAC5B,QAAiB,CACfC,SAAU,MAEZ,MACA,QAAgB,CACdC,WAAY,CAAC,QAAS,iBAAkB,gBACxCC,iBAAiB,IAEnB,KA1FmBC,GACnB,cAA6BA,EAC3B,6BAAWC,GACT,OAAON,EAAcO,OAAOF,EAAWC,oBAAsB,GAC/D,CAEAE,KAEA,IAAAC,GACEC,MAAMD,UAIN,QAAaE,KAAMA,KAAKC,YAAa,CAAEC,aAAc,CAAC,gBACxD,CAEA,qBAAAC,CAAsBC,GACpB,IAAKA,EAEH,YADAJ,KAAKH,MAAMQ,SAIb,MAAMC,EAAiB,CACrBT,KAAM,gBACNU,MAAO,OACPC,MAAO,mBAGHC,EAAmB,CACvBZ,KAAM,wBACNU,MAAO,SACPC,MAAO,mBAGTR,KAAKH,KAAOa,OAAOC,OAAOC,SAASC,cAAc,eA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ACExG,QACAC,KAAK6B,SAAS,OAChB,CAGA,gBAAIgL,GACF,OAAO7M,KAAK8M,EAAEC,WAChB,CAGA,KAAAC,GACEjN,MAAMiN,QAENhN,KAAKiN,cACH,IAAI,IAAgBjN,KAAO6J,IACzB7J,KAAKkN,iBAAiBrD,GACtB7J,KAAKmN,iBAAiBtD,GACtB7J,KAAKoN,YAAcvD,EACnB7J,KAAKqN,WAAaxD,KAGtB7J,KAAKiN,cAAc,IAAI,IAAwBjN,KAAK0C,aAAc1C,KAAKsN,kBACzE,IC5DJ,QAAe,oBAAqB,IAAkB,CAAEC,SAAU,6BAuE3D,MAAMC,UAAkBlB,GAAe,SAAc,OAAa,SACvE,aAAWmB,GACT,MAAO,mBACT,CAEA,mBAAW5H,GACT,OAAO,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoCb,CAEA,qBAAWmF,GACT,MAAO,CAILwB,UAAW,CACT7B,KAAM8B,QAMRC,UAAW,CACT/B,KAAM8B,QAGZ,CAGA,KAAAO,GACEjN,MAAMiN,QAENhN,KAAK0N,mBAAqB,IAAI,IAAkB1N,MAChDA,KAAK0N,mBAAmBC,YAAY,OACpC3N,KAAK0N,mBAAmBE,cAAc5N,KAAK0C,cAC3C1C,KAAKiN,cAAcjN,KAAK0N,mBAC1B,GAGF,OAAoBF,E,wCCrJpB,E,SAAA,IAAe,oBAAqB,IAAkB,CACpDD,SAAU,2B","sources":["webpack://@descope/web-components-ui/../components/descope-text-field/src/component/TextFieldClass.js","webpack://@descope/web-components-ui/../components/descope-text-field/src/component/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","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js"],"sourcesContent":["import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n forwardAttrs,\n} from '@descope-ui/common/components-helpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '@descope-ui/common/theme-helpers';\nimport textFieldMappings from './textFieldMappings';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n\n // Excluded from syncAttrs (bidirectional would let vaadin revert host\n // values). Push host → vaadin one-way so authored placeholder applies.\n forwardAttrs(this, this.baseElement, { includeAttrs: ['placeholder'] });\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n ...iconInitConfig,\n });\n\n this.baseElement.appendChild(this.icon);\n this.icon.addEventListener('click', () => {\n navigator.clipboard.writeText(this.value);\n Object.assign(this.icon, iconCopiedConfig);\n\n // we want the icon to go back to the initial state after 5 seconds\n setTimeout(() => {\n Object.assign(this.icon, iconInitConfig);\n }, 5000);\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({\n proxyProps: ['value', 'selectionStart', 'selectionEnd'],\n useProxyTargets: true,\n }),\n componentNameValidationMixin,\n customMixin,\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style', 'placeholder'],\n componentName,\n }),\n);\n","import '@vaadin/text-field';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, TextFieldClass } from './TextFieldClass';\n\ncustomElements.define(componentName, TextFieldClass);\n\nexport { TextFieldClass, componentName };\n","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","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputControlMixin } from './input-control-mixin.js';\n\n/**\n * A mixin to provide logic for vaadin-text-field and related components.\n *\n * @polymerMixin\n * @mixes InputControlMixin\n */\nexport const InputFieldMixin = (superclass) =>\n class InputFieldMixinClass extends InputControlMixin(superclass) {\n static get properties() {\n return {\n /**\n * Whether the value of the control can be automatically completed by the browser.\n * List of available options at:\n * https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete\n */\n autocomplete: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari that is used to control whether\n * autocorrection should be enabled when the user is entering/editing the text.\n * Possible values are:\n * on: Enable autocorrection.\n * off: Disable autocorrection.\n */\n autocorrect: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari and Chrome that is used to control whether\n * autocapitalization should be enabled when the user is entering/editing the text.\n * Possible values are:\n * characters: Characters capitalization.\n * words: Words capitalization.\n * sentences: Sentences capitalization.\n * none: No capitalization.\n */\n autocapitalize: {\n type: String,\n reflectToAttribute: true,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'autocapitalize', 'autocomplete', 'autocorrect'];\n }\n\n // Workaround for https://github.com/Polymer/polymer/issues/5259\n get __data() {\n return this.__dataValue || {};\n }\n\n set __data(value) {\n this.__dataValue = value;\n }\n\n /**\n * @param {HTMLElement} input\n * @protected\n * @override\n */\n _inputElementChanged(input) {\n super._inputElementChanged(input);\n\n if (input) {\n // Discard value set on the custom slotted input.\n if (input.value && input.value !== this.value) {\n console.warn(`Please define value on the <${this.localName}> component!`);\n input.value = '';\n }\n\n if (this.value) {\n input.value = this.value;\n }\n }\n }\n\n /**\n * Override an event listener from `FocusMixin`.\n * @param {boolean} focused\n * @protected\n * @override\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n // Do not validate when focusout is caused by document\n // losing focus, which happens on browser tab switch.\n if (!focused && document.hasFocus()) {\n this.validate();\n }\n }\n\n /**\n * Override an event listener from `InputMixin`\n * to mark as valid after user started typing.\n * @param {Event} event\n * @protected\n * @override\n */\n _onInput(event) {\n super._onInput(event);\n\n if (this.invalid) {\n this.validate();\n }\n }\n\n /**\n * Override an observer from `InputMixin` to validate the field\n * when a new value is set programmatically.\n *\n * @param {string | undefined} newValue\n * @param {string | undefined} oldValue\n * @protected\n * @override\n */\n _valueChanged(newValue, oldValue) {\n super._valueChanged(newValue, oldValue);\n\n if (oldValue === undefined) {\n return;\n }\n\n if (this.invalid) {\n this.validate();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputController } from '@vaadin/field-base/src/input-controller.js';\nimport { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js';\nimport { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';\n\n/**\n * A mixin providing common text field functionality.\n *\n * @polymerMixin\n * @mixes InputFieldMixin\n */\nexport const TextFieldMixin = (superClass) =>\n class TextFieldMixinClass extends InputFieldMixin(superClass) {\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n\n /**\n * A regular expression that the value is checked against.\n * The pattern must match the entire value, not just some subset.\n */\n pattern: {\n type: String,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'maxlength', 'minlength', 'pattern'];\n }\n\n static get constraints() {\n return [...super.constraints, 'maxlength', 'minlength', 'pattern'];\n }\n\n constructor() {\n super();\n this._setType('text');\n }\n\n /** @protected */\n get clearElement() {\n return this.$.clearButton;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(\n new InputController(this, (input) => {\n this._setInputElement(input);\n this._setFocusElement(input);\n this.stateTarget = input;\n this.ariaTarget = input;\n }),\n );\n this.addController(new LabelledInputController(this.inputElement, this._labelController));\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/src/vaadin-input-container.js';\nimport { html, PolymerElement } from '@polymer/polymer';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { TextFieldMixin } from './vaadin-text-field-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, { moduleId: 'vaadin-text-field-styles' });\n\n/**\n * `<vaadin-text-field>` is a web component that allows the user to input and edit text.\n *\n * ```html\n * <vaadin-text-field label=\"First Name\"></vaadin-text-field>\n * ```\n *\n * ### Prefixes and suffixes\n *\n * These are child elements of a `<vaadin-text-field>` that are displayed\n * inline with the input, before or after.\n * In order for an element to be considered as a prefix, it must have the slot\n * attribute set to `prefix` (and similarly for `suffix`).\n *\n * ```html\n * <vaadin-text-field label=\"Email address\">\n * <div slot=\"prefix\">Sent to:</div>\n * <div slot=\"suffix\">@vaadin.com</div>\n * </vaadin-text-field>\n * ```\n *\n * ### Styling\n *\n * The following custom properties are available for styling:\n *\n * Custom property | Description | Default\n * -------------------------------|----------------------------|---------\n * `--vaadin-field-default-width` | Default width of the field | `12em`\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ---------------------|----------------\n * `label` | The label element\n * `input-field` | The element that wraps prefix, value and suffix\n * `clear-button` | The clear button\n * `error-message` | The error message element\n * `helper-text` | The helper text element wrapper\n * `required-indicator` | The `required` state indicator element\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description | Part name\n * --------------------|-------------|------------\n * `disabled` | Set to a disabled text field | :host\n * `has-value` | Set when the element has a value | :host\n * `has-label` | Set when the element has a label | :host\n * `has-helper` | Set when the element has helper text or slot | :host\n * `has-error-message` | Set when the element has an error message | :host\n * `invalid` | Set when the element is invalid | :host\n * `input-prevented` | Temporarily set when invalid input is prevented | :host\n * `focused` | Set when the element is focused | :host\n * `focus-ring` | Set when the element is keyboard focused | :host\n * `readonly` | Set to a readonly text field | :host\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ElementMixin\n * @mixes ThemableMixin\n * @mixes TextFieldMixin\n */\nexport class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(PolymerElement))) {\n static get is() {\n return 'vaadin-text-field';\n }\n\n static get template() {\n return html`\n <style>\n [part='input-field'] {\n flex-grow: 0;\n }\n </style>\n\n <div class=\"vaadin-field-container\">\n <div part=\"label\">\n <slot name=\"label\"></slot>\n <span part=\"required-indicator\" aria-hidden=\"true\" on-click=\"focus\"></span>\n </div>\n\n <vaadin-input-container\n part=\"input-field\"\n readonly=\"[[readonly]]\"\n disabled=\"[[disabled]]\"\n invalid=\"[[invalid]]\"\n theme$=\"[[_theme]]\"\n >\n <slot name=\"prefix\" slot=\"prefix\"></slot>\n <slot name=\"input\"></slot>\n <slot name=\"suffix\" slot=\"suffix\"></slot>\n <div id=\"clearButton\" part=\"clear-button\" slot=\"suffix\" aria-hidden=\"true\"></div>\n </vaadin-input-container>\n\n <div part=\"helper-text\">\n <slot name=\"helper\"></slot>\n </div>\n\n <div part=\"error-message\">\n <slot name=\"error-message\"></slot>\n </div>\n </div>\n <slot name=\"tooltip\"></slot>\n `;\n }\n\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n };\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this._tooltipController.setPosition('top');\n this._tooltipController.setAriaTarget(this.inputElement);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(TextField);\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, {\n moduleId: 'lumo-text-field-styles',\n});\n"],"names":["componentName","observedAttrs","TextFieldClass","mappings","proxyProps","useProxyTargets","superclass","observedAttributes","concat","icon","init","super","this","baseElement","includeAttrs","renderCopyToClipboard","shouldRender","remove","iconInitConfig","title","style","iconCopiedConfig","Object","assign","document","createElement","slot","appendChild","addEventListener","navigator","clipboard","writeText","value","setTimeout","onLabelClick","focus","attributeChangedCallback","attrName","oldVal","newVal","attributeChangeCallback","_setType","removeEventListener","slots","wrappedEleName","cssVarList","inputOutlineWidth","inputOutlineOffset","excludeAttrsSync","customElements","define","textVars","host","label","inputElement","requiredIndicator","inputField","internalComponent","internalComponentAfter","phoneInput","errorMessage","helperText","selector","placeholder","PhoneFieldInputBoxClass","fontSize","property","fontFamily","hostWidth","hostMinWidth","hostDirection","inputHorizontalPadding","labelFontSize","labelFontWeight","inputValueFontWeight","inputPlaceholderFontWeight","helperTextFontWeight","errorMessageFontWeight","labelTextColor","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","inputValueTextColor","inputPlaceholderTextColor","inputPlaceholderColor","inputBorderStyle","inputBorderWidth","inputBorderColor","inputBorderRadius","inputOutlineStyle","inputOutlineColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","valueInputHeight","valueInputMarginBottom","CountryCodes","template","innerHTML","content","cloneNode","shadowRoot","querySelector","phoneNumberInputEle","mapAttrs","BaseInputClass","baseSelector","constructor","textField","defaultDialCode","getAttribute","defaultCode","allowAlphanumericInput","minLength","parseInt","maxLength","restrictCountries","split","filter","Boolean","isFormatValue","isStrictValidation","parsedVal","country","countryCallingCode","nationalNumber","join","val","e","isTrusted","bind","handleFocusEventsDispatching","getValidity","validPhonePattern","stripValue","isRequired","valueMissing","length","tooShort","test","patternMismatch","setSelectionRange","args","oldValue","newValue","includes","attr","setAttribute","sanitizedInput","target","sanitizedVal","replace","dialCodePrefixPattern","RegExp","parsed","isValid","countryCode","telDigitsRegExp","char","phoneNumber","reset","input","getCountryByCodeId","find","c","code","dialCode","matchingParenthesis","openParenMatches","match","closeParenMatches","InputController","callback","initializer","node","type","id","defaultId","useUniqueId","InputFieldMixin","properties","autocomplete","String","autocorrect","autocapitalize","reflectToAttribute","delegateAttrs","__data","__dataValue","_inputElementChanged","console","warn","localName","_setFocused","focused","hasFocus","validate","_onInput","event","invalid","_valueChanged","undefined","TextFieldMixin","superClass","maxlength","Number","minlength","pattern","constraints","clearElement","$","clearButton","ready","addController","_setInputElement","_setFocusElement","stateTarget","ariaTarget","_labelController","moduleId","TextField","is","_tooltipController","setPosition","setAriaTarget"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/web-components-ui",
3
- "version": "3.16.4",
3
+ "version": "3.18.0",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -52,11 +52,11 @@
52
52
  "webpack-cli": "^7.0.0",
53
53
  "webpack-dev-server": "^5.0.0",
54
54
  "webpack-subresource-integrity": "5.2.0-rc.1",
55
- "eslint-plugin-no-bare-class-import": "3.16.4",
56
- "rollup-replace-plugin": "3.16.4",
57
- "test-drivers": "3.16.4",
58
- "webpack-replace-plugin": "3.16.4",
59
- "webpack-extract-font-loader": "3.16.4"
55
+ "eslint-plugin-no-bare-class-import": "3.18.0",
56
+ "rollup-replace-plugin": "3.18.0",
57
+ "test-drivers": "3.18.0",
58
+ "webpack-extract-font-loader": "3.18.0",
59
+ "webpack-replace-plugin": "3.18.0"
60
60
  },
61
61
  "dependencies": {
62
62
  "@vaadin/checkbox": "24.3.4",
@@ -80,41 +80,42 @@
80
80
  "libphonenumber-js": "^1.11.12",
81
81
  "lodash.debounce": "4.0.8",
82
82
  "lodash.merge": "4.6.2",
83
- "@descope-ui/common": "3.16.4",
84
- "@descope-ui/descope-address-field": "3.16.4",
85
- "@descope-ui/descope-country-subdivision-city-field": "3.16.4",
86
- "@descope-ui/descope-apps-list": "3.16.4",
87
- "@descope-ui/descope-autocomplete-field": "3.16.4",
88
- "@descope-ui/descope-avatar": "3.16.4",
89
- "@descope-ui/descope-badge": "3.16.4",
90
- "@descope-ui/descope-button": "3.16.4",
91
- "@descope-ui/descope-collapsible-container": "3.16.4",
92
- "@descope-ui/descope-combo-box": "3.16.4",
93
- "@descope-ui/descope-icon": "3.16.4",
94
- "@descope-ui/descope-image": "3.16.4",
95
- "@descope-ui/descope-link": "3.16.4",
96
- "@descope-ui/descope-list": "3.16.4",
97
- "@descope-ui/descope-list-item": "3.16.4",
98
- "@descope-ui/descope-enriched-text": "3.16.4",
99
- "@descope-ui/descope-month-day-field": "3.16.4",
100
- "@descope-ui/descope-month-day-field-picker": "3.16.4",
101
- "@descope-ui/descope-multi-line-mappings": "3.16.4",
102
- "@descope-ui/descope-multi-select-combo-box": "3.16.4",
103
- "@descope-ui/descope-outbound-apps": "3.16.4",
104
- "@descope-ui/descope-password-strength": "3.16.4",
105
- "@descope-ui/descope-ponyhot": "3.16.4",
106
- "@descope-ui/descope-text-field": "3.16.4",
107
- "@descope-ui/descope-timer": "3.16.4",
108
- "@descope-ui/descope-timer-button": "3.16.4",
109
- "@descope-ui/descope-tooltip": "3.16.4",
110
- "@descope-ui/descope-multi-sso": "3.16.4",
111
- "@descope-ui/descope-trusted-devices": "3.16.4",
112
- "@descope-ui/descope-anchored": "3.16.4",
113
- "@descope-ui/descope-recovery-codes": "3.16.4",
114
- "@descope-ui/descope-text": "3.16.4",
115
- "@descope-ui/descope-user-passkeys": "3.16.4",
116
- "@descope-ui/descope-outbound-app-button": "3.16.4",
117
- "@descope-ui/descope-attachment": "3.16.4"
83
+ "@descope-ui/descope-address-field": "3.18.0",
84
+ "@descope-ui/descope-country-subdivision-city-field": "3.18.0",
85
+ "@descope-ui/descope-apps-list": "3.18.0",
86
+ "@descope-ui/descope-autocomplete-field": "3.18.0",
87
+ "@descope-ui/descope-avatar": "3.18.0",
88
+ "@descope-ui/descope-badge": "3.18.0",
89
+ "@descope-ui/descope-button": "3.18.0",
90
+ "@descope-ui/descope-collapsible-container": "3.18.0",
91
+ "@descope-ui/descope-combo-box": "3.18.0",
92
+ "@descope-ui/descope-enriched-text": "3.18.0",
93
+ "@descope-ui/descope-icon": "3.18.0",
94
+ "@descope-ui/descope-image": "3.18.0",
95
+ "@descope-ui/descope-link": "3.18.0",
96
+ "@descope-ui/descope-list": "3.18.0",
97
+ "@descope-ui/descope-list-item": "3.18.0",
98
+ "@descope-ui/descope-month-day-field": "3.18.0",
99
+ "@descope-ui/descope-month-day-field-picker": "3.18.0",
100
+ "@descope-ui/descope-multi-line-mappings": "3.18.0",
101
+ "@descope-ui/descope-multi-select-combo-box": "3.18.0",
102
+ "@descope-ui/descope-outbound-apps": "3.18.0",
103
+ "@descope-ui/common": "3.18.0",
104
+ "@descope-ui/descope-password-strength": "3.18.0",
105
+ "@descope-ui/descope-ponyhot": "3.18.0",
106
+ "@descope-ui/descope-outbound-app-button": "3.18.0",
107
+ "@descope-ui/descope-recovery-codes": "3.18.0",
108
+ "@descope-ui/descope-text": "3.18.0",
109
+ "@descope-ui/descope-text-field": "3.18.0",
110
+ "@descope-ui/descope-timer-button": "3.18.0",
111
+ "@descope-ui/descope-tooltip": "3.18.0",
112
+ "@descope-ui/descope-multi-sso": "3.18.0",
113
+ "@descope-ui/descope-trusted-devices": "3.18.0",
114
+ "@descope-ui/descope-timer": "3.18.0",
115
+ "@descope-ui/descope-attachment": "3.18.0",
116
+ "@descope-ui/descope-user-passkeys": "3.18.0",
117
+ "@descope-ui/descope-filter": "3.18.0",
118
+ "@descope-ui/descope-anchored": "3.18.0"
118
119
  },
119
120
  "overrides": {
120
121
  "@vaadin/avatar": "24.3.4",
@@ -9,6 +9,8 @@ import { compose } from '../../helpers';
9
9
  import { getComponentName } from '../../helpers/componentHelpers';
10
10
  import deleteIcon from './delete.svg';
11
11
  import editIcon from './edit.svg';
12
+ import copyIcon from './copy.svg';
13
+ import checkIcon from './check.svg';
12
14
 
13
15
  export const componentName = getComponentName('user-attribute');
14
16
  class RawUserAttribute extends createBaseClass({
@@ -25,6 +27,10 @@ class RawUserAttribute extends createBaseClass({
25
27
  <descope-text st-text-align="auto" data-id="value-text" variant="body1" mode="primary" class="value"></descope-text>
26
28
  <div class="btn-wrapper">
27
29
  <descope-badge mode="default" bordered="true" size="xs"></descope-badge>
30
+ <descope-button size="sm" data-id="copy-btn" variant="link" mode="primary">
31
+ <slot name="copy-icon"></slot>
32
+ <descope-icon class="check-icon" src="${checkIcon}" src-dark="${checkIcon}"></descope-icon>
33
+ </descope-button>
28
34
  <descope-button size="sm" data-id="delete-btn" variant="link" mode="primary">
29
35
  <slot name="delete-icon"></slot>
30
36
  </descope-button>
@@ -71,12 +77,29 @@ class RawUserAttribute extends createBaseClass({
71
77
  }
72
78
 
73
79
  slot[name="edit-icon"],
74
- slot[name="delete-icon"] {
80
+ slot[name="delete-icon"],
81
+ slot[name="copy-icon"] {
75
82
  display: inline-flex;
76
83
  flex-shrink: 0;
77
84
  align-items: center;
78
85
  }
79
86
 
87
+ descope-button[data-id="copy-btn"].hidden {
88
+ display: none;
89
+ }
90
+
91
+ descope-button[data-id="copy-btn"] .check-icon {
92
+ display: none;
93
+ }
94
+
95
+ descope-button[data-id="copy-btn"].copied slot[name="copy-icon"] {
96
+ display: none;
97
+ }
98
+
99
+ descope-button[data-id="copy-btn"].copied .check-icon {
100
+ display: inline-flex;
101
+ }
102
+
80
103
  .content-wrapper {
81
104
  display: flex;
82
105
  flex-grow: 1;
@@ -119,7 +142,7 @@ class RawUserAttribute extends createBaseClass({
119
142
  color: var(${TextClass.cssVarList.textColor});
120
143
  }
121
144
 
122
- :host([readonly="true"]) descope-button {
145
+ :host([readonly="true"]) descope-button:not([data-id="copy-btn"]) {
123
146
  visibility: hidden;
124
147
  width: 0;
125
148
  }
@@ -127,6 +150,7 @@ class RawUserAttribute extends createBaseClass({
127
150
  this
128
151
  );
129
152
 
153
+ this.copyButton = this.shadowRoot.querySelector('descope-button[data-id="copy-btn"]');
130
154
  this.deleteButton = this.shadowRoot.querySelector('descope-button[data-id="delete-btn"]');
131
155
  this.editButton = this.shadowRoot.querySelector('descope-button[data-id="edit-btn"]');
132
156
  this.badge = this.shadowRoot.querySelector('descope-badge');
@@ -216,6 +240,14 @@ class RawUserAttribute extends createBaseClass({
216
240
  return this.getAttribute('hide-delete') === 'true';
217
241
  }
218
242
 
243
+ get isCopyEnabled() {
244
+ return this.getAttribute('show-copy') === 'true';
245
+ }
246
+
247
+ get copyButtonLabel() {
248
+ return this.getAttribute('copy-button-label') || '';
249
+ }
250
+
219
251
  init() {
220
252
  this.onLabelChange();
221
253
  this.onValueOrPlaceholderChange();
@@ -224,7 +256,9 @@ class RawUserAttribute extends createBaseClass({
224
256
  this.onBadgeTooltipTextChange();
225
257
  this.updateButtonLabel(this.editButton, this.editButtonLabel);
226
258
  this.updateButtonLabel(this.deleteButton, this.deleteButtonLabel);
259
+ this.updateButtonLabel(this.copyButton, this.copyButtonLabel);
227
260
  this.handleDeleteButtonVisibility();
261
+ this.handleCopyButtonState();
228
262
 
229
263
  this.deleteButton.addEventListener('click', () =>
230
264
  this.dispatchEvent(new CustomEvent('delete-clicked', { bubbles: true, composed: true }))
@@ -234,9 +268,35 @@ class RawUserAttribute extends createBaseClass({
234
268
  this.dispatchEvent(new CustomEvent('edit-clicked', { bubbles: true, composed: true }))
235
269
  );
236
270
 
271
+ this.copyButton.addEventListener('click', () => this.#handleCopyClick());
272
+
237
273
  this.setDefaultChildren();
238
274
  }
239
275
 
276
+ #handleCopyClick() {
277
+ // isDraggable is true only inside the page editor (craftjs sets draggable="true"
278
+ // for drag-and-drop); there the copy action must not run.
279
+ if (!this.value || this.isDraggable || !navigator.clipboard) return;
280
+
281
+ navigator.clipboard
282
+ .writeText(this.value)
283
+ .then(() => {
284
+ this.copyButton.classList.add('copied');
285
+ setTimeout(() => this.copyButton.classList.remove('copied'), 2000);
286
+ })
287
+ .catch(() => {});
288
+ }
289
+
290
+ handleCopyButtonState() {
291
+ this.copyButton.classList.toggle('hidden', !this.isCopyEnabled);
292
+
293
+ if (this.value) {
294
+ this.copyButton.removeAttribute('disabled');
295
+ } else {
296
+ this.copyButton.setAttribute('disabled', 'true');
297
+ }
298
+ }
299
+
240
300
  #addIcon(src, slotName) {
241
301
  const icon = document.createElement('descope-icon');
242
302
  icon.setAttribute('src', src);
@@ -246,9 +306,19 @@ class RawUserAttribute extends createBaseClass({
246
306
  }
247
307
 
248
308
  setDefaultChildren() {
249
- if (this.children.length) return;
250
- this.#addIcon(deleteIcon, 'delete-icon');
251
- this.#addIcon(editIcon, 'edit-icon');
309
+ if (!this.querySelector('[slot="delete-icon"]')) {
310
+ this.#addIcon(deleteIcon, 'delete-icon');
311
+ }
312
+ if (!this.querySelector('[slot="edit-icon"]')) {
313
+ this.#addIcon(editIcon, 'edit-icon');
314
+ }
315
+ this.setDefaultCopyIcon();
316
+ }
317
+
318
+ setDefaultCopyIcon() {
319
+ if (this.isCopyEnabled && !this.querySelector('[slot="copy-icon"]')) {
320
+ this.#addIcon(copyIcon, 'copy-icon');
321
+ }
252
322
  }
253
323
 
254
324
  static get observedAttributes() {
@@ -261,7 +331,9 @@ class RawUserAttribute extends createBaseClass({
261
331
  'badge-tooltip-text',
262
332
  'edit-button-label',
263
333
  'delete-button-label',
334
+ 'copy-button-label',
264
335
  'hide-delete',
336
+ 'show-copy',
265
337
  ].concat(super.observedAttributes);
266
338
  }
267
339
 
@@ -293,11 +365,19 @@ class RawUserAttribute extends createBaseClass({
293
365
  this.updateButtonLabel(this.editButton, this.editButtonLabel);
294
366
  } else if (name === 'delete-button-label') {
295
367
  this.updateButtonLabel(this.deleteButton, this.deleteButtonLabel);
368
+ } else if (name === 'copy-button-label') {
369
+ this.updateButtonLabel(this.copyButton, this.copyButtonLabel);
370
+ } else if (name === 'show-copy') {
371
+ this.setDefaultCopyIcon();
296
372
  }
297
373
 
298
374
  if (name === 'value' || name === 'required' || name === 'hide-delete') {
299
375
  this.handleDeleteButtonVisibility();
300
376
  }
377
+
378
+ if (name === 'value' || name === 'show-copy') {
379
+ this.handleCopyButtonState();
380
+ }
301
381
  }
302
382
  }
303
383
 
@@ -326,7 +406,12 @@ export const UserAttributeClass = compose(
326
406
  contentMinWidth: { ...contentWrapper, property: 'min-width' },
327
407
  badgeMaxWidth: { ...badge, property: 'max-width' },
328
408
  itemsGap: [{ property: 'gap' }, { ...contentWrapper, property: 'gap' }],
329
- iconColor: [{ selector: () => '::slotted(*)', property: IconClass.cssVarList.fill }],
409
+ iconColor: [
410
+ { selector: () => '::slotted(*)', property: IconClass.cssVarList.fill },
411
+ // the copied check-icon lives in the shadow DOM (not slotted), so it
412
+ // needs its own mapping to follow the same icon color
413
+ { selector: () => '.check-icon', property: IconClass.cssVarList.fill },
414
+ ],
330
415
  },
331
416
  }),
332
417
  draggableMixin,
@@ -0,0 +1,3 @@
1
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" fill="currentcolor"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" fill="currentcolor"/>
3
+ </svg>
@@ -30,6 +30,7 @@ import * as userPasskeys from '@descope-ui/descope-user-passkeys/theme';
30
30
  import * as textField from '@descope-ui/descope-text-field/theme';
31
31
  import * as monthDayField from '@descope-ui/descope-month-day-field/theme';
32
32
  import * as monthDayFieldPicker from '@descope-ui/descope-month-day-field-picker/theme';
33
+ import * as filter from '@descope-ui/descope-filter/theme';
33
34
  import * as password from './password';
34
35
  import * as numberField from './numberField';
35
36
  import * as emailField from './emailField';
@@ -145,6 +146,7 @@ const components = {
145
146
  trustedDevices,
146
147
  multiSso,
147
148
  tooltip,
149
+ filter,
148
150
  attachment,
149
151
  userPasskeys,
150
152
  };
@@ -29,6 +29,8 @@ const Template = ({
29
29
  'edit-button-label': editButtonLabel,
30
30
  'delete-button-label': deleteButtonLabel,
31
31
  'hide-delete': hideDelete,
32
+ showCopy,
33
+ copyButtonLabel,
32
34
  customIcons,
33
35
  }) => `
34
36
  <descope-user-attribute
@@ -42,6 +44,8 @@ const Template = ({
42
44
  edit-button-label="${editButtonLabel || ''}"
43
45
  delete-button-label="${deleteButtonLabel || ''}"
44
46
  hide-delete="${hideDelete || 'false'}"
47
+ show-copy="${showCopy || 'false'}"
48
+ copy-button-label="${copyButtonLabel || ''}"
45
49
  st-host-direction="${direction ?? ''}"
46
50
  readonly="${readonly || false}"
47
51
  >
@@ -83,6 +87,14 @@ export default {
83
87
  name: 'Hide Delete',
84
88
  control: { type: 'boolean' },
85
89
  },
90
+ showCopy: {
91
+ name: 'Show Copy',
92
+ control: { type: 'boolean' },
93
+ },
94
+ copyButtonLabel: {
95
+ name: 'Copy Button Label',
96
+ control: { type: 'text' },
97
+ },
86
98
  customIcons: {
87
99
  name: 'Custom Icons',
88
100
  control: { type: 'boolean' },