@loadsmart/miranda-wc 1.23.0 → 1.24.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.d.ts +1 -0
- package/dist/components/banner/banner.d.ts.map +1 -1
- package/dist/components/banner/banner.styles.d.ts.map +1 -1
- package/dist/components/checkbox/checkbox.d.ts +1 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/checkbox.styles.d.ts.map +1 -1
- package/dist/components/close-button/close-button.d.ts +1 -0
- package/dist/components/close-button/close-button.d.ts.map +1 -1
- package/dist/components/close-button/close-button.styles.d.ts.map +1 -1
- package/dist/components/field/field-hint.d.ts +33 -0
- package/dist/components/field/field-hint.d.ts.map +1 -0
- package/dist/components/field/field-hint.styles.d.ts +3 -0
- package/dist/components/field/field-hint.styles.d.ts.map +1 -0
- package/dist/components/field/field-label.d.ts +39 -0
- package/dist/components/field/field-label.d.ts.map +1 -0
- package/dist/components/field/field-label.styles.d.ts +3 -0
- package/dist/components/field/field-label.styles.d.ts.map +1 -0
- package/dist/components/field/field.context.d.ts +11 -0
- package/dist/components/field/field.context.d.ts.map +1 -0
- package/dist/components/field/field.d.ts +64 -0
- package/dist/components/field/field.d.ts.map +1 -0
- package/dist/components/field/field.types.d.ts +3 -0
- package/dist/components/field/field.types.d.ts.map +1 -0
- package/dist/components/field/index.d.ts +8 -0
- package/dist/components/field/index.d.ts.map +1 -0
- package/dist/components/icon/available-icons.d.ts +4 -0
- package/dist/components/icon/available-icons.d.ts.map +1 -0
- package/dist/components/icon/icon.d.ts +59 -0
- package/dist/components/icon/icon.d.ts.map +1 -0
- package/dist/components/icon/icon.styles.d.ts +3 -0
- package/dist/components/icon/icon.styles.d.ts.map +1 -0
- package/dist/components/icon/index.d.ts +4 -0
- package/dist/components/icon/index.d.ts.map +1 -0
- package/dist/components/toggle-group/toggle.d.ts +1 -0
- package/dist/components/toggle-group/toggle.d.ts.map +1 -1
- package/dist/components/toggle-group/toggle.styles.d.ts.map +1 -1
- package/dist/icons/attention.js +3 -0
- package/dist/icons/bell.js +3 -0
- package/dist/icons/check.js +3 -0
- package/dist/icons/close.js +3 -0
- package/dist/icons/indeterminate.js +3 -0
- package/dist/icons/info-circle.js +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +627 -543
- package/dist/index.js.map +1 -1
- package/dist/styles/margin.d.ts +16 -14
- package/dist/styles/margin.d.ts.map +1 -1
- package/package.json +4 -2
package/dist/index.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
function t(t,e,o,
|
|
1
|
+
function t(t,e,o,i){if("a"===o&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===o?i:"a"===o?i.call(t):i?i.value:e.get(t)}function e(t,e,o,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(t,o):r?r.value=o:e.set(t,o),o
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2019 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/}const o=window,
|
|
6
|
+
*/}const o=window,i=o.ShadowRoot&&(void 0===o.ShadyCSS||o.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),n=new WeakMap;class s{constructor(t,e,o){if(this._$cssResult$=!0,o!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=n.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&n.set(e,t))}return t}toString(){return this.cssText}}const l=t=>new s("string"==typeof t?t:t+"",void 0,r),a=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,o,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[i+1]),t[0]);return new s(o,t,r)},c=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return l(e)})(t):t
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/;var
|
|
11
|
+
*/;var d;const h=window,u=h.trustedTypes,b=u?u.emptyScript:"",g=h.reactiveElementPolyfillSupport,m={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},p=(t,e)=>e!==t&&(e==e||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 e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,o)=>{const i=this._$Ep(o,e);void 0!==i&&(this._$Ev.set(i,o),t.push(i))})),t}static createProperty(t,e=f){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const o="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,o,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){return{get(){return this[e]},set(i){const r=this[t];this[e]=i,this.requestUpdate(t,r,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||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,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const o of e)this.createProperty(o,t[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(c(t))}else void 0!==t&&e.push(c(t));return e}static _$Ep(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,o;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(o=t.hostConnected)||void 0===o||o.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{i?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),r=o.litNonce;void 0!==r&&i.setAttribute("nonce",r),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$EO(t,e,o=f){var i;const r=this.constructor._$Ep(t,o);if(void 0!==r&&!0===o.reflect){const n=(void 0!==(null===(i=o.converter)||void 0===i?void 0:i.toAttribute)?o.converter:m).toAttribute(e,o.type);this._$El=t,null==n?this.removeAttribute(r):this.setAttribute(r,n),this._$El=null}}_$AK(t,e){var o;const i=this.constructor,r=i._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=i.getPropertyOptions(r),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(o=t.converter)||void 0===o?void 0:o.fromAttribute)?t.converter:m;this._$El=r,this[r]=n.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,o){let i=!0;void 0!==t&&(((o=o||this.constructor.getPropertyOptions(t)).hasChanged||p)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===o.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,o))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const o=this._$AL;try{e=this.shouldUpdate(o),e?(this.willUpdate(o),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(o)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(o)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
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!==(d=h.reactiveElementVersions)&&void 0!==d?d: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,j=(t="")=>C.createComment(t),A=t=>null===t||"object"!=typeof t&&"function"!=typeof t,W=Array.isArray,E=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,B=/>/g,M=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),O=/'/g,T=/"/g,U=/^(?:script|style|textarea|title)$/i,N=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),R=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),P=new WeakMap,D=C.createTreeWalker(C,129,null,!1),G=(t,e)=>{const o=t.length-1,i=[];let r,n=2===e?"<svg>":"",s=E;for(let e=0;e<o;e++){const o=t[e];let l,a,c=-1,d=0;for(;d<o.length&&(s.lastIndex=d,a=s.exec(o),null!==a);)d=s.lastIndex,s===E?"!--"===a[1]?s=_:void 0!==a[1]?s=B:void 0!==a[2]?(U.test(a[2])&&(r=RegExp("</"+a[2],"g")),s=M):void 0!==a[3]&&(s=M):s===M?">"===a[0]?(s=null!=r?r:E,c=-1):void 0===a[1]?c=-2:(c=s.lastIndex-a[2].length,l=a[1],s=void 0===a[3]?M:'"'===a[3]?T:O):s===T||s===O?s=M:s===_||s===B?s=E:(s=M,r=void 0);const h=s===M&&t[e+1].startsWith("/>")?" ":"";n+=s===E?o+S:c>=0?(i.push(l),o.slice(0,c)+"$lit$"+o.slice(c)+k+h):o+k+(-2===c?(i.push(void 0),e):h)}const l=n+(t[o]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==x?x.createHTML(l):l,i]};class L{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let r=0,n=0;const s=t.length-1,l=this.parts,[a,c]=G(t,e);if(this.el=L.createElement(a,o),D.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=D.nextNode())&&l.length<s;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(k)){const o=c[n++];if(t.push(e),void 0!==o){const t=i.getAttribute(o.toLowerCase()+"$lit$").split(k),e=/([.?@])?(.*)/.exec(o);l.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?F:"?"===e[1]?K:"@"===e[1]?Q:Z})}else l.push({type:6,index:r})}for(const e of t)i.removeAttribute(e)}if(U.test(i.tagName)){const t=i.textContent.split(k),e=t.length-1;if(e>0){i.textContent=w?w.emptyScript:"";for(let o=0;o<e;o++)i.append(t[o],j()),D.nextNode(),l.push({type:2,index:++r});i.append(t[e],j())}}}else if(8===i.nodeType)if(i.data===z)l.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(k,t+1));)l.push({type:7,index:r}),t+=k.length-1}r++}}static createElement(t,e){const o=C.createElement("template");return o.innerHTML=t,o}}function I(t,e,o=t,i){var r,n,s,l;if(e===R)return e;let a=void 0!==i?null===(r=o._$Co)||void 0===r?void 0:r[i]:o._$Cl;const c=A(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==c&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===c?a=void 0:(a=new c(t),a._$AT(t,o,i)),void 0!==i?(null!==(s=(l=o)._$Co)&&void 0!==s?s:l._$Co=[])[i]=a:o._$Cl=a),void 0!==a&&(e=I(t,a._$AS(t,e.values),a,i)),e}class V{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:o},parts:i}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:C).importNode(o,!0);D.currentNode=r;let n=D.nextNode(),s=0,l=0,a=i[0];for(;void 0!==a;){if(s===a.index){let e;2===a.type?e=new J(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new X(n,this,t)),this.u.push(e),a=i[++l]}s!==(null==a?void 0:a.index)&&(n=D.nextNode(),s++)}return r}p(t){let e=0;for(const o of this.u)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class J{constructor(t,e,o,i){var r;this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cm=null===(r=null==i?void 0:i.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=I(this,t,e),A(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==R&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>W(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==q&&A(this._$AH)?this._$AA.nextSibling.data=t:this.T(C.createTextNode(t)),this._$AH=t}$(t){var e;const{values:o,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=L.createElement(i.h,this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.p(o);else{const t=new V(r,this),e=t.v(this.options);t.p(o),this.T(e),this._$AH=t}}_$AC(t){let e=P.get(t.strings);return void 0===e&&P.set(t.strings,e=new L(t)),e}k(t){W(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const r of t)i===e.length?e.push(o=new J(this.O(j()),this.O(j()),this,this.options)):o=e[i],o._$AI(r),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var o;for(null===(o=this._$AP)||void 0===o||o.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class Z{constructor(t,e,o,i,r){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=q}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,o,i){const r=this.strings;let n=!1;if(void 0===r)t=I(this,t,e,0),n=!A(t)||t!==this._$AH&&t!==R,n&&(this._$AH=t);else{const i=t;let s,l;for(t=r[0],s=0;s<r.length-1;s++)l=I(this,i[o+s],e,s),l===R&&(l=this._$AH[s]),n||(n=!A(l)||l!==this._$AH[s]),l===q?t=q:t!==q&&(t+=(null!=l?l:"")+r[s+1]),this._$AH[s]=l}n&&!i&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class F extends Z{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}const H=w?w.emptyScript:"";class K extends Z{constructor(){super(...arguments),this.type=4}j(t){t&&t!==q?this.element.setAttribute(this.name,H):this.element.removeAttribute(this.name)}}class Q extends Z{constructor(t,e,o,i,r){super(t,e,o,i,r),this.type=5}_$AI(t,e=this){var o;if((t=null!==(o=I(this,t,e,0))&&void 0!==o?o:q)===R)return;const i=this._$AH,r=t===q&&i!==q||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==q&&(i===q||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,o;"function"==typeof this._$AH?this._$AH.call(null!==(o=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==o?o:this.element,t):this._$AH.handleEvent(t)}}class X{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){I(this,t)}}const Y=v.litHtmlPolyfillSupport;null==Y||Y(L,J),(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,et;class ot extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const o=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=o.firstChild),o}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,o)=>{var r
|
|
23
|
+
var tt,et;class ot extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const o=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=o.firstChild),o}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,o)=>{var i,r;const n=null!==(i=null==o?void 0:o.renderBefore)&&void 0!==i?i:e;let s=n._$litPart$;if(void 0===s){const t=null!==(r=null==o?void 0:o.renderBefore)&&void 0!==r?r:null;n._$litPart$=s=new J(e.insertBefore(j(),t),t,void 0,null!=o?o:{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return R}}ot.finalized=!0,ot._$litElement$=!0,null===(tt=globalThis.litElementHydrateSupport)||void 0===tt||tt.call(globalThis,{LitElement:ot});const it=globalThis.litElementPolyfillSupport;null==it||it({LitElement:ot}),(null!==(et=globalThis.litElementVersions)&&void 0!==et?et:globalThis.litElementVersions=[]).push("3.2.2");
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*/
|
|
29
|
-
const
|
|
29
|
+
const rt=1,nt=t=>(...e)=>({_$litDirective$:t,values:e});class st{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
30
30
|
/**
|
|
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 e;if(super(t),t.type!==it||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var o,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 e)e[t]&&!(null===(o=this.st)||void 0===o?void 0:o.has(t))&&this.nt.add(t);return this.render(e)}const i=t.element.classList;this.nt.forEach((t=>{t in e||(i.remove(t),this.nt.delete(t))}));for(const t in e){const o=!!e[t];o===this.nt.has(t)||(null===(r=this.st)||void 0===r?void 0:r.has(t))||(o?(i.add(t),this.nt.add(t)):(i.remove(t),this.nt.delete(t)))}return N}});var at;class dt extends ot{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(e){super.updated(e),(e.has("form")||null==t(this,at,"f"))&&this.getAssignedForm()}getAssignedForm(){if(this.hasAttribute("form")){const t=this.getRootNode(),o=this.getAttribute("form");e(this,at,t.getElementById(o),"f")}else e(this,at,this.closest("form"),"f")}}at=new WeakMap;var ct,ut,ht={},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(ht,"i",{value:!0});var bt=gt;function pt(t){return bt.LoadsmartTheme[t]}function mt(t){var e=pt(t);return null==e?e:"--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(e){return e.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-"),jt=$t("elevation-"),At=$t("glow-"),Bt=$t("global-");function _t(t){return l(ct(t))}function Wt(t,e=1){return l(ct(t,e))}ht.BACKGROUND_COLOR_TOKENS=vt,ht.BORDER_RADIUS_TOKENS=Lt,ht.BORDER_TOKENS=Ct,ht.BORDER_WIDTH_TOKENS=["border-none","border-thin","border-medium","border-thick"],ht.COLOR_TOKENS=yt,ht.ELEVATION_TOKENS=jt,ht.FONT_FAMILY_TOKENS=xt,ht.FONT_SIZE_TOKENS=kt,ht.FONT_WEIGHT_TOKENS=zt,ht.GLOBAL_TOKENS=Bt,ht.GLOW_TOKENS=At,ht.LINE_HEIGHT_TOKENS=St,ht.OPACITY_TOKENS=Mt,ht.SPACING_TOKENS=wt,ht.TOKENS=ft,ut=ht.getToken=pt,ct=ht.toCSSValue=function(t,e){var o=pt(t);return null==o?"":t.startsWith("color-")?"rgba(var(".concat(mt(t),", ").concat(o,"), ").concat(null!=e?e:1,")"):"var(".concat(mt(t),", ").concat(o,")")},ht.toCSSVariable=mt;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 Vt(t){return l(`\n\t\t${Rt(t)};\n\t\t${Pt(t)}\n\t`)}const Zt={property:"all",delay:"0s",duration:"0.35s",easing:"ease-in-out"};function Dt(t){const e=Ot(t).map((t=>function(t){const e={...Zt,...t};return l(`${e.property} ${e.duration} ${e.easing} ${e.delay}`)}(t))).join(", ");return l(`\n\t\ttransition: ${e}\n\t`)}function Ht(t){const e=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(`${e}\n${function(t){switch(t){case"hero-lg-bold":return`\n\t\t\t\tfont-family: ${_t("font-family-title")};\n\t\t\t\tline-height: ${_t("line-height-6")};\n\t\t\t\tfont-size: ${_t("font-size-9")};\n\t\t\t\tfont-weight: ${_t("font-weight-bold")}\n\t\t\t`;case"hero-lg":return`\n\t\t\t\tfont-family: ${_t("font-family-title")};\n\t\t\t\tline-height: ${_t("line-height-6")};\n\t\t\t\tfont-size: ${_t("font-size-9")};\n\t\t\t\tfont-weight: ${_t("font-weight-regular")}\n\t\t\t`;case"hero-md-bold":return`\n\t\t\t\tfont-family: ${_t("font-family-title")};\n\t\t\t\tline-height: ${_t("line-height-6")};\n\t\t\t\tfont-size: ${_t("font-size-8")};\n\t\t\t\tfont-weight: ${_t("font-weight-bold")}\n\t\t\t`;case"hero-md":return`\n\t\t\t\tfont-family: ${_t("font-family-title")};\n\t\t\t\tline-height: ${_t("line-height-6")};\n\t\t\t\tfont-size: ${_t("font-size-8")};\n\t\t\t\tfont-weight: ${_t("font-weight-regular")}\n\t\t\t`;case"hero-sm-bold":return`\n\t\t\t\tfont-family: ${_t("font-family-title")};\n\t\t\t\tline-height: ${_t("line-height-6")};\n\t\t\t\tfont-size: ${_t("font-size-7")};\n\t\t\t\tfont-weight: ${_t("font-weight-bold")}\n\t\t\t`;case"hero-sm":return`\n\t\t\t\tfont-family: ${_t("font-family-title")};\n\t\t\t\tline-height: ${_t("line-height-6")};\n\t\t\t\tfont-size: ${_t("font-size-7")};\n\t\t\t\tfont-weight: ${_t("font-weight-regular")}\n\t\t\t`;case"heading-lg-bold":return`\n\t\t\t\t\tfont-family: ${_t("font-family-title")};\n\t\t\t\t\tline-height: ${_t("line-height-5")};\n\t\t\t\t\tfont-size: ${_t("font-size-6")};\n\t\t\t\t\tfont-weight: ${_t("font-weight-bold")}\n\t\t\t\t`;case"heading-lg":return`\n\t\t\t\tfont-family: ${_t("font-family-title")};\n\t\t\t\tline-height: ${_t("line-height-5")};\n\t\t\t\tfont-size: ${_t("font-size-6")};\n\t\t\t\tfont-weight: ${_t("font-weight-regular")}\n\t\t\t`;case"heading-md-bold":return`\n\t\t\t\tfont-family: ${_t("font-family-title")};\n\t\t\t\tline-height: ${_t("line-height-5")};\n\t\t\t\tfont-size: ${_t("font-size-5")};\n\t\t\t\tfont-weight: ${_t("font-weight-bold")}\n\t\t\t`;case"heading-md":return`\n\t\t\t\tfont-family: ${_t("font-family-title")};\n\t\t\t\tline-height: ${_t("line-height-5")};\n\t\t\t\tfont-size: ${_t("font-size-5")};\n\t\t\t\tfont-weight: ${_t("font-weight-regular")}\n\t\t\t`;case"heading-sm-bold":return`\n\t\t\t\tfont-family: ${_t("font-family-title")};\n\t\t\t\tline-height: ${_t("line-height-5")};\n\t\t\t\tfont-size: ${_t("font-size-4")};\n\t\t\t\tfont-weight: ${_t("font-weight-bold")}\n\t\t\t`;case"heading-sm":return`\n\t\t\t\tfont-family: ${_t("font-family-title")};\n\t\t\t\tline-height: ${_t("line-height-5")};\n\t\t\t\tfont-size: ${_t("font-size-4")};\n\t\t\t\tfont-weight: ${_t("font-weight-regular")}\n\t\t\t`;case"body-lg-bold":return`\n\t\t\t\t\tfont-family: ${_t("font-family-default")};\n\t\t\t\t\tline-height: ${_t("line-height-6")};\n\t\t\t\t\tfont-size: ${_t("font-size-5")};\n\t\t\t\t\tfont-weight: ${_t("font-weight-bold")}\n\t\t\t\t`;case"body-lg":return`\n\t\t\t\t\tfont-family: ${_t("font-family-default")};\n\t\t\t\t\tline-height: ${_t("line-height-6")};\n\t\t\t\t\tfont-size: ${_t("font-size-5")};\n\t\t\t\t\tfont-weight: ${_t("font-weight-regular")}\n\t\t\t\t`;case"body-md":case"number-md":return`\n\t\t\t\tfont-family: ${_t("font-family-default")};\n\t\t\t\tline-height: ${_t("line-height-5")};\n\t\t\t\tfont-size: ${_t("font-size-3")};\n\t\t\t\tfont-weight: ${_t("font-weight-regular")}\n\t\t\t`;case"body-md-underline":return`\n\t\t\t\tfont-family: ${_t("font-family-default")};\n\t\t\t\tline-height: ${_t("line-height-5")};\n\t\t\t\tfont-size: ${_t("font-size-3")};\n\t\t\t\tfont-weight: ${_t("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: ${_t("font-family-default")};\n\t\t\t\tline-height: ${_t("line-height-5")};\n\t\t\t\tfont-size: ${_t("font-size-3")};\n\t\t\t\tfont-weight: ${_t("font-weight-bold")}\n\t\t\t`;case"body-md-bold-underline":return`\n\t\t\t\tfont-family: ${_t("font-family-default")};\n\t\t\t\tline-height: ${_t("line-height-5")};\n\t\t\t\tfont-size: ${_t("font-size-3")};\n\t\t\t\tfont-weight: ${_t("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: ${_t("font-family-default")};\n\t\t\t\tline-height: ${_t("line-height-4")};\n\t\t\t\tfont-size: ${_t("font-size-2")};\n\t\t\t\tfont-weight: ${_t("font-weight-regular")}\n\t\t\t`;case"body-sm-underline":return`\n\t\t\t\tfont-family: ${_t("font-family-default")};\n\t\t\t\tline-height: ${_t("line-height-4")};\n\t\t\t\tfont-size: ${_t("font-size-2")};\n\t\t\t\tfont-weight: ${_t("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: ${_t("font-family-default")};\n\t\t\t\tline-height: ${_t("line-height-4")};\n\t\t\t\tfont-size: ${_t("font-size-2")};\n\t\t\t\tfont-weight: ${_t("font-weight-bold")}\n\t\t\t`;case"body-sm-bold-underline":return`\n\t\t\t\tfont-family: ${_t("font-family-default")};\n\t\t\t\tline-height: ${_t("line-height-4")};\n\t\t\t\tfont-size: ${_t("font-size-2")};\n\t\t\t\tfont-weight: ${_t("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"button-lg":return`\n\t\t\t\tfont-family: ${_t("font-family-default")};\n\t\t\t\tline-height: ${_t("line-height-1")};\n\t\t\t\tfont-size: ${_t("font-size-4")};\n\t\t\t\tfont-weight: ${_t("font-weight-bold")}\n\t\t\t`;case"button-md":return`\n\t\t\t\tfont-family: ${_t("font-family-default")};\n\t\t\t\tline-height: ${_t("line-height-1")};\n\t\t\t\tfont-size: ${_t("font-size-3")};\n\t\t\t\tfont-weight: ${_t("font-weight-bold")}\n\t\t\t`;case"button-sm":return`\n\t\t\t\tfont-family: ${_t("font-family-default")};\n\t\t\t\tline-height: ${_t("line-height-1")};\n\t\t\t\tfont-size: ${_t("font-size-2")};\n\t\t\t\tfont-weight: ${_t("font-weight-bold")}\n\t\t\t`;case"table-header-md":return`\n\t\t\t\tfont-family: ${_t("font-family-default")};\n\t\t\t\tline-height: ${_t("line-height-1")};\n\t\t\t\tfont-size: ${_t("font-size-3")};\n\t\t\t\tfont-weight: ${_t("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: ${_t("font-family-default")};\n\t\t\t\tline-height: ${_t("line-height-1")};\n\t\t\t\tfont-size: ${_t("font-size-2")};\n\t\t\t\tfont-weight: ${_t("font-weight-medium")}\n\t\t\t`;case"chips-md":return`\n\t\t\t\t\tfont-family: ${_t("font-family-default")};\n\t\t\t\t\tline-height: ${_t("line-height-1")};\n\t\t\t\t\tfont-size: ${_t("font-size-2")};\n\t\t\t\t\tfont-weight: ${_t("font-weight-bold")}\n\t\t\t\t`;case"chips-sm":return`\n\t\t\t\tfont-family: ${_t("font-family-default")};\n\t\t\t\tline-height: ${_t("line-height-1")};\n\t\t\t\tfont-size: ${_t("font-size-1")};\n\t\t\t\tfont-weight: ${_t("font-weight-medium")};\n\t\t\t\ttext-transform: uppercase\n\t\t\t`;default:return""}}(t)}`)}function Gt(t,e=""){return l(Ot(t).map((t=>[`${t}.is-disabled`,`${t}:disabled`].map((t=>[t,e].join(" "))).join(", "))).join(", "))}const It={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`
|
|
34
|
+
*/const lt=nt(class extends st{constructor(t){var e;if(super(t),t.type!==rt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var o,i;if(void 0===this.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 e)e[t]&&!(null===(o=this.st)||void 0===o?void 0:o.has(t))&&this.nt.add(t);return this.render(e)}const r=t.element.classList;this.nt.forEach((t=>{t in e||(r.remove(t),this.nt.delete(t))}));for(const t in e){const o=!!e[t];o===this.nt.has(t)||(null===(i=this.st)||void 0===i?void 0:i.has(t))||(o?(r.add(t),this.nt.add(t)):(r.remove(t),this.nt.delete(t)))}return R}});var at;class ct extends ot{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(e){super.updated(e),(e.has("form")||null==t(this,at,"f"))&&this.getAssignedForm()}getAssignedForm(){if(this.hasAttribute("form")){const t=this.getRootNode(),o=this.getAttribute("form");e(this,at,t.getElementById(o),"f")}else e(this,at,this.closest("form"),"f")}}at=new WeakMap;var dt,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 e=mt(t);return null==e?e:"--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(e){return e.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-"),jt=$t("border-radius-"),At=$t("opacity-"),Wt=$t("elevation-"),Et=$t("glow-"),_t=$t("global-");function Bt(t){return l(dt(t))}function Mt(t,e=1){return l(dt(t,e))}ut.BACKGROUND_COLOR_TOKENS=vt,ut.BORDER_RADIUS_TOKENS=jt,ut.BORDER_TOKENS=Ct,ut.BORDER_WIDTH_TOKENS=["border-none","border-thin","border-medium","border-thick"],ut.COLOR_TOKENS=yt,ut.ELEVATION_TOKENS=Wt,ut.FONT_FAMILY_TOKENS=xt,ut.FONT_SIZE_TOKENS=kt,ut.FONT_WEIGHT_TOKENS=zt,ut.GLOBAL_TOKENS=_t,ut.GLOW_TOKENS=Et,ut.LINE_HEIGHT_TOKENS=St,ut.OPACITY_TOKENS=At,ut.SPACING_TOKENS=wt,ut.TOKENS=ft,ht=ut.getToken=mt,dt=ut.toCSSValue=function(t,e){var o=mt(t);return null==o?"":t.startsWith("color-")?"rgba(var(".concat(pt(t),", ").concat(o,"), ").concat(null!=e?e:1,")"):"var(".concat(pt(t),", ").concat(o,")")},ut.toCSSVariable=pt;var Ot={toArray:function(t){return null==t?[]:Array.isArray(t)?t:[t]}},Tt=Ot.toArray;function Ut(t){return l(`\n\t\tmargin-inline-start: ${t}\n\t`)}function Nt(t){return l(`\n\t\t${Ut(t)};\n\t\t${function(t){return l(`\n\t\tmargin-inline-end: ${t}\n\t`)}(t)}\n\t`)}function Rt(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 qt(t){return l(`\n\t\t${Nt(t)};\n\t\t${Rt(t)}\n\t`)}function Pt(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 Dt(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 Gt(t){return l(`\n\t\t${Pt(t)};\n\t\t${Dt(t)}\n\t`)}const Lt={property:"all",delay:"0s",duration:"0.35s",easing:"ease-in-out"};function It(t){const e=Tt(t).map((t=>function(t){const e={...Lt,...t};return l(`${e.property} ${e.duration} ${e.easing} ${e.delay}`)}(t))).join(", ");return l(`\n\t\ttransition: ${e}\n\t`)}function Vt(t){const e=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(`${e}\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 Jt(t,e=""){return l(Tt(t).map((t=>[`${t}.is-disabled`,`${t}:disabled`].map((t=>[t,e].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 Ft(){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: ${Mt("color-neutral-90")};
|
|
39
|
+
--m-button-border-radius: ${Bt("border-radius-s")};
|
|
40
|
+
--m-button-color: ${Mt("color-text-secondary")};
|
|
41
|
+
--m-button-outline-color: ${Mt("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
|
+
${It([{property:"color"},{property:"background-color"},{property:"border-color"}])};
|
|
53
53
|
|
|
54
|
-
${
|
|
54
|
+
${Vt("button-md")};
|
|
55
55
|
font-size: var(--m-button-font-size);
|
|
56
56
|
|
|
57
57
|
cursor: pointer;
|
|
@@ -67,7 +67,7 @@ const it=1,nt=t=>(...e)=>({_$litDirective$:t,values:e});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);
|
|
@@ -79,211 +79,211 @@ const it=1,nt=t=>(...e)=>({_$litDirective$:t,values:e});class st{constructor(t){
|
|
|
79
79
|
border-radius: var(--m-button-border-radius);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
${
|
|
82
|
+
${Jt(".button")} {
|
|
83
83
|
cursor: default;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
${
|
|
86
|
+
${Jt(".button","*")} {
|
|
87
87
|
pointer-events: none;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
${
|
|
90
|
+
${Zt.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
|
+
${Zt.hover(".button")} {
|
|
96
|
+
--m-button-background-color: ${Mt("color-background-inverted")};
|
|
97
|
+
--m-button-border-color: ${Mt("color-background-inverted")};
|
|
98
|
+
--m-button-color: ${Mt("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
|
+
${Gt(0)};
|
|
106
|
+
${qt(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
|
-
`}var
|
|
113
|
+
`}var Ht,Kt,Qt;class Xt extends ct{static get properties(){return{...ct.properties,loading:{type:Boolean},disabled:{type:Boolean,reflect:!0},variant:{type:String},size:{type:String},type:{type:String}}}constructor(){super(),Ht.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(e){super.updated(e),(e.has("disabled")||e.has("loading"))&&t(this,Ht,"m",Qt).call(this)}render(){return N`
|
|
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,Ht,"m",Kt).call(this)}"
|
|
118
118
|
>
|
|
119
119
|
<!-- TODO: Replace this with the loading dots component as soon as it is ready. -->
|
|
120
|
-
${this.loading&&!["icon","icon-secondary"].includes(this.variant)?
|
|
120
|
+
${this.loading&&!["icon","icon-secondary"].includes(this.variant)?N`<span class="loader">●●●</span>`:q}
|
|
121
121
|
<slot name="leading"></slot>
|
|
122
122
|
<slot></slot>
|
|
123
123
|
<slot name="trailing"></slot>
|
|
124
124
|
</button>
|
|
125
|
-
`}handleClick(t){var e,o;if(this.disabled||this.loading)return t.preventDefault(),void t.stopPropagation();"submit"===this.type&&(null===(e=this.form)||void 0===e||e.requestSubmit()),"reset"===this.type&&(null===(o=this.form)||void 0===o||o.reset())}}
|
|
125
|
+
`}handleClick(t){var e,o;if(this.disabled||this.loading)return t.preventDefault(),void t.stopPropagation();"submit"===this.type&&(null===(e=this.form)||void 0===e||e.requestSubmit()),"reset"===this.type&&(null===(o=this.form)||void 0===o||o.reset())}}Ht=new WeakSet,Kt=function(){return Boolean(this.disabled)||Boolean(this.loading)},Qt=function(){const e=t(this,Ht,"m",Kt).call(this);this.setAttribute("aria-disabled",String(e))},Xt.styles=[[Ft(),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: ${Mt("color-primary-60")};
|
|
132
|
+
--m-button-border-color: ${Mt("color-primary-60")};
|
|
133
|
+
--m-button-color: ${Mt("color-text-inverted")};
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
${
|
|
137
|
-
--m-button-background-color: ${
|
|
138
|
-
--m-button-border-color: ${
|
|
136
|
+
${Jt(".button.-primary")} {
|
|
137
|
+
--m-button-background-color: ${Mt("color-primary-20")};
|
|
138
|
+
--m-button-border-color: ${Mt("color-primary-20")};
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
${
|
|
142
|
-
--m-button-border-color: ${
|
|
143
|
-
--m-button-outline-color: ${
|
|
141
|
+
${Zt.focus(".button.-primary")} {
|
|
142
|
+
--m-button-border-color: ${Mt("color-primary-60")};
|
|
143
|
+
--m-button-outline-color: ${Mt("color-primary-60")};
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
${
|
|
147
|
-
${
|
|
148
|
-
--m-button-background-color: ${
|
|
149
|
-
--m-button-border-color: ${
|
|
146
|
+
${Zt.hover(".button.-primary")},
|
|
147
|
+
${Zt.active(".button.-primary")} {
|
|
148
|
+
--m-button-background-color: ${Mt("color-primary-100")};
|
|
149
|
+
--m-button-border-color: ${Mt("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: ${Mt("color-primary-60")};
|
|
154
|
+
--m-button-border-color: ${Mt("color-primary-60")};
|
|
155
|
+
--m-button-color: ${Mt("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: ${Mt("color-primary-100")};
|
|
161
|
+
--m-button-color: ${Mt("color-primary-100")};
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
${
|
|
165
|
-
--m-button-border-color: ${
|
|
166
|
-
--m-button-color: ${
|
|
164
|
+
${Jt(".button.-secondary")} {
|
|
165
|
+
--m-button-border-color: ${Mt("color-text-disabled")};
|
|
166
|
+
--m-button-color: ${Mt("color-text-disabled")};
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
${
|
|
170
|
-
--m-button-border-color: ${
|
|
171
|
-
--m-button-color: ${
|
|
169
|
+
${Zt.focus(".button.-secondary")} {
|
|
170
|
+
--m-button-border-color: ${Mt("color-primary-100")};
|
|
171
|
+
--m-button-color: ${Mt("color-primary-100")};
|
|
172
172
|
|
|
173
|
-
--m-button-outline-color: ${
|
|
173
|
+
--m-button-outline-color: ${Mt("color-primary-60")};
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
${
|
|
177
|
-
${
|
|
178
|
-
--m-button-background-color: ${
|
|
179
|
-
--m-button-border-color: ${
|
|
180
|
-
--m-button-color: ${
|
|
176
|
+
${Zt.hover(".button.-secondary")},
|
|
177
|
+
${Zt.active(".button.-secondary")} {
|
|
178
|
+
--m-button-background-color: ${Mt("color-background-tertiary")};
|
|
179
|
+
--m-button-border-color: ${Mt("color-primary-60")};
|
|
180
|
+
--m-button-color: ${Mt("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: ${Mt("color-primary-100")};
|
|
187
|
+
--m-button-color: ${Mt("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: ${Mt("color-primary-100")};
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
${
|
|
197
|
-
--m-button-color: ${
|
|
196
|
+
${Jt(".button.-tertiary")} {
|
|
197
|
+
--m-button-color: ${Mt("color-text-disabled")};
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
${
|
|
201
|
-
--m-button-color: ${
|
|
202
|
-
--m-button-outline-color: ${
|
|
200
|
+
${Zt.focus(".button.-tertiary")} {
|
|
201
|
+
--m-button-color: ${Mt("color-primary-100")};
|
|
202
|
+
--m-button-outline-color: ${Mt("color-primary-60")};
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
${
|
|
206
|
-
--m-button-background-color: ${
|
|
207
|
-
--m-button-border-color: ${
|
|
208
|
-
--m-button-color: ${
|
|
205
|
+
${Zt.hover(".button.-tertiary")} {
|
|
206
|
+
--m-button-background-color: ${Mt("color-background-tertiary")};
|
|
207
|
+
--m-button-border-color: ${Mt("color-background-tertiary")};
|
|
208
|
+
--m-button-color: ${Mt("color-primary-60")};
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
${
|
|
212
|
-
--m-button-background-color: ${
|
|
213
|
-
--m-button-border-color: ${
|
|
214
|
-
--m-button-color: ${
|
|
211
|
+
${Zt.active(".button.-tertiary")} {
|
|
212
|
+
--m-button-background-color: ${Mt("color-neutral-20")};
|
|
213
|
+
--m-button-border-color: ${Mt("color-neutral-20")};
|
|
214
|
+
--m-button-color: ${Mt("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: ${Mt("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: ${Mt("color-warning-60")};
|
|
225
|
+
--m-button-border-color: ${Mt("color-warning-60")};
|
|
226
|
+
--m-button-color: ${Mt("color-text-primary")};
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
${
|
|
230
|
-
--m-button-background-color: ${
|
|
231
|
-
--m-button-border-color: ${
|
|
232
|
-
--m-button-color: ${
|
|
229
|
+
${Jt(".button.-warning")} {
|
|
230
|
+
--m-button-background-color: ${Mt("color-warning-20")};
|
|
231
|
+
--m-button-border-color: ${Mt("color-warning-20")};
|
|
232
|
+
--m-button-color: ${Mt("color-text-inverted")};
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
${
|
|
236
|
-
--m-button-background-color: ${
|
|
237
|
-
--m-button-outline-color: ${
|
|
235
|
+
${Zt.focus(".button.-warning")} {
|
|
236
|
+
--m-button-background-color: ${Mt("color-warning-60")};
|
|
237
|
+
--m-button-outline-color: ${Mt("color-warning-60")};
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
${
|
|
241
|
-
${
|
|
242
|
-
--m-button-background-color: ${
|
|
243
|
-
--m-button-border-color: ${
|
|
244
|
-
--m-button-color: ${
|
|
240
|
+
${Zt.hover(".button.-warning")},
|
|
241
|
+
${Zt.active(".button.-warning")} {
|
|
242
|
+
--m-button-background-color: ${Mt("color-warning-100")};
|
|
243
|
+
--m-button-border-color: ${Mt("color-warning-100")};
|
|
244
|
+
--m-button-color: ${Mt("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: ${Mt("color-warning-60")};
|
|
249
|
+
--m-button-border-color: ${Mt("color-warning-60")};
|
|
250
|
+
--m-button-color: ${Mt("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: ${Mt("color-danger-60")};
|
|
255
|
+
--m-button-border-color: ${Mt("color-danger-60")};
|
|
256
|
+
--m-button-color: ${Mt("color-text-inverted")};
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
${
|
|
260
|
-
--m-button-background-color: ${
|
|
261
|
-
--m-button-border-color: ${
|
|
259
|
+
${Jt(".button.-danger")} {
|
|
260
|
+
--m-button-background-color: ${Mt("color-danger-20")};
|
|
261
|
+
--m-button-border-color: ${Mt("color-danger-20")};
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
${
|
|
265
|
-
--m-button-background-color: ${
|
|
266
|
-
--m-button-outline-color: ${
|
|
264
|
+
${Zt.focus(".button.-danger")} {
|
|
265
|
+
--m-button-background-color: ${Mt("color-danger-60")};
|
|
266
|
+
--m-button-outline-color: ${Mt("color-danger-60")};
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
${
|
|
270
|
-
${
|
|
271
|
-
--m-button-background-color: ${
|
|
272
|
-
--m-button-border-color: ${
|
|
269
|
+
${Zt.hover(".button.-danger")},
|
|
270
|
+
${Zt.active(".button.-danger")} {
|
|
271
|
+
--m-button-background-color: ${Mt("color-danger-100")};
|
|
272
|
+
--m-button-border-color: ${Mt("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: ${Mt("color-danger-60")};
|
|
277
|
+
--m-button-border-color: ${Mt("color-danger-60")};
|
|
278
|
+
--m-button-color: ${Mt("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: ${Mt("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=>(...e)=>({_$litDirective$:t,values:e});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: ${Mt("color-background-tertiary")};
|
|
296
|
+
--m-button-border-color: ${Mt("color-background-tertiary")};
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
.button.-icon-secondary {
|
|
@@ -308,62 +308,62 @@ const it=1,nt=t=>(...e)=>({_$litDirective$:t,values:e});class st{constructor(t){
|
|
|
308
308
|
display: none;
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
${
|
|
312
|
-
--m-button-color: ${
|
|
311
|
+
${Jt([".button.-icon",".button.-icon-secondary"])} {
|
|
312
|
+
--m-button-color: ${Mt("color-neutral-40")};
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
${
|
|
316
|
-
--m-button-background-color: ${
|
|
317
|
-
--m-button-border-color: ${
|
|
315
|
+
${Jt(".button.-icon")} {
|
|
316
|
+
--m-button-background-color: ${Mt("color-neutral-20")};
|
|
317
|
+
--m-button-border-color: ${Mt("color-neutral-20")};
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
${
|
|
320
|
+
${Jt(".button.-icon-secondary")} {
|
|
321
321
|
--m-button-background-color: transparent;
|
|
322
322
|
--m-button-border-color: transparent;
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
${
|
|
326
|
-
--m-button-color: ${
|
|
327
|
-
--m-button-outline-color: ${
|
|
325
|
+
${Zt.focus([".button.-icon",".button.-icon-secondary"])} {
|
|
326
|
+
--m-button-color: ${Mt("color-primary-60")};
|
|
327
|
+
--m-button-outline-color: ${Mt("color-primary-60")};
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
-
${
|
|
331
|
-
--m-button-background-color: ${
|
|
330
|
+
${Zt.focus(".button.-icon")} {
|
|
331
|
+
--m-button-background-color: ${Mt("color-neutral-20")};
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
-
${
|
|
334
|
+
${Zt.focus(".button.-icon-secondary")} {
|
|
335
335
|
--m-button-background-color: transparent;
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
-
${
|
|
339
|
-
${
|
|
340
|
-
--m-button-color: ${
|
|
338
|
+
${Zt.hover([".button.-icon",".button.-icon-secondary"])},
|
|
339
|
+
${Zt.active([".button.-icon",".button.-icon-secondary"])} {
|
|
340
|
+
--m-button-color: ${Mt("color-primary-60")};
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
-
${
|
|
344
|
-
${
|
|
345
|
-
--m-button-background-color: ${
|
|
346
|
-
--m-button-border-color: ${
|
|
343
|
+
${Zt.hover(".button.-icon")},
|
|
344
|
+
${Zt.active(".button.-icon")} {
|
|
345
|
+
--m-button-background-color: ${Mt("color-background-highlight")};
|
|
346
|
+
--m-button-border-color: ${Mt("color-background-highlight")};
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
${
|
|
350
|
-
${
|
|
349
|
+
${Zt.hover(".button.-icon-secondary")},
|
|
350
|
+
${Zt.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
|
+
${Vt("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
|
+
${Vt("button-lg")};
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
/* TODO: to be removed when the loading dots component is ready */
|
|
@@ -377,49 +377,69 @@ const it=1,nt=t=>(...e)=>({_$litDirective$:t,values:e});class st{constructor(t){
|
|
|
377
377
|
|
|
378
378
|
pointer-events: none;
|
|
379
379
|
}
|
|
380
|
-
`]],window.customElements.define("m-button",
|
|
380
|
+
`]],window.customElements.define("m-button",Xt);class Yt extends Xt{constructor(){super(),this.size="small"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","primary-action")}}window.customElements.define("m-banner-action-primary",Yt);class te extends Xt{constructor(){super(),this.variant="tertiary",this.size="small"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","secondary-action")}}window.customElements.define("m-banner-action-secondary",te);class ee extends ot{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","actions")}render(){return N`
|
|
381
381
|
<slot name="secondary-action"></slot>
|
|
382
382
|
<slot name="primary-action"></slot>
|
|
383
|
-
`}}
|
|
383
|
+
`}}ee.styles=[a`
|
|
384
384
|
:host {
|
|
385
385
|
display: flex;
|
|
386
386
|
justify-content: flex-end;
|
|
387
|
-
gap: ${
|
|
387
|
+
gap: ${Bt("spacing-2")};
|
|
388
388
|
}
|
|
389
|
-
`],window.customElements.define("m-banner-actions",
|
|
389
|
+
`],window.customElements.define("m-banner-actions",ee);class oe extends ot{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","description")}render(){return N`<slot></slot>`}}oe.styles=[a`
|
|
390
390
|
:host {
|
|
391
|
-
${
|
|
392
|
-
color: ${
|
|
391
|
+
${Vt("body-md")};
|
|
392
|
+
color: ${Mt("color-text-secondary")};
|
|
393
393
|
}
|
|
394
|
-
`],window.customElements.define("m-banner-description",
|
|
394
|
+
`],window.customElements.define("m-banner-description",oe);class ie extends ot{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","icon")}render(){return N`<slot></slot>`}}window.customElements.define("m-banner-icon",ie);class re extends ot{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","title")}render(){return N`<slot></slot>`}}re.styles=[a`
|
|
395
395
|
:host {
|
|
396
|
-
${
|
|
397
|
-
color: ${
|
|
396
|
+
${Vt("body-md-bold")};
|
|
397
|
+
color: ${Mt("color-text-secondary")};
|
|
398
398
|
}
|
|
399
|
-
`],window.customElements.define("m-banner-title",re);class
|
|
399
|
+
`],window.customElements.define("m-banner-title",re);class ne extends ot{emit(t,e){const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,...e});this.dispatchEvent(o)}reemit(t){!function(t,e){!e.bubbles||t.shadowRoot&&!e.composed||e.stopPropagation();const o=Reflect.construct(e.constructor,[e.type,e]),i=t.dispatchEvent(o);i||e.preventDefault()}(this,t)}}
|
|
400
400
|
/**
|
|
401
401
|
* @license
|
|
402
402
|
* Copyright 2018 Google LLC
|
|
403
403
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
404
404
|
*/
|
|
405
|
-
const
|
|
405
|
+
const se=t=>null!=t?t:q;var le={};le.BASE_PIXELS=16,le.toRem=function(t,e){return void 0===e&&(e=16),"".concat(parseInt(String(t),10)/e,"rem")};var ae=le.toRem;function ce(t,e){return l(ae(t,e))}const de=["attention","bell","check","close","info-circle","indeterminate"];var he,ue,be,ge;class me extends ne{static get properties(){return{name:{type:String},size:{type:String},color:{type:String},loading:{state:!0}}}constructor(){super(),he.add(this),this.icon=null,this.icon=null}connectedCallback(){super.connectedCallback(),t(this,he,"m",ue).call(this)}update(e){super.update(e),e.has("name")&&t(this,he,"m",ue).call(this)}updated(t){super.updated(t),t.has("size")&&null!=this.size&&this.style.setProperty("--m-icon-size",`${parseInt(String(this.size),10)||16}px`),t.has("color")&&null!=this.color&&this.style.setProperty("--m-icon-color",dt(this.color))}render(){return null!=this.name&&de.includes(this.name)&&null!=this.icon?this.icon:q}}he=new WeakSet,ue=async function(){try{this.icon=null;const{default:t}=await import(`./icons/${this.name}.js`);this.icon=t}catch{console.error(`failed loading icon "${this.name}". Are you sure it exists?`)}finally{this.requestUpdate()}},me.styles=[[a`
|
|
406
|
+
:host {
|
|
407
|
+
--m-icon-size: 16px;
|
|
408
|
+
--m-icon-color: ${Mt("color-text-primary")};
|
|
409
|
+
|
|
410
|
+
display: inline-flex;
|
|
411
|
+
align-items: center;
|
|
412
|
+
justify-content: center;
|
|
413
|
+
|
|
414
|
+
inline-size: var(--m-icon-size);
|
|
415
|
+
block-size: var(--m-icon-size);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
svg {
|
|
419
|
+
${It([{property:"color"},{property:"fill"}])};
|
|
420
|
+
|
|
421
|
+
inline-size: var(--m-icon-size);
|
|
422
|
+
block-size: var(--m-icon-size);
|
|
423
|
+
|
|
424
|
+
color: var(--m-icon-color);
|
|
425
|
+
fill: var(--m-icon-color);
|
|
426
|
+
}
|
|
427
|
+
`]],window.customElements.define("m-icon",me);class pe extends ne{static get properties(){return{controls:{type:String},disabled:{type:Boolean},inverted:{type:Boolean},label:{type:String},size:{type:String}}}constructor(){super(),be.add(this),this.disabled=!1,this.inverted=!1,this.label="Close",this.size="default"}render(){var e;return N`
|
|
406
428
|
<button
|
|
407
429
|
type="button"
|
|
408
|
-
aria-controls="${
|
|
409
|
-
aria-label="${
|
|
430
|
+
aria-controls="${se(this.controls)}"
|
|
431
|
+
aria-label="${se(this.label)}"
|
|
410
432
|
class=${lt({"close-button":!0,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size,"-inverted":null!==(e=this.inverted)&&void 0!==e&&e})}
|
|
411
433
|
?disabled="${this.disabled}"
|
|
412
|
-
@click=${t(this,
|
|
434
|
+
@click=${t(this,be,"m",ge)}
|
|
413
435
|
>
|
|
414
|
-
<
|
|
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>
|
|
436
|
+
<m-icon name="close"></m-icon>
|
|
419
437
|
</button>
|
|
420
|
-
`}}
|
|
438
|
+
`}}be=new WeakSet,ge=function(){this.emit("m-close")},pe.styles=[a`
|
|
421
439
|
:host {
|
|
422
|
-
--m-close-button-color: ${
|
|
440
|
+
--m-close-button-color: ${Mt("color-text-primary")};
|
|
441
|
+
--m-close-button-outline-color: ${Mt("color-primary-100")};
|
|
442
|
+
--m-close-button-outline-offset: 2px;
|
|
423
443
|
}
|
|
424
444
|
|
|
425
445
|
.close-button {
|
|
@@ -428,8 +448,8 @@ const ne=t=>null!=t?t:R;var se={};se.BASE_PIXELS=16,se.toRem=function(t,e){retur
|
|
|
428
448
|
|
|
429
449
|
width: var(--button-size);
|
|
430
450
|
height: var(--button-size);
|
|
431
|
-
${
|
|
432
|
-
${
|
|
451
|
+
${qt(0)};
|
|
452
|
+
${Gt(0)};
|
|
433
453
|
background-color: var(--button-color);
|
|
434
454
|
border: none;
|
|
435
455
|
border-radius: 50%;
|
|
@@ -438,7 +458,7 @@ const ne=t=>null!=t?t:R;var se={};se.BASE_PIXELS=16,se.toRem=function(t,e){retur
|
|
|
438
458
|
justify-content: center;
|
|
439
459
|
cursor: pointer;
|
|
440
460
|
|
|
441
|
-
${
|
|
461
|
+
${It([{property:"background-color"}])};
|
|
442
462
|
}
|
|
443
463
|
|
|
444
464
|
.close-button.-size-small {
|
|
@@ -458,63 +478,66 @@ const ne=t=>null!=t?t:R;var se={};se.BASE_PIXELS=16,se.toRem=function(t,e){retur
|
|
|
458
478
|
|
|
459
479
|
.close-button.-inverted {
|
|
460
480
|
--button-color: transparent;
|
|
461
|
-
--icon-color: ${
|
|
481
|
+
--icon-color: ${Mt("color-text-inverted")};
|
|
462
482
|
}
|
|
463
483
|
|
|
464
|
-
|
|
484
|
+
m-icon {
|
|
485
|
+
--m-icon-size: var(--icon-size);
|
|
486
|
+
--m-icon-color: var(--icon-color);
|
|
487
|
+
|
|
465
488
|
display: block;
|
|
466
|
-
|
|
467
|
-
height: var(--icon-size);
|
|
468
|
-
fill: var(--icon-color);
|
|
489
|
+
}
|
|
469
490
|
|
|
470
|
-
|
|
491
|
+
${Zt.focus(".close-button")} {
|
|
492
|
+
outline: 1px solid var(--m-close-button-outline-color);
|
|
493
|
+
outline-offset: var(--m-close-button-outline-offset);
|
|
471
494
|
}
|
|
472
495
|
|
|
473
|
-
${
|
|
496
|
+
${Zt.hover(".close-button")} {
|
|
474
497
|
--button-color: var(--m-close-button-color);
|
|
475
|
-
--icon-color: ${
|
|
498
|
+
--icon-color: ${Mt("color-text-inverted")};
|
|
476
499
|
}
|
|
477
500
|
|
|
478
|
-
${
|
|
479
|
-
--button-color: ${
|
|
501
|
+
${Zt.hover(".close-button.-inverted")} {
|
|
502
|
+
--button-color: ${Mt("color-text-inverted")};
|
|
480
503
|
--icon-color: var(--m-close-button-color);
|
|
481
504
|
}
|
|
482
505
|
|
|
483
|
-
${
|
|
484
|
-
--icon-color: ${
|
|
506
|
+
${Jt(".close-button")} {
|
|
507
|
+
--icon-color: ${Mt("color-text-disabled")};
|
|
485
508
|
cursor: default;
|
|
486
509
|
}
|
|
487
510
|
|
|
488
|
-
${
|
|
511
|
+
${Jt(".close-button","*")} {
|
|
489
512
|
pointer-events: none;
|
|
490
513
|
}
|
|
491
|
-
`],window.customElements.define("m-close-button",
|
|
514
|
+
`],window.customElements.define("m-close-button",pe);
|
|
492
515
|
/**
|
|
493
516
|
* @license
|
|
494
517
|
* Copyright 2020 Google LLC
|
|
495
518
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
496
519
|
*/
|
|
497
|
-
const
|
|
520
|
+
const fe=Symbol.for(""),$e=t=>{if((null==t?void 0:t.r)===fe)return null==t?void 0:t._$litStatic$},ye=(t,...e)=>({_$litStatic$:e.reduce(((e,o,i)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(o)+t[i+1]),t[0]),r:fe}),ve=new Map,we=(t=>(e,...o)=>{const i=o.length;let r,n;const s=[],l=[];let a,c=0,d=!1;for(;c<i;){for(a=e[c];c<i&&void 0!==(n=o[c],r=$e(n));)a+=r+e[++c],d=!0;l.push(n),s.push(a),c++}if(c===i&&s.push(e[i]),d){const t=s.join("$$lit$$");void 0===(e=ve.get(t))&&(s.raw=s,ve.set(t,e=s)),o=l}return t(e,...o)})(N),xe=nt(class extends st{constructor(t){var e;if(super(t),t.type!==rt||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,o)=>{const i=t[o];return null==i?e:e+`${o=o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:o}=t.element;if(void 0===this.vt){this.vt=new Set;for(const t in e)this.vt.add(t);return this.render(e)}this.vt.forEach((t=>{null==e[t]&&(this.vt.delete(t),t.includes("-")?o.removeProperty(t):o[t]="")}));for(const t in e){const i=e[t];null!=i&&(this.vt.add(t),t.includes("-")?o.setProperty(t,i):o[t]=i)}return R}}),ke=(t,e=["article","div","span"],o="div")=>class extends t{static get properties(){return{as:{type:String}}}connectedCallback(){var t;super.connectedCallback(),this.as=null!==(t=e.includes(this.as)?this.as:o)&&void 0!==t?t:"div"}get tag(){return ye`${(t=>({_$litStatic$:t,r:fe}))(this.as)}`}};
|
|
498
521
|
/**
|
|
499
522
|
* @license
|
|
500
523
|
* Copyright 2018 Google LLC
|
|
501
524
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
502
|
-
*/class
|
|
525
|
+
*/class ze extends(ke(ot,["h1","h2","h3","h4","h5","h6","p","span"],"span")){static get properties(){return{variant:{type:String,reflect:!0},color:{type:String}}}constructor(){super(),this.as="span",this.variant="body-md",this.color="color-text-primary"}render(){return we`
|
|
503
526
|
<${this.tag}
|
|
504
527
|
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})}
|
|
505
|
-
style=${
|
|
528
|
+
style=${xe({"--m-text-color":dt(this.color)})}
|
|
506
529
|
>
|
|
507
530
|
<slot></slot>
|
|
508
531
|
</${this.tag}>
|
|
509
|
-
`}}var
|
|
532
|
+
`}}var Se,Ce,je;ze.styles=[a`
|
|
510
533
|
:host {
|
|
511
|
-
--m-text-color: ${
|
|
534
|
+
--m-text-color: ${Mt("color-text-primary")};
|
|
512
535
|
}
|
|
513
536
|
|
|
514
537
|
.m-text {
|
|
515
|
-
${
|
|
538
|
+
${It([{property:"color"}])};
|
|
516
539
|
|
|
517
|
-
${
|
|
540
|
+
${Vt()};
|
|
518
541
|
|
|
519
542
|
display: inline-block;
|
|
520
543
|
|
|
@@ -522,167 +545,151 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
522
545
|
}
|
|
523
546
|
|
|
524
547
|
.-body-lg-bold {
|
|
525
|
-
${
|
|
548
|
+
${Vt("body-lg-bold")};
|
|
526
549
|
}
|
|
527
550
|
|
|
528
551
|
.-body-lg {
|
|
529
|
-
${
|
|
552
|
+
${Vt("body-lg")};
|
|
530
553
|
}
|
|
531
554
|
|
|
532
555
|
.-body-md-bold-underline {
|
|
533
|
-
${
|
|
556
|
+
${Vt("body-md-bold-underline")};
|
|
534
557
|
}
|
|
535
558
|
|
|
536
559
|
.-body-md-bold {
|
|
537
|
-
${
|
|
560
|
+
${Vt("body-md-bold")};
|
|
538
561
|
}
|
|
539
562
|
|
|
540
563
|
.-body-md-underline {
|
|
541
|
-
${
|
|
564
|
+
${Vt("body-md-underline")};
|
|
542
565
|
}
|
|
543
566
|
|
|
544
567
|
.-body-md {
|
|
545
|
-
${
|
|
568
|
+
${Vt("body-md")};
|
|
546
569
|
}
|
|
547
570
|
|
|
548
571
|
.-body-sm-bold-underline {
|
|
549
|
-
${
|
|
572
|
+
${Vt("body-sm-bold-underline")};
|
|
550
573
|
}
|
|
551
574
|
|
|
552
575
|
.-body-sm-bold {
|
|
553
|
-
${
|
|
576
|
+
${Vt("body-sm-bold")};
|
|
554
577
|
}
|
|
555
578
|
|
|
556
579
|
.-body-sm-underline {
|
|
557
|
-
${
|
|
580
|
+
${Vt("body-sm-underline")};
|
|
558
581
|
}
|
|
559
582
|
|
|
560
583
|
.-body-sm {
|
|
561
|
-
${
|
|
584
|
+
${Vt("body-sm")};
|
|
562
585
|
}
|
|
563
586
|
|
|
564
587
|
.-button-lg {
|
|
565
|
-
${
|
|
588
|
+
${Vt("button-lg")};
|
|
566
589
|
}
|
|
567
590
|
|
|
568
591
|
.-button-md {
|
|
569
|
-
${
|
|
592
|
+
${Vt("button-md")};
|
|
570
593
|
}
|
|
571
594
|
|
|
572
595
|
.-button-sm {
|
|
573
|
-
${
|
|
596
|
+
${Vt("button-sm")};
|
|
574
597
|
}
|
|
575
598
|
|
|
576
599
|
.-chips-md {
|
|
577
|
-
${
|
|
600
|
+
${Vt("chips-md")};
|
|
578
601
|
}
|
|
579
602
|
|
|
580
603
|
.-chips-sm {
|
|
581
|
-
${
|
|
604
|
+
${Vt("chips-sm")};
|
|
582
605
|
}
|
|
583
606
|
|
|
584
607
|
.-heading-lg-bold {
|
|
585
|
-
${
|
|
608
|
+
${Vt("heading-lg-bold")};
|
|
586
609
|
}
|
|
587
610
|
|
|
588
611
|
.-heading-lg {
|
|
589
|
-
${
|
|
612
|
+
${Vt("heading-lg")};
|
|
590
613
|
}
|
|
591
614
|
|
|
592
615
|
.-heading-md-bold {
|
|
593
|
-
${
|
|
616
|
+
${Vt("heading-md-bold")};
|
|
594
617
|
}
|
|
595
618
|
|
|
596
619
|
.-heading-md {
|
|
597
|
-
${
|
|
620
|
+
${Vt("heading-md")};
|
|
598
621
|
}
|
|
599
622
|
|
|
600
623
|
.-heading-sm-bold {
|
|
601
|
-
${
|
|
624
|
+
${Vt("heading-sm-bold")};
|
|
602
625
|
}
|
|
603
626
|
|
|
604
627
|
.-heading-sm {
|
|
605
|
-
${
|
|
628
|
+
${Vt("heading-sm")};
|
|
606
629
|
}
|
|
607
630
|
|
|
608
631
|
.-hero-lg-bold {
|
|
609
|
-
${
|
|
632
|
+
${Vt("hero-lg-bold")};
|
|
610
633
|
}
|
|
611
634
|
|
|
612
635
|
.-hero-lg {
|
|
613
|
-
${
|
|
636
|
+
${Vt("hero-lg")};
|
|
614
637
|
}
|
|
615
638
|
|
|
616
639
|
.-hero-md-bold {
|
|
617
|
-
${
|
|
640
|
+
${Vt("hero-md-bold")};
|
|
618
641
|
}
|
|
619
642
|
|
|
620
643
|
.-hero-md {
|
|
621
|
-
${
|
|
644
|
+
${Vt("hero-md")};
|
|
622
645
|
}
|
|
623
646
|
|
|
624
647
|
.-hero-sm-bold {
|
|
625
|
-
${
|
|
648
|
+
${Vt("hero-sm-bold")};
|
|
626
649
|
}
|
|
627
650
|
|
|
628
651
|
.-hero-sm {
|
|
629
|
-
${
|
|
652
|
+
${Vt("hero-sm")};
|
|
630
653
|
}
|
|
631
654
|
|
|
632
655
|
.-number-md {
|
|
633
|
-
${
|
|
656
|
+
${Vt("number-md")};
|
|
634
657
|
}
|
|
635
658
|
|
|
636
659
|
.-number-sm {
|
|
637
|
-
${
|
|
660
|
+
${Vt("number-sm")};
|
|
638
661
|
}
|
|
639
662
|
|
|
640
663
|
.-table-header-md {
|
|
641
|
-
${
|
|
664
|
+
${Vt("table-header-md")};
|
|
642
665
|
}
|
|
643
666
|
|
|
644
667
|
.-table-header-sm {
|
|
645
|
-
${
|
|
646
|
-
}
|
|
647
|
-
`],window.customElements.define("m-text",
|
|
648
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
|
|
649
|
-
<path
|
|
650
|
-
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"
|
|
651
|
-
/>
|
|
652
|
-
</svg>
|
|
653
|
-
`,ze=U`
|
|
654
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
|
|
655
|
-
<path
|
|
656
|
-
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"
|
|
657
|
-
/>
|
|
658
|
-
</svg>
|
|
659
|
-
`,Se=U`
|
|
660
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
|
|
661
|
-
<path
|
|
662
|
-
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"
|
|
663
|
-
/>
|
|
664
|
-
</svg>
|
|
665
|
-
`;class Ce extends ie{static get properties(){return{variant:{type:String},dismissible:{type:Boolean},dismissed:{type:Boolean,reflect:!0}}}constructor(){super(),ve.add(this),we.set(this,void 0),this.variant="neutral",this.dismissible=!1,this.dismissed=!1}get primaryAction(){return null==t(this,we,"f")&&e(this,we,this.querySelector("m-banner-action-primary"),"f"),t(this,we,"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 e=null!=this.querySelector("*[slot='description']"),o=null!=this.querySelector("*[slot='actions']"),r=U`
|
|
668
|
+
${Vt("table-header-sm")};
|
|
669
|
+
}
|
|
670
|
+
`],window.customElements.define("m-text",ze);class Ae extends ne{static get properties(){return{variant:{type:String},dismissible:{type:Boolean},dismissed:{type:Boolean,reflect:!0}}}constructor(){super(),Se.add(this),Ce.set(this,void 0),this.variant="neutral",this.dismissible=!1,this.dismissed=!1}get primaryAction(){return null==t(this,Ce,"f")&&e(this,Ce,this.querySelector("m-banner-action-primary"),"f"),t(this,Ce,"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 q;const e=null!=this.querySelector("*[slot='description']"),o=null!=this.querySelector("*[slot='actions']"),i=N`
|
|
666
671
|
<m-close-button
|
|
667
672
|
id="close"
|
|
668
673
|
label="Dismiss"
|
|
669
|
-
@click=${t(this,
|
|
674
|
+
@click=${t(this,Se,"m",je)}
|
|
670
675
|
></m-close-button>
|
|
671
|
-
`;return
|
|
676
|
+
`;return N`
|
|
672
677
|
<div
|
|
673
678
|
class=${lt({banner:!0,"-success":"success"===this.variant,"-warning":"warning"===this.variant,"-danger":"danger"===this.variant,"-with-description":e})}
|
|
674
679
|
>
|
|
675
680
|
<div class="wrapper">
|
|
676
|
-
<slot name="icon">
|
|
681
|
+
<slot name="icon">
|
|
682
|
+
<m-icon name="${function(t){switch(t){case"success":return"check";case"warning":case"danger":return"attention";default:return"info-circle"}}(this.variant)}"></m-icon>
|
|
683
|
+
</slot>
|
|
677
684
|
<div class="content">
|
|
678
685
|
<slot name="title"></slot>
|
|
679
686
|
<slot name="description"></slot>
|
|
680
687
|
</div>
|
|
681
|
-
${this.dismissible&&!o?
|
|
688
|
+
${this.dismissible&&!o?i:q}
|
|
682
689
|
</div>
|
|
683
690
|
<slot name="actions"></slot>
|
|
684
691
|
</div>
|
|
685
|
-
`}}
|
|
692
|
+
`}}Ce=new WeakMap,Se=new WeakSet,je=function(){this.dismissed=!0,this.emit("m-dismiss",{composed:!0})},Ae.styles=[a`
|
|
686
693
|
:host {
|
|
687
694
|
display: block;
|
|
688
695
|
width: 100%;
|
|
@@ -695,34 +702,34 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
695
702
|
.banner {
|
|
696
703
|
background-color: var(
|
|
697
704
|
--m-banner-background-color,
|
|
698
|
-
${
|
|
705
|
+
${Mt("color-background-secondary")}
|
|
699
706
|
);
|
|
700
|
-
border: var(--m-banner-border, 1px solid ${
|
|
701
|
-
border-radius: var(--m-banner-border-radius, ${
|
|
702
|
-
padding-inline: var(--m-banner-padding-x, ${
|
|
703
|
-
padding-block: var(--m-banner-padding-y, ${
|
|
707
|
+
border: var(--m-banner-border, 1px solid ${Mt("color-border")});
|
|
708
|
+
border-radius: var(--m-banner-border-radius, ${Bt("border-radius-m")});
|
|
709
|
+
padding-inline: var(--m-banner-padding-x, ${Bt("spacing-6")});
|
|
710
|
+
padding-block: var(--m-banner-padding-y, ${Bt("spacing-4")});
|
|
704
711
|
display: flex;
|
|
705
712
|
flex-wrap: wrap;
|
|
706
713
|
justify-content: flex-end;
|
|
707
|
-
gap: ${
|
|
714
|
+
gap: ${Bt("spacing-6")};
|
|
708
715
|
}
|
|
709
716
|
|
|
710
717
|
.banner.-success {
|
|
711
|
-
--m-banner-background-color: ${
|
|
712
|
-
--m-banner-border: 1px solid ${
|
|
713
|
-
--m-banner-icon-color: ${
|
|
718
|
+
--m-banner-background-color: ${Mt("color-success-20")};
|
|
719
|
+
--m-banner-border: 1px solid ${Mt("color-success-20")};
|
|
720
|
+
--m-banner-icon-color: ${Mt("color-success-60")};
|
|
714
721
|
}
|
|
715
722
|
|
|
716
723
|
.banner.-warning {
|
|
717
|
-
--m-banner-background-color: ${
|
|
718
|
-
--m-banner-border: 1px solid ${
|
|
719
|
-
--m-banner-icon-color: ${
|
|
724
|
+
--m-banner-background-color: ${Mt("color-warning-20")};
|
|
725
|
+
--m-banner-border: 1px solid ${Mt("color-warning-20")};
|
|
726
|
+
--m-banner-icon-color: ${Mt("color-warning-100")};
|
|
720
727
|
}
|
|
721
728
|
|
|
722
729
|
.banner.-danger {
|
|
723
|
-
--m-banner-background-color: ${
|
|
724
|
-
--m-banner-border: 1px solid ${
|
|
725
|
-
--m-banner-icon-color: ${
|
|
730
|
+
--m-banner-background-color: ${Mt("color-danger-20")};
|
|
731
|
+
--m-banner-border: 1px solid ${Mt("color-danger-20")};
|
|
732
|
+
--m-banner-icon-color: ${Mt("color-danger-60")};
|
|
726
733
|
}
|
|
727
734
|
|
|
728
735
|
.banner.-with-description {
|
|
@@ -731,14 +738,17 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
731
738
|
|
|
732
739
|
.wrapper {
|
|
733
740
|
display: flex;
|
|
734
|
-
gap: ${
|
|
741
|
+
gap: ${Bt("spacing-6")};
|
|
735
742
|
align-items: center;
|
|
736
743
|
flex-grow: 1;
|
|
737
744
|
}
|
|
738
745
|
|
|
739
|
-
slot[name='icon'] >
|
|
746
|
+
slot[name='icon'] > m-icon,
|
|
740
747
|
slot[name='icon']::slotted(*) {
|
|
741
|
-
|
|
748
|
+
--m-icon-color: var(--m-banner-icon-color, ${Mt("color-neutral-90")});
|
|
749
|
+
--m-icon-size: var(--m-banner-icon-size, 24px);
|
|
750
|
+
|
|
751
|
+
fill: var(--m-banner-icon-color, ${Mt("color-neutral-90")});
|
|
742
752
|
block-size: var(--m-banner-icon-size, 24px);
|
|
743
753
|
inline-size: var(--m-banner-icon-size, 24px);
|
|
744
754
|
}
|
|
@@ -747,14 +757,14 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
747
757
|
display: flex;
|
|
748
758
|
flex-direction: column;
|
|
749
759
|
flex-grow: 1;
|
|
750
|
-
gap: ${
|
|
760
|
+
gap: ${Bt("spacing-1")};
|
|
751
761
|
}
|
|
752
|
-
`],window.customElements.define("m-banner",
|
|
762
|
+
`],window.customElements.define("m-banner",Ae);class We extends ot{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 N`
|
|
753
763
|
<div
|
|
754
764
|
class="m-card"
|
|
755
|
-
style="${
|
|
765
|
+
style="${xe({"--m-card-flag-color":dt(this.flagColor)})}"
|
|
756
766
|
>
|
|
757
|
-
${this.flagged?
|
|
767
|
+
${this.flagged?N`<span class="m-card-flag"></span>`:q}
|
|
758
768
|
<div class="m-card-content">
|
|
759
769
|
<slot name="title"></slot>
|
|
760
770
|
<slot name="subtitle"></slot>
|
|
@@ -762,9 +772,9 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
762
772
|
<slot name="body"></slot>
|
|
763
773
|
</div>
|
|
764
774
|
</div>
|
|
765
|
-
`}}
|
|
775
|
+
`}}We.styles=[a`
|
|
766
776
|
:host {
|
|
767
|
-
--m-card-background-color: ${
|
|
777
|
+
--m-card-background-color: ${Mt("color-background-primary")};
|
|
768
778
|
}
|
|
769
779
|
|
|
770
780
|
.m-card {
|
|
@@ -773,8 +783,8 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
773
783
|
flex-direction: row;
|
|
774
784
|
|
|
775
785
|
background-color: var(--m-card-background-color);
|
|
776
|
-
border-radius: ${
|
|
777
|
-
border: solid 1px ${
|
|
786
|
+
border-radius: ${Bt("border-radius-s")};
|
|
787
|
+
border: solid 1px ${Mt("color-divider")};
|
|
778
788
|
}
|
|
779
789
|
|
|
780
790
|
.m-card-flag {
|
|
@@ -787,11 +797,11 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
787
797
|
box-sizing: border-box;
|
|
788
798
|
border: 1px solid var(--m-card-flag-color);
|
|
789
799
|
background-color: var(--m-card-flag-color);
|
|
790
|
-
width: ${
|
|
791
|
-
border-top-left-radius: ${
|
|
800
|
+
width: ${Bt("border-thick")};
|
|
801
|
+
border-top-left-radius: ${Bt("border-radius-s")};
|
|
792
802
|
border-top-right-radius: 0;
|
|
793
803
|
border-bottom-right-radius: 0;
|
|
794
|
-
border-bottom-left-radius: ${
|
|
804
|
+
border-bottom-left-radius: ${Bt("border-radius-s")};
|
|
795
805
|
}
|
|
796
806
|
|
|
797
807
|
.m-card-content {
|
|
@@ -801,56 +811,56 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
801
811
|
}
|
|
802
812
|
|
|
803
813
|
::slotted(m-divider) {
|
|
804
|
-
--m-divider-margin-top: ${
|
|
814
|
+
--m-divider-margin-top: ${Bt("spacing-4")};
|
|
805
815
|
}
|
|
806
|
-
`],window.customElements.define("m-card",
|
|
816
|
+
`],window.customElements.define("m-card",We);class Ee extends ot{static get properties(){return{slot:{type:String}}}constructor(){super(),this.slot="body"}render(){return N`
|
|
807
817
|
<div class="m-card-body">
|
|
808
818
|
<slot></slot>
|
|
809
819
|
</div>
|
|
810
|
-
`}}
|
|
820
|
+
`}}Ee.styles=[a`
|
|
811
821
|
:host {
|
|
812
|
-
--m-card-body-padding-x: ${
|
|
813
|
-
--m-card-body-padding-y: ${
|
|
822
|
+
--m-card-body-padding-x: ${Bt("spacing-4")};
|
|
823
|
+
--m-card-body-padding-y: ${Bt("spacing-4")};
|
|
814
824
|
}
|
|
815
825
|
|
|
816
826
|
.m-card-body {
|
|
817
827
|
padding: var(--m-card-body-padding-y) var(--m-card-body-padding-x);
|
|
818
828
|
}
|
|
819
|
-
`],window.customElements.define("m-card-body",
|
|
829
|
+
`],window.customElements.define("m-card-body",Ee);class _e extends ot{static get properties(){return{slot:{type:String}}}constructor(){super(),this.slot="subtitle"}render(){return N`
|
|
820
830
|
<div class="m-card-subtitle">
|
|
821
831
|
<slot></slot>
|
|
822
832
|
</div>
|
|
823
|
-
`}}
|
|
833
|
+
`}}_e.styles=[a`
|
|
824
834
|
:host {
|
|
825
|
-
--m-card-subtitle-margin-top: ${
|
|
826
|
-
--m-card-subtitle-padding-x: ${
|
|
835
|
+
--m-card-subtitle-margin-top: ${Bt("spacing-2")};
|
|
836
|
+
--m-card-subtitle-padding-x: ${Bt("spacing-4")};
|
|
827
837
|
--m-card-subtitle-padding-y: 0;
|
|
828
838
|
}
|
|
829
839
|
|
|
830
840
|
.m-card-subtitle {
|
|
831
|
-
${
|
|
841
|
+
${Vt("body-md")};
|
|
832
842
|
|
|
833
843
|
margin-block-start: var(--m-card-subtitle-margin-top);
|
|
834
844
|
padding: var(--m-card-subtitle-padding-y) var(--m-card-subtitle-padding-x);
|
|
835
845
|
|
|
836
|
-
color: ${
|
|
846
|
+
color: ${Mt("color-text-tertiary")};
|
|
837
847
|
}
|
|
838
|
-
`],window.customElements.define("m-card-subtitle",
|
|
848
|
+
`],window.customElements.define("m-card-subtitle",_e);class Be extends ot{static get properties(){return{slot:{type:String}}}constructor(){super(),this.slot="title"}render(){return N`
|
|
839
849
|
<div class="m-card-title">
|
|
840
850
|
<slot name="leading"></slot>
|
|
841
851
|
<slot></slot>
|
|
842
852
|
</div>
|
|
843
|
-
`}}
|
|
853
|
+
`}}Be.styles=[a`
|
|
844
854
|
:host {
|
|
845
|
-
--m-card-title-padding-x: ${
|
|
846
|
-
--m-card-title-padding-top: ${
|
|
855
|
+
--m-card-title-padding-x: ${Bt("spacing-4")};
|
|
856
|
+
--m-card-title-padding-top: ${Bt("spacing-4")};
|
|
847
857
|
}
|
|
848
858
|
|
|
849
859
|
.m-card-title {
|
|
850
860
|
padding: var(--m-card-title-padding-top) var(--m-card-title-padding-x) 0;
|
|
851
861
|
|
|
852
|
-
${
|
|
853
|
-
color: ${
|
|
862
|
+
${Vt("heading-sm-bold")};
|
|
863
|
+
color: ${Mt("color-text-primary")};
|
|
854
864
|
}
|
|
855
865
|
|
|
856
866
|
slot[name='leading']::slotted(*) {
|
|
@@ -859,51 +869,34 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
859
869
|
align-items: center;
|
|
860
870
|
justify-content: center;
|
|
861
871
|
pointer-events: none;
|
|
862
|
-
margin-inline-end: ${
|
|
872
|
+
margin-inline-end: ${Bt("spacing-1")};
|
|
863
873
|
}
|
|
864
|
-
`],window.customElements.define("m-card-title",
|
|
865
|
-
<label for="${
|
|
874
|
+
`],window.customElements.define("m-card-title",Be);const Me={delay:"0s",duration:"0.35s",easing:"ease-in-out"};var Oe,Te,Ue;class Ne extends ot{static get properties(){return{name:{type:String},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0},indeterminate:{type:Boolean,reflect:!0}}}constructor(){super(),Oe.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,Oe,"m",Te).call(this)}render(){return N`
|
|
875
|
+
<label for="${se(this.id)}" class="check-input-label">
|
|
866
876
|
<input
|
|
867
|
-
id="${
|
|
868
|
-
name="${
|
|
877
|
+
id="${se(this.id)}"
|
|
878
|
+
name="${se(this.name)}"
|
|
869
879
|
type="checkbox"
|
|
870
880
|
class="check-input"
|
|
871
881
|
?disabled="${this.disabled}"
|
|
872
882
|
?checked="${this.checked}"
|
|
873
|
-
@change=${t(this,
|
|
883
|
+
@change=${t(this,Oe,"m",Ue)}
|
|
874
884
|
/>
|
|
875
|
-
<
|
|
876
|
-
|
|
877
|
-
viewBox="0 0 48 48"
|
|
878
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
879
|
-
>
|
|
880
|
-
<path
|
|
881
|
-
fill-rule="evenodd"
|
|
882
|
-
clip-rule="evenodd"
|
|
883
|
-
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"
|
|
884
|
-
/>
|
|
885
|
-
</svg>
|
|
886
|
-
<svg
|
|
887
|
-
class="indeterminate-icon"
|
|
888
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
889
|
-
viewBox="0 0 24 24"
|
|
890
|
-
>
|
|
891
|
-
<path d="M0 0h24v24H0V0z" fill="none" />
|
|
892
|
-
<path d="M19 13H5v-2h14v2z" />
|
|
893
|
-
</svg>
|
|
885
|
+
<m-icon name="check" class="check-icon"></m-icon>
|
|
886
|
+
<m-icon name="indeterminate" class="indeterminate-icon"></m-icon>
|
|
894
887
|
<slot name="leading"></slot>
|
|
895
888
|
<slot></slot>
|
|
896
889
|
</label>
|
|
897
|
-
`}}
|
|
898
|
-
${
|
|
890
|
+
`}}Oe=new WeakSet,Te=function(){this.setAttribute("aria-disabled",this.disabled.toString()),this.setAttribute("aria-checked",this.indeterminate?"mixed":this.checked.toString()),this.input.indeterminate=this.indeterminate},Ue=function(t){const e=t.target,o=new CustomEvent("m-change",{cancelable:!1,composed:!1,bubbles:!0,detail:{checked:e.checked,indeterminate:e.indeterminate}});this.dispatchEvent(o),this.checked=e.checked,this.indeterminate=e.indeterminate},Ne.styles=[a`
|
|
891
|
+
${Zt.focus(".check-input-label")} {
|
|
899
892
|
border-radius: 2px;
|
|
900
|
-
outline: 1px solid ${
|
|
893
|
+
outline: 1px solid ${Mt("color-primary-60")};
|
|
901
894
|
}
|
|
902
895
|
|
|
903
896
|
.check-input-label {
|
|
904
|
-
${
|
|
897
|
+
${Vt("body-md")};
|
|
905
898
|
|
|
906
|
-
gap: ${
|
|
899
|
+
gap: ${Bt("spacing-1")};
|
|
907
900
|
align-items: center;
|
|
908
901
|
display: inline-flex;
|
|
909
902
|
padding: 4px 2px;
|
|
@@ -915,76 +908,77 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
915
908
|
}
|
|
916
909
|
|
|
917
910
|
.check-input {
|
|
918
|
-
--checkbox-input-size: ${
|
|
911
|
+
--checkbox-input-size: ${Bt("font-size-4")};
|
|
919
912
|
|
|
920
|
-
color: ${
|
|
913
|
+
color: ${Mt("color-text-tertiary")};
|
|
921
914
|
width: var(--checkbox-input-size);
|
|
922
915
|
height: var(--checkbox-input-size);
|
|
923
|
-
background: ${
|
|
916
|
+
background: ${Mt("color-neutral-0")};
|
|
924
917
|
appearance: none;
|
|
925
918
|
outline: none;
|
|
926
919
|
border-style: solid;
|
|
927
|
-
border-radius: ${
|
|
928
|
-
border-color: ${
|
|
929
|
-
border-width: ${
|
|
920
|
+
border-radius: ${Bt("border-radius-s")};
|
|
921
|
+
border-color: ${Mt("color-border")};
|
|
922
|
+
border-width: ${Bt("border-thin")};
|
|
930
923
|
margin: 0;
|
|
931
|
-
${
|
|
924
|
+
${It([{property:"border",...Me},{property:"background",...Me}])};
|
|
932
925
|
}
|
|
933
926
|
|
|
934
927
|
.check-input:indeterminate,
|
|
935
928
|
.check-input:checked {
|
|
936
|
-
background: ${
|
|
937
|
-
border-color: ${
|
|
929
|
+
background: ${Mt("color-primary-60")};
|
|
930
|
+
border-color: ${Mt("color-primary-60")};
|
|
938
931
|
}
|
|
939
932
|
|
|
940
|
-
${
|
|
941
|
-
background: ${
|
|
933
|
+
${Jt(".check-input")} {
|
|
934
|
+
background: ${Mt("color-background-tertiary")};
|
|
942
935
|
cursor: not-allowed;
|
|
943
936
|
}
|
|
944
937
|
|
|
945
|
-
${
|
|
946
|
-
${
|
|
947
|
-
background: ${
|
|
948
|
-
border-color: ${
|
|
938
|
+
${Jt(".check-input:indeterminate")},
|
|
939
|
+
${Jt(".check-input:checked")} {
|
|
940
|
+
background: ${Mt("color-neutral-40")};
|
|
941
|
+
border-color: ${Mt("color-neutral-40")};
|
|
949
942
|
}
|
|
950
943
|
|
|
951
|
-
${
|
|
952
|
-
${
|
|
953
|
-
background: ${
|
|
954
|
-
border-color: ${
|
|
944
|
+
${Zt.hover(".check-input:indeterminate")},
|
|
945
|
+
${Zt.hover(".check-input:checked")} {
|
|
946
|
+
background: ${Mt("color-primary-100")};
|
|
947
|
+
border-color: ${Mt("color-primary-100")};
|
|
955
948
|
}
|
|
956
949
|
|
|
957
|
-
${
|
|
958
|
-
border-color: ${
|
|
950
|
+
${Zt.hover(".check-input")} {
|
|
951
|
+
border-color: ${Mt("color-primary-100")};
|
|
959
952
|
}
|
|
960
953
|
|
|
961
954
|
:host([disabled]) .check-input-label {
|
|
962
955
|
cursor: not-allowed;
|
|
963
|
-
color: ${
|
|
956
|
+
color: ${Mt("color-text-disabled")};
|
|
964
957
|
}
|
|
965
958
|
|
|
966
959
|
.check-icon,
|
|
967
960
|
.indeterminate-icon {
|
|
961
|
+
--m-icon-size: 1em;
|
|
962
|
+
--m-icon-color: ${Mt("color-neutral-0")};
|
|
963
|
+
|
|
968
964
|
position: absolute;
|
|
969
|
-
|
|
970
|
-
height: 1em;
|
|
971
|
-
fill: ${Wt("color-neutral-0")};
|
|
965
|
+
|
|
972
966
|
pointer-events: none;
|
|
973
|
-
border-width: ${
|
|
967
|
+
border-width: ${Bt("border-thin")};
|
|
974
968
|
border-style: solid;
|
|
975
969
|
border-color: transparent;
|
|
976
|
-
border-radius: ${
|
|
970
|
+
border-radius: ${Bt("border-radius-s")};
|
|
977
971
|
display: none;
|
|
978
972
|
}
|
|
979
973
|
|
|
980
974
|
.check-input:checked:not(:indeterminate) ~ .check-icon,
|
|
981
975
|
.check-input:indeterminate:not(:checked) ~ .indeterminate-icon {
|
|
982
|
-
display:
|
|
976
|
+
display: inline-flex;
|
|
983
977
|
}
|
|
984
|
-
`],window.customElements.define("m-checkbox",
|
|
978
|
+
`],window.customElements.define("m-checkbox",Ne);class Re extends ot{render(){return N` <hr class="m-divider" /> `}}Re.styles=[a`
|
|
985
979
|
.m-divider {
|
|
986
980
|
border: 0;
|
|
987
|
-
border-block-end: solid 1px ${
|
|
981
|
+
border-block-end: solid 1px ${Mt("color-divider")};
|
|
988
982
|
margin-block-start: var(
|
|
989
983
|
--m-divider-margin-top,
|
|
990
984
|
var(--m-divider-margin-y, 0)
|
|
@@ -994,28 +988,36 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
994
988
|
var(--m-divider-margin-y, 0)
|
|
995
989
|
);
|
|
996
990
|
}
|
|
997
|
-
`],window.customElements.define("m-divider",
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
991
|
+
`],window.customElements.define("m-divider",Re);
|
|
992
|
+
/**
|
|
993
|
+
* @license
|
|
994
|
+
* Copyright 2021 Google LLC
|
|
995
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
996
|
+
*/
|
|
997
|
+
class qe extends Event{constructor(t,e,o){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=e,this.subscribe=o}}
|
|
998
|
+
/**
|
|
999
|
+
* @license
|
|
1000
|
+
* Copyright 2021 Google LLC
|
|
1001
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1002
|
+
*/
|
|
1003
|
+
/**
|
|
1004
|
+
* @license
|
|
1005
|
+
* Copyright 2021 Google LLC
|
|
1006
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1007
|
+
*/
|
|
1008
|
+
class Pe{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this.subscribe=i,this.provided=!1,this.value=void 0,this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new qe(this.context,((t,e)=>{this.unsubscribe&&(this.unsubscribe!==e&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,e)),this.unsubscribe=e}),this.subscribe))}}
|
|
1009
|
+
/**
|
|
1010
|
+
* @license
|
|
1011
|
+
* Copyright 2021 Google LLC
|
|
1012
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1013
|
+
*/class De{constructor(t){this.callbacks=new Map,this.updateObservers=()=>{for(const[t,e]of this.callbacks)t(this.t,e)},void 0!==t&&(this.value=t)}get value(){return this.t}set value(t){this.setValue(t)}setValue(t,e=!1){const o=e||!Object.is(t,this.t);this.t=t,o&&this.updateObservers()}addCallback(t,e){e&&(this.callbacks.has(t)||this.callbacks.set(t,(()=>{this.callbacks.delete(t)}))),t(this.value)}clearCallbacks(){this.callbacks.clear()}}
|
|
1014
|
+
/**
|
|
1015
|
+
* @license
|
|
1016
|
+
* Copyright 2021 Google LLC
|
|
1017
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1018
|
+
*/class Ge extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}}class Le extends De{constructor(t,e,o){super(o),this.host=t,this.context=e,this.onContextRequest=t=>{t.context===this.context&&t.composedPath()[0]!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,t.subscribe))},this.attachListeners(),this.host.addController(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest)}hostConnected(){this.host.dispatchEvent(new Ge(this.context))}}const Ie="field",Ve={gap:"spacing-4",align:"stretch",justify:"flex-start"};class Je extends ot{static get properties(){return{gap:{type:String},align:{type:String},justify:{type:String}}}constructor(){super(),this.gap=Ve.gap,this.align=Ve.align,this.justify=Ve.justify}update(t){this.style.setProperty("--m-group-gap",dt(this.gap)||dt(Ve.gap)),this.style.setProperty("--m-group-align",this.align||Ve.align),this.style.setProperty("--m-group-justify",this.justify||Ve.justify),super.update(t)}render(){return N`<slot></slot>`}}Je.styles=[a`
|
|
1017
1019
|
:host {
|
|
1018
|
-
--m-group-gap: ${
|
|
1020
|
+
--m-group-gap: ${Bt(Ve.gap)};
|
|
1019
1021
|
--m-group-align: ${l(Ve.align)};
|
|
1020
1022
|
--m-group-justify: ${l(Ve.justify)};
|
|
1021
1023
|
|
|
@@ -1025,11 +1027,11 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1025
1027
|
align-items: var(--m-group-align);
|
|
1026
1028
|
justify-content: var(--m-group-justify);
|
|
1027
1029
|
}
|
|
1028
|
-
`],window.customElements.define("m-group",
|
|
1030
|
+
`],window.customElements.define("m-group",Je);const Ze={gap:"spacing-4",align:"stretch",justify:"flex-start"};class Fe extends ot{static get properties(){return{gap:{type:String},align:{type:String},justify:{type:String}}}constructor(){super(),this.gap=Ze.gap,this.align=Ze.align,this.justify=Ze.justify}update(t){this.style.setProperty("--m-stack-gap",dt(this.gap)||dt(Ze.gap)),this.style.setProperty("--m-stack-align",this.align||Ze.align),this.style.setProperty("--m-stack-justify",this.justify||Ze.justify),super.update(t)}render(){return N`<slot></slot>`}}var He,Ke,Qe,Xe,Ye;Fe.styles=[a`
|
|
1029
1031
|
:host {
|
|
1030
|
-
--m-stack-gap: ${
|
|
1031
|
-
--m-stack-align: ${l(
|
|
1032
|
-
--m-stack-justify: ${l(
|
|
1032
|
+
--m-stack-gap: ${Bt(Ze.gap)};
|
|
1033
|
+
--m-stack-align: ${l(Ze.align)};
|
|
1034
|
+
--m-stack-justify: ${l(Ze.justify)};
|
|
1033
1035
|
|
|
1034
1036
|
display: flex;
|
|
1035
1037
|
flex-direction: column;
|
|
@@ -1038,10 +1040,107 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1038
1040
|
align-items: var(--m-stack-align);
|
|
1039
1041
|
justify-content: var(--m-stack-justify);
|
|
1040
1042
|
}
|
|
1041
|
-
`],window.customElements.define("m-stack",
|
|
1043
|
+
`],window.customElements.define("m-stack",Fe);class to extends ne{static get properties(){return{status:{type:String},slot:{type:String}}}constructor(){super(),He.add(this),this.field=new Pe(this,Ie,void 0,!0),this.slot="hint"}render(){const e={"-status-default":"default"===t(this,He,"m",Ke).call(this),"-status-danger":"danger"===t(this,He,"m",Ke).call(this)};return N` <m-group
|
|
1044
|
+
gap="spacing-0-5"
|
|
1045
|
+
align="center"
|
|
1046
|
+
class=${lt(e)}
|
|
1047
|
+
>
|
|
1048
|
+
<slot name="leading"
|
|
1049
|
+
>${"danger"===t(this,He,"m",Ke).call(this)?N`<m-icon
|
|
1050
|
+
name="attention"
|
|
1051
|
+
size="10"
|
|
1052
|
+
color="color-danger-60"
|
|
1053
|
+
></m-icon>`:q}</slot
|
|
1054
|
+
>
|
|
1055
|
+
<span
|
|
1056
|
+
class=${lt({hint:!0,...e})}
|
|
1057
|
+
><slot></slot>
|
|
1058
|
+
</span>
|
|
1059
|
+
</m-group>`}}He=new WeakSet,Ke=function(){var t;return this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status)},to.styles=[[a`
|
|
1060
|
+
:host {
|
|
1061
|
+
--m-field-hint-color: ${Mt("color-text-tertiary")};
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
m-group {
|
|
1065
|
+
${Pt(Bt("spacing-2"))};
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
.-status-danger {
|
|
1069
|
+
--m-field-hint-color: ${Mt("color-danger-60")};
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
.hint {
|
|
1073
|
+
${Vt("body-sm")};
|
|
1074
|
+
color: var(--m-field-hint-color);
|
|
1075
|
+
}
|
|
1076
|
+
`]],window.customElements.define("m-field-hint",to);class eo extends ne{static get properties(){return{required:{type:Boolean},size:{type:String},slot:{type:String}}}constructor(){super(),Qe.add(this),this.field=new Pe(this,Ie,void 0,!0),this.slot="hint"}render(){return N`<label
|
|
1077
|
+
class=${lt({label:!0,"-size-default":"default"===t(this,Qe,"m",Xe).call(this),"-size-small":"small"===t(this,Qe,"m",Xe).call(this)})}
|
|
1078
|
+
><slot></slot>
|
|
1079
|
+
${t(this,Qe,"m",Ye).call(this)?N`<span class="required">*</span>`:q}
|
|
1080
|
+
</label>`}}Qe=new WeakSet,Xe=function(){var t;return this.size||(null===(t=this.field.value)||void 0===t?void 0:t.size)},Ye=function(){var t;return null!=this.required?this.required:Boolean(null===(t=this.field.value)||void 0===t?void 0:t.required)},eo.styles=[[a`
|
|
1081
|
+
:host {
|
|
1082
|
+
display: flex;
|
|
1083
|
+
align-items: center;
|
|
1084
|
+
justify-content: flex-start;
|
|
1085
|
+
gap: ${Bt("spacing-0-5")};
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
.label {
|
|
1089
|
+
${Vt("body-md")};
|
|
1090
|
+
|
|
1091
|
+
display: inline-flex;
|
|
1092
|
+
align-items: center;
|
|
1093
|
+
justify-content: flex-start;
|
|
1094
|
+
|
|
1095
|
+
margin: 0;
|
|
1096
|
+
padding: 0;
|
|
1097
|
+
|
|
1098
|
+
color: ${Mt("color-text-tertiary")};
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
.required {
|
|
1102
|
+
${Vt("body-md")};
|
|
1103
|
+
|
|
1104
|
+
color: ${Mt("color-text-error")};
|
|
1105
|
+
|
|
1106
|
+
content: '*';
|
|
1107
|
+
|
|
1108
|
+
${Ut(Bt("spacing-1"))};
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
.label.-size-small,
|
|
1112
|
+
.label.-size-small .required {
|
|
1113
|
+
${Vt("body-sm")};
|
|
1114
|
+
}
|
|
1115
|
+
`]],window.customElements.define("m-field-label",eo);class oo extends ne{static get properties(){return{label:{type:String},hint:{type:String},required:{type:Boolean},status:{type:String},size:{type:String}}}constructor(){super(),this.provider=new Le(this,Ie,{required:!1,size:"default",status:"default"}),this.required=!1,this.status="default",this.size="default"}update(t){super.update(t),(t.has("required")||t.has("status")||t.has("size"))&&this.provider.setValue({required:this.required,status:this.status,size:this.size})}render(){return N`<m-stack gap="spacing-1">
|
|
1116
|
+
${this.label?N`<m-field-label>${this.label}</m-field-label>`:N`<slot name="label"></slot>`}
|
|
1117
|
+
|
|
1118
|
+
<slot></slot>
|
|
1119
|
+
|
|
1120
|
+
${this.hint?N`<m-field-hint>${this.hint}</m-field-hint>`:N`<slot name="hint"></slot>`}
|
|
1121
|
+
</m-stack>`}}window.customElements.define("m-field",oo);const io=["center","flex-start","flex-end","stretch"],ro=["center","flex-start","flex-end","space-between","space-around","space-evenly"],no={padding:"spacing-4",borderRadius:"border-radius-s",borderWidth:"border-none",borderColor:"color-background-highlight",textAlign:"left"};class so extends ot{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=no.padding,this.borderRadius=no.borderRadius,this.borderWidth=no.borderWidth,this.borderColor=no.borderColor,this.textAlign=no.textAlign}update(t){this.style.setProperty("--m-box-padding",dt(this.padding)||dt(no.padding)),this.style.setProperty("--m-box-background-color",dt(this.backgroundColor)||"transparent"),this.style.setProperty("--m-box-border-radius",dt(this.borderRadius)||dt(no.borderRadius)),this.style.setProperty("--m-box-border-width",dt(this.borderWidth)||dt(no.borderWidth)),this.style.setProperty("--m-box-border-color",dt(this.borderColor)||dt(no.borderColor)),this.style.setProperty("--m-box-text-align",this.textAlign||no.textAlign),super.update(t)}render(){return N`<slot></slot>`}}so.styles=[a`
|
|
1042
1122
|
:host {
|
|
1043
|
-
--m-
|
|
1044
|
-
--m-
|
|
1123
|
+
--m-box-padding: ${Bt(no.padding)};
|
|
1124
|
+
--m-box-background-color: transparent;
|
|
1125
|
+
--m-box-border-radius: ${Bt(no.borderRadius)};
|
|
1126
|
+
--m-box-border-width: ${Bt(no.borderWidth)};
|
|
1127
|
+
--m-box-border-color: ${Mt(no.borderColor)};
|
|
1128
|
+
--m-box-text-align: ${l(no.textAlign)};
|
|
1129
|
+
|
|
1130
|
+
box-sizing: border-box;
|
|
1131
|
+
|
|
1132
|
+
padding: var(--m-box-padding);
|
|
1133
|
+
background-color: var(--m-box-background-color);
|
|
1134
|
+
border-radius: var(--m-box-border-radius);
|
|
1135
|
+
border-style: solid;
|
|
1136
|
+
border-width: var(--m-box-border-width);
|
|
1137
|
+
border-color: var(--m-box-border-color);
|
|
1138
|
+
text-align: var(--m-box-text-align);
|
|
1139
|
+
}
|
|
1140
|
+
`],window.customElements.define("m-box",so);const lo={gap:"spacing-4",minColumnWidth:ht("spacing-30")};class ao extends ot{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=lo.gap,this.minColumnWidth=lo.minColumnWidth}update(t){t.has("gap")&&this.style.setProperty("--m-grid-gap",dt(this.gap)||dt(lo.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-grid-row-gap",dt(this.rowGap)):this.style.removeProperty("--m-grid-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-grid-column-gap",dt(this.columnGap)):this.style.removeProperty("--m-grid-column-gap")),t.has("minColumnWidth")&&this.style.setProperty("--m-grid-min-column-width",this.minColumnWidth||lo.minColumnWidth),super.update(t)}render(){return N`<slot></slot>`}}ao.styles=[a`
|
|
1141
|
+
:host {
|
|
1142
|
+
--m-grid-gap: ${Bt(lo.gap)};
|
|
1143
|
+
--m-grid-min-column-width: ${l(lo.minColumnWidth)};
|
|
1045
1144
|
|
|
1046
1145
|
display: grid;
|
|
1047
1146
|
|
|
@@ -1053,15 +1152,15 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1053
1152
|
minmax(min(var(--m-grid-min-column-width), 100%), 1fr)
|
|
1054
1153
|
);
|
|
1055
1154
|
}
|
|
1056
|
-
`],window.customElements.define("m-grid",
|
|
1155
|
+
`],window.customElements.define("m-grid",ao);const co={gap:"spacing-4",sideWidth:"auto",minContentWidth:"50%",reversed:!1};function ho(t){return t?"row-reverse":"row"}class uo extends ot{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=co.gap,this.sideWidth=co.sideWidth,this.minContentWidth=co.minContentWidth,this.reversed=co.reversed}update(t){t.has("gap")&&this.style.setProperty("--m-sidebar-gap",dt(this.gap)||dt(co.gap)),t.has("sideWidth")&&this.style.setProperty("--m-sidebar-side-width",this.sideWidth||co.sideWidth),t.has("minContentWidth")&&this.style.setProperty("--m-sidebar-min-content-width",this.minContentWidth||co.minContentWidth),t.has("reversed")&&this.style.setProperty("--m-sidebar-flex-direction",ho(this.reversed)),super.update(t)}render(){return N`
|
|
1057
1156
|
<slot name="sidebar"></slot>
|
|
1058
1157
|
<slot name="content"></slot>
|
|
1059
|
-
`}}
|
|
1158
|
+
`}}uo.styles=[a`
|
|
1060
1159
|
:host {
|
|
1061
|
-
--m-sidebar-gap: ${
|
|
1062
|
-
--m-sidebar-flex-direction: ${l(
|
|
1063
|
-
--m-sidebar-side-width: ${l(
|
|
1064
|
-
--m-sidebar-min-content-width: ${l(
|
|
1160
|
+
--m-sidebar-gap: ${Bt(co.gap)};
|
|
1161
|
+
--m-sidebar-flex-direction: ${l(ho(co.reversed))};
|
|
1162
|
+
--m-sidebar-side-width: ${l(co.sideWidth)};
|
|
1163
|
+
--m-sidebar-min-content-width: ${l(co.minContentWidth)};
|
|
1065
1164
|
|
|
1066
1165
|
display: flex;
|
|
1067
1166
|
flex-wrap: wrap;
|
|
@@ -1080,7 +1179,7 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1080
1179
|
flex-grow: 999;
|
|
1081
1180
|
min-width: var(--m-sidebar-min-content-width);
|
|
1082
1181
|
}
|
|
1083
|
-
`],window.customElements.define("m-sidebar",
|
|
1182
|
+
`],window.customElements.define("m-sidebar",uo);const bo={gap:"spacing-4",threshold:"10rem"};class go extends ot{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=bo.gap,this.threshold=bo.threshold}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-switcher-gap",dt(this.gap)||dt(bo.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-switcher-row-gap",dt(this.rowGap)):this.style.removeProperty("--m-switcher-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-switcher-column-gap",dt(this.columnGap)):this.style.removeProperty("--m-switcher-column-gap")),t.has("threshold")&&this.style.setProperty("--m-switcher-threshold",this.threshold||bo.threshold)}render(){const t=this.limit?N`
|
|
1084
1183
|
<style>
|
|
1085
1184
|
::slotted(*:nth-last-child(n + ${this.limit+1})) {
|
|
1086
1185
|
flex-basis: 100%;
|
|
@@ -1089,13 +1188,13 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1089
1188
|
flex-basis: 100%;
|
|
1090
1189
|
}
|
|
1091
1190
|
</style>
|
|
1092
|
-
`:"";return
|
|
1191
|
+
`:"";return N`
|
|
1093
1192
|
${t}
|
|
1094
1193
|
<slot></slot>
|
|
1095
|
-
`}}var
|
|
1194
|
+
`}}var mo,po,fo;go.styles=[a`
|
|
1096
1195
|
:host {
|
|
1097
|
-
--m-switcher-gap: ${
|
|
1098
|
-
--m-switcher-threshold: ${l(
|
|
1196
|
+
--m-switcher-gap: ${Bt(bo.gap)};
|
|
1197
|
+
--m-switcher-threshold: ${l(bo.threshold)};
|
|
1099
1198
|
|
|
1100
1199
|
display: flex;
|
|
1101
1200
|
flex-wrap: wrap;
|
|
@@ -1108,14 +1207,14 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1108
1207
|
flex-basis: calc((var(--m-switcher-threshold) - 100%) * 999);
|
|
1109
1208
|
flex-grow: 1;
|
|
1110
1209
|
}
|
|
1111
|
-
`],window.customElements.define("m-switcher",
|
|
1210
|
+
`],window.customElements.define("m-switcher",go);class $o extends ot{static get properties(){return{variant:{type:String},value:{type:Number},max:{type:Number}}}constructor(){super(),mo.add(this),this.variant="default",this.value=0,this.max=100}connectedCallback(){super.connectedCallback(),this.setAttribute("role","progressbar"),this.setAttribute("aria-valuemin","0")}updated(){this.setAttribute("aria-valuenow",String(this.value)),this.setAttribute("aria-valuemax",String(this.max))}get percentage(){return 100*t(this,mo,"a",fo)/t(this,mo,"a",po)}get currentVariant(){return this.variant}render(){return N`
|
|
1112
1211
|
<div class="bar">
|
|
1113
1212
|
<span
|
|
1114
1213
|
class=${lt({progress:!0,"-default":"default"===this.currentVariant,"-success":"success"===this.currentVariant,"-warning":"warning"===this.currentVariant,"-danger":"danger"===this.currentVariant})}
|
|
1115
|
-
style=${
|
|
1214
|
+
style=${xe({width:`${this.percentage}%`})}
|
|
1116
1215
|
></span>
|
|
1117
1216
|
</div>
|
|
1118
|
-
`}}
|
|
1217
|
+
`}}mo=new WeakSet,po=function(){return this.max<=0?100:this.max},fo=function(){return e=this.value,o=0,i=t(this,mo,"a",po),Math.min(Math.max(o,e),i);var e,o,i},$o.styles=[a`
|
|
1119
1218
|
.bar {
|
|
1120
1219
|
display: flex;
|
|
1121
1220
|
flex-grow: 0;
|
|
@@ -1129,7 +1228,7 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1129
1228
|
width: 100%;
|
|
1130
1229
|
height: ${ce("8px")};
|
|
1131
1230
|
|
|
1132
|
-
border-radius: ${
|
|
1231
|
+
border-radius: ${Bt("border-radius-s")};
|
|
1133
1232
|
}
|
|
1134
1233
|
|
|
1135
1234
|
.progress {
|
|
@@ -1137,11 +1236,11 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1137
1236
|
top: 0;
|
|
1138
1237
|
left: 0;
|
|
1139
1238
|
|
|
1140
|
-
${
|
|
1239
|
+
${It([{property:"width"},{property:"background"}])};
|
|
1141
1240
|
|
|
1142
1241
|
height: ${ce("8px")};
|
|
1143
1242
|
|
|
1144
|
-
border-radius: ${
|
|
1243
|
+
border-radius: ${Bt("border-radius-s")};
|
|
1145
1244
|
|
|
1146
1245
|
background: var(--m-progress-bar-progress-background);
|
|
1147
1246
|
}
|
|
@@ -1149,23 +1248,23 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1149
1248
|
.-default {
|
|
1150
1249
|
--m-progress-bar-progress-background: linear-gradient(
|
|
1151
1250
|
45deg,
|
|
1152
|
-
${
|
|
1153
|
-
${
|
|
1251
|
+
${Mt("color-brand-accent-1")} 22%,
|
|
1252
|
+
${Mt("color-brand-accent-2")} 88%
|
|
1154
1253
|
);
|
|
1155
1254
|
}
|
|
1156
1255
|
|
|
1157
1256
|
.-success {
|
|
1158
|
-
--m-progress-bar-progress-background: ${
|
|
1257
|
+
--m-progress-bar-progress-background: ${Mt("color-success-60")};
|
|
1159
1258
|
}
|
|
1160
1259
|
|
|
1161
1260
|
.-warning {
|
|
1162
|
-
--m-progress-bar-progress-background: ${
|
|
1261
|
+
--m-progress-bar-progress-background: ${Mt("color-warning-60")};
|
|
1163
1262
|
}
|
|
1164
1263
|
|
|
1165
1264
|
.-danger {
|
|
1166
|
-
--m-progress-bar-progress-background: ${
|
|
1265
|
+
--m-progress-bar-progress-background: ${Mt("color-danger-60")};
|
|
1167
1266
|
}
|
|
1168
|
-
`],window.customElements.define("m-progress-bar"
|
|
1267
|
+
`],window.customElements.define("m-progress-bar",$o);class yo extends $o{get currentVariant(){return this.percentage>=66?"success":this.percentage>=33?"warning":"danger"}}window.customElements.define("m-progress-bar-countdown",yo);const vo="m-check";var wo,xo,ko;class zo extends ot{static get properties(){return{value:{type:String},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0}}}constructor(){super(),wo.add(this),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio"),this.addEventListener("click",this.handleClick)}updated(e){super.updated(e),e.has("disabled")&&t(this,wo,"m",xo).call(this),e.has("checked")&&t(this,wo,"m",ko).call(this)}render(){return N`
|
|
1169
1268
|
<button
|
|
1170
1269
|
type="button"
|
|
1171
1270
|
class="radio-button"
|
|
@@ -1177,34 +1276,34 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1177
1276
|
<slot name="leading"></slot>
|
|
1178
1277
|
<slot></slot>
|
|
1179
1278
|
</button>
|
|
1180
|
-
`}handleClick(t){if(this.disabled)return t.preventDefault(),void t.stopPropagation();const e={detail:{value:this.value,type:"select"},bubbles:!0,composed:!1};this.dispatchEvent(new CustomEvent(
|
|
1279
|
+
`}handleClick(t){if(this.disabled)return t.preventDefault(),void t.stopPropagation();const e={detail:{value:this.value,type:"select"},bubbles:!0,composed:!1};this.dispatchEvent(new CustomEvent(vo,e))}}wo=new WeakSet,xo=function(){this.setAttribute("aria-disabled",String(this.disabled))},ko=function(){this.setAttribute("aria-checked",String(this.checked))},zo.styles=[a`
|
|
1181
1280
|
:host {
|
|
1182
|
-
--m-radio-border-color: ${
|
|
1183
|
-
--m-radio-dot-check-color: ${
|
|
1281
|
+
--m-radio-border-color: ${Mt("color-border")};
|
|
1282
|
+
--m-radio-dot-check-color: ${Mt("color-primary-60")};
|
|
1184
1283
|
--m-radio-size: 14px;
|
|
1185
1284
|
--m-radio-background-color: white;
|
|
1186
|
-
--m-radio-border-width: ${
|
|
1187
|
-
--m-radio-label-color: ${
|
|
1188
|
-
--m-radio-outline-color: ${
|
|
1285
|
+
--m-radio-border-width: ${Bt("border-thin")};
|
|
1286
|
+
--m-radio-label-color: ${Mt("color-text-tertiary")};
|
|
1287
|
+
--m-radio-outline-color: ${Mt("color-primary-60")};
|
|
1189
1288
|
--m-radio-outline-offset: 2px;
|
|
1190
1289
|
}
|
|
1191
1290
|
|
|
1192
1291
|
.radio-button {
|
|
1193
|
-
${
|
|
1292
|
+
${Vt("body-md")};
|
|
1194
1293
|
color: var(--m-radio-label-color);
|
|
1195
1294
|
|
|
1196
1295
|
border: none;
|
|
1197
1296
|
background: none;
|
|
1198
1297
|
|
|
1199
|
-
height: ${
|
|
1298
|
+
height: ${Bt("global-height-small")};
|
|
1200
1299
|
display: inline-flex;
|
|
1201
|
-
gap: ${
|
|
1300
|
+
gap: ${Bt("spacing-1")};
|
|
1202
1301
|
align-items: center;
|
|
1203
|
-
border-radius: ${
|
|
1204
|
-
${
|
|
1302
|
+
border-radius: ${Bt("border-radius-s")};
|
|
1303
|
+
${It({property:"color"})};
|
|
1205
1304
|
}
|
|
1206
1305
|
|
|
1207
|
-
${
|
|
1306
|
+
${Zt.focus(".radio-button")} {
|
|
1208
1307
|
outline: 1px solid var(--m-radio-outline-color);
|
|
1209
1308
|
outline-offset: var(--m-radio-outline-offset);
|
|
1210
1309
|
}
|
|
@@ -1220,7 +1319,7 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1220
1319
|
position: relative;
|
|
1221
1320
|
display: inline-flex;
|
|
1222
1321
|
|
|
1223
|
-
${
|
|
1322
|
+
${It({property:"border-color"})};
|
|
1224
1323
|
}
|
|
1225
1324
|
|
|
1226
1325
|
.radio-button .radio-input::before {
|
|
@@ -1233,7 +1332,7 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1233
1332
|
left: 50%;
|
|
1234
1333
|
display: block;
|
|
1235
1334
|
position: absolute;
|
|
1236
|
-
${
|
|
1335
|
+
${It([{property:"background-color"},{property:"height",duration:"120ms"},{property:"width",duration:"120ms"}])};
|
|
1237
1336
|
}
|
|
1238
1337
|
|
|
1239
1338
|
.radio-button[aria-checked='true'] .radio-input::before {
|
|
@@ -1241,18 +1340,18 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1241
1340
|
height: 10px;
|
|
1242
1341
|
}
|
|
1243
1342
|
|
|
1244
|
-
${
|
|
1343
|
+
${Jt(".radio-button")} {
|
|
1245
1344
|
cursor: default;
|
|
1246
|
-
--m-radio-label-color: ${
|
|
1247
|
-
--m-radio-background-color: ${
|
|
1345
|
+
--m-radio-label-color: ${Mt("color-neutral-40")};
|
|
1346
|
+
--m-radio-background-color: ${Mt("color-background-tertiary")};
|
|
1248
1347
|
}
|
|
1249
1348
|
|
|
1250
|
-
${
|
|
1251
|
-
--m-radio-border-color: ${
|
|
1349
|
+
${Jt('.radio-button[aria-checked="true"]',".radio-input")} {
|
|
1350
|
+
--m-radio-border-color: ${Mt("color-border")};
|
|
1252
1351
|
}
|
|
1253
1352
|
|
|
1254
|
-
${
|
|
1255
|
-
--m-radio-dot-check-color: ${
|
|
1353
|
+
${Jt(".radio-button",".radio-input::before")} {
|
|
1354
|
+
--m-radio-dot-check-color: ${Mt("color-neutral-40")};
|
|
1256
1355
|
}
|
|
1257
1356
|
|
|
1258
1357
|
.radio-button .radio-input::before {
|
|
@@ -1260,36 +1359,36 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1260
1359
|
}
|
|
1261
1360
|
|
|
1262
1361
|
.radio-button[aria-checked='true'] .radio-input {
|
|
1263
|
-
--m-radio-dot-check-color: ${
|
|
1264
|
-
--m-radio-border-color: ${
|
|
1362
|
+
--m-radio-dot-check-color: ${Mt("color-primary-60")};
|
|
1363
|
+
--m-radio-border-color: ${Mt("color-primary-60")};
|
|
1265
1364
|
}
|
|
1266
1365
|
|
|
1267
1366
|
.radio-button .radio-input {
|
|
1268
|
-
--m-radio-border-color: ${
|
|
1367
|
+
--m-radio-border-color: ${Mt("color-border")};
|
|
1269
1368
|
}
|
|
1270
1369
|
|
|
1271
|
-
${
|
|
1272
|
-
--m-radio-border-color: ${
|
|
1273
|
-
--m-radio-dot-check-color: ${
|
|
1370
|
+
${Zt.hover(".radio-button")} .radio-input {
|
|
1371
|
+
--m-radio-border-color: ${Mt("color-primary-100")};
|
|
1372
|
+
--m-radio-dot-check-color: ${Mt("color-primary-100")};
|
|
1274
1373
|
}
|
|
1275
1374
|
|
|
1276
|
-
${
|
|
1277
|
-
--m-radio-label-color: ${
|
|
1375
|
+
${Zt.hover(".radio-button")} {
|
|
1376
|
+
--m-radio-label-color: ${Mt("color-text-primary")};
|
|
1278
1377
|
}
|
|
1279
1378
|
|
|
1280
|
-
${
|
|
1379
|
+
${Jt(".radio-button","*")} {
|
|
1281
1380
|
pointer-event: none;
|
|
1282
1381
|
}
|
|
1283
|
-
`],window.customElements.define("m-radio",
|
|
1382
|
+
`],window.customElements.define("m-radio",zo);var So,Co={};Object.defineProperty(Co,"i",{value:!0});var jo,Ao,Wo,Eo,_o,Bo,Mo,Oo,To,Uo,No,Ro,qo,Po,Do=Ot;Co.SELECTION_TYPES=["single","single-strict","multiple"],So=Co.default=function(t){var e=t.type,o=void 0===e?"multiple":e;return"single"===o?{type:"single",init:function(t){return this.select(t,new Set)},select:function(t,e){var o=Do.toArray(t);if(0===o.length)return e;var i=new Set;return i.add(String(o[o.length-1])),i},unselect:function(t,e){var o=Do.toArray(t);if(0===o.length||0===e.size)return e;for(var i=new Set(e),r=0;r<o.length;r++)i.delete(String(o[r]));return i},toggle:function(t,e){var o=Do.toArray(t);if(0===o.length)return e;for(var i=new Set,r=0;r<o.length;r++){var n=String(o[r]);e.has(n)||(i.clear(),i.add(n))}return i},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"===o?{type:"single-strict",init:function(t){return this.select(t,new Set)},select:function(t,e){var o=Do.toArray(t);if(0===o.length)return e;var i=new Set;return i.add(String(o[o.length-1])),i},unselect:function(t,e){var o=Do.toArray(t);if(0===o.length||0===e.size)return e;for(var i=new Set(e),r=0;r<o.length&&e.size>1;r++)i.delete(String(o[r]));return i},toggle:function(t,e){var o=Do.toArray(t);if(0===o.length)return e;for(var i=new Set(e),r=0;r<o.length;r++){var n=String(o[r]);e.has(n)||(i.clear(),i.add(n))}return i},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,e){var o=Do.toArray(t);if(0===o.length)return e;for(var i=new Set(e),r=0;r<o.length;r++)i.add(String(o[r]));return i},unselect:function(t,e){var o=Do.toArray(t);if(0===o.length||0===e.size)return e;for(var i=new Set(e),r=0;r<o.length;r++)i.delete(String(o[r]));return i},toggle:function(t,e){var o=Do.toArray(t);if(0===o.length)return e;for(var i=new Set(e),r=0;r<o.length;r++){var n=String(o[r]);e.has(n)?i.delete(n):i.add(n)}return i},reset:function(t){return null==t?new Set:t},value:function(t){return null==t||0===t.size?null:Array.from(t)}}};class Go{constructor(e,o,i){jo.add(this),this.disabled=!1,this.event="m-select",Ao.set(this,(t=>{if(this.disabled)return;if(null==this.type)return void console.warn("[SelectionController] Did you forget to set the selection type?");const{detail:{type:e,value:o}}=t;switch(e){case"select":this.select(Tt(o));break;case"unselect":this.unselect(Tt(o));break;case"toggle":this.toggle(Tt(o))}})),this.init=t=>{this.host.selection=this.strategy.init(t)},this.select=e=>{this.host.selection=this.strategy.select(e,this.host.selection),t(this,jo,"m",Wo).call(this)},this.unselect=e=>{this.host.selection=this.strategy.unselect(e,this.host.selection),t(this,jo,"m",Wo).call(this)},this.toggle=e=>{this.host.selection=this.strategy.toggle(e,this.host.selection),t(this,jo,"m",Wo).call(this)},this.subscribe=()=>{this.host.addEventListener(this.event,t(this,Ao,"f"))},this.unsubscribe=()=>{this.host.removeEventListener(this.event,t(this,Ao,"f"))},this.host=e,this.type=o,this.event=i,this.strategy=So({type:o}),this.host.addController(this)}hostConnected(){this.subscribe()}hostDisconnected(){this.unsubscribe()}hostUpdate(){null!=this.host.type&&this.host.type!==this.type&&(this.unsubscribe(),this.host.removeController(this))}}Ao=new WeakMap,jo=new WeakSet,Wo=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 Lo extends ot{static get properties(){return{value:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},selection:{state:!0},orientation:{type:String}}}constructor(){super(),Eo.add(this),_o.set(this,null),Bo.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"),e(this,_o,new Go(this,this.type,vo),"f")}update(e){super.update(e),e.has("value")&&t(this,_o,"f").init(Tt(this.value||t(this,Eo,"m",Mo).call(this))),e.has("selection")&&([this.value]=this.selection)}updated(e){super.updated(e),e.has("selection")&&t(this,Eo,"m",Oo).call(this).forEach((e=>{t(this,Eo,"m",To).call(this,e)})),e.has("disabled")&&t(this,Eo,"m",Oo).call(this).forEach((e=>{t(this,Eo,"m",Uo).call(this,e)}))}render(){return N`
|
|
1284
1383
|
<div
|
|
1285
1384
|
class=${lt({"radio-group":!0,"-vertical":"vertical"===this.orientation,"-horizontal":"horizontal"===this.orientation})}
|
|
1286
1385
|
>
|
|
1287
1386
|
<slot></slot>
|
|
1288
1387
|
</div>
|
|
1289
|
-
`}}
|
|
1388
|
+
`}}_o=new WeakMap,Bo=new WeakMap,Eo=new WeakSet,Mo=function(){var e;return null===(e=t(this,Eo,"m",Oo).call(this)[0])||void 0===e?void 0:e.value},Oo=function(){return null==t(this,Bo,"f")&&e(this,Bo,this.shadowRoot.querySelector("slot"),"f"),[...t(this,Bo,"f").assignedElements({flatten:!0})].filter((t=>"m-radio"===t.tagName.toLowerCase()))},To=function(t){t.checked=this.selection.has(t.value)},Uo=function(t){t.disabled=this.disabled},Lo.styles=[a`
|
|
1290
1389
|
.radio-group {
|
|
1291
1390
|
display: flex;
|
|
1292
|
-
gap: ${
|
|
1391
|
+
gap: ${Bt("spacing-2")};
|
|
1293
1392
|
}
|
|
1294
1393
|
.radio-group.-vertical {
|
|
1295
1394
|
flex-direction: column;
|
|
@@ -1297,25 +1396,25 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1297
1396
|
.radio-group.-horizontal {
|
|
1298
1397
|
flex-direction: row;
|
|
1299
1398
|
}
|
|
1300
|
-
`],window.customElements.define("m-radio-group",Lo);class
|
|
1399
|
+
`],window.customElements.define("m-radio-group",Lo);class Io extends ot{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 N`
|
|
1301
1400
|
<span
|
|
1302
1401
|
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})}
|
|
1303
1402
|
>
|
|
1304
|
-
${this.isSkeleton?
|
|
1403
|
+
${this.isSkeleton?N``:N`<slot name="leading"></slot>`}
|
|
1305
1404
|
<slot></slot>
|
|
1306
1405
|
</span>
|
|
1307
|
-
`}}
|
|
1406
|
+
`}}Io.styles=[[a`
|
|
1308
1407
|
@keyframes skeleton-loading {
|
|
1309
1408
|
0% {
|
|
1310
|
-
background-color: ${
|
|
1409
|
+
background-color: ${Mt("color-background-tertiary")};
|
|
1311
1410
|
opacity: 0.3;
|
|
1312
1411
|
}
|
|
1313
1412
|
50% {
|
|
1314
|
-
background-color: ${
|
|
1413
|
+
background-color: ${Mt("color-background-tertiary")};
|
|
1315
1414
|
opacity: 0.6;
|
|
1316
1415
|
}
|
|
1317
1416
|
100% {
|
|
1318
|
-
background-color: ${
|
|
1417
|
+
background-color: ${Mt("color-background-tertiary")};
|
|
1319
1418
|
}
|
|
1320
1419
|
}
|
|
1321
1420
|
`,a`
|
|
@@ -1330,138 +1429,138 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1330
1429
|
box-sizing: border-box;
|
|
1331
1430
|
max-width: 200px;
|
|
1332
1431
|
border-radius: 100px;
|
|
1333
|
-
line-height: ${
|
|
1432
|
+
line-height: ${Bt("line-height-1")};
|
|
1334
1433
|
cursor: default;
|
|
1335
1434
|
}
|
|
1336
1435
|
|
|
1337
1436
|
.tag slot[name='leading']::slotted(*) {
|
|
1338
|
-
margin-inline-end: ${
|
|
1437
|
+
margin-inline-end: ${Bt("spacing-1")};
|
|
1339
1438
|
vertical-align: middle;
|
|
1340
1439
|
}
|
|
1341
1440
|
|
|
1342
1441
|
.-size-small {
|
|
1343
|
-
${
|
|
1344
|
-
padding: ${
|
|
1442
|
+
${Vt("chips-sm")};
|
|
1443
|
+
padding: ${Bt("spacing-1")} ${Bt("spacing-2")};
|
|
1345
1444
|
block-size: ${ce("18px")};
|
|
1346
1445
|
}
|
|
1347
1446
|
.-size-default {
|
|
1348
|
-
${
|
|
1349
|
-
padding: ${
|
|
1350
|
-
block-size: ${
|
|
1447
|
+
${Vt("chips-md")};
|
|
1448
|
+
padding: ${Bt("spacing-2")} ${Bt("spacing-3")};
|
|
1449
|
+
block-size: ${Bt("global-height-small")};
|
|
1351
1450
|
}
|
|
1352
1451
|
.-size-large {
|
|
1353
|
-
${
|
|
1354
|
-
padding: ${
|
|
1355
|
-
block-size: ${
|
|
1452
|
+
${Vt("button-lg")};
|
|
1453
|
+
padding: ${Bt("spacing-3")} ${Bt("spacing-4")};
|
|
1454
|
+
block-size: ${Bt("global-height-default")};
|
|
1356
1455
|
}
|
|
1357
1456
|
|
|
1358
1457
|
.-success {
|
|
1359
|
-
color: ${
|
|
1360
|
-
background: ${
|
|
1458
|
+
color: ${Mt("color-success-60")};
|
|
1459
|
+
background: ${Mt("color-success-20")};
|
|
1361
1460
|
}
|
|
1362
1461
|
.-neutral {
|
|
1363
|
-
color: ${
|
|
1364
|
-
background: ${
|
|
1462
|
+
color: ${Mt("color-text-tertiary")};
|
|
1463
|
+
background: ${Mt("color-background-tertiary")};
|
|
1365
1464
|
}
|
|
1366
1465
|
.-warning {
|
|
1367
|
-
color: ${
|
|
1368
|
-
background: ${
|
|
1466
|
+
color: ${Mt("color-warning-100")};
|
|
1467
|
+
background: ${Mt("color-warning-20")};
|
|
1369
1468
|
}
|
|
1370
1469
|
.-danger {
|
|
1371
|
-
color: ${
|
|
1372
|
-
background: ${
|
|
1470
|
+
color: ${Mt("color-danger-60")};
|
|
1471
|
+
background: ${Mt("color-danger-20")};
|
|
1373
1472
|
}
|
|
1374
1473
|
|
|
1375
1474
|
.-is-skeleton {
|
|
1376
1475
|
${l("animation: skeleton-loading 1s linear infinite alternate;")};
|
|
1377
1476
|
width: var(--m-tag-skeleton-width);
|
|
1378
1477
|
}
|
|
1379
|
-
`]],window.customElements.define("m-tag",
|
|
1478
|
+
`]],window.customElements.define("m-tag",Io);class Vo extends ne{static get properties(){return{clearable:{type:Boolean},disabled:{type:Boolean,reflect:!0},max:{type:String},maxLength:{type:Number,reflect:!0,attribute:"max-length"},min:{type:String},minLength:{type:Number,reflect:!0,attribute:"min-length"},pattern:{type:String},placeholder:{type:String},readOnly:{type:Boolean,reflect:!0,attribute:"read-only"},size:{type:String},step:{type:String},type:{type:String},value:{type:String}}}constructor(){super(),No.add(this),this.inputElement=null,this.clearable=!1,this.disabled=!1,this.placeholder=void 0,this.size="default",this.type="text",this.value=void 0,this.max=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","textbox")}render(){return N`
|
|
1380
1479
|
<div
|
|
1381
1480
|
class=${lt({container:!0,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size,"is-disabled":Boolean(this.disabled)})}
|
|
1382
1481
|
>
|
|
1383
1482
|
<slot name="leading"></slot>
|
|
1384
1483
|
<input
|
|
1385
|
-
id="${
|
|
1386
|
-
type="${
|
|
1484
|
+
id="${se(this.id)}"
|
|
1485
|
+
type="${se(this.type)}"
|
|
1387
1486
|
class="text-field"
|
|
1388
1487
|
aria-disabled=${this.disabled?"true":"false"}
|
|
1389
1488
|
?disabled="${this.disabled}"
|
|
1390
1489
|
?readonly=${this.readOnly}
|
|
1391
|
-
max=${this.max||
|
|
1392
|
-
maxlength=${null!=this.maxLength&&this.maxLength>-1?this.maxLength:
|
|
1393
|
-
min=${this.min||
|
|
1394
|
-
minlength=${null!=this.minLength&&this.minLength>-1?this.minLength:
|
|
1395
|
-
pattern=${
|
|
1396
|
-
placeholder="${
|
|
1397
|
-
step=${this.step||
|
|
1398
|
-
value="${
|
|
1490
|
+
max=${this.max||q}
|
|
1491
|
+
maxlength=${null!=this.maxLength&&this.maxLength>-1?this.maxLength:q}
|
|
1492
|
+
min=${this.min||q}
|
|
1493
|
+
minlength=${null!=this.minLength&&this.minLength>-1?this.minLength:q}
|
|
1494
|
+
pattern=${se(this.pattern)}
|
|
1495
|
+
placeholder="${se(this.placeholder)}"
|
|
1496
|
+
step=${this.step||q}
|
|
1497
|
+
value="${se(this.value)}"
|
|
1399
1498
|
@change=${this.reemit}
|
|
1400
|
-
@input=${t(this,
|
|
1499
|
+
@input=${t(this,No,"m",qo)}
|
|
1401
1500
|
/>
|
|
1402
|
-
${this.clearable?
|
|
1403
|
-
class=${lt({clear:!0,"is-visible":t(this,
|
|
1404
|
-
controls="${
|
|
1405
|
-
@m-close=${t(this,
|
|
1501
|
+
${this.clearable?N`<m-close-button
|
|
1502
|
+
class=${lt({clear:!0,"is-visible":t(this,No,"m",Ro).call(this)})}
|
|
1503
|
+
controls="${se(this.id)}"
|
|
1504
|
+
@m-close=${t(this,No,"m",Po)}
|
|
1406
1505
|
label="Clear input"
|
|
1407
|
-
></m-close-button>`:
|
|
1506
|
+
></m-close-button>`:q}
|
|
1408
1507
|
<slot name="trailing"></slot>
|
|
1409
1508
|
</div>
|
|
1410
|
-
`}get input(){var t,e;return null==this.inputElement&&(this.inputElement=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("input"))&&void 0!==e?e:null),this.inputElement}clear(){this.value="",this.input&&(this.input.value=""),this.emit("m-clear"),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}
|
|
1509
|
+
`}get input(){var t,e;return null==this.inputElement&&(this.inputElement=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("input"))&&void 0!==e?e:null),this.inputElement}clear(){this.value="",this.input&&(this.input.value=""),this.emit("m-clear"),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}No=new WeakSet,Ro=function(){const t=this.value||"";return!this.disabled&&t.length>0},qo=function(t){this.value=t.target.value,this.reemit(t)},Po=function(t){t.stopPropagation(),this.clear()},Vo.styles=[a`
|
|
1411
1510
|
:host {
|
|
1412
1511
|
--m-text-field-background-color: transparent;
|
|
1413
|
-
--m-text-field-border-color: ${
|
|
1414
|
-
--m-text-field-height: ${
|
|
1415
|
-
--m-text-field-outline-color: ${
|
|
1512
|
+
--m-text-field-border-color: ${Mt("color-border")};
|
|
1513
|
+
--m-text-field-height: ${Bt("global-height-default")};
|
|
1514
|
+
--m-text-field-outline-color: ${Mt("color-primary-100")};
|
|
1416
1515
|
--m-text-field-outline-offset: 2px;
|
|
1417
|
-
--m-text-field-padding-y: ${
|
|
1418
|
-
--m-text-field-placeholder-color: ${
|
|
1419
|
-
--m-text-field-color: ${
|
|
1516
|
+
--m-text-field-padding-y: ${Bt("spacing-2")};
|
|
1517
|
+
--m-text-field-placeholder-color: ${Mt("color-text-placeholder")};
|
|
1518
|
+
--m-text-field-color: ${Mt("color-text-primary")};
|
|
1420
1519
|
}
|
|
1421
1520
|
|
|
1422
1521
|
.container {
|
|
1423
|
-
${
|
|
1424
|
-
${
|
|
1522
|
+
${Vt("body-md")};
|
|
1523
|
+
${It([{property:"background-color"},{property:"border-color"}])};
|
|
1425
1524
|
|
|
1426
1525
|
display: inline-flex;
|
|
1427
1526
|
align-items: center;
|
|
1428
1527
|
justify-content: start;
|
|
1429
|
-
gap: ${
|
|
1528
|
+
gap: ${Bt("spacing-2")};
|
|
1430
1529
|
|
|
1431
1530
|
position: relative;
|
|
1432
1531
|
box-sizing: border-box;
|
|
1433
1532
|
width: 100%;
|
|
1434
1533
|
block-size: var(--m-text-field-height);
|
|
1435
1534
|
|
|
1436
|
-
${
|
|
1535
|
+
${Pt(Bt("spacing-2"))};
|
|
1437
1536
|
|
|
1438
1537
|
background-color: var(--m-text-field-background-color);
|
|
1439
|
-
border-radius: ${
|
|
1538
|
+
border-radius: ${Bt("border-radius-s")};
|
|
1440
1539
|
border: 1px solid var(--m-text-field-border-color);
|
|
1441
1540
|
}
|
|
1442
1541
|
|
|
1443
1542
|
.container.-size-small {
|
|
1444
|
-
--m-text-field-height: ${
|
|
1543
|
+
--m-text-field-height: ${Bt("global-height-small")};
|
|
1445
1544
|
--m-text-field-padding-y: 0;
|
|
1446
1545
|
}
|
|
1447
1546
|
|
|
1448
1547
|
.container.-size-small,
|
|
1449
1548
|
.container.-size-small .text-field {
|
|
1450
|
-
${
|
|
1549
|
+
${Vt("body-sm")};
|
|
1451
1550
|
}
|
|
1452
1551
|
|
|
1453
1552
|
.container.-size-large {
|
|
1454
|
-
--m-text-field-height: ${
|
|
1455
|
-
--m-text-field-padding-y: ${
|
|
1553
|
+
--m-text-field-height: ${Bt("global-height-large")};
|
|
1554
|
+
--m-text-field-padding-y: ${Bt("spacing-3")};
|
|
1456
1555
|
}
|
|
1457
1556
|
|
|
1458
|
-
${
|
|
1459
|
-
--m-text-field-background-color: ${
|
|
1557
|
+
${Jt(".container")} {
|
|
1558
|
+
--m-text-field-background-color: ${Mt("color-background-tertiary")};
|
|
1460
1559
|
|
|
1461
1560
|
cursor: default;
|
|
1462
1561
|
}
|
|
1463
1562
|
|
|
1464
|
-
${
|
|
1563
|
+
${Jt(".container","*")} {
|
|
1465
1564
|
pointer-events: none;
|
|
1466
1565
|
}
|
|
1467
1566
|
|
|
@@ -1473,25 +1572,25 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1473
1572
|
cursor: default;
|
|
1474
1573
|
}
|
|
1475
1574
|
|
|
1476
|
-
${
|
|
1477
|
-
--m-text-field-border-color: ${
|
|
1575
|
+
${Zt.hover(".container")} {
|
|
1576
|
+
--m-text-field-border-color: ${Mt("color-primary-60")};
|
|
1478
1577
|
}
|
|
1479
1578
|
|
|
1480
|
-
${
|
|
1481
|
-
--m-text-field-border-color: ${
|
|
1579
|
+
${Zt.focus(".container")} {
|
|
1580
|
+
--m-text-field-border-color: ${Mt("color-primary-60")};
|
|
1482
1581
|
|
|
1483
1582
|
outline: 1px solid var(--m-text-field-outline-color);
|
|
1484
1583
|
outline-offset: var(--m-text-field-outline-offset);
|
|
1485
1584
|
}
|
|
1486
1585
|
|
|
1487
1586
|
.text-field {
|
|
1488
|
-
${
|
|
1587
|
+
${Vt("body-md")};
|
|
1489
1588
|
|
|
1490
1589
|
border: none;
|
|
1491
1590
|
outline: none;
|
|
1492
1591
|
flex: 1;
|
|
1493
1592
|
|
|
1494
|
-
${
|
|
1593
|
+
${Pt(0)};
|
|
1495
1594
|
padding-block: var(--m-text-field-padding-y);
|
|
1496
1595
|
|
|
1497
1596
|
background-color: var(--m-text-field-background-color);
|
|
@@ -1502,8 +1601,8 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1502
1601
|
color: var(--m-text-field-placeholder-color);
|
|
1503
1602
|
}
|
|
1504
1603
|
|
|
1505
|
-
${
|
|
1506
|
-
${
|
|
1604
|
+
${Zt.active(".text-field")},
|
|
1605
|
+
${Zt.focus(".text-field")} {
|
|
1507
1606
|
-webkit-appearance: none;
|
|
1508
1607
|
background: none;
|
|
1509
1608
|
border: none;
|
|
@@ -1517,40 +1616,40 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1517
1616
|
.clear.is-visible {
|
|
1518
1617
|
visibility: visible;
|
|
1519
1618
|
}
|
|
1520
|
-
`],window.customElements.define("m-text-field",
|
|
1619
|
+
`],window.customElements.define("m-text-field",Vo);const Jo="m-toggle";var Zo,Fo,Ho,Ko,Qo,Xo,Yo,ti,ei,oi,ii;class ri extends ot{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(),Zo.add(this),Fo.set(this,null),Ho.set(this,null),this.showCheck=!1,this.size="default",this.type="single",this.selection=new Set}update(o){super.update(o),(null!=o.get("type")&&null!=this.type||null==t(this,Fo,"f"))&&(e(this,Fo,new Go(this,this.type,Jo),"f"),t(this,Fo,"f").init(Tt(this.value)),this.role=["single","single-strict"].includes(this.type)?"radiogroup":"group"),o.has("value")&&t(this,Fo,"f").init(Tt(this.value))}updated(e){super.updated(e),e.has("selection")&&t(this,Zo,"m",Ko).call(this).forEach((e=>{t(this,Zo,"m",Xo).call(this,e)})),e.has("disabled")&&t(this,Zo,"m",Ko).call(this).forEach((e=>{t(this,Zo,"m",Yo).call(this,e)})),e.has("role")&&t(this,Zo,"m",Ko).call(this).forEach((e=>{t(this,Zo,"m",Qo).call(this,e)}))}render(){return N`
|
|
1521
1620
|
<m-group
|
|
1522
1621
|
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})}
|
|
1523
1622
|
gap="spacing-1"
|
|
1524
1623
|
>
|
|
1525
1624
|
<slot></slot>
|
|
1526
1625
|
</m-group>
|
|
1527
|
-
`}}
|
|
1626
|
+
`}}Fo=new WeakMap,Ho=new WeakMap,Zo=new WeakSet,Ko=function(){return null==t(this,Ho,"f")&&e(this,Ho,this.shadowRoot.querySelector("slot"),"f"),[...t(this,Ho,"f").assignedElements({flatten:!0})].filter((t=>"m-toggle"===t.tagName.toLowerCase()))},Qo=function(t){t.setAttribute("role",["single","single-strict"].includes(this.type)?"radio":"checkbox")},Xo=function(t){t.checked=this.selection.has(t.value)},Yo=function(t){t.disabled=this.disabled},ri.styles=[[a`
|
|
1528
1627
|
.toggle-group {
|
|
1529
1628
|
inline-size: max-content;
|
|
1530
1629
|
|
|
1531
|
-
border: 1px solid ${
|
|
1532
|
-
padding: ${
|
|
1630
|
+
border: 1px solid ${Mt("color-border")};
|
|
1631
|
+
padding: ${Bt("spacing-1")};
|
|
1533
1632
|
|
|
1534
|
-
border-radius: ${
|
|
1633
|
+
border-radius: ${Bt("border-radius-s")};
|
|
1535
1634
|
box-sizing: border-box;
|
|
1536
1635
|
|
|
1537
|
-
block-size: ${
|
|
1636
|
+
block-size: ${Bt("global-height-default")};
|
|
1538
1637
|
}
|
|
1539
1638
|
|
|
1540
1639
|
.toggle-group.-small {
|
|
1541
|
-
block-size: ${
|
|
1640
|
+
block-size: ${Bt("global-height-small")};
|
|
1542
1641
|
}
|
|
1543
1642
|
|
|
1544
1643
|
.toggle-group.-small ::slotted(m-toggle) {
|
|
1545
1644
|
--m-toggle-base-size: 18px;
|
|
1546
|
-
--m-toggle-font-size: ${
|
|
1645
|
+
--m-toggle-font-size: ${Bt("font-size-2")};
|
|
1547
1646
|
--m-toggle-icon-size: 10px;
|
|
1548
1647
|
}
|
|
1549
1648
|
|
|
1550
1649
|
.toggle-group.-show-check ::slotted(m-toggle[aria-checked='true']) {
|
|
1551
1650
|
--m-toggle-icon-display: inline-flex;
|
|
1552
1651
|
}
|
|
1553
|
-
`]],window.customElements.define("m-toggle-group",
|
|
1652
|
+
`]],window.customElements.define("m-toggle-group",ri);class ni extends ot{static get properties(){return{checked:{type:Boolean},disabled:{type:Boolean,reflect:!0},role:{type:String,reflect:!0},value:{type:String}}}constructor(){super(),ti.add(this),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t(this,ti,"m",ei))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,ti,"m",ei))}updated(e){super.updated(e),e.has("disabled")&&t(this,ti,"m",oi).call(this),e.has("checked")&&t(this,ti,"m",ii).call(this)}render(){return N`
|
|
1554
1653
|
<button
|
|
1555
1654
|
type="button"
|
|
1556
1655
|
class=${lt({button:!0,toggle:!0})}
|
|
@@ -1559,67 +1658,52 @@ const he=Symbol.for(""),ge=t=>{if((null==t?void 0:t.r)===he)return null==t?void
|
|
|
1559
1658
|
?disabled="${this.disabled}"
|
|
1560
1659
|
>
|
|
1561
1660
|
<slot name="leading" slot="leading">
|
|
1562
|
-
|
|
1563
|
-
<svg
|
|
1564
|
-
class="check-icon"
|
|
1565
|
-
viewBox="0 0 48 48"
|
|
1566
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
1567
|
-
>
|
|
1568
|
-
<path
|
|
1569
|
-
fill-rule="evenodd"
|
|
1570
|
-
clip-rule="evenodd"
|
|
1571
|
-
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"
|
|
1572
|
-
/>
|
|
1573
|
-
</svg>
|
|
1661
|
+
<m-icon name="check" class="check-icon"></m-icon>
|
|
1574
1662
|
</slot>
|
|
1575
1663
|
|
|
1576
1664
|
<slot></slot>
|
|
1577
1665
|
</button>
|
|
1578
|
-
`}}
|
|
1666
|
+
`}}ti=new WeakSet,ei=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(Jo,t))},oi=function(){this.setAttribute("aria-disabled",String(this.disabled))},ii=function(){this.setAttribute("aria-checked",String(this.checked))},ni.styles=[[Ft(),a`
|
|
1579
1667
|
:host {
|
|
1580
1668
|
/*
|
|
1581
1669
|
* These custom properties are here because they are meant to be
|
|
1582
1670
|
* overriden via toggle-group styles.
|
|
1583
1671
|
*/
|
|
1584
1672
|
--m-toggle-base-size: 30px;
|
|
1585
|
-
--m-toggle-font-size: ${
|
|
1673
|
+
--m-toggle-font-size: ${Bt("font-size-3")};
|
|
1586
1674
|
--m-toggle-icon-size: 12px;
|
|
1587
1675
|
--m-toggle-icon-display: none;
|
|
1588
1676
|
}
|
|
1589
1677
|
|
|
1590
1678
|
.toggle {
|
|
1591
1679
|
--m-button-border-color: transparent;
|
|
1592
|
-
--m-button-color: ${
|
|
1593
|
-
--m-button-padding-x: ${
|
|
1680
|
+
--m-button-color: ${Mt("color-primary-100")};
|
|
1681
|
+
--m-button-padding-x: ${Bt("spacing-2")};
|
|
1594
1682
|
--m-button-padding-y: 0;
|
|
1595
1683
|
|
|
1596
1684
|
--m-button-base-size: var(--m-toggle-base-size);
|
|
1597
1685
|
--m-button-font-size: var(--m-toggle-font-size);
|
|
1598
1686
|
}
|
|
1599
1687
|
|
|
1600
|
-
${
|
|
1601
|
-
--m-button-color: ${
|
|
1688
|
+
${Jt([".toggle"])} {
|
|
1689
|
+
--m-button-color: ${Mt("color-text-disabled")};
|
|
1602
1690
|
}
|
|
1603
1691
|
|
|
1604
1692
|
[aria-checked='true'] {
|
|
1605
|
-
--m-button-background-color: ${
|
|
1693
|
+
--m-button-background-color: ${Mt("color-primary-20")};
|
|
1606
1694
|
}
|
|
1607
1695
|
|
|
1608
|
-
${
|
|
1609
|
-
--m-button-background-color: ${
|
|
1610
|
-
--m-button-border-color: ${
|
|
1611
|
-
--m-button-color: ${
|
|
1696
|
+
${Zt.hover(".toggle")} {
|
|
1697
|
+
--m-button-background-color: ${Mt("color-background-tertiary")};
|
|
1698
|
+
--m-button-border-color: ${Mt("color-background-tertiary")};
|
|
1699
|
+
--m-button-color: ${Mt("color-primary-100")};
|
|
1612
1700
|
}
|
|
1613
1701
|
|
|
1614
1702
|
.check-icon {
|
|
1615
|
-
|
|
1703
|
+
--m-icon-size: var(--m-toggle-icon-size);
|
|
1704
|
+
--m-icon-color: var(--m-button-color);
|
|
1616
1705
|
|
|
1617
1706
|
display: var(--m-toggle-icon-display);
|
|
1618
|
-
color: var(--m-button-color);
|
|
1619
|
-
fill: var(--m-button-color);
|
|
1620
|
-
|
|
1621
|
-
block-size: var(--m-toggle-icon-size);
|
|
1622
|
-
inline-size: var(--m-toggle-icon-size);
|
|
1623
1707
|
}
|
|
1624
|
-
`]],window.customElements.define("m-toggle",
|
|
1708
|
+
`]],window.customElements.define("m-toggle",ni);export{io as ALIGN_ITEMS_VALUES,Ae as Banner,Yt as BannerActionPrimary,te as BannerActionSecondary,ee as BannerActions,oe as BannerDescription,ie as BannerIcon,re as BannerTitle,so as Box,Xt as Button,We as Card,Ee as CardBody,_e as CardSubtitle,Be as CardTitle,Ne as Checkbox,pe as CloseButton,Re as Divider,oo as Field,to as FieldHint,eo as FieldLabel,ao as Grid,Je as Group,ro as JUSTIFY_CONTENT_VALUES,$o as ProgressBar,yo as ProgressBarCountdown,zo as Radio,Lo as RadioGroup,uo as Sidebar,Fe as Stack,go as Switcher,Io as Tag,ze as Text,Vo as TextField,ni as Toggle,ri as ToggleGroup,no as defaultBoxProps,lo as defaultGridProps,Ve as defaultGroupProps,co as defaultSidebarProps,Ze as defaultStackProps,bo as defaultSwitcherProps};
|
|
1625
1709
|
//# sourceMappingURL=index.js.map
|