@descope/web-components-ui 1.0.294 → 1.0.295

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,73 @@
1
+ /*! For license information please see 1735.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1735,7911],{48:(t,e,i)=>{i.d(e,{Pe:()=>h,kO:()=>_,jq:()=>u,KE:()=>g});var s=i(9392),n=i(6977);const o=t=>(...e)=>({_$litDirective$:t,values:e});class r{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}var a=i(3692);class c extends r{constructor(t){if(super(t),this.et=a.Ld,2!==t.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===a.Ld||null==t)return this.vt=void 0,this.et=t;if(t===a.Jb)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}c.directiveName="unsafeHTML",c.resultType=1,o(c);class l extends c{}l.directiveName="unsafeSVG",l.resultType=2;const d=o(l);function h(t){let e=s.Ld;if(t){const i=t.cloneNode(!0);i.removeAttribute("id"),e=s.YP`${d(i.outerHTML)}`}return e}function _(t){let e=null==t||""===t?s.Ld:t;return function(t){return(0,n.hN)(t,n.VJ.SVG)||t===s.Ld}(e)||(console.error("[vaadin-icon] Invalid svg passed, please use Lit svg literal."),e=s.Ld),e}function u(t,e){const i=_(t);(0,s.sY)(i,e)}function g(t){return s.YP`${d(t)}`}},3529:(t,e,i)=>{i.d(e,{D:()=>_});var s=i(4241),n=i(2807),o=i(2521),r=i(48);const a={},c=new Set;function l(t,e){return(t||"").replace(`${e}:`,"")}function d(t){if(t)return t.split(":")[0]||"vaadin"}function h(t,e){t._icons=[...t.querySelectorAll("[id]")].reduce(((t,i)=>(t[l(i.id,e)]=i,t)),{})}class _ extends((0,o.S)(s.H3)){static get template(){return null}static get is(){return"vaadin-iconset"}static get properties(){return{name:{type:String,observer:"__nameChanged"},size:{type:Number,value:24}}}static get attachedIcons(){return c}static getIconset(t){return a[t]}static getIconSvg(t,e){const i=e||d(t),s=this.getIconset(i);if(!t||!s)return{svg:(0,r.Pe)(null)};const n=l(t,i),o=s._icons[n];return{preserveAspectRatio:o?o.getAttribute("preserveAspectRatio"):null,svg:(0,r.Pe)(o),size:s.size,viewBox:o?o.getAttribute("viewBox"):null}}static register(t,e,i){if(!a[t]){const s=document.createElement("vaadin-iconset");s.appendChild(i.content.cloneNode(!0)),a[t]=s,h(s,t),s.size=e,s.name=t,s.__nameChanged(t)}}connectedCallback(){super.connectedCallback(),this.style.display="none";const{name:t}=this;a[t]=this,h(this,t),this.__updateIcons(t)}__updateIcons(t){c.forEach((e=>{t===d(e.icon)&&e._applyIcon()}))}__nameChanged(t,e){e&&(a[t]=a[e],delete a[e]),t&&this.__updateIcons(t)}}(0,n.M)(_)},7911:(t,e,i)=>{i(9098);var s=i(6570);(0,s.hC)("vaadin-icon",s.iv`
3
+ :host {
4
+ width: var(--lumo-icon-size-m);
5
+ height: var(--lumo-icon-size-m);
6
+ }
7
+ `,{moduleId:"lumo-icon"});var n=i(4241),o=i(6155),r=i(2807),a=i(2521),c=i(4946),l=i(4463),d=i(1014),h=i(9680),_=i(1037);const u=!CSS.supports("container-type: inline-size")||!!_.G6&&!function(){const t=document.createElement("style");t.textContent="\n .vaadin-icon-test-element {\n container-type: size;\n height: 2px;\n visibility: hidden;\n position: fixed;\n }\n\n .vaadin-icon-test-element::before {\n content: '';\n display: block;\n height: 100cqh;\n ";const e=document.createElement("div");e.classList.add("vaadin-icon-test-element"),document.body.append(t,e);const{height:i}=getComputedStyle(e,"::before");return t.remove(),e.remove(),"2px"===i}();u&&(0,s.hC)("vaadin-icon",s.iv`
8
+ :host::after,
9
+ :host::before {
10
+ font-size: var(--_vaadin-font-icon-size);
11
+ }
12
+ `,"vaadin-icon-font-size-mixin-styles");const g=(0,d.o)((t=>u?class extends((0,h.F)(t)){static get observers(){return["__iconFontSizeMixinfontChanged(iconClass, char, ligature)"]}ready(){super.ready(),this.__updateFontIconSize()}__iconFontSizeMixinfontChanged(t,e,i){this.__updateFontIconSize()}_onResize(){this.__updateFontIconSize()}__updateFontIconSize(){if(this.char||this.iconClass||this.ligature){const{paddingTop:t,paddingBottom:e,height:i}=getComputedStyle(this),s=parseFloat(i)-parseFloat(t)-parseFloat(e);this.style.setProperty("--_vaadin-font-icon-size",`${s}px`)}}}:t));var p=i(48),v=i(3529);const f=new Map;class m extends((0,s.Tb)((0,a.S)((0,o.k)((0,c.W)(g(n.H3)))))){static get template(){return n.dy`
13
+ <style>
14
+ :host {
15
+ display: inline-flex;
16
+ justify-content: center;
17
+ align-items: center;
18
+ box-sizing: border-box;
19
+ vertical-align: middle;
20
+ width: 24px;
21
+ height: 24px;
22
+ fill: currentColor;
23
+ container-type: size;
24
+ }
25
+
26
+ :host::after,
27
+ :host::before {
28
+ line-height: 1;
29
+ font-size: 100cqh;
30
+ -webkit-font-smoothing: antialiased;
31
+ text-rendering: optimizeLegibility;
32
+ -moz-osx-font-smoothing: grayscale;
33
+ }
34
+
35
+ :host([hidden]) {
36
+ display: none !important;
37
+ }
38
+
39
+ svg {
40
+ display: block;
41
+ width: 100%;
42
+ height: 100%;
43
+ }
44
+
45
+ :host(:is([icon-class], [font-icon-content])) svg {
46
+ display: none;
47
+ }
48
+
49
+ :host([font-icon-content])::before {
50
+ content: attr(font-icon-content);
51
+ }
52
+ </style>
53
+ <svg
54
+ version="1.1"
55
+ xmlns="http://www.w3.org/2000/svg"
56
+ xmlns:xlink="http://www.w3.org/1999/xlink"
57
+ viewBox="[[__computeViewBox(size, __viewBox)]]"
58
+ preserveAspectRatio="[[__computePAR(__defaultPAR, __preserveAspectRatio)]]"
59
+ fill$="[[__fill]]"
60
+ stroke$="[[__stroke]]"
61
+ stroke-width$="[[__strokeWidth]]"
62
+ stroke-linecap$="[[__strokeLinecap]]"
63
+ stroke-linejoin$="[[__strokeLinejoin]]"
64
+ aria-hidden="true"
65
+ >
66
+ <g id="svg-group"></g>
67
+ <g id="use-group" visibility$="[[__computeVisibility(__useRef, svg)]]">
68
+ <use href$="[[__useRef]]" />
69
+ </g>
70
+ </svg>
71
+
72
+ <slot name="tooltip"></slot>
73
+ `}static get is(){return"vaadin-icon"}static get properties(){return{icon:{type:String,reflectToAttribute:!0,observer:"__iconChanged"},svg:{type:Object},src:{type:String},symbol:{type:String},iconClass:{type:String,reflectToAttribute:!0},char:{type:String},ligature:{type:String},fontFamily:{type:String,observer:"__fontFamilyChanged"},size:{type:Number,value:24},__defaultPAR:{type:String,value:"xMidYMid meet"},__preserveAspectRatio:String,__useRef:Object,__svgElement:String,__viewBox:String,__fill:String,__stroke:String,__strokeWidth:String,__strokeLinecap:String,__strokeLinejoin:String}}static get observers(){return["__svgChanged(svg, __svgElement)","__fontChanged(iconClass, char, ligature)","__srcChanged(src, symbol)"]}static get observedAttributes(){return[...super.observedAttributes,"class"]}constructor(){super(),this.__fetch=fetch.bind(window)}get slotStyles(){return[`\n ${this.localName}[icon-class] {\n display: inline-flex;\n vertical-align: middle;\n font-size: inherit;\n }\n `]}get __iconClasses(){return this.iconClass?this.iconClass.split(" "):[]}ready(){super.ready(),this.__svgElement=this.shadowRoot.querySelector("#svg-group"),this._tooltipController=new l.f(this),this.addController(this._tooltipController)}connectedCallback(){super.connectedCallback(),v.D.attachedIcons.add(this)}disconnectedCallback(){super.disconnectedCallback(),v.D.attachedIcons.delete(this)}_applyIcon(){const{preserveAspectRatio:t,svg:e,size:i,viewBox:s}=v.D.getIconSvg(this.icon);s&&(this.__viewBox=s),t&&(this.__preserveAspectRatio=t),i&&i!==this.size&&(this.size=i),this.svg=e}__iconChanged(t){t?this._applyIcon():this.svg=(0,p.kO)(null)}async __srcChanged(t,e){if(t)if(this.icon="",t.startsWith("data:")||!e&&!t.includes("#"))try{f.has(t)||f.set(t,this.__fetch(t,{mode:"cors"}).then((t=>{if(!t.ok)throw new Error("Error loading icon");return t.text()})));const i=await f.get(t);m.__domParser||(m.__domParser=new DOMParser);const s=m.__domParser.parseFromString(i,"text/html").querySelector("svg");if(!s)throw new Error(`SVG element not found on path: ${t}`);this.svg=(0,p.KE)(s.innerHTML),e&&(this.__useRef=`#${e}`),this.__viewBox=s.getAttribute("viewBox"),this.__fill=s.getAttribute("fill"),this.__stroke=s.getAttribute("stroke"),this.__strokeWidth=s.getAttribute("stroke-width"),this.__strokeLinecap=s.getAttribute("stroke-linecap"),this.__strokeLinejoin=s.getAttribute("stroke-linejoin")}catch(t){console.error(t),this.svg=null}else{const[i,s]=t.split("#");this.__useRef=`${i}#${e||s}`}else this.svg=null}__svgChanged(t,e){e&&(0,p.jq)(t,e)}__computePAR(t,e){return e||t}__computeVisibility(t){return t?"visible":"hidden"}__computeViewBox(t,e){return e||`0 0 ${t} ${t}`}__fontChanged(t,e,i){this.classList.remove(...this.__addedIconClasses||[]),t&&(this.__addedIconClasses=[...this.__iconClasses],this.classList.add(...this.__addedIconClasses)),e?this.setAttribute("font-icon-content",e.length>1?String.fromCodePoint(parseInt(e,16)):e):i?this.setAttribute("font-icon-content",i):this.removeAttribute("font-icon-content"),(t||e||i)&&!this.icon&&(this.icon="")}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),"class"===t&&this.__iconClasses.some((t=>!this.classList.contains(t)))&&this.classList.add(...this.__iconClasses)}__fontFamilyChanged(t){this.style.fontFamily=`'${t}'`}}(0,r.M)(m)}}]);
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2016 - 2023 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+
7
+ /**
8
+ * @license
9
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
10
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
11
+ */
12
+
13
+ /**
14
+ * @license
15
+ * Copyright 2017 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
17
+ */
package/dist/umd/2106.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see 2106.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[2106,7911],{48:(h,v,a)=>{a.d(v,{Pe:()=>n,kO:()=>s,jq:()=>g,KE:()=>e});var t=a(9392),p=a(6977);const d=h=>(...v)=>({_$litDirective$:h,values:v});class c{constructor(h){}get _$AU(){return this._$AM._$AU}_$AT(h,v,a){this._$Ct=h,this._$AM=v,this._$Ci=a}_$AS(h,v){return this.update(h,v)}update(h,v){return this.render(...v)}}var z=a(3692);class M extends c{constructor(h){if(super(h),this.et=z.Ld,2!==h.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(h){if(h===z.Ld||null==h)return this.vt=void 0,this.et=h;if(h===z.Jb)return h;if("string"!=typeof h)throw Error(this.constructor.directiveName+"() called with a non-string value");if(h===this.et)return this.vt;this.et=h;const v=[h];return v.raw=v,this.vt={_$litType$:this.constructor.resultType,strings:v,values:[]}}}M.directiveName="unsafeHTML",M.resultType=1,d(M);class l extends M{}l.directiveName="unsafeSVG",l.resultType=2;const i=d(l);function n(h){let v=t.Ld;if(h){const a=h.cloneNode(!0);a.removeAttribute("id"),v=t.YP`${i(a.outerHTML)}`}return v}function s(h){let v=null==h||""===h?t.Ld:h;return function(h){return(0,p.hN)(h,p.VJ.SVG)||h===t.Ld}(v)||(console.error("[vaadin-icon] Invalid svg passed, please use Lit svg literal."),v=t.Ld),v}function g(h,v){const a=s(h);(0,t.sY)(a,v)}function e(h){return t.YP`${i(h)}`}},3529:(h,v,a)=>{a.d(v,{D:()=>s});var t=a(4241),p=a(2807),d=a(2521),c=a(48);const z={},M=new Set;function l(h,v){return(h||"").replace(`${v}:`,"")}function i(h){if(h)return h.split(":")[0]||"vaadin"}function n(h,v){h._icons=[...h.querySelectorAll("[id]")].reduce(((h,a)=>(h[l(a.id,v)]=a,h)),{})}class s extends((0,d.S)(t.H3)){static get template(){return null}static get is(){return"vaadin-iconset"}static get properties(){return{name:{type:String,observer:"__nameChanged"},size:{type:Number,value:24}}}static get attachedIcons(){return M}static getIconset(h){return z[h]}static getIconSvg(h,v){const a=v||i(h),t=this.getIconset(a);if(!h||!t)return{svg:(0,c.Pe)(null)};const p=l(h,a),d=t._icons[p];return{preserveAspectRatio:d?d.getAttribute("preserveAspectRatio"):null,svg:(0,c.Pe)(d),size:t.size,viewBox:d?d.getAttribute("viewBox"):null}}static register(h,v,a){if(!z[h]){const t=document.createElement("vaadin-iconset");t.appendChild(a.content.cloneNode(!0)),z[h]=t,n(t,h),t.size=v,t.name=h,t.__nameChanged(h)}}connectedCallback(){super.connectedCallback(),this.style.display="none";const{name:h}=this;z[h]=this,n(this,h),this.__updateIcons(h)}__updateIcons(h){M.forEach((v=>{h===i(v.icon)&&v._applyIcon()}))}__nameChanged(h,v){v&&(z[h]=z[v],delete z[v]),h&&this.__updateIcons(h)}}(0,p.M)(s)},7911:(h,v,a)=>{a(9098);var t=a(6570);(0,t.hC)("vaadin-icon",t.iv`
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[2106,7911,1735],{48:(h,v,a)=>{a.d(v,{Pe:()=>n,kO:()=>s,jq:()=>g,KE:()=>e});var t=a(9392),p=a(6977);const d=h=>(...v)=>({_$litDirective$:h,values:v});class c{constructor(h){}get _$AU(){return this._$AM._$AU}_$AT(h,v,a){this._$Ct=h,this._$AM=v,this._$Ci=a}_$AS(h,v){return this.update(h,v)}update(h,v){return this.render(...v)}}var z=a(3692);class M extends c{constructor(h){if(super(h),this.et=z.Ld,2!==h.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(h){if(h===z.Ld||null==h)return this.vt=void 0,this.et=h;if(h===z.Jb)return h;if("string"!=typeof h)throw Error(this.constructor.directiveName+"() called with a non-string value");if(h===this.et)return this.vt;this.et=h;const v=[h];return v.raw=v,this.vt={_$litType$:this.constructor.resultType,strings:v,values:[]}}}M.directiveName="unsafeHTML",M.resultType=1,d(M);class l extends M{}l.directiveName="unsafeSVG",l.resultType=2;const i=d(l);function n(h){let v=t.Ld;if(h){const a=h.cloneNode(!0);a.removeAttribute("id"),v=t.YP`${i(a.outerHTML)}`}return v}function s(h){let v=null==h||""===h?t.Ld:h;return function(h){return(0,p.hN)(h,p.VJ.SVG)||h===t.Ld}(v)||(console.error("[vaadin-icon] Invalid svg passed, please use Lit svg literal."),v=t.Ld),v}function g(h,v){const a=s(h);(0,t.sY)(a,v)}function e(h){return t.YP`${i(h)}`}},3529:(h,v,a)=>{a.d(v,{D:()=>s});var t=a(4241),p=a(2807),d=a(2521),c=a(48);const z={},M=new Set;function l(h,v){return(h||"").replace(`${v}:`,"")}function i(h){if(h)return h.split(":")[0]||"vaadin"}function n(h,v){h._icons=[...h.querySelectorAll("[id]")].reduce(((h,a)=>(h[l(a.id,v)]=a,h)),{})}class s extends((0,d.S)(t.H3)){static get template(){return null}static get is(){return"vaadin-iconset"}static get properties(){return{name:{type:String,observer:"__nameChanged"},size:{type:Number,value:24}}}static get attachedIcons(){return M}static getIconset(h){return z[h]}static getIconSvg(h,v){const a=v||i(h),t=this.getIconset(a);if(!h||!t)return{svg:(0,c.Pe)(null)};const p=l(h,a),d=t._icons[p];return{preserveAspectRatio:d?d.getAttribute("preserveAspectRatio"):null,svg:(0,c.Pe)(d),size:t.size,viewBox:d?d.getAttribute("viewBox"):null}}static register(h,v,a){if(!z[h]){const t=document.createElement("vaadin-iconset");t.appendChild(a.content.cloneNode(!0)),z[h]=t,n(t,h),t.size=v,t.name=h,t.__nameChanged(h)}}connectedCallback(){super.connectedCallback(),this.style.display="none";const{name:h}=this;z[h]=this,n(this,h),this.__updateIcons(h)}__updateIcons(h){M.forEach((v=>{h===i(v.icon)&&v._applyIcon()}))}__nameChanged(h,v){v&&(z[h]=z[v],delete z[v]),h&&this.__updateIcons(h)}}(0,p.M)(s)},7911:(h,v,a)=>{a(9098);var t=a(6570);(0,t.hC)("vaadin-icon",t.iv`
3
3
  :host {
4
4
  width: var(--lumo-icon-size-m);
5
5
  height: var(--lumo-icon-size-m);
package/dist/umd/7911.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see 7911.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[7911],{48:(t,e,i)=>{i.d(e,{Pe:()=>h,kO:()=>_,jq:()=>u,KE:()=>g});var s=i(9392),n=i(6977);const o=t=>(...e)=>({_$litDirective$:t,values:e});class r{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}var a=i(3692);class c extends r{constructor(t){if(super(t),this.et=a.Ld,2!==t.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===a.Ld||null==t)return this.vt=void 0,this.et=t;if(t===a.Jb)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}c.directiveName="unsafeHTML",c.resultType=1,o(c);class l extends c{}l.directiveName="unsafeSVG",l.resultType=2;const d=o(l);function h(t){let e=s.Ld;if(t){const i=t.cloneNode(!0);i.removeAttribute("id"),e=s.YP`${d(i.outerHTML)}`}return e}function _(t){let e=null==t||""===t?s.Ld:t;return function(t){return(0,n.hN)(t,n.VJ.SVG)||t===s.Ld}(e)||(console.error("[vaadin-icon] Invalid svg passed, please use Lit svg literal."),e=s.Ld),e}function u(t,e){const i=_(t);(0,s.sY)(i,e)}function g(t){return s.YP`${d(t)}`}},3529:(t,e,i)=>{i.d(e,{D:()=>_});var s=i(4241),n=i(2807),o=i(2521),r=i(48);const a={},c=new Set;function l(t,e){return(t||"").replace(`${e}:`,"")}function d(t){if(t)return t.split(":")[0]||"vaadin"}function h(t,e){t._icons=[...t.querySelectorAll("[id]")].reduce(((t,i)=>(t[l(i.id,e)]=i,t)),{})}class _ extends((0,o.S)(s.H3)){static get template(){return null}static get is(){return"vaadin-iconset"}static get properties(){return{name:{type:String,observer:"__nameChanged"},size:{type:Number,value:24}}}static get attachedIcons(){return c}static getIconset(t){return a[t]}static getIconSvg(t,e){const i=e||d(t),s=this.getIconset(i);if(!t||!s)return{svg:(0,r.Pe)(null)};const n=l(t,i),o=s._icons[n];return{preserveAspectRatio:o?o.getAttribute("preserveAspectRatio"):null,svg:(0,r.Pe)(o),size:s.size,viewBox:o?o.getAttribute("viewBox"):null}}static register(t,e,i){if(!a[t]){const s=document.createElement("vaadin-iconset");s.appendChild(i.content.cloneNode(!0)),a[t]=s,h(s,t),s.size=e,s.name=t,s.__nameChanged(t)}}connectedCallback(){super.connectedCallback(),this.style.display="none";const{name:t}=this;a[t]=this,h(this,t),this.__updateIcons(t)}__updateIcons(t){c.forEach((e=>{t===d(e.icon)&&e._applyIcon()}))}__nameChanged(t,e){e&&(a[t]=a[e],delete a[e]),t&&this.__updateIcons(t)}}(0,n.M)(_)},7911:(t,e,i)=>{i(9098);var s=i(6570);(0,s.hC)("vaadin-icon",s.iv`
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[7911,1735],{48:(t,e,i)=>{i.d(e,{Pe:()=>h,kO:()=>_,jq:()=>u,KE:()=>g});var s=i(9392),n=i(6977);const o=t=>(...e)=>({_$litDirective$:t,values:e});class r{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}var a=i(3692);class c extends r{constructor(t){if(super(t),this.et=a.Ld,2!==t.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===a.Ld||null==t)return this.vt=void 0,this.et=t;if(t===a.Jb)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}c.directiveName="unsafeHTML",c.resultType=1,o(c);class l extends c{}l.directiveName="unsafeSVG",l.resultType=2;const d=o(l);function h(t){let e=s.Ld;if(t){const i=t.cloneNode(!0);i.removeAttribute("id"),e=s.YP`${d(i.outerHTML)}`}return e}function _(t){let e=null==t||""===t?s.Ld:t;return function(t){return(0,n.hN)(t,n.VJ.SVG)||t===s.Ld}(e)||(console.error("[vaadin-icon] Invalid svg passed, please use Lit svg literal."),e=s.Ld),e}function u(t,e){const i=_(t);(0,s.sY)(i,e)}function g(t){return s.YP`${d(t)}`}},3529:(t,e,i)=>{i.d(e,{D:()=>_});var s=i(4241),n=i(2807),o=i(2521),r=i(48);const a={},c=new Set;function l(t,e){return(t||"").replace(`${e}:`,"")}function d(t){if(t)return t.split(":")[0]||"vaadin"}function h(t,e){t._icons=[...t.querySelectorAll("[id]")].reduce(((t,i)=>(t[l(i.id,e)]=i,t)),{})}class _ extends((0,o.S)(s.H3)){static get template(){return null}static get is(){return"vaadin-iconset"}static get properties(){return{name:{type:String,observer:"__nameChanged"},size:{type:Number,value:24}}}static get attachedIcons(){return c}static getIconset(t){return a[t]}static getIconSvg(t,e){const i=e||d(t),s=this.getIconset(i);if(!t||!s)return{svg:(0,r.Pe)(null)};const n=l(t,i),o=s._icons[n];return{preserveAspectRatio:o?o.getAttribute("preserveAspectRatio"):null,svg:(0,r.Pe)(o),size:s.size,viewBox:o?o.getAttribute("viewBox"):null}}static register(t,e,i){if(!a[t]){const s=document.createElement("vaadin-iconset");s.appendChild(i.content.cloneNode(!0)),a[t]=s,h(s,t),s.size=e,s.name=t,s.__nameChanged(t)}}connectedCallback(){super.connectedCallback(),this.style.display="none";const{name:t}=this;a[t]=this,h(this,t),this.__updateIcons(t)}__updateIcons(t){c.forEach((e=>{t===d(e.icon)&&e._applyIcon()}))}__nameChanged(t,e){e&&(a[t]=a[e],delete a[e]),t&&this.__updateIcons(t)}}(0,n.M)(_)},7911:(t,e,i)=>{i(9098);var s=i(6570);(0,s.hC)("vaadin-icon",s.iv`
3
3
  :host {
4
4
  width: var(--lumo-icon-size-m);
5
5
  height: var(--lumo-icon-size-m);
@@ -1 +1 @@
1
- (self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1722],{1747:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxNCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gPHBhdGggZD0iTTEgMTZDMSAxNy4xIDEuOSAxOCAzIDE4SDExQzEyLjEgMTggMTMgMTcuMSAxMyAxNlY0SDFWMTZaTTMgNkgxMVYxNkgzVjZaTTEwLjUgMUw5LjUgMEg0LjVMMy41IDFIMFYzSDE0VjFIMTAuNVoiIGZpbGw9ImN1cnJlbnRjb2xvciIvPiA8L3N2Zz4g"},8152:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNSAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gPHBhdGggZD0iTTEwLjAwMDIgMC45OTIxNDlDMTAuMDAwMiAxLjAxNjE1IDEwLjAwMDIgMS4wMTYxNSAxMC4wMDAyIDEuMDE2MTVMOC4yMjQxOSAzLjAwODE1SDIuOTkyMTlDMi40NjQxOSAzLjAwODE1IDIuMDA4MTkgMy40NDAxNSAyLjAwODE5IDMuOTkyMTVWMTIuMDA4MkMyLjAwODE5IDEyLjUzNjIgMi40NDAxOSAxMi45OTIyIDIuOTkyMTkgMTIuOTkyMkg1LjUzNjE5QzUuODQ4MTkgMTMuMDQwMiA2LjE2MDE5IDEzLjA0MDIgNi40NzIxOSAxMi45OTIySDExLjAwODJDMTEuNTM2MiAxMi45OTIyIDExLjk5MjIgMTIuNTYwMiAxMS45OTIyIDEyLjAwODJWNy43ODQxNkwxMy45MzYyIDUuNjI0MTVMMTQuMDA4MiA1LjY3MjE1VjExLjk4NDJDMTQuMDA4MiAxMy42NjQyIDEyLjY2NDIgMTUuMDA4MiAxMS4wMDgyIDE1LjAwODJIMy4wMTYxOUMxLjMzNjE5IDE1LjAwODIgLTAuMDA3ODEyNSAxMy42NjQyIC0wLjAwNzgxMjUgMTEuOTg0MlYzLjk5MjE1Qy0wLjAwNzgxMjUgMi4zMzYxNSAxLjMzNjE5IDAuOTkyMTQ5IDMuMDE2MTkgMC45OTIxNDlIMTAuMDAwMlpNMTEuMjcyMiAyLjYyNDE1TDEyLjYxNjIgNC4xMTIxNUw3LjcyMDE5IDkuNjgwMTZDNy41MDQxOSA5LjkyMDE2IDYuODMyMTkgMTAuMjMyMiA1LjY4MDE5IDEwLjYxNjJDNS42NTYxOSAxMC42NDAyIDUuNjA4MTkgMTAuNjQwMiA1LjU2MDE5IDEwLjYxNjJDNS40NjQxOSAxMC41OTIyIDUuMzkyMTkgMTAuNDcyMiA1LjQ0MDE5IDEwLjM3NjJDNS43NTIxOSA5LjI0ODE2IDYuMDQwMTkgOC41NTIxNiA2LjI1NjE5IDguMzEyMTZMMTEuMjcyMiAyLjYyNDE1Wk0xMS45MjAyIDEuODU2MTVMMTMuMjg4MiAwLjMyMDE0OUMxMy42NDgyIC0wLjA4Nzg1MTYgMTQuMjcyMiAtMC4xMTE4NTIgMTQuNjgwMiAwLjI3MjE0OUMxNS4wODgyIDAuNjMyMTQ5IDE1LjExMjIgMS4yODAxNSAxNC43NTIyIDEuNjg4MTVMMTMuMjY0MiAzLjM2ODE1TDExLjkyMDIgMS44NTYxNVoiIGZpbGw9ImN1cnJlbnRjb2xvciIvPiA8L3N2Zz4g"},4199:(e,t,i)=>{"use strict";i.r(t),i.d(t,{UserAttributeClass:()=>j});var a=i(1e3),n=i(2561),s=i(2061),o=i(4567),d=i(1747),l=i.n(d),M=i(8152),r=i.n(M),u=i(2138),g=i(9690),x=i(7036);const c=(0,o.iY)("user-attribute");class b extends((0,n.s)({componentName:c,baseSelector:":host > .root"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n\t\t\t<style>\n\t\t\t\t:host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n vaadin-icon {\n color: currentcolor;\n }\n\n .root {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n }\n\n .btn-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-grow: 0;\n }\n\n .text-wrapper {\n display: flex;\n align-items: center;\n flex-grow: 1;\n }\n\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: initial;\n }\n\n descope-text {\n display: inline-flex;\n }\n\n descope-badge {\n margin-inline-end: 10px;\n }\n\n descope-text[data-id="label-text"].required:after {\n content: '*';\n color: var(${u.k.cssVarList.textColor});\n }\n </style>\n\n\n <div class="root">\n <div class="text-wrapper">\n <descope-text st-text-align="auto" data-id="label-text" variant="body1" mode="secondary"></descope-text>\n <descope-text st-text-align="auto" data-id="value-text" variant="body1" mode="primary"></descope-text>\n </div>\n\n <div class="btn-wrapper">\n <descope-badge mode="default" bordered="true" size="xs"></descope-badge>\n <descope-button size="xs" data-id="edit-btn" square="true" variant="link" mode="primary">\n <vaadin-icon src=${r()}></vaadin-icon>\n </descope-button>\n <descope-button size="xs" data-id="delete-btn" square="true" variant="link" mode="primary">\n <vaadin-icon src=${l()}></vaadin-icon>\n </descope-button>\n </div\n </div>\n\t\t`,this.deleteButton=this.shadowRoot.querySelector('descope-button[data-id="delete-btn"]'),this.editButton=this.shadowRoot.querySelector('descope-button[data-id="edit-btn"]'),this.badge=this.shadowRoot.querySelector("descope-badge"),this.labelText=this.shadowRoot.querySelector('descope-text[data-id="label-text"]'),this.valueText=this.shadowRoot.querySelector('descope-text[data-id="value-text"]')}onLabelChange(){this.labelText.innerText=this.label,this.labelText.setAttribute("title",this.label)}onValueOrPlaceholderChange(){const e=this.value||this.placeholder,t=this.value?"primary":"secondary";this.valueText.innerText=e,this.valueText.setAttribute("title",e),this.valueText.setAttribute("mode",t)}onBadgeLabelChange(){this.badgeLabel?(this.badge.innerText=this.badgeLabel,this.badge.style.display=""):this.badge.style.display="none"}onBadgeTooltipTextChange(){this.badge.setAttribute("title",this.badgeTooltipText||this.badgeLabel)}onIsRequiredChange(){this.labelText.classList.toggle("required",this.isRequired)}get label(){return this.getAttribute("label")||""}get value(){return this.getAttribute("value")||""}get placeholder(){return this.getAttribute("placeholder")||""}get isRequired(){return"true"===this.getAttribute("required")}get badgeLabel(){return this.getAttribute("badge-label")||""}get badgeTooltipText(){return this.getAttribute("badge-tooltip-text")||""}init(){this.onLabelChange(),this.onValueOrPlaceholderChange(),this.onIsRequiredChange(),this.onBadgeLabelChange(),this.onBadgeTooltipTextChange(),this.deleteButton.addEventListener("click",(()=>this.dispatchEvent(new CustomEvent("delete-clicked",{bubbles:!0,composed:!0})))),this.editButton.addEventListener("click",(()=>this.dispatchEvent(new CustomEvent("edit-clicked",{bubbles:!0,composed:!0}))))}static get observedAttributes(){return["label","value","placeholder","required","badge-label","badge-tooltip-text"].concat(super.observedAttributes)}attributeChangedCallback(e,t,i){super.attributeChangedCallback?.(e,t,i),t!==i&&("label"===e?this.onLabelChange():"value"===e||"placeholder"===e?this.onValueOrPlaceholderChange():"required"===e?this.onIsRequiredChange():"badge-label"===e?this.onBadgeLabelChange():"badge-tooltip-text"===e&&this.onBadgeTooltipTextChange())}}const{host:h,textFields:p,buttons:D,badge:T,labelText:y,valueText:A,textWrapper:I}={host:{selector:()=>":host"},textFields:{selector:"descope-text"},valueText:{selector:'descope-text[data-id="value-text"]'},labelText:{selector:'descope-text[data-id="label-text"]'},buttons:{selector:"descope-button"},badge:{selector:"descope-badge"},textWrapper:{selector:" .text-wrapper"}},j=(0,s.qC)((0,a.yk)({mappings:{hostWidth:{...h,property:"width"},hostMinWidth:{...h,property:"min-width"},hostDirection:[{...h,property:"direction"},{...p,property:u.k.cssVarList.hostDirection},{...D,property:g.n.cssVarList.hostDirection},{...T,property:x.z.cssVarList.hostDirection}],labelTextWidth:{...y,property:"width"},valueTextWidth:{...A,property:"width"},badgeMaxWidth:{...T,property:"max-width"},itemsGap:[{property:"gap"},{...I,property:"gap"}]}}),a.e4,a.Ae)(b);i(1876),i(2018),i(4021),i(7911),customElements.define(c,j)}}]);
1
+ (self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1722],{1747:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxNCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gPHBhdGggZD0iTTEgMTZDMSAxNy4xIDEuOSAxOCAzIDE4SDExQzEyLjEgMTggMTMgMTcuMSAxMyAxNlY0SDFWMTZaTTMgNkgxMVYxNkgzVjZaTTEwLjUgMUw5LjUgMEg0LjVMMy41IDFIMFYzSDE0VjFIMTAuNVoiIGZpbGw9ImN1cnJlbnRjb2xvciIvPiA8L3N2Zz4g"},8152:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNSAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gPHBhdGggZD0iTTEwLjAwMDIgMC45OTIxNDlDMTAuMDAwMiAxLjAxNjE1IDEwLjAwMDIgMS4wMTYxNSAxMC4wMDAyIDEuMDE2MTVMOC4yMjQxOSAzLjAwODE1SDIuOTkyMTlDMi40NjQxOSAzLjAwODE1IDIuMDA4MTkgMy40NDAxNSAyLjAwODE5IDMuOTkyMTVWMTIuMDA4MkMyLjAwODE5IDEyLjUzNjIgMi40NDAxOSAxMi45OTIyIDIuOTkyMTkgMTIuOTkyMkg1LjUzNjE5QzUuODQ4MTkgMTMuMDQwMiA2LjE2MDE5IDEzLjA0MDIgNi40NzIxOSAxMi45OTIySDExLjAwODJDMTEuNTM2MiAxMi45OTIyIDExLjk5MjIgMTIuNTYwMiAxMS45OTIyIDEyLjAwODJWNy43ODQxNkwxMy45MzYyIDUuNjI0MTVMMTQuMDA4MiA1LjY3MjE1VjExLjk4NDJDMTQuMDA4MiAxMy42NjQyIDEyLjY2NDIgMTUuMDA4MiAxMS4wMDgyIDE1LjAwODJIMy4wMTYxOUMxLjMzNjE5IDE1LjAwODIgLTAuMDA3ODEyNSAxMy42NjQyIC0wLjAwNzgxMjUgMTEuOTg0MlYzLjk5MjE1Qy0wLjAwNzgxMjUgMi4zMzYxNSAxLjMzNjE5IDAuOTkyMTQ5IDMuMDE2MTkgMC45OTIxNDlIMTAuMDAwMlpNMTEuMjcyMiAyLjYyNDE1TDEyLjYxNjIgNC4xMTIxNUw3LjcyMDE5IDkuNjgwMTZDNy41MDQxOSA5LjkyMDE2IDYuODMyMTkgMTAuMjMyMiA1LjY4MDE5IDEwLjYxNjJDNS42NTYxOSAxMC42NDAyIDUuNjA4MTkgMTAuNjQwMiA1LjU2MDE5IDEwLjYxNjJDNS40NjQxOSAxMC41OTIyIDUuMzkyMTkgMTAuNDcyMiA1LjQ0MDE5IDEwLjM3NjJDNS43NTIxOSA5LjI0ODE2IDYuMDQwMTkgOC41NTIxNiA2LjI1NjE5IDguMzEyMTZMMTEuMjcyMiAyLjYyNDE1Wk0xMS45MjAyIDEuODU2MTVMMTMuMjg4MiAwLjMyMDE0OUMxMy42NDgyIC0wLjA4Nzg1MTYgMTQuMjcyMiAtMC4xMTE4NTIgMTQuNjgwMiAwLjI3MjE0OUMxNS4wODgyIDAuNjMyMTQ5IDE1LjExMjIgMS4yODAxNSAxNC43NTIyIDEuNjg4MTVMMTMuMjY0MiAzLjM2ODE1TDExLjkyMDIgMS44NTYxNVoiIGZpbGw9ImN1cnJlbnRjb2xvciIvPiA8L3N2Zz4g"},4199:(e,t,i)=>{"use strict";i.r(t),i.d(t,{UserAttributeClass:()=>j});var a=i(1e3),n=i(2561),s=i(2061),o=i(4567),d=i(1747),l=i.n(d),r=i(8152),M=i.n(r),u=i(2138),g=i(9690),x=i(7036);const h=(0,o.iY)("user-attribute");class b extends((0,n.s)({componentName:h,baseSelector:":host > .root"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n\t\t\t<style>\n\t\t\t\t:host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n vaadin-icon {\n color: currentcolor;\n }\n\n .root {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n }\n\n .btn-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-grow: 0;\n }\n\n .text-wrapper {\n display: flex;\n align-items: center;\n flex-grow: 1;\n }\n\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: initial;\n }\n\n descope-text {\n display: inline-flex;\n }\n\n descope-badge {\n margin-inline-end: 10px;\n }\n\n .hidden {\n visibility: hidden;\n }\n\n descope-text[data-id="label-text"].required:after {\n content: '*';\n color: var(${u.k.cssVarList.textColor});\n }\n </style>\n\n\n <div class="root">\n <div class="text-wrapper">\n <descope-text st-text-align="auto" data-id="label-text" variant="body1" mode="secondary"></descope-text>\n <descope-text st-text-align="auto" data-id="value-text" variant="body1" mode="primary"></descope-text>\n </div>\n\n <div class="btn-wrapper">\n <descope-badge mode="default" bordered="true" size="xs"></descope-badge>\n <descope-button size="xs" data-id="edit-btn" square="true" variant="link" mode="primary">\n <vaadin-icon src=${M()}></vaadin-icon>\n </descope-button>\n <descope-button size="xs" data-id="delete-btn" square="true" variant="link" mode="primary">\n <vaadin-icon src=${l()}></vaadin-icon>\n </descope-button>\n </div\n </div>\n\t\t`,this.deleteButton=this.shadowRoot.querySelector('descope-button[data-id="delete-btn"]'),this.editButton=this.shadowRoot.querySelector('descope-button[data-id="edit-btn"]'),this.badge=this.shadowRoot.querySelector("descope-badge"),this.labelText=this.shadowRoot.querySelector('descope-text[data-id="label-text"]'),this.valueText=this.shadowRoot.querySelector('descope-text[data-id="value-text"]')}onLabelChange(){this.labelText.innerText=this.label,this.labelText.setAttribute("title",this.label)}onValueOrPlaceholderChange(){const e=this.value||this.placeholder,t=this.value?"primary":"secondary";this.valueText.innerText=e,this.valueText.setAttribute("title",e),this.valueText.setAttribute("mode",t)}onBadgeLabelChange(){this.badgeLabel?(this.badge.innerText=this.badgeLabel,this.badge.style.display=""):this.badge.style.display="none"}onBadgeTooltipTextChange(){this.badge.setAttribute("title",this.badgeTooltipText||this.badgeLabel)}onIsRequiredChange(){this.labelText.classList.toggle("required",this.isRequired)}get label(){return this.getAttribute("label")||""}get value(){return this.getAttribute("value")||""}get placeholder(){return this.getAttribute("placeholder")||""}get isRequired(){return"true"===this.getAttribute("required")}get badgeLabel(){return this.getAttribute("badge-label")||""}get badgeTooltipText(){return this.getAttribute("badge-tooltip-text")||""}init(){this.onLabelChange(),this.onValueOrPlaceholderChange(),this.onIsRequiredChange(),this.onBadgeLabelChange(),this.onBadgeTooltipTextChange(),this.handleDeleteButtonVisibility(),this.deleteButton.addEventListener("click",(()=>this.dispatchEvent(new CustomEvent("delete-clicked",{bubbles:!0,composed:!0})))),this.editButton.addEventListener("click",(()=>this.dispatchEvent(new CustomEvent("edit-clicked",{bubbles:!0,composed:!0}))))}static get observedAttributes(){return["label","value","placeholder","required","badge-label","badge-tooltip-text"].concat(super.observedAttributes)}handleDeleteButtonVisibility(){this.deleteButton.classList.toggle("hidden",this.isRequired||!this.value)}attributeChangedCallback(e,t,i){super.attributeChangedCallback?.(e,t,i),t!==i&&("label"===e?this.onLabelChange():"value"===e||"placeholder"===e?this.onValueOrPlaceholderChange():"required"===e?this.onIsRequiredChange():"badge-label"===e?this.onBadgeLabelChange():"badge-tooltip-text"===e&&this.onBadgeTooltipTextChange(),"value"!==e&&"required"!==e||this.handleDeleteButtonVisibility())}}const{host:c,textFields:D,buttons:p,badge:T,labelText:y,valueText:A,textWrapper:I}={host:{selector:()=>":host"},textFields:{selector:"descope-text"},valueText:{selector:'descope-text[data-id="value-text"]'},labelText:{selector:'descope-text[data-id="label-text"]'},buttons:{selector:"descope-button"},badge:{selector:"descope-badge"},textWrapper:{selector:" .text-wrapper"}},j=(0,s.qC)((0,a.yk)({mappings:{hostWidth:{...c,property:"width"},hostMinWidth:{...c,property:"min-width"},hostDirection:[{...c,property:"direction"},{...D,property:u.k.cssVarList.hostDirection},{...p,property:g.n.cssVarList.hostDirection},{...T,property:x.z.cssVarList.hostDirection}],labelTextWidth:{...y,property:"width"},valueTextWidth:{...A,property:"width"},badgeMaxWidth:{...T,property:"max-width"},itemsGap:[{property:"gap"},{...I,property:"gap"}]}}),a.e4,a.Ae)(b);i(1876),i(2018),i(4021),i(7911),customElements.define(h,j)}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1711],{853:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gPHBhdGggZD0iTTggMEMzLjYgMCAwIDMuNiAwIDhDMCAxMi40IDMuNiAxNiA4IDE2QzEyLjQgMTYgMTYgMTIuNCAxNiA4QzE2IDMuNiAxMi40IDAgOCAwWk03LjEgMTEuN0wyLjkgNy42TDQuMyA2LjJMNyA4LjlMMTIgNEwxMy40IDUuNEw3LjEgMTEuN1oiIGZpbGw9IiM0Q0FGNTAiLz4gPC9zdmc+IA=="},9449:(t,e,n)=>{"use strict";n.r(e),n.d(e,{UserAuthMethodClass:()=>w});var i=n(1e3),o=n(2561),s=n(2061),l=n(4567),a=n(853),r=n.n(a),d=n(2138),h=n(9690),c=n(7036);const p=(0,l.iY)("user-auth-method");class u extends((0,o.s)({componentName:p,baseSelector:":host > .root"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n\t\t\t<style>\n\t\t\t\t:host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\n vaadin-icon {\n color: currentcolor;\n }\n\n .root {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n }\n\n .btn-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-grow: 0;\n }\n\n .text-wrapper {\n display: flex;\n align-items: center;\n flex-grow: 1;\n }\n\n descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: initial;\n }\n\n descope-text {\n display: inline-flex;\n }\n\n .fulfilled-indicator {\n width: 1em;\n height: 1em;\n display: flex;\n align-items: center;\n padding-inline-end: 1em;\n }\n\n .hidden {\n display: none;\n }\n\n .hidden-btn {\n width: 0;\n }\n\n slot[name="method-icon"]{\n display: inline-flex;\n align-items: center;\n }\n </style>\n\n\n <div class="root">\n <div class="text-wrapper">\n <slot name="method-icon"></slot>\n <descope-text st-text-align="auto" data-id="label-text" variant="body1" mode="primary"></descope-text>\n </div>\n\n <div class="btn-wrapper">\n <descope-button size="sm" variant="link" mode="primary">\n <slot name="button-icon"></slot>\n </descope-button>\n <div class="fulfilled-indicator">\n <vaadin-icon src=${r()}></vaadin-icon>\n </div>\n <descope-button class="hidden-btn"size="sm" variant="link" mode="primary"></descope-button>\n </div>\n </div>\n\t\t`,this.button=this.shadowRoot.querySelector("descope-button"),this.fulfilledIndicator=this.shadowRoot.querySelector(".fulfilled-indicator"),this.labelText=this.shadowRoot.querySelector('descope-text[data-id="label-text"]')}onLabelChange(){this.labelText.innerText=this.label,this.labelText.setAttribute("title",this.label)}onButtonLabelChange(){let t=this.button.querySelector("span");this.buttonLabel?(t||(t=document.createElement("span"),this.button.appendChild(t)),t.innerText=this.buttonLabel):t&&this.button.removeChild(t)}onFulfilledChange(){this.button.classList.toggle("hidden",this.isFulfilled),this.fulfilledIndicator.classList.toggle("hidden",!this.isFulfilled)}get label(){return this.getAttribute("label")||""}get buttonLabel(){return this.getAttribute("button-label")||""}get isFulfilled(){return"true"===this.getAttribute("fulfilled")}init(){this.onLabelChange(),this.onButtonLabelChange(),this.onFulfilledChange(),this.button.addEventListener("click",(()=>this.dispatchEvent(new CustomEvent("button-clicked",{bubbles:!0,composed:!0}))))}static get observedAttributes(){return["label","fulfilled"].concat(super.observedAttributes)}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&("label"===t?this.onLabelChange():"fulfilled"===t?this.onFulfilledChange():"button-label"===t&&this.onButtonLabelChange())}}const{host:b,textField:g,buttons:m,badge:x,textWrapper:y,methodIconSlot:f}={host:{selector:()=>":host"},textField:{selector:"descope-text"},buttons:{selector:"descope-button"},badge:{selector:"descope-badge"},textWrapper:{selector:" .text-wrapper"},methodIconSlot:{selector:'slot[name="method-icon"]'}},w=(0,s.qC)((0,i.yk)({mappings:{hostWidth:{...b,property:"width"},hostMinWidth:{...b,property:"min-width"},hostDirection:[{...b,property:"direction"},{...g,property:d.k.cssVarList.hostDirection},{...m,property:h.n.cssVarList.hostDirection},{...x,property:c.z.cssVarList.hostDirection}],labelTextWidth:{...g,property:"width"},itemsGap:[{property:"gap"},{...y,property:"gap"}],iconSize:[{...f,property:"width"},{...f,property:"height"}]}}),i.e4,i.Ae)(u);n(1876),n(2018),n(4021),n(7911),customElements.define(p,w)}}]);
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,s,n={534:(e,o,s)=>{var n={"./boolean-fields/descope-boolean-field-internal/index.js":[6676,5910,4567,1e3,3878,769],"./boolean-fields/descope-checkbox/index.js":[3483,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9789,3092,4567,1e3,3878,4201,769,4803,3726],"./boolean-fields/descope-switch-toggle/index.js":[9203,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9789,3092,4567,1e3,3878,4201,769,4803,4483],"./button-selection-group-fields/descope-button-multi-selection-group-internal/index.js":[6793,5910,4567,1e3,3878,9214,9122],"./button-selection-group-fields/descope-button-multi-selection-group/index.js":[3795,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,3878,4201,9662,9214,6656,9434,9122,5263],"./button-selection-group-fields/descope-button-selection-group-internal/index.js":[8901,5910,4567,1e3,3878,9214,2313],"./button-selection-group-fields/descope-button-selection-group-item/index.js":[4873,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,9662,6656],"./button-selection-group-fields/descope-button-selection-group/index.js":[4887,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,3878,4201,9662,9214,6656,9434,2313,2861],"./descope-avatar/index.js":[3120,5910,7531,4226,2066,2269,6606,1037,4946,9320,9189,6091,3373,9680,6977,2106,2775,4567,1e3,8873],"./descope-badge/index.js":[4021,5910,4567,1e3,8012],"./descope-button/index.js":[2018,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,9662],"./descope-combo-box/index.js":[1294,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,262,9320,9189,4905,6091,3373,3003,9383,8866,7583,4567,1e3,4201,9483],"./descope-container/index.js":[7107,5910,4567,1e3,7317],"./descope-date-picker/index.js":[2552,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,1224,9320,9211,9189,6091,3373,9383,9092,4567,1e3,8017],"./descope-divider/index.js":[6162,5910,4567,1e3,2528,4178],"./descope-email-field/index.js":[1272,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,9437,4567,1e3,4201,4447,9760],"./descope-grid/descope-grid-custom-column/index.js":[9278,7531,2066,262,4905,5517,322,4567,7044,5988],"./descope-grid/descope-grid-selection-column/index.js":[2238,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,262,9789,4905,5517,3092,8623,4567,1e3,3878,4201,769,4803,3726,7487],"./descope-grid/descope-grid-text-column/index.js":[2356,7531,2066,262,4905,5517,322,4567,7044,3705],"./descope-grid/index.js":[9950,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,262,9789,9189,4905,3003,9680,5517,3092,322,8623,63,4595,4567,1e3,3878,9461],"./descope-image/index.js":[8278,5910,4567,1e3,6772],"./descope-link/index.js":[5846,5910,4567,1e3,2528,58],"./descope-loader-linear/index.js":[7845,5910,4567,1e3,6453],"./descope-loader-radial/index.js":[5747,5910,4567,1e3,3072],"./descope-logo/index.js":[1034,5910,4567,1e3,3585,1984],"./descope-modal/index.js":[958,5910,7531,4226,2269,1037,262,9320,9189,6091,6687,1940,4567,1e3,4641],"./descope-multi-select-combo-box/index.js":[9393,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,262,9320,9189,4905,6091,3373,3003,9383,8866,9680,6687,63,1438,4567,1e3,4201,3840],"./descope-new-password/descope-new-password-internal/index.js":[1545,5910,4567,1e3,3878,4201,4577,2481,1842],"./descope-new-password/index.js":[8974,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9789,9211,7056,4567,1e3,3878,4201,4447,2934,4577,2481,1842,8106,4570,7055],"./descope-notification/descope-notification-card/index.js":[5400,5910,7531,4226,1037,262,9320,6977,3951,4567,1e3,7401],"./descope-notification/index.js":[1845,5910,7531,4226,1037,262,9320,6977,3951,4567,1e3,7401,9655],"./descope-notp-image/index.js":[6016,5910,4567,1e3,3585,869],"./descope-number-field/index.js":[6916,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,5806,4567,1e3,4201,4447,2142],"./descope-passcode/descope-passcode-internal/index.js":[4775,5910,4567,1e3,3878,1841],"./descope-passcode/index.js":[4919,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,9789,4567,1e3,3878,4201,4447,2934,1841,3072,939],"./descope-password/index.js":[9279,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9211,7056,4567,1e3,4201,2481,8106],"./descope-policy-validation/index.js":[8558,5910,4567,1e3,4577,4570],"./descope-recaptcha/index.js":[8164,5910,4567,1e3,964],"./descope-text-area/index.js":[1962,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,422,9680,6770,4567,1e3,4201,3322],"./descope-text-field/index.js":[9357,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,9789,4567,1e3,4201,4447,2934],"./descope-text/index.js":[1876,5910,4567,1e3,2528],"./descope-totp-image/index.js":[1331,5910,4567,1e3,3585,5364],"./descope-upload-file/index.js":[6667,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,3878,9662,5874],"./descope-user-attribute/index.js":[4199,5910,7531,4226,2066,2269,6606,3249,1037,4946,1224,9211,1721,9680,6977,7911,4567,1e3,9662,2528,8012,1722],"./mapping-fields/descope-mappings-field/descope-mapping-item/index.js":[6751,5910,4567,1e3,3878,3172],"./mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js":[3820,5910,4567,1e3,3878,5130],"./mapping-fields/descope-mappings-field/index.js":[5894,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,262,9789,9320,9211,9189,4905,6091,3373,3003,9383,1721,8866,9680,7583,6977,2106,9299],"./mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js":[4115,5910,4567,1e3,3878,9656],"./mapping-fields/descope-saml-group-mappings/index.js":[3277,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,262,9789,9320,9211,9189,4905,6091,3373,3003,9383,1721,8866,9680,7583,6977,2106,9299,9476],"./phone-fields/descope-phone-field/descope-phone-field-internal/index.js":[9240,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,262,9789,9320,9189,4905,6091,3373,3003,9383,8866,7583,4567,1e3,3878,4201,4447,9288],"./phone-fields/descope-phone-field/index.js":[6581,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,262,9789,9320,9189,4905,6091,3373,3003,9383,8866,7583,4567,1e3,3878,4201,4447,9806],"./phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js":[3067,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,9789,4567,1e3,3878,4201,4447,2934,4981],"./phone-fields/descope-phone-input-box-field/index.js":[9423,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,262,9789,9320,9189,4905,6091,3373,3003,9383,8866,7583,4567,1e3,3878,4201,4447,5119]};function i(e){if(!s.o(n,e))return Promise.resolve().then((()=>{var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}));var o=n[e],i=o[0];return Promise.all(o.slice(1).map(s.e)).then((()=>s(i)))}i.keys=()=>Object.keys(n),i.id=534,e.exports=i},5561:(e,o,s)=>{"use strict";s.r(o),s.d(o,{componentsThemeManager:()=>n});const n=new class{static mountOnPropName="DescopeThemeManager";#e={};#o="light";#s=new Set;#n(){this.#s.forEach((e=>e?.()))}get currentThemeName(){return this.#o}set currentThemeName(e){this.#o=e,this.#n()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#s.add(e),()=>{this.#s.delete(e)}}set themes(e){this.#e=e,this.#n()}get hasThemes(){return!!Object.keys(this.#e).length}}},7507:(e,o,s)=>{const{componentsThemeManager:n}=s(5561),i=s(534);e.exports=i.keys().reduce(((e,o)=>{const s=o.replace(/.*?([^\/]+)\/index\.js$/,"$1");return s.endsWith("-internal")||(e[s]=()=>i(o)),e}),{}),e.exports.componentsThemeManager=n}},i={};function d(e){var o=i[e];if(void 0!==o)return o.exports;var s=i[e]={exports:{}};return n[e](s,s.exports,d),s.exports}d.m=n,e=[],d.O=(o,s,n,i)=>{if(!s){var t=1/0;for(a=0;a<e.length;a++){for(var[s,n,i]=e[a],p=!0,c=0;c<s.length;c++)(!1&i||t>=i)&&Object.keys(d.O).every((e=>d.O[e](s[c])))?s.splice(c--,1):(p=!1,i<t&&(t=i));if(p){e.splice(a--,1);var r=n();void 0!==r&&(o=r)}}return o}i=i||0;for(var a=e.length;a>0&&e[a-1][2]>i;a--)e[a]=e[a-1];e[a]=[s,n,i]},d.F={},d.E=e=>{Object.keys(d.F).map((o=>{d.F[o](e)}))},d.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return d.d(o,{a:o}),o},d.d=(e,o)=>{for(var s in o)d.o(o,s)&&!d.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:o[s]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((o,s)=>(d.f[s](e,o),o)),[])),d.u=e=>(({58:"descope-link-index-js",769:"boolean-fields-descope-boolean-field-internal-index-js",869:"descope-notp-image-index-js",939:"descope-passcode-index-js",964:"descope-recaptcha-index-js",1722:"descope-user-attribute-index-js",1841:"descope-passcode-descope-passcode-internal-index-js",1842:"descope-new-password-descope-new-password-internal-index-js",1984:"descope-logo-index-js",2142:"descope-number-field-index-js",2313:"button-selection-group-fields-descope-button-selection-group-internal-index-js",2528:"descope-text-index-js",2861:"button-selection-group-fields-descope-button-selection-group-index-js",2934:"descope-text-field-index-js",3072:"descope-loader-radial-index-js",3172:"mapping-fields-descope-mappings-field-descope-mapping-item-index-js",3322:"descope-text-area-index-js",3705:"descope-grid-descope-grid-text-column-index-js",3726:"boolean-fields-descope-checkbox-index-js",3840:"descope-multi-select-combo-box-index-js",4178:"descope-divider-index-js",4483:"boolean-fields-descope-switch-toggle-index-js",4570:"descope-policy-validation-index-js",4641:"descope-modal-index-js",4981:"phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js",5119:"phone-fields-descope-phone-input-box-field-index-js",5130:"mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js",5263:"button-selection-group-fields-descope-button-multi-selection-group-index-js",5364:"descope-totp-image-index-js",5874:"descope-upload-file-index-js",5988:"descope-grid-descope-grid-custom-column-index-js",6453:"descope-loader-linear-index-js",6656:"button-selection-group-fields-descope-button-selection-group-item-index-js",6772:"descope-image-index-js",7055:"descope-new-password-index-js",7317:"descope-container-index-js",7401:"descope-notification-descope-notification-card-index-js",7487:"descope-grid-descope-grid-selection-column-index-js",8012:"descope-badge-index-js",8017:"descope-date-picker-index-js",8106:"descope-password-index-js",8873:"descope-avatar-index-js",9122:"button-selection-group-fields-descope-button-multi-selection-group-internal-index-js",9288:"phone-fields-descope-phone-field-descope-phone-field-internal-index-js",9299:"mapping-fields-descope-mappings-field-index-js",9461:"descope-grid-index-js",9476:"mapping-fields-descope-saml-group-mappings-index-js",9483:"descope-combo-box-index-js",9655:"descope-notification-index-js",9656:"mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js",9662:"descope-button-index-js",9760:"descope-email-field-index-js",9806:"phone-fields-descope-phone-field-index-js"}[e]||e)+".js"),d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),o={},s="DescopeUI:",d.l=(e,n,i,t)=>{if(o[e])o[e].push(n);else{var p,c;if(void 0!==i)for(var r=document.getElementsByTagName("script"),a=0;a<r.length;a++){var l=r[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==s+i){p=l;break}}p||(c=!0,(p=document.createElement("script")).charset="utf-8",p.timeout=120,d.nc&&p.setAttribute("nonce",d.nc),p.setAttribute("data-webpack",s+i),p.src=e),o[e]=[n];var u=(s,n)=>{p.onerror=p.onload=null,clearTimeout(x);var i=o[e];if(delete o[e],p.parentNode&&p.parentNode.removeChild(p),i&&i.forEach((e=>e(n))),s)return s(n)},x=setTimeout(u.bind(null,void 0,{type:"timeout",target:p}),12e4);p.onerror=u.bind(null,p.onerror),p.onload=u.bind(null,p.onload),c&&document.head.appendChild(p)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;d.g.importScripts&&(e=d.g.location+"");var o=d.g.document;if(!e&&o&&(o.currentScript&&(e=o.currentScript.src),!e)){var s=o.getElementsByTagName("script");if(s.length)for(var n=s.length-1;n>-1&&!e;)e=s[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),d.p=e})(),(()=>{var e={4826:0};d.f.j=(o,s)=>{var n=d.o(e,o)?e[o]:void 0;if(0!==n)if(n)s.push(n[2]);else{var i=new Promise(((s,i)=>n=e[o]=[s,i]));s.push(n[2]=i);var t=d.p+d.u(o),p=new Error;d.l(t,(s=>{if(d.o(e,o)&&(0!==(n=e[o])&&(e[o]=void 0),n)){var i=s&&("load"===s.type?"missing":s.type),t=s&&s.target&&s.target.src;p.message="Loading chunk "+o+" failed.\n("+i+": "+t+")",p.name="ChunkLoadError",p.type=i,p.request=t,n[1](p)}}),"chunk-"+o,o)}},d.F.j=o=>{if(!d.o(e,o)||void 0===e[o]){e[o]=null;var s=document.createElement("link");d.nc&&s.setAttribute("nonce",d.nc),s.rel="prefetch",s.as="script",s.href=d.p+d.u(o),document.head.appendChild(s)}},d.O.j=o=>0===e[o];var o=(o,s)=>{var n,i,[t,p,c]=s,r=0;if(t.some((o=>0!==e[o]))){for(n in p)d.o(p,n)&&(d.m[n]=p[n]);if(c)var a=c(d)}for(o&&o(s);r<t.length;r++)i=t[r],d.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return d.O(a)},s=self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[];s.forEach(o.bind(null,0)),s.push=o.bind(null,s.push.bind(s))})(),d.O(0,[4826],(()=>{[5910,4567,1e3,3878,769,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9789,3092,4201,4803,3726,4483,9214,9122,9211,1721,9662,6656,9434,5263,2313,2861,9320,9189,6091,3373,9680,6977,2106,2775,8873,8012,262,4905,3003,9383,8866,7583,9483,7317,9092,8017,2528,4178,9437,4447,9760,5517,322,7044,5988,8623,7487,3705,63,4595,9461,6772,58,6453,3072,3585,1984,6687,1940,4641,1438,3840,4577,2481,1842,7056,2934,8106,4570,7055,3951,7401,9655,869,5806,2142,1841,939,964,6770,3322,5364,5874,7911,1722,3172,5130,9299,9656,9476,9288,9806,4981,5119].map(d.E)}),5);var t=d(7507);return d.O(t)})()));
1
+ !function(e,s){"object"==typeof exports&&"object"==typeof module?module.exports=s():"function"==typeof define&&define.amd?define([],s):"object"==typeof exports?exports.DescopeUI=s():e.DescopeUI=s()}(self,(()=>(()=>{var e,s,o,n={534:(e,s,o)=>{var n={"./boolean-fields/descope-boolean-field-internal/index.js":[6676,5910,4567,1e3,3878,769],"./boolean-fields/descope-checkbox/index.js":[3483,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9789,3092,4567,1e3,3878,4201,769,4803,3726],"./boolean-fields/descope-switch-toggle/index.js":[9203,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9789,3092,4567,1e3,3878,4201,769,4803,4483],"./button-selection-group-fields/descope-button-multi-selection-group-internal/index.js":[6793,5910,4567,1e3,3878,9214,9122],"./button-selection-group-fields/descope-button-multi-selection-group/index.js":[3795,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,3878,4201,9662,9214,6656,9434,9122,5263],"./button-selection-group-fields/descope-button-selection-group-internal/index.js":[8901,5910,4567,1e3,3878,9214,2313],"./button-selection-group-fields/descope-button-selection-group-item/index.js":[4873,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,9662,6656],"./button-selection-group-fields/descope-button-selection-group/index.js":[4887,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,3878,4201,9662,9214,6656,9434,2313,2861],"./descope-avatar/index.js":[3120,5910,7531,4226,2066,2269,6606,1037,4946,9320,9189,6091,3373,9680,6977,2106,2775,4567,1e3,8873],"./descope-badge/index.js":[4021,5910,4567,1e3,8012],"./descope-button/index.js":[2018,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,9662],"./descope-combo-box/index.js":[1294,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,262,9320,9189,4905,6091,3373,3003,9383,8866,7583,4567,1e3,4201,9483],"./descope-container/index.js":[7107,5910,4567,1e3,7317],"./descope-date-picker/index.js":[2552,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,1224,9211,9320,9189,6091,3373,9383,9092,4567,1e3,8017],"./descope-divider/index.js":[6162,5910,4567,1e3,2528,4178],"./descope-email-field/index.js":[1272,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,9437,4567,1e3,4201,4447,9760],"./descope-grid/descope-grid-custom-column/index.js":[9278,7531,2066,262,4905,5517,322,4567,7044,5988],"./descope-grid/descope-grid-selection-column/index.js":[2238,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,262,9789,4905,5517,3092,8623,4567,1e3,3878,4201,769,4803,3726,7487],"./descope-grid/descope-grid-text-column/index.js":[2356,7531,2066,262,4905,5517,322,4567,7044,3705],"./descope-grid/index.js":[9950,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,262,9789,9189,4905,3003,9680,5517,3092,322,8623,63,4595,4567,1e3,3878,9461],"./descope-image/index.js":[8278,5910,4567,1e3,6772],"./descope-link/index.js":[5846,5910,4567,1e3,2528,58],"./descope-loader-linear/index.js":[7845,5910,4567,1e3,6453],"./descope-loader-radial/index.js":[5747,5910,4567,1e3,3072],"./descope-logo/index.js":[1034,5910,4567,1e3,3585,1984],"./descope-modal/index.js":[958,5910,7531,4226,2269,1037,262,9320,9189,6091,6687,1940,4567,1e3,4641],"./descope-multi-select-combo-box/index.js":[9393,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,262,9320,9189,4905,6091,3373,3003,9383,9680,8866,6687,63,1438,4567,1e3,4201,3840],"./descope-new-password/descope-new-password-internal/index.js":[1545,5910,4567,1e3,3878,4201,4577,2481,1842],"./descope-new-password/index.js":[8974,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9789,9211,7056,4567,1e3,3878,4201,4447,2934,4577,2481,1842,8106,4570,7055],"./descope-notification/descope-notification-card/index.js":[5400,5910,7531,4226,1037,262,9320,6977,3951,4567,1e3,7401],"./descope-notification/index.js":[1845,5910,7531,4226,1037,262,9320,6977,3951,4567,1e3,7401,9655],"./descope-notp-image/index.js":[6016,5910,4567,1e3,3585,869],"./descope-number-field/index.js":[6916,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,5806,4567,1e3,4201,4447,2142],"./descope-passcode/descope-passcode-internal/index.js":[4775,5910,4567,1e3,3878,1841],"./descope-passcode/index.js":[4919,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,9789,4567,1e3,3878,4201,4447,2934,1841,3072,939],"./descope-password/index.js":[9279,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9211,7056,4567,1e3,4201,2481,8106],"./descope-policy-validation/index.js":[8558,5910,4567,1e3,4577,4570],"./descope-recaptcha/index.js":[8164,5910,4567,1e3,964],"./descope-text-area/index.js":[1962,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,422,9680,6770,4567,1e3,4201,3322],"./descope-text-field/index.js":[9357,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,9789,4567,1e3,4201,4447,2934],"./descope-text/index.js":[1876,5910,4567,1e3,2528],"./descope-totp-image/index.js":[1331,5910,4567,1e3,3585,5364],"./descope-upload-file/index.js":[6667,5910,7531,4226,2066,2269,6606,3249,1224,9211,1721,4567,1e3,3878,9662,5874],"./descope-user-attribute/index.js":[4199,5910,7531,4226,2066,2269,6606,3249,1037,4946,1224,9211,1721,9680,6977,1735,4567,1e3,9662,2528,8012,1722],"./descope-user-auth-method/index.js":[9449,5910,7531,4226,2066,2269,6606,3249,1037,4946,1224,9211,1721,9680,6977,7911,4567,1e3,9662,2528,8012,1711],"./mapping-fields/descope-mappings-field/descope-mapping-item/index.js":[6751,5910,4567,1e3,3878,3172],"./mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js":[3820,5910,4567,1e3,3878,5130],"./mapping-fields/descope-mappings-field/index.js":[5894,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,262,9789,9211,9320,9189,4905,6091,3373,1721,3003,9383,9680,8866,6977,7583,2106,9299],"./mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js":[4115,5910,4567,1e3,3878,9656],"./mapping-fields/descope-saml-group-mappings/index.js":[3277,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,262,9789,9211,9320,9189,4905,6091,3373,1721,3003,9383,9680,8866,6977,7583,2106,9299,9476],"./phone-fields/descope-phone-field/descope-phone-field-internal/index.js":[9240,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,262,9789,9320,9189,4905,6091,3373,3003,9383,8866,7583,4567,1e3,3878,4201,4447,9288],"./phone-fields/descope-phone-field/index.js":[6581,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,262,9789,9320,9189,4905,6091,3373,3003,9383,8866,7583,4567,1e3,3878,4201,4447,9806],"./phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js":[3067,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,9789,4567,1e3,3878,4201,4447,2934,4981],"./phone-fields/descope-phone-input-box-field/index.js":[9423,5910,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,8725,262,9789,9320,9189,4905,6091,3373,3003,9383,8866,7583,4567,1e3,3878,4201,4447,5119]};function i(e){if(!o.o(n,e))return Promise.resolve().then((()=>{var s=new Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}));var s=n[e],i=s[0];return Promise.all(s.slice(1).map(o.e)).then((()=>o(i)))}i.keys=()=>Object.keys(n),i.id=534,e.exports=i},5561:(e,s,o)=>{"use strict";o.r(s),o.d(s,{componentsThemeManager:()=>n});const n=new class{static mountOnPropName="DescopeThemeManager";#e={};#s="light";#o=new Set;#n(){this.#o.forEach((e=>e?.()))}get currentThemeName(){return this.#s}set currentThemeName(e){this.#s=e,this.#n()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#o.add(e),()=>{this.#o.delete(e)}}set themes(e){this.#e=e,this.#n()}get hasThemes(){return!!Object.keys(this.#e).length}}},7507:(e,s,o)=>{const{componentsThemeManager:n}=o(5561),i=o(534);e.exports=i.keys().reduce(((e,s)=>{const o=s.replace(/.*?([^\/]+)\/index\.js$/,"$1");return o.endsWith("-internal")||(e[o]=()=>i(s)),e}),{}),e.exports.componentsThemeManager=n}},i={};function d(e){var s=i[e];if(void 0!==s)return s.exports;var o=i[e]={exports:{}};return n[e](o,o.exports,d),o.exports}d.m=n,e=[],d.O=(s,o,n,i)=>{if(!o){var t=1/0;for(a=0;a<e.length;a++){for(var[o,n,i]=e[a],p=!0,c=0;c<o.length;c++)(!1&i||t>=i)&&Object.keys(d.O).every((e=>d.O[e](o[c])))?o.splice(c--,1):(p=!1,i<t&&(t=i));if(p){e.splice(a--,1);var r=n();void 0!==r&&(s=r)}}return s}i=i||0;for(var a=e.length;a>0&&e[a-1][2]>i;a--)e[a]=e[a-1];e[a]=[o,n,i]},d.F={},d.E=e=>{Object.keys(d.F).map((s=>{d.F[s](e)}))},d.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return d.d(s,{a:s}),s},d.d=(e,s)=>{for(var o in s)d.o(s,o)&&!d.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((s,o)=>(d.f[o](e,s),s)),[])),d.u=e=>(({58:"descope-link-index-js",769:"boolean-fields-descope-boolean-field-internal-index-js",869:"descope-notp-image-index-js",939:"descope-passcode-index-js",964:"descope-recaptcha-index-js",1711:"descope-user-auth-method-index-js",1722:"descope-user-attribute-index-js",1841:"descope-passcode-descope-passcode-internal-index-js",1842:"descope-new-password-descope-new-password-internal-index-js",1984:"descope-logo-index-js",2142:"descope-number-field-index-js",2313:"button-selection-group-fields-descope-button-selection-group-internal-index-js",2528:"descope-text-index-js",2861:"button-selection-group-fields-descope-button-selection-group-index-js",2934:"descope-text-field-index-js",3072:"descope-loader-radial-index-js",3172:"mapping-fields-descope-mappings-field-descope-mapping-item-index-js",3322:"descope-text-area-index-js",3705:"descope-grid-descope-grid-text-column-index-js",3726:"boolean-fields-descope-checkbox-index-js",3840:"descope-multi-select-combo-box-index-js",4178:"descope-divider-index-js",4483:"boolean-fields-descope-switch-toggle-index-js",4570:"descope-policy-validation-index-js",4641:"descope-modal-index-js",4981:"phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js",5119:"phone-fields-descope-phone-input-box-field-index-js",5130:"mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js",5263:"button-selection-group-fields-descope-button-multi-selection-group-index-js",5364:"descope-totp-image-index-js",5874:"descope-upload-file-index-js",5988:"descope-grid-descope-grid-custom-column-index-js",6453:"descope-loader-linear-index-js",6656:"button-selection-group-fields-descope-button-selection-group-item-index-js",6772:"descope-image-index-js",7055:"descope-new-password-index-js",7317:"descope-container-index-js",7401:"descope-notification-descope-notification-card-index-js",7487:"descope-grid-descope-grid-selection-column-index-js",8012:"descope-badge-index-js",8017:"descope-date-picker-index-js",8106:"descope-password-index-js",8873:"descope-avatar-index-js",9122:"button-selection-group-fields-descope-button-multi-selection-group-internal-index-js",9288:"phone-fields-descope-phone-field-descope-phone-field-internal-index-js",9299:"mapping-fields-descope-mappings-field-index-js",9461:"descope-grid-index-js",9476:"mapping-fields-descope-saml-group-mappings-index-js",9483:"descope-combo-box-index-js",9655:"descope-notification-index-js",9656:"mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js",9662:"descope-button-index-js",9760:"descope-email-field-index-js",9806:"phone-fields-descope-phone-field-index-js"}[e]||e)+".js"),d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),s={},o="DescopeUI:",d.l=(e,n,i,t)=>{if(s[e])s[e].push(n);else{var p,c;if(void 0!==i)for(var r=document.getElementsByTagName("script"),a=0;a<r.length;a++){var l=r[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==o+i){p=l;break}}p||(c=!0,(p=document.createElement("script")).charset="utf-8",p.timeout=120,d.nc&&p.setAttribute("nonce",d.nc),p.setAttribute("data-webpack",o+i),p.src=e),s[e]=[n];var u=(o,n)=>{p.onerror=p.onload=null,clearTimeout(x);var i=s[e];if(delete s[e],p.parentNode&&p.parentNode.removeChild(p),i&&i.forEach((e=>e(n))),o)return o(n)},x=setTimeout(u.bind(null,void 0,{type:"timeout",target:p}),12e4);p.onerror=u.bind(null,p.onerror),p.onload=u.bind(null,p.onload),c&&document.head.appendChild(p)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;d.g.importScripts&&(e=d.g.location+"");var s=d.g.document;if(!e&&s&&(s.currentScript&&(e=s.currentScript.src),!e)){var o=s.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&!e;)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),d.p=e})(),(()=>{var e={4826:0};d.f.j=(s,o)=>{var n=d.o(e,s)?e[s]:void 0;if(0!==n)if(n)o.push(n[2]);else{var i=new Promise(((o,i)=>n=e[s]=[o,i]));o.push(n[2]=i);var t=d.p+d.u(s),p=new Error;d.l(t,(o=>{if(d.o(e,s)&&(0!==(n=e[s])&&(e[s]=void 0),n)){var i=o&&("load"===o.type?"missing":o.type),t=o&&o.target&&o.target.src;p.message="Loading chunk "+s+" failed.\n("+i+": "+t+")",p.name="ChunkLoadError",p.type=i,p.request=t,n[1](p)}}),"chunk-"+s,s)}},d.F.j=s=>{if(!d.o(e,s)||void 0===e[s]){e[s]=null;var o=document.createElement("link");d.nc&&o.setAttribute("nonce",d.nc),o.rel="prefetch",o.as="script",o.href=d.p+d.u(s),document.head.appendChild(o)}},d.O.j=s=>0===e[s];var s=(s,o)=>{var n,i,[t,p,c]=o,r=0;if(t.some((s=>0!==e[s]))){for(n in p)d.o(p,n)&&(d.m[n]=p[n]);if(c)var a=c(d)}for(s&&s(o);r<t.length;r++)i=t[r],d.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return d.O(a)},o=self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[];o.forEach(s.bind(null,0)),o.push=s.bind(null,o.push.bind(o))})(),d.O(0,[4826],(()=>{[5910,4567,1e3,3878,769,7531,4226,2066,2269,6606,3249,1037,4946,1621,3208,422,1224,8725,9789,3092,4201,4803,3726,4483,9214,9122,9211,1721,9662,6656,9434,5263,2313,2861,9320,9189,6091,3373,9680,6977,2106,2775,8873,8012,262,4905,3003,9383,8866,7583,9483,7317,9092,8017,2528,4178,9437,4447,9760,5517,322,7044,5988,8623,7487,3705,63,4595,9461,6772,58,6453,3072,3585,1984,6687,1940,4641,1438,3840,4577,2481,1842,7056,2934,8106,4570,7055,3951,7401,9655,869,5806,2142,1841,939,964,6770,3322,5364,5874,1735,1722,7911,1711,3172,5130,9299,9656,9476,9288,9806,4981,5119].map(d.E)}),5);var t=d(7507);return d.O(t)})()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/web-components-ui",
3
- "version": "1.0.294",
3
+ "version": "1.0.295",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -72,8 +72,8 @@
72
72
  "jest-environment-jsdom": "^29.5.0",
73
73
  "prettier": "^3.0.2",
74
74
  "rollup": "^3.21.4",
75
+ "rollup-plugin-img": "^1.1.0",
75
76
  "rollup-plugin-import-css": "^3.2.1",
76
- "rollup-plugin-svg-import": "^3.0.0",
77
77
  "svg-url-loader": "^8.0.0",
78
78
  "webpack": "^5.79.0",
79
79
  "webpack-cli": "^5.0.1",
@@ -102,6 +102,25 @@
102
102
  "lint-staged": "^15.0.0",
103
103
  "lodash.merge": "4.6.2"
104
104
  },
105
+ "overrides": {
106
+ "@vaadin/avatar": "24.3.4",
107
+ "@vaadin/button": "24.3.4",
108
+ "@vaadin/checkbox": "24.3.4",
109
+ "@vaadin/combo-box": "24.3.4",
110
+ "@vaadin/custom-field": "24.3.4",
111
+ "@vaadin/date-picker": "24.3.4",
112
+ "@vaadin/dialog": "24.3.4",
113
+ "@vaadin/email-field": "24.3.4",
114
+ "@vaadin/grid": "24.3.4",
115
+ "@vaadin/icon": "24.3.4",
116
+ "@vaadin/icons": "24.3.4",
117
+ "@vaadin/multi-select-combo-box": "24.3.4",
118
+ "@vaadin/notification": "24.3.4",
119
+ "@vaadin/number-field": "24.3.4",
120
+ "@vaadin/password-field": "24.3.4",
121
+ "@vaadin/text-area": "24.3.4",
122
+ "@vaadin/text-field": "24.3.4"
123
+ },
105
124
  "vaadin": {
106
125
  "disableUsageStatistics": true
107
126
  }
@@ -61,6 +61,10 @@ class RawUserAttribute extends createBaseClass({
61
61
  margin-inline-end: 10px;
62
62
  }
63
63
 
64
+ .hidden {
65
+ visibility: hidden;
66
+ }
67
+
64
68
  descope-text[data-id="label-text"].required:after {
65
69
  content: '*';
66
70
  color: var(${TextClass.cssVarList.textColor});
@@ -154,6 +158,7 @@ class RawUserAttribute extends createBaseClass({
154
158
  this.onIsRequiredChange();
155
159
  this.onBadgeLabelChange();
156
160
  this.onBadgeTooltipTextChange();
161
+ this.handleDeleteButtonVisibility();
157
162
 
158
163
  this.deleteButton.addEventListener('click', () =>
159
164
  this.dispatchEvent(new CustomEvent('delete-clicked', { bubbles: true, composed: true }))
@@ -175,6 +180,10 @@ class RawUserAttribute extends createBaseClass({
175
180
  ].concat(super.observedAttributes);
176
181
  }
177
182
 
183
+ handleDeleteButtonVisibility() {
184
+ this.deleteButton.classList.toggle('hidden', this.isRequired || !this.value);
185
+ }
186
+
178
187
  attributeChangedCallback(name, oldValue, newValue) {
179
188
  super.attributeChangedCallback?.(name, oldValue, newValue);
180
189
 
@@ -193,6 +202,10 @@ class RawUserAttribute extends createBaseClass({
193
202
  } else if (name === 'badge-tooltip-text') {
194
203
  this.onBadgeTooltipTextChange();
195
204
  }
205
+
206
+ if (name === 'value' || name === 'required') {
207
+ this.handleDeleteButtonVisibility();
208
+ }
196
209
  }
197
210
  }
198
211
 
@@ -0,0 +1,201 @@
1
+ import { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';
2
+ import { createBaseClass } from '../../baseClasses/createBaseClass';
3
+ import { compose } from '../../helpers';
4
+ import { getComponentName } from '../../helpers/componentHelpers';
5
+ import greenVIcon from './green-v.svg';
6
+ import { TextClass } from '../descope-text/TextClass';
7
+ import { ButtonClass } from '../descope-button/ButtonClass';
8
+ import { BadgeClass } from '../descope-badge/BadgeClass';
9
+
10
+ export const componentName = getComponentName('user-auth-method');
11
+ class RawUserAuthMethod extends createBaseClass({
12
+ componentName,
13
+ baseSelector: ':host > .root',
14
+ }) {
15
+ constructor() {
16
+ super();
17
+
18
+ this.attachShadow({ mode: 'open' }).innerHTML = `
19
+ <style>
20
+ :host {
21
+ display: inline-flex;
22
+ }
23
+
24
+ vaadin-icon {
25
+ color: currentcolor;
26
+ }
27
+
28
+ .root {
29
+ display: flex;
30
+ width: 100%;
31
+ height: 100%;
32
+ align-items: center;
33
+ }
34
+
35
+ .btn-wrapper {
36
+ display: flex;
37
+ justify-content: space-between;
38
+ align-items: center;
39
+ flex-grow: 0;
40
+ }
41
+
42
+ .text-wrapper {
43
+ display: flex;
44
+ align-items: center;
45
+ flex-grow: 1;
46
+ }
47
+
48
+ descope-text::part(text-wrapper) {
49
+ text-overflow: ellipsis;
50
+ overflow: hidden;
51
+ white-space: nowrap;
52
+ width: initial;
53
+ }
54
+
55
+ descope-text {
56
+ display: inline-flex;
57
+ }
58
+
59
+ .fulfilled-indicator {
60
+ width: 1em;
61
+ height: 1em;
62
+ display: flex;
63
+ align-items: center;
64
+ padding-inline-end: 1em;
65
+ }
66
+
67
+ .hidden {
68
+ display: none;
69
+ }
70
+
71
+ .hidden-btn {
72
+ width: 0;
73
+ }
74
+
75
+ slot[name="method-icon"]{
76
+ display: inline-flex;
77
+ align-items: center;
78
+ }
79
+ </style>
80
+
81
+
82
+ <div class="root">
83
+ <div class="text-wrapper">
84
+ <slot name="method-icon"></slot>
85
+ <descope-text st-text-align="auto" data-id="label-text" variant="body1" mode="primary"></descope-text>
86
+ </div>
87
+
88
+ <div class="btn-wrapper">
89
+ <descope-button size="sm" variant="link" mode="primary">
90
+ <slot name="button-icon"></slot>
91
+ </descope-button>
92
+ <div class="fulfilled-indicator">
93
+ <vaadin-icon src=${greenVIcon}></vaadin-icon>
94
+ </div>
95
+ <descope-button class="hidden-btn"size="sm" variant="link" mode="primary"></descope-button>
96
+ </div>
97
+ </div>
98
+ `;
99
+
100
+ this.button = this.shadowRoot.querySelector('descope-button');
101
+ this.fulfilledIndicator = this.shadowRoot.querySelector('.fulfilled-indicator');
102
+ this.labelText = this.shadowRoot.querySelector('descope-text[data-id="label-text"]');
103
+ }
104
+
105
+ onLabelChange() {
106
+ this.labelText.innerText = this.label;
107
+ this.labelText.setAttribute('title', this.label);
108
+ }
109
+
110
+ onButtonLabelChange() {
111
+ let textSpanEle = this.button.querySelector('span');
112
+
113
+ if (this.buttonLabel) {
114
+ if (!textSpanEle) {
115
+ textSpanEle = document.createElement('span');
116
+ this.button.appendChild(textSpanEle);
117
+ }
118
+ textSpanEle.innerText = this.buttonLabel;
119
+ } else if (textSpanEle) {
120
+ this.button.removeChild(textSpanEle);
121
+ }
122
+ }
123
+
124
+ onFulfilledChange() {
125
+ this.button.classList.toggle('hidden', this.isFulfilled);
126
+ this.fulfilledIndicator.classList.toggle('hidden', !this.isFulfilled);
127
+ }
128
+
129
+ get label() {
130
+ return this.getAttribute('label') || '';
131
+ }
132
+
133
+ get buttonLabel() {
134
+ return this.getAttribute('button-label') || '';
135
+ }
136
+
137
+ get isFulfilled() {
138
+ return this.getAttribute('fulfilled') === 'true';
139
+ }
140
+
141
+ init() {
142
+ this.onLabelChange();
143
+ this.onButtonLabelChange();
144
+ this.onFulfilledChange();
145
+
146
+ this.button.addEventListener('click', () =>
147
+ this.dispatchEvent(new CustomEvent('button-clicked', { bubbles: true, composed: true }))
148
+ );
149
+ }
150
+
151
+ static get observedAttributes() {
152
+ return ['label', 'fulfilled'].concat(super.observedAttributes);
153
+ }
154
+
155
+ attributeChangedCallback(name, oldValue, newValue) {
156
+ super.attributeChangedCallback?.(name, oldValue, newValue);
157
+ if (oldValue === newValue) {
158
+ return;
159
+ }
160
+
161
+ if (name === 'label') {
162
+ this.onLabelChange();
163
+ } else if (name === 'fulfilled') {
164
+ this.onFulfilledChange();
165
+ } else if (name === 'button-label') {
166
+ this.onButtonLabelChange();
167
+ }
168
+ }
169
+ }
170
+
171
+ const { host, textField, buttons, badge, textWrapper, methodIconSlot } = {
172
+ host: { selector: () => ':host' },
173
+ textField: { selector: 'descope-text' },
174
+ buttons: { selector: 'descope-button' },
175
+ badge: { selector: 'descope-badge' },
176
+ textWrapper: { selector: ' .text-wrapper' },
177
+ methodIconSlot: { selector: 'slot[name="method-icon"]' },
178
+ };
179
+
180
+ export const UserAuthMethodClass = compose(
181
+ createStyleMixin({
182
+ mappings: {
183
+ hostWidth: { ...host, property: 'width' },
184
+ hostMinWidth: { ...host, property: 'min-width' },
185
+ hostDirection: [
186
+ { ...host, property: 'direction' },
187
+ { ...textField, property: TextClass.cssVarList.hostDirection },
188
+ { ...buttons, property: ButtonClass.cssVarList.hostDirection },
189
+ { ...badge, property: BadgeClass.cssVarList.hostDirection },
190
+ ],
191
+ labelTextWidth: { ...textField, property: 'width' },
192
+ itemsGap: [{ property: 'gap' }, { ...textWrapper, property: 'gap' }],
193
+ iconSize: [
194
+ { ...methodIconSlot, property: 'width' },
195
+ { ...methodIconSlot, property: 'height' },
196
+ ],
197
+ },
198
+ }),
199
+ draggableMixin,
200
+ componentNameValidationMixin
201
+ )(RawUserAuthMethod);
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8 0C3.6 0 0 3.6 0 8C0 12.4 3.6 16 8 16C12.4 16 16 12.4 16 8C16 3.6 12.4 0 8 0ZM7.1 11.7L2.9 7.6L4.3 6.2L7 8.9L12 4L13.4 5.4L7.1 11.7Z" fill="#4CAF50"/>
3
+ </svg>
@@ -0,0 +1,9 @@
1
+ import { componentName, UserAuthMethodClass } from './UserAuthMethodClass';
2
+ import '../descope-text';
3
+ import '../descope-button';
4
+ import '../descope-badge';
5
+ import '@vaadin/icon';
6
+
7
+ customElements.define(componentName, UserAuthMethodClass);
8
+
9
+ export { UserAuthMethodClass };
package/src/index.cjs.js CHANGED
@@ -39,6 +39,7 @@ export { BadgeClass } from './components/descope-badge/BadgeClass';
39
39
  export { MultiSelectComboBoxClass } from './components/descope-multi-select-combo-box/MultiSelectComboBoxClass';
40
40
  export { AvatarClass } from './components/descope-avatar/AvatarClass';
41
41
  export { UserAttributeClass } from './components/descope-user-attribute/UserAttributeClass';
42
+ export { UserAuthMethodClass } from './components/descope-user-auth-method/UserAuthMethodClass';
42
43
  export { MappingsFieldClass } from './components/mapping-fields/descope-mappings-field/MappingsFieldClass';
43
44
  export { SamlGroupMappingsClass } from './components/mapping-fields/descope-saml-group-mappings/SamlGroupMappingsClass';
44
45
  export { PolicyValidationClass } from './components/descope-policy-validation/PolicyValidationClass';
package/src/index.js CHANGED
@@ -34,6 +34,7 @@ export * from './components/descope-notification';
34
34
  export * from './components/descope-avatar';
35
35
  export * from './components/mapping-fields/descope-mappings-field';
36
36
  export * from './components/descope-user-attribute';
37
+ export * from './components/descope-user-auth-method';
37
38
  export * from './components/mapping-fields/descope-saml-group-mappings';
38
39
  export * from './components/descope-policy-validation';
39
40
 
@@ -33,6 +33,7 @@ import * as badge from './badge';
33
33
  import * as avatar from './avatar';
34
34
  import * as mappingsField from './mappingsField';
35
35
  import * as userAttribute from './userAttribute';
36
+ import * as userAuthMethod from './userAuthMethod';
36
37
  import * as samlGroupMappings from './samlGroupMappings';
37
38
  import * as policyValidation from './policyValidation';
38
39
 
@@ -73,6 +74,7 @@ const components = {
73
74
  avatar,
74
75
  mappingsField,
75
76
  userAttribute,
77
+ userAuthMethod,
76
78
  samlGroupMappings,
77
79
  policyValidation,
78
80
  };
@@ -0,0 +1,19 @@
1
+ import globals from '../globals';
2
+ import { UserAuthMethodClass } from '../../components/descope-user-auth-method/UserAuthMethodClass';
3
+ import { getThemeRefs } from '../../helpers/themeHelpers';
4
+
5
+ const globalRefs = getThemeRefs(globals);
6
+ export const vars = UserAuthMethodClass.cssVarList;
7
+
8
+ const userAuthMethod = {
9
+ [vars.hostDirection]: globalRefs.direction,
10
+ [vars.labelTextWidth]: '200px',
11
+ [vars.itemsGap]: '16px',
12
+ [vars.hostMinWidth]: '530px',
13
+ [vars.iconSize]: '24px',
14
+ _fullWidth: {
15
+ [vars.hostWidth]: '100%',
16
+ },
17
+ };
18
+
19
+ export default userAuthMethod;