@loadsmart/miranda-wc 1.27.1 → 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/button/button.d.ts +1 -0
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/checkbox/checkbox.d.ts +1 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/close-button/close-button.d.ts +1 -0
- package/dist/components/close-button/close-button.d.ts.map +1 -1
- package/dist/components/radio-group/radio.d.ts +1 -0
- package/dist/components/radio-group/radio.d.ts.map +1 -1
- package/dist/components/toggle-group/toggle.d.ts +1 -0
- package/dist/components/toggle-group/toggle.d.ts.map +1 -1
- package/dist/index.js +103 -103
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -114,14 +114,14 @@ const ct=t=>null!=t?t:x
|
|
|
114
114
|
slot[name='trailing']::slotted(span) {
|
|
115
115
|
justify-content: center;
|
|
116
116
|
}
|
|
117
|
-
`}var ie,re,ne,se,le,ae;class
|
|
117
|
+
`}var ie,re,ne,se,le,ae,ce;class de extends(gt(ft,["button","a"],"button")){static get properties(){return{...ft.properties,role:{type:String,reflect:!0},loading:{type:Boolean},disabled:{type:Boolean,reflect:!0},variant:{type:String},size:{type:String},tabindex:{type:String},type:{type:String},href:{type:String},target:{type:String},download:{type:String}}}constructor(){super(),ie.add(this),ne.set(this,(()=>Boolean(this.disabled)||Boolean(this.loading))),se.set(this,(()=>{const e=t(this,ne,"f").call(this);this.setAttribute("aria-disabled",String(e))})),le.set(this,(()=>{var e;return t(this,ie,"m",ce).call(this)?this.disabled?"-1":null!=this.tabindex?this.tabindex:"0":null!==(e=this.tabindex)&&void 0!==e?e:void 0})),ae.set(this,(t=>{var e,o;if(this.disabled||this.loading)return t.preventDefault(),void t.stopPropagation();"submit"===this.type&&(null===(e=this.form)||void 0===e||e.requestSubmit()),"reset"===this.type&&(null===(o=this.form)||void 0===o||o.reset())})),this.as="button",this.disabled=!1,this.loading=!1,this.size="default",this.type="button",this.variant="secondary",this.target="_self"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.addEventListener("click",t(this,ae,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,ae,"f"))}update(e){super.update(e),e.has("href")&&(this.as=t(this,ie,"m",ce).call(this)?"a":"button",this.role=t(this,ie,"m",ce).call(this)?"link":"button")}updated(e){super.updated(e),(e.has("disabled")||e.has("loading"))&&t(this,se,"f").call(this)}render(){const e=t(this,ie,"m",ce).call(this);return D`
|
|
118
118
|
<${this.tag}
|
|
119
|
-
class=${bt({button:!0,"-primary":"primary"===this.variant,"-secondary":"secondary"===this.variant,"-tertiary":"tertiary"===this.variant,"-warning":"warning"===this.variant,"-danger":"danger"===this.variant,"-icon":"icon"===this.variant,"-icon-secondary":"icon-secondary"===this.variant,"-small":"small"===this.size,"-default":"default"===this.size,"-large":"large"===this.size,"is-loading":Boolean(this.loading),"is-disabled":t(this,
|
|
119
|
+
class=${bt({button:!0,"-primary":"primary"===this.variant,"-secondary":"secondary"===this.variant,"-tertiary":"tertiary"===this.variant,"-warning":"warning"===this.variant,"-danger":"danger"===this.variant,"-icon":"icon"===this.variant,"-icon-secondary":"icon-secondary"===this.variant,"-small":"small"===this.size,"-default":"default"===this.size,"-large":"large"===this.size,"is-loading":Boolean(this.loading),"is-disabled":t(this,ne,"f").call(this)})}
|
|
120
120
|
type=${ct(e?void 0:this.type)}
|
|
121
|
-
?disabled="${t(this,
|
|
121
|
+
?disabled="${t(this,ne,"f").call(this)}"
|
|
122
122
|
aria-disabled=${this.disabled?"true":"false"}
|
|
123
123
|
role=${ct(e?"link":"button")}
|
|
124
|
-
tabindex=${ct(t(this,
|
|
124
|
+
tabindex=${ct(t(this,le,"f").call(this))}
|
|
125
125
|
href=${ct(e?this.href:void 0)}
|
|
126
126
|
target=${ct(e?this.target:void 0)}
|
|
127
127
|
download=${ct(e?this.download:void 0)}
|
|
@@ -133,7 +133,7 @@ const ct=t=>null!=t?t:x
|
|
|
133
133
|
<slot></slot>
|
|
134
134
|
<slot name="trailing"></slot>
|
|
135
135
|
</${this.tag}>
|
|
136
|
-
`}}
|
|
136
|
+
`}focus(e){var o;null===(o=t(this,ie,"a",re))||void 0===o||o.focus(e)}}ne=new WeakMap,se=new WeakMap,le=new WeakMap,ae=new WeakMap,ie=new WeakSet,re=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(".button"))&&void 0!==e?e:null},ce=function(){return Boolean(this.href)},de.styles=[[oe(),H`
|
|
137
137
|
.button.is-loading:not(.-icon, .-icon-secondary) *:not(.loader) {
|
|
138
138
|
visibility: hidden;
|
|
139
139
|
}
|
|
@@ -388,26 +388,26 @@ const ct=t=>null!=t?t:x
|
|
|
388
388
|
|
|
389
389
|
pointer-events: none;
|
|
390
390
|
}
|
|
391
|
-
`]],window.customElements.define("m-button",
|
|
391
|
+
`]],window.customElements.define("m-button",de);class he extends de{constructor(){super(),this.size="small"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","primary-action")}}window.customElements.define("m-banner-action-primary",he);class ue extends de{constructor(){super(),this.variant="tertiary",this.size="small"}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","secondary-action")}}window.customElements.define("m-banner-action-secondary",ue);class be extends lt{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","actions")}render(){return v`
|
|
392
392
|
<slot name="secondary-action"></slot>
|
|
393
393
|
<slot name="primary-action"></slot>
|
|
394
|
-
`}}
|
|
394
|
+
`}}be.styles=[H`
|
|
395
395
|
:host {
|
|
396
396
|
display: flex;
|
|
397
397
|
justify-content: flex-end;
|
|
398
398
|
gap: ${Pt("spacing-2")};
|
|
399
399
|
}
|
|
400
|
-
`],window.customElements.define("m-banner-actions",
|
|
400
|
+
`],window.customElements.define("m-banner-actions",be);class ge extends lt{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","description")}render(){return v`<slot></slot>`}}ge.styles=[H`
|
|
401
401
|
:host {
|
|
402
402
|
${Yt("body-md")};
|
|
403
403
|
color: ${Dt("color-text-secondary")};
|
|
404
404
|
}
|
|
405
|
-
`],window.customElements.define("m-banner-description",
|
|
405
|
+
`],window.customElements.define("m-banner-description",ge);class pe extends lt{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","icon")}render(){return v`<slot></slot>`}}window.customElements.define("m-banner-icon",pe);class me extends lt{connectedCallback(){super.connectedCallback(),this.setAttribute("slot","title")}render(){return v`<slot></slot>`}}me.styles=[H`
|
|
406
406
|
:host {
|
|
407
407
|
${Yt("body-md-bold")};
|
|
408
408
|
color: ${Dt("color-text-secondary")};
|
|
409
409
|
}
|
|
410
|
-
`],window.customElements.define("m-banner-title",
|
|
410
|
+
`],window.customElements.define("m-banner-title",me);class fe extends lt{constructor(){super(...arguments),this.emit=(t,e)=>{const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,...e});this.dispatchEvent(o)},this.reemit=t=>{!function(t,e){!e.bubbles||t.shadowRoot&&!e.composed||e.stopPropagation();const o=Reflect.construct(e.constructor,[e.type,e]),i=t.dispatchEvent(o);i||e.preventDefault()}(this,t)}}}var $e={};$e.BASE_PIXELS=16,$e.toRem=function(t,e=16){return parseInt(String(t),10)/e+"rem"};var ye=$e.toRem;function ve(t,e){return Z(ye(t,e))}const we=["attention","bell","check","close","info-circle","indeterminate"];var xe,ke,ze,Se,Ce;class Me extends fe{static get properties(){return{name:{type:String},size:{type:String},color:{type:String},loading:{state:!0}}}constructor(){super(),xe.add(this),this.icon=null,this.icon=null}connectedCallback(){super.connectedCallback(),t(this,xe,"m",ke).call(this)}update(e){super.update(e),e.has("name")&&t(this,xe,"m",ke).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",$t(this.color))}render(){return null!=this.name&&we.includes(this.name)&&null!=this.icon?this.icon:x}}xe=new WeakSet,ke=async function(){try{this.icon=null;const{default:t}=await import(`./icons/${this.name}.js`);this.icon=t}catch{console.error(`failed loading icon "${this.name}". Are you sure it exists?`)}finally{this.requestUpdate()}},Me.styles=[[H`
|
|
411
411
|
:host {
|
|
412
412
|
--m-icon-size: 16px;
|
|
413
413
|
--m-icon-color: ${Dt("color-text-primary")};
|
|
@@ -429,18 +429,18 @@ const ct=t=>null!=t?t:x
|
|
|
429
429
|
color: var(--m-icon-color);
|
|
430
430
|
fill: var(--m-icon-color);
|
|
431
431
|
}
|
|
432
|
-
`]],window.customElements.define("m-icon",
|
|
432
|
+
`]],window.customElements.define("m-icon",Me);class We extends fe{static get properties(){return{controls:{type:String},disabled:{type:Boolean},inverted:{type:Boolean},label:{type:String},size:{type:String}}}constructor(){super(),ze.add(this),Ce.set(this,(()=>{this.emit("m-close")})),this.disabled=!1,this.inverted=!1,this.label="Close",this.size="default"}render(){var e;return v`
|
|
433
433
|
<button
|
|
434
434
|
type="button"
|
|
435
435
|
aria-controls="${ct(this.controls)}"
|
|
436
436
|
aria-label="${ct(this.label)}"
|
|
437
437
|
class=${bt({"close-button":!0,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size,"-inverted":null!==(e=this.inverted)&&void 0!==e&&e})}
|
|
438
438
|
?disabled="${this.disabled}"
|
|
439
|
-
@click=${t(this,
|
|
439
|
+
@click=${t(this,Ce,"f")}
|
|
440
440
|
>
|
|
441
441
|
<m-icon name="close"></m-icon>
|
|
442
442
|
</button>
|
|
443
|
-
`}}
|
|
443
|
+
`}focus(e){var o;null===(o=t(this,ze,"a",Se))||void 0===o||o.focus(e)}}Ce=new WeakMap,ze=new WeakSet,Se=function(){var t;return null!==(t=this.renderRoot.querySelector("button"))&&void 0!==t?t:null},We.styles=[H`
|
|
444
444
|
:host {
|
|
445
445
|
--m-close-button-color: ${Dt("color-text-primary")};
|
|
446
446
|
--m-close-button-outline-color: ${Dt("color-primary-100")};
|
|
@@ -467,18 +467,18 @@ const ct=t=>null!=t?t:x
|
|
|
467
467
|
}
|
|
468
468
|
|
|
469
469
|
.close-button.-size-small {
|
|
470
|
-
--button-size: ${
|
|
471
|
-
--icon-size: ${
|
|
470
|
+
--button-size: ${ve("12px")};
|
|
471
|
+
--icon-size: ${ve("8px")};
|
|
472
472
|
}
|
|
473
473
|
|
|
474
474
|
.close-button.-size-default {
|
|
475
|
-
--button-size: ${
|
|
476
|
-
--icon-size: ${
|
|
475
|
+
--button-size: ${ve("16px")};
|
|
476
|
+
--icon-size: ${ve("12px")};
|
|
477
477
|
}
|
|
478
478
|
|
|
479
479
|
.close-button.-size-large {
|
|
480
|
-
--button-size: ${
|
|
481
|
-
--icon-size: ${
|
|
480
|
+
--button-size: ${ve("20px")};
|
|
481
|
+
--icon-size: ${ve("16px")};
|
|
482
482
|
}
|
|
483
483
|
|
|
484
484
|
.close-button.-inverted {
|
|
@@ -516,20 +516,20 @@ const ct=t=>null!=t?t:x
|
|
|
516
516
|
${te(".close-button","*")} {
|
|
517
517
|
pointer-events: none;
|
|
518
518
|
}
|
|
519
|
-
`],window.customElements.define("m-close-button",
|
|
519
|
+
`],window.customElements.define("m-close-button",We);
|
|
520
520
|
/**
|
|
521
521
|
* @license
|
|
522
522
|
* Copyright 2018 Google LLC
|
|
523
523
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
524
524
|
*/
|
|
525
|
-
const
|
|
525
|
+
const je=ht(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,o)=>{const i=t[o];return null==i?e:e+`${o=o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:o}=t.element;if(void 0===this.vt){this.vt=new Set;for(const t in e)this.vt.add(t);return this.render(e)}this.vt.forEach((t=>{null==e[t]&&(this.vt.delete(t),t.includes("-")?o.removeProperty(t):o[t]="")}));for(const t in e){const i=e[t];null!=i&&(this.vt.add(t),t.includes("-")?o.setProperty(t,i):o[t]=i)}return w}});class Ae extends(gt(lt,["h1","h2","h3","h4","h5","h6","p","span"],"span")){static get properties(){return{variant:{type:String,reflect:!0},color:{type:String}}}constructor(){super(),this.as="span",this.variant="body-md",this.color="color-text-primary"}render(){return D`
|
|
526
526
|
<${this.tag}
|
|
527
527
|
class=${bt({"m-text":!0,"-body-lg-bold":"body-lg-bold"===this.variant,"-body-lg":"body-lg"===this.variant,"-body-md-bold-underline":"body-md-bold-underline"===this.variant,"-body-md-bold":"body-md-bold"===this.variant,"-body-md-underline":"body-md-underline"===this.variant,"-body-md":"body-md"===this.variant,"-body-sm-bold-underline":"body-sm-bold-underline"===this.variant,"-body-sm-bold":"body-sm-bold"===this.variant,"-body-sm-underline":"body-sm-underline"===this.variant,"-body-sm":"body-sm"===this.variant,"-button-lg":"button-lg"===this.variant,"-button-md":"button-md"===this.variant,"-button-sm":"button-sm"===this.variant,"-chips-md":"chips-md"===this.variant,"-chips-sm":"chips-sm"===this.variant,"-heading-lg-bold":"heading-lg-bold"===this.variant,"-heading-lg":"heading-lg"===this.variant,"-heading-md-bold":"heading-md-bold"===this.variant,"-heading-md":"heading-md"===this.variant,"-heading-sm-bold":"heading-sm-bold"===this.variant,"-heading-sm":"heading-sm"===this.variant,"-hero-lg-bold":"hero-lg-bold"===this.variant,"-hero-lg":"hero-lg"===this.variant,"-hero-md-bold":"hero-md-bold"===this.variant,"-hero-md":"hero-md"===this.variant,"-hero-sm-bold":"hero-sm-bold"===this.variant,"-hero-sm":"hero-sm"===this.variant,"-number-md":"number-md"===this.variant,"-number-sm":"number-sm"===this.variant,"-table-header-md":"table-header-md"===this.variant,"-table-header-sm":"table-header-sm"===this.variant})}
|
|
528
|
-
style=${
|
|
528
|
+
style=${je({"--m-text-color":$t(this.color)})}
|
|
529
529
|
>
|
|
530
530
|
<slot></slot>
|
|
531
531
|
</${this.tag}>
|
|
532
|
-
`}}var
|
|
532
|
+
`}}var _e,Be;Ae.styles=[H`
|
|
533
533
|
:host {
|
|
534
534
|
--m-text-color: ${Dt("color-text-primary")};
|
|
535
535
|
}
|
|
@@ -667,11 +667,11 @@ const Ce=ht(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"styl
|
|
|
667
667
|
.-table-header-sm {
|
|
668
668
|
${Yt("table-header-sm")};
|
|
669
669
|
}
|
|
670
|
-
`],window.customElements.define("m-text",
|
|
670
|
+
`],window.customElements.define("m-text",Ae);class Ee extends fe{static get properties(){return{variant:{type:String},dismissible:{type:Boolean},dismissed:{type:Boolean,reflect:!0}}}constructor(){super(),_e.set(this,void 0),Be.set(this,(()=>{this.dismissed=!0,this.emit("m-dismiss",{composed:!0})})),this.variant="neutral",this.dismissible=!1,this.dismissed=!1}get primaryAction(){return null==t(this,_e,"f")&&e(this,_e,this.querySelector("m-banner-action-primary"),"f"),t(this,_e,"f")}updated(t){super.updated(t),t.has("variant")&&null!=this.primaryAction&&(this.primaryAction.variant=function(t){switch(t){case"warning":return"warning";case"danger":return"danger";default:return"primary"}}(this.variant))}render(){if(this.dismissed)return x;const e=null!=this.querySelector("*[slot='description']"),o=null!=this.querySelector("*[slot='actions']"),i=v`
|
|
671
671
|
<m-close-button
|
|
672
672
|
id="close"
|
|
673
673
|
label="Dismiss"
|
|
674
|
-
@click=${t(this,
|
|
674
|
+
@click=${t(this,Be,"f")}
|
|
675
675
|
></m-close-button>
|
|
676
676
|
`;return v`
|
|
677
677
|
<div
|
|
@@ -689,7 +689,7 @@ const Ce=ht(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"styl
|
|
|
689
689
|
</div>
|
|
690
690
|
<slot name="actions"></slot>
|
|
691
691
|
</div>
|
|
692
|
-
`}}
|
|
692
|
+
`}}_e=new WeakMap,Be=new WeakMap,Ee.styles=[H`
|
|
693
693
|
:host {
|
|
694
694
|
display: block;
|
|
695
695
|
width: 100%;
|
|
@@ -759,10 +759,10 @@ const Ce=ht(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"styl
|
|
|
759
759
|
flex-grow: 1;
|
|
760
760
|
gap: ${Pt("spacing-1")};
|
|
761
761
|
}
|
|
762
|
-
`],window.customElements.define("m-banner",
|
|
762
|
+
`],window.customElements.define("m-banner",Ee);class Oe extends lt{static get properties(){return{flagged:{type:Boolean},flagColor:{type:String,attribute:"flag-color"}}}constructor(){super(),this.flagged=!1,this.flagColor="color-background-inverted"}render(){return v`
|
|
763
763
|
<div
|
|
764
764
|
class="m-card"
|
|
765
|
-
style="${
|
|
765
|
+
style="${je({"--m-card-flag-color":$t(this.flagColor)})}"
|
|
766
766
|
>
|
|
767
767
|
${this.flagged?v`<span class="m-card-flag"></span>`:x}
|
|
768
768
|
<div class="m-card-content">
|
|
@@ -772,7 +772,7 @@ const Ce=ht(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"styl
|
|
|
772
772
|
<slot name="body"></slot>
|
|
773
773
|
</div>
|
|
774
774
|
</div>
|
|
775
|
-
`}}
|
|
775
|
+
`}}Oe.styles=[H`
|
|
776
776
|
:host {
|
|
777
777
|
--m-card-background-color: ${Dt("color-background-primary")};
|
|
778
778
|
}
|
|
@@ -813,11 +813,11 @@ const Ce=ht(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"styl
|
|
|
813
813
|
::slotted(m-divider) {
|
|
814
814
|
--m-divider-margin-top: ${Pt("spacing-4")};
|
|
815
815
|
}
|
|
816
|
-
`],window.customElements.define("m-card",
|
|
816
|
+
`],window.customElements.define("m-card",Oe);class Te extends lt{static get properties(){return{slot:{type:String}}}constructor(){super(),this.slot="body"}render(){return v`
|
|
817
817
|
<div class="m-card-body">
|
|
818
818
|
<slot></slot>
|
|
819
819
|
</div>
|
|
820
|
-
`}}
|
|
820
|
+
`}}Te.styles=[H`
|
|
821
821
|
:host {
|
|
822
822
|
--m-card-body-padding-x: ${Pt("spacing-4")};
|
|
823
823
|
--m-card-body-padding-y: ${Pt("spacing-4")};
|
|
@@ -826,11 +826,11 @@ const Ce=ht(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"styl
|
|
|
826
826
|
.m-card-body {
|
|
827
827
|
padding: var(--m-card-body-padding-y) var(--m-card-body-padding-x);
|
|
828
828
|
}
|
|
829
|
-
`],window.customElements.define("m-card-body",
|
|
829
|
+
`],window.customElements.define("m-card-body",Te);class Ue extends lt{static get properties(){return{slot:{type:String}}}constructor(){super(),this.slot="subtitle"}render(){return v`
|
|
830
830
|
<div class="m-card-subtitle">
|
|
831
831
|
<slot></slot>
|
|
832
832
|
</div>
|
|
833
|
-
`}}
|
|
833
|
+
`}}Ue.styles=[H`
|
|
834
834
|
:host {
|
|
835
835
|
--m-card-subtitle-margin-top: ${Pt("spacing-2")};
|
|
836
836
|
--m-card-subtitle-padding-x: ${Pt("spacing-4")};
|
|
@@ -845,12 +845,12 @@ const Ce=ht(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"styl
|
|
|
845
845
|
|
|
846
846
|
color: ${Dt("color-text-tertiary")};
|
|
847
847
|
}
|
|
848
|
-
`],window.customElements.define("m-card-subtitle",
|
|
848
|
+
`],window.customElements.define("m-card-subtitle",Ue);class qe extends lt{static get properties(){return{slot:{type:String}}}constructor(){super(),this.slot="title"}render(){return v`
|
|
849
849
|
<div class="m-card-title">
|
|
850
850
|
<slot name="leading"></slot>
|
|
851
851
|
<slot></slot>
|
|
852
852
|
</div>
|
|
853
|
-
`}}
|
|
853
|
+
`}}qe.styles=[H`
|
|
854
854
|
:host {
|
|
855
855
|
--m-card-title-padding-x: ${Pt("spacing-4")};
|
|
856
856
|
--m-card-title-padding-top: ${Pt("spacing-4")};
|
|
@@ -871,7 +871,7 @@ const Ce=ht(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"styl
|
|
|
871
871
|
pointer-events: none;
|
|
872
872
|
margin-inline-end: ${Pt("spacing-1")};
|
|
873
873
|
}
|
|
874
|
-
`],window.customElements.define("m-card-title",
|
|
874
|
+
`],window.customElements.define("m-card-title",qe);const Ne={delay:"0s",duration:"0.35s",easing:"ease-in-out"};var Re,Pe,De;class Ge extends lt{static get properties(){return{name:{type:String},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0},indeterminate:{type:Boolean,reflect:!0}}}constructor(){super(),Re.add(this),De.set(this,(t=>{const e=t.target,o=new CustomEvent("m-change",{cancelable:!1,composed:!1,bubbles:!0,detail:{checked:e.checked,indeterminate:e.indeterminate}});this.dispatchEvent(o),this.checked=e.checked,this.indeterminate=e.indeterminate})),this.name=void 0,this.disabled=!1,this.checked=!1,this.indeterminate=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","checkbox")}disconnectedCallback(){super.connectedCallback()}firstUpdated(){this.input=this.renderRoot.querySelector("input"),this.label=this.renderRoot.querySelector("label")}updated(){t(this,Re,"m",Pe).call(this)}render(){return v`
|
|
875
875
|
<label for="${ct(this.id)}" class="check-input-label">
|
|
876
876
|
<input
|
|
877
877
|
id="${ct(this.id)}"
|
|
@@ -880,14 +880,14 @@ const Ce=ht(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"styl
|
|
|
880
880
|
class="check-input"
|
|
881
881
|
?disabled="${this.disabled}"
|
|
882
882
|
?checked="${this.checked}"
|
|
883
|
-
@change=${t(this,
|
|
883
|
+
@change=${t(this,De,"f")}
|
|
884
884
|
/>
|
|
885
885
|
<m-icon name="check" class="check-icon"></m-icon>
|
|
886
886
|
<m-icon name="indeterminate" class="indeterminate-icon"></m-icon>
|
|
887
887
|
<slot name="leading"></slot>
|
|
888
888
|
<slot></slot>
|
|
889
889
|
</label>
|
|
890
|
-
`}}
|
|
890
|
+
`}focus(t){var e;null===(e=this.input)||void 0===e||e.focus(t)}}De=new WeakMap,Re=new WeakSet,Pe=function(){this.setAttribute("aria-disabled",this.disabled.toString()),this.setAttribute("aria-checked",this.indeterminate?"mixed":this.checked.toString()),this.input.indeterminate=this.indeterminate},Ge.styles=[H`
|
|
891
891
|
${ee.focus(".check-input-label")} {
|
|
892
892
|
border-radius: 2px;
|
|
893
893
|
outline: 1px solid ${Dt("color-primary-60")};
|
|
@@ -921,7 +921,7 @@ const Ce=ht(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"styl
|
|
|
921
921
|
border-color: ${Dt("color-border")};
|
|
922
922
|
border-width: ${Pt("border-thin")};
|
|
923
923
|
margin: 0;
|
|
924
|
-
${Xt([{property:"border",...
|
|
924
|
+
${Xt([{property:"border",...Ne},{property:"background",...Ne}])};
|
|
925
925
|
}
|
|
926
926
|
|
|
927
927
|
.check-input:indeterminate,
|
|
@@ -975,7 +975,7 @@ const Ce=ht(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"styl
|
|
|
975
975
|
.check-input:indeterminate:not(:checked) ~ .indeterminate-icon {
|
|
976
976
|
display: inline-flex;
|
|
977
977
|
}
|
|
978
|
-
`],window.customElements.define("m-checkbox",
|
|
978
|
+
`],window.customElements.define("m-checkbox",Ge);class Le extends lt{render(){return v` <hr class="m-divider" /> `}}Le.styles=[H`
|
|
979
979
|
.m-divider {
|
|
980
980
|
border: 0;
|
|
981
981
|
border-block-end: solid 1px ${Dt("color-divider")};
|
|
@@ -988,13 +988,13 @@ const Ce=ht(class extends ut{constructor(t){var e;if(super(t),t.type!==dt||"styl
|
|
|
988
988
|
var(--m-divider-margin-y, 0)
|
|
989
989
|
);
|
|
990
990
|
}
|
|
991
|
-
`],window.customElements.define("m-divider",
|
|
991
|
+
`],window.customElements.define("m-divider",Le);
|
|
992
992
|
/**
|
|
993
993
|
* @license
|
|
994
994
|
* Copyright 2021 Google LLC
|
|
995
995
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
996
996
|
*/
|
|
997
|
-
class
|
|
997
|
+
class Ie extends Event{constructor(t,e,o){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=e,this.subscribe=o}}
|
|
998
998
|
/**
|
|
999
999
|
* @license
|
|
1000
1000
|
* Copyright 2021 Google LLC
|
|
@@ -1005,26 +1005,26 @@ class De extends Event{constructor(t,e,o){super("context-request",{bubbles:!0,co
|
|
|
1005
1005
|
* Copyright 2021 Google LLC
|
|
1006
1006
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1007
1007
|
*/
|
|
1008
|
-
class
|
|
1008
|
+
class Ve{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this.subscribe=i,this.provided=!1,this.value=void 0,this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Ie(this.context,((t,e)=>{this.unsubscribe&&(this.unsubscribe!==e&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,e)),this.unsubscribe=e}),this.subscribe))}}
|
|
1009
1009
|
/**
|
|
1010
1010
|
* @license
|
|
1011
1011
|
* Copyright 2021 Google LLC
|
|
1012
1012
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1013
|
-
*/class
|
|
1013
|
+
*/class Je{constructor(t){this.callbacks=new Map,this.updateObservers=()=>{for(const[t,e]of this.callbacks)t(this.t,e)},void 0!==t&&(this.value=t)}get value(){return this.t}set value(t){this.setValue(t)}setValue(t,e=!1){const o=e||!Object.is(t,this.t);this.t=t,o&&this.updateObservers()}addCallback(t,e){e&&(this.callbacks.has(t)||this.callbacks.set(t,(()=>{this.callbacks.delete(t)}))),t(this.value)}clearCallbacks(){this.callbacks.clear()}}
|
|
1014
1014
|
/**
|
|
1015
1015
|
* @license
|
|
1016
1016
|
* Copyright 2021 Google LLC
|
|
1017
1017
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1018
|
-
*/class
|
|
1018
|
+
*/class Ze extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}}class He extends Je{constructor(t,e,o){super(o),this.host=t,this.context=e,this.onContextRequest=t=>{t.context===this.context&&t.composedPath()[0]!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,t.subscribe))},this.attachListeners(),this.host.addController(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest)}hostConnected(){this.host.dispatchEvent(new Ze(this.context))}}
|
|
1019
1019
|
/**
|
|
1020
1020
|
* @license
|
|
1021
1021
|
* Copyright 2021 Google LLC
|
|
1022
1022
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1023
|
-
*/class
|
|
1023
|
+
*/class Fe{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{const e=this.pendingContextRequests.get(t.context);e&&(this.pendingContextRequests.delete(t.context),e.forEach((e=>{const o=e.element,i=e.callback;o&&o.dispatchEvent(new Ie(t.context,i,!0))})))},this.onContextRequest=t=>{if(!t.subscribe)return;const e={element:t.target,callback:t.callback};let o=this.pendingContextRequests.get(t.context);o||(o=new Set,this.pendingContextRequests.set(t.context,o)),o.add(e)}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}}const Ke="field";let Qe=!1;const Xe={gap:"spacing-4",align:"stretch",justify:"flex-start"};class Ye extends lt{static get properties(){return{gap:{type:String},align:{type:String},justify:{type:String}}}constructor(){super(),this.gap=Xe.gap,this.align=Xe.align,this.justify=Xe.justify}update(t){var e;this.style.setProperty("--m-group-gap",null!==(e=this.gap&&$t(this.gap))&&void 0!==e?e:$t(Xe.gap)),this.style.setProperty("--m-group-align",this.align||Xe.align),this.style.setProperty("--m-group-justify",this.justify||Xe.justify),super.update(t)}render(){return v`<slot></slot>`}}Ye.styles=[H`
|
|
1024
1024
|
:host {
|
|
1025
|
-
--m-group-gap: ${Pt(
|
|
1026
|
-
--m-group-align: ${Z(
|
|
1027
|
-
--m-group-justify: ${Z(
|
|
1025
|
+
--m-group-gap: ${Pt(Xe.gap)};
|
|
1026
|
+
--m-group-align: ${Z(Xe.align)};
|
|
1027
|
+
--m-group-justify: ${Z(Xe.justify)};
|
|
1028
1028
|
|
|
1029
1029
|
display: flex;
|
|
1030
1030
|
flex-wrap: wrap;
|
|
@@ -1032,11 +1032,11 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1032
1032
|
align-items: var(--m-group-align);
|
|
1033
1033
|
justify-content: var(--m-group-justify);
|
|
1034
1034
|
}
|
|
1035
|
-
`],window.customElements.define("m-group",
|
|
1035
|
+
`],window.customElements.define("m-group",Ye);const to={gap:"spacing-4",align:"stretch",justify:"flex-start"};class eo extends lt{static get properties(){return{gap:{type:String},align:{type:String},justify:{type:String}}}constructor(){super(),this.gap=to.gap,this.align=to.align,this.justify=to.justify}update(t){var e;this.style.setProperty("--m-stack-gap",null!==(e=this.gap&&$t(this.gap))&&void 0!==e?e:$t(to.gap)),this.style.setProperty("--m-stack-align",this.align||to.align),this.style.setProperty("--m-stack-justify",this.justify||to.justify),super.update(t)}render(){return v`<slot></slot>`}}var oo,io,ro,no,so;eo.styles=[H`
|
|
1036
1036
|
:host {
|
|
1037
|
-
--m-stack-gap: ${Pt(
|
|
1038
|
-
--m-stack-align: ${Z(
|
|
1039
|
-
--m-stack-justify: ${Z(
|
|
1037
|
+
--m-stack-gap: ${Pt(to.gap)};
|
|
1038
|
+
--m-stack-align: ${Z(to.align)};
|
|
1039
|
+
--m-stack-justify: ${Z(to.justify)};
|
|
1040
1040
|
|
|
1041
1041
|
display: flex;
|
|
1042
1042
|
flex-direction: column;
|
|
@@ -1045,13 +1045,13 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1045
1045
|
align-items: var(--m-stack-align);
|
|
1046
1046
|
justify-content: var(--m-stack-justify);
|
|
1047
1047
|
}
|
|
1048
|
-
`],window.customElements.define("m-stack",
|
|
1048
|
+
`],window.customElements.define("m-stack",eo);class lo extends fe{static get properties(){return{status:{type:String},slot:{type:String}}}constructor(){super(),oo.add(this),this.field=new Ve(this,Ke,void 0,!0),this.slot="hint"}render(){const e={"-status-default":"default"===t(this,oo,"m",io).call(this),"-status-danger":"danger"===t(this,oo,"m",io).call(this)};return v` <m-group
|
|
1049
1049
|
gap="spacing-0-5"
|
|
1050
1050
|
align="center"
|
|
1051
1051
|
class=${bt(e)}
|
|
1052
1052
|
>
|
|
1053
1053
|
<slot name="leading"
|
|
1054
|
-
>${"danger"===t(this,
|
|
1054
|
+
>${"danger"===t(this,oo,"m",io).call(this)?v`<m-icon
|
|
1055
1055
|
name="attention"
|
|
1056
1056
|
size="10"
|
|
1057
1057
|
color="color-danger-60"
|
|
@@ -1061,7 +1061,7 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1061
1061
|
class=${bt({hint:!0,...e})}
|
|
1062
1062
|
><slot></slot>
|
|
1063
1063
|
</span>
|
|
1064
|
-
</m-group>`}}
|
|
1064
|
+
</m-group>`}}oo=new WeakSet,io=function(){var t;return this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status)},lo.styles=[[H`
|
|
1065
1065
|
:host {
|
|
1066
1066
|
--m-field-hint-color: ${Dt("color-text-tertiary")};
|
|
1067
1067
|
}
|
|
@@ -1078,11 +1078,11 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1078
1078
|
${Yt("body-sm")};
|
|
1079
1079
|
color: var(--m-field-hint-color);
|
|
1080
1080
|
}
|
|
1081
|
-
`]],window.customElements.define("m-field-hint",
|
|
1082
|
-
class=${bt({label:!0,"-size-default":"default"===t(this,
|
|
1081
|
+
`]],window.customElements.define("m-field-hint",lo);class ao extends fe{static get properties(){return{required:{type:Boolean},size:{type:String},slot:{type:String}}}constructor(){super(),ro.add(this),this.field=new Ve(this,Ke,void 0,!0),this.slot="hint"}render(){return v`<label
|
|
1082
|
+
class=${bt({label:!0,"-size-default":"default"===t(this,ro,"m",no).call(this),"-size-small":"small"===t(this,ro,"m",no).call(this)})}
|
|
1083
1083
|
><slot></slot>
|
|
1084
|
-
${t(this,
|
|
1085
|
-
</label>`}}
|
|
1084
|
+
${t(this,ro,"m",so).call(this)?v`<span class="required">*</span>`:x}
|
|
1085
|
+
</label>`}}ro=new WeakSet,no=function(){var t;return this.size||(null===(t=this.field.value)||void 0===t?void 0:t.size)},so=function(){var t;return null!=this.required?this.required:Boolean(null===(t=this.field.value)||void 0===t?void 0:t.required)},ao.styles=[[H`
|
|
1086
1086
|
:host {
|
|
1087
1087
|
display: flex;
|
|
1088
1088
|
align-items: center;
|
|
@@ -1117,20 +1117,20 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1117
1117
|
.label.-size-small .required {
|
|
1118
1118
|
${Yt("body-sm")};
|
|
1119
1119
|
}
|
|
1120
|
-
`]],window.customElements.define("m-field-label",
|
|
1120
|
+
`]],window.customElements.define("m-field-label",ao),function(){if(Qe)return;(new Fe).attach(document.body),Qe=!0}();class co extends fe{static get properties(){return{label:{type:String},hint:{type:String},required:{type:Boolean},status:{type:String},size:{type:String}}}constructor(){super(),this.provider=new He(this,Ke,{required:!1,size:"default",status:"default"}),this.required=!1,this.status="default",this.size="default"}update(t){super.update(t),(t.has("required")||t.has("status")||t.has("size"))&&this.provider.setValue({required:this.required,status:this.status,size:this.size})}render(){return v`<m-stack gap="spacing-1">
|
|
1121
1121
|
${this.label?v`<m-field-label>${this.label}</m-field-label>`:v`<slot name="label"></slot>`}
|
|
1122
1122
|
|
|
1123
1123
|
<slot></slot>
|
|
1124
1124
|
|
|
1125
1125
|
${this.hint?v`<m-field-hint>${this.hint}</m-field-hint>`:v`<slot name="hint"></slot>`}
|
|
1126
|
-
</m-stack>`}}window.customElements.define("m-field",
|
|
1126
|
+
</m-stack>`}}window.customElements.define("m-field",co);const ho=["default","danger"],uo=["center","flex-start","flex-end","stretch"],bo=["center","flex-start","flex-end","space-between","space-around","space-evenly"],go={padding:"spacing-4",borderRadius:"border-radius-s",borderWidth:"border-none",borderColor:"color-background-highlight",textAlign:"left"};class po extends lt{static get properties(){return{padding:{type:String},backgroundColor:{type:String,attribute:"background-color"},borderRadius:{type:String,attribute:"border-radius"},borderWidth:{type:String,attribute:"border-width"},borderColor:{type:String,attribute:"border-color"},textAlign:{type:String,attribute:"text-align"}}}constructor(){super(),this.padding=go.padding,this.borderRadius=go.borderRadius,this.borderWidth=go.borderWidth,this.borderColor=go.borderColor,this.textAlign=go.textAlign}update(t){var e,o,i,r,n;this.style.setProperty("--m-box-padding",null!==(e=this.padding&&$t(this.padding))&&void 0!==e?e:$t(go.padding)),this.style.setProperty("--m-box-background-color",null!==(o=this.backgroundColor&&$t(this.backgroundColor))&&void 0!==o?o:"transparent"),this.style.setProperty("--m-box-border-radius",null!==(i=this.borderRadius&&$t(this.borderRadius))&&void 0!==i?i:$t(go.borderRadius)),this.style.setProperty("--m-box-border-width",null!==(r=this.borderWidth&&$t(this.borderWidth))&&void 0!==r?r:$t(go.borderWidth)),this.style.setProperty("--m-box-border-color",null!==(n=this.borderColor&&$t(this.borderColor))&&void 0!==n?n:$t(go.borderColor)),this.style.setProperty("--m-box-text-align",this.textAlign||go.textAlign),super.update(t)}render(){return v`<slot></slot>`}}po.styles=[H`
|
|
1127
1127
|
:host {
|
|
1128
|
-
--m-box-padding: ${Pt(
|
|
1128
|
+
--m-box-padding: ${Pt(go.padding)};
|
|
1129
1129
|
--m-box-background-color: transparent;
|
|
1130
|
-
--m-box-border-radius: ${Pt(
|
|
1131
|
-
--m-box-border-width: ${Pt(
|
|
1132
|
-
--m-box-border-color: ${Dt(
|
|
1133
|
-
--m-box-text-align: ${Z(
|
|
1130
|
+
--m-box-border-radius: ${Pt(go.borderRadius)};
|
|
1131
|
+
--m-box-border-width: ${Pt(go.borderWidth)};
|
|
1132
|
+
--m-box-border-color: ${Dt(go.borderColor)};
|
|
1133
|
+
--m-box-text-align: ${Z(go.textAlign)};
|
|
1134
1134
|
|
|
1135
1135
|
box-sizing: border-box;
|
|
1136
1136
|
|
|
@@ -1142,10 +1142,10 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1142
1142
|
border-color: var(--m-box-border-color);
|
|
1143
1143
|
text-align: var(--m-box-text-align);
|
|
1144
1144
|
}
|
|
1145
|
-
`],window.customElements.define("m-box",
|
|
1145
|
+
`],window.customElements.define("m-box",po);const mo={gap:"spacing-4",minColumnWidth:yt("spacing-30")};class fo extends lt{static get properties(){return{gap:{type:String},rowGap:{type:String,attribute:"row-gap"},columnGap:{type:String,attribute:"column-gap"},minColumnWidth:{type:String,attribute:"min-column-width"}}}constructor(){super(),this.gap=mo.gap,this.minColumnWidth=mo.minColumnWidth}update(t){var e;t.has("gap")&&this.style.setProperty("--m-grid-gap",null!==(e=this.gap&&$t(this.gap))&&void 0!==e?e:$t(mo.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-grid-row-gap",$t(this.rowGap)):this.style.removeProperty("--m-grid-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-grid-column-gap",$t(this.columnGap)):this.style.removeProperty("--m-grid-column-gap")),t.has("minColumnWidth")&&this.style.setProperty("--m-grid-min-column-width",this.minColumnWidth||mo.minColumnWidth),super.update(t)}render(){return v`<slot></slot>`}}fo.styles=[H`
|
|
1146
1146
|
:host {
|
|
1147
|
-
--m-grid-gap: ${Pt(
|
|
1148
|
-
--m-grid-min-column-width: ${Z(
|
|
1147
|
+
--m-grid-gap: ${Pt(mo.gap)};
|
|
1148
|
+
--m-grid-min-column-width: ${Z(mo.minColumnWidth)};
|
|
1149
1149
|
|
|
1150
1150
|
display: grid;
|
|
1151
1151
|
|
|
@@ -1157,15 +1157,15 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1157
1157
|
minmax(min(var(--m-grid-min-column-width), 100%), 1fr)
|
|
1158
1158
|
);
|
|
1159
1159
|
}
|
|
1160
|
-
`],window.customElements.define("m-grid",
|
|
1160
|
+
`],window.customElements.define("m-grid",fo);const $o={gap:"spacing-4",sideWidth:"auto",minContentWidth:"50%",reversed:!1};function yo(t){return t?"row-reverse":"row"}class vo extends lt{static get properties(){return{gap:{type:String},sideWidth:{type:String,attribute:"side-width"},minContentWidth:{type:String,attribute:"min-content-width"},reversed:{type:Boolean}}}constructor(){super(),this.gap=$o.gap,this.sideWidth=$o.sideWidth,this.minContentWidth=$o.minContentWidth,this.reversed=$o.reversed}update(t){var e;t.has("gap")&&this.style.setProperty("--m-sidebar-gap",null!==(e=this.gap&&$t(this.gap))&&void 0!==e?e:$t($o.gap)),t.has("sideWidth")&&this.style.setProperty("--m-sidebar-side-width",this.sideWidth||$o.sideWidth),t.has("minContentWidth")&&this.style.setProperty("--m-sidebar-min-content-width",this.minContentWidth||$o.minContentWidth),t.has("reversed")&&this.style.setProperty("--m-sidebar-flex-direction",yo(this.reversed)),super.update(t)}render(){return v`
|
|
1161
1161
|
<slot name="sidebar"></slot>
|
|
1162
1162
|
<slot name="content"></slot>
|
|
1163
|
-
`}}
|
|
1163
|
+
`}}vo.styles=[H`
|
|
1164
1164
|
:host {
|
|
1165
|
-
--m-sidebar-gap: ${Pt(
|
|
1166
|
-
--m-sidebar-flex-direction: ${Z(
|
|
1167
|
-
--m-sidebar-side-width: ${Z(
|
|
1168
|
-
--m-sidebar-min-content-width: ${Z(
|
|
1165
|
+
--m-sidebar-gap: ${Pt($o.gap)};
|
|
1166
|
+
--m-sidebar-flex-direction: ${Z(yo($o.reversed))};
|
|
1167
|
+
--m-sidebar-side-width: ${Z($o.sideWidth)};
|
|
1168
|
+
--m-sidebar-min-content-width: ${Z($o.minContentWidth)};
|
|
1169
1169
|
|
|
1170
1170
|
display: flex;
|
|
1171
1171
|
flex-wrap: wrap;
|
|
@@ -1184,7 +1184,7 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1184
1184
|
flex-grow: 999;
|
|
1185
1185
|
min-width: var(--m-sidebar-min-content-width);
|
|
1186
1186
|
}
|
|
1187
|
-
`],window.customElements.define("m-sidebar",
|
|
1187
|
+
`],window.customElements.define("m-sidebar",vo);const wo={gap:"spacing-4",threshold:"10rem"};class xo extends lt{static get properties(){return{gap:{type:String},rowGap:{type:String,attribute:"row-gap"},columnGap:{type:String,attribute:"column-gap"},threshold:{type:String},limit:{type:Number}}}constructor(){super(),this.gap=wo.gap,this.threshold=wo.threshold}update(t){var e;super.update(t),t.has("gap")&&this.style.setProperty("--m-switcher-gap",null!==(e=this.gap&&$t(this.gap))&&void 0!==e?e:$t(wo.gap)),t.has("rowGap")&&(this.rowGap?this.style.setProperty("--m-switcher-row-gap",$t(this.rowGap)):this.style.removeProperty("--m-switcher-row-gap")),t.has("columnGap")&&(this.columnGap?this.style.setProperty("--m-switcher-column-gap",$t(this.columnGap)):this.style.removeProperty("--m-switcher-column-gap")),t.has("threshold")&&this.style.setProperty("--m-switcher-threshold",this.threshold||wo.threshold)}render(){const t=this.limit?v`
|
|
1188
1188
|
<style>
|
|
1189
1189
|
::slotted(*:nth-last-child(n + ${this.limit+1})) {
|
|
1190
1190
|
flex-basis: 100%;
|
|
@@ -1196,10 +1196,10 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1196
1196
|
`:"";return v`
|
|
1197
1197
|
${t}
|
|
1198
1198
|
<slot></slot>
|
|
1199
|
-
`}}var
|
|
1199
|
+
`}}var ko,zo,So;xo.styles=[H`
|
|
1200
1200
|
:host {
|
|
1201
|
-
--m-switcher-gap: ${Pt(
|
|
1202
|
-
--m-switcher-threshold: ${Z(
|
|
1201
|
+
--m-switcher-gap: ${Pt(wo.gap)};
|
|
1202
|
+
--m-switcher-threshold: ${Z(wo.threshold)};
|
|
1203
1203
|
|
|
1204
1204
|
display: flex;
|
|
1205
1205
|
flex-wrap: wrap;
|
|
@@ -1212,14 +1212,14 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1212
1212
|
flex-basis: calc((var(--m-switcher-threshold) - 100%) * 999);
|
|
1213
1213
|
flex-grow: 1;
|
|
1214
1214
|
}
|
|
1215
|
-
`],window.customElements.define("m-switcher",
|
|
1215
|
+
`],window.customElements.define("m-switcher",xo);class Co extends lt{static get properties(){return{variant:{type:String,reflect:!0},value:{type:Number,reflect:!0},max:{type:Number,reflect:!0}}}constructor(){super(),ko.add(this),this.variant="default",this.value=0,this.max=100}connectedCallback(){super.connectedCallback(),this.setAttribute("role","progressbar"),this.setAttribute("aria-valuemin","0")}updated(){this.setAttribute("aria-valuenow",String(this.value)),this.setAttribute("aria-valuemax",String(this.max))}get percentage(){return 100*t(this,ko,"a",So)/t(this,ko,"a",zo)}get currentVariant(){return this.variant}render(){return v`
|
|
1216
1216
|
<div class="bar">
|
|
1217
1217
|
<span
|
|
1218
1218
|
class=${bt({progress:!0,"-default":"default"===this.currentVariant,"-success":"success"===this.currentVariant,"-warning":"warning"===this.currentVariant,"-danger":"danger"===this.currentVariant})}
|
|
1219
|
-
style=${
|
|
1219
|
+
style=${je({width:`${this.percentage}%`})}
|
|
1220
1220
|
></span>
|
|
1221
1221
|
</div>
|
|
1222
|
-
`}}
|
|
1222
|
+
`}}ko=new WeakSet,zo=function(){return this.max<=0?100:this.max},So=function(){return e=this.value,o=0,i=t(this,ko,"a",zo),Math.min(Math.max(o,e),i);var e,o,i},Co.styles=[H`
|
|
1223
1223
|
.bar {
|
|
1224
1224
|
display: flex;
|
|
1225
1225
|
flex-grow: 0;
|
|
@@ -1231,7 +1231,7 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1231
1231
|
overflow: hidden;
|
|
1232
1232
|
|
|
1233
1233
|
width: 100%;
|
|
1234
|
-
height: ${
|
|
1234
|
+
height: ${ve("8px")};
|
|
1235
1235
|
|
|
1236
1236
|
border-radius: ${Pt("border-radius-s")};
|
|
1237
1237
|
background-color: ${Dt("color-background-tertiary")};
|
|
@@ -1244,7 +1244,7 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1244
1244
|
|
|
1245
1245
|
${Xt([{property:"width"},{property:"background"}])};
|
|
1246
1246
|
|
|
1247
|
-
height: ${
|
|
1247
|
+
height: ${ve("8px")};
|
|
1248
1248
|
|
|
1249
1249
|
border-radius: ${Pt("border-radius-s")};
|
|
1250
1250
|
|
|
@@ -1270,7 +1270,7 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1270
1270
|
.-danger {
|
|
1271
1271
|
--m-progress-bar-progress-background: ${Dt("color-danger-60")};
|
|
1272
1272
|
}
|
|
1273
|
-
`],window.customElements.define("m-progress-bar",
|
|
1273
|
+
`],window.customElements.define("m-progress-bar",Co);class Mo extends Co{get currentVariant(){return this.percentage>=66?"success":this.percentage>=33?"warning":"danger"}}window.customElements.define("m-progress-bar-countdown",Mo);const Wo="m-check";var jo,Ao,_o,Bo,Eo;class Oo extends lt{static get properties(){return{value:{type:String},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0}}}constructor(){super(),jo.add(this),_o.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(Wo,e))})),Bo.set(this,(()=>{this.setAttribute("aria-disabled",String(this.disabled))})),Eo.set(this,(()=>{this.setAttribute("aria-checked",String(this.checked))})),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio"),this.addEventListener("click",t(this,_o,"f"))}updated(e){super.updated(e),e.has("disabled")&&t(this,Bo,"f").call(this),e.has("checked")&&t(this,Eo,"f").call(this)}render(){return v`
|
|
1274
1274
|
<button
|
|
1275
1275
|
type="button"
|
|
1276
1276
|
class="radio-button"
|
|
@@ -1282,7 +1282,7 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1282
1282
|
<slot name="leading"></slot>
|
|
1283
1283
|
<slot></slot>
|
|
1284
1284
|
</button>
|
|
1285
|
-
`}}
|
|
1285
|
+
`}focus(e){var o;null===(o=t(this,jo,"a",Ao))||void 0===o||o.focus(e)}}_o=new WeakMap,Bo=new WeakMap,Eo=new WeakMap,jo=new WeakSet,Ao=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("button"))&&void 0!==e?e:null},Oo.styles=[H`
|
|
1286
1286
|
:host {
|
|
1287
1287
|
--m-radio-border-color: ${Dt("color-border")};
|
|
1288
1288
|
--m-radio-dot-check-color: ${Dt("color-primary-60")};
|
|
@@ -1385,13 +1385,13 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1385
1385
|
${te(".radio-button","*")} {
|
|
1386
1386
|
pointer-event: none;
|
|
1387
1387
|
}
|
|
1388
|
-
`],window.customElements.define("m-radio",
|
|
1388
|
+
`],window.customElements.define("m-radio",Oo);var To,Uo={};Object.defineProperty(Uo,"i",{value:!0});var qo=Gt;const No=(t,e)=>{const o=qo.toArray(t);if(0===o.length)return e;const i=new Set;return i.add(String(o.at(-1))),i},Ro=(t,e)=>{const o=qo.toArray(t);if(0===o.length)return e;const i=new Set(e);for(const t of o)i.add(String(t));return i},Po={type:"single",init:t=>No(t,new Set),select:No,unselect(t,e){const o=qo.toArray(t);if(0===o.length||0===e.size)return e;const i=new Set(e);for(const t of o)i.delete(String(t));return i},toggle(t,e){const o=qo.toArray(t);if(0===o.length)return e;const i=new Set;for(const t of o){const o=String(t);e.has(o)||(i.clear(),i.add(o))}return i},reset:t=>null==t?new Set:t,value(t){if(null==t||0===t.size)return null;const[e]=Array.from(t);return e}},Do={type:"single-strict",init:t=>No(t,new Set),select:No,unselect(t,e){const o=qo.toArray(t);if(0===o.length||0===e.size)return e;const i=new Set(e);for(let t=0;t<o.length&&e.size>1;t++)i.delete(String(o[t]));return i},toggle(t,e){const o=qo.toArray(t);if(0===o.length)return e;const i=new Set(e);for(const t of o){const o=String(t);e.has(o)||(i.clear(),i.add(o))}return i},reset:t=>null==t?new Set:t,value(t){if(null==t||0===t.size)return null;const[e]=Array.from(t);return e}},Go={type:"multiple",init:t=>Ro(t,new Set),select:Ro,unselect(t,e){const o=qo.toArray(t);if(0===o.length||0===e.size)return e;const i=new Set(e);for(const t of o)i.delete(String(t));return i},toggle(t,e){const o=qo.toArray(t);if(0===o.length)return e;const i=new Set(e);for(const t of o){const o=String(t);e.has(o)?i.delete(o):i.add(o)}return i},reset:t=>null==t?new Set:t,value:t=>null==t||0===t.size?null:Array.from(t)};var Lo,Io,Vo,Jo,Zo,Ho,Fo,Ko,Qo,Xo,Yo,ti,ei,oi;Uo.SELECTION_TYPES=["single","single-strict","multiple"],To=Uo.default=function(t){const{type:e="multiple"}=t;return"single"===e?Po:"single-strict"===e?Do:Go};class ii{constructor(e,o,i){Lo.add(this),this.disabled=!1,this.event="m-select",Io.set(this,(t=>{if(this.disabled)return;if(null==this.type)return void console.warn("[SelectionController] Did you forget to set the selection type?");const{detail:{type:e,value:o}}=t;switch(e){case"select":this.select(Lt(o));break;case"unselect":this.unselect(Lt(o));break;case"toggle":this.toggle(Lt(o))}})),this.init=t=>{this.host.selection=this.strategy.init(t)},this.select=e=>{this.host.selection=this.strategy.select(e,this.host.selection),t(this,Lo,"m",Vo).call(this)},this.unselect=e=>{this.host.selection=this.strategy.unselect(e,this.host.selection),t(this,Lo,"m",Vo).call(this)},this.toggle=e=>{this.host.selection=this.strategy.toggle(e,this.host.selection),t(this,Lo,"m",Vo).call(this)},this.subscribe=()=>{this.host.addEventListener(this.event,t(this,Io,"f"))},this.unsubscribe=()=>{this.host.removeEventListener(this.event,t(this,Io,"f"))},this.host=e,this.type=o,this.event=i,this.strategy=To({type:o}),this.host.addController(this)}hostConnected(){this.subscribe()}hostDisconnected(){this.unsubscribe()}hostUpdate(){null!=this.host.type&&this.host.type!==this.type&&(this.unsubscribe(),this.host.removeController(this))}}Io=new WeakMap,Lo=new WeakSet,Vo=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 ri extends lt{static get properties(){return{value:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},selection:{state:!0},orientation:{type:String}}}constructor(){super(),Jo.set(this,null),Zo.set(this,null),Ho.set(this,(()=>{var e;return null===(e=t(this,Fo,"f").call(this)[0])||void 0===e?void 0:e.value})),Fo.set(this,(()=>{var o,i,r;e(this,Zo,null!==(o=t(this,Zo,"f"))&&void 0!==o?o:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(r=null===(i=t(this,Zo,"f"))||void 0===i?void 0:i.assignedElements({flatten:!0}))&&void 0!==r?r:[]].filter((t=>"m-radio"===t.tagName.toLowerCase()))})),Ko.set(this,(t=>{t.checked=this.selection.has(t.value)})),Qo.set(this,(t=>{t.disabled=this.disabled})),this.disabled=!1,this.selection=new Set,this.value="",this.orientation="vertical",this.type="single-strict"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio-group"),e(this,Jo,new ii(this,this.type,Wo),"f")}update(e){super.update(e),e.has("value")&&t(this,Jo,"f")&&t(this,Jo,"f").init(Lt(this.value||t(this,Ho,"f").call(this))),e.has("selection")&&([this.value]=this.selection)}updated(e){super.updated(e),e.has("selection")&&t(this,Fo,"f").call(this).forEach((e=>{t(this,Ko,"f").call(this,e)})),e.has("disabled")&&t(this,Fo,"f").call(this).forEach((e=>{t(this,Qo,"f").call(this,e)}))}render(){return v`
|
|
1389
1389
|
<div
|
|
1390
1390
|
class=${bt({"radio-group":!0,"-vertical":"vertical"===this.orientation,"-horizontal":"horizontal"===this.orientation})}
|
|
1391
1391
|
>
|
|
1392
1392
|
<slot></slot>
|
|
1393
1393
|
</div>
|
|
1394
|
-
`}}
|
|
1394
|
+
`}}Jo=new WeakMap,Zo=new WeakMap,Ho=new WeakMap,Fo=new WeakMap,Ko=new WeakMap,Qo=new WeakMap,ri.styles=[H`
|
|
1395
1395
|
.radio-group {
|
|
1396
1396
|
display: flex;
|
|
1397
1397
|
gap: ${Pt("spacing-2")};
|
|
@@ -1402,14 +1402,14 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1402
1402
|
.radio-group.-horizontal {
|
|
1403
1403
|
flex-direction: row;
|
|
1404
1404
|
}
|
|
1405
|
-
`],window.customElements.define("m-radio-group",
|
|
1405
|
+
`],window.customElements.define("m-radio-group",ri);class ni extends lt{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 v`
|
|
1406
1406
|
<span
|
|
1407
1407
|
class=${bt({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})}
|
|
1408
1408
|
>
|
|
1409
1409
|
${this.isSkeleton?v``:v`<slot name="leading"></slot>`}
|
|
1410
1410
|
<slot></slot>
|
|
1411
1411
|
</span>
|
|
1412
|
-
`}}
|
|
1412
|
+
`}}ni.styles=[[H`
|
|
1413
1413
|
@keyframes skeleton-loading {
|
|
1414
1414
|
0% {
|
|
1415
1415
|
background-color: ${Dt("color-background-tertiary")};
|
|
@@ -1447,7 +1447,7 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1447
1447
|
.-size-small {
|
|
1448
1448
|
${Yt("chips-sm")};
|
|
1449
1449
|
padding: ${Pt("spacing-1")} ${Pt("spacing-2")};
|
|
1450
|
-
block-size: ${
|
|
1450
|
+
block-size: ${ve("18px")};
|
|
1451
1451
|
}
|
|
1452
1452
|
.-size-default {
|
|
1453
1453
|
${Yt("chips-md")};
|
|
@@ -1481,9 +1481,9 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1481
1481
|
${Z("animation: skeleton-loading 1s linear infinite alternate;")};
|
|
1482
1482
|
width: var(--m-tag-skeleton-width);
|
|
1483
1483
|
}
|
|
1484
|
-
`]],window.customElements.define("m-tag",
|
|
1484
|
+
`]],window.customElements.define("m-tag",ni);class si extends fe{static get properties(){return{clearable:{type:Boolean},disabled:{type:Boolean,reflect:!0},max:{type:String},maxLength:{type:Number,reflect:!0,attribute:"max-length"},min:{type:String},minLength:{type:Number,reflect:!0,attribute:"min-length"},pattern:{type:String},placeholder:{type:String},readOnly:{type:Boolean,reflect:!0,attribute:"read-only"},size:{type:String},status:{type:String},step:{type:String},type:{type:String},value:{type:String}}}constructor(){super(),Xo.add(this),this.inputElement=null,this.field=new Ve(this,Ke,void 0,!0),this.clearable=!1,this.disabled=!1,this.placeholder=void 0,this.size="default",this.type="text",this.value=void 0,this.max=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","textbox")}render(){return v`
|
|
1485
1485
|
<div
|
|
1486
|
-
class=${bt({container:!0,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size,"is-disabled":Boolean(this.disabled),"-status-default":"default"===t(this,
|
|
1486
|
+
class=${bt({container:!0,"-size-small":"small"===this.size,"-size-default":"default"===this.size,"-size-large":"large"===this.size,"is-disabled":Boolean(this.disabled),"-status-default":"default"===t(this,Xo,"m",ti).call(this),"-status-danger":"danger"===t(this,Xo,"m",ti).call(this)})}
|
|
1487
1487
|
>
|
|
1488
1488
|
<slot name="leading"></slot>
|
|
1489
1489
|
<input
|
|
@@ -1502,17 +1502,17 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1502
1502
|
step=${this.step||x}
|
|
1503
1503
|
value="${ct(this.value)}"
|
|
1504
1504
|
@change=${this.reemit}
|
|
1505
|
-
@input=${t(this,
|
|
1505
|
+
@input=${t(this,Xo,"m",ei)}
|
|
1506
1506
|
/>
|
|
1507
1507
|
${this.clearable?v`<m-close-button
|
|
1508
|
-
class=${bt({clear:!0,"is-visible":t(this,
|
|
1508
|
+
class=${bt({clear:!0,"is-visible":t(this,Xo,"m",Yo).call(this)})}
|
|
1509
1509
|
controls="${ct(this.id)}"
|
|
1510
|
-
@m-close=${t(this,
|
|
1510
|
+
@m-close=${t(this,Xo,"m",oi)}
|
|
1511
1511
|
label="Clear input"
|
|
1512
1512
|
></m-close-button>`:x}
|
|
1513
1513
|
<slot name="trailing"></slot>
|
|
1514
1514
|
</div>
|
|
1515
|
-
`}get input(){var t,e;return null==this.inputElement&&(this.inputElement=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("input"))&&void 0!==e?e:null),this.inputElement}clear(){this.value="",this.input&&(this.input.value=""),this.emit("m-clear"),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}
|
|
1515
|
+
`}get input(){var t,e;return null==this.inputElement&&(this.inputElement=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("input"))&&void 0!==e?e:null),this.inputElement}clear(){this.value="",this.input&&(this.input.value=""),this.emit("m-clear"),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Xo=new WeakSet,Yo=function(){const t=this.value||"";return!this.disabled&&t.length>0},ti=function(){var t;return this.status||(null===(t=this.field.value)||void 0===t?void 0:t.status)},ei=function(t){this.value=t.target.value,this.reemit(t)},oi=function(t){t.stopPropagation(),this.clear()},si.styles=[H`
|
|
1516
1516
|
:host {
|
|
1517
1517
|
--m-text-field-background-color: transparent;
|
|
1518
1518
|
--m-text-field-border-color: ${Dt("color-border")};
|
|
@@ -1626,14 +1626,14 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1626
1626
|
.clear.is-visible {
|
|
1627
1627
|
visibility: visible;
|
|
1628
1628
|
}
|
|
1629
|
-
`],window.customElements.define("m-text-field",
|
|
1629
|
+
`],window.customElements.define("m-text-field",si);const li="m-toggle";var ai,ci,di,hi,ui,bi,gi,pi,mi,fi,$i;class yi extends lt{static get properties(){return{disabled:{type:Boolean},role:{type:String,reflect:!0},showCheck:{type:Boolean,attribute:"show-check"},size:{type:String},type:{type:String},value:{},selection:{state:!0}}}constructor(){super(),ai.set(this,null),ci.set(this,null),di.set(this,(()=>{var o,i,r;e(this,ci,null!==(o=t(this,ci,"f"))&&void 0!==o?o:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(r=null===(i=t(this,ci,"f"))||void 0===i?void 0:i.assignedElements({flatten:!0}))&&void 0!==r?r:[]].filter((t=>"m-toggle"===t.tagName.toLowerCase()))})),hi.set(this,(t=>{t.setAttribute("role",["single","single-strict"].includes(this.type)?"radio":"checkbox")})),ui.set(this,(t=>{t.checked=this.selection.has(t.value)})),bi.set(this,(t=>{t.disabled=this.disabled})),this.showCheck=!1,this.size="default",this.type="single",this.selection=new Set}update(o){super.update(o),(null!=o.get("type")&&null!=this.type||null==t(this,ai,"f"))&&(e(this,ai,new ii(this,this.type,li),"f"),t(this,ai,"f").init(Lt(this.value)),this.role=["single","single-strict"].includes(this.type)?"radiogroup":"group"),o.has("value")&&t(this,ai,"f").init(Lt(this.value))}updated(e){super.updated(e),e.has("selection")&&t(this,di,"f").call(this).forEach((e=>{t(this,ui,"f").call(this,e)})),e.has("disabled")&&t(this,di,"f").call(this).forEach((e=>{t(this,bi,"f").call(this,e)})),e.has("role")&&t(this,di,"f").call(this).forEach((e=>{t(this,hi,"f").call(this,e)}))}render(){return v`
|
|
1630
1630
|
<m-group
|
|
1631
1631
|
class=${bt({"toggle-group":!0,"-single":"single"===this.type,"-single-strict":"single-strict"===this.type,"-multiple":"multiple"===this.type,"-small":"small"===this.size,"-show-check":this.showCheck})}
|
|
1632
1632
|
gap="spacing-1"
|
|
1633
1633
|
>
|
|
1634
1634
|
<slot></slot>
|
|
1635
1635
|
</m-group>
|
|
1636
|
-
`}}
|
|
1636
|
+
`}}ai=new WeakMap,ci=new WeakMap,di=new WeakMap,hi=new WeakMap,ui=new WeakMap,bi=new WeakMap,yi.styles=[[H`
|
|
1637
1637
|
.toggle-group {
|
|
1638
1638
|
inline-size: max-content;
|
|
1639
1639
|
|
|
@@ -1659,7 +1659,7 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1659
1659
|
.toggle-group.-show-check ::slotted(m-toggle[aria-checked='true']) {
|
|
1660
1660
|
--m-toggle-icon-display: inline-flex;
|
|
1661
1661
|
}
|
|
1662
|
-
`]],window.customElements.define("m-toggle-group",
|
|
1662
|
+
`]],window.customElements.define("m-toggle-group",yi);class vi extends lt{static get properties(){return{checked:{type:Boolean},disabled:{type:Boolean,reflect:!0},role:{type:String,reflect:!0},value:{type:String}}}constructor(){super(),gi.add(this),mi.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(li,t))})),fi.set(this,(()=>{this.setAttribute("aria-disabled",String(this.disabled))})),$i.set(this,(()=>{this.setAttribute("aria-checked",String(this.checked))})),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t(this,mi,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,mi,"f"))}updated(e){super.updated(e),e.has("disabled")&&t(this,fi,"f").call(this),e.has("checked")&&t(this,$i,"f").call(this)}render(){return v`
|
|
1663
1663
|
<button
|
|
1664
1664
|
type="button"
|
|
1665
1665
|
class=${bt({button:!0,toggle:!0})}
|
|
@@ -1673,7 +1673,7 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1673
1673
|
|
|
1674
1674
|
<slot></slot>
|
|
1675
1675
|
</button>
|
|
1676
|
-
`}}
|
|
1676
|
+
`}focus(e){var o;null===(o=t(this,gi,"a",pi))||void 0===o||o.focus(e)}}mi=new WeakMap,fi=new WeakMap,$i=new WeakMap,gi=new WeakSet,pi=function(){var t,e;return null!==(e=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector("button"))&&void 0!==e?e:null},vi.styles=[[oe(),H`
|
|
1677
1677
|
:host {
|
|
1678
1678
|
/*
|
|
1679
1679
|
* These custom properties are here because they are meant to be
|
|
@@ -1715,5 +1715,5 @@ class Ge{constructor(t,e,o,i=!1){this.host=t,this.context=e,this.callback=o,this
|
|
|
1715
1715
|
|
|
1716
1716
|
display: var(--m-toggle-icon-display);
|
|
1717
1717
|
}
|
|
1718
|
-
`]],window.customElements.define("m-toggle",
|
|
1718
|
+
`]],window.customElements.define("m-toggle",vi);export{uo as ALIGN_ITEMS_VALUES,Ee as Banner,he as BannerActionPrimary,ue as BannerActionSecondary,be as BannerActions,ge as BannerDescription,pe as BannerIcon,me as BannerTitle,po as Box,de as Button,Oe as Card,Te as CardBody,Ue as CardSubtitle,qe as CardTitle,Ge as Checkbox,We as CloseButton,Le as Divider,ho as FIELD_STATUSES,co as Field,lo as FieldHint,ao as FieldLabel,fo as Grid,Ye as Group,bo as JUSTIFY_CONTENT_VALUES,Co as ProgressBar,Mo as ProgressBarCountdown,Oo as Radio,ri as RadioGroup,vo as Sidebar,eo as Stack,xo as Switcher,ni as Tag,Ae as Text,si as TextField,vi as Toggle,yi as ToggleGroup,go as defaultBoxProps,mo as defaultGridProps,Xe as defaultGroupProps,$o as defaultSidebarProps,to as defaultStackProps,wo as defaultSwitcherProps};
|
|
1719
1719
|
//# sourceMappingURL=index.js.map
|