@loadsmart/miranda-wc 1.31.5 → 1.32.1
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/components/text/text.styles.d.ts.map +1 -1
- package/dist/index.js +107 -103
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,39 +3,39 @@ function t(t,e,o,i){if("a"===o&&!i)throw new TypeError("Private accessor was def
|
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/}var o;const i=window,r=i.trustedTypes,n=r?r.createPolicy("lit-html",{createHTML:t=>t}):void 0,s="$lit$",a=`lit$${(Math.random()+"").slice(9)}$`,l="?"+a,c=`<${l}>`,d=document,h=()=>d.createComment(""),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,b="[ \t\n\f\r]",p=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,m=/-->/g,f=/>/g,$=RegExp(`>|${b}(?:([^\\s"'>=/]+)(${b}*=${b}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),y=/'/g,v=/"/g,w=/^(?:script|style|textarea|title)$/i,x=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),k=Symbol.for("lit-noChange"),z=Symbol.for("lit-nothing"),S=new WeakMap,C=d.createTreeWalker(d,129,null,!1),
|
|
6
|
+
*/}var o;const i=window,r=i.trustedTypes,n=r?r.createPolicy("lit-html",{createHTML:t=>t}):void 0,s="$lit$",a=`lit$${(Math.random()+"").slice(9)}$`,l="?"+a,c=`<${l}>`,d=document,h=()=>d.createComment(""),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,b="[ \t\n\f\r]",p=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,m=/-->/g,f=/>/g,$=RegExp(`>|${b}(?:([^\\s"'>=/]+)(${b}*=${b}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),y=/'/g,v=/"/g,w=/^(?:script|style|textarea|title)$/i,x=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),k=Symbol.for("lit-noChange"),z=Symbol.for("lit-nothing"),S=new WeakMap,C=d.createTreeWalker(d,129,null,!1);class W{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let d=0,u=0;const g=t.length-1,b=this.parts,[x,k]=((t,e)=>{const o=t.length-1,i=[];let r,l=2===e?"<svg>":"",d=p;for(let e=0;e<o;e++){const o=t[e];let n,h,u=-1,g=0;for(;g<o.length&&(d.lastIndex=g,h=d.exec(o),null!==h);)g=d.lastIndex,d===p?"!--"===h[1]?d=m:void 0!==h[1]?d=f:void 0!==h[2]?(w.test(h[2])&&(r=RegExp("</"+h[2],"g")),d=$):void 0!==h[3]&&(d=$):d===$?">"===h[0]?(d=null!=r?r:p,u=-1):void 0===h[1]?u=-2:(u=d.lastIndex-h[2].length,n=h[1],d=void 0===h[3]?$:'"'===h[3]?v:y):d===v||d===y?d=$:d===m||d===f?d=p:(d=$,r=void 0);const b=d===$&&t[e+1].startsWith("/>")?" ":"";l+=d===p?o+c:u>=0?(i.push(n),o.slice(0,u)+s+o.slice(u)+a+b):o+a+(-2===u?(i.push(void 0),e):b)}const h=l+(t[o]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==n?n.createHTML(h):h,i]})(t,e);if(this.el=W.createElement(x,o),C.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=C.nextNode())&&b.length<g;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith(s)||e.startsWith(a)){const o=k[u++];if(t.push(e),void 0!==o){const t=i.getAttribute(o.toLowerCase()+s).split(a),e=/([.?@])?(.*)/.exec(o);b.push({type:1,index:d,name:e[2],strings:t,ctor:"."===e[1]?B:"?"===e[1]?_:"@"===e[1]?T:A})}else b.push({type:6,index:d})}for(const e of t)i.removeAttribute(e)}if(w.test(i.tagName)){const t=i.textContent.split(a),e=t.length-1;if(e>0){i.textContent=r?r.emptyScript:"";for(let o=0;o<e;o++)i.append(t[o],h()),C.nextNode(),b.push({type:2,index:++d});i.append(t[e],h())}}}else if(8===i.nodeType)if(i.data===l)b.push({type:2,index:d});else{let t=-1;for(;-1!==(t=i.data.indexOf(a,t+1));)b.push({type:7,index:d}),t+=a.length-1}d++}}static createElement(t,e){const o=d.createElement("template");return o.innerHTML=t,o}}function M(t,e,o=t,i){var r,n,s,a;if(e===k)return e;let l=void 0!==i?null===(r=o._$Co)||void 0===r?void 0:r[i]:o._$Cl;const c=u(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,o,i)),void 0!==i?(null!==(s=(a=o)._$Co)&&void 0!==s?s:a._$Co=[])[i]=l:o._$Cl=l),void 0!==l&&(e=M(t,l._$AS(t,e.values),l,i)),e}class j{constructor(t,e,o,i){var r;this.type=2,this._$AH=z,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cp=null===(r=null==i?void 0:i.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=M(this,t,e),u(t)?t===z||null==t||""===t?(this._$AH!==z&&this._$AR(),this._$AH=z):t!==this._$AH&&t!==k&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>g(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==z&&u(this._$AH)?this._$AA.nextSibling.data=t:this.$(d.createTextNode(t)),this._$AH=t}g(t){var e;const{values:o,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=W.createElement(i.h,this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(o);else{const t=new 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){var e;const{el:{content:o},parts:i}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:d).importNode(o,!0);C.currentNode=r;let n=C.nextNode(),s=0,a=0,l=i[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new j(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new O(n,this,t)),this._$AV.push(e),l=i[++a]}s!==(null==l?void 0:l.index)&&(n=C.nextNode(),s++)}return C.currentNode=d,r}v(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}(r,this),e=t.u(this.options);t.v(o),this.$(e),this._$AH=t}}_$AC(t){let e=S.get(t.strings);return void 0===e&&S.set(t.strings,e=new W(t)),e}T(t){g(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const r of t)i===e.length?e.push(o=new j(this.k(h()),this.k(h()),this,this.options)):o=e[i],o._$AI(r),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var o;for(null===(o=this._$AP)||void 0===o||o.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class A{constructor(t,e,o,i,r){this.type=1,this._$AH=z,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,o,i){const r=this.strings;let n=!1;if(void 0===r)t=M(this,t,e,0),n=!u(t)||t!==this._$AH&&t!==k,n&&(this._$AH=t);else{const i=t;let s,a;for(t=r[0],s=0;s<r.length-1;s++)a=M(this,i[o+s],e,s),a===k&&(a=this._$AH[s]),n||(n=!u(a)||a!==this._$AH[s]),a===z?t=z:t!==z&&(t+=(null!=a?a:"")+r[s+1]),this._$AH[s]=a}n&&!i&&this.j(t)}j(t){t===z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class B extends A{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===z?void 0:t}}const E=r?r.emptyScript:"";class _ extends A{constructor(){super(...arguments),this.type=4}j(t){t&&t!==z?this.element.setAttribute(this.name,E):this.element.removeAttribute(this.name)}}class T extends A{constructor(t,e,o,i,r){super(t,e,o,i,r),this.type=5}_$AI(t,e=this){var o;if((t=null!==(o=M(this,t,e,0))&&void 0!==o?o:z)===k)return;const i=this._$AH,r=t===z&&i!==z||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==z&&(i===z||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,o;"function"==typeof this._$AH?this._$AH.call(null!==(o=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==o?o:this.element,t):this._$AH.handleEvent(t)}}class O{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const U=i.litHtmlPolyfillSupport;null==U||U(W,j),(null!==(o=i.litHtmlVersions)&&void 0!==o?o:i.litHtmlVersions=[]).push("2.7.4");const q=Symbol.for(""),R=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t._$litStatic$},N=(t,...e)=>({_$litStatic$:e.reduce(((e,o,i)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(o)+t[i+1]),t[0]),r:q}),P=new Map,D=(t=>(e,...o)=>{const i=o.length;let r,n;const s=[],a=[];let l,c=0,d=!1;for(;c<i;){for(l=e[c];c<i&&void 0!==(n=o[c],r=R(n));)l+=r+e[++c],d=!0;c!==i&&a.push(n),s.push(l),c++}if(c===i&&s.push(e[i]),d){const t=s.join("$$lit$$");void 0===(e=P.get(t))&&(s.raw=s,P.set(t,e=s)),o=a}return t(e,...o)})(x),L=window,G=L.ShadowRoot&&(void 0===L.ShadyCSS||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,I=Symbol(),V=new WeakMap;
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2020 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/let
|
|
11
|
+
*/let J=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==I)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(G&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=V.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&V.set(e,t))}return t}toString(){return this.cssText}};const H=t=>new J("string"==typeof t?t:t+"",void 0,I),Z=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,o,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[i+1]),t[0]);return new J(o,t,I)},F=G?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return H(e)})(t):t
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright 2017 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
-
*/;var
|
|
16
|
+
*/;var K;const X=window,Y=X.trustedTypes,Q=Y?Y.emptyScript:"",tt=X.reactiveElementPolyfillSupport,et={toAttribute(t,e){switch(e){case Boolean:t=t?Q:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},ot=(t,e)=>e!==t&&(e==e||t==t),it={attribute:!0,type:String,converter:et,reflect:!1,hasChanged:ot};class rt extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,o)=>{const i=this._$Ep(o,e);void 0!==i&&(this._$Ev.set(i,o),t.push(i))})),t}static createProperty(t,e=it){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const o="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,o,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){return{get(){return this[e]},set(i){const r=this[t];this[e]=i,this.requestUpdate(t,r,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||it}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const o of e)this.createProperty(o,t[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(F(t))}else void 0!==t&&e.push(F(t));return e}static _$Ep(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,o;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(o=t.hostConnected)||void 0===o||o.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{G?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const o=document.createElement("style"),i=L.litNonce;void 0!==i&&o.setAttribute("nonce",i),o.textContent=e.cssText,t.appendChild(o)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$EO(t,e,o=it){var i;const r=this.constructor._$Ep(t,o);if(void 0!==r&&!0===o.reflect){const n=(void 0!==(null===(i=o.converter)||void 0===i?void 0:i.toAttribute)?o.converter:et).toAttribute(e,o.type);this._$El=t,null==n?this.removeAttribute(r):this.setAttribute(r,n),this._$El=null}}_$AK(t,e){var o;const i=this.constructor,r=i._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=i.getPropertyOptions(r),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(o=t.converter)||void 0===o?void 0:o.fromAttribute)?t.converter:et;this._$El=r,this[r]=n.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,o){let i=!0;void 0!==t&&(((o=o||this.constructor.getPropertyOptions(t)).hasChanged||ot)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===o.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,o))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const o=this._$AL;try{e=this.shouldUpdate(o),e?(this.willUpdate(o),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(o)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(o)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
17
17
|
/**
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright 2017 Google LLC
|
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
21
|
*/
|
|
22
|
-
var st
|
|
22
|
+
var nt,st;rt.finalized=!0,rt.elementProperties=new Map,rt.elementStyles=[],rt.shadowRootOptions={mode:"open"},null==tt||tt({ReactiveElement:rt}),(null!==(K=X.reactiveElementVersions)&&void 0!==K?K:X.reactiveElementVersions=[]).push("1.6.1");let at=class extends rt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const o=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=o.firstChild),o}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,o)=>{var i,r;const n=null!==(i=null==o?void 0:o.renderBefore)&&void 0!==i?i:e;let s=n._$litPart$;if(void 0===s){const t=null!==(r=null==o?void 0:o.renderBefore)&&void 0!==r?r:null;n._$litPart$=s=new j(e.insertBefore(h(),t),t,void 0,null!=o?o:{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return k}};at.finalized=!0,at._$litElement$=!0,null===(nt=globalThis.litElementHydrateSupport)||void 0===nt||nt.call(globalThis,{LitElement:at});const lt=globalThis.litElementPolyfillSupport;null==lt||lt({LitElement:at}),(null!==(st=globalThis.litElementVersions)&&void 0!==st?st:globalThis.litElementVersions=[]).push("3.3.2");
|
|
23
23
|
/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2018 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
27
|
*/
|
|
28
|
-
const
|
|
28
|
+
const ct=t=>null!=t?t:z
|
|
29
29
|
/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
32
32
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
33
|
-
*/,
|
|
33
|
+
*/,dt=1,ht=t=>(...e)=>({_$litDirective$:t,values:e});let ut=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
|
|
34
34
|
/**
|
|
35
35
|
* @license
|
|
36
36
|
* Copyright 2018 Google LLC
|
|
37
37
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
|
-
*/const bt=ut(class extends gt{constructor(t){var e;if(super(t),t.type!==ht||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var o,i;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(o=this.nt)||void 0===o?void 0:o.has(t))&&this.it.add(t);return this.render(e)}const r=t.element.classList;this.it.forEach((t=>{t in e||(r.remove(t),this.it.delete(t))}));for(const t in e){const o=!!e[t];o===this.it.has(t)||(null===(i=this.nt)||void 0===i?void 0:i.has(t))||(o?(r.add(t),this.it.add(t)):(r.remove(t),this.it.delete(t)))}return k}}),pt=(t,e=["article","div","span"],o="div")=>class extends t{static get properties(){return{as:{type:String}}}connectedCallback(){var t;super.connectedCallback(),this.as=null!==(t=e.includes(this.as)?this.as:o)&&void 0!==t?t:"div"}get tag(){return P`${(t=>({_$litStatic$:t,r:R}))(this.as)}`}};var mt,ft;class $t extends lt{constructor(){super(...arguments),mt.set(this,void 0),ft.set(this,(()=>{if(this.hasAttribute("form")){const t=this.getRootNode(),o=this.getAttribute("form");e(this,mt,t.getElementById(o),"f")}else e(this,mt,this.closest("form"),"f")}))}static get properties(){return{assignedForm:{type:String,attribute:"form"}}}get form(){return t(this,mt,"f")}updated(e){super.updated(e),(e.has("form")||null==t(this,mt,"f"))&&t(this,ft,"f").call(this)}}function yt(t){return t&&t.i&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}mt=new WeakMap,ft=new WeakMap;var vt,wt,xt={};xt.LoadsmartTheme={"brand-color-brand":"20, 214, 77","brand-color-brand-accent-1":"0, 215, 215","brand-color-brand-accent-2":"132, 241, 30","border-radius-none":"0px","border-radius-s":"4px","border-radius-m":"8px","border-radius-l":"16px","border-radius-circle":"50%","border-none":0,"border-thin":"1px","border-medium":"2px","border-thick":"4px","color-background-primary":"252, 252, 255","color-background-secondary":"248, 249, 251","color-background-tertiary":"230, 237, 242","color-background-highlight":"202, 219, 221","color-background-inverted":"32, 41, 49","color-background-secondary-inverted":"61, 74, 85","color-border":"193, 206, 217","color-divider":"230, 237, 242","color-brand":"20, 214, 77","color-brand-accent-1":"0, 215, 215","color-brand-accent-2":"132, 241, 30","color-primary-20":"202, 219, 221","color-primary-60":"0, 84, 84","color-primary-100":"0, 51, 51","color-accent-20":"229, 245, 255","color-accent-60":"0, 98, 159","color-accent-100":"15, 66, 97","color-neutral-0":"252, 252, 255","color-neutral-10":"248, 249, 251","color-neutral-20":"230, 237, 242","color-neutral-40":"193, 206, 217","color-neutral-60":"94, 118, 138","color-neutral-80":"92, 106, 118","color-neutral-90":"61, 74, 85","color-neutral-100":"32, 41, 49","color-success-20":"227, 247, 239","color-success-60":"3, 124, 94","color-success-100":"0, 94, 71","color-danger-20":"255, 233, 230","color-danger-60":"186, 27, 27","color-danger-100":"104, 0, 3","color-warning-20":"255, 243, 214","color-warning-60":"248, 182, 14","color-warning-100":"102, 63, 25","color-text-primary":"32, 41, 49","color-text-secondary":"61, 74, 85","color-text-tertiary":"92, 106, 118","color-text-placeholder":"94, 118, 138","color-text-disabled":"193, 206, 217","color-text-inverted":"252, 252, 255","color-text-secondary-inverted":"193, 206, 217","color-text-error":"186, 27, 27","color-text-highlight":"0, 98, 159","color-text-link":"0, 98, 159","font-family-default":"'Manrope', sans-serif","font-family-title":"'PlusJakartaSans', 'Manrope', sans-serif","font-size-1":"0.625rem","font-size-2":"0.75rem","font-size-3":"0.875rem","font-size-4":"1rem","font-size-5":"1.25rem","font-size-6":"1.625rem","font-size-7":"2.375rem","font-size-8":"3rem","font-size-9":"3.625rem","font-weight-regular":500,"font-weight-medium":600,"font-weight-bold":700,"line-height-1":"100%","line-height-2":"125%","line-height-3":"130%","line-height-4":"140%","line-height-5":"150%","line-height-6":"180%","global-height-small":"1.75rem","global-height-default":"2.5rem","global-height-large":"3rem","opacity-0":"0%","opacity-20":"20%","opacity-40":"40%","opacity-60":"60%","opacity-100":"100%","elevation-1":"0px 0px 2px rgba(94, 118, 138, 0.1), 0px 1px 6px 2px rgba(61, 74, 85, 0.15)","elevation-2":"0px 1px 3px rgba(94, 118, 138, 0.2), 0px 4px 8px 3px rgba(61, 74, 85, 0.15)","elevation-3":"0px 0px 4px rgba(94, 118, 138, 0.2), 0px 6px 12px 6px rgba(61, 74, 85, 0.15)","elevation-4":"0px 5px 6px 4px rgba(94, 118, 138, 0.2), 0px 8px 10px rgba(61, 74, 85, 0.1)","glow-primary":"0.0px 0.0px 4.0px 0px rgb(3, 124, 94, .5)","glow-warning":"0.0px 0.0px 4.0px 0px rgba(255, 206, 79, 1.0)","spacing-1":"4px","spacing-2":"8px","spacing-3":"12px","spacing-4":"16px","spacing-5":"20px","spacing-6":"24px","spacing-8":"32px","spacing-10":"40px","spacing-12":"48px","spacing-14":"56px","spacing-16":"64px","spacing-20":"80px","spacing-30":"120px","spacing-0-5":"2px","platform-font-default":"'Manrope', sans-serif","platform-font-title":"'PlusJakartaSans', 'Manrope', sans-serif"};var kt=xt;function zt(t){return kt.LoadsmartTheme[t]}function St(t){var e=zt(t);return null==e?e:"--m-".concat(t)}var Ct=Object.keys(kt.LoadsmartTheme).filter((function(t){return!t.startsWith("brand-")&&!t.startsWith("platform-")}));function Wt(t){return Ct.filter((function(e){return e.startsWith(t)}))}function Mt(t){return Z(vt(t))}function jt(t,e=1){return Z(vt(t,e))}Wt("color-"),Wt("color-background-"),function(t,e,o){if(o||2===arguments.length)for(var i,r=0,n=e.length;r<n;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);t.concat(i||Array.prototype.slice.call(e))}(["none"],Wt("spacing-"),!0),Wt("font-family-"),Wt("font-size-"),Wt("font-weight-"),Wt("line-height-"),Wt("border-"),Wt("border-radius-"),Wt("opacity-"),Wt("elevation-"),Wt("glow-"),Wt("global-"),wt=zt,vt=function(t,e){var o=zt(t);return null==o?"":t.startsWith("color-")?"rgba(var(".concat(St(t),", ").concat(o,"), ").concat(null!=e?e:1,")"):"var(".concat(St(t),", ").concat(o,")")};var At={toArray:function(t){return null==t?[]:Array.isArray(t)?t:[t]}},Bt=yt(At.toArray);function Et(t){return Z(`\n\t\tmargin-inline-start: ${t}\n\t`)}function _t(t){return Z(`\n\t\t${Et(t)};\n\t\t${function(t){return Z(`\n\t\tmargin-inline-end: ${t}\n\t`)}(t)}\n\t`)}function Tt(t){return Z(`\n\t\t${function(t){return Z(`\n\t\tmargin-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return Z(`\n\t\tmargin-block-end: ${t}\n\t`)}(t)}\n\t`)}function Ot(t){return Z(`\n\t\t${_t(t)};\n\t\t${Tt(t)}\n\t`)}function Ut(t){return Z(`\n\t\t${function(t){return Z(`\n\t\tpadding-inline-end: ${t}\n\t`)}(t)};\n\t\t${function(t){return Z(`\n\t\tpadding-inline-start: ${t}\n\t`)}(t)}\n\t`)}function qt(t){return Z(`\n\t\t${function(t){return Z(`\n\t\tpadding-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return Z(`\n\t\tpadding-block-end: ${t}\n\t`)}(t)}\n\t`)}function Rt(t){return Z(`\n\t\t${Ut(t)};\n\t\t${qt(t)}\n\t`)}const Nt={property:"all",delay:"0s",duration:"0.35s",easing:"ease-in-out"};function Pt(t){const e=Bt(t).map((t=>function(t){const e={...Nt,...t};return Z(`${e.property} ${e.duration} ${e.easing} ${e.delay}`)}(t))).join(", ");return Z(`\n\t\ttransition: ${e}\n\t`)}function Dt(t){const e=Z("\n\t\tfont-style: normal;\n\t\tfont-stretch: normal;\n\t\tletter-spacing: normal;\n\n\t\tfont-synthesis: none;\n\t\ttext-rendering: optimizeLegibility;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\t-webkit-text-size-adjust: 100%;\n\t");return Z(`${e}\n${function(t){switch(t){case"hero-lg-bold":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-6")};\n\t\t\t\tfont-size: ${Mt("font-size-9")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"hero-lg":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-6")};\n\t\t\t\tfont-size: ${Mt("font-size-9")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t`;case"hero-md-bold":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-6")};\n\t\t\t\tfont-size: ${Mt("font-size-8")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"hero-md":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-6")};\n\t\t\t\tfont-size: ${Mt("font-size-8")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t`;case"hero-sm-bold":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-6")};\n\t\t\t\tfont-size: ${Mt("font-size-7")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"hero-sm":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-6")};\n\t\t\t\tfont-size: ${Mt("font-size-7")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t`;case"heading-lg-bold":return`\n\t\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\t\tfont-size: ${Mt("font-size-6")};\n\t\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t\t`;case"heading-lg":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-6")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t`;case"heading-md-bold":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-5")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"heading-md":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-5")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t`;case"heading-sm-bold":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-4")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"heading-sm":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-4")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t`;case"body-lg-bold":return`\n\t\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\t\tline-height: ${Mt("line-height-6")};\n\t\t\t\t\tfont-size: ${Mt("font-size-5")};\n\t\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t\t`;case"body-lg":return`\n\t\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\t\tline-height: ${Mt("line-height-6")};\n\t\t\t\t\tfont-size: ${Mt("font-size-5")};\n\t\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t\t`;case"body-md":case"number-md":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-3")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t`;case"body-md-underline":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-3")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-md-bold":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-3")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"body-md-bold-underline":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-3")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-sm":case"number-sm":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-4")};\n\t\t\t\tfont-size: ${Mt("font-size-2")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t`;case"body-sm-underline":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-4")};\n\t\t\t\tfont-size: ${Mt("font-size-2")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-sm-bold":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-4")};\n\t\t\t\tfont-size: ${Mt("font-size-2")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"body-sm-bold-underline":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-4")};\n\t\t\t\tfont-size: ${Mt("font-size-2")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"button-lg":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-1")};\n\t\t\t\tfont-size: ${Mt("font-size-4")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"button-md":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-1")};\n\t\t\t\tfont-size: ${Mt("font-size-3")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"button-sm":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-1")};\n\t\t\t\tfont-size: ${Mt("font-size-2")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"table-header-md":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-1")};\n\t\t\t\tfont-size: ${Mt("font-size-3")};\n\t\t\t\tfont-weight: ${Mt("font-weight-medium")};\n\t\t\t\ttext-transform: uppercase\n\t\t\t`;case"table-header-sm":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-1")};\n\t\t\t\tfont-size: ${Mt("font-size-2")};\n\t\t\t\tfont-weight: ${Mt("font-weight-medium")}\n\t\t\t`;case"chips-md":return`\n\t\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\t\tline-height: ${Mt("line-height-1")};\n\t\t\t\t\tfont-size: ${Mt("font-size-2")};\n\t\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t\t`;case"chips-sm":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-1")};\n\t\t\t\tfont-size: ${Mt("font-size-1")};\n\t\t\t\tfont-weight: ${Mt("font-weight-medium")};\n\t\t\t\ttext-transform: uppercase\n\t\t\t`;default:return""}}(t)}`)}function Lt(t,e=""){return Z(Bt(t).map((t=>[`${t}.is-disabled`,`${t}:disabled`].map((t=>[t,e].join(" "))).join(", "))).join(", "))}const Gt={active:function(t){return Z(Bt(t).map((t=>`${t}:not(.is-disabled, :disabled):active`)).join(", "))},focus:function(t){return Z(Bt(t).map((t=>`${t}:not(.is-disabled, :disabled):focus,\n\t\t\t\t${t}:not(.is-disabled, :disabled):focus-within,\n\t\t\t\t${t}:not(.is-disabled, :disabled).is-focused`)).join(", "))},hover:function(t){return Z(Bt(t).map((t=>`${t}:not(.is-disabled, :disabled):hover`)).join(", "))}};function It(){return F`
|
|
38
|
+
*/const gt=ht(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var o,i;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(o=this.nt)||void 0===o?void 0:o.has(t))&&this.it.add(t);return this.render(e)}const r=t.element.classList;this.it.forEach((t=>{t in e||(r.remove(t),this.it.delete(t))}));for(const t in e){const o=!!e[t];o===this.it.has(t)||(null===(i=this.nt)||void 0===i?void 0:i.has(t))||(o?(r.add(t),this.it.add(t)):(r.remove(t),this.it.delete(t)))}return k}}),bt=(t,e=["article","div","span"],o="div")=>class extends t{static get properties(){return{as:{type:String}}}connectedCallback(){var t;super.connectedCallback(),this.as=null!==(t=e.includes(this.as)?this.as:o)&&void 0!==t?t:"div"}get tag(){return N`${(t=>({_$litStatic$:t,r:q}))(this.as)}`}};var pt,mt;class ft extends at{constructor(){super(...arguments),pt.set(this,void 0),mt.set(this,(()=>{if(this.hasAttribute("form")){const t=this.getRootNode(),o=this.getAttribute("form");e(this,pt,t.getElementById(o),"f")}else e(this,pt,this.closest("form"),"f")}))}static get properties(){return{assignedForm:{type:String,attribute:"form"}}}get form(){return t(this,pt,"f")}updated(e){super.updated(e),(e.has("form")||null==t(this,pt,"f"))&&t(this,mt,"f").call(this)}}function $t(t){return t&&t.i&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}pt=new WeakMap,mt=new WeakMap;var yt,vt,wt={};wt.LoadsmartTheme={"brand-color-brand":"20, 214, 77","brand-color-brand-accent-1":"0, 215, 215","brand-color-brand-accent-2":"132, 241, 30","border-radius-none":"0px","border-radius-s":"4px","border-radius-m":"8px","border-radius-l":"16px","border-radius-circle":"50%","border-none":0,"border-thin":"1px","border-medium":"2px","border-thick":"4px","color-background-primary":"252, 252, 255","color-background-secondary":"248, 249, 251","color-background-tertiary":"230, 237, 242","color-background-highlight":"202, 219, 221","color-background-inverted":"32, 41, 49","color-background-secondary-inverted":"61, 74, 85","color-border":"193, 206, 217","color-divider":"230, 237, 242","color-brand":"20, 214, 77","color-brand-accent-1":"0, 215, 215","color-brand-accent-2":"132, 241, 30","color-primary-20":"202, 219, 221","color-primary-60":"0, 84, 84","color-primary-100":"0, 51, 51","color-accent-20":"229, 245, 255","color-accent-60":"0, 98, 159","color-accent-100":"15, 66, 97","color-neutral-0":"252, 252, 255","color-neutral-10":"248, 249, 251","color-neutral-20":"230, 237, 242","color-neutral-40":"193, 206, 217","color-neutral-60":"94, 118, 138","color-neutral-80":"92, 106, 118","color-neutral-90":"61, 74, 85","color-neutral-100":"32, 41, 49","color-success-20":"227, 247, 239","color-success-60":"3, 124, 94","color-success-100":"0, 94, 71","color-danger-20":"255, 233, 230","color-danger-60":"186, 27, 27","color-danger-100":"104, 0, 3","color-warning-20":"255, 243, 214","color-warning-60":"248, 182, 14","color-warning-100":"102, 63, 25","color-text-primary":"32, 41, 49","color-text-secondary":"61, 74, 85","color-text-tertiary":"92, 106, 118","color-text-placeholder":"94, 118, 138","color-text-disabled":"193, 206, 217","color-text-inverted":"252, 252, 255","color-text-secondary-inverted":"193, 206, 217","color-text-error":"186, 27, 27","color-text-highlight":"0, 98, 159","color-text-link":"0, 98, 159","font-family-default":"'Manrope', sans-serif","font-family-title":"'PlusJakartaSans', 'Manrope', sans-serif","font-size-1":"0.625rem","font-size-2":"0.75rem","font-size-3":"0.875rem","font-size-4":"1rem","font-size-5":"1.25rem","font-size-6":"1.625rem","font-size-7":"2.375rem","font-size-8":"3rem","font-size-9":"3.625rem","font-weight-regular":500,"font-weight-medium":600,"font-weight-bold":700,"line-height-1":"100%","line-height-2":"125%","line-height-3":"130%","line-height-4":"140%","line-height-5":"150%","line-height-6":"180%","global-height-small":"1.75rem","global-height-default":"2.5rem","global-height-large":"3rem","opacity-0":"0%","opacity-20":"20%","opacity-40":"40%","opacity-60":"60%","opacity-100":"100%","elevation-1":"0px 0px 2px rgba(94, 118, 138, 0.1), 0px 1px 6px 2px rgba(61, 74, 85, 0.15)","elevation-2":"0px 1px 3px rgba(94, 118, 138, 0.2), 0px 4px 8px 3px rgba(61, 74, 85, 0.15)","elevation-3":"0px 0px 4px rgba(94, 118, 138, 0.2), 0px 6px 12px 6px rgba(61, 74, 85, 0.15)","elevation-4":"0px 5px 6px 4px rgba(94, 118, 138, 0.2), 0px 8px 10px rgba(61, 74, 85, 0.1)","glow-primary":"0.0px 0.0px 4.0px 0px rgb(3, 124, 94, .5)","glow-warning":"0.0px 0.0px 4.0px 0px rgba(255, 206, 79, 1.0)","spacing-1":"4px","spacing-2":"8px","spacing-3":"12px","spacing-4":"16px","spacing-5":"20px","spacing-6":"24px","spacing-8":"32px","spacing-10":"40px","spacing-12":"48px","spacing-14":"56px","spacing-16":"64px","spacing-20":"80px","spacing-30":"120px","spacing-0-5":"2px","platform-font-default":"'Manrope', sans-serif","platform-font-title":"'PlusJakartaSans', 'Manrope', sans-serif"};var xt=wt;function kt(t,e){return t.filter((function(t){return t.startsWith(e)}))}function zt(t,e){return t.filter((function(t){return!t.startsWith(e)}))}var St=zt(zt(Object.keys(xt.LoadsmartTheme),"brand-"),"platform-");function Ct(t){return xt.LoadsmartTheme[t]}function Wt(t){var e=Ct(t);return null==e?e:"--m-".concat(t)}function Mt(t){return H(yt(t))}function jt(t,e=1){return H(yt(t,e))}kt(St,"color-background-"),kt(St,"border-radius-"),kt(St,"border-"),kt(St,"color-"),kt(St,"elevation-"),kt(St,"font-family-"),kt(St,"font-size-"),kt(St,"font-weight-"),kt(St,"global-"),kt(St,"glow-"),kt(St,"line-height-"),kt(St,"opacity-"),function(t,e,o){if(o||2===arguments.length)for(var i,r=0,n=e.length;r<n;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);t.concat(i||Array.prototype.slice.call(e))}(["none"],kt(St,"spacing-"),!0),vt=Ct,yt=function(t,e){var o=Ct(t);return null==o?"":t.startsWith("color-")?"rgba(var(".concat(Wt(t),", ").concat(o,"), ").concat(null!=e?e:1,")"):"var(".concat(Wt(t),", ").concat(o,")")};var At={toArray:function(t){return null==t?[]:Array.isArray(t)?t:[t]}},Bt=$t(At.toArray);function Et(t){return H(`\n\t\tmargin-inline-start: ${t}\n\t`)}function _t(t){return H(`\n\t\t${Et(t)};\n\t\t${function(t){return H(`\n\t\tmargin-inline-end: ${t}\n\t`)}(t)}\n\t`)}function Tt(t){return H(`\n\t\t${function(t){return H(`\n\t\tmargin-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return H(`\n\t\tmargin-block-end: ${t}\n\t`)}(t)}\n\t`)}function Ot(t){return H(`\n\t\t${_t(t)};\n\t\t${Tt(t)}\n\t`)}function Ut(t){return H(`\n\t\t${function(t){return H(`\n\t\tpadding-inline-end: ${t}\n\t`)}(t)};\n\t\t${function(t){return H(`\n\t\tpadding-inline-start: ${t}\n\t`)}(t)}\n\t`)}function qt(t){return H(`\n\t\t${function(t){return H(`\n\t\tpadding-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return H(`\n\t\tpadding-block-end: ${t}\n\t`)}(t)}\n\t`)}function Rt(t){return H(`\n\t\t${Ut(t)};\n\t\t${qt(t)}\n\t`)}const Nt={property:"all",delay:"0s",duration:"0.35s",easing:"ease-in-out"};function Pt(t){const e=Bt(t).map((t=>function(t){const e={...Nt,...t};return H(`${e.property} ${e.duration} ${e.easing} ${e.delay}`)}(t))).join(", ");return H(`\n\t\ttransition: ${e}\n\t`)}function Dt(t){const e=H("\n\t\tfont-style: normal;\n\t\tfont-stretch: normal;\n\t\tletter-spacing: normal;\n\n\t\tfont-synthesis: none;\n\t\ttext-rendering: optimizeLegibility;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\t-webkit-text-size-adjust: 100%;\n\t");return H(`${e}\n${function(t){switch(t){case"hero-lg-bold":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-6")};\n\t\t\t\tfont-size: ${Mt("font-size-9")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"hero-lg":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-6")};\n\t\t\t\tfont-size: ${Mt("font-size-9")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t`;case"hero-md-bold":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-6")};\n\t\t\t\tfont-size: ${Mt("font-size-8")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"hero-md":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-6")};\n\t\t\t\tfont-size: ${Mt("font-size-8")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t`;case"hero-sm-bold":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-6")};\n\t\t\t\tfont-size: ${Mt("font-size-7")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"hero-sm":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-6")};\n\t\t\t\tfont-size: ${Mt("font-size-7")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t`;case"heading-lg-bold":return`\n\t\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\t\tfont-size: ${Mt("font-size-6")};\n\t\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t\t`;case"heading-lg":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-6")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t`;case"heading-md-bold":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-5")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"heading-md":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-5")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t`;case"heading-sm-bold":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-4")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"heading-sm":return`\n\t\t\t\tfont-family: ${Mt("font-family-title")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-4")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t`;case"body-lg-bold":return`\n\t\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\t\tline-height: ${Mt("line-height-6")};\n\t\t\t\t\tfont-size: ${Mt("font-size-5")};\n\t\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t\t`;case"body-lg":return`\n\t\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\t\tline-height: ${Mt("line-height-6")};\n\t\t\t\t\tfont-size: ${Mt("font-size-5")};\n\t\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t\t`;case"body-md":case"number-md":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-3")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t`;case"body-md-underline":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-3")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-md-bold":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-3")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"body-md-bold-underline":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-5")};\n\t\t\t\tfont-size: ${Mt("font-size-3")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-sm":case"number-sm":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-4")};\n\t\t\t\tfont-size: ${Mt("font-size-2")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")}\n\t\t\t`;case"body-sm-underline":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-4")};\n\t\t\t\tfont-size: ${Mt("font-size-2")};\n\t\t\t\tfont-weight: ${Mt("font-weight-regular")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-sm-bold":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-4")};\n\t\t\t\tfont-size: ${Mt("font-size-2")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"body-sm-bold-underline":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-4")};\n\t\t\t\tfont-size: ${Mt("font-size-2")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"button-lg":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-1")};\n\t\t\t\tfont-size: ${Mt("font-size-4")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"button-md":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-1")};\n\t\t\t\tfont-size: ${Mt("font-size-3")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"button-sm":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-1")};\n\t\t\t\tfont-size: ${Mt("font-size-2")};\n\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t`;case"table-header-md":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-1")};\n\t\t\t\tfont-size: ${Mt("font-size-3")};\n\t\t\t\tfont-weight: ${Mt("font-weight-medium")};\n\t\t\t\ttext-transform: uppercase\n\t\t\t`;case"table-header-sm":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-1")};\n\t\t\t\tfont-size: ${Mt("font-size-2")};\n\t\t\t\tfont-weight: ${Mt("font-weight-medium")}\n\t\t\t`;case"chips-md":return`\n\t\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\t\tline-height: ${Mt("line-height-1")};\n\t\t\t\t\tfont-size: ${Mt("font-size-2")};\n\t\t\t\t\tfont-weight: ${Mt("font-weight-bold")}\n\t\t\t\t`;case"chips-sm":return`\n\t\t\t\tfont-family: ${Mt("font-family-default")};\n\t\t\t\tline-height: ${Mt("line-height-1")};\n\t\t\t\tfont-size: ${Mt("font-size-1")};\n\t\t\t\tfont-weight: ${Mt("font-weight-medium")};\n\t\t\t\ttext-transform: uppercase\n\t\t\t`;default:return""}}(t)}`)}function Lt(t,e=""){return H(Bt(t).map((t=>[`${t}.is-disabled`,`${t}:disabled`].map((t=>[t,e].join(" "))).join(", "))).join(", "))}const Gt={active:function(t){return H(Bt(t).map((t=>`${t}:not(.is-disabled, :disabled):active`)).join(", "))},focus:function(t){return H(Bt(t).map((t=>`${t}:not(.is-disabled, :disabled):focus,\n\t\t\t\t${t}:not(.is-disabled, :disabled):focus-within,\n\t\t\t\t${t}:not(.is-disabled, :disabled).is-focused`)).join(", "))},hover:function(t){return H(Bt(t).map((t=>`${t}:not(.is-disabled, :disabled):hover`)).join(", "))}};function It(){return Z`
|
|
39
39
|
:host {
|
|
40
40
|
--m-button-background-color: transparent;
|
|
41
41
|
--m-button-base-size: ${Mt("global-height-default")};
|
|
@@ -137,26 +137,26 @@ const dt=t=>null!=t?t:z
|
|
|
137
137
|
slot[name='trailing']::slotted(span) {
|
|
138
138
|
justify-content: center;
|
|
139
139
|
}
|
|
140
|
-
`}var Vt,Jt,Ht,Zt,Ft,Kt,Xt;class Yt extends(
|
|
140
|
+
`}var Vt,Jt,Ht,Zt,Ft,Kt,Xt;class Yt extends(bt(ft,["button","a"],"button")){static get properties(){return{...ft.properties,role:{type:String,reflect:!0},loading:{type:Boolean},disabled:{type:Boolean,reflect:!0},variant:{type:String,reflect:!0},size:{type:String,reflect:!0},tabindex:{type:String},type:{type:String},href:{type:String},target:{type:String},download:{type:String}}}constructor(){super(),Vt.add(this),Ht.set(this,(()=>Boolean(this.disabled)||Boolean(this.loading))),Zt.set(this,(()=>{const e=t(this,Ht,"f").call(this);this.setAttribute("aria-disabled",String(e))})),Ft.set(this,(()=>{var e;return t(this,Vt,"m",Xt).call(this)?this.disabled?"-1":null!=this.tabindex?this.tabindex:"0":null!==(e=this.tabindex)&&void 0!==e?e:void 0})),Kt.set(this,(t=>{var e,o;if(this.disabled||this.loading)return t.preventDefault(),void t.stopPropagation();"submit"===this.type&&(null===(e=this.form)||void 0===e||e.requestSubmit()),"reset"===this.type&&(null===(o=this.form)||void 0===o||o.reset())})),this.as="button",this.disabled=!1,this.loading=!1,this.size="default",this.type="button",this.variant="secondary",this.target="_self"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.addEventListener("click",t(this,Kt,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,Kt,"f"))}update(e){super.update(e),e.has("href")&&(this.as=t(this,Vt,"m",Xt).call(this)?"a":"button",this.role=t(this,Vt,"m",Xt).call(this)?"link":"button")}updated(e){super.updated(e),(e.has("disabled")||e.has("loading"))&&t(this,Zt,"f").call(this)}render(){const e=t(this,Vt,"m",Xt).call(this);return D`
|
|
141
141
|
<${this.tag}
|
|
142
|
-
class=${
|
|
143
|
-
type=${
|
|
142
|
+
class=${gt({button:!0,"-primary":"primary"===this.variant,"-secondary":"secondary"===this.variant,"-tertiary":"tertiary"===this.variant,"-warning":"warning"===this.variant,"-danger":"danger"===this.variant,"-icon":"icon"===this.variant,"-icon-secondary":"icon-secondary"===this.variant,"-small":"small"===this.size,"-default":"default"===this.size,"-large":"large"===this.size,"is-loading":Boolean(this.loading),"is-disabled":t(this,Ht,"f").call(this)})}
|
|
143
|
+
type=${ct(e?void 0:this.type)}
|
|
144
144
|
?disabled="${t(this,Ht,"f").call(this)}"
|
|
145
145
|
aria-disabled=${this.disabled?"true":"false"}
|
|
146
|
-
role=${
|
|
147
|
-
tabindex=${
|
|
148
|
-
href=${
|
|
149
|
-
target=${
|
|
150
|
-
download=${
|
|
151
|
-
rel=${
|
|
146
|
+
role=${ct(e?"link":"button")}
|
|
147
|
+
tabindex=${ct(t(this,Ft,"f").call(this))}
|
|
148
|
+
href=${ct(e?this.href:void 0)}
|
|
149
|
+
target=${ct(e?this.target:void 0)}
|
|
150
|
+
download=${ct(e?this.download:void 0)}
|
|
151
|
+
rel=${ct(e&&this.target?"noreferrer noopener":void 0)}
|
|
152
152
|
>
|
|
153
153
|
<!-- TODO: Replace this with the loading dots component as soon as it is ready. -->
|
|
154
|
-
${this.loading&&!["icon","icon-secondary"].includes(this.variant)?
|
|
154
|
+
${this.loading&&!["icon","icon-secondary"].includes(this.variant)?D`<span class="loader">●●●</span>`:z}
|
|
155
155
|
<slot name="leading"></slot>
|
|
156
156
|
<slot></slot>
|
|
157
157
|
<slot name="trailing"></slot>
|
|
158
158
|
</${this.tag}>
|
|
159
|
-
`}focus(e){var o;null===(o=t(this,Vt,"a",Jt))||void 0===o||o.focus(e)}}Ht=new WeakMap,Zt=new WeakMap,Ft=new WeakMap,Kt=new WeakMap,Vt=new WeakSet,Jt=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(".button"))&&void 0!==e?e:null},Xt=function(){return Boolean(this.href)},Yt.styles=[[It(),
|
|
159
|
+
`}focus(e){var o;null===(o=t(this,Vt,"a",Jt))||void 0===o||o.focus(e)}}Ht=new WeakMap,Zt=new WeakMap,Ft=new WeakMap,Kt=new WeakMap,Vt=new WeakSet,Jt=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(".button"))&&void 0!==e?e:null},Xt=function(){return Boolean(this.href)},Yt.styles=[[It(),Z`
|
|
160
160
|
.button.is-loading:not(.-icon, .-icon-secondary) *:not(.loader) {
|
|
161
161
|
visibility: hidden;
|
|
162
162
|
}
|
|
@@ -403,26 +403,26 @@ const dt=t=>null!=t?t:z
|
|
|
403
403
|
|
|
404
404
|
pointer-events: none;
|
|
405
405
|
}
|
|
406
|
-
`]],window.customElements.define("m-button",Yt);class Qt extends Yt{constructor(){super(),this.size="small"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","primary-action")}}window.customElements.define("m-banner-action-primary",Qt);class te extends Yt{constructor(){super(),this.variant="tertiary",this.size="small"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","secondary-action")}}window.customElements.define("m-banner-action-secondary",te);class ee extends
|
|
406
|
+
`]],window.customElements.define("m-button",Yt);class Qt extends Yt{constructor(){super(),this.size="small"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","primary-action")}}window.customElements.define("m-banner-action-primary",Qt);class te extends Yt{constructor(){super(),this.variant="tertiary",this.size="small"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","secondary-action")}}window.customElements.define("m-banner-action-secondary",te);class ee extends at{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","actions")}render(){return x`
|
|
407
407
|
<slot name="secondary-action"></slot>
|
|
408
408
|
<slot name="primary-action"></slot>
|
|
409
|
-
`}}ee.styles=[
|
|
409
|
+
`}}ee.styles=[Z`
|
|
410
410
|
:host {
|
|
411
411
|
display: flex;
|
|
412
412
|
justify-content: flex-end;
|
|
413
413
|
gap: ${Mt("spacing-2")};
|
|
414
414
|
}
|
|
415
|
-
`],window.customElements.define("m-banner-actions",ee);class oe extends
|
|
415
|
+
`],window.customElements.define("m-banner-actions",ee);class oe extends at{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","description")}render(){return x`<slot></slot>`}}oe.styles=[Z`
|
|
416
416
|
:host {
|
|
417
417
|
${Dt("body-md")};
|
|
418
418
|
color: ${jt("color-text-secondary")};
|
|
419
419
|
}
|
|
420
|
-
`],window.customElements.define("m-banner-description",oe);class ie extends
|
|
420
|
+
`],window.customElements.define("m-banner-description",oe);class ie extends at{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","icon")}render(){return x`<slot></slot>`}}window.customElements.define("m-banner-icon",ie);class re extends at{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","title")}render(){return x`<slot></slot>`}}re.styles=[Z`
|
|
421
421
|
:host {
|
|
422
422
|
${Dt("body-md-bold")};
|
|
423
423
|
color: ${jt("color-text-secondary")};
|
|
424
424
|
}
|
|
425
|
-
`],window.customElements.define("m-banner-title",re);class ne extends
|
|
425
|
+
`],window.customElements.define("m-banner-title",re);class ne extends at{constructor(){super(...arguments),this.emit=(t,e)=>{const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,...e});this.dispatchEvent(o)},this.reemit=t=>{!function(t,e){!e.bubbles||t.shadowRoot&&!e.composed||e.stopPropagation();const o=Reflect.construct(e.constructor,[e.type,e]),i=t.dispatchEvent(o);i||e.preventDefault()}(this,t)}}}var se={BASE_PIXELS:16,toRem:function(t,e=16){return parseInt(String(t),10)/e+"rem"}},ae=$t(se.toRem);function le(t,e){return H(ae(t,e))}const ce=["alert-circle","attention","bell","check","close","info-circle","indeterminate"];var de,he,ue,ge,be;class pe extends ne{static get properties(){return{name:{type:String},size:{type:String},color:{type:String},loading:{state:!0}}}constructor(){super(),de.add(this),this.icon=null,this.icon=null}connectedCallback(){super.connectedCallback(),t(this,de,"m",he).call(this)}update(e){super.update(e),e.has("name")&&t(this,de,"m",he).call(this)}updated(t){super.updated(t),t.has("size")&&null!=this.size&&this.style.setProperty("--m-icon-size",`${parseInt(String(this.size),10)||16}px`),t.has("color")&&null!=this.color&&this.style.setProperty("--m-icon-color",yt(this.color))}render(){return null!=this.name&&ce.includes(this.name)&&null!=this.icon?this.icon:z}}de=new WeakSet,he=async function(){try{this.icon=null;const{default:t}=await import(`./icons/${this.name}.js`);this.icon=t}catch{console.error(`failed loading icon "${this.name}". Are you sure it exists?`)}finally{this.requestUpdate()}},pe.styles=[[Z`
|
|
426
426
|
:host {
|
|
427
427
|
--m-icon-size: 16px;
|
|
428
428
|
--m-icon-color: ${jt("color-text-primary")};
|
|
@@ -447,15 +447,15 @@ const dt=t=>null!=t?t:z
|
|
|
447
447
|
`]],window.customElements.define("m-icon",pe);class me extends ne{static get properties(){return{controls:{type:String},disabled:{type:Boolean},inverted:{type:Boolean},label:{type:String},size:{type:String}}}constructor(){super(),ue.add(this),be.set(this,(()=>{this.emit("m-close")})),this.disabled=!1,this.inverted=!1,this.label="Close",this.size="default"}render(){var e;return x`
|
|
448
448
|
<button
|
|
449
449
|
type="button"
|
|
450
|
-
aria-controls="${
|
|
451
|
-
aria-label="${
|
|
452
|
-
class=${
|
|
450
|
+
aria-controls="${ct(this.controls)}"
|
|
451
|
+
aria-label="${ct(this.label)}"
|
|
452
|
+
class=${gt({"close-button":!0,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size,"-inverted":null!==(e=this.inverted)&&void 0!==e&&e})}
|
|
453
453
|
?disabled="${this.disabled}"
|
|
454
454
|
@click=${t(this,be,"f")}
|
|
455
455
|
>
|
|
456
456
|
<m-icon name="close"></m-icon>
|
|
457
457
|
</button>
|
|
458
|
-
`}focus(e){var o;null===(o=t(this,ue,"a",ge))||void 0===o||o.focus(e)}}be=new WeakMap,ue=new WeakSet,ge=function(){var t;return null!==(t=this.renderRoot.querySelector("button"))&&void 0!==t?t:null},me.styles=[
|
|
458
|
+
`}focus(e){var o;null===(o=t(this,ue,"a",ge))||void 0===o||o.focus(e)}}be=new WeakMap,ue=new WeakSet,ge=function(){var t;return null!==(t=this.renderRoot.querySelector("button"))&&void 0!==t?t:null},me.styles=[Z`
|
|
459
459
|
:host {
|
|
460
460
|
--m-close-button-color: ${jt("color-text-primary")};
|
|
461
461
|
--m-close-button-outline-color: ${jt("color-primary-100")};
|
|
@@ -537,18 +537,20 @@ const dt=t=>null!=t?t:z
|
|
|
537
537
|
* Copyright 2018 Google LLC
|
|
538
538
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
539
539
|
*/
|
|
540
|
-
const fe="important",$e=" !"+fe,ye=
|
|
540
|
+
const fe="important",$e=" !"+fe,ye=ht(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,o)=>{const i=t[o];return null==i?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:o}=t.element;if(void 0===this.ut){this.ut=new Set;for(const t in e)this.ut.add(t);return this.render(e)}this.ut.forEach((t=>{null==e[t]&&(this.ut.delete(t),t.includes("-")?o.removeProperty(t):o[t]="")}));for(const t in e){const i=e[t];if(null!=i){this.ut.add(t);const e="string"==typeof i&&i.endsWith($e);t.includes("-")||e?o.setProperty(t,e?i.slice(0,-11):i,e?fe:""):o[t]=i}}return k}});class ve extends(bt(at,["h1","h2","h3","h4","h5","h6","p","span"],"span")){static get properties(){return{color:{type:String},ellipsized:{type:Boolean,reflect:!0},variant:{type:String,reflect:!0}}}constructor(){super(),this.as="span",this.color="color-text-primary",this.ellipsized=!1,this.variant="body-md"}render(){return D`
|
|
541
541
|
<${this.tag}
|
|
542
|
-
class=${
|
|
543
|
-
style=${ye({"--m-text-color":
|
|
542
|
+
class=${gt({"m-text":!0,"-body-lg-bold":"body-lg-bold"===this.variant,"-body-lg":"body-lg"===this.variant,"-body-md-bold-underline":"body-md-bold-underline"===this.variant,"-body-md-bold":"body-md-bold"===this.variant,"-body-md-underline":"body-md-underline"===this.variant,"-body-md":"body-md"===this.variant,"-body-sm-bold-underline":"body-sm-bold-underline"===this.variant,"-body-sm-bold":"body-sm-bold"===this.variant,"-body-sm-underline":"body-sm-underline"===this.variant,"-body-sm":"body-sm"===this.variant,"-button-lg":"button-lg"===this.variant,"-button-md":"button-md"===this.variant,"-button-sm":"button-sm"===this.variant,"-chips-md":"chips-md"===this.variant,"-chips-sm":"chips-sm"===this.variant,"-heading-lg-bold":"heading-lg-bold"===this.variant,"-heading-lg":"heading-lg"===this.variant,"-heading-md-bold":"heading-md-bold"===this.variant,"-heading-md":"heading-md"===this.variant,"-heading-sm-bold":"heading-sm-bold"===this.variant,"-heading-sm":"heading-sm"===this.variant,"-hero-lg-bold":"hero-lg-bold"===this.variant,"-hero-lg":"hero-lg"===this.variant,"-hero-md-bold":"hero-md-bold"===this.variant,"-hero-md":"hero-md"===this.variant,"-hero-sm-bold":"hero-sm-bold"===this.variant,"-hero-sm":"hero-sm"===this.variant,"-number-md":"number-md"===this.variant,"-number-sm":"number-sm"===this.variant,"-table-header-md":"table-header-md"===this.variant,"-table-header-sm":"table-header-sm"===this.variant,"-ellipsized":Boolean(this.ellipsized)})}
|
|
543
|
+
style=${ye({"--m-text-color":yt(this.color)})}
|
|
544
544
|
>
|
|
545
545
|
<slot></slot>
|
|
546
546
|
</${this.tag}>
|
|
547
|
-
`}}var we,xe;ve.styles=[
|
|
547
|
+
`}}var we,xe;ve.styles=[Z`
|
|
548
548
|
:host {
|
|
549
549
|
--m-text-color: ${jt("color-text-primary")};
|
|
550
550
|
--m-text-display: inline-block;
|
|
551
551
|
--m-text-max-width: initial;
|
|
552
|
+
--m-text-padding: 0;
|
|
553
|
+
--m-text-margin: 0;
|
|
552
554
|
}
|
|
553
555
|
|
|
554
556
|
.m-text {
|
|
@@ -558,6 +560,8 @@ const fe="important",$e=" !"+fe,ye=ut(class extends gt{constructor(t){var e;if(s
|
|
|
558
560
|
|
|
559
561
|
color: var(--m-text-color);
|
|
560
562
|
display: var(--m-text-display);
|
|
563
|
+
padding: var(--m-text-padding);
|
|
564
|
+
margin: var(--m-text-margin);
|
|
561
565
|
}
|
|
562
566
|
|
|
563
567
|
.-body-lg-bold {
|
|
@@ -698,7 +702,7 @@ const fe="important",$e=" !"+fe,ye=ut(class extends gt{constructor(t){var e;if(s
|
|
|
698
702
|
></m-close-button>
|
|
699
703
|
`;return x`
|
|
700
704
|
<div
|
|
701
|
-
class=${
|
|
705
|
+
class=${gt({banner:!0,"-success":"success"===this.variant,"-warning":"warning"===this.variant,"-danger":"danger"===this.variant,"-with-description":e})}
|
|
702
706
|
>
|
|
703
707
|
<div class="wrapper">
|
|
704
708
|
<slot name="icon">
|
|
@@ -712,7 +716,7 @@ const fe="important",$e=" !"+fe,ye=ut(class extends gt{constructor(t){var e;if(s
|
|
|
712
716
|
</div>
|
|
713
717
|
<slot name="actions"></slot>
|
|
714
718
|
</div>
|
|
715
|
-
`}}we=new WeakMap,xe=new WeakMap,ke.styles=[
|
|
719
|
+
`}}we=new WeakMap,xe=new WeakMap,ke.styles=[Z`
|
|
716
720
|
:host {
|
|
717
721
|
display: block;
|
|
718
722
|
width: 100%;
|
|
@@ -782,10 +786,10 @@ const fe="important",$e=" !"+fe,ye=ut(class extends gt{constructor(t){var e;if(s
|
|
|
782
786
|
flex-grow: 1;
|
|
783
787
|
gap: ${Mt("spacing-1")};
|
|
784
788
|
}
|
|
785
|
-
`],window.customElements.define("m-banner",ke);class ze extends
|
|
789
|
+
`],window.customElements.define("m-banner",ke);class ze extends at{static get properties(){return{flagged:{type:Boolean},flagColor:{type:String,attribute:"flag-color"}}}constructor(){super(),this.flagged=!1,this.flagColor="color-background-inverted"}render(){return x`
|
|
786
790
|
<div
|
|
787
791
|
class="m-card"
|
|
788
|
-
style="${ye({"--m-card-flag-color":
|
|
792
|
+
style="${ye({"--m-card-flag-color":yt(this.flagColor)})}"
|
|
789
793
|
>
|
|
790
794
|
${this.flagged?x`<span class="m-card-flag"></span>`:z}
|
|
791
795
|
<div class="m-card-content">
|
|
@@ -795,7 +799,7 @@ const fe="important",$e=" !"+fe,ye=ut(class extends gt{constructor(t){var e;if(s
|
|
|
795
799
|
<slot name="body"></slot>
|
|
796
800
|
</div>
|
|
797
801
|
</div>
|
|
798
|
-
`}}ze.styles=[
|
|
802
|
+
`}}ze.styles=[Z`
|
|
799
803
|
:host {
|
|
800
804
|
--m-card-background-color: ${jt("color-background-primary")};
|
|
801
805
|
}
|
|
@@ -836,11 +840,11 @@ const fe="important",$e=" !"+fe,ye=ut(class extends gt{constructor(t){var e;if(s
|
|
|
836
840
|
::slotted(m-divider) {
|
|
837
841
|
--m-divider-margin-top: ${Mt("spacing-4")};
|
|
838
842
|
}
|
|
839
|
-
`],window.customElements.define("m-card",ze);class Se extends
|
|
843
|
+
`],window.customElements.define("m-card",ze);class Se extends at{static get properties(){return{slot:{type:String}}}constructor(){super(),this.slot="body"}render(){return x`
|
|
840
844
|
<div class="m-card-body">
|
|
841
845
|
<slot></slot>
|
|
842
846
|
</div>
|
|
843
|
-
`}}Se.styles=[
|
|
847
|
+
`}}Se.styles=[Z`
|
|
844
848
|
:host {
|
|
845
849
|
--m-card-body-padding-x: ${Mt("spacing-4")};
|
|
846
850
|
--m-card-body-padding-y: ${Mt("spacing-4")};
|
|
@@ -849,11 +853,11 @@ const fe="important",$e=" !"+fe,ye=ut(class extends gt{constructor(t){var e;if(s
|
|
|
849
853
|
.m-card-body {
|
|
850
854
|
padding: var(--m-card-body-padding-y) var(--m-card-body-padding-x);
|
|
851
855
|
}
|
|
852
|
-
`],window.customElements.define("m-card-body",Se);class Ce extends
|
|
856
|
+
`],window.customElements.define("m-card-body",Se);class Ce extends at{static get properties(){return{slot:{type:String}}}constructor(){super(),this.slot="subtitle"}render(){return x`
|
|
853
857
|
<div class="m-card-subtitle">
|
|
854
858
|
<slot></slot>
|
|
855
859
|
</div>
|
|
856
|
-
`}}Ce.styles=[
|
|
860
|
+
`}}Ce.styles=[Z`
|
|
857
861
|
:host {
|
|
858
862
|
--m-card-subtitle-margin-top: ${Mt("spacing-2")};
|
|
859
863
|
--m-card-subtitle-padding-x: ${Mt("spacing-4")};
|
|
@@ -868,12 +872,12 @@ const fe="important",$e=" !"+fe,ye=ut(class extends gt{constructor(t){var e;if(s
|
|
|
868
872
|
|
|
869
873
|
color: ${jt("color-text-tertiary")};
|
|
870
874
|
}
|
|
871
|
-
`],window.customElements.define("m-card-subtitle",Ce);class We extends
|
|
875
|
+
`],window.customElements.define("m-card-subtitle",Ce);class We extends at{static get properties(){return{slot:{type:String}}}constructor(){super(),this.slot="title"}render(){return x`
|
|
872
876
|
<div class="m-card-title">
|
|
873
877
|
<slot name="leading"></slot>
|
|
874
878
|
<slot></slot>
|
|
875
879
|
</div>
|
|
876
|
-
`}}We.styles=[
|
|
880
|
+
`}}We.styles=[Z`
|
|
877
881
|
:host {
|
|
878
882
|
--m-card-title-padding-x: ${Mt("spacing-4")};
|
|
879
883
|
--m-card-title-padding-top: ${Mt("spacing-4")};
|
|
@@ -894,11 +898,11 @@ const fe="important",$e=" !"+fe,ye=ut(class extends gt{constructor(t){var e;if(s
|
|
|
894
898
|
pointer-events: none;
|
|
895
899
|
margin-inline-end: ${Mt("spacing-1")};
|
|
896
900
|
}
|
|
897
|
-
`],window.customElements.define("m-card-title",We);const Me={delay:"0s",duration:"0.35s",easing:"ease-in-out"};var je,Ae,Be;class Ee extends
|
|
898
|
-
<label for="${
|
|
901
|
+
`],window.customElements.define("m-card-title",We);const Me={delay:"0s",duration:"0.35s",easing:"ease-in-out"};var je,Ae,Be;class Ee extends at{static get properties(){return{name:{type:String},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0},indeterminate:{type:Boolean,reflect:!0}}}constructor(){super(),je.add(this),Be.set(this,(t=>{const e=t.target,o=new CustomEvent("m-change",{cancelable:!1,composed:!1,bubbles:!0,detail:{checked:e.checked,indeterminate:e.indeterminate}});this.dispatchEvent(o),this.checked=e.checked,this.indeterminate=e.indeterminate})),this.name=void 0,this.disabled=!1,this.checked=!1,this.indeterminate=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","checkbox")}disconnectedCallback(){super.connectedCallback()}firstUpdated(){this.input=this.renderRoot.querySelector("input"),this.label=this.renderRoot.querySelector("label")}updated(){t(this,je,"m",Ae).call(this)}render(){return x`
|
|
902
|
+
<label for="${ct(this.id)}" class="check-input-label">
|
|
899
903
|
<input
|
|
900
|
-
id="${
|
|
901
|
-
name="${
|
|
904
|
+
id="${ct(this.id)}"
|
|
905
|
+
name="${ct(this.name)}"
|
|
902
906
|
type="checkbox"
|
|
903
907
|
class="check-input"
|
|
904
908
|
?disabled="${this.disabled}"
|
|
@@ -910,7 +914,7 @@ const fe="important",$e=" !"+fe,ye=ut(class extends gt{constructor(t){var e;if(s
|
|
|
910
914
|
<slot name="leading"></slot>
|
|
911
915
|
<slot></slot>
|
|
912
916
|
</label>
|
|
913
|
-
`}focus(t){var e;null===(e=this.input)||void 0===e||e.focus(t)}}Be=new WeakMap,je=new WeakSet,Ae=function(){this.setAttribute("aria-disabled",this.disabled.toString()),this.setAttribute("aria-checked",this.indeterminate?"mixed":this.checked.toString()),this.input.indeterminate=this.indeterminate},Ee.styles=[
|
|
917
|
+
`}focus(t){var e;null===(e=this.input)||void 0===e||e.focus(t)}}Be=new WeakMap,je=new WeakSet,Ae=function(){this.setAttribute("aria-disabled",this.disabled.toString()),this.setAttribute("aria-checked",this.indeterminate?"mixed":this.checked.toString()),this.input.indeterminate=this.indeterminate},Ee.styles=[Z`
|
|
914
918
|
${Gt.focus(".check-input-label")} {
|
|
915
919
|
border-radius: 2px;
|
|
916
920
|
outline: 1px solid ${jt("color-primary-60")};
|
|
@@ -1022,7 +1026,7 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1022
1026
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1023
1027
|
*/function Ne(){if(Re)return;const t=new class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{const e=this.pendingContextRequests.get(t.context);e&&(this.pendingContextRequests.delete(t.context),e.forEach((e=>{const o=e.element,i=e.callback;o&&o.dispatchEvent(new _e(t.context,i,!0))})))},this.onContextRequest=t=>{if(!t.subscribe)return;const e={element:t.target,callback:t.callback};let o=this.pendingContextRequests.get(t.context);o||(o=new Set,this.pendingContextRequests.set(t.context,o)),o.add(e)}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};t.attach(document.body),Re=!0}async function Pe(t,e){const o=t.getAnimations(e).map((({finished:t})=>t));await Promise.allSettled(o)}const De=Symbol("dialog");var Le,Ge,Ie,Ve,Je,He,Ze,Fe;Ne();class Ke extends ne{static get properties(){return{open:{type:Boolean,reflect:!0},size:{type:String,reflect:!0},variant:{type:String,reflect:!0}}}constructor(){super(),Le.add(this),Ge.set(this,new qe(this,De,{variant:"neutral"})),this.open=!1,this.size="small",this.variant="neutral"}render(){return x`
|
|
1024
1028
|
<dialog
|
|
1025
|
-
class="${
|
|
1029
|
+
class="${gt({"-size-small":"small"===this.size||!this.size,"-size-medium":"medium"===this.size,"-size-large":"large"===this.size,"-size-extra-large":"extra-large"===this.size})}"
|
|
1026
1030
|
@click=${t(this,Le,"m",Ze)}
|
|
1027
1031
|
@cancel=${t(this,Le,"m",Fe)}
|
|
1028
1032
|
>
|
|
@@ -1031,7 +1035,7 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1031
1035
|
<slot name="footer"></slot>
|
|
1032
1036
|
<slot name="actions"></slot>
|
|
1033
1037
|
</dialog>
|
|
1034
|
-
`}updated(e){var o;super.updated(e),e.has("variant")&&t(this,Ge,"f").setValue({variant:null!==(o=this.variant)&&void 0!==o?o:"neutral"}),e.has("open")&&t(this,Le,"m",Ve).call(this,e.get("open"))}show(){this.open=!0}hide(){this.open=!1}}Ge=new WeakMap,Le=new WeakSet,Ie=function(){var t;return null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("dialog")},Ve=async function(e){const o=t(this,Le,"a",Ie);o&&(!e&&this.open?(this.style.display="block",t(this,Le,"m",Je).call(this,"m-opening"),o.showModal(),await Pe(o),t(this,Le,"m",Je).call(this,"m-opened")):e&&!this.open?(t(this,Le,"m",Je).call(this,"m-closing"),o.classList.add("is-hiding"),await Pe(o),o.classList.remove("is-hiding"),o.close(),t(this,Le,"m",Je).call(this,"m-closed"),this.style.display="none"):null!=e||this.open||(this.style.display="none"))},Je=function(t){this.emit(t,{cancelable:!1,bubbles:!1})},He=function(){this.open&&this.emit("m-close")},Ze=function(e){var o;const i=e.target instanceof HTMLDialogElement,r=null===(o=t(this,Le,"a",Ie))||void 0===o?void 0:o.getBoundingClientRect();if(i&&r){(e.clientY<r.top||e.clientY>r.bottom||e.clientX<r.left||e.clientX>r.right)&&(e.preventDefault(),e.stopPropagation(),t(this,Le,"m",He).call(this))}},Fe=function(e){e.preventDefault(),t(this,Le,"m",He).call(this)},Ke.styles=[
|
|
1038
|
+
`}updated(e){var o;super.updated(e),e.has("variant")&&t(this,Ge,"f").setValue({variant:null!==(o=this.variant)&&void 0!==o?o:"neutral"}),e.has("open")&&t(this,Le,"m",Ve).call(this,e.get("open"))}show(){this.open=!0}hide(){this.open=!1}}Ge=new WeakMap,Le=new WeakSet,Ie=function(){var t;return null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("dialog")},Ve=async function(e){const o=t(this,Le,"a",Ie);o&&(!e&&this.open?(this.style.display="block",t(this,Le,"m",Je).call(this,"m-opening"),o.showModal(),await Pe(o),t(this,Le,"m",Je).call(this,"m-opened")):e&&!this.open?(t(this,Le,"m",Je).call(this,"m-closing"),o.classList.add("is-hiding"),await Pe(o),o.classList.remove("is-hiding"),o.close(),t(this,Le,"m",Je).call(this,"m-closed"),this.style.display="none"):null!=e||this.open||(this.style.display="none"))},Je=function(t){this.emit(t,{cancelable:!1,bubbles:!1})},He=function(){this.open&&this.emit("m-close")},Ze=function(e){var o;const i=e.target instanceof HTMLDialogElement,r=null===(o=t(this,Le,"a",Ie))||void 0===o?void 0:o.getBoundingClientRect();if(i&&r){(e.clientY<r.top||e.clientY>r.bottom||e.clientX<r.left||e.clientX>r.right)&&(e.preventDefault(),e.stopPropagation(),t(this,Le,"m",He).call(this))}},Fe=function(e){e.preventDefault(),t(this,Le,"m",He).call(this)},Ke.styles=[Z`
|
|
1035
1039
|
:host {
|
|
1036
1040
|
--margin: ${Mt("spacing-6")};
|
|
1037
1041
|
--padding: ${Mt("spacing-6")};
|
|
@@ -1124,11 +1128,11 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1124
1128
|
opacity: 0;
|
|
1125
1129
|
}
|
|
1126
1130
|
}
|
|
1127
|
-
`],window.customElements.define("m-dialog",Ke);const Xe=["small","medium","large","extra-large"],Ye=["neutral","success","warning","danger"];var Qe;class to extends Yt{constructor(){super(),Qe.set(this,(t=>{switch(t.variant){case"danger":this.variant="danger";break;case"warning":this.variant="warning";break;default:this.variant="primary"}})),this.type="button",this.variant="primary",this.context=new Te(this,De,t(this,Qe,"f"),!0)}}Qe=new WeakMap,window.customElements.define("m-dialog-action-primary",to);class eo extends Yt{constructor(){super(),this.type="button",this.variant="secondary"}}window.customElements.define("m-dialog-action-secondary",eo);class oo extends Yt{constructor(){super(),this.type="button",this.variant="tertiary"}}function io(t,e){var o;const i=e?
|
|
1131
|
+
`],window.customElements.define("m-dialog",Ke);const Xe=["small","medium","large","extra-large"],Ye=["neutral","success","warning","danger"];var Qe;class to extends Yt{constructor(){super(),Qe.set(this,(t=>{switch(t.variant){case"danger":this.variant="danger";break;case"warning":this.variant="warning";break;default:this.variant="primary"}})),this.type="button",this.variant="primary",this.context=new Te(this,De,t(this,Qe,"f"),!0)}}Qe=new WeakMap,window.customElements.define("m-dialog-action-primary",to);class eo extends Yt{constructor(){super(),this.type="button",this.variant="secondary"}}window.customElements.define("m-dialog-action-secondary",eo);class oo extends Yt{constructor(){super(),this.type="button",this.variant="tertiary"}}function io(t,e){var o;const i=e?yt(e):"";return t&&null!==(o="none"===t?"0":yt(t))&&void 0!==o?o:i}window.customElements.define("m-dialog-action-tertiary",oo);const ro={gap:"spacing-4",align:"stretch",justify:"flex-start"};class no extends at{static get properties(){return{gap:{type:String},align:{type:String},justify:{type:String}}}constructor(){super(),this.gap=ro.gap,this.align=ro.align,this.justify=ro.justify}update(t){this.style.setProperty("--m-group-gap",io(this.gap,ro.gap)),this.style.setProperty("--m-group-align",this.align||ro.align),this.style.setProperty("--m-group-justify",this.justify||ro.justify),super.update(t)}render(){return x`<slot></slot>`}}no.styles=[Z`
|
|
1128
1132
|
:host {
|
|
1129
1133
|
--m-group-gap: ${Mt(ro.gap)};
|
|
1130
|
-
--m-group-align: ${
|
|
1131
|
-
--m-group-justify: ${
|
|
1134
|
+
--m-group-align: ${H(ro.align)};
|
|
1135
|
+
--m-group-justify: ${H(ro.justify)};
|
|
1132
1136
|
|
|
1133
1137
|
display: flex;
|
|
1134
1138
|
flex-wrap: wrap;
|
|
@@ -1136,21 +1140,21 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1136
1140
|
align-items: var(--m-group-align);
|
|
1137
1141
|
justify-content: var(--m-group-justify);
|
|
1138
1142
|
}
|
|
1139
|
-
`],window.customElements.define("m-group",no);class so extends no{constructor(){super(),this.align="center",this.gap="spacing-3",this.justify="flex-end"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","actions")}}window.customElements.define("m-dialog-actions",so);class ao extends
|
|
1143
|
+
`],window.customElements.define("m-group",no);class so extends no{constructor(){super(),this.align="center",this.gap="spacing-3",this.justify="flex-end"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","actions")}}window.customElements.define("m-dialog-actions",so);class ao extends at{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","body")}render(){return x`<slot></slot>`}}ao.styles=[Z`
|
|
1140
1144
|
:host {
|
|
1141
1145
|
overflow-y: auto;
|
|
1142
1146
|
overscroll-behavior: contain;
|
|
1143
1147
|
|
|
1144
1148
|
${Dt("body-md")};
|
|
1145
1149
|
}
|
|
1146
|
-
`],window.customElements.define("m-dialog-body",ao);class lo extends me{constructor(){super(),this.size="large"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","close")}}window.customElements.define("m-dialog-close",lo);class co extends
|
|
1150
|
+
`],window.customElements.define("m-dialog-body",ao);class lo extends me{constructor(){super(),this.size="large"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","close")}}window.customElements.define("m-dialog-close",lo);class co extends at{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","footer")}render(){return x`<slot></slot>`}}window.customElements.define("m-dialog-footer",co);const ho=["center","flex-start","flex-end","stretch"],uo=["center","flex-start","flex-end","space-between","space-around","space-evenly"],go={padding:"spacing-4",borderRadius:"border-radius-s",borderWidth:"border-none",borderColor:"color-background-highlight",textAlign:"left"};class bo extends at{static get properties(){return{padding:{type:String},backgroundColor:{type:String,attribute:"background-color"},borderRadius:{type:String,attribute:"border-radius"},borderWidth:{type:String,attribute:"border-width"},borderColor:{type:String,attribute:"border-color"},textAlign:{type:String,attribute:"text-align"}}}constructor(){super(),this.padding=go.padding,this.borderRadius=go.borderRadius,this.borderWidth=go.borderWidth,this.borderColor=go.borderColor,this.textAlign=go.textAlign}update(t){var e,o,i,r;this.style.setProperty("--m-box-padding",io(this.padding,go.padding)),this.style.setProperty("--m-box-background-color",null!==(e=this.backgroundColor&&yt(this.backgroundColor))&&void 0!==e?e:"transparent"),this.style.setProperty("--m-box-border-radius",null!==(o=this.borderRadius&&yt(this.borderRadius))&&void 0!==o?o:yt(go.borderRadius)),this.style.setProperty("--m-box-border-width",null!==(i=this.borderWidth&&yt(this.borderWidth))&&void 0!==i?i:yt(go.borderWidth)),this.style.setProperty("--m-box-border-color",null!==(r=this.borderColor&&yt(this.borderColor))&&void 0!==r?r:yt(go.borderColor)),this.style.setProperty("--m-box-text-align",this.textAlign||go.textAlign),super.update(t)}render(){return x`<slot></slot>`}}bo.styles=[Z`
|
|
1147
1151
|
:host {
|
|
1148
1152
|
--m-box-padding: ${Mt(go.padding)};
|
|
1149
1153
|
--m-box-background-color: transparent;
|
|
1150
1154
|
--m-box-border-radius: ${Mt(go.borderRadius)};
|
|
1151
1155
|
--m-box-border-width: ${Mt(go.borderWidth)};
|
|
1152
1156
|
--m-box-border-color: ${jt(go.borderColor)};
|
|
1153
|
-
--m-box-text-align: ${
|
|
1157
|
+
--m-box-text-align: ${H(go.textAlign)};
|
|
1154
1158
|
|
|
1155
1159
|
box-sizing: border-box;
|
|
1156
1160
|
|
|
@@ -1162,11 +1166,11 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1162
1166
|
border-color: var(--m-box-border-color);
|
|
1163
1167
|
text-align: var(--m-box-text-align);
|
|
1164
1168
|
}
|
|
1165
|
-
`],window.customElements.define("m-box",bo);const po={gap:"spacing-4",align:"stretch",justify:"flex-start"};class mo extends
|
|
1169
|
+
`],window.customElements.define("m-box",bo);const po={gap:"spacing-4",align:"stretch",justify:"flex-start"};class mo extends at{static get properties(){return{gap:{type:String},align:{type:String},justify:{type:String}}}constructor(){super(),this.gap=po.gap,this.align=po.align,this.justify=po.justify}update(t){this.style.setProperty("--m-stack-gap",io(this.gap,po.gap)),this.style.setProperty("--m-stack-align",this.align||po.align),this.style.setProperty("--m-stack-justify",this.justify||po.justify),super.update(t)}render(){return x`<slot></slot>`}}mo.styles=[Z`
|
|
1166
1170
|
:host {
|
|
1167
1171
|
--m-stack-gap: ${Mt(po.gap)};
|
|
1168
|
-
--m-stack-align: ${
|
|
1169
|
-
--m-stack-justify: ${
|
|
1172
|
+
--m-stack-align: ${H(po.align)};
|
|
1173
|
+
--m-stack-justify: ${H(po.justify)};
|
|
1170
1174
|
|
|
1171
1175
|
display: flex;
|
|
1172
1176
|
flex-direction: column;
|
|
@@ -1175,10 +1179,10 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1175
1179
|
align-items: var(--m-stack-align);
|
|
1176
1180
|
justify-content: var(--m-stack-justify);
|
|
1177
1181
|
}
|
|
1178
|
-
`],window.customElements.define("m-stack",mo);const fo={gap:"spacing-4",minColumnWidth:
|
|
1182
|
+
`],window.customElements.define("m-stack",mo);const fo={gap:"spacing-4",minColumnWidth:vt("spacing-30")};class $o extends at{static get properties(){return{gap:{type:String},rowGap:{type:String,attribute:"row-gap"},columnGap:{type:String,attribute:"column-gap"},minColumnWidth:{type:String,attribute:"min-column-width"}}}constructor(){super(),this.gap=fo.gap,this.minColumnWidth=fo.minColumnWidth}update(t){t.has("gap")&&this.style.setProperty("--m-grid-gap",io(this.gap,fo.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-grid-row-gap",io(this.rowGap)):this.style.removeProperty("--m-grid-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-grid-column-gap",io(this.columnGap)):this.style.removeProperty("--m-grid-column-gap")),t.has("minColumnWidth")&&this.style.setProperty("--m-grid-min-column-width",this.minColumnWidth||fo.minColumnWidth),super.update(t)}render(){return x`<slot></slot>`}}$o.styles=[Z`
|
|
1179
1183
|
:host {
|
|
1180
1184
|
--m-grid-gap: ${Mt(fo.gap)};
|
|
1181
|
-
--m-grid-min-column-width: ${
|
|
1185
|
+
--m-grid-min-column-width: ${H(fo.minColumnWidth)};
|
|
1182
1186
|
|
|
1183
1187
|
display: grid;
|
|
1184
1188
|
|
|
@@ -1190,15 +1194,15 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1190
1194
|
minmax(min(var(--m-grid-min-column-width), 100%), 1fr)
|
|
1191
1195
|
);
|
|
1192
1196
|
}
|
|
1193
|
-
`],window.customElements.define("m-grid",$o);const yo={gap:"spacing-4",sideWidth:"auto",minContentWidth:"50%",reversed:!1};function vo(t){return t?"row-reverse":"row"}class wo extends
|
|
1197
|
+
`],window.customElements.define("m-grid",$o);const yo={gap:"spacing-4",sideWidth:"auto",minContentWidth:"50%",reversed:!1};function vo(t){return t?"row-reverse":"row"}class wo extends at{static get properties(){return{gap:{type:String},sideWidth:{type:String,attribute:"side-width"},minContentWidth:{type:String,attribute:"min-content-width"},reversed:{type:Boolean}}}constructor(){super(),this.gap=yo.gap,this.sideWidth=yo.sideWidth,this.minContentWidth=yo.minContentWidth,this.reversed=yo.reversed}update(t){t.has("gap")&&this.style.setProperty("--m-sidebar-gap",io(this.gap,yo.gap)),t.has("sideWidth")&&this.style.setProperty("--m-sidebar-side-width",this.sideWidth||yo.sideWidth),t.has("minContentWidth")&&this.style.setProperty("--m-sidebar-min-content-width",this.minContentWidth||yo.minContentWidth),t.has("reversed")&&this.style.setProperty("--m-sidebar-flex-direction",vo(this.reversed)),super.update(t)}render(){return x`
|
|
1194
1198
|
<slot name="sidebar"></slot>
|
|
1195
1199
|
<slot name="content"></slot>
|
|
1196
|
-
`}}wo.styles=[
|
|
1200
|
+
`}}wo.styles=[Z`
|
|
1197
1201
|
:host {
|
|
1198
1202
|
--m-sidebar-gap: ${Mt(yo.gap)};
|
|
1199
|
-
--m-sidebar-flex-direction: ${
|
|
1200
|
-
--m-sidebar-side-width: ${
|
|
1201
|
-
--m-sidebar-min-content-width: ${
|
|
1203
|
+
--m-sidebar-flex-direction: ${H(vo(yo.reversed))};
|
|
1204
|
+
--m-sidebar-side-width: ${H(yo.sideWidth)};
|
|
1205
|
+
--m-sidebar-min-content-width: ${H(yo.minContentWidth)};
|
|
1202
1206
|
|
|
1203
1207
|
display: flex;
|
|
1204
1208
|
flex-wrap: wrap;
|
|
@@ -1217,7 +1221,7 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1217
1221
|
flex-grow: 999;
|
|
1218
1222
|
min-width: var(--m-sidebar-min-content-width);
|
|
1219
1223
|
}
|
|
1220
|
-
`],window.customElements.define("m-sidebar",wo);const xo={gap:"spacing-4",threshold:"10rem"};class ko extends
|
|
1224
|
+
`],window.customElements.define("m-sidebar",wo);const xo={gap:"spacing-4",threshold:"10rem"};class ko extends at{static get properties(){return{gap:{type:String},rowGap:{type:String,attribute:"row-gap"},columnGap:{type:String,attribute:"column-gap"},threshold:{type:String},limit:{type:Number}}}constructor(){super(),this.gap=xo.gap,this.threshold=xo.threshold}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-switcher-gap",io(this.gap,xo.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-switcher-row-gap",io(this.rowGap)):this.style.removeProperty("--m-switcher-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-switcher-column-gap",io(this.columnGap)):this.style.removeProperty("--m-switcher-column-gap")),t.has("threshold")&&this.style.setProperty("--m-switcher-threshold",this.threshold||xo.threshold)}render(){const t=this.limit?x`
|
|
1221
1225
|
<style>
|
|
1222
1226
|
::slotted(*:nth-last-child(n + ${this.limit+1})) {
|
|
1223
1227
|
flex-basis: 100%;
|
|
@@ -1229,10 +1233,10 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1229
1233
|
`:"";return x`
|
|
1230
1234
|
${t}
|
|
1231
1235
|
<slot></slot>
|
|
1232
|
-
`}}var zo,So,Co;ko.styles=[
|
|
1236
|
+
`}}var zo,So,Co;ko.styles=[Z`
|
|
1233
1237
|
:host {
|
|
1234
1238
|
--m-switcher-gap: ${Mt(xo.gap)};
|
|
1235
|
-
--m-switcher-threshold: ${
|
|
1239
|
+
--m-switcher-threshold: ${H(xo.threshold)};
|
|
1236
1240
|
|
|
1237
1241
|
display: flex;
|
|
1238
1242
|
flex-wrap: wrap;
|
|
@@ -1255,14 +1259,14 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1255
1259
|
</m-group>
|
|
1256
1260
|
`}}So=new WeakMap,zo=new WeakSet,Co=function(){const{value:e}=t(this,So,"f");let o,i;switch(null==e?void 0:e.variant){case"danger":o="attention",i="color-danger-60";break;case"warning":o="alert-circle",i="color-warning-60";break;case"success":o="check",i="color-success-60";break;default:return z}return x`
|
|
1257
1261
|
<m-icon name=${o} color=${i} size="24" aria-hidden="true"></m-icon>
|
|
1258
|
-
`},Wo.styles=[
|
|
1262
|
+
`},Wo.styles=[Z`
|
|
1259
1263
|
h1 {
|
|
1260
1264
|
margin: 0;
|
|
1261
1265
|
padding: 0;
|
|
1262
1266
|
|
|
1263
1267
|
${Dt("heading-md-bold")};
|
|
1264
1268
|
}
|
|
1265
|
-
`],window.customElements.define("m-dialog-header",Wo);class Mo extends
|
|
1269
|
+
`],window.customElements.define("m-dialog-header",Wo);class Mo extends at{render(){return x` <hr class="m-divider" /> `}}Mo.styles=[Z`
|
|
1266
1270
|
.m-divider {
|
|
1267
1271
|
border: 0;
|
|
1268
1272
|
border-block-end: solid 1px ${jt("color-divider")};
|
|
@@ -1278,7 +1282,7 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1278
1282
|
`],window.customElements.define("m-divider",Mo);const jo="field";var Ao,Bo,Eo,_o,To;class Oo extends ne{static get properties(){return{status:{type:String},slot:{type:String}}}constructor(){super(),Ao.add(this),this.field=new Te(this,jo,void 0,!0),this.slot="hint"}render(){const e={"-status-default":"default"===t(this,Ao,"m",Bo).call(this),"-status-danger":"danger"===t(this,Ao,"m",Bo).call(this)};return x` <m-group
|
|
1279
1283
|
gap="spacing-0-5"
|
|
1280
1284
|
align="center"
|
|
1281
|
-
class=${
|
|
1285
|
+
class=${gt(e)}
|
|
1282
1286
|
>
|
|
1283
1287
|
<slot name="leading"
|
|
1284
1288
|
>${"danger"===t(this,Ao,"m",Bo).call(this)?x`<m-icon
|
|
@@ -1288,10 +1292,10 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1288
1292
|
></m-icon>`:z}</slot
|
|
1289
1293
|
>
|
|
1290
1294
|
<span
|
|
1291
|
-
class=${
|
|
1295
|
+
class=${gt({hint:!0,...e})}
|
|
1292
1296
|
><slot></slot>
|
|
1293
1297
|
</span>
|
|
1294
|
-
</m-group>`}}Ao=new WeakSet,Bo=function(){var t;return this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status)},Oo.styles=[[
|
|
1298
|
+
</m-group>`}}Ao=new WeakSet,Bo=function(){var t;return this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status)},Oo.styles=[[Z`
|
|
1295
1299
|
:host {
|
|
1296
1300
|
--m-field-hint-color: ${jt("color-text-tertiary")};
|
|
1297
1301
|
}
|
|
@@ -1309,10 +1313,10 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1309
1313
|
color: var(--m-field-hint-color);
|
|
1310
1314
|
}
|
|
1311
1315
|
`]],window.customElements.define("m-field-hint",Oo);class Uo extends ne{static get properties(){return{required:{type:Boolean},size:{type:String},slot:{type:String}}}constructor(){super(),Eo.add(this),this.field=new Te(this,jo,void 0,!0),this.slot="hint"}render(){return x`<label
|
|
1312
|
-
class=${
|
|
1316
|
+
class=${gt({label:!0,"-size-default":"default"===t(this,Eo,"m",_o).call(this),"-size-small":"small"===t(this,Eo,"m",_o).call(this)})}
|
|
1313
1317
|
><slot></slot>
|
|
1314
1318
|
${t(this,Eo,"m",To).call(this)?x`<span class="required">*</span>`:z}
|
|
1315
|
-
</label>`}}Eo=new WeakSet,_o=function(){var t;return this.size||(null===(t=this.field.value)||void 0===t?void 0:t.size)},To=function(){var t;return null!=this.required?this.required:Boolean(null===(t=this.field.value)||void 0===t?void 0:t.required)},Uo.styles=[[
|
|
1319
|
+
</label>`}}Eo=new WeakSet,_o=function(){var t;return this.size||(null===(t=this.field.value)||void 0===t?void 0:t.size)},To=function(){var t;return null!=this.required?this.required:Boolean(null===(t=this.field.value)||void 0===t?void 0:t.required)},Uo.styles=[[Z`
|
|
1316
1320
|
:host {
|
|
1317
1321
|
display: flex;
|
|
1318
1322
|
align-items: center;
|
|
@@ -1353,14 +1357,14 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1353
1357
|
<slot></slot>
|
|
1354
1358
|
|
|
1355
1359
|
${this.hint?x`<m-field-hint>${this.hint}</m-field-hint>`:x`<slot name="hint"></slot>`}
|
|
1356
|
-
</m-stack>`}}window.customElements.define("m-field",qo);const Ro=["default","danger"];var No,Po,Do;class Lo extends
|
|
1360
|
+
</m-stack>`}}window.customElements.define("m-field",qo);const Ro=["default","danger"];var No,Po,Do;class Lo extends at{static get properties(){return{variant:{type:String,reflect:!0},value:{type:Number,reflect:!0},max:{type:Number,reflect:!0}}}constructor(){super(),No.add(this),this.variant="default",this.value=0,this.max=100}connectedCallback(){super.connectedCallback(),this.setAttribute("role","progressbar"),this.setAttribute("aria-valuemin","0")}updated(){this.setAttribute("aria-valuenow",String(this.value)),this.setAttribute("aria-valuemax",String(this.max))}get percentage(){return 100*t(this,No,"a",Do)/t(this,No,"a",Po)}get currentVariant(){return this.variant}render(){return x`
|
|
1357
1361
|
<div class="bar">
|
|
1358
1362
|
<span
|
|
1359
|
-
class=${
|
|
1363
|
+
class=${gt({progress:!0,"-default":"default"===this.currentVariant,"-success":"success"===this.currentVariant,"-warning":"warning"===this.currentVariant,"-danger":"danger"===this.currentVariant})}
|
|
1360
1364
|
style=${ye({width:`${this.percentage}%`})}
|
|
1361
1365
|
></span>
|
|
1362
1366
|
</div>
|
|
1363
|
-
`}}No=new WeakSet,Po=function(){return this.max<=0?100:this.max},Do=function(){return e=this.value,o=0,i=t(this,No,"a",Po),Math.min(Math.max(o,e),i);var e,o,i},Lo.styles=[
|
|
1367
|
+
`}}No=new WeakSet,Po=function(){return this.max<=0?100:this.max},Do=function(){return e=this.value,o=0,i=t(this,No,"a",Po),Math.min(Math.max(o,e),i);var e,o,i},Lo.styles=[Z`
|
|
1364
1368
|
.bar {
|
|
1365
1369
|
display: flex;
|
|
1366
1370
|
flex-grow: 0;
|
|
@@ -1411,7 +1415,7 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1411
1415
|
.-danger {
|
|
1412
1416
|
--m-progress-bar-progress-background: ${jt("color-danger-60")};
|
|
1413
1417
|
}
|
|
1414
|
-
`],window.customElements.define("m-progress-bar",Lo);class Go extends Lo{get currentVariant(){return this.percentage>=66?"success":this.percentage>=33?"warning":"danger"}}window.customElements.define("m-progress-bar-countdown",Go);const Io="m-check";var Vo,Jo,Ho,Zo,Fo;class Ko extends
|
|
1418
|
+
`],window.customElements.define("m-progress-bar",Lo);class Go extends Lo{get currentVariant(){return this.percentage>=66?"success":this.percentage>=33?"warning":"danger"}}window.customElements.define("m-progress-bar-countdown",Go);const Io="m-check";var Vo,Jo,Ho,Zo,Fo;class Ko extends at{static get properties(){return{value:{type:String},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0}}}constructor(){super(),Vo.add(this),Ho.set(this,(t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();const e={detail:{value:this.value,type:"select"},bubbles:!0,composed:!1};this.dispatchEvent(new CustomEvent(Io,e))})),Zo.set(this,(()=>{this.setAttribute("aria-disabled",String(this.disabled))})),Fo.set(this,(()=>{this.setAttribute("aria-checked",String(this.checked))})),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio"),this.addEventListener("click",t(this,Ho,"f"))}updated(e){super.updated(e),e.has("disabled")&&t(this,Zo,"f").call(this),e.has("checked")&&t(this,Fo,"f").call(this)}render(){return x`
|
|
1415
1419
|
<button
|
|
1416
1420
|
type="button"
|
|
1417
1421
|
class="radio-button"
|
|
@@ -1423,7 +1427,7 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1423
1427
|
<slot name="leading"></slot>
|
|
1424
1428
|
<slot></slot>
|
|
1425
1429
|
</button>
|
|
1426
|
-
`}focus(e){var o;null===(o=t(this,Vo,"a",Jo))||void 0===o||o.focus(e)}}Ho=new WeakMap,Zo=new WeakMap,Fo=new WeakMap,Vo=new WeakSet,Jo=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("button"))&&void 0!==e?e:null},Ko.styles=[
|
|
1430
|
+
`}focus(e){var o;null===(o=t(this,Vo,"a",Jo))||void 0===o||o.focus(e)}}Ho=new WeakMap,Zo=new WeakMap,Fo=new WeakMap,Vo=new WeakSet,Jo=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("button"))&&void 0!==e?e:null},Ko.styles=[Z`
|
|
1427
1431
|
:host {
|
|
1428
1432
|
--m-radio-border-color: ${jt("color-border")};
|
|
1429
1433
|
--m-radio-dot-check-color: ${jt("color-primary-60")};
|
|
@@ -1526,13 +1530,13 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1526
1530
|
${Lt(".radio-button","*")} {
|
|
1527
1531
|
pointer-event: none;
|
|
1528
1532
|
}
|
|
1529
|
-
`],window.customElements.define("m-radio",Ko);var Xo,Yo={};Object.defineProperty(Yo,"i",{value:!0});var Qo=At;const ti=(t,e)=>{const o=Qo.toArray(t);if(0===o.length)return e;const i=new Set;return i.add(String(o.at(-1))),i},ei=(t,e)=>{const o=Qo.toArray(t);if(0===o.length)return e;const i=new Set(e);for(const t of o)i.add(String(t));return i},oi={type:"single",init:t=>ti(t,new Set),select:ti,unselect(t,e){const o=Qo.toArray(t);if(0===o.length||0===e.size)return e;const i=new Set(e);for(const t of o)i.delete(String(t));return i},toggle(t,e){const o=Qo.toArray(t);if(0===o.length)return e;const i=new Set;for(const t of o){const o=String(t);e.has(o)||(i.clear(),i.add(o))}return i},reset:t=>null==t?new Set:t,value(t){if(null==t||0===t.size)return null;const[e]=Array.from(t);return e}},ii={type:"single-strict",init:t=>ti(t,new Set),select:ti,unselect(t,e){const o=Qo.toArray(t);if(0===o.length||0===e.size)return e;const i=new Set(e);for(let t=0;t<o.length&&e.size>1;t++)i.delete(String(o[t]));return i},toggle(t,e){const o=Qo.toArray(t);if(0===o.length)return e;const i=new Set(e);for(const t of o){const o=String(t);e.has(o)||(i.clear(),i.add(o))}return i},reset:t=>null==t?new Set:t,value(t){if(null==t||0===t.size)return null;const[e]=Array.from(t);return e}},ri={type:"multiple",init:t=>ei(t,new Set),select:ei,unselect(t,e){const o=Qo.toArray(t);if(0===o.length||0===e.size)return e;const i=new Set(e);for(const t of o)i.delete(String(t));return i},toggle(t,e){const o=Qo.toArray(t);if(0===o.length)return e;const i=new Set(e);for(const t of o){const o=String(t);e.has(o)?i.delete(o):i.add(o)}return i},reset:t=>null==t?new Set:t,value:t=>null==t||0===t.size?null:Array.from(t)};var ni,si,ai,li,ci,di,hi,ui,gi,bi,pi,mi,fi,$i;Yo.SELECTION_TYPES=["single","single-strict","multiple"],Xo=Yo.default=function(t){const{type:e="multiple"}=t;return"single"===e?oi:"single-strict"===e?ii:ri};class yi{constructor(e,o,i){ni.add(this),this.disabled=!1,this.event="m-select",si.set(this,(t=>{if(this.disabled)return;if(null==this.type)return void console.warn("[SelectionController] Did you forget to set the selection type?");const{detail:{type:e,value:o}}=t;switch(e){case"select":this.select(Bt(o));break;case"unselect":this.unselect(Bt(o));break;case"toggle":this.toggle(Bt(o))}})),this.init=t=>{this.host.selection=this.strategy.init(t)},this.select=e=>{this.host.selection=this.strategy.select(e,this.host.selection),t(this,ni,"m",ai).call(this)},this.unselect=e=>{this.host.selection=this.strategy.unselect(e,this.host.selection),t(this,ni,"m",ai).call(this)},this.toggle=e=>{this.host.selection=this.strategy.toggle(e,this.host.selection),t(this,ni,"m",ai).call(this)},this.subscribe=()=>{this.host.addEventListener(this.event,t(this,si,"f"))},this.unsubscribe=()=>{this.host.removeEventListener(this.event,t(this,si,"f"))},this.host=e,this.type=o,this.event=i,this.strategy=Xo({type:o}),this.host.addController(this)}hostConnected(){this.subscribe()}hostDisconnected(){this.unsubscribe()}hostUpdate(){null!=this.host.type&&this.host.type!==this.type&&(this.unsubscribe(),this.host.removeController(this))}}si=new WeakMap,ni=new WeakSet,ai=function(){const t={detail:{type:this.type,value:this.strategy.value(this.host.selection)},bubbles:!0,composed:!1};this.host.dispatchEvent(new CustomEvent("m-change",t))};class vi extends
|
|
1533
|
+
`],window.customElements.define("m-radio",Ko);var Xo,Yo={};Object.defineProperty(Yo,"i",{value:!0});var Qo=At;const ti=(t,e)=>{const o=Qo.toArray(t);if(0===o.length)return e;const i=new Set;return i.add(String(o.at(-1))),i},ei=(t,e)=>{const o=Qo.toArray(t);if(0===o.length)return e;const i=new Set(e);for(const t of o)i.add(String(t));return i},oi={type:"single",init:t=>ti(t,new Set),select:ti,unselect(t,e){const o=Qo.toArray(t);if(0===o.length||0===e.size)return e;const i=new Set(e);for(const t of o)i.delete(String(t));return i},toggle(t,e){const o=Qo.toArray(t);if(0===o.length)return e;const i=new Set;for(const t of o){const o=String(t);e.has(o)||(i.clear(),i.add(o))}return i},reset:t=>null==t?new Set:t,value(t){if(null==t||0===t.size)return null;const[e]=Array.from(t);return e}},ii={type:"single-strict",init:t=>ti(t,new Set),select:ti,unselect(t,e){const o=Qo.toArray(t);if(0===o.length||0===e.size)return e;const i=new Set(e);for(let t=0;t<o.length&&e.size>1;t++)i.delete(String(o[t]));return i},toggle(t,e){const o=Qo.toArray(t);if(0===o.length)return e;const i=new Set(e);for(const t of o){const o=String(t);e.has(o)||(i.clear(),i.add(o))}return i},reset:t=>null==t?new Set:t,value(t){if(null==t||0===t.size)return null;const[e]=Array.from(t);return e}},ri={type:"multiple",init:t=>ei(t,new Set),select:ei,unselect(t,e){const o=Qo.toArray(t);if(0===o.length||0===e.size)return e;const i=new Set(e);for(const t of o)i.delete(String(t));return i},toggle(t,e){const o=Qo.toArray(t);if(0===o.length)return e;const i=new Set(e);for(const t of o){const o=String(t);e.has(o)?i.delete(o):i.add(o)}return i},reset:t=>null==t?new Set:t,value:t=>null==t||0===t.size?null:Array.from(t)};var ni,si,ai,li,ci,di,hi,ui,gi,bi,pi,mi,fi,$i;Yo.SELECTION_TYPES=["single","single-strict","multiple"],Xo=Yo.default=function(t){const{type:e="multiple"}=t;return"single"===e?oi:"single-strict"===e?ii:ri};class yi{constructor(e,o,i){ni.add(this),this.disabled=!1,this.event="m-select",si.set(this,(t=>{if(this.disabled)return;if(null==this.type)return void console.warn("[SelectionController] Did you forget to set the selection type?");const{detail:{type:e,value:o}}=t;switch(e){case"select":this.select(Bt(o));break;case"unselect":this.unselect(Bt(o));break;case"toggle":this.toggle(Bt(o))}})),this.init=t=>{this.host.selection=this.strategy.init(t)},this.select=e=>{this.host.selection=this.strategy.select(e,this.host.selection),t(this,ni,"m",ai).call(this)},this.unselect=e=>{this.host.selection=this.strategy.unselect(e,this.host.selection),t(this,ni,"m",ai).call(this)},this.toggle=e=>{this.host.selection=this.strategy.toggle(e,this.host.selection),t(this,ni,"m",ai).call(this)},this.subscribe=()=>{this.host.addEventListener(this.event,t(this,si,"f"))},this.unsubscribe=()=>{this.host.removeEventListener(this.event,t(this,si,"f"))},this.host=e,this.type=o,this.event=i,this.strategy=Xo({type:o}),this.host.addController(this)}hostConnected(){this.subscribe()}hostDisconnected(){this.unsubscribe()}hostUpdate(){null!=this.host.type&&this.host.type!==this.type&&(this.unsubscribe(),this.host.removeController(this))}}si=new WeakMap,ni=new WeakSet,ai=function(){const t={detail:{type:this.type,value:this.strategy.value(this.host.selection)},bubbles:!0,composed:!1};this.host.dispatchEvent(new CustomEvent("m-change",t))};class vi extends at{static get properties(){return{value:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},selection:{state:!0},orientation:{type:String}}}constructor(){super(),li.set(this,null),ci.set(this,null),di.set(this,(()=>{var e;return null===(e=t(this,hi,"f").call(this)[0])||void 0===e?void 0:e.value})),hi.set(this,(()=>{var o,i,r;e(this,ci,null!==(o=t(this,ci,"f"))&&void 0!==o?o:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(r=null===(i=t(this,ci,"f"))||void 0===i?void 0:i.assignedElements({flatten:!0}))&&void 0!==r?r:[]].filter((t=>"m-radio"===t.tagName.toLowerCase()))})),ui.set(this,(t=>{t.checked=this.selection.has(t.value)})),gi.set(this,(t=>{t.disabled=this.disabled})),this.disabled=!1,this.selection=new Set,this.value="",this.orientation="vertical",this.type="single-strict"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio-group"),e(this,li,new yi(this,this.type,Io),"f")}update(e){super.update(e),e.has("value")&&t(this,li,"f")&&t(this,li,"f").init(Bt(this.value||t(this,di,"f").call(this))),e.has("selection")&&([this.value]=this.selection)}updated(e){super.updated(e),e.has("selection")&&t(this,hi,"f").call(this).forEach((e=>{t(this,ui,"f").call(this,e)})),e.has("disabled")&&t(this,hi,"f").call(this).forEach((e=>{t(this,gi,"f").call(this,e)}))}render(){return x`
|
|
1530
1534
|
<div
|
|
1531
|
-
class=${
|
|
1535
|
+
class=${gt({"radio-group":!0,"-vertical":"vertical"===this.orientation,"-horizontal":"horizontal"===this.orientation})}
|
|
1532
1536
|
>
|
|
1533
1537
|
<slot></slot>
|
|
1534
1538
|
</div>
|
|
1535
|
-
`}}li=new WeakMap,ci=new WeakMap,di=new WeakMap,hi=new WeakMap,ui=new WeakMap,gi=new WeakMap,vi.styles=[
|
|
1539
|
+
`}}li=new WeakMap,ci=new WeakMap,di=new WeakMap,hi=new WeakMap,ui=new WeakMap,gi=new WeakMap,vi.styles=[Z`
|
|
1536
1540
|
.radio-group {
|
|
1537
1541
|
display: flex;
|
|
1538
1542
|
gap: ${Mt("spacing-2")};
|
|
@@ -1543,14 +1547,14 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1543
1547
|
.radio-group.-horizontal {
|
|
1544
1548
|
flex-direction: row;
|
|
1545
1549
|
}
|
|
1546
|
-
`],window.customElements.define("m-radio-group",vi);class wi extends
|
|
1550
|
+
`],window.customElements.define("m-radio-group",vi);class wi extends at{static get properties(){return{variant:{type:String},size:{type:String},isSkeleton:{type:Boolean,attribute:"is-skeleton"}}}constructor(){super(),this.variant="neutral",this.size="default",this.isSkeleton=!1}render(){return x`
|
|
1547
1551
|
<span
|
|
1548
|
-
class=${
|
|
1552
|
+
class=${gt({tag:!0,"-success":"success"===this.variant,"-neutral":"neutral"===this.variant,"-warning":"warning"===this.variant,"-danger":"danger"===this.variant,"-is-skeleton":this.isSkeleton,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size})}
|
|
1549
1553
|
>
|
|
1550
1554
|
${this.isSkeleton?x``:x`<slot name="leading"></slot>`}
|
|
1551
1555
|
<slot></slot>
|
|
1552
1556
|
</span>
|
|
1553
|
-
`}}wi.styles=[[
|
|
1557
|
+
`}}wi.styles=[[Z`
|
|
1554
1558
|
@keyframes skeleton-loading {
|
|
1555
1559
|
0% {
|
|
1556
1560
|
background-color: ${jt("color-background-tertiary")};
|
|
@@ -1564,7 +1568,7 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1564
1568
|
background-color: ${jt("color-background-tertiary")};
|
|
1565
1569
|
}
|
|
1566
1570
|
}
|
|
1567
|
-
`,
|
|
1571
|
+
`,Z`
|
|
1568
1572
|
:host {
|
|
1569
1573
|
--m-tag-skeleton-width: 100px;
|
|
1570
1574
|
}
|
|
@@ -1619,17 +1623,17 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1619
1623
|
}
|
|
1620
1624
|
|
|
1621
1625
|
.-is-skeleton {
|
|
1622
|
-
${
|
|
1626
|
+
${H("animation: skeleton-loading 1s linear infinite alternate;")};
|
|
1623
1627
|
width: var(--m-tag-skeleton-width);
|
|
1624
1628
|
}
|
|
1625
1629
|
`]],window.customElements.define("m-tag",wi);class xi extends ne{static get properties(){return{clearable:{type:Boolean},disabled:{type:Boolean,reflect:!0},max:{type:String},maxLength:{type:Number,reflect:!0,attribute:"max-length"},min:{type:String},minLength:{type:Number,reflect:!0,attribute:"min-length"},pattern:{type:String},placeholder:{type:String},readOnly:{type:Boolean,reflect:!0,attribute:"read-only"},size:{type:String},status:{type:String},step:{type:String},type:{type:String},value:{type:String}}}constructor(){super(),bi.add(this),this.inputElement=null,this.field=new Te(this,jo,void 0,!0),fi.set(this,(t=>{this.value=t.target.value,this.reemit(t)})),$i.set(this,(t=>{t.stopPropagation(),this.clear()})),this.clearable=!1,this.disabled=!1,this.placeholder=void 0,this.size="default",this.type="text",this.value=void 0,this.max=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","textbox")}render(){return x`
|
|
1626
1630
|
<div
|
|
1627
|
-
class=${
|
|
1631
|
+
class=${gt({container:!0,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size,"is-disabled":Boolean(this.disabled),"-status-default":"default"===t(this,bi,"m",mi).call(this),"-status-danger":"danger"===t(this,bi,"m",mi).call(this)})}
|
|
1628
1632
|
>
|
|
1629
1633
|
<slot name="leading"></slot>
|
|
1630
1634
|
<input
|
|
1631
|
-
id="${
|
|
1632
|
-
type="${
|
|
1635
|
+
id="${ct(this.id)}"
|
|
1636
|
+
type="${ct(this.type)}"
|
|
1633
1637
|
class="text-field"
|
|
1634
1638
|
aria-disabled=${this.disabled?"true":"false"}
|
|
1635
1639
|
?disabled="${this.disabled}"
|
|
@@ -1638,22 +1642,22 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1638
1642
|
maxlength=${null!=this.maxLength&&this.maxLength>-1?this.maxLength:z}
|
|
1639
1643
|
min=${this.min||z}
|
|
1640
1644
|
minlength=${null!=this.minLength&&this.minLength>-1?this.minLength:z}
|
|
1641
|
-
pattern=${
|
|
1642
|
-
placeholder="${
|
|
1645
|
+
pattern=${ct(this.pattern)}
|
|
1646
|
+
placeholder="${ct(this.placeholder)}"
|
|
1643
1647
|
step=${this.step||z}
|
|
1644
|
-
value="${
|
|
1648
|
+
value="${ct(this.value)}"
|
|
1645
1649
|
@change=${this.reemit}
|
|
1646
1650
|
@input=${t(this,fi,"f")}
|
|
1647
1651
|
/>
|
|
1648
1652
|
${this.clearable?x`<m-close-button
|
|
1649
|
-
class=${
|
|
1650
|
-
controls="${
|
|
1653
|
+
class=${gt({clear:!0,"is-visible":t(this,bi,"m",pi).call(this)})}
|
|
1654
|
+
controls="${ct(this.id)}"
|
|
1651
1655
|
@m-close=${t(this,$i,"f")}
|
|
1652
1656
|
label="Clear input"
|
|
1653
1657
|
></m-close-button>`:z}
|
|
1654
1658
|
<slot name="trailing"></slot>
|
|
1655
1659
|
</div>
|
|
1656
|
-
`}get input(){var t,e;return null==this.inputElement&&(this.inputElement=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("input"))&&void 0!==e?e:null),this.inputElement}clear(){this.value="",this.input&&(this.input.value=""),this.emit("m-clear"),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}fi=new WeakMap,$i=new WeakMap,bi=new WeakSet,pi=function(){const t=this.value||"";return!this.disabled&&t.length>0},mi=function(){var t;return this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status)},xi.styles=[
|
|
1660
|
+
`}get input(){var t,e;return null==this.inputElement&&(this.inputElement=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("input"))&&void 0!==e?e:null),this.inputElement}clear(){this.value="",this.input&&(this.input.value=""),this.emit("m-clear"),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}fi=new WeakMap,$i=new WeakMap,bi=new WeakSet,pi=function(){const t=this.value||"";return!this.disabled&&t.length>0},mi=function(){var t;return this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status)},xi.styles=[Z`
|
|
1657
1661
|
:host {
|
|
1658
1662
|
--m-text-field-background-color: transparent;
|
|
1659
1663
|
--m-text-field-border-color: ${jt("color-border")};
|
|
@@ -1768,14 +1772,14 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1768
1772
|
.clear.is-visible {
|
|
1769
1773
|
visibility: visible;
|
|
1770
1774
|
}
|
|
1771
|
-
`],window.customElements.define("m-text-field",xi);const ki="m-toggle";var zi,Si,Ci,Wi,Mi,ji,Ai,Bi,Ei,_i,Ti;class Oi extends
|
|
1775
|
+
`],window.customElements.define("m-text-field",xi);const ki="m-toggle";var zi,Si,Ci,Wi,Mi,ji,Ai,Bi,Ei,_i,Ti;class Oi extends at{static get properties(){return{disabled:{type:Boolean},role:{type:String,reflect:!0},showCheck:{type:Boolean,attribute:"show-check"},size:{type:String},type:{type:String},value:{},selection:{state:!0}}}constructor(){super(),zi.set(this,null),Si.set(this,null),Ci.set(this,(()=>{var o,i,r;e(this,Si,null!==(o=t(this,Si,"f"))&&void 0!==o?o:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(r=null===(i=t(this,Si,"f"))||void 0===i?void 0:i.assignedElements({flatten:!0}))&&void 0!==r?r:[]].filter((t=>"m-toggle"===t.tagName.toLowerCase()))})),Wi.set(this,(t=>{t.setAttribute("role",["single","single-strict"].includes(this.type)?"radio":"checkbox")})),Mi.set(this,(t=>{t.checked=this.selection.has(t.value)})),ji.set(this,(t=>{t.disabled=this.disabled})),this.showCheck=!1,this.size="default",this.type="single",this.selection=new Set}update(o){super.update(o),(null!=o.get("type")&&null!=this.type||null==t(this,zi,"f"))&&(e(this,zi,new yi(this,this.type,ki),"f"),t(this,zi,"f").init(Bt(this.value)),this.role=["single","single-strict"].includes(this.type)?"radiogroup":"group"),o.has("value")&&t(this,zi,"f").init(Bt(this.value))}updated(e){super.updated(e),e.has("selection")&&t(this,Ci,"f").call(this).forEach((e=>{t(this,Mi,"f").call(this,e)})),e.has("disabled")&&t(this,Ci,"f").call(this).forEach((e=>{t(this,ji,"f").call(this,e)})),e.has("role")&&t(this,Ci,"f").call(this).forEach((e=>{t(this,Wi,"f").call(this,e)}))}render(){return x`
|
|
1772
1776
|
<m-group
|
|
1773
|
-
class=${
|
|
1777
|
+
class=${gt({"toggle-group":!0,"-single":"single"===this.type,"-single-strict":"single-strict"===this.type,"-multiple":"multiple"===this.type,"-small":"small"===this.size,"-show-check":this.showCheck})}
|
|
1774
1778
|
gap="spacing-1"
|
|
1775
1779
|
>
|
|
1776
1780
|
<slot></slot>
|
|
1777
1781
|
</m-group>
|
|
1778
|
-
`}}zi=new WeakMap,Si=new WeakMap,Ci=new WeakMap,Wi=new WeakMap,Mi=new WeakMap,ji=new WeakMap,Oi.styles=[[
|
|
1782
|
+
`}}zi=new WeakMap,Si=new WeakMap,Ci=new WeakMap,Wi=new WeakMap,Mi=new WeakMap,ji=new WeakMap,Oi.styles=[[Z`
|
|
1779
1783
|
.toggle-group {
|
|
1780
1784
|
inline-size: max-content;
|
|
1781
1785
|
|
|
@@ -1801,10 +1805,10 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1801
1805
|
.toggle-group.-show-check ::slotted(m-toggle[aria-checked='true']) {
|
|
1802
1806
|
--m-toggle-icon-display: inline-flex;
|
|
1803
1807
|
}
|
|
1804
|
-
`]],window.customElements.define("m-toggle-group",Oi);class Ui extends
|
|
1808
|
+
`]],window.customElements.define("m-toggle-group",Oi);class Ui extends at{static get properties(){return{checked:{type:Boolean},disabled:{type:Boolean,reflect:!0},role:{type:String,reflect:!0},value:{type:String}}}constructor(){super(),Ai.add(this),Ei.set(this,(()=>{if(this.disabled)return;this.checked=!this.checked;const t={detail:{value:this.value,type:"toggle"},bubbles:!0,composed:!1};this.dispatchEvent(new CustomEvent(ki,t))})),_i.set(this,(()=>{this.setAttribute("aria-disabled",String(this.disabled))})),Ti.set(this,(()=>{this.setAttribute("aria-checked",String(this.checked))})),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t(this,Ei,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,Ei,"f"))}updated(e){super.updated(e),e.has("disabled")&&t(this,_i,"f").call(this),e.has("checked")&&t(this,Ti,"f").call(this)}render(){return x`
|
|
1805
1809
|
<button
|
|
1806
1810
|
type="button"
|
|
1807
|
-
class=${
|
|
1811
|
+
class=${gt({button:!0,toggle:!0})}
|
|
1808
1812
|
role="${this.role}"
|
|
1809
1813
|
aria-checked="${this.checked}"
|
|
1810
1814
|
?disabled="${this.disabled}"
|
|
@@ -1815,7 +1819,7 @@ let Te=class{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,
|
|
|
1815
1819
|
|
|
1816
1820
|
<slot></slot>
|
|
1817
1821
|
</button>
|
|
1818
|
-
`}focus(e){var o;null===(o=t(this,Ai,"a",Bi))||void 0===o||o.focus(e)}}Ei=new WeakMap,_i=new WeakMap,Ti=new WeakMap,Ai=new WeakSet,Bi=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("button"))&&void 0!==e?e:null},Ui.styles=[[It(),
|
|
1822
|
+
`}focus(e){var o;null===(o=t(this,Ai,"a",Bi))||void 0===o||o.focus(e)}}Ei=new WeakMap,_i=new WeakMap,Ti=new WeakMap,Ai=new WeakSet,Bi=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("button"))&&void 0!==e?e:null},Ui.styles=[[It(),Z`
|
|
1819
1823
|
:host {
|
|
1820
1824
|
/*
|
|
1821
1825
|
* These custom properties are here because they are meant to be
|