@covalent/components 9.0.0 → 9.1.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/{_commonjsHelpers-DjF3Plf2.mjs → _commonjsHelpers-HP5nalso.mjs} +2 -2
- package/action-ribbon.js +2 -2
- package/action-ribbon.mjs +24 -24
- package/alert.js +3 -3
- package/alert.mjs +4 -4
- package/app-shell.js +1 -1
- package/app-shell.mjs +6 -6
- package/async-directive-2AOdKBUW.mjs +66 -0
- package/async-directive-DZ3MjSIj.js +5 -0
- package/badge.js +1 -1
- package/badge.mjs +6 -6
- package/{base-element-aUDWLn36.js → base-element-5ZU-p99q.js} +1 -1
- package/{base-element-C-U4OfWx.mjs → base-element-CzNmpVoz.mjs} +1 -1
- package/button.js +1 -1
- package/button.mjs +24 -24
- package/card.js +1 -1
- package/card.mjs +12 -12
- package/check-list-item.js +7 -7
- package/check-list-item.mjs +31 -31
- package/checkbox.js +1 -1
- package/checkbox.mjs +9 -9
- package/{chip-C8L37ovG.mjs → chip-5QP7xPTY.mjs} +6 -6
- package/{chip-BsDYOEFW.js → chip-CitHXhY7.js} +1 -1
- package/chip-set.js +1 -1
- package/chip-set.mjs +114 -114
- package/chip.js +1 -1
- package/chip.mjs +2 -2
- package/circular-progress.js +4 -4
- package/circular-progress.mjs +10 -10
- package/class-map-BHl5MHd7.mjs +36 -0
- package/class-map-PsUYVqvf.js +5 -0
- package/{code-editor-CSH3MdBF.js → code-editor-CCUZsYkN.js} +135 -137
- package/{code-editor-Bshyfjyn.mjs → code-editor-JaW-06cH.mjs} +8151 -8113
- package/code-editor.js +1 -1
- package/code-editor.mjs +2 -2
- package/code-snippet.js +1 -1
- package/code-snippet.mjs +7 -7
- package/{dialog-BoNH4r3n.mjs → dialog-BVmWYLqR.mjs} +194 -194
- package/{dialog-LUOzoMeO.js → dialog-DzaPP3Vt.js} +9 -9
- package/dialog.js +1 -1
- package/dialog.mjs +2 -2
- package/{directive-oAbCiebi.mjs → directive-B76A7YXI.mjs} +4 -4
- package/directive-C_VV3qwo.js +5 -0
- package/directive-helpers-6HCt_-zj.mjs +11 -0
- package/directive-helpers-BnUMbYHh.js +5 -0
- package/drawer.js +1 -1
- package/drawer.mjs +2 -2
- package/empty-state.js +1 -1
- package/empty-state.mjs +7 -7
- package/{event-options-CNykeE2u.mjs → event-options-D44mpm5S.mjs} +1 -1
- package/{event-options-BH8ks-kz.js → event-options-IG-2g8HU.js} +1 -1
- package/expansion-panel-item.js +1 -1
- package/expansion-panel-item.mjs +4 -4
- package/expansion-panel.js +1 -1
- package/expansion-panel.mjs +1 -1
- package/focused-page.js +1 -1
- package/focused-page.mjs +8 -8
- package/form-element--PS8uSRI.js +5 -0
- package/form-element-Dn0Lerng.mjs +50 -0
- package/formfield.js +4 -4
- package/formfield.mjs +13 -13
- package/{foundation-qQ4jzaAu.mjs → foundation-BYhAXCW_.mjs} +17 -15
- package/{foundation-PL3XY-m_.mjs → foundation-D6JHa7Lg.mjs} +4 -4
- package/{foundation-pgmPu2iJ.js → foundation-aT_gy6X8.js} +1 -1
- package/{foundation-CySCCTUE.js → foundation-sIsx2I_x.js} +2 -2
- package/full-screen-dialog.js +2 -2
- package/full-screen-dialog.mjs +12 -12
- package/{html-DrhRpsz9.mjs → html-DhKW0KfF.mjs} +1 -1
- package/{html-DUGRoHaj.js → html-S7zzCKH0.js} +1 -1
- package/icon/_icon-list.d.ts +4 -0
- package/icon/_icon-list.d.ts.map +1 -0
- package/icon/icon-demo.d.ts +14 -0
- package/icon/icon-demo.d.ts.map +1 -0
- package/icon-button-toggle.js +5 -5
- package/icon-button-toggle.mjs +35 -35
- package/icon-button.js +2 -2
- package/icon-button.mjs +28 -28
- package/icon-check-toggle.js +1 -1
- package/icon-check-toggle.mjs +6 -6
- package/icon-lockup.js +5 -5
- package/icon-lockup.mjs +6 -6
- package/icon-radio-toggle.js +4 -4
- package/icon-radio-toggle.mjs +8 -8
- package/icon.js +1 -1
- package/icon.mjs +14 -14
- package/{if-defined-D8C6ewRn.js → if-defined-B7G84qob.js} +1 -1
- package/{if-defined-BsNkRMMG.mjs → if-defined-DN7whKwy.mjs} +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +10 -1
- package/index.mjs +450 -112
- package/{javascript-DKtDcqDi.mjs → javascript-BtkevR81.mjs} +1 -1
- package/{javascript-54eqLOAw.js → javascript-fH54qAGk.js} +1 -1
- package/linear-progress.js +7 -7
- package/linear-progress.mjs +17 -17
- package/{list-item-BZVW1fmJ.js → list-item-BQ6SDTvW.js} +1 -1
- package/{list-item-DCzzLVZh.mjs → list-item-DuBDCnZ-.mjs} +1 -1
- package/list-item.js +2 -2
- package/list-item.mjs +16 -16
- package/list.js +1 -1
- package/list.mjs +16 -16
- package/menu.js +2 -2
- package/menu.mjs +11 -11
- package/{mwc-checkbox.css-Cd0yCOHu.js → mwc-checkbox.css-BV3dyB4C.js} +1 -1
- package/{mwc-checkbox.css-MBOzkrQg.mjs → mwc-checkbox.css-CNoj0V14.mjs} +31 -31
- package/{mwc-drawer-base-Dgs9327G.mjs → mwc-drawer-base-A-4s_ZnE.mjs} +10 -10
- package/{mwc-drawer-base-D-48lqfn.js → mwc-drawer-base-DWczEPvb.js} +3 -3
- package/{mwc-icon-BZRds8SY.mjs → mwc-icon-DTCUplqR.mjs} +2 -2
- package/{mwc-icon-BumH81hp.js → mwc-icon-Xgr698ax.js} +1 -1
- package/{mwc-icon-button.css-DJMY7U7e.mjs → mwc-icon-button.css-DJiDOS0_.mjs} +1 -1
- package/{mwc-icon-button.css-BtgKBOl3.js → mwc-icon-button.css-DOVWWyjA.js} +1 -1
- package/{mwc-line-ripple-directive-zhm5Zc8i.mjs → mwc-line-ripple-directive-TO37-41n.mjs} +34 -34
- package/{mwc-line-ripple-directive-DvPWr3ER.js → mwc-line-ripple-directive-r80jluoU.js} +4 -4
- package/{mwc-list-item.css-CtRq5wSu.js → mwc-list-item.css-CO1JlA8e.js} +10 -10
- package/{mwc-list-item.css-g34xqhLC.mjs → mwc-list-item.css-Cg9onxQ-.mjs} +11 -11
- package/{mwc-list.css-DFOdJyFB.mjs → mwc-list.css-C_-DVEme.mjs} +102 -102
- package/{mwc-list.css-CaMJWsDp.js → mwc-list.css-Deg9oBaO.js} +1 -1
- package/{mwc-menu.css-pxcxlTrh.js → mwc-menu.css-Dvr-f3_T.js} +18 -18
- package/{mwc-menu.css-BEiPghgR.mjs → mwc-menu.css-qpZxKN-g.mjs} +306 -306
- package/{mwc-radio.css-XRx0vL1k.mjs → mwc-radio.css-BiHC1R8I.mjs} +11 -11
- package/{mwc-radio.css-CVMtIq-L.js → mwc-radio.css-DjO4Rn44.js} +1 -1
- package/{mwc-slider.css-WrkrmqkL.js → mwc-slider.css-DFOaS04S.js} +13 -13
- package/{mwc-slider.css-2Bqk43z7.mjs → mwc-slider.css-Deh1__Ar.mjs} +290 -279
- package/{mwc-tab.css-B9yQpkYf.mjs → mwc-tab.css-2UrPKkNg.mjs} +34 -34
- package/{mwc-tab.css-CgdXMZBB.js → mwc-tab.css-sq5suZKe.js} +11 -11
- package/{mwc-top-app-bar-base-B0EW9eNk.mjs → mwc-top-app-bar-base-BIZGhVtM.mjs} +40 -40
- package/{mwc-top-app-bar-base-CSXRBOiX.js → mwc-top-app-bar-base-DUdOcIjS.js} +7 -7
- package/nav-list-item.js +3 -3
- package/nav-list-item.mjs +18 -18
- package/notebook-cell.js +1 -1
- package/notebook-cell.mjs +25 -25
- package/package.json +6 -1
- package/{property-DYTC_2-m.js → property-BRKnMYJe.js} +1 -1
- package/{python-CEXbOLXn.mjs → python-BkZeja0y.mjs} +1 -1
- package/{python-CzGtlN7c.js → python-C2_KOh3o.js} +1 -1
- package/query-BvlE-gMJ.js +5 -0
- package/query-DSO61t36.mjs +15 -0
- package/query-assigned-elements-BQszEgac.js +31 -0
- package/query-assigned-elements-DhyCP_2z.mjs +591 -0
- package/query-assigned-nodes-9DFnkxV8.js +5 -0
- package/query-assigned-nodes-B-jCihdA.mjs +17 -0
- package/radio-list-item.js +5 -5
- package/radio-list-item.mjs +24 -24
- package/radio.js +1 -1
- package/radio.mjs +9 -9
- package/{ripple-handlers-i3WPEBiO.mjs → ripple-handlers-BAdg-fJB.mjs} +72 -72
- package/{ripple-handlers-CzfSBjWo.js → ripple-handlers-BDmOLx8c.js} +5 -5
- package/select.js +12 -12
- package/select.mjs +119 -118
- package/side-sheet.js +1 -1
- package/side-sheet.mjs +8 -8
- package/slider-range.js +7 -7
- package/slider-range.mjs +39 -39
- package/slider.js +1 -1
- package/slider.mjs +18 -18
- package/snackbar.js +8 -8
- package/snackbar.mjs +21 -21
- package/{state-DaD9o2aK.mjs → state-B_tK3mBm.mjs} +2 -2
- package/{state-C3HoXfoa.js → state-Csv4sdJA.js} +1 -1
- package/status-dialog.js +1 -1
- package/status-dialog.mjs +7 -7
- package/status-header-item.js +1 -1
- package/status-header-item.mjs +18 -18
- package/status-header.js +1 -1
- package/status-header.mjs +2 -2
- package/style-map-3QfsA_1O.js +5 -0
- package/style-map-QxIETvrs.mjs +42 -0
- package/switch.js +6 -6
- package/switch.mjs +40 -40
- package/tab-bar.js +5 -5
- package/tab-bar.mjs +93 -93
- package/tab.js +1 -1
- package/tab.mjs +5 -5
- package/text-lockup.js +1 -1
- package/text-lockup.mjs +11 -11
- package/textarea.js +6 -6
- package/textarea.mjs +22 -22
- package/{textfield-BwmiygD8.js → textfield-CO6CFCCn.js} +30 -30
- package/{textfield-C6sUZIeA.mjs → textfield-WSgoABZn.mjs} +103 -103
- package/textfield.js +2 -2
- package/textfield.mjs +9 -9
- package/toolbar.js +1 -1
- package/toolbar.mjs +2 -2
- package/tooltip.js +3 -3
- package/tooltip.mjs +56 -55
- package/{top-app-bar-4SA3DjLX.mjs → top-app-bar-BvXNELe9.mjs} +1 -1
- package/{top-app-bar-CGjBuyiD.js → top-app-bar-Cvp1aN42.js} +1 -1
- package/top-app-bar-fixed.js +8 -8
- package/top-app-bar-fixed.mjs +35 -35
- package/top-app-bar.js +1 -1
- package/top-app-bar.mjs +12 -12
- package/tree-list-item.js +1 -1
- package/tree-list-item.mjs +5 -5
- package/tree-list.js +1 -1
- package/tree-list.mjs +5 -5
- package/tslib.es6-CISSdiiH.mjs +75 -0
- package/{typescript-DotYReBq.mjs → typescript-BUN0g4m9.mjs} +1 -1
- package/{typescript-D_zVB3gH.js → typescript-DzngJr4U.js} +1 -1
- package/typography.js +1 -1
- package/typography.mjs +10 -10
- package/async-directive-Cx1B9M5C.mjs +0 -66
- package/async-directive-y3fBDDSk.js +0 -5
- package/class-map-C1SJpero.mjs +0 -36
- package/class-map-C8G1ALWK.js +0 -5
- package/directive-C7oCP5Bh.js +0 -5
- package/directive-helpers-CllkNDrI.mjs +0 -11
- package/directive-helpers-Duf3sfLn.js +0 -5
- package/form-element-CxSqbssX.mjs +0 -50
- package/form-element-DwqUbs65.js +0 -5
- package/query-BBDQWsft.mjs +0 -15
- package/query-BxDs8ftQ.js +0 -5
- package/query-assigned-elements-4CafVNR8.js +0 -31
- package/query-assigned-elements-DCt2xozt.mjs +0 -591
- package/query-assigned-nodes-B9zBfkh6.mjs +0 -17
- package/query-assigned-nodes-CckKHm2z.js +0 -5
- package/style-map-BJBXlSqn.js +0 -5
- package/style-map-CCsABR5m.mjs +0 -42
- package/tslib.es6-pPsSiLLK.mjs +0 -75
@@ -1,24 +1,24 @@
|
|
1
|
-
import {
|
2
|
-
import { e as
|
3
|
-
import {
|
4
|
-
import { B as
|
5
|
-
import { o as
|
6
|
-
import { a as
|
1
|
+
import { b as o, _ as U, a as B, c as q } from "./tslib.es6-CISSdiiH.mjs";
|
2
|
+
import { e as V, x as F, i as K } from "./query-assigned-elements-DhyCP_2z.mjs";
|
3
|
+
import { s as Q, L as Y } from "./mwc-list.css-C_-DVEme.mjs";
|
4
|
+
import { B as j } from "./base-element-CzNmpVoz.mjs";
|
5
|
+
import { o as I } from "./observer-DQ8OfVDQ.mjs";
|
6
|
+
import { a as Z, b as J, d as ee } from "./utils-Dr5MegQq.mjs";
|
7
7
|
import { n as a } from "./property-DJzm_oB9.mjs";
|
8
|
-
import { t as b } from "./state-
|
9
|
-
import { i as N } from "./query-
|
10
|
-
import { o as
|
11
|
-
import { o as
|
8
|
+
import { t as b } from "./state-B_tK3mBm.mjs";
|
9
|
+
import { i as N } from "./query-DSO61t36.mjs";
|
10
|
+
import { o as P } from "./class-map-BHl5MHd7.mjs";
|
11
|
+
import { o as te } from "./style-map-QxIETvrs.mjs";
|
12
12
|
/**
|
13
13
|
* @license
|
14
14
|
* Copyright 2020 Google LLC
|
15
15
|
* SPDX-License-Identifier: Apache-2.0
|
16
16
|
*/
|
17
|
-
let k = class extends
|
17
|
+
let k = class extends Y {
|
18
18
|
};
|
19
|
-
k.styles = [
|
19
|
+
k.styles = [Q];
|
20
20
|
k = o([
|
21
|
-
|
21
|
+
V("mwc-list")
|
22
22
|
], k);
|
23
23
|
/**
|
24
24
|
* @license
|
@@ -42,7 +42,7 @@ k = o([
|
|
42
42
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
43
43
|
* THE SOFTWARE.
|
44
44
|
*/
|
45
|
-
var
|
45
|
+
var ie = {
|
46
46
|
ANCHOR: "mdc-menu-surface--anchor",
|
47
47
|
ANIMATING_CLOSED: "mdc-menu-surface--animating-closed",
|
48
48
|
ANIMATING_OPEN: "mdc-menu-surface--animating-open",
|
@@ -50,7 +50,7 @@ var it = {
|
|
50
50
|
IS_OPEN_BELOW: "mdc-menu-surface--is-open-below",
|
51
51
|
OPEN: "mdc-menu-surface--open",
|
52
52
|
ROOT: "mdc-menu-surface"
|
53
|
-
},
|
53
|
+
}, ne = {
|
54
54
|
CLOSED_EVENT: "MDCMenuSurface:closed",
|
55
55
|
CLOSING_EVENT: "MDCMenuSurface:closing",
|
56
56
|
OPENED_EVENT: "MDCMenuSurface:opened",
|
@@ -63,7 +63,7 @@ var it = {
|
|
63
63
|
"textarea:not(:disabled)",
|
64
64
|
'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'
|
65
65
|
].join(", ")
|
66
|
-
},
|
66
|
+
}, v = {
|
67
67
|
/** Total duration of menu-surface open animation. */
|
68
68
|
TRANSITION_OPEN_DURATION: 120,
|
69
69
|
/** Total duration of menu-surface close animation. */
|
@@ -85,10 +85,10 @@ var it = {
|
|
85
85
|
* the restored focus would be lost.
|
86
86
|
*/
|
87
87
|
TOUCH_EVENT_WAIT_MS: 30
|
88
|
-
},
|
88
|
+
}, u;
|
89
89
|
(function(n) {
|
90
90
|
n[n.BOTTOM = 1] = "BOTTOM", n[n.CENTER = 2] = "CENTER", n[n.RIGHT = 4] = "RIGHT", n[n.FLIP_RTL = 8] = "FLIP_RTL";
|
91
|
-
})(
|
91
|
+
})(u || (u = {}));
|
92
92
|
var m;
|
93
93
|
(function(n) {
|
94
94
|
n[n.TOP_LEFT = 0] = "TOP_LEFT", n[n.TOP_RIGHT = 4] = "TOP_RIGHT", n[n.BOTTOM_LEFT = 1] = "BOTTOM_LEFT", n[n.BOTTOM_RIGHT = 5] = "BOTTOM_RIGHT", n[n.TOP_START = 8] = "TOP_START", n[n.TOP_END = 12] = "TOP_END", n[n.BOTTOM_START = 9] = "BOTTOM_START", n[n.BOTTOM_END = 13] = "BOTTOM_END";
|
@@ -115,11 +115,11 @@ var m;
|
|
115
115
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
116
116
|
* THE SOFTWARE.
|
117
117
|
*/
|
118
|
-
var
|
118
|
+
var W = (
|
119
119
|
/** @class */
|
120
120
|
function() {
|
121
|
-
function n(
|
122
|
-
|
121
|
+
function n(t) {
|
122
|
+
t === void 0 && (t = {}), this.adapter = t;
|
123
123
|
}
|
124
124
|
return Object.defineProperty(n, "cssClasses", {
|
125
125
|
get: function() {
|
@@ -172,39 +172,39 @@ var K = (
|
|
172
172
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
173
173
|
* THE SOFTWARE.
|
174
174
|
*/
|
175
|
-
var
|
175
|
+
var X = (
|
176
176
|
/** @class */
|
177
177
|
function(n) {
|
178
|
-
U(
|
179
|
-
function e
|
180
|
-
var i = n.call(this, B(B({},
|
178
|
+
U(t, n);
|
179
|
+
function t(e) {
|
180
|
+
var i = n.call(this, B(B({}, t.defaultAdapter), e)) || this;
|
181
181
|
return i.isSurfaceOpen = !1, i.isQuickOpen = !1, i.isHoistedElement = !1, i.isFixedPosition = !1, i.isHorizontallyCenteredOnViewport = !1, i.maxHeight = 0, i.openBottomBias = 0, i.openAnimationEndTimerId = 0, i.closeAnimationEndTimerId = 0, i.animationRequestId = 0, i.anchorCorner = m.TOP_START, i.originCorner = m.TOP_START, i.anchorMargin = { top: 0, right: 0, bottom: 0, left: 0 }, i.position = { x: 0, y: 0 }, i;
|
182
182
|
}
|
183
|
-
return Object.defineProperty(
|
183
|
+
return Object.defineProperty(t, "cssClasses", {
|
184
184
|
get: function() {
|
185
|
-
return
|
185
|
+
return ie;
|
186
186
|
},
|
187
187
|
enumerable: !1,
|
188
188
|
configurable: !0
|
189
|
-
}), Object.defineProperty(
|
189
|
+
}), Object.defineProperty(t, "strings", {
|
190
190
|
get: function() {
|
191
|
-
return
|
191
|
+
return ne;
|
192
192
|
},
|
193
193
|
enumerable: !1,
|
194
194
|
configurable: !0
|
195
|
-
}), Object.defineProperty(
|
195
|
+
}), Object.defineProperty(t, "numbers", {
|
196
196
|
get: function() {
|
197
|
-
return
|
197
|
+
return v;
|
198
198
|
},
|
199
199
|
enumerable: !1,
|
200
200
|
configurable: !0
|
201
|
-
}), Object.defineProperty(
|
201
|
+
}), Object.defineProperty(t, "Corner", {
|
202
202
|
get: function() {
|
203
203
|
return m;
|
204
204
|
},
|
205
205
|
enumerable: !1,
|
206
206
|
configurable: !0
|
207
|
-
}), Object.defineProperty(
|
207
|
+
}), Object.defineProperty(t, "defaultAdapter", {
|
208
208
|
/**
|
209
209
|
* @see {@link MDCMenuSurfaceAdapter} for typing information on parameters and return types.
|
210
210
|
*/
|
@@ -266,71 +266,71 @@ var q = (
|
|
266
266
|
},
|
267
267
|
enumerable: !1,
|
268
268
|
configurable: !0
|
269
|
-
}),
|
270
|
-
var
|
269
|
+
}), t.prototype.init = function() {
|
270
|
+
var e = t.cssClasses, i = e.ROOT, s = e.OPEN;
|
271
271
|
if (!this.adapter.hasClass(i))
|
272
272
|
throw new Error(i + " class required in root element.");
|
273
273
|
this.adapter.hasClass(s) && (this.isSurfaceOpen = !0);
|
274
|
-
},
|
274
|
+
}, t.prototype.destroy = function() {
|
275
275
|
clearTimeout(this.openAnimationEndTimerId), clearTimeout(this.closeAnimationEndTimerId), cancelAnimationFrame(this.animationRequestId);
|
276
|
-
},
|
277
|
-
this.anchorCorner =
|
278
|
-
},
|
279
|
-
this.originCorner = this.originCorner ^
|
280
|
-
},
|
281
|
-
this.anchorMargin.top =
|
282
|
-
},
|
283
|
-
this.isHoistedElement =
|
284
|
-
},
|
285
|
-
this.isFixedPosition =
|
286
|
-
},
|
276
|
+
}, t.prototype.setAnchorCorner = function(e) {
|
277
|
+
this.anchorCorner = e;
|
278
|
+
}, t.prototype.flipCornerHorizontally = function() {
|
279
|
+
this.originCorner = this.originCorner ^ u.RIGHT;
|
280
|
+
}, t.prototype.setAnchorMargin = function(e) {
|
281
|
+
this.anchorMargin.top = e.top || 0, this.anchorMargin.right = e.right || 0, this.anchorMargin.bottom = e.bottom || 0, this.anchorMargin.left = e.left || 0;
|
282
|
+
}, t.prototype.setIsHoisted = function(e) {
|
283
|
+
this.isHoistedElement = e;
|
284
|
+
}, t.prototype.setFixedPosition = function(e) {
|
285
|
+
this.isFixedPosition = e;
|
286
|
+
}, t.prototype.isFixed = function() {
|
287
287
|
return this.isFixedPosition;
|
288
|
-
},
|
289
|
-
this.position.x = this.isFinite(
|
290
|
-
},
|
291
|
-
this.isHorizontallyCenteredOnViewport =
|
292
|
-
},
|
293
|
-
this.isQuickOpen =
|
294
|
-
},
|
295
|
-
this.maxHeight =
|
296
|
-
},
|
297
|
-
this.openBottomBias =
|
298
|
-
},
|
288
|
+
}, t.prototype.setAbsolutePosition = function(e, i) {
|
289
|
+
this.position.x = this.isFinite(e) ? e : 0, this.position.y = this.isFinite(i) ? i : 0;
|
290
|
+
}, t.prototype.setIsHorizontallyCenteredOnViewport = function(e) {
|
291
|
+
this.isHorizontallyCenteredOnViewport = e;
|
292
|
+
}, t.prototype.setQuickOpen = function(e) {
|
293
|
+
this.isQuickOpen = e;
|
294
|
+
}, t.prototype.setMaxHeight = function(e) {
|
295
|
+
this.maxHeight = e;
|
296
|
+
}, t.prototype.setOpenBottomBias = function(e) {
|
297
|
+
this.openBottomBias = e;
|
298
|
+
}, t.prototype.isOpen = function() {
|
299
299
|
return this.isSurfaceOpen;
|
300
|
-
},
|
301
|
-
var
|
302
|
-
this.isSurfaceOpen || (this.adapter.notifyOpening(), this.adapter.saveFocus(), this.isQuickOpen ? (this.isSurfaceOpen = !0, this.adapter.addClass(
|
303
|
-
|
304
|
-
|
305
|
-
},
|
300
|
+
}, t.prototype.open = function() {
|
301
|
+
var e = this;
|
302
|
+
this.isSurfaceOpen || (this.adapter.notifyOpening(), this.adapter.saveFocus(), this.isQuickOpen ? (this.isSurfaceOpen = !0, this.adapter.addClass(t.cssClasses.OPEN), this.dimensions = this.adapter.getInnerDimensions(), this.autoposition(), this.adapter.notifyOpen()) : (this.adapter.addClass(t.cssClasses.ANIMATING_OPEN), this.animationRequestId = requestAnimationFrame(function() {
|
303
|
+
e.dimensions = e.adapter.getInnerDimensions(), e.autoposition(), e.adapter.addClass(t.cssClasses.OPEN), e.openAnimationEndTimerId = setTimeout(function() {
|
304
|
+
e.openAnimationEndTimerId = 0, e.adapter.removeClass(t.cssClasses.ANIMATING_OPEN), e.adapter.notifyOpen();
|
305
|
+
}, v.TRANSITION_OPEN_DURATION);
|
306
306
|
}), this.isSurfaceOpen = !0));
|
307
|
-
},
|
307
|
+
}, t.prototype.close = function(e) {
|
308
308
|
var i = this;
|
309
|
-
if (
|
309
|
+
if (e === void 0 && (e = !1), !!this.isSurfaceOpen) {
|
310
310
|
if (this.adapter.notifyClosing(), this.isQuickOpen) {
|
311
|
-
this.isSurfaceOpen = !1,
|
311
|
+
this.isSurfaceOpen = !1, e || this.maybeRestoreFocus(), this.adapter.removeClass(t.cssClasses.OPEN), this.adapter.removeClass(t.cssClasses.IS_OPEN_BELOW), this.adapter.notifyClose();
|
312
312
|
return;
|
313
313
|
}
|
314
|
-
this.adapter.addClass(
|
315
|
-
i.adapter.removeClass(
|
316
|
-
i.closeAnimationEndTimerId = 0, i.adapter.removeClass(
|
317
|
-
},
|
318
|
-
}), this.isSurfaceOpen = !1,
|
314
|
+
this.adapter.addClass(t.cssClasses.ANIMATING_CLOSED), requestAnimationFrame(function() {
|
315
|
+
i.adapter.removeClass(t.cssClasses.OPEN), i.adapter.removeClass(t.cssClasses.IS_OPEN_BELOW), i.closeAnimationEndTimerId = setTimeout(function() {
|
316
|
+
i.closeAnimationEndTimerId = 0, i.adapter.removeClass(t.cssClasses.ANIMATING_CLOSED), i.adapter.notifyClose();
|
317
|
+
}, v.TRANSITION_CLOSE_DURATION);
|
318
|
+
}), this.isSurfaceOpen = !1, e || this.maybeRestoreFocus();
|
319
319
|
}
|
320
|
-
},
|
321
|
-
var i =
|
320
|
+
}, t.prototype.handleBodyClick = function(e) {
|
321
|
+
var i = e.target;
|
322
322
|
this.adapter.isElementInContainer(i) || this.close();
|
323
|
-
},
|
324
|
-
var i =
|
323
|
+
}, t.prototype.handleKeydown = function(e) {
|
324
|
+
var i = e.keyCode, s = e.key, r = s === "Escape" || i === 27;
|
325
325
|
r && this.close();
|
326
|
-
},
|
327
|
-
var
|
326
|
+
}, t.prototype.autoposition = function() {
|
327
|
+
var e;
|
328
328
|
this.measurements = this.getAutoLayoutmeasurements();
|
329
|
-
var i = this.getoriginCorner(), s = this.getMenuSurfaceMaxHeight(i), r = this.hasBit(i,
|
330
|
-
|
331
|
-
},
|
332
|
-
var
|
333
|
-
return
|
329
|
+
var i = this.getoriginCorner(), s = this.getMenuSurfaceMaxHeight(i), r = this.hasBit(i, u.BOTTOM) ? "bottom" : "top", l = this.hasBit(i, u.RIGHT) ? "right" : "left", p = this.getHorizontalOriginOffset(i), M = this.getVerticalOriginOffset(i), S = this.measurements, _ = S.anchorSize, O = S.surfaceSize, f = (e = {}, e[l] = p, e[r] = M, e);
|
330
|
+
_.width / O.width > v.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO && (l = "center"), (this.isHoistedElement || this.isFixedPosition) && this.adjustPositionForHoistedElement(f), this.adapter.setTransformOrigin(l + " " + r), this.adapter.setPosition(f), this.adapter.setMaxHeight(s ? s + "px" : ""), this.hasBit(i, u.BOTTOM) || this.adapter.addClass(t.cssClasses.IS_OPEN_BELOW);
|
331
|
+
}, t.prototype.getAutoLayoutmeasurements = function() {
|
332
|
+
var e = this.adapter.getAnchorDimensions(), i = this.adapter.getBodyDimensions(), s = this.adapter.getWindowDimensions(), r = this.adapter.getWindowScroll();
|
333
|
+
return e || (e = {
|
334
334
|
top: this.position.y,
|
335
335
|
right: this.position.x,
|
336
336
|
bottom: this.position.y,
|
@@ -338,56 +338,56 @@ var q = (
|
|
338
338
|
width: 0,
|
339
339
|
height: 0
|
340
340
|
}), {
|
341
|
-
anchorSize:
|
341
|
+
anchorSize: e,
|
342
342
|
bodySize: i,
|
343
343
|
surfaceSize: this.dimensions,
|
344
344
|
viewportDistance: {
|
345
345
|
// tslint:disable:object-literal-sort-keys Positional properties are more readable when they're grouped together
|
346
|
-
top:
|
347
|
-
right: s.width -
|
348
|
-
bottom: s.height -
|
349
|
-
left:
|
346
|
+
top: e.top,
|
347
|
+
right: s.width - e.right,
|
348
|
+
bottom: s.height - e.bottom,
|
349
|
+
left: e.left
|
350
350
|
// tslint:enable:object-literal-sort-keys
|
351
351
|
},
|
352
352
|
viewportSize: s,
|
353
353
|
windowScroll: r
|
354
354
|
};
|
355
|
-
},
|
356
|
-
var
|
357
|
-
|
358
|
-
var O =
|
359
|
-
!O &&
|
360
|
-
var f = this.adapter.isRtl(), T = this.hasBit(this.anchorCorner,
|
355
|
+
}, t.prototype.getoriginCorner = function() {
|
356
|
+
var e = this.originCorner, i = this.measurements, s = i.viewportDistance, r = i.anchorSize, l = i.surfaceSize, p = t.numbers.MARGIN_TO_EDGE, M = this.hasBit(this.anchorCorner, u.BOTTOM), S, _;
|
357
|
+
M ? (S = s.top - p + this.anchorMargin.bottom, _ = s.bottom - p - this.anchorMargin.bottom) : (S = s.top - p + this.anchorMargin.top, _ = s.bottom - p + r.height - this.anchorMargin.top);
|
358
|
+
var O = _ - l.height > 0;
|
359
|
+
!O && S > _ + this.openBottomBias && (e = this.setBit(e, u.BOTTOM));
|
360
|
+
var f = this.adapter.isRtl(), T = this.hasBit(this.anchorCorner, u.FLIP_RTL), E = this.hasBit(this.anchorCorner, u.RIGHT) || this.hasBit(e, u.RIGHT), A = !1;
|
361
361
|
f && T ? A = !E : A = E;
|
362
|
-
var
|
363
|
-
A ? (
|
364
|
-
var D =
|
365
|
-
return G && $ && f || !D && $ ?
|
366
|
-
},
|
362
|
+
var x, w;
|
363
|
+
A ? (x = s.left + r.width + this.anchorMargin.right, w = s.right - this.anchorMargin.right) : (x = s.left + this.anchorMargin.left, w = s.right + r.width - this.anchorMargin.left);
|
364
|
+
var D = x - l.width > 0, G = w - l.width > 0, $ = this.hasBit(e, u.FLIP_RTL) && this.hasBit(e, u.RIGHT);
|
365
|
+
return G && $ && f || !D && $ ? e = this.unsetBit(e, u.RIGHT) : (D && A && f || D && !A && E || !G && x >= w) && (e = this.setBit(e, u.RIGHT)), e;
|
366
|
+
}, t.prototype.getMenuSurfaceMaxHeight = function(e) {
|
367
367
|
if (this.maxHeight > 0)
|
368
368
|
return this.maxHeight;
|
369
|
-
var i = this.measurements.viewportDistance, s = 0, r = this.hasBit(
|
369
|
+
var i = this.measurements.viewportDistance, s = 0, r = this.hasBit(e, u.BOTTOM), l = this.hasBit(this.anchorCorner, u.BOTTOM), p = t.numbers.MARGIN_TO_EDGE;
|
370
370
|
return r ? (s = i.top + this.anchorMargin.top - p, l || (s += this.measurements.anchorSize.height)) : (s = i.bottom - this.anchorMargin.bottom + this.measurements.anchorSize.height - p, l && (s -= this.measurements.anchorSize.height)), s;
|
371
|
-
},
|
372
|
-
var i = this.measurements.anchorSize, s = this.hasBit(
|
371
|
+
}, t.prototype.getHorizontalOriginOffset = function(e) {
|
372
|
+
var i = this.measurements.anchorSize, s = this.hasBit(e, u.RIGHT), r = this.hasBit(this.anchorCorner, u.RIGHT);
|
373
373
|
if (s) {
|
374
374
|
var l = r ? i.width - this.anchorMargin.left : this.anchorMargin.right;
|
375
375
|
return this.isHoistedElement || this.isFixedPosition ? l - (this.measurements.viewportSize.width - this.measurements.bodySize.width) : l;
|
376
376
|
}
|
377
377
|
return r ? i.width - this.anchorMargin.right : this.anchorMargin.left;
|
378
|
-
},
|
379
|
-
var i = this.measurements.anchorSize, s = this.hasBit(
|
378
|
+
}, t.prototype.getVerticalOriginOffset = function(e) {
|
379
|
+
var i = this.measurements.anchorSize, s = this.hasBit(e, u.BOTTOM), r = this.hasBit(this.anchorCorner, u.BOTTOM), l = 0;
|
380
380
|
return s ? l = r ? i.height - this.anchorMargin.top : -this.anchorMargin.bottom : l = r ? i.height + this.anchorMargin.bottom : this.anchorMargin.top, l;
|
381
|
-
},
|
382
|
-
var i, s, r = this.measurements, l = r.windowScroll, p = r.viewportDistance,
|
381
|
+
}, t.prototype.adjustPositionForHoistedElement = function(e) {
|
382
|
+
var i, s, r = this.measurements, l = r.windowScroll, p = r.viewportDistance, M = r.surfaceSize, S = r.viewportSize, _ = Object.keys(e);
|
383
383
|
try {
|
384
|
-
for (var O =
|
385
|
-
var T = f.value, E =
|
384
|
+
for (var O = q(_), f = O.next(); !f.done; f = O.next()) {
|
385
|
+
var T = f.value, E = e[T] || 0;
|
386
386
|
if (this.isHorizontallyCenteredOnViewport && (T === "left" || T === "right")) {
|
387
|
-
|
387
|
+
e[T] = (S.width - M.width) / 2;
|
388
388
|
continue;
|
389
389
|
}
|
390
|
-
E += p[T], this.isFixedPosition || (T === "top" ? E += l.y : T === "bottom" ? E -= l.y : T === "left" ? E += l.x : E -= l.x),
|
390
|
+
E += p[T], this.isFixedPosition || (T === "top" ? E += l.y : T === "bottom" ? E -= l.y : T === "left" ? E += l.x : E -= l.x), e[T] = E;
|
391
391
|
}
|
392
392
|
} catch (A) {
|
393
393
|
i = { error: A };
|
@@ -398,28 +398,28 @@ var q = (
|
|
398
398
|
if (i) throw i.error;
|
399
399
|
}
|
400
400
|
}
|
401
|
-
},
|
402
|
-
var
|
401
|
+
}, t.prototype.maybeRestoreFocus = function() {
|
402
|
+
var e = this, i = this.adapter.isFocused(), s = this.adapter.getOwnerDocument ? this.adapter.getOwnerDocument() : document, r = s.activeElement && this.adapter.isElementInContainer(s.activeElement);
|
403
403
|
(i || r) && setTimeout(function() {
|
404
|
-
|
405
|
-
},
|
406
|
-
},
|
407
|
-
return !!(
|
408
|
-
},
|
409
|
-
return
|
410
|
-
},
|
411
|
-
return
|
412
|
-
},
|
413
|
-
return typeof
|
414
|
-
},
|
415
|
-
}(
|
404
|
+
e.adapter.restoreFocus();
|
405
|
+
}, v.TOUCH_EVENT_WAIT_MS);
|
406
|
+
}, t.prototype.hasBit = function(e, i) {
|
407
|
+
return !!(e & i);
|
408
|
+
}, t.prototype.setBit = function(e, i) {
|
409
|
+
return e | i;
|
410
|
+
}, t.prototype.unsetBit = function(e, i) {
|
411
|
+
return e ^ i;
|
412
|
+
}, t.prototype.isFinite = function(e) {
|
413
|
+
return typeof e == "number" && isFinite(e);
|
414
|
+
}, t;
|
415
|
+
}(W)
|
416
416
|
);
|
417
417
|
/**
|
418
418
|
* @license
|
419
419
|
* Copyright 2020 Google LLC
|
420
420
|
* SPDX-License-Identifier: Apache-2.0
|
421
421
|
*/
|
422
|
-
const
|
422
|
+
const se = {
|
423
423
|
TOP_LEFT: m.TOP_LEFT,
|
424
424
|
TOP_RIGHT: m.TOP_RIGHT,
|
425
425
|
BOTTOM_LEFT: m.BOTTOM_LEFT,
|
@@ -429,20 +429,20 @@ const st = {
|
|
429
429
|
BOTTOM_START: m.BOTTOM_START,
|
430
430
|
BOTTOM_END: m.BOTTOM_END
|
431
431
|
};
|
432
|
-
class
|
432
|
+
class c extends j {
|
433
433
|
constructor() {
|
434
|
-
super(...arguments), this.mdcFoundationClass =
|
434
|
+
super(...arguments), this.mdcFoundationClass = X, 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 = () => {
|
435
435
|
};
|
436
436
|
}
|
437
437
|
render() {
|
438
438
|
return this.renderSurface();
|
439
439
|
}
|
440
440
|
renderSurface() {
|
441
|
-
const
|
441
|
+
const t = this.getRootClasses(), e = this.getRootStyles();
|
442
442
|
return F`
|
443
443
|
<div
|
444
|
-
class=${
|
445
|
-
style="${
|
444
|
+
class=${P(t)}
|
445
|
+
style="${te(e)}"
|
446
446
|
@keydown=${this.onKeydown}
|
447
447
|
@opened=${this.registerBodyClick}
|
448
448
|
@closed=${this.deregisterBodyClick}>
|
@@ -470,31 +470,31 @@ class u extends W {
|
|
470
470
|
return F`<slot></slot>`;
|
471
471
|
}
|
472
472
|
createAdapter() {
|
473
|
-
return Object.assign(Object.assign({},
|
474
|
-
const
|
475
|
-
this.open = !1, this.mdcRoot.dispatchEvent(
|
473
|
+
return Object.assign(Object.assign({}, Z(this.mdcRoot)), { hasAnchor: () => !!this.anchor, notifyClose: () => {
|
474
|
+
const t = { bubbles: !0, composed: !0 }, e = new CustomEvent("closed", t);
|
475
|
+
this.open = !1, this.mdcRoot.dispatchEvent(e);
|
476
476
|
}, notifyClosing: () => {
|
477
|
-
const
|
478
|
-
this.mdcRoot.dispatchEvent(
|
477
|
+
const t = { bubbles: !0, composed: !0 }, e = new CustomEvent("closing", t);
|
478
|
+
this.mdcRoot.dispatchEvent(e);
|
479
479
|
}, notifyOpen: () => {
|
480
|
-
const
|
481
|
-
this.open = !0, this.mdcRoot.dispatchEvent(
|
480
|
+
const t = { bubbles: !0, composed: !0 }, e = new CustomEvent("opened", t);
|
481
|
+
this.open = !0, this.mdcRoot.dispatchEvent(e);
|
482
482
|
}, notifyOpening: () => {
|
483
|
-
const
|
484
|
-
this.mdcRoot.dispatchEvent(
|
485
|
-
}, isElementInContainer: () => !1, isRtl: () => this.mdcRoot ? getComputedStyle(this.mdcRoot).direction === "rtl" : !1, setTransformOrigin: (
|
486
|
-
this.mdcRoot && (this.styleTransformOrigin =
|
487
|
-
}, isFocused: () =>
|
488
|
-
const
|
489
|
-
|
483
|
+
const t = { bubbles: !0, composed: !0 }, e = new CustomEvent("opening", t);
|
484
|
+
this.mdcRoot.dispatchEvent(e);
|
485
|
+
}, isElementInContainer: () => !1, isRtl: () => this.mdcRoot ? getComputedStyle(this.mdcRoot).direction === "rtl" : !1, setTransformOrigin: (t) => {
|
486
|
+
this.mdcRoot && (this.styleTransformOrigin = t);
|
487
|
+
}, isFocused: () => J(this), saveFocus: () => {
|
488
|
+
const t = ee(), e = t.length;
|
489
|
+
e || (this.previouslyFocused = null), this.previouslyFocused = t[e - 1];
|
490
490
|
}, restoreFocus: () => {
|
491
491
|
this.previouslyFocused && "focus" in this.previouslyFocused && this.previouslyFocused.focus();
|
492
492
|
}, getInnerDimensions: () => {
|
493
|
-
const
|
494
|
-
return
|
493
|
+
const t = this.mdcRoot;
|
494
|
+
return t ? { width: t.offsetWidth, height: t.offsetHeight } : { width: 0, height: 0 };
|
495
495
|
}, getAnchorDimensions: () => {
|
496
|
-
const
|
497
|
-
return
|
496
|
+
const t = this.anchor;
|
497
|
+
return t ? t.getBoundingClientRect() : null;
|
498
498
|
}, getBodyDimensions: () => ({
|
499
499
|
width: document.body.clientWidth,
|
500
500
|
height: document.body.clientHeight
|
@@ -504,19 +504,19 @@ class u extends W {
|
|
504
504
|
}), getWindowScroll: () => ({
|
505
505
|
x: window.pageXOffset,
|
506
506
|
y: window.pageYOffset
|
507
|
-
}), setPosition: (
|
508
|
-
this.mdcRoot && (this.styleLeft = "left" in
|
509
|
-
}, setMaxHeight: async (
|
510
|
-
this.mdcRoot && (this.styleMaxHeight =
|
507
|
+
}), setPosition: (t) => {
|
508
|
+
this.mdcRoot && (this.styleLeft = "left" in t ? `${t.left}px` : "", this.styleRight = "right" in t ? `${t.right}px` : "", this.styleTop = "top" in t ? `${t.top}px` : "", this.styleBottom = "bottom" in t ? `${t.bottom}px` : "");
|
509
|
+
}, setMaxHeight: async (t) => {
|
510
|
+
this.mdcRoot && (this.styleMaxHeight = t, await this.updateComplete, this.styleMaxHeight = `var(--mdc-menu-max-height, ${t})`);
|
511
511
|
} });
|
512
512
|
}
|
513
|
-
onKeydown(
|
514
|
-
this.mdcFoundation && this.mdcFoundation.handleKeydown(
|
513
|
+
onKeydown(t) {
|
514
|
+
this.mdcFoundation && this.mdcFoundation.handleKeydown(t);
|
515
515
|
}
|
516
|
-
onBodyClick(
|
516
|
+
onBodyClick(t) {
|
517
517
|
if (this.stayOpenOnBodyClick)
|
518
518
|
return;
|
519
|
-
|
519
|
+
t.composedPath().indexOf(this) === -1 && this.close();
|
520
520
|
}
|
521
521
|
registerBodyClick() {
|
522
522
|
this.onBodyClickBound = this.onBodyClick.bind(this), document.body.addEventListener("click", this.onBodyClickBound, { passive: !0, capture: !0 });
|
@@ -524,8 +524,8 @@ class u extends W {
|
|
524
524
|
deregisterBodyClick() {
|
525
525
|
document.body.removeEventListener("click", this.onBodyClickBound, { capture: !0 });
|
526
526
|
}
|
527
|
-
onOpenChanged(
|
528
|
-
this.mdcFoundation && (
|
527
|
+
onOpenChanged(t, e) {
|
528
|
+
this.mdcFoundation && (t ? this.mdcFoundation.open() : e !== void 0 && this.mdcFoundation.close());
|
529
529
|
}
|
530
530
|
close() {
|
531
531
|
this.open = !1;
|
@@ -536,110 +536,110 @@ class u extends W {
|
|
536
536
|
}
|
537
537
|
o([
|
538
538
|
N(".mdc-menu-surface")
|
539
|
-
],
|
539
|
+
], c.prototype, "mdcRoot", void 0);
|
540
540
|
o([
|
541
541
|
N("slot")
|
542
|
-
],
|
542
|
+
], c.prototype, "slotElement", void 0);
|
543
543
|
o([
|
544
544
|
a({ type: Boolean }),
|
545
|
-
|
545
|
+
I(function(n) {
|
546
546
|
this.mdcFoundation && !this.fixed && this.mdcFoundation.setIsHoisted(n);
|
547
547
|
})
|
548
|
-
],
|
548
|
+
], c.prototype, "absolute", void 0);
|
549
549
|
o([
|
550
550
|
a({ type: Boolean })
|
551
|
-
],
|
551
|
+
], c.prototype, "fullwidth", void 0);
|
552
552
|
o([
|
553
553
|
a({ type: Boolean }),
|
554
|
-
|
554
|
+
I(function(n) {
|
555
555
|
this.mdcFoundation && !this.absolute && this.mdcFoundation.setFixedPosition(n);
|
556
556
|
})
|
557
|
-
],
|
557
|
+
], c.prototype, "fixed", void 0);
|
558
558
|
o([
|
559
559
|
a({ type: Number }),
|
560
|
-
|
560
|
+
I(function(n) {
|
561
561
|
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 }));
|
562
562
|
})
|
563
|
-
],
|
563
|
+
], c.prototype, "x", void 0);
|
564
564
|
o([
|
565
565
|
a({ type: Number }),
|
566
|
-
|
566
|
+
I(function(n) {
|
567
567
|
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 }));
|
568
568
|
})
|
569
|
-
],
|
569
|
+
], c.prototype, "y", void 0);
|
570
570
|
o([
|
571
571
|
a({ type: Boolean }),
|
572
|
-
|
572
|
+
I(function(n) {
|
573
573
|
this.mdcFoundation && this.mdcFoundation.setQuickOpen(n);
|
574
574
|
})
|
575
|
-
],
|
575
|
+
], c.prototype, "quick", void 0);
|
576
576
|
o([
|
577
577
|
a({ type: Boolean, reflect: !0 }),
|
578
|
-
|
579
|
-
this.onOpenChanged(n,
|
578
|
+
I(function(n, t) {
|
579
|
+
this.onOpenChanged(n, t);
|
580
580
|
})
|
581
|
-
],
|
581
|
+
], c.prototype, "open", void 0);
|
582
582
|
o([
|
583
583
|
a({ type: Boolean })
|
584
|
-
],
|
584
|
+
], c.prototype, "stayOpenOnBodyClick", void 0);
|
585
585
|
o([
|
586
586
|
b(),
|
587
|
-
|
587
|
+
I(function(n) {
|
588
588
|
this.mdcFoundation && (n ? this.mdcFoundation.setAnchorCorner(n) : this.mdcFoundation.setAnchorCorner(n));
|
589
589
|
})
|
590
|
-
],
|
590
|
+
], c.prototype, "bitwiseCorner", void 0);
|
591
591
|
o([
|
592
592
|
a({ type: String }),
|
593
|
-
|
593
|
+
I(function(n) {
|
594
594
|
if (this.mdcFoundation) {
|
595
|
-
const
|
596
|
-
|
595
|
+
const t = n === "START" || n === "END", e = this.previousMenuCorner === null, i = !e && n !== this.previousMenuCorner;
|
596
|
+
t && (i || e && n === "END") && (this.bitwiseCorner = this.bitwiseCorner ^ u.RIGHT, this.mdcFoundation.flipCornerHorizontally(), this.previousMenuCorner = n);
|
597
597
|
}
|
598
598
|
})
|
599
|
-
],
|
599
|
+
], c.prototype, "menuCorner", void 0);
|
600
600
|
o([
|
601
601
|
a({ type: String }),
|
602
|
-
|
602
|
+
I(function(n) {
|
603
603
|
if (this.mdcFoundation && n) {
|
604
|
-
let
|
605
|
-
this.menuCorner === "END" && (
|
604
|
+
let t = se[n];
|
605
|
+
this.menuCorner === "END" && (t = t ^ u.RIGHT), this.bitwiseCorner = t;
|
606
606
|
}
|
607
607
|
})
|
608
|
-
],
|
608
|
+
], c.prototype, "corner", void 0);
|
609
609
|
o([
|
610
610
|
b()
|
611
|
-
],
|
611
|
+
], c.prototype, "styleTop", void 0);
|
612
612
|
o([
|
613
613
|
b()
|
614
|
-
],
|
614
|
+
], c.prototype, "styleLeft", void 0);
|
615
615
|
o([
|
616
616
|
b()
|
617
|
-
],
|
617
|
+
], c.prototype, "styleRight", void 0);
|
618
618
|
o([
|
619
619
|
b()
|
620
|
-
],
|
620
|
+
], c.prototype, "styleBottom", void 0);
|
621
621
|
o([
|
622
622
|
b()
|
623
|
-
],
|
623
|
+
], c.prototype, "styleMaxHeight", void 0);
|
624
624
|
o([
|
625
625
|
b()
|
626
|
-
],
|
626
|
+
], c.prototype, "styleTransformOrigin", void 0);
|
627
627
|
/**
|
628
628
|
* @license
|
629
629
|
* Copyright 2021 Google LLC
|
630
630
|
* SPDX-LIcense-Identifier: Apache-2.0
|
631
631
|
*/
|
632
|
-
const
|
632
|
+
const oe = K`.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)}`;
|
633
633
|
/**
|
634
634
|
* @license
|
635
635
|
* Copyright 2020 Google LLC
|
636
636
|
* SPDX-License-Identifier: Apache-2.0
|
637
637
|
*/
|
638
|
-
let z = class extends
|
638
|
+
let z = class extends c {
|
639
639
|
};
|
640
|
-
z.styles = [
|
640
|
+
z.styles = [oe];
|
641
641
|
z = o([
|
642
|
-
|
642
|
+
V("mwc-menu-surface")
|
643
643
|
], z);
|
644
644
|
/**
|
645
645
|
* @license
|
@@ -663,18 +663,18 @@ z = o([
|
|
663
663
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
664
664
|
* THE SOFTWARE.
|
665
665
|
*/
|
666
|
-
var
|
666
|
+
var H = {
|
667
667
|
MENU_SELECTED_LIST_ITEM: "mdc-menu-item--selected",
|
668
668
|
MENU_SELECTION_GROUP: "mdc-menu__selection-group",
|
669
669
|
ROOT: "mdc-menu"
|
670
|
-
},
|
670
|
+
}, R = {
|
671
671
|
ARIA_CHECKED_ATTR: "aria-checked",
|
672
672
|
ARIA_DISABLED_ATTR: "aria-disabled",
|
673
673
|
CHECKBOX_SELECTOR: 'input[type="checkbox"]',
|
674
674
|
LIST_SELECTOR: ".mdc-list,.mdc-deprecated-list",
|
675
675
|
SELECTED_EVENT: "MDCMenu:selected",
|
676
676
|
SKIP_RESTORE_FOCUS: "data-menu-item-skip-restore-focus"
|
677
|
-
},
|
677
|
+
}, re = {
|
678
678
|
FOCUS_ROOT_INDEX: -1
|
679
679
|
}, C;
|
680
680
|
(function(n) {
|
@@ -702,7 +702,7 @@ var P = {
|
|
702
702
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
703
703
|
* THE SOFTWARE.
|
704
704
|
*/
|
705
|
-
var
|
705
|
+
var g, y, d = {
|
706
706
|
LIST_ITEM_ACTIVATED_CLASS: "mdc-list-item--activated",
|
707
707
|
LIST_ITEM_CLASS: "mdc-list-item",
|
708
708
|
LIST_ITEM_DISABLED_CLASS: "mdc-list-item--disabled",
|
@@ -711,9 +711,9 @@ var _, g, d = {
|
|
711
711
|
LIST_ITEM_PRIMARY_TEXT_CLASS: "mdc-list-item__primary-text",
|
712
712
|
ROOT: "mdc-list"
|
713
713
|
};
|
714
|
-
|
715
|
-
var
|
716
|
-
"" + d.LIST_ITEM_CLASS + d.LIST_ITEM_CLASS +
|
714
|
+
g = {}, g["" + d.LIST_ITEM_ACTIVATED_CLASS] = "mdc-list-item--activated", g["" + d.LIST_ITEM_CLASS] = "mdc-list-item", g["" + d.LIST_ITEM_DISABLED_CLASS] = "mdc-list-item--disabled", g["" + d.LIST_ITEM_SELECTED_CLASS] = "mdc-list-item--selected", g["" + d.LIST_ITEM_PRIMARY_TEXT_CLASS] = "mdc-list-item__primary-text", g["" + d.ROOT] = "mdc-list";
|
715
|
+
var L = (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);
|
716
|
+
"" + d.LIST_ITEM_CLASS + d.LIST_ITEM_CLASS + L[d.LIST_ITEM_CLASS] + L[d.LIST_ITEM_CLASS], "" + d.LIST_ITEM_CLASS + d.LIST_ITEM_CLASS + d.LIST_ITEM_CLASS + d.LIST_ITEM_CLASS + L[d.LIST_ITEM_CLASS] + L[d.LIST_ITEM_CLASS] + L[d.LIST_ITEM_CLASS] + L[d.LIST_ITEM_CLASS];
|
717
717
|
/**
|
718
718
|
* @license
|
719
719
|
* Copyright 2018 Google Inc.
|
@@ -736,33 +736,33 @@ var M = (g = {}, g["" + d.LIST_ITEM_ACTIVATED_CLASS] = "mdc-deprecated-list-item
|
|
736
736
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
737
737
|
* THE SOFTWARE.
|
738
738
|
*/
|
739
|
-
var
|
739
|
+
var ae = (
|
740
740
|
/** @class */
|
741
741
|
function(n) {
|
742
|
-
U(
|
743
|
-
function e
|
744
|
-
var i = n.call(this, B(B({},
|
742
|
+
U(t, n);
|
743
|
+
function t(e) {
|
744
|
+
var i = n.call(this, B(B({}, t.defaultAdapter), e)) || this;
|
745
745
|
return i.closeAnimationEndTimerId = 0, i.defaultFocusState = C.LIST_ROOT, i.selectedIndex = -1, i;
|
746
746
|
}
|
747
|
-
return Object.defineProperty(
|
747
|
+
return Object.defineProperty(t, "cssClasses", {
|
748
748
|
get: function() {
|
749
|
-
return
|
749
|
+
return H;
|
750
750
|
},
|
751
751
|
enumerable: !1,
|
752
752
|
configurable: !0
|
753
|
-
}), Object.defineProperty(
|
753
|
+
}), Object.defineProperty(t, "strings", {
|
754
754
|
get: function() {
|
755
|
-
return
|
755
|
+
return R;
|
756
756
|
},
|
757
757
|
enumerable: !1,
|
758
758
|
configurable: !0
|
759
|
-
}), Object.defineProperty(
|
759
|
+
}), Object.defineProperty(t, "numbers", {
|
760
760
|
get: function() {
|
761
|
-
return
|
761
|
+
return re;
|
762
762
|
},
|
763
763
|
enumerable: !1,
|
764
764
|
configurable: !0
|
765
|
-
}), Object.defineProperty(
|
765
|
+
}), Object.defineProperty(t, "defaultAdapter", {
|
766
766
|
/**
|
767
767
|
* @see {@link MDCMenuAdapter} for typing information on parameters and return types.
|
768
768
|
*/
|
@@ -806,25 +806,25 @@ var at = (
|
|
806
806
|
},
|
807
807
|
enumerable: !1,
|
808
808
|
configurable: !0
|
809
|
-
}),
|
809
|
+
}), t.prototype.destroy = function() {
|
810
810
|
this.closeAnimationEndTimerId && clearTimeout(this.closeAnimationEndTimerId), this.adapter.closeSurface();
|
811
|
-
},
|
812
|
-
var i =
|
811
|
+
}, t.prototype.handleKeydown = function(e) {
|
812
|
+
var i = e.key, s = e.keyCode, r = i === "Tab" || s === 9;
|
813
813
|
r && this.adapter.closeSurface(
|
814
814
|
/** skipRestoreFocus */
|
815
815
|
!0
|
816
816
|
);
|
817
|
-
},
|
818
|
-
var i = this, s = this.adapter.getElementIndex(
|
817
|
+
}, t.prototype.handleItemAction = function(e) {
|
818
|
+
var i = this, s = this.adapter.getElementIndex(e);
|
819
819
|
if (!(s < 0)) {
|
820
820
|
this.adapter.notifySelected({ index: s });
|
821
|
-
var r = this.adapter.getAttributeFromElementAtIndex(s,
|
821
|
+
var r = this.adapter.getAttributeFromElementAtIndex(s, R.SKIP_RESTORE_FOCUS) === "true";
|
822
822
|
this.adapter.closeSurface(r), this.closeAnimationEndTimerId = setTimeout(function() {
|
823
|
-
var l = i.adapter.getElementIndex(
|
823
|
+
var l = i.adapter.getElementIndex(e);
|
824
824
|
l >= 0 && i.adapter.isSelectableItemAtIndex(l) && i.setSelectedIndex(l);
|
825
|
-
},
|
825
|
+
}, X.numbers.TRANSITION_CLOSE_DURATION);
|
826
826
|
}
|
827
|
-
},
|
827
|
+
}, t.prototype.handleMenuSurfaceOpened = function() {
|
828
828
|
switch (this.defaultFocusState) {
|
829
829
|
case C.FIRST_ITEM:
|
830
830
|
this.adapter.focusItemAtIndex(0);
|
@@ -838,53 +838,53 @@ var at = (
|
|
838
838
|
this.adapter.focusListRoot();
|
839
839
|
break;
|
840
840
|
}
|
841
|
-
},
|
842
|
-
this.defaultFocusState =
|
843
|
-
},
|
841
|
+
}, t.prototype.setDefaultFocusState = function(e) {
|
842
|
+
this.defaultFocusState = e;
|
843
|
+
}, t.prototype.getSelectedIndex = function() {
|
844
844
|
return this.selectedIndex;
|
845
|
-
},
|
846
|
-
if (this.validatedIndex(
|
845
|
+
}, t.prototype.setSelectedIndex = function(e) {
|
846
|
+
if (this.validatedIndex(e), !this.adapter.isSelectableItemAtIndex(e))
|
847
847
|
throw new Error("MDCMenuFoundation: No selection group at specified index.");
|
848
|
-
var i = this.adapter.getSelectedSiblingOfItemAtIndex(
|
849
|
-
i >= 0 && (this.adapter.removeAttributeFromElementAtIndex(i,
|
850
|
-
},
|
851
|
-
this.validatedIndex(
|
852
|
-
},
|
853
|
-
var i = this.adapter.getMenuItemCount(), s =
|
848
|
+
var i = this.adapter.getSelectedSiblingOfItemAtIndex(e);
|
849
|
+
i >= 0 && (this.adapter.removeAttributeFromElementAtIndex(i, R.ARIA_CHECKED_ATTR), this.adapter.removeClassFromElementAtIndex(i, H.MENU_SELECTED_LIST_ITEM)), this.adapter.addClassToElementAtIndex(e, H.MENU_SELECTED_LIST_ITEM), this.adapter.addAttributeToElementAtIndex(e, R.ARIA_CHECKED_ATTR, "true"), this.selectedIndex = e;
|
850
|
+
}, t.prototype.setEnabled = function(e, i) {
|
851
|
+
this.validatedIndex(e), i ? (this.adapter.removeClassFromElementAtIndex(e, d.LIST_ITEM_DISABLED_CLASS), this.adapter.addAttributeToElementAtIndex(e, R.ARIA_DISABLED_ATTR, "false")) : (this.adapter.addClassToElementAtIndex(e, d.LIST_ITEM_DISABLED_CLASS), this.adapter.addAttributeToElementAtIndex(e, R.ARIA_DISABLED_ATTR, "true"));
|
852
|
+
}, t.prototype.validatedIndex = function(e) {
|
853
|
+
var i = this.adapter.getMenuItemCount(), s = e >= 0 && e < i;
|
854
854
|
if (!s)
|
855
855
|
throw new Error("MDCMenuFoundation: No list item at specified index.");
|
856
|
-
},
|
857
|
-
}(
|
856
|
+
}, t;
|
857
|
+
}(W)
|
858
858
|
);
|
859
859
|
/**
|
860
860
|
* @license
|
861
861
|
* Copyright 2020 Google LLC
|
862
862
|
* SPDX-License-Identifier: Apache-2.0
|
863
863
|
*/
|
864
|
-
class h extends
|
864
|
+
class h extends j {
|
865
865
|
constructor() {
|
866
|
-
super(...arguments), this.mdcFoundationClass =
|
866
|
+
super(...arguments), this.mdcFoundationClass = ae, 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;
|
867
867
|
}
|
868
868
|
get listElement() {
|
869
869
|
return this.listElement_ ? this.listElement_ : (this.listElement_ = this.renderRoot.querySelector("mwc-list"), this.listElement_);
|
870
870
|
}
|
871
871
|
get items() {
|
872
|
-
const
|
873
|
-
return
|
872
|
+
const t = this.listElement;
|
873
|
+
return t ? t.items : [];
|
874
874
|
}
|
875
875
|
get index() {
|
876
|
-
const
|
877
|
-
return
|
876
|
+
const t = this.listElement;
|
877
|
+
return t ? t.index : -1;
|
878
878
|
}
|
879
879
|
get selected() {
|
880
|
-
const
|
881
|
-
return
|
880
|
+
const t = this.listElement;
|
881
|
+
return t ? t.selected : null;
|
882
882
|
}
|
883
883
|
render() {
|
884
884
|
return this.renderSurface();
|
885
885
|
}
|
886
886
|
renderSurface() {
|
887
|
-
const
|
887
|
+
const t = this.getSurfaceClasses();
|
888
888
|
return F`
|
889
889
|
<mwc-menu-surface
|
890
890
|
?hidden=${!this.open}
|
@@ -899,7 +899,7 @@ class h extends W {
|
|
899
899
|
.fullwidth=${this.fullwidth}
|
900
900
|
.menuCorner=${this.menuCorner}
|
901
901
|
?stayOpenOnBodyClick=${this.stayOpenOnBodyClick}
|
902
|
-
class=${
|
902
|
+
class=${P(t)}
|
903
903
|
@closed=${this.onClosed}
|
904
904
|
@opened=${this.onOpened}
|
905
905
|
@keydown=${this.onKeydown}>
|
@@ -913,15 +913,15 @@ class h extends W {
|
|
913
913
|
};
|
914
914
|
}
|
915
915
|
renderList() {
|
916
|
-
const
|
916
|
+
const t = this.innerRole === "menu" ? "menuitem" : "option", e = this.renderListClasses();
|
917
917
|
return F`
|
918
918
|
<mwc-list
|
919
919
|
rootTabbable
|
920
920
|
.innerAriaLabel=${this.innerAriaLabel}
|
921
921
|
.innerRole=${this.innerRole}
|
922
922
|
.multi=${this.multi}
|
923
|
-
class=${
|
924
|
-
.itemRoles=${
|
923
|
+
class=${P(e)}
|
924
|
+
.itemRoles=${t}
|
925
925
|
.wrapFocus=${this.wrapFocus}
|
926
926
|
.activatable=${this.activatable}
|
927
927
|
@action=${this.onAction}>
|
@@ -935,97 +935,97 @@ class h extends W {
|
|
935
935
|
}
|
936
936
|
createAdapter() {
|
937
937
|
return {
|
938
|
-
addClassToElementAtIndex: (
|
938
|
+
addClassToElementAtIndex: (t, e) => {
|
939
939
|
const i = this.listElement;
|
940
940
|
if (!i)
|
941
941
|
return;
|
942
|
-
const s = i.items[
|
943
|
-
s && (
|
942
|
+
const s = i.items[t];
|
943
|
+
s && (e === "mdc-menu-item--selected" ? this.forceGroupSelection && !s.selected && i.toggle(t, !0) : s.classList.add(e));
|
944
944
|
},
|
945
|
-
removeClassFromElementAtIndex: (
|
945
|
+
removeClassFromElementAtIndex: (t, e) => {
|
946
946
|
const i = this.listElement;
|
947
947
|
if (!i)
|
948
948
|
return;
|
949
|
-
const s = i.items[
|
950
|
-
s && (
|
949
|
+
const s = i.items[t];
|
950
|
+
s && (e === "mdc-menu-item--selected" ? s.selected && i.toggle(t, !1) : s.classList.remove(e));
|
951
951
|
},
|
952
|
-
addAttributeToElementAtIndex: (
|
952
|
+
addAttributeToElementAtIndex: (t, e, i) => {
|
953
953
|
const s = this.listElement;
|
954
954
|
if (!s)
|
955
955
|
return;
|
956
|
-
const r = s.items[
|
957
|
-
r && r.setAttribute(
|
956
|
+
const r = s.items[t];
|
957
|
+
r && r.setAttribute(e, i);
|
958
958
|
},
|
959
|
-
removeAttributeFromElementAtIndex: (
|
959
|
+
removeAttributeFromElementAtIndex: (t, e) => {
|
960
960
|
const i = this.listElement;
|
961
961
|
if (!i)
|
962
962
|
return;
|
963
|
-
const s = i.items[
|
964
|
-
s && s.removeAttribute(
|
963
|
+
const s = i.items[t];
|
964
|
+
s && s.removeAttribute(e);
|
965
965
|
},
|
966
|
-
getAttributeFromElementAtIndex: (
|
966
|
+
getAttributeFromElementAtIndex: (t, e) => {
|
967
967
|
const i = this.listElement;
|
968
968
|
if (!i)
|
969
969
|
return null;
|
970
|
-
const s = i.items[
|
971
|
-
return s ? s.getAttribute(
|
970
|
+
const s = i.items[t];
|
971
|
+
return s ? s.getAttribute(e) : null;
|
972
972
|
},
|
973
|
-
elementContainsClass: (
|
973
|
+
elementContainsClass: (t, e) => t.classList.contains(e),
|
974
974
|
closeSurface: () => {
|
975
975
|
this.open = !1;
|
976
976
|
},
|
977
|
-
getElementIndex: (
|
978
|
-
const
|
979
|
-
return
|
977
|
+
getElementIndex: (t) => {
|
978
|
+
const e = this.listElement;
|
979
|
+
return e ? e.items.indexOf(t) : -1;
|
980
980
|
},
|
981
981
|
notifySelected: () => {
|
982
982
|
},
|
983
983
|
getMenuItemCount: () => {
|
984
|
-
const e = this.listElement;
|
985
|
-
return e ? e.items.length : 0;
|
986
|
-
},
|
987
|
-
focusItemAtIndex: (e) => {
|
988
984
|
const t = this.listElement;
|
989
|
-
|
985
|
+
return t ? t.items.length : 0;
|
986
|
+
},
|
987
|
+
focusItemAtIndex: (t) => {
|
988
|
+
const e = this.listElement;
|
989
|
+
if (!e)
|
990
990
|
return;
|
991
|
-
const i =
|
991
|
+
const i = e.items[t];
|
992
992
|
i && i.focus();
|
993
993
|
},
|
994
994
|
focusListRoot: () => {
|
995
995
|
this.listElement && this.listElement.focus();
|
996
996
|
},
|
997
|
-
getSelectedSiblingOfItemAtIndex: (
|
998
|
-
const
|
999
|
-
if (!
|
997
|
+
getSelectedSiblingOfItemAtIndex: (t) => {
|
998
|
+
const e = this.listElement;
|
999
|
+
if (!e)
|
1000
1000
|
return -1;
|
1001
|
-
const i =
|
1001
|
+
const i = e.items[t];
|
1002
1002
|
if (!i || !i.group)
|
1003
1003
|
return -1;
|
1004
|
-
for (let s = 0; s <
|
1005
|
-
if (s ===
|
1004
|
+
for (let s = 0; s < e.items.length; s++) {
|
1005
|
+
if (s === t)
|
1006
1006
|
continue;
|
1007
|
-
const r =
|
1007
|
+
const r = e.items[s];
|
1008
1008
|
if (r.selected && r.group === i.group)
|
1009
1009
|
return s;
|
1010
1010
|
}
|
1011
1011
|
return -1;
|
1012
1012
|
},
|
1013
|
-
isSelectableItemAtIndex: (
|
1014
|
-
const
|
1015
|
-
if (!
|
1013
|
+
isSelectableItemAtIndex: (t) => {
|
1014
|
+
const e = this.listElement;
|
1015
|
+
if (!e)
|
1016
1016
|
return !1;
|
1017
|
-
const i =
|
1017
|
+
const i = e.items[t];
|
1018
1018
|
return i ? i.hasAttribute("group") : !1;
|
1019
1019
|
}
|
1020
1020
|
};
|
1021
1021
|
}
|
1022
|
-
onKeydown(
|
1023
|
-
this.mdcFoundation && this.mdcFoundation.handleKeydown(
|
1022
|
+
onKeydown(t) {
|
1023
|
+
this.mdcFoundation && this.mdcFoundation.handleKeydown(t);
|
1024
1024
|
}
|
1025
|
-
onAction(
|
1026
|
-
const
|
1027
|
-
if (this.mdcFoundation &&
|
1028
|
-
const i =
|
1025
|
+
onAction(t) {
|
1026
|
+
const e = this.listElement;
|
1027
|
+
if (this.mdcFoundation && e) {
|
1028
|
+
const i = t.detail.index, s = e.items[i];
|
1029
1029
|
s && this.mdcFoundation.handleItemAction(s);
|
1030
1030
|
}
|
1031
1031
|
}
|
@@ -1042,12 +1042,12 @@ class h extends W {
|
|
1042
1042
|
// tslint:enable:ban-ts-ignore
|
1043
1043
|
async firstUpdated() {
|
1044
1044
|
super.firstUpdated();
|
1045
|
-
const e = this.listElement;
|
1046
|
-
e && (this._listUpdateComplete = e.updateComplete, await this._listUpdateComplete);
|
1047
|
-
}
|
1048
|
-
select(e) {
|
1049
1045
|
const t = this.listElement;
|
1050
|
-
t && t.
|
1046
|
+
t && (this._listUpdateComplete = t.updateComplete, await this._listUpdateComplete);
|
1047
|
+
}
|
1048
|
+
select(t) {
|
1049
|
+
const e = this.listElement;
|
1050
|
+
e && e.select(t);
|
1051
1051
|
}
|
1052
1052
|
close() {
|
1053
1053
|
this.open = !1;
|
@@ -1056,16 +1056,16 @@ class h extends W {
|
|
1056
1056
|
this.open = !0;
|
1057
1057
|
}
|
1058
1058
|
getFocusedItemIndex() {
|
1059
|
-
const e = this.listElement;
|
1060
|
-
return e ? e.getFocusedItemIndex() : -1;
|
1061
|
-
}
|
1062
|
-
focusItemAtIndex(e) {
|
1063
1059
|
const t = this.listElement;
|
1064
|
-
t
|
1060
|
+
return t ? t.getFocusedItemIndex() : -1;
|
1065
1061
|
}
|
1066
|
-
|
1067
|
-
const
|
1068
|
-
|
1062
|
+
focusItemAtIndex(t) {
|
1063
|
+
const e = this.listElement;
|
1064
|
+
e && e.focusItemAtIndex(t);
|
1065
|
+
}
|
1066
|
+
layout(t = !0) {
|
1067
|
+
const e = this.listElement;
|
1068
|
+
e && e.layout(t);
|
1069
1069
|
}
|
1070
1070
|
}
|
1071
1071
|
o([
|
@@ -1127,7 +1127,7 @@ o([
|
|
1127
1127
|
], h.prototype, "stayOpenOnBodyClick", void 0);
|
1128
1128
|
o([
|
1129
1129
|
a({ type: String }),
|
1130
|
-
|
1130
|
+
I(function(n) {
|
1131
1131
|
this.mdcFoundation && this.mdcFoundation.setDefaultFocusState(C[n]);
|
1132
1132
|
})
|
1133
1133
|
], h.prototype, "defaultFocus", void 0);
|
@@ -1136,8 +1136,8 @@ o([
|
|
1136
1136
|
* Copyright 2021 Google LLC
|
1137
1137
|
* SPDX-LIcense-Identifier: Apache-2.0
|
1138
1138
|
*/
|
1139
|
-
const
|
1139
|
+
const _e = K`mwc-list ::slotted([mwc-list-item]:not([twoline])),mwc-list ::slotted([noninteractive]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}`;
|
1140
1140
|
export {
|
1141
1141
|
h as M,
|
1142
|
-
|
1142
|
+
_e as s
|
1143
1143
|
};
|