@covalent/components 6.0.1 → 6.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/action-ribbon.mjs +9 -7
  2. package/alert.mjs +13 -11
  3. package/app-shell.mjs +10 -4
  4. package/aria-property.mjs +41 -0
  5. package/base-element.mjs +28 -0
  6. package/button.mjs +180 -13
  7. package/card.mjs +3 -3
  8. package/check-list-item.mjs +92 -14
  9. package/checkbox.mjs +26 -14
  10. package/circular-progress.mjs +144 -10
  11. package/class-map.mjs +62 -0
  12. package/code-snippet.mjs +6 -5
  13. package/covalent.mjs +2 -2
  14. package/covalent.umd.js +3339 -137
  15. package/dialog.mjs +750 -15
  16. package/directive-helpers.mjs +11 -0
  17. package/drawer.mjs +26 -15
  18. package/empty-state.mjs +4 -4
  19. package/event-options.mjs +14 -0
  20. package/form-element.mjs +50 -0
  21. package/foundation.mjs +152 -0
  22. package/foundation2.mjs +60 -0
  23. package/icon-button.mjs +130 -15
  24. package/icon-check-toggle.mjs +18 -8
  25. package/icon-radio-toggle.mjs +29 -18
  26. package/icon.mjs +19 -13
  27. package/if-defined.mjs +10 -0
  28. package/inert.esm.mjs +640 -0
  29. package/linear-progress.mjs +178 -15
  30. package/list-expansion.mjs +33 -22
  31. package/list-item.mjs +19 -20
  32. package/list.mjs +26 -13
  33. package/menu.mjs +32 -13
  34. package/mwc-checkbox-base.mjs +198 -0
  35. package/mwc-checkbox.css.mjs +10 -0
  36. package/mwc-drawer-base.mjs +335 -0
  37. package/mwc-icon.mjs +26 -0
  38. package/mwc-line-ripple-directive.mjs +653 -0
  39. package/mwc-list-base.mjs +840 -0
  40. package/mwc-list-item-base.mjs +202 -0
  41. package/mwc-list-item.css.mjs +17 -0
  42. package/mwc-menu-base.mjs +1145 -0
  43. package/mwc-radio-base.mjs +528 -0
  44. package/mwc-radio.css.mjs +10 -0
  45. package/mwc-slider.css.mjs +956 -0
  46. package/mwc-tab-base.mjs +694 -0
  47. package/mwc-top-app-bar-base.mjs +380 -0
  48. package/nav-list-item.mjs +28 -20
  49. package/observer.mjs +32 -0
  50. package/package.json +9 -2
  51. package/property.mjs +20 -0
  52. package/query-assigned-elements.mjs +615 -0
  53. package/query-assigned-nodes.mjs +17 -0
  54. package/query.mjs +25 -0
  55. package/radio-list-item.mjs +93 -12
  56. package/radio.mjs +28 -15
  57. package/ripple-handlers.mjs +761 -0
  58. package/select.mjs +1257 -15
  59. package/side-sheet.mjs +21 -16
  60. package/slider-range.mjs +438 -11
  61. package/slider.mjs +253 -13
  62. package/snackbar.mjs +456 -15
  63. package/src/action-ribbon/action-ribbon-base.d.ts +30 -0
  64. package/src/action-ribbon/action-ribbon-base.d.ts.map +1 -0
  65. package/src/action-ribbon/action-ribbon.d.ts +15 -0
  66. package/src/action-ribbon/action-ribbon.d.ts.map +1 -0
  67. package/src/alert/alert-base.d.ts +31 -0
  68. package/src/alert/alert-base.d.ts.map +1 -0
  69. package/src/alert/alert.d.ts +15 -0
  70. package/src/alert/alert.d.ts.map +1 -0
  71. package/src/app-shell/app-shell.d.ts +26 -0
  72. package/src/app-shell/app-shell.d.ts.map +1 -0
  73. package/src/button/button.d.ts +10 -0
  74. package/src/button/button.d.ts.map +1 -0
  75. package/src/card/card-base.d.ts +25 -0
  76. package/src/card/card-base.d.ts.map +1 -0
  77. package/src/card/card.d.ts +10 -0
  78. package/src/card/card.d.ts.map +1 -0
  79. package/src/checkbox/checkbox.d.ts +10 -0
  80. package/src/checkbox/checkbox.d.ts.map +1 -0
  81. package/src/chips/chip-base.d.ts +52 -0
  82. package/src/chips/chip-base.d.ts.map +1 -0
  83. package/src/chips/chip-set-base.d.ts +33 -0
  84. package/src/chips/chip-set-base.d.ts.map +1 -0
  85. package/src/chips/chip-set.d.ts +15 -0
  86. package/src/chips/chip-set.d.ts.map +1 -0
  87. package/src/chips/chip.d.ts +15 -0
  88. package/src/chips/chip.d.ts.map +1 -0
  89. package/src/chips/foundation.d.ts +60 -0
  90. package/src/chips/foundation.d.ts.map +1 -0
  91. package/src/circular-progress/circular-progress.d.ts +10 -0
  92. package/src/circular-progress/circular-progress.d.ts.map +1 -0
  93. package/src/code-snippet/code-snippet.d.ts +21 -0
  94. package/src/code-snippet/code-snippet.d.ts.map +1 -0
  95. package/src/dialog/dialog.d.ts +10 -0
  96. package/src/dialog/dialog.d.ts.map +1 -0
  97. package/src/drawer/drawer.d.ts +10 -0
  98. package/src/drawer/drawer.d.ts.map +1 -0
  99. package/src/empty-state/empty-state.d.ts +16 -0
  100. package/src/empty-state/empty-state.d.ts.map +1 -0
  101. package/src/formfield/formfield.d.ts +10 -0
  102. package/src/formfield/formfield.d.ts.map +1 -0
  103. package/src/icon/icon.d.ts +10 -0
  104. package/src/icon/icon.d.ts.map +1 -0
  105. package/src/icon-button/icon-button.d.ts +10 -0
  106. package/src/icon-button/icon-button.d.ts.map +1 -0
  107. package/src/icon-checkbox/icon-check-toggle.d.ts +15 -0
  108. package/src/icon-checkbox/icon-check-toggle.d.ts.map +1 -0
  109. package/src/icon-radio/icon-radio-toggle.d.ts +14 -0
  110. package/src/icon-radio/icon-radio-toggle.d.ts.map +1 -0
  111. package/src/index.d.ts +3 -0
  112. package/src/index.d.ts.map +1 -0
  113. package/src/linear-progress/linear-progress.d.ts +10 -0
  114. package/src/linear-progress/linear-progress.d.ts.map +1 -0
  115. package/src/list/check-list-item.d.ts +10 -0
  116. package/src/list/check-list-item.d.ts.map +1 -0
  117. package/src/list/list-expansion.d.ts +18 -0
  118. package/src/list/list-expansion.d.ts.map +1 -0
  119. package/src/list/list-item.d.ts +12 -0
  120. package/src/list/list-item.d.ts.map +1 -0
  121. package/src/list/list.d.ts +10 -0
  122. package/src/list/list.d.ts.map +1 -0
  123. package/src/list/nav-list-item.d.ts +12 -0
  124. package/src/list/nav-list-item.d.ts.map +1 -0
  125. package/src/list/radio-list-item.d.ts +10 -0
  126. package/src/list/radio-list-item.d.ts.map +1 -0
  127. package/src/menu/menu.d.ts +10 -0
  128. package/src/menu/menu.d.ts.map +1 -0
  129. package/src/radio/radio.d.ts +10 -0
  130. package/src/radio/radio.d.ts.map +1 -0
  131. package/src/select/select.d.ts +10 -0
  132. package/src/select/select.d.ts.map +1 -0
  133. package/src/side-sheet/side-sheet.d.ts +18 -0
  134. package/src/side-sheet/side-sheet.d.ts.map +1 -0
  135. package/src/slider/slider-range.d.ts +10 -0
  136. package/src/slider/slider-range.d.ts.map +1 -0
  137. package/src/slider/slider.d.ts +10 -0
  138. package/src/slider/slider.d.ts.map +1 -0
  139. package/src/snackbar/snackbar.d.ts +10 -0
  140. package/src/snackbar/snackbar.d.ts.map +1 -0
  141. package/src/status-header/status-header-base.d.ts +9 -0
  142. package/src/status-header/status-header-base.d.ts.map +1 -0
  143. package/src/status-header/status-header-item.d.ts +17 -0
  144. package/src/status-header/status-header-item.d.ts.map +1 -0
  145. package/src/status-header/status-header.d.ts +15 -0
  146. package/src/status-header/status-header.d.ts.map +1 -0
  147. package/src/switch/switch.d.ts +10 -0
  148. package/src/switch/switch.d.ts.map +1 -0
  149. package/src/tab/tab-bar.d.ts +10 -0
  150. package/src/tab/tab-bar.d.ts.map +1 -0
  151. package/src/tab/tab.d.ts +10 -0
  152. package/src/tab/tab.d.ts.map +1 -0
  153. package/src/text-lockup/text-lockup.d.ts +17 -0
  154. package/src/text-lockup/text-lockup.d.ts.map +1 -0
  155. package/src/textarea/textarea.d.ts +10 -0
  156. package/src/textarea/textarea.d.ts.map +1 -0
  157. package/src/textfield/textfield.d.ts +10 -0
  158. package/src/textfield/textfield.d.ts.map +1 -0
  159. package/src/toolbar/toolbar.d.ts +10 -0
  160. package/src/toolbar/toolbar.d.ts.map +1 -0
  161. package/src/tooltip/tooltip.d.ts +27 -0
  162. package/src/tooltip/tooltip.d.ts.map +1 -0
  163. package/src/top-app-bar/top-app-bar-fixed.d.ts +10 -0
  164. package/src/top-app-bar/top-app-bar-fixed.d.ts.map +1 -0
  165. package/src/top-app-bar/top-app-bar.d.ts +10 -0
  166. package/src/top-app-bar/top-app-bar.d.ts.map +1 -0
  167. package/src/tree-list/tree-list-item.d.ts +16 -0
  168. package/src/tree-list/tree-list-item.d.ts.map +1 -0
  169. package/src/tree-list/tree-list.d.ts +11 -0
  170. package/src/tree-list/tree-list.d.ts.map +1 -0
  171. package/src/typography/typography.d.ts +12 -0
  172. package/src/typography/typography.d.ts.map +1 -0
  173. package/state.mjs +12 -0
  174. package/status-header-item.mjs +16 -16
  175. package/status-header.mjs +5 -5
  176. package/style-map.mjs +40 -0
  177. package/switch.mjs +531 -15
  178. package/tab-bar.mjs +1030 -13
  179. package/tab.mjs +29 -15
  180. package/text-lockup.mjs +8 -8
  181. package/textarea.mjs +111 -16
  182. package/textfield.mjs +34 -18
  183. package/textfield2.mjs +929 -2
  184. package/toolbar.mjs +8 -3
  185. package/tooltip.mjs +1153 -96
  186. package/top-app-bar-fixed.mjs +78 -18
  187. package/top-app-bar.mjs +19 -15
  188. package/top-app-bar2.mjs +9 -2
  189. package/tree-list-item.mjs +3 -3
  190. package/tree-list.mjs +6 -7
  191. package/tslib.es6.mjs +82 -0
  192. package/typography.mjs +8 -8
  193. package/utils.mjs +52 -0
@@ -0,0 +1,694 @@
1
+ import { _ as m, a as h, b as i } from "./tslib.es6.mjs";
2
+ import { y as c, i as R, e as A } from "./query-assigned-elements.mjs";
3
+ import { B as g } from "./base-element.mjs";
4
+ import { e as r } from "./property.mjs";
5
+ import { i as l } from "./query.mjs";
6
+ import { o as v } from "./class-map.mjs";
7
+ import { a as I } from "./utils.mjs";
8
+ import { e as T, R as E } from "./ripple-handlers.mjs";
9
+ import { o as F } from "./observer.mjs";
10
+ import { t as _ } from "./state.mjs";
11
+ import { e as O } from "./event-options.mjs";
12
+ /**
13
+ * @license
14
+ * Copyright 2016 Google Inc.
15
+ *
16
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
17
+ * of this software and associated documentation files (the "Software"), to deal
18
+ * in the Software without restriction, including without limitation the rights
19
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20
+ * copies of the Software, and to permit persons to whom the Software is
21
+ * furnished to do so, subject to the following conditions:
22
+ *
23
+ * The above copyright notice and this permission notice shall be included in
24
+ * all copies or substantial portions of the Software.
25
+ *
26
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
32
+ * THE SOFTWARE.
33
+ */
34
+ var D = (
35
+ /** @class */
36
+ function() {
37
+ function e(t) {
38
+ t === void 0 && (t = {}), this.adapter = t;
39
+ }
40
+ return Object.defineProperty(e, "cssClasses", {
41
+ get: function() {
42
+ return {};
43
+ },
44
+ enumerable: !1,
45
+ configurable: !0
46
+ }), Object.defineProperty(e, "strings", {
47
+ get: function() {
48
+ return {};
49
+ },
50
+ enumerable: !1,
51
+ configurable: !0
52
+ }), Object.defineProperty(e, "numbers", {
53
+ get: function() {
54
+ return {};
55
+ },
56
+ enumerable: !1,
57
+ configurable: !0
58
+ }), Object.defineProperty(e, "defaultAdapter", {
59
+ get: function() {
60
+ return {};
61
+ },
62
+ enumerable: !1,
63
+ configurable: !0
64
+ }), e.prototype.init = function() {
65
+ }, e.prototype.destroy = function() {
66
+ }, e;
67
+ }()
68
+ );
69
+ /**
70
+ * @license
71
+ * Copyright 2018 Google Inc.
72
+ *
73
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
74
+ * of this software and associated documentation files (the "Software"), to deal
75
+ * in the Software without restriction, including without limitation the rights
76
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
77
+ * copies of the Software, and to permit persons to whom the Software is
78
+ * furnished to do so, subject to the following conditions:
79
+ *
80
+ * The above copyright notice and this permission notice shall be included in
81
+ * all copies or substantial portions of the Software.
82
+ *
83
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
84
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
85
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
86
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
87
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
88
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
89
+ * THE SOFTWARE.
90
+ */
91
+ var $ = {
92
+ ACTIVE: "mdc-tab-indicator--active",
93
+ FADE: "mdc-tab-indicator--fade",
94
+ NO_TRANSITION: "mdc-tab-indicator--no-transition"
95
+ }, w = {
96
+ CONTENT_SELECTOR: ".mdc-tab-indicator__content"
97
+ };
98
+ /**
99
+ * @license
100
+ * Copyright 2018 Google Inc.
101
+ *
102
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
103
+ * of this software and associated documentation files (the "Software"), to deal
104
+ * in the Software without restriction, including without limitation the rights
105
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
106
+ * copies of the Software, and to permit persons to whom the Software is
107
+ * furnished to do so, subject to the following conditions:
108
+ *
109
+ * The above copyright notice and this permission notice shall be included in
110
+ * all copies or substantial portions of the Software.
111
+ *
112
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
113
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
114
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
115
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
116
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
117
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
118
+ * THE SOFTWARE.
119
+ */
120
+ var s = (
121
+ /** @class */
122
+ function(e) {
123
+ m(t, e);
124
+ function t(n) {
125
+ return e.call(this, h(h({}, t.defaultAdapter), n)) || this;
126
+ }
127
+ return Object.defineProperty(t, "cssClasses", {
128
+ get: function() {
129
+ return $;
130
+ },
131
+ enumerable: !1,
132
+ configurable: !0
133
+ }), Object.defineProperty(t, "strings", {
134
+ get: function() {
135
+ return w;
136
+ },
137
+ enumerable: !1,
138
+ configurable: !0
139
+ }), Object.defineProperty(t, "defaultAdapter", {
140
+ get: function() {
141
+ return {
142
+ addClass: function() {
143
+ },
144
+ removeClass: function() {
145
+ },
146
+ computeContentClientRect: function() {
147
+ return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
148
+ },
149
+ setContentStyleProperty: function() {
150
+ }
151
+ };
152
+ },
153
+ enumerable: !1,
154
+ configurable: !0
155
+ }), t.prototype.computeContentClientRect = function() {
156
+ return this.adapter.computeContentClientRect();
157
+ }, t;
158
+ }(D)
159
+ );
160
+ /**
161
+ * @license
162
+ * Copyright 2018 Google Inc.
163
+ *
164
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
165
+ * of this software and associated documentation files (the "Software"), to deal
166
+ * in the Software without restriction, including without limitation the rights
167
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
168
+ * copies of the Software, and to permit persons to whom the Software is
169
+ * furnished to do so, subject to the following conditions:
170
+ *
171
+ * The above copyright notice and this permission notice shall be included in
172
+ * all copies or substantial portions of the Software.
173
+ *
174
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
175
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
176
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
177
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
178
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
179
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
180
+ * THE SOFTWARE.
181
+ */
182
+ var L = (
183
+ /** @class */
184
+ function(e) {
185
+ m(t, e);
186
+ function t() {
187
+ return e !== null && e.apply(this, arguments) || this;
188
+ }
189
+ return t.prototype.activate = function() {
190
+ this.adapter.addClass(s.cssClasses.ACTIVE);
191
+ }, t.prototype.deactivate = function() {
192
+ this.adapter.removeClass(s.cssClasses.ACTIVE);
193
+ }, t;
194
+ }(s)
195
+ );
196
+ const P = L;
197
+ /**
198
+ * @license
199
+ * Copyright 2018 Google Inc.
200
+ *
201
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
202
+ * of this software and associated documentation files (the "Software"), to deal
203
+ * in the Software without restriction, including without limitation the rights
204
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
205
+ * copies of the Software, and to permit persons to whom the Software is
206
+ * furnished to do so, subject to the following conditions:
207
+ *
208
+ * The above copyright notice and this permission notice shall be included in
209
+ * all copies or substantial portions of the Software.
210
+ *
211
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
212
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
213
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
214
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
215
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
216
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
217
+ * THE SOFTWARE.
218
+ */
219
+ var M = (
220
+ /** @class */
221
+ function(e) {
222
+ m(t, e);
223
+ function t() {
224
+ return e !== null && e.apply(this, arguments) || this;
225
+ }
226
+ return t.prototype.activate = function(n) {
227
+ if (!n) {
228
+ this.adapter.addClass(s.cssClasses.ACTIVE);
229
+ return;
230
+ }
231
+ var o = this.computeContentClientRect(), b = n.width / o.width, p = n.left - o.left;
232
+ this.adapter.addClass(s.cssClasses.NO_TRANSITION), this.adapter.setContentStyleProperty("transform", "translateX(" + p + "px) scaleX(" + b + ")"), this.computeContentClientRect(), this.adapter.removeClass(s.cssClasses.NO_TRANSITION), this.adapter.addClass(s.cssClasses.ACTIVE), this.adapter.setContentStyleProperty("transform", "");
233
+ }, t.prototype.deactivate = function() {
234
+ this.adapter.removeClass(s.cssClasses.ACTIVE);
235
+ }, t;
236
+ }(s)
237
+ );
238
+ const S = M;
239
+ /**
240
+ * @license
241
+ * Copyright 2018 Google LLC
242
+ * SPDX-License-Identifier: Apache-2.0
243
+ */
244
+ class u extends g {
245
+ constructor() {
246
+ super(...arguments), this.icon = "", this.fade = !1;
247
+ }
248
+ get mdcFoundationClass() {
249
+ return this.fade ? P : S;
250
+ }
251
+ render() {
252
+ const t = {
253
+ "mdc-tab-indicator__content--icon": this.icon,
254
+ "material-icons": this.icon,
255
+ "mdc-tab-indicator__content--underline": !this.icon
256
+ };
257
+ return c`
258
+ <span class="mdc-tab-indicator ${v({
259
+ "mdc-tab-indicator--fade": this.fade
260
+ })}">
261
+ <span class="mdc-tab-indicator__content ${v(t)}">${this.icon}</span>
262
+ </span>
263
+ `;
264
+ }
265
+ updated(t) {
266
+ t.has("fade") && this.createFoundation();
267
+ }
268
+ createAdapter() {
269
+ return Object.assign(Object.assign({}, I(this.mdcRoot)), { computeContentClientRect: () => this.contentElement.getBoundingClientRect(), setContentStyleProperty: (t, n) => this.contentElement.style.setProperty(t, n) });
270
+ }
271
+ computeContentClientRect() {
272
+ return this.mdcFoundation.computeContentClientRect();
273
+ }
274
+ activate(t) {
275
+ this.mdcFoundation.activate(t);
276
+ }
277
+ deactivate() {
278
+ this.mdcFoundation.deactivate();
279
+ }
280
+ }
281
+ i([
282
+ l(".mdc-tab-indicator")
283
+ ], u.prototype, "mdcRoot", void 0);
284
+ i([
285
+ l(".mdc-tab-indicator__content")
286
+ ], u.prototype, "contentElement", void 0);
287
+ i([
288
+ r()
289
+ ], u.prototype, "icon", void 0);
290
+ i([
291
+ r({ type: Boolean })
292
+ ], u.prototype, "fade", void 0);
293
+ /**
294
+ * @license
295
+ * Copyright 2021 Google LLC
296
+ * SPDX-LIcense-Identifier: Apache-2.0
297
+ */
298
+ const x = R`.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-tab-indicator .mdc-tab-indicator__content--icon{color:#018786;color:var(--mdc-theme-secondary, #018786)}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-top-width:2px}.mdc-tab-indicator .mdc-tab-indicator__content--icon{height:34px;font-size:34px}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}`;
299
+ /**
300
+ * @license
301
+ * Copyright 2018 Google LLC
302
+ * SPDX-License-Identifier: Apache-2.0
303
+ */
304
+ let C = class extends u {
305
+ };
306
+ C.styles = [x];
307
+ C = i([
308
+ A("mwc-tab-indicator")
309
+ ], C);
310
+ /**
311
+ * @license
312
+ * Copyright 2016 Google Inc.
313
+ *
314
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
315
+ * of this software and associated documentation files (the "Software"), to deal
316
+ * in the Software without restriction, including without limitation the rights
317
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
318
+ * copies of the Software, and to permit persons to whom the Software is
319
+ * furnished to do so, subject to the following conditions:
320
+ *
321
+ * The above copyright notice and this permission notice shall be included in
322
+ * all copies or substantial portions of the Software.
323
+ *
324
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
325
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
326
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
327
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
328
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
329
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
330
+ * THE SOFTWARE.
331
+ */
332
+ var B = (
333
+ /** @class */
334
+ function() {
335
+ function e(t) {
336
+ t === void 0 && (t = {}), this.adapter = t;
337
+ }
338
+ return Object.defineProperty(e, "cssClasses", {
339
+ get: function() {
340
+ return {};
341
+ },
342
+ enumerable: !1,
343
+ configurable: !0
344
+ }), Object.defineProperty(e, "strings", {
345
+ get: function() {
346
+ return {};
347
+ },
348
+ enumerable: !1,
349
+ configurable: !0
350
+ }), Object.defineProperty(e, "numbers", {
351
+ get: function() {
352
+ return {};
353
+ },
354
+ enumerable: !1,
355
+ configurable: !0
356
+ }), Object.defineProperty(e, "defaultAdapter", {
357
+ get: function() {
358
+ return {};
359
+ },
360
+ enumerable: !1,
361
+ configurable: !0
362
+ }), e.prototype.init = function() {
363
+ }, e.prototype.destroy = function() {
364
+ }, e;
365
+ }()
366
+ );
367
+ /**
368
+ * @license
369
+ * Copyright 2018 Google Inc.
370
+ *
371
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
372
+ * of this software and associated documentation files (the "Software"), to deal
373
+ * in the Software without restriction, including without limitation the rights
374
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
375
+ * copies of the Software, and to permit persons to whom the Software is
376
+ * furnished to do so, subject to the following conditions:
377
+ *
378
+ * The above copyright notice and this permission notice shall be included in
379
+ * all copies or substantial portions of the Software.
380
+ *
381
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
382
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
383
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
384
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
385
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
386
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
387
+ * THE SOFTWARE.
388
+ */
389
+ var f = {
390
+ ACTIVE: "mdc-tab--active"
391
+ }, d = {
392
+ ARIA_SELECTED: "aria-selected",
393
+ CONTENT_SELECTOR: ".mdc-tab__content",
394
+ INTERACTED_EVENT: "MDCTab:interacted",
395
+ RIPPLE_SELECTOR: ".mdc-tab__ripple",
396
+ TABINDEX: "tabIndex",
397
+ TAB_INDICATOR_SELECTOR: ".mdc-tab-indicator"
398
+ };
399
+ /**
400
+ * @license
401
+ * Copyright 2018 Google Inc.
402
+ *
403
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
404
+ * of this software and associated documentation files (the "Software"), to deal
405
+ * in the Software without restriction, including without limitation the rights
406
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
407
+ * copies of the Software, and to permit persons to whom the Software is
408
+ * furnished to do so, subject to the following conditions:
409
+ *
410
+ * The above copyright notice and this permission notice shall be included in
411
+ * all copies or substantial portions of the Software.
412
+ *
413
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
414
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
415
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
416
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
417
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
418
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
419
+ * THE SOFTWARE.
420
+ */
421
+ var N = (
422
+ /** @class */
423
+ function(e) {
424
+ m(t, e);
425
+ function t(n) {
426
+ var o = e.call(this, h(h({}, t.defaultAdapter), n)) || this;
427
+ return o.focusOnActivate = !0, o;
428
+ }
429
+ return Object.defineProperty(t, "cssClasses", {
430
+ get: function() {
431
+ return f;
432
+ },
433
+ enumerable: !1,
434
+ configurable: !0
435
+ }), Object.defineProperty(t, "strings", {
436
+ get: function() {
437
+ return d;
438
+ },
439
+ enumerable: !1,
440
+ configurable: !0
441
+ }), Object.defineProperty(t, "defaultAdapter", {
442
+ get: function() {
443
+ return {
444
+ addClass: function() {
445
+ },
446
+ removeClass: function() {
447
+ },
448
+ hasClass: function() {
449
+ return !1;
450
+ },
451
+ setAttr: function() {
452
+ },
453
+ activateIndicator: function() {
454
+ },
455
+ deactivateIndicator: function() {
456
+ },
457
+ notifyInteracted: function() {
458
+ },
459
+ getOffsetLeft: function() {
460
+ return 0;
461
+ },
462
+ getOffsetWidth: function() {
463
+ return 0;
464
+ },
465
+ getContentOffsetLeft: function() {
466
+ return 0;
467
+ },
468
+ getContentOffsetWidth: function() {
469
+ return 0;
470
+ },
471
+ focus: function() {
472
+ }
473
+ };
474
+ },
475
+ enumerable: !1,
476
+ configurable: !0
477
+ }), t.prototype.handleClick = function() {
478
+ this.adapter.notifyInteracted();
479
+ }, t.prototype.isActive = function() {
480
+ return this.adapter.hasClass(f.ACTIVE);
481
+ }, t.prototype.setFocusOnActivate = function(n) {
482
+ this.focusOnActivate = n;
483
+ }, t.prototype.activate = function(n) {
484
+ this.adapter.addClass(f.ACTIVE), this.adapter.setAttr(d.ARIA_SELECTED, "true"), this.adapter.setAttr(d.TABINDEX, "0"), this.adapter.activateIndicator(n), this.focusOnActivate && this.adapter.focus();
485
+ }, t.prototype.deactivate = function() {
486
+ this.isActive() && (this.adapter.removeClass(f.ACTIVE), this.adapter.setAttr(d.ARIA_SELECTED, "false"), this.adapter.setAttr(d.TABINDEX, "-1"), this.adapter.deactivateIndicator());
487
+ }, t.prototype.computeDimensions = function() {
488
+ var n = this.adapter.getOffsetWidth(), o = this.adapter.getOffsetLeft(), b = this.adapter.getContentOffsetWidth(), p = this.adapter.getContentOffsetLeft();
489
+ return {
490
+ contentLeft: o + p,
491
+ contentRight: o + p + b,
492
+ rootLeft: o,
493
+ rootRight: o + n
494
+ };
495
+ }, t;
496
+ }(B)
497
+ );
498
+ const y = N;
499
+ /**
500
+ * @license
501
+ * Copyright 2018 Google LLC
502
+ * SPDX-License-Identifier: Apache-2.0
503
+ */
504
+ let j = 0;
505
+ class a extends g {
506
+ constructor() {
507
+ super(...arguments), this.mdcFoundationClass = y, this.label = "", this.icon = "", this.hasImageIcon = !1, this.isFadingIndicator = !1, this.minWidth = !1, this.isMinWidthIndicator = !1, this.indicatorIcon = "", this.stacked = !1, this.focusOnActivate = !0, this._active = !1, this.initFocus = !1, this.shouldRenderRipple = !1, this.useStateLayerCustomProperties = !1, this.rippleElement = null, this.rippleHandlers = new E(() => (this.shouldRenderRipple = !0, this.ripple.then((t) => this.rippleElement = t), this.ripple));
508
+ }
509
+ get active() {
510
+ return this._active;
511
+ }
512
+ connectedCallback() {
513
+ this.dir = document.dir, super.connectedCallback();
514
+ }
515
+ firstUpdated() {
516
+ super.firstUpdated(), this.id = this.id || `mdc-tab-${++j}`;
517
+ }
518
+ render() {
519
+ const t = {
520
+ "mdc-tab--min-width": this.minWidth,
521
+ "mdc-tab--stacked": this.stacked
522
+ };
523
+ let n = c``;
524
+ (this.hasImageIcon || this.icon) && (n = c`
525
+ <span class="mdc-tab__icon material-icons"><slot name="icon">${this.icon}</slot></span>`);
526
+ let o = c``;
527
+ return this.label && (o = c`
528
+ <span class="mdc-tab__text-label">${this.label}</span>`), c`
529
+ <button
530
+ @click="${this.handleClick}"
531
+ class="mdc-tab ${v(t)}"
532
+ role="tab"
533
+ aria-selected="false"
534
+ tabindex="-1"
535
+ @focus="${this.focus}"
536
+ @blur="${this.handleBlur}"
537
+ @mousedown="${this.handleRippleMouseDown}"
538
+ @mouseenter="${this.handleRippleMouseEnter}"
539
+ @mouseleave="${this.handleRippleMouseLeave}"
540
+ @touchstart="${this.handleRippleTouchStart}"
541
+ @touchend="${this.handleRippleDeactivate}"
542
+ @touchcancel="${this.handleRippleDeactivate}">
543
+ <span class="mdc-tab__content">
544
+ ${n}
545
+ ${o}
546
+ ${this.isMinWidthIndicator ? this.renderIndicator() : ""}
547
+ </span>
548
+ ${this.isMinWidthIndicator ? "" : this.renderIndicator()}
549
+ ${this.renderRipple()}
550
+ </button>`;
551
+ }
552
+ renderIndicator() {
553
+ return c`<mwc-tab-indicator
554
+ .icon="${this.indicatorIcon}"
555
+ .fade="${this.isFadingIndicator}"></mwc-tab-indicator>`;
556
+ }
557
+ // TODO(dfreedm): Make this use selected as a param after Polymer/internal#739
558
+ /** @soyCompatible */
559
+ renderRipple() {
560
+ return this.shouldRenderRipple ? c`<mwc-ripple primary
561
+ .internalUseStateLayerCustomProperties="${this.useStateLayerCustomProperties}"></mwc-ripple>` : "";
562
+ }
563
+ createAdapter() {
564
+ return Object.assign(Object.assign({}, I(this.mdcRoot)), { setAttr: (t, n) => this.mdcRoot.setAttribute(t, n), activateIndicator: async (t) => {
565
+ await this.tabIndicator.updateComplete, this.tabIndicator.activate(t);
566
+ }, deactivateIndicator: async () => {
567
+ await this.tabIndicator.updateComplete, this.tabIndicator.deactivate();
568
+ }, notifyInteracted: () => this.dispatchEvent(new CustomEvent(y.strings.INTERACTED_EVENT, {
569
+ detail: { tabId: this.id },
570
+ bubbles: !0,
571
+ composed: !0,
572
+ cancelable: !0
573
+ })), getOffsetLeft: () => this.offsetLeft, getOffsetWidth: () => this.mdcRoot.offsetWidth, getContentOffsetLeft: () => this._contentElement.offsetLeft, getContentOffsetWidth: () => this._contentElement.offsetWidth, focus: () => {
574
+ this.initFocus ? this.initFocus = !1 : this.mdcRoot.focus();
575
+ } });
576
+ }
577
+ activate(t) {
578
+ t || (this.initFocus = !0), this.mdcFoundation ? (this.mdcFoundation.activate(t), this.setActive(this.mdcFoundation.isActive())) : this.updateComplete.then(() => {
579
+ this.mdcFoundation.activate(t), this.setActive(this.mdcFoundation.isActive());
580
+ });
581
+ }
582
+ deactivate() {
583
+ this.mdcFoundation.deactivate(), this.setActive(this.mdcFoundation.isActive());
584
+ }
585
+ setActive(t) {
586
+ const n = this.active;
587
+ n !== t && (this._active = t, this.requestUpdate("active", n));
588
+ }
589
+ computeDimensions() {
590
+ return this.mdcFoundation.computeDimensions();
591
+ }
592
+ computeIndicatorClientRect() {
593
+ return this.tabIndicator.computeContentClientRect();
594
+ }
595
+ // NOTE: needed only for ShadyDOM where delegatesFocus is not implemented
596
+ focus() {
597
+ this.mdcRoot.focus(), this.handleFocus();
598
+ }
599
+ handleClick() {
600
+ this.handleFocus(), this.mdcFoundation.handleClick();
601
+ }
602
+ handleFocus() {
603
+ this.handleRippleFocus();
604
+ }
605
+ handleBlur() {
606
+ this.handleRippleBlur();
607
+ }
608
+ handleRippleMouseDown(t) {
609
+ const n = () => {
610
+ window.removeEventListener("mouseup", n), this.handleRippleDeactivate();
611
+ };
612
+ window.addEventListener("mouseup", n), this.rippleHandlers.startPress(t);
613
+ }
614
+ handleRippleTouchStart(t) {
615
+ this.rippleHandlers.startPress(t);
616
+ }
617
+ handleRippleDeactivate() {
618
+ this.rippleHandlers.endPress();
619
+ }
620
+ handleRippleMouseEnter() {
621
+ this.rippleHandlers.startHover();
622
+ }
623
+ handleRippleMouseLeave() {
624
+ this.rippleHandlers.endHover();
625
+ }
626
+ handleRippleFocus() {
627
+ this.rippleHandlers.startFocus();
628
+ }
629
+ handleRippleBlur() {
630
+ this.rippleHandlers.endFocus();
631
+ }
632
+ get isRippleActive() {
633
+ var t;
634
+ return ((t = this.rippleElement) === null || t === void 0 ? void 0 : t.isActive) || !1;
635
+ }
636
+ }
637
+ a.shadowRootOptions = { mode: "open", delegatesFocus: !0 };
638
+ i([
639
+ l(".mdc-tab")
640
+ ], a.prototype, "mdcRoot", void 0);
641
+ i([
642
+ l("mwc-tab-indicator")
643
+ ], a.prototype, "tabIndicator", void 0);
644
+ i([
645
+ r()
646
+ ], a.prototype, "label", void 0);
647
+ i([
648
+ r()
649
+ ], a.prototype, "icon", void 0);
650
+ i([
651
+ r({ type: Boolean })
652
+ ], a.prototype, "hasImageIcon", void 0);
653
+ i([
654
+ r({ type: Boolean })
655
+ ], a.prototype, "isFadingIndicator", void 0);
656
+ i([
657
+ r({ type: Boolean })
658
+ ], a.prototype, "minWidth", void 0);
659
+ i([
660
+ r({ type: Boolean })
661
+ ], a.prototype, "isMinWidthIndicator", void 0);
662
+ i([
663
+ r({ type: Boolean, reflect: !0, attribute: "active" })
664
+ ], a.prototype, "active", null);
665
+ i([
666
+ r()
667
+ ], a.prototype, "indicatorIcon", void 0);
668
+ i([
669
+ r({ type: Boolean })
670
+ ], a.prototype, "stacked", void 0);
671
+ i([
672
+ F(async function(e) {
673
+ await this.updateComplete, this.mdcFoundation.setFocusOnActivate(e);
674
+ }),
675
+ r({ type: Boolean })
676
+ ], a.prototype, "focusOnActivate", void 0);
677
+ i([
678
+ l(".mdc-tab__content")
679
+ ], a.prototype, "_contentElement", void 0);
680
+ i([
681
+ _()
682
+ ], a.prototype, "shouldRenderRipple", void 0);
683
+ i([
684
+ _()
685
+ ], a.prototype, "useStateLayerCustomProperties", void 0);
686
+ i([
687
+ T("mwc-ripple")
688
+ ], a.prototype, "ripple", void 0);
689
+ i([
690
+ O({ passive: !0 })
691
+ ], a.prototype, "handleRippleTouchStart", null);
692
+ export {
693
+ a as T
694
+ };