@fluid-topics/ftds-chip 2.1.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.
- package/README.md +19 -0
- package/build/define.d.ts +1 -0
- package/build/define.js +3 -0
- package/build/definitions.d.ts +5 -0
- package/build/definitions.js +4 -0
- package/build/ftds-chip.d.ts +27 -0
- package/build/ftds-chip.js +136 -0
- package/build/ftds-chip.light.js +1716 -0
- package/build/ftds-chip.min.js +1832 -0
- package/build/ftds-chip.properties.d.ts +8 -0
- package/build/ftds-chip.properties.js +1 -0
- package/build/ftds-chip.styles.d.ts +1 -0
- package/build/ftds-chip.styles.js +176 -0
- package/build/index.d.ts +4 -0
- package/build/index.js +4 -0
- package/package.json +33 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const designSystemStyle: import("lit").CSSResult[];
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
import { chip } from "@fluid-topics/design-system-variables";
|
|
3
|
+
import { setVariable } from "@fluid-topics/ft-wc-utils";
|
|
4
|
+
import { FtdsIconCssVariables } from "@fluid-topics/ftds-icon";
|
|
5
|
+
import { FtdsButtonCssVariables } from "@fluid-topics/ftds-button";
|
|
6
|
+
// language=CSS
|
|
7
|
+
export const designSystemStyle = [
|
|
8
|
+
css `
|
|
9
|
+
:host {
|
|
10
|
+
display: inline-block;
|
|
11
|
+
max-width: 100%;
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.ftds-chip {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.ftds-chip--icon-container {
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
flex: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ftds-chip ftds-typography {
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
min-width: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ftds-chip:not(.ftds-chip--multi-line) ftds-typography::part(text) {
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
text-overflow: ellipsis;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
.ftds-chip--remove-button {
|
|
42
|
+
position: relative;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* SMALL VARIANT */
|
|
46
|
+
.ftds--size-small {
|
|
47
|
+
min-height: ${chip.smallMinHeight};
|
|
48
|
+
padding: 0 ${chip.smallHorizontalPadding};
|
|
49
|
+
border-radius: ${chip.smallBorderRadius};
|
|
50
|
+
border-width: ${chip.smallBorderWidth};
|
|
51
|
+
border-style: solid;
|
|
52
|
+
${setVariable(FtdsIconCssVariables.size, chip.smallIconSize)}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ftds--size-small.ftds-chip--with-action {
|
|
56
|
+
padding-right: ${chip.smallButtonRightPadding};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ftds--size-small ftds-typography {
|
|
60
|
+
padding: 0 2px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ftds--size-small .ftds-chip--icon-container {
|
|
64
|
+
overflow: visible;
|
|
65
|
+
height: ${chip.smallIconSize};
|
|
66
|
+
margin-right: ${chip.smallButtonRightPadding};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Dirty non-variabilized tweaks to properly center the icon */
|
|
70
|
+
.ftds--size-small .ftds-chip--remove-button {
|
|
71
|
+
overflow: visible;
|
|
72
|
+
top: -4px;
|
|
73
|
+
height: ${chip.smallIconSize};
|
|
74
|
+
transform: scale(.75); /* Little trick to have a (even) bigger icon inside of the button */
|
|
75
|
+
${FtdsButtonCssVariables.smallIconOnlyWidth.set("15px")};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* MEDIUM VARIANT */
|
|
79
|
+
.ftds--size-medium {
|
|
80
|
+
min-height: ${chip.mediumMinHeight};
|
|
81
|
+
padding: 0 ${chip.mediumHorizontalPadding};
|
|
82
|
+
border-radius: ${chip.mediumBorderRadius};
|
|
83
|
+
border-width: ${chip.mediumBorderWidth};
|
|
84
|
+
border-style: solid;
|
|
85
|
+
gap: ${chip.mediumGap};
|
|
86
|
+
${setVariable(FtdsIconCssVariables.size, chip.mediumIconSize)}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.ftds--size-medium.ftds-chip--with-action {
|
|
90
|
+
padding-right: ${chip.mediumButtonRightPadding};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.ftds--size-medium .ftds-chip--remove-button {
|
|
94
|
+
right: -1px; /* Fixing manually the alignement of the button with the border of the chip */
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* LARGE VARIANT */
|
|
98
|
+
.ftds--size-large {
|
|
99
|
+
min-height: ${chip.largeMinHeight};
|
|
100
|
+
padding: 0 ${chip.largeHorizontalPadding};
|
|
101
|
+
border-radius: ${chip.largeBorderRadius};
|
|
102
|
+
border-width: ${chip.largeBorderWidth};
|
|
103
|
+
border-style: solid;
|
|
104
|
+
gap: ${chip.largeGap};
|
|
105
|
+
${setVariable(FtdsIconCssVariables.size, chip.largeIconSize)}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.ftds--size-large.ftds-chip--with-action {
|
|
109
|
+
padding-right: ${chip.largeButtonRightPadding};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ftds--size-large .ftds-chip--remove-button {
|
|
113
|
+
right: -2px; /* Fixing manually the alignement of the button with the border of the chip */
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
/* NEUTRAL COLORS */
|
|
118
|
+
.ftds--family-neutral {
|
|
119
|
+
background-color: ${chip.neutralBackgroundColor};
|
|
120
|
+
border-color: ${chip.neutralBorderColor};
|
|
121
|
+
color: ${chip.neutralColor};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.ftds--family-neutral .ftds-chip--icon-container {
|
|
125
|
+
color: ${chip.neutralIconColor};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
/* INFO COLORS */
|
|
130
|
+
.ftds--family-info {
|
|
131
|
+
background-color: ${chip.infoBackgroundColor};
|
|
132
|
+
border-color: ${chip.infoBorderColor};
|
|
133
|
+
color: ${chip.infoColor};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.ftds--family-info .ftds-chip--icon-container {
|
|
137
|
+
color: ${chip.infoIconColor};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
/* SUCCESS COLORS */
|
|
142
|
+
.ftds--family-success {
|
|
143
|
+
background-color: ${chip.successBackgroundColor};
|
|
144
|
+
border-color: ${chip.successBorderColor};
|
|
145
|
+
color: ${chip.successColor};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.ftds--family-success .ftds-chip--icon-container {
|
|
149
|
+
color: ${chip.successIconColor};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
/* WARNING COLORS */
|
|
154
|
+
.ftds--family-warning {
|
|
155
|
+
background-color: ${chip.warningBackgroundColor};
|
|
156
|
+
border-color: ${chip.warningBorderColor};
|
|
157
|
+
color: ${chip.warningColor};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.ftds--family-warning .ftds-chip--icon-container {
|
|
161
|
+
color: ${chip.warningIconColor};
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
/* ERROR COLORS */
|
|
166
|
+
.ftds--family-error {
|
|
167
|
+
background-color: ${chip.errorBackgroundColor};
|
|
168
|
+
border-color: ${chip.errorBorderColor};
|
|
169
|
+
color: ${chip.errorColor};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.ftds--family-error .ftds-chip--icon-container {
|
|
173
|
+
color: ${chip.errorIconColor};
|
|
174
|
+
}
|
|
175
|
+
`,
|
|
176
|
+
];
|
package/build/index.d.ts
ADDED
package/build/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fluid-topics/ftds-chip",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "The design system chip component",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"Lit"
|
|
7
|
+
],
|
|
8
|
+
"author": "Fluid Topics <devtopics@antidot.net>",
|
|
9
|
+
"license": "ISC",
|
|
10
|
+
"main": "build/index.js",
|
|
11
|
+
"web": "build/ftds-chip.min.js",
|
|
12
|
+
"typings": "build/index",
|
|
13
|
+
"files": [
|
|
14
|
+
"build/**/*.js",
|
|
15
|
+
"build/**/*.ts"
|
|
16
|
+
],
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@fluid-topics/design-system-variables": "3.5.0",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "2.1.0",
|
|
24
|
+
"@fluid-topics/ftds-button": "2.1.0",
|
|
25
|
+
"@fluid-topics/ftds-icon": "2.1.0",
|
|
26
|
+
"@fluid-topics/ftds-typography": "2.1.0",
|
|
27
|
+
"lit": "3.1.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@fluid-topics/ft-wc-test-utils": "2.1.0"
|
|
31
|
+
},
|
|
32
|
+
"gitHead": "4727cf19d04236ad1d2b2cb43ce1c46298834c7e"
|
|
33
|
+
}
|