@descope/web-components-ui 1.0.55 → 1.0.57

Sign up to get free protection for your applications and to get access to all the features.
package/dist/umd/832.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[832],{8522:(t,e,s)=>{s.d(e,{V:()=>n});class n extends HTMLElement{}},9201:(t,e,s)=>{s.d(e,{o:()=>a,t:()=>i});const n=(t,e,{excludeAttrs:s=[],includeAttrs:n=[]})=>{e(...Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!n.length||n.includes(t.name)))).map((t=>t.name))),new MutationObserver((t=>{for(const o of t)"attributes"!==o.type||s.includes(o.attributeName)||n.length&&!n.includes(o.attributeName)||e([o.attributeName])})).observe(t,{attributes:!0})},o=(t,e,s={})=>(...n)=>{n.forEach((n=>{const o=s[n]||n,i=t.getAttribute(n);null!==i?e.getAttribute(o)!==i&&e.setAttribute(o,i):e.removeAttribute(o)}))},i=(t,e,s)=>{n(t,o(t,e),s),n(e,o(e,t),s)},a=(t,e,s={})=>{n(t,o(t,e,s.mapAttrs),s)}},3535:(t,e,s)=>{s.d(e,{SP:()=>r,wj:()=>a,zy:()=>l});var n=s(6225);const o=(t,...e)=>`var(${t}${e.length?` , ${o(...e)}`:""})`;class i{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 i;return Object.keys(s).forEach((i=>{const r=((t,e)=>{const s={selector:"",property:(0,n.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>Object.assign({},s,t))):[Object.assign({},s,e)]:[s]})(i,s[i]),l=(0,n.Tk)(t,i);r.forEach((({selector:t,property:s})=>{a.add(((t="",e="")=>"function"==typeof e?e(t):`${t}${e}`)(e,t),s,o(l))}))})),a.toString()},r=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,n.Tk)(t,s)})),{}),l=(t={})=>[t,{...t,selector:()=>`:host${t.selector||""}`}]},893:(t,e,s)=>{s.d(e,{_:()=>n});const n=(t="")=>e=>class extends e{connectedCallback(){super.connectedCallback?.(),this.shadowRoot.querySelector(this.baseSelector+t).addEventListener("mouseover",(t=>{this.shadowRoot.host.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.shadowRoot.host.removeAttribute("hover")),{once:!0})}))}}},832:(t,e,s)=>{s.d(e,{Ae:()=>m,qC:()=>y,DM:()=>h,yk:()=>i,e4:()=>a,iY:()=>p,y7:()=>u});var n=s(6225),o=s(3535);const i=({mappings:t={},nestedMappings:e={}})=>s=>{const i=Object.keys(t).map((t=>(0,n.E3)("st",t)));return class extends s{static get observedAttributes(){return[...s.observedAttributes||[],...i]}static get cssVarList(){return(0,o.SP)(s.componentName,t)}#t=null;constructor(){super(),this.#e(),this.#s()}#s(){this.#t=document.createElement("style"),this.#t.id="style-mixin-overrides",this.#t.innerText="* {}",this.shadowRoot.prepend(this.#t)}#n(t,e){const o=this.#t.sheet?.cssRules[0].style,i=(0,n.Tk)(s.componentName,t.replace(/^st-/,""));e?o?.setProperty(i,e):o?.removeProperty(i)}#e(){const e=document.createElement("style");e.id="style-mixin-component",e.innerHTML=(0,o.wj)(s.componentName,this.baseSelector,t),this.shadowRoot.prepend(e)}#o(){const t=this.shadowRoot.host.getRootNode(),n=`${s.componentName}-style-mixin-component`,i=s.componentName;if(this.shadowRoot.host.classList.add(i),t.querySelector(`style#${n}`))return;const a=document.createElement("style");a.id=n,a.innerHTML=(0,o.wj)(s.componentName,`${s.componentName}${Array(3).fill(`.${i}`).join("")}`,e),"#document"===t.nodeName?t.head.append(a):t.append(a)}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),i.includes(t)&&this.#n(t,s)}connectedCallback(){super.connectedCallback?.(),this.shadowRoot.isConnected&&(this.#o(),Array.from(this.attributes).forEach((t=>{i.includes(t.nodeName)&&this.#n(t.nodeName,t.value)})))}}},a=t=>class extends t{#t=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#t=document.createElement("style"),this.#t.innerText=`${this.baseSelector} { cursor: inherit }`}#i(t){t?this.shadowRoot.appendChild(this.#t):this.#t.remove()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#i("true"===s)}};var r=s(8522),l=s(893),c=s(9201);const h=({componentName:t,wrappedEleName:e,slots:s=[],style:n,excludeAttrsSync:o=[]})=>{const i=`\n\t\t<style id="create-proxy"></style>\n\t\t<${e}>\n\t\t<slot></slot>\n\t\t${s.map((t=>`<slot name="${t}" slot="${t}"></slot>`)).join("")}\n\t\t</${e}>\n\t`;class a extends r.V{static get componentName(){return t}constructor(){super().attachShadow({mode:"open"}).innerHTML=i,this.hostElement=this.shadowRoot.host,this.baseSelector=e,this.shadowRoot.getElementById("create-proxy").innerHTML="function"==typeof n?n():n}connectedCallback(){this.shadowRoot.isConnected&&(this.proxyElement=this.shadowRoot.querySelector(e),this.setAttribute("tabindex","0"),this.addEventListener("focus",(()=>{this.proxyElement.focus()})),this.proxyElement.onkeydown=t=>{t.shiftKey&&9===t.keyCode&&(this.removeAttribute("tabindex"),setTimeout((()=>this.setAttribute("tabindex","0")),0))},this.addEventListener=(...t)=>this.proxyElement.addEventListener(...t),(0,c.t)(this.proxyElement,this.hostElement,{excludeAttrs:o}))}disconnectedCallback(){this.proxyElement.removeEventListener("mouseover",this.mouseoverCbRef)}attributeChangedCallback(){this.proxyElement}}return y((0,l._)())(a)},d=["invalid","has-error-message"],u=t=>class extends t{static get formAssociated(){return!0}#a;constructor(){super(),this.#a=this.attachInternals()}formAssociatedCallback(){this.setValidity?.()}setValidationAttribute(t){const e=this.getAttribute(t);e&&this.proxyElement.setAttribute("error-message",e),d.forEach((t=>this.proxyElement.setAttribute(t,"true")))}validate(){const{valueMissing:t,patternMismatch:e,typeMismatch:s}=this.validity;t?this.setValidationAttribute("data-errormessage-value-missing"):(s||e)&&this.setValidationAttribute("data-errormessage-pattern-mismatch")}connectedCallback(){if(super.connectedCallback?.(),this.baseEle=this.shadowRoot.querySelector(this.baseSelector),this.hasAttribute("tabindex")||this.setAttribute("tabindex",0),this.inputElement??=this.baseEle.shadowRoot.querySelector('slot[name="input"]')?.assignedElements()[0]||this.baseEle.shadowRoot.querySelector('slot[name="textarea"]')?.assignedElements()[0],!this.inputElement)throw Error("no input was found");var t,e;t=this.inputElement,e="value",Object.defineProperty(this,e,{set:function(s){return t[e]=s},get:function(){return t[e]},configurable:!0}),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),this.validity=this.inputElement.validity,this.setValidity=()=>{this.#a.setValidity(this.inputElement.validity,this.inputElement.validationMessage)},this.inputElement.oninput=()=>{this.value=this.inputElement.value,this.setValidity()},this.onfocus=()=>{setTimeout((()=>this.inputElement.reportValidity()),0),this.validate()},this.inputElement.oninvalid=()=>{this.validate()}}},m=t=>class extends t{#r(){const e=this.shadowRoot.host.tagName.toLowerCase();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}"`)}connectedCallback(){super.connectedCallback?.(),this.shadowRoot.isConnected&&this.#r()}},p=t=>(0,n.E3)("descope",t),y=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e)},6225:(t,e,s)=>{s.d(e,{E3:()=>o,GL:()=>n,Tk:()=>i});const n=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),o=(...t)=>n(t.join("-")),i=(...t)=>`--${o(...t.filter((t=>!!t)))}`}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[832],{8522:(t,e,s)=>{s.d(e,{V:()=>n});class n extends HTMLElement{}},9201:(t,e,s)=>{s.d(e,{o:()=>i,t:()=>a});const n=(t,e,{excludeAttrs:s=[],includeAttrs:n=[]})=>{e(...Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!n.length||n.includes(t.name)))).map((t=>t.name))),new MutationObserver((t=>{for(const o of t)"attributes"!==o.type||s.includes(o.attributeName)||n.length&&!n.includes(o.attributeName)||e([o.attributeName])})).observe(t,{attributes:!0})},o=(t,e,s={})=>(...n)=>{n.forEach((n=>{const o=s[n]||n,a=t.getAttribute(n);null!==a?e.getAttribute(o)!==a&&e.setAttribute(o,a):e.removeAttribute(o)}))},a=(t,e,s)=>{n(t,o(t,e),s),n(e,o(e,t),s)},i=(t,e,s={})=>{n(t,o(t,e,s.mapAttrs),s)}},3535:(t,e,s)=>{s.d(e,{SP:()=>r,wj:()=>i,zy:()=>l});var n=s(6225);const o=(t,...e)=>`var(${t}${e.length?` , ${o(...e)}`:""})`;class a{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 i=(t,e,s)=>{const i=new a;return Object.keys(s).forEach((a=>{const r=((t,e)=>{const s={selector:"",property:(0,n.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>Object.assign({},s,t))):[Object.assign({},s,e)]:[s]})(a,s[a]),l=(0,n.Tk)(t,a);r.forEach((({selector:t,property:s})=>{i.add(((t="",e="")=>"function"==typeof e?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),s,o(l))}))})),i.toString()},r=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,n.Tk)(t,s)})),{}),l=(t={})=>[t,{...t,selector:()=>`:host${t.selector||""}`}]},893:(t,e,s)=>{s.d(e,{_:()=>n});const n=(t="")=>e=>class extends e{connectedCallback(){super.connectedCallback?.(),this.shadowRoot.querySelector(this.baseSelector+t).addEventListener("mouseover",(t=>{this.shadowRoot.host.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.shadowRoot.host.removeAttribute("hover")),{once:!0})}))}}},832:(t,e,s)=>{s.d(e,{Ae:()=>m,qC:()=>y,DM:()=>h,yk:()=>a,e4:()=>i,iY:()=>p,y7:()=>u});var n=s(6225),o=s(3535);const a=({mappings:t={},nestedMappings:e={}})=>s=>{const a=Object.keys(t).map((t=>(0,n.E3)("st",t)));return class extends s{static get observedAttributes(){return[...s.observedAttributes||[],...a]}static get cssVarList(){return(0,o.SP)(s.componentName,{...t,...e})}#t=null;constructor(){super(),this.#e(),this.#s()}#s(){this.#t=document.createElement("style"),this.#t.id="style-mixin-overrides",this.#t.innerText="* {}",this.shadowRoot.prepend(this.#t)}#n(t,e){const o=this.#t.sheet?.cssRules[0].style,a=(0,n.Tk)(s.componentName,t.replace(/^st-/,""));e?o?.setProperty(a,e):o?.removeProperty(a)}#e(){const e=document.createElement("style");e.id="style-mixin-component",e.innerHTML=(0,o.wj)(s.componentName,this.baseSelector,t),this.shadowRoot.prepend(e)}#o(){const t=this.shadowRoot.host.getRootNode(),n=`${s.componentName}-style-mixin-component`,a=s.componentName;if(this.shadowRoot.host.classList.add(a),t.querySelector(`style#${n}`))return;const i=document.createElement("style");i.id=n,i.innerHTML=(0,o.wj)(s.componentName,`${s.componentName}${Array(3).fill(`.${a}`).join("")}`,e),"#document"===t.nodeName?t.head.append(i):t.append(i)}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),a.includes(t)&&this.#n(t,s)}connectedCallback(){super.connectedCallback?.(),this.shadowRoot.isConnected&&(this.#o(),Array.from(this.attributes).forEach((t=>{a.includes(t.nodeName)&&this.#n(t.nodeName,t.value)})))}}},i=t=>class extends t{#t=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#t=document.createElement("style"),this.#t.innerText=`${this.baseSelector} { cursor: inherit }`}#a(t){t?this.shadowRoot.appendChild(this.#t):this.#t.remove()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#a("true"===s)}};var r=s(8522),l=s(893),c=s(9201);const h=({componentName:t,wrappedEleName:e,slots:s=[],style:n,excludeAttrsSync:o=[]})=>{const a=`\n\t\t<style id="create-proxy"></style>\n\t\t<${e}>\n\t\t<slot></slot>\n\t\t${s.map((t=>`<slot name="${t}" slot="${t}"></slot>`)).join("")}\n\t\t</${e}>\n\t`;class i extends r.V{static get componentName(){return t}constructor(){super().attachShadow({mode:"open"}).innerHTML=a,this.hostElement=this.shadowRoot.host,this.baseSelector=e,this.shadowRoot.getElementById("create-proxy").innerHTML="function"==typeof n?n():n}connectedCallback(){this.shadowRoot.isConnected&&(this.proxyElement=this.shadowRoot.querySelector(e),this.setAttribute("tabindex","0"),this.addEventListener("focus",(()=>{this.proxyElement.focus()})),this.proxyElement.onkeydown=t=>{t.shiftKey&&9===t.keyCode&&(this.removeAttribute("tabindex"),setTimeout((()=>this.setAttribute("tabindex","0")),0))},this.addEventListener=(...t)=>this.proxyElement.addEventListener(...t),(0,c.t)(this.proxyElement,this.hostElement,{excludeAttrs:o}))}disconnectedCallback(){this.proxyElement.removeEventListener("mouseover",this.mouseoverCbRef)}attributeChangedCallback(){this.proxyElement}}return y((0,l._)())(i)},d=["invalid","has-error-message"],u=t=>class extends t{static get formAssociated(){return!0}#i;constructor(){super(),this.#i=this.attachInternals()}formAssociatedCallback(){this.setValidity?.()}setValidationAttribute(t){const e=this.getAttribute(t);e&&this.proxyElement.setAttribute("error-message",e),d.forEach((t=>this.proxyElement.setAttribute(t,"true")))}validate(){const{valueMissing:t,patternMismatch:e,typeMismatch:s}=this.validity;t?this.setValidationAttribute("data-errormessage-value-missing"):(s||e)&&this.setValidationAttribute("data-errormessage-pattern-mismatch")}connectedCallback(){if(super.connectedCallback?.(),this.baseEle=this.shadowRoot.querySelector(this.baseSelector),this.hasAttribute("tabindex")||this.setAttribute("tabindex",0),this.inputElement??=this.baseEle.shadowRoot.querySelector('slot[name="input"]')?.assignedElements()[0]||this.baseEle.shadowRoot.querySelector('slot[name="textarea"]')?.assignedElements()[0],!this.inputElement)throw Error("no input was found");var t,e;t=this.inputElement,e="value",Object.defineProperty(this,e,{set:function(s){return t[e]=s},get:function(){return t[e]},configurable:!0}),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),this.validity=this.inputElement.validity,this.setValidity=()=>{this.#i.setValidity(this.inputElement.validity,this.inputElement.validationMessage)},this.inputElement.oninput=()=>{this.value=this.inputElement.value,this.setValidity()},this.onfocus=()=>{setTimeout((()=>this.inputElement.reportValidity()),0),this.validate()},this.inputElement.oninvalid=()=>{this.validate()}}},m=t=>class extends t{#r(){const e=this.shadowRoot.host.tagName.toLowerCase();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}"`)}connectedCallback(){super.connectedCallback?.(),this.shadowRoot.isConnected&&this.#r()}},p=t=>(0,n.E3)("descope",t),y=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e)},6225:(t,e,s)=>{s.d(e,{E3:()=>o,GL:()=>n,Tk:()=>a});const n=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),o=(...t)=>n(t.join("-")),a=(...t)=>`--${o(...t.filter((t=>!!t)))}`}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[178],{6446:(t,e,n)=>{n.r(e),n.d(e,{Divider:()=>f});var o=n(832),s=n(4942),i=n(3535),r=n(8522);const l=(0,o.iY)("divider");class d extends r.V{static get componentName(){return l}constructor(){super();const t=document.createElement("template");t.innerHTML="\n\t\t\t<style>\n\t\t\t\t:host > div {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\theight: 100%;\n\t\t\t\t}\n\t\t\t\t:host > div::before,\n\t\t\t\t:host > div::after {\n\t\t\t\t\tcontent: '';\n\t\t\t\t\tflex-grow: 1;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\t\t\t\t::slotted(*) {\n\t\t\t\t\tflex-grow: 0;\n\t\t\t\t\tflex-shrink: 0;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<div>\n\t\t\t\t<slot></slot>\n\t\t\t\t<slot name=\"text\"></slot>\n\t\t\t</div>\n\t\t",this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.baseSelector=":host > div"}}const{root:a,before:c,after:h,slotted:p}={root:{selector:""},before:{selector:"::before"},after:{selector:"::after"},slotted:{selector:()=>"::slotted(*)"}},f=(0,o.qC)((0,s.s)({nestingElementTagName:"descope-text",nestingElementDestSlotName:"text",forwardAttrOptions:{includeAttrs:["mode","variant"],excludeAttrs:[]}}),(0,o.yk)({mappings:{minHeight:a,alignItems:a,alignSelf:a,flexDirection:a,padding:p,width:(0,i.zy)(),height:[c,h],backgroundColor:[c,h],opacity:[c,h],textWidth:{...p,property:"width"}}}),o.e4,o.Ae)(d);n(1876),customElements.define(l,f)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[178],{6446:(t,e,n)=>{n.r(e),n.d(e,{Divider:()=>m});var o=n(832),s=n(4942),r=n(3535),i=n(8522),l=n(8801);const d=(0,o.iY)("divider");class a extends i.V{static get componentName(){return d}constructor(){super();const t=document.createElement("template");t.innerHTML="\n\t\t\t<style>\n\t\t\t\t:host > div {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\theight: 100%;\n\t\t\t\t}\n\t\t\t\t:host > div::before,\n\t\t\t\t:host > div::after {\n\t\t\t\t\tcontent: '';\n\t\t\t\t\tflex-grow: 1;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\t\t\t\t::slotted(*) {\n\t\t\t\t\tflex-grow: 0;\n\t\t\t\t\tflex-shrink: 0;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<div>\n\t\t\t\t<slot></slot>\n\t\t\t\t<slot name=\"text\"></slot>\n\t\t\t</div>\n\t\t",this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.baseSelector=":host > div"}}const{root:c,before:p,after:h,slotted:f}={root:{selector:""},before:{selector:"::before"},after:{selector:"::after"},slotted:{selector:()=>"::slotted(*)"}},m=(0,o.qC)((0,s.s)({nestingElementTagName:"descope-text",nestingElementDestSlotName:"text",forwardAttrOptions:{includeAttrs:["mode","variant"],excludeAttrs:[]}}),(0,o.yk)({mappings:{minHeight:c,alignItems:c,alignSelf:c,flexDirection:c,padding:f,width:(0,r.zy)(),height:[p,h],backgroundColor:[p,h],opacity:[p,h],textWidth:{...f,property:"width"}},nestedMappings:{fontStyle:{selector:l.Z.componentName,property:l.Z.cssVarList.fontStyle}}}),o.e4,o.Ae)(a);n(1876),customElements.define(d,m)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[58],{8029:(t,e,o)=>{o.r(e),o.d(e,{Link:()=>m});var n=o(832),s=o(9201),r=o(3535),a=o(4942),c=o(893),l=o(8522),i=o(8801);const d=(0,n.iY)("link");class p extends l.V{static get componentName(){return d}constructor(){super();const t=document.createElement("template");t.innerHTML='\n\t\t<style>\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t\t</style>\n\t\t<div>\n\t\t\t<a>\n\t\t\t\t<slot name="text"></slot>\n\t\t\t</a>\n\t\t</div>\n\t\t',this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),(0,s.o)(this.shadowRoot.host,this.shadowRoot.querySelector("a"),{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),this.baseSelector=":host > div"}}const{anchor:h}={anchor:{selector:"> a"}},m=(0,n.qC)((0,a.s)({nestingElementTagName:"descope-text",nestingElementDestSlotName:"text",forwardAttrOptions:{includeAttrs:["variant","italic","uppercase","lowercase"]}}),(0,n.yk)({mappings:{width:(0,r.zy)(),textAlign:{},color:h,cursor:h,borderBottomWidth:h,borderBottomStyle:h,borderBottomColor:h},nestedMappings:{color:{selector:` ${i.Z.componentName}`,property:i.Z.cssVarList.color}}}),(0,c._)(h.selector),n.e4,n.Ae)(p);o(1876),customElements.define(d,m)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[58],{8029:(t,e,o)=>{o.r(e),o.d(e,{Link:()=>m});var n=o(832),s=o(9201),r=o(3535),a=o(4942),c=o(893),l=o(8522),i=o(8801);const d=(0,n.iY)("link");class p extends l.V{static get componentName(){return d}constructor(){super();const t=document.createElement("template");t.innerHTML='\n\t\t<style>\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t\t</style>\n\t\t<div>\n\t\t\t<a>\n\t\t\t\t<slot name="text"></slot>\n\t\t\t</a>\n\t\t</div>\n\t\t',this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),(0,s.o)(this.shadowRoot.host,this.shadowRoot.querySelector("a"),{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),this.baseSelector=":host > div"}}const{anchor:h}={anchor:{selector:"> a"}},m=(0,n.qC)((0,a.s)({nestingElementTagName:"descope-text",nestingElementDestSlotName:"text",forwardAttrOptions:{includeAttrs:["variant","italic","uppercase","lowercase"]}}),(0,n.yk)({mappings:{width:(0,r.zy)(),textAlign:{},color:h,cursor:h,borderBottomWidth:h,borderBottomStyle:h,borderBottomColor:h},nestedMappings:{color:{selector:i.Z.componentName,property:i.Z.cssVarList.color}}}),(0,c._)(h.selector),n.e4,n.Ae)(p);o(1876),customElements.define(d,m)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[453],{9929:(t,e,n)=>{n.r(e),n.d(e,{LoaderLinear:()=>d});var o=n(832),a=n(3535),r=n(8522);const i=(0,o.iY)("loader-linear");class s extends r.V{static get componentName(){return i}constructor(){super();const t=document.createElement("template");t.innerHTML="\n\t\t\t<style>\n\t\t\t\t@keyframes tilt {\n\t\t\t\t\t0% { transform: translateX(0); }\n\t\t\t\t\t50% { transform: translateX(400%); }\n\t\t\t\t}\n\t\t\t\t:host {\n\t\t\t\t\tposition: relative;\n\t\t\t\t}\n\t\t\t\tdiv::after {\n\t\t\t\t\tcontent: '';\n\t\t\t\t\tanimation-name: tilt;\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tleft: 0;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<div></div>\n\t\t",this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.baseSelector=":host > div"}}const{root:c,after:l}={root:{},after:{selector:"::after"}},d=(0,o.qC)((0,o.yk)({mappings:{display:c,width:(0,a.zy)(c),height:[c,l],borderRadius:[c,l],surfaceColor:[{property:"background-color"}],barColor:[{...l,property:"background-color"}],barWidth:{...l,property:"width"},animationDuration:[c,l],animationTimingFunction:[c,l],animationIterationCount:[c,l]}}),o.e4,o.Ae)(s);customElements.define(i,d)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[72],{7603:(t,e,o)=>{o.r(e),o.d(e,{LoaderRadial:()=>p});var n=o(832),r=o(3535),i=o(8522);const s=(0,n.iY)("loader-radial");class a extends i.V{static get componentName(){return s}constructor(){super();const t=document.createElement("template");t.innerHTML="\n\t\t\t<style>\n\t\t\t\t@keyframes spin {\n\t\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t\t}\n\t\t\t\t:host {\n\t\t\t\t\tposition: relative;\n\t\t\t\t}\n\t\t\t\t:host > div {\n\t\t\t\t\tanimation-name: spin;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<div></div>\n\t\t",this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.baseSelector=":host > div"}}const p=(0,n.qC)((0,n.yk)({mappings:{display:{},width:(0,r.zy)({}),height:{},spinnerWidth:{property:"border-width"},spinnerStyle:{property:"border-style"},spinnerRadius:{property:"border-radius"},spinnerTopColor:{property:"border-top-color"},spinnerBottomColor:{property:"border-bottom-color"},spinnerRightColor:{property:"border-right-color"},spinnerLeftColor:{property:"border-left-color"},color:{},animationDuration:{},animationTimingFunction:{},animationIterationCount:{}}}),n.e4,n.Ae)(a);customElements.define(s,p)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[939],{7102:(t,e,n)=>{n.r(e);var i=n(832),a=n(4447),r=n(9063),o=n(7361);const d=(0,i.iY)("passcode"),{borderStyle:s,borderWidth:l,...p}=a.Z,c=(0,i.qC)((0,i.yk)({mappings:{...p},nestedMappings:{borderColor:{selector:` ${r.Z.componentName}`,property:r.Z.cssVarList.borderColor}}}),i.e4,i.y7,i.Ae,(t=>class extends t{constructor(){super()}get digits(){return Number.parseInt(this.getAttribute("digits"))||6}connectedCallback(){super.connectedCallback?.();const t=document.createElement("template");t.innerHTML=`\n <${o.f} \n bordered="true" \n name="code" \n tabindex="0"\n slot="input"\n required="${this.shadowRoot.host.getAttribute("required")}"\n pattern="${this.shadowRoot.host.getAttribute("pattern")}"\n ></${o.f}>\n `;const e=Object.assign(document.createElement("slot"),{name:"input",slot:"input",part:"input"});this.proxyElement.appendChild(e),this.proxyElement._setFocused=()=>{},this.shadowRoot.host.appendChild(t.content.cloneNode(!0)),this.inputElement=this.querySelector(o.f),this.inputElement.addEventListener("blur",(()=>{this.proxyElement.validate()}))}}))((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n :host {\n --vaadin-field-default-width: auto;\n }\n\n ::slotted([slot='input']) {\n -webkit-mask-image: none;\n display: flex;\n gap: 2px;\n align-items: center;\n padding: 0;\n }\n\n vaadin-text-field::part(input-field) {\n background-color: transparent;\n padding: 0;\n }\n\n ${u}\n `,excludeAttrsSync:["tabindex"],componentName:d})),u=`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\n\tvaadin-text-field {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\tvaadin-text-field::part(input-field) {\n\t\toverflow: hidden;\n\t}\n\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\topacity: 1;\n\t}\n\n\tvaadin-text-field > label,\n\tvaadin-text-field::part(input-field) {\n\t\tcursor: pointer;\n\t\tcolor: var(${c.cssVarList.color});\n\t}\n\tvaadin-text-field::part(input-field):focus {\n\t\tcursor: text;\n\t}\n\tvaadin-text-field[required]::part(required-indicator)::after {\n\t\tfont-size: "12px";\n\t\tcontent: "*";\n\t\tcolor: var(${c.cssVarList.color});\n\t}\n\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\tborder: 0 solid;\n\t}\n`,f=c;n(9357),n(4775),customElements.define(d,f)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[939],{7102:(t,e,n)=>{n.r(e);var i=n(832),a=n(4447),r=n(9063),o=n(7361);const d=(0,i.iY)("passcode"),{borderStyle:s,borderWidth:l,...p}=a.Z,c=(0,i.qC)((0,i.yk)({mappings:{...p},nestedMappings:{borderColor:{selector:r.Z.componentName,property:r.Z.cssVarList.borderColor}}}),i.e4,i.y7,i.Ae,(t=>class extends t{constructor(){super()}get digits(){return Number.parseInt(this.getAttribute("digits"))||6}connectedCallback(){super.connectedCallback?.();const t=document.createElement("template");t.innerHTML=`\n <${o.f} \n bordered="true" \n name="code" \n tabindex="0"\n slot="input"\n required="${this.shadowRoot.host.getAttribute("required")}"\n pattern="${this.shadowRoot.host.getAttribute("pattern")}"\n ></${o.f}>\n `;const e=Object.assign(document.createElement("slot"),{name:"input",slot:"input",part:"input"});this.proxyElement.appendChild(e),this.proxyElement._setFocused=()=>{},this.shadowRoot.host.appendChild(t.content.cloneNode(!0)),this.inputElement=this.querySelector(o.f),this.inputElement.addEventListener("blur",(()=>{this.proxyElement.validate()}))}}))((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n :host {\n --vaadin-field-default-width: auto;\n }\n\n ::slotted([slot='input']) {\n -webkit-mask-image: none;\n display: flex;\n gap: 2px;\n align-items: center;\n padding: 0;\n }\n\n vaadin-text-field::part(input-field) {\n background-color: transparent;\n padding: 0;\n }\n\n ${u}\n `,excludeAttrsSync:["tabindex"],componentName:d})),u=`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\n\tvaadin-text-field {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\tvaadin-text-field::part(input-field) {\n\t\toverflow: hidden;\n\t}\n\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\topacity: 1;\n\t}\n\n\tvaadin-text-field > label,\n\tvaadin-text-field::part(input-field) {\n\t\tcursor: pointer;\n\t\tcolor: var(${c.cssVarList.color});\n\t}\n\tvaadin-text-field::part(input-field):focus {\n\t\tcursor: text;\n\t}\n\tvaadin-text-field[required]::part(required-indicator)::after {\n\t\tfont-size: "12px";\n\t\tcontent: "*";\n\t\tcolor: var(${c.cssVarList.color});\n\t}\n\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\tborder: 0 solid;\n\t}\n`,f=c;n(9357),n(4775),customElements.define(d,f)}}]);
package/dist/umd/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.DescopeUI=o():e.DescopeUI=o()}(self,(()=>(()=>{var e,o,t,r={534:(e,o,t)=>{var r={"./descope-button/index.js":[3029,840,767,211,513,729,832,662],"./descope-checkbox/index.js":[7904,840,786,208,767,515,832,761],"./descope-combo/index.js":[2798,840,786,208,233,422,767,725,211,789,513,729,832,447,934,662,247],"./descope-container/index.js":[147,832,317],"./descope-date-picker/index.js":[2552,840,786,208,233,767,211,513,54,832,17],"./descope-divider/index.js":[6446,832,528,942,178],"./descope-email-field/index.js":[689,840,786,208,233,422,725,437,832,447,760],"./descope-link/index.js":[8029,832,528,942,58],"./descope-logo/index.js":[4641,832,984],"./descope-number-field/index.js":[4951,840,786,208,233,422,806,832,447,142],"./descope-passcode/descope-passcode-internal/index.js":[4775,832,841],"./descope-passcode/index.js":[7102,840,786,208,233,422,725,789,832,447,934,841,939],"./descope-password-field/index.js":[1721,840,786,208,233,422,767,725,211,56,832,447,320],"./descope-switch-toggle/index.js":[3774,840,786,208,767,515,832,739],"./descope-text-area/index.js":[178,840,786,233,422,101,832,322],"./descope-text-field/index.js":[9357,840,786,208,233,422,725,789,832,447,934],"./descope-text/index.js":[1876,832,528]};function s(e){if(!t.o(r,e))return Promise.resolve().then((()=>{var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}));var o=r[e],s=o[0];return Promise.all(o.slice(1).map(t.e)).then((()=>t(s)))}s.keys=()=>Object.keys(r),s.id=534,e.exports=s},7507:(e,o,t)=>{const r=t(534);e.exports=r.keys().reduce(((e,o)=>(e[o.replace(/.*?([^\/]+)\/index\.js$/,"$1")]=()=>r(o),e)),{})}},s={};function n(e){var o=s[e];if(void 0!==o)return o.exports;var t=s[e]={exports:{}};return r[e](t,t.exports,n),t.exports}n.m=r,e=[],n.O=(o,t,r,s)=>{if(!t){var d=1/0;for(a=0;a<e.length;a++){for(var[t,r,s]=e[a],i=!0,c=0;c<t.length;c++)(!1&s||d>=s)&&Object.keys(n.O).every((e=>n.O[e](t[c])))?t.splice(c--,1):(i=!1,s<d&&(d=s));if(i){e.splice(a--,1);var p=r();void 0!==p&&(o=p)}}return o}s=s||0;for(var a=e.length;a>0&&e[a-1][2]>s;a--)e[a]=e[a-1];e[a]=[t,r,s]},n.F={},n.E=e=>{Object.keys(n.F).map((o=>{n.F[o](e)}))},n.d=(e,o)=>{for(var t in o)n.o(o,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((o,t)=>(n.f[t](e,o),o)),[])),n.u=e=>(({17:"descope-date-picker-index-js",58:"descope-link-index-js",142:"descope-number-field-index-js",178:"descope-divider-index-js",247:"descope-combo-index-js",317:"descope-container-index-js",320:"descope-password-field-index-js",322:"descope-text-area-index-js",528:"descope-text-index-js",662:"descope-button-index-js",739:"descope-switch-toggle-index-js",760:"descope-email-field-index-js",761:"descope-checkbox-index-js",841:"descope-passcode-descope-passcode-internal-index-js",934:"descope-text-field-index-js",939:"descope-passcode-index-js",984:"descope-logo-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,o)=>Object.prototype.hasOwnProperty.call(e,o),o={},t="DescopeUI:",n.l=(e,r,s,d)=>{if(o[e])o[e].push(r);else{var i,c;if(void 0!==s)for(var p=document.getElementsByTagName("script"),a=0;a<p.length;a++){var l=p[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==t+s){i=l;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,n.nc&&i.setAttribute("nonce",n.nc),i.setAttribute("data-webpack",t+s),i.src=e),o[e]=[r];var u=(t,r)=>{i.onerror=i.onload=null,clearTimeout(f);var s=o[e];if(delete o[e],i.parentNode&&i.parentNode.removeChild(i),s&&s.forEach((e=>e(r))),t)return t(r)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=u.bind(null,i.onerror),i.onload=u.bind(null,i.onload),c&&document.head.appendChild(i)}},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 o=n.g.document;if(!e&&o&&(o.currentScript&&(e=o.currentScript.src),!e)){var t=o.getElementsByTagName("script");t.length&&(e=t[t.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={826:0};n.f.j=(o,t)=>{var r=n.o(e,o)?e[o]:void 0;if(0!==r)if(r)t.push(r[2]);else{var s=new Promise(((t,s)=>r=e[o]=[t,s]));t.push(r[2]=s);var d=n.p+n.u(o),i=new Error;n.l(d,(t=>{if(n.o(e,o)&&(0!==(r=e[o])&&(e[o]=void 0),r)){var s=t&&("load"===t.type?"missing":t.type),d=t&&t.target&&t.target.src;i.message="Loading chunk "+o+" failed.\n("+s+": "+d+")",i.name="ChunkLoadError",i.type=s,i.request=d,r[1](i)}}),"chunk-"+o,o)}},n.F.j=o=>{if(!n.o(e,o)||void 0===e[o]){e[o]=null;var t=document.createElement("link");n.nc&&t.setAttribute("nonce",n.nc),t.rel="prefetch",t.as="script",t.href=n.p+n.u(o),document.head.appendChild(t)}},n.O.j=o=>0===e[o];var o=(o,t)=>{var r,s,[d,i,c]=t,p=0;if(d.some((o=>0!==e[o]))){for(r in i)n.o(i,r)&&(n.m[r]=i[r]);if(c)var a=c(n)}for(o&&o(t);p<d.length;p++)s=d[p],n.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return n.O(a)},t=self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})(),n.O(0,[826],(()=>{[840,767,211,513,729,832,662,786,208,515,761,233,422,725,789,447,934,247,317,54,17,528,942,178,437,760,58,984,806,142,841,939,56,320,739,101,322].map(n.E)}),5);var d=n(7507);return n.O(d)})()));
1
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.DescopeUI=o():e.DescopeUI=o()}(self,(()=>(()=>{var e,o,r,t={534:(e,o,r)=>{var t={"./descope-button/index.js":[3029,840,767,211,513,729,832,662],"./descope-checkbox/index.js":[7904,840,786,208,767,515,832,761],"./descope-combo/index.js":[2798,840,786,208,233,422,767,725,211,789,513,729,832,447,934,662,247],"./descope-container/index.js":[147,832,317],"./descope-date-picker/index.js":[2552,840,786,208,233,767,211,513,54,832,17],"./descope-divider/index.js":[6446,832,528,942,178],"./descope-email-field/index.js":[689,840,786,208,233,422,725,437,832,447,760],"./descope-link/index.js":[8029,832,528,942,58],"./descope-loader-linear/index.js":[9929,832,453],"./descope-loader-radial/index.js":[7603,832,72],"./descope-logo/index.js":[4641,832,984],"./descope-number-field/index.js":[4951,840,786,208,233,422,806,832,447,142],"./descope-passcode/descope-passcode-internal/index.js":[4775,832,841],"./descope-passcode/index.js":[7102,840,786,208,233,422,725,789,832,447,934,841,939],"./descope-password-field/index.js":[1721,840,786,208,233,422,767,725,211,56,832,447,320],"./descope-switch-toggle/index.js":[3774,840,786,208,767,515,832,739],"./descope-text-area/index.js":[178,840,786,233,422,101,832,322],"./descope-text-field/index.js":[9357,840,786,208,233,422,725,789,832,447,934],"./descope-text/index.js":[1876,832,528]};function s(e){if(!r.o(t,e))return Promise.resolve().then((()=>{var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}));var o=t[e],s=o[0];return Promise.all(o.slice(1).map(r.e)).then((()=>r(s)))}s.keys=()=>Object.keys(t),s.id=534,e.exports=s},7507:(e,o,r)=>{const t=r(534);e.exports=t.keys().reduce(((e,o)=>(e[o.replace(/.*?([^\/]+)\/index\.js$/,"$1")]=()=>t(o),e)),{})}},s={};function n(e){var o=s[e];if(void 0!==o)return o.exports;var r=s[e]={exports:{}};return t[e](r,r.exports,n),r.exports}n.m=t,e=[],n.O=(o,r,t,s)=>{if(!r){var d=1/0;for(p=0;p<e.length;p++){for(var[r,t,s]=e[p],i=!0,c=0;c<r.length;c++)(!1&s||d>=s)&&Object.keys(n.O).every((e=>n.O[e](r[c])))?r.splice(c--,1):(i=!1,s<d&&(d=s));if(i){e.splice(p--,1);var a=t();void 0!==a&&(o=a)}}return o}s=s||0;for(var p=e.length;p>0&&e[p-1][2]>s;p--)e[p]=e[p-1];e[p]=[r,t,s]},n.F={},n.E=e=>{Object.keys(n.F).map((o=>{n.F[o](e)}))},n.d=(e,o)=>{for(var r in o)n.o(o,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((o,r)=>(n.f[r](e,o),o)),[])),n.u=e=>(({17:"descope-date-picker-index-js",58:"descope-link-index-js",72:"descope-loader-radial-index-js",142:"descope-number-field-index-js",178:"descope-divider-index-js",247:"descope-combo-index-js",317:"descope-container-index-js",320:"descope-password-field-index-js",322:"descope-text-area-index-js",453:"descope-loader-linear-index-js",528:"descope-text-index-js",662:"descope-button-index-js",739:"descope-switch-toggle-index-js",760:"descope-email-field-index-js",761:"descope-checkbox-index-js",841:"descope-passcode-descope-passcode-internal-index-js",934:"descope-text-field-index-js",939:"descope-passcode-index-js",984:"descope-logo-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,o)=>Object.prototype.hasOwnProperty.call(e,o),o={},r="DescopeUI:",n.l=(e,t,s,d)=>{if(o[e])o[e].push(t);else{var i,c;if(void 0!==s)for(var a=document.getElementsByTagName("script"),p=0;p<a.length;p++){var l=a[p];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==r+s){i=l;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,n.nc&&i.setAttribute("nonce",n.nc),i.setAttribute("data-webpack",r+s),i.src=e),o[e]=[t];var u=(r,t)=>{i.onerror=i.onload=null,clearTimeout(f);var s=o[e];if(delete o[e],i.parentNode&&i.parentNode.removeChild(i),s&&s.forEach((e=>e(t))),r)return r(t)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=u.bind(null,i.onerror),i.onload=u.bind(null,i.onload),c&&document.head.appendChild(i)}},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 o=n.g.document;if(!e&&o&&(o.currentScript&&(e=o.currentScript.src),!e)){var r=o.getElementsByTagName("script");r.length&&(e=r[r.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={826:0};n.f.j=(o,r)=>{var t=n.o(e,o)?e[o]:void 0;if(0!==t)if(t)r.push(t[2]);else{var s=new Promise(((r,s)=>t=e[o]=[r,s]));r.push(t[2]=s);var d=n.p+n.u(o),i=new Error;n.l(d,(r=>{if(n.o(e,o)&&(0!==(t=e[o])&&(e[o]=void 0),t)){var s=r&&("load"===r.type?"missing":r.type),d=r&&r.target&&r.target.src;i.message="Loading chunk "+o+" failed.\n("+s+": "+d+")",i.name="ChunkLoadError",i.type=s,i.request=d,t[1](i)}}),"chunk-"+o,o)}},n.F.j=o=>{if(!n.o(e,o)||void 0===e[o]){e[o]=null;var r=document.createElement("link");n.nc&&r.setAttribute("nonce",n.nc),r.rel="prefetch",r.as="script",r.href=n.p+n.u(o),document.head.appendChild(r)}},n.O.j=o=>0===e[o];var o=(o,r)=>{var t,s,[d,i,c]=r,a=0;if(d.some((o=>0!==e[o]))){for(t in i)n.o(i,t)&&(n.m[t]=i[t]);if(c)var p=c(n)}for(o&&o(r);a<d.length;a++)s=d[a],n.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return n.O(p)},r=self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[];r.forEach(o.bind(null,0)),r.push=o.bind(null,r.push.bind(r))})(),n.O(0,[826],(()=>{[840,767,211,513,729,832,662,786,208,515,761,233,422,725,789,447,934,247,317,54,17,528,942,178,437,760,58,453,72,984,806,142,841,939,56,320,739,101,322].map(n.E)}),5);var d=n(7507);return n.O(d)})()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/web-components-ui",
3
- "version": "1.0.55",
3
+ "version": "1.0.57",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -8,6 +8,7 @@ import {
8
8
  import { enforceNestingElementsStylesMixin } from '../../componentsHelpers/enforceNestingElementsStylesMixin';
9
9
  import { matchHostStyle } from '../../componentsHelpers/createStyleMixin/helpers';
10
10
  import { DescopeBaseClass } from '../DescopeBaseClass';
11
+ import Text from '../descope-text/Text';
11
12
 
12
13
  export const componentName = getComponentName('divider');
13
14
  class RawDivider extends DescopeBaseClass {
@@ -76,6 +77,12 @@ const Divider = compose(
76
77
  backgroundColor: [before, after],
77
78
  opacity: [before, after],
78
79
  textWidth: { ...slotted, property: 'width' }
80
+ },
81
+ nestedMappings: {
82
+ fontStyle: {
83
+ selector: Text.componentName,
84
+ property: Text.cssVarList.fontStyle
85
+ }
79
86
  }
80
87
  }),
81
88
  draggableMixin,
@@ -77,7 +77,7 @@ const Link = compose(
77
77
  },
78
78
  nestedMappings: {
79
79
  color: {
80
- selector: ` ${Text.componentName}`,
80
+ selector: Text.componentName,
81
81
  property: Text.cssVarList.color
82
82
  }
83
83
  }
@@ -0,0 +1,72 @@
1
+ import {
2
+ getComponentName,
3
+ createStyleMixin,
4
+ draggableMixin,
5
+ compose,
6
+ componentNameValidationMixin
7
+ } from '../../componentsHelpers';
8
+ import { matchHostStyle } from '../../componentsHelpers/createStyleMixin/helpers';
9
+ import { DescopeBaseClass } from '../DescopeBaseClass';
10
+
11
+ export const componentName = getComponentName('loader-linear');
12
+
13
+ class RawLoaderLinear extends DescopeBaseClass {
14
+ static get componentName() {
15
+ return componentName;
16
+ }
17
+ constructor() {
18
+ super();
19
+ const template = document.createElement('template');
20
+ template.innerHTML = `
21
+ <style>
22
+ @keyframes tilt {
23
+ 0% { transform: translateX(0); }
24
+ 50% { transform: translateX(400%); }
25
+ }
26
+ :host {
27
+ position: relative;
28
+ }
29
+ div::after {
30
+ content: '';
31
+ animation-name: tilt;
32
+ position: absolute;
33
+ left: 0;
34
+ }
35
+ </style>
36
+ <div></div>
37
+ `;
38
+
39
+ this.attachShadow({ mode: 'open' });
40
+ this.shadowRoot.appendChild(template.content.cloneNode(true));
41
+
42
+ this.baseSelector = ':host > div';
43
+ }
44
+ }
45
+
46
+ const selectors = {
47
+ root: {},
48
+ after: { selector: '::after' }
49
+ };
50
+
51
+ const { root, after } = selectors;
52
+
53
+ const LoaderLinear = compose(
54
+ createStyleMixin({
55
+ mappings: {
56
+ display: root,
57
+ width: matchHostStyle(root),
58
+ height: [root, after],
59
+ borderRadius: [root, after],
60
+ surfaceColor: [{ property: 'background-color' }],
61
+ barColor: [{ ...after, property: 'background-color' }],
62
+ barWidth: { ...after, property: 'width' },
63
+ animationDuration: [root, after],
64
+ animationTimingFunction: [root, after],
65
+ animationIterationCount: [root, after]
66
+ }
67
+ }),
68
+ draggableMixin,
69
+ componentNameValidationMixin
70
+ )(RawLoaderLinear);
71
+
72
+ export default LoaderLinear;
@@ -0,0 +1,5 @@
1
+ import LoaderLinear, { componentName } from './LoaderLinear';
2
+
3
+ customElements.define(componentName, LoaderLinear);
4
+
5
+ export { LoaderLinear };
@@ -0,0 +1,66 @@
1
+ import {
2
+ getComponentName,
3
+ createStyleMixin,
4
+ draggableMixin,
5
+ compose,
6
+ componentNameValidationMixin
7
+ } from '../../componentsHelpers';
8
+ import { matchHostStyle } from '../../componentsHelpers/createStyleMixin/helpers';
9
+ import { DescopeBaseClass } from '../DescopeBaseClass';
10
+
11
+ export const componentName = getComponentName('loader-radial');
12
+
13
+ class RawLoaderRadial extends DescopeBaseClass {
14
+ static get componentName() {
15
+ return componentName;
16
+ }
17
+ constructor() {
18
+ super();
19
+ const template = document.createElement('template');
20
+ template.innerHTML = `
21
+ <style>
22
+ @keyframes spin {
23
+ 0% { transform: rotate(0deg); }
24
+ 100% { transform: rotate(360deg); }
25
+ }
26
+ :host {
27
+ position: relative;
28
+ }
29
+ :host > div {
30
+ animation-name: spin;
31
+ }
32
+ </style>
33
+ <div></div>
34
+ `;
35
+
36
+ this.attachShadow({ mode: 'open' });
37
+ this.shadowRoot.appendChild(template.content.cloneNode(true));
38
+
39
+ this.baseSelector = ':host > div';
40
+ }
41
+ }
42
+
43
+ const LoaderRadial = compose(
44
+ createStyleMixin({
45
+ mappings: {
46
+ display: {},
47
+ width: matchHostStyle({}),
48
+ height: {},
49
+ spinnerWidth: { property: 'border-width' },
50
+ spinnerStyle: { property: 'border-style' },
51
+ spinnerRadius: { property: 'border-radius' },
52
+ spinnerTopColor: { property: 'border-top-color' },
53
+ spinnerBottomColor: { property: 'border-bottom-color' },
54
+ spinnerRightColor: { property: 'border-right-color' },
55
+ spinnerLeftColor: { property: 'border-left-color' },
56
+ color: {},
57
+ animationDuration: {},
58
+ animationTimingFunction: {},
59
+ animationIterationCount: {}
60
+ }
61
+ }),
62
+ draggableMixin,
63
+ componentNameValidationMixin
64
+ )(RawLoaderRadial);
65
+
66
+ export default LoaderRadial;
@@ -0,0 +1,5 @@
1
+ import LoaderRadial, { componentName } from './LoaderRadial';
2
+
3
+ customElements.define(componentName, LoaderRadial);
4
+
5
+ export { LoaderRadial };
@@ -1,34 +1,34 @@
1
1
  import {
2
- getComponentName,
3
- createStyleMixin,
4
- draggableMixin,
5
- createProxy,
6
- inputMixin,
7
- compose,
8
- componentNameValidationMixin
2
+ getComponentName,
3
+ createStyleMixin,
4
+ draggableMixin,
5
+ createProxy,
6
+ inputMixin,
7
+ compose,
8
+ componentNameValidationMixin
9
9
  } from '../../componentsHelpers';
10
10
  import { matchHostStyle } from '../../componentsHelpers/createStyleMixin/helpers';
11
11
  import textFieldMappings from '../descope-text-field/textFieldMappings';
12
12
  export const componentName = getComponentName('passcode');
13
- import TextField from '../descope-text-field/TextField'
14
- import { componentName as descopeInternalComponentName } from './descope-passcode-internal/PasscodeInternal'
13
+ import TextField from '../descope-text-field/TextField';
14
+ import { componentName as descopeInternalComponentName } from './descope-passcode-internal/PasscodeInternal';
15
15
 
16
16
  const customMixin = (superclass) =>
17
- class DraggableMixinClass extends superclass {
18
- constructor() {
19
- super();
20
- }
17
+ class DraggableMixinClass extends superclass {
18
+ constructor() {
19
+ super();
20
+ }
21
21
 
22
- get digits() {
23
- return Number.parseInt(this.getAttribute('digits')) || 6
24
- }
22
+ get digits() {
23
+ return Number.parseInt(this.getAttribute('digits')) || 6;
24
+ }
25
25
 
26
- connectedCallback() {
27
- super.connectedCallback?.();
28
- const template = document.createElement('template');
26
+ connectedCallback() {
27
+ super.connectedCallback?.();
28
+ const template = document.createElement('template');
29
29
 
30
- //forward required & pattern TODO use forwardAttrs
31
- template.innerHTML = `
30
+ //forward required & pattern TODO use forwardAttrs
31
+ template.innerHTML = `
32
32
  <${descopeInternalComponentName}
33
33
  bordered="true"
34
34
  name="code"
@@ -37,49 +37,54 @@ const customMixin = (superclass) =>
37
37
  required="${this.shadowRoot.host.getAttribute('required')}"
38
38
  pattern="${this.shadowRoot.host.getAttribute('pattern')}"
39
39
  ></${descopeInternalComponentName}>
40
- `
40
+ `;
41
41
 
42
- // we are adding a slot under vaadin-text-field, it should reflect all descope-passcode children to be under vaadin-text-field, this is why it has a name & slot
43
- const slotEle = Object.assign(document.createElement('slot'), { name: 'input', slot: 'input', part: 'input' })
44
- this.proxyElement.appendChild(slotEle)
42
+ // we are adding a slot under vaadin-text-field, it should reflect all descope-passcode children to be under vaadin-text-field, this is why it has a name & slot
43
+ const slotEle = Object.assign(document.createElement('slot'), {
44
+ name: 'input',
45
+ slot: 'input',
46
+ part: 'input'
47
+ });
48
+ this.proxyElement.appendChild(slotEle);
45
49
 
46
- // we want to control when the element is out of focus
47
- // so the validations will be triggered blur event is dispatched from descope-passcode internal (and not every time focusing a digit)
48
- this.proxyElement._setFocused = () => { }
50
+ // we want to control when the element is out of focus
51
+ // so the validations will be triggered blur event is dispatched from descope-passcode internal (and not every time focusing a digit)
52
+ this.proxyElement._setFocused = () => {};
49
53
 
50
- this.shadowRoot.host.appendChild(template.content.cloneNode(true))
51
- this.inputElement = this.querySelector(descopeInternalComponentName)
54
+ this.shadowRoot.host.appendChild(template.content.cloneNode(true));
55
+ this.inputElement = this.querySelector(descopeInternalComponentName);
52
56
 
53
- // we want to trigger validation only when dispatching a blur event from the descope-passcode-internal
54
- this.inputElement.addEventListener('blur', () => {
55
- this.proxyElement.validate()
56
- })
57
- }
58
- }
57
+ // we want to trigger validation only when dispatching a blur event from the descope-passcode-internal
58
+ this.inputElement.addEventListener('blur', () => {
59
+ this.proxyElement.validate();
60
+ });
61
+ }
62
+ };
59
63
 
60
- const { borderStyle, borderWidth, ...restTextFieldMappings } = textFieldMappings;
64
+ const { borderStyle, borderWidth, ...restTextFieldMappings } =
65
+ textFieldMappings;
61
66
 
62
67
  const Passcode = compose(
63
- createStyleMixin({
64
- mappings: {
65
- ...restTextFieldMappings,
66
- },
67
- nestedMappings: {
68
- borderColor: {
69
- selector: ` ${TextField.componentName}`,
70
- property: TextField.cssVarList.borderColor
71
- }
72
- }
73
- }),
74
- draggableMixin,
75
- inputMixin,
76
- componentNameValidationMixin,
77
- customMixin
68
+ createStyleMixin({
69
+ mappings: {
70
+ ...restTextFieldMappings
71
+ },
72
+ nestedMappings: {
73
+ borderColor: {
74
+ selector: TextField.componentName,
75
+ property: TextField.cssVarList.borderColor
76
+ }
77
+ }
78
+ }),
79
+ draggableMixin,
80
+ inputMixin,
81
+ componentNameValidationMixin,
82
+ customMixin
78
83
  )(
79
- createProxy({
80
- slots: [],
81
- wrappedEleName: 'vaadin-text-field',
82
- style: () => `
84
+ createProxy({
85
+ slots: [],
86
+ wrappedEleName: 'vaadin-text-field',
87
+ style: () => `
83
88
  :host {
84
89
  --vaadin-field-default-width: auto;
85
90
  }
@@ -99,9 +104,9 @@ const Passcode = compose(
99
104
 
100
105
  ${overrides}
101
106
  `,
102
- excludeAttrsSync: ['tabindex'],
103
- componentName
104
- })
107
+ excludeAttrsSync: ['tabindex'],
108
+ componentName
109
+ })
105
110
  );
106
111
 
107
112
  const overrides = `
@@ -9,7 +9,11 @@ const createCssSelector = (
9
9
  ) =>
10
10
  typeof relativeSelectorOrSelectorFn === 'function'
11
11
  ? relativeSelectorOrSelectorFn(baseSelector)
12
- : `${baseSelector}${relativeSelectorOrSelectorFn}`;
12
+ : `${baseSelector}${
13
+ /^[A-Za-z]/.test(relativeSelectorOrSelectorFn)
14
+ ? ` ${relativeSelectorOrSelectorFn}`
15
+ : relativeSelectorOrSelectorFn
16
+ }`;
13
17
 
14
18
  class StyleBuilder {
15
19
  constructor() {