@rogieking/figui3 3.21.2 → 3.22.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/.cursor/skills/propkit/SKILL.md +2 -3
- package/README.md +1 -1
- package/components.css +109 -70
- package/fig.js +647 -147
- package/package.json +1 -1
|
@@ -111,8 +111,7 @@ bootstrap();
|
|
|
111
111
|
- Use `transform` when internal value scale differs from UI display (example: internal `0..1`, display `0..100%`).
|
|
112
112
|
- Variants:
|
|
113
113
|
- Default variant for most property panels.
|
|
114
|
-
- `variant="
|
|
115
|
-
- `variant="neue"` only where explicitly requested for that panel's style.
|
|
114
|
+
- `variant="neue"` for a compact, visually quieter style.
|
|
116
115
|
- Always set explicit `min`, `max`, and `step` (and `units` where applicable) to keep behavior predictable.
|
|
117
116
|
|
|
118
117
|
### Control Selection Heuristics
|
|
@@ -176,7 +175,7 @@ Use a horizontal fig-field, with a fig-slider, min=0 max=100 text=true units=%.
|
|
|
176
175
|
</fig-field>
|
|
177
176
|
<fig-field direction="horizontal">
|
|
178
177
|
<label>Hue</label>
|
|
179
|
-
<fig-slider type="hue" value="180" text="true" variant="
|
|
178
|
+
<fig-slider type="hue" value="180" text="true" variant="neue" full></fig-slider>
|
|
180
179
|
</fig-field>
|
|
181
180
|
<fig-field direction="horizontal">
|
|
182
181
|
<label>Offset</label>
|
package/README.md
CHANGED
|
@@ -451,7 +451,7 @@ An editable palette of solid colors, each rendered as a `<fig-input-color>` swat
|
|
|
451
451
|
|
|
452
452
|
```html
|
|
453
453
|
<fig-input-palette value='["#FF0000","#00FF00","#0000FF"]'></fig-input-palette>
|
|
454
|
-
<fig-input-palette value='[{"color":"#FF0000","alpha":0.5},{"color":"#00FF00","alpha":1}]'
|
|
454
|
+
<fig-input-palette value='[{"color":"#FF0000","alpha":0.5},{"color":"#00FF00","alpha":1}]' open></fig-input-palette>
|
|
455
455
|
```
|
|
456
456
|
|
|
457
457
|
---
|
package/components.css
CHANGED
|
@@ -1178,7 +1178,7 @@ fig-chit {
|
|
|
1178
1178
|
--width: var(--size);
|
|
1179
1179
|
--height: var(--size);
|
|
1180
1180
|
--border-radius: var(--radius-medium);
|
|
1181
|
-
--chit-background: #d9d9d9;
|
|
1181
|
+
--chit-background: linear-gradient(#d9d9d9, #d9d9d9);
|
|
1182
1182
|
--chit-bg-size: cover;
|
|
1183
1183
|
--chit-bg-position: center;
|
|
1184
1184
|
--selected: 0;
|
|
@@ -1194,9 +1194,14 @@ fig-chit {
|
|
|
1194
1194
|
|
|
1195
1195
|
&::before,
|
|
1196
1196
|
&::after,
|
|
1197
|
+
div,
|
|
1197
1198
|
input {
|
|
1198
1199
|
grid-area: 1/1;
|
|
1199
1200
|
}
|
|
1201
|
+
& > div {
|
|
1202
|
+
background: var(--checkerboard-small);
|
|
1203
|
+
border-radius: var(--border-radius);
|
|
1204
|
+
}
|
|
1200
1205
|
|
|
1201
1206
|
/* Selection ring */
|
|
1202
1207
|
&[selected]:not([selected="false"]) {
|
|
@@ -1210,6 +1215,9 @@ fig-chit {
|
|
|
1210
1215
|
&[selected]:not([selected="false"]) {
|
|
1211
1216
|
--padding: 3px;
|
|
1212
1217
|
}
|
|
1218
|
+
& > div {
|
|
1219
|
+
background: var(--checkerboard);
|
|
1220
|
+
}
|
|
1213
1221
|
}
|
|
1214
1222
|
|
|
1215
1223
|
&[size="medium"] {
|
|
@@ -1227,7 +1235,8 @@ fig-chit {
|
|
|
1227
1235
|
}
|
|
1228
1236
|
|
|
1229
1237
|
&::before,
|
|
1230
|
-
&::after
|
|
1238
|
+
&::after,
|
|
1239
|
+
& > div {
|
|
1231
1240
|
content: "";
|
|
1232
1241
|
width: calc(var(--width) - var(--padding) * 2);
|
|
1233
1242
|
height: calc(var(--height) - var(--padding) * 2);
|
|
@@ -1242,12 +1251,10 @@ fig-chit {
|
|
|
1242
1251
|
}
|
|
1243
1252
|
&::before {
|
|
1244
1253
|
content: "";
|
|
1245
|
-
background: var(--chit-background)
|
|
1246
|
-
background-size:
|
|
1247
|
-
var(--chit-bg-size),
|
|
1248
|
-
0.5rem 0.5rem;
|
|
1254
|
+
background: var(--chit-background);
|
|
1255
|
+
background-size: var(--chit-bg-size);
|
|
1249
1256
|
background-position: var(--chit-bg-position);
|
|
1250
|
-
background-repeat: no-repeat
|
|
1257
|
+
background-repeat: no-repeat;
|
|
1251
1258
|
border-radius: calc(var(--border-radius) - (var(--padding) / 2));
|
|
1252
1259
|
mask-image: linear-gradient(
|
|
1253
1260
|
to right,
|
|
@@ -1280,14 +1287,6 @@ fig-chit {
|
|
|
1280
1287
|
display: none;
|
|
1281
1288
|
}
|
|
1282
1289
|
}
|
|
1283
|
-
|
|
1284
|
-
/* Checkerboard for empty/missing images */
|
|
1285
|
-
&[data-type="image"]:not([background])::after,
|
|
1286
|
-
&[data-type="image"][background=""]::after,
|
|
1287
|
-
&[data-type="image"][background="url()"]::after,
|
|
1288
|
-
&[checkerboard]:not([checkerboard="false"])::after {
|
|
1289
|
-
background: var(--checkerboard);
|
|
1290
|
-
}
|
|
1291
1290
|
}
|
|
1292
1291
|
|
|
1293
1292
|
/* Fig Image */
|
|
@@ -2477,37 +2476,6 @@ fig-slider {
|
|
|
2477
2476
|
}
|
|
2478
2477
|
}
|
|
2479
2478
|
|
|
2480
|
-
&[variant="minimal"] {
|
|
2481
|
-
--slider-height: 0.375rem;
|
|
2482
|
-
--slider-thumb-size: 0.75rem;
|
|
2483
|
-
--slider-tick-width: calc(var(--slider-height) / 2);
|
|
2484
|
-
--slider-tick-height: calc(var(--slider-height) / 2);
|
|
2485
|
-
--handle-transition: none;
|
|
2486
|
-
--slider-transition: none;
|
|
2487
|
-
--slider-handle-shadow:
|
|
2488
|
-
inset 0 0 0 calc(6px + 0.5rem * var(--unchanged))
|
|
2489
|
-
var(--slider-thumb-color),
|
|
2490
|
-
0 0 0 0.75px rgba(0, 0, 0, 0.075), inset 0 0 0 5px rgba(0, 0, 0, 0.1),
|
|
2491
|
-
var(--figma-elevation-100);
|
|
2492
|
-
|
|
2493
|
-
.fig-slider-input-container {
|
|
2494
|
-
height: var(--slider-height);
|
|
2495
|
-
position: relative;
|
|
2496
|
-
display: block;
|
|
2497
|
-
width: 100%;
|
|
2498
|
-
}
|
|
2499
|
-
fig-input-text {
|
|
2500
|
-
height: calc(var(--slider-height) * 2);
|
|
2501
|
-
background-color: transparent;
|
|
2502
|
-
}
|
|
2503
|
-
|
|
2504
|
-
&:hover,
|
|
2505
|
-
&:focus-within {
|
|
2506
|
-
fig-input-text {
|
|
2507
|
-
height: auto;
|
|
2508
|
-
}
|
|
2509
|
-
}
|
|
2510
|
-
}
|
|
2511
2479
|
&[variant="neue"] {
|
|
2512
2480
|
--slider-height: 0.375rem;
|
|
2513
2481
|
--slider-thumb-size: 0.75rem;
|
|
@@ -2816,7 +2784,7 @@ fig-tooltip {
|
|
|
2816
2784
|
max-width: 180px;
|
|
2817
2785
|
width: max-content;
|
|
2818
2786
|
box-shadow: inset 0 0.5px 0 0
|
|
2819
|
-
light-dark(rgba(
|
|
2787
|
+
light-dark(rgba(0, 0, 0, 0.06), rgba(255, 255, 255, 0.1));
|
|
2820
2788
|
filter: drop-shadow(0px 1px 1.5px rgba(0, 0, 0, 0.1))
|
|
2821
2789
|
drop-shadow(0px 2.5px 6px rgba(0, 0, 0, 0.13))
|
|
2822
2790
|
drop-shadow(0px 0px 0.5px rgba(0, 0, 0, 0.15));
|
|
@@ -2949,10 +2917,13 @@ fig-header {
|
|
|
2949
2917
|
align-items: center;
|
|
2950
2918
|
box-shadow: inset 0 -1px 0 0 var(--figma-color-border);
|
|
2951
2919
|
gap: 0.25rem;
|
|
2920
|
+
user-select: none;
|
|
2952
2921
|
|
|
2953
2922
|
& h3 {
|
|
2954
2923
|
font-weight: var(--body-medium-strong-fontWeight);
|
|
2955
2924
|
flex-grow: 1;
|
|
2925
|
+
display: flex;
|
|
2926
|
+
align-items: center;
|
|
2956
2927
|
}
|
|
2957
2928
|
|
|
2958
2929
|
&[borderless] {
|
|
@@ -2960,6 +2931,65 @@ fig-header {
|
|
|
2960
2931
|
}
|
|
2961
2932
|
}
|
|
2962
2933
|
|
|
2934
|
+
fig-group {
|
|
2935
|
+
display: block;
|
|
2936
|
+
padding-bottom: var(--spacer-2-5);
|
|
2937
|
+
|
|
2938
|
+
/* Sibling groups */
|
|
2939
|
+
& + fig-group {
|
|
2940
|
+
box-shadow: inset 0 1px 0 0 var(--figma-color-border);
|
|
2941
|
+
&:not([name]) {
|
|
2942
|
+
padding-top: var(--spacer-2-5);
|
|
2943
|
+
}
|
|
2944
|
+
&:last-of-type {
|
|
2945
|
+
padding-bottom: 0;
|
|
2946
|
+
}
|
|
2947
|
+
}
|
|
2948
|
+
|
|
2949
|
+
& > fig-header {
|
|
2950
|
+
cursor: default;
|
|
2951
|
+
padding-left: var(--spacer-3);
|
|
2952
|
+
h3 {
|
|
2953
|
+
.fig-group-chevron {
|
|
2954
|
+
--icon: var(--icon-chevron);
|
|
2955
|
+
--size: 1rem;
|
|
2956
|
+
color: var(--figma-color-text-tertiary);
|
|
2957
|
+
transform: rotate(-90deg);
|
|
2958
|
+
transition: transform var(--transition-duration)
|
|
2959
|
+
var(--transition-timing-function);
|
|
2960
|
+
margin-left: calc(var(--spacer-3) * -1);
|
|
2961
|
+
}
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
|
|
2965
|
+
&[collapsible] > fig-header h3 {
|
|
2966
|
+
user-select: none;
|
|
2967
|
+
}
|
|
2968
|
+
|
|
2969
|
+
&[collapsible]:not([open]):not([open="true"]),
|
|
2970
|
+
&[collapsible][open="false"] {
|
|
2971
|
+
padding-bottom: 0;
|
|
2972
|
+
fig-header {
|
|
2973
|
+
color: var(--figma-color-text-secondary);
|
|
2974
|
+
&:hover {
|
|
2975
|
+
color: var(--figma-color-text);
|
|
2976
|
+
.fig-group-chevron {
|
|
2977
|
+
color: inherit;
|
|
2978
|
+
}
|
|
2979
|
+
}
|
|
2980
|
+
}
|
|
2981
|
+
}
|
|
2982
|
+
|
|
2983
|
+
&[open]:not([open="false"]) > fig-header .fig-group-chevron {
|
|
2984
|
+
transform: rotate(0deg);
|
|
2985
|
+
}
|
|
2986
|
+
|
|
2987
|
+
&[collapsible]:not([open]):not([open="true"]) > :not(fig-header),
|
|
2988
|
+
&[collapsible][open="false"] > :not(fig-header) {
|
|
2989
|
+
display: none;
|
|
2990
|
+
}
|
|
2991
|
+
}
|
|
2992
|
+
|
|
2963
2993
|
fig-footer {
|
|
2964
2994
|
display: flex;
|
|
2965
2995
|
align-items: center;
|
|
@@ -3243,12 +3273,18 @@ fig-input-palette {
|
|
|
3243
3273
|
flex-direction: column;
|
|
3244
3274
|
gap: var(--spacer-2);
|
|
3245
3275
|
min-width: 0;
|
|
3276
|
+
border-radius: var(--radius-medium);
|
|
3277
|
+
|
|
3278
|
+
&:focus {
|
|
3279
|
+
outline: 1px solid var(--figma-color-border-selected) !important;
|
|
3280
|
+
outline-offset: -1px !important;
|
|
3281
|
+
}
|
|
3246
3282
|
|
|
3247
3283
|
.palette-colors {
|
|
3248
3284
|
display: flex;
|
|
3249
3285
|
flex-wrap: nowrap;
|
|
3250
3286
|
gap: 0;
|
|
3251
|
-
border-radius: var(--radius-
|
|
3287
|
+
border-radius: var(--radius-medium);
|
|
3252
3288
|
overflow: hidden;
|
|
3253
3289
|
grid-area: inputs;
|
|
3254
3290
|
min-width: 0;
|
|
@@ -3263,18 +3299,14 @@ fig-input-palette {
|
|
|
3263
3299
|
grid-template-columns: 1fr 24px;
|
|
3264
3300
|
grid-template-areas: "inputs button";
|
|
3265
3301
|
border-radius: var(--radius-medium);
|
|
3266
|
-
background-color: var(--figma-color-bg-secondary);
|
|
3267
3302
|
width: 100%;
|
|
3268
|
-
gap: var(--spacer-
|
|
3303
|
+
gap: var(--spacer-2);
|
|
3269
3304
|
place-items: center;
|
|
3270
3305
|
|
|
3271
3306
|
.palette-colors {
|
|
3272
3307
|
display: flex;
|
|
3273
|
-
--palette-colors-height:
|
|
3308
|
+
--palette-colors-height: 1.5rem;
|
|
3274
3309
|
height: var(--palette-colors-height);
|
|
3275
|
-
margin-left: var(--spacer-1);
|
|
3276
|
-
|
|
3277
|
-
background-color: var(--figma-color-bg-secondary);
|
|
3278
3310
|
fig-input-color {
|
|
3279
3311
|
width: 100%;
|
|
3280
3312
|
}
|
|
@@ -3298,7 +3330,7 @@ fig-input-palette {
|
|
|
3298
3330
|
}
|
|
3299
3331
|
}
|
|
3300
3332
|
}
|
|
3301
|
-
&[
|
|
3333
|
+
&[open]:not([open="false"]):not([edit="false"]) {
|
|
3302
3334
|
.palette-colors-expanded {
|
|
3303
3335
|
display: flex;
|
|
3304
3336
|
}
|
|
@@ -3309,11 +3341,6 @@ fig-input-palette {
|
|
|
3309
3341
|
grid-template-areas: "inputs inputs";
|
|
3310
3342
|
}
|
|
3311
3343
|
}
|
|
3312
|
-
&[color-strip="false"] {
|
|
3313
|
-
.palette-colors-inline {
|
|
3314
|
-
display: none !important;
|
|
3315
|
-
}
|
|
3316
|
-
}
|
|
3317
3344
|
.palette-colors-expanded {
|
|
3318
3345
|
display: none;
|
|
3319
3346
|
flex-direction: column;
|
|
@@ -3335,10 +3362,6 @@ fig-input-palette {
|
|
|
3335
3362
|
}
|
|
3336
3363
|
}
|
|
3337
3364
|
|
|
3338
|
-
fig-field[direction="horizontal"]:has(> fig-input-palette) {
|
|
3339
|
-
padding-right: var(--spacer-2);
|
|
3340
|
-
}
|
|
3341
|
-
|
|
3342
3365
|
fig-slider {
|
|
3343
3366
|
display: flex;
|
|
3344
3367
|
|
|
@@ -3384,30 +3407,46 @@ fig-field,
|
|
|
3384
3407
|
& > label {
|
|
3385
3408
|
flex: 0;
|
|
3386
3409
|
padding: var(--spacer-1) 0;
|
|
3387
|
-
display: flex;
|
|
3388
|
-
justify-content: space-between;
|
|
3389
3410
|
min-height: calc(1rem + var(--spacer-1) * 2);
|
|
3411
|
+
display: flex;
|
|
3390
3412
|
align-items: center;
|
|
3391
3413
|
width: 100%;
|
|
3414
|
+
user-select: none;
|
|
3415
|
+
}
|
|
3416
|
+
|
|
3417
|
+
& > .fig-field-chevron {
|
|
3418
|
+
--icon: var(--icon-chevron);
|
|
3419
|
+
--size: 1rem;
|
|
3420
|
+
color: var(--figma-color-text-tertiary);
|
|
3421
|
+
transform: rotate(-90deg);
|
|
3422
|
+
transition: transform var(--transition-duration)
|
|
3423
|
+
var(--transition-timing-function);
|
|
3424
|
+
flex-shrink: 0;
|
|
3425
|
+
margin: var(--spacer-1) 0;
|
|
3426
|
+
margin-left: calc(var(--spacer-3) * -1);
|
|
3427
|
+
margin-right: calc(var(--spacer-2) * -1);
|
|
3428
|
+
}
|
|
3429
|
+
|
|
3430
|
+
&:has(> [open]:not([open="false"])) > .fig-field-chevron {
|
|
3431
|
+
transform: rotate(0deg);
|
|
3392
3432
|
}
|
|
3393
3433
|
|
|
3394
3434
|
&[direction="horizontal"] > label {
|
|
3435
|
+
display: block;
|
|
3395
3436
|
width: auto;
|
|
3396
3437
|
min-width: var(--field-label-width);
|
|
3397
3438
|
max-width: var(--field-label-width);
|
|
3398
3439
|
overflow: hidden;
|
|
3399
3440
|
text-overflow: ellipsis;
|
|
3400
3441
|
white-space: nowrap;
|
|
3442
|
+
padding: 0;
|
|
3443
|
+
line-height: 1.5rem;
|
|
3401
3444
|
}
|
|
3402
3445
|
|
|
3403
3446
|
&[direction="horizontal"] {
|
|
3404
3447
|
gap: var(--spacer-2);
|
|
3405
3448
|
align-items: start;
|
|
3406
3449
|
flex-direction: row;
|
|
3407
|
-
|
|
3408
|
-
& > label {
|
|
3409
|
-
min-width: 4rem;
|
|
3410
|
-
}
|
|
3411
3450
|
&[columns="thirds"] {
|
|
3412
3451
|
display: grid;
|
|
3413
3452
|
grid-template-columns: repeat(3, 1fr);
|