@loadsmart/miranda-wc 1.17.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/banner/banner-action-primary.d.ts +11 -0
- package/dist/components/banner/banner-action-primary.d.ts.map +1 -0
- package/dist/components/banner/banner-action-secondary.d.ts +11 -0
- package/dist/components/banner/banner-action-secondary.d.ts.map +1 -0
- package/dist/components/banner/banner-actions.d.ts +12 -0
- package/dist/components/banner/banner-actions.d.ts.map +1 -0
- package/dist/components/banner/banner-actions.styles.d.ts +2 -0
- package/dist/components/banner/banner-actions.styles.d.ts.map +1 -0
- package/dist/components/banner/banner-description.d.ts +12 -0
- package/dist/components/banner/banner-description.d.ts.map +1 -0
- package/dist/components/banner/banner-description.styles.d.ts +2 -0
- package/dist/components/banner/banner-description.styles.d.ts.map +1 -0
- package/dist/components/banner/banner-icon.d.ts +11 -0
- package/dist/components/banner/banner-icon.d.ts.map +1 -0
- package/dist/components/banner/banner-title.d.ts +12 -0
- package/dist/components/banner/banner-title.d.ts.map +1 -0
- package/dist/components/banner/banner-title.styles.d.ts +2 -0
- package/dist/components/banner/banner-title.styles.d.ts.map +1 -0
- package/dist/components/banner/banner.d.ts +51 -0
- package/dist/components/banner/banner.d.ts.map +1 -0
- package/dist/components/banner/banner.styles.d.ts +2 -0
- package/dist/components/banner/banner.styles.d.ts.map +1 -0
- package/dist/components/banner/index.d.ts +9 -0
- package/dist/components/banner/index.d.ts.map +1 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +776 -566
- package/dist/index.js.map +1 -1
- package/dist/stories/story-utils.d.ts +4 -0
- package/dist/stories/story-utils.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8,19 +8,19 @@ function t(t,o,e,r){if("a"===e&&!r)throw new TypeError("Private accessor was def
|
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/;var c;const h=window,u=h.trustedTypes,
|
|
11
|
+
*/;var c;const h=window,u=h.trustedTypes,b=u?u.emptyScript:"",g=h.reactiveElementPolyfillSupport,m={toAttribute(t,o){switch(o){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,o){let e=t;switch(o){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(t){e=null}}return e}},p=(t,o)=>o!==t&&(o==o||t==t),f={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:p};class $ extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var o;this.finalize(),(null!==(o=this.h)&&void 0!==o?o:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((o,e)=>{const r=this._$Ep(e,o);void 0!==r&&(this._$Ev.set(r,e),t.push(r))})),t}static createProperty(t,o=f){if(o.state&&(o.attribute=!1),this.finalize(),this.elementProperties.set(t,o),!o.noAccessor&&!this.prototype.hasOwnProperty(t)){const e="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,e,o);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,o,e){return{get(){return this[o]},set(r){const i=this[t];this[o]=r,this.requestUpdate(t,i,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||f}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,o=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const e of o)this.createProperty(e,t[e])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const o=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)o.unshift(d(t))}else void 0!==t&&o.push(d(t));return o}static _$Ep(t,o){const e=o.attribute;return!1===e?void 0:"string"==typeof e?e:"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 o,e;(null!==(o=this._$ES)&&void 0!==o?o:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(e=t.hostConnected)||void 0===e||e.call(t))}removeController(t){var o;null===(o=this._$ES)||void 0===o||o.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,o)=>{this.hasOwnProperty(o)&&(this._$Ei.set(o,this[o]),delete this[o])}))}createRenderRoot(){var t;const o=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,o)=>{r?t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((o=>{const r=document.createElement("style"),i=e.litNonce;void 0!==i&&r.setAttribute("nonce",i),r.textContent=o.cssText,t.appendChild(r)}))})(o,this.constructor.elementStyles),o}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 o;return null===(o=t.hostConnected)||void 0===o?void 0:o.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var o;return null===(o=t.hostDisconnected)||void 0===o?void 0:o.call(t)}))}attributeChangedCallback(t,o,e){this._$AK(t,e)}_$EO(t,o,e=f){var r;const i=this.constructor._$Ep(t,e);if(void 0!==i&&!0===e.reflect){const n=(void 0!==(null===(r=e.converter)||void 0===r?void 0:r.toAttribute)?e.converter:m).toAttribute(o,e.type);this._$El=t,null==n?this.removeAttribute(i):this.setAttribute(i,n),this._$El=null}}_$AK(t,o){var e;const r=this.constructor,i=r._$Ev.get(t);if(void 0!==i&&this._$El!==i){const t=r.getPropertyOptions(i),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(e=t.converter)||void 0===e?void 0:e.fromAttribute)?t.converter:m;this._$El=i,this[i]=n.fromAttribute(o,t.type),this._$El=null}}requestUpdate(t,o,e){let r=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||p)(this[t],o)?(this._$AL.has(t)||this._$AL.set(t,o),!0===e.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,e))):r=!1),!this.isUpdatePending&&r&&(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,o)=>this[o]=t)),this._$Ei=void 0);let o=!1;const e=this._$AL;try{o=this.shouldUpdate(e),o?(this.willUpdate(e),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var o;return null===(o=t.hostUpdate)||void 0===o?void 0:o.call(t)})),this.update(e)):this._$Ek()}catch(t){throw o=!1,this._$Ek(),t}o&&this._$AE(e)}willUpdate(t){}_$AE(t){var o;null===(o=this._$ES)||void 0===o||o.forEach((t=>{var o;return null===(o=t.hostUpdated)||void 0===o?void 0:o.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,o)=>this._$EO(o,this[o],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright 2017 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
|
-
var y;$.finalized=!0,$.elementProperties=new Map,$.elementStyles=[],$.shadowRootOptions={mode:"open"},null==
|
|
17
|
+
var y;$.finalized=!0,$.elementProperties=new Map,$.elementStyles=[],$.shadowRootOptions={mode:"open"},null==g||g({ReactiveElement:$}),(null!==(c=h.reactiveElementVersions)&&void 0!==c?c:h.reactiveElementVersions=[]).push("1.6.1");const v=window,w=v.trustedTypes,x=w?w.createPolicy("lit-html",{createHTML:t=>t}):void 0,k=`lit$${(Math.random()+"").slice(9)}$`,z="?"+k,S=`<${z}>`,C=document,L=(t="")=>C.createComment(t),M=t=>null===t||"object"!=typeof t&&"function"!=typeof t,A=Array.isArray,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,B=/>/g,_=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),E=/'/g,O=/"/g,T=/^(?:script|style|textarea|title)$/i,U=(t=>(o,...e)=>({_$litType$:t,strings:o,values:e}))(1),N=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),P=new WeakMap,Z=C.createTreeWalker(C,129,null,!1),D=(t,o)=>{const e=t.length-1,r=[];let i,n=2===o?"<svg>":"",s=j;for(let o=0;o<e;o++){const e=t[o];let l,a,d=-1,c=0;for(;c<e.length&&(s.lastIndex=c,a=s.exec(e),null!==a);)c=s.lastIndex,s===j?"!--"===a[1]?s=W:void 0!==a[1]?s=B:void 0!==a[2]?(T.test(a[2])&&(i=RegExp("</"+a[2],"g")),s=_):void 0!==a[3]&&(s=_):s===_?">"===a[0]?(s=null!=i?i:j,d=-1):void 0===a[1]?d=-2:(d=s.lastIndex-a[2].length,l=a[1],s=void 0===a[3]?_:'"'===a[3]?O:E):s===O||s===E?s=_:s===W||s===B?s=j:(s=_,i=void 0);const h=s===_&&t[o+1].startsWith("/>")?" ":"";n+=s===j?e+S:d>=0?(r.push(l),e.slice(0,d)+"$lit$"+e.slice(d)+k+h):e+k+(-2===d?(r.push(void 0),o):h)}const l=n+(t[e]||"<?>")+(2===o?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==x?x.createHTML(l):l,r]};class H{constructor({strings:t,_$litType$:o},e){let r;this.parts=[];let i=0,n=0;const s=t.length-1,l=this.parts,[a,d]=D(t,o);if(this.el=H.createElement(a,e),Z.currentNode=this.el.content,2===o){const t=this.el.content,o=t.firstChild;o.remove(),t.append(...o.childNodes)}for(;null!==(r=Z.nextNode())&&l.length<s;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const o of r.getAttributeNames())if(o.endsWith("$lit$")||o.startsWith(k)){const e=d[n++];if(t.push(o),void 0!==e){const t=r.getAttribute(e.toLowerCase()+"$lit$").split(k),o=/([.?@])?(.*)/.exec(e);l.push({type:1,index:i,name:o[2],strings:t,ctor:"."===o[1]?q:"?"===o[1]?K:"@"===o[1]?Q:J})}else l.push({type:6,index:i})}for(const o of t)r.removeAttribute(o)}if(T.test(r.tagName)){const t=r.textContent.split(k),o=t.length-1;if(o>0){r.textContent=w?w.emptyScript:"";for(let e=0;e<o;e++)r.append(t[e],L()),Z.nextNode(),l.push({type:2,index:++i});r.append(t[o],L())}}}else if(8===r.nodeType)if(r.data===z)l.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(k,t+1));)l.push({type:7,index:i}),t+=k.length-1}i++}}static createElement(t,o){const e=C.createElement("template");return e.innerHTML=t,e}}function G(t,o,e=t,r){var i,n,s,l;if(o===N)return o;let a=void 0!==r?null===(i=e._$Co)||void 0===i?void 0:i[r]:e._$Cl;const d=M(o)?void 0:o._$litDirective$;return(null==a?void 0:a.constructor)!==d&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===d?a=void 0:(a=new d(t),a._$AT(t,e,r)),void 0!==r?(null!==(s=(l=e)._$Co)&&void 0!==s?s:l._$Co=[])[r]=a:e._$Cl=a),void 0!==a&&(o=G(t,a._$AS(t,o.values),a,r)),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:e},parts:r}=this._$AD,i=(null!==(o=null==t?void 0:t.creationScope)&&void 0!==o?o:C).importNode(e,!0);Z.currentNode=i;let n=Z.nextNode(),s=0,l=0,a=r[0];for(;void 0!==a;){if(s===a.index){let o;2===a.type?o=new V(n,n.nextSibling,this,t):1===a.type?o=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(o=new X(n,this,t)),this.u.push(o),a=r[++l]}s!==(null==a?void 0:a.index)&&(n=Z.nextNode(),s++)}return i}p(t){let o=0;for(const e of this.u)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,o),o+=e.strings.length-2):e._$AI(t[o])),o++}}class V{constructor(t,o,e,r){var i;this.type=2,this._$AH=R,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=e,this.options=r,this._$Cm=null===(i=null==r?void 0:r.isConnected)||void 0===i||i}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=G(this,t,o),M(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&&M(this._$AH)?this._$AA.nextSibling.data=t:this.T(C.createTextNode(t)),this._$AH=t}$(t){var o;const{values:e,_$litType$:r}=t,i="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=H.createElement(r.h,this.options)),r);if((null===(o=this._$AH)||void 0===o?void 0:o._$AD)===i)this._$AH.p(e);else{const t=new I(i,this),o=t.v(this.options);t.p(e),this.T(o),this._$AH=t}}_$AC(t){let o=P.get(t.strings);return void 0===o&&P.set(t.strings,o=new H(t)),o}k(t){A(this._$AH)||(this._$AH=[],this._$AR());const o=this._$AH;let e,r=0;for(const i of t)r===o.length?o.push(e=new V(this.O(L()),this.O(L()),this,this.options)):e=o[r],e._$AI(i),r++;r<o.length&&(this._$AR(e&&e._$AB.nextSibling,r),o.length=r)}_$AR(t=this._$AA.nextSibling,o){var e;for(null===(e=this._$AP)||void 0===e||e.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 J{constructor(t,o,e,r,i){this.type=1,this._$AH=R,this._$AN=void 0,this.element=t,this.name=o,this._$AM=r,this.options=i,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=R}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,o=this,e,r){const i=this.strings;let n=!1;if(void 0===i)t=G(this,t,o,0),n=!M(t)||t!==this._$AH&&t!==N,n&&(this._$AH=t);else{const r=t;let s,l;for(t=i[0],s=0;s<i.length-1;s++)l=G(this,r[e+s],o,s),l===N&&(l=this._$AH[s]),n||(n=!M(l)||l!==this._$AH[s]),l===R?t=R:t!==R&&(t+=(null!=l?l:"")+i[s+1]),this._$AH[s]=l}n&&!r&&this.j(t)}j(t){t===R?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class q extends J{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===R?void 0:t}}const F=w?w.emptyScript:"";class K extends J{constructor(){super(...arguments),this.type=4}j(t){t&&t!==R?this.element.setAttribute(this.name,F):this.element.removeAttribute(this.name)}}class Q extends J{constructor(t,o,e,r,i){super(t,o,e,r,i),this.type=5}_$AI(t,o=this){var e;if((t=null!==(e=G(this,t,o,0))&&void 0!==e?e:R)===N)return;const r=this._$AH,i=t===R&&r!==R||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==R&&(r===R||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var o,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(o=this.options)||void 0===o?void 0:o.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class X{constructor(t,o,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){G(this,t)}}const Y=v.litHtmlPolyfillSupport;null==Y||Y(H,V),(null!==(y=v.litHtmlVersions)&&void 0!==y?y:v.litHtmlVersions=[]).push("2.6.1");
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
22
|
*/
|
|
23
|
-
var tt,ot;class et extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,o;const e=super.createRenderRoot();return null!==(t=(o=this.renderOptions).renderBefore)&&void 0!==t||(o.renderBefore=e.firstChild),e}update(t){const o=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,o,e)=>{var r,i;const n=null!==(r=null==e?void 0:e.renderBefore)&&void 0!==r?r:o;let s=n._$litPart$;if(void 0===s){const t=null!==(i=null==e?void 0:e.renderBefore)&&void 0!==i?i:null;n._$litPart$=s=new
|
|
23
|
+
var tt,ot;class et extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,o;const e=super.createRenderRoot();return null!==(t=(o=this.renderOptions).renderBefore)&&void 0!==t||(o.renderBefore=e.firstChild),e}update(t){const o=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,o,e)=>{var r,i;const n=null!==(r=null==e?void 0:e.renderBefore)&&void 0!==r?r:o;let s=n._$litPart$;if(void 0===s){const t=null!==(i=null==e?void 0:e.renderBefore)&&void 0!==i?i:null;n._$litPart$=s=new V(o.insertBefore(L(),t),t,void 0,null!=e?e:{})}return s._$AI(t),s})(o,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 N}}et.finalized=!0,et._$litElement$=!0,null===(tt=globalThis.litElementHydrateSupport)||void 0===tt||tt.call(globalThis,{LitElement:et});const rt=globalThis.litElementPolyfillSupport;null==rt||rt({LitElement:et}),(null!==(ot=globalThis.litElementVersions)&&void 0!==ot?ot:globalThis.litElementVersions=[]).push("3.2.2");
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
@@ -31,25 +31,25 @@ const it=1,nt=t=>(...o)=>({_$litDirective$:t,values:o});class st{constructor(t){
|
|
|
31
31
|
* @license
|
|
32
32
|
* Copyright 2018 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
|
-
*/const lt=nt(class extends st{constructor(t){var o;if(super(t),t.type!==it||"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 e,r;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===(e=this.st)||void 0===e?void 0:e.has(t))&&this.nt.add(t);return this.render(o)}const i=t.element.classList;this.nt.forEach((t=>{t in o||(i.remove(t),this.nt.delete(t))}));for(const t in o){const e=!!o[t];e===this.nt.has(t)||(null===(r=this.st)||void 0===r?void 0:r.has(t))||(e?(i.add(t),this.nt.add(t)):(i.remove(t),this.nt.delete(t)))}return N}});var at;class dt extends et{constructor(){super(...arguments),at.set(this,void 0)}static get properties(){return{assignedForm:{type:String,attribute:"form"}}}get form(){return t(this,at,"f")}updated(o){super.updated(o),(o.has("form")||null==t(this,at,"f"))&&this.getAssignedForm()}getAssignedForm(){if(this.hasAttribute("form")){const t=this.getRootNode(),e=this.getAttribute("form");o(this,at,t.getElementById(e),"f")}else o(this,at,this.closest("form"),"f")}}at=new WeakMap;var ct,ht,ut={},gt={};gt.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"},Object.defineProperty(ut,"i",{value:!0});var bt=gt;function mt(t){return bt.LoadsmartTheme[t]}function pt(t){var o=mt(t);return null==o?o:"--m-".concat(t)}var ft=Object.keys(bt.LoadsmartTheme).filter((function(t){return!t.startsWith("brand-")&&!t.startsWith("platform-")}));function $t(t){return ft.filter((function(o){return o.startsWith(t)}))}var yt=$t("color-"),vt=$t("color-background-"),wt=$t("spacing-"),xt=$t("font-family-"),kt=$t("font-size-"),zt=$t("font-weight-"),St=$t("line-height-"),Ct=$t("border-"),At=$t("border-radius-"),jt=$t("opacity-"),Mt=$t("elevation-"),_t=$t("glow-"),Wt=$t("global-");function Et(t){return l(ct(t))}function Bt(t,o=1){return l(ct(t,o))}ut.BACKGROUND_COLOR_TOKENS=vt,ut.BORDER_RADIUS_TOKENS=At,ut.BORDER_TOKENS=Ct,ut.BORDER_WIDTH_TOKENS=["border-none","border-thin","border-medium","border-thick"],ut.COLOR_TOKENS=yt,ut.ELEVATION_TOKENS=Mt,ut.FONT_FAMILY_TOKENS=xt,ut.FONT_SIZE_TOKENS=kt,ut.FONT_WEIGHT_TOKENS=zt,ut.GLOBAL_TOKENS=Wt,ut.GLOW_TOKENS=_t,ut.LINE_HEIGHT_TOKENS=St,ut.OPACITY_TOKENS=jt,ut.SPACING_TOKENS=wt,ut.TOKENS=ft,ht=ut.getToken=mt,ct=ut.toCSSValue=function(t,o){var e=mt(t);return null==e?"":t.startsWith("color-")?"rgba(var(".concat(pt(t),", ").concat(e,"), ").concat(null!=o?o:1,")"):"var(".concat(pt(t),", ").concat(e,")")},ut.toCSSVariable=pt;var Ot={toArray:function(t){return null==t?[]:Array.isArray(t)?t:[t]}},Tt=Ot.toArray;function Lt(t){return l(`\n\t\t${function(t){return l(`\n\t\tmargin-inline-end: ${t}\n\t`)}(t)};\n\t\t${function(t){return l(`\n\t\tmargin-inline-start: ${t}\n\t`)}(t)}\n\t`)}function Ut(t){return l(`\n\t\t${function(t){return l(`\n\t\tmargin-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return l(`\n\t\tmargin-block-end: ${t}\n\t`)}(t)}\n\t`)}function Nt(t){return l(`\n\t\t${function(t){return l(`\n\t\tpadding-inline-end: ${t}\n\t`)}(t)};\n\t\t${function(t){return l(`\n\t\tpadding-inline-start: ${t}\n\t`)}(t)}\n\t`)}function Rt(t){return l(`\n\t\t${function(t){return l(`\n\t\tpadding-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return l(`\n\t\tpadding-block-end: ${t}\n\t`)}(t)}\n\t`)}const Pt={property:"all",delay:"0s",duration:"0.35s",easing:"ease-in-out"};function Dt(t){const o=Tt(t).map((t=>function(t){const o={...Pt,...t};return l(`${o.property} ${o.duration} ${o.easing} ${o.delay}`)}(t))).join(", ");return l(`\n\t\ttransition: ${o}\n\t`)}function Gt(t){const o=l("\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 l(`${o}\n${function(t){switch(t){case"hero-lg-bold":return`\n\t\t\t\tfont-family: ${Et("font-family-title")};\n\t\t\t\tline-height: ${Et("line-height-6")};\n\t\t\t\tfont-size: ${Et("font-size-9")};\n\t\t\t\tfont-weight: ${Et("font-weight-bold")}\n\t\t\t`;case"hero-lg":return`\n\t\t\t\tfont-family: ${Et("font-family-title")};\n\t\t\t\tline-height: ${Et("line-height-6")};\n\t\t\t\tfont-size: ${Et("font-size-9")};\n\t\t\t\tfont-weight: ${Et("font-weight-regular")}\n\t\t\t`;case"hero-md-bold":return`\n\t\t\t\tfont-family: ${Et("font-family-title")};\n\t\t\t\tline-height: ${Et("line-height-6")};\n\t\t\t\tfont-size: ${Et("font-size-8")};\n\t\t\t\tfont-weight: ${Et("font-weight-bold")}\n\t\t\t`;case"hero-md":return`\n\t\t\t\tfont-family: ${Et("font-family-title")};\n\t\t\t\tline-height: ${Et("line-height-6")};\n\t\t\t\tfont-size: ${Et("font-size-8")};\n\t\t\t\tfont-weight: ${Et("font-weight-regular")}\n\t\t\t`;case"hero-sm-bold":return`\n\t\t\t\tfont-family: ${Et("font-family-title")};\n\t\t\t\tline-height: ${Et("line-height-6")};\n\t\t\t\tfont-size: ${Et("font-size-7")};\n\t\t\t\tfont-weight: ${Et("font-weight-bold")}\n\t\t\t`;case"hero-sm":return`\n\t\t\t\tfont-family: ${Et("font-family-title")};\n\t\t\t\tline-height: ${Et("line-height-6")};\n\t\t\t\tfont-size: ${Et("font-size-7")};\n\t\t\t\tfont-weight: ${Et("font-weight-regular")}\n\t\t\t`;case"heading-lg-bold":return`\n\t\t\t\t\tfont-family: ${Et("font-family-title")};\n\t\t\t\t\tline-height: ${Et("line-height-5")};\n\t\t\t\t\tfont-size: ${Et("font-size-6")};\n\t\t\t\t\tfont-weight: ${Et("font-weight-bold")}\n\t\t\t\t`;case"heading-lg":return`\n\t\t\t\tfont-family: ${Et("font-family-title")};\n\t\t\t\tline-height: ${Et("line-height-5")};\n\t\t\t\tfont-size: ${Et("font-size-6")};\n\t\t\t\tfont-weight: ${Et("font-weight-regular")}\n\t\t\t`;case"heading-md-bold":return`\n\t\t\t\tfont-family: ${Et("font-family-title")};\n\t\t\t\tline-height: ${Et("line-height-5")};\n\t\t\t\tfont-size: ${Et("font-size-5")};\n\t\t\t\tfont-weight: ${Et("font-weight-bold")}\n\t\t\t`;case"heading-md":return`\n\t\t\t\tfont-family: ${Et("font-family-title")};\n\t\t\t\tline-height: ${Et("line-height-5")};\n\t\t\t\tfont-size: ${Et("font-size-5")};\n\t\t\t\tfont-weight: ${Et("font-weight-regular")}\n\t\t\t`;case"heading-sm-bold":return`\n\t\t\t\tfont-family: ${Et("font-family-title")};\n\t\t\t\tline-height: ${Et("line-height-5")};\n\t\t\t\tfont-size: ${Et("font-size-4")};\n\t\t\t\tfont-weight: ${Et("font-weight-bold")}\n\t\t\t`;case"heading-sm":return`\n\t\t\t\tfont-family: ${Et("font-family-title")};\n\t\t\t\tline-height: ${Et("line-height-5")};\n\t\t\t\tfont-size: ${Et("font-size-4")};\n\t\t\t\tfont-weight: ${Et("font-weight-regular")}\n\t\t\t`;case"body-lg-bold":return`\n\t\t\t\t\tfont-family: ${Et("font-family-default")};\n\t\t\t\t\tline-height: ${Et("line-height-6")};\n\t\t\t\t\tfont-size: ${Et("font-size-5")};\n\t\t\t\t\tfont-weight: ${Et("font-weight-bold")}\n\t\t\t\t`;case"body-lg":return`\n\t\t\t\t\tfont-family: ${Et("font-family-default")};\n\t\t\t\t\tline-height: ${Et("line-height-6")};\n\t\t\t\t\tfont-size: ${Et("font-size-5")};\n\t\t\t\t\tfont-weight: ${Et("font-weight-regular")}\n\t\t\t\t`;case"body-md":case"number-md":return`\n\t\t\t\tfont-family: ${Et("font-family-default")};\n\t\t\t\tline-height: ${Et("line-height-5")};\n\t\t\t\tfont-size: ${Et("font-size-3")};\n\t\t\t\tfont-weight: ${Et("font-weight-regular")}\n\t\t\t`;case"body-md-underline":return`\n\t\t\t\tfont-family: ${Et("font-family-default")};\n\t\t\t\tline-height: ${Et("line-height-5")};\n\t\t\t\tfont-size: ${Et("font-size-3")};\n\t\t\t\tfont-weight: ${Et("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: ${Et("font-family-default")};\n\t\t\t\tline-height: ${Et("line-height-5")};\n\t\t\t\tfont-size: ${Et("font-size-3")};\n\t\t\t\tfont-weight: ${Et("font-weight-bold")}\n\t\t\t`;case"body-md-bold-underline":return`\n\t\t\t\tfont-family: ${Et("font-family-default")};\n\t\t\t\tline-height: ${Et("line-height-5")};\n\t\t\t\tfont-size: ${Et("font-size-3")};\n\t\t\t\tfont-weight: ${Et("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: ${Et("font-family-default")};\n\t\t\t\tline-height: ${Et("line-height-4")};\n\t\t\t\tfont-size: ${Et("font-size-2")};\n\t\t\t\tfont-weight: ${Et("font-weight-regular")}\n\t\t\t`;case"body-sm-underline":return`\n\t\t\t\tfont-family: ${Et("font-family-default")};\n\t\t\t\tline-height: ${Et("line-height-4")};\n\t\t\t\tfont-size: ${Et("font-size-2")};\n\t\t\t\tfont-weight: ${Et("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: ${Et("font-family-default")};\n\t\t\t\tline-height: ${Et("line-height-4")};\n\t\t\t\tfont-size: ${Et("font-size-2")};\n\t\t\t\tfont-weight: ${Et("font-weight-bold")}\n\t\t\t`;case"body-sm-bold-underline":return`\n\t\t\t\tfont-family: ${Et("font-family-default")};\n\t\t\t\tline-height: ${Et("line-height-4")};\n\t\t\t\tfont-size: ${Et("font-size-2")};\n\t\t\t\tfont-weight: ${Et("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"button-lg":return`\n\t\t\t\tfont-family: ${Et("font-family-default")};\n\t\t\t\tline-height: ${Et("line-height-1")};\n\t\t\t\tfont-size: ${Et("font-size-4")};\n\t\t\t\tfont-weight: ${Et("font-weight-bold")}\n\t\t\t`;case"button-md":return`\n\t\t\t\tfont-family: ${Et("font-family-default")};\n\t\t\t\tline-height: ${Et("line-height-1")};\n\t\t\t\tfont-size: ${Et("font-size-3")};\n\t\t\t\tfont-weight: ${Et("font-weight-bold")}\n\t\t\t`;case"button-sm":return`\n\t\t\t\tfont-family: ${Et("font-family-default")};\n\t\t\t\tline-height: ${Et("line-height-1")};\n\t\t\t\tfont-size: ${Et("font-size-2")};\n\t\t\t\tfont-weight: ${Et("font-weight-bold")}\n\t\t\t`;case"table-header-md":return`\n\t\t\t\tfont-family: ${Et("font-family-default")};\n\t\t\t\tline-height: ${Et("line-height-1")};\n\t\t\t\tfont-size: ${Et("font-size-3")};\n\t\t\t\tfont-weight: ${Et("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: ${Et("font-family-default")};\n\t\t\t\tline-height: ${Et("line-height-1")};\n\t\t\t\tfont-size: ${Et("font-size-2")};\n\t\t\t\tfont-weight: ${Et("font-weight-medium")}\n\t\t\t`;case"chips-md":return`\n\t\t\t\t\tfont-family: ${Et("font-family-default")};\n\t\t\t\t\tline-height: ${Et("line-height-1")};\n\t\t\t\t\tfont-size: ${Et("font-size-2")};\n\t\t\t\t\tfont-weight: ${Et("font-weight-bold")}\n\t\t\t\t`;case"chips-sm":return`\n\t\t\t\tfont-family: ${Et("font-family-default")};\n\t\t\t\tline-height: ${Et("line-height-1")};\n\t\t\t\tfont-size: ${Et("font-size-1")};\n\t\t\t\tfont-weight: ${Et("font-weight-medium")};\n\t\t\t\ttext-transform: uppercase\n\t\t\t`;default:return""}}(t)}`)}function It(t,o=""){return l(Tt(t).map((t=>[`${t}.is-disabled`,`${t}:disabled`].map((t=>[t,o].join(" "))).join(", "))).join(", "))}const Zt={active:function(t){return l(Tt(t).map((t=>`${t}:not(.is-disabled, :disabled):active`)).join(", "))},focus:function(t){return l(Tt(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 l(Tt(t).map((t=>`${t}:not(.is-disabled, :disabled):hover`)).join(", "))}};function Ht(){return a`
|
|
34
|
+
*/const lt=nt(class extends st{constructor(t){var o;if(super(t),t.type!==it||"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 e,r;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===(e=this.st)||void 0===e?void 0:e.has(t))&&this.nt.add(t);return this.render(o)}const i=t.element.classList;this.nt.forEach((t=>{t in o||(i.remove(t),this.nt.delete(t))}));for(const t in o){const e=!!o[t];e===this.nt.has(t)||(null===(r=this.st)||void 0===r?void 0:r.has(t))||(e?(i.add(t),this.nt.add(t)):(i.remove(t),this.nt.delete(t)))}return N}});var at;class dt extends et{constructor(){super(...arguments),at.set(this,void 0)}static get properties(){return{assignedForm:{type:String,attribute:"form"}}}get form(){return t(this,at,"f")}updated(o){super.updated(o),(o.has("form")||null==t(this,at,"f"))&&this.getAssignedForm()}getAssignedForm(){if(this.hasAttribute("form")){const t=this.getRootNode(),e=this.getAttribute("form");o(this,at,t.getElementById(e),"f")}else o(this,at,this.closest("form"),"f")}}at=new WeakMap;var ct,ht,ut={},bt={};bt.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"},Object.defineProperty(ut,"i",{value:!0});var gt=bt;function mt(t){return gt.LoadsmartTheme[t]}function pt(t){var o=mt(t);return null==o?o:"--m-".concat(t)}var ft=Object.keys(gt.LoadsmartTheme).filter((function(t){return!t.startsWith("brand-")&&!t.startsWith("platform-")}));function $t(t){return ft.filter((function(o){return o.startsWith(t)}))}var yt=$t("color-"),vt=$t("color-background-"),wt=$t("spacing-"),xt=$t("font-family-"),kt=$t("font-size-"),zt=$t("font-weight-"),St=$t("line-height-"),Ct=$t("border-"),Lt=$t("border-radius-"),Mt=$t("opacity-"),At=$t("elevation-"),jt=$t("glow-"),Wt=$t("global-");function Bt(t){return l(ct(t))}function _t(t,o=1){return l(ct(t,o))}ut.BACKGROUND_COLOR_TOKENS=vt,ut.BORDER_RADIUS_TOKENS=Lt,ut.BORDER_TOKENS=Ct,ut.BORDER_WIDTH_TOKENS=["border-none","border-thin","border-medium","border-thick"],ut.COLOR_TOKENS=yt,ut.ELEVATION_TOKENS=At,ut.FONT_FAMILY_TOKENS=xt,ut.FONT_SIZE_TOKENS=kt,ut.FONT_WEIGHT_TOKENS=zt,ut.GLOBAL_TOKENS=Wt,ut.GLOW_TOKENS=jt,ut.LINE_HEIGHT_TOKENS=St,ut.OPACITY_TOKENS=Mt,ut.SPACING_TOKENS=wt,ut.TOKENS=ft,ht=ut.getToken=mt,ct=ut.toCSSValue=function(t,o){var e=mt(t);return null==e?"":t.startsWith("color-")?"rgba(var(".concat(pt(t),", ").concat(e,"), ").concat(null!=o?o:1,")"):"var(".concat(pt(t),", ").concat(e,")")},ut.toCSSVariable=pt;var Et={toArray:function(t){return null==t?[]:Array.isArray(t)?t:[t]}},Ot=Et.toArray;function Tt(t){return l(`\n\t\t${function(t){return l(`\n\t\tmargin-inline-end: ${t}\n\t`)}(t)};\n\t\t${function(t){return l(`\n\t\tmargin-inline-start: ${t}\n\t`)}(t)}\n\t`)}function Ut(t){return l(`\n\t\t${function(t){return l(`\n\t\tmargin-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return l(`\n\t\tmargin-block-end: ${t}\n\t`)}(t)}\n\t`)}function Nt(t){return l(`\n\t\t${Tt(t)};\n\t\t${Ut(t)}\n\t`)}function Rt(t){return l(`\n\t\t${function(t){return l(`\n\t\tpadding-inline-end: ${t}\n\t`)}(t)};\n\t\t${function(t){return l(`\n\t\tpadding-inline-start: ${t}\n\t`)}(t)}\n\t`)}function Pt(t){return l(`\n\t\t${function(t){return l(`\n\t\tpadding-block-start: ${t}\n\t`)}(t)};\n\t\t${function(t){return l(`\n\t\tpadding-block-end: ${t}\n\t`)}(t)}\n\t`)}function Zt(t){return l(`\n\t\t${Rt(t)};\n\t\t${Pt(t)}\n\t`)}const Dt={property:"all",delay:"0s",duration:"0.35s",easing:"ease-in-out"};function Ht(t){const o=Ot(t).map((t=>function(t){const o={...Dt,...t};return l(`${o.property} ${o.duration} ${o.easing} ${o.delay}`)}(t))).join(", ");return l(`\n\t\ttransition: ${o}\n\t`)}function Gt(t){const o=l("\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 l(`${o}\n${function(t){switch(t){case"hero-lg-bold":return`\n\t\t\t\tfont-family: ${Bt("font-family-title")};\n\t\t\t\tline-height: ${Bt("line-height-6")};\n\t\t\t\tfont-size: ${Bt("font-size-9")};\n\t\t\t\tfont-weight: ${Bt("font-weight-bold")}\n\t\t\t`;case"hero-lg":return`\n\t\t\t\tfont-family: ${Bt("font-family-title")};\n\t\t\t\tline-height: ${Bt("line-height-6")};\n\t\t\t\tfont-size: ${Bt("font-size-9")};\n\t\t\t\tfont-weight: ${Bt("font-weight-regular")}\n\t\t\t`;case"hero-md-bold":return`\n\t\t\t\tfont-family: ${Bt("font-family-title")};\n\t\t\t\tline-height: ${Bt("line-height-6")};\n\t\t\t\tfont-size: ${Bt("font-size-8")};\n\t\t\t\tfont-weight: ${Bt("font-weight-bold")}\n\t\t\t`;case"hero-md":return`\n\t\t\t\tfont-family: ${Bt("font-family-title")};\n\t\t\t\tline-height: ${Bt("line-height-6")};\n\t\t\t\tfont-size: ${Bt("font-size-8")};\n\t\t\t\tfont-weight: ${Bt("font-weight-regular")}\n\t\t\t`;case"hero-sm-bold":return`\n\t\t\t\tfont-family: ${Bt("font-family-title")};\n\t\t\t\tline-height: ${Bt("line-height-6")};\n\t\t\t\tfont-size: ${Bt("font-size-7")};\n\t\t\t\tfont-weight: ${Bt("font-weight-bold")}\n\t\t\t`;case"hero-sm":return`\n\t\t\t\tfont-family: ${Bt("font-family-title")};\n\t\t\t\tline-height: ${Bt("line-height-6")};\n\t\t\t\tfont-size: ${Bt("font-size-7")};\n\t\t\t\tfont-weight: ${Bt("font-weight-regular")}\n\t\t\t`;case"heading-lg-bold":return`\n\t\t\t\t\tfont-family: ${Bt("font-family-title")};\n\t\t\t\t\tline-height: ${Bt("line-height-5")};\n\t\t\t\t\tfont-size: ${Bt("font-size-6")};\n\t\t\t\t\tfont-weight: ${Bt("font-weight-bold")}\n\t\t\t\t`;case"heading-lg":return`\n\t\t\t\tfont-family: ${Bt("font-family-title")};\n\t\t\t\tline-height: ${Bt("line-height-5")};\n\t\t\t\tfont-size: ${Bt("font-size-6")};\n\t\t\t\tfont-weight: ${Bt("font-weight-regular")}\n\t\t\t`;case"heading-md-bold":return`\n\t\t\t\tfont-family: ${Bt("font-family-title")};\n\t\t\t\tline-height: ${Bt("line-height-5")};\n\t\t\t\tfont-size: ${Bt("font-size-5")};\n\t\t\t\tfont-weight: ${Bt("font-weight-bold")}\n\t\t\t`;case"heading-md":return`\n\t\t\t\tfont-family: ${Bt("font-family-title")};\n\t\t\t\tline-height: ${Bt("line-height-5")};\n\t\t\t\tfont-size: ${Bt("font-size-5")};\n\t\t\t\tfont-weight: ${Bt("font-weight-regular")}\n\t\t\t`;case"heading-sm-bold":return`\n\t\t\t\tfont-family: ${Bt("font-family-title")};\n\t\t\t\tline-height: ${Bt("line-height-5")};\n\t\t\t\tfont-size: ${Bt("font-size-4")};\n\t\t\t\tfont-weight: ${Bt("font-weight-bold")}\n\t\t\t`;case"heading-sm":return`\n\t\t\t\tfont-family: ${Bt("font-family-title")};\n\t\t\t\tline-height: ${Bt("line-height-5")};\n\t\t\t\tfont-size: ${Bt("font-size-4")};\n\t\t\t\tfont-weight: ${Bt("font-weight-regular")}\n\t\t\t`;case"body-lg-bold":return`\n\t\t\t\t\tfont-family: ${Bt("font-family-default")};\n\t\t\t\t\tline-height: ${Bt("line-height-6")};\n\t\t\t\t\tfont-size: ${Bt("font-size-5")};\n\t\t\t\t\tfont-weight: ${Bt("font-weight-bold")}\n\t\t\t\t`;case"body-lg":return`\n\t\t\t\t\tfont-family: ${Bt("font-family-default")};\n\t\t\t\t\tline-height: ${Bt("line-height-6")};\n\t\t\t\t\tfont-size: ${Bt("font-size-5")};\n\t\t\t\t\tfont-weight: ${Bt("font-weight-regular")}\n\t\t\t\t`;case"body-md":case"number-md":return`\n\t\t\t\tfont-family: ${Bt("font-family-default")};\n\t\t\t\tline-height: ${Bt("line-height-5")};\n\t\t\t\tfont-size: ${Bt("font-size-3")};\n\t\t\t\tfont-weight: ${Bt("font-weight-regular")}\n\t\t\t`;case"body-md-underline":return`\n\t\t\t\tfont-family: ${Bt("font-family-default")};\n\t\t\t\tline-height: ${Bt("line-height-5")};\n\t\t\t\tfont-size: ${Bt("font-size-3")};\n\t\t\t\tfont-weight: ${Bt("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: ${Bt("font-family-default")};\n\t\t\t\tline-height: ${Bt("line-height-5")};\n\t\t\t\tfont-size: ${Bt("font-size-3")};\n\t\t\t\tfont-weight: ${Bt("font-weight-bold")}\n\t\t\t`;case"body-md-bold-underline":return`\n\t\t\t\tfont-family: ${Bt("font-family-default")};\n\t\t\t\tline-height: ${Bt("line-height-5")};\n\t\t\t\tfont-size: ${Bt("font-size-3")};\n\t\t\t\tfont-weight: ${Bt("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: ${Bt("font-family-default")};\n\t\t\t\tline-height: ${Bt("line-height-4")};\n\t\t\t\tfont-size: ${Bt("font-size-2")};\n\t\t\t\tfont-weight: ${Bt("font-weight-regular")}\n\t\t\t`;case"body-sm-underline":return`\n\t\t\t\tfont-family: ${Bt("font-family-default")};\n\t\t\t\tline-height: ${Bt("line-height-4")};\n\t\t\t\tfont-size: ${Bt("font-size-2")};\n\t\t\t\tfont-weight: ${Bt("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: ${Bt("font-family-default")};\n\t\t\t\tline-height: ${Bt("line-height-4")};\n\t\t\t\tfont-size: ${Bt("font-size-2")};\n\t\t\t\tfont-weight: ${Bt("font-weight-bold")}\n\t\t\t`;case"body-sm-bold-underline":return`\n\t\t\t\tfont-family: ${Bt("font-family-default")};\n\t\t\t\tline-height: ${Bt("line-height-4")};\n\t\t\t\tfont-size: ${Bt("font-size-2")};\n\t\t\t\tfont-weight: ${Bt("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"button-lg":return`\n\t\t\t\tfont-family: ${Bt("font-family-default")};\n\t\t\t\tline-height: ${Bt("line-height-1")};\n\t\t\t\tfont-size: ${Bt("font-size-4")};\n\t\t\t\tfont-weight: ${Bt("font-weight-bold")}\n\t\t\t`;case"button-md":return`\n\t\t\t\tfont-family: ${Bt("font-family-default")};\n\t\t\t\tline-height: ${Bt("line-height-1")};\n\t\t\t\tfont-size: ${Bt("font-size-3")};\n\t\t\t\tfont-weight: ${Bt("font-weight-bold")}\n\t\t\t`;case"button-sm":return`\n\t\t\t\tfont-family: ${Bt("font-family-default")};\n\t\t\t\tline-height: ${Bt("line-height-1")};\n\t\t\t\tfont-size: ${Bt("font-size-2")};\n\t\t\t\tfont-weight: ${Bt("font-weight-bold")}\n\t\t\t`;case"table-header-md":return`\n\t\t\t\tfont-family: ${Bt("font-family-default")};\n\t\t\t\tline-height: ${Bt("line-height-1")};\n\t\t\t\tfont-size: ${Bt("font-size-3")};\n\t\t\t\tfont-weight: ${Bt("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: ${Bt("font-family-default")};\n\t\t\t\tline-height: ${Bt("line-height-1")};\n\t\t\t\tfont-size: ${Bt("font-size-2")};\n\t\t\t\tfont-weight: ${Bt("font-weight-medium")}\n\t\t\t`;case"chips-md":return`\n\t\t\t\t\tfont-family: ${Bt("font-family-default")};\n\t\t\t\t\tline-height: ${Bt("line-height-1")};\n\t\t\t\t\tfont-size: ${Bt("font-size-2")};\n\t\t\t\t\tfont-weight: ${Bt("font-weight-bold")}\n\t\t\t\t`;case"chips-sm":return`\n\t\t\t\tfont-family: ${Bt("font-family-default")};\n\t\t\t\tline-height: ${Bt("line-height-1")};\n\t\t\t\tfont-size: ${Bt("font-size-1")};\n\t\t\t\tfont-weight: ${Bt("font-weight-medium")};\n\t\t\t\ttext-transform: uppercase\n\t\t\t`;default:return""}}(t)}`)}function It(t,o=""){return l(Ot(t).map((t=>[`${t}.is-disabled`,`${t}:disabled`].map((t=>[t,o].join(" "))).join(", "))).join(", "))}const Vt={active:function(t){return l(Ot(t).map((t=>`${t}:not(.is-disabled, :disabled):active`)).join(", "))},focus:function(t){return l(Ot(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 l(Ot(t).map((t=>`${t}:not(.is-disabled, :disabled):hover`)).join(", "))}};function Jt(){return a`
|
|
35
35
|
:host {
|
|
36
36
|
--m-button-background-color: transparent;
|
|
37
|
-
--m-button-base-size: ${
|
|
38
|
-
--m-button-border-color: ${
|
|
39
|
-
--m-button-border-radius: ${
|
|
40
|
-
--m-button-color: ${
|
|
41
|
-
--m-button-outline-color: ${
|
|
37
|
+
--m-button-base-size: ${Bt("global-height-default")};
|
|
38
|
+
--m-button-border-color: ${_t("color-neutral-90")};
|
|
39
|
+
--m-button-border-radius: ${Bt("border-radius-s")};
|
|
40
|
+
--m-button-color: ${_t("color-text-secondary")};
|
|
41
|
+
--m-button-outline-color: ${_t("color-primary-100")};
|
|
42
42
|
--m-button-outline-offset: 2px;
|
|
43
|
-
--m-button-padding-x: ${
|
|
44
|
-
--m-button-padding-y: ${
|
|
43
|
+
--m-button-padding-x: ${Bt("spacing-4")};
|
|
44
|
+
--m-button-padding-y: ${Bt("spacing-3")};
|
|
45
45
|
/**
|
|
46
46
|
* Useful when overriding via host :slotted query.
|
|
47
47
|
*/
|
|
48
|
-
--m-button-font-size: ${
|
|
48
|
+
--m-button-font-size: ${Bt("font-size-3")};
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.button {
|
|
52
|
-
${
|
|
52
|
+
${Ht([{property:"color"},{property:"background-color"},{property:"border-color"}])};
|
|
53
53
|
|
|
54
54
|
${Gt("button-md")};
|
|
55
55
|
font-size: var(--m-button-font-size);
|
|
@@ -67,7 +67,7 @@ const it=1,nt=t=>(...o)=>({_$litDirective$:t,values:o});class st{constructor(t){
|
|
|
67
67
|
|
|
68
68
|
text-decoration: none;
|
|
69
69
|
|
|
70
|
-
gap: ${
|
|
70
|
+
gap: ${Bt("spacing-1")};
|
|
71
71
|
|
|
72
72
|
padding-inline: var(--m-button-padding-x);
|
|
73
73
|
padding-block: var(--m-button-padding-y);
|
|
@@ -87,34 +87,34 @@ const it=1,nt=t=>(...o)=>({_$litDirective$:t,values:o});class st{constructor(t){
|
|
|
87
87
|
pointer-events: none;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
${
|
|
90
|
+
${Vt.focus(".button")} {
|
|
91
91
|
outline: 1px solid var(--m-button-outline-color);
|
|
92
92
|
outline-offset: var(--m-button-outline-offset);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
${
|
|
96
|
-
--m-button-background-color: ${
|
|
97
|
-
--m-button-border-color: ${
|
|
98
|
-
--m-button-color: ${
|
|
95
|
+
${Vt.hover(".button")} {
|
|
96
|
+
--m-button-background-color: ${_t("color-background-inverted")};
|
|
97
|
+
--m-button-border-color: ${_t("color-background-inverted")};
|
|
98
|
+
--m-button-color: ${_t("color-text-inverted")};
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
::slotted(*) {
|
|
102
102
|
display: inline-flex;
|
|
103
103
|
align-items: center;
|
|
104
104
|
|
|
105
|
-
${
|
|
106
|
-
${
|
|
105
|
+
${Zt(0)};
|
|
106
|
+
${Nt(0)};
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
slot[name='leading']::slotted(span),
|
|
110
110
|
slot[name='trailing']::slotted(span) {
|
|
111
111
|
justify-content: center;
|
|
112
112
|
}
|
|
113
|
-
|
|
113
|
+
`}var qt,Ft,Kt;class Qt extends dt{static get properties(){return{...dt.properties,loading:{type:Boolean},disabled:{type:Boolean,reflect:!0},variant:{type:String},size:{type:String},type:{type:String}}}constructor(){super(),qt.add(this),this.variant="secondary",this.size="default",this.type="button",this.disabled=!1,this.loading=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleClick)}updated(o){super.updated(o),(o.has("disabled")||o.has("loading"))&&t(this,qt,"m",Kt).call(this)}render(){return U`
|
|
114
114
|
<button
|
|
115
115
|
class=${lt({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)})}
|
|
116
116
|
type=${this.type}
|
|
117
|
-
?disabled="${t(this,
|
|
117
|
+
?disabled="${t(this,qt,"m",Ft).call(this)}"
|
|
118
118
|
>
|
|
119
119
|
<!-- TODO: Replace this with the loading dots component as soon as it is ready. -->
|
|
120
120
|
${this.loading&&!["icon","icon-secondary"].includes(this.variant)?U`<span class="loader">●●●</span>`:R}
|
|
@@ -122,168 +122,168 @@ const it=1,nt=t=>(...o)=>({_$litDirective$:t,values:o});class st{constructor(t){
|
|
|
122
122
|
<slot></slot>
|
|
123
123
|
<slot name="trailing"></slot>
|
|
124
124
|
</button>
|
|
125
|
-
`}handleClick(t){var o,e;if(this.disabled||this.loading)return t.preventDefault(),void t.stopPropagation();"submit"===this.type&&(null===(o=this.form)||void 0===o||o.requestSubmit()),"reset"===this.type&&(null===(e=this.form)||void 0===e||e.reset())}}
|
|
125
|
+
`}handleClick(t){var o,e;if(this.disabled||this.loading)return t.preventDefault(),void t.stopPropagation();"submit"===this.type&&(null===(o=this.form)||void 0===o||o.requestSubmit()),"reset"===this.type&&(null===(e=this.form)||void 0===e||e.reset())}}qt=new WeakSet,Ft=function(){return Boolean(this.disabled)||Boolean(this.loading)},Kt=function(){const o=t(this,qt,"m",Ft).call(this);this.setAttribute("aria-disabled",String(o))},Qt.styles=[[Jt(),a`
|
|
126
126
|
.button.is-loading:not(.-icon, .-icon-secondary) *:not(.loader) {
|
|
127
127
|
visibility: hidden;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
.button.-primary {
|
|
131
|
-
--m-button-background-color: ${
|
|
132
|
-
--m-button-border-color: ${
|
|
133
|
-
--m-button-color: ${
|
|
131
|
+
--m-button-background-color: ${_t("color-primary-60")};
|
|
132
|
+
--m-button-border-color: ${_t("color-primary-60")};
|
|
133
|
+
--m-button-color: ${_t("color-text-inverted")};
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
${It(".button.-primary")} {
|
|
137
|
-
--m-button-background-color: ${
|
|
138
|
-
--m-button-border-color: ${
|
|
137
|
+
--m-button-background-color: ${_t("color-primary-20")};
|
|
138
|
+
--m-button-border-color: ${_t("color-primary-20")};
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
${
|
|
142
|
-
--m-button-border-color: ${
|
|
143
|
-
--m-button-outline-color: ${
|
|
141
|
+
${Vt.focus(".button.-primary")} {
|
|
142
|
+
--m-button-border-color: ${_t("color-primary-60")};
|
|
143
|
+
--m-button-outline-color: ${_t("color-primary-60")};
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
${
|
|
147
|
-
${
|
|
148
|
-
--m-button-background-color: ${
|
|
149
|
-
--m-button-border-color: ${
|
|
146
|
+
${Vt.hover(".button.-primary")},
|
|
147
|
+
${Vt.active(".button.-primary")} {
|
|
148
|
+
--m-button-background-color: ${_t("color-primary-100")};
|
|
149
|
+
--m-button-border-color: ${_t("color-primary-100")};
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
.button.-primary.is-loading {
|
|
153
|
-
--m-button-background-color: ${
|
|
154
|
-
--m-button-border-color: ${
|
|
155
|
-
--m-button-color: ${
|
|
153
|
+
--m-button-background-color: ${_t("color-primary-60")};
|
|
154
|
+
--m-button-border-color: ${_t("color-primary-60")};
|
|
155
|
+
--m-button-color: ${_t("color-text-inverted")};
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
.button.-secondary {
|
|
159
159
|
--m-button-background-color: transparent;
|
|
160
|
-
--m-button-border-color: ${
|
|
161
|
-
--m-button-color: ${
|
|
160
|
+
--m-button-border-color: ${_t("color-primary-100")};
|
|
161
|
+
--m-button-color: ${_t("color-primary-100")};
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
${It(".button.-secondary")} {
|
|
165
|
-
--m-button-border-color: ${
|
|
166
|
-
--m-button-color: ${
|
|
165
|
+
--m-button-border-color: ${_t("color-text-disabled")};
|
|
166
|
+
--m-button-color: ${_t("color-text-disabled")};
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
${
|
|
170
|
-
--m-button-border-color: ${
|
|
171
|
-
--m-button-color: ${
|
|
169
|
+
${Vt.focus(".button.-secondary")} {
|
|
170
|
+
--m-button-border-color: ${_t("color-primary-100")};
|
|
171
|
+
--m-button-color: ${_t("color-primary-100")};
|
|
172
172
|
|
|
173
|
-
--m-button-outline-color: ${
|
|
173
|
+
--m-button-outline-color: ${_t("color-primary-60")};
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
${
|
|
177
|
-
${
|
|
178
|
-
--m-button-background-color: ${
|
|
179
|
-
--m-button-border-color: ${
|
|
180
|
-
--m-button-color: ${
|
|
176
|
+
${Vt.hover(".button.-secondary")},
|
|
177
|
+
${Vt.active(".button.-secondary")} {
|
|
178
|
+
--m-button-background-color: ${_t("color-background-tertiary")};
|
|
179
|
+
--m-button-border-color: ${_t("color-primary-60")};
|
|
180
|
+
--m-button-color: ${_t("color-primary-60")};
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
.button.-secondary.is-loading {
|
|
184
184
|
--m-button-background-color: transparent;
|
|
185
185
|
|
|
186
|
-
--m-button-border-color: ${
|
|
187
|
-
--m-button-color: ${
|
|
186
|
+
--m-button-border-color: ${_t("color-primary-100")};
|
|
187
|
+
--m-button-color: ${_t("color-primary-100")};
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
.button.-tertiary {
|
|
191
191
|
--m-button-background-color: transparent;
|
|
192
192
|
--m-button-border-color: transparent;
|
|
193
|
-
--m-button-color: ${
|
|
193
|
+
--m-button-color: ${_t("color-primary-100")};
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
${It(".button.-tertiary")} {
|
|
197
|
-
--m-button-color: ${
|
|
197
|
+
--m-button-color: ${_t("color-text-disabled")};
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
${
|
|
201
|
-
--m-button-color: ${
|
|
202
|
-
--m-button-outline-color: ${
|
|
200
|
+
${Vt.focus(".button.-tertiary")} {
|
|
201
|
+
--m-button-color: ${_t("color-primary-100")};
|
|
202
|
+
--m-button-outline-color: ${_t("color-primary-60")};
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
${
|
|
206
|
-
--m-button-background-color: ${
|
|
207
|
-
--m-button-border-color: ${
|
|
208
|
-
--m-button-color: ${
|
|
205
|
+
${Vt.hover(".button.-tertiary")} {
|
|
206
|
+
--m-button-background-color: ${_t("color-background-tertiary")};
|
|
207
|
+
--m-button-border-color: ${_t("color-background-tertiary")};
|
|
208
|
+
--m-button-color: ${_t("color-primary-60")};
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
${
|
|
212
|
-
--m-button-background-color: ${
|
|
213
|
-
--m-button-border-color: ${
|
|
214
|
-
--m-button-color: ${
|
|
211
|
+
${Vt.active(".button.-tertiary")} {
|
|
212
|
+
--m-button-background-color: ${_t("color-neutral-20")};
|
|
213
|
+
--m-button-border-color: ${_t("color-neutral-20")};
|
|
214
|
+
--m-button-color: ${_t("color-primary-60")};
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
.button.-tertiary.is-loading {
|
|
218
218
|
--m-button-background-color: transparent;
|
|
219
219
|
--m-button-border-color: transparent;
|
|
220
|
-
--m-button-color: ${
|
|
220
|
+
--m-button-color: ${_t("color-primary-100")};
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
.button.-warning {
|
|
224
|
-
--m-button-background-color: ${
|
|
225
|
-
--m-button-border-color: ${
|
|
226
|
-
--m-button-color: ${
|
|
224
|
+
--m-button-background-color: ${_t("color-warning-60")};
|
|
225
|
+
--m-button-border-color: ${_t("color-warning-60")};
|
|
226
|
+
--m-button-color: ${_t("color-text-primary")};
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
${It(".button.-warning")} {
|
|
230
|
-
--m-button-background-color: ${
|
|
231
|
-
--m-button-border-color: ${
|
|
232
|
-
--m-button-color: ${
|
|
230
|
+
--m-button-background-color: ${_t("color-warning-20")};
|
|
231
|
+
--m-button-border-color: ${_t("color-warning-20")};
|
|
232
|
+
--m-button-color: ${_t("color-text-inverted")};
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
${
|
|
236
|
-
--m-button-background-color: ${
|
|
237
|
-
--m-button-outline-color: ${
|
|
235
|
+
${Vt.focus(".button.-warning")} {
|
|
236
|
+
--m-button-background-color: ${_t("color-warning-60")};
|
|
237
|
+
--m-button-outline-color: ${_t("color-warning-60")};
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
${
|
|
241
|
-
${
|
|
242
|
-
--m-button-background-color: ${
|
|
243
|
-
--m-button-border-color: ${
|
|
244
|
-
--m-button-color: ${
|
|
240
|
+
${Vt.hover(".button.-warning")},
|
|
241
|
+
${Vt.active(".button.-warning")} {
|
|
242
|
+
--m-button-background-color: ${_t("color-warning-100")};
|
|
243
|
+
--m-button-border-color: ${_t("color-warning-100")};
|
|
244
|
+
--m-button-color: ${_t("color-text-inverted")};
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
.button.-warning.is-loading {
|
|
248
|
-
--m-button-background-color: ${
|
|
249
|
-
--m-button-border-color: ${
|
|
250
|
-
--m-button-color: ${
|
|
248
|
+
--m-button-background-color: ${_t("color-warning-60")};
|
|
249
|
+
--m-button-border-color: ${_t("color-warning-60")};
|
|
250
|
+
--m-button-color: ${_t("color-text-primary")};
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
.button.-danger {
|
|
254
|
-
--m-button-background-color: ${
|
|
255
|
-
--m-button-border-color: ${
|
|
256
|
-
--m-button-color: ${
|
|
254
|
+
--m-button-background-color: ${_t("color-danger-60")};
|
|
255
|
+
--m-button-border-color: ${_t("color-danger-60")};
|
|
256
|
+
--m-button-color: ${_t("color-text-inverted")};
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
${It(".button.-danger")} {
|
|
260
|
-
--m-button-background-color: ${
|
|
261
|
-
--m-button-border-color: ${
|
|
260
|
+
--m-button-background-color: ${_t("color-danger-20")};
|
|
261
|
+
--m-button-border-color: ${_t("color-danger-20")};
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
${
|
|
265
|
-
--m-button-background-color: ${
|
|
266
|
-
--m-button-outline-color: ${
|
|
264
|
+
${Vt.focus(".button.-danger")} {
|
|
265
|
+
--m-button-background-color: ${_t("color-danger-60")};
|
|
266
|
+
--m-button-outline-color: ${_t("color-danger-60")};
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
${
|
|
270
|
-
${
|
|
271
|
-
--m-button-background-color: ${
|
|
272
|
-
--m-button-border-color: ${
|
|
269
|
+
${Vt.hover(".button.-danger")},
|
|
270
|
+
${Vt.active(".button.-danger")} {
|
|
271
|
+
--m-button-background-color: ${_t("color-danger-100")};
|
|
272
|
+
--m-button-border-color: ${_t("color-danger-100")};
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
.button.-danger.is-loading {
|
|
276
|
-
--m-button-background-color: ${
|
|
277
|
-
--m-button-border-color: ${
|
|
278
|
-
--m-button-color: ${
|
|
276
|
+
--m-button-background-color: ${_t("color-danger-60")};
|
|
277
|
+
--m-button-border-color: ${_t("color-danger-60")};
|
|
278
|
+
--m-button-color: ${_t("color-text-inverted")};
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
.button.-icon,
|
|
282
282
|
.button.-icon-secondary {
|
|
283
|
-
--m-button-border-radius: ${
|
|
284
|
-
--m-button-color: ${
|
|
285
|
-
--m-button-padding-x: ${
|
|
286
|
-
--m-button-padding-y: ${
|
|
283
|
+
--m-button-border-radius: ${Bt("border-radius-circle")};
|
|
284
|
+
--m-button-color: ${_t("color-neutral-90")};
|
|
285
|
+
--m-button-padding-x: ${Bt("spacing-1")};
|
|
286
|
+
--m-button-padding-y: ${Bt("spacing-1")};
|
|
287
287
|
|
|
288
288
|
min-block-size: var(--m-button-base-size);
|
|
289
289
|
max-block-size: var(--m-button-base-size);
|
|
@@ -292,8 +292,8 @@ const it=1,nt=t=>(...o)=>({_$litDirective$:t,values:o});class st{constructor(t){
|
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
.button.-icon {
|
|
295
|
-
--m-button-background-color: ${
|
|
296
|
-
--m-button-border-color: ${
|
|
295
|
+
--m-button-background-color: ${_t("color-background-tertiary")};
|
|
296
|
+
--m-button-border-color: ${_t("color-background-tertiary")};
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
.button.-icon-secondary {
|
|
@@ -309,12 +309,12 @@ const it=1,nt=t=>(...o)=>({_$litDirective$:t,values:o});class st{constructor(t){
|
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
${It([".button.-icon",".button.-icon-secondary"])} {
|
|
312
|
-
--m-button-color: ${
|
|
312
|
+
--m-button-color: ${_t("color-neutral-40")};
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
${It(".button.-icon")} {
|
|
316
|
-
--m-button-background-color: ${
|
|
317
|
-
--m-button-border-color: ${
|
|
316
|
+
--m-button-background-color: ${_t("color-neutral-20")};
|
|
317
|
+
--m-button-border-color: ${_t("color-neutral-20")};
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
${It(".button.-icon-secondary")} {
|
|
@@ -322,46 +322,46 @@ const it=1,nt=t=>(...o)=>({_$litDirective$:t,values:o});class st{constructor(t){
|
|
|
322
322
|
--m-button-border-color: transparent;
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
${
|
|
326
|
-
--m-button-color: ${
|
|
327
|
-
--m-button-outline-color: ${
|
|
325
|
+
${Vt.focus([".button.-icon",".button.-icon-secondary"])} {
|
|
326
|
+
--m-button-color: ${_t("color-primary-60")};
|
|
327
|
+
--m-button-outline-color: ${_t("color-primary-60")};
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
-
${
|
|
331
|
-
--m-button-background-color: ${
|
|
330
|
+
${Vt.focus(".button.-icon")} {
|
|
331
|
+
--m-button-background-color: ${_t("color-neutral-20")};
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
-
${
|
|
334
|
+
${Vt.focus(".button.-icon-secondary")} {
|
|
335
335
|
--m-button-background-color: transparent;
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
-
${
|
|
339
|
-
${
|
|
340
|
-
--m-button-color: ${
|
|
338
|
+
${Vt.hover([".button.-icon",".button.-icon-secondary"])},
|
|
339
|
+
${Vt.active([".button.-icon",".button.-icon-secondary"])} {
|
|
340
|
+
--m-button-color: ${_t("color-primary-60")};
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
-
${
|
|
344
|
-
${
|
|
345
|
-
--m-button-background-color: ${
|
|
346
|
-
--m-button-border-color: ${
|
|
343
|
+
${Vt.hover(".button.-icon")},
|
|
344
|
+
${Vt.active(".button.-icon")} {
|
|
345
|
+
--m-button-background-color: ${_t("color-background-highlight")};
|
|
346
|
+
--m-button-border-color: ${_t("color-background-highlight")};
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
${
|
|
350
|
-
${
|
|
349
|
+
${Vt.hover(".button.-icon-secondary")},
|
|
350
|
+
${Vt.active(".button.-icon-secondary")} {
|
|
351
351
|
--m-button-background-color: transparent;
|
|
352
352
|
--m-button-border-color: transparent;
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
.button.-small {
|
|
356
|
-
--m-button-padding-y: ${
|
|
357
|
-
--m-button-base-size: ${
|
|
356
|
+
--m-button-padding-y: ${Bt("spacing-2")};
|
|
357
|
+
--m-button-base-size: ${Bt("global-height-small")};
|
|
358
358
|
|
|
359
359
|
${Gt("button-sm")};
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
.button.-large {
|
|
363
|
-
--m-button-padding-y: ${
|
|
364
|
-
--m-button-base-size: ${
|
|
363
|
+
--m-button-padding-y: ${Bt("spacing-4")};
|
|
364
|
+
--m-button-base-size: ${Bt("global-height-large")};
|
|
365
365
|
|
|
366
366
|
${Gt("button-lg")};
|
|
367
367
|
}
|
|
@@ -377,312 +377,137 @@ const it=1,nt=t=>(...o)=>({_$litDirective$:t,values:o});class st{constructor(t){
|
|
|
377
377
|
|
|
378
378
|
pointer-events: none;
|
|
379
379
|
}
|
|
380
|
-
`]],window.customElements.define("m-button",
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
385
|
-
*/
|
|
386
|
-
const Kt=nt(class extends st{constructor(t){var o;if(super(t),t.type!==it||"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,e)=>{const r=t[e];return null==r?o:o+`${e=e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[o]){const{style:e}=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("-")?e.removeProperty(t):e[t]="")}));for(const t in o){const r=o[t];null!=r&&(this.vt.add(t),t.includes("-")?e.setProperty(t,r):e[t]=r)}return N}});class Qt extends et{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 U`
|
|
387
|
-
<div
|
|
388
|
-
class="m-card"
|
|
389
|
-
style="${Kt({"--m-card-flag-color":ct(this.flagColor)})}"
|
|
390
|
-
>
|
|
391
|
-
${this.flagged?U`<span class="m-card-flag"></span>`:R}
|
|
392
|
-
<div class="m-card-content">
|
|
393
|
-
<slot name="title"></slot>
|
|
394
|
-
<slot name="subtitle"></slot>
|
|
395
|
-
<slot name="divider"></slot>
|
|
396
|
-
<slot name="body"></slot>
|
|
397
|
-
</div>
|
|
398
|
-
</div>
|
|
399
|
-
`}}Qt.styles=[a`
|
|
380
|
+
`]],window.customElements.define("m-button",Qt);class Xt extends Qt{constructor(){super(),this.size="small"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","primary-action")}}window.customElements.define("m-banner-action-primary",Xt);class Yt extends Qt{constructor(){super(),this.variant="tertiary",this.size="small"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","secondary-action")}}window.customElements.define("m-banner-action-secondary",Yt);class to extends et{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","actions")}render(){return U`
|
|
381
|
+
<slot name="secondary-action"></slot>
|
|
382
|
+
<slot name="primary-action"></slot>
|
|
383
|
+
`}}to.styles=[a`
|
|
400
384
|
:host {
|
|
401
|
-
--m-card-background-color: ${Bt("color-background-primary")};
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.m-card {
|
|
405
|
-
position: relative;
|
|
406
|
-
display: flex;
|
|
407
|
-
flex-direction: row;
|
|
408
|
-
|
|
409
|
-
background-color: var(--m-card-background-color);
|
|
410
|
-
border-radius: ${Et("border-radius-s")};
|
|
411
|
-
border: solid 1px ${Bt("color-divider")};
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
.m-card-flag {
|
|
415
|
-
position: absolute;
|
|
416
|
-
top: -1px;
|
|
417
|
-
bottom: -1px;
|
|
418
|
-
left: -1px;
|
|
419
|
-
display: block;
|
|
420
|
-
|
|
421
|
-
box-sizing: border-box;
|
|
422
|
-
border: 1px solid var(--m-card-flag-color);
|
|
423
|
-
background-color: var(--m-card-flag-color);
|
|
424
|
-
width: ${Et("border-thick")};
|
|
425
|
-
border-top-left-radius: ${Et("border-radius-s")};
|
|
426
|
-
border-top-right-radius: 0;
|
|
427
|
-
border-bottom-right-radius: 0;
|
|
428
|
-
border-bottom-left-radius: ${Et("border-radius-s")};
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
.m-card-content {
|
|
432
385
|
display: flex;
|
|
433
|
-
|
|
434
|
-
|
|
386
|
+
justify-content: flex-end;
|
|
387
|
+
gap: ${Bt("spacing-2")};
|
|
435
388
|
}
|
|
436
|
-
|
|
437
|
-
::slotted(m-divider) {
|
|
438
|
-
--m-divider-margin-top: ${Et("spacing-4")};
|
|
439
|
-
}
|
|
440
|
-
`],window.customElements.define("m-card",Qt);class Xt extends et{constructor(){super(),this.slot="body"}render(){return U`
|
|
441
|
-
<div class="m-card-body">
|
|
442
|
-
<slot></slot>
|
|
443
|
-
</div>
|
|
444
|
-
`}}Xt.styles=[a`
|
|
389
|
+
`],window.customElements.define("m-banner-actions",to);class oo extends et{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","description")}render(){return U`<slot></slot>`}}oo.styles=[a`
|
|
445
390
|
:host {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
.m-card-body {
|
|
451
|
-
padding: var(--m-card-body-padding-y) var(--m-card-body-padding-x);
|
|
391
|
+
${Gt("body-md")};
|
|
392
|
+
color: ${_t("color-text-secondary")};
|
|
452
393
|
}
|
|
453
|
-
`],window.customElements.define("m-
|
|
454
|
-
<div class="m-card-subtitle">
|
|
455
|
-
<slot></slot>
|
|
456
|
-
</div>
|
|
457
|
-
`}}Yt.styles=[a`
|
|
394
|
+
`],window.customElements.define("m-banner-description",oo);class eo extends et{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","icon")}render(){return U`<slot></slot>`}}window.customElements.define("m-banner-icon",eo);class ro extends et{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","title")}render(){return U`<slot></slot>`}}ro.styles=[a`
|
|
458
395
|
:host {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
--m-card-subtitle-padding-y: 0;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
.m-card-subtitle {
|
|
465
|
-
${Gt("body-md")};
|
|
466
|
-
|
|
467
|
-
margin-block-start: var(--m-card-subtitle-margin-top);
|
|
468
|
-
padding: var(--m-card-subtitle-padding-y) var(--m-card-subtitle-padding-x);
|
|
469
|
-
|
|
470
|
-
color: ${Bt("color-text-tertiary")};
|
|
396
|
+
${Gt("body-md-bold")};
|
|
397
|
+
color: ${_t("color-text-secondary")};
|
|
471
398
|
}
|
|
472
|
-
`],window.customElements.define("m-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
399
|
+
`],window.customElements.define("m-banner-title",ro);class io extends et{emit(t,o){const e=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,...o});this.dispatchEvent(e)}}
|
|
400
|
+
/**
|
|
401
|
+
* @license
|
|
402
|
+
* Copyright 2018 Google LLC
|
|
403
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
404
|
+
*/
|
|
405
|
+
const no=t=>null!=t?t:R;var so={};so.BASE_PIXELS=16,so.toRem=function(t,o){return void 0===o&&(o=16),"".concat(parseInt(String(t),10)/o,"rem")};var lo,ao,co=so.toRem;function ho(t,o){return l(co(t,o))}class uo extends io{static get properties(){return{controls:{type:String},disabled:{type:Boolean},inverted:{type:Boolean},label:{type:String},size:{type:String}}}constructor(){super(),lo.add(this),this.disabled=!1,this.inverted=!1,this.label="Close",this.size="default"}render(){var o;return U`
|
|
406
|
+
<button
|
|
407
|
+
type="button"
|
|
408
|
+
aria-controls="${no(this.controls)}"
|
|
409
|
+
aria-label="${no(this.label)}"
|
|
410
|
+
class=${lt({"close-button":!0,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size,"-inverted":null!==(o=this.inverted)&&void 0!==o&&o})}
|
|
411
|
+
?disabled="${this.disabled}"
|
|
412
|
+
@click=${t(this,lo,"m",ao)}
|
|
413
|
+
>
|
|
414
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
|
|
415
|
+
<path
|
|
416
|
+
d="M40.9706 11.2721L36.7279 7.02944L24 19.7574L11.2721 7.02944L7.02944 11.2721L19.7574 24L7.02944 36.7279L11.2721 40.9706L24 28.2426L36.7279 40.9706L40.9706 36.7279L28.2426 24L40.9706 11.2721Z"
|
|
417
|
+
/>
|
|
418
|
+
</svg>
|
|
419
|
+
</button>
|
|
420
|
+
`}}lo=new WeakSet,ao=function(){this.emit("m-close")},uo.styles=[a`
|
|
478
421
|
:host {
|
|
479
|
-
--m-
|
|
480
|
-
--m-card-title-padding-top: ${Et("spacing-4")};
|
|
422
|
+
--m-close-button-color: ${_t("color-text-primary")};
|
|
481
423
|
}
|
|
482
424
|
|
|
483
|
-
.
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
${Gt("heading-sm-bold")};
|
|
487
|
-
color: ${Bt("color-text-primary")};
|
|
488
|
-
}
|
|
425
|
+
.close-button {
|
|
426
|
+
--button-color: transparent;
|
|
427
|
+
--icon-color: var(--m-close-button-color);
|
|
489
428
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
429
|
+
width: var(--button-size);
|
|
430
|
+
height: var(--button-size);
|
|
431
|
+
${Nt(0)};
|
|
432
|
+
${Zt(0)};
|
|
433
|
+
background-color: var(--button-color);
|
|
434
|
+
border: none;
|
|
435
|
+
border-radius: 50%;
|
|
436
|
+
display: flex;
|
|
493
437
|
align-items: center;
|
|
494
438
|
justify-content: center;
|
|
495
|
-
|
|
496
|
-
margin-inline-end: ${Et("spacing-1")};
|
|
497
|
-
}
|
|
498
|
-
`],window.customElements.define("m-card-title",to);class oo extends et{render(){return U` <hr class="m-divider" /> `}}oo.styles=[a`
|
|
499
|
-
.m-divider {
|
|
500
|
-
border: 0;
|
|
501
|
-
border-block-end: solid 1px ${Bt("color-divider")};
|
|
502
|
-
margin-block-start: var(
|
|
503
|
-
--m-divider-margin-top,
|
|
504
|
-
var(--m-divider-margin-y, 0)
|
|
505
|
-
);
|
|
506
|
-
margin-block-end: var(
|
|
507
|
-
--m-divider-margin-bottom,
|
|
508
|
-
var(--m-divider-margin-y, 0)
|
|
509
|
-
);
|
|
510
|
-
}
|
|
511
|
-
`],window.customElements.define("m-divider",oo);const eo=["center","flex-start","flex-end","stretch"],ro=["center","flex-start","flex-end","space-between","space-around","space-evenly"],io={padding:"spacing-4",borderRadius:"border-radius-s",borderWidth:"border-none",borderColor:"color-background-highlight",textAlign:"left"};class no extends et{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=io.padding,this.borderRadius=io.borderRadius,this.borderWidth=io.borderWidth,this.borderColor=io.borderColor,this.textAlign=io.textAlign}update(t){this.style.setProperty("--m-box-padding",ct(this.padding)||ct(io.padding)),this.style.setProperty("--m-box-background-color",ct(this.backgroundColor)||"transparent"),this.style.setProperty("--m-box-border-radius",ct(this.borderRadius)||ct(io.borderRadius)),this.style.setProperty("--m-box-border-width",ct(this.borderWidth)||ct(io.borderWidth)),this.style.setProperty("--m-box-border-color",ct(this.borderColor)||ct(io.borderColor)),this.style.setProperty("--m-box-text-align",this.textAlign||io.textAlign),super.update(t)}render(){return U`<slot></slot>`}}no.styles=[a`
|
|
512
|
-
:host {
|
|
513
|
-
--m-box-padding: ${Et(io.padding)};
|
|
514
|
-
--m-box-background-color: transparent;
|
|
515
|
-
--m-box-border-radius: ${Et(io.borderRadius)};
|
|
516
|
-
--m-box-border-width: ${Et(io.borderWidth)};
|
|
517
|
-
--m-box-border-color: ${Bt(io.borderColor)};
|
|
518
|
-
--m-box-text-align: ${l(io.textAlign)};
|
|
519
|
-
|
|
520
|
-
box-sizing: border-box;
|
|
439
|
+
cursor: pointer;
|
|
521
440
|
|
|
522
|
-
|
|
523
|
-
background-color: var(--m-box-background-color);
|
|
524
|
-
border-radius: var(--m-box-border-radius);
|
|
525
|
-
border-style: solid;
|
|
526
|
-
border-width: var(--m-box-border-width);
|
|
527
|
-
border-color: var(--m-box-border-color);
|
|
528
|
-
text-align: var(--m-box-text-align);
|
|
441
|
+
${Ht([{property:"background-color"}])};
|
|
529
442
|
}
|
|
530
|
-
`],window.customElements.define("m-box",no);const so={gap:"spacing-4",align:"stretch",justify:"flex-start"};class lo extends et{static get properties(){return{gap:{type:String},align:{type:String},justify:{type:String}}}constructor(){super(),this.gap=so.gap,this.align=so.align,this.justify=so.justify}update(t){this.style.setProperty("--m-group-gap",ct(this.gap)||ct(so.gap)),this.style.setProperty("--m-group-align",this.align||so.align),this.style.setProperty("--m-group-justify",this.justify||so.justify),super.update(t)}render(){return U`<slot></slot>`}}lo.styles=[a`
|
|
531
|
-
:host {
|
|
532
|
-
--m-group-gap: ${Et(so.gap)};
|
|
533
|
-
--m-group-align: ${l(so.align)};
|
|
534
|
-
--m-group-justify: ${l(so.justify)};
|
|
535
443
|
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
align-items: var(--m-group-align);
|
|
540
|
-
justify-content: var(--m-group-justify);
|
|
444
|
+
.close-button.-size-small {
|
|
445
|
+
--button-size: ${ho("12px")};
|
|
446
|
+
--icon-size: ${ho("8px")};
|
|
541
447
|
}
|
|
542
|
-
`],window.customElements.define("m-group",lo);const ao={gap:"spacing-4",align:"stretch",justify:"flex-start"};class co extends et{static get properties(){return{gap:{type:String},align:{type:String},justify:{type:String}}}constructor(){super(),this.gap=ao.gap,this.align=ao.align,this.justify=ao.justify}update(t){this.style.setProperty("--m-stack-gap",ct(this.gap)||ct(ao.gap)),this.style.setProperty("--m-stack-align",this.align||ao.align),this.style.setProperty("--m-stack-justify",this.justify||ao.justify),super.update(t)}render(){return U`<slot></slot>`}}co.styles=[a`
|
|
543
|
-
:host {
|
|
544
|
-
--m-stack-gap: ${Et(ao.gap)};
|
|
545
|
-
--m-stack-align: ${l(ao.align)};
|
|
546
|
-
--m-stack-justify: ${l(ao.justify)};
|
|
547
448
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
row-gap: var(--m-stack-gap);
|
|
552
|
-
align-items: var(--m-stack-align);
|
|
553
|
-
justify-content: var(--m-stack-justify);
|
|
449
|
+
.close-button.-size-default {
|
|
450
|
+
--button-size: ${ho("16px")};
|
|
451
|
+
--icon-size: ${ho("12px")};
|
|
554
452
|
}
|
|
555
|
-
`],window.customElements.define("m-stack",co);const ho={gap:"spacing-4",minColumnWidth:ht("spacing-30")};class uo extends et{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=ho.gap,this.minColumnWidth=ho.minColumnWidth}update(t){t.has("gap")&&this.style.setProperty("--m-grid-gap",ct(this.gap)||ct(ho.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-grid-row-gap",ct(this.rowGap)):this.style.removeProperty("--m-grid-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-grid-column-gap",ct(this.columnGap)):this.style.removeProperty("--m-grid-column-gap")),t.has("minColumnWidth")&&this.style.setProperty("--m-grid-min-column-width",this.minColumnWidth||ho.minColumnWidth),super.update(t)}render(){return U`<slot></slot>`}}uo.styles=[a`
|
|
556
|
-
:host {
|
|
557
|
-
--m-grid-gap: ${Et(ho.gap)};
|
|
558
|
-
--m-grid-min-column-width: ${l(ho.minColumnWidth)};
|
|
559
453
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
column-gap: var(--m-grid-column-gap, var(--m-grid-gap));
|
|
564
|
-
|
|
565
|
-
grid-template-columns: repeat(
|
|
566
|
-
auto-fit,
|
|
567
|
-
minmax(min(var(--m-grid-min-column-width), 100%), 1fr)
|
|
568
|
-
);
|
|
454
|
+
.close-button.-size-large {
|
|
455
|
+
--button-size: ${ho("20px")};
|
|
456
|
+
--icon-size: ${ho("16px")};
|
|
569
457
|
}
|
|
570
|
-
`],window.customElements.define("m-grid",uo);const go={gap:"spacing-4",sideWidth:"auto",minContentWidth:"50%",reversed:!1};function bo(t){return t?"row-reverse":"row"}class mo extends et{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=go.gap,this.sideWidth=go.sideWidth,this.minContentWidth=go.minContentWidth,this.reversed=go.reversed}update(t){t.has("gap")&&this.style.setProperty("--m-sidebar-gap",ct(this.gap)||ct(go.gap)),t.has("sideWidth")&&this.style.setProperty("--m-sidebar-side-width",this.sideWidth||go.sideWidth),t.has("minContentWidth")&&this.style.setProperty("--m-sidebar-min-content-width",this.minContentWidth||go.minContentWidth),t.has("reversed")&&this.style.setProperty("--m-sidebar-flex-direction",bo(this.reversed)),super.update(t)}render(){return U`
|
|
571
|
-
<slot name="sidebar"></slot>
|
|
572
|
-
<slot name="content"></slot>
|
|
573
|
-
`}}mo.styles=[a`
|
|
574
|
-
:host {
|
|
575
|
-
--m-sidebar-gap: ${Et(go.gap)};
|
|
576
|
-
--m-sidebar-flex-direction: ${l(bo(go.reversed))};
|
|
577
|
-
--m-sidebar-side-width: ${l(go.sideWidth)};
|
|
578
|
-
--m-sidebar-min-content-width: ${l(go.minContentWidth)};
|
|
579
458
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
gap: var(--m-sidebar-gap);
|
|
459
|
+
.close-button.-inverted {
|
|
460
|
+
--button-color: transparent;
|
|
461
|
+
--icon-color: ${_t("color-text-inverted")};
|
|
585
462
|
}
|
|
586
463
|
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
464
|
+
svg {
|
|
465
|
+
display: block;
|
|
466
|
+
width: var(--icon-size);
|
|
467
|
+
height: var(--icon-size);
|
|
468
|
+
fill: var(--icon-color);
|
|
591
469
|
|
|
592
|
-
|
|
593
|
-
flex-basis: 0;
|
|
594
|
-
flex-grow: 999;
|
|
595
|
-
min-width: var(--m-sidebar-min-content-width);
|
|
470
|
+
${Ht([{property:"fill"}])};
|
|
596
471
|
}
|
|
597
|
-
`],window.customElements.define("m-sidebar",mo);const po={gap:"spacing-4",threshold:"10rem"};class fo extends et{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=po.gap,this.threshold=po.threshold}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-switcher-gap",ct(this.gap)||ct(po.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-switcher-row-gap",ct(this.rowGap)):this.style.removeProperty("--m-switcher-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-switcher-column-gap",ct(this.columnGap)):this.style.removeProperty("--m-switcher-column-gap")),t.has("threshold")&&this.style.setProperty("--m-switcher-threshold",this.threshold||po.threshold)}render(){const t=this.limit?U`
|
|
598
|
-
<style>
|
|
599
|
-
::slotted(*:nth-last-child(n + ${this.limit+1})) {
|
|
600
|
-
flex-basis: 100%;
|
|
601
|
-
}
|
|
602
|
-
::slotted(*:nth-last-child(n + ${this.limit+1}) ~ *) {
|
|
603
|
-
flex-basis: 100%;
|
|
604
|
-
}
|
|
605
|
-
</style>
|
|
606
|
-
`:"";return U`
|
|
607
|
-
${t}
|
|
608
|
-
<slot></slot>
|
|
609
|
-
`}}function $o(t,o,e){return Math.min(Math.max(o,t),e)}fo.styles=[a`
|
|
610
|
-
:host {
|
|
611
|
-
--m-switcher-gap: ${Et(po.gap)};
|
|
612
|
-
--m-switcher-threshold: ${l(po.threshold)};
|
|
613
472
|
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
row-gap: var(--m-switcher-row-gap, var(--m-switcher-gap));
|
|
618
|
-
column-gap: var(--m-switcher-column-gap, var(--m-switcher-gap));
|
|
473
|
+
${Vt.hover(".close-button")} {
|
|
474
|
+
--button-color: var(--m-close-button-color);
|
|
475
|
+
--icon-color: ${_t("color-text-inverted")};
|
|
619
476
|
}
|
|
620
477
|
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
}
|
|
625
|
-
`],window.customElements.define("m-switcher",fo);var yo,vo,wo,xo,ko=function(t,o){return void 0===o&&(o=16),"".concat(parseInt(String(t),10)/o,"rem")};function zo(t,o){return l(ko(t,o))}class So extends et{static get properties(){return{value:{type:Number,noAccessor:!0},max:{type:Number,noAccessor:!0}}}set value(e){const r=t(this,vo,"f");o(this,vo,$o(e,0,t(this,wo,"f")),"f"),this.requestUpdate("value",r)}get value(){return t(this,vo,"f")}set max(e){const r=t(this,wo,"f");o(this,wo,e<=0?100:e,"f"),o(this,vo,$o(t(this,vo,"f"),0,t(this,wo,"f")),"f"),this.requestUpdate("max",r)}get max(){return t(this,wo,"f")}constructor(){super(),yo.add(this),vo.set(this,0),wo.set(this,100),this.value=0,this.max=100}connectedCallback(){super.connectedCallback(),this.setAttribute("role","progressbar"),this.setAttribute("aria-valuemin","0")}updated(){this.setAttribute("aria-valuenow",String(t(this,vo,"f"))),this.setAttribute("aria-valuemax",String(t(this,wo,"f")))}render(){return U`
|
|
626
|
-
<div class="bar">
|
|
627
|
-
<span
|
|
628
|
-
class="progress"
|
|
629
|
-
style=${Kt({width:`${t(this,yo,"m",xo).call(this)}%`})}
|
|
630
|
-
></span>
|
|
631
|
-
</div>
|
|
632
|
-
`}}vo=new WeakMap,wo=new WeakMap,yo=new WeakSet,xo=function(){return 100*t(this,vo,"f")/t(this,wo,"f")},So.styles=[a`
|
|
633
|
-
:host {
|
|
634
|
-
--m-progress-bar-progress-background: linear-gradient(
|
|
635
|
-
45deg,
|
|
636
|
-
${Bt("color-brand-accent-1")} 22%,
|
|
637
|
-
${Bt("color-brand-accent-2")} 88%
|
|
638
|
-
);
|
|
478
|
+
${Vt.hover(".close-button.-inverted")} {
|
|
479
|
+
--button-color: ${_t("color-text-inverted")};
|
|
480
|
+
--icon-color: var(--m-close-button-color);
|
|
639
481
|
}
|
|
640
482
|
|
|
641
|
-
.
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
flex-shrink: 1;
|
|
645
|
-
align-items: center;
|
|
646
|
-
justify-content: center;
|
|
647
|
-
|
|
648
|
-
position: relative;
|
|
649
|
-
overflow: hidden;
|
|
650
|
-
|
|
651
|
-
width: 100%;
|
|
652
|
-
height: ${zo("8px")};
|
|
653
|
-
|
|
654
|
-
border-radius: ${Et("border-radius-s")};
|
|
655
|
-
|
|
656
|
-
background-color: ${Bt("color-background-tertiary")};
|
|
483
|
+
${It(".close-button")} {
|
|
484
|
+
--icon-color: ${_t("color-text-disabled")};
|
|
485
|
+
cursor: default;
|
|
657
486
|
}
|
|
658
487
|
|
|
659
|
-
.
|
|
660
|
-
|
|
661
|
-
top: 0;
|
|
662
|
-
left: 0;
|
|
663
|
-
|
|
664
|
-
${Dt([{property:"width"}])};
|
|
665
|
-
|
|
666
|
-
height: ${zo("8px")};
|
|
667
|
-
|
|
668
|
-
border-radius: ${Et("border-radius-s")};
|
|
669
|
-
|
|
670
|
-
background: var(--m-progress-bar-progress-background);
|
|
488
|
+
${It(".close-button","*")} {
|
|
489
|
+
pointer-events: none;
|
|
671
490
|
}
|
|
672
|
-
`],window.customElements.define("m-
|
|
491
|
+
`],window.customElements.define("m-close-button",uo);
|
|
492
|
+
/**
|
|
493
|
+
* @license
|
|
494
|
+
* Copyright 2018 Google LLC
|
|
495
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
496
|
+
*/
|
|
497
|
+
const bo=nt(class extends st{constructor(t){var o;if(super(t),t.type!==it||"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,e)=>{const r=t[e];return null==r?o:o+`${e=e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[o]){const{style:e}=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("-")?e.removeProperty(t):e[t]="")}));for(const t in o){const r=o[t];null!=r&&(this.vt.add(t),t.includes("-")?e.setProperty(t,r):e[t]=r)}return N}});class go extends et{static get properties(){return{variant:{type:String,reflect:!0},color:{type:String}}}constructor(){super(),this.variant="body-md",this.color="color-text-primary"}render(){return U`
|
|
673
498
|
<span
|
|
674
499
|
class=${lt({"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})}
|
|
675
|
-
style=${
|
|
500
|
+
style=${bo({"--m-text-color":ct(this.color)})}
|
|
676
501
|
>
|
|
677
502
|
<slot></slot>
|
|
678
503
|
</span>
|
|
679
|
-
`}}
|
|
504
|
+
`}}var mo,po,fo;go.styles=[a`
|
|
680
505
|
:host {
|
|
681
|
-
--m-text-color: ${
|
|
506
|
+
--m-text-color: ${_t("color-text-primary")};
|
|
682
507
|
}
|
|
683
508
|
|
|
684
509
|
.m-text {
|
|
685
|
-
${
|
|
510
|
+
${Ht([{property:"color"}])};
|
|
686
511
|
|
|
687
512
|
${Gt()};
|
|
688
513
|
|
|
@@ -814,126 +639,233 @@ const Kt=nt(class extends st{constructor(t){var o;if(super(t),t.type!==it||"styl
|
|
|
814
639
|
.-table-header-sm {
|
|
815
640
|
${Gt("table-header-sm")};
|
|
816
641
|
}
|
|
817
|
-
`],window.customElements.define("m-text",
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
642
|
+
`],window.customElements.define("m-text",go);const $o=U`
|
|
643
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
|
|
644
|
+
<path
|
|
645
|
+
d="M6.732 42.889h34.537c2.06 0 3.376-2.192 2.406-4.005l-17.27-32.33c-1.026-1.924-3.785-1.924-4.813 0L4.324 38.883c-.968 1.813.349 4.005 2.408 4.005zm14.542-24.504h5.452v10.89h-5.452zM24 31.998a2.726 2.726 0 0 1 2.726 2.723A2.726 2.726 0 0 1 24 37.444a2.726 2.726 0 0 1-2.726-2.723A2.726 2.726 0 0 1 24 31.998z"
|
|
646
|
+
/>
|
|
647
|
+
</svg>
|
|
648
|
+
`,yo=U`
|
|
649
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
|
|
650
|
+
<path
|
|
651
|
+
d="M44.4205 13.3433L40.1778 9.10067L18.9646 30.3139L9.06512 20.4144L4.82248 24.657L14.722 34.5565L18.9646 38.7992L23.2073 34.5565L44.4205 13.3433Z"
|
|
652
|
+
/>
|
|
653
|
+
</svg>
|
|
654
|
+
`,vo=U`
|
|
655
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
|
|
656
|
+
<path
|
|
657
|
+
d="M24 4C12.9551 4 4 12.9583 4 24C4 35.0481 12.9551 44 24 44C35.0449 44 44 35.0481 44 24C44 12.9583 35.0449 4 24 4ZM24 12.871C25.8706 12.871 27.3871 14.3874 27.3871 16.2581C27.3871 18.1287 25.8706 19.6452 24 19.6452C22.1294 19.6452 20.6129 18.1287 20.6129 16.2581C20.6129 14.3874 22.1294 12.871 24 12.871ZM28.5161 33.3548C28.5161 33.8893 28.0828 34.3226 27.5484 34.3226H20.4516C19.9172 34.3226 19.4839 33.8893 19.4839 33.3548V31.4194C19.4839 30.8849 19.9172 30.4516 20.4516 30.4516H21.4194V25.2903H20.4516C19.9172 25.2903 19.4839 24.857 19.4839 24.3226V22.3871C19.4839 21.8527 19.9172 21.4194 20.4516 21.4194H25.6129C26.1473 21.4194 26.5806 21.8527 26.5806 22.3871V30.4516H27.5484C28.0828 30.4516 28.5161 30.8849 28.5161 31.4194V33.3548Z"
|
|
658
|
+
/>
|
|
659
|
+
</svg>
|
|
660
|
+
`;class wo extends io{static get properties(){return{variant:{type:String},dismissible:{type:Boolean},dismissed:{type:Boolean,reflect:!0}}}constructor(){super(),mo.add(this),po.set(this,void 0),this.variant="neutral",this.dismissible=!1,this.dismissed=!1}get primaryAction(){return null==t(this,po,"f")&&o(this,po,this.querySelector("m-banner-action-primary"),"f"),t(this,po,"f")}updated(t){super.updated(t),t.has("variant")&&null!=this.primaryAction&&(this.primaryAction.variant=function(t){switch(t){case"warning":return"warning";case"danger":return"danger";default:return"primary"}}(this.variant))}render(){if(this.dismissed)return R;const o=null!=this.querySelector("*[slot='description']"),e=null!=this.querySelector("*[slot='actions']"),r=U`
|
|
661
|
+
<m-close-button
|
|
662
|
+
id="close"
|
|
663
|
+
label="Dismiss"
|
|
664
|
+
@click=${t(this,mo,"m",fo)}
|
|
665
|
+
></m-close-button>
|
|
666
|
+
`;return U`
|
|
667
|
+
<div
|
|
668
|
+
class=${lt({banner:!0,"-success":"success"===this.variant,"-warning":"warning"===this.variant,"-danger":"danger"===this.variant,"-with-description":o})}
|
|
821
669
|
>
|
|
822
|
-
<
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
670
|
+
<div class="wrapper">
|
|
671
|
+
<slot name="icon"> ${function(t){switch(t){case"success":return yo;case"warning":case"danger":return $o;default:return vo}}(this.variant)} </slot>
|
|
672
|
+
<div class="content">
|
|
673
|
+
<slot name="title"></slot>
|
|
674
|
+
<slot name="description"></slot>
|
|
675
|
+
</div>
|
|
676
|
+
${this.dismissible&&!e?r:R}
|
|
677
|
+
</div>
|
|
678
|
+
<slot name="actions"></slot>
|
|
679
|
+
</div>
|
|
680
|
+
`}}po=new WeakMap,mo=new WeakSet,fo=function(){this.dismissed=!0,this.emit("m-dismiss",{composed:!0})},wo.styles=[a`
|
|
681
|
+
:host {
|
|
682
|
+
display: block;
|
|
683
|
+
width: 100%;
|
|
684
|
+
}
|
|
827
685
|
|
|
828
|
-
|
|
829
|
-
|
|
686
|
+
:host([dismissed]) {
|
|
687
|
+
display: none;
|
|
688
|
+
}
|
|
830
689
|
|
|
831
|
-
|
|
832
|
-
|
|
690
|
+
.banner {
|
|
691
|
+
background-color: var(
|
|
692
|
+
--m-banner-background-color,
|
|
693
|
+
${_t("color-background-secondary")}
|
|
694
|
+
);
|
|
695
|
+
border: var(--m-banner-border, 1px solid ${_t("color-border")});
|
|
696
|
+
border-radius: var(--m-banner-border-radius, ${Bt("border-radius-m")});
|
|
697
|
+
padding-inline: var(--m-banner-padding-x, ${Bt("spacing-6")});
|
|
698
|
+
padding-block: var(--m-banner-padding-y, ${Bt("spacing-4")});
|
|
699
|
+
display: flex;
|
|
700
|
+
flex-wrap: wrap;
|
|
701
|
+
justify-content: flex-end;
|
|
702
|
+
gap: ${Bt("spacing-6")};
|
|
703
|
+
}
|
|
833
704
|
|
|
834
|
-
|
|
835
|
-
}
|
|
705
|
+
.banner.-success {
|
|
706
|
+
--m-banner-background-color: ${_t("color-success-20")};
|
|
707
|
+
--m-banner-border: 1px solid ${_t("color-success-20")};
|
|
708
|
+
--m-banner-icon-color: ${_t("color-success-60")};
|
|
709
|
+
}
|
|
836
710
|
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
}
|
|
711
|
+
.banner.-warning {
|
|
712
|
+
--m-banner-background-color: ${_t("color-warning-20")};
|
|
713
|
+
--m-banner-border: 1px solid ${_t("color-warning-20")};
|
|
714
|
+
--m-banner-icon-color: ${_t("color-warning-100")};
|
|
715
|
+
}
|
|
840
716
|
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
717
|
+
.banner.-danger {
|
|
718
|
+
--m-banner-background-color: ${_t("color-danger-20")};
|
|
719
|
+
--m-banner-border: 1px solid ${_t("color-danger-20")};
|
|
720
|
+
--m-banner-icon-color: ${_t("color-danger-60")};
|
|
721
|
+
}
|
|
846
722
|
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
723
|
+
.banner.-with-description {
|
|
724
|
+
flex-direction: column;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
.wrapper {
|
|
728
|
+
display: flex;
|
|
729
|
+
gap: ${Bt("spacing-6")};
|
|
730
|
+
align-items: center;
|
|
731
|
+
flex-grow: 1;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
slot[name='icon'] > svg,
|
|
735
|
+
slot[name='icon']::slotted(*) {
|
|
736
|
+
fill: var(--m-banner-icon-color, ${_t("color-neutral-90")});
|
|
737
|
+
block-size: var(--m-banner-icon-size, 24px);
|
|
738
|
+
inline-size: var(--m-banner-icon-size, 24px);
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
.content {
|
|
742
|
+
display: flex;
|
|
743
|
+
flex-direction: column;
|
|
744
|
+
flex-grow: 1;
|
|
745
|
+
gap: ${Bt("spacing-1")};
|
|
746
|
+
}
|
|
747
|
+
`],window.customElements.define("m-banner",wo);class xo extends et{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 U`
|
|
748
|
+
<div
|
|
749
|
+
class="m-card"
|
|
750
|
+
style="${bo({"--m-card-flag-color":ct(this.flagColor)})}"
|
|
857
751
|
>
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
<
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
</svg>
|
|
871
|
-
</slot>
|
|
752
|
+
${this.flagged?U`<span class="m-card-flag"></span>`:R}
|
|
753
|
+
<div class="m-card-content">
|
|
754
|
+
<slot name="title"></slot>
|
|
755
|
+
<slot name="subtitle"></slot>
|
|
756
|
+
<slot name="divider"></slot>
|
|
757
|
+
<slot name="body"></slot>
|
|
758
|
+
</div>
|
|
759
|
+
</div>
|
|
760
|
+
`}}xo.styles=[a`
|
|
761
|
+
:host {
|
|
762
|
+
--m-card-background-color: ${_t("color-background-primary")};
|
|
763
|
+
}
|
|
872
764
|
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
:
|
|
877
|
-
/*
|
|
878
|
-
* These custom properties are here because they are meant to be
|
|
879
|
-
* overriden via toggle-group styles.
|
|
880
|
-
*/
|
|
881
|
-
--m-toggle-base-size: 30px;
|
|
882
|
-
--m-toggle-font-size: ${Et("font-size-3")};
|
|
883
|
-
--m-toggle-icon-size: 12px;
|
|
884
|
-
--m-toggle-icon-display: none;
|
|
885
|
-
}
|
|
765
|
+
.m-card {
|
|
766
|
+
position: relative;
|
|
767
|
+
display: flex;
|
|
768
|
+
flex-direction: row;
|
|
886
769
|
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
--m-button-padding-y: 0;
|
|
770
|
+
background-color: var(--m-card-background-color);
|
|
771
|
+
border-radius: ${Bt("border-radius-s")};
|
|
772
|
+
border: solid 1px ${_t("color-divider")};
|
|
773
|
+
}
|
|
892
774
|
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
775
|
+
.m-card-flag {
|
|
776
|
+
position: absolute;
|
|
777
|
+
top: -1px;
|
|
778
|
+
bottom: -1px;
|
|
779
|
+
left: -1px;
|
|
780
|
+
display: block;
|
|
896
781
|
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
782
|
+
box-sizing: border-box;
|
|
783
|
+
border: 1px solid var(--m-card-flag-color);
|
|
784
|
+
background-color: var(--m-card-flag-color);
|
|
785
|
+
width: ${Bt("border-thick")};
|
|
786
|
+
border-top-left-radius: ${Bt("border-radius-s")};
|
|
787
|
+
border-top-right-radius: 0;
|
|
788
|
+
border-bottom-right-radius: 0;
|
|
789
|
+
border-bottom-left-radius: ${Bt("border-radius-s")};
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
.m-card-content {
|
|
793
|
+
display: flex;
|
|
794
|
+
flex: 1;
|
|
795
|
+
flex-direction: column;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
::slotted(m-divider) {
|
|
799
|
+
--m-divider-margin-top: ${Bt("spacing-4")};
|
|
800
|
+
}
|
|
801
|
+
`],window.customElements.define("m-card",xo);class ko extends et{constructor(){super(),this.slot="body"}render(){return U`
|
|
802
|
+
<div class="m-card-body">
|
|
803
|
+
<slot></slot>
|
|
804
|
+
</div>
|
|
805
|
+
`}}ko.styles=[a`
|
|
806
|
+
:host {
|
|
807
|
+
--m-card-body-padding-x: ${Bt("spacing-4")};
|
|
808
|
+
--m-card-body-padding-y: ${Bt("spacing-4")};
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
.m-card-body {
|
|
812
|
+
padding: var(--m-card-body-padding-y) var(--m-card-body-padding-x);
|
|
813
|
+
}
|
|
814
|
+
`],window.customElements.define("m-card-body",ko);class zo extends et{constructor(){super(),this.slot="subtitle"}render(){return U`
|
|
815
|
+
<div class="m-card-subtitle">
|
|
816
|
+
<slot></slot>
|
|
817
|
+
</div>
|
|
818
|
+
`}}zo.styles=[a`
|
|
819
|
+
:host {
|
|
820
|
+
--m-card-subtitle-margin-top: ${Bt("spacing-2")};
|
|
821
|
+
--m-card-subtitle-padding-x: ${Bt("spacing-4")};
|
|
822
|
+
--m-card-subtitle-padding-y: 0;
|
|
823
|
+
}
|
|
900
824
|
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
}
|
|
825
|
+
.m-card-subtitle {
|
|
826
|
+
${Gt("body-md")};
|
|
904
827
|
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
--m-button-border-color: ${Bt("color-background-tertiary")};
|
|
908
|
-
--m-button-color: ${Bt("color-primary-100")};
|
|
909
|
-
}
|
|
828
|
+
margin-block-start: var(--m-card-subtitle-margin-top);
|
|
829
|
+
padding: var(--m-card-subtitle-padding-y) var(--m-card-subtitle-padding-x);
|
|
910
830
|
|
|
911
|
-
|
|
912
|
-
|
|
831
|
+
color: ${_t("color-text-tertiary")};
|
|
832
|
+
}
|
|
833
|
+
`],window.customElements.define("m-card-subtitle",zo);class So extends et{constructor(){super(),this.slot="title"}render(){return U`
|
|
834
|
+
<div class="m-card-title">
|
|
835
|
+
<slot name="leading"></slot>
|
|
836
|
+
<slot></slot>
|
|
837
|
+
</div>
|
|
838
|
+
`}}So.styles=[a`
|
|
839
|
+
:host {
|
|
840
|
+
--m-card-title-padding-x: ${Bt("spacing-4")};
|
|
841
|
+
--m-card-title-padding-top: ${Bt("spacing-4")};
|
|
842
|
+
}
|
|
913
843
|
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
fill: var(--m-button-color);
|
|
844
|
+
.m-card-title {
|
|
845
|
+
padding: var(--m-card-title-padding-top) var(--m-card-title-padding-x) 0;
|
|
917
846
|
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
847
|
+
${Gt("heading-sm-bold")};
|
|
848
|
+
color: ${_t("color-text-primary")};
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
slot[name='leading']::slotted(*) {
|
|
852
|
+
display: inline-flex;
|
|
853
|
+
flex-flow: row nowrap;
|
|
854
|
+
align-items: center;
|
|
855
|
+
justify-content: center;
|
|
856
|
+
pointer-events: none;
|
|
857
|
+
margin-inline-end: ${Bt("spacing-1")};
|
|
858
|
+
}
|
|
859
|
+
`],window.customElements.define("m-card-title",So);const Co={delay:"0s",duration:"0.35s",easing:"ease-in-out"};var Lo,Mo,Ao;class jo extends et{static get properties(){return{name:{type:String},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0},indeterminate:{type:Boolean,reflect:!0}}}constructor(){super(),Lo.add(this),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,Lo,"m",Mo).call(this)}render(){return U`
|
|
860
|
+
<label for="${no(this.id)}" class="check-input-label">
|
|
929
861
|
<input
|
|
930
|
-
id="${
|
|
931
|
-
name="${
|
|
862
|
+
id="${no(this.id)}"
|
|
863
|
+
name="${no(this.name)}"
|
|
932
864
|
type="checkbox"
|
|
933
865
|
class="check-input"
|
|
934
866
|
?disabled="${this.disabled}"
|
|
935
867
|
?checked="${this.checked}"
|
|
936
|
-
@change=${t(this,
|
|
868
|
+
@change=${t(this,Lo,"m",Ao)}
|
|
937
869
|
/>
|
|
938
870
|
<svg
|
|
939
871
|
class="check-icon"
|
|
@@ -957,16 +889,16 @@ const Fo=t=>null!=t?t:R,Vo={delay:"0s",duration:"0.35s",easing:"ease-in-out"};va
|
|
|
957
889
|
<slot name="leading"></slot>
|
|
958
890
|
<slot></slot>
|
|
959
891
|
</label>
|
|
960
|
-
`}}
|
|
961
|
-
${
|
|
892
|
+
`}}Lo=new WeakSet,Mo=function(){this.setAttribute("aria-disabled",this.disabled.toString()),this.setAttribute("aria-checked",this.indeterminate?"mixed":this.checked.toString()),this.input.indeterminate=this.indeterminate},Ao=function(t){const o=t.target,e=new CustomEvent("m-change",{cancelable:!1,composed:!1,bubbles:!0,detail:{checked:o.checked,indeterminate:o.indeterminate}});this.dispatchEvent(e),this.checked=o.checked,this.indeterminate=o.indeterminate},jo.styles=[a`
|
|
893
|
+
${Vt.focus(".check-input-label")} {
|
|
962
894
|
border-radius: 2px;
|
|
963
|
-
outline: 1px solid ${
|
|
895
|
+
outline: 1px solid ${_t("color-primary-60")};
|
|
964
896
|
}
|
|
965
897
|
|
|
966
898
|
.check-input-label {
|
|
967
899
|
${Gt("body-md")};
|
|
968
900
|
|
|
969
|
-
gap: ${
|
|
901
|
+
gap: ${Bt("spacing-1")};
|
|
970
902
|
align-items: center;
|
|
971
903
|
display: inline-flex;
|
|
972
904
|
padding: 4px 2px;
|
|
@@ -978,52 +910,52 @@ const Fo=t=>null!=t?t:R,Vo={delay:"0s",duration:"0.35s",easing:"ease-in-out"};va
|
|
|
978
910
|
}
|
|
979
911
|
|
|
980
912
|
.check-input {
|
|
981
|
-
--checkbox-input-size: ${
|
|
913
|
+
--checkbox-input-size: ${Bt("font-size-4")};
|
|
982
914
|
|
|
983
|
-
color: ${
|
|
915
|
+
color: ${_t("color-text-tertiary")};
|
|
984
916
|
width: var(--checkbox-input-size);
|
|
985
917
|
height: var(--checkbox-input-size);
|
|
986
|
-
background: ${
|
|
918
|
+
background: ${_t("color-neutral-0")};
|
|
987
919
|
appearance: none;
|
|
988
920
|
outline: none;
|
|
989
921
|
border-style: solid;
|
|
990
|
-
border-radius: ${
|
|
991
|
-
border-color: ${
|
|
992
|
-
border-width: ${
|
|
922
|
+
border-radius: ${Bt("border-radius-s")};
|
|
923
|
+
border-color: ${_t("color-border")};
|
|
924
|
+
border-width: ${Bt("border-thin")};
|
|
993
925
|
margin: 0;
|
|
994
|
-
${
|
|
926
|
+
${Ht([{property:"border",...Co},{property:"background",...Co}])};
|
|
995
927
|
}
|
|
996
928
|
|
|
997
929
|
.check-input:indeterminate,
|
|
998
930
|
.check-input:checked {
|
|
999
|
-
background: ${
|
|
1000
|
-
border-color: ${
|
|
931
|
+
background: ${_t("color-primary-60")};
|
|
932
|
+
border-color: ${_t("color-primary-60")};
|
|
1001
933
|
}
|
|
1002
934
|
|
|
1003
935
|
${It(".check-input")} {
|
|
1004
|
-
background: ${
|
|
936
|
+
background: ${_t("color-background-tertiary")};
|
|
1005
937
|
cursor: not-allowed;
|
|
1006
938
|
}
|
|
1007
939
|
|
|
1008
940
|
${It(".check-input:indeterminate")},
|
|
1009
941
|
${It(".check-input:checked")} {
|
|
1010
|
-
background: ${
|
|
1011
|
-
border-color: ${
|
|
942
|
+
background: ${_t("color-neutral-40")};
|
|
943
|
+
border-color: ${_t("color-neutral-40")};
|
|
1012
944
|
}
|
|
1013
945
|
|
|
1014
|
-
${
|
|
1015
|
-
${
|
|
1016
|
-
background: ${
|
|
1017
|
-
border-color: ${
|
|
946
|
+
${Vt.hover(".check-input:indeterminate")},
|
|
947
|
+
${Vt.hover(".check-input:checked")} {
|
|
948
|
+
background: ${_t("color-primary-100")};
|
|
949
|
+
border-color: ${_t("color-primary-100")};
|
|
1018
950
|
}
|
|
1019
951
|
|
|
1020
|
-
${
|
|
1021
|
-
border-color: ${
|
|
952
|
+
${Vt.hover(".check-input")} {
|
|
953
|
+
border-color: ${_t("color-primary-100")};
|
|
1022
954
|
}
|
|
1023
955
|
|
|
1024
956
|
:host([disabled]) .check-input-label {
|
|
1025
957
|
cursor: not-allowed;
|
|
1026
|
-
color: ${
|
|
958
|
+
color: ${_t("color-text-disabled")};
|
|
1027
959
|
}
|
|
1028
960
|
|
|
1029
961
|
.check-icon,
|
|
@@ -1031,12 +963,12 @@ const Fo=t=>null!=t?t:R,Vo={delay:"0s",duration:"0.35s",easing:"ease-in-out"};va
|
|
|
1031
963
|
position: absolute;
|
|
1032
964
|
width: 1em;
|
|
1033
965
|
height: 1em;
|
|
1034
|
-
fill: ${
|
|
966
|
+
fill: ${_t("color-neutral-0")};
|
|
1035
967
|
pointer-events: none;
|
|
1036
|
-
border-width: ${
|
|
968
|
+
border-width: ${Bt("border-thin")};
|
|
1037
969
|
border-style: solid;
|
|
1038
970
|
border-color: transparent;
|
|
1039
|
-
border-radius: ${
|
|
971
|
+
border-radius: ${Bt("border-radius-s")};
|
|
1040
972
|
display: none;
|
|
1041
973
|
}
|
|
1042
974
|
|
|
@@ -1044,7 +976,181 @@ const Fo=t=>null!=t?t:R,Vo={delay:"0s",duration:"0.35s",easing:"ease-in-out"};va
|
|
|
1044
976
|
.check-input:indeterminate:not(:checked) ~ .indeterminate-icon {
|
|
1045
977
|
display: block;
|
|
1046
978
|
}
|
|
1047
|
-
`],window.customElements.define("m-checkbox",
|
|
979
|
+
`],window.customElements.define("m-checkbox",jo);class Wo extends et{render(){return U` <hr class="m-divider" /> `}}Wo.styles=[a`
|
|
980
|
+
.m-divider {
|
|
981
|
+
border: 0;
|
|
982
|
+
border-block-end: solid 1px ${_t("color-divider")};
|
|
983
|
+
margin-block-start: var(
|
|
984
|
+
--m-divider-margin-top,
|
|
985
|
+
var(--m-divider-margin-y, 0)
|
|
986
|
+
);
|
|
987
|
+
margin-block-end: var(
|
|
988
|
+
--m-divider-margin-bottom,
|
|
989
|
+
var(--m-divider-margin-y, 0)
|
|
990
|
+
);
|
|
991
|
+
}
|
|
992
|
+
`],window.customElements.define("m-divider",Wo);const Bo=["center","flex-start","flex-end","stretch"],_o=["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 Oo extends et{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=Eo.padding,this.borderRadius=Eo.borderRadius,this.borderWidth=Eo.borderWidth,this.borderColor=Eo.borderColor,this.textAlign=Eo.textAlign}update(t){this.style.setProperty("--m-box-padding",ct(this.padding)||ct(Eo.padding)),this.style.setProperty("--m-box-background-color",ct(this.backgroundColor)||"transparent"),this.style.setProperty("--m-box-border-radius",ct(this.borderRadius)||ct(Eo.borderRadius)),this.style.setProperty("--m-box-border-width",ct(this.borderWidth)||ct(Eo.borderWidth)),this.style.setProperty("--m-box-border-color",ct(this.borderColor)||ct(Eo.borderColor)),this.style.setProperty("--m-box-text-align",this.textAlign||Eo.textAlign),super.update(t)}render(){return U`<slot></slot>`}}Oo.styles=[a`
|
|
993
|
+
:host {
|
|
994
|
+
--m-box-padding: ${Bt(Eo.padding)};
|
|
995
|
+
--m-box-background-color: transparent;
|
|
996
|
+
--m-box-border-radius: ${Bt(Eo.borderRadius)};
|
|
997
|
+
--m-box-border-width: ${Bt(Eo.borderWidth)};
|
|
998
|
+
--m-box-border-color: ${_t(Eo.borderColor)};
|
|
999
|
+
--m-box-text-align: ${l(Eo.textAlign)};
|
|
1000
|
+
|
|
1001
|
+
box-sizing: border-box;
|
|
1002
|
+
|
|
1003
|
+
padding: var(--m-box-padding);
|
|
1004
|
+
background-color: var(--m-box-background-color);
|
|
1005
|
+
border-radius: var(--m-box-border-radius);
|
|
1006
|
+
border-style: solid;
|
|
1007
|
+
border-width: var(--m-box-border-width);
|
|
1008
|
+
border-color: var(--m-box-border-color);
|
|
1009
|
+
text-align: var(--m-box-text-align);
|
|
1010
|
+
}
|
|
1011
|
+
`],window.customElements.define("m-box",Oo);const To={gap:"spacing-4",align:"stretch",justify:"flex-start"};class Uo extends et{static get properties(){return{gap:{type:String},align:{type:String},justify:{type:String}}}constructor(){super(),this.gap=To.gap,this.align=To.align,this.justify=To.justify}update(t){this.style.setProperty("--m-group-gap",ct(this.gap)||ct(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 U`<slot></slot>`}}Uo.styles=[a`
|
|
1012
|
+
:host {
|
|
1013
|
+
--m-group-gap: ${Bt(To.gap)};
|
|
1014
|
+
--m-group-align: ${l(To.align)};
|
|
1015
|
+
--m-group-justify: ${l(To.justify)};
|
|
1016
|
+
|
|
1017
|
+
display: flex;
|
|
1018
|
+
flex-wrap: wrap;
|
|
1019
|
+
gap: var(--m-group-gap);
|
|
1020
|
+
align-items: var(--m-group-align);
|
|
1021
|
+
justify-content: var(--m-group-justify);
|
|
1022
|
+
}
|
|
1023
|
+
`],window.customElements.define("m-group",Uo);const No={gap:"spacing-4",align:"stretch",justify:"flex-start"};class Ro extends et{static get properties(){return{gap:{type:String},align:{type:String},justify:{type:String}}}constructor(){super(),this.gap=No.gap,this.align=No.align,this.justify=No.justify}update(t){this.style.setProperty("--m-stack-gap",ct(this.gap)||ct(No.gap)),this.style.setProperty("--m-stack-align",this.align||No.align),this.style.setProperty("--m-stack-justify",this.justify||No.justify),super.update(t)}render(){return U`<slot></slot>`}}Ro.styles=[a`
|
|
1024
|
+
:host {
|
|
1025
|
+
--m-stack-gap: ${Bt(No.gap)};
|
|
1026
|
+
--m-stack-align: ${l(No.align)};
|
|
1027
|
+
--m-stack-justify: ${l(No.justify)};
|
|
1028
|
+
|
|
1029
|
+
display: flex;
|
|
1030
|
+
flex-direction: column;
|
|
1031
|
+
|
|
1032
|
+
row-gap: var(--m-stack-gap);
|
|
1033
|
+
align-items: var(--m-stack-align);
|
|
1034
|
+
justify-content: var(--m-stack-justify);
|
|
1035
|
+
}
|
|
1036
|
+
`],window.customElements.define("m-stack",Ro);const Po={gap:"spacing-4",minColumnWidth:ht("spacing-30")};class Zo extends et{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=Po.gap,this.minColumnWidth=Po.minColumnWidth}update(t){t.has("gap")&&this.style.setProperty("--m-grid-gap",ct(this.gap)||ct(Po.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-grid-row-gap",ct(this.rowGap)):this.style.removeProperty("--m-grid-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-grid-column-gap",ct(this.columnGap)):this.style.removeProperty("--m-grid-column-gap")),t.has("minColumnWidth")&&this.style.setProperty("--m-grid-min-column-width",this.minColumnWidth||Po.minColumnWidth),super.update(t)}render(){return U`<slot></slot>`}}Zo.styles=[a`
|
|
1037
|
+
:host {
|
|
1038
|
+
--m-grid-gap: ${Bt(Po.gap)};
|
|
1039
|
+
--m-grid-min-column-width: ${l(Po.minColumnWidth)};
|
|
1040
|
+
|
|
1041
|
+
display: grid;
|
|
1042
|
+
|
|
1043
|
+
row-gap: var(--m-grid-row-gap, var(--m-grid-gap));
|
|
1044
|
+
column-gap: var(--m-grid-column-gap, var(--m-grid-gap));
|
|
1045
|
+
|
|
1046
|
+
grid-template-columns: repeat(
|
|
1047
|
+
auto-fit,
|
|
1048
|
+
minmax(min(var(--m-grid-min-column-width), 100%), 1fr)
|
|
1049
|
+
);
|
|
1050
|
+
}
|
|
1051
|
+
`],window.customElements.define("m-grid",Zo);const Do={gap:"spacing-4",sideWidth:"auto",minContentWidth:"50%",reversed:!1};function Ho(t){return t?"row-reverse":"row"}class Go extends et{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=Do.gap,this.sideWidth=Do.sideWidth,this.minContentWidth=Do.minContentWidth,this.reversed=Do.reversed}update(t){t.has("gap")&&this.style.setProperty("--m-sidebar-gap",ct(this.gap)||ct(Do.gap)),t.has("sideWidth")&&this.style.setProperty("--m-sidebar-side-width",this.sideWidth||Do.sideWidth),t.has("minContentWidth")&&this.style.setProperty("--m-sidebar-min-content-width",this.minContentWidth||Do.minContentWidth),t.has("reversed")&&this.style.setProperty("--m-sidebar-flex-direction",Ho(this.reversed)),super.update(t)}render(){return U`
|
|
1052
|
+
<slot name="sidebar"></slot>
|
|
1053
|
+
<slot name="content"></slot>
|
|
1054
|
+
`}}Go.styles=[a`
|
|
1055
|
+
:host {
|
|
1056
|
+
--m-sidebar-gap: ${Bt(Do.gap)};
|
|
1057
|
+
--m-sidebar-flex-direction: ${l(Ho(Do.reversed))};
|
|
1058
|
+
--m-sidebar-side-width: ${l(Do.sideWidth)};
|
|
1059
|
+
--m-sidebar-min-content-width: ${l(Do.minContentWidth)};
|
|
1060
|
+
|
|
1061
|
+
display: flex;
|
|
1062
|
+
flex-wrap: wrap;
|
|
1063
|
+
flex-direction: var(--m-sidebar-flex-direction);
|
|
1064
|
+
|
|
1065
|
+
gap: var(--m-sidebar-gap);
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
slot[name='sidebar']::slotted(*) {
|
|
1069
|
+
flex-basis: var(--m-sidebar-side-width);
|
|
1070
|
+
flex-grow: 1;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
slot[name='content']::slotted(*) {
|
|
1074
|
+
flex-basis: 0;
|
|
1075
|
+
flex-grow: 999;
|
|
1076
|
+
min-width: var(--m-sidebar-min-content-width);
|
|
1077
|
+
}
|
|
1078
|
+
`],window.customElements.define("m-sidebar",Go);const Io={gap:"spacing-4",threshold:"10rem"};class Vo extends et{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=Io.gap,this.threshold=Io.threshold}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-switcher-gap",ct(this.gap)||ct(Io.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-switcher-row-gap",ct(this.rowGap)):this.style.removeProperty("--m-switcher-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-switcher-column-gap",ct(this.columnGap)):this.style.removeProperty("--m-switcher-column-gap")),t.has("threshold")&&this.style.setProperty("--m-switcher-threshold",this.threshold||Io.threshold)}render(){const t=this.limit?U`
|
|
1079
|
+
<style>
|
|
1080
|
+
::slotted(*:nth-last-child(n + ${this.limit+1})) {
|
|
1081
|
+
flex-basis: 100%;
|
|
1082
|
+
}
|
|
1083
|
+
::slotted(*:nth-last-child(n + ${this.limit+1}) ~ *) {
|
|
1084
|
+
flex-basis: 100%;
|
|
1085
|
+
}
|
|
1086
|
+
</style>
|
|
1087
|
+
`:"";return U`
|
|
1088
|
+
${t}
|
|
1089
|
+
<slot></slot>
|
|
1090
|
+
`}}function Jo(t,o,e){return Math.min(Math.max(o,t),e)}var qo,Fo,Ko,Qo;Vo.styles=[a`
|
|
1091
|
+
:host {
|
|
1092
|
+
--m-switcher-gap: ${Bt(Io.gap)};
|
|
1093
|
+
--m-switcher-threshold: ${l(Io.threshold)};
|
|
1094
|
+
|
|
1095
|
+
display: flex;
|
|
1096
|
+
flex-wrap: wrap;
|
|
1097
|
+
|
|
1098
|
+
row-gap: var(--m-switcher-row-gap, var(--m-switcher-gap));
|
|
1099
|
+
column-gap: var(--m-switcher-column-gap, var(--m-switcher-gap));
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
::slotted(*) {
|
|
1103
|
+
flex-basis: calc((var(--m-switcher-threshold) - 100%) * 999);
|
|
1104
|
+
flex-grow: 1;
|
|
1105
|
+
}
|
|
1106
|
+
`],window.customElements.define("m-switcher",Vo);class Xo extends et{static get properties(){return{value:{type:Number,noAccessor:!0},max:{type:Number,noAccessor:!0}}}set value(e){const r=t(this,Fo,"f");o(this,Fo,Jo(e,0,t(this,Ko,"f")),"f"),this.requestUpdate("value",r)}get value(){return t(this,Fo,"f")}set max(e){const r=t(this,Ko,"f");o(this,Ko,e<=0?100:e,"f"),o(this,Fo,Jo(t(this,Fo,"f"),0,t(this,Ko,"f")),"f"),this.requestUpdate("max",r)}get max(){return t(this,Ko,"f")}constructor(){super(),qo.add(this),Fo.set(this,0),Ko.set(this,100),this.value=0,this.max=100}connectedCallback(){super.connectedCallback(),this.setAttribute("role","progressbar"),this.setAttribute("aria-valuemin","0")}updated(){this.setAttribute("aria-valuenow",String(t(this,Fo,"f"))),this.setAttribute("aria-valuemax",String(t(this,Ko,"f")))}render(){return U`
|
|
1107
|
+
<div class="bar">
|
|
1108
|
+
<span
|
|
1109
|
+
class="progress"
|
|
1110
|
+
style=${bo({width:`${t(this,qo,"m",Qo).call(this)}%`})}
|
|
1111
|
+
></span>
|
|
1112
|
+
</div>
|
|
1113
|
+
`}}Fo=new WeakMap,Ko=new WeakMap,qo=new WeakSet,Qo=function(){return 100*t(this,Fo,"f")/t(this,Ko,"f")},Xo.styles=[a`
|
|
1114
|
+
:host {
|
|
1115
|
+
--m-progress-bar-progress-background: linear-gradient(
|
|
1116
|
+
45deg,
|
|
1117
|
+
${_t("color-brand-accent-1")} 22%,
|
|
1118
|
+
${_t("color-brand-accent-2")} 88%
|
|
1119
|
+
);
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
.bar {
|
|
1123
|
+
display: flex;
|
|
1124
|
+
flex-grow: 0;
|
|
1125
|
+
flex-shrink: 1;
|
|
1126
|
+
align-items: center;
|
|
1127
|
+
justify-content: center;
|
|
1128
|
+
|
|
1129
|
+
position: relative;
|
|
1130
|
+
overflow: hidden;
|
|
1131
|
+
|
|
1132
|
+
width: 100%;
|
|
1133
|
+
height: ${ho("8px")};
|
|
1134
|
+
|
|
1135
|
+
border-radius: ${Bt("border-radius-s")};
|
|
1136
|
+
|
|
1137
|
+
background-color: ${_t("color-background-tertiary")};
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
.progress {
|
|
1141
|
+
position: absolute;
|
|
1142
|
+
top: 0;
|
|
1143
|
+
left: 0;
|
|
1144
|
+
|
|
1145
|
+
${Ht([{property:"width"}])};
|
|
1146
|
+
|
|
1147
|
+
height: ${ho("8px")};
|
|
1148
|
+
|
|
1149
|
+
border-radius: ${Bt("border-radius-s")};
|
|
1150
|
+
|
|
1151
|
+
background: var(--m-progress-bar-progress-background);
|
|
1152
|
+
}
|
|
1153
|
+
`],window.customElements.define("m-progress-bar",Xo);const Yo="m-check";var te,oe,ee;class re extends et{static get properties(){return{value:{type:String},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0}}}constructor(){super(),te.add(this),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio"),this.addEventListener("click",this.handleClick)}updated(o){super.updated(o),o.has("disabled")&&t(this,te,"m",oe).call(this),o.has("checked")&&t(this,te,"m",ee).call(this)}render(){return U`
|
|
1048
1154
|
<button
|
|
1049
1155
|
type="button"
|
|
1050
1156
|
class="radio-button"
|
|
@@ -1056,15 +1162,15 @@ const Fo=t=>null!=t?t:R,Vo={delay:"0s",duration:"0.35s",easing:"ease-in-out"};va
|
|
|
1056
1162
|
<slot name="leading"></slot>
|
|
1057
1163
|
<slot></slot>
|
|
1058
1164
|
</button>
|
|
1059
|
-
`}handleClick(t){if(this.disabled)return t.preventDefault(),void t.stopPropagation();const o={detail:{value:this.value,type:"select"},bubbles:!0,composed:!1};this.dispatchEvent(new CustomEvent(
|
|
1165
|
+
`}handleClick(t){if(this.disabled)return t.preventDefault(),void t.stopPropagation();const o={detail:{value:this.value,type:"select"},bubbles:!0,composed:!1};this.dispatchEvent(new CustomEvent(Yo,o))}}te=new WeakSet,oe=function(){this.setAttribute("aria-disabled",String(this.disabled))},ee=function(){this.setAttribute("aria-checked",String(this.checked))},re.styles=[a`
|
|
1060
1166
|
:host {
|
|
1061
|
-
--m-radio-border-color: ${
|
|
1062
|
-
--m-radio-dot-check-color: ${
|
|
1167
|
+
--m-radio-border-color: ${_t("color-border")};
|
|
1168
|
+
--m-radio-dot-check-color: ${_t("color-primary-60")};
|
|
1063
1169
|
--m-radio-size: 14px;
|
|
1064
1170
|
--m-radio-background-color: white;
|
|
1065
|
-
--m-radio-border-width: ${
|
|
1066
|
-
--m-radio-label-color: ${
|
|
1067
|
-
--m-radio-outline-color: ${
|
|
1171
|
+
--m-radio-border-width: ${Bt("border-thin")};
|
|
1172
|
+
--m-radio-label-color: ${_t("color-text-tertiary")};
|
|
1173
|
+
--m-radio-outline-color: ${_t("color-primary-60")};
|
|
1068
1174
|
--m-radio-outline-offset: 2px;
|
|
1069
1175
|
}
|
|
1070
1176
|
|
|
@@ -1075,15 +1181,15 @@ const Fo=t=>null!=t?t:R,Vo={delay:"0s",duration:"0.35s",easing:"ease-in-out"};va
|
|
|
1075
1181
|
border: none;
|
|
1076
1182
|
background: none;
|
|
1077
1183
|
|
|
1078
|
-
height: ${
|
|
1184
|
+
height: ${Bt("global-height-small")};
|
|
1079
1185
|
display: inline-flex;
|
|
1080
|
-
gap: ${
|
|
1186
|
+
gap: ${Bt("spacing-1")};
|
|
1081
1187
|
align-items: center;
|
|
1082
|
-
border-radius: ${
|
|
1083
|
-
${
|
|
1188
|
+
border-radius: ${Bt("border-radius-s")};
|
|
1189
|
+
${Ht({property:"color"})};
|
|
1084
1190
|
}
|
|
1085
1191
|
|
|
1086
|
-
${
|
|
1192
|
+
${Vt.focus(".radio-button")} {
|
|
1087
1193
|
outline: 1px solid var(--m-radio-outline-color);
|
|
1088
1194
|
outline-offset: var(--m-radio-outline-offset);
|
|
1089
1195
|
}
|
|
@@ -1099,7 +1205,7 @@ const Fo=t=>null!=t?t:R,Vo={delay:"0s",duration:"0.35s",easing:"ease-in-out"};va
|
|
|
1099
1205
|
position: relative;
|
|
1100
1206
|
display: inline-flex;
|
|
1101
1207
|
|
|
1102
|
-
${
|
|
1208
|
+
${Ht({property:"border-color"})};
|
|
1103
1209
|
}
|
|
1104
1210
|
|
|
1105
1211
|
.radio-button .radio-input::before {
|
|
@@ -1112,7 +1218,7 @@ const Fo=t=>null!=t?t:R,Vo={delay:"0s",duration:"0.35s",easing:"ease-in-out"};va
|
|
|
1112
1218
|
left: 50%;
|
|
1113
1219
|
display: block;
|
|
1114
1220
|
position: absolute;
|
|
1115
|
-
${
|
|
1221
|
+
${Ht([{property:"background-color"},{property:"height",duration:"120ms"},{property:"width",duration:"120ms"}])};
|
|
1116
1222
|
}
|
|
1117
1223
|
|
|
1118
1224
|
.radio-button[aria-checked='true'] .radio-input::before {
|
|
@@ -1122,16 +1228,16 @@ const Fo=t=>null!=t?t:R,Vo={delay:"0s",duration:"0.35s",easing:"ease-in-out"};va
|
|
|
1122
1228
|
|
|
1123
1229
|
${It(".radio-button")} {
|
|
1124
1230
|
cursor: default;
|
|
1125
|
-
--m-radio-label-color: ${
|
|
1126
|
-
--m-radio-background-color: ${
|
|
1231
|
+
--m-radio-label-color: ${_t("color-neutral-40")};
|
|
1232
|
+
--m-radio-background-color: ${_t("color-background-tertiary")};
|
|
1127
1233
|
}
|
|
1128
1234
|
|
|
1129
1235
|
${It('.radio-button[aria-checked="true"]',".radio-input")} {
|
|
1130
|
-
--m-radio-border-color: ${
|
|
1236
|
+
--m-radio-border-color: ${_t("color-border")};
|
|
1131
1237
|
}
|
|
1132
1238
|
|
|
1133
1239
|
${It(".radio-button",".radio-input::before")} {
|
|
1134
|
-
--m-radio-dot-check-color: ${
|
|
1240
|
+
--m-radio-dot-check-color: ${_t("color-neutral-40")};
|
|
1135
1241
|
}
|
|
1136
1242
|
|
|
1137
1243
|
.radio-button .radio-input::before {
|
|
@@ -1139,36 +1245,36 @@ const Fo=t=>null!=t?t:R,Vo={delay:"0s",duration:"0.35s",easing:"ease-in-out"};va
|
|
|
1139
1245
|
}
|
|
1140
1246
|
|
|
1141
1247
|
.radio-button[aria-checked='true'] .radio-input {
|
|
1142
|
-
--m-radio-dot-check-color: ${
|
|
1143
|
-
--m-radio-border-color: ${
|
|
1248
|
+
--m-radio-dot-check-color: ${_t("color-primary-60")};
|
|
1249
|
+
--m-radio-border-color: ${_t("color-primary-60")};
|
|
1144
1250
|
}
|
|
1145
1251
|
|
|
1146
1252
|
.radio-button .radio-input {
|
|
1147
|
-
--m-radio-border-color: ${
|
|
1253
|
+
--m-radio-border-color: ${_t("color-border")};
|
|
1148
1254
|
}
|
|
1149
1255
|
|
|
1150
|
-
${
|
|
1151
|
-
--m-radio-border-color: ${
|
|
1152
|
-
--m-radio-dot-check-color: ${
|
|
1256
|
+
${Vt.hover(".radio-button")} .radio-input {
|
|
1257
|
+
--m-radio-border-color: ${_t("color-primary-100")};
|
|
1258
|
+
--m-radio-dot-check-color: ${_t("color-primary-100")};
|
|
1153
1259
|
}
|
|
1154
1260
|
|
|
1155
|
-
${
|
|
1156
|
-
--m-radio-label-color: ${
|
|
1261
|
+
${Vt.hover(".radio-button")} {
|
|
1262
|
+
--m-radio-label-color: ${_t("color-text-primary")};
|
|
1157
1263
|
}
|
|
1158
1264
|
|
|
1159
1265
|
${It(".radio-button","*")} {
|
|
1160
1266
|
pointer-event: none;
|
|
1161
1267
|
}
|
|
1162
|
-
`],window.customElements.define("m-radio",he);class
|
|
1268
|
+
`],window.customElements.define("m-radio",re);var ie,ne={};Object.defineProperty(ne,"i",{value:!0});var se,le,ae,de,ce,he,ue,be,ge,me,pe=Et;ne.SELECTION_TYPES=["single","single-strict","multiple"],ie=ne.default=function(t){var o=t.type,e=void 0===o?"multiple":o;return"single"===e?{type:"single",init:function(t){return this.select(t,new Set)},select:function(t,o){var e=pe.toArray(t);if(0===e.length)return o;var r=new Set;return r.add(String(e[e.length-1])),r},unselect:function(t,o){var e=pe.toArray(t);if(0===e.length||0===o.size)return o;for(var r=new Set(o),i=0;i<e.length;i++)r.delete(String(e[i]));return r},toggle:function(t,o){var e=pe.toArray(t);if(0===e.length)return o;for(var r=new Set,i=0;i<e.length;i++){var n=String(e[i]);o.has(n)||(r.clear(),r.add(n))}return r},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"===e?{type:"single-strict",init:function(t){return this.select(t,new Set)},select:function(t,o){var e=pe.toArray(t);if(0===e.length)return o;var r=new Set;return r.add(String(e[e.length-1])),r},unselect:function(t,o){var e=pe.toArray(t);if(0===e.length||0===o.size)return o;for(var r=new Set(o),i=0;i<e.length&&o.size>1;i++)r.delete(String(e[i]));return r},toggle:function(t,o){var e=pe.toArray(t);if(0===e.length)return o;for(var r=new Set(o),i=0;i<e.length;i++){var n=String(e[i]);o.has(n)||(r.clear(),r.add(n))}return r},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 e=pe.toArray(t);if(0===e.length)return o;for(var r=new Set(o),i=0;i<e.length;i++)r.add(String(e[i]));return r},unselect:function(t,o){var e=pe.toArray(t);if(0===e.length||0===o.size)return o;for(var r=new Set(o),i=0;i<e.length;i++)r.delete(String(e[i]));return r},toggle:function(t,o){var e=pe.toArray(t);if(0===e.length)return o;for(var r=new Set(o),i=0;i<e.length;i++){var n=String(e[i]);o.has(n)?r.delete(n):r.add(n)}return r},reset:function(t){return null==t?new Set:t},value:function(t){return null==t||0===t.size?null:Array.from(t)}}};class fe{constructor(o,e,r){se.add(this),this.disabled=!1,this.event="m-select",le.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:o,value:e}}=t;switch(o){case"select":this.select(Ot(e));break;case"unselect":this.unselect(Ot(e));break;case"toggle":this.toggle(Ot(e))}})),this.init=t=>{this.host.selection=this.strategy.init(t)},this.select=o=>{this.host.selection=this.strategy.select(o,this.host.selection),t(this,se,"m",ae).call(this)},this.unselect=o=>{this.host.selection=this.strategy.unselect(o,this.host.selection),t(this,se,"m",ae).call(this)},this.toggle=o=>{this.host.selection=this.strategy.toggle(o,this.host.selection),t(this,se,"m",ae).call(this)},this.subscribe=()=>{this.host.addEventListener(this.event,t(this,le,"f"))},this.unsubscribe=()=>{this.host.removeEventListener(this.event,t(this,le,"f"))},this.host=o,this.type=e,this.event=r,this.strategy=ie({type:e}),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))}}le=new WeakMap,se=new WeakSet,ae=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 $e extends et{static get properties(){return{value:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},selection:{state:!0},orientation:{type:String}}}constructor(){super(),de.add(this),ce.set(this,null),he.set(this,null),this.disabled=!1,this.selection=new Set,this.value="",this.orientation="vertical",this.type="single-strict"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio-group"),o(this,ce,new fe(this,this.type,Yo),"f")}update(o){super.update(o),o.has("value")&&t(this,ce,"f").init(Ot(this.value||t(this,de,"m",ue).call(this))),o.has("selection")&&([this.value]=this.selection)}updated(o){super.updated(o),o.has("selection")&&t(this,de,"m",be).call(this).forEach((o=>{t(this,de,"m",ge).call(this,o)})),o.has("disabled")&&t(this,de,"m",be).call(this).forEach((o=>{t(this,de,"m",me).call(this,o)}))}render(){return U`
|
|
1163
1269
|
<div
|
|
1164
1270
|
class=${lt({"radio-group":!0,"-vertical":"vertical"===this.orientation,"-horizontal":"horizontal"===this.orientation})}
|
|
1165
1271
|
>
|
|
1166
1272
|
<slot></slot>
|
|
1167
1273
|
</div>
|
|
1168
|
-
`}}
|
|
1274
|
+
`}}ce=new WeakMap,he=new WeakMap,de=new WeakSet,ue=function(){var o;return null===(o=t(this,de,"m",be).call(this)[0])||void 0===o?void 0:o.value},be=function(){return null==t(this,he,"f")&&o(this,he,this.shadowRoot.querySelector("slot"),"f"),[...t(this,he,"f").assignedElements({flatten:!0})].filter((t=>"m-radio"===t.tagName.toLowerCase()))},ge=function(t){t.checked=this.selection.has(t.value)},me=function(t){t.disabled=this.disabled},$e.styles=[a`
|
|
1169
1275
|
.radio-group {
|
|
1170
1276
|
display: flex;
|
|
1171
|
-
gap: ${
|
|
1277
|
+
gap: ${Bt("spacing-2")};
|
|
1172
1278
|
}
|
|
1173
1279
|
.radio-group.-vertical {
|
|
1174
1280
|
flex-direction: column;
|
|
@@ -1176,25 +1282,25 @@ const Fo=t=>null!=t?t:R,Vo={delay:"0s",duration:"0.35s",easing:"ease-in-out"};va
|
|
|
1176
1282
|
.radio-group.-horizontal {
|
|
1177
1283
|
flex-direction: row;
|
|
1178
1284
|
}
|
|
1179
|
-
`],window.customElements.define("m-radio-group"
|
|
1285
|
+
`],window.customElements.define("m-radio-group",$e);class ye extends et{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 U`
|
|
1180
1286
|
<span
|
|
1181
1287
|
class=${lt({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})}
|
|
1182
1288
|
>
|
|
1183
1289
|
${this.isSkeleton?U``:U`<slot name="leading"></slot>`}
|
|
1184
1290
|
<slot></slot>
|
|
1185
1291
|
</span>
|
|
1186
|
-
`}}
|
|
1292
|
+
`}}ye.styles=[[a`
|
|
1187
1293
|
@keyframes skeleton-loading {
|
|
1188
1294
|
0% {
|
|
1189
|
-
background-color: ${
|
|
1295
|
+
background-color: ${_t("color-background-tertiary")};
|
|
1190
1296
|
opacity: 0.3;
|
|
1191
1297
|
}
|
|
1192
1298
|
50% {
|
|
1193
|
-
background-color: ${
|
|
1299
|
+
background-color: ${_t("color-background-tertiary")};
|
|
1194
1300
|
opacity: 0.6;
|
|
1195
1301
|
}
|
|
1196
1302
|
100% {
|
|
1197
|
-
background-color: ${
|
|
1303
|
+
background-color: ${_t("color-background-tertiary")};
|
|
1198
1304
|
}
|
|
1199
1305
|
}
|
|
1200
1306
|
`,a`
|
|
@@ -1209,51 +1315,155 @@ const Fo=t=>null!=t?t:R,Vo={delay:"0s",duration:"0.35s",easing:"ease-in-out"};va
|
|
|
1209
1315
|
box-sizing: border-box;
|
|
1210
1316
|
max-width: 200px;
|
|
1211
1317
|
border-radius: 100px;
|
|
1212
|
-
line-height: ${
|
|
1318
|
+
line-height: ${Bt("line-height-1")};
|
|
1213
1319
|
cursor: default;
|
|
1214
1320
|
}
|
|
1215
1321
|
|
|
1216
1322
|
.tag slot[name='leading']::slotted(*) {
|
|
1217
|
-
margin-inline-end: ${
|
|
1323
|
+
margin-inline-end: ${Bt("spacing-1")};
|
|
1218
1324
|
vertical-align: middle;
|
|
1219
1325
|
}
|
|
1220
1326
|
|
|
1221
1327
|
.-size-small {
|
|
1222
1328
|
${Gt("chips-sm")};
|
|
1223
|
-
padding: ${
|
|
1224
|
-
block-size: ${
|
|
1329
|
+
padding: ${Bt("spacing-1")} ${Bt("spacing-2")};
|
|
1330
|
+
block-size: ${ho("18px")};
|
|
1225
1331
|
}
|
|
1226
1332
|
.-size-default {
|
|
1227
1333
|
${Gt("chips-md")};
|
|
1228
|
-
padding: ${
|
|
1229
|
-
block-size: ${
|
|
1334
|
+
padding: ${Bt("spacing-2")} ${Bt("spacing-3")};
|
|
1335
|
+
block-size: ${Bt("global-height-small")};
|
|
1230
1336
|
}
|
|
1231
1337
|
.-size-large {
|
|
1232
1338
|
${Gt("button-lg")};
|
|
1233
|
-
padding: ${
|
|
1234
|
-
block-size: ${
|
|
1339
|
+
padding: ${Bt("spacing-3")} ${Bt("spacing-4")};
|
|
1340
|
+
block-size: ${Bt("global-height-default")};
|
|
1235
1341
|
}
|
|
1236
1342
|
|
|
1237
1343
|
.-success {
|
|
1238
|
-
color: ${
|
|
1239
|
-
background: ${
|
|
1344
|
+
color: ${_t("color-success-60")};
|
|
1345
|
+
background: ${_t("color-success-20")};
|
|
1240
1346
|
}
|
|
1241
1347
|
.-neutral {
|
|
1242
|
-
color: ${
|
|
1243
|
-
background: ${
|
|
1348
|
+
color: ${_t("color-text-tertiary")};
|
|
1349
|
+
background: ${_t("color-background-tertiary")};
|
|
1244
1350
|
}
|
|
1245
1351
|
.-warning {
|
|
1246
|
-
color: ${
|
|
1247
|
-
background: ${
|
|
1352
|
+
color: ${_t("color-warning-100")};
|
|
1353
|
+
background: ${_t("color-warning-20")};
|
|
1248
1354
|
}
|
|
1249
1355
|
.-danger {
|
|
1250
|
-
color: ${
|
|
1251
|
-
background: ${
|
|
1356
|
+
color: ${_t("color-danger-60")};
|
|
1357
|
+
background: ${_t("color-danger-20")};
|
|
1252
1358
|
}
|
|
1253
1359
|
|
|
1254
1360
|
.-is-skeleton {
|
|
1255
1361
|
${l("animation: skeleton-loading 1s linear infinite alternate;")};
|
|
1256
1362
|
width: var(--m-tag-skeleton-width);
|
|
1257
1363
|
}
|
|
1258
|
-
`]],window.customElements.define("m-tag",
|
|
1364
|
+
`]],window.customElements.define("m-tag",ye);const ve="m-toggle";var we,xe,ke,ze,Se,Ce,Le,Me,Ae,je,We;class Be extends et{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(),we.add(this),xe.set(this,null),ke.set(this,null),this.showCheck=!1,this.size="default",this.type="single",this.selection=new Set}update(e){super.update(e),(null!=e.get("type")&&null!=this.type||null==t(this,xe,"f"))&&(o(this,xe,new fe(this,this.type,ve),"f"),t(this,xe,"f").init(Ot(this.value)),this.role=["single","single-strict"].includes(this.type)?"radiogroup":"group"),e.has("value")&&t(this,xe,"f").init(Ot(this.value))}updated(o){super.updated(o),o.has("selection")&&t(this,we,"m",ze).call(this).forEach((o=>{t(this,we,"m",Ce).call(this,o)})),o.has("disabled")&&t(this,we,"m",ze).call(this).forEach((o=>{t(this,we,"m",Le).call(this,o)})),o.has("role")&&t(this,we,"m",ze).call(this).forEach((o=>{t(this,we,"m",Se).call(this,o)}))}render(){return U`
|
|
1365
|
+
<m-group
|
|
1366
|
+
class=${lt({"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})}
|
|
1367
|
+
gap="spacing-1"
|
|
1368
|
+
>
|
|
1369
|
+
<slot></slot>
|
|
1370
|
+
</m-group>
|
|
1371
|
+
`}}xe=new WeakMap,ke=new WeakMap,we=new WeakSet,ze=function(){return null==t(this,ke,"f")&&o(this,ke,this.shadowRoot.querySelector("slot"),"f"),[...t(this,ke,"f").assignedElements({flatten:!0})].filter((t=>"m-toggle"===t.tagName.toLowerCase()))},Se=function(t){t.setAttribute("role",["single","single-strict"].includes(this.type)?"radio":"checkbox")},Ce=function(t){t.checked=this.selection.has(t.value)},Le=function(t){t.disabled=this.disabled},Be.styles=[[a`
|
|
1372
|
+
.toggle-group {
|
|
1373
|
+
inline-size: max-content;
|
|
1374
|
+
|
|
1375
|
+
border: 1px solid ${_t("color-border")};
|
|
1376
|
+
padding: ${Bt("spacing-1")};
|
|
1377
|
+
|
|
1378
|
+
border-radius: ${Bt("border-radius-s")};
|
|
1379
|
+
box-sizing: border-box;
|
|
1380
|
+
|
|
1381
|
+
block-size: ${Bt("global-height-default")};
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
.toggle-group.-small {
|
|
1385
|
+
block-size: ${Bt("global-height-small")};
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
.toggle-group.-small ::slotted(m-toggle) {
|
|
1389
|
+
--m-toggle-base-size: 18px;
|
|
1390
|
+
--m-toggle-font-size: ${Bt("font-size-2")};
|
|
1391
|
+
--m-toggle-icon-size: 10px;
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
.toggle-group.-show-check ::slotted(m-toggle[aria-checked='true']) {
|
|
1395
|
+
--m-toggle-icon-display: inline-flex;
|
|
1396
|
+
}
|
|
1397
|
+
`]],window.customElements.define("m-toggle-group",Be);class _e extends et{static get properties(){return{checked:{type:Boolean},disabled:{type:Boolean,reflect:!0},role:{type:String,reflect:!0},value:{type:String}}}constructor(){super(),Me.add(this),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t(this,Me,"m",Ae))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,Me,"m",Ae))}updated(o){super.updated(o),o.has("disabled")&&t(this,Me,"m",je).call(this),o.has("checked")&&t(this,Me,"m",We).call(this)}render(){return U`
|
|
1398
|
+
<button
|
|
1399
|
+
type="button"
|
|
1400
|
+
class=${lt({button:!0,toggle:!0})}
|
|
1401
|
+
role="${this.role}"
|
|
1402
|
+
aria-checked="${this.checked}"
|
|
1403
|
+
?disabled="${this.disabled}"
|
|
1404
|
+
>
|
|
1405
|
+
<slot name="leading" slot="leading">
|
|
1406
|
+
<!-- TODO: Isolate icons when we add another component that alse uses them -->
|
|
1407
|
+
<svg
|
|
1408
|
+
class="check-icon"
|
|
1409
|
+
viewBox="0 0 48 48"
|
|
1410
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1411
|
+
>
|
|
1412
|
+
<path
|
|
1413
|
+
fill-rule="evenodd"
|
|
1414
|
+
clip-rule="evenodd"
|
|
1415
|
+
d="M44.4203 13.3431L40.1777 9.1005L18.9645 30.3137L9.06496 20.4142L4.82232 24.6569L14.7218 34.5563L18.9645 38.799L23.2071 34.5563L44.4203 13.3431Z"
|
|
1416
|
+
/>
|
|
1417
|
+
</svg>
|
|
1418
|
+
</slot>
|
|
1419
|
+
|
|
1420
|
+
<slot></slot>
|
|
1421
|
+
</button>
|
|
1422
|
+
`}}Me=new WeakSet,Ae=function(){if(this.disabled)return;this.checked=!this.checked;const t={detail:{value:this.value,type:"toggle"},bubbles:!0,composed:!1};this.dispatchEvent(new CustomEvent(ve,t))},je=function(){this.setAttribute("aria-disabled",String(this.disabled))},We=function(){this.setAttribute("aria-checked",String(this.checked))},_e.styles=[[Jt(),a`
|
|
1423
|
+
:host {
|
|
1424
|
+
/*
|
|
1425
|
+
* These custom properties are here because they are meant to be
|
|
1426
|
+
* overriden via toggle-group styles.
|
|
1427
|
+
*/
|
|
1428
|
+
--m-toggle-base-size: 30px;
|
|
1429
|
+
--m-toggle-font-size: ${Bt("font-size-3")};
|
|
1430
|
+
--m-toggle-icon-size: 12px;
|
|
1431
|
+
--m-toggle-icon-display: none;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
.toggle {
|
|
1435
|
+
--m-button-border-color: transparent;
|
|
1436
|
+
--m-button-color: ${_t("color-primary-100")};
|
|
1437
|
+
--m-button-padding-x: ${Bt("spacing-2")};
|
|
1438
|
+
--m-button-padding-y: 0;
|
|
1439
|
+
|
|
1440
|
+
--m-button-base-size: var(--m-toggle-base-size);
|
|
1441
|
+
--m-button-font-size: var(--m-toggle-font-size);
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
${It([".toggle"])} {
|
|
1445
|
+
--m-button-color: ${_t("color-text-disabled")};
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
[aria-checked='true'] {
|
|
1449
|
+
--m-button-background-color: ${_t("color-primary-20")};
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
${Vt.hover(".toggle")} {
|
|
1453
|
+
--m-button-background-color: ${_t("color-background-tertiary")};
|
|
1454
|
+
--m-button-border-color: ${_t("color-background-tertiary")};
|
|
1455
|
+
--m-button-color: ${_t("color-primary-100")};
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
.check-icon {
|
|
1459
|
+
${Ht([{property:"color"},{property:"fill"}])};
|
|
1460
|
+
|
|
1461
|
+
display: var(--m-toggle-icon-display);
|
|
1462
|
+
color: var(--m-button-color);
|
|
1463
|
+
fill: var(--m-button-color);
|
|
1464
|
+
|
|
1465
|
+
block-size: var(--m-toggle-icon-size);
|
|
1466
|
+
inline-size: var(--m-toggle-icon-size);
|
|
1467
|
+
}
|
|
1468
|
+
`]],window.customElements.define("m-toggle",_e);export{Bo as ALIGN_ITEMS_VALUES,wo as Banner,Xt as BannerActionPrimary,Yt as BannerActionSecondary,to as BannerActions,oo as BannerDescription,eo as BannerIcon,ro as BannerTitle,Oo as Box,Qt as Button,xo as Card,ko as CardBody,zo as CardSubtitle,So as CardTitle,jo as Checkbox,uo as CloseButton,Wo as Divider,Zo as Grid,Uo as Group,_o as JUSTIFY_CONTENT_VALUES,Xo as ProgressBar,re as Radio,$e as RadioGroup,Go as Sidebar,Ro as Stack,Vo as Switcher,ye as Tag,go as Text,_e as Toggle,Be as ToggleGroup,Eo as defaultBoxProps,Po as defaultGridProps,To as defaultGroupProps,Do as defaultSidebarProps,No as defaultStackProps,Io as defaultSwitcherProps};
|
|
1259
1469
|
//# sourceMappingURL=index.js.map
|