@rogieking/figui3 11.6.8 → 11.6.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/components.md +1 -1
- package/.cursor/skills/fig-editor/reference.md +1 -0
- package/CHANGELOG.md +17 -0
- package/README.md +1 -1
- package/components.css +44 -1
- package/dist/components.css +1 -1
- package/dist/fig-editor.css +1 -1
- package/dist/fig.css +1 -1
- package/fig-editor.css +36 -0
- package/fig-editor.js +1 -1
- package/package.json +1 -1
|
@@ -29,7 +29,7 @@ Data-driven (no authored options):
|
|
|
29
29
|
/>
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
- Attrs: `value`, `label`, `options` (comma / newline / JSON), `menu-anchor` (alternate anchor selector), `variant` (`ghost` | `input`), `size` (`large`, 32px trigger), `icon` (square chevron-only trigger; provide `aria-label`), `subtle` (applies the secondary hover/focus fill to every option), `full`, `disabled`, `position` (omit to overlay the selected option on the trigger; set `bottom left`, `bottom right`, `top left`, `top right`, `bottom center`, or `top center` to place the menu like a popup), `offset`, `closedby`, `open`
|
|
32
|
+
- Attrs: `value`, `label`, `options` (comma / newline / JSON), `menu-anchor` (alternate anchor selector), `variant` (`primary` | `ghost` | `input`), `size` (`large`, 32px trigger), `icon` (square chevron-only trigger; provide `aria-label`), `subtle` (applies the secondary hover/focus fill to every option), `full`, `disabled`, `position` (omit to overlay the selected option on the trigger; set `bottom left`, `bottom right`, `top left`, `top right`, `bottom center`, or `top center` to place the menu like a popup), `offset`, `closedby`, `open`
|
|
33
33
|
- Property: `menuAnchor` accepts an `Element`, selector string, or `null`. The menu matches the anchor width and centers its selected row over it; if the anchor is narrower than the menu’s usable minimum, default overlay mode centers the wider menu over the anchor. Clear it to restore trigger-text alignment. Explicit `position` keeps anchor-derived sizing while applying normal popup placement and edge alignment.
|
|
34
34
|
- 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.
|
|
35
35
|
- Do not `stopPropagation` on option click — React light-DOM handlers must run.
|
|
@@ -24,6 +24,7 @@ Observed: `value`, `disabled`, `selected`, `label`.
|
|
|
24
24
|
`value`, `disabled`, `label`, `options`, `menu-anchor`, `position`, `offset`, `closedby`, `open`, `variant`, `size`
|
|
25
25
|
|
|
26
26
|
- `icon` renders a square chevron-only trigger; provide `aria-label`
|
|
27
|
+
- `variant="primary"` uses brand button colors for emphasis
|
|
27
28
|
- `variant="input"` matches input-style fill, hover, press, and focus states
|
|
28
29
|
- `subtle` applies the secondary hover/focus fill to every option
|
|
29
30
|
- `size="large"` sets a 32px trigger
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [11.6.10]
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added a `primary` variant to `fig-select` with brand, interaction, open, and disabled states.
|
|
10
|
+
|
|
11
|
+
## [11.6.9]
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Added a native `<meter>` playground example.
|
|
16
|
+
- Added token-driven native `<meter>` styling with customizable `--meter-color`.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Vertically centered native meters inside `fig-field`, matching progress elements.
|
|
21
|
+
|
|
5
22
|
## [11.6.8]
|
|
6
23
|
|
|
7
24
|
### Added
|
package/README.md
CHANGED
|
@@ -236,7 +236,7 @@ Custom listbox select with overflow chevrons, grouped options, and sticky separa
|
|
|
236
236
|
| `label` | string | — | Closed-state / accessible label |
|
|
237
237
|
| `options` | string | — | Comma, newline, or JSON options if no authored `fig-select-option` children |
|
|
238
238
|
| `menu-anchor` | CSS selector | — | Alternate element to align the open menu against |
|
|
239
|
-
| `variant` | string | — | `"ghost"` for a borderless control or `"input"` for input-style fill and interaction states |
|
|
239
|
+
| `variant` | string | — | `"primary"` for brand emphasis, `"ghost"` for a borderless control, or `"input"` for input-style fill and interaction states |
|
|
240
240
|
| `size` | string | — | `"large"` for a 32px-tall trigger |
|
|
241
241
|
| `icon` | boolean | `false` | Render a square chevron-only trigger; provide `aria-label` |
|
|
242
242
|
| `subtle` | boolean | `false` | Use the secondary hover/focus fill for every option |
|
package/components.css
CHANGED
|
@@ -666,6 +666,49 @@ progress {
|
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
668
|
|
|
669
|
+
meter {
|
|
670
|
+
--meter-height: 0.375rem;
|
|
671
|
+
--meter-radius: calc(var(--meter-height) / 2);
|
|
672
|
+
--meter-color: var(--figma-color-bg-brand);
|
|
673
|
+
|
|
674
|
+
display: block;
|
|
675
|
+
width: 100%;
|
|
676
|
+
min-width: 0;
|
|
677
|
+
height: var(--meter-height);
|
|
678
|
+
margin: 0;
|
|
679
|
+
padding: 0;
|
|
680
|
+
border: 0;
|
|
681
|
+
appearance: none;
|
|
682
|
+
-webkit-appearance: none;
|
|
683
|
+
overflow: hidden;
|
|
684
|
+
background: var(--figma-color-bg-secondary);
|
|
685
|
+
border-radius: var(--meter-radius);
|
|
686
|
+
|
|
687
|
+
&::-webkit-meter-bar {
|
|
688
|
+
height: var(--meter-height);
|
|
689
|
+
border: 0;
|
|
690
|
+
background: var(--figma-color-bg-secondary);
|
|
691
|
+
border-radius: var(--meter-radius);
|
|
692
|
+
box-shadow: none;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
&::-webkit-meter-optimum-value,
|
|
696
|
+
&::-webkit-meter-suboptimum-value,
|
|
697
|
+
&::-webkit-meter-even-less-good-value {
|
|
698
|
+
background: var(--meter-color);
|
|
699
|
+
border-radius: var(--meter-radius);
|
|
700
|
+
box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
|
|
701
|
+
min-width: var(--meter-height);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
&::-moz-meter-bar {
|
|
705
|
+
background: var(--meter-color);
|
|
706
|
+
border-radius: var(--meter-radius);
|
|
707
|
+
box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
|
|
708
|
+
min-width: var(--meter-height);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
669
712
|
fig-input-number .fig-steppers {
|
|
670
713
|
order: 3;
|
|
671
714
|
display: flex;
|
|
@@ -5068,7 +5111,7 @@ fig-field {
|
|
|
5068
5111
|
}
|
|
5069
5112
|
}
|
|
5070
5113
|
|
|
5071
|
-
& > progress {
|
|
5114
|
+
& > :is(progress, meter) {
|
|
5072
5115
|
align-self: center;
|
|
5073
5116
|
}
|
|
5074
5117
|
|