@rogieking/figui3 1.0.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/fig.css +1326 -0
- package/fig.js +984 -0
- package/package.json +4 -0
package/fig.css
ADDED
|
@@ -0,0 +1,1326 @@
|
|
|
1
|
+
|
|
2
|
+
:root{
|
|
3
|
+
--font-size: 16px;
|
|
4
|
+
--figma-color-bordertranslucent: rgba(0,0,0,0.1);
|
|
5
|
+
--figma-color-bg-brand: rgba(13, 153, 255, 1);
|
|
6
|
+
--checkerboard: repeating-conic-gradient(rgba(0,0,0,0.1) 0% 25%, rgba(255,255,255,0.1) 0% 50%) 0 0 / .66666rem .66666rem;
|
|
7
|
+
--bg-hue: linear-gradient(90deg, rgba(255, 0, 0, 1), rgba(255, 48, 0, 1), rgba(255, 96, 0, 1), rgba(255, 143, 0, 1), rgba(255, 191, 0, 1), rgba(255, 239, 0, 1), rgba(223, 255, 0, 1), rgba(175, 255, 0, 1), rgba(128, 255, 0, 1), rgba(80, 255, 0, 1), rgba(32, 255, 0, 1), rgba(0, 255, 16, 1), rgba(0, 255, 64, 1), rgba(0, 255, 112, 1), rgba(0, 255, 159, 1), rgba(0, 255, 207, 1), rgba(0, 255, 255, 1), rgba(0, 207, 255, 1), rgba(0, 159, 255, 1), rgba(0, 112, 255, 1), rgba(0, 64, 255, 1), rgba(0, 16, 255, 1), rgba(32, 0, 255, 1), rgba(80, 0, 255, 1), rgba(127, 0, 255, 1), rgba(175, 0, 255, 1), rgba(223, 0, 255, 1), rgba(255, 0, 239, 1), rgba(255, 0, 191, 1), rgba(255, 0, 143, 1), rgba(255, 0, 96, 1), rgba(255, 0, 48, 1));
|
|
8
|
+
--input-transition: all 0.08s ease-out;
|
|
9
|
+
--figma-color-text-disabled: rgba(0, 0, 0, 0.3);
|
|
10
|
+
--figma-color-bg-tertiary: rgba(230, 230, 230, 1);
|
|
11
|
+
--bg-selected: #F5F5F5;
|
|
12
|
+
--figma-color-bg-brand: #0D99FF;
|
|
13
|
+
--figma-color-icon-brand: #007BE5;
|
|
14
|
+
--bg-selected-active: #E5F4FF;
|
|
15
|
+
--figma-color-bg-secondary: #F5F5F5;
|
|
16
|
+
--figma-color-border-selected: #0D99FF;
|
|
17
|
+
--bg-tooltip: #1E1E1E;
|
|
18
|
+
--body-medium-fontSize: 0.6875rem;
|
|
19
|
+
--border-selected: #0D99FF;
|
|
20
|
+
--spacer-1: .25rem;
|
|
21
|
+
--spacer-2: .5rem;
|
|
22
|
+
--spacer-3: 1rem;
|
|
23
|
+
--spacer-4: 1.5rem;
|
|
24
|
+
--spacer-5: 2rem;
|
|
25
|
+
--spacer-6: 2.5rem;
|
|
26
|
+
--color-tooltip: #FFFFFF;
|
|
27
|
+
--radius-medium: 0.3125rem;
|
|
28
|
+
--radius-large: 0.8125rem;
|
|
29
|
+
--body-medium-strong-fontWeight: 550;
|
|
30
|
+
--handle-shadow: 0px 0 0 0.75px rgba(0, 0, 0, 0.1),
|
|
31
|
+
0px 1px 3px 0px rgba(0, 0, 0, 0.05),
|
|
32
|
+
0px 3px 8px 0px rgba(0, 0, 0, 0.05),
|
|
33
|
+
0px 0px 0.5px 0px rgba(0, 0, 0, 0.1);
|
|
34
|
+
|
|
35
|
+
--popover-min-width: 15rem;
|
|
36
|
+
--figma-color-bg-selected: #e5f4ff;
|
|
37
|
+
--figma-color-bg-ghost-hover: rgba(0,0,0,0.05);
|
|
38
|
+
--elevation-500-modal-window: 0px 0px .5px rgba(0, 0, 0, .08), 0px 10px 24px rgba(0, 0, 0, .18), 0px 2px 5px rgba(0, 0, 0, .15);
|
|
39
|
+
|
|
40
|
+
color-scheme: light dark;
|
|
41
|
+
/* Icons */
|
|
42
|
+
--icon-chevron: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.87868 7.12132L8 9.24264L10.1213 7.12132' stroke='rgb(0 0 0 / 50%)' stroke-linecap='round'/%3E%3C/svg%3E%0A");
|
|
43
|
+
|
|
44
|
+
/* Elevations */
|
|
45
|
+
--figma-elevation-100: 0px 0px 0.5px 0px rgba(0, 0, 0, 0.30), 0px 1px 3px 0px rgba(0, 0, 0, 0.15);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (prefers-color-scheme: dark) {
|
|
49
|
+
:root{
|
|
50
|
+
--icon-chevron: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.87868 7.12132L8 9.24264L10.1213 7.12132' stroke='rgb(255 255 255 / 50%)' stroke-linecap='round'/%3E%3C/svg%3E%0A");
|
|
51
|
+
--handle-shadow: 0px 0 0 0.75px rgba(255,255,255, 0.1),
|
|
52
|
+
0px 0px 0.5px 0px rgba(255,255,255, 0.1);
|
|
53
|
+
--figma-color-bg-selected: #3B435E;
|
|
54
|
+
--figma-color-bg-ghost-hover: rgba(255,255,255,0.05);
|
|
55
|
+
--figma-color-bordertranslucent: rgba(255,255,255,0.1);
|
|
56
|
+
--figma-color-border-selected: #0C8CE9;
|
|
57
|
+
--figma-color-icon-brand: #7CC4F8;
|
|
58
|
+
--elevation-500-modal-window: 0px 10px 24px rgba(0, 0, 0, .45), 0px 3px 5px rgba(0, 0, 0, .35), inset 0px .75px 0px rgba(255, 255, 255, .1);
|
|
59
|
+
--figma-elevation-100: 0px 0px 0.5px 0px rgba(0, 0, 0, 0.50), 0px 0.75px 0px 0px rgba(255, 255, 255, 0.10) inset, 0px 1px 3px 0px rgba(0, 0, 0, 0.40);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
html{
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: 100%;
|
|
65
|
+
margin: 0;
|
|
66
|
+
padding: 0;
|
|
67
|
+
color: var(--figma-color-text);
|
|
68
|
+
-webkit-font-smoothing: antialiased;
|
|
69
|
+
-moz-osx-font-smoothing: grayscale;
|
|
70
|
+
font-family: "Inter",-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
|
|
71
|
+
font-size: 16px;
|
|
72
|
+
font-weight: 500;
|
|
73
|
+
background-color: var(--figma-color-bg);
|
|
74
|
+
}
|
|
75
|
+
*,*:before,*:after {
|
|
76
|
+
box-sizing: border-box;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
body{
|
|
80
|
+
font-size: var(--body-medium-fontSize);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* helper classes/defaults */
|
|
84
|
+
::-webkit-scrollbar {
|
|
85
|
+
width: var(--spacer-1); /* Width of the vertical scrollbar */
|
|
86
|
+
height: var(--spacer-1); /* Height of the horizontal scrollbar */
|
|
87
|
+
}
|
|
88
|
+
::-webkit-scrollbar-thumb {
|
|
89
|
+
background-color: var(--figma-color-bg-tertiary);
|
|
90
|
+
border-radius: calc(var(--spacer-1)/2);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
::-webkit-scrollbar-thumb:hover {
|
|
94
|
+
background-color: var(--figma-color-bg-secondary);
|
|
95
|
+
}
|
|
96
|
+
/* For Firefox */
|
|
97
|
+
* {
|
|
98
|
+
scrollbar-width: thin;
|
|
99
|
+
scrollbar-color: var(--figma-color-bg-tertiary) var(--figma-color-bg-secondary);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.subtle{
|
|
103
|
+
color: var(--figma-color-text-tertiary);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Defaults */
|
|
107
|
+
p{
|
|
108
|
+
margin: var(--spacer-2) 0;
|
|
109
|
+
line-height: 1rem;
|
|
110
|
+
color: var(--figma-color-text-secondary);
|
|
111
|
+
}
|
|
112
|
+
label{
|
|
113
|
+
color: var(--figma-color-text-secondary);
|
|
114
|
+
}
|
|
115
|
+
h2{
|
|
116
|
+
font-weight: var(--body-medium-strong-fontWeight);
|
|
117
|
+
margin: var(--spacer-2) 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
button,
|
|
122
|
+
select,
|
|
123
|
+
input,
|
|
124
|
+
fieldset{
|
|
125
|
+
display: inline-flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
margin: 0;
|
|
128
|
+
gap: 0.25rem;
|
|
129
|
+
font: inherit;
|
|
130
|
+
line-height: 1rem;
|
|
131
|
+
}
|
|
132
|
+
textarea,
|
|
133
|
+
input[type=text],
|
|
134
|
+
input[type=number],
|
|
135
|
+
.input{
|
|
136
|
+
background-color: var(--figma-color-bg-secondary);
|
|
137
|
+
border: 0;
|
|
138
|
+
border-radius: var(--radius-medium);
|
|
139
|
+
padding: var(--spacer-1) var(--spacer-2);
|
|
140
|
+
line-height: 1rem !important;
|
|
141
|
+
box-sizing: content-box;
|
|
142
|
+
resize: none;
|
|
143
|
+
min-width: 0;
|
|
144
|
+
font: inherit;
|
|
145
|
+
display: flex;
|
|
146
|
+
color: inherit;
|
|
147
|
+
|
|
148
|
+
&:focus{
|
|
149
|
+
box-shadow: inset 0 0 0 1px var(--border-selected);
|
|
150
|
+
outline: 0;
|
|
151
|
+
}
|
|
152
|
+
&::-webkit-inner-spin-button{
|
|
153
|
+
display: none;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* Segmented control */
|
|
158
|
+
.segmented-control,
|
|
159
|
+
fig-segmented-control{
|
|
160
|
+
background-color: var(--figma-color-bg-secondary);
|
|
161
|
+
border: 0;
|
|
162
|
+
border-radius: var(--radius-medium);
|
|
163
|
+
min-width: 6rem;
|
|
164
|
+
height: 1.5rem;
|
|
165
|
+
padding: 1px;
|
|
166
|
+
display: inline-flex;
|
|
167
|
+
align-items: stretch;
|
|
168
|
+
|
|
169
|
+
&>fig-segment,
|
|
170
|
+
&>label{
|
|
171
|
+
flex: 1;
|
|
172
|
+
display: flex;
|
|
173
|
+
align-items: center;
|
|
174
|
+
justify-content: center;
|
|
175
|
+
position: relative;
|
|
176
|
+
appearance: none;
|
|
177
|
+
padding: 0 var(--spacer-2);
|
|
178
|
+
|
|
179
|
+
& [type=radio]{
|
|
180
|
+
position: absolute;
|
|
181
|
+
inset: 0;
|
|
182
|
+
border-radius: 0;
|
|
183
|
+
opacity: 0;
|
|
184
|
+
z-index:1;
|
|
185
|
+
width: 100%;
|
|
186
|
+
height: 100%;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&:has(:checked){
|
|
190
|
+
background-color: var(--figma-color-bg);
|
|
191
|
+
border-radius: calc(var(--radius-medium) - 1px);
|
|
192
|
+
box-shadow: var(--handle-shadow);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* Textarea */
|
|
198
|
+
textarea{
|
|
199
|
+
min-height: 2rem;
|
|
200
|
+
display: block;
|
|
201
|
+
width: 100%;
|
|
202
|
+
box-sizing: border-box;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* Dropdown */
|
|
206
|
+
select,
|
|
207
|
+
input[list]{
|
|
208
|
+
height: var(--spacer-4);
|
|
209
|
+
padding: 0 var(--spacer-2);
|
|
210
|
+
appearance: none;
|
|
211
|
+
border-radius: var(--radius-medium);
|
|
212
|
+
display: flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
flex: 1 0 0;
|
|
215
|
+
border: 0;
|
|
216
|
+
color: var(--figma-color-text);
|
|
217
|
+
background-color: var(--figma-color-bg);
|
|
218
|
+
box-shadow: inset 0 0 0 1px var(--figma-color-border);
|
|
219
|
+
accent-color: var(--figma-color-bg-brand);
|
|
220
|
+
&:focus{
|
|
221
|
+
box-shadow: inset 0 0 0 1px var(--border-selected);
|
|
222
|
+
outline: 0;
|
|
223
|
+
}
|
|
224
|
+
&::-webkit-calendar-picker-indicator{
|
|
225
|
+
opacity: 0;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
input[list]:hover,
|
|
229
|
+
input[list]:active,
|
|
230
|
+
input[list]:focus,
|
|
231
|
+
select{
|
|
232
|
+
background-image: var(--icon-chevron);
|
|
233
|
+
background-position: calc(100% - 0.25rem) center;
|
|
234
|
+
background-repeat: no-repeat;
|
|
235
|
+
}
|
|
236
|
+
input[list],
|
|
237
|
+
select{
|
|
238
|
+
padding-right: 1.5rem;
|
|
239
|
+
}
|
|
240
|
+
fig-dropdown:has([trigger]){
|
|
241
|
+
& select{
|
|
242
|
+
opacity: 0;
|
|
243
|
+
position: absolute;
|
|
244
|
+
inset: 0;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
fig-dialog>*:not(dialog),
|
|
248
|
+
fig-dropdown>option{
|
|
249
|
+
display: none !important;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* Button */
|
|
253
|
+
button,
|
|
254
|
+
.button,
|
|
255
|
+
fig-button,
|
|
256
|
+
input[type=submit],
|
|
257
|
+
input[type=button]{
|
|
258
|
+
display: flex;
|
|
259
|
+
align-items: center;
|
|
260
|
+
justify-content: center;
|
|
261
|
+
height: var(--spacer-4);
|
|
262
|
+
padding: 0 var(--spacer-2);
|
|
263
|
+
appearance: none;
|
|
264
|
+
background-color: var(--figma-color-bg-brand);
|
|
265
|
+
border: 0;
|
|
266
|
+
color: var(--figma-color-text-onbrand);
|
|
267
|
+
border-radius: var(--radius-medium);
|
|
268
|
+
font-weight: 500;
|
|
269
|
+
&:active{
|
|
270
|
+
background-color: var(--figma-color-bg-brand-pressed);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/* Variant: Ghost */
|
|
274
|
+
&[variant="ghost"],
|
|
275
|
+
&[variant="ghost"]>button{
|
|
276
|
+
box-shadow: none;
|
|
277
|
+
background: none;
|
|
278
|
+
color: var(--figma-color-text);
|
|
279
|
+
|
|
280
|
+
&:hover:not(:active){
|
|
281
|
+
background-color: var(--figma-color-bg-ghost-hover);
|
|
282
|
+
}
|
|
283
|
+
&:active{
|
|
284
|
+
outline: 0;
|
|
285
|
+
background-color: var(--figma-color-bg-selected);
|
|
286
|
+
}
|
|
287
|
+
&[selected=true]{
|
|
288
|
+
background-color: var(--figma-color-bg-selected);
|
|
289
|
+
}
|
|
290
|
+
&:focus{
|
|
291
|
+
outline: 0;
|
|
292
|
+
background-color: transparent;
|
|
293
|
+
box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
&[variant="ghost"][icon][selected=true],
|
|
297
|
+
&[variant="ghost"][icon][selected=true]>button{
|
|
298
|
+
color: var(--figma-color-icon-brand);
|
|
299
|
+
}
|
|
300
|
+
&[variant="ghost"][disabled=true],
|
|
301
|
+
&[variant="ghost"][disabled=true]>button{
|
|
302
|
+
background-color: transparent;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
/* Variant: Secondary */
|
|
307
|
+
&[variant="secondary"],
|
|
308
|
+
&[variant="secondary"]>button{
|
|
309
|
+
box-shadow: inset 0 0 0 1px var(--figma-color-border);
|
|
310
|
+
background: none;
|
|
311
|
+
color: var(--figma-color-text);
|
|
312
|
+
|
|
313
|
+
&:active{
|
|
314
|
+
background-color: var(--figma-color-bg-secondary);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/* Icon only */
|
|
319
|
+
&[icon],
|
|
320
|
+
&[icon]>button{
|
|
321
|
+
width: var(--spacer-4);
|
|
322
|
+
padding: 0;
|
|
323
|
+
|
|
324
|
+
&:hover{
|
|
325
|
+
background-color: var(--figma-color-bg-ghost-hover);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/* Upload */
|
|
330
|
+
&[upload],
|
|
331
|
+
&[upload]>button{
|
|
332
|
+
position: relative;
|
|
333
|
+
& input[type=file]{
|
|
334
|
+
opacity: 0;
|
|
335
|
+
position: absolute;
|
|
336
|
+
inset: 0;
|
|
337
|
+
appearance: none;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/* Disabled */
|
|
342
|
+
&[disabled=true],
|
|
343
|
+
&[disabled=true]>button{
|
|
344
|
+
background-color: var(--figma-color-bg-disabled);
|
|
345
|
+
color: var(--figma-color-text-disabled);
|
|
346
|
+
pointer-events: none;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/* Size */
|
|
350
|
+
&[size="large"],
|
|
351
|
+
&[size="large"]>button{
|
|
352
|
+
height: var(--spacer-5);
|
|
353
|
+
}
|
|
354
|
+
&[size="large"][icon],
|
|
355
|
+
&[size="large"][icon]>button{
|
|
356
|
+
width: var(--spacer-5);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/* Full width */
|
|
360
|
+
&[full]{
|
|
361
|
+
width: 100%;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/* Block button */
|
|
365
|
+
&[inline=false],
|
|
366
|
+
&[inline=false]>button{
|
|
367
|
+
display: flex;
|
|
368
|
+
width: 100%;
|
|
369
|
+
justify-content: left;
|
|
370
|
+
height: auto;
|
|
371
|
+
text-align: left;
|
|
372
|
+
align-items: center;
|
|
373
|
+
padding: var(--spacer-1) var(--spacer-2);
|
|
374
|
+
}
|
|
375
|
+
&[inline=false]{
|
|
376
|
+
padding: 0;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
fig-button>button{
|
|
380
|
+
width: 100%;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
/* Tabs */
|
|
386
|
+
fig-tab,
|
|
387
|
+
.tab{
|
|
388
|
+
display: inline-flex;
|
|
389
|
+
flex-direction: column;
|
|
390
|
+
align-items: center;
|
|
391
|
+
justify-content: center;
|
|
392
|
+
height: 1.5rem;
|
|
393
|
+
padding: 0 var(--spacer-2);
|
|
394
|
+
appearance: none;
|
|
395
|
+
border: 0;
|
|
396
|
+
cursor: default;
|
|
397
|
+
gap: 0 !important;
|
|
398
|
+
user-select: none;
|
|
399
|
+
border-radius: var(--radius-medium);
|
|
400
|
+
color: var(--figma-color-text-secondary);
|
|
401
|
+
position: relative;
|
|
402
|
+
|
|
403
|
+
&[label]{
|
|
404
|
+
&::after{
|
|
405
|
+
content: attr(label);
|
|
406
|
+
color: var(--figma-color-text-secondary);
|
|
407
|
+
content: attr(label);
|
|
408
|
+
height: 0 !important;
|
|
409
|
+
width: auto !important;
|
|
410
|
+
visibility: hidden;
|
|
411
|
+
overflow: hidden;
|
|
412
|
+
user-select: none;
|
|
413
|
+
pointer-events: none;
|
|
414
|
+
font-weight: var(--body-medium-strong-fontWeight);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
&:has(:checked),
|
|
419
|
+
&[selected]{
|
|
420
|
+
background-color: var(--figma-color-bg-secondary);
|
|
421
|
+
font-weight: var(--body-medium-strong-fontWeight);
|
|
422
|
+
color: var(--figma-color-text);
|
|
423
|
+
}
|
|
424
|
+
&:hover{
|
|
425
|
+
background-color: var(--figma-color-bg-secondary);
|
|
426
|
+
}
|
|
427
|
+
& [type=radio]{
|
|
428
|
+
position: absolute;
|
|
429
|
+
inset: 0;
|
|
430
|
+
border-radius: 0;
|
|
431
|
+
opacity: 0;
|
|
432
|
+
z-index:1;
|
|
433
|
+
width: 100%;
|
|
434
|
+
height: 100%;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
fig-tabs,
|
|
438
|
+
.tabs{
|
|
439
|
+
display: flex;
|
|
440
|
+
gap: var(--spacer-2);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/* Avatar */
|
|
444
|
+
.avatar{
|
|
445
|
+
width: 1.5rem;
|
|
446
|
+
display: inline-grid;
|
|
447
|
+
place-items: center;
|
|
448
|
+
height: 1.5rem;
|
|
449
|
+
border-radius: 100%;
|
|
450
|
+
border: 0;
|
|
451
|
+
background: var(--figma-color-bg-brand);
|
|
452
|
+
overflow: hidden;
|
|
453
|
+
color: var(--figma-color-icon-onbrand);
|
|
454
|
+
box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
|
|
455
|
+
&:has(img[src]){
|
|
456
|
+
background: none;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
.avatar img{
|
|
460
|
+
position: absolute;
|
|
461
|
+
background: var(--checkerboard);
|
|
462
|
+
width: 1.5rem;
|
|
463
|
+
height: 1.5rem;
|
|
464
|
+
border-radius: 100%;
|
|
465
|
+
box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
|
|
466
|
+
}
|
|
467
|
+
.avatar::after{
|
|
468
|
+
content: attr(initials);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/* Color input */
|
|
472
|
+
input[type=color]{
|
|
473
|
+
width: 14px;
|
|
474
|
+
height: 14px;
|
|
475
|
+
-webkit-appearance: none;
|
|
476
|
+
appearance: none;
|
|
477
|
+
border: 0;
|
|
478
|
+
padding: 0;
|
|
479
|
+
margin: 0;
|
|
480
|
+
background: none;
|
|
481
|
+
padding: 5px;
|
|
482
|
+
flex-shrink: 0;
|
|
483
|
+
box-sizing: content-box;
|
|
484
|
+
border-radius: var(--radius-medium);
|
|
485
|
+
background-color: var(--figma-color-bg-secondary);
|
|
486
|
+
|
|
487
|
+
&:focus{
|
|
488
|
+
box-shadow: inset 0 0 0 1px var(--border-selected);
|
|
489
|
+
outline: 0;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
input[type=color]::-webkit-color-swatch-wrapper{
|
|
493
|
+
padding: 0;
|
|
494
|
+
border: 0;
|
|
495
|
+
border-radius: 0.125rem;
|
|
496
|
+
background: var(--checkerboard);
|
|
497
|
+
overflow: hidden;
|
|
498
|
+
box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
|
|
499
|
+
}
|
|
500
|
+
input[type=color]::-moz-color-swatch{
|
|
501
|
+
border-radius: 0.125rem;
|
|
502
|
+
padding: 0;
|
|
503
|
+
border: 0;
|
|
504
|
+
mask-image: linear-gradient(to right, black 0%, black 50%,rgba(0,0,0,var(--alpha)) 50%);
|
|
505
|
+
}
|
|
506
|
+
input[type=color]::-webkit-color-swatch{
|
|
507
|
+
padding: 0;
|
|
508
|
+
border: 0;
|
|
509
|
+
mask-image: linear-gradient(to right, black 0%, black 50%,rgba(0,0,0,var(--alpha)) 50%);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/* Combo input */
|
|
513
|
+
.input-combo{
|
|
514
|
+
display: inline-flex;
|
|
515
|
+
flex-wrap: nowrap;
|
|
516
|
+
align-items: center;
|
|
517
|
+
gap: 1px;
|
|
518
|
+
&>*{
|
|
519
|
+
&:first-child,
|
|
520
|
+
&:first-child>*{
|
|
521
|
+
border-top-right-radius: 0;
|
|
522
|
+
border-bottom-right-radius: 0;
|
|
523
|
+
}
|
|
524
|
+
&:last-child,
|
|
525
|
+
&:last-child>*{
|
|
526
|
+
border-top-left-radius: 0;
|
|
527
|
+
border-bottom-left-radius: 0;
|
|
528
|
+
}
|
|
529
|
+
&:not(:last-child):not(:first-child),
|
|
530
|
+
&:not(:last-child):not(:first-child)>*{
|
|
531
|
+
border-radius: 0;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/* Switch */
|
|
537
|
+
input[type=checkbox].switch{
|
|
538
|
+
display: inline-flex;
|
|
539
|
+
margin: 0;
|
|
540
|
+
vertical-align: middle;
|
|
541
|
+
padding: 0;
|
|
542
|
+
width: 2rem;
|
|
543
|
+
height: 1rem;
|
|
544
|
+
left: 0;
|
|
545
|
+
top:0;
|
|
546
|
+
margin: 0;
|
|
547
|
+
background: transparent;
|
|
548
|
+
appearance: none;
|
|
549
|
+
-moz-appearance: none;
|
|
550
|
+
-webkit-appearance:none;
|
|
551
|
+
outline: none;
|
|
552
|
+
border: 0;
|
|
553
|
+
align-items: center;
|
|
554
|
+
justify-content: center;
|
|
555
|
+
border-radius: 0.5rem;
|
|
556
|
+
background-color: var(--figma-color-bg-tertiary);
|
|
557
|
+
transition: var(--input-transition);
|
|
558
|
+
box-sizing: border-box;
|
|
559
|
+
box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
|
|
560
|
+
}
|
|
561
|
+
input[type=checkbox].switch:after{
|
|
562
|
+
content: '';
|
|
563
|
+
background-color: var(--figma-color-icon-onbrand);
|
|
564
|
+
width: calc(1rem - 2px);
|
|
565
|
+
height: calc(1rem - 2px);
|
|
566
|
+
border-radius: 0.5rem;
|
|
567
|
+
margin: 1px;
|
|
568
|
+
transform: translate(calc(-0.5rem - 1px));
|
|
569
|
+
transition: var(--input-transition);
|
|
570
|
+
box-shadow: var(--handle-shadow);
|
|
571
|
+
}
|
|
572
|
+
input[type=checkbox].switch[indeterminate="true"]:after{
|
|
573
|
+
width: 0.5rem;
|
|
574
|
+
height: 0.125rem;
|
|
575
|
+
transform: none;
|
|
576
|
+
}
|
|
577
|
+
input[type=checkbox].switch[indeterminate="true"],
|
|
578
|
+
input[type=checkbox].switch:checked{
|
|
579
|
+
background-color: var(--figma-color-bg-brand);
|
|
580
|
+
}
|
|
581
|
+
input[type=checkbox].switch:checked:after{
|
|
582
|
+
transform: translate(0.5rem);
|
|
583
|
+
}
|
|
584
|
+
input[type=checkbox].switch:disabled{
|
|
585
|
+
background-color: var(--figma-color-bg-tertiary);
|
|
586
|
+
cursor: not-allowed;
|
|
587
|
+
}
|
|
588
|
+
input[type=checkbox].switch:focus{
|
|
589
|
+
outline: 0;
|
|
590
|
+
}
|
|
591
|
+
input[type=checkbox].switch:checked:focus{
|
|
592
|
+
outline: 0;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/* Checkbox */
|
|
596
|
+
input[type=checkbox]:not(.switch){
|
|
597
|
+
appearance: none;
|
|
598
|
+
border-radius: var(--radius-medium);
|
|
599
|
+
width: 1rem;
|
|
600
|
+
height: 1rem;
|
|
601
|
+
box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
|
|
602
|
+
background-color: var(--figma-color-bg-secondary);
|
|
603
|
+
vertical-align: middle;
|
|
604
|
+
|
|
605
|
+
&:hover{
|
|
606
|
+
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.50012 7.5L7.50012 10.5L11.5001 4.5' stroke='white' opacity='0.25' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.125' /%3E%3C/svg%3E%0A");
|
|
607
|
+
}
|
|
608
|
+
&:checked{
|
|
609
|
+
background-color: var(--figma-color-bg-brand);
|
|
610
|
+
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.50012 7.5L7.50012 10.5L11.5001 4.5' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.125' /%3E%3C/svg%3E%0A");
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
.figma-light input[type=checkbox]:not(.switch):hover{
|
|
614
|
+
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.50012 7.5L7.50012 10.5L11.5001 4.5' stroke='black' opacity='0.25' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.125' /%3E%3C/svg%3E%0A");
|
|
615
|
+
}
|
|
616
|
+
label.checkbox:has([type=checkbox]){
|
|
617
|
+
padding-left: 1.5rem;
|
|
618
|
+
& [type=radio]{
|
|
619
|
+
margin-left: -1.5rem;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/* Radio */
|
|
624
|
+
input[type=radio]{
|
|
625
|
+
appearance: none;
|
|
626
|
+
border-radius: 0.5rem;
|
|
627
|
+
width: 1rem;
|
|
628
|
+
height: 1rem;
|
|
629
|
+
box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
|
|
630
|
+
background-color: var(--figma-color-bg-secondary);
|
|
631
|
+
vertical-align: middle;
|
|
632
|
+
margin: 0;
|
|
633
|
+
display: inline-grid;
|
|
634
|
+
place-content: center;
|
|
635
|
+
|
|
636
|
+
&:checked{
|
|
637
|
+
background-color: var(--figma-color-bg-brand);
|
|
638
|
+
|
|
639
|
+
&::after{
|
|
640
|
+
transform: scale(1);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
&:focus{
|
|
644
|
+
box-shadow: inset 0 0 0 1px var(--border-selected);
|
|
645
|
+
outline: 0;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
&::after{
|
|
649
|
+
content:'';
|
|
650
|
+
width: 0.5rem;
|
|
651
|
+
height: 0.5rem;
|
|
652
|
+
border-radius: 0.25rem;
|
|
653
|
+
background-color: var(--figma-color-text-onbrand);
|
|
654
|
+
transform: scale(0);
|
|
655
|
+
transition: var(--input-transition);
|
|
656
|
+
box-shadow:
|
|
657
|
+
0px 0 0 0.75px rgba(0, 0, 0, 0.1),
|
|
658
|
+
0px 1px 3px 0px rgba(0, 0, 0, 0.1),
|
|
659
|
+
0px 3px 8px 0px rgba(0, 0, 0, 0.1),
|
|
660
|
+
0px 0px 0.5px 0px rgba(0, 0, 0, 0.18);
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
label.radio:has([type=radio]){
|
|
664
|
+
padding-left: 1.5rem;
|
|
665
|
+
& [type=radio]{
|
|
666
|
+
margin-left: -1.5rem;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
/* Fieldset */
|
|
671
|
+
fieldset{
|
|
672
|
+
display: flex;
|
|
673
|
+
flex-direction: column;
|
|
674
|
+
gap: 0.25rem;
|
|
675
|
+
border: 0;
|
|
676
|
+
align-items: start;
|
|
677
|
+
padding: var(--spacer-2) 0;
|
|
678
|
+
& > legend{
|
|
679
|
+
margin-top: 0.125rem;
|
|
680
|
+
font-weight: 500;
|
|
681
|
+
font-size: .625rem;
|
|
682
|
+
line-height: 0.875rem;
|
|
683
|
+
color: var(--figma-color-text-secondary);
|
|
684
|
+
}
|
|
685
|
+
& > label {
|
|
686
|
+
display: grid;
|
|
687
|
+
width: 100%;
|
|
688
|
+
grid-template-columns: 4rem 1fr;
|
|
689
|
+
column-gap: var(--spacer-2);
|
|
690
|
+
align-items: center;
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
/* Details */
|
|
695
|
+
details{
|
|
696
|
+
& > summary{
|
|
697
|
+
font-weight: var(--body-medium-strong-fontWeight);
|
|
698
|
+
cursor: default;
|
|
699
|
+
display: flex;
|
|
700
|
+
align-items: center;
|
|
701
|
+
padding: 0 1rem 0 0;
|
|
702
|
+
height: var(--spacer-6);
|
|
703
|
+
user-select: none;
|
|
704
|
+
color: var(--figma-color-text-secondary);
|
|
705
|
+
&::before{
|
|
706
|
+
content: var(--icon-chevron);
|
|
707
|
+
display: inline-flex;
|
|
708
|
+
align-items: start;
|
|
709
|
+
justify-content: center;
|
|
710
|
+
width: 1rem;
|
|
711
|
+
transform: rotate(-90deg);
|
|
712
|
+
transition: transform var(--transition-duration) var(--transition-timing-function);
|
|
713
|
+
}
|
|
714
|
+
&::marker{
|
|
715
|
+
content: "";
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
&>summary:hover,
|
|
719
|
+
&[open]>summary{
|
|
720
|
+
color: inherit;
|
|
721
|
+
&::before{
|
|
722
|
+
opacity: 1;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
&[open]{
|
|
726
|
+
&>summary::before{
|
|
727
|
+
transform: rotate(0deg);
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
.figma-light details>summary:before{
|
|
732
|
+
content: var(--icon-chevron);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
/* Details
|
|
737
|
+
|
|
738
|
+
details summary{
|
|
739
|
+
cursor: pointer;
|
|
740
|
+
user-select: none;
|
|
741
|
+
padding: 0 1rem;
|
|
742
|
+
min-height: 2rem;
|
|
743
|
+
list-style: none;
|
|
744
|
+
pointer-events: none;
|
|
745
|
+
}
|
|
746
|
+
details summary>*{
|
|
747
|
+
pointer-events: all;
|
|
748
|
+
}
|
|
749
|
+
details summary:before{
|
|
750
|
+
content: '▸';
|
|
751
|
+
display: inline-flex;
|
|
752
|
+
align-items: start;
|
|
753
|
+
justify-content: center;
|
|
754
|
+
width: 0.75rem;
|
|
755
|
+
margin-right: -0.75rem;
|
|
756
|
+
transform: translateX(-100%);
|
|
757
|
+
color: inherit;
|
|
758
|
+
visibility: hidden;
|
|
759
|
+
}
|
|
760
|
+
details summary:hover:before{
|
|
761
|
+
visibility: visible;
|
|
762
|
+
}
|
|
763
|
+
details[open] summary:before{
|
|
764
|
+
content: '▾';
|
|
765
|
+
}
|
|
766
|
+
details summary:first-child:last-child:before{
|
|
767
|
+
content: '';
|
|
768
|
+
}
|
|
769
|
+
details summary:first-child:last-child h3{
|
|
770
|
+
pointer-events: none;
|
|
771
|
+
}
|
|
772
|
+
*/
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
@layer slider{
|
|
777
|
+
|
|
778
|
+
.slider{
|
|
779
|
+
--start: 1;
|
|
780
|
+
display: block;
|
|
781
|
+
position: relative;
|
|
782
|
+
padding: 0.25rem 5px !important;
|
|
783
|
+
overflow: hidden;
|
|
784
|
+
margin: 0 -5px !important;
|
|
785
|
+
--slider-percent: calc(var(--slider-complete) * (100% - 5px));
|
|
786
|
+
--color-percent: calc(var(--slider-complete) * (100%));
|
|
787
|
+
|
|
788
|
+
&.gradient{
|
|
789
|
+
padding-top: 2.5rem !important;
|
|
790
|
+
}
|
|
791
|
+
& input[type=color]{
|
|
792
|
+
position: absolute;
|
|
793
|
+
left: var(--color-percent);
|
|
794
|
+
transform: translate(-50%,calc(-100% - 0.5rem));
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/* Chromium */
|
|
799
|
+
.slider input[type=range]{
|
|
800
|
+
height: 1rem;
|
|
801
|
+
appearance: none;
|
|
802
|
+
-webkit-appearance: none;
|
|
803
|
+
border-radius: 0.5rem;
|
|
804
|
+
display: block;
|
|
805
|
+
width: 100%;
|
|
806
|
+
cursor: grab;
|
|
807
|
+
cursor: -webkit-grab;
|
|
808
|
+
background-color: transparent;
|
|
809
|
+
|
|
810
|
+
&:active {
|
|
811
|
+
cursor: grabbing;
|
|
812
|
+
cursor: -webkit-grabbing;
|
|
813
|
+
}
|
|
814
|
+
&:focus{
|
|
815
|
+
outline: none;
|
|
816
|
+
/* outline: 3px solid var(--bg-selected); */
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
&::-webkit-slider-thumb{
|
|
820
|
+
appearance: none;
|
|
821
|
+
-webkit-appearance: none;
|
|
822
|
+
border-radius: 0.5rem;
|
|
823
|
+
height: 1rem;
|
|
824
|
+
width: 1rem;
|
|
825
|
+
aspect-ratio: 1;
|
|
826
|
+
border: none;
|
|
827
|
+
position: relative;
|
|
828
|
+
z-index: 1;
|
|
829
|
+
box-shadow:
|
|
830
|
+
inset 0 0 0 4px var(--figma-color-icon-onbrand),
|
|
831
|
+
inset 0 0 0 5px rgba(0, 0, 0, 0.1),
|
|
832
|
+
0px 0 0 0.75px rgba(0, 0, 0, 0.1),
|
|
833
|
+
0px 1px 3px 0px rgba(0, 0, 0, 0.1),
|
|
834
|
+
0px 3px 8px 0px rgba(0, 0, 0, 0.1),
|
|
835
|
+
0px 0px 0.5px 0px rgba(0, 0, 0, 0.18);
|
|
836
|
+
}
|
|
837
|
+
&:disabled{
|
|
838
|
+
cursor: not-allowed;
|
|
839
|
+
&::-webkit-slider-runnable-track{
|
|
840
|
+
background: linear-gradient(to right, var(--figma-color-bg-secondary) 0%, var(--figma-color-bg-secondary) var(--slider-percent), var(--figma-color-bg) var(--slider-percent));
|
|
841
|
+
}
|
|
842
|
+
&::-webkit-slider-thumb{
|
|
843
|
+
box-shadow: inset 0 0 0 1rem var(--figma-color-bg-disabled);
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
&::-webkit-slider-runnable-track{
|
|
847
|
+
height: 1rem;
|
|
848
|
+
background-color: transparent;
|
|
849
|
+
border-radius: 0.5rem;
|
|
850
|
+
box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
|
|
851
|
+
background: radial-gradient(.55rem .55rem at var(--slider-percent) 50%, var(--figma-color-bg-brand) 0%, var(--figma-color-bg-brand) .55rem,transparent .55rem, transparent 100%),
|
|
852
|
+
linear-gradient(to right, var(--figma-color-bg-brand) 0%, var(--figma-color-bg-brand) var(--slider-percent), var(--figma-color-bg-secondary) var(--slider-percent));
|
|
853
|
+
background-size: 100% 100%, 100% 100%;
|
|
854
|
+
background-position: 75% middle, left middle;
|
|
855
|
+
background-repeat:no-repeat;
|
|
856
|
+
}
|
|
857
|
+
&.hue::-webkit-slider-runnable-track{
|
|
858
|
+
background: var(--bg-hue);
|
|
859
|
+
}
|
|
860
|
+
&.opacity::-webkit-slider-runnable-track{
|
|
861
|
+
background: linear-gradient(to right, transparent, var(--color)),var(--checkerboard);
|
|
862
|
+
}
|
|
863
|
+
&.gradient{
|
|
864
|
+
border-radius: 0.125rem;
|
|
865
|
+
&::-webkit-slider-thumb{
|
|
866
|
+
transform: scale(1.5) translateY(-1.25rem);
|
|
867
|
+
opacity: 0.5;
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
&.gradient::-webkit-slider-runnable-track{
|
|
871
|
+
border-radius: 0.125rem;
|
|
872
|
+
background: var(--bg-hue);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
/* Firefox */
|
|
876
|
+
.slider input[type=range]{
|
|
877
|
+
height: 1rem;
|
|
878
|
+
appearance: none;
|
|
879
|
+
-webkit-appearance: none;
|
|
880
|
+
border-radius: 0.5rem;
|
|
881
|
+
display: block;
|
|
882
|
+
width: 100%;
|
|
883
|
+
cursor: -moz-grab;
|
|
884
|
+
background-color: transparent;
|
|
885
|
+
|
|
886
|
+
&:active {
|
|
887
|
+
cursor: -moz-grabbing;
|
|
888
|
+
}
|
|
889
|
+
&:focus{
|
|
890
|
+
outline: none;
|
|
891
|
+
/* outline: 3px solid var(--bg-selected); */
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
&::-moz-range-thumb{
|
|
895
|
+
appearance: none;
|
|
896
|
+
-webkit-appearance: none;
|
|
897
|
+
border-radius: 0.5rem;
|
|
898
|
+
height: 1rem;
|
|
899
|
+
width: 1rem;
|
|
900
|
+
aspect-ratio: 1;
|
|
901
|
+
border: none;
|
|
902
|
+
position: relative;
|
|
903
|
+
z-index: 1;
|
|
904
|
+
box-shadow:
|
|
905
|
+
inset 0 0 0 4px var(--figma-color-icon-onbrand),
|
|
906
|
+
inset 0 0 0 5px rgba(0, 0, 0, 0.1),
|
|
907
|
+
0px 0 0 0.75px rgba(0, 0, 0, 0.1),
|
|
908
|
+
0px 1px 3px 0px rgba(0, 0, 0, 0.1),
|
|
909
|
+
0px 3px 8px 0px rgba(0, 0, 0, 0.1),
|
|
910
|
+
0px 0px 0.5px 0px rgba(0, 0, 0, 0.18);
|
|
911
|
+
}
|
|
912
|
+
&:disabled{
|
|
913
|
+
cursor: not-allowed;
|
|
914
|
+
&::-moz-range-track{
|
|
915
|
+
background: linear-gradient(to right, var(--figma-color-bg-secondary) 0%, var(--figma-color-bg-secondary) var(--slider-percent), var(--figma-color-bg) var(--slider-percent));
|
|
916
|
+
}
|
|
917
|
+
&::-moz-range-thumb{
|
|
918
|
+
box-shadow: inset 0 0 0 1rem var(--figma-color-bg-disabled);
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
&::-moz-range-track{
|
|
922
|
+
height: 1rem;
|
|
923
|
+
background-color: transparent;
|
|
924
|
+
border-radius: 0.5rem;
|
|
925
|
+
box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
|
|
926
|
+
background: radial-gradient(.55rem .55rem at var(--slider-percent) 50%, var(--figma-color-bg-brand) 0%, var(--figma-color-bg-brand) .55rem,transparent .55rem, transparent 100%),
|
|
927
|
+
linear-gradient(to right, var(--figma-color-bg-brand) 0%, var(--figma-color-bg-brand) var(--slider-percent), var(--figma-color-bg-secondary) var(--slider-percent));
|
|
928
|
+
background-size: 100% 100%, 100% 100%;
|
|
929
|
+
background-position: 75% middle, left middle;
|
|
930
|
+
background-repeat:no-repeat;
|
|
931
|
+
}
|
|
932
|
+
&.hue::-moz-range-track{
|
|
933
|
+
background: var(--bg-hue);
|
|
934
|
+
}
|
|
935
|
+
&.opacity::-moz-range-track{
|
|
936
|
+
background: linear-gradient(to right, transparent, var(--color)),var(--checkerboard);
|
|
937
|
+
}
|
|
938
|
+
&.gradient{
|
|
939
|
+
border-radius: 0.125rem;
|
|
940
|
+
&::-webkit-slider-thumb{
|
|
941
|
+
transform: scale(1.5) translateY(-1.25rem);
|
|
942
|
+
opacity: 0.5;
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
&.gradient::-moz-range-track{
|
|
946
|
+
border-radius: 0.125rem;
|
|
947
|
+
background: var(--bg-hue);
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
@supports (animation-timeline: scroll()) {
|
|
952
|
+
@property --slider-complete {
|
|
953
|
+
initial-value: 0;
|
|
954
|
+
syntax: '<number>';
|
|
955
|
+
inherits: true;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
@keyframes sync {
|
|
959
|
+
to {
|
|
960
|
+
--slider-complete: 1;
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
.slider {
|
|
965
|
+
timeline-scope: --thumb;
|
|
966
|
+
animation: sync both linear reverse;
|
|
967
|
+
animation-timeline: --thumb;
|
|
968
|
+
animation-range: contain;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
.slider [type=range]::-webkit-slider-thumb {
|
|
972
|
+
view-timeline-name: --thumb;
|
|
973
|
+
view-timeline-axis: inline;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
/* Popovers/Dialogs */
|
|
981
|
+
.dialog,
|
|
982
|
+
dialog,
|
|
983
|
+
.popover,
|
|
984
|
+
[popover]{
|
|
985
|
+
padding: 0;
|
|
986
|
+
outline: 0;
|
|
987
|
+
border: 0;
|
|
988
|
+
color: var(--figma-color-text);
|
|
989
|
+
border-radius: var(--radius-large, 0.8125rem);
|
|
990
|
+
background: var(--figma-color-bg);
|
|
991
|
+
min-width: var(--popover-min-width);
|
|
992
|
+
|
|
993
|
+
box-shadow: var(--figma-elevation-100);
|
|
994
|
+
|
|
995
|
+
&:popover-open{
|
|
996
|
+
display: block;
|
|
997
|
+
outline: none !important;
|
|
998
|
+
}
|
|
999
|
+
& header{
|
|
1000
|
+
height: var(--spacer-6);
|
|
1001
|
+
margin: 0;
|
|
1002
|
+
padding: var(--spacer-2);
|
|
1003
|
+
display: flex;
|
|
1004
|
+
align-items: center;
|
|
1005
|
+
font-weight: var(--body-medium-strong-fontWeight);
|
|
1006
|
+
box-shadow: inset 0 -1px 0 0 var(--figma-color-border);
|
|
1007
|
+
& h3{
|
|
1008
|
+
font: inherit;
|
|
1009
|
+
}
|
|
1010
|
+
&>:first-child{
|
|
1011
|
+
padding-left: var(--spacer-2);
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
&[tooltip]{
|
|
1015
|
+
color: var(--color-tooltip);
|
|
1016
|
+
background-color: var(--bg-tooltip);
|
|
1017
|
+
padding: var(--spacer-1) var(--spacer-2);
|
|
1018
|
+
line-height: 1rem !important;
|
|
1019
|
+
box-sizing: content-box;
|
|
1020
|
+
min-width: var(--popover-min-width);
|
|
1021
|
+
max-width: var(--popover-min-width);
|
|
1022
|
+
/*top: calc(anchor(top) - 1ch - (var(--spacer-1) * 2 + 1rem));*/
|
|
1023
|
+
top: anchor(top);
|
|
1024
|
+
left: anchor(center);
|
|
1025
|
+
/*transform: translate(-50%,-100%);*/
|
|
1026
|
+
|
|
1027
|
+
|
|
1028
|
+
white-space: nowrap;
|
|
1029
|
+
overflow: hidden;
|
|
1030
|
+
text-overflow: ellipsis;
|
|
1031
|
+
|
|
1032
|
+
|
|
1033
|
+
border-radius: var(--radius-medium, 0.3125rem);
|
|
1034
|
+
box-shadow: 0px 0px 0.5px 0px rgba(0, 0, 0, 0.15),
|
|
1035
|
+
0px 5px 12px 0px rgba(0, 0, 0, 0.13),
|
|
1036
|
+
0px 1px 3px 0px rgba(0, 0, 0, 0.10);
|
|
1037
|
+
|
|
1038
|
+
@supports (-webkit-line-clamp: 2) {
|
|
1039
|
+
white-space: initial;
|
|
1040
|
+
-webkit-line-clamp: 2;
|
|
1041
|
+
-webkit-box-orient: vertical;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
&:popover-open{
|
|
1045
|
+
display: inline-block;
|
|
1046
|
+
@supports (-webkit-line-clamp: 2) {
|
|
1047
|
+
display: -webkit-box;
|
|
1048
|
+
}
|
|
1049
|
+
min-width: 0;
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
dialog{
|
|
1055
|
+
position: fixed;
|
|
1056
|
+
top: 50%;
|
|
1057
|
+
left: 50%;
|
|
1058
|
+
margin: 0;
|
|
1059
|
+
transform: translate(-50%,-50%);
|
|
1060
|
+
&[position*="bottom"]{
|
|
1061
|
+
bottom: 0.5rem;
|
|
1062
|
+
top: auto;
|
|
1063
|
+
transform: translate(-50%,0);
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
/* Tooltip */
|
|
1068
|
+
.fig-tooltip{
|
|
1069
|
+
inset: unset;
|
|
1070
|
+
color: var(--color-tooltip);
|
|
1071
|
+
background-color: var(--bg-tooltip);
|
|
1072
|
+
padding: var(--spacer-1) var(--spacer-2);
|
|
1073
|
+
line-height: 1rem !important;
|
|
1074
|
+
display: inline-flex;
|
|
1075
|
+
font-weight: inherit;
|
|
1076
|
+
border-radius: var(--radius-medium, 0.3125rem);
|
|
1077
|
+
|
|
1078
|
+
font: inherit;
|
|
1079
|
+
font-weight: normal;
|
|
1080
|
+
|
|
1081
|
+
&:after{
|
|
1082
|
+
content: '';
|
|
1083
|
+
background-color: var(--bg-tooltip);
|
|
1084
|
+
clip-path: path('M16 0H0L0 1H0.757359C1.55301 1 2.31607 1.31607 2.87868 1.87868L6.29587 5.29587C7.23704 6.23704 8.76296 6.23704 9.70413 5.29587L13.1213 1.87868C13.6839 1.31607 14.447 1 15.2426 1H16V0Z');
|
|
1085
|
+
width: 1rem;
|
|
1086
|
+
height: 6px;
|
|
1087
|
+
position: absolute;
|
|
1088
|
+
top: calc(100% - 1px);
|
|
1089
|
+
left: 50%;
|
|
1090
|
+
z-index: 2;
|
|
1091
|
+
transform: translate(-50%);
|
|
1092
|
+
}
|
|
1093
|
+
&[position=bottom]{
|
|
1094
|
+
&:after{
|
|
1095
|
+
top: 1px;
|
|
1096
|
+
transform: translate(-50%,-100%) scaleY(-1);
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
.fig-tooltip,
|
|
1102
|
+
.fig-popover{
|
|
1103
|
+
overflow: visible;
|
|
1104
|
+
box-shadow: inset 0 0.5px 0 0 rgba(255,255,255,0.1);
|
|
1105
|
+
filter: drop-shadow(0px 1px 1.5px rgba(0, 0, 0, 0.10)) drop-shadow(0px 2.5px 6px rgba(0, 0, 0, 0.13)) drop-shadow(0px 0px 0.5px rgba(0, 0, 0, 0.15));
|
|
1106
|
+
&:after{
|
|
1107
|
+
content: '';
|
|
1108
|
+
background-color: inherit;
|
|
1109
|
+
clip-path: path('M16 0H0L0 1H0.757359C1.55301 1 2.31607 1.31607 2.87868 1.87868L6.29587 5.29587C7.23704 6.23704 8.76296 6.23704 9.70413 5.29587L13.1213 1.87868C13.6839 1.31607 14.447 1 15.2426 1H16V0Z');
|
|
1110
|
+
width: 1rem;
|
|
1111
|
+
height: 6px;
|
|
1112
|
+
position: absolute;
|
|
1113
|
+
top: calc(100% - 1px);
|
|
1114
|
+
left: 50%;
|
|
1115
|
+
z-index: 2;
|
|
1116
|
+
transform: translate(-50%);
|
|
1117
|
+
}
|
|
1118
|
+
&[position=bottom]{
|
|
1119
|
+
&:after{
|
|
1120
|
+
top: 1px;
|
|
1121
|
+
transform: translate(-50%,-100%) scaleY(-1);
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
/* UI Icons */
|
|
1127
|
+
fig-icon{
|
|
1128
|
+
display: block;
|
|
1129
|
+
}
|
|
1130
|
+
fig-icon.close{
|
|
1131
|
+
width: 1rem;
|
|
1132
|
+
height: 1rem;
|
|
1133
|
+
background-color: var(--figma-color-text);
|
|
1134
|
+
clip-path: path('M11.6464 3.64645C11.8417 3.45118 12.1583 3.45118 12.3536 3.64645C12.5488 3.84171 12.5488 4.15829 12.3536 4.35355L8.70711 8L12.3536 11.6464C12.5488 11.8417 12.5488 12.1583 12.3536 12.3536C12.1583 12.5488 11.8417 12.5488 11.6464 12.3536L8 8.70711L4.35355 12.3536C4.15829 12.5488 3.84171 12.5488 3.64645 12.3536C3.45118 12.1583 3.45118 11.8417 3.64645 11.6464L7.29289 8L3.64645 4.35355C3.45118 4.15829 3.45118 3.84171 3.64645 3.64645C3.84171 3.45118 4.15829 3.45118 4.35355 3.64645L8 7.29289L11.6464 3.64645Z');
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
/* Web Components */
|
|
1138
|
+
fig-button,
|
|
1139
|
+
fig-tooltip,
|
|
1140
|
+
fig-popover,
|
|
1141
|
+
fig-dialog,
|
|
1142
|
+
fig-content,
|
|
1143
|
+
fig-slider,
|
|
1144
|
+
fig-segmented-control,
|
|
1145
|
+
fig-switch,
|
|
1146
|
+
fig-input-color,
|
|
1147
|
+
fig-input-text,
|
|
1148
|
+
fig-checkbox,
|
|
1149
|
+
fig-radio,
|
|
1150
|
+
fig-tab,
|
|
1151
|
+
fig-tabs,
|
|
1152
|
+
fig-tooltip{
|
|
1153
|
+
display: inline-flex;
|
|
1154
|
+
gap: var(--spacer-2);
|
|
1155
|
+
user-select: none;
|
|
1156
|
+
}
|
|
1157
|
+
fig-input-text{
|
|
1158
|
+
user-select: all;
|
|
1159
|
+
&[multiline]{
|
|
1160
|
+
display: block;
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
fig-input-text[autoresize] textarea,
|
|
1164
|
+
fig-input-text[autoresize] input{
|
|
1165
|
+
field-sizing: content;
|
|
1166
|
+
}
|
|
1167
|
+
fig-input-text[resizable] textarea{
|
|
1168
|
+
resize: both;
|
|
1169
|
+
}
|
|
1170
|
+
fig-checkbox,
|
|
1171
|
+
fig-radio{
|
|
1172
|
+
& label span{
|
|
1173
|
+
vertical-align: middle;
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
fig-input-color{
|
|
1177
|
+
--alpha: 1;
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
fig-header{
|
|
1181
|
+
height: var(--spacer-6);
|
|
1182
|
+
margin: 0;
|
|
1183
|
+
padding: var(--spacer-2);
|
|
1184
|
+
display: flex;
|
|
1185
|
+
align-items: center;
|
|
1186
|
+
box-shadow: inset 0 -1px 0 0 var(--figma-color-border);
|
|
1187
|
+
gap: 0.25rem;
|
|
1188
|
+
& h3{
|
|
1189
|
+
padding-left: var(--spacer-1);
|
|
1190
|
+
font-weight: var(--body-medium-strong-fontWeight);
|
|
1191
|
+
}
|
|
1192
|
+
&>*:not(fig-button){
|
|
1193
|
+
flex-grow:1;
|
|
1194
|
+
}
|
|
1195
|
+
&[borderless]{
|
|
1196
|
+
box-shadow: none;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
fig-content{
|
|
1201
|
+
padding: var(--spacer-2);
|
|
1202
|
+
display: block;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
vstack,
|
|
1206
|
+
.vstack,
|
|
1207
|
+
[vstack]{
|
|
1208
|
+
display: flex;
|
|
1209
|
+
flex-direction: column;
|
|
1210
|
+
gap: 0.5rem;
|
|
1211
|
+
}
|
|
1212
|
+
hstack,
|
|
1213
|
+
.hstack,
|
|
1214
|
+
[hstack]{
|
|
1215
|
+
display: flex;
|
|
1216
|
+
gap: 0.5rem;
|
|
1217
|
+
align-items: start;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
fig-input-text{
|
|
1221
|
+
background-color: var(--figma-color-bg-secondary);
|
|
1222
|
+
border: 0;
|
|
1223
|
+
border-radius: var(--radius-medium);
|
|
1224
|
+
display: flex;
|
|
1225
|
+
flex-wrap: nowrap;
|
|
1226
|
+
justify-content: center;
|
|
1227
|
+
& label,
|
|
1228
|
+
& [slot]{
|
|
1229
|
+
display: flex;
|
|
1230
|
+
flex-wrap: nowrap;
|
|
1231
|
+
justify-content: center;
|
|
1232
|
+
align-items: center;
|
|
1233
|
+
width: 100%;
|
|
1234
|
+
}
|
|
1235
|
+
& [slot] {
|
|
1236
|
+
padding: .25rem 0.5rem;
|
|
1237
|
+
flex: 0;
|
|
1238
|
+
user-select: none;
|
|
1239
|
+
color: var(--figma-color-text-secondary);
|
|
1240
|
+
}
|
|
1241
|
+
& [slot=prepend]{
|
|
1242
|
+
padding-right: 0;
|
|
1243
|
+
}
|
|
1244
|
+
& [slot=append]{
|
|
1245
|
+
padding-left: 0;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
& input{
|
|
1249
|
+
background-color: transparent !important;
|
|
1250
|
+
flex: 1;
|
|
1251
|
+
&:focus,
|
|
1252
|
+
&:active{
|
|
1253
|
+
box-shadow: none !important;
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
&:has(input:focus){
|
|
1257
|
+
box-shadow: inset 0 0 0 1px var(--border-selected);
|
|
1258
|
+
outline: 0;
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
fig-input-color{
|
|
1263
|
+
& fig-input-text:not([type]),
|
|
1264
|
+
& fig-input-text[type=text]{
|
|
1265
|
+
min-width: 6em;
|
|
1266
|
+
display: inline-flex;
|
|
1267
|
+
flex-direction: column;
|
|
1268
|
+
align-items: stretch;
|
|
1269
|
+
& input[type=text]{
|
|
1270
|
+
width: 100%;
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
& fig-input-text[type=number]{
|
|
1274
|
+
width: 3.5rem;
|
|
1275
|
+
display: inline-flex;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
fig-slider{
|
|
1280
|
+
display: flex;
|
|
1281
|
+
& .slider{
|
|
1282
|
+
flex-grow: 1;
|
|
1283
|
+
}
|
|
1284
|
+
& fig-input-text[type=number]{
|
|
1285
|
+
width: 3.5rem;
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
fig-field,
|
|
1290
|
+
.fig-field{
|
|
1291
|
+
display: flex;
|
|
1292
|
+
margin: var(--spacer-2) 0;
|
|
1293
|
+
flex-direction: column;
|
|
1294
|
+
gap: 0;
|
|
1295
|
+
&>*{
|
|
1296
|
+
flex: 1;
|
|
1297
|
+
}
|
|
1298
|
+
&>label{
|
|
1299
|
+
flex: 0;
|
|
1300
|
+
padding: var(--spacer-1) 0;
|
|
1301
|
+
display: flex;
|
|
1302
|
+
min-height: calc(1rem + var(--spacer-1)*2);
|
|
1303
|
+
align-items: center;
|
|
1304
|
+
}
|
|
1305
|
+
&[direction=horizontal]{
|
|
1306
|
+
gap: var(--spacer-2);
|
|
1307
|
+
align-items: flex-start;
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
fig-spinner{
|
|
1312
|
+
width: 1rem;
|
|
1313
|
+
height: 1rem;
|
|
1314
|
+
display: inline-flex;
|
|
1315
|
+
background-color: var(--figma-color-icon-oncomponent-tertiary);
|
|
1316
|
+
clip-path: path("M15.9995 7.86066C16.0271 9.44267 15.585 10.9973 14.729 12.3281C13.8731 13.6588 12.6417 14.7058 11.1907 15.3368C9.73968 15.9677 8.13415 16.1542 6.57716 15.8726C5.02016 15.591 3.58161 14.8541 2.44344 13.755C1.30526 12.6559 0.518574 11.2439 0.182856 9.69769C-0.152862 8.15147 -0.0225313 6.54042 0.557366 5.06826C1.13726 3.59611 2.14068 2.32898 3.44073 1.4271C4.74079 0.525221 6.27908 0.0291073 7.86109 0.00149397L7.87922 1.04037C6.50268 1.06439 5.16418 1.49607 4.03298 2.28081C2.90177 3.06556 2.02868 4.16812 1.5241 5.44907C1.01952 6.73002 0.906114 8.13183 1.19823 9.47724C1.49034 10.8226 2.17486 12.0512 3.16521 13.0076C4.15556 13.9639 5.40727 14.6052 6.76204 14.8502C8.11682 15.0951 9.51382 14.9329 10.7764 14.3839C12.0389 13.8349 13.1104 12.9239 13.8552 11.766C14.5999 10.6081 14.9846 9.25533 14.9606 7.87879L15.9995 7.86066Z");
|
|
1317
|
+
animation: fig-spinner-spin 1.0s linear infinite;
|
|
1318
|
+
}
|
|
1319
|
+
@keyframes fig-spinner-spin {
|
|
1320
|
+
from {
|
|
1321
|
+
transform: rotate(0deg);
|
|
1322
|
+
}
|
|
1323
|
+
to {
|
|
1324
|
+
transform: rotate(360deg);
|
|
1325
|
+
}
|
|
1326
|
+
}
|