@fluid-topics/ft-tabs 0.1.16 → 0.2.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.d.ts CHANGED
@@ -12,12 +12,12 @@ export interface FtTabProperties {
12
12
  }
13
13
  export declare class FtTab extends FtLitElement implements FtTabProperties {
14
14
  static elementDefinitions: ElementDefinitionsMap;
15
- protected getStyles(): import("lit").CSSResult;
15
+ static get styles(): import("lit").CSSResult;
16
16
  label: string;
17
17
  icon: string;
18
18
  position: FtTabPosition;
19
19
  disabled: boolean;
20
- protected getTemplate(): unknown;
20
+ protected render(): unknown;
21
21
  protected updated(props: PropertyValues): void;
22
22
  }
23
23
  //# sourceMappingURL=ft-tab.d.ts.map
package/build/ft-tab.js CHANGED
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { customElement, FtLitElement } from "@fluid-topics/ft-wc-utils";
7
+ import { FtLitElement } from "@fluid-topics/ft-wc-utils";
8
8
  import { css, html, unsafeCSS } from "lit";
9
9
  import { property } from "lit/decorators.js";
10
10
  export var FtTabPosition;
@@ -13,7 +13,7 @@ export var FtTabPosition;
13
13
  FtTabPosition["current"] = "current";
14
14
  FtTabPosition["after"] = "after";
15
15
  })(FtTabPosition || (FtTabPosition = {}));
16
- let FtTab = class FtTab extends FtLitElement {
16
+ export class FtTab extends FtLitElement {
17
17
  constructor() {
18
18
  super(...arguments);
19
19
  this.label = "";
@@ -21,7 +21,17 @@ let FtTab = class FtTab extends FtLitElement {
21
21
  this.position = FtTabPosition.before;
22
22
  this.disabled = false;
23
23
  }
24
- getStyles() {
24
+ static get styles() {
25
+ // language=CSS
26
+ return css `
27
+ :host {
28
+ width: 100%;
29
+ position: absolute;
30
+ transition: left 250ms cubic-bezier(0.4, 0, 0.2, 1);
31
+ }
32
+ `;
33
+ }
34
+ render() {
25
35
  let left;
26
36
  switch (this.position) {
27
37
  case FtTabPosition.before:
@@ -34,18 +44,12 @@ let FtTab = class FtTab extends FtLitElement {
34
44
  left = "100%";
35
45
  break;
36
46
  }
37
- // language=CSS
38
- return css `
39
- :host {
40
- width: 100%;
41
- position: absolute;
42
- transition: left 250ms cubic-bezier(0.4, 0, 0.2, 1);
43
- left: ${unsafeCSS(left)};
44
- }
45
- `;
46
- }
47
- getTemplate() {
48
47
  return html `
48
+ <style>
49
+ :host {
50
+ left: ${unsafeCSS(left)};
51
+ }
52
+ </style>
49
53
  <slot></slot>
50
54
  `;
51
55
  }
@@ -53,7 +57,7 @@ let FtTab = class FtTab extends FtLitElement {
53
57
  super.updated(props);
54
58
  this.dispatchEvent(new Event("updated"));
55
59
  }
56
- };
60
+ }
57
61
  FtTab.elementDefinitions = {};
58
62
  __decorate([
59
63
  property({ type: String })
@@ -67,8 +71,4 @@ __decorate([
67
71
  __decorate([
68
72
  property({ type: Boolean })
69
73
  ], FtTab.prototype, "disabled", void 0);
70
- FtTab = __decorate([
71
- customElement("ft-tab")
72
- ], FtTab);
73
- export { FtTab };
74
74
  //# sourceMappingURL=ft-tab.js.map
@@ -1,6 +1,5 @@
1
1
  import { PropertyValues } from "lit";
2
2
  import { ElementDefinitionsMap, FtCssVariable, FtLitElement } from "@fluid-topics/ft-wc-utils";
3
- export { FtTabProperties, FtTab } from "./ft-tab";
4
3
  export interface FtTabsProperties {
5
4
  dense: boolean;
6
5
  contentBefore: boolean;
@@ -17,7 +16,7 @@ export declare class IndexChangeEvent extends CustomEvent<number> {
17
16
  }
18
17
  export declare class FtTabs extends FtLitElement implements FtTabsProperties {
19
18
  static elementDefinitions: ElementDefinitionsMap;
20
- protected getStyles(): import("lit").CSSResult;
19
+ static styles: import("lit").CSSResult;
21
20
  dense: boolean;
22
21
  contentBefore: boolean;
23
22
  private tabs;
@@ -25,7 +24,7 @@ export declare class FtTabs extends FtLitElement implements FtTabsProperties {
25
24
  private resizable?;
26
25
  private get currentTab();
27
26
  private resizeObserver;
28
- protected getTemplate(): import("lit-html").TemplateResult<1>;
27
+ protected render(): import("lit-html").TemplateResult<1>;
29
28
  private onTabChange;
30
29
  private updateDebouncer;
31
30
  private onContentChange;