@covalent/components 9.1.0 → 9.1.2
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,22 +1,22 @@
|
|
1
|
-
import {
|
2
|
-
import { e as k, x as P, i as H } from "./query-assigned-elements-
|
3
|
-
import {
|
4
|
-
import { B as X } from "./base-element-
|
1
|
+
import { b as f } from "./tslib.es6-CISSdiiH.mjs";
|
2
|
+
import { e as k, x as P, i as H } from "./query-assigned-elements-DhyCP_2z.mjs";
|
3
|
+
import { s as K, L as V } from "./mwc-list-item.css-Cg9onxQ-.mjs";
|
4
|
+
import { B as X } from "./base-element-CzNmpVoz.mjs";
|
5
5
|
import { o as y } from "./observer-DQ8OfVDQ.mjs";
|
6
6
|
import { i as G, b as z, d as $ } from "./utils-Dr5MegQq.mjs";
|
7
7
|
import { n as A } from "./property-DJzm_oB9.mjs";
|
8
|
-
import { i as j } from "./query-
|
9
|
-
import { o as W } from "./query-assigned-nodes-
|
10
|
-
import { l as U } from "./if-defined-
|
8
|
+
import { i as j } from "./query-DSO61t36.mjs";
|
9
|
+
import { o as W } from "./query-assigned-nodes-B-jCihdA.mjs";
|
10
|
+
import { l as U } from "./if-defined-DN7whKwy.mjs";
|
11
11
|
/**
|
12
12
|
* @license
|
13
13
|
* Copyright 2020 Google LLC
|
14
14
|
* SPDX-License-Identifier: Apache-2.0
|
15
15
|
*/
|
16
|
-
let D = class extends
|
16
|
+
let D = class extends V {
|
17
17
|
};
|
18
|
-
D.styles = [
|
19
|
-
D =
|
18
|
+
D.styles = [K];
|
19
|
+
D = f([
|
20
20
|
k("mwc-list-item")
|
21
21
|
], D);
|
22
22
|
/**
|
@@ -129,7 +129,7 @@ l.add(d.ARROW_DOWN);
|
|
129
129
|
l.add(d.DELETE);
|
130
130
|
l.add(d.ESCAPE);
|
131
131
|
l.add(d.TAB);
|
132
|
-
var
|
132
|
+
var m = {
|
133
133
|
BACKSPACE: 8,
|
134
134
|
ENTER: 13,
|
135
135
|
SPACEBAR: 32,
|
@@ -145,20 +145,20 @@ var u = {
|
|
145
145
|
ESCAPE: 27,
|
146
146
|
TAB: 9
|
147
147
|
}, c = /* @__PURE__ */ new Map();
|
148
|
-
c.set(
|
149
|
-
c.set(
|
150
|
-
c.set(
|
151
|
-
c.set(
|
152
|
-
c.set(
|
153
|
-
c.set(
|
154
|
-
c.set(
|
155
|
-
c.set(
|
156
|
-
c.set(
|
157
|
-
c.set(
|
158
|
-
c.set(
|
159
|
-
c.set(
|
160
|
-
c.set(
|
161
|
-
c.set(
|
148
|
+
c.set(m.BACKSPACE, d.BACKSPACE);
|
149
|
+
c.set(m.ENTER, d.ENTER);
|
150
|
+
c.set(m.SPACEBAR, d.SPACEBAR);
|
151
|
+
c.set(m.PAGE_UP, d.PAGE_UP);
|
152
|
+
c.set(m.PAGE_DOWN, d.PAGE_DOWN);
|
153
|
+
c.set(m.END, d.END);
|
154
|
+
c.set(m.HOME, d.HOME);
|
155
|
+
c.set(m.ARROW_LEFT, d.ARROW_LEFT);
|
156
|
+
c.set(m.ARROW_UP, d.ARROW_UP);
|
157
|
+
c.set(m.ARROW_RIGHT, d.ARROW_RIGHT);
|
158
|
+
c.set(m.ARROW_DOWN, d.ARROW_DOWN);
|
159
|
+
c.set(m.DELETE, d.DELETE);
|
160
|
+
c.set(m.ESCAPE, d.ESCAPE);
|
161
|
+
c.set(m.TAB, d.TAB);
|
162
162
|
var g = /* @__PURE__ */ new Set();
|
163
163
|
g.add(d.PAGE_UP);
|
164
164
|
g.add(d.PAGE_DOWN);
|
@@ -207,7 +207,7 @@ var T, _, r = {
|
|
207
207
|
ROOT: "mdc-list"
|
208
208
|
};
|
209
209
|
T = {}, T["" + r.LIST_ITEM_ACTIVATED_CLASS] = "mdc-list-item--activated", T["" + r.LIST_ITEM_CLASS] = "mdc-list-item", T["" + r.LIST_ITEM_DISABLED_CLASS] = "mdc-list-item--disabled", T["" + r.LIST_ITEM_SELECTED_CLASS] = "mdc-list-item--selected", T["" + r.LIST_ITEM_PRIMARY_TEXT_CLASS] = "mdc-list-item__primary-text", T["" + r.ROOT] = "mdc-list";
|
210
|
-
var L = (_ = {}, _["" + r.LIST_ITEM_ACTIVATED_CLASS] = "mdc-deprecated-list-item--activated", _["" + r.LIST_ITEM_CLASS] = "mdc-deprecated-list-item", _["" + r.LIST_ITEM_DISABLED_CLASS] = "mdc-deprecated-list-item--disabled", _["" + r.LIST_ITEM_SELECTED_CLASS] = "mdc-deprecated-list-item--selected", _["" + r.LIST_ITEM_TEXT_CLASS] = "mdc-deprecated-list-item__text", _["" + r.LIST_ITEM_PRIMARY_TEXT_CLASS] = "mdc-deprecated-list-item__primary-text", _["" + r.ROOT] = "mdc-deprecated-list", _),
|
210
|
+
var L = (_ = {}, _["" + r.LIST_ITEM_ACTIVATED_CLASS] = "mdc-deprecated-list-item--activated", _["" + r.LIST_ITEM_CLASS] = "mdc-deprecated-list-item", _["" + r.LIST_ITEM_DISABLED_CLASS] = "mdc-deprecated-list-item--disabled", _["" + r.LIST_ITEM_SELECTED_CLASS] = "mdc-deprecated-list-item--selected", _["" + r.LIST_ITEM_TEXT_CLASS] = "mdc-deprecated-list-item__text", _["" + r.LIST_ITEM_PRIMARY_TEXT_CLASS] = "mdc-deprecated-list-item__primary-text", _["" + r.ROOT] = "mdc-deprecated-list", _), O = {
|
211
211
|
ACTION_EVENT: "MDCList:action",
|
212
212
|
SELECTION_CHANGE_EVENT: "MDCList:selectionChange",
|
213
213
|
ARIA_CHECKED: "aria-checked",
|
@@ -242,7 +242,7 @@ var L = (_ = {}, _["" + r.LIST_ITEM_ACTIVATED_CLASS] = "mdc-deprecated-list-item
|
|
242
242
|
`,
|
243
243
|
RADIO_SELECTOR: 'input[type="radio"]',
|
244
244
|
SELECTED_ITEM_SELECTOR: '[aria-selected="true"], [aria-current="true"]'
|
245
|
-
},
|
245
|
+
}, u = {
|
246
246
|
UNSET_INDEX: -1,
|
247
247
|
TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS: 300
|
248
248
|
};
|
@@ -252,10 +252,10 @@ var L = (_ = {}, _["" + r.LIST_ITEM_ACTIVATED_CLASS] = "mdc-deprecated-list-item
|
|
252
252
|
* SPDX-License-Identifier: Apache-2.0
|
253
253
|
*/
|
254
254
|
const N = (n, e) => n - e, q = (n, e) => {
|
255
|
-
const t = Array.from(n), i = Array.from(e), s = { added: [], removed: [] },
|
255
|
+
const t = Array.from(n), i = Array.from(e), s = { added: [], removed: [] }, a = t.sort(N), o = i.sort(N);
|
256
256
|
let E = 0, x = 0;
|
257
|
-
for (; E <
|
258
|
-
const p =
|
257
|
+
for (; E < a.length || x < o.length; ) {
|
258
|
+
const p = a[E], I = o[x];
|
259
259
|
if (p === I) {
|
260
260
|
E++, x++;
|
261
261
|
continue;
|
@@ -274,19 +274,19 @@ const N = (n, e) => n - e, q = (n, e) => {
|
|
274
274
|
function C(n) {
|
275
275
|
return n instanceof Set;
|
276
276
|
}
|
277
|
-
const
|
278
|
-
const e = n ===
|
277
|
+
const v = (n) => {
|
278
|
+
const e = n === u.UNSET_INDEX ? /* @__PURE__ */ new Set() : n;
|
279
279
|
return C(e) ? new Set(e) : /* @__PURE__ */ new Set([e]);
|
280
280
|
};
|
281
281
|
class w extends Y {
|
282
282
|
constructor(e) {
|
283
|
-
super(Object.assign(Object.assign({}, w.defaultAdapter), e)), this.isMulti_ = !1, this.wrapFocus_ = !1, this.isVertical_ = !0, this.selectedIndex_ =
|
283
|
+
super(Object.assign(Object.assign({}, w.defaultAdapter), e)), this.isMulti_ = !1, this.wrapFocus_ = !1, this.isVertical_ = !0, this.selectedIndex_ = u.UNSET_INDEX, this.focusedItemIndex_ = u.UNSET_INDEX, this.useActivatedClass_ = !1, this.ariaCurrentAttrValue_ = null;
|
284
284
|
}
|
285
285
|
static get strings() {
|
286
|
-
return
|
286
|
+
return O;
|
287
287
|
}
|
288
288
|
static get numbers() {
|
289
|
-
return
|
289
|
+
return u;
|
290
290
|
}
|
291
291
|
static get defaultAdapter() {
|
292
292
|
return {
|
@@ -329,7 +329,7 @@ class w extends Y {
|
|
329
329
|
const t = this.selectedIndex_;
|
330
330
|
if (e) {
|
331
331
|
if (!C(t)) {
|
332
|
-
const i = t ===
|
332
|
+
const i = t === u.UNSET_INDEX;
|
333
333
|
this.selectedIndex_ = i ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([t]);
|
334
334
|
}
|
335
335
|
} else if (C(t))
|
@@ -337,7 +337,7 @@ class w extends Y {
|
|
337
337
|
const i = Array.from(t).sort(N);
|
338
338
|
this.selectedIndex_ = i[0];
|
339
339
|
} else
|
340
|
-
this.selectedIndex_ =
|
340
|
+
this.selectedIndex_ = u.UNSET_INDEX;
|
341
341
|
}
|
342
342
|
/**
|
343
343
|
* Sets the isVertical_ private variable.
|
@@ -355,7 +355,7 @@ class w extends Y {
|
|
355
355
|
return this.selectedIndex_;
|
356
356
|
}
|
357
357
|
setSelectedIndex(e) {
|
358
|
-
this.isIndexValid_(e) && (this.isMulti_ ? this.setMultiSelectionAtIndex_(
|
358
|
+
this.isIndexValid_(e) && (this.isMulti_ ? this.setMultiSelectionAtIndex_(v(e)) : this.setSingleSelectionAtIndex_(e));
|
359
359
|
}
|
360
360
|
/**
|
361
361
|
* Focus in handler for the list items.
|
@@ -375,18 +375,18 @@ class w extends Y {
|
|
375
375
|
* Key handler for the list.
|
376
376
|
*/
|
377
377
|
handleKeydown(e, t, i) {
|
378
|
-
const s = S(e) === "ArrowLeft",
|
378
|
+
const s = S(e) === "ArrowLeft", a = S(e) === "ArrowUp", o = S(e) === "ArrowRight", E = S(e) === "ArrowDown", x = S(e) === "Home", p = S(e) === "End", I = S(e) === "Enter", B = S(e) === "Spacebar";
|
379
379
|
if (this.adapter.isRootFocused()) {
|
380
|
-
|
380
|
+
a || p ? (e.preventDefault(), this.focusLastElement()) : (E || x) && (e.preventDefault(), this.focusFirstElement());
|
381
381
|
return;
|
382
382
|
}
|
383
383
|
let b = this.adapter.getFocusedElementIndex();
|
384
384
|
if (b === -1 && (b = i, b < 0))
|
385
385
|
return;
|
386
386
|
let R;
|
387
|
-
if (this.isVertical_ && E || !this.isVertical_ &&
|
387
|
+
if (this.isVertical_ && E || !this.isVertical_ && o)
|
388
388
|
this.preventDefaultEvent(e), R = this.focusNextElement(b);
|
389
|
-
else if (this.isVertical_ &&
|
389
|
+
else if (this.isVertical_ && a || !this.isVertical_ && s)
|
390
390
|
this.preventDefaultEvent(e), R = this.focusPrevElement(b);
|
391
391
|
else if (x)
|
392
392
|
this.preventDefaultEvent(e), R = this.focusFirstElement();
|
@@ -404,7 +404,7 @@ class w extends Y {
|
|
404
404
|
* Click handler for the list.
|
405
405
|
*/
|
406
406
|
handleSingleSelection(e, t, i) {
|
407
|
-
e !==
|
407
|
+
e !== u.UNSET_INDEX && (this.setSelectedIndexOnAction_(e, t, i), this.setTabindexAtIndex_(e), this.focusedItemIndex_ = e);
|
408
408
|
}
|
409
409
|
/**
|
410
410
|
* Focuses the next element on the list.
|
@@ -454,15 +454,15 @@ class w extends Y {
|
|
454
454
|
Z.indexOf(i) === -1 && e.preventDefault();
|
455
455
|
}
|
456
456
|
setSingleSelectionAtIndex_(e, t = !0) {
|
457
|
-
this.selectedIndex_ !== e && (this.selectedIndex_ !==
|
457
|
+
this.selectedIndex_ !== e && (this.selectedIndex_ !== u.UNSET_INDEX && (this.adapter.setSelectedStateForElementIndex(this.selectedIndex_, !1), this.useActivatedClass_ && this.adapter.setActivatedStateForElementIndex(this.selectedIndex_, !1)), t && this.adapter.setSelectedStateForElementIndex(e, !0), this.useActivatedClass_ && this.adapter.setActivatedStateForElementIndex(e, !0), this.setAriaForSingleSelectionAtIndex_(e), this.selectedIndex_ = e, this.adapter.notifySelected(e));
|
458
458
|
}
|
459
459
|
setMultiSelectionAtIndex_(e, t = !0) {
|
460
|
-
const i =
|
460
|
+
const i = v(this.selectedIndex_), s = q(i, e);
|
461
461
|
if (!(!s.removed.length && !s.added.length)) {
|
462
|
-
for (const
|
463
|
-
t && this.adapter.setSelectedStateForElementIndex(
|
464
|
-
for (const
|
465
|
-
t && this.adapter.setSelectedStateForElementIndex(
|
462
|
+
for (const a of s.removed)
|
463
|
+
t && this.adapter.setSelectedStateForElementIndex(a, !1), this.useActivatedClass_ && this.adapter.setActivatedStateForElementIndex(a, !1);
|
464
|
+
for (const a of s.added)
|
465
|
+
t && this.adapter.setSelectedStateForElementIndex(a, !0), this.useActivatedClass_ && this.adapter.setActivatedStateForElementIndex(a, !0);
|
466
466
|
this.selectedIndex_ = e, this.adapter.notifySelected(e, s);
|
467
467
|
}
|
468
468
|
}
|
@@ -470,18 +470,18 @@ class w extends Y {
|
|
470
470
|
* Sets aria attribute for single selection at given index.
|
471
471
|
*/
|
472
472
|
setAriaForSingleSelectionAtIndex_(e) {
|
473
|
-
this.selectedIndex_ ===
|
474
|
-
const t = this.ariaCurrentAttrValue_ !== null, i = t ?
|
475
|
-
this.selectedIndex_ !==
|
473
|
+
this.selectedIndex_ === u.UNSET_INDEX && (this.ariaCurrentAttrValue_ = this.adapter.getAttributeForElementIndex(e, O.ARIA_CURRENT));
|
474
|
+
const t = this.ariaCurrentAttrValue_ !== null, i = t ? O.ARIA_CURRENT : O.ARIA_SELECTED;
|
475
|
+
this.selectedIndex_ !== u.UNSET_INDEX && this.adapter.setAttributeForElementIndex(this.selectedIndex_, i, "false");
|
476
476
|
const s = t ? this.ariaCurrentAttrValue_ : "true";
|
477
477
|
this.adapter.setAttributeForElementIndex(e, i, s);
|
478
478
|
}
|
479
479
|
setTabindexAtIndex_(e) {
|
480
|
-
this.focusedItemIndex_ ===
|
480
|
+
this.focusedItemIndex_ === u.UNSET_INDEX && e !== 0 ? this.adapter.setTabIndexForElementIndex(0, -1) : this.focusedItemIndex_ >= 0 && this.focusedItemIndex_ !== e && this.adapter.setTabIndexForElementIndex(this.focusedItemIndex_, -1), this.adapter.setTabIndexForElementIndex(e, 0);
|
481
481
|
}
|
482
482
|
setTabindexToFirstSelectedItem_() {
|
483
483
|
let e = 0;
|
484
|
-
typeof this.selectedIndex_ == "number" && this.selectedIndex_ !==
|
484
|
+
typeof this.selectedIndex_ == "number" && this.selectedIndex_ !== u.UNSET_INDEX ? e = this.selectedIndex_ : C(this.selectedIndex_) && this.selectedIndex_.size > 0 && (e = Math.min(...this.selectedIndex_)), this.setTabindexAtIndex_(e);
|
485
485
|
}
|
486
486
|
isIndexValid_(e) {
|
487
487
|
if (e instanceof Set) {
|
@@ -499,7 +499,7 @@ class w extends Y {
|
|
499
499
|
} else if (typeof e == "number") {
|
500
500
|
if (this.isMulti_)
|
501
501
|
throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: " + e);
|
502
|
-
return e ===
|
502
|
+
return e === u.UNSET_INDEX || this.isIndexInRange_(e);
|
503
503
|
} else
|
504
504
|
return !1;
|
505
505
|
}
|
@@ -516,13 +516,13 @@ class w extends Y {
|
|
516
516
|
if (this.adapter.getDisabledStateForElementIndex(e))
|
517
517
|
return;
|
518
518
|
let s = e;
|
519
|
-
this.isMulti_ && (s = /* @__PURE__ */ new Set([e])), this.isIndexValid_(s) && (this.isMulti_ ? this.toggleMultiAtIndex(e, i, t) : t || i ? this.setSingleSelectionAtIndex_(e, t) : this.selectedIndex_ === e && this.setSingleSelectionAtIndex_(
|
519
|
+
this.isMulti_ && (s = /* @__PURE__ */ new Set([e])), this.isIndexValid_(s) && (this.isMulti_ ? this.toggleMultiAtIndex(e, i, t) : t || i ? this.setSingleSelectionAtIndex_(e, t) : this.selectedIndex_ === e && this.setSingleSelectionAtIndex_(u.UNSET_INDEX), t && this.adapter.notifyAction(e));
|
520
520
|
}
|
521
521
|
toggleMultiAtIndex(e, t, i = !0) {
|
522
522
|
let s = !1;
|
523
523
|
t === void 0 ? s = !this.adapter.getSelectedStateForElementIndex(e) : s = t;
|
524
|
-
const
|
525
|
-
s ?
|
524
|
+
const a = v(this.selectedIndex_);
|
525
|
+
s ? a.add(e) : a.delete(e), this.setMultiSelectionAtIndex_(a, i);
|
526
526
|
}
|
527
527
|
}
|
528
528
|
/**
|
@@ -538,12 +538,12 @@ function J(n, e = 50) {
|
|
538
538
|
}, e);
|
539
539
|
};
|
540
540
|
}
|
541
|
-
const
|
541
|
+
const F = (n) => n.hasAttribute("mwc-list-item");
|
542
542
|
function Q() {
|
543
543
|
const n = this.itemsReadyResolver;
|
544
544
|
this.itemsReady = new Promise((e) => this.itemsReadyResolver = e), n();
|
545
545
|
}
|
546
|
-
class
|
546
|
+
class h extends X {
|
547
547
|
constructor() {
|
548
548
|
super(), this.mdcAdapter = null, this.mdcFoundationClass = w, this.activatable = !1, this.multi = !1, this.wrapFocus = !1, this.itemRoles = null, this.innerRole = null, this.innerAriaLabel = null, this.rootTabbable = !1, this.previousTabindex = null, this.noninteractive = !1, this.itemsReadyResolver = () => {
|
549
549
|
}, this.itemsReady = Promise.resolve([]), this.items_ = [];
|
@@ -563,20 +563,20 @@ class f extends X {
|
|
563
563
|
updateItems() {
|
564
564
|
var e;
|
565
565
|
const t = (e = this.assignedElements) !== null && e !== void 0 ? e : [], i = [];
|
566
|
-
for (const
|
567
|
-
|
566
|
+
for (const o of t)
|
567
|
+
F(o) && (i.push(o), o._managingList = this), o.hasAttribute("divider") && !o.hasAttribute("role") && o.setAttribute("role", "separator");
|
568
568
|
this.items_ = i;
|
569
569
|
const s = /* @__PURE__ */ new Set();
|
570
|
-
if (this.items_.forEach((
|
571
|
-
this.itemRoles ?
|
570
|
+
if (this.items_.forEach((o, E) => {
|
571
|
+
this.itemRoles ? o.setAttribute("role", this.itemRoles) : o.removeAttribute("role"), o.selected && s.add(E);
|
572
572
|
}), this.multi)
|
573
573
|
this.select(s);
|
574
574
|
else {
|
575
|
-
const
|
576
|
-
this.select(
|
575
|
+
const o = s.size ? s.entries().next().value[1] : -1;
|
576
|
+
this.select(o);
|
577
577
|
}
|
578
|
-
const
|
579
|
-
this.dispatchEvent(
|
578
|
+
const a = new Event("items-updated", { bubbles: !0, composed: !0 });
|
579
|
+
this.dispatchEvent(a);
|
580
580
|
}
|
581
581
|
get selected() {
|
582
582
|
const e = this.index;
|
@@ -633,7 +633,7 @@ class f extends X {
|
|
633
633
|
}
|
634
634
|
onKeydown(e) {
|
635
635
|
if (this.mdcFoundation && this.mdcRoot) {
|
636
|
-
const t = this.getIndexOfTarget(e), i = e.target, s =
|
636
|
+
const t = this.getIndexOfTarget(e), i = e.target, s = F(i);
|
637
637
|
this.mdcFoundation.handleKeydown(e, s, t);
|
638
638
|
}
|
639
639
|
}
|
@@ -642,16 +642,16 @@ class f extends X {
|
|
642
642
|
let t = this.getIndexOfTarget(e);
|
643
643
|
if (t === -1 && (this.layout(), t = this.getIndexOfTarget(e), t === -1) || this.items[t].disabled)
|
644
644
|
return;
|
645
|
-
const s = e.detail.selected,
|
646
|
-
this.mdcFoundation.handleSingleSelection(t,
|
645
|
+
const s = e.detail.selected, a = e.detail.source;
|
646
|
+
this.mdcFoundation.handleSingleSelection(t, a === "interaction", s), e.stopPropagation();
|
647
647
|
}
|
648
648
|
}
|
649
649
|
getIndexOfTarget(e) {
|
650
650
|
const t = this.items, i = e.composedPath();
|
651
651
|
for (const s of i) {
|
652
|
-
let
|
653
|
-
if (G(s) &&
|
654
|
-
return
|
652
|
+
let a = -1;
|
653
|
+
if (G(s) && F(s) && (a = t.indexOf(s)), a !== -1)
|
654
|
+
return a;
|
655
655
|
}
|
656
656
|
return -1;
|
657
657
|
}
|
@@ -751,7 +751,7 @@ class f extends X {
|
|
751
751
|
return -1;
|
752
752
|
for (let t = e.length - 1; t >= 0; t--) {
|
753
753
|
const i = e[t];
|
754
|
-
if (
|
754
|
+
if (F(i))
|
755
755
|
return this.items.indexOf(i);
|
756
756
|
}
|
757
757
|
return -1;
|
@@ -773,52 +773,52 @@ class f extends X {
|
|
773
773
|
e && e.blur();
|
774
774
|
}
|
775
775
|
}
|
776
|
-
|
776
|
+
f([
|
777
777
|
A({ type: String })
|
778
|
-
],
|
779
|
-
|
778
|
+
], h.prototype, "emptyMessage", void 0);
|
779
|
+
f([
|
780
780
|
j(".mdc-deprecated-list")
|
781
|
-
],
|
782
|
-
|
781
|
+
], h.prototype, "mdcRoot", void 0);
|
782
|
+
f([
|
783
783
|
W("", !0, "*")
|
784
|
-
],
|
785
|
-
|
784
|
+
], h.prototype, "assignedElements", void 0);
|
785
|
+
f([
|
786
786
|
W("", !0, '[tabindex="0"]')
|
787
|
-
],
|
788
|
-
|
787
|
+
], h.prototype, "tabbableElements", void 0);
|
788
|
+
f([
|
789
789
|
A({ type: Boolean }),
|
790
790
|
y(function(n) {
|
791
791
|
this.mdcFoundation && this.mdcFoundation.setUseActivatedClass(n);
|
792
792
|
})
|
793
|
-
],
|
794
|
-
|
793
|
+
], h.prototype, "activatable", void 0);
|
794
|
+
f([
|
795
795
|
A({ type: Boolean }),
|
796
796
|
y(function(n, e) {
|
797
797
|
this.mdcFoundation && this.mdcFoundation.setMulti(n), e !== void 0 && this.layout();
|
798
798
|
})
|
799
|
-
],
|
800
|
-
|
799
|
+
], h.prototype, "multi", void 0);
|
800
|
+
f([
|
801
801
|
A({ type: Boolean }),
|
802
802
|
y(function(n) {
|
803
803
|
this.mdcFoundation && this.mdcFoundation.setWrapFocus(n);
|
804
804
|
})
|
805
|
-
],
|
806
|
-
|
805
|
+
], h.prototype, "wrapFocus", void 0);
|
806
|
+
f([
|
807
807
|
A({ type: String }),
|
808
808
|
y(function(n, e) {
|
809
809
|
e !== void 0 && this.updateItems();
|
810
810
|
})
|
811
|
-
],
|
812
|
-
|
811
|
+
], h.prototype, "itemRoles", void 0);
|
812
|
+
f([
|
813
813
|
A({ type: String })
|
814
|
-
],
|
815
|
-
|
814
|
+
], h.prototype, "innerRole", void 0);
|
815
|
+
f([
|
816
816
|
A({ type: String })
|
817
|
-
],
|
818
|
-
|
817
|
+
], h.prototype, "innerAriaLabel", void 0);
|
818
|
+
f([
|
819
819
|
A({ type: Boolean })
|
820
|
-
],
|
821
|
-
|
820
|
+
], h.prototype, "rootTabbable", void 0);
|
821
|
+
f([
|
822
822
|
A({ type: Boolean, reflect: !0 }),
|
823
823
|
y(function(n) {
|
824
824
|
var e, t;
|
@@ -827,14 +827,14 @@ h([
|
|
827
827
|
this.previousTabindex = i, i && i.setAttribute("tabindex", "-1");
|
828
828
|
} else !n && this.previousTabindex && (this.previousTabindex.setAttribute("tabindex", "0"), this.previousTabindex = null);
|
829
829
|
})
|
830
|
-
],
|
830
|
+
], h.prototype, "noninteractive", void 0);
|
831
831
|
/**
|
832
832
|
* @license
|
833
833
|
* Copyright 2021 Google LLC
|
834
834
|
* SPDX-LIcense-Identifier: Apache-2.0
|
835
835
|
*/
|
836
|
-
const
|
836
|
+
const ue = H`@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}`;
|
837
837
|
export {
|
838
|
-
|
839
|
-
|
838
|
+
h as L,
|
839
|
+
ue as s
|
840
840
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";const h=require("./tslib.es6-CHeFCc6E.js"),F=require("./query-assigned-elements-
|
1
|
+
"use strict";const h=require("./tslib.es6-CHeFCc6E.js"),F=require("./query-assigned-elements-BQszEgac.js"),B=require("./mwc-list-item.css-CO1JlA8e.js"),K=require("./base-element-5ZU-p99q.js"),C=require("./observer-N9cgkDqh.js"),D=require("./utils-wMBJ9n_n.js"),A=require("./property-BRKnMYJe.js"),V=require("./query-BvlE-gMJ.js"),k=require("./query-assigned-nodes-9DFnkxV8.js"),W=require("./if-defined-B7G84qob.js");/**
|
2
2
|
* @license
|
3
3
|
* Copyright 2020 Google LLC
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|