@rogieking/figui3 11.4.2 → 11.6.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/fig-editor/SKILL.md +9 -6
- package/.cursor/skills/fig-editor/components.md +142 -0
- package/.cursor/skills/fig-editor/reference.md +62 -0
- package/.cursor/skills/figui3/components.md +7 -1
- package/.cursor/skills/figui3/react.md +3 -0
- package/.cursor/skills/figui3/reference.md +2 -0
- package/CHANGELOG.md +37 -0
- package/README.md +123 -3
- package/components.css +83 -10
- package/dist/components.css +1 -1
- package/dist/fig-editor.css +1 -1
- package/dist/fig-editor.js +3 -3
- package/dist/fig-property.css +1 -0
- package/dist/fig-property.js +1 -0
- package/dist/fig.css +1 -1
- package/dist/fig.js +5 -5
- package/fig-editor.css +45 -185
- package/fig-editor.js +253 -88
- package/fig-gradient-editor.css +76 -0
- package/fig-gradient-editor.js +598 -0
- package/fig-popup-easing.css +8 -0
- package/fig-popup-easing.js +141 -0
- package/fig-popup-gradient.css +11 -0
- package/fig-popup-gradient.js +138 -0
- package/fig-popup-palette.css +7 -0
- package/fig-popup-palette.js +173 -0
- package/fig-property.css +116 -0
- package/fig-property.js +220 -0
- package/fig.js +265 -99
- package/package.json +17 -2
package/fig-editor.css
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
/* Copyright (c) 2026 Rogie King. PolyForm Shield 1.0.0. See LICENSE. */
|
|
2
2
|
@import url("fig-layer.css");
|
|
3
|
+
@import url("fig-property.css");
|
|
4
|
+
@import url("fig-gradient-editor.css");
|
|
5
|
+
@import url("fig-popup-easing.css");
|
|
6
|
+
@import url("fig-popup-gradient.css");
|
|
7
|
+
@import url("fig-popup-palette.css");
|
|
8
|
+
|
|
9
|
+
fig-input-point {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
width: 8.9375rem;
|
|
12
|
+
|
|
13
|
+
&[full]:not([full="false"]) {
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
> fig-input-combo {
|
|
18
|
+
width: 100%;
|
|
19
|
+
|
|
20
|
+
> fig-input-number {
|
|
21
|
+
flex: 1 1 0;
|
|
22
|
+
width: auto;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
3
26
|
|
|
4
27
|
:root,
|
|
5
28
|
:host {
|
|
@@ -140,12 +163,6 @@ dialog[is="fig-toast"] {
|
|
|
140
163
|
}
|
|
141
164
|
|
|
142
165
|
/* Palette Editor */
|
|
143
|
-
.fig-palette-editor-popup {
|
|
144
|
-
width: 12rem;
|
|
145
|
-
padding: 0;
|
|
146
|
-
pointer-events: auto;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
166
|
fig-palette-editor {
|
|
150
167
|
display: flex;
|
|
151
168
|
flex-direction: column;
|
|
@@ -230,7 +247,8 @@ fig-fill-picker {
|
|
|
230
247
|
grid-template-rows: 1fr 1fr;
|
|
231
248
|
align-items: center;
|
|
232
249
|
padding-right: var(--spacer-3);
|
|
233
|
-
gap: var(--spacer-2);
|
|
250
|
+
row-gap: var(--spacer-2);
|
|
251
|
+
column-gap: var(--spacer-2);
|
|
234
252
|
padding-bottom: var(--spacer-1);
|
|
235
253
|
|
|
236
254
|
.fig-fill-picker-eyedropper {
|
|
@@ -261,20 +279,9 @@ fig-fill-picker {
|
|
|
261
279
|
}
|
|
262
280
|
|
|
263
281
|
.fig-fill-picker-inputs {
|
|
264
|
-
/* Override labelless 1fr/2fr split so mode select matches eyedropper width
|
|
265
|
-
and color inputs take the remaining row. */
|
|
266
|
-
&:not([direction="vertical"]):not(:has(> label)) {
|
|
267
|
-
grid-template-columns:
|
|
268
|
-
var(--fig-field-left-padding)
|
|
269
|
-
3.5rem
|
|
270
|
-
var(--spacer-2)
|
|
271
|
-
minmax(0, 1fr)
|
|
272
|
-
var(--fig-field-right-padding);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
282
|
.fig-fill-picker-input-mode {
|
|
276
283
|
width: 3.5rem;
|
|
277
|
-
flex
|
|
284
|
+
flex: unset;
|
|
278
285
|
align-self: center;
|
|
279
286
|
}
|
|
280
287
|
|
|
@@ -321,168 +328,6 @@ fig-fill-picker {
|
|
|
321
328
|
}
|
|
322
329
|
}
|
|
323
330
|
|
|
324
|
-
/* Gradient Tab */
|
|
325
|
-
.fig-fill-picker-gradient-preview {
|
|
326
|
-
aspect-ratio: auto;
|
|
327
|
-
width: calc(100% - var(--spacer-3) * 2);
|
|
328
|
-
margin: var(--spacer-2) var(--spacer-3);
|
|
329
|
-
margin-top: var(--spacer-4);
|
|
330
|
-
margin-bottom:0;
|
|
331
|
-
background: transparent;
|
|
332
|
-
&::after{
|
|
333
|
-
display: none;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
fig-header.fig-fill-picker-gradient-header {
|
|
338
|
-
.fig-fill-picker-gradient-type {
|
|
339
|
-
display: flex;
|
|
340
|
-
flex: 0 1 auto;
|
|
341
|
-
min-width: 0;
|
|
342
|
-
width: auto;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.fig-fill-picker-gradient-actions {
|
|
346
|
-
flex: 0 0 auto;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.fig-fill-picker-gradient-stops {
|
|
351
|
-
.fig-fill-picker-gradient-stops-header {
|
|
352
|
-
> span {
|
|
353
|
-
flex: 1;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
fig-field.fig-fill-picker-gradient-interpolation-field {
|
|
359
|
-
display: flex;
|
|
360
|
-
align-items: center;
|
|
361
|
-
grid-template-columns: unset;
|
|
362
|
-
grid-template-areas: unset;
|
|
363
|
-
padding-left: var(--spacer-3);
|
|
364
|
-
padding-right: var(--spacer-2);
|
|
365
|
-
gap: var(--spacer-1);
|
|
366
|
-
|
|
367
|
-
> *:not(.fig-field-chevron):not(label) {
|
|
368
|
-
grid-area: unset;
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
.fig-fill-picker-gradient-interpolation-modes {
|
|
373
|
-
flex: 1 1 auto;
|
|
374
|
-
min-width: 0;
|
|
375
|
-
|
|
376
|
-
fig-interpolation-swatch {
|
|
377
|
-
pointer-events: none;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
/* Transparent select trigger sits on the icon button so its menu anchors here. */
|
|
382
|
-
.fig-fill-picker-gradient-interpolation-more {
|
|
383
|
-
position: relative;
|
|
384
|
-
display: inline-flex;
|
|
385
|
-
flex: 0 0 auto;
|
|
386
|
-
|
|
387
|
-
> fig-button {
|
|
388
|
-
pointer-events: none;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.fig-fill-picker-gradient-space {
|
|
392
|
-
position: absolute;
|
|
393
|
-
inset: 0;
|
|
394
|
-
width: 100%;
|
|
395
|
-
opacity: 0;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
&:has(.fig-fill-picker-gradient-space:hover) > fig-button,
|
|
399
|
-
&:has(.fig-fill-picker-gradient-space[open]) > fig-button {
|
|
400
|
-
background-color: var(--figma-color-bg-transparent-hover);
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
&:has(.fig-fill-picker-gradient-space[data-focus-visible]) > fig-button {
|
|
404
|
-
outline: var(--figma-focus-outline);
|
|
405
|
-
outline-offset: var(--figma-focus-outline-offset);
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
.fig-fill-picker-gradient-space {
|
|
410
|
-
&::part(prepend) {
|
|
411
|
-
display: none;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
fig-select-option {
|
|
415
|
-
min-height: 3rem;
|
|
416
|
-
|
|
417
|
-
&:hover::before,
|
|
418
|
-
&:focus-visible::before {
|
|
419
|
-
background-color: var(--figma-color-bg-tertiary);
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
.fig-fill-picker-gradient-interpolation-label {
|
|
424
|
-
display: flex;
|
|
425
|
-
flex-direction: column;
|
|
426
|
-
justify-content: center;
|
|
427
|
-
min-width: 0;
|
|
428
|
-
line-height: 1.25;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
.fig-fill-picker-gradient-interpolation-title,
|
|
432
|
-
.fig-fill-picker-gradient-interpolation-subtitle {
|
|
433
|
-
display: block;
|
|
434
|
-
overflow: hidden;
|
|
435
|
-
text-overflow: ellipsis;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
.fig-fill-picker-gradient-interpolation-subtitle {
|
|
439
|
-
color: var(--figma-color-text-tertiary);
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
fig-select-options.fig-fill-picker-gradient-interpolation-collapsed {
|
|
443
|
-
overflow: hidden;
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
.fig-fill-picker-gradient-stops-list {
|
|
448
|
-
display: flex;
|
|
449
|
-
flex-direction: column;
|
|
450
|
-
|
|
451
|
-
fig-reorder {
|
|
452
|
-
display: contents;
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
.fig-fill-picker-gradient-stop-row {
|
|
457
|
-
padding-right: var(--spacer-2);
|
|
458
|
-
display: flex;
|
|
459
|
-
padding-left: var(--spacer-3);
|
|
460
|
-
gap: var(--spacer-2);
|
|
461
|
-
|
|
462
|
-
&.dragging {
|
|
463
|
-
background-color: var(--figma-color-bg-selected);
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
& > .fig-fill-picker-stop-position {
|
|
467
|
-
flex: 0;
|
|
468
|
-
flex-basis: 3rem;
|
|
469
|
-
min-width: 0;
|
|
470
|
-
width: 3rem;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
.fig-fill-picker-stop-color {
|
|
474
|
-
flex: 1;
|
|
475
|
-
min-width: 0;
|
|
476
|
-
fig-input-text {
|
|
477
|
-
min-width: 0;
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
.fig-fill-picker-stop-remove {
|
|
482
|
-
flex-shrink: 0;
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
|
|
486
331
|
/* Media Tabs (Image/Video/Webcam) */
|
|
487
332
|
fig-field.fig-fill-picker-media-header {
|
|
488
333
|
display: flex;
|
|
@@ -494,7 +339,7 @@ fig-fill-picker {
|
|
|
494
339
|
padding-right: var(--spacer-2);
|
|
495
340
|
gap: var(--spacer-2);
|
|
496
341
|
|
|
497
|
-
> *:not(
|
|
342
|
+
> *:not([slot="leading"]):not([slot="trailing"]):not(label) {
|
|
498
343
|
grid-area: unset;
|
|
499
344
|
}
|
|
500
345
|
|
|
@@ -937,18 +782,28 @@ fig-select-option {
|
|
|
937
782
|
pointer-events: none;
|
|
938
783
|
z-index: 1000000;
|
|
939
784
|
border-radius: 1px;
|
|
940
|
-
&::before{
|
|
785
|
+
&::before {
|
|
941
786
|
content: "";
|
|
942
787
|
position: absolute;
|
|
943
788
|
top: 0;
|
|
944
|
-
left:
|
|
789
|
+
left: 0;
|
|
945
790
|
width: 100%;
|
|
946
791
|
height: 100%;
|
|
947
792
|
background: var(--figma-color-border-selected);
|
|
948
793
|
}
|
|
949
794
|
|
|
950
795
|
&.fig-reorder-indicator-ring {
|
|
951
|
-
|
|
796
|
+
&[data-axis="vertical"]::before {
|
|
797
|
+
left: var(--spacer-1);
|
|
798
|
+
width: calc(100% - var(--spacer-1));
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
&[data-axis="horizontal"]::before {
|
|
802
|
+
top: var(--spacer-1);
|
|
803
|
+
height: calc(100% - var(--spacer-1));
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
&::after {
|
|
952
807
|
content: "";
|
|
953
808
|
position: absolute;
|
|
954
809
|
top: 1px;
|
|
@@ -959,6 +814,11 @@ fig-select-option {
|
|
|
959
814
|
border: 2px solid var(--figma-color-border-selected);
|
|
960
815
|
border-radius: 50%;
|
|
961
816
|
}
|
|
817
|
+
|
|
818
|
+
&[data-axis="horizontal"]::after {
|
|
819
|
+
top: 0;
|
|
820
|
+
left: 1px;
|
|
821
|
+
}
|
|
962
822
|
}
|
|
963
823
|
|
|
964
824
|
&[data-axis="vertical"] {
|