@descope/web-components-ui 1.0.125 → 1.0.127

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. package/dist/cjs/index.cjs.js +18 -14
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.esm.js +21 -17
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/umd/241.js +1 -1
  7. package/dist/umd/481.js +1 -0
  8. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  9. package/dist/umd/descope-new-password-index-js.js +1 -1
  10. package/dist/umd/descope-password-index-js.js +1 -0
  11. package/dist/umd/descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
  12. package/dist/umd/index.js +1 -1
  13. package/package.json +1 -1
  14. package/src/components/descope-new-password/NewPasswordClass.js +4 -4
  15. package/src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js +2 -2
  16. package/src/components/descope-new-password/index.js +1 -1
  17. package/src/components/{descope-password-field/PasswordFieldClass.js → descope-password/PasswordClass.js} +4 -4
  18. package/src/components/descope-password/index.js +6 -0
  19. package/src/index.cjs.js +1 -1
  20. package/src/index.d.ts +1 -1
  21. package/src/index.js +1 -1
  22. package/src/mixins/proxyInputMixin.js +4 -0
  23. package/src/theme/components/index.js +2 -2
  24. package/src/theme/components/newPassword.js +1 -1
  25. package/src/theme/components/{passwordField.js → password.js} +4 -4
  26. package/dist/umd/65.js +0 -1
  27. package/dist/umd/descope-password-field-index-js.js +0 -1
  28. package/src/components/descope-password-field/index.js +0 -6
  29. /package/src/components/{descope-password-field → descope-password}/passwordDraggableMixin.js +0 -0
package/dist/umd/241.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[241],{693:(t,e,s)=>{s.d(e,{s:()=>o});var i=s(2061),n=s(357);const r=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}};var a=s(8084);const o=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#t;#e=!0;get baseSelector(){return e}get baseElement(){return this.#t??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#t||console.warn("missing base element for component",this.localName),this.#t}get rootElement(){return this.shadowRoot||this}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#e&&(this.#e=!1,this.init?.())}}return(0,i.qC)(n.A,r,a.Q)(s)}},5279:(t,e,s)=>{s.d(e,{gh:()=>i,k4:()=>n,qM:()=>a,qg:()=>r});const i="descope",n=3,r="host",a="@"},4567:(t,e,s)=>{s.d(e,{Db:()=>d,FX:()=>r,P$:()=>a,Tk:()=>u,iY:()=>h,oP:()=>c,tg:()=>l});var i=s(2061),n=s(5279);const r=(t,e,{excludeAttrs:s=[],includeAttrs:i=[]})=>{const n=Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!i.length||i.includes(t.name)))).map((t=>t.name));e(n),new MutationObserver((t=>{for(const n of t)"attributes"!==n.type||s.includes(n.attributeName)||i.length&&!i.includes(n.attributeName)||e([n.attributeName])})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{for(const s of t)"childList"===s.type&&e(s)})).observe(t,{childList:!0})},o=(t,e,s={})=>i=>{i.forEach((i=>{const n=s[i]||i,r=t.getAttribute(i);null!==r?e.getAttribute(n)!==r&&e.setAttribute(n,r):e.removeAttribute(n)}))},l=(t,e,s)=>{r(t,o(t,e),s),r(e,o(e,t),s)},h=t=>(0,i.E3)(n.gh,t),u=(...t)=>`--${(0,i.E3)(...t)}`,c=(t,e,s={})=>{r(t,o(t,e,s.mapAttrs),s)},d=(t,e,s=[])=>{if(!s.length)return;const i=s.reduce(((e,s)=>Object.assign(e,{[s]:{get:()=>t[s],set(e){t[s]=e}}})),{});Object.defineProperties(e,i)}},2061:(t,e,s)=>{s.d(e,{E3:()=>n,GL:()=>i,mf:()=>a,qC:()=>r});const i=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),n=(...t)=>i(t.filter((t=>!!t)).join("-")),r=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e),a=t=>"function"==typeof t},357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#s(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#s()}}},9241:(t,e,s)=>{s.d(e,{li:()=>M,Ae:()=>A.A,DM:()=>p,yk:()=>u,e4:()=>c,mE:()=>L,wX:()=>b,QT:()=>C.Q,Iw:()=>S,dj:()=>f});var i=s(5279),n=s(2061),r=s(4567),a=s(5561);const o=(t,...e)=>`var(${t}${e.length?` , ${o(...e)}`:""})`;class l{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,s])=>t+`${e} { \n${s.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const h=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,r.Tk)(t,s)})),{}),u=({mappings:t={},componentNameOverride:e=""})=>s=>{const u=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...h(u,{...t})}}#i;#n;#r;#a;#o;#l;#h;#u;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:r=i.qg,baseSelector:a}={}){super(),this.#a=s,this.#o=r,this.#l=e?.(this)||this.shadowRoot,this.#h=a??this.baseSelector,this.#u=Object.keys(t).map((t=>(0,n.E3)("st",s,t))),this.#c(),this.#d(),this.#m()}get#p(){return a.componentsThemeManager.currentTheme?.[u]||""}#g(){this.#n.innerHTML=this.#p[this.#o]}#d(){this.#n=document.createElement("style"),this.#n.id=`style-mixin-theme__${u}`,this.#l.prepend(this.#n),this.#r=a.componentsThemeManager.onCurrentThemeChange(this.#g.bind(this)),this.#g()}#m(){if(this.#u.length){this.#i=document.createElement("style"),this.#i.id=`style-mixin-overrides__${u}`;const s=(t=u,e=i.k4,Array(e).fill(`.${t}`).join(""));this.#i.innerText=`:host(${s}) {}`,this.#l.append(this.#i)}var t,e}#b(t,e){const s=this.#i?.sheet?.cssRules[0].style;if(!s)return;const i=(0,r.Tk)(u,t.replace(new RegExp("^st-"),""));e?s?.setProperty(i,e):(s?.removeProperty(i),this.removeAttribute(t))}#E(t=[]){let e=!1;for(const s of t)this.#u.includes(s)&&(this.#b(s,this.getAttribute(s)),e=!0);e&&(this.#i.innerHTML=this.#i?.sheet?.cssRules[0].cssText)}#c(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${u}`,e.innerHTML=((t,e,s)=>{const i=new l;return Object.keys(s).forEach((a=>{const l=((t,e)=>{const s={selector:"",property:(0,n.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>Object.assign({},s,t))):[Object.assign({},s,e)]:[s]})(a,s[a]),h=(0,r.Tk)(t,a);l.forEach((({selector:t,property:s})=>{i.add(((t="",e="")=>(0,n.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,n.mf)(s)?s():s,o(h))}))})),i.toString()})((0,n.E3)(u,this.#a),this.#h,t),this.#l.prepend(e)}}#v(t){(this.#l.classList||this.#l.host.classList).add(t)}init(){super.init?.(),this.shadowRoot.isConnected&&(this.#v(u),(0,r.FX)(this,this.#E.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#r?.()}}},c=t=>class extends t{#y=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#y=document.createElement("style"),this.#y.innerText="* { cursor: inherit!important }"}#f(t){t?this.shadowRoot.appendChild(this.#y):this.#y.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#f("true"===s)}};var d=s(693);function m(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}const p=({componentName:t,wrappedEleName:e,slots:s=[],style:i,excludeAttrsSync:a=[],includeAttrsSync:o=[],includeForwardProps:l=[]})=>{class h extends((0,d.s)({componentName:t,baseSelector:e})){#A=m.bind(this,"blur");#S=m.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:!0}).innerHTML=`\n\t\t\t<style id="create-proxy">${(0,n.mf)(i)?i():i}</style>\n\t\t\t<${e}>\n\t\t\t<slot></slot>\n\t\t\t${s.map((t=>`<slot name="${t}" slot="${t}"></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#A()})),this.baseElement.addEventListener("focus",(t=>{this.#S()})),(0,r.Db)(this.baseElement,this,l),(0,r.tg)(this.baseElement,this,{excludeAttrs:a,includeAttrs:o})}}return h},g=["required","pattern"],b=t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...g]}static get formAssociated(){return!0}#M;constructor(){super(),this.#M=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:r,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:u}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||i||n||o||l||h:return this.getAttribute("data-errormessage-pattern-mismatch")||this.defaultErrorMsgPatternMismatch;case r:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case u:return this.validationMessage;default:return""}}#C(){const t=this.isReadOnly?{}:this.getValidity();this.#M.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#M.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#M.validity.valid}reportValidity(){return this.#M.reportValidity()}get validity(){return this.#M.validity}get validationTarget(){return this.inputElement}setCustomValidity(t){t?this.#M.setValidity({customError:!0},t,this.validationTarget):(this.#M.setValidity({}),this.#C())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#M.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),g.includes(t)&&this.#C()}init(){super.init?.(),this.addEventListener("change",this.#C),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#C),setTimeout((()=>this.#C()))}},E=["invalid","required"],v=(t,e,s)=>{Object.defineProperty(t,s,{set:function(t){return e[s]=t},get:function(){return e[s]},configurable:!0})},y=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if(e=e.assignedElements()[0],"slot"!==e.localName)return e},f=(0,n.qC)((t=>class extends(b(t)){static get observedAttributes(){return[...t.observedAttributes||[],...E]}#L;#T=m.bind(this,"change");constructor(){super(),this.#L=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#L&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#L??=y(t)||y(e),this.#L}set inputElement(t){this.#L=t}getValidity(){return this.inputElement?.validity||{}}handleInternalInputErrorMessage(){this.inputElement.checkValidity()||this.inputElement.setCustomValidity(this.validationMessage)}#w(){this.handleInternalInputErrorMessage(),this.setAttribute("error-message",this.validationMessage)}init(){super.init?.(),this.inputElement.addEventListener("input",(t=>{this.inputElement.checkValidity()||(this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.baseElement.__onInput(t),this.#w())})),this.baseElement.addEventListener("change",(()=>{this.#T()})),this.#L.addEventListener("blur",(()=>{this.checkValidity()||(this.setAttribute("invalid","true"),this.#w())})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#w()})),this.handleInternalInputErrorMessage(),v(this,this.inputElement,"value"),v(this,this.inputElement,"selectionStart"),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,r.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})}}),u({componentNameOverride:(0,r.iY)("input-wrapper")}));var A=s(357);const S=({name:t,selector:e,mappings:s={},forward:{attributes:a=[],include:o=!0}={}})=>l=>{const c=t||(t=>t.replace(/[^\w\s]/gi,""))(e),d=u({mappings:s})(l);return class extends d{static get cssVarList(){return{...d.cssVarList,[c]:h((0,n.E3)(l.componentName,"_"+c),s)}}#x;constructor(){const t=t=>{const s=t.shadowRoot.querySelector(t.baseSelector),i=e?s.shadowRoot.querySelector(e):s;return i.shadowRoot||i};var s;super({getRootElement:t,componentNameSuffix:"_"+c,themeSection:i.qM+c,baseSelector:":host"}),this.#x=(s=t(this)).host||s}#k(){this.#x.onmouseenter=t=>{t.target.setAttribute("hover","true")},this.#x.onmouseleave=t=>{t.target.removeAttribute("hover")}}init(){super.init?.(),(0,r.oP)(this,this.#x,{[o?"includeAttrs":"excludeAttrs"]:a}),this.#k()}}},M=t=>class extends t{#T=m.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#T(),this.prevValue=this.value)}))}};var C=s(8084);const L=t=>class extends t{init(){this.#N(),super.init?.()}#N(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,m.call(this,"blur"),m.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(m.call(this,"focus"),m.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},8084:(t,e,s)=>{s.d(e,{Q:()=>r});var i=s(4567);const n=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active"],r=t=>class extends t{init(){super.init?.(),(0,i.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>n.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.warn(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[241],{693:(t,e,s)=>{s.d(e,{s:()=>o});var i=s(2061),n=s(357);const r=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}};var a=s(8084);const o=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#t;#e=!0;get baseSelector(){return e}get baseElement(){return this.#t??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#t||console.warn("missing base element for component",this.localName),this.#t}get rootElement(){return this.shadowRoot||this}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#e&&(this.#e=!1,this.init?.())}}return(0,i.qC)(n.A,r,a.Q)(s)}},5279:(t,e,s)=>{s.d(e,{gh:()=>i,k4:()=>n,qM:()=>a,qg:()=>r});const i="descope",n=3,r="host",a="@"},4567:(t,e,s)=>{s.d(e,{Db:()=>d,FX:()=>r,P$:()=>a,Tk:()=>u,iY:()=>h,oP:()=>c,tg:()=>l});var i=s(2061),n=s(5279);const r=(t,e,{excludeAttrs:s=[],includeAttrs:i=[]})=>{const n=Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!i.length||i.includes(t.name)))).map((t=>t.name));e(n),new MutationObserver((t=>{for(const n of t)"attributes"!==n.type||s.includes(n.attributeName)||i.length&&!i.includes(n.attributeName)||e([n.attributeName])})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{for(const s of t)"childList"===s.type&&e(s)})).observe(t,{childList:!0})},o=(t,e,s={})=>i=>{i.forEach((i=>{const n=s[i]||i,r=t.getAttribute(i);null!==r?e.getAttribute(n)!==r&&e.setAttribute(n,r):e.removeAttribute(n)}))},l=(t,e,s)=>{r(t,o(t,e),s),r(e,o(e,t),s)},h=t=>(0,i.E3)(n.gh,t),u=(...t)=>`--${(0,i.E3)(...t)}`,c=(t,e,s={})=>{r(t,o(t,e,s.mapAttrs),s)},d=(t,e,s=[])=>{if(!s.length)return;const i=s.reduce(((e,s)=>Object.assign(e,{[s]:{get:()=>t[s],set(e){t[s]=e}}})),{});Object.defineProperties(e,i)}},2061:(t,e,s)=>{s.d(e,{E3:()=>n,GL:()=>i,mf:()=>a,qC:()=>r});const i=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),n=(...t)=>i(t.filter((t=>!!t)).join("-")),r=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e),a=t=>"function"==typeof t},357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#s(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#s()}}},9241:(t,e,s)=>{s.d(e,{li:()=>M,Ae:()=>A.A,DM:()=>p,yk:()=>u,e4:()=>c,mE:()=>L,wX:()=>b,QT:()=>C.Q,Iw:()=>S,dj:()=>f});var i=s(5279),n=s(2061),r=s(4567),a=s(5561);const o=(t,...e)=>`var(${t}${e.length?` , ${o(...e)}`:""})`;class l{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,s])=>t+`${e} { \n${s.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const h=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,r.Tk)(t,s)})),{}),u=({mappings:t={},componentNameOverride:e=""})=>s=>{const u=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...h(u,{...t})}}#i;#n;#r;#a;#o;#l;#h;#u;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:r=i.qg,baseSelector:a}={}){super(),this.#a=s,this.#o=r,this.#l=e?.(this)||this.shadowRoot,this.#h=a??this.baseSelector,this.#u=Object.keys(t).map((t=>(0,n.E3)("st",s,t))),this.#c(),this.#d(),this.#m()}get#p(){return a.componentsThemeManager.currentTheme?.[u]||""}#g(){this.#n.innerHTML=this.#p[this.#o]}#d(){this.#n=document.createElement("style"),this.#n.id=`style-mixin-theme__${u}`,this.#l.prepend(this.#n),this.#r=a.componentsThemeManager.onCurrentThemeChange(this.#g.bind(this)),this.#g()}#m(){if(this.#u.length){this.#i=document.createElement("style"),this.#i.id=`style-mixin-overrides__${u}`;const s=(t=u,e=i.k4,Array(e).fill(`.${t}`).join(""));this.#i.innerText=`:host(${s}) {}`,this.#l.append(this.#i)}var t,e}#b(t,e){const s=this.#i?.sheet?.cssRules[0].style;if(!s)return;const i=(0,r.Tk)(u,t.replace(new RegExp("^st-"),""));e?s?.setProperty(i,e):(s?.removeProperty(i),this.removeAttribute(t))}#E(t=[]){let e=!1;for(const s of t)this.#u.includes(s)&&(this.#b(s,this.getAttribute(s)),e=!0);e&&(this.#i.innerHTML=this.#i?.sheet?.cssRules[0].cssText)}#c(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${u}`,e.innerHTML=((t,e,s)=>{const i=new l;return Object.keys(s).forEach((a=>{const l=((t,e)=>{const s={selector:"",property:(0,n.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>Object.assign({},s,t))):[Object.assign({},s,e)]:[s]})(a,s[a]),h=(0,r.Tk)(t,a);l.forEach((({selector:t,property:s})=>{i.add(((t="",e="")=>(0,n.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,n.mf)(s)?s():s,o(h))}))})),i.toString()})((0,n.E3)(u,this.#a),this.#h,t),this.#l.prepend(e)}}#v(t){(this.#l.classList||this.#l.host.classList).add(t)}init(){super.init?.(),this.shadowRoot.isConnected&&(this.#v(u),(0,r.FX)(this,this.#E.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#r?.()}}},c=t=>class extends t{#y=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#y=document.createElement("style"),this.#y.innerText="* { cursor: inherit!important }"}#f(t){t?this.shadowRoot.appendChild(this.#y):this.#y.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#f("true"===s)}};var d=s(693);function m(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}const p=({componentName:t,wrappedEleName:e,slots:s=[],style:i,excludeAttrsSync:a=[],includeAttrsSync:o=[],includeForwardProps:l=[]})=>{class h extends((0,d.s)({componentName:t,baseSelector:e})){#A=m.bind(this,"blur");#S=m.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:!0}).innerHTML=`\n\t\t\t<style id="create-proxy">${(0,n.mf)(i)?i():i}</style>\n\t\t\t<${e}>\n\t\t\t<slot></slot>\n\t\t\t${s.map((t=>`<slot name="${t}" slot="${t}"></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#A()})),this.baseElement.addEventListener("focus",(t=>{this.#S()})),(0,r.Db)(this.baseElement,this,l),(0,r.tg)(this.baseElement,this,{excludeAttrs:a,includeAttrs:o})}}return h},g=["required","pattern"],b=t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...g]}static get formAssociated(){return!0}#M;constructor(){super(),this.#M=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:r,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:u}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||i||n||o||l||h:return this.getAttribute("data-errormessage-pattern-mismatch")||this.defaultErrorMsgPatternMismatch;case r:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case u:return this.validationMessage;default:return""}}#C(){const t=this.isReadOnly?{}:this.getValidity();this.#M.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#M.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#M.validity.valid}reportValidity(){return this.#M.reportValidity()}get validity(){return this.#M.validity}get validationTarget(){return this.inputElement}setCustomValidity(t){t?this.#M.setValidity({customError:!0},t,this.validationTarget):(this.#M.setValidity({}),this.#C())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#M.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),g.includes(t)&&this.#C()}init(){super.init?.(),this.addEventListener("change",this.#C),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#C),setTimeout((()=>this.#C()))}},E=["invalid","required"],v=(t,e,s)=>{Object.defineProperty(t,s,{set:function(t){return e[s]=t},get:function(){return e[s]},configurable:!0})},y=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if(e=e.assignedElements()[0],"slot"!==e.localName)return e},f=(0,n.qC)((t=>class extends(b(t)){static get observedAttributes(){return[...t.observedAttributes||[],...E]}#L;#T=m.bind(this,"change");constructor(){super(),this.#L=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#L&&console.warn(this.localName,"no input was found")}),0)}get name(){return this.getAttribute("name")}get inputElement(){this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#L??=y(t)||y(e),this.#L}set inputElement(t){this.#L=t}getValidity(){return this.inputElement?.validity||{}}handleInternalInputErrorMessage(){this.inputElement.checkValidity()||this.inputElement.setCustomValidity(this.validationMessage)}#w(){this.handleInternalInputErrorMessage(),this.setAttribute("error-message",this.validationMessage)}init(){super.init?.(),this.inputElement.addEventListener("input",(t=>{this.inputElement.checkValidity()||(this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.baseElement.__onInput(t),this.#w())})),this.baseElement.addEventListener("change",(()=>{this.#T()})),this.#L.addEventListener("blur",(()=>{this.checkValidity()||(this.setAttribute("invalid","true"),this.#w())})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#w()})),this.handleInternalInputErrorMessage(),v(this,this.inputElement,"value"),v(this,this.inputElement,"selectionStart"),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,r.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})}}),u({componentNameOverride:(0,r.iY)("input-wrapper")}));var A=s(357);const S=({name:t,selector:e,mappings:s={},forward:{attributes:a=[],include:o=!0}={}})=>l=>{const c=t||(t=>t.replace(/[^\w\s]/gi,""))(e),d=u({mappings:s})(l);return class extends d{static get cssVarList(){return{...d.cssVarList,[c]:h((0,n.E3)(l.componentName,"_"+c),s)}}#x;constructor(){const t=t=>{const s=t.shadowRoot.querySelector(t.baseSelector),i=e?s.shadowRoot.querySelector(e):s;return i.shadowRoot||i};var s;super({getRootElement:t,componentNameSuffix:"_"+c,themeSection:i.qM+c,baseSelector:":host"}),this.#x=(s=t(this)).host||s}#k(){this.#x.onmouseenter=t=>{t.target.setAttribute("hover","true")},this.#x.onmouseleave=t=>{t.target.removeAttribute("hover")}}init(){super.init?.(),(0,r.oP)(this,this.#x,{[o?"includeAttrs":"excludeAttrs"]:a}),this.#k()}}},M=t=>class extends t{#T=m.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#T(),this.prevValue=this.value)}))}};var C=s(8084);const L=t=>class extends t{init(){this.#N(),super.init?.()}#N(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,m.call(this,"blur"),m.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(m.call(this,"focus"),m.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},8084:(t,e,s)=>{s.d(e,{Q:()=>r});var i=s(4567);const n=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active"],r=t=>class extends t{init(){super.init?.(),(0,i.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>n.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.warn(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[481],{2481:(t,e,r)=>{r.d(e,{v:()=>g,f:()=>p});var n=r(9241),o=r(2061),i=r(4567);var a=r(4201);const p=(0,i.iY)("password"),{host:s,inputField:d,inputElement:l,inputElementPlaceholder:u,revealButtonIcon:c,label:h,requiredIndicator:f,errorMessage:y,helperText:b}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:"> input:placeholder-shown"},revealButtonIcon:{selector:()=>"::part(reveal-button)::before"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},g=(0,o.qC)((0,n.yk)({mappings:{hostWidth:{...s,property:"width"},fontSize:[{property:"font-size"},{...s,property:"font-size"}],fontFamily:[h,d,y,b],inputHeight:{...d,property:"height"},inputBackgroundColor:{...d,property:"background-color"},inputBorderStyle:{...d,property:"border-style"},inputBorderWidth:{...d,property:"border-width"},inputBorderColor:{...d,property:"border-color"},inputBorderRadius:{...d,property:"border-radius"},inputOutlineColor:{...d,property:"outline-color"},inputOutlineStyle:{...d,property:"outline-style"},inputOutlineOffset:{...d,property:"outline-offset"},inputOutlineWidth:{...d,property:"outline-width"},labelTextColor:[{...h,property:"color"},{...f,property:"color"}],labelRequiredIndicator:{...f,property:"content"},inputValueTextColor:[{...l,property:"color"},{...c,property:"color"}],inputPlaceholderTextColor:{...u,property:"color"}}}),n.e4,n.dj,n.Ae,(t=>class extends t{get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable&this.isReadOnly){const e=this.baseElement.querySelector("input"),r=e.getAttribute("type");e.setAttribute("type","text"),setTimeout((()=>e.focus()));const n=t=>{e.setAttribute("type",r),t.target.removeEventListener("mouseup",n),t.target.removeEventListener("dragend",n)};t.target.addEventListener("mouseup",n,{once:!0}),t.target.addEventListener("dragend",n,{once:!0})}})),super.init?.()}}))((0,n.DM)({slots:["suffix"],wrappedEleName:"vaadin-password-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmin-width: 10em;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tbox-sizing: border-box;\t\t\t\t\n\t\t\t\tpadding: calc(var(${g.cssVarList.inputOutlineWidth}) + var(${g.cssVarList.inputOutlineOffset}));\n\t\t\t}\n\t\t\tvaadin-password-field {\n\t\t\t\twidth: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field) {\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\t\t\t\n\t\t\tvaadin-password-field > input {\n\t\t\t\tmin-height: 0;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\t\t\tvaadin-password-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t\tvaadin-password-field::before {\n\t\t\t\theight: initial;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field)::after {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field-button {\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\n\t\t\t${(0,a.Pd)("vaadin-password-field")}\n\n\t\t\t[readonly] vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\n\t\t\tvaadin-password-field-button[focus-ring] {\n\t\t\t\tbox-shadow: 0 0 0 2px var(${g.cssVarList.inputOutlineColor});\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[842],{395:(t,e,n)=>{n.d(e,{f:()=>l,o:()=>w});var i=n(4567),s=n(2061),r=n(9241),a=n(5857),o=n(1065),d=n(4201);const l=(0,i.iY)("new-password"),{host:p,label:h,internalInputsWrapper:u,errorMessage:c,helperText:f}={host:{selector:()=>":host"},label:{selector:"::part(label)"},internalInputsWrapper:{selector:"descope-new-password-internal .wrapper"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},w=(0,s.qC)((0,r.yk)({mappings:{fontSize:[p,{selector:o.d.componentName,property:o.d.cssVarList.fontSize}],fontFamily:[h,c,f],hostWidth:{...p,property:"width"},inputsRequiredIndicator:{...p,property:"content"},spaceBetweenInputs:{...u,property:"gap"}}}),r.e4,r.dj,(t=>class extends t{constructor(){super()}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t<${a.f} \n\t\t\t\tname="new-password" \n\t\t\t\ttabindex="-1"\n\t\t\t\tslot="input"\n\t\t\t></${a.f}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(a.f),(0,i.oP)(this,this.inputElement,{includeAttrs:["password-label","password-placeholder","confirm-label","confirm-placeholder","full-width","size","bordered","label","has-confirm","invalid","readonly","draggable"]})}}))((0,r.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t\tmax-width: 100%;\n\t\t\tmin-width: 10em;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t${(0,d.DY)()}\n\t\tvaadin-text-field {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t\tvaadin-text-field::part(input-field) {\n\t\t\tmin-height: 0;\n\t\t\tbackground: transparent;\n\t\t\toverflow: hidden;\n\t\t\tbox-shadow: none;\n\t\t\tpadding: 0;\n\t\t}\n\t\tvaadin-text-field::part(input-field)::after {\n\t\t\tbackground: transparent;\n\t\t\topacity: 0;\n\t\t}\n\t\tdescope-new-password-internal {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tpadding: 0;\n\t\t}\n\t\tdescope-new-password-internal > .wrapper {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\t flex-direction: column;\n\t\t}\n\t\tdescope-password-field {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t}\n\t\tdescope-new-password-internal vaadin-password-field::before {\n\t\t\theight: initial;\n\t\t},\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},5857:(t,e,n)=>{n.d(e,{f:()=>i});const i=(0,n(4567).iY)("new-password-internal")},1545:(t,e,n)=>{n.r(e);var i=n(3878),s=n(4567),r=n(395),a=n(5857);const o=/^password-/,d=/^confirm-/,l=(t,e)=>t.replace(e,""),p=["password-label","password-placeholder"],h=["confirm-label","confirm-placeholder"],u=["disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable"],c=[].concat(u,p,h),f=(0,i.P)({componentName:a.f,baseSelector:"div"});customElements.define(a.f,class extends f{static get observedAttributes(){return["has-confirm"].concat(f.observedAttributes||[],c)}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper"></div>\n\t\t',this.wrapperEle=this.querySelector(".wrapper")}get value(){return this.passwordInput?.value||""}set value(t){t!==this.value&&(this.value=t)}get hasConfirm(){return"true"===this.getAttribute("has-confirm")}getValidity(){if(this.isRequired&&!this.value)return{valueMissing:!0};if(this.hasConfirm&&this.confirmInput&&this.value!==this.confirmInput.value)return{patternMismatch:!0};const t=this.getAttribute("minlength"),e=parseInt(t,10)||0;return this.value.length>=e?{}:{tooShort:!0}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.passwordInput.focus()})),super.init?.(),this.renderInputs(this.hasConfirm)}renderInputs(t){let e='<descope-password-field data-id="password"></descope-password-field>';t&&(e+='<descope-password-field data-id="confirm"></descope-password-field>'),this.wrapperEle.innerHTML=e,this.passwordInput=this.querySelector('[data-id="password"]'),this.confirmInput=this.querySelector('[data-id="confirm"]'),this.inputs=[this.passwordInput,this.confirmInput],this.initInputs(),[...p,...h,...u].forEach((t=>{this.attributeChangedCallback(t,null,this.getAttribute(t))}))}handleIndicatorStyle(){for(const t of this.inputs){const e=document.createElement("style");e.innerHTML=`\n\t\t\t\t:host::part(required-indicator)::after {\n\t\t\t\t\tcontent: var(${r.o.cssVarList.inputsRequiredIndicator});\n\t\t\t\t}\n\t\t\t\t`,t?.shadowRoot.appendChild(e)}}get isInvalid(){return this.hasAttribute("invalid")&&"false"!==this.getAttribute("invalid")}handleInputsInvalidAttribute(){this.inputs.forEach((t=>{t&&(0,s.FX)(t,(e=>{if(e.includes("invalid")){const e=t.getAttribute("invalid"),n=this.getAttribute("invalid");this.isInvalid&&n!==e&&t.setAttribute("invalid","true")}}),{})}))}initInputs(){this.handleIndicatorStyle(),this.handleInputsInvalidAttribute(),this.handleFocusEventsDispatching(this.inputs)}toggleBooleanAttribute(t,e,n){null===n?t?.removeAttribute(e):t?.setAttribute(e,n)}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&("has-confirm"===t?this.renderInputs(null!==n&&"false"!==n):u.includes(t)?this.inputs.forEach((e=>this.toggleBooleanAttribute(e,t,n))):p.includes(t)?this.toggleBooleanAttribute(this.passwordInput,l(t,o),n):h.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,l(t,d),n))}})}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[842],{395:(t,e,n)=>{n.d(e,{f:()=>l,o:()=>w});var i=n(4567),s=n(2061),r=n(9241),a=n(5857),o=n(2481),d=n(4201);const l=(0,i.iY)("new-password"),{host:p,label:h,internalInputsWrapper:u,errorMessage:c,helperText:f}={host:{selector:()=>":host"},label:{selector:"::part(label)"},internalInputsWrapper:{selector:"descope-new-password-internal .wrapper"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},w=(0,s.qC)((0,r.yk)({mappings:{fontSize:[p,{selector:o.v.componentName,property:o.v.cssVarList.fontSize}],fontFamily:[h,c,f],hostWidth:{...p,property:"width"},inputsRequiredIndicator:{...p,property:"content"},spaceBetweenInputs:{...u,property:"gap"}}}),r.e4,r.dj,(t=>class extends t{constructor(){super()}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t<${a.f} \n\t\t\t\tname="new-password" \n\t\t\t\ttabindex="-1"\n\t\t\t\tslot="input"\n\t\t\t></${a.f}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(a.f),(0,i.oP)(this,this.inputElement,{includeAttrs:["password-label","password-placeholder","confirm-label","confirm-placeholder","full-width","size","bordered","label","has-confirm","invalid","readonly","draggable"]})}}))((0,r.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t\tmax-width: 100%;\n\t\t\tmin-width: 10em;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t${(0,d.DY)()}\n\t\tvaadin-text-field {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t\tvaadin-text-field::part(input-field) {\n\t\t\tmin-height: 0;\n\t\t\tbackground: transparent;\n\t\t\toverflow: hidden;\n\t\t\tbox-shadow: none;\n\t\t\tpadding: 0;\n\t\t}\n\t\tvaadin-text-field::part(input-field)::after {\n\t\t\tbackground: transparent;\n\t\t\topacity: 0;\n\t\t}\n\t\tdescope-new-password-internal {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tpadding: 0;\n\t\t}\n\t\tdescope-new-password-internal > .wrapper {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\t flex-direction: column;\n\t\t}\n\t\tdescope-password {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t}\n\t\tdescope-new-password-internal vaadin-password-field::before {\n\t\t\theight: initial;\n\t\t},\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},5857:(t,e,n)=>{n.d(e,{f:()=>i});const i=(0,n(4567).iY)("new-password-internal")},1545:(t,e,n)=>{n.r(e);var i=n(3878),s=n(4567),r=n(395),a=n(5857);const o=/^password-/,d=/^confirm-/,l=(t,e)=>t.replace(e,""),p=["password-label","password-placeholder"],h=["confirm-label","confirm-placeholder"],u=["disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable"],c=[].concat(u,p,h),f=(0,i.P)({componentName:a.f,baseSelector:"div"});customElements.define(a.f,class extends f{static get observedAttributes(){return["has-confirm"].concat(f.observedAttributes||[],c)}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper"></div>\n\t\t',this.wrapperEle=this.querySelector(".wrapper")}get value(){return this.passwordInput?.value||""}set value(t){t!==this.value&&(this.value=t)}get hasConfirm(){return"true"===this.getAttribute("has-confirm")}getValidity(){if(this.isRequired&&!this.value)return{valueMissing:!0};if(this.hasConfirm&&this.confirmInput&&this.value!==this.confirmInput.value)return{patternMismatch:!0};const t=this.getAttribute("minlength"),e=parseInt(t,10)||0;return this.value.length>=e?{}:{tooShort:!0}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.passwordInput.focus()})),super.init?.(),this.renderInputs(this.hasConfirm)}renderInputs(t){let e='<descope-password data-id="password"></descope-password>';t&&(e+='<descope-password data-id="confirm"></descope-password>'),this.wrapperEle.innerHTML=e,this.passwordInput=this.querySelector('[data-id="password"]'),this.confirmInput=this.querySelector('[data-id="confirm"]'),this.inputs=[this.passwordInput,this.confirmInput],this.initInputs(),[...p,...h,...u].forEach((t=>{this.attributeChangedCallback(t,null,this.getAttribute(t))}))}handleIndicatorStyle(){for(const t of this.inputs){const e=document.createElement("style");e.innerHTML=`\n\t\t\t\t:host::part(required-indicator)::after {\n\t\t\t\t\tcontent: var(${r.o.cssVarList.inputsRequiredIndicator});\n\t\t\t\t}\n\t\t\t\t`,t?.shadowRoot.appendChild(e)}}get isInvalid(){return this.hasAttribute("invalid")&&"false"!==this.getAttribute("invalid")}handleInputsInvalidAttribute(){this.inputs.forEach((t=>{t&&(0,s.FX)(t,(e=>{if(e.includes("invalid")){const e=t.getAttribute("invalid"),n=this.getAttribute("invalid");this.isInvalid&&n!==e&&t.setAttribute("invalid","true")}}),{})}))}initInputs(){this.handleIndicatorStyle(),this.handleInputsInvalidAttribute(),this.handleFocusEventsDispatching(this.inputs)}toggleBooleanAttribute(t,e,n){null===n?t?.removeAttribute(e):t?.setAttribute(e,n)}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&("has-confirm"===t?this.renderInputs(null!==n&&"false"!==n):u.includes(t)?this.inputs.forEach((e=>this.toggleBooleanAttribute(e,t,n))):p.includes(t)?this.toggleBooleanAttribute(this.passwordInput,l(t,o),n):h.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,l(t,d),n))}})}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[55],{8974:(e,s,c)=>{c.r(s),c.d(s,{NewPasswordClass:()=>o.o});var o=c(395);c(9357),c(5702),c(1545),customElements.define(o.f,o.o)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[55],{8974:(e,s,c)=>{c.r(s),c.d(s,{NewPasswordClass:()=>o.o});var o=c(395);c(9357),c(9279),c(1545),customElements.define(o.f,o.o)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[106],{9279:(e,s,c)=>{c.r(s),c.d(s,{PasswordClass:()=>a.v}),c(7056);var a=c(2481);customElements.define(a.f,a.v)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[646],{6094:(e,a,d)=>{d.d(a,{Z:()=>o});const o=[{name:"Afghanistan",dialCode:"+93",code:"AF"},{name:"Aland Islands",dialCode:"+358",code:"AX"},{name:"Albania",dialCode:"+355",code:"AL"},{name:"Algeria",dialCode:"+213",code:"DZ"},{name:"AmericanSamoa",dialCode:"+1684",code:"AS"},{name:"Andorra",dialCode:"+376",code:"AD"},{name:"Angola",dialCode:"+244",code:"AO"},{name:"Anguilla",dialCode:"+1264",code:"AI"},{name:"Antarctica",dialCode:"+672",code:"AQ"},{name:"Antigua and Barbuda",dialCode:"+1268",code:"AG"},{name:"Argentina",dialCode:"+54",code:"AR"},{name:"Armenia",dialCode:"+374",code:"AM"},{name:"Aruba",dialCode:"+297",code:"AW"},{name:"Australia",dialCode:"+61",code:"AU"},{name:"Austria",dialCode:"+43",code:"AT"},{name:"Azerbaijan",dialCode:"+994",code:"AZ"},{name:"Bahamas",dialCode:"+1242",code:"BS"},{name:"Bahrain",dialCode:"+973",code:"BH"},{name:"Bangladesh",dialCode:"+880",code:"BD"},{name:"Barbados",dialCode:"+1246",code:"BB"},{name:"Belarus",dialCode:"+375",code:"BY"},{name:"Belgium",dialCode:"+32",code:"BE"},{name:"Belize",dialCode:"+501",code:"BZ"},{name:"Benin",dialCode:"+229",code:"BJ"},{name:"Bermuda",dialCode:"+1441",code:"BM"},{name:"Bhutan",dialCode:"+975",code:"BT"},{name:"Bolivia, Plurinational State of",dialCode:"+591",code:"BO"},{name:"Bosnia and Herzegovina",dialCode:"+387",code:"BA"},{name:"Botswana",dialCode:"+267",code:"BW"},{name:"Brazil",dialCode:"+55",code:"BR"},{name:"British Indian Ocean Territory",dialCode:"+246",code:"IO"},{name:"Brunei Darussalam",dialCode:"+673",code:"BN"},{name:"Bulgaria",dialCode:"+359",code:"BG"},{name:"Burkina Faso",dialCode:"+226",code:"BF"},{name:"Burundi",dialCode:"+257",code:"BI"},{name:"Cambodia",dialCode:"+855",code:"KH"},{name:"Cameroon",dialCode:"+237",code:"CM"},{name:"Canada",dialCode:"+1",code:"CA"},{name:"Cape Verde",dialCode:"+238",code:"CV"},{name:"Cayman Islands",dialCode:"+345",code:"KY"},{name:"Central African Republic",dialCode:"+236",code:"CF"},{name:"Chad",dialCode:"+235",code:"TD"},{name:"Chile",dialCode:"+56",code:"CL"},{name:"China",dialCode:"+86",code:"CN"},{name:"Christmas Island",dialCode:"+61",code:"CX"},{name:"Cocos (Keeling) Islands",dialCode:"+61",code:"CC"},{name:"Colombia",dialCode:"+57",code:"CO"},{name:"Comoros",dialCode:"+269",code:"KM"},{name:"Congo",dialCode:"+242",code:"CG"},{name:"Congo, The Democratic Republic of the Congo",dialCode:"+243",code:"CD"},{name:"Cook Islands",dialCode:"+682",code:"CK"},{name:"Costa Rica",dialCode:"+506",code:"CR"},{name:"Cote d'Ivoire",dialCode:"+225",code:"CI"},{name:"Croatia",dialCode:"+385",code:"HR"},{name:"Cuba",dialCode:"+53",code:"CU"},{name:"Cyprus",dialCode:"+357",code:"CY"},{name:"Czech Republic",dialCode:"+420",code:"CZ"},{name:"Denmark",dialCode:"+45",code:"DK"},{name:"Djibouti",dialCode:"+253",code:"DJ"},{name:"Dominica",dialCode:"+1767",code:"DM"},{name:"Dominican Republic",dialCode:"+1849",code:"DO"},{name:"Ecuador",dialCode:"+593",code:"EC"},{name:"Egypt",dialCode:"+20",code:"EG"},{name:"El Salvador",dialCode:"+503",code:"SV"},{name:"Equatorial Guinea",dialCode:"+240",code:"GQ"},{name:"Eritrea",dialCode:"+291",code:"ER"},{name:"Estonia",dialCode:"+372",code:"EE"},{name:"Ethiopia",dialCode:"+251",code:"ET"},{name:"Falkland Islands (Malvinas)",dialCode:"+500",code:"FK"},{name:"Faroe Islands",dialCode:"+298",code:"FO"},{name:"Fiji",dialCode:"+679",code:"FJ"},{name:"Finland",dialCode:"+358",code:"FI"},{name:"France",dialCode:"+33",code:"FR"},{name:"French Guiana",dialCode:"+594",code:"GF"},{name:"French Polynesia",dialCode:"+689",code:"PF"},{name:"Gabon",dialCode:"+241",code:"GA"},{name:"Gambia",dialCode:"+220",code:"GM"},{name:"Georgia",dialCode:"+995",code:"GE"},{name:"Germany",dialCode:"+49",code:"DE"},{name:"Ghana",dialCode:"+233",code:"GH"},{name:"Gibraltar",dialCode:"+350",code:"GI"},{name:"Greece",dialCode:"+30",code:"GR"},{name:"Greenland",dialCode:"+299",code:"GL"},{name:"Grenada",dialCode:"+1473",code:"GD"},{name:"Guadeloupe",dialCode:"+590",code:"GP"},{name:"Guam",dialCode:"+1671",code:"GU"},{name:"Guatemala",dialCode:"+502",code:"GT"},{name:"Guernsey",dialCode:"+44",code:"GG"},{name:"Guinea",dialCode:"+224",code:"GN"},{name:"Guinea-Bissau",dialCode:"+245",code:"GW"},{name:"Guyana",dialCode:"+595",code:"GY"},{name:"Haiti",dialCode:"+509",code:"HT"},{name:"Holy See (Vatican City State)",dialCode:"+379",code:"VA"},{name:"Honduras",dialCode:"+504",code:"HN"},{name:"Hong Kong",dialCode:"+852",code:"HK"},{name:"Hungary",dialCode:"+36",code:"HU"},{name:"Iceland",dialCode:"+354",code:"IS"},{name:"India",dialCode:"+91",code:"IN"},{name:"Indonesia",dialCode:"+62",code:"ID"},{name:"Iran, Islamic Republic of Persian Gulf",dialCode:"+98",code:"IR"},{name:"Iraq",dialCode:"+964",code:"IQ"},{name:"Ireland",dialCode:"+353",code:"IE"},{name:"Isle of Man",dialCode:"+44",code:"IM"},{name:"Israel",dialCode:"+972",code:"IL"},{name:"Italy",dialCode:"+39",code:"IT"},{name:"Jamaica",dialCode:"+1876",code:"JM"},{name:"Japan",dialCode:"+81",code:"JP"},{name:"Jersey",dialCode:"+44",code:"JE"},{name:"Jordan",dialCode:"+962",code:"JO"},{name:"Kazakhstan",dialCode:"+77",code:"KZ"},{name:"Kenya",dialCode:"+254",code:"KE"},{name:"Kiribati",dialCode:"+686",code:"KI"},{name:"Korea, Democratic People's Republic of Korea",dialCode:"+850",code:"KP"},{name:"Korea, Republic of South Korea",dialCode:"+82",code:"KR"},{name:"Kuwait",dialCode:"+965",code:"KW"},{name:"Kyrgyzstan",dialCode:"+996",code:"KG"},{name:"Laos",dialCode:"+856",code:"LA"},{name:"Latvia",dialCode:"+371",code:"LV"},{name:"Lebanon",dialCode:"+961",code:"LB"},{name:"Lesotho",dialCode:"+266",code:"LS"},{name:"Liberia",dialCode:"+231",code:"LR"},{name:"Libyan Arab Jamahiriya",dialCode:"+218",code:"LY"},{name:"Liechtenstein",dialCode:"+423",code:"LI"},{name:"Lithuania",dialCode:"+370",code:"LT"},{name:"Luxembourg",dialCode:"+352",code:"LU"},{name:"Macao",dialCode:"+853",code:"MO"},{name:"Macedonia",dialCode:"+389",code:"MK"},{name:"Madagascar",dialCode:"+261",code:"MG"},{name:"Malawi",dialCode:"+265",code:"MW"},{name:"Malaysia",dialCode:"+60",code:"MY"},{name:"Maldives",dialCode:"+960",code:"MV"},{name:"Mali",dialCode:"+223",code:"ML"},{name:"Malta",dialCode:"+356",code:"MT"},{name:"Marshall Islands",dialCode:"+692",code:"MH"},{name:"Martinique",dialCode:"+596",code:"MQ"},{name:"Mauritania",dialCode:"+222",code:"MR"},{name:"Mauritius",dialCode:"+230",code:"MU"},{name:"Mayotte",dialCode:"+262",code:"YT"},{name:"Mexico",dialCode:"+52",code:"MX"},{name:"Micronesia, Federated States of Micronesia",dialCode:"+691",code:"FM"},{name:"Moldova",dialCode:"+373",code:"MD"},{name:"Monaco",dialCode:"+377",code:"MC"},{name:"Mongolia",dialCode:"+976",code:"MN"},{name:"Montenegro",dialCode:"+382",code:"ME"},{name:"Montserrat",dialCode:"+1664",code:"MS"},{name:"Morocco",dialCode:"+212",code:"MA"},{name:"Mozambique",dialCode:"+258",code:"MZ"},{name:"Myanmar",dialCode:"+95",code:"MM"},{name:"Namibia",dialCode:"+264",code:"NA"},{name:"Nauru",dialCode:"+674",code:"NR"},{name:"Nepal",dialCode:"+977",code:"NP"},{name:"Netherlands",dialCode:"+31",code:"NL"},{name:"Netherlands Antilles",dialCode:"+599",code:"AN"},{name:"New Caledonia",dialCode:"+687",code:"NC"},{name:"New Zealand",dialCode:"+64",code:"NZ"},{name:"Nicaragua",dialCode:"+505",code:"NI"},{name:"Niger",dialCode:"+227",code:"NE"},{name:"Nigeria",dialCode:"+234",code:"NG"},{name:"Niue",dialCode:"+683",code:"NU"},{name:"Norfolk Island",dialCode:"+672",code:"NF"},{name:"Northern Mariana Islands",dialCode:"+1670",code:"MP"},{name:"Norway",dialCode:"+47",code:"NO"},{name:"Oman",dialCode:"+968",code:"OM"},{name:"Pakistan",dialCode:"+92",code:"PK"},{name:"Palau",dialCode:"+680",code:"PW"},{name:"Palestinian Territory, Occupied",dialCode:"+970",code:"PS"},{name:"Panama",dialCode:"+507",code:"PA"},{name:"Papua New Guinea",dialCode:"+675",code:"PG"},{name:"Paraguay",dialCode:"+595",code:"PY"},{name:"Peru",dialCode:"+51",code:"PE"},{name:"Philippines",dialCode:"+63",code:"PH"},{name:"Pitcairn",dialCode:"+872",code:"PN"},{name:"Poland",dialCode:"+48",code:"PL"},{name:"Portugal",dialCode:"+351",code:"PT"},{name:"Puerto Rico",dialCode:"+1939",code:"PR"},{name:"Qatar",dialCode:"+974",code:"QA"},{name:"Romania",dialCode:"+40",code:"RO"},{name:"Russia",dialCode:"+7",code:"RU"},{name:"Rwanda",dialCode:"+250",code:"RW"},{name:"Reunion",dialCode:"+262",code:"RE"},{name:"Saint Barthelemy",dialCode:"+590",code:"BL"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dialCode:"+290",code:"SH"},{name:"Saint Kitts and Nevis",dialCode:"+1869",code:"KN"},{name:"Saint Lucia",dialCode:"+1758",code:"LC"},{name:"Saint Martin",dialCode:"+590",code:"MF"},{name:"Saint Pierre and Miquelon",dialCode:"+508",code:"PM"},{name:"Saint Vincent and the Grenadines",dialCode:"+1784",code:"VC"},{name:"Samoa",dialCode:"+685",code:"WS"},{name:"San Marino",dialCode:"+378",code:"SM"},{name:"Sao Tome and Principe",dialCode:"+239",code:"ST"},{name:"Saudi Arabia",dialCode:"+966",code:"SA"},{name:"Senegal",dialCode:"+221",code:"SN"},{name:"Serbia",dialCode:"+381",code:"RS"},{name:"Seychelles",dialCode:"+248",code:"SC"},{name:"Sierra Leone",dialCode:"+232",code:"SL"},{name:"Singapore",dialCode:"+65",code:"SG"},{name:"Slovakia",dialCode:"+421",code:"SK"},{name:"Slovenia",dialCode:"+386",code:"SI"},{name:"Solomon Islands",dialCode:"+677",code:"SB"},{name:"Somalia",dialCode:"+252",code:"SO"},{name:"South Africa",dialCode:"+27",code:"ZA"},{name:"South Sudan",dialCode:"+211",code:"SS"},{name:"South Georgia and the South Sandwich Islands",dialCode:"+500",code:"GS"},{name:"Spain",dialCode:"+34",code:"ES"},{name:"Sri Lanka",dialCode:"+94",code:"LK"},{name:"Sudan",dialCode:"+249",code:"SD"},{name:"Suriname",dialCode:"+597",code:"SR"},{name:"Svalbard and Jan Mayen",dialCode:"+47",code:"SJ"},{name:"Swaziland",dialCode:"+268",code:"SZ"},{name:"Sweden",dialCode:"+46",code:"SE"},{name:"Switzerland",dialCode:"+41",code:"CH"},{name:"Syrian Arab Republic",dialCode:"+963",code:"SY"},{name:"Taiwan",dialCode:"+886",code:"TW"},{name:"Tajikistan",dialCode:"+992",code:"TJ"},{name:"Tanzania, United Republic of Tanzania",dialCode:"+255",code:"TZ"},{name:"Thailand",dialCode:"+66",code:"TH"},{name:"Timor-Leste",dialCode:"+670",code:"TL"},{name:"Togo",dialCode:"+228",code:"TG"},{name:"Tokelau",dialCode:"+690",code:"TK"},{name:"Tonga",dialCode:"+676",code:"TO"},{name:"Trinidad and Tobago",dialCode:"+1868",code:"TT"},{name:"Tunisia",dialCode:"+216",code:"TN"},{name:"Turkey",dialCode:"+90",code:"TR"},{name:"Turkmenistan",dialCode:"+993",code:"TM"},{name:"Turks and Caicos Islands",dialCode:"+1649",code:"TC"},{name:"Tuvalu",dialCode:"+688",code:"TV"},{name:"Uganda",dialCode:"+256",code:"UG"},{name:"Ukraine",dialCode:"+380",code:"UA"},{name:"United Arab Emirates",dialCode:"+971",code:"AE"},{name:"United Kingdom",dialCode:"+44",code:"GB"},{name:"United States",dialCode:"+1",code:"US"},{name:"Uruguay",dialCode:"+598",code:"UY"},{name:"Uzbekistan",dialCode:"+998",code:"UZ"},{name:"Vanuatu",dialCode:"+678",code:"VU"},{name:"Venezuela, Bolivarian Republic of Venezuela",dialCode:"+58",code:"VE"},{name:"Vietnam",dialCode:"+84",code:"VN"},{name:"Virgin Islands, British",dialCode:"+1284",code:"VG"},{name:"Virgin Islands, U.S.",dialCode:"+1340",code:"VI"},{name:"Wallis and Futuna",dialCode:"+681",code:"WF"},{name:"Yemen",dialCode:"+967",code:"YE"},{name:"Zambia",dialCode:"+260",code:"ZM"},{name:"Zimbabwe",dialCode:"+263",code:"ZW"}].sort(((e,a)=>e.name<a.name?-1:1))},5076:(e,a,d)=>{d.d(a,{f:()=>l,Z:()=>u});var o=d(3878),n=d(4567),i=d(6094);const l=(0,n.iY)("phone-field-internal"),t=["disabled","size","bordered","invalid","readonly"],c=["country-input-placeholder","default-code"],m=["phone-input-placeholder","maxlength"],C={"country-input-placeholder":"placeholder","phone-input-placeholder":"placeholder"},r=[].concat(t,c,m),s=(0,o.P)({componentName:l,baseSelector:"div"}),u=class extends s{static get observedAttributes(){return[].concat(s.observedAttributes||[],r)}constructor(){super(),this.innerHTML=`\n <div>\n <descope-combo-box\n\t\t\t\titem-label-path="data-name"\n\t\t\t\titem-value-path="data-id"\n\t\t\t>\n\t\t\t${i.Z.map((e=>(({code:e,dialCode:a,name:d})=>`\n\t<div\n\t\tstyle="display:flex; flex-direction: column;"\n\t\tdata-id="${e}"\n\t\tdata-name="${e} ${a} ${d}"\n\t\tdata-dial-code="${a}"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src="${(e=>`https://cdn.jsdelivr.net/npm/svg-country-flags@1.2.10/svg/${e.toLowerCase()}.svg`)(e)}" width="20"/>\n\t\t\t</span>\n\t\t\t<span>${d}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${e}</span>\n\t\t\t<span>${a}</span>\n\t\t</div>\n\t</div>\n`)(e))).join("")}\n\t\t\t</descope-combo-box>\n\t\t\t<div class="separator"></div>\n <descope-text-field type="tel"></descope-text-field>\n </div>`,this.countryCodeInput=this.querySelector("descope-combo-box"),this.phoneNumberInput=this.querySelector("descope-text-field"),this.inputs=[this.countryCodeInput,this.phoneNumberInput]}get value(){return this.inputs.map((({value:e})=>e)).join("-")}set value(e){const[a="",d=""]=e.split("-"),o=this.getCountryByDialCode(a);o&&(this.countryCodeInput.selectedItem=o),this.phoneNumberInput.value=d}get phoneNumberValue(){return this.phoneNumberInput.value}get countryCodeValue(){return this.countryCodeInput.shadowRoot.querySelector("input").value}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}getValidity(){const e=this.countryCodeInput.value,a=this.phoneNumberInput.value,d=!e||!a,o=this.phoneNumberInput.value.length&&this.phoneNumberInput.value.length<this.minLength;return this.isRequired&&d?{valueMissing:!0}:o?{tooShort:!0}:e&&!a||!e&&a?{valueMissing:!0}:{}}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.inputs[0].focus()})),super.init?.(),this.initInputs(),this.setComboBoxDescriptor()}getCountryByDialCode(e){return this.countryCodeInput.items.find((a=>a.getAttribute("data-dial-code")===e))}getCountryByCodeId(e){return this.countryCodeInput.items.find((a=>a["data-id"]===e))?.["data-name"]}handleDefaultCountryCode(e){if(!this.countryCodeInput.value){const a=this.getCountryByCodeId(e);a&&setTimeout((()=>{this.countryCodeInput.selectedItem=a}))}}setComboBoxDescriptor(){const e=this.countryCodeInput,a=e.shadowRoot.querySelector("input"),d=Object.getOwnPropertyDescriptor(a.constructor.prototype,"value");Object.defineProperties(a,{value:{...d,set(a){if(!e.items?.length)return;const[o,n]=a.split(" ");a!==this.value&&d.set.call(this,n||"")}}})}initInputs(){this.phoneNumberInput.addEventListener("input",(e=>{const a=/^\d$/,d=e.target.value.split("").filter((e=>a.test(e))).join("");e.target.value=d})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}attributeChangedCallback(e,a,d){if(super.attributeChangedCallback(e,a,d),a!==d)if("default-code"===e&&d)this.handleDefaultCountryCode(d);else if(r.includes(e)){const a=C[e]||e;t.includes(e)?this.inputs.forEach((e=>e.setAttribute(a,d))):c.includes(e)?this.countryCodeInput.setAttribute(a,d):m.includes(e)&&this.phoneNumberInput.setAttribute(a,d)}}}},4772:(e,a,d)=>{d.r(a),d(1294),d(9357);var o=d(5076);customElements.define(o.f,o.Z)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[320],{6094:(e,a,d)=>{d.d(a,{Z:()=>o});const o=[{name:"Afghanistan",dialCode:"+93",code:"AF"},{name:"Aland Islands",dialCode:"+358",code:"AX"},{name:"Albania",dialCode:"+355",code:"AL"},{name:"Algeria",dialCode:"+213",code:"DZ"},{name:"AmericanSamoa",dialCode:"+1684",code:"AS"},{name:"Andorra",dialCode:"+376",code:"AD"},{name:"Angola",dialCode:"+244",code:"AO"},{name:"Anguilla",dialCode:"+1264",code:"AI"},{name:"Antarctica",dialCode:"+672",code:"AQ"},{name:"Antigua and Barbuda",dialCode:"+1268",code:"AG"},{name:"Argentina",dialCode:"+54",code:"AR"},{name:"Armenia",dialCode:"+374",code:"AM"},{name:"Aruba",dialCode:"+297",code:"AW"},{name:"Australia",dialCode:"+61",code:"AU"},{name:"Austria",dialCode:"+43",code:"AT"},{name:"Azerbaijan",dialCode:"+994",code:"AZ"},{name:"Bahamas",dialCode:"+1242",code:"BS"},{name:"Bahrain",dialCode:"+973",code:"BH"},{name:"Bangladesh",dialCode:"+880",code:"BD"},{name:"Barbados",dialCode:"+1246",code:"BB"},{name:"Belarus",dialCode:"+375",code:"BY"},{name:"Belgium",dialCode:"+32",code:"BE"},{name:"Belize",dialCode:"+501",code:"BZ"},{name:"Benin",dialCode:"+229",code:"BJ"},{name:"Bermuda",dialCode:"+1441",code:"BM"},{name:"Bhutan",dialCode:"+975",code:"BT"},{name:"Bolivia, Plurinational State of",dialCode:"+591",code:"BO"},{name:"Bosnia and Herzegovina",dialCode:"+387",code:"BA"},{name:"Botswana",dialCode:"+267",code:"BW"},{name:"Brazil",dialCode:"+55",code:"BR"},{name:"British Indian Ocean Territory",dialCode:"+246",code:"IO"},{name:"Brunei Darussalam",dialCode:"+673",code:"BN"},{name:"Bulgaria",dialCode:"+359",code:"BG"},{name:"Burkina Faso",dialCode:"+226",code:"BF"},{name:"Burundi",dialCode:"+257",code:"BI"},{name:"Cambodia",dialCode:"+855",code:"KH"},{name:"Cameroon",dialCode:"+237",code:"CM"},{name:"Canada",dialCode:"+1",code:"CA"},{name:"Cape Verde",dialCode:"+238",code:"CV"},{name:"Cayman Islands",dialCode:"+345",code:"KY"},{name:"Central African Republic",dialCode:"+236",code:"CF"},{name:"Chad",dialCode:"+235",code:"TD"},{name:"Chile",dialCode:"+56",code:"CL"},{name:"China",dialCode:"+86",code:"CN"},{name:"Christmas Island",dialCode:"+61",code:"CX"},{name:"Cocos (Keeling) Islands",dialCode:"+61",code:"CC"},{name:"Colombia",dialCode:"+57",code:"CO"},{name:"Comoros",dialCode:"+269",code:"KM"},{name:"Congo",dialCode:"+242",code:"CG"},{name:"Congo, The Democratic Republic of the Congo",dialCode:"+243",code:"CD"},{name:"Cook Islands",dialCode:"+682",code:"CK"},{name:"Costa Rica",dialCode:"+506",code:"CR"},{name:"Cote d'Ivoire",dialCode:"+225",code:"CI"},{name:"Croatia",dialCode:"+385",code:"HR"},{name:"Cuba",dialCode:"+53",code:"CU"},{name:"Cyprus",dialCode:"+357",code:"CY"},{name:"Czech Republic",dialCode:"+420",code:"CZ"},{name:"Denmark",dialCode:"+45",code:"DK"},{name:"Djibouti",dialCode:"+253",code:"DJ"},{name:"Dominica",dialCode:"+1767",code:"DM"},{name:"Dominican Republic",dialCode:"+1849",code:"DO"},{name:"Ecuador",dialCode:"+593",code:"EC"},{name:"Egypt",dialCode:"+20",code:"EG"},{name:"El Salvador",dialCode:"+503",code:"SV"},{name:"Equatorial Guinea",dialCode:"+240",code:"GQ"},{name:"Eritrea",dialCode:"+291",code:"ER"},{name:"Estonia",dialCode:"+372",code:"EE"},{name:"Ethiopia",dialCode:"+251",code:"ET"},{name:"Falkland Islands (Malvinas)",dialCode:"+500",code:"FK"},{name:"Faroe Islands",dialCode:"+298",code:"FO"},{name:"Fiji",dialCode:"+679",code:"FJ"},{name:"Finland",dialCode:"+358",code:"FI"},{name:"France",dialCode:"+33",code:"FR"},{name:"French Guiana",dialCode:"+594",code:"GF"},{name:"French Polynesia",dialCode:"+689",code:"PF"},{name:"Gabon",dialCode:"+241",code:"GA"},{name:"Gambia",dialCode:"+220",code:"GM"},{name:"Georgia",dialCode:"+995",code:"GE"},{name:"Germany",dialCode:"+49",code:"DE"},{name:"Ghana",dialCode:"+233",code:"GH"},{name:"Gibraltar",dialCode:"+350",code:"GI"},{name:"Greece",dialCode:"+30",code:"GR"},{name:"Greenland",dialCode:"+299",code:"GL"},{name:"Grenada",dialCode:"+1473",code:"GD"},{name:"Guadeloupe",dialCode:"+590",code:"GP"},{name:"Guam",dialCode:"+1671",code:"GU"},{name:"Guatemala",dialCode:"+502",code:"GT"},{name:"Guernsey",dialCode:"+44",code:"GG"},{name:"Guinea",dialCode:"+224",code:"GN"},{name:"Guinea-Bissau",dialCode:"+245",code:"GW"},{name:"Guyana",dialCode:"+595",code:"GY"},{name:"Haiti",dialCode:"+509",code:"HT"},{name:"Holy See (Vatican City State)",dialCode:"+379",code:"VA"},{name:"Honduras",dialCode:"+504",code:"HN"},{name:"Hong Kong",dialCode:"+852",code:"HK"},{name:"Hungary",dialCode:"+36",code:"HU"},{name:"Iceland",dialCode:"+354",code:"IS"},{name:"India",dialCode:"+91",code:"IN"},{name:"Indonesia",dialCode:"+62",code:"ID"},{name:"Iran, Islamic Republic of Persian Gulf",dialCode:"+98",code:"IR"},{name:"Iraq",dialCode:"+964",code:"IQ"},{name:"Ireland",dialCode:"+353",code:"IE"},{name:"Isle of Man",dialCode:"+44",code:"IM"},{name:"Israel",dialCode:"+972",code:"IL"},{name:"Italy",dialCode:"+39",code:"IT"},{name:"Jamaica",dialCode:"+1876",code:"JM"},{name:"Japan",dialCode:"+81",code:"JP"},{name:"Jersey",dialCode:"+44",code:"JE"},{name:"Jordan",dialCode:"+962",code:"JO"},{name:"Kazakhstan",dialCode:"+77",code:"KZ"},{name:"Kenya",dialCode:"+254",code:"KE"},{name:"Kiribati",dialCode:"+686",code:"KI"},{name:"Korea, Democratic People's Republic of Korea",dialCode:"+850",code:"KP"},{name:"Korea, Republic of South Korea",dialCode:"+82",code:"KR"},{name:"Kuwait",dialCode:"+965",code:"KW"},{name:"Kyrgyzstan",dialCode:"+996",code:"KG"},{name:"Laos",dialCode:"+856",code:"LA"},{name:"Latvia",dialCode:"+371",code:"LV"},{name:"Lebanon",dialCode:"+961",code:"LB"},{name:"Lesotho",dialCode:"+266",code:"LS"},{name:"Liberia",dialCode:"+231",code:"LR"},{name:"Libyan Arab Jamahiriya",dialCode:"+218",code:"LY"},{name:"Liechtenstein",dialCode:"+423",code:"LI"},{name:"Lithuania",dialCode:"+370",code:"LT"},{name:"Luxembourg",dialCode:"+352",code:"LU"},{name:"Macao",dialCode:"+853",code:"MO"},{name:"Macedonia",dialCode:"+389",code:"MK"},{name:"Madagascar",dialCode:"+261",code:"MG"},{name:"Malawi",dialCode:"+265",code:"MW"},{name:"Malaysia",dialCode:"+60",code:"MY"},{name:"Maldives",dialCode:"+960",code:"MV"},{name:"Mali",dialCode:"+223",code:"ML"},{name:"Malta",dialCode:"+356",code:"MT"},{name:"Marshall Islands",dialCode:"+692",code:"MH"},{name:"Martinique",dialCode:"+596",code:"MQ"},{name:"Mauritania",dialCode:"+222",code:"MR"},{name:"Mauritius",dialCode:"+230",code:"MU"},{name:"Mayotte",dialCode:"+262",code:"YT"},{name:"Mexico",dialCode:"+52",code:"MX"},{name:"Micronesia, Federated States of Micronesia",dialCode:"+691",code:"FM"},{name:"Moldova",dialCode:"+373",code:"MD"},{name:"Monaco",dialCode:"+377",code:"MC"},{name:"Mongolia",dialCode:"+976",code:"MN"},{name:"Montenegro",dialCode:"+382",code:"ME"},{name:"Montserrat",dialCode:"+1664",code:"MS"},{name:"Morocco",dialCode:"+212",code:"MA"},{name:"Mozambique",dialCode:"+258",code:"MZ"},{name:"Myanmar",dialCode:"+95",code:"MM"},{name:"Namibia",dialCode:"+264",code:"NA"},{name:"Nauru",dialCode:"+674",code:"NR"},{name:"Nepal",dialCode:"+977",code:"NP"},{name:"Netherlands",dialCode:"+31",code:"NL"},{name:"Netherlands Antilles",dialCode:"+599",code:"AN"},{name:"New Caledonia",dialCode:"+687",code:"NC"},{name:"New Zealand",dialCode:"+64",code:"NZ"},{name:"Nicaragua",dialCode:"+505",code:"NI"},{name:"Niger",dialCode:"+227",code:"NE"},{name:"Nigeria",dialCode:"+234",code:"NG"},{name:"Niue",dialCode:"+683",code:"NU"},{name:"Norfolk Island",dialCode:"+672",code:"NF"},{name:"Northern Mariana Islands",dialCode:"+1670",code:"MP"},{name:"Norway",dialCode:"+47",code:"NO"},{name:"Oman",dialCode:"+968",code:"OM"},{name:"Pakistan",dialCode:"+92",code:"PK"},{name:"Palau",dialCode:"+680",code:"PW"},{name:"Palestinian Territory, Occupied",dialCode:"+970",code:"PS"},{name:"Panama",dialCode:"+507",code:"PA"},{name:"Papua New Guinea",dialCode:"+675",code:"PG"},{name:"Paraguay",dialCode:"+595",code:"PY"},{name:"Peru",dialCode:"+51",code:"PE"},{name:"Philippines",dialCode:"+63",code:"PH"},{name:"Pitcairn",dialCode:"+872",code:"PN"},{name:"Poland",dialCode:"+48",code:"PL"},{name:"Portugal",dialCode:"+351",code:"PT"},{name:"Puerto Rico",dialCode:"+1939",code:"PR"},{name:"Qatar",dialCode:"+974",code:"QA"},{name:"Romania",dialCode:"+40",code:"RO"},{name:"Russia",dialCode:"+7",code:"RU"},{name:"Rwanda",dialCode:"+250",code:"RW"},{name:"Reunion",dialCode:"+262",code:"RE"},{name:"Saint Barthelemy",dialCode:"+590",code:"BL"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dialCode:"+290",code:"SH"},{name:"Saint Kitts and Nevis",dialCode:"+1869",code:"KN"},{name:"Saint Lucia",dialCode:"+1758",code:"LC"},{name:"Saint Martin",dialCode:"+590",code:"MF"},{name:"Saint Pierre and Miquelon",dialCode:"+508",code:"PM"},{name:"Saint Vincent and the Grenadines",dialCode:"+1784",code:"VC"},{name:"Samoa",dialCode:"+685",code:"WS"},{name:"San Marino",dialCode:"+378",code:"SM"},{name:"Sao Tome and Principe",dialCode:"+239",code:"ST"},{name:"Saudi Arabia",dialCode:"+966",code:"SA"},{name:"Senegal",dialCode:"+221",code:"SN"},{name:"Serbia",dialCode:"+381",code:"RS"},{name:"Seychelles",dialCode:"+248",code:"SC"},{name:"Sierra Leone",dialCode:"+232",code:"SL"},{name:"Singapore",dialCode:"+65",code:"SG"},{name:"Slovakia",dialCode:"+421",code:"SK"},{name:"Slovenia",dialCode:"+386",code:"SI"},{name:"Solomon Islands",dialCode:"+677",code:"SB"},{name:"Somalia",dialCode:"+252",code:"SO"},{name:"South Africa",dialCode:"+27",code:"ZA"},{name:"South Sudan",dialCode:"+211",code:"SS"},{name:"South Georgia and the South Sandwich Islands",dialCode:"+500",code:"GS"},{name:"Spain",dialCode:"+34",code:"ES"},{name:"Sri Lanka",dialCode:"+94",code:"LK"},{name:"Sudan",dialCode:"+249",code:"SD"},{name:"Suriname",dialCode:"+597",code:"SR"},{name:"Svalbard and Jan Mayen",dialCode:"+47",code:"SJ"},{name:"Swaziland",dialCode:"+268",code:"SZ"},{name:"Sweden",dialCode:"+46",code:"SE"},{name:"Switzerland",dialCode:"+41",code:"CH"},{name:"Syrian Arab Republic",dialCode:"+963",code:"SY"},{name:"Taiwan",dialCode:"+886",code:"TW"},{name:"Tajikistan",dialCode:"+992",code:"TJ"},{name:"Tanzania, United Republic of Tanzania",dialCode:"+255",code:"TZ"},{name:"Thailand",dialCode:"+66",code:"TH"},{name:"Timor-Leste",dialCode:"+670",code:"TL"},{name:"Togo",dialCode:"+228",code:"TG"},{name:"Tokelau",dialCode:"+690",code:"TK"},{name:"Tonga",dialCode:"+676",code:"TO"},{name:"Trinidad and Tobago",dialCode:"+1868",code:"TT"},{name:"Tunisia",dialCode:"+216",code:"TN"},{name:"Turkey",dialCode:"+90",code:"TR"},{name:"Turkmenistan",dialCode:"+993",code:"TM"},{name:"Turks and Caicos Islands",dialCode:"+1649",code:"TC"},{name:"Tuvalu",dialCode:"+688",code:"TV"},{name:"Uganda",dialCode:"+256",code:"UG"},{name:"Ukraine",dialCode:"+380",code:"UA"},{name:"United Arab Emirates",dialCode:"+971",code:"AE"},{name:"United Kingdom",dialCode:"+44",code:"GB"},{name:"United States",dialCode:"+1",code:"US"},{name:"Uruguay",dialCode:"+598",code:"UY"},{name:"Uzbekistan",dialCode:"+998",code:"UZ"},{name:"Vanuatu",dialCode:"+678",code:"VU"},{name:"Venezuela, Bolivarian Republic of Venezuela",dialCode:"+58",code:"VE"},{name:"Vietnam",dialCode:"+84",code:"VN"},{name:"Virgin Islands, British",dialCode:"+1284",code:"VG"},{name:"Virgin Islands, U.S.",dialCode:"+1340",code:"VI"},{name:"Wallis and Futuna",dialCode:"+681",code:"WF"},{name:"Yemen",dialCode:"+967",code:"YE"},{name:"Zambia",dialCode:"+260",code:"ZM"},{name:"Zimbabwe",dialCode:"+263",code:"ZW"}].sort(((e,a)=>e.name<a.name?-1:1))},5076:(e,a,d)=>{d.d(a,{f:()=>l,Z:()=>u});var o=d(3878),n=d(4567),i=d(6094);const l=(0,n.iY)("phone-field-internal"),t=["disabled","size","bordered","invalid","readonly"],c=["country-input-placeholder","default-code"],m=["phone-input-placeholder","maxlength"],C={"country-input-placeholder":"placeholder","phone-input-placeholder":"placeholder"},r=[].concat(t,c,m),s=(0,o.P)({componentName:l,baseSelector:"div"}),u=class extends s{static get observedAttributes(){return[].concat(s.observedAttributes||[],r)}constructor(){super(),this.innerHTML=`\n <div>\n <descope-combo-box\n\t\t\t\titem-label-path="data-name"\n\t\t\t\titem-value-path="data-id"\n\t\t\t>\n\t\t\t${i.Z.map((e=>(({code:e,dialCode:a,name:d})=>`\n\t<div\n\t\tstyle="display:flex; flex-direction: column;"\n\t\tdata-id="${e}"\n\t\tdata-name="${e} ${a} ${d}"\n\t\tdata-dial-code="${a}"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src="${(e=>`https://cdn.jsdelivr.net/npm/svg-country-flags@1.2.10/svg/${e.toLowerCase()}.svg`)(e)}" width="20"/>\n\t\t\t</span>\n\t\t\t<span>${d}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${e}</span>\n\t\t\t<span>${a}</span>\n\t\t</div>\n\t</div>\n`)(e))).join("")}\n\t\t\t</descope-combo-box>\n\t\t\t<div class="separator"></div>\n <descope-text-field type="tel"></descope-text-field>\n </div>`,this.countryCodeInput=this.querySelector("descope-combo-box"),this.phoneNumberInput=this.querySelector("descope-text-field"),this.inputs=[this.countryCodeInput,this.phoneNumberInput]}get value(){return this.inputs.map((({value:e})=>e)).join("-")}set value(e){const[a="",d=""]=e.split("-"),o=this.getCountryByDialCode(a);o&&(this.countryCodeInput.selectedItem=o),this.phoneNumberInput.value=d}get phoneNumberValue(){return this.phoneNumberInput.value}get countryCodeValue(){return this.countryCodeInput.shadowRoot.querySelector("input").value}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}getValidity(){const e=this.countryCodeInput.value,a=this.phoneNumberInput.value,d=!e||!a,o=this.phoneNumberInput.value.length&&this.phoneNumberInput.value.length<this.minLength;return this.isRequired&&d?{valueMissing:!0}:o?{tooShort:!0}:e&&!a||!e&&a?{valueMissing:!0}:{}}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.inputs[0].focus()})),super.init?.(),this.initInputs(),this.setComboBoxDescriptor()}getCountryByDialCode(e){return this.countryCodeInput.items.find((a=>a.getAttribute("data-dial-code")===e))}getCountryByCodeId(e){return this.countryCodeInput.items.find((a=>a["data-id"]===e))?.["data-name"]}handleDefaultCountryCode(e){if(!this.countryCodeInput.value){const a=this.getCountryByCodeId(e);a&&setTimeout((()=>{this.countryCodeInput.selectedItem=a}))}}setComboBoxDescriptor(){const e=this.countryCodeInput,a=e.shadowRoot.querySelector("input"),d=Object.getOwnPropertyDescriptor(a.constructor.prototype,"value");Object.defineProperties(a,{value:{...d,set(a){if(!e.items?.length)return;const[o,n]=a.split(" ");a!==this.value&&d.set.call(this,n||"")}}})}initInputs(){this.phoneNumberInput.addEventListener("input",(e=>{const a=/^\d$/,d=e.target.value.split("").filter((e=>a.test(e))).join("");e.target.value=d})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}attributeChangedCallback(e,a,d){if(super.attributeChangedCallback(e,a,d),a!==d)if("default-code"===e&&d)this.handleDefaultCountryCode(d);else if(r.includes(e)){const a=C[e]||e;t.includes(e)?this.inputs.forEach((e=>e.setAttribute(a,d))):c.includes(e)?this.countryCodeInput.setAttribute(a,d):m.includes(e)&&this.phoneNumberInput.setAttribute(a,d)}}}},4772:(e,a,d)=>{d.r(a),d(1294),d(9357);var o=d(5076);customElements.define(o.f,o.Z)}}]);
package/dist/umd/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.DescopeUI=o():e.DescopeUI=o()}(self,(()=>(()=>{var e,o,s,n={534:(e,o,s)=>{var n={"./boolean-fields/descope-boolean-field-internal/index.js":[6676,241,878,769],"./boolean-fields/descope-checkbox/index.js":[3483,840,18,208,422,725,789,767,515,241,201,878,769,803,726],"./boolean-fields/descope-switch-toggle/index.js":[9203,840,18,208,422,725,789,767,515,241,201,878,769,803,483],"./descope-button/index.js":[1019,840,767,211,513,729,241,662],"./descope-combo-box/index.js":[1294,840,18,208,824,314,241,201,4],"./descope-container/index.js":[7107,241,317],"./descope-date-picker/index.js":[2552,840,18,208,767,824,211,513,541,241,17],"./descope-divider/index.js":[6162,241,528,178],"./descope-email-field/index.js":[1272,840,18,208,422,725,437,241,201,447,760],"./descope-image/index.js":[8278,241,772],"./descope-link/index.js":[5846,241,528,58],"./descope-loader-linear/index.js":[7845,241,453],"./descope-loader-radial/index.js":[2797,241,72],"./descope-logo/index.js":[1034,241,984],"./descope-new-password/descope-new-password-internal/index.js":[1545,241,201,878,65,842],"./descope-new-password/index.js":[8974,840,18,208,422,725,789,767,211,56,241,201,878,447,934,65,842,320,55],"./descope-number-field/index.js":[6916,840,18,208,422,806,241,201,447,142],"./descope-passcode/descope-passcode-internal/index.js":[4775,241,878,841],"./descope-passcode/index.js":[4919,840,18,208,422,725,789,241,201,878,447,934,841,939],"./descope-password-field/index.js":[5702,840,18,208,422,725,767,211,56,241,201,65,320],"./descope-phone-field/descope-phone-field-internal/index.js":[4772,840,18,208,422,725,789,824,314,241,201,878,447,934,4,646],"./descope-phone-field/index.js":[3721,840,18,208,422,725,789,824,314,241,201,878,447,934,4,646,414],"./descope-text-area/index.js":[1962,840,18,422,101,241,201,322],"./descope-text-field/index.js":[9357,840,18,208,422,725,789,241,201,447,934],"./descope-text/index.js":[1876,241,528]};function t(e){if(!s.o(n,e))return Promise.resolve().then((()=>{var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}));var o=n[e],t=o[0];return Promise.all(o.slice(1).map(s.e)).then((()=>s(t)))}t.keys=()=>Object.keys(n),t.id=534,e.exports=t},5561:(e,o,s)=>{"use strict";s.r(o),s.d(o,{componentsThemeManager:()=>n});const n=new class{static mountOnPropName="DescopeThemeManager";#e={};#o="light";#s=new Set;#n(){this.#s.forEach((e=>e?.()))}get currentThemeName(){return this.#o}set currentThemeName(e){this.#o=e,this.#n()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#s.add(e),()=>{this.#s.delete(e)}}set themes(e){this.#e=e,this.#n()}}},7507:(e,o,s)=>{const{componentsThemeManager:n}=s(5561),t=s(534);e.exports=t.keys().reduce(((e,o)=>{const s=o.replace(/.*?([^\/]+)\/index\.js$/,"$1");return s.endsWith("-internal")||(e[s]=()=>t(o)),e}),{}),e.exports.componentsThemeManager=n}},t={};function r(e){var o=t[e];if(void 0!==o)return o.exports;var s=t[e]={exports:{}};return n[e](s,s.exports,r),s.exports}r.m=n,e=[],r.O=(o,s,n,t)=>{if(!s){var d=1/0;for(p=0;p<e.length;p++){for(var[s,n,t]=e[p],i=!0,c=0;c<s.length;c++)(!1&t||d>=t)&&Object.keys(r.O).every((e=>r.O[e](s[c])))?s.splice(c--,1):(i=!1,t<d&&(d=t));if(i){e.splice(p--,1);var a=n();void 0!==a&&(o=a)}}return o}t=t||0;for(var p=e.length;p>0&&e[p-1][2]>t;p--)e[p]=e[p-1];e[p]=[s,n,t]},r.F={},r.E=e=>{Object.keys(r.F).map((o=>{r.F[o](e)}))},r.d=(e,o)=>{for(var s in o)r.o(o,s)&&!r.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:o[s]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((o,s)=>(r.f[s](e,o),o)),[])),r.u=e=>(({4:"descope-combo-box-index-js",17:"descope-date-picker-index-js",55:"descope-new-password-index-js",58:"descope-link-index-js",72:"descope-loader-radial-index-js",142:"descope-number-field-index-js",178:"descope-divider-index-js",317:"descope-container-index-js",320:"descope-password-field-index-js",322:"descope-text-area-index-js",414:"descope-phone-field-index-js",453:"descope-loader-linear-index-js",483:"boolean-fields-descope-switch-toggle-index-js",528:"descope-text-index-js",646:"descope-phone-field-descope-phone-field-internal-index-js",662:"descope-button-index-js",726:"boolean-fields-descope-checkbox-index-js",760:"descope-email-field-index-js",769:"boolean-fields-descope-boolean-field-internal-index-js",772:"descope-image-index-js",841:"descope-passcode-descope-passcode-internal-index-js",842:"descope-new-password-descope-new-password-internal-index-js",934:"descope-text-field-index-js",939:"descope-passcode-index-js",984:"descope-logo-index-js"}[e]||e)+".js"),r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),o={},s="DescopeUI:",r.l=(e,n,t,d)=>{if(o[e])o[e].push(n);else{var i,c;if(void 0!==t)for(var a=document.getElementsByTagName("script"),p=0;p<a.length;p++){var l=a[p];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==s+t){i=l;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,r.nc&&i.setAttribute("nonce",r.nc),i.setAttribute("data-webpack",s+t),i.src=e),o[e]=[n];var u=(s,n)=>{i.onerror=i.onload=null,clearTimeout(f);var t=o[e];if(delete o[e],i.parentNode&&i.parentNode.removeChild(i),t&&t.forEach((e=>e(n))),s)return s(n)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=u.bind(null,i.onerror),i.onload=u.bind(null,i.onload),c&&document.head.appendChild(i)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var o=r.g.document;if(!e&&o&&(o.currentScript&&(e=o.currentScript.src),!e)){var s=o.getElementsByTagName("script");s.length&&(e=s[s.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={826:0};r.f.j=(o,s)=>{var n=r.o(e,o)?e[o]:void 0;if(0!==n)if(n)s.push(n[2]);else{var t=new Promise(((s,t)=>n=e[o]=[s,t]));s.push(n[2]=t);var d=r.p+r.u(o),i=new Error;r.l(d,(s=>{if(r.o(e,o)&&(0!==(n=e[o])&&(e[o]=void 0),n)){var t=s&&("load"===s.type?"missing":s.type),d=s&&s.target&&s.target.src;i.message="Loading chunk "+o+" failed.\n("+t+": "+d+")",i.name="ChunkLoadError",i.type=t,i.request=d,n[1](i)}}),"chunk-"+o,o)}},r.F.j=o=>{if(!r.o(e,o)||void 0===e[o]){e[o]=null;var s=document.createElement("link");r.nc&&s.setAttribute("nonce",r.nc),s.rel="prefetch",s.as="script",s.href=r.p+r.u(o),document.head.appendChild(s)}},r.O.j=o=>0===e[o];var o=(o,s)=>{var n,t,[d,i,c]=s,a=0;if(d.some((o=>0!==e[o]))){for(n in i)r.o(i,n)&&(r.m[n]=i[n]);if(c)var p=c(r)}for(o&&o(s);a<d.length;a++)t=d[a],r.o(e,t)&&e[t]&&e[t][0](),e[t]=0;return r.O(p)},s=self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[];s.forEach(o.bind(null,0)),s.push=o.bind(null,s.push.bind(s))})(),r.O(0,[826],(()=>{[241,878,769,840,18,208,422,725,789,767,515,201,803,726,483,211,513,729,662,824,314,4,317,541,17,528,178,437,447,760,772,58,453,72,984,65,842,56,934,320,55,806,142,841,939,646,414,101,322].map(r.E)}),5);var d=r(7507);return r.O(d)})()));
1
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.DescopeUI=o():e.DescopeUI=o()}(self,(()=>(()=>{var e,o,s,n={534:(e,o,s)=>{var n={"./boolean-fields/descope-boolean-field-internal/index.js":[6676,241,878,769],"./boolean-fields/descope-checkbox/index.js":[3483,840,18,208,422,725,789,767,515,241,201,878,769,803,726],"./boolean-fields/descope-switch-toggle/index.js":[9203,840,18,208,422,725,789,767,515,241,201,878,769,803,483],"./descope-button/index.js":[1019,840,767,211,513,729,241,662],"./descope-combo-box/index.js":[1294,840,18,208,824,314,241,201,4],"./descope-container/index.js":[7107,241,317],"./descope-date-picker/index.js":[2552,840,18,208,767,824,211,513,541,241,17],"./descope-divider/index.js":[6162,241,528,178],"./descope-email-field/index.js":[1272,840,18,208,422,725,437,241,201,447,760],"./descope-image/index.js":[8278,241,772],"./descope-link/index.js":[5846,241,528,58],"./descope-loader-linear/index.js":[7845,241,453],"./descope-loader-radial/index.js":[2797,241,72],"./descope-logo/index.js":[1034,241,984],"./descope-new-password/descope-new-password-internal/index.js":[1545,241,201,878,481,842],"./descope-new-password/index.js":[8974,840,18,208,422,725,789,767,211,56,241,201,878,447,934,481,842,106,55],"./descope-number-field/index.js":[6916,840,18,208,422,806,241,201,447,142],"./descope-passcode/descope-passcode-internal/index.js":[4775,241,878,841],"./descope-passcode/index.js":[4919,840,18,208,422,725,789,241,201,878,447,934,841,939],"./descope-password/index.js":[9279,840,18,208,422,725,767,211,56,241,201,481,106],"./descope-phone-field/descope-phone-field-internal/index.js":[4772,840,18,208,422,725,789,824,314,241,201,878,447,934,4,320],"./descope-phone-field/index.js":[3721,840,18,208,422,725,789,824,314,241,201,878,447,934,4,320,414],"./descope-text-area/index.js":[1962,840,18,422,101,241,201,322],"./descope-text-field/index.js":[9357,840,18,208,422,725,789,241,201,447,934],"./descope-text/index.js":[1876,241,528]};function t(e){if(!s.o(n,e))return Promise.resolve().then((()=>{var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}));var o=n[e],t=o[0];return Promise.all(o.slice(1).map(s.e)).then((()=>s(t)))}t.keys=()=>Object.keys(n),t.id=534,e.exports=t},5561:(e,o,s)=>{"use strict";s.r(o),s.d(o,{componentsThemeManager:()=>n});const n=new class{static mountOnPropName="DescopeThemeManager";#e={};#o="light";#s=new Set;#n(){this.#s.forEach((e=>e?.()))}get currentThemeName(){return this.#o}set currentThemeName(e){this.#o=e,this.#n()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#s.add(e),()=>{this.#s.delete(e)}}set themes(e){this.#e=e,this.#n()}}},7507:(e,o,s)=>{const{componentsThemeManager:n}=s(5561),t=s(534);e.exports=t.keys().reduce(((e,o)=>{const s=o.replace(/.*?([^\/]+)\/index\.js$/,"$1");return s.endsWith("-internal")||(e[s]=()=>t(o)),e}),{}),e.exports.componentsThemeManager=n}},t={};function r(e){var o=t[e];if(void 0!==o)return o.exports;var s=t[e]={exports:{}};return n[e](s,s.exports,r),s.exports}r.m=n,e=[],r.O=(o,s,n,t)=>{if(!s){var d=1/0;for(p=0;p<e.length;p++){for(var[s,n,t]=e[p],i=!0,c=0;c<s.length;c++)(!1&t||d>=t)&&Object.keys(r.O).every((e=>r.O[e](s[c])))?s.splice(c--,1):(i=!1,t<d&&(d=t));if(i){e.splice(p--,1);var a=n();void 0!==a&&(o=a)}}return o}t=t||0;for(var p=e.length;p>0&&e[p-1][2]>t;p--)e[p]=e[p-1];e[p]=[s,n,t]},r.F={},r.E=e=>{Object.keys(r.F).map((o=>{r.F[o](e)}))},r.d=(e,o)=>{for(var s in o)r.o(o,s)&&!r.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:o[s]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((o,s)=>(r.f[s](e,o),o)),[])),r.u=e=>(({4:"descope-combo-box-index-js",17:"descope-date-picker-index-js",55:"descope-new-password-index-js",58:"descope-link-index-js",72:"descope-loader-radial-index-js",106:"descope-password-index-js",142:"descope-number-field-index-js",178:"descope-divider-index-js",317:"descope-container-index-js",320:"descope-phone-field-descope-phone-field-internal-index-js",322:"descope-text-area-index-js",414:"descope-phone-field-index-js",453:"descope-loader-linear-index-js",483:"boolean-fields-descope-switch-toggle-index-js",528:"descope-text-index-js",662:"descope-button-index-js",726:"boolean-fields-descope-checkbox-index-js",760:"descope-email-field-index-js",769:"boolean-fields-descope-boolean-field-internal-index-js",772:"descope-image-index-js",841:"descope-passcode-descope-passcode-internal-index-js",842:"descope-new-password-descope-new-password-internal-index-js",934:"descope-text-field-index-js",939:"descope-passcode-index-js",984:"descope-logo-index-js"}[e]||e)+".js"),r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),o={},s="DescopeUI:",r.l=(e,n,t,d)=>{if(o[e])o[e].push(n);else{var i,c;if(void 0!==t)for(var a=document.getElementsByTagName("script"),p=0;p<a.length;p++){var l=a[p];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==s+t){i=l;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,r.nc&&i.setAttribute("nonce",r.nc),i.setAttribute("data-webpack",s+t),i.src=e),o[e]=[n];var u=(s,n)=>{i.onerror=i.onload=null,clearTimeout(f);var t=o[e];if(delete o[e],i.parentNode&&i.parentNode.removeChild(i),t&&t.forEach((e=>e(n))),s)return s(n)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=u.bind(null,i.onerror),i.onload=u.bind(null,i.onload),c&&document.head.appendChild(i)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var o=r.g.document;if(!e&&o&&(o.currentScript&&(e=o.currentScript.src),!e)){var s=o.getElementsByTagName("script");s.length&&(e=s[s.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={826:0};r.f.j=(o,s)=>{var n=r.o(e,o)?e[o]:void 0;if(0!==n)if(n)s.push(n[2]);else{var t=new Promise(((s,t)=>n=e[o]=[s,t]));s.push(n[2]=t);var d=r.p+r.u(o),i=new Error;r.l(d,(s=>{if(r.o(e,o)&&(0!==(n=e[o])&&(e[o]=void 0),n)){var t=s&&("load"===s.type?"missing":s.type),d=s&&s.target&&s.target.src;i.message="Loading chunk "+o+" failed.\n("+t+": "+d+")",i.name="ChunkLoadError",i.type=t,i.request=d,n[1](i)}}),"chunk-"+o,o)}},r.F.j=o=>{if(!r.o(e,o)||void 0===e[o]){e[o]=null;var s=document.createElement("link");r.nc&&s.setAttribute("nonce",r.nc),s.rel="prefetch",s.as="script",s.href=r.p+r.u(o),document.head.appendChild(s)}},r.O.j=o=>0===e[o];var o=(o,s)=>{var n,t,[d,i,c]=s,a=0;if(d.some((o=>0!==e[o]))){for(n in i)r.o(i,n)&&(r.m[n]=i[n]);if(c)var p=c(r)}for(o&&o(s);a<d.length;a++)t=d[a],r.o(e,t)&&e[t]&&e[t][0](),e[t]=0;return r.O(p)},s=self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[];s.forEach(o.bind(null,0)),s.push=o.bind(null,s.push.bind(s))})(),r.O(0,[826],(()=>{[241,878,769,840,18,208,422,725,789,767,515,201,803,726,483,211,513,729,662,824,314,4,317,541,17,528,178,437,447,760,772,58,453,72,984,481,842,56,934,106,55,806,142,841,939,320,414,101,322].map(r.E)}),5);var d=r(7507);return r.O(d)})()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/web-components-ui",
3
- "version": "1.0.125",
3
+ "version": "1.0.127",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -7,7 +7,7 @@ import {
7
7
  createProxy,
8
8
  } from '../../mixins';
9
9
  import { componentName as descopeInternalComponentName } from './descope-new-password-internal/componentName';
10
- import { PasswordFieldClass } from '../descope-password-field/PasswordFieldClass';
10
+ import { PasswordClass } from '../descope-password/PasswordClass';
11
11
  import { resetInputFieldDefaultWidth } from '../../helpers/themeHelpers/resetHelpers';
12
12
 
13
13
  export const componentName = getComponentName('new-password');
@@ -74,8 +74,8 @@ export const NewPasswordClass = compose(
74
74
  fontSize: [
75
75
  host,
76
76
  {
77
- selector: PasswordFieldClass.componentName,
78
- property: PasswordFieldClass.cssVarList.fontSize
77
+ selector: PasswordClass.componentName,
78
+ property: PasswordClass.cssVarList.fontSize
79
79
  }
80
80
  ],
81
81
  fontFamily: [
@@ -132,7 +132,7 @@ export const NewPasswordClass = compose(
132
132
  display: flex;
133
133
  flex-direction: column;
134
134
  }
135
- descope-password-field {
135
+ descope-password {
136
136
  display: block;
137
137
  width: 100%;
138
138
  }
@@ -88,10 +88,10 @@ class NewPasswordInternal extends BaseInputClass {
88
88
  }
89
89
 
90
90
  renderInputs(shouldRenderConfirm) {
91
- let template = `<descope-password-field data-id="password"></descope-password-field>`;
91
+ let template = `<descope-password data-id="password"></descope-password>`;
92
92
 
93
93
  if (shouldRenderConfirm) {
94
- template += `<descope-password-field data-id="confirm"></descope-password-field>`
94
+ template += `<descope-password data-id="confirm"></descope-password>`
95
95
  }
96
96
 
97
97
  this.wrapperEle.innerHTML = template;
@@ -1,6 +1,6 @@
1
1
  import { componentName, NewPasswordClass } from './NewPasswordClass';
2
2
  import '../descope-text-field'
3
- import '../descope-password-field'
3
+ import '../descope-password'
4
4
  import './descope-new-password-internal'
5
5
 
6
6
  customElements.define(componentName, NewPasswordClass);
@@ -10,7 +10,7 @@ import { getComponentName } from '../../helpers/componentHelpers';
10
10
  import passwordDraggableMixin from './passwordDraggableMixin';
11
11
  import { resetInputCursor } from '../../helpers/themeHelpers/resetHelpers';
12
12
 
13
- export const componentName = getComponentName('password-field');
13
+ export const componentName = getComponentName('password');
14
14
 
15
15
  const {
16
16
  host,
@@ -34,7 +34,7 @@ const {
34
34
  errorMessage: { selector: '::part(error-message)' }
35
35
  }
36
36
 
37
- export const PasswordFieldClass = compose(
37
+ export const PasswordClass = compose(
38
38
  createStyleMixin({
39
39
  mappings: {
40
40
  hostWidth: { ...host, property: 'width' },
@@ -88,7 +88,7 @@ export const PasswordFieldClass = compose(
88
88
  min-width: 10em;
89
89
  max-width: 100%;
90
90
  box-sizing: border-box;
91
- padding: calc(var(${PasswordFieldClass.cssVarList.inputOutlineWidth}) + var(${PasswordFieldClass.cssVarList.inputOutlineOffset}));
91
+ padding: calc(var(${PasswordClass.cssVarList.inputOutlineWidth}) + var(${PasswordClass.cssVarList.inputOutlineOffset}));
92
92
  }
93
93
  vaadin-password-field {
94
94
  width: 100%;
@@ -125,7 +125,7 @@ export const PasswordFieldClass = compose(
125
125
  }
126
126
 
127
127
  vaadin-password-field-button[focus-ring] {
128
- box-shadow: 0 0 0 2px var(${PasswordFieldClass.cssVarList.inputOutlineColor});
128
+ box-shadow: 0 0 0 2px var(${PasswordClass.cssVarList.inputOutlineColor});
129
129
  }
130
130
  `,
131
131
  excludeAttrsSync: ['tabindex'],
@@ -0,0 +1,6 @@
1
+ import '@vaadin/password-field';
2
+ import { componentName, PasswordClass } from './PasswordClass';
3
+
4
+ customElements.define(componentName, PasswordClass);
5
+
6
+ export { PasswordClass };
package/src/index.cjs.js CHANGED
@@ -16,7 +16,7 @@ export { LinkClass } from './components/descope-link/LinkClass';
16
16
  export { LogoClass } from './components/descope-logo/LogoClass';
17
17
  export { NumberFieldClass } from './components/descope-number-field/NumberFieldClass';
18
18
  export { PasscodeClass } from './components/descope-passcode/PasscodeClass';
19
- export { PasswordFieldClass } from './components/descope-password-field/PasswordFieldClass';
19
+ export { PasswordClass } from './components/descope-password/PasswordClass';
20
20
  export { TextClass } from './components/descope-text/TextClass';
21
21
  export { TextAreaClass } from './components/descope-text-area/TextAreaClass';
22
22
  export { TextFieldClass } from './components/descope-text-field/TextFieldClass';
package/src/index.d.ts CHANGED
@@ -21,7 +21,7 @@ export { LinkClass } from './components/descope-link';
21
21
  export { LogoClass } from './components/descope-logo';
22
22
  export { NumberFieldClass } from './components/descope-number-field';
23
23
  export { PasscodeClass } from './components/descope-passcode';
24
- export { PasswordFieldClass } from './components/descope-password-field';
24
+ export { PasswordClass } from './components/descope-password';
25
25
  export { TextClass } from './components/descope-text';
26
26
  export { TextAreaClass } from './components/descope-text-area';
27
27
  export { TextFieldClass } from './components/descope-text-field';
package/src/index.js CHANGED
@@ -11,7 +11,7 @@ export * from './components/descope-link';
11
11
  export * from './components/descope-logo';
12
12
  export * from './components/descope-number-field';
13
13
  export * from './components/descope-passcode';
14
- export * from './components/descope-password-field';
14
+ export * from './components/descope-password';
15
15
  export * from './components/descope-text';
16
16
  export * from './components/descope-text-area';
17
17
  export * from './components/descope-text-field';
@@ -58,6 +58,10 @@ const proxyInputMixin = (superclass) =>
58
58
  }, 0)
59
59
  }
60
60
 
61
+ get name () {
62
+ return this.getAttribute('name');
63
+ }
64
+
61
65
  get inputElement() {
62
66
  this.warnIfInputElementIsMissing()
63
67
 
@@ -1,6 +1,6 @@
1
1
  import * as button from './button';
2
2
  import * as textField from './textField';
3
- import * as passwordField from './passwordField';
3
+ import * as password from './password';
4
4
  import * as numberField from './numberField';
5
5
  import * as emailField from './emailField';
6
6
  import * as textArea from './textArea';
@@ -22,7 +22,7 @@ import * as inputWrapper from './inputWrapper';
22
22
  const components = {
23
23
  button,
24
24
  textField,
25
- passwordField,
25
+ password,
26
26
  numberField,
27
27
  emailField,
28
28
  textArea,
@@ -10,7 +10,7 @@ const newPassword = {
10
10
  [vars.spaceBetweenInputs]: '1em',
11
11
 
12
12
  _required: {
13
- // NewPassword doesn't pass `required` attribute to its PasswordFields.
13
+ // NewPassword doesn't pass `required` attribute to its Password components.
14
14
  // That's why we fake the required indicator on each input.
15
15
  // We do that by injecting `::after` element, and populating it with requiredIndicator content.
16
16
  [vars.inputsRequiredIndicator]: refs.requiredIndicator, // used to populate required content for NewPassword input fields outside the theme
@@ -1,9 +1,9 @@
1
- import { PasswordFieldClass } from '../../components/descope-password-field/PasswordFieldClass';
1
+ import { PasswordClass } from '../../components/descope-password/PasswordClass';
2
2
  import { refs } from './inputWrapper';
3
3
 
4
- const vars = PasswordFieldClass.cssVarList;
4
+ const vars = PasswordClass.cssVarList;
5
5
 
6
- const passwordField = {
6
+ const password = {
7
7
  [vars.hostWidth]: refs.width,
8
8
  [vars.fontSize]: refs.fontSize,
9
9
  [vars.fontFamily]: refs.fontFamily,
@@ -23,5 +23,5 @@ const passwordField = {
23
23
  [vars.inputOutlineOffset]: refs.outlineOffset,
24
24
  };
25
25
 
26
- export default passwordField;
26
+ export default password;
27
27
  export { vars }
package/dist/umd/65.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[65],{1065:(t,e,r)=>{r.d(e,{d:()=>g,f:()=>p});var n=r(9241),o=r(2061),i=r(4567);var a=r(4201);const p=(0,i.iY)("password-field"),{host:s,inputField:d,inputElement:l,inputElementPlaceholder:u,revealButtonIcon:c,label:h,requiredIndicator:f,errorMessage:y,helperText:b}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:"> input:placeholder-shown"},revealButtonIcon:{selector:()=>"::part(reveal-button)::before"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},g=(0,o.qC)((0,n.yk)({mappings:{hostWidth:{...s,property:"width"},fontSize:[{property:"font-size"},{...s,property:"font-size"}],fontFamily:[h,d,y,b],inputHeight:{...d,property:"height"},inputBackgroundColor:{...d,property:"background-color"},inputBorderStyle:{...d,property:"border-style"},inputBorderWidth:{...d,property:"border-width"},inputBorderColor:{...d,property:"border-color"},inputBorderRadius:{...d,property:"border-radius"},inputOutlineColor:{...d,property:"outline-color"},inputOutlineStyle:{...d,property:"outline-style"},inputOutlineOffset:{...d,property:"outline-offset"},inputOutlineWidth:{...d,property:"outline-width"},labelTextColor:[{...h,property:"color"},{...f,property:"color"}],labelRequiredIndicator:{...f,property:"content"},inputValueTextColor:[{...l,property:"color"},{...c,property:"color"}],inputPlaceholderTextColor:{...u,property:"color"}}}),n.e4,n.dj,n.Ae,(t=>class extends t{get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable&this.isReadOnly){const e=this.baseElement.querySelector("input"),r=e.getAttribute("type");e.setAttribute("type","text"),setTimeout((()=>e.focus()));const n=t=>{e.setAttribute("type",r),t.target.removeEventListener("mouseup",n),t.target.removeEventListener("dragend",n)};t.target.addEventListener("mouseup",n,{once:!0}),t.target.addEventListener("dragend",n,{once:!0})}})),super.init?.()}}))((0,n.DM)({slots:["suffix"],wrappedEleName:"vaadin-password-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmin-width: 10em;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tbox-sizing: border-box;\t\t\t\t\n\t\t\t\tpadding: calc(var(${g.cssVarList.inputOutlineWidth}) + var(${g.cssVarList.inputOutlineOffset}));\n\t\t\t}\n\t\t\tvaadin-password-field {\n\t\t\t\twidth: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field) {\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\t\t\t\n\t\t\tvaadin-password-field > input {\n\t\t\t\tmin-height: 0;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\t\t\tvaadin-password-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t\tvaadin-password-field::before {\n\t\t\t\theight: initial;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field)::after {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field-button {\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\n\t\t\t${(0,a.Pd)("vaadin-password-field")}\n\n\t\t\t[readonly] vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\n\t\t\tvaadin-password-field-button[focus-ring] {\n\t\t\t\tbox-shadow: 0 0 0 2px var(${g.cssVarList.inputOutlineColor});\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[320],{5702:(e,s,c)=>{c.r(s),c.d(s,{PasswordFieldClass:()=>d.d}),c(7056);var d=c(1065);customElements.define(d.f,d.d)}}]);
@@ -1,6 +0,0 @@
1
- import '@vaadin/password-field';
2
- import { componentName, PasswordFieldClass } from './PasswordFieldClass';
3
-
4
- customElements.define(componentName, PasswordFieldClass);
5
-
6
- export { PasswordFieldClass };