@descope/web-components-ui 3.20.3 → 3.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/dist/cjs/index.cjs.js +414 -27
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +414 -27
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/1411.js +339 -0
  6. package/dist/umd/1411.js.map +1 -0
  7. package/dist/umd/189.js +171 -0
  8. package/dist/umd/189.js.map +1 -0
  9. package/dist/umd/2894.js +339 -0
  10. package/dist/umd/2894.js.map +1 -0
  11. package/dist/umd/3792.js +339 -0
  12. package/dist/umd/3792.js.map +1 -0
  13. package/dist/umd/{9117.js → 384.js} +121 -9
  14. package/dist/umd/{descope-tooltip.js.LICENSE.txt → 384.js.LICENSE.txt} +2 -2
  15. package/dist/umd/384.js.map +1 -0
  16. package/dist/umd/4268.js +339 -0
  17. package/dist/umd/4268.js.LICENSE.txt +11 -0
  18. package/dist/umd/4268.js.map +1 -0
  19. package/dist/umd/513.js +339 -0
  20. package/dist/umd/513.js.LICENSE.txt +11 -0
  21. package/dist/umd/513.js.map +1 -0
  22. package/dist/umd/6227.js +320 -0
  23. package/dist/umd/6227.js.map +1 -0
  24. package/dist/umd/6535.js +115 -0
  25. package/dist/umd/{9275.js.LICENSE.txt → 6535.js.LICENSE.txt} +0 -6
  26. package/dist/umd/6535.js.map +1 -0
  27. package/dist/umd/6649.js +339 -0
  28. package/dist/umd/6649.js.LICENSE.txt +11 -0
  29. package/dist/umd/6649.js.map +1 -0
  30. package/dist/umd/7125.js +339 -0
  31. package/dist/umd/7125.js.LICENSE.txt +11 -0
  32. package/dist/umd/7125.js.map +1 -0
  33. package/dist/umd/{5263.js → 8264.js} +5 -5
  34. package/dist/umd/8264.js.map +1 -0
  35. package/dist/umd/8983.js +7 -324
  36. package/dist/umd/8983.js.map +1 -1
  37. package/dist/umd/9030.js +339 -0
  38. package/dist/umd/9030.js.LICENSE.txt +11 -0
  39. package/dist/umd/9030.js.map +1 -0
  40. package/dist/umd/9380.js +130 -0
  41. package/dist/umd/9380.js.map +1 -0
  42. package/dist/umd/9506.js +339 -0
  43. package/dist/umd/9506.js.LICENSE.txt +11 -0
  44. package/dist/umd/9506.js.map +1 -0
  45. package/dist/umd/DescopeDev.js +1 -1
  46. package/dist/umd/DescopeDev.js.map +1 -1
  47. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
  48. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
  49. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
  50. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
  51. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -338
  52. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
  53. package/dist/umd/descope-apps-list.js +161 -1
  54. package/dist/umd/descope-apps-list.js.LICENSE.txt +17 -0
  55. package/dist/umd/descope-apps-list.js.map +1 -1
  56. package/dist/umd/descope-avatar.js +5 -20
  57. package/dist/umd/descope-avatar.js.LICENSE.txt +0 -12
  58. package/dist/umd/descope-avatar.js.map +1 -1
  59. package/dist/umd/descope-button.js +3 -3
  60. package/dist/umd/descope-button.js.LICENSE.txt +6 -0
  61. package/dist/umd/descope-button.js.map +1 -1
  62. package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
  63. package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
  64. package/dist/umd/descope-email-field-index-js.js +4 -4
  65. package/dist/umd/descope-email-field-index-js.js.map +1 -1
  66. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +4 -321
  67. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js.LICENSE.txt +0 -6
  68. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js.map +1 -1
  69. package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js +5 -322
  70. package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js.map +1 -1
  71. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +4 -321
  72. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.LICENSE.txt +0 -6
  73. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.map +1 -1
  74. package/dist/umd/descope-hybrid-field-index-js.js +2 -2
  75. package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
  76. package/dist/umd/descope-multi-line-mappings.js +1 -1
  77. package/dist/umd/descope-multi-line-mappings.js.map +1 -1
  78. package/dist/umd/descope-multi-sso.js +1 -338
  79. package/dist/umd/descope-multi-sso.js.map +1 -1
  80. package/dist/umd/descope-outbound-app-button.js +1 -338
  81. package/dist/umd/descope-outbound-app-button.js.map +1 -1
  82. package/dist/umd/descope-recovery-codes.js +1 -1
  83. package/dist/umd/descope-recovery-codes.js.map +1 -1
  84. package/dist/umd/descope-timer-button.js +1 -338
  85. package/dist/umd/descope-timer-button.js.map +1 -1
  86. package/dist/umd/descope-tooltip.js +1 -2
  87. package/dist/umd/descope-tooltip.js.map +1 -1
  88. package/dist/umd/descope-upload-file-index-js.js +1 -338
  89. package/dist/umd/descope-upload-file-index-js.js.map +1 -1
  90. package/dist/umd/descope-user-attribute-index-js.js +1 -338
  91. package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
  92. package/dist/umd/descope-user-auth-method-index-js.js +1 -338
  93. package/dist/umd/descope-user-auth-method-index-js.js.map +1 -1
  94. package/dist/umd/descope-user-passkeys.js +1 -338
  95. package/dist/umd/descope-user-passkeys.js.map +1 -1
  96. package/dist/umd/index.js +1 -1
  97. package/dist/umd/index.js.map +1 -1
  98. package/package.json +42 -42
  99. package/src/components/descope-email-field/EmailFieldClass.js +50 -2
  100. package/src/components/descope-email-field/emailPattern.js +7 -0
  101. package/stories/descope-email-field.stories.js +8 -0
  102. package/dist/umd/1453.js +0 -177
  103. package/dist/umd/1453.js.LICENSE.txt +0 -29
  104. package/dist/umd/1453.js.map +0 -1
  105. package/dist/umd/5263.js.map +0 -1
  106. package/dist/umd/6063.js +0 -18
  107. package/dist/umd/6063.js.map +0 -1
  108. package/dist/umd/6818.js +0 -3
  109. package/dist/umd/6818.js.map +0 -1
  110. package/dist/umd/8248.js +0 -171
  111. package/dist/umd/8248.js.map +0 -1
  112. package/dist/umd/8968.js +0 -432
  113. package/dist/umd/8968.js.map +0 -1
  114. package/dist/umd/9117.js.map +0 -1
  115. package/dist/umd/9275.js +0 -18
  116. package/dist/umd/9275.js.map +0 -1
  117. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.LICENSE.txt +0 -5
  118. package/dist/umd/descope-multi-sso.js.LICENSE.txt +0 -5
  119. package/dist/umd/descope-outbound-app-button.js.LICENSE.txt +0 -5
  120. package/dist/umd/descope-timer-button.js.LICENSE.txt +0 -5
  121. package/dist/umd/descope-upload-file-index-js.js.LICENSE.txt +0 -5
  122. package/dist/umd/descope-user-attribute-index-js.js.LICENSE.txt +0 -5
  123. package/dist/umd/descope-user-passkeys.js.LICENSE.txt +0 -5
  124. /package/dist/umd/{8968.js.LICENSE.txt → 1411.js.LICENSE.txt} +0 -0
  125. /package/dist/umd/{6063.js.LICENSE.txt → 189.js.LICENSE.txt} +0 -0
  126. /package/dist/umd/{9117.js.LICENSE.txt → 2894.js.LICENSE.txt} +0 -0
  127. /package/dist/umd/{descope-user-auth-method-index-js.js.LICENSE.txt → 3792.js.LICENSE.txt} +0 -0
  128. /package/dist/umd/{6818.js.LICENSE.txt → 6227.js.LICENSE.txt} +0 -0
  129. /package/dist/umd/{5263.js.LICENSE.txt → 8264.js.LICENSE.txt} +0 -0
  130. /package/dist/umd/{8248.js.LICENSE.txt → 9380.js.LICENSE.txt} +0 -0
@@ -1,339 +1,2 @@
1
- /*! For license information please see descope-outbound-app-button.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1202,5087,6724,8634],{19624(t,e,o){o.d(e,{J:()=>p,T:()=>l});var r=o(63200),n=o(25964),i=o(88961),a=o(98538),s=o(10767);const l=(0,n.xE)("button"),{host:c,label:d,slottedIcon:h}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let u;const p=(0,r.Zz)((0,i.DM)({triggers:[{attr:"full-width",value:"true"}]}),(0,i.RF)({mappings:{hostWidth:{property:"width"},hostMaxWidth:{...c,property:"max-width"},hostHeight:{property:"height"},hostDirection:{...c,property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>"::slotted(*)",property:a.S.cssVarList.fill},labelTextDecoration:{...d,property:"text-decoration"},labelSpacing:{...d,property:"gap"},textAlign:{...d,property:"justify-content",fallback:"center"},iconSize:[{...h,property:"width"},{...h,property:"height"}]}}),s.G,i.VO,i.tQ)((0,i.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${u}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${p.cssVarList.outlineWidth}) + var(${p.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${p.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${p.cssVarList.hostHeight}) - var(${p.cssVarList.outlineWidth}) - var(${p.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${p.cssVarList.hostWidth}) - var(${p.cssVarList.outlineWidth}) - var(${p.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex","class","style"],componentName:l})),{color:m,fontSize:b}=p.cssVarList;u=`\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\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\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-style: solid;\n\t\tcolor: var(${m});\n\t\ttop: calc(50% - (var(${b}) / 2));\n\t\tleft: calc(50% - (var(${b}) / 2));\n\t\tborder-width: calc(var(${b}) / 10);\n\t\twidth: var(${b});\n\t\theight: var(${b});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"]) ::part(prefix),\n\t:host([loading="true"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},10767(t,e,o){o.d(e,{G:()=>r});const r=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},30576(t,e,o){o.r(e),o.d(e,{ButtonClass:()=>r.J,componentName:()=>r.T});var r=o(19624);o(83799),customElements.define(r.T,r.J)},98538(t,e,o){o.d(e,{S:()=>l,T:()=>s});var r=o(88961),n=o(25964),i=o(8512),a=o(63200);const s=(0,n.xE)("icon"),l=(0,a.Zz)((0,r.RF)({mappings:{fill:[{},{property:i.q.cssVarList.fill}],height:{selector:()=>":host"},width:{selector:()=>":host"}}}),r.VO,r.tQ)((0,r.tz)({slots:[],wrappedEleName:"descope-image",style:()=>"\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n ",excludeAttrsSync:["tabindex","class","style","st-height","st-width"],componentName:s}))},56737(t,e,o){o.r(e),o.d(e,{IconClass:()=>r.S,componentName:()=>r.T}),o(53455);var r=o(98538);customElements.define(r.T,r.S)},8512(t,e,o){o.d(e,{T:()=>l,q:()=>h});var r=o(88961),n=o(72270),i=o(63200),a=o(25964),s=o(18782);const l=(0,a.xE)("image"),c=["src","src-dark"];class d extends((0,n.qu)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return c}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,a.fz)("\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n ",this)}init(){super.init?.(),this.toggleVisibility(this.getSrc)}onThemeChange(){this.renderImage()}toggleVisibility(t){t?this.classList.remove("hidden"):this.classList.add("hidden")}get altText(){return this.getAttribute("alt")||""}get legacySrc(){return this.getAttribute("src")}get themeSrc(){return this.getAttribute(`src-${this.currentThemeName}`)}get getSrc(){return this.themeSrc||this.legacySrc}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach(t=>{t.setAttribute("fill",`var(${h.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)})}renderImage(){this.toggleVisibility(this.getSrc),(0,s.m)(this.getSrc,this.altText).then(t=>{this.innerHTML="",t&&(this.updateFillColor(t),this.appendChild(t))})}shouldRender(t){const e=this.getAttribute(t);return this.getSrc===e}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),e!==o&&this.shouldRender(t)&&this.renderImage()}}const h=(0,i.Zz)((0,r.RF)({mappings:{fill:{},height:{selector:()=>":host"},width:{selector:()=>":host"}}}),r.VO,r.tQ)(d)},18782(t,e,o){o.d(e,{m:()=>i});var r=o(25414);const n=t=>{const e=r.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["image"],FORBID_TAGS:["defs"]});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},i=async(t,e)=>{try{let o;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const e=atob(t.slice(26));o=n(e)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const e=await fetch(t),r=await e.text();o=n(r)}else o=((t,e)=>{const o=document.createElement("img");return o.setAttribute("src",t),o.setAttribute("alt",e),o})(t,e);return o.style.setProperty("max-width","100%"),o.style.setProperty("max-height","100%"),o}catch{return null}}},53455(t,e,o){o.r(e),o.d(e,{ImageClass:()=>r.q,componentName:()=>r.T});var r=o(8512);customElements.define(r.T,r.q)},81422(t,e,o){o.r(e),o.d(e,{OutboundAppButtonClass:()=>d,componentName:()=>l});var r=o(88961),n=o(25964),i=o(63200),a=o(72270),s=o(19624);const l=(0,n.xE)("outbound-app-button");class c extends((0,a.qu)({componentName:l,baseSelector:":host > descope-button"})){static get observedAttributes(){return["label","icon-src","icon-fill-current-color"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <descope-button>\n <descope-icon class="icon"></descope-icon>\n <span class="label"></span>\n </descope-button>\n ',(0,n.fz)("\n :host {\n display: inline-block;\n }\n .hidden {\n display: none;\n }\n ",this),this.button=this.shadowRoot.querySelector("descope-button"),this.icon=this.shadowRoot.querySelector(".icon"),this.label=this.shadowRoot.querySelector(".label")}init(){super.init?.(),(0,n.EA)(this,this.button,{excludeAttrs:["style","class","label","icon-src","icon-fill-current-color"]})}updateLabel(t=""){this.label.textContent=t,this.label.classList.toggle("hidden",!t)}updateIcon(t=""){this.icon.setAttribute("src",t),this.icon.classList.toggle("hidden",!t)}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),e!==o&&("label"===t?this.updateLabel(o):"icon-src"===t&&this.updateIcon(o))}}const d=(0,i.Zz)((0,r.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},iconFillCurrentColor:{selector:()=>"descope-icon",property:s.J.cssVarList.iconColor}}}),r.VO,r.tQ)(c);o(30576),o(56737),customElements.define(l,d)},89389(t,e,o){o.d(e,{$:()=>m});var r=o(13256),n=o(55774),i=o(82901),a=o(72562),s=o(81488),l=o(87550);const c=o(51450).AH`
3
- :host {
4
- display: inline-block;
5
- position: relative;
6
- outline: none;
7
- white-space: nowrap;
8
- -webkit-user-select: none;
9
- -moz-user-select: none;
10
- user-select: none;
11
- }
12
-
13
- :host([hidden]) {
14
- display: none !important;
15
- }
16
-
17
- /* Aligns the button with form fields when placed on the same line.
18
- Note, to make it work, the form fields should have the same "::before" pseudo-element. */
19
- .vaadin-button-container::before {
20
- content: '\\2003';
21
- display: inline-block;
22
- width: 0;
23
- max-height: 100%;
24
- }
25
-
26
- .vaadin-button-container {
27
- display: inline-flex;
28
- align-items: center;
29
- justify-content: center;
30
- text-align: center;
31
- width: 100%;
32
- height: 100%;
33
- min-height: inherit;
34
- text-shadow: inherit;
35
- }
36
-
37
- [part='prefix'],
38
- [part='suffix'] {
39
- flex: none;
40
- }
41
-
42
- [part='label'] {
43
- white-space: nowrap;
44
- overflow: hidden;
45
- text-overflow: ellipsis;
46
- }
47
-
48
- @media (forced-colors: active) {
49
- :host {
50
- outline: 1px solid;
51
- outline-offset: -1px;
52
- }
53
-
54
- :host([focused]) {
55
- outline-width: 2px;
56
- }
57
-
58
- :host([disabled]) {
59
- outline-color: GrayText;
60
- }
61
- }
62
- `;var d=o(84467),h=o(53149),u=o(36176);const p=t=>class extends((0,d.e)((0,u.l)((0,h.y)(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}};(0,l.SF)("vaadin-button",c,{moduleId:"vaadin-button-styles"});class m extends(p((0,a.q)((0,l.cp)((0,n.w)(r.Pu))))){static get is(){return"vaadin-button"}static get template(){return r.qy`
63
- <div class="vaadin-button-container">
64
- <span part="prefix" aria-hidden="true">
65
- <slot name="prefix"></slot>
66
- </span>
67
- <span part="label">
68
- <slot></slot>
69
- </span>
70
- <span part="suffix" aria-hidden="true">
71
- <slot name="suffix"></slot>
72
- </span>
73
- </div>
74
- <slot name="tooltip"></slot>
75
- `}ready(){super.ready(),this._tooltipController=new s.I(this),this.addController(this._tooltipController)}}(0,i.X)(m)},93555(t,e,o){o.d(e,{x:()=>n}),o(64511),o(42068),o(9433),o(3241),o(83315);var r=o(87550);const n=r.AH`
76
- :host {
77
- /* Sizing */
78
- --lumo-button-size: var(--lumo-size-m);
79
- min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));
80
- height: var(--_button-size);
81
- padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));
82
- margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);
83
- box-sizing: border-box;
84
- /* Style */
85
- font-family: var(--lumo-font-family);
86
- font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));
87
- font-weight: var(--vaadin-button-font-weight, 500);
88
- color: var(--_lumo-button-text-color);
89
- background: var(--_lumo-button-background);
90
- border: var(--vaadin-button-border, none);
91
- border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));
92
- cursor: var(--lumo-clickable-cursor);
93
- -webkit-tap-highlight-color: transparent;
94
- -webkit-font-smoothing: antialiased;
95
- -moz-osx-font-smoothing: grayscale;
96
- flex-shrink: 0;
97
- --_button-size: var(--vaadin-button-height, var(--lumo-button-size));
98
- --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
99
- --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
100
- /* Used by notification */
101
- --_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));
102
- --_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));
103
- --_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));
104
- --_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));
105
- }
106
-
107
- /* Set only for the internal parts so we don't affect the host vertical alignment */
108
- [part='label'],
109
- [part='prefix'],
110
- [part='suffix'] {
111
- line-height: var(--lumo-line-height-xs);
112
- }
113
-
114
- [part='label'] {
115
- padding: calc(var(--lumo-button-size) / 6) 0;
116
- }
117
-
118
- :host([theme~='small']) {
119
- font-size: var(--lumo-font-size-s);
120
- --lumo-button-size: var(--lumo-size-s);
121
- }
122
-
123
- :host([theme~='large']) {
124
- font-size: var(--lumo-font-size-l);
125
- --lumo-button-size: var(--lumo-size-l);
126
- }
127
-
128
- /* For interaction states */
129
- :host::before,
130
- :host::after {
131
- content: '';
132
- /* We rely on the host always being relative */
133
- position: absolute;
134
- z-index: 1;
135
- inset: 0;
136
- background-color: currentColor;
137
- border-radius: inherit;
138
- opacity: 0;
139
- pointer-events: none;
140
- }
141
-
142
- /* Hover */
143
-
144
- @media (any-hover: hover) {
145
- :host(:hover)::before {
146
- opacity: 0.02;
147
- }
148
- }
149
-
150
- /* Active */
151
-
152
- :host::after {
153
- transition: opacity 1.4s, transform 0.1s;
154
- filter: blur(8px);
155
- }
156
-
157
- :host([active])::before {
158
- opacity: 0.05;
159
- transition-duration: 0s;
160
- }
161
-
162
- :host([active])::after {
163
- opacity: 0.1;
164
- transition-duration: 0s, 0s;
165
- transform: scale(0);
166
- }
167
-
168
- /* Keyboard focus */
169
-
170
- :host([focus-ring]) {
171
- box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
172
- }
173
-
174
- :host([theme~='primary'][focus-ring]) {
175
- box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
176
- }
177
-
178
- /* Types (primary, tertiary, tertiary-inline */
179
-
180
- :host([theme~='tertiary']),
181
- :host([theme~='tertiary-inline']) {
182
- --_background: transparent !important;
183
- background: var(--vaadin-button-tertiary-background, var(--_background));
184
- min-width: 0;
185
- }
186
-
187
- :host([theme~='tertiary']) {
188
- border: var(--vaadin-button-tertiary-border, none);
189
- color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));
190
- font-weight: var(--vaadin-button-tertiary-font-weight, 500);
191
- padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));
192
- }
193
-
194
- :host([theme~='tertiary-inline'])::before {
195
- display: none;
196
- }
197
-
198
- :host([theme~='tertiary-inline']) {
199
- margin: 0;
200
- height: auto;
201
- padding: 0;
202
- line-height: inherit;
203
- font-size: inherit;
204
- }
205
-
206
- :host([theme~='tertiary-inline']) [part='label'] {
207
- padding: 0;
208
- overflow: visible;
209
- line-height: inherit;
210
- }
211
-
212
- :host([theme~='primary']) {
213
- background: var(--_lumo-button-primary-background);
214
- border: var(--vaadin-button-primary-border, none);
215
- color: var(--_lumo-button-primary-text-color);
216
- font-weight: var(--vaadin-button-primary-font-weight, 600);
217
- min-width: calc(var(--lumo-button-size) * 2.5);
218
- }
219
-
220
- :host([theme~='primary'])::before {
221
- background-color: black;
222
- }
223
-
224
- @media (any-hover: hover) {
225
- :host([theme~='primary']:hover)::before {
226
- opacity: 0.05;
227
- }
228
- }
229
-
230
- :host([theme~='primary'][active])::before {
231
- opacity: 0.1;
232
- }
233
-
234
- :host([theme~='primary'][active])::after {
235
- opacity: 0.2;
236
- }
237
-
238
- /* Colors (success, error, contrast) */
239
-
240
- :host([theme~='success']) {
241
- color: var(--lumo-success-text-color);
242
- }
243
-
244
- :host([theme~='success'][theme~='primary']) {
245
- background-color: var(--lumo-success-color);
246
- color: var(--lumo-success-contrast-color);
247
- }
248
-
249
- :host([theme~='error']) {
250
- color: var(--lumo-error-text-color);
251
- }
252
-
253
- :host([theme~='error'][theme~='primary']) {
254
- background-color: var(--lumo-error-color);
255
- color: var(--lumo-error-contrast-color);
256
- }
257
-
258
- :host([theme~='contrast']) {
259
- color: var(--lumo-contrast);
260
- }
261
-
262
- :host([theme~='contrast'][theme~='primary']) {
263
- background-color: var(--lumo-contrast);
264
- color: var(--lumo-base-color);
265
- }
266
-
267
- /* Disabled state. Keep selectors after other color variants. */
268
-
269
- :host([disabled]) {
270
- pointer-events: none;
271
- color: var(--lumo-disabled-text-color);
272
- }
273
-
274
- :host([theme~='primary'][disabled]) {
275
- background-color: var(--lumo-contrast-30pct);
276
- color: var(--lumo-base-color);
277
- }
278
-
279
- :host([theme~='primary'][disabled]) [part] {
280
- opacity: 0.7;
281
- }
282
-
283
- /* Icons */
284
-
285
- [part] ::slotted(vaadin-icon) {
286
- display: inline-block;
287
- width: var(--lumo-icon-size-m);
288
- height: var(--lumo-icon-size-m);
289
- }
290
-
291
- /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
292
- [part] ::slotted(vaadin-icon[icon^='vaadin:']) {
293
- padding: 0.25em;
294
- box-sizing: border-box !important;
295
- }
296
-
297
- [part='prefix'] {
298
- margin-left: -0.25em;
299
- margin-right: 0.25em;
300
- }
301
-
302
- [part='suffix'] {
303
- margin-left: 0.25em;
304
- margin-right: -0.25em;
305
- }
306
-
307
- /* Icon-only */
308
-
309
- :host([theme~='icon']:not([theme~='tertiary-inline'])) {
310
- min-width: var(--lumo-button-size);
311
- padding-left: calc(var(--lumo-button-size) / 4);
312
- padding-right: calc(var(--lumo-button-size) / 4);
313
- }
314
-
315
- :host([theme~='icon']) [part='prefix'],
316
- :host([theme~='icon']) [part='suffix'] {
317
- margin-left: 0;
318
- margin-right: 0;
319
- }
320
-
321
- /* RTL specific styles */
322
-
323
- :host([dir='rtl']) [part='prefix'] {
324
- margin-left: 0.25em;
325
- margin-right: -0.25em;
326
- }
327
-
328
- :host([dir='rtl']) [part='suffix'] {
329
- margin-left: -0.25em;
330
- margin-right: 0.25em;
331
- }
332
-
333
- :host([dir='rtl'][theme~='icon']) [part='prefix'],
334
- :host([dir='rtl'][theme~='icon']) [part='suffix'] {
335
- margin-left: 0;
336
- margin-right: 0;
337
- }
338
- `;(0,r.SF)("vaadin-button",n,{moduleId:"lumo-button"})},83799(t,e,o){o(93555),o(89389)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1202,6724,8634],{19624(t,e,n){n.d(e,{J:()=>u,T:()=>l});var s=n(63200),i=n(25964),o=n(88961),r=n(98538),a=n(10767);const l=(0,i.xE)("button"),{host:c,label:d,slottedIcon:h}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let p;const u=(0,s.Zz)((0,o.DM)({triggers:[{attr:"full-width",value:"true"}]}),(0,o.RF)({mappings:{hostWidth:{property:"width"},hostMaxWidth:{...c,property:"max-width"},hostHeight:{property:"height"},hostDirection:{...c,property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>"::slotted(*)",property:r.S.cssVarList.fill},labelTextDecoration:{...d,property:"text-decoration"},labelSpacing:{...d,property:"gap"},textAlign:{...d,property:"justify-content",fallback:"center"},iconSize:[{...h,property:"width"},{...h,property:"height"}]}}),a.G,o.VO,o.tQ)((0,o.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${p}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${u.cssVarList.outlineWidth}) + var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${u.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${u.cssVarList.hostHeight}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${u.cssVarList.hostWidth}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex","class","style"],componentName:l})),{color:b,fontSize:g}=u.cssVarList;p=`\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\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\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-style: solid;\n\t\tcolor: var(${b});\n\t\ttop: calc(50% - (var(${g}) / 2));\n\t\tleft: calc(50% - (var(${g}) / 2));\n\t\tborder-width: calc(var(${g}) / 10);\n\t\twidth: var(${g});\n\t\theight: var(${g});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"]) ::part(prefix),\n\t:host([loading="true"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},10767(t,e,n){n.d(e,{G:()=>s});const s=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},30576(t,e,n){n.r(e),n.d(e,{ButtonClass:()=>s.J,componentName:()=>s.T});var s=n(19624);n(83799),customElements.define(s.T,s.J)},98538(t,e,n){n.d(e,{S:()=>l,T:()=>a});var s=n(88961),i=n(25964),o=n(8512),r=n(63200);const a=(0,i.xE)("icon"),l=(0,r.Zz)((0,s.RF)({mappings:{fill:[{},{property:o.q.cssVarList.fill}],height:{selector:()=>":host"},width:{selector:()=>":host"}}}),s.VO,s.tQ)((0,s.tz)({slots:[],wrappedEleName:"descope-image",style:()=>"\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n ",excludeAttrsSync:["tabindex","class","style","st-height","st-width"],componentName:a}))},56737(t,e,n){n.r(e),n.d(e,{IconClass:()=>s.S,componentName:()=>s.T}),n(53455);var s=n(98538);customElements.define(s.T,s.S)},8512(t,e,n){n.d(e,{T:()=>l,q:()=>h});var s=n(88961),i=n(72270),o=n(63200),r=n(25964),a=n(18782);const l=(0,r.xE)("image"),c=["src","src-dark"];class d extends((0,i.qu)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return c}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,r.fz)("\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n ",this)}init(){super.init?.(),this.toggleVisibility(this.getSrc)}onThemeChange(){this.renderImage()}toggleVisibility(t){t?this.classList.remove("hidden"):this.classList.add("hidden")}get altText(){return this.getAttribute("alt")||""}get legacySrc(){return this.getAttribute("src")}get themeSrc(){return this.getAttribute(`src-${this.currentThemeName}`)}get getSrc(){return this.themeSrc||this.legacySrc}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach(t=>{t.setAttribute("fill",`var(${h.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)})}renderImage(){this.toggleVisibility(this.getSrc),(0,a.m)(this.getSrc,this.altText).then(t=>{this.innerHTML="",t&&(this.updateFillColor(t),this.appendChild(t))})}shouldRender(t){const e=this.getAttribute(t);return this.getSrc===e}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&this.shouldRender(t)&&this.renderImage()}}const h=(0,o.Zz)((0,s.RF)({mappings:{fill:{},height:{selector:()=>":host"},width:{selector:()=>":host"}}}),s.VO,s.tQ)(d)},18782(t,e,n){n.d(e,{m:()=>o});var s=n(25414);const i=t=>{const e=s.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["image"],FORBID_TAGS:["defs"]});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},o=async(t,e)=>{try{let n;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const e=atob(t.slice(26));n=i(e)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const e=await fetch(t),s=await e.text();n=i(s)}else n=((t,e)=>{const n=document.createElement("img");return n.setAttribute("src",t),n.setAttribute("alt",e),n})(t,e);return n.style.setProperty("max-width","100%"),n.style.setProperty("max-height","100%"),n}catch{return null}}},53455(t,e,n){n.r(e),n.d(e,{ImageClass:()=>s.q,componentName:()=>s.T});var s=n(8512);customElements.define(s.T,s.q)},81422(t,e,n){n.r(e),n.d(e,{OutboundAppButtonClass:()=>d,componentName:()=>l});var s=n(88961),i=n(25964),o=n(63200),r=n(72270),a=n(19624);const l=(0,i.xE)("outbound-app-button");class c extends((0,r.qu)({componentName:l,baseSelector:":host > descope-button"})){static get observedAttributes(){return["label","icon-src","icon-fill-current-color"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <descope-button>\n <descope-icon class="icon"></descope-icon>\n <span class="label"></span>\n </descope-button>\n ',(0,i.fz)("\n :host {\n display: inline-block;\n }\n .hidden {\n display: none;\n }\n ",this),this.button=this.shadowRoot.querySelector("descope-button"),this.icon=this.shadowRoot.querySelector(".icon"),this.label=this.shadowRoot.querySelector(".label")}init(){super.init?.(),(0,i.EA)(this,this.button,{excludeAttrs:["style","class","label","icon-src","icon-fill-current-color"]})}updateLabel(t=""){this.label.textContent=t,this.label.classList.toggle("hidden",!t)}updateIcon(t=""){this.icon.setAttribute("src",t),this.icon.classList.toggle("hidden",!t)}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&("label"===t?this.updateLabel(n):"icon-src"===t&&this.updateIcon(n))}}const d=(0,o.Zz)((0,s.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},iconFillCurrentColor:{selector:()=>"descope-icon",property:a.J.cssVarList.iconColor}}}),s.VO,s.tQ)(c);n(30576),n(56737),customElements.define(l,d)}}]);
339
2
  //# sourceMappingURL=descope-outbound-app-button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"descope-outbound-app-button.js","m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AAI,SAIAtI,KAAA8H,YAAAS,SAAAL,EAAAM,OACAN,EAAAO,iBAIAzI,KAAAE,QAEA,ICzEA,EAAAwI,EAAAC,IAAc,gBAAkB5B,EAAY,CAAI6B,SAAA,yBAqChD,MAAAC,UAAqB5B,GAAY,EAAA6B,EAAAjI,IAAa,EAAA6H,EAAAK,KAAc,EAAAC,EAAAC,GAAgBC,EAAAC,QAC5E,aAAAC,GACA,qBACA,CAEA,mBAAAC,GACA,OAA0BH,EAAAI,EFYnB;;;;;;;;;;;;;CEXP,CAGA,KAAAvB,GACA5H,MAAA4H,QAEA/H,KAAAuJ,mBAAA,IAAkCC,EAAAC,EAAiBzJ,MACnDA,KAAA0J,cAAA1J,KAAAuJ,mBACA,GAGA,EAAAI,EAAAC,GAAmBf,4FC9DnB,MAAA5C,EAAe4D,EAAA7C,EAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyQlB,EAAA6C,EAAAlB,IAAc,gBAAA1C,EAAA,CAA4B2C,SAAA","sources":["webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-outbound-app-button/src/component/OutboundAppButtonClass.js","webpack://@descope/web-components-ui/../components/descope-outbound-app-button/src/component/index.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/button/src/vaadin-button-base.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/button/src/vaadin-button-mixin.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/button/src/vaadin-button.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/button/theme/lumo/vaadin-button-styles.js"],"sourcesContent":["import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n`;\n\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostMaxWidth: { ...host, property: 'max-width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n\n cursor: {},\n backgroundColor: {},\n\n outlineOffset: {},\n outlineColor: {},\n outlineStyle: {},\n outlineWidth: {},\n\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-right', fallback: '0.875em' },\n { property: 'padding-left', fallback: '0.875em' },\n ],\n\n labelTextColor: { property: 'color' },\n iconColor: {\n selector: () => `::slotted(*)`,\n property: IconClass.cssVarList.fill,\n },\n labelTextDecoration: { ...label, property: 'text-decoration' },\n labelSpacing: { ...label, property: 'gap' },\n textAlign: { ...label, property: 'justify-content', fallback: 'center' },\n\n iconSize: [\n { ...slottedIcon, property: 'width' },\n { ...slottedIcon, property: 'height' },\n ],\n },\n }),\n clickableMixin,\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: ['', 'prefix', 'label', 'suffix'],\n wrappedEleName: 'vaadin-button',\n style: () => `\n\t\t\t${resetStyles}\n\t\t\t${iconStyles}\n\t\t\t${loadingIndicatorStyles}\n\t\t\t${editorOverrides}\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width=\"true\"]) {\n width: var(${ButtonClass.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square=\"true\"]:not([full-width=\"true\"]) {\n\t\t\t\twidth: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex', 'class', 'style'],\n componentName,\n }),\n);\n\nconst { color, fontSize } = ButtonClass.cssVarList;\nloadingIndicatorStyles = `\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\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\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-style: solid;\n\t\tcolor: var(${color});\n\t\ttop: calc(50% - (var(${fontSize}) / 2));\n\t\tleft: calc(50% - (var(${fontSize}) / 2));\n\t\tborder-width: calc(var(${fontSize}) / 10);\n\t\twidth: var(${fontSize});\n\t\theight: var(${fontSize});\n\t}\n\t:host([disabled=\"true\"]),\n\t:host([loading=\"true\"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading=\"true\"]) ::part(prefix),\n\t:host([loading=\"true\"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`;\n","export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","import {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { ImageClass } from '@descope-ui/descope-image/class';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('icon');\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: [{}, { property: ImageClass.cssVarList.fill }],\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class', 'style', 'st-height', 'st-width'],\n componentName,\n }),\n);\n","import '@descope-ui/descope-image';\n\nimport { componentName, IconClass } from './IconClass';\n\ncustomElements.define(componentName, IconClass);\n\nexport { IconClass, componentName };\n"," \nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { createImage } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('image');\n\nconst srcAttrs = ['src', 'src-dark'];\n\nclass RawImage extends createBaseClass({\n componentName,\n baseSelector: 'slot',\n}) {\n static get observedAttributes() {\n return srcAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<slot></slot>\n\t`;\n\n injectStyle(\n `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n `,\n this,\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.getSrc);\n }\n\n onThemeChange() {\n this.renderImage();\n }\n\n toggleVisibility(isVisible) {\n if (isVisible) {\n this.classList.remove('hidden');\n } else {\n this.classList.add('hidden');\n }\n }\n\n get altText() {\n return this.getAttribute('alt') || '';\n }\n\n get legacySrc() {\n return this.getAttribute('src');\n }\n\n get themeSrc() {\n return this.getAttribute(`src-${this.currentThemeName}`);\n }\n\n get getSrc() {\n return this.themeSrc || this.legacySrc;\n }\n\n // in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes\n // with the value from the `st-fill` attribute\n \n updateFillColor(node) {\n // set fill to root node and all its relevant selectors\n const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];\n\n elementsToReplace.forEach((ele) => {\n ele.setAttribute(\n 'fill',\n `var(${ImageClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`,\n );\n });\n }\n\n renderImage() {\n this.toggleVisibility(this.getSrc);\n\n createImage(this.getSrc, this.altText).then((res) => {\n this.innerHTML = '';\n if (res) {\n this.updateFillColor(res);\n this.appendChild(res);\n }\n });\n }\n\n // render only when src attribute matches current theme\n shouldRender(src) {\n const srcVal = this.getAttribute(src);\n return this.getSrc === srcVal;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (this.shouldRender(attrName)) {\n this.renderImage();\n }\n }\n}\n\nexport const ImageClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawImage);\n","import DOMPurify from 'dompurify';\n\nconst getFileExtension = (path) => {\n const match = path.match(/\\.([0-9a-z]+)(?:[\\\\?#]|$)/i);\n return match ? match[1] : null;\n};\n\nconst base64Prefix = 'data:image/svg+xml;base64,';\n\nconst isBase64Svg = (src) => src.startsWith(base64Prefix);\n\nconst createImgEle = (src, altText) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\n ele.setAttribute('alt', altText);\n return ele;\n};\n\nconst createSvgEle = (text) => {\n // we want to purify the SVG to avoid XSS attacks\n const clean = DOMPurify.sanitize(text, {\n USE_PROFILES: { svg: true, svgFilters: true },\n // allow image to render\n ADD_TAGS: ['image'],\n // forbid interactiviy via `use` tags (which are sanitized by default)\n FORBID_TAGS: ['defs']\n });\n\n const parser = new DOMParser();\n const ele = parser\n .parseFromString(clean, 'image/svg+xml')\n .querySelector('svg');\n return ele;\n};\n\nexport const createImage = async (src, altText) => {\n try {\n let ele;\n if (isBase64Svg(src)) {\n // handle base64 source\n const svgXml = atob(src.slice(base64Prefix.length));\n ele = createSvgEle(svgXml);\n } else if (getFileExtension(src) === 'svg') {\n // handle urls\n const fetchedSrc = await fetch(src);\n const text = await fetchedSrc.text();\n ele = createSvgEle(text);\n } else {\n // handle binary\n ele = createImgEle(src, altText);\n }\n\n ele.style.setProperty('max-width', '100%');\n ele.style.setProperty('max-height', '100%');\n\n return ele;\n } catch {\n return null;\n }\n};\n","import { componentName, ImageClass } from './ImageClass';\n\ncustomElements.define(componentName, ImageClass);\n\nexport { ImageClass, componentName };\n","import {\n componentNameValidationMixin,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport {\n forwardAttrs,\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { compose } from '@descope-ui/common/utils';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { ButtonClass } from '@descope-ui/descope-button/class';\n\nexport const componentName = getComponentName('outbound-app-button');\n\nclass RawOutboundAppButton extends createBaseClass({\n componentName,\n baseSelector: ':host > descope-button',\n}) {\n static get observedAttributes() {\n return ['label', 'icon-src', 'icon-fill-current-color'];\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <descope-button>\n <descope-icon class=\"icon\"></descope-icon>\n <span class=\"label\"></span>\n </descope-button>\n `;\n\n injectStyle(`\n :host {\n display: inline-block;\n }\n .hidden {\n display: none;\n }\n `, this);\n\n this.button = this.shadowRoot.querySelector('descope-button');\n this.icon = this.shadowRoot.querySelector('.icon');\n this.label = this.shadowRoot.querySelector('.label');\n }\n\n init() {\n super.init?.();\n\n forwardAttrs(this, this.button, {\n excludeAttrs: [\n 'style',\n 'class',\n 'label',\n 'icon-src',\n 'icon-fill-current-color',\n ]\n });\n }\n\n updateLabel(val = '') {\n this.label.textContent = val;\n this.label.classList.toggle('hidden', !val);\n }\n\n updateIcon(val = '') {\n this.icon.setAttribute('src', val);\n this.icon.classList.toggle('hidden', !val);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue !== newValue) {\n if (attrName === 'label') {\n this.updateLabel(newValue);\n } else if (attrName === 'icon-src') {\n this.updateIcon(newValue);\n }\n }\n }\n}\n\nexport const OutboundAppButtonClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: {\n selector: () => ':host',\n property: 'width'\n },\n iconFillCurrentColor: {\n selector: () => 'descope-icon',\n property: ButtonClass.cssVarList.iconColor\n }\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawOutboundAppButton);\n","import {\n componentName,\n OutboundAppButtonClass,\n} from './OutboundAppButtonClass';\nimport '@descope-ui/descope-button';\nimport '@descope-ui/descope-icon';\n\ncustomElements.define(componentName, OutboundAppButtonClass);\n\nexport { OutboundAppButtonClass, componentName };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const buttonStyles = css`\n :host {\n display: inline-block;\n position: relative;\n outline: none;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Aligns the button with form fields when placed on the same line.\n Note, to make it work, the form fields should have the same \"::before\" pseudo-element. */\n .vaadin-button-container::before {\n content: '\\\\2003';\n display: inline-block;\n width: 0;\n max-height: 100%;\n }\n\n .vaadin-button-container {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n width: 100%;\n height: 100%;\n min-height: inherit;\n text-shadow: inherit;\n }\n\n [part='prefix'],\n [part='suffix'] {\n flex: none;\n }\n\n [part='label'] {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: 1px solid;\n outline-offset: -1px;\n }\n\n :host([focused]) {\n outline-width: 2px;\n }\n\n :host([disabled]) {\n outline-color: GrayText;\n }\n }\n`;\n\nexport const buttonTemplate = (html) => html`\n <div class=\"vaadin-button-container\">\n <span part=\"prefix\" aria-hidden=\"true\">\n <slot name=\"prefix\"></slot>\n </span>\n <span part=\"label\">\n <slot></slot>\n </span>\n <span part=\"suffix\" aria-hidden=\"true\">\n <slot name=\"suffix\"></slot>\n </span>\n </div>\n <slot name=\"tooltip\"></slot>\n`;\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { TabindexMixin } from '@vaadin/a11y-base/src/tabindex-mixin.js';\n\n/**\n * A mixin providing common button functionality.\n *\n * @polymerMixin\n * @mixes ActiveMixin\n * @mixes FocusMixin\n * @mixes TabindexMixin\n */\nexport const ButtonMixin = (superClass) =>\n class ButtonMixinClass extends ActiveMixin(TabindexMixin(FocusMixin(superClass))) {\n static get properties() {\n return {\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @override\n * @protected\n */\n tabindex: {\n type: Number,\n value: 0,\n reflectToAttribute: true,\n },\n };\n }\n\n /**\n * By default, `Space` is the only possible activation key for a focusable HTML element.\n * Nonetheless, the button is an exception as it can be also activated by pressing `Enter`.\n * See the \"Keyboard Support\" section in https://www.w3.org/TR/wai-aria-practices/examples/button/button.html.\n *\n * @protected\n * @override\n */\n get _activeKeys() {\n return ['Enter', ' '];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n // By default, if the user hasn't provided a custom role,\n // the role attribute is set to \"button\".\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n }\n\n /**\n * Since the button component is designed on the base of the `[role=button]` attribute,\n * and doesn't have a native <button> inside, in order to be fully accessible from the keyboard,\n * it should manually fire the `click` event once an activation key is pressed,\n * as it follows from the WAI-ARIA specifications:\n * https://www.w3.org/TR/wai-aria-practices-1.1/#button\n *\n * According to the UI Events specifications,\n * the `click` event should be fired exactly on `keydown`:\n * https://www.w3.org/TR/uievents/#event-type-keydown\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n return;\n }\n\n if (this._activeKeys.includes(event.key)) {\n event.preventDefault();\n\n // `DisabledMixin` overrides the standard `click()` method\n // so that it doesn't fire the `click` event when the element is disabled.\n this.click();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { buttonStyles, buttonTemplate } from './vaadin-button-base.js';\nimport { ButtonMixin } from './vaadin-button-mixin.js';\n\nregisterStyles('vaadin-button', buttonStyles, { moduleId: 'vaadin-button-styles' });\n\n/**\n * `<vaadin-button>` is an accessible and customizable button that allows users to perform actions.\n *\n * ```html\n * <vaadin-button>Press me</vaadin-button>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ----------|-------------\n * `label` | The label (text) inside the button.\n * `prefix` | A slot for content before the label (e.g. an icon).\n * `suffix` | A slot for content after the label (e.g. an icon).\n *\n * The following attributes are available for styling:\n *\n * Attribute | Description\n * -------------|-------------\n * `active` | Set when the button is pressed down, either with mouse, touch or the keyboard.\n * `disabled` | Set when the button is disabled.\n * `focus-ring` | Set when the button is focused using the keyboard.\n * `focused` | Set when the button is focused.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ButtonMixin\n * @mixes ControllerMixin\n * @mixes ElementMixin\n * @mixes ThemableMixin\n */\nclass Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-button';\n }\n\n static get template() {\n return buttonTemplate(html);\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(Button);\n\nexport { Button };\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst button = css`\n :host {\n /* Sizing */\n --lumo-button-size: var(--lumo-size-m);\n min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));\n height: var(--_button-size);\n padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));\n margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);\n box-sizing: border-box;\n /* Style */\n font-family: var(--lumo-font-family);\n font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));\n font-weight: var(--vaadin-button-font-weight, 500);\n color: var(--_lumo-button-text-color);\n background: var(--_lumo-button-background);\n border: var(--vaadin-button-border, none);\n border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));\n cursor: var(--lumo-clickable-cursor);\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n flex-shrink: 0;\n --_button-size: var(--vaadin-button-height, var(--lumo-button-size));\n --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));\n --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);\n /* Used by notification */\n --_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));\n --_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));\n --_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));\n --_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));\n }\n\n /* Set only for the internal parts so we don't affect the host vertical alignment */\n [part='label'],\n [part='prefix'],\n [part='suffix'] {\n line-height: var(--lumo-line-height-xs);\n }\n\n [part='label'] {\n padding: calc(var(--lumo-button-size) / 6) 0;\n }\n\n :host([theme~='small']) {\n font-size: var(--lumo-font-size-s);\n --lumo-button-size: var(--lumo-size-s);\n }\n\n :host([theme~='large']) {\n font-size: var(--lumo-font-size-l);\n --lumo-button-size: var(--lumo-size-l);\n }\n\n /* For interaction states */\n :host::before,\n :host::after {\n content: '';\n /* We rely on the host always being relative */\n position: absolute;\n z-index: 1;\n inset: 0;\n background-color: currentColor;\n border-radius: inherit;\n opacity: 0;\n pointer-events: none;\n }\n\n /* Hover */\n\n @media (any-hover: hover) {\n :host(:hover)::before {\n opacity: 0.02;\n }\n }\n\n /* Active */\n\n :host::after {\n transition: opacity 1.4s, transform 0.1s;\n filter: blur(8px);\n }\n\n :host([active])::before {\n opacity: 0.05;\n transition-duration: 0s;\n }\n\n :host([active])::after {\n opacity: 0.1;\n transition-duration: 0s, 0s;\n transform: scale(0);\n }\n\n /* Keyboard focus */\n\n :host([focus-ring]) {\n box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);\n }\n\n :host([theme~='primary'][focus-ring]) {\n box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);\n }\n\n /* Types (primary, tertiary, tertiary-inline */\n\n :host([theme~='tertiary']),\n :host([theme~='tertiary-inline']) {\n --_background: transparent !important;\n background: var(--vaadin-button-tertiary-background, var(--_background));\n min-width: 0;\n }\n\n :host([theme~='tertiary']) {\n border: var(--vaadin-button-tertiary-border, none);\n color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));\n font-weight: var(--vaadin-button-tertiary-font-weight, 500);\n padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));\n }\n\n :host([theme~='tertiary-inline'])::before {\n display: none;\n }\n\n :host([theme~='tertiary-inline']) {\n margin: 0;\n height: auto;\n padding: 0;\n line-height: inherit;\n font-size: inherit;\n }\n\n :host([theme~='tertiary-inline']) [part='label'] {\n padding: 0;\n overflow: visible;\n line-height: inherit;\n }\n\n :host([theme~='primary']) {\n background: var(--_lumo-button-primary-background);\n border: var(--vaadin-button-primary-border, none);\n color: var(--_lumo-button-primary-text-color);\n font-weight: var(--vaadin-button-primary-font-weight, 600);\n min-width: calc(var(--lumo-button-size) * 2.5);\n }\n\n :host([theme~='primary'])::before {\n background-color: black;\n }\n\n @media (any-hover: hover) {\n :host([theme~='primary']:hover)::before {\n opacity: 0.05;\n }\n }\n\n :host([theme~='primary'][active])::before {\n opacity: 0.1;\n }\n\n :host([theme~='primary'][active])::after {\n opacity: 0.2;\n }\n\n /* Colors (success, error, contrast) */\n\n :host([theme~='success']) {\n color: var(--lumo-success-text-color);\n }\n\n :host([theme~='success'][theme~='primary']) {\n background-color: var(--lumo-success-color);\n color: var(--lumo-success-contrast-color);\n }\n\n :host([theme~='error']) {\n color: var(--lumo-error-text-color);\n }\n\n :host([theme~='error'][theme~='primary']) {\n background-color: var(--lumo-error-color);\n color: var(--lumo-error-contrast-color);\n }\n\n :host([theme~='contrast']) {\n color: var(--lumo-contrast);\n }\n\n :host([theme~='contrast'][theme~='primary']) {\n background-color: var(--lumo-contrast);\n color: var(--lumo-base-color);\n }\n\n /* Disabled state. Keep selectors after other color variants. */\n\n :host([disabled]) {\n pointer-events: none;\n color: var(--lumo-disabled-text-color);\n }\n\n :host([theme~='primary'][disabled]) {\n background-color: var(--lumo-contrast-30pct);\n color: var(--lumo-base-color);\n }\n\n :host([theme~='primary'][disabled]) [part] {\n opacity: 0.7;\n }\n\n /* Icons */\n\n [part] ::slotted(vaadin-icon) {\n display: inline-block;\n width: var(--lumo-icon-size-m);\n height: var(--lumo-icon-size-m);\n }\n\n /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */\n [part] ::slotted(vaadin-icon[icon^='vaadin:']) {\n padding: 0.25em;\n box-sizing: border-box !important;\n }\n\n [part='prefix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n [part='suffix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n /* Icon-only */\n\n :host([theme~='icon']:not([theme~='tertiary-inline'])) {\n min-width: var(--lumo-button-size);\n padding-left: calc(var(--lumo-button-size) / 4);\n padding-right: calc(var(--lumo-button-size) / 4);\n }\n\n :host([theme~='icon']) [part='prefix'],\n :host([theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* RTL specific styles */\n\n :host([dir='rtl']) [part='prefix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n :host([dir='rtl']) [part='suffix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n :host([dir='rtl'][theme~='icon']) [part='prefix'],\n :host([dir='rtl'][theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n`;\n\nregisterStyles('vaadin-button', button, { moduleId: 'lumo-button' });\n\nexport { button };\n"],"names":["componentName","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_1__","xE","host","label","slottedIcon","selector","loadingIndicatorStyles","ButtonClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_0__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_2__","DM","triggers","attr","value","RF","mappings","hostWidth","property","hostMaxWidth","hostHeight","hostDirection","fontSize","fontFamily","fontWeight","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","labelTextColor","iconColor","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_3__","S","cssVarList","fill","labelTextDecoration","labelSpacing","textAlign","iconSize","_clickableMixin__WEBPACK_IMPORTED_MODULE_4__","G","VO","tQ","tz","slots","wrappedEleName","style","excludeAttrsSync","color","clickableMixin","superclass","isLoading","this","getAttribute","click","super","customElements","define","_ButtonClass__WEBPACK_IMPORTED_MODULE_0__","T","J","IconClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_3__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","_descope_ui_descope_image_class__WEBPACK_IMPORTED_MODULE_2__","q","height","width","_IconClass__WEBPACK_IMPORTED_MODULE_1__","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_3__","srcAttrs","RawImage","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_1__","qu","baseSelector","observedAttributes","constructor","attachShadow","mode","innerHTML","fz","init","toggleVisibility","getSrc","onThemeChange","renderImage","isVisible","classList","remove","add","altText","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","_helpers__WEBPACK_IMPORTED_MODULE_4__","m","then","res","appendChild","shouldRender","src","srcVal","attributeChangedCallback","attrName","oldValue","newValue","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_2__","createSvgEle","text","clean","dompurify__WEBPACK_IMPORTED_MODULE_0__","A","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","querySelector","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","setProperty","_ImageClass__WEBPACK_IMPORTED_MODULE_0__","componentsHelpers","RawOutboundAppButton","baseClasses","button","shadowRoot","icon","EA","excludeAttrs","updateLabel","val","textContent","toggle","updateIcon","OutboundAppButtonClass","utils","componentsMixins","iconFillCurrentColor","buttonStyles","AH","ButtonMixin","superClass","active_mixin","e","tabindex_mixin","l","focus_mixin","y","properties","tabindex","type","Number","reflectToAttribute","_activeKeys","ready","hasAttribute","_onKeyDown","event","altKey","shiftKey","ctrlKey","metaKey","includes","key","preventDefault","vaadin_themable_mixin","SF","moduleId","Button","element_mixin","cp","controller_mixin","w","polymer_element","Pu","is","template","qy","_tooltipController","tooltip_controller","I","addController","src_define","X","_vaadin_vaadin_themable_mixin_vaadin_themable_mixin_js__WEBPACK_IMPORTED_MODULE_5__"],"sourceRoot":""}
1
+ {"version":3,"file":"descope-outbound-app-button.js","mappings":"oOAYO,MAAAA,GAAsB,EAAAC,EAAAC,IAAgB,WAsC7CC,KAAQA,EAAAC,MAAAA,EAAAC,YAAAA,GAA2B,CACnCF,KAAA,CAAUG,SAAA,aACVF,MAAA,CAAWE,SAAA,iBACXD,YAAA,CAAiBC,SAAA,gCAGjB,IAAAC,EAEO,MAAAC,GAAoB,EAAAC,EAAAC,KACzB,EAAAC,EAAAC,IAAY,CAAGC,SAAA,EAAaC,KAAA,aAAAC,MAAA,YAC5B,EAAAJ,EAAAK,IAAgB,CAClBC,SAAA,CACAC,UAAA,CAAmBC,SAAA,SACnBC,aAAA,IAAsBjB,EAAAgB,SAAA,aACtBE,WAAA,CAAoBF,SAAA,UACpBG,cAAA,IAAuBnB,EAAAgB,SAAA,aACvBI,SAAA,GACAC,WAAA,GACAC,WAAA,GAEAC,OAAA,GACAC,gBAAA,GAEAC,cAAA,GACAC,aAAA,GACAC,aAAA,GACA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Z,SAAA,YACAa,SAAA,SAEAyJ,qBAAA,CACAtK,SAAA,mBACAa,SAAkBX,EAAA8D,EAAW3B,WAAAH,cAI3BmI,EAAAxH,GACAwH,EAAAvH,GAdoC,CAetCyG,qBC7FA3F,eAAAC,OAAsBnE,EAAeyK","sources":["webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-outbound-app-button/src/component/OutboundAppButtonClass.js","webpack://@descope/web-components-ui/../components/descope-outbound-app-button/src/component/index.js"],"sourcesContent":["import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n`;\n\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostMaxWidth: { ...host, property: 'max-width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n\n cursor: {},\n backgroundColor: {},\n\n outlineOffset: {},\n outlineColor: {},\n outlineStyle: {},\n outlineWidth: {},\n\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-right', fallback: '0.875em' },\n { property: 'padding-left', fallback: '0.875em' },\n ],\n\n labelTextColor: { property: 'color' },\n iconColor: {\n selector: () => `::slotted(*)`,\n property: IconClass.cssVarList.fill,\n },\n labelTextDecoration: { ...label, property: 'text-decoration' },\n labelSpacing: { ...label, property: 'gap' },\n textAlign: { ...label, property: 'justify-content', fallback: 'center' },\n\n iconSize: [\n { ...slottedIcon, property: 'width' },\n { ...slottedIcon, property: 'height' },\n ],\n },\n }),\n clickableMixin,\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: ['', 'prefix', 'label', 'suffix'],\n wrappedEleName: 'vaadin-button',\n style: () => `\n\t\t\t${resetStyles}\n\t\t\t${iconStyles}\n\t\t\t${loadingIndicatorStyles}\n\t\t\t${editorOverrides}\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width=\"true\"]) {\n width: var(${ButtonClass.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square=\"true\"]:not([full-width=\"true\"]) {\n\t\t\t\twidth: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex', 'class', 'style'],\n componentName,\n }),\n);\n\nconst { color, fontSize } = ButtonClass.cssVarList;\nloadingIndicatorStyles = `\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\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\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-style: solid;\n\t\tcolor: var(${color});\n\t\ttop: calc(50% - (var(${fontSize}) / 2));\n\t\tleft: calc(50% - (var(${fontSize}) / 2));\n\t\tborder-width: calc(var(${fontSize}) / 10);\n\t\twidth: var(${fontSize});\n\t\theight: var(${fontSize});\n\t}\n\t:host([disabled=\"true\"]),\n\t:host([loading=\"true\"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading=\"true\"]) ::part(prefix),\n\t:host([loading=\"true\"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`;\n","export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","import {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { ImageClass } from '@descope-ui/descope-image/class';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('icon');\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: [{}, { property: ImageClass.cssVarList.fill }],\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class', 'style', 'st-height', 'st-width'],\n componentName,\n }),\n);\n","import '@descope-ui/descope-image';\n\nimport { componentName, IconClass } from './IconClass';\n\ncustomElements.define(componentName, IconClass);\n\nexport { IconClass, componentName };\n"," \nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { createImage } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('image');\n\nconst srcAttrs = ['src', 'src-dark'];\n\nclass RawImage extends createBaseClass({\n componentName,\n baseSelector: 'slot',\n}) {\n static get observedAttributes() {\n return srcAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<slot></slot>\n\t`;\n\n injectStyle(\n `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n `,\n this,\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.getSrc);\n }\n\n onThemeChange() {\n this.renderImage();\n }\n\n toggleVisibility(isVisible) {\n if (isVisible) {\n this.classList.remove('hidden');\n } else {\n this.classList.add('hidden');\n }\n }\n\n get altText() {\n return this.getAttribute('alt') || '';\n }\n\n get legacySrc() {\n return this.getAttribute('src');\n }\n\n get themeSrc() {\n return this.getAttribute(`src-${this.currentThemeName}`);\n }\n\n get getSrc() {\n return this.themeSrc || this.legacySrc;\n }\n\n // in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes\n // with the value from the `st-fill` attribute\n \n updateFillColor(node) {\n // set fill to root node and all its relevant selectors\n const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];\n\n elementsToReplace.forEach((ele) => {\n ele.setAttribute(\n 'fill',\n `var(${ImageClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`,\n );\n });\n }\n\n renderImage() {\n this.toggleVisibility(this.getSrc);\n\n createImage(this.getSrc, this.altText).then((res) => {\n this.innerHTML = '';\n if (res) {\n this.updateFillColor(res);\n this.appendChild(res);\n }\n });\n }\n\n // render only when src attribute matches current theme\n shouldRender(src) {\n const srcVal = this.getAttribute(src);\n return this.getSrc === srcVal;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (this.shouldRender(attrName)) {\n this.renderImage();\n }\n }\n}\n\nexport const ImageClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawImage);\n","import DOMPurify from 'dompurify';\n\nconst getFileExtension = (path) => {\n const match = path.match(/\\.([0-9a-z]+)(?:[\\\\?#]|$)/i);\n return match ? match[1] : null;\n};\n\nconst base64Prefix = 'data:image/svg+xml;base64,';\n\nconst isBase64Svg = (src) => src.startsWith(base64Prefix);\n\nconst createImgEle = (src, altText) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\n ele.setAttribute('alt', altText);\n return ele;\n};\n\nconst createSvgEle = (text) => {\n // we want to purify the SVG to avoid XSS attacks\n const clean = DOMPurify.sanitize(text, {\n USE_PROFILES: { svg: true, svgFilters: true },\n // allow image to render\n ADD_TAGS: ['image'],\n // forbid interactiviy via `use` tags (which are sanitized by default)\n FORBID_TAGS: ['defs']\n });\n\n const parser = new DOMParser();\n const ele = parser\n .parseFromString(clean, 'image/svg+xml')\n .querySelector('svg');\n return ele;\n};\n\nexport const createImage = async (src, altText) => {\n try {\n let ele;\n if (isBase64Svg(src)) {\n // handle base64 source\n const svgXml = atob(src.slice(base64Prefix.length));\n ele = createSvgEle(svgXml);\n } else if (getFileExtension(src) === 'svg') {\n // handle urls\n const fetchedSrc = await fetch(src);\n const text = await fetchedSrc.text();\n ele = createSvgEle(text);\n } else {\n // handle binary\n ele = createImgEle(src, altText);\n }\n\n ele.style.setProperty('max-width', '100%');\n ele.style.setProperty('max-height', '100%');\n\n return ele;\n } catch {\n return null;\n }\n};\n","import { componentName, ImageClass } from './ImageClass';\n\ncustomElements.define(componentName, ImageClass);\n\nexport { ImageClass, componentName };\n","import {\n componentNameValidationMixin,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport {\n forwardAttrs,\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { compose } from '@descope-ui/common/utils';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { ButtonClass } from '@descope-ui/descope-button/class';\n\nexport const componentName = getComponentName('outbound-app-button');\n\nclass RawOutboundAppButton extends createBaseClass({\n componentName,\n baseSelector: ':host > descope-button',\n}) {\n static get observedAttributes() {\n return ['label', 'icon-src', 'icon-fill-current-color'];\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <descope-button>\n <descope-icon class=\"icon\"></descope-icon>\n <span class=\"label\"></span>\n </descope-button>\n `;\n\n injectStyle(`\n :host {\n display: inline-block;\n }\n .hidden {\n display: none;\n }\n `, this);\n\n this.button = this.shadowRoot.querySelector('descope-button');\n this.icon = this.shadowRoot.querySelector('.icon');\n this.label = this.shadowRoot.querySelector('.label');\n }\n\n init() {\n super.init?.();\n\n forwardAttrs(this, this.button, {\n excludeAttrs: [\n 'style',\n 'class',\n 'label',\n 'icon-src',\n 'icon-fill-current-color',\n ]\n });\n }\n\n updateLabel(val = '') {\n this.label.textContent = val;\n this.label.classList.toggle('hidden', !val);\n }\n\n updateIcon(val = '') {\n this.icon.setAttribute('src', val);\n this.icon.classList.toggle('hidden', !val);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue !== newValue) {\n if (attrName === 'label') {\n this.updateLabel(newValue);\n } else if (attrName === 'icon-src') {\n this.updateIcon(newValue);\n }\n }\n }\n}\n\nexport const OutboundAppButtonClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: {\n selector: () => ':host',\n property: 'width'\n },\n iconFillCurrentColor: {\n selector: () => 'descope-icon',\n property: ButtonClass.cssVarList.iconColor\n }\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawOutboundAppButton);\n","import {\n componentName,\n OutboundAppButtonClass,\n} from './OutboundAppButtonClass';\nimport '@descope-ui/descope-button';\nimport '@descope-ui/descope-icon';\n\ncustomElements.define(componentName, OutboundAppButtonClass);\n\nexport { OutboundAppButtonClass, componentName };\n"],"names":["componentName","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_1__","xE","host","label","slottedIcon","selector","loadingIndicatorStyles","ButtonClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_0__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_2__","DM","triggers","attr","value","RF","mappings","hostWidth","property","hostMaxWidth","hostHeight","hostDirection","fontSize","fontFamily","fontWeight","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","labelTextColor","iconColor","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_3__","S","cssVarList","fill","labelTextDecoration","labelSpacing","textAlign","iconSize","_clickableMixin__WEBPACK_IMPORTED_MODULE_4__","G","VO","tQ","tz","slots","wrappedEleName","style","excludeAttrsSync","color","clickableMixin","superclass","isLoading","this","getAttribute","click","super","customElements","define","_ButtonClass__WEBPACK_IMPORTED_MODULE_0__","T","J","IconClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_3__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","_descope_ui_descope_image_class__WEBPACK_IMPORTED_MODULE_2__","q","height","width","_IconClass__WEBPACK_IMPORTED_MODULE_1__","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_3__","srcAttrs","RawImage","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_1__","qu","baseSelector","observedAttributes","constructor","attachShadow","mode","innerHTML","fz","init","toggleVisibility","getSrc","onThemeChange","renderImage","isVisible","classList","remove","add","altText","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","_helpers__WEBPACK_IMPORTED_MODULE_4__","m","then","res","appendChild","shouldRender","src","srcVal","attributeChangedCallback","attrName","oldValue","newValue","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_2__","createSvgEle","text","clean","dompurify__WEBPACK_IMPORTED_MODULE_0__","A","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","querySelector","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","setProperty","_ImageClass__WEBPACK_IMPORTED_MODULE_0__","componentsHelpers","RawOutboundAppButton","baseClasses","button","shadowRoot","icon","EA","excludeAttrs","updateLabel","val","textContent","toggle","updateIcon","OutboundAppButtonClass","utils","componentsMixins","iconFillCurrentColor"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2294,9175],{88568(t,e,n){n.r(e),n.d(e,{RecoveryCodesClass:()=>l,componentName:()=>c}),n(63595),n(37182),n(95260);var o=n(88961),i=n(63200),s=n(25964),r=n(72270),a=n(66434);const c=(0,s.xE)("recovery-codes");class p extends((0,r.qu)({componentName:c,baseSelector:":host > div"})){static get observedAttributes(){return["readonly"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <div class="list"></div>\n <descope-text class="icon-wrapper">\n <vaadin-icon class="icon" icon="vaadin:copy-o" title="Copy"></vaadin-icon>\n </descope-text>\n </div>\n ',this.list=this.shadowRoot.querySelector(".list"),this.icon=this.shadowRoot.querySelector(".icon"),this.iconWrapper=this.shadowRoot.querySelector(".icon-wrapper"),(0,s.fz)("\n :host {\n display: inline-block;\n position: relative;\n }\n .wrapper {\n display: flex;\n justify-content: space-between;\n }\n .list {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n }\n descope-text span {\n display: inline-flex;\n align-items: center;\n width: fit-content;\n }\n descope-text span::before {\n content: '\\02022';\n transform: translateY(-0.06em);\n }\n .icon-wrapper {\n align-self: flex-start;\n }\n .icon {\n cursor: pointer;\n }\n .icon.copied {\n cursor: initial;\n }\n .icon.readonly {\n pointer-events: none;\n }\n ",this)}get variant(){return this.getAttribute("variant")}get mode(){return this.getAttribute("mode")}init(){super.init(),this.icon.addEventListener("click",this.onCopy.bind(this)),(0,s.EA)(this,this.iconWrapper,{includeAttrs:["variant","mode"]})}onCopy(){navigator.clipboard.writeText(String(this.data.map(t=>t.value).join("\n"))),this.icon.setAttribute("icon","vaadin:check-circle-o"),this.icon.setAttribute("title","Copied"),this.icon.classList.add("copied"),setTimeout(()=>{this.icon.setAttribute("icon","vaadin:copy-o"),this.icon.setAttribute("title","Copy"),this.icon.classList.remove("copied")},5e3)}onReadOnly(t){this.icon.classList.toggle("readonly",t)}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),n!==e&&"readonly"===t&&this.onReadOnly("true"===n)}}const l=(0,i.Zz)((0,o.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostMinWidth:{selector:()=>":host",property:"min-width"},hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>a.s.componentName,property:a.s.cssVarList.hostDirection}],textAlign:{selector:()=>".list",property:"align-items"},iconColor:{selector:()=>"vaadin-icon",property:"color"},iconSize:{selector:()=>"vaadin-icon",property:"font-size"},iconGap:{selector:()=>".wrapper",property:"gap"},bulletGap:{selector:()=>"descope-text span",property:"gap"}}}),(0,o.t$)({itemRenderer:({value:t},e,n)=>`\n <descope-text variant="${n.variant}" mode="${n.mode}">\n <span>${t}</span>\n </descope-text>\n `,rerenderAttrsList:["variant","mode"],targetSelector:".list"}),o.VO,o.tQ)(p);customElements.define(c,l)},66434(t,e,n){n.d(e,{T:()=>a,s:()=>l});var o=n(88961),i=n(63200),s=n(25964),r=n(72270);const a=(0,s.xE)("text");class c extends((0,r.qu)({componentName:a,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,s.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,s.Ge)(this,()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""})}}const{host:p}={host:{selector:()=>":host"}},l=(0,i.Zz)((0,o.RF)({mappings:{hostWidth:{...p,property:"width"},hostDirection:{...p,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),(0,o.DM)({triggers:[{attr:"full-width",value:"true"}]}),o.VO,o.tQ)(c)},63595(t,e,n){n.r(e),n.d(e,{TextClass:()=>o.s,componentName:()=>o.T});var o=n(66434);customElements.define(o.T,o.s)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1202,2294,6724,9175],{19624(t,e,o){o.d(e,{J:()=>u,T:()=>l});var n=o(63200),r=o(25964),i=o(88961),s=o(98538),a=o(10767);const l=(0,r.xE)("button"),{host:d,label:c,slottedIcon:h}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let p;const u=(0,n.Zz)((0,i.DM)({triggers:[{attr:"full-width",value:"true"}]}),(0,i.RF)({mappings:{hostWidth:{property:"width"},hostMaxWidth:{...d,property:"max-width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>"::slotted(*)",property:s.S.cssVarList.fill},labelTextDecoration:{...c,property:"text-decoration"},labelSpacing:{...c,property:"gap"},textAlign:{...c,property:"justify-content",fallback:"center"},iconSize:[{...h,property:"width"},{...h,property:"height"}]}}),a.G,i.VO,i.tQ)((0,i.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${p}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${u.cssVarList.outlineWidth}) + var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${u.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${u.cssVarList.hostHeight}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${u.cssVarList.hostWidth}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex","class","style"],componentName:l})),{color:b,fontSize:g}=u.cssVarList;p=`\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\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\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-style: solid;\n\t\tcolor: var(${b});\n\t\ttop: calc(50% - (var(${g}) / 2));\n\t\tleft: calc(50% - (var(${g}) / 2));\n\t\tborder-width: calc(var(${g}) / 10);\n\t\twidth: var(${g});\n\t\theight: var(${g});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"]) ::part(prefix),\n\t:host([loading="true"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},10767(t,e,o){o.d(e,{G:()=>n});const n=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},30576(t,e,o){o.r(e),o.d(e,{ButtonClass:()=>n.J,componentName:()=>n.T});var n=o(19624);o(83799),customElements.define(n.T,n.J)},98538(t,e,o){o.d(e,{S:()=>l,T:()=>a});var n=o(88961),r=o(25964),i=o(8512),s=o(63200);const a=(0,r.xE)("icon"),l=(0,s.Zz)((0,n.RF)({mappings:{fill:[{},{property:i.q.cssVarList.fill}],height:{selector:()=>":host"},width:{selector:()=>":host"}}}),n.VO,n.tQ)((0,n.tz)({slots:[],wrappedEleName:"descope-image",style:()=>"\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n ",excludeAttrsSync:["tabindex","class","style","st-height","st-width"],componentName:a}))},56737(t,e,o){o.r(e),o.d(e,{IconClass:()=>n.S,componentName:()=>n.T}),o(53455);var n=o(98538);customElements.define(n.T,n.S)},8512(t,e,o){o.d(e,{T:()=>l,q:()=>h});var n=o(88961),r=o(72270),i=o(63200),s=o(25964),a=o(18782);const l=(0,s.xE)("image"),d=["src","src-dark"];class c extends((0,r.qu)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return d}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,s.fz)("\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n ",this)}init(){super.init?.(),this.toggleVisibility(this.getSrc)}onThemeChange(){this.renderImage()}toggleVisibility(t){t?this.classList.remove("hidden"):this.classList.add("hidden")}get altText(){return this.getAttribute("alt")||""}get legacySrc(){return this.getAttribute("src")}get themeSrc(){return this.getAttribute(`src-${this.currentThemeName}`)}get getSrc(){return this.themeSrc||this.legacySrc}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach(t=>{t.setAttribute("fill",`var(${h.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)})}renderImage(){this.toggleVisibility(this.getSrc),(0,a.m)(this.getSrc,this.altText).then(t=>{this.innerHTML="",t&&(this.updateFillColor(t),this.appendChild(t))})}shouldRender(t){const e=this.getAttribute(t);return this.getSrc===e}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),e!==o&&this.shouldRender(t)&&this.renderImage()}}const h=(0,i.Zz)((0,n.RF)({mappings:{fill:{},height:{selector:()=>":host"},width:{selector:()=>":host"}}}),n.VO,n.tQ)(c)},18782(t,e,o){o.d(e,{m:()=>i});var n=o(25414);const r=t=>{const e=n.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["image"],FORBID_TAGS:["defs"]});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},i=async(t,e)=>{try{let o;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const e=atob(t.slice(26));o=r(e)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const e=await fetch(t),n=await e.text();o=r(n)}else o=((t,e)=>{const o=document.createElement("img");return o.setAttribute("src",t),o.setAttribute("alt",e),o})(t,e);return o.style.setProperty("max-width","100%"),o.style.setProperty("max-height","100%"),o}catch{return null}}},53455(t,e,o){o.r(e),o.d(e,{ImageClass:()=>n.q,componentName:()=>n.T});var n=o(8512);customElements.define(n.T,n.q)},88568(t,e,o){o.r(e),o.d(e,{RecoveryCodesClass:()=>b,componentName:()=>l}),o(63595),o(30576),o(56737),o(37182),o(95260);var n=o(88961),r=o(63200),i=o(25964),s=o(72270),a=o(66434);const l=(0,i.xE)("recovery-codes"),d="none",c={copy:{defaultText:"Copy"},download:{defaultText:"Download"}},h=["text","variant","color","size","icon","icon-dark"],p=["show-download",...Object.keys(c).flatMap(t=>h.map(e=>`${t}-${e}`))];class u extends((0,s.qu)({componentName:l,baseSelector:":host > div"})){static get observedAttributes(){return["readonly","required",...p]}#t=d;#e=!1;#o=!1;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <div class="codes-box">\n <div class="list"></div>\n <descope-text class="icon-wrapper">\n <div class="icons">\n <vaadin-icon class="icon copy-icon" icon="vaadin:copy-o" title="Copy"></vaadin-icon>\n <vaadin-icon class="icon download-icon" icon="vaadin:download-alt" title="Download"></vaadin-icon>\n </div>\n </descope-text>\n </div>\n <div class="error-message"></div>\n <div class="buttons-row"></div>\n </div>\n ',this.list=this.shadowRoot.querySelector(".list"),this.copyIcon=this.shadowRoot.querySelector(".copy-icon"),this.downloadIcon=this.shadowRoot.querySelector(".download-icon"),this.iconWrapper=this.shadowRoot.querySelector(".icon-wrapper"),this.errorMessageEle=this.shadowRoot.querySelector(".error-message"),this.buttonsRow=this.shadowRoot.querySelector(".buttons-row"),(0,i.fz)('\n :host {\n display: inline-block;\n position: relative;\n }\n .wrapper {\n display: flex;\n flex-direction: column;\n }\n .codes-box {\n display: flex;\n justify-content: space-between;\n box-sizing: border-box;\n /* border shows the error ring inside the box; style/width/color/radius come from theme */\n }\n .list {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n }\n descope-text span {\n display: inline-flex;\n align-items: center;\n width: fit-content;\n }\n descope-text span::before {\n content: \'\\02022\';\n transform: translateY(-0.06em);\n }\n .icon-wrapper {\n align-self: flex-start;\n }\n .icons {\n display: flex;\n flex-direction: column;\n }\n .icon {\n cursor: pointer;\n }\n .icon.copied {\n cursor: initial;\n /* block re-clicks while the checkmark shows, so rapid clicks cannot repeat the action */\n pointer-events: none;\n }\n /* readonly is a host attribute, so disable pointer events from one place */\n :host([readonly="true"]) .icon,\n :host([readonly="true"]) .buttons-row {\n pointer-events: none;\n }\n .download-icon {\n display: none;\n }\n :host([show-download="true"]) .download-icon {\n display: inline-flex;\n }\n .error-message {\n display: none;\n /* width:0 + min-width:100% lets the message wrap to the component width without\n its text expanding the (shrink-to-fit) component; full-width still fills the parent */\n width: 0;\n min-width: 100%;\n box-sizing: border-box;\n line-height: 1.2;\n overflow-wrap: break-word;\n }\n :host([invalid]) .error-message {\n display: block;\n }\n .buttons-row {\n display: none;\n }\n :host([display-variant="buttons"]) .icon-wrapper {\n display: none;\n }\n :host([display-variant="buttons"]) .buttons-row {\n display: flex;\n flex-wrap: wrap;\n }\n /* grow to fill equally; don\'t shrink below content, so they wrap to a new line\n when they don\'t fit (like a container with auto-fit items) */\n .buttons-row > descope-button {\n flex: 1 0 auto;\n }\n ',this)}get variant(){return this.getAttribute("variant")}get mode(){return this.getAttribute("mode")}get value(){return this.#t}#n(t){return this.hasAttribute(t)&&"false"!==this.getAttribute(t)}get isRequired(){return this.#n("required")}get isReadOnly(){return this.#n("readonly")}get errorMessage(){return this.getAttribute("data-errormessage-value-missing")||"Please save your recovery codes to continue"}get codesText(){return String((this.data||[]).map(t=>t.value).join("\n"))}init(){super.init(),this.copyIcon.addEventListener("click",this.onCopy.bind(this)),this.downloadIcon.addEventListener("click",this.onDownload.bind(this)),(0,i.EA)(this,this.iconWrapper,{includeAttrs:["variant","mode"]}),this.renderButtons(),this.#o=!0}get isDownloadEnabled(){return"true"===this.getAttribute("show-download")}renderButtons(){if(!this.buttonsRow)return;const t=[this.buildButton("copy")];this.isDownloadEnabled&&t.push(this.buildButton("download")),this.buttonsRow.replaceChildren(...t)}buildButton(t){const{defaultText:e}=c[t],o=(e,o)=>this.getAttribute(`${t}-${e}`)||o,n=document.createElement("descope-button");n.setAttribute("data-action",t),n.setAttribute("variant",o("variant","outline")),n.setAttribute("mode",o("color","primary")),n.setAttribute("size",o("size","md"));const r=this.getAttribute(`${t}-icon`);if(r){const e=document.createElement("descope-icon");e.setAttribute("src",r);const o=this.getAttribute(`${t}-icon-dark`);o&&e.setAttribute("src-dark",o),n.appendChild(e)}return n.appendChild(document.createTextNode(o("text",e))),n.addEventListener("click",()=>"copy"===t?this.onCopy():this.onDownload()),n}onCopy(){this.isReadOnly||(navigator.clipboard.writeText(this.codesText),this.showActionFeedback(this.copyIcon,"Copied"),this.recordAction("copied"))}onDownload(){if(this.isReadOnly)return;const t=new Blob([this.codesText],{type:"text/plain"}),e=URL.createObjectURL(t),o=document.createElement("a");o.href=e,o.download="recovery-codes.txt",o.click(),URL.revokeObjectURL(e),this.showActionFeedback(this.downloadIcon,"Downloaded"),this.recordAction("downloaded")}recordAction(t){this.#t=t,this.dispatchEvent(new Event("change",{bubbles:!0})),this.checkValidity()&&(this.#e=!1),this.syncValidityUI()}showActionFeedback(t,e){t.feedbackTimer?clearTimeout(t.feedbackTimer):(t.originalIcon=t.getAttribute("icon"),t.originalTitle=t.getAttribute("title")),t.setAttribute("icon","vaadin:check-circle-o"),t.setAttribute("title",e),t.classList.add("copied"),t.feedbackTimer=setTimeout(()=>{t.setAttribute("icon",t.originalIcon),t.setAttribute("title",t.originalTitle),t.classList.remove("copied"),t.feedbackTimer=null},5e3)}checkValidity(){return this.isReadOnly||!this.isRequired||this.value!==d}reportValidity(){const t=this.checkValidity();return this.#e=!t,this.syncValidityUI(),t}syncValidityUI(){this.toggleAttribute("invalid",this.#e),this.errorMessageEle&&(this.errorMessageEle.textContent=this.#e?this.errorMessage:"")}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),o!==e&&("required"!==t||this.isRequired||(this.#e=!1,this.syncValidityUI()),this.#o&&p.includes(t)&&this.renderButtons())}}const b=(0,r.Zz)((0,n.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostMinWidth:{selector:()=>":host",property:"min-width"},hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>a.s.componentName,property:a.s.cssVarList.hostDirection}],textAlign:{selector:()=>".list",property:"align-items"},iconColor:{selector:()=>"vaadin-icon",property:"color"},iconSize:{selector:()=>"vaadin-icon",property:"font-size"},iconGap:{selector:()=>".codes-box",property:"gap"},iconStackGap:{selector:()=>".icons",property:"gap"},buttonsGap:{selector:()=>".buttons-row",property:"gap"},sectionsGap:{selector:()=>".wrapper",property:"gap"},bulletGap:{selector:()=>"descope-text span",property:"gap"},verticalPadding:[{selector:()=>".codes-box",property:"padding-top"},{selector:()=>".codes-box",property:"padding-bottom"},{selector:()=>".buttons-row",property:"padding-bottom"}],horizontalPadding:[{selector:()=>".codes-box",property:"padding-left"},{selector:()=>".codes-box",property:"padding-right"},{selector:()=>".buttons-row",property:"padding-left"},{selector:()=>".buttons-row",property:"padding-right"}],errorBorderColor:{selector:()=>".codes-box",property:"border-color"},errorMessageColor:{selector:()=>".error-message",property:"color"},errorMessageFontSize:{selector:()=>".error-message",property:"font-size"},errorMessageFontWeight:{selector:()=>".error-message",property:"font-weight"},errorMessageFontFamily:{selector:()=>".error-message",property:"font-family"},boxBorderRadius:{selector:()=>".codes-box",property:"border-radius"},errorBorderWidth:{selector:()=>".codes-box",property:"border-width"},boxBorderStyle:{selector:()=>".codes-box",property:"border-style"}}}),(0,n.RF)({componentNameOverride:(0,i.xE)("input-wrapper")}),(0,n.t$)({itemRenderer:({value:t},e,o)=>`\n <descope-text variant="${o.variant}" mode="${o.mode}">\n <span>${t}</span>\n </descope-text>\n `,rerenderAttrsList:["variant","mode"],targetSelector:".list"}),n.VO,n.tQ)(u);customElements.define(l,b)},66434(t,e,o){o.d(e,{T:()=>a,s:()=>c});var n=o(88961),r=o(63200),i=o(25964),s=o(72270);const a=(0,i.xE)("text");class l extends((0,s.qu)({componentName:a,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,i.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,i.Ge)(this,()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""})}}const{host:d}={host:{selector:()=>":host"}},c=(0,r.Zz)((0,n.RF)({mappings:{hostWidth:{...d,property:"width"},hostDirection:{...d,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),(0,n.DM)({triggers:[{attr:"full-width",value:"true"}]}),n.VO,n.tQ)(l)},63595(t,e,o){o.r(e),o.d(e,{TextClass:()=>n.s,componentName:()=>n.T});var n=o(66434);customElements.define(n.T,n.s)}}]);
2
2
  //# sourceMappingURL=descope-recovery-codes.js.map