@loadsmart/miranda-wc 1.67.0 → 1.69.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/{arrow-left-44d38870.js → arrow-left-3c2480fa.js} +2 -2
- package/dist/arrow-left-3c2480fa.js.map +1 -0
- package/dist/{attention-8d81d2de.js → attention-80aa9222.js} +2 -2
- package/dist/attention-80aa9222.js.map +1 -0
- package/dist/{bell-4b877090.js → bell-af7bf949.js} +2 -2
- package/dist/bell-af7bf949.js.map +1 -0
- package/dist/{check-24a36c75.js → check-a601865a.js} +2 -2
- package/dist/check-a601865a.js.map +1 -0
- package/dist/{close-23b7e2f1.js → close-4547f028.js} +2 -2
- package/dist/close-4547f028.js.map +1 -0
- package/dist/components/empty-state/empty-state-action.d.ts +13 -0
- package/dist/components/empty-state/empty-state-action.d.ts.map +1 -0
- package/dist/components/empty-state/empty-state-header.d.ts +13 -0
- package/dist/components/empty-state/empty-state-header.d.ts.map +1 -0
- package/dist/components/empty-state/empty-state-illustration.d.ts +11 -0
- package/dist/components/empty-state/empty-state-illustration.d.ts.map +1 -0
- package/dist/components/empty-state/empty-state-message.d.ts +13 -0
- package/dist/components/empty-state/empty-state-message.d.ts.map +1 -0
- package/dist/components/empty-state/empty-state.context.d.ts +8 -0
- package/dist/components/empty-state/empty-state.context.d.ts.map +1 -0
- package/dist/components/empty-state/empty-state.d.ts +47 -0
- package/dist/components/empty-state/empty-state.d.ts.map +1 -0
- package/dist/components/empty-state/empty-state.styles.d.ts +3 -0
- package/dist/components/empty-state/empty-state.styles.d.ts.map +1 -0
- package/dist/components/empty-state/empty-state.types.d.ts +3 -0
- package/dist/components/empty-state/empty-state.types.d.ts.map +1 -0
- package/dist/components/empty-state/empty-state.utils.d.ts +4 -0
- package/dist/components/empty-state/empty-state.utils.d.ts.map +1 -0
- package/dist/components/empty-state/index.d.ts +8 -0
- package/dist/components/empty-state/index.d.ts.map +1 -0
- package/dist/components/layout/layout.constants.d.ts +1 -1
- package/dist/components/layout/layout.constants.d.ts.map +1 -1
- package/dist/{indeterminate-1855f9d2.js → indeterminate-70758df5.js} +2 -2
- package/dist/{indeterminate-1855f9d2.js.map → indeterminate-70758df5.js.map} +1 -1
- package/dist/{index-5118a172.js → index-f37d4ad2.js} +250 -91
- package/dist/index-f37d4ad2.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/{info-circle-4cb0c861.js → info-circle-ceb49634.js} +2 -2
- package/dist/{info-circle-4cb0c861.js.map → info-circle-ceb49634.js.map} +1 -1
- package/package.json +1 -1
- package/dist/arrow-left-44d38870.js.map +0 -1
- package/dist/attention-8d81d2de.js.map +0 -1
- package/dist/bell-4b877090.js.map +0 -1
- package/dist/check-24a36c75.js.map +0 -1
- package/dist/close-23b7e2f1.js.map +0 -1
- package/dist/index-5118a172.js.map +0 -1
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const t$7=window,e$9=t$7.ShadowRoot&&(void 0===t$7.ShadyCSS||t$7.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$8=Symbol(),n$
|
|
6
|
+
const t$7=window,e$9=t$7.ShadowRoot&&(void 0===t$7.ShadyCSS||t$7.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$8=Symbol(),n$9=new WeakMap;let o$8=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==s$8)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(e$9&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=n$9.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&n$9.set(e,t))}return t}toString(){return this.cssText}};const r$5=t=>new o$8("string"==typeof t?t:t+"",void 0,s$8),i$4=(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 o$8(o,t,s$8)},S$1=(t,e)=>{e$9?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const o=document.createElement("style"),i=t$7.litNonce;void 0!==i&&o.setAttribute("nonce",i),o.textContent=e.cssText,t.appendChild(o)}))},c$1=e$9?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return r$5(e)})(t):t
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/;var s$7;const e$8=window,r$4=e$8.trustedTypes,h$
|
|
11
|
+
*/;var s$7;const e$8=window,r$4=e$8.trustedTypes,h$2=r$4?r$4.emptyScript:"",o$7=e$8.reactiveElementPolyfillSupport,n$8={toAttribute(t,e){switch(e){case Boolean:t=t?h$2: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}},a$3=(t,e)=>e!==t&&(e==e||t==t),l$5={attribute:!0,type:String,converter:n$8,reflect:!1,hasChanged:a$3},d$1="finalized";let u$1=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=l$5){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)||l$5}static finalize(){if(this.hasOwnProperty(d$1))return!1;this[d$1]=!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$1(t))}else void 0!==t&&e.push(c$1(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 S$1(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=l$5){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:n$8).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:n$8;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||a$3)(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 t$6;u$1[d$
|
|
17
|
+
var t$6;u$1[d$1]=!0,u$1.elementProperties=new Map,u$1.elementStyles=[],u$1.shadowRootOptions={mode:"open"},null==o$7||o$7({ReactiveElement:u$1}),(null!==(s$7=e$8.reactiveElementVersions)&&void 0!==s$7?s$7:e$8.reactiveElementVersions=[]).push("1.6.2");const i$3=window,s$6=i$3.trustedTypes,e$7=s$6?s$6.createPolicy("lit-html",{createHTML:t=>t}):void 0,o$6="$lit$",n$7=`lit$${(Math.random()+"").slice(9)}$`,l$4="?"+n$7,h$1=`<${l$4}>`,r$3=document,u=()=>r$3.createComment(""),d=t=>null===t||"object"!=typeof t&&"function"!=typeof t,c=Array.isArray,v=t=>c(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),a$2="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_$1=/-->/g,m$2=/>/g,p$1=RegExp(`>|${a$2}(?:([^\\s"'>=/]+)(${a$2}*=${a$2}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,y=/^(?:script|style|textarea|title)$/i,w=t=>(e,...o)=>({_$litType$:t,strings:e,values:o}),x=w(1),b=w(2),T=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),E=new WeakMap,C=r$3.createTreeWalker(r$3,129,null,!1);function P(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==e$7?e$7.createHTML(e):e}const V=(t,e)=>{const o=t.length-1,i=[];let r,n=2===e?"<svg>":"",s=f;for(let e=0;e<o;e++){const o=t[e];let a,l,c=-1,d=0;for(;d<o.length&&(s.lastIndex=d,l=s.exec(o),null!==l);)d=s.lastIndex,s===f?"!--"===l[1]?s=_$1:void 0!==l[1]?s=m$2:void 0!==l[2]?(y.test(l[2])&&(r=RegExp("</"+l[2],"g")),s=p$1):void 0!==l[3]&&(s=p$1):s===p$1?">"===l[0]?(s=null!=r?r:f,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?p$1:'"'===l[3]?$:g):s===$||s===g?s=p$1:s===_$1||s===m$2?s=f:(s=p$1,r=void 0);const u=s===p$1&&t[e+1].startsWith("/>")?" ":"";n+=s===f?o+h$1:c>=0?(i.push(a),o.slice(0,c)+o$6+o.slice(c)+n$7+u):o+n$7+(-2===c?(i.push(void 0),e):u)}return[P(t,n+(t[o]||"<?>")+(2===e?"</svg>":"")),i]};class N{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let r=0,n=0;const s=t.length-1,a=this.parts,[l,c]=V(t,e);if(this.el=N.createElement(l,o),C.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=C.nextNode())&&a.length<s;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith(o$6)||e.startsWith(n$7)){const o=c[n++];if(t.push(e),void 0!==o){const t=i.getAttribute(o.toLowerCase()+o$6).split(n$7),e=/([.?@])?(.*)/.exec(o);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?H:"?"===e[1]?L:"@"===e[1]?z:k})}else a.push({type:6,index:r})}for(const e of t)i.removeAttribute(e)}if(y.test(i.tagName)){const t=i.textContent.split(n$7),e=t.length-1;if(e>0){i.textContent=s$6?s$6.emptyScript:"";for(let o=0;o<e;o++)i.append(t[o],u()),C.nextNode(),a.push({type:2,index:++r});i.append(t[e],u())}}}else if(8===i.nodeType)if(i.data===l$4)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(n$7,t+1));)a.push({type:7,index:r}),t+=n$7.length-1}r++}}static createElement(t,e){const o=r$3.createElement("template");return o.innerHTML=t,o}}function S(t,e,o=t,i){var r,n,s,a;if(e===T)return e;let l=void 0!==i?null===(r=o._$Co)||void 0===r?void 0:r[i]:o._$Cl;const c=d(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,o,i)),void 0!==i?(null!==(s=(a=o)._$Co)&&void 0!==s?s:a._$Co=[])[i]=l:o._$Cl=l),void 0!==l&&(e=S(t,l._$AS(t,e.values),l,i)),e}class M{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:o},parts:i}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:r$3).importNode(o,!0);C.currentNode=r;let n=C.nextNode(),s=0,a=0,l=i[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new R(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new Z(n,this,t)),this._$AV.push(e),l=i[++a]}s!==(null==l?void 0:l.index)&&(n=C.nextNode(),s++)}return C.currentNode=r$3,r}v(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class R{constructor(t,e,o,i){var r;this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cp=null===(r=null==i?void 0:i.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),d(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):v(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==A&&d(this._$AH)?this._$AA.nextSibling.data=t:this.$(r$3.createTextNode(t)),this._$AH=t}g(t){var e;const{values:o,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=N.createElement(P(i.h,i.h[0]),this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(o);else{const t=new M(r,this),e=t.u(this.options);t.v(o),this.$(e),this._$AH=t}}_$AC(t){let e=E.get(t.strings);return void 0===e&&E.set(t.strings,e=new N(t)),e}T(t){c(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 R(this.k(u()),this.k(u()),this,this.options)):o=e[i],o._$AI(r),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var o;for(null===(o=this._$AP)||void 0===o||o.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class k{constructor(t,e,o,i,r){this.type=1,this._$AH=A,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=A}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=S(this,t,e,0),n=!d(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else{const i=t;let s,a;for(t=r[0],s=0;s<r.length-1;s++)a=S(this,i[o+s],e,s),a===T&&(a=this._$AH[s]),n||(n=!d(a)||a!==this._$AH[s]),a===A?t=A:t!==A&&(t+=(null!=a?a:"")+r[s+1]),this._$AH[s]=a}n&&!i&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class H extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}const I=s$6?s$6.emptyScript:"";class L extends k{constructor(){super(...arguments),this.type=4}j(t){t&&t!==A?this.element.setAttribute(this.name,I):this.element.removeAttribute(this.name)}}class z extends k{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=S(this,t,e,0))&&void 0!==o?o:A)===T)return;const i=this._$AH,r=t===A&&i!==A||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==A&&(i===A||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 Z{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){S(this,t)}}const B=i$3.litHtmlPolyfillSupport;null==B||B(N,R),(null!==(t$6=i$3.litHtmlVersions)&&void 0!==t$6?t$6:i$3.litHtmlVersions=[]).push("2.8.0");const D=(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 R(e.insertBefore(u(),t),t,void 0,null!=o?o:{})}return s._$AI(t),s
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/};var l$3,o$5;let s$5=class extends u$1{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=D(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 T}};s$5.finalized=!0,s$5._$litElement$=!0,null===(l$3=globalThis.litElementHydrateSupport)||void 0===l$3||l$3.call(globalThis,{LitElement:s$5});const n$
|
|
22
|
+
*/};var l$3,o$5;let s$5=class extends u$1{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=D(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 T}};s$5.finalized=!0,s$5._$litElement$=!0,null===(l$3=globalThis.litElementHydrateSupport)||void 0===l$3||l$3.call(globalThis,{LitElement:s$5});const n$6=globalThis.litElementPolyfillSupport;function styles$F(){return i$4`
|
|
23
23
|
:host {
|
|
24
24
|
display: block;
|
|
25
25
|
}
|
|
26
|
-
`}function __classPrivateFieldGet(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 __classPrivateFieldSet(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}function getDefaultExportFromCjs(t){return t&&t.i&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}null==n$
|
|
26
|
+
`}function __classPrivateFieldGet(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 __classPrivateFieldSet(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}function getDefaultExportFromCjs(t){return t&&t.i&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}null==n$6||n$6({LitElement:s$5}),(null!==(o$5=globalThis.litElementVersions)&&void 0!==o$5?o$5:globalThis.litElementVersions=[]).push("3.3.2"),"function"==typeof SuppressedError&&SuppressedError;var toSpacingCSSValue,toCSSValue,getToken$1,themes={};themes.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, 84, 84","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","media-screen-desktop":"1025px","media-screen-tablet":"481px","opacity-0":"0%","opacity-20":"20%","opacity-40":"40%","opacity-60":"60%","opacity-100":"100%","elevation-1":"0px 0px 2px rgba(94, 118, 138, 0.1), 0px 1px 6px 2px rgba(61, 74, 85, 0.15)","elevation-2":"0px 1px 3px rgba(94, 118, 138, 0.2), 0px 4px 8px 3px rgba(61, 74, 85, 0.15)","elevation-3":"0px 0px 4px rgba(94, 118, 138, 0.2), 0px 6px 12px 6px rgba(61, 74, 85, 0.15)","elevation-4":"0px 5px 6px 4px rgba(94, 118, 138, 0.2), 0px 8px 10px rgba(61, 74, 85, 0.1)","glow-primary":"0.0px 0.0px 4.0px 0px rgb(3, 124, 94, .5)","glow-warning":"0.0px 0.0px 4.0px 0px rgba(255, 206, 79, 1.0)","spacing-1":"4px","spacing-2":"8px","spacing-3":"12px","spacing-4":"16px","spacing-5":"20px","spacing-6":"24px","spacing-8":"32px","spacing-10":"40px","spacing-12":"48px","spacing-14":"56px","spacing-16":"64px","spacing-20":"80px","spacing-30":"120px","spacing-0-5":"2px","platform-font-default":"'Manrope', sans-serif","platform-font-title":"'PlusJakartaSans', 'Manrope', sans-serif"};var r$2=themes;function t$5(t,e,o){if(o||2===arguments.length)for(var i,r=0,n=e.length;r<n;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}function e$6(t,e){return t.filter((function(t){return t.startsWith(e)}))}function o$4(t,e){return t.filter((function(t){return!t.startsWith(e)}))}"function"==typeof SuppressedError&&SuppressedError;var n$5=Object.keys(r$2.LoadsmartTheme),a$1=t$5([],o$4(o$4(n$5,"brand-"),"platform-"),!0).sort((function(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})}));e$6(a$1,"color-background-"),e$6(a$1,"border-radius-"),e$6(a$1,"border-"),e$6(a$1,"color-"),e$6(a$1,"elevation-"),e$6(a$1,"font-family-"),e$6(a$1,"font-size-"),e$6(a$1,"font-weight-"),e$6(a$1,"global-"),e$6(a$1,"glow-"),e$6(a$1,"line-height-"),e$6(a$1,"opacity-");var _=e$6(a$1,"spacing-");function K(t){return r$2.LoadsmartTheme[t]}function m$1(t){var e=K(t);return null==e?e:"--m-".concat(t)}function h(t,e){var o=K(t);return null==o?"":t.startsWith("color-")?"rgba(var(".concat(m$1(t),", ").concat(o,"), ").concat(null!=e?e:1,")"):"var(".concat(m$1(t),", ").concat(o,")")}function getColor(t,e=1){return r$5(toCSSValue(t,e))}function mr(t){return r$5(`\n\t\tmargin-inline-end: ${t}\n\t`)}function ml(t){return r$5(`\n\t\tmargin-inline-start: ${t}\n\t`)}function mx(t){return r$5(`\n\t\t${ml(t)};\n\t\t${mr(t)}\n\t`)}function mt(t){return r$5(`\n\t\tmargin-block-start: ${t}\n\t`)}function mb(t){return r$5(`\n\t\tmargin-block-end: ${t}\n\t`)}function my(t){return r$5(`\n\t\t${mt(t)};\n\t\t${mb(t)}\n\t`)}function m(t){return r$5(`\n\t\t${mx(t)};\n\t\t${my(t)}\n\t`)}function mediaDesktop(t){return r$5(`\n\t@media screen and (min-width: ${getToken$1("media-screen-desktop")}) {\n\t\t${t}\n\t}\n`)}e$6(a$1,"media-"),t$5(["none"],_,!0),getToken$1=K,toCSSValue=h,toSpacingCSSValue=function(t,e){var o,i=e?h(e):"";return t&&null!==(o="none"===t?"0":h(t))&&void 0!==o?o:i};var toArray=function(t){return null==t?[]:Array.isArray(t)?t:[t]},toArray$1=getDefaultExportFromCjs(toArray);const pseudoClassMap={active:[":active"],disabled:[".is-disabled",":disabled"],focus:[".is-focused",":focus",":focus-visible",":focus-within"],hover:[":hover"],visited:[":visited"]};function isPseudoClass(t){return Object.keys(pseudoClassMap).includes(t)}function isNegated(t){return t.startsWith("not.")}function joinIs(t){const e=toArray$1(t).filter((t=>""!==t.trim()));return 0===e.length?"":1===e.length?e[0]:`:is(${e.join(", ")})`}function toString(t,e,o,i){let r=joinIs(t);for(const t of i)if(isNegated(t)){const e=t.slice(4);r=`${r}:not(${pseudoClassMap[e].join(", ")})`}else r=`${r}${joinIs(pseudoClassMap[t])}`;const n=joinIs(e);if(n){let t=` ${o} `;return null==o&&(t="")," "===o&&(t=o),`${r}${t}${n}`}return r}function on(t,e,o=" "){const i=[];let r=!1;const n=new Proxy(r$5(""),{get:(s,a,l)=>"cssText"===a?toString(t,e,o,i):"not"===a?(r=!r,n):isPseudoClass(a)?(i.push(r?`not.${a}`:a),r=!1,n):Reflect.get(s,a,l)});return n}function pr(t){return r$5(`\n\t\tpadding-inline-start: ${t}\n\t`)}function pl(t){return r$5(`\n\t\tpadding-inline-end: ${t}\n\t`)}function px(t){return r$5(`\n\t\t${pl(t)};\n\t\t${pr(t)}\n\t`)}function pt(t){return r$5(`\n\t\tpadding-block-start: ${t}\n\t`)}function pb(t){return r$5(`\n\t\tpadding-block-end: ${t}\n\t`)}function py(t){return r$5(`\n\t\t${pt(t)};\n\t\t${pb(t)}\n\t`)}function p(t){return r$5(`\n\t\t${px(t)};\n\t\t${py(t)}\n\t`)}function skeleton(){return r$5("animation: skeleton-loading 1s linear infinite alternate;")}skeleton.styles=()=>i$4`
|
|
27
27
|
@keyframes skeleton-loading {
|
|
28
28
|
0% {
|
|
29
29
|
background-color: ${getColor("color-background-tertiary")};
|
|
@@ -37,7 +37,7 @@ var t$6;u$1[d$2]=!0,u$1.elementProperties=new Map,u$1.elementStyles=[],u$1.shado
|
|
|
37
37
|
background-color: ${getColor("color-background-tertiary")};
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
`;const DEFAULT_TRANSITION_CONFIG={property:"all",delay:"0s",duration:"0.35s",easing:"ease-in-out"};function toTransition(t){const e={...DEFAULT_TRANSITION_CONFIG,...t};return r$5(`${e.property} ${e.duration} ${e.easing} ${e.delay}`)}function transition(t){const e=toArray$1(t).map((t=>toTransition(t))).join(", ");return r$5(`\n\t\ttransition: ${e}\n\t`)}function getToken(t){return r$5(toCSSValue(t))}function getVariant(t){switch(t){case"hero-lg-bold":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-6")};\n\t\t\t\tfont-size: ${getToken("font-size-9")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"hero-lg":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-6")};\n\t\t\t\tfont-size: ${getToken("font-size-9")};\n\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t`;case"hero-md-bold":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-6")};\n\t\t\t\tfont-size: ${getToken("font-size-8")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"hero-md":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-6")};\n\t\t\t\tfont-size: ${getToken("font-size-8")};\n\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t`;case"hero-sm-bold":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-6")};\n\t\t\t\tfont-size: ${getToken("font-size-7")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"hero-sm":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-6")};\n\t\t\t\tfont-size: ${getToken("font-size-7")};\n\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t`;case"heading-lg-bold":return`\n\t\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\t\tfont-size: ${getToken("font-size-6")};\n\t\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t\t`;case"heading-lg":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-6")};\n\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t`;case"heading-md-bold":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-5")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"heading-md":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-5")};\n\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t`;case"heading-sm-bold":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-4")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"heading-sm":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-4")};\n\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t`;case"body-lg-bold":return`\n\t\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\t\tline-height: ${getToken("line-height-6")};\n\t\t\t\t\tfont-size: ${getToken("font-size-5")};\n\t\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t\t`;case"body-lg":return`\n\t\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\t\tline-height: ${getToken("line-height-6")};\n\t\t\t\t\tfont-size: ${getToken("font-size-5")};\n\t\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t\t`;case"body-md":case"number-md":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-3")};\n\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t`;case"body-md-underline":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-3")};\n\t\t\t\tfont-weight: ${getToken("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: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-3")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"body-md-bold-underline":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-3")};\n\t\t\t\tfont-weight: ${getToken("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: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-4")};\n\t\t\t\tfont-size: ${getToken("font-size-2")};\n\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t`;case"body-sm-underline":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-4")};\n\t\t\t\tfont-size: ${getToken("font-size-2")};\n\t\t\t\tfont-weight: ${getToken("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: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-4")};\n\t\t\t\tfont-size: ${getToken("font-size-2")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"body-sm-bold-underline":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-4")};\n\t\t\t\tfont-size: ${getToken("font-size-2")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"button-lg":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-1")};\n\t\t\t\tfont-size: ${getToken("font-size-4")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"button-md":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-1")};\n\t\t\t\tfont-size: ${getToken("font-size-3")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"button-sm":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-1")};\n\t\t\t\tfont-size: ${getToken("font-size-2")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"table-header-md":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-1")};\n\t\t\t\tfont-size: ${getToken("font-size-3")};\n\t\t\t\tfont-weight: ${getToken("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: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-1")};\n\t\t\t\tfont-size: ${getToken("font-size-2")};\n\t\t\t\tfont-weight: ${getToken("font-weight-medium")}\n\t\t\t`;case"chips-md":return`\n\t\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\t\tline-height: ${getToken("line-height-1")};\n\t\t\t\t\tfont-size: ${getToken("font-size-2")};\n\t\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t\t`;case"chips-sm":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-1")};\n\t\t\t\tfont-size: ${getToken("font-size-1")};\n\t\t\t\tfont-weight: ${getToken("font-weight-medium")};\n\t\t\t\ttext-transform: uppercase\n\t\t\t`;default:return""}}function typography(t){const e=r$5("\n\t\tfont-style: normal;\n\t\tfont-stretch: normal;\n\t\tletter-spacing: normal;\n\n\t\tfont-synthesis: none;\n\t\ttext-rendering: optimizeLegibility;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\t-webkit-text-size-adjust: 100%;\n\t");return r$5(`${e}\n${getVariant(t)}`)}function styles$
|
|
40
|
+
`;const DEFAULT_TRANSITION_CONFIG={property:"all",delay:"0s",duration:"0.35s",easing:"ease-in-out"};function toTransition(t){const e={...DEFAULT_TRANSITION_CONFIG,...t};return r$5(`${e.property} ${e.duration} ${e.easing} ${e.delay}`)}function transition(t){const e=toArray$1(t).map((t=>toTransition(t))).join(", ");return r$5(`\n\t\ttransition: ${e}\n\t`)}function getToken(t){return r$5(toCSSValue(t))}function getVariant(t){switch(t){case"hero-lg-bold":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-6")};\n\t\t\t\tfont-size: ${getToken("font-size-9")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"hero-lg":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-6")};\n\t\t\t\tfont-size: ${getToken("font-size-9")};\n\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t`;case"hero-md-bold":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-6")};\n\t\t\t\tfont-size: ${getToken("font-size-8")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"hero-md":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-6")};\n\t\t\t\tfont-size: ${getToken("font-size-8")};\n\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t`;case"hero-sm-bold":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-6")};\n\t\t\t\tfont-size: ${getToken("font-size-7")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"hero-sm":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-6")};\n\t\t\t\tfont-size: ${getToken("font-size-7")};\n\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t`;case"heading-lg-bold":return`\n\t\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\t\tfont-size: ${getToken("font-size-6")};\n\t\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t\t`;case"heading-lg":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-6")};\n\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t`;case"heading-md-bold":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-5")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"heading-md":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-5")};\n\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t`;case"heading-sm-bold":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-4")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"heading-sm":return`\n\t\t\t\tfont-family: ${getToken("font-family-title")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-4")};\n\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t`;case"body-lg-bold":return`\n\t\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\t\tline-height: ${getToken("line-height-6")};\n\t\t\t\t\tfont-size: ${getToken("font-size-5")};\n\t\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t\t`;case"body-lg":return`\n\t\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\t\tline-height: ${getToken("line-height-6")};\n\t\t\t\t\tfont-size: ${getToken("font-size-5")};\n\t\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t\t`;case"body-md":case"number-md":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-3")};\n\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t`;case"body-md-underline":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-3")};\n\t\t\t\tfont-weight: ${getToken("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: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-3")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"body-md-bold-underline":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-5")};\n\t\t\t\tfont-size: ${getToken("font-size-3")};\n\t\t\t\tfont-weight: ${getToken("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: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-4")};\n\t\t\t\tfont-size: ${getToken("font-size-2")};\n\t\t\t\tfont-weight: ${getToken("font-weight-regular")}\n\t\t\t`;case"body-sm-underline":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-4")};\n\t\t\t\tfont-size: ${getToken("font-size-2")};\n\t\t\t\tfont-weight: ${getToken("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: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-4")};\n\t\t\t\tfont-size: ${getToken("font-size-2")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"body-sm-bold-underline":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-4")};\n\t\t\t\tfont-size: ${getToken("font-size-2")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")};\n\t\t\t\ttext-decoration: underline\n\t\t\t`;case"button-lg":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-1")};\n\t\t\t\tfont-size: ${getToken("font-size-4")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"button-md":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-1")};\n\t\t\t\tfont-size: ${getToken("font-size-3")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"button-sm":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-1")};\n\t\t\t\tfont-size: ${getToken("font-size-2")};\n\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t`;case"table-header-md":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-1")};\n\t\t\t\tfont-size: ${getToken("font-size-3")};\n\t\t\t\tfont-weight: ${getToken("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: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-1")};\n\t\t\t\tfont-size: ${getToken("font-size-2")};\n\t\t\t\tfont-weight: ${getToken("font-weight-medium")}\n\t\t\t`;case"chips-md":return`\n\t\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\t\tline-height: ${getToken("line-height-1")};\n\t\t\t\t\tfont-size: ${getToken("font-size-2")};\n\t\t\t\t\tfont-weight: ${getToken("font-weight-bold")}\n\t\t\t\t`;case"chips-sm":return`\n\t\t\t\tfont-family: ${getToken("font-family-default")};\n\t\t\t\tline-height: ${getToken("line-height-1")};\n\t\t\t\tfont-size: ${getToken("font-size-1")};\n\t\t\t\tfont-weight: ${getToken("font-weight-medium")};\n\t\t\t\ttext-transform: uppercase\n\t\t\t`;default:return""}}function typography(t){const e=r$5("\n\t\tfont-style: normal;\n\t\tfont-stretch: normal;\n\t\tletter-spacing: normal;\n\n\t\tfont-synthesis: none;\n\t\ttext-rendering: optimizeLegibility;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\t-webkit-text-size-adjust: 100%;\n\t");return r$5(`${e}\n${getVariant(t)}`)}function styles$E(){return[i$4`
|
|
41
41
|
:host {
|
|
42
42
|
--m-icon-size: 16px;
|
|
43
43
|
--m-icon-color: ${getColor("color-text-primary")};
|
|
@@ -59,13 +59,13 @@ var t$6;u$1[d$2]=!0,u$1.elementProperties=new Map,u$1.elementStyles=[],u$1.shado
|
|
|
59
59
|
color: var(--m-icon-color);
|
|
60
60
|
fill: var(--m-icon-color);
|
|
61
61
|
}
|
|
62
|
-
`]}function redispatchEvent(t,e){!e.bubbles||t.shadowRoot&&!e.composed||e.stopPropagation();const o=Reflect.construct(e.constructor,[e.type,e]),i=t.dispatchEvent(o);return i||e.preventDefault(),i}class Component extends s$5{constructor(){super(...arguments),this.emit=(t,e)=>{const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,...e});this.dispatchEvent(o)},this.reemit=t=>{redispatchEvent(this,t)}}}const icons=new Map([["alert-circle",()=>import("./attention-
|
|
62
|
+
`]}function redispatchEvent(t,e){!e.bubbles||t.shadowRoot&&!e.composed||e.stopPropagation();const o=Reflect.construct(e.constructor,[e.type,e]),i=t.dispatchEvent(o);return i||e.preventDefault(),i}class Component extends s$5{constructor(){super(...arguments),this.emit=(t,e)=>{const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,...e});this.dispatchEvent(o)},this.reemit=t=>{redispatchEvent(this,t)}}}const icons=new Map([["alert-circle",()=>import("./attention-80aa9222.js")],["arrow-left",()=>import("./arrow-left-3c2480fa.js")],["attention",()=>import("./attention-80aa9222.js")],["bell",()=>import("./bell-af7bf949.js")],["check",()=>import("./check-a601865a.js")],["close",()=>import("./close-4547f028.js")],["indeterminate",()=>import("./indeterminate-70758df5.js")],["info-circle",()=>import("./info-circle-ceb49634.js")]]);var _Icon_loadIcon;icons.keys();class Icon extends Component{static get properties(){return{name:{type:String},size:{type:String},color:{type:String},loading:{state:!0}}}constructor(){super(),this.icon=null,_Icon_loadIcon.set(this,(async()=>{icons.has(this.name);try{this.icon=null;const{default:t}=await icons.get(this.name)();this.icon=t}catch{}finally{this.requestUpdate()}})),this.icon=null}connectedCallback(){super.connectedCallback(),__classPrivateFieldGet(this,_Icon_loadIcon,"f").call(this)}update(t){super.update(t),t.has("name")&&__classPrivateFieldGet(this,_Icon_loadIcon,"f").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",toCSSValue(this.color))}render(){return null!=this.name&&icons.has(this.name)&&null!=this.icon?this.icon:A}}_Icon_loadIcon=new WeakMap,Icon.styles=[styles$E()],window.customElements.define("m-icon",Icon);
|
|
63
63
|
/**
|
|
64
64
|
* @license
|
|
65
65
|
* Copyright 2020 Google LLC
|
|
66
66
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
67
67
|
*/
|
|
68
|
-
const e$5=Symbol.for(""),l$2=t=>{if((null==t?void 0:t.r)===e$5)return null==t?void 0:t._$litStatic$},o$3=t=>({_$litStatic$:t,r:e$5}),i$2=(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:e$5}),s$4=new Map,a=t=>(e,...o)=>{const i=o.length;let r,n;const s=[],a=[];let l,c=0,d=!1;for(;c<i;){for(l=e[c];c<i&&void 0!==(n=o[c],r=l$2(n));)l+=r+e[++c],d=!0;c!==i&&a.push(n),s.push(l),c++}if(c===i&&s.push(e[i]),d){const t=s.join("$$lit$$");void 0===(e=s$4.get(t))&&(s.raw=s,s$4.set(t,e=s)),o=a}return t(e,...o)},n$4=a(x
|
|
68
|
+
const e$5=Symbol.for(""),l$2=t=>{if((null==t?void 0:t.r)===e$5)return null==t?void 0:t._$litStatic$},o$3=t=>({_$litStatic$:t,r:e$5}),i$2=(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:e$5}),s$4=new Map,a=t=>(e,...o)=>{const i=o.length;let r,n;const s=[],a=[];let l,c=0,d=!1;for(;c<i;){for(l=e[c];c<i&&void 0!==(n=o[c],r=l$2(n));)l+=r+e[++c],d=!0;c!==i&&a.push(n),s.push(l),c++}if(c===i&&s.push(e[i]),d){const t=s.join("$$lit$$");void 0===(e=s$4.get(t))&&(s.raw=s,s$4.set(t,e=s)),o=a}return t(e,...o)},n$4=a(x),l$1=t=>null!=t?t:A
|
|
69
69
|
/**
|
|
70
70
|
* @license
|
|
71
71
|
* Copyright 2017 Google LLC
|
|
@@ -80,7 +80,7 @@ const e$5=Symbol.for(""),l$2=t=>{if((null==t?void 0:t.r)===e$5)return null==t?vo
|
|
|
80
80
|
* @license
|
|
81
81
|
* Copyright 2018 Google LLC
|
|
82
82
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
83
|
-
*/const o$2=e$4(class extends i$1{constructor(t){var e;if(super(t),t.type!==t$4.ATTRIBUTE||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var o,i;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(o=this.nt)||void 0===o?void 0:o.has(t))&&this.it.add(t);return this.render(e)}const r=t.element.classList;this.it.forEach((t=>{t in e||(r.remove(t),this.it.delete(t))}));for(const t in e){const o=!!e[t];o===this.it.has(t)||(null===(i=this.nt)||void 0===i?void 0:i.has(t))||(o?(r.add(t),this.it.add(t)):(r.remove(t),this.it.delete(t)))}return T}});var _FormControl_form,_FormControl_updateAssignedForm,_Button_instances,_Button_element_get,_Button_isDisabled,_Button_getRole,_Button_setDisabled,_Button_setTabIndex,_Button_handleClick,_Button_isLink,_Badge_instances,_Badge_getCounterLength,_Badge_getCounter;class FormControl extends s$5{constructor(){super(...arguments),_FormControl_form.set(this,void 0),this.getForm=()=>__classPrivateFieldGet(this,_FormControl_form,"f"),_FormControl_updateAssignedForm.set(this,(()=>{if(this.hasAttribute("form")){const t=this.getRootNode(),e=this.getAttribute("form");__classPrivateFieldSet(this,_FormControl_form,t.getElementById(e),"f")}else __classPrivateFieldSet(this,_FormControl_form,this.closest("form"),"f")}))}static get properties(){return{form:{type:String,reflect:!0}}}updated(t){super.updated(t),(t.has("form")||null==__classPrivateFieldGet(this,_FormControl_form,"f"))&&__classPrivateFieldGet(this,_FormControl_updateAssignedForm,"f").call(this)}}function styles$
|
|
83
|
+
*/const o$2=e$4(class extends i$1{constructor(t){var e;if(super(t),t.type!==t$4.ATTRIBUTE||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var o,i;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(o=this.nt)||void 0===o?void 0:o.has(t))&&this.it.add(t);return this.render(e)}const r=t.element.classList;this.it.forEach((t=>{t in e||(r.remove(t),this.it.delete(t))}));for(const t in e){const o=!!e[t];o===this.it.has(t)||(null===(i=this.nt)||void 0===i?void 0:i.has(t))||(o?(r.add(t),this.it.add(t)):(r.remove(t),this.it.delete(t)))}return T}});var _FormControl_form,_FormControl_updateAssignedForm,_Button_instances,_Button_element_get,_Button_isDisabled,_Button_getRole,_Button_setDisabled,_Button_setTabIndex,_Button_handleClick,_Button_isLink,_Badge_instances,_Badge_getCounterLength,_Badge_getCounter;class FormControl extends s$5{constructor(){super(...arguments),_FormControl_form.set(this,void 0),this.getForm=()=>__classPrivateFieldGet(this,_FormControl_form,"f"),_FormControl_updateAssignedForm.set(this,(()=>{if(this.hasAttribute("form")){const t=this.getRootNode(),e=this.getAttribute("form");__classPrivateFieldSet(this,_FormControl_form,t.getElementById(e),"f")}else __classPrivateFieldSet(this,_FormControl_form,this.closest("form"),"f")}))}static get properties(){return{form:{type:String,reflect:!0}}}updated(t){super.updated(t),(t.has("form")||null==__classPrivateFieldGet(this,_FormControl_form,"f"))&&__classPrivateFieldGet(this,_FormControl_updateAssignedForm,"f").call(this)}}function styles$D(){return i$4`
|
|
84
84
|
:host {
|
|
85
85
|
--m-button-background-color: transparent;
|
|
86
86
|
--m-button-base-size: ${getToken("global-height-default")};
|
|
@@ -182,7 +182,7 @@ const e$5=Symbol.for(""),l$2=t=>{if((null==t?void 0:t.r)===e$5)return null==t?vo
|
|
|
182
182
|
slot[name='trailing']::slotted(span) {
|
|
183
183
|
justify-content: center;
|
|
184
184
|
}
|
|
185
|
-
`}function styles$
|
|
185
|
+
`}function styles$C(){return[styles$D(),i$4`
|
|
186
186
|
.button.is-loading:not(.-icon, .-icon-secondary) *:not(.loader) {
|
|
187
187
|
visibility: hidden;
|
|
188
188
|
}
|
|
@@ -447,11 +447,11 @@ const e$5=Symbol.for(""),l$2=t=>{if((null==t?void 0:t.r)===e$5)return null==t?vo
|
|
|
447
447
|
<slot></slot>
|
|
448
448
|
<slot name="trailing"></slot>
|
|
449
449
|
</${this.tag}>
|
|
450
|
-
`}focus(t){var e;null===(e=__classPrivateFieldGet(this,_Button_instances,"a",_Button_element_get))||void 0===e||e.focus(t)}}_Button_isDisabled=new WeakMap,_Button_getRole=new WeakMap,_Button_setDisabled=new WeakMap,_Button_setTabIndex=new WeakMap,_Button_handleClick=new WeakMap,_Button_instances=new WeakSet,_Button_element_get=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(".button"))&&void 0!==e?e:null},_Button_isLink=function(){return Boolean(this.href)},Button.styles=[styles$
|
|
450
|
+
`}focus(t){var e;null===(e=__classPrivateFieldGet(this,_Button_instances,"a",_Button_element_get))||void 0===e||e.focus(t)}}_Button_isDisabled=new WeakMap,_Button_getRole=new WeakMap,_Button_setDisabled=new WeakMap,_Button_setTabIndex=new WeakMap,_Button_handleClick=new WeakMap,_Button_instances=new WeakSet,_Button_element_get=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(".button"))&&void 0!==e?e:null},_Button_isLink=function(){return Boolean(this.href)},Button.styles=[styles$C()],window.customElements.define("m-button",Button);class BackButton extends s$5{static get properties(){return{slot:{type:String,reflect:!0}}}constructor(){super(),this.slot="back-button"}render(){return x`
|
|
451
451
|
<m-button variant="icon" size="default">
|
|
452
452
|
<m-icon name="arrow-left"></m-icon>
|
|
453
453
|
</m-button>
|
|
454
|
-
`}}function styles$
|
|
454
|
+
`}}function styles$B(){return i$4`
|
|
455
455
|
:host {
|
|
456
456
|
--m-host-size: 24px;
|
|
457
457
|
--m-badge-size: 12px;
|
|
@@ -499,32 +499,32 @@ const e$5=Symbol.for(""),l$2=t=>{if((null==t?void 0:t.r)===e$5)return null==t?vo
|
|
|
499
499
|
inline-size: 24px;
|
|
500
500
|
--m-badge-border-radius: ${getToken("border-radius-m")};
|
|
501
501
|
}
|
|
502
|
-
`}BackButton.styles=[styles$
|
|
502
|
+
`}BackButton.styles=[styles$F()],window.customElements.define("m-back-button",BackButton);class Badge extends s$5{static get properties(){return{counter:{type:String,reflect:!0},placement:{type:String,reflect:!0},size:{type:String,reflect:!0}}}constructor(){super(),_Badge_instances.add(this),this.counter=1,this.placement="top-right",this.size="default"}render(){return x`
|
|
503
503
|
<slot></slot>
|
|
504
504
|
<span
|
|
505
505
|
class=${o$2({badge:!0,"-large-badge":2===__classPrivateFieldGet(this,_Badge_instances,"m",_Badge_getCounterLength).call(this)&&"default"===this.size,"-extra-large-badge":__classPrivateFieldGet(this,_Badge_instances,"m",_Badge_getCounterLength).call(this)>=3&&"default"===this.size})}
|
|
506
506
|
>${__classPrivateFieldGet(this,_Badge_instances,"m",_Badge_getCounter).call(this)}</span
|
|
507
507
|
>
|
|
508
|
-
`}}_Badge_instances=new WeakSet,_Badge_getCounterLength=function(){return this.counter.toString().length},_Badge_getCounter=function(){return"default"===this.size?__classPrivateFieldGet(this,_Badge_instances,"m",_Badge_getCounterLength).call(this)>2?"99+":this.counter:null},Badge.styles=[styles$
|
|
508
|
+
`}}_Badge_instances=new WeakSet,_Badge_getCounterLength=function(){return this.counter.toString().length},_Badge_getCounter=function(){return"default"===this.size?__classPrivateFieldGet(this,_Badge_instances,"m",_Badge_getCounterLength).call(this)>2?"99+":this.counter:null},Badge.styles=[styles$B()],window.customElements.define("m-badge",Badge);class BannerActionPrimary extends Button{constructor(){super(),this.size="small"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","primary-action")}}window.customElements.define("m-banner-action-primary",BannerActionPrimary);class BannerActionSecondary extends Button{constructor(){super(),this.variant="tertiary",this.size="small"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","secondary-action")}}function styles$A(){return i$4`
|
|
509
509
|
:host {
|
|
510
510
|
display: flex;
|
|
511
511
|
justify-content: flex-end;
|
|
512
512
|
gap: ${getToken("spacing-2")};
|
|
513
513
|
}
|
|
514
|
-
`}window.customElements.define("m-banner-action-secondary",BannerActionSecondary);class BannerActions extends s$5{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","actions")}render(){return x
|
|
514
|
+
`}window.customElements.define("m-banner-action-secondary",BannerActionSecondary);class BannerActions extends s$5{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","actions")}render(){return x`
|
|
515
515
|
<slot name="secondary-action"></slot>
|
|
516
516
|
<slot name="primary-action"></slot>
|
|
517
|
-
`}}function styles$
|
|
517
|
+
`}}function styles$z(){return i$4`
|
|
518
518
|
:host {
|
|
519
519
|
${typography("body-md")};
|
|
520
520
|
color: ${getColor("color-text-secondary")};
|
|
521
521
|
}
|
|
522
|
-
`}BannerActions.styles=[styles$
|
|
522
|
+
`}BannerActions.styles=[styles$A()],window.customElements.define("m-banner-actions",BannerActions);class BannerDescription extends s$5{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","description")}render(){return x`<slot></slot>`}}BannerDescription.styles=[styles$z()],window.customElements.define("m-banner-description",BannerDescription);class BannerIcon extends s$5{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","icon")}render(){return x`<slot></slot>`}}function styles$y(){return i$4`
|
|
523
523
|
:host {
|
|
524
524
|
${typography("body-md-bold")};
|
|
525
525
|
color: ${getColor("color-text-secondary")};
|
|
526
526
|
}
|
|
527
|
-
`}window.customElements.define("m-banner-icon",BannerIcon);class BannerTitle extends s$5{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","title")}render(){return x
|
|
527
|
+
`}window.customElements.define("m-banner-icon",BannerIcon);class BannerTitle extends s$5{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","title")}render(){return x`<slot></slot>`}}function styles$x(){return i$4`
|
|
528
528
|
:host {
|
|
529
529
|
display: block;
|
|
530
530
|
width: 100%;
|
|
@@ -594,7 +594,7 @@ const e$5=Symbol.for(""),l$2=t=>{if((null==t?void 0:t.r)===e$5)return null==t?vo
|
|
|
594
594
|
flex-grow: 1;
|
|
595
595
|
gap: ${getToken("spacing-1")};
|
|
596
596
|
}
|
|
597
|
-
`}BannerTitle.styles=[styles$
|
|
597
|
+
`}BannerTitle.styles=[styles$y()],window.customElements.define("m-banner-title",BannerTitle);var _CloseButton_instances,_CloseButton_button_get,_CloseButton_handleClick,index2d298de0={BASE_PIXELS:16,toRem:function(t,e=16){return parseInt(String(t),10)/e+"rem"}},e$3=index2d298de0,toRem$1=e$3.toRem,rem=getDefaultExportFromCjs(toRem$1);function toRem(t,e){return r$5(rem(t,e))}function styles$w(){return i$4`
|
|
598
598
|
:host {
|
|
599
599
|
--m-close-button-color: ${getColor("color-text-primary")};
|
|
600
600
|
--m-close-button-outline-color: ${getColor("color-primary-100")};
|
|
@@ -670,7 +670,7 @@ const e$5=Symbol.for(""),l$2=t=>{if((null==t?void 0:t.r)===e$5)return null==t?vo
|
|
|
670
670
|
${on(".close-button","*").disabled} {
|
|
671
671
|
pointer-events: none;
|
|
672
672
|
}
|
|
673
|
-
`}class CloseButton extends Component{static get properties(){return{controls:{type:String},disabled:{type:Boolean},inverted:{type:Boolean},label:{type:String},size:{type:String}}}constructor(){super(),_CloseButton_instances.add(this),_CloseButton_handleClick.set(this,(()=>{this.emit("m-close")})),this.disabled=!1,this.inverted=!1,this.label="Close",this.size="default"}render(){var t;return x
|
|
673
|
+
`}class CloseButton extends Component{static get properties(){return{controls:{type:String},disabled:{type:Boolean},inverted:{type:Boolean},label:{type:String},size:{type:String}}}constructor(){super(),_CloseButton_instances.add(this),_CloseButton_handleClick.set(this,(()=>{this.emit("m-close")})),this.disabled=!1,this.inverted=!1,this.label="Close",this.size="default"}render(){var t;return x`
|
|
674
674
|
<button
|
|
675
675
|
type="button"
|
|
676
676
|
aria-controls="${l$1(this.controls)}"
|
|
@@ -681,13 +681,13 @@ const e$5=Symbol.for(""),l$2=t=>{if((null==t?void 0:t.r)===e$5)return null==t?vo
|
|
|
681
681
|
>
|
|
682
682
|
<m-icon name="close"></m-icon>
|
|
683
683
|
</button>
|
|
684
|
-
`}focus(t){var e;null===(e=__classPrivateFieldGet(this,_CloseButton_instances,"a",_CloseButton_button_get))||void 0===e||e.focus(t)}}_CloseButton_handleClick=new WeakMap,_CloseButton_instances=new WeakSet,_CloseButton_button_get=function(){var t;return null!==(t=this.renderRoot.querySelector("button"))&&void 0!==t?t:null},CloseButton.styles=[styles$
|
|
684
|
+
`}focus(t){var e;null===(e=__classPrivateFieldGet(this,_CloseButton_instances,"a",_CloseButton_button_get))||void 0===e||e.focus(t)}}_CloseButton_handleClick=new WeakMap,_CloseButton_instances=new WeakSet,_CloseButton_button_get=function(){var t;return null!==(t=this.renderRoot.querySelector("button"))&&void 0!==t?t:null},CloseButton.styles=[styles$w()],window.customElements.define("m-close-button",CloseButton);
|
|
685
685
|
/**
|
|
686
686
|
* @license
|
|
687
687
|
* Copyright 2018 Google LLC
|
|
688
688
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
689
689
|
*/
|
|
690
|
-
const i="important",n$3=" !"+i,o$1=e$4(class extends i$1{constructor(t){var e;if(super(t),t.type!==t$4.ATTRIBUTE||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,o)=>{const i=t[o];return null==i?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:o}=t.element;if(void 0===this.ht){this.ht=new Set;for(const t in e)this.ht.add(t);return this.render(e)}this.ht.forEach((t=>{null==e[t]&&(this.ht.delete(t),t.includes("-")?o.removeProperty(t):o[t]="")}));for(const t in e){const r=e[t];if(null!=r){this.ht.add(t);const e="string"==typeof r&&r.endsWith(n$3);t.includes("-")||e?o.setProperty(t,e?r.slice(0,-11):r,e?i:""):o[t]=r}}return T}}),HTML_TAGS=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],PolymorphicTagMixin=({superClass:t,allowedTags:e=HTML_TAGS,fallbackTag:o="div"})=>class extends t{static get properties(){return{as:{type:String}}}attributeChangedCallback(t,i,r){super.attributeChangedCallback(t,i,r),"as"===t&&(null!==r&&e.includes(r)?this.as=r:this.as=o)}get tag(){return i$2`${o$3(this.as)}`}};function styles$
|
|
690
|
+
const i="important",n$3=" !"+i,o$1=e$4(class extends i$1{constructor(t){var e;if(super(t),t.type!==t$4.ATTRIBUTE||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,o)=>{const i=t[o];return null==i?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:o}=t.element;if(void 0===this.ht){this.ht=new Set;for(const t in e)this.ht.add(t);return this.render(e)}this.ht.forEach((t=>{null==e[t]&&(this.ht.delete(t),t.includes("-")?o.removeProperty(t):o[t]="")}));for(const t in e){const r=e[t];if(null!=r){this.ht.add(t);const e="string"==typeof r&&r.endsWith(n$3);t.includes("-")||e?o.setProperty(t,e?r.slice(0,-11):r,e?i:""):o[t]=r}}return T}}),HTML_TAGS=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],PolymorphicTagMixin=({superClass:t,allowedTags:e=HTML_TAGS,fallbackTag:o="div"})=>class extends t{static get properties(){return{as:{type:String}}}attributeChangedCallback(t,i,r){super.attributeChangedCallback(t,i,r),"as"===t&&(null!==r&&e.includes(r)?this.as=r:this.as=o)}get tag(){return i$2`${o$3(this.as)}`}};function styles$v(){return i$4`
|
|
691
691
|
:host {
|
|
692
692
|
--m-text-color: ${getColor("color-text-primary")};
|
|
693
693
|
--m-text-display: inline-block;
|
|
@@ -846,13 +846,13 @@ const i="important",n$3=" !"+i,o$1=e$4(class extends i$1{constructor(t){var e;if
|
|
|
846
846
|
>
|
|
847
847
|
<slot></slot>
|
|
848
848
|
</${this.tag}>
|
|
849
|
-
`}}var _Banner_primaryAction,_Banner_handleDismissClick;function getIcon(t){switch(t){case"success":return"check";case"warning":case"danger":return"attention";default:return"info-circle"}}function getPrimaryActionVariant(t){switch(t){case"warning":return"warning";case"danger":return"danger";default:return"primary"}}Text.styles=[styles$
|
|
849
|
+
`}}var _Banner_primaryAction,_Banner_handleDismissClick;function getIcon(t){switch(t){case"success":return"check";case"warning":case"danger":return"attention";default:return"info-circle"}}function getPrimaryActionVariant(t){switch(t){case"warning":return"warning";case"danger":return"danger";default:return"primary"}}Text.styles=[styles$v()],window.customElements.define("m-text",Text);class Banner extends Component{static get properties(){return{variant:{type:String},dismissible:{type:Boolean},dismissed:{type:Boolean,reflect:!0}}}constructor(){super(),_Banner_primaryAction.set(this,void 0),_Banner_handleDismissClick.set(this,(()=>{this.dismissed=!0,this.emit("m-dismiss",{composed:!0})})),this.variant="neutral",this.dismissible=!1,this.dismissed=!1}get primaryAction(){return null==__classPrivateFieldGet(this,_Banner_primaryAction,"f")&&__classPrivateFieldSet(this,_Banner_primaryAction,this.querySelector("m-banner-action-primary"),"f"),__classPrivateFieldGet(this,_Banner_primaryAction,"f")}updated(t){super.updated(t),t.has("variant")&&null!=this.primaryAction&&(this.primaryAction.variant=getPrimaryActionVariant(this.variant))}render(){if(this.dismissed)return A;const t=null!=this.querySelector("*[slot='description']"),e=null!=this.querySelector("*[slot='actions']"),o=x`
|
|
850
850
|
<m-close-button
|
|
851
851
|
id="close"
|
|
852
852
|
label="Dismiss"
|
|
853
853
|
@click=${__classPrivateFieldGet(this,_Banner_handleDismissClick,"f")}
|
|
854
854
|
></m-close-button>
|
|
855
|
-
`;return x
|
|
855
|
+
`;return x`
|
|
856
856
|
<div
|
|
857
857
|
class=${o$2({banner:!0,"-success":"success"===this.variant,"-warning":"warning"===this.variant,"-danger":"danger"===this.variant,"-with-description":t})}
|
|
858
858
|
>
|
|
@@ -868,7 +868,7 @@ const i="important",n$3=" !"+i,o$1=e$4(class extends i$1{constructor(t){var e;if
|
|
|
868
868
|
</div>
|
|
869
869
|
<slot name="actions"></slot>
|
|
870
870
|
</div>
|
|
871
|
-
`}}function styles$
|
|
871
|
+
`}}function styles$u(){return i$4`
|
|
872
872
|
:host {
|
|
873
873
|
display: block;
|
|
874
874
|
box-sizing: border-box;
|
|
@@ -884,7 +884,7 @@ const i="important",n$3=" !"+i,o$1=e$4(class extends i$1{constructor(t){var e;if
|
|
|
884
884
|
}
|
|
885
885
|
|
|
886
886
|
${mediaDesktop(`\n\t\t\t.body-wrapper {\n\t\t\t\tpadding: ${getToken("spacing-6")};\n\t\t\t}\n\t\t`)}
|
|
887
|
-
`}_Banner_primaryAction=new WeakMap,_Banner_handleDismissClick=new WeakMap,Banner.styles=[styles$
|
|
887
|
+
`}_Banner_primaryAction=new WeakMap,_Banner_handleDismissClick=new WeakMap,Banner.styles=[styles$x()],window.customElements.define("m-banner",Banner);class Body extends s$5{static get properties(){return{slot:{type:String,reflect:!0}}}constructor(){super(),this.slot="page-body"}render(){return n$4`<div class="body-wrapper"><slot></slot></div>`}}function cardStyles(){return i$4`
|
|
888
888
|
:host {
|
|
889
889
|
--m-card-background-color: ${getColor("color-background-primary")};
|
|
890
890
|
}
|
|
@@ -974,12 +974,12 @@ const i="important",n$3=" !"+i,o$1=e$4(class extends i$1{constructor(t){var e;if
|
|
|
974
974
|
:host {
|
|
975
975
|
--m-divider-margin-top: ${getToken("spacing-4")};
|
|
976
976
|
}
|
|
977
|
-
`}Body.styles=[styles$
|
|
977
|
+
`}Body.styles=[styles$u()],window.customElements.define("m-body",Body);const defaultFlagColor="color-background-inverted";class Card extends s$5{static get properties(){return{flagged:{type:Boolean},flagColor:{type:String,attribute:"flag-color"}}}constructor(){super(),this.flagged=!1,this.flagColor=defaultFlagColor}render(){return x`
|
|
978
978
|
<div
|
|
979
979
|
class="m-card"
|
|
980
980
|
style="${o$1({"--m-card-flag-color":toCSSValue(this.flagColor)})}"
|
|
981
981
|
>
|
|
982
|
-
${this.flagged?x
|
|
982
|
+
${this.flagged?x`<span class="m-card-flag"></span>`:A}
|
|
983
983
|
<div class="m-card-content">
|
|
984
984
|
<slot name="title"></slot>
|
|
985
985
|
<slot name="subtitle"></slot>
|
|
@@ -987,20 +987,20 @@ const i="important",n$3=" !"+i,o$1=e$4(class extends i$1{constructor(t){var e;if
|
|
|
987
987
|
<slot name="body"></slot>
|
|
988
988
|
</div>
|
|
989
989
|
</div>
|
|
990
|
-
`}}Card.styles=[cardStyles()],window.customElements.define("m-card",Card);class CardBody extends s$5{static get properties(){return{slot:{type:String,reflect:!0}}}constructor(){super(),this.slot="body"}render(){return x
|
|
990
|
+
`}}Card.styles=[cardStyles()],window.customElements.define("m-card",Card);class CardBody extends s$5{static get properties(){return{slot:{type:String,reflect:!0}}}constructor(){super(),this.slot="body"}render(){return x`
|
|
991
991
|
<div class="m-card-body">
|
|
992
992
|
<slot></slot>
|
|
993
993
|
</div>
|
|
994
|
-
`}}CardBody.styles=[cardBodyStyles()],window.customElements.define("m-card-body",CardBody);class CardSubtitle extends s$5{static get properties(){return{slot:{type:String,reflect:!0}}}constructor(){super(),this.slot="subtitle"}render(){return x
|
|
994
|
+
`}}CardBody.styles=[cardBodyStyles()],window.customElements.define("m-card-body",CardBody);class CardSubtitle extends s$5{static get properties(){return{slot:{type:String,reflect:!0}}}constructor(){super(),this.slot="subtitle"}render(){return x`
|
|
995
995
|
<div class="m-card-subtitle">
|
|
996
996
|
<slot></slot>
|
|
997
997
|
</div>
|
|
998
|
-
`}}CardSubtitle.styles=[cardSubtitleStyles()],window.customElements.define("m-card-subtitle",CardSubtitle);class CardTitle extends s$5{static get properties(){return{slot:{type:String,reflect:!0}}}constructor(){super(),this.slot="title"}render(){return x
|
|
998
|
+
`}}CardSubtitle.styles=[cardSubtitleStyles()],window.customElements.define("m-card-subtitle",CardSubtitle);class CardTitle extends s$5{static get properties(){return{slot:{type:String,reflect:!0}}}constructor(){super(),this.slot="title"}render(){return x`
|
|
999
999
|
<div class="m-card-title">
|
|
1000
1000
|
<slot name="leading"></slot>
|
|
1001
1001
|
<slot></slot>
|
|
1002
1002
|
</div>
|
|
1003
|
-
`}}function styles$
|
|
1003
|
+
`}}function styles$t(){return i$4`
|
|
1004
1004
|
.m-divider {
|
|
1005
1005
|
border: 0;
|
|
1006
1006
|
border-block-end: solid 1px ${getColor("color-divider")};
|
|
@@ -1013,7 +1013,7 @@ const i="important",n$3=" !"+i,o$1=e$4(class extends i$1{constructor(t){var e;if
|
|
|
1013
1013
|
var(--m-divider-margin-y, 0)
|
|
1014
1014
|
);
|
|
1015
1015
|
}
|
|
1016
|
-
`}CardTitle.styles=[cardTitleStyles()],window.customElements.define("m-card-title",CardTitle);class Divider extends s$5{render(){return x
|
|
1016
|
+
`}CardTitle.styles=[cardTitleStyles()],window.customElements.define("m-card-title",CardTitle);class Divider extends s$5{render(){return x`<hr class="m-divider" />`}}Divider.styles=[styles$t()],window.customElements.define("m-divider",Divider);class CardDivider extends Divider{constructor(){super(),this.slot="divider"}}CardDivider.styles=[...Divider.styles,cardDividerStyles()],CardDivider.properties={slot:{attribute:!0,type:String,reflect:!0}},window.customElements.define("m-card-divider",CardDivider);const baseTransitionConfig={delay:"0s",duration:"0.35s",easing:"ease-in-out"};function styles$s(){return i$4`
|
|
1017
1017
|
${on(".check-input-label").not.disabled.focus} {
|
|
1018
1018
|
border-radius: 2px;
|
|
1019
1019
|
outline: 1px solid ${getColor("color-primary-60")};
|
|
@@ -1105,7 +1105,7 @@ const i="important",n$3=" !"+i,o$1=e$4(class extends i$1{constructor(t){var e;if
|
|
|
1105
1105
|
.check-input:indeterminate:not(:checked) ~ .indeterminate-icon {
|
|
1106
1106
|
display: inline-flex;
|
|
1107
1107
|
}
|
|
1108
|
-
`}const CHANGE_EVENT="m-change";var _Checkbox_instances,_Checkbox_setAttributes,_Checkbox_handleChange;class Checkbox extends s$5{static get properties(){return{name:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0},indeterminate:{type:Boolean,reflect:!0}}}constructor(){super(),_Checkbox_instances.add(this),_Checkbox_handleChange.set(this,(t=>{const e=t.target,o=new CustomEvent("m-change",{cancelable:!1,composed:!1,bubbles:!0,detail:{checked:e.checked,indeterminate:e.indeterminate}});this.dispatchEvent(o),this.checked=e.checked,this.indeterminate=e.indeterminate})),this.name=void 0,this.disabled=!1,this.checked=!1,this.indeterminate=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","checkbox")}disconnectedCallback(){super.connectedCallback()}firstUpdated(){this.input=this.renderRoot.querySelector("input"),this.label=this.renderRoot.querySelector("label")}updated(){__classPrivateFieldGet(this,_Checkbox_instances,"m",_Checkbox_setAttributes).call(this)}render(){return x
|
|
1108
|
+
`}const CHANGE_EVENT="m-change";var _Checkbox_instances,_Checkbox_setAttributes,_Checkbox_handleChange;class Checkbox extends s$5{static get properties(){return{name:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0},indeterminate:{type:Boolean,reflect:!0}}}constructor(){super(),_Checkbox_instances.add(this),_Checkbox_handleChange.set(this,(t=>{const e=t.target,o=new CustomEvent("m-change",{cancelable:!1,composed:!1,bubbles:!0,detail:{checked:e.checked,indeterminate:e.indeterminate}});this.dispatchEvent(o),this.checked=e.checked,this.indeterminate=e.indeterminate})),this.name=void 0,this.disabled=!1,this.checked=!1,this.indeterminate=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","checkbox")}disconnectedCallback(){super.connectedCallback()}firstUpdated(){this.input=this.renderRoot.querySelector("input"),this.label=this.renderRoot.querySelector("label")}updated(){__classPrivateFieldGet(this,_Checkbox_instances,"m",_Checkbox_setAttributes).call(this)}render(){return x`
|
|
1109
1109
|
<label for="${l$1(this.id)}" class="check-input-label">
|
|
1110
1110
|
<input
|
|
1111
1111
|
id="${l$1(this.id)}"
|
|
@@ -1121,7 +1121,7 @@ const i="important",n$3=" !"+i,o$1=e$4(class extends i$1{constructor(t){var e;if
|
|
|
1121
1121
|
<slot name="leading"></slot>
|
|
1122
1122
|
<slot></slot>
|
|
1123
1123
|
</label>
|
|
1124
|
-
`}focus(t){var e;null===(e=this.input)||void 0===e||e.focus(t)}}_Checkbox_handleChange=new WeakMap,_Checkbox_instances=new WeakSet,_Checkbox_setAttributes=function(){this.setAttribute("aria-disabled",this.disabled.toString()),this.setAttribute("aria-checked",this.indeterminate?"mixed":this.checked.toString()),this.input.indeterminate=this.indeterminate},Checkbox.styles=[styles$
|
|
1124
|
+
`}focus(t){var e;null===(e=this.input)||void 0===e||e.focus(t)}}_Checkbox_handleChange=new WeakMap,_Checkbox_instances=new WeakSet,_Checkbox_setAttributes=function(){this.setAttribute("aria-disabled",this.disabled.toString()),this.setAttribute("aria-checked",this.indeterminate?"mixed":this.checked.toString()),this.input.indeterminate=this.indeterminate},Checkbox.styles=[styles$s()],window.customElements.define("m-checkbox",Checkbox);
|
|
1125
1125
|
/**
|
|
1126
1126
|
* @license
|
|
1127
1127
|
* Copyright 2021 Google LLC
|
|
@@ -1142,7 +1142,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1142
1142
|
* @license
|
|
1143
1143
|
* Copyright 2021 Google LLC
|
|
1144
1144
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1145
|
-
*/var waitForAnimations_1=async function(t,e){const o=t.getAnimations(e).map((({finished:t})=>t));await Promise.allSettled(o)};let isAttached=!1;function attachContextRoot(){if(isAttached)return;(new t$2).attach(document.body),isAttached=!0}const dialogContext=n$2(Symbol("dialog"));function styles$
|
|
1145
|
+
*/var waitForAnimations_1=async function(t,e){const o=t.getAnimations(e).map((({finished:t})=>t));await Promise.allSettled(o)};let isAttached=!1;function attachContextRoot(){if(isAttached)return;(new t$2).attach(document.body),isAttached=!0}const dialogContext=n$2(Symbol("dialog"));function styles$r(){return i$4`
|
|
1146
1146
|
:host {
|
|
1147
1147
|
--margin: ${getToken("spacing-6")};
|
|
1148
1148
|
--padding: ${getToken("spacing-6")};
|
|
@@ -1235,7 +1235,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1235
1235
|
opacity: 0;
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
1238
|
-
`}var _Dialog_instances,_Dialog_contextProvider,_Dialog_dialog_get,_Dialog_toggleVisibility,_Dialog_emitLifecycleEvent,_Dialog_emitCloseEvent,_Dialog_handleClick,_Dialog_handleCancel;attachContextRoot();class Dialog extends Component{static get properties(){return{open:{type:Boolean,reflect:!0},size:{type:String,reflect:!0},variant:{type:String,reflect:!0}}}constructor(){super(),_Dialog_instances.add(this),_Dialog_contextProvider.set(this,new e$2(this,dialogContext,{variant:"neutral"})),this.open=!1,this.size="small",this.variant="neutral"}render(){return x
|
|
1238
|
+
`}var _Dialog_instances,_Dialog_contextProvider,_Dialog_dialog_get,_Dialog_toggleVisibility,_Dialog_emitLifecycleEvent,_Dialog_emitCloseEvent,_Dialog_handleClick,_Dialog_handleCancel;attachContextRoot();class Dialog extends Component{static get properties(){return{open:{type:Boolean,reflect:!0},size:{type:String,reflect:!0},variant:{type:String,reflect:!0}}}constructor(){super(),_Dialog_instances.add(this),_Dialog_contextProvider.set(this,new e$2(this,dialogContext,{variant:"neutral"})),this.open=!1,this.size="small",this.variant="neutral"}render(){return x`
|
|
1239
1239
|
<dialog
|
|
1240
1240
|
class="${o$2({"-size-small":"small"===this.size||!this.size,"-size-medium":"medium"===this.size,"-size-large":"large"===this.size,"-size-extra-large":"extra-large"===this.size})}"
|
|
1241
1241
|
@click=${__classPrivateFieldGet(this,_Dialog_instances,"m",_Dialog_handleClick)}
|
|
@@ -1246,7 +1246,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1246
1246
|
<slot name="footer"></slot>
|
|
1247
1247
|
<slot name="actions"></slot>
|
|
1248
1248
|
</dialog>
|
|
1249
|
-
`}updated(t){var e;super.updated(t),t.has("variant")&&__classPrivateFieldGet(this,_Dialog_contextProvider,"f").setValue({variant:null!==(e=this.variant)&&void 0!==e?e:"neutral"}),t.has("open")&&__classPrivateFieldGet(this,_Dialog_instances,"m",_Dialog_toggleVisibility).call(this,t.get("open"))}show(){this.open=!0}hide(){this.open=!1}}_Dialog_contextProvider=new WeakMap,_Dialog_instances=new WeakSet,_Dialog_dialog_get=function(){var t;return null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("dialog")},_Dialog_toggleVisibility=async function(t){const e=__classPrivateFieldGet(this,_Dialog_instances,"a",_Dialog_dialog_get);e&&(!t&&this.open?(this.style.display="block",__classPrivateFieldGet(this,_Dialog_instances,"m",_Dialog_emitLifecycleEvent).call(this,"m-opening"),e.showModal(),await waitForAnimations_1(e),__classPrivateFieldGet(this,_Dialog_instances,"m",_Dialog_emitLifecycleEvent).call(this,"m-opened")):t&&!this.open?(__classPrivateFieldGet(this,_Dialog_instances,"m",_Dialog_emitLifecycleEvent).call(this,"m-closing"),e.classList.add("is-hiding"),await waitForAnimations_1(e),e.classList.remove("is-hiding"),e.close(),__classPrivateFieldGet(this,_Dialog_instances,"m",_Dialog_emitLifecycleEvent).call(this,"m-closed"),this.style.display="none"):null!=t||this.open||(this.style.display="none"))},_Dialog_emitLifecycleEvent=function(t){this.emit(t,{cancelable:!1,bubbles:!1})},_Dialog_emitCloseEvent=function(){this.open&&this.emit("m-close")},_Dialog_handleClick=function(t){var e;const o=t.target instanceof HTMLDialogElement,i=null===(e=__classPrivateFieldGet(this,_Dialog_instances,"a",_Dialog_dialog_get))||void 0===e?void 0:e.getBoundingClientRect();if(o&&i){(t.clientY<i.top||t.clientY>i.bottom||t.clientX<i.left||t.clientX>i.right)&&(t.preventDefault(),t.stopPropagation(),__classPrivateFieldGet(this,_Dialog_instances,"m",_Dialog_emitCloseEvent).call(this))}},_Dialog_handleCancel=function(t){t.preventDefault(),__classPrivateFieldGet(this,_Dialog_instances,"m",_Dialog_emitCloseEvent).call(this)},Dialog.styles=[styles$
|
|
1249
|
+
`}updated(t){var e;super.updated(t),t.has("variant")&&__classPrivateFieldGet(this,_Dialog_contextProvider,"f").setValue({variant:null!==(e=this.variant)&&void 0!==e?e:"neutral"}),t.has("open")&&__classPrivateFieldGet(this,_Dialog_instances,"m",_Dialog_toggleVisibility).call(this,t.get("open"))}show(){this.open=!0}hide(){this.open=!1}}_Dialog_contextProvider=new WeakMap,_Dialog_instances=new WeakSet,_Dialog_dialog_get=function(){var t;return null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("dialog")},_Dialog_toggleVisibility=async function(t){const e=__classPrivateFieldGet(this,_Dialog_instances,"a",_Dialog_dialog_get);e&&(!t&&this.open?(this.style.display="block",__classPrivateFieldGet(this,_Dialog_instances,"m",_Dialog_emitLifecycleEvent).call(this,"m-opening"),e.showModal(),await waitForAnimations_1(e),__classPrivateFieldGet(this,_Dialog_instances,"m",_Dialog_emitLifecycleEvent).call(this,"m-opened")):t&&!this.open?(__classPrivateFieldGet(this,_Dialog_instances,"m",_Dialog_emitLifecycleEvent).call(this,"m-closing"),e.classList.add("is-hiding"),await waitForAnimations_1(e),e.classList.remove("is-hiding"),e.close(),__classPrivateFieldGet(this,_Dialog_instances,"m",_Dialog_emitLifecycleEvent).call(this,"m-closed"),this.style.display="none"):null!=t||this.open||(this.style.display="none"))},_Dialog_emitLifecycleEvent=function(t){this.emit(t,{cancelable:!1,bubbles:!1})},_Dialog_emitCloseEvent=function(){this.open&&this.emit("m-close")},_Dialog_handleClick=function(t){var e;const o=t.target instanceof HTMLDialogElement,i=null===(e=__classPrivateFieldGet(this,_Dialog_instances,"a",_Dialog_dialog_get))||void 0===e?void 0:e.getBoundingClientRect();if(o&&i){(t.clientY<i.top||t.clientY>i.bottom||t.clientX<i.left||t.clientX>i.right)&&(t.preventDefault(),t.stopPropagation(),__classPrivateFieldGet(this,_Dialog_instances,"m",_Dialog_emitCloseEvent).call(this))}},_Dialog_handleCancel=function(t){t.preventDefault(),__classPrivateFieldGet(this,_Dialog_instances,"m",_Dialog_emitCloseEvent).call(this)},Dialog.styles=[styles$r()],window.customElements.define("m-dialog",Dialog);const DIALOG_SIZES=["small","medium","large","extra-large"],DIALOG_VARIANTS=["neutral","success","warning","danger"];var _DialogActionPrimary_contextCallback,_BaseLayout_setOrRemoveProperty;class DialogActionPrimary extends Button{constructor(){super(),_DialogActionPrimary_contextCallback.set(this,(t=>{switch(t.variant){case"danger":this.variant="danger";break;case"warning":this.variant="warning";break;default:this.variant="primary"}})),this.type="button",this.variant="primary",this.context=new s$2(this,dialogContext,__classPrivateFieldGet(this,_DialogActionPrimary_contextCallback,"f"),!0)}}_DialogActionPrimary_contextCallback=new WeakMap,window.customElements.define("m-dialog-action-primary",DialogActionPrimary);class DialogActionSecondary extends Button{constructor(){super(),this.type="button",this.variant="secondary"}}window.customElements.define("m-dialog-action-secondary",DialogActionSecondary);class DialogActionTertiary extends Button{constructor(){super(),this.type="button",this.variant="tertiary"}}window.customElements.define("m-dialog-action-tertiary",DialogActionTertiary);class BaseLayout extends s$5{constructor(){super(...arguments),_BaseLayout_setOrRemoveProperty.set(this,((t,e)=>{e?this.style.setProperty(t,toSpacingCSSValue(e)):this.style.removeProperty(t)}))}static get properties(){return{padding:{type:String},paddingX:{type:String,attribute:"padding-x"},paddingY:{type:String,attribute:"padding-y"},paddingT:{type:String,attribute:"padding-t"},paddingB:{type:String,attribute:"padding-b"},paddingL:{type:String,attribute:"padding-l"},paddingR:{type:String,attribute:"padding-r"}}}getCSSPropertiesPrefix(){return"layout"}update(t){super.update(t);const e=this.getCSSPropertiesPrefix();t.has("padding")&&this.style.setProperty(`--m-${e}-padding`,toSpacingCSSValue(this.padding)),t.has("paddingX")&&__classPrivateFieldGet(this,_BaseLayout_setOrRemoveProperty,"f").call(this,`--m-${e}-padding-x`,this.paddingX),t.has("paddingY")&&__classPrivateFieldGet(this,_BaseLayout_setOrRemoveProperty,"f").call(this,`--m-${e}-padding-y`,this.paddingY),t.has("paddingT")&&__classPrivateFieldGet(this,_BaseLayout_setOrRemoveProperty,"f").call(this,`--m-${e}-padding-t`,this.paddingT),t.has("paddingB")&&__classPrivateFieldGet(this,_BaseLayout_setOrRemoveProperty,"f").call(this,`--m-${e}-padding-b`,this.paddingB),t.has("paddingL")&&__classPrivateFieldGet(this,_BaseLayout_setOrRemoveProperty,"f").call(this,`--m-${e}-padding-l`,this.paddingL),t.has("paddingR")&&__classPrivateFieldGet(this,_BaseLayout_setOrRemoveProperty,"f").call(this,`--m-${e}-padding-r`,this.paddingR)}render(){return x`<slot></slot>`}}function getBaseLayoutStyles(t){return i$4`
|
|
1250
1250
|
:host {
|
|
1251
1251
|
/** reset layout custom properties to avoid inheritance */
|
|
1252
1252
|
--m-${r$5(t)}-padding-x: initial;
|
|
@@ -1298,21 +1298,21 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1298
1298
|
align-items: var(--m-group-align);
|
|
1299
1299
|
justify-content: var(--m-group-justify);
|
|
1300
1300
|
}
|
|
1301
|
-
`}class Group extends BaseLayout{static get properties(){return{...super.properties,gap:{type:String},align:{type:String},justify:{type:String}}}getCSSPropertiesPrefix(){return Group.CSSPropertiesPrefix}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-group-gap",toSpacingCSSValue(this.gap,defaultGroupProps.gap)),t.has("align")&&this.style.setProperty("--m-group-align",this.align||defaultGroupProps.align),t.has("justify")&&this.style.setProperty("--m-group-justify",this.justify||defaultGroupProps.justify)}render(){return x
|
|
1301
|
+
`}class Group extends BaseLayout{static get properties(){return{...super.properties,gap:{type:String},align:{type:String},justify:{type:String}}}getCSSPropertiesPrefix(){return Group.CSSPropertiesPrefix}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-group-gap",toSpacingCSSValue(this.gap,defaultGroupProps.gap)),t.has("align")&&this.style.setProperty("--m-group-align",this.align||defaultGroupProps.align),t.has("justify")&&this.style.setProperty("--m-group-justify",this.justify||defaultGroupProps.justify)}render(){return x`<slot></slot>`}}Group.CSSPropertiesPrefix="group",Group.styles=[getBaseLayoutStyles(Group.CSSPropertiesPrefix),groupStyles()],window.customElements.define("m-group",Group);class DialogActions extends Group{constructor(){super(),this.align="center",this.gap="spacing-3",this.justify="flex-end"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","actions")}}function styles$q(){return i$4`
|
|
1302
1302
|
:host {
|
|
1303
1303
|
overflow-y: auto;
|
|
1304
1304
|
overscroll-behavior: contain;
|
|
1305
1305
|
|
|
1306
1306
|
${typography("body-md")};
|
|
1307
1307
|
}
|
|
1308
|
-
`}window.customElements.define("m-dialog-actions",DialogActions);class DialogBody extends s$5{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","body")}render(){return x
|
|
1308
|
+
`}window.customElements.define("m-dialog-actions",DialogActions);class DialogBody extends s$5{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","body")}render(){return x`<slot></slot>`}}DialogBody.styles=[styles$q()],window.customElements.define("m-dialog-body",DialogBody);class DialogClose extends CloseButton{constructor(){super(),this.size="large"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","close")}}window.customElements.define("m-dialog-close",DialogClose);class DialogFooter extends s$5{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","footer")}render(){return x`<slot></slot>`}}function styles$p(){return i$4`
|
|
1309
1309
|
h1 {
|
|
1310
1310
|
margin: 0;
|
|
1311
1311
|
padding: 0;
|
|
1312
1312
|
|
|
1313
1313
|
${typography("heading-md-bold")};
|
|
1314
1314
|
}
|
|
1315
|
-
`}window.customElements.define("m-dialog-footer",DialogFooter);const ALIGN_ITEMS_VALUES=["center","flex-start","flex-end","stretch"],JUSTIFY_CONTENT_VALUES=["center","flex-start","flex-end","space-between","space-around","space-evenly"],defaultBoxProps={padding:"spacing-4",borderRadius:"border-radius-s",borderWidth:"border-none",borderColor:"color-background-highlight",textAlign:"left"};function boxStyles(){return i$4`
|
|
1315
|
+
`}window.customElements.define("m-dialog-footer",DialogFooter);const ALIGN_ITEMS_VALUES=["baseline","center","flex-start","flex-end","stretch"],JUSTIFY_CONTENT_VALUES=["center","flex-start","flex-end","space-between","space-around","space-evenly"],defaultBoxProps={padding:"spacing-4",borderRadius:"border-radius-s",borderWidth:"border-none",borderColor:"color-background-highlight",textAlign:"left"};function boxStyles(){return i$4`
|
|
1316
1316
|
:host {
|
|
1317
1317
|
--m-box-padding: ${getToken(defaultBoxProps.padding)};
|
|
1318
1318
|
--m-box-background-color: transparent;
|
|
@@ -1331,7 +1331,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1331
1331
|
text-align: var(--m-box-text-align);
|
|
1332
1332
|
display: block;
|
|
1333
1333
|
}
|
|
1334
|
-
`}class Box extends BaseLayout{static get properties(){return{...super.properties,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"}}}getCSSPropertiesPrefix(){return Box.CSSPropertiesPrefix}update(t){var e,o,i,r;super.update(t),t.has("backgroundColor")&&this.style.setProperty("--m-box-background-color",null!==(e=this.backgroundColor&&toCSSValue(this.backgroundColor))&&void 0!==e?e:"transparent"),t.has("borderRadius")&&this.style.setProperty("--m-box-border-radius",null!==(o=this.borderRadius&&toCSSValue(this.borderRadius))&&void 0!==o?o:toCSSValue(defaultBoxProps.borderRadius)),t.has("borderWidth")&&this.style.setProperty("--m-box-border-width",null!==(i=this.borderWidth&&toCSSValue(this.borderWidth))&&void 0!==i?i:toCSSValue(defaultBoxProps.borderWidth)),t.has("borderColor")&&this.style.setProperty("--m-box-border-color",null!==(r=this.borderColor&&toCSSValue(this.borderColor))&&void 0!==r?r:toCSSValue(defaultBoxProps.borderColor)),t.has("textAlign")&&this.style.setProperty("--m-box-text-align",this.textAlign||defaultBoxProps.textAlign)}render(){return x
|
|
1334
|
+
`}class Box extends BaseLayout{static get properties(){return{...super.properties,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"}}}getCSSPropertiesPrefix(){return Box.CSSPropertiesPrefix}update(t){var e,o,i,r;super.update(t),t.has("backgroundColor")&&this.style.setProperty("--m-box-background-color",null!==(e=this.backgroundColor&&toCSSValue(this.backgroundColor))&&void 0!==e?e:"transparent"),t.has("borderRadius")&&this.style.setProperty("--m-box-border-radius",null!==(o=this.borderRadius&&toCSSValue(this.borderRadius))&&void 0!==o?o:toCSSValue(defaultBoxProps.borderRadius)),t.has("borderWidth")&&this.style.setProperty("--m-box-border-width",null!==(i=this.borderWidth&&toCSSValue(this.borderWidth))&&void 0!==i?i:toCSSValue(defaultBoxProps.borderWidth)),t.has("borderColor")&&this.style.setProperty("--m-box-border-color",null!==(r=this.borderColor&&toCSSValue(this.borderColor))&&void 0!==r?r:toCSSValue(defaultBoxProps.borderColor)),t.has("textAlign")&&this.style.setProperty("--m-box-text-align",this.textAlign||defaultBoxProps.textAlign)}render(){return x`<slot></slot>`}}Box.CSSPropertiesPrefix="box",Box.styles=[getBaseLayoutStyles(Box.CSSPropertiesPrefix),boxStyles()],window.customElements.define("m-box",Box);const defaultStackProps={gap:"spacing-4",align:"stretch",justify:"flex-start"};function stackStyles(){return i$4`
|
|
1335
1335
|
:host {
|
|
1336
1336
|
--m-stack-gap: ${getToken(defaultStackProps.gap)};
|
|
1337
1337
|
--m-stack-align: ${r$5(defaultStackProps.align)};
|
|
@@ -1344,7 +1344,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1344
1344
|
align-items: var(--m-stack-align);
|
|
1345
1345
|
justify-content: var(--m-stack-justify);
|
|
1346
1346
|
}
|
|
1347
|
-
`}class Stack extends BaseLayout{static get properties(){return{...super.properties,gap:{type:String},align:{type:String},justify:{type:String}}}getCSSPropertiesPrefix(){return Stack.CSSPropertiesPrefix}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-stack-gap",toSpacingCSSValue(this.gap,defaultStackProps.gap)),t.has("align")&&this.style.setProperty("--m-stack-align",this.align||defaultStackProps.align),t.has("justify")&&this.style.setProperty("--m-stack-justify",this.justify||defaultStackProps.justify)}render(){return x
|
|
1347
|
+
`}class Stack extends BaseLayout{static get properties(){return{...super.properties,gap:{type:String},align:{type:String},justify:{type:String}}}getCSSPropertiesPrefix(){return Stack.CSSPropertiesPrefix}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-stack-gap",toSpacingCSSValue(this.gap,defaultStackProps.gap)),t.has("align")&&this.style.setProperty("--m-stack-align",this.align||defaultStackProps.align),t.has("justify")&&this.style.setProperty("--m-stack-justify",this.justify||defaultStackProps.justify)}render(){return x`<slot></slot>`}}Stack.CSSPropertiesPrefix="stack",Stack.styles=[getBaseLayoutStyles(Stack.CSSPropertiesPrefix),stackStyles()],window.customElements.define("m-stack",Stack);const defaultGridProps={gap:"spacing-4",minColumnWidth:getToken$1("spacing-30")};function gridStyles(){return i$4`
|
|
1348
1348
|
:host {
|
|
1349
1349
|
--m-grid-gap: ${getToken(defaultGridProps.gap)};
|
|
1350
1350
|
--m-grid-min-column-width: ${r$5(defaultGridProps.minColumnWidth)};
|
|
@@ -1359,7 +1359,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1359
1359
|
minmax(min(var(--m-grid-min-column-width), 100%), 1fr)
|
|
1360
1360
|
);
|
|
1361
1361
|
}
|
|
1362
|
-
`}class Grid extends BaseLayout{static get properties(){return{...super.properties,gap:{type:String},rowGap:{type:String,attribute:"row-gap"},columnGap:{type:String,attribute:"column-gap"},minColumnWidth:{type:String,attribute:"min-column-width"}}}getCSSPropertiesPrefix(){return Grid.CSSPropertiesPrefix}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-grid-gap",toSpacingCSSValue(this.gap,defaultGridProps.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-grid-row-gap",toSpacingCSSValue(this.rowGap)):this.style.removeProperty("--m-grid-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-grid-column-gap",toSpacingCSSValue(this.columnGap)):this.style.removeProperty("--m-grid-column-gap")),t.has("minColumnWidth")&&this.style.setProperty("--m-grid-min-column-width",this.minColumnWidth||defaultGridProps.minColumnWidth)}render(){return x
|
|
1362
|
+
`}class Grid extends BaseLayout{static get properties(){return{...super.properties,gap:{type:String},rowGap:{type:String,attribute:"row-gap"},columnGap:{type:String,attribute:"column-gap"},minColumnWidth:{type:String,attribute:"min-column-width"}}}getCSSPropertiesPrefix(){return Grid.CSSPropertiesPrefix}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-grid-gap",toSpacingCSSValue(this.gap,defaultGridProps.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-grid-row-gap",toSpacingCSSValue(this.rowGap)):this.style.removeProperty("--m-grid-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-grid-column-gap",toSpacingCSSValue(this.columnGap)):this.style.removeProperty("--m-grid-column-gap")),t.has("minColumnWidth")&&this.style.setProperty("--m-grid-min-column-width",this.minColumnWidth||defaultGridProps.minColumnWidth)}render(){return x`<slot></slot>`}}Grid.CSSPropertiesPrefix="grid",Grid.styles=[getBaseLayoutStyles(Grid.CSSPropertiesPrefix),gridStyles()],window.customElements.define("m-grid",Grid);const defaultSidebarProps={gap:"spacing-4",sideWidth:"auto",minContentWidth:"50%",reversed:!1};function getFlexDirectionValue(t){return t?"row-reverse":"row"}function sidebarStyles(){return i$4`
|
|
1363
1363
|
:host {
|
|
1364
1364
|
--m-sidebar-gap: ${getToken(defaultSidebarProps.gap)};
|
|
1365
1365
|
--m-sidebar-flex-direction: ${r$5(getFlexDirectionValue(defaultSidebarProps.reversed))};
|
|
@@ -1383,7 +1383,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1383
1383
|
flex-grow: 999;
|
|
1384
1384
|
min-width: var(--m-sidebar-min-content-width);
|
|
1385
1385
|
}
|
|
1386
|
-
`}class Sidebar extends BaseLayout{static get properties(){return{...super.properties,gap:{type:String},sideWidth:{type:String,attribute:"side-width"},minContentWidth:{type:String,attribute:"min-content-width"},reversed:{type:Boolean}}}constructor(){super(),this.gap=defaultSidebarProps.gap,this.sideWidth=defaultSidebarProps.sideWidth,this.minContentWidth=defaultSidebarProps.minContentWidth,this.reversed=defaultSidebarProps.reversed}getCSSPropertiesPrefix(){return Sidebar.CSSPropertiesPrefix}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-sidebar-gap",toSpacingCSSValue(this.gap,defaultSidebarProps.gap)),t.has("sideWidth")&&this.style.setProperty("--m-sidebar-side-width",this.sideWidth||defaultSidebarProps.sideWidth),t.has("minContentWidth")&&this.style.setProperty("--m-sidebar-min-content-width",this.minContentWidth||defaultSidebarProps.minContentWidth),t.has("reversed")&&this.style.setProperty("--m-sidebar-flex-direction",getFlexDirectionValue(this.reversed))}render(){return x
|
|
1386
|
+
`}class Sidebar extends BaseLayout{static get properties(){return{...super.properties,gap:{type:String},sideWidth:{type:String,attribute:"side-width"},minContentWidth:{type:String,attribute:"min-content-width"},reversed:{type:Boolean}}}constructor(){super(),this.gap=defaultSidebarProps.gap,this.sideWidth=defaultSidebarProps.sideWidth,this.minContentWidth=defaultSidebarProps.minContentWidth,this.reversed=defaultSidebarProps.reversed}getCSSPropertiesPrefix(){return Sidebar.CSSPropertiesPrefix}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-sidebar-gap",toSpacingCSSValue(this.gap,defaultSidebarProps.gap)),t.has("sideWidth")&&this.style.setProperty("--m-sidebar-side-width",this.sideWidth||defaultSidebarProps.sideWidth),t.has("minContentWidth")&&this.style.setProperty("--m-sidebar-min-content-width",this.minContentWidth||defaultSidebarProps.minContentWidth),t.has("reversed")&&this.style.setProperty("--m-sidebar-flex-direction",getFlexDirectionValue(this.reversed))}render(){return x`
|
|
1387
1387
|
<slot name="sidebar"></slot>
|
|
1388
1388
|
<slot name="content"></slot>
|
|
1389
1389
|
`}}Sidebar.CSSPropertiesPrefix="sidebar",Sidebar.styles=[getBaseLayoutStyles(Sidebar.CSSPropertiesPrefix),sidebarStyles()],window.customElements.define("m-sidebar",Sidebar);const defaultSwitcherProps={gap:"spacing-4",threshold:"10rem"};function switcherStyles(){return i$4`
|
|
@@ -1402,7 +1402,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1402
1402
|
flex-basis: calc((var(--m-switcher-threshold) - 100%) * 999);
|
|
1403
1403
|
flex-grow: 1;
|
|
1404
1404
|
}
|
|
1405
|
-
`}class Switcher extends BaseLayout{static get properties(){return{...super.properties,gap:{type:String},rowGap:{type:String,attribute:"row-gap"},columnGap:{type:String,attribute:"column-gap"},threshold:{type:String},limit:{type:Number}}}getCSSPropertiesPrefix(){return Switcher.CSSPropertiesPrefix}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-switcher-gap",toSpacingCSSValue(this.gap,defaultSwitcherProps.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-switcher-row-gap",toSpacingCSSValue(this.rowGap)):this.style.removeProperty("--m-switcher-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-switcher-column-gap",toSpacingCSSValue(this.columnGap)):this.style.removeProperty("--m-switcher-column-gap")),t.has("threshold")&&this.style.setProperty("--m-switcher-threshold",this.threshold||defaultSwitcherProps.threshold)}render(){const t=this.limit?x
|
|
1405
|
+
`}class Switcher extends BaseLayout{static get properties(){return{...super.properties,gap:{type:String},rowGap:{type:String,attribute:"row-gap"},columnGap:{type:String,attribute:"column-gap"},threshold:{type:String},limit:{type:Number}}}getCSSPropertiesPrefix(){return Switcher.CSSPropertiesPrefix}update(t){super.update(t),t.has("gap")&&this.style.setProperty("--m-switcher-gap",toSpacingCSSValue(this.gap,defaultSwitcherProps.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-switcher-row-gap",toSpacingCSSValue(this.rowGap)):this.style.removeProperty("--m-switcher-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-switcher-column-gap",toSpacingCSSValue(this.columnGap)):this.style.removeProperty("--m-switcher-column-gap")),t.has("threshold")&&this.style.setProperty("--m-switcher-threshold",this.threshold||defaultSwitcherProps.threshold)}render(){const t=this.limit?x`
|
|
1406
1406
|
<style>
|
|
1407
1407
|
::slotted(*:nth-last-child(n + ${this.limit+1})) {
|
|
1408
1408
|
flex-basis: 100%;
|
|
@@ -1411,10 +1411,10 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1411
1411
|
flex-basis: 100%;
|
|
1412
1412
|
}
|
|
1413
1413
|
</style>
|
|
1414
|
-
`:"";return x
|
|
1414
|
+
`:"";return x`
|
|
1415
1415
|
${t}
|
|
1416
1416
|
<slot></slot>
|
|
1417
|
-
`}}var _DialogHeader_instances,_DialogHeader_context,_DialogHeader_icon_get,_Drawer_instances,_Drawer_dialog_get,_Drawer_toggleVisibility,_Drawer_emitLifecycleEvent,_Drawer_emitCloseEvent,_Drawer_handleClick,_Drawer_handleCancel;Switcher.CSSPropertiesPrefix="switcher",Switcher.styles=[getBaseLayoutStyles(Switcher.CSSPropertiesPrefix),switcherStyles()],window.customElements.define("m-switcher",Switcher);class DialogHeader extends Component{constructor(){super(),_DialogHeader_instances.add(this),_DialogHeader_context.set(this,void 0),__classPrivateFieldSet(this,_DialogHeader_context,new s$2(this,dialogContext,void 0,!0),"f")}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","header")}render(){return x
|
|
1417
|
+
`}}var _DialogHeader_instances,_DialogHeader_context,_DialogHeader_icon_get,_Drawer_instances,_Drawer_dialog_get,_Drawer_toggleVisibility,_Drawer_emitLifecycleEvent,_Drawer_emitCloseEvent,_Drawer_handleClick,_Drawer_handleCancel;Switcher.CSSPropertiesPrefix="switcher",Switcher.styles=[getBaseLayoutStyles(Switcher.CSSPropertiesPrefix),switcherStyles()],window.customElements.define("m-switcher",Switcher);class DialogHeader extends Component{constructor(){super(),_DialogHeader_instances.add(this),_DialogHeader_context.set(this,void 0),__classPrivateFieldSet(this,_DialogHeader_context,new s$2(this,dialogContext,void 0,!0),"f")}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","header")}render(){return x`
|
|
1418
1418
|
<m-group gap="spacing-6" align="center">
|
|
1419
1419
|
<m-group gap="spacing-1" align="center" style="flex-grow: 1;">
|
|
1420
1420
|
${__classPrivateFieldGet(this,_DialogHeader_instances,"a",_DialogHeader_icon_get)}
|
|
@@ -1422,7 +1422,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1422
1422
|
</m-group>
|
|
1423
1423
|
<slot name="close"></slot>
|
|
1424
1424
|
</m-group>
|
|
1425
|
-
`}}function styles$
|
|
1425
|
+
`}}function styles$o(){return i$4`
|
|
1426
1426
|
:host {
|
|
1427
1427
|
--margin: ${getToken("spacing-6")};
|
|
1428
1428
|
--padding: ${getToken("spacing-6")};
|
|
@@ -1516,34 +1516,34 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1516
1516
|
opacity: 0;
|
|
1517
1517
|
}
|
|
1518
1518
|
}
|
|
1519
|
-
`}_DialogHeader_context=new WeakMap,_DialogHeader_instances=new WeakSet,_DialogHeader_icon_get=function(){const{value:t}=__classPrivateFieldGet(this,_DialogHeader_context,"f");let e,o;switch(null==t?void 0:t.variant){case"danger":e="attention",o="color-danger-60";break;case"warning":e="alert-circle",o="color-warning-60";break;case"success":e="check",o="color-success-60";break;default:return A}return x
|
|
1519
|
+
`}_DialogHeader_context=new WeakMap,_DialogHeader_instances=new WeakSet,_DialogHeader_icon_get=function(){const{value:t}=__classPrivateFieldGet(this,_DialogHeader_context,"f");let e,o;switch(null==t?void 0:t.variant){case"danger":e="attention",o="color-danger-60";break;case"warning":e="alert-circle",o="color-warning-60";break;case"success":e="check",o="color-success-60";break;default:return A}return x`
|
|
1520
1520
|
<m-icon name=${e} color=${o} size="24" aria-hidden="true"></m-icon>
|
|
1521
|
-
`},DialogHeader.styles=[styles$
|
|
1521
|
+
`},DialogHeader.styles=[styles$p()],window.customElements.define("m-dialog-header",DialogHeader),attachContextRoot();class Drawer extends Component{static get properties(){return{open:{type:Boolean,reflect:!0},size:{type:String,reflect:!0},icon:{type:String,reflect:!0}}}constructor(){super(),_Drawer_instances.add(this),this.open=!1,this.size="small"}render(){return x`
|
|
1522
1522
|
<dialog @click=${__classPrivateFieldGet(this,_Drawer_instances,"m",_Drawer_handleClick)} @cancel=${__classPrivateFieldGet(this,_Drawer_instances,"m",_Drawer_handleCancel)}>
|
|
1523
1523
|
<slot name="header"></slot>
|
|
1524
1524
|
<slot name="body"></slot>
|
|
1525
1525
|
<slot name="actions"></slot>
|
|
1526
1526
|
</dialog>
|
|
1527
|
-
`}updated(t){super.updated(t),t.has("open")&&__classPrivateFieldGet(this,_Drawer_instances,"m",_Drawer_toggleVisibility).call(this,t.get("open"))}show(){this.open=!0}hide(){this.open=!1}}_Drawer_instances=new WeakSet,_Drawer_dialog_get=function(){var t;return null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("dialog")},_Drawer_toggleVisibility=async function(t){const e=__classPrivateFieldGet(this,_Drawer_instances,"a",_Drawer_dialog_get);e&&(!t&&this.open?(this.style.display="block",__classPrivateFieldGet(this,_Drawer_instances,"m",_Drawer_emitLifecycleEvent).call(this,"m-opening"),e.showModal(),await waitForAnimations_1(e),__classPrivateFieldGet(this,_Drawer_instances,"m",_Drawer_emitLifecycleEvent).call(this,"m-opened")):t&&!this.open?(__classPrivateFieldGet(this,_Drawer_instances,"m",_Drawer_emitLifecycleEvent).call(this,"m-closing"),e.classList.add("is-hiding"),await waitForAnimations_1(e),e.classList.remove("is-hiding"),e.close(),__classPrivateFieldGet(this,_Drawer_instances,"m",_Drawer_emitLifecycleEvent).call(this,"m-closed"),this.style.display="none"):null!=t||this.open||(this.style.display="none"))},_Drawer_emitLifecycleEvent=function(t){this.emit(t,{cancelable:!1,bubbles:!1})},_Drawer_emitCloseEvent=function(){this.open&&this.emit("m-close")},_Drawer_handleClick=function(t){var e;const o=t.target instanceof HTMLDialogElement,i=null===(e=__classPrivateFieldGet(this,_Drawer_instances,"a",_Drawer_dialog_get))||void 0===e?void 0:e.getBoundingClientRect();if(o&&i){(t.clientY<i.top||t.clientY>i.bottom||t.clientX<i.left||t.clientX>i.right)&&(t.preventDefault(),t.stopPropagation(),__classPrivateFieldGet(this,_Drawer_instances,"m",_Drawer_emitCloseEvent).call(this))}},_Drawer_handleCancel=function(t){t.preventDefault(),__classPrivateFieldGet(this,_Drawer_instances,"m",_Drawer_emitCloseEvent).call(this)},Drawer.styles=[styles$
|
|
1527
|
+
`}updated(t){super.updated(t),t.has("open")&&__classPrivateFieldGet(this,_Drawer_instances,"m",_Drawer_toggleVisibility).call(this,t.get("open"))}show(){this.open=!0}hide(){this.open=!1}}_Drawer_instances=new WeakSet,_Drawer_dialog_get=function(){var t;return null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("dialog")},_Drawer_toggleVisibility=async function(t){const e=__classPrivateFieldGet(this,_Drawer_instances,"a",_Drawer_dialog_get);e&&(!t&&this.open?(this.style.display="block",__classPrivateFieldGet(this,_Drawer_instances,"m",_Drawer_emitLifecycleEvent).call(this,"m-opening"),e.showModal(),await waitForAnimations_1(e),__classPrivateFieldGet(this,_Drawer_instances,"m",_Drawer_emitLifecycleEvent).call(this,"m-opened")):t&&!this.open?(__classPrivateFieldGet(this,_Drawer_instances,"m",_Drawer_emitLifecycleEvent).call(this,"m-closing"),e.classList.add("is-hiding"),await waitForAnimations_1(e),e.classList.remove("is-hiding"),e.close(),__classPrivateFieldGet(this,_Drawer_instances,"m",_Drawer_emitLifecycleEvent).call(this,"m-closed"),this.style.display="none"):null!=t||this.open||(this.style.display="none"))},_Drawer_emitLifecycleEvent=function(t){this.emit(t,{cancelable:!1,bubbles:!1})},_Drawer_emitCloseEvent=function(){this.open&&this.emit("m-close")},_Drawer_handleClick=function(t){var e;const o=t.target instanceof HTMLDialogElement,i=null===(e=__classPrivateFieldGet(this,_Drawer_instances,"a",_Drawer_dialog_get))||void 0===e?void 0:e.getBoundingClientRect();if(o&&i){(t.clientY<i.top||t.clientY>i.bottom||t.clientX<i.left||t.clientX>i.right)&&(t.preventDefault(),t.stopPropagation(),__classPrivateFieldGet(this,_Drawer_instances,"m",_Drawer_emitCloseEvent).call(this))}},_Drawer_handleCancel=function(t){t.preventDefault(),__classPrivateFieldGet(this,_Drawer_instances,"m",_Drawer_emitCloseEvent).call(this)},Drawer.styles=[styles$o()],window.customElements.define("m-drawer",Drawer);const DRAWER_SIZES=["small","medium"];class DrawerActionPrimary extends Button{constructor(){super(),this.variant="primary"}}window.customElements.define("m-drawer-action-primary",DrawerActionPrimary);class DrawerActionSecondary extends Button{constructor(){super(),this.variant="secondary"}}window.customElements.define("m-drawer-action-secondary",DrawerActionSecondary);class DrawerActionTertiary extends Button{constructor(){super(),this.variant="tertiary"}}function styles$n(){return i$4`
|
|
1528
1528
|
:host {
|
|
1529
1529
|
margin-top: auto;
|
|
1530
1530
|
margin-left: auto;
|
|
1531
1531
|
}
|
|
1532
|
-
`}window.customElements.define("m-drawer-action-tertiary",DrawerActionTertiary);class DrawerActions extends Group{constructor(){super(),this.align="center",this.gap="spacing-3",this.justify="flex-end"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","actions")}}function styles$
|
|
1532
|
+
`}window.customElements.define("m-drawer-action-tertiary",DrawerActionTertiary);class DrawerActions extends Group{constructor(){super(),this.align="center",this.gap="spacing-3",this.justify="flex-end"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","actions")}}function styles$m(){return i$4`
|
|
1533
1533
|
:host {
|
|
1534
1534
|
overflow-y: auto;
|
|
1535
1535
|
overscroll-behavior: contain;
|
|
1536
1536
|
|
|
1537
1537
|
${typography("body-md")};
|
|
1538
1538
|
}
|
|
1539
|
-
`}DrawerActions.styles=[...Group.styles,styles$
|
|
1539
|
+
`}DrawerActions.styles=[...Group.styles,styles$n()],window.customElements.define("m-drawer-actions",DrawerActions);class DrawerBody extends s$5{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","body")}render(){return x`<slot></slot>`}}DrawerBody.styles=[styles$m()],window.customElements.define("m-drawer-body",DrawerBody);class DrawerClose extends CloseButton{constructor(){super(),this.size="large"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","close")}}function styles$l(){return i$4`
|
|
1540
1540
|
h1 {
|
|
1541
1541
|
margin: 0;
|
|
1542
1542
|
padding: 0;
|
|
1543
1543
|
|
|
1544
1544
|
${typography("heading-md-bold")};
|
|
1545
1545
|
}
|
|
1546
|
-
`}window.customElements.define("m-drawer-close",DrawerClose);class DrawerHeader extends Component{static get properties(){return{slot:{type:String,reflect:!0}}}constructor(){super(),this.slot="header"}render(){return x
|
|
1546
|
+
`}window.customElements.define("m-drawer-close",DrawerClose);class DrawerHeader extends Component{static get properties(){return{slot:{type:String,reflect:!0}}}constructor(){super(),this.slot="header"}render(){return x`
|
|
1547
1547
|
<m-group gap="spacing-6" align="center">
|
|
1548
1548
|
<m-group gap="spacing-1" align="center" style="flex-grow: 1;">
|
|
1549
1549
|
<slot name="leading"></slot>
|
|
@@ -1551,7 +1551,166 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1551
1551
|
</m-group>
|
|
1552
1552
|
<slot name="close"></slot>
|
|
1553
1553
|
</m-group>
|
|
1554
|
-
`}}DrawerHeader.styles=[styles$
|
|
1554
|
+
`}}DrawerHeader.styles=[styles$l()],window.customElements.define("m-drawer-header",DrawerHeader);const emptyStateContext=n$2(Symbol("empty-state"));function getActionSize(t){switch(t){case"panel":case"card":case"card-horizontal":return"small";default:return"default"}}var _EmptyStateAction_contextCallback,_EmptyStateHeader_contextCallback;class EmptyStateAction extends Button{constructor(){super(),_EmptyStateAction_contextCallback.set(this,(({variant:t})=>{this.size=getActionSize(t)})),this.type="button",this.variant="primary",this.context=new s$2(this,{context:emptyStateContext,callback:__classPrivateFieldGet(this,_EmptyStateAction_contextCallback,"f"),subscribe:!0})}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","action")}}_EmptyStateAction_contextCallback=new WeakMap,window.customElements.define("m-empty-state-action",EmptyStateAction);class EmptyStateHeader extends Text{constructor(){super(),_EmptyStateHeader_contextCallback.set(this,(t=>{switch(t.variant){case"panel":this.variant="body-md-bold";break;case"card":case"card-horizontal":this.variant="body-sm-bold";break;default:this.variant="heading-sm-bold"}})),this.variant="heading-sm-bold",this.context=new s$2(this,{context:emptyStateContext,callback:__classPrivateFieldGet(this,_EmptyStateHeader_contextCallback,"f"),subscribe:!0})}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","header")}}function styles$k(){return i$4`
|
|
1555
|
+
slot {
|
|
1556
|
+
display: block;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
:host {
|
|
1560
|
+
max-width: 320px;
|
|
1561
|
+
display: flex;
|
|
1562
|
+
flex-direction: column;
|
|
1563
|
+
align-items: center;
|
|
1564
|
+
justify-content: center;
|
|
1565
|
+
gap: ${getToken("spacing-4")};
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
:host([variant|='card']) {
|
|
1569
|
+
gap: ${getToken("spacing-2")};
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
:host([variant='card-horizontal']) {
|
|
1573
|
+
flex-direction: row;
|
|
1574
|
+
max-width: 100%;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
.empty-state-body {
|
|
1578
|
+
display: flex;
|
|
1579
|
+
flex-direction: column;
|
|
1580
|
+
align-items: center;
|
|
1581
|
+
justify-content: center;
|
|
1582
|
+
text-align: center;
|
|
1583
|
+
gap: ${getToken("spacing-2")};
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
/* Hide illustration when it isn't a supported element */
|
|
1587
|
+
slot[name='illustration']::slotted(
|
|
1588
|
+
:not(m-empty-state-illustration, img, svg)
|
|
1589
|
+
) {
|
|
1590
|
+
display: none;
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
/* Illustration Wrapper */
|
|
1594
|
+
|
|
1595
|
+
.illustration-wrapper {
|
|
1596
|
+
overflow: hidden;
|
|
1597
|
+
max-width: 320px;
|
|
1598
|
+
max-height: 240px;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
:host([variant='panel']) .illustration-wrapper {
|
|
1602
|
+
max-width: 160px;
|
|
1603
|
+
max-height: 120px;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
:host([variant='card']) .illustration-wrapper {
|
|
1607
|
+
max-height: 36px;
|
|
1608
|
+
max-width: 36px;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
:host([variant='card-horizontal']) .illustration-wrapper {
|
|
1612
|
+
max-height: 24px;
|
|
1613
|
+
max-width: 24px;
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
/* Illustration */
|
|
1617
|
+
|
|
1618
|
+
slot[name='illustration'] img,
|
|
1619
|
+
slot[name='illustration']::slotted(:is(img, svg)) {
|
|
1620
|
+
display: block;
|
|
1621
|
+
object-fit: scale-down;
|
|
1622
|
+
max-width: 320px;
|
|
1623
|
+
max-height: 240px;
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
:host([variant='panel']) slot[name='illustration'] img,
|
|
1627
|
+
:host([variant='panel']) slot[name='illustration']::slotted(:is(img, svg)) {
|
|
1628
|
+
max-width: 160px;
|
|
1629
|
+
max-height: 120px;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
:host([variant='card']) slot[name='illustration'] img,
|
|
1633
|
+
:host([variant='card']) slot[name='illustration']::slotted(:is(img, svg)) {
|
|
1634
|
+
max-width: 36px;
|
|
1635
|
+
max-height: 36px;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
:host([variant='card-horizontal']) slot[name='illustration'] img,
|
|
1639
|
+
:host([variant='card-horizontal'])
|
|
1640
|
+
slot[name='illustration']::slotted(:is(img, svg)) {
|
|
1641
|
+
max-width: 24px;
|
|
1642
|
+
max-height: 24px;
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
/* Header */
|
|
1646
|
+
|
|
1647
|
+
slot[name='header'] {
|
|
1648
|
+
${getColor("color-text-primary")};
|
|
1649
|
+
${typography("heading-sm-bold")};
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
:host([variant='panel']) slot[name='header'] {
|
|
1653
|
+
${typography("body-md-bold")};
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
:host([variant|='card']) slot[name='header'] {
|
|
1657
|
+
${typography("body-sm-bold")};
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
/* Message */
|
|
1661
|
+
|
|
1662
|
+
slot[name='message'] {
|
|
1663
|
+
${getColor("color-text-secondary")};
|
|
1664
|
+
${typography("body-md")};
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
:host([variant='panel']) slot[name='message'] {
|
|
1668
|
+
${typography("body-sm")};
|
|
1669
|
+
}
|
|
1670
|
+
`}function illustrationStyles(){return i$4`
|
|
1671
|
+
m-empty-state > m-empty-state-illustration :is(img, svg) {
|
|
1672
|
+
display: block;
|
|
1673
|
+
object-fit: scale-down;
|
|
1674
|
+
max-width: 320px;
|
|
1675
|
+
max-height: 240px;
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
m-empty-state[variant='panel'] > m-empty-state-illustration :is(img, svg) {
|
|
1679
|
+
max-width: 160px;
|
|
1680
|
+
max-height: 120px;
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
m-empty-state[variant='card'] > m-empty-state-illustration :is(img, svg) {
|
|
1684
|
+
width: 36px;
|
|
1685
|
+
height: 36px;
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
m-empty-state[variant='card-horizontal']
|
|
1689
|
+
> m-empty-state-illustration
|
|
1690
|
+
:is(img, svg) {
|
|
1691
|
+
width: 24px;
|
|
1692
|
+
height: 24px;
|
|
1693
|
+
}
|
|
1694
|
+
`}_EmptyStateHeader_contextCallback=new WeakMap,window.customElements.define("m-empty-state-header",EmptyStateHeader);const style=document.createElement("style");style.textContent=illustrationStyles().cssText,document.head.appendChild(style);class EmptyStateIllustration extends s$5{createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","illustration")}}var _EmptyStateMessage_contextCallback,_EmptyState_instances,_EmptyState_contextProvider,_EmptyState_handleClickAction;window.customElements.define("m-empty-state-illustration",EmptyStateIllustration);class EmptyStateMessage extends Text{constructor(){super(),_EmptyStateMessage_contextCallback.set(this,(t=>{if("panel"===t.variant)this.variant="body-sm";else this.variant="body-md"})),this.variant="body-md",this.context=new s$2(this,{context:emptyStateContext,callback:__classPrivateFieldGet(this,_EmptyStateMessage_contextCallback,"f"),subscribe:!0})}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","message")}}_EmptyStateMessage_contextCallback=new WeakMap,window.customElements.define("m-empty-state-message",EmptyStateMessage),attachContextRoot();class EmptyState extends Component{static get properties(){return{variant:{type:String,reflect:!0},illustration:{type:String,reflect:!0},header:{type:String,reflect:!0},message:{type:String,reflect:!0},action:{type:String,reflect:!0}}}constructor(){super(),_EmptyState_instances.add(this),_EmptyState_contextProvider.set(this,new e$2(this,{context:emptyStateContext,initialValue:{variant:void 0}})),this.variant="page"}updated(t){var e;super.updated(t),t.has("variant")&&__classPrivateFieldGet(this,_EmptyState_contextProvider,"f").setValue({variant:null!==(e=this.variant)&&void 0!==e?e:"page"})}render(){var t;const e=this.illustration?n$4`<img role="presentation" src=${this.illustration} />`:A,o=(null===(t=this.variant)||void 0===t?void 0:t.startsWith("card"))?n$4`<slot name="header">${this.header}</slot>`:n$4`
|
|
1695
|
+
<div class="empty-state-body">
|
|
1696
|
+
<slot name="header">${this.header}</slot>
|
|
1697
|
+
<slot name="message">${this.message}</slot>
|
|
1698
|
+
</div>
|
|
1699
|
+
`,i=this.action?n$4`
|
|
1700
|
+
<m-button
|
|
1701
|
+
type="button"
|
|
1702
|
+
variant="primary"
|
|
1703
|
+
size=${getActionSize(this.variant)}
|
|
1704
|
+
@click=${__classPrivateFieldGet(this,_EmptyState_instances,"m",_EmptyState_handleClickAction)}
|
|
1705
|
+
>${this.action}</m-button
|
|
1706
|
+
>
|
|
1707
|
+
`:A;return n$4`
|
|
1708
|
+
<div class="illustration-wrapper">
|
|
1709
|
+
<slot name="illustration">${e}</slot>
|
|
1710
|
+
</div>
|
|
1711
|
+
${o}
|
|
1712
|
+
<slot name="action">${i}</slot>
|
|
1713
|
+
`}}_EmptyState_contextProvider=new WeakMap,_EmptyState_instances=new WeakSet,_EmptyState_handleClickAction=function(t){t.preventDefault(),t.stopPropagation(),this.emit("m-action")},EmptyState.styles=[styles$k()],window.customElements.define("m-empty-state",EmptyState);const EMPTY_STATE_VARIANTS=["page","panel","card","card-horizontal"],fieldContext=n$2("field");function styles$j(){return[i$4`
|
|
1555
1714
|
:host {
|
|
1556
1715
|
--m-field-hint-color: ${getColor("color-text-tertiary")};
|
|
1557
1716
|
}
|
|
@@ -1568,13 +1727,13 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1568
1727
|
${typography("body-sm")};
|
|
1569
1728
|
color: var(--m-field-hint-color);
|
|
1570
1729
|
}
|
|
1571
|
-
`]}var _FieldHint_instances,_FieldHint_getStatus,_FieldLabel_instances,_FieldLabel_getSize,_FieldLabel_isRequired;class FieldHint extends Component{static get properties(){return{status:{type:String},slot:{type:String,reflect:!0}}}constructor(){super(),_FieldHint_instances.add(this),this.field=new s$2(this,fieldContext,void 0,!0),this.slot="hint"}render(){const t={"-status-default":"default"===__classPrivateFieldGet(this,_FieldHint_instances,"m",_FieldHint_getStatus).call(this),"-status-danger":"danger"===__classPrivateFieldGet(this,_FieldHint_instances,"m",_FieldHint_getStatus).call(this)};return x
|
|
1730
|
+
`]}var _FieldHint_instances,_FieldHint_getStatus,_FieldLabel_instances,_FieldLabel_getSize,_FieldLabel_isRequired;class FieldHint extends Component{static get properties(){return{status:{type:String},slot:{type:String,reflect:!0}}}constructor(){super(),_FieldHint_instances.add(this),this.field=new s$2(this,fieldContext,void 0,!0),this.slot="hint"}render(){const t={"-status-default":"default"===__classPrivateFieldGet(this,_FieldHint_instances,"m",_FieldHint_getStatus).call(this),"-status-danger":"danger"===__classPrivateFieldGet(this,_FieldHint_instances,"m",_FieldHint_getStatus).call(this)};return x` <m-group
|
|
1572
1731
|
gap="spacing-0-5"
|
|
1573
1732
|
align="center"
|
|
1574
1733
|
class=${o$2(t)}
|
|
1575
1734
|
>
|
|
1576
1735
|
<slot name="leading"
|
|
1577
|
-
>${"danger"===__classPrivateFieldGet(this,_FieldHint_instances,"m",_FieldHint_getStatus).call(this)?x
|
|
1736
|
+
>${"danger"===__classPrivateFieldGet(this,_FieldHint_instances,"m",_FieldHint_getStatus).call(this)?x`<m-icon
|
|
1578
1737
|
name="attention"
|
|
1579
1738
|
size="10"
|
|
1580
1739
|
color="color-danger-60"
|
|
@@ -1619,19 +1778,19 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1619
1778
|
.label.-size-small .required {
|
|
1620
1779
|
${typography("body-sm")};
|
|
1621
1780
|
}
|
|
1622
|
-
`]}_FieldHint_instances=new WeakSet,_FieldHint_getStatus=function(){var t;return this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status)},FieldHint.styles=[styles$j()],window.customElements.define("m-field-hint",FieldHint);class FieldLabel extends Component{static get properties(){return{required:{type:Boolean},size:{type:String},slot:{type:String,reflect:!0}}}constructor(){super(),_FieldLabel_instances.add(this),this.field=new s$2(this,fieldContext,void 0,!0),this.slot="label"}render(){return x
|
|
1781
|
+
`]}_FieldHint_instances=new WeakSet,_FieldHint_getStatus=function(){var t;return this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status)},FieldHint.styles=[styles$j()],window.customElements.define("m-field-hint",FieldHint);class FieldLabel extends Component{static get properties(){return{required:{type:Boolean},size:{type:String},slot:{type:String,reflect:!0}}}constructor(){super(),_FieldLabel_instances.add(this),this.field=new s$2(this,fieldContext,void 0,!0),this.slot="label"}render(){return x`<label
|
|
1623
1782
|
class=${o$2({label:!0,"-size-default":"default"===__classPrivateFieldGet(this,_FieldLabel_instances,"m",_FieldLabel_getSize).call(this),"-size-small":"small"===__classPrivateFieldGet(this,_FieldLabel_instances,"m",_FieldLabel_getSize).call(this)})}
|
|
1624
1783
|
><slot></slot>
|
|
1625
|
-
${__classPrivateFieldGet(this,_FieldLabel_instances,"m",_FieldLabel_isRequired).call(this)?x
|
|
1626
|
-
</label>`}}_FieldLabel_instances=new WeakSet,_FieldLabel_getSize=function(){var t;return this.size||(null===(t=this.field.value)||void 0===t?void 0:t.size)},_FieldLabel_isRequired=function(){var t;return null!=this.required?this.required:Boolean(null===(t=this.field.value)||void 0===t?void 0:t.required)},FieldLabel.styles=[styles$i()],window.customElements.define("m-field-label",FieldLabel),attachContextRoot();class Field extends Component{static get properties(){return{label:{type:String},hint:{type:String},required:{type:Boolean},status:{type:String},size:{type:String},align:{type:String}}}constructor(){super(),this.provider=new e$2(this,fieldContext,{required:!1,size:"default",status:"default"}),this.required=!1,this.status="default",this.size="default",this.align="stretch"}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 x
|
|
1784
|
+
${__classPrivateFieldGet(this,_FieldLabel_instances,"m",_FieldLabel_isRequired).call(this)?x`<span class="required">*</span>`:A}
|
|
1785
|
+
</label>`}}_FieldLabel_instances=new WeakSet,_FieldLabel_getSize=function(){var t;return this.size||(null===(t=this.field.value)||void 0===t?void 0:t.size)},_FieldLabel_isRequired=function(){var t;return null!=this.required?this.required:Boolean(null===(t=this.field.value)||void 0===t?void 0:t.required)},FieldLabel.styles=[styles$i()],window.customElements.define("m-field-label",FieldLabel),attachContextRoot();class Field extends Component{static get properties(){return{label:{type:String},hint:{type:String},required:{type:Boolean},status:{type:String},size:{type:String},align:{type:String}}}constructor(){super(),this.provider=new e$2(this,fieldContext,{required:!1,size:"default",status:"default"}),this.required=!1,this.status="default",this.size="default",this.align="stretch"}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 x`<m-stack gap="spacing-1" align="${this.align}">
|
|
1627
1786
|
<slot name="label"
|
|
1628
|
-
>${this.label?x
|
|
1787
|
+
>${this.label?x`<m-field-label>${this.label}</m-field-label>`:A}</slot
|
|
1629
1788
|
>
|
|
1630
1789
|
|
|
1631
1790
|
<slot></slot>
|
|
1632
1791
|
|
|
1633
1792
|
<slot name="hint">
|
|
1634
|
-
${this.hint?x
|
|
1793
|
+
${this.hint?x`<m-field-hint>${this.hint}</m-field-hint>`:A}
|
|
1635
1794
|
</slot>
|
|
1636
1795
|
</m-stack>`}}window.customElements.define("m-field",Field);const FIELD_STATUSES=["default","danger"];function styles$h(){return i$4`
|
|
1637
1796
|
:host {
|
|
@@ -1684,7 +1843,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1684
1843
|
.content {
|
|
1685
1844
|
padding: ${getToken("spacing-6")};
|
|
1686
1845
|
}
|
|
1687
|
-
`}class Header extends s$5{static get properties(){return{slot:{type:String,reflect:!0}}}constructor(){super(),this.slot="page-header"}render(){return x
|
|
1846
|
+
`}class Header extends s$5{static get properties(){return{slot:{type:String,reflect:!0}}}constructor(){super(),this.slot="page-header"}render(){return x`
|
|
1688
1847
|
<div class="m-header">
|
|
1689
1848
|
<slot name="back-button"></slot>
|
|
1690
1849
|
<slot name="content"></slot>
|
|
@@ -1738,7 +1897,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1738
1897
|
${on(".m-link").disabled} {
|
|
1739
1898
|
color: ${getColor("color-primary-20")};
|
|
1740
1899
|
}
|
|
1741
|
-
`}var _Link_instances,_Link_disabled_get,_Link_href_get,_Link_rel_get,_Link_handleClick;SubHeader.styles=[subHeaderStyles()],window.customElements.define("m-sub-header",SubHeader);const UNSAFE_URL=/^javascript:/i;class Link extends Component{static get properties(){return{href:{type:String,reflect:!0},target:{type:String,reflect:!0},rel:{type:String,reflect:!0},download:{type:String,reflect:!0},ping:{type:String,reflect:!0},referrerpolicy:{type:String,reflect:!0},size:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0}}}constructor(){super(),_Link_instances.add(this),this.size="default"}render(){return x
|
|
1900
|
+
`}var _Link_instances,_Link_disabled_get,_Link_href_get,_Link_rel_get,_Link_handleClick;SubHeader.styles=[subHeaderStyles()],window.customElements.define("m-sub-header",SubHeader);const UNSAFE_URL=/^javascript:/i;class Link extends Component{static get properties(){return{href:{type:String,reflect:!0},target:{type:String,reflect:!0},rel:{type:String,reflect:!0},download:{type:String,reflect:!0},ping:{type:String,reflect:!0},referrerpolicy:{type:String,reflect:!0},size:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0}}}constructor(){super(),_Link_instances.add(this),this.size="default"}render(){return x`
|
|
1742
1901
|
<a
|
|
1743
1902
|
class=${o$2({"m-link":!0,"-small":"small"===this.size,"-default":"default"===this.size,"-large":"large"===this.size,"is-disabled":__classPrivateFieldGet(this,_Link_instances,"a",_Link_disabled_get)})}
|
|
1744
1903
|
href=${l$1(__classPrivateFieldGet(this,_Link_instances,"a",_Link_href_get))}
|
|
@@ -1760,7 +1919,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1760
1919
|
slot[name='page-header']::slotted(*) {
|
|
1761
1920
|
border-bottom: ${getToken("border-thin")} solid ${getColor("color-border")};
|
|
1762
1921
|
}
|
|
1763
|
-
`}_Link_instances=new WeakSet,_Link_disabled_get=function(){return this.disabled||!this.href||UNSAFE_URL.test(this.href.trim())},_Link_href_get=function(){return __classPrivateFieldGet(this,_Link_instances,"a",_Link_disabled_get)?void 0:this.href},_Link_rel_get=function(){var t,e;let o=this.rel;if("_blank"===this.target){const i=new Set((null!==(t=this.rel)&&void 0!==t?t:"").split(/\s+/).filter(Boolean));(null===(e=this.referrerpolicy)||void 0===e?void 0:e.trim())||i.add("noreferrer"),i.has("opener")||i.add("noopener"),o=Array.from(i).join(" ")}return o},_Link_handleClick=function(t){if(__classPrivateFieldGet(this,_Link_instances,"a",_Link_disabled_get))return t.preventDefault(),t.stopPropagation(),!1},Link.styles=[styles$g()],window.customElements.define("m-link",Link);class PageContent extends s$5{render(){return x
|
|
1922
|
+
`}_Link_instances=new WeakSet,_Link_disabled_get=function(){return this.disabled||!this.href||UNSAFE_URL.test(this.href.trim())},_Link_href_get=function(){return __classPrivateFieldGet(this,_Link_instances,"a",_Link_disabled_get)?void 0:this.href},_Link_rel_get=function(){var t,e;let o=this.rel;if("_blank"===this.target){const i=new Set((null!==(t=this.rel)&&void 0!==t?t:"").split(/\s+/).filter(Boolean));(null===(e=this.referrerpolicy)||void 0===e?void 0:e.trim())||i.add("noreferrer"),i.has("opener")||i.add("noopener"),o=Array.from(i).join(" ")}return o},_Link_handleClick=function(t){if(__classPrivateFieldGet(this,_Link_instances,"a",_Link_disabled_get))return t.preventDefault(),t.stopPropagation(),!1},Link.styles=[styles$g()],window.customElements.define("m-link",Link);class PageContent extends s$5{render(){return x`
|
|
1764
1923
|
<slot name="page-header"></slot>
|
|
1765
1924
|
<slot name="page-body"></slot>
|
|
1766
1925
|
`}}function clamp$1(t,e,o){return Math.min(Math.max(e,t),o)}function styles$e(){return i$4`
|
|
@@ -1814,7 +1973,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1814
1973
|
.-danger {
|
|
1815
1974
|
--m-progress-bar-progress-background: ${getColor("color-danger-60")};
|
|
1816
1975
|
}
|
|
1817
|
-
`}var _ProgressBar_instances,_ProgressBar_safeMaxValue_get,_ProgressBar_safeValue_get;PageContent.styles=[styles$f()],window.customElements.define("m-page-content",PageContent);const DEFAULT_VARIANT="default",DEFAULT_MAX=100,DEFAULT_MIN=0,DEFAULT_VALUE=0;class ProgressBar extends s$5{static get properties(){return{variant:{type:String,reflect:!0},value:{type:Number,reflect:!0},max:{type:Number,reflect:!0}}}constructor(){super(),_ProgressBar_instances.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*__classPrivateFieldGet(this,_ProgressBar_instances,"a",_ProgressBar_safeValue_get)/__classPrivateFieldGet(this,_ProgressBar_instances,"a",_ProgressBar_safeMaxValue_get)}get currentVariant(){return this.variant}render(){return x
|
|
1976
|
+
`}var _ProgressBar_instances,_ProgressBar_safeMaxValue_get,_ProgressBar_safeValue_get;PageContent.styles=[styles$f()],window.customElements.define("m-page-content",PageContent);const DEFAULT_VARIANT="default",DEFAULT_MAX=100,DEFAULT_MIN=0,DEFAULT_VALUE=0;class ProgressBar extends s$5{static get properties(){return{variant:{type:String,reflect:!0},value:{type:Number,reflect:!0},max:{type:Number,reflect:!0}}}constructor(){super(),_ProgressBar_instances.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*__classPrivateFieldGet(this,_ProgressBar_instances,"a",_ProgressBar_safeValue_get)/__classPrivateFieldGet(this,_ProgressBar_instances,"a",_ProgressBar_safeMaxValue_get)}get currentVariant(){return this.variant}render(){return x`
|
|
1818
1977
|
<div class="bar">
|
|
1819
1978
|
<span
|
|
1820
1979
|
class=${o$2({progress:!0,"-default":"default"===this.currentVariant,"-success":"success"===this.currentVariant,"-warning":"warning"===this.currentVariant,"-danger":"danger"===this.currentVariant})}
|
|
@@ -1924,7 +2083,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1924
2083
|
${on(".radio-button","*").disabled} {
|
|
1925
2084
|
pointer-event: none;
|
|
1926
2085
|
}
|
|
1927
|
-
`}var _Radio_instances,_Radio_button_get,_Radio_handleClick,_Radio_setDisabled,_Radio_setChecked;class Radio extends s$5{static get properties(){return{value:{type:String},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0}}}constructor(){super(),_Radio_instances.add(this),_Radio_handleClick.set(this,(t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();const e={detail:{value:this.value,type:"select"},bubbles:!0,composed:!1};this.dispatchEvent(new CustomEvent("m-check",e))})),_Radio_setDisabled.set(this,(()=>{this.setAttribute("aria-disabled",String(this.disabled))})),_Radio_setChecked.set(this,(()=>{this.setAttribute("aria-checked",String(this.checked))})),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio"),this.addEventListener("click",__classPrivateFieldGet(this,_Radio_handleClick,"f"))}updated(t){super.updated(t),t.has("disabled")&&__classPrivateFieldGet(this,_Radio_setDisabled,"f").call(this),t.has("checked")&&__classPrivateFieldGet(this,_Radio_setChecked,"f").call(this)}render(){return x
|
|
2086
|
+
`}var _Radio_instances,_Radio_button_get,_Radio_handleClick,_Radio_setDisabled,_Radio_setChecked;class Radio extends s$5{static get properties(){return{value:{type:String},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0}}}constructor(){super(),_Radio_instances.add(this),_Radio_handleClick.set(this,(t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();const e={detail:{value:this.value,type:"select"},bubbles:!0,composed:!1};this.dispatchEvent(new CustomEvent("m-check",e))})),_Radio_setDisabled.set(this,(()=>{this.setAttribute("aria-disabled",String(this.disabled))})),_Radio_setChecked.set(this,(()=>{this.setAttribute("aria-checked",String(this.checked))})),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio"),this.addEventListener("click",__classPrivateFieldGet(this,_Radio_handleClick,"f"))}updated(t){super.updated(t),t.has("disabled")&&__classPrivateFieldGet(this,_Radio_setDisabled,"f").call(this),t.has("checked")&&__classPrivateFieldGet(this,_Radio_setChecked,"f").call(this)}render(){return x`
|
|
1928
2087
|
<button
|
|
1929
2088
|
type="button"
|
|
1930
2089
|
class="radio-button"
|
|
@@ -1947,7 +2106,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1947
2106
|
.radio-group.-horizontal {
|
|
1948
2107
|
flex-direction: row;
|
|
1949
2108
|
}
|
|
1950
|
-
`}_SelectionController_handleSelectionEvent=new WeakMap,_SelectionController_instances=new WeakSet,_SelectionController_publish=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 RadioGroup extends s$5{static get properties(){return{value:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},selection:{state:!0},orientation:{type:String}}}constructor(){super(),_RadioGroup_selectionController.set(this,null),_RadioGroup_defaultSlot.set(this,null),_RadioGroup_getDefaultChecked.set(this,(()=>{var t;return null===(t=__classPrivateFieldGet(this,_RadioGroup_getButtons,"f").call(this)[0])||void 0===t?void 0:t.value})),_RadioGroup_getButtons.set(this,(()=>{var t,e,o;__classPrivateFieldSet(this,_RadioGroup_defaultSlot,null!==(t=__classPrivateFieldGet(this,_RadioGroup_defaultSlot,"f"))&&void 0!==t?t:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(o=null===(e=__classPrivateFieldGet(this,_RadioGroup_defaultSlot,"f"))||void 0===e?void 0:e.assignedElements({flatten:!0}))&&void 0!==o?o:[]].filter((t=>"m-radio"===t.tagName.toLowerCase()))})),_RadioGroup_setButtonChecked.set(this,(t=>{t.checked=this.selection.has(t.value)})),_RadioGroup_setButtonDisabled.set(this,(t=>{t.disabled=this.disabled})),this.disabled=!1,this.selection=new Set,this.value="",this.orientation="vertical",this.type="single-strict"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio-group"),__classPrivateFieldSet(this,_RadioGroup_selectionController,new SelectionController(this,this.type,"m-check"),"f")}update(t){super.update(t),t.has("value")&&__classPrivateFieldGet(this,_RadioGroup_selectionController,"f")&&__classPrivateFieldGet(this,_RadioGroup_selectionController,"f").init(toArray$1(this.value||__classPrivateFieldGet(this,_RadioGroup_getDefaultChecked,"f").call(this))),t.has("selection")&&([this.value]=this.selection)}updated(t){super.updated(t),t.has("selection")&&__classPrivateFieldGet(this,_RadioGroup_getButtons,"f").call(this).forEach((t=>{__classPrivateFieldGet(this,_RadioGroup_setButtonChecked,"f").call(this,t)})),t.has("disabled")&&__classPrivateFieldGet(this,_RadioGroup_getButtons,"f").call(this).forEach((t=>{__classPrivateFieldGet(this,_RadioGroup_setButtonDisabled,"f").call(this,t)}))}render(){return x
|
|
2109
|
+
`}_SelectionController_handleSelectionEvent=new WeakMap,_SelectionController_instances=new WeakSet,_SelectionController_publish=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 RadioGroup extends s$5{static get properties(){return{value:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},selection:{state:!0},orientation:{type:String}}}constructor(){super(),_RadioGroup_selectionController.set(this,null),_RadioGroup_defaultSlot.set(this,null),_RadioGroup_getDefaultChecked.set(this,(()=>{var t;return null===(t=__classPrivateFieldGet(this,_RadioGroup_getButtons,"f").call(this)[0])||void 0===t?void 0:t.value})),_RadioGroup_getButtons.set(this,(()=>{var t,e,o;__classPrivateFieldSet(this,_RadioGroup_defaultSlot,null!==(t=__classPrivateFieldGet(this,_RadioGroup_defaultSlot,"f"))&&void 0!==t?t:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(o=null===(e=__classPrivateFieldGet(this,_RadioGroup_defaultSlot,"f"))||void 0===e?void 0:e.assignedElements({flatten:!0}))&&void 0!==o?o:[]].filter((t=>"m-radio"===t.tagName.toLowerCase()))})),_RadioGroup_setButtonChecked.set(this,(t=>{t.checked=this.selection.has(t.value)})),_RadioGroup_setButtonDisabled.set(this,(t=>{t.disabled=this.disabled})),this.disabled=!1,this.selection=new Set,this.value="",this.orientation="vertical",this.type="single-strict"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio-group"),__classPrivateFieldSet(this,_RadioGroup_selectionController,new SelectionController(this,this.type,"m-check"),"f")}update(t){super.update(t),t.has("value")&&__classPrivateFieldGet(this,_RadioGroup_selectionController,"f")&&__classPrivateFieldGet(this,_RadioGroup_selectionController,"f").init(toArray$1(this.value||__classPrivateFieldGet(this,_RadioGroup_getDefaultChecked,"f").call(this))),t.has("selection")&&([this.value]=this.selection)}updated(t){super.updated(t),t.has("selection")&&__classPrivateFieldGet(this,_RadioGroup_getButtons,"f").call(this).forEach((t=>{__classPrivateFieldGet(this,_RadioGroup_setButtonChecked,"f").call(this,t)})),t.has("disabled")&&__classPrivateFieldGet(this,_RadioGroup_getButtons,"f").call(this).forEach((t=>{__classPrivateFieldGet(this,_RadioGroup_setButtonDisabled,"f").call(this,t)}))}render(){return x`
|
|
1951
2110
|
<div
|
|
1952
2111
|
class=${o$2({"radio-group":!0,"-vertical":"vertical"===this.orientation,"-horizontal":"horizontal"===this.orientation})}
|
|
1953
2112
|
>
|
|
@@ -1989,7 +2148,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
1989
2148
|
${typography("heading-lg-bold")};
|
|
1990
2149
|
margin: 0 0 ${getToken("spacing-2")} 0;
|
|
1991
2150
|
}
|
|
1992
|
-
`}_RadioGroup_selectionController=new WeakMap,_RadioGroup_defaultSlot=new WeakMap,_RadioGroup_getDefaultChecked=new WeakMap,_RadioGroup_getButtons=new WeakMap,_RadioGroup_setButtonChecked=new WeakMap,_RadioGroup_setButtonDisabled=new WeakMap,RadioGroup.styles=[styles$c()],window.customElements.define("m-radio-group",RadioGroup);class Section extends s$5{render(){return x
|
|
2151
|
+
`}_RadioGroup_selectionController=new WeakMap,_RadioGroup_defaultSlot=new WeakMap,_RadioGroup_getDefaultChecked=new WeakMap,_RadioGroup_getButtons=new WeakMap,_RadioGroup_setButtonChecked=new WeakMap,_RadioGroup_setButtonDisabled=new WeakMap,RadioGroup.styles=[styles$c()],window.customElements.define("m-radio-group",RadioGroup);class Section extends s$5{render(){return x`
|
|
1993
2152
|
<slot name="title"></slot>
|
|
1994
2153
|
<m-divider></m-divider>
|
|
1995
2154
|
<slot></slot>
|
|
@@ -2117,7 +2276,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
2117
2276
|
:host(:is([aria-current='step'], :not([completed]))) .label {
|
|
2118
2277
|
display: inline-flex;
|
|
2119
2278
|
}
|
|
2120
|
-
`]}var _Steps_getDefaultActive,_Steps_queryStep,_Steps_handleSlotChange,_KeyboardSupportController_handleKeyUp,_Switch_instances,_Switch_controllers,_Switch_toggle,_Switch_handleClick;SectionTitle.styles=[sectionTitleStyles()],window.customElements.define("m-section-title",SectionTitle);class Steps extends Component{constructor(){super(...arguments),_Steps_getDefaultActive.set(this,(()=>{var t;return null===(t=this.querySelector("m-step"))||void 0===t?void 0:t.name})),_Steps_queryStep.set(this,(t=>t?this.querySelector(`[name="${t}"]`):null)),_Steps_handleSlotChange.set(this,(()=>{Array.from(this.querySelectorAll("m-step")).forEach(((t,e)=>{t.setAttribute("order",String(e+1))})),this.requestUpdate()}))}static get properties(){return{activeStep:{type:String,attribute:"active-step",reflect:!0}}}update(t){var e;super.update(t);const o=__classPrivateFieldGet(this,_Steps_queryStep,"f").call(this,t.get("activeStep"));o&&o.removeAttribute("aria-current"),this.activeStep=null!==(e=this.activeStep)&&void 0!==e?e:__classPrivateFieldGet(this,_Steps_getDefaultActive,"f").call(this);const i=__classPrivateFieldGet(this,_Steps_queryStep,"f").call(this,this.activeStep);i&&(i.setAttribute("tabindex","0"),i.setAttribute("aria-current","step"))}render(){return x
|
|
2279
|
+
`]}var _Steps_getDefaultActive,_Steps_queryStep,_Steps_handleSlotChange,_KeyboardSupportController_handleKeyUp,_Switch_instances,_Switch_controllers,_Switch_toggle,_Switch_handleClick;SectionTitle.styles=[sectionTitleStyles()],window.customElements.define("m-section-title",SectionTitle);class Steps extends Component{constructor(){super(...arguments),_Steps_getDefaultActive.set(this,(()=>{var t;return null===(t=this.querySelector("m-step"))||void 0===t?void 0:t.name})),_Steps_queryStep.set(this,(t=>t?this.querySelector(`[name="${t}"]`):null)),_Steps_handleSlotChange.set(this,(()=>{Array.from(this.querySelectorAll("m-step")).forEach(((t,e)=>{t.setAttribute("order",String(e+1))})),this.requestUpdate()}))}static get properties(){return{activeStep:{type:String,attribute:"active-step",reflect:!0}}}update(t){var e;super.update(t);const o=__classPrivateFieldGet(this,_Steps_queryStep,"f").call(this,t.get("activeStep"));o&&o.removeAttribute("aria-current"),this.activeStep=null!==(e=this.activeStep)&&void 0!==e?e:__classPrivateFieldGet(this,_Steps_getDefaultActive,"f").call(this);const i=__classPrivateFieldGet(this,_Steps_queryStep,"f").call(this,this.activeStep);i&&(i.setAttribute("tabindex","0"),i.setAttribute("aria-current","step"))}render(){return x`<slot @slotchange=${__classPrivateFieldGet(this,_Steps_handleSlotChange,"f")}></slot>`}}_Steps_getDefaultActive=new WeakMap,_Steps_queryStep=new WeakMap,_Steps_handleSlotChange=new WeakMap,Steps.styles=[stepsStyles()],window.customElements.define("m-steps",Steps);class Step extends s$5{static get properties(){return{name:{type:String,reflect:!0},order:{type:String},completed:{type:Boolean,reflect:!0}}}render(){return x`
|
|
2121
2280
|
<span class="circle">
|
|
2122
2281
|
${this.completed?A:this.order}
|
|
2123
2282
|
<m-icon name="check" size="12"></m-icon>
|
|
@@ -2226,7 +2385,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
2226
2385
|
100% - var(--m-switch-circle-size) - var(--m-switch-circle-distance)
|
|
2227
2386
|
);
|
|
2228
2387
|
}
|
|
2229
|
-
`]}_KeyboardSupportController_handleKeyUp=new WeakMap;class Switch extends Component{static get properties(){return{name:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0},size:{type:String,reflect:!0}}}constructor(){super(),_Switch_instances.add(this),_Switch_controllers.set(this,void 0),_Switch_handleClick.set(this,(t=>{if(this.disabled)return t.stopPropagation(),void t.preventDefault();__classPrivateFieldGet(this,_Switch_instances,"m",_Switch_toggle).call(this)})),this.checked=!1,this.disabled=!1,__classPrivateFieldSet(this,_Switch_controllers,{keyboard:new KeyboardSupportController(this,{shortcut:[{key:" "},{key:"Enter"}],handler:t=>{t.stopPropagation(),__classPrivateFieldGet(this,_Switch_instances,"m",_Switch_toggle).call(this)}})},"f")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.addEventListener("click",__classPrivateFieldGet(this,_Switch_handleClick,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",__classPrivateFieldGet(this,_Switch_handleClick,"f"))}updated(t){super.updated(t),t.has("checked")&&this.setAttribute("aria-checked",String(this.checked)),t.has("disabled")&&(this.disabled?this.removeAttribute("tabindex"):this.setAttribute("tabindex","0"))}render(){return x
|
|
2388
|
+
`]}_KeyboardSupportController_handleKeyUp=new WeakMap;class Switch extends Component{static get properties(){return{name:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0},size:{type:String,reflect:!0}}}constructor(){super(),_Switch_instances.add(this),_Switch_controllers.set(this,void 0),_Switch_handleClick.set(this,(t=>{if(this.disabled)return t.stopPropagation(),void t.preventDefault();__classPrivateFieldGet(this,_Switch_instances,"m",_Switch_toggle).call(this)})),this.checked=!1,this.disabled=!1,__classPrivateFieldSet(this,_Switch_controllers,{keyboard:new KeyboardSupportController(this,{shortcut:[{key:" "},{key:"Enter"}],handler:t=>{t.stopPropagation(),__classPrivateFieldGet(this,_Switch_instances,"m",_Switch_toggle).call(this)}})},"f")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.addEventListener("click",__classPrivateFieldGet(this,_Switch_handleClick,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",__classPrivateFieldGet(this,_Switch_handleClick,"f"))}updated(t){super.updated(t),t.has("checked")&&this.setAttribute("aria-checked",String(this.checked)),t.has("disabled")&&(this.disabled?this.removeAttribute("tabindex"):this.setAttribute("tabindex","0"))}render(){return x`
|
|
2230
2389
|
<span class="switch"></span>
|
|
2231
2390
|
<slot></slot>
|
|
2232
2391
|
`}}function tableStyles(){return i$4`
|
|
@@ -2312,11 +2471,11 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
2312
2471
|
border-top-width: ${getToken("border-thin")};
|
|
2313
2472
|
border-top-color: ${getColor("color-divider")};
|
|
2314
2473
|
}
|
|
2315
|
-
`}_Switch_controllers=new WeakMap,_Switch_handleClick=new WeakMap,_Switch_instances=new WeakSet,_Switch_toggle=function(){this.checked=!this.checked,this.emit("m-change",{detail:{name:this.name,checked:this.checked}})},Switch.styles=[styles$a()],window.customElements.define("m-switch",Switch);const defaultTableProps={size:"default"};class Table extends s$5{static get properties(){return{role:{type:String,reflect:!0},size:{type:String,reflect:!0}}}constructor(){super(),this.role="table",this.size=defaultTableProps.size}render(){return x
|
|
2474
|
+
`}_Switch_controllers=new WeakMap,_Switch_handleClick=new WeakMap,_Switch_instances=new WeakSet,_Switch_toggle=function(){this.checked=!this.checked,this.emit("m-change",{detail:{name:this.name,checked:this.checked}})},Switch.styles=[styles$a()],window.customElements.define("m-switch",Switch);const defaultTableProps={size:"default"};class Table extends s$5{static get properties(){return{role:{type:String,reflect:!0},size:{type:String,reflect:!0}}}constructor(){super(),this.role="table",this.size=defaultTableProps.size}render(){return x`
|
|
2316
2475
|
<slot name="table-head"></slot>
|
|
2317
2476
|
<slot name="table-body"></slot>
|
|
2318
2477
|
<slot name="table-foot"></slot>
|
|
2319
|
-
`}}Table.styles=[tableStyles()],window.customElements.define("m-table",Table);class TableHead extends s$5{static get properties(){return{slot:{type:String,reflect:!0},role:{type:String,reflect:!0}}}constructor(){super(),this.slot="table-head",this.role="rowgroup"}render(){return x
|
|
2478
|
+
`}}Table.styles=[tableStyles()],window.customElements.define("m-table",Table);class TableHead extends s$5{static get properties(){return{slot:{type:String,reflect:!0},role:{type:String,reflect:!0}}}constructor(){super(),this.slot="table-head",this.role="rowgroup"}render(){return x`<slot name="table-row"></slot>`}}TableHead.styles=[tableHeadStyles()],window.customElements.define("m-table-head",TableHead);class TableBody extends s$5{static get properties(){return{slot:{type:String,reflect:!0},role:{type:String,reflect:!0}}}constructor(){super(),this.slot="table-body",this.role="rowgroup"}render(){return x`<slot name="table-row"></slot>`}}TableBody.styles=[tableBodyStyles()],window.customElements.define("m-table-body",TableBody);class TableFoot extends s$5{static get properties(){return{slot:{type:String,reflect:!0},role:{type:String,reflect:!0}}}constructor(){super(),this.slot="table-foot",this.role="rowgroup"}render(){return x`<slot name="table-row"></slot>`}}TableFoot.styles=[tableFootStyles()],window.customElements.define("m-table-foot",TableFoot);class TableRow extends s$5{static get properties(){return{slot:{type:String,reflect:!0},role:{type:String,reflect:!0}}}constructor(){super(),this.slot="table-row",this.role="row"}render(){return x`<slot name="table-cell"></slot>`}}TableRow.styles=[tableRowStyles()],window.customElements.define("m-table-row",TableRow);const defaultTableCellProps={alignment:"left"};class TableCell extends s$5{static get properties(){return{slot:{type:String,reflect:!0},role:{type:String,reflect:!0},alignment:{type:String}}}constructor(){super(),this.slot="table-cell",this.alignment=defaultTableCellProps.alignment}firstUpdated(){const t=null!=this.closest("m-table-head");this.role=t?"columnheader":"cell"}update(t){var e;super.update(t),t.has("alignment")&&this.style.setProperty("--m-table-cell-text-align",null!==(e=this.alignment)&&void 0!==e?e:defaultTableCellProps.alignment)}render(){return x`<slot></slot>`}}TableCell.styles=[tableCellStyles()],window.customElements.define("m-table-cell",TableCell);const tabsContext=n$2("tabs"),TAB_SELECT_EVENT="m-select-tab";function styles$9(){return i$4`
|
|
2320
2479
|
:host {
|
|
2321
2480
|
--m-tabs-border-width: ${getToken("border-thin")};
|
|
2322
2481
|
--m-tabs-border-color: ${getColor("color-divider")};
|
|
@@ -2330,7 +2489,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
2330
2489
|
border-bottom-width: var(--m-tabs-border-width);
|
|
2331
2490
|
border-bottom-color: var(--m-tabs-border-color);
|
|
2332
2491
|
}
|
|
2333
|
-
`}var _Tabs_selectionController,_Tabs_defaultSlot,_Tabs_onSelectionChange,_Tabs_getDefaultSelected,_Tabs_getTabs,_Tab_instances,_Tab_button_get,_Tab_handleClick,_Tab_getContentDirection,_Tab_isSelected,_Tab_isDisabled,_a,_b,_TabPanel_isSelected,_TabPanel_isLazy;class Tabs extends Component{static get properties(){return{activeTab:{type:String,attribute:"active-tab",reflect:!0},disabled:{type:Boolean,reflect:!0},lazy:{type:Boolean},selection:{state:!0},tabContentDirection:{type:String,attribute:"tab-content-direction"}}}constructor(){super(),_Tabs_selectionController.set(this,null),_Tabs_defaultSlot.set(this,null),this.provider=new e$2(this,tabsContext,{tabContentDirection:"horizontal",disabled:!1,lazy:!1,selection:new Set("")}),_Tabs_onSelectionChange.set(this,(t=>{t.stopPropagation();const[e]=Array.from(this.selection),o={detail:{value:String(e)}};this.emit("m-tab-change",o)})),_Tabs_getDefaultSelected.set(this,(()=>{var t;return null===(t=__classPrivateFieldGet(this,_Tabs_getTabs,"f").call(this)[0])||void 0===t?void 0:t.name})),_Tabs_getTabs.set(this,(()=>{var t,e,o;__classPrivateFieldSet(this,_Tabs_defaultSlot,null!==(t=__classPrivateFieldGet(this,_Tabs_defaultSlot,"f"))&&void 0!==t?t:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(o=null===(e=__classPrivateFieldGet(this,_Tabs_defaultSlot,"f"))||void 0===e?void 0:e.assignedElements({flatten:!0}))&&void 0!==o?o:[]].filter((t=>"m-tab"===t.tagName.toLowerCase()))})),this.activeTab="",this.tabContentDirection="horizontal",this.disabled=!1,this.lazy=!1,this.type="single-strict",this.selection=new Set}connectedCallback(){super.connectedCallback(),__classPrivateFieldSet(this,_Tabs_selectionController,new SelectionController(this,this.type,"m-select-tab"),"f"),this.addEventListener("m-change",__classPrivateFieldGet(this,_Tabs_onSelectionChange,"f"))}update(t){super.update(t),t.has("activeTab")&&__classPrivateFieldGet(this,_Tabs_selectionController,"f")&&__classPrivateFieldGet(this,_Tabs_selectionController,"f").init(toArray$1(this.activeTab||__classPrivateFieldGet(this,_Tabs_getDefaultSelected,"f").call(this)));const[e]=Array.from(this.selection);!t.has("selection")||this.activeTab&&e===this.activeTab||(this.activeTab=e),(t.has("tabContentDirection")||t.has("disabled")||t.has("lazy")||t.has("selection"))&&this.provider.setValue({tabContentDirection:this.tabContentDirection,disabled:this.disabled,lazy:this.lazy,selection:this.selection})}render(){return x
|
|
2492
|
+
`}var _Tabs_selectionController,_Tabs_defaultSlot,_Tabs_onSelectionChange,_Tabs_getDefaultSelected,_Tabs_getTabs,_Tab_instances,_Tab_button_get,_Tab_handleClick,_Tab_getContentDirection,_Tab_isSelected,_Tab_isDisabled,_a,_b,_TabPanel_isSelected,_TabPanel_isLazy;class Tabs extends Component{static get properties(){return{activeTab:{type:String,attribute:"active-tab",reflect:!0},disabled:{type:Boolean,reflect:!0},lazy:{type:Boolean},selection:{state:!0},tabContentDirection:{type:String,attribute:"tab-content-direction"}}}constructor(){super(),_Tabs_selectionController.set(this,null),_Tabs_defaultSlot.set(this,null),this.provider=new e$2(this,tabsContext,{tabContentDirection:"horizontal",disabled:!1,lazy:!1,selection:new Set("")}),_Tabs_onSelectionChange.set(this,(t=>{t.stopPropagation();const[e]=Array.from(this.selection),o={detail:{value:String(e)}};this.emit("m-tab-change",o)})),_Tabs_getDefaultSelected.set(this,(()=>{var t;return null===(t=__classPrivateFieldGet(this,_Tabs_getTabs,"f").call(this)[0])||void 0===t?void 0:t.name})),_Tabs_getTabs.set(this,(()=>{var t,e,o;__classPrivateFieldSet(this,_Tabs_defaultSlot,null!==(t=__classPrivateFieldGet(this,_Tabs_defaultSlot,"f"))&&void 0!==t?t:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(o=null===(e=__classPrivateFieldGet(this,_Tabs_defaultSlot,"f"))||void 0===e?void 0:e.assignedElements({flatten:!0}))&&void 0!==o?o:[]].filter((t=>"m-tab"===t.tagName.toLowerCase()))})),this.activeTab="",this.tabContentDirection="horizontal",this.disabled=!1,this.lazy=!1,this.type="single-strict",this.selection=new Set}connectedCallback(){super.connectedCallback(),__classPrivateFieldSet(this,_Tabs_selectionController,new SelectionController(this,this.type,"m-select-tab"),"f"),this.addEventListener("m-change",__classPrivateFieldGet(this,_Tabs_onSelectionChange,"f"))}update(t){super.update(t),t.has("activeTab")&&__classPrivateFieldGet(this,_Tabs_selectionController,"f")&&__classPrivateFieldGet(this,_Tabs_selectionController,"f").init(toArray$1(this.activeTab||__classPrivateFieldGet(this,_Tabs_getDefaultSelected,"f").call(this)));const[e]=Array.from(this.selection);!t.has("selection")||this.activeTab&&e===this.activeTab||(this.activeTab=e),(t.has("tabContentDirection")||t.has("disabled")||t.has("lazy")||t.has("selection"))&&this.provider.setValue({tabContentDirection:this.tabContentDirection,disabled:this.disabled,lazy:this.lazy,selection:this.selection})}render(){return x`
|
|
2334
2493
|
<div class="tablist" role="tablist"><slot name="tab"></slot></div>
|
|
2335
2494
|
<slot></slot>
|
|
2336
2495
|
`}}function styles$8(){return i$4`
|
|
@@ -2414,7 +2573,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
2414
2573
|
${on(".tab","*").disabled} {
|
|
2415
2574
|
pointer-events: none;
|
|
2416
2575
|
}
|
|
2417
|
-
`}_Tabs_selectionController=new WeakMap,_Tabs_defaultSlot=new WeakMap,_Tabs_onSelectionChange=new WeakMap,_Tabs_getDefaultSelected=new WeakMap,_Tabs_getTabs=new WeakMap,Tabs.styles=[styles$9()],window.customElements.define("m-tabs",Tabs);class Tab extends Component{static get properties(){return{name:{type:String},disabled:{type:Boolean,reflect:!0},slot:{type:String,reflect:!0}}}constructor(){super(),_Tab_instances.add(this),this.tabs=new s$2(this,tabsContext,void 0,!0),_Tab_handleClick.set(this,(t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();const e={detail:{value:this.name,type:"select"},bubbles:!0,composed:!1};this.emit("m-select-tab",e)})),_Tab_getContentDirection.set(this,(()=>{var t;return null===(t=this.tabs.value)||void 0===t?void 0:t.tabContentDirection})),_Tab_isSelected.set(this,(()=>{var t;return Boolean(null===(t=this.tabs.value)||void 0===t?void 0:t.selection.has(this.name))})),_Tab_isDisabled.set(this,(()=>{var t;return this.disabled||Boolean(null===(t=this.tabs.value)||void 0===t?void 0:t.disabled)})),this.disabled=!1}connectedCallback(){super.connectedCallback(),this.id=`${this.name}-tab`,this.setAttribute("slot","tab"),this.setAttribute("role","tab"),this.setAttribute("aria-controls",`${this.name}-panel`),this.setAttribute("aria-selected","false"),this.addEventListener("click",__classPrivateFieldGet(this,_Tab_handleClick,"f"))}updated(t){super.updated(t),__classPrivateFieldGet(this,_Tab_isSelected,"f").call(this)?this.setAttribute("aria-selected","true"):this.setAttribute("aria-selected","false"),t.has("name")&&(this.id=`${this.name}-tab`,this.setAttribute("aria-controls",`${this.name}-panel`)),t.has("disabled")&&this.setAttribute("aria-disabled",String(this.disabled))}render(){return x
|
|
2576
|
+
`}_Tabs_selectionController=new WeakMap,_Tabs_defaultSlot=new WeakMap,_Tabs_onSelectionChange=new WeakMap,_Tabs_getDefaultSelected=new WeakMap,_Tabs_getTabs=new WeakMap,Tabs.styles=[styles$9()],window.customElements.define("m-tabs",Tabs);class Tab extends Component{static get properties(){return{name:{type:String},disabled:{type:Boolean,reflect:!0},slot:{type:String,reflect:!0}}}constructor(){super(),_Tab_instances.add(this),this.tabs=new s$2(this,tabsContext,void 0,!0),_Tab_handleClick.set(this,(t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();const e={detail:{value:this.name,type:"select"},bubbles:!0,composed:!1};this.emit("m-select-tab",e)})),_Tab_getContentDirection.set(this,(()=>{var t;return null===(t=this.tabs.value)||void 0===t?void 0:t.tabContentDirection})),_Tab_isSelected.set(this,(()=>{var t;return Boolean(null===(t=this.tabs.value)||void 0===t?void 0:t.selection.has(this.name))})),_Tab_isDisabled.set(this,(()=>{var t;return this.disabled||Boolean(null===(t=this.tabs.value)||void 0===t?void 0:t.disabled)})),this.disabled=!1}connectedCallback(){super.connectedCallback(),this.id=`${this.name}-tab`,this.setAttribute("slot","tab"),this.setAttribute("role","tab"),this.setAttribute("aria-controls",`${this.name}-panel`),this.setAttribute("aria-selected","false"),this.addEventListener("click",__classPrivateFieldGet(this,_Tab_handleClick,"f"))}updated(t){super.updated(t),__classPrivateFieldGet(this,_Tab_isSelected,"f").call(this)?this.setAttribute("aria-selected","true"):this.setAttribute("aria-selected","false"),t.has("name")&&(this.id=`${this.name}-tab`,this.setAttribute("aria-controls",`${this.name}-panel`)),t.has("disabled")&&this.setAttribute("aria-disabled",String(this.disabled))}render(){return x`
|
|
2418
2577
|
<button
|
|
2419
2578
|
type="button"
|
|
2420
2579
|
class=${o$2({tab:!0,"-vertical":"vertical"===__classPrivateFieldGet(this,_Tab_getContentDirection,"f").call(this),"-horizontal":"horizontal"===__classPrivateFieldGet(this,_Tab_getContentDirection,"f").call(this)})}
|
|
@@ -2430,7 +2589,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
2430
2589
|
|
|
2431
2590
|
display: var(--m-tab-panel-display);
|
|
2432
2591
|
}
|
|
2433
|
-
`}_Tab_handleClick=new WeakMap,_Tab_getContentDirection=new WeakMap,_Tab_isSelected=new WeakMap,_Tab_isDisabled=new WeakMap,_Tab_instances=new WeakSet,_Tab_button_get=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("button"))&&void 0!==e?e:null},Tab.styles=[styles$8()],window.customElements.define("m-tab",Tab);class TabPanel extends(_b=Box){static get properties(){return{...super.properties,forTab:{type:String,attribute:"for-tab"},lazy:{type:Boolean}}}constructor(){super(),this.tabs=new s$2(this,tabsContext,void 0,!0),_TabPanel_isSelected.set(this,(()=>{var t;return Boolean(null===(t=this.tabs.value)||void 0===t?void 0:t.selection.has(this.forTab))})),_TabPanel_isLazy.set(this,(()=>{var t;return this.lazy||Boolean(null===(t=this.tabs.value)||void 0===t?void 0:t.lazy)})),this.lazy=!1,this.padding="none",this.paddingY="spacing-8"}connectedCallback(){super.connectedCallback(),this.id=`${this.forTab}-panel`,this.setAttribute("role","tabpanel"),this.setAttribute("aria-labelledby",`${this.forTab}-tab`)}updated(t){super.updated(t),__classPrivateFieldGet(this,_TabPanel_isSelected,"f").call(this)?(this.style.setProperty("--m-tab-panel-display","block"),this.removeAttribute("aria-hidden")):(this.style.setProperty("--m-tab-panel-display","none"),this.setAttribute("aria-hidden","true")),t.has("forTab")&&(this.id=`${this.forTab}-panel`,this.setAttribute("aria-labelledby",`${this.forTab}-tab`))}render(){return __classPrivateFieldGet(this,_TabPanel_isLazy,"f").call(this)&&!__classPrivateFieldGet(this,_TabPanel_isSelected,"f").call(this)?x
|
|
2592
|
+
`}_Tab_handleClick=new WeakMap,_Tab_getContentDirection=new WeakMap,_Tab_isSelected=new WeakMap,_Tab_isDisabled=new WeakMap,_Tab_instances=new WeakSet,_Tab_button_get=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("button"))&&void 0!==e?e:null},Tab.styles=[styles$8()],window.customElements.define("m-tab",Tab);class TabPanel extends(_b=Box){static get properties(){return{...super.properties,forTab:{type:String,attribute:"for-tab"},lazy:{type:Boolean}}}constructor(){super(),this.tabs=new s$2(this,tabsContext,void 0,!0),_TabPanel_isSelected.set(this,(()=>{var t;return Boolean(null===(t=this.tabs.value)||void 0===t?void 0:t.selection.has(this.forTab))})),_TabPanel_isLazy.set(this,(()=>{var t;return this.lazy||Boolean(null===(t=this.tabs.value)||void 0===t?void 0:t.lazy)})),this.lazy=!1,this.padding="none",this.paddingY="spacing-8"}connectedCallback(){super.connectedCallback(),this.id=`${this.forTab}-panel`,this.setAttribute("role","tabpanel"),this.setAttribute("aria-labelledby",`${this.forTab}-tab`)}updated(t){super.updated(t),__classPrivateFieldGet(this,_TabPanel_isSelected,"f").call(this)?(this.style.setProperty("--m-tab-panel-display","block"),this.removeAttribute("aria-hidden")):(this.style.setProperty("--m-tab-panel-display","none"),this.setAttribute("aria-hidden","true")),t.has("forTab")&&(this.id=`${this.forTab}-panel`,this.setAttribute("aria-labelledby",`${this.forTab}-tab`))}render(){return __classPrivateFieldGet(this,_TabPanel_isLazy,"f").call(this)&&!__classPrivateFieldGet(this,_TabPanel_isSelected,"f").call(this)?x``:x`<slot></slot>`}}function tagStyles(){return[skeleton.styles(),i$4`
|
|
2434
2593
|
:host {
|
|
2435
2594
|
--m-tag-skeleton-width: 100px;
|
|
2436
2595
|
|
|
@@ -2490,14 +2649,14 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
2490
2649
|
${skeleton()};
|
|
2491
2650
|
width: var(--m-tag-skeleton-width);
|
|
2492
2651
|
}
|
|
2493
|
-
`]}_a=TabPanel,_TabPanel_isSelected=new WeakMap,_TabPanel_isLazy=new WeakMap,TabPanel.styles=[...Reflect.get(_b,"styles",_a),styles$7()],window.customElements.define("m-tab-panel",TabPanel);class Tag extends s$5{static get properties(){return{variant:{type:String},size:{type:String},isSkeleton:{type:Boolean,attribute:"is-skeleton"}}}constructor(){super(),this.variant="neutral",this.size="default",this.isSkeleton=!1}render(){return x
|
|
2652
|
+
`]}_a=TabPanel,_TabPanel_isSelected=new WeakMap,_TabPanel_isLazy=new WeakMap,TabPanel.styles=[...Reflect.get(_b,"styles",_a),styles$7()],window.customElements.define("m-tab-panel",TabPanel);class Tag extends s$5{static get properties(){return{variant:{type:String},size:{type:String},isSkeleton:{type:Boolean,attribute:"is-skeleton"}}}constructor(){super(),this.variant="neutral",this.size="default",this.isSkeleton=!1}render(){return x`
|
|
2494
2653
|
<span
|
|
2495
2654
|
class=${o$2({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})}
|
|
2496
2655
|
>
|
|
2497
|
-
${this.isSkeleton?x
|
|
2656
|
+
${this.isSkeleton?x``:x`<slot name="leading"></slot>`}
|
|
2498
2657
|
<slot></slot>
|
|
2499
2658
|
</span>
|
|
2500
|
-
`}}Tag.styles=[tagStyles()],window.customElements.define("m-tag",Tag);var e=new Map;function t(t){var o=e.get(t);o&&o.destroy()}function o(t){var o=e.get(t);o&&o.update()}var r=null;"undefined"==typeof window?((r=function(t){return t}).destroy=function(t){return t},r.update=function(t){return t}):((r=function(t,o){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!e.has(t)){var o,i=null,r=window.getComputedStyle(t),n=(o=t.value,function(){a({testForHeightReduction:""===o||!t.value.startsWith(o),restoreTextAlign:null}),o=t.value}),s=function(o){t.removeEventListener("autosize:destroy",s),t.removeEventListener("autosize:update",l),t.removeEventListener("input",n),window.removeEventListener("resize",l),Object.keys(o).forEach((function(e){return t.style[e]=o[e]})),e.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",s),t.addEventListener("autosize:update",l),t.addEventListener("input",n),window.addEventListener("resize",l),t.style.overflowX="hidden",t.style.wordWrap="break-word",e.set(t,{destroy:s,update:l}),l()}function a(e){var o,n,s=e.restoreTextAlign,l=void 0===s?null:s,c=e.testForHeightReduction,d=void 0===c||c,u=r.overflowY;if(0!==t.scrollHeight&&("vertical"===r.resize?t.style.resize="none":"both"===r.resize&&(t.style.resize="horizontal"),d&&(o=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push([t.parentNode,t.parentNode.scrollTop]),t=t.parentNode;return function(){return e.forEach((function(t){var e=t[0],o=t[1];e.style.scrollBehavior="auto",e.scrollTop=o,e.style.scrollBehavior=null}))}}(t),t.style.height=""),n="content-box"===r.boxSizing?t.scrollHeight-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):t.scrollHeight+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),"none"!==r.maxHeight&&n>parseFloat(r.maxHeight)?("hidden"===r.overflowY&&(t.style.overflow="scroll"),n=parseFloat(r.maxHeight)):"hidden"!==r.overflowY&&(t.style.overflow="hidden"),t.style.height=n+"px",l&&(t.style.textAlign=l),o&&o(),i!==n&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),i=n),u!==r.overflow&&!l)){var
|
|
2659
|
+
`}}Tag.styles=[tagStyles()],window.customElements.define("m-tag",Tag);var e=new Map;function t(t){var o=e.get(t);o&&o.destroy()}function o(t){var o=e.get(t);o&&o.update()}var r=null;"undefined"==typeof window?((r=function(t){return t}).destroy=function(t){return t},r.update=function(t){return t}):((r=function(t,o){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!e.has(t)){var o,i=null,r=window.getComputedStyle(t),n=(o=t.value,function(){a({testForHeightReduction:""===o||!t.value.startsWith(o),restoreTextAlign:null}),o=t.value}),s=function(o){t.removeEventListener("autosize:destroy",s),t.removeEventListener("autosize:update",l),t.removeEventListener("input",n),window.removeEventListener("resize",l),Object.keys(o).forEach((function(e){return t.style[e]=o[e]})),e.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",s),t.addEventListener("autosize:update",l),t.addEventListener("input",n),window.addEventListener("resize",l),t.style.overflowX="hidden",t.style.wordWrap="break-word",e.set(t,{destroy:s,update:l}),l()}function a(e){var o,n,s=e.restoreTextAlign,l=void 0===s?null:s,c=e.testForHeightReduction,d=void 0===c||c,u=r.overflowY;if(0!==t.scrollHeight&&("vertical"===r.resize?t.style.resize="none":"both"===r.resize&&(t.style.resize="horizontal"),d&&(o=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push([t.parentNode,t.parentNode.scrollTop]),t=t.parentNode;return function(){return e.forEach((function(t){var e=t[0],o=t[1];e.style.scrollBehavior="auto",e.scrollTop=o,e.style.scrollBehavior=null}))}}(t),t.style.height=""),n="content-box"===r.boxSizing?t.scrollHeight-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):t.scrollHeight+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),"none"!==r.maxHeight&&n>parseFloat(r.maxHeight)?("hidden"===r.overflowY&&(t.style.overflow="scroll"),n=parseFloat(r.maxHeight)):"hidden"!==r.overflowY&&(t.style.overflow="hidden"),t.style.height=n+"px",l&&(t.style.textAlign=l),o&&o(),i!==n&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),i=n),u!==r.overflow&&!l)){var h=r.textAlign;"hidden"===r.overflow&&(t.style.textAlign="start"===h?"end":"start"),a({restoreTextAlign:h,testForHeightReduction:!0})}}function l(){a({testForHeightReduction:!0,restoreTextAlign:null})}}(t)})),t}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],t),e},r.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],o),t});var _TextArea_handleInput,_TextArea_updateStatusClass,_TextField_instances,_TextField_isClearVisible,_TextField_updateStatusClass,_TextField_handleInput,_TextField_handleClear,n=r;function styles$6(){return i$4`
|
|
2501
2660
|
:host {
|
|
2502
2661
|
--m-text-area-background-color: ${getColor("color-background-primary")};
|
|
2503
2662
|
--m-text-area-border-color: ${getColor("color-border")};
|
|
@@ -2621,7 +2780,7 @@ let s$3=class extends Event{constructor(t,e,o){super("context-request",{bubbles:
|
|
|
2621
2780
|
border-radius: ${getToken("border-radius-m")};
|
|
2622
2781
|
background-clip: padding-box;
|
|
2623
2782
|
}
|
|
2624
|
-
`}class TextArea extends Component{static get properties(){return{autosize:{type:Boolean},autocomplete:{type:Boolean},autofocus:{type:Boolean},cols:{type:Number},dirname:{type:String},disabled:{type:Boolean,reflect:!0},maxLength:{type:Number,reflect:!0,attribute:"max-length"},minLength:{type:Number,reflect:!0,attribute:"min-length"},name:{type:String},placeholder:{type:String},readOnly:{type:Boolean,reflect:!0,attribute:"read-only"},resize:{type:String,reflect:!0},rows:{type:Number},spellcheck:{type:Boolean,reflect:!0,attribute:"spell-check"},value:{type:String},wrap:{type:String},status:{type:String,reflect:!0}}}constructor(){super(),this.textAreaElement=null,this.field=new s$2(this,{context:fieldContext,subscribe:!0,callback:()=>{__classPrivateFieldGet(this,_TextArea_updateStatusClass,"f").call(this)}}),_TextArea_handleInput.set(this,(t=>{this.value=t.target.value,this.reemit(t)})),_TextArea_updateStatusClass.set(this,(()=>{var t;const e=this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status);this.classList.remove("-status-default","-status-danger"),this.classList.add(`-status-${e}`)})),this.cols=40,this.disabled=!1,this.placeholder=void 0,this.resize="vertical",this.rows=6,this.value=void 0}connectedCallback(){super.connectedCallback(),this.setAttribute("role","textbox")}update(t){super.update(t),t.has("status")&&__classPrivateFieldGet(this,_TextArea_updateStatusClass,"f").call(this)}updated(t){super.updated(t),t.has("autosize")&&(this.autosize?n(this.textarea):n.destroy(this.textarea))}render(){return x
|
|
2783
|
+
`}class TextArea extends Component{static get properties(){return{autosize:{type:Boolean},autocomplete:{type:Boolean},autofocus:{type:Boolean},cols:{type:Number},dirname:{type:String},disabled:{type:Boolean,reflect:!0},maxLength:{type:Number,reflect:!0,attribute:"max-length"},minLength:{type:Number,reflect:!0,attribute:"min-length"},name:{type:String},placeholder:{type:String},readOnly:{type:Boolean,reflect:!0,attribute:"read-only"},resize:{type:String,reflect:!0},rows:{type:Number},spellcheck:{type:Boolean,reflect:!0,attribute:"spell-check"},value:{type:String},wrap:{type:String},status:{type:String,reflect:!0}}}constructor(){super(),this.textAreaElement=null,this.field=new s$2(this,{context:fieldContext,subscribe:!0,callback:()=>{__classPrivateFieldGet(this,_TextArea_updateStatusClass,"f").call(this)}}),_TextArea_handleInput.set(this,(t=>{this.value=t.target.value,this.reemit(t)})),_TextArea_updateStatusClass.set(this,(()=>{var t;const e=this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status);this.classList.remove("-status-default","-status-danger"),this.classList.add(`-status-${e}`)})),this.cols=40,this.disabled=!1,this.placeholder=void 0,this.resize="vertical",this.rows=6,this.value=void 0}connectedCallback(){super.connectedCallback(),this.setAttribute("role","textbox")}update(t){super.update(t),t.has("status")&&__classPrivateFieldGet(this,_TextArea_updateStatusClass,"f").call(this)}updated(t){super.updated(t),t.has("autosize")&&(this.autosize?n(this.textarea):n.destroy(this.textarea))}render(){return x`
|
|
2625
2784
|
<textarea
|
|
2626
2785
|
name="${l$1(this.name)}"
|
|
2627
2786
|
autocomplete=${l$1(this.autocomplete)}
|
|
@@ -2750,7 +2909,7 @@ ${this.value}</textarea
|
|
|
2750
2909
|
.clear.is-visible {
|
|
2751
2910
|
visibility: visible;
|
|
2752
2911
|
}
|
|
2753
|
-
`}_TextArea_handleInput=new WeakMap,_TextArea_updateStatusClass=new WeakMap,TextArea.styles=[styles$6()],window.customElements.define("m-text-area",TextArea);class TextField extends Component{static get properties(){return{clearable:{type:Boolean},disabled:{type:Boolean,reflect:!0},inputMode:{type:String,attribute:"input-mode"},max:{type:String},maxLength:{type:Number,reflect:!0,attribute:"max-length"},min:{type:String},minLength:{type:Number,reflect:!0,attribute:"min-length"},name:{type:String},pattern:{type:String},placeholder:{type:String},readOnly:{type:Boolean,reflect:!0,attribute:"read-only"},size:{type:String,reflect:!0},status:{type:String,reflect:!0},step:{type:String},type:{type:String},value:{type:String}}}constructor(){super(),_TextField_instances.add(this),this.inputElement=null,this.field=new s$2(this,{context:fieldContext,subscribe:!0,callback:()=>{__classPrivateFieldGet(this,_TextField_updateStatusClass,"f").call(this)}}),_TextField_updateStatusClass.set(this,(()=>{var t;const e=this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status)||"default";this.classList.remove("-status-default","-status-danger"),this.classList.add(`-status-${e}`)})),_TextField_handleInput.set(this,(t=>{this.value=t.target.value,this.reemit(t)})),_TextField_handleClear.set(this,(t=>{t.stopPropagation(),this.clear()})),this.clearable=!1,this.disabled=!1,this.placeholder=void 0,this.size="default",this.type="text",this.value=void 0,this.max=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","textbox")}update(t){super.update(t),t.has("status")&&__classPrivateFieldGet(this,_TextField_updateStatusClass,"f").call(this)}render(){return x
|
|
2912
|
+
`}_TextArea_handleInput=new WeakMap,_TextArea_updateStatusClass=new WeakMap,TextArea.styles=[styles$6()],window.customElements.define("m-text-area",TextArea);class TextField extends Component{static get properties(){return{clearable:{type:Boolean},disabled:{type:Boolean,reflect:!0},inputMode:{type:String,attribute:"input-mode"},max:{type:String},maxLength:{type:Number,reflect:!0,attribute:"max-length"},min:{type:String},minLength:{type:Number,reflect:!0,attribute:"min-length"},name:{type:String},pattern:{type:String},placeholder:{type:String},readOnly:{type:Boolean,reflect:!0,attribute:"read-only"},size:{type:String,reflect:!0},status:{type:String,reflect:!0},step:{type:String},type:{type:String},value:{type:String}}}constructor(){super(),_TextField_instances.add(this),this.inputElement=null,this.field=new s$2(this,{context:fieldContext,subscribe:!0,callback:()=>{__classPrivateFieldGet(this,_TextField_updateStatusClass,"f").call(this)}}),_TextField_updateStatusClass.set(this,(()=>{var t;const e=this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status)||"default";this.classList.remove("-status-default","-status-danger"),this.classList.add(`-status-${e}`)})),_TextField_handleInput.set(this,(t=>{this.value=t.target.value,this.reemit(t)})),_TextField_handleClear.set(this,(t=>{t.stopPropagation(),this.clear()})),this.clearable=!1,this.disabled=!1,this.placeholder=void 0,this.size="default",this.type="text",this.value=void 0,this.max=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","textbox")}update(t){super.update(t),t.has("status")&&__classPrivateFieldGet(this,_TextField_updateStatusClass,"f").call(this)}render(){return x`
|
|
2754
2913
|
<slot name="leading"></slot>
|
|
2755
2914
|
<input
|
|
2756
2915
|
?disabled="${this.disabled}"
|
|
@@ -2772,7 +2931,7 @@ ${this.value}</textarea
|
|
|
2772
2931
|
type="${l$1(this.type)}"
|
|
2773
2932
|
value="${l$1(this.value)}"
|
|
2774
2933
|
/>
|
|
2775
|
-
${this.clearable?x
|
|
2934
|
+
${this.clearable?x`<m-close-button
|
|
2776
2935
|
class=${o$2({clear:!0,"is-visible":__classPrivateFieldGet(this,_TextField_instances,"m",_TextField_isClearVisible).call(this)})}
|
|
2777
2936
|
controls="${l$1(this.id)}"
|
|
2778
2937
|
@m-close=${__classPrivateFieldGet(this,_TextField_handleClear,"f")}
|
|
@@ -2805,14 +2964,14 @@ ${this.value}</textarea
|
|
|
2805
2964
|
.toggle-group.-show-check ::slotted(m-toggle[aria-checked='true']) {
|
|
2806
2965
|
--m-toggle-icon-display: inline-flex;
|
|
2807
2966
|
}
|
|
2808
|
-
`]}var _ToggleGroup_selectionController,_ToggleGroup_defaultSlot,_ToggleGroup_getToggles,_ToggleGroup_setToggleRole,_ToggleGroup_setToggleChecked,_ToggleGroup_setToggleDisabled,_Toggle_instances,_Toggle_button_get,_Toggle_handleClick,_Toggle_setDisabled,_Toggle_setChecked;class ToggleGroup extends s$5{static get properties(){return{disabled:{type:Boolean},role:{type:String,reflect:!0},showCheck:{type:Boolean,attribute:"show-check"},size:{type:String,reflect:!0},type:{type:String},value:{},selection:{state:!0}}}constructor(){super(),_ToggleGroup_selectionController.set(this,null),_ToggleGroup_defaultSlot.set(this,null),_ToggleGroup_getToggles.set(this,(()=>{var t,e,o;__classPrivateFieldSet(this,_ToggleGroup_defaultSlot,null!==(t=__classPrivateFieldGet(this,_ToggleGroup_defaultSlot,"f"))&&void 0!==t?t:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(o=null===(e=__classPrivateFieldGet(this,_ToggleGroup_defaultSlot,"f"))||void 0===e?void 0:e.assignedElements({flatten:!0}))&&void 0!==o?o:[]].filter((t=>"m-toggle"===t.tagName.toLowerCase()))})),_ToggleGroup_setToggleRole.set(this,(t=>{t.setAttribute("role",["single","single-strict"].includes(this.type)?"radio":"checkbox")})),_ToggleGroup_setToggleChecked.set(this,(t=>{t.checked=this.selection.has(t.value)})),_ToggleGroup_setToggleDisabled.set(this,(t=>{t.disabled=this.disabled})),this.showCheck=!1,this.size="default",this.type="single",this.selection=new Set}update(t){super.update(t),(null!=t.get("type")&&null!=this.type||null==__classPrivateFieldGet(this,_ToggleGroup_selectionController,"f"))&&(__classPrivateFieldSet(this,_ToggleGroup_selectionController,new SelectionController(this,this.type,"m-toggle"),"f"),__classPrivateFieldGet(this,_ToggleGroup_selectionController,"f").init(toArray$1(this.value)),this.role=["single","single-strict"].includes(this.type)?"radiogroup":"group"),t.has("value")&&__classPrivateFieldGet(this,_ToggleGroup_selectionController,"f").init(toArray$1(this.value))}updated(t){super.updated(t),t.has("selection")&&__classPrivateFieldGet(this,_ToggleGroup_getToggles,"f").call(this).forEach((t=>{__classPrivateFieldGet(this,_ToggleGroup_setToggleChecked,"f").call(this,t)})),t.has("disabled")&&__classPrivateFieldGet(this,_ToggleGroup_getToggles,"f").call(this).forEach((t=>{__classPrivateFieldGet(this,_ToggleGroup_setToggleDisabled,"f").call(this,t)})),t.has("role")&&__classPrivateFieldGet(this,_ToggleGroup_getToggles,"f").call(this).forEach((t=>{__classPrivateFieldGet(this,_ToggleGroup_setToggleRole,"f").call(this,t)}))}render(){return x
|
|
2967
|
+
`]}var _ToggleGroup_selectionController,_ToggleGroup_defaultSlot,_ToggleGroup_getToggles,_ToggleGroup_setToggleRole,_ToggleGroup_setToggleChecked,_ToggleGroup_setToggleDisabled,_Toggle_instances,_Toggle_button_get,_Toggle_handleClick,_Toggle_setDisabled,_Toggle_setChecked;class ToggleGroup extends s$5{static get properties(){return{disabled:{type:Boolean},role:{type:String,reflect:!0},showCheck:{type:Boolean,attribute:"show-check"},size:{type:String,reflect:!0},type:{type:String},value:{},selection:{state:!0}}}constructor(){super(),_ToggleGroup_selectionController.set(this,null),_ToggleGroup_defaultSlot.set(this,null),_ToggleGroup_getToggles.set(this,(()=>{var t,e,o;__classPrivateFieldSet(this,_ToggleGroup_defaultSlot,null!==(t=__classPrivateFieldGet(this,_ToggleGroup_defaultSlot,"f"))&&void 0!==t?t:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(o=null===(e=__classPrivateFieldGet(this,_ToggleGroup_defaultSlot,"f"))||void 0===e?void 0:e.assignedElements({flatten:!0}))&&void 0!==o?o:[]].filter((t=>"m-toggle"===t.tagName.toLowerCase()))})),_ToggleGroup_setToggleRole.set(this,(t=>{t.setAttribute("role",["single","single-strict"].includes(this.type)?"radio":"checkbox")})),_ToggleGroup_setToggleChecked.set(this,(t=>{t.checked=this.selection.has(t.value)})),_ToggleGroup_setToggleDisabled.set(this,(t=>{t.disabled=this.disabled})),this.showCheck=!1,this.size="default",this.type="single",this.selection=new Set}update(t){super.update(t),(null!=t.get("type")&&null!=this.type||null==__classPrivateFieldGet(this,_ToggleGroup_selectionController,"f"))&&(__classPrivateFieldSet(this,_ToggleGroup_selectionController,new SelectionController(this,this.type,"m-toggle"),"f"),__classPrivateFieldGet(this,_ToggleGroup_selectionController,"f").init(toArray$1(this.value)),this.role=["single","single-strict"].includes(this.type)?"radiogroup":"group"),t.has("value")&&__classPrivateFieldGet(this,_ToggleGroup_selectionController,"f").init(toArray$1(this.value))}updated(t){super.updated(t),t.has("selection")&&__classPrivateFieldGet(this,_ToggleGroup_getToggles,"f").call(this).forEach((t=>{__classPrivateFieldGet(this,_ToggleGroup_setToggleChecked,"f").call(this,t)})),t.has("disabled")&&__classPrivateFieldGet(this,_ToggleGroup_getToggles,"f").call(this).forEach((t=>{__classPrivateFieldGet(this,_ToggleGroup_setToggleDisabled,"f").call(this,t)})),t.has("role")&&__classPrivateFieldGet(this,_ToggleGroup_getToggles,"f").call(this).forEach((t=>{__classPrivateFieldGet(this,_ToggleGroup_setToggleRole,"f").call(this,t)}))}render(){return x`
|
|
2809
2968
|
<m-group
|
|
2810
2969
|
class=${o$2({"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})}
|
|
2811
2970
|
gap="spacing-1"
|
|
2812
2971
|
>
|
|
2813
2972
|
<slot></slot>
|
|
2814
2973
|
</m-group>
|
|
2815
|
-
`}}function styles$3(){return[styles$
|
|
2974
|
+
`}}function styles$3(){return[styles$D(),i$4`
|
|
2816
2975
|
:host {
|
|
2817
2976
|
/*
|
|
2818
2977
|
* These custom properties are here because they are meant to be
|
|
@@ -2852,7 +3011,7 @@ ${this.value}</textarea
|
|
|
2852
3011
|
|
|
2853
3012
|
display: var(--m-toggle-icon-display);
|
|
2854
3013
|
}
|
|
2855
|
-
`]}_ToggleGroup_selectionController=new WeakMap,_ToggleGroup_defaultSlot=new WeakMap,_ToggleGroup_getToggles=new WeakMap,_ToggleGroup_setToggleRole=new WeakMap,_ToggleGroup_setToggleChecked=new WeakMap,_ToggleGroup_setToggleDisabled=new WeakMap,ToggleGroup.styles=[styles$4()],window.customElements.define("m-toggle-group",ToggleGroup);class Toggle extends s$5{static get properties(){return{checked:{type:Boolean},disabled:{type:Boolean,reflect:!0},role:{type:String,reflect:!0},value:{type:String,reflect:!0}}}constructor(){super(),_Toggle_instances.add(this),_Toggle_handleClick.set(this,(()=>{if(this.disabled)return;this.checked=!this.checked;const t={detail:{value:this.value,type:"toggle"},bubbles:!0,composed:!1};this.dispatchEvent(new CustomEvent("m-toggle",t))})),_Toggle_setDisabled.set(this,(()=>{this.setAttribute("aria-disabled",String(this.disabled))})),_Toggle_setChecked.set(this,(()=>{this.setAttribute("aria-checked",String(this.checked))})),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("click",__classPrivateFieldGet(this,_Toggle_handleClick,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",__classPrivateFieldGet(this,_Toggle_handleClick,"f"))}updated(t){super.updated(t),t.has("disabled")&&__classPrivateFieldGet(this,_Toggle_setDisabled,"f").call(this),t.has("checked")&&__classPrivateFieldGet(this,_Toggle_setChecked,"f").call(this)}render(){return x
|
|
3014
|
+
`]}_ToggleGroup_selectionController=new WeakMap,_ToggleGroup_defaultSlot=new WeakMap,_ToggleGroup_getToggles=new WeakMap,_ToggleGroup_setToggleRole=new WeakMap,_ToggleGroup_setToggleChecked=new WeakMap,_ToggleGroup_setToggleDisabled=new WeakMap,ToggleGroup.styles=[styles$4()],window.customElements.define("m-toggle-group",ToggleGroup);class Toggle extends s$5{static get properties(){return{checked:{type:Boolean},disabled:{type:Boolean,reflect:!0},role:{type:String,reflect:!0},value:{type:String,reflect:!0}}}constructor(){super(),_Toggle_instances.add(this),_Toggle_handleClick.set(this,(()=>{if(this.disabled)return;this.checked=!this.checked;const t={detail:{value:this.value,type:"toggle"},bubbles:!0,composed:!1};this.dispatchEvent(new CustomEvent("m-toggle",t))})),_Toggle_setDisabled.set(this,(()=>{this.setAttribute("aria-disabled",String(this.disabled))})),_Toggle_setChecked.set(this,(()=>{this.setAttribute("aria-checked",String(this.checked))})),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("click",__classPrivateFieldGet(this,_Toggle_handleClick,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",__classPrivateFieldGet(this,_Toggle_handleClick,"f"))}updated(t){super.updated(t),t.has("disabled")&&__classPrivateFieldGet(this,_Toggle_setDisabled,"f").call(this),t.has("checked")&&__classPrivateFieldGet(this,_Toggle_setChecked,"f").call(this)}render(){return x`
|
|
2856
3015
|
<button
|
|
2857
3016
|
type="button"
|
|
2858
3017
|
class=${o$2({button:!0,toggle:!0})}
|
|
@@ -2866,11 +3025,11 @@ ${this.value}</textarea
|
|
|
2866
3025
|
|
|
2867
3026
|
<slot></slot>
|
|
2868
3027
|
</button>
|
|
2869
|
-
`}focus(t){var e;null===(e=__classPrivateFieldGet(this,_Toggle_instances,"a",_Toggle_button_get))||void 0===e||e.focus(t)}}function trim(t){return t.trim()}function convertTriggerFromAttribute(t){return t?String(t).split(/[\s,]+/).map(trim).filter(Boolean):["hover"]}_Toggle_handleClick=new WeakMap,_Toggle_setDisabled=new WeakMap,_Toggle_setChecked=new WeakMap,_Toggle_instances=new WeakSet,_Toggle_button_get=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("button"))&&void 0!==e?e:null},Toggle.styles=[styles$3()],window.customElements.define("m-toggle",Toggle);const min=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=t=>({x:t,y:t}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp(t,e,o){return max(t,min(e,o))}function evaluate(t,e){return"function"==typeof t?t(e):t}function getSide(t){return t.split("-")[0]}function getAlignment(t){return t.split("-")[1]}function getOppositeAxis(t){return"x"===t?"y":"x"}function getAxisLength(t){return"y"===t?"height":"width"}function getSideAxis(t){return["top","bottom"].includes(getSide(t))?"y":"x"}function getAlignmentAxis(t){return getOppositeAxis(getSideAxis(t))}function getAlignmentSides(t,e,o){void 0===o&&(o=!1);const i=getAlignment(t),r=getAlignmentAxis(t),n=getAxisLength(r);let s="x"===r?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[n]>e.floating[n]&&(s=getOppositePlacement(s)),[s,getOppositePlacement(s)]}function getExpandedPlacements(t){const e=getOppositePlacement(t);return[getOppositeAlignmentPlacement(t),e,getOppositeAlignmentPlacement(e)]}function getOppositeAlignmentPlacement(t){return t.replace(/start|end/g,(t=>oppositeAlignmentMap[t]))}function getSideList(t,e,o){const i=["left","right"],r=["right","left"],n=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return o?e?r:i:e?i:r;case"left":case"right":return e?n:s;default:return[]}}function getOppositeAxisPlacements(t,e,o,i){const r=getAlignment(t);let n=getSideList(getSide(t),"start"===o,i);return r&&(n=n.map((t=>t+"-"+r)),e&&(n=n.concat(n.map(getOppositeAlignmentPlacement)))),n}function getOppositePlacement(t){return t.replace(/left|right|bottom|top/g,(t=>oppositeSideMap[t]))}function expandPaddingObject(t){return{top:0,right:0,bottom:0,left:0,...t}}function getPaddingObject(t){return"number"!=typeof t?expandPaddingObject(t):{top:t,right:t,bottom:t,left:t}}function rectToClientRect(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function computeCoordsFromPlacement(t,e,o){let{reference:i,floating:r}=t;const n=getSideAxis(e),s=getAlignmentAxis(e),a=getAxisLength(s),l=getSide(e),c="y"===n,d=i.x+i.width/2-r.width/2,u=i.y+i.height/2-r.height/2,g=i[a]/2-r[a]/2;let h;switch(l){case"top":h={x:d,y:i.y-r.height};break;case"bottom":h={x:d,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:u};break;case"left":h={x:i.x-r.width,y:u};break;default:h={x:i.x,y:i.y}}switch(getAlignment(e)){case"start":h[s]-=g*(o&&c?-1:1);break;case"end":h[s]+=g*(o&&c?-1:1)}return h}const computePosition$1=async(t,e,o)=>{const{placement:i="bottom",strategy:r="absolute",middleware:n=[],platform:s}=o,a=n.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:d,y:u}=computeCoordsFromPlacement(c,i,l),g=i,h={},p=0;for(let o=0;o<a.length;o++){const{name:n,fn:m}=a[o],{x:b,y:f,data:_,reset:$}=await m({x:d,y:u,initialPlacement:i,placement:g,strategy:r,middlewareData:h,rects:c,platform:s,elements:{reference:t,floating:e}});d=null!=b?b:d,u=null!=f?f:u,h={...h,[n]:{...h[n],..._}},$&&p<=50&&(p++,"object"==typeof $&&($.placement&&(g=$.placement),$.rects&&(c=!0===$.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):$.rects),({x:d,y:u}=computeCoordsFromPlacement(c,g,l))),o=-1)}return{x:d,y:u,placement:g,strategy:r,middlewareData:h}};async function detectOverflow(t,e){var o;void 0===e&&(e={});const{x:i,y:r,platform:n,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:g=!1,padding:h=0}=evaluate(e,t),p=getPaddingObject(h),m=a[g?"floating"===u?"reference":"floating":u],b=rectToClientRect(await n.getClippingRect({element:null==(o=await(null==n.isElement?void 0:n.isElement(m)))||o?m:m.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),f="floating"===u?{...s.floating,x:i,y:r}:s.reference,_=await(null==n.getOffsetParent?void 0:n.getOffsetParent(a.floating)),$=await(null==n.isElement?void 0:n.isElement(_))&&await(null==n.getScale?void 0:n.getScale(_))||{x:1,y:1},y=rectToClientRect(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:f,offsetParent:_,strategy:l}):f);return{top:(b.top-y.top+p.top)/$.y,bottom:(y.bottom-b.bottom+p.bottom)/$.y,left:(b.left-y.left+p.left)/$.x,right:(y.right-b.right+p.right)/$.x}}const arrow=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:i,placement:r,rects:n,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:d=0}=evaluate(t,e)||{};if(null==c)return{};const u=getPaddingObject(d),g={x:o,y:i},h=getAlignmentAxis(r),p=getAxisLength(h),m=await s.getDimensions(c),b="y"===h,f=b?"top":"left",_=b?"bottom":"right",$=b?"clientHeight":"clientWidth",y=n.reference[p]+n.reference[h]-g[h]-n.floating[p],v=g[h]-n.reference[h],w=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let x=w?w[$]:0;x&&await(null==s.isElement?void 0:s.isElement(w))||(x=a.floating[$]||n.floating[p]);const k=y/2-v/2,C=x/2-m[p]/2-1,T=min(u[f],C),S=min(u[_],C),P=T,z=x-m[p]-S,F=x/2-m[p]/2+k,A=clamp(P,F,z),B=!l.arrow&&null!=getAlignment(r)&&F!=A&&n.reference[p]/2-(F<P?T:S)-m[p]/2<0,D=B?F<P?F-P:F-z:0;return{[h]:g[h]+D,data:{[h]:A,centerOffset:F-A-D,...B&&{alignmentOffset:D}},reset:B}}}),flip=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o,i;const{placement:r,middlewareData:n,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...b}=evaluate(t,e);if(null!=(o=n.arrow)&&o.alignmentOffset)return{};const f=getSide(r),_=getSide(a)===a,$=await(null==l.isRTL?void 0:l.isRTL(c.floating)),y=g||(_||!m?[getOppositePlacement(a)]:getExpandedPlacements(a));g||"none"===p||y.push(...getOppositeAxisPlacements(a,m,p,$));const v=[a,...y],w=await detectOverflow(e,b),x=[];let k=(null==(i=n.flip)?void 0:i.overflows)||[];if(d&&x.push(w[f]),u){const t=getAlignmentSides(r,s,$);x.push(w[t[0]],w[t[1]])}if(k=[...k,{placement:r,overflows:x}],!x.every((t=>t<=0))){var C,T;const t=((null==(C=n.flip)?void 0:C.index)||0)+1,e=v[t];if(e)return{data:{index:t,overflows:k},reset:{placement:e}};let o=null==(T=k.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:T.placement;if(!o)switch(h){case"bestFit":{var S;const t=null==(S=k.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:S[0];t&&(o=t);break}case"initialPlacement":o=a}if(r!==o)return{reset:{placement:o}}}return{}}}};async function convertValueToCoords(t,e){const{placement:o,platform:i,elements:r}=t,n=await(null==i.isRTL?void 0:i.isRTL(r.floating)),s=getSide(o),a=getAlignment(o),l="y"===getSideAxis(o),c=["left","top"].includes(s)?-1:1,d=n&&l?-1:1,u=evaluate(e,t);let{mainAxis:g,crossAxis:h,alignmentAxis:p}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&"number"==typeof p&&(h="end"===a?-1*p:p),l?{x:h*d,y:g*c}:{x:g*c,y:h*d}}const offset=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:o,y:i}=e,r=await convertValueToCoords(e,t);return{x:o+r.x,y:i+r.y,data:r}}}},shift=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:r}=e,{mainAxis:n=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=evaluate(t,e),c={x:o,y:i},d=await detectOverflow(e,l),u=getSideAxis(getSide(r)),g=getOppositeAxis(u);let h=c[g],p=c[u];if(n){const t="y"===g?"bottom":"right";h=clamp(h+d["y"===g?"top":"left"],h,h-d[t])}if(s){const t="y"===u?"bottom":"right";p=clamp(p+d["y"===u?"top":"left"],p,p-d[t])}const m=a.fn({...e,[g]:h,[u]:p});return{...m,data:{x:m.x-o,y:m.y-i}}}}};function getNodeName(t){return isNode(t)?(t.nodeName||"").toLowerCase():"#document"}function getWindow(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function getDocumentElement(t){var e;return null==(e=(isNode(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function isNode(t){return t instanceof Node||t instanceof getWindow(t).Node}function isElement(t){return t instanceof Element||t instanceof getWindow(t).Element}function isHTMLElement(t){return t instanceof HTMLElement||t instanceof getWindow(t).HTMLElement}function isShadowRoot(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof getWindow(t).ShadowRoot)}function isOverflowElement(t){const{overflow:e,overflowX:o,overflowY:i,display:r}=getComputedStyle(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(r)}function isTableElement(t){return["table","td","th"].includes(getNodeName(t))}function isContainingBlock(t){const e=isWebKit(),o=getComputedStyle(t);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function getContainingBlock(t){let e=getParentNode(t);for(;isHTMLElement(e)&&!isLastTraversableNode(e);){if(isContainingBlock(e))return e;e=getParentNode(e)}return null}function isWebKit(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(t){return["html","body","#document"].includes(getNodeName(t))}function getComputedStyle(t){return getWindow(t).getComputedStyle(t)}function getNodeScroll(t){return isElement(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getParentNode(t){if("html"===getNodeName(t))return t;const e=t.assignedSlot||t.parentNode||isShadowRoot(t)&&t.host||getDocumentElement(t);return isShadowRoot(e)?e.host:e}function getNearestOverflowAncestor(t){const e=getParentNode(t);return isLastTraversableNode(e)?t.ownerDocument?t.ownerDocument.body:t.body:isHTMLElement(e)&&isOverflowElement(e)?e:getNearestOverflowAncestor(e)}function getOverflowAncestors(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const r=getNearestOverflowAncestor(t),n=r===(null==(i=t.ownerDocument)?void 0:i.body),s=getWindow(r);return n?e.concat(s,s.visualViewport||[],isOverflowElement(r)?r:[],s.frameElement&&o?getOverflowAncestors(s.frameElement):[]):e.concat(r,getOverflowAncestors(r,[],o))}function getCssDimensions(t){const e=getComputedStyle(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=isHTMLElement(t),n=r?t.offsetWidth:o,s=r?t.offsetHeight:i,a=round(o)!==n||round(i)!==s;return a&&(o=n,i=s),{width:o,height:i,$:a}}function unwrapElement(t){return isElement(t)?t:t.contextElement}function getScale(t){const e=unwrapElement(t);if(!isHTMLElement(e))return createCoords(1);const o=e.getBoundingClientRect(),{width:i,height:r,$:n}=getCssDimensions(e);let s=(n?round(o.width):o.width)/i,a=(n?round(o.height):o.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const noOffsets=createCoords(0);function getVisualOffsets(t){const e=getWindow(t);return isWebKit()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:noOffsets}function shouldAddVisualOffsets(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==getWindow(t))&&e}function getBoundingClientRect(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const r=t.getBoundingClientRect(),n=unwrapElement(t);let s=createCoords(1);e&&(i?isElement(i)&&(s=getScale(i)):s=getScale(t));const a=shouldAddVisualOffsets(n,o,i)?getVisualOffsets(n):createCoords(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,d=r.width/s.x,u=r.height/s.y;if(n){const t=getWindow(n),e=i&&isElement(i)?getWindow(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=getScale(o),e=o.getBoundingClientRect(),i=getComputedStyle(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,n=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,d*=t.x,u*=t.y,l+=r,c+=n,o=getWindow(o).frameElement}}return rectToClientRect({width:d,height:u,x:l,y:c})}function convertOffsetParentRelativeRectToViewportRelativeRect(t){let{rect:e,offsetParent:o,strategy:i}=t;const r=isHTMLElement(o),n=getDocumentElement(o);if(o===n)return e;let s={scrollLeft:0,scrollTop:0},a=createCoords(1);const l=createCoords(0);if((r||!r&&"fixed"!==i)&&(("body"!==getNodeName(o)||isOverflowElement(n))&&(s=getNodeScroll(o)),isHTMLElement(o))){const t=getBoundingClientRect(o);a=getScale(o),l.x=t.x+o.clientLeft,l.y=t.y+o.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-s.scrollLeft*a.x+l.x,y:e.y*a.y-s.scrollTop*a.y+l.y}}function getClientRects(t){return Array.from(t.getClientRects())}function getWindowScrollBarX(t){return getBoundingClientRect(getDocumentElement(t)).left+getNodeScroll(t).scrollLeft}function getDocumentRect(t){const e=getDocumentElement(t),o=getNodeScroll(t),i=t.ownerDocument.body,r=max(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),n=max(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+getWindowScrollBarX(t);const a=-o.scrollTop;return"rtl"===getComputedStyle(i).direction&&(s+=max(e.clientWidth,i.clientWidth)-r),{width:r,height:n,x:s,y:a}}function getViewportRect(t,e){const o=getWindow(t),i=getDocumentElement(t),r=o.visualViewport;let n=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){n=r.width,s=r.height;const t=isWebKit();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:n,height:s,x:a,y:l}}function getInnerBoundingClientRect(t,e){const o=getBoundingClientRect(t,!0,"fixed"===e),i=o.top+t.clientTop,r=o.left+t.clientLeft,n=isHTMLElement(t)?getScale(t):createCoords(1);return{width:t.clientWidth*n.x,height:t.clientHeight*n.y,x:r*n.x,y:i*n.y}}function getClientRectFromClippingAncestor(t,e,o){let i;if("viewport"===e)i=getViewportRect(t,o);else if("document"===e)i=getDocumentRect(getDocumentElement(t));else if(isElement(e))i=getInnerBoundingClientRect(e,o);else{const o=getVisualOffsets(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return rectToClientRect(i)}function hasFixedPositionAncestor(t,e){const o=getParentNode(t);return!(o===e||!isElement(o)||isLastTraversableNode(o))&&("fixed"===getComputedStyle(o).position||hasFixedPositionAncestor(o,e))}function getClippingElementAncestors(t,e){const o=e.get(t);if(o)return o;let i=getOverflowAncestors(t,[],!1).filter((t=>isElement(t)&&"body"!==getNodeName(t))),r=null;const n="fixed"===getComputedStyle(t).position;let s=n?getParentNode(t):t;for(;isElement(s)&&!isLastTraversableNode(s);){const e=getComputedStyle(s),o=isContainingBlock(s);o||"fixed"!==e.position||(r=null);(n?!o&&!r:!o&&"static"===e.position&&!!r&&["absolute","fixed"].includes(r.position)||isOverflowElement(s)&&!o&&hasFixedPositionAncestor(t,s))?i=i.filter((t=>t!==s)):r=e,s=getParentNode(s)}return e.set(t,i),i}function getClippingRect(t){let{element:e,boundary:o,rootBoundary:i,strategy:r}=t;const n=[..."clippingAncestors"===o?getClippingElementAncestors(e,this._c):[].concat(o),i],s=n[0],a=n.reduce(((t,o)=>{const i=getClientRectFromClippingAncestor(e,o,r);return t.top=max(i.top,t.top),t.right=min(i.right,t.right),t.bottom=min(i.bottom,t.bottom),t.left=max(i.left,t.left),t}),getClientRectFromClippingAncestor(e,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function getDimensions(t){return getCssDimensions(t)}function getRectRelativeToOffsetParent(t,e,o){const i=isHTMLElement(e),r=getDocumentElement(e),n="fixed"===o,s=getBoundingClientRect(t,!0,n,e);let a={scrollLeft:0,scrollTop:0};const l=createCoords(0);if(i||!i&&!n)if(("body"!==getNodeName(e)||isOverflowElement(r))&&(a=getNodeScroll(e)),i){const t=getBoundingClientRect(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=getWindowScrollBarX(r));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function getTrueOffsetParent(t,e){return isHTMLElement(t)&&"fixed"!==getComputedStyle(t).position?e?e(t):t.offsetParent:null}function getOffsetParent(t,e){const o=getWindow(t);if(!isHTMLElement(t))return o;let i=getTrueOffsetParent(t,e);for(;i&&isTableElement(i)&&"static"===getComputedStyle(i).position;)i=getTrueOffsetParent(i,e);return i&&("html"===getNodeName(i)||"body"===getNodeName(i)&&"static"===getComputedStyle(i).position&&!isContainingBlock(i))?o:i||getContainingBlock(t)||o}const getElementRects=async function(t){let{reference:e,floating:o,strategy:i}=t;const r=this.getOffsetParent||getOffsetParent,n=this.getDimensions;return{reference:getRectRelativeToOffsetParent(e,await r(o),i),floating:{x:0,y:0,...await n(o)}}};function isRTL(t){return"rtl"===getComputedStyle(t).direction}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function observeMove(t,e){let o,i=null;const r=getDocumentElement(t);function n(){clearTimeout(o),i&&i.disconnect(),i=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),n();const{left:c,top:d,width:u,height:g}=t.getBoundingClientRect();if(a||e(),!u||!g)return;const h={rootMargin:-floor(d)+"px "+-floor(r.clientWidth-(c+u))+"px "+-floor(r.clientHeight-(d+g))+"px "+-floor(c)+"px",threshold:max(0,min(1,l))||1};let p=!0;function m(t){const e=t[0].intersectionRatio;if(e!==l){if(!p)return s();e?s(!1,e):o=setTimeout((()=>{s(!1,1e-7)}),100)}p=!1}try{i=new IntersectionObserver(m,{...h,root:r.ownerDocument})}catch(t){i=new IntersectionObserver(m,h)}i.observe(t)}(!0),n}function autoUpdate(t,e,o,i){void 0===i&&(i={});const{ancestorScroll:r=!0,ancestorResize:n=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,c=unwrapElement(t),d=r||n?[...c?getOverflowAncestors(c):[],...getOverflowAncestors(e)]:[];d.forEach((t=>{r&&t.addEventListener("scroll",o,{passive:!0}),n&&t.addEventListener("resize",o)}));const u=c&&a?observeMove(c,o):null;let g,h=-1,p=null;s&&(p=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{p&&p.observe(e)}))),o()})),c&&!l&&p.observe(c),p.observe(e));let m=l?getBoundingClientRect(t):null;return l&&function e(){const i=getBoundingClientRect(t);!m||i.x===m.x&&i.y===m.y&&i.width===m.width&&i.height===m.height||o();m=i,g=requestAnimationFrame(e)}(),o(),()=>{d.forEach((t=>{r&&t.removeEventListener("scroll",o),n&&t.removeEventListener("resize",o)})),u&&u(),p&&p.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const computePosition=(t,e,o)=>{const i=new Map,r={platform,...o},n={...r.platform,_c:i};return computePosition$1(t,e,{...r,platform:n})};var _Popover_updateCleanup,_Popover_getArrowPosition;const UNSET_SIDES={top:"",bottom:"",left:"",right:""},POPOVER_PLACEMENT_VALUES=["top","left","right","bottom","top-start","top-end","bottom-start","bottom-end"];class Popover extends Component{static get properties(){return{position:{type:String,reflect:!0},placement:{type:String},open:{type:Boolean,reflect:!0}}}constructor(){super(),_Popover_updateCleanup.set(this,void 0),this.getFloatingOffset=()=>20,this.renderArrow=()=>x$1`<span id="arrow">
|
|
3028
|
+
`}focus(t){var e;null===(e=__classPrivateFieldGet(this,_Toggle_instances,"a",_Toggle_button_get))||void 0===e||e.focus(t)}}function trim(t){return t.trim()}function convertTriggerFromAttribute(t){return t?String(t).split(/[\s,]+/).map(trim).filter(Boolean):["hover"]}_Toggle_handleClick=new WeakMap,_Toggle_setDisabled=new WeakMap,_Toggle_setChecked=new WeakMap,_Toggle_instances=new WeakSet,_Toggle_button_get=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("button"))&&void 0!==e?e:null},Toggle.styles=[styles$3()],window.customElements.define("m-toggle",Toggle);const min=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=t=>({x:t,y:t}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp(t,e,o){return max(t,min(e,o))}function evaluate(t,e){return"function"==typeof t?t(e):t}function getSide(t){return t.split("-")[0]}function getAlignment(t){return t.split("-")[1]}function getOppositeAxis(t){return"x"===t?"y":"x"}function getAxisLength(t){return"y"===t?"height":"width"}function getSideAxis(t){return["top","bottom"].includes(getSide(t))?"y":"x"}function getAlignmentAxis(t){return getOppositeAxis(getSideAxis(t))}function getAlignmentSides(t,e,o){void 0===o&&(o=!1);const i=getAlignment(t),r=getAlignmentAxis(t),n=getAxisLength(r);let s="x"===r?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[n]>e.floating[n]&&(s=getOppositePlacement(s)),[s,getOppositePlacement(s)]}function getExpandedPlacements(t){const e=getOppositePlacement(t);return[getOppositeAlignmentPlacement(t),e,getOppositeAlignmentPlacement(e)]}function getOppositeAlignmentPlacement(t){return t.replace(/start|end/g,(t=>oppositeAlignmentMap[t]))}function getSideList(t,e,o){const i=["left","right"],r=["right","left"],n=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return o?e?r:i:e?i:r;case"left":case"right":return e?n:s;default:return[]}}function getOppositeAxisPlacements(t,e,o,i){const r=getAlignment(t);let n=getSideList(getSide(t),"start"===o,i);return r&&(n=n.map((t=>t+"-"+r)),e&&(n=n.concat(n.map(getOppositeAlignmentPlacement)))),n}function getOppositePlacement(t){return t.replace(/left|right|bottom|top/g,(t=>oppositeSideMap[t]))}function expandPaddingObject(t){return{top:0,right:0,bottom:0,left:0,...t}}function getPaddingObject(t){return"number"!=typeof t?expandPaddingObject(t):{top:t,right:t,bottom:t,left:t}}function rectToClientRect(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function computeCoordsFromPlacement(t,e,o){let{reference:i,floating:r}=t;const n=getSideAxis(e),s=getAlignmentAxis(e),a=getAxisLength(s),l=getSide(e),c="y"===n,d=i.x+i.width/2-r.width/2,u=i.y+i.height/2-r.height/2,h=i[a]/2-r[a]/2;let g;switch(l){case"top":g={x:d,y:i.y-r.height};break;case"bottom":g={x:d,y:i.y+i.height};break;case"right":g={x:i.x+i.width,y:u};break;case"left":g={x:i.x-r.width,y:u};break;default:g={x:i.x,y:i.y}}switch(getAlignment(e)){case"start":g[s]-=h*(o&&c?-1:1);break;case"end":g[s]+=h*(o&&c?-1:1)}return g}const computePosition$1=async(t,e,o)=>{const{placement:i="bottom",strategy:r="absolute",middleware:n=[],platform:s}=o,a=n.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:d,y:u}=computeCoordsFromPlacement(c,i,l),h=i,g={},p=0;for(let o=0;o<a.length;o++){const{name:n,fn:m}=a[o],{x:b,y:f,data:_,reset:y}=await m({x:d,y:u,initialPlacement:i,placement:h,strategy:r,middlewareData:g,rects:c,platform:s,elements:{reference:t,floating:e}});d=null!=b?b:d,u=null!=f?f:u,g={...g,[n]:{...g[n],..._}},y&&p<=50&&(p++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(c=!0===y.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):y.rects),({x:d,y:u}=computeCoordsFromPlacement(c,h,l))),o=-1)}return{x:d,y:u,placement:h,strategy:r,middlewareData:g}};async function detectOverflow(t,e){var o;void 0===e&&(e={});const{x:i,y:r,platform:n,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:g=0}=evaluate(e,t),p=getPaddingObject(g),m=a[h?"floating"===u?"reference":"floating":u],b=rectToClientRect(await n.getClippingRect({element:null==(o=await(null==n.isElement?void 0:n.isElement(m)))||o?m:m.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),f="floating"===u?{...s.floating,x:i,y:r}:s.reference,_=await(null==n.getOffsetParent?void 0:n.getOffsetParent(a.floating)),y=await(null==n.isElement?void 0:n.isElement(_))&&await(null==n.getScale?void 0:n.getScale(_))||{x:1,y:1},$=rectToClientRect(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:f,offsetParent:_,strategy:l}):f);return{top:(b.top-$.top+p.top)/y.y,bottom:($.bottom-b.bottom+p.bottom)/y.y,left:(b.left-$.left+p.left)/y.x,right:($.right-b.right+p.right)/y.x}}const arrow=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:i,placement:r,rects:n,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:d=0}=evaluate(t,e)||{};if(null==c)return{};const u=getPaddingObject(d),h={x:o,y:i},g=getAlignmentAxis(r),p=getAxisLength(g),m=await s.getDimensions(c),b="y"===g,f=b?"top":"left",_=b?"bottom":"right",y=b?"clientHeight":"clientWidth",$=n.reference[p]+n.reference[g]-h[g]-n.floating[p],v=h[g]-n.reference[g],w=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let x=w?w[y]:0;x&&await(null==s.isElement?void 0:s.isElement(w))||(x=a.floating[y]||n.floating[p]);const k=$/2-v/2,S=x/2-m[p]/2-1,C=min(u[f],S),T=min(u[_],S),P=C,z=x-m[p]-T,A=x/2-m[p]/2+k,F=clamp(P,A,z),B=!l.arrow&&null!=getAlignment(r)&&A!=F&&n.reference[p]/2-(A<P?C:T)-m[p]/2<0,D=B?A<P?A-P:A-z:0;return{[g]:h[g]+D,data:{[g]:F,centerOffset:A-F-D,...B&&{alignmentOffset:D}},reset:B}}}),flip=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o,i;const{placement:r,middlewareData:n,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...b}=evaluate(t,e);if(null!=(o=n.arrow)&&o.alignmentOffset)return{};const f=getSide(r),_=getSide(a)===a,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),$=h||(_||!m?[getOppositePlacement(a)]:getExpandedPlacements(a));h||"none"===p||$.push(...getOppositeAxisPlacements(a,m,p,y));const v=[a,...$],w=await detectOverflow(e,b),x=[];let k=(null==(i=n.flip)?void 0:i.overflows)||[];if(d&&x.push(w[f]),u){const t=getAlignmentSides(r,s,y);x.push(w[t[0]],w[t[1]])}if(k=[...k,{placement:r,overflows:x}],!x.every((t=>t<=0))){var S,C;const t=((null==(S=n.flip)?void 0:S.index)||0)+1,e=v[t];if(e)return{data:{index:t,overflows:k},reset:{placement:e}};let o=null==(C=k.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:C.placement;if(!o)switch(g){case"bestFit":{var T;const t=null==(T=k.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:T[0];t&&(o=t);break}case"initialPlacement":o=a}if(r!==o)return{reset:{placement:o}}}return{}}}};async function convertValueToCoords(t,e){const{placement:o,platform:i,elements:r}=t,n=await(null==i.isRTL?void 0:i.isRTL(r.floating)),s=getSide(o),a=getAlignment(o),l="y"===getSideAxis(o),c=["left","top"].includes(s)?-1:1,d=n&&l?-1:1,u=evaluate(e,t);let{mainAxis:h,crossAxis:g,alignmentAxis:p}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&"number"==typeof p&&(g="end"===a?-1*p:p),l?{x:g*d,y:h*c}:{x:h*c,y:g*d}}const offset=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:o,y:i}=e,r=await convertValueToCoords(e,t);return{x:o+r.x,y:i+r.y,data:r}}}},shift=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:r}=e,{mainAxis:n=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=evaluate(t,e),c={x:o,y:i},d=await detectOverflow(e,l),u=getSideAxis(getSide(r)),h=getOppositeAxis(u);let g=c[h],p=c[u];if(n){const t="y"===h?"bottom":"right";g=clamp(g+d["y"===h?"top":"left"],g,g-d[t])}if(s){const t="y"===u?"bottom":"right";p=clamp(p+d["y"===u?"top":"left"],p,p-d[t])}const m=a.fn({...e,[h]:g,[u]:p});return{...m,data:{x:m.x-o,y:m.y-i}}}}};function getNodeName(t){return isNode(t)?(t.nodeName||"").toLowerCase():"#document"}function getWindow(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function getDocumentElement(t){var e;return null==(e=(isNode(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function isNode(t){return t instanceof Node||t instanceof getWindow(t).Node}function isElement(t){return t instanceof Element||t instanceof getWindow(t).Element}function isHTMLElement(t){return t instanceof HTMLElement||t instanceof getWindow(t).HTMLElement}function isShadowRoot(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof getWindow(t).ShadowRoot)}function isOverflowElement(t){const{overflow:e,overflowX:o,overflowY:i,display:r}=getComputedStyle(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(r)}function isTableElement(t){return["table","td","th"].includes(getNodeName(t))}function isContainingBlock(t){const e=isWebKit(),o=getComputedStyle(t);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function getContainingBlock(t){let e=getParentNode(t);for(;isHTMLElement(e)&&!isLastTraversableNode(e);){if(isContainingBlock(e))return e;e=getParentNode(e)}return null}function isWebKit(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(t){return["html","body","#document"].includes(getNodeName(t))}function getComputedStyle(t){return getWindow(t).getComputedStyle(t)}function getNodeScroll(t){return isElement(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getParentNode(t){if("html"===getNodeName(t))return t;const e=t.assignedSlot||t.parentNode||isShadowRoot(t)&&t.host||getDocumentElement(t);return isShadowRoot(e)?e.host:e}function getNearestOverflowAncestor(t){const e=getParentNode(t);return isLastTraversableNode(e)?t.ownerDocument?t.ownerDocument.body:t.body:isHTMLElement(e)&&isOverflowElement(e)?e:getNearestOverflowAncestor(e)}function getOverflowAncestors(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const r=getNearestOverflowAncestor(t),n=r===(null==(i=t.ownerDocument)?void 0:i.body),s=getWindow(r);return n?e.concat(s,s.visualViewport||[],isOverflowElement(r)?r:[],s.frameElement&&o?getOverflowAncestors(s.frameElement):[]):e.concat(r,getOverflowAncestors(r,[],o))}function getCssDimensions(t){const e=getComputedStyle(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=isHTMLElement(t),n=r?t.offsetWidth:o,s=r?t.offsetHeight:i,a=round(o)!==n||round(i)!==s;return a&&(o=n,i=s),{width:o,height:i,$:a}}function unwrapElement(t){return isElement(t)?t:t.contextElement}function getScale(t){const e=unwrapElement(t);if(!isHTMLElement(e))return createCoords(1);const o=e.getBoundingClientRect(),{width:i,height:r,$:n}=getCssDimensions(e);let s=(n?round(o.width):o.width)/i,a=(n?round(o.height):o.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const noOffsets=createCoords(0);function getVisualOffsets(t){const e=getWindow(t);return isWebKit()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:noOffsets}function shouldAddVisualOffsets(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==getWindow(t))&&e}function getBoundingClientRect(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const r=t.getBoundingClientRect(),n=unwrapElement(t);let s=createCoords(1);e&&(i?isElement(i)&&(s=getScale(i)):s=getScale(t));const a=shouldAddVisualOffsets(n,o,i)?getVisualOffsets(n):createCoords(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,d=r.width/s.x,u=r.height/s.y;if(n){const t=getWindow(n),e=i&&isElement(i)?getWindow(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=getScale(o),e=o.getBoundingClientRect(),i=getComputedStyle(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,n=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,d*=t.x,u*=t.y,l+=r,c+=n,o=getWindow(o).frameElement}}return rectToClientRect({width:d,height:u,x:l,y:c})}function convertOffsetParentRelativeRectToViewportRelativeRect(t){let{rect:e,offsetParent:o,strategy:i}=t;const r=isHTMLElement(o),n=getDocumentElement(o);if(o===n)return e;let s={scrollLeft:0,scrollTop:0},a=createCoords(1);const l=createCoords(0);if((r||!r&&"fixed"!==i)&&(("body"!==getNodeName(o)||isOverflowElement(n))&&(s=getNodeScroll(o)),isHTMLElement(o))){const t=getBoundingClientRect(o);a=getScale(o),l.x=t.x+o.clientLeft,l.y=t.y+o.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-s.scrollLeft*a.x+l.x,y:e.y*a.y-s.scrollTop*a.y+l.y}}function getClientRects(t){return Array.from(t.getClientRects())}function getWindowScrollBarX(t){return getBoundingClientRect(getDocumentElement(t)).left+getNodeScroll(t).scrollLeft}function getDocumentRect(t){const e=getDocumentElement(t),o=getNodeScroll(t),i=t.ownerDocument.body,r=max(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),n=max(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+getWindowScrollBarX(t);const a=-o.scrollTop;return"rtl"===getComputedStyle(i).direction&&(s+=max(e.clientWidth,i.clientWidth)-r),{width:r,height:n,x:s,y:a}}function getViewportRect(t,e){const o=getWindow(t),i=getDocumentElement(t),r=o.visualViewport;let n=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){n=r.width,s=r.height;const t=isWebKit();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:n,height:s,x:a,y:l}}function getInnerBoundingClientRect(t,e){const o=getBoundingClientRect(t,!0,"fixed"===e),i=o.top+t.clientTop,r=o.left+t.clientLeft,n=isHTMLElement(t)?getScale(t):createCoords(1);return{width:t.clientWidth*n.x,height:t.clientHeight*n.y,x:r*n.x,y:i*n.y}}function getClientRectFromClippingAncestor(t,e,o){let i;if("viewport"===e)i=getViewportRect(t,o);else if("document"===e)i=getDocumentRect(getDocumentElement(t));else if(isElement(e))i=getInnerBoundingClientRect(e,o);else{const o=getVisualOffsets(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return rectToClientRect(i)}function hasFixedPositionAncestor(t,e){const o=getParentNode(t);return!(o===e||!isElement(o)||isLastTraversableNode(o))&&("fixed"===getComputedStyle(o).position||hasFixedPositionAncestor(o,e))}function getClippingElementAncestors(t,e){const o=e.get(t);if(o)return o;let i=getOverflowAncestors(t,[],!1).filter((t=>isElement(t)&&"body"!==getNodeName(t))),r=null;const n="fixed"===getComputedStyle(t).position;let s=n?getParentNode(t):t;for(;isElement(s)&&!isLastTraversableNode(s);){const e=getComputedStyle(s),o=isContainingBlock(s);o||"fixed"!==e.position||(r=null);(n?!o&&!r:!o&&"static"===e.position&&!!r&&["absolute","fixed"].includes(r.position)||isOverflowElement(s)&&!o&&hasFixedPositionAncestor(t,s))?i=i.filter((t=>t!==s)):r=e,s=getParentNode(s)}return e.set(t,i),i}function getClippingRect(t){let{element:e,boundary:o,rootBoundary:i,strategy:r}=t;const n=[..."clippingAncestors"===o?getClippingElementAncestors(e,this._c):[].concat(o),i],s=n[0],a=n.reduce(((t,o)=>{const i=getClientRectFromClippingAncestor(e,o,r);return t.top=max(i.top,t.top),t.right=min(i.right,t.right),t.bottom=min(i.bottom,t.bottom),t.left=max(i.left,t.left),t}),getClientRectFromClippingAncestor(e,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function getDimensions(t){return getCssDimensions(t)}function getRectRelativeToOffsetParent(t,e,o){const i=isHTMLElement(e),r=getDocumentElement(e),n="fixed"===o,s=getBoundingClientRect(t,!0,n,e);let a={scrollLeft:0,scrollTop:0};const l=createCoords(0);if(i||!i&&!n)if(("body"!==getNodeName(e)||isOverflowElement(r))&&(a=getNodeScroll(e)),i){const t=getBoundingClientRect(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=getWindowScrollBarX(r));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function getTrueOffsetParent(t,e){return isHTMLElement(t)&&"fixed"!==getComputedStyle(t).position?e?e(t):t.offsetParent:null}function getOffsetParent(t,e){const o=getWindow(t);if(!isHTMLElement(t))return o;let i=getTrueOffsetParent(t,e);for(;i&&isTableElement(i)&&"static"===getComputedStyle(i).position;)i=getTrueOffsetParent(i,e);return i&&("html"===getNodeName(i)||"body"===getNodeName(i)&&"static"===getComputedStyle(i).position&&!isContainingBlock(i))?o:i||getContainingBlock(t)||o}const getElementRects=async function(t){let{reference:e,floating:o,strategy:i}=t;const r=this.getOffsetParent||getOffsetParent,n=this.getDimensions;return{reference:getRectRelativeToOffsetParent(e,await r(o),i),floating:{x:0,y:0,...await n(o)}}};function isRTL(t){return"rtl"===getComputedStyle(t).direction}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function observeMove(t,e){let o,i=null;const r=getDocumentElement(t);function n(){clearTimeout(o),i&&i.disconnect(),i=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),n();const{left:c,top:d,width:u,height:h}=t.getBoundingClientRect();if(a||e(),!u||!h)return;const g={rootMargin:-floor(d)+"px "+-floor(r.clientWidth-(c+u))+"px "+-floor(r.clientHeight-(d+h))+"px "+-floor(c)+"px",threshold:max(0,min(1,l))||1};let p=!0;function m(t){const e=t[0].intersectionRatio;if(e!==l){if(!p)return s();e?s(!1,e):o=setTimeout((()=>{s(!1,1e-7)}),100)}p=!1}try{i=new IntersectionObserver(m,{...g,root:r.ownerDocument})}catch(t){i=new IntersectionObserver(m,g)}i.observe(t)}(!0),n}function autoUpdate(t,e,o,i){void 0===i&&(i={});const{ancestorScroll:r=!0,ancestorResize:n=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,c=unwrapElement(t),d=r||n?[...c?getOverflowAncestors(c):[],...getOverflowAncestors(e)]:[];d.forEach((t=>{r&&t.addEventListener("scroll",o,{passive:!0}),n&&t.addEventListener("resize",o)}));const u=c&&a?observeMove(c,o):null;let h,g=-1,p=null;s&&(p=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame((()=>{p&&p.observe(e)}))),o()})),c&&!l&&p.observe(c),p.observe(e));let m=l?getBoundingClientRect(t):null;return l&&function e(){const i=getBoundingClientRect(t);!m||i.x===m.x&&i.y===m.y&&i.width===m.width&&i.height===m.height||o();m=i,h=requestAnimationFrame(e)}(),o(),()=>{d.forEach((t=>{r&&t.removeEventListener("scroll",o),n&&t.removeEventListener("resize",o)})),u&&u(),p&&p.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const computePosition=(t,e,o)=>{const i=new Map,r={platform,...o},n={...r.platform,_c:i};return computePosition$1(t,e,{...r,platform:n})};var _Popover_updateCleanup,_Popover_getArrowPosition;const UNSET_SIDES={top:"",bottom:"",left:"",right:""},POPOVER_PLACEMENT_VALUES=["top","left","right","bottom","top-start","top-end","bottom-start","bottom-end"];class Popover extends Component{static get properties(){return{position:{type:String,reflect:!0},placement:{type:String},open:{type:Boolean,reflect:!0}}}constructor(){super(),_Popover_updateCleanup.set(this,void 0),this.getFloatingOffset=()=>20,this.renderArrow=()=>x`<span id="arrow">
|
|
2870
3029
|
<svg viewBox="0 0 20 10">
|
|
2871
3030
|
<polygon stroke-width="0" points="0,10 20,10 10,0" />
|
|
2872
3031
|
</svg>
|
|
2873
|
-
</span>`,this.reposition=async t=>{var e,o;if(null==this.floating||null==this.reference)return;const{x:i,y:r,placement:n,middlewareData:s}=await computePosition(this.reference,this.floating,{strategy:null!==(e=this.position)&&void 0!==e?e:"fixed",placement:null!==(o=this.placement)&&void 0!==o?o:"bottom-start",middleware:[(a=this.getFloatingOffset(),void 0===a&&(a=0),{name:"offset",options:a,async fn(t){const{x:e,y:o}=t,i=await convertValueToCoords(t,a);return{x:e+i.x,y:o+i.y,data:i}}}),flip(),shift(),this.arrow?arrow({element:this.arrow,padding:16}):void 0]});var a;Object.assign(this.floating.style,{top:`${r}px`,left:`${i}px`}),null!=this.arrow&&s.arrow&&Object.assign(this.arrow.style,__classPrivateFieldGet(this,_Popover_getArrowPosition,"f").call(this,n,s.arrow)),this.emit("m-popover-reposition",{detail:{reason:t}})},_Popover_getArrowPosition.set(this,((t,e)=>{if(null==this.floating||null==this.reference||null==this.arrow||null==e)return{};const[o,i]=t.split("-"),{x:r,y:n}=e,s={top:"bottom",bottom:"top",left:"right",right:"left"}[o],a={top:"180deg",bottom:"0deg",left:"90deg",right:"-90deg"}[o],l=null!=i,c=this.reference.offsetWidth>this.floating.offsetWidth,d=this.reference.offsetHeight>this.floating.offsetHeight,u=["top","bottom"].includes(o),
|
|
3032
|
+
</span>`,this.reposition=async t=>{var e,o;if(null==this.floating||null==this.reference)return;const{x:i,y:r,placement:n,middlewareData:s}=await computePosition(this.reference,this.floating,{strategy:null!==(e=this.position)&&void 0!==e?e:"fixed",placement:null!==(o=this.placement)&&void 0!==o?o:"bottom-start",middleware:[(a=this.getFloatingOffset(),void 0===a&&(a=0),{name:"offset",options:a,async fn(t){const{x:e,y:o}=t,i=await convertValueToCoords(t,a);return{x:e+i.x,y:o+i.y,data:i}}}),flip(),shift(),this.arrow?arrow({element:this.arrow,padding:16}):void 0]});var a;Object.assign(this.floating.style,{top:`${r}px`,left:`${i}px`}),null!=this.arrow&&s.arrow&&Object.assign(this.arrow.style,__classPrivateFieldGet(this,_Popover_getArrowPosition,"f").call(this,n,s.arrow)),this.emit("m-popover-reposition",{detail:{reason:t}})},_Popover_getArrowPosition.set(this,((t,e)=>{if(null==this.floating||null==this.reference||null==this.arrow||null==e)return{};const[o,i]=t.split("-"),{x:r,y:n}=e,s={top:"bottom",bottom:"top",left:"right",right:"left"}[o],a={top:"180deg",bottom:"0deg",left:"90deg",right:"-90deg"}[o],l=null!=i,c=this.reference.offsetWidth>this.floating.offsetWidth,d=this.reference.offsetHeight>this.floating.offsetHeight,u=["top","bottom"].includes(o),h=l&&(u?c:d),g=this.reference.getBoundingClientRect(),p=`calc(var(--m-popover-arrow-offset) + ${{top:g.height,bottom:g.height,right:g.width,left:g.width}[s]}px + ${this.getFloatingOffset()}px)`;let m={transform:`rotate(${a})`,...UNSET_SIDES};if(h){const e={"top-start":"left","top-end":"right","bottom-start":"left","bottom-end":"right"}[t];m={...m,[s]:p,[e]:"10px"}}else m={...m,left:null!=r?`${r}px`:"",top:null!=n?`${n}px`:"",[s]:p};return m})),this.position="fixed",this.placement="top-end",this.open=!1}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=__classPrivateFieldGet(this,_Popover_updateCleanup,"f"))||void 0===t||t.call(this)}firstUpdated(){this.open&&this.reposition("show"),__classPrivateFieldSet(this,_Popover_updateCleanup,autoUpdate(this.reference,this.floating,(()=>{this.reposition("auto")})),"f")}updated(t){super.updated(t),this.open&&null!=t.get("placement")&&null!=this.placement&&this.reposition("placement")}get reference(){return this.getReferenceElement()}get floating(){return this.getFloatingElement()}get arrow(){return this.getArrowElement()}show(){this.open||(this.open=!0,this.reposition("show"))}hide(){this.open&&(this.open=!1)}toggle(){this.open?this.hide():this.show()}}function styles$2(){return[i$4`
|
|
2874
3033
|
:host {
|
|
2875
3034
|
--m-popover-background-color: ${getColor("color-background-secondary-inverted")};
|
|
2876
3035
|
--m-popover-border-radius: ${getToken("border-radius-m")};
|
|
@@ -2961,7 +3120,7 @@ ${this.value}</textarea
|
|
|
2961
3120
|
:host {
|
|
2962
3121
|
display: inline-block;
|
|
2963
3122
|
}
|
|
2964
|
-
`]}var _Tooltip_hoverTimeout,_Tooltip_focusTimeout,_Tooltip_handleFocus,_Tooltip_handleBlur,_Tooltip_handleClick,_Tooltip_handleKeyDown,_Tooltip_handleMouseOver,_Tooltip_handleMouseOut,_Tooltip_hasTrigger;_Popover_updateCleanup=new WeakMap,_Popover_getArrowPosition=new WeakMap;class Tooltip extends Popover{static get properties(){return{...Popover.properties,trigger:{type:String,converter:{fromAttribute:convertTriggerFromAttribute}}}}constructor(){super(),_Tooltip_hoverTimeout.set(this,void 0),_Tooltip_focusTimeout.set(this,void 0),_Tooltip_handleFocus.set(this,(()=>{__classPrivateFieldGet(this,_Tooltip_hasTrigger,"f").call(this,"focus")&&(clearTimeout(__classPrivateFieldGet(this,_Tooltip_focusTimeout,"f")),__classPrivateFieldSet(this,_Tooltip_focusTimeout,window.setTimeout((()=>this.show()),450),"f"))})),_Tooltip_handleBlur.set(this,(()=>{__classPrivateFieldGet(this,_Tooltip_hasTrigger,"f").call(this,"focus")&&(clearTimeout(__classPrivateFieldGet(this,_Tooltip_focusTimeout,"f")),__classPrivateFieldSet(this,_Tooltip_focusTimeout,window.setTimeout((()=>this.hide()),450),"f"))})),_Tooltip_handleClick.set(this,(()=>{__classPrivateFieldGet(this,_Tooltip_hasTrigger,"f").call(this,"click")&&this.toggle()})),_Tooltip_handleKeyDown.set(this,(t=>{this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide())})),_Tooltip_handleMouseOver.set(this,(()=>{__classPrivateFieldGet(this,_Tooltip_hasTrigger,"f").call(this,"hover")&&(clearTimeout(__classPrivateFieldGet(this,_Tooltip_hoverTimeout,"f")),__classPrivateFieldSet(this,_Tooltip_hoverTimeout,window.setTimeout((()=>this.show()),450),"f"))})),_Tooltip_handleMouseOut.set(this,(()=>{__classPrivateFieldGet(this,_Tooltip_hasTrigger,"f").call(this,"hover")&&(clearTimeout(__classPrivateFieldGet(this,_Tooltip_hoverTimeout,"f")),__classPrivateFieldSet(this,_Tooltip_hoverTimeout,window.setTimeout((()=>this.hide()),450),"f"))})),_Tooltip_hasTrigger.set(this,(t=>this.trigger.includes(t))),this.position="fixed",this.placement="top-start",this.trigger=["hover","focus"]}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",__classPrivateFieldGet(this,_Tooltip_handleBlur,"f"),!0),this.addEventListener("click",__classPrivateFieldGet(this,_Tooltip_handleClick,"f")),this.addEventListener("focus",__classPrivateFieldGet(this,_Tooltip_handleFocus,"f"),!0),this.addEventListener("keydown",__classPrivateFieldGet(this,_Tooltip_handleKeyDown,"f")),this.addEventListener("mouseout",__classPrivateFieldGet(this,_Tooltip_handleMouseOut,"f")),this.addEventListener("mouseover",__classPrivateFieldGet(this,_Tooltip_handleMouseOver,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",__classPrivateFieldGet(this,_Tooltip_handleBlur,"f"),!0),this.removeEventListener("focus",__classPrivateFieldGet(this,_Tooltip_handleFocus,"f"),!0),this.removeEventListener("click",__classPrivateFieldGet(this,_Tooltip_handleClick,"f")),this.removeEventListener("keydown",__classPrivateFieldGet(this,_Tooltip_handleKeyDown,"f")),this.removeEventListener("mouseover",__classPrivateFieldGet(this,_Tooltip_handleMouseOver,"f")),this.removeEventListener("mouseout",__classPrivateFieldGet(this,_Tooltip_handleMouseOut,"f"))}getReferenceElement(){const t=this.shadowRoot.querySelector('slot[name="reference"]'),[e]=t.assignedElements({flatten:!0});return e}getFloatingElement(){const t=this.shadowRoot.querySelector('slot[name="floating"]'),[e]=t.assignedElements({flatten:!0});return e}getArrowElement(){return this.shadowRoot.querySelector("#arrow")}render(){return x
|
|
3123
|
+
`]}var _Tooltip_hoverTimeout,_Tooltip_focusTimeout,_Tooltip_handleFocus,_Tooltip_handleBlur,_Tooltip_handleClick,_Tooltip_handleKeyDown,_Tooltip_handleMouseOver,_Tooltip_handleMouseOut,_Tooltip_hasTrigger;_Popover_updateCleanup=new WeakMap,_Popover_getArrowPosition=new WeakMap;class Tooltip extends Popover{static get properties(){return{...Popover.properties,trigger:{type:String,converter:{fromAttribute:convertTriggerFromAttribute}}}}constructor(){super(),_Tooltip_hoverTimeout.set(this,void 0),_Tooltip_focusTimeout.set(this,void 0),_Tooltip_handleFocus.set(this,(()=>{__classPrivateFieldGet(this,_Tooltip_hasTrigger,"f").call(this,"focus")&&(clearTimeout(__classPrivateFieldGet(this,_Tooltip_focusTimeout,"f")),__classPrivateFieldSet(this,_Tooltip_focusTimeout,window.setTimeout((()=>this.show()),450),"f"))})),_Tooltip_handleBlur.set(this,(()=>{__classPrivateFieldGet(this,_Tooltip_hasTrigger,"f").call(this,"focus")&&(clearTimeout(__classPrivateFieldGet(this,_Tooltip_focusTimeout,"f")),__classPrivateFieldSet(this,_Tooltip_focusTimeout,window.setTimeout((()=>this.hide()),450),"f"))})),_Tooltip_handleClick.set(this,(()=>{__classPrivateFieldGet(this,_Tooltip_hasTrigger,"f").call(this,"click")&&this.toggle()})),_Tooltip_handleKeyDown.set(this,(t=>{this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide())})),_Tooltip_handleMouseOver.set(this,(()=>{__classPrivateFieldGet(this,_Tooltip_hasTrigger,"f").call(this,"hover")&&(clearTimeout(__classPrivateFieldGet(this,_Tooltip_hoverTimeout,"f")),__classPrivateFieldSet(this,_Tooltip_hoverTimeout,window.setTimeout((()=>this.show()),450),"f"))})),_Tooltip_handleMouseOut.set(this,(()=>{__classPrivateFieldGet(this,_Tooltip_hasTrigger,"f").call(this,"hover")&&(clearTimeout(__classPrivateFieldGet(this,_Tooltip_hoverTimeout,"f")),__classPrivateFieldSet(this,_Tooltip_hoverTimeout,window.setTimeout((()=>this.hide()),450),"f"))})),_Tooltip_hasTrigger.set(this,(t=>this.trigger.includes(t))),this.position="fixed",this.placement="top-start",this.trigger=["hover","focus"]}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",__classPrivateFieldGet(this,_Tooltip_handleBlur,"f"),!0),this.addEventListener("click",__classPrivateFieldGet(this,_Tooltip_handleClick,"f")),this.addEventListener("focus",__classPrivateFieldGet(this,_Tooltip_handleFocus,"f"),!0),this.addEventListener("keydown",__classPrivateFieldGet(this,_Tooltip_handleKeyDown,"f")),this.addEventListener("mouseout",__classPrivateFieldGet(this,_Tooltip_handleMouseOut,"f")),this.addEventListener("mouseover",__classPrivateFieldGet(this,_Tooltip_handleMouseOver,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",__classPrivateFieldGet(this,_Tooltip_handleBlur,"f"),!0),this.removeEventListener("focus",__classPrivateFieldGet(this,_Tooltip_handleFocus,"f"),!0),this.removeEventListener("click",__classPrivateFieldGet(this,_Tooltip_handleClick,"f")),this.removeEventListener("keydown",__classPrivateFieldGet(this,_Tooltip_handleKeyDown,"f")),this.removeEventListener("mouseover",__classPrivateFieldGet(this,_Tooltip_handleMouseOver,"f")),this.removeEventListener("mouseout",__classPrivateFieldGet(this,_Tooltip_handleMouseOut,"f"))}getReferenceElement(){const t=this.shadowRoot.querySelector('slot[name="reference"]'),[e]=t.assignedElements({flatten:!0});return e}getFloatingElement(){const t=this.shadowRoot.querySelector('slot[name="floating"]'),[e]=t.assignedElements({flatten:!0});return e}getArrowElement(){return this.shadowRoot.querySelector("#arrow")}render(){return x`
|
|
2965
3124
|
${this.renderArrow()}
|
|
2966
3125
|
<slot name="reference" aria-describedby="floating"></slot>
|
|
2967
3126
|
<slot
|
|
@@ -2990,5 +3149,5 @@ ${this.value}</textarea
|
|
|
2990
3149
|
transform: rotate(359deg);
|
|
2991
3150
|
}
|
|
2992
3151
|
}
|
|
2993
|
-
`}const DEFAULT_SIZE=48;class SpinnerWheel extends s$5{static get properties(){return{size:{type:String}}}update(t){super.update(t),t.has("size")&&null!=this.size&&this.style.setProperty("--m-spinner-size",`${parseInt(String(this.size),10)||48}px`)}render(){return b`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="#CADBDD" fill-rule="evenodd" d="M24 48c13.255 0 24-10.745 24-24S37.255 0 24 0 0 10.745 0 24s10.745 24 24 24Zm0-10c7.732 0 14-6.268 14-14s-6.268-14-14-14-14 6.268-14 14 6.268 14 14 14Z" clip-rule="evenodd"/><path fill="url(#a)" d="M24 43.068c0 2.724-2.231 4.983-4.898 4.427a23.999 23.999 0 0 1 0-46.99C21.77-.051 24 2.208 24 4.932c0 2.723-2.273 4.852-4.833 5.783a14.135 14.135 0 0 0-5.163 23.28 14.135 14.135 0 0 0 5.163 3.29c2.56.93 4.833 3.06 4.833 5.783Z"/><defs><linearGradient id="a" x1="9.608" x2="44.189" y1="42.161" y2="7.59" gradientUnits="userSpaceOnUse"><stop offset=".1" stop-color="#00D7D7"/><stop offset="1" stop-color="#84F11E"/></linearGradient></defs></svg>`}}SpinnerWheel.styles=[styles()],window.customElements.define("m-spinner-wheel",SpinnerWheel);export{
|
|
2994
|
-
//# sourceMappingURL=index-
|
|
3152
|
+
`}const DEFAULT_SIZE=48;class SpinnerWheel extends s$5{static get properties(){return{size:{type:String}}}update(t){super.update(t),t.has("size")&&null!=this.size&&this.style.setProperty("--m-spinner-size",`${parseInt(String(this.size),10)||48}px`)}render(){return b`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="#CADBDD" fill-rule="evenodd" d="M24 48c13.255 0 24-10.745 24-24S37.255 0 24 0 0 10.745 0 24s10.745 24 24 24Zm0-10c7.732 0 14-6.268 14-14s-6.268-14-14-14-14 6.268-14 14 6.268 14 14 14Z" clip-rule="evenodd"/><path fill="url(#a)" d="M24 43.068c0 2.724-2.231 4.983-4.898 4.427a23.999 23.999 0 0 1 0-46.99C21.77-.051 24 2.208 24 4.932c0 2.723-2.273 4.852-4.833 5.783a14.135 14.135 0 0 0-5.163 23.28 14.135 14.135 0 0 0 5.163 3.29c2.56.93 4.833 3.06 4.833 5.783Z"/><defs><linearGradient id="a" x1="9.608" x2="44.189" y1="42.161" y2="7.59" gradientUnits="userSpaceOnUse"><stop offset=".1" stop-color="#00D7D7"/><stop offset="1" stop-color="#84F11E"/></linearGradient></defs></svg>`}}SpinnerWheel.styles=[styles()],window.customElements.define("m-spinner-wheel",SpinnerWheel);export{HeaderTitle as $,DialogHeader as A,BackButton as B,Card as C,Dialog as D,Divider as E,Drawer as F,DRAWER_SIZES as G,DrawerActionPrimary as H,DrawerActionSecondary as I,DrawerActionTertiary as J,DrawerActions as K,DrawerBody as L,DrawerClose as M,DrawerHeader as N,EmptyStateAction as O,EmptyStateHeader as P,EmptyStateIllustration as Q,EmptyStateMessage as R,EmptyState as S,EMPTY_STATE_VARIANTS as T,Field as U,FieldHint as V,FieldLabel as W,FIELD_STATUSES as X,Header as Y,HeaderActions as Z,HeaderContent as _,Badge as a,SubHeader as a0,ALIGN_ITEMS_VALUES as a1,JUSTIFY_CONTENT_VALUES as a2,Box as a3,defaultBoxProps as a4,Group as a5,defaultGroupProps as a6,Stack as a7,defaultStackProps as a8,Grid as a9,TabPanel as aA,Tag as aB,Text as aC,TextArea as aD,TextField as aE,ToggleGroup as aF,Toggle as aG,Tooltip as aH,TOOLTIP_PLACEMENT_VALUES as aI,SpinnerWheel as aJ,defaultGridProps as aa,Sidebar as ab,defaultSidebarProps as ac,Switcher as ad,defaultSwitcherProps as ae,Link as af,PageContent as ag,ProgressBar as ah,ProgressBarCountdown as ai,Radio as aj,RadioGroup as ak,Section as al,SectionTitle as am,Steps as an,Step as ao,Switch as ap,Table as aq,defaultTableProps as ar,TableHead as as,TableBody as at,TableFoot as au,TableRow as av,TableCell as aw,defaultTableCellProps as ax,Tabs as ay,Tab as az,b,BannerActionPrimary as c,BannerActionSecondary as d,BannerActions as e,BannerDescription as f,BannerIcon as g,BannerTitle as h,Banner as i,Body as j,Button as k,CardBody as l,CardSubtitle as m,CardTitle as n,CardDivider as o,Checkbox as p,CloseButton as q,DIALOG_SIZES as r,DIALOG_VARIANTS as s,DialogActionPrimary as t,DialogActionSecondary as u,DialogActionTertiary as v,DialogActions as w,DialogBody as x,DialogClose as y,DialogFooter as z};
|
|
3153
|
+
//# sourceMappingURL=index-f37d4ad2.js.map
|