@fluid-topics/ft-tabs 1.3.45 → 1.3.47
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-base-tabs.d.ts +2 -1
- package/build/ft-base-tabs.js +7 -6
- package/build/ft-tabs.d.ts +3 -0
- package/build/ft-tabs.js +11 -3
- package/build/ft-tabs.light.js +204 -186
- package/build/ft-tabs.min.js +222 -204
- package/build/ftds-tabs.d.ts +3 -0
- package/build/ftds-tabs.js +9 -1
- package/package.json +7 -7
package/build/ft-base-tabs.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropertyValues, TemplateResult } from "lit";
|
|
2
|
+
import { ClassInfo } from "lit/directives/class-map.js";
|
|
2
3
|
import { ElementDefinitionsMap, FtLitElement, Optional } from "@fluid-topics/ft-wc-utils";
|
|
3
4
|
import { FtTab } from "./ft-tab";
|
|
4
|
-
import { ClassInfo } from "lit/directives/class-map.js";
|
|
5
5
|
export declare enum FtTabsAlignment {
|
|
6
6
|
left = "left",
|
|
7
7
|
right = "right",
|
|
@@ -26,6 +26,7 @@ export declare abstract class FtBaseTabs extends FtLitElement implements FtBaseT
|
|
|
26
26
|
horizontal: boolean;
|
|
27
27
|
activeIndex?: number;
|
|
28
28
|
abstract get tabsClasses(): ClassInfo;
|
|
29
|
+
get typographyVariant(): string;
|
|
29
30
|
protected render(): TemplateResult<1>;
|
|
30
31
|
private updateDebouncer;
|
|
31
32
|
private onTabUpdated;
|
package/build/ft-base-tabs.js
CHANGED
|
@@ -11,7 +11,6 @@ import { classMap } from "lit/directives/class-map.js";
|
|
|
11
11
|
import { Debouncer, FtLitElement, numberProperty, PostResizeEvent, PreResizeEvent } from "@fluid-topics/ft-wc-utils";
|
|
12
12
|
import { FtTab } from "./ft-tab";
|
|
13
13
|
import { FtRipple, FtRippleCssVariables } from "@fluid-topics/ft-ripple";
|
|
14
|
-
import { FtTypography, FtTypographyVariants } from "@fluid-topics/ft-typography";
|
|
15
14
|
import { FtIcon } from "@fluid-topics/ft-icon";
|
|
16
15
|
import { FtTooltip } from "@fluid-topics/ft-tooltip";
|
|
17
16
|
export var FtTabsAlignment;
|
|
@@ -41,6 +40,9 @@ class FtBaseTabs extends FtLitElement {
|
|
|
41
40
|
});
|
|
42
41
|
this.resizeObserver = new ResizeObserver(() => this.placeIndicator());
|
|
43
42
|
}
|
|
43
|
+
get typographyVariant() {
|
|
44
|
+
return "";
|
|
45
|
+
}
|
|
44
46
|
render() {
|
|
45
47
|
var _a, _b;
|
|
46
48
|
const activeTabColor = (_b = this.ftTabs[(_a = this.activeIndex) !== null && _a !== void 0 ? _a : 0]) === null || _b === void 0 ? void 0 : _b.color;
|
|
@@ -73,11 +75,11 @@ class FtBaseTabs extends FtLitElement {
|
|
|
73
75
|
.variant=${tab.iconVariant}>
|
|
74
76
|
${tab.icon}
|
|
75
77
|
</ft-icon>
|
|
76
|
-
<ft-typography class="ft-tabs--tab-label"
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
<ft-or-ftds-typography class="ft-tabs--tab-label"
|
|
79
|
+
part="tab-label${tab.active ? " active-tab-label" : ""}"
|
|
80
|
+
variant="${this.typographyVariant}">
|
|
79
81
|
${tab.label}
|
|
80
|
-
</ft-typography>
|
|
82
|
+
</ft-or-ftds-typography>
|
|
81
83
|
</button>
|
|
82
84
|
`))}
|
|
83
85
|
<div class="ft-tabs--active-tab-indicator"
|
|
@@ -164,7 +166,6 @@ FtBaseTabs.elementDefinitions = {
|
|
|
164
166
|
"ft-tab": FtTab,
|
|
165
167
|
"ft-ripple": FtRipple,
|
|
166
168
|
"ft-tooltip": FtTooltip,
|
|
167
|
-
"ft-typography": FtTypography,
|
|
168
169
|
"ft-icon": FtIcon,
|
|
169
170
|
};
|
|
170
171
|
__decorate([
|
package/build/ft-tabs.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ClassInfo } from "lit/directives/class-map.js";
|
|
2
2
|
import { FtBaseTabs, FtBaseTabsProperties } from "./ft-base-tabs";
|
|
3
|
+
import { ElementDefinitionsMap } from "@fluid-topics/ft-wc-utils";
|
|
3
4
|
import { FtTab } from "./ft-tab";
|
|
4
5
|
import { TemplateResult } from "lit";
|
|
5
6
|
export interface FtTabsProperties extends FtBaseTabsProperties {
|
|
@@ -8,11 +9,13 @@ export interface FtTabsProperties extends FtBaseTabsProperties {
|
|
|
8
9
|
contentBefore: boolean;
|
|
9
10
|
}
|
|
10
11
|
export declare class FtTabs extends FtBaseTabs implements FtTabsProperties {
|
|
12
|
+
static elementDefinitions: ElementDefinitionsMap;
|
|
11
13
|
dense: boolean;
|
|
12
14
|
collapsible: boolean;
|
|
13
15
|
contentBefore: boolean;
|
|
14
16
|
static styles: import("lit").CSSResult[];
|
|
15
17
|
get tabsClasses(): ClassInfo;
|
|
18
|
+
get typographyVariant(): string;
|
|
16
19
|
protected placeActiveTabIndicator(activeTabIndicator?: HTMLDivElement, activeTab?: HTMLButtonElement): void;
|
|
17
20
|
protected toggleTab(index: number): void;
|
|
18
21
|
protected addTooltipIfNecessary(tab: FtTab, button: TemplateResult): TemplateResult;
|
package/build/ft-tabs.js
CHANGED
|
@@ -9,6 +9,7 @@ import { safariEllipsisFix } from "@fluid-topics/ft-wc-utils";
|
|
|
9
9
|
import { styles } from "./ft-tabs.styles";
|
|
10
10
|
import { property } from "lit/decorators.js";
|
|
11
11
|
import { html } from "lit";
|
|
12
|
+
import { FtTypography, FtTypographyVariants } from "@fluid-topics/ft-typography";
|
|
12
13
|
class FtTabs extends FtBaseTabs {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments);
|
|
@@ -23,9 +24,12 @@ class FtTabs extends FtBaseTabs {
|
|
|
23
24
|
"ft-tabs--horizontal": this.horizontal,
|
|
24
25
|
"ft-tabs--reverse": this.contentBefore,
|
|
25
26
|
"ft-tabs--dense": this.dense,
|
|
26
|
-
["ft-tabs--align-" + this.alignTabs]: true
|
|
27
|
+
["ft-tabs--align-" + this.alignTabs]: true,
|
|
27
28
|
};
|
|
28
29
|
}
|
|
30
|
+
get typographyVariant() {
|
|
31
|
+
return FtTypographyVariants.body2;
|
|
32
|
+
}
|
|
29
33
|
placeActiveTabIndicator(activeTabIndicator, activeTab) {
|
|
30
34
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
31
35
|
if (activeTabIndicator) {
|
|
@@ -67,7 +71,7 @@ class FtTabs extends FtBaseTabs {
|
|
|
67
71
|
}
|
|
68
72
|
addTooltipIfNecessary(tab, button) {
|
|
69
73
|
if (tab.label && tab.icon && (this.dense || this.horizontal)) {
|
|
70
|
-
|
|
74
|
+
const tooltipPosition = this.horizontal
|
|
71
75
|
? this.contentBefore ? "left" : "right"
|
|
72
76
|
: this.contentBefore ? "top" : "bottom";
|
|
73
77
|
return html `
|
|
@@ -82,9 +86,13 @@ class FtTabs extends FtBaseTabs {
|
|
|
82
86
|
return button;
|
|
83
87
|
}
|
|
84
88
|
}
|
|
89
|
+
FtTabs.elementDefinitions = {
|
|
90
|
+
...FtBaseTabs.elementDefinitions,
|
|
91
|
+
"ft-or-ftds-typography": FtTypography,
|
|
92
|
+
};
|
|
85
93
|
FtTabs.styles = [
|
|
86
94
|
safariEllipsisFix,
|
|
87
|
-
styles
|
|
95
|
+
styles,
|
|
88
96
|
];
|
|
89
97
|
__decorate([
|
|
90
98
|
property({ type: Boolean })
|