@rogieking/figui3 1.0.92 → 1.0.94
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/example.html +9 -3
- package/fig.css +29 -78
- package/package.json +1 -1
package/example.html
CHANGED
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
<h2>Heading 2</h2>
|
|
20
20
|
<h3>Heading 3</h3>
|
|
21
21
|
<br />
|
|
22
|
+
<fig-button disabled>Button 1</fig-button>
|
|
23
|
+
<br /><br />
|
|
24
|
+
<fig-button variant="secondary"
|
|
25
|
+
disabled>Button 1</fig-button>
|
|
26
|
+
<br /><br />
|
|
22
27
|
<fig-button-combo>
|
|
23
28
|
<fig-button disabled>Button 1</fig-button>
|
|
24
29
|
<fig-button disabled>Button 2</fig-button>
|
|
@@ -34,11 +39,11 @@
|
|
|
34
39
|
disabled>Button 3</fig-button>
|
|
35
40
|
</fig-button-combo>
|
|
36
41
|
<br /><br />
|
|
37
|
-
<fig-dropdown>
|
|
42
|
+
<fig-dropdown style="width:100px;">
|
|
38
43
|
<option>One</option>
|
|
39
44
|
<option>Two</option>
|
|
40
45
|
<option>Three</option>
|
|
41
|
-
<option selected>
|
|
46
|
+
<option selected>Fourhundred sixty two</option>
|
|
42
47
|
</fig-dropdown>
|
|
43
48
|
<br /><br />
|
|
44
49
|
<fig-slider min="0"
|
|
@@ -215,7 +220,8 @@
|
|
|
215
220
|
<fig-button-combo>
|
|
216
221
|
<fig-button>Primary</fig-button>
|
|
217
222
|
<fig-button icon="true"
|
|
218
|
-
type="select"
|
|
223
|
+
type="select"
|
|
224
|
+
size="compact">
|
|
219
225
|
<svg width="24"
|
|
220
226
|
height="24"
|
|
221
227
|
viewBox="0 0 24 24"
|
package/fig.css
CHANGED
|
@@ -584,7 +584,7 @@ textarea {
|
|
|
584
584
|
select,
|
|
585
585
|
input[type="text"][list] {
|
|
586
586
|
height: var(--spacer-4);
|
|
587
|
-
padding: 0 var(--spacer-2);
|
|
587
|
+
padding: 0 calc(var(--spacer-2) - 1px);
|
|
588
588
|
appearance: none;
|
|
589
589
|
border-radius: var(--radius-medium);
|
|
590
590
|
display: flex;
|
|
@@ -595,6 +595,9 @@ input[type="text"][list] {
|
|
|
595
595
|
background-color: var(--figma-color-bg);
|
|
596
596
|
box-shadow: inset 0 0 0 1px var(--figma-color-border);
|
|
597
597
|
accent-color: var(--figma-color-bg-brand);
|
|
598
|
+
overflow:hidden;
|
|
599
|
+
white-space:nowrap;
|
|
600
|
+
text-overflow:ellipsis;
|
|
598
601
|
|
|
599
602
|
&:focus {
|
|
600
603
|
box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
|
|
@@ -635,13 +638,13 @@ fig-dropdown,
|
|
|
635
638
|
}
|
|
636
639
|
> select {
|
|
637
640
|
display: block;
|
|
641
|
+
width: 100%;
|
|
638
642
|
}
|
|
639
643
|
}
|
|
640
644
|
|
|
641
645
|
/* Button */
|
|
642
646
|
.fig-button,
|
|
643
647
|
fig-button {
|
|
644
|
-
box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
|
|
645
648
|
color: var(--figma-color-text-onbrand);
|
|
646
649
|
display: flex;
|
|
647
650
|
align-items: center;
|
|
@@ -656,25 +659,6 @@ fig-button {
|
|
|
656
659
|
background-color: var(--figma-color-bg-brand);
|
|
657
660
|
font-weight: 500;
|
|
658
661
|
|
|
659
|
-
& > button {
|
|
660
|
-
background: transparent;
|
|
661
|
-
box-shadow: none;
|
|
662
|
-
border: 0;
|
|
663
|
-
appearance: none;
|
|
664
|
-
outline: 0;
|
|
665
|
-
display: flex;
|
|
666
|
-
align-items: center;
|
|
667
|
-
justify-content: center;
|
|
668
|
-
border-radius: var(--radius-medium);
|
|
669
|
-
height: var(--spacer-4);
|
|
670
|
-
padding: 0 var(--spacer-2);
|
|
671
|
-
color: currentColor;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
&:has(> button) {
|
|
675
|
-
padding: 0;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
662
|
&:active {
|
|
679
663
|
background-color: var(--figma-color-bg-brand-pressed);
|
|
680
664
|
}
|
|
@@ -706,7 +690,8 @@ fig-button {
|
|
|
706
690
|
|
|
707
691
|
/* Variant: Secondary */
|
|
708
692
|
&[variant="secondary"] {
|
|
709
|
-
|
|
693
|
+
border: 1px solid var(--figma-color-border);
|
|
694
|
+
padding: 0 calc(var(--spacer-2) - 1px);
|
|
710
695
|
background: none;
|
|
711
696
|
color: var(--figma-color-text);
|
|
712
697
|
|
|
@@ -722,13 +707,16 @@ fig-button {
|
|
|
722
707
|
}
|
|
723
708
|
|
|
724
709
|
/* Icon only */
|
|
725
|
-
&[icon]
|
|
726
|
-
&[icon] > button {
|
|
710
|
+
&[icon]{
|
|
727
711
|
width: var(--spacer-4);
|
|
728
712
|
padding: 0;
|
|
729
713
|
flex-grow: 0;
|
|
730
714
|
flex-shrink: 0;
|
|
731
715
|
flex-basis: var(--spacer-4);
|
|
716
|
+
&[size="compact"]{
|
|
717
|
+
width: var(--spacer-3);
|
|
718
|
+
flex-basis: var(--spacer-3);
|
|
719
|
+
}
|
|
732
720
|
}
|
|
733
721
|
|
|
734
722
|
/* Disabled */
|
|
@@ -839,18 +827,16 @@ fig-input-combo {
|
|
|
839
827
|
}
|
|
840
828
|
.fig-button-combo,
|
|
841
829
|
fig-button-combo {
|
|
842
|
-
> *:not(:first-child) {
|
|
843
|
-
|
|
844
|
-
margin-left: -1px;
|
|
830
|
+
> *:not([variant="secondary"]):not(:first-child) {
|
|
831
|
+
box-shadow: inset 1px 0 0 0 var(--figma-color-bg-brand-hover);
|
|
845
832
|
&[disabled]:not([disabled="false"]) {
|
|
846
|
-
|
|
833
|
+
box-shadow: inset 1px 0 0 0 var(--figma-color-border-disabled);
|
|
847
834
|
}
|
|
848
835
|
}
|
|
849
836
|
> *[variant="secondary"]:not(:first-child) {
|
|
850
|
-
border-left:
|
|
851
|
-
margin-left: -1px;
|
|
837
|
+
border-left-width: 0 !important;
|
|
852
838
|
&[disabled]:not([disabled="false"]) {
|
|
853
|
-
border-left:
|
|
839
|
+
border-left-width: 0 !important;
|
|
854
840
|
}
|
|
855
841
|
}
|
|
856
842
|
}
|
|
@@ -1438,44 +1424,8 @@ details {
|
|
|
1438
1424
|
content: var(--icon-chevron);
|
|
1439
1425
|
}
|
|
1440
1426
|
|
|
1441
|
-
/* Details
|
|
1442
|
-
|
|
1443
|
-
details summary{
|
|
1444
|
-
cursor: pointer;
|
|
1445
|
-
user-select: none;
|
|
1446
|
-
padding: 0 1rem;
|
|
1447
|
-
min-height: 2rem;
|
|
1448
|
-
list-style: none;
|
|
1449
|
-
pointer-events: none;
|
|
1450
|
-
}
|
|
1451
|
-
details summary>*{
|
|
1452
|
-
pointer-events: all;
|
|
1453
|
-
}
|
|
1454
|
-
details summary:before{
|
|
1455
|
-
content: '▸';
|
|
1456
|
-
display: inline-flex;
|
|
1457
|
-
align-items: start;
|
|
1458
|
-
justify-content: center;
|
|
1459
|
-
width: 0.75rem;
|
|
1460
|
-
margin-right: -0.75rem;
|
|
1461
|
-
transform: translateX(-100%);
|
|
1462
|
-
color: inherit;
|
|
1463
|
-
visibility: hidden;
|
|
1464
|
-
}
|
|
1465
|
-
details summary:hover:before{
|
|
1466
|
-
visibility: visible;
|
|
1467
|
-
}
|
|
1468
|
-
details[open] summary:before{
|
|
1469
|
-
content: '▾';
|
|
1470
|
-
}
|
|
1471
|
-
details summary:first-child:last-child:before{
|
|
1472
|
-
content: '';
|
|
1473
|
-
}
|
|
1474
|
-
details summary:first-child:last-child h3{
|
|
1475
|
-
pointer-events: none;
|
|
1476
|
-
}
|
|
1477
|
-
*/
|
|
1478
1427
|
|
|
1428
|
+
/* Sliders */
|
|
1479
1429
|
.fig-slider,
|
|
1480
1430
|
fig-slider {
|
|
1481
1431
|
--slider-height: 1rem;
|
|
@@ -1508,6 +1458,7 @@ fig-slider {
|
|
|
1508
1458
|
position: absolute;
|
|
1509
1459
|
left: 0;
|
|
1510
1460
|
top: 0;
|
|
1461
|
+
pointer-events: none;
|
|
1511
1462
|
bottom: 0;
|
|
1512
1463
|
border-radius: 0.5rem;
|
|
1513
1464
|
min-width: var(--slider-height);
|
|
@@ -1594,11 +1545,9 @@ fig-slider {
|
|
|
1594
1545
|
border-radius: calc(var(--slider-height) / 2);
|
|
1595
1546
|
display: block;
|
|
1596
1547
|
width: 100%;
|
|
1597
|
-
cursor: grab;
|
|
1598
|
-
cursor: -webkit-grab;
|
|
1599
1548
|
background-color: transparent;
|
|
1600
1549
|
|
|
1601
|
-
&:active {
|
|
1550
|
+
&:active::-webkit-slider-thumb {
|
|
1602
1551
|
cursor: grabbing;
|
|
1603
1552
|
cursor: -webkit-grabbing;
|
|
1604
1553
|
}
|
|
@@ -1617,6 +1566,8 @@ fig-slider {
|
|
|
1617
1566
|
border: none;
|
|
1618
1567
|
position: relative;
|
|
1619
1568
|
z-index: 1;
|
|
1569
|
+
cursor: grab;
|
|
1570
|
+
cursor: -webkit-grab;
|
|
1620
1571
|
box-shadow: var(--slider-handle-shadow);
|
|
1621
1572
|
}
|
|
1622
1573
|
|
|
@@ -1663,19 +1614,17 @@ fig-slider {
|
|
|
1663
1614
|
border-radius: calc(var(--slider-height) / 2);
|
|
1664
1615
|
display: block;
|
|
1665
1616
|
width: 100%;
|
|
1666
|
-
cursor: grab;
|
|
1667
|
-
cursor: -moz-grab;
|
|
1668
1617
|
background-color: transparent;
|
|
1669
1618
|
|
|
1670
|
-
&:active {
|
|
1671
|
-
cursor: grabbing;
|
|
1672
|
-
cursor: -moz-grabbing;
|
|
1673
|
-
}
|
|
1674
|
-
|
|
1675
1619
|
&:focus {
|
|
1676
1620
|
outline: none;
|
|
1677
1621
|
}
|
|
1678
1622
|
|
|
1623
|
+
&:active::-moz-range-thumb {
|
|
1624
|
+
cursor: grabbing;
|
|
1625
|
+
cursor: -webkit-grabbing;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1679
1628
|
&::-moz-range-thumb {
|
|
1680
1629
|
appearance: none;
|
|
1681
1630
|
border-radius: 0.5rem;
|
|
@@ -1685,6 +1634,8 @@ fig-slider {
|
|
|
1685
1634
|
border: none;
|
|
1686
1635
|
position: relative;
|
|
1687
1636
|
z-index: 1;
|
|
1637
|
+
cursor: grab;
|
|
1638
|
+
cursor: -moz-grab;
|
|
1688
1639
|
box-shadow: var(--slider-handle-shadow);
|
|
1689
1640
|
}
|
|
1690
1641
|
|
package/package.json
CHANGED