@rogieking/figui3 6.20.2 → 6.21.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/fig-editor.css CHANGED
@@ -87,7 +87,7 @@ fig-fill-picker {
87
87
  padding-bottom: var(--spacer-2-5);
88
88
  }
89
89
 
90
- .fig-fill-picker-gamut {
90
+ .fig-fill-picker-close {
91
91
  margin-left: auto;
92
92
  }
93
93
 
@@ -148,23 +148,77 @@ fig-fill-picker {
148
148
  grid-column: 2;
149
149
  min-width: 0;
150
150
  }
151
+
152
+ &.is-hue-only {
153
+ grid-template-rows: 1fr;
154
+
155
+ .fig-fill-picker-eyedropper {
156
+ grid-row: 1;
157
+ width: auto;
158
+ height: var(--spacer-4);
159
+ aspect-ratio: auto;
160
+ }
161
+ }
151
162
  }
152
163
 
153
164
  .fig-fill-picker-inputs {
165
+ /* Override labelless 1fr/2fr split so mode select matches eyedropper width
166
+ and color inputs take the remaining row. */
167
+ &:not([direction="vertical"]):not(:has(> label)) {
168
+ grid-template-columns:
169
+ var(--fig-field-left-padding)
170
+ 3.5rem
171
+ var(--spacer-2)
172
+ minmax(0, 1fr)
173
+ var(--fig-field-right-padding);
174
+ }
175
+
176
+ .fig-fill-picker-input-mode {
177
+ width: 3.5rem;
178
+ flex-shrink: 0;
179
+ align-self: center;
180
+ }
181
+
154
182
  .fig-fill-picker-input-fields {
155
- flex: 1;
183
+ width: 100%;
156
184
  min-width: 0;
157
185
  display: flex;
158
186
 
159
187
  .input-combo {
160
188
  flex: 1;
161
189
  min-width: 0;
190
+
191
+ fig-input-number > input,
192
+ fig-input-text:not(.fig-fill-picker-ci-hex) > input {
193
+ padding-inline: 0;
194
+ text-align: center;
195
+ }
162
196
  }
163
197
 
164
198
  fig-input-text {
165
199
  flex: 1;
166
200
  min-width: 0;
167
201
  }
202
+
203
+ .fig-fill-picker-ci-css {
204
+ font-variant-numeric: tabular-nums;
205
+ }
206
+
207
+ .fig-fill-picker-ci-hex-row {
208
+ .fig-fill-picker-ci-hex {
209
+ flex: 1 1 auto;
210
+ min-width: 0;
211
+ }
212
+
213
+ .fig-fill-picker-ci-a {
214
+ flex: 0 0 3rem;
215
+ }
216
+ }
217
+
218
+ .fig-fill-picker-ci-a {
219
+ flex: 0 0 2.75rem;
220
+ min-width: 2.75rem;
221
+ }
168
222
  }
169
223
  }
170
224
 
@@ -181,25 +235,57 @@ fig-fill-picker {
181
235
  }
182
236
  }
183
237
 
184
- .fig-fill-picker-gradient-header {
185
- padding-right: var(--spacer-2);
238
+ fig-field.fig-fill-picker-gradient-header {
186
239
  display: flex;
240
+ align-items: center;
241
+ grid-template-columns: unset;
242
+ grid-template-areas: unset;
243
+ padding-right: var(--spacer-2);
187
244
  padding-left: var(--spacer-3);
188
245
  gap: var(--spacer-2);
189
- .fig-fill-picker-gradient-type {
190
- flex: 1;
246
+
247
+ > *:not(.fig-field-chevron):not(label) {
248
+ grid-area: unset;
249
+ }
250
+
251
+ .fig-fill-picker-gradient-type,
252
+ .fig-fill-picker-gradient-angle,
253
+ .fig-fill-picker-gradient-center {
254
+ flex: 1 1 0;
191
255
  min-width: 0;
256
+ width: auto;
192
257
  }
193
258
 
194
- & > *:last-child fig-button {
195
- margin-left: auto;
259
+ .fig-fill-picker-gradient-type,
260
+ .fig-fill-picker-gradient-angle {
261
+ display: flex;
262
+ }
263
+
264
+ .fig-fill-picker-gradient-angle {
265
+ input {
266
+ width: 100%;
267
+ flex: 1 1 auto;
268
+ min-width: 0;
269
+ max-width: none;
270
+ }
196
271
  }
197
272
 
273
+ /* Keep .input-combo join (1px gap + shared radii) — don't add spacer gap. */
198
274
  .fig-fill-picker-gradient-center {
199
275
  fig-input-number {
200
- width: 48px;
276
+ flex: 1 1 0;
277
+ min-width: 0;
278
+ width: auto; /* override default 8.9375rem so the pair can share */
201
279
  }
202
280
  }
281
+
282
+ .fig-fill-picker-gradient-actions {
283
+ display: flex;
284
+ align-items: center;
285
+ flex-shrink: 0;
286
+ gap: var(--spacer-1);
287
+ margin-left: auto;
288
+ }
203
289
  }
204
290
 
205
291
  .fig-fill-picker-gradient-stops {
@@ -210,6 +296,16 @@ fig-fill-picker {
210
296
  }
211
297
  }
212
298
 
299
+ .fig-fill-picker-gradient-space {
300
+ fig-select-option {
301
+
302
+ &:hover::before,
303
+ &:focus-visible::before {
304
+ background-color: var(--figma-color-bg-tertiary);
305
+ }
306
+ }
307
+ }
308
+
213
309
  .fig-fill-picker-gradient-stops-list {
214
310
  display: flex;
215
311
  flex-direction: column;
@@ -251,25 +347,41 @@ fig-fill-picker {
251
347
  }
252
348
 
253
349
  /* Media Tabs (Image/Video/Webcam) */
254
- .fig-fill-picker-media-header {
350
+ fig-field.fig-fill-picker-media-header {
351
+ display: flex;
352
+ align-items: center;
353
+ justify-content: space-between;
354
+ grid-template-columns: unset;
355
+ grid-template-areas: unset;
356
+ padding-left: var(--spacer-3);
357
+ padding-right: var(--spacer-2);
358
+ gap: var(--spacer-2);
359
+
360
+ > *:not(.fig-field-chevron):not(label) {
361
+ grid-area: unset;
362
+ }
363
+
255
364
  .fig-fill-picker-scale-mode {
256
365
  flex: 0 0 auto;
366
+ width: 4.5rem;
257
367
  }
258
368
 
259
369
  .fig-fill-picker-scale {
260
370
  width: 56px;
371
+ flex: 0 0 auto;
372
+ }
373
+
374
+ .fig-fill-picker-media-rotate {
375
+ flex-shrink: 0;
376
+ margin-left: auto;
261
377
  }
262
378
  }
263
379
 
264
380
  .fig-fill-picker-media-preview {
265
381
  position: relative;
266
- aspect-ratio: 1;
267
- margin: var(--spacer-2) var(--spacer-3) var(--spacer-1) var(--spacer-3);
382
+ width: calc(100% - var(--spacer-3) * 2);
383
+ margin: var(--spacer-2) var(--spacer-3) var(--spacer-1);
268
384
  border-radius: var(--radius-medium);
269
- overflow: hidden;
270
- display: flex;
271
- align-items: center;
272
- justify-content: center;
273
385
 
274
386
  &.dragover {
275
387
  outline: 2px dashed var(--figma-color-border-brand);
@@ -288,6 +400,15 @@ fig-fill-picker {
288
400
  }
289
401
  }
290
402
 
403
+ /* Image/webcam: square host is fine (no chrome below the preview). */
404
+ fig-image.fig-fill-picker-media-preview {
405
+ aspect-ratio: 1;
406
+ overflow: hidden;
407
+ display: flex;
408
+ align-items: center;
409
+ justify-content: center;
410
+ }
411
+
291
412
  .fig-fill-picker-checkerboard {
292
413
  position: absolute;
293
414
  inset: 0;
@@ -343,10 +464,29 @@ fig-fill-picker {
343
464
  display: none;
344
465
  }
345
466
 
467
+ /*
468
+ * Video: host must grow for fig-media-controls. Keep the square on the
469
+ * inner fig-preview — aspect-ratio+overflow on the host was clipping
470
+ * the scrubber/play bar at the dialog bottom.
471
+ */
346
472
  fig-media.fig-fill-picker-video-preview {
473
+ aspect-ratio: unset;
474
+ overflow: visible;
475
+ display: flex;
476
+ flex-direction: column;
477
+ align-items: stretch;
347
478
  max-width: none;
348
479
  max-height: none;
349
- width: auto;
480
+ width: calc(100% - var(--spacer-3) * 2);
481
+ gap: var(--spacer-2);
482
+
483
+ > fig-preview {
484
+ aspect-ratio: 1;
485
+ width: 100%;
486
+ max-width: none;
487
+ overflow: hidden;
488
+ border-radius: var(--radius-medium);
489
+ }
350
490
  }
351
491
 
352
492
  .fig-fill-picker-upload {