@loadsmart/miranda-wc 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, type PropertyValues } from 'lit';
|
|
2
2
|
export declare type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'warning' | 'danger' | 'icon' | 'icon-secondary';
|
|
3
3
|
export declare type ButtonSize = 'small' | 'default' | 'large';
|
|
4
4
|
export declare type ButtonType = 'button' | 'reset' | 'submit';
|
|
@@ -6,9 +6,8 @@ export interface ButtonProps {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
loading?: boolean;
|
|
8
8
|
size?: ButtonSize;
|
|
9
|
-
type
|
|
10
|
-
variant
|
|
11
|
-
click?: (e: MouseEvent) => void;
|
|
9
|
+
type: ButtonType;
|
|
10
|
+
variant: ButtonVariant;
|
|
12
11
|
}
|
|
13
12
|
export declare class Button extends LitElement {
|
|
14
13
|
static styles: import("lit").CSSResult[][];
|
|
@@ -52,8 +51,10 @@ export declare class Button extends LitElement {
|
|
|
52
51
|
type: ButtonType;
|
|
53
52
|
constructor();
|
|
54
53
|
connectedCallback(): void;
|
|
54
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
55
55
|
render(): import("lit").TemplateResult<1>;
|
|
56
56
|
_isDisabled(): boolean;
|
|
57
|
+
_setDisabled(): void;
|
|
57
58
|
}
|
|
58
59
|
declare global {
|
|
59
60
|
interface HTMLElementTagNameMap {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAKrE,oBAAY,aAAa,GACtB,SAAS,GACT,WAAW,GACX,UAAU,GACV,SAAS,GACT,QAAQ,GACR,MAAM,GACN,gBAAgB,CAAC;AAEpB,oBAAY,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAEvD,oBAAY,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEvD,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;CACvB;AAED,qBAAa,MAAO,SAAQ,UAAU;IACrC,OAAgB,MAAM,8BAAgB;IAEtC,WAAoB,UAAU;;;;;;;;;;;;;;;;;MAQ7B;IAED;;OAEG;IACK,OAAO,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACK,QAAQ,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACK,OAAO,EAAE,aAAa,CAAC;IAE/B;;OAEG;IACK,IAAI,EAAE,UAAU,CAAC;IAEzB;;OAEG;IACK,IAAI,EAAE,UAAU,CAAC;;IAYhB,iBAAiB,IAAI,IAAI;cAMf,OAAO,CACzB,iBAAiB,EAAE,cAAc,CAAE,IAAI,CAAE,GACvC,IAAI;IAWE,MAAM;IAmCf,WAAW;IAIX,YAAY;CAKZ;AAID,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,UAAU,EAAE,MAAM,CAAC;KACnB;CACD"}
|
package/dist/index.js
CHANGED
|
@@ -14,13 +14,13 @@ const t=window,o=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"
|
|
|
14
14
|
* Copyright 2017 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
|
-
var f;p.finalized=!0,p.elementProperties=new Map,p.elementStyles=[],p.shadowRootOptions={mode:"open"},null==h||h({ReactiveElement:p}),(null!==(a=d.reactiveElementVersions)&&void 0!==a?a:d.reactiveElementVersions=[]).push("1.4.1");const v=window,$=v.trustedTypes,y=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,x=`lit$${(Math.random()+"").slice(9)}$`,w="?"+x,k=`<${w}>`,S=document,z=(t="")=>S.createComment(t),
|
|
17
|
+
var f;p.finalized=!0,p.elementProperties=new Map,p.elementStyles=[],p.shadowRootOptions={mode:"open"},null==h||h({ReactiveElement:p}),(null!==(a=d.reactiveElementVersions)&&void 0!==a?a:d.reactiveElementVersions=[]).push("1.4.1");const v=window,$=v.trustedTypes,y=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,x=`lit$${(Math.random()+"").slice(9)}$`,w="?"+x,k=`<${w}>`,S=document,z=(t="")=>S.createComment(t),_=t=>null===t||"object"!=typeof t&&"function"!=typeof t,A=Array.isArray,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,E=/>/g,M=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),T=/'/g,O=/"/g,U=/^(?:script|style|textarea|title)$/i,N=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),W=new WeakMap,B=S.createTreeWalker(S,129,null,!1);class L{constructor({strings:t,_$litType$:o},i){let n;this.parts=[];let e=0,r=0;const s=t.length-1,l=this.parts,[a,d]=((t,o)=>{const i=t.length-1,n=[];let e,r=2===o?"<svg>":"",s=C;for(let o=0;o<i;o++){const i=t[o];let l,a,d=-1,c=0;for(;c<i.length&&(s.lastIndex=c,a=s.exec(i),null!==a);)c=s.lastIndex,s===C?"!--"===a[1]?s=j:void 0!==a[1]?s=E:void 0!==a[2]?(U.test(a[2])&&(e=RegExp("</"+a[2],"g")),s=M):void 0!==a[3]&&(s=M):s===M?">"===a[0]?(s=null!=e?e:C,d=-1):void 0===a[1]?d=-2:(d=s.lastIndex-a[2].length,l=a[1],s=void 0===a[3]?M:'"'===a[3]?O:T):s===O||s===T?s=M:s===j||s===E?s=C:(s=M,e=void 0);const u=s===M&&t[o+1].startsWith("/>")?" ":"";r+=s===C?i+k:d>=0?(n.push(l),i.slice(0,d)+"$lit$"+i.slice(d)+x+u):i+x+(-2===d?(n.push(void 0),o):u)}const l=r+(t[i]||"<?>")+(2===o?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==y?y.createHTML(l):l,n]})(t,o);if(this.el=L.createElement(a,i),B.currentNode=this.el.content,2===o){const t=this.el.content,o=t.firstChild;o.remove(),t.append(...o.childNodes)}for(;null!==(n=B.nextNode())&&l.length<s;){if(1===n.nodeType){if(n.hasAttributes()){const t=[];for(const o of n.getAttributeNames())if(o.endsWith("$lit$")||o.startsWith(x)){const i=d[r++];if(t.push(o),void 0!==i){const t=n.getAttribute(i.toLowerCase()+"$lit$").split(x),o=/([.?@])?(.*)/.exec(i);l.push({type:1,index:e,name:o[2],strings:t,ctor:"."===o[1]?G:"?"===o[1]?H:"@"===o[1]?q:Z})}else l.push({type:6,index:e})}for(const o of t)n.removeAttribute(o)}if(U.test(n.tagName)){const t=n.textContent.split(x),o=t.length-1;if(o>0){n.textContent=$?$.emptyScript:"";for(let i=0;i<o;i++)n.append(t[i],z()),B.nextNode(),l.push({type:2,index:++e});n.append(t[o],z())}}}else if(8===n.nodeType)if(n.data===w)l.push({type:2,index:e});else{let t=-1;for(;-1!==(t=n.data.indexOf(x,t+1));)l.push({type:7,index:e}),t+=x.length-1}e++}}static createElement(t,o){const i=S.createElement("template");return i.innerHTML=t,i}}function D(t,o,i=t,n){var e,r,s,l;if(o===N)return o;let a=void 0!==n?null===(e=i._$Co)||void 0===e?void 0:e[n]:i._$Cl;const d=_(o)?void 0:o._$litDirective$;return(null==a?void 0:a.constructor)!==d&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===d?a=void 0:(a=new d(t),a._$AT(t,i,n)),void 0!==n?(null!==(s=(l=i)._$Co)&&void 0!==s?s:l._$Co=[])[n]=a:i._$Cl=a),void 0!==a&&(o=D(t,a._$AS(t,o.values),a,n)),o}class I{constructor(t,o){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var o;const{el:{content:i},parts:n}=this._$AD,e=(null!==(o=null==t?void 0:t.creationScope)&&void 0!==o?o:S).importNode(i,!0);B.currentNode=e;let r=B.nextNode(),s=0,l=0,a=n[0];for(;void 0!==a;){if(s===a.index){let o;2===a.type?o=new P(r,r.nextSibling,this,t):1===a.type?o=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(o=new K(r,this,t)),this.u.push(o),a=n[++l]}s!==(null==a?void 0:a.index)&&(r=B.nextNode(),s++)}return e}p(t){let o=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,o),o+=i.strings.length-2):i._$AI(t[o])),o++}}class P{constructor(t,o,i,n){var e;this.type=2,this._$AH=R,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=i,this.options=n,this._$Cm=null===(e=null==n?void 0:n.isConnected)||void 0===e||e}get _$AU(){var t,o;return null!==(o=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==o?o:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return void 0!==o&&11===t.nodeType&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=D(this,t,o),_(t)?t===R||null==t||""===t?(this._$AH!==R&&this._$AR(),this._$AH=R):t!==this._$AH&&t!==N&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>A(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,o=this._$AB){return this._$AA.parentNode.insertBefore(t,o)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==R&&_(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){var o;const{values:i,_$litType$:n}=t,e="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=L.createElement(n.h,this.options)),n);if((null===(o=this._$AH)||void 0===o?void 0:o._$AD)===e)this._$AH.p(i);else{const t=new I(e,this),o=t.v(this.options);t.p(i),this.T(o),this._$AH=t}}_$AC(t){let o=W.get(t.strings);return void 0===o&&W.set(t.strings,o=new L(t)),o}k(t){A(this._$AH)||(this._$AH=[],this._$AR());const o=this._$AH;let i,n=0;for(const e of t)n===o.length?o.push(i=new P(this.O(z()),this.O(z()),this,this.options)):i=o[n],i._$AI(e),n++;n<o.length&&(this._$AR(i&&i._$AB.nextSibling,n),o.length=n)}_$AR(t=this._$AA.nextSibling,o){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,o);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){var o;void 0===this._$AM&&(this._$Cm=t,null===(o=this._$AP)||void 0===o||o.call(this,t))}}class Z{constructor(t,o,i,n,e){this.type=1,this._$AH=R,this._$AN=void 0,this.element=t,this.name=o,this._$AM=n,this.options=e,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=R}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,o=this,i,n){const e=this.strings;let r=!1;if(void 0===e)t=D(this,t,o,0),r=!_(t)||t!==this._$AH&&t!==N,r&&(this._$AH=t);else{const n=t;let s,l;for(t=e[0],s=0;s<e.length-1;s++)l=D(this,n[i+s],o,s),l===N&&(l=this._$AH[s]),r||(r=!_(l)||l!==this._$AH[s]),l===R?t=R:t!==R&&(t+=(null!=l?l:"")+e[s+1]),this._$AH[s]=l}r&&!n&&this.j(t)}j(t){t===R?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class G extends Z{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===R?void 0:t}}const J=$?$.emptyScript:"";class H extends Z{constructor(){super(...arguments),this.type=4}j(t){t&&t!==R?this.element.setAttribute(this.name,J):this.element.removeAttribute(this.name)}}class q extends Z{constructor(t,o,i,n,e){super(t,o,i,n,e),this.type=5}_$AI(t,o=this){var i;if((t=null!==(i=D(this,t,o,0))&&void 0!==i?i:R)===N)return;const n=this._$AH,e=t===R&&n!==R||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,r=t!==R&&(n===R||e);e&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var o,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(o=this.options)||void 0===o?void 0:o.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class K{constructor(t,o,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){D(this,t)}}const V=v.litHtmlPolyfillSupport;
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
22
|
*/
|
|
23
|
-
var F;null==V||V(
|
|
23
|
+
var F;null==V||V(L,P),(null!==(f=v.litHtmlVersions)&&void 0!==f?f:v.litHtmlVersions=[]).push("2.4.0");const Q=window,X=Q.trustedTypes,Y=X?X.createPolicy("lit-html",{createHTML:t=>t}):void 0,tt=`lit$${(Math.random()+"").slice(9)}$`,ot="?"+tt,it=`<${ot}>`,nt=document,et=(t="")=>nt.createComment(t),rt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,st=Array.isArray,lt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,at=/-->/g,dt=/>/g,ct=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),ut=/'/g,ht=/"/g,gt=/^(?:script|style|textarea|title)$/i,bt=(t=>(o,...i)=>({_$litType$:t,strings:o,values:i}))(1),mt=Symbol.for("lit-noChange"),pt=Symbol.for("lit-nothing"),ft=new WeakMap,vt=nt.createTreeWalker(nt,129,null,!1),$t=(t,o)=>{const i=t.length-1,n=[];let e,r=2===o?"<svg>":"",s=lt;for(let o=0;o<i;o++){const i=t[o];let l,a,d=-1,c=0;for(;c<i.length&&(s.lastIndex=c,a=s.exec(i),null!==a);)c=s.lastIndex,s===lt?"!--"===a[1]?s=at:void 0!==a[1]?s=dt:void 0!==a[2]?(gt.test(a[2])&&(e=RegExp("</"+a[2],"g")),s=ct):void 0!==a[3]&&(s=ct):s===ct?">"===a[0]?(s=null!=e?e:lt,d=-1):void 0===a[1]?d=-2:(d=s.lastIndex-a[2].length,l=a[1],s=void 0===a[3]?ct:'"'===a[3]?ht:ut):s===ht||s===ut?s=ct:s===at||s===dt?s=lt:(s=ct,e=void 0);const u=s===ct&&t[o+1].startsWith("/>")?" ":"";r+=s===lt?i+it:d>=0?(n.push(l),i.slice(0,d)+"$lit$"+i.slice(d)+tt+u):i+tt+(-2===d?(n.push(void 0),o):u)}const l=r+(t[i]||"<?>")+(2===o?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==Y?Y.createHTML(l):l,n]};class yt{constructor({strings:t,_$litType$:o},i){let n;this.parts=[];let e=0,r=0;const s=t.length-1,l=this.parts,[a,d]=$t(t,o);if(this.el=yt.createElement(a,i),vt.currentNode=this.el.content,2===o){const t=this.el.content,o=t.firstChild;o.remove(),t.append(...o.childNodes)}for(;null!==(n=vt.nextNode())&&l.length<s;){if(1===n.nodeType){if(n.hasAttributes()){const t=[];for(const o of n.getAttributeNames())if(o.endsWith("$lit$")||o.startsWith(tt)){const i=d[r++];if(t.push(o),void 0!==i){const t=n.getAttribute(i.toLowerCase()+"$lit$").split(tt),o=/([.?@])?(.*)/.exec(i);l.push({type:1,index:e,name:o[2],strings:t,ctor:"."===o[1]?zt:"?"===o[1]?At:"@"===o[1]?Ct:St})}else l.push({type:6,index:e})}for(const o of t)n.removeAttribute(o)}if(gt.test(n.tagName)){const t=n.textContent.split(tt),o=t.length-1;if(o>0){n.textContent=X?X.emptyScript:"";for(let i=0;i<o;i++)n.append(t[i],et()),vt.nextNode(),l.push({type:2,index:++e});n.append(t[o],et())}}}else if(8===n.nodeType)if(n.data===ot)l.push({type:2,index:e});else{let t=-1;for(;-1!==(t=n.data.indexOf(tt,t+1));)l.push({type:7,index:e}),t+=tt.length-1}e++}}static createElement(t,o){const i=nt.createElement("template");return i.innerHTML=t,i}}function xt(t,o,i=t,n){var e,r,s,l;if(o===mt)return o;let a=void 0!==n?null===(e=i._$Cl)||void 0===e?void 0:e[n]:i._$Cu;const d=rt(o)?void 0:o._$litDirective$;return(null==a?void 0:a.constructor)!==d&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===d?a=void 0:(a=new d(t),a._$AT(t,i,n)),void 0!==n?(null!==(s=(l=i)._$Cl)&&void 0!==s?s:l._$Cl=[])[n]=a:i._$Cu=a),void 0!==a&&(o=xt(t,a._$AS(t,o.values),a,n)),o}class wt{constructor(t,o){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var o;const{el:{content:i},parts:n}=this._$AD,e=(null!==(o=null==t?void 0:t.creationScope)&&void 0!==o?o:nt).importNode(i,!0);vt.currentNode=e;let r=vt.nextNode(),s=0,l=0,a=n[0];for(;void 0!==a;){if(s===a.index){let o;2===a.type?o=new kt(r,r.nextSibling,this,t):1===a.type?o=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(o=new jt(r,this,t)),this.v.push(o),a=n[++l]}s!==(null==a?void 0:a.index)&&(r=vt.nextNode(),s++)}return e}m(t){let o=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,o),o+=i.strings.length-2):i._$AI(t[o])),o++}}class kt{constructor(t,o,i,n){var e;this.type=2,this._$AH=pt,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=i,this.options=n,this._$C_=null===(e=null==n?void 0:n.isConnected)||void 0===e||e}get _$AU(){var t,o;return null!==(o=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==o?o:this._$C_}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return void 0!==o&&11===t.nodeType&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=xt(this,t,o),rt(t)?t===pt||null==t||""===t?(this._$AH!==pt&&this._$AR(),this._$AH=pt):t!==this._$AH&&t!==mt&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>st(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.O(t):this.$(t)}S(t,o=this._$AB){return this._$AA.parentNode.insertBefore(t,o)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}$(t){this._$AH!==pt&&rt(this._$AH)?this._$AA.nextSibling.data=t:this.k(nt.createTextNode(t)),this._$AH=t}T(t){var o;const{values:i,_$litType$:n}=t,e="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=yt.createElement(n.h,this.options)),n);if((null===(o=this._$AH)||void 0===o?void 0:o._$AD)===e)this._$AH.m(i);else{const t=new wt(e,this),o=t.p(this.options);t.m(i),this.k(o),this._$AH=t}}_$AC(t){let o=ft.get(t.strings);return void 0===o&&ft.set(t.strings,o=new yt(t)),o}O(t){st(this._$AH)||(this._$AH=[],this._$AR());const o=this._$AH;let i,n=0;for(const e of t)n===o.length?o.push(i=new kt(this.S(et()),this.S(et()),this,this.options)):i=o[n],i._$AI(e),n++;n<o.length&&(this._$AR(i&&i._$AB.nextSibling,n),o.length=n)}_$AR(t=this._$AA.nextSibling,o){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,o);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){var o;void 0===this._$AM&&(this._$C_=t,null===(o=this._$AP)||void 0===o||o.call(this,t))}}class St{constructor(t,o,i,n,e){this.type=1,this._$AH=pt,this._$AN=void 0,this.element=t,this.name=o,this._$AM=n,this.options=e,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=pt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,o=this,i,n){const e=this.strings;let r=!1;if(void 0===e)t=xt(this,t,o,0),r=!rt(t)||t!==this._$AH&&t!==mt,r&&(this._$AH=t);else{const n=t;let s,l;for(t=e[0],s=0;s<e.length-1;s++)l=xt(this,n[i+s],o,s),l===mt&&(l=this._$AH[s]),r||(r=!rt(l)||l!==this._$AH[s]),l===pt?t=pt:t!==pt&&(t+=(null!=l?l:"")+e[s+1]),this._$AH[s]=l}r&&!n&&this.P(t)}P(t){t===pt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class zt extends St{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===pt?void 0:t}}const _t=X?X.emptyScript:"";class At extends St{constructor(){super(...arguments),this.type=4}P(t){t&&t!==pt?this.element.setAttribute(this.name,_t):this.element.removeAttribute(this.name)}}class Ct extends St{constructor(t,o,i,n,e){super(t,o,i,n,e),this.type=5}_$AI(t,o=this){var i;if((t=null!==(i=xt(this,t,o,0))&&void 0!==i?i:pt)===mt)return;const n=this._$AH,e=t===pt&&n!==pt||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,r=t!==pt&&(n===pt||e);e&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var o,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(o=this.options)||void 0===o?void 0:o.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class jt{constructor(t,o,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){xt(this,t)}}const Et=Q.litHtmlPolyfillSupport;
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
@@ -37,7 +37,7 @@ const Nt=1,Rt=t=>(...o)=>({_$litDirective$:t,values:o});class Wt{constructor(t){
|
|
|
37
37
|
* @license
|
|
38
38
|
* Copyright 2018 Google LLC
|
|
39
39
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
40
|
-
*/const Lt=Rt(class extends Wt{constructor(t){var o;if(super(t),t.type!==Nt||"class"!==t.name||(null===(o=t.strings)||void 0===o?void 0:o.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((o=>t[o])).join(" ")+" "}update(t,[o]){var i,n;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in o)o[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(o)}const e=t.element.classList;this.nt.forEach((t=>{t in o||(e.remove(t),this.nt.delete(t))}));for(const t in o){const i=!!o[t];i===this.nt.has(t)||(null===(n=this.st)||void 0===n?void 0:n.has(t))||(i?(e.add(t),this.nt.add(t)):(e.remove(t),this.nt.delete(t)))}return N}});var Bt,Dt,It={},Pt={};Pt.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":"1.625rem","font-size-2":"1.25rem","font-size-3":"1rem","font-size-4":"0.875rem","font-size-5":"0.75rem","font-size-6":"0.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%","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"},Object.defineProperty(It,"i",{value:!0});var Zt=Pt;function Gt(t){return Zt.LoadsmartTheme[t]}function Jt(t){var o=Gt(t);return null==o?o:"--m-".concat(t)}var Ht=Object.keys(Zt.LoadsmartTheme).filter((function(t){return!t.startsWith("brand-")&&!t.startsWith("platform-")}));function qt(t){return Ht.filter((function(o){return o.startsWith(t)}))}var Kt=qt("color-"),Vt=qt("color-background-"),Ft=qt("spacing-"),Qt=qt("font-family-"),Xt=qt("font-size-"),Yt=qt("font-weight-"),to=qt("line-height-"),oo=qt("border-"),io=qt("border-radius-"),no=qt("opacity-"),eo=qt("elevation-"),ro=qt("glow-");function so(t){return r(Bt(t))}function lo(t,o=1){return r(Bt(t,o))}function ao(t){return r(`\n\t\t${function(t){return r(`\n\t\tmargin-inline-end: ${t}\n\t`)}(t)};\n\t\t${function(t){return r(`\n\t\tmargin-inline-start: ${t}\n\t`)}(t)}\n\t`)}function co(t){return r(`\n\t\t${function(t){return r(`\n\t\tmargin-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return r(`\n\t\tmargin-block-end: ${t}\n\t`)}(t)}\n\t`)}function uo(t){return r(`\n\t\t${function(t){return r(`\n\t\tpadding-inline-end: ${t}\n\t`)}(t)};\n\t\t${function(t){return r(`\n\t\tpadding-inline-start: ${t}\n\t`)}(t)}\n\t`)}function ho(t){return r(`\n\t\t${function(t){return r(`\n\t\tpadding-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return r(`\n\t\tpadding-block-end: ${t}\n\t`)}(t)}\n\t`)}It.BACKGROUND_COLOR_TOKENS=Vt,It.BORDER_RADIUS_TOKENS=io,It.BORDER_TOKENS=oo,It.BORDER_WIDTH_TOKENS=["border-none","border-thin","border-medium","border-thick"],It.COLOR_TOKENS=Kt,It.ELEVATION_TOKENS=eo,It.FONT_FAMILY_TOKENS=Qt,It.FONT_SIZE_TOKENS=Xt,It.FONT_WEIGHT_TOKENS=Yt,It.GLOW_TOKENS=ro,It.LINE_HEIGHT_TOKENS=to,It.OPACITY_TOKENS=no,It.SPACING_TOKENS=Ft,It.TOKENS=Ht,Dt=It.getToken=Gt,Bt=It.toCSSValue=function(t,o){var i=Gt(t);return null==i?"":t.startsWith("color-")?"rgba(var(".concat(Jt(t),", ").concat(i,"), ").concat(null!=o?o:1,")"):"var(".concat(Jt(t),", ").concat(i,")")},It.toCSSVariable=Jt;var go={toArray:function(t){return null==t?[]:Array.isArray(t)?t:[t]}},bo=go.toArray;const mo={property:"all",delay:"0s",duration:"0.35s",easing:"ease-in-out"};function po(t){const o=bo(t).map((t=>function(t){const o={...mo,...t};return r(`${o.property} ${o.duration} ${o.easing} ${o.delay}`)}(t))).join(", ");return r(`\n\t\ttransition: ${o}\n\t`)}function fo(t){const o=r("\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 r(`${o}\n${function(t){switch(t){case"heading-lg":return`\n\t\t\t\tfont-family: ${so("font-family-title")};\n\t\t\t\tline-height: ${so("line-height-2")};\n\t\t\t\tfont-size: ${so("font-size-1")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;case"heading-md-bold":return`\n\t\t\t\tfont-family: ${so("font-family-title")};\n\t\t\t\tline-height: ${so("line-height-2")};\n\t\t\t\tfont-size: ${so("font-size-2")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;case"heading-md":return`\n\t\t\t\tfont-family: ${so("font-family-title")};\n\t\t\t\tline-height: ${so("line-height-2")};\n\t\t\t\tfont-size: ${so("font-size-2")};\n\t\t\t\tfont-weight: ${so("font-weight-regular")}\n\t\t\t`;case"heading-sm-bold":return`\n\t\t\t\tfont-family: ${so("font-family-title")};\n\t\t\t\tline-height: ${so("line-height-3")};\n\t\t\t\tfont-size: ${so("font-size-3")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;case"heading-sm":return`\n\t\t\t\tfont-family: ${so("font-family-title")};\n\t\t\t\tline-height: ${so("line-height-3")};\n\t\t\t\tfont-size: ${so("font-size-3")};\n\t\t\t\tfont-weight: ${so("font-weight-regular")}\n\t\t\t`;case"body-md":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-5")};\n\t\t\t\tfont-size: ${so("font-size-4")};\n\t\t\t\tfont-weight: ${so("font-weight-regular")}\n\t\t\t`;case"body-md-underline":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-5")};\n\t\t\t\tfont-size: ${so("font-size-4")};\n\t\t\t\tfont-weight: ${so("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: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-5")};\n\t\t\t\tfont-size: ${so("font-size-4")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;case"body-md-bold-underline":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-5")};\n\t\t\t\tfont-size: ${so("font-size-4")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-sm":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-5")};\n\t\t\t\tfont-size: ${so("font-size-5")};\n\t\t\t\tfont-weight: ${so("font-weight-regular")}\n\t\t\t`;case"body-sm-underline":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-5")};\n\t\t\t\tfont-size: ${so("font-size-5")};\n\t\t\t\tfont-weight: ${so("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: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-5")};\n\t\t\t\tfont-size: ${so("font-size-5")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;case"body-sm-bold-underline":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-5")};\n\t\t\t\tfont-size: ${so("font-size-5")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"number-md":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-2")};\n\t\t\t\tfont-size: ${so("font-size-4")};\n\t\t\t\tfont-weight: ${so("font-weight-regular")}\n\t\t\t`;case"number-sm":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-2")};\n\t\t\t\tfont-size: ${so("font-size-5")};\n\t\t\t\tfont-weight: ${so("font-weight-regular")}\n\t\t\t`;case"button-lg":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-1")};\n\t\t\t\tfont-size: ${so("font-size-3")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;case"button-md":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-1")};\n\t\t\t\tfont-size: ${so("font-size-4")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;case"button-sm":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-1")};\n\t\t\t\tfont-size: ${so("font-size-5")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;case"table-header-md":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-1")};\n\t\t\t\tfont-size: ${so("font-size-4")};\n\t\t\t\tfont-weight: ${so("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: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-1")};\n\t\t\t\tfont-size: ${so("font-size-5")};\n\t\t\t\tfont-weight: ${so("font-weight-medium")}\n\t\t\t`;case"chips-sm":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-1")};\n\t\t\t\tfont-size: ${so("font-size-6")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;default:return""}}(t)}`)}function vo(t,o=""){return r(bo(t).map((t=>[`${t}.is-disabled`,`${t}:disabled`].map((t=>[t,o].join(" "))).join(", "))).join(", "))}const $o={active:function(t){return r(bo(t).map((t=>`${t}:not(.is-disabled, :disabled):active`)).join(", "))},focus:function(t){return r(bo(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 r(bo(t).map((t=>`${t}:not(.is-disabled, :disabled):hover`)).join(", "))}};function yo(){return s`
|
|
40
|
+
*/const Bt=Rt(class extends Wt{constructor(t){var o;if(super(t),t.type!==Nt||"class"!==t.name||(null===(o=t.strings)||void 0===o?void 0:o.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((o=>t[o])).join(" ")+" "}update(t,[o]){var i,n;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in o)o[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(o)}const e=t.element.classList;this.nt.forEach((t=>{t in o||(e.remove(t),this.nt.delete(t))}));for(const t in o){const i=!!o[t];i===this.nt.has(t)||(null===(n=this.st)||void 0===n?void 0:n.has(t))||(i?(e.add(t),this.nt.add(t)):(e.remove(t),this.nt.delete(t)))}return N}});var Lt,Dt,It={},Pt={};Pt.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":"1.625rem","font-size-2":"1.25rem","font-size-3":"1rem","font-size-4":"0.875rem","font-size-5":"0.75rem","font-size-6":"0.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%","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"},Object.defineProperty(It,"i",{value:!0});var Zt=Pt;function Gt(t){return Zt.LoadsmartTheme[t]}function Jt(t){var o=Gt(t);return null==o?o:"--m-".concat(t)}var Ht=Object.keys(Zt.LoadsmartTheme).filter((function(t){return!t.startsWith("brand-")&&!t.startsWith("platform-")}));function qt(t){return Ht.filter((function(o){return o.startsWith(t)}))}var Kt=qt("color-"),Vt=qt("color-background-"),Ft=qt("spacing-"),Qt=qt("font-family-"),Xt=qt("font-size-"),Yt=qt("font-weight-"),to=qt("line-height-"),oo=qt("border-"),io=qt("border-radius-"),no=qt("opacity-"),eo=qt("elevation-"),ro=qt("glow-");function so(t){return r(Lt(t))}function lo(t,o=1){return r(Lt(t,o))}function ao(t){return r(`\n\t\t${function(t){return r(`\n\t\tmargin-inline-end: ${t}\n\t`)}(t)};\n\t\t${function(t){return r(`\n\t\tmargin-inline-start: ${t}\n\t`)}(t)}\n\t`)}function co(t){return r(`\n\t\t${function(t){return r(`\n\t\tmargin-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return r(`\n\t\tmargin-block-end: ${t}\n\t`)}(t)}\n\t`)}function uo(t){return r(`\n\t\t${function(t){return r(`\n\t\tpadding-inline-end: ${t}\n\t`)}(t)};\n\t\t${function(t){return r(`\n\t\tpadding-inline-start: ${t}\n\t`)}(t)}\n\t`)}function ho(t){return r(`\n\t\t${function(t){return r(`\n\t\tpadding-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return r(`\n\t\tpadding-block-end: ${t}\n\t`)}(t)}\n\t`)}It.BACKGROUND_COLOR_TOKENS=Vt,It.BORDER_RADIUS_TOKENS=io,It.BORDER_TOKENS=oo,It.BORDER_WIDTH_TOKENS=["border-none","border-thin","border-medium","border-thick"],It.COLOR_TOKENS=Kt,It.ELEVATION_TOKENS=eo,It.FONT_FAMILY_TOKENS=Qt,It.FONT_SIZE_TOKENS=Xt,It.FONT_WEIGHT_TOKENS=Yt,It.GLOW_TOKENS=ro,It.LINE_HEIGHT_TOKENS=to,It.OPACITY_TOKENS=no,It.SPACING_TOKENS=Ft,It.TOKENS=Ht,Dt=It.getToken=Gt,Lt=It.toCSSValue=function(t,o){var i=Gt(t);return null==i?"":t.startsWith("color-")?"rgba(var(".concat(Jt(t),", ").concat(i,"), ").concat(null!=o?o:1,")"):"var(".concat(Jt(t),", ").concat(i,")")},It.toCSSVariable=Jt;var go={toArray:function(t){return null==t?[]:Array.isArray(t)?t:[t]}},bo=go.toArray;const mo={property:"all",delay:"0s",duration:"0.35s",easing:"ease-in-out"};function po(t){const o=bo(t).map((t=>function(t){const o={...mo,...t};return r(`${o.property} ${o.duration} ${o.easing} ${o.delay}`)}(t))).join(", ");return r(`\n\t\ttransition: ${o}\n\t`)}function fo(t){const o=r("\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 r(`${o}\n${function(t){switch(t){case"heading-lg":return`\n\t\t\t\tfont-family: ${so("font-family-title")};\n\t\t\t\tline-height: ${so("line-height-2")};\n\t\t\t\tfont-size: ${so("font-size-1")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;case"heading-md-bold":return`\n\t\t\t\tfont-family: ${so("font-family-title")};\n\t\t\t\tline-height: ${so("line-height-2")};\n\t\t\t\tfont-size: ${so("font-size-2")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;case"heading-md":return`\n\t\t\t\tfont-family: ${so("font-family-title")};\n\t\t\t\tline-height: ${so("line-height-2")};\n\t\t\t\tfont-size: ${so("font-size-2")};\n\t\t\t\tfont-weight: ${so("font-weight-regular")}\n\t\t\t`;case"heading-sm-bold":return`\n\t\t\t\tfont-family: ${so("font-family-title")};\n\t\t\t\tline-height: ${so("line-height-3")};\n\t\t\t\tfont-size: ${so("font-size-3")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;case"heading-sm":return`\n\t\t\t\tfont-family: ${so("font-family-title")};\n\t\t\t\tline-height: ${so("line-height-3")};\n\t\t\t\tfont-size: ${so("font-size-3")};\n\t\t\t\tfont-weight: ${so("font-weight-regular")}\n\t\t\t`;case"body-md":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-5")};\n\t\t\t\tfont-size: ${so("font-size-4")};\n\t\t\t\tfont-weight: ${so("font-weight-regular")}\n\t\t\t`;case"body-md-underline":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-5")};\n\t\t\t\tfont-size: ${so("font-size-4")};\n\t\t\t\tfont-weight: ${so("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: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-5")};\n\t\t\t\tfont-size: ${so("font-size-4")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;case"body-md-bold-underline":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-5")};\n\t\t\t\tfont-size: ${so("font-size-4")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"body-sm":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-5")};\n\t\t\t\tfont-size: ${so("font-size-5")};\n\t\t\t\tfont-weight: ${so("font-weight-regular")}\n\t\t\t`;case"body-sm-underline":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-5")};\n\t\t\t\tfont-size: ${so("font-size-5")};\n\t\t\t\tfont-weight: ${so("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: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-5")};\n\t\t\t\tfont-size: ${so("font-size-5")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;case"body-sm-bold-underline":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-5")};\n\t\t\t\tfont-size: ${so("font-size-5")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"number-md":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-2")};\n\t\t\t\tfont-size: ${so("font-size-4")};\n\t\t\t\tfont-weight: ${so("font-weight-regular")}\n\t\t\t`;case"number-sm":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-2")};\n\t\t\t\tfont-size: ${so("font-size-5")};\n\t\t\t\tfont-weight: ${so("font-weight-regular")}\n\t\t\t`;case"button-lg":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-1")};\n\t\t\t\tfont-size: ${so("font-size-3")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;case"button-md":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-1")};\n\t\t\t\tfont-size: ${so("font-size-4")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;case"button-sm":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-1")};\n\t\t\t\tfont-size: ${so("font-size-5")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;case"table-header-md":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-1")};\n\t\t\t\tfont-size: ${so("font-size-4")};\n\t\t\t\tfont-weight: ${so("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: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-1")};\n\t\t\t\tfont-size: ${so("font-size-5")};\n\t\t\t\tfont-weight: ${so("font-weight-medium")}\n\t\t\t`;case"chips-sm":return`\n\t\t\t\tfont-family: ${so("font-family-default")};\n\t\t\t\tline-height: ${so("line-height-1")};\n\t\t\t\tfont-size: ${so("font-size-6")};\n\t\t\t\tfont-weight: ${so("font-weight-bold")}\n\t\t\t`;default:return""}}(t)}`)}function vo(t,o=""){return r(bo(t).map((t=>[`${t}.is-disabled`,`${t}:disabled`].map((t=>[t,o].join(" "))).join(", "))).join(", "))}const $o={active:function(t){return r(bo(t).map((t=>`${t}:not(.is-disabled, :disabled):active`)).join(", "))},focus:function(t){return r(bo(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 r(bo(t).map((t=>`${t}:not(.is-disabled, :disabled):hover`)).join(", "))}};function yo(){return s`
|
|
41
41
|
:host {
|
|
42
42
|
--m-button-background-color: transparent;
|
|
43
43
|
--m-button-base-size: 40px;
|
|
@@ -116,12 +116,11 @@ const Nt=1,Rt=t=>(...o)=>({_$litDirective$:t,values:o});class Wt{constructor(t){
|
|
|
116
116
|
slot[name='trailing']::slotted( span ) {
|
|
117
117
|
justify-content: center;
|
|
118
118
|
}
|
|
119
|
-
`;var t,o}class xo extends Ot{constructor(){super(),this.variant="secondary",this.size="default",this.type="button",this.disabled=!1,this.loading=!1}static get properties(){return{loading:{type:Boolean},disabled:{type:Boolean,reflect:!0},variant:{type:String},size:{type:String},type:{type:String}}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button")}render(){return bt`
|
|
119
|
+
`;var t,o}class xo extends Ot{constructor(){super(),this.variant="secondary",this.size="default",this.type="button",this.disabled=!1,this.loading=!1}static get properties(){return{loading:{type:Boolean},disabled:{type:Boolean,reflect:!0},variant:{type:String},size:{type:String},type:{type:String}}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button")}updated(t){super.updated(t),(t.has("disabled")||t.has("loading"))&&this._setDisabled()}render(){return bt`
|
|
120
120
|
<button
|
|
121
|
-
class=${
|
|
121
|
+
class=${Bt({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)})}
|
|
122
122
|
type=${this.type}
|
|
123
123
|
?disabled="${this._isDisabled()}"
|
|
124
|
-
aria-disabled=${this._isDisabled()?"true":"false"}
|
|
125
124
|
>
|
|
126
125
|
<!-- TODO: Replace this with the loading dots component as soon as it is ready. -->
|
|
127
126
|
${this.loading&&!["icon","icon-secondary"].includes(this.variant)?bt`<span class="loader">●●●</span>`:pt}
|
|
@@ -129,7 +128,7 @@ const Nt=1,Rt=t=>(...o)=>({_$litDirective$:t,values:o});class Wt{constructor(t){
|
|
|
129
128
|
<slot></slot>
|
|
130
129
|
<slot name="trailing"></slot>
|
|
131
130
|
</button>
|
|
132
|
-
`}_isDisabled(){return this.disabled||this.loading}}xo.styles=[[yo(),s`
|
|
131
|
+
`}_isDisabled(){return Boolean(this.disabled)||Boolean(this.loading)}_setDisabled(){const t=this._isDisabled();this.setAttribute("aria-disabled",String(t))}}xo.styles=[[yo(),s`
|
|
133
132
|
.button.is-loading:not( .-icon, .-icon-secondary ) *:not( .loader ) {
|
|
134
133
|
visibility: hidden;
|
|
135
134
|
}
|
|
@@ -393,7 +392,7 @@ const Nt=1,Rt=t=>(...o)=>({_$litDirective$:t,values:o});class Wt{constructor(t){
|
|
|
393
392
|
const wo=Rt(class extends Wt{constructor(t){var o;if(super(t),t.type!==Nt||"style"!==t.name||(null===(o=t.strings)||void 0===o?void 0:o.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(((o,i)=>{const n=t[i];return null==n?o:o+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(t,[o]){const{style:i}=t.element;if(void 0===this.vt){this.vt=new Set;for(const t in o)this.vt.add(t);return this.render(o)}this.vt.forEach((t=>{null==o[t]&&(this.vt.delete(t),t.includes("-")?i.removeProperty(t):i[t]="")}));for(const t in o){const n=o[t];null!=n&&(this.vt.add(t),t.includes("-")?i.setProperty(t,n):i[t]=n)}return N}});class ko extends Ot{constructor(){super(),this.flagged=!1,this.flagColor="color-background-inverted"}static get properties(){return{flagged:{type:Boolean},flagColor:{type:String,attribute:"flag-color"}}}render(){return bt`
|
|
394
393
|
<div
|
|
395
394
|
class="m-card"
|
|
396
|
-
style="${wo({"--m-card-flag-color":
|
|
395
|
+
style="${wo({"--m-card-flag-color":Lt(this.flagColor)})}"
|
|
397
396
|
>
|
|
398
397
|
${this.flagged?bt`<span class="m-card-flag"></span>`:pt}
|
|
399
398
|
<div class="m-card-content">
|
|
@@ -477,12 +476,12 @@ const wo=Rt(class extends Wt{constructor(t){var o;if(super(t),t.type!==Nt||"styl
|
|
|
477
476
|
|
|
478
477
|
color: ${lo("color-text-tertiary")};
|
|
479
478
|
}
|
|
480
|
-
`],window.customElements.define("m-card-subtitle",zo);class
|
|
479
|
+
`],window.customElements.define("m-card-subtitle",zo);class _o extends Ot{constructor(){super(),this.slot="title"}render(){return bt`
|
|
481
480
|
<div class="m-card-title">
|
|
482
481
|
<slot name="leading"></slot>
|
|
483
482
|
<slot></slot>
|
|
484
483
|
</div>
|
|
485
|
-
`}}
|
|
484
|
+
`}}_o.styles=[s`
|
|
486
485
|
:host {
|
|
487
486
|
--m-card-title-padding-x: ${so("spacing-4")};
|
|
488
487
|
--m-card-title-padding-top: ${so("spacing-4")};
|
|
@@ -504,7 +503,7 @@ const wo=Rt(class extends Wt{constructor(t){var o;if(super(t),t.type!==Nt||"styl
|
|
|
504
503
|
pointer-events: none;
|
|
505
504
|
margin-inline-end: ${so("spacing-1")};
|
|
506
505
|
}
|
|
507
|
-
`],window.customElements.define("m-card-title",
|
|
506
|
+
`],window.customElements.define("m-card-title",_o);class Ao extends Ot{render(){return bt` <hr class="m-divider" /> `}}Ao.styles=[s`
|
|
508
507
|
.m-divider {
|
|
509
508
|
border: 0;
|
|
510
509
|
border-block-end: solid 1px ${lo("color-divider")};
|
|
@@ -517,7 +516,7 @@ const wo=Rt(class extends Wt{constructor(t){var o;if(super(t),t.type!==Nt||"styl
|
|
|
517
516
|
var( --m-divider-margin-y, 0 )
|
|
518
517
|
);
|
|
519
518
|
}
|
|
520
|
-
`],window.customElements.define("m-divider",
|
|
519
|
+
`],window.customElements.define("m-divider",Ao);const Co=["center","flex-start","flex-end","stretch"],jo=["center","flex-start","flex-end","space-between","space-around","space-evenly"],Eo={padding:"spacing-4",borderRadius:"border-radius-s",borderWidth:"border-none",borderColor:"color-background-highlight",textAlign:"left"};class Mo extends Ot{constructor(){super(),this.padding=Eo.padding,this.borderRadius=Eo.borderRadius,this.borderWidth=Eo.borderWidth,this.borderColor=Eo.borderColor,this.textAlign=Eo.textAlign}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"}}}update(t){this.style.setProperty("--m-box-padding",Lt(this.padding)||Lt(Eo.padding)),this.style.setProperty("--m-box-background-color",Lt(this.backgroundColor)||"transparent"),this.style.setProperty("--m-box-border-radius",Lt(this.borderRadius)||Lt(Eo.borderRadius)),this.style.setProperty("--m-box-border-width",Lt(this.borderWidth)||Lt(Eo.borderWidth)),this.style.setProperty("--m-box-border-color",Lt(this.borderColor)||Lt(Eo.borderColor)),this.style.setProperty("--m-box-text-align",this.textAlign||Eo.textAlign),super.update(t)}render(){return bt`<slot></slot>`}}Mo.styles=[s`
|
|
521
520
|
:host {
|
|
522
521
|
--m-box-padding: ${so(Eo.padding)};
|
|
523
522
|
--m-box-background-color: transparent;
|
|
@@ -536,7 +535,7 @@ const wo=Rt(class extends Wt{constructor(t){var o;if(super(t),t.type!==Nt||"styl
|
|
|
536
535
|
border-color: var( --m-box-border-color );
|
|
537
536
|
text-align: var( --m-box-text-align );
|
|
538
537
|
}
|
|
539
|
-
`],window.customElements.define("m-box",Mo);const To={gap:"spacing-4",align:"stretch",justify:"flex-start"};class Oo extends Ot{constructor(){super(),this.gap=To.gap,this.align=To.align,this.justify=To.justify}static get properties(){return{gap:{type:String},align:{type:String},justify:{type:String}}}update(t){this.style.setProperty("--m-group-gap",
|
|
538
|
+
`],window.customElements.define("m-box",Mo);const To={gap:"spacing-4",align:"stretch",justify:"flex-start"};class Oo extends Ot{constructor(){super(),this.gap=To.gap,this.align=To.align,this.justify=To.justify}static get properties(){return{gap:{type:String},align:{type:String},justify:{type:String}}}update(t){this.style.setProperty("--m-group-gap",Lt(this.gap)||Lt(To.gap)),this.style.setProperty("--m-group-align",this.align||To.align),this.style.setProperty("--m-group-justify",this.justify||To.justify),super.update(t)}render(){return bt`<slot></slot>`}}Oo.styles=[s`
|
|
540
539
|
:host {
|
|
541
540
|
--m-group-gap: ${so(To.gap)};
|
|
542
541
|
--m-group-align: ${r(To.align)};
|
|
@@ -548,7 +547,7 @@ const wo=Rt(class extends Wt{constructor(t){var o;if(super(t),t.type!==Nt||"styl
|
|
|
548
547
|
align-items: var(--m-group-align);
|
|
549
548
|
justify-content: var(--m-group-justify);
|
|
550
549
|
}
|
|
551
|
-
`],window.customElements.define("m-group",Oo);const Uo={gap:"spacing-4",align:"stretch",justify:"flex-start"};class No extends Ot{constructor(){super(),this.gap=Uo.gap,this.align=Uo.align,this.justify=Uo.justify}static get properties(){return{gap:{type:String},align:{type:String},justify:{type:String}}}update(t){this.style.setProperty("--m-stack-gap",
|
|
550
|
+
`],window.customElements.define("m-group",Oo);const Uo={gap:"spacing-4",align:"stretch",justify:"flex-start"};class No extends Ot{constructor(){super(),this.gap=Uo.gap,this.align=Uo.align,this.justify=Uo.justify}static get properties(){return{gap:{type:String},align:{type:String},justify:{type:String}}}update(t){this.style.setProperty("--m-stack-gap",Lt(this.gap)||Lt(Uo.gap)),this.style.setProperty("--m-stack-align",this.align||Uo.align),this.style.setProperty("--m-stack-justify",this.justify||Uo.justify),super.update(t)}render(){return bt`<slot></slot>`}}No.styles=[s`
|
|
552
551
|
:host {
|
|
553
552
|
--m-stack-gap: ${so(Uo.gap)};
|
|
554
553
|
--m-stack-align: ${r(Uo.align)};
|
|
@@ -561,7 +560,7 @@ const wo=Rt(class extends Wt{constructor(t){var o;if(super(t),t.type!==Nt||"styl
|
|
|
561
560
|
align-items: var(--m-stack-align);
|
|
562
561
|
justify-content: var(--m-stack-justify);
|
|
563
562
|
}
|
|
564
|
-
`],window.customElements.define("m-stack",No);const Ro={gap:"spacing-4",minColumnWidth:Dt("spacing-30")};class Wo extends Ot{constructor(){super(),this.gap=Ro.gap,this.minColumnWidth=Ro.minColumnWidth}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"}}}update(t){t.has("gap")&&this.style.setProperty("--m-grid-gap",
|
|
563
|
+
`],window.customElements.define("m-stack",No);const Ro={gap:"spacing-4",minColumnWidth:Dt("spacing-30")};class Wo extends Ot{constructor(){super(),this.gap=Ro.gap,this.minColumnWidth=Ro.minColumnWidth}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"}}}update(t){t.has("gap")&&this.style.setProperty("--m-grid-gap",Lt(this.gap)||Lt(Ro.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-grid-row-gap",Lt(this.rowGap)):this.style.removeProperty("--m-grid-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-grid-column-gap",Lt(this.columnGap)):this.style.removeProperty("--m-grid-column-gap")),t.has("minColumnWidth")&&this.style.setProperty("--m-grid-min-column-width",this.minColumnWidth||Ro.minColumnWidth),super.update(t)}render(){return bt`<slot></slot>`}}Wo.styles=[s`
|
|
565
564
|
:host {
|
|
566
565
|
--m-grid-gap: ${so(Ro.gap)};
|
|
567
566
|
--m-grid-min-column-width: ${r(Ro.minColumnWidth)};
|
|
@@ -576,15 +575,15 @@ const wo=Rt(class extends Wt{constructor(t){var o;if(super(t),t.type!==Nt||"styl
|
|
|
576
575
|
minmax( min( var( --m-grid-min-column-width ), 100% ), 1fr )
|
|
577
576
|
);
|
|
578
577
|
}
|
|
579
|
-
`],window.customElements.define("m-grid",Wo);const
|
|
578
|
+
`],window.customElements.define("m-grid",Wo);const Bo={gap:"spacing-4",sideWidth:"auto",minContentWidth:"50%",reversed:!1};function Lo(t){return t?"row-reverse":"row"}class Do extends Ot{constructor(){super(),this.gap=Bo.gap,this.sideWidth=Bo.sideWidth,this.minContentWidth=Bo.minContentWidth,this.reversed=Bo.reversed}static get properties(){return{gap:{type:String},sideWidth:{type:String,attribute:"side-width"},minContentWidth:{type:String,attribute:"min-content-width"},reversed:{type:Boolean}}}update(t){t.has("gap")&&this.style.setProperty("--m-sidebar-gap",Lt(this.gap)||Lt(Bo.gap)),t.has("sideWidth")&&this.style.setProperty("--m-sidebar-side-width",this.sideWidth||Bo.sideWidth),t.has("minContentWidth")&&this.style.setProperty("--m-sidebar-min-content-width",this.minContentWidth||Bo.minContentWidth),t.has("reversed")&&this.style.setProperty("--m-sidebar-flex-direction",Lo(this.reversed)),super.update(t)}render(){return bt`
|
|
580
579
|
<slot name="sidebar"></slot>
|
|
581
580
|
<slot name="content"></slot>
|
|
582
581
|
`}}function Io(t,o,i){return Math.min(Math.max(o,t),i)}Do.styles=[s`
|
|
583
582
|
:host {
|
|
584
|
-
--m-sidebar-gap: ${so(
|
|
585
|
-
--m-sidebar-flex-direction: ${r(Bo
|
|
586
|
-
--m-sidebar-side-width: ${r(
|
|
587
|
-
--m-sidebar-min-content-width: ${r(
|
|
583
|
+
--m-sidebar-gap: ${so(Bo.gap)};
|
|
584
|
+
--m-sidebar-flex-direction: ${r(Lo(Bo.reversed))};
|
|
585
|
+
--m-sidebar-side-width: ${r(Bo.sideWidth)};
|
|
586
|
+
--m-sidebar-min-content-width: ${r(Bo.minContentWidth)};
|
|
588
587
|
|
|
589
588
|
display: flex;
|
|
590
589
|
flex-wrap: wrap;
|
|
@@ -652,8 +651,8 @@ const wo=Rt(class extends Wt{constructor(t){var o;if(super(t),t.type!==Nt||"styl
|
|
|
652
651
|
}
|
|
653
652
|
`],window.customElements.define("m-progress-bar",Zo);class Go extends Ot{constructor(){super(),this.variant="body-md",this.color="color-text-primary"}static get properties(){return{variant:{type:String,reflect:!0},color:{type:String}}}render(){return bt`
|
|
654
653
|
<span
|
|
655
|
-
class=${
|
|
656
|
-
style=${wo({"--m-text-color":
|
|
654
|
+
class=${Bt({"m-text":!0,"-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-sm":"chips-sm"==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,"-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})}
|
|
655
|
+
style=${wo({"--m-text-color":Lt(this.color)})}
|
|
657
656
|
>
|
|
658
657
|
<slot></slot>
|
|
659
658
|
</span>
|
|
@@ -757,7 +756,7 @@ const wo=Rt(class extends Wt{constructor(t){var o;if(super(t),t.type!==Nt||"styl
|
|
|
757
756
|
}
|
|
758
757
|
`],window.customElements.define("m-text",Go);var Jo,Ho={};Object.defineProperty(Ho,"i",{value:!0});var qo=go;Ho.SELECTION_TYPES=["single","single-strict","multiple"],Jo=Ho.default=function(t){var o=t.type,i=void 0===o?"multiple":o;return"single"===i?{type:"single",init:function(t){return this.select(t,new Set)},select:function(t,o){var i=qo.toArray(t);if(0===i.length)return o;var n=new Set;return n.add(String(i[i.length-1])),n},unselect:function(t,o){var i=qo.toArray(t);if(0===i.length||0===o.size)return o;for(var n=new Set(o),e=0;e<i.length;e++)n.delete(String(i[e]));return n},toggle:function(t,o){var i=qo.toArray(t);if(0===i.length)return o;for(var n=new Set,e=0;e<i.length;e++){var r=String(i[e]);o.has(r)||(n.clear(),n.add(r))}return n},reset:function(t){return null==t?new Set:t},value:function(t){return null==t||0===t.size?null:Array.from(t)[0]}}:"single-strict"===i?{type:"single-strict",init:function(t){return this.select(t,new Set)},select:function(t,o){var i=qo.toArray(t);if(0===i.length)return o;var n=new Set;return n.add(String(i[i.length-1])),n},unselect:function(t,o){var i=qo.toArray(t);if(0===i.length||0===o.size)return o;for(var n=new Set(o),e=0;e<i.length&&o.size>1;e++)n.delete(String(i[e]));return n},toggle:function(t,o){var i=qo.toArray(t);if(0===i.length)return o;for(var n=new Set(o),e=0;e<i.length;e++){var r=String(i[e]);o.has(r)||(n.clear(),n.add(r))}return n},reset:function(t){return null==t?new Set:t},value:function(t){return null==t||0===t.size?null:Array.from(t)[0]}}:{type:"multiple",init:function(t){return this.select(t,new Set)},select:function(t,o){var i=qo.toArray(t);if(0===i.length)return o;for(var n=new Set(o),e=0;e<i.length;e++)n.add(String(i[e]));return n},unselect:function(t,o){var i=qo.toArray(t);if(0===i.length||0===o.size)return o;for(var n=new Set(o),e=0;e<i.length;e++)n.delete(String(i[e]));return n},toggle:function(t,o){var i=qo.toArray(t);if(0===i.length)return o;for(var n=new Set(o),e=0;e<i.length;e++){var r=String(i[e]);o.has(r)?n.delete(r):n.add(r)}return n},reset:function(t){return null==t?new Set:t},value:function(t){return null==t||0===t.size?null:Array.from(t)}}};class Ko{constructor(t,o,i){this.disabled=!1,this.event="m-select",this._handleSelectionEvent=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:o,value:i}}=t;switch(o){case"select":this.select(bo(i));break;case"unselect":this.unselect(bo(i));break;case"toggle":this.toggle(bo(i))}},this.init=t=>{this.host.selection=this.strategy.init(t)},this.select=t=>{this.host.selection=this.strategy.select(t,this.host.selection),this._publish()},this.unselect=t=>{this.host.selection=this.strategy.unselect(t,this.host.selection),this._publish()},this.toggle=t=>{this.host.selection=this.strategy.toggle(t,this.host.selection),this._publish()},this.subscribe=()=>{this.host.addEventListener(this.event,this._handleSelectionEvent)},this.unsubscribe=()=>{this.host.removeEventListener(this.event,this._handleSelectionEvent)},this.host=t,this.type=o,this.event=i,this.strategy=Jo({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))}_publish(){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 Vo extends Ot{constructor(){super(),this._selectionController=null,this._defaultSlot=null,this.showCheck=!1,this.size="default",this.type="single",this.selection=new Set}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}}}update(t){super.update(t),(null!=t.get("type")&&null!=this.type||null==this._selectionController)&&(this._selectionController=new Ko(this,this.type,"m-toggle"),this._selectionController.init(bo(this.value)),this.role=["single","single-strict"].includes(this.type)?"radiogroup":"group"),t.has("value")&&this._selectionController.init(bo(this.value))}updated(t){super.updated(t),t.has("selection")&&this._getToggles().forEach((t=>{this._setToggleChecked(t)})),t.has("disabled")&&this._getToggles().forEach((t=>{this._setToggleDisabled(t)})),t.has("role")&&this._getToggles().forEach((t=>{this._setToggleRole(t)}))}render(){return bt`
|
|
759
758
|
<m-group
|
|
760
|
-
class=${
|
|
759
|
+
class=${Bt({"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})}
|
|
761
760
|
gap="spacing-1"
|
|
762
761
|
>
|
|
763
762
|
<slot></slot>
|
|
@@ -791,7 +790,7 @@ const wo=Rt(class extends Wt{constructor(t){var o;if(super(t),t.type!==Nt||"styl
|
|
|
791
790
|
`]],window.customElements.define("m-toggle-group",Vo);class Fo extends Ot{constructor(){super(),this.disabled=!1,this.checked=!1}static get properties(){return{checked:{type:Boolean},disabled:{type:Boolean,reflect:!0},role:{type:String,reflect:!0},value:{type:String}}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}updated(t){super.updated(t),t.has("disabled")&&this._setDisabled(),t.has("checked")&&this._setChecked()}render(){return bt`
|
|
792
791
|
<button
|
|
793
792
|
type="button"
|
|
794
|
-
class=${
|
|
793
|
+
class=${Bt({button:!0,toggle:!0})}
|
|
795
794
|
role="${this.role}"
|
|
796
795
|
aria-checked="${this.checked}"
|
|
797
796
|
?disabled="${this.disabled}"
|
|
@@ -859,5 +858,5 @@ const wo=Rt(class extends Wt{constructor(t){var o;if(super(t),t.type!==Nt||"styl
|
|
|
859
858
|
block-size: var( --m-toggle-icon-size );
|
|
860
859
|
inline-size: var( --m-toggle-icon-size );
|
|
861
860
|
}
|
|
862
|
-
`]],window.customElements.define("m-toggle",Fo);export{Co as ALIGN_ITEMS_VALUES,Mo as Box,xo as Button,ko as Card,So as CardBody,zo as CardSubtitle,
|
|
861
|
+
`]],window.customElements.define("m-toggle",Fo);export{Co as ALIGN_ITEMS_VALUES,Mo as Box,xo as Button,ko as Card,So as CardBody,zo as CardSubtitle,_o as CardTitle,Ao as Divider,Wo as Grid,Oo as Group,jo as JUSTIFY_CONTENT_VALUES,Zo as ProgressBar,Do as Sidebar,No as Stack,Go as Text,Fo as Toggle,Vo as ToggleGroup,Eo as defaultBoxProps,Ro as defaultGridProps,To as defaultGroupProps,Bo as defaultSidebarProps,Uo as defaultStackProps};
|
|
863
862
|
//# sourceMappingURL=index.js.map
|