@descope/web-components-ui 1.0.52 → 1.0.54
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.esm.js +707 -325
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/832.js +1 -0
- package/dist/umd/942.js +1 -0
- package/dist/umd/descope-button-index-js.js +1 -1
- package/dist/umd/descope-checkbox-index-js.js +1 -1
- package/dist/umd/descope-combo-index-js.js +1 -1
- package/dist/umd/descope-container-index-js.js +1 -1
- package/dist/umd/descope-date-picker-index-js.js +1 -1
- package/dist/umd/descope-divider-index-js.js +1 -0
- package/dist/umd/descope-email-field-index-js.js +1 -1
- package/dist/umd/descope-link-index-js.js +1 -0
- package/dist/umd/descope-logo-index-js.js +1 -1
- package/dist/umd/descope-number-field-index-js.js +1 -1
- package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/descope-password-field-index-js.js +1 -1
- package/dist/umd/descope-switch-toggle-index-js.js +1 -1
- package/dist/umd/descope-text-area-index-js.js +1 -1
- package/dist/umd/descope-text-field-index-js.js +1 -1
- package/dist/umd/descope-text-index-js.js +1 -1
- package/dist/umd/index.js +1 -1
- package/package.json +1 -1
- package/src/components/DescopeBaseClass.js +1 -0
- package/src/components/descope-button/Button.js +0 -1
- package/src/components/descope-combo/index.js +2 -1
- package/src/components/descope-container/Container.js +13 -5
- package/src/components/descope-divider/Divider.js +85 -0
- package/src/components/descope-divider/index.js +6 -0
- package/src/components/descope-link/Link.js +90 -0
- package/src/components/descope-link/index.js +6 -0
- package/src/components/descope-logo/Logo.js +5 -4
- package/src/components/descope-password-field/PasswordField.js +0 -1
- package/src/components/descope-text/Text.js +8 -1
- package/src/components/descope-text/index.js +0 -1
- package/src/componentsHelpers/createProxy/helpers.js +33 -11
- package/src/componentsHelpers/createProxy/index.js +12 -17
- package/src/componentsHelpers/enforceNestingElementsStylesMixin.js +95 -0
- package/src/componentsHelpers/hoverableMixin.js +23 -0
- package/src/index.js +4 -0
- package/src/theme/components/divider.js +24 -0
- package/src/theme/components/index.js +4 -0
- package/src/theme/components/link.js +57 -0
- package/src/theme/components/text.js +6 -0
- package/dist/umd/433.js +0 -1
package/dist/umd/832.js
ADDED
@@ -0,0 +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)))}`}}]);
|
package/dist/umd/942.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[942],{4942:(o,t,s)=>{s.d(t,{s:()=>c});var e=s(9201);const h=(o,t)=>{t.append(...o.childNodes),o.appendChild(t)},c=({nestingElementTagName:o,nestingElementDestSlotName:t,forwardAttrOptions:s})=>c=>{const d=()=>Object.assign(document.createElement(o),{slot:t});let i;const a=()=>i;return class extends c{constructor(){var t;super(),t=()=>{a().disconnect(this.shadowRoot.host);const t=this.shadowRoot.host.querySelector(o),c=this.shadowRoot.host.childNodes.length>0;!t&&c?h(this.shadowRoot.host,d()):t&&c?(this.shadowRoot.host.querySelector(child).remove(),h(this.shadowRoot.host,d())):t&&!c&&this.shadowRoot.host.querySelector(child).remove(),this.shadowRoot.host.querySelector(o)&&(0,e.o)(this.shadowRoot.host,this.shadowRoot.host.querySelector(o),s),a().observe(this.shadowRoot.host,{childList:!0})},i=new MutationObserver((o=>{for(const s of o)"childList"===s.type&&t()}))}connectedCallback(){super.connectedCallback?.(),this.shadowRoot.host.childNodes.length>0&&(h(this.shadowRoot.host,d()),(0,e.o)(this.shadowRoot.host,this.shadowRoot.host.querySelector(o),s)),a().observe(this.shadowRoot.host,{childList:!0})}}}}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[662],{3029:(t,n,e)=>{e.r(n),e.d(n,{Button:()=>c}),e(729);var r=e(
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[662],{3029:(t,n,e)=>{e.r(n),e.d(n,{Button:()=>c}),e(729);var r=e(832),a=e(3535);const i=(0,r.iY)("button"),o="::part(label)",s=(0,r.qC)((0,r.yk)({mappings:{backgroundColor:{},borderRadius:{},color:{selector:o},borderColor:{},borderStyle:{},borderWidth:{},fontSize:{},height:{},width:(0,a.zy)(),cursor:{},padding:[{selector:o}],textDecoration:{selector:o}}}),r.e4,r.Ae)((0,r.DM)({slots:["prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\tvaadin-button { margin: 0; }\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n vaadin-button::part(label) { pointer-events: none; } \n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tgap: 5px;\n\t}\n ${l}`,excludeAttrsSync:["tabindex"],componentName:i})),l=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\t--marginRatio: 1.35;\n\t\tcolor: var(${s.cssVarList.color});\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\ttop: calc(50% - calc((var(${s.cssVarList.height}) / var(--marginRatio)) / 2));\n\t\tleft: calc(50% - calc((var(${s.cssVarList.height}) / var(--marginRatio)) / 2));\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-width: calc(var(${s.cssVarList.height}) / 12);\n\t\tborder-style: solid;\n\t\twidth: calc(var(${s.cssVarList.height}) / var(--marginRatio));\n\t\theight: calc(var(${s.cssVarList.height}) / var(--marginRatio));\n\t}\n\t:host([loading="true"])::part(prefix),\n\t:host([loading="true"])::part(label) {\n\t\tvisibility: hidden;\n\t}\n`,c=s;customElements.define(i,c)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[761],{7904:(e,t,s)=>{s.r(t),s.d(t,{Checkbox:()=>l}),s(9515);var c=s(
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[761],{7904:(e,t,s)=>{s.r(t),s.d(t,{Checkbox:()=>l}),s(9515);var c=s(832),n=s(3535);const o=(0,c.iY)("checkbox"),l=(0,c.qC)((0,c.yk)({mappings:{width:(0,n.zy)(),cursor:[{},{selector:"> label"}]}}),c.e4,c.y7,c.Ae)((0,c.DM)({slots:[],wrappedEleName:"vaadin-checkbox",style:"\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t\t",excludeAttrsSync:["tabindex"],componentName:o}));customElements.define(o,l)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[247],{2798:(e,t,o)=>{o.r(t),o.d(t,{Combo:()=>
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[247],{2798:(e,t,o)=>{o.r(t),o.d(t,{Combo:()=>p});var n=o(832),c=o(8522);o(3029),o(9357);const s=document.createElement("template"),d=(0,n.iY)("combo");s.innerHTML="\n <descope-button></descope-button>\n <descope-text-field></descope-text-field>\n";class p extends c.V{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(s.content.cloneNode(!0))}}customElements.define(d,p)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[317],{147:(e,
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[317],{147:(t,e,o)=>{o.r(e),o.d(e,{Container:()=>a});var n=o(832),r=o(3535),s=o(8522);const d=(0,n.iY)("container");class i extends s.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 > slot {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<slot></slot>\n\t\t",this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.baseSelector=":host > slot"}}const a=(0,n.qC)((0,n.yk)({mappings:{height:(0,r.zy)(),width:(0,r.zy)(),verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],display:{},flexDirection:{},justifyContent:{},alignItems:{},gap:{},backgroundColor:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},boxShadow:{}}}),n.e4,n.Ae)(i);customElements.define(d,a)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[17],{2552:(e,s,a)=>{a.r(s),a.d(s,{DatePicker:()=>t}),a(3054);var c=a(
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[17],{2552:(e,s,a)=>{a.r(s),a.d(s,{DatePicker:()=>t}),a(3054);var c=a(832);const p=(0,c.iY)("date-picker"),t=(0,c.qC)(c.e4,c.Ae)((0,c.DM)({componentName:p,slots:["prefix","suffix"],wrappedEleName:"vaadin-date-picker",style:""}));customElements.define(p,t)}}]);
|
@@ -0,0 +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 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[760],{689:(t,i,e)=>{e.r(i),e.d(i,{EmailField:()=>r}),e(9437);var n=e(
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[760],{689:(t,i,e)=>{e.r(i),e.d(i,{EmailField:()=>r}),e(9437);var n=e(832),a=e(4447);const l=(0,n.iY)("email-field");let d="";const o=(0,n.qC)((0,n.yk)({mappings:{...a.Z}}),n.e4,n.y7,n.Ae)((0,n.DM)({slots:["suffix"],wrappedEleName:"vaadin-email-field",style:()=>d,excludeAttrsSync:["tabindex"],componentName:l}));d=`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\tvaadin-email-field {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\tvaadin-email-field::part(input-field) {\n\t\toverflow: hidden;\n\t}\n\tvaadin-email-field[readonly] > input:placeholder-shown {\n\t\topacity: 1;\n\t}\n\tvaadin-email-field input:-webkit-autofill,\n\tvaadin-email-field input:-webkit-autofill::first-line,\n\tvaadin-email-field input:-webkit-autofill:hover,\n\tvaadin-email-field input:-webkit-autofill:active,\n\tvaadin-email-field input:-webkit-autofill:focus {\n\t\t-webkit-text-fill-color: var(${o.cssVarList.color});\n\t\tbox-shadow: 0 0 0 var(${o.cssVarList.height}) var(${o.cssVarList.backgroundColor}) inset;\n\t}\n\tvaadin-email-field > label,\n\tvaadin-email-field::part(input-field) {\n\t\tcursor: pointer;\n\t\tcolor: var(${o.cssVarList.color});\n\t}\n\tvaadin-email-field::part(input-field):focus {\n\t\tcursor: text;\n\t}\n\tvaadin-email-field[required]::part(required-indicator)::after {\n\t\tfont-size: "12px";\n\t\tcontent: "*";\n\t\tcolor: var(${o.cssVarList.color});\n\t}\n\tvaadin-email-field[readonly]::part(input-field)::after {\n\t\tborder: 0 solid;\n\t}\n`;const r=o;customElements.define(l,r)}}]);
|
@@ -0,0 +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 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[984],{4641:(t,e,n)=>{n.r(e),n.d(e,{Logo:()=>
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[984],{4641:(t,e,n)=>{n.r(e),n.d(e,{Logo:()=>r});var s=n(832),o=n(8522);const c=(0,s.iY)("logo");let l;class a extends o.V{static get componentName(){return c}constructor(){super();const t=document.createElement("template");t.innerHTML=`\n\t\t<style>\n\t\t\t${l}\n\t\t</style>\n\t\t<div></div>`,this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.baseSelector=":host > div"}}const i=(0,s.qC)((0,s.yk)({mappings:{height:{},width:{},url:{},fallbackUrl:{}}}),s.e4,s.Ae)(a);l=`\n:host {\n\tdisplay: inline-block;\n}\n:host > div {\n\tdisplay: inline-block;\n\tcontent: var(${i.cssVarList.url}, var(${i.cssVarList.fallbackUrl}));\n}\n`;const r=i;customElements.define(c,r)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[142],{4951:(t,n,e)=>{e.r(n),e.d(n,{NumberField:()=>o}),e(5806);var i=e(
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[142],{4951:(t,n,e)=>{e.r(n),e.d(n,{NumberField:()=>o}),e(5806);var i=e(832),a=e(4447);const r=(0,i.iY)("number-field");let l="";const d=(0,i.qC)((0,i.yk)({mappings:{...a.Z}}),i.e4,i.y7,i.Ae)((0,i.DM)({slots:["prefix","suffix"],wrappedEleName:"vaadin-number-field",style:()=>l,excludeAttrsSync:["tabindex"],componentName:r}));l=`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\tvaadin-number-field {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\tvaadin-number-field::part(input-field) {\n\t\toverflow: hidden;\n\t}\n\tvaadin-number-field[readonly] > input:placeholder-shown {\n\t\topacity: 1;\n\t}\n\tvaadin-number-field input:-webkit-autofill,\n\tvaadin-number-field input:-webkit-autofill::first-line,\n\tvaadin-number-field input:-webkit-autofill:hover,\n\tvaadin-number-field input:-webkit-autofill:active,\n\tvaadin-number-field input:-webkit-autofill:focus {\n\t\t-webkit-text-fill-color: var(${d.cssVarList.color});\n\t\tbox-shadow: 0 0 0 var(${d.cssVarList.height}) var(${d.cssVarList.backgroundColor}) inset;\n\t}\n\tvaadin-number-field > label,\n\tvaadin-number-field::part(input-field) {\n\t\tcursor: pointer;\n\t\tcolor: var(${d.cssVarList.color});\n\t}\n\tvaadin-number-field::part(input-field):focus {\n\t\tcursor: text;\n\t}\n\tvaadin-number-field[required]::part(required-indicator)::after {\n\t\tfont-size: "12px";\n\t\tcontent: "*";\n\t\tcolor: var(${d.cssVarList.color});\n\t}\n\tvaadin-number-field[readonly]::part(input-field)::after {\n\t\tborder: 0 solid;\n\t}\n`;const o=d;customElements.define(r,o)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[841],{7361:(t,e,i)=>{i.d(e,{f:()=>r,Z:()=>u});var s=i(
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[841],{7361:(t,e,i)=>{i.d(e,{f:()=>r,Z:()=>u});var s=i(832);const n=t=>{t?.focus(),t?.setSelectionRange(1,1)},r=(0,s.iY)("passcode-internal");class a extends HTMLElement{static get observedAttributes(){return["disabled","bordered","size"]}static get componentName(){return r}static get formAssociated(){return!0}#t;constructor(){super();const t=document.createElement("template"),e=[...Array(this.digits).keys()].map((t=>`\n\t\t<descope-text-field\n\t\t\tst-width="35px"\n\t\t\tdata-id=${t}\n\t\t\ttype="tel"\n\t\t\tautocomplete="none"\n\t\t></descope-text-field>\n\t`));t.innerHTML=`\n\t\t<div>\n\t\t\t${e.join("")}\n\t\t</div>\n\t\t`,this.appendChild(t.content.cloneNode(!0)),this.baseSelector=":host > div",this.#t=this.attachInternals(),this.inputs=Array.from(this.querySelectorAll("descope-text-field"))}checkValidity(){return this.#t.validity.valid?this.inputs.forEach((t=>t.removeAttribute("has-error-message"))):(this.inputs.forEach((t=>t.setAttribute("has-error-message","true"))),this.oninvalid?.()),this.#t.validity.valid}get digits(){return Number.parseInt(this.getAttribute("digits"))||6}get value(){return this.inputs.map((({value:t})=>t)).join("")}set value(t){}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get pattern(){return`^$|^\\d{${this.digits},}$`}get valueMissingErrMsg(){return"Please fill out this field."}get patternMismatchErrMsg(){return`Must be a ${this.digits} digits number.`}get validity(){return this.#t.validity}get validationMessage(){return this.#t.validationMessage}reportValidity(){this.#t.reportValidity()}formAssociatedCallback(){this.setValidity?.()}setValidity=()=>{this.isRequired&&!this.value?this.#t.setValidity({valueMissing:!0},this.valueMissingErrMsg):this.pattern&&!new RegExp(this.pattern).test(this.value)?this.#t.setValidity({patternMismatch:!0},this.patternMismatchErrMsg):this.#t.setValidity({})};async connectedCallback(){this.setValidity(),this.initInputs(),this.onfocus=()=>{this.inputs[0].focus()}}getInputIdx(t){return Number.parseInt(t.getAttribute("data-id"),10)}getNextInput(t){const e=this.getInputIdx(t),i=Math.min(e+1,this.inputs.length-1);return this.inputs[i]}getPrevInput(t){const e=this.getInputIdx(t),i=Math.max(e-1,0);return this.inputs[i]}fillDigits(t,e){for(let i=0;i<t.length;i+=1){e.value=t[i]??"";const s=this.getNextInput(e);if(s===e)break;e=s}!e.hasAttribute("focused")&&n(e)}initInputs(){this.inputs.forEach((t=>{t.addEventListener("blur",(()=>{const t=setTimeout((()=>{this.dispatchEvent(new Event("blur"))}));this.inputs.forEach((e=>e.addEventListener("focus",(()=>clearTimeout(t)),{once:!0})))})),t.oninput=e=>{const i=(t=>{const e=t.replace(/\s/g,"");return e.match(/^\d+$/)?[...e]:[]})(t.value);i.length?this.fillDigits(i,t):t.value="",this.setValidity()},t.onkeydown=({key:e})=>{if("Backspace"===e){t.value="";const e=this.getPrevInput(t);!e.hasAttribute("focused")&&setTimeout((()=>{n(e)}))}else e.match(/^(\d)$/g)&&(t.value="");this.setValidity()}}))}attributeChangedCallback(t,e,i){e!==i&&a.observedAttributes.includes(t)&&this.inputs.forEach((e=>e.setAttribute(t,i)))}}const u=a},4775:(t,e,i)=>{i.r(e);var s=i(7361);customElements.define(s.f,s.Z)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[939],{7102:(t,e,n)=>{n.r(e);var i=n(
|
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 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[320],{1721:(t,n,a)=>{a.r(n),a.d(n,{PasswordField:()=>d}),a(7056);var i=a(
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[320],{1721:(t,n,a)=>{a.r(n),a.d(n,{PasswordField:()=>d}),a(7056);var i=a(832),e=a(4447);const s=(0,i.iY)("password-field");let r="";const o=(0,i.qC)((0,i.yk)({mappings:{...e.Z,revealCursor:[{selector:"::part(reveal-button)::before",property:"cursor"}]}}),i.e4,i.y7,i.Ae)((0,i.DM)({slots:["suffix"],wrappedEleName:"vaadin-password-field",style:()=>r,excludeAttrsSync:["tabindex"],componentName:s}));r=`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\tvaadin-password-field {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\tvaadin-password-field::part(input-field) {\n\t\toverflow: hidden;\n\t}\n\tvaadin-password-field[readonly] > input:placeholder-shown {\n\t\topacity: 1;\n\t}\n\tvaadin-password-field input:-webkit-autofill,\n\tvaadin-password-field input:-webkit-autofill::first-line,\n\tvaadin-password-field input:-webkit-autofill:hover,\n\tvaadin-password-field input:-webkit-autofill:active,\n\tvaadin-password-field input:-webkit-autofill:focus {\n\t\t-webkit-text-fill-color: var(${o.cssVarList.color});\n\t\tbox-shadow: 0 0 0 var(${o.cssVarList.height}) var(${o.cssVarList.backgroundColor}) inset;\n\t}\n\tvaadin-password-field > label,\n\tvaadin-password-field::part(input-field) {\n\t\tcursor: pointer;\n\t\tcolor: var(${o.cssVarList.color});\n\t}\n\tvaadin-password-field::part(input-field):focus {\n\t\tcursor: text;\n\t}\n\tvaadin-password-field[required]::part(required-indicator)::after {\n\t\tfont-size: "12px";\n\t\tcontent: "*";\n\t\tcolor: var(${o.cssVarList.color});\n\t}\n\tvaadin-password-field[readonly]::part(input-field)::after {\n\t\tborder: 0 solid;\n\t}\n`;const d=o;customElements.define(s,d)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[739],{3774:(t,n,e)=>{e.r(n),e.d(n,{SwitchToggle:()=>l}),e(9515);var a=e(
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[739],{3774:(t,n,e)=>{e.r(n),e.d(n,{SwitchToggle:()=>l}),e(9515);var a=e(832),i=e(3535);const r=(0,a.iY)("switch-toggle");let o="";const c=(0,a.qC)((0,a.yk)({mappings:{width:(0,i.zy)(),cursor:[{},{selector:"> label"}]}}),a.e4,a.y7,a.Ae)((0,a.DM)({slots:[],wrappedEleName:"vaadin-checkbox",style:()=>o,excludeAttrsSync:["tabindex"],componentName:r}));o=`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\t\n\t:host {\n\t\t--margin: 7px;\n\t\t--width: var(${c.cssVarList.width});\n\t\t--height: calc(var(--width) / 2);\n\t\t--radius: var(--height);\n\t\t--knobSize: calc(var(--height) - 5px);\n\t\t--bgColor: #fff;\n\t\t--knobBgColor: #000;\n\t}\n\tvaadin-checkbox>label {\n\t\tcursor: pointer;\n\t\tborder: 1px solid;\n\t\ttext-indent: -99999px;\n\t\tdisplay: block;\n\t\tposition: relative;\t\t\t\n\t\twidth: var(--width);\n\t\theight: var(--height);\n\t\tbackground: var(--bgColor);\n\t\tborder-radius: var(--radius);\n\t}\n\tvaadin-checkbox>label::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\ttransition: 0.3s;\n\t\ttop: var(--margin);\n\t\tleft: var(--margin);\n\t\twidth: var(--knobSize);\n\t\theight: var(--knobSize);\n\t\tbackground: var(--knobBgColor);\n\t\tborder-radius: var(--knobSize);\n\t}\n\tvaadin-checkbox::part(checkbox) {\n\t\theight: 0;\n\t\twidth: 0;\n\t\tvisibility: hidden;\n\t}\n\tvaadin-checkbox[checked]>label::after {\n\t\ttransform: translateX(-100%);\n\t\tleft: calc(100% - var(--margin));\n\t}\n\tvaadin-checkbox[active]>label::after {\n\t\twidth: calc(var(--knobSize) + 15px);\n\t}\n`;const l=c;customElements.define(r,l)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[322],{178:(t,e,r)=>{r.r(e),r.d(e,{TextArea:()=>c}),r(7101);var n=r(
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[322],{178:(t,e,r)=>{r.r(e),r.d(e,{TextArea:()=>c}),r(7101);var n=r(832),a=r(3535);const o=(0,n.iY)("text-area"),s="::part(input-field)";let l="";const i=(0,n.qC)((0,n.yk)({mappings:{resize:{selector:"> textarea"},color:{selector:"::part(label)"},cursor:{},width:(0,a.zy)(),backgroundColor:{selector:s},borderWidth:{selector:s},borderStyle:{selector:s},borderColor:{selector:s},borderRadius:{selector:s},outline:{selector:s},outlineOffset:{selector:s}}}),n.e4,n.y7,n.Ae)((0,n.DM)({slots:[],wrappedEleName:"vaadin-text-area",style:()=>l,excludeAttrsSync:["tabindex"],componentName:o}));l='\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\n\tvaadin-text-area {\n\t\tmargin: 0;\n\t}\n\tvaadin-text-area > label,\n\tvaadin-text-area::part(input-field) {\n\t\tcursor: pointer;\n\t}\n\tvaadin-text-area[focused]::part(input-field) {\n\t\tcursor: text;\n\t}\n\tvaadin-text-area::part(required-indicator)::after {\n\t\tfont-size: "12px";\n\t\tcontent: "*";\n\t}\t\n';const c=i;customElements.define(o,c)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[934],{9063:(t,e,n)=>{n.d(e,{Z:()=>r,f:()=>l});var i=n(
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[934],{9063:(t,e,n)=>{n.d(e,{Z:()=>r,f:()=>l});var i=n(832),a=n(4447);const l=(0,i.iY)("text-field");let d="";const o=(0,i.qC)((0,i.yk)({mappings:a.Z}),i.e4,i.y7,i.Ae)((0,i.DM)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>d,excludeAttrsSync:["tabindex"],componentName:l}));d=`\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\tvaadin-text-field input:-webkit-autofill,\n\tvaadin-text-field input:-webkit-autofill::first-line,\n\tvaadin-text-field input:-webkit-autofill:hover,\n\tvaadin-text-field input:-webkit-autofill:active,\n\tvaadin-text-field input:-webkit-autofill:focus {\n\t\t-webkit-text-fill-color: var(${o.cssVarList.color});\n\t\tbox-shadow: 0 0 0 var(${o.cssVarList.height}) var(${o.cssVarList.backgroundColor}) inset;\n\t}\n\tvaadin-text-field > label,\n\tvaadin-text-field::part(input-field) {\n\t\tcursor: pointer;\n\t\tcolor: var(${o.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(${o.cssVarList.color});\n\t}\n\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\tborder: 0 solid;\n\t}\n`;const r=o},9357:(t,e,n)=>{n.r(e),n.d(e,{TextField:()=>i.Z}),n(9789);var i=n(9063);customElements.define(i.f,i.Z)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[528],{
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[528],{8801:(e,t,o)=>{o.d(t,{Z:()=>l,f:()=>c});var n=o(832),s=o(3535),r=o(8522);const c=(0,n.iY)("text");class a extends r.V{static get componentName(){return c}constructor(){super();const e=document.createElement("template");e.innerHTML="<slot></slot>",this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(e.content.cloneNode(!0)),this.baseSelector=":host > slot"}}const l=(0,n.qC)((0,n.yk)({mappings:{fontFamily:{},lineHeight:{},fontStyle:{},fontSize:{},fontWeight:{},width:{},color:{},letterSpacing:{},textShadow:{},borderWidth:{},borderStyle:{},borderColor:{},textTransform:{},textAlign:(0,s.zy)(),display:(0,s.zy)()}}),n.e4,n.Ae)(a)},1876:(e,t,o)=>{o.r(t),o.d(t,{Text:()=>n.Z});var n=o(8801);customElements.define(n.f,n.Z)}}]);
|
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,
|
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)})()));
|
package/package.json
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
export class DescopeBaseClass extends HTMLElement {}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { getComponentName } from '../../componentsHelpers';
|
2
|
+
import { DescopeBaseClass } from '../DescopeBaseClass';
|
2
3
|
import '../descope-button';
|
3
4
|
import '../descope-text-field';
|
4
5
|
|
@@ -11,7 +12,7 @@ template.innerHTML = `
|
|
11
12
|
<descope-text-field></descope-text-field>
|
12
13
|
`;
|
13
14
|
|
14
|
-
class Combo extends
|
15
|
+
class Combo extends DescopeBaseClass {
|
15
16
|
constructor() {
|
16
17
|
super();
|
17
18
|
|
@@ -5,17 +5,26 @@ import {
|
|
5
5
|
compose,
|
6
6
|
componentNameValidationMixin
|
7
7
|
} from '../../componentsHelpers';
|
8
|
+
import { matchHostStyle } from '../../componentsHelpers/createStyleMixin/helpers';
|
9
|
+
import { DescopeBaseClass } from '../DescopeBaseClass';
|
8
10
|
|
9
11
|
export const componentName = getComponentName('container');
|
10
12
|
|
11
|
-
class RawContainer extends
|
13
|
+
class RawContainer extends DescopeBaseClass {
|
12
14
|
static get componentName() {
|
13
15
|
return componentName;
|
14
16
|
}
|
15
17
|
constructor() {
|
16
18
|
super();
|
17
19
|
const template = document.createElement('template');
|
18
|
-
template.innerHTML =
|
20
|
+
template.innerHTML = `
|
21
|
+
<style>
|
22
|
+
:host > slot {
|
23
|
+
box-sizing: border-box;
|
24
|
+
}
|
25
|
+
</style>
|
26
|
+
<slot></slot>
|
27
|
+
`;
|
19
28
|
|
20
29
|
this.attachShadow({ mode: 'open' });
|
21
30
|
this.shadowRoot.appendChild(template.content.cloneNode(true));
|
@@ -26,10 +35,9 @@ class RawContainer extends HTMLElement {
|
|
26
35
|
|
27
36
|
const Container = compose(
|
28
37
|
createStyleMixin({
|
29
|
-
// todo: do we want to change the mapping structure to this? ['aa', 'aaa', {'color': [{ selector: '::part(label)' }]}],
|
30
38
|
mappings: {
|
31
|
-
height:
|
32
|
-
width:
|
39
|
+
height: matchHostStyle(),
|
40
|
+
width: matchHostStyle(),
|
33
41
|
|
34
42
|
verticalPadding: [
|
35
43
|
{ property: 'padding-top' },
|
@@ -0,0 +1,85 @@
|
|
1
|
+
import {
|
2
|
+
getComponentName,
|
3
|
+
createStyleMixin,
|
4
|
+
draggableMixin,
|
5
|
+
compose,
|
6
|
+
componentNameValidationMixin
|
7
|
+
} from '../../componentsHelpers';
|
8
|
+
import { enforceNestingElementsStylesMixin } from '../../componentsHelpers/enforceNestingElementsStylesMixin';
|
9
|
+
import { matchHostStyle } from '../../componentsHelpers/createStyleMixin/helpers';
|
10
|
+
import { DescopeBaseClass } from '../DescopeBaseClass';
|
11
|
+
|
12
|
+
export const componentName = getComponentName('divider');
|
13
|
+
class RawDivider 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
|
+
:host > div {
|
23
|
+
display: flex;
|
24
|
+
height: 100%;
|
25
|
+
}
|
26
|
+
:host > div::before,
|
27
|
+
:host > div::after {
|
28
|
+
content: '';
|
29
|
+
flex-grow: 1;
|
30
|
+
width: 100%;
|
31
|
+
}
|
32
|
+
::slotted(*) {
|
33
|
+
flex-grow: 0;
|
34
|
+
flex-shrink: 0;
|
35
|
+
}
|
36
|
+
</style>
|
37
|
+
<div>
|
38
|
+
<slot></slot>
|
39
|
+
<slot name="text"></slot>
|
40
|
+
</div>
|
41
|
+
`;
|
42
|
+
this.attachShadow({ mode: 'open' });
|
43
|
+
this.shadowRoot.appendChild(template.content.cloneNode(true));
|
44
|
+
|
45
|
+
this.baseSelector = ':host > div';
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
const selectors = {
|
50
|
+
root: { selector: '' },
|
51
|
+
before: { selector: '::before' },
|
52
|
+
after: { selector: '::after' },
|
53
|
+
slotted: { selector: () => '::slotted(*)' }
|
54
|
+
};
|
55
|
+
|
56
|
+
const { root, before, after, slotted } = selectors;
|
57
|
+
|
58
|
+
const Divider = compose(
|
59
|
+
enforceNestingElementsStylesMixin({
|
60
|
+
nestingElementTagName: 'descope-text',
|
61
|
+
nestingElementDestSlotName: 'text',
|
62
|
+
forwardAttrOptions: {
|
63
|
+
includeAttrs: ['mode', 'variant'],
|
64
|
+
excludeAttrs: []
|
65
|
+
}
|
66
|
+
}),
|
67
|
+
createStyleMixin({
|
68
|
+
mappings: {
|
69
|
+
minHeight: root,
|
70
|
+
alignItems: root,
|
71
|
+
alignSelf: root,
|
72
|
+
flexDirection: root,
|
73
|
+
padding: slotted,
|
74
|
+
width: matchHostStyle(),
|
75
|
+
height: [before, after],
|
76
|
+
backgroundColor: [before, after],
|
77
|
+
opacity: [before, after],
|
78
|
+
textWidth: { ...slotted, property: 'width' }
|
79
|
+
}
|
80
|
+
}),
|
81
|
+
draggableMixin,
|
82
|
+
componentNameValidationMixin
|
83
|
+
)(RawDivider);
|
84
|
+
|
85
|
+
export default Divider;
|
@@ -0,0 +1,90 @@
|
|
1
|
+
import {
|
2
|
+
getComponentName,
|
3
|
+
createStyleMixin,
|
4
|
+
draggableMixin,
|
5
|
+
compose,
|
6
|
+
componentNameValidationMixin
|
7
|
+
} from '../../componentsHelpers';
|
8
|
+
import { forwardAttrs } from '../../componentsHelpers/createProxy/helpers';
|
9
|
+
import { matchHostStyle } from '../../componentsHelpers/createStyleMixin/helpers';
|
10
|
+
import { enforceNestingElementsStylesMixin } from '../../componentsHelpers/enforceNestingElementsStylesMixin';
|
11
|
+
import { hoverableMixin } from '../../componentsHelpers/hoverableMixin';
|
12
|
+
import { DescopeBaseClass } from '../DescopeBaseClass';
|
13
|
+
import Text from '../descope-text/Text';
|
14
|
+
|
15
|
+
export const componentName = getComponentName('link');
|
16
|
+
class RawLink extends DescopeBaseClass {
|
17
|
+
static get componentName() {
|
18
|
+
return componentName;
|
19
|
+
}
|
20
|
+
constructor() {
|
21
|
+
super();
|
22
|
+
const template = document.createElement('template');
|
23
|
+
|
24
|
+
template.innerHTML = `
|
25
|
+
<style>
|
26
|
+
:host {
|
27
|
+
display: inline-block;
|
28
|
+
}
|
29
|
+
:host a {
|
30
|
+
display: inline-block;
|
31
|
+
}
|
32
|
+
</style>
|
33
|
+
<div>
|
34
|
+
<a>
|
35
|
+
<slot name="text"></slot>
|
36
|
+
</a>
|
37
|
+
</div>
|
38
|
+
`;
|
39
|
+
|
40
|
+
this.attachShadow({ mode: 'open' });
|
41
|
+
this.shadowRoot.appendChild(template.content.cloneNode(true));
|
42
|
+
|
43
|
+
forwardAttrs(this.shadowRoot.host, this.shadowRoot.querySelector('a'), {
|
44
|
+
includeAttrs: ['href', 'target', 'tooltip'],
|
45
|
+
mapAttrs: {
|
46
|
+
tooltip: 'title'
|
47
|
+
}
|
48
|
+
});
|
49
|
+
|
50
|
+
this.baseSelector = ':host > div';
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
const selectors = {
|
55
|
+
anchor: { selector: '> a' }
|
56
|
+
};
|
57
|
+
|
58
|
+
const { anchor } = selectors;
|
59
|
+
|
60
|
+
const Link = compose(
|
61
|
+
enforceNestingElementsStylesMixin({
|
62
|
+
nestingElementTagName: 'descope-text',
|
63
|
+
nestingElementDestSlotName: 'text',
|
64
|
+
forwardAttrOptions: {
|
65
|
+
includeAttrs: ['variant', 'italic', 'uppercase', 'lowercase']
|
66
|
+
}
|
67
|
+
}),
|
68
|
+
createStyleMixin({
|
69
|
+
mappings: {
|
70
|
+
width: matchHostStyle(),
|
71
|
+
textAlign: {},
|
72
|
+
color: anchor,
|
73
|
+
cursor: anchor,
|
74
|
+
borderBottomWidth: anchor,
|
75
|
+
borderBottomStyle: anchor,
|
76
|
+
borderBottomColor: anchor
|
77
|
+
},
|
78
|
+
nestedMappings: {
|
79
|
+
color: {
|
80
|
+
selector: ` ${Text.componentName}`,
|
81
|
+
property: Text.cssVarList.color
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}),
|
85
|
+
hoverableMixin(anchor.selector),
|
86
|
+
draggableMixin,
|
87
|
+
componentNameValidationMixin
|
88
|
+
)(RawLink);
|
89
|
+
|
90
|
+
export default Link;
|
@@ -5,13 +5,14 @@ import {
|
|
5
5
|
compose,
|
6
6
|
componentNameValidationMixin
|
7
7
|
} from '../../componentsHelpers';
|
8
|
+
import { DescopeBaseClass } from '../DescopeBaseClass';
|
8
9
|
|
9
10
|
export const componentName = getComponentName('logo');
|
10
11
|
|
11
|
-
let style
|
12
|
+
let style;
|
12
13
|
const getStyle = () => style;
|
13
14
|
|
14
|
-
class RawLogo extends
|
15
|
+
class RawLogo extends DescopeBaseClass {
|
15
16
|
static get componentName() {
|
16
17
|
return componentName;
|
17
18
|
}
|
@@ -37,7 +38,7 @@ const Logo = compose(
|
|
37
38
|
height: {},
|
38
39
|
width: {},
|
39
40
|
url: {},
|
40
|
-
fallbackUrl: {}
|
41
|
+
fallbackUrl: {}
|
41
42
|
}
|
42
43
|
}),
|
43
44
|
draggableMixin,
|
@@ -52,6 +53,6 @@ style = `
|
|
52
53
|
display: inline-block;
|
53
54
|
content: var(${Logo.cssVarList.url}, var(${Logo.cssVarList.fallbackUrl}));
|
54
55
|
}
|
55
|
-
|
56
|
+
`;
|
56
57
|
|
57
58
|
export default Logo;
|
@@ -6,10 +6,11 @@ import {
|
|
6
6
|
componentNameValidationMixin
|
7
7
|
} from '../../componentsHelpers';
|
8
8
|
import { matchHostStyle } from '../../componentsHelpers/createStyleMixin/helpers';
|
9
|
+
import { DescopeBaseClass } from '../DescopeBaseClass';
|
9
10
|
|
10
11
|
export const componentName = getComponentName('text');
|
11
12
|
|
12
|
-
class RawText extends
|
13
|
+
class RawText extends DescopeBaseClass {
|
13
14
|
static get componentName() {
|
14
15
|
return componentName;
|
15
16
|
}
|
@@ -35,6 +36,12 @@ const Text = compose(
|
|
35
36
|
fontWeight: {},
|
36
37
|
width: {},
|
37
38
|
color: {},
|
39
|
+
letterSpacing: {},
|
40
|
+
textShadow: {},
|
41
|
+
borderWidth: {},
|
42
|
+
borderStyle: {},
|
43
|
+
borderColor: {},
|
44
|
+
textTransform: {},
|
38
45
|
textAlign: matchHostStyle(),
|
39
46
|
display: matchHostStyle()
|
40
47
|
}
|