@covalent/components 8.2.0 → 8.2.1
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/action-ribbon.js +3 -2
- package/action-ribbon.mjs +10 -9
- package/alert.js +3 -2
- package/alert.mjs +10 -9
- package/app-shell.js +2 -1
- package/app-shell.mjs +20 -19
- package/{base-element-atp_8bvP.js → base-element-58a3f9ea.js} +1 -1
- package/{base-element--jaKdI-8.mjs → base-element-67ae173f.mjs} +2 -2
- package/button.js +3 -2
- package/button.mjs +16 -15
- package/card.js +3 -2
- package/card.mjs +5 -4
- package/check-list-item.js +15 -11
- package/check-list-item.mjs +68 -62
- package/checkbox.js +2 -1
- package/checkbox.mjs +25 -23
- package/circular-progress.js +1 -1
- package/circular-progress.mjs +7 -7
- package/{class-map-YPXv0Hj4.mjs → class-map-4b94b017.mjs} +1 -1
- package/{class-map-wtcW44Of.js → class-map-b5efe8da.js} +1 -1
- package/code-snippet-2137b11c.js +13 -0
- package/code-snippet-ccca324f.mjs +12278 -0
- package/code-snippet.js +1 -12
- package/code-snippet.mjs +7 -12251
- package/{dialog-tIMorfuj.mjs → dialog-3ca1b701.mjs} +62 -60
- package/{dialog-SpbwRuWY.js → dialog-82b03745.js} +7 -6
- package/dialog.js +1 -1
- package/dialog.mjs +10 -10
- package/{directive-helpers--rJ2jf3N.js → directive-helpers-0ce1f995.js} +1 -1
- package/{directive-helpers-9566lOOl.mjs → directive-helpers-e3ea6592.mjs} +1 -1
- package/drawer.js +3 -2
- package/drawer.mjs +12 -11
- package/empty-state.js +2 -1
- package/empty-state.mjs +6 -5
- package/{event-options-2TJPtsKy.js → event-options-3f5eb195.js} +1 -1
- package/{event-options-0xzSdemG.mjs → event-options-78d6cf94.mjs} +1 -1
- package/{form-element-5s8gft-A.js → form-element-c553d6f5.js} +1 -1
- package/{form-element-gM33WEq3.mjs → form-element-ffcf59ff.mjs} +4 -4
- package/{foundation-3Wg80pI7.mjs → foundation-39dc72d2.mjs} +1 -1
- package/{foundation-1Vzfdey_.js → foundation-786bf879.js} +1 -1
- package/icon-button.js +3 -2
- package/icon-button.mjs +15 -14
- package/icon-check-toggle.js +5 -4
- package/icon-check-toggle.mjs +24 -22
- package/icon-radio-toggle.js +5 -4
- package/icon-radio-toggle.mjs +27 -25
- package/icon.js +5 -1
- package/icon.mjs +21 -15
- package/{if-defined-BH_l2PVl.mjs → if-defined-c367f208.mjs} +1 -1
- package/{if-defined-lAIUwAsA.js → if-defined-f1c45245.js} +1 -1
- package/index.js +560 -1
- package/index.mjs +3654 -124
- package/{inert.esm-vhZXthJr.mjs → inert.esm-359d4581.mjs} +1 -1
- package/linear-progress.js +3 -2
- package/linear-progress.mjs +13 -12
- package/{mwc-list-item.css-d-SHhq7Q.mjs → list-item-1fc0d619.mjs} +9 -199
- package/{mwc-list-item.css-yJ5bjNGc.js → list-item-209613bf.js} +6 -28
- package/list-item.js +3 -3
- package/list-item.mjs +25 -25
- package/list.js +8 -3
- package/list.mjs +37 -31
- package/menu.js +5 -1
- package/menu.mjs +34 -28
- package/mwc-checkbox-base-3d8c9549.js +41 -0
- package/mwc-checkbox-base-f10fd709.mjs +198 -0
- package/{mwc-checkbox.css-c44nPIEs.mjs → mwc-checkbox.css-8f4f1a9b.mjs} +3 -198
- package/{mwc-checkbox.css-JOD-Qh-9.js → mwc-checkbox.css-b3434429.js} +2 -42
- package/{mwc-drawer-base-8e_1aSuf.mjs → mwc-drawer-base-135de8a5.mjs} +26 -24
- package/{mwc-drawer-base-Fv3JVYPS.js → mwc-drawer-base-798b11f8.js} +5 -5
- package/{mwc-icon-eaW72Ei7.mjs → mwc-icon-bf656cf5.mjs} +5 -6
- package/{mwc-icon-r2y4-AXI.js → mwc-icon-f87639bc.js} +2 -2
- package/{mwc-line-ripple-directive-iRoAkPnW.js → mwc-line-ripple-directive-a6b39a3c.js} +1 -1
- package/{mwc-line-ripple-directive-Q_HMRGPE.mjs → mwc-line-ripple-directive-b24a914e.mjs} +6 -6
- package/mwc-list-base-400b00e2.js +111 -0
- package/{mwc-list.css-_OVL_dbR.mjs → mwc-list-base-76e37212.mjs} +212 -213
- package/mwc-list-item-base-297d86b0.js +28 -0
- package/mwc-list-item-base-fe4398c3.mjs +202 -0
- package/{mwc-menu.css-cKtc1ZD4.mjs → mwc-menu-base-c4bc88ea.mjs} +75 -74
- package/mwc-menu-base-c75ca473.js +190 -0
- package/mwc-radio-base-913e02e2.js +101 -0
- package/{mwc-radio.css-_lt-Vcvl.mjs → mwc-radio-base-a374fbd9.mjs} +117 -123
- package/mwc-radio.css-4e140252.js +5 -0
- package/mwc-radio.css-7454bb11.mjs +10 -0
- package/{mwc-slider.css-md7hPAE7.mjs → mwc-slider.css-8b6f275c.mjs} +11 -11
- package/{mwc-slider.css-lCfMVbO5.js → mwc-slider.css-c7107d94.js} +1 -1
- package/{mwc-tab.css-lT5vTf5I.mjs → mwc-tab-base-be0c887f.mjs} +123 -127
- package/{mwc-tab.css-q4Jsbyp5.js → mwc-tab-base-f28722aa.js} +22 -26
- package/{mwc-top-app-bar-base-nm6mdCR3.mjs → mwc-top-app-bar-base-55da3fe4.mjs} +13 -12
- package/{mwc-top-app-bar-base-8qOIX1me.js → mwc-top-app-bar-base-aec60f27.js} +3 -3
- package/nav-list-item.js +6 -5
- package/nav-list-item.mjs +38 -37
- package/package.json +1 -1
- package/{query-duvhtfSs.js → query-680f1868.js} +1 -1
- package/{query-assigned-nodes-1p7z6CEm.js → query-assigned-nodes-99eae71d.js} +1 -1
- package/{query-assigned-nodes-6yHI5ePh.mjs → query-assigned-nodes-df691e78.mjs} +1 -1
- package/{query-1WmuF6Bq.mjs → query-d843aa92.mjs} +1 -1
- package/radio-list-item.js +13 -9
- package/radio-list-item.mjs +64 -58
- package/radio.js +2 -1
- package/radio.mjs +25 -23
- package/{ripple-handlers-HeGhXgD2.js → ripple-handlers-5d5b21db.js} +8 -8
- package/{ripple-handlers-BwaZu9Ps.mjs → ripple-handlers-f37f21cf.mjs} +17 -16
- package/select.js +15 -10
- package/select.mjs +147 -139
- package/side-sheet.js +2 -1
- package/side-sheet.mjs +12 -11
- package/slider-range.js +1 -1
- package/slider-range.mjs +14 -14
- package/slider.js +1 -1
- package/slider.mjs +16 -16
- package/snackbar.js +11 -10
- package/snackbar.mjs +36 -34
- package/{state-LqPxt99W.js → state-0974a8e5.js} +1 -1
- package/{state-inNZe6rL.mjs → state-b5e865db.mjs} +1 -1
- package/status-header-item.js +2 -1
- package/status-header-item.mjs +4 -3
- package/status-header.js +3 -2
- package/status-header.mjs +5 -4
- package/{style-map-66_3wrLx.js → style-map-88d2563f.js} +1 -1
- package/{style-map-8yp6DGeh.mjs → style-map-bc3ed3e0.mjs} +2 -2
- package/style.css +1 -1
- package/switch.js +3 -2
- package/switch.mjs +16 -15
- package/tab-bar.js +22 -18
- package/tab-bar.mjs +203 -195
- package/tab.js +6 -1
- package/tab.mjs +32 -26
- package/text-lockup.js +2 -1
- package/text-lockup.mjs +9 -8
- package/textarea.js +19 -15
- package/textarea.mjs +65 -59
- package/textfield-62e16cc2.js +133 -0
- package/textfield-63d1859a.mjs +932 -0
- package/textfield.js +7 -3
- package/textfield.mjs +36 -30
- package/toolbar.js +2 -1
- package/toolbar.mjs +10 -9
- package/tooltip.js +3 -2
- package/tooltip.mjs +10 -9
- package/{top-app-bar-qcW2ucE3.js → top-app-bar-a531c1b4.js} +3 -2
- package/{top-app-bar-h0V-USh_.mjs → top-app-bar-f83386e0.mjs} +3 -2
- package/top-app-bar-fixed.js +6 -6
- package/top-app-bar-fixed.mjs +28 -27
- package/top-app-bar.js +1 -1
- package/top-app-bar.mjs +9 -9
- package/tree-list-item.js +2 -1
- package/tree-list-item.mjs +7 -6
- package/tree-list.js +2 -1
- package/tree-list.mjs +3 -2
- package/{tslib.es6-S8SvF2K1.mjs → tslib.es6-f3e988cd.mjs} +5 -5
- package/typography.js +2 -1
- package/typography.mjs +4 -3
- package/_commonjsHelpers-ZPn_iTGj.mjs +0 -28
- package/_commonjsHelpers-fFrWAeZI.js +0 -1
- package/chip-M5Vb5Kd6.js +0 -492
- package/chip-m2mKzWQT.mjs +0 -3115
- package/chip-set.js +0 -75
- package/chip-set.mjs +0 -531
- package/chip.js +0 -1
- package/chip.mjs +0 -12
- package/expansion-panel-item.js +0 -24
- package/expansion-panel-item.mjs +0 -106
- package/expansion-panel.js +0 -7
- package/expansion-panel.mjs +0 -59
- package/formfield.js +0 -79
- package/formfield.mjs +0 -275
- package/list-item-F2e6aWaj.mjs +0 -11
- package/list-item-Ze98reWt.js +0 -5
- package/mwc-list.css-DjU8XB1m.js +0 -111
- package/mwc-menu.css-qavo4jer.js +0 -190
- package/mwc-radio.css-h_Wv0Eag.js +0 -105
- package/textfield-7aU1kEO6.mjs +0 -936
- package/textfield-jvevIGSw.js +0 -136
- /package/{aria-property-52VAcg_f.js → aria-property-849c8816.js} +0 -0
- /package/{aria-property-wYjPNXcK.mjs → aria-property-fa2717fe.mjs} +0 -0
- /package/{inert.esm-TSRtlTFV.js → inert.esm-2cee6f2e.js} +0 -0
- /package/{observer-LlGBroG9.js → observer-a096ab43.js} +0 -0
- /package/{observer-cKAgu-MI.mjs → observer-be7b92e2.mjs} +0 -0
- /package/{property-iZpLBvy-.js → property-57f6f6fe.js} +0 -0
- /package/{property-K7hFBmOi.mjs → property-9b6ea53b.mjs} +0 -0
- /package/{query-assigned-elements-yFWOzcsT.mjs → query-assigned-elements-4a39219d.mjs} +0 -0
- /package/{query-assigned-elements-j_5ZiL65.js → query-assigned-elements-f623705d.js} +0 -0
- /package/{tslib.es6-5xG0QhxF.js → tslib.es6-98719205.js} +0 -0
- /package/{utils-xAXEDL0Y.mjs → utils-2932417c.mjs} +0 -0
- /package/{utils-W3ENJhq-.js → utils-a8190a39.js} +0 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
"use strict";const s=require("./tslib.es6-98719205.js"),c=require("./ripple-handlers-5d5b21db.js"),l=require("./observer-a096ab43.js"),r=require("./query-assigned-elements-f623705d.js"),n=require("./property-57f6f6fe.js"),d=require("./state-0974a8e5.js"),p=require("./query-680f1868.js"),h=require("./class-map-b5efe8da.js");/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2020 Google LLC
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
5
|
+
*/class t extends r.s{constructor(){super(...arguments),this.value="",this.group=null,this.tabindex=-1,this.disabled=!1,this.twoline=!1,this.activated=!1,this.graphic=null,this.multipleGraphics=!1,this.hasMeta=!1,this.noninteractive=!1,this.selected=!1,this.shouldRenderRipple=!1,this._managingList=null,this.boundOnClick=this.onClick.bind(this),this._firstChanged=!0,this._skipPropRequest=!1,this.rippleHandlers=new c.RippleHandlers(()=>(this.shouldRenderRipple=!0,this.ripple)),this.listeners=[{target:this,eventNames:["click"],cb:()=>{this.onClick()}},{target:this,eventNames:["mouseenter"],cb:this.rippleHandlers.startHover},{target:this,eventNames:["mouseleave"],cb:this.rippleHandlers.endHover},{target:this,eventNames:["focus"],cb:this.rippleHandlers.startFocus},{target:this,eventNames:["blur"],cb:this.rippleHandlers.endFocus},{target:this,eventNames:["mousedown","touchstart"],cb:e=>{const i=e.type;this.onDown(i==="mousedown"?"mouseup":"touchend",e)}}]}get text(){const e=this.textContent;return e?e.trim():""}render(){const e=this.renderText(),i=this.graphic?this.renderGraphic():r.x``,o=this.hasMeta?this.renderMeta():r.x``;return r.x`
|
6
|
+
${this.renderRipple()}
|
7
|
+
${i}
|
8
|
+
${e}
|
9
|
+
${o}`}renderRipple(){return this.shouldRenderRipple?r.x`
|
10
|
+
<mwc-ripple
|
11
|
+
.activated=${this.activated}>
|
12
|
+
</mwc-ripple>`:this.activated?r.x`<div class="fake-activated-ripple"></div>`:""}renderGraphic(){const e={multi:this.multipleGraphics};return r.x`
|
13
|
+
<span class="mdc-deprecated-list-item__graphic material-icons ${h.o(e)}">
|
14
|
+
<slot name="graphic"></slot>
|
15
|
+
</span>`}renderMeta(){return r.x`
|
16
|
+
<span class="mdc-deprecated-list-item__meta material-icons">
|
17
|
+
<slot name="meta"></slot>
|
18
|
+
</span>`}renderText(){const e=this.twoline?this.renderTwoline():this.renderSingleLine();return r.x`
|
19
|
+
<span class="mdc-deprecated-list-item__text">
|
20
|
+
${e}
|
21
|
+
</span>`}renderSingleLine(){return r.x`<slot></slot>`}renderTwoline(){return r.x`
|
22
|
+
<span class="mdc-deprecated-list-item__primary-text">
|
23
|
+
<slot></slot>
|
24
|
+
</span>
|
25
|
+
<span class="mdc-deprecated-list-item__secondary-text">
|
26
|
+
<slot name="secondary"></slot>
|
27
|
+
</span>
|
28
|
+
`}onClick(){this.fireRequestSelected(!this.selected,"interaction")}onDown(e,i){const o=()=>{window.removeEventListener(e,o),this.rippleHandlers.endPress()};window.addEventListener(e,o),this.rippleHandlers.startPress(i)}fireRequestSelected(e,i){if(this.noninteractive)return;const o=new CustomEvent("request-selected",{bubbles:!0,composed:!0,detail:{source:i,selected:e}});this.dispatchEvent(o)}connectedCallback(){super.connectedCallback(),this.noninteractive||this.setAttribute("mwc-list-item","");for(const e of this.listeners)for(const i of e.eventNames)e.target.addEventListener(i,e.cb,{passive:!0})}disconnectedCallback(){super.disconnectedCallback();for(const e of this.listeners)for(const i of e.eventNames)e.target.removeEventListener(i,e.cb);this._managingList&&(this._managingList.debouncedLayout?this._managingList.debouncedLayout(!0):this._managingList.layout(!0))}firstUpdated(){const e=new Event("list-item-rendered",{bubbles:!0,composed:!0});this.dispatchEvent(e)}}s.__decorate([p.i("slot")],t.prototype,"slotElement",void 0);s.__decorate([c.e("mwc-ripple")],t.prototype,"ripple",void 0);s.__decorate([n.n({type:String})],t.prototype,"value",void 0);s.__decorate([n.n({type:String,reflect:!0})],t.prototype,"group",void 0);s.__decorate([n.n({type:Number,reflect:!0})],t.prototype,"tabindex",void 0);s.__decorate([n.n({type:Boolean,reflect:!0}),l.observer(function(a){a?this.setAttribute("aria-disabled","true"):this.setAttribute("aria-disabled","false")})],t.prototype,"disabled",void 0);s.__decorate([n.n({type:Boolean,reflect:!0})],t.prototype,"twoline",void 0);s.__decorate([n.n({type:Boolean,reflect:!0})],t.prototype,"activated",void 0);s.__decorate([n.n({type:String,reflect:!0})],t.prototype,"graphic",void 0);s.__decorate([n.n({type:Boolean})],t.prototype,"multipleGraphics",void 0);s.__decorate([n.n({type:Boolean})],t.prototype,"hasMeta",void 0);s.__decorate([n.n({type:Boolean,reflect:!0}),l.observer(function(a){a?(this.removeAttribute("aria-checked"),this.removeAttribute("mwc-list-item"),this.selected=!1,this.activated=!1,this.tabIndex=-1):this.setAttribute("mwc-list-item","")})],t.prototype,"noninteractive",void 0);s.__decorate([n.n({type:Boolean,reflect:!0}),l.observer(function(a){const e=this.getAttribute("role"),i=e==="gridcell"||e==="option"||e==="row"||e==="tab";if(i&&a?this.setAttribute("aria-selected","true"):i&&this.setAttribute("aria-selected","false"),this._firstChanged){this._firstChanged=!1;return}this._skipPropRequest||this.fireRequestSelected(a,"property")})],t.prototype,"selected",void 0);s.__decorate([d.t()],t.prototype,"shouldRenderRipple",void 0);s.__decorate([d.t()],t.prototype,"_managingList",void 0);exports.ListItemBase=t;
|
@@ -0,0 +1,202 @@
|
|
1
|
+
import { f as t } from "./tslib.es6-f3e988cd.mjs";
|
2
|
+
import { e as c, R as d } from "./ripple-handlers-f37f21cf.mjs";
|
3
|
+
import { o as l } from "./observer-be7b92e2.mjs";
|
4
|
+
import { s as h, x as n } from "./query-assigned-elements-4a39219d.mjs";
|
5
|
+
import { n as r } from "./property-9b6ea53b.mjs";
|
6
|
+
import { t as p } from "./state-b5e865db.mjs";
|
7
|
+
import { i as u } from "./query-d843aa92.mjs";
|
8
|
+
import { o as m } from "./class-map-4b94b017.mjs";
|
9
|
+
/**
|
10
|
+
* @license
|
11
|
+
* Copyright 2020 Google LLC
|
12
|
+
* SPDX-License-Identifier: Apache-2.0
|
13
|
+
*/
|
14
|
+
class s extends h {
|
15
|
+
constructor() {
|
16
|
+
super(...arguments), this.value = "", this.group = null, this.tabindex = -1, this.disabled = !1, this.twoline = !1, this.activated = !1, this.graphic = null, this.multipleGraphics = !1, this.hasMeta = !1, this.noninteractive = !1, this.selected = !1, this.shouldRenderRipple = !1, this._managingList = null, this.boundOnClick = this.onClick.bind(this), this._firstChanged = !0, this._skipPropRequest = !1, this.rippleHandlers = new d(() => (this.shouldRenderRipple = !0, this.ripple)), this.listeners = [
|
17
|
+
{
|
18
|
+
target: this,
|
19
|
+
eventNames: ["click"],
|
20
|
+
cb: () => {
|
21
|
+
this.onClick();
|
22
|
+
}
|
23
|
+
},
|
24
|
+
{
|
25
|
+
target: this,
|
26
|
+
eventNames: ["mouseenter"],
|
27
|
+
cb: this.rippleHandlers.startHover
|
28
|
+
},
|
29
|
+
{
|
30
|
+
target: this,
|
31
|
+
eventNames: ["mouseleave"],
|
32
|
+
cb: this.rippleHandlers.endHover
|
33
|
+
},
|
34
|
+
{
|
35
|
+
target: this,
|
36
|
+
eventNames: ["focus"],
|
37
|
+
cb: this.rippleHandlers.startFocus
|
38
|
+
},
|
39
|
+
{
|
40
|
+
target: this,
|
41
|
+
eventNames: ["blur"],
|
42
|
+
cb: this.rippleHandlers.endFocus
|
43
|
+
},
|
44
|
+
{
|
45
|
+
target: this,
|
46
|
+
eventNames: ["mousedown", "touchstart"],
|
47
|
+
cb: (e) => {
|
48
|
+
const i = e.type;
|
49
|
+
this.onDown(i === "mousedown" ? "mouseup" : "touchend", e);
|
50
|
+
}
|
51
|
+
}
|
52
|
+
];
|
53
|
+
}
|
54
|
+
get text() {
|
55
|
+
const e = this.textContent;
|
56
|
+
return e ? e.trim() : "";
|
57
|
+
}
|
58
|
+
render() {
|
59
|
+
const e = this.renderText(), i = this.graphic ? this.renderGraphic() : n``, a = this.hasMeta ? this.renderMeta() : n``;
|
60
|
+
return n`
|
61
|
+
${this.renderRipple()}
|
62
|
+
${i}
|
63
|
+
${e}
|
64
|
+
${a}`;
|
65
|
+
}
|
66
|
+
renderRipple() {
|
67
|
+
return this.shouldRenderRipple ? n`
|
68
|
+
<mwc-ripple
|
69
|
+
.activated=${this.activated}>
|
70
|
+
</mwc-ripple>` : this.activated ? n`<div class="fake-activated-ripple"></div>` : "";
|
71
|
+
}
|
72
|
+
renderGraphic() {
|
73
|
+
const e = {
|
74
|
+
multi: this.multipleGraphics
|
75
|
+
};
|
76
|
+
return n`
|
77
|
+
<span class="mdc-deprecated-list-item__graphic material-icons ${m(e)}">
|
78
|
+
<slot name="graphic"></slot>
|
79
|
+
</span>`;
|
80
|
+
}
|
81
|
+
renderMeta() {
|
82
|
+
return n`
|
83
|
+
<span class="mdc-deprecated-list-item__meta material-icons">
|
84
|
+
<slot name="meta"></slot>
|
85
|
+
</span>`;
|
86
|
+
}
|
87
|
+
renderText() {
|
88
|
+
const e = this.twoline ? this.renderTwoline() : this.renderSingleLine();
|
89
|
+
return n`
|
90
|
+
<span class="mdc-deprecated-list-item__text">
|
91
|
+
${e}
|
92
|
+
</span>`;
|
93
|
+
}
|
94
|
+
renderSingleLine() {
|
95
|
+
return n`<slot></slot>`;
|
96
|
+
}
|
97
|
+
renderTwoline() {
|
98
|
+
return n`
|
99
|
+
<span class="mdc-deprecated-list-item__primary-text">
|
100
|
+
<slot></slot>
|
101
|
+
</span>
|
102
|
+
<span class="mdc-deprecated-list-item__secondary-text">
|
103
|
+
<slot name="secondary"></slot>
|
104
|
+
</span>
|
105
|
+
`;
|
106
|
+
}
|
107
|
+
onClick() {
|
108
|
+
this.fireRequestSelected(!this.selected, "interaction");
|
109
|
+
}
|
110
|
+
onDown(e, i) {
|
111
|
+
const a = () => {
|
112
|
+
window.removeEventListener(e, a), this.rippleHandlers.endPress();
|
113
|
+
};
|
114
|
+
window.addEventListener(e, a), this.rippleHandlers.startPress(i);
|
115
|
+
}
|
116
|
+
fireRequestSelected(e, i) {
|
117
|
+
if (this.noninteractive)
|
118
|
+
return;
|
119
|
+
const a = new CustomEvent("request-selected", { bubbles: !0, composed: !0, detail: { source: i, selected: e } });
|
120
|
+
this.dispatchEvent(a);
|
121
|
+
}
|
122
|
+
connectedCallback() {
|
123
|
+
super.connectedCallback(), this.noninteractive || this.setAttribute("mwc-list-item", "");
|
124
|
+
for (const e of this.listeners)
|
125
|
+
for (const i of e.eventNames)
|
126
|
+
e.target.addEventListener(i, e.cb, { passive: !0 });
|
127
|
+
}
|
128
|
+
disconnectedCallback() {
|
129
|
+
super.disconnectedCallback();
|
130
|
+
for (const e of this.listeners)
|
131
|
+
for (const i of e.eventNames)
|
132
|
+
e.target.removeEventListener(i, e.cb);
|
133
|
+
this._managingList && (this._managingList.debouncedLayout ? this._managingList.debouncedLayout(!0) : this._managingList.layout(!0));
|
134
|
+
}
|
135
|
+
// composed flag, event fire through shadow root and up through composed tree
|
136
|
+
firstUpdated() {
|
137
|
+
const e = new Event("list-item-rendered", { bubbles: !0, composed: !0 });
|
138
|
+
this.dispatchEvent(e);
|
139
|
+
}
|
140
|
+
}
|
141
|
+
t([
|
142
|
+
u("slot")
|
143
|
+
], s.prototype, "slotElement", void 0);
|
144
|
+
t([
|
145
|
+
c("mwc-ripple")
|
146
|
+
], s.prototype, "ripple", void 0);
|
147
|
+
t([
|
148
|
+
r({ type: String })
|
149
|
+
], s.prototype, "value", void 0);
|
150
|
+
t([
|
151
|
+
r({ type: String, reflect: !0 })
|
152
|
+
], s.prototype, "group", void 0);
|
153
|
+
t([
|
154
|
+
r({ type: Number, reflect: !0 })
|
155
|
+
], s.prototype, "tabindex", void 0);
|
156
|
+
t([
|
157
|
+
r({ type: Boolean, reflect: !0 }),
|
158
|
+
l(function(o) {
|
159
|
+
o ? this.setAttribute("aria-disabled", "true") : this.setAttribute("aria-disabled", "false");
|
160
|
+
})
|
161
|
+
], s.prototype, "disabled", void 0);
|
162
|
+
t([
|
163
|
+
r({ type: Boolean, reflect: !0 })
|
164
|
+
], s.prototype, "twoline", void 0);
|
165
|
+
t([
|
166
|
+
r({ type: Boolean, reflect: !0 })
|
167
|
+
], s.prototype, "activated", void 0);
|
168
|
+
t([
|
169
|
+
r({ type: String, reflect: !0 })
|
170
|
+
], s.prototype, "graphic", void 0);
|
171
|
+
t([
|
172
|
+
r({ type: Boolean })
|
173
|
+
], s.prototype, "multipleGraphics", void 0);
|
174
|
+
t([
|
175
|
+
r({ type: Boolean })
|
176
|
+
], s.prototype, "hasMeta", void 0);
|
177
|
+
t([
|
178
|
+
r({ type: Boolean, reflect: !0 }),
|
179
|
+
l(function(o) {
|
180
|
+
o ? (this.removeAttribute("aria-checked"), this.removeAttribute("mwc-list-item"), this.selected = !1, this.activated = !1, this.tabIndex = -1) : this.setAttribute("mwc-list-item", "");
|
181
|
+
})
|
182
|
+
], s.prototype, "noninteractive", void 0);
|
183
|
+
t([
|
184
|
+
r({ type: Boolean, reflect: !0 }),
|
185
|
+
l(function(o) {
|
186
|
+
const e = this.getAttribute("role"), i = e === "gridcell" || e === "option" || e === "row" || e === "tab";
|
187
|
+
if (i && o ? this.setAttribute("aria-selected", "true") : i && this.setAttribute("aria-selected", "false"), this._firstChanged) {
|
188
|
+
this._firstChanged = !1;
|
189
|
+
return;
|
190
|
+
}
|
191
|
+
this._skipPropRequest || this.fireRequestSelected(o, "property");
|
192
|
+
})
|
193
|
+
], s.prototype, "selected", void 0);
|
194
|
+
t([
|
195
|
+
p()
|
196
|
+
], s.prototype, "shouldRenderRipple", void 0);
|
197
|
+
t([
|
198
|
+
p()
|
199
|
+
], s.prototype, "_managingList", void 0);
|
200
|
+
export {
|
201
|
+
s as L
|
202
|
+
};
|
@@ -1,24 +1,30 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import { B as j } from "./base-element
|
5
|
-
import { o as
|
6
|
-
import { a as
|
7
|
-
import { n as a } from "./property-
|
8
|
-
import { t as b } from "./state-
|
9
|
-
import { i as
|
10
|
-
import { o as P } from "./class-map-
|
11
|
-
import { o as
|
1
|
+
import { f as o, _ as U, a as B, b as q } from "./tslib.es6-f3e988cd.mjs";
|
2
|
+
import { i as V, e as K, x as F } from "./query-assigned-elements-4a39219d.mjs";
|
3
|
+
import { L as Q } from "./mwc-list-base-76e37212.mjs";
|
4
|
+
import { B as j } from "./base-element-67ae173f.mjs";
|
5
|
+
import { o as g } from "./observer-be7b92e2.mjs";
|
6
|
+
import { a as Y, d as Z, b as J } from "./utils-2932417c.mjs";
|
7
|
+
import { n as a } from "./property-9b6ea53b.mjs";
|
8
|
+
import { t as b } from "./state-b5e865db.mjs";
|
9
|
+
import { i as D } from "./query-d843aa92.mjs";
|
10
|
+
import { o as P } from "./class-map-4b94b017.mjs";
|
11
|
+
import { o as tt } from "./style-map-bc3ed3e0.mjs";
|
12
|
+
/**
|
13
|
+
* @license
|
14
|
+
* Copyright 2021 Google LLC
|
15
|
+
* SPDX-LIcense-Identifier: Apache-2.0
|
16
|
+
*/
|
17
|
+
const et = V`@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}`;
|
12
18
|
/**
|
13
19
|
* @license
|
14
20
|
* Copyright 2020 Google LLC
|
15
21
|
* SPDX-License-Identifier: Apache-2.0
|
16
22
|
*/
|
17
|
-
let k = class extends
|
23
|
+
let k = class extends Q {
|
18
24
|
};
|
19
|
-
k.styles = [
|
25
|
+
k.styles = [et];
|
20
26
|
k = o([
|
21
|
-
|
27
|
+
K("mwc-list")
|
22
28
|
], k);
|
23
29
|
/**
|
24
30
|
* @license
|
@@ -326,8 +332,8 @@ var X = (
|
|
326
332
|
}, e.prototype.autoposition = function() {
|
327
333
|
var t;
|
328
334
|
this.measurements = this.getAutoLayoutmeasurements();
|
329
|
-
var i = this.getoriginCorner(), s = this.getMenuSurfaceMaxHeight(i), r = this.hasBit(i, c.BOTTOM) ? "bottom" : "top", l = this.hasBit(i, c.RIGHT) ? "right" : "left",
|
330
|
-
_.width /
|
335
|
+
var i = this.getoriginCorner(), s = this.getMenuSurfaceMaxHeight(i), r = this.hasBit(i, c.BOTTOM) ? "bottom" : "top", l = this.hasBit(i, c.RIGHT) ? "right" : "left", f = this.getHorizontalOriginOffset(i), R = this.getVerticalOriginOffset(i), I = this.measurements, _ = I.anchorSize, S = I.surfaceSize, p = (t = {}, t[l] = f, t[r] = R, t);
|
336
|
+
_.width / S.width > M.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO && (l = "center"), (this.isHoistedElement || this.isFixedPosition) && this.adjustPositionForHoistedElement(p), this.adapter.setTransformOrigin(l + " " + r), this.adapter.setPosition(p), this.adapter.setMaxHeight(s ? s + "px" : ""), this.hasBit(i, c.BOTTOM) || this.adapter.addClass(e.cssClasses.IS_OPEN_BELOW);
|
331
337
|
}, e.prototype.getAutoLayoutmeasurements = function() {
|
332
338
|
var t = this.adapter.getAnchorDimensions(), i = this.adapter.getBodyDimensions(), s = this.adapter.getWindowDimensions(), r = this.adapter.getWindowScroll();
|
333
339
|
return t || (t = {
|
@@ -353,21 +359,21 @@ var X = (
|
|
353
359
|
windowScroll: r
|
354
360
|
};
|
355
361
|
}, e.prototype.getoriginCorner = function() {
|
356
|
-
var t = this.originCorner, i = this.measurements, s = i.viewportDistance, r = i.anchorSize, l = i.surfaceSize,
|
357
|
-
|
358
|
-
var
|
359
|
-
!
|
360
|
-
var
|
361
|
-
|
362
|
-
var
|
363
|
-
A ? (
|
364
|
-
var
|
365
|
-
return G && $ &&
|
362
|
+
var t = this.originCorner, i = this.measurements, s = i.viewportDistance, r = i.anchorSize, l = i.surfaceSize, f = e.numbers.MARGIN_TO_EDGE, R = this.hasBit(this.anchorCorner, c.BOTTOM), I, _;
|
363
|
+
R ? (I = s.top - f + this.anchorMargin.bottom, _ = s.bottom - f - this.anchorMargin.bottom) : (I = s.top - f + this.anchorMargin.top, _ = s.bottom - f + r.height - this.anchorMargin.top);
|
364
|
+
var S = _ - l.height > 0;
|
365
|
+
!S && I > _ + this.openBottomBias && (t = this.setBit(t, c.BOTTOM));
|
366
|
+
var p = this.adapter.isRtl(), T = this.hasBit(this.anchorCorner, c.FLIP_RTL), E = this.hasBit(this.anchorCorner, c.RIGHT) || this.hasBit(t, c.RIGHT), A = !1;
|
367
|
+
p && T ? A = !E : A = E;
|
368
|
+
var L, w;
|
369
|
+
A ? (L = s.left + r.width + this.anchorMargin.right, w = s.right - this.anchorMargin.right) : (L = s.left + this.anchorMargin.left, w = s.right + r.width - this.anchorMargin.left);
|
370
|
+
var N = L - l.width > 0, G = w - l.width > 0, $ = this.hasBit(t, c.FLIP_RTL) && this.hasBit(t, c.RIGHT);
|
371
|
+
return G && $ && p || !N && $ ? t = this.unsetBit(t, c.RIGHT) : (N && A && p || N && !A && E || !G && L >= w) && (t = this.setBit(t, c.RIGHT)), t;
|
366
372
|
}, e.prototype.getMenuSurfaceMaxHeight = function(t) {
|
367
373
|
if (this.maxHeight > 0)
|
368
374
|
return this.maxHeight;
|
369
|
-
var i = this.measurements.viewportDistance, s = 0, r = this.hasBit(t, c.BOTTOM), l = this.hasBit(this.anchorCorner, c.BOTTOM),
|
370
|
-
return r ? (s = i.top + this.anchorMargin.top -
|
375
|
+
var i = this.measurements.viewportDistance, s = 0, r = this.hasBit(t, c.BOTTOM), l = this.hasBit(this.anchorCorner, c.BOTTOM), f = e.numbers.MARGIN_TO_EDGE;
|
376
|
+
return r ? (s = i.top + this.anchorMargin.top - f, l || (s += this.measurements.anchorSize.height)) : (s = i.bottom - this.anchorMargin.bottom + this.measurements.anchorSize.height - f, l && (s -= this.measurements.anchorSize.height)), s;
|
371
377
|
}, e.prototype.getHorizontalOriginOffset = function(t) {
|
372
378
|
var i = this.measurements.anchorSize, s = this.hasBit(t, c.RIGHT), r = this.hasBit(this.anchorCorner, c.RIGHT);
|
373
379
|
if (s) {
|
@@ -379,21 +385,21 @@ var X = (
|
|
379
385
|
var i = this.measurements.anchorSize, s = this.hasBit(t, c.BOTTOM), r = this.hasBit(this.anchorCorner, c.BOTTOM), l = 0;
|
380
386
|
return s ? l = r ? i.height - this.anchorMargin.top : -this.anchorMargin.bottom : l = r ? i.height + this.anchorMargin.bottom : this.anchorMargin.top, l;
|
381
387
|
}, e.prototype.adjustPositionForHoistedElement = function(t) {
|
382
|
-
var i, s, r = this.measurements, l = r.windowScroll,
|
388
|
+
var i, s, r = this.measurements, l = r.windowScroll, f = r.viewportDistance, R = r.surfaceSize, I = r.viewportSize, _ = Object.keys(t);
|
383
389
|
try {
|
384
|
-
for (var
|
385
|
-
var T =
|
390
|
+
for (var S = q(_), p = S.next(); !p.done; p = S.next()) {
|
391
|
+
var T = p.value, E = t[T] || 0;
|
386
392
|
if (this.isHorizontallyCenteredOnViewport && (T === "left" || T === "right")) {
|
387
|
-
t[T] = (
|
393
|
+
t[T] = (I.width - R.width) / 2;
|
388
394
|
continue;
|
389
395
|
}
|
390
|
-
E +=
|
396
|
+
E += f[T], this.isFixedPosition || (T === "top" ? E += l.y : T === "bottom" ? E -= l.y : T === "left" ? E += l.x : E -= l.x), t[T] = E;
|
391
397
|
}
|
392
398
|
} catch (A) {
|
393
399
|
i = { error: A };
|
394
400
|
} finally {
|
395
401
|
try {
|
396
|
-
|
402
|
+
p && !p.done && (s = S.return) && s.call(S);
|
397
403
|
} finally {
|
398
404
|
if (i)
|
399
405
|
throw i.error;
|
@@ -415,12 +421,13 @@ var X = (
|
|
415
421
|
}, e;
|
416
422
|
}(W)
|
417
423
|
);
|
424
|
+
const st = X;
|
418
425
|
/**
|
419
426
|
* @license
|
420
427
|
* Copyright 2020 Google LLC
|
421
428
|
* SPDX-License-Identifier: Apache-2.0
|
422
429
|
*/
|
423
|
-
const
|
430
|
+
const ot = {
|
424
431
|
TOP_LEFT: m.TOP_LEFT,
|
425
432
|
TOP_RIGHT: m.TOP_RIGHT,
|
426
433
|
BOTTOM_LEFT: m.BOTTOM_LEFT,
|
@@ -432,7 +439,7 @@ const st = {
|
|
432
439
|
};
|
433
440
|
class u extends j {
|
434
441
|
constructor() {
|
435
|
-
super(...arguments), this.mdcFoundationClass =
|
442
|
+
super(...arguments), this.mdcFoundationClass = st, this.absolute = !1, this.fullwidth = !1, this.fixed = !1, this.x = null, this.y = null, this.quick = !1, this.open = !1, this.stayOpenOnBodyClick = !1, this.bitwiseCorner = m.TOP_START, this.previousMenuCorner = null, this.menuCorner = "START", this.corner = "TOP_START", this.styleTop = "", this.styleLeft = "", this.styleRight = "", this.styleBottom = "", this.styleMaxHeight = "", this.styleTransformOrigin = "", this.anchor = null, this.previouslyFocused = null, this.previousAnchor = null, this.onBodyClickBound = () => {
|
436
443
|
};
|
437
444
|
}
|
438
445
|
render() {
|
@@ -443,7 +450,7 @@ class u extends j {
|
|
443
450
|
return F`
|
444
451
|
<div
|
445
452
|
class=${P(e)}
|
446
|
-
style="${
|
453
|
+
style="${tt(t)}"
|
447
454
|
@keydown=${this.onKeydown}
|
448
455
|
@opened=${this.registerBodyClick}
|
449
456
|
@closed=${this.deregisterBodyClick}>
|
@@ -471,7 +478,7 @@ class u extends j {
|
|
471
478
|
return F`<slot></slot>`;
|
472
479
|
}
|
473
480
|
createAdapter() {
|
474
|
-
return Object.assign(Object.assign({},
|
481
|
+
return Object.assign(Object.assign({}, Y(this.mdcRoot)), { hasAnchor: () => !!this.anchor, notifyClose: () => {
|
475
482
|
const e = { bubbles: !0, composed: !0 }, t = new CustomEvent("closed", e);
|
476
483
|
this.open = !1, this.mdcRoot.dispatchEvent(t);
|
477
484
|
}, notifyClosing: () => {
|
@@ -485,8 +492,8 @@ class u extends j {
|
|
485
492
|
this.mdcRoot.dispatchEvent(t);
|
486
493
|
}, isElementInContainer: () => !1, isRtl: () => this.mdcRoot ? getComputedStyle(this.mdcRoot).direction === "rtl" : !1, setTransformOrigin: (e) => {
|
487
494
|
this.mdcRoot && (this.styleTransformOrigin = e);
|
488
|
-
}, isFocused: () =>
|
489
|
-
const e =
|
495
|
+
}, isFocused: () => Z(this), saveFocus: () => {
|
496
|
+
const e = J(), t = e.length;
|
490
497
|
t || (this.previouslyFocused = null), this.previouslyFocused = e[t - 1];
|
491
498
|
}, restoreFocus: () => {
|
492
499
|
this.previouslyFocused && "focus" in this.previouslyFocused && this.previouslyFocused.focus();
|
@@ -536,14 +543,14 @@ class u extends j {
|
|
536
543
|
}
|
537
544
|
}
|
538
545
|
o([
|
539
|
-
|
546
|
+
D(".mdc-menu-surface")
|
540
547
|
], u.prototype, "mdcRoot", void 0);
|
541
548
|
o([
|
542
|
-
|
549
|
+
D("slot")
|
543
550
|
], u.prototype, "slotElement", void 0);
|
544
551
|
o([
|
545
552
|
a({ type: Boolean }),
|
546
|
-
|
553
|
+
g(function(n) {
|
547
554
|
this.mdcFoundation && !this.fixed && this.mdcFoundation.setIsHoisted(n);
|
548
555
|
})
|
549
556
|
], u.prototype, "absolute", void 0);
|
@@ -552,31 +559,31 @@ o([
|
|
552
559
|
], u.prototype, "fullwidth", void 0);
|
553
560
|
o([
|
554
561
|
a({ type: Boolean }),
|
555
|
-
|
562
|
+
g(function(n) {
|
556
563
|
this.mdcFoundation && !this.absolute && this.mdcFoundation.setFixedPosition(n);
|
557
564
|
})
|
558
565
|
], u.prototype, "fixed", void 0);
|
559
566
|
o([
|
560
567
|
a({ type: Number }),
|
561
|
-
|
568
|
+
g(function(n) {
|
562
569
|
this.mdcFoundation && this.y !== null && n !== null && (this.mdcFoundation.setAbsolutePosition(n, this.y), this.mdcFoundation.setAnchorMargin({ left: n, top: this.y, right: -n, bottom: this.y }));
|
563
570
|
})
|
564
571
|
], u.prototype, "x", void 0);
|
565
572
|
o([
|
566
573
|
a({ type: Number }),
|
567
|
-
|
574
|
+
g(function(n) {
|
568
575
|
this.mdcFoundation && this.x !== null && n !== null && (this.mdcFoundation.setAbsolutePosition(this.x, n), this.mdcFoundation.setAnchorMargin({ left: this.x, top: n, right: -this.x, bottom: n }));
|
569
576
|
})
|
570
577
|
], u.prototype, "y", void 0);
|
571
578
|
o([
|
572
579
|
a({ type: Boolean }),
|
573
|
-
|
580
|
+
g(function(n) {
|
574
581
|
this.mdcFoundation && this.mdcFoundation.setQuickOpen(n);
|
575
582
|
})
|
576
583
|
], u.prototype, "quick", void 0);
|
577
584
|
o([
|
578
585
|
a({ type: Boolean, reflect: !0 }),
|
579
|
-
|
586
|
+
g(function(n, e) {
|
580
587
|
this.onOpenChanged(n, e);
|
581
588
|
})
|
582
589
|
], u.prototype, "open", void 0);
|
@@ -585,13 +592,13 @@ o([
|
|
585
592
|
], u.prototype, "stayOpenOnBodyClick", void 0);
|
586
593
|
o([
|
587
594
|
b(),
|
588
|
-
|
595
|
+
g(function(n) {
|
589
596
|
this.mdcFoundation && (n ? this.mdcFoundation.setAnchorCorner(n) : this.mdcFoundation.setAnchorCorner(n));
|
590
597
|
})
|
591
598
|
], u.prototype, "bitwiseCorner", void 0);
|
592
599
|
o([
|
593
600
|
a({ type: String }),
|
594
|
-
|
601
|
+
g(function(n) {
|
595
602
|
if (this.mdcFoundation) {
|
596
603
|
const e = n === "START" || n === "END", t = this.previousMenuCorner === null, i = !t && n !== this.previousMenuCorner;
|
597
604
|
e && (i || t && n === "END") && (this.bitwiseCorner = this.bitwiseCorner ^ c.RIGHT, this.mdcFoundation.flipCornerHorizontally(), this.previousMenuCorner = n);
|
@@ -600,9 +607,9 @@ o([
|
|
600
607
|
], u.prototype, "menuCorner", void 0);
|
601
608
|
o([
|
602
609
|
a({ type: String }),
|
603
|
-
|
610
|
+
g(function(n) {
|
604
611
|
if (this.mdcFoundation && n) {
|
605
|
-
let e =
|
612
|
+
let e = ot[n];
|
606
613
|
this.menuCorner === "END" && (e = e ^ c.RIGHT), this.bitwiseCorner = e;
|
607
614
|
}
|
608
615
|
})
|
@@ -630,7 +637,7 @@ o([
|
|
630
637
|
* Copyright 2021 Google LLC
|
631
638
|
* SPDX-LIcense-Identifier: Apache-2.0
|
632
639
|
*/
|
633
|
-
const
|
640
|
+
const rt = V`.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;transition:opacity .03s linear,transform .12s cubic-bezier(0, 0, 0.2, 1),height 250ms cubic-bezier(0, 0, 0.2, 1);box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity .075s linear}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}:host(:not([open])){display:none}.mdc-menu-surface{z-index:8;z-index:var(--mdc-menu-z-index, 8);min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}`;
|
634
641
|
/**
|
635
642
|
* @license
|
636
643
|
* Copyright 2020 Google LLC
|
@@ -638,9 +645,9 @@ const ot = K`.mdc-menu-surface{display:none;position:absolute;box-sizing:border-
|
|
638
645
|
*/
|
639
646
|
let z = class extends u {
|
640
647
|
};
|
641
|
-
z.styles = [
|
648
|
+
z.styles = [rt];
|
642
649
|
z = o([
|
643
|
-
|
650
|
+
K("mwc-menu-surface")
|
644
651
|
], z);
|
645
652
|
/**
|
646
653
|
* @license
|
@@ -675,7 +682,7 @@ var H = {
|
|
675
682
|
LIST_SELECTOR: ".mdc-list,.mdc-deprecated-list",
|
676
683
|
SELECTED_EVENT: "MDCMenu:selected",
|
677
684
|
SKIP_RESTORE_FOCUS: "data-menu-item-skip-restore-focus"
|
678
|
-
},
|
685
|
+
}, at = {
|
679
686
|
FOCUS_ROOT_INDEX: -1
|
680
687
|
}, C;
|
681
688
|
(function(n) {
|
@@ -703,7 +710,7 @@ var H = {
|
|
703
710
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
704
711
|
* THE SOFTWARE.
|
705
712
|
*/
|
706
|
-
var
|
713
|
+
var O, y, d = {
|
707
714
|
LIST_ITEM_ACTIVATED_CLASS: "mdc-list-item--activated",
|
708
715
|
LIST_ITEM_CLASS: "mdc-list-item",
|
709
716
|
LIST_ITEM_DISABLED_CLASS: "mdc-list-item--disabled",
|
@@ -712,9 +719,9 @@ var g, y, d = {
|
|
712
719
|
LIST_ITEM_PRIMARY_TEXT_CLASS: "mdc-list-item__primary-text",
|
713
720
|
ROOT: "mdc-list"
|
714
721
|
};
|
715
|
-
|
716
|
-
var
|
717
|
-
"" + d.LIST_ITEM_CLASS + d.LIST_ITEM_CLASS +
|
722
|
+
O = {}, O["" + d.LIST_ITEM_ACTIVATED_CLASS] = "mdc-list-item--activated", O["" + d.LIST_ITEM_CLASS] = "mdc-list-item", O["" + d.LIST_ITEM_DISABLED_CLASS] = "mdc-list-item--disabled", O["" + d.LIST_ITEM_SELECTED_CLASS] = "mdc-list-item--selected", O["" + d.LIST_ITEM_PRIMARY_TEXT_CLASS] = "mdc-list-item__primary-text", O["" + d.ROOT] = "mdc-list";
|
723
|
+
var x = (y = {}, y["" + d.LIST_ITEM_ACTIVATED_CLASS] = "mdc-deprecated-list-item--activated", y["" + d.LIST_ITEM_CLASS] = "mdc-deprecated-list-item", y["" + d.LIST_ITEM_DISABLED_CLASS] = "mdc-deprecated-list-item--disabled", y["" + d.LIST_ITEM_SELECTED_CLASS] = "mdc-deprecated-list-item--selected", y["" + d.LIST_ITEM_TEXT_CLASS] = "mdc-deprecated-list-item__text", y["" + d.LIST_ITEM_PRIMARY_TEXT_CLASS] = "mdc-deprecated-list-item__primary-text", y["" + d.ROOT] = "mdc-deprecated-list", y);
|
724
|
+
"" + d.LIST_ITEM_CLASS + d.LIST_ITEM_CLASS + x[d.LIST_ITEM_CLASS] + x[d.LIST_ITEM_CLASS], "" + d.LIST_ITEM_CLASS + d.LIST_ITEM_CLASS + d.LIST_ITEM_CLASS + d.LIST_ITEM_CLASS + x[d.LIST_ITEM_CLASS] + x[d.LIST_ITEM_CLASS] + x[d.LIST_ITEM_CLASS] + x[d.LIST_ITEM_CLASS];
|
718
725
|
/**
|
719
726
|
* @license
|
720
727
|
* Copyright 2018 Google Inc.
|
@@ -737,7 +744,7 @@ var R = (y = {}, y["" + d.LIST_ITEM_ACTIVATED_CLASS] = "mdc-deprecated-list-item
|
|
737
744
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
738
745
|
* THE SOFTWARE.
|
739
746
|
*/
|
740
|
-
var
|
747
|
+
var dt = (
|
741
748
|
/** @class */
|
742
749
|
function(n) {
|
743
750
|
U(e, n);
|
@@ -759,7 +766,7 @@ var at = (
|
|
759
766
|
configurable: !0
|
760
767
|
}), Object.defineProperty(e, "numbers", {
|
761
768
|
get: function() {
|
762
|
-
return
|
769
|
+
return at;
|
763
770
|
},
|
764
771
|
enumerable: !1,
|
765
772
|
configurable: !0
|
@@ -857,6 +864,7 @@ var at = (
|
|
857
864
|
}, e;
|
858
865
|
}(W)
|
859
866
|
);
|
867
|
+
const lt = dt;
|
860
868
|
/**
|
861
869
|
* @license
|
862
870
|
* Copyright 2020 Google LLC
|
@@ -864,7 +872,7 @@ var at = (
|
|
864
872
|
*/
|
865
873
|
class h extends j {
|
866
874
|
constructor() {
|
867
|
-
super(...arguments), this.mdcFoundationClass =
|
875
|
+
super(...arguments), this.mdcFoundationClass = lt, this.listElement_ = null, this.anchor = null, this.open = !1, this.quick = !1, this.wrapFocus = !1, this.innerRole = "menu", this.innerAriaLabel = null, this.corner = "TOP_START", this.x = null, this.y = null, this.absolute = !1, this.multi = !1, this.activatable = !1, this.fixed = !1, this.forceGroupSelection = !1, this.fullwidth = !1, this.menuCorner = "START", this.stayOpenOnBodyClick = !1, this.defaultFocus = "LIST_ROOT", this._listUpdateComplete = null;
|
868
876
|
}
|
869
877
|
get listElement() {
|
870
878
|
return this.listElement_ ? this.listElement_ : (this.listElement_ = this.renderRoot.querySelector("mwc-list"), this.listElement_);
|
@@ -1070,10 +1078,10 @@ class h extends j {
|
|
1070
1078
|
}
|
1071
1079
|
}
|
1072
1080
|
o([
|
1073
|
-
|
1081
|
+
D(".mdc-menu")
|
1074
1082
|
], h.prototype, "mdcRoot", void 0);
|
1075
1083
|
o([
|
1076
|
-
|
1084
|
+
D("slot")
|
1077
1085
|
], h.prototype, "slotElement", void 0);
|
1078
1086
|
o([
|
1079
1087
|
a({ type: Object })
|
@@ -1128,17 +1136,10 @@ o([
|
|
1128
1136
|
], h.prototype, "stayOpenOnBodyClick", void 0);
|
1129
1137
|
o([
|
1130
1138
|
a({ type: String }),
|
1131
|
-
|
1139
|
+
g(function(n) {
|
1132
1140
|
this.mdcFoundation && this.mdcFoundation.setDefaultFocusState(C[n]);
|
1133
1141
|
})
|
1134
1142
|
], h.prototype, "defaultFocus", void 0);
|
1135
|
-
/**
|
1136
|
-
* @license
|
1137
|
-
* Copyright 2021 Google LLC
|
1138
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
1139
|
-
*/
|
1140
|
-
const _t = K`mwc-list ::slotted([mwc-list-item]:not([twoline])),mwc-list ::slotted([noninteractive]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}`;
|
1141
1143
|
export {
|
1142
|
-
h as M
|
1143
|
-
_t as s
|
1144
|
+
h as M
|
1144
1145
|
};
|