@fluid-topics/ft-tabs 2.2.17 → 2.2.19
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/build/ft-tabs.js +8 -6
- package/build/ft-tabs.light.js +14 -14
- package/build/ft-tabs.min.js +92 -92
- package/package.json +7 -7
package/build/ft-tabs.js
CHANGED
|
@@ -49,8 +49,9 @@ export class FtTabs extends FtLitElement {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
|
-
var _a
|
|
53
|
-
|
|
52
|
+
var _a;
|
|
53
|
+
var _b;
|
|
54
|
+
const activeTabColor = (_a = this.ftTabs[(_b = this.activeIndex) !== null && _b !== void 0 ? _b : 0]) === null || _a === void 0 ? void 0 : _a.color;
|
|
54
55
|
return html `
|
|
55
56
|
<div class="${classMap(this.tabsClasses)}" part="container">
|
|
56
57
|
<div role="tablist" part="tablist">
|
|
@@ -130,12 +131,13 @@ export class FtTabs extends FtLitElement {
|
|
|
130
131
|
this.placeActiveTabIndicator(this.activeTabIndicator, this.activeTab);
|
|
131
132
|
}
|
|
132
133
|
placeActiveTabIndicator(activeTabIndicator, activeTab) {
|
|
133
|
-
var _a, _b
|
|
134
|
+
var _a, _b;
|
|
135
|
+
var _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
134
136
|
if (activeTabIndicator) {
|
|
135
|
-
const target = (
|
|
137
|
+
const target = (_c = activeTab === null || activeTab === void 0 ? void 0 : activeTab.closest(".ft-tabs--tab-tooltip")) !== null && _c !== void 0 ? _c : activeTab;
|
|
136
138
|
if (target) {
|
|
137
|
-
const targetHeight = (
|
|
138
|
-
const targetWidth = (_e = (
|
|
139
|
+
const targetHeight = (_d = (_a = target === null || target === void 0 ? void 0 : target.getBoundingClientRect()) === null || _a === void 0 ? void 0 : _a.height) !== null && _d !== void 0 ? _d : 0;
|
|
140
|
+
const targetWidth = (_e = (_b = target === null || target === void 0 ? void 0 : target.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width) !== null && _e !== void 0 ? _e : 0;
|
|
139
141
|
if (this.horizontal) {
|
|
140
142
|
activeTabIndicator.style.height = targetHeight + "px";
|
|
141
143
|
activeTabIndicator.style.width = "3px";
|