@rogieking/figui3 9.0.2 → 9.0.3
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 +2 -2
- package/.cursor/skills/fig-editor/reference.md +2 -1
- package/.cursor/skills/figui3/components.md +2 -2
- package/.cursor/skills/figui3/reference.md +1 -1
- package/README.md +4 -2
- package/components.css +5 -1
- 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 +1 -1
- package/fig-editor.css +4 -0
- package/fig-editor.js +14 -0
- package/fig.js +2 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ Install `fig-editor.css` + `fig-editor.js` (pulls in `fig.js` and `fig-lab.js`).
|
|
|
9
9
|
Figma-style listbox. Prefer this over core `fig-dropdown`.
|
|
10
10
|
|
|
11
11
|
```tsx
|
|
12
|
-
<fig-select value={align} label="Align" full onChange={onChange}>
|
|
12
|
+
<fig-select value={align} label="Align" size="large" full onChange={onChange}>
|
|
13
13
|
<fig-select-options>
|
|
14
14
|
<fig-select-option value="left">Left</fig-select-option>
|
|
15
15
|
<fig-select-option value="center">Center</fig-select-option>
|
|
@@ -29,7 +29,7 @@ Data-driven (no authored options):
|
|
|
29
29
|
/>
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
- Attrs: `value`, `label`, `options` (comma / newline / JSON), `variant` (`ghost`), `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`
|
|
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
33
|
- Events: `input` / `change` on commit; `optionhover` with the option value in `detail` (does not change selection). Use a native listener for `optionhover`.
|
|
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"`.
|
|
@@ -21,9 +21,10 @@ Observed: `value`, `disabled`, `selected`, `label`.
|
|
|
21
21
|
|
|
22
22
|
## `fig-select` observed
|
|
23
23
|
|
|
24
|
-
`value`, `disabled`, `label`, `options`, `position`, `offset`, `closedby`, `open`, `variant`
|
|
24
|
+
`value`, `disabled`, `label`, `options`, `position`, `offset`, `closedby`, `open`, `variant`, `size`
|
|
25
25
|
|
|
26
26
|
- `subtle` applies the secondary hover/focus fill to every option
|
|
27
|
+
- `size="large"` sets a 32px trigger
|
|
27
28
|
|
|
28
29
|
Position enum:
|
|
29
30
|
|
|
@@ -31,13 +31,13 @@ Handlers below assume `onInput` / `onChange` / `onClick` from [react.md](react.m
|
|
|
31
31
|
### `fig-dropdown`
|
|
32
32
|
|
|
33
33
|
```tsx
|
|
34
|
-
<fig-dropdown value={value} variant="ghost" full onChange={onChange}>
|
|
34
|
+
<fig-dropdown value={value} variant="ghost" size="large" full onChange={onChange}>
|
|
35
35
|
<option value="left">Left</option>
|
|
36
36
|
<option value="center">Center</option>
|
|
37
37
|
</fig-dropdown>
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
- Attrs: `value`, `type` (`select` | `dropdown`), `variant` (`ghost`), `full`, `disabled`
|
|
40
|
+
- Attrs: `value`, `type` (`select` | `dropdown`), `variant` (`ghost`), `size` (`large`), `full`, `disabled`
|
|
41
41
|
- Events: `input` / `change` → `currentTarget.value`
|
|
42
42
|
- Prefer `fig-select` (editor) for Figma-style menus.
|
|
43
43
|
|
|
@@ -25,7 +25,7 @@ Public API: `README.md`. React recipes: [components.md](components.md).
|
|
|
25
25
|
|
|
26
26
|
## `fig-dropdown`
|
|
27
27
|
|
|
28
|
-
- `value`, `type="select|dropdown"`, `variant="ghost"`, `full`, `disabled`
|
|
28
|
+
- `value`, `type="select|dropdown"`, `variant="ghost"`, `size="large"` (32px), `full`, `disabled`
|
|
29
29
|
- Children: native `<option>` / `<optgroup>`
|
|
30
30
|
|
|
31
31
|
## `fig-slider`
|
package/README.md
CHANGED
|
@@ -190,10 +190,11 @@ Minimal example:
|
|
|
190
190
|
| `type` | string | `"select"` | `"select"` or `"dropdown"` |
|
|
191
191
|
| `label` | string | — | Accessible label for the generated native `<select>` |
|
|
192
192
|
| `variant` | string | — | `"ghost"` for a borderless control with secondary hover fill |
|
|
193
|
+
| `size` | string | — | `"large"` for a 32px-tall control |
|
|
193
194
|
| `disabled` | boolean | `false` | Disabled state |
|
|
194
195
|
|
|
195
196
|
```html
|
|
196
|
-
<fig-dropdown value="2">
|
|
197
|
+
<fig-dropdown value="2" size="large">
|
|
197
198
|
<option value="1">Option 1</option>
|
|
198
199
|
<option value="2">Option 2</option>
|
|
199
200
|
</fig-dropdown>
|
|
@@ -215,6 +216,7 @@ Custom listbox select with overflow chevrons, grouped options, and sticky separa
|
|
|
215
216
|
| `label` | string | — | Closed-state / accessible label |
|
|
216
217
|
| `options` | string | — | Comma, newline, or JSON options if no authored `fig-select-option` children |
|
|
217
218
|
| `variant` | string | — | `"ghost"` for a borderless control with secondary hover fill |
|
|
219
|
+
| `size` | string | — | `"large"` for a 32px-tall trigger |
|
|
218
220
|
| `subtle` | boolean | `false` | Use the secondary hover/focus fill for every option |
|
|
219
221
|
| `full` | boolean | `false` | Stretch to available width |
|
|
220
222
|
| `position` | string | `"bottom left"` | Popup position |
|
|
@@ -223,7 +225,7 @@ Custom listbox select with overflow chevrons, grouped options, and sticky separa
|
|
|
223
225
|
Author options in `<fig-select-options>`, or pass `options`. Add `subtle` to one `<fig-select-option>` for the secondary hover/focus fill, or to `<fig-select>` to apply it to every option. Use `label` on `<fig-select-option>` when the option content is rich. `fig-separator` with `sticky` pins group labels while scrolling.
|
|
224
226
|
|
|
225
227
|
```html
|
|
226
|
-
<fig-select value="center" label="Align">
|
|
228
|
+
<fig-select value="center" label="Align" size="large">
|
|
227
229
|
<fig-select-options>
|
|
228
230
|
<fig-select-option value="left">Left</fig-select-option>
|
|
229
231
|
<fig-select-option value="center">Center</fig-select-option>
|
package/components.css
CHANGED
|
@@ -686,7 +686,7 @@ input[type="text"][list] {
|
|
|
686
686
|
|
|
687
687
|
|
|
688
688
|
&:not([multiple]) {
|
|
689
|
-
height: var(--spacer-4);
|
|
689
|
+
height: var(--fig-dropdown-height, var(--spacer-4));
|
|
690
690
|
padding: 0 var(--spacer-4) 0 var(--spacer-2);
|
|
691
691
|
background: calc(100% - var(--spacer-1)) 50% / 1rem no-repeat
|
|
692
692
|
var(--icon-16-chevron);
|
|
@@ -3458,6 +3458,10 @@ fig-input-palette {
|
|
|
3458
3458
|
}
|
|
3459
3459
|
|
|
3460
3460
|
fig-dropdown {
|
|
3461
|
+
&[size="large"] {
|
|
3462
|
+
--fig-dropdown-height: var(--spacer-5);
|
|
3463
|
+
}
|
|
3464
|
+
|
|
3461
3465
|
&[full]:not([full="false"]) {
|
|
3462
3466
|
display: flex;
|
|
3463
3467
|
width: 100%;
|