@rogieking/figui3 6.10.0 → 6.12.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/components.css +64 -27
- package/dist/components.css +1 -1
- package/dist/fig-editor.css +1 -1
- package/dist/fig-editor.js +73 -67
- package/dist/fig-lab.css +1 -1
- package/dist/fig-lab.js +21 -21
- package/dist/fig.css +1 -1
- package/dist/fig.js +36 -48
- package/fig-editor.css +12 -13
- package/fig-editor.js +343 -356
- package/fig-lab.css +79 -3
- package/fig-lab.js +459 -11
- package/fig.js +662 -230
- package/package.json +1 -1
package/components.css
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
--figma-color-bg-disabled: light-dark(#d9d9d9, #757575);
|
|
26
26
|
--figma-color-bg-disabled-secondary: #b3b3b3;
|
|
27
27
|
--figma-color-bg-hover: light-dark(#f5f5f5, #383838);
|
|
28
|
+
--figma-color-bg-active: var(--figma-color-bg-pressed);
|
|
28
29
|
--figma-color-bg-inverse: light-dark(#2c2c2c, #ffffff);
|
|
29
30
|
--figma-color-bg-onselected: light-dark(#bde3ff, #667799);
|
|
30
31
|
--figma-color-bg-onselected-hover: light-dark(#bde3ff, #667799);
|
|
@@ -216,6 +217,8 @@
|
|
|
216
217
|
--body-medium-strong-fontWeight: 550;
|
|
217
218
|
--body-large-strong-fontWeight: 500;
|
|
218
219
|
--body-medium-fontWeight: 450;
|
|
220
|
+
--font-size-small: var(--body-medium-fontSize);
|
|
221
|
+
--line-height: 1rem;
|
|
219
222
|
|
|
220
223
|
/* Spacing */
|
|
221
224
|
--spacer-1: 0.25rem;
|
|
@@ -225,6 +228,7 @@
|
|
|
225
228
|
--spacer-4: 1.5rem;
|
|
226
229
|
--spacer-5: 2rem;
|
|
227
230
|
--spacer-6: 2.5rem;
|
|
231
|
+
--spacer-half: 0.125rem;
|
|
228
232
|
|
|
229
233
|
/* Radii */
|
|
230
234
|
--radius-none: 0;
|
|
@@ -238,9 +242,12 @@
|
|
|
238
242
|
|
|
239
243
|
/* Transitions */
|
|
240
244
|
--input-transition: all 0.08s ease-out;
|
|
245
|
+
--transition-duration: 0.08s;
|
|
246
|
+
--transition-timing-function: ease-out;
|
|
241
247
|
|
|
242
248
|
/* Misc UI */
|
|
243
249
|
--popover-min-width: 15rem;
|
|
250
|
+
--control-height: var(--spacer-4);
|
|
244
251
|
--handle-color: #fff;
|
|
245
252
|
--bg-selected: #f5f5f5;
|
|
246
253
|
--bg-selected-active: #e5f4ff;
|
|
@@ -885,6 +892,19 @@ fig-dropdown {
|
|
|
885
892
|
display: none !important;
|
|
886
893
|
}
|
|
887
894
|
}
|
|
895
|
+
|
|
896
|
+
/* Native select popups in Chromium webviews do not reliably inherit themed
|
|
897
|
+
option colors. Style only the popup rows so the closed control continues
|
|
898
|
+
to resolve FigUI's light-dark tokens from the application color scheme. */
|
|
899
|
+
fig-dropdown:not([experimental~="modern"]) > select {
|
|
900
|
+
color: inherit;
|
|
901
|
+
|
|
902
|
+
option,
|
|
903
|
+
optgroup {
|
|
904
|
+
color: #1e1e1e;
|
|
905
|
+
background-color: #ffffff;
|
|
906
|
+
}
|
|
907
|
+
}
|
|
888
908
|
fig-dropdown,
|
|
889
909
|
select,
|
|
890
910
|
.fig-dropdown {
|
|
@@ -915,7 +935,7 @@ select,
|
|
|
915
935
|
}
|
|
916
936
|
|
|
917
937
|
/* Autoresize to content width */
|
|
918
|
-
&[autoresize] select {
|
|
938
|
+
&[autoresize]:not([autoresize="false"]) select {
|
|
919
939
|
field-sizing: content;
|
|
920
940
|
}
|
|
921
941
|
}
|
|
@@ -1040,7 +1060,7 @@ fig-button {
|
|
|
1040
1060
|
}
|
|
1041
1061
|
|
|
1042
1062
|
/* Icon only */
|
|
1043
|
-
&[icon] {
|
|
1063
|
+
&[icon]:not([icon="false"]) {
|
|
1044
1064
|
width: var(--spacer-4);
|
|
1045
1065
|
padding: 0;
|
|
1046
1066
|
flex-grow: 0;
|
|
@@ -1075,15 +1095,15 @@ fig-button {
|
|
|
1075
1095
|
padding: 0 var(--spacer-3);
|
|
1076
1096
|
}
|
|
1077
1097
|
|
|
1078
|
-
&[size="large"][icon],
|
|
1079
|
-
&[size="large"][icon] > button {
|
|
1098
|
+
&[size="large"][icon]:not([icon="false"]),
|
|
1099
|
+
&[size="large"][icon]:not([icon="false"]) > button {
|
|
1080
1100
|
width: var(--spacer-5);
|
|
1081
1101
|
flex-basis: var(--spacer-5);
|
|
1082
1102
|
padding: 0;
|
|
1083
1103
|
}
|
|
1084
1104
|
|
|
1085
1105
|
/* Full width */
|
|
1086
|
-
&[full] {
|
|
1106
|
+
&[full]:not([full="false"]) {
|
|
1087
1107
|
width: 100%;
|
|
1088
1108
|
}
|
|
1089
1109
|
|
|
@@ -3114,7 +3134,7 @@ dialog,
|
|
|
3114
3134
|
outline: none !important;
|
|
3115
3135
|
}
|
|
3116
3136
|
|
|
3117
|
-
&[open]{
|
|
3137
|
+
&[open]:not([open="false"]){
|
|
3118
3138
|
display: flex;
|
|
3119
3139
|
flex-direction: column;
|
|
3120
3140
|
}
|
|
@@ -3165,7 +3185,7 @@ dialog[is="fig-popup"] {
|
|
|
3165
3185
|
max-height: calc(100vh - var(--spacer-4));
|
|
3166
3186
|
}
|
|
3167
3187
|
|
|
3168
|
-
&[open] {
|
|
3188
|
+
&[open]:not([open="false"]) {
|
|
3169
3189
|
display: block;
|
|
3170
3190
|
}
|
|
3171
3191
|
|
|
@@ -3408,10 +3428,16 @@ fig-header {
|
|
|
3408
3428
|
--fig-header-height: var(--spacer-5);
|
|
3409
3429
|
}
|
|
3410
3430
|
|
|
3411
|
-
fig-button[icon][variant="ghost"]:not(fig-input-text fig-button) {
|
|
3431
|
+
fig-button[icon]:not([icon="false"])[variant="ghost"]:not(fig-input-text fig-button) {
|
|
3412
3432
|
margin-right: calc(var(--spacer-2) * -1);
|
|
3413
3433
|
}
|
|
3414
3434
|
|
|
3435
|
+
&>fig-dropdown{
|
|
3436
|
+
&:first-child{
|
|
3437
|
+
margin-left: calc(var(--spacer-2) * -1);
|
|
3438
|
+
}
|
|
3439
|
+
}
|
|
3440
|
+
|
|
3415
3441
|
& h3 {
|
|
3416
3442
|
font-weight: var(--body-medium-strong-fontWeight);
|
|
3417
3443
|
flex-grow: 1;
|
|
@@ -3423,7 +3449,7 @@ fig-header {
|
|
|
3423
3449
|
color: var(--figma-color-text-secondary);
|
|
3424
3450
|
}
|
|
3425
3451
|
|
|
3426
|
-
&[borderless] {
|
|
3452
|
+
&[borderless]:not([borderless="false"]) {
|
|
3427
3453
|
box-shadow: none;
|
|
3428
3454
|
}
|
|
3429
3455
|
}
|
|
@@ -3568,7 +3594,7 @@ fig-footer {
|
|
|
3568
3594
|
}
|
|
3569
3595
|
}
|
|
3570
3596
|
|
|
3571
|
-
&[borderless] {
|
|
3597
|
+
&[borderless]:not([borderless="false"]) {
|
|
3572
3598
|
box-shadow: none;
|
|
3573
3599
|
}
|
|
3574
3600
|
|
|
@@ -3642,29 +3668,36 @@ fig-input-number {
|
|
|
3642
3668
|
user-select: all;
|
|
3643
3669
|
gap: 0;
|
|
3644
3670
|
min-width: 0;
|
|
3645
|
-
flex: 1;
|
|
3671
|
+
flex: 0 1 auto;
|
|
3646
3672
|
color: var(--figma-color-text);
|
|
3647
3673
|
|
|
3674
|
+
fig-field:not([direction="vertical"]) & {
|
|
3675
|
+
flex: 1;
|
|
3676
|
+
min-width: 0;
|
|
3677
|
+
width: 100%;
|
|
3678
|
+
}
|
|
3679
|
+
|
|
3648
3680
|
&[full]:not([full="false"]) {
|
|
3649
3681
|
display: flex;
|
|
3682
|
+
flex: 1;
|
|
3650
3683
|
width: 100%;
|
|
3651
3684
|
}
|
|
3652
|
-
&[multiline] {
|
|
3685
|
+
&[multiline]:not([multiline="false"]) {
|
|
3653
3686
|
display: flex;
|
|
3654
3687
|
width: 100%;
|
|
3655
3688
|
}
|
|
3656
|
-
&[autoresize] input,
|
|
3657
|
-
&[autoresize] textarea {
|
|
3689
|
+
&[autoresize]:not([autoresize="false"]) input,
|
|
3690
|
+
&[autoresize]:not([autoresize="false"]) textarea {
|
|
3658
3691
|
field-sizing: content;
|
|
3659
3692
|
}
|
|
3660
|
-
&[resizable] input,
|
|
3661
|
-
&[resizable] textarea {
|
|
3693
|
+
&[resizable]:not([resizable="false"]) input,
|
|
3694
|
+
&[resizable]:not([resizable="false"]) textarea {
|
|
3662
3695
|
resize: both;
|
|
3663
3696
|
}
|
|
3664
|
-
&[resizable]:has(textarea[style*="width"]),
|
|
3665
|
-
&[resizable]:has(textarea[style*="height"]),
|
|
3666
|
-
&[resizable]:has(input[style*="width"]),
|
|
3667
|
-
&[resizable]:has(input[style*="height"]) {
|
|
3697
|
+
&[resizable]:not([resizable="false"]):has(textarea[style*="width"]),
|
|
3698
|
+
&[resizable]:not([resizable="false"]):has(textarea[style*="height"]),
|
|
3699
|
+
&[resizable]:not([resizable="false"]):has(input[style*="width"]),
|
|
3700
|
+
&[resizable]:not([resizable="false"]):has(input[style*="height"]) {
|
|
3668
3701
|
flex: unset;
|
|
3669
3702
|
}
|
|
3670
3703
|
|
|
@@ -3851,11 +3884,14 @@ fig-input-fill {
|
|
|
3851
3884
|
fig-field:not([direction="vertical"]) & {
|
|
3852
3885
|
flex: 1;
|
|
3853
3886
|
min-width: 0;
|
|
3887
|
+
width: 100%;
|
|
3854
3888
|
}
|
|
3855
3889
|
}
|
|
3856
3890
|
|
|
3857
3891
|
fig-input-color,
|
|
3858
|
-
fig-input-fill
|
|
3892
|
+
fig-input-fill,
|
|
3893
|
+
fig-input-text,
|
|
3894
|
+
fig-input-number {
|
|
3859
3895
|
width: 8.9375rem;
|
|
3860
3896
|
}
|
|
3861
3897
|
|
|
@@ -4157,7 +4193,7 @@ fig-field {
|
|
|
4157
4193
|
--fig-field-input-ratio: 3fr;
|
|
4158
4194
|
}
|
|
4159
4195
|
|
|
4160
|
-
& > [full] {
|
|
4196
|
+
& > [full]:not([full="false"]) {
|
|
4161
4197
|
flex: 1 1 auto;
|
|
4162
4198
|
}
|
|
4163
4199
|
|
|
@@ -5035,7 +5071,7 @@ fig-choice {
|
|
|
5035
5071
|
}
|
|
5036
5072
|
|
|
5037
5073
|
|
|
5038
|
-
&:hover:not([selected]):not([disabled]):not([aria-disabled="true"]) {
|
|
5074
|
+
&:hover:not([selected]:not([selected="false"])):not([disabled]:not([disabled="false"])):not([aria-disabled="true"]) {
|
|
5039
5075
|
background-color: var(--figma-color-bg-secondary);
|
|
5040
5076
|
}
|
|
5041
5077
|
|
|
@@ -5048,7 +5084,7 @@ fig-choice {
|
|
|
5048
5084
|
--fig-choice-padding: var(--spacer-2);
|
|
5049
5085
|
}
|
|
5050
5086
|
|
|
5051
|
-
&[selected] {
|
|
5087
|
+
&[selected]:not([selected="false"]) {
|
|
5052
5088
|
position: relative;
|
|
5053
5089
|
&::after {
|
|
5054
5090
|
content: "";
|
|
@@ -5092,7 +5128,7 @@ fig-handle {
|
|
|
5092
5128
|
--fig-handle-outline-color: transparent;
|
|
5093
5129
|
--fig-handle-outline-offset: 0px;
|
|
5094
5130
|
--fig-handle-padding: 0.25rem;
|
|
5095
|
-
--fig-handle-shadow:
|
|
5131
|
+
--fig-handle-shadow: none;
|
|
5096
5132
|
--fig-handle-width: var(--width);
|
|
5097
5133
|
|
|
5098
5134
|
margin: 0;
|
|
@@ -5138,7 +5174,8 @@ fig-handle {
|
|
|
5138
5174
|
&:hover,
|
|
5139
5175
|
&[selected]:not([selected="false"]) {
|
|
5140
5176
|
--fig-handle-outline-color: var(--figma-color-border-selected);
|
|
5141
|
-
--fig-handle-outline:
|
|
5177
|
+
--fig-handle-outline: 1px solid var(--fig-handle-outline-color);
|
|
5178
|
+
--fig-handle-shadow: var(--figma-elevation-200-canvas);
|
|
5142
5179
|
}
|
|
5143
5180
|
|
|
5144
5181
|
&:focus-visible {
|
|
@@ -5152,7 +5189,7 @@ fig-handle {
|
|
|
5152
5189
|
&[selected]:not([selected="false"]):not([type]) {
|
|
5153
5190
|
--fig-handle-inner-bg: var(--figma-color-bg-brand);
|
|
5154
5191
|
--fig-handle-outline-color: var(--figma-color-border-selected);
|
|
5155
|
-
--fig-handle-outline:
|
|
5192
|
+
--fig-handle-outline: 1px solid var(--fig-handle-outline-color);
|
|
5156
5193
|
}
|
|
5157
5194
|
|
|
5158
5195
|
&[type="canvas"]{
|