@rogieking/figui3 3.9.1 → 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 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
- | `show-rotations` | boolean | `false` | Show a ×N rotation counter when angle exceeds 1 full rotation |
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" show-rotations="true" value="1080"></fig-input-angle>
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
@@ -1243,7 +1243,6 @@ fig-chit {
1243
1243
 
1244
1244
  &[disabled] {
1245
1245
  pointer-events: none;
1246
- opacity: 0.5;
1247
1246
  }
1248
1247
 
1249
1248
  &::before {
@@ -3764,16 +3763,33 @@ fig-joystick {
3764
3763
  fig-input-angle {
3765
3764
  --size: 1.5rem;
3766
3765
  display: inline-flex;
3766
+ align-items: center;
3767
3767
  gap: var(--spacer-2);
3768
3768
  user-select: none;
3769
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
+
3770
3786
  /* When inside horizontal fig-field, grow to fill and let inputs expand */
3771
3787
  fig-field[direction="horizontal"] & {
3772
3788
  flex: 1;
3773
3789
  min-width: 0;
3774
3790
 
3775
3791
  fig-input-number {
3776
- flex: 1;
3792
+ flex: 0 0 auto;
3777
3793
  width: auto;
3778
3794
  }
3779
3795
  }
@@ -4498,21 +4514,31 @@ fig-chooser {
4498
4514
  }
4499
4515
 
4500
4516
  fig-choice {
4517
+ --fig-choice-selection-ring-width: 1px;
4518
+ --fig-choice-padding: var(--spacer-2);
4501
4519
  display: flex;
4502
4520
  align-items: center;
4503
4521
  flex-direction: column;
4504
4522
  border-radius: var(--radius-large);
4505
- padding: var(--spacer-2);
4506
4523
  gap: var(--spacer-2);
4507
4524
  outline: none;
4508
4525
  border: 1px solid transparent;
4526
+ cursor: default;
4527
+
4528
+ padding: var(--fig-choice-padding);
4509
4529
 
4510
4530
  &:hover:not([selected]):not([disabled]):not([aria-disabled="true"]) {
4511
4531
  background-color: var(--figma-color-bg-secondary);
4512
4532
  }
4513
4533
 
4514
4534
  &[selected] {
4515
- background-color: var(--figma-color-bg-selected);
4535
+ background-color: var(--figma-color-bg-secondary);
4536
+ & > fig-image {
4537
+ border-radius: var(--radius-medium);
4538
+ outline: var(--fig-choice-selection-ring-width) solid
4539
+ var(--figma-color-border-selected);
4540
+ outline-offset: 0;
4541
+ }
4516
4542
  }
4517
4543
 
4518
4544
  &[disabled]:not([disabled="false"]),