@rogieking/figui3 2.0.6 → 2.0.8

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
@@ -294,6 +294,14 @@
294
294
  --icon-chevron: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.87868 7.12132L8 9.24264L10.1213 7.12132' stroke='black' stroke-linecap='round'/%3E%3C/svg%3E%0A");
295
295
  --icon-checkmark: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.7773 4.08403C12.0071 4.2372 12.0692 4.54764 11.916 4.7774L7.91603 10.7774C7.83293 10.902 7.69834 10.9829 7.54927 10.9976C7.4002 11.0124 7.25237 10.9595 7.14645 10.8536L4.14645 7.85361C3.95118 7.65834 3.95118 7.34176 4.14645 7.1465C4.34171 6.95124 4.65829 6.95124 4.85355 7.1465L7.42229 9.71523L11.084 4.2227C11.2372 3.99294 11.5476 3.93085 11.7773 4.08403Z' fill='white'/%3E%3C/svg%3E%0A");
296
296
  --icon-steppers: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.7245 6.08191C11.9186 5.95386 12.1826 5.97562 12.3534 6.14637L14.3534 8.14637L14.4179 8.22449C14.546 8.41852 14.5242 8.68253 14.3534 8.8534C14.1826 9.02426 13.9186 9.04601 13.7245 8.91785L13.6464 8.8534L11.9999 7.20691L10.3534 8.8534C10.1582 9.04866 9.84166 9.04866 9.6464 8.8534C9.45123 8.65813 9.45117 8.3416 9.6464 8.14637L11.6464 6.14637L11.7245 6.08191Z' fill='black'/%3E%3Cpath d='M13.7248 15.0822C13.9189 14.9541 14.1829 14.9758 14.3537 15.1467C14.5246 15.3176 14.5463 15.5815 14.4182 15.7756L14.3537 15.8537L12.3537 17.8537C12.1829 18.0246 11.9189 18.0463 11.7248 17.9182L11.6467 17.8537L9.64669 15.8537L9.58224 15.7756C9.45407 15.5815 9.47583 15.3176 9.64669 15.1467C9.81756 14.9758 10.0815 14.9541 10.2756 15.0822L10.3537 15.1467L12.0002 16.7932L13.6467 15.1467L13.7248 15.0822Z' fill='black' /%3E%3C/svg%3E%0A");
297
+ --icon-eyedropper: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15.1592 5.65801C16.0376 4.78045 17.4621 4.78055 18.3408 5.65899L18.4951 5.82989C19.1671 6.65442 19.168 7.84476 18.4951 8.66973L18.3408 8.84063L16.6455 10.533C17.1104 11.083 17.1181 11.889 16.6641 12.4461L16.5605 12.5604C16.0111 13.1097 15.1425 13.1428 14.5537 12.6629L14.5342 12.6453L10.0908 17.0916C9.6188 17.5633 8.98876 17.7764 8.375 17.742L7.56055 18.5574C6.97441 19.1432 6.02451 19.1422 5.43945 18.5584V18.5574C4.8538 17.9718 4.85405 17.0221 5.43945 16.4363L6.25586 15.618C6.22412 15.0058 6.44026 14.3794 6.90918 13.91L11.3516 9.46367C10.856 8.87434 10.885 7.99381 11.4395 7.43926L11.5537 7.33574C12.1094 6.88283 12.9136 6.88854 13.4639 7.35137L15.1592 5.65801ZM7.61621 14.617C7.33755 14.8961 7.21782 15.2747 7.25781 15.6385C7.27925 15.8351 7.24419 16.0445 7.10449 16.1844L6.14648 17.1434C5.9516 17.3387 5.95135 17.6553 6.14648 17.8504C6.34167 18.0449 6.65842 18.0451 6.85352 17.8504L7.80859 16.8943C7.94931 16.7536 8.16065 16.7184 8.3584 16.741C8.72329 16.7828 9.10374 16.6643 9.38379 16.3846L13.8223 11.9432L12.0547 10.1756L7.61621 14.617ZM17.6338 6.36602C17.1458 5.87828 16.3544 5.8783 15.8662 6.36602L14.084 8.14629L14.0186 8.20586C13.6767 8.48476 13.1722 8.46484 12.8535 8.14629C12.6583 7.95131 12.3417 7.95119 12.1465 8.14629C11.9514 8.34148 11.9515 8.65808 12.1465 8.85332L15.1465 11.8533C15.3175 12.024 15.5814 12.0451 15.7754 11.9168L15.8535 11.8533C16.0486 11.6582 16.0484 11.3416 15.8535 11.1463V11.1453C15.8524 11.1443 15.8507 11.1434 15.8496 11.1424C15.5128 10.8013 15.514 10.2513 15.8535 9.91192L17.6338 8.1336C18.1216 7.6457 18.1213 6.85425 17.6338 6.36602Z' fill='black' fill-opacity='0.9'/%3E%3C/svg%3E");
298
+ --icon-add: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 6C12.2761 6 12.5 6.22386 12.5 6.5V11.5H17.5C17.7761 11.5 18 11.7239 18 12C18 12.2761 17.7761 12.5 17.5 12.5H12.5V17.5C12.5 17.7761 12.2761 18 12 18C11.7239 18 11.5 17.7761 11.5 17.5V12.5H6.5C6.22386 12.5 6 12.2761 6 12C6 11.7239 6.22386 11.5 6.5 11.5H11.5V6.5C11.5 6.22386 11.7239 6 12 6Z' fill='currentColor'/%3E%3C/svg%3E");
299
+ --icon-minus: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18 12C18 12.2761 17.7761 12.5 17.5 12.5H6.5C6.22386 12.5 6 12.2761 6 12C6 11.7239 6.22386 11.5 6.5 11.5H17.5C17.7761 11.5 18 11.7239 18 12Z' fill='currentColor'/%3E%3C/svg%3E");
300
+ --icon-back: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.8536 7.14645C14.0488 7.34171 14.0488 7.65829 13.8536 7.85355L9.70711 12L13.8536 16.1464C14.0488 16.3417 14.0488 16.6583 13.8536 16.8536C13.6583 17.0488 13.3417 17.0488 13.1464 16.8536L8.64645 12.3535C8.55268 12.2598 8.5 12.1326 8.5 12C8.5 11.8674 8.55268 11.7402 8.64645 11.6464L13.1464 7.14645C13.3417 6.95118 13.6583 6.95118 13.8536 7.14645Z' fill='currentColor'/%3E%3C/svg%3E");
301
+ --icon-forward: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.1464 16.8536C9.95118 16.6583 9.95118 16.3417 10.1464 16.1464L14.2929 12L10.1464 7.85355C9.95118 7.65829 9.95118 7.34171 10.1464 7.14645C10.3417 6.95118 10.6583 6.95118 10.8536 7.14645L15.3536 11.6464C15.5488 11.8417 15.5488 12.1583 15.3536 12.3536L10.8536 16.8536C10.6583 17.0488 10.3417 17.0488 10.1464 16.8536Z' fill='currentColor'/%3E%3C/svg%3E");
302
+ --icon-close: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.2242 7.08154C16.4182 6.95348 16.6823 6.97551 16.8531 7.146C17.024 7.31683 17.0457 7.58084 16.9176 7.7749L16.8531 7.85303L12.7067 11.9995L16.8531 16.146L16.9176 16.2241C17.0457 16.4182 17.024 16.6822 16.8531 16.853C16.6823 17.0239 16.4183 17.0456 16.2242 16.9175L16.1461 16.853L11.9996 12.7065L7.85315 16.853C7.65789 17.0483 7.34138 17.0483 7.14612 16.853C6.95128 16.6577 6.95101 16.3411 7.14612 16.146L11.2926 11.9995L7.14612 7.85303L7.08167 7.7749C6.95389 7.58087 6.97541 7.3167 7.14612 7.146C7.31683 6.97532 7.58101 6.95376 7.77502 7.08154L7.85315 7.146L11.9996 11.2925L16.1461 7.146L16.2242 7.08154Z' fill='currentColor'/%3E%3C/svg%3E");
303
+ --icon-rotate: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.2325 6.47442C11.2088 5.49811 12.7917 5.49811 13.768 6.47442L15.2931 7.99955H14.0002C13.7241 7.99955 13.5002 8.2234 13.5002 8.49955C13.5002 8.77569 13.7241 8.99955 14.0002 8.99955H16.5002C16.7764 8.99955 17.0002 8.77569 17.0002 8.49955V5.99955C17.0002 5.7234 16.7764 5.49955 16.5002 5.49955C16.2241 5.49955 16.0002 5.7234 16.0002 5.99955V7.29244L14.4751 5.76731C13.1083 4.40048 10.8922 4.40048 9.52537 5.76731L7.14669 8.14599C6.95143 8.34126 6.95143 8.65784 7.14669 8.8531C7.34195 9.04836 7.65854 9.04836 7.8538 8.8531L10.2325 6.47442ZM13.0609 9.64599C12.4751 9.06021 11.5254 9.06021 10.9396 9.64599L7.64669 12.9389C7.06091 13.5247 7.0609 14.4744 7.64669 15.0602L10.9396 18.3531C11.5254 18.9389 12.4751 18.9389 13.0609 18.3531L16.3538 15.0602C16.9396 14.4744 16.9396 13.5247 16.3538 12.9389L13.0609 9.64599ZM11.6467 10.3531C11.842 10.1578 12.1585 10.1578 12.3538 10.3531L15.6467 13.646C15.842 13.8413 15.842 14.1578 15.6467 14.3531L12.3538 17.646C12.1585 17.8413 11.842 17.8413 11.6467 17.646L8.3538 14.3531C8.15854 14.1578 8.15854 13.8413 8.3538 13.646L11.6467 10.3531Z' fill='currentColor'/%3E%3C/svg%3E");
304
+ --icon-swap: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.35355 6.35355C8.54882 6.15829 8.54882 5.84171 8.35355 5.64645C8.15829 5.45118 7.84171 5.45118 7.64645 5.64645L5.14645 8.14645C4.95118 8.34171 4.95118 8.65829 5.14645 8.85355L7.64645 11.3536C7.84171 11.5488 8.15829 11.5488 8.35355 11.3536C8.54882 11.1583 8.54882 10.8417 8.35355 10.6464L6.70711 9H18.5C18.7761 9 19 8.77614 19 8.5C19 8.22386 18.7761 8 18.5 8H6.70711L8.35355 6.35355ZM15.6464 13.3536C15.4512 13.1583 15.4512 12.8417 15.6464 12.6464C15.8417 12.4512 16.1583 12.4512 16.3536 12.6464L18.8536 15.1464C19.0488 15.3417 19.0488 15.6583 18.8536 15.8536L16.3536 18.3536C16.1583 18.5488 15.8417 18.5488 15.6464 18.3536C15.4512 18.1583 15.4512 17.8417 15.6464 17.6464L17.2929 16H5.5C5.22386 16 5 15.7761 5 15.5C5 15.2239 5.22386 15 5.5 15H17.2929L15.6464 13.3536Z' fill='currentColor'/%3E%3C/svg%3E");
297
305
 
298
306
  /* Elevations - light theme defaults */
299
307
  --elevation-500-modal-window: 0px 0px 0.5px rgba(0, 0, 0, 0.08),
@@ -739,6 +747,7 @@ fig-button {
739
747
 
740
748
  /* Variant: Overlay (for on top of content) */
741
749
  &[variant="overlay"] {
750
+ color-scheme: light;
742
751
  background-color: var(--figma-color-bg);
743
752
  color: var(--figma-color-text);
744
753
  box-shadow: 0 0 0 1px var(--figma-color-bordertranslucent);
@@ -1068,9 +1077,11 @@ input[type="color"] {
1068
1077
  }
1069
1078
 
1070
1079
  fig-chit {
1071
- --gradient-color-1: #ff90ff;
1072
- --gradient-color-2: #0000ff;
1073
1080
  --size: 1.5rem;
1081
+ --chit-background: #d9d9d9;
1082
+ --chit-bg-size: cover;
1083
+ --chit-bg-position: center;
1084
+
1074
1085
  display: inline-grid;
1075
1086
  width: var(--size);
1076
1087
  height: var(--size);
@@ -1082,6 +1093,7 @@ fig-chit {
1082
1093
  grid-area: 1/1;
1083
1094
  }
1084
1095
 
1096
+ /* Selection ring */
1085
1097
  &[selected]:not([selected="false"])::before {
1086
1098
  content: "";
1087
1099
  width: var(--size);
@@ -1094,19 +1106,14 @@ fig-chit {
1094
1106
  &[size="large"] {
1095
1107
  --size: 1.75rem;
1096
1108
 
1097
- &[type="gradient"]::after,
1098
- &[type="image"]::after,
1099
- &[type="color"]::after,
1109
+ /* Large size: swatch fills the whole area */
1100
1110
  input[type="color"] {
1101
1111
  padding: 0;
1102
1112
  width: var(--size);
1103
1113
  height: var(--size);
1104
1114
  border-radius: var(--radius-medium);
1105
1115
  }
1106
- &[selected]:not([selected="false"])::before {
1107
- box-shadow: inset 0 0 0 1px var(--figma-color-border-selected),
1108
- inset 0 0 0 3px var(--figma-color-bg);
1109
- }
1116
+
1110
1117
  input[type="color"]::-webkit-color-swatch-wrapper {
1111
1118
  border-radius: var(--radius-medium);
1112
1119
  }
@@ -1118,76 +1125,71 @@ fig-chit {
1118
1125
  input[type="color"]::-moz-color-swatch {
1119
1126
  border-radius: var(--radius-medium);
1120
1127
  }
1121
- }
1122
1128
 
1123
- &[disabled="true"] {
1124
- input {
1125
- pointer-events: none;
1129
+ &[selected]:not([selected="false"])::before {
1130
+ box-shadow: inset 0 0 0 1px var(--figma-color-border-selected),
1131
+ inset 0 0 0 3px var(--figma-color-bg);
1132
+ }
1133
+
1134
+ /* Large gradient/image: also fill the area */
1135
+ &[data-type="gradient"]::after,
1136
+ &[data-type="image"]::after {
1137
+ width: var(--size);
1138
+ height: var(--size);
1139
+ border-radius: var(--radius-medium);
1126
1140
  }
1127
1141
  }
1128
1142
 
1129
- &[type="gradient"],
1130
- &[type="image"] {
1143
+ &[disabled] {
1144
+ pointer-events: none;
1145
+ opacity: 0.5;
1146
+ }
1147
+
1148
+ /* Gradient/Image types - inset thumbnail with hidden input */
1149
+ &[data-type="gradient"],
1150
+ &[data-type="image"] {
1151
+ background-color: var(--figma-color-bg-secondary);
1152
+
1131
1153
  &::after {
1132
1154
  content: "";
1133
1155
  width: 0.875rem;
1134
1156
  height: 0.875rem;
1135
- background-image: var(--src);
1157
+ background: var(--chit-background);
1158
+ background-size: var(--chit-bg-size);
1159
+ background-position: var(--chit-bg-position);
1160
+ background-repeat: repeat;
1136
1161
  border-radius: 0.125rem;
1137
- background-size: contain;
1138
- background-position: center center;
1139
- background-repeat: no-repeat;
1140
1162
  box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
1141
1163
  }
1164
+
1142
1165
  &::after,
1143
1166
  input {
1144
1167
  grid-area: 1/1;
1145
1168
  place-self: center;
1146
1169
  }
1170
+
1147
1171
  input[type="color"] {
1148
1172
  opacity: 0;
1149
1173
  }
1174
+
1150
1175
  input[type="color"]::-webkit-color-swatch-wrapper {
1151
1176
  background: none;
1152
1177
  }
1178
+
1153
1179
  input[type="color"]::-moz-color-swatch {
1154
1180
  opacity: 0;
1155
1181
  }
1182
+
1156
1183
  input[type="color"]::-webkit-color-swatch {
1157
1184
  opacity: 0;
1158
1185
  }
1159
1186
  }
1160
1187
 
1161
- &[type="image"] {
1162
- &:not([src])::after {
1163
- background: var(--checkerboard);
1164
- }
1165
- }
1166
- &[type="gradient"] {
1167
- &[variant="linear"]::after {
1168
- --gradient: linear-gradient(
1169
- to bottom,
1170
- var(--gradient-color-1),
1171
- var(--gradient-color-2)
1172
- );
1173
- }
1174
- &[variant="angular"]::after {
1175
- --gradient: conic-gradient(
1176
- from 180deg,
1177
- var(--gradient-color-1),
1178
- var(--gradient-color-2)
1179
- );
1180
- }
1181
- &[variant="radial"]::after {
1182
- --gradient: radial-gradient(
1183
- circle,
1184
- var(--gradient-color-1),
1185
- var(--gradient-color-2)
1186
- );
1187
- }
1188
- &::after {
1189
- background: var(--gradient);
1190
- }
1188
+ /* Checkerboard for empty/missing images */
1189
+ &[data-type="image"]:not([background])::after,
1190
+ &[data-type="image"][background=""]::after,
1191
+ &[data-type="image"][background="url()"]::after {
1192
+ background: var(--checkerboard);
1191
1193
  }
1192
1194
  }
1193
1195
 
@@ -1204,6 +1206,9 @@ fig-image {
1204
1206
  }
1205
1207
  fig-chit {
1206
1208
  --size: var(--image-size) !important;
1209
+ &[disabled] {
1210
+ opacity: 1;
1211
+ }
1207
1212
  }
1208
1213
  &:not([src]):not([src=""]) fig-button,
1209
1214
  &:hover fig-button {
@@ -1219,9 +1224,7 @@ fig-image {
1219
1224
  &[aspect-ratio="auto"] {
1220
1225
  aspect-ratio: var(--aspect-ratio);
1221
1226
  height: auto;
1222
- fig-chit,
1223
- fig-chit::after,
1224
- input {
1227
+ fig-chit {
1225
1228
  height: auto !important;
1226
1229
  aspect-ratio: var(--aspect-ratio) !important;
1227
1230
  }
@@ -1255,14 +1258,14 @@ fig-image {
1255
1258
  gap: 1px;
1256
1259
 
1257
1260
  & > * {
1258
- &:first-child,
1259
- &:first-child > * {
1261
+ &:first-child:not(:last-child),
1262
+ &:first-child:not(:last-child) > * {
1260
1263
  border-top-right-radius: 0;
1261
1264
  border-bottom-right-radius: 0;
1262
1265
  }
1263
1266
 
1264
- &:last-child,
1265
- &:last-child > * {
1267
+ &:last-child:not(:first-child),
1268
+ &:last-child:not(:first-child) > * {
1266
1269
  border-top-left-radius: 0;
1267
1270
  border-bottom-left-radius: 0;
1268
1271
  }
@@ -2354,6 +2357,9 @@ fig-input-color {
2354
2357
  width: 3rem;
2355
2358
  display: inline-flex;
2356
2359
  }
2360
+ fig-input-text {
2361
+ width: auto;
2362
+ }
2357
2363
  & > * {
2358
2364
  flex: 1;
2359
2365
  fig-input-text {
@@ -2629,11 +2635,9 @@ fig-layer {
2629
2635
  user-select: none;
2630
2636
  border-radius: var(--radius-medium);
2631
2637
 
2632
- &:has(fig-layer)[open]:not([open="false"]),
2633
- &:has(fig-layer):hover {
2634
- & > .fig-layer-row::before {
2635
- visibility: visible;
2636
- }
2638
+ /* Show chevron when layer has children */
2639
+ &:has(fig-layer) > .fig-layer-row > .fig-layer-chevron {
2640
+ visibility: visible;
2637
2641
  }
2638
2642
 
2639
2643
  &:not(:has(.fig-layer-icon)) {
@@ -2649,12 +2653,10 @@ fig-layer {
2649
2653
  padding: var(--spacer-1) var(--spacer-2);
2650
2654
  margin-left: var(--spacer-2);
2651
2655
  border-radius: var(--radius-medium);
2652
- cursor: pointer;
2653
2656
  position: relative;
2654
2657
 
2655
- /* Chevron using mask-image approach like details */
2656
- &::before {
2657
- content: "";
2658
+ /* Chevron element - injected by JS when layer has children */
2659
+ .fig-layer-chevron {
2658
2660
  mask-image: var(--icon-chevron);
2659
2661
  mask-size: contain;
2660
2662
  mask-repeat: no-repeat;
@@ -2685,6 +2687,7 @@ fig-layer {
2685
2687
  width: var(--spacer-3);
2686
2688
  height: var(--spacer-3);
2687
2689
  color: var(--figma-color-icon-tertiary);
2690
+ margin-left: var(--spacer-1);
2688
2691
  }
2689
2692
 
2690
2693
  > label {
@@ -2693,7 +2696,6 @@ fig-layer {
2693
2696
  overflow: hidden;
2694
2697
  text-overflow: ellipsis;
2695
2698
  white-space: nowrap;
2696
- cursor: pointer;
2697
2699
  color: var(--figma-color-text);
2698
2700
  }
2699
2701
  }
@@ -2724,7 +2726,7 @@ fig-layer {
2724
2726
  }
2725
2727
 
2726
2728
  /* Rotate chevron when open */
2727
- &[open]:not([open="false"]) .fig-layer-row::before {
2729
+ &[open]:not([open="false"]) > .fig-layer-row > .fig-layer-chevron {
2728
2730
  transform: rotate(0deg);
2729
2731
  }
2730
2732
 
@@ -2789,8 +2791,323 @@ fig-shimmer:not([playing="false"]) > * {
2789
2791
  animation: fig-shimmer var(--shimmer-duration) linear infinite;
2790
2792
  }
2791
2793
 
2794
+ /* Fill Picker */
2795
+ fig-fill-picker {
2796
+ display: contents;
2797
+ }
2798
+
2799
+ .fig-fill-picker-dialog {
2800
+ width: 240px;
2801
+ padding: 0;
2802
+
2803
+ fig-header {
2804
+ padding: var(--spacer-2);
2805
+ display: flex;
2806
+ justify-content: space-between;
2807
+ align-items: center;
2808
+ }
2809
+
2810
+ fig-tab {
2811
+ font-size: 0.6875rem;
2812
+ padding: var(--spacer-1) var(--spacer-1);
2813
+ }
2814
+ }
2815
+
2816
+ .fig-fill-picker-type-label {
2817
+ font-size: var(--font-size-small);
2818
+ font-weight: var(--font-weight-medium);
2819
+ color: var(--figma-color-text);
2820
+ padding: var(--spacer-1) var(--spacer-2);
2821
+ }
2822
+
2823
+ .fig-fill-picker-content {
2824
+ padding: var(--spacer-3);
2825
+ }
2826
+
2827
+ .fig-fill-picker-tab {
2828
+ display: none;
2829
+
2830
+ &:first-child {
2831
+ display: block;
2832
+ }
2833
+ }
2834
+
2835
+ /* Solid Tab */
2836
+ .fig-fill-picker-color-area {
2837
+ position: relative;
2838
+ width: 100%;
2839
+ aspect-ratio: 1;
2840
+ border-radius: var(--radius-medium);
2841
+ overflow: visible;
2842
+ margin-bottom: var(--spacer-2);
2843
+
2844
+ canvas {
2845
+ width: 100%;
2846
+ height: 100%;
2847
+ border-radius: var(--radius-medium);
2848
+ }
2849
+ }
2850
+
2851
+ .fig-fill-picker-handle {
2852
+ position: absolute;
2853
+ width: 1rem;
2854
+ height: 1rem;
2855
+ border-radius: 50%;
2856
+ background: var(--picker-color);
2857
+ box-shadow: inset 0 0 0 0.125rem var(--handle-color),
2858
+ 0px 0 0 0.5px rgba(0, 0, 0, 0.1), var(--figma-elevation-200);
2859
+ transform: translate(-50%, -50%);
2860
+ z-index: 1;
2861
+ &:hover {
2862
+ box-shadow: inset 0 0 0 0.25rem var(--handle-color),
2863
+ 0px 0 0 0.5px rgba(0, 0, 0, 0.1), var(--figma-elevation-200);
2864
+ transform: translate(-50%, -50%);
2865
+ }
2866
+ }
2867
+
2868
+ .fig-fill-picker-sliders {
2869
+ display: flex;
2870
+ flex-direction: column;
2871
+ gap: var(--spacer-2);
2872
+ margin-bottom: var(--spacer-2);
2873
+
2874
+ fig-slider {
2875
+ width: 100%;
2876
+ }
2877
+ }
2878
+
2879
+ .fig-fill-picker-inputs {
2880
+ display: flex;
2881
+ gap: var(--spacer-1);
2882
+ align-items: center;
2883
+
2884
+ .fig-fill-picker-color-input {
2885
+ flex: 1;
2886
+ }
2887
+ }
2888
+
2889
+ /* Gradient Tab */
2890
+ .fig-fill-picker-gradient-header {
2891
+ display: flex;
2892
+ gap: var(--spacer-2);
2893
+ align-items: center;
2894
+ margin-bottom: var(--spacer-2);
2895
+
2896
+ & > *:last-child fig-button {
2897
+ margin-left: auto;
2898
+ }
2899
+
2900
+ .fig-fill-picker-gradient-center {
2901
+ fig-input-number {
2902
+ width: 48px;
2903
+ }
2904
+ }
2905
+ }
2906
+
2907
+ .fig-fill-picker-gradient-preview {
2908
+ position: relative;
2909
+ width: 100%;
2910
+ aspect-ratio: 1;
2911
+ border-radius: var(--radius-medium);
2912
+ overflow: hidden;
2913
+ margin-bottom: var(--spacer-2);
2914
+ }
2915
+
2916
+ .fig-fill-picker-gradient-bar {
2917
+ position: absolute;
2918
+ inset: 0;
2919
+ border-radius: var(--radius-medium);
2920
+ background: linear-gradient(90deg, #d9d9d9 0%, #737373 100%);
2921
+ }
2922
+
2923
+ .fig-fill-picker-gradient-stops-handles {
2924
+ position: absolute;
2925
+ top: 0;
2926
+ left: 0;
2927
+ right: 0;
2928
+ bottom: 0;
2929
+ pointer-events: none;
2930
+ }
2931
+
2932
+ .fig-fill-picker-gradient-stops {
2933
+ .fig-fill-picker-gradient-stops-header {
2934
+ display: flex;
2935
+ justify-content: space-between;
2936
+ align-items: center;
2937
+ margin-bottom: var(--spacer-1);
2938
+ font-size: 0.75rem;
2939
+ color: var(--figma-color-text-secondary);
2940
+ }
2941
+ }
2942
+
2943
+ .fig-fill-picker-gradient-stops-list {
2944
+ display: flex;
2945
+ flex-direction: column;
2946
+ gap: var(--spacer-1);
2947
+ }
2948
+
2949
+ .fig-fill-picker-gradient-stop-row {
2950
+ display: flex;
2951
+ gap: var(--spacer-1);
2952
+ align-items: center;
2953
+
2954
+ .fig-fill-picker-stop-position {
2955
+ width: 48px;
2956
+ flex-shrink: 0;
2957
+ }
2958
+
2959
+ .fig-fill-picker-stop-color {
2960
+ flex: 1;
2961
+ min-width: 0;
2962
+ fig-input-text {
2963
+ min-width: 0;
2964
+ }
2965
+ }
2966
+
2967
+ .fig-fill-picker-stop-remove {
2968
+ flex-shrink: 0;
2969
+ }
2970
+ }
2971
+
2972
+ /* Media Tabs (Image/Video/Webcam) */
2973
+ .fig-fill-picker-media-header {
2974
+ display: flex;
2975
+ gap: var(--spacer-1);
2976
+ align-items: center;
2977
+ margin-bottom: var(--spacer-2);
2978
+
2979
+ .fig-fill-picker-scale-mode {
2980
+ flex: 1;
2981
+ }
2982
+
2983
+ .fig-fill-picker-scale {
2984
+ width: 56px;
2985
+ }
2986
+ }
2987
+
2988
+ .fig-fill-picker-media-preview {
2989
+ position: relative;
2990
+ aspect-ratio: 1;
2991
+ border-radius: var(--radius-medium);
2992
+ overflow: hidden;
2993
+ display: flex;
2994
+ align-items: center;
2995
+ justify-content: center;
2996
+
2997
+ &.dragover {
2998
+ outline: 2px dashed var(--figma-color-border-brand);
2999
+ outline-offset: -2px;
3000
+ }
3001
+
3002
+ &.has-media {
3003
+ fig-button {
3004
+ visibility: hidden;
3005
+ }
3006
+ &:hover {
3007
+ fig-button {
3008
+ visibility: visible;
3009
+ }
3010
+ }
3011
+ }
3012
+ }
3013
+
3014
+ .fig-fill-picker-checkerboard {
3015
+ position: absolute;
3016
+ inset: 0;
3017
+ background-image: linear-gradient(
3018
+ 45deg,
3019
+ var(--figma-color-bg-tertiary) 25%,
3020
+ transparent 25%
3021
+ ),
3022
+ linear-gradient(-45deg, var(--figma-color-bg-tertiary) 25%, transparent 25%),
3023
+ linear-gradient(45deg, transparent 75%, var(--figma-color-bg-tertiary) 75%),
3024
+ linear-gradient(-45deg, transparent 75%, var(--figma-color-bg-tertiary) 75%);
3025
+ background-size: 16px 16px;
3026
+ background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
3027
+ }
3028
+
3029
+ .fig-fill-picker-image-preview {
3030
+ position: absolute;
3031
+ inset: 0;
3032
+ width: 100%;
3033
+ height: 100%;
3034
+ display: none;
3035
+ }
3036
+
3037
+ .fig-fill-picker-video-preview {
3038
+ position: absolute;
3039
+ inset: 0;
3040
+ width: 100%;
3041
+ height: 100%;
3042
+ object-fit: cover;
3043
+ display: none;
3044
+ }
3045
+
3046
+ .fig-fill-picker-upload {
3047
+ position: relative;
3048
+ z-index: 1;
3049
+ }
3050
+
3051
+ /* Webcam Tab */
3052
+ .fig-fill-picker-webcam-preview {
3053
+ position: relative;
3054
+ aspect-ratio: 1;
3055
+ border-radius: var(--radius-medium);
3056
+ overflow: hidden;
3057
+ margin-bottom: var(--spacer-2);
3058
+ }
3059
+
3060
+ .fig-fill-picker-webcam-video {
3061
+ position: absolute;
3062
+ inset: 0;
3063
+ width: 100%;
3064
+ height: 100%;
3065
+ object-fit: cover;
3066
+ }
3067
+
3068
+ .fig-fill-picker-webcam-status {
3069
+ position: absolute;
3070
+ inset: 0;
3071
+ display: flex;
3072
+ align-items: center;
3073
+ justify-content: center;
3074
+ background: var(--figma-color-bg-secondary);
3075
+ color: var(--figma-color-text-secondary);
3076
+ font-size: 0.75rem;
3077
+ }
3078
+
3079
+ .fig-fill-picker-webcam-controls {
3080
+ display: flex;
3081
+ gap: var(--spacer-1);
3082
+
3083
+ .fig-fill-picker-camera-select {
3084
+ flex: 1;
3085
+ }
3086
+
3087
+ .fig-fill-picker-webcam-capture {
3088
+ flex-shrink: 0;
3089
+ }
3090
+ }
3091
+
2792
3092
  /* Utilities */
2793
3093
 
3094
+ .fig-mask-icon {
3095
+ --size: var(--spacer-4);
3096
+ --icon: var(--icon-add);
3097
+ display: inline-flex;
3098
+ width: var(--size);
3099
+ height: var(--size);
3100
+ background: currentColor;
3101
+ mask-image: var(--icon);
3102
+ mask-size: contain;
3103
+ mask-repeat: no-repeat;
3104
+ mask-position: center;
3105
+ -webkit-mask-image: var(--icon);
3106
+ -webkit-mask-size: contain;
3107
+ -webkit-mask-repeat: no-repeat;
3108
+ -webkit-mask-position: center;
3109
+ }
3110
+
2794
3111
  @keyframes fig-spinner-spin {
2795
3112
  from {
2796
3113
  transform: rotate(0deg);