@descope/web-components-ui 1.0.387 → 1.0.389
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.cjs.js +1318 -1209
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1267 -1157
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/5459.js +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
- package/dist/umd/descope-apps-list-index-js.js +1 -1
- package/dist/umd/descope-date-field-index-js.js +1 -1
- package/dist/umd/descope-email-field-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
- package/dist/umd/descope-grid-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/descope-number-field-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/descope-radio-group-index-js.js +1 -1
- package/dist/umd/descope-scopes-list-index-js.js +2 -0
- package/dist/umd/descope-scopes-list-index-js.js.LICENSE.txt +5 -0
- package/dist/umd/descope-text-field-index-js.js +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/package.json +1 -1
- package/src/components/boolean-fields/commonStyles.js +1 -2
- package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +6 -0
- package/src/components/descope-date-field/DateFieldClass.js +6 -1
- package/src/components/descope-scopes-list/ScopesListClass.js +111 -0
- package/src/components/descope-scopes-list/index.js +7 -0
- package/src/components/descope-text-field/textFieldMappings.js +1 -0
- package/src/index.cjs.js +1 -0
- package/src/index.js +1 -0
- package/src/mixins/createDynamicDataMixin.js +9 -28
- package/src/theme/components/checkbox.js +1 -8
- package/src/theme/components/dateField.js +3 -1
- package/src/theme/components/index.js +2 -0
- package/src/theme/components/scopesList.js +15 -0
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4364,8603,6969,2996],{25827:(t,e,i)=>{i.d(e,{y:()=>s});var n=i(7138),r=i(94619),o=i(70263);const s=(...t)=>(0,n.Zz)(r.XX,r._$,r.yF,r.jd)((0,o.q)(...t))},41029:(t,e,i)=>{i.d(e,{M:()=>f,T:()=>d});var n=i(14944),r=i(7138),o=i(94619),s=i(83367),a=i(14372),l=i(33177),p=i(9775);const d=(0,n.xE)("new-password"),c=p.w.cssVarList,{host:u,label:h,internalInputsWrapper:b,errorMessage:y,helperText:g,passwordInput:m,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.Zz)((0,o.RF)({mappings:{fontSize:[u,{},{selector:a.M.componentName,property:a.M.cssVarList.fontSize}],fontFamily:[h,y,g],labelFontSize:{...h,property:"font-size"},labelFontWeight:{...h,property:"font-weight"},labelTextColor:{...h,property:"color"},errorMessageTextColor:{...y,property:"color"},hostWidth:{...u,property:"width"},hostMinWidth:{...u,property:"min-width"},hostDirection:[{...u,property:"direction"},{...m,property:a.M.cssVarList.hostDirection}],inputsRequiredIndicator:{...u,property:"content"},spaceBetweenInputs:{...b,property:"gap"},policyPreviewBackgroundColor:{...v,property:c.backgroundColor},policyPreviewPadding:{...v,property:c.padding},valueInputHeight:{...m,property:a.M.cssVarList.valueInputHeight},valueInputMarginBottom:{...m,property:a.M.cssVarList.valueInputMarginBottom}}}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart"]}),(t=>class extends t{init(){super.init?.();const t=document.createElement("template"),e=this.getAttribute("external-input");t.innerHTML=`\n\t\t\t<${s.T}\n\t\t\t\tname="new-password"\n\t\t\t\ttabindex="-1"\n\t\t\t\tslot="input"\n external-input="${e}"\n\t\t\t>\n </${s.T}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(s.T),"true"===this.getAttribute("external-input")&&this.initExternalInput(),(0,n.EA)(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","manual-visibility-toggle"]})}createSlottedExternalInput(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)}initExternalInput(){this.passwordInput=this.inputElement.querySelector('[data-id="password"]'),this.confirmInput=this.inputElement.querySelector('[data-id="confirm"]'),this.createSlottedExternalInput(this.passwordInput,"external-password-input"),this.createSlottedExternalInput(this.confirmInput,"external-confirm-input")}}))((0,o.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t\tmax-width: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t}\n :host ::part(error-message) {\n direction: ltr;\n }\n\t\t${(0,l.cy)(a.M.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}))},83367:(t,e,i)=>{i.d(e,{T:()=>n});const n=(0,i(14944).xE)("new-password-internal")},32039:(t,e,i)=>{var n=i(25827),r=i(14944),o=i(41029),s=i(83367);const a=/^password-/,l=/^confirm-/,p=(t,e)=>t.replace(e,""),d=["password-label","password-placeholder"],c=["confirm-label","confirm-placeholder"],u=["has-confirm","disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable","autocomplete","label-type","manual-visibility-toggle"],h=[].concat(u,d,c,["has-validation"]),b=(0,n.y)({componentName:s.T,baseSelector:"div"});customElements.define(s.T,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.isRequired&&!this.value)return{valueMissing:!0};if(this.value&&!this.policyPanel.isValid)return{typeMismatch:!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(){const t="true"===this.getAttribute("external-input"),e=`\n <div>\n <descope-password\n autocomplete="new-password"\n manual-visibility-toggle="true"\n data-id="password"\n external-input="${t}"\n ></descope-password>\n <descope-policy-validation></descope-policy-validation>\n </div>\n <descope-password\n autocomplete="new-password"\n manual-visibility-toggle="true"\n external-input="${t}"\n data-id="confirm"\n ></descope-password>\n `;this.wrapperEle.innerHTML=e,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.EA)(this,this.policyPanel,{includeAttrs:["policy-label","available-policies","active-policies","data-password-policy-value-minlength","manual-visibility-toggle"],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.M.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.mx)(t,(e=>{if(e.includes("invalid")){const e=t.getAttribute("invalid"),i=this.getAttribute("invalid");this.isInvalid&&i!==e&&t.setAttribute("invalid","true")}}),{})}))}initInputs(){this.handleIndicatorStyle(),this.handleInputsInvalidAttribute(),this.handleFocusEventsDispatching(this.inputs)}toggleBooleanAttribute(t,e,i){null===i?t?.removeAttribute(e):t?.setAttribute(e,i)}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&("has-validation"===t?this.onHasValidationChange("true"===i):"has-confirm"===t?this.onHasConfirmChange("true"===i):u.includes(t)?this.inputs.forEach((e=>this.toggleBooleanAttribute(e,t,i))):d.includes(t)?this.toggleBooleanAttribute(this.passwordInput,p(t,a),i):c.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,p(t,l),i))}})},26586:(t,e,i)=>{i.r(e),i.d(e,{NewPasswordClass:()=>n.M});var n=i(41029);i(89348),i(1279),i(28184),i(32039),customElements.define(n.T,n.M)},14372:(t,e,i)=>{i.d(e,{M:()=>f,T:()=>l});var n=i(94619),r=i(7138),o=i(14944),s=i(43686),a=i(33177);const l=(0,o.xE)("password"),{host:p,inputField:d,inputElement:c,inputElementPlaceholder:u,revealButtonContainer:h,revealButtonIcon:b,label:y,requiredIndicator:g,errorMessage:m,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)"}},f=(0,r.Zz)((0,n.RF)({mappings:{hostWidth:{...p,property:"width"},hostMinWidth:{...p,property:"min-width"},hostDirection:{...p,property:"direction"},fontSize:[{},p],fontFamily:[y,d,m,v],inputHeight:{...d,property:"height"},inputHorizontalPadding:[{...c,property:"padding-left"},{...c,property:"padding-right"}],inputBackgroundColor:{...d,property:"background-color"},inputBorderStyle:{...d,property:"border-style"},inputBorderWidth:{...d,property:"border-width"},inputBorderColor:{...d,property:"border-color"},inputBorderRadius:{...d,property:"border-radius"},inputOutlineColor:{...d,property:"outline-color"},inputOutlineStyle:{...d,property:"outline-style"},inputOutlineOffset:{...d,property:"outline-offset"},inputOutlineWidth:{...d,property:"outline-width"},labelFontSize:{...y,property:"font-size"},labelFontWeight:{...y,property:"font-weight"},labelTextColor:[{...y,property:"color"},{...g,property:"color"}],labelRequiredIndicator:{...g,property:"content"},errorMessageTextColor:{...m,property:"color"},inputPlaceholderTextColor:[{...u,property:"color"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"color"}],inputValueTextColor:[{...c,property:"color"},{selector:()=>":host ::slotted(input)",property:"color"}],revealButtonOffset:[{...h,property:"margin-right"},{...h,property:"margin-left"}],revealButtonSize:{...h,property:"font-size"},revealButtonColor:{...b,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:{...d,property:"align-items"},valueInputHeight:{...c,property:"height"}}}),n.VO,(0,n.RV)({inputType:"password",includeAttrs:["disabled","readonly","pattern","type","autocomplete"],noBlurDispatch:!0}),(0,n.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),n.tQ,s.A,(t=>class extends t{static get observedAttributes(){return["manual-visibility-toggle"]}get manualToggleVisibility(){return"true"===this.getAttribute("manual-visibility-toggle")}init(){super.init?.(),this.handleCaretOnVisibilityChange(),this.origSetPasswordVisible=this.baseElement._setPasswordVisible,this.origSetFocused=this.baseElement._setFocused,this.baseElement._setFocused=this.setFocus.bind(this),this.initExternalInput()}initExternalInput(){const t=this.createExternalInput();t&&this.handlePasswordVisibility(t)}get caretPosition(){return this.value?.length||0}handleCaretOnVisibilityChange(){const t=this.baseElement._togglePasswordVisibility.bind(this.baseElement);this.baseElement._togglePasswordVisibility=()=>{setTimeout((()=>(t(),this.inputElement.setSelectionRange(this.caretPosition,this.caretPosition),!1)))}}setFocus(t){this.manualToggleVisibility&&(this.baseElement._setPasswordVisible=()=>{}),this.origSetFocused.call(this.baseElement,t),this.baseElement._setPasswordVisible=this.origSetPasswordVisible.bind(this.baseElement)}resetPasswordVisibilityToggle(){this.baseElement._setPasswordVisible=this.origSetPasswordVisible,this.baseElement._setFocused=this.origSetFocus}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,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)}}showPasswordVisibility(t){t.setAttribute("type","text"),this.setAttribute("password-visible","true")}hidePasswordVisibility(t){t.setAttribute("type","password"),this.setAttribute("password-visible","false")}}))((0,n.tz)({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.cy)(f.cssVarList)}\n\t\t\t${(0,a.I4)("vaadin-password-field")}\n ${(0,a.$J)("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(${f.cssVarList.inputOutlineColor});\n\t\t\t}\n\n ${(0,a.Kl)()}\n \n ::part(reveal-button) {\n align-self: center;\n }\n\n vaadin-password-field[external-input="true"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},1279:(t,e,i)=>{i.r(e),i.d(e,{PasswordClass:()=>n.M}),i(40351);var n=i(14372);customElements.define(n.T,n.M)},43686:(t,e,i)=>{i.d(e,{A:()=>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})}}))}}},9775:(t,e,i)=>{i.d(e,{T:()=>l,w:()=>m});var n=i(94619),r=i(70263),o=i(7138),s=i(14944),a=i(38917);const l=(0,s.xE)("policy-validation"),p=["data","active-policies","overrides","data-password-policy-value-minlength"],d=["label","value",...p];class c extends((0,r.q)({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:s}=n;if(!r||!o)return e;const l={valid:new RegExp((0,a.z)(r,s)).test(this.value),message:(0,a.z)(o,s),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:u,item:h,symbolDefault:b,symbolSuccess:y,symbolError:g}={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'}},m=(0,o.Zz)((0,n.RF)({componentNameOverride:(0,s.xE)("input-wrapper")}),(0,n.RF)({mappings:{hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},padding:{},borderWidth:{...u,property:"border-width"},borderStyle:{...u,property:"border-style"},borderColor:{...u,property:"border-color"},borderRadius:{...u,property:"border-radius"},backgroundColor:{...u,property:"background-color"},textColor:{property:"color"},labelMargin:{...u,property:"gap"},itemsSpacing:{...h,property:"line-height"},itemSymbolSuccessColor:{...y,property:"color"},itemSymbolErrorColor:{...g,property:"color"},itemSymbolDefault:{...b,property:"content"},itemSymbolSuccess:{...y,property:"content"},itemSymbolError:{...g,property:"content"}}}),n.VO,n.tQ)(c)},38917:(t,e,i)=>{i.d(e,{z:()=>n});const n=(t,e)=>t.replace(/{{(\w+)+}}/g,((t,i)=>e?.[i]||t))},28184:(t,e,i)=>{i.r(e),i.d(e,{PolicyValidationClass:()=>n.w});var n=i(9775);customElements.define(n.T,n.w)},69473:(t,e,i)=>{i.d(e,{T:()=>l,w:()=>d});var n=i(94619),r=i(93826),o=i(7138),s=i(14944),a=i(33177);const l=(0,s.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],d=(0,o.Zz)((0,n.RF)({mappings:r.A}),n.VO,(0,n.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),n.tQ,(t=>class extends t{static get observedAttributes(){return p.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},i={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,i),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}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):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===i))}}))((0,n.tz)({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,a.$J)("vaadin-text-field")}\n\t\t\t${(0,a.cy)(d.cssVarList)}\n\t\t\t${(0,a.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,a.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},89348:(t,e,i)=>{i.r(e),i.d(e,{TextFieldClass:()=>n.w}),i(39542),i(66418),i(56637);var n=i(69473);customElements.define(n.T,n.w)},93826:(t,e,i)=>{i.d(e,{A:()=>f});const{host:n,label:r,placeholder:o,requiredIndicator:s,inputField:a,input:l,inputMask:p,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:b,externalInput:y,externalInputDisabled:g,externalPlaceholder:m,externalDisabledPlaceholder:v}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},f={fontSize:[{},n],fontFamily:[r,a,d,c],labelFontSize:{...r,property:"font-size"},labelFontWeight:{...r,property:"font-weight"},labelTextColor:[{...r,property:"color"},{...s,property:"color"},{...r,property:"-webkit-text-fill-color"},{...s,property:"-webkit-text-fill-color"}],hostWidth:{...n,property:"width"},hostMinWidth:{...n,property:"min-width"},hostDirection:{...n,property:"direction"},inputBackgroundColor:[{...a,property:"background-color"},{...p,property:"background-color"}],errorMessageTextColor:{...c,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...l,property:"caret-color"},{...y,property:"caret-color"}],labelRequiredIndicator:{...s,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:[{...l,property:"padding-left"},{...l,property:"padding-right"},{...y,property:"padding-left"},{...y,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...l,property:"text-align"},{...y,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...m,property:"color"},{...o,property:"color"},{...u,property:"-webkit-text-fill-color"},{...v,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"},{...m,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...y,property:"align-items"}],valueInputHeight:[{...l,property:"height"},{...y,property:"height"}],valueInputMarginBottom:[{...l,property:"margin-bottom"},{...y,property:"margin-bottom"}],inputIconOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],inputIconSize:{...b,property:"font-size"},inputIconColor:{...b,property:"color"}}},33177:(t,e,i)=>{i.d(e,{$J:()=>u,I4:()=>s,Kl:()=>h,LJ:()=>c,Qv:()=>o,X6:()=>l,cy:()=>n,fu:()=>p,kG:()=>d,lS:()=>a,zm:()=>r});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`,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`,c=(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`,u=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 width: auto;\n }\n '},39542:(t,e,i)=>{i(70297),i(34068)}}]);
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4364,8603,6969,2996],{25827:(t,e,i)=>{i.d(e,{y:()=>s});var n=i(7138),r=i(94619),o=i(70263);const s=(...t)=>(0,n.Zz)(r.XX,r._$,r.yF,r.jd)((0,o.q)(...t))},41029:(t,e,i)=>{i.d(e,{M:()=>f,T:()=>d});var n=i(14944),r=i(7138),o=i(94619),s=i(83367),a=i(14372),l=i(33177),p=i(9775);const d=(0,n.xE)("new-password"),c=p.w.cssVarList,{host:u,label:h,internalInputsWrapper:b,errorMessage:y,helperText:g,passwordInput:m,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.Zz)((0,o.RF)({mappings:{fontSize:[u,{},{selector:a.M.componentName,property:a.M.cssVarList.fontSize}],fontFamily:[h,y,g],labelFontSize:{...h,property:"font-size"},labelFontWeight:{...h,property:"font-weight"},labelTextColor:{...h,property:"color"},errorMessageTextColor:{...y,property:"color"},hostWidth:{...u,property:"width"},hostMinWidth:{...u,property:"min-width"},hostDirection:[{...u,property:"direction"},{...m,property:a.M.cssVarList.hostDirection}],inputsRequiredIndicator:{...u,property:"content"},spaceBetweenInputs:{...b,property:"gap"},policyPreviewBackgroundColor:{...v,property:c.backgroundColor},policyPreviewPadding:{...v,property:c.padding},valueInputHeight:{...m,property:a.M.cssVarList.valueInputHeight},valueInputMarginBottom:{...m,property:a.M.cssVarList.valueInputMarginBottom}}}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart"]}),(t=>class extends t{init(){super.init?.();const t=document.createElement("template"),e=this.getAttribute("external-input");t.innerHTML=`\n\t\t\t<${s.T}\n\t\t\t\tname="new-password"\n\t\t\t\ttabindex="-1"\n\t\t\t\tslot="input"\n external-input="${e}"\n\t\t\t>\n </${s.T}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(s.T),"true"===this.getAttribute("external-input")&&this.initExternalInput(),(0,n.EA)(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","manual-visibility-toggle"]})}createSlottedExternalInput(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)}initExternalInput(){this.passwordInput=this.inputElement.querySelector('[data-id="password"]'),this.confirmInput=this.inputElement.querySelector('[data-id="confirm"]'),this.createSlottedExternalInput(this.passwordInput,"external-password-input"),this.createSlottedExternalInput(this.confirmInput,"external-confirm-input")}}))((0,o.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t\tmax-width: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t}\n :host ::part(error-message) {\n direction: ltr;\n }\n\t\t${(0,l.cy)(a.M.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}))},83367:(t,e,i)=>{i.d(e,{T:()=>n});const n=(0,i(14944).xE)("new-password-internal")},32039:(t,e,i)=>{var n=i(25827),r=i(14944),o=i(41029),s=i(83367);const a=/^password-/,l=/^confirm-/,p=(t,e)=>t.replace(e,""),d=["password-label","password-placeholder"],c=["confirm-label","confirm-placeholder"],u=["has-confirm","disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable","autocomplete","label-type","manual-visibility-toggle"],h=[].concat(u,d,c,["has-validation"]),b=(0,n.y)({componentName:s.T,baseSelector:"div"});customElements.define(s.T,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.isRequired&&!this.value)return{valueMissing:!0};if(this.value&&!this.policyPanel.isValid)return{typeMismatch:!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(){const t="true"===this.getAttribute("external-input"),e=`\n <div>\n <descope-password\n autocomplete="new-password"\n manual-visibility-toggle="true"\n data-id="password"\n external-input="${t}"\n ></descope-password>\n <descope-policy-validation></descope-policy-validation>\n </div>\n <descope-password\n autocomplete="new-password"\n manual-visibility-toggle="true"\n external-input="${t}"\n data-id="confirm"\n ></descope-password>\n `;this.wrapperEle.innerHTML=e,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.EA)(this,this.policyPanel,{includeAttrs:["policy-label","available-policies","active-policies","data-password-policy-value-minlength","manual-visibility-toggle"],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.M.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.mx)(t,(e=>{if(e.includes("invalid")){const e=t.getAttribute("invalid"),i=this.getAttribute("invalid");this.isInvalid&&i!==e&&t.setAttribute("invalid","true")}}),{})}))}initInputs(){this.handleIndicatorStyle(),this.handleInputsInvalidAttribute(),this.handleFocusEventsDispatching(this.inputs)}toggleBooleanAttribute(t,e,i){null===i?t?.removeAttribute(e):t?.setAttribute(e,i)}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&("has-validation"===t?this.onHasValidationChange("true"===i):"has-confirm"===t?this.onHasConfirmChange("true"===i):u.includes(t)?this.inputs.forEach((e=>this.toggleBooleanAttribute(e,t,i))):d.includes(t)?this.toggleBooleanAttribute(this.passwordInput,p(t,a),i):c.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,p(t,l),i))}})},26586:(t,e,i)=>{i.r(e),i.d(e,{NewPasswordClass:()=>n.M});var n=i(41029);i(89348),i(1279),i(28184),i(32039),customElements.define(n.T,n.M)},14372:(t,e,i)=>{i.d(e,{M:()=>f,T:()=>l});var n=i(94619),r=i(7138),o=i(14944),s=i(43686),a=i(33177);const l=(0,o.xE)("password"),{host:p,inputField:d,inputElement:c,inputElementPlaceholder:u,revealButtonContainer:h,revealButtonIcon:b,label:y,requiredIndicator:g,errorMessage:m,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)"}},f=(0,r.Zz)((0,n.RF)({mappings:{hostWidth:{...p,property:"width"},hostMinWidth:{...p,property:"min-width"},hostDirection:{...p,property:"direction"},fontSize:[{},p],fontFamily:[y,d,m,v],inputHeight:{...d,property:"height"},inputHorizontalPadding:[{...c,property:"padding-left"},{...c,property:"padding-right"}],inputBackgroundColor:{...d,property:"background-color"},inputBorderStyle:{...d,property:"border-style"},inputBorderWidth:{...d,property:"border-width"},inputBorderColor:{...d,property:"border-color"},inputBorderRadius:{...d,property:"border-radius"},inputOutlineColor:{...d,property:"outline-color"},inputOutlineStyle:{...d,property:"outline-style"},inputOutlineOffset:{...d,property:"outline-offset"},inputOutlineWidth:{...d,property:"outline-width"},labelFontSize:{...y,property:"font-size"},labelFontWeight:{...y,property:"font-weight"},labelTextColor:[{...y,property:"color"},{...g,property:"color"}],labelRequiredIndicator:{...g,property:"content"},errorMessageTextColor:{...m,property:"color"},inputPlaceholderTextColor:[{...u,property:"color"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"color"}],inputValueTextColor:[{...c,property:"color"},{selector:()=>":host ::slotted(input)",property:"color"}],revealButtonOffset:[{...h,property:"margin-right"},{...h,property:"margin-left"}],revealButtonSize:{...h,property:"font-size"},revealButtonColor:{...b,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:{...d,property:"align-items"},valueInputHeight:{...c,property:"height"}}}),n.VO,(0,n.RV)({inputType:"password",includeAttrs:["disabled","readonly","pattern","type","autocomplete"],noBlurDispatch:!0}),(0,n.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),n.tQ,s.A,(t=>class extends t{static get observedAttributes(){return["manual-visibility-toggle"]}get manualToggleVisibility(){return"true"===this.getAttribute("manual-visibility-toggle")}init(){super.init?.(),this.handleCaretOnVisibilityChange(),this.origSetPasswordVisible=this.baseElement._setPasswordVisible,this.origSetFocused=this.baseElement._setFocused,this.baseElement._setFocused=this.setFocus.bind(this),this.initExternalInput()}initExternalInput(){const t=this.createExternalInput();t&&this.handlePasswordVisibility(t)}get caretPosition(){return this.value?.length||0}handleCaretOnVisibilityChange(){const t=this.baseElement._togglePasswordVisibility.bind(this.baseElement);this.baseElement._togglePasswordVisibility=()=>{setTimeout((()=>(t(),this.inputElement.setSelectionRange(this.caretPosition,this.caretPosition),!1)))}}setFocus(t){this.manualToggleVisibility&&(this.baseElement._setPasswordVisible=()=>{}),this.origSetFocused.call(this.baseElement,t),this.baseElement._setPasswordVisible=this.origSetPasswordVisible.bind(this.baseElement)}resetPasswordVisibilityToggle(){this.baseElement._setPasswordVisible=this.origSetPasswordVisible,this.baseElement._setFocused=this.origSetFocus}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,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)}}showPasswordVisibility(t){t.setAttribute("type","text"),this.setAttribute("password-visible","true")}hidePasswordVisibility(t){t.setAttribute("type","password"),this.setAttribute("password-visible","false")}}))((0,n.tz)({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.cy)(f.cssVarList)}\n\t\t\t${(0,a.I4)("vaadin-password-field")}\n ${(0,a.$J)("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(${f.cssVarList.inputOutlineColor});\n\t\t\t}\n\n ${(0,a.Kl)()}\n \n ::part(reveal-button) {\n align-self: center;\n }\n\n vaadin-password-field[external-input="true"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},1279:(t,e,i)=>{i.r(e),i.d(e,{PasswordClass:()=>n.M}),i(40351);var n=i(14372);customElements.define(n.T,n.M)},43686:(t,e,i)=>{i.d(e,{A:()=>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})}}))}}},9775:(t,e,i)=>{i.d(e,{T:()=>l,w:()=>m});var n=i(94619),r=i(70263),o=i(7138),s=i(14944),a=i(38917);const l=(0,s.xE)("policy-validation"),p=["data","active-policies","overrides","data-password-policy-value-minlength"],d=["label","value",...p];class c extends((0,r.q)({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:s}=n;if(!r||!o)return e;const l={valid:new RegExp((0,a.z)(r,s)).test(this.value),message:(0,a.z)(o,s),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:u,item:h,symbolDefault:b,symbolSuccess:y,symbolError:g}={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'}},m=(0,o.Zz)((0,n.RF)({componentNameOverride:(0,s.xE)("input-wrapper")}),(0,n.RF)({mappings:{hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},padding:{},borderWidth:{...u,property:"border-width"},borderStyle:{...u,property:"border-style"},borderColor:{...u,property:"border-color"},borderRadius:{...u,property:"border-radius"},backgroundColor:{...u,property:"background-color"},textColor:{property:"color"},labelMargin:{...u,property:"gap"},itemsSpacing:{...h,property:"line-height"},itemSymbolSuccessColor:{...y,property:"color"},itemSymbolErrorColor:{...g,property:"color"},itemSymbolDefault:{...b,property:"content"},itemSymbolSuccess:{...y,property:"content"},itemSymbolError:{...g,property:"content"}}}),n.VO,n.tQ)(c)},38917:(t,e,i)=>{i.d(e,{z:()=>n});const n=(t,e)=>t.replace(/{{(\w+)+}}/g,((t,i)=>e?.[i]||t))},28184:(t,e,i)=>{i.r(e),i.d(e,{PolicyValidationClass:()=>n.w});var n=i(9775);customElements.define(n.T,n.w)},69473:(t,e,i)=>{i.d(e,{T:()=>l,w:()=>d});var n=i(94619),r=i(93826),o=i(7138),s=i(14944),a=i(33177);const l=(0,s.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],d=(0,o.Zz)((0,n.RF)({mappings:r.A}),n.VO,(0,n.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),n.tQ,(t=>class extends t{static get observedAttributes(){return p.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},i={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,i),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}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):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===i))}}))((0,n.tz)({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,a.$J)("vaadin-text-field")}\n\t\t\t${(0,a.cy)(d.cssVarList)}\n\t\t\t${(0,a.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,a.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},89348:(t,e,i)=>{i.r(e),i.d(e,{TextFieldClass:()=>n.w}),i(39542),i(66418),i(56637);var n=i(69473);customElements.define(n.T,n.w)},93826:(t,e,i)=>{i.d(e,{A:()=>f});const{host:n,label:r,placeholder:o,requiredIndicator:s,inputField:a,input:l,inputMask:p,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:b,externalInput:y,externalInputDisabled:g,externalPlaceholder:m,externalDisabledPlaceholder:v}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},f={fontSize:[{},n],fontFamily:[r,a,d,c],labelFontSize:{...r,property:"font-size"},labelFontWeight:{...r,property:"font-weight"},labelTextColor:[{...r,property:"color"},{...s,property:"color"},{...r,property:"-webkit-text-fill-color"},{...s,property:"-webkit-text-fill-color"}],hostWidth:{...n,property:"width"},hostMinWidth:{...n,property:"min-width"},hostDirection:{...n,property:"direction"},inputDirection:{...l,property:"direction"},inputBackgroundColor:[{...a,property:"background-color"},{...p,property:"background-color"}],errorMessageTextColor:{...c,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...l,property:"caret-color"},{...y,property:"caret-color"}],labelRequiredIndicator:{...s,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:[{...l,property:"padding-left"},{...l,property:"padding-right"},{...y,property:"padding-left"},{...y,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...l,property:"text-align"},{...y,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...m,property:"color"},{...o,property:"color"},{...u,property:"-webkit-text-fill-color"},{...v,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"},{...m,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...y,property:"align-items"}],valueInputHeight:[{...l,property:"height"},{...y,property:"height"}],valueInputMarginBottom:[{...l,property:"margin-bottom"},{...y,property:"margin-bottom"}],inputIconOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],inputIconSize:{...b,property:"font-size"},inputIconColor:{...b,property:"color"}}},33177:(t,e,i)=>{i.d(e,{$J:()=>u,I4:()=>s,Kl:()=>h,LJ:()=>c,Qv:()=>o,X6:()=>l,cy:()=>n,fu:()=>p,kG:()=>d,lS:()=>a,zm:()=>r});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`,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`,c=(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`,u=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 width: auto;\n }\n '},39542:(t,e,i)=>{i(70297),i(34068)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7944],{37041:(t,e,n)=>{n.r(e),n.d(e,{NumberFieldClass:()=>d}),n(35412);var r=n(94619),o=n(93826),i=n(7138),l=n(14944),p=n(33177);const a=(0,l.xE)("number-field"),d=(0,i.Zz)((0,r.RF)({mappings:o.A}),r.VO,(0,r.OZ)({proxyProps:["value","selectionStart"]}),r.tQ)((0,r.tz)({slots:["","prefix","suffix"],wrappedEleName:"vaadin-number-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n\t\t\t}\n ${(0,p.$J)("vaadin-number-field")}\n\t\t\t${(0,p.cy)(d.cssVarList)}\n\t\t\t${(0,p.LJ)("vaadin-number-field",d.cssVarList)}\n ${(0,p.Kl)()}\n\n vaadin-number-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-number-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:a}));customElements.define(a,d)},93826:(t,e,n)=>{n.d(e,{A:()=>m});const{host:r,label:o,placeholder:i,requiredIndicator:l,inputField:p,input:a,inputMask:d,helperText:s,errorMessage:u,disabledPlaceholder:c,inputDisabled:h,inputIcon:b,externalInput:y,externalInputDisabled:f,externalPlaceholder:g,externalDisabledPlaceholder:x}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},m={fontSize:[{},r],fontFamily:[o,p,s,u],labelFontSize:{...o,property:"font-size"},labelFontWeight:{...o,property:"font-weight"},labelTextColor:[{...o,property:"color"},{...l,property:"color"},{...o,property:"-webkit-text-fill-color"},{...l,property:"-webkit-text-fill-color"}],hostWidth:{...r,property:"width"},hostMinWidth:{...r,property:"min-width"},hostDirection:{...r,property:"direction"},inputBackgroundColor:[{...p,property:"background-color"},{...d,property:"background-color"}],errorMessageTextColor:{...u,property:"color"},helperTextColor:{...s,property:"-webkit-text-fill-color"},inputValueTextColor:[{...p,property:"color"},{...h,property:"-webkit-text-fill-color"},{...f,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...a,property:"caret-color"},{...y,property:"caret-color"}],labelRequiredIndicator:{...l,property:"content"},inputBorderColor:{...p,property:"border-color"},inputBorderWidth:{...p,property:"border-width"},inputBorderStyle:{...p,property:"border-style"},inputBorderRadius:{...p,property:"border-radius"},inputHeight:{...p,property:"height"},inputHorizontalPadding:[{...a,property:"padding-left"},{...a,property:"padding-right"},{...y,property:"padding-left"},{...y,property:"padding-right"}],inputOutlineColor:{...p,property:"outline-color"},inputOutlineStyle:{...p,property:"outline-style"},inputOutlineWidth:{...p,property:"outline-width"},inputOutlineOffset:{...p,property:"outline-offset"},textAlign:{},inputTextAlign:[{...a,property:"text-align"},{...y,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...g,property:"color"},{...i,property:"color"},{...c,property:"-webkit-text-fill-color"},{...x,property:"-webkit-text-fill-color"}],labelPosition:{...o,property:"position"},labelTopPosition:{...o,property:"top"},labelHorizontalPosition:[{...o,property:"left"},{...o,property:"right"}],inputTransformY:{...o,property:"transform"},inputTransition:{...o,property:"transition"},marginInlineStart:{...o,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...g,property:"opacity"}],inputVerticalAlignment:[{...p,property:"align-items"},{...y,property:"align-items"}],valueInputHeight:[{...a,property:"height"},{...y,property:"height"}],valueInputMarginBottom:[{...a,property:"margin-bottom"},{...y,property:"margin-bottom"}],inputIconOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],inputIconSize:{...b,property:"font-size"},inputIconColor:{...b,property:"color"}}},33177:(t,e,n)=>{n.d(e,{$J:()=>c,I4:()=>l,Kl:()=>h,LJ:()=>u,Qv:()=>i,X6:()=>a,cy:()=>r,fu:()=>d,kG:()=>s,lS:()=>p,zm:()=>o});const r=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,o=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,i=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,l=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,p=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,a=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,s=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${o(t)}\n ${l(t)}\n ${p(t)}\n ${i(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 ${s(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 width: auto;\n }\n '}}]);
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7944],{37041:(t,e,n)=>{n.r(e),n.d(e,{NumberFieldClass:()=>d}),n(35412);var r=n(94619),o=n(93826),i=n(7138),l=n(14944),p=n(33177);const a=(0,l.xE)("number-field"),d=(0,i.Zz)((0,r.RF)({mappings:o.A}),r.VO,(0,r.OZ)({proxyProps:["value","selectionStart"]}),r.tQ)((0,r.tz)({slots:["","prefix","suffix"],wrappedEleName:"vaadin-number-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n\t\t\t}\n ${(0,p.$J)("vaadin-number-field")}\n\t\t\t${(0,p.cy)(d.cssVarList)}\n\t\t\t${(0,p.LJ)("vaadin-number-field",d.cssVarList)}\n ${(0,p.Kl)()}\n\n vaadin-number-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-number-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:a}));customElements.define(a,d)},93826:(t,e,n)=>{n.d(e,{A:()=>m});const{host:r,label:o,placeholder:i,requiredIndicator:l,inputField:p,input:a,inputMask:d,helperText:s,errorMessage:u,disabledPlaceholder:c,inputDisabled:h,inputIcon:b,externalInput:y,externalInputDisabled:f,externalPlaceholder:g,externalDisabledPlaceholder:x}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},m={fontSize:[{},r],fontFamily:[o,p,s,u],labelFontSize:{...o,property:"font-size"},labelFontWeight:{...o,property:"font-weight"},labelTextColor:[{...o,property:"color"},{...l,property:"color"},{...o,property:"-webkit-text-fill-color"},{...l,property:"-webkit-text-fill-color"}],hostWidth:{...r,property:"width"},hostMinWidth:{...r,property:"min-width"},hostDirection:{...r,property:"direction"},inputDirection:{...a,property:"direction"},inputBackgroundColor:[{...p,property:"background-color"},{...d,property:"background-color"}],errorMessageTextColor:{...u,property:"color"},helperTextColor:{...s,property:"-webkit-text-fill-color"},inputValueTextColor:[{...p,property:"color"},{...h,property:"-webkit-text-fill-color"},{...f,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...a,property:"caret-color"},{...y,property:"caret-color"}],labelRequiredIndicator:{...l,property:"content"},inputBorderColor:{...p,property:"border-color"},inputBorderWidth:{...p,property:"border-width"},inputBorderStyle:{...p,property:"border-style"},inputBorderRadius:{...p,property:"border-radius"},inputHeight:{...p,property:"height"},inputHorizontalPadding:[{...a,property:"padding-left"},{...a,property:"padding-right"},{...y,property:"padding-left"},{...y,property:"padding-right"}],inputOutlineColor:{...p,property:"outline-color"},inputOutlineStyle:{...p,property:"outline-style"},inputOutlineWidth:{...p,property:"outline-width"},inputOutlineOffset:{...p,property:"outline-offset"},textAlign:{},inputTextAlign:[{...a,property:"text-align"},{...y,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...g,property:"color"},{...i,property:"color"},{...c,property:"-webkit-text-fill-color"},{...x,property:"-webkit-text-fill-color"}],labelPosition:{...o,property:"position"},labelTopPosition:{...o,property:"top"},labelHorizontalPosition:[{...o,property:"left"},{...o,property:"right"}],inputTransformY:{...o,property:"transform"},inputTransition:{...o,property:"transition"},marginInlineStart:{...o,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...g,property:"opacity"}],inputVerticalAlignment:[{...p,property:"align-items"},{...y,property:"align-items"}],valueInputHeight:[{...a,property:"height"},{...y,property:"height"}],valueInputMarginBottom:[{...a,property:"margin-bottom"},{...y,property:"margin-bottom"}],inputIconOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],inputIconSize:{...b,property:"font-size"},inputIconColor:{...b,property:"color"}}},33177:(t,e,n)=>{n.d(e,{$J:()=>c,I4:()=>l,Kl:()=>h,LJ:()=>u,Qv:()=>i,X6:()=>a,cy:()=>r,fu:()=>d,kG:()=>s,lS:()=>p,zm:()=>o});const r=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,o=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,i=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,l=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,p=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,a=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,s=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${o(t)}\n ${l(t)}\n ${p(t)}\n ${i(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 ${s(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 width: auto;\n }\n '}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8884,7163],{25827:(t,e,n)=>{n.d(e,{y:()=>a});var i=n(7138),r=n(94619),o=n(70263);const a=(...t)=>(0,i.Zz)(r.XX,r._$,r.yF,r.jd)((0,o.q)(...t))},14815:(t,e,n)=>{n.d(e,{T:()=>a,l:()=>p});var i=n(94619),r=n(70263),o=n(7138);const a=(0,n(14944).xE)("loader-radial");class l extends((0,r.q)({componentName:a,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t@keyframes spin {\n\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\tanimation-name: spin;\n\t\t\t}\n\t\t</style>\n\t\t<div></div>\n\t"}}const p=(0,o.Zz)((0,i.RF)({mappings:{hostDisplay:{property:"display"},spinnerSize:[{property:"width"},{property:"height"}],spinnerBorderWidth:{property:"border-width"},spinnerBorderStyle:{property:"border-style"},spinnerBorderRadius:{property:"border-radius"},spinnerQuadrant1Color:{property:"border-top-color"},spinnerQuadrant2Color:{property:"border-bottom-color"},spinnerQuadrant3Color:{property:"border-right-color"},spinnerQuadrant4Color:{property:"border-left-color"},animationDuration:{},animationTimingFunction:{},animationIterationCount:{}}}),i.VO,i.tQ)(l)},86715:(t,e,n)=>{n.r(e),n.d(e,{LoaderRadialClass:()=>i.l});var i=n(14815);customElements.define(i.T,i.l)},45002:(t,e,n)=>{n.d(e,{A:()=>u,T:()=>p});var i=n(20181),r=n.n(i),o=n(25827),a=n(14944),l=n(10754);const p=(0,a.xE)("passcode-internal"),s=["digits","loading"],d=["disabled","bordered","size","invalid","readonly"],c=(0,o.y)({componentName:p,baseSelector:"div"}),u=class extends c{static get observedAttributes(){return s.concat(c.observedAttributes||[])}constructor(){super(),this.innerHTML='\n\t\t<div class="wrapper"></div>\n\t\t<div class="loader-container">\n <descope-loader-radial size="xs" mode="primary"></descope-loader-radial>\n </div>\n\t\t<style>\n\t\t\t.wrapper {\n\t\t\t\tdisplay: flex;\n\t\t\t\twidth: 100%;\n\t\t\t\tjustify-content: space-between;\n direction: ltr;\n position: relative;\n\t\t\t}\n\n descope-text-field {\n direction: ltr;\n }\n\n .loader-container {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\t\t</style>\n\t\t',this.wrapperEle=this.querySelector(".wrapper"),this.loaderContainer=this.querySelector(".loader-container")}renderInputs(){const t=[...Array(this.digits).keys()].map((t=>`\n\t\t<descope-text-field\n\t\t\tdata-id=${t}\n\t\t\ttype="tel"\n\t\t\tautocomplete="one-time-code"\n\t\t\tinputMode="numeric"\n\t\t></descope-text-field>\n\t`));this.wrapperEle.innerHTML=t.join(""),this.inputs=Array.from(this.querySelectorAll("descope-text-field")),this.initInputs()}handleLoadingState(t){t?this.setAttribute("inert","true"):this.removeAttribute("inert")}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}get value(){return this.inputs?.map((({value:t})=>t)).join("")||""}set value(t){t!==this.value&&this.parseInputValue(this.inputs[0],(0,l.zj)(t))}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:this.pattern&&!new RegExp(this.pattern).test(this.value)?{patternMismatch:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[0].focus()})),super.init?.(),this.renderInputs()}getInputIdx(t){return Number.parseInt(t.getAttribute("data-id"),10)}getNextInput(t){const e=this.getInputIdx(t),n=Math.min(e+1,this.inputs.length-1);return this.inputs[n]}getPrevInput(t){const e=this.getInputIdx(t),n=Math.max(e-1,0);return this.inputs[n]}fillDigits(t,e){for(let n=0;n<t.length;n+=1){e.value=t[n]??"";const i=this.getNextInput(e);if(i===e)break;e=i}(0,l.pW)(e)}parseInputValue(t,e=""){const n=e.split("");n.length?this.fillDigits(n,t):t.value=""}initInputs(){this.inputs.forEach((t=>{t.shadowRoot.appendChild((0,l.Yr)());const e=r()((e=>{this.parseInputValue(t,e),(0,l.Z)(t)}),20,{trailing:!0});t.addEventListener("input",(n=>{t.value=(0,l.zj)(t.value),t.value&&(0,l.Z)(t,t.value[0]),setTimeout((()=>{"deleteContentBackward"===n?.inputType&&(0,l.pW)(this.getPrevInput(t))})),e(t.value)})),t.onkeydown=({key:e})=>{"Backspace"===e?t.value?t.setSelectionRange(1,1):setTimeout((()=>(0,l.pW)(this.getPrevInput(t))),0):1===e.length&&(t.value="")},(0,a.EA)(this,t,{includeAttrs:d})})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&s.includes(t)&&("digits"===t&&this.renderInputs(),"loading"===t&&this.handleLoadingState("true"===n))}get pattern(){return`^$|^\\d{${this.digits},}$`}}},10754:(t,e,n)=>{n.d(e,{Yr:()=>p,Z:()=>s,pW:()=>a,zj:()=>l});const i="--descope-input-mask-content",r="--descope-input-mask-display",o="--descope-input-mask-fallback",a=t=>{t?.focus(),t?.setSelectionRange?.(1,1)},l=t=>t.replace(/\D/g,"")||"",p=()=>{const t=document.createElement("style");return t.id="input-mask",t.innerHTML=`vaadin-text-field::part(input-field)::before {\n ${o}: '';\n content: var(${i}, var(${o}));\n position: absolute;\n width: 100%;\n height: 100%;\n display: var(${r}, none);\n align-items: center;\n justify-content: center;\n }`,t},s=(t,e)=>{e?(t.style.setProperty(i,`"${e}"`),t.style.setProperty(r,"flex")):(t.style.removeProperty(i),t.style.removeProperty(r))}},81443:(t,e,n)=>{n.r(e);var i=n(45002);customElements.define(i.T,i.A)},40868:(t,e,n)=>{n.r(e),n.d(e,{PasscodeClass:()=>w});var i=n(94619),r=n(45002),o=n(69473),a=n(14815),l=n(7138),p=n(14944),s=n(33177);const d=(0,p.xE)("passcode"),c=["digits"],{host:u,digitField:h,label:y,requiredIndicator:g,internalWrapper:b,focusedDigitField:f,errorMessage:m}={host:{selector:()=>":host"},focusedDigitField:{selector:()=>`${o.w.componentName}[focused="true"]`},digitField:{selector:()=>o.w.componentName},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:"descope-passcode-internal .wrapper"},errorMessage:{selector:"::part(error-message)"}},x=o.w.cssVarList,v=a.l.cssVarList,w=(0,l.Zz)((0,i.RF)({mappings:{fontSize:[{...h,property:x.fontSize},u],hostWidth:{property:"width"},hostDirection:{...u,property:"direction"},fontFamily:[u,{...y}],labelTextColor:[{...y,property:"color"},{...g,property:"color"}],labelRequiredIndicator:{...g,property:"content"},errorMessageTextColor:{...m,property:"color"},digitValueTextColor:{selector:o.w.componentName,property:x.inputValueTextColor},digitSize:[{...h,property:"height"},{...h,property:"width"}],digitPadding:{...h,property:x.inputHorizontalPadding},digitTextAlign:{...h,property:x.inputTextAlign},digitCaretTextColor:{...h,property:x.inputCaretTextColor},digitSpacing:{...b,property:"gap"},digitOutlineColor:{...h,property:x.inputOutlineColor},digitOutlineWidth:{...h,property:x.inputOutlineWidth},focusedDigitFieldOutlineColor:{...f,property:x.inputOutlineColor},overlayOpacity:{...b,property:"opacity"},spinnerSize:{selector:a.l.componentName,property:v.spinnerSize}}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,(t=>class extends t{static get observedAttributes(){return c.concat(t.observedAttributes||[])}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n <${r.T}\n bordered="true"\n name="code"\n tabindex="-1"\n slot="input"\n ><slot></slot></${r.T}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.T),(0,p.EA)(this,this.inputElement,{includeAttrs:["digits","size","loading"]})}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),"digits"===t&&this.style.setProperty("--passcode-digits-count",n)}}))((0,i.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: calc(var(--passcode-digits-count) * 2em);\n\t\t\t}\n\t\t\t${(0,s.X6)()}\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n :host([loading="true"]) descope-passcode-internal .loader-container {\n display: block;\n }\n\n\t\t\tdescope-passcode-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal .wrapper {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tmin-height: initial;\n\t\t\t\theight: 100%;\n\t\t\t\tjustify-content: space-between;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal descope-text-field {\n\t\t\t\tmin-width: 2em;\n\t\t\t\tmax-width: var(${x.inputHeight});\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n /* safari */\n\t\t\tvaadin-text-field::part(input-field)::after {\n opacity: 0;\n }\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${(0,s.$J)("vaadin-text-field")}\n\t\t\t${(0,s.I4)("vaadin-text-field")}\n \t`,excludeAttrsSync:["tabindex"],componentName:d}));n(89348),n(86715),n(81443),customElements.define(d,w)},69473:(t,e,n)=>{n.d(e,{T:()=>p,w:()=>d});var i=n(94619),r=n(93826),o=n(7138),a=n(14944),l=n(33177);const p=(0,a.xE)("text-field"),s=["type","label-type","copy-to-clipboard"],d=(0,o.Zz)((0,i.RF)({mappings:r.A}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),i.tQ,(t=>class extends t{static get observedAttributes(){return s.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},n={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,n),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,n){super.attributeChangeCallback?.(t,e,n),"type"===t&&this.baseElement._setType(n),e!==n&&("label-type"===t?"floating"===n?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===n))}}))((0,i.tz)({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,l.$J)("vaadin-text-field")}\n\t\t\t${(0,l.cy)(d.cssVarList)}\n\t\t\t${(0,l.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,l.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))},89348:(t,e,n)=>{n.r(e),n.d(e,{TextFieldClass:()=>i.w}),n(39542),n(66418),n(56637);var i=n(69473);customElements.define(i.T,i.w)},93826:(t,e,n)=>{n.d(e,{A:()=>x});const{host:i,label:r,placeholder:o,requiredIndicator:a,inputField:l,input:p,inputMask:s,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:y,externalInput:g,externalInputDisabled:b,externalPlaceholder:f,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"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},x={fontSize:[{},i],fontFamily:[r,l,d,c],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:{...i,property:"width"},hostMinWidth:{...i,property:"min-width"},hostDirection:{...i,property:"direction"},inputBackgroundColor:[{...l,property:"background-color"},{...s,property:"background-color"}],errorMessageTextColor:{...c,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...l,property:"color"},{...h,property:"-webkit-text-fill-color"},{...b,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"caret-color"},{...g,property:"caret-color"}],labelRequiredIndicator:{...a,property:"content"},inputBorderColor:{...l,property:"border-color"},inputBorderWidth:{...l,property:"border-width"},inputBorderStyle:{...l,property:"border-style"},inputBorderRadius:{...l,property:"border-radius"},inputHeight:{...l,property:"height"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"},{...g,property:"padding-left"},{...g,property:"padding-right"}],inputOutlineColor:{...l,property:"outline-color"},inputOutlineStyle:{...l,property:"outline-style"},inputOutlineWidth:{...l,property:"outline-width"},inputOutlineOffset:{...l,property:"outline-offset"},textAlign:{},inputTextAlign:[{...p,property:"text-align"},{...g,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...f,property:"color"},{...o,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"},{...f,property:"opacity"}],inputVerticalAlignment:[{...l,property:"align-items"},{...g,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...g,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...g,property:"margin-bottom"}],inputIconOffset:[{...y,property:"margin-right"},{...y,property:"margin-left"}],inputIconSize:{...y,property:"font-size"},inputIconColor:{...y,property:"color"}}},33177:(t,e,n)=>{n.d(e,{$J:()=>u,I4:()=>a,Kl:()=>h,LJ:()=>c,Qv:()=>o,X6:()=>p,cy:()=>i,fu:()=>s,kG:()=>d,lS:()=>l,zm:()=>r});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`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(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`,c=(t,e)=>`\n ${r(t)}\n ${a(t)}\n ${l(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`,u=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 width: auto;\n }\n '}}]);
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8884,7163],{25827:(t,e,n)=>{n.d(e,{y:()=>a});var i=n(7138),r=n(94619),o=n(70263);const a=(...t)=>(0,i.Zz)(r.XX,r._$,r.yF,r.jd)((0,o.q)(...t))},14815:(t,e,n)=>{n.d(e,{T:()=>a,l:()=>p});var i=n(94619),r=n(70263),o=n(7138);const a=(0,n(14944).xE)("loader-radial");class l extends((0,r.q)({componentName:a,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t@keyframes spin {\n\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\tanimation-name: spin;\n\t\t\t}\n\t\t</style>\n\t\t<div></div>\n\t"}}const p=(0,o.Zz)((0,i.RF)({mappings:{hostDisplay:{property:"display"},spinnerSize:[{property:"width"},{property:"height"}],spinnerBorderWidth:{property:"border-width"},spinnerBorderStyle:{property:"border-style"},spinnerBorderRadius:{property:"border-radius"},spinnerQuadrant1Color:{property:"border-top-color"},spinnerQuadrant2Color:{property:"border-bottom-color"},spinnerQuadrant3Color:{property:"border-right-color"},spinnerQuadrant4Color:{property:"border-left-color"},animationDuration:{},animationTimingFunction:{},animationIterationCount:{}}}),i.VO,i.tQ)(l)},86715:(t,e,n)=>{n.r(e),n.d(e,{LoaderRadialClass:()=>i.l});var i=n(14815);customElements.define(i.T,i.l)},45002:(t,e,n)=>{n.d(e,{A:()=>u,T:()=>p});var i=n(20181),r=n.n(i),o=n(25827),a=n(14944),l=n(10754);const p=(0,a.xE)("passcode-internal"),s=["digits","loading"],d=["disabled","bordered","size","invalid","readonly"],c=(0,o.y)({componentName:p,baseSelector:"div"}),u=class extends c{static get observedAttributes(){return s.concat(c.observedAttributes||[])}constructor(){super(),this.innerHTML='\n\t\t<div class="wrapper"></div>\n\t\t<div class="loader-container">\n <descope-loader-radial size="xs" mode="primary"></descope-loader-radial>\n </div>\n\t\t<style>\n\t\t\t.wrapper {\n\t\t\t\tdisplay: flex;\n\t\t\t\twidth: 100%;\n\t\t\t\tjustify-content: space-between;\n direction: ltr;\n position: relative;\n\t\t\t}\n\n descope-text-field {\n direction: ltr;\n }\n\n .loader-container {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\t\t</style>\n\t\t',this.wrapperEle=this.querySelector(".wrapper"),this.loaderContainer=this.querySelector(".loader-container")}renderInputs(){const t=[...Array(this.digits).keys()].map((t=>`\n\t\t<descope-text-field\n\t\t\tdata-id=${t}\n\t\t\ttype="tel"\n\t\t\tautocomplete="one-time-code"\n\t\t\tinputMode="numeric"\n\t\t></descope-text-field>\n\t`));this.wrapperEle.innerHTML=t.join(""),this.inputs=Array.from(this.querySelectorAll("descope-text-field")),this.initInputs()}handleLoadingState(t){t?this.setAttribute("inert","true"):this.removeAttribute("inert")}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}get value(){return this.inputs?.map((({value:t})=>t)).join("")||""}set value(t){t!==this.value&&this.parseInputValue(this.inputs[0],(0,l.zj)(t))}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:this.pattern&&!new RegExp(this.pattern).test(this.value)?{patternMismatch:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[0].focus()})),super.init?.(),this.renderInputs()}getInputIdx(t){return Number.parseInt(t.getAttribute("data-id"),10)}getNextInput(t){const e=this.getInputIdx(t),n=Math.min(e+1,this.inputs.length-1);return this.inputs[n]}getPrevInput(t){const e=this.getInputIdx(t),n=Math.max(e-1,0);return this.inputs[n]}fillDigits(t,e){for(let n=0;n<t.length;n+=1){e.value=t[n]??"";const i=this.getNextInput(e);if(i===e)break;e=i}(0,l.pW)(e)}parseInputValue(t,e=""){const n=e.split("");n.length?this.fillDigits(n,t):t.value=""}initInputs(){this.inputs.forEach((t=>{t.shadowRoot.appendChild((0,l.Yr)());const e=r()((e=>{this.parseInputValue(t,e),(0,l.Z)(t)}),20,{trailing:!0});t.addEventListener("input",(n=>{t.value=(0,l.zj)(t.value),t.value&&(0,l.Z)(t,t.value[0]),setTimeout((()=>{"deleteContentBackward"===n?.inputType&&(0,l.pW)(this.getPrevInput(t))})),e(t.value)})),t.onkeydown=({key:e})=>{"Backspace"===e?t.value?t.setSelectionRange(1,1):setTimeout((()=>(0,l.pW)(this.getPrevInput(t))),0):1===e.length&&(t.value="")},(0,a.EA)(this,t,{includeAttrs:d})})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&s.includes(t)&&("digits"===t&&this.renderInputs(),"loading"===t&&this.handleLoadingState("true"===n))}get pattern(){return`^$|^\\d{${this.digits},}$`}}},10754:(t,e,n)=>{n.d(e,{Yr:()=>p,Z:()=>s,pW:()=>a,zj:()=>l});const i="--descope-input-mask-content",r="--descope-input-mask-display",o="--descope-input-mask-fallback",a=t=>{t?.focus(),t?.setSelectionRange?.(1,1)},l=t=>t.replace(/\D/g,"")||"",p=()=>{const t=document.createElement("style");return t.id="input-mask",t.innerHTML=`vaadin-text-field::part(input-field)::before {\n ${o}: '';\n content: var(${i}, var(${o}));\n position: absolute;\n width: 100%;\n height: 100%;\n display: var(${r}, none);\n align-items: center;\n justify-content: center;\n }`,t},s=(t,e)=>{e?(t.style.setProperty(i,`"${e}"`),t.style.setProperty(r,"flex")):(t.style.removeProperty(i),t.style.removeProperty(r))}},81443:(t,e,n)=>{n.r(e);var i=n(45002);customElements.define(i.T,i.A)},40868:(t,e,n)=>{n.r(e),n.d(e,{PasscodeClass:()=>w});var i=n(94619),r=n(45002),o=n(69473),a=n(14815),l=n(7138),p=n(14944),s=n(33177);const d=(0,p.xE)("passcode"),c=["digits"],{host:u,digitField:h,label:y,requiredIndicator:g,internalWrapper:b,focusedDigitField:f,errorMessage:m}={host:{selector:()=>":host"},focusedDigitField:{selector:()=>`${o.w.componentName}[focused="true"]`},digitField:{selector:()=>o.w.componentName},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:"descope-passcode-internal .wrapper"},errorMessage:{selector:"::part(error-message)"}},x=o.w.cssVarList,v=a.l.cssVarList,w=(0,l.Zz)((0,i.RF)({mappings:{fontSize:[{...h,property:x.fontSize},u],hostWidth:{property:"width"},hostDirection:{...u,property:"direction"},fontFamily:[u,{...y}],labelTextColor:[{...y,property:"color"},{...g,property:"color"}],labelRequiredIndicator:{...g,property:"content"},errorMessageTextColor:{...m,property:"color"},digitValueTextColor:{selector:o.w.componentName,property:x.inputValueTextColor},digitSize:[{...h,property:"height"},{...h,property:"width"}],digitPadding:{...h,property:x.inputHorizontalPadding},digitTextAlign:{...h,property:x.inputTextAlign},digitCaretTextColor:{...h,property:x.inputCaretTextColor},digitSpacing:{...b,property:"gap"},digitOutlineColor:{...h,property:x.inputOutlineColor},digitOutlineWidth:{...h,property:x.inputOutlineWidth},focusedDigitFieldOutlineColor:{...f,property:x.inputOutlineColor},overlayOpacity:{...b,property:"opacity"},spinnerSize:{selector:a.l.componentName,property:v.spinnerSize}}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,(t=>class extends t{static get observedAttributes(){return c.concat(t.observedAttributes||[])}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n <${r.T}\n bordered="true"\n name="code"\n tabindex="-1"\n slot="input"\n ><slot></slot></${r.T}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.T),(0,p.EA)(this,this.inputElement,{includeAttrs:["digits","size","loading"]})}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),"digits"===t&&this.style.setProperty("--passcode-digits-count",n)}}))((0,i.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: calc(var(--passcode-digits-count) * 2em);\n\t\t\t}\n\t\t\t${(0,s.X6)()}\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n :host([loading="true"]) descope-passcode-internal .loader-container {\n display: block;\n }\n\n\t\t\tdescope-passcode-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal .wrapper {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tmin-height: initial;\n\t\t\t\theight: 100%;\n\t\t\t\tjustify-content: space-between;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal descope-text-field {\n\t\t\t\tmin-width: 2em;\n\t\t\t\tmax-width: var(${x.inputHeight});\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n /* safari */\n\t\t\tvaadin-text-field::part(input-field)::after {\n opacity: 0;\n }\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${(0,s.$J)("vaadin-text-field")}\n\t\t\t${(0,s.I4)("vaadin-text-field")}\n \t`,excludeAttrsSync:["tabindex"],componentName:d}));n(89348),n(86715),n(81443),customElements.define(d,w)},69473:(t,e,n)=>{n.d(e,{T:()=>p,w:()=>d});var i=n(94619),r=n(93826),o=n(7138),a=n(14944),l=n(33177);const p=(0,a.xE)("text-field"),s=["type","label-type","copy-to-clipboard"],d=(0,o.Zz)((0,i.RF)({mappings:r.A}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),i.tQ,(t=>class extends t{static get observedAttributes(){return s.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},n={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,n),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,n){super.attributeChangeCallback?.(t,e,n),"type"===t&&this.baseElement._setType(n),e!==n&&("label-type"===t?"floating"===n?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===n))}}))((0,i.tz)({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,l.$J)("vaadin-text-field")}\n\t\t\t${(0,l.cy)(d.cssVarList)}\n\t\t\t${(0,l.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,l.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))},89348:(t,e,n)=>{n.r(e),n.d(e,{TextFieldClass:()=>i.w}),n(39542),n(66418),n(56637);var i=n(69473);customElements.define(i.T,i.w)},93826:(t,e,n)=>{n.d(e,{A:()=>x});const{host:i,label:r,placeholder:o,requiredIndicator:a,inputField:l,input:p,inputMask:s,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:y,externalInput:g,externalInputDisabled:b,externalPlaceholder:f,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"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},x={fontSize:[{},i],fontFamily:[r,l,d,c],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:{...i,property:"width"},hostMinWidth:{...i,property:"min-width"},hostDirection:{...i,property:"direction"},inputDirection:{...p,property:"direction"},inputBackgroundColor:[{...l,property:"background-color"},{...s,property:"background-color"}],errorMessageTextColor:{...c,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...l,property:"color"},{...h,property:"-webkit-text-fill-color"},{...b,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"caret-color"},{...g,property:"caret-color"}],labelRequiredIndicator:{...a,property:"content"},inputBorderColor:{...l,property:"border-color"},inputBorderWidth:{...l,property:"border-width"},inputBorderStyle:{...l,property:"border-style"},inputBorderRadius:{...l,property:"border-radius"},inputHeight:{...l,property:"height"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"},{...g,property:"padding-left"},{...g,property:"padding-right"}],inputOutlineColor:{...l,property:"outline-color"},inputOutlineStyle:{...l,property:"outline-style"},inputOutlineWidth:{...l,property:"outline-width"},inputOutlineOffset:{...l,property:"outline-offset"},textAlign:{},inputTextAlign:[{...p,property:"text-align"},{...g,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...f,property:"color"},{...o,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"},{...f,property:"opacity"}],inputVerticalAlignment:[{...l,property:"align-items"},{...g,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...g,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...g,property:"margin-bottom"}],inputIconOffset:[{...y,property:"margin-right"},{...y,property:"margin-left"}],inputIconSize:{...y,property:"font-size"},inputIconColor:{...y,property:"color"}}},33177:(t,e,n)=>{n.d(e,{$J:()=>u,I4:()=>a,Kl:()=>h,LJ:()=>c,Qv:()=>o,X6:()=>p,cy:()=>i,fu:()=>s,kG:()=>d,lS:()=>l,zm:()=>r});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`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(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`,c=(t,e)=>`\n ${r(t)}\n ${a(t)}\n ${l(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`,u=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 width: auto;\n }\n '}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9399],{94702:(e,t,r)=>{r.r(t),r.d(t,{RadioGroupClass:()=>c});var o=r(7138),i=r(14944),n=r(33177),l=r(94619),a=r(93826);const p=(0,i.xE)("radio-button"),s=(0,o.Zz)((0,l.RF)({mappings:{cursor:[{},{selector:"label"}],fontSize:[{selector:"label"},{}],labelTextColor:{selector:"label",property:"color"},fontFamily:{selector:"label"},radioSize:[{selector:"::part(radio)",property:"height"},{selector:"::part(radio)",property:"width"}],radioBackgroundColor:{selector:"::part(radio)",property:"background-color"},radioMargin:{selector:"::part(radio)",property:"margin"},radioCheckedSize:{selector:"::part(radio)::after",property:"border-width"},radioCheckedColor:{selector:"::part(radio)::after",property:"border-color"},radioBorderColor:{selector:"::part(radio)",property:"border-color",fallback:"none"},radioBorderWidth:{selector:"::part(radio)",property:"border-width",fallback:0},radioBorderStyle:{selector:"::part(radio)",property:"border-style",fallback:"solid"}}}),(0,l.OZ)({proxyProps:["setSelectionRange"]}),l.tQ,(e=>class extends e{constructor(){super(),this.baseElement.checkValidity=()=>{}}init(){this.baseElement.addEventListener("checked-changed",(e=>{this.dispatchEvent(new CustomEvent("checked-changed",{detail:e.detail},{bubbles:!0,composed:!0}))})),super.init?.(),(0,i.Ge)(this,this.renderLabel.bind(this))}renderLabel(){this.baseElement.setAttribute("label",this.textContent)}get value(){return this.getAttribute("value")}}))((0,l.tz)({slots:[""],wrappedEleName:"vaadin-radio-button",excludeAttrsSync:["tabindex","data"],includeForwardProps:["checked","name","disabled"],componentName:p})),d=(0,i.xE)("radio-group"),c=(0,o.Zz)((0,l.RF)({mappings:{...a.A,buttonsSpacing:{selector:"::part(group-field)",property:"justify-content"},buttonsRowGap:{selector:"::part(group-field)",property:"row-gap"},buttonsColumnGap:{selector:"::part(group-field)",property:"column-gap"},itemsLabelColor:{selector:()=>`::slotted(${s.componentName})`,property:s.cssVarList.labelTextColor}}}),l.VO,(0,l.OZ)({proxyProps:["setSelectionRange"]}),l.tQ,(e=>class extends e{#e=({value:e,label:t})=>`<descope-radio-button value="${e}">${t}</descope-radio-button>`;#t;constructor(){super(),Object.defineProperty(this.baseElement,"children",{get:()=>this.querySelectorAll(p)}),this.baseElement.__filterRadioButtons=e=>e.filter((e=>e.localName===p)),this.baseElement.setCustomValidity=()=>{}}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}get size(){return this.getAttribute("size")}get data(){if(this.#t)return this.#t;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" - ',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#t=e,this.renderItems())}get defaultValue(){return this.getAttribute("default-value")}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.(((e,t)=>e+(this.#e?.(t||{})||"")),"")}renderItems(){const e=this.getItemsTemplate();e&&(this.innerHTML=e)}init(){super.init?.(),this.inputElement=this.baseElement,this.renderItems(),(0,i.mx)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),Object.defineProperty(this.baseElement,"validity",{get:()=>({valueMissing:!this.baseElement.checkValidity()})}),(0,i.EA)(this,this.baseElement,{includeAttrs:["layout"],mapAttrs:{layout:"theme"}}),setTimeout((()=>{this.defaultValue&&(this.value=this.defaultValue)})),(0,i.Ge)(this,(({addedNodes:e})=>{e.forEach((e=>{e.setAttribute("size",this.size)}))})),(0,i.mx)(this,(()=>{this.items.forEach((e=>{e.setAttribute("size",this.size)}))}),{includeAttrs:["size"]})}}))((0,l.tz)({slots:["","prefix"],wrappedEleName:"vaadin-radio-group",style:()=>`\n :host {\n display: inline-block;\n max-width: 100%;\n box-sizing: border-box;\n }\n\n vaadin-radio-group {\n padding: 0;\n width: 100%;\n }\n\n ${(0,n.$J)("vaadin-radio-group")}\n `,excludeAttrsSync:["tabindex","size","data","direction"],componentName:d,includeForwardProps:["value"]}));r(5086),customElements.define(d,c),customElements.define(p,s)},93826:(e,t,r)=>{r.d(t,{A:()=>x});const{host:o,label:i,placeholder:n,requiredIndicator:l,inputField:a,input:p,inputMask:s,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:b,externalInput:y,externalInputDisabled:g,externalPlaceholder:f,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"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},x={fontSize:[{},o],fontFamily:[i,a,d,c],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...l,property:"color"},{...i,property:"-webkit-text-fill-color"},{...l,property:"-webkit-text-fill-color"}],hostWidth:{...o,property:"width"},hostMinWidth:{...o,property:"min-width"},hostDirection:{...o,property:"direction"},inputBackgroundColor:[{...a,property:"background-color"},{...s,property:"background-color"}],errorMessageTextColor:{...c,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"caret-color"},{...y,property:"caret-color"}],labelRequiredIndicator:{...l,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"},{...y,property:"padding-left"},{...y,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...p,property:"text-align"},{...y,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...f,property:"color"},{...n,property:"color"},{...u,property:"-webkit-text-fill-color"},{...m,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"},{...f,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...y,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...y,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...y,property:"margin-bottom"}],inputIconOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],inputIconSize:{...b,property:"font-size"},inputIconColor:{...b,property:"color"}}},33177:(e,t,r)=>{r.d(t,{$J:()=>u,I4:()=>l,Kl:()=>h,LJ:()=>c,Qv:()=>n,X6:()=>p,cy:()=>o,fu:()=>s,kG:()=>d,lS:()=>a,zm:()=>i});const o=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,i=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,n=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,l=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}: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=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,d=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,c=(e,t)=>`\n ${i(e)}\n ${l(e)}\n ${a(e)}\n ${n(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${d(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,u=e=>`\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 ${e} [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 width: auto;\n }\n '}}]);
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9399],{94702:(e,t,r)=>{r.r(t),r.d(t,{RadioGroupClass:()=>c});var o=r(7138),i=r(14944),n=r(33177),l=r(94619),a=r(93826);const p=(0,i.xE)("radio-button"),s=(0,o.Zz)((0,l.RF)({mappings:{cursor:[{},{selector:"label"}],fontSize:[{selector:"label"},{}],labelTextColor:{selector:"label",property:"color"},fontFamily:{selector:"label"},radioSize:[{selector:"::part(radio)",property:"height"},{selector:"::part(radio)",property:"width"}],radioBackgroundColor:{selector:"::part(radio)",property:"background-color"},radioMargin:{selector:"::part(radio)",property:"margin"},radioCheckedSize:{selector:"::part(radio)::after",property:"border-width"},radioCheckedColor:{selector:"::part(radio)::after",property:"border-color"},radioBorderColor:{selector:"::part(radio)",property:"border-color",fallback:"none"},radioBorderWidth:{selector:"::part(radio)",property:"border-width",fallback:0},radioBorderStyle:{selector:"::part(radio)",property:"border-style",fallback:"solid"}}}),(0,l.OZ)({proxyProps:["setSelectionRange"]}),l.tQ,(e=>class extends e{constructor(){super(),this.baseElement.checkValidity=()=>{}}init(){this.baseElement.addEventListener("checked-changed",(e=>{this.dispatchEvent(new CustomEvent("checked-changed",{detail:e.detail},{bubbles:!0,composed:!0}))})),super.init?.(),(0,i.Ge)(this,this.renderLabel.bind(this))}renderLabel(){this.baseElement.setAttribute("label",this.textContent)}get value(){return this.getAttribute("value")}}))((0,l.tz)({slots:[""],wrappedEleName:"vaadin-radio-button",excludeAttrsSync:["tabindex","data"],includeForwardProps:["checked","name","disabled"],componentName:p})),d=(0,i.xE)("radio-group"),c=(0,o.Zz)((0,l.RF)({mappings:{...a.A,buttonsSpacing:{selector:"::part(group-field)",property:"justify-content"},buttonsRowGap:{selector:"::part(group-field)",property:"row-gap"},buttonsColumnGap:{selector:"::part(group-field)",property:"column-gap"},itemsLabelColor:{selector:()=>`::slotted(${s.componentName})`,property:s.cssVarList.labelTextColor}}}),l.VO,(0,l.OZ)({proxyProps:["setSelectionRange"]}),l.tQ,(e=>class extends e{#e=({value:e,label:t})=>`<descope-radio-button value="${e}">${t}</descope-radio-button>`;#t;constructor(){super(),Object.defineProperty(this.baseElement,"children",{get:()=>this.querySelectorAll(p)}),this.baseElement.__filterRadioButtons=e=>e.filter((e=>e.localName===p)),this.baseElement.setCustomValidity=()=>{}}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}get size(){return this.getAttribute("size")}get data(){if(this.#t)return this.#t;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" - ',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#t=e,this.renderItems())}get defaultValue(){return this.getAttribute("default-value")}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.(((e,t)=>e+(this.#e?.(t||{})||"")),"")}renderItems(){const e=this.getItemsTemplate();e&&(this.innerHTML=e)}init(){super.init?.(),this.inputElement=this.baseElement,this.renderItems(),(0,i.mx)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),Object.defineProperty(this.baseElement,"validity",{get:()=>({valueMissing:!this.baseElement.checkValidity()})}),(0,i.EA)(this,this.baseElement,{includeAttrs:["layout"],mapAttrs:{layout:"theme"}}),setTimeout((()=>{this.defaultValue&&(this.value=this.defaultValue)})),(0,i.Ge)(this,(({addedNodes:e})=>{e.forEach((e=>{e.setAttribute("size",this.size)}))})),(0,i.mx)(this,(()=>{this.items.forEach((e=>{e.setAttribute("size",this.size)}))}),{includeAttrs:["size"]})}}))((0,l.tz)({slots:["","prefix"],wrappedEleName:"vaadin-radio-group",style:()=>`\n :host {\n display: inline-block;\n max-width: 100%;\n box-sizing: border-box;\n }\n\n vaadin-radio-group {\n padding: 0;\n width: 100%;\n }\n\n ${(0,n.$J)("vaadin-radio-group")}\n `,excludeAttrsSync:["tabindex","size","data","direction"],componentName:d,includeForwardProps:["value"]}));r(5086),customElements.define(d,c),customElements.define(p,s)},93826:(e,t,r)=>{r.d(t,{A:()=>x});const{host:o,label:i,placeholder:n,requiredIndicator:l,inputField:a,input:p,inputMask:s,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:b,externalInput:y,externalInputDisabled:g,externalPlaceholder:f,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"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},x={fontSize:[{},o],fontFamily:[i,a,d,c],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...l,property:"color"},{...i,property:"-webkit-text-fill-color"},{...l,property:"-webkit-text-fill-color"}],hostWidth:{...o,property:"width"},hostMinWidth:{...o,property:"min-width"},hostDirection:{...o,property:"direction"},inputDirection:{...p,property:"direction"},inputBackgroundColor:[{...a,property:"background-color"},{...s,property:"background-color"}],errorMessageTextColor:{...c,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"caret-color"},{...y,property:"caret-color"}],labelRequiredIndicator:{...l,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"},{...y,property:"padding-left"},{...y,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...p,property:"text-align"},{...y,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...f,property:"color"},{...n,property:"color"},{...u,property:"-webkit-text-fill-color"},{...m,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"},{...f,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...y,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...y,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...y,property:"margin-bottom"}],inputIconOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],inputIconSize:{...b,property:"font-size"},inputIconColor:{...b,property:"color"}}},33177:(e,t,r)=>{r.d(t,{$J:()=>u,I4:()=>l,Kl:()=>h,LJ:()=>c,Qv:()=>n,X6:()=>p,cy:()=>o,fu:()=>s,kG:()=>d,lS:()=>a,zm:()=>i});const o=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,i=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,n=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,l=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}: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=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,d=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,c=(e,t)=>`\n ${i(e)}\n ${l(e)}\n ${a(e)}\n ${n(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${d(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,u=e=>`\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 ${e} [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 width: auto;\n }\n '}}]);
|
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! For license information please see descope-scopes-list-index-js.js.LICENSE.txt */
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1674,7362,4838,7640],{25827:(t,e,n)=>{n.d(e,{y:()=>a});var r=n(7138),o=n(94619),i=n(70263);const a=(...t)=>(0,r.Zz)(o.XX,o._$,o.yF,o.jd)((0,i.q)(...t))},38777:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(14944),o=n(62751);const i=t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t\t<${o.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.T}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.T),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),(0,r.EA)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,r.q)(this.inputElement,this,["checked"]),(0,r.Gh)(this,this.inputElement,{includeAttrs:["checked"]})}}},89345:(t,e,n)=>{n.d(e,{A:()=>r});const r=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(33177).X6)()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n content: unset;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot="label"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot="label"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n`},62751:(t,e,n)=>{n.d(e,{A:()=>l,T:()=>i});var r=n(25827),o=n(14944);const i=(0,o.xE)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],s=(0,r.y)({componentName:i,baseSelector:"div"}),l=class extends s{static get observedAttributes(){return["readonly"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox")}get value(){return this.checkbox?.checked}set value(t){this.checkbox.checked=t}get checked(){return this.value}set checked(t){this.value=t}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.checkbox.focus()})),super.init?.(),(0,o.EA)(this,this.checkbox,{includeAttrs:a}),(0,o.Gh)(this,this.checkbox,{includeAttrs:["checked"]}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),"readonly"===t&&this.onReadOnlyChange(null!==n)}onReadOnlyChange(t){this.baseElement.setAttribute("inert",t)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},53716:(t,e,n)=>{n.r(e);var r=n(62751);customElements.define(r.T,r.A)},16611:(t,e,n)=>{n.d(e,{T:()=>d,q:()=>f});var r=n(14944),o=n(7138),i=n(94619),a=n(38777),s=n(89345),l=n(33177);const d=(0,r.xE)("checkbox"),{host:c,component:p,checkboxElement:h,checkboxSurface:u,checkboxLabel:b,requiredIndicator:m,helperText:y,errorMessage:x}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},f=(0,o.Zz)((0,i.RF)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[c,h,b],fontFamily:[b,y,x],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...m,property:"content"},errorMessageTextColor:{...x,property:"color"},inputValueTextColor:{...u,property:"color"},inputBackgroundColor:{...h,property:"background-color"},inputBorderRadius:{...h,property:"border-radius"},inputBorderWidth:{...h,property:"border-width"},inputBorderOffset:{...h,property:"border-offset"},inputBorderColor:{...h,property:"border-color"},inputBorderStyle:{...h,property:"border-style"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"},inputSize:[{...h,property:"width"},{...h,property:"height"},{...u,property:"font-size"},{...p,property:"font-size"}]}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,a.A)((0,i.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${s.A}\n ${(0,l.cy)(f.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n margin: 1px;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n height: 100%;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox)::after {\n top: 0;\n left: 0;\n -webkit-text-fill-color: initial;\n }\n\n vaadin-checkbox label {\n -webkit-text-fill-color: initial;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n `,excludeAttrsSync:["label","tabindex"],componentName:d}))},12388:(t,e,n)=>{n.r(e),n.d(e,{CheckboxClass:()=>r.q});var r=n(16611);n(94494),n(39542),n(53716),customElements.define(r.T,r.q)},93020:(t,e,n)=>{n.d(e,{H:()=>f,T:()=>d});var r=n(14944),o=n(7138),i=n(94619),a=n(38777),s=n(89345),l=n(33177);const d=(0,r.xE)("switch-toggle"),{host:c,component:p,checkboxElement:h,checkboxSurface:u,checkboxLabel:b,requiredIndicator:m,helperText:y,errorMessage:x}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},f=(0,o.Zz)((0,i.RF)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[p,b,b],fontFamily:[b,y,x],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...m,property:"content"},errorMessageTextColor:{...x,property:"color"},trackBorderWidth:{...h,property:"border-width"},trackBorderStyle:{...h,property:"border-style"},trackBorderColor:{...h,property:"border-color"},trackBackgroundColor:{...h,property:"background-color"},trackBorderRadius:{...h,property:"border-radius"},trackWidth:[{...h,property:"width"}],trackHeight:[{...u,property:"font-size"},{...h,property:"height"}],knobSize:[{...u,property:"width"},{...u,property:"height"}],knobTextColor:{...u,property:"color"},knobRadius:{...u,property:"border-radius"},knobTransitionDuration:{...u,property:"transition"},knobColor:{...u,property:"background-color"},knobTopOffset:{...u,property:"top"},knobLeftOffset:{...u,property:"left"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"}}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,a.A)((0,i.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${s.A}\n\t\t\t${(0,l.cy)(f.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n width: 100%;\n }\n\n vaadin-text-field::part(input-field) {\n cursor: pointer;\n }\n\n vaadin-checkbox {\n cursor: pointer;\n }\n\n vaadin-checkbox [slot="label"]:not(:empty) {\n cursor: pointer;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::before {\n content: '';\n\t\t\t}\n\n vaadin-checkbox[active]::part(checkbox) {\n\t\t\t\ttransform: none;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::after {\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 1;\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t`,excludeAttrsSync:["label","tabindex"],componentName:d}))},36911:(t,e,n)=>{n.r(e),n.d(e,{ListClass:()=>p});var r=n(94619),o=n(70263),i=n(7138),a=n(14944);const s=(0,a.xE)("list-item"),l=(0,i.Zz)((0,r.RF)({mappings:{padding:{},backgroundColor:{},borderColor:{},borderStyle:{},borderWidth:{},borderRadius:{},outline:{},cursor:{},gap:{},maxWidth:{selector:()=>":host"},alignItems:{},flexDirection:{},transition:{}}}),r.VO,r.tQ,(t=>class extends t{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <style>\n /*css*/\n slot {\n width: 100%;\n display: flex;\n overflow: hidden;\n box-sizing: border-box;\n }\n :host {\n display: block;\n }\n\n /*!css*/\n </style>\n <slot></slot>\n "}}),(t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mousedown",(t=>{t.preventDefault(),this.setAttribute("active","true"),window.addEventListener("mouseup",(()=>this.removeAttribute("active")),{once:!0})}))}}))((0,o.q)({componentName:s,baseSelector:"slot"})),d=(0,a.xE)("list");class c extends((0,o.q)({componentName:d,baseSelector:".wrapper"})){static get observedAttributes(){return["variant","readonly"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<style>\n\t /*css*/\n .wrapper {\n overflow: auto;\n display: grid;\n max-height: 100%;\n width: 100%;\n }\n\n :host {\n display: inline-flex;\n width: 100%;\n }\n slot[name="empty-state"] {\n justify-content: center;\n align-items: center;\n display: flex;\n flex-grow: 1;\n }\n\n :host slot[name="empty-state"] {\n display: none;\n }\n :host([empty]) slot[name="empty-state"] {\n display: flex;\n }\n ::slotted(:not([slot])) {\n width: 100%;\n }\n /*!css*/\n\t\t</style>\n\n <div class="wrapper">\n <slot></slot>\n <slot name="empty-state">\n No item...\n </slot>\n </div>\n\t'}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}#t(){0===this.items.length?this.setAttribute("empty","true"):this.removeAttribute("empty")}get variant(){return this.getAttribute("variant")||"list"}#e(){this.items.forEach((t=>{let e=t;e.localName!==l.componentName&&(e=t.querySelector(l.componentName));const n="tiles"===this.variant?"tile":"row";e.setAttribute("variant",n)}))}init(){super.init?.(),(0,a.Ge)(this,(()=>{this.#t(),this.#e(),this.#n()}))}get isReadOnly(){return"true"===this.getAttribute("readonly")}#n(){this.items.forEach((t=>{this.isReadOnly?t.setAttribute("inert",""):t.removeAttribute("inert")}))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),n!==e&&("variant"===t?this.#e():"readonly"===t&&this.#n())}}const p=(0,i.Zz)((0,r.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},maxHeight:{selector:()=>":host"},minHeight:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],hostDirection:{selector:()=>":host",property:"direction"},fontFamily:{},gap:{},backgroundColor:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},boxShadow:{},gridTemplateColumns:{},maxItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"max-width"},minItemsWidth:{selector:()=>"::slotted(:not([slot]))",property:"min-width"},itemsHorizontalAlign:{selector:()=>"::slotted(*)",property:"justify-self"},emptyStateTextColor:{selector:()=>'slot[name="empty-state"]',property:"color"},emptyStateTextFontFamily:{selector:()=>'slot[name="empty-state"]',property:"font-family"}}}),r.VO,r.tQ)(c);customElements.define(d,p),customElements.define(s,l)},78538:(t,e,n)=>{n.r(e),n.d(e,{ScopesListClass:()=>u});var r=n(70263),o=n(7138),i=n(14944),a=n(94619),s=n(84461),l=n(16611),d=n(93020);const c=(0,i.xE)("scopes-list"),p=["checkbox","switch"];class h extends((0,r.q)({componentName:c,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n\n\t\t</style>\n <div></div>\n\t\t"}get isReadOnly(){return"true"===this.getAttribute("readonly")}get size(){return this.getAttribute("size")||"sm"}get value(){return Array.from(this.shadowRoot.querySelector("div").children).reduce(((t,e)=>({...t,[e.getAttribute("data-id")]:e.checked})),{})}get variant(){const t=this.getAttribute("variant");return p.includes(t)?t:p[0]}}const u=(0,o.Zz)((0,a.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>l.q.componentName,property:l.q.cssVarList.hostDirection},{selector:()=>d.H.componentName,property:d.H.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"},requiredInputBorderColor:[{selector:`${l.q.componentName}[required="true"]`,property:l.q.cssVarList.inputBorderColor},{selector:`${d.H.componentName}[required="true"]`,property:d.H.cssVarList.inputBorderColor}],requiredInputValueTextColor:[{selector:`${l.q.componentName}[required="true"]`,property:l.q.cssVarList.inputValueTextColor},{selector:`${d.H.componentName}[required="true"]`,property:d.H.cssVarList.knobColor}]}}),(0,s.t)({itemRenderer:({id:t,desc:e,required:n=!1},r,o)=>{const i="checkbox"===o.variant?l.q:d.H;return`\n <${i.componentName}\n bordered="true"\n size=${o.size}\n label="${e}"\n data-id="${t}"\n readonly="${n||o.isReadOnly}"\n required="${n}"\n checked="true"\n ></${i.componentName}>\n`},rerenderAttrsList:["size","variant"]}),a.VO,a.tQ)(h);n(36911),n(12388),customElements.define(c,u)},33177:(t,e,n)=>{n.d(e,{$J:()=>h,I4:()=>a,Kl:()=>u,LJ:()=>p,Qv:()=>i,X6:()=>l,cy:()=>r,fu:()=>d,kG:()=>c,lS:()=>s,zm:()=>o});const r=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,o=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,i=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",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,c=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,p=(t,e)=>`\n ${o(t)}\n ${a(t)}\n ${s(t)}\n ${i(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 ${c(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`,u=()=>'\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 width: auto;\n }\n '},84461:(t,e,n)=>{n.d(e,{t:()=>a});var r=n(14944);const o=()=>!0,i=t=>`<pre>${JSON.stringify(t,null,4)}</pre>`,a=({itemRenderer:t=i,validateSchema:e=o,slotName:n,rerenderAttrsList:a=[]})=>o=>class extends o{#r=[];#o(t){if(!e)return!0;const n=e(t);return!0===n||(console.error("Data schema validation failed",n||""),!1)}#i(){const t=n?`*[slot="${n}"]`:":not([slot])";this.baseElement.querySelectorAll(t).forEach((t=>t.remove()))}#a(){this.#i(),this.data.forEach(((e,n)=>{const r="string"==typeof(o=t(e,n,this))?(t=>{const e=document.createElement("template");return e.innerHTML=t,e})(o).content:o instanceof HTMLTemplateElement?o.content:(console.error("Invalid template",o),null);var o;this.baseElement.appendChild(r?.cloneNode(!0))}))}set data(t){this.#o(t)&&(this.#r=t,this.#a())}get data(){return this.#r}init(){super.init?.(),(0,r.mx)(this,(t=>{t.includes("data")?this.#s():this.#a()}),{includeAttrs:[...a,"data"]})}#s(){const t=this.getAttribute("data");if(t)try{this.data=JSON.parse(t)}catch(e){console.warn("Invalid JSON data",t)}}}},15408:(t,e,n)=>{n.d(e,{f:()=>o});var r=n(32065);class o extends r.r{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})}}}}]);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*! For license information please see descope-text-field-index-js.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5166],{69473:(t,e,n)=>{n.d(e,{T:()=>p,w:()=>d});var i=n(94619),r=n(93826),o=n(7138),l=n(14944),a=n(33177);const p=(0,l.xE)("text-field"),s=["type","label-type","copy-to-clipboard"],d=(0,o.Zz)((0,i.RF)({mappings:r.A}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),i.tQ,(t=>class extends t{static get observedAttributes(){return s.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},n={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,n),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,n){super.attributeChangeCallback?.(t,e,n),"type"===t&&this.baseElement._setType(n),e!==n&&("label-type"===t?"floating"===n?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===n))}}))((0,i.tz)({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,a.$J)("vaadin-text-field")}\n\t\t\t${(0,a.cy)(d.cssVarList)}\n\t\t\t${(0,a.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,a.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))},89348:(t,e,n)=>{n.r(e),n.d(e,{TextFieldClass:()=>i.w}),n(39542),n(66418),n(56637);var i=n(69473);customElements.define(i.T,i.w)},93826:(t,e,n)=>{n.d(e,{A:()=>m});const{host:i,label:r,placeholder:o,requiredIndicator:l,inputField:a,input:p,inputMask:s,helperText:d,errorMessage:u,disabledPlaceholder:c,inputDisabled:h,inputIcon:y,externalInput:b,externalInputDisabled:g,externalPlaceholder:f,externalDisabledPlaceholder:x}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},m={fontSize:[{},i],fontFamily:[r,a,d,u],labelFontSize:{...r,property:"font-size"},labelFontWeight:{...r,property:"font-weight"},labelTextColor:[{...r,property:"color"},{...l,property:"color"},{...r,property:"-webkit-text-fill-color"},{...l,property:"-webkit-text-fill-color"}],hostWidth:{...i,property:"width"},hostMinWidth:{...i,property:"min-width"},hostDirection:{...i,property:"direction"},inputBackgroundColor:[{...a,property:"background-color"},{...s,property:"background-color"}],errorMessageTextColor:{...u,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"caret-color"},{...b,property:"caret-color"}],labelRequiredIndicator:{...l,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"},{...b,property:"padding-left"},{...b,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...p,property:"text-align"},{...b,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...f,property:"color"},{...o,property:"color"},{...c,property:"-webkit-text-fill-color"},{...x,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"},{...f,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...b,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...b,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...b,property:"margin-bottom"}],inputIconOffset:[{...y,property:"margin-right"},{...y,property:"margin-left"}],inputIconSize:{...y,property:"font-size"},inputIconColor:{...y,property:"color"}}},33177:(t,e,n)=>{n.d(e,{$J:()=>c,I4:()=>l,Kl:()=>h,LJ:()=>u,Qv:()=>o,X6:()=>p,cy:()=>i,fu:()=>s,kG:()=>d,lS:()=>a,zm:()=>r});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`,l=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 ${r(t)}\n ${l(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`,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 width: auto;\n }\n '},15408:(t,e,n)=>{n.d(e,{f:()=>r});var i=n(32065);class r extends i.r{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})}}},53430:(t,e,n)=>{n.d(e,{a:()=>r});var i=n(32318);const r=t=>class extends((0,i.R)(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}},34068:(t,e,n)=>{n.d(e,{A:()=>h}),n(9077);var i=n(33791),r=n(38735),o=n(31846),l=n(58074),a=n(89385),p=n(6052),s=n(15408),d=n(53430),u=n(3550);const c=t=>class extends((0,d.a)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new s.f(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new u.q(this.inputElement,this._labelController))}};(0,p.SF)("vaadin-text-field",a.k,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,p.cp)((0,o.q)(i.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return i.qy`
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5166],{69473:(t,e,n)=>{n.d(e,{T:()=>p,w:()=>d});var i=n(94619),r=n(93826),o=n(7138),l=n(14944),a=n(33177);const p=(0,l.xE)("text-field"),s=["type","label-type","copy-to-clipboard"],d=(0,o.Zz)((0,i.RF)({mappings:r.A}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),i.tQ,(t=>class extends t{static get observedAttributes(){return s.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},n={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,n),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,n){super.attributeChangeCallback?.(t,e,n),"type"===t&&this.baseElement._setType(n),e!==n&&("label-type"===t?"floating"===n?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===n))}}))((0,i.tz)({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,a.$J)("vaadin-text-field")}\n\t\t\t${(0,a.cy)(d.cssVarList)}\n\t\t\t${(0,a.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,a.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))},89348:(t,e,n)=>{n.r(e),n.d(e,{TextFieldClass:()=>i.w}),n(39542),n(66418),n(56637);var i=n(69473);customElements.define(i.T,i.w)},93826:(t,e,n)=>{n.d(e,{A:()=>m});const{host:i,label:r,placeholder:o,requiredIndicator:l,inputField:a,input:p,inputMask:s,helperText:d,errorMessage:u,disabledPlaceholder:c,inputDisabled:h,inputIcon:y,externalInput:b,externalInputDisabled:g,externalPlaceholder:f,externalDisabledPlaceholder:x}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},m={fontSize:[{},i],fontFamily:[r,a,d,u],labelFontSize:{...r,property:"font-size"},labelFontWeight:{...r,property:"font-weight"},labelTextColor:[{...r,property:"color"},{...l,property:"color"},{...r,property:"-webkit-text-fill-color"},{...l,property:"-webkit-text-fill-color"}],hostWidth:{...i,property:"width"},hostMinWidth:{...i,property:"min-width"},hostDirection:{...i,property:"direction"},inputDirection:{...p,property:"direction"},inputBackgroundColor:[{...a,property:"background-color"},{...s,property:"background-color"}],errorMessageTextColor:{...u,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"caret-color"},{...b,property:"caret-color"}],labelRequiredIndicator:{...l,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"},{...b,property:"padding-left"},{...b,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...p,property:"text-align"},{...b,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...f,property:"color"},{...o,property:"color"},{...c,property:"-webkit-text-fill-color"},{...x,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"},{...f,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...b,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...b,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...b,property:"margin-bottom"}],inputIconOffset:[{...y,property:"margin-right"},{...y,property:"margin-left"}],inputIconSize:{...y,property:"font-size"},inputIconColor:{...y,property:"color"}}},33177:(t,e,n)=>{n.d(e,{$J:()=>c,I4:()=>l,Kl:()=>h,LJ:()=>u,Qv:()=>o,X6:()=>p,cy:()=>i,fu:()=>s,kG:()=>d,lS:()=>a,zm:()=>r});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`,l=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 ${r(t)}\n ${l(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`,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 width: auto;\n }\n '},15408:(t,e,n)=>{n.d(e,{f:()=>r});var i=n(32065);class r extends i.r{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})}}},53430:(t,e,n)=>{n.d(e,{a:()=>r});var i=n(32318);const r=t=>class extends((0,i.R)(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}},34068:(t,e,n)=>{n.d(e,{A:()=>h}),n(9077);var i=n(33791),r=n(38735),o=n(31846),l=n(58074),a=n(89385),p=n(6052),s=n(15408),d=n(53430),u=n(3550);const c=t=>class extends((0,d.a)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new s.f(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new u.q(this.inputElement,this._labelController))}};(0,p.SF)("vaadin-text-field",a.k,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,p.cp)((0,o.q)(i.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return i.qy`
|
3
3
|
<style>
|
4
4
|
[part='input-field'] {
|
5
5
|
flex-grow: 0;
|
package/dist/umd/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,s){"object"==typeof exports&&"object"==typeof module?module.exports=s():"function"==typeof define&&define.amd?define([],s):"object"==typeof exports?exports.DescopeUI=s():e.DescopeUI=s()}(self,(()=>(()=>{var e,s,o,d={97301:(e,s,o)=>{var d={"./boolean-fields/descope-boolean-field-internal/index.js":[53716,650,4619,7362],"./boolean-fields/descope-checkbox/index.js":[10796,650,8164,9895,3222,9167,1033,5273,4619,4838],"./boolean-fields/descope-switch-toggle/index.js":[19792,650,8164,9895,3222,9167,1033,5273,4619,1448],"./button-selection-group-fields/descope-button-multi-selection-group-internal/index.js":[39173,650,4619,8399],"./button-selection-group-fields/descope-button-multi-selection-group/index.js":[82329,650,8164,9895,1033,2838,7824,4619,3829],"./button-selection-group-fields/descope-button-selection-group-internal/index.js":[19509,650,4619,7079],"./button-selection-group-fields/descope-button-selection-group-item/index.js":[42426,650,8164,9895,1033,2838,7824,4619,1837],"./button-selection-group-fields/descope-button-selection-group/index.js":[7815,650,8164,9895,1033,2838,7824,4619,2141],"./descope-apps-list/index.js":[78706,650,8164,9895,6637,6418,3711,1414,4619,3057],"./descope-avatar/index.js":[23008,650,8164,9895,6637,6418,3711,1414,4619,2645],"./descope-badge/index.js":[58765,650,4619,9553],"./descope-button/index.js":[1058,650,8164,9895,1033,2838,4619,9984],"./descope-code-snippet/index.js":[52475,650,9878,4619,3521],"./descope-combo-box/index.js":[4480,650,8164,9895,3222,9167,3711,2566,9632,4619,7052],"./descope-container/index.js":[43713,650,4619,8689],"./descope-date-field/descope-calendar/index.js":[18562,650,8164,9895,3222,9167,1033,2838,3711,2566,9632,7607,4619,6028],"./descope-date-field/index.js":[66509,650,8164,9895,3222,9167,1033,6637,6418,2838,3711,2566,9632,7607,8980,4619,6028,9257],"./descope-divider/index.js":[53665,650,4619,8819],"./descope-email-field/index.js":[91046,650,8164,9895,3222,9167,4619,5695],"./descope-enriched-text/index.js":[39e3,650,1672,4619,5710],"./descope-grid/descope-grid-custom-column/index.js":[96969,8164,3607,9176],"./descope-grid/descope-grid-item-details-column/index.js":[85198,8164,9895,6637,6418,3607,2381],"./descope-grid/descope-grid-selection-column/index.js":[79120,650,8164,9895,3222,9167,1033,3607,5273,4619,3305],"./descope-grid/descope-grid-text-column/index.js":[36486,8164,3607,8108],"./descope-grid/index.js":[30954,650,8164,9895,3222,9167,1033,6637,6418,2566,3607,5273,9878,2919,4619,2200],"./descope-icon/index.js":[21471,650,2838,4619,7401],"./descope-image/index.js":[90313,650,4619,9175],"./descope-link/index.js":[31678,650,4619,7792],"./descope-list/index.js":[36911,650,4619,7640],"./descope-loader-linear/index.js":[22339,650,4619,8009],"./descope-loader-radial/index.js":[86715,650,4619,7163],"./descope-logo/index.js":[13959,650,4619,1239],"./descope-modal/index.js":[826,650,8164,3711,1437,4619,4139],"./descope-multi-select-combo-box/index.js":[10664,650,8164,9895,3222,9167,3711,2566,9632,6474,4619,1331],"./descope-new-password/descope-new-password-internal/index.js":[32039,650,4619,8603],"./descope-new-password/index.js":[26586,650,8164,9895,3222,9167,1033,6637,6418,351,4619,4364],"./descope-notification/descope-notification-card/index.js":[39749,650,8164,4834,4619,7326],"./descope-notification/index.js":[35592,650,8164,4834,4619,8019],"./descope-notp-image/index.js":[22529,650,4619,2251],"./descope-number-field/index.js":[37041,650,8164,9895,3222,9167,5412,4619,7944],"./descope-passcode/descope-passcode-internal/index.js":[81443,650,4619,3359],"./descope-passcode/index.js":[40868,650,8164,9895,3222,9167,6637,6418,8162,4619,8884],"./descope-password/index.js":[1279,650,8164,9895,3222,9167,1033,351,4619,6969],"./descope-policy-validation/index.js":[28184,650,4619,2996],"./descope-radio-group/index.js":[94702,650,8164,9895,3222,1033,5086,4619,9399],"./descope-recaptcha/index.js":[19552,650,4619,3847],"./descope-text-area/index.js":[641,650,8164,9895,3222,9167,286,4619,5686],"./descope-text-field/index.js":[89348,650,8164,9895,3222,9167,6637,6418,4619,5166],"./descope-text/index.js":[16429,650,4619,171],"./descope-totp-image/index.js":[89011,650,4619,6213],"./descope-upload-file/index.js":[82147,650,8164,9895,1033,2838,5443,4619,9636],"./descope-user-attribute/index.js":[91132,650,8164,9895,1033,6637,2838,5026,4619,1578],"./descope-user-auth-method/index.js":[56780,650,8164,9895,1033,6637,2838,7407,4619,9990],"./mapping-fields/descope-mappings-field/descope-mapping-item/index.js":[91491,650,4619,2230],"./mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js":[88858,650,4619,9522],"./mapping-fields/descope-mappings-field/index.js":[64551,650,8164,9895,3222,9167,1033,6637,6418,2838,3711,2566,9632,1053,4619,7095],"./mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js":[71828,650,4619,9708],"./mapping-fields/descope-saml-group-mappings/index.js":[28511,650,8164,9895,3222,9167,1033,6637,6418,2838,3711,2566,9632,1053,4619,7095,6832],"./phone-fields/descope-phone-field/descope-phone-field-internal/index.js":[54930,650,8164,9895,3222,9167,6637,6418,3711,2566,9632,6726,4619,5459,2878],"./phone-fields/descope-phone-field/index.js":[18638,650,8164,9895,3222,9167,6637,6418,3711,2566,9632,6726,4619,5459,9894],"./phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js":[46633,650,8164,9895,3222,9167,6637,6418,4619,5459,8657],"./phone-fields/descope-phone-input-box-field/index.js":[65636,650,8164,9895,3222,9167,6637,6418,3711,2566,9632,7212,4619,5459,4043]};function n(e){if(!o.o(d,e))return Promise.resolve().then((()=>{var s=new Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}));var s=d[e],n=s[0];return Promise.all(s.slice(1).map(o.e)).then((()=>o(n)))}n.keys=()=>Object.keys(d),n.id=97301,e.exports=n},6461:(e,s,o)=>{"use strict";o.r(s),o.d(s,{componentsThemeManager:()=>d});const d=new class{static mountOnPropName="DescopeThemeManager";#e={};#s="light";#o=new Set;#d(){this.#o.forEach((e=>e?.()))}get currentThemeName(){return this.#s}set currentThemeName(e){this.#s=e,this.#d()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#o.add(e),()=>{this.#o.delete(e)}}set themes(e){this.#e=e,this.#d()}get hasThemes(){return!!Object.keys(this.#e).length}}},41216:(e,s,o)=>{const{componentsThemeManager:d}=o(6461),n=o(97301);e.exports=n.keys().reduce(((e,s)=>{const o=s.replace(/.*?([^\/]+)\/index\.js$/,"$1");return o.endsWith("-internal")||(e[o]=()=>n(s)),e}),{}),e.exports.componentsThemeManager=d}},n={};function i(e){var s=n[e];if(void 0!==s)return s.exports;var o=n[e]={exports:{}};return d[e].call(o.exports,o,o.exports,i),o.exports}i.m=d,e=[],i.O=(s,o,d,n)=>{if(!o){var t=1/0;for(a=0;a<e.length;a++){for(var[o,d,n]=e[a],p=!0,c=0;c<o.length;c++)(!1&n||t>=n)&&Object.keys(i.O).every((e=>i.O[e](o[c])))?o.splice(c--,1):(p=!1,n<t&&(t=n));if(p){e.splice(a--,1);var r=d();void 0!==r&&(s=r)}}return s}n=n||0;for(var a=e.length;a>0&&e[a-1][2]>n;a--)e[a]=e[a-1];e[a]=[o,d,n]},i.F={},i.E=e=>{Object.keys(i.F).map((s=>{i.F[s](e)}))},i.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return i.d(s,{a:s}),s},i.d=(e,s)=>{for(var o in s)i.o(s,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((s,o)=>(i.f[o](e,s),s)),[])),i.u=e=>(({171:"descope-text-index-js",1239:"descope-logo-index-js",1331:"descope-multi-select-combo-box-index-js",1448:"boolean-fields-descope-switch-toggle-index-js",1578:"descope-user-attribute-index-js",1837:"button-selection-group-fields-descope-button-selection-group-item-index-js",2141:"button-selection-group-fields-descope-button-selection-group-index-js",2200:"descope-grid-index-js",2230:"mapping-fields-descope-mappings-field-descope-mapping-item-index-js",2251:"descope-notp-image-index-js",2381:"descope-grid-descope-grid-item-details-column-index-js",2645:"descope-avatar-index-js",2878:"phone-fields-descope-phone-field-descope-phone-field-internal-index-js",2996:"descope-policy-validation-index-js",3057:"descope-apps-list-index-js",3305:"descope-grid-descope-grid-selection-column-index-js",3359:"descope-passcode-descope-passcode-internal-index-js",3521:"descope-code-snippet-index-js",3829:"button-selection-group-fields-descope-button-multi-selection-group-index-js",3847:"descope-recaptcha-index-js",4043:"phone-fields-descope-phone-input-box-field-index-js",4139:"descope-modal-index-js",4364:"descope-new-password-index-js",4838:"boolean-fields-descope-checkbox-index-js",5166:"descope-text-field-index-js",5686:"descope-text-area-index-js",5695:"descope-email-field-index-js",5710:"descope-enriched-text-index-js",6028:"descope-date-field-descope-calendar-index-js",6213:"descope-totp-image-index-js",6832:"mapping-fields-descope-saml-group-mappings-index-js",6969:"descope-password-index-js",7052:"descope-combo-box-index-js",7079:"button-selection-group-fields-descope-button-selection-group-internal-index-js",7095:"mapping-fields-descope-mappings-field-index-js",7163:"descope-loader-radial-index-js",7326:"descope-notification-descope-notification-card-index-js",7362:"boolean-fields-descope-boolean-field-internal-index-js",7401:"descope-icon-index-js",7640:"descope-list-index-js",7792:"descope-link-index-js",7944:"descope-number-field-index-js",8009:"descope-loader-linear-index-js",8019:"descope-notification-index-js",8108:"descope-grid-descope-grid-text-column-index-js",8399:"button-selection-group-fields-descope-button-multi-selection-group-internal-index-js",8603:"descope-new-password-descope-new-password-internal-index-js",8657:"phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js",8689:"descope-container-index-js",8819:"descope-divider-index-js",8884:"descope-passcode-index-js",9175:"descope-image-index-js",9176:"descope-grid-descope-grid-custom-column-index-js",9257:"descope-date-field-index-js",9399:"descope-radio-group-index-js",9522:"mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js",9553:"descope-badge-index-js",9636:"descope-upload-file-index-js",9708:"mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js",9894:"phone-fields-descope-phone-field-index-js",9984:"descope-button-index-js",9990:"descope-user-auth-method-index-js"}[e]||e)+".js"),i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),s={},o="@descope/web-components-ui:",i.l=(e,d,n,t)=>{if(s[e])s[e].push(d);else{var p,c;if(void 0!==n)for(var r=document.getElementsByTagName("script"),a=0;a<r.length;a++){var l=r[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==o+n){p=l;break}}p||(c=!0,(p=document.createElement("script")).charset="utf-8",p.timeout=120,i.nc&&p.setAttribute("nonce",i.nc),p.setAttribute("data-webpack",o+n),p.src=e),s[e]=[d];var u=(o,d)=>{p.onerror=p.onload=null,clearTimeout(x);var n=s[e];if(delete s[e],p.parentNode&&p.parentNode.removeChild(p),n&&n.forEach((e=>e(d))),o)return o(d)},x=setTimeout(u.bind(null,void 0,{type:"timeout",target:p}),12e4);p.onerror=u.bind(null,p.onerror),p.onload=u.bind(null,p.onload),c&&document.head.appendChild(p)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var s=i.g.document;if(!e&&s&&(s.currentScript&&"SCRIPT"===s.currentScript.tagName.toUpperCase()&&(e=s.currentScript.src),!e)){var o=s.getElementsByTagName("script");if(o.length)for(var d=o.length-1;d>-1&&(!e||!/^http(s?):/.test(e));)e=o[d--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={5536:0};i.f.j=(s,o)=>{var d=i.o(e,s)?e[s]:void 0;if(0!==d)if(d)o.push(d[2]);else{var n=new Promise(((o,n)=>d=e[s]=[o,n]));o.push(d[2]=n);var t=i.p+i.u(s),p=new Error;i.l(t,(o=>{if(i.o(e,s)&&(0!==(d=e[s])&&(e[s]=void 0),d)){var n=o&&("load"===o.type?"missing":o.type),t=o&&o.target&&o.target.src;p.message="Loading chunk "+s+" failed.\n("+n+": "+t+")",p.name="ChunkLoadError",p.type=n,p.request=t,d[1](p)}}),"chunk-"+s,s)}},i.F.j=s=>{if(!i.o(e,s)||void 0===e[s]){e[s]=null;var o=document.createElement("link");i.nc&&o.setAttribute("nonce",i.nc),o.rel="prefetch",o.as="script",o.href=i.p+i.u(s),document.head.appendChild(o)}},i.O.j=s=>0===e[s];var s=(s,o)=>{var d,n,[t,p,c]=o,r=0;if(t.some((s=>0!==e[s]))){for(d in p)i.o(p,d)&&(i.m[d]=p[d]);if(c)var a=c(i)}for(s&&s(o);r<t.length;r++)n=t[r],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(a)},o=self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[];o.forEach(s.bind(null,0)),o.push=s.bind(null,o.push.bind(o))})(),i.O(0,[5536],(()=>{[650,4619,7362,8164,9895,3222,9167,1033,5273,4838,1448,8399,2838,7824,3829,7079,1837,2141,6637,6418,3711,1414,3057,2645,9553,9984,9878,3521,2566,9632,7052,8689,7607,6028,8980,9257,8819,5695,1672,5710,3607,9176,2381,3305,8108,2919,2200,7401,9175,7792,7640,8009,7163,1239,1437,4139,6474,1331,8603,351,4364,4834,7326,8019,2251,5412,7944,3359,8162,8884,6969,2996,5086,9399,3847,286,5686,5166,171,6213,5443,9636,5026,1578,7407,9990,2230,9522,1053,7095,9708,6832,6726,5459,2878,9894,8657,7212,4043].map(i.E)}),5);var t=i(41216);return i.O(t)})()));
|
1
|
+
!function(e,s){"object"==typeof exports&&"object"==typeof module?module.exports=s():"function"==typeof define&&define.amd?define([],s):"object"==typeof exports?exports.DescopeUI=s():e.DescopeUI=s()}(self,(()=>(()=>{var e,s,o,d={97301:(e,s,o)=>{var d={"./boolean-fields/descope-boolean-field-internal/index.js":[53716,650,4619,7362],"./boolean-fields/descope-checkbox/index.js":[12388,650,8164,9895,3222,9167,1033,5273,4619,4838],"./boolean-fields/descope-switch-toggle/index.js":[57836,650,8164,9895,3222,9167,1033,5273,4619,1448],"./button-selection-group-fields/descope-button-multi-selection-group-internal/index.js":[39173,650,4619,8399],"./button-selection-group-fields/descope-button-multi-selection-group/index.js":[82329,650,8164,9895,1033,2838,7824,4619,3829],"./button-selection-group-fields/descope-button-selection-group-internal/index.js":[19509,650,4619,7079],"./button-selection-group-fields/descope-button-selection-group-item/index.js":[42426,650,8164,9895,1033,2838,7824,4619,1837],"./button-selection-group-fields/descope-button-selection-group/index.js":[7815,650,8164,9895,1033,2838,7824,4619,2141],"./descope-apps-list/index.js":[94073,650,8164,9895,6637,6418,3711,1414,4619,3057],"./descope-avatar/index.js":[23008,650,8164,9895,6637,6418,3711,1414,4619,2645],"./descope-badge/index.js":[58765,650,4619,9553],"./descope-button/index.js":[1058,650,8164,9895,1033,2838,4619,9984],"./descope-code-snippet/index.js":[52475,650,9878,4619,3521],"./descope-combo-box/index.js":[4480,650,8164,9895,3222,9167,3711,2566,9632,4619,7052],"./descope-container/index.js":[43713,650,4619,8689],"./descope-date-field/descope-calendar/index.js":[18562,650,8164,9895,3222,9167,1033,2838,3711,2566,9632,7607,4619,6028],"./descope-date-field/index.js":[66509,650,8164,9895,3222,9167,1033,6637,6418,2838,3711,2566,9632,7607,8980,4619,6028,9257],"./descope-divider/index.js":[53665,650,4619,8819],"./descope-email-field/index.js":[91046,650,8164,9895,3222,9167,4619,5695],"./descope-enriched-text/index.js":[39e3,650,1672,4619,5710],"./descope-grid/descope-grid-custom-column/index.js":[96969,8164,3607,9176],"./descope-grid/descope-grid-item-details-column/index.js":[85198,8164,9895,6637,6418,3607,2381],"./descope-grid/descope-grid-selection-column/index.js":[79120,650,8164,9895,3222,9167,1033,3607,5273,4619,3305],"./descope-grid/descope-grid-text-column/index.js":[36486,8164,3607,8108],"./descope-grid/index.js":[30954,650,8164,9895,3222,9167,1033,6637,6418,2566,3607,5273,9878,2919,4619,2200],"./descope-icon/index.js":[21471,650,2838,4619,7401],"./descope-image/index.js":[90313,650,4619,9175],"./descope-link/index.js":[31678,650,4619,7792],"./descope-list/index.js":[36911,650,4619,7640],"./descope-loader-linear/index.js":[22339,650,4619,8009],"./descope-loader-radial/index.js":[86715,650,4619,7163],"./descope-logo/index.js":[13959,650,4619,1239],"./descope-modal/index.js":[826,650,8164,3711,1437,4619,4139],"./descope-multi-select-combo-box/index.js":[10664,650,8164,9895,3222,9167,3711,2566,9632,6474,4619,1331],"./descope-new-password/descope-new-password-internal/index.js":[32039,650,4619,8603],"./descope-new-password/index.js":[26586,650,8164,9895,3222,9167,1033,6637,6418,351,4619,4364],"./descope-notification/descope-notification-card/index.js":[39749,650,8164,4834,4619,7326],"./descope-notification/index.js":[35592,650,8164,4834,4619,8019],"./descope-notp-image/index.js":[22529,650,4619,2251],"./descope-number-field/index.js":[37041,650,8164,9895,3222,9167,5412,4619,7944],"./descope-passcode/descope-passcode-internal/index.js":[81443,650,4619,3359],"./descope-passcode/index.js":[40868,650,8164,9895,3222,9167,6637,6418,8162,4619,8884],"./descope-password/index.js":[1279,650,8164,9895,3222,9167,1033,351,4619,6969],"./descope-policy-validation/index.js":[28184,650,4619,2996],"./descope-radio-group/index.js":[94702,650,8164,9895,3222,1033,5086,4619,9399],"./descope-recaptcha/index.js":[19552,650,4619,3847],"./descope-scopes-list/index.js":[78538,650,8164,9895,3222,9167,1033,5273,4619,1674],"./descope-text-area/index.js":[641,650,8164,9895,3222,9167,286,4619,5686],"./descope-text-field/index.js":[89348,650,8164,9895,3222,9167,6637,6418,4619,5166],"./descope-text/index.js":[16429,650,4619,171],"./descope-totp-image/index.js":[89011,650,4619,6213],"./descope-upload-file/index.js":[82147,650,8164,9895,1033,2838,5443,4619,9636],"./descope-user-attribute/index.js":[91132,650,8164,9895,1033,6637,2838,5026,4619,1578],"./descope-user-auth-method/index.js":[56780,650,8164,9895,1033,6637,2838,7407,4619,9990],"./mapping-fields/descope-mappings-field/descope-mapping-item/index.js":[91491,650,4619,2230],"./mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js":[88858,650,4619,9522],"./mapping-fields/descope-mappings-field/index.js":[64551,650,8164,9895,3222,9167,1033,6637,6418,2838,3711,2566,9632,1053,4619,7095],"./mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js":[71828,650,4619,9708],"./mapping-fields/descope-saml-group-mappings/index.js":[28511,650,8164,9895,3222,9167,1033,6637,6418,2838,3711,2566,9632,1053,4619,7095,6832],"./phone-fields/descope-phone-field/descope-phone-field-internal/index.js":[54930,650,8164,9895,3222,9167,6637,6418,3711,2566,9632,6726,4619,5459,2878],"./phone-fields/descope-phone-field/index.js":[18638,650,8164,9895,3222,9167,6637,6418,3711,2566,9632,6726,4619,5459,9894],"./phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js":[46633,650,8164,9895,3222,9167,6637,6418,4619,5459,8657],"./phone-fields/descope-phone-input-box-field/index.js":[65636,650,8164,9895,3222,9167,6637,6418,3711,2566,9632,7212,4619,5459,4043]};function i(e){if(!o.o(d,e))return Promise.resolve().then((()=>{var s=new Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}));var s=d[e],i=s[0];return Promise.all(s.slice(1).map(o.e)).then((()=>o(i)))}i.keys=()=>Object.keys(d),i.id=97301,e.exports=i},6461:(e,s,o)=>{"use strict";o.r(s),o.d(s,{componentsThemeManager:()=>d});const d=new class{static mountOnPropName="DescopeThemeManager";#e={};#s="light";#o=new Set;#d(){this.#o.forEach((e=>e?.()))}get currentThemeName(){return this.#s}set currentThemeName(e){this.#s=e,this.#d()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#o.add(e),()=>{this.#o.delete(e)}}set themes(e){this.#e=e,this.#d()}get hasThemes(){return!!Object.keys(this.#e).length}}},41216:(e,s,o)=>{const{componentsThemeManager:d}=o(6461),i=o(97301);e.exports=i.keys().reduce(((e,s)=>{const o=s.replace(/.*?([^\/]+)\/index\.js$/,"$1");return o.endsWith("-internal")||(e[o]=()=>i(s)),e}),{}),e.exports.componentsThemeManager=d}},i={};function n(e){var s=i[e];if(void 0!==s)return s.exports;var o=i[e]={exports:{}};return d[e].call(o.exports,o,o.exports,n),o.exports}n.m=d,e=[],n.O=(s,o,d,i)=>{if(!o){var t=1/0;for(a=0;a<e.length;a++){for(var[o,d,i]=e[a],p=!0,c=0;c<o.length;c++)(!1&i||t>=i)&&Object.keys(n.O).every((e=>n.O[e](o[c])))?o.splice(c--,1):(p=!1,i<t&&(t=i));if(p){e.splice(a--,1);var r=d();void 0!==r&&(s=r)}}return s}i=i||0;for(var a=e.length;a>0&&e[a-1][2]>i;a--)e[a]=e[a-1];e[a]=[o,d,i]},n.F={},n.E=e=>{Object.keys(n.F).map((s=>{n.F[s](e)}))},n.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return n.d(s,{a:s}),s},n.d=(e,s)=>{for(var o in s)n.o(s,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((s,o)=>(n.f[o](e,s),s)),[])),n.u=e=>(({171:"descope-text-index-js",1239:"descope-logo-index-js",1331:"descope-multi-select-combo-box-index-js",1448:"boolean-fields-descope-switch-toggle-index-js",1578:"descope-user-attribute-index-js",1674:"descope-scopes-list-index-js",1837:"button-selection-group-fields-descope-button-selection-group-item-index-js",2141:"button-selection-group-fields-descope-button-selection-group-index-js",2200:"descope-grid-index-js",2230:"mapping-fields-descope-mappings-field-descope-mapping-item-index-js",2251:"descope-notp-image-index-js",2381:"descope-grid-descope-grid-item-details-column-index-js",2645:"descope-avatar-index-js",2878:"phone-fields-descope-phone-field-descope-phone-field-internal-index-js",2996:"descope-policy-validation-index-js",3057:"descope-apps-list-index-js",3305:"descope-grid-descope-grid-selection-column-index-js",3359:"descope-passcode-descope-passcode-internal-index-js",3521:"descope-code-snippet-index-js",3829:"button-selection-group-fields-descope-button-multi-selection-group-index-js",3847:"descope-recaptcha-index-js",4043:"phone-fields-descope-phone-input-box-field-index-js",4139:"descope-modal-index-js",4364:"descope-new-password-index-js",4838:"boolean-fields-descope-checkbox-index-js",5166:"descope-text-field-index-js",5686:"descope-text-area-index-js",5695:"descope-email-field-index-js",5710:"descope-enriched-text-index-js",6028:"descope-date-field-descope-calendar-index-js",6213:"descope-totp-image-index-js",6832:"mapping-fields-descope-saml-group-mappings-index-js",6969:"descope-password-index-js",7052:"descope-combo-box-index-js",7079:"button-selection-group-fields-descope-button-selection-group-internal-index-js",7095:"mapping-fields-descope-mappings-field-index-js",7163:"descope-loader-radial-index-js",7326:"descope-notification-descope-notification-card-index-js",7362:"boolean-fields-descope-boolean-field-internal-index-js",7401:"descope-icon-index-js",7640:"descope-list-index-js",7792:"descope-link-index-js",7944:"descope-number-field-index-js",8009:"descope-loader-linear-index-js",8019:"descope-notification-index-js",8108:"descope-grid-descope-grid-text-column-index-js",8399:"button-selection-group-fields-descope-button-multi-selection-group-internal-index-js",8603:"descope-new-password-descope-new-password-internal-index-js",8657:"phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js",8689:"descope-container-index-js",8819:"descope-divider-index-js",8884:"descope-passcode-index-js",9175:"descope-image-index-js",9176:"descope-grid-descope-grid-custom-column-index-js",9257:"descope-date-field-index-js",9399:"descope-radio-group-index-js",9522:"mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js",9553:"descope-badge-index-js",9636:"descope-upload-file-index-js",9708:"mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js",9894:"phone-fields-descope-phone-field-index-js",9984:"descope-button-index-js",9990:"descope-user-auth-method-index-js"}[e]||e)+".js"),n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),s={},o="@descope/web-components-ui:",n.l=(e,d,i,t)=>{if(s[e])s[e].push(d);else{var p,c;if(void 0!==i)for(var r=document.getElementsByTagName("script"),a=0;a<r.length;a++){var l=r[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==o+i){p=l;break}}p||(c=!0,(p=document.createElement("script")).charset="utf-8",p.timeout=120,n.nc&&p.setAttribute("nonce",n.nc),p.setAttribute("data-webpack",o+i),p.src=e),s[e]=[d];var u=(o,d)=>{p.onerror=p.onload=null,clearTimeout(x);var i=s[e];if(delete s[e],p.parentNode&&p.parentNode.removeChild(p),i&&i.forEach((e=>e(d))),o)return o(d)},x=setTimeout(u.bind(null,void 0,{type:"timeout",target:p}),12e4);p.onerror=u.bind(null,p.onerror),p.onload=u.bind(null,p.onload),c&&document.head.appendChild(p)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var s=n.g.document;if(!e&&s&&(s.currentScript&&"SCRIPT"===s.currentScript.tagName.toUpperCase()&&(e=s.currentScript.src),!e)){var o=s.getElementsByTagName("script");if(o.length)for(var d=o.length-1;d>-1&&(!e||!/^http(s?):/.test(e));)e=o[d--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={5536:0};n.f.j=(s,o)=>{var d=n.o(e,s)?e[s]:void 0;if(0!==d)if(d)o.push(d[2]);else{var i=new Promise(((o,i)=>d=e[s]=[o,i]));o.push(d[2]=i);var t=n.p+n.u(s),p=new Error;n.l(t,(o=>{if(n.o(e,s)&&(0!==(d=e[s])&&(e[s]=void 0),d)){var i=o&&("load"===o.type?"missing":o.type),t=o&&o.target&&o.target.src;p.message="Loading chunk "+s+" failed.\n("+i+": "+t+")",p.name="ChunkLoadError",p.type=i,p.request=t,d[1](p)}}),"chunk-"+s,s)}},n.F.j=s=>{if(!n.o(e,s)||void 0===e[s]){e[s]=null;var o=document.createElement("link");n.nc&&o.setAttribute("nonce",n.nc),o.rel="prefetch",o.as="script",o.href=n.p+n.u(s),document.head.appendChild(o)}},n.O.j=s=>0===e[s];var s=(s,o)=>{var d,i,[t,p,c]=o,r=0;if(t.some((s=>0!==e[s]))){for(d in p)n.o(p,d)&&(n.m[d]=p[d]);if(c)var a=c(n)}for(s&&s(o);r<t.length;r++)i=t[r],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return n.O(a)},o=self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[];o.forEach(s.bind(null,0)),o.push=s.bind(null,o.push.bind(o))})(),n.O(0,[5536],(()=>{[650,4619,7362,8164,9895,3222,9167,1033,5273,4838,1448,8399,2838,7824,3829,7079,1837,2141,6637,6418,3711,1414,3057,2645,9553,9984,9878,3521,2566,9632,7052,8689,7607,6028,8980,9257,8819,5695,1672,5710,3607,9176,2381,3305,8108,2919,2200,7401,9175,7792,7640,8009,7163,1239,1437,4139,6474,1331,8603,351,4364,4834,7326,8019,2251,5412,7944,3359,8162,8884,6969,2996,5086,9399,3847,1674,286,5686,5166,171,6213,5443,9636,5026,1578,7407,9990,2230,9522,1053,7095,9708,6832,6726,5459,2878,9894,8657,7212,4043].map(n.E)}),5);var t=n(41216);return n.O(t)})()));
|