@fluid-topics/ft-chip 1.1.116 → 1.1.117

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,6 +29,7 @@ export declare class FtChip extends FtLitElement implements FtChipProperties {
29
29
  private onIconClick;
30
30
  private getLabel;
31
31
  get textContent(): string;
32
+ private unslotText;
32
33
  private hasTextContent;
33
34
  private onSlotchange;
34
35
  private get internalIcon();
package/build/ft-chip.js CHANGED
@@ -105,8 +105,13 @@ class FtChip extends FtLitElement {
105
105
  return this.label || this.textContent;
106
106
  }
107
107
  get textContent() {
108
- var _a, _b;
109
- return (_b = (_a = this.slottedContent) === null || _a === void 0 ? void 0 : _a.assignedNodes().map(n => n.textContent).join("").trim()) !== null && _b !== void 0 ? _b : "";
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) || "";
110
115
  }
111
116
  hasTextContent() {
112
117
  return this.textContent.length > 0;