@rogieking/figui3 8.9.19 → 8.9.20
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-lab/SKILL.md +4 -3
- package/.cursor/skills/propkit/SKILL.md +1 -1
- package/README.md +26 -4
- package/components.css +21 -10
- package/dist/components.css +1 -1
- package/dist/fig-editor.js +3 -3
- package/dist/fig-lab.css +1 -1
- package/dist/fig-lab.js +2 -2
- package/dist/fig.css +1 -1
- package/dist/fig.js +4 -4
- package/fig-editor.js +123 -5
- package/fig-lab.css +23 -6
- package/fig-lab.js +494 -2
- package/fig.js +27 -7
- package/package.json +1 -1
|
@@ -49,8 +49,9 @@ Shared:
|
|
|
49
49
|
| Tag | Playground | Inner control | Notes |
|
|
50
50
|
|---|---|---|---|
|
|
51
51
|
| `propskit-switch` | `#propskit-switch` | `fig-switch` | `checked`, `default` boolean |
|
|
52
|
-
| `propskit-color` | `#propskit-color` | `fig-fill-picker` + `fig-swatch` | Solid swatch, same size as gradient.
|
|
53
|
-
| `propskit-
|
|
52
|
+
| `propskit-color` | `#propskit-color` | `fig-fill-picker` + `fig-swatch` | Solid swatch, same size as gradient. Clicking the field opens the picker. Focus ring on the field, not the swatch. `alpha` default true |
|
|
53
|
+
| `propskit-fill` | `#propskit-fill` | `fig-fill-picker` + `fig-swatch` | Same chrome as color. Clicking the field opens the picker. Focus ring on the field, not the swatch. Full fill JSON (`solid` / `gradient` / `image` / `video` / `webcam` / custom). Forwards `mode-*` slots |
|
|
54
|
+
| `propskit-gradient` | `#propskit-gradient` | `fig-input-gradient` | Default `edit="picker"`. Clicking the field opens the picker. Focus ring on the field, not the gradient. `mode="handle\|tip"` for inline edit |
|
|
54
55
|
| `propskit-select` | `#propskit-select` | `fig-select` | `options` or slotted `fig-select-options` |
|
|
55
56
|
| `propskit-text` | `#propskit-text` | `fig-input-text` | `type`, `readonly` |
|
|
56
57
|
| `propskit-number` | `#propskit-number` | `fig-input-number` | `min`, `max`, `step`, `precision`, `units`, `steppers` |
|
|
@@ -142,7 +143,7 @@ These are layout shells. Wire behavior yourself.
|
|
|
142
143
|
| Labeled exact number | `propskit-number` |
|
|
143
144
|
| Labeled text | `propskit-text` |
|
|
144
145
|
| Labeled discrete list | `propskit-select` (not `fig-dropdown`) |
|
|
145
|
-
| Labeled color / gradient | `propskit-color` / `propskit-gradient` |
|
|
146
|
+
| Labeled color / fill / gradient | `propskit-color` / `propskit-fill` / `propskit-gradient` |
|
|
146
147
|
| X/Y | `propskit-position` |
|
|
147
148
|
| Spatial on a canvas | `fig-canvas-control` |
|
|
148
149
|
| Angle | `fig-input-angle` |
|
|
@@ -69,7 +69,7 @@ On `fig-*` and `<dialog is="fig-...">`, use `class` not `className`.
|
|
|
69
69
|
| Larger / rich list | `fig-select` (editor) | `propskit-select` |
|
|
70
70
|
| Native select only | `fig-dropdown` | — |
|
|
71
71
|
| Color | `fig-input-color` `text="true"` | `propskit-color` (fill-picker swatch) |
|
|
72
|
-
| Fill | `fig-input-fill` |
|
|
72
|
+
| Fill | `fig-input-fill` | `propskit-fill` (fill-picker swatch) |
|
|
73
73
|
| Gradient | `fig-input-gradient` | `propskit-gradient` |
|
|
74
74
|
| Image | `fig-image` `upload` | — |
|
|
75
75
|
| Easing | `fig-easing-curve` | — |
|
package/README.md
CHANGED
|
@@ -105,6 +105,7 @@ Minimal example:
|
|
|
105
105
|
| [Slider](#slider) | `<fig-slider>` | Range, hue, opacity, delta, stepper |
|
|
106
106
|
| [Propskit Slider](#propskit-slider) | `<propskit-slider>` | Labeled field + slider combo |
|
|
107
107
|
| [Propskit Color](#propskit-color) | `<propskit-color>` | Full-surface labeled color control |
|
|
108
|
+
| [Propskit Fill](#propskit-fill) | `<propskit-fill>` | Full-surface labeled fill control |
|
|
108
109
|
| [Propskit Gradient](#propskit-gradient) | `<propskit-gradient>` | Full-surface labeled gradient control |
|
|
109
110
|
| [Propskit Number](#propskit-number) | `<propskit-number>` | Full-surface labeled number control |
|
|
110
111
|
| [Propskit Position](#propskit-position) | `<propskit-position>` | Compact X/Y control |
|
|
@@ -392,7 +393,7 @@ Right-click and choose **Reset**, or call `resetToDefault()`, to restore `defaul
|
|
|
392
393
|
|
|
393
394
|
`<propskit-color>`
|
|
394
395
|
|
|
395
|
-
Composes a `<fig-field>` and a solid `fig-fill-picker` swatch into a full-surface property control. Clicking the
|
|
396
|
+
Composes a `<fig-field>` and a solid `fig-fill-picker` swatch into a full-surface property control. Clicking the field opens the color picker. There is no hex/opacity text field.
|
|
396
397
|
|
|
397
398
|
**Attributes:** `label`, `value`, `default`, `alpha`, `disabled`, `size`
|
|
398
399
|
|
|
@@ -401,7 +402,28 @@ Composes a `<fig-field>` and a solid `fig-fill-picker` swatch into a full-surfac
|
|
|
401
402
|
Right-click and choose **Reset**, or call `resetToDefault()`, to restore `default` or the initial color.
|
|
402
403
|
|
|
403
404
|
```html
|
|
404
|
-
<propskit-color label="
|
|
405
|
+
<propskit-color label="Background" value="#0D99FF" alpha="true"></propskit-color>
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
#### Propskit Fill
|
|
411
|
+
|
|
412
|
+
`<propskit-fill>`
|
|
413
|
+
|
|
414
|
+
Composes a `<fig-field>` and a `fig-fill-picker` swatch into a full-surface property control, same chrome as `propskit-color`. Clicking the field opens the fill picker for solid, gradient, image, video, webcam, and custom modes. There is no hex/opacity text field.
|
|
415
|
+
|
|
416
|
+
**Attributes:** `label`, `value` (fill JSON), `default`, `mode`, `alpha`, `webcam-mode`, `default-video`, `disabled`, `size`
|
|
417
|
+
|
|
418
|
+
**Events:** `input`, `change` — fill object in `event.detail` (`{ type, ... }`).
|
|
419
|
+
|
|
420
|
+
Right-click and choose **Reset**, or call `resetToDefault()`, to restore `default` or the initial fill. Slot `mode-*` children onto the host to add custom picker tabs.
|
|
421
|
+
|
|
422
|
+
```html
|
|
423
|
+
<propskit-fill
|
|
424
|
+
label="Fill"
|
|
425
|
+
value='{"type":"solid","color":"#0D99FF","alpha":1}'
|
|
426
|
+
></propskit-fill>
|
|
405
427
|
```
|
|
406
428
|
|
|
407
429
|
---
|
|
@@ -410,7 +432,7 @@ Right-click and choose **Reset**, or call `resetToDefault()`, to restore `defaul
|
|
|
410
432
|
|
|
411
433
|
`<propskit-gradient>`
|
|
412
434
|
|
|
413
|
-
Composes a `<fig-field>` and `<fig-input-gradient>` into a full-surface property control. Defaults to `edit="picker"` — click the
|
|
435
|
+
Composes a `<fig-field>` and `<fig-input-gradient>` into a full-surface property control. Defaults to `edit="picker"` — click the field to open the fill picker.
|
|
414
436
|
|
|
415
437
|
| Attribute | Type | Default | Description |
|
|
416
438
|
|---|---|---|---|
|
|
@@ -426,7 +448,7 @@ Composes a `<fig-field>` and `<fig-input-gradient>` into a full-surface property
|
|
|
426
448
|
|
|
427
449
|
**Methods and state:** `defaultValue`, `isDefault`, and `resetToDefault()`. JSON defaults use structural equality, so object key order does not affect dirty state.
|
|
428
450
|
|
|
429
|
-
Click the
|
|
451
|
+
Click the field to open the fill picker. With `edit="true"`, the first stop receives focus; Arrow keys move the selected stop, Shift+Arrow moves by 5%, Tab cycles stops, and Delete/Backspace removes a stop while preserving the two-stop minimum.
|
|
430
452
|
|
|
431
453
|
```html
|
|
432
454
|
<propskit-gradient
|
package/components.css
CHANGED
|
@@ -3849,16 +3849,6 @@ fig-input-fill {
|
|
|
3849
3849
|
background-color: var(--figma-color-bg-secondary);
|
|
3850
3850
|
border-radius: var(--radius-medium);
|
|
3851
3851
|
box-shadow: none !important;
|
|
3852
|
-
&:focus,
|
|
3853
|
-
&:focus-within,
|
|
3854
|
-
&.has-popup-open {
|
|
3855
|
-
outline: var(--figma-focus-outline) !important;
|
|
3856
|
-
outline-offset: var(--figma-focus-outline-offset) !important;
|
|
3857
|
-
}
|
|
3858
|
-
&:hover {
|
|
3859
|
-
outline: 1px solid var(--figma-color-border);
|
|
3860
|
-
outline-offset: -1px !important;
|
|
3861
|
-
}
|
|
3862
3852
|
|
|
3863
3853
|
& > .input-combo > :is(fig-swatch, fig-chit):not(:only-child),
|
|
3864
3854
|
& > .input-combo > :is(fig-swatch, fig-chit):not(:only-child) input,
|
|
@@ -3927,6 +3917,20 @@ fig-input-fill {
|
|
|
3927
3917
|
}
|
|
3928
3918
|
}
|
|
3929
3919
|
|
|
3920
|
+
fig-input-color,
|
|
3921
|
+
fig-input-gradient {
|
|
3922
|
+
&:focus,
|
|
3923
|
+
&:focus-within,
|
|
3924
|
+
&.has-popup-open {
|
|
3925
|
+
outline: var(--figma-focus-outline) !important;
|
|
3926
|
+
outline-offset: var(--figma-focus-outline-offset) !important;
|
|
3927
|
+
}
|
|
3928
|
+
&:hover {
|
|
3929
|
+
outline: 1px solid var(--figma-color-border);
|
|
3930
|
+
outline-offset: -1px !important;
|
|
3931
|
+
}
|
|
3932
|
+
}
|
|
3933
|
+
|
|
3930
3934
|
fig-input-color,
|
|
3931
3935
|
fig-input-fill,
|
|
3932
3936
|
fig-input-text,
|
|
@@ -3935,6 +3939,13 @@ fig-input-number {
|
|
|
3935
3939
|
}
|
|
3936
3940
|
|
|
3937
3941
|
fig-input-fill {
|
|
3942
|
+
outline: none !important;
|
|
3943
|
+
|
|
3944
|
+
&:is(:hover, :focus, :focus-visible, :focus-within),
|
|
3945
|
+
&.has-popup-open {
|
|
3946
|
+
outline: none !important;
|
|
3947
|
+
}
|
|
3948
|
+
|
|
3938
3949
|
& > [slot^="mode-"] {
|
|
3939
3950
|
display: none;
|
|
3940
3951
|
}
|