@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.
- package/action-ribbon.mjs +9 -7
- package/alert.mjs +13 -11
- package/app-shell.mjs +10 -4
- package/aria-property.mjs +41 -0
- package/base-element.mjs +28 -0
- package/button.mjs +180 -13
- package/card.mjs +3 -3
- package/check-list-item.mjs +92 -14
- package/checkbox.mjs +26 -14
- package/circular-progress.mjs +144 -10
- package/class-map.mjs +62 -0
- package/code-snippet.mjs +6 -5
- package/covalent.mjs +2 -2
- package/covalent.umd.js +3339 -137
- package/dialog.mjs +750 -15
- package/directive-helpers.mjs +11 -0
- package/drawer.mjs +26 -15
- package/empty-state.mjs +4 -4
- package/event-options.mjs +14 -0
- package/form-element.mjs +50 -0
- package/foundation.mjs +152 -0
- package/foundation2.mjs +60 -0
- package/icon-button.mjs +130 -15
- package/icon-check-toggle.mjs +18 -8
- package/icon-radio-toggle.mjs +29 -18
- package/icon.mjs +19 -13
- package/if-defined.mjs +10 -0
- package/inert.esm.mjs +640 -0
- package/linear-progress.mjs +178 -15
- package/list-expansion.mjs +33 -22
- package/list-item.mjs +19 -20
- package/list.mjs +26 -13
- package/menu.mjs +32 -13
- package/mwc-checkbox-base.mjs +198 -0
- package/mwc-checkbox.css.mjs +10 -0
- package/mwc-drawer-base.mjs +335 -0
- package/mwc-icon.mjs +26 -0
- package/mwc-line-ripple-directive.mjs +653 -0
- package/mwc-list-base.mjs +840 -0
- package/mwc-list-item-base.mjs +202 -0
- package/mwc-list-item.css.mjs +17 -0
- package/mwc-menu-base.mjs +1145 -0
- package/mwc-radio-base.mjs +528 -0
- package/mwc-radio.css.mjs +10 -0
- package/mwc-slider.css.mjs +956 -0
- package/mwc-tab-base.mjs +694 -0
- package/mwc-top-app-bar-base.mjs +380 -0
- package/nav-list-item.mjs +28 -20
- package/observer.mjs +32 -0
- package/package.json +9 -2
- package/property.mjs +20 -0
- package/query-assigned-elements.mjs +615 -0
- package/query-assigned-nodes.mjs +17 -0
- package/query.mjs +25 -0
- package/radio-list-item.mjs +93 -12
- package/radio.mjs +28 -15
- package/ripple-handlers.mjs +761 -0
- package/select.mjs +1257 -15
- package/side-sheet.mjs +21 -16
- package/slider-range.mjs +438 -11
- package/slider.mjs +253 -13
- package/snackbar.mjs +456 -15
- package/src/action-ribbon/action-ribbon-base.d.ts +30 -0
- package/src/action-ribbon/action-ribbon-base.d.ts.map +1 -0
- package/src/action-ribbon/action-ribbon.d.ts +15 -0
- package/src/action-ribbon/action-ribbon.d.ts.map +1 -0
- package/src/alert/alert-base.d.ts +31 -0
- package/src/alert/alert-base.d.ts.map +1 -0
- package/src/alert/alert.d.ts +15 -0
- package/src/alert/alert.d.ts.map +1 -0
- package/src/app-shell/app-shell.d.ts +26 -0
- package/src/app-shell/app-shell.d.ts.map +1 -0
- package/src/button/button.d.ts +10 -0
- package/src/button/button.d.ts.map +1 -0
- package/src/card/card-base.d.ts +25 -0
- package/src/card/card-base.d.ts.map +1 -0
- package/src/card/card.d.ts +10 -0
- package/src/card/card.d.ts.map +1 -0
- package/src/checkbox/checkbox.d.ts +10 -0
- package/src/checkbox/checkbox.d.ts.map +1 -0
- package/src/chips/chip-base.d.ts +52 -0
- package/src/chips/chip-base.d.ts.map +1 -0
- package/src/chips/chip-set-base.d.ts +33 -0
- package/src/chips/chip-set-base.d.ts.map +1 -0
- package/src/chips/chip-set.d.ts +15 -0
- package/src/chips/chip-set.d.ts.map +1 -0
- package/src/chips/chip.d.ts +15 -0
- package/src/chips/chip.d.ts.map +1 -0
- package/src/chips/foundation.d.ts +60 -0
- package/src/chips/foundation.d.ts.map +1 -0
- package/src/circular-progress/circular-progress.d.ts +10 -0
- package/src/circular-progress/circular-progress.d.ts.map +1 -0
- package/src/code-snippet/code-snippet.d.ts +21 -0
- package/src/code-snippet/code-snippet.d.ts.map +1 -0
- package/src/dialog/dialog.d.ts +10 -0
- package/src/dialog/dialog.d.ts.map +1 -0
- package/src/drawer/drawer.d.ts +10 -0
- package/src/drawer/drawer.d.ts.map +1 -0
- package/src/empty-state/empty-state.d.ts +16 -0
- package/src/empty-state/empty-state.d.ts.map +1 -0
- package/src/formfield/formfield.d.ts +10 -0
- package/src/formfield/formfield.d.ts.map +1 -0
- package/src/icon/icon.d.ts +10 -0
- package/src/icon/icon.d.ts.map +1 -0
- package/src/icon-button/icon-button.d.ts +10 -0
- package/src/icon-button/icon-button.d.ts.map +1 -0
- package/src/icon-checkbox/icon-check-toggle.d.ts +15 -0
- package/src/icon-checkbox/icon-check-toggle.d.ts.map +1 -0
- package/src/icon-radio/icon-radio-toggle.d.ts +14 -0
- package/src/icon-radio/icon-radio-toggle.d.ts.map +1 -0
- package/src/index.d.ts +3 -0
- package/src/index.d.ts.map +1 -0
- package/src/linear-progress/linear-progress.d.ts +10 -0
- package/src/linear-progress/linear-progress.d.ts.map +1 -0
- package/src/list/check-list-item.d.ts +10 -0
- package/src/list/check-list-item.d.ts.map +1 -0
- package/src/list/list-expansion.d.ts +18 -0
- package/src/list/list-expansion.d.ts.map +1 -0
- package/src/list/list-item.d.ts +12 -0
- package/src/list/list-item.d.ts.map +1 -0
- package/src/list/list.d.ts +10 -0
- package/src/list/list.d.ts.map +1 -0
- package/src/list/nav-list-item.d.ts +12 -0
- package/src/list/nav-list-item.d.ts.map +1 -0
- package/src/list/radio-list-item.d.ts +10 -0
- package/src/list/radio-list-item.d.ts.map +1 -0
- package/src/menu/menu.d.ts +10 -0
- package/src/menu/menu.d.ts.map +1 -0
- package/src/radio/radio.d.ts +10 -0
- package/src/radio/radio.d.ts.map +1 -0
- package/src/select/select.d.ts +10 -0
- package/src/select/select.d.ts.map +1 -0
- package/src/side-sheet/side-sheet.d.ts +18 -0
- package/src/side-sheet/side-sheet.d.ts.map +1 -0
- package/src/slider/slider-range.d.ts +10 -0
- package/src/slider/slider-range.d.ts.map +1 -0
- package/src/slider/slider.d.ts +10 -0
- package/src/slider/slider.d.ts.map +1 -0
- package/src/snackbar/snackbar.d.ts +10 -0
- package/src/snackbar/snackbar.d.ts.map +1 -0
- package/src/status-header/status-header-base.d.ts +9 -0
- package/src/status-header/status-header-base.d.ts.map +1 -0
- package/src/status-header/status-header-item.d.ts +17 -0
- package/src/status-header/status-header-item.d.ts.map +1 -0
- package/src/status-header/status-header.d.ts +15 -0
- package/src/status-header/status-header.d.ts.map +1 -0
- package/src/switch/switch.d.ts +10 -0
- package/src/switch/switch.d.ts.map +1 -0
- package/src/tab/tab-bar.d.ts +10 -0
- package/src/tab/tab-bar.d.ts.map +1 -0
- package/src/tab/tab.d.ts +10 -0
- package/src/tab/tab.d.ts.map +1 -0
- package/src/text-lockup/text-lockup.d.ts +17 -0
- package/src/text-lockup/text-lockup.d.ts.map +1 -0
- package/src/textarea/textarea.d.ts +10 -0
- package/src/textarea/textarea.d.ts.map +1 -0
- package/src/textfield/textfield.d.ts +10 -0
- package/src/textfield/textfield.d.ts.map +1 -0
- package/src/toolbar/toolbar.d.ts +10 -0
- package/src/toolbar/toolbar.d.ts.map +1 -0
- package/src/tooltip/tooltip.d.ts +27 -0
- package/src/tooltip/tooltip.d.ts.map +1 -0
- package/src/top-app-bar/top-app-bar-fixed.d.ts +10 -0
- package/src/top-app-bar/top-app-bar-fixed.d.ts.map +1 -0
- package/src/top-app-bar/top-app-bar.d.ts +10 -0
- package/src/top-app-bar/top-app-bar.d.ts.map +1 -0
- package/src/tree-list/tree-list-item.d.ts +16 -0
- package/src/tree-list/tree-list-item.d.ts.map +1 -0
- package/src/tree-list/tree-list.d.ts +11 -0
- package/src/tree-list/tree-list.d.ts.map +1 -0
- package/src/typography/typography.d.ts +12 -0
- package/src/typography/typography.d.ts.map +1 -0
- package/state.mjs +12 -0
- package/status-header-item.mjs +16 -16
- package/status-header.mjs +5 -5
- package/style-map.mjs +40 -0
- package/switch.mjs +531 -15
- package/tab-bar.mjs +1030 -13
- package/tab.mjs +29 -15
- package/text-lockup.mjs +8 -8
- package/textarea.mjs +111 -16
- package/textfield.mjs +34 -18
- package/textfield2.mjs +929 -2
- package/toolbar.mjs +8 -3
- package/tooltip.mjs +1153 -96
- package/top-app-bar-fixed.mjs +78 -18
- package/top-app-bar.mjs +19 -15
- package/top-app-bar2.mjs +9 -2
- package/tree-list-item.mjs +3 -3
- package/tree-list.mjs +6 -7
- package/tslib.es6.mjs +82 -0
- package/typography.mjs +8 -8
- 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 {
|
2
|
-
import {
|
3
|
-
import { C as
|
4
|
-
import {
|
5
|
-
import
|
6
|
-
import "
|
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,
|
10
|
-
for (var t =
|
11
|
-
(p = m[s]) && (t = (
|
12
|
-
return
|
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
|
22
|
+
let r = class extends l {
|
15
23
|
constructor() {
|
16
24
|
super(), this.navOpen = !1;
|
17
25
|
}
|
18
26
|
};
|
19
|
-
|
27
|
+
r.styles = [
|
20
28
|
i`
|
21
|
-
${a(
|
29
|
+
${a(f)}
|
22
30
|
`,
|
23
31
|
i`
|
24
|
-
${a(
|
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
|
-
|
35
|
-
],
|
36
|
-
|
37
|
-
|
38
|
-
],
|
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
|
-
|
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.
|
3
|
+
"version": "6.0.2",
|
4
4
|
"description": "a catalog of material components for covalent",
|
5
|
-
"main": "
|
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
|
+
};
|