@rogieking/figui3 3.9.2 → 3.9.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/README.md +6 -2
- package/components.css +18 -1
- package/dist/fig.js +24 -24
- package/fig.js +50 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -721,10 +721,11 @@ When `min` and `max` are omitted, the input is unbounded — dragging continuous
|
|
|
721
721
|
| `value` | number | `0` | Angle value (in the unit specified by `units`) |
|
|
722
722
|
| `precision` | number | `1` | Decimal places for display |
|
|
723
723
|
| `text` | boolean | `false` | Show numeric text input alongside the dial |
|
|
724
|
+
| `dial` | boolean | `true` | Show circular dial control (`dial="false"` hides it) |
|
|
724
725
|
| `min` | number | — | Minimum angle (omit for unbounded) |
|
|
725
726
|
| `max` | number | — | Maximum angle (omit for unbounded) |
|
|
726
727
|
| `units` | string | `"°"` | Display unit: `"°"` (or `"deg"`), `"rad"`, `"turn"` |
|
|
727
|
-
| `
|
|
728
|
+
| `rotations` | boolean | `false` | Show a ×N rotation counter when angle exceeds 1 full rotation (`rotations` or `rotations="true"`) |
|
|
728
729
|
|
|
729
730
|
```html
|
|
730
731
|
<!-- Basic dial -->
|
|
@@ -746,7 +747,10 @@ When `min` and `max` are omitted, the input is unbounded — dragging continuous
|
|
|
746
747
|
<fig-input-angle text="true" units="turn" value="0.5"></fig-input-angle>
|
|
747
748
|
|
|
748
749
|
<!-- Show rotation count (×2 at 720°, ×3 at 1080°, etc.) -->
|
|
749
|
-
<fig-input-angle text="true"
|
|
750
|
+
<fig-input-angle text="true" rotations value="1080"></fig-input-angle>
|
|
751
|
+
|
|
752
|
+
<!-- Text-only mode (hide dial) -->
|
|
753
|
+
<fig-input-angle text="true" dial="false" value="90"></fig-input-angle>
|
|
750
754
|
```
|
|
751
755
|
|
|
752
756
|
---
|
package/components.css
CHANGED
|
@@ -3763,16 +3763,33 @@ fig-joystick {
|
|
|
3763
3763
|
fig-input-angle {
|
|
3764
3764
|
--size: 1.5rem;
|
|
3765
3765
|
display: inline-flex;
|
|
3766
|
+
align-items: center;
|
|
3766
3767
|
gap: var(--spacer-2);
|
|
3767
3768
|
user-select: none;
|
|
3768
3769
|
|
|
3770
|
+
> fig-input-number {
|
|
3771
|
+
flex: 0 0 auto;
|
|
3772
|
+
width: auto;
|
|
3773
|
+
}
|
|
3774
|
+
|
|
3775
|
+
&[full]:not([full="false"]) {
|
|
3776
|
+
display: flex;
|
|
3777
|
+
width: 100%;
|
|
3778
|
+
|
|
3779
|
+
> fig-input-number {
|
|
3780
|
+
flex: 1 1 auto;
|
|
3781
|
+
min-width: 0;
|
|
3782
|
+
width: auto;
|
|
3783
|
+
}
|
|
3784
|
+
}
|
|
3785
|
+
|
|
3769
3786
|
/* When inside horizontal fig-field, grow to fill and let inputs expand */
|
|
3770
3787
|
fig-field[direction="horizontal"] & {
|
|
3771
3788
|
flex: 1;
|
|
3772
3789
|
min-width: 0;
|
|
3773
3790
|
|
|
3774
3791
|
fig-input-number {
|
|
3775
|
-
flex:
|
|
3792
|
+
flex: 0 0 auto;
|
|
3776
3793
|
width: auto;
|
|
3777
3794
|
}
|
|
3778
3795
|
}
|