@rescui/tag 0.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/LICENSE.txt +202 -0
- package/README.md +3 -0
- package/lib/index.css +537 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +5 -0
- package/lib/parts/base-tag.d.ts +34 -0
- package/lib/parts/base-tag.js +72 -0
- package/lib/parts/base-tag.module.pcss.js +13 -0
- package/lib/parts/presets.d.ts +9 -0
- package/lib/parts/presets.js +36 -0
- package/lib/parts/removable-tag.d.ts +14 -0
- package/lib/parts/removable-tag.js +77 -0
- package/lib/parts/removable-tag.module.pcss.js +15 -0
- package/lib/parts/sticky-tag.d.ts +46 -0
- package/lib/parts/sticky-tag.js +116 -0
- package/lib/parts/sticky-tag.module.pcss.js +18 -0
- package/lib/parts/tag.module.pcss.js +7 -0
- package/lib/tag.d.ts +35 -0
- package/lib/tag.js +54 -0
- package/package.json +36 -0
package/lib/index.css
ADDED
|
@@ -0,0 +1,537 @@
|
|
|
1
|
+
._wrapper_vd286z_41{
|
|
2
|
+
position:relative;
|
|
3
|
+
|
|
4
|
+
display:inline-block;
|
|
5
|
+
|
|
6
|
+
white-space:nowrap;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
._wrapper_vd286z_41 > *{
|
|
10
|
+
vertical-align:top;
|
|
11
|
+
}
|
|
12
|
+
._sizeXs_vd286z_53,
|
|
13
|
+
._sizeS_vd286z_54{
|
|
14
|
+
letter-spacing:0.0045em;
|
|
15
|
+
color:rgba(25,25,28,0.7);
|
|
16
|
+
color:var(--rs-typography-color-average, rgba(25,25,28,0.7));
|
|
17
|
+
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
18
|
+
font-family:var(--rs-font-family-ui, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
19
|
+
font-size:13px;
|
|
20
|
+
font-size:var(--rs-text-3-font-size, 13px);
|
|
21
|
+
line-height:20px;
|
|
22
|
+
line-height:var(--rs-text-3-line-height, 20px);
|
|
23
|
+
}
|
|
24
|
+
._rs-reset-letter-spacing_vd286z_1 ._sizeXs_vd286z_53,._rs-reset-letter-spacing_vd286z_1 ._sizeS_vd286z_54{
|
|
25
|
+
letter-spacing:normal;
|
|
26
|
+
}
|
|
27
|
+
._sizeM_vd286z_58{
|
|
28
|
+
letter-spacing:0.0015em;
|
|
29
|
+
color:rgba(25,25,28,0.7);
|
|
30
|
+
color:var(--rs-typography-color-average, rgba(25,25,28,0.7));
|
|
31
|
+
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
32
|
+
font-family:var(--rs-font-family-ui, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
33
|
+
font-size:16px;
|
|
34
|
+
font-size:var(--rs-text-2-font-size, 16px);
|
|
35
|
+
font-weight:400;
|
|
36
|
+
line-height:24px;
|
|
37
|
+
line-height:var(--rs-text-2-line-height, 24px);
|
|
38
|
+
}
|
|
39
|
+
._rs-reset-letter-spacing_vd286z_1 ._sizeM_vd286z_58{
|
|
40
|
+
letter-spacing:normal;
|
|
41
|
+
}
|
|
42
|
+
._sizeL_vd286z_62{
|
|
43
|
+
color:rgba(25,25,28,0.7);
|
|
44
|
+
color:var(--rs-typography-color-average, rgba(25,25,28,0.7));
|
|
45
|
+
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
46
|
+
font-family:var(--rs-font-family-ui, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
47
|
+
font-size:19px;
|
|
48
|
+
font-size:var(--rs-text-1-font-size, 19px);
|
|
49
|
+
font-weight:normal;
|
|
50
|
+
line-height:28px;
|
|
51
|
+
line-height:var(--rs-text-1-line-height, 28px);
|
|
52
|
+
}
|
|
53
|
+
._themeLight_vd286z_66._disabled_vd286z_66{
|
|
54
|
+
color:rgba(25,25,28,0.5);
|
|
55
|
+
color:var(--rs-typography-color-pale, rgba(25,25,28,0.5));
|
|
56
|
+
}
|
|
57
|
+
._themeDark_vd286z_70{
|
|
58
|
+
color:rgba(255,255,255,0.7);
|
|
59
|
+
color:var(--rs-typography-color-average, rgba(255,255,255,0.7));
|
|
60
|
+
}
|
|
61
|
+
._themeDark_vd286z_70._disabled_vd286z_66{
|
|
62
|
+
color:rgba(255,255,255,0.5);
|
|
63
|
+
color:var(--rs-typography-color-pale, rgba(255,255,255,0.5));
|
|
64
|
+
}
|
|
65
|
+
._disabled_vd286z_66{
|
|
66
|
+
pointer-events:none;
|
|
67
|
+
}
|
|
68
|
+
._sizeXs_vd286z_53{
|
|
69
|
+
padding-left:8px;
|
|
70
|
+
|
|
71
|
+
border-radius:4px;
|
|
72
|
+
}
|
|
73
|
+
._sizeS_vd286z_54{
|
|
74
|
+
padding-left:8px;
|
|
75
|
+
|
|
76
|
+
border-radius:4px;
|
|
77
|
+
}
|
|
78
|
+
._sizeM_vd286z_58{
|
|
79
|
+
padding-left:12px;
|
|
80
|
+
|
|
81
|
+
border-radius:6px;
|
|
82
|
+
}
|
|
83
|
+
._sizeL_vd286z_62{
|
|
84
|
+
padding-left:16px;
|
|
85
|
+
|
|
86
|
+
border-radius:8px;
|
|
87
|
+
}
|
|
88
|
+
._themeLight_vd286z_66{
|
|
89
|
+
background-color:rgba(25,25,28,0.1);
|
|
90
|
+
}
|
|
91
|
+
._themeDark_vd286z_70{
|
|
92
|
+
background-color:rgba(255,255,255,0.1);
|
|
93
|
+
}
|
|
94
|
+
._main_vd286z_111{
|
|
95
|
+
display:-webkit-inline-box;
|
|
96
|
+
display:-ms-inline-flexbox;
|
|
97
|
+
display:inline-flex;
|
|
98
|
+
-webkit-box-pack:center;
|
|
99
|
+
-ms-flex-pack:center;
|
|
100
|
+
justify-content:center;
|
|
101
|
+
-webkit-box-align:center;
|
|
102
|
+
-ms-flex-align:center;
|
|
103
|
+
align-items:center;
|
|
104
|
+
|
|
105
|
+
white-space:nowrap;
|
|
106
|
+
|
|
107
|
+
background:transparent;
|
|
108
|
+
}
|
|
109
|
+
._sizeXs_vd286z_53 ._main_vd286z_111{
|
|
110
|
+
padding-top:2px;
|
|
111
|
+
padding-right:2px;
|
|
112
|
+
padding-bottom:2px;
|
|
113
|
+
}
|
|
114
|
+
._sizeS_vd286z_54 ._main_vd286z_111{
|
|
115
|
+
padding-top:4px;
|
|
116
|
+
padding-right:2px;
|
|
117
|
+
padding-bottom:4px;
|
|
118
|
+
}
|
|
119
|
+
._sizeM_vd286z_58 ._main_vd286z_111{
|
|
120
|
+
padding-top:6px;
|
|
121
|
+
padding-right:2px;
|
|
122
|
+
padding-bottom:6px;
|
|
123
|
+
}
|
|
124
|
+
._sizeL_vd286z_62 ._main_vd286z_111{
|
|
125
|
+
padding-top:8px;
|
|
126
|
+
padding-right:4px;
|
|
127
|
+
padding-bottom:8px;
|
|
128
|
+
}
|
|
129
|
+
._close_vd286z_142{
|
|
130
|
+
top:0;
|
|
131
|
+
right:0;
|
|
132
|
+
bottom:0;
|
|
133
|
+
|
|
134
|
+
display:-webkit-inline-box;
|
|
135
|
+
|
|
136
|
+
display:-ms-inline-flexbox;
|
|
137
|
+
|
|
138
|
+
display:inline-flex;
|
|
139
|
+
overflow:visible;
|
|
140
|
+
-webkit-box-pack:center;
|
|
141
|
+
-ms-flex-pack:center;
|
|
142
|
+
justify-content:center;
|
|
143
|
+
-webkit-box-align:center;
|
|
144
|
+
-ms-flex-align:center;
|
|
145
|
+
align-items:center;
|
|
146
|
+
|
|
147
|
+
width:auto;
|
|
148
|
+
padding:0;
|
|
149
|
+
|
|
150
|
+
border:none;
|
|
151
|
+
|
|
152
|
+
cursor:pointer;
|
|
153
|
+
|
|
154
|
+
color:inherit;
|
|
155
|
+
background:transparent;
|
|
156
|
+
|
|
157
|
+
font:inherit;
|
|
158
|
+
line-height:normal;
|
|
159
|
+
-webkit-font-smoothing:inherit;
|
|
160
|
+
-moz-osx-font-smoothing:inherit;
|
|
161
|
+
}
|
|
162
|
+
._close_vd286z_142::-moz-focus-inner{
|
|
163
|
+
padding:0;
|
|
164
|
+
|
|
165
|
+
border:0;
|
|
166
|
+
}
|
|
167
|
+
._close_vd286z_142:active,
|
|
168
|
+
._close_vd286z_142:hover,
|
|
169
|
+
._close_vd286z_142:focus{
|
|
170
|
+
outline:none;
|
|
171
|
+
|
|
172
|
+
text-decoration:none;
|
|
173
|
+
}
|
|
174
|
+
._sizeXs_vd286z_53 ._close_vd286z_142{
|
|
175
|
+
width:28px;
|
|
176
|
+
height:24px;
|
|
177
|
+
|
|
178
|
+
border-radius:4px;
|
|
179
|
+
}
|
|
180
|
+
._sizeS_vd286z_54 ._close_vd286z_142{
|
|
181
|
+
width:28px;
|
|
182
|
+
height:28px;
|
|
183
|
+
|
|
184
|
+
border-radius:4px;
|
|
185
|
+
}
|
|
186
|
+
._sizeM_vd286z_58 ._close_vd286z_142{
|
|
187
|
+
width:36px;
|
|
188
|
+
height:36px;
|
|
189
|
+
|
|
190
|
+
border-radius:6px;
|
|
191
|
+
}
|
|
192
|
+
._sizeL_vd286z_62 ._close_vd286z_142{
|
|
193
|
+
width:44px;
|
|
194
|
+
height:44px;
|
|
195
|
+
|
|
196
|
+
border-radius:8px;
|
|
197
|
+
}
|
|
198
|
+
._disabled_vd286z_66 ._close_vd286z_142{
|
|
199
|
+
pointer-events:none;
|
|
200
|
+
}
|
|
201
|
+
._themeLight_vd286z_66 ._close_vd286z_142:hover{
|
|
202
|
+
color:#19191C;
|
|
203
|
+
background-color:rgba(25,25,28,0.1);
|
|
204
|
+
}
|
|
205
|
+
._themeDark_vd286z_70 ._close_vd286z_142:hover{
|
|
206
|
+
color:#FFFFFF;
|
|
207
|
+
background-color:rgba(255,255,255,0.1);
|
|
208
|
+
}
|
|
209
|
+
._themeLight_vd286z_66 ._close_vd286z_142:active{
|
|
210
|
+
color:#19191C;
|
|
211
|
+
background-color:rgba(25,25,28,0.2);
|
|
212
|
+
}
|
|
213
|
+
._themeDark_vd286z_70 ._close_vd286z_142:active{
|
|
214
|
+
color:#FFFFFF;
|
|
215
|
+
background-color:rgba(255,255,255,0.2);
|
|
216
|
+
}
|
|
217
|
+
._themeLight_vd286z_66 ._close_vd286z_142:focus[data-focus-method='key']{
|
|
218
|
+
-webkit-box-shadow:inset 0 0 0 4px #4597ff;
|
|
219
|
+
-webkit-box-shadow:inset 0 0 0 4px var(--rs-color-primary-dim-light-theme, #4597ff);
|
|
220
|
+
box-shadow:inset 0 0 0 4px #4597ff;
|
|
221
|
+
box-shadow:inset 0 0 0 4px var(--rs-color-primary-dim-light-theme, #4597ff);
|
|
222
|
+
}
|
|
223
|
+
._themeDark_vd286z_70 ._close_vd286z_142:focus[data-focus-method='key']{
|
|
224
|
+
-webkit-box-shadow:inset 0 0 0 4px #428ad2;
|
|
225
|
+
-webkit-box-shadow:inset 0 0 0 4px var(--rs-color-primary-dim-dark-theme, #428ad2);
|
|
226
|
+
box-shadow:inset 0 0 0 4px #428ad2;
|
|
227
|
+
box-shadow:inset 0 0 0 4px var(--rs-color-primary-dim-dark-theme, #428ad2);
|
|
228
|
+
}
|
|
229
|
+
._icon_vd286z_242{
|
|
230
|
+
|
|
231
|
+
margin-right:8px;
|
|
232
|
+
|
|
233
|
+
vertical-align:top;
|
|
234
|
+
fill:currentColor;
|
|
235
|
+
}
|
|
236
|
+
._sizeXs_vd286z_53 ._icon_vd286z_242{
|
|
237
|
+
width:20px;
|
|
238
|
+
height:20px;
|
|
239
|
+
margin-top:2px;
|
|
240
|
+
margin-bottom:2px;
|
|
241
|
+
}
|
|
242
|
+
._sizeS_vd286z_54 ._icon_vd286z_242{
|
|
243
|
+
width:20px;
|
|
244
|
+
height:20px;
|
|
245
|
+
margin-top:4px;
|
|
246
|
+
margin-bottom:4px;
|
|
247
|
+
}
|
|
248
|
+
._sizeM_vd286z_58 ._icon_vd286z_242{
|
|
249
|
+
width:24px;
|
|
250
|
+
height:24px;
|
|
251
|
+
margin-top:6px;
|
|
252
|
+
margin-bottom:6px;
|
|
253
|
+
}
|
|
254
|
+
._sizeL_vd286z_62 ._icon_vd286z_242{
|
|
255
|
+
width:28px;
|
|
256
|
+
height:28px;
|
|
257
|
+
margin-top:8px;
|
|
258
|
+
margin-bottom:8px;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
._main_1dgx41h_25{
|
|
262
|
+
letter-spacing:0.0015em;
|
|
263
|
+
color:rgba(25,25,28,0.7);
|
|
264
|
+
color:var(--rs-typography-color-average, rgba(25,25,28,0.7));
|
|
265
|
+
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
266
|
+
font-family:var(--rs-font-family-ui, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
267
|
+
font-size:16px;
|
|
268
|
+
font-size:var(--rs-text-2-font-size, 16px);
|
|
269
|
+
font-weight:400;
|
|
270
|
+
line-height:24px;
|
|
271
|
+
line-height:var(--rs-text-2-line-height, 24px);
|
|
272
|
+
}
|
|
273
|
+
._rs-reset-letter-spacing_1dgx41h_1 ._main_1dgx41h_25{
|
|
274
|
+
letter-spacing:normal;
|
|
275
|
+
}
|
|
276
|
+
._main_1dgx41h_25 {
|
|
277
|
+
|
|
278
|
+
position:relative;
|
|
279
|
+
|
|
280
|
+
display:-webkit-inline-box;
|
|
281
|
+
|
|
282
|
+
display:-ms-inline-flexbox;
|
|
283
|
+
|
|
284
|
+
display:inline-flex;
|
|
285
|
+
-webkit-box-pack:center;
|
|
286
|
+
-ms-flex-pack:center;
|
|
287
|
+
justify-content:center;
|
|
288
|
+
-webkit-box-align:center;
|
|
289
|
+
-ms-flex-align:center;
|
|
290
|
+
align-items:center;
|
|
291
|
+
|
|
292
|
+
-webkit-box-sizing:border-box;
|
|
293
|
+
|
|
294
|
+
box-sizing:border-box;
|
|
295
|
+
|
|
296
|
+
border:1px solid transparent;
|
|
297
|
+
outline:none;
|
|
298
|
+
|
|
299
|
+
text-align:center;
|
|
300
|
+
white-space:nowrap;
|
|
301
|
+
text-decoration:none;
|
|
302
|
+
|
|
303
|
+
background:transparent;
|
|
304
|
+
}
|
|
305
|
+
._alignIconLeft_1dgx41h_46{
|
|
306
|
+
-webkit-box-orient:horizontal;
|
|
307
|
+
-webkit-box-direction:normal;
|
|
308
|
+
-ms-flex-direction:row;
|
|
309
|
+
flex-direction:row;
|
|
310
|
+
}
|
|
311
|
+
._alignIconRight_1dgx41h_50{
|
|
312
|
+
-webkit-box-orient:horizontal;
|
|
313
|
+
-webkit-box-direction:reverse;
|
|
314
|
+
-ms-flex-direction:row-reverse;
|
|
315
|
+
flex-direction:row-reverse;
|
|
316
|
+
}
|
|
317
|
+
._sizeXs_1dgx41h_54{
|
|
318
|
+
letter-spacing:0.0045em;
|
|
319
|
+
color:rgba(25,25,28,0.7);
|
|
320
|
+
color:var(--rs-typography-color-average, rgba(25,25,28,0.7));
|
|
321
|
+
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
322
|
+
font-family:var(--rs-font-family-ui, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
323
|
+
font-size:13px;
|
|
324
|
+
font-size:var(--rs-text-3-font-size, 13px);
|
|
325
|
+
line-height:20px;
|
|
326
|
+
line-height:var(--rs-text-3-line-height, 20px);
|
|
327
|
+
}
|
|
328
|
+
._rs-reset-letter-spacing_1dgx41h_1 ._sizeXs_1dgx41h_54{
|
|
329
|
+
letter-spacing:normal;
|
|
330
|
+
}
|
|
331
|
+
._sizeXs_1dgx41h_54 {
|
|
332
|
+
|
|
333
|
+
padding:1px
|
|
334
|
+
7px;
|
|
335
|
+
}
|
|
336
|
+
._sizeS_1dgx41h_61{
|
|
337
|
+
letter-spacing:0.0045em;
|
|
338
|
+
color:rgba(25,25,28,0.7);
|
|
339
|
+
color:var(--rs-typography-color-average, rgba(25,25,28,0.7));
|
|
340
|
+
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
341
|
+
font-family:var(--rs-font-family-ui, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
342
|
+
font-size:13px;
|
|
343
|
+
font-size:var(--rs-text-3-font-size, 13px);
|
|
344
|
+
line-height:20px;
|
|
345
|
+
line-height:var(--rs-text-3-line-height, 20px);
|
|
346
|
+
}
|
|
347
|
+
._rs-reset-letter-spacing_1dgx41h_1 ._sizeS_1dgx41h_61{
|
|
348
|
+
letter-spacing:normal;
|
|
349
|
+
}
|
|
350
|
+
._sizeS_1dgx41h_61 {
|
|
351
|
+
|
|
352
|
+
padding:3px
|
|
353
|
+
7px;
|
|
354
|
+
}
|
|
355
|
+
._sizeM_1dgx41h_68{
|
|
356
|
+
letter-spacing:0.0015em;
|
|
357
|
+
color:rgba(25,25,28,0.7);
|
|
358
|
+
color:var(--rs-typography-color-average, rgba(25,25,28,0.7));
|
|
359
|
+
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
360
|
+
font-family:var(--rs-font-family-ui, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
361
|
+
font-size:16px;
|
|
362
|
+
font-size:var(--rs-text-2-font-size, 16px);
|
|
363
|
+
font-weight:400;
|
|
364
|
+
line-height:24px;
|
|
365
|
+
line-height:var(--rs-text-2-line-height, 24px);
|
|
366
|
+
}
|
|
367
|
+
._rs-reset-letter-spacing_1dgx41h_1 ._sizeM_1dgx41h_68{
|
|
368
|
+
letter-spacing:normal;
|
|
369
|
+
}
|
|
370
|
+
._sizeM_1dgx41h_68 {
|
|
371
|
+
|
|
372
|
+
padding:5px
|
|
373
|
+
11px;
|
|
374
|
+
}
|
|
375
|
+
._sizeL_1dgx41h_75{
|
|
376
|
+
color:rgba(25,25,28,0.7);
|
|
377
|
+
color:var(--rs-typography-color-average, rgba(25,25,28,0.7));
|
|
378
|
+
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
379
|
+
font-family:var(--rs-font-family-ui, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
380
|
+
font-size:19px;
|
|
381
|
+
font-size:var(--rs-text-1-font-size, 19px);
|
|
382
|
+
font-weight:normal;
|
|
383
|
+
line-height:28px;
|
|
384
|
+
line-height:var(--rs-text-1-line-height, 28px);
|
|
385
|
+
|
|
386
|
+
padding:7px
|
|
387
|
+
15px;
|
|
388
|
+
}
|
|
389
|
+
._icon_1dgx41h_82{
|
|
390
|
+
fill:currentColor;
|
|
391
|
+
}
|
|
392
|
+
._sizeXs_1dgx41h_54 ._icon_1dgx41h_82{
|
|
393
|
+
width:20px;
|
|
394
|
+
height:20px;
|
|
395
|
+
}
|
|
396
|
+
._sizeS_1dgx41h_61 ._icon_1dgx41h_82{
|
|
397
|
+
width:20px;
|
|
398
|
+
height:20px;
|
|
399
|
+
}
|
|
400
|
+
._sizeM_1dgx41h_68 ._icon_1dgx41h_82{
|
|
401
|
+
width:24px;
|
|
402
|
+
height:24px;
|
|
403
|
+
}
|
|
404
|
+
._sizeL_1dgx41h_75 ._icon_1dgx41h_82{
|
|
405
|
+
width:28px;
|
|
406
|
+
height:28px;
|
|
407
|
+
}
|
|
408
|
+
._alignIconLeft_1dgx41h_46 ._icon_1dgx41h_82{
|
|
409
|
+
margin-right:8px;
|
|
410
|
+
margin-left:0;
|
|
411
|
+
}
|
|
412
|
+
._alignIconRight_1dgx41h_50 ._icon_1dgx41h_82{
|
|
413
|
+
margin-right:0;
|
|
414
|
+
margin-left:8px;
|
|
415
|
+
}
|
|
416
|
+
._uppercase_1dgx41h_116{
|
|
417
|
+
text-transform:uppercase;
|
|
418
|
+
|
|
419
|
+
font-weight:530;
|
|
420
|
+
|
|
421
|
+
font-weight:var(--rs-font-weight-semi-bold, 530);
|
|
422
|
+
}
|
|
423
|
+
._uppercase_1dgx41h_116._sizeS_1dgx41h_61{
|
|
424
|
+
padding-right:9px;
|
|
425
|
+
padding-left:9px;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
._wrapper_17tnjix_10{
|
|
429
|
+
position:relative;
|
|
430
|
+
}
|
|
431
|
+
._tag_17tnjix_14{
|
|
432
|
+
position:absolute;
|
|
433
|
+
}
|
|
434
|
+
._alignTop_17tnjix_20._sizeXs_17tnjix_21{
|
|
435
|
+
border-radius:4px 4px 0 0;
|
|
436
|
+
}
|
|
437
|
+
._alignTop_17tnjix_20._sizeS_17tnjix_24{
|
|
438
|
+
border-radius:4px 4px 0 0;
|
|
439
|
+
}
|
|
440
|
+
._alignTop_17tnjix_20._sizeM_17tnjix_27{
|
|
441
|
+
border-radius:6px 6px 0 0;
|
|
442
|
+
}
|
|
443
|
+
._alignTop_17tnjix_20._sizeL_17tnjix_30{
|
|
444
|
+
border-radius:8px 8px 0 0;
|
|
445
|
+
}
|
|
446
|
+
._alignMiddle_17tnjix_35._sizeXs_17tnjix_21{
|
|
447
|
+
border-radius:4px;
|
|
448
|
+
}
|
|
449
|
+
._alignMiddle_17tnjix_35._sizeS_17tnjix_24{
|
|
450
|
+
border-radius:4px;
|
|
451
|
+
}
|
|
452
|
+
._alignMiddle_17tnjix_35._sizeM_17tnjix_27{
|
|
453
|
+
border-radius:6px;
|
|
454
|
+
}
|
|
455
|
+
._alignMiddle_17tnjix_35._sizeL_17tnjix_30{
|
|
456
|
+
border-radius:8px;
|
|
457
|
+
}
|
|
458
|
+
._top_17tnjix_52._start_17tnjix_52._offset16_17tnjix_53{
|
|
459
|
+
left:16px;
|
|
460
|
+
}
|
|
461
|
+
._top_17tnjix_52._start_17tnjix_52._offset24_17tnjix_56{
|
|
462
|
+
left:24px;
|
|
463
|
+
}
|
|
464
|
+
._top_17tnjix_52._start_17tnjix_52._offset32_17tnjix_59{
|
|
465
|
+
left:32px;
|
|
466
|
+
}
|
|
467
|
+
._top_17tnjix_52._end_17tnjix_64._offset16_17tnjix_53{
|
|
468
|
+
right:16px;
|
|
469
|
+
}
|
|
470
|
+
._top_17tnjix_52._end_17tnjix_64._offset24_17tnjix_56{
|
|
471
|
+
right:24px;
|
|
472
|
+
}
|
|
473
|
+
._top_17tnjix_52._end_17tnjix_64._offset32_17tnjix_59{
|
|
474
|
+
right:32px;
|
|
475
|
+
}
|
|
476
|
+
._top_17tnjix_52._alignTop_17tnjix_20{
|
|
477
|
+
-webkit-transform:translate(0, -100%);
|
|
478
|
+
transform:translate(0, -100%);
|
|
479
|
+
}
|
|
480
|
+
._top_17tnjix_52._alignMiddle_17tnjix_35{
|
|
481
|
+
-webkit-transform:translate(0, -50%);
|
|
482
|
+
transform:translate(0, -50%);
|
|
483
|
+
}
|
|
484
|
+
._left_17tnjix_86{
|
|
485
|
+
right:100%;
|
|
486
|
+
|
|
487
|
+
-webkit-transform-origin:100% 0;
|
|
488
|
+
|
|
489
|
+
transform-origin:100% 0;
|
|
490
|
+
}
|
|
491
|
+
._left_17tnjix_86._start_17tnjix_52._offset16_17tnjix_53{
|
|
492
|
+
top:16px;
|
|
493
|
+
}
|
|
494
|
+
._left_17tnjix_86._start_17tnjix_52._offset24_17tnjix_56{
|
|
495
|
+
top:24px;
|
|
496
|
+
}
|
|
497
|
+
._left_17tnjix_86._start_17tnjix_52._offset32_17tnjix_59{
|
|
498
|
+
top:32px;
|
|
499
|
+
}
|
|
500
|
+
._left_17tnjix_86._end_17tnjix_64._offset16_17tnjix_53{
|
|
501
|
+
top:calc(100% - 16px);
|
|
502
|
+
}
|
|
503
|
+
._left_17tnjix_86._end_17tnjix_64._offset24_17tnjix_56{
|
|
504
|
+
top:calc(100% - 24px);
|
|
505
|
+
}
|
|
506
|
+
._left_17tnjix_86._end_17tnjix_64._offset32_17tnjix_59{
|
|
507
|
+
top:calc(100% - 32px);
|
|
508
|
+
}
|
|
509
|
+
._left_17tnjix_86._start_17tnjix_52._alignTop_17tnjix_20{
|
|
510
|
+
-webkit-transform:rotate(270deg) translate(0, -100%);
|
|
511
|
+
transform:rotate(270deg) translate(0, -100%);
|
|
512
|
+
}
|
|
513
|
+
._left_17tnjix_86._end_17tnjix_64._alignTop_17tnjix_20{
|
|
514
|
+
-webkit-transform:rotate(270deg) translate(100%, -100%);
|
|
515
|
+
transform:rotate(270deg) translate(100%, -100%);
|
|
516
|
+
}
|
|
517
|
+
._left_17tnjix_86._start_17tnjix_52._alignMiddle_17tnjix_35{
|
|
518
|
+
-webkit-transform:rotate(270deg) translate(0, -50%);
|
|
519
|
+
transform:rotate(270deg) translate(0, -50%);
|
|
520
|
+
}
|
|
521
|
+
._left_17tnjix_86._end_17tnjix_64._alignMiddle_17tnjix_35{
|
|
522
|
+
-webkit-transform:rotate(270deg) translate(100%, -50%);
|
|
523
|
+
transform:rotate(270deg) translate(100%, -50%);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
._sizeXs_o9nqsp_9{
|
|
527
|
+
border-radius:4px;
|
|
528
|
+
}
|
|
529
|
+
._sizeS_o9nqsp_13{
|
|
530
|
+
border-radius:4px;
|
|
531
|
+
}
|
|
532
|
+
._sizeM_o9nqsp_17{
|
|
533
|
+
border-radius:6px;
|
|
534
|
+
}
|
|
535
|
+
._sizeL_o9nqsp_21{
|
|
536
|
+
border-radius:8px;
|
|
537
|
+
}
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type BaseTagSize = 'l' | 'm' | 's' | 'xs';
|
|
3
|
+
export declare type BaseTagIconPosition = 'left' | 'right';
|
|
4
|
+
export declare type BaseTagProps = {
|
|
5
|
+
/** Additional class-name */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Child element */
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/** badge size */
|
|
10
|
+
size?: BaseTagSize;
|
|
11
|
+
/** Should the content be uppercase */
|
|
12
|
+
isUppercase?: boolean;
|
|
13
|
+
/** Text color */
|
|
14
|
+
color: string;
|
|
15
|
+
/**
|
|
16
|
+
* Background color.
|
|
17
|
+
* @default transparent
|
|
18
|
+
* */
|
|
19
|
+
backgroundColor?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Border color.
|
|
22
|
+
* @default transparent
|
|
23
|
+
* */
|
|
24
|
+
borderColor?: string;
|
|
25
|
+
} & ({
|
|
26
|
+
/** Additional icon */
|
|
27
|
+
icon: React.ReactNode;
|
|
28
|
+
/** Additional icon position */
|
|
29
|
+
iconPosition?: BaseTagIconPosition;
|
|
30
|
+
} | {
|
|
31
|
+
icon?: never;
|
|
32
|
+
iconPosition?: never;
|
|
33
|
+
});
|
|
34
|
+
export declare const BaseTag: React.ForwardRefExoticComponent<BaseTagProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
|
2
|
+
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
3
|
+
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
4
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
5
|
+
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
|
6
|
+
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
7
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
8
|
+
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
|
9
|
+
var _excluded = ["className", "children", "size", "icon", "iconPosition", "isUppercase", "color", "backgroundColor", "borderColor"];
|
|
10
|
+
|
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); if (enumerableOnly) { symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
+
|
|
13
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors) { Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
14
|
+
|
|
15
|
+
import React, { cloneElement } from 'react';
|
|
16
|
+
import cn from 'classnames';
|
|
17
|
+
import PropTypes from 'prop-types';
|
|
18
|
+
import styles from './base-tag.module.pcss.js';
|
|
19
|
+
var SIZE_STYLES = {
|
|
20
|
+
xs: styles.sizeXs,
|
|
21
|
+
s: styles.sizeS,
|
|
22
|
+
m: styles.sizeM,
|
|
23
|
+
l: styles.sizeL
|
|
24
|
+
};
|
|
25
|
+
var ICON_POSITION_STYLES = {
|
|
26
|
+
left: styles.alignIconLeft,
|
|
27
|
+
right: styles.alignIconRight
|
|
28
|
+
};
|
|
29
|
+
var BaseTag = /*#__PURE__*/React.forwardRef( // eslint-disable-next-line complexity
|
|
30
|
+
function (_ref, ref) {
|
|
31
|
+
var className = _ref.className,
|
|
32
|
+
children = _ref.children,
|
|
33
|
+
_ref$size = _ref.size,
|
|
34
|
+
size = _ref$size === void 0 ? 'xs' : _ref$size,
|
|
35
|
+
icon = _ref.icon,
|
|
36
|
+
_ref$iconPosition = _ref.iconPosition,
|
|
37
|
+
iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition,
|
|
38
|
+
isUppercase = _ref.isUppercase,
|
|
39
|
+
color = _ref.color,
|
|
40
|
+
backgroundColor = _ref.backgroundColor,
|
|
41
|
+
borderColor = _ref.borderColor,
|
|
42
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
43
|
+
|
|
44
|
+
var withIcon = /*#__PURE__*/React.isValidElement(icon);
|
|
45
|
+
var iconSlot = withIcon && /*#__PURE__*/cloneElement(icon, {
|
|
46
|
+
className: cn(icon.props.className, styles.icon)
|
|
47
|
+
});
|
|
48
|
+
return /*#__PURE__*/React.createElement("span", _objectSpread(_objectSpread({
|
|
49
|
+
"data-test": 'tag'
|
|
50
|
+
}, restProps), {}, {
|
|
51
|
+
ref: ref,
|
|
52
|
+
className: cn(styles.main, SIZE_STYLES[size], ICON_POSITION_STYLES[iconPosition], withIcon && styles.withIcon, isUppercase && styles.uppercase, className),
|
|
53
|
+
style: {
|
|
54
|
+
color: color,
|
|
55
|
+
backgroundColor: backgroundColor,
|
|
56
|
+
borderColor: borderColor
|
|
57
|
+
}
|
|
58
|
+
}), iconSlot, children);
|
|
59
|
+
});
|
|
60
|
+
BaseTag.displayName = 'BaseTag';
|
|
61
|
+
BaseTag.propTypes = {
|
|
62
|
+
className: PropTypes.string,
|
|
63
|
+
children: PropTypes.node,
|
|
64
|
+
icon: PropTypes.node,
|
|
65
|
+
iconPosition: PropTypes.oneOf(['left', 'right']),
|
|
66
|
+
isUppercase: PropTypes.bool,
|
|
67
|
+
size: PropTypes.oneOf(['l', 'm', 's', 'xs']),
|
|
68
|
+
color: PropTypes.string.isRequired,
|
|
69
|
+
backgroundColor: PropTypes.string,
|
|
70
|
+
borderColor: PropTypes.string
|
|
71
|
+
};
|
|
72
|
+
export { BaseTag };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var styles = {
|
|
2
|
+
"main": "_main_1dgx41h_25",
|
|
3
|
+
"rs-reset-letter-spacing": "_rs-reset-letter-spacing_1dgx41h_1",
|
|
4
|
+
"alignIconLeft": "_alignIconLeft_1dgx41h_46",
|
|
5
|
+
"alignIconRight": "_alignIconRight_1dgx41h_50",
|
|
6
|
+
"sizeXs": "_sizeXs_1dgx41h_54",
|
|
7
|
+
"sizeS": "_sizeS_1dgx41h_61",
|
|
8
|
+
"sizeM": "_sizeM_1dgx41h_68",
|
|
9
|
+
"sizeL": "_sizeL_1dgx41h_75",
|
|
10
|
+
"icon": "_icon_1dgx41h_82",
|
|
11
|
+
"uppercase": "_uppercase_1dgx41h_116"
|
|
12
|
+
};
|
|
13
|
+
export default styles;
|