@fluid-topics/ft-button 1.1.101 → 1.1.103

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.
@@ -10,6 +10,7 @@ export interface FtBaseButtonProperties {
10
10
  iconVariant?: FtIconVariants;
11
11
  trailingIcon?: boolean;
12
12
  loading?: boolean;
13
+ ariaLabel?: string | null;
13
14
  tooltipPosition?: Position;
14
15
  hideTooltip?: boolean;
15
16
  forceTooltip?: boolean;
@@ -25,6 +26,7 @@ export declare class FtBaseButton extends FtBaseButton_base implements FtBaseBut
25
26
  iconVariant?: FtIconVariants;
26
27
  trailingIcon: boolean;
27
28
  loading: boolean;
29
+ ariaLabel: string | null;
28
30
  tooltipPosition: Position;
29
31
  hideTooltip: boolean;
30
32
  forceTooltip: boolean;
@@ -29,6 +29,7 @@ class FtBaseButton extends toFtFormComponent(FtLitElement, "button") {
29
29
  this.icon = undefined;
30
30
  this.trailingIcon = false;
31
31
  this.loading = false;
32
+ this.ariaLabel = null;
32
33
  this.tooltipPosition = "bottom";
33
34
  this.hideTooltip = false;
34
35
  this.forceTooltip = false;
@@ -45,10 +46,11 @@ class FtBaseButton extends toFtFormComponent(FtLitElement, "button") {
45
46
  });
46
47
  }
47
48
  render() {
49
+ var _a;
48
50
  return this.addTooltipIfNeeded(html `
49
51
  <button part="button"
50
52
  class="${classMap(this.buttonClasses)}"
51
- aria-label="${this.getLabel()}"
53
+ aria-label="${(_a = this.ariaLabel) !== null && _a !== void 0 ? _a : this.getLabel()}"
52
54
  ?disabled=${this.isDisabled()}>
53
55
  <ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
54
56
  <ft-typography part="label"
@@ -143,6 +145,9 @@ __decorate([
143
145
  __decorate([
144
146
  property({ type: Boolean })
145
147
  ], FtBaseButton.prototype, "loading", void 0);
148
+ __decorate([
149
+ property({ attribute: "aria-label" })
150
+ ], FtBaseButton.prototype, "ariaLabel", void 0);
146
151
  __decorate([
147
152
  property()
148
153
  ], FtBaseButton.prototype, "tooltipPosition", void 0);