@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
@@ -1,24 +1,30 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import { B as
|
5
|
-
import { o as
|
6
|
-
import { i as
|
7
|
-
import { n as
|
8
|
-
import { i as
|
9
|
-
import { o as
|
10
|
-
import { l as U } from "./if-defined-
|
1
|
+
import { f as p } from "./tslib.es6-f3e988cd.mjs";
|
2
|
+
import { i as z, e as B, x as P } from "./query-assigned-elements-4a39219d.mjs";
|
3
|
+
import { L as H } from "./mwc-list-item-base-fe4398c3.mjs";
|
4
|
+
import { B as K } from "./base-element-67ae173f.mjs";
|
5
|
+
import { o as L } from "./observer-be7b92e2.mjs";
|
6
|
+
import { i as V, d as X, b as G } from "./utils-2932417c.mjs";
|
7
|
+
import { n as I } from "./property-9b6ea53b.mjs";
|
8
|
+
import { i as $ } from "./query-d843aa92.mjs";
|
9
|
+
import { o as k } from "./query-assigned-nodes-df691e78.mjs";
|
10
|
+
import { l as U } from "./if-defined-c367f208.mjs";
|
11
|
+
/**
|
12
|
+
* @license
|
13
|
+
* Copyright 2021 Google LLC
|
14
|
+
* SPDX-LIcense-Identifier: Apache-2.0
|
15
|
+
*/
|
16
|
+
const j = z`:host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;height:48px;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mdc-list-side-padding, 16px);padding-right:var(--mdc-list-side-padding, 16px);outline:none;height:48px;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host:focus{outline:none}:host([activated]){color:#6200ee;color:var(--mdc-theme-primary, #6200ee);--mdc-ripple-color: var( --mdc-theme-primary, #6200ee )}:host([activated]) .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host([activated]) .fake-activated-ripple::before{position:absolute;display:block;top:0;bottom:0;left:0;right:0;width:100%;height:100%;pointer-events:none;z-index:1;content:"";opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12);background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-deprecated-list-item__graphic{flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;display:inline-flex}.mdc-deprecated-list-item__graphic ::slotted(*){flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;width:100%;height:100%;text-align:center}.mdc-deprecated-list-item__meta{width:var(--mdc-list-item-meta-size, 24px);height:var(--mdc-list-item-meta-size, 24px);margin-left:auto;margin-right:0;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-item__meta.multi{width:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:var(--mdc-list-item-meta-size, 24px);line-height:var(--mdc-list-item-meta-size, 24px)}.mdc-deprecated-list-item__meta ::slotted(.material-icons),.mdc-deprecated-list-item__meta ::slotted(mwc-icon){line-height:var(--mdc-list-item-meta-size, 24px) !important}.mdc-deprecated-list-item__meta ::slotted(:not(.material-icons):not(mwc-icon)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit)}[dir=rtl] .mdc-deprecated-list-item__meta,.mdc-deprecated-list-item__meta[dir=rtl]{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:100%;height:100%}.mdc-deprecated-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-deprecated-list-item__text ::slotted([for]),.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;margin-bottom:-20px;display:block}.mdc-deprecated-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-deprecated-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;display:block}.mdc-deprecated-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}* ::slotted(a),a{color:inherit;text-decoration:none}:host([twoline]){height:72px}:host([twoline]) .mdc-deprecated-list-item__text{align-self:flex-start}:host([disabled]),:host([noninteractive]){cursor:default;pointer-events:none}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){opacity:.38}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__primary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__secondary-text ::slotted(*){color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-deprecated-list-item__secondary-text ::slotted(*){color:rgba(0, 0, 0, 0.54);color:var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54))}.mdc-deprecated-list-item__graphic ::slotted(*){background-color:transparent;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-group__subheader ::slotted(*){color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 40px);height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 40px);line-height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 40px) !important}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){border-radius:50%}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 16px)}[dir=rtl] :host([graphic=avatar]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=medium]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=large]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=avatar]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=medium]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=large]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=control]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 16px);margin-right:0}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 24px);height:var(--mdc-list-item-graphic-size, 24px);margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 32px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 24px);line-height:var(--mdc-list-item-graphic-size, 24px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 24px) !important}[dir=rtl] :host([graphic=icon]) .mdc-deprecated-list-item__graphic,:host([graphic=icon]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 32px);margin-right:0}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:56px}:host([graphic=medium]:not([twoLine])),:host([graphic=large]:not([twoLine])){height:72px}:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 56px);height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic.multi,:host([graphic=large]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(*),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 56px);line-height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 56px) !important}:host([graphic=large]){padding-left:0px}`;
|
11
17
|
/**
|
12
18
|
* @license
|
13
19
|
* Copyright 2020 Google LLC
|
14
20
|
* SPDX-License-Identifier: Apache-2.0
|
15
21
|
*/
|
16
|
-
let
|
22
|
+
let F = class extends H {
|
17
23
|
};
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
],
|
24
|
+
F.styles = [j];
|
25
|
+
F = p([
|
26
|
+
B("mwc-list-item")
|
27
|
+
], F);
|
22
28
|
/**
|
23
29
|
* @license
|
24
30
|
* Copyright 2016 Google Inc.
|
@@ -44,36 +50,36 @@ D = h([
|
|
44
50
|
var Y = (
|
45
51
|
/** @class */
|
46
52
|
function() {
|
47
|
-
function
|
53
|
+
function r(e) {
|
48
54
|
e === void 0 && (e = {}), this.adapter = e;
|
49
55
|
}
|
50
|
-
return Object.defineProperty(
|
56
|
+
return Object.defineProperty(r, "cssClasses", {
|
51
57
|
get: function() {
|
52
58
|
return {};
|
53
59
|
},
|
54
60
|
enumerable: !1,
|
55
61
|
configurable: !0
|
56
|
-
}), Object.defineProperty(
|
62
|
+
}), Object.defineProperty(r, "strings", {
|
57
63
|
get: function() {
|
58
64
|
return {};
|
59
65
|
},
|
60
66
|
enumerable: !1,
|
61
67
|
configurable: !0
|
62
|
-
}), Object.defineProperty(
|
68
|
+
}), Object.defineProperty(r, "numbers", {
|
63
69
|
get: function() {
|
64
70
|
return {};
|
65
71
|
},
|
66
72
|
enumerable: !1,
|
67
73
|
configurable: !0
|
68
|
-
}), Object.defineProperty(
|
74
|
+
}), Object.defineProperty(r, "defaultAdapter", {
|
69
75
|
get: function() {
|
70
76
|
return {};
|
71
77
|
},
|
72
78
|
enumerable: !1,
|
73
79
|
configurable: !0
|
74
|
-
}),
|
75
|
-
},
|
76
|
-
},
|
80
|
+
}), r.prototype.init = function() {
|
81
|
+
}, r.prototype.destroy = function() {
|
82
|
+
}, r;
|
77
83
|
}()
|
78
84
|
);
|
79
85
|
/**
|
@@ -98,7 +104,7 @@ var Y = (
|
|
98
104
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
99
105
|
* THE SOFTWARE.
|
100
106
|
*/
|
101
|
-
var
|
107
|
+
var a = {
|
102
108
|
UNKNOWN: "Unknown",
|
103
109
|
BACKSPACE: "Backspace",
|
104
110
|
ENTER: "Enter",
|
@@ -114,22 +120,22 @@ var d = {
|
|
114
120
|
DELETE: "Delete",
|
115
121
|
ESCAPE: "Escape",
|
116
122
|
TAB: "Tab"
|
117
|
-
},
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
var
|
123
|
+
}, c = /* @__PURE__ */ new Set();
|
124
|
+
c.add(a.BACKSPACE);
|
125
|
+
c.add(a.ENTER);
|
126
|
+
c.add(a.SPACEBAR);
|
127
|
+
c.add(a.PAGE_UP);
|
128
|
+
c.add(a.PAGE_DOWN);
|
129
|
+
c.add(a.END);
|
130
|
+
c.add(a.HOME);
|
131
|
+
c.add(a.ARROW_LEFT);
|
132
|
+
c.add(a.ARROW_UP);
|
133
|
+
c.add(a.ARROW_RIGHT);
|
134
|
+
c.add(a.ARROW_DOWN);
|
135
|
+
c.add(a.DELETE);
|
136
|
+
c.add(a.ESCAPE);
|
137
|
+
c.add(a.TAB);
|
138
|
+
var h = {
|
133
139
|
BACKSPACE: 8,
|
134
140
|
ENTER: 13,
|
135
141
|
SPACEBAR: 32,
|
@@ -144,36 +150,36 @@ var u = {
|
|
144
150
|
DELETE: 46,
|
145
151
|
ESCAPE: 27,
|
146
152
|
TAB: 9
|
147
|
-
},
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
var
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
function
|
172
|
-
var e =
|
173
|
-
if (
|
153
|
+
}, l = /* @__PURE__ */ new Map();
|
154
|
+
l.set(h.BACKSPACE, a.BACKSPACE);
|
155
|
+
l.set(h.ENTER, a.ENTER);
|
156
|
+
l.set(h.SPACEBAR, a.SPACEBAR);
|
157
|
+
l.set(h.PAGE_UP, a.PAGE_UP);
|
158
|
+
l.set(h.PAGE_DOWN, a.PAGE_DOWN);
|
159
|
+
l.set(h.END, a.END);
|
160
|
+
l.set(h.HOME, a.HOME);
|
161
|
+
l.set(h.ARROW_LEFT, a.ARROW_LEFT);
|
162
|
+
l.set(h.ARROW_UP, a.ARROW_UP);
|
163
|
+
l.set(h.ARROW_RIGHT, a.ARROW_RIGHT);
|
164
|
+
l.set(h.ARROW_DOWN, a.ARROW_DOWN);
|
165
|
+
l.set(h.DELETE, a.DELETE);
|
166
|
+
l.set(h.ESCAPE, a.ESCAPE);
|
167
|
+
l.set(h.TAB, a.TAB);
|
168
|
+
var S = /* @__PURE__ */ new Set();
|
169
|
+
S.add(a.PAGE_UP);
|
170
|
+
S.add(a.PAGE_DOWN);
|
171
|
+
S.add(a.END);
|
172
|
+
S.add(a.HOME);
|
173
|
+
S.add(a.ARROW_LEFT);
|
174
|
+
S.add(a.ARROW_UP);
|
175
|
+
S.add(a.ARROW_RIGHT);
|
176
|
+
S.add(a.ARROW_DOWN);
|
177
|
+
function A(r) {
|
178
|
+
var e = r.key;
|
179
|
+
if (c.has(e))
|
174
180
|
return e;
|
175
|
-
var t =
|
176
|
-
return t ||
|
181
|
+
var t = l.get(r.keyCode);
|
182
|
+
return t || a.UNKNOWN;
|
177
183
|
}
|
178
184
|
/**
|
179
185
|
* @license
|
@@ -197,7 +203,7 @@ function S(n) {
|
|
197
203
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
198
204
|
* THE SOFTWARE.
|
199
205
|
*/
|
200
|
-
var
|
206
|
+
var x, E, n = {
|
201
207
|
LIST_ITEM_ACTIVATED_CLASS: "mdc-list-item--activated",
|
202
208
|
LIST_ITEM_CLASS: "mdc-list-item",
|
203
209
|
LIST_ITEM_DISABLED_CLASS: "mdc-list-item--disabled",
|
@@ -206,8 +212,8 @@ var T, _, r = {
|
|
206
212
|
LIST_ITEM_PRIMARY_TEXT_CLASS: "mdc-list-item__primary-text",
|
207
213
|
ROOT: "mdc-list"
|
208
214
|
};
|
209
|
-
|
210
|
-
var
|
215
|
+
x = {}, x["" + n.LIST_ITEM_ACTIVATED_CLASS] = "mdc-list-item--activated", x["" + n.LIST_ITEM_CLASS] = "mdc-list-item", x["" + n.LIST_ITEM_DISABLED_CLASS] = "mdc-list-item--disabled", x["" + n.LIST_ITEM_SELECTED_CLASS] = "mdc-list-item--selected", x["" + n.LIST_ITEM_PRIMARY_TEXT_CLASS] = "mdc-list-item__primary-text", x["" + n.ROOT] = "mdc-list";
|
216
|
+
var v = (E = {}, E["" + n.LIST_ITEM_ACTIVATED_CLASS] = "mdc-deprecated-list-item--activated", E["" + n.LIST_ITEM_CLASS] = "mdc-deprecated-list-item", E["" + n.LIST_ITEM_DISABLED_CLASS] = "mdc-deprecated-list-item--disabled", E["" + n.LIST_ITEM_SELECTED_CLASS] = "mdc-deprecated-list-item--selected", E["" + n.LIST_ITEM_TEXT_CLASS] = "mdc-deprecated-list-item__text", E["" + n.LIST_ITEM_PRIMARY_TEXT_CLASS] = "mdc-deprecated-list-item__primary-text", E["" + n.ROOT] = "mdc-deprecated-list", E), C = {
|
211
217
|
ACTION_EVENT: "MDCList:action",
|
212
218
|
SELECTION_CHANGE_EVENT: "MDCList:selectionChange",
|
213
219
|
ARIA_CHECKED: "aria-checked",
|
@@ -224,21 +230,21 @@ var L = (_ = {}, _["" + r.LIST_ITEM_ACTIVATED_CLASS] = "mdc-deprecated-list-item
|
|
224
230
|
CHECKBOX_RADIO_SELECTOR: 'input[type="checkbox"], input[type="radio"]',
|
225
231
|
CHECKBOX_SELECTOR: 'input[type="checkbox"]',
|
226
232
|
CHILD_ELEMENTS_TO_TOGGLE_TABINDEX: `
|
227
|
-
.` +
|
228
|
-
.` +
|
229
|
-
.` +
|
230
|
-
.` +
|
233
|
+
.` + n.LIST_ITEM_CLASS + ` button:not(:disabled),
|
234
|
+
.` + n.LIST_ITEM_CLASS + ` a,
|
235
|
+
.` + v[n.LIST_ITEM_CLASS] + ` button:not(:disabled),
|
236
|
+
.` + v[n.LIST_ITEM_CLASS] + ` a
|
231
237
|
`,
|
232
238
|
DEPRECATED_SELECTOR: ".mdc-deprecated-list",
|
233
239
|
FOCUSABLE_CHILD_ELEMENTS: `
|
234
|
-
.` +
|
235
|
-
.` +
|
236
|
-
.` +
|
237
|
-
.` +
|
238
|
-
.` +
|
239
|
-
.` +
|
240
|
-
.` +
|
241
|
-
.` +
|
240
|
+
.` + n.LIST_ITEM_CLASS + ` button:not(:disabled),
|
241
|
+
.` + n.LIST_ITEM_CLASS + ` a,
|
242
|
+
.` + n.LIST_ITEM_CLASS + ` input[type="radio"]:not(:disabled),
|
243
|
+
.` + n.LIST_ITEM_CLASS + ` input[type="checkbox"]:not(:disabled),
|
244
|
+
.` + v[n.LIST_ITEM_CLASS] + ` button:not(:disabled),
|
245
|
+
.` + v[n.LIST_ITEM_CLASS] + ` a,
|
246
|
+
.` + v[n.LIST_ITEM_CLASS] + ` input[type="radio"]:not(:disabled),
|
247
|
+
.` + v[n.LIST_ITEM_CLASS] + ` input[type="checkbox"]:not(:disabled)
|
242
248
|
`,
|
243
249
|
RADIO_SELECTOR: 'input[type="radio"]',
|
244
250
|
SELECTED_ITEM_SELECTOR: '[aria-selected="true"], [aria-current="true"]'
|
@@ -251,39 +257,39 @@ var L = (_ = {}, _["" + r.LIST_ITEM_ACTIVATED_CLASS] = "mdc-deprecated-list-item
|
|
251
257
|
* Copyright 2020 Google LLC
|
252
258
|
* SPDX-License-Identifier: Apache-2.0
|
253
259
|
*/
|
254
|
-
const
|
255
|
-
const t = Array.from(
|
256
|
-
let
|
257
|
-
for (;
|
258
|
-
const
|
259
|
-
if (
|
260
|
-
|
260
|
+
const D = (r, e) => r - e, q = (r, e) => {
|
261
|
+
const t = Array.from(r), i = Array.from(e), s = { added: [], removed: [] }, d = t.sort(D), o = i.sort(D);
|
262
|
+
let _ = 0, b = 0;
|
263
|
+
for (; _ < d.length || b < o.length; ) {
|
264
|
+
const f = d[_], g = o[b];
|
265
|
+
if (f === g) {
|
266
|
+
_++, b++;
|
261
267
|
continue;
|
262
268
|
}
|
263
|
-
if (
|
264
|
-
s.removed.push(
|
269
|
+
if (f !== void 0 && (g === void 0 || f < g)) {
|
270
|
+
s.removed.push(f), _++;
|
265
271
|
continue;
|
266
272
|
}
|
267
|
-
if (
|
268
|
-
s.added.push(
|
273
|
+
if (g !== void 0 && (f === void 0 || g < f)) {
|
274
|
+
s.added.push(g), b++;
|
269
275
|
continue;
|
270
276
|
}
|
271
277
|
}
|
272
278
|
return s;
|
273
279
|
}, Z = ["input", "button", "textarea", "select"];
|
274
|
-
function
|
275
|
-
return
|
280
|
+
function R(r) {
|
281
|
+
return r instanceof Set;
|
276
282
|
}
|
277
|
-
const
|
278
|
-
const e =
|
279
|
-
return
|
283
|
+
const O = (r) => {
|
284
|
+
const e = r === m.UNSET_INDEX ? /* @__PURE__ */ new Set() : r;
|
285
|
+
return R(e) ? new Set(e) : /* @__PURE__ */ new Set([e]);
|
280
286
|
};
|
281
|
-
class
|
287
|
+
class N extends Y {
|
282
288
|
constructor(e) {
|
283
|
-
super(Object.assign(Object.assign({},
|
289
|
+
super(Object.assign(Object.assign({}, N.defaultAdapter), e)), this.isMulti_ = !1, this.wrapFocus_ = !1, this.isVertical_ = !0, this.selectedIndex_ = m.UNSET_INDEX, this.focusedItemIndex_ = m.UNSET_INDEX, this.useActivatedClass_ = !1, this.ariaCurrentAttrValue_ = null;
|
284
290
|
}
|
285
291
|
static get strings() {
|
286
|
-
return
|
292
|
+
return C;
|
287
293
|
}
|
288
294
|
static get numbers() {
|
289
295
|
return m;
|
@@ -328,13 +334,13 @@ class w extends Y {
|
|
328
334
|
this.isMulti_ = e;
|
329
335
|
const t = this.selectedIndex_;
|
330
336
|
if (e) {
|
331
|
-
if (!
|
337
|
+
if (!R(t)) {
|
332
338
|
const i = t === m.UNSET_INDEX;
|
333
339
|
this.selectedIndex_ = i ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([t]);
|
334
340
|
}
|
335
|
-
} else if (
|
341
|
+
} else if (R(t))
|
336
342
|
if (t.size) {
|
337
|
-
const i = Array.from(t).sort(
|
343
|
+
const i = Array.from(t).sort(D);
|
338
344
|
this.selectedIndex_ = i[0];
|
339
345
|
} else
|
340
346
|
this.selectedIndex_ = m.UNSET_INDEX;
|
@@ -355,7 +361,7 @@ class w extends Y {
|
|
355
361
|
return this.selectedIndex_;
|
356
362
|
}
|
357
363
|
setSelectedIndex(e) {
|
358
|
-
this.isIndexValid_(e) && (this.isMulti_ ? this.setMultiSelectionAtIndex_(
|
364
|
+
this.isIndexValid_(e) && (this.isMulti_ ? this.setMultiSelectionAtIndex_(O(e)) : this.setSingleSelectionAtIndex_(e));
|
359
365
|
}
|
360
366
|
/**
|
361
367
|
* Focus in handler for the list items.
|
@@ -375,30 +381,30 @@ class w extends Y {
|
|
375
381
|
* Key handler for the list.
|
376
382
|
*/
|
377
383
|
handleKeydown(e, t, i) {
|
378
|
-
const s =
|
384
|
+
const s = A(e) === "ArrowLeft", d = A(e) === "ArrowUp", o = A(e) === "ArrowRight", _ = A(e) === "ArrowDown", b = A(e) === "Home", f = A(e) === "End", g = A(e) === "Enter", W = A(e) === "Spacebar";
|
379
385
|
if (this.adapter.isRootFocused()) {
|
380
|
-
|
386
|
+
d || f ? (e.preventDefault(), this.focusLastElement()) : (_ || b) && (e.preventDefault(), this.focusFirstElement());
|
381
387
|
return;
|
382
388
|
}
|
383
|
-
let
|
384
|
-
if (
|
389
|
+
let T = this.adapter.getFocusedElementIndex();
|
390
|
+
if (T === -1 && (T = i, T < 0))
|
385
391
|
return;
|
386
|
-
let
|
387
|
-
if (this.isVertical_ &&
|
388
|
-
this.preventDefaultEvent(e),
|
389
|
-
else if (this.isVertical_ &&
|
390
|
-
this.preventDefaultEvent(e),
|
391
|
-
else if (
|
392
|
-
this.preventDefaultEvent(e),
|
393
|
-
else if (
|
394
|
-
this.preventDefaultEvent(e),
|
395
|
-
else if ((
|
392
|
+
let y;
|
393
|
+
if (this.isVertical_ && _ || !this.isVertical_ && o)
|
394
|
+
this.preventDefaultEvent(e), y = this.focusNextElement(T);
|
395
|
+
else if (this.isVertical_ && d || !this.isVertical_ && s)
|
396
|
+
this.preventDefaultEvent(e), y = this.focusPrevElement(T);
|
397
|
+
else if (b)
|
398
|
+
this.preventDefaultEvent(e), y = this.focusFirstElement();
|
399
|
+
else if (f)
|
400
|
+
this.preventDefaultEvent(e), y = this.focusLastElement();
|
401
|
+
else if ((g || W) && t) {
|
396
402
|
const M = e.target;
|
397
|
-
if (M && M.tagName === "A" &&
|
403
|
+
if (M && M.tagName === "A" && g)
|
398
404
|
return;
|
399
|
-
this.preventDefaultEvent(e), this.setSelectedIndexOnAction_(
|
405
|
+
this.preventDefaultEvent(e), this.setSelectedIndexOnAction_(T, !0);
|
400
406
|
}
|
401
|
-
this.focusedItemIndex_ =
|
407
|
+
this.focusedItemIndex_ = T, y !== void 0 && (this.setTabindexAtIndex_(y), this.focusedItemIndex_ = y);
|
402
408
|
}
|
403
409
|
/**
|
404
410
|
* Click handler for the list.
|
@@ -457,12 +463,12 @@ class w extends Y {
|
|
457
463
|
this.selectedIndex_ !== e && (this.selectedIndex_ !== m.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
464
|
}
|
459
465
|
setMultiSelectionAtIndex_(e, t = !0) {
|
460
|
-
const i =
|
466
|
+
const i = O(this.selectedIndex_), s = q(i, e);
|
461
467
|
if (!(!s.removed.length && !s.added.length)) {
|
462
|
-
for (const
|
463
|
-
t && this.adapter.setSelectedStateForElementIndex(
|
464
|
-
for (const
|
465
|
-
t && this.adapter.setSelectedStateForElementIndex(
|
468
|
+
for (const d of s.removed)
|
469
|
+
t && this.adapter.setSelectedStateForElementIndex(d, !1), this.useActivatedClass_ && this.adapter.setActivatedStateForElementIndex(d, !1);
|
470
|
+
for (const d of s.added)
|
471
|
+
t && this.adapter.setSelectedStateForElementIndex(d, !0), this.useActivatedClass_ && this.adapter.setActivatedStateForElementIndex(d, !0);
|
466
472
|
this.selectedIndex_ = e, this.adapter.notifySelected(e, s);
|
467
473
|
}
|
468
474
|
}
|
@@ -470,8 +476,8 @@ class w extends Y {
|
|
470
476
|
* Sets aria attribute for single selection at given index.
|
471
477
|
*/
|
472
478
|
setAriaForSingleSelectionAtIndex_(e) {
|
473
|
-
this.selectedIndex_ === m.UNSET_INDEX && (this.ariaCurrentAttrValue_ = this.adapter.getAttributeForElementIndex(e,
|
474
|
-
const t = this.ariaCurrentAttrValue_ !== null, i = t ?
|
479
|
+
this.selectedIndex_ === m.UNSET_INDEX && (this.ariaCurrentAttrValue_ = this.adapter.getAttributeForElementIndex(e, C.ARIA_CURRENT));
|
480
|
+
const t = this.ariaCurrentAttrValue_ !== null, i = t ? C.ARIA_CURRENT : C.ARIA_SELECTED;
|
475
481
|
this.selectedIndex_ !== m.UNSET_INDEX && this.adapter.setAttributeForElementIndex(this.selectedIndex_, i, "false");
|
476
482
|
const s = t ? this.ariaCurrentAttrValue_ : "true";
|
477
483
|
this.adapter.setAttributeForElementIndex(e, i, s);
|
@@ -481,7 +487,7 @@ class w extends Y {
|
|
481
487
|
}
|
482
488
|
setTabindexToFirstSelectedItem_() {
|
483
489
|
let e = 0;
|
484
|
-
typeof this.selectedIndex_ == "number" && this.selectedIndex_ !== m.UNSET_INDEX ? e = this.selectedIndex_ :
|
490
|
+
typeof this.selectedIndex_ == "number" && this.selectedIndex_ !== m.UNSET_INDEX ? e = this.selectedIndex_ : R(this.selectedIndex_) && this.selectedIndex_.size > 0 && (e = Math.min(...this.selectedIndex_)), this.setTabindexAtIndex_(e);
|
485
491
|
}
|
486
492
|
isIndexValid_(e) {
|
487
493
|
if (e instanceof Set) {
|
@@ -521,8 +527,8 @@ class w extends Y {
|
|
521
527
|
toggleMultiAtIndex(e, t, i = !0) {
|
522
528
|
let s = !1;
|
523
529
|
t === void 0 ? s = !this.adapter.getSelectedStateForElementIndex(e) : s = t;
|
524
|
-
const
|
525
|
-
s ?
|
530
|
+
const d = O(this.selectedIndex_);
|
531
|
+
s ? d.add(e) : d.delete(e), this.setMultiSelectionAtIndex_(d, i);
|
526
532
|
}
|
527
533
|
}
|
528
534
|
/**
|
@@ -530,22 +536,22 @@ class w extends Y {
|
|
530
536
|
* Copyright 2020 Google LLC
|
531
537
|
* SPDX-License-Identifier: Apache-2.0
|
532
538
|
*/
|
533
|
-
function J(
|
539
|
+
function J(r, e = 50) {
|
534
540
|
let t;
|
535
541
|
return function(i = !0) {
|
536
542
|
clearTimeout(t), t = setTimeout(() => {
|
537
|
-
|
543
|
+
r(i);
|
538
544
|
}, e);
|
539
545
|
};
|
540
546
|
}
|
541
|
-
const
|
547
|
+
const w = (r) => r.hasAttribute("mwc-list-item");
|
542
548
|
function Q() {
|
543
|
-
const
|
544
|
-
this.itemsReady = new Promise((e) => this.itemsReadyResolver = e),
|
549
|
+
const r = this.itemsReadyResolver;
|
550
|
+
this.itemsReady = new Promise((e) => this.itemsReadyResolver = e), r();
|
545
551
|
}
|
546
|
-
class
|
552
|
+
class u extends K {
|
547
553
|
constructor() {
|
548
|
-
super(), this.mdcAdapter = null, this.mdcFoundationClass =
|
554
|
+
super(), this.mdcAdapter = null, this.mdcFoundationClass = N, 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
555
|
}, this.itemsReady = Promise.resolve([]), this.items_ = [];
|
550
556
|
const e = J(this.layout.bind(this));
|
551
557
|
this.debouncedLayout = (t = !0) => {
|
@@ -563,24 +569,24 @@ class f extends X {
|
|
563
569
|
updateItems() {
|
564
570
|
var e;
|
565
571
|
const t = (e = this.assignedElements) !== null && e !== void 0 ? e : [], i = [];
|
566
|
-
for (const
|
567
|
-
|
572
|
+
for (const o of t)
|
573
|
+
w(o) && (i.push(o), o._managingList = this), o.hasAttribute("divider") && !o.hasAttribute("role") && o.setAttribute("role", "separator");
|
568
574
|
this.items_ = i;
|
569
575
|
const s = /* @__PURE__ */ new Set();
|
570
|
-
if (this.items_.forEach((
|
571
|
-
this.itemRoles ?
|
576
|
+
if (this.items_.forEach((o, _) => {
|
577
|
+
this.itemRoles ? o.setAttribute("role", this.itemRoles) : o.removeAttribute("role"), o.selected && s.add(_);
|
572
578
|
}), this.multi)
|
573
579
|
this.select(s);
|
574
580
|
else {
|
575
|
-
const
|
576
|
-
this.select(
|
581
|
+
const o = s.size ? s.entries().next().value[1] : -1;
|
582
|
+
this.select(o);
|
577
583
|
}
|
578
|
-
const
|
579
|
-
this.dispatchEvent(
|
584
|
+
const d = new Event("items-updated", { bubbles: !0, composed: !0 });
|
585
|
+
this.dispatchEvent(d);
|
580
586
|
}
|
581
587
|
get selected() {
|
582
588
|
const e = this.index;
|
583
|
-
if (!
|
589
|
+
if (!R(e))
|
584
590
|
return e === -1 ? null : this.items[e];
|
585
591
|
const t = [];
|
586
592
|
for (const i of e)
|
@@ -633,7 +639,7 @@ class f extends X {
|
|
633
639
|
}
|
634
640
|
onKeydown(e) {
|
635
641
|
if (this.mdcFoundation && this.mdcRoot) {
|
636
|
-
const t = this.getIndexOfTarget(e), i = e.target, s =
|
642
|
+
const t = this.getIndexOfTarget(e), i = e.target, s = w(i);
|
637
643
|
this.mdcFoundation.handleKeydown(e, s, t);
|
638
644
|
}
|
639
645
|
}
|
@@ -642,16 +648,16 @@ class f extends X {
|
|
642
648
|
let t = this.getIndexOfTarget(e);
|
643
649
|
if (t === -1 && (this.layout(), t = this.getIndexOfTarget(e), t === -1) || this.items[t].disabled)
|
644
650
|
return;
|
645
|
-
const s = e.detail.selected,
|
646
|
-
this.mdcFoundation.handleSingleSelection(t,
|
651
|
+
const s = e.detail.selected, d = e.detail.source;
|
652
|
+
this.mdcFoundation.handleSingleSelection(t, d === "interaction", s), e.stopPropagation();
|
647
653
|
}
|
648
654
|
}
|
649
655
|
getIndexOfTarget(e) {
|
650
656
|
const t = this.items, i = e.composedPath();
|
651
657
|
for (const s of i) {
|
652
|
-
let
|
653
|
-
if (
|
654
|
-
return
|
658
|
+
let d = -1;
|
659
|
+
if (V(s) && w(s) && (d = t.indexOf(s)), d !== -1)
|
660
|
+
return d;
|
655
661
|
}
|
656
662
|
return -1;
|
657
663
|
}
|
@@ -691,7 +697,7 @@ class f extends X {
|
|
691
697
|
const s = new CustomEvent("selected", i);
|
692
698
|
this.dispatchEvent(s);
|
693
699
|
},
|
694
|
-
isFocusInsideList: () =>
|
700
|
+
isFocusInsideList: () => X(this),
|
695
701
|
isRootFocused: () => {
|
696
702
|
const e = this.mdcRoot;
|
697
703
|
return e.getRootNode().activeElement === e;
|
@@ -746,12 +752,12 @@ class f extends X {
|
|
746
752
|
getFocusedItemIndex() {
|
747
753
|
if (!this.mdcRoot || !this.items.length)
|
748
754
|
return -1;
|
749
|
-
const e =
|
755
|
+
const e = G();
|
750
756
|
if (!e.length)
|
751
757
|
return -1;
|
752
758
|
for (let t = e.length - 1; t >= 0; t--) {
|
753
759
|
const i = e[t];
|
754
|
-
if (
|
760
|
+
if (w(i))
|
755
761
|
return this.items.indexOf(i);
|
756
762
|
}
|
757
763
|
return -1;
|
@@ -773,69 +779,62 @@ class f extends X {
|
|
773
779
|
e && e.blur();
|
774
780
|
}
|
775
781
|
}
|
776
|
-
|
777
|
-
|
778
|
-
],
|
779
|
-
|
780
|
-
|
781
|
-
],
|
782
|
-
|
783
|
-
|
784
|
-
],
|
785
|
-
|
786
|
-
|
787
|
-
],
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
this.mdcFoundation && this.mdcFoundation.setUseActivatedClass(
|
782
|
+
p([
|
783
|
+
I({ type: String })
|
784
|
+
], u.prototype, "emptyMessage", void 0);
|
785
|
+
p([
|
786
|
+
$(".mdc-deprecated-list")
|
787
|
+
], u.prototype, "mdcRoot", void 0);
|
788
|
+
p([
|
789
|
+
k("", !0, "*")
|
790
|
+
], u.prototype, "assignedElements", void 0);
|
791
|
+
p([
|
792
|
+
k("", !0, '[tabindex="0"]')
|
793
|
+
], u.prototype, "tabbableElements", void 0);
|
794
|
+
p([
|
795
|
+
I({ type: Boolean }),
|
796
|
+
L(function(r) {
|
797
|
+
this.mdcFoundation && this.mdcFoundation.setUseActivatedClass(r);
|
792
798
|
})
|
793
|
-
],
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
this.mdcFoundation && this.mdcFoundation.setMulti(
|
799
|
+
], u.prototype, "activatable", void 0);
|
800
|
+
p([
|
801
|
+
I({ type: Boolean }),
|
802
|
+
L(function(r, e) {
|
803
|
+
this.mdcFoundation && this.mdcFoundation.setMulti(r), e !== void 0 && this.layout();
|
798
804
|
})
|
799
|
-
],
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
this.mdcFoundation && this.mdcFoundation.setWrapFocus(
|
805
|
+
], u.prototype, "multi", void 0);
|
806
|
+
p([
|
807
|
+
I({ type: Boolean }),
|
808
|
+
L(function(r) {
|
809
|
+
this.mdcFoundation && this.mdcFoundation.setWrapFocus(r);
|
804
810
|
})
|
805
|
-
],
|
806
|
-
|
807
|
-
|
808
|
-
|
811
|
+
], u.prototype, "wrapFocus", void 0);
|
812
|
+
p([
|
813
|
+
I({ type: String }),
|
814
|
+
L(function(r, e) {
|
809
815
|
e !== void 0 && this.updateItems();
|
810
816
|
})
|
811
|
-
],
|
812
|
-
|
813
|
-
|
814
|
-
],
|
815
|
-
|
816
|
-
|
817
|
-
],
|
818
|
-
|
819
|
-
|
820
|
-
],
|
821
|
-
|
822
|
-
|
823
|
-
|
817
|
+
], u.prototype, "itemRoles", void 0);
|
818
|
+
p([
|
819
|
+
I({ type: String })
|
820
|
+
], u.prototype, "innerRole", void 0);
|
821
|
+
p([
|
822
|
+
I({ type: String })
|
823
|
+
], u.prototype, "innerAriaLabel", void 0);
|
824
|
+
p([
|
825
|
+
I({ type: Boolean })
|
826
|
+
], u.prototype, "rootTabbable", void 0);
|
827
|
+
p([
|
828
|
+
I({ type: Boolean, reflect: !0 }),
|
829
|
+
L(function(r) {
|
824
830
|
var e, t;
|
825
|
-
if (
|
831
|
+
if (r) {
|
826
832
|
const i = (t = (e = this.tabbableElements) === null || e === void 0 ? void 0 : e[0]) !== null && t !== void 0 ? t : null;
|
827
833
|
this.previousTabindex = i, i && i.setAttribute("tabindex", "-1");
|
828
834
|
} else
|
829
|
-
!
|
835
|
+
!r && this.previousTabindex && (this.previousTabindex.setAttribute("tabindex", "0"), this.previousTabindex = null);
|
830
836
|
})
|
831
|
-
],
|
832
|
-
/**
|
833
|
-
* @license
|
834
|
-
* Copyright 2021 Google LLC
|
835
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
836
|
-
*/
|
837
|
-
const me = 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
|
+
], u.prototype, "noninteractive", void 0);
|
838
838
|
export {
|
839
|
-
|
840
|
-
me as s
|
839
|
+
u as L
|
841
840
|
};
|