@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,380 @@
1
+ import { _ as f, a as u, b as i } from "./tslib.es6.mjs";
2
+ import { e as p } from "./property.mjs";
3
+ import { y as c } from "./query-assigned-elements.mjs";
4
+ import { B as _ } from "./base-element.mjs";
5
+ import { s as A, a as S } from "./utils.mjs";
6
+ import { i as g } from "./query.mjs";
7
+ import { o as h } from "./class-map.mjs";
8
+ /**
9
+ * @license
10
+ * Copyright 2018 Google Inc.
11
+ *
12
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ * of this software and associated documentation files (the "Software"), to deal
14
+ * in the Software without restriction, including without limitation the rights
15
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ * copies of the Software, and to permit persons to whom the Software is
17
+ * furnished to do so, subject to the following conditions:
18
+ *
19
+ * The above copyright notice and this permission notice shall be included in
20
+ * all copies or substantial portions of the Software.
21
+ *
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28
+ * THE SOFTWARE.
29
+ */
30
+ var v = {
31
+ FIXED_CLASS: "mdc-top-app-bar--fixed",
32
+ FIXED_SCROLLED_CLASS: "mdc-top-app-bar--fixed-scrolled",
33
+ SHORT_CLASS: "mdc-top-app-bar--short",
34
+ SHORT_COLLAPSED_CLASS: "mdc-top-app-bar--short-collapsed",
35
+ SHORT_HAS_ACTION_ITEM_CLASS: "mdc-top-app-bar--short-has-action-item"
36
+ }, a = {
37
+ DEBOUNCE_THROTTLE_RESIZE_TIME_MS: 100,
38
+ MAX_TOP_APP_BAR_HEIGHT: 128
39
+ }, T = {
40
+ ACTION_ITEM_SELECTOR: ".mdc-top-app-bar__action-item",
41
+ NAVIGATION_EVENT: "MDCTopAppBar:nav",
42
+ NAVIGATION_ICON_SELECTOR: ".mdc-top-app-bar__navigation-icon",
43
+ ROOT_SELECTOR: ".mdc-top-app-bar",
44
+ TITLE_SELECTOR: ".mdc-top-app-bar__title"
45
+ };
46
+ /**
47
+ * @license
48
+ * Copyright 2016 Google Inc.
49
+ *
50
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
51
+ * of this software and associated documentation files (the "Software"), to deal
52
+ * in the Software without restriction, including without limitation the rights
53
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
54
+ * copies of the Software, and to permit persons to whom the Software is
55
+ * furnished to do so, subject to the following conditions:
56
+ *
57
+ * The above copyright notice and this permission notice shall be included in
58
+ * all copies or substantial portions of the Software.
59
+ *
60
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
61
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
62
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
63
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
65
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
66
+ * THE SOFTWARE.
67
+ */
68
+ var y = (
69
+ /** @class */
70
+ function() {
71
+ function r(e) {
72
+ e === void 0 && (e = {}), this.adapter = e;
73
+ }
74
+ return Object.defineProperty(r, "cssClasses", {
75
+ get: function() {
76
+ return {};
77
+ },
78
+ enumerable: !1,
79
+ configurable: !0
80
+ }), Object.defineProperty(r, "strings", {
81
+ get: function() {
82
+ return {};
83
+ },
84
+ enumerable: !1,
85
+ configurable: !0
86
+ }), Object.defineProperty(r, "numbers", {
87
+ get: function() {
88
+ return {};
89
+ },
90
+ enumerable: !1,
91
+ configurable: !0
92
+ }), Object.defineProperty(r, "defaultAdapter", {
93
+ get: function() {
94
+ return {};
95
+ },
96
+ enumerable: !1,
97
+ configurable: !0
98
+ }), r.prototype.init = function() {
99
+ }, r.prototype.destroy = function() {
100
+ }, r;
101
+ }()
102
+ );
103
+ /**
104
+ * @license
105
+ * Copyright 2018 Google Inc.
106
+ *
107
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
108
+ * of this software and associated documentation files (the "Software"), to deal
109
+ * in the Software without restriction, including without limitation the rights
110
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
111
+ * copies of the Software, and to permit persons to whom the Software is
112
+ * furnished to do so, subject to the following conditions:
113
+ *
114
+ * The above copyright notice and this permission notice shall be included in
115
+ * all copies or substantial portions of the Software.
116
+ *
117
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
118
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
119
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
120
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
121
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
122
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
123
+ * THE SOFTWARE.
124
+ */
125
+ var B = (
126
+ /** @class */
127
+ function(r) {
128
+ f(e, r);
129
+ function e(t) {
130
+ return r.call(this, u(u({}, e.defaultAdapter), t)) || this;
131
+ }
132
+ return Object.defineProperty(e, "strings", {
133
+ get: function() {
134
+ return T;
135
+ },
136
+ enumerable: !1,
137
+ configurable: !0
138
+ }), Object.defineProperty(e, "cssClasses", {
139
+ get: function() {
140
+ return v;
141
+ },
142
+ enumerable: !1,
143
+ configurable: !0
144
+ }), Object.defineProperty(e, "numbers", {
145
+ get: function() {
146
+ return a;
147
+ },
148
+ enumerable: !1,
149
+ configurable: !0
150
+ }), Object.defineProperty(e, "defaultAdapter", {
151
+ /**
152
+ * See {@link MDCTopAppBarAdapter} for typing information on parameters and return types.
153
+ */
154
+ get: function() {
155
+ return {
156
+ addClass: function() {
157
+ },
158
+ removeClass: function() {
159
+ },
160
+ hasClass: function() {
161
+ return !1;
162
+ },
163
+ setStyle: function() {
164
+ },
165
+ getTopAppBarHeight: function() {
166
+ return 0;
167
+ },
168
+ notifyNavigationIconClicked: function() {
169
+ },
170
+ getViewportScrollY: function() {
171
+ return 0;
172
+ },
173
+ getTotalActionItems: function() {
174
+ return 0;
175
+ }
176
+ };
177
+ },
178
+ enumerable: !1,
179
+ configurable: !0
180
+ }), e.prototype.handleTargetScroll = function() {
181
+ }, e.prototype.handleWindowResize = function() {
182
+ }, e.prototype.handleNavigationClick = function() {
183
+ this.adapter.notifyNavigationIconClicked();
184
+ }, e;
185
+ }(y)
186
+ );
187
+ /**
188
+ * @license
189
+ * Copyright 2018 Google Inc.
190
+ *
191
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
192
+ * of this software and associated documentation files (the "Software"), to deal
193
+ * in the Software without restriction, including without limitation the rights
194
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
195
+ * copies of the Software, and to permit persons to whom the Software is
196
+ * furnished to do so, subject to the following conditions:
197
+ *
198
+ * The above copyright notice and this permission notice shall be included in
199
+ * all copies or substantial portions of the Software.
200
+ *
201
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
202
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
203
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
204
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
205
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
206
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
207
+ * THE SOFTWARE.
208
+ */
209
+ var n = 0, C = (
210
+ /** @class */
211
+ function(r) {
212
+ f(e, r);
213
+ function e(t) {
214
+ var s = r.call(this, t) || this;
215
+ return s.wasDocked = !0, s.isDockedShowing = !0, s.currentAppBarOffsetTop = 0, s.isCurrentlyBeingResized = !1, s.resizeThrottleId = n, s.resizeDebounceId = n, s.lastScrollPosition = s.adapter.getViewportScrollY(), s.topAppBarHeight = s.adapter.getTopAppBarHeight(), s;
216
+ }
217
+ return e.prototype.destroy = function() {
218
+ r.prototype.destroy.call(this), this.adapter.setStyle("top", "");
219
+ }, e.prototype.handleTargetScroll = function() {
220
+ var t = Math.max(this.adapter.getViewportScrollY(), 0), s = t - this.lastScrollPosition;
221
+ this.lastScrollPosition = t, this.isCurrentlyBeingResized || (this.currentAppBarOffsetTop -= s, this.currentAppBarOffsetTop > 0 ? this.currentAppBarOffsetTop = 0 : Math.abs(this.currentAppBarOffsetTop) > this.topAppBarHeight && (this.currentAppBarOffsetTop = -this.topAppBarHeight), this.moveTopAppBar());
222
+ }, e.prototype.handleWindowResize = function() {
223
+ var t = this;
224
+ this.resizeThrottleId || (this.resizeThrottleId = setTimeout(function() {
225
+ t.resizeThrottleId = n, t.throttledResizeHandler();
226
+ }, a.DEBOUNCE_THROTTLE_RESIZE_TIME_MS)), this.isCurrentlyBeingResized = !0, this.resizeDebounceId && clearTimeout(this.resizeDebounceId), this.resizeDebounceId = setTimeout(function() {
227
+ t.handleTargetScroll(), t.isCurrentlyBeingResized = !1, t.resizeDebounceId = n;
228
+ }, a.DEBOUNCE_THROTTLE_RESIZE_TIME_MS);
229
+ }, e.prototype.checkForUpdate = function() {
230
+ var t = -this.topAppBarHeight, s = this.currentAppBarOffsetTop < 0, l = this.currentAppBarOffsetTop > t, d = s && l;
231
+ if (d)
232
+ this.wasDocked = !1;
233
+ else if (this.wasDocked) {
234
+ if (this.isDockedShowing !== l)
235
+ return this.isDockedShowing = l, !0;
236
+ } else
237
+ return this.wasDocked = !0, !0;
238
+ return d;
239
+ }, e.prototype.moveTopAppBar = function() {
240
+ if (this.checkForUpdate()) {
241
+ var t = this.currentAppBarOffsetTop;
242
+ Math.abs(t) >= this.topAppBarHeight && (t = -a.MAX_TOP_APP_BAR_HEIGHT), this.adapter.setStyle("top", t + "px");
243
+ }
244
+ }, e.prototype.throttledResizeHandler = function() {
245
+ var t = this.adapter.getTopAppBarHeight();
246
+ this.topAppBarHeight !== t && (this.wasDocked = !1, this.currentAppBarOffsetTop -= this.topAppBarHeight - t, this.topAppBarHeight = t), this.handleTargetScroll();
247
+ }, e;
248
+ }(B)
249
+ );
250
+ const O = C;
251
+ /**
252
+ * @license
253
+ * Copyright 2019 Google LLC
254
+ * SPDX-License-Identifier: Apache-2.0
255
+ */
256
+ const m = A ? { passive: !0 } : void 0;
257
+ class o extends _ {
258
+ constructor() {
259
+ super(...arguments), this.centerTitle = !1, this.handleTargetScroll = () => {
260
+ this.mdcFoundation.handleTargetScroll();
261
+ }, this.handleNavigationClick = () => {
262
+ this.mdcFoundation.handleNavigationClick();
263
+ };
264
+ }
265
+ get scrollTarget() {
266
+ return this._scrollTarget || window;
267
+ }
268
+ set scrollTarget(e) {
269
+ this.unregisterScrollListener();
270
+ const t = this.scrollTarget;
271
+ this._scrollTarget = e, this.updateRootPosition(), this.requestUpdate("scrollTarget", t), this.registerScrollListener();
272
+ }
273
+ updateRootPosition() {
274
+ if (this.mdcRoot) {
275
+ const e = this.scrollTarget === window;
276
+ this.mdcRoot.style.position = e ? "" : "absolute";
277
+ }
278
+ }
279
+ render() {
280
+ let e = c`<span class="mdc-top-app-bar__title"><slot name="title"></slot></span>`;
281
+ return this.centerTitle && (e = c`<section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-center">${e}</section>`), c`
282
+ <header class="mdc-top-app-bar ${h(this.barClasses())}">
283
+ <div class="mdc-top-app-bar__row">
284
+ <section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-start" id="navigation">
285
+ <slot name="navigationIcon"
286
+ @click=${this.handleNavigationClick}></slot>
287
+ ${this.centerTitle ? null : e}
288
+ </section>
289
+ ${this.centerTitle ? e : null}
290
+ <section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-end" id="actions" role="toolbar">
291
+ <slot name="actionItems"></slot>
292
+ </section>
293
+ </div>
294
+ </header>
295
+ <div class="${h(this.contentClasses())}">
296
+ <slot></slot>
297
+ </div>
298
+ `;
299
+ }
300
+ createAdapter() {
301
+ return Object.assign(Object.assign({}, S(this.mdcRoot)), { setStyle: (e, t) => this.mdcRoot.style.setProperty(e, t), getTopAppBarHeight: () => this.mdcRoot.clientHeight, notifyNavigationIconClicked: () => {
302
+ this.dispatchEvent(new Event(T.NAVIGATION_EVENT, { bubbles: !0, cancelable: !0 }));
303
+ }, getViewportScrollY: () => this.scrollTarget instanceof Window ? this.scrollTarget.pageYOffset : this.scrollTarget.scrollTop, getTotalActionItems: () => this._actionItemsSlot.assignedNodes({ flatten: !0 }).length });
304
+ }
305
+ registerListeners() {
306
+ this.registerScrollListener();
307
+ }
308
+ unregisterListeners() {
309
+ this.unregisterScrollListener();
310
+ }
311
+ registerScrollListener() {
312
+ this.scrollTarget.addEventListener("scroll", this.handleTargetScroll, m);
313
+ }
314
+ unregisterScrollListener() {
315
+ this.scrollTarget.removeEventListener("scroll", this.handleTargetScroll);
316
+ }
317
+ firstUpdated() {
318
+ super.firstUpdated(), this.updateRootPosition(), this.registerListeners();
319
+ }
320
+ disconnectedCallback() {
321
+ super.disconnectedCallback(), this.unregisterListeners();
322
+ }
323
+ }
324
+ i([
325
+ g(".mdc-top-app-bar")
326
+ ], o.prototype, "mdcRoot", void 0);
327
+ i([
328
+ g('slot[name="actionItems"]')
329
+ ], o.prototype, "_actionItemsSlot", void 0);
330
+ i([
331
+ p({ type: Boolean })
332
+ ], o.prototype, "centerTitle", void 0);
333
+ i([
334
+ p({ type: Object })
335
+ ], o.prototype, "scrollTarget", null);
336
+ /**
337
+ * @license
338
+ * Copyright 2018 Google LLC
339
+ * SPDX-License-Identifier: Apache-2.0
340
+ */
341
+ class b extends o {
342
+ constructor() {
343
+ super(...arguments), this.mdcFoundationClass = O, this.prominent = !1, this.dense = !1, this.handleResize = () => {
344
+ this.mdcFoundation.handleWindowResize();
345
+ };
346
+ }
347
+ barClasses() {
348
+ return {
349
+ "mdc-top-app-bar--dense": this.dense,
350
+ "mdc-top-app-bar--prominent": this.prominent,
351
+ "center-title": this.centerTitle
352
+ };
353
+ }
354
+ contentClasses() {
355
+ return {
356
+ "mdc-top-app-bar--fixed-adjust": !this.dense && !this.prominent,
357
+ "mdc-top-app-bar--dense-fixed-adjust": this.dense && !this.prominent,
358
+ "mdc-top-app-bar--prominent-fixed-adjust": !this.dense && this.prominent,
359
+ "mdc-top-app-bar--dense-prominent-fixed-adjust": this.dense && this.prominent
360
+ };
361
+ }
362
+ registerListeners() {
363
+ super.registerListeners(), window.addEventListener("resize", this.handleResize, m);
364
+ }
365
+ unregisterListeners() {
366
+ super.unregisterListeners(), window.removeEventListener("resize", this.handleResize);
367
+ }
368
+ }
369
+ i([
370
+ p({ type: Boolean, reflect: !0 })
371
+ ], b.prototype, "prominent", void 0);
372
+ i([
373
+ p({ type: Boolean, reflect: !0 })
374
+ ], b.prototype, "dense", void 0);
375
+ export {
376
+ C as M,
377
+ b as T,
378
+ v as c,
379
+ m as p
380
+ };
package/nav-list-item.mjs CHANGED
@@ -1,27 +1,35 @@
1
- import { css as i, unsafeCSS as a } from "lit";
2
- import { property as h, customElement as l } from "lit/decorators.js";
3
- import { C as d, s as y } from "./list-item.mjs";
4
- import { styles as f } from "@material/mwc-list/mwc-control-list-item.css?used";
5
- import { styles as g } from "@material/mwc-list/mwc-list-item.css?used";
6
- import "@material/mwc-list/mwc-list-item-base";
1
+ import { i, r as a, e as h } from "./query-assigned-elements.mjs";
2
+ import { e as d } from "./property.mjs";
3
+ import { C as l, s as y } from "./list-item.mjs";
4
+ import { s as f, a as g } from "./mwc-list-item.css.mjs";
5
+ import "./mwc-list-item-base.mjs";
6
+ import "./tslib.es6.mjs";
7
+ import "./ripple-handlers.mjs";
8
+ import "./base-element.mjs";
9
+ import "./utils.mjs";
10
+ import "./state.mjs";
11
+ import "./query.mjs";
12
+ import "./class-map.mjs";
13
+ import "./style-map.mjs";
14
+ import "./observer.mjs";
7
15
  const v = `:host{font-family:var(--mdc-typography-font-family);font-size:var(--mdc-typography-body1-font-size);font-weight:var(--mdc-typography-body1-font-weight);line-height:var(--mdc-typography-body1-line-height)}:host([navopen]){border-radius:0 28px 28px 0;transition:border-radius .1s ease-out;margin-right:16px}:host([graphic=avatar]:not([navopen])){border-radius:100%;margin:0 auto 8px;padding:0;width:48px;height:48px}:host([graphic=avatar]:not([navopen])) ::slotted(cv-icon[slot=graphic]){margin-left:8px;background:transparent}:host(.home-item) ::slotted(.teradata-no-circle){--mdc-list-item-graphic-size: 40px;--mdc-icon-size: 40px;display:none}:host(.home-item) ::slotted(.home-icon){display:none}:host(.home-item) ::slotted(.home-icon):hover .covalent-icon{display:none}:host(.home-item:hover) ::slotted(.home-icon){display:block}:host(.home-item:hover) ::slotted(.teradata-circle){display:none}:host(.home-item:hover) ::slotted(.teradata-no-circle){display:none}:host(.home-item:not([navopen])){background-color:#f3753f;--mdc-ripple-color: #ffffff;--mdc-theme-text-icon-on-background: #ffffff}:host(.home-item:not([navopen])) ::slotted(.teradata-circle){display:none}:host(.home-item:not([navopen])) ::slotted(.teradata-no-circle){display:block}:host(.home-item:hover:not([navopen])) ::slotted(.teradata-no-circle){display:none}:host(.beta-list-item){--mdc-theme-primary: var(--mdc-theme-surface-caution);--mdc-list-item-meta-size: 20px;--mdc-list-item-graphic-size: 40px;--mdc-list-item-graphic-margin: 15px;--mdc-typography-subtitle1-font-size: var( --mdc-typography-subtitle2-font-size );--mdc-typography-body2-font-size: var(--mdc-typography-caption-font-size);margin-bottom:8px;font-size:var(--mdc-typography-subtitle1-font-size);margin-right:0;border-radius:0}:host(.beta-list-item:not([navopen])){--mdc-list-item-graphic-margin: 0;--mdc-typography-subtitle1-font-size: 0;--mdc-typography-body2-font-size: 0;height:48px;font-size:0;padding:0;justify-content:center;align-content:center}
8
16
  `;
9
- var b = Object.defineProperty, u = Object.getOwnPropertyDescriptor, c = (m, e, r, o) => {
10
- for (var t = o > 1 ? void 0 : o ? u(e, r) : e, s = m.length - 1, p; s >= 0; s--)
11
- (p = m[s]) && (t = (o ? p(e, r, t) : p(t)) || t);
12
- return o && t && b(e, r, t), t;
17
+ var b = Object.defineProperty, u = Object.getOwnPropertyDescriptor, c = (m, o, n, e) => {
18
+ for (var t = e > 1 ? void 0 : e ? u(o, n) : o, s = m.length - 1, p; s >= 0; s--)
19
+ (p = m[s]) && (t = (e ? p(o, n, t) : p(t)) || t);
20
+ return e && t && b(o, n, t), t;
13
21
  };
14
- let n = class extends d {
22
+ let r = class extends l {
15
23
  constructor() {
16
24
  super(), this.navOpen = !1;
17
25
  }
18
26
  };
19
- n.styles = [
27
+ r.styles = [
20
28
  i`
21
- ${a(g)}
29
+ ${a(f)}
22
30
  `,
23
31
  i`
24
- ${a(f)}
32
+ ${a(g)}
25
33
  `,
26
34
  i`
27
35
  ${a(y)}
@@ -31,11 +39,11 @@ n.styles = [
31
39
  `
32
40
  ];
33
41
  c([
34
- h({ type: Boolean, reflect: !0 })
35
- ], n.prototype, "navOpen", 2);
36
- n = c([
37
- l("cv-nav-list-item")
38
- ], n);
42
+ d({ type: Boolean, reflect: !0 })
43
+ ], r.prototype, "navOpen", 2);
44
+ r = c([
45
+ h("cv-nav-list-item")
46
+ ], r);
39
47
  export {
40
- n as CovalentNavRailListItem
48
+ r as CovalentNavRailListItem
41
49
  };
package/observer.mjs ADDED
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2018 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ const v = (n) => (
7
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
+ (s, b) => {
9
+ if (s.constructor._observers) {
10
+ if (!s.constructor.hasOwnProperty("_observers")) {
11
+ const r = s.constructor._observers;
12
+ s.constructor._observers = /* @__PURE__ */ new Map(), r.forEach(
13
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
+ (e, c) => s.constructor._observers.set(c, e)
15
+ );
16
+ }
17
+ } else {
18
+ s.constructor._observers = /* @__PURE__ */ new Map();
19
+ const r = s.updated;
20
+ s.updated = function(e) {
21
+ r.call(this, e), e.forEach((c, t) => {
22
+ const o = this.constructor._observers.get(t);
23
+ o !== void 0 && o.call(this, this[t], c);
24
+ });
25
+ };
26
+ }
27
+ s.constructor._observers.set(b, n);
28
+ }
29
+ );
30
+ export {
31
+ v as o
32
+ };
package/package.json CHANGED
@@ -1,8 +1,15 @@
1
1
  {
2
2
  "name": "@covalent/components",
3
- "version": "6.0.1",
3
+ "version": "6.0.2",
4
4
  "description": "a catalog of material components for covalent",
5
- "main": "index.js",
5
+ "main": "covalent.umd.js",
6
+ "module": "covalent.mjs",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./covalent.js",
10
+ "require": "./covalent.umd.js"
11
+ }
12
+ },
6
13
  "repository": {
7
14
  "type": "git",
8
15
  "url": "https://github.com/teradata/covalent.git"
package/property.mjs ADDED
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2017 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ const c = (t, i) => i.kind === "method" && i.descriptor && !("value" in i.descriptor) ? { ...i, finisher(r) {
7
+ r.createProperty(i.key, t);
8
+ } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: i.key, initializer() {
9
+ typeof i.initializer == "function" && (this[i.key] = i.initializer.call(this));
10
+ }, finisher(r) {
11
+ r.createProperty(i.key, t);
12
+ } };
13
+ function y(t) {
14
+ return (i, r) => r !== void 0 ? ((e, o, n) => {
15
+ o.constructor.createProperty(n, e);
16
+ })(t, i, r) : c(t, i);
17
+ }
18
+ export {
19
+ y as e
20
+ };