@rogieking/figui3 3.16.0 → 3.18.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/README.md +763 -642
- package/components.css +106 -27
- package/dist/base.css +1 -99
- package/dist/components.css +1 -3978
- package/dist/fig.css +1 -2
- package/dist/fig.js +83 -81
- package/fig.js +918 -153
- package/package.json +14 -9
package/components.css
CHANGED
|
@@ -741,7 +741,6 @@ fig-button {
|
|
|
741
741
|
appearance: none;
|
|
742
742
|
border: 0;
|
|
743
743
|
min-width: 0;
|
|
744
|
-
color: var(--figma-color-text-onbrand);
|
|
745
744
|
outline: 0;
|
|
746
745
|
border-radius: var(--radius-medium);
|
|
747
746
|
background-color: var(--figma-color-bg-brand);
|
|
@@ -753,9 +752,6 @@ fig-button {
|
|
|
753
752
|
|
|
754
753
|
&:hover {
|
|
755
754
|
background-color: var(--figma-color-bg-brand-hover);
|
|
756
|
-
&:active {
|
|
757
|
-
background-color: var(--figma-color-bg-brand-pressed);
|
|
758
|
-
}
|
|
759
755
|
&:active {
|
|
760
756
|
background-color: var(--figma-color-bg-brand-pressed);
|
|
761
757
|
color: var(--figma-color-text-onbrand-secondary);
|
|
@@ -1020,7 +1016,6 @@ fig-tab,
|
|
|
1020
1016
|
&::after {
|
|
1021
1017
|
content: attr(label);
|
|
1022
1018
|
color: var(--figma-color-text-secondary);
|
|
1023
|
-
content: attr(label);
|
|
1024
1019
|
height: 0 !important;
|
|
1025
1020
|
width: auto !important;
|
|
1026
1021
|
visibility: hidden;
|
|
@@ -1159,7 +1154,6 @@ input[type="color"] {
|
|
|
1159
1154
|
&::-moz-color-swatch {
|
|
1160
1155
|
color-scheme: inherit;
|
|
1161
1156
|
border-radius: 0.125rem;
|
|
1162
|
-
color-scheme: inherit;
|
|
1163
1157
|
padding: 0;
|
|
1164
1158
|
border: 0;
|
|
1165
1159
|
appearance: none;
|
|
@@ -1169,7 +1163,6 @@ input[type="color"] {
|
|
|
1169
1163
|
black 50%,
|
|
1170
1164
|
rgba(0, 0, 0, var(--alpha)) 50%
|
|
1171
1165
|
);
|
|
1172
|
-
border-radius: 0.125rem;
|
|
1173
1166
|
box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
|
|
1174
1167
|
}
|
|
1175
1168
|
}
|
|
@@ -1231,11 +1224,9 @@ fig-chit {
|
|
|
1231
1224
|
&::before,
|
|
1232
1225
|
&::after {
|
|
1233
1226
|
content: "";
|
|
1234
|
-
width: var(--width);
|
|
1235
|
-
height: var(--height);
|
|
1236
|
-
border-radius: calc(var(--border-radius) - (var(--padding) / 2));
|
|
1237
1227
|
width: calc(var(--width) - var(--padding) * 2);
|
|
1238
1228
|
height: calc(var(--height) - var(--padding) * 2);
|
|
1229
|
+
border-radius: calc(var(--border-radius) - (var(--padding) / 2));
|
|
1239
1230
|
grid-area: 1/1;
|
|
1240
1231
|
place-self: center;
|
|
1241
1232
|
pointer-events: none;
|
|
@@ -1268,7 +1259,6 @@ fig-chit {
|
|
|
1268
1259
|
background: none;
|
|
1269
1260
|
width: var(--width);
|
|
1270
1261
|
height: var(--height);
|
|
1271
|
-
background: none;
|
|
1272
1262
|
grid-area: 1/1;
|
|
1273
1263
|
place-self: center;
|
|
1274
1264
|
box-sizing: border-box;
|
|
@@ -1474,7 +1464,6 @@ fig-3d-rotate {
|
|
|
1474
1464
|
rgba(255, 255, 255, 0.1)
|
|
1475
1465
|
);
|
|
1476
1466
|
--border-end-color: transparent;
|
|
1477
|
-
--border-end-color: transparent;
|
|
1478
1467
|
--gradient-end-color: transparent;
|
|
1479
1468
|
--figma-3d-rotate-handle-size: 6px;
|
|
1480
1469
|
--front-face-bg: light-dark(var(--figma-color-bg), #555);
|
|
@@ -1886,7 +1875,6 @@ input[type="checkbox"].switch {
|
|
|
1886
1875
|
height: 1rem;
|
|
1887
1876
|
left: 0;
|
|
1888
1877
|
top: 0;
|
|
1889
|
-
margin: 0;
|
|
1890
1878
|
background: transparent;
|
|
1891
1879
|
appearance: none;
|
|
1892
1880
|
-moz-appearance: none;
|
|
@@ -3137,7 +3125,11 @@ fig-input-fill {
|
|
|
3137
3125
|
}
|
|
3138
3126
|
}
|
|
3139
3127
|
fig-input-gradient {
|
|
3128
|
+
--height: 1.5rem;
|
|
3140
3129
|
position: relative;
|
|
3130
|
+
height: var(--height);
|
|
3131
|
+
width: 100%;
|
|
3132
|
+
min-width: 0;
|
|
3141
3133
|
|
|
3142
3134
|
&:focus,
|
|
3143
3135
|
&:active,
|
|
@@ -3159,6 +3151,7 @@ fig-input-gradient {
|
|
|
3159
3151
|
align-items: center;
|
|
3160
3152
|
inset: 0;
|
|
3161
3153
|
pointer-events: auto;
|
|
3154
|
+
z-index: 1;
|
|
3162
3155
|
|
|
3163
3156
|
fig-handle {
|
|
3164
3157
|
pointer-events: auto;
|
|
@@ -3254,9 +3247,6 @@ fig-input-palette {
|
|
|
3254
3247
|
border-radius: var(--radius-medium) !important;
|
|
3255
3248
|
}
|
|
3256
3249
|
}
|
|
3257
|
-
|
|
3258
|
-
&[expanded]:not([expanded="false"]) {
|
|
3259
|
-
}
|
|
3260
3250
|
}
|
|
3261
3251
|
|
|
3262
3252
|
fig-field[direction="horizontal"]:has(> fig-input-palette) {
|
|
@@ -3297,7 +3287,6 @@ fig-field,
|
|
|
3297
3287
|
}
|
|
3298
3288
|
|
|
3299
3289
|
& > [full] {
|
|
3300
|
-
flex: 1;
|
|
3301
3290
|
flex: 1 1 auto;
|
|
3302
3291
|
}
|
|
3303
3292
|
|
|
@@ -3558,7 +3547,6 @@ fig-segmented-control {
|
|
|
3558
3547
|
height: 1.5rem;
|
|
3559
3548
|
padding: 1px;
|
|
3560
3549
|
gap: 0;
|
|
3561
|
-
display: inline-flex;
|
|
3562
3550
|
align-items: stretch;
|
|
3563
3551
|
position: relative;
|
|
3564
3552
|
overflow: hidden;
|
|
@@ -3718,8 +3706,6 @@ fig-joystick {
|
|
|
3718
3706
|
place-items: center;
|
|
3719
3707
|
flex-shrink: 0;
|
|
3720
3708
|
flex-grow: 0;
|
|
3721
|
-
align-items: center;
|
|
3722
|
-
justify-content: center;
|
|
3723
3709
|
position: relative;
|
|
3724
3710
|
&:focus {
|
|
3725
3711
|
outline: 0;
|
|
@@ -3823,7 +3809,6 @@ fig-joystick {
|
|
|
3823
3809
|
&:before {
|
|
3824
3810
|
content: "";
|
|
3825
3811
|
position: absolute;
|
|
3826
|
-
height: 0;
|
|
3827
3812
|
border-left: 1px solid var(--figma-color-border);
|
|
3828
3813
|
height: calc(100% - 2px);
|
|
3829
3814
|
top: 1px;
|
|
@@ -3833,7 +3818,6 @@ fig-joystick {
|
|
|
3833
3818
|
&:after {
|
|
3834
3819
|
content: "";
|
|
3835
3820
|
position: absolute;
|
|
3836
|
-
height: 0;
|
|
3837
3821
|
border-top: 1px solid var(--figma-color-border);
|
|
3838
3822
|
width: calc(100% - 2px);
|
|
3839
3823
|
top: calc(50% - 0.5px);
|
|
@@ -4831,20 +4815,33 @@ fig-handle {
|
|
|
4831
4815
|
--box-shadow: 0px 0 0 0.5px rgba(0, 0, 0, 0.1), var(--elevation-100-canvas);
|
|
4832
4816
|
--outline: none;
|
|
4833
4817
|
--border: none;
|
|
4818
|
+
--fig-handle-hit-area-opacity: 0;
|
|
4819
|
+
--fig-handle-hit-area-size: 0;
|
|
4834
4820
|
|
|
4835
|
-
display: grid;
|
|
4836
4821
|
margin: 0;
|
|
4837
4822
|
padding: 0;
|
|
4838
4823
|
place-items: center;
|
|
4839
4824
|
width: var(--width);
|
|
4840
4825
|
height: var(--height);
|
|
4841
|
-
background: var(--handle-color);
|
|
4842
4826
|
border-radius: var(--border-radius);
|
|
4843
|
-
|
|
4844
|
-
outline: var(--outline);
|
|
4845
|
-
border: var(--border);
|
|
4827
|
+
display: grid;
|
|
4846
4828
|
|
|
4847
4829
|
&::before {
|
|
4830
|
+
content: "";
|
|
4831
|
+
color-scheme: light only;
|
|
4832
|
+
width: var(--width);
|
|
4833
|
+
height: var(--height);
|
|
4834
|
+
background: var(--handle-color);
|
|
4835
|
+
border-radius: var(--border-radius);
|
|
4836
|
+
box-shadow: var(--box-shadow);
|
|
4837
|
+
outline: var(--outline);
|
|
4838
|
+
border: var(--border);
|
|
4839
|
+
place-self: center;
|
|
4840
|
+
grid-area: 1 / 1;
|
|
4841
|
+
z-index: 1;
|
|
4842
|
+
}
|
|
4843
|
+
|
|
4844
|
+
&::after {
|
|
4848
4845
|
content: "";
|
|
4849
4846
|
color-scheme: light only;
|
|
4850
4847
|
width: calc(var(--width) - var(--ring-width) * 2);
|
|
@@ -4853,6 +4850,8 @@ fig-handle {
|
|
|
4853
4850
|
border-radius: var(--border-radius);
|
|
4854
4851
|
box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
|
|
4855
4852
|
place-self: center;
|
|
4853
|
+
grid-area: 1 / 1;
|
|
4854
|
+
z-index: 2;
|
|
4856
4855
|
}
|
|
4857
4856
|
|
|
4858
4857
|
&[size="small"] {
|
|
@@ -4888,6 +4887,15 @@ fig-handle {
|
|
|
4888
4887
|
z-index: 10;
|
|
4889
4888
|
}
|
|
4890
4889
|
}
|
|
4890
|
+
|
|
4891
|
+
.fig-handle-hit-area {
|
|
4892
|
+
position: absolute;
|
|
4893
|
+
inset: calc(var(--fig-handle-hit-area-size) * -0.5px);
|
|
4894
|
+
pointer-events: auto;
|
|
4895
|
+
background: red;
|
|
4896
|
+
opacity: var(--fig-handle-hit-area-opacity, 0);
|
|
4897
|
+
z-index: 0;
|
|
4898
|
+
}
|
|
4891
4899
|
}
|
|
4892
4900
|
|
|
4893
4901
|
fig-color-tip {
|
|
@@ -4969,3 +4977,74 @@ fig-color-tip {
|
|
|
4969
4977
|
}
|
|
4970
4978
|
}
|
|
4971
4979
|
}
|
|
4980
|
+
|
|
4981
|
+
/* Canvas Point */
|
|
4982
|
+
fig-canvas-point {
|
|
4983
|
+
display: contents;
|
|
4984
|
+
--fig-canvas-point-line-stroke: rgba(255, 255, 255, 0.5);
|
|
4985
|
+
--fig-canvas-point-line-stroke-hover: var(--figma-color-bg-brand);
|
|
4986
|
+
--fig-canvas-point-line-stroke-active: var(--figma-color-bg-brand);
|
|
4987
|
+
--fig-canvas-point-line-stroke-width: 1.5px;
|
|
4988
|
+
|
|
4989
|
+
& > fig-handle,
|
|
4990
|
+
& > fig-tooltip:has(fig-handle:not([size="small"])) {
|
|
4991
|
+
z-index: 1;
|
|
4992
|
+
}
|
|
4993
|
+
|
|
4994
|
+
.fig-canvas-point-radius {
|
|
4995
|
+
position: absolute;
|
|
4996
|
+
pointer-events: none;
|
|
4997
|
+
overflow: visible;
|
|
4998
|
+
|
|
4999
|
+
circle {
|
|
5000
|
+
fill: none;
|
|
5001
|
+
stroke: var(--fig-canvas-point-line-stroke);
|
|
5002
|
+
stroke-width: var(--fig-canvas-point-line-stroke-width);
|
|
5003
|
+
paint-order: stroke fill;
|
|
5004
|
+
filter: drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.3))
|
|
5005
|
+
drop-shadow(0 0.5px 1px rgba(0, 0, 0, 0.12));
|
|
5006
|
+
}
|
|
5007
|
+
|
|
5008
|
+
.fig-canvas-point-radius-hit {
|
|
5009
|
+
stroke: transparent;
|
|
5010
|
+
stroke-width: 12px;
|
|
5011
|
+
pointer-events: stroke;
|
|
5012
|
+
filter: none;
|
|
5013
|
+
|
|
5014
|
+
&:hover ~ circle {
|
|
5015
|
+
stroke: var(--fig-canvas-point-line-stroke-hover);
|
|
5016
|
+
}
|
|
5017
|
+
}
|
|
5018
|
+
}
|
|
5019
|
+
|
|
5020
|
+
&:has(.fig-canvas-point-radius-hit:hover) .fig-canvas-point-angle-line,
|
|
5021
|
+
&.fig-canvas-point-ring-active .fig-canvas-point-angle-line {
|
|
5022
|
+
stroke: var(--fig-canvas-point-line-stroke-active);
|
|
5023
|
+
}
|
|
5024
|
+
|
|
5025
|
+
&.fig-canvas-point-ring-active
|
|
5026
|
+
.fig-canvas-point-radius
|
|
5027
|
+
circle:not(.fig-canvas-point-radius-hit) {
|
|
5028
|
+
stroke: var(--fig-canvas-point-line-stroke-active);
|
|
5029
|
+
}
|
|
5030
|
+
|
|
5031
|
+
.fig-canvas-point-angle-svg {
|
|
5032
|
+
pointer-events: none;
|
|
5033
|
+
}
|
|
5034
|
+
|
|
5035
|
+
.fig-canvas-point-angle-line {
|
|
5036
|
+
stroke: var(--fig-canvas-point-line-stroke);
|
|
5037
|
+
stroke-width: var(--fig-canvas-point-line-stroke-width);
|
|
5038
|
+
paint-order: stroke fill;
|
|
5039
|
+
filter: drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.3))
|
|
5040
|
+
drop-shadow(0 0.5px 1px rgba(0, 0, 0, 0.12));
|
|
5041
|
+
}
|
|
5042
|
+
|
|
5043
|
+
fig-handle[size="small"] {
|
|
5044
|
+
z-index: 2;
|
|
5045
|
+
|
|
5046
|
+
.fig-handle-hit-area {
|
|
5047
|
+
cursor: grab;
|
|
5048
|
+
}
|
|
5049
|
+
}
|
|
5050
|
+
}
|
package/dist/base.css
CHANGED
|
@@ -1,99 +1 @@
|
|
|
1
|
-
html {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 100%;
|
|
4
|
-
margin: 0;
|
|
5
|
-
padding: 0;
|
|
6
|
-
color: var(--figma-color-text);
|
|
7
|
-
-webkit-font-smoothing: antialiased;
|
|
8
|
-
-moz-osx-font-smoothing: grayscale;
|
|
9
|
-
font-family: var(--font-family);
|
|
10
|
-
font-size: 16px;
|
|
11
|
-
font-weight: var(--body-medium-fontWeight);
|
|
12
|
-
letter-spacing: var(--body-letter-spacing);
|
|
13
|
-
background-color: var(--figma-color-bg);
|
|
14
|
-
}
|
|
15
|
-
body {
|
|
16
|
-
font-size: var(--body-medium-fontSize);
|
|
17
|
-
letter-spacing: var(--body-letter-spacing);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
h1,
|
|
21
|
-
h2 {
|
|
22
|
-
font-weight: var(--body-large-strong-fontWeight);
|
|
23
|
-
font-size: var(--body-large-fontSize);
|
|
24
|
-
}
|
|
25
|
-
h3 {
|
|
26
|
-
font-weight: var(--body-medium-strong-fontWeight);
|
|
27
|
-
font-size: var(--body-medium-fontSize);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
hr {
|
|
31
|
-
height: 1px;
|
|
32
|
-
border: none;
|
|
33
|
-
background-color: var(--figma-color-border);
|
|
34
|
-
margin: var(--spacer-2) 0;
|
|
35
|
-
|
|
36
|
-
&[vertical] {
|
|
37
|
-
height: 100%;
|
|
38
|
-
width: 1px;
|
|
39
|
-
margin: 0 var(--spacer-2);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
*,
|
|
44
|
-
*:before,
|
|
45
|
-
*:after {
|
|
46
|
-
box-sizing: border-box;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
::selection {
|
|
50
|
-
background-color: var(--figma-color-text-selection);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
::-moz-selection {
|
|
54
|
-
background-color: var(--figma-color-text-selection);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* helper classes/defaults */
|
|
58
|
-
::-webkit-scrollbar {
|
|
59
|
-
width: var(--spacer-1);
|
|
60
|
-
/* Width of the vertical scrollbar */
|
|
61
|
-
height: var(--spacer-1);
|
|
62
|
-
/* Height of the horizontal scrollbar */
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
::-webkit-scrollbar-thumb {
|
|
66
|
-
background-color: var(--figma-color-bg-tertiary);
|
|
67
|
-
border-radius: calc(var(--spacer-1) / 2);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
::-webkit-scrollbar-thumb:hover {
|
|
71
|
-
background-color: var(--figma-color-bg-secondary);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* For Firefox */
|
|
75
|
-
* {
|
|
76
|
-
scrollbar-width: thin;
|
|
77
|
-
scrollbar-color: var(--figma-color-bg-tertiary)
|
|
78
|
-
var(--figma-color-bg-secondary);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.subtle {
|
|
82
|
-
color: var(--figma-color-text-tertiary);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/* Defaults */
|
|
86
|
-
p {
|
|
87
|
-
margin: var(--spacer-2) 0;
|
|
88
|
-
line-height: 1rem;
|
|
89
|
-
color: var(--figma-color-text-secondary);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
label {
|
|
93
|
-
color: var(--figma-color-text-secondary);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
h2 {
|
|
97
|
-
font-weight: var(--body-medium-strong-fontWeight);
|
|
98
|
-
margin: var(--spacer-2) 0;
|
|
99
|
-
}
|
|
1
|
+
html,:host{width:100%;height:100%;color:var(--figma-color-text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:var(--font-family);font-size:16px;font-weight:var(--body-medium-fontWeight);letter-spacing:var(--body-letter-spacing);background-color:var(--figma-color-bg);margin:0;padding:0}body,:host{font-size:var(--body-medium-fontSize);letter-spacing:var(--body-letter-spacing)}h1,h2{font-weight:var(--body-large-strong-fontWeight);font-size:var(--body-large-fontSize)}h3{font-weight:var(--body-medium-strong-fontWeight);font-size:var(--body-medium-fontSize)}hr{background-color:var(--figma-color-border);height:1px;margin:var(--spacer-2) 0;border:none;&[vertical]{width:1px;height:100%;margin:0 var(--spacer-2)}}*,:before,:after{box-sizing:border-box}::selection{background-color:var(--figma-color-text-selection)}::selection{background-color:var(--figma-color-text-selection)}::-webkit-scrollbar{width:var(--spacer-1);height:var(--spacer-1)}::-webkit-scrollbar-thumb{background-color:var(--figma-color-bg-tertiary);border-radius:calc(var(--spacer-1) / 2)}::-webkit-scrollbar-thumb:hover{background-color:var(--figma-color-bg-secondary)}*{scrollbar-width:thin;scrollbar-color:var(--figma-color-bg-tertiary) var(--figma-color-bg-secondary)}.subtle{color:var(--figma-color-text-tertiary)}p{margin:var(--spacer-2) 0;color:var(--figma-color-text-secondary);line-height:1rem}label{color:var(--figma-color-text-secondary)}h2{font-weight:var(--body-medium-strong-fontWeight);margin:var(--spacer-2) 0}
|