@fluid-topics/ft-chip 1.1.118 → 1.1.119

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.
@@ -29,7 +29,6 @@ export declare class FtChip extends FtLitElement implements FtChipProperties {
29
29
  private onIconClick;
30
30
  private getLabel;
31
31
  get textContent(): string;
32
- private unslotText;
33
32
  private hasTextContent;
34
33
  private onSlotchange;
35
34
  private get internalIcon();
package/build/ft-chip.js CHANGED
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { html, } from "lit";
8
8
  import { property, query } from "lit/decorators.js";
9
9
  import { classMap } from "lit/directives/class-map.js";
10
- import { FtLitElement, isSafari } from "@fluid-topics/ft-wc-utils";
10
+ import { FtLitElement, isSafari, unslotText } from "@fluid-topics/ft-wc-utils";
11
11
  import { FtRipple } from "@fluid-topics/ft-ripple";
12
12
  import { FtTypography } from "@fluid-topics/ft-typography";
13
13
  import { FtIcon } from "@fluid-topics/ft-icon";
@@ -105,13 +105,7 @@ class FtChip extends FtLitElement {
105
105
  return this.label || this.textContent;
106
106
  }
107
107
  get textContent() {
108
- return this.unslotText(this.slottedContent).trim();
109
- }
110
- unslotText(node) {
111
- if (node instanceof HTMLSlotElement) {
112
- return node.assignedNodes().map(n => this.unslotText(n)).join("");
113
- }
114
- return (node === null || node === void 0 ? void 0 : node.textContent) || "";
108
+ return unslotText(this.slottedContent).trim();
115
109
  }
116
110
  hasTextContent() {
117
111
  return this.textContent.length > 0;