@rogieking/figui3 3.9.2 → 3.13.0
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 +36 -3
- package/components.css +618 -300
- package/dist/fig.js +137 -80
- package/fig.js +1824 -291
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -487,7 +487,7 @@ A comprehensive fill input supporting colors, gradients, images, and video.
|
|
|
487
487
|
<fig-input-fill value='{"type":"solid","color":"#FF5733","opacity":100}'></fig-input-fill>
|
|
488
488
|
|
|
489
489
|
<!-- Gradient -->
|
|
490
|
-
<fig-input-fill value='{"type":"gradient","gradient":{"type":"linear","angle":90,"stops":[{"position":0,"color":"#FF0000"},{"position":100,"color":"#0000FF"}]}}'></fig-input-fill>
|
|
490
|
+
<fig-input-fill value='{"type":"gradient","gradient":{"type":"linear","angle":90,"interpolationSpace":"oklab","stops":[{"position":0,"color":"#FF0000"},{"position":100,"color":"#0000FF"}]}}'></fig-input-fill>
|
|
491
491
|
|
|
492
492
|
<!-- Image -->
|
|
493
493
|
<fig-input-fill value='{"type":"image","image":{"url":"path/to/image.jpg","scaleMode":"fill"}}'></fig-input-fill>
|
|
@@ -495,6 +495,35 @@ A comprehensive fill input supporting colors, gradients, images, and video.
|
|
|
495
495
|
|
|
496
496
|
---
|
|
497
497
|
|
|
498
|
+
### Gradient Input (`<fig-input-gradient>`)
|
|
499
|
+
|
|
500
|
+
A gradient-only fill input that opens the `fig-fill-picker` locked to gradient mode.
|
|
501
|
+
|
|
502
|
+
| Attribute | Type | Default | Description |
|
|
503
|
+
|-----------|------|---------|-------------|
|
|
504
|
+
| `value` | string | — | JSON gradient fill data (`{ "type": "gradient", "gradient": ... }`) |
|
|
505
|
+
| `disabled` | boolean | `false` | Disable input |
|
|
506
|
+
| `experimental` | string | — | Optional picker feature flags (e.g. `"modern"`) |
|
|
507
|
+
| `picker-*` | string | — | Optional passthrough picker attributes (except `picker-anchor`) |
|
|
508
|
+
| `picker-anchor` | string | `"self"` | Anchor target selector or `"self"` |
|
|
509
|
+
|
|
510
|
+
```html
|
|
511
|
+
<fig-input-gradient
|
|
512
|
+
value='{"type":"gradient","gradient":{"type":"linear","angle":90,"interpolationSpace":"oklch","hueInterpolation":"shorter","stops":[{"position":0,"color":"#FF0000","opacity":100},{"position":100,"color":"#0000FF","opacity":100}]}}'
|
|
513
|
+
></fig-input-gradient>
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
Supported gradient interpolation spaces:
|
|
517
|
+
- `srgb`
|
|
518
|
+
- `srgb-linear`
|
|
519
|
+
- `display-p3`
|
|
520
|
+
- `oklab`
|
|
521
|
+
- `oklch` (supports `hueInterpolation`: `shorter`, `longer`, `increasing`, `decreasing`)
|
|
522
|
+
|
|
523
|
+
Note: stop colors are currently authored/stored as hex (sRGB-origin). `display-p3` interpolation syntax is supported, but fully wide-gamut editing requires P3 stop-color storage.
|
|
524
|
+
|
|
525
|
+
---
|
|
526
|
+
|
|
498
527
|
### Fill Picker (`<fig-fill-picker>`)
|
|
499
528
|
|
|
500
529
|
A comprehensive fill picker dialog supporting solid colors, gradients, images, video, and webcam.
|
|
@@ -721,10 +750,11 @@ When `min` and `max` are omitted, the input is unbounded — dragging continuous
|
|
|
721
750
|
| `value` | number | `0` | Angle value (in the unit specified by `units`) |
|
|
722
751
|
| `precision` | number | `1` | Decimal places for display |
|
|
723
752
|
| `text` | boolean | `false` | Show numeric text input alongside the dial |
|
|
753
|
+
| `dial` | boolean | `true` | Show circular dial control (`dial="false"` hides it) |
|
|
724
754
|
| `min` | number | — | Minimum angle (omit for unbounded) |
|
|
725
755
|
| `max` | number | — | Maximum angle (omit for unbounded) |
|
|
726
756
|
| `units` | string | `"°"` | Display unit: `"°"` (or `"deg"`), `"rad"`, `"turn"` |
|
|
727
|
-
| `
|
|
757
|
+
| `rotations` | boolean | `false` | Show a ×N rotation counter when angle exceeds 1 full rotation (`rotations` or `rotations="true"`) |
|
|
728
758
|
|
|
729
759
|
```html
|
|
730
760
|
<!-- Basic dial -->
|
|
@@ -746,7 +776,10 @@ When `min` and `max` are omitted, the input is unbounded — dragging continuous
|
|
|
746
776
|
<fig-input-angle text="true" units="turn" value="0.5"></fig-input-angle>
|
|
747
777
|
|
|
748
778
|
<!-- Show rotation count (×2 at 720°, ×3 at 1080°, etc.) -->
|
|
749
|
-
<fig-input-angle text="true"
|
|
779
|
+
<fig-input-angle text="true" rotations value="1080"></fig-input-angle>
|
|
780
|
+
|
|
781
|
+
<!-- Text-only mode (hide dial) -->
|
|
782
|
+
<fig-input-angle text="true" dial="false" value="90"></fig-input-angle>
|
|
750
783
|
```
|
|
751
784
|
|
|
752
785
|
---
|