@fluid-topics/ft-chip 1.1.118 → 1.1.120
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-chip.d.ts +0 -1
- package/build/ft-chip.js +2 -8
- package/build/ft-chip.light.js +63 -63
- package/build/ft-chip.min.js +77 -77
- package/package.json +6 -6
package/build/ft-chip.d.ts
CHANGED
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
|
|
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;
|