@rogieking/figui3 9.0.7 → 9.0.9
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 +1 -0
- package/components.css +75 -66
- package/dist/components.css +1 -1
- package/dist/fig-editor.css +1 -1
- package/dist/fig-editor.js +1 -1
- package/dist/fig-lab.css +1 -1
- package/dist/fig.css +1 -1
- package/dist/fig.js +5 -5
- package/fig-editor.css +29 -3
- package/fig-editor.js +2 -1
- package/fig-lab.css +0 -4
- package/fig.js +32 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -702,6 +702,7 @@ Tabs use `role="tablist"` / `role="tab"` and roving focus. Use `content="#panel-
|
|
|
702
702
|
| `value` | string | — | Selected segment value |
|
|
703
703
|
| `animated` | boolean | `false` | Animate indicator transitions |
|
|
704
704
|
| `sizing` | string | `"equal"` | `"equal"` or `"auto"` width mode |
|
|
705
|
+
| `size` | string | — | Set to `"large"` for a 32px-tall control |
|
|
705
706
|
|
|
706
707
|
**Events:** `input`, `change` — detail contains the selected value.
|
|
707
708
|
|
package/components.css
CHANGED
|
@@ -1365,7 +1365,6 @@ fig-tabs,
|
|
|
1365
1365
|
/* Avatar */
|
|
1366
1366
|
fig-avatar,
|
|
1367
1367
|
.fig-avatar {
|
|
1368
|
-
contain: layout paint;
|
|
1369
1368
|
--size: 1.5rem;
|
|
1370
1369
|
width: var(--size);
|
|
1371
1370
|
flex-shrink: 0;
|
|
@@ -1873,10 +1872,6 @@ fig-media-controls {
|
|
|
1873
1872
|
align-items: center;
|
|
1874
1873
|
}
|
|
1875
1874
|
|
|
1876
|
-
fig-icon {
|
|
1877
|
-
contain: none;
|
|
1878
|
-
}
|
|
1879
|
-
|
|
1880
1875
|
&[overlay]:not([overlay="false"]) {
|
|
1881
1876
|
border-radius: var(--radius-medium);
|
|
1882
1877
|
background-color: var(--figma-color-bg);
|
|
@@ -2479,7 +2474,6 @@ input[type="checkbox"].switch {
|
|
|
2479
2474
|
--width: 2rem;
|
|
2480
2475
|
--height: 1rem;
|
|
2481
2476
|
--figma-focus-outline-offset: 1px;
|
|
2482
|
-
contain: strict;
|
|
2483
2477
|
display: inline-flex;
|
|
2484
2478
|
margin: 0;
|
|
2485
2479
|
vertical-align: middle;
|
|
@@ -2642,7 +2636,6 @@ label.checkbox:has([type="checkbox"]) {
|
|
|
2642
2636
|
|
|
2643
2637
|
/* Radio */
|
|
2644
2638
|
input[type="radio"] {
|
|
2645
|
-
contain: strict;
|
|
2646
2639
|
--figma-focus-outline-offset: 1px;
|
|
2647
2640
|
appearance: none;
|
|
2648
2641
|
border-radius: 0.5rem;
|
|
@@ -4520,13 +4513,13 @@ fig-spinner {
|
|
|
4520
4513
|
/* Segmented control */
|
|
4521
4514
|
.segmented-control,
|
|
4522
4515
|
fig-segmented-control {
|
|
4523
|
-
contain: layout paint;
|
|
4524
4516
|
display: inline-flex;
|
|
4525
4517
|
user-select: none;
|
|
4526
4518
|
background-color: var(--figma-color-bg-secondary);
|
|
4527
4519
|
border: 0;
|
|
4528
4520
|
border-radius: var(--radius-medium);
|
|
4529
|
-
height: 1.5rem;
|
|
4521
|
+
--fig-segmented-control-height: 1.5rem;
|
|
4522
|
+
height: var(--fig-segmented-control-height);
|
|
4530
4523
|
padding: 1px;
|
|
4531
4524
|
gap: 0;
|
|
4532
4525
|
align-items: stretch;
|
|
@@ -4560,7 +4553,7 @@ fig-segmented-control {
|
|
|
4560
4553
|
& fig-segment {
|
|
4561
4554
|
--figma-focus-outline-offset: 0;
|
|
4562
4555
|
flex: 1 1 0;
|
|
4563
|
-
min-width:
|
|
4556
|
+
min-width: var(--fig-segmented-control-height);
|
|
4564
4557
|
display: flex;
|
|
4565
4558
|
align-items: center;
|
|
4566
4559
|
justify-content: center;
|
|
@@ -4577,6 +4570,10 @@ fig-segmented-control {
|
|
|
4577
4570
|
transition: none;
|
|
4578
4571
|
text-transform: capitalize;
|
|
4579
4572
|
|
|
4573
|
+
&:has(> :is(svg, fig-icon):only-child) {
|
|
4574
|
+
padding: 0;
|
|
4575
|
+
}
|
|
4576
|
+
|
|
4580
4577
|
&[selected]:not([selected="false"]),
|
|
4581
4578
|
&[selected="true"] {
|
|
4582
4579
|
color: var(--figma-color-text);
|
|
@@ -4603,8 +4600,17 @@ fig-segmented-control {
|
|
|
4603
4600
|
&:not([sizing]),
|
|
4604
4601
|
&[sizing=""],
|
|
4605
4602
|
&[sizing="equal"] {
|
|
4603
|
+
display: inline-grid;
|
|
4604
|
+
grid-auto-flow: column;
|
|
4605
|
+
grid-auto-columns: 1fr;
|
|
4606
|
+
|
|
4606
4607
|
& fig-segment {
|
|
4607
|
-
flex:
|
|
4608
|
+
flex: none;
|
|
4609
|
+
}
|
|
4610
|
+
|
|
4611
|
+
&[full]:not([full="false"]) {
|
|
4612
|
+
display: grid;
|
|
4613
|
+
grid-auto-columns: minmax(0, 1fr);
|
|
4608
4614
|
}
|
|
4609
4615
|
}
|
|
4610
4616
|
|
|
@@ -4637,11 +4643,7 @@ fig-segmented-control {
|
|
|
4637
4643
|
}
|
|
4638
4644
|
|
|
4639
4645
|
&[size="large"] {
|
|
4640
|
-
height: var(--spacer-5);
|
|
4641
|
-
|
|
4642
|
-
& fig-segment {
|
|
4643
|
-
padding: 0 var(--spacer-3);
|
|
4644
|
-
}
|
|
4646
|
+
--fig-segmented-control-height: var(--spacer-5);
|
|
4645
4647
|
}
|
|
4646
4648
|
|
|
4647
4649
|
&[disabled]:not([disabled="false"]) {
|
|
@@ -5370,9 +5372,6 @@ fig-skeleton {
|
|
|
5370
5372
|
|
|
5371
5373
|
.fig-mask-icon,
|
|
5372
5374
|
fig-icon {
|
|
5373
|
-
/* size only — paint containment skips mask-image when `name` / `--icon` updates
|
|
5374
|
-
until a sibling hover (e.g. fig-preview) forces a repaint. */
|
|
5375
|
-
contain: size;
|
|
5376
5375
|
--size: var(--spacer-4);
|
|
5377
5376
|
--icon: var(--icon-24-add);
|
|
5378
5377
|
|
|
@@ -5428,9 +5427,13 @@ fig-chooser {
|
|
|
5428
5427
|
--fig-chooser-gap: var(--spacer-2);
|
|
5429
5428
|
--fig-chooser-inline-padding: var(--spacer-2);
|
|
5430
5429
|
--fig-chooser-block-padding: var(--spacer-2);
|
|
5431
|
-
--fig-chooser-inline-margin:
|
|
5430
|
+
--fig-chooser-inline-margin: 0px;
|
|
5431
|
+
--fig-choice-selection-ring-width: 2px;
|
|
5432
|
+
--fig-choice-selection-ring-gutter: calc(
|
|
5433
|
+
var(--fig-choice-selection-ring-width) * 2
|
|
5434
|
+
);
|
|
5432
5435
|
|
|
5433
|
-
box-sizing:
|
|
5436
|
+
box-sizing: content-box;
|
|
5434
5437
|
display: flex;
|
|
5435
5438
|
flex-direction: column;
|
|
5436
5439
|
gap: var(--fig-chooser-gap);
|
|
@@ -5439,8 +5442,12 @@ fig-chooser {
|
|
|
5439
5442
|
max-width: inherit;
|
|
5440
5443
|
min-width: 0;
|
|
5441
5444
|
overflow: hidden auto;
|
|
5442
|
-
padding:
|
|
5443
|
-
margin:
|
|
5445
|
+
padding: var(--fig-choice-selection-ring-gutter);
|
|
5446
|
+
margin: calc(var(--fig-choice-selection-ring-gutter) * -1)
|
|
5447
|
+
calc(
|
|
5448
|
+
var(--fig-chooser-inline-margin) -
|
|
5449
|
+
var(--fig-choice-selection-ring-gutter)
|
|
5450
|
+
);
|
|
5444
5451
|
scroll-behavior: smooth;
|
|
5445
5452
|
scrollbar-width: none;
|
|
5446
5453
|
width: calc(100% - var(--fig-chooser-inline-margin) * 2);
|
|
@@ -5454,7 +5461,7 @@ fig-chooser {
|
|
|
5454
5461
|
}
|
|
5455
5462
|
|
|
5456
5463
|
fig-field > &{
|
|
5457
|
-
--fig-chooser-inline-margin:
|
|
5464
|
+
--fig-chooser-inline-margin: 0px;
|
|
5458
5465
|
}
|
|
5459
5466
|
|
|
5460
5467
|
> :not(.fig-overflow) {
|
|
@@ -5517,15 +5524,17 @@ fig-chooser {
|
|
|
5517
5524
|
flex: 0 0 var(--chooser-fade-size);
|
|
5518
5525
|
height: auto;
|
|
5519
5526
|
width: var(--chooser-fade-size);
|
|
5520
|
-
margin-top:
|
|
5521
|
-
margin-bottom:
|
|
5527
|
+
margin-top: calc(var(--fig-choice-selection-ring-gutter) * -1);
|
|
5528
|
+
margin-bottom: calc(var(--fig-choice-selection-ring-gutter) * -1);
|
|
5522
5529
|
}
|
|
5523
5530
|
|
|
5524
5531
|
> .fig-overflow-start {
|
|
5525
5532
|
box-shadow: 1px 0 0 0 var(--figma-color-bordertranslucent);
|
|
5526
|
-
inset-inline-start:
|
|
5527
|
-
|
|
5528
|
-
|
|
5533
|
+
inset-inline-start: calc(
|
|
5534
|
+
var(--fig-choice-selection-ring-gutter) * -1
|
|
5535
|
+
);
|
|
5536
|
+
left: calc(var(--fig-choice-selection-ring-gutter) * -1);
|
|
5537
|
+
margin-block-end: calc(var(--fig-choice-selection-ring-gutter) * -1);
|
|
5529
5538
|
margin-inline-end: calc(-1 * var(--chooser-fade-size));
|
|
5530
5539
|
right: auto;
|
|
5531
5540
|
top: 0;
|
|
@@ -5542,11 +5551,11 @@ fig-chooser {
|
|
|
5542
5551
|
> .fig-overflow-end {
|
|
5543
5552
|
bottom: auto;
|
|
5544
5553
|
box-shadow: -1px 0 0 0 var(--figma-color-bordertranslucent);
|
|
5545
|
-
inset-inline-end:
|
|
5554
|
+
inset-inline-end: calc(var(--fig-choice-selection-ring-gutter) * -1);
|
|
5546
5555
|
left: auto;
|
|
5547
|
-
margin-block-start:
|
|
5556
|
+
margin-block-start: calc(var(--fig-choice-selection-ring-gutter) * -1);
|
|
5548
5557
|
margin-inline-start: calc(-1 * var(--chooser-fade-size));
|
|
5549
|
-
right:
|
|
5558
|
+
right: calc(var(--fig-choice-selection-ring-gutter) * -1);
|
|
5550
5559
|
top: 0;
|
|
5551
5560
|
|
|
5552
5561
|
&:before {
|
|
@@ -5558,17 +5567,27 @@ fig-chooser {
|
|
|
5558
5567
|
}
|
|
5559
5568
|
}
|
|
5560
5569
|
}
|
|
5570
|
+
&:not([layout]),
|
|
5571
|
+
&[layout=""],
|
|
5561
5572
|
&[layout="vertical"],
|
|
5562
5573
|
&[layout="grid"]{
|
|
5563
5574
|
&>.fig-overflow{
|
|
5564
|
-
margin-left:
|
|
5565
|
-
margin-right:
|
|
5575
|
+
margin-left: calc(var(--fig-choice-selection-ring-gutter) * -1);
|
|
5576
|
+
margin-right: calc(var(--fig-choice-selection-ring-gutter) * -1);
|
|
5577
|
+
width: calc(100% + var(--fig-choice-selection-ring-gutter) * 2);
|
|
5578
|
+
}
|
|
5579
|
+
&>.fig-overflow-start {
|
|
5580
|
+
top: calc(var(--fig-choice-selection-ring-gutter) * -1);
|
|
5581
|
+
}
|
|
5582
|
+
&>.fig-overflow-end {
|
|
5583
|
+
bottom: calc(var(--fig-choice-selection-ring-gutter) * -1);
|
|
5566
5584
|
}
|
|
5567
5585
|
}
|
|
5568
5586
|
|
|
5569
5587
|
&[layout="grid"] {
|
|
5570
5588
|
display: grid;
|
|
5571
|
-
gap: var(--fig-chooser-gap);
|
|
5589
|
+
column-gap: var(--fig-chooser-gap);
|
|
5590
|
+
row-gap: 0;
|
|
5572
5591
|
grid-template-columns: repeat(
|
|
5573
5592
|
var(--fig-chooser-grid-columns, 2),
|
|
5574
5593
|
minmax(0, 1fr)
|
|
@@ -5578,20 +5597,15 @@ fig-chooser {
|
|
|
5578
5597
|
|
|
5579
5598
|
> :not(.fig-overflow) {
|
|
5580
5599
|
margin: 0;
|
|
5600
|
+
margin-block-start: var(--fig-chooser-gap);
|
|
5581
5601
|
}
|
|
5582
5602
|
|
|
5583
|
-
>
|
|
5584
|
-
margin: 0;
|
|
5585
|
-
}
|
|
5586
|
-
|
|
5587
|
-
> .fig-overflow-start + :not(.fig-overflow),
|
|
5588
|
-
> :not(.fig-overflow):has(+ .fig-overflow-end) {
|
|
5589
|
-
margin: 0;
|
|
5603
|
+
> [data-fig-chooser-first-row] {
|
|
5604
|
+
margin-block-start: 0;
|
|
5590
5605
|
}
|
|
5591
5606
|
|
|
5592
5607
|
> .fig-overflow {
|
|
5593
5608
|
grid-column: 1 / -1;
|
|
5594
|
-
margin-inline: 0;
|
|
5595
5609
|
}
|
|
5596
5610
|
|
|
5597
5611
|
> .fig-overflow-start {
|
|
@@ -5694,7 +5708,6 @@ fig-card {
|
|
|
5694
5708
|
}
|
|
5695
5709
|
|
|
5696
5710
|
.fig-card-label {
|
|
5697
|
-
font-size: var(--font-size-small);
|
|
5698
5711
|
line-height: var(--line-height);
|
|
5699
5712
|
color: var(--figma-color-text);
|
|
5700
5713
|
min-width: 0;
|
|
@@ -5716,7 +5729,6 @@ fig-card {
|
|
|
5716
5729
|
.fig-card-sublabel {
|
|
5717
5730
|
box-sizing: border-box;
|
|
5718
5731
|
display: block;
|
|
5719
|
-
font-size: var(--font-size-small);
|
|
5720
5732
|
line-height: var(--line-height);
|
|
5721
5733
|
color: var(--figma-color-text-secondary);
|
|
5722
5734
|
padding-inline: var(--spacer-1);
|
|
@@ -5765,7 +5777,6 @@ fig-card {
|
|
|
5765
5777
|
}
|
|
5766
5778
|
|
|
5767
5779
|
fig-choice {
|
|
5768
|
-
--fig-choice-selection-ring-width: 2px;
|
|
5769
5780
|
--fig-choice-padding: 0px;
|
|
5770
5781
|
--fig-choice-text-padding-inline: var(--spacer-2);
|
|
5771
5782
|
--fig-choice-border-radius: var(--radius-medium);
|
|
@@ -5813,9 +5824,9 @@ fig-choice {
|
|
|
5813
5824
|
);
|
|
5814
5825
|
pointer-events: none;
|
|
5815
5826
|
z-index: 1;
|
|
5816
|
-
outline: var(--fig-choice-selection-ring-width) solid
|
|
5827
|
+
outline: var(--fig-choice-selection-ring-width, 2px) solid
|
|
5817
5828
|
var(--figma-color-border-selected);
|
|
5818
|
-
outline-offset:
|
|
5829
|
+
outline-offset: var(--fig-choice-selection-ring-width, 2px);
|
|
5819
5830
|
}
|
|
5820
5831
|
background-color: var(--figma-color-bg-secondary);
|
|
5821
5832
|
}
|
|
@@ -5902,6 +5913,11 @@ fig-handle {
|
|
|
5902
5913
|
outline-offset: var(--figma-focus-outline-offset);
|
|
5903
5914
|
}
|
|
5904
5915
|
|
|
5916
|
+
&[data-fig-pointer-focus]:focus-visible {
|
|
5917
|
+
outline: var(--fig-handle-outline);
|
|
5918
|
+
outline-offset: var(--fig-handle-outline-offset);
|
|
5919
|
+
}
|
|
5920
|
+
|
|
5905
5921
|
/* Default handle (no type) hover/selected */
|
|
5906
5922
|
&:hover:not([type]),
|
|
5907
5923
|
&[selected]:not([selected="false"]):not([type]) {
|
|
@@ -5995,7 +6011,6 @@ fig-color-tip {
|
|
|
5995
6011
|
--tip-selection-scale: 1;
|
|
5996
6012
|
--beak-offset: 50%;
|
|
5997
6013
|
|
|
5998
|
-
contain: layout;
|
|
5999
6014
|
inset: unset;
|
|
6000
6015
|
display: inline-grid;
|
|
6001
6016
|
place-items: center;
|
|
@@ -6087,7 +6102,7 @@ fig-menu::part(listbox) {
|
|
|
6087
6102
|
}
|
|
6088
6103
|
|
|
6089
6104
|
fig-menu-item {
|
|
6090
|
-
--fig-menu-item-padding: var(--spacer-1) var(--spacer-4);
|
|
6105
|
+
--fig-menu-item-padding: var(--spacer-1,0.25rem) var(--spacer-4,1rem);
|
|
6091
6106
|
box-sizing: border-box;
|
|
6092
6107
|
display: flex;
|
|
6093
6108
|
flex-shrink: 0;
|
|
@@ -6161,14 +6176,14 @@ fig-menu-item {
|
|
|
6161
6176
|
:is(fig-separator, fig-menu-separator) {
|
|
6162
6177
|
--fig-separator-color: var(--figma-color-border);
|
|
6163
6178
|
--fig-separator-label-color: var(--figma-color-text-secondary);
|
|
6164
|
-
--fig-separator-padding: 0 var(--spacer-
|
|
6179
|
+
--fig-separator-padding: 0 var(--spacer-4,1rem);
|
|
6165
6180
|
|
|
6166
6181
|
display: block;
|
|
6167
6182
|
box-sizing: border-box;
|
|
6168
6183
|
flex-shrink: 0;
|
|
6169
6184
|
width: 100%;
|
|
6170
6185
|
height: 1px;
|
|
6171
|
-
margin: var(--spacer-2) 0;
|
|
6186
|
+
margin: var(--spacer-2,0.5rem) 0;
|
|
6172
6187
|
padding: var(--fig-separator-padding);
|
|
6173
6188
|
border: 0;
|
|
6174
6189
|
background: var(--fig-separator-color);
|
|
@@ -6199,17 +6214,17 @@ fig-menu-item {
|
|
|
6199
6214
|
&[label]:not([label=""]) {
|
|
6200
6215
|
display: flex;
|
|
6201
6216
|
flex-direction: column;
|
|
6202
|
-
gap: var(--spacer-2);
|
|
6217
|
+
gap: var(--spacer-2,0.5rem);
|
|
6203
6218
|
height: auto;
|
|
6204
|
-
margin: var(--spacer-2) 0;
|
|
6205
|
-
margin-bottom: var(--spacer-1);
|
|
6219
|
+
margin: var(--spacer-2,0.5rem) 0;
|
|
6220
|
+
margin-bottom: var(--spacer-1,0.25rem);
|
|
6206
6221
|
background: transparent;
|
|
6207
6222
|
|
|
6208
6223
|
&::before {
|
|
6209
6224
|
content: "";
|
|
6210
6225
|
display: block;
|
|
6211
6226
|
height: 1px;
|
|
6212
|
-
margin-inline: calc(-1 * var(--spacer-
|
|
6227
|
+
margin-inline: calc(-1 * var(--spacer-4,1rem));
|
|
6213
6228
|
background: var(--fig-separator-color);
|
|
6214
6229
|
}
|
|
6215
6230
|
|
|
@@ -6217,14 +6232,8 @@ fig-menu-item {
|
|
|
6217
6232
|
content: attr(label);
|
|
6218
6233
|
display: block;
|
|
6219
6234
|
color: var(--fig-separator-label-color);
|
|
6220
|
-
line-height: var(--spacer-4);
|
|
6221
|
-
min-height: var(--spacer-4);
|
|
6222
|
-
}
|
|
6223
|
-
|
|
6224
|
-
&:first-child{
|
|
6225
|
-
&::before {
|
|
6226
|
-
display: none;
|
|
6227
|
-
}
|
|
6235
|
+
line-height: var(--spacer-4,1rem);
|
|
6236
|
+
min-height: var(--spacer-4,1rem);
|
|
6228
6237
|
}
|
|
6229
6238
|
|
|
6230
6239
|
&[sticky]:not([sticky="false"]) {
|
|
@@ -6234,14 +6243,14 @@ fig-menu-item {
|
|
|
6234
6243
|
background: var(--fig-popup-bg-color, var(--figma-color-bg));
|
|
6235
6244
|
|
|
6236
6245
|
&[stuck] {
|
|
6237
|
-
--fig-separator-padding: var(--spacer-2) var(--spacer-
|
|
6246
|
+
--fig-separator-padding: var(--spacer-2,0.5rem) var(--spacer-4,1rem);
|
|
6238
6247
|
&::before {
|
|
6239
6248
|
display: none;
|
|
6240
6249
|
}
|
|
6241
6250
|
}
|
|
6242
6251
|
|
|
6243
6252
|
:is(fig-select-options, .fig-menu-options, fig-menu).overflow-start > & {
|
|
6244
|
-
top: var(--fig-vertical-overflow-size, var(--spacer-4));
|
|
6253
|
+
top: var(--fig-vertical-overflow-size, var(--spacer-4,1rem));
|
|
6245
6254
|
}
|
|
6246
6255
|
}
|
|
6247
6256
|
}
|