UNPKG

soil-material

Version:

UI / UX library from soil technologies

1,036 lines (923 loc) 130 kB
"use strict";var SoilMaterial=(()=>{var Ne=Object.defineProperty;var nt=Object.getOwnPropertyDescriptor;var Ot=Object.getOwnPropertyNames;var Rt=Object.prototype.hasOwnProperty;var Pt=(i,t)=>{for(var e in t)Ne(i,e,{get:t[e],enumerable:!0})},Nt=(i,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ot(t))!Rt.call(i,s)&&s!==e&&Ne(i,s,{get:()=>t[s],enumerable:!(r=nt(t,s))||r.enumerable});return i};var jt=i=>Nt(Ne({},"__esModule",{value:!0}),i),o=(i,t,e,r)=>{for(var s=r>1?void 0:r?nt(t,e):t,l=i.length-1,d;l>=0;l--)(d=i[l])&&(s=(r?d(t,e,s):d(s))||s);return r&&s&&Ne(t,e,s),s};var rr={};Pt(rr,{AppContainerSpacer:()=>ve,Breakpoints:()=>zt,CustomPage:()=>G,CustomPageBody:()=>ue,CustomPageLayout:()=>Tt,Docs:()=>tr,InfoBlockComponent:()=>j,LANGUAGE:()=>at,LanguagePicker:()=>ae,ListItemTheme:()=>rt,SeverityTypes:()=>Ct,SoilAccordionItem:()=>se,SoilAccordionListComponent:()=>ee,SoilAccordionListItem:()=>A,SoilActionListComponent:()=>te,SoilActionListItemComponent:()=>re,SoilAppFrame:()=>ge,SoilBulletList:()=>me,SoilBulletListItem:()=>S,SoilButton:()=>C,SoilButtonContainer:()=>ye,SoilCheckbox:()=>N,SoilCurrencyField:()=>M,SoilCustomPageHeader:()=>F,SoilDescriptiveListComponent:()=>oe,SoilDescriptiveListItemComponent:()=>R,SoilDescriptiveListSummaryComponent:()=>ie,SoilFormFieldError:()=>D,SoilFormFieldHelp:()=>P,SoilHeader:()=>be,SoilIconButton:()=>H,SoilLinkButton:()=>T,SoilLoaderContainer:()=>he,SoilRadioGroup:()=>K,SoilResultCard:()=>O,SoilSection:()=>Z,SoilSelectField:()=>$,SoilSidePanel:()=>I,SoilSidenav:()=>we,SoilSidenavItems:()=>B,SoilSliderField:()=>E,SoilSpinner:()=>U,SoilTable:()=>W,SoilTextButton:()=>q,SoilTextField:()=>v,SoilWallpaperSection:()=>z,SpinnerSize:()=>Ge,SpinnerThemeTypes:()=>He,WallpaperSectionTheme:()=>Mt,largeMinWidthScreen:()=>st,mediumMinWidthScreen:()=>it,smallMinWidthScreen:()=>ot});var lt=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(t){this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColSpan="",this.ariaCurrent="",this.ariaDescription="",this.ariaDisabled="",this.ariaExpanded="",this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=t}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var pt=new WeakMap,$e=i=>{let t=pt.get(i);return t===void 0&&pt.set(i,t=new Map),t},It=class{constructor(){this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from($e(this)).map(([t,e])=>({name:t,value:e}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(t,e){$e(this).set(t,String(e))}removeAttribute(t){$e(this).delete(t)}toggleAttribute(t,e){if(this.hasAttribute(t)){if(e===void 0||!e)return this.removeAttribute(t),!1}else return e===void 0||e?(this.setAttribute(t,""),!0):!1;return!0}hasAttribute(t){return $e(this).has(t)}attachShadow(t){let e={host:this};return this.__shadowRootMode=t.mode,t&&t.mode==="open"&&(this.__shadowRoot=e),e}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let t=new lt(this);return this.__internals=t,t}getAttribute(t){return $e(this).get(t)??null}};var Vt=class extends It{},dt=Vt;var Lt=class{constructor(){this.__definitions=new Map}define(t,e){if(this.__definitions.has(t))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${t}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored. Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);e.__localName=t,this.__definitions.set(t,{ctor:e,observedAttributes:e.observedAttributes??[]})}get(t){return this.__definitions.get(t)?.ctor}},Ut=Lt;var ct=new Ut;var ke=globalThis,je=ke.ShadowRoot&&(ke.ShadyCSS===void 0||ke.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Se=Symbol(),ht=new WeakMap,Ee=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==Se)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(je&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=ht.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&ht.set(e,t))}return t}toString(){return this.cssText}},J=i=>new Ee(typeof i=="string"?i:i+"",void 0,Se),p=(i,...t)=>{let e=i.length===1?i[0]:t.reduce((r,s,l)=>r+(d=>{if(d._$cssResult$===!0)return d.cssText;if(typeof d=="number")return d;throw Error("Value passed to 'css' function must be a 'css' function result: "+d+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+i[l+1],i[0]);return new Ee(e,i,Se)},De=(i,t)=>{if(je)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),s=ke.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=e.cssText,i.appendChild(r)}},Ie=je||ke.CSSStyleSheet===void 0?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return J(e)})(i):i;var{is:Ht,defineProperty:qt,getOwnPropertyDescriptor:St,getOwnPropertyNames:Dt,getOwnPropertySymbols:Kt,getPrototypeOf:Bt}=Object,Me=globalThis;Me.customElements??=ct;var ut=Me.trustedTypes,Wt=ut?ut.emptyScript:"",Xt=Me.reactiveElementPolyfillSupport,_e=(i,t)=>i,Ae={toAttribute(i,t){switch(t){case Boolean:i=i?Wt:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},Ve=(i,t)=>!Ht(i,t),mt={attribute:!0,type:String,converter:Ae,reflect:!1,hasChanged:Ve};Symbol.metadata??=Symbol("metadata"),Me.litPropertyMetadata??=new WeakMap;var L=class extends(globalThis.HTMLElement??dt){static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=mt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),s=this.getPropertyDescriptor(t,r,e);s!==void 0&&qt(this.prototype,t,s)}}static getPropertyDescriptor(t,e,r){let{get:s,set:l}=St(this.prototype,t)??{get(){return this[e]},set(d){this[e]=d}};return{get(){return s?.call(this)},set(d){let g=s?.call(this);l.call(this,d),this.requestUpdate(t,g,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??mt}static _$Ei(){if(this.hasOwnProperty(_e("elementProperties")))return;let t=Bt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_e("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_e("properties"))){let e=this.properties,r=[...Dt(e),...Kt(e)];for(let s of r)this.createProperty(s,e[s])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,s]of e)this.elementProperties.set(r,s)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let s=this._$Eu(e,r);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let s of r)e.unshift(Ie(s))}else t!==void 0&&e.push(Ie(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return De(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$EC(t,e){let r=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,r);if(s!==void 0&&r.reflect===!0){let l=(r.converter?.toAttribute!==void 0?r.converter:Ae).toAttribute(e,r.type);this._$Em=t,l==null?this.removeAttribute(s):this.setAttribute(s,l),this._$Em=null}}_$AK(t,e){let r=this.constructor,s=r._$Eh.get(t);if(s!==void 0&&this._$Em!==s){let l=r.getPropertyOptions(s),d=typeof l.converter=="function"?{fromAttribute:l.converter}:l.converter?.fromAttribute!==void 0?l.converter:Ae;this._$Em=s,this[s]=d.fromAttribute(e,l.type),this._$Em=null}}requestUpdate(t,e,r){if(t!==void 0){if(r??=this.constructor.getPropertyOptions(t),!(r.hasChanged??Ve)(this[t],e))return;this.P(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,r){this._$AL.has(t)||this._$AL.set(t,e),r.reflect===!0&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[s,l]of this._$Ep)this[s]=l;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[s,l]of r)l.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],l)}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EU()}catch(r){throw t=!1,this._$EU(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach(e=>this._$EC(e,this[e])),this._$EU()}updated(t){}firstUpdated(t){}};L.elementStyles=[],L.shadowRootOptions={mode:"open"},L[_e("elementProperties")]=new Map,L[_e("finalized")]=new Map,Xt?.({ReactiveElement:L}),(Me.reactiveElementVersions??=[]).push("2.0.4");var Ue=globalThis,Le=Ue.trustedTypes,gt=Le?Le.createPolicy("lit-html",{createHTML:i=>i}):void 0,wt="$lit$",Y=`lit$${Math.random().toFixed(9).slice(2)}$`,$t="?"+Y,Jt=`<${$t}>`,pe=Ue.document===void 0?{createTreeWalker:()=>({})}:document,Te=()=>pe.createComment(""),ze=i=>i===null||typeof i!="object"&&typeof i!="function",Qe=Array.isArray,Yt=i=>Qe(i)||typeof i?.[Symbol.iterator]=="function",Ke=`[ \f\r]`,Ce=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,bt=/-->/g,ft=/>/g,ne=RegExp(`>|${Ke}(?:([^\\s"'>=/]+)(${Ke}*=${Ke}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),xt=/'/g,yt=/"/g,kt=/^(?:script|style|textarea|title)$/i,Ze=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),n=Ze(1),vr=Ze(2),wr=Ze(3),de=Symbol.for("lit-noChange"),x=Symbol.for("lit-nothing"),vt=new WeakMap,le=pe.createTreeWalker(pe,129);function Et(i,t){if(!Qe(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return gt!==void 0?gt.createHTML(t):t}var Qt=(i,t)=>{let e=i.length-1,r=[],s,l=t===2?"<svg>":t===3?"<math>":"",d=Ce;for(let g=0;g<e;g++){let u=i[g],m,w,f=-1,V=0;for(;V<u.length&&(d.lastIndex=V,w=d.exec(u),w!==null);)V=d.lastIndex,d===Ce?w[1]==="!--"?d=bt:w[1]!==void 0?d=ft:w[2]!==void 0?(kt.test(w[2])&&(s=RegExp("</"+w[2],"g")),d=ne):w[3]!==void 0&&(d=ne):d===ne?w[0]===">"?(d=s??Ce,f=-1):w[1]===void 0?f=-2:(f=d.lastIndex-w[2].length,m=w[1],d=w[3]===void 0?ne:w[3]==='"'?yt:xt):d===yt||d===xt?d=ne:d===bt||d===ft?d=Ce:(d=ne,s=void 0);let X=d===ne&&i[g+1].startsWith("/>")?" ":"";l+=d===Ce?u+Jt:f>=0?(r.push(m),u.slice(0,f)+wt+u.slice(f)+Y+X):u+Y+(f===-2?g:X)}return[Et(i,l+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},Oe=class i{constructor({strings:t,_$litType$:e},r){let s;this.parts=[];let l=0,d=0,g=t.length-1,u=this.parts,[m,w]=Qt(t,e);if(this.el=i.createElement(m,r),le.currentNode=this.el.content,e===2||e===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(s=le.nextNode())!==null&&u.length<g;){if(s.nodeType===1){if(s.hasAttributes())for(let f of s.getAttributeNames())if(f.endsWith(wt)){let V=w[d++],X=s.getAttribute(f).split(Y),Pe=/([.?@])?(.*)/.exec(V);u.push({type:1,index:l,name:Pe[2],strings:X,ctor:Pe[1]==="."?We:Pe[1]==="?"?Xe:Pe[1]==="@"?Je:xe}),s.removeAttribute(f)}else f.startsWith(Y)&&(u.push({type:6,index:l}),s.removeAttribute(f));if(kt.test(s.tagName)){let f=s.textContent.split(Y),V=f.length-1;if(V>0){s.textContent=Le?Le.emptyScript:"";for(let X=0;X<V;X++)s.append(f[X],Te()),le.nextNode(),u.push({type:2,index:++l});s.append(f[V],Te())}}}else if(s.nodeType===8)if(s.data===$t)u.push({type:2,index:l});else{let f=-1;for(;(f=s.data.indexOf(Y,f+1))!==-1;)u.push({type:7,index:l}),f+=Y.length-1}l++}}static createElement(t,e){let r=pe.createElement("template");return r.innerHTML=t,r}};function fe(i,t,e=i,r){if(t===de)return t;let s=r!==void 0?e.o?.[r]:e.l,l=ze(t)?void 0:t._$litDirective$;return s?.constructor!==l&&(s?._$AO?.(!1),l===void 0?s=void 0:(s=new l(i),s._$AT(i,e,r)),r!==void 0?(e.o??=[])[r]=s:e.l=s),s!==void 0&&(t=fe(i,s._$AS(i,t.values),s,r)),t}var Be=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,s=(t?.creationScope??pe).importNode(e,!0);le.currentNode=s;let l=le.nextNode(),d=0,g=0,u=r[0];for(;u!==void 0;){if(d===u.index){let m;u.type===2?m=new Re(l,l.nextSibling,this,t):u.type===1?m=new u.ctor(l,u.name,u.strings,this,t):u.type===6&&(m=new Ye(l,this,t)),this._$AV.push(m),u=r[++g]}d!==u?.index&&(l=le.nextNode(),d++)}return le.currentNode=pe,s}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},Re=class i{get _$AU(){return this._$AM?._$AU??this.v}constructor(t,e,r,s){this.type=2,this._$AH=x,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=s,this.v=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=fe(this,t,e),ze(t)?t===x||t==null||t===""?(this._$AH!==x&&this._$AR(),this._$AH=x):t!==this._$AH&&t!==de&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Yt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==x&&ze(this._$AH)?this._$AA.nextSibling.data=t:this.T(pe.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,s=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Oe.createElement(Et(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===s)this._$AH.p(e);else{let l=new Be(s,this),d=l.u(this.options);l.p(e),this.T(d),this._$AH=l}}_$AC(t){let e=vt.get(t.strings);return e===void 0&&vt.set(t.strings,e=new Oe(t)),e}k(t){Qe(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,s=0;for(let l of t)s===e.length?e.push(r=new i(this.O(Te()),this.O(Te()),this,this.options)):r=e[s],r._$AI(l),s++;s<e.length&&(this._$AR(r&&r._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){let r=t.nextSibling;t.remove(),t=r}}setConnected(t){this._$AM===void 0&&(this.v=t,this._$AP?.(t))}},xe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,s,l){this.type=1,this._$AH=x,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=l,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=x}_$AI(t,e=this,r,s){let l=this.strings,d=!1;if(l===void 0)t=fe(this,t,e,0),d=!ze(t)||t!==this._$AH&&t!==de,d&&(this._$AH=t);else{let g=t,u,m;for(t=l[0],u=0;u<l.length-1;u++)m=fe(this,g[r+u],e,u),m===de&&(m=this._$AH[u]),d||=!ze(m)||m!==this._$AH[u],m===x?t=x:t!==x&&(t+=(m??"")+l[u+1]),this._$AH[u]=m}d&&!s&&this.j(t)}j(t){t===x?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},We=class extends xe{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===x?void 0:t}},Xe=class extends xe{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==x)}},Je=class extends xe{constructor(t,e,r,s,l){super(t,e,r,s,l),this.type=5}_$AI(t,e=this){if((t=fe(this,t,e,0)??x)===de)return;let r=this._$AH,s=t===x&&r!==x||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,l=t!==x&&(r===x||s);s&&this.element.removeEventListener(this.name,this,r),l&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},Ye=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){fe(this,t)}};var Zt=Ue.litHtmlPolyfillSupport;Zt?.(Oe,Re),(Ue.litHtmlVersions??=[]).push("3.2.0");var _t=(i,t,e)=>{let r=e?.renderBefore??t,s=r._$litPart$;if(s===void 0){let l=e?.renderBefore??null;r._$litPart$=s=new Re(t.insertBefore(Te(),l),l,void 0,e??{})}return s._$AI(i),s};var _=class extends L{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=_t(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return de}};_._$litElement$=!0,_.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:_});var Gt=globalThis.litElementPolyfillSupport;Gt?.({LitElement:_});(globalThis.litElementVersions??=[]).push("4.1.0");var c=i=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(i,t)}):customElements.define(i,t)};var Ft={attribute:!0,type:String,converter:Ae,reflect:!1,hasChanged:Ve},er=(i=Ft,t,e)=>{let{kind:r,metadata:s}=e,l=globalThis.litPropertyMetadata.get(s);if(l===void 0&&globalThis.litPropertyMetadata.set(s,l=new Map),l.set(e.name,i),r==="accessor"){let{name:d}=e;return{set(g){let u=t.get.call(this);t.set.call(this,g),this.requestUpdate(d,u,i)},init(g){return g!==void 0&&this.P(d,void 0,i),g}}}if(r==="setter"){let{name:d}=e;return function(g){let u=this[d];t.call(this,g),this.requestUpdate(d,u,i)}}throw Error("Unsupported decorator location: "+r)};function a(i){return(t,e)=>typeof e=="object"?er(i,t,e):((r,s,l)=>{let d=s.hasOwnProperty(l);return s.constructor.createProperty(l,d?{...r,wrapped:!0}:r),d?Object.getOwnPropertyDescriptor(s,l):void 0})(i,t,e)}function b(i){return a({...i,state:!0,attribute:!1})}var ce=(i,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(i,t,e),e);function y(i,t){return(e,r,s)=>{let l=d=>d.renderRoot?.querySelector(i)??null;if(t){let{get:d,set:g}=typeof r=="object"?e:s??(()=>{let u=Symbol();return{get(){return this[u]},set(m){this[u]=m}}})();return ce(e,r,{get(){let u=d.call(this);return u===void 0&&(u=l(this),(u!==null||this.hasUpdated)&&g.call(this,u)),u}})}return ce(e,r,{get(){return l(this)}})}}var At=()=>p` :host, :host * { font-family: 'Poppins', sans-serif; } h1, h2, h3, h4, h5, h6 { color: var(--primary-color); margin: 0.54em 0 0.32em 0; } p, span, label, div, small, strong { margin: 0; padding: 0; color: var(--text-color-dark)}; } h1 { font-size: var(--font-size-xxxl); font-weight: 700; } h2 { font-size: var(--font-size-xl); font-weight: 600; } h3 { font-size: var(--font-size-lg); font-weight: 500; } h4 { font-size: var(--font-size-md); font-weight: 500; } h5 { font-size: var(--font-size-sm); font-weight: 400; } h6 { font-size: var(--font-size-xs); font-weight: 400; } p, span, label, div { font-size: var(--font-size-md); } small, strong { font-size: var(--font-size-sm); } .extra-large-text { font-size: var(--font-size-xl); } .large-text { font-size: var(--font-size-lg); } .medium-text { font-size: var(--font-size-md); } .small-text { font-size: var(--font-size-sm); } `;var h=class extends _{static get styles(){let t=this._styles||[];return[At(),...Array.isArray(t)?t:[t]]}static set styles(t){this._styles=t}};var He=(r=>(r.Primary="primary",r.Accent="accent",r.Secondary="secondary",r))(He||{}),Ge=(r=>(r.Large="large",r.Medium="medium",r.Small="small",r))(Ge||{});var U=class extends h{constructor(){super(...arguments);this.busy=!1;this.theme="accent";this.size="medium"}render(){return this.busy?n` <div class="spinner ${this.theme} ${this.size}"></div>`:n``}};U.styles=p` .spinner { border: 3px solid #f3f3f3; border-top-color: var(--accent-color); border-radius: 50%; width: 24px; height: 24px; animation: spin 0.7s linear infinite; } .primary { border-top-color: var(--primary-color); } .accent { border-top-color: var(--accent-color); } .secondary { border-top-color: var(--secondary-color); } .small { width: 16px; height: 16px; border-width: 2px; } .large { width: 32px; height: 32px; border-width: 4px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } `,o([a({type:Boolean,attribute:!0,hasChanged(e,r){return e!==r}})],U.prototype,"busy",2),o([a({type:String,attribute:!0,hasChanged(e,r){return e!==r}})],U.prototype,"theme",2),o([a({type:String,attribute:!0})],U.prototype,"size",2),U=o([c("soil-spinner")],U);var Fe=(r=>(r.Submit="submit",r.Reset="reset",r.Button="button",r))(Fe||{}),et=(d=>(d.Executive="executive",d.Leading="leading",d.Cancel="cancel",d.ExecutiveOutlined="executive-outlined",d.LeadingOutlined="leading-outlined",d.CancelOutlined="cancel-outlined",d))(et||{});var C=class extends h{constructor(){super(...arguments);this.label="";this.actionType="executive";this.buttonType="button";this.busy=!1;this.disabled=!1;this.typeSpinnerThemeMap={executive:"accent",leading:"accent","executive-outlined":"accent","leading-outlined":"accent","cancel-outlined":"",cancel:""}}render(){return n` <button class="${this.actionType}" type="${this.buttonType}" ?disabled="${this.disabled}" @click="${this.handleClick}" .aria-busy="${this.busy&&this.actionType!=="cancel"}" .aria-label="${this.label}" .aria-disabled="${this.disabled}" > <div class="button-content"> <p>${this.label}</p> ${this.busy&&this.actionType!=="cancel"?n` <span class="spinner-wrapper"> <soil-spinner .busy="${this.busy}" size="small" theme="${this.typeSpinnerThemeMap[this.actionType]}" ></soil-spinner> </span> `:""} </div> </button> `}handleClick(){let e=this.closest("form");this.buttonType==="submit"&&e&&e.dispatchEvent(new Event("submit",{bubbles:!0,cancelable:!0}))}};C.styles=p` button { display: block; border: none; vertical-align: center; text-align: center; padding: 0 12px; min-height: 40px; line-height: 40px; min-width: 100px; max-width: 500px; width: ${J("var(--soil-button-width, auto)")}; white-space: nowrap; border-radius: 5px; cursor: pointer; position: relative; transition: 100ms ease-in-out; } p { color: var(--text-color-light); } button:hover { box-shadow: 0 0 10px var(--atom-shadow); } button:disabled { opacity: 0.5; box-shadow: none; cursor: default; } button:focus-visible { outline: 2px solid var(--outline-color); box-shadow: 0 0 10px var(--atom-shadow); transition: none; } .button-content { display: flex; height: 100%; justify-content: center; align-items: center; } .spinner-wrapper { padding-left: 12px; } .executive { background: var(--primary-color); } .leading { background: var(--accent-color); } .cancel { background: var(--light-grey-bg-color); } .executive-outlined { background-color: white; border: 2px solid var(--primary-color); } .leading-outlined { background-color: white; border: 2px solid var(--accent-color); } .cancel-outlined { background-color: white; border: 2px solid var(--light-grey-bg-color); } .executive-outlined p { color: var(--primary-color); } .leading-outlined p { color: var(--accent-color); } .cancel-outlined p { color: var(--text-color-dark); } .cancel p { color: var(--text-color-dark); } `,o([a({type:String})],C.prototype,"label",2),o([a({type:et})],C.prototype,"actionType",2),o([a({type:Fe})],C.prototype,"buttonType",2),o([a({type:Boolean,hasChanged(e,r){return e!==r}})],C.prototype,"busy",2),o([a({type:Boolean,hasChanged(e,r){return e!==r}})],C.prototype,"disabled",2),C=o([c("soil-button")],C);var tt=(e=>(e.Primary="primary",e.Accent="accent",e))(tt||{});var Q=class extends h{constructor(){super(...arguments);this.icon="var(--text-color-dark)";this.size="20px";this.color="inherit"}render(){return n`<span class="material-icons" style="font-size: ${this.size}; width: ${this.size}; height: ${this.size}; color: ${this.color};" >${this.icon}</span >`}};Q.styles=p` :host { display: inline-flex; vertical-align: middle; } .material-icons { font-family: "Material Icons", serif; font-weight: normal; font-style: normal; font-size: 24px; display: inline-block; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; word-wrap: normal; direction: ltr; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -moz-osx-font-smoothing: grayscale; font-feature-settings: "liga"; color: var(--text-color-dark); } `,o([a({type:String})],Q.prototype,"icon",2),o([a({type:String})],Q.prototype,"size",2),o([a({type:String})],Q.prototype,"color",2),Q=o([c("soil-material-icon")],Q);var qe=(i,t="")=>({control:{type:"text"},description:i,table:{type:{summary:"string"},defaultValue:{summary:`"${t}"`}}});var Yo={title:"Atoms/Icon/Material Icon",tags:["autodocs"],component:"soil-material-icon",render:i=>n` <soil-material-icon icon="${i.icon}" size="${i.size}" color="${i.color}" ></soil-material-icon> `,argTypes:{icon:qe("Material icon name"),size:qe("Material icon size"),color:qe("Material icon color")}},tr={args:{icon:"house",size:"32px"}};var T=class extends h{constructor(){super(...arguments);this.label="";this.href="#";this.target="_self";this.theme="accent";this.disabled=!1}render(){return n` <button tabindex="-1" type="button" ?disabled="${this.disabled}" .aria-disabled="${this.disabled}" > <a class="${this.theme}" href="${this.href}" target="${this.target}" tabindex="${this.disabled?-1:0}" @click="${this.handleDisabled}" > <span class="link-button-content"> <p>${this.label}</p> <soil-material-icon icon="arrow_right" size="32px" color="var(--${this.theme}-color)" ></soil-material-icon> </span> </a> </button> `}handleDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}};T.styles=p` button { display: block; border: none; vertical-align: center; text-align: center; padding: 0; line-height: 52px; width: 100%; white-space: nowrap; cursor: pointer; position: relative; background-color: var(--light-grey-bg-color); } button:disabled { opacity: 0.5; cursor: default; box-shadow: none; } a { display: flex; width: 100%; height: 100%; text-decoration: none; background-color: var(--light-grey-bg-color); transition: 100ms ease-in-out; } a:focus-visible { outline: 2px solid var(--outline-color); background-color: var(--light-grey-bg-hover-color); transition: none; } a:hover { background-color: var(--light-grey-bg-hover-color); } .link-button-content { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 100%; padding: 0 12px; } .primary { border-left: 8px solid var(--primary-color); } .accent { border-left: 8px solid var(--accent-color); } `,o([a({type:String})],T.prototype,"label",2),o([a({type:String})],T.prototype,"href",2),o([a({type:String})],T.prototype,"target",2),o([a({type:tt})],T.prototype,"theme",2),o([a({type:Boolean,hasChanged(e,r){return e!==r}})],T.prototype,"disabled",2),T=o([c("soil-link-button")],T);var H=class extends h{constructor(){super(...arguments);this.label="";this.icon="";this.disabled=!1}render(){return n` <button type="button" ?disabled="${this.disabled}" .aria-label="${this.label}" .aria-disabled="${this.disabled}" style="color: var(--text-color-dark);" > <soil-material-icon icon="${this.icon}" size="32px" ></soil-material-icon> ${this.label!==""?n`<p>${this.label}</p>`:""} </button> `}};H.styles=p` button { display: flex; justify-content: center; align-items: center; gap: 6px; border: none; min-height: 40px; line-height: 40px; white-space: nowrap; border-radius: 50px; cursor: pointer; position: relative; transition: 100ms ease-in-out; background-color: transparent; } p { color: var(--text-color-dark); } button:hover, button:focus-visible { box-shadow: 0 0 10px var(--atom-shadow); background-color: var(--light-grey-bg-color); } button:disabled { opacity: 0.5; cursor: default; box-shadow: none; } button:focus-visible { outline: 2px solid var(--outline-color); transition: none; } @media (max-width: 768px) { button { padding: 6px; border-radius: 50%; } p { display: none; } } `,o([a({type:String})],H.prototype,"label",2),o([a({type:String})],H.prototype,"icon",2),o([a({type:Boolean,hasChanged(e,r){return e!==r}})],H.prototype,"disabled",2),H=o([c("soil-icon-button")],H);var q=class extends h{constructor(){super(...arguments);this.label="";this.icon="";this.disabled=!1}render(){return n` <button type="button" ?disabled="${this.disabled}" .aria-label="${this.label}" .aria-disabled="${this.disabled}" style="color: var(--text-color-dark);" > <soil-material-icon icon="${this.icon}" size="24px" color="var(--accent-color)" ></soil-material-icon> ${this.label!==""?n`<p>${this.label}</p>`:""} </button> `}};q.styles=p` button { display: flex; justify-content: center; align-items: center; gap: 6px; border: none; min-height: 40px; line-height: 40px; white-space: nowrap; cursor: pointer; position: relative; transition: 100ms ease-in-out; background-color: transparent; } p { color: var(--accent-color); } button:disabled { opacity: 0.5; cursor: default; box-shadow: none; } button:focus-visible { outline: 2px solid var(--outline-color); transition: none; } `,o([a({type:String})],q.prototype,"label",2),o([a({type:String})],q.prototype,"icon",2),o([a({type:Boolean,hasChanged(e,r){return e!==r}})],q.prototype,"disabled",2),q=o([c("soil-text-button")],q);var ye=class extends h{render(){return n` <div class="button-container"> <slot></slot> </div> `}};ye.styles=p` .button-container { display: flex; flex-direction: row-reverse; gap: 15px; justify-content: right; max-width: 500px; } @media (max-width: 601px) { .button-container { display: flex; flex-direction: column; gap: 10px; } ::slotted(soil-button) { --soil-button-width: 100%; } } `,ye=o([c("soil-button-container")],ye);var he=class extends h{constructor(){super(...arguments);this.busy=!0}render(){return n` <div class="container"> <div style="opacity: ${this.busy?0:1}"> <slot></slot> </div> ${this.busy?n` <div class="spinner-wrapper"> <soil-spinner .busy="${this.busy}" size="large" theme="accent" ></soil-spinner> </div> `:null} </div> `}};he.styles=p` :host { display: block; width: 100%; } .container { position: relative; width: 100%; } .spinner-wrapper { position: absolute; top: 0; left: 0; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; background: transparent; } `,o([a({type:Boolean,hasChanged(e,r){return e!==r}})],he.prototype,"busy",2),he=o([c("soil-loader-container")],he);var Z=class extends h{constructor(){super(...arguments);this.heading="";this.lead=""}render(){return n` <div class="section-wrapper"> <div class="section-header-wrapper"> <h2>${this.heading}</h2> <p>${this.lead}</p> </div> <div class="section-body"> <slot></slot> </div> </div> `}};Z.styles=p` .section-wrapper { padding: 1px 20px 25px 20px; box-shadow: rgba(0, 0, 0, 0.02) 0 1px 3px 0, rgba(27, 31, 35, 0.15) 0 0 0 1px; border-radius: 7px; } .section-body { display: block; width: 100%; margin-top: 20px; } `,o([a({type:String})],Z.prototype,"heading",2),o([a({type:String})],Z.prototype,"lead",2),Z=o([c("soil-section")],Z);var z=class extends h{constructor(){super(...arguments);this.heading="";this.lead="";this.img="";this.invert=!1;this.theme=""}render(){return n` <div class="section-wrapper ${this.theme}"> <div class="section-body ${this.invert?"invert":""}"> <div class="content-wrapper"> <div class="content"> <div class="section-header-wrapper"> <h2>${this.heading}</h2> <p>${this.lead}</p> </div> <slot></slot> </div> </div> <div class="img-wrapper"> <img src="${this.img}" alt="Wallpaper" /> </div> </div> </div> `}};z.styles=p` .section-wrapper { display: flex; flex-direction: column; box-shadow: rgba(0, 0, 0, 0.02) 0 1px 3px 0, rgba(27, 31, 35, 0.15) 0 0 0 1px; border-radius: 7px; text-align: left; width: 100%; } .primary { background: var(--primary-bg-color); } .accent { background: var(--accent-bg-color); } .secondary { background: var(--secondary-bg-color); } .section-body { display: flex; flex-direction: row; width: 100%; height: auto; } .invert { flex-direction: row-reverse; } .content { flex: 1 1 50%; max-width: 100%; display: flex; justify-content: space-between; overflow: hidden; } .img-wrapper { flex: 1 1 50%; max-width: 100%; display: flex; justify-content: center; overflow: hidden; border-radius: 7px; } .img-wrapper { align-items: center; background-color: var(--background-color); } img { max-width: 100%; height: auto; max-height: 500px; object-fit: cover; } .content-wrapper { display: flex; justify-content: space-between; width: 50%; } .content { display: flex; flex-direction: column; margin: 15px 20px; width: 100%; } @media screen and (max-width: 768px) { .section-body { flex-direction: column; flex-flow: column-reverse; } .invert { flex-direction: column; flex-flow: column-reverse; } .img-wrapper, .content { max-width: 100%; flex: 1 1 auto; } .content-wrapper { display: flex; width: 100%; } } `,o([a({type:String})],z.prototype,"heading",2),o([a({type:String})],z.prototype,"lead",2),o([a({type:String})],z.prototype,"img",2),o([a({type:Boolean})],z.prototype,"invert",2),o([a({type:String})],z.prototype,"theme",2),z=o([c("soil-wallpaper-section")],z);var Mt=(r=>(r.Primary="primary",r.Accent="accent",r.Secondary="secondary",r))(Mt||{});var O=class extends h{constructor(){super(...arguments);this.icon="";this.lead="";this.severity="";this.result=""}render(){return n` <div class="result-section-wrapper ${this.severity}"> <div class="result-section-body-wrapper"> <div class="result-section-icon-wrapper ${this.severity}"> <soil-material-icon icon="${this.icon}" size="40px" ></soil-material-icon> </div> <div class="result-section-content-wrapper"> <strong>${this.lead}</strong> <strong class="${this.severity}">${this.result}</strong> </div> </div> </div> `}};O.styles=p` .result-section-wrapper { display: block; padding: 5px 0 5px 15px; margin-bottom: 10px; } .result-section-body-wrapper { display: flex; height: 100%; min-height: 60px; align-items: center; justify-content: center; width: 100%; gap: 15px; } .result-section-content-wrapper { display: flex; height: 100%; width: 100%; flex-direction: column; align-items: flex-start; } .result-section-icon-wrapper { display: flex; justify-content: center; align-items: center; height: 50px; width: 50px; border-radius: 8px; } .result-section-wrapper.profit { border-left: 8px solid var(--primary-color); background-color: var(--light-grey-bg-color); } .result-section-wrapper.deficit { border-left: 8px solid var(--warning-color); background-color: var(--light-grey-bg-color); } .result-section-wrapper.balanced { border-left: 8px solid var(--secondary-color); background-color: var(--light-grey-bg-color); } .result-section-icon-wrapper.profit { color: var(--primary-color); } .result-section-icon-wrapper.deficit { color: var(--warning-color); } .result-section-icon-wrapper.balanced { color: var(--secondary-color); } strong.profit { color: var(--primary-color); } strong.deficit { color: var(--warning-color); } strong.balanced { color: var(--secondary-color); } `,o([a({type:String})],O.prototype,"icon",2),o([a({type:String})],O.prototype,"lead",2),o([a({type:String,hasChanged(e,r){return e!==r}})],O.prototype,"severity",2),o([a({type:String,hasChanged(e,r){return e!==r}})],O.prototype,"result",2),O=o([c("soil-result-section")],O);var Ct=(r=>(r.Profit="profit",r.Balanced="balanced",r.Deficit="deficit",r))(Ct||{});var G=class extends h{constructor(){super(...arguments);this.layout="";this.toolbarVisible=!1}render(){return n` <div class="custom-page-wrapper"> <div class="toolbar-wrapper ${this.toolbarVisible?"":"has-no-content"}" > <slot name="toolbar"></slot> </div> <div class="header-wrapper ${this.toolbarVisible?"with-toolbar":"without-toolbar"}" > <slot name="header"></slot> </div> <div class="${this.layout===""?"base-layout":this.layout}"> <slot></slot> </div> </div> `}};G.styles=p` .custom-page-wrapper { display: block; width: 100%; margin-bottom: 40px; position: relative; } .toolbar-wrapper { width: 100%; background-color: var(--background-color); padding: 10px 0; z-index: 4000; } .has-no-content { height: 0; display: none; } .header-wrapper { display: block; margin-bottom: 25px; } .with-toolbar { margin-top: 0; } .without-toolbar { padding-top: 15px; } .header-wrapper h1 { color: #6cbe45; margin-bottom: 0; } .header-wrapper p { margin: 0; } .grid-50-50 { display: grid; grid-template-columns: 1fr; grid-template-rows: auto; gap: 20px; } .base-layout { display: grid; grid-template-columns: 1fr; grid-gap: 20px; } @media (min-width: 600px) { .grid-50-50 { grid-template-columns: 1fr; grid-template-rows: auto; } } @media (min-width: 992px) { .grid-50-50 { grid-template-columns: 1fr 1fr; grid-template-rows: auto; } } @media (min-width: 1200px) { .grid-50-50 { grid-template-columns: 1fr 1fr; grid-template-rows: auto; } } .grid-66-33 { display: grid; grid-template-columns: 1fr; grid-template-rows: auto; gap: 20px; } @media (min-width: 600px) { .grid-66-33 { grid-template-columns: 1fr; grid-template-rows: auto; } } @media (min-width: 992px) { .grid-66-33 { grid-template-columns: 1fr; grid-template-rows: auto; } } @media (min-width: 1200px) { .grid-66-33 { grid-template-columns: 6fr 3fr; grid-template-rows: auto; } } `,o([a({type:String})],G.prototype,"layout",2),o([a({type:Boolean})],G.prototype,"toolbarVisible",2),G=o([c("soil-custom-page")],G);var F=class extends h{constructor(){super(...arguments);this.heading="";this.lead=""}render(){return n` <div class="header-wrapper"> <h1>${this.heading}</h1> <p>${this.lead}</p> </div> `}};F.styles=p` .header-wrapper { display: block; width: 100%; } .header-wrapper h1 { margin-bottom: 0; margin-top: 0; } `,o([a({type:String})],F.prototype,"heading",2),o([a({type:String})],F.prototype,"lead",2),F=o([c("soil-custom-page-header")],F);var Tt=(r=>(r.GridFiftyFifty="grid-50-50",r.GridSixtyForty="grid-66-33",r.Unset="",r))(Tt||{});var ue=class extends h{constructor(){super(...arguments);this.twoColumns=!1}render(){return n` <div class="custom-page-body-wrapper ${this.twoColumns?"two-columns":""}" > <slot></slot> </div> `}};ue.styles=p` .custom-page-body-wrapper { display: flex; flex-direction: column; gap: 20px; width: 100%; } .two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } @media (max-width: 600px) { .two-columns { grid-template-columns: 1fr; } } `,o([a({type:Boolean})],ue.prototype,"twoColumns",2),ue=o([c("soil-custom-page-body")],ue);var A=class extends h{constructor(){super(...arguments);this.label="";this.subLabel="";this.badgeValue=0;this.opened=!1;this.badgeIcon="";this.badgeColor=""}onItemClicked(){this.opened=!this.opened,this.dispatchEvent(new CustomEvent("item-clicked",{detail:{opened:this.opened},composed:!0,bubbles:!0}))}updated(){this.badgeValue==0&&(this.badgeIcon="trending_flat",this.badgeColor="rgb(48, 93, 161)",this.render()),this.badgeValue>0&&(this.badgeIcon="trending_up",this.badgeColor="rgb(48, 161, 86)",this.render()),this.badgeValue<0&&(this.badgeIcon="trending_down",this.badgeColor="rgb(195, 69, 69)",this.render())}render(){return n` <li> <button class="accordion-item-hit-area ${this.opened?"with-border-bottom":""}" @click="${this.onItemClicked}" > <div class="row-container"> <div class="responsive-container"> <div class="row-group"> <slot name="flag"></slot> <span class="label">${this.label}</span> </div> <div class="secondary-row-group"> <div class="row"> <div class="badge balanced">${this.subLabel}</div> </div> <div class="row"> <div class="badge ${this.badgeIcon}"> <span> <soil-material-icon icon="${this.badgeIcon}" color="${this.badgeColor}" size="28px" ></soil-material-icon> </span> ${this.badgeValue.toFixed(2)}% </div> </div> </div> </div> </div> <div class="row-arrow"> <soil-material-icon icon="${this.opened?"keyboard_arrow_down":"chevron_left"}" color="black" size="30px" ></soil-material-icon> </div> </button> <div class="accordion-list-item-body ${this.opened?"open":""}"> <div class="accordion-list-item-body-content"> <slot></slot> </div> </div> </li> `}};A.styles=p` li { display: block; overflow: hidden; min-height: 50px; background-color: transparent; border-bottom: 1px solid var(--light-grey-border-color); } .row-container { display: flex; width: 100%; height: 100%; justify-content: center; align-items: center; } .responsive-container { display: flex; width: 100%; flex-direction: row; height: 100%; } .row-group { display: flex; justify-content: left; height: 60px; min-width: 290px; flex-direction: row; align-items: center; gap: 20px; } .secondary-row-group { display: flex; min-height: 60px; width: 100%; align-items: center; gap: 20px; .row { display: flex; height: 100%; width: 100%; align-items: center; } } .balanced { border: 1px solid var(--text-color-dark); font-weight: 700; } .row-arrow { display: flex; width: 40px; justify-content: center; align-items: center; height: 100%; } .label { font-weight: 500; color: var(--text-color-dark); } button { display: flex; justify-content: space-between; flex-direction: row; align-items: center; width: 100%; height: 100%; background-color: transparent; cursor: pointer; border: none; } button:hover { background-color: var(--light-grey-bg-hover-color); cursor: pointer; } .accord