@covalent/components 6.0.5 → 6.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.
Files changed (174) hide show
  1. package/action-ribbon.js +1 -1
  2. package/action-ribbon.mjs +9 -9
  3. package/alert.js +1 -1
  4. package/alert.mjs +9 -9
  5. package/app-shell.js +1 -1
  6. package/app-shell.mjs +10 -10
  7. package/aria-property-fa2717fe.mjs +41 -0
  8. package/base-element-c3dc926e.mjs +28 -0
  9. package/{base-element.mjs → base-element-d5abe37a.js} +1 -1
  10. package/button.js +1 -1
  11. package/button.mjs +14 -14
  12. package/card.js +1 -1
  13. package/card.mjs +3 -3
  14. package/check-list-item.js +1 -1
  15. package/check-list-item.mjs +18 -18
  16. package/checkbox.js +1 -1
  17. package/checkbox.mjs +16 -16
  18. package/circular-progress.js +1 -1
  19. package/circular-progress.mjs +7 -7
  20. package/class-map-08c84aeb.mjs +62 -0
  21. package/{class-map.mjs → class-map-50b8edb4.js} +3 -3
  22. package/code-snippet.js +1 -1
  23. package/code-snippet.mjs +4 -4
  24. package/{dialog2.mjs → dialog-85c21333.mjs} +9 -9
  25. package/dialog-8ee07177.js +162 -0
  26. package/dialog.js +1 -1
  27. package/dialog.mjs +14 -162
  28. package/directive-helpers-725a181d.mjs +11 -0
  29. package/directive-helpers-fce8cf91.js +5 -0
  30. package/drawer.js +1 -1
  31. package/drawer.mjs +10 -10
  32. package/empty-state.js +1 -1
  33. package/empty-state.mjs +4 -4
  34. package/event-options-3937d997.mjs +14 -0
  35. package/event-options-7bc382d8.js +5 -0
  36. package/form-element-6dbd7afa.mjs +50 -0
  37. package/{form-element.mjs → form-element-d4e7bcdb.js} +1 -1
  38. package/foundation-2334d146.mjs +60 -0
  39. package/{foundation.mjs → foundation-3f55a9dc.js} +3 -3
  40. package/foundation-c580100a.mjs +152 -0
  41. package/icon-button.js +1 -1
  42. package/icon-button.mjs +13 -13
  43. package/icon-check-toggle.js +1 -1
  44. package/icon-check-toggle.mjs +16 -16
  45. package/icon-radio-toggle.js +1 -1
  46. package/icon-radio-toggle.mjs +17 -17
  47. package/icon.js +1 -1
  48. package/icon.mjs +3 -3
  49. package/if-defined-639ed018.mjs +10 -0
  50. package/if-defined-cb12d481.js +5 -0
  51. package/index.js +1 -1
  52. package/index.mjs +39 -39
  53. package/inert.esm-359d4581.mjs +640 -0
  54. package/linear-progress.js +1 -1
  55. package/linear-progress.mjs +9 -9
  56. package/list-170cca53.js +5 -0
  57. package/{list2.mjs → list-28b77a61.mjs} +2 -2
  58. package/list-expansion.js +1 -1
  59. package/list-expansion.mjs +16 -16
  60. package/list-item-26ddcc43.js +8 -0
  61. package/{list-item2.mjs → list-item-c1e72538.mjs} +4 -4
  62. package/list-item.js +1 -1
  63. package/list-item.mjs +18 -8
  64. package/list.js +1 -1
  65. package/list.mjs +20 -5
  66. package/menu.js +1 -1
  67. package/menu.mjs +16 -16
  68. package/mwc-checkbox-base-10e977f2.mjs +198 -0
  69. package/{mwc-checkbox-base.mjs → mwc-checkbox-base-435c1f1d.js} +1 -1
  70. package/{mwc-checkbox.css.mjs → mwc-checkbox.css-956e3d6c.js} +1 -1
  71. package/mwc-checkbox.css-b7abc7fd.mjs +10 -0
  72. package/mwc-drawer-base-b2b772c3.mjs +335 -0
  73. package/{mwc-drawer-base.mjs → mwc-drawer-base-f44fcf34.js} +1 -1
  74. package/{mwc-icon.mjs → mwc-icon-b96fb867.js} +3 -3
  75. package/mwc-icon-c7013880.mjs +26 -0
  76. package/{mwc-line-ripple-directive.mjs → mwc-line-ripple-directive-a97ce725.js} +1 -1
  77. package/mwc-line-ripple-directive-c3e1f04a.mjs +653 -0
  78. package/{mwc-list-base.mjs → mwc-list-base-7d5f7278.js} +1 -1
  79. package/mwc-list-base-c0f8af1c.mjs +840 -0
  80. package/{mwc-list-item-base.mjs → mwc-list-item-base-803b9771.js} +1 -1
  81. package/mwc-list-item-base-acef0223.mjs +202 -0
  82. package/{mwc-list-item.css.mjs → mwc-list-item.css-401e2407.js} +1 -1
  83. package/mwc-list-item.css-b5481d96.mjs +17 -0
  84. package/mwc-menu-base-8970b43d.mjs +1145 -0
  85. package/{mwc-menu-base.mjs → mwc-menu-base-ac49fe54.js} +1 -1
  86. package/{mwc-radio-base.mjs → mwc-radio-base-442d495a.js} +1 -1
  87. package/mwc-radio-base-c29e6f42.mjs +528 -0
  88. package/{mwc-radio.css.mjs → mwc-radio.css-388ad26d.js} +1 -1
  89. package/mwc-radio.css-4694aa9c.mjs +10 -0
  90. package/mwc-slider.css-336f809b.mjs +956 -0
  91. package/{mwc-slider.css.mjs → mwc-slider.css-48f02f1e.js} +16 -16
  92. package/{mwc-tab-base.mjs → mwc-tab-base-1a19b299.js} +1 -1
  93. package/mwc-tab-base-7fb3d339.mjs +694 -0
  94. package/{mwc-top-app-bar-base.mjs → mwc-top-app-bar-base-14e0a018.js} +1 -1
  95. package/mwc-top-app-bar-base-79c87e69.mjs +380 -0
  96. package/nav-list-item.js +1 -1
  97. package/nav-list-item.mjs +14 -14
  98. package/{observer.mjs → observer-a096ab43.js} +1 -1
  99. package/observer-be7b92e2.mjs +32 -0
  100. package/package.json +1 -1
  101. package/{property.mjs → property-074570d1.js} +1 -1
  102. package/property-ca27685b.mjs +20 -0
  103. package/query-1e7846ea.mjs +25 -0
  104. package/query-2ba749b7.js +5 -0
  105. package/query-assigned-elements-514e5265.mjs +615 -0
  106. package/{query-assigned-nodes.mjs → query-assigned-nodes-9ec0fa5f.js} +1 -1
  107. package/query-assigned-nodes-bea12e0c.mjs +17 -0
  108. package/radio-list-item.js +1 -1
  109. package/radio-list-item.mjs +18 -18
  110. package/radio.js +1 -1
  111. package/radio.mjs +17 -17
  112. package/{ripple-handlers.mjs → ripple-handlers-2176f137.js} +7 -7
  113. package/ripple-handlers-227497d3.mjs +761 -0
  114. package/select.js +1 -1
  115. package/select.mjs +20 -20
  116. package/side-sheet.js +1 -1
  117. package/side-sheet.mjs +10 -10
  118. package/slider-range.js +1 -1
  119. package/slider-range.mjs +14 -14
  120. package/slider.js +1 -1
  121. package/slider.mjs +14 -14
  122. package/snackbar.js +1 -1
  123. package/snackbar.mjs +9 -9
  124. package/state-6f7e570d.mjs +12 -0
  125. package/{state.mjs → state-949232e6.js} +1 -1
  126. package/status-header-item.js +1 -1
  127. package/status-header-item.mjs +2 -2
  128. package/status-header.js +1 -1
  129. package/status-header.mjs +3 -3
  130. package/style-map-2cb0fb63.mjs +40 -0
  131. package/{style-map.mjs → style-map-3056a771.js} +1 -1
  132. package/style.css +1 -1
  133. package/switch.js +1 -1
  134. package/switch.mjs +14 -14
  135. package/tab-bar.js +1 -1
  136. package/tab-bar.mjs +13 -13
  137. package/tab.js +1 -1
  138. package/tab.mjs +13 -13
  139. package/text-lockup.js +1 -1
  140. package/text-lockup.mjs +3 -3
  141. package/textarea.js +1 -1
  142. package/textarea.mjs +15 -15
  143. package/{textfield2.mjs → textfield-276b0ded.mjs} +13 -13
  144. package/textfield-507c6a06.js +133 -0
  145. package/textfield.js +1 -1
  146. package/textfield.mjs +41 -132
  147. package/toolbar.js +1 -1
  148. package/toolbar.mjs +8 -8
  149. package/tooltip.js +1 -1
  150. package/tooltip.mjs +6 -6
  151. package/top-app-bar-34e85527.js +6 -0
  152. package/{top-app-bar2.mjs → top-app-bar-a236c3bc.mjs} +1 -1
  153. package/top-app-bar-fixed.js +1 -1
  154. package/top-app-bar-fixed.mjs +9 -9
  155. package/top-app-bar.js +1 -1
  156. package/top-app-bar.mjs +30 -6
  157. package/tree-list-item.js +1 -1
  158. package/tree-list-item.mjs +3 -3
  159. package/tree-list.js +1 -1
  160. package/tree-list.mjs +1 -1
  161. package/{tslib.es6.mjs → tslib.es6-6b53b818.js} +1 -1
  162. package/tslib.es6-b5e819a6.mjs +82 -0
  163. package/typography.js +1 -1
  164. package/typography.mjs +2 -2
  165. package/{utils.mjs → utils-a8190a39.js} +1 -1
  166. package/utils-dc65fdc9.mjs +52 -0
  167. package/directive-helpers.mjs +0 -5
  168. package/event-options.mjs +0 -5
  169. package/if-defined.mjs +0 -5
  170. package/query.mjs +0 -5
  171. /package/{aria-property.mjs → aria-property-849c8816.js} +0 -0
  172. /package/{foundation2.mjs → foundation-e830bd94.js} +0 -0
  173. /package/{inert.esm.mjs → inert.esm-2cee6f2e.js} +0 -0
  174. /package/{query-assigned-elements.mjs → query-assigned-elements-07e38f46.js} +0 -0
@@ -0,0 +1,840 @@
1
+ import { _ as p } from "./tslib.es6-b5e819a6.mjs";
2
+ import { i as z, e as B, y as P } from "./query-assigned-elements-514e5265.mjs";
3
+ import { L as H } from "./mwc-list-item-base-acef0223.mjs";
4
+ import { B as K } from "./base-element-c3dc926e.mjs";
5
+ import { o as L } from "./observer-be7b92e2.mjs";
6
+ import { i as V, b as X, d as G } from "./utils-dc65fdc9.mjs";
7
+ import { e as I } from "./property-ca27685b.mjs";
8
+ import { i as $ } from "./query-1e7846ea.mjs";
9
+ import { o as k } from "./query-assigned-nodes-bea12e0c.mjs";
10
+ import { l as U } from "./if-defined-639ed018.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}`;
17
+ /**
18
+ * @license
19
+ * Copyright 2020 Google LLC
20
+ * SPDX-License-Identifier: Apache-2.0
21
+ */
22
+ let F = class extends H {
23
+ };
24
+ F.styles = [j];
25
+ F = p([
26
+ B("mwc-list-item")
27
+ ], F);
28
+ /**
29
+ * @license
30
+ * Copyright 2016 Google Inc.
31
+ *
32
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
33
+ * of this software and associated documentation files (the "Software"), to deal
34
+ * in the Software without restriction, including without limitation the rights
35
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
36
+ * copies of the Software, and to permit persons to whom the Software is
37
+ * furnished to do so, subject to the following conditions:
38
+ *
39
+ * The above copyright notice and this permission notice shall be included in
40
+ * all copies or substantial portions of the Software.
41
+ *
42
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
46
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
47
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
48
+ * THE SOFTWARE.
49
+ */
50
+ var Y = (
51
+ /** @class */
52
+ function() {
53
+ function r(e) {
54
+ e === void 0 && (e = {}), this.adapter = e;
55
+ }
56
+ return Object.defineProperty(r, "cssClasses", {
57
+ get: function() {
58
+ return {};
59
+ },
60
+ enumerable: !1,
61
+ configurable: !0
62
+ }), Object.defineProperty(r, "strings", {
63
+ get: function() {
64
+ return {};
65
+ },
66
+ enumerable: !1,
67
+ configurable: !0
68
+ }), Object.defineProperty(r, "numbers", {
69
+ get: function() {
70
+ return {};
71
+ },
72
+ enumerable: !1,
73
+ configurable: !0
74
+ }), Object.defineProperty(r, "defaultAdapter", {
75
+ get: function() {
76
+ return {};
77
+ },
78
+ enumerable: !1,
79
+ configurable: !0
80
+ }), r.prototype.init = function() {
81
+ }, r.prototype.destroy = function() {
82
+ }, r;
83
+ }()
84
+ );
85
+ /**
86
+ * @license
87
+ * Copyright 2020 Google Inc.
88
+ *
89
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
90
+ * of this software and associated documentation files (the "Software"), to deal
91
+ * in the Software without restriction, including without limitation the rights
92
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
93
+ * copies of the Software, and to permit persons to whom the Software is
94
+ * furnished to do so, subject to the following conditions:
95
+ *
96
+ * The above copyright notice and this permission notice shall be included in
97
+ * all copies or substantial portions of the Software.
98
+ *
99
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
100
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
101
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
102
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
103
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
104
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
105
+ * THE SOFTWARE.
106
+ */
107
+ var a = {
108
+ UNKNOWN: "Unknown",
109
+ BACKSPACE: "Backspace",
110
+ ENTER: "Enter",
111
+ SPACEBAR: "Spacebar",
112
+ PAGE_UP: "PageUp",
113
+ PAGE_DOWN: "PageDown",
114
+ END: "End",
115
+ HOME: "Home",
116
+ ARROW_LEFT: "ArrowLeft",
117
+ ARROW_UP: "ArrowUp",
118
+ ARROW_RIGHT: "ArrowRight",
119
+ ARROW_DOWN: "ArrowDown",
120
+ DELETE: "Delete",
121
+ ESCAPE: "Escape",
122
+ TAB: "Tab"
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 = {
139
+ BACKSPACE: 8,
140
+ ENTER: 13,
141
+ SPACEBAR: 32,
142
+ PAGE_UP: 33,
143
+ PAGE_DOWN: 34,
144
+ END: 35,
145
+ HOME: 36,
146
+ ARROW_LEFT: 37,
147
+ ARROW_UP: 38,
148
+ ARROW_RIGHT: 39,
149
+ ARROW_DOWN: 40,
150
+ DELETE: 46,
151
+ ESCAPE: 27,
152
+ TAB: 9
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))
180
+ return e;
181
+ var t = l.get(r.keyCode);
182
+ return t || a.UNKNOWN;
183
+ }
184
+ /**
185
+ * @license
186
+ * Copyright 2018 Google Inc.
187
+ *
188
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
189
+ * of this software and associated documentation files (the "Software"), to deal
190
+ * in the Software without restriction, including without limitation the rights
191
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
192
+ * copies of the Software, and to permit persons to whom the Software is
193
+ * furnished to do so, subject to the following conditions:
194
+ *
195
+ * The above copyright notice and this permission notice shall be included in
196
+ * all copies or substantial portions of the Software.
197
+ *
198
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
199
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
200
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
201
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
202
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
203
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
204
+ * THE SOFTWARE.
205
+ */
206
+ var x, E, n = {
207
+ LIST_ITEM_ACTIVATED_CLASS: "mdc-list-item--activated",
208
+ LIST_ITEM_CLASS: "mdc-list-item",
209
+ LIST_ITEM_DISABLED_CLASS: "mdc-list-item--disabled",
210
+ LIST_ITEM_SELECTED_CLASS: "mdc-list-item--selected",
211
+ LIST_ITEM_TEXT_CLASS: "mdc-list-item__text",
212
+ LIST_ITEM_PRIMARY_TEXT_CLASS: "mdc-list-item__primary-text",
213
+ ROOT: "mdc-list"
214
+ };
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 = {
217
+ ACTION_EVENT: "MDCList:action",
218
+ SELECTION_CHANGE_EVENT: "MDCList:selectionChange",
219
+ ARIA_CHECKED: "aria-checked",
220
+ ARIA_CHECKED_CHECKBOX_SELECTOR: '[role="checkbox"][aria-checked="true"]',
221
+ ARIA_CHECKED_RADIO_SELECTOR: '[role="radio"][aria-checked="true"]',
222
+ ARIA_CURRENT: "aria-current",
223
+ ARIA_DISABLED: "aria-disabled",
224
+ ARIA_ORIENTATION: "aria-orientation",
225
+ ARIA_ORIENTATION_HORIZONTAL: "horizontal",
226
+ ARIA_ROLE_CHECKBOX_SELECTOR: '[role="checkbox"]',
227
+ ARIA_SELECTED: "aria-selected",
228
+ ARIA_INTERACTIVE_ROLES_SELECTOR: '[role="listbox"], [role="menu"]',
229
+ ARIA_MULTI_SELECTABLE_SELECTOR: '[aria-multiselectable="true"]',
230
+ CHECKBOX_RADIO_SELECTOR: 'input[type="checkbox"], input[type="radio"]',
231
+ CHECKBOX_SELECTOR: 'input[type="checkbox"]',
232
+ CHILD_ELEMENTS_TO_TOGGLE_TABINDEX: `
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
237
+ `,
238
+ DEPRECATED_SELECTOR: ".mdc-deprecated-list",
239
+ FOCUSABLE_CHILD_ELEMENTS: `
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)
248
+ `,
249
+ RADIO_SELECTOR: 'input[type="radio"]',
250
+ SELECTED_ITEM_SELECTOR: '[aria-selected="true"], [aria-current="true"]'
251
+ }, m = {
252
+ UNSET_INDEX: -1,
253
+ TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS: 300
254
+ };
255
+ /**
256
+ * @license
257
+ * Copyright 2020 Google LLC
258
+ * SPDX-License-Identifier: Apache-2.0
259
+ */
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++;
267
+ continue;
268
+ }
269
+ if (f !== void 0 && (g === void 0 || f < g)) {
270
+ s.removed.push(f), _++;
271
+ continue;
272
+ }
273
+ if (g !== void 0 && (f === void 0 || g < f)) {
274
+ s.added.push(g), b++;
275
+ continue;
276
+ }
277
+ }
278
+ return s;
279
+ }, Z = ["input", "button", "textarea", "select"];
280
+ function R(r) {
281
+ return r instanceof Set;
282
+ }
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]);
286
+ };
287
+ class N extends Y {
288
+ constructor(e) {
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;
290
+ }
291
+ static get strings() {
292
+ return C;
293
+ }
294
+ static get numbers() {
295
+ return m;
296
+ }
297
+ static get defaultAdapter() {
298
+ return {
299
+ focusItemAtIndex: () => {
300
+ },
301
+ getFocusedElementIndex: () => 0,
302
+ getListItemCount: () => 0,
303
+ isFocusInsideList: () => !1,
304
+ isRootFocused: () => !1,
305
+ notifyAction: () => {
306
+ },
307
+ notifySelected: () => {
308
+ },
309
+ getSelectedStateForElementIndex: () => !1,
310
+ setDisabledStateForElementIndex: () => {
311
+ },
312
+ getDisabledStateForElementIndex: () => !1,
313
+ setSelectedStateForElementIndex: () => {
314
+ },
315
+ setActivatedStateForElementIndex: () => {
316
+ },
317
+ setTabIndexForElementIndex: () => {
318
+ },
319
+ setAttributeForElementIndex: () => {
320
+ },
321
+ getAttributeForElementIndex: () => null
322
+ };
323
+ }
324
+ /**
325
+ * Sets the private wrapFocus_ variable.
326
+ */
327
+ setWrapFocus(e) {
328
+ this.wrapFocus_ = e;
329
+ }
330
+ /**
331
+ * Sets the private wrapFocus_ variable.
332
+ */
333
+ setMulti(e) {
334
+ this.isMulti_ = e;
335
+ const t = this.selectedIndex_;
336
+ if (e) {
337
+ if (!R(t)) {
338
+ const i = t === m.UNSET_INDEX;
339
+ this.selectedIndex_ = i ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([t]);
340
+ }
341
+ } else if (R(t))
342
+ if (t.size) {
343
+ const i = Array.from(t).sort(D);
344
+ this.selectedIndex_ = i[0];
345
+ } else
346
+ this.selectedIndex_ = m.UNSET_INDEX;
347
+ }
348
+ /**
349
+ * Sets the isVertical_ private variable.
350
+ */
351
+ setVerticalOrientation(e) {
352
+ this.isVertical_ = e;
353
+ }
354
+ /**
355
+ * Sets the useActivatedClass_ private variable.
356
+ */
357
+ setUseActivatedClass(e) {
358
+ this.useActivatedClass_ = e;
359
+ }
360
+ getSelectedIndex() {
361
+ return this.selectedIndex_;
362
+ }
363
+ setSelectedIndex(e) {
364
+ this.isIndexValid_(e) && (this.isMulti_ ? this.setMultiSelectionAtIndex_(O(e)) : this.setSingleSelectionAtIndex_(e));
365
+ }
366
+ /**
367
+ * Focus in handler for the list items.
368
+ */
369
+ handleFocusIn(e, t) {
370
+ t >= 0 && this.adapter.setTabIndexForElementIndex(t, 0);
371
+ }
372
+ /**
373
+ * Focus out handler for the list items.
374
+ */
375
+ handleFocusOut(e, t) {
376
+ t >= 0 && this.adapter.setTabIndexForElementIndex(t, -1), setTimeout(() => {
377
+ this.adapter.isFocusInsideList() || this.setTabindexToFirstSelectedItem_();
378
+ }, 0);
379
+ }
380
+ /**
381
+ * Key handler for the list.
382
+ */
383
+ handleKeydown(e, t, i) {
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";
385
+ if (this.adapter.isRootFocused()) {
386
+ d || f ? (e.preventDefault(), this.focusLastElement()) : (_ || b) && (e.preventDefault(), this.focusFirstElement());
387
+ return;
388
+ }
389
+ let T = this.adapter.getFocusedElementIndex();
390
+ if (T === -1 && (T = i, T < 0))
391
+ return;
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) {
402
+ const M = e.target;
403
+ if (M && M.tagName === "A" && g)
404
+ return;
405
+ this.preventDefaultEvent(e), this.setSelectedIndexOnAction_(T, !0);
406
+ }
407
+ this.focusedItemIndex_ = T, y !== void 0 && (this.setTabindexAtIndex_(y), this.focusedItemIndex_ = y);
408
+ }
409
+ /**
410
+ * Click handler for the list.
411
+ */
412
+ handleSingleSelection(e, t, i) {
413
+ e !== m.UNSET_INDEX && (this.setSelectedIndexOnAction_(e, t, i), this.setTabindexAtIndex_(e), this.focusedItemIndex_ = e);
414
+ }
415
+ /**
416
+ * Focuses the next element on the list.
417
+ */
418
+ focusNextElement(e) {
419
+ const t = this.adapter.getListItemCount();
420
+ let i = e + 1;
421
+ if (i >= t)
422
+ if (this.wrapFocus_)
423
+ i = 0;
424
+ else
425
+ return e;
426
+ return this.adapter.focusItemAtIndex(i), i;
427
+ }
428
+ /**
429
+ * Focuses the previous element on the list.
430
+ */
431
+ focusPrevElement(e) {
432
+ let t = e - 1;
433
+ if (t < 0)
434
+ if (this.wrapFocus_)
435
+ t = this.adapter.getListItemCount() - 1;
436
+ else
437
+ return e;
438
+ return this.adapter.focusItemAtIndex(t), t;
439
+ }
440
+ focusFirstElement() {
441
+ return this.adapter.focusItemAtIndex(0), 0;
442
+ }
443
+ focusLastElement() {
444
+ const e = this.adapter.getListItemCount() - 1;
445
+ return this.adapter.focusItemAtIndex(e), e;
446
+ }
447
+ /**
448
+ * @param itemIndex Index of the list item
449
+ * @param isEnabled Sets the list item to enabled or disabled.
450
+ */
451
+ setEnabled(e, t) {
452
+ this.isIndexValid_(e) && this.adapter.setDisabledStateForElementIndex(e, !t);
453
+ }
454
+ /**
455
+ * Ensures that preventDefault is only called if the containing element
456
+ * doesn't consume the event, and it will cause an unintended scroll.
457
+ */
458
+ preventDefaultEvent(e) {
459
+ const i = `${e.target.tagName}`.toLowerCase();
460
+ Z.indexOf(i) === -1 && e.preventDefault();
461
+ }
462
+ setSingleSelectionAtIndex_(e, t = !0) {
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));
464
+ }
465
+ setMultiSelectionAtIndex_(e, t = !0) {
466
+ const i = O(this.selectedIndex_), s = q(i, e);
467
+ if (!(!s.removed.length && !s.added.length)) {
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);
472
+ this.selectedIndex_ = e, this.adapter.notifySelected(e, s);
473
+ }
474
+ }
475
+ /**
476
+ * Sets aria attribute for single selection at given index.
477
+ */
478
+ setAriaForSingleSelectionAtIndex_(e) {
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;
481
+ this.selectedIndex_ !== m.UNSET_INDEX && this.adapter.setAttributeForElementIndex(this.selectedIndex_, i, "false");
482
+ const s = t ? this.ariaCurrentAttrValue_ : "true";
483
+ this.adapter.setAttributeForElementIndex(e, i, s);
484
+ }
485
+ setTabindexAtIndex_(e) {
486
+ this.focusedItemIndex_ === m.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);
487
+ }
488
+ setTabindexToFirstSelectedItem_() {
489
+ let e = 0;
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);
491
+ }
492
+ isIndexValid_(e) {
493
+ if (e instanceof Set) {
494
+ if (!this.isMulti_)
495
+ throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");
496
+ if (e.size === 0)
497
+ return !0;
498
+ {
499
+ let t = !1;
500
+ for (const i of e)
501
+ if (t = this.isIndexInRange_(i), t)
502
+ break;
503
+ return t;
504
+ }
505
+ } else if (typeof e == "number") {
506
+ if (this.isMulti_)
507
+ throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: " + e);
508
+ return e === m.UNSET_INDEX || this.isIndexInRange_(e);
509
+ } else
510
+ return !1;
511
+ }
512
+ isIndexInRange_(e) {
513
+ const t = this.adapter.getListItemCount();
514
+ return e >= 0 && e < t;
515
+ }
516
+ /**
517
+ * Sets selected index on user action, toggles checkbox / radio based on
518
+ * toggleCheckbox value. User interaction should not toggle list item(s) when
519
+ * disabled.
520
+ */
521
+ setSelectedIndexOnAction_(e, t, i) {
522
+ if (this.adapter.getDisabledStateForElementIndex(e))
523
+ return;
524
+ let s = e;
525
+ 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_(m.UNSET_INDEX), t && this.adapter.notifyAction(e));
526
+ }
527
+ toggleMultiAtIndex(e, t, i = !0) {
528
+ let s = !1;
529
+ t === void 0 ? s = !this.adapter.getSelectedStateForElementIndex(e) : s = t;
530
+ const d = O(this.selectedIndex_);
531
+ s ? d.add(e) : d.delete(e), this.setMultiSelectionAtIndex_(d, i);
532
+ }
533
+ }
534
+ /**
535
+ * @license
536
+ * Copyright 2020 Google LLC
537
+ * SPDX-License-Identifier: Apache-2.0
538
+ */
539
+ function J(r, e = 50) {
540
+ let t;
541
+ return function(i = !0) {
542
+ clearTimeout(t), t = setTimeout(() => {
543
+ r(i);
544
+ }, e);
545
+ };
546
+ }
547
+ const w = (r) => r.hasAttribute("mwc-list-item");
548
+ function Q() {
549
+ const r = this.itemsReadyResolver;
550
+ this.itemsReady = new Promise((e) => this.itemsReadyResolver = e), r();
551
+ }
552
+ class u extends K {
553
+ constructor() {
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 = () => {
555
+ }, this.itemsReady = Promise.resolve([]), this.items_ = [];
556
+ const e = J(this.layout.bind(this));
557
+ this.debouncedLayout = (t = !0) => {
558
+ Q.call(this), e(t);
559
+ };
560
+ }
561
+ // tslint:disable:ban-ts-ignore
562
+ async getUpdateComplete() {
563
+ const e = await super.getUpdateComplete();
564
+ return await this.itemsReady, e;
565
+ }
566
+ get items() {
567
+ return this.items_;
568
+ }
569
+ updateItems() {
570
+ var e;
571
+ const t = (e = this.assignedElements) !== null && e !== void 0 ? e : [], i = [];
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");
574
+ this.items_ = i;
575
+ const s = /* @__PURE__ */ new Set();
576
+ if (this.items_.forEach((o, _) => {
577
+ this.itemRoles ? o.setAttribute("role", this.itemRoles) : o.removeAttribute("role"), o.selected && s.add(_);
578
+ }), this.multi)
579
+ this.select(s);
580
+ else {
581
+ const o = s.size ? s.entries().next().value[1] : -1;
582
+ this.select(o);
583
+ }
584
+ const d = new Event("items-updated", { bubbles: !0, composed: !0 });
585
+ this.dispatchEvent(d);
586
+ }
587
+ get selected() {
588
+ const e = this.index;
589
+ if (!R(e))
590
+ return e === -1 ? null : this.items[e];
591
+ const t = [];
592
+ for (const i of e)
593
+ t.push(this.items[i]);
594
+ return t;
595
+ }
596
+ get index() {
597
+ return this.mdcFoundation ? this.mdcFoundation.getSelectedIndex() : -1;
598
+ }
599
+ render() {
600
+ const e = this.innerRole === null ? void 0 : this.innerRole, t = this.innerAriaLabel === null ? void 0 : this.innerAriaLabel, i = this.rootTabbable ? "0" : "-1";
601
+ return P`
602
+ <!-- @ts-ignore -->
603
+ <ul
604
+ tabindex=${i}
605
+ role="${U(e)}"
606
+ aria-label="${U(t)}"
607
+ class="mdc-deprecated-list"
608
+ @keydown=${this.onKeydown}
609
+ @focusin=${this.onFocusIn}
610
+ @focusout=${this.onFocusOut}
611
+ @request-selected=${this.onRequestSelected}
612
+ @list-item-rendered=${this.onListItemConnected}>
613
+ <slot></slot>
614
+ ${this.renderPlaceholder()}
615
+ </ul>
616
+ `;
617
+ }
618
+ renderPlaceholder() {
619
+ var e;
620
+ const t = (e = this.assignedElements) !== null && e !== void 0 ? e : [];
621
+ return this.emptyMessage !== void 0 && t.length === 0 ? P`
622
+ <mwc-list-item noninteractive>${this.emptyMessage}</mwc-list-item>
623
+ ` : null;
624
+ }
625
+ firstUpdated() {
626
+ super.firstUpdated(), this.items.length || (this.mdcFoundation.setMulti(this.multi), this.layout());
627
+ }
628
+ onFocusIn(e) {
629
+ if (this.mdcFoundation && this.mdcRoot) {
630
+ const t = this.getIndexOfTarget(e);
631
+ this.mdcFoundation.handleFocusIn(e, t);
632
+ }
633
+ }
634
+ onFocusOut(e) {
635
+ if (this.mdcFoundation && this.mdcRoot) {
636
+ const t = this.getIndexOfTarget(e);
637
+ this.mdcFoundation.handleFocusOut(e, t);
638
+ }
639
+ }
640
+ onKeydown(e) {
641
+ if (this.mdcFoundation && this.mdcRoot) {
642
+ const t = this.getIndexOfTarget(e), i = e.target, s = w(i);
643
+ this.mdcFoundation.handleKeydown(e, s, t);
644
+ }
645
+ }
646
+ onRequestSelected(e) {
647
+ if (this.mdcFoundation) {
648
+ let t = this.getIndexOfTarget(e);
649
+ if (t === -1 && (this.layout(), t = this.getIndexOfTarget(e), t === -1) || this.items[t].disabled)
650
+ return;
651
+ const s = e.detail.selected, d = e.detail.source;
652
+ this.mdcFoundation.handleSingleSelection(t, d === "interaction", s), e.stopPropagation();
653
+ }
654
+ }
655
+ getIndexOfTarget(e) {
656
+ const t = this.items, i = e.composedPath();
657
+ for (const s of i) {
658
+ let d = -1;
659
+ if (V(s) && w(s) && (d = t.indexOf(s)), d !== -1)
660
+ return d;
661
+ }
662
+ return -1;
663
+ }
664
+ createAdapter() {
665
+ return this.mdcAdapter = {
666
+ getListItemCount: () => this.mdcRoot ? this.items.length : 0,
667
+ getFocusedElementIndex: this.getFocusedItemIndex,
668
+ getAttributeForElementIndex: (e, t) => {
669
+ if (!this.mdcRoot)
670
+ return "";
671
+ const s = this.items[e];
672
+ return s ? s.getAttribute(t) : "";
673
+ },
674
+ setAttributeForElementIndex: (e, t, i) => {
675
+ if (!this.mdcRoot)
676
+ return;
677
+ const s = this.items[e];
678
+ s && s.setAttribute(t, i);
679
+ },
680
+ focusItemAtIndex: (e) => {
681
+ const t = this.items[e];
682
+ t && t.focus();
683
+ },
684
+ setTabIndexForElementIndex: (e, t) => {
685
+ const i = this.items[e];
686
+ i && (i.tabindex = t);
687
+ },
688
+ notifyAction: (e) => {
689
+ const t = { bubbles: !0, composed: !0 };
690
+ t.detail = { index: e };
691
+ const i = new CustomEvent("action", t);
692
+ this.dispatchEvent(i);
693
+ },
694
+ notifySelected: (e, t) => {
695
+ const i = { bubbles: !0, composed: !0 };
696
+ i.detail = { index: e, diff: t };
697
+ const s = new CustomEvent("selected", i);
698
+ this.dispatchEvent(s);
699
+ },
700
+ isFocusInsideList: () => X(this),
701
+ isRootFocused: () => {
702
+ const e = this.mdcRoot;
703
+ return e.getRootNode().activeElement === e;
704
+ },
705
+ setDisabledStateForElementIndex: (e, t) => {
706
+ const i = this.items[e];
707
+ i && (i.disabled = t);
708
+ },
709
+ getDisabledStateForElementIndex: (e) => {
710
+ const t = this.items[e];
711
+ return t ? t.disabled : !1;
712
+ },
713
+ setSelectedStateForElementIndex: (e, t) => {
714
+ const i = this.items[e];
715
+ i && (i.selected = t);
716
+ },
717
+ getSelectedStateForElementIndex: (e) => {
718
+ const t = this.items[e];
719
+ return t ? t.selected : !1;
720
+ },
721
+ setActivatedStateForElementIndex: (e, t) => {
722
+ const i = this.items[e];
723
+ i && (i.activated = t);
724
+ }
725
+ }, this.mdcAdapter;
726
+ }
727
+ selectUi(e, t = !1) {
728
+ const i = this.items[e];
729
+ i && (i.selected = !0, i.activated = t);
730
+ }
731
+ deselectUi(e) {
732
+ const t = this.items[e];
733
+ t && (t.selected = !1, t.activated = !1);
734
+ }
735
+ select(e) {
736
+ this.mdcFoundation && this.mdcFoundation.setSelectedIndex(e);
737
+ }
738
+ toggle(e, t) {
739
+ this.multi && this.mdcFoundation.toggleMultiAtIndex(e, t);
740
+ }
741
+ onListItemConnected(e) {
742
+ const t = e.target;
743
+ this.layout(this.items.indexOf(t) === -1);
744
+ }
745
+ layout(e = !0) {
746
+ e && this.updateItems();
747
+ const t = this.items[0];
748
+ for (const i of this.items)
749
+ i.tabindex = -1;
750
+ t && (this.noninteractive ? this.previousTabindex || (this.previousTabindex = t) : t.tabindex = 0), this.itemsReadyResolver();
751
+ }
752
+ getFocusedItemIndex() {
753
+ if (!this.mdcRoot || !this.items.length)
754
+ return -1;
755
+ const e = G();
756
+ if (!e.length)
757
+ return -1;
758
+ for (let t = e.length - 1; t >= 0; t--) {
759
+ const i = e[t];
760
+ if (w(i))
761
+ return this.items.indexOf(i);
762
+ }
763
+ return -1;
764
+ }
765
+ focusItemAtIndex(e) {
766
+ for (const t of this.items)
767
+ if (t.tabindex === 0) {
768
+ t.tabindex = -1;
769
+ break;
770
+ }
771
+ this.items[e].tabindex = 0, this.items[e].focus();
772
+ }
773
+ focus() {
774
+ const e = this.mdcRoot;
775
+ e && e.focus();
776
+ }
777
+ blur() {
778
+ const e = this.mdcRoot;
779
+ e && e.blur();
780
+ }
781
+ }
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);
798
+ })
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();
804
+ })
805
+ ], u.prototype, "multi", void 0);
806
+ p([
807
+ I({ type: Boolean }),
808
+ L(function(r) {
809
+ this.mdcFoundation && this.mdcFoundation.setWrapFocus(r);
810
+ })
811
+ ], u.prototype, "wrapFocus", void 0);
812
+ p([
813
+ I({ type: String }),
814
+ L(function(r, e) {
815
+ e !== void 0 && this.updateItems();
816
+ })
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) {
830
+ var e, t;
831
+ if (r) {
832
+ const i = (t = (e = this.tabbableElements) === null || e === void 0 ? void 0 : e[0]) !== null && t !== void 0 ? t : null;
833
+ this.previousTabindex = i, i && i.setAttribute("tabindex", "-1");
834
+ } else
835
+ !r && this.previousTabindex && (this.previousTabindex.setAttribute("tabindex", "0"), this.previousTabindex = null);
836
+ })
837
+ ], u.prototype, "noninteractive", void 0);
838
+ export {
839
+ u as L
840
+ };