@descope/web-components-ui 1.0.374 → 1.0.376
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.cjs.js +9 -2
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +12 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/2773.js +148 -0
- package/dist/umd/4978.js +1 -1
- package/dist/umd/63.js +1 -1
- package/dist/umd/9423.js +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
- package/package.json +2 -1
- package/src/components/phone-fields/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js +4 -1
- package/src/mixins/externalInputHelpers.js +8 -2
- package/dist/umd/7164.js +0 -148
- /package/dist/umd/{7164.js.LICENSE.txt → 2773.js.LICENSE.txt} +0 -0
package/dist/umd/4978.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4978],{33346:(t,e,s)=>{s.d(e,{s:()=>l});var i=s(2061),r=s(30357),n=s(33038),a=s(12666),o=s(28084);const l=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#t;#e=!0;get baseSelector(){return e}get baseElement(){return this.#t??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#t||console.warn("missing base element for component",this.localName),this.#t}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#e&&(this.#e=!1,this.init?.())}}return(0,i.qC)(r.A,a._,o.Q,n.k)(s)}},65279:(t,e,s)=>{s.d(e,{gh:()=>i,k4:()=>r,qM:()=>a,qg:()=>n});const i="descope",r=3,n="host",a="@"},54567:(t,e,s)=>{s.d(e,{Db:()=>d,FX:()=>n,P$:()=>a,Tk:()=>h,iY:()=>u,oP:()=>c,tg:()=>l});var i=s(2061),r=s(65279);const n=(t,e,{excludeAttrs:s=[],includeAttrs:i=[]})=>{const r=Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!i.length||i.includes(t.name)))).map((t=>t.name));e(r),new MutationObserver((t=>{t.forEach((t=>{"attributes"!==t.type||s.includes(t.attributeName)||i.length&&!i.includes(t.attributeName)||e([t.attributeName])}))})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{t.forEach((t=>{"childList"!==t.type&&"characterData"!==t.type||e(t)}))})).observe(t,{childList:!0,characterData:!0,subtree:!0})},o=(t,e,s={})=>i=>{i.forEach((i=>{const r=s[i]||i,n=t.getAttribute(i);null!==n?e.getAttribute(r)!==n&&e.setAttribute(r,n):e.removeAttribute(r)}))},l=(t,e,s)=>{n(t,o(t,e),s),n(e,o(e,t),s)},u=t=>(0,i.E3)(r.gh,t),h=(...t)=>`--${(0,i.E3)(...t)}`,c=(t,e,s={})=>{n(t,o(t,e,s.mapAttrs),s)},d=(t,e,s=[])=>{if(!s.length)return;const i=s.reduce(((e,s)=>Object.assign(e,{[s]:{get:()=>t[s],set(e){t[s]=e}}})),{});Object.defineProperties(e,i)}},2061:(t,e,s)=>{s.d(e,{E3:()=>r,GL:()=>i,_k:()=>l,lo:()=>o,mf:()=>a,qC:()=>n});const i=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),r=(...t)=>i(t.filter((t=>!!t)).join("-")),n=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e),a=t=>"function"==typeof t,o=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;const s=t.slice().sort(),i=e.slice().sort();for(let t=0;t<s.length;t++)if(s[t]!==i[t])return!1;return!0},l=t=>t.replace(/([A-Z])/g," $1").trim().split(" ").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join(" ")},37878:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{C:()=>i})},86557:(t,e,s)=>{s.d(e,{l:()=>r});var i=s(37878);const r=t=>class extends t{#s=i.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#s(),this.prevValue=this.value)}))}}},30357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#i(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#i()}}},33038:(t,e,s)=>{s.d(e,{k:()=>i});const i=t=>class extends t{updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}}},20370:(t,e,s)=>{s.d(e,{D:()=>o});var i=s(33346),r=s(2061),n=s(54567),a=s(37878);const o=({componentName:t,wrappedEleName:e,slots:s=[],style:o,excludeAttrsSync:l=[],includeAttrsSync:u=[],includeForwardProps:h=[],delegatesFocus:c=!0})=>{class d extends((0,i.s)({componentName:t,baseSelector:e})){#r=a.C.bind(this,"blur");#n=a.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:c}).innerHTML=`\n\t\t\t<style id="create-proxy">${((0,r.mf)(o)?o():o)||""}</style>\n\t\t\t<${e}>\n\t\t\t${s.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""}></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#r()})),this.baseElement.addEventListener("focus",(t=>{this.#n()})),(0,n.Db)(this.baseElement,this,h),(0,n.tg)(this.baseElement,this,{excludeAttrs:l,includeAttrs:u})}}return d}},74814:(t,e,s)=>{s.d(e,{SP:()=>o,i3:()=>l,wj:()=>a});var i=s(2061),r=s(54567);class n{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,s])=>`${t}${e} { \n${s.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const a=(t,e,s)=>{const a=new n;return Object.keys(s).forEach((n=>{const o=((t,e)=>{const s={selector:"",property:(0,i.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...s,...t}))):[{...s,...e}]:[s]})(n,s[n]),l=(0,r.Tk)(t,n);o.forEach((({selector:t,property:s,important:r,fallback:n})=>{a.add(((t="",e="")=>(0,i.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,i.mf)(s)?s():s,((t,e)=>`var(${t}${e?`, ${e}`:""})`)(l,n)+(r?"!important":""))}))})),a.toString()},o=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,r.Tk)(t,s)})),{}),l=(t,e)=>Array(e).fill(`.${t}`).join("")},9129:(t,e,s)=>{s.d(e,{y:()=>l});var i=s(65279),r=s(2061),n=s(54567),a=s(25561),o=s(74814);const l=({mappings:t={},componentNameOverride:e=""})=>s=>{const l=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...(0,o.SP)(l,{...t})}}#a;#o;#l;#u;#h;#c;#d;#m;#p;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:n=i.qg,baseSelector:a}={}){super(),this.#u=s,this.#h=n,this.#d=a??this.baseSelector,this.#p=e,this.#m=Object.keys(t).map((t=>(0,r.E3)("st",s,t)))}get#g(){return a.componentsThemeManager.currentTheme?.[l]||""}#b(){this.#o.innerHTML=this.#g[this.#h]}#E(){this.#o=document.createElement("style"),this.#o.id=`style-mixin-theme__${l}`,this.#c.prepend(this.#o),this.#l=a.componentsThemeManager.onCurrentThemeChange(this.#b.bind(this)),this.#b()}#v(){if(this.#m.length){this.#a=document.createElement("style"),this.#a.id=`style-mixin-overrides__${l}`;const t=(0,o.i3)(l,i.k4);this.#a.innerText=`:host(${t}) {}`,this.#c.append(this.#a)}}#y(t,e){const s=this.#a?.sheet?.cssRules[0].style;if(!s)return;const i=(0,n.Tk)(l,t.replace(new RegExp("^st-"),""));e?s?.setProperty(i,e):(s?.removeProperty(i),this.removeAttribute(t))}#f(t=[]){let e=!1;t.forEach((t=>{this.#m.includes(t)&&(this.#y(t,this.getAttribute(t)),e=!0)})),e&&(this.#a.innerHTML=this.#a?.sheet?.cssRules[0].cssText)}#A(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${l}`,e.innerHTML=(0,o.wj)((0,r.E3)(l,this.#u),this.#d,t),this.#c.prepend(e)}}#w(t){(this.#c.classList||this.#c.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#c=await(this.#p?.(this))||this.shadowRoot,this.#w(l),this.#A(),this.#E(),this.#v(),(0,n.FX)(this,this.#f.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#l?.()}}}},95579:(t,e,s)=>{s.d(e,{e:()=>i});const i=t=>class extends t{#S=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#S=document.createElement("style"),this.#S.innerText="* { cursor: inherit!important }"}#x(t){t?this.shadowRoot.appendChild(this.#S):this.#S.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#x("true"===s)}}},24253:(t,e,s)=>{s.d(e,{Gc:()=>n,X$:()=>r,nC:()=>i});const i=(t,e)=>{const s=document.createElement("slot");return s.setAttribute("name",t),s.setAttribute("slot",e),s},r=(t,e,s)=>{const i=document.createElement("input");return i.setAttribute("slot",t),i.setAttribute("type",e),i.setAttribute("data-hidden-input","true"),i.setAttribute("autocomplete",s),i},n=(t,e,s)=>{setTimeout((()=>{const i=getComputedStyle(t),r=i.getPropertyValue("height"),n=i.getPropertyValue("padding-left"),a=i.getPropertyValue("padding-right"),o=i.getPropertyValue("font-size"),l=i.getPropertyValue("font-family"),u=i.getPropertyValue("letter-spacing"),h=i.getPropertyValue("caret-color"),c=((t,e)=>{t.value="_";const s=e.getPropertyValue("color");return t.value="",s})(t,i);if([["all","unset"],["position","absolute"],["background-color","transparent"],["height",r],["left",n],["right",a],["font-size",o],["font-family",l],["letter-spacing",u],["caret-color",h],["color",c]].forEach((([t,s])=>e.style.setProperty(t,s,"important"))),"floating"===s){const t=i.getPropertyValue("margin-bottom");e.style.setProperty("margin-bottom",t,"important")}const d=i.getPropertyValue("width");e.style.setProperty("width",`calc(${d} - ${n} - ${a}`,"important")}),0)}},2953:(t,e,s)=>{s.d(e,{J:()=>n});var i=s(54567),r=s(24253);const n=({inputType:t,autocompleteType:e,includeAttrs:s=[],noBlurDispatch:n=!1})=>a=>class extends a{#T=[];get isExternalInput(){return"true"===this.getAttribute("external-input")}createExternalInput(){if(!this.isExternalInput)return null;const e=this.baseElement.querySelector("input");e.setAttribute("tabindex","-1");const n=(0,r.nC)("external-input","suffix");return this.baseElement.appendChild(n),this.externalInput=(0,r.X$)("external-input",t,this.getAutocompleteType()),setTimeout((()=>{(0,r.Gc)(e,this.externalInput,this.getAttribute("label-type"))})),this.forwardInputValue(e,this.externalInput),(0,i.tg)(e,this.externalInput,{includeAttrs:s}),this.baseElement.querySelector("input").addEventListener("focusout",(t=>t.stopImmediatePropagation()),!0),this.handleFocusEvents(),this.handleBlurEvents(),this.handlelInputEvents(this.externalInput),this.appendChild(this.externalInput),this.externalInput}clearBlurTimers(){this.#T.forEach((t=>clearTimeout(t))),this.#T.length=0}dispatchBlur(){return setTimeout((()=>{this.dispatchEvent(new Event("blur",{bubbles:!0,composed:!0})),this.removeAttribute("focused")}))}handleFocusEvents(){this.baseElement.addEventListener("focus",(()=>{this.externalInput.focus(),this.clearBlurTimers()})),this.externalInput.addEventListener("focus",(()=>{this.clearBlurTimers(),setTimeout((()=>this.baseElement.setAttribute("focused","true")))}))}handleBlurEvents(){this.baseElement.addEventListener("blur",(t=>{t.stopImmediatePropagation(),n||this.#T.push(this.dispatchBlur())}),!0),this.externalInput.addEventListener("blur",(t=>{t.stopImmediatePropagation(),this.#T.push(this.dispatchBlur())}),!0)}handlelInputEvents(t){t.addEventListener("input",(t=>{this.value=t.target.value})),t.addEventListener("input",(t=>{t.target.value?this.setAttribute("has-value","true"):this.removeAttribute("has-value")}))}getAutocompleteType(){return this.getAttribute("autocomplete")||e}forwardInputValue(t,e){const s=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value");Object.defineProperty(t,"value",{...s,set(t){s.set.call(this,t),e.value=t},configurable:!0})}}},12666:(t,e,s)=>{s.d(e,{_:()=>i});const i=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}}},94978:(t,e,s)=>{s.d(e,{Ae:()=>o.A,DM:()=>n.D,Iw:()=>h.I,J1:()=>p.J,QT:()=>d.Q,_A:()=>l._,dj:()=>a.d,e4:()=>r.e,li:()=>c.l,mE:()=>m.m,wX:()=>u.w,yk:()=>i.y});var i=s(9129),r=s(95579),n=s(20370),a=s(15584),o=s(30357),l=s(12666),u=s(89894),h=s(19772),c=s(86557),d=s(28084),m=s(61534),p=s(2953)},61534:(t,e,s)=>{s.d(e,{m:()=>r});var i=s(37878);const r=t=>class extends t{init(){this.#M(),super.init?.()}#M(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,i.C.call(this,"blur"),i.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(i.C.call(this,"focus"),i.C.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},89894:(t,e,s)=>{s.d(e,{w:()=>a}),s(95910);const i=["required","pattern"],r="data-errormessage-pattern-mismatch",n=Symbol("validationTarget"),a=t=>class extends t{#C=n;static get observedAttributes(){return[...t.observedAttributes||[],...i]}static get formAssociated(){return!0}#L;get internals(){return this.#L}set internals(t){this.#L=t}constructor(){super(),this.#L=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}get defaultErrorMsgTypeMismatch(){return"Please match the requested type."}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:a,tooLong:o,rangeOverflow:l,rangeUnderflow:u,badInput:h,customError:c}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||n||h:return this.getAttribute(r)||this.defaultErrorMsgPatternMismatch;case i:return this.getAttribute("data-errormessage-type-mismatch")||this.getAttribute(r)||this.defaultErrorMsgTypeMismatch;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case o:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case u:return this.defaultErrorMsgRangeUnderflow;case l:return this.defaultErrorMsgRangeOverflow;case c:return this.validationMessage;default:return""}}#V(){const t=this.isReadOnly?{}:this.getValidity();this.#L.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#L.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#L.validity.valid}reportValidity(){return this.#L.reportValidity()}get validity(){return this.#L.validity}get validationTarget(){return this.#C===n?this.inputElement:this.#C}set validationTarget(t){this.#C=t}setCustomValidity(t){t?this.#L.setValidity({customError:!0},t,this.validationTarget):(this.#L.setValidity({}),this.#V())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#L.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),i.includes(t)&&this.#V()}init(){super.init?.(),this.addEventListener("change",this.#V),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#V),setTimeout((()=>this.#V()))}}},28084:(t,e,s)=>{s.d(e,{Q:()=>n});var i=s(54567);const r=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options"],n=t=>class extends t{init(){super.init?.(),(0,i.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>r.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.debug(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}},19772:(t,e,s)=>{s.d(e,{I:()=>u});var i=s(65279),r=s(2061),n=s(54567),a=s(9129),o=s(74814);const l=t=>async e=>{const s=await t(e);return new Promise((t=>{let e=0;const i=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(i)};i()}))},u=({name:t,selector:e,mappings:s={},forward:{attributes:u=[],include:h=!0}={}})=>c=>{const d=t||(t=>t.replace(/[^\w\s]/gi,""))(e),m=(0,a.y)({mappings:s})(c);return class extends m{static get cssVarList(){return{...m.cssVarList,[d]:(0,o.SP)((0,r.E3)(c.componentName,"_"+d),s)}}#P;constructor(){const t=l((async t=>{const s=t.shadowRoot.querySelector(t.baseSelector);return e?(await l((()=>s))(t)).querySelector(e):s}));super({getRootElement:t,componentNameSuffix:"_"+d,themeSection:i.qM+d,baseSelector:":host"}),this.#P=t(this).then((t=>t.host))}async#I(){const t=await this.#P;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#P;(0,n.oP)(this,t,{[h?"includeAttrs":"excludeAttrs"]:u}),this.#I()}}}},15584:(t,e,s)=>{s.d(e,{d:()=>c});var i=s(2061),r=s(54567),n=s(37878),a=s(9129),o=s(89894);const l=["invalid","required"],u=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e?.localName)return e},h=({proxyProps:t=[],useProxyTargets:e=!1,inputEvent:s="input",triggerValidationEvents:i=[],proxyParentValidation:a=!1})=>h=>class extends((0,o.w)(h)){static get observedAttributes(){return[...h.observedAttributes||[],...l]}#$;#s=n.C.bind(this,"change");constructor(){super(),this.#$=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#$&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#$)return this.#$;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#$=u(t)||u(e),this.#$}set inputElement(t){this.#$=t}getValidity(){return this.inputElement?.validity||{}}#k(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#k(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},this.baseElement.addEventListener("input",(t=>{t.composed||this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))})),i.forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.inputElement?.setCustomValidity("")}))})),setTimeout((()=>{(Array.isArray(s)?s:[s]).forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#k()}))})),this.baseElement.addEventListener("change",(()=>{this.#s()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#k()})),t.forEach((t=>{const s=this.querySelector('input[slot="external-input"]')||null,i=e?[this.baseElement,s].filter(Boolean):[];((t,e,s)=>{const i=Array.isArray(e)?e:[e];Object.defineProperty(t,s,{set(t){i.forEach((e=>{e[s]=t}))},get:()=>e[0][s],configurable:!0})})(this,[this.inputElement,...i],t)})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,r.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})})),a){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,s)=>"function"==typeof t[s]&&"setValidity"===s?(...i)=>{if(3===i.length){const t=i.slice(0,i.length-1);t.push(e.inputElement),e.internals[s](...t)}else e.internals[s](...i);return t[s](...i)}:"function"==typeof t[s]?(...i)=>(e.internals[s](...i),t[s](...i)):t[s]})}}},c=t=>(0,i.qC)(h(t),(0,a.y)({componentNameOverride:(0,r.iY)("input-wrapper")}))}}]);
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4978],{33346:(t,e,s)=>{s.d(e,{s:()=>l});var i=s(2061),r=s(30357),n=s(33038),a=s(12666),o=s(28084);const l=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#t;#e=!0;get baseSelector(){return e}get baseElement(){return this.#t??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#t||console.warn("missing base element for component",this.localName),this.#t}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#e&&(this.#e=!1,this.init?.())}}return(0,i.qC)(r.A,a._,o.Q,n.k)(s)}},65279:(t,e,s)=>{s.d(e,{gh:()=>i,k4:()=>r,qM:()=>a,qg:()=>n});const i="descope",r=3,n="host",a="@"},54567:(t,e,s)=>{s.d(e,{Db:()=>d,FX:()=>n,P$:()=>a,Tk:()=>h,iY:()=>u,oP:()=>c,tg:()=>l});var i=s(2061),r=s(65279);const n=(t,e,{excludeAttrs:s=[],includeAttrs:i=[]})=>{const r=Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!i.length||i.includes(t.name)))).map((t=>t.name));e(r),new MutationObserver((t=>{t.forEach((t=>{"attributes"!==t.type||s.includes(t.attributeName)||i.length&&!i.includes(t.attributeName)||e([t.attributeName])}))})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{t.forEach((t=>{"childList"!==t.type&&"characterData"!==t.type||e(t)}))})).observe(t,{childList:!0,characterData:!0,subtree:!0})},o=(t,e,s={})=>i=>{i.forEach((i=>{const r=s[i]||i,n=t.getAttribute(i);null!==n?e.getAttribute(r)!==n&&e.setAttribute(r,n):e.removeAttribute(r)}))},l=(t,e,s)=>{n(t,o(t,e),s),n(e,o(e,t),s)},u=t=>(0,i.E3)(r.gh,t),h=(...t)=>`--${(0,i.E3)(...t)}`,c=(t,e,s={})=>{n(t,o(t,e,s.mapAttrs),s)},d=(t,e,s=[])=>{if(!s.length)return;const i=s.reduce(((e,s)=>Object.assign(e,{[s]:{get:()=>t[s],set(e){t[s]=e}}})),{});Object.defineProperties(e,i)}},2061:(t,e,s)=>{s.d(e,{E3:()=>r,GL:()=>i,_k:()=>l,lo:()=>o,mf:()=>a,qC:()=>n});const i=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),r=(...t)=>i(t.filter((t=>!!t)).join("-")),n=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e),a=t=>"function"==typeof t,o=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;const s=t.slice().sort(),i=e.slice().sort();for(let t=0;t<s.length;t++)if(s[t]!==i[t])return!1;return!0},l=t=>t.replace(/([A-Z])/g," $1").trim().split(" ").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join(" ")},37878:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{C:()=>i})},86557:(t,e,s)=>{s.d(e,{l:()=>r});var i=s(37878);const r=t=>class extends t{#s=i.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#s(),this.prevValue=this.value)}))}}},30357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#i(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#i()}}},33038:(t,e,s)=>{s.d(e,{k:()=>i});const i=t=>class extends t{updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}}},20370:(t,e,s)=>{s.d(e,{D:()=>o});var i=s(33346),r=s(2061),n=s(54567),a=s(37878);const o=({componentName:t,wrappedEleName:e,slots:s=[],style:o,excludeAttrsSync:l=[],includeAttrsSync:u=[],includeForwardProps:h=[],delegatesFocus:c=!0})=>{class d extends((0,i.s)({componentName:t,baseSelector:e})){#r=a.C.bind(this,"blur");#n=a.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:c}).innerHTML=`\n\t\t\t<style id="create-proxy">${((0,r.mf)(o)?o():o)||""}</style>\n\t\t\t<${e}>\n\t\t\t${s.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""}></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#r()})),this.baseElement.addEventListener("focus",(t=>{this.#n()})),(0,n.Db)(this.baseElement,this,h),(0,n.tg)(this.baseElement,this,{excludeAttrs:l,includeAttrs:u})}}return d}},74814:(t,e,s)=>{s.d(e,{SP:()=>o,i3:()=>l,wj:()=>a});var i=s(2061),r=s(54567);class n{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,s])=>`${t}${e} { \n${s.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const a=(t,e,s)=>{const a=new n;return Object.keys(s).forEach((n=>{const o=((t,e)=>{const s={selector:"",property:(0,i.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...s,...t}))):[{...s,...e}]:[s]})(n,s[n]),l=(0,r.Tk)(t,n);o.forEach((({selector:t,property:s,important:r,fallback:n})=>{a.add(((t="",e="")=>(0,i.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,i.mf)(s)?s():s,((t,e)=>`var(${t}${e?`, ${e}`:""})`)(l,n)+(r?"!important":""))}))})),a.toString()},o=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,r.Tk)(t,s)})),{}),l=(t,e)=>Array(e).fill(`.${t}`).join("")},9129:(t,e,s)=>{s.d(e,{y:()=>l});var i=s(65279),r=s(2061),n=s(54567),a=s(25561),o=s(74814);const l=({mappings:t={},componentNameOverride:e=""})=>s=>{const l=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...(0,o.SP)(l,{...t})}}#a;#o;#l;#u;#h;#c;#d;#m;#p;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:n=i.qg,baseSelector:a}={}){super(),this.#u=s,this.#h=n,this.#d=a??this.baseSelector,this.#p=e,this.#m=Object.keys(t).map((t=>(0,r.E3)("st",s,t)))}get#g(){return a.componentsThemeManager.currentTheme?.[l]||""}#b(){this.#o.innerHTML=this.#g[this.#h]}#E(){this.#o=document.createElement("style"),this.#o.id=`style-mixin-theme__${l}`,this.#c.prepend(this.#o),this.#l=a.componentsThemeManager.onCurrentThemeChange(this.#b.bind(this)),this.#b()}#v(){if(this.#m.length){this.#a=document.createElement("style"),this.#a.id=`style-mixin-overrides__${l}`;const t=(0,o.i3)(l,i.k4);this.#a.innerText=`:host(${t}) {}`,this.#c.append(this.#a)}}#y(t,e){const s=this.#a?.sheet?.cssRules[0].style;if(!s)return;const i=(0,n.Tk)(l,t.replace(new RegExp("^st-"),""));e?s?.setProperty(i,e):(s?.removeProperty(i),this.removeAttribute(t))}#f(t=[]){let e=!1;t.forEach((t=>{this.#m.includes(t)&&(this.#y(t,this.getAttribute(t)),e=!0)})),e&&(this.#a.innerHTML=this.#a?.sheet?.cssRules[0].cssText)}#A(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${l}`,e.innerHTML=(0,o.wj)((0,r.E3)(l,this.#u),this.#d,t),this.#c.prepend(e)}}#w(t){(this.#c.classList||this.#c.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#c=await(this.#p?.(this))||this.shadowRoot,this.#w(l),this.#A(),this.#E(),this.#v(),(0,n.FX)(this,this.#f.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#l?.()}}}},95579:(t,e,s)=>{s.d(e,{e:()=>i});const i=t=>class extends t{#S=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#S=document.createElement("style"),this.#S.innerText="* { cursor: inherit!important }"}#x(t){t?this.shadowRoot.appendChild(this.#S):this.#S.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#x("true"===s)}}},24253:(t,e,s)=>{s.d(e,{Gc:()=>n,X$:()=>r,nC:()=>i});const i=(t,e)=>{const s=document.createElement("slot");return s.setAttribute("name",t),s.setAttribute("slot",e),s},r=(t,e,s)=>{const i=document.createElement("input");return i.setAttribute("slot",t),i.setAttribute("type",e),i.setAttribute("data-hidden-input","true"),i.setAttribute("autocomplete",s),i},n=(t,e,s)=>{setTimeout((()=>{const i=getComputedStyle(t),r=i.getPropertyValue("height"),n=i.getPropertyValue("padding-left"),a=i.getPropertyValue("padding-right"),o=i.getPropertyValue("font-size"),l=i.getPropertyValue("font-family"),u=i.getPropertyValue("letter-spacing"),h=i.getPropertyValue("caret-color"),c=((t,e)=>{const s=t.value;t.value="_";const i=e.getPropertyValue("color");return"_"===t.value&&(t.value=s),i})(t,i);if([["all","unset"],["position","absolute"],["background-color","transparent"],["height",r],["left",n],["right",a],["font-size",o],["font-family",l],["letter-spacing",u],["caret-color",h],["color",c]].forEach((([t,s])=>e.style.setProperty(t,s,"important"))),"floating"===s){const t=i.getPropertyValue("margin-bottom");e.style.setProperty("margin-bottom",t,"important")}const d=i.getPropertyValue("width");e.style.setProperty("width",`calc(${d} - ${n} - ${a}`,"important")}),0)}},2953:(t,e,s)=>{s.d(e,{J:()=>n});var i=s(54567),r=s(24253);const n=({inputType:t,autocompleteType:e,includeAttrs:s=[],noBlurDispatch:n=!1})=>a=>class extends a{#T=[];get isExternalInput(){return"true"===this.getAttribute("external-input")}createExternalInput(){if(!this.isExternalInput)return null;const e=this.baseElement.querySelector("input");e.setAttribute("tabindex","-1");const n=(0,r.nC)("external-input","suffix");return this.baseElement.appendChild(n),this.externalInput=(0,r.X$)("external-input",t,this.getAutocompleteType()),setTimeout((()=>{(0,r.Gc)(e,this.externalInput,this.getAttribute("label-type"))})),this.forwardInputValue(e,this.externalInput),(0,i.tg)(e,this.externalInput,{includeAttrs:s}),this.baseElement.querySelector("input").addEventListener("focusout",(t=>t.stopImmediatePropagation()),!0),this.handleFocusEvents(),this.handleBlurEvents(),this.handlelInputEvents(this.externalInput),this.appendChild(this.externalInput),this.externalInput}clearBlurTimers(){this.#T.forEach((t=>clearTimeout(t))),this.#T.length=0}dispatchBlur(){return setTimeout((()=>{this.dispatchEvent(new Event("blur",{bubbles:!0,composed:!0})),this.removeAttribute("focused")}))}handleFocusEvents(){this.baseElement.addEventListener("focus",(()=>{this.externalInput.focus(),this.clearBlurTimers()})),this.externalInput.addEventListener("focus",(()=>{this.clearBlurTimers(),setTimeout((()=>this.baseElement.setAttribute("focused","true")))}))}handleBlurEvents(){this.baseElement.addEventListener("blur",(t=>{t.stopImmediatePropagation(),n||this.#T.push(this.dispatchBlur())}),!0),this.externalInput.addEventListener("blur",(t=>{t.stopImmediatePropagation(),this.#T.push(this.dispatchBlur())}),!0)}handlelInputEvents(t){t.addEventListener("input",(t=>{this.value=t.target.value})),t.addEventListener("input",(t=>{t.target.value?this.setAttribute("has-value","true"):this.removeAttribute("has-value")}))}getAutocompleteType(){return this.getAttribute("autocomplete")||e}forwardInputValue(t,e){const s=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value");Object.defineProperty(t,"value",{...s,set(t){s.set.call(this,t),e.value=t},configurable:!0})}}},12666:(t,e,s)=>{s.d(e,{_:()=>i});const i=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}}},94978:(t,e,s)=>{s.d(e,{Ae:()=>o.A,DM:()=>n.D,Iw:()=>h.I,J1:()=>p.J,QT:()=>d.Q,_A:()=>l._,dj:()=>a.d,e4:()=>r.e,li:()=>c.l,mE:()=>m.m,wX:()=>u.w,yk:()=>i.y});var i=s(9129),r=s(95579),n=s(20370),a=s(15584),o=s(30357),l=s(12666),u=s(89894),h=s(19772),c=s(86557),d=s(28084),m=s(61534),p=s(2953)},61534:(t,e,s)=>{s.d(e,{m:()=>r});var i=s(37878);const r=t=>class extends t{init(){this.#M(),super.init?.()}#M(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,i.C.call(this,"blur"),i.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(i.C.call(this,"focus"),i.C.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},89894:(t,e,s)=>{s.d(e,{w:()=>a}),s(95910);const i=["required","pattern"],r="data-errormessage-pattern-mismatch",n=Symbol("validationTarget"),a=t=>class extends t{#C=n;static get observedAttributes(){return[...t.observedAttributes||[],...i]}static get formAssociated(){return!0}#L;get internals(){return this.#L}set internals(t){this.#L=t}constructor(){super(),this.#L=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}get defaultErrorMsgTypeMismatch(){return"Please match the requested type."}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:a,tooLong:o,rangeOverflow:l,rangeUnderflow:u,badInput:h,customError:c}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||n||h:return this.getAttribute(r)||this.defaultErrorMsgPatternMismatch;case i:return this.getAttribute("data-errormessage-type-mismatch")||this.getAttribute(r)||this.defaultErrorMsgTypeMismatch;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case o:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case u:return this.defaultErrorMsgRangeUnderflow;case l:return this.defaultErrorMsgRangeOverflow;case c:return this.validationMessage;default:return""}}#V(){const t=this.isReadOnly?{}:this.getValidity();this.#L.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#L.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#L.validity.valid}reportValidity(){return this.#L.reportValidity()}get validity(){return this.#L.validity}get validationTarget(){return this.#C===n?this.inputElement:this.#C}set validationTarget(t){this.#C=t}setCustomValidity(t){t?this.#L.setValidity({customError:!0},t,this.validationTarget):(this.#L.setValidity({}),this.#V())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#L.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),i.includes(t)&&this.#V()}init(){super.init?.(),this.addEventListener("change",this.#V),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#V),setTimeout((()=>this.#V()))}}},28084:(t,e,s)=>{s.d(e,{Q:()=>n});var i=s(54567);const r=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options"],n=t=>class extends t{init(){super.init?.(),(0,i.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>r.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.debug(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}},19772:(t,e,s)=>{s.d(e,{I:()=>u});var i=s(65279),r=s(2061),n=s(54567),a=s(9129),o=s(74814);const l=t=>async e=>{const s=await t(e);return new Promise((t=>{let e=0;const i=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(i)};i()}))},u=({name:t,selector:e,mappings:s={},forward:{attributes:u=[],include:h=!0}={}})=>c=>{const d=t||(t=>t.replace(/[^\w\s]/gi,""))(e),m=(0,a.y)({mappings:s})(c);return class extends m{static get cssVarList(){return{...m.cssVarList,[d]:(0,o.SP)((0,r.E3)(c.componentName,"_"+d),s)}}#P;constructor(){const t=l((async t=>{const s=t.shadowRoot.querySelector(t.baseSelector);return e?(await l((()=>s))(t)).querySelector(e):s}));super({getRootElement:t,componentNameSuffix:"_"+d,themeSection:i.qM+d,baseSelector:":host"}),this.#P=t(this).then((t=>t.host))}async#I(){const t=await this.#P;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#P;(0,n.oP)(this,t,{[h?"includeAttrs":"excludeAttrs"]:u}),this.#I()}}}},15584:(t,e,s)=>{s.d(e,{d:()=>c});var i=s(2061),r=s(54567),n=s(37878),a=s(9129),o=s(89894);const l=["invalid","required"],u=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e?.localName)return e},h=({proxyProps:t=[],useProxyTargets:e=!1,inputEvent:s="input",triggerValidationEvents:i=[],proxyParentValidation:a=!1})=>h=>class extends((0,o.w)(h)){static get observedAttributes(){return[...h.observedAttributes||[],...l]}#$;#s=n.C.bind(this,"change");constructor(){super(),this.#$=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#$&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#$)return this.#$;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#$=u(t)||u(e),this.#$}set inputElement(t){this.#$=t}getValidity(){return this.inputElement?.validity||{}}#k(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#k(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},this.baseElement.addEventListener("input",(t=>{t.composed||this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))})),i.forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.inputElement?.setCustomValidity("")}))})),setTimeout((()=>{(Array.isArray(s)?s:[s]).forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#k()}))})),this.baseElement.addEventListener("change",(()=>{this.#s()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#k()})),t.forEach((t=>{const s=this.querySelector('input[slot="external-input"]')||null,i=e?[this.baseElement,s].filter(Boolean):[];((t,e,s)=>{const i=Array.isArray(e)?e:[e];Object.defineProperty(t,s,{set(t){i.forEach((e=>{e[s]=t}))},get:()=>e[0][s],configurable:!0})})(this,[this.inputElement,...i],t)})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,r.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})})),a){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,s)=>"function"==typeof t[s]&&"setValidity"===s?(...i)=>{if(3===i.length){const t=i.slice(0,i.length-1);t.push(e.inputElement),e.internals[s](...t)}else e.internals[s](...i);return t[s](...i)}:"function"==typeof t[s]?(...i)=>(e.internals[s](...i),t[s](...i)):t[s]})}}},c=t=>(0,i.qC)(h(t),(0,a.y)({componentNameOverride:(0,r.iY)("input-wrapper")}))}}]);
|
package/dist/umd/63.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*! For license information please see 63.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[63
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[63],{47583:(t,e,o)=>{o(48900),o(53891),o(21578),o(71189);var a=o(83208),i=o(46570);const r=i.iv`
|
3
3
|
:host {
|
4
4
|
outline: none;
|
5
5
|
}
|
package/dist/umd/9423.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*! For license information please see 9423.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9423,63
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9423,63],{17078:(t,e,o)=>{o.d(e,{z:()=>m});var a=o(74241),r=o(16155),i=o(52807),s=o(12521),n=o(34463),l=o(46570);const d=o(9392).iv`
|
3
3
|
:host {
|
4
4
|
display: inline-block;
|
5
5
|
position: relative;
|