@fluid-topics/ft-tabs 0.3.71 → 1.0.0-alpha.0
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-tab.css.d.ts +0 -1
- package/build/ft-tab.css.js +0 -1
- package/build/ft-tab.d.ts +1 -2
- package/build/ft-tab.js +2 -4
- package/build/ft-tab.properties.d.ts +0 -1
- package/build/ft-tab.properties.js +0 -1
- package/build/ft-tabs.css.d.ts +0 -1
- package/build/ft-tabs.css.js +0 -1
- package/build/ft-tabs.d.ts +0 -1
- package/build/ft-tabs.js +7 -5
- package/build/ft-tabs.light.js +124 -124
- package/build/ft-tabs.min.js +97 -107
- package/build/ft-tabs.properties.d.ts +0 -1
- package/build/ft-tabs.properties.js +0 -1
- package/build/index.d.ts +0 -1
- package/build/index.js +0 -1
- package/package.json +8 -8
package/build/ft-tab.css.d.ts
CHANGED
package/build/ft-tab.css.js
CHANGED
package/build/ft-tab.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare class FtTab extends FtLitElement implements FtTabProperties {
|
|
|
6
6
|
static elementDefinitions: ElementDefinitionsMap;
|
|
7
7
|
label: string;
|
|
8
8
|
icon: string;
|
|
9
|
-
iconVariant
|
|
9
|
+
iconVariant?: FtIconVariants;
|
|
10
10
|
active: boolean;
|
|
11
11
|
disabled: boolean;
|
|
12
12
|
private readonly uniqueId;
|
|
@@ -17,4 +17,3 @@ export declare class FtTab extends FtLitElement implements FtTabProperties {
|
|
|
17
17
|
protected render(): unknown;
|
|
18
18
|
protected updated(props: PropertyValues): void;
|
|
19
19
|
}
|
|
20
|
-
//# sourceMappingURL=ft-tab.d.ts.map
|
package/build/ft-tab.js
CHANGED
|
@@ -7,13 +7,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
8
8
|
import { html, unsafeCSS } from "lit";
|
|
9
9
|
import { property } from "lit/decorators.js";
|
|
10
|
-
|
|
11
|
-
export class FtTab extends FtLitElement {
|
|
10
|
+
class FtTab extends FtLitElement {
|
|
12
11
|
constructor() {
|
|
13
12
|
super(...arguments);
|
|
14
13
|
this.label = "";
|
|
15
14
|
this.icon = "";
|
|
16
|
-
this.iconVariant = FtIconVariants.material;
|
|
17
15
|
this.active = false;
|
|
18
16
|
this.disabled = false;
|
|
19
17
|
this.uniqueId = ("" + Math.floor(Math.random() * 100000)).padStart(5, "0");
|
|
@@ -65,4 +63,4 @@ __decorate([
|
|
|
65
63
|
__decorate([
|
|
66
64
|
property({ reflect: true, attribute: "aria-labelledby" })
|
|
67
65
|
], FtTab.prototype, "ariaLabelledBy", void 0);
|
|
68
|
-
|
|
66
|
+
export { FtTab };
|
package/build/ft-tabs.css.d.ts
CHANGED
package/build/ft-tabs.css.js
CHANGED
package/build/ft-tabs.d.ts
CHANGED
package/build/ft-tabs.js
CHANGED
|
@@ -21,7 +21,7 @@ export class IndexChangeEvent extends CustomEvent {
|
|
|
21
21
|
super("index-change", { detail: index });
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
class FtTabs extends FtLitElement {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
27
|
this.dense = false;
|
|
@@ -30,7 +30,9 @@ export class FtTabs extends FtLitElement {
|
|
|
30
30
|
this.ftTabs = [];
|
|
31
31
|
this.activeIndex = 0;
|
|
32
32
|
this.updateDebouncer = new Debouncer(20);
|
|
33
|
-
this.scheduleRequestUpdate = () => this.updateDebouncer.run(() =>
|
|
33
|
+
this.scheduleRequestUpdate = () => this.updateDebouncer.run(() => {
|
|
34
|
+
this.requestUpdate();
|
|
35
|
+
});
|
|
34
36
|
this.resizeObserver = new ResizeObserver(() => this.placeIndicator());
|
|
35
37
|
}
|
|
36
38
|
render() {
|
|
@@ -65,7 +67,7 @@ export class FtTabs extends FtLitElement {
|
|
|
65
67
|
style="${(tab.color || tab.rippleColor) ? `--ft-ripple-color: ${tab.color || tab.rippleColor};` : ""}"></ft-ripple>
|
|
66
68
|
<ft-icon class="ft-tabs--tab-icon"
|
|
67
69
|
part="tab-icon${tab.active ? " active-tab-icon" : ""}"
|
|
68
|
-
variant
|
|
70
|
+
.variant=${tab.iconVariant}>
|
|
69
71
|
${tab.icon}
|
|
70
72
|
</ft-icon>
|
|
71
73
|
<ft-typography class="ft-tabs--tab-label"
|
|
@@ -97,7 +99,7 @@ export class FtTabs extends FtLitElement {
|
|
|
97
99
|
}
|
|
98
100
|
updated(props) {
|
|
99
101
|
super.updated(props);
|
|
100
|
-
if (props.has("
|
|
102
|
+
if (props.has("ftTabs") || props.has("activeIndex")) {
|
|
101
103
|
this.updateTabs();
|
|
102
104
|
}
|
|
103
105
|
if (props.has("activeIndex")) {
|
|
@@ -177,4 +179,4 @@ __decorate([
|
|
|
177
179
|
__decorate([
|
|
178
180
|
property({ type: Number, reflect: true })
|
|
179
181
|
], FtTabs.prototype, "activeIndex", void 0);
|
|
180
|
-
|
|
182
|
+
export { FtTabs };
|