@descope/web-components-ui 1.0.330 → 1.0.331

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see descope-email-field-index-js.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9760],{77840:(t,e,n)=>{n.r(e),n.d(e,{EmailFieldClass:()=>f}),n(58725);var r=n(83208),i=n(46570);const l=i.iv`
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9760],{77840:(t,e,n)=>{n.r(e),n.d(e,{EmailFieldClass:()=>b}),n(58725);var r=n(83208),i=n(46570);const l=i.iv`
3
3
  :host([dir='rtl']) [part='input-field'] ::slotted(input) {
4
4
  --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
5
5
  }
@@ -16,7 +16,7 @@
16
16
  direction: rtl;
17
17
  text-align: left;
18
18
  }
19
- `;(0,i.hC)("vaadin-email-field",p,{moduleId:"vaadin-email-field-styles"});class s extends a.n{static get is(){return"vaadin-email-field"}constructor(){super(),this._setType("email"),this.pattern="^([a-zA-Z0-9_\\.\\-+])+@[a-zA-Z0-9\\-.]+\\.[a-zA-Z0-9\\-]{2,}$"}ready(){super.ready(),this.inputElement&&(this.inputElement.autocapitalize="off")}}(0,o.M)(s);var d=n(94978),u=n(4447),c=n(2061),h=n(54567),m=n(54201),y=n(85423);const g=(0,h.iY)("email-field"),f=(0,c.qC)((0,d.yk)({mappings:u.Z}),d.e4,(0,d.dj)({proxyProps:["value","selectionStart"]}),d.Ae,(t=>class extends t{init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-]+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$"),this.handleExternalInput()}handleExternalInput(){this.baseElement.checkValidity=()=>{},this.setAttribute("external-input","true");const t=this.baseElement.querySelector("input"),e=(0,y.nC)("external-input","suffix");this.baseElement.appendChild(e);const n=(0,y.X$)("external-input","text",this.getAutocompleteType());setTimeout((()=>{(0,y.Gc)(t,n)})),this.handleExternalInputEvents(n),(0,h.tg)(t,n,{includeAttrs:["disabled","readonly","pattern"]}),this.appendChild(n)}getAutocompleteType(){return this.getAttribute("autocomplete")||"username"}handleExternalInputEvents(t){t.addEventListener("input",(t=>{this.value=t.target.value})),t.addEventListener("focus",(()=>{this.setAttribute("focused","true")})),t.addEventListener("blur",(()=>{this.removeAttribute("focused")}))}}))((0,d.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(${f.cssVarList.inputOutlineWidth}) + var(${f.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${(0,m.Wf)("vaadin-email-field")}\n\t\t\t${(0,m.bi)(f.cssVarList)}\n\t\t\t${(0,m.wm)("vaadin-email-field",f.cssVarList)}\n ${(0,m.bz)()}\n\n vaadin-email-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n } \n vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n :host ::slotted(input) {\n display: none !important;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:g}));customElements.define(g,f)},4447:(t,e,n)=>{n.d(e,{Z:()=>f});const{host:r,label:i,placeholder:l,requiredIndicator:o,inputField:a,input:p,helperText:s,errorMessage:d,disabledPlaceholder:u,inputDisabled:c,externalInput:h,externalInputDisabled:m,externalPlaceholder:y,externalDisabledPlaceholder:g}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},f={fontSize:[{},r],fontFamily:[i,a,s,d],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...o,property:"color"},{...i,property:"-webkit-text-fill-color"},{...o,property:"-webkit-text-fill-color"}],hostWidth:{...r,property:"width"},hostMinWidth:{...r,property:"min-width"},hostDirection:{...r,property:"direction"},inputBackgroundColor:{...a,property:"background-color"},errorMessageTextColor:{...d,property:"color"},helperTextColor:{...s,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...c,property:"-webkit-text-fill-color"},{...m,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"color"},{...h,property:"color"}],labelRequiredIndicator:{...o,property:"content"},inputBorderColor:{...a,property:"border-color"},inputBorderWidth:{...a,property:"border-width"},inputBorderStyle:{...a,property:"border-style"},inputBorderRadius:{...a,property:"border-radius"},inputHeight:{...a,property:"height"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"},{...h,property:"padding-left"},{...h,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},inputTextAlign:[{...p,property:"text-align"},{...h,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...l,property:"color"},{...y,property:"color"},{...u,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],labelPosition:{...i,property:"position"},labelTopPosition:{...i,property:"top"},labelHorizontalPosition:[{...i,property:"left"},{...i,property:"right"}],inputTransformY:{...i,property:"transform"},inputTransition:{...i,property:"transition"},marginInlineStart:{...i,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...y,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...h,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...h,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...h,property:"margin-bottom"}]}},85423:(t,e,n)=>{n.d(e,{Gc:()=>l,X$:()=>i,nC:()=>r});const r=(t,e)=>{const n=document.createElement("slot");return n.setAttribute("name",t),n.setAttribute("slot",e),n},i=(t,e,n)=>{const r=document.createElement("input");return r.setAttribute("slot",t),r.setAttribute("type",e),r.setAttribute("data-hidden-input","true"),r.setAttribute("autocomplete",n),r},l=(t,e,n)=>{const r=getComputedStyle(t),i=r.getPropertyValue("height"),l=r.getPropertyValue("padding-left"),o=r.getPropertyValue("padding-right"),a=r.getPropertyValue("font-size"),p=r.getPropertyValue("font-family"),s=r.getPropertyValue("letter-spacing"),d=r.getPropertyValue("caret-color"),u=((t,e)=>{t.value="_";const n=e.getPropertyValue("color");return t.value="",n})(t,r);e.style=`\n all: unset !important;\n position: absolute !important;\n background-color: transparent !important;\n color: ${u} !important;\n height: ${i} !important;\n left: ${l} !important;\n right: ${o} !important;\n font-size: ${a} !important;\n font-family: ${p} !important;\n letter-spacing: ${s} !important;\n caret-color: ${d} !important;\n ${n||""}\n `}},54201:(t,e,n)=>{n.d(e,{B:()=>d,DY:()=>p,PH:()=>s,Pd:()=>o,TX:()=>i,Wf:()=>c,bi:()=>r,bz:()=>h,jI:()=>a,jl:()=>l,wm:()=>u});const r=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,i=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,l=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,o=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,p=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${i(t)}\n ${o(t)}\n ${a(t)}\n ${l(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '},73208:(t,e,n)=>{n.d(e,{b:()=>i});var r=n(78591);class i extends r.n{constructor(t,e){super(t,"input","input",{initializer:(t,n)=>{n.value&&(t.value=n.value),n.type&&t.setAttribute("type",n.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},20422:(t,e,n)=>{n.d(e,{j:()=>i});var r=n(73406);const i=t=>class extends((0,r.L)(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}},18005:(t,e,n)=>{n.d(e,{n:()=>h}),n(13553);var r=n(74241),i=n(52807),l=n(12521),o=n(34463),a=n(62743),p=n(46570),s=n(73208),d=n(20422),u=n(46729);const c=t=>class extends((0,d.j)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new s.b(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new u.v(this.inputElement,this._labelController))}};(0,p.hC)("vaadin-text-field",a.J,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,p.Tb)((0,l.S)(r.H3)))){static get is(){return"vaadin-text-field"}static get template(){return r.dy`
19
+ `;(0,i.hC)("vaadin-email-field",p,{moduleId:"vaadin-email-field-styles"});class s extends a.n{static get is(){return"vaadin-email-field"}constructor(){super(),this._setType("email"),this.pattern="^([a-zA-Z0-9_\\.\\-+])+@[a-zA-Z0-9\\-.]+\\.[a-zA-Z0-9\\-]{2,}$"}ready(){super.ready(),this.inputElement&&(this.inputElement.autocapitalize="off")}}(0,o.M)(s);var d=n(94978),u=n(4447),c=n(2061),h=n(54567),m=n(54201),g=n(85423);const y=(0,h.iY)("email-field"),b=(0,c.qC)((0,d.yk)({mappings:u.Z}),d.e4,(0,d.dj)({proxyProps:["value","selectionStart"]}),d.Ae,(t=>class extends t{init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-]+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$"),this.handleExternalInput()}handleExternalInput(){this.baseElement.checkValidity=()=>{},this.setAttribute("external-input","true");const t=this.baseElement.querySelector("input"),e=(0,g.nC)("external-input","suffix");this.baseElement.appendChild(e);const n=(0,g.X$)("external-input","text",this.getAutocompleteType());setTimeout((()=>{(0,g.Gc)(t,n)})),this.handleExternalInputEvents(n),(0,h.tg)(t,n,{includeAttrs:["disabled","readonly","pattern"]}),n.addEventListener("input",(t=>{t.target.value?this.setAttribute("has-value","true"):this.removeAttribute("has-value")})),this.appendChild(n)}getAutocompleteType(){return this.getAttribute("autocomplete")||"username"}handleExternalInputEvents(t){t.addEventListener("input",(t=>{this.value=t.target.value})),t.addEventListener("focus",(()=>{this.setAttribute("focused","true")})),t.addEventListener("blur",(()=>{this.removeAttribute("focused")}))}}))((0,d.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(${b.cssVarList.inputOutlineWidth}) + var(${b.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${(0,m.Wf)("vaadin-email-field")}\n\t\t\t${(0,m.bi)(b.cssVarList)}\n\t\t\t${(0,m.wm)("vaadin-email-field",b.cssVarList)}\n ${(0,m.bz)()}\n\n vaadin-email-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n } \n vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:y}));customElements.define(y,b)},4447:(t,e,n)=>{n.d(e,{Z:()=>b});const{host:r,label:i,placeholder:l,requiredIndicator:o,inputField:a,input:p,helperText:s,errorMessage:d,disabledPlaceholder:u,inputDisabled:c,externalInput:h,externalInputDisabled:m,externalPlaceholder:g,externalDisabledPlaceholder:y}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},b={fontSize:[{},r],fontFamily:[i,a,s,d],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...o,property:"color"},{...i,property:"-webkit-text-fill-color"},{...o,property:"-webkit-text-fill-color"}],hostWidth:{...r,property:"width"},hostMinWidth:{...r,property:"min-width"},hostDirection:{...r,property:"direction"},inputBackgroundColor:{...a,property:"background-color"},errorMessageTextColor:{...d,property:"color"},helperTextColor:{...s,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...c,property:"-webkit-text-fill-color"},{...m,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"color"},{...h,property:"color"}],labelRequiredIndicator:{...o,property:"content"},inputBorderColor:{...a,property:"border-color"},inputBorderWidth:{...a,property:"border-width"},inputBorderStyle:{...a,property:"border-style"},inputBorderRadius:{...a,property:"border-radius"},inputHeight:{...a,property:"height"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"},{...h,property:"padding-left"},{...h,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},inputTextAlign:[{...p,property:"text-align"},{...h,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...l,property:"color"},{...g,property:"color"},{...u,property:"-webkit-text-fill-color"},{...y,property:"-webkit-text-fill-color"}],labelPosition:{...i,property:"position"},labelTopPosition:{...i,property:"top"},labelHorizontalPosition:[{...i,property:"left"},{...i,property:"right"}],inputTransformY:{...i,property:"transform"},inputTransition:{...i,property:"transition"},marginInlineStart:{...i,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...g,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...h,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...h,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...h,property:"margin-bottom"}]}},85423:(t,e,n)=>{n.d(e,{Gc:()=>l,X$:()=>i,nC:()=>r});const r=(t,e)=>{const n=document.createElement("slot");return n.setAttribute("name",t),n.setAttribute("slot",e),n},i=(t,e,n)=>{const r=document.createElement("input");return r.setAttribute("slot",t),r.setAttribute("type",e),r.setAttribute("data-hidden-input","true"),r.setAttribute("autocomplete",n),r},l=(t,e,n)=>{const r=getComputedStyle(t),i=r.getPropertyValue("height"),l=r.getPropertyValue("padding-left"),o=r.getPropertyValue("padding-right"),a=r.getPropertyValue("font-size"),p=r.getPropertyValue("font-family"),s=r.getPropertyValue("letter-spacing"),d=r.getPropertyValue("caret-color"),u=((t,e)=>{t.value="_";const n=e.getPropertyValue("color");return t.value="",n})(t,r);e.style=`\n all: unset !important;\n position: absolute !important;\n background-color: transparent !important;\n color: ${u} !important;\n height: ${i} !important;\n left: ${l} !important;\n right: ${o} !important;\n font-size: ${a} !important;\n font-family: ${p} !important;\n letter-spacing: ${s} !important;\n caret-color: ${d} !important;\n ${n||""}\n `}},54201:(t,e,n)=>{n.d(e,{B:()=>d,DY:()=>p,PH:()=>s,Pd:()=>o,TX:()=>i,Wf:()=>c,bi:()=>r,bz:()=>h,jI:()=>a,jl:()=>l,wm:()=>u});const r=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,i=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,l=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,o=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,p=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${i(t)}\n ${o(t)}\n ${a(t)}\n ${l(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '},73208:(t,e,n)=>{n.d(e,{b:()=>i});var r=n(78591);class i extends r.n{constructor(t,e){super(t,"input","input",{initializer:(t,n)=>{n.value&&(t.value=n.value),n.type&&t.setAttribute("type",n.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},20422:(t,e,n)=>{n.d(e,{j:()=>i});var r=n(73406);const i=t=>class extends((0,r.L)(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}},18005:(t,e,n)=>{n.d(e,{n:()=>h}),n(13553);var r=n(74241),i=n(52807),l=n(12521),o=n(34463),a=n(62743),p=n(46570),s=n(73208),d=n(20422),u=n(46729);const c=t=>class extends((0,d.j)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new s.b(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new u.v(this.inputElement,this._labelController))}};(0,p.hC)("vaadin-text-field",a.J,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,p.Tb)((0,l.S)(r.H3)))){static get is(){return"vaadin-text-field"}static get template(){return r.dy`
20
20
  <style>
21
21
  [part='input-field'] {
22
22
  flex-grow: 0;
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1842],{73878:(t,e,i)=>{i.d(e,{P:()=>a});var n=i(2061),r=i(94978),o=i(33346);const a=(...t)=>(0,n.qC)(r.wX,r.li,r.QT,r.mE)((0,o.s)(...t))},60395:(t,e,i)=>{i.d(e,{f:()=>d,o:()=>f});var n=i(54567),r=i(2061),o=i(94978),a=i(85857),s=i(19876),l=i(54201),p=i(2886);const d=(0,n.iY)("new-password"),u=p.S.cssVarList,{host:c,label:h,internalInputsWrapper:b,errorMessage:y,helperText:m,passwordInput:g,policyPreview:v}={host:{selector:()=>":host"},label:{selector:"::part(label)"},internalInputsWrapper:{selector:"descope-new-password-internal .wrapper"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},passwordInput:{selector:"descope-password"},policyPreview:{selector:"descope-policy-validation"}},f=(0,r.qC)((0,o.yk)({mappings:{fontSize:[c,{},{selector:s.v.componentName,property:s.v.cssVarList.fontSize}],fontFamily:[h,y,m],labelFontSize:{...h,property:"font-size"},labelFontWeight:{...h,property:"font-weight"},labelTextColor:{...h,property:"color"},errorMessageTextColor:{...y,property:"color"},hostWidth:{...c,property:"width"},hostMinWidth:{...c,property:"min-width"},hostDirection:[{...c,property:"direction"},{...g,property:s.v.cssVarList.hostDirection}],inputsRequiredIndicator:{...c,property:"content"},spaceBetweenInputs:{...b,property:"gap"},policyPreviewBackgroundColor:{...v,property:u.backgroundColor},policyPreviewPadding:{...v,property:u.padding},valueInputHeight:{...g,property:s.v.cssVarList.valueInputHeight},valueInputMarginBottom:{...g,property:s.v.cssVarList.valueInputMarginBottom}}}),o.e4,(0,o.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>\n </${a.f}>\n\t\t\t`,this.setAttribute("external-input","true"),this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(a.f),this.passwordInput=this.inputElement.querySelector('[data-id="password"]'),this.confirmInput=this.inputElement.querySelector('[data-id="confirm"]'),this.createExternalInput(this.passwordInput,"external-password-input"),this.createExternalInput(this.confirmInput,"external-confirm-input"),(0,n.oP)(this,this.inputElement,{includeAttrs:["password-label","password-placeholder","confirm-label","confirm-placeholder","full-width","size","bordered","label","has-confirm","invalid","readonly","draggable","has-validation","policy-label","active-policies","available-policies","data-password-policy-value-minlength","label-type"]})}createExternalInput(t,e){const i=t.querySelector("input"),n=document.createElement("slot"),r=i.getAttribute("slot");n.setAttribute("name",e),n.setAttribute("slot",r),t.appendChild(n),i.setAttribute("slot",e),i.setAttribute("data-hidden-input","true"),this.appendChild(i)}}))((0,o.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 :host ::part(error-message) {\n direction: ltr;\n }\n\t\t${(0,l.bi)(s.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\tpadding: 0;\n\t\t}\n\t\tdescope-new-password-internal > .wrapper {\n -webkit-mask-image: none;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\tdescope-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 descope-policy-validation {\n margin-top: 8px;\n display: flex;\n }\n descope-policy-validation.hidden {\n display: none;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:d}))},85857:(t,e,i)=>{i.d(e,{f:()=>n});const n=(0,i(54567).iY)("new-password-internal")},1545:(t,e,i)=>{i.r(e);var n=i(73878),r=i(54567),o=i(60395),a=i(85857);const s=/^password-/,l=/^confirm-/,p=(t,e)=>t.replace(e,""),d=["password-label","password-placeholder"],u=["confirm-label","confirm-placeholder"],c=["has-confirm","disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable","autocomplete","label-type"],h=[].concat(c,d,u,["has-validation"]),b=(0,n.P)({componentName:a.f,baseSelector:"div"});customElements.define(a.f,class extends b{static get observedAttributes(){return[].concat(b.observedAttributes||[],h)}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")}onHasConfirmChange(t){this.confirmInput.style.display=t?"":"none"}onHasValidationChange(t){this.policyPanel.style.display=t?"":"none"}get hasValidation(){return"true"===this.getAttribute("has-validation")}getValidity(){if(!this.policyPanel.isValid)return{patternMismatch:!0};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,this.hasValidation)}renderInputs(){this.wrapperEle.innerHTML='\n <div>\n <descope-password autocomplete="new-password" data-id="password"></descope-password>\n <descope-policy-validation></descope-policy-validation>\n </div>\n <descope-password autocomplete="new-password" data-id="confirm"></descope-password>\n ',this.passwordInput=this.querySelector('[data-id="password"]'),this.confirmInput=this.querySelector('[data-id="confirm"]'),this.policyPanel=this.querySelector("descope-policy-validation"),this.inputs=[this.passwordInput,this.confirmInput],this.initInputs(),this.passwordInput.addEventListener("input",(t=>{this.policyPanel.setAttribute("value",t.target.value)})),(0,r.oP)(this,this.policyPanel,{includeAttrs:["policy-label","available-policies","active-policies","data-password-policy-value-minlength"],mapAttrs:{"policy-label":"label","available-policies":"data"}})}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(${o.o.cssVarList.inputsRequiredIndicator});\n width: 1em;\n text-align: center;\n\t\t\t\t}\n :host ::part(required-indicator) {\n display: inline-flex;\n }\n\t\t\t\t`,t?.shadowRoot.appendChild(e)}))}get isInvalid(){return this.hasAttribute("invalid")&&"false"!==this.getAttribute("invalid")}handleInputsInvalidAttribute(){this.inputs.forEach((t=>{t&&(0,r.FX)(t,(e=>{if(e.includes("invalid")){const e=t.getAttribute("invalid"),i=this.getAttribute("invalid");this.isInvalid&&i!==e&&t.setAttribute("invalid","true")}}),{})}))}initInputs(){this.handleIndicatorStyle(),this.handleInputsInvalidAttribute(),this.handleFocusEventsDispatching(this.inputs)}toggleBooleanAttribute(t,e,i){null===i?t?.removeAttribute(e):t?.setAttribute(e,i)}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&("has-validation"===t?this.onHasValidationChange("true"===i):"has-confirm"===t?this.onHasConfirmChange("true"===i):c.includes(t)?this.inputs.forEach((e=>this.toggleBooleanAttribute(e,t,i))):d.includes(t)?this.toggleBooleanAttribute(this.passwordInput,p(t,s),i):u.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,p(t,l),i))}})},19876:(t,e,i)=>{i.d(e,{f:()=>p,v:()=>w});var n=i(94978),r=i(2061),o=i(54567),a=i(22702),s=i(54201),l=i(85423);const p=(0,o.iY)("password"),{host:d,inputField:u,inputElement:c,inputElementPlaceholder:h,revealButtonContainer:b,revealButtonIcon:y,label:m,requiredIndicator:g,errorMessage:v,helperText:f}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:()=>":host 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)"}},w=(0,r.qC)((0,n.yk)({mappings:{hostWidth:{...d,property:"width"},hostMinWidth:{...d,property:"min-width"},hostDirection:{...d,property:"direction"},fontSize:[{},d],fontFamily:[m,u,v,f],inputHeight:{...u,property:"height"},inputHorizontalPadding:[{...c,property:"padding-left"},{...c,property:"padding-right"}],inputBackgroundColor:{...u,property:"background-color"},inputBorderStyle:{...u,property:"border-style"},inputBorderWidth:{...u,property:"border-width"},inputBorderColor:{...u,property:"border-color"},inputBorderRadius:{...u,property:"border-radius"},inputOutlineColor:{...u,property:"outline-color"},inputOutlineStyle:{...u,property:"outline-style"},inputOutlineOffset:{...u,property:"outline-offset"},inputOutlineWidth:{...u,property:"outline-width"},labelFontSize:{...m,property:"font-size"},labelFontWeight:{...m,property:"font-weight"},labelTextColor:[{...m,property:"color"},{...g,property:"color"}],labelRequiredIndicator:{...g,property:"content"},errorMessageTextColor:{...v,property:"color"},inputPlaceholderTextColor:[{...h,property:"color"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"color"}],inputValueTextColor:[{...c,property:"color"},{selector:()=>":host ::slotted(input)",property:"color"}],revealButtonOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],revealButtonSize:{...b,property:"font-size"},revealButtonColor:{...y,property:"color"},labelPosition:{...m,property:"position"},labelTopPosition:{...m,property:"top"},labelHorizontalPosition:[{...m,property:"left"},{...m,property:"right"}],inputTransformY:{...m,property:"transform"},inputTransition:{...m,property:"transition"},marginInlineStart:{...m,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...c,property:"opacity"}],inputVerticalAlignment:{...u,property:"align-items"},valueInputHeight:{...c,property:"height"}}}),n.e4,(0,n.dj)({proxyProps:["value","selectionStart"]}),n.Ae,a.Z,(t=>class extends t{init(){super.init?.(),this.baseElement.checkValidity=()=>{},this.setAttribute("external-input","true");const t=this.baseElement.querySelector("input"),e=(0,l.nC)("external-input","suffix");this.baseElement.appendChild(e);const i=(0,l.X$)("external-input","password",this.getAutocompleteType());this.handlePasswordVisibility(i),setTimeout((()=>{(0,l.Gc)(t,i,"\n width: calc(100% - 3em) !important;\n ")})),this.handleExternalInputEvents(i),(0,o.tg)(t,i,{includeAttrs:["type","readonly"]}),(0,o.tg)(this,i,{includeAttrs:["focused"]}),t.addEventListener("focus",(t=>{t.preventDefault(),t.isTrusted&&i.focus()})),this.addEventListener("focus",(t=>{t.preventDefault(),this.focus()})),this.appendChild(i)}handlePasswordVisibility(t){const e=this.baseElement.__boundRevealButtonMouseDown;this.baseElement.querySelector("vaadin-password-field-button").removeEventListener("mousedown",e),this.baseElement._passwordVisibleChanged=()=>{},this.baseElement._togglePasswordVisibility=()=>{"password"===t.getAttribute("type")?this.showPasswordVisibility(t):this.hidePasswordVisibility(t)},this.addEventListener("blur",(()=>{setTimeout((()=>{"password"!==t.getAttribute("type")&&"true"!==t.getAttribute("focused")&&this.hidePasswordVisibility(t)}))}))}hidePasswordVisibility(t){t.setAttribute("type","password"),this.setAttribute("password-visible","false")}showPasswordVisibility(t){t.setAttribute("type","text"),this.setAttribute("password-visible","true")}getAutocompleteType(){return this.getAttribute("autocomplete")||"current-password"}handleExternalInputEvents(t){t.addEventListener("input",(t=>{this.value=t.target.value})),t.addEventListener("focus",(()=>{this.setAttribute("focused","true")}))}}))((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 box-sizing: border-box;\n position: relative;\n\t\t\t}\n\t\t\t${(0,s.bi)(w.cssVarList)}\n\t\t\t${(0,s.Pd)("vaadin-password-field")}\n ${(0,s.Wf)("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 -webkit-mask-image: none;\n\t\t\t\tbox-sizing: border-box;\n opacity: 1;\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 :host ::slotted(input) {\n\t\t\t\tmin-height: 0;\n }\n :host([readonly]) ::slotted(input:placeholder-shown) {\n\t\t\t\topacity: 0;\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\t\t\t:host([readonly]) vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\tvaadin-password-field-button[focus-ring] {\n\t\t\t\tbox-shadow: 0 0 0 2px var(${w.cssVarList.inputOutlineColor});\n\t\t\t}\n\n ${(0,s.bz)()}\n\n :host ::slotted(input) {\n display: none !important;\n }\n \n ::part(reveal-button) {\n align-self: center;\n } \n \n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))},22702:(t,e,i)=>{i.d(e,{Z:()=>n});const n=t=>class extends t{get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}init(){super.init?.();const t=this.querySelector("input");t?.addEventListener("mousedown",(e=>{if(this.isDraggable&&this.isReadOnly){t.setAttribute("inert","true");const i=e.target,n=i.getAttribute("type");i.setAttribute("type","text"),setTimeout((()=>{i.focus()}));const r=e=>{i.setAttribute("type",n),t.removeAttribute("inert"),this.removeEventListener("mouseup",r),this.removeEventListener("dragend",r)};this.addEventListener("dragend",r,{once:!0}),this.addEventListener("mouseup",r,{once:!0})}}))}}},2886:(t,e,i)=>{i.d(e,{S:()=>g,f:()=>l});var n=i(94978),r=i(33346),o=i(2061),a=i(54567),s=i(27487);const l=(0,a.iY)("policy-validation"),p=["data","active-policies","overrides","data-password-policy-value-minlength"],d=["label","value",...p];class u extends((0,r.s)({componentName:l,baseSelector:":host > div"})){#t;#e=[];#i;static get observedAttributes(){return d}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <div class="label"></div>\n <ul></ul>\n </div>\n <style>\n :host > div {\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n }\n .label {\n max-width: 100%;\n text-wrap: wrap;\n overflow-wrap: break-word;\n }\n .hide-label .label {\n display: none;\n }\n ul {\n display: flex;\n flex-direction: column;\n padding: 0;\n margin: 0;\n }\n ul, li {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n li::before {\n display: inline-block;\n width: 1em;\n text-align: center;\n }\n </style>\n\t\t',this.panel=this.shadowRoot.querySelector(":host > div"),this.label=this.shadowRoot.querySelector(".label"),this.list=this.shadowRoot.querySelector("ul")}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback?.(t,e,i),e!==i){if("label"===t&&this.updateLabel(i),p.includes(t)){if("data"===t)try{this.availablePolicies=JSON.parse(i)}catch{console.error("Failed to set available policies")}if("active-policies"===t&&(this.#e=(i||"").split(",")),"data-password-policy-value-minlength"===t){const t=Number(i);!Number.isNaN(t)&&t>0&&(this.#i={...this.#i,minlength:{value:`${t}`}})}}this.renderItems(this.#t,this.#e,this.#i)}}get availablePolicies(){return this.#t||[]}set availablePolicies(t){this.#t=t}get value(){return this.getAttribute("value")||""}validate(){let t=this.#t;return this.#i&&(t=this.#t.map((t=>this.#i[t.id]?{...t,data:this.#i[t.id]}:t))),this.#e.reduce(((e,i)=>{const n=t.find((t=>t.id===i));if(!n)return e;const{pattern:r,message:o,data:a}=n;if(!r||!o)return e;const l={valid:new RegExp((0,s.I)(r,a)).test(this.value),message:(0,s.I)(o,a),id:i};return e.push(l),e}),[])}get isValid(){return!this.validate().some((({valid:t})=>!1===t))}getValidationItemTemplate({valid:t,message:e}){return`\n <li class="item" data-valid="${this.value?t:"none"}">\n <span class="message">${e}</span>\n </li>\n `}renderItems(t,e){t&&e.length&&(this.list.innerHTML=this.validate().map(this.getValidationItemTemplate.bind(this)).join(""))}updateLabel(t){t?(this.label.innerHTML=t,this.classList.remove("hide-label")):(this.classList.add("hide-label"),this.label.innerHTML="")}}const{host:c,item:h,symbolDefault:b,symbolSuccess:y,symbolError:m}={host:{selector:()=>":host > div"},item:{selector:()=>".item"},symbolDefault:{selector:()=>'.item[data-valid="none"]::before'},symbolSuccess:{selector:()=>'.item[data-valid="true"]::before'},symbolError:{selector:()=>'.item[data-valid="false"]::before'}},g=(0,o.qC)((0,n.yk)({componentNameOverride:(0,a.iY)("input-wrapper")}),(0,n.yk)({mappings:{hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},padding:{},borderWidth:{...c,property:"border-width"},borderStyle:{...c,property:"border-style"},borderColor:{...c,property:"border-color"},borderRadius:{...c,property:"border-radius"},backgroundColor:{...c,property:"background-color"},textColor:{property:"color"},labelMargin:{...c,property:"gap"},itemsSpacing:{...h,property:"line-height"},itemSymbolSuccessColor:{...y,property:"color"},itemSymbolErrorColor:{...m,property:"color"},itemSymbolDefault:{...b,property:"content"},itemSymbolSuccess:{...y,property:"content"},itemSymbolError:{...m,property:"content"}}}),n.e4,n.Ae)(u)},27487:(t,e,i)=>{i.d(e,{I:()=>n});const n=(t,e)=>t.replace(/{{(\w+)+}}/g,((t,i)=>e?.[i]||t))},85423:(t,e,i)=>{i.d(e,{Gc:()=>o,X$:()=>r,nC:()=>n});const n=(t,e)=>{const i=document.createElement("slot");return i.setAttribute("name",t),i.setAttribute("slot",e),i},r=(t,e,i)=>{const n=document.createElement("input");return n.setAttribute("slot",t),n.setAttribute("type",e),n.setAttribute("data-hidden-input","true"),n.setAttribute("autocomplete",i),n},o=(t,e,i)=>{const n=getComputedStyle(t),r=n.getPropertyValue("height"),o=n.getPropertyValue("padding-left"),a=n.getPropertyValue("padding-right"),s=n.getPropertyValue("font-size"),l=n.getPropertyValue("font-family"),p=n.getPropertyValue("letter-spacing"),d=n.getPropertyValue("caret-color"),u=((t,e)=>{t.value="_";const i=e.getPropertyValue("color");return t.value="",i})(t,n);e.style=`\n all: unset !important;\n position: absolute !important;\n background-color: transparent !important;\n color: ${u} !important;\n height: ${r} !important;\n left: ${o} !important;\n right: ${a} !important;\n font-size: ${s} !important;\n font-family: ${l} !important;\n letter-spacing: ${p} !important;\n caret-color: ${d} !important;\n ${i||""}\n `}},54201:(t,e,i)=>{i.d(e,{B:()=>d,DY:()=>l,PH:()=>p,Pd:()=>a,TX:()=>r,Wf:()=>c,bi:()=>n,bz:()=>h,jI:()=>s,jl:()=>o,wm:()=>u});const n=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",p=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${r(t)}\n ${a(t)}\n ${s(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1842],{73878:(t,e,i)=>{i.d(e,{P:()=>a});var n=i(2061),r=i(94978),o=i(33346);const a=(...t)=>(0,n.qC)(r.wX,r.li,r.QT,r.mE)((0,o.s)(...t))},60395:(t,e,i)=>{i.d(e,{f:()=>d,o:()=>f});var n=i(54567),r=i(2061),o=i(94978),a=i(85857),s=i(19876),l=i(54201),p=i(2886);const d=(0,n.iY)("new-password"),u=p.S.cssVarList,{host:c,label:h,internalInputsWrapper:b,errorMessage:m,helperText:y,passwordInput:v,policyPreview:g}={host:{selector:()=>":host"},label:{selector:"::part(label)"},internalInputsWrapper:{selector:"descope-new-password-internal .wrapper"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},passwordInput:{selector:"descope-password"},policyPreview:{selector:"descope-policy-validation"}},f=(0,r.qC)((0,o.yk)({mappings:{fontSize:[c,{},{selector:s.v.componentName,property:s.v.cssVarList.fontSize}],fontFamily:[h,m,y],labelFontSize:{...h,property:"font-size"},labelFontWeight:{...h,property:"font-weight"},labelTextColor:{...h,property:"color"},errorMessageTextColor:{...m,property:"color"},hostWidth:{...c,property:"width"},hostMinWidth:{...c,property:"min-width"},hostDirection:[{...c,property:"direction"},{...v,property:s.v.cssVarList.hostDirection}],inputsRequiredIndicator:{...c,property:"content"},spaceBetweenInputs:{...b,property:"gap"},policyPreviewBackgroundColor:{...g,property:u.backgroundColor},policyPreviewPadding:{...g,property:u.padding},valueInputHeight:{...v,property:s.v.cssVarList.valueInputHeight},valueInputMarginBottom:{...v,property:s.v.cssVarList.valueInputMarginBottom}}}),o.e4,(0,o.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>\n </${a.f}>\n\t\t\t`,this.setAttribute("external-input","true"),this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(a.f),this.passwordInput=this.inputElement.querySelector('[data-id="password"]'),this.confirmInput=this.inputElement.querySelector('[data-id="confirm"]'),this.createExternalInput(this.passwordInput,"external-password-input"),this.createExternalInput(this.confirmInput,"external-confirm-input"),(0,n.oP)(this,this.inputElement,{includeAttrs:["password-label","password-placeholder","confirm-label","confirm-placeholder","full-width","size","bordered","label","has-confirm","invalid","readonly","draggable","has-validation","policy-label","active-policies","available-policies","data-password-policy-value-minlength","label-type"]})}createExternalInput(t,e){const i=t.querySelector("input"),n=document.createElement("slot"),r=i.getAttribute("slot");n.setAttribute("name",e),n.setAttribute("slot",r),t.appendChild(n),i.setAttribute("slot",e),i.setAttribute("data-hidden-input","true"),this.appendChild(i)}}))((0,o.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 :host ::part(error-message) {\n direction: ltr;\n }\n\t\t${(0,l.bi)(s.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\tpadding: 0;\n\t\t}\n\t\tdescope-new-password-internal > .wrapper {\n -webkit-mask-image: none;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\tdescope-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 descope-policy-validation {\n margin-top: 8px;\n display: flex;\n }\n descope-policy-validation.hidden {\n display: none;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:d}))},85857:(t,e,i)=>{i.d(e,{f:()=>n});const n=(0,i(54567).iY)("new-password-internal")},1545:(t,e,i)=>{i.r(e);var n=i(73878),r=i(54567),o=i(60395),a=i(85857);const s=/^password-/,l=/^confirm-/,p=(t,e)=>t.replace(e,""),d=["password-label","password-placeholder"],u=["confirm-label","confirm-placeholder"],c=["has-confirm","disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable","autocomplete","label-type"],h=[].concat(c,d,u,["has-validation"]),b=(0,n.P)({componentName:a.f,baseSelector:"div"});customElements.define(a.f,class extends b{static get observedAttributes(){return[].concat(b.observedAttributes||[],h)}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")}onHasConfirmChange(t){this.confirmInput.style.display=t?"":"none"}onHasValidationChange(t){this.policyPanel.style.display=t?"":"none"}get hasValidation(){return"true"===this.getAttribute("has-validation")}getValidity(){if(!this.policyPanel.isValid)return{patternMismatch:!0};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,this.hasValidation)}renderInputs(){this.wrapperEle.innerHTML='\n <div>\n <descope-password autocomplete="new-password" data-id="password"></descope-password>\n <descope-policy-validation></descope-policy-validation>\n </div>\n <descope-password autocomplete="new-password" data-id="confirm"></descope-password>\n ',this.passwordInput=this.querySelector('[data-id="password"]'),this.confirmInput=this.querySelector('[data-id="confirm"]'),this.policyPanel=this.querySelector("descope-policy-validation"),this.inputs=[this.passwordInput,this.confirmInput],this.initInputs(),this.passwordInput.addEventListener("input",(t=>{this.policyPanel.setAttribute("value",t.target.value)})),(0,r.oP)(this,this.policyPanel,{includeAttrs:["policy-label","available-policies","active-policies","data-password-policy-value-minlength"],mapAttrs:{"policy-label":"label","available-policies":"data"}})}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(${o.o.cssVarList.inputsRequiredIndicator});\n width: 1em;\n text-align: center;\n\t\t\t\t}\n :host ::part(required-indicator) {\n display: inline-flex;\n }\n\t\t\t\t`,t?.shadowRoot.appendChild(e)}))}get isInvalid(){return this.hasAttribute("invalid")&&"false"!==this.getAttribute("invalid")}handleInputsInvalidAttribute(){this.inputs.forEach((t=>{t&&(0,r.FX)(t,(e=>{if(e.includes("invalid")){const e=t.getAttribute("invalid"),i=this.getAttribute("invalid");this.isInvalid&&i!==e&&t.setAttribute("invalid","true")}}),{})}))}initInputs(){this.handleIndicatorStyle(),this.handleInputsInvalidAttribute(),this.handleFocusEventsDispatching(this.inputs)}toggleBooleanAttribute(t,e,i){null===i?t?.removeAttribute(e):t?.setAttribute(e,i)}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&("has-validation"===t?this.onHasValidationChange("true"===i):"has-confirm"===t?this.onHasConfirmChange("true"===i):c.includes(t)?this.inputs.forEach((e=>this.toggleBooleanAttribute(e,t,i))):d.includes(t)?this.toggleBooleanAttribute(this.passwordInput,p(t,s),i):u.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,p(t,l),i))}})},19876:(t,e,i)=>{i.d(e,{f:()=>p,v:()=>w});var n=i(94978),r=i(2061),o=i(54567),a=i(22702),s=i(54201),l=i(85423);const p=(0,o.iY)("password"),{host:d,inputField:u,inputElement:c,inputElementPlaceholder:h,revealButtonContainer:b,revealButtonIcon:m,label:y,requiredIndicator:v,errorMessage:g,helperText:f}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:()=>":host 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)"}},w=(0,r.qC)((0,n.yk)({mappings:{hostWidth:{...d,property:"width"},hostMinWidth:{...d,property:"min-width"},hostDirection:{...d,property:"direction"},fontSize:[{},d],fontFamily:[y,u,g,f],inputHeight:{...u,property:"height"},inputHorizontalPadding:[{...c,property:"padding-left"},{...c,property:"padding-right"}],inputBackgroundColor:{...u,property:"background-color"},inputBorderStyle:{...u,property:"border-style"},inputBorderWidth:{...u,property:"border-width"},inputBorderColor:{...u,property:"border-color"},inputBorderRadius:{...u,property:"border-radius"},inputOutlineColor:{...u,property:"outline-color"},inputOutlineStyle:{...u,property:"outline-style"},inputOutlineOffset:{...u,property:"outline-offset"},inputOutlineWidth:{...u,property:"outline-width"},labelFontSize:{...y,property:"font-size"},labelFontWeight:{...y,property:"font-weight"},labelTextColor:[{...y,property:"color"},{...v,property:"color"}],labelRequiredIndicator:{...v,property:"content"},errorMessageTextColor:{...g,property:"color"},inputPlaceholderTextColor:[{...h,property:"color"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"color"}],inputValueTextColor:[{...c,property:"color"},{selector:()=>":host ::slotted(input)",property:"color"}],revealButtonOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],revealButtonSize:{...b,property:"font-size"},revealButtonColor:{...m,property:"color"},labelPosition:{...y,property:"position"},labelTopPosition:{...y,property:"top"},labelHorizontalPosition:[{...y,property:"left"},{...y,property:"right"}],inputTransformY:{...y,property:"transform"},inputTransition:{...y,property:"transition"},marginInlineStart:{...y,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...c,property:"opacity"}],inputVerticalAlignment:{...u,property:"align-items"},valueInputHeight:{...c,property:"height"}}}),n.e4,(0,n.dj)({proxyProps:["value","selectionStart"]}),n.Ae,a.Z,(t=>class extends t{init(){super.init?.(),this.baseElement.checkValidity=()=>{},this.setAttribute("external-input","true");const t=this.baseElement.querySelector("input"),e=(0,l.nC)("external-input","suffix");this.baseElement.appendChild(e);const i=(0,l.X$)("external-input","password",this.getAutocompleteType());this.handlePasswordVisibility(i),setTimeout((()=>{(0,l.Gc)(t,i,"\n width: calc(100% - 3em) !important;\n ")})),this.handleExternalInputEvents(i),(0,o.tg)(t,i,{includeAttrs:["type","readonly"]}),(0,o.tg)(this,i,{includeAttrs:["focused"]}),t.addEventListener("focus",(t=>{t.preventDefault(),t.isTrusted&&i.focus()})),i.addEventListener("input",(t=>{t.target.value?this.setAttribute("has-value","true"):this.removeAttribute("has-value")})),this.addEventListener("focus",(t=>{t.preventDefault(),this.focus()})),this.appendChild(i)}handlePasswordVisibility(t){const e=this.baseElement.__boundRevealButtonMouseDown;this.baseElement.querySelector("vaadin-password-field-button").removeEventListener("mousedown",e),this.baseElement._passwordVisibleChanged=()=>{},this.baseElement._togglePasswordVisibility=()=>{"password"===t.getAttribute("type")?this.showPasswordVisibility(t):this.hidePasswordVisibility(t)},this.addEventListener("blur",(()=>{setTimeout((()=>{"password"!==t.getAttribute("type")&&"true"!==t.getAttribute("focused")&&this.hidePasswordVisibility(t)}))}))}hidePasswordVisibility(t){t.setAttribute("type","password"),this.setAttribute("password-visible","false")}showPasswordVisibility(t){t.setAttribute("type","text"),this.setAttribute("password-visible","true")}getAutocompleteType(){return this.getAttribute("autocomplete")||"current-password"}handleExternalInputEvents(t){t.addEventListener("input",(t=>{this.value=t.target.value})),t.addEventListener("focus",(()=>{this.setAttribute("focused","true")}))}}))((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 box-sizing: border-box;\n position: relative;\n\t\t\t}\n\t\t\t${(0,s.bi)(w.cssVarList)}\n\t\t\t${(0,s.Pd)("vaadin-password-field")}\n ${(0,s.Wf)("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 -webkit-mask-image: none;\n\t\t\t\tbox-sizing: border-box;\n opacity: 1;\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 :host ::slotted(input) {\n\t\t\t\tmin-height: 0;\n }\n :host([readonly]) ::slotted(input:placeholder-shown) {\n\t\t\t\topacity: 0;\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\t\t\t:host([readonly]) vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\tvaadin-password-field-button[focus-ring] {\n\t\t\t\tbox-shadow: 0 0 0 2px var(${w.cssVarList.inputOutlineColor});\n\t\t\t}\n\n ${(0,s.bz)()}\n \n ::part(reveal-button) {\n align-self: center;\n } \n \n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))},22702:(t,e,i)=>{i.d(e,{Z:()=>n});const n=t=>class extends t{get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}init(){super.init?.();const t=this.querySelector("input");t?.addEventListener("mousedown",(e=>{if(this.isDraggable&&this.isReadOnly){t.setAttribute("inert","true");const i=e.target,n=i.getAttribute("type");i.setAttribute("type","text"),setTimeout((()=>{i.focus()}));const r=e=>{i.setAttribute("type",n),t.removeAttribute("inert"),this.removeEventListener("mouseup",r),this.removeEventListener("dragend",r)};this.addEventListener("dragend",r,{once:!0}),this.addEventListener("mouseup",r,{once:!0})}}))}}},2886:(t,e,i)=>{i.d(e,{S:()=>v,f:()=>l});var n=i(94978),r=i(33346),o=i(2061),a=i(54567),s=i(27487);const l=(0,a.iY)("policy-validation"),p=["data","active-policies","overrides","data-password-policy-value-minlength"],d=["label","value",...p];class u extends((0,r.s)({componentName:l,baseSelector:":host > div"})){#t;#e=[];#i;static get observedAttributes(){return d}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <div class="label"></div>\n <ul></ul>\n </div>\n <style>\n :host > div {\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n }\n .label {\n max-width: 100%;\n text-wrap: wrap;\n overflow-wrap: break-word;\n }\n .hide-label .label {\n display: none;\n }\n ul {\n display: flex;\n flex-direction: column;\n padding: 0;\n margin: 0;\n }\n ul, li {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n li::before {\n display: inline-block;\n width: 1em;\n text-align: center;\n }\n </style>\n\t\t',this.panel=this.shadowRoot.querySelector(":host > div"),this.label=this.shadowRoot.querySelector(".label"),this.list=this.shadowRoot.querySelector("ul")}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback?.(t,e,i),e!==i){if("label"===t&&this.updateLabel(i),p.includes(t)){if("data"===t)try{this.availablePolicies=JSON.parse(i)}catch{console.error("Failed to set available policies")}if("active-policies"===t&&(this.#e=(i||"").split(",")),"data-password-policy-value-minlength"===t){const t=Number(i);!Number.isNaN(t)&&t>0&&(this.#i={...this.#i,minlength:{value:`${t}`}})}}this.renderItems(this.#t,this.#e,this.#i)}}get availablePolicies(){return this.#t||[]}set availablePolicies(t){this.#t=t}get value(){return this.getAttribute("value")||""}validate(){let t=this.#t;return this.#i&&(t=this.#t.map((t=>this.#i[t.id]?{...t,data:this.#i[t.id]}:t))),this.#e.reduce(((e,i)=>{const n=t.find((t=>t.id===i));if(!n)return e;const{pattern:r,message:o,data:a}=n;if(!r||!o)return e;const l={valid:new RegExp((0,s.I)(r,a)).test(this.value),message:(0,s.I)(o,a),id:i};return e.push(l),e}),[])}get isValid(){return!this.validate().some((({valid:t})=>!1===t))}getValidationItemTemplate({valid:t,message:e}){return`\n <li class="item" data-valid="${this.value?t:"none"}">\n <span class="message">${e}</span>\n </li>\n `}renderItems(t,e){t&&e.length&&(this.list.innerHTML=this.validate().map(this.getValidationItemTemplate.bind(this)).join(""))}updateLabel(t){t?(this.label.innerHTML=t,this.classList.remove("hide-label")):(this.classList.add("hide-label"),this.label.innerHTML="")}}const{host:c,item:h,symbolDefault:b,symbolSuccess:m,symbolError:y}={host:{selector:()=>":host > div"},item:{selector:()=>".item"},symbolDefault:{selector:()=>'.item[data-valid="none"]::before'},symbolSuccess:{selector:()=>'.item[data-valid="true"]::before'},symbolError:{selector:()=>'.item[data-valid="false"]::before'}},v=(0,o.qC)((0,n.yk)({componentNameOverride:(0,a.iY)("input-wrapper")}),(0,n.yk)({mappings:{hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},padding:{},borderWidth:{...c,property:"border-width"},borderStyle:{...c,property:"border-style"},borderColor:{...c,property:"border-color"},borderRadius:{...c,property:"border-radius"},backgroundColor:{...c,property:"background-color"},textColor:{property:"color"},labelMargin:{...c,property:"gap"},itemsSpacing:{...h,property:"line-height"},itemSymbolSuccessColor:{...m,property:"color"},itemSymbolErrorColor:{...y,property:"color"},itemSymbolDefault:{...b,property:"content"},itemSymbolSuccess:{...m,property:"content"},itemSymbolError:{...y,property:"content"}}}),n.e4,n.Ae)(u)},27487:(t,e,i)=>{i.d(e,{I:()=>n});const n=(t,e)=>t.replace(/{{(\w+)+}}/g,((t,i)=>e?.[i]||t))},85423:(t,e,i)=>{i.d(e,{Gc:()=>o,X$:()=>r,nC:()=>n});const n=(t,e)=>{const i=document.createElement("slot");return i.setAttribute("name",t),i.setAttribute("slot",e),i},r=(t,e,i)=>{const n=document.createElement("input");return n.setAttribute("slot",t),n.setAttribute("type",e),n.setAttribute("data-hidden-input","true"),n.setAttribute("autocomplete",i),n},o=(t,e,i)=>{const n=getComputedStyle(t),r=n.getPropertyValue("height"),o=n.getPropertyValue("padding-left"),a=n.getPropertyValue("padding-right"),s=n.getPropertyValue("font-size"),l=n.getPropertyValue("font-family"),p=n.getPropertyValue("letter-spacing"),d=n.getPropertyValue("caret-color"),u=((t,e)=>{t.value="_";const i=e.getPropertyValue("color");return t.value="",i})(t,n);e.style=`\n all: unset !important;\n position: absolute !important;\n background-color: transparent !important;\n color: ${u} !important;\n height: ${r} !important;\n left: ${o} !important;\n right: ${a} !important;\n font-size: ${s} !important;\n font-family: ${l} !important;\n letter-spacing: ${p} !important;\n caret-color: ${d} !important;\n ${i||""}\n `}},54201:(t,e,i)=>{i.d(e,{B:()=>d,DY:()=>l,PH:()=>p,Pd:()=>a,TX:()=>r,Wf:()=>c,bi:()=>n,bz:()=>h,jI:()=>s,jl:()=>o,wm:()=>u});const n=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",p=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${r(t)}\n ${a(t)}\n ${s(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7055,1842,8106,4570],{73878:(t,e,i)=>{i.d(e,{P:()=>a});var n=i(2061),r=i(94978),o=i(33346);const a=(...t)=>(0,n.qC)(r.wX,r.li,r.QT,r.mE)((0,o.s)(...t))},60395:(t,e,i)=>{i.d(e,{f:()=>d,o:()=>v});var n=i(54567),r=i(2061),o=i(94978),a=i(85857),s=i(19876),l=i(54201),p=i(2886);const d=(0,n.iY)("new-password"),u=p.S.cssVarList,{host:c,label:h,internalInputsWrapper:b,errorMessage:y,helperText:m,passwordInput:g,policyPreview: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)"},passwordInput:{selector:"descope-password"},policyPreview:{selector:"descope-policy-validation"}},v=(0,r.qC)((0,o.yk)({mappings:{fontSize:[c,{},{selector:s.v.componentName,property:s.v.cssVarList.fontSize}],fontFamily:[h,y,m],labelFontSize:{...h,property:"font-size"},labelFontWeight:{...h,property:"font-weight"},labelTextColor:{...h,property:"color"},errorMessageTextColor:{...y,property:"color"},hostWidth:{...c,property:"width"},hostMinWidth:{...c,property:"min-width"},hostDirection:[{...c,property:"direction"},{...g,property:s.v.cssVarList.hostDirection}],inputsRequiredIndicator:{...c,property:"content"},spaceBetweenInputs:{...b,property:"gap"},policyPreviewBackgroundColor:{...f,property:u.backgroundColor},policyPreviewPadding:{...f,property:u.padding},valueInputHeight:{...g,property:s.v.cssVarList.valueInputHeight},valueInputMarginBottom:{...g,property:s.v.cssVarList.valueInputMarginBottom}}}),o.e4,(0,o.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>\n </${a.f}>\n\t\t\t`,this.setAttribute("external-input","true"),this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(a.f),this.passwordInput=this.inputElement.querySelector('[data-id="password"]'),this.confirmInput=this.inputElement.querySelector('[data-id="confirm"]'),this.createExternalInput(this.passwordInput,"external-password-input"),this.createExternalInput(this.confirmInput,"external-confirm-input"),(0,n.oP)(this,this.inputElement,{includeAttrs:["password-label","password-placeholder","confirm-label","confirm-placeholder","full-width","size","bordered","label","has-confirm","invalid","readonly","draggable","has-validation","policy-label","active-policies","available-policies","data-password-policy-value-minlength","label-type"]})}createExternalInput(t,e){const i=t.querySelector("input"),n=document.createElement("slot"),r=i.getAttribute("slot");n.setAttribute("name",e),n.setAttribute("slot",r),t.appendChild(n),i.setAttribute("slot",e),i.setAttribute("data-hidden-input","true"),this.appendChild(i)}}))((0,o.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 :host ::part(error-message) {\n direction: ltr;\n }\n\t\t${(0,l.bi)(s.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\tpadding: 0;\n\t\t}\n\t\tdescope-new-password-internal > .wrapper {\n -webkit-mask-image: none;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\tdescope-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 descope-policy-validation {\n margin-top: 8px;\n display: flex;\n }\n descope-policy-validation.hidden {\n display: none;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:d}))},85857:(t,e,i)=>{i.d(e,{f:()=>n});const n=(0,i(54567).iY)("new-password-internal")},1545:(t,e,i)=>{i.r(e);var n=i(73878),r=i(54567),o=i(60395),a=i(85857);const s=/^password-/,l=/^confirm-/,p=(t,e)=>t.replace(e,""),d=["password-label","password-placeholder"],u=["confirm-label","confirm-placeholder"],c=["has-confirm","disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable","autocomplete","label-type"],h=[].concat(c,d,u,["has-validation"]),b=(0,n.P)({componentName:a.f,baseSelector:"div"});customElements.define(a.f,class extends b{static get observedAttributes(){return[].concat(b.observedAttributes||[],h)}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")}onHasConfirmChange(t){this.confirmInput.style.display=t?"":"none"}onHasValidationChange(t){this.policyPanel.style.display=t?"":"none"}get hasValidation(){return"true"===this.getAttribute("has-validation")}getValidity(){if(!this.policyPanel.isValid)return{patternMismatch:!0};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,this.hasValidation)}renderInputs(){this.wrapperEle.innerHTML='\n <div>\n <descope-password autocomplete="new-password" data-id="password"></descope-password>\n <descope-policy-validation></descope-policy-validation>\n </div>\n <descope-password autocomplete="new-password" data-id="confirm"></descope-password>\n ',this.passwordInput=this.querySelector('[data-id="password"]'),this.confirmInput=this.querySelector('[data-id="confirm"]'),this.policyPanel=this.querySelector("descope-policy-validation"),this.inputs=[this.passwordInput,this.confirmInput],this.initInputs(),this.passwordInput.addEventListener("input",(t=>{this.policyPanel.setAttribute("value",t.target.value)})),(0,r.oP)(this,this.policyPanel,{includeAttrs:["policy-label","available-policies","active-policies","data-password-policy-value-minlength"],mapAttrs:{"policy-label":"label","available-policies":"data"}})}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(${o.o.cssVarList.inputsRequiredIndicator});\n width: 1em;\n text-align: center;\n\t\t\t\t}\n :host ::part(required-indicator) {\n display: inline-flex;\n }\n\t\t\t\t`,t?.shadowRoot.appendChild(e)}))}get isInvalid(){return this.hasAttribute("invalid")&&"false"!==this.getAttribute("invalid")}handleInputsInvalidAttribute(){this.inputs.forEach((t=>{t&&(0,r.FX)(t,(e=>{if(e.includes("invalid")){const e=t.getAttribute("invalid"),i=this.getAttribute("invalid");this.isInvalid&&i!==e&&t.setAttribute("invalid","true")}}),{})}))}initInputs(){this.handleIndicatorStyle(),this.handleInputsInvalidAttribute(),this.handleFocusEventsDispatching(this.inputs)}toggleBooleanAttribute(t,e,i){null===i?t?.removeAttribute(e):t?.setAttribute(e,i)}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&("has-validation"===t?this.onHasValidationChange("true"===i):"has-confirm"===t?this.onHasConfirmChange("true"===i):c.includes(t)?this.inputs.forEach((e=>this.toggleBooleanAttribute(e,t,i))):d.includes(t)?this.toggleBooleanAttribute(this.passwordInput,p(t,s),i):u.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,p(t,l),i))}})},88974:(t,e,i)=>{i.r(e),i.d(e,{NewPasswordClass:()=>n.o});var n=i(60395);i(19357),i(79279),i(38558),i(1545),customElements.define(n.f,n.o)},19876:(t,e,i)=>{i.d(e,{f:()=>p,v:()=>w});var n=i(94978),r=i(2061),o=i(54567),a=i(22702),s=i(54201),l=i(85423);const p=(0,o.iY)("password"),{host:d,inputField:u,inputElement:c,inputElementPlaceholder:h,revealButtonContainer:b,revealButtonIcon:y,label:m,requiredIndicator:g,errorMessage:f,helperText:v}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:()=>":host 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)"}},w=(0,r.qC)((0,n.yk)({mappings:{hostWidth:{...d,property:"width"},hostMinWidth:{...d,property:"min-width"},hostDirection:{...d,property:"direction"},fontSize:[{},d],fontFamily:[m,u,f,v],inputHeight:{...u,property:"height"},inputHorizontalPadding:[{...c,property:"padding-left"},{...c,property:"padding-right"}],inputBackgroundColor:{...u,property:"background-color"},inputBorderStyle:{...u,property:"border-style"},inputBorderWidth:{...u,property:"border-width"},inputBorderColor:{...u,property:"border-color"},inputBorderRadius:{...u,property:"border-radius"},inputOutlineColor:{...u,property:"outline-color"},inputOutlineStyle:{...u,property:"outline-style"},inputOutlineOffset:{...u,property:"outline-offset"},inputOutlineWidth:{...u,property:"outline-width"},labelFontSize:{...m,property:"font-size"},labelFontWeight:{...m,property:"font-weight"},labelTextColor:[{...m,property:"color"},{...g,property:"color"}],labelRequiredIndicator:{...g,property:"content"},errorMessageTextColor:{...f,property:"color"},inputPlaceholderTextColor:[{...h,property:"color"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"color"}],inputValueTextColor:[{...c,property:"color"},{selector:()=>":host ::slotted(input)",property:"color"}],revealButtonOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],revealButtonSize:{...b,property:"font-size"},revealButtonColor:{...y,property:"color"},labelPosition:{...m,property:"position"},labelTopPosition:{...m,property:"top"},labelHorizontalPosition:[{...m,property:"left"},{...m,property:"right"}],inputTransformY:{...m,property:"transform"},inputTransition:{...m,property:"transition"},marginInlineStart:{...m,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...c,property:"opacity"}],inputVerticalAlignment:{...u,property:"align-items"},valueInputHeight:{...c,property:"height"}}}),n.e4,(0,n.dj)({proxyProps:["value","selectionStart"]}),n.Ae,a.Z,(t=>class extends t{init(){super.init?.(),this.baseElement.checkValidity=()=>{},this.setAttribute("external-input","true");const t=this.baseElement.querySelector("input"),e=(0,l.nC)("external-input","suffix");this.baseElement.appendChild(e);const i=(0,l.X$)("external-input","password",this.getAutocompleteType());this.handlePasswordVisibility(i),setTimeout((()=>{(0,l.Gc)(t,i,"\n width: calc(100% - 3em) !important;\n ")})),this.handleExternalInputEvents(i),(0,o.tg)(t,i,{includeAttrs:["type","readonly"]}),(0,o.tg)(this,i,{includeAttrs:["focused"]}),t.addEventListener("focus",(t=>{t.preventDefault(),t.isTrusted&&i.focus()})),this.addEventListener("focus",(t=>{t.preventDefault(),this.focus()})),this.appendChild(i)}handlePasswordVisibility(t){const e=this.baseElement.__boundRevealButtonMouseDown;this.baseElement.querySelector("vaadin-password-field-button").removeEventListener("mousedown",e),this.baseElement._passwordVisibleChanged=()=>{},this.baseElement._togglePasswordVisibility=()=>{"password"===t.getAttribute("type")?this.showPasswordVisibility(t):this.hidePasswordVisibility(t)},this.addEventListener("blur",(()=>{setTimeout((()=>{"password"!==t.getAttribute("type")&&"true"!==t.getAttribute("focused")&&this.hidePasswordVisibility(t)}))}))}hidePasswordVisibility(t){t.setAttribute("type","password"),this.setAttribute("password-visible","false")}showPasswordVisibility(t){t.setAttribute("type","text"),this.setAttribute("password-visible","true")}getAutocompleteType(){return this.getAttribute("autocomplete")||"current-password"}handleExternalInputEvents(t){t.addEventListener("input",(t=>{this.value=t.target.value})),t.addEventListener("focus",(()=>{this.setAttribute("focused","true")}))}}))((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 box-sizing: border-box;\n position: relative;\n\t\t\t}\n\t\t\t${(0,s.bi)(w.cssVarList)}\n\t\t\t${(0,s.Pd)("vaadin-password-field")}\n ${(0,s.Wf)("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 -webkit-mask-image: none;\n\t\t\t\tbox-sizing: border-box;\n opacity: 1;\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 :host ::slotted(input) {\n\t\t\t\tmin-height: 0;\n }\n :host([readonly]) ::slotted(input:placeholder-shown) {\n\t\t\t\topacity: 0;\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\t\t\t:host([readonly]) vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\tvaadin-password-field-button[focus-ring] {\n\t\t\t\tbox-shadow: 0 0 0 2px var(${w.cssVarList.inputOutlineColor});\n\t\t\t}\n\n ${(0,s.bz)()}\n\n :host ::slotted(input) {\n display: none !important;\n }\n \n ::part(reveal-button) {\n align-self: center;\n } \n \n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))},79279:(t,e,i)=>{i.r(e),i.d(e,{PasswordClass:()=>n.v}),i(17056);var n=i(19876);customElements.define(n.f,n.v)},22702:(t,e,i)=>{i.d(e,{Z:()=>n});const n=t=>class extends t{get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}init(){super.init?.();const t=this.querySelector("input");t?.addEventListener("mousedown",(e=>{if(this.isDraggable&&this.isReadOnly){t.setAttribute("inert","true");const i=e.target,n=i.getAttribute("type");i.setAttribute("type","text"),setTimeout((()=>{i.focus()}));const r=e=>{i.setAttribute("type",n),t.removeAttribute("inert"),this.removeEventListener("mouseup",r),this.removeEventListener("dragend",r)};this.addEventListener("dragend",r,{once:!0}),this.addEventListener("mouseup",r,{once:!0})}}))}}},2886:(t,e,i)=>{i.d(e,{S:()=>g,f:()=>l});var n=i(94978),r=i(33346),o=i(2061),a=i(54567),s=i(27487);const l=(0,a.iY)("policy-validation"),p=["data","active-policies","overrides","data-password-policy-value-minlength"],d=["label","value",...p];class u extends((0,r.s)({componentName:l,baseSelector:":host > div"})){#t;#e=[];#i;static get observedAttributes(){return d}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <div class="label"></div>\n <ul></ul>\n </div>\n <style>\n :host > div {\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n }\n .label {\n max-width: 100%;\n text-wrap: wrap;\n overflow-wrap: break-word;\n }\n .hide-label .label {\n display: none;\n }\n ul {\n display: flex;\n flex-direction: column;\n padding: 0;\n margin: 0;\n }\n ul, li {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n li::before {\n display: inline-block;\n width: 1em;\n text-align: center;\n }\n </style>\n\t\t',this.panel=this.shadowRoot.querySelector(":host > div"),this.label=this.shadowRoot.querySelector(".label"),this.list=this.shadowRoot.querySelector("ul")}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback?.(t,e,i),e!==i){if("label"===t&&this.updateLabel(i),p.includes(t)){if("data"===t)try{this.availablePolicies=JSON.parse(i)}catch{console.error("Failed to set available policies")}if("active-policies"===t&&(this.#e=(i||"").split(",")),"data-password-policy-value-minlength"===t){const t=Number(i);!Number.isNaN(t)&&t>0&&(this.#i={...this.#i,minlength:{value:`${t}`}})}}this.renderItems(this.#t,this.#e,this.#i)}}get availablePolicies(){return this.#t||[]}set availablePolicies(t){this.#t=t}get value(){return this.getAttribute("value")||""}validate(){let t=this.#t;return this.#i&&(t=this.#t.map((t=>this.#i[t.id]?{...t,data:this.#i[t.id]}:t))),this.#e.reduce(((e,i)=>{const n=t.find((t=>t.id===i));if(!n)return e;const{pattern:r,message:o,data:a}=n;if(!r||!o)return e;const l={valid:new RegExp((0,s.I)(r,a)).test(this.value),message:(0,s.I)(o,a),id:i};return e.push(l),e}),[])}get isValid(){return!this.validate().some((({valid:t})=>!1===t))}getValidationItemTemplate({valid:t,message:e}){return`\n <li class="item" data-valid="${this.value?t:"none"}">\n <span class="message">${e}</span>\n </li>\n `}renderItems(t,e){t&&e.length&&(this.list.innerHTML=this.validate().map(this.getValidationItemTemplate.bind(this)).join(""))}updateLabel(t){t?(this.label.innerHTML=t,this.classList.remove("hide-label")):(this.classList.add("hide-label"),this.label.innerHTML="")}}const{host:c,item:h,symbolDefault:b,symbolSuccess:y,symbolError:m}={host:{selector:()=>":host > div"},item:{selector:()=>".item"},symbolDefault:{selector:()=>'.item[data-valid="none"]::before'},symbolSuccess:{selector:()=>'.item[data-valid="true"]::before'},symbolError:{selector:()=>'.item[data-valid="false"]::before'}},g=(0,o.qC)((0,n.yk)({componentNameOverride:(0,a.iY)("input-wrapper")}),(0,n.yk)({mappings:{hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},padding:{},borderWidth:{...c,property:"border-width"},borderStyle:{...c,property:"border-style"},borderColor:{...c,property:"border-color"},borderRadius:{...c,property:"border-radius"},backgroundColor:{...c,property:"background-color"},textColor:{property:"color"},labelMargin:{...c,property:"gap"},itemsSpacing:{...h,property:"line-height"},itemSymbolSuccessColor:{...y,property:"color"},itemSymbolErrorColor:{...m,property:"color"},itemSymbolDefault:{...b,property:"content"},itemSymbolSuccess:{...y,property:"content"},itemSymbolError:{...m,property:"content"}}}),n.e4,n.Ae)(u)},27487:(t,e,i)=>{i.d(e,{I:()=>n});const n=(t,e)=>t.replace(/{{(\w+)+}}/g,((t,i)=>e?.[i]||t))},38558:(t,e,i)=>{i.r(e),i.d(e,{PolicyValidationClass:()=>n.S});var n=i(2886);customElements.define(n.f,n.S)},56417:(t,e,i)=>{i.d(e,{f:()=>l,z:()=>d});var n=i(94978),r=i(4447),o=i(2061),a=i(54567),s=i(54201);const l=(0,a.iY)("text-field"),p=["type","label-type"],d=(0,o.qC)((0,n.yk)({mappings:r.Z}),n.e4,(0,n.dj)({proxyProps:["value","selectionStart"]}),n.Ae,(t=>class extends t{static get observedAttributes(){return p.concat(t.observedAttributes||[])}onLabelClick(){this.focus()}attributeChangedCallback(t,e,i){super.attributeChangeCallback?.(t,e,i),"type"===t&&this.baseElement._setType(i),e!==i&&"label-type"===t&&("floating"===i?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick))}get isExternalInput(){return"true"===this.getAttribute("external-input")}constructor(){if(super(),this.isExternalInput){const t=this.baseElement.querySelector("input");this.inputSlot=document.createElement("slot"),this.focus=()=>{t.focus()},this.inputSlot.setAttribute("name","input"),this.inputSlot.setAttribute("slot","input"),this.baseElement.appendChild(this.inputSlot),this.appendChild(t)}}}))((0,n.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(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n } \n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n } \n ${(0,s.Wf)("vaadin-text-field")}\n\t\t\t${(0,s.bi)(d.cssVarList)}\n\t\t\t${(0,s.wm)("vaadin-text-field",d.cssVarList)}\n ${(0,s.bz)()}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},19357:(t,e,i)=>{i.r(e),i.d(e,{TextFieldClass:()=>n.z}),i(79789);var n=i(56417);customElements.define(n.f,n.z)},4447:(t,e,i)=>{i.d(e,{Z:()=>g});const{host:n,label:r,placeholder:o,requiredIndicator:a,inputField:s,input:l,helperText:p,errorMessage:d,disabledPlaceholder:u,inputDisabled:c,externalInput:h,externalInputDisabled:b,externalPlaceholder:y,externalDisabledPlaceholder:m}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},g={fontSize:[{},n],fontFamily:[r,s,p,d],labelFontSize:{...r,property:"font-size"},labelFontWeight:{...r,property:"font-weight"},labelTextColor:[{...r,property:"color"},{...a,property:"color"},{...r,property:"-webkit-text-fill-color"},{...a,property:"-webkit-text-fill-color"}],hostWidth:{...n,property:"width"},hostMinWidth:{...n,property:"min-width"},hostDirection:{...n,property:"direction"},inputBackgroundColor:{...s,property:"background-color"},errorMessageTextColor:{...d,property:"color"},helperTextColor:{...p,property:"-webkit-text-fill-color"},inputValueTextColor:[{...s,property:"color"},{...c,property:"-webkit-text-fill-color"},{...b,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...l,property:"color"},{...h,property:"color"}],labelRequiredIndicator:{...a,property:"content"},inputBorderColor:{...s,property:"border-color"},inputBorderWidth:{...s,property:"border-width"},inputBorderStyle:{...s,property:"border-style"},inputBorderRadius:{...s,property:"border-radius"},inputHeight:{...s,property:"height"},inputHorizontalPadding:[{...l,property:"padding-left"},{...l,property:"padding-right"},{...h,property:"padding-left"},{...h,property:"padding-right"}],inputOutlineColor:{...s,property:"outline-color"},inputOutlineStyle:{...s,property:"outline-style"},inputOutlineWidth:{...s,property:"outline-width"},inputOutlineOffset:{...s,property:"outline-offset"},inputTextAlign:[{...l,property:"text-align"},{...h,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...o,property:"color"},{...y,property:"color"},{...u,property:"-webkit-text-fill-color"},{...m,property:"-webkit-text-fill-color"}],labelPosition:{...r,property:"position"},labelTopPosition:{...r,property:"top"},labelHorizontalPosition:[{...r,property:"left"},{...r,property:"right"}],inputTransformY:{...r,property:"transform"},inputTransition:{...r,property:"transition"},marginInlineStart:{...r,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...y,property:"opacity"}],inputVerticalAlignment:[{...s,property:"align-items"},{...h,property:"align-items"}],valueInputHeight:[{...l,property:"height"},{...h,property:"height"}],valueInputMarginBottom:[{...l,property:"margin-bottom"},{...h,property:"margin-bottom"}]}},85423:(t,e,i)=>{i.d(e,{Gc:()=>o,X$:()=>r,nC:()=>n});const n=(t,e)=>{const i=document.createElement("slot");return i.setAttribute("name",t),i.setAttribute("slot",e),i},r=(t,e,i)=>{const n=document.createElement("input");return n.setAttribute("slot",t),n.setAttribute("type",e),n.setAttribute("data-hidden-input","true"),n.setAttribute("autocomplete",i),n},o=(t,e,i)=>{const n=getComputedStyle(t),r=n.getPropertyValue("height"),o=n.getPropertyValue("padding-left"),a=n.getPropertyValue("padding-right"),s=n.getPropertyValue("font-size"),l=n.getPropertyValue("font-family"),p=n.getPropertyValue("letter-spacing"),d=n.getPropertyValue("caret-color"),u=((t,e)=>{t.value="_";const i=e.getPropertyValue("color");return t.value="",i})(t,n);e.style=`\n all: unset !important;\n position: absolute !important;\n background-color: transparent !important;\n color: ${u} !important;\n height: ${r} !important;\n left: ${o} !important;\n right: ${a} !important;\n font-size: ${s} !important;\n font-family: ${l} !important;\n letter-spacing: ${p} !important;\n caret-color: ${d} !important;\n ${i||""}\n `}},54201:(t,e,i)=>{i.d(e,{B:()=>d,DY:()=>l,PH:()=>p,Pd:()=>a,TX:()=>r,Wf:()=>c,bi:()=>n,bz:()=>h,jI:()=>s,jl:()=>o,wm:()=>u});const n=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",p=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${r(t)}\n ${a(t)}\n ${s(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '},79789:(t,e,i)=>{i(58725),i(18005)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7055,1842,8106,4570],{73878:(t,e,i)=>{i.d(e,{P:()=>a});var n=i(2061),r=i(94978),o=i(33346);const a=(...t)=>(0,n.qC)(r.wX,r.li,r.QT,r.mE)((0,o.s)(...t))},60395:(t,e,i)=>{i.d(e,{f:()=>d,o:()=>v});var n=i(54567),r=i(2061),o=i(94978),a=i(85857),s=i(19876),l=i(54201),p=i(2886);const d=(0,n.iY)("new-password"),u=p.S.cssVarList,{host:c,label:h,internalInputsWrapper:b,errorMessage:y,helperText:m,passwordInput:g,policyPreview: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)"},passwordInput:{selector:"descope-password"},policyPreview:{selector:"descope-policy-validation"}},v=(0,r.qC)((0,o.yk)({mappings:{fontSize:[c,{},{selector:s.v.componentName,property:s.v.cssVarList.fontSize}],fontFamily:[h,y,m],labelFontSize:{...h,property:"font-size"},labelFontWeight:{...h,property:"font-weight"},labelTextColor:{...h,property:"color"},errorMessageTextColor:{...y,property:"color"},hostWidth:{...c,property:"width"},hostMinWidth:{...c,property:"min-width"},hostDirection:[{...c,property:"direction"},{...g,property:s.v.cssVarList.hostDirection}],inputsRequiredIndicator:{...c,property:"content"},spaceBetweenInputs:{...b,property:"gap"},policyPreviewBackgroundColor:{...f,property:u.backgroundColor},policyPreviewPadding:{...f,property:u.padding},valueInputHeight:{...g,property:s.v.cssVarList.valueInputHeight},valueInputMarginBottom:{...g,property:s.v.cssVarList.valueInputMarginBottom}}}),o.e4,(0,o.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>\n </${a.f}>\n\t\t\t`,this.setAttribute("external-input","true"),this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(a.f),this.passwordInput=this.inputElement.querySelector('[data-id="password"]'),this.confirmInput=this.inputElement.querySelector('[data-id="confirm"]'),this.createExternalInput(this.passwordInput,"external-password-input"),this.createExternalInput(this.confirmInput,"external-confirm-input"),(0,n.oP)(this,this.inputElement,{includeAttrs:["password-label","password-placeholder","confirm-label","confirm-placeholder","full-width","size","bordered","label","has-confirm","invalid","readonly","draggable","has-validation","policy-label","active-policies","available-policies","data-password-policy-value-minlength","label-type"]})}createExternalInput(t,e){const i=t.querySelector("input"),n=document.createElement("slot"),r=i.getAttribute("slot");n.setAttribute("name",e),n.setAttribute("slot",r),t.appendChild(n),i.setAttribute("slot",e),i.setAttribute("data-hidden-input","true"),this.appendChild(i)}}))((0,o.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 :host ::part(error-message) {\n direction: ltr;\n }\n\t\t${(0,l.bi)(s.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\tpadding: 0;\n\t\t}\n\t\tdescope-new-password-internal > .wrapper {\n -webkit-mask-image: none;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\tdescope-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 descope-policy-validation {\n margin-top: 8px;\n display: flex;\n }\n descope-policy-validation.hidden {\n display: none;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:d}))},85857:(t,e,i)=>{i.d(e,{f:()=>n});const n=(0,i(54567).iY)("new-password-internal")},1545:(t,e,i)=>{i.r(e);var n=i(73878),r=i(54567),o=i(60395),a=i(85857);const s=/^password-/,l=/^confirm-/,p=(t,e)=>t.replace(e,""),d=["password-label","password-placeholder"],u=["confirm-label","confirm-placeholder"],c=["has-confirm","disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable","autocomplete","label-type"],h=[].concat(c,d,u,["has-validation"]),b=(0,n.P)({componentName:a.f,baseSelector:"div"});customElements.define(a.f,class extends b{static get observedAttributes(){return[].concat(b.observedAttributes||[],h)}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")}onHasConfirmChange(t){this.confirmInput.style.display=t?"":"none"}onHasValidationChange(t){this.policyPanel.style.display=t?"":"none"}get hasValidation(){return"true"===this.getAttribute("has-validation")}getValidity(){if(!this.policyPanel.isValid)return{patternMismatch:!0};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,this.hasValidation)}renderInputs(){this.wrapperEle.innerHTML='\n <div>\n <descope-password autocomplete="new-password" data-id="password"></descope-password>\n <descope-policy-validation></descope-policy-validation>\n </div>\n <descope-password autocomplete="new-password" data-id="confirm"></descope-password>\n ',this.passwordInput=this.querySelector('[data-id="password"]'),this.confirmInput=this.querySelector('[data-id="confirm"]'),this.policyPanel=this.querySelector("descope-policy-validation"),this.inputs=[this.passwordInput,this.confirmInput],this.initInputs(),this.passwordInput.addEventListener("input",(t=>{this.policyPanel.setAttribute("value",t.target.value)})),(0,r.oP)(this,this.policyPanel,{includeAttrs:["policy-label","available-policies","active-policies","data-password-policy-value-minlength"],mapAttrs:{"policy-label":"label","available-policies":"data"}})}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(${o.o.cssVarList.inputsRequiredIndicator});\n width: 1em;\n text-align: center;\n\t\t\t\t}\n :host ::part(required-indicator) {\n display: inline-flex;\n }\n\t\t\t\t`,t?.shadowRoot.appendChild(e)}))}get isInvalid(){return this.hasAttribute("invalid")&&"false"!==this.getAttribute("invalid")}handleInputsInvalidAttribute(){this.inputs.forEach((t=>{t&&(0,r.FX)(t,(e=>{if(e.includes("invalid")){const e=t.getAttribute("invalid"),i=this.getAttribute("invalid");this.isInvalid&&i!==e&&t.setAttribute("invalid","true")}}),{})}))}initInputs(){this.handleIndicatorStyle(),this.handleInputsInvalidAttribute(),this.handleFocusEventsDispatching(this.inputs)}toggleBooleanAttribute(t,e,i){null===i?t?.removeAttribute(e):t?.setAttribute(e,i)}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&("has-validation"===t?this.onHasValidationChange("true"===i):"has-confirm"===t?this.onHasConfirmChange("true"===i):c.includes(t)?this.inputs.forEach((e=>this.toggleBooleanAttribute(e,t,i))):d.includes(t)?this.toggleBooleanAttribute(this.passwordInput,p(t,s),i):u.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,p(t,l),i))}})},88974:(t,e,i)=>{i.r(e),i.d(e,{NewPasswordClass:()=>n.o});var n=i(60395);i(19357),i(79279),i(38558),i(1545),customElements.define(n.f,n.o)},19876:(t,e,i)=>{i.d(e,{f:()=>p,v:()=>w});var n=i(94978),r=i(2061),o=i(54567),a=i(22702),s=i(54201),l=i(85423);const p=(0,o.iY)("password"),{host:d,inputField:u,inputElement:c,inputElementPlaceholder:h,revealButtonContainer:b,revealButtonIcon:y,label:m,requiredIndicator:g,errorMessage:f,helperText:v}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:()=>":host 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)"}},w=(0,r.qC)((0,n.yk)({mappings:{hostWidth:{...d,property:"width"},hostMinWidth:{...d,property:"min-width"},hostDirection:{...d,property:"direction"},fontSize:[{},d],fontFamily:[m,u,f,v],inputHeight:{...u,property:"height"},inputHorizontalPadding:[{...c,property:"padding-left"},{...c,property:"padding-right"}],inputBackgroundColor:{...u,property:"background-color"},inputBorderStyle:{...u,property:"border-style"},inputBorderWidth:{...u,property:"border-width"},inputBorderColor:{...u,property:"border-color"},inputBorderRadius:{...u,property:"border-radius"},inputOutlineColor:{...u,property:"outline-color"},inputOutlineStyle:{...u,property:"outline-style"},inputOutlineOffset:{...u,property:"outline-offset"},inputOutlineWidth:{...u,property:"outline-width"},labelFontSize:{...m,property:"font-size"},labelFontWeight:{...m,property:"font-weight"},labelTextColor:[{...m,property:"color"},{...g,property:"color"}],labelRequiredIndicator:{...g,property:"content"},errorMessageTextColor:{...f,property:"color"},inputPlaceholderTextColor:[{...h,property:"color"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"color"}],inputValueTextColor:[{...c,property:"color"},{selector:()=>":host ::slotted(input)",property:"color"}],revealButtonOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],revealButtonSize:{...b,property:"font-size"},revealButtonColor:{...y,property:"color"},labelPosition:{...m,property:"position"},labelTopPosition:{...m,property:"top"},labelHorizontalPosition:[{...m,property:"left"},{...m,property:"right"}],inputTransformY:{...m,property:"transform"},inputTransition:{...m,property:"transition"},marginInlineStart:{...m,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...c,property:"opacity"}],inputVerticalAlignment:{...u,property:"align-items"},valueInputHeight:{...c,property:"height"}}}),n.e4,(0,n.dj)({proxyProps:["value","selectionStart"]}),n.Ae,a.Z,(t=>class extends t{init(){super.init?.(),this.baseElement.checkValidity=()=>{},this.setAttribute("external-input","true");const t=this.baseElement.querySelector("input"),e=(0,l.nC)("external-input","suffix");this.baseElement.appendChild(e);const i=(0,l.X$)("external-input","password",this.getAutocompleteType());this.handlePasswordVisibility(i),setTimeout((()=>{(0,l.Gc)(t,i,"\n width: calc(100% - 3em) !important;\n ")})),this.handleExternalInputEvents(i),(0,o.tg)(t,i,{includeAttrs:["type","readonly"]}),(0,o.tg)(this,i,{includeAttrs:["focused"]}),t.addEventListener("focus",(t=>{t.preventDefault(),t.isTrusted&&i.focus()})),i.addEventListener("input",(t=>{t.target.value?this.setAttribute("has-value","true"):this.removeAttribute("has-value")})),this.addEventListener("focus",(t=>{t.preventDefault(),this.focus()})),this.appendChild(i)}handlePasswordVisibility(t){const e=this.baseElement.__boundRevealButtonMouseDown;this.baseElement.querySelector("vaadin-password-field-button").removeEventListener("mousedown",e),this.baseElement._passwordVisibleChanged=()=>{},this.baseElement._togglePasswordVisibility=()=>{"password"===t.getAttribute("type")?this.showPasswordVisibility(t):this.hidePasswordVisibility(t)},this.addEventListener("blur",(()=>{setTimeout((()=>{"password"!==t.getAttribute("type")&&"true"!==t.getAttribute("focused")&&this.hidePasswordVisibility(t)}))}))}hidePasswordVisibility(t){t.setAttribute("type","password"),this.setAttribute("password-visible","false")}showPasswordVisibility(t){t.setAttribute("type","text"),this.setAttribute("password-visible","true")}getAutocompleteType(){return this.getAttribute("autocomplete")||"current-password"}handleExternalInputEvents(t){t.addEventListener("input",(t=>{this.value=t.target.value})),t.addEventListener("focus",(()=>{this.setAttribute("focused","true")}))}}))((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 box-sizing: border-box;\n position: relative;\n\t\t\t}\n\t\t\t${(0,s.bi)(w.cssVarList)}\n\t\t\t${(0,s.Pd)("vaadin-password-field")}\n ${(0,s.Wf)("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 -webkit-mask-image: none;\n\t\t\t\tbox-sizing: border-box;\n opacity: 1;\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 :host ::slotted(input) {\n\t\t\t\tmin-height: 0;\n }\n :host([readonly]) ::slotted(input:placeholder-shown) {\n\t\t\t\topacity: 0;\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\t\t\t:host([readonly]) vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\tvaadin-password-field-button[focus-ring] {\n\t\t\t\tbox-shadow: 0 0 0 2px var(${w.cssVarList.inputOutlineColor});\n\t\t\t}\n\n ${(0,s.bz)()}\n \n ::part(reveal-button) {\n align-self: center;\n } \n \n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))},79279:(t,e,i)=>{i.r(e),i.d(e,{PasswordClass:()=>n.v}),i(17056);var n=i(19876);customElements.define(n.f,n.v)},22702:(t,e,i)=>{i.d(e,{Z:()=>n});const n=t=>class extends t{get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}init(){super.init?.();const t=this.querySelector("input");t?.addEventListener("mousedown",(e=>{if(this.isDraggable&&this.isReadOnly){t.setAttribute("inert","true");const i=e.target,n=i.getAttribute("type");i.setAttribute("type","text"),setTimeout((()=>{i.focus()}));const r=e=>{i.setAttribute("type",n),t.removeAttribute("inert"),this.removeEventListener("mouseup",r),this.removeEventListener("dragend",r)};this.addEventListener("dragend",r,{once:!0}),this.addEventListener("mouseup",r,{once:!0})}}))}}},2886:(t,e,i)=>{i.d(e,{S:()=>g,f:()=>l});var n=i(94978),r=i(33346),o=i(2061),a=i(54567),s=i(27487);const l=(0,a.iY)("policy-validation"),p=["data","active-policies","overrides","data-password-policy-value-minlength"],d=["label","value",...p];class u extends((0,r.s)({componentName:l,baseSelector:":host > div"})){#t;#e=[];#i;static get observedAttributes(){return d}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <div class="label"></div>\n <ul></ul>\n </div>\n <style>\n :host > div {\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n }\n .label {\n max-width: 100%;\n text-wrap: wrap;\n overflow-wrap: break-word;\n }\n .hide-label .label {\n display: none;\n }\n ul {\n display: flex;\n flex-direction: column;\n padding: 0;\n margin: 0;\n }\n ul, li {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n li::before {\n display: inline-block;\n width: 1em;\n text-align: center;\n }\n </style>\n\t\t',this.panel=this.shadowRoot.querySelector(":host > div"),this.label=this.shadowRoot.querySelector(".label"),this.list=this.shadowRoot.querySelector("ul")}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback?.(t,e,i),e!==i){if("label"===t&&this.updateLabel(i),p.includes(t)){if("data"===t)try{this.availablePolicies=JSON.parse(i)}catch{console.error("Failed to set available policies")}if("active-policies"===t&&(this.#e=(i||"").split(",")),"data-password-policy-value-minlength"===t){const t=Number(i);!Number.isNaN(t)&&t>0&&(this.#i={...this.#i,minlength:{value:`${t}`}})}}this.renderItems(this.#t,this.#e,this.#i)}}get availablePolicies(){return this.#t||[]}set availablePolicies(t){this.#t=t}get value(){return this.getAttribute("value")||""}validate(){let t=this.#t;return this.#i&&(t=this.#t.map((t=>this.#i[t.id]?{...t,data:this.#i[t.id]}:t))),this.#e.reduce(((e,i)=>{const n=t.find((t=>t.id===i));if(!n)return e;const{pattern:r,message:o,data:a}=n;if(!r||!o)return e;const l={valid:new RegExp((0,s.I)(r,a)).test(this.value),message:(0,s.I)(o,a),id:i};return e.push(l),e}),[])}get isValid(){return!this.validate().some((({valid:t})=>!1===t))}getValidationItemTemplate({valid:t,message:e}){return`\n <li class="item" data-valid="${this.value?t:"none"}">\n <span class="message">${e}</span>\n </li>\n `}renderItems(t,e){t&&e.length&&(this.list.innerHTML=this.validate().map(this.getValidationItemTemplate.bind(this)).join(""))}updateLabel(t){t?(this.label.innerHTML=t,this.classList.remove("hide-label")):(this.classList.add("hide-label"),this.label.innerHTML="")}}const{host:c,item:h,symbolDefault:b,symbolSuccess:y,symbolError:m}={host:{selector:()=>":host > div"},item:{selector:()=>".item"},symbolDefault:{selector:()=>'.item[data-valid="none"]::before'},symbolSuccess:{selector:()=>'.item[data-valid="true"]::before'},symbolError:{selector:()=>'.item[data-valid="false"]::before'}},g=(0,o.qC)((0,n.yk)({componentNameOverride:(0,a.iY)("input-wrapper")}),(0,n.yk)({mappings:{hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},padding:{},borderWidth:{...c,property:"border-width"},borderStyle:{...c,property:"border-style"},borderColor:{...c,property:"border-color"},borderRadius:{...c,property:"border-radius"},backgroundColor:{...c,property:"background-color"},textColor:{property:"color"},labelMargin:{...c,property:"gap"},itemsSpacing:{...h,property:"line-height"},itemSymbolSuccessColor:{...y,property:"color"},itemSymbolErrorColor:{...m,property:"color"},itemSymbolDefault:{...b,property:"content"},itemSymbolSuccess:{...y,property:"content"},itemSymbolError:{...m,property:"content"}}}),n.e4,n.Ae)(u)},27487:(t,e,i)=>{i.d(e,{I:()=>n});const n=(t,e)=>t.replace(/{{(\w+)+}}/g,((t,i)=>e?.[i]||t))},38558:(t,e,i)=>{i.r(e),i.d(e,{PolicyValidationClass:()=>n.S});var n=i(2886);customElements.define(n.f,n.S)},56417:(t,e,i)=>{i.d(e,{f:()=>l,z:()=>d});var n=i(94978),r=i(4447),o=i(2061),a=i(54567),s=i(54201);const l=(0,a.iY)("text-field"),p=["type","label-type"],d=(0,o.qC)((0,n.yk)({mappings:r.Z}),n.e4,(0,n.dj)({proxyProps:["value","selectionStart"]}),n.Ae,(t=>class extends t{static get observedAttributes(){return p.concat(t.observedAttributes||[])}onLabelClick(){this.focus()}attributeChangedCallback(t,e,i){super.attributeChangeCallback?.(t,e,i),"type"===t&&this.baseElement._setType(i),e!==i&&"label-type"===t&&("floating"===i?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick))}get isExternalInput(){return"true"===this.getAttribute("external-input")}constructor(){if(super(),this.isExternalInput){const t=this.baseElement.querySelector("input");this.inputSlot=document.createElement("slot"),this.focus=()=>{t.focus()},this.inputSlot.setAttribute("name","input"),this.inputSlot.setAttribute("slot","input"),this.baseElement.appendChild(this.inputSlot),this.appendChild(t)}}}))((0,n.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(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n } \n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n } \n ${(0,s.Wf)("vaadin-text-field")}\n\t\t\t${(0,s.bi)(d.cssVarList)}\n\t\t\t${(0,s.wm)("vaadin-text-field",d.cssVarList)}\n ${(0,s.bz)()}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},19357:(t,e,i)=>{i.r(e),i.d(e,{TextFieldClass:()=>n.z}),i(79789);var n=i(56417);customElements.define(n.f,n.z)},4447:(t,e,i)=>{i.d(e,{Z:()=>g});const{host:n,label:r,placeholder:o,requiredIndicator:a,inputField:s,input:l,helperText:p,errorMessage:d,disabledPlaceholder:u,inputDisabled:c,externalInput:h,externalInputDisabled:b,externalPlaceholder:y,externalDisabledPlaceholder:m}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},g={fontSize:[{},n],fontFamily:[r,s,p,d],labelFontSize:{...r,property:"font-size"},labelFontWeight:{...r,property:"font-weight"},labelTextColor:[{...r,property:"color"},{...a,property:"color"},{...r,property:"-webkit-text-fill-color"},{...a,property:"-webkit-text-fill-color"}],hostWidth:{...n,property:"width"},hostMinWidth:{...n,property:"min-width"},hostDirection:{...n,property:"direction"},inputBackgroundColor:{...s,property:"background-color"},errorMessageTextColor:{...d,property:"color"},helperTextColor:{...p,property:"-webkit-text-fill-color"},inputValueTextColor:[{...s,property:"color"},{...c,property:"-webkit-text-fill-color"},{...b,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...l,property:"color"},{...h,property:"color"}],labelRequiredIndicator:{...a,property:"content"},inputBorderColor:{...s,property:"border-color"},inputBorderWidth:{...s,property:"border-width"},inputBorderStyle:{...s,property:"border-style"},inputBorderRadius:{...s,property:"border-radius"},inputHeight:{...s,property:"height"},inputHorizontalPadding:[{...l,property:"padding-left"},{...l,property:"padding-right"},{...h,property:"padding-left"},{...h,property:"padding-right"}],inputOutlineColor:{...s,property:"outline-color"},inputOutlineStyle:{...s,property:"outline-style"},inputOutlineWidth:{...s,property:"outline-width"},inputOutlineOffset:{...s,property:"outline-offset"},inputTextAlign:[{...l,property:"text-align"},{...h,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...o,property:"color"},{...y,property:"color"},{...u,property:"-webkit-text-fill-color"},{...m,property:"-webkit-text-fill-color"}],labelPosition:{...r,property:"position"},labelTopPosition:{...r,property:"top"},labelHorizontalPosition:[{...r,property:"left"},{...r,property:"right"}],inputTransformY:{...r,property:"transform"},inputTransition:{...r,property:"transition"},marginInlineStart:{...r,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...y,property:"opacity"}],inputVerticalAlignment:[{...s,property:"align-items"},{...h,property:"align-items"}],valueInputHeight:[{...l,property:"height"},{...h,property:"height"}],valueInputMarginBottom:[{...l,property:"margin-bottom"},{...h,property:"margin-bottom"}]}},85423:(t,e,i)=>{i.d(e,{Gc:()=>o,X$:()=>r,nC:()=>n});const n=(t,e)=>{const i=document.createElement("slot");return i.setAttribute("name",t),i.setAttribute("slot",e),i},r=(t,e,i)=>{const n=document.createElement("input");return n.setAttribute("slot",t),n.setAttribute("type",e),n.setAttribute("data-hidden-input","true"),n.setAttribute("autocomplete",i),n},o=(t,e,i)=>{const n=getComputedStyle(t),r=n.getPropertyValue("height"),o=n.getPropertyValue("padding-left"),a=n.getPropertyValue("padding-right"),s=n.getPropertyValue("font-size"),l=n.getPropertyValue("font-family"),p=n.getPropertyValue("letter-spacing"),d=n.getPropertyValue("caret-color"),u=((t,e)=>{t.value="_";const i=e.getPropertyValue("color");return t.value="",i})(t,n);e.style=`\n all: unset !important;\n position: absolute !important;\n background-color: transparent !important;\n color: ${u} !important;\n height: ${r} !important;\n left: ${o} !important;\n right: ${a} !important;\n font-size: ${s} !important;\n font-family: ${l} !important;\n letter-spacing: ${p} !important;\n caret-color: ${d} !important;\n ${i||""}\n `}},54201:(t,e,i)=>{i.d(e,{B:()=>d,DY:()=>l,PH:()=>p,Pd:()=>a,TX:()=>r,Wf:()=>c,bi:()=>n,bz:()=>h,jI:()=>s,jl:()=>o,wm:()=>u});const n=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",p=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${r(t)}\n ${a(t)}\n ${s(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '},79789:(t,e,i)=>{i(58725),i(18005)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8106],{19876:(t,e,n)=>{n.d(e,{f:()=>p,v:()=>v});var i=n(94978),r=n(2061),o=n(54567),s=n(22702),a=n(54201),l=n(85423);const p=(0,o.iY)("password"),{host:d,inputField:u,inputElement:h,inputElementPlaceholder:c,revealButtonContainer:b,revealButtonIcon:y,label:f,requiredIndicator:g,errorMessage:m,helperText:w}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:()=>":host 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,r.qC)((0,i.yk)({mappings:{hostWidth:{...d,property:"width"},hostMinWidth:{...d,property:"min-width"},hostDirection:{...d,property:"direction"},fontSize:[{},d],fontFamily:[f,u,m,w],inputHeight:{...u,property:"height"},inputHorizontalPadding:[{...h,property:"padding-left"},{...h,property:"padding-right"}],inputBackgroundColor:{...u,property:"background-color"},inputBorderStyle:{...u,property:"border-style"},inputBorderWidth:{...u,property:"border-width"},inputBorderColor:{...u,property:"border-color"},inputBorderRadius:{...u,property:"border-radius"},inputOutlineColor:{...u,property:"outline-color"},inputOutlineStyle:{...u,property:"outline-style"},inputOutlineOffset:{...u,property:"outline-offset"},inputOutlineWidth:{...u,property:"outline-width"},labelFontSize:{...f,property:"font-size"},labelFontWeight:{...f,property:"font-weight"},labelTextColor:[{...f,property:"color"},{...g,property:"color"}],labelRequiredIndicator:{...g,property:"content"},errorMessageTextColor:{...m,property:"color"},inputPlaceholderTextColor:[{...c,property:"color"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"color"}],inputValueTextColor:[{...h,property:"color"},{selector:()=>":host ::slotted(input)",property:"color"}],revealButtonOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],revealButtonSize:{...b,property:"font-size"},revealButtonColor:{...y,property:"color"},labelPosition:{...f,property:"position"},labelTopPosition:{...f,property:"top"},labelHorizontalPosition:[{...f,property:"left"},{...f,property:"right"}],inputTransformY:{...f,property:"transform"},inputTransition:{...f,property:"transition"},marginInlineStart:{...f,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...h,property:"opacity"}],inputVerticalAlignment:{...u,property:"align-items"},valueInputHeight:{...h,property:"height"}}}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,s.Z,(t=>class extends t{init(){super.init?.(),this.baseElement.checkValidity=()=>{},this.setAttribute("external-input","true");const t=this.baseElement.querySelector("input"),e=(0,l.nC)("external-input","suffix");this.baseElement.appendChild(e);const n=(0,l.X$)("external-input","password",this.getAutocompleteType());this.handlePasswordVisibility(n),setTimeout((()=>{(0,l.Gc)(t,n,"\n width: calc(100% - 3em) !important;\n ")})),this.handleExternalInputEvents(n),(0,o.tg)(t,n,{includeAttrs:["type","readonly"]}),(0,o.tg)(this,n,{includeAttrs:["focused"]}),t.addEventListener("focus",(t=>{t.preventDefault(),t.isTrusted&&n.focus()})),this.addEventListener("focus",(t=>{t.preventDefault(),this.focus()})),this.appendChild(n)}handlePasswordVisibility(t){const e=this.baseElement.__boundRevealButtonMouseDown;this.baseElement.querySelector("vaadin-password-field-button").removeEventListener("mousedown",e),this.baseElement._passwordVisibleChanged=()=>{},this.baseElement._togglePasswordVisibility=()=>{"password"===t.getAttribute("type")?this.showPasswordVisibility(t):this.hidePasswordVisibility(t)},this.addEventListener("blur",(()=>{setTimeout((()=>{"password"!==t.getAttribute("type")&&"true"!==t.getAttribute("focused")&&this.hidePasswordVisibility(t)}))}))}hidePasswordVisibility(t){t.setAttribute("type","password"),this.setAttribute("password-visible","false")}showPasswordVisibility(t){t.setAttribute("type","text"),this.setAttribute("password-visible","true")}getAutocompleteType(){return this.getAttribute("autocomplete")||"current-password"}handleExternalInputEvents(t){t.addEventListener("input",(t=>{this.value=t.target.value})),t.addEventListener("focus",(()=>{this.setAttribute("focused","true")}))}}))((0,i.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 box-sizing: border-box;\n position: relative;\n\t\t\t}\n\t\t\t${(0,a.bi)(v.cssVarList)}\n\t\t\t${(0,a.Pd)("vaadin-password-field")}\n ${(0,a.Wf)("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 -webkit-mask-image: none;\n\t\t\t\tbox-sizing: border-box;\n opacity: 1;\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 :host ::slotted(input) {\n\t\t\t\tmin-height: 0;\n }\n :host([readonly]) ::slotted(input:placeholder-shown) {\n\t\t\t\topacity: 0;\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\t\t\t:host([readonly]) vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\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\n ${(0,a.bz)()}\n\n :host ::slotted(input) {\n display: none !important;\n }\n \n ::part(reveal-button) {\n align-self: center;\n } \n \n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))},79279:(t,e,n)=>{n.r(e),n.d(e,{PasswordClass:()=>i.v}),n(17056);var i=n(19876);customElements.define(i.f,i.v)},22702:(t,e,n)=>{n.d(e,{Z:()=>i});const i=t=>class extends t{get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}init(){super.init?.();const t=this.querySelector("input");t?.addEventListener("mousedown",(e=>{if(this.isDraggable&&this.isReadOnly){t.setAttribute("inert","true");const n=e.target,i=n.getAttribute("type");n.setAttribute("type","text"),setTimeout((()=>{n.focus()}));const r=e=>{n.setAttribute("type",i),t.removeAttribute("inert"),this.removeEventListener("mouseup",r),this.removeEventListener("dragend",r)};this.addEventListener("dragend",r,{once:!0}),this.addEventListener("mouseup",r,{once:!0})}}))}}},85423:(t,e,n)=>{n.d(e,{Gc:()=>o,X$:()=>r,nC:()=>i});const i=(t,e)=>{const n=document.createElement("slot");return n.setAttribute("name",t),n.setAttribute("slot",e),n},r=(t,e,n)=>{const i=document.createElement("input");return i.setAttribute("slot",t),i.setAttribute("type",e),i.setAttribute("data-hidden-input","true"),i.setAttribute("autocomplete",n),i},o=(t,e,n)=>{const i=getComputedStyle(t),r=i.getPropertyValue("height"),o=i.getPropertyValue("padding-left"),s=i.getPropertyValue("padding-right"),a=i.getPropertyValue("font-size"),l=i.getPropertyValue("font-family"),p=i.getPropertyValue("letter-spacing"),d=i.getPropertyValue("caret-color"),u=((t,e)=>{t.value="_";const n=e.getPropertyValue("color");return t.value="",n})(t,i);e.style=`\n all: unset !important;\n position: absolute !important;\n background-color: transparent !important;\n color: ${u} !important;\n height: ${r} !important;\n left: ${o} !important;\n right: ${s} !important;\n font-size: ${a} !important;\n font-family: ${l} !important;\n letter-spacing: ${p} !important;\n caret-color: ${d} !important;\n ${n||""}\n `}},54201:(t,e,n)=>{n.d(e,{B:()=>d,DY:()=>l,PH:()=>p,Pd:()=>s,TX:()=>r,Wf:()=>h,bi:()=>i,bz:()=>c,jI:()=>a,jl:()=>o,wm:()=>u});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,s=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",p=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${r(t)}\n ${s(t)}\n ${a(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,h=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,c=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8106],{19876:(t,e,n)=>{n.d(e,{f:()=>p,v:()=>v});var i=n(94978),r=n(2061),o=n(54567),s=n(22702),a=n(54201),l=n(85423);const p=(0,o.iY)("password"),{host:d,inputField:u,inputElement:h,inputElementPlaceholder:c,revealButtonContainer:b,revealButtonIcon:y,label:f,requiredIndicator:g,errorMessage:m,helperText:w}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:()=>":host 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,r.qC)((0,i.yk)({mappings:{hostWidth:{...d,property:"width"},hostMinWidth:{...d,property:"min-width"},hostDirection:{...d,property:"direction"},fontSize:[{},d],fontFamily:[f,u,m,w],inputHeight:{...u,property:"height"},inputHorizontalPadding:[{...h,property:"padding-left"},{...h,property:"padding-right"}],inputBackgroundColor:{...u,property:"background-color"},inputBorderStyle:{...u,property:"border-style"},inputBorderWidth:{...u,property:"border-width"},inputBorderColor:{...u,property:"border-color"},inputBorderRadius:{...u,property:"border-radius"},inputOutlineColor:{...u,property:"outline-color"},inputOutlineStyle:{...u,property:"outline-style"},inputOutlineOffset:{...u,property:"outline-offset"},inputOutlineWidth:{...u,property:"outline-width"},labelFontSize:{...f,property:"font-size"},labelFontWeight:{...f,property:"font-weight"},labelTextColor:[{...f,property:"color"},{...g,property:"color"}],labelRequiredIndicator:{...g,property:"content"},errorMessageTextColor:{...m,property:"color"},inputPlaceholderTextColor:[{...c,property:"color"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"color"}],inputValueTextColor:[{...h,property:"color"},{selector:()=>":host ::slotted(input)",property:"color"}],revealButtonOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],revealButtonSize:{...b,property:"font-size"},revealButtonColor:{...y,property:"color"},labelPosition:{...f,property:"position"},labelTopPosition:{...f,property:"top"},labelHorizontalPosition:[{...f,property:"left"},{...f,property:"right"}],inputTransformY:{...f,property:"transform"},inputTransition:{...f,property:"transition"},marginInlineStart:{...f,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...h,property:"opacity"}],inputVerticalAlignment:{...u,property:"align-items"},valueInputHeight:{...h,property:"height"}}}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,s.Z,(t=>class extends t{init(){super.init?.(),this.baseElement.checkValidity=()=>{},this.setAttribute("external-input","true");const t=this.baseElement.querySelector("input"),e=(0,l.nC)("external-input","suffix");this.baseElement.appendChild(e);const n=(0,l.X$)("external-input","password",this.getAutocompleteType());this.handlePasswordVisibility(n),setTimeout((()=>{(0,l.Gc)(t,n,"\n width: calc(100% - 3em) !important;\n ")})),this.handleExternalInputEvents(n),(0,o.tg)(t,n,{includeAttrs:["type","readonly"]}),(0,o.tg)(this,n,{includeAttrs:["focused"]}),t.addEventListener("focus",(t=>{t.preventDefault(),t.isTrusted&&n.focus()})),n.addEventListener("input",(t=>{t.target.value?this.setAttribute("has-value","true"):this.removeAttribute("has-value")})),this.addEventListener("focus",(t=>{t.preventDefault(),this.focus()})),this.appendChild(n)}handlePasswordVisibility(t){const e=this.baseElement.__boundRevealButtonMouseDown;this.baseElement.querySelector("vaadin-password-field-button").removeEventListener("mousedown",e),this.baseElement._passwordVisibleChanged=()=>{},this.baseElement._togglePasswordVisibility=()=>{"password"===t.getAttribute("type")?this.showPasswordVisibility(t):this.hidePasswordVisibility(t)},this.addEventListener("blur",(()=>{setTimeout((()=>{"password"!==t.getAttribute("type")&&"true"!==t.getAttribute("focused")&&this.hidePasswordVisibility(t)}))}))}hidePasswordVisibility(t){t.setAttribute("type","password"),this.setAttribute("password-visible","false")}showPasswordVisibility(t){t.setAttribute("type","text"),this.setAttribute("password-visible","true")}getAutocompleteType(){return this.getAttribute("autocomplete")||"current-password"}handleExternalInputEvents(t){t.addEventListener("input",(t=>{this.value=t.target.value})),t.addEventListener("focus",(()=>{this.setAttribute("focused","true")}))}}))((0,i.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 box-sizing: border-box;\n position: relative;\n\t\t\t}\n\t\t\t${(0,a.bi)(v.cssVarList)}\n\t\t\t${(0,a.Pd)("vaadin-password-field")}\n ${(0,a.Wf)("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 -webkit-mask-image: none;\n\t\t\t\tbox-sizing: border-box;\n opacity: 1;\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 :host ::slotted(input) {\n\t\t\t\tmin-height: 0;\n }\n :host([readonly]) ::slotted(input:placeholder-shown) {\n\t\t\t\topacity: 0;\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\t\t\t:host([readonly]) vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\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\n ${(0,a.bz)()}\n \n ::part(reveal-button) {\n align-self: center;\n } \n \n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))},79279:(t,e,n)=>{n.r(e),n.d(e,{PasswordClass:()=>i.v}),n(17056);var i=n(19876);customElements.define(i.f,i.v)},22702:(t,e,n)=>{n.d(e,{Z:()=>i});const i=t=>class extends t{get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}init(){super.init?.();const t=this.querySelector("input");t?.addEventListener("mousedown",(e=>{if(this.isDraggable&&this.isReadOnly){t.setAttribute("inert","true");const n=e.target,i=n.getAttribute("type");n.setAttribute("type","text"),setTimeout((()=>{n.focus()}));const r=e=>{n.setAttribute("type",i),t.removeAttribute("inert"),this.removeEventListener("mouseup",r),this.removeEventListener("dragend",r)};this.addEventListener("dragend",r,{once:!0}),this.addEventListener("mouseup",r,{once:!0})}}))}}},85423:(t,e,n)=>{n.d(e,{Gc:()=>o,X$:()=>r,nC:()=>i});const i=(t,e)=>{const n=document.createElement("slot");return n.setAttribute("name",t),n.setAttribute("slot",e),n},r=(t,e,n)=>{const i=document.createElement("input");return i.setAttribute("slot",t),i.setAttribute("type",e),i.setAttribute("data-hidden-input","true"),i.setAttribute("autocomplete",n),i},o=(t,e,n)=>{const i=getComputedStyle(t),r=i.getPropertyValue("height"),o=i.getPropertyValue("padding-left"),s=i.getPropertyValue("padding-right"),a=i.getPropertyValue("font-size"),l=i.getPropertyValue("font-family"),p=i.getPropertyValue("letter-spacing"),d=i.getPropertyValue("caret-color"),u=((t,e)=>{t.value="_";const n=e.getPropertyValue("color");return t.value="",n})(t,i);e.style=`\n all: unset !important;\n position: absolute !important;\n background-color: transparent !important;\n color: ${u} !important;\n height: ${r} !important;\n left: ${o} !important;\n right: ${s} !important;\n font-size: ${a} !important;\n font-family: ${l} !important;\n letter-spacing: ${p} !important;\n caret-color: ${d} !important;\n ${n||""}\n `}},54201:(t,e,n)=>{n.d(e,{B:()=>d,DY:()=>l,PH:()=>p,Pd:()=>s,TX:()=>r,Wf:()=>h,bi:()=>i,bz:()=>c,jI:()=>a,jl:()=>o,wm:()=>u});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,s=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",p=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${r(t)}\n ${s(t)}\n ${a(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,h=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,c=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '}}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/web-components-ui",
3
- "version": "1.0.330",
3
+ "version": "1.0.331",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -63,6 +63,14 @@ const customMixin = (superclass) =>
63
63
 
64
64
  syncAttrs(origInput, externalInput, { includeAttrs: ['disabled', 'readonly', 'pattern'] });
65
65
 
66
+ externalInput.addEventListener('input', (e) => {
67
+ if (!e.target.value) {
68
+ this.removeAttribute('has-value');
69
+ } else {
70
+ this.setAttribute('has-value', 'true');
71
+ }
72
+ });
73
+
66
74
  // append external input to component's DOM
67
75
  this.appendChild(externalInput);
68
76
  }
@@ -119,9 +127,6 @@ export const EmailFieldClass = compose(
119
127
  }
120
128
  vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {
121
129
  opacity: 0;
122
- }
123
- :host ::slotted(input) {
124
- display: none !important;
125
130
  }
126
131
  `,
127
132
  excludeAttrsSync: ['tabindex'],
@@ -74,6 +74,14 @@ const customMixin = (superclass) =>
74
74
  }
75
75
  });
76
76
 
77
+ externalInput.addEventListener('input', (e) => {
78
+ if (!e.target.value) {
79
+ this.removeAttribute('has-value');
80
+ } else {
81
+ this.setAttribute('has-value', 'true');
82
+ }
83
+ });
84
+
77
85
  this.addEventListener('focus', (e) => {
78
86
  e.preventDefault();
79
87
  this.focus();
@@ -305,10 +313,6 @@ export const PasswordClass = compose(
305
313
  }
306
314
 
307
315
  ${inputFloatingLabelStyle()}
308
-
309
- :host ::slotted(input) {
310
- display: none !important;
311
- }
312
316
 
313
317
  ::part(reveal-button) {
314
318
  align-self: center;
@@ -58,7 +58,7 @@ const [theme, refs, vars] = createHelperVars(
58
58
  inputVerticalAlignment: 'flex-end',
59
59
  inputTransformY: 'translateY(1.55em)',
60
60
  inputTransition: 'all 75ms ease-in-out',
61
- marginInlineStart: '0', // `calc(0.25em + ${globalRefs.border.sm})`,
61
+ marginInlineStart: '0',
62
62
  valueInputHeight: '1.5702em',
63
63
  valueInputMarginBottom: '0.5em',
64
64