@descope/web-components-ui 1.108.0 → 1.110.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.
- package/dist/cjs/index.cjs.js +330 -336
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +393 -399
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/2739.js +1 -1
- package/dist/umd/2739.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js.map +1 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +3 -3
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
- package/dist/umd/descope-button.js +4 -4
- package/dist/umd/descope-button.js.map +1 -1
- package/dist/umd/descope-collapsible-container.js +1 -1
- package/dist/umd/descope-collapsible-container.js.map +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
- package/dist/umd/descope-email-field-index-js.js +1 -1
- package/dist/umd/descope-email-field-index-js.js.map +1 -1
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.map +1 -1
- package/dist/umd/descope-grid-index-js.js +1 -1
- package/dist/umd/descope-grid-index-js.js.map +1 -1
- package/dist/umd/descope-icon.js +1 -1
- package/dist/umd/descope-icon.js.map +1 -1
- package/dist/umd/descope-image.js +1 -1
- package/dist/umd/descope-image.js.map +1 -1
- package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
- package/dist/umd/descope-multi-select-combo-box-index-js.js.map +1 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js.map +1 -1
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.js.map +1 -1
- package/dist/umd/descope-number-field-index-js.js +1 -1
- package/dist/umd/descope-number-field-index-js.js.map +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js.map +1 -1
- package/dist/umd/descope-password-index-js.js +1 -1
- package/dist/umd/descope-password-index-js.js.map +1 -1
- package/dist/umd/descope-radio-group-index-js.js +1 -1
- package/dist/umd/descope-radio-group-index-js.js.map +1 -1
- package/dist/umd/descope-scopes-list-index-js.js +1 -1
- package/dist/umd/descope-scopes-list-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
- package/dist/umd/descope-text-area-index-js.js +1 -1
- package/dist/umd/descope-text-area-index-js.js.map +1 -1
- package/dist/umd/descope-text-field-index-js.js +1 -1
- package/dist/umd/descope-text-field-index-js.js.map +1 -1
- package/dist/umd/descope-third-party-app-logo-index-js.js +1 -1
- package/dist/umd/descope-third-party-app-logo-index-js.js.map +1 -1
- package/dist/umd/descope-timer-button.js +2 -2
- package/dist/umd/descope-timer-button.js.map +1 -1
- package/dist/umd/descope-timer.js +1 -1
- package/dist/umd/descope-timer.js.map +1 -1
- package/dist/umd/descope-upload-file-index-js.js +3 -3
- package/dist/umd/descope-upload-file-index-js.js.map +1 -1
- package/dist/umd/descope-user-attribute-index-js.js +4 -4
- package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js +2 -2
- package/dist/umd/descope-user-auth-method-index-js.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
- package/package.json +17 -17
- package/src/helpers/themeHelpers/resetHelpers.js +0 -3
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2141,7079],{3393:(t,e,n)=>{n.d(e,{y:()=>s});var i=n(9696),r=n(79365),a=n(81365);const s=(...t)=>(0,i.Zz)(r.XX,r._$,r.yF,r.jd)((0,a.q)(...t))},27926:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupClass:()=>d,componentName:()=>l});var i=n(79365),r=n(92491),a=n(9696),s=n(97810),o=n(80001);const l=(0,s.xE)("button-selection-group"),d=(0,a.Zz)((0,i.RF)({mappings:{...o.$W}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,o._Z,(t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n <${r.T}\n \tname="button-selection-group"\n \tslot="input"\n tabindex="-1"\n part="internal-component"\n >\n <slot></slot>\n </${r.T}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.T),(0,s.EA)(this,this.inputElement,{includeAttrs:["size","default-value","allow-deselect"]})}}))((0,i.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>o.S$,excludeAttrsSync:["tabindex"],componentName:l}));n(72415),n(15450),customElements.define(l,d)},51298:(t,e,n)=>{n.d(e,{m:()=>s}),n(25964);var i=n(3393),r=n(97810),a=n(13011);const s=t=>{class e extends((0,i.y)({componentName:t,baseSelector:"slot"})){constructor(){super(),this.innerHTML='\n <slot part="wrapper"></slot>\n '}dispatchChange=a.r.bind(this,"change");get items(){return this.querySelector("slot").assignedElements()}get isReadonly(){return"true"===this.getAttribute("readonly")}get size(){return this.getAttribute("size")||"md"}get value(){console.warn("get value","is not implemented")}set value(t){console.warn("set value","is not implemented")}onSizeChange(){this.items.forEach((t=>{t.setAttribute("size",this.size)}))}onReadOnlyChange(){this.querySelector("slot").toggleAttribute("inert",this.isReadonly)}getValidity(){console.warn("getValidity","is not implemented")}onObservedAttributeChange(t){t.forEach((t=>{switch(t){case"size":this.onSizeChange();break;case"readonly":this.onReadOnlyChange()}}))}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.items[0]?.focus()})),super.init?.(),(0,r.mx)(this,this.onObservedAttributeChange.bind(this),{includeAttrs:["size","readonly"]})}}return e}},72415:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupInternalClass:()=>i.n});var i=n(92491);customElements.define(i.T,i.n)},73551:(t,e,n)=>{n.d(e,{$J:()=>c,I4:()=>s,Kl:()=>h,LJ:()=>u,Qv:()=>a,X6:()=>l,cy:()=>i,fu:()=>d,kG:()=>p,lS:()=>o,zm:()=>r});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,a=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,s=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,o=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,p=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${r(t)}\n ${s(t)}\n ${o(t)}\n ${a(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${p(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label])
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2141,7079],{3393:(t,e,n)=>{n.d(e,{y:()=>s});var i=n(9696),r=n(79365),a=n(81365);const s=(...t)=>(0,i.Zz)(r.XX,r._$,r.yF,r.jd)((0,a.q)(...t))},27926:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupClass:()=>d,componentName:()=>l});var i=n(79365),r=n(92491),a=n(9696),s=n(97810),o=n(80001);const l=(0,s.xE)("button-selection-group"),d=(0,a.Zz)((0,i.RF)({mappings:{...o.$W}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,o._Z,(t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n <${r.T}\n \tname="button-selection-group"\n \tslot="input"\n tabindex="-1"\n part="internal-component"\n >\n <slot></slot>\n </${r.T}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.T),(0,s.EA)(this,this.inputElement,{includeAttrs:["size","default-value","allow-deselect"]})}}))((0,i.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>o.S$,excludeAttrsSync:["tabindex"],componentName:l}));n(72415),n(15450),customElements.define(l,d)},51298:(t,e,n)=>{n.d(e,{m:()=>s}),n(25964);var i=n(3393),r=n(97810),a=n(13011);const s=t=>{class e extends((0,i.y)({componentName:t,baseSelector:"slot"})){constructor(){super(),this.innerHTML='\n <slot part="wrapper"></slot>\n '}dispatchChange=a.r.bind(this,"change");get items(){return this.querySelector("slot").assignedElements()}get isReadonly(){return"true"===this.getAttribute("readonly")}get size(){return this.getAttribute("size")||"md"}get value(){console.warn("get value","is not implemented")}set value(t){console.warn("set value","is not implemented")}onSizeChange(){this.items.forEach((t=>{t.setAttribute("size",this.size)}))}onReadOnlyChange(){this.querySelector("slot").toggleAttribute("inert",this.isReadonly)}getValidity(){console.warn("getValidity","is not implemented")}onObservedAttributeChange(t){t.forEach((t=>{switch(t){case"size":this.onSizeChange();break;case"readonly":this.onReadOnlyChange()}}))}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.items[0]?.focus()})),super.init?.(),(0,r.mx)(this,this.onObservedAttributeChange.bind(this),{includeAttrs:["size","readonly"]})}}return e}},72415:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupInternalClass:()=>i.n});var i=n(92491);customElements.define(i.T,i.n)},73551:(t,e,n)=>{n.d(e,{$J:()=>c,I4:()=>s,Kl:()=>h,LJ:()=>u,Qv:()=>a,X6:()=>l,cy:()=>i,fu:()=>d,kG:()=>p,lS:()=>o,zm:()=>r});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,a=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,s=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,o=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,p=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${r(t)}\n ${s(t)}\n ${o(t)}\n ${a(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${p(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},80001:(t,e,n)=>{n.d(e,{$W:()=>u,S$:()=>c,_Z:()=>a});var i=n(97810),r=n(73551);const a=t=>class extends t{#t=({value:t,label:e})=>`<descope-button-selection-group-item value="${t}">${e}</descope-button-selection-group-item>`;#e;get renderItem(){return this.#t}set renderItem(t){this.#t=t,this.renderItems()}get size(){return this.inputElement?.size}get data(){if(this.#e)return this.#e;const t=this.getAttribute("data");if(t)try{const e=JSON.parse(t);if(this.isValidDataType(e))return e}catch(t){console.error('could not parse data string from attribute "data" - ',t.message)}return[]}set data(t){this.isValidDataType(t)&&(this.#e=t,this.renderItems())}isValidDataType(t){const e=Array.isArray(t);return e||console.error("data must be an array, received:",t),e}getItemsTemplate(){return this.data?.reduce?.(((t,e)=>t+(this.renderItem?.(e||{})||"")),"")}renderItems(){const t=this.getItemsTemplate();t&&(this.innerHTML=t)}init(){super.init?.(),this.renderItems(),(0,i.mx)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,i.Ge)(this,(({addedNodes:t})=>{t.forEach((t=>{t.setAttribute("size",this.size)}))}))}},{host:s,label:o,requiredIndicator:l,internalWrapper:d,errorMessage:p}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:()=>':host [part="internal-component"] slot'},errorMessage:{selector:"::part(error-message)"}},u={hostWidth:{...s,property:"width"},hostDirection:{...s,property:"direction"},fontFamily:s,labelTextColor:[{...o,property:"color"},{...l,property:"color"}],labelRequiredIndicator:{...l,property:"content"},errorMessageTextColor:{...p,property:"color"},errorMessageIcon:{...p,property:"background-image"},errorMessageIconSize:{...p,property:"background-size"},errorMessageIconPadding:{...p,property:"padding-inline-start"},errorMessageIconRepeat:{...p,property:"background-repeat"},errorMessageIconPosition:{...p,property:"background-position"},errorMessageFontSize:{...p,property:"font-size"},itemsSpacing:{...d,property:"gap"}},c=`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t\t${(0,r.X6)()}\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n [part="internal-component"] {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n display: inline-block;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n [part="internal-component"] slot {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${(0,r.$J)("vaadin-text-field")}\n\t\t\t${(0,r.I4)("vaadin-text-field")}\n `},92491:(t,e,n)=>{n.d(e,{T:()=>a,n:()=>s});var i=n(97810),r=n(51298);const a=(0,i.xE)("button-selection-group-internal");class s extends((0,r.m)(a)){getSelectedNode(){return this.items.find((t=>t.hasAttribute("selected")))}get allowDeselect(){return"true"===this.getAttribute("allow-deselect")}removeSelected(){this.getSelectedNode()?.removeAttribute("selected")}onClick(t){t.target!==t.currentTarget&&(t.target===this.getSelectedNode()&&this.allowDeselect?this.removeSelected():this.setSelected(t.target),this.dispatchChange())}setSelected(t){t!==this.getSelectedNode()&&(this.removeSelected(),t?.setAttribute("selected","true"))}get defaultValue(){return this.getAttribute("default-value")}setDefaultValue(){setTimeout((()=>{this.defaultValue&&(this.value=this.defaultValue,this.setCustomValidity())}))}get value(){return this.getSelectedNode()?.value||""}set value(t){const e=this.items.find((e=>e.value===t));this.setSelected(e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}init(){super.init(),this.setDefaultValue(),this.querySelector("slot").addEventListener("click",this.onClick.bind(this))}}}}]);
|
2
2
|
//# sourceMappingURL=button-selection-group-fields-descope-button-selection-group-index-js.js.map
|
package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"button-selection-group-fields-descope-button-selection-group-index-js.js","mappings":"kMASO,MAAMA,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,G,gJCChB,MAAMC,GAAgB,QAAiB,0BA6BjCC,GAA4B,SACvC,QAAiB,CACfC,SAAU,IACL,QAGP,MACA,QAAgB,CAAEC,WAAY,CAAC,QAAS,oBACxC,KACA,MApCiCC,GACjC,cAAkDA,EAChD,IAAAC,GACEC,MAAMD,SACN,MAAME,EAAWC,SAASC,cAAc,YAExCF,EAASG,UAAY,YAClB,uKAOC,eAGJC,KAAKC,YAAYC,YAAYN,EAASO,QAAQC,WAAU,IAExDJ,KAAKK,aAAeL,KAAKM,WAAWC,cAAc,MAElD,QAAa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e3H,KAAK0B,MACpB,CAAEkG,cAAc,GAGlB,CAAC,CACV,CAEA,IAAAlI,GACEC,MAAMD,OAENM,KAAKuH,kBAELvH,KAAKO,cAAc,QAAQgC,iBAAiB,QAASvC,KAAKkH,QAAQ9F,KAAKpB,MACzE,E","sources":["webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-selection-group/ButtonSelectionGroupClass.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-selection-group/index.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/createBaseButtonSelectionGroupInternalClass.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-selection-group-internal/index.js","webpack://@descope/web-components-ui/./src/helpers/themeHelpers/resetHelpers.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/baseButtonSelectionGroup.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-selection-group-internal/ButtonSelectionGroupInternalClass.js"],"sourcesContent":["import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../../mixins';\nimport { componentName as descopeInternalComponentName } from '../descope-button-selection-group-internal/ButtonSelectionGroupInternalClass';\nimport { compose } from '../../../helpers';\nimport { forwardAttrs, getComponentName } from '../../../helpers/componentHelpers';\nimport {\n buttonSelectionGroupBaseMixin,\n buttonSelectionGroupMappings,\n buttonSelectionGroupStyles,\n} from '../baseButtonSelectionGroup';\n\nexport const componentName = getComponentName('button-selection-group');\n\nconst buttonSelectionGroupMixin = (superclass) =>\n class ButtonMultiSelectionGroupMixinClass extends superclass {\n init() {\n super.init?.();\n const template = document.createElement('template');\n\n template.innerHTML = `\n <${descopeInternalComponentName}\n \tname=\"button-selection-group\"\n \tslot=\"input\"\n tabindex=\"-1\"\n part=\"internal-component\"\n >\n <slot></slot>\n </${descopeInternalComponentName}>\n `;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: ['size', 'default-value', 'allow-deselect'],\n });\n }\n };\n\nexport const ButtonSelectionGroupClass = compose(\n createStyleMixin({\n mappings: {\n ...buttonSelectionGroupMappings,\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n componentNameValidationMixin,\n buttonSelectionGroupBaseMixin,\n buttonSelectionGroupMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => buttonSelectionGroupStyles,\n excludeAttrsSync: ['tabindex'],\n componentName,\n })\n);\n\nexport default ButtonSelectionGroupClass;\n","import { componentName, ButtonSelectionGroupClass } from './ButtonSelectionGroupClass';\nimport '../descope-button-selection-group-internal';\nimport '../descope-button-selection-group-item';\n\ncustomElements.define(componentName, ButtonSelectionGroupClass);\n\nexport { ButtonSelectionGroupClass, componentName };\n","import { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseInputClass } from '../../baseClasses/createBaseInputClass';\nimport { observeAttributes } from '../../helpers/componentHelpers';\nimport { createDispatchEvent } from '../../helpers/mixinsHelpers';\n\nexport const createBaseButtonSelectionGroupInternalClass = (componentName) => {\n class BaseButtonSelectionGroupInternalClass extends createBaseInputClass({\n componentName,\n baseSelector: 'slot',\n }) {\n constructor() {\n super();\n\n this.innerHTML = `\n <slot part=\"wrapper\"></slot>\n `;\n }\n\n dispatchChange = createDispatchEvent.bind(this, 'change');\n\n get items() {\n return this.querySelector('slot').assignedElements();\n }\n\n get isReadonly() {\n return this.getAttribute('readonly') === 'true';\n }\n\n get size() {\n return this.getAttribute('size') || 'md';\n }\n\n // eslint-disable-next-line getter-return, class-methods-use-this\n get value() {\n // eslint-disable-next-line no-console\n console.warn('get value', 'is not implemented');\n }\n\n // eslint-disable-next-line class-methods-use-this\n set value(value) {\n // eslint-disable-next-line no-console\n console.warn('set value', 'is not implemented');\n }\n\n onSizeChange() {\n this.items.forEach((item) => {\n item.setAttribute('size', this.size);\n });\n }\n\n onReadOnlyChange() {\n this.querySelector('slot').toggleAttribute('inert', this.isReadonly);\n }\n\n // eslint-disable-next-line class-methods-use-this\n getValidity() {\n // eslint-disable-next-line no-console\n console.warn('getValidity', 'is not implemented');\n }\n\n onObservedAttributeChange(attrs) {\n attrs.forEach((attr) => {\n switch (attr) {\n case 'size':\n this.onSizeChange();\n break;\n case 'readonly':\n this.onReadOnlyChange();\n break;\n default:\n break;\n }\n });\n }\n\n init() {\n // we are adding listeners before calling to super because it's stopping the events\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) {\n this.items[0]?.focus();\n }\n });\n\n super.init?.();\n\n observeAttributes(this, this.onObservedAttributeChange.bind(this), {\n includeAttrs: ['size', 'readonly'],\n });\n }\n }\n\n return BaseButtonSelectionGroupInternalClass;\n};\n","import {\n componentName,\n ButtonSelectionGroupInternalClass,\n} from './ButtonSelectionGroupInternalClass';\n\ncustomElements.define(componentName, ButtonSelectionGroupInternalClass);\n\nexport { ButtonSelectionGroupInternalClass };\n","export const useHostExternalPadding = (cssVarList) => `\n :host {\n padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))\n }\n`;\n\nexport const resetInputFieldUnderlayingBorder = (name) => `\n ${name}::part(input-field)::after {\n border: none;\n }\n`;\n\nexport const resetInitialHeight = (name) => `\n ${name}::before {\n\t\theight: unset;\n\t}\n`;\n\nexport const resetInputElement = (name) => `\n ${name} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputContainer = (name) => `\n ${name} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputField = (name) => `\n ${name}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`;\n\nexport const resetInputCursor = (name) => `\n ${name} > label,\n ${name}::part(label),\n ${name}::part(required-indicator) {\n cursor: pointer;\n }\n`;\n\nexport const resetInputPlaceholder = (name, ele = 'input') => `\n ${name}[disabled] > ${ele}:placeholder-shown,\n\t${name}[readonly] > ${ele}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`;\n\nexport const resetInputAutoFill = (name, cssVarList) => `\n ${name} input:-webkit-autofill,\n ${name} input:-webkit-autofill::first-line,\n ${name} input:-webkit-autofill:hover,\n ${name} input:-webkit-autofill:active,\n ${name} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});\n box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;\n }\n`;\n\nexport const resetInputFieldDefaultWidth = () => `\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputReadonlyStyle = (name) => `\n ${name}::part(input-field)::after {\n opacity: 0;\n }\n`;\n\nexport const resetInputFieldInvalidBackgroundColor = (name) => `\n ${name}::part(input-field)::after {\n background: none;\n }\n`;\n\nexport const resetInputOverrides = (name, cssVarList) => `\n ${resetInputContainer(name)}\n ${resetInputCursor(name)}\n ${resetInputPlaceholder(name)}\n ${resetInputField(name)}\n ${resetInputAutoFill(name, cssVarList)}\n ${resetInputFieldInvalidBackgroundColor(name)}\n ${resetInitialHeight(name)}\n ${resetInputElement(name)}\n ${resetInputFieldUnderlayingBorder(name)}\n`;\n\n// This function is used to support RTL correctly for input components.\n// It also fixes the error message to be displayed LTR since we currently\n// don't support RTL for error messages.\nexport const resetInputLabelPosition = (name) => `\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${name} [slot=\"label\"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`;\n\nexport const inputFloatingLabelStyle = () => {\n return `\n :host([label-type=\"floating\"]) {\n position: relative;\n }\n :host([label-type=\"floating\"][has-label]) [slot=\"label\"] {\n padding: 0;\n }\n :host([label-type=\"floating\"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n `;\n};\n","import { observeAttributes, observeChildren } from '../../helpers/componentHelpers';\nimport {\n resetInputLabelPosition,\n resetInputCursor,\n resetInputFieldDefaultWidth,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const buttonSelectionGroupBaseMixin = (superclass) =>\n class ButtonSelectionGroupMixinClass extends superclass {\n // eslint-disable-next-line class-methods-use-this\n #renderItem = ({ value, label }) =>\n `<descope-button-selection-group-item value=\"${value}\">${label}</descope-button-selection-group-item>`;\n\n #data;\n\n get renderItem() {\n return this.#renderItem;\n }\n\n set renderItem(renderFn) {\n this.#renderItem = renderFn;\n this.renderItems();\n }\n\n get size() {\n return this.inputElement?.size;\n }\n\n get data() {\n if (this.#data) return this.#data;\n\n const dataAttr = this.getAttribute('data');\n\n if (dataAttr) {\n try {\n const data = JSON.parse(dataAttr);\n if (this.isValidDataType(data)) {\n return data;\n }\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('could not parse data string from attribute \"data\" - ', e.message);\n }\n }\n\n return [];\n }\n\n set data(data) {\n if (this.isValidDataType(data)) {\n this.#data = data;\n this.renderItems();\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n isValidDataType(data) {\n const isValid = Array.isArray(data);\n if (!isValid) {\n // eslint-disable-next-line no-console\n console.error('data must be an array, received:', data);\n }\n\n return isValid;\n }\n\n getItemsTemplate() {\n return this.data?.reduce?.((acc, item) => acc + (this.renderItem?.(item || {}) || ''), '');\n }\n\n renderItems() {\n const template = this.getItemsTemplate();\n if (template) this.innerHTML = template;\n }\n\n init() {\n super.init?.();\n\n this.renderItems();\n\n observeAttributes(this, this.renderItems.bind(this), { includeAttrs: ['data'] });\n\n // we want new items to get the size\n observeChildren(this, ({ addedNodes }) => {\n addedNodes.forEach((node) => {\n node.setAttribute('size', this.size);\n });\n });\n }\n };\n\nconst { host, label, requiredIndicator, internalWrapper, errorMessage } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n internalWrapper: { selector: () => ':host [part=\"internal-component\"] slot' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const buttonSelectionGroupMappings = {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontFamily: host,\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n ],\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n itemsSpacing: { ...internalWrapper, property: 'gap' },\n};\n\nexport const buttonSelectionGroupStyles = `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t\t${resetInputFieldDefaultWidth()}\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n [part=\"internal-component\"] {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n display: inline-block;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n [part=\"internal-component\"] slot {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${resetInputCursor('vaadin-text-field')}\n `;\n","import { getComponentName } from '../../../helpers/componentHelpers';\nimport { createBaseButtonSelectionGroupInternalClass } from '../createBaseButtonSelectionGroupInternalClass';\n\nexport const componentName = getComponentName('button-selection-group-internal');\n\nexport class ButtonSelectionGroupInternalClass extends createBaseButtonSelectionGroupInternalClass(\n componentName\n) {\n getSelectedNode() {\n return this.items.find((item) => item.hasAttribute('selected'));\n }\n\n get allowDeselect() {\n return this.getAttribute('allow-deselect') === 'true';\n }\n\n removeSelected() {\n this.getSelectedNode()?.removeAttribute('selected');\n }\n\n onClick(e) {\n if (e.target !== e.currentTarget) {\n if (e.target === this.getSelectedNode() && this.allowDeselect) {\n this.removeSelected();\n } else {\n this.setSelected(e.target);\n }\n this.dispatchChange();\n }\n }\n\n setSelected(node) {\n if (node !== this.getSelectedNode()) {\n this.removeSelected();\n node?.setAttribute('selected', 'true');\n }\n }\n\n get defaultValue() {\n return this.getAttribute('default-value');\n }\n\n setDefaultValue() {\n // we want to defer this action until all attributes are synched\n setTimeout(() => {\n if (this.defaultValue) {\n this.value = this.defaultValue;\n this.setCustomValidity();\n }\n });\n }\n\n get value() {\n return this.getSelectedNode()?.value || '';\n }\n\n set value(value) {\n const node = this.items.find((child) => child.value === value);\n this.setSelected(node);\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n\n return {};\n }\n\n init() {\n super.init();\n\n this.setDefaultValue();\n\n this.querySelector('slot').addEventListener('click', this.onClick.bind(this));\n }\n}\n"],"names":["createBaseInputClass","args","componentName","ButtonSelectionGroupClass","mappings","proxyProps","superclass","init","super","template","document","createElement","innerHTML","this","baseElement","appendChild","content","cloneNode","inputElement","shadowRoot","querySelector","includeAttrs","slots","wrappedEleName","style","excludeAttrsSync","customElements","define","createBaseButtonSelectionGroupInternalClass","BaseButtonSelectionGroupInternalClass","baseSelector","constructor","dispatchChange","bind","items","assignedElements","isReadonly","getAttribute","size","value","console","warn","onSizeChange","forEach","item","setAttribute","onReadOnlyChange","toggleAttribute","getValidity","onObservedAttributeChange","attrs","attr","addEventListener","e","isTrusted","focus","useHostExternalPadding","cssVarList","inputOutlineWidth","inputOutlineOffset","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","ele","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","inputValueTextColor","inputHeight","inputBackgroundColor","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle","buttonSelectionGroupBaseMixin","label","renderItem","renderFn","renderItems","data","dataAttr","JSON","parse","isValidDataType","error","message","isValid","Array","isArray","getItemsTemplate","reduce","acc","addedNodes","node","host","requiredIndicator","internalWrapper","errorMessage","selector","buttonSelectionGroupMappings","hostWidth","property","hostDirection","fontFamily","labelTextColor","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","itemsSpacing","buttonSelectionGroupStyles","ButtonSelectionGroupInternalClass","getSelectedNode","find","hasAttribute","allowDeselect","removeSelected","removeAttribute","onClick","target","currentTarget","setSelected","defaultValue","setDefaultValue","setTimeout","setCustomValidity","child","isRequired","valueMissing"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"button-selection-group-fields-descope-button-selection-group-index-js.js","mappings":"kMASO,MAAMA,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,G,gJCChB,MAAMC,GAAgB,QAAiB,0BA6BjCC,GAA4B,SACvC,QAAiB,CACfC,SAAU,IACL,QAGP,MACA,QAAgB,CAAEC,WAAY,CAAC,QAAS,oBACxC,KACA,MApCiCC,GACjC,cAAkDA,EAChD,IAAAC,GACEC,MAAMD,SACN,MAAME,EAAWC,SAASC,cAAc,YAExCF,EAASG,UAAY,YAClB,uKAOC,eAGJC,KAAKC,YAAYC,YAAYN,EAASO,QAAQC,WAAU,IAExDJ,KAAKK,aAAeL,KAAKM,WAAWC,cAAc,MAElD,QAAaP,KAAMA,KAAKK,aAAc,CACpCG,aAAc,CAAC,OAAQ,gBAAiB,mBAE5C,IAGqC,EAYvC,QAAY,CACVC,MAAO,GACPC,eAAgB,oBAChBC,MAAO,IAAM,KACbC,iBAAkB,CAAC,YACnBvB,mB,kBC1DJwB,eAAeC,OAAOzB,EAAeC,E,gFCC9B,MAAMyB,EAA+C1B,IAC1D,MAAM2B,WAA8C,OAAqB,CACvE3B,gBACA4B,aAAc,UAEd,WAAAC,GACEvB,QAEAK,KAAKD,UAAY,4CAGnB,CAEAoB,eAAiB,IAAoBC,KAAKpB,KAAM,UAEhD,SAAIqB,GACF,OAAOrB,K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,OAAO5G,KAAKqB,MAAMwF,MAAM9E,GAASA,EAAK+E,aAAa,aACrD,CAEA,iBAAIC,GACF,MAA+C,SAAxC/G,KAAKwB,aAAa,iBAC3B,CAEA,cAAAwF,GACEhH,KAAK4G,mBAAmBK,gBAAgB,WAC1C,CAEA,OAAAC,CAAQ1E,GACFA,EAAE2E,SAAW3E,EAAE4E,gBACb5E,EAAE2E,SAAWnH,KAAK4G,mBAAqB5G,KAAK+G,cAC9C/G,KAAKgH,iBAELhH,KAAKqH,YAAY7E,EAAE2E,QAErBnH,KAAKmB,iBAET,CAEA,WAAAkG,CAAYhC,GACNA,IAASrF,KAAK4G,oBAChB5G,KAAKgH,iBACL3B,GAAMrD,aAAa,WAAY,QAEnC,CAEA,gBAAIsF,GACF,OAAOtH,KAAKwB,aAAa,gBAC3B,CAEA,eAAA+F,GAEEC,YAAW,KACLxH,KAAKsH,eACPtH,KAAK0B,MAAQ1B,KAAKsH,aAClBtH,KAAKyH,oBACP,GAEJ,CAEA,SAAI/F,GACF,OAAO1B,KAAK4G,mBAAmBlF,OAAS,EAC1C,CAEA,SAAIA,CAAMA,GACR,MAAM2D,EAAOrF,KAAKqB,MAAMwF,MAAMa,GAAUA,EAAMhG,QAAUA,IACxD1B,KAAKqH,YAAYhC,EACnB,CAEA,WAAAlD,GACE,OAAInC,KAAK2H,aAAe3H,KAAK0B,MACpB,CAAEkG,cAAc,GAGlB,CAAC,CACV,CAEA,IAAAlI,GACEC,MAAMD,OAENM,KAAKuH,kBAELvH,KAAKO,cAAc,QAAQgC,iBAAiB,QAASvC,KAAKkH,QAAQ9F,KAAKpB,MACzE,E","sources":["webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-selection-group/ButtonSelectionGroupClass.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-selection-group/index.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/createBaseButtonSelectionGroupInternalClass.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-selection-group-internal/index.js","webpack://@descope/web-components-ui/./src/helpers/themeHelpers/resetHelpers.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/baseButtonSelectionGroup.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-selection-group-internal/ButtonSelectionGroupInternalClass.js"],"sourcesContent":["import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../../mixins';\nimport { componentName as descopeInternalComponentName } from '../descope-button-selection-group-internal/ButtonSelectionGroupInternalClass';\nimport { compose } from '../../../helpers';\nimport { forwardAttrs, getComponentName } from '../../../helpers/componentHelpers';\nimport {\n buttonSelectionGroupBaseMixin,\n buttonSelectionGroupMappings,\n buttonSelectionGroupStyles,\n} from '../baseButtonSelectionGroup';\n\nexport const componentName = getComponentName('button-selection-group');\n\nconst buttonSelectionGroupMixin = (superclass) =>\n class ButtonMultiSelectionGroupMixinClass extends superclass {\n init() {\n super.init?.();\n const template = document.createElement('template');\n\n template.innerHTML = `\n <${descopeInternalComponentName}\n \tname=\"button-selection-group\"\n \tslot=\"input\"\n tabindex=\"-1\"\n part=\"internal-component\"\n >\n <slot></slot>\n </${descopeInternalComponentName}>\n `;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: ['size', 'default-value', 'allow-deselect'],\n });\n }\n };\n\nexport const ButtonSelectionGroupClass = compose(\n createStyleMixin({\n mappings: {\n ...buttonSelectionGroupMappings,\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n componentNameValidationMixin,\n buttonSelectionGroupBaseMixin,\n buttonSelectionGroupMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => buttonSelectionGroupStyles,\n excludeAttrsSync: ['tabindex'],\n componentName,\n })\n);\n\nexport default ButtonSelectionGroupClass;\n","import { componentName, ButtonSelectionGroupClass } from './ButtonSelectionGroupClass';\nimport '../descope-button-selection-group-internal';\nimport '../descope-button-selection-group-item';\n\ncustomElements.define(componentName, ButtonSelectionGroupClass);\n\nexport { ButtonSelectionGroupClass, componentName };\n","import { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseInputClass } from '../../baseClasses/createBaseInputClass';\nimport { observeAttributes } from '../../helpers/componentHelpers';\nimport { createDispatchEvent } from '../../helpers/mixinsHelpers';\n\nexport const createBaseButtonSelectionGroupInternalClass = (componentName) => {\n class BaseButtonSelectionGroupInternalClass extends createBaseInputClass({\n componentName,\n baseSelector: 'slot',\n }) {\n constructor() {\n super();\n\n this.innerHTML = `\n <slot part=\"wrapper\"></slot>\n `;\n }\n\n dispatchChange = createDispatchEvent.bind(this, 'change');\n\n get items() {\n return this.querySelector('slot').assignedElements();\n }\n\n get isReadonly() {\n return this.getAttribute('readonly') === 'true';\n }\n\n get size() {\n return this.getAttribute('size') || 'md';\n }\n\n // eslint-disable-next-line getter-return, class-methods-use-this\n get value() {\n // eslint-disable-next-line no-console\n console.warn('get value', 'is not implemented');\n }\n\n // eslint-disable-next-line class-methods-use-this\n set value(value) {\n // eslint-disable-next-line no-console\n console.warn('set value', 'is not implemented');\n }\n\n onSizeChange() {\n this.items.forEach((item) => {\n item.setAttribute('size', this.size);\n });\n }\n\n onReadOnlyChange() {\n this.querySelector('slot').toggleAttribute('inert', this.isReadonly);\n }\n\n // eslint-disable-next-line class-methods-use-this\n getValidity() {\n // eslint-disable-next-line no-console\n console.warn('getValidity', 'is not implemented');\n }\n\n onObservedAttributeChange(attrs) {\n attrs.forEach((attr) => {\n switch (attr) {\n case 'size':\n this.onSizeChange();\n break;\n case 'readonly':\n this.onReadOnlyChange();\n break;\n default:\n break;\n }\n });\n }\n\n init() {\n // we are adding listeners before calling to super because it's stopping the events\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) {\n this.items[0]?.focus();\n }\n });\n\n super.init?.();\n\n observeAttributes(this, this.onObservedAttributeChange.bind(this), {\n includeAttrs: ['size', 'readonly'],\n });\n }\n }\n\n return BaseButtonSelectionGroupInternalClass;\n};\n","import {\n componentName,\n ButtonSelectionGroupInternalClass,\n} from './ButtonSelectionGroupInternalClass';\n\ncustomElements.define(componentName, ButtonSelectionGroupInternalClass);\n\nexport { ButtonSelectionGroupInternalClass };\n","export const useHostExternalPadding = (cssVarList) => `\n :host {\n padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))\n }\n`;\n\nexport const resetInputFieldUnderlayingBorder = (name) => `\n ${name}::part(input-field)::after {\n border: none;\n }\n`;\n\nexport const resetInitialHeight = (name) => `\n ${name}::before {\n\t\theight: unset;\n\t}\n`;\n\nexport const resetInputElement = (name) => `\n ${name} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputContainer = (name) => `\n ${name} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputField = (name) => `\n ${name}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`;\n\nexport const resetInputCursor = (name) => `\n ${name} > label,\n ${name}::part(label),\n ${name}::part(required-indicator) {\n cursor: pointer;\n }\n`;\n\nexport const resetInputPlaceholder = (name, ele = 'input') => `\n ${name}[disabled] > ${ele}:placeholder-shown,\n\t${name}[readonly] > ${ele}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`;\n\nexport const resetInputAutoFill = (name, cssVarList) => `\n ${name} input:-webkit-autofill,\n ${name} input:-webkit-autofill::first-line,\n ${name} input:-webkit-autofill:hover,\n ${name} input:-webkit-autofill:active,\n ${name} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});\n box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;\n }\n`;\n\nexport const resetInputFieldDefaultWidth = () => `\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputReadonlyStyle = (name) => `\n ${name}::part(input-field)::after {\n opacity: 0;\n }\n`;\n\nexport const resetInputFieldInvalidBackgroundColor = (name) => `\n ${name}::part(input-field)::after {\n background: none;\n }\n`;\n\nexport const resetInputOverrides = (name, cssVarList) => `\n ${resetInputContainer(name)}\n ${resetInputCursor(name)}\n ${resetInputPlaceholder(name)}\n ${resetInputField(name)}\n ${resetInputAutoFill(name, cssVarList)}\n ${resetInputFieldInvalidBackgroundColor(name)}\n ${resetInitialHeight(name)}\n ${resetInputElement(name)}\n ${resetInputFieldUnderlayingBorder(name)}\n`;\n\n// This function is used to support RTL correctly for input components.\n// It also fixes the error message to be displayed LTR since we currently\n// don't support RTL for error messages.\nexport const resetInputLabelPosition = (name) => `\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${name} [slot=\"label\"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`;\n\nexport const inputFloatingLabelStyle = () => {\n return `\n :host([label-type=\"floating\"]) {\n position: relative;\n }\n :host([label-type=\"floating\"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n `;\n};\n","import { observeAttributes, observeChildren } from '../../helpers/componentHelpers';\nimport {\n resetInputLabelPosition,\n resetInputCursor,\n resetInputFieldDefaultWidth,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const buttonSelectionGroupBaseMixin = (superclass) =>\n class ButtonSelectionGroupMixinClass extends superclass {\n // eslint-disable-next-line class-methods-use-this\n #renderItem = ({ value, label }) =>\n `<descope-button-selection-group-item value=\"${value}\">${label}</descope-button-selection-group-item>`;\n\n #data;\n\n get renderItem() {\n return this.#renderItem;\n }\n\n set renderItem(renderFn) {\n this.#renderItem = renderFn;\n this.renderItems();\n }\n\n get size() {\n return this.inputElement?.size;\n }\n\n get data() {\n if (this.#data) return this.#data;\n\n const dataAttr = this.getAttribute('data');\n\n if (dataAttr) {\n try {\n const data = JSON.parse(dataAttr);\n if (this.isValidDataType(data)) {\n return data;\n }\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('could not parse data string from attribute \"data\" - ', e.message);\n }\n }\n\n return [];\n }\n\n set data(data) {\n if (this.isValidDataType(data)) {\n this.#data = data;\n this.renderItems();\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n isValidDataType(data) {\n const isValid = Array.isArray(data);\n if (!isValid) {\n // eslint-disable-next-line no-console\n console.error('data must be an array, received:', data);\n }\n\n return isValid;\n }\n\n getItemsTemplate() {\n return this.data?.reduce?.((acc, item) => acc + (this.renderItem?.(item || {}) || ''), '');\n }\n\n renderItems() {\n const template = this.getItemsTemplate();\n if (template) this.innerHTML = template;\n }\n\n init() {\n super.init?.();\n\n this.renderItems();\n\n observeAttributes(this, this.renderItems.bind(this), { includeAttrs: ['data'] });\n\n // we want new items to get the size\n observeChildren(this, ({ addedNodes }) => {\n addedNodes.forEach((node) => {\n node.setAttribute('size', this.size);\n });\n });\n }\n };\n\nconst { host, label, requiredIndicator, internalWrapper, errorMessage } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n internalWrapper: { selector: () => ':host [part=\"internal-component\"] slot' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const buttonSelectionGroupMappings = {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontFamily: host,\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n ],\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n itemsSpacing: { ...internalWrapper, property: 'gap' },\n};\n\nexport const buttonSelectionGroupStyles = `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t\t${resetInputFieldDefaultWidth()}\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n [part=\"internal-component\"] {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n display: inline-block;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n [part=\"internal-component\"] slot {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${resetInputCursor('vaadin-text-field')}\n `;\n","import { getComponentName } from '../../../helpers/componentHelpers';\nimport { createBaseButtonSelectionGroupInternalClass } from '../createBaseButtonSelectionGroupInternalClass';\n\nexport const componentName = getComponentName('button-selection-group-internal');\n\nexport class ButtonSelectionGroupInternalClass extends createBaseButtonSelectionGroupInternalClass(\n componentName\n) {\n getSelectedNode() {\n return this.items.find((item) => item.hasAttribute('selected'));\n }\n\n get allowDeselect() {\n return this.getAttribute('allow-deselect') === 'true';\n }\n\n removeSelected() {\n this.getSelectedNode()?.removeAttribute('selected');\n }\n\n onClick(e) {\n if (e.target !== e.currentTarget) {\n if (e.target === this.getSelectedNode() && this.allowDeselect) {\n this.removeSelected();\n } else {\n this.setSelected(e.target);\n }\n this.dispatchChange();\n }\n }\n\n setSelected(node) {\n if (node !== this.getSelectedNode()) {\n this.removeSelected();\n node?.setAttribute('selected', 'true');\n }\n }\n\n get defaultValue() {\n return this.getAttribute('default-value');\n }\n\n setDefaultValue() {\n // we want to defer this action until all attributes are synched\n setTimeout(() => {\n if (this.defaultValue) {\n this.value = this.defaultValue;\n this.setCustomValidity();\n }\n });\n }\n\n get value() {\n return this.getSelectedNode()?.value || '';\n }\n\n set value(value) {\n const node = this.items.find((child) => child.value === value);\n this.setSelected(node);\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n\n return {};\n }\n\n init() {\n super.init();\n\n this.setDefaultValue();\n\n this.querySelector('slot').addEventListener('click', this.onClick.bind(this));\n }\n}\n"],"names":["createBaseInputClass","args","componentName","ButtonSelectionGroupClass","mappings","proxyProps","superclass","init","super","template","document","createElement","innerHTML","this","baseElement","appendChild","content","cloneNode","inputElement","shadowRoot","querySelector","includeAttrs","slots","wrappedEleName","style","excludeAttrsSync","customElements","define","createBaseButtonSelectionGroupInternalClass","BaseButtonSelectionGroupInternalClass","baseSelector","constructor","dispatchChange","bind","items","assignedElements","isReadonly","getAttribute","size","value","console","warn","onSizeChange","forEach","item","setAttribute","onReadOnlyChange","toggleAttribute","getValidity","onObservedAttributeChange","attrs","attr","addEventListener","e","isTrusted","focus","useHostExternalPadding","cssVarList","inputOutlineWidth","inputOutlineOffset","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","ele","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","inputValueTextColor","inputHeight","inputBackgroundColor","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle","buttonSelectionGroupBaseMixin","label","renderItem","renderFn","renderItems","data","dataAttr","JSON","parse","isValidDataType","error","message","isValid","Array","isArray","getItemsTemplate","reduce","acc","addedNodes","node","host","requiredIndicator","internalWrapper","errorMessage","selector","buttonSelectionGroupMappings","hostWidth","property","hostDirection","fontFamily","labelTextColor","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","itemsSpacing","buttonSelectionGroupStyles","ButtonSelectionGroupInternalClass","getSelectedNode","find","hasAttribute","allowDeselect","removeSelected","removeAttribute","onClick","target","currentTarget","setSelected","defaultValue","setDefaultValue","setTimeout","setCustomValidity","child","isRequired","valueMissing"],"sourceRoot":""}
|
package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*! For license information please see button-selection-group-fields-descope-button-selection-group-item-index-js.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1837,5087],{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()}}},15450:(t,e,o)=>{o.r(e),o.d(e,{ButtonSelectionGroupItemClass:()=>
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1837,5087],{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.src)}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 src(){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.src),(0,s.m)(this.src,this.altText).then((t=>{this.innerHTML="",t&&(this.updateFillColor(t),this.appendChild(t))}))}shouldRender(t){const e=this.getAttribute(t);return this.src===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)},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()}}},15450:(t,e,o)=>{o.r(e),o.d(e,{ButtonSelectionGroupItemClass:()=>h});var r=o(79365),n=o(81365),i=o(9696),a=o(97810),s=o(19624),l=o(25964);const c=(0,a.xE)("button-selection-group-item");class d extends((0,n.q)({componentName:c,baseSelector:":host > descope-button"})){get size(){return this.getAttribute("size")||"md"}get variant(){return this.getAttribute("variant")||"contained"}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <descope-button variant="${this.variant}" size="${this.size}" mode="primary">\n <slot></slot>\n </descope-button>\n\t`,(0,l.fz)("\n descope-button {\n max-width: 100%;\n }\n\t\t\tdescope-button > slot {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n max-width: 100%\n\t\t\t}\n ",this),(0,a.EA)(this,this.baseElement,{includeAttrs:["size","variant"]}),(0,a.EA)(this.baseElement,this,{includeAttrs:["focused","active"]})}handleFocus(){this.shadowRoot.querySelector("descope-button")?.focus()}focus(){this.handleFocus()}init(){super.init(),this.addEventListener("focus",(t=>{t.isTrusted&&this.handleFocus()}))}}const h=(0,i.Zz)((0,r.RF)({mappings:{hostDirection:{selector:()=>s.J.componentName,property:s.J.cssVarList.hostDirection},backgroundColor:{selector:()=>s.J.componentName,property:s.J.cssVarList.backgroundColor},labelTextColor:{selector:()=>s.J.componentName,property:s.J.cssVarList.labelTextColor},borderColor:{selector:()=>s.J.componentName,property:s.J.cssVarList.borderColor},borderWidth:{selector:()=>s.J.componentName,property:s.J.cssVarList.borderWidth},borderStyle:{selector:()=>s.J.componentName,property:s.J.cssVarList.borderStyle},borderRadius:{selector:()=>s.J.componentName,property:s.J.cssVarList.borderRadius},outlineColor:{selector:()=>s.J.componentName,property:s.J.cssVarList.outlineColor}}}),r.VO,r.tQ)(d);o(30576),customElements.define(c,h)},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}}},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.RF)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...c,property:"direction"},fontSize:{},fontFamily:{},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"],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`},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)},83799:(t,e,o)=>{o(93555),o(89389)},89389:(t,e,o)=>{o.d(e,{$:()=>m});var r=o(13256),n=o(55774),i=o(82901),a=o(90676),s=o(81488),l=o(87550);const c=o(51450).AH`
|
3
3
|
:host {
|
4
4
|
display: inline-block;
|
5
5
|
position: relative;
|
@@ -59,7 +59,7 @@
|
|
59
59
|
outline-color: GrayText;
|
60
60
|
}
|
61
61
|
}
|
62
|
-
`;var d=o(84467),
|
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
63
|
<div class="vaadin-button-container">
|
64
64
|
<span part="prefix" aria-hidden="true">
|
65
65
|
<slot name="prefix"></slot>
|
@@ -335,5 +335,5 @@
|
|
335
335
|
margin-left: 0;
|
336
336
|
margin-right: 0;
|
337
337
|
}
|
338
|
-
`;(0,r.SF)("vaadin-button",n,{moduleId:"lumo-button"})},98538:(t,e,o)=>{o.d(e,{S:()=>
|
338
|
+
`;(0,r.SF)("vaadin-button",n,{moduleId:"lumo-button"})},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}]}}),r.VO,r.tQ)((0,r.tz)({slots:[],wrappedEleName:"descope-image",style:()=>"\n :host {\n display: inline-flex;\n }\n ",excludeAttrsSync:["tabindex","class"],componentName:s}))}}]);
|
339
339
|
//# sourceMappingURL=button-selection-group-fields-descope-button-selection-group-item-index-js.js.map
|
package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"button-selection-group-fields-descope-button-selection-group-item-index-js.js","mappings":";+JAAO,MAAMA,EAAkBC,GAC7B,cAAkCA,EAChC,aAAIC,GACF,MAAwC,SAAjCC,KAAKC,aAAa,UAC3B,CAEA,KAAAC,GACEF,KAAKD,WAAaI,MAAMD,OAC1B,6ICDG,MAAME,GAAgB,QAAiB,+BAE9C,MAAMC,WAAsB,EAAAC,EAAA,GAAgB,CAC1CF,gBACAG,aAAc,4BAEd,QAAIC,GACF,OAAOR,KAAKC,aAAa,SAAW,IACtC,CAEA,WAAIQ,GACF,OAAOT,KAAKC,aAAa,YAAc,WACzC,CAEA,SAAIS,GACF,OAAOV,KAAKC,aAAa,UAAY,EACvC,CAEA,SAAIS,CAAMA,G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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyQlB,QAAe,gBAAiBA,EAAQ,CAAEN,SAAU,+FCvQ7C,MAAMpF,GAAgB,QAAiB,QAEjC2F,GAAY,SACvB,QAAiB,CACfpE,SAAU,CACR+B,KAAM,CAAC,KAGX,KACA,KAPuB,EASvB,QAAY,CACVK,MAAO,GACPC,eAAgB,gBAChBC,MAAO,IAAM,kEAKbC,iBAAkB,CAAC,WAAY,SAC/B9D","sources":["webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-selection-group-item/ButtonSelectionGroupItemClass.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-selection-group-item/index.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-base.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/theme/lumo/vaadin-button-styles.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js"],"sourcesContent":["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 { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../../mixins';\nimport { createBaseClass } from '../../../baseClasses/createBaseClass';\nimport { compose } from '../../../helpers';\nimport { forwardAttrs, getComponentName } from '../../../helpers/componentHelpers';\nimport { ButtonClass } from '@descope-ui/descope-button/class';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('button-selection-group-item');\n\nclass RawSelectItem extends createBaseClass({\n componentName,\n baseSelector: ':host > descope-button',\n}) {\n get size() {\n return this.getAttribute('size') || 'md';\n }\n\n get variant() {\n return this.getAttribute('variant') || 'contained';\n }\n\n get value() {\n return this.getAttribute('value') || '';\n }\n\n set value(value) {\n this.setAttribute('value', value);\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <descope-button variant=\"${this.variant}\" size=\"${this.size}\" mode=\"primary\">\n <slot></slot>\n </descope-button>\n\t`;\n\n injectStyle(\n `\n descope-button {\n max-width: 100%;\n }\n\t\t\tdescope-button > slot {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n max-width: 100%\n\t\t\t}\n `,\n this\n );\n\n forwardAttrs(this, this.baseElement, { includeAttrs: ['size', 'variant'] });\n forwardAttrs(this.baseElement, this, { includeAttrs: ['focused', 'active'] });\n }\n\n handleFocus() {\n this.shadowRoot.querySelector('descope-button')?.focus();\n }\n\n focus() {\n this.handleFocus();\n }\n\n init() {\n super.init();\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) {\n this.handleFocus();\n }\n });\n }\n}\n\nexport const ButtonSelectionGroupItemClass = compose(\n createStyleMixin({\n mappings: {\n hostDirection: {\n selector: () => ButtonClass.componentName,\n property: ButtonClass.cssVarList.hostDirection,\n },\n backgroundColor: {\n selector: () => ButtonClass.componentName,\n property: ButtonClass.cssVarList.backgroundColor,\n },\n labelTextColor: {\n selector: () => ButtonClass.componentName,\n property: ButtonClass.cssVarList.labelTextColor,\n },\n borderColor: {\n selector: () => ButtonClass.componentName,\n property: ButtonClass.cssVarList.borderColor,\n },\n borderWidth: {\n selector: () => ButtonClass.componentName,\n property: ButtonClass.cssVarList.borderWidth,\n },\n borderStyle: {\n selector: () => ButtonClass.componentName,\n property: ButtonClass.cssVarList.borderStyle,\n },\n borderRadius: {\n selector: () => ButtonClass.componentName,\n property: ButtonClass.cssVarList.borderRadius,\n },\n outlineColor: {\n selector: () => ButtonClass.componentName,\n property: ButtonClass.cssVarList.outlineColor,\n },\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawSelectItem);\n","import { componentName, ButtonSelectionGroupItemClass } from './ButtonSelectionGroupItemClass';\nimport '@descope-ui/descope-button';\n\ncustomElements.define(componentName, ButtonSelectionGroupItemClass);\n\nexport { ButtonSelectionGroupItemClass };\n","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} 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 createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\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: [{ property: 'padding-top' }, { property: 'padding-bottom' }],\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'],\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","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, 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","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 { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('icon');\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class'],\n componentName,\n }),\n);\n"],"names":["clickableMixin","superclass","isLoading","this","getAttribute","click","super","componentName","RawSelectItem","createBaseClass","baseSelector","size","variant","value","setAttribute","constructor","attachShadow","mode","innerHTML","baseElement","includeAttrs","handleFocus","shadowRoot","querySelector","focus","init","addEventListener","e","isTrusted","ButtonSelectionGroupItemClass","mappings","hostDirection","selector","ButtonClass","property","cssVarList","backgroundColor","labelTextColor","borderColor","borderWidth","borderStyle","borderRadius","outlineColor","customElements","define","host","label","slottedIcon","loadingIndicatorStyles","hostWidth","hostHeight","fontSize","fontFamily","cursor","outlineOffset","outlineStyle","outlineWidth","verticalPadding","horizontalPadding","fallback","iconColor","fill","labelTextDecoration","labelSpacing","textAlign","iconSize","slots","wrappedEleName","style","excludeAttrsSync","color","buttonStyles","ButtonMixin","superClass","properties","tabindex","type","Number","reflectToAttribute","_activeKeys","ready","hasAttribute","_onKeyDown","event","altKey","shiftKey","ctrlKey","metaKey","includes","key","preventDefault","moduleId","Button","is","template","_tooltipController","addController","button","IconClass"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"button-selection-group-fields-descope-button-selection-group-item-index-js.js","mappings":";iOAYO,MAAMA,GAAgB,QAAiB,SAExCC,EAAW,CAAC,MAAO,YAEzB,MAAMC,WAAiB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E,aAAWqB,GACT,MAAO,eACT,CAEA,mBAAWC,GACT,OAAsB,IFYkB;;;;;;;;;;;;;CEX1C,CAGA,KAAAd,GACEtI,MAAMsI,QAENrI,KAAKoJ,mBAAqB,IAAI,IAAkBpJ,MAChDA,KAAKqJ,cAAcrJ,KAAKoJ,mBAC1B,GAGF,OAAoBH,+FC9DpB,MAAMK,EAAS,IAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyQlB,QAAe,gBAAiBA,EAAQ,CAAEN,SAAU,yGCtQ7C,MAAMvJ,GAAgB,QAAiB,QAEjC8J,GAAY,SACvB,QAAiB,CACfnH,SAAU,CACRV,KAAM,CAAC,CAAC,EAAG,CAAEmC,SAAU,IAAWpC,WAAWC,UAGjD,KACA,KAPuB,EASvB,QAAY,CACV8F,MAAO,GACPC,eAAgB,gBAChBvB,MAAO,IAAM,kEAKbwB,iBAAkB,CAAC,WAAY,SAC/BjI","sources":["webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-selection-group-item/ButtonSelectionGroupItemClass.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-selection-group-item/index.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-base.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/theme/lumo/vaadin-button-styles.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js"],"sourcesContent":["/* eslint-disable no-use-before-define */\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.src);\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 src() {\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 // eslint-disable-next-line class-methods-use-this\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.src);\n\n createImage(this.src, 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.src === 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","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 { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../../mixins';\nimport { createBaseClass } from '../../../baseClasses/createBaseClass';\nimport { compose } from '../../../helpers';\nimport { forwardAttrs, getComponentName } from '../../../helpers/componentHelpers';\nimport { ButtonClass } from '@descope-ui/descope-button/class';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('button-selection-group-item');\n\nclass RawSelectItem extends createBaseClass({\n componentName,\n baseSelector: ':host > descope-button',\n}) {\n get size() {\n return this.getAttribute('size') || 'md';\n }\n\n get variant() {\n return this.getAttribute('variant') || 'contained';\n }\n\n get value() {\n return this.getAttribute('value') || '';\n }\n\n set value(value) {\n this.setAttribute('value', value);\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <descope-button variant=\"${this.variant}\" size=\"${this.size}\" mode=\"primary\">\n <slot></slot>\n </descope-button>\n\t`;\n\n injectStyle(\n `\n descope-button {\n max-width: 100%;\n }\n\t\t\tdescope-button > slot {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n max-width: 100%\n\t\t\t}\n `,\n this\n );\n\n forwardAttrs(this, this.baseElement, { includeAttrs: ['size', 'variant'] });\n forwardAttrs(this.baseElement, this, { includeAttrs: ['focused', 'active'] });\n }\n\n handleFocus() {\n this.shadowRoot.querySelector('descope-button')?.focus();\n }\n\n focus() {\n this.handleFocus();\n }\n\n init() {\n super.init();\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) {\n this.handleFocus();\n }\n });\n }\n}\n\nexport const ButtonSelectionGroupItemClass = compose(\n createStyleMixin({\n mappings: {\n hostDirection: {\n selector: () => ButtonClass.componentName,\n property: ButtonClass.cssVarList.hostDirection,\n },\n backgroundColor: {\n selector: () => ButtonClass.componentName,\n property: ButtonClass.cssVarList.backgroundColor,\n },\n labelTextColor: {\n selector: () => ButtonClass.componentName,\n property: ButtonClass.cssVarList.labelTextColor,\n },\n borderColor: {\n selector: () => ButtonClass.componentName,\n property: ButtonClass.cssVarList.borderColor,\n },\n borderWidth: {\n selector: () => ButtonClass.componentName,\n property: ButtonClass.cssVarList.borderWidth,\n },\n borderStyle: {\n selector: () => ButtonClass.componentName,\n property: ButtonClass.cssVarList.borderStyle,\n },\n borderRadius: {\n selector: () => ButtonClass.componentName,\n property: ButtonClass.cssVarList.borderRadius,\n },\n outlineColor: {\n selector: () => ButtonClass.componentName,\n property: ButtonClass.cssVarList.outlineColor,\n },\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawSelectItem);\n","import { componentName, ButtonSelectionGroupItemClass } from './ButtonSelectionGroupItemClass';\nimport '@descope-ui/descope-button';\n\ncustomElements.define(componentName, ButtonSelectionGroupItemClass);\n\nexport { ButtonSelectionGroupItemClass };\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 { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\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 createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\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: [{ property: 'padding-top' }, { property: 'padding-bottom' }],\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\t\tselector: () => `::slotted(*)`,\n\t\tproperty: IconClass.cssVarList.fill\n\t },\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'],\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","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, 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","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 },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class'],\n componentName,\n }),\n);\n"],"names":["componentName","srcAttrs","RawImage","baseSelector","observedAttributes","constructor","super","this","attachShadow","mode","innerHTML","init","toggleVisibility","src","onThemeChange","renderImage","isVisible","classList","remove","add","altText","getAttribute","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","cssVarList","fill","then","res","appendChild","shouldRender","srcVal","attributeChangedCallback","attrName","oldValue","newValue","mappings","height","selector","width","clickableMixin","superclass","isLoading","click","RawSelectItem","createBaseClass","size","variant","value","baseElement","includeAttrs","handleFocus","shadowRoot","querySelector","focus","addEventListener","e","isTrusted","ButtonSelectionGroupItemClass","hostDirection","ButtonClass","property","backgroundColor","labelTextColor","borderColor","borderWidth","borderStyle","borderRadius","outlineColor","customElements","define","createSvgEle","text","clean","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","style","setProperty","host","label","slottedIcon","loadingIndicatorStyles","hostWidth","hostHeight","fontSize","fontFamily","cursor","outlineOffset","outlineStyle","outlineWidth","verticalPadding","horizontalPadding","fallback","iconColor","labelTextDecoration","labelSpacing","textAlign","iconSize","slots","wrappedEleName","excludeAttrsSync","color","buttonStyles","ButtonMixin","superClass","properties","tabindex","type","Number","reflectToAttribute","_activeKeys","ready","hasAttribute","_onKeyDown","event","altKey","shiftKey","ctrlKey","metaKey","includes","key","preventDefault","moduleId","Button","is","template","_tooltipController","addController","button","IconClass"],"sourceRoot":""}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*! For license information please see descope-button.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5087],{
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5087],{8512:(t,e,r)=>{r.d(e,{T:()=>l,q:()=>h});var o=r(88961),i=r(72270),n=r(63200),a=r(25964),s=r(18782);const l=(0,a.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,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.src)}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 src(){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.src),(0,s.m)(this.src,this.altText).then((t=>{this.innerHTML="",t&&(this.updateFillColor(t),this.appendChild(t))}))}shouldRender(t){const e=this.getAttribute(t);return this.src===e}attributeChangedCallback(t,e,r){super.attributeChangedCallback?.(t,e,r),e!==r&&this.shouldRender(t)&&this.renderImage()}}const h=(0,n.Zz)((0,o.RF)({mappings:{fill:{},height:{selector:()=>":host"},width:{selector:()=>":host"}}}),o.VO,o.tQ)(d)},10767:(t,e,r)=>{r.d(e,{G:()=>o});const o=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},18782:(t,e,r)=>{r.d(e,{m:()=>n});var o=r(25414);const i=t=>{const e=o.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")},n=async(t,e)=>{try{let r;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const e=atob(t.slice(26));r=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),o=await e.text();r=i(o)}else r=((t,e)=>{const r=document.createElement("img");return r.setAttribute("src",t),r.setAttribute("alt",e),r})(t,e);return r.style.setProperty("max-width","100%"),r.style.setProperty("max-height","100%"),r}catch{return null}}},19624:(t,e,r)=>{r.d(e,{J:()=>m,T:()=>l});var o=r(63200),i=r(25964),n=r(88961),a=r(98538),s=r(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 u;const m=(0,o.Zz)((0,n.RF)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...c,property:"direction"},fontSize:{},fontFamily:{},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,n.VO,n.tQ)((0,n.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(${m.cssVarList.outlineWidth}) + var(${m.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${m.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${m.cssVarList.hostHeight}) - var(${m.cssVarList.outlineWidth}) - var(${m.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${m.cssVarList.hostWidth}) - var(${m.cssVarList.outlineWidth}) - var(${m.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l})),{color:p,fontSize:b}=m.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(${p});\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`},30576:(t,e,r)=>{r.r(e),r.d(e,{ButtonClass:()=>o.J,componentName:()=>o.T});var o=r(19624);r(83799),customElements.define(o.T,o.J)},83799:(t,e,r)=>{r(93555),r(89389)},89389:(t,e,r)=>{r.d(e,{$:()=>p});var o=r(13256),i=r(55774),n=r(82901),a=r(90676),s=r(81488),l=r(87550);const c=r(51450).AH`
|
3
3
|
:host {
|
4
4
|
display: inline-block;
|
5
5
|
position: relative;
|
@@ -59,7 +59,7 @@
|
|
59
59
|
outline-color: GrayText;
|
60
60
|
}
|
61
61
|
}
|
62
|
-
`;var d=
|
62
|
+
`;var d=r(84467),h=r(53149),u=r(36176);const m=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 p extends(m((0,a.q)((0,l.cp)((0,i.w)(o.Pu))))){static get is(){return"vaadin-button"}static get template(){return o.qy`
|
63
63
|
<div class="vaadin-button-container">
|
64
64
|
<span part="prefix" aria-hidden="true">
|
65
65
|
<slot name="prefix"></slot>
|
@@ -72,7 +72,7 @@
|
|
72
72
|
</span>
|
73
73
|
</div>
|
74
74
|
<slot name="tooltip"></slot>
|
75
|
-
`}ready(){super.ready(),this._tooltipController=new s.I(this),this.addController(this._tooltipController)}}(0,
|
75
|
+
`}ready(){super.ready(),this._tooltipController=new s.I(this),this.addController(this._tooltipController)}}(0,n.X)(p)},93555:(t,e,r)=>{r.d(e,{x:()=>i}),r(64511),r(42068),r(9433),r(3241),r(83315);var o=r(87550);const i=o.AH`
|
76
76
|
:host {
|
77
77
|
/* Sizing */
|
78
78
|
--lumo-button-size: var(--lumo-size-m);
|
@@ -335,5 +335,5 @@
|
|
335
335
|
margin-left: 0;
|
336
336
|
margin-right: 0;
|
337
337
|
}
|
338
|
-
`;(0,
|
338
|
+
`;(0,o.SF)("vaadin-button",i,{moduleId:"lumo-button"})},98538:(t,e,r)=>{r.d(e,{S:()=>l,T:()=>s});var o=r(88961),i=r(25964),n=r(8512),a=r(63200);const s=(0,i.xE)("icon"),l=(0,a.Zz)((0,o.RF)({mappings:{fill:[{},{property:n.q.cssVarList.fill}]}}),o.VO,o.tQ)((0,o.tz)({slots:[],wrappedEleName:"descope-image",style:()=>"\n :host {\n display: inline-flex;\n }\n ",excludeAttrsSync:["tabindex","class"],componentName:s}))}}]);
|
339
339
|
//# sourceMappingURL=descope-button.js.map
|