@rogieking/figui3 9.1.4 → 9.1.5

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
@@ -446,7 +446,7 @@ The `value`, `min`, `max`, and `step` properties mirror their attributes. `aria-
446
446
 
447
447
  Instrument-style angle/rotation control with an interactive dial, text input, CSS angle units, 15-degree Shift snapping, and unbounded positive/negative winding by default. Degree units display as `°` in the number field. Accepts unit suffixes in text input (`90°`, `90deg`, `3.14rad`, `0.5turn`, `100grad`). Add `min` and/or `max` to clamp the value. Changing `units` preserves the physical angle and converts `value`, `default`, `min`, `max`, and `step` (for example, `90deg` becomes `0.250turn`). When the value differs from `default`, an inset reset button restores the default and emits `input` and `change`.
448
448
 
449
- The rotation arrow starts at zero and sweeps along the outer dial boundary to the current angle, clockwise for positive values and counterclockwise for negative values. The surface receives the shared focus outline when the dial or number input is focused or dragged. Dial Arrow keys move by `step`, with Shift+Arrow moving by 15°. The internal number input keeps its built-in Up/Down stepping, Shift×10 stepping, and Alt-drag scrubbing. `customElements.get("fig-angle").rotationIcon(angle, size)` returns a standalone SVG version for reuse elsewhere; `size` defaults to `48`.
449
+ The rotation arrow starts at `default` (or zero when omitted) and sweeps along the outer dial boundary to the current angle. Positive deltas run clockwise, negative deltas run counterclockwise, and complete turns remain visible. With `rotations`, the number field displays the remainder modulo one turn while a signed `×N` suffix preserves complete rotations. The surface receives the shared focus outline when the dial or number input is focused or dragged. Dial Arrow keys move by `step`, with Shift+Arrow moving by 15°. The internal number input keeps its built-in Up/Down stepping, Shift×10 stepping, and Alt-drag scrubbing. `customElements.get("fig-angle").rotationIcon(angle, size)` returns a standalone zero-origin SVG version for reuse elsewhere; `size` defaults to `48`.
450
450
 
451
451
  | Attribute | Type | Default | Description |
452
452
  |---|---|---|---|
@@ -458,7 +458,7 @@ The rotation arrow starts at zero and sweeps along the outer dial boundary to th
458
458
  | `max` | number | — | Maximum (omit for unbounded) |
459
459
  | `step` | number | unit-dependent | Keyboard and text-input step (`1` deg/°, `0.01` rad, `0.001` turn, `0.1` grad) |
460
460
  | `units` | string | `"deg"` | `"deg"` / `"°"`, `"rad"`, `"turn"`, `"grad"` |
461
- | `rotations` | boolean | `false` | Show rotation counter |
461
+ | `rotations` | boolean | `false` | Show a signed full-rotation counter and modulo the displayed angle |
462
462
 
463
463
  The `defaultValue` property returns the resolved numeric default in the active unit.
464
464
 
@@ -466,7 +466,9 @@ The `defaultValue` property returns the resolved numeric default in the active u
466
466
 
467
467
  ```html
468
468
  <fig-angle value="90"></fig-angle>
469
+ <fig-angle value="180" default="90"></fig-angle>
469
470
  <fig-angle units="rad" value="3.14159"></fig-angle>
471
+ <fig-angle units="turn" value="0.5" default="0.25"></fig-angle>
470
472
  <fig-angle units="grad" value="100"></fig-angle>
471
473
  <fig-angle rotations value="1080"></fig-angle>
472
474
  ```
package/components.css CHANGED
@@ -2134,7 +2134,11 @@ fig-angle {
2134
2134
  }
2135
2135
  }
2136
2136
 
2137
- .fig-angle-rotations {
2137
+ .fig-angle-input > .fig-angle-rotations {
2138
+ flex: 0 0 auto;
2139
+ width: max-content;
2140
+ min-width: max-content;
2141
+ white-space: nowrap;
2138
2142
  font-variant-numeric: tabular-nums;
2139
2143
  color: var(--figma-color-text-secondary);
2140
2144
  }