@descope/web-components-ui 1.35.0 → 1.36.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 +3796 -3778
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +695 -678
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/1519.js +1 -1
- package/dist/umd/1519.js.map +1 -1
- package/dist/umd/2672.js +1 -1
- package/dist/umd/2672.js.map +1 -1
- package/dist/umd/6424.js +1 -1
- package/dist/umd/6424.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.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 +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
- package/dist/umd/{descope-button-index-js.js → descope-button.js} +3 -3
- package/dist/umd/descope-button.js.map +1 -0
- 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-icon.js +2 -0
- package/dist/umd/descope-icon.js.map +1 -0
- 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-upload-file-index-js.js +1 -1
- package/dist/umd/descope-upload-file-index-js.js.map +1 -1
- package/dist/umd/descope-user-attribute-index-js.js +1 -1
- package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js +1 -1
- 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 +3 -3
- package/src/components/button-selection-group-fields/descope-button-selection-group-item/ButtonSelectionGroupItemClass.js +1 -1
- package/src/components/button-selection-group-fields/descope-button-selection-group-item/index.js +1 -1
- package/src/components/descope-date-field/descope-calendar/CalendarClass.js +1 -1
- package/src/components/descope-date-field/descope-calendar/index.js +1 -1
- package/src/components/descope-third-party-app-logo/ThirdPartyAppLogoClass.js +1 -1
- package/src/components/descope-third-party-app-logo/index.js +1 -1
- package/src/components/descope-upload-file/UploadFileClass.js +1 -1
- package/src/components/descope-upload-file/index.js +1 -1
- package/src/components/descope-user-attribute/UserAttributeClass.js +1 -1
- package/src/components/descope-user-attribute/index.js +1 -1
- package/src/components/descope-user-auth-method/UserAuthMethodClass.js +2 -2
- package/src/components/descope-user-auth-method/index.js +1 -1
- package/src/components/mapping-fields/descope-mappings-field/index.js +1 -1
- package/src/index.cjs.js +0 -1
- package/src/index.js +0 -2
- package/src/theme/components/index.js +2 -2
- package/dist/umd/descope-button-index-js.js.map +0 -1
- package/dist/umd/descope-icon-index-js.js +0 -2
- package/dist/umd/descope-icon-index-js.js.map +0 -1
- package/src/components/descope-button/ButtonClass.js +0 -163
- package/src/components/descope-button/clickableMixin.js +0 -10
- package/src/components/descope-button/index.js +0 -6
- package/src/components/descope-icon/IconClass.js +0 -98
- package/src/components/descope-icon/helpers.js +0 -51
- package/src/components/descope-icon/index.js +0 -5
- package/src/theme/components/button.js +0 -133
- package/src/theme/components/icon.js +0 -7
- /package/dist/umd/{descope-button-index-js.js.LICENSE.txt → descope-button.js.LICENSE.txt} +0 -0
package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1837,3829,8399],{3393:(t,e,n)=>{n.d(e,{y:()=>s});var i=n(9696),r=n(79365),o=n(81365);const s=(...t)=>(0,i.Zz)(r.XX,r._$,r.yF,r.jd)((0,o.q)(...t))},80001:(t,e,n)=>{n.d(e,{$W:()=>u,S$:()=>p,_Z:()=>o});var i=n(97810),r=n(73551);const o=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:a,requiredIndicator:l,internalWrapper:d,errorMessage:c}={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:[{...a,property:"color"},{...l,property:"color"}],labelRequiredIndicator:{...l,property:"content"},errorMessageTextColor:{...c,property:"color"},errorMessageIcon:{...c,property:"background-image"},errorMessageIconSize:{...c,property:"background-size"},errorMessageIconPadding:{...c,property:"padding-inline-start"},errorMessageIconRepeat:{...c,property:"background-repeat"},errorMessageIconPosition:{...c,property:"background-position"},itemsSpacing:{...d,property:"gap"}},p=`\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 `},51298:(t,e,n)=>{n.d(e,{m:()=>s}),n(25964);var i=n(3393),r=n(97810),o=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=o.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}},5364:(t,e,n)=>{n.d(e,{T:()=>o,o:()=>s});var i=n(97810),r=n(51298);const o=(0,i.xE)("button-multi-selection-group-internal");class s extends((0,r.m)(o)){#n(){return this.items.filter((t=>t.hasAttribute("selected")))}onClick(t){t.target!==t.currentTarget&&(this.#n().includes(t.target)?t.target.removeAttribute("selected"):t.target.setAttribute("selected","true"),this.dispatchChange())}get value(){return this.#n().map((t=>t.value))}set value(t){this.items.forEach((e=>{t.includes(e.value)?e.setAttribute("selected","true"):e.removeAttribute("selected")}))}get minItemsSelection(){return parseInt(this.getAttribute("min-items-selection"),10)||0}get maxItemsSelection(){return parseInt(this.getAttribute("max-items-selection"),10)||0}#i(t){const e=Array.isArray(t);return e||console.error("default-values must be an array, received:",t),e}get defaultValues(){const t=this.getAttribute("default-values");if(t)try{const e=JSON.parse(t);if(this.#i(e))return e}catch(t){console.error('could not parse data string from attribute "default-values" -',t.message)}return[]}setDefaultValues(){setTimeout((()=>{this.defaultValues&&(this.value=this.defaultValues,this.setCustomValidity())}))}getValidity(){return this.isRequired&&!this.value.length?{valueMissing:!0}:this.isRequired&&this.minItemsSelection&&this.value.length<this.minItemsSelection?{rangeUnderflow:!0}:this.maxItemsSelection&&this.value.length>this.maxItemsSelection?{rangeOverflow:!0}:{}}init(){super.init(),this.setDefaultValues(),this.querySelector("slot").addEventListener("click",this.onClick.bind(this))}}},91831:(t,e,n)=>{n.r(e),n.d(e,{ButtonMultiSelectionGroupInternalClass:()=>i.o});var i=n(5364);customElements.define(i.T,i.o)},55162:(t,e,n)=>{n.r(e),n.d(e,{ButtonMultiSelectionGroupClass:()=>d,componentName:()=>l});var i=n(79365),r=n(5364),o=n(9696),s=n(97810),a=n(80001);const l=(0,s.xE)("button-multi-selection-group"),d=(0,o.Zz)((0,i.RF)({mappings:{...a.$W}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,a._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-values","min-items-selection","max-items-selection"]})}}))((0,i.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>a.S$,excludeAttrsSync:["tabindex"],componentName:l}));n(91831),n(15450),customElements.define(l,d)},15450:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupItemClass:()=>u});var i=n(79365),r=n(81365),o=n(9696),s=n(97810),a=n(88068),l=n(25964);const d=(0,s.xE)("button-selection-group-item");class c extends((0,r.q)({componentName:d,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,s.EA)(this,this.baseElement,{includeAttrs:["size","variant"]}),(0,s.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 u=(0,o.Zz)((0,i.RF)({mappings:{hostDirection:{selector:()=>a.J.componentName,property:a.J.cssVarList.hostDirection},backgroundColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.backgroundColor},labelTextColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.labelTextColor},borderColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderColor},borderWidth:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderWidth},borderStyle:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderStyle},borderRadius:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderRadius},outlineColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.outlineColor}}}),i.VO,i.tQ)(c);n(85076),customElements.define(d,u)},88068:(t,e,n)=>{n.d(e,{J:()=>h,T:()=>l});var i=n(9696),r=n(97810),o=n(79365),s=n(20618),a=n(12011);const l=(0,r.xE)("button"),{host:d,label:c,slottedIcon:u}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let p;const h=(0,i.Zz)((0,o.RF)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...d,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:s.S.cssVarList.fill},labelTextDecoration:{...c,property:"text-decoration"},labelSpacing:{...c,property:"gap"},textAlign:{...c,property:"justify-content",fallback:"center"},iconSize:[{...u,property:"width"},{...u,property:"height"}]}}),a.G,o.VO,o.tQ)((0,o.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${p}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${h.cssVarList.outlineWidth}) + var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${h.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${h.cssVarList.hostHeight}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${h.cssVarList.hostWidth}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l})),{color:b,fontSize:g}=h.cssVarList;p=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${b});\n\t\ttop: calc(50% - (var(${g}) / 2));\n\t\tleft: calc(50% - (var(${g}) / 2));\n\t\tborder-width: calc(var(${g}) / 10);\n\t\twidth: var(${g});\n\t\theight: var(${g});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"])::part(prefix),\n\t:host([loading="true"])::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},12011:(t,e,n)=>{n.d(e,{G:()=>i});const i=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},85076:(t,e,n)=>{n.r(e),n.d(e,{ButtonClass:()=>i.J,componentName:()=>i.T}),n(83799);var i=n(88068);customElements.define(i.T,i.J)},20618:(t,e,n)=>{n.d(e,{S:()=>u,T:()=>d});var i=n(79365),r=n(81365),o=n(9696),s=n(97810),a=n(28796),l=n(25964);const d=(0,s.xE)("icon");class c extends((0,r.q)({componentName:d,baseSelector:"slot"})){static get observedAttributes(){return["src"]}#r;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,l.fz)("\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n ",this)}init(){super.init?.(),this.toggleVisibility(this.src)}toggleVisibility(t){this.style.display=t?"":"none"}get src(){return this.getAttribute("src")}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach((t=>{t.setAttribute("fill",`var(${u.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)}))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&"src"===t&&(this.toggleVisibility(n),(0,a.w)(this.src).then((t=>{if(this.innerHTML="",t){const e=t.cloneNode(!0);this.updateFillColor(e),this.appendChild(e)}})))}}const u=(0,o.Zz)((0,i.RF)({mappings:{fill:{}}}),i.VO,i.tQ)(c)},28796:(t,e,n)=>{n.d(e,{w:()=>o});var i=n(25414);const r=t=>{const e=i.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0}});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},o=async t=>{try{let e;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const n=atob(t.slice(26));e=r(n)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const n=await fetch(t),i=await n.text();e=r(i)}else e=(t=>{const e=document.createElement("img");return e.setAttribute("src",t),e})(t);return e.style.setProperty("max-width","100%"),e.style.setProperty("max-height","100%"),e}catch{return null}}},73551:(t,e,n)=>{n.d(e,{$J:()=>p,I4:()=>s,Kl:()=>h,LJ:()=>u,Qv:()=>o,X6:()=>l,cy:()=>i,fu:()=>d,kG:()=>c,lS:()=>a,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`,o=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`,a=(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`,c=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${r(t)}\n ${s(t)}\n ${a(t)}\n ${o(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 ${c(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`,p=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]) [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 '}}]);
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1837,3829,8399],{19624:(t,e,n)=>{n.d(e,{J:()=>h,T:()=>l});var i=n(63200),r=n(25964),o=n(88961),s=n(98538),a=n(10767);const l=(0,r.xE)("button"),{host:d,label:c,slottedIcon:u}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let p;const h=(0,i.Zz)((0,o.RF)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...d,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:s.S.cssVarList.fill},labelTextDecoration:{...c,property:"text-decoration"},labelSpacing:{...c,property:"gap"},textAlign:{...c,property:"justify-content",fallback:"center"},iconSize:[{...u,property:"width"},{...u,property:"height"}]}}),a.G,o.VO,o.tQ)((0,o.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${p}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${h.cssVarList.outlineWidth}) + var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${h.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${h.cssVarList.hostHeight}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${h.cssVarList.hostWidth}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l})),{color:b,fontSize:g}=h.cssVarList;p=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${b});\n\t\ttop: calc(50% - (var(${g}) / 2));\n\t\tleft: calc(50% - (var(${g}) / 2));\n\t\tborder-width: calc(var(${g}) / 10);\n\t\twidth: var(${g});\n\t\theight: var(${g});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"])::part(prefix),\n\t:host([loading="true"])::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},10767:(t,e,n)=>{n.d(e,{G:()=>i});const i=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},30576:(t,e,n)=>{n.r(e),n.d(e,{ButtonClass:()=>i.J,componentName:()=>i.T});var i=n(19624);n(83799),customElements.define(i.T,i.J)},98538:(t,e,n)=>{n.d(e,{S:()=>c,T:()=>l});var i=n(88961),r=n(72270),o=n(63200),s=n(25964),a=n(31004);const l=(0,s.xE)("icon");class d extends((0,r.qu)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return["src"]}#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,s.fz)("\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n ",this)}init(){super.init?.(),this.toggleVisibility(this.src)}toggleVisibility(t){this.style.display=t?"":"none"}get src(){return this.getAttribute("src")}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach((t=>{t.setAttribute("fill",`var(${c.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)}))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&"src"===t&&(this.toggleVisibility(n),(0,a.w)(this.src).then((t=>{if(this.innerHTML="",t){const e=t.cloneNode(!0);this.updateFillColor(e),this.appendChild(e)}})))}}const c=(0,o.Zz)((0,i.RF)({mappings:{fill:{}}}),i.VO,i.tQ)(d)},31004:(t,e,n)=>{n.d(e,{w:()=>o});var i=n(25414);const r=t=>{const e=i.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0}});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},o=async t=>{try{let e;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const n=atob(t.slice(26));e=r(n)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const n=await fetch(t),i=await n.text();e=r(i)}else e=(t=>{const e=document.createElement("img");return e.setAttribute("src",t),e})(t);return e.style.setProperty("max-width","100%"),e.style.setProperty("max-height","100%"),e}catch{return null}}},3393:(t,e,n)=>{n.d(e,{y:()=>s});var i=n(9696),r=n(79365),o=n(81365);const s=(...t)=>(0,i.Zz)(r.XX,r._$,r.yF,r.jd)((0,o.q)(...t))},80001:(t,e,n)=>{n.d(e,{$W:()=>u,S$:()=>p,_Z:()=>o});var i=n(97810),r=n(73551);const o=t=>class extends t{#e=({value:t,label:e})=>`<descope-button-selection-group-item value="${t}">${e}</descope-button-selection-group-item>`;#n;get renderItem(){return this.#e}set renderItem(t){this.#e=t,this.renderItems()}get size(){return this.inputElement?.size}get data(){if(this.#n)return this.#n;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.#n=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:a,requiredIndicator:l,internalWrapper:d,errorMessage:c}={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:[{...a,property:"color"},{...l,property:"color"}],labelRequiredIndicator:{...l,property:"content"},errorMessageTextColor:{...c,property:"color"},errorMessageIcon:{...c,property:"background-image"},errorMessageIconSize:{...c,property:"background-size"},errorMessageIconPadding:{...c,property:"padding-inline-start"},errorMessageIconRepeat:{...c,property:"background-repeat"},errorMessageIconPosition:{...c,property:"background-position"},itemsSpacing:{...d,property:"gap"}},p=`\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 `},51298:(t,e,n)=>{n.d(e,{m:()=>s}),n(25964);var i=n(3393),r=n(97810),o=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=o.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}},5364:(t,e,n)=>{n.d(e,{T:()=>o,o:()=>s});var i=n(97810),r=n(51298);const o=(0,i.xE)("button-multi-selection-group-internal");class s extends((0,r.m)(o)){#i(){return this.items.filter((t=>t.hasAttribute("selected")))}onClick(t){t.target!==t.currentTarget&&(this.#i().includes(t.target)?t.target.removeAttribute("selected"):t.target.setAttribute("selected","true"),this.dispatchChange())}get value(){return this.#i().map((t=>t.value))}set value(t){this.items.forEach((e=>{t.includes(e.value)?e.setAttribute("selected","true"):e.removeAttribute("selected")}))}get minItemsSelection(){return parseInt(this.getAttribute("min-items-selection"),10)||0}get maxItemsSelection(){return parseInt(this.getAttribute("max-items-selection"),10)||0}#r(t){const e=Array.isArray(t);return e||console.error("default-values must be an array, received:",t),e}get defaultValues(){const t=this.getAttribute("default-values");if(t)try{const e=JSON.parse(t);if(this.#r(e))return e}catch(t){console.error('could not parse data string from attribute "default-values" -',t.message)}return[]}setDefaultValues(){setTimeout((()=>{this.defaultValues&&(this.value=this.defaultValues,this.setCustomValidity())}))}getValidity(){return this.isRequired&&!this.value.length?{valueMissing:!0}:this.isRequired&&this.minItemsSelection&&this.value.length<this.minItemsSelection?{rangeUnderflow:!0}:this.maxItemsSelection&&this.value.length>this.maxItemsSelection?{rangeOverflow:!0}:{}}init(){super.init(),this.setDefaultValues(),this.querySelector("slot").addEventListener("click",this.onClick.bind(this))}}},91831:(t,e,n)=>{n.r(e),n.d(e,{ButtonMultiSelectionGroupInternalClass:()=>i.o});var i=n(5364);customElements.define(i.T,i.o)},55162:(t,e,n)=>{n.r(e),n.d(e,{ButtonMultiSelectionGroupClass:()=>d,componentName:()=>l});var i=n(79365),r=n(5364),o=n(9696),s=n(97810),a=n(80001);const l=(0,s.xE)("button-multi-selection-group"),d=(0,o.Zz)((0,i.RF)({mappings:{...a.$W}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,a._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-values","min-items-selection","max-items-selection"]})}}))((0,i.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>a.S$,excludeAttrsSync:["tabindex"],componentName:l}));n(91831),n(15450),customElements.define(l,d)},15450:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupItemClass:()=>u});var i=n(79365),r=n(81365),o=n(9696),s=n(97810),a=n(19624),l=n(25964);const d=(0,s.xE)("button-selection-group-item");class c extends((0,r.q)({componentName:d,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,s.EA)(this,this.baseElement,{includeAttrs:["size","variant"]}),(0,s.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 u=(0,o.Zz)((0,i.RF)({mappings:{hostDirection:{selector:()=>a.J.componentName,property:a.J.cssVarList.hostDirection},backgroundColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.backgroundColor},labelTextColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.labelTextColor},borderColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderColor},borderWidth:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderWidth},borderStyle:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderStyle},borderRadius:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderRadius},outlineColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.outlineColor}}}),i.VO,i.tQ)(c);n(30576),customElements.define(d,u)},73551:(t,e,n)=>{n.d(e,{$J:()=>p,I4:()=>s,Kl:()=>h,LJ:()=>u,Qv:()=>o,X6:()=>l,cy:()=>i,fu:()=>d,kG:()=>c,lS:()=>a,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`,o=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`,a=(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`,c=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${r(t)}\n ${s(t)}\n ${a(t)}\n ${o(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 ${c(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`,p=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]) [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 '}}]);
|
2
2
|
//# sourceMappingURL=button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map
|
package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"button-selection-group-fields-descope-button-multi-selection-group-index-js.js","mappings":"uMASO,MAAMA,EAAuB,IAA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jBC,CAAiBjC,GAAgB,CAE1C,MAAMkC,QAAmBC,MAAMnC,GACzBe,QAAamB,EAAWnB,OAC9BV,EAAMS,EAAaC,EACrB,MAEEV,EA7Be,CAACL,IACpB,MAAMK,EAAMvD,SAASC,cAAc,OAEnC,OADAsD,EAAI7H,aAAa,MAAOwH,GACjBK,CAAG,EA0BA+B,CAAapC,GAMrB,OAHAK,EAAI9C,MAAM8E,YAAY,YAAa,QACnChC,EAAI9C,MAAM8E,YAAY,aAAc,QAE7BhC,CACT,CAAE,MACA,OAAO,IACT,E,8HCjDK,MAAMiC,EAA0BrE,GAAe,4CAE1BA,EAAWsE,4BAA4BtE,EAAWuE,gCAwBjEC,EAAuBC,GAAS,SACvCA,sIASOC,EAAmBD,GAAS,SACnCA,6GAOOE,EAAoBF,GAAS,SACpCA,mBACAA,wBACAA,mEAKOG,EAAwB,CAACH,EAAMrC,EAAM,UAAY,SACxDqC,iBAAoBrC,2BACvBqC,iBAAoBrC,gDAgBVyC,EAA8B,IAAM,uGAOpCC,EAA2BL,GAAS,SAC3CA,8DAKOM,EAAyCN,GAAS,SACzDA,oEAKOO,EAAsB,CAACP,EAAMzE,IAAe,SACnDwE,EAAoBC,WACpBE,EAAiBF,WACjBG,EAAsBH,WACtBC,EAAgBD,WAlCY,EAACA,EAAMzE,IAAe,SAClDyE,kCACAA,8CACAA,wCACAA,yCACAA,0EACiCzE,EAAWiF,wDAClBjF,EAAWkF,oBAAoBlF,EAAWmF,wCA4BpEC,CAAmBX,EAAMzE,WACzB+E,EAAsCN,WAnFV,CAACA,GAAS,SACtCA,yCAmFAY,CAAmBZ,WA9EQ,CAACA,GAAS,SACrCA,mHA8EAa,CAAkBb,WA3FwB,CAACA,GAAS,SACpDA,gEA2FAc,CAAiCd,OAM1Be,EAA2Bf,GAAS,4ZAiB3CA,yJAQOgB,EAA0B,IAC9B,oR","sources":["webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.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/createBaseButtonSelectionGroupInternalClass.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-multi-selection-group-internal/ButtonMultiSelectionGroupInternalClass.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-multi-selection-group-internal/index.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-multi-selection-group/ButtonMultiSelectionGroupClass.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-multi-selection-group/index.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/./src/components/descope-button/ButtonClass.js","webpack://@descope/web-components-ui/./src/components/descope-button/clickableMixin.js","webpack://@descope/web-components-ui/./src/components/descope-button/index.js","webpack://@descope/web-components-ui/./src/components/descope-icon/IconClass.js","webpack://@descope/web-components-ui/./src/components/descope-icon/helpers.js","webpack://@descope/web-components-ui/./src/helpers/themeHelpers/resetHelpers.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 { 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 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 { 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 { getComponentName } from '../../../helpers/componentHelpers';\nimport { createBaseButtonSelectionGroupInternalClass } from '../createBaseButtonSelectionGroupInternalClass';\n\nexport const componentName = getComponentName('button-multi-selection-group-internal');\n\nexport class ButtonMultiSelectionGroupInternalClass extends createBaseButtonSelectionGroupInternalClass(\n componentName\n) {\n #getSelectedNodes() {\n return this.items.filter((item) => item.hasAttribute('selected'));\n }\n\n onClick(e) {\n if (e.target !== e.currentTarget) {\n if (this.#getSelectedNodes().includes(e.target)) {\n e.target.removeAttribute('selected');\n } else {\n e.target.setAttribute('selected', 'true');\n }\n this.dispatchChange();\n }\n }\n\n get value() {\n return this.#getSelectedNodes().map((node) => node.value);\n }\n\n set value(values) {\n this.items.forEach((item) => {\n if (values.includes(item.value)) {\n item.setAttribute('selected', 'true');\n } else {\n item.removeAttribute('selected');\n }\n });\n }\n\n get minItemsSelection() {\n return parseInt(this.getAttribute('min-items-selection'), 10) || 0;\n }\n\n get maxItemsSelection() {\n return parseInt(this.getAttribute('max-items-selection'), 10) || 0;\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('default-values must be an array, received:', data);\n }\n\n return isValid;\n }\n\n get defaultValues() {\n const defaultValuesAttr = this.getAttribute('default-values');\n if (defaultValuesAttr) {\n try {\n const defaultValues = JSON.parse(defaultValuesAttr);\n if (this.#isValidDataType(defaultValues)) {\n return defaultValues;\n }\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('could not parse data string from attribute \"default-values\" -', e.message);\n }\n }\n return [];\n }\n\n setDefaultValues() {\n // we want to defer this action until all attributes are synced\n setTimeout(() => {\n if (this.defaultValues) {\n this.value = this.defaultValues;\n this.setCustomValidity();\n }\n });\n }\n\n getValidity() {\n if (this.isRequired && !this.value.length) {\n return { valueMissing: true };\n }\n // If the field is not required, no minimum selection can be set\n if (this.isRequired && this.minItemsSelection && this.value.length < this.minItemsSelection) {\n return {\n rangeUnderflow: true,\n };\n }\n if (this.maxItemsSelection && this.value.length > this.maxItemsSelection) {\n return {\n rangeOverflow: true,\n };\n }\n return {};\n }\n\n init() {\n super.init();\n\n this.setDefaultValues();\n\n this.querySelector('slot').addEventListener('click', this.onClick.bind(this));\n }\n}\n","import {\n componentName,\n ButtonMultiSelectionGroupInternalClass,\n} from './ButtonMultiSelectionGroupInternalClass';\n\ncustomElements.define(componentName, ButtonMultiSelectionGroupInternalClass);\n\nexport { ButtonMultiSelectionGroupInternalClass };\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../../mixins';\nimport { componentName as descopeInternalComponentName } from '../descope-button-multi-selection-group-internal/ButtonMultiSelectionGroupInternalClass';\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-multi-selection-group');\n\nconst buttonMultiSelectionGroupMixin = (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-values', 'min-items-selection', 'max-items-selection'],\n });\n }\n };\n\nexport const ButtonMultiSelectionGroupClass = compose(\n createStyleMixin({\n mappings: {\n ...buttonSelectionGroupMappings,\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n componentNameValidationMixin,\n buttonSelectionGroupBaseMixin,\n buttonMultiSelectionGroupMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => buttonSelectionGroupStyles,\n excludeAttrsSync: ['tabindex'],\n componentName,\n })\n);\n\nexport default ButtonMultiSelectionGroupClass;\n","import { componentName, ButtonMultiSelectionGroupClass } from './ButtonMultiSelectionGroupClass';\nimport '../descope-button-multi-selection-group-internal';\nimport '../descope-button-selection-group-item';\n\ncustomElements.define(componentName, ButtonMultiSelectionGroupClass);\n\nexport { ButtonMultiSelectionGroupClass, componentName };\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-button/ButtonClass';\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-button';\n\ncustomElements.define(componentName, ButtonSelectionGroupItemClass);\n\nexport { ButtonSelectionGroupItemClass };\n","import { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n} from '../../mixins';\nimport { IconClass } from '../descope-icon/IconClass';\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","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 '@vaadin/button';\nimport { componentName, ButtonClass } from './ButtonClass';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","/* eslint-disable no-use-before-define */\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport { createIcon } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('icon');\n\nclass RawIcon extends createBaseClass({ componentName, baseSelector: 'slot' }) {\n static get observedAttributes() {\n return ['src'];\n }\n\n #icon;\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 > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n `,\n this\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.src);\n }\n\n toggleVisibility(isVisible) {\n this.style.display = isVisible ? '' : 'none';\n }\n\n get src() {\n return this.getAttribute('src');\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(${IconClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`\n );\n });\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (attrName === 'src') {\n this.toggleVisibility(newValue);\n\n createIcon(this.src).then((res) => {\n this.innerHTML = '';\n if (res) {\n const clonedNode = res.cloneNode(true);\n this.updateFillColor(clonedNode);\n this.appendChild(clonedNode);\n }\n });\n }\n }\n}\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawIcon);\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) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\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, { USE_PROFILES: { svg: true, svgFilters: true } });\n\n const parser = new DOMParser();\n const ele = parser.parseFromString(clean, 'image/svg+xml').querySelector('svg');\n return ele;\n};\n\nexport const createIcon = async (src) => {\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);\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","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"],"names":["createBaseInputClass","args","buttonSelectionGroupBaseMixin","superclass","value","label","renderItem","this","renderFn","renderItems","size","inputElement","data","dataAttr","getAttribute","JSON","parse","isValidDataType","e","console","error","message","isValid","Array","isArray","getItemsTemplate","reduce","acc","item","template","innerHTML","init","super","bind","includeAttrs","addedNodes","forEach","node","setAttribute","host","requiredIndicator","internalWrapper","errorMessage","selector","buttonSelectionGroupMappings","hostWidth","property","hostDirection","fontFamily","labelTextColor","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","itemsSpacing","buttonSelectionGroupStyles","createBaseButtonSelectionGroupInternalClass","componentName","BaseButtonSelectionGroupInternalClass","baseSelector","constructor","dispatchChange","items","querySelector","assignedElements","isReadonly","warn","onSizeChange","onReadOnlyChange","toggleAttribute","getValidity","onObservedAttributeChange","attrs","attr","addEventListener","isTrusted","focus","ButtonMultiSelectionGroupInternalClass","filter","hasAttribute","onClick","target","currentTarget","includes","removeAttribute","map","values","minItemsSelection","parseInt","maxItemsSelection","defaultValues","defaultValuesAttr","setDefaultValues","setTimeout","setCustomValidity","isRequired","length","valueMissing","rangeUnderflow","rangeOverflow","customElements","define","ButtonMultiSelectionGroupClass","mappings","proxyProps","document","createElement","baseElement","appendChild","content","cloneNode","shadowRoot","slots","wrappedEleName","style","excludeAttrsSync","RawSelectItem","createBaseClass","variant","attachShadow","mode","handleFocus","ButtonSelectionGroupItemClass","ButtonClass","cssVarList","backgroundColor","borderColor","borderWidth","borderStyle","borderRadius","outlineColor","slottedIcon","loadingIndicatorStyles","hostHeight","fontSize","cursor","outlineOffset","outlineStyle","outlineWidth","verticalPadding","horizontalPadding","fallback","iconColor","fill","labelTextDecoration","labelSpacing","textAlign","iconSize","color","clickableMixin","isLoading","click","RawIcon","observedAttributes","toggleVisibility","src","isVisible","display","updateFillColor","querySelectorAll","ele","IconClass","attributeChangedCallback","attrName","oldValue","newValue","then","res","clonedNode","createSvgEle","text","clean","sanitize","USE_PROFILES","svg","svgFilters","DOMParser","parseFromString","createIcon","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","createImgEle","setProperty","useHostExternalPadding","inputOutlineWidth","inputOutlineOffset","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","inputValueTextColor","inputHeight","inputBackgroundColor","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"button-selection-group-fields-descope-button-multi-selection-group-index-js.js","mappings":"uOAWO,MAAMA,GAAgB,QAAiB,WAsCxC,KAAEC,EAAI,MAAEC,EAAK,YAAEC,GAAgB,CACnCF,KAAM,CAAEG,SAAU,IAAM,SACxBF,MAAO,CAAEE,SAAU,iBACnBD,YAAa,CAAEC,SAAU,IAAM,4BAGjC,IAAIC,EA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5BS,SAAUH,EAAA,EAAYuB,WAAWT,cAEnCH,aAAc,CACZb,SAAU,IAAME,EAAA,EAAYN,cAC5BS,SAAUH,EAAA,EAAYuB,WAAWZ,iBAIvC,KACA,KAtC2C,CAuC3C8K,G,SCpHFhJ,eAAeC,OAAOhD,EAAemM,E,8HCH9B,MAAMC,EAA0BvK,GAAe,4CAE1BA,EAAWwK,4BAA4BxK,EAAWyK,gCAwBjEC,EAAuBC,GAAS,SACvCA,sIASOC,EAAmBD,GAAS,SACnCA,6GAOOE,EAAoBF,GAAS,SACpCA,mBACAA,wBACAA,mEAKOG,EAAwB,CAACH,EAAMvI,EAAM,UAAY,SACxDuI,iBAAoBvI,2BACvBuI,iBAAoBvI,gDAgBV2I,EAA8B,IAAM,uGAOpCC,EAA2BL,GAAS,SAC3CA,8DAKOM,EAAyCN,GAAS,SACzDA,oEAKOO,EAAsB,CAACP,EAAM3K,IAAe,SACnD0K,EAAoBC,WACpBE,EAAiBF,WACjBG,EAAsBH,WACtBC,EAAgBD,WAlCY,EAACA,EAAM3K,IAAe,SAClD2K,kCACAA,8CACAA,wCACAA,yCACAA,0EACiC3K,EAAWmL,wDAClBnL,EAAWoL,oBAAoBpL,EAAWqL,wCA4BpEC,CAAmBX,EAAM3K,WACzBiL,EAAsCN,WAnFV,CAACA,GAAS,SACtCA,yCAmFAY,CAAmBZ,WA9EQ,CAACA,GAAS,SACrCA,mHA8EAa,CAAkBb,WA3FwB,CAACA,GAAS,SACpDA,gEA2FAc,CAAiCd,OAM1Be,EAA2Bf,GAAS,4ZAiB3CA,yJAQOgB,EAA0B,IAC9B,oR","sources":["webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/helpers.js","webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.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/createBaseButtonSelectionGroupInternalClass.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-multi-selection-group-internal/ButtonMultiSelectionGroupInternalClass.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-multi-selection-group-internal/index.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-multi-selection-group/ButtonMultiSelectionGroupClass.js","webpack://@descope/web-components-ui/./src/components/button-selection-group-fields/descope-button-multi-selection-group/index.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/./src/helpers/themeHelpers/resetHelpers.js"],"sourcesContent":["import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n} 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","export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","/* eslint-disable no-use-before-define */\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } 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 { createIcon } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('icon');\n\nclass RawIcon extends createBaseClass({ componentName, baseSelector: 'slot' }) {\n static get observedAttributes() {\n return ['src'];\n }\n\n #icon;\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 > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n `,\n this\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.src);\n }\n\n toggleVisibility(isVisible) {\n this.style.display = isVisible ? '' : 'none';\n }\n\n get src() {\n return this.getAttribute('src');\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(${IconClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`\n );\n });\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (attrName === 'src') {\n this.toggleVisibility(newValue);\n\n createIcon(this.src).then((res) => {\n this.innerHTML = '';\n if (res) {\n const clonedNode = res.cloneNode(true);\n this.updateFillColor(clonedNode);\n this.appendChild(clonedNode);\n }\n });\n }\n }\n}\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawIcon);\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) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\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, { USE_PROFILES: { svg: true, svgFilters: true } });\n\n const parser = new DOMParser();\n const ele = parser.parseFromString(clean, 'image/svg+xml').querySelector('svg');\n return ele;\n};\n\nexport const createIcon = async (src) => {\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);\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 '../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 { 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 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 { 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 { getComponentName } from '../../../helpers/componentHelpers';\nimport { createBaseButtonSelectionGroupInternalClass } from '../createBaseButtonSelectionGroupInternalClass';\n\nexport const componentName = getComponentName('button-multi-selection-group-internal');\n\nexport class ButtonMultiSelectionGroupInternalClass extends createBaseButtonSelectionGroupInternalClass(\n componentName\n) {\n #getSelectedNodes() {\n return this.items.filter((item) => item.hasAttribute('selected'));\n }\n\n onClick(e) {\n if (e.target !== e.currentTarget) {\n if (this.#getSelectedNodes().includes(e.target)) {\n e.target.removeAttribute('selected');\n } else {\n e.target.setAttribute('selected', 'true');\n }\n this.dispatchChange();\n }\n }\n\n get value() {\n return this.#getSelectedNodes().map((node) => node.value);\n }\n\n set value(values) {\n this.items.forEach((item) => {\n if (values.includes(item.value)) {\n item.setAttribute('selected', 'true');\n } else {\n item.removeAttribute('selected');\n }\n });\n }\n\n get minItemsSelection() {\n return parseInt(this.getAttribute('min-items-selection'), 10) || 0;\n }\n\n get maxItemsSelection() {\n return parseInt(this.getAttribute('max-items-selection'), 10) || 0;\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('default-values must be an array, received:', data);\n }\n\n return isValid;\n }\n\n get defaultValues() {\n const defaultValuesAttr = this.getAttribute('default-values');\n if (defaultValuesAttr) {\n try {\n const defaultValues = JSON.parse(defaultValuesAttr);\n if (this.#isValidDataType(defaultValues)) {\n return defaultValues;\n }\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('could not parse data string from attribute \"default-values\" -', e.message);\n }\n }\n return [];\n }\n\n setDefaultValues() {\n // we want to defer this action until all attributes are synced\n setTimeout(() => {\n if (this.defaultValues) {\n this.value = this.defaultValues;\n this.setCustomValidity();\n }\n });\n }\n\n getValidity() {\n if (this.isRequired && !this.value.length) {\n return { valueMissing: true };\n }\n // If the field is not required, no minimum selection can be set\n if (this.isRequired && this.minItemsSelection && this.value.length < this.minItemsSelection) {\n return {\n rangeUnderflow: true,\n };\n }\n if (this.maxItemsSelection && this.value.length > this.maxItemsSelection) {\n return {\n rangeOverflow: true,\n };\n }\n return {};\n }\n\n init() {\n super.init();\n\n this.setDefaultValues();\n\n this.querySelector('slot').addEventListener('click', this.onClick.bind(this));\n }\n}\n","import {\n componentName,\n ButtonMultiSelectionGroupInternalClass,\n} from './ButtonMultiSelectionGroupInternalClass';\n\ncustomElements.define(componentName, ButtonMultiSelectionGroupInternalClass);\n\nexport { ButtonMultiSelectionGroupInternalClass };\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../../mixins';\nimport { componentName as descopeInternalComponentName } from '../descope-button-multi-selection-group-internal/ButtonMultiSelectionGroupInternalClass';\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-multi-selection-group');\n\nconst buttonMultiSelectionGroupMixin = (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-values', 'min-items-selection', 'max-items-selection'],\n });\n }\n };\n\nexport const ButtonMultiSelectionGroupClass = compose(\n createStyleMixin({\n mappings: {\n ...buttonSelectionGroupMappings,\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n componentNameValidationMixin,\n buttonSelectionGroupBaseMixin,\n buttonMultiSelectionGroupMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => buttonSelectionGroupStyles,\n excludeAttrsSync: ['tabindex'],\n componentName,\n })\n);\n\nexport default ButtonMultiSelectionGroupClass;\n","import { componentName, ButtonMultiSelectionGroupClass } from './ButtonMultiSelectionGroupClass';\nimport '../descope-button-multi-selection-group-internal';\nimport '../descope-button-selection-group-item';\n\ncustomElements.define(componentName, ButtonMultiSelectionGroupClass);\n\nexport { ButtonMultiSelectionGroupClass, componentName };\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","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"],"names":["componentName","host","label","slottedIcon","selector","loadingIndicatorStyles","ButtonClass","mappings","hostWidth","property","hostHeight","hostDirection","fontSize","fontFamily","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","labelTextColor","iconColor","cssVarList","fill","labelTextDecoration","labelSpacing","textAlign","iconSize","slots","wrappedEleName","style","excludeAttrsSync","color","clickableMixin","superclass","isLoading","this","getAttribute","click","super","customElements","define","RawIcon","baseSelector","observedAttributes","constructor","attachShadow","mode","innerHTML","init","toggleVisibility","src","isVisible","display","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","IconClass","attributeChangedCallback","attrName","oldValue","newValue","then","res","clonedNode","cloneNode","appendChild","createSvgEle","text","clean","sanitize","USE_PROFILES","svg","svgFilters","DOMParser","parseFromString","querySelector","createIcon","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","setProperty","createBaseInputClass","args","buttonSelectionGroupBaseMixin","value","renderItem","renderFn","renderItems","size","inputElement","data","dataAttr","JSON","parse","isValidDataType","e","console","error","message","isValid","Array","isArray","getItemsTemplate","reduce","acc","item","template","bind","includeAttrs","addedNodes","requiredIndicator","internalWrapper","errorMessage","buttonSelectionGroupMappings","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","itemsSpacing","buttonSelectionGroupStyles","createBaseButtonSelectionGroupInternalClass","BaseButtonSelectionGroupInternalClass","dispatchChange","items","assignedElements","isReadonly","warn","onSizeChange","onReadOnlyChange","toggleAttribute","getValidity","onObservedAttributeChange","attrs","attr","addEventListener","isTrusted","focus","ButtonMultiSelectionGroupInternalClass","filter","hasAttribute","onClick","target","currentTarget","includes","removeAttribute","map","values","minItemsSelection","parseInt","maxItemsSelection","defaultValues","defaultValuesAttr","setDefaultValues","setTimeout","setCustomValidity","isRequired","length","valueMissing","rangeUnderflow","rangeOverflow","ButtonMultiSelectionGroupClass","proxyProps","baseElement","content","shadowRoot","RawSelectItem","createBaseClass","variant","handleFocus","ButtonSelectionGroupItemClass","useHostExternalPadding","inputOutlineWidth","inputOutlineOffset","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","inputValueTextColor","inputHeight","inputBackgroundColor","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle"],"sourceRoot":""}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1837,2141,7079],{3393:(t,e,n)=>{n.d(e,{y:()=>s});var i=n(9696),r=n(79365),o=n(81365);const s=(...t)=>(0,i.Zz)(r.XX,r._$,r.yF,r.jd)((0,o.q)(...t))},80001:(t,e,n)=>{n.d(e,{$W:()=>p,S$:()=>u,_Z:()=>o});var i=n(97810),r=n(73551);const o=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:a,requiredIndicator:l,internalWrapper:d,errorMessage:c}={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)"}},p={hostWidth:{...s,property:"width"},hostDirection:{...s,property:"direction"},fontFamily:s,labelTextColor:[{...a,property:"color"},{...l,property:"color"}],labelRequiredIndicator:{...l,property:"content"},errorMessageTextColor:{...c,property:"color"},errorMessageIcon:{...c,property:"background-image"},errorMessageIconSize:{...c,property:"background-size"},errorMessageIconPadding:{...c,property:"padding-inline-start"},errorMessageIconRepeat:{...c,property:"background-repeat"},errorMessageIconPosition:{...c,property:"background-position"},itemsSpacing:{...d,property:"gap"}},u=`\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 `},51298:(t,e,n)=>{n.d(e,{m:()=>s}),n(25964);var i=n(3393),r=n(97810),o=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=o.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}},92491:(t,e,n)=>{n.d(e,{T:()=>o,n:()=>s});var i=n(97810),r=n(51298);const o=(0,i.xE)("button-selection-group-internal");class s extends((0,r.m)(o)){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))}}},72415:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupInternalClass:()=>i.n});var i=n(92491);customElements.define(i.T,i.n)},15450:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupItemClass:()=>p});var i=n(79365),r=n(81365),o=n(9696),s=n(97810),a=n(88068),l=n(25964);const d=(0,s.xE)("button-selection-group-item");class c extends((0,r.q)({componentName:d,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,s.EA)(this,this.baseElement,{includeAttrs:["size","variant"]}),(0,s.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 p=(0,o.Zz)((0,i.RF)({mappings:{hostDirection:{selector:()=>a.J.componentName,property:a.J.cssVarList.hostDirection},backgroundColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.backgroundColor},labelTextColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.labelTextColor},borderColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderColor},borderWidth:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderWidth},borderStyle:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderStyle},borderRadius:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderRadius},outlineColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.outlineColor}}}),i.VO,i.tQ)(c);n(85076),customElements.define(d,p)},27926:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupClass:()=>d,componentName:()=>l});var i=n(79365),r=n(92491),o=n(9696),s=n(97810),a=n(80001);const l=(0,s.xE)("button-selection-group"),d=(0,o.Zz)((0,i.RF)({mappings:{...a.$W}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,a._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:()=>a.S$,excludeAttrsSync:["tabindex"],componentName:l}));n(72415),n(15450),customElements.define(l,d)},88068:(t,e,n)=>{n.d(e,{J:()=>h,T:()=>l});var i=n(9696),r=n(97810),o=n(79365),s=n(20618),a=n(12011);const l=(0,r.xE)("button"),{host:d,label:c,slottedIcon:p}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let u;const h=(0,i.Zz)((0,o.RF)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...d,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:s.S.cssVarList.fill},labelTextDecoration:{...c,property:"text-decoration"},labelSpacing:{...c,property:"gap"},textAlign:{...c,property:"justify-content",fallback:"center"},iconSize:[{...p,property:"width"},{...p,property:"height"}]}}),a.G,o.VO,o.tQ)((0,o.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${u}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${h.cssVarList.outlineWidth}) + var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${h.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${h.cssVarList.hostHeight}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${h.cssVarList.hostWidth}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l})),{color:b,fontSize:g}=h.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(${b});\n\t\ttop: calc(50% - (var(${g}) / 2));\n\t\tleft: calc(50% - (var(${g}) / 2));\n\t\tborder-width: calc(var(${g}) / 10);\n\t\twidth: var(${g});\n\t\theight: var(${g});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"])::part(prefix),\n\t:host([loading="true"])::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},12011:(t,e,n)=>{n.d(e,{G:()=>i});const i=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},85076:(t,e,n)=>{n.r(e),n.d(e,{ButtonClass:()=>i.J,componentName:()=>i.T}),n(83799);var i=n(88068);customElements.define(i.T,i.J)},20618:(t,e,n)=>{n.d(e,{S:()=>p,T:()=>d});var i=n(79365),r=n(81365),o=n(9696),s=n(97810),a=n(28796),l=n(25964);const d=(0,s.xE)("icon");class c extends((0,r.q)({componentName:d,baseSelector:"slot"})){static get observedAttributes(){return["src"]}#n;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,l.fz)("\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n ",this)}init(){super.init?.(),this.toggleVisibility(this.src)}toggleVisibility(t){this.style.display=t?"":"none"}get src(){return this.getAttribute("src")}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach((t=>{t.setAttribute("fill",`var(${p.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)}))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&"src"===t&&(this.toggleVisibility(n),(0,a.w)(this.src).then((t=>{if(this.innerHTML="",t){const e=t.cloneNode(!0);this.updateFillColor(e),this.appendChild(e)}})))}}const p=(0,o.Zz)((0,i.RF)({mappings:{fill:{}}}),i.VO,i.tQ)(c)},28796:(t,e,n)=>{n.d(e,{w:()=>o});var i=n(25414);const r=t=>{const e=i.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0}});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},o=async t=>{try{let e;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const n=atob(t.slice(26));e=r(n)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const n=await fetch(t),i=await n.text();e=r(i)}else e=(t=>{const e=document.createElement("img");return e.setAttribute("src",t),e})(t);return e.style.setProperty("max-width","100%"),e.style.setProperty("max-height","100%"),e}catch{return null}}},73551:(t,e,n)=>{n.d(e,{$J:()=>u,I4:()=>s,Kl:()=>h,LJ:()=>p,Qv:()=>o,X6:()=>l,cy:()=>i,fu:()=>d,kG:()=>c,lS:()=>a,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`,o=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`,a=(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`,c=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,p=(t,e)=>`\n ${r(t)}\n ${s(t)}\n ${a(t)}\n ${o(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 ${c(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`,u=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]) [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 '}}]);
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1837,2141,7079],{19624:(t,e,n)=>{n.d(e,{J:()=>h,T:()=>l});var i=n(63200),r=n(25964),o=n(88961),s=n(98538),a=n(10767);const l=(0,r.xE)("button"),{host:d,label:c,slottedIcon:p}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let u;const h=(0,i.Zz)((0,o.RF)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...d,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:s.S.cssVarList.fill},labelTextDecoration:{...c,property:"text-decoration"},labelSpacing:{...c,property:"gap"},textAlign:{...c,property:"justify-content",fallback:"center"},iconSize:[{...p,property:"width"},{...p,property:"height"}]}}),a.G,o.VO,o.tQ)((0,o.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${u}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${h.cssVarList.outlineWidth}) + var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${h.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${h.cssVarList.hostHeight}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${h.cssVarList.hostWidth}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l})),{color:b,fontSize:g}=h.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(${b});\n\t\ttop: calc(50% - (var(${g}) / 2));\n\t\tleft: calc(50% - (var(${g}) / 2));\n\t\tborder-width: calc(var(${g}) / 10);\n\t\twidth: var(${g});\n\t\theight: var(${g});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"])::part(prefix),\n\t:host([loading="true"])::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},10767:(t,e,n)=>{n.d(e,{G:()=>i});const i=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},30576:(t,e,n)=>{n.r(e),n.d(e,{ButtonClass:()=>i.J,componentName:()=>i.T});var i=n(19624);n(83799),customElements.define(i.T,i.J)},98538:(t,e,n)=>{n.d(e,{S:()=>c,T:()=>l});var i=n(88961),r=n(72270),o=n(63200),s=n(25964),a=n(31004);const l=(0,s.xE)("icon");class d extends((0,r.qu)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return["src"]}#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,s.fz)("\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n ",this)}init(){super.init?.(),this.toggleVisibility(this.src)}toggleVisibility(t){this.style.display=t?"":"none"}get src(){return this.getAttribute("src")}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach((t=>{t.setAttribute("fill",`var(${c.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)}))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&"src"===t&&(this.toggleVisibility(n),(0,a.w)(this.src).then((t=>{if(this.innerHTML="",t){const e=t.cloneNode(!0);this.updateFillColor(e),this.appendChild(e)}})))}}const c=(0,o.Zz)((0,i.RF)({mappings:{fill:{}}}),i.VO,i.tQ)(d)},31004:(t,e,n)=>{n.d(e,{w:()=>o});var i=n(25414);const r=t=>{const e=i.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0}});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},o=async t=>{try{let e;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const n=atob(t.slice(26));e=r(n)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const n=await fetch(t),i=await n.text();e=r(i)}else e=(t=>{const e=document.createElement("img");return e.setAttribute("src",t),e})(t);return e.style.setProperty("max-width","100%"),e.style.setProperty("max-height","100%"),e}catch{return null}}},3393:(t,e,n)=>{n.d(e,{y:()=>s});var i=n(9696),r=n(79365),o=n(81365);const s=(...t)=>(0,i.Zz)(r.XX,r._$,r.yF,r.jd)((0,o.q)(...t))},80001:(t,e,n)=>{n.d(e,{$W:()=>p,S$:()=>u,_Z:()=>o});var i=n(97810),r=n(73551);const o=t=>class extends t{#e=({value:t,label:e})=>`<descope-button-selection-group-item value="${t}">${e}</descope-button-selection-group-item>`;#n;get renderItem(){return this.#e}set renderItem(t){this.#e=t,this.renderItems()}get size(){return this.inputElement?.size}get data(){if(this.#n)return this.#n;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.#n=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:a,requiredIndicator:l,internalWrapper:d,errorMessage:c}={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)"}},p={hostWidth:{...s,property:"width"},hostDirection:{...s,property:"direction"},fontFamily:s,labelTextColor:[{...a,property:"color"},{...l,property:"color"}],labelRequiredIndicator:{...l,property:"content"},errorMessageTextColor:{...c,property:"color"},errorMessageIcon:{...c,property:"background-image"},errorMessageIconSize:{...c,property:"background-size"},errorMessageIconPadding:{...c,property:"padding-inline-start"},errorMessageIconRepeat:{...c,property:"background-repeat"},errorMessageIconPosition:{...c,property:"background-position"},itemsSpacing:{...d,property:"gap"}},u=`\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 `},51298:(t,e,n)=>{n.d(e,{m:()=>s}),n(25964);var i=n(3393),r=n(97810),o=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=o.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}},92491:(t,e,n)=>{n.d(e,{T:()=>o,n:()=>s});var i=n(97810),r=n(51298);const o=(0,i.xE)("button-selection-group-internal");class s extends((0,r.m)(o)){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))}}},72415:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupInternalClass:()=>i.n});var i=n(92491);customElements.define(i.T,i.n)},15450:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupItemClass:()=>p});var i=n(79365),r=n(81365),o=n(9696),s=n(97810),a=n(19624),l=n(25964);const d=(0,s.xE)("button-selection-group-item");class c extends((0,r.q)({componentName:d,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,s.EA)(this,this.baseElement,{includeAttrs:["size","variant"]}),(0,s.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 p=(0,o.Zz)((0,i.RF)({mappings:{hostDirection:{selector:()=>a.J.componentName,property:a.J.cssVarList.hostDirection},backgroundColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.backgroundColor},labelTextColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.labelTextColor},borderColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderColor},borderWidth:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderWidth},borderStyle:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderStyle},borderRadius:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderRadius},outlineColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.outlineColor}}}),i.VO,i.tQ)(c);n(30576),customElements.define(d,p)},27926:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupClass:()=>d,componentName:()=>l});var i=n(79365),r=n(92491),o=n(9696),s=n(97810),a=n(80001);const l=(0,s.xE)("button-selection-group"),d=(0,o.Zz)((0,i.RF)({mappings:{...a.$W}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,a._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:()=>a.S$,excludeAttrsSync:["tabindex"],componentName:l}));n(72415),n(15450),customElements.define(l,d)},73551:(t,e,n)=>{n.d(e,{$J:()=>u,I4:()=>s,Kl:()=>h,LJ:()=>p,Qv:()=>o,X6:()=>l,cy:()=>i,fu:()=>d,kG:()=>c,lS:()=>a,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`,o=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`,a=(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`,c=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,p=(t,e)=>`\n ${r(t)}\n ${s(t)}\n ${a(t)}\n ${o(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 ${c(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`,u=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]) [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 '}}]);
|
2
2
|
//# sourceMappingURL=button-selection-group-fields-descope-button-selection-group-index-js.js.map
|