@descope/web-components-ui 1.0.178 → 1.0.180

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. package/dist/cjs/index.cjs.js +162 -142
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.esm.js +173 -151
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/umd/1000.js +1 -1
  7. package/dist/umd/2481.js +1 -1
  8. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
  9. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  10. package/dist/umd/descope-button-selection-group-descope-button-selection-group-internal-index-js.js +1 -0
  11. package/dist/umd/descope-button-selection-group-descope-button-selection-group-item-index-js.js +1 -0
  12. package/dist/umd/descope-button-selection-group-index-js.js +1 -0
  13. package/dist/umd/descope-combo-box-index-js.js +1 -1
  14. package/dist/umd/descope-email-field-index-js.js +1 -1
  15. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  16. package/dist/umd/descope-number-field-index-js.js +1 -1
  17. package/dist/umd/descope-passcode-index-js.js +1 -1
  18. package/dist/umd/descope-text-area-index-js.js +1 -1
  19. package/dist/umd/descope-text-field-index-js.js +1 -1
  20. package/dist/umd/index.js +1 -1
  21. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
  22. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  23. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
  24. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
  25. package/package.json +6 -6
  26. package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +1 -1
  27. package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +1 -1
  28. package/src/components/{descope-single-select/SingleSelectClass.js → descope-button-selection-group/ButtonSelectionGroupClass.js} +9 -9
  29. package/src/components/{descope-single-select/descope-single-select-internal/SingleSelectInternalClass.js → descope-button-selection-group/descope-button-selection-group-internal/ButtonSelectionGroupInternalClass.js} +2 -2
  30. package/src/components/descope-button-selection-group/descope-button-selection-group-internal/index.js +9 -0
  31. package/src/components/{descope-single-select/descope-select-item/SelectItemClass.js → descope-button-selection-group/descope-button-selection-group-item/ButtonSelectionGroupItemClass.js} +2 -2
  32. package/src/components/descope-button-selection-group/descope-button-selection-group-item/index.js +6 -0
  33. package/src/components/descope-button-selection-group/index.js +6 -0
  34. package/src/components/descope-combo-box/ComboBoxClass.js +16 -7
  35. package/src/components/descope-email-field/EmailFieldClass.js +1 -1
  36. package/src/components/descope-new-password/NewPasswordClass.js +1 -1
  37. package/src/components/descope-number-field/NumberFieldClass.js +1 -1
  38. package/src/components/descope-passcode/PasscodeClass.js +1 -1
  39. package/src/components/descope-password/PasswordClass.js +1 -1
  40. package/src/components/descope-text-area/TextAreaClass.js +1 -1
  41. package/src/components/descope-text-field/TextFieldClass.js +1 -1
  42. package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +1 -1
  43. package/src/components/phone-fields/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js +6 -4
  44. package/src/components/phone-fields/descope-phone-field/helpers.js +2 -2
  45. package/src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js +1 -1
  46. package/src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/PhoneFieldInternalInputBox.js +1 -1
  47. package/src/index.cjs.js +2 -2
  48. package/src/index.d.ts +1 -0
  49. package/src/index.js +2 -2
  50. package/src/mixins/createStyleMixin/index.js +9 -5
  51. package/src/mixins/proxyInputMixin.js +102 -97
  52. package/src/theme/components/{single-select/singleSelect.js → buttonSelectionGroup/buttonSelectionGroup.js} +4 -4
  53. package/src/theme/components/{single-select/selectItem.js → buttonSelectionGroup/buttonSelectionGroupItem.js} +4 -4
  54. package/src/theme/components/comboBox.js +7 -5
  55. package/src/theme/components/index.js +4 -4
  56. package/dist/umd/descope-single-select-descope-select-item-index-js.js +0 -1
  57. package/dist/umd/descope-single-select-descope-single-select-internal-index-js.js +0 -1
  58. package/dist/umd/descope-single-select-index-js.js +0 -1
  59. package/src/components/descope-single-select/descope-select-item/index.js +0 -6
  60. package/src/components/descope-single-select/descope-single-select-internal/index.js +0 -6
  61. package/src/components/descope-single-select/index.js +0 -6
package/dist/umd/1000.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1e3],{3874:(t,e,s)=>{s.d(e,{s:()=>h});var i=s(2061),n=s(357),r=s(7878);const a=t=>class extends t{#t=r.C.bind(this,"components-context");updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}},o=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 l=s(8084);const h=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#e;#s=!0;get baseSelector(){return e}get baseElement(){return this.#e??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#e||console.warn("missing base element for component",this.localName),this.#e}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#s&&(this.#s=!1,this.init?.())}}return(0,i.qC)(n.A,o,l.Q,a)(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=>{t.forEach((t=>{"attributes"!==t.type||s.includes(t.attributeName)||i.length&&!i.includes(t.attributeName)||e([t.attributeName])}))})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&e(t)}))})).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},7878:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{C:()=>i})},357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#i(){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.#i()}}},1e3:(t,e,s)=>{s.d(e,{li:()=>C,Ae:()=>A.A,DM:()=>p,yk:()=>u,e4:()=>c,mE:()=>T,wX:()=>b,QT:()=>M.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})}}#n;#r;#a;#o;#l;#h;#u;#c;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:r=i.qg,baseSelector:a}={}){super(),this.#o=s,this.#l=r,this.#h=e?.(this)||this.shadowRoot,this.#u=a??this.baseSelector,this.#c=Object.keys(t).map((t=>(0,n.E3)("st",s,t))),this.#d(),this.#m(),this.#p()}get#g(){return a.componentsThemeManager.currentTheme?.[u]||""}#b(){this.#r.innerHTML=this.#g[this.#l]}#m(){this.#r=document.createElement("style"),this.#r.id=`style-mixin-theme__${u}`,this.#h.prepend(this.#r),this.#a=a.componentsThemeManager.onCurrentThemeChange(this.#b.bind(this)),this.#b()}#p(){if(this.#c.length){this.#n=document.createElement("style"),this.#n.id=`style-mixin-overrides__${u}`;const s=(t=u,e=i.k4,Array(e).fill(`.${t}`).join(""));this.#n.innerText=`:host(${s}) {}`,this.#h.append(this.#n)}var t,e}#E(t,e){const s=this.#n?.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))}#v(t=[]){let e=!1;t.forEach((t=>{this.#c.includes(t)&&(this.#E(t,this.getAttribute(t)),e=!0)})),e&&(this.#n.innerHTML=this.#n?.sheet?.cssRules[0].cssText)}#d(){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=>({...s,...t}))):[{...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.#o),this.#u,t),this.#h.prepend(e)}}#y(t){(this.#h.classList||this.#h.host.classList).add(t)}init(){super.init?.(),this.shadowRoot.isConnected&&(this.#y(u),(0,r.FX)(this,this.#v.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#a?.()}}},c=t=>class extends t{#f=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#f=document.createElement("style"),this.#f.innerText="* { cursor: inherit!important }"}#A(t){t?this.shadowRoot.appendChild(this.#f):this.#f.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.#A("true"===s)}};var d=s(3874),m=s(7878);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})){#S=m.C.bind(this,"blur");#C=m.C.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${s.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""} ></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#S()})),this.baseElement.addEventListener("focus",(t=>{this.#C()})),(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""}}#T(){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.#T())}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.#T()}init(){super.init?.(),this.addEventListener("change",this.#T),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#T),setTimeout((()=>this.#T()))}},E=["invalid","required"],v=(t,e,s)=>{Object.defineProperty(t,s,{set(t){e[s]=t},get:()=>e[s],configurable:!0})},y=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e.localName)return e},f=(0,n.qC)((t=>class extends(b(t)){static get observedAttributes(){return[...t.observedAttributes||[],...E]}#x;#L=m.C.bind(this,"change");constructor(){super(),this.#x=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#x&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#x)return this.#x;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#x=y(t)||y(e),this.#x}set inputElement(t){this.#x=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?.(),setTimeout((()=>{this.inputElement?.addEventListener("input",(t=>{this.inputElement.checkValidity()||(this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.baseElement.__onInput(t),this.#w())})),this.baseElement.addEventListener("change",(()=>{this.#L()})),this.#x.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)}}#k;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.#k=(s=t(this)).host||s}#N(){this.#k.onmouseenter=t=>{t.target.setAttribute("hover","true")},this.#k.onmouseleave=t=>{t.target.removeAttribute("hover")}}init(){super.init?.(),(0,r.oP)(this,this.#k,{[o?"includeAttrs":"excludeAttrs"]:a}),this.#N()}}},C=t=>class extends t{#L=m.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#L(),this.prevValue=this.value)}))}};var M=s(8084);const T=t=>class extends t{init(){this.#V(),super.init?.()}#V(){["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.C.call(this,"blur"),m.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(m.C.call(this,"focus"),m.C.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","password-visible"],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([[1e3],{3874:(t,e,s)=>{s.d(e,{s:()=>h});var i=s(2061),n=s(357),r=s(7878);const a=t=>class extends t{#t=r.C.bind(this,"components-context");updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}},o=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 l=s(8084);const h=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#e;#s=!0;get baseSelector(){return e}get baseElement(){return this.#e??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#e||console.warn("missing base element for component",this.localName),this.#e}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#s&&(this.#s=!1,this.init?.())}}return(0,i.qC)(n.A,o,l.Q,a)(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=>{t.forEach((t=>{"attributes"!==t.type||s.includes(t.attributeName)||i.length&&!i.includes(t.attributeName)||e([t.attributeName])}))})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&e(t)}))})).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},7878:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{C:()=>i})},357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#i(){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.#i()}}},1e3:(t,e,s)=>{s.d(e,{li:()=>M,Ae:()=>A.A,DM:()=>p,yk:()=>u,e4:()=>c,mE:()=>x,wX:()=>b,QT:()=>S.Q,Iw:()=>C,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})}}#n;#r;#a;#o;#l;#h;#u;#c;#d;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:r=i.qg,baseSelector:a}={}){super(),this.#o=s,this.#l=r,this.#u=a??this.baseSelector,this.#d=e,this.#c=Object.keys(t).map((t=>(0,n.E3)("st",s,t)))}get#m(){return a.componentsThemeManager.currentTheme?.[u]||""}#p(){this.#r.innerHTML=this.#m[this.#l]}#g(){this.#r=document.createElement("style"),this.#r.id=`style-mixin-theme__${u}`,this.#h.prepend(this.#r),this.#a=a.componentsThemeManager.onCurrentThemeChange(this.#p.bind(this)),this.#p()}#b(){if(this.#c.length){this.#n=document.createElement("style"),this.#n.id=`style-mixin-overrides__${u}`;const s=(t=u,e=i.k4,Array(e).fill(`.${t}`).join(""));this.#n.innerText=`:host(${s}) {}`,this.#h.append(this.#n)}var t,e}#E(t,e){const s=this.#n?.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))}#v(t=[]){let e=!1;t.forEach((t=>{this.#c.includes(t)&&(this.#E(t,this.getAttribute(t)),e=!0)})),e&&(this.#n.innerHTML=this.#n?.sheet?.cssRules[0].cssText)}#y(){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=>({...s,...t}))):[{...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.#o),this.#u,t),this.#h.prepend(e)}}#f(t){(this.#h.classList||this.#h.host.classList).add(t)}init(){super.init?.(),this.shadowRoot.isConnected&&(this.#h=this.#d?.(this)||this.shadowRoot,this.#f(u),this.#y(),this.#g(),this.#b(),(0,r.FX)(this,this.#v.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#a?.()}}},c=t=>class extends t{#A=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#A=document.createElement("style"),this.#A.innerText="* { cursor: inherit!important }"}#C(t){t?this.shadowRoot.appendChild(this.#A):this.#A.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.#C("true"===s)}};var d=s(3874),m=s(7878);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})){#M=m.C.bind(this,"blur");#S=m.C.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${s.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""} ></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#M()})),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}#x;constructor(){super(),this.#x=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""}}#T(){const t=this.isReadOnly?{}:this.getValidity();this.#x.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#x.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#x.validity.valid}reportValidity(){return this.#x.reportValidity()}get validity(){return this.#x.validity}get validationTarget(){return this.inputElement}setCustomValidity(t){t?this.#x.setValidity({customError:!0},t,this.validationTarget):(this.#x.setValidity({}),this.#T())}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.#x.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),g.includes(t)&&this.#T()}init(){super.init?.(),this.addEventListener("change",this.#T),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#T),setTimeout((()=>this.#T()))}},E=["invalid","required"],v=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e.localName)return e},y=({proxyProps:t=[]})=>e=>class extends(b(e)){static get observedAttributes(){return[...e.observedAttributes||[],...E]}#L;#w=m.C.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(){if(this.#L)return this.#L;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#L=v(t)||v(e),this.#L}set inputElement(t){this.#L=t}getValidity(){return this.inputElement?.validity||{}}handleInternalInputErrorMessage(){this.inputElement.checkValidity()||this.inputElement.setCustomValidity(this.validationMessage)}#k(){this.handleInternalInputErrorMessage(),this.setAttribute("error-message",this.validationMessage)}init(){super.init?.(),setTimeout((()=>{this.inputElement?.addEventListener("input",(t=>{this.inputElement.checkValidity()||(this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.baseElement.__onInput(t),this.#k())})),this.baseElement.addEventListener("change",(()=>{this.#w()})),this.#L.addEventListener("blur",(()=>{this.checkValidity()||(this.setAttribute("invalid","true"),this.#k())})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#k()})),this.handleInternalInputErrorMessage(),t.forEach((t=>{var e,s;e=this.inputElement,s=t,Object.defineProperty(this,s,{set(t){e[s]=t},get:()=>e[s],configurable:!0})})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,r.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})}))}},f=t=>(0,n.qC)(y(t),u({componentNameOverride:(0,r.iY)("input-wrapper")}));var A=s(357);const C=({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)}}#N;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.#N=(s=t(this)).host||s}#V(){this.#N.onmouseenter=t=>{t.target.setAttribute("hover","true")},this.#N.onmouseleave=t=>{t.target.removeAttribute("hover")}}init(){super.init?.(),(0,r.oP)(this,this.#N,{[o?"includeAttrs":"excludeAttrs"]:a}),this.#V()}}},M=t=>class extends t{#w=m.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#w(),this.prevValue=this.value)}))}};var S=s(8084);const x=t=>class extends t{init(){this.#$(),super.init?.()}#$(){["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.C.call(this,"blur"),m.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(m.C.call(this,"focus"),m.C.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","password-visible"],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?`)}))),{})}}}}]);
package/dist/umd/2481.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[2481],{2481:(t,e,r)=>{r.d(e,{v:()=>v,f:()=>p});var n=r(1e3),o=r(2061),i=r(4567);var a=r(4201);const p=(0,i.iY)("password"),{host:d,inputField:s,inputElement:l,inputElementPlaceholder:u,revealButtonContainer:c,revealButtonIcon:h,label:y,requiredIndicator:f,errorMessage:b,helperText:g}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:"> input:placeholder-shown"},revealButtonContainer:{selector:()=>"::part(reveal-button)"},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)"}},v=(0,o.qC)((0,n.yk)({mappings:{hostWidth:{...d,property:"width"},hostMinWidth:{...d,property:"min-width"},fontSize:[{},d],fontFamily:[y,s,b,g],inputHeight:{...s,property:"height"},inputHorizontalPadding:[{...l,property:"padding-left"},{...l,property:"padding-right"}],inputBackgroundColor:{...s,property:"background-color"},inputBorderStyle:{...s,property:"border-style"},inputBorderWidth:{...s,property:"border-width"},inputBorderColor:{...s,property:"border-color"},inputBorderRadius:{...s,property:"border-radius"},inputOutlineColor:{...s,property:"outline-color"},inputOutlineStyle:{...s,property:"outline-style"},inputOutlineOffset:{...s,property:"outline-offset"},inputOutlineWidth:{...s,property:"outline-width"},labelTextColor:[{...y,property:"color"},{...f,property:"color"}],labelRequiredIndicator:{...f,property:"content"},errorMessageTextColor:{...b,property:"color"},inputValueTextColor:[{...l,property:"color"},{...h,property:"color"}],inputPlaceholderTextColor:{...u,property:"color"},revealButtonOffset:[{...c,property:"margin-right"},{...c,property:"margin-left"}],revealButtonSize:{...c,property:"font-size"}}}),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=o=>{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\tmax-width: 100%;\n\t\t\t\tmin-width: 10em;\n\t\t\t}\n\t\t\t${(0,a.bi)(v.cssVarList)}\n\t\t\t${(0,a.Pd)("vaadin-password-field")}\n\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 > input {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field) {\n\t\t\t\tbox-sizing: border-box;\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}\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[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(${v.cssVarList.inputOutlineColor});\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[2481],{2481:(t,e,r)=>{r.d(e,{v:()=>v,f:()=>p});var n=r(1e3),o=r(2061),i=r(4567);var a=r(4201);const p=(0,i.iY)("password"),{host:s,inputField:d,inputElement:l,inputElementPlaceholder:u,revealButtonContainer:c,revealButtonIcon:h,label:y,requiredIndicator:f,errorMessage:b,helperText:g}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:"> input:placeholder-shown"},revealButtonContainer:{selector:()=>"::part(reveal-button)"},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)"}},v=(0,o.qC)((0,n.yk)({mappings:{hostWidth:{...s,property:"width"},hostMinWidth:{...s,property:"min-width"},fontSize:[{},s],fontFamily:[y,d,b,g],inputHeight:{...d,property:"height"},inputHorizontalPadding:[{...l,property:"padding-left"},{...l,property:"padding-right"}],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:[{...y,property:"color"},{...f,property:"color"}],labelRequiredIndicator:{...f,property:"content"},errorMessageTextColor:{...b,property:"color"},inputValueTextColor:[{...l,property:"color"},{...h,property:"color"}],inputPlaceholderTextColor:{...u,property:"color"},revealButtonOffset:[{...c,property:"margin-right"},{...c,property:"margin-left"}],revealButtonSize:{...c,property:"font-size"}}}),n.e4,(0,n.dj)({proxyProps:["value","selectionStart"]}),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=o=>{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\tmax-width: 100%;\n\t\t\t\tmin-width: 10em;\n\t\t\t}\n\t\t\t${(0,a.bi)(v.cssVarList)}\n\t\t\t${(0,a.Pd)("vaadin-password-field")}\n\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 > input {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field) {\n\t\t\t\tbox-sizing: border-box;\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}\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[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(${v.cssVarList.inputOutlineColor});\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[3726],{3483:(e,t,r)=>{r.r(t),r.d(t,{CheckboxClass:()=>g});var o=r(4567),p=r(2061),l=r(1e3),i=r(818),c=r(6882),n=r(4201);const a=(0,o.iY)("checkbox"),{host:s,component:d,checkboxElement:h,checkboxSurface:u,checkboxHiddenLabel:b,label:y,requiredIndicator:f,helperText:x,errorMessage:k}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxHiddenLabel:{selector:'vaadin-checkbox [slot="label"]'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},g=(0,p.qC)((0,l.yk)({mappings:{hostWidth:{...s,property:"width"},fontSize:[s,h,y,b],fontFamily:[y,b,x,k],labelTextColor:[{...y,property:"color"},{...f,property:"color"},{...y,property:"-webkit-text-fill-color"}],labelRequiredIndicator:{...f,property:"content"},errorMessageTextColor:{...k,property:"color"},labelFontWeight:[{...y,property:"font-weight"},{...b,property:"font-weight"}],labelSpacing:[{...y,property:"left"},{...b,property:"padding-left"}],inputValueTextColor:{...u,property:"color"},inputBackgroundColor:{...h,property:"background-color"},inputBorderRadius:{...h,property:"border-radius"},inputBorderWidth:{...h,property:"border-width"},inputBorderOffset:{...h,property:"border-offset"},inputBorderColor:{...h,property:"border-color"},inputBorderStyle:{...h,property:"border-style"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"},inputSize:[{...h,property:"width"},{...h,property:"height"},{...u,property:"font-size"},{...d,property:"font-size"},{...b,property:"line-height"},{...y,property:"margin-left"},{...y,property:"line-height"}]}}),l.e4,l.dj,l.Ae,i.h)((0,l.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${c.Z}\n vaadin-checkbox::part(checkbox)::after {\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t${(0,n.bi)(g.cssVarList)}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:a}));r(9515),r(9789),r(6676),customElements.define(a,g)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[3726],{3483:(e,t,r)=>{r.r(t),r.d(t,{CheckboxClass:()=>g});var o=r(4567),p=r(2061),l=r(1e3),i=r(818),c=r(6882),n=r(4201);const a=(0,o.iY)("checkbox"),{host:s,component:d,checkboxElement:h,checkboxSurface:u,checkboxHiddenLabel:b,label:y,requiredIndicator:f,helperText:x,errorMessage:k}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxHiddenLabel:{selector:'vaadin-checkbox [slot="label"]'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},g=(0,p.qC)((0,l.yk)({mappings:{hostWidth:{...s,property:"width"},fontSize:[s,h,y,b],fontFamily:[y,b,x,k],labelTextColor:[{...y,property:"color"},{...f,property:"color"},{...y,property:"-webkit-text-fill-color"}],labelRequiredIndicator:{...f,property:"content"},errorMessageTextColor:{...k,property:"color"},labelFontWeight:[{...y,property:"font-weight"},{...b,property:"font-weight"}],labelSpacing:[{...y,property:"left"},{...b,property:"padding-left"}],inputValueTextColor:{...u,property:"color"},inputBackgroundColor:{...h,property:"background-color"},inputBorderRadius:{...h,property:"border-radius"},inputBorderWidth:{...h,property:"border-width"},inputBorderOffset:{...h,property:"border-offset"},inputBorderColor:{...h,property:"border-color"},inputBorderStyle:{...h,property:"border-style"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"},inputSize:[{...h,property:"width"},{...h,property:"height"},{...u,property:"font-size"},{...d,property:"font-size"},{...b,property:"line-height"},{...y,property:"margin-left"},{...y,property:"line-height"}]}}),l.e4,(0,l.dj)({proxyProps:["value","selectionStart"]}),l.Ae,i.h)((0,l.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${c.Z}\n vaadin-checkbox::part(checkbox)::after {\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t${(0,n.bi)(g.cssVarList)}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:a}));r(9515),r(9789),r(6676),customElements.define(a,g)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[4483],{9203:(t,e,r)=>{r.r(e),r.d(e,{SwitchToggleClass:()=>g});var o=r(4567),p=r(2061),a=r(1e3),c=r(818),n=r(6882),i=r(4201);const l=(0,o.iY)("switch-toggle"),{host:s,component:d,checkboxElement:h,checkboxSurface:b,checkboxHiddenLabel:k,label:y,requiredIndicator:u,helperText:f,errorMessage:x}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxHiddenLabel:{selector:'vaadin-checkbox [slot="label"]'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},g=(0,p.qC)((0,a.yk)({mappings:{hostWidth:{...s,property:"width"},fontSize:[d,y,k],fontFamily:[y,f,x],trackBorderWidth:{...h,property:"border-width"},trackBorderStyle:{...h,property:"border-style"},trackBorderColor:{...h,property:"border-color"},trackBackgroundColor:{...h,property:"background-color"},trackBorderRadius:{...h,property:"border-radius"},trackWidth:[{...h,property:"width"}],trackHeight:[{...b,property:"font-size"},{...h,property:"height"}],knobSize:[{...b,property:"width"},{...b,property:"height"}],knobTextColor:{...b,property:"color"},knobRadius:{...b,property:"border-radius"},knobTransitionDuration:{...b,property:"transition"},knobColor:{...b,property:"background-color"},knobTopOffset:{...b,property:"top"},knobLeftOffset:{...b,property:"left"},labelSpacing:[{...y,property:"padding-left"},{...k,property:"padding-left"}],labelLineHeight:[{...y,property:"line-height"},{...k,property:"line-height"}],labelFontWeight:[{...y,property:"font-weight"},{...k,property:"font-weight"}],labelTextColor:[{...y,property:"color"},{...u,property:"color"},{...y,property:"-webkit-text-fill-color"}],labelRequiredIndicator:{...u,property:"content"},errorMessageTextColor:{...x,property:"color"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"}}}),a.e4,a.dj,a.Ae,c.h)((0,a.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${n.Z}\n\t\t\t${(0,i.bi)(g.cssVarList)}\n\t\t\tvaadin-text-field::part(label) {\n\t\t\t\tleft: calc(var(${g.cssVarList.trackWidth}) + var(${g.cssVarList.trackBorderWidth}) * 2);\n\t\t\t}\n\t\t\tvaadin-checkbox[active]::part(checkbox) {\n\t\t\t\ttransform: none;\n\t\t\t}\n\t\t\tvaadin-checkbox::part(checkbox)::after {\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 1;\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}));r(9515),r(9789),r(6676),customElements.define(l,g)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[4483],{9203:(t,e,r)=>{r.r(e),r.d(e,{SwitchToggleClass:()=>g});var o=r(4567),p=r(2061),a=r(1e3),c=r(818),n=r(6882),i=r(4201);const l=(0,o.iY)("switch-toggle"),{host:s,component:d,checkboxElement:h,checkboxSurface:b,checkboxHiddenLabel:y,label:k,requiredIndicator:u,helperText:f,errorMessage:x}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxHiddenLabel:{selector:'vaadin-checkbox [slot="label"]'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},g=(0,p.qC)((0,a.yk)({mappings:{hostWidth:{...s,property:"width"},fontSize:[d,k,y],fontFamily:[k,f,x],trackBorderWidth:{...h,property:"border-width"},trackBorderStyle:{...h,property:"border-style"},trackBorderColor:{...h,property:"border-color"},trackBackgroundColor:{...h,property:"background-color"},trackBorderRadius:{...h,property:"border-radius"},trackWidth:[{...h,property:"width"}],trackHeight:[{...b,property:"font-size"},{...h,property:"height"}],knobSize:[{...b,property:"width"},{...b,property:"height"}],knobTextColor:{...b,property:"color"},knobRadius:{...b,property:"border-radius"},knobTransitionDuration:{...b,property:"transition"},knobColor:{...b,property:"background-color"},knobTopOffset:{...b,property:"top"},knobLeftOffset:{...b,property:"left"},labelSpacing:[{...k,property:"padding-left"},{...y,property:"padding-left"}],labelLineHeight:[{...k,property:"line-height"},{...y,property:"line-height"}],labelFontWeight:[{...k,property:"font-weight"},{...y,property:"font-weight"}],labelTextColor:[{...k,property:"color"},{...u,property:"color"},{...k,property:"-webkit-text-fill-color"}],labelRequiredIndicator:{...u,property:"content"},errorMessageTextColor:{...x,property:"color"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"}}}),a.e4,(0,a.dj)({proxyProps:["value","selectionStart"]}),a.Ae,c.h)((0,a.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${n.Z}\n\t\t\t${(0,i.bi)(g.cssVarList)}\n\t\t\tvaadin-text-field::part(label) {\n\t\t\t\tleft: calc(var(${g.cssVarList.trackWidth}) + var(${g.cssVarList.trackBorderWidth}) * 2);\n\t\t\t}\n\t\t\tvaadin-checkbox[active]::part(checkbox) {\n\t\t\t\ttransform: none;\n\t\t\t}\n\t\t\tvaadin-checkbox::part(checkbox)::after {\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 1;\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}));r(9515),r(9789),r(6676),customElements.define(l,g)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1348],{3547:(e,t,s)=>{s.d(t,{B:()=>u,f:()=>l});var i=s(3878),n=s(4567),r=s(7878);const l=(0,n.iY)("button-selection-group-internal");class u extends((0,i.P)({componentName:l,baseSelector:"slot"})){constructor(){super(),this.innerHTML='\n <style>\n slot {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n }\n </style>\n <slot part="wrapper"></slot>\n\t\t'}#e=r.C.bind(this,"change");get items(){return this.querySelector("slot").assignedElements()}get isReadonly(){return"true"===this.getAttribute("readonly")}getSelectedNode(){return this.items.find((e=>e.hasAttribute("selected")))}get size(){return this.getAttribute("size")||"md"}removeSelected(){this.getSelectedNode()?.removeAttribute("selected")}onNodeClick(e){this.isReadonly||(this.setSelected(e.target),this.#e())}setSelected(e){e!==this.getSelectedNode()&&(this.removeSelected(),e?.setAttribute("selected","true"))}get value(){return this.getSelectedNode()?.value}set value(e){const t=this.items.find((t=>t.value===e));this.setSelected(t)}get defaultValue(){return this.getAttribute("default-value")}setDefaultValue(){setTimeout((()=>{this.defaultValue&&(this.value=this.defaultValue,this.setCustomValidity())}))}onSizeChange(){this.items.forEach((e=>{e.setAttribute("size",this.size)}))}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}onObservedAttributeChange(e){e.forEach((e=>{"size"===e&&this.onSizeChange()}))}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.items[0].focus()})),super.init?.(),this.setDefaultValue(),(0,n.FX)(this,this.onObservedAttributeChange.bind(this),{includeAttrs:["size"]}),(0,n.P$)(this,(({addedNodes:e})=>{e.forEach((e=>{e.addEventListener("click",this.onNodeClick.bind(this)),e.setAttribute("size",this.size)}))}))}}},8460:(e,t,s)=>{s.r(t),s.d(t,{ButtonSelectionGroupInternalClass:()=>i.B});var i=s(3547);s(2018),customElements.define(i.f,i.B)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[206],{7901:(t,e,o)=>{o.r(e),o.d(e,{ButtonSelectionGroupItemClass:()=>u});var s=o(1e3),n=o(3874),r=o(2061),i=o(4567),a=o(9690);const c=(0,i.iY)("button-selection-group-item");class l extends((0,n.s)({componentName:c,baseSelector:":host > descope-button"})){get size(){return this.getAttribute("size")||"md"}get variant(){return this.getAttribute("variant")||"contained"}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n\t\t<style>\n descope-button {\n max-width: 100%;\n }\n\t\t\tdescope-button > slot {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n max-width: 100%\n\t\t\t}\n\t\t</style>\n <descope-button variant="${this.variant}" size="${this.size}" mode="primary">\n <slot></slot>\n </descope-button>\n\t`,(0,i.oP)(this,this.baseElement,{includeAttrs:["size","variant"]})}handleFocus(){this.shadowRoot.querySelector("descope-button")?.focus()}focus(){this.handleFocus()}init(){super.init(),this.addEventListener("focus",(t=>{t.isTrusted&&this.handleFocus()}))}}const u=(0,r.qC)((0,s.yk)({mappings:{backgroundColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.backgroundColor},labelTextColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.labelTextColor},borderColor:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderColor},borderStyle:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderStyle},borderRadius:{selector:()=>a.n.componentName,property:a.n.cssVarList.borderRadius}}}),s.e4,s.Ae)(l);o(2018),customElements.define(c,u)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[6699],{8086:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupClass:()=>f});var r=n(1e3),o=n(3547),i=n(2061),a=n(4567),l=n(4201);const s=(0,a.iY)("button-selection-group"),{host:d,label:p,requiredIndicator:c,internalWrapper:u,errorMessage:h}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:"descope-button-selection-group-internal slot"},errorMessage:{selector:"::part(error-message)"}},f=(0,i.qC)((0,r.yk)({mappings:{hostWidth:{...d,property:"width"},fontFamily:d,labelTextColor:[{...p,property:"color"},{...c,property:"color"}],labelRequiredIndicator:{...c,property:"content"},errorMessageTextColor:{...h,property:"color"},itemsSpacing:{...u,property:"gap"}}}),r.e4,(0,r.dj)({proxyProps:["value","selectionStart"]}),r.Ae,(t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t<${o.f}\n\t\t\t\tname="button-selection-group"\n\t\t\t\tslot="input"\n tabindex="-1"\n\t\t\t>\n <slot></slot>\n </${o.f}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.f),(0,a.oP)(this,this.inputElement,{includeAttrs:["size","default-value"]})}}))((0,r.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t\t${(0,l.DY)()}\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n\t\t\tdescope-button-selection-group-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n display:inline-block;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n\t\t\t${(0,l.Pd)("vaadin-text-field")}\n `,excludeAttrsSync:["tabindex"],componentName:s}));n(8460),customElements.define(s,f)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9483],{4049:(t,e,o)=>{o.d(e,{H:()=>g,f:()=>l});var r=o(2061),n=o(4567),i=o(4201),a=o(1e3);const l=(0,n.iY)("combo-box"),{host:p,inputField:d,inputElement:s,placeholder:c,toggle:u,label:b,requiredIndicator:h,helperText:y,errorMessage:m}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"input"},placeholder:{selector:"> input:placeholder-shown"},toggle:{selector:"::part(toggle-button)"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},g=(0,r.qC)((0,a.yk)({mappings:{hostWidth:{...p,property:"width"},fontSize:[{},p],fontFamily:[b,c,d,y,m],labelTextColor:[{...b,property:"color"},{...h,property:"color"}],errorMessageTextColor:{...m,property:"color"},inputHeight:{...d,property:"height"},inputBackgroundColor:{...d,property:"background-color"},inputBorderColor:{...d,property:"border-color"},inputBorderWidth:{...d,property:"border-width"},inputBorderStyle:{...d,property:"border-style"},inputBorderRadius:{...d,property:"border-radius"},labelRequiredIndicator:{...h,property:"content"},inputValueTextColor:{...d,property:"color"},inputPlaceholderTextColor:{...c,property:"color"},inputDropdownButtonCursor:{...u,property:"cursor"},inputDropdownButtonColor:{...u,property:"color"},inputDropdownButtonSize:{...u,property:"font-size"},inputDropdownButtonOffset:[{...u,property:"margin-right"},{...u,property:"margin-left"}],inputOutlineColor:{...d,property:"outline-color"},inputOutlineWidth:{...d,property:"outline-width"},inputOutlineStyle:{...d,property:"outline-style"},inputOutlineOffset:{...d,property:"outline-offset"},inputHorizontalPadding:[{...s,property:"padding-left"},{...s,property:"padding-right"}],overlayBackground:{property:()=>g.cssVarList.overlay.backgroundColor},overlayBorder:{property:()=>g.cssVarList.overlay.border}}}),a.e4,(0,a.Iw)({name:"overlay",selector:"",mappings:{backgroundColor:{selector:"vaadin-combo-box-scroller"},cursor:{selector:"vaadin-combo-box-item"},minHeight:{selector:"vaadin-combo-box-overlay"},margin:{selector:"vaadin-combo-box-overlay"},fontFamily:{selector:"vaadin-combo-box-item"}},forward:{include:!1,attributes:["size"]}}),a.dj,a.Ae,(t=>class extends t{#t(){const t=this.shadowRoot.querySelector(this.baseSelector),e=Array.from(this.children);e.length&&(e.forEach((t=>{Object.defineProperty(t,"data-name",{value:t.getAttribute("data-name")}),Object.defineProperty(t,"data-id",{value:t.getAttribute("data-id")})})),t.items=e,t.renderer=(t,e,o)=>{t.innerHTML=o.item.outerHTML})}#e(){const t=this.baseElement.shadowRoot.querySelector("vaadin-combo-box-overlay");t._attachOverlay=()=>{t.bringToFront()},t._detachOverlay=()=>{},t._enterModalState=()=>{}}init(){super.init?.(),this.#e(),(0,n.P$)(this,this.#t.bind(this))}}))((0,a.DM)({slots:["","prefix"],wrappedEleName:"vaadin-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${(0,i.bi)(g.cssVarList)}\n\t\t${(0,i.PH)("vaadin-combo-box")}\n\t\t${(0,i.jI)("vaadin-combo-box")}\n\t\t${(0,i.Pd)("vaadin-combo-box")}\n\n\t\tvaadin-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\tvaadin-combo-box::part(input-field) {\n\t\t\tpadding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n\t\t`,excludeAttrsSync:["tabindex","size"],componentName:l,includeForwardProps:["items","renderer","selectedItem"]}))},1294:(t,e,o)=>{o.r(e),o.d(e,{ComboBoxClass:()=>r.H}),o(9314);var r=o(4049);customElements.define(r.f,r.H)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9483],{4049:(t,e,o)=>{o.d(e,{H:()=>g,f:()=>l});var r=o(2061),n=o(4567),i=o(4201),a=o(1e3);const l=(0,n.iY)("combo-box"),{host:s,inputField:p,inputElement:d,placeholder:c,toggle:u,label:b,requiredIndicator:y,helperText:m,errorMessage:h}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"input"},placeholder:{selector:"> input:placeholder-shown"},toggle:{selector:"::part(toggle-button)"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},g=(0,r.qC)((0,a.yk)({mappings:{hostWidth:{...s,property:"width"},fontSize:[{},s],fontFamily:[b,c,p,m,h],labelTextColor:[{...b,property:"color"},{...y,property:"color"}],errorMessageTextColor:{...h,property:"color"},inputHeight:{...p,property:"height"},inputBackgroundColor:{...p,property:"background-color"},inputBorderColor:{...p,property:"border-color"},inputBorderWidth:{...p,property:"border-width"},inputBorderStyle:{...p,property:"border-style"},inputBorderRadius:{...p,property:"border-radius"},labelRequiredIndicator:{...y,property:"content"},inputValueTextColor:{...p,property:"color"},inputPlaceholderTextColor:{...c,property:"color"},inputDropdownButtonCursor:{...u,property:"cursor"},inputDropdownButtonColor:{...u,property:"color"},inputDropdownButtonSize:{...u,property:"font-size"},inputDropdownButtonOffset:[{...u,property:"margin-right"},{...u,property:"margin-left"}],inputOutlineColor:{...p,property:"outline-color"},inputOutlineWidth:{...p,property:"outline-width"},inputOutlineStyle:{...p,property:"outline-style"},inputOutlineOffset:{...p,property:"outline-offset"},inputHorizontalPadding:[{...d,property:"padding-left"},{...d,property:"padding-right"}],overlayBackground:{property:()=>g.cssVarList.overlay.backgroundColor},overlayBorder:{property:()=>g.cssVarList.overlay.border},overlayFontSize:{property:()=>g.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>g.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>g.cssVarList.overlay.cursor}}}),a.e4,(0,a.Iw)({name:"overlay",selector:"",mappings:{backgroundColor:{selector:"vaadin-combo-box-scroller"},minHeight:{selector:"vaadin-combo-box-overlay"},margin:{selector:"vaadin-combo-box-overlay"},cursor:{selector:"vaadin-combo-box-item"},fontFamily:{selector:"vaadin-combo-box-item"},fontSize:{selector:"vaadin-combo-box-item"}},forward:{include:!1,attributes:["size"]}}),(0,a.dj)({proxyProps:["selectionStart"]}),a.Ae,(t=>class extends t{#t(){const t=this.shadowRoot.querySelector(this.baseSelector),e=Array.from(this.children);e.length&&(e.forEach((t=>{Object.defineProperty(t,"data-name",{value:t.getAttribute("data-name")}),Object.defineProperty(t,"data-id",{value:t.getAttribute("data-id")})})),t.items=e,t.renderer=(t,e,o)=>{t.innerHTML=o.item.outerHTML})}#e(){const t=this.baseElement.shadowRoot.querySelector("vaadin-combo-box-overlay");t._attachOverlay=()=>{t.bringToFront()},t._detachOverlay=()=>{},t._enterModalState=()=>{}}init(){super.init?.(),this.#e(),(0,n.P$)(this,this.#t.bind(this))}set value(t){this.baseElement.selectedItem=this.baseElement.items.find((e=>e["data-id"]===t))}get value(){return this.baseElement.selectedItem?.["data-id"]||""}}))((0,a.DM)({slots:["","prefix"],wrappedEleName:"vaadin-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${(0,i.bi)(g.cssVarList)}\n\t\t${(0,i.PH)("vaadin-combo-box")}\n\t\t${(0,i.jI)("vaadin-combo-box")}\n\t\t${(0,i.Pd)("vaadin-combo-box")}\n\n\t\tvaadin-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\tvaadin-combo-box::part(input-field) {\n\t\t\tpadding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n\t\t`,excludeAttrsSync:["tabindex","size"],componentName:l,includeForwardProps:["items","renderer","selectedItem"]}))},1294:(t,e,o)=>{o.r(e),o.d(e,{ComboBoxClass:()=>r.H}),o(9314);var r=o(4049);customElements.define(r.f,r.H)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9760],{1272:(t,e,s)=>{s.r(e),s.d(e,{EmailFieldClass:()=>p}),s(9437);var i=s(1e3),n=s(4447),a=s(2061),l=s(4567),c=s(4201);const d=(0,l.iY)("email-field"),p=(0,a.qC)((0,i.yk)({mappings:n.Z}),i.e4,i.dj,i.Ae,(t=>class extends t{init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-]+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$")}}))((0,i.DM)({slots:["","suffix"],wrappedEleName:"vaadin-email-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${p.cssVarList.inputOutlineWidth}) + var(${p.cssVarList.inputOutlineOffset}))\n\t\t\t}\n\t\t\t${(0,c.bi)(p.cssVarList)}\n\t\t\t${(0,c.wm)("vaadin-email-field",p.cssVarList)}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:d}));customElements.define(d,p)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9760],{1272:(t,e,s)=>{s.r(e),s.d(e,{EmailFieldClass:()=>p}),s(9437);var i=s(1e3),a=s(4447),n=s(2061),l=s(4567),c=s(4201);const d=(0,l.iY)("email-field"),p=(0,n.qC)((0,i.yk)({mappings:a.Z}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,(t=>class extends t{init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-]+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$")}}))((0,i.DM)({slots:["","suffix"],wrappedEleName:"vaadin-email-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${p.cssVarList.inputOutlineWidth}) + var(${p.cssVarList.inputOutlineOffset}))\n\t\t\t}\n\t\t\t${(0,c.bi)(p.cssVarList)}\n\t\t\t${(0,c.wm)("vaadin-email-field",p.cssVarList)}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:d}));customElements.define(d,p)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1842],{395:(t,e,n)=>{n.d(e,{f:()=>d,o:()=>b});var i=n(4567),s=n(2061),r=n(1e3),a=n(5857),o=n(2481),l=n(4201);const d=(0,i.iY)("new-password"),{host:p,label:h,internalInputsWrapper:c,errorMessage:u,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)"}},b=(0,s.qC)((0,r.yk)({mappings:{fontSize:[p,{},{selector:o.v.componentName,property:o.v.cssVarList.fontSize}],fontFamily:[h,u,f],errorMessageTextColor:{...u,property:"color"},hostWidth:{...p,property:"width"},hostMinWidth:{...p,property:"min-width"},inputsRequiredIndicator:{...p,property:"content"},spaceBetweenInputs:{...c,property:"gap"}}}),r.e4,r.dj,(t=>class extends t{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\tbox-sizing: border-box;\n\t\t}\n\t\t${(0,l.bi)(o.v.cssVarList)}\n\t\tvaadin-text-field {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t\tvaadin-text-field::part(input-field) {\n\t\t\tmin-height: 0;\n\t\t\tbackground: transparent;\n\t\t\tbox-shadow: none;\n\t\t\tpadding: 0;\n\t\t}\n\t\tvaadin-text-field::part(input-field)::after {\n\t\t\tbackground: transparent;\n\t\t\topacity: 0;\n\t\t}\n\t\tdescope-new-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\tflex-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:d}))},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-/,l=/^confirm-/,d=(t,e)=>t.replace(e,""),p=["password-label","password-placeholder"],h=["confirm-label","confirm-placeholder"],c=["disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable"],u=[].concat(c,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||[],u)}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,...c].forEach((t=>{this.attributeChangedCallback(t,null,this.getAttribute(t))}))}handleIndicatorStyle(){this.inputs.forEach((t=>{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):c.includes(t)?this.inputs.forEach((e=>this.toggleBooleanAttribute(e,t,n))):p.includes(t)?this.toggleBooleanAttribute(this.passwordInput,d(t,o),n):h.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,d(t,l),n))}})}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1842],{395:(t,e,n)=>{n.d(e,{f:()=>d,o:()=>b});var i=n(4567),s=n(2061),r=n(1e3),a=n(5857),o=n(2481),l=n(4201);const d=(0,i.iY)("new-password"),{host:p,label:h,internalInputsWrapper:c,errorMessage:u,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)"}},b=(0,s.qC)((0,r.yk)({mappings:{fontSize:[p,{},{selector:o.v.componentName,property:o.v.cssVarList.fontSize}],fontFamily:[h,u,f],errorMessageTextColor:{...u,property:"color"},hostWidth:{...p,property:"width"},hostMinWidth:{...p,property:"min-width"},inputsRequiredIndicator:{...p,property:"content"},spaceBetweenInputs:{...c,property:"gap"}}}),r.e4,(0,r.dj)({proxyProps:["value","selectionStart"]}),(t=>class extends t{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\tbox-sizing: border-box;\n\t\t}\n\t\t${(0,l.bi)(o.v.cssVarList)}\n\t\tvaadin-text-field {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t\tvaadin-text-field::part(input-field) {\n\t\t\tmin-height: 0;\n\t\t\tbackground: transparent;\n\t\t\tbox-shadow: none;\n\t\t\tpadding: 0;\n\t\t}\n\t\tvaadin-text-field::part(input-field)::after {\n\t\t\tbackground: transparent;\n\t\t\topacity: 0;\n\t\t}\n\t\tdescope-new-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\tflex-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:d}))},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-/,l=/^confirm-/,d=(t,e)=>t.replace(e,""),p=["password-label","password-placeholder"],h=["confirm-label","confirm-placeholder"],c=["disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable"],u=[].concat(c,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||[],u)}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,...c].forEach((t=>{this.attributeChangedCallback(t,null,this.getAttribute(t))}))}handleIndicatorStyle(){this.inputs.forEach((t=>{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):c.includes(t)?this.inputs.forEach((e=>this.toggleBooleanAttribute(e,t,n))):p.includes(t)?this.toggleBooleanAttribute(this.passwordInput,d(t,o),n):h.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,d(t,l),n))}})}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[2142],{6916:(t,e,s)=>{s.r(e),s.d(e,{NumberFieldClass:()=>r}),s(5806);var n=s(1e3),i=s(4447),a=s(2061),l=s(4567),c=s(4201);const d=(0,l.iY)("number-field"),r=(0,a.qC)((0,n.yk)({mappings:i.Z}),n.e4,n.dj,n.Ae)((0,n.DM)({slots:["","prefix","suffix"],wrappedEleName:"vaadin-number-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${r.cssVarList.inputOutlineWidth}) + var(${r.cssVarList.inputOutlineOffset}));\n\t\t\t}\n\t\t\t${(0,c.bi)(r.cssVarList)}\n\t\t\t${(0,c.wm)("vaadin-number-field",r.cssVarList)}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:d}));customElements.define(d,r)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[2142],{6916:(t,e,s)=>{s.r(e),s.d(e,{NumberFieldClass:()=>d}),s(5806);var n=s(1e3),i=s(4447),a=s(2061),l=s(4567),r=s(4201);const c=(0,l.iY)("number-field"),d=(0,a.qC)((0,n.yk)({mappings:i.Z}),n.e4,(0,n.dj)({proxyProps:["value","selectionStart"]}),n.Ae)((0,n.DM)({slots:["","prefix","suffix"],wrappedEleName:"vaadin-number-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n\t\t\t}\n\t\t\t${(0,r.bi)(d.cssVarList)}\n\t\t\t${(0,r.wm)("vaadin-number-field",d.cssVarList)}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:c}));customElements.define(c,d)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[939],{4919:(t,e,n)=>{n.r(e),n.d(e,{PasscodeClass:()=>x});var i=n(1e3),r=n(7361),o=n(6417),a=n(2061),d=n(4567),s=n(4201);const l=(0,d.iY)("passcode"),p=["digits"],{host:c,digitField:u,label:g,requiredIndicator:h,internalWrapper:m,focusedDigitField:f,errorMessage:b}={host:{selector:()=>":host"},focusedDigitField:{selector:()=>`${o.z.componentName}[focused="true"]`},digitField:{selector:()=>o.z.componentName},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:"descope-passcode-internal .wrapper"},errorMessage:{selector:"::part(error-message)"}},y=o.z.cssVarList,x=(0,a.qC)((0,i.yk)({mappings:{fontSize:[{...u,property:y.fontSize},c],hostWidth:{property:"width"},fontFamily:c,labelTextColor:[{...g,property:"color"},{...h,property:"color"}],labelRequiredIndicator:{...h,property:"content"},errorMessageTextColor:{...b,property:"color"},digitValueTextColor:{selector:o.z.componentName,property:y.inputValueTextColor},digitSize:[{...u,property:"height"},{...u,property:"width"}],digitPadding:{...u,property:y.inputHorizontalPadding},digitTextAlign:{...u,property:y.inputTextAlign},digitCaretTextColor:{...u,property:y.inputCaretTextColor},digitSpacing:{...m,property:"gap"},digitOutlineColor:{...u,property:y.inputOutlineColor},digitOutlineWidth:{...u,property:y.inputOutlineWidth},focusedDigitFieldOutlineColor:{...f,property:y.inputOutlineColor}}}),i.e4,i.dj,i.Ae,(t=>class extends t{static get observedAttributes(){return p.concat(t.observedAttributes||[])}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t<${r.f}\n\t\t\t\tbordered="true"\n\t\t\t\tname="code"\n\t\t\t\ttabindex="-1"\n\t\t\t\tslot="input"\n\t\t\t><slot></slot></${r.f}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.f),(0,d.oP)(this,this.inputElement,{includeAttrs:["digits","size"]})}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),"digits"===t&&this.style.setProperty("--passcode-digits-count",n)}}))((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: calc(var(--passcode-digits-count) * 2em);\n\t\t\t}\n\t\t\t${(0,s.DY)()}\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal .wrapper {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tmin-height: initial;\n\t\t\t\theight: 100%;\n\t\t\t\tjustify-content: space-between;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal descope-text-field {\n\t\t\t\tmin-width: 2em;\n\t\t\t\tmax-width: var(${y.inputHeight});\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n\t\t\t${(0,s.Pd)("vaadin-text-field")}\n \t`,excludeAttrsSync:["tabindex"],componentName:l}));n(9357),n(4775),customElements.define(l,x)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[939],{4919:(t,e,n)=>{n.r(e),n.d(e,{PasscodeClass:()=>x});var i=n(1e3),r=n(7361),o=n(6417),a=n(2061),d=n(4567),s=n(4201);const l=(0,d.iY)("passcode"),p=["digits"],{host:c,digitField:u,label:g,requiredIndicator:h,internalWrapper:m,focusedDigitField:f,errorMessage:b}={host:{selector:()=>":host"},focusedDigitField:{selector:()=>`${o.z.componentName}[focused="true"]`},digitField:{selector:()=>o.z.componentName},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:"descope-passcode-internal .wrapper"},errorMessage:{selector:"::part(error-message)"}},y=o.z.cssVarList,x=(0,a.qC)((0,i.yk)({mappings:{fontSize:[{...u,property:y.fontSize},c],hostWidth:{property:"width"},fontFamily:c,labelTextColor:[{...g,property:"color"},{...h,property:"color"}],labelRequiredIndicator:{...h,property:"content"},errorMessageTextColor:{...b,property:"color"},digitValueTextColor:{selector:o.z.componentName,property:y.inputValueTextColor},digitSize:[{...u,property:"height"},{...u,property:"width"}],digitPadding:{...u,property:y.inputHorizontalPadding},digitTextAlign:{...u,property:y.inputTextAlign},digitCaretTextColor:{...u,property:y.inputCaretTextColor},digitSpacing:{...m,property:"gap"},digitOutlineColor:{...u,property:y.inputOutlineColor},digitOutlineWidth:{...u,property:y.inputOutlineWidth},focusedDigitFieldOutlineColor:{...f,property:y.inputOutlineColor}}}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,(t=>class extends t{static get observedAttributes(){return p.concat(t.observedAttributes||[])}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t<${r.f}\n\t\t\t\tbordered="true"\n\t\t\t\tname="code"\n\t\t\t\ttabindex="-1"\n\t\t\t\tslot="input"\n\t\t\t><slot></slot></${r.f}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.f),(0,d.oP)(this,this.inputElement,{includeAttrs:["digits","size"]})}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),"digits"===t&&this.style.setProperty("--passcode-digits-count",n)}}))((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: calc(var(--passcode-digits-count) * 2em);\n\t\t\t}\n\t\t\t${(0,s.DY)()}\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal .wrapper {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tmin-height: initial;\n\t\t\t\theight: 100%;\n\t\t\t\tjustify-content: space-between;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal descope-text-field {\n\t\t\t\tmin-width: 2em;\n\t\t\t\tmax-width: var(${y.inputHeight});\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n\t\t\t${(0,s.Pd)("vaadin-text-field")}\n \t`,excludeAttrsSync:["tabindex"],componentName:l}));n(9357),n(4775),customElements.define(l,x)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[3322],{1962:(t,e,r)=>{r.r(e),r.d(e,{TextAreaClass:()=>b}),r(7101);var o=r(1e3),p=r(2061),a=r(4567),i=r(4201);const l=(0,a.iY)("text-area"),{host:n,label:s,placeholder:d,inputField:u,textArea:c,requiredIndicator:h,helperText:y,errorMessage:x}={host:{selector:()=>":host"},label:{selector:"::part(label)"},placeholder:{selector:"textarea:placeholder-shown"},inputField:{selector:"::part(input-field)"},textArea:{selector:"> textarea"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},b=(0,p.qC)((0,o.yk)({mappings:{hostWidth:{...n,property:"width"},hostMinWidth:{...n,property:"min-width"},fontSize:[n,c],fontFamily:[s,u,y,x],labelTextColor:[{...s,property:"color"},{...h,property:"color"}],labelRequiredIndicator:{...h,property:"content"},errorMessageTextColor:{...x,property:"color"},inputBackgroundColor:{...u,property:"background-color"},inputValueTextColor:{...c,property:"color"},inputPlaceholderTextColor:{...d,property:"color"},inputBorderWidth:{...u,property:"border-width"},inputBorderStyle:{...u,property:"border-style"},inputBorderColor:{...u,property:"border-color"},inputBorderRadius:{...u,property:"border-radius"},inputOutlineStyle:{...u,property:"outline-Style"},inputOutlineColor:{...u,property:"outline-color"},inputOutlineOffset:{...u,property:"outline-offset"},inputOutlineWidth:{...u,property:"outline-width"},inputResizeType:{...c,property:"resize"},inputMinHeight:{...c,property:"min-height"}}}),o.e4,o.dj,o.Ae)((0,o.DM)({slots:[],wrappedEleName:"vaadin-text-area",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t\ttextarea {\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\t${(0,i.bi)(b.cssVarList)}\n\t\t\t${(0,i.TX)("vaadin-text-area")}\n\t\t\t${(0,i.jl)("vaadin-text-area")}\n\t\t\t${(0,i.jI)("vaadin-text-area","textarea")}\n\t\t\t${(0,i.Pd)("vaadin-text-area")}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}));customElements.define(l,b)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[3322],{1962:(t,e,r)=>{r.r(e),r.d(e,{TextAreaClass:()=>b}),r(7101);var o=r(1e3),p=r(2061),a=r(4567),i=r(4201);const l=(0,a.iY)("text-area"),{host:n,label:s,placeholder:d,inputField:u,textArea:c,requiredIndicator:h,helperText:y,errorMessage:x}={host:{selector:()=>":host"},label:{selector:"::part(label)"},placeholder:{selector:"textarea:placeholder-shown"},inputField:{selector:"::part(input-field)"},textArea:{selector:"> textarea"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},b=(0,p.qC)((0,o.yk)({mappings:{hostWidth:{...n,property:"width"},hostMinWidth:{...n,property:"min-width"},fontSize:[n,c],fontFamily:[s,u,y,x],labelTextColor:[{...s,property:"color"},{...h,property:"color"}],labelRequiredIndicator:{...h,property:"content"},errorMessageTextColor:{...x,property:"color"},inputBackgroundColor:{...u,property:"background-color"},inputValueTextColor:{...c,property:"color"},inputPlaceholderTextColor:{...d,property:"color"},inputBorderWidth:{...u,property:"border-width"},inputBorderStyle:{...u,property:"border-style"},inputBorderColor:{...u,property:"border-color"},inputBorderRadius:{...u,property:"border-radius"},inputOutlineStyle:{...u,property:"outline-Style"},inputOutlineColor:{...u,property:"outline-color"},inputOutlineOffset:{...u,property:"outline-offset"},inputOutlineWidth:{...u,property:"outline-width"},inputResizeType:{...c,property:"resize"},inputMinHeight:{...c,property:"min-height"}}}),o.e4,(0,o.dj)({proxyProps:["value","selectionStart"]}),o.Ae)((0,o.DM)({slots:[],wrappedEleName:"vaadin-text-area",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t\ttextarea {\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\t${(0,i.bi)(b.cssVarList)}\n\t\t\t${(0,i.TX)("vaadin-text-area")}\n\t\t\t${(0,i.jl)("vaadin-text-area")}\n\t\t\t${(0,i.jI)("vaadin-text-area","textarea")}\n\t\t\t${(0,i.Pd)("vaadin-text-area")}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}));customElements.define(l,b)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[2934],{6417:(t,e,s)=>{s.d(e,{f:()=>d,z:()=>p});var a=s(1e3),i=s(4447),n=s(2061),l=s(4567),c=s(4201);const d=(0,l.iY)("text-field"),r=["type"],p=(0,n.qC)((0,a.yk)({mappings:i.Z}),a.e4,a.dj,a.Ae,(t=>class extends t{static get observedAttributes(){return r.concat(t.observedAttributes||[])}attributeChangedCallback(t,e,s){super.attributeChangeCallback?.(t,e,s),"type"===t&&this.baseElement._setType(s)}}))((0,a.DM)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${p.cssVarList.inputOutlineWidth}) + var(${p.cssVarList.inputOutlineOffset}));\n\t\t\t}\n\t\t\t${(0,c.bi)(p.cssVarList)}\n\t\t\t${(0,c.wm)("vaadin-text-field",p.cssVarList)}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:d}))},9357:(t,e,s)=>{s.r(e),s.d(e,{TextFieldClass:()=>a.z}),s(9789);var a=s(6417);customElements.define(a.f,a.z)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[2934],{6417:(t,e,s)=>{s.d(e,{f:()=>c,z:()=>p});var a=s(1e3),i=s(4447),n=s(2061),l=s(4567),r=s(4201);const c=(0,l.iY)("text-field"),d=["type"],p=(0,n.qC)((0,a.yk)({mappings:i.Z}),a.e4,(0,a.dj)({proxyProps:["value","selectionStart"]}),a.Ae,(t=>class extends t{static get observedAttributes(){return d.concat(t.observedAttributes||[])}attributeChangedCallback(t,e,s){super.attributeChangeCallback?.(t,e,s),"type"===t&&this.baseElement._setType(s)}}))((0,a.DM)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${p.cssVarList.inputOutlineWidth}) + var(${p.cssVarList.inputOutlineOffset}));\n\t\t\t}\n\t\t\t${(0,r.bi)(p.cssVarList)}\n\t\t\t${(0,r.wm)("vaadin-text-field",p.cssVarList)}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:c}))},9357:(t,e,s)=>{s.r(e),s.d(e,{TextFieldClass:()=>a.z}),s(9789);var a=s(6417);customElements.define(a.f,a.z)}}]);
package/dist/umd/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,s){"object"==typeof exports&&"object"==typeof module?module.exports=s():"function"==typeof define&&define.amd?define([],s):"object"==typeof exports?exports.DescopeUI=s():e.DescopeUI=s()}(self,(()=>(()=>{var e,s,o,n={534:(e,s,o)=>{var n={"./boolean-fields/descope-boolean-field-internal/index.js":[6676,1e3,3878,769],"./boolean-fields/descope-checkbox/index.js":[3483,9545,1018,3208,422,8725,5767,9789,9515,1e3,4201,3878,769,4803,3726],"./boolean-fields/descope-switch-toggle/index.js":[9203,9545,1018,3208,422,8725,5767,9789,9515,1e3,4201,3878,769,4803,4483],"./descope-button/index.js":[2018,9545,5767,9211,4513,729,1e3,9662],"./descope-combo-box/index.js":[1294,9545,1018,3208,7824,9314,1e3,4201,9483],"./descope-container/index.js":[7107,1e3,7317],"./descope-date-picker/index.js":[2552,9545,1018,3208,5767,9211,4513,7824,541,1e3,8017],"./descope-divider/index.js":[6162,1e3,2528,4178],"./descope-email-field/index.js":[1272,9545,1018,3208,422,8725,9437,1e3,4201,4447,9760],"./descope-image/index.js":[8278,1e3,6772],"./descope-link/index.js":[5846,1e3,2528,58],"./descope-loader-linear/index.js":[7845,1e3,6453],"./descope-loader-radial/index.js":[2797,1e3,3072],"./descope-logo/index.js":[1034,1e3,3585,1984],"./descope-new-password/descope-new-password-internal/index.js":[1545,1e3,4201,3878,2481,1842],"./descope-new-password/index.js":[8974,9545,1018,3208,422,8725,5767,9789,9211,7056,1e3,4201,3878,4447,2934,2481,1842,8106,7055],"./descope-number-field/index.js":[6916,9545,1018,3208,422,5806,1e3,4201,4447,2142],"./descope-passcode/descope-passcode-internal/index.js":[4775,1e3,3878,1841],"./descope-passcode/index.js":[4919,9545,1018,3208,422,8725,9789,1e3,4201,3878,4447,2934,1841,939],"./descope-password/index.js":[9279,9545,1018,3208,422,8725,5767,9211,7056,1e3,4201,2481,8106],"./descope-recaptcha/index.js":[8164,1e3,964],"./descope-single-select/descope-select-item/index.js":[6982,9545,5767,9211,4513,729,1e3,9662,8798],"./descope-single-select/descope-single-select-internal/index.js":[2909,9545,5767,9211,4513,729,1e3,3878,9662,7979],"./descope-single-select/index.js":[2705,9545,5767,9211,4513,729,1e3,4201,3878,9662,7979,4982],"./descope-text-area/index.js":[1962,9545,1018,422,7101,1e3,4201,3322],"./descope-text-field/index.js":[9357,9545,1018,3208,422,8725,9789,1e3,4201,4447,2934],"./descope-text/index.js":[1876,1e3,2528],"./descope-totp-image/index.js":[1331,1e3,3585,5364],"./descope-upload-file/index.js":[6667,9545,5767,9211,4513,729,1e3,3878,9662,5874],"./phone-fields/descope-phone-field/descope-phone-field-internal/index.js":[9240,9545,1018,3208,422,8725,9789,7824,9314,1e3,4201,3878,4447,2934,7262,9483,9288],"./phone-fields/descope-phone-field/index.js":[6581,9545,1018,3208,422,8725,9789,7824,9314,1e3,4201,3878,4447,2934,7262,9483,9288,9806],"./phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js":[3067,9545,1018,3208,422,8725,9789,1e3,4201,3878,4447,2934,7262,4981],"./phone-fields/descope-phone-input-box-field/index.js":[9423,9545,1018,3208,422,8725,9789,7824,9314,1e3,4201,3878,4447,2934,7262,9483,4981,5119]};function d(e){if(!o.o(n,e))return Promise.resolve().then((()=>{var s=new Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}));var s=n[e],d=s[0];return Promise.all(s.slice(1).map(o.e)).then((()=>o(d)))}d.keys=()=>Object.keys(n),d.id=534,e.exports=d},5561:(e,s,o)=>{"use strict";o.r(s),o.d(s,{componentsThemeManager:()=>n});const n=new class{static mountOnPropName="DescopeThemeManager";#e={};#s="light";#o=new Set;#n(){this.#o.forEach((e=>e?.()))}get currentThemeName(){return this.#s}set currentThemeName(e){this.#s=e,this.#n()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#o.add(e),()=>{this.#o.delete(e)}}set themes(e){this.#e=e,this.#n()}}},7507:(e,s,o)=>{const{componentsThemeManager:n}=o(5561),d=o(534);e.exports=d.keys().reduce(((e,s)=>{const o=s.replace(/.*?([^\/]+)\/index\.js$/,"$1");return o.endsWith("-internal")||(e[o]=()=>d(s)),e}),{}),e.exports.componentsThemeManager=n}},d={};function i(e){var s=d[e];if(void 0!==s)return s.exports;var o=d[e]={exports:{}};return n[e](o,o.exports,i),o.exports}i.m=n,e=[],i.O=(s,o,n,d)=>{if(!o){var t=1/0;for(a=0;a<e.length;a++){for(var[o,n,d]=e[a],r=!0,c=0;c<o.length;c++)(!1&d||t>=d)&&Object.keys(i.O).every((e=>i.O[e](o[c])))?o.splice(c--,1):(r=!1,d<t&&(t=d));if(r){e.splice(a--,1);var p=n();void 0!==p&&(s=p)}}return s}d=d||0;for(var a=e.length;a>0&&e[a-1][2]>d;a--)e[a]=e[a-1];e[a]=[o,n,d]},i.F={},i.E=e=>{Object.keys(i.F).map((s=>{i.F[s](e)}))},i.d=(e,s)=>{for(var o in s)i.o(s,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((s,o)=>(i.f[o](e,s),s)),[])),i.u=e=>(({58:"descope-link-index-js",769:"boolean-fields-descope-boolean-field-internal-index-js",939:"descope-passcode-index-js",964:"descope-recaptcha-index-js",1841:"descope-passcode-descope-passcode-internal-index-js",1842:"descope-new-password-descope-new-password-internal-index-js",1984:"descope-logo-index-js",2142:"descope-number-field-index-js",2528:"descope-text-index-js",2934:"descope-text-field-index-js",3072:"descope-loader-radial-index-js",3322:"descope-text-area-index-js",3726:"boolean-fields-descope-checkbox-index-js",4178:"descope-divider-index-js",4483:"boolean-fields-descope-switch-toggle-index-js",4981:"phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js",4982:"descope-single-select-index-js",5119:"phone-fields-descope-phone-input-box-field-index-js",5364:"descope-totp-image-index-js",5874:"descope-upload-file-index-js",6453:"descope-loader-linear-index-js",6772:"descope-image-index-js",7055:"descope-new-password-index-js",7317:"descope-container-index-js",7979:"descope-single-select-descope-single-select-internal-index-js",8017:"descope-date-picker-index-js",8106:"descope-password-index-js",8798:"descope-single-select-descope-select-item-index-js",9288:"phone-fields-descope-phone-field-descope-phone-field-internal-index-js",9483:"descope-combo-box-index-js",9662:"descope-button-index-js",9760:"descope-email-field-index-js",9806:"phone-fields-descope-phone-field-index-js"}[e]||e)+".js"),i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),s={},o="DescopeUI:",i.l=(e,n,d,t)=>{if(s[e])s[e].push(n);else{var r,c;if(void 0!==d)for(var p=document.getElementsByTagName("script"),a=0;a<p.length;a++){var l=p[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==o+d){r=l;break}}r||(c=!0,(r=document.createElement("script")).charset="utf-8",r.timeout=120,i.nc&&r.setAttribute("nonce",i.nc),r.setAttribute("data-webpack",o+d),r.src=e),s[e]=[n];var u=(o,n)=>{r.onerror=r.onload=null,clearTimeout(f);var d=s[e];if(delete s[e],r.parentNode&&r.parentNode.removeChild(r),d&&d.forEach((e=>e(n))),o)return o(n)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=u.bind(null,r.onerror),r.onload=u.bind(null,r.onload),c&&document.head.appendChild(r)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var s=i.g.document;if(!e&&s&&(s.currentScript&&(e=s.currentScript.src),!e)){var o=s.getElementsByTagName("script");o.length&&(e=o[o.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={4826:0};i.f.j=(s,o)=>{var n=i.o(e,s)?e[s]:void 0;if(0!==n)if(n)o.push(n[2]);else{var d=new Promise(((o,d)=>n=e[s]=[o,d]));o.push(n[2]=d);var t=i.p+i.u(s),r=new Error;i.l(t,(o=>{if(i.o(e,s)&&(0!==(n=e[s])&&(e[s]=void 0),n)){var d=o&&("load"===o.type?"missing":o.type),t=o&&o.target&&o.target.src;r.message="Loading chunk "+s+" failed.\n("+d+": "+t+")",r.name="ChunkLoadError",r.type=d,r.request=t,n[1](r)}}),"chunk-"+s,s)}},i.F.j=s=>{if(!i.o(e,s)||void 0===e[s]){e[s]=null;var o=document.createElement("link");i.nc&&o.setAttribute("nonce",i.nc),o.rel="prefetch",o.as="script",o.href=i.p+i.u(s),document.head.appendChild(o)}},i.O.j=s=>0===e[s];var s=(s,o)=>{var n,d,[t,r,c]=o,p=0;if(t.some((s=>0!==e[s]))){for(n in r)i.o(r,n)&&(i.m[n]=r[n]);if(c)var a=c(i)}for(s&&s(o);p<t.length;p++)d=t[p],i.o(e,d)&&e[d]&&e[d][0](),e[d]=0;return i.O(a)},o=self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[];o.forEach(s.bind(null,0)),o.push=s.bind(null,o.push.bind(o))})(),i.O(0,[4826],(()=>{[1e3,3878,769,9545,1018,3208,422,8725,5767,9789,9515,4201,4803,3726,4483,9211,4513,729,9662,7824,9314,9483,7317,541,8017,2528,4178,9437,4447,9760,6772,58,6453,3072,3585,1984,2481,1842,7056,2934,8106,7055,5806,2142,1841,939,964,8798,7979,4982,7101,3322,5364,5874,7262,9288,9806,4981,5119].map(i.E)}),5);var t=i(7507);return i.O(t)})()));
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,n,s={534:(e,o,n)=>{var s={"./boolean-fields/descope-boolean-field-internal/index.js":[6676,1e3,3878,769],"./boolean-fields/descope-checkbox/index.js":[3483,9545,1018,3208,422,8725,5767,9789,9515,1e3,4201,3878,769,4803,3726],"./boolean-fields/descope-switch-toggle/index.js":[9203,9545,1018,3208,422,8725,5767,9789,9515,1e3,4201,3878,769,4803,4483],"./descope-button-selection-group/descope-button-selection-group-internal/index.js":[8460,9545,5767,9211,4513,729,1e3,3878,9662,1348],"./descope-button-selection-group/descope-button-selection-group-item/index.js":[7901,9545,5767,9211,4513,729,1e3,9662,206],"./descope-button-selection-group/index.js":[8086,9545,5767,9211,4513,729,1e3,4201,3878,9662,1348,6699],"./descope-button/index.js":[2018,9545,5767,9211,4513,729,1e3,9662],"./descope-combo-box/index.js":[1294,9545,1018,3208,7824,9314,1e3,4201,9483],"./descope-container/index.js":[7107,1e3,7317],"./descope-date-picker/index.js":[2552,9545,1018,3208,5767,9211,4513,7824,541,1e3,8017],"./descope-divider/index.js":[6162,1e3,2528,4178],"./descope-email-field/index.js":[1272,9545,1018,3208,422,8725,9437,1e3,4201,4447,9760],"./descope-image/index.js":[8278,1e3,6772],"./descope-link/index.js":[5846,1e3,2528,58],"./descope-loader-linear/index.js":[7845,1e3,6453],"./descope-loader-radial/index.js":[2797,1e3,3072],"./descope-logo/index.js":[1034,1e3,3585,1984],"./descope-new-password/descope-new-password-internal/index.js":[1545,1e3,4201,3878,2481,1842],"./descope-new-password/index.js":[8974,9545,1018,3208,422,8725,5767,9789,9211,7056,1e3,4201,3878,4447,2934,2481,1842,8106,7055],"./descope-number-field/index.js":[6916,9545,1018,3208,422,5806,1e3,4201,4447,2142],"./descope-passcode/descope-passcode-internal/index.js":[4775,1e3,3878,1841],"./descope-passcode/index.js":[4919,9545,1018,3208,422,8725,9789,1e3,4201,3878,4447,2934,1841,939],"./descope-password/index.js":[9279,9545,1018,3208,422,8725,5767,9211,7056,1e3,4201,2481,8106],"./descope-recaptcha/index.js":[8164,1e3,964],"./descope-text-area/index.js":[1962,9545,1018,422,7101,1e3,4201,3322],"./descope-text-field/index.js":[9357,9545,1018,3208,422,8725,9789,1e3,4201,4447,2934],"./descope-text/index.js":[1876,1e3,2528],"./descope-totp-image/index.js":[1331,1e3,3585,5364],"./descope-upload-file/index.js":[6667,9545,5767,9211,4513,729,1e3,3878,9662,5874],"./phone-fields/descope-phone-field/descope-phone-field-internal/index.js":[9240,9545,1018,3208,422,8725,9789,7824,9314,1e3,4201,3878,4447,2934,7262,9483,9288],"./phone-fields/descope-phone-field/index.js":[6581,9545,1018,3208,422,8725,9789,7824,9314,1e3,4201,3878,4447,2934,7262,9483,9288,9806],"./phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js":[3067,9545,1018,3208,422,8725,9789,1e3,4201,3878,4447,2934,7262,4981],"./phone-fields/descope-phone-input-box-field/index.js":[9423,9545,1018,3208,422,8725,9789,7824,9314,1e3,4201,3878,4447,2934,7262,9483,4981,5119]};function t(e){if(!n.o(s,e))return Promise.resolve().then((()=>{var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}));var o=s[e],t=o[0];return Promise.all(o.slice(1).map(n.e)).then((()=>n(t)))}t.keys=()=>Object.keys(s),t.id=534,e.exports=t},5561:(e,o,n)=>{"use strict";n.r(o),n.d(o,{componentsThemeManager:()=>s});const s=new class{static mountOnPropName="DescopeThemeManager";#e={};#o="light";#n=new Set;#s(){this.#n.forEach((e=>e?.()))}get currentThemeName(){return this.#o}set currentThemeName(e){this.#o=e,this.#s()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#n.add(e),()=>{this.#n.delete(e)}}set themes(e){this.#e=e,this.#s()}}},7507:(e,o,n)=>{const{componentsThemeManager:s}=n(5561),t=n(534);e.exports=t.keys().reduce(((e,o)=>{const n=o.replace(/.*?([^\/]+)\/index\.js$/,"$1");return n.endsWith("-internal")||(e[n]=()=>t(o)),e}),{}),e.exports.componentsThemeManager=s}},t={};function d(e){var o=t[e];if(void 0!==o)return o.exports;var n=t[e]={exports:{}};return s[e](n,n.exports,d),n.exports}d.m=s,e=[],d.O=(o,n,s,t)=>{if(!n){var i=1/0;for(a=0;a<e.length;a++){for(var[n,s,t]=e[a],r=!0,c=0;c<n.length;c++)(!1&t||i>=t)&&Object.keys(d.O).every((e=>d.O[e](n[c])))?n.splice(c--,1):(r=!1,t<i&&(i=t));if(r){e.splice(a--,1);var p=s();void 0!==p&&(o=p)}}return o}t=t||0;for(var a=e.length;a>0&&e[a-1][2]>t;a--)e[a]=e[a-1];e[a]=[n,s,t]},d.F={},d.E=e=>{Object.keys(d.F).map((o=>{d.F[o](e)}))},d.d=(e,o)=>{for(var n in o)d.o(o,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((o,n)=>(d.f[n](e,o),o)),[])),d.u=e=>(({58:"descope-link-index-js",206:"descope-button-selection-group-descope-button-selection-group-item-index-js",769:"boolean-fields-descope-boolean-field-internal-index-js",939:"descope-passcode-index-js",964:"descope-recaptcha-index-js",1348:"descope-button-selection-group-descope-button-selection-group-internal-index-js",1841:"descope-passcode-descope-passcode-internal-index-js",1842:"descope-new-password-descope-new-password-internal-index-js",1984:"descope-logo-index-js",2142:"descope-number-field-index-js",2528:"descope-text-index-js",2934:"descope-text-field-index-js",3072:"descope-loader-radial-index-js",3322:"descope-text-area-index-js",3726:"boolean-fields-descope-checkbox-index-js",4178:"descope-divider-index-js",4483:"boolean-fields-descope-switch-toggle-index-js",4981:"phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js",5119:"phone-fields-descope-phone-input-box-field-index-js",5364:"descope-totp-image-index-js",5874:"descope-upload-file-index-js",6453:"descope-loader-linear-index-js",6699:"descope-button-selection-group-index-js",6772:"descope-image-index-js",7055:"descope-new-password-index-js",7317:"descope-container-index-js",8017:"descope-date-picker-index-js",8106:"descope-password-index-js",9288:"phone-fields-descope-phone-field-descope-phone-field-internal-index-js",9483:"descope-combo-box-index-js",9662:"descope-button-index-js",9760:"descope-email-field-index-js",9806:"phone-fields-descope-phone-field-index-js"}[e]||e)+".js"),d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),o={},n="DescopeUI:",d.l=(e,s,t,i)=>{if(o[e])o[e].push(s);else{var r,c;if(void 0!==t)for(var p=document.getElementsByTagName("script"),a=0;a<p.length;a++){var l=p[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==n+t){r=l;break}}r||(c=!0,(r=document.createElement("script")).charset="utf-8",r.timeout=120,d.nc&&r.setAttribute("nonce",d.nc),r.setAttribute("data-webpack",n+t),r.src=e),o[e]=[s];var u=(n,s)=>{r.onerror=r.onload=null,clearTimeout(f);var t=o[e];if(delete o[e],r.parentNode&&r.parentNode.removeChild(r),t&&t.forEach((e=>e(s))),n)return n(s)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=u.bind(null,r.onerror),r.onload=u.bind(null,r.onload),c&&document.head.appendChild(r)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;d.g.importScripts&&(e=d.g.location+"");var o=d.g.document;if(!e&&o&&(o.currentScript&&(e=o.currentScript.src),!e)){var n=o.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),d.p=e})(),(()=>{var e={4826:0};d.f.j=(o,n)=>{var s=d.o(e,o)?e[o]:void 0;if(0!==s)if(s)n.push(s[2]);else{var t=new Promise(((n,t)=>s=e[o]=[n,t]));n.push(s[2]=t);var i=d.p+d.u(o),r=new Error;d.l(i,(n=>{if(d.o(e,o)&&(0!==(s=e[o])&&(e[o]=void 0),s)){var t=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;r.message="Loading chunk "+o+" failed.\n("+t+": "+i+")",r.name="ChunkLoadError",r.type=t,r.request=i,s[1](r)}}),"chunk-"+o,o)}},d.F.j=o=>{if(!d.o(e,o)||void 0===e[o]){e[o]=null;var n=document.createElement("link");d.nc&&n.setAttribute("nonce",d.nc),n.rel="prefetch",n.as="script",n.href=d.p+d.u(o),document.head.appendChild(n)}},d.O.j=o=>0===e[o];var o=(o,n)=>{var s,t,[i,r,c]=n,p=0;if(i.some((o=>0!==e[o]))){for(s in r)d.o(r,s)&&(d.m[s]=r[s]);if(c)var a=c(d)}for(o&&o(n);p<i.length;p++)t=i[p],d.o(e,t)&&e[t]&&e[t][0](),e[t]=0;return d.O(a)},n=self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[];n.forEach(o.bind(null,0)),n.push=o.bind(null,n.push.bind(n))})(),d.O(0,[4826],(()=>{[1e3,3878,769,9545,1018,3208,422,8725,5767,9789,9515,4201,4803,3726,4483,9211,4513,729,9662,1348,206,6699,7824,9314,9483,7317,541,8017,2528,4178,9437,4447,9760,6772,58,6453,3072,3585,1984,2481,1842,7056,2934,8106,7055,5806,2142,1841,939,964,7101,3322,5364,5874,7262,9288,9806,4981,5119].map(d.E)}),5);var i=d(7507);return d.O(i)})()));
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9288],{2246:(t,e,n)=>{n.d(e,{f:()=>r,Z:()=>m});var i=n(3878),s=n(4567),o=n(7262);const u=({code:t,dialCode:e,name:n})=>`\n\t<div\n\t\tstyle="display:flex; flex-direction: column;"\n\t\tdata-id="${t}"\n\t\tdata-name="${t} ${e} ${n}"\n\t\tdata-dial-code="${e}"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src="${(t=>`https://cdn.jsdelivr.net/npm/svg-country-flags@1.2.10/svg/${t.toLowerCase()}.svg`)(t)}" width="20"/>\n\t\t\t</span>\n\t\t\t<span>${n}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${t}</span>\n\t\t\t<span>${e}</span>\n\t\t</div>\n\t</div>\n`,r=(0,s.iY)("phone-field-internal"),d=["disabled","size","bordered","invalid","readonly"],a=["country-input-placeholder","default-code","restrict-countries"],p=["phone-input-placeholder","maxlength"],c={"country-input-placeholder":"placeholder","phone-input-placeholder":"placeholder"},l=[].concat(d,a,p),h=(0,i.P)({componentName:r,baseSelector:"div"}),m=class extends h{static get observedAttributes(){return[].concat(h.observedAttributes||[],l)}constructor(){super(),this.innerHTML=`\n <div>\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n >\n ${o.Z.map((t=>u(t))).join("")}\n </descope-combo-box>\n <div class="separator"></div>\n <descope-text-field type="tel"></descope-text-field>\n </div>\n `,this.countryCodeInput=this.querySelector("descope-combo-box"),this.phoneNumberInput=this.querySelector("descope-text-field"),this.inputs=[this.countryCodeInput,this.phoneNumberInput]}get value(){return this.phoneNumberValue?`${this.countryCodeInput.value}-${this.phoneNumberInput.value}`:""}set value(t){const[e="",n=""]=t.split("-"),i=this.getCountryByDialCode(e);i&&(this.countryCodeInput.selectedItem=i),this.phoneNumberInput.value=n}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 t=this.countryCodeInput.value,e=this.phoneNumberInput.value,n=!t||!e,i=this.phoneNumberInput.value?.length&&this.phoneNumberInput.value.length<this.minLength;return this.isRequired&&n?{valueMissing:!0}:i?{tooShort:!0}:e&&!t?{valueMissing:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[0].focus()})),super.init?.(),this.initInputs(),this.setComboBoxDescriptor()}getRestrictedCountries(){return this.getAttribute("restrict-countries")?.split(",")||[]}getCountryByDialCode(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-dial-code")===t))}getCountryByCodeId(t){return this.countryCodeInput.items?.find((e=>e["data-id"]===t))?.["data-name"]}updateCountryCodeItems(t){const e=t.length?o.Z.filter((e=>t.includes(e.code))):o.Z;this.querySelector("descope-combo-box").innerHTML=e.map((t=>u(t))).join("")}handleDefaultCountryCode(t){if(!this.countryCodeInput.value){const e=this.getCountryByCodeId(t);e&&setTimeout((()=>{this.countryCodeInput.selectedItem=e}))}}setComboBoxDescriptor(){const t=this.countryCodeInput,e=t.shadowRoot.querySelector("input"),n=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value");Object.defineProperties(e,{value:{...n,set(e){if(!t.items?.length)return;const[,i]=e.split(" ");e!==this.value&&n.set.call(this,i||"")}}})}initInputs(){this.phoneNumberInput.addEventListener("input",(t=>{const e=/^\d$/,n=t.target.value.split("").filter((t=>e.test(t))).join("");t.target.value=n})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),e!==n){if("default-code"===t&&n)this.handleDefaultCountryCode(n);else if(l.includes(t)){const e=c[t]||t;d.includes(t)?this.inputs.forEach((t=>t.setAttribute(e,n))):a.includes(t)?this.countryCodeInput.setAttribute(e,n):p.includes(t)&&this.phoneNumberInput.setAttribute(e,n)}"restrict-countries"===t&&this.updateCountryCodeItems(this.getRestrictedCountries())}}}},9240:(t,e,n)=>{n.r(e),n(1294),n(9357);var i=n(2246);customElements.define(i.f,i.Z)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9288],{2246:(t,e,n)=>{n.d(e,{f:()=>r,Z:()=>b});var i=n(3878),s=n(4567),o=n(7262);const u=({code:t,dialCode:e,name:n})=>`\n\t<div\n\t\tstyle="display:flex; flex-direction: column;"\n\t\tdata-id="${e}"\n\t\tdata-name="${t} ${e} ${n}"\n\t\tdata-country-code="${t}"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src="${(t=>`https://cdn.jsdelivr.net/npm/svg-country-flags@1.2.10/svg/${t.toLowerCase()}.svg`)(t)}" width="20"/>\n\t\t\t</span>\n\t\t\t<span>${n}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${t}</span>\n\t\t\t<span>${e}</span>\n\t\t</div>\n\t</div>\n`,r=(0,s.iY)("phone-field-internal"),d=["disabled","size","bordered","invalid","readonly"],a=["country-input-placeholder","default-code","restrict-countries"],c=["phone-input-placeholder","maxlength"],p={"country-input-placeholder":"placeholder","phone-input-placeholder":"placeholder"},l=[].concat(d,a,c),h=(0,i.P)({componentName:r,baseSelector:"div"}),b=class extends h{static get observedAttributes(){return[].concat(h.observedAttributes||[],l)}constructor(){super(),this.innerHTML=`\n <div>\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n >\n ${o.Z.map((t=>u(t))).join("")}\n </descope-combo-box>\n <div class="separator"></div>\n <descope-text-field type="tel"></descope-text-field>\n </div>\n `,this.countryCodeInput=this.querySelector("descope-combo-box"),this.phoneNumberInput=this.querySelector("descope-text-field"),this.inputs=[this.countryCodeInput,this.phoneNumberInput]}get value(){return this.phoneNumberValue?`${this.countryCodeInput.value}-${this.phoneNumberInput.value}`:""}set value(t){const[e="",n=""]=t.split("-"),i=this.getCountryByDialCode(e);i&&(this.countryCodeInput.selectedItem=i),this.phoneNumberInput.value=n}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 t=this.countryCodeInput.value,e=this.phoneNumberInput.value,n=!t||!e,i=this.phoneNumberInput.value?.length&&this.phoneNumberInput.value.length<this.minLength;return this.isRequired&&n?{valueMissing:!0}:i?{tooShort:!0}:e&&!t?{valueMissing:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[0].focus()})),super.init?.(),this.initInputs(),this.setComboBoxDescriptor()}getRestrictedCountries(){return this.getAttribute("restrict-countries")?.split(",")||[]}getCountryByDialCode(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-country-code")===t))}getCountryByCodeId(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-country-code")===t))}updateCountryCodeItems(t){const e=t.length?o.Z.filter((e=>t.includes(e.code))):o.Z;this.querySelector("descope-combo-box").innerHTML=e.map((t=>u(t))).join("")}handleDefaultCountryCode(t){if(!this.countryCodeInput.value){const e=this.getCountryByCodeId(t);e&&setTimeout((()=>{this.countryCodeInput.selectedItem=e}))}}setComboBoxDescriptor(){const t=this.countryCodeInput,e=t.shadowRoot.querySelector("input"),n=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value");Object.defineProperties(e,{value:{...n,set(e){if(!t.items?.length)return;const[,i]=e.split(" ");e!==this.value&&n.set.call(this,i||"")}}})}initInputs(){this.phoneNumberInput.addEventListener("input",(t=>{const e=/^\d$/,n=t.target.value.split("").filter((t=>e.test(t))).join("");t.target.value=n})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),e!==n){if("default-code"===t&&n)this.handleDefaultCountryCode(n);else if(l.includes(t)){const e=p[t]||t;d.includes(t)?this.inputs.forEach((t=>t.setAttribute(e,n))):a.includes(t)?this.countryCodeInput.setAttribute(e,n):c.includes(t)&&this.phoneNumberInput.setAttribute(e,n)}"restrict-countries"===t&&this.updateCountryCodeItems(this.getRestrictedCountries())}}}},9240:(t,e,n)=>{n.r(e),n(1294),n(9357);var i=n(2246);customElements.define(i.f,i.Z)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9806],{6581:(t,e,n)=>{n.r(e),n.d(e,{PhoneFieldClass:()=>$}),n(9240),n(1294),n(9357);var o=n(2246),r=n(4567),i=n(2061),p=n(1e3),d=n(6417),l=n(4049),a=n(7262),s=n(4201);const u=d.z.cssVarList,c=l.H.cssVarList,h=(0,r.iY)("phone-field"),{host:y,label:f,requiredIndicator:b,inputField:x,countryCodeInput:m,phoneInput:g,separator:w,errorMessage:C,helperText:v}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:"::part(input-field)"},phoneInput:{selector:()=>"descope-text-field"},countryCodeInput:{selector:()=>"descope-combo-box"},separator:{selector:"descope-phone-field-internal .separator"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},$=(0,i.qC)((0,p.yk)({mappings:{fontSize:[y,x,{selector:d.z.componentName,property:d.z.cssVarList.fontSize},{selector:l.H.componentName,property:l.H.cssVarList.fontSize}],fontFamily:[f,C,v,{...m,property:l.H.cssVarList.overlay.fontFamily}],hostWidth:[{...y,property:"width"},{...g,property:"width"},{...m,property:"--vaadin-combo-box-overlay-width"}],inputBorderStyle:[{...x,property:"border-style"},{...w,property:"border-left-style"}],inputBorderWidth:[{...x,property:"border-width"},{...w,property:"border-left-width"}],inputBorderColor:[{...x,property:"border-color"},{...w,property:"border-left-color"}],inputBorderRadius:{...x,property:"border-radius"},countryCodeInputWidth:{...m,property:c.hostWidth},countryCodeDropdownWidth:{...m,property:"--vaadin-combo-box-overlay-width"},phoneInputWidth:{...g,property:"width"},labelTextColor:[{...f,property:"color"},{...b,property:"color"}],labelRequiredIndicator:{...b,property:"content"},errorMessageTextColor:{...C,property:"color"},inputValueTextColor:[{...g,property:u.inputValueTextColor},{...m,property:c.inputValueTextColor}],inputPlaceholderTextColor:{...g,property:u.inputPlaceholderColor},overlayItemBackgroundColor:{selector:"descope-combo-box",property:c.overlayItemBackgroundColor},inputOutlineStyle:{...x,property:"outline-style"},inputOutlineColor:{...x,property:"outline-color"},inputOutlineWidth:{...x,property:"outline-width"},inputOutlineOffset:{...x,property:"outline-offset"}}}),p.e4,p.dj,(t=>class extends t{static get CountryCodes(){return a.Z}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t\t<${o.f}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.f}>\n \t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.f),(0,r.oP)(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","bordered","invalid","minlength","maxlength","default-code","country-input-placeholder","phone-input-placeholder","disabled","restrict-countries"]})}}))((0,p.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 15em;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\t${(0,s.bi)($.cssVarList)}\n\t\t\t${(0,s.Pd)("vaadin-text-field")}\n\t\t\t${(0,s.B)("vaadin-text-field")}\n\t\t\t${(0,s.DY)()}\n\n\t\t\tdiv {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\tvaadin-text-field {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-text-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tpadding: 0;\n\t\t\t\tmin-height: 0;\n\t\t\t\tbackground: transparent;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\tdescope-phone-field-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\tmin-height: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\tdescope-phone-field-internal > div {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\tdescope-phone-field-internal .separator {\n\t\t\t\tflex: 0;\n\t\t\t\tborder: none;\n\t\t\t}\n\t\t\tdescope-combo-box {\n\t\t\t\tflex-shrink: 0;\n\t\t\t\tmin-width: 5.75em;\n\t\t\t\t${c.inputOutlineWidth}: 0;\n\t\t\t\t${c.inputOutlineOffset}: 0;\n\t\t\t\t${c.inputBorderWidth}: 0;\n\t\t\t\t${c.inputBorderRadius}: 0;\n\t\t\t}\n\t\t\tdescope-text-field {\n\t\t\t\tflex-grow: 1;\n\t\t\t\t${u.inputOutlineWidth}: 0;\n\t\t\t\t${u.inputOutlineOffset}: 0;\n\t\t\t\t${u.inputBorderWidth}: 0;\n\t\t\t\t${u.inputBorderRadius}: 0;\n\t\t\t}\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t\tvaadin-text-field::part(input-field)::after {\n\t\t\t\tborder: none;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:h}));customElements.define(h,$)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9806],{6581:(t,e,n)=>{n.r(e),n.d(e,{PhoneFieldClass:()=>$}),n(9240),n(1294),n(9357);var o=n(2246),r=n(4567),i=n(2061),p=n(1e3),d=n(6417),l=n(4049),a=n(7262),s=n(4201);const u=d.z.cssVarList,c=l.H.cssVarList,h=(0,r.iY)("phone-field"),{host:y,label:f,requiredIndicator:b,inputField:x,countryCodeInput:m,phoneInput:g,separator:w,errorMessage:v,helperText:C}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:"::part(input-field)"},phoneInput:{selector:()=>"descope-text-field"},countryCodeInput:{selector:()=>"descope-combo-box"},separator:{selector:"descope-phone-field-internal .separator"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},$=(0,i.qC)((0,p.yk)({mappings:{fontSize:[y,x,{selector:d.z.componentName,property:d.z.cssVarList.fontSize},{selector:l.H.componentName,property:l.H.cssVarList.fontSize}],fontFamily:[f,v,C,{...m,property:l.H.cssVarList.overlay.fontFamily}],hostWidth:[{...y,property:"width"},{...g,property:"width"},{...m,property:"--vaadin-combo-box-overlay-width"}],inputBorderStyle:[{...x,property:"border-style"},{...w,property:"border-left-style"}],inputBorderWidth:[{...x,property:"border-width"},{...w,property:"border-left-width"}],inputBorderColor:[{...x,property:"border-color"},{...w,property:"border-left-color"}],inputBorderRadius:{...x,property:"border-radius"},countryCodeInputWidth:{...m,property:c.hostWidth},countryCodeDropdownWidth:{...m,property:"--vaadin-combo-box-overlay-width"},phoneInputWidth:{...g,property:"width"},labelTextColor:[{...f,property:"color"},{...b,property:"color"}],labelRequiredIndicator:{...b,property:"content"},errorMessageTextColor:{...v,property:"color"},inputValueTextColor:[{...g,property:u.inputValueTextColor},{...m,property:c.inputValueTextColor}],inputPlaceholderTextColor:{...g,property:u.inputPlaceholderColor},overlayItemBackgroundColor:{selector:"descope-combo-box",property:c.overlayItemBackgroundColor},inputOutlineStyle:{...x,property:"outline-style"},inputOutlineColor:{...x,property:"outline-color"},inputOutlineWidth:{...x,property:"outline-width"},inputOutlineOffset:{...x,property:"outline-offset"}}}),p.e4,(0,p.dj)({proxyProps:["value","selectionStart"]}),(t=>class extends t{static get CountryCodes(){return a.Z}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t\t<${o.f}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.f}>\n \t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.f),(0,r.oP)(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","bordered","invalid","minlength","maxlength","default-code","country-input-placeholder","phone-input-placeholder","disabled","restrict-countries"]})}}))((0,p.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 15em;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\t${(0,s.bi)($.cssVarList)}\n\t\t\t${(0,s.Pd)("vaadin-text-field")}\n\t\t\t${(0,s.B)("vaadin-text-field")}\n\t\t\t${(0,s.DY)()}\n\n\t\t\tdiv {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\tvaadin-text-field {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-text-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tpadding: 0;\n\t\t\t\tmin-height: 0;\n\t\t\t\tbackground: transparent;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\tdescope-phone-field-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\tmin-height: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\tdescope-phone-field-internal > div {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\tdescope-phone-field-internal .separator {\n\t\t\t\tflex: 0;\n\t\t\t\tborder: none;\n\t\t\t}\n\t\t\tdescope-combo-box {\n\t\t\t\tflex-shrink: 0;\n\t\t\t\tmin-width: 5.75em;\n\t\t\t\t${c.inputOutlineWidth}: 0;\n\t\t\t\t${c.inputOutlineOffset}: 0;\n\t\t\t\t${c.inputBorderWidth}: 0;\n\t\t\t\t${c.inputBorderRadius}: 0;\n\t\t\t}\n\t\t\tdescope-text-field {\n\t\t\t\tflex-grow: 1;\n\t\t\t\t${u.inputOutlineWidth}: 0;\n\t\t\t\t${u.inputOutlineOffset}: 0;\n\t\t\t\t${u.inputBorderWidth}: 0;\n\t\t\t\t${u.inputBorderRadius}: 0;\n\t\t\t}\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t\tvaadin-text-field::part(input-field)::after {\n\t\t\t\tborder: none;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:h}));customElements.define(h,$)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[4981],{2565:(e,t,n)=>{n.d(t,{f:()=>s,Z:()=>o});var i=n(3878),u=n(4567),r=n(7262);const s=(0,u.iY)("phone-field-internal-input-box"),a=["disabled","size","bordered","invalid","readonly","phone-input-placeholder"],h={"phone-input-placeholder":"placeholder"},l=(0,i.P)({componentName:s,baseSelector:"div"}),o=class extends l{static get observedAttributes(){return[].concat(l.observedAttributes||[],a)}constructor(){super(),this.innerHTML='\n <div>\n <descope-text-field tabindex="1"></descope-text-field>\n </div>\n ',this.phoneNumberInput=this.querySelector("descope-text-field")}get defaultCountryCode(){return e=this.getAttribute("default-code"),r.Z.find((t=>t.code===e))?.dialCode;var e}get hasDefaultCode(){return!!this.getAttribute("default-code")}get value(){if(!this.phoneNumberValue)return"";if(this.hasDefaultCode){const e=new RegExp(`\\+?${parseInt(this.defaultCountryCode,10)}--?`);return`${this.defaultCountryCode}-${this.phoneNumberInput.value.replace(e,"")}`}return this.phoneNumberInput.value}set value(e){this.phoneNumberInput.value=e}get phoneNumberValue(){return this.phoneNumberInput.value}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}get maxLength(){return parseInt(this.getAttribute("maxlength"),10)||50}getValidity(){const e=this.value.replace(/\D/g,"");return this.isRequired&&!this.value?{valueMissing:!0}:e.length<this.minLength?{tooShort:!0}:e.length>this.maxLength?{tooLong:!0}:/^\+\d{1,4}-(?:\d-?){1,15}$/.test(this.value)?{}:{patternMismatch:!0}}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.phoneNumberInput.focus()})),super.init?.(),this.initInputs()}getCountryByDialCode(e){return this.countryCodeInput.items?.find((t=>t.getAttribute("data-dial-code")===e))}initInputs(){this.phoneNumberInput.addEventListener("input",(e=>{1===e.target.value.length&&"-"===e.target.value&&(e.target.value=""),e.target.value=e.target.value.replace(/(?!^)\+/g,"").replace("--","-").replace("+-","+");const t=/^[+\d-]+$/,n=e.target.value.split("").filter((e=>t.test(e))).join("");e.target.value=n})),this.handleFocusEventsDispatching([this.phoneNumberInput]),this.handleInputEventDispatching()}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),t!==n&&a.includes(e)){const t=h[e]||e;this.phoneNumberInput.setAttribute(t,n)}}}},3067:(e,t,n)=>{n.r(t),n(9357);var i=n(2565);customElements.define(i.f,i.Z)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[4981],{2565:(e,t,n)=>{n.d(t,{f:()=>s,Z:()=>o});var i=n(3878),u=n(4567),r=n(7262);const s=(0,u.iY)("phone-field-internal-input-box"),a=["disabled","size","bordered","invalid","readonly","phone-input-placeholder"],h={"phone-input-placeholder":"placeholder"},l=(0,i.P)({componentName:s,baseSelector:"div"}),o=class extends l{static get observedAttributes(){return[].concat(l.observedAttributes||[],a)}constructor(){super(),this.innerHTML='\n <div>\n <descope-text-field tabindex="1"></descope-text-field>\n </div>\n ',this.phoneNumberInput=this.querySelector("descope-text-field")}get defaultCountryCode(){return e=this.getAttribute("default-code"),r.Z.find((t=>t.code===e))?.dialCode;var e}get hasDefaultCode(){return!!this.getAttribute("default-code")}get value(){if(!this.phoneNumberValue)return"";if(this.hasDefaultCode){const e=new RegExp(`\\+?${parseInt(this.defaultCountryCode,10)}--?`);return`${this.defaultCountryCode}-${this.phoneNumberInput.value.replace(e,"")}`}return this.phoneNumberInput.value}set value(e){this.phoneNumberInput.value=e}get phoneNumberValue(){return this.phoneNumberInput.value}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}get maxLength(){return parseInt(this.getAttribute("maxlength"),10)||50}getValidity(){const e=this.value.replace(/\D/g,"");return this.isRequired&&!this.value?{valueMissing:!0}:e.length<this.minLength?{tooShort:!0}:e.length>this.maxLength?{tooLong:!0}:/^\+\d{1,4}-(?:\d-?){1,15}$/.test(this.value)?{}:{patternMismatch:!0}}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.phoneNumberInput.focus()})),super.init?.(),this.initInputs()}getCountryByDialCode(e){return this.countryCodeInput.items?.find((t=>t.getAttribute("data-country-code")===e))}initInputs(){this.phoneNumberInput.addEventListener("input",(e=>{1===e.target.value.length&&"-"===e.target.value&&(e.target.value=""),e.target.value=e.target.value.replace(/(?!^)\+/g,"").replace("--","-").replace("+-","+");const t=/^[+\d-]+$/,n=e.target.value.split("").filter((e=>t.test(e))).join("");e.target.value=n})),this.handleFocusEventsDispatching([this.phoneNumberInput]),this.handleInputEventDispatching()}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),t!==n&&a.includes(e)){const t=h[e]||e;this.phoneNumberInput.setAttribute(t,n)}}}},3067:(e,t,n)=>{n.r(t),n(9357);var i=n(2565);customElements.define(i.f,i.Z)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[5119],{9423:(e,t,n)=>{n.r(t),n.d(t,{PhoneFieldInputBoxClass:()=>g}),n(3067),n(1294),n(9357);var i=n(2565),o=n(4567),r=n(2061),d=n(1e3),l=n(6417),p=n(7262),a=n(4201);const s=l.z.cssVarList,u=(0,o.iY)("phone-input-box-field"),{host:h,label:c,requiredIndicator:f,inputField:x,phoneInput:b,errorMessage:y,helperText:m}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:"::part(input-field)"},phoneInput:{selector:()=>"descope-text-field"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},g=(0,r.qC)((0,d.yk)({mappings:{fontSize:[h,x,{selector:l.z.componentName,property:l.z.cssVarList.fontSize}],fontFamily:[c,y,m],hostWidth:{...h,property:"width"},hostMinWidth:{...h,property:"min-width"},inputBorderStyle:{...x,property:"border-style"},inputBorderWidth:{...x,property:"border-width"},inputBorderColor:{...x,property:"border-color"},inputBorderRadius:{...x,property:"border-radius"},labelTextColor:[{...c,property:"color"},{...f,property:"color"}],labelRequiredIndicator:{...f,property:"content"},errorMessageTextColor:{...y,property:"color"},inputValueTextColor:{...b,property:s.inputValueTextColor},inputPlaceholderTextColor:{...b,property:s.inputPlaceholderColor},inputOutlineStyle:{...x,property:"outline-style"},inputOutlineColor:{...x,property:"outline-color"},inputOutlineWidth:{...x,property:"outline-width"},inputOutlineOffset:{...x,property:"outline-offset"}}}),d.e4,d.dj,(e=>class extends e{static get CountryCodes(){return p.Z}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${i.f}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${i.f}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(i.f),(0,o.oP)(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","bordered","invalid","minlength","maxlength","default-code","disabled","phone-input-placeholder"]})}}))((0,d.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n :host {\n display: inline-flex;\n max-width: 100%;\n box-sizing: border-box;\n }\n ${(0,a.bi)(g.cssVarList)}\n ${(0,a.Pd)("vaadin-text-field")}\n ${(0,a.B)("vaadin-text-field")}\n ${(0,a.DY)()}\n\n vaadin-text-field {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n padding: 0;\n }\n vaadin-text-field[focus-ring]::part(input-field) {\n box-shadow: none;\n }\n vaadin-text-field::before {\n height: 0;\n }\n vaadin-text-field::part(input-field) {\n padding: 0;\n min-height: 0;\n background: transparent;\n overflow: hidden;\n -webkit-mask-image: none;\n }\n descope-phone-field-internal-input-box {\n -webkit-mask-image: none;\n padding: 0;\n min-height: 0;\n width: 100%;\n height: 100%;\n }\n descope-phone-field-internal-input-box > div {\n width: 100%;\n height: 100%;\n }\n descope-phone-field-internal-input-box .separator {\n flex: 0;\n border: none;\n }\n descope-text-field {\n flex-grow: 1;\n width: 100%;\n ${s.inputOutlineWidth}: 0;\n ${s.inputOutlineOffset}: 0;\n ${s.inputBorderWidth}: 0;\n ${s.inputBorderRadius}: 0;\n }\n vaadin-text-field[readonly] > input:placeholder-shown {\n opacity: 1;\n }\n vaadin-text-field::part(input-field)::after {\n border: none;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:u}));customElements.define(u,g)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[5119],{9423:(e,t,n)=>{n.r(t),n.d(t,{PhoneFieldInputBoxClass:()=>g}),n(3067),n(1294),n(9357);var i=n(2565),o=n(4567),r=n(2061),d=n(1e3),l=n(6417),p=n(7262),a=n(4201);const s=l.z.cssVarList,u=(0,o.iY)("phone-input-box-field"),{host:h,label:c,requiredIndicator:f,inputField:x,phoneInput:b,errorMessage:y,helperText:m}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:"::part(input-field)"},phoneInput:{selector:()=>"descope-text-field"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},g=(0,r.qC)((0,d.yk)({mappings:{fontSize:[h,x,{selector:l.z.componentName,property:l.z.cssVarList.fontSize}],fontFamily:[c,y,m],hostWidth:{...h,property:"width"},hostMinWidth:{...h,property:"min-width"},inputBorderStyle:{...x,property:"border-style"},inputBorderWidth:{...x,property:"border-width"},inputBorderColor:{...x,property:"border-color"},inputBorderRadius:{...x,property:"border-radius"},labelTextColor:[{...c,property:"color"},{...f,property:"color"}],labelRequiredIndicator:{...f,property:"content"},errorMessageTextColor:{...y,property:"color"},inputValueTextColor:{...b,property:s.inputValueTextColor},inputPlaceholderTextColor:{...b,property:s.inputPlaceholderColor},inputOutlineStyle:{...x,property:"outline-style"},inputOutlineColor:{...x,property:"outline-color"},inputOutlineWidth:{...x,property:"outline-width"},inputOutlineOffset:{...x,property:"outline-offset"}}}),d.e4,(0,d.dj)({proxyProps:["value","selectionStart"]}),(e=>class extends e{static get CountryCodes(){return p.Z}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${i.f}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${i.f}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(i.f),(0,o.oP)(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","bordered","invalid","minlength","maxlength","default-code","disabled","phone-input-placeholder"]})}}))((0,d.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n :host {\n display: inline-flex;\n max-width: 100%;\n box-sizing: border-box;\n }\n ${(0,a.bi)(g.cssVarList)}\n ${(0,a.Pd)("vaadin-text-field")}\n ${(0,a.B)("vaadin-text-field")}\n ${(0,a.DY)()}\n\n vaadin-text-field {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n padding: 0;\n }\n vaadin-text-field[focus-ring]::part(input-field) {\n box-shadow: none;\n }\n vaadin-text-field::before {\n height: 0;\n }\n vaadin-text-field::part(input-field) {\n padding: 0;\n min-height: 0;\n background: transparent;\n overflow: hidden;\n -webkit-mask-image: none;\n }\n descope-phone-field-internal-input-box {\n -webkit-mask-image: none;\n padding: 0;\n min-height: 0;\n width: 100%;\n height: 100%;\n }\n descope-phone-field-internal-input-box > div {\n width: 100%;\n height: 100%;\n }\n descope-phone-field-internal-input-box .separator {\n flex: 0;\n border: none;\n }\n descope-text-field {\n flex-grow: 1;\n width: 100%;\n ${s.inputOutlineWidth}: 0;\n ${s.inputOutlineOffset}: 0;\n ${s.inputBorderWidth}: 0;\n ${s.inputBorderRadius}: 0;\n }\n vaadin-text-field[readonly] > input:placeholder-shown {\n opacity: 1;\n }\n vaadin-text-field::part(input-field)::after {\n border: none;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:u}));customElements.define(u,g)}}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/web-components-ui",
3
- "version": "1.0.178",
3
+ "version": "1.0.180",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -15,11 +15,11 @@
15
15
  }
16
16
  },
17
17
  "scripts": {
18
- "test": "jest",
19
- "test:playwright": "playwright test",
20
- "test:playwright:updateSnapshots": "npm run test:playwright -- --update-snapshots",
18
+ "test:unit": "jest",
19
+ "test:pw": "playwright test",
20
+ "test:pw:updateSnapshots": "npm run test:pw -- --update-snapshots",
21
21
  "test:ui": "playwright test --ui",
22
- "test:ui:debug": "PWDEBUG=1 npm run test:playwright -- --update-snapshots",
22
+ "test:ui:debug": "PWDEBUG=1 npm run test:pw -- --update-snapshots",
23
23
  "test:ci": "npm run container:build && docker run --rm --network host -v $(pwd):/work/ -w /work/ descope-wcui-playwright-image",
24
24
  "test:ci:updateSnapshots": "npm run test:ci -- --update-snapshots",
25
25
  "lint": "eslint --fix --max-warnings 0",
@@ -32,7 +32,7 @@
32
32
  "format:all": "npm run format .",
33
33
  "format-lint": "lint-staged",
34
34
  "prepare": "husky install",
35
- "storybook": "start-storybook -p 6006",
35
+ "storybook": "start-storybook -p 6006 --quiet",
36
36
  "build-storybook": "build-storybook",
37
37
  "container:build": "docker build -t descope-wcui-playwright-image .",
38
38
  "container:debug": "docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.38.0-jammy /bin/bash"
@@ -85,7 +85,7 @@ export const CheckboxClass = compose(
85
85
  },
86
86
  }),
87
87
  draggableMixin,
88
- proxyInputMixin,
88
+ proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
89
89
  componentNameValidationMixin,
90
90
  booleanFieldMixin
91
91
  )(
@@ -89,7 +89,7 @@ export const SwitchToggleClass = compose(
89
89
  },
90
90
  }),
91
91
  draggableMixin,
92
- proxyInputMixin,
92
+ proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
93
93
  componentNameValidationMixin,
94
94
  booleanFieldMixin
95
95
  )(
@@ -5,7 +5,7 @@ import {
5
5
  proxyInputMixin,
6
6
  componentNameValidationMixin,
7
7
  } from '../../mixins';
8
- import { componentName as descopeInternalComponentName } from './descope-single-select-internal/SingleSelectInternalClass';
8
+ import { componentName as descopeInternalComponentName } from './descope-button-selection-group-internal/ButtonSelectionGroupInternalClass';
9
9
  import { compose } from '../../helpers';
10
10
  import { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';
11
11
  import {
@@ -13,17 +13,17 @@ import {
13
13
  resetInputFieldDefaultWidth,
14
14
  } from '../../helpers/themeHelpers/resetHelpers';
15
15
 
16
- export const componentName = getComponentName('single-select');
16
+ export const componentName = getComponentName('button-selection-group');
17
17
 
18
18
  const customMixin = (superclass) =>
19
- class SingleSelectMixinClass extends superclass {
19
+ class ButtonSelectionGroupMixinClass extends superclass {
20
20
  init() {
21
21
  super.init?.();
22
22
  const template = document.createElement('template');
23
23
 
24
24
  template.innerHTML = `
25
25
  <${descopeInternalComponentName}
26
- name="single-select"
26
+ name="button-selection-group"
27
27
  slot="input"
28
28
  tabindex="-1"
29
29
  >
@@ -43,11 +43,11 @@ const { host, label, requiredIndicator, internalWrapper, errorMessage } = {
43
43
  host: { selector: () => ':host' },
44
44
  label: { selector: '::part(label)' },
45
45
  requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
46
- internalWrapper: { selector: 'descope-single-select-internal slot' },
46
+ internalWrapper: { selector: 'descope-button-selection-group-internal slot' },
47
47
  errorMessage: { selector: '::part(error-message)' },
48
48
  };
49
49
 
50
- export const SingleSelectClass = compose(
50
+ export const ButtonSelectionGroupClass = compose(
51
51
  createStyleMixin({
52
52
  mappings: {
53
53
  hostWidth: { ...host, property: 'width' },
@@ -62,7 +62,7 @@ export const SingleSelectClass = compose(
62
62
  },
63
63
  }),
64
64
  draggableMixin,
65
- proxyInputMixin,
65
+ proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
66
66
  componentNameValidationMixin,
67
67
  customMixin
68
68
  )(
@@ -82,7 +82,7 @@ export const SingleSelectClass = compose(
82
82
  background-color: transparent;
83
83
  }
84
84
 
85
- descope-single-select-internal {
85
+ descope-button-selection-group-internal {
86
86
  -webkit-mask-image: none;
87
87
  padding: 0;
88
88
  width: 100%;
@@ -127,4 +127,4 @@ export const SingleSelectClass = compose(
127
127
  })
128
128
  );
129
129
 
130
- export default SingleSelectClass;
130
+ export default ButtonSelectionGroupClass;
@@ -6,9 +6,9 @@ import {
6
6
  } from '../../../helpers/componentHelpers';
7
7
  import { createDispatchEvent } from '../../../helpers/mixinsHelpers';
8
8
 
9
- export const componentName = getComponentName('single-select-internal');
9
+ export const componentName = getComponentName('button-selection-group-internal');
10
10
 
11
- export class SingleSelectInternalClass extends createBaseInputClass({
11
+ export class ButtonSelectionGroupInternalClass extends createBaseInputClass({
12
12
  componentName,
13
13
  baseSelector: 'slot',
14
14
  }) {