@hortiview/shared-components 0.0.4470 → 0.0.4539
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/README.md +200 -20
- package/dist/{ListAreaService-BPp_O2BH.js → ListAreaService-CFOmATRF.js} +17 -16
- package/dist/SearchBar-CY2zfu6B.js +3232 -0
- package/dist/assets/main.css +22 -0
- package/dist/component-D1YrRAXe.js +673 -0
- package/dist/components/BaseView/BaseView.js +300 -46
- package/dist/components/BasicHeading/BasicHeading.js +24 -23
- package/dist/components/BasicHeading/BasicHeading.test.js +333 -32
- package/dist/components/BlockView/BlockView.js +17 -17
- package/dist/components/EmptyView/EmptyView.js +247 -8
- package/dist/components/HashTabView/HashTabView.js +1845 -59
- package/dist/components/Iconify/Iconify.js +1 -1
- package/dist/components/ListArea/ListArea.js +5326 -755
- package/dist/components/ListArea/ListArea.test.js +2 -2
- package/dist/components/ListArea/ListAreaService.js +5 -4
- package/dist/components/SearchBar/SearchBar.js +3 -31
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/index.es-BD4kFWFx.js +673 -0
- package/dist/index.es-CUWXKh7P.js +106 -0
- package/dist/index.es-Cv6meSAn.js +1067 -0
- package/dist/index.es-DYsXox--.js +151 -0
- package/dist/index.es-WZ1mqvGz.js +1769 -0
- package/dist/index.es-mBp_Btvi.js +45 -0
- package/dist/main.js +23 -22
- package/dist/tslib.es6-BOWp4lfV.js +72 -0
- package/package.json +1 -1
|
@@ -1,81 +1,1867 @@
|
|
|
1
1
|
import "../../assets/HashTabView.css";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
2
|
+
import { jsx as I, jsxs as q, Fragment as dt } from "react/jsx-runtime";
|
|
3
|
+
import p, { forwardRef as w, useMemo as rt, useRef as C, useImperativeHandle as W, useContext as ft, useEffect as D, useCallback as ht, createContext as pt, useState as mt } from "react";
|
|
4
|
+
import { u as gt } from "../../useBreakpoint-DyAmuka7.js";
|
|
5
|
+
import { P as i, _ as x, c as K, d as tt, a as at } from "../../index.es-WZ1mqvGz.js";
|
|
6
|
+
import { I as Tt } from "../../index.es-Cv6meSAn.js";
|
|
7
|
+
import { c as T, _ as E, b as vt } from "../../tslib.es6-BOWp4lfV.js";
|
|
8
|
+
import { a as k, b, c as H, m as _t, d as bt, M as et } from "../../component-D1YrRAXe.js";
|
|
9
|
+
import { E as St } from "../../index.es-CUWXKh7P.js";
|
|
10
|
+
import { G as Y } from "../../index.es-DYsXox--.js";
|
|
11
|
+
/**
|
|
12
|
+
* @license
|
|
13
|
+
* Copyright 2018 Google Inc.
|
|
14
|
+
*
|
|
15
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
16
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
17
|
+
* in the Software without restriction, including without limitation the rights
|
|
18
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
19
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
20
|
+
* furnished to do so, subject to the following conditions:
|
|
21
|
+
*
|
|
22
|
+
* The above copyright notice and this permission notice shall be included in
|
|
23
|
+
* all copies or substantial portions of the Software.
|
|
24
|
+
*
|
|
25
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
26
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
27
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
28
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
29
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
30
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
31
|
+
* THE SOFTWARE.
|
|
32
|
+
*/
|
|
33
|
+
var ot = {
|
|
34
|
+
ANIMATING: "mdc-tab-scroller--animating",
|
|
35
|
+
SCROLL_AREA_SCROLL: "mdc-tab-scroller__scroll-area--scroll",
|
|
36
|
+
SCROLL_TEST: "mdc-tab-scroller__test"
|
|
37
|
+
}, Ct = {
|
|
38
|
+
AREA_SELECTOR: ".mdc-tab-scroller__scroll-area",
|
|
39
|
+
CONTENT_SELECTOR: ".mdc-tab-scroller__scroll-content"
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* @license
|
|
43
|
+
* Copyright 2018 Google Inc.
|
|
44
|
+
*
|
|
45
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
46
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
47
|
+
* in the Software without restriction, including without limitation the rights
|
|
48
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
49
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
50
|
+
* furnished to do so, subject to the following conditions:
|
|
51
|
+
*
|
|
52
|
+
* The above copyright notice and this permission notice shall be included in
|
|
53
|
+
* all copies or substantial portions of the Software.
|
|
54
|
+
*
|
|
55
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
56
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
57
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
58
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
59
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
60
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
61
|
+
* THE SOFTWARE.
|
|
62
|
+
*/
|
|
63
|
+
var Z = (
|
|
64
|
+
/** @class */
|
|
65
|
+
/* @__PURE__ */ function() {
|
|
66
|
+
function a(e) {
|
|
67
|
+
this.adapter = e;
|
|
68
|
+
}
|
|
69
|
+
return a;
|
|
70
|
+
}()
|
|
71
|
+
);
|
|
72
|
+
/**
|
|
73
|
+
* @license
|
|
74
|
+
* Copyright 2018 Google Inc.
|
|
75
|
+
*
|
|
76
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
77
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
78
|
+
* in the Software without restriction, including without limitation the rights
|
|
79
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
80
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
81
|
+
* furnished to do so, subject to the following conditions:
|
|
82
|
+
*
|
|
83
|
+
* The above copyright notice and this permission notice shall be included in
|
|
84
|
+
* all copies or substantial portions of the Software.
|
|
85
|
+
*
|
|
86
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
87
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
88
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
89
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
90
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
91
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
92
|
+
* THE SOFTWARE.
|
|
93
|
+
*/
|
|
94
|
+
var Et = (
|
|
95
|
+
/** @class */
|
|
96
|
+
function(a) {
|
|
97
|
+
T(e, a);
|
|
98
|
+
function e() {
|
|
99
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
100
|
+
}
|
|
101
|
+
return e.prototype.getScrollPositionRTL = function() {
|
|
102
|
+
var t = this.adapter.getScrollAreaScrollLeft(), n = this.calculateScrollEdges_().right;
|
|
103
|
+
return Math.round(n - t);
|
|
104
|
+
}, e.prototype.scrollToRTL = function(t) {
|
|
105
|
+
var n = this.calculateScrollEdges_(), r = this.adapter.getScrollAreaScrollLeft(), o = this.clampScrollValue_(n.right - t);
|
|
106
|
+
return {
|
|
107
|
+
finalScrollPosition: o,
|
|
108
|
+
scrollDelta: o - r
|
|
109
|
+
};
|
|
110
|
+
}, e.prototype.incrementScrollRTL = function(t) {
|
|
111
|
+
var n = this.adapter.getScrollAreaScrollLeft(), r = this.clampScrollValue_(n - t);
|
|
112
|
+
return {
|
|
113
|
+
finalScrollPosition: r,
|
|
114
|
+
scrollDelta: r - n
|
|
115
|
+
};
|
|
116
|
+
}, e.prototype.getAnimatingScrollPosition = function(t) {
|
|
117
|
+
return t;
|
|
118
|
+
}, e.prototype.calculateScrollEdges_ = function() {
|
|
119
|
+
var t = this.adapter.getScrollContentOffsetWidth(), n = this.adapter.getScrollAreaOffsetWidth();
|
|
120
|
+
return {
|
|
121
|
+
left: 0,
|
|
122
|
+
right: t - n
|
|
123
|
+
};
|
|
124
|
+
}, e.prototype.clampScrollValue_ = function(t) {
|
|
125
|
+
var n = this.calculateScrollEdges_();
|
|
126
|
+
return Math.min(Math.max(n.left, t), n.right);
|
|
127
|
+
}, e;
|
|
128
|
+
}(Z)
|
|
129
|
+
);
|
|
130
|
+
/**
|
|
131
|
+
* @license
|
|
132
|
+
* Copyright 2018 Google Inc.
|
|
133
|
+
*
|
|
134
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
135
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
136
|
+
* in the Software without restriction, including without limitation the rights
|
|
137
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
138
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
139
|
+
* furnished to do so, subject to the following conditions:
|
|
140
|
+
*
|
|
141
|
+
* The above copyright notice and this permission notice shall be included in
|
|
142
|
+
* all copies or substantial portions of the Software.
|
|
143
|
+
*
|
|
144
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
145
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
146
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
147
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
148
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
149
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
150
|
+
* THE SOFTWARE.
|
|
151
|
+
*/
|
|
152
|
+
var yt = (
|
|
153
|
+
/** @class */
|
|
154
|
+
function(a) {
|
|
155
|
+
T(e, a);
|
|
156
|
+
function e() {
|
|
157
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
158
|
+
}
|
|
159
|
+
return e.prototype.getScrollPositionRTL = function(t) {
|
|
160
|
+
var n = this.adapter.getScrollAreaScrollLeft();
|
|
161
|
+
return Math.round(t - n);
|
|
162
|
+
}, e.prototype.scrollToRTL = function(t) {
|
|
163
|
+
var n = this.adapter.getScrollAreaScrollLeft(), r = this.clampScrollValue_(-t);
|
|
164
|
+
return {
|
|
165
|
+
finalScrollPosition: r,
|
|
166
|
+
scrollDelta: r - n
|
|
167
|
+
};
|
|
168
|
+
}, e.prototype.incrementScrollRTL = function(t) {
|
|
169
|
+
var n = this.adapter.getScrollAreaScrollLeft(), r = this.clampScrollValue_(n - t);
|
|
170
|
+
return {
|
|
171
|
+
finalScrollPosition: r,
|
|
172
|
+
scrollDelta: r - n
|
|
173
|
+
};
|
|
174
|
+
}, e.prototype.getAnimatingScrollPosition = function(t, n) {
|
|
175
|
+
return t - n;
|
|
176
|
+
}, e.prototype.calculateScrollEdges_ = function() {
|
|
177
|
+
var t = this.adapter.getScrollContentOffsetWidth(), n = this.adapter.getScrollAreaOffsetWidth();
|
|
178
|
+
return {
|
|
179
|
+
left: n - t,
|
|
180
|
+
right: 0
|
|
181
|
+
};
|
|
182
|
+
}, e.prototype.clampScrollValue_ = function(t) {
|
|
183
|
+
var n = this.calculateScrollEdges_();
|
|
184
|
+
return Math.max(Math.min(n.right, t), n.left);
|
|
185
|
+
}, e;
|
|
186
|
+
}(Z)
|
|
187
|
+
);
|
|
188
|
+
/**
|
|
189
|
+
* @license
|
|
190
|
+
* Copyright 2018 Google Inc.
|
|
191
|
+
*
|
|
192
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
193
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
194
|
+
* in the Software without restriction, including without limitation the rights
|
|
195
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
196
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
197
|
+
* furnished to do so, subject to the following conditions:
|
|
198
|
+
*
|
|
199
|
+
* The above copyright notice and this permission notice shall be included in
|
|
200
|
+
* all copies or substantial portions of the Software.
|
|
201
|
+
*
|
|
202
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
203
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
204
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
205
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
206
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
207
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
208
|
+
* THE SOFTWARE.
|
|
209
|
+
*/
|
|
210
|
+
var At = (
|
|
211
|
+
/** @class */
|
|
212
|
+
function(a) {
|
|
213
|
+
T(e, a);
|
|
214
|
+
function e() {
|
|
215
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
216
|
+
}
|
|
217
|
+
return e.prototype.getScrollPositionRTL = function(t) {
|
|
218
|
+
var n = this.adapter.getScrollAreaScrollLeft();
|
|
219
|
+
return Math.round(n - t);
|
|
220
|
+
}, e.prototype.scrollToRTL = function(t) {
|
|
221
|
+
var n = this.adapter.getScrollAreaScrollLeft(), r = this.clampScrollValue_(t);
|
|
222
|
+
return {
|
|
223
|
+
finalScrollPosition: r,
|
|
224
|
+
scrollDelta: n - r
|
|
225
|
+
};
|
|
226
|
+
}, e.prototype.incrementScrollRTL = function(t) {
|
|
227
|
+
var n = this.adapter.getScrollAreaScrollLeft(), r = this.clampScrollValue_(n + t);
|
|
228
|
+
return {
|
|
229
|
+
finalScrollPosition: r,
|
|
230
|
+
scrollDelta: n - r
|
|
231
|
+
};
|
|
232
|
+
}, e.prototype.getAnimatingScrollPosition = function(t, n) {
|
|
233
|
+
return t + n;
|
|
234
|
+
}, e.prototype.calculateScrollEdges_ = function() {
|
|
235
|
+
var t = this.adapter.getScrollContentOffsetWidth(), n = this.adapter.getScrollAreaOffsetWidth();
|
|
236
|
+
return {
|
|
237
|
+
left: t - n,
|
|
238
|
+
right: 0
|
|
239
|
+
};
|
|
240
|
+
}, e.prototype.clampScrollValue_ = function(t) {
|
|
241
|
+
var n = this.calculateScrollEdges_();
|
|
242
|
+
return Math.min(Math.max(n.right, t), n.left);
|
|
243
|
+
}, e;
|
|
244
|
+
}(Z)
|
|
245
|
+
);
|
|
246
|
+
/**
|
|
247
|
+
* @license
|
|
248
|
+
* Copyright 2018 Google Inc.
|
|
249
|
+
*
|
|
250
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
251
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
252
|
+
* in the Software without restriction, including without limitation the rights
|
|
253
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
254
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
255
|
+
* furnished to do so, subject to the following conditions:
|
|
256
|
+
*
|
|
257
|
+
* The above copyright notice and this permission notice shall be included in
|
|
258
|
+
* all copies or substantial portions of the Software.
|
|
259
|
+
*
|
|
260
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
261
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
262
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
263
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
264
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
265
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
266
|
+
* THE SOFTWARE.
|
|
267
|
+
*/
|
|
268
|
+
var U = (
|
|
269
|
+
/** @class */
|
|
270
|
+
function(a) {
|
|
271
|
+
T(e, a);
|
|
272
|
+
function e(t) {
|
|
273
|
+
var n = a.call(this, E(E({}, e.defaultAdapter), t)) || this;
|
|
274
|
+
return n.isAnimating_ = !1, n;
|
|
275
|
+
}
|
|
276
|
+
return Object.defineProperty(e, "cssClasses", {
|
|
277
|
+
get: function() {
|
|
278
|
+
return ot;
|
|
279
|
+
},
|
|
280
|
+
enumerable: !1,
|
|
281
|
+
configurable: !0
|
|
282
|
+
}), Object.defineProperty(e, "strings", {
|
|
283
|
+
get: function() {
|
|
284
|
+
return Ct;
|
|
285
|
+
},
|
|
286
|
+
enumerable: !1,
|
|
287
|
+
configurable: !0
|
|
288
|
+
}), Object.defineProperty(e, "defaultAdapter", {
|
|
289
|
+
get: function() {
|
|
290
|
+
return {
|
|
291
|
+
eventTargetMatchesSelector: function() {
|
|
292
|
+
return !1;
|
|
293
|
+
},
|
|
294
|
+
addClass: function() {
|
|
295
|
+
},
|
|
296
|
+
removeClass: function() {
|
|
297
|
+
},
|
|
298
|
+
addScrollAreaClass: function() {
|
|
299
|
+
},
|
|
300
|
+
setScrollAreaStyleProperty: function() {
|
|
301
|
+
},
|
|
302
|
+
setScrollContentStyleProperty: function() {
|
|
303
|
+
},
|
|
304
|
+
getScrollContentStyleValue: function() {
|
|
305
|
+
return "";
|
|
306
|
+
},
|
|
307
|
+
setScrollAreaScrollLeft: function() {
|
|
308
|
+
},
|
|
309
|
+
getScrollAreaScrollLeft: function() {
|
|
310
|
+
return 0;
|
|
311
|
+
},
|
|
312
|
+
getScrollContentOffsetWidth: function() {
|
|
313
|
+
return 0;
|
|
314
|
+
},
|
|
315
|
+
getScrollAreaOffsetWidth: function() {
|
|
316
|
+
return 0;
|
|
317
|
+
},
|
|
318
|
+
computeScrollAreaClientRect: function() {
|
|
319
|
+
return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
|
|
320
|
+
},
|
|
321
|
+
computeScrollContentClientRect: function() {
|
|
322
|
+
return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
|
|
323
|
+
},
|
|
324
|
+
computeHorizontalScrollbarHeight: function() {
|
|
325
|
+
return 0;
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
},
|
|
329
|
+
enumerable: !1,
|
|
330
|
+
configurable: !0
|
|
331
|
+
}), e.prototype.init = function() {
|
|
332
|
+
var t = this.adapter.computeHorizontalScrollbarHeight();
|
|
333
|
+
this.adapter.setScrollAreaStyleProperty("margin-bottom", -t + "px"), this.adapter.addScrollAreaClass(e.cssClasses.SCROLL_AREA_SCROLL);
|
|
334
|
+
}, e.prototype.getScrollPosition = function() {
|
|
335
|
+
if (this.isRTL_())
|
|
336
|
+
return this.computeCurrentScrollPositionRTL_();
|
|
337
|
+
var t = this.calculateCurrentTranslateX_(), n = this.adapter.getScrollAreaScrollLeft();
|
|
338
|
+
return n - t;
|
|
339
|
+
}, e.prototype.handleInteraction = function() {
|
|
340
|
+
this.isAnimating_ && this.stopScrollAnimation_();
|
|
341
|
+
}, e.prototype.handleTransitionEnd = function(t) {
|
|
342
|
+
var n = t.target;
|
|
343
|
+
!this.isAnimating_ || !this.adapter.eventTargetMatchesSelector(n, e.strings.CONTENT_SELECTOR) || (this.isAnimating_ = !1, this.adapter.removeClass(e.cssClasses.ANIMATING));
|
|
344
|
+
}, e.prototype.incrementScroll = function(t) {
|
|
345
|
+
t !== 0 && this.animate_(this.getIncrementScrollOperation_(t));
|
|
346
|
+
}, e.prototype.incrementScrollImmediate = function(t) {
|
|
347
|
+
if (t !== 0) {
|
|
348
|
+
var n = this.getIncrementScrollOperation_(t);
|
|
349
|
+
n.scrollDelta !== 0 && (this.stopScrollAnimation_(), this.adapter.setScrollAreaScrollLeft(n.finalScrollPosition));
|
|
350
|
+
}
|
|
351
|
+
}, e.prototype.scrollTo = function(t) {
|
|
352
|
+
if (this.isRTL_())
|
|
353
|
+
return this.scrollToRTL_(t);
|
|
354
|
+
this.scrollTo_(t);
|
|
355
|
+
}, e.prototype.getRTLScroller = function() {
|
|
356
|
+
return this.rtlScrollerInstance_ || (this.rtlScrollerInstance_ = this.rtlScrollerFactory_()), this.rtlScrollerInstance_;
|
|
357
|
+
}, e.prototype.calculateCurrentTranslateX_ = function() {
|
|
358
|
+
var t = this.adapter.getScrollContentStyleValue("transform");
|
|
359
|
+
if (t === "none")
|
|
360
|
+
return 0;
|
|
361
|
+
var n = /\((.+?)\)/.exec(t);
|
|
362
|
+
if (!n)
|
|
363
|
+
return 0;
|
|
364
|
+
var r = n[1], o = vt(r.split(","), 6);
|
|
365
|
+
o[0], o[1], o[2], o[3];
|
|
366
|
+
var c = o[4];
|
|
367
|
+
return o[5], parseFloat(c);
|
|
368
|
+
}, e.prototype.clampScrollValue_ = function(t) {
|
|
369
|
+
var n = this.calculateScrollEdges_();
|
|
370
|
+
return Math.min(Math.max(n.left, t), n.right);
|
|
371
|
+
}, e.prototype.computeCurrentScrollPositionRTL_ = function() {
|
|
372
|
+
var t = this.calculateCurrentTranslateX_();
|
|
373
|
+
return this.getRTLScroller().getScrollPositionRTL(t);
|
|
374
|
+
}, e.prototype.calculateScrollEdges_ = function() {
|
|
375
|
+
var t = this.adapter.getScrollContentOffsetWidth(), n = this.adapter.getScrollAreaOffsetWidth();
|
|
376
|
+
return {
|
|
377
|
+
left: 0,
|
|
378
|
+
right: t - n
|
|
379
|
+
};
|
|
380
|
+
}, e.prototype.scrollTo_ = function(t) {
|
|
381
|
+
var n = this.getScrollPosition(), r = this.clampScrollValue_(t), o = r - n;
|
|
382
|
+
this.animate_({
|
|
383
|
+
finalScrollPosition: r,
|
|
384
|
+
scrollDelta: o
|
|
385
|
+
});
|
|
386
|
+
}, e.prototype.scrollToRTL_ = function(t) {
|
|
387
|
+
var n = this.getRTLScroller().scrollToRTL(t);
|
|
388
|
+
this.animate_(n);
|
|
389
|
+
}, e.prototype.getIncrementScrollOperation_ = function(t) {
|
|
390
|
+
if (this.isRTL_())
|
|
391
|
+
return this.getRTLScroller().incrementScrollRTL(t);
|
|
392
|
+
var n = this.getScrollPosition(), r = t + n, o = this.clampScrollValue_(r), c = o - n;
|
|
393
|
+
return {
|
|
394
|
+
finalScrollPosition: o,
|
|
395
|
+
scrollDelta: c
|
|
396
|
+
};
|
|
397
|
+
}, e.prototype.animate_ = function(t) {
|
|
398
|
+
var n = this;
|
|
399
|
+
t.scrollDelta !== 0 && (this.stopScrollAnimation_(), this.adapter.setScrollAreaScrollLeft(t.finalScrollPosition), this.adapter.setScrollContentStyleProperty("transform", "translateX(" + t.scrollDelta + "px)"), this.adapter.computeScrollAreaClientRect(), requestAnimationFrame(function() {
|
|
400
|
+
n.adapter.addClass(e.cssClasses.ANIMATING), n.adapter.setScrollContentStyleProperty("transform", "none");
|
|
401
|
+
}), this.isAnimating_ = !0);
|
|
402
|
+
}, e.prototype.stopScrollAnimation_ = function() {
|
|
403
|
+
this.isAnimating_ = !1;
|
|
404
|
+
var t = this.getAnimatingScrollPosition_();
|
|
405
|
+
this.adapter.removeClass(e.cssClasses.ANIMATING), this.adapter.setScrollContentStyleProperty("transform", "translateX(0px)"), this.adapter.setScrollAreaScrollLeft(t);
|
|
406
|
+
}, e.prototype.getAnimatingScrollPosition_ = function() {
|
|
407
|
+
var t = this.calculateCurrentTranslateX_(), n = this.adapter.getScrollAreaScrollLeft();
|
|
408
|
+
return this.isRTL_() ? this.getRTLScroller().getAnimatingScrollPosition(n, t) : n - t;
|
|
409
|
+
}, e.prototype.rtlScrollerFactory_ = function() {
|
|
410
|
+
var t = this.adapter.getScrollAreaScrollLeft();
|
|
411
|
+
this.adapter.setScrollAreaScrollLeft(t - 1);
|
|
412
|
+
var n = this.adapter.getScrollAreaScrollLeft();
|
|
413
|
+
if (n < 0)
|
|
414
|
+
return this.adapter.setScrollAreaScrollLeft(t), new yt(this.adapter);
|
|
415
|
+
var r = this.adapter.computeScrollAreaClientRect(), o = this.adapter.computeScrollContentClientRect(), c = Math.round(o.right - r.right);
|
|
416
|
+
return this.adapter.setScrollAreaScrollLeft(t), c === n ? new At(this.adapter) : new Et(this.adapter);
|
|
417
|
+
}, e.prototype.isRTL_ = function() {
|
|
418
|
+
return this.adapter.getScrollContentStyleValue("direction") === "rtl";
|
|
419
|
+
}, e;
|
|
420
|
+
}(k)
|
|
421
|
+
);
|
|
422
|
+
/**
|
|
423
|
+
* @license
|
|
424
|
+
* Copyright 2018 Google Inc.
|
|
425
|
+
*
|
|
426
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
427
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
428
|
+
* in the Software without restriction, including without limitation the rights
|
|
429
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
430
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
431
|
+
* furnished to do so, subject to the following conditions:
|
|
432
|
+
*
|
|
433
|
+
* The above copyright notice and this permission notice shall be included in
|
|
434
|
+
* all copies or substantial portions of the Software.
|
|
435
|
+
*
|
|
436
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
437
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
438
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
439
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
440
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
441
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
442
|
+
* THE SOFTWARE.
|
|
443
|
+
*/
|
|
444
|
+
var J;
|
|
445
|
+
function Lt(a, e) {
|
|
446
|
+
if (e === void 0 && (e = !0), e && typeof J < "u")
|
|
447
|
+
return J;
|
|
448
|
+
var t = a.createElement("div");
|
|
449
|
+
t.classList.add(ot.SCROLL_TEST), a.body.appendChild(t);
|
|
450
|
+
var n = t.offsetHeight - t.clientHeight;
|
|
451
|
+
return a.body.removeChild(t), e && (J = n), n;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* @license
|
|
455
|
+
* Copyright 2018 Google Inc.
|
|
456
|
+
*
|
|
457
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
458
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
459
|
+
* in the Software without restriction, including without limitation the rights
|
|
460
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
461
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
462
|
+
* furnished to do so, subject to the following conditions:
|
|
463
|
+
*
|
|
464
|
+
* The above copyright notice and this permission notice shall be included in
|
|
465
|
+
* all copies or substantial portions of the Software.
|
|
466
|
+
*
|
|
467
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
468
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
469
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
470
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
471
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
472
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
473
|
+
* THE SOFTWARE.
|
|
474
|
+
*/
|
|
475
|
+
var it = (
|
|
476
|
+
/** @class */
|
|
477
|
+
function(a) {
|
|
478
|
+
T(e, a);
|
|
479
|
+
function e() {
|
|
480
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
481
|
+
}
|
|
482
|
+
return e.attachTo = function(t) {
|
|
483
|
+
return new e(t);
|
|
484
|
+
}, e.prototype.initialize = function() {
|
|
485
|
+
this.area_ = this.root.querySelector(U.strings.AREA_SELECTOR), this.content_ = this.root.querySelector(U.strings.CONTENT_SELECTOR);
|
|
486
|
+
}, e.prototype.initialSyncWithDOM = function() {
|
|
487
|
+
var t = this;
|
|
488
|
+
this.handleInteraction_ = function() {
|
|
489
|
+
return t.foundation.handleInteraction();
|
|
490
|
+
}, this.handleTransitionEnd_ = function(n) {
|
|
491
|
+
return t.foundation.handleTransitionEnd(n);
|
|
492
|
+
}, this.area_.addEventListener("wheel", this.handleInteraction_, b()), this.area_.addEventListener("touchstart", this.handleInteraction_, b()), this.area_.addEventListener("pointerdown", this.handleInteraction_, b()), this.area_.addEventListener("mousedown", this.handleInteraction_, b()), this.area_.addEventListener("keydown", this.handleInteraction_, b()), this.content_.addEventListener("transitionend", this.handleTransitionEnd_);
|
|
493
|
+
}, e.prototype.destroy = function() {
|
|
494
|
+
a.prototype.destroy.call(this), this.area_.removeEventListener("wheel", this.handleInteraction_, b()), this.area_.removeEventListener("touchstart", this.handleInteraction_, b()), this.area_.removeEventListener("pointerdown", this.handleInteraction_, b()), this.area_.removeEventListener("mousedown", this.handleInteraction_, b()), this.area_.removeEventListener("keydown", this.handleInteraction_, b()), this.content_.removeEventListener("transitionend", this.handleTransitionEnd_);
|
|
495
|
+
}, e.prototype.getDefaultFoundation = function() {
|
|
496
|
+
var t = this, n = {
|
|
497
|
+
eventTargetMatchesSelector: function(r, o) {
|
|
498
|
+
return _t(r, o);
|
|
499
|
+
},
|
|
500
|
+
addClass: function(r) {
|
|
501
|
+
return t.root.classList.add(r);
|
|
502
|
+
},
|
|
503
|
+
removeClass: function(r) {
|
|
504
|
+
return t.root.classList.remove(r);
|
|
505
|
+
},
|
|
506
|
+
addScrollAreaClass: function(r) {
|
|
507
|
+
return t.area_.classList.add(r);
|
|
508
|
+
},
|
|
509
|
+
setScrollAreaStyleProperty: function(r, o) {
|
|
510
|
+
return t.area_.style.setProperty(r, o);
|
|
511
|
+
},
|
|
512
|
+
setScrollContentStyleProperty: function(r, o) {
|
|
513
|
+
return t.content_.style.setProperty(r, o);
|
|
514
|
+
},
|
|
515
|
+
getScrollContentStyleValue: function(r) {
|
|
516
|
+
return window.getComputedStyle(t.content_).getPropertyValue(r);
|
|
517
|
+
},
|
|
518
|
+
setScrollAreaScrollLeft: function(r) {
|
|
519
|
+
return t.area_.scrollLeft = r;
|
|
520
|
+
},
|
|
521
|
+
getScrollAreaScrollLeft: function() {
|
|
522
|
+
return t.area_.scrollLeft;
|
|
523
|
+
},
|
|
524
|
+
getScrollContentOffsetWidth: function() {
|
|
525
|
+
return t.content_.offsetWidth;
|
|
526
|
+
},
|
|
527
|
+
getScrollAreaOffsetWidth: function() {
|
|
528
|
+
return t.area_.offsetWidth;
|
|
529
|
+
},
|
|
530
|
+
computeScrollAreaClientRect: function() {
|
|
531
|
+
return t.area_.getBoundingClientRect();
|
|
532
|
+
},
|
|
533
|
+
computeScrollContentClientRect: function() {
|
|
534
|
+
return t.content_.getBoundingClientRect();
|
|
535
|
+
},
|
|
536
|
+
computeHorizontalScrollbarHeight: function() {
|
|
537
|
+
return Lt(document);
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
return new U(n);
|
|
541
|
+
}, e.prototype.getScrollPosition = function() {
|
|
542
|
+
return this.foundation.getScrollPosition();
|
|
543
|
+
}, e.prototype.getScrollContentWidth = function() {
|
|
544
|
+
return this.content_.offsetWidth;
|
|
545
|
+
}, e.prototype.incrementScroll = function(t) {
|
|
546
|
+
this.foundation.incrementScroll(t);
|
|
547
|
+
}, e.prototype.scrollTo = function(t) {
|
|
548
|
+
this.foundation.scrollTo(t);
|
|
549
|
+
}, e;
|
|
550
|
+
}(H)
|
|
551
|
+
);
|
|
552
|
+
/**
|
|
553
|
+
* @license
|
|
554
|
+
* Copyright 2018 Google Inc.
|
|
555
|
+
*
|
|
556
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
557
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
558
|
+
* in the Software without restriction, including without limitation the rights
|
|
559
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
560
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
561
|
+
* furnished to do so, subject to the following conditions:
|
|
562
|
+
*
|
|
563
|
+
* The above copyright notice and this permission notice shall be included in
|
|
564
|
+
* all copies or substantial portions of the Software.
|
|
565
|
+
*
|
|
566
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
567
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
568
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
569
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
570
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
571
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
572
|
+
* THE SOFTWARE.
|
|
573
|
+
*/
|
|
574
|
+
var Rt = {
|
|
575
|
+
ACTIVE: "mdc-tab-indicator--active",
|
|
576
|
+
FADE: "mdc-tab-indicator--fade",
|
|
577
|
+
NO_TRANSITION: "mdc-tab-indicator--no-transition"
|
|
578
|
+
}, It = {
|
|
579
|
+
CONTENT_SELECTOR: ".mdc-tab-indicator__content"
|
|
580
|
+
};
|
|
581
|
+
/**
|
|
582
|
+
* @license
|
|
583
|
+
* Copyright 2018 Google Inc.
|
|
584
|
+
*
|
|
585
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
586
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
587
|
+
* in the Software without restriction, including without limitation the rights
|
|
588
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
589
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
590
|
+
* furnished to do so, subject to the following conditions:
|
|
591
|
+
*
|
|
592
|
+
* The above copyright notice and this permission notice shall be included in
|
|
593
|
+
* all copies or substantial portions of the Software.
|
|
594
|
+
*
|
|
595
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
596
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
597
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
598
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
599
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
600
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
601
|
+
* THE SOFTWARE.
|
|
602
|
+
*/
|
|
603
|
+
var v = (
|
|
604
|
+
/** @class */
|
|
605
|
+
function(a) {
|
|
606
|
+
T(e, a);
|
|
607
|
+
function e(t) {
|
|
608
|
+
return a.call(this, E(E({}, e.defaultAdapter), t)) || this;
|
|
609
|
+
}
|
|
610
|
+
return Object.defineProperty(e, "cssClasses", {
|
|
611
|
+
get: function() {
|
|
612
|
+
return Rt;
|
|
613
|
+
},
|
|
614
|
+
enumerable: !1,
|
|
615
|
+
configurable: !0
|
|
616
|
+
}), Object.defineProperty(e, "strings", {
|
|
617
|
+
get: function() {
|
|
618
|
+
return It;
|
|
619
|
+
},
|
|
620
|
+
enumerable: !1,
|
|
621
|
+
configurable: !0
|
|
622
|
+
}), Object.defineProperty(e, "defaultAdapter", {
|
|
623
|
+
get: function() {
|
|
624
|
+
return {
|
|
625
|
+
addClass: function() {
|
|
626
|
+
},
|
|
627
|
+
removeClass: function() {
|
|
628
|
+
},
|
|
629
|
+
computeContentClientRect: function() {
|
|
630
|
+
return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
|
|
631
|
+
},
|
|
632
|
+
setContentStyleProperty: function() {
|
|
633
|
+
}
|
|
634
|
+
};
|
|
635
|
+
},
|
|
636
|
+
enumerable: !1,
|
|
637
|
+
configurable: !0
|
|
638
|
+
}), e.prototype.computeContentClientRect = function() {
|
|
639
|
+
return this.adapter.computeContentClientRect();
|
|
640
|
+
}, e;
|
|
641
|
+
}(k)
|
|
642
|
+
);
|
|
643
|
+
/**
|
|
644
|
+
* @license
|
|
645
|
+
* Copyright 2018 Google Inc.
|
|
646
|
+
*
|
|
647
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
648
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
649
|
+
* in the Software without restriction, including without limitation the rights
|
|
650
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
651
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
652
|
+
* furnished to do so, subject to the following conditions:
|
|
653
|
+
*
|
|
654
|
+
* The above copyright notice and this permission notice shall be included in
|
|
655
|
+
* all copies or substantial portions of the Software.
|
|
656
|
+
*
|
|
657
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
658
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
659
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
660
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
661
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
662
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
663
|
+
* THE SOFTWARE.
|
|
664
|
+
*/
|
|
665
|
+
var Ot = (
|
|
666
|
+
/** @class */
|
|
667
|
+
function(a) {
|
|
668
|
+
T(e, a);
|
|
669
|
+
function e() {
|
|
670
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
671
|
+
}
|
|
672
|
+
return e.prototype.activate = function() {
|
|
673
|
+
this.adapter.addClass(v.cssClasses.ACTIVE);
|
|
674
|
+
}, e.prototype.deactivate = function() {
|
|
675
|
+
this.adapter.removeClass(v.cssClasses.ACTIVE);
|
|
676
|
+
}, e;
|
|
677
|
+
}(v)
|
|
678
|
+
);
|
|
679
|
+
/**
|
|
680
|
+
* @license
|
|
681
|
+
* Copyright 2018 Google Inc.
|
|
682
|
+
*
|
|
683
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
684
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
685
|
+
* in the Software without restriction, including without limitation the rights
|
|
686
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
687
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
688
|
+
* furnished to do so, subject to the following conditions:
|
|
689
|
+
*
|
|
690
|
+
* The above copyright notice and this permission notice shall be included in
|
|
691
|
+
* all copies or substantial portions of the Software.
|
|
692
|
+
*
|
|
693
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
694
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
695
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
696
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
697
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
698
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
699
|
+
* THE SOFTWARE.
|
|
700
|
+
*/
|
|
701
|
+
var Dt = (
|
|
702
|
+
/** @class */
|
|
703
|
+
function(a) {
|
|
704
|
+
T(e, a);
|
|
705
|
+
function e() {
|
|
706
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
707
|
+
}
|
|
708
|
+
return e.prototype.activate = function(t) {
|
|
709
|
+
if (!t) {
|
|
710
|
+
this.adapter.addClass(v.cssClasses.ACTIVE);
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
var n = this.computeContentClientRect(), r = t.width / n.width, o = t.left - n.left;
|
|
714
|
+
this.adapter.addClass(v.cssClasses.NO_TRANSITION), this.adapter.setContentStyleProperty("transform", "translateX(" + o + "px) scaleX(" + r + ")"), this.computeContentClientRect(), this.adapter.removeClass(v.cssClasses.NO_TRANSITION), this.adapter.addClass(v.cssClasses.ACTIVE), this.adapter.setContentStyleProperty("transform", "");
|
|
715
|
+
}, e.prototype.deactivate = function() {
|
|
716
|
+
this.adapter.removeClass(v.cssClasses.ACTIVE);
|
|
717
|
+
}, e;
|
|
718
|
+
}(v)
|
|
719
|
+
);
|
|
720
|
+
/**
|
|
721
|
+
* @license
|
|
722
|
+
* Copyright 2018 Google Inc.
|
|
723
|
+
*
|
|
724
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
725
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
726
|
+
* in the Software without restriction, including without limitation the rights
|
|
727
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
728
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
729
|
+
* furnished to do so, subject to the following conditions:
|
|
730
|
+
*
|
|
731
|
+
* The above copyright notice and this permission notice shall be included in
|
|
732
|
+
* all copies or substantial portions of the Software.
|
|
733
|
+
*
|
|
734
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
735
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
736
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
737
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
738
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
739
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
740
|
+
* THE SOFTWARE.
|
|
741
|
+
*/
|
|
742
|
+
var ct = (
|
|
743
|
+
/** @class */
|
|
744
|
+
function(a) {
|
|
745
|
+
T(e, a);
|
|
746
|
+
function e() {
|
|
747
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
748
|
+
}
|
|
749
|
+
return e.attachTo = function(t) {
|
|
750
|
+
return new e(t);
|
|
751
|
+
}, e.prototype.initialize = function() {
|
|
752
|
+
this.content_ = this.root.querySelector(v.strings.CONTENT_SELECTOR);
|
|
753
|
+
}, e.prototype.computeContentClientRect = function() {
|
|
754
|
+
return this.foundation.computeContentClientRect();
|
|
755
|
+
}, e.prototype.getDefaultFoundation = function() {
|
|
756
|
+
var t = this, n = {
|
|
757
|
+
addClass: function(r) {
|
|
758
|
+
return t.root.classList.add(r);
|
|
759
|
+
},
|
|
760
|
+
removeClass: function(r) {
|
|
761
|
+
return t.root.classList.remove(r);
|
|
762
|
+
},
|
|
763
|
+
computeContentClientRect: function() {
|
|
764
|
+
return t.content_.getBoundingClientRect();
|
|
765
|
+
},
|
|
766
|
+
setContentStyleProperty: function(r, o) {
|
|
767
|
+
return t.content_.style.setProperty(r, o);
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
return this.root.classList.contains(v.cssClasses.FADE) ? new Ot(n) : new Dt(n);
|
|
771
|
+
}, e.prototype.activate = function(t) {
|
|
772
|
+
this.foundation.activate(t);
|
|
773
|
+
}, e.prototype.deactivate = function() {
|
|
774
|
+
this.foundation.deactivate();
|
|
775
|
+
}, e;
|
|
776
|
+
}(H)
|
|
777
|
+
);
|
|
778
|
+
/**
|
|
779
|
+
* @license
|
|
780
|
+
* Copyright 2018 Google Inc.
|
|
781
|
+
*
|
|
782
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
783
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
784
|
+
* in the Software without restriction, including without limitation the rights
|
|
785
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
786
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
787
|
+
* furnished to do so, subject to the following conditions:
|
|
788
|
+
*
|
|
789
|
+
* The above copyright notice and this permission notice shall be included in
|
|
790
|
+
* all copies or substantial portions of the Software.
|
|
791
|
+
*
|
|
792
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
793
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
794
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
795
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
796
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
797
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
798
|
+
* THE SOFTWARE.
|
|
799
|
+
*/
|
|
800
|
+
var F = {
|
|
801
|
+
ACTIVE: "mdc-tab--active"
|
|
802
|
+
}, N = {
|
|
803
|
+
ARIA_SELECTED: "aria-selected",
|
|
804
|
+
CONTENT_SELECTOR: ".mdc-tab__content",
|
|
805
|
+
INTERACTED_EVENT: "MDCTab:interacted",
|
|
806
|
+
RIPPLE_SELECTOR: ".mdc-tab__ripple",
|
|
807
|
+
TABINDEX: "tabIndex",
|
|
808
|
+
TAB_INDICATOR_SELECTOR: ".mdc-tab-indicator"
|
|
809
|
+
};
|
|
810
|
+
/**
|
|
811
|
+
* @license
|
|
812
|
+
* Copyright 2018 Google Inc.
|
|
813
|
+
*
|
|
814
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
815
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
816
|
+
* in the Software without restriction, including without limitation the rights
|
|
817
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
818
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
819
|
+
* furnished to do so, subject to the following conditions:
|
|
820
|
+
*
|
|
821
|
+
* The above copyright notice and this permission notice shall be included in
|
|
822
|
+
* all copies or substantial portions of the Software.
|
|
823
|
+
*
|
|
824
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
825
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
826
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
827
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
828
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
829
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
830
|
+
* THE SOFTWARE.
|
|
831
|
+
*/
|
|
832
|
+
var O = (
|
|
833
|
+
/** @class */
|
|
834
|
+
function(a) {
|
|
835
|
+
T(e, a);
|
|
836
|
+
function e(t) {
|
|
837
|
+
var n = a.call(this, E(E({}, e.defaultAdapter), t)) || this;
|
|
838
|
+
return n.focusOnActivate_ = !0, n;
|
|
839
|
+
}
|
|
840
|
+
return Object.defineProperty(e, "cssClasses", {
|
|
841
|
+
get: function() {
|
|
842
|
+
return F;
|
|
843
|
+
},
|
|
844
|
+
enumerable: !1,
|
|
845
|
+
configurable: !0
|
|
846
|
+
}), Object.defineProperty(e, "strings", {
|
|
847
|
+
get: function() {
|
|
848
|
+
return N;
|
|
849
|
+
},
|
|
850
|
+
enumerable: !1,
|
|
851
|
+
configurable: !0
|
|
852
|
+
}), Object.defineProperty(e, "defaultAdapter", {
|
|
853
|
+
get: function() {
|
|
854
|
+
return {
|
|
855
|
+
addClass: function() {
|
|
856
|
+
},
|
|
857
|
+
removeClass: function() {
|
|
858
|
+
},
|
|
859
|
+
hasClass: function() {
|
|
860
|
+
return !1;
|
|
861
|
+
},
|
|
862
|
+
setAttr: function() {
|
|
863
|
+
},
|
|
864
|
+
activateIndicator: function() {
|
|
865
|
+
},
|
|
866
|
+
deactivateIndicator: function() {
|
|
867
|
+
},
|
|
868
|
+
notifyInteracted: function() {
|
|
869
|
+
},
|
|
870
|
+
getOffsetLeft: function() {
|
|
871
|
+
return 0;
|
|
872
|
+
},
|
|
873
|
+
getOffsetWidth: function() {
|
|
874
|
+
return 0;
|
|
875
|
+
},
|
|
876
|
+
getContentOffsetLeft: function() {
|
|
877
|
+
return 0;
|
|
878
|
+
},
|
|
879
|
+
getContentOffsetWidth: function() {
|
|
880
|
+
return 0;
|
|
881
|
+
},
|
|
882
|
+
focus: function() {
|
|
883
|
+
}
|
|
884
|
+
};
|
|
885
|
+
},
|
|
886
|
+
enumerable: !1,
|
|
887
|
+
configurable: !0
|
|
888
|
+
}), e.prototype.handleClick = function() {
|
|
889
|
+
this.adapter.notifyInteracted();
|
|
890
|
+
}, e.prototype.isActive = function() {
|
|
891
|
+
return this.adapter.hasClass(F.ACTIVE);
|
|
892
|
+
}, e.prototype.setFocusOnActivate = function(t) {
|
|
893
|
+
this.focusOnActivate_ = t;
|
|
894
|
+
}, e.prototype.activate = function(t) {
|
|
895
|
+
this.adapter.addClass(F.ACTIVE), this.adapter.setAttr(N.ARIA_SELECTED, "true"), this.adapter.setAttr(N.TABINDEX, "0"), this.adapter.activateIndicator(t), this.focusOnActivate_ && this.adapter.focus();
|
|
896
|
+
}, e.prototype.deactivate = function() {
|
|
897
|
+
this.isActive() && (this.adapter.removeClass(F.ACTIVE), this.adapter.setAttr(N.ARIA_SELECTED, "false"), this.adapter.setAttr(N.TABINDEX, "-1"), this.adapter.deactivateIndicator());
|
|
898
|
+
}, e.prototype.computeDimensions = function() {
|
|
899
|
+
var t = this.adapter.getOffsetWidth(), n = this.adapter.getOffsetLeft(), r = this.adapter.getContentOffsetWidth(), o = this.adapter.getContentOffsetLeft();
|
|
900
|
+
return {
|
|
901
|
+
contentLeft: n + o,
|
|
902
|
+
contentRight: n + o + r,
|
|
903
|
+
rootLeft: n,
|
|
904
|
+
rootRight: n + t
|
|
905
|
+
};
|
|
906
|
+
}, e;
|
|
907
|
+
}(k)
|
|
908
|
+
);
|
|
909
|
+
/**
|
|
910
|
+
* @license
|
|
911
|
+
* Copyright 2018 Google Inc.
|
|
912
|
+
*
|
|
913
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
914
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
915
|
+
* in the Software without restriction, including without limitation the rights
|
|
916
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
917
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
918
|
+
* furnished to do so, subject to the following conditions:
|
|
919
|
+
*
|
|
920
|
+
* The above copyright notice and this permission notice shall be included in
|
|
921
|
+
* all copies or substantial portions of the Software.
|
|
922
|
+
*
|
|
923
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
924
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
925
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
926
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
927
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
928
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
929
|
+
* THE SOFTWARE.
|
|
930
|
+
*/
|
|
931
|
+
var lt = (
|
|
932
|
+
/** @class */
|
|
933
|
+
function(a) {
|
|
934
|
+
T(e, a);
|
|
935
|
+
function e() {
|
|
936
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
937
|
+
}
|
|
938
|
+
return e.attachTo = function(t) {
|
|
939
|
+
return new e(t);
|
|
940
|
+
}, e.prototype.initialize = function(t, n) {
|
|
941
|
+
t === void 0 && (t = function(c, l) {
|
|
942
|
+
return new et(c, l);
|
|
943
|
+
}), n === void 0 && (n = function(c) {
|
|
944
|
+
return new ct(c);
|
|
945
|
+
}), this.id = this.root.id;
|
|
946
|
+
var r = new bt(et.createAdapter(this));
|
|
947
|
+
this.ripple_ = t(this.root, r);
|
|
948
|
+
var o = this.root.querySelector(O.strings.TAB_INDICATOR_SELECTOR);
|
|
949
|
+
this.tabIndicator_ = n(o), this.content_ = this.root.querySelector(O.strings.CONTENT_SELECTOR);
|
|
950
|
+
}, e.prototype.initialSyncWithDOM = function() {
|
|
951
|
+
var t = this;
|
|
952
|
+
this.handleClick_ = function() {
|
|
953
|
+
return t.foundation.handleClick();
|
|
954
|
+
}, this.listen("click", this.handleClick_);
|
|
955
|
+
}, e.prototype.destroy = function() {
|
|
956
|
+
this.unlisten("click", this.handleClick_), this.ripple_.destroy(), a.prototype.destroy.call(this);
|
|
957
|
+
}, e.prototype.getDefaultFoundation = function() {
|
|
958
|
+
var t = this, n = {
|
|
959
|
+
setAttr: function(r, o) {
|
|
960
|
+
return t.root.setAttribute(r, o);
|
|
961
|
+
},
|
|
962
|
+
addClass: function(r) {
|
|
963
|
+
return t.root.classList.add(r);
|
|
964
|
+
},
|
|
965
|
+
removeClass: function(r) {
|
|
966
|
+
return t.root.classList.remove(r);
|
|
967
|
+
},
|
|
968
|
+
hasClass: function(r) {
|
|
969
|
+
return t.root.classList.contains(r);
|
|
970
|
+
},
|
|
971
|
+
activateIndicator: function(r) {
|
|
972
|
+
return t.tabIndicator_.activate(r);
|
|
973
|
+
},
|
|
974
|
+
deactivateIndicator: function() {
|
|
975
|
+
return t.tabIndicator_.deactivate();
|
|
976
|
+
},
|
|
977
|
+
notifyInteracted: function() {
|
|
978
|
+
return t.emit(
|
|
979
|
+
O.strings.INTERACTED_EVENT,
|
|
980
|
+
{ tabId: t.id },
|
|
981
|
+
!0
|
|
982
|
+
/* bubble */
|
|
983
|
+
);
|
|
984
|
+
},
|
|
985
|
+
getOffsetLeft: function() {
|
|
986
|
+
return t.root.offsetLeft;
|
|
987
|
+
},
|
|
988
|
+
getOffsetWidth: function() {
|
|
989
|
+
return t.root.offsetWidth;
|
|
990
|
+
},
|
|
991
|
+
getContentOffsetLeft: function() {
|
|
992
|
+
return t.content_.offsetLeft;
|
|
993
|
+
},
|
|
994
|
+
getContentOffsetWidth: function() {
|
|
995
|
+
return t.content_.offsetWidth;
|
|
996
|
+
},
|
|
997
|
+
focus: function() {
|
|
998
|
+
return t.root.focus();
|
|
999
|
+
}
|
|
1000
|
+
};
|
|
1001
|
+
return new O(n);
|
|
1002
|
+
}, Object.defineProperty(e.prototype, "active", {
|
|
1003
|
+
/**
|
|
1004
|
+
* Getter for the active state of the tab
|
|
1005
|
+
*/
|
|
1006
|
+
get: function() {
|
|
1007
|
+
return this.foundation.isActive();
|
|
1008
|
+
},
|
|
1009
|
+
enumerable: !1,
|
|
1010
|
+
configurable: !0
|
|
1011
|
+
}), Object.defineProperty(e.prototype, "focusOnActivate", {
|
|
1012
|
+
set: function(t) {
|
|
1013
|
+
this.foundation.setFocusOnActivate(t);
|
|
1014
|
+
},
|
|
1015
|
+
enumerable: !1,
|
|
1016
|
+
configurable: !0
|
|
1017
|
+
}), e.prototype.activate = function(t) {
|
|
1018
|
+
this.foundation.activate(t);
|
|
1019
|
+
}, e.prototype.deactivate = function() {
|
|
1020
|
+
this.foundation.deactivate();
|
|
1021
|
+
}, e.prototype.computeIndicatorClientRect = function() {
|
|
1022
|
+
return this.tabIndicator_.computeContentClientRect();
|
|
1023
|
+
}, e.prototype.computeDimensions = function() {
|
|
1024
|
+
return this.foundation.computeDimensions();
|
|
1025
|
+
}, e.prototype.focus = function() {
|
|
1026
|
+
this.root.focus();
|
|
1027
|
+
}, e;
|
|
1028
|
+
}(H)
|
|
1029
|
+
);
|
|
1030
|
+
/**
|
|
1031
|
+
* @license
|
|
1032
|
+
* Copyright 2018 Google Inc.
|
|
1033
|
+
*
|
|
1034
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1035
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1036
|
+
* in the Software without restriction, including without limitation the rights
|
|
1037
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1038
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1039
|
+
* furnished to do so, subject to the following conditions:
|
|
1040
|
+
*
|
|
1041
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1042
|
+
* all copies or substantial portions of the Software.
|
|
1043
|
+
*
|
|
1044
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1045
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1046
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1047
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1048
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1049
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1050
|
+
* THE SOFTWARE.
|
|
1051
|
+
*/
|
|
1052
|
+
var d = {
|
|
1053
|
+
ARROW_LEFT_KEY: "ArrowLeft",
|
|
1054
|
+
ARROW_RIGHT_KEY: "ArrowRight",
|
|
1055
|
+
END_KEY: "End",
|
|
1056
|
+
ENTER_KEY: "Enter",
|
|
1057
|
+
HOME_KEY: "Home",
|
|
1058
|
+
SPACE_KEY: "Space",
|
|
1059
|
+
TAB_ACTIVATED_EVENT: "MDCTabBar:activated",
|
|
1060
|
+
TAB_SCROLLER_SELECTOR: ".mdc-tab-scroller",
|
|
1061
|
+
TAB_SELECTOR: ".mdc-tab"
|
|
1062
|
+
}, _ = {
|
|
1063
|
+
ARROW_LEFT_KEYCODE: 37,
|
|
1064
|
+
ARROW_RIGHT_KEYCODE: 39,
|
|
1065
|
+
END_KEYCODE: 35,
|
|
1066
|
+
ENTER_KEYCODE: 13,
|
|
1067
|
+
EXTRA_SCROLL_AMOUNT: 20,
|
|
1068
|
+
HOME_KEYCODE: 36,
|
|
1069
|
+
SPACE_KEYCODE: 32
|
|
1070
|
+
};
|
|
1071
|
+
/**
|
|
1072
|
+
* @license
|
|
1073
|
+
* Copyright 2018 Google Inc.
|
|
1074
|
+
*
|
|
1075
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1076
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1077
|
+
* in the Software without restriction, including without limitation the rights
|
|
1078
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1079
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1080
|
+
* furnished to do so, subject to the following conditions:
|
|
1081
|
+
*
|
|
1082
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1083
|
+
* all copies or substantial portions of the Software.
|
|
1084
|
+
*
|
|
1085
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1086
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1087
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1088
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1089
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1090
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1091
|
+
* THE SOFTWARE.
|
|
1092
|
+
*/
|
|
1093
|
+
var L = /* @__PURE__ */ new Set();
|
|
1094
|
+
L.add(d.ARROW_LEFT_KEY);
|
|
1095
|
+
L.add(d.ARROW_RIGHT_KEY);
|
|
1096
|
+
L.add(d.END_KEY);
|
|
1097
|
+
L.add(d.HOME_KEY);
|
|
1098
|
+
L.add(d.ENTER_KEY);
|
|
1099
|
+
L.add(d.SPACE_KEY);
|
|
1100
|
+
var R = /* @__PURE__ */ new Map();
|
|
1101
|
+
R.set(_.ARROW_LEFT_KEYCODE, d.ARROW_LEFT_KEY);
|
|
1102
|
+
R.set(_.ARROW_RIGHT_KEYCODE, d.ARROW_RIGHT_KEY);
|
|
1103
|
+
R.set(_.END_KEYCODE, d.END_KEY);
|
|
1104
|
+
R.set(_.HOME_KEYCODE, d.HOME_KEY);
|
|
1105
|
+
R.set(_.ENTER_KEYCODE, d.ENTER_KEY);
|
|
1106
|
+
R.set(_.SPACE_KEYCODE, d.SPACE_KEY);
|
|
1107
|
+
var st = (
|
|
1108
|
+
/** @class */
|
|
1109
|
+
function(a) {
|
|
1110
|
+
T(e, a);
|
|
1111
|
+
function e(t) {
|
|
1112
|
+
var n = a.call(this, E(E({}, e.defaultAdapter), t)) || this;
|
|
1113
|
+
return n.useAutomaticActivation_ = !1, n;
|
|
1114
|
+
}
|
|
1115
|
+
return Object.defineProperty(e, "strings", {
|
|
1116
|
+
get: function() {
|
|
1117
|
+
return d;
|
|
1118
|
+
},
|
|
1119
|
+
enumerable: !1,
|
|
1120
|
+
configurable: !0
|
|
1121
|
+
}), Object.defineProperty(e, "numbers", {
|
|
1122
|
+
get: function() {
|
|
1123
|
+
return _;
|
|
1124
|
+
},
|
|
1125
|
+
enumerable: !1,
|
|
1126
|
+
configurable: !0
|
|
1127
|
+
}), Object.defineProperty(e, "defaultAdapter", {
|
|
1128
|
+
get: function() {
|
|
1129
|
+
return {
|
|
1130
|
+
scrollTo: function() {
|
|
1131
|
+
},
|
|
1132
|
+
incrementScroll: function() {
|
|
1133
|
+
},
|
|
1134
|
+
getScrollPosition: function() {
|
|
1135
|
+
return 0;
|
|
1136
|
+
},
|
|
1137
|
+
getScrollContentWidth: function() {
|
|
1138
|
+
return 0;
|
|
1139
|
+
},
|
|
1140
|
+
getOffsetWidth: function() {
|
|
1141
|
+
return 0;
|
|
1142
|
+
},
|
|
1143
|
+
isRTL: function() {
|
|
1144
|
+
return !1;
|
|
1145
|
+
},
|
|
1146
|
+
setActiveTab: function() {
|
|
1147
|
+
},
|
|
1148
|
+
activateTabAtIndex: function() {
|
|
1149
|
+
},
|
|
1150
|
+
deactivateTabAtIndex: function() {
|
|
1151
|
+
},
|
|
1152
|
+
focusTabAtIndex: function() {
|
|
1153
|
+
},
|
|
1154
|
+
getTabIndicatorClientRectAtIndex: function() {
|
|
1155
|
+
return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
|
|
1156
|
+
},
|
|
1157
|
+
getTabDimensionsAtIndex: function() {
|
|
1158
|
+
return { rootLeft: 0, rootRight: 0, contentLeft: 0, contentRight: 0 };
|
|
1159
|
+
},
|
|
1160
|
+
getPreviousActiveTabIndex: function() {
|
|
1161
|
+
return -1;
|
|
1162
|
+
},
|
|
1163
|
+
getFocusedTabIndex: function() {
|
|
1164
|
+
return -1;
|
|
1165
|
+
},
|
|
1166
|
+
getIndexOfTabById: function() {
|
|
1167
|
+
return -1;
|
|
1168
|
+
},
|
|
1169
|
+
getTabListLength: function() {
|
|
1170
|
+
return 0;
|
|
1171
|
+
},
|
|
1172
|
+
notifyTabActivated: function() {
|
|
1173
|
+
}
|
|
1174
|
+
};
|
|
1175
|
+
},
|
|
1176
|
+
enumerable: !1,
|
|
1177
|
+
configurable: !0
|
|
1178
|
+
}), e.prototype.setUseAutomaticActivation = function(t) {
|
|
1179
|
+
this.useAutomaticActivation_ = t;
|
|
1180
|
+
}, e.prototype.activateTab = function(t) {
|
|
1181
|
+
var n = this.adapter.getPreviousActiveTabIndex();
|
|
1182
|
+
if (!(!this.indexIsInRange_(t) || t === n)) {
|
|
1183
|
+
var r;
|
|
1184
|
+
n !== -1 && (this.adapter.deactivateTabAtIndex(n), r = this.adapter.getTabIndicatorClientRectAtIndex(n)), this.adapter.activateTabAtIndex(t, r), this.scrollIntoView(t), this.adapter.notifyTabActivated(t);
|
|
1185
|
+
}
|
|
1186
|
+
}, e.prototype.handleKeyDown = function(t) {
|
|
1187
|
+
var n = this.getKeyFromEvent_(t);
|
|
1188
|
+
if (n !== void 0)
|
|
1189
|
+
if (this.isActivationKey_(n) || t.preventDefault(), this.useAutomaticActivation_) {
|
|
1190
|
+
if (this.isActivationKey_(n))
|
|
1191
|
+
return;
|
|
1192
|
+
var r = this.determineTargetFromKey_(this.adapter.getPreviousActiveTabIndex(), n);
|
|
1193
|
+
this.adapter.setActiveTab(r), this.scrollIntoView(r);
|
|
1194
|
+
} else {
|
|
1195
|
+
var o = this.adapter.getFocusedTabIndex();
|
|
1196
|
+
if (this.isActivationKey_(n))
|
|
1197
|
+
this.adapter.setActiveTab(o);
|
|
1198
|
+
else {
|
|
1199
|
+
var r = this.determineTargetFromKey_(o, n);
|
|
1200
|
+
this.adapter.focusTabAtIndex(r), this.scrollIntoView(r);
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
}, e.prototype.handleTabInteraction = function(t) {
|
|
1204
|
+
this.adapter.setActiveTab(this.adapter.getIndexOfTabById(t.detail.tabId));
|
|
1205
|
+
}, e.prototype.scrollIntoView = function(t) {
|
|
1206
|
+
if (this.indexIsInRange_(t)) {
|
|
1207
|
+
if (t === 0)
|
|
1208
|
+
return this.adapter.scrollTo(0);
|
|
1209
|
+
if (t === this.adapter.getTabListLength() - 1)
|
|
1210
|
+
return this.adapter.scrollTo(this.adapter.getScrollContentWidth());
|
|
1211
|
+
if (this.isRTL_())
|
|
1212
|
+
return this.scrollIntoViewRTL_(t);
|
|
1213
|
+
this.scrollIntoView_(t);
|
|
1214
|
+
}
|
|
1215
|
+
}, e.prototype.determineTargetFromKey_ = function(t, n) {
|
|
1216
|
+
var r = this.isRTL_(), o = this.adapter.getTabListLength() - 1, c = n === d.END_KEY, l = n === d.ARROW_LEFT_KEY && !r || n === d.ARROW_RIGHT_KEY && r, s = n === d.ARROW_RIGHT_KEY && !r || n === d.ARROW_LEFT_KEY && r, u = t;
|
|
1217
|
+
return c ? u = o : l ? u -= 1 : s ? u += 1 : u = 0, u < 0 ? u = o : u > o && (u = 0), u;
|
|
1218
|
+
}, e.prototype.calculateScrollIncrement_ = function(t, n, r, o) {
|
|
1219
|
+
var c = this.adapter.getTabDimensionsAtIndex(n), l = c.contentLeft - r - o, s = c.contentRight - r, u = s - _.EXTRA_SCROLL_AMOUNT, f = l + _.EXTRA_SCROLL_AMOUNT;
|
|
1220
|
+
return n < t ? Math.min(u, 0) : Math.max(f, 0);
|
|
1221
|
+
}, e.prototype.calculateScrollIncrementRTL_ = function(t, n, r, o, c) {
|
|
1222
|
+
var l = this.adapter.getTabDimensionsAtIndex(n), s = c - l.contentLeft - r, u = c - l.contentRight - r - o, f = u + _.EXTRA_SCROLL_AMOUNT, g = s - _.EXTRA_SCROLL_AMOUNT;
|
|
1223
|
+
return n > t ? Math.max(f, 0) : Math.min(g, 0);
|
|
1224
|
+
}, e.prototype.findAdjacentTabIndexClosestToEdge_ = function(t, n, r, o) {
|
|
1225
|
+
var c = n.rootLeft - r, l = n.rootRight - r - o, s = c + l, u = c < 0 || s < 0, f = l > 0 || s > 0;
|
|
1226
|
+
return u ? t - 1 : f ? t + 1 : -1;
|
|
1227
|
+
}, e.prototype.findAdjacentTabIndexClosestToEdgeRTL_ = function(t, n, r, o, c) {
|
|
1228
|
+
var l = c - n.rootLeft - o - r, s = c - n.rootRight - r, u = l + s, f = l > 0 || u > 0, g = s < 0 || u < 0;
|
|
1229
|
+
return f ? t + 1 : g ? t - 1 : -1;
|
|
1230
|
+
}, e.prototype.getKeyFromEvent_ = function(t) {
|
|
1231
|
+
return L.has(t.key) ? t.key : R.get(t.keyCode);
|
|
1232
|
+
}, e.prototype.isActivationKey_ = function(t) {
|
|
1233
|
+
return t === d.SPACE_KEY || t === d.ENTER_KEY;
|
|
1234
|
+
}, e.prototype.indexIsInRange_ = function(t) {
|
|
1235
|
+
return t >= 0 && t < this.adapter.getTabListLength();
|
|
1236
|
+
}, e.prototype.isRTL_ = function() {
|
|
1237
|
+
return this.adapter.isRTL();
|
|
1238
|
+
}, e.prototype.scrollIntoView_ = function(t) {
|
|
1239
|
+
var n = this.adapter.getScrollPosition(), r = this.adapter.getOffsetWidth(), o = this.adapter.getTabDimensionsAtIndex(t), c = this.findAdjacentTabIndexClosestToEdge_(t, o, n, r);
|
|
1240
|
+
if (this.indexIsInRange_(c)) {
|
|
1241
|
+
var l = this.calculateScrollIncrement_(t, c, n, r);
|
|
1242
|
+
this.adapter.incrementScroll(l);
|
|
1243
|
+
}
|
|
1244
|
+
}, e.prototype.scrollIntoViewRTL_ = function(t) {
|
|
1245
|
+
var n = this.adapter.getScrollPosition(), r = this.adapter.getOffsetWidth(), o = this.adapter.getTabDimensionsAtIndex(t), c = this.adapter.getScrollContentWidth(), l = this.findAdjacentTabIndexClosestToEdgeRTL_(t, o, n, r, c);
|
|
1246
|
+
if (this.indexIsInRange_(l)) {
|
|
1247
|
+
var s = this.calculateScrollIncrementRTL_(t, l, n, r, c);
|
|
1248
|
+
this.adapter.incrementScroll(s);
|
|
1249
|
+
}
|
|
1250
|
+
}, e;
|
|
1251
|
+
}(k)
|
|
1252
|
+
);
|
|
1253
|
+
/**
|
|
1254
|
+
* @license
|
|
1255
|
+
* Copyright 2018 Google Inc.
|
|
1256
|
+
*
|
|
1257
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1258
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1259
|
+
* in the Software without restriction, including without limitation the rights
|
|
1260
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1261
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1262
|
+
* furnished to do so, subject to the following conditions:
|
|
1263
|
+
*
|
|
1264
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1265
|
+
* all copies or substantial portions of the Software.
|
|
1266
|
+
*
|
|
1267
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1268
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1269
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1270
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1271
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1272
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1273
|
+
* THE SOFTWARE.
|
|
1274
|
+
*/
|
|
1275
|
+
var Q = st.strings, Pt = 0, Nt = (
|
|
1276
|
+
/** @class */
|
|
1277
|
+
function(a) {
|
|
1278
|
+
T(e, a);
|
|
1279
|
+
function e() {
|
|
1280
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
1281
|
+
}
|
|
1282
|
+
return e.attachTo = function(t) {
|
|
1283
|
+
return new e(t);
|
|
1284
|
+
}, Object.defineProperty(e.prototype, "focusOnActivate", {
|
|
1285
|
+
set: function(t) {
|
|
1286
|
+
this.tabList_.forEach(function(n) {
|
|
1287
|
+
return n.focusOnActivate = t;
|
|
1288
|
+
});
|
|
1289
|
+
},
|
|
1290
|
+
enumerable: !1,
|
|
1291
|
+
configurable: !0
|
|
1292
|
+
}), Object.defineProperty(e.prototype, "useAutomaticActivation", {
|
|
1293
|
+
set: function(t) {
|
|
1294
|
+
this.foundation.setUseAutomaticActivation(t);
|
|
1295
|
+
},
|
|
1296
|
+
enumerable: !1,
|
|
1297
|
+
configurable: !0
|
|
1298
|
+
}), e.prototype.initialize = function(t, n) {
|
|
1299
|
+
t === void 0 && (t = function(r) {
|
|
1300
|
+
return new lt(r);
|
|
1301
|
+
}), n === void 0 && (n = function(r) {
|
|
1302
|
+
return new it(r);
|
|
1303
|
+
}), this.tabList_ = this.instantiateTabs_(t), this.tabScroller_ = this.instantiateTabScroller_(n);
|
|
1304
|
+
}, e.prototype.initialSyncWithDOM = function() {
|
|
1305
|
+
var t = this;
|
|
1306
|
+
this.handleTabInteraction_ = function(r) {
|
|
1307
|
+
return t.foundation.handleTabInteraction(r);
|
|
1308
|
+
}, this.handleKeyDown_ = function(r) {
|
|
1309
|
+
return t.foundation.handleKeyDown(r);
|
|
1310
|
+
}, this.listen(O.strings.INTERACTED_EVENT, this.handleTabInteraction_), this.listen("keydown", this.handleKeyDown_);
|
|
1311
|
+
for (var n = 0; n < this.tabList_.length; n++)
|
|
1312
|
+
if (this.tabList_[n].active) {
|
|
1313
|
+
this.scrollIntoView(n);
|
|
1314
|
+
break;
|
|
1315
|
+
}
|
|
1316
|
+
}, e.prototype.destroy = function() {
|
|
1317
|
+
a.prototype.destroy.call(this), this.unlisten(O.strings.INTERACTED_EVENT, this.handleTabInteraction_), this.unlisten("keydown", this.handleKeyDown_), this.tabList_.forEach(function(t) {
|
|
1318
|
+
return t.destroy();
|
|
1319
|
+
}), this.tabScroller_ && this.tabScroller_.destroy();
|
|
1320
|
+
}, e.prototype.getDefaultFoundation = function() {
|
|
1321
|
+
var t = this, n = {
|
|
1322
|
+
scrollTo: function(r) {
|
|
1323
|
+
return t.tabScroller_.scrollTo(r);
|
|
1324
|
+
},
|
|
1325
|
+
incrementScroll: function(r) {
|
|
1326
|
+
return t.tabScroller_.incrementScroll(r);
|
|
1327
|
+
},
|
|
1328
|
+
getScrollPosition: function() {
|
|
1329
|
+
return t.tabScroller_.getScrollPosition();
|
|
1330
|
+
},
|
|
1331
|
+
getScrollContentWidth: function() {
|
|
1332
|
+
return t.tabScroller_.getScrollContentWidth();
|
|
1333
|
+
},
|
|
1334
|
+
getOffsetWidth: function() {
|
|
1335
|
+
return t.root.offsetWidth;
|
|
1336
|
+
},
|
|
1337
|
+
isRTL: function() {
|
|
1338
|
+
return window.getComputedStyle(t.root).getPropertyValue("direction") === "rtl";
|
|
1339
|
+
},
|
|
1340
|
+
setActiveTab: function(r) {
|
|
1341
|
+
return t.foundation.activateTab(r);
|
|
1342
|
+
},
|
|
1343
|
+
activateTabAtIndex: function(r, o) {
|
|
1344
|
+
return t.tabList_[r].activate(o);
|
|
1345
|
+
},
|
|
1346
|
+
deactivateTabAtIndex: function(r) {
|
|
1347
|
+
return t.tabList_[r].deactivate();
|
|
1348
|
+
},
|
|
1349
|
+
focusTabAtIndex: function(r) {
|
|
1350
|
+
return t.tabList_[r].focus();
|
|
1351
|
+
},
|
|
1352
|
+
getTabIndicatorClientRectAtIndex: function(r) {
|
|
1353
|
+
return t.tabList_[r].computeIndicatorClientRect();
|
|
1354
|
+
},
|
|
1355
|
+
getTabDimensionsAtIndex: function(r) {
|
|
1356
|
+
return t.tabList_[r].computeDimensions();
|
|
1357
|
+
},
|
|
1358
|
+
getPreviousActiveTabIndex: function() {
|
|
1359
|
+
for (var r = 0; r < t.tabList_.length; r++)
|
|
1360
|
+
if (t.tabList_[r].active)
|
|
1361
|
+
return r;
|
|
1362
|
+
return -1;
|
|
1363
|
+
},
|
|
1364
|
+
getFocusedTabIndex: function() {
|
|
1365
|
+
var r = t.getTabElements_(), o = document.activeElement;
|
|
1366
|
+
return r.indexOf(o);
|
|
1367
|
+
},
|
|
1368
|
+
getIndexOfTabById: function(r) {
|
|
1369
|
+
for (var o = 0; o < t.tabList_.length; o++)
|
|
1370
|
+
if (t.tabList_[o].id === r)
|
|
1371
|
+
return o;
|
|
1372
|
+
return -1;
|
|
1373
|
+
},
|
|
1374
|
+
getTabListLength: function() {
|
|
1375
|
+
return t.tabList_.length;
|
|
1376
|
+
},
|
|
1377
|
+
notifyTabActivated: function(r) {
|
|
1378
|
+
return t.emit(Q.TAB_ACTIVATED_EVENT, { index: r }, !0);
|
|
1379
|
+
}
|
|
1380
|
+
};
|
|
1381
|
+
return new st(n);
|
|
1382
|
+
}, e.prototype.activateTab = function(t) {
|
|
1383
|
+
this.foundation.activateTab(t);
|
|
1384
|
+
}, e.prototype.scrollIntoView = function(t) {
|
|
1385
|
+
this.foundation.scrollIntoView(t);
|
|
1386
|
+
}, e.prototype.getTabElements_ = function() {
|
|
1387
|
+
return [].slice.call(this.root.querySelectorAll(Q.TAB_SELECTOR));
|
|
1388
|
+
}, e.prototype.instantiateTabs_ = function(t) {
|
|
1389
|
+
return this.getTabElements_().map(function(n) {
|
|
1390
|
+
return n.id = n.id || "mdc-tab-" + ++Pt, t(n);
|
|
1391
|
+
});
|
|
1392
|
+
}, e.prototype.instantiateTabScroller_ = function(t) {
|
|
1393
|
+
var n = this.root.querySelector(Q.TAB_SCROLLER_SELECTOR);
|
|
1394
|
+
return n ? t(n) : null;
|
|
1395
|
+
}, e;
|
|
1396
|
+
}(H)
|
|
1397
|
+
);
|
|
1398
|
+
const Mt = {
|
|
1399
|
+
/**
|
|
1400
|
+
* Content to be rendered inside the padding component. Accepts any valid markup.
|
|
1401
|
+
*
|
|
1402
|
+
* Defaults to **null**.
|
|
1403
|
+
*/
|
|
1404
|
+
children: i.node.isRequired,
|
|
1405
|
+
/**
|
|
1406
|
+
* The css class name to be passed through to the component markup.
|
|
1407
|
+
*
|
|
1408
|
+
* Defaults to **undefined**.
|
|
1409
|
+
*/
|
|
1410
|
+
className: i.string,
|
|
1411
|
+
/**
|
|
1412
|
+
* Adds a custom padding style to the child content. Must be a valid CSS padding declaration. i.e. 38px 30px
|
|
1413
|
+
*
|
|
1414
|
+
* Defaults to **null**.
|
|
1415
|
+
*/
|
|
1416
|
+
customPadding: i.string,
|
|
1417
|
+
/**
|
|
1418
|
+
* By default a div will be rendered, this allow another tag to be used instead. A block type component is suggested.
|
|
1419
|
+
*
|
|
1420
|
+
* Defaults to **'div'**.
|
|
1421
|
+
*/
|
|
1422
|
+
tag: i.oneOfType([i.string, i.elementType]),
|
|
1423
|
+
/**
|
|
1424
|
+
* Applies the specified padding amount. `dense` is 8px, `standard` is 16px, and `airy` is 24px. If `customPadding` is used, this will be ignored.
|
|
1425
|
+
*
|
|
1426
|
+
* Defaults to **'standard'**.
|
|
1427
|
+
*/
|
|
1428
|
+
variant: i.oneOf(["dense", "standard", "airy"])
|
|
1429
|
+
}, wt = {
|
|
1430
|
+
children: null,
|
|
1431
|
+
className: void 0,
|
|
1432
|
+
customPadding: null,
|
|
1433
|
+
tag: "div",
|
|
1434
|
+
variant: "standard"
|
|
1435
|
+
}, j = /* @__PURE__ */ w((a, e) => {
|
|
1436
|
+
const {
|
|
1437
|
+
tag: t,
|
|
1438
|
+
variant: n,
|
|
1439
|
+
children: r,
|
|
1440
|
+
className: o,
|
|
1441
|
+
customPadding: c,
|
|
1442
|
+
style: l,
|
|
1443
|
+
...s
|
|
1444
|
+
} = a, u = rt(() => ({
|
|
1445
|
+
...l,
|
|
1446
|
+
padding: c
|
|
1447
|
+
}), [l, c]), f = t || "div", g = C();
|
|
1448
|
+
return W(e, () => g.current, []), /* @__PURE__ */ p.createElement(f, x({
|
|
1449
|
+
className: K("lmnt", "lmnt-padding", n === "dense" && "lmnt-padding--dense", n === "standard" && "lmnt-padding--standard", n === "airy" && "lmnt-padding--airy", o),
|
|
1450
|
+
style: u
|
|
1451
|
+
}, s), r);
|
|
1452
|
+
});
|
|
1453
|
+
j.displayName = "Padding";
|
|
1454
|
+
j.propTypes = Mt;
|
|
1455
|
+
j.defaultProps = wt;
|
|
1456
|
+
const Wt = {
|
|
1457
|
+
/**
|
|
1458
|
+
* Index of the currently active tab.
|
|
1459
|
+
*
|
|
1460
|
+
* Defaults to **0**.
|
|
1461
|
+
*/
|
|
1462
|
+
activeTabIndex: i.number,
|
|
1463
|
+
/**
|
|
1464
|
+
* Accepts one or more Tab components.
|
|
1465
|
+
*
|
|
1466
|
+
* Defaults to **null**.
|
|
1467
|
+
*/
|
|
1468
|
+
children: i.node,
|
|
1469
|
+
/**
|
|
1470
|
+
* The css class name to be passed through to the component markup.
|
|
1471
|
+
*
|
|
1472
|
+
* Defaults to **undefined**.
|
|
1473
|
+
*/
|
|
1474
|
+
className: i.string,
|
|
1475
|
+
/**
|
|
1476
|
+
* Clustered tabs can be aligned to 'start', 'center', or 'end'. Requires one or more tabs to have clustered set to true.
|
|
1477
|
+
*
|
|
1478
|
+
* Defaults to **'start'**.
|
|
1479
|
+
*/
|
|
1480
|
+
clusterAlign: i.oneOf(["start", "center", "end"]),
|
|
1481
|
+
/**
|
|
1482
|
+
* Indicates that tabs should shrink in size to be as narrow as possible without causing text to wrap.
|
|
1483
|
+
*
|
|
1484
|
+
* Defaults to **false**.
|
|
1485
|
+
*/
|
|
1486
|
+
clustered: i.bool,
|
|
1487
|
+
/**
|
|
1488
|
+
* Apply elevated styles to raise the tab-bar above standard content.
|
|
1489
|
+
*
|
|
1490
|
+
* Defaults to **false**.
|
|
1491
|
+
*/
|
|
1492
|
+
elevated: i.bool,
|
|
1493
|
+
/**
|
|
1494
|
+
* Fires when switching to a different tab.
|
|
1495
|
+
*
|
|
1496
|
+
* Defaults to **null**.
|
|
1497
|
+
*/
|
|
1498
|
+
onTabActivated: i.func,
|
|
1499
|
+
/**
|
|
1500
|
+
* @deprecated _Please use elevated instead._
|
|
1501
|
+
*
|
|
1502
|
+
* Apply a raised style.
|
|
1503
|
+
*
|
|
1504
|
+
* Defaults to **undefined**.
|
|
1505
|
+
*/
|
|
1506
|
+
raised: tt(i.bool, "TabBar", "Please use elevated instead."),
|
|
1507
|
+
/**
|
|
1508
|
+
* @deprecated _Deprecated, containers will scroll when necessary._
|
|
1509
|
+
*
|
|
1510
|
+
* Create a fixed height scrollable container.
|
|
1511
|
+
*
|
|
1512
|
+
* Defaults to **undefined**.
|
|
1513
|
+
*/
|
|
1514
|
+
scrollable: tt(i.bool, "TabBar", "Deprecated, containers will scroll when necessary."),
|
|
1515
|
+
/**
|
|
1516
|
+
* Indicates that the tab icon and label should flow vertically instead of horizontally.
|
|
1517
|
+
*
|
|
1518
|
+
* Defaults to **false**.
|
|
1519
|
+
*/
|
|
1520
|
+
stacked: i.bool,
|
|
1521
|
+
/**
|
|
1522
|
+
* Background theme color. Accepts one of 'primary', 'secondary', or 'surface'.
|
|
1523
|
+
*
|
|
1524
|
+
* Defaults to **'surface'**.
|
|
1525
|
+
*/
|
|
1526
|
+
variant: i.oneOf(["primary", "secondary", "surface"])
|
|
1527
|
+
}, xt = {
|
|
1528
|
+
activeTabIndex: 0,
|
|
1529
|
+
children: null,
|
|
1530
|
+
className: void 0,
|
|
1531
|
+
clusterAlign: "start",
|
|
1532
|
+
clustered: !1,
|
|
1533
|
+
elevated: !1,
|
|
1534
|
+
raised: void 0,
|
|
1535
|
+
scrollable: void 0,
|
|
1536
|
+
stacked: !1,
|
|
1537
|
+
variant: "surface"
|
|
1538
|
+
}, Kt = {
|
|
1539
|
+
/**
|
|
1540
|
+
* Indicates that the tab is active.
|
|
1541
|
+
*
|
|
1542
|
+
* Defaults to **undefined**.
|
|
1543
|
+
*/
|
|
1544
|
+
active: i.bool,
|
|
1545
|
+
/**
|
|
1546
|
+
* The custom tab notification badge to be rendered.
|
|
1547
|
+
*
|
|
1548
|
+
* Defaults to **undefined**.
|
|
1549
|
+
*/
|
|
1550
|
+
badge: i.oneOfType([i.string, i.func, i.node]),
|
|
1551
|
+
/**
|
|
1552
|
+
* The displayed content. Expects a valid string, though will accept any valid components or markup. If label and `children` are both set, `label` will take priority.
|
|
1553
|
+
*
|
|
1554
|
+
* Defaults to **null**.
|
|
1555
|
+
*/
|
|
1556
|
+
children: i.node,
|
|
1557
|
+
/**
|
|
1558
|
+
* The css class name to be passed through to the component markup.
|
|
1559
|
+
*
|
|
1560
|
+
* Defaults to **undefined**.
|
|
1561
|
+
*/
|
|
1562
|
+
className: i.string,
|
|
1563
|
+
/**
|
|
1564
|
+
* Indicates that the tab should shrink in size to be as narrow as possible without causing text to wrap.
|
|
1565
|
+
*
|
|
1566
|
+
* Defaults to **false**.
|
|
1567
|
+
*/
|
|
1568
|
+
clustered: i.bool,
|
|
1569
|
+
/**
|
|
1570
|
+
* Add a leading icon to the tab.
|
|
1571
|
+
*
|
|
1572
|
+
* Defaults to **undefined**.
|
|
1573
|
+
*/
|
|
1574
|
+
icon: i.node,
|
|
1575
|
+
/**
|
|
1576
|
+
* An icon to be used as the tab indicator. Accepts the name of any valid material icon (see Icon component documentation for a list of valid icons). If no icon is provided the tab-indicator will use an underline.
|
|
1577
|
+
*
|
|
1578
|
+
* Defaults to **null**.
|
|
1579
|
+
*/
|
|
1580
|
+
indicatorIcon: i.string,
|
|
1581
|
+
/**
|
|
1582
|
+
* The tab-indicator will span the entire tab with 'full' or only the content of the tab with 'content'.
|
|
1583
|
+
*
|
|
1584
|
+
* Defaults to **'full'**.
|
|
1585
|
+
*/
|
|
1586
|
+
indicatorSize: i.oneOf(["full", "content"]),
|
|
1587
|
+
/**
|
|
1588
|
+
* The tab-indicator will use a 'slide' or 'fade' transition between tabs.
|
|
1589
|
+
*
|
|
1590
|
+
* Defaults to **'slide'**.
|
|
1591
|
+
*/
|
|
1592
|
+
indicatorTransition: i.oneOf(["slide", "fade"]),
|
|
1593
|
+
/**
|
|
1594
|
+
* The displayed text. Expects a valid string. If label and `children` are both set, `label` will take priority.
|
|
1595
|
+
*
|
|
1596
|
+
* Defaults to **null**.
|
|
1597
|
+
*/
|
|
1598
|
+
label: i.node,
|
|
1599
|
+
/**
|
|
1600
|
+
* Indicates that the tab icon and label should flow vertically instead of horizontally. If stacked is true the tab will not show a badge. You can place the badge on the leading icon.
|
|
1601
|
+
*
|
|
1602
|
+
* Defaults to **false**.
|
|
1603
|
+
*/
|
|
1604
|
+
stacked: i.bool
|
|
1605
|
+
}, Bt = {
|
|
1606
|
+
active: void 0,
|
|
1607
|
+
badge: void 0,
|
|
1608
|
+
children: null,
|
|
1609
|
+
className: void 0,
|
|
1610
|
+
clustered: !1,
|
|
1611
|
+
icon: void 0,
|
|
1612
|
+
indicatorIcon: null,
|
|
1613
|
+
indicatorSize: "full",
|
|
1614
|
+
indicatorTransition: "slide",
|
|
1615
|
+
label: null,
|
|
1616
|
+
stacked: !1
|
|
1617
|
+
};
|
|
1618
|
+
i.bool, i.string, i.string;
|
|
1619
|
+
i.oneOf(["start", "center", "end"]), i.node;
|
|
1620
|
+
const M = /* @__PURE__ */ w((a, e) => {
|
|
1621
|
+
const {
|
|
1622
|
+
active: t,
|
|
1623
|
+
className: n,
|
|
1624
|
+
icon: r,
|
|
1625
|
+
id: o,
|
|
1626
|
+
transition: c,
|
|
1627
|
+
...l
|
|
1628
|
+
} = a, s = C(), u = C(), f = K("lmnt", "lmnt-tab-indicator", "mdc-tab-indicator", t && "mdc-tab-indicator--active", c === "fade" && "mdc-tab-indicator--fade", n);
|
|
1629
|
+
return D(() => (u.current = ct.attachTo(s.current), () => {
|
|
1630
|
+
u.current.destroy();
|
|
1631
|
+
}), [u]), W(e, () => s.current, []), /* @__PURE__ */ p.createElement("span", x({
|
|
1632
|
+
id: o,
|
|
1633
|
+
className: f,
|
|
1634
|
+
ref: s
|
|
1635
|
+
}, l), r && /* @__PURE__ */ p.createElement("span", {
|
|
1636
|
+
className: "mdc-tab-indicator__content mdc-tab-indicator__content--icon material-icons",
|
|
1637
|
+
"aria-hidden": "true"
|
|
1638
|
+
}, r), !r && /* @__PURE__ */ p.createElement("span", {
|
|
1639
|
+
className: "mdc-tab-indicator__content mdc-tab-indicator__content--underline"
|
|
1640
|
+
}));
|
|
1641
|
+
});
|
|
1642
|
+
M.displayName = "TabIndicator";
|
|
1643
|
+
M.propTypes = {
|
|
1644
|
+
active: i.bool,
|
|
1645
|
+
className: i.string,
|
|
1646
|
+
icon: i.string,
|
|
1647
|
+
id: i.string,
|
|
1648
|
+
transition: i.oneOf(["fade", "slide"])
|
|
1649
|
+
};
|
|
1650
|
+
M.defaultProps = {
|
|
1651
|
+
active: !1,
|
|
1652
|
+
className: null,
|
|
1653
|
+
icon: null,
|
|
1654
|
+
id: null,
|
|
1655
|
+
transition: "slide"
|
|
1656
|
+
};
|
|
1657
|
+
const ut = /* @__PURE__ */ pt({}), Vt = (a, e) => {
|
|
1658
|
+
if (a)
|
|
1659
|
+
return typeof a == "string" ? /* @__PURE__ */ p.createElement(Tt, {
|
|
1660
|
+
tabIndex: 0,
|
|
1661
|
+
role: "button",
|
|
1662
|
+
className: "mdc-tab__icon",
|
|
1663
|
+
ariaHidden: !0,
|
|
1664
|
+
ariaLabel: e,
|
|
1665
|
+
icon: a
|
|
1666
|
+
}) : at(a, {
|
|
1667
|
+
className: "mdc-tab__icon",
|
|
1668
|
+
tabIndex: 0,
|
|
1669
|
+
"aria-hidden": !0,
|
|
1670
|
+
"aria-label": e,
|
|
1671
|
+
role: "button"
|
|
1672
|
+
});
|
|
1673
|
+
}, X = /* @__PURE__ */ w((a, e) => {
|
|
1674
|
+
const {
|
|
1675
|
+
active: t,
|
|
1676
|
+
badge: n,
|
|
1677
|
+
children: r,
|
|
1678
|
+
className: o,
|
|
1679
|
+
clustered: c,
|
|
1680
|
+
icon: l,
|
|
1681
|
+
indicatorIcon: s,
|
|
1682
|
+
indicatorSize: u,
|
|
1683
|
+
indicatorTransition: f,
|
|
1684
|
+
label: g,
|
|
1685
|
+
stacked: S,
|
|
1686
|
+
...P
|
|
1687
|
+
} = a, h = C(), m = C();
|
|
1688
|
+
W(e, () => h.current, []);
|
|
1689
|
+
const y = ft(ut), V = y.stacked || S, G = y.clustered || c;
|
|
1690
|
+
D(() => (m.current = lt.attachTo(h.current), () => {
|
|
1691
|
+
m.current.destroy();
|
|
1692
|
+
}), []);
|
|
1693
|
+
const $ = K("lmnt", "lmnt-tab", "mdc-tab", "mdc-button", t && "mdc-tab--active", G && "mdc-tab--min-width", V && "mdc-tab--stacked", o);
|
|
1694
|
+
return /* @__PURE__ */ p.createElement("button", x({
|
|
1695
|
+
type: "button",
|
|
1696
|
+
"aria-selected": t,
|
|
1697
|
+
ref: h,
|
|
1698
|
+
className: $,
|
|
1699
|
+
role: "tab"
|
|
1700
|
+
}, P), /* @__PURE__ */ p.createElement("span", {
|
|
1701
|
+
className: "mdc-tab__content"
|
|
1702
|
+
}, l && Vt(l, g), /* @__PURE__ */ p.createElement("span", {
|
|
1703
|
+
className: "mdc-tab__text-label"
|
|
1704
|
+
}, r), u === "content" && /* @__PURE__ */ p.createElement(M, {
|
|
1705
|
+
active: t,
|
|
1706
|
+
icon: s,
|
|
1707
|
+
transition: f
|
|
1708
|
+
}, s), n && !V && at(n, {
|
|
1709
|
+
className: "lmnt-tab-bar--notification-badge"
|
|
1710
|
+
})), u === "full" && /* @__PURE__ */ p.createElement(M, {
|
|
1711
|
+
active: t,
|
|
1712
|
+
icon: s,
|
|
1713
|
+
transition: f
|
|
1714
|
+
}, s), /* @__PURE__ */ p.createElement("span", {
|
|
1715
|
+
className: "lmnt-tab___ripple mdc-tab__ripple"
|
|
1716
|
+
}));
|
|
1717
|
+
});
|
|
1718
|
+
X.displayName = "Tab";
|
|
1719
|
+
X.propTypes = Kt;
|
|
1720
|
+
X.defaultProps = Bt;
|
|
1721
|
+
const z = /* @__PURE__ */ w((a, e) => {
|
|
1722
|
+
const {
|
|
1723
|
+
align: t,
|
|
1724
|
+
className: n,
|
|
1725
|
+
children: r,
|
|
1726
|
+
...o
|
|
1727
|
+
} = a, c = C(), l = C();
|
|
1728
|
+
D(() => (l.current = it.attachTo(c.current), () => {
|
|
1729
|
+
l.current.destroy();
|
|
1730
|
+
}), [l]);
|
|
1731
|
+
const s = K("lmnt", "lmnt-tab-scroller", "mdc-tab-scroller", t === "start" && "mdc-tab-scroller--align-start", t === "center" && "mdc-tab-scroller--align-center", t === "end" && "mdc-tab-scroller--align-end", n);
|
|
1732
|
+
return W(e, () => c.current, []), /* @__PURE__ */ p.createElement("div", x({
|
|
1733
|
+
className: s,
|
|
1734
|
+
ref: c
|
|
1735
|
+
}, o), /* @__PURE__ */ p.createElement("div", {
|
|
1736
|
+
className: "mdc-tab-scroller__scroll-area"
|
|
1737
|
+
}, /* @__PURE__ */ p.createElement("div", {
|
|
1738
|
+
className: "mdc-tab-scroller__scroll-content"
|
|
1739
|
+
}, r)));
|
|
1740
|
+
});
|
|
1741
|
+
z.displayName = "TabBar";
|
|
1742
|
+
z.propTypes = {
|
|
1743
|
+
align: i.oneOf(["start", "center", "end"]),
|
|
1744
|
+
className: i.string,
|
|
1745
|
+
children: i.oneOfType([i.arrayOf(i.node), i.node])
|
|
1746
|
+
};
|
|
1747
|
+
z.defaultProps = {
|
|
1748
|
+
align: "start",
|
|
1749
|
+
className: void 0,
|
|
1750
|
+
children: void 0
|
|
1751
|
+
};
|
|
1752
|
+
const B = /* @__PURE__ */ w((a, e) => {
|
|
1753
|
+
const {
|
|
1754
|
+
activeTabIndex: t,
|
|
1755
|
+
children: n,
|
|
1756
|
+
className: r,
|
|
1757
|
+
clusterAlign: o,
|
|
1758
|
+
clustered: c,
|
|
1759
|
+
elevated: l,
|
|
1760
|
+
onTabActivated: s,
|
|
1761
|
+
raised: u,
|
|
1762
|
+
scrollable: f,
|
|
1763
|
+
stacked: g,
|
|
1764
|
+
variant: S,
|
|
1765
|
+
...P
|
|
1766
|
+
} = a, h = C(), m = C();
|
|
1767
|
+
W(e, () => h.current, []);
|
|
1768
|
+
const y = ht(($) => s && s($.detail.index), [s]);
|
|
1769
|
+
D(() => (m.current = Nt.attachTo(h.current), m.current.unlisten("MDCTabBar:activated", y), m.current.listen("MDCTabBar:activated", y), () => {
|
|
1770
|
+
m.current.unlisten("MDCTabBar:activated", y), m.current.destroy();
|
|
1771
|
+
}), [n, m, y]), D(() => {
|
|
1772
|
+
m.current.activateTab(t);
|
|
1773
|
+
}, [m, t]);
|
|
1774
|
+
const V = K("lmnt", "lmnt-tab-bar", "mdc-tab-bar", u && !f && "mdc-tab-bar--raised", l && "mdc-tab-bar--elevated", S === "primary" && "mdc-tab-bar--primary", S === "secondary" && "mdc-tab-bar--secondary", S === "surface" && "mdc-tab-bar--surface", r), G = rt(() => ({
|
|
1775
|
+
stacked: g,
|
|
1776
|
+
clustered: c
|
|
1777
|
+
}), [g, c]);
|
|
1778
|
+
return /* @__PURE__ */ p.createElement(ut.Provider, {
|
|
1779
|
+
value: G
|
|
1780
|
+
}, /* @__PURE__ */ p.createElement("div", x({
|
|
1781
|
+
className: V,
|
|
1782
|
+
role: "tablist",
|
|
1783
|
+
ref: h
|
|
1784
|
+
}, P), /* @__PURE__ */ p.createElement(z, {
|
|
1785
|
+
align: o
|
|
1786
|
+
}, n)));
|
|
1787
|
+
});
|
|
1788
|
+
B.displayName = "TabBar";
|
|
1789
|
+
B.propTypes = Wt;
|
|
1790
|
+
B.defaultProps = xt;
|
|
1791
|
+
B.displayName = "TabBar";
|
|
1792
|
+
const Yt = "_elevation_1rcw6_1", Ft = "_themeBackground_1rcw6_6", kt = "_tabBar_1rcw6_10", Ht = "_tabWrapper_1rcw6_16", jt = "_tabButton_1rcw6_20", Xt = "_childContainer_1rcw6_24", zt = "_childContainerLg_1rcw6_28", A = {
|
|
1793
|
+
elevation: Yt,
|
|
1794
|
+
themeBackground: Ft,
|
|
1795
|
+
tabBar: kt,
|
|
1796
|
+
tabWrapper: Ht,
|
|
1797
|
+
tabButton: jt,
|
|
1798
|
+
childContainer: Xt,
|
|
1799
|
+
childContainerLg: zt
|
|
1800
|
+
}, nt = (a, e, t) => !t || !e || !a ? 0 : a.findIndex((n) => `#${n.hash}` === e) ?? 0, re = ({
|
|
1801
|
+
tabs: a,
|
|
1802
|
+
hasHash: e = !0,
|
|
1803
|
+
hash: t = "",
|
|
1804
|
+
clusterAlign: n = "start",
|
|
1805
|
+
hasClusteredTabs: r,
|
|
1806
|
+
children: o,
|
|
1807
|
+
verticalGap: c = "none",
|
|
1808
|
+
elevation: l = 0,
|
|
1809
|
+
backgroundColor: s = "themeBackground",
|
|
1810
|
+
onChange: u
|
|
25
1811
|
}) => {
|
|
26
|
-
const [
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
}, [
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
1812
|
+
const [f, g] = mt(nt(a, t, e)), { isLg: S } = gt();
|
|
1813
|
+
D(() => {
|
|
1814
|
+
const h = nt(a, t, e);
|
|
1815
|
+
g(h);
|
|
1816
|
+
}, [t, a, e]);
|
|
1817
|
+
const P = (h) => {
|
|
1818
|
+
const m = a[h].hash;
|
|
1819
|
+
m != null && e && (window.location.hash = m), g(h), u?.(h);
|
|
34
1820
|
};
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
|
|
1821
|
+
return /* @__PURE__ */ I(
|
|
1822
|
+
St,
|
|
37
1823
|
{
|
|
38
|
-
elevation:
|
|
39
|
-
className: `${
|
|
40
|
-
children: /* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
|
|
1824
|
+
elevation: l,
|
|
1825
|
+
className: `${A.elevation} ${s === "none" ? "" : A.themeBackground}`,
|
|
1826
|
+
children: /* @__PURE__ */ q(Y, { direction: "vertical", gap: c, secondaryAlign: "stretch", children: [
|
|
1827
|
+
/* @__PURE__ */ q(Y, { direction: S ? "horizontal" : "vertical", className: A.tabWrapper, children: [
|
|
1828
|
+
/* @__PURE__ */ I(
|
|
1829
|
+
B,
|
|
44
1830
|
{
|
|
45
|
-
className:
|
|
46
|
-
clustered:
|
|
47
|
-
clusterAlign:
|
|
1831
|
+
className: A.tabBar,
|
|
1832
|
+
clustered: S ? r : !1,
|
|
1833
|
+
clusterAlign: n,
|
|
48
1834
|
variant: "surface",
|
|
49
|
-
activeTabIndex:
|
|
50
|
-
onTabActivated:
|
|
51
|
-
children:
|
|
52
|
-
|
|
1835
|
+
activeTabIndex: f,
|
|
1836
|
+
onTabActivated: P,
|
|
1837
|
+
children: a.map((h) => /* @__PURE__ */ I(
|
|
1838
|
+
X,
|
|
53
1839
|
{
|
|
54
|
-
icon:
|
|
55
|
-
className:
|
|
56
|
-
children: /* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
|
|
1840
|
+
icon: h.leadingIcon,
|
|
1841
|
+
className: o ? A.tabButton : "",
|
|
1842
|
+
children: /* @__PURE__ */ q(Y, { gap: "dense", children: [
|
|
1843
|
+
h.title,
|
|
1844
|
+
h.trailingIcon
|
|
59
1845
|
] })
|
|
60
1846
|
},
|
|
61
|
-
|
|
1847
|
+
h.hash
|
|
62
1848
|
))
|
|
63
1849
|
}
|
|
64
1850
|
),
|
|
65
|
-
|
|
66
|
-
|
|
1851
|
+
o ? /* @__PURE__ */ I(
|
|
1852
|
+
j,
|
|
67
1853
|
{
|
|
68
1854
|
variant: "dense",
|
|
69
|
-
className:
|
|
70
|
-
children: /* @__PURE__ */
|
|
1855
|
+
className: S ? A.childContainer : A.childContainerLg,
|
|
1856
|
+
children: /* @__PURE__ */ I(Y, { gap: "dense", primaryAlign: "center", secondaryAlign: "center", children: o })
|
|
71
1857
|
}
|
|
72
|
-
) : /* @__PURE__ */
|
|
1858
|
+
) : /* @__PURE__ */ I(dt, {})
|
|
73
1859
|
] }),
|
|
74
|
-
|
|
1860
|
+
a[f]?.component
|
|
75
1861
|
] })
|
|
76
1862
|
}
|
|
77
1863
|
);
|
|
78
1864
|
};
|
|
79
1865
|
export {
|
|
80
|
-
|
|
1866
|
+
re as HashTabView
|
|
81
1867
|
};
|