@fluid-topics/ft-button 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.
@@ -41,7 +41,6 @@ export declare class FtBaseButton extends FtBaseButton_base implements FtBaseBut
41
41
  focus(): void;
42
42
  private getLabel;
43
43
  get textContent(): string;
44
- private unslotText;
45
44
  protected hasTextContent(): boolean;
46
45
  private onSlotchange;
47
46
  private isDisabled;
@@ -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 { FtLitElement, isSafari, toFtFormComponent } from "@fluid-topics/ft-wc-utils";
7
+ import { FtLitElement, isSafari, toFtFormComponent, unslotText } from "@fluid-topics/ft-wc-utils";
8
8
  import { FtRipple } from "@fluid-topics/ft-ripple";
9
9
  import { FtTooltip } from "@fluid-topics/ft-tooltip";
10
10
  import { FtTypography } from "@fluid-topics/ft-typography";
@@ -96,13 +96,7 @@ class FtBaseButton extends toFtFormComponent(FtLitElement, "button") {
96
96
  return this.label || this.textContent;
97
97
  }
98
98
  get textContent() {
99
- return this.unslotText(this.slottedContent).trim();
100
- }
101
- unslotText(node) {
102
- if (node instanceof HTMLSlotElement) {
103
- return node.assignedNodes().map(n => this.unslotText(n)).join("");
104
- }
105
- return (node === null || node === void 0 ? void 0 : node.textContent) || "";
99
+ return unslotText(this.slottedContent).trim();
106
100
  }
107
101
  hasTextContent() {
108
102
  return this.textContent.length > 0;