@rogieking/figui3 6.11.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 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,7 +3428,7 @@ 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
 
@@ -3429,7 +3449,7 @@ fig-header {
3429
3449
  color: var(--figma-color-text-secondary);
3430
3450
  }
3431
3451
 
3432
- &[borderless] {
3452
+ &[borderless]:not([borderless="false"]) {
3433
3453
  box-shadow: none;
3434
3454
  }
3435
3455
  }
@@ -3574,7 +3594,7 @@ fig-footer {
3574
3594
  }
3575
3595
  }
3576
3596
 
3577
- &[borderless] {
3597
+ &[borderless]:not([borderless="false"]) {
3578
3598
  box-shadow: none;
3579
3599
  }
3580
3600
 
@@ -3648,29 +3668,36 @@ fig-input-number {
3648
3668
  user-select: all;
3649
3669
  gap: 0;
3650
3670
  min-width: 0;
3651
- flex: 1;
3671
+ flex: 0 1 auto;
3652
3672
  color: var(--figma-color-text);
3653
3673
 
3674
+ fig-field:not([direction="vertical"]) & {
3675
+ flex: 1;
3676
+ min-width: 0;
3677
+ width: 100%;
3678
+ }
3679
+
3654
3680
  &[full]:not([full="false"]) {
3655
3681
  display: flex;
3682
+ flex: 1;
3656
3683
  width: 100%;
3657
3684
  }
3658
- &[multiline] {
3685
+ &[multiline]:not([multiline="false"]) {
3659
3686
  display: flex;
3660
3687
  width: 100%;
3661
3688
  }
3662
- &[autoresize] input,
3663
- &[autoresize] textarea {
3689
+ &[autoresize]:not([autoresize="false"]) input,
3690
+ &[autoresize]:not([autoresize="false"]) textarea {
3664
3691
  field-sizing: content;
3665
3692
  }
3666
- &[resizable] input,
3667
- &[resizable] textarea {
3693
+ &[resizable]:not([resizable="false"]) input,
3694
+ &[resizable]:not([resizable="false"]) textarea {
3668
3695
  resize: both;
3669
3696
  }
3670
- &[resizable]:has(textarea[style*="width"]),
3671
- &[resizable]:has(textarea[style*="height"]),
3672
- &[resizable]:has(input[style*="width"]),
3673
- &[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"]) {
3674
3701
  flex: unset;
3675
3702
  }
3676
3703
 
@@ -3857,11 +3884,14 @@ fig-input-fill {
3857
3884
  fig-field:not([direction="vertical"]) & {
3858
3885
  flex: 1;
3859
3886
  min-width: 0;
3887
+ width: 100%;
3860
3888
  }
3861
3889
  }
3862
3890
 
3863
3891
  fig-input-color,
3864
- fig-input-fill {
3892
+ fig-input-fill,
3893
+ fig-input-text,
3894
+ fig-input-number {
3865
3895
  width: 8.9375rem;
3866
3896
  }
3867
3897
 
@@ -4163,7 +4193,7 @@ fig-field {
4163
4193
  --fig-field-input-ratio: 3fr;
4164
4194
  }
4165
4195
 
4166
- & > [full] {
4196
+ & > [full]:not([full="false"]) {
4167
4197
  flex: 1 1 auto;
4168
4198
  }
4169
4199
 
@@ -5041,7 +5071,7 @@ fig-choice {
5041
5071
  }
5042
5072
 
5043
5073
 
5044
- &: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"]) {
5045
5075
  background-color: var(--figma-color-bg-secondary);
5046
5076
  }
5047
5077
 
@@ -5054,7 +5084,7 @@ fig-choice {
5054
5084
  --fig-choice-padding: var(--spacer-2);
5055
5085
  }
5056
5086
 
5057
- &[selected] {
5087
+ &[selected]:not([selected="false"]) {
5058
5088
  position: relative;
5059
5089
  &::after {
5060
5090
  content: "";
@@ -5098,7 +5128,7 @@ fig-handle {
5098
5128
  --fig-handle-outline-color: transparent;
5099
5129
  --fig-handle-outline-offset: 0px;
5100
5130
  --fig-handle-padding: 0.25rem;
5101
- --fig-handle-shadow: var(--figma-elevation-200-canvas);
5131
+ --fig-handle-shadow: none;
5102
5132
  --fig-handle-width: var(--width);
5103
5133
 
5104
5134
  margin: 0;
@@ -5144,7 +5174,8 @@ fig-handle {
5144
5174
  &:hover,
5145
5175
  &[selected]:not([selected="false"]) {
5146
5176
  --fig-handle-outline-color: var(--figma-color-border-selected);
5147
- --fig-handle-outline: 2px solid var(--fig-handle-outline-color);
5177
+ --fig-handle-outline: 1px solid var(--fig-handle-outline-color);
5178
+ --fig-handle-shadow: var(--figma-elevation-200-canvas);
5148
5179
  }
5149
5180
 
5150
5181
  &:focus-visible {
@@ -5158,7 +5189,7 @@ fig-handle {
5158
5189
  &[selected]:not([selected="false"]):not([type]) {
5159
5190
  --fig-handle-inner-bg: var(--figma-color-bg-brand);
5160
5191
  --fig-handle-outline-color: var(--figma-color-border-selected);
5161
- --fig-handle-outline: 2px solid var(--fig-handle-outline-color);
5192
+ --fig-handle-outline: 1px solid var(--fig-handle-outline-color);
5162
5193
  }
5163
5194
 
5164
5195
  &[type="canvas"]{