@fluid-topics/ft-button 0.3.70 → 1.0.0-alpha.0

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.
@@ -22,4 +22,3 @@ export declare const FtButtonDenseCssVariables: {
22
22
  iconPadding: import("@fluid-topics/ft-wc-utils").FtCssVariable;
23
23
  };
24
24
  export declare const styles: import("lit").CSSResult[];
25
- //# sourceMappingURL=ft-button.css.d.ts.map
@@ -71,7 +71,6 @@ export const styles = [
71
71
  box-sizing: border-box;
72
72
  border: none;
73
73
  pointer-events: auto;
74
- gap: ${FtButtonCssVariables.iconPadding};
75
74
 
76
75
  --ft-button-internal-line-height: calc(${FtButtonCssVariables.fontSize} + 2px);
77
76
  --ft-button-internal-color: ${FtButtonCssVariables.color};
@@ -134,10 +133,15 @@ export const styles = [
134
133
  white-space: nowrap;
135
134
  text-overflow: ellipsis;
136
135
  display: block;
136
+ margin: 0 ${FtButtonCssVariables.iconPadding};
137
137
  ${setVariable(FtTypographyButtonCssVariables.fontSize, "1em")};
138
138
  ${setVariable(FtTypographyButtonCssVariables.lineHeight, "var(--ft-button-internal-content-height)")};
139
139
  }
140
140
 
141
+ .ft-button--dense .ft-button--label {
142
+ margin: 0 ${FtButtonDenseCssVariables.iconPadding};
143
+ }
144
+
141
145
  .ft-button--label[hidden] {
142
146
  display: none;
143
147
  }
@@ -168,4 +172,3 @@ export const styles = [
168
172
  }
169
173
  `
170
174
  ];
171
- //# sourceMappingURL=ft-button.css.js.map
@@ -14,7 +14,7 @@ export declare class FtButton extends FtLitElement implements FtButtonProperties
14
14
  round: boolean;
15
15
  label: string;
16
16
  icon?: string;
17
- iconVariant: FtIconVariants;
17
+ iconVariant?: FtIconVariants;
18
18
  trailingIcon: boolean;
19
19
  loading: boolean;
20
20
  tooltipPosition: Position;
@@ -35,4 +35,3 @@ export declare class FtButton extends FtLitElement implements FtButtonProperties
35
35
  private onSlotchange;
36
36
  private isDisabled;
37
37
  }
38
- //# sourceMappingURL=ft-button.d.ts.map
@@ -13,9 +13,9 @@ import { FtTypography } from "@fluid-topics/ft-typography";
13
13
  import { FtTooltip } from "@fluid-topics/ft-tooltip";
14
14
  import { FtLoader } from "@fluid-topics/ft-loader";
15
15
  import "@fluid-topics/ft-loader";
16
- import { FtIcon, FtIconVariants } from "@fluid-topics/ft-icon";
16
+ import { FtIcon } from "@fluid-topics/ft-icon";
17
17
  import { styles } from "./ft-button.css";
18
- export class FtButton extends FtLitElement {
18
+ class FtButton extends FtLitElement {
19
19
  constructor() {
20
20
  super(...arguments);
21
21
  this.role = "button";
@@ -26,7 +26,6 @@ export class FtButton extends FtLitElement {
26
26
  this.round = false;
27
27
  this.label = "";
28
28
  this.icon = undefined;
29
- this.iconVariant = FtIconVariants.material;
30
29
  this.trailingIcon = false;
31
30
  this.loading = false;
32
31
  this.tooltipPosition = "bottom";
@@ -87,7 +86,7 @@ export class FtButton extends FtLitElement {
87
86
  else {
88
87
  return this.icon
89
88
  ? html `
90
- <ft-icon part="icon" variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `
89
+ <ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `
91
90
  : nothing;
92
91
  }
93
92
  }
@@ -147,13 +146,13 @@ __decorate([
147
146
  property({ type: Boolean })
148
147
  ], FtButton.prototype, "round", void 0);
149
148
  __decorate([
150
- property({ type: String })
149
+ property()
151
150
  ], FtButton.prototype, "label", void 0);
152
151
  __decorate([
153
- property({ type: String })
152
+ property()
154
153
  ], FtButton.prototype, "icon", void 0);
155
154
  __decorate([
156
- property({ type: String })
155
+ property()
157
156
  ], FtButton.prototype, "iconVariant", void 0);
158
157
  __decorate([
159
158
  property({ type: Boolean })
@@ -162,7 +161,7 @@ __decorate([
162
161
  property({ type: Boolean })
163
162
  ], FtButton.prototype, "loading", void 0);
164
163
  __decorate([
165
- property({ type: String })
164
+ property()
166
165
  ], FtButton.prototype, "tooltipPosition", void 0);
167
166
  __decorate([
168
167
  property({ type: Boolean })
@@ -176,4 +175,4 @@ __decorate([
176
175
  __decorate([
177
176
  query(".ft-button--label slot")
178
177
  ], FtButton.prototype, "slottedContent", void 0);
179
- //# sourceMappingURL=ft-button.js.map
178
+ export { FtButton };