@fluid-topics/ft-table 2.0.23 → 2.0.25

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.
@@ -21,6 +21,7 @@ export declare class FtdsTable<T extends Record<string, any>> extends FtLitEleme
21
21
  static DEFAULT_COMPARATOR: (a: any, b: any) => number;
22
22
  focusRow(rowIndex: number): void;
23
23
  protected render(): TemplateResult<1>;
24
+ protected optWrapWithFtTypography(toRender: TemplateResult | string): TemplateResult;
24
25
  protected renderHeader(column: ColumnConfiguration<T>, index: number): TemplateResult<1>;
25
26
  protected renderHeaderRow(): TemplateResult<1>;
26
27
  protected renderRow(row: T, rowIndex: number): TemplateResult<1>;
@@ -51,6 +51,16 @@ export class FtdsTable extends FtLitElement {
51
51
  </table>
52
52
  `;
53
53
  }
54
+ optWrapWithFtTypography(toRender) {
55
+ if (typeof toRender === "string") {
56
+ return html `
57
+ <ftds-typography variant="${FtdsTypographyVariants.caption1semibold}">
58
+ ${toRender}
59
+ </ftds-typography>
60
+ `;
61
+ }
62
+ return toRender;
63
+ }
54
64
  renderHeader(column, index) {
55
65
  var _a, _b, _c, _d;
56
66
  const headerCellClasses = {
@@ -78,9 +88,7 @@ export class FtdsTable extends FtLitElement {
78
88
  part="${this.columnPart("title-container", index)}">
79
89
  <span class="column-title"
80
90
  part="${this.columnPart("title", index)}">
81
- <ftds-typography variant="${FtdsTypographyVariants.caption1semibold}">
82
- ${column.title}
83
- </ftds-typography>
91
+ ${this.optWrapWithFtTypography(column.title)}
84
92
  </span>
85
93
  ${this.renderColumnSort(column, index)}
86
94
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-table",
3
- "version": "2.0.23",
3
+ "version": "2.0.25",
4
4
  "description": "A dynamic table",
5
5
  "keywords": [
6
6
  "Lit"
@@ -23,11 +23,11 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@fluid-topics/design-system-variables": "3.2.8",
26
- "@fluid-topics/ft-assets": "2.0.23",
27
- "@fluid-topics/ft-button": "2.0.23",
28
- "@fluid-topics/ft-typography": "2.0.23",
29
- "@fluid-topics/ft-wc-utils": "2.0.23",
26
+ "@fluid-topics/ft-assets": "2.0.25",
27
+ "@fluid-topics/ft-button": "2.0.25",
28
+ "@fluid-topics/ft-typography": "2.0.25",
29
+ "@fluid-topics/ft-wc-utils": "2.0.25",
30
30
  "lit": "3.1.0"
31
31
  },
32
- "gitHead": "e441ae21f5027730992e39b7dc728ac0f7b17dc0"
32
+ "gitHead": "f7582c9f28ac8fb59807834b4cbdcf09144478cf"
33
33
  }