@fluid-topics/ft-button 0.1.15 → 0.1.18
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-button.d.ts +2 -2
- package/build/ft-button.inline-styles.js +613 -0
- package/build/ft-button.js +8 -9
- package/build/ft-button.light.js +249 -307
- package/build/ft-button.min.js +282 -330
- package/build/index.d.ts +2 -0
- package/build/index.js +5 -0
- package/build/inline-styles.d.ts +2 -0
- package/build/inline-styles.js +4 -0
- package/package.json +9 -9
package/build/ft-button.js
CHANGED
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { css, html, nothing, } from "lit";
|
|
8
8
|
import { property, query } from "lit/decorators.js";
|
|
9
9
|
import { classMap } from "lit/directives/class-map.js";
|
|
10
|
-
import {
|
|
10
|
+
import { designSystemVariables, FtCssVariable, FtLitElement, isSafari, noTextSelect, setVariable } from "@fluid-topics/ft-wc-utils";
|
|
11
11
|
import { FtRipple, FtRippleCssVariables } from "@fluid-topics/ft-ripple";
|
|
12
12
|
import { FtTypography, FtTypographyButtonCssVariables } from "@fluid-topics/ft-typography";
|
|
13
13
|
import { Icon } from "@material/mwc-icon";
|
|
@@ -33,7 +33,7 @@ export const FtButtonPrimaryCssVariables = {
|
|
|
33
33
|
export const FtButtonDenseCssVariables = {
|
|
34
34
|
borderRadius: FtCssVariable.extend("--ft-button-dense-border-radius", FtCssVariable.extend("--ft-button-border-radius", designSystemVariables.borderRadiusM)),
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
export class FtButton extends FtLitElement {
|
|
37
37
|
constructor() {
|
|
38
38
|
super(...arguments);
|
|
39
39
|
this.primary = false;
|
|
@@ -54,7 +54,7 @@ let FtButton = class FtButton extends FtLitElement {
|
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
static get styles() {
|
|
58
58
|
//language=css
|
|
59
59
|
return [
|
|
60
60
|
noTextSelect,
|
|
@@ -62,6 +62,7 @@ let FtButton = class FtButton extends FtLitElement {
|
|
|
62
62
|
:host {
|
|
63
63
|
display: inline-block;
|
|
64
64
|
max-width: 100%;
|
|
65
|
+
pointer-events: none;
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
button {
|
|
@@ -94,6 +95,7 @@ let FtButton = class FtButton extends FtLitElement {
|
|
|
94
95
|
overflow: hidden;
|
|
95
96
|
box-sizing: border-box;
|
|
96
97
|
border: none;
|
|
98
|
+
pointer-events: auto;
|
|
97
99
|
|
|
98
100
|
--ft-button-internal-font-size: ${FtButtonCssVariables.fontSize};
|
|
99
101
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
@@ -133,6 +135,7 @@ let FtButton = class FtButton extends FtLitElement {
|
|
|
133
135
|
.ft-button.ft-button--primary {
|
|
134
136
|
background-color: ${FtButtonPrimaryCssVariables.backgroundColor};
|
|
135
137
|
--ft-button-internal-color: ${FtButtonPrimaryCssVariables.color};
|
|
138
|
+
${setVariable(FtRippleCssVariables.color, FtButtonPrimaryCssVariables.rippleColor)};
|
|
136
139
|
}
|
|
137
140
|
|
|
138
141
|
.ft-button.ft-button--outlined {
|
|
@@ -190,7 +193,7 @@ let FtButton = class FtButton extends FtLitElement {
|
|
|
190
193
|
`
|
|
191
194
|
];
|
|
192
195
|
}
|
|
193
|
-
|
|
196
|
+
render() {
|
|
194
197
|
const classes = {
|
|
195
198
|
"ft-button": true,
|
|
196
199
|
"ft-button--primary": this.primary,
|
|
@@ -264,7 +267,7 @@ let FtButton = class FtButton extends FtLitElement {
|
|
|
264
267
|
isDisabled() {
|
|
265
268
|
return this.disabled || this.loading;
|
|
266
269
|
}
|
|
267
|
-
}
|
|
270
|
+
}
|
|
268
271
|
FtButton.elementDefinitions = {
|
|
269
272
|
"ft-ripple": FtRipple,
|
|
270
273
|
"ft-tooltip": FtTooltip,
|
|
@@ -308,8 +311,4 @@ __decorate([
|
|
|
308
311
|
__decorate([
|
|
309
312
|
query(".ft-button--label slot")
|
|
310
313
|
], FtButton.prototype, "slottedContent", void 0);
|
|
311
|
-
FtButton = __decorate([
|
|
312
|
-
customElement("ft-button")
|
|
313
|
-
], FtButton);
|
|
314
|
-
export { FtButton };
|
|
315
314
|
//# sourceMappingURL=ft-button.js.map
|