@rogieking/figui3 9.0.8 → 9.0.10
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/.cursor/skills/fig-editor/SKILL.md +1 -1
- package/.cursor/skills/fig-editor/components.md +1 -1
- package/.cursor/skills/fig-editor/reference.md +1 -1
- package/README.md +1 -1
- package/components.css +41 -19
- package/dist/components.css +1 -1
- package/dist/fig-editor.css +1 -1
- package/dist/fig-editor.js +2 -2
- package/dist/fig.css +1 -1
- package/dist/fig.js +3 -3
- package/fig-editor.css +1 -1
- package/fig-editor.js +20 -7
- package/fig.js +8 -0
- package/package.json +1 -1
|
@@ -41,7 +41,7 @@ Registered tags:
|
|
|
41
41
|
- `fig-dropdown` (core): native `<select>`.
|
|
42
42
|
- `fig-select` (this skill): custom listbox. Use this for Figma-style menus.
|
|
43
43
|
|
|
44
|
-
Author options as React children, or pass `options`. Do not `stopPropagation` on option click. `optionhover`
|
|
44
|
+
Author options as React children, or pass `options`. Do not `stopPropagation` on option click. `optionhover` and `optionfocus` are native preview listeners.
|
|
45
45
|
|
|
46
46
|
## Fill picker
|
|
47
47
|
|
|
@@ -30,7 +30,7 @@ Data-driven (no authored options):
|
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
- Attrs: `value`, `label`, `options` (comma / newline / JSON), `variant` (`ghost`), `size` (`large`, 32px trigger), `subtle` (applies the secondary hover/focus fill to every option), `full`, `disabled`, `position` (`bottom left` default, also `bottom right`, `top left`, `top right`, `bottom center`, `top center`), `offset`, `closedby`, `open`
|
|
33
|
-
- Events: `input` / `change` on commit; `optionhover`
|
|
33
|
+
- Events: `input` / `change` on commit; `optionhover` for pointer previews; `optionfocus` for open-menu keyboard previews. Both preview events provide the option value in `detail` without changing selection and require native listeners.
|
|
34
34
|
- Do not `stopPropagation` on option click — React light-DOM handlers must run.
|
|
35
35
|
- Internal popup uses `popover="manual"` so the list works inside `fig-popup variant="popover"`.
|
|
36
36
|
- List `min-width` matches the trigger; `max-width` is `min(20rem, calc(100vw - 1rem))`. Overflow: chevron buttons, not a native scrollbar.
|
package/README.md
CHANGED
|
@@ -234,7 +234,7 @@ Author options in `<fig-select-options>`, or pass `options`. Add `subtle` to one
|
|
|
234
234
|
</fig-select>
|
|
235
235
|
```
|
|
236
236
|
|
|
237
|
-
**Events:** `input`, `change`, `optionhover` (`detail` is the hovered option value).
|
|
237
|
+
**Events:** `input`, `change`, `optionhover` (`detail` is the hovered option value), `optionfocus` (`detail` is the keyboard-focused option value while the menu is open).
|
|
238
238
|
|
|
239
239
|
---
|
|
240
240
|
|
package/components.css
CHANGED
|
@@ -5427,9 +5427,13 @@ fig-chooser {
|
|
|
5427
5427
|
--fig-chooser-gap: var(--spacer-2);
|
|
5428
5428
|
--fig-chooser-inline-padding: var(--spacer-2);
|
|
5429
5429
|
--fig-chooser-block-padding: var(--spacer-2);
|
|
5430
|
-
--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
|
+
);
|
|
5431
5435
|
|
|
5432
|
-
box-sizing:
|
|
5436
|
+
box-sizing: content-box;
|
|
5433
5437
|
display: flex;
|
|
5434
5438
|
flex-direction: column;
|
|
5435
5439
|
gap: var(--fig-chooser-gap);
|
|
@@ -5438,8 +5442,12 @@ fig-chooser {
|
|
|
5438
5442
|
max-width: inherit;
|
|
5439
5443
|
min-width: 0;
|
|
5440
5444
|
overflow: hidden auto;
|
|
5441
|
-
padding:
|
|
5442
|
-
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
|
+
);
|
|
5443
5451
|
scroll-behavior: smooth;
|
|
5444
5452
|
scrollbar-width: none;
|
|
5445
5453
|
width: calc(100% - var(--fig-chooser-inline-margin) * 2);
|
|
@@ -5453,7 +5461,7 @@ fig-chooser {
|
|
|
5453
5461
|
}
|
|
5454
5462
|
|
|
5455
5463
|
fig-field > &{
|
|
5456
|
-
--fig-chooser-inline-margin:
|
|
5464
|
+
--fig-chooser-inline-margin: 0px;
|
|
5457
5465
|
}
|
|
5458
5466
|
|
|
5459
5467
|
> :not(.fig-overflow) {
|
|
@@ -5516,15 +5524,17 @@ fig-chooser {
|
|
|
5516
5524
|
flex: 0 0 var(--chooser-fade-size);
|
|
5517
5525
|
height: auto;
|
|
5518
5526
|
width: var(--chooser-fade-size);
|
|
5519
|
-
margin-top:
|
|
5520
|
-
margin-bottom:
|
|
5527
|
+
margin-top: calc(var(--fig-choice-selection-ring-gutter) * -1);
|
|
5528
|
+
margin-bottom: calc(var(--fig-choice-selection-ring-gutter) * -1);
|
|
5521
5529
|
}
|
|
5522
5530
|
|
|
5523
5531
|
> .fig-overflow-start {
|
|
5524
5532
|
box-shadow: 1px 0 0 0 var(--figma-color-bordertranslucent);
|
|
5525
|
-
inset-inline-start:
|
|
5526
|
-
|
|
5527
|
-
|
|
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);
|
|
5528
5538
|
margin-inline-end: calc(-1 * var(--chooser-fade-size));
|
|
5529
5539
|
right: auto;
|
|
5530
5540
|
top: 0;
|
|
@@ -5541,11 +5551,11 @@ fig-chooser {
|
|
|
5541
5551
|
> .fig-overflow-end {
|
|
5542
5552
|
bottom: auto;
|
|
5543
5553
|
box-shadow: -1px 0 0 0 var(--figma-color-bordertranslucent);
|
|
5544
|
-
inset-inline-end:
|
|
5554
|
+
inset-inline-end: calc(var(--fig-choice-selection-ring-gutter) * -1);
|
|
5545
5555
|
left: auto;
|
|
5546
|
-
margin-block-start:
|
|
5556
|
+
margin-block-start: calc(var(--fig-choice-selection-ring-gutter) * -1);
|
|
5547
5557
|
margin-inline-start: calc(-1 * var(--chooser-fade-size));
|
|
5548
|
-
right:
|
|
5558
|
+
right: calc(var(--fig-choice-selection-ring-gutter) * -1);
|
|
5549
5559
|
top: 0;
|
|
5550
5560
|
|
|
5551
5561
|
&:before {
|
|
@@ -5557,11 +5567,20 @@ fig-chooser {
|
|
|
5557
5567
|
}
|
|
5558
5568
|
}
|
|
5559
5569
|
}
|
|
5570
|
+
&:not([layout]),
|
|
5571
|
+
&[layout=""],
|
|
5560
5572
|
&[layout="vertical"],
|
|
5561
5573
|
&[layout="grid"]{
|
|
5562
5574
|
&>.fig-overflow{
|
|
5563
|
-
margin-left:
|
|
5564
|
-
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);
|
|
5565
5584
|
}
|
|
5566
5585
|
}
|
|
5567
5586
|
|
|
@@ -5587,7 +5606,6 @@ fig-chooser {
|
|
|
5587
5606
|
|
|
5588
5607
|
> .fig-overflow {
|
|
5589
5608
|
grid-column: 1 / -1;
|
|
5590
|
-
margin-inline: 0;
|
|
5591
5609
|
}
|
|
5592
5610
|
|
|
5593
5611
|
> .fig-overflow-start {
|
|
@@ -5759,7 +5777,6 @@ fig-card {
|
|
|
5759
5777
|
}
|
|
5760
5778
|
|
|
5761
5779
|
fig-choice {
|
|
5762
|
-
--fig-choice-selection-ring-width: 2px;
|
|
5763
5780
|
--fig-choice-padding: 0px;
|
|
5764
5781
|
--fig-choice-text-padding-inline: var(--spacer-2);
|
|
5765
5782
|
--fig-choice-border-radius: var(--radius-medium);
|
|
@@ -5807,9 +5824,9 @@ fig-choice {
|
|
|
5807
5824
|
);
|
|
5808
5825
|
pointer-events: none;
|
|
5809
5826
|
z-index: 1;
|
|
5810
|
-
outline: var(--fig-choice-selection-ring-width) solid
|
|
5827
|
+
outline: var(--fig-choice-selection-ring-width, 2px) solid
|
|
5811
5828
|
var(--figma-color-border-selected);
|
|
5812
|
-
outline-offset:
|
|
5829
|
+
outline-offset: var(--fig-choice-selection-ring-width, 2px);
|
|
5813
5830
|
}
|
|
5814
5831
|
background-color: var(--figma-color-bg-secondary);
|
|
5815
5832
|
}
|
|
@@ -5896,6 +5913,11 @@ fig-handle {
|
|
|
5896
5913
|
outline-offset: var(--figma-focus-outline-offset);
|
|
5897
5914
|
}
|
|
5898
5915
|
|
|
5916
|
+
&[data-fig-pointer-focus]:focus-visible {
|
|
5917
|
+
outline: var(--fig-handle-outline);
|
|
5918
|
+
outline-offset: var(--fig-handle-outline-offset);
|
|
5919
|
+
}
|
|
5920
|
+
|
|
5899
5921
|
/* Default handle (no type) hover/selected */
|
|
5900
5922
|
&:hover:not([type]),
|
|
5901
5923
|
&[selected]:not([selected="false"]):not([type]) {
|