@rogieking/figui3 6.21.1 → 6.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/figui3/SKILL.md +1 -15
- package/.cursor/skills/propkit/SKILL.md +2 -2
- package/README.md +6 -8
- package/components.css +338 -200
- package/dist/components.css +1 -1
- package/dist/fig-editor.css +1 -1
- package/dist/fig-editor.js +30 -33
- package/dist/fig-lab.css +1 -1
- package/dist/fig-lab.js +32 -103
- package/dist/fig.css +1 -1
- package/dist/fig.js +128 -39
- package/dist/propskit.css +1 -1
- package/fig-editor.js +186 -67
- package/fig-lab.css +32 -307
- package/fig-lab.js +727 -1278
- package/fig.js +1582 -277
- package/package.json +1 -1
package/fig-lab.css
CHANGED
|
@@ -171,14 +171,14 @@ propskit-switch {
|
|
|
171
171
|
|
|
172
172
|
display: block;
|
|
173
173
|
width: 100%;
|
|
174
|
-
height:
|
|
174
|
+
height: calc(
|
|
175
|
+
var(--propskit-switch-height) + var(--propskit-switch-vertical-padding) * 2
|
|
176
|
+
);
|
|
175
177
|
padding: var(--propskit-switch-vertical-padding)
|
|
176
178
|
var(--propskit-switch-horizontal-padding);
|
|
177
179
|
|
|
178
180
|
&:not([size]),
|
|
179
181
|
&[size="large"] {
|
|
180
|
-
--propskit-switch-vertical-padding: 0px;
|
|
181
|
-
|
|
182
182
|
fig-field:not([direction="vertical"]) {
|
|
183
183
|
padding-right: var(--spacer-1);
|
|
184
184
|
}
|
|
@@ -248,15 +248,12 @@ propskit-color {
|
|
|
248
248
|
|
|
249
249
|
display: block;
|
|
250
250
|
width: 100%;
|
|
251
|
-
height:
|
|
251
|
+
height: calc(
|
|
252
|
+
var(--propskit-color-height) + var(--propskit-color-vertical-padding) * 2
|
|
253
|
+
);
|
|
252
254
|
padding: var(--propskit-color-vertical-padding)
|
|
253
255
|
var(--propskit-color-horizontal-padding);
|
|
254
256
|
|
|
255
|
-
&:not([size]),
|
|
256
|
-
&[size="large"] {
|
|
257
|
-
--propskit-color-vertical-padding: 0px;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
257
|
&[disabled]:not([disabled="false"]) {
|
|
261
258
|
pointer-events: none;
|
|
262
259
|
|
|
@@ -319,9 +316,7 @@ propskit-color {
|
|
|
319
316
|
max-width: none;
|
|
320
317
|
min-width: 0;
|
|
321
318
|
margin-left: auto;
|
|
322
|
-
height:
|
|
323
|
-
var(--propskit-color-height) - var(--propskit-color-vertical-padding) * 2
|
|
324
|
-
);
|
|
319
|
+
height: var(--propskit-color-height);
|
|
325
320
|
border-radius: var(--radius-medium);
|
|
326
321
|
background-color: transparent;
|
|
327
322
|
box-shadow: none;
|
|
@@ -372,14 +367,14 @@ propskit-select {
|
|
|
372
367
|
|
|
373
368
|
display: block;
|
|
374
369
|
width: 100%;
|
|
375
|
-
height:
|
|
370
|
+
height: calc(
|
|
371
|
+
var(--propskit-select-height) + var(--propskit-select-vertical-padding) * 2
|
|
372
|
+
);
|
|
376
373
|
padding: var(--propskit-select-vertical-padding)
|
|
377
374
|
var(--propskit-select-horizontal-padding);
|
|
378
375
|
|
|
379
376
|
&:not([size]),
|
|
380
377
|
&[size="large"] {
|
|
381
|
-
--propskit-select-vertical-padding: 0px;
|
|
382
|
-
|
|
383
378
|
fig-field:not([direction="vertical"]) {
|
|
384
379
|
padding-left: 0;
|
|
385
380
|
|
|
@@ -482,15 +477,12 @@ propskit-text {
|
|
|
482
477
|
|
|
483
478
|
display: block;
|
|
484
479
|
width: 100%;
|
|
485
|
-
height:
|
|
480
|
+
height: calc(
|
|
481
|
+
var(--propskit-text-height) + var(--propskit-text-vertical-padding) * 2
|
|
482
|
+
);
|
|
486
483
|
padding: var(--propskit-text-vertical-padding)
|
|
487
484
|
var(--propskit-text-horizontal-padding);
|
|
488
485
|
|
|
489
|
-
&:not([size]),
|
|
490
|
-
&[size="large"] {
|
|
491
|
-
--propskit-text-vertical-padding: 0px;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
486
|
&[disabled]:not([disabled="false"]) {
|
|
495
487
|
pointer-events: none;
|
|
496
488
|
|
|
@@ -554,9 +546,7 @@ propskit-text {
|
|
|
554
546
|
max-width: none;
|
|
555
547
|
min-width: 0;
|
|
556
548
|
margin-left: auto;
|
|
557
|
-
height:
|
|
558
|
-
var(--propskit-text-height) - var(--propskit-text-vertical-padding) * 2
|
|
559
|
-
);
|
|
549
|
+
height: var(--propskit-text-height);
|
|
560
550
|
border-radius: var(--radius-medium);
|
|
561
551
|
background-color: transparent;
|
|
562
552
|
box-shadow: none;
|
|
@@ -592,14 +582,14 @@ propskit-number {
|
|
|
592
582
|
|
|
593
583
|
display: block;
|
|
594
584
|
width: 100%;
|
|
595
|
-
height:
|
|
585
|
+
height: calc(
|
|
586
|
+
var(--propskit-number-height) + var(--propskit-number-vertical-padding) * 2
|
|
587
|
+
);
|
|
596
588
|
padding: var(--propskit-number-vertical-padding)
|
|
597
589
|
var(--propskit-number-horizontal-padding);
|
|
598
590
|
|
|
599
591
|
&:not([size]),
|
|
600
592
|
&[size="large"] {
|
|
601
|
-
--propskit-number-vertical-padding: 0px;
|
|
602
|
-
|
|
603
593
|
fig-field:not([direction="vertical"]) > label {
|
|
604
594
|
inset: 0 auto 0 var(--spacer-2-5);
|
|
605
595
|
}
|
|
@@ -671,10 +661,7 @@ propskit-number {
|
|
|
671
661
|
width: fit-content;
|
|
672
662
|
min-width: 0;
|
|
673
663
|
margin-left: auto;
|
|
674
|
-
height:
|
|
675
|
-
var(--propskit-number-height) -
|
|
676
|
-
var(--propskit-number-vertical-padding) * 2
|
|
677
|
-
);
|
|
664
|
+
height: var(--propskit-number-height);
|
|
678
665
|
border-radius: var(--radius-medium);
|
|
679
666
|
background-color: transparent;
|
|
680
667
|
box-shadow: none;
|
|
@@ -709,14 +696,16 @@ propskit-slider {
|
|
|
709
696
|
--propskit-slider-progress-shadow: inset 0px 0.75px 0px 0px light-dark(transparent, rgba(255, 255, 255, 0.1));
|
|
710
697
|
--field-text-shadow: 0 1px 1.5px
|
|
711
698
|
light-dark(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
|
|
712
|
-
--propskit-slider-fig-slider-height:
|
|
699
|
+
--propskit-slider-fig-slider-height: var(--propskit-slider-height);
|
|
713
700
|
--propskit-slider-fig-slider-thumb-height: calc(var(--propskit-slider-fig-slider-height) - var(--spacer-2-5));
|
|
714
701
|
--propskit-slider-number-right: 2px;
|
|
715
702
|
|
|
716
703
|
display: block;
|
|
717
704
|
position: relative;
|
|
718
705
|
width: 100%;
|
|
719
|
-
height:
|
|
706
|
+
height: calc(
|
|
707
|
+
var(--propskit-slider-height) + var(--propskit-slider-vertical-padding) * 2
|
|
708
|
+
);
|
|
720
709
|
border-radius: var(--radius-medium);
|
|
721
710
|
transform-origin: var(--propskit-slider-elastic-origin);
|
|
722
711
|
transition: transform var(--propskit-slider-elastic-transition);
|
|
@@ -727,7 +716,6 @@ propskit-slider {
|
|
|
727
716
|
|
|
728
717
|
&:not([size]),
|
|
729
718
|
&[size="large"] {
|
|
730
|
-
--propskit-slider-vertical-padding: 0px;
|
|
731
719
|
--propskit-slider-fig-slider-thumb-height: calc(
|
|
732
720
|
var(--propskit-slider-fig-slider-height) - var(--spacer-3)
|
|
733
721
|
);
|
|
@@ -796,7 +784,7 @@ propskit-slider {
|
|
|
796
784
|
outline: var(--figma-focus-outline);
|
|
797
785
|
outline-offset: var(--figma-focus-outline-offset);
|
|
798
786
|
}
|
|
799
|
-
--slider-field-height:
|
|
787
|
+
--slider-field-height: var(--propskit-slider-height);
|
|
800
788
|
--slider-thumb-width: var(--spacer-1);
|
|
801
789
|
--slider-thumb-color: light-dark(
|
|
802
790
|
var(--figma-color-text-secondary),
|
|
@@ -1377,13 +1365,17 @@ propskit-oscillator {
|
|
|
1377
1365
|
}
|
|
1378
1366
|
|
|
1379
1367
|
.propskit-oscillator-add-type-button {
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1368
|
+
width: var(--spacer-4);
|
|
1369
|
+
height: var(--spacer-4);
|
|
1370
|
+
min-width: var(--spacer-4);
|
|
1371
|
+
|
|
1372
|
+
&::part(trigger) {
|
|
1385
1373
|
padding: 0;
|
|
1386
1374
|
}
|
|
1375
|
+
|
|
1376
|
+
&::part(label) {
|
|
1377
|
+
display: none;
|
|
1378
|
+
}
|
|
1387
1379
|
}
|
|
1388
1380
|
|
|
1389
1381
|
&[disabled]:not([disabled="false"]) {
|
|
@@ -1440,270 +1432,3 @@ body.fig-reorder-dragging * {
|
|
|
1440
1432
|
.fig-reorder-indicator[data-axis="horizontal"] {
|
|
1441
1433
|
width: 2px;
|
|
1442
1434
|
}
|
|
1443
|
-
|
|
1444
|
-
/* Select — host chrome; trigger/listbox live in shadow (options slotted) */
|
|
1445
|
-
fig-select {
|
|
1446
|
-
display: inline-flex;
|
|
1447
|
-
position: relative;
|
|
1448
|
-
align-items: center;
|
|
1449
|
-
min-width: 0;
|
|
1450
|
-
height: var(--spacer-4);
|
|
1451
|
-
border-radius: var(--radius-medium);
|
|
1452
|
-
background-color: var(--figma-color-bg);
|
|
1453
|
-
color: var(--figma-color-text);
|
|
1454
|
-
box-shadow: inset 0 0 0 1px var(--figma-color-border);
|
|
1455
|
-
|
|
1456
|
-
&[full]:not([full="false"]) {
|
|
1457
|
-
display: flex;
|
|
1458
|
-
width: 100%;
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
&[disabled]:not([disabled="false"]) {
|
|
1462
|
-
pointer-events: none;
|
|
1463
|
-
color: var(--figma-color-text-tertiary);
|
|
1464
|
-
|
|
1465
|
-
&::after {
|
|
1466
|
-
background-color: var(--figma-color-icon-disabled);
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
|
-
&::after {
|
|
1471
|
-
content: "";
|
|
1472
|
-
position: absolute;
|
|
1473
|
-
right: 0.25rem;
|
|
1474
|
-
top: 50%;
|
|
1475
|
-
transform: translateY(-50%);
|
|
1476
|
-
width: 1rem;
|
|
1477
|
-
height: 1rem;
|
|
1478
|
-
mask-image: var(--icon-16-chevron);
|
|
1479
|
-
mask-size: contain;
|
|
1480
|
-
mask-repeat: no-repeat;
|
|
1481
|
-
mask-position: center;
|
|
1482
|
-
background-color: var(--figma-color-icon);
|
|
1483
|
-
pointer-events: none;
|
|
1484
|
-
z-index: 1;
|
|
1485
|
-
}
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
/*
|
|
1489
|
-
* Internal listbox is a fig-popup inside fig-select's shadow, so document
|
|
1490
|
-
* dialog[is="fig-popup"] rules don't apply. Expose part=listbox and mirror
|
|
1491
|
-
* the menu-theme popup chrome (same tokens as components.css).
|
|
1492
|
-
*/
|
|
1493
|
-
fig-select::part(listbox) {
|
|
1494
|
-
--z-index: 999999;
|
|
1495
|
-
--fig-popup-radius: var(--radius-large);
|
|
1496
|
-
--fig-popup-bg-color: var(--figma-color-bg-menu);
|
|
1497
|
-
|
|
1498
|
-
z-index: var(--z-index);
|
|
1499
|
-
position: fixed;
|
|
1500
|
-
/* Do not set inset here — ::part inset beats inline left/top and
|
|
1501
|
-
prevents edge clamping from moving the menu back into view. */
|
|
1502
|
-
margin: 0;
|
|
1503
|
-
border: 0;
|
|
1504
|
-
outline: 0;
|
|
1505
|
-
padding: 0;
|
|
1506
|
-
overflow: hidden;
|
|
1507
|
-
border-radius: var(--fig-popup-radius);
|
|
1508
|
-
background-color: var(--fig-popup-bg-color);
|
|
1509
|
-
color: var(--figma-color-text-menu);
|
|
1510
|
-
color-scheme: dark;
|
|
1511
|
-
box-shadow: var(--figma-elevation-400-menu-panel);
|
|
1512
|
-
/* width/min/max set in JS — ::part width rules override element.style. */
|
|
1513
|
-
max-height: calc(100vh - 1rem);
|
|
1514
|
-
height: max-content;
|
|
1515
|
-
}
|
|
1516
|
-
|
|
1517
|
-
/* Panel is the scroller; overflow uses top/bottom buttons (fig-chooser pattern). */
|
|
1518
|
-
fig-select-options {
|
|
1519
|
-
--fig-select-overflow-size: var(--spacer-4);
|
|
1520
|
-
|
|
1521
|
-
box-sizing: border-box;
|
|
1522
|
-
display: flex;
|
|
1523
|
-
flex-direction: column;
|
|
1524
|
-
gap: 0;
|
|
1525
|
-
width: 100%;
|
|
1526
|
-
max-width: 100%;
|
|
1527
|
-
max-height: calc(100vh - 1rem);
|
|
1528
|
-
/* No block padding — sticky overflow buttons must sit flush to the popup edges. */
|
|
1529
|
-
padding: 0;
|
|
1530
|
-
overflow: hidden auto;
|
|
1531
|
-
scrollbar-width: none;
|
|
1532
|
-
|
|
1533
|
-
&::-webkit-scrollbar {
|
|
1534
|
-
display: none;
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
& > :not(.fig-overflow) {
|
|
1538
|
-
flex-shrink: 0;
|
|
1539
|
-
}
|
|
1540
|
-
|
|
1541
|
-
/* List breathing room (not on the scroller itself). */
|
|
1542
|
-
& > :not(.fig-overflow):first-child,
|
|
1543
|
-
& > .fig-overflow-start + :not(.fig-overflow) {
|
|
1544
|
-
margin-top: var(--spacer-2);
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
& > :not(.fig-overflow):last-child,
|
|
1548
|
-
& > :not(.fig-overflow):has(+ .fig-overflow-end) {
|
|
1549
|
-
margin-bottom: var(--spacer-2);
|
|
1550
|
-
}
|
|
1551
|
-
|
|
1552
|
-
& > .fig-overflow {
|
|
1553
|
-
position: sticky;
|
|
1554
|
-
left: 0;
|
|
1555
|
-
flex: 0 0 var(--fig-select-overflow-size);
|
|
1556
|
-
width: 100%;
|
|
1557
|
-
height: var(--fig-select-overflow-size);
|
|
1558
|
-
margin: 0;
|
|
1559
|
-
z-index: 3;
|
|
1560
|
-
/* Menu chrome — not option hover (bg-menu-hover is brand blue). */
|
|
1561
|
-
color: var(--figma-color-text-menu);
|
|
1562
|
-
background: var(--figma-color-bg-menu) !important;
|
|
1563
|
-
|
|
1564
|
-
&::before {
|
|
1565
|
-
inset: 0;
|
|
1566
|
-
border-radius: 0;
|
|
1567
|
-
background: var(--figma-color-bg-menu) !important;
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
|
-
&:hover::before {
|
|
1571
|
-
background: light-dark(
|
|
1572
|
-
rgba(0, 0, 0, 0.06),
|
|
1573
|
-
rgba(255, 255, 255, 0.08)
|
|
1574
|
-
)
|
|
1575
|
-
!important;
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1578
|
-
&:hover {
|
|
1579
|
-
color: var(--figma-color-text-menu);
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
& > .fig-overflow-start {
|
|
1584
|
-
order: -1;
|
|
1585
|
-
top: 0;
|
|
1586
|
-
margin-block-end: calc(-1 * var(--fig-select-overflow-size));
|
|
1587
|
-
|
|
1588
|
-
&::before {
|
|
1589
|
-
border-radius: var(--radius-large) var(--radius-large) 0 0;
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
.fig-overflow-chevron {
|
|
1593
|
-
rotate: 180deg;
|
|
1594
|
-
}
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
& > .fig-overflow-end {
|
|
1598
|
-
order: 1;
|
|
1599
|
-
bottom: 0;
|
|
1600
|
-
margin-block-start: calc(-1 * var(--fig-select-overflow-size));
|
|
1601
|
-
|
|
1602
|
-
&::before {
|
|
1603
|
-
border-radius: 0 0 var(--radius-large) var(--radius-large);
|
|
1604
|
-
}
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
& > fig-menu-separator {
|
|
1608
|
-
--fig-menu-separator-color: var(--figma-color-border-menu);
|
|
1609
|
-
--fig-menu-separator-label-color: var(--figma-color-text-menu-secondary);
|
|
1610
|
-
|
|
1611
|
-
/* Align label with option text (padding + checkmark column).
|
|
1612
|
-
Negative margins on ::before must match this padding exactly so the
|
|
1613
|
-
rule bleeds to the listbox edges (base rule uses --fig-menu-item-padding). */
|
|
1614
|
-
&[label]:not([label=""]) {
|
|
1615
|
-
padding-left: var(--spacer-5);
|
|
1616
|
-
padding-right: var(--spacer-2);
|
|
1617
|
-
|
|
1618
|
-
&::before {
|
|
1619
|
-
margin-inline: unset;
|
|
1620
|
-
margin-left: calc(-1 * var(--spacer-5));
|
|
1621
|
-
margin-right: calc(-1 * var(--spacer-2));
|
|
1622
|
-
}
|
|
1623
|
-
}
|
|
1624
|
-
}
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
fig-select-option {
|
|
1628
|
-
/* Match fig-dropdown[experimental~="modern"] option + option::checkmark */
|
|
1629
|
-
display: flex;
|
|
1630
|
-
align-items: center;
|
|
1631
|
-
gap: 0;
|
|
1632
|
-
position: relative;
|
|
1633
|
-
min-height: var(--spacer-4);
|
|
1634
|
-
height: auto;
|
|
1635
|
-
padding: var(--spacer-1) var(--spacer-2);
|
|
1636
|
-
padding-right: var(--spacer-3);
|
|
1637
|
-
border-radius: var(--radius-medium);
|
|
1638
|
-
color: var(--figma-color-text-menu);
|
|
1639
|
-
cursor: default;
|
|
1640
|
-
user-select: none;
|
|
1641
|
-
|
|
1642
|
-
&::before {
|
|
1643
|
-
content: "";
|
|
1644
|
-
display: block;
|
|
1645
|
-
position: absolute;
|
|
1646
|
-
inset: 0 var(--spacer-2);
|
|
1647
|
-
border-radius: var(--radius-medium);
|
|
1648
|
-
z-index: -1;
|
|
1649
|
-
background-color: transparent;
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
&::after {
|
|
1653
|
-
content: "";
|
|
1654
|
-
display: block;
|
|
1655
|
-
flex: 0 0 1rem;
|
|
1656
|
-
order: -1;
|
|
1657
|
-
width: 1rem;
|
|
1658
|
-
height: 1rem;
|
|
1659
|
-
margin-left: var(--spacer-1);
|
|
1660
|
-
background-color: currentColor;
|
|
1661
|
-
-webkit-mask-image: var(--icon-16-checkmark);
|
|
1662
|
-
mask-image: var(--icon-16-checkmark);
|
|
1663
|
-
-webkit-mask-repeat: no-repeat;
|
|
1664
|
-
mask-repeat: no-repeat;
|
|
1665
|
-
-webkit-mask-position: center;
|
|
1666
|
-
mask-position: center;
|
|
1667
|
-
-webkit-mask-size: contain;
|
|
1668
|
-
mask-size: contain;
|
|
1669
|
-
visibility: hidden;
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
& > [slot="prepend"] {
|
|
1673
|
-
margin-top: calc(var(--spacer-1) * -1);
|
|
1674
|
-
margin-bottom: calc(var(--spacer-1) * -1);
|
|
1675
|
-
margin-right: var(--spacer-1);
|
|
1676
|
-
}
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
& > :not([slot="prepend"]):not([slot="append"]) {
|
|
1680
|
-
flex: 1 1 auto;
|
|
1681
|
-
min-width: 0;
|
|
1682
|
-
}
|
|
1683
|
-
|
|
1684
|
-
& > [slot="append"] {
|
|
1685
|
-
flex: 0 0 auto;
|
|
1686
|
-
margin-inline-start: auto;
|
|
1687
|
-
color: var(--figma-color-text-tertiary);
|
|
1688
|
-
}
|
|
1689
|
-
|
|
1690
|
-
&:hover,
|
|
1691
|
-
&:focus-visible {
|
|
1692
|
-
outline: none;
|
|
1693
|
-
|
|
1694
|
-
&::before {
|
|
1695
|
-
background-color: var(--figma-color-bg-menu-hover);
|
|
1696
|
-
}
|
|
1697
|
-
}
|
|
1698
|
-
|
|
1699
|
-
&[selected]:not([selected="false"])::after,
|
|
1700
|
-
&[aria-selected="true"]::after {
|
|
1701
|
-
visibility: visible;
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
&[disabled]:not([disabled="false"]),
|
|
1705
|
-
&[aria-disabled="true"] {
|
|
1706
|
-
opacity: 0.4;
|
|
1707
|
-
pointer-events: none;
|
|
1708
|
-
}
|
|
1709
|
-
}
|