@fluid-topics/ft-chip 0.3.11 → 0.3.13
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.css.d.ts +22 -0
- package/build/ft-chip.css.js +163 -0
- package/build/ft-chip.d.ts +2 -33
- package/build/ft-chip.js +7 -164
- package/build/ft-chip.light.js +241 -247
- package/build/ft-chip.min.js +244 -244
- package/build/ft-chip.property.d.ts +13 -0
- package/build/ft-chip.property.js +2 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/package.json +6 -6
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const FtChipCssVariables: {
|
|
2
|
+
backgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
3
|
+
color: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
4
|
+
fontSize: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
5
|
+
iconSize: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
6
|
+
rippleColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
7
|
+
horizontalPadding: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
8
|
+
verticalPadding: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
9
|
+
colorOutline: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
10
|
+
opacityDisabled: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
11
|
+
};
|
|
12
|
+
export declare const FtChipHighlightedCssVariables: {
|
|
13
|
+
backgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
14
|
+
color: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
15
|
+
rippleColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
16
|
+
};
|
|
17
|
+
export declare const FtChipDenseCssVariables: {
|
|
18
|
+
horizontalPadding: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
19
|
+
verticalPadding: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
20
|
+
};
|
|
21
|
+
export declare const styles: import("lit").CSSResult[];
|
|
22
|
+
//# sourceMappingURL=ft-chip.css.d.ts.map
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { css, } from "lit";
|
|
2
|
+
import { designSystemVariables, FtCssVariableFactory, noTextSelect, setVariable } from "@fluid-topics/ft-wc-utils";
|
|
3
|
+
import { FtRippleCssVariables } from "@fluid-topics/ft-ripple/build/ft-ripple.css";
|
|
4
|
+
import { FtTypographyBody2CssVariables } from "@fluid-topics/ft-typography/build/ft-typography.css";
|
|
5
|
+
import { FtIconCssVariables } from "@fluid-topics/ft-icon/build/ft-icon.css";
|
|
6
|
+
const chipColor = FtCssVariableFactory.extend("--ft-chip-color", designSystemVariables.colorOnSurface);
|
|
7
|
+
export const FtChipCssVariables = {
|
|
8
|
+
backgroundColor: FtCssVariableFactory.extend("--ft-chip-background-color", designSystemVariables.colorSurface),
|
|
9
|
+
color: chipColor,
|
|
10
|
+
fontSize: FtCssVariableFactory.extend("--ft-chip-font-size", FtTypographyBody2CssVariables.fontSize),
|
|
11
|
+
iconSize: FtCssVariableFactory.create("--ft-chip-icon-size", "SIZE", "18px"),
|
|
12
|
+
rippleColor: FtCssVariableFactory.extend("--ft-chip-ripple-color", chipColor),
|
|
13
|
+
horizontalPadding: FtCssVariableFactory.create("--ft-chip-horizontal-padding", "SIZE", "6px"),
|
|
14
|
+
verticalPadding: FtCssVariableFactory.create("--ft-chip-vertical-padding", "SIZE", "6px"),
|
|
15
|
+
colorOutline: FtCssVariableFactory.external(designSystemVariables.colorOutline, "Design system"),
|
|
16
|
+
opacityDisabled: FtCssVariableFactory.external(designSystemVariables.colorOpacityDisabled, "Design system"),
|
|
17
|
+
};
|
|
18
|
+
const chipHighlightedColor = FtCssVariableFactory.extend("--ft-chip-highlighted-color", FtCssVariableFactory.extend("--ft-chip-color", designSystemVariables.colorOnPrimary));
|
|
19
|
+
export const FtChipHighlightedCssVariables = {
|
|
20
|
+
backgroundColor: FtCssVariableFactory.extend("--ft-chip-highlighted-background-color", FtCssVariableFactory.extend("--ft-chip-background-color", designSystemVariables.colorPrimary)),
|
|
21
|
+
color: chipHighlightedColor,
|
|
22
|
+
rippleColor: FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color", chipHighlightedColor),
|
|
23
|
+
};
|
|
24
|
+
export const FtChipDenseCssVariables = {
|
|
25
|
+
horizontalPadding: FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding", "SIZE", "4px"),
|
|
26
|
+
verticalPadding: FtCssVariableFactory.create("--ft-chip-dense-vertical-padding", "SIZE", "4px"),
|
|
27
|
+
};
|
|
28
|
+
// language=CSS
|
|
29
|
+
export const styles = [
|
|
30
|
+
noTextSelect,
|
|
31
|
+
css `
|
|
32
|
+
:host {
|
|
33
|
+
display: inline-block;
|
|
34
|
+
max-width: 100%;
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ft-chip {
|
|
39
|
+
position: relative;
|
|
40
|
+
display: flex;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
align-items: center;
|
|
43
|
+
width: 100%;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
pointer-events: auto;
|
|
47
|
+
|
|
48
|
+
--ft-chip-internal-font-size: ${FtChipCssVariables.fontSize};
|
|
49
|
+
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
50
|
+
${setVariable(FtIconCssVariables.size, FtChipCssVariables.iconSize)};
|
|
51
|
+
--ft-chip-internal-vertical-padding: ${FtChipCssVariables.verticalPadding};
|
|
52
|
+
--ft-chip-internal-horizontal-padding: ${FtChipCssVariables.horizontalPadding};
|
|
53
|
+
--ft-chip-internal-icon-padding: 3px;
|
|
54
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${FtChipCssVariables.iconSize});
|
|
55
|
+
|
|
56
|
+
border: 1px solid ${FtChipCssVariables.colorOutline};
|
|
57
|
+
color: ${FtChipCssVariables.color};
|
|
58
|
+
${setVariable(FtRippleCssVariables.color, FtChipCssVariables.rippleColor)};
|
|
59
|
+
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
60
|
+
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
61
|
+
background-color: ${FtChipCssVariables.backgroundColor};
|
|
62
|
+
line-height: var(--ft-chip-internal-content-height);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ft-chip > *:not(ft-ripple) {
|
|
66
|
+
position: relative;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.ft-chip--dense {
|
|
70
|
+
--ft-chip-internal-icon-padding: 3px;
|
|
71
|
+
--ft-chip-internal-vertical-padding: ${FtChipDenseCssVariables.verticalPadding};
|
|
72
|
+
--ft-chip-internal-horizontal-padding: ${FtChipDenseCssVariables.horizontalPadding};
|
|
73
|
+
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ft-chip--no-content {
|
|
77
|
+
--ft-chip-internal-horizontal-padding: var(--ft-chip-horizontal-padding, var(--ft-chip-internal-vertical-padding));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.ft-chip--disabled {
|
|
81
|
+
cursor: default;
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
filter: grayscale(1);
|
|
84
|
+
opacity: ${FtChipCssVariables.opacityDisabled};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.ft-chip--highlighted {
|
|
88
|
+
border: none;
|
|
89
|
+
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
90
|
+
background-color: ${FtChipHighlightedCssVariables.backgroundColor};
|
|
91
|
+
${setVariable(FtRippleCssVariables.color, FtChipHighlightedCssVariables.rippleColor)};
|
|
92
|
+
color: ${FtChipHighlightedCssVariables.color};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ft-chip--clickable {
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.ft-chip:focus {
|
|
101
|
+
outline: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.ft-chip--icon-container {
|
|
105
|
+
display: inline-flex;
|
|
106
|
+
position: relative;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
border-radius: 100%;
|
|
109
|
+
justify-content: center;
|
|
110
|
+
align-items: center;
|
|
111
|
+
flex-shrink: 0;
|
|
112
|
+
|
|
113
|
+
padding: var(--ft-chip-internal-icon-padding);
|
|
114
|
+
margin: calc((-1) * var(--ft-chip-internal-icon-padding));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.ft-chip--icon-container > *:not(ft-ripple) {
|
|
118
|
+
position: relative;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.ft-chip--label {
|
|
122
|
+
vertical-align: bottom;
|
|
123
|
+
display: block;
|
|
124
|
+
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
125
|
+
${setVariable(FtTypographyBody2CssVariables.fontSize, "var(--ft-chip-internal-font-size)")};
|
|
126
|
+
${setVariable(FtTypographyBody2CssVariables.lineHeight, "var(--ft-chip-internal-content-height)")};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ft-chip--safari-fix .ft-chip--label {
|
|
130
|
+
margin-right: 0;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.ft-chip:not(.ft-chip--multi-line) .ft-chip--label {
|
|
134
|
+
overflow: hidden;
|
|
135
|
+
white-space: nowrap;
|
|
136
|
+
text-overflow: ellipsis;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.ft-chip--safari-fix:not(.ft-chip--multi-line) .ft-chip--label:after {
|
|
140
|
+
content: "\\0000a0";
|
|
141
|
+
display: inline-block;
|
|
142
|
+
width: 0;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ft-chip--no-content .ft-chip--label {
|
|
146
|
+
display: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.ft-chip--no-content .ft-chip--label + .ft-chip--icon-container {
|
|
150
|
+
width: var(--ft-chip-internal-content-height);
|
|
151
|
+
height: var(--ft-chip-internal-content-height);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.ft-chip--icon-container:focus {
|
|
155
|
+
outline: none;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container {
|
|
159
|
+
order: -1;
|
|
160
|
+
}
|
|
161
|
+
`
|
|
162
|
+
];
|
|
163
|
+
//# sourceMappingURL=ft-chip.css.js.map
|
package/build/ft-chip.d.ts
CHANGED
|
@@ -1,36 +1,5 @@
|
|
|
1
1
|
import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
2
|
-
|
|
3
|
-
highlighted: boolean;
|
|
4
|
-
removable: boolean;
|
|
5
|
-
disabled: boolean;
|
|
6
|
-
clickable: boolean;
|
|
7
|
-
iconClickable: boolean;
|
|
8
|
-
dense: boolean;
|
|
9
|
-
multiLine: boolean;
|
|
10
|
-
label: string;
|
|
11
|
-
icon?: string;
|
|
12
|
-
trailingIcon: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const FtChipCssVariables: {
|
|
15
|
-
backgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
16
|
-
color: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
17
|
-
fontSize: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
18
|
-
iconSize: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
19
|
-
rippleColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
20
|
-
horizontalPadding: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
21
|
-
verticalPadding: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
22
|
-
colorOutline: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
23
|
-
opacityDisabled: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
24
|
-
};
|
|
25
|
-
export declare const FtChipHighlightedCssVariables: {
|
|
26
|
-
backgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
27
|
-
color: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
28
|
-
rippleColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
29
|
-
};
|
|
30
|
-
export declare const FtChipDenseCssVariables: {
|
|
31
|
-
horizontalPadding: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
32
|
-
verticalPadding: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
33
|
-
};
|
|
2
|
+
import { FtChipProperties } from "./ft-chip.property";
|
|
34
3
|
export declare class IconClickEvent extends CustomEvent<void> {
|
|
35
4
|
constructor();
|
|
36
5
|
}
|
|
@@ -47,7 +16,7 @@ export declare class FtChip extends FtLitElement implements FtChipProperties {
|
|
|
47
16
|
icon?: string;
|
|
48
17
|
trailingIcon: boolean;
|
|
49
18
|
private slottedContent?;
|
|
50
|
-
static
|
|
19
|
+
static styles: import("lit").CSSResult[];
|
|
51
20
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
52
21
|
private get interactionsOnChip();
|
|
53
22
|
private get interactionsOnIcon();
|
package/build/ft-chip.js
CHANGED
|
@@ -4,35 +4,14 @@ 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 {
|
|
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 {
|
|
11
|
-
import { FtRipple
|
|
12
|
-
import { FtTypography
|
|
13
|
-
import { FtIcon
|
|
14
|
-
|
|
15
|
-
export const FtChipCssVariables = {
|
|
16
|
-
backgroundColor: FtCssVariableFactory.extend("--ft-chip-background-color", designSystemVariables.colorSurface),
|
|
17
|
-
color: chipColor,
|
|
18
|
-
fontSize: FtCssVariableFactory.extend("--ft-chip-font-size", FtTypographyBody2CssVariables.fontSize),
|
|
19
|
-
iconSize: FtCssVariableFactory.create("--ft-chip-icon-size", "SIZE", "18px"),
|
|
20
|
-
rippleColor: FtCssVariableFactory.extend("--ft-chip-ripple-color", chipColor),
|
|
21
|
-
horizontalPadding: FtCssVariableFactory.create("--ft-chip-horizontal-padding", "SIZE", "6px"),
|
|
22
|
-
verticalPadding: FtCssVariableFactory.create("--ft-chip-vertical-padding", "SIZE", "6px"),
|
|
23
|
-
colorOutline: FtCssVariableFactory.external(designSystemVariables.colorOutline, "Design system"),
|
|
24
|
-
opacityDisabled: FtCssVariableFactory.external(designSystemVariables.colorOpacityDisabled, "Design system"),
|
|
25
|
-
};
|
|
26
|
-
const chipHighlightedColor = FtCssVariableFactory.extend("--ft-chip-highlighted-color", FtCssVariableFactory.extend("--ft-chip-color", designSystemVariables.colorOnPrimary));
|
|
27
|
-
export const FtChipHighlightedCssVariables = {
|
|
28
|
-
backgroundColor: FtCssVariableFactory.extend("--ft-chip-highlighted-background-color", FtCssVariableFactory.extend("--ft-chip-background-color", designSystemVariables.colorPrimary)),
|
|
29
|
-
color: chipHighlightedColor,
|
|
30
|
-
rippleColor: FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color", chipHighlightedColor),
|
|
31
|
-
};
|
|
32
|
-
export const FtChipDenseCssVariables = {
|
|
33
|
-
horizontalPadding: FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding", "SIZE", "4px"),
|
|
34
|
-
verticalPadding: FtCssVariableFactory.create("--ft-chip-dense-vertical-padding", "SIZE", "4px"),
|
|
35
|
-
};
|
|
10
|
+
import { FtLitElement, isSafari } from "@fluid-topics/ft-wc-utils";
|
|
11
|
+
import { FtRipple } from "@fluid-topics/ft-ripple";
|
|
12
|
+
import { FtTypography } from "@fluid-topics/ft-typography";
|
|
13
|
+
import { FtIcon } from "@fluid-topics/ft-icon";
|
|
14
|
+
import { styles } from "./ft-chip.css";
|
|
36
15
|
export class IconClickEvent extends CustomEvent {
|
|
37
16
|
constructor() {
|
|
38
17
|
super("icon-click");
|
|
@@ -52,143 +31,6 @@ export class FtChip extends FtLitElement {
|
|
|
52
31
|
this.icon = undefined;
|
|
53
32
|
this.trailingIcon = false;
|
|
54
33
|
}
|
|
55
|
-
static get styles() {
|
|
56
|
-
//language=css
|
|
57
|
-
return [
|
|
58
|
-
noTextSelect,
|
|
59
|
-
css `
|
|
60
|
-
:host {
|
|
61
|
-
display: inline-block;
|
|
62
|
-
max-width: 100%;
|
|
63
|
-
pointer-events: none;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.ft-chip {
|
|
67
|
-
position: relative;
|
|
68
|
-
display: flex;
|
|
69
|
-
justify-content: center;
|
|
70
|
-
align-items: center;
|
|
71
|
-
width: 100%;
|
|
72
|
-
overflow: hidden;
|
|
73
|
-
box-sizing: border-box;
|
|
74
|
-
pointer-events: auto;
|
|
75
|
-
|
|
76
|
-
--ft-chip-internal-font-size: ${FtChipCssVariables.fontSize};
|
|
77
|
-
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
78
|
-
${setVariable(FtIconCssVariables.size, FtChipCssVariables.iconSize)};
|
|
79
|
-
--ft-chip-internal-vertical-padding: ${FtChipCssVariables.verticalPadding};
|
|
80
|
-
--ft-chip-internal-horizontal-padding: ${FtChipCssVariables.horizontalPadding};
|
|
81
|
-
--ft-chip-internal-icon-padding: 3px;
|
|
82
|
-
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${FtChipCssVariables.iconSize});
|
|
83
|
-
|
|
84
|
-
border: 1px solid ${FtChipCssVariables.colorOutline};
|
|
85
|
-
color: ${FtChipCssVariables.color};
|
|
86
|
-
${setVariable(FtRippleCssVariables.color, FtChipCssVariables.rippleColor)};
|
|
87
|
-
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
88
|
-
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
89
|
-
background-color: ${FtChipCssVariables.backgroundColor};
|
|
90
|
-
line-height: var(--ft-chip-internal-content-height);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.ft-chip > *:not(ft-ripple) {
|
|
94
|
-
position: relative;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.ft-chip--dense {
|
|
98
|
-
--ft-chip-internal-icon-padding: 3px;
|
|
99
|
-
--ft-chip-internal-vertical-padding: ${FtChipDenseCssVariables.verticalPadding};
|
|
100
|
-
--ft-chip-internal-horizontal-padding: ${FtChipDenseCssVariables.horizontalPadding};
|
|
101
|
-
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.ft-chip--no-content {
|
|
105
|
-
--ft-chip-internal-horizontal-padding: var(--ft-chip-horizontal-padding, var(--ft-chip-internal-vertical-padding));
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.ft-chip--disabled {
|
|
109
|
-
cursor: default;
|
|
110
|
-
pointer-events: none;
|
|
111
|
-
filter: grayscale(1);
|
|
112
|
-
opacity: ${FtChipCssVariables.opacityDisabled};
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.ft-chip--highlighted {
|
|
116
|
-
border: none;
|
|
117
|
-
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
118
|
-
background-color: ${FtChipHighlightedCssVariables.backgroundColor};
|
|
119
|
-
${setVariable(FtRippleCssVariables.color, FtChipHighlightedCssVariables.rippleColor)};
|
|
120
|
-
color: ${FtChipHighlightedCssVariables.color};
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.ft-chip--clickable {
|
|
124
|
-
cursor: pointer;
|
|
125
|
-
-webkit-mask-image: radial-gradient(white, black);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.ft-chip:focus {
|
|
129
|
-
outline: none;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.ft-chip--icon-container {
|
|
133
|
-
display: inline-flex;
|
|
134
|
-
position: relative;
|
|
135
|
-
overflow: hidden;
|
|
136
|
-
border-radius: 100%;
|
|
137
|
-
justify-content: center;
|
|
138
|
-
align-items: center;
|
|
139
|
-
flex-shrink: 0;
|
|
140
|
-
|
|
141
|
-
padding: var(--ft-chip-internal-icon-padding);
|
|
142
|
-
margin: calc((-1) * var(--ft-chip-internal-icon-padding));
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.ft-chip--icon-container > *:not(ft-ripple) {
|
|
146
|
-
position: relative;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.ft-chip--label {
|
|
150
|
-
vertical-align: bottom;
|
|
151
|
-
display: block;
|
|
152
|
-
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
153
|
-
${setVariable(FtTypographyBody2CssVariables.fontSize, "var(--ft-chip-internal-font-size)")};
|
|
154
|
-
${setVariable(FtTypographyBody2CssVariables.lineHeight, "var(--ft-chip-internal-content-height)")};
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.ft-chip--safari-fix .ft-chip--label {
|
|
158
|
-
margin-right: 0;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.ft-chip:not(.ft-chip--multi-line) .ft-chip--label {
|
|
162
|
-
overflow: hidden;
|
|
163
|
-
white-space: nowrap;
|
|
164
|
-
text-overflow: ellipsis;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.ft-chip--safari-fix:not(.ft-chip--multi-line) .ft-chip--label:after {
|
|
168
|
-
content: "\\0000a0";
|
|
169
|
-
display: inline-block;
|
|
170
|
-
width: 0;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.ft-chip--no-content .ft-chip--label {
|
|
174
|
-
display: none;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.ft-chip--no-content .ft-chip--label + .ft-chip--icon-container {
|
|
178
|
-
width: var(--ft-chip-internal-content-height);
|
|
179
|
-
height: var(--ft-chip-internal-content-height);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.ft-chip--icon-container:focus {
|
|
183
|
-
outline: none;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container {
|
|
187
|
-
order: -1;
|
|
188
|
-
}
|
|
189
|
-
`
|
|
190
|
-
];
|
|
191
|
-
}
|
|
192
34
|
render() {
|
|
193
35
|
const classes = {
|
|
194
36
|
"ft-chip": true,
|
|
@@ -270,6 +112,7 @@ FtChip.elementDefinitions = {
|
|
|
270
112
|
"ft-typography": FtTypography,
|
|
271
113
|
"ft-icon": FtIcon,
|
|
272
114
|
};
|
|
115
|
+
FtChip.styles = styles;
|
|
273
116
|
__decorate([
|
|
274
117
|
property({ type: Boolean })
|
|
275
118
|
], FtChip.prototype, "highlighted", void 0);
|