@rogieking/figui3 9.0.13 → 9.1.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/.cursor/skills/fig-lab/SKILL.md +2 -2
- package/.cursor/skills/fig-lab/components.md +0 -13
- package/.cursor/skills/fig-lab/reference.md +0 -6
- package/.cursor/skills/figui3/SKILL.md +1 -1
- package/.cursor/skills/figui3/components.md +20 -1
- package/.cursor/skills/figui3/react.md +1 -1
- package/.cursor/skills/figui3/reference.md +18 -0
- package/README.md +21 -11
- package/components.css +252 -39
- 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 +1 -1
- package/dist/fig.css +1 -1
- package/dist/fig.js +6 -6
- package/fig-editor.js +22 -5
- package/fig-lab.css +4 -71
- package/fig-lab.js +1 -671
- package/fig.js +811 -13
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fig-lab
|
|
3
3
|
description: >-
|
|
4
|
-
Guides FigUI3 experimental Lab components: fig-canvas-control,
|
|
4
|
+
Guides FigUI3 experimental Lab components: fig-canvas-control,
|
|
5
5
|
fig-input-wheel, fig-reorder, and AI composer components, including React JSX usage.
|
|
6
6
|
APIs are unstable.
|
|
7
7
|
user-invocable: false
|
|
@@ -22,4 +22,4 @@ import "@rogieking/figui3/fig-lab.css";
|
|
|
22
22
|
import "@rogieking/figui3/fig-lab.js";
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Use Lab for canvas handles,
|
|
25
|
+
Use Lab for canvas handles, wheel inputs, reorder behavior, and AI composition surfaces. Keep Lab out of `fig.js`.
|
|
@@ -26,19 +26,6 @@ Handlers below assume `onInput` / `onChange` from the React contract.
|
|
|
26
26
|
- Attrs: `type`, `value` (JSON string), `color`, `name`, `tooltips`, `disabled`, `drag-surface`, `snapping` (`false` | `modifier` | `true`), `precision` (positions, radius, angle, and internal handles; default `2`)
|
|
27
27
|
- React: JSON `value` as a string attr; do not remount during drag.
|
|
28
28
|
|
|
29
|
-
### `fig-input-angle`
|
|
30
|
-
|
|
31
|
-
```tsx
|
|
32
|
-
<fig-input-angle
|
|
33
|
-
value={String(deg)}
|
|
34
|
-
text="true"
|
|
35
|
-
units="°"
|
|
36
|
-
onInput={onInput}
|
|
37
|
-
/>
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
- Attrs: `value`, `precision`, `text`, `min`, `max`, `units`, `dial` (default true), `rotations`, `disabled`
|
|
41
|
-
|
|
42
29
|
### `fig-input-wheel`
|
|
43
30
|
|
|
44
31
|
```tsx
|
|
@@ -35,12 +35,6 @@ Parent must be `position: relative` (or similar) so the control can fill it. Wra
|
|
|
35
35
|
|
|
36
36
|
Types: `point`, `color`, `point-radius`, `point-radius-angle`, `point-point`.
|
|
37
37
|
|
|
38
|
-
## `fig-input-angle`
|
|
39
|
-
|
|
40
|
-
Observed include `value`, `precision`, `text`, `min`, `max`, `units`, `dial`, plus `rotations`.
|
|
41
|
-
|
|
42
|
-
`dial` defaults true. `text="true"` shows the numeric field.
|
|
43
|
-
|
|
44
38
|
## `fig-reorder`
|
|
45
39
|
|
|
46
40
|
Observed: `axis`, `handle`, `disabled`.
|
|
@@ -88,7 +88,7 @@ fig-menu change → detail { value }
|
|
|
88
88
|
fig-dialog/popup native dialog close plus FigUI3 positioning attrs
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
`fig-
|
|
91
|
+
`fig-angle` is core. `fig-input-wheel` remains **lab**.
|
|
92
92
|
|
|
93
93
|
## Maintainer workflow
|
|
94
94
|
|
|
@@ -86,7 +86,26 @@ Handlers below assume `onInput` / `onChange` / `onClick` from [react.md](react.m
|
|
|
86
86
|
/>
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
- Attrs: `min`, `max`, `step`, `precision`, `units`, `units-disallow`, `steppers`, `disabled`, `full`
|
|
89
|
+
- Attrs: `variant` (`ghost`), `min`, `max`, `step`, `precision`, `units`, `units-disallow`, `steppers`, `tabular`, `disabled`, `full`
|
|
90
|
+
|
|
91
|
+
### `fig-angle`
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
<fig-angle
|
|
95
|
+
value={String(angle)}
|
|
96
|
+
units="deg"
|
|
97
|
+
onInput={onInput}
|
|
98
|
+
onChange={onChange}
|
|
99
|
+
/>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
- Attrs: `value`, `default`, `precision` (defaults: deg/grad 0, rad 2, turn 3), `dial` (default true), optional `min`/`max`, `step` (defaults: deg/° 1, rad 0.01, turn 0.001, grad 0.1), `units` (`deg`, `°`, `rad`, `turn`, `grad`; degrees display as `°`), `rotations`, `disabled`, `full`
|
|
103
|
+
- Property: `defaultValue` returns the resolved default; values are unbounded unless `min`/`max` are authored.
|
|
104
|
+
- Changing `units` converts `value`, `default`, `min`, `max`, and `step` to preserve physical angles.
|
|
105
|
+
- The surface shows the shared focus outline for dial/input focus and dragging. Dial Arrow keys use `step`; Shift-drag and dial Shift+Arrow move in 15° increments. The internal number input retains built-in Up/Down, Shift×10, and Alt-drag scrubbing.
|
|
106
|
+
- An inset reset button appears when `value` differs from `default`; activating it emits `input` and `change`.
|
|
107
|
+
- Events: `input` while editing and `change` on commit, with `{ value, angle, units }`; event values are rounded to `precision` without reducing stored precision
|
|
108
|
+
- The arrow sweeps from zero to the signed angle directly over the outer dial boundary. `customElements.get("fig-angle").rotationIcon(angle, size)` returns a standalone SVG string (`size` defaults to 48).
|
|
90
109
|
|
|
91
110
|
### `fig-input-combo`
|
|
92
111
|
|
|
@@ -44,6 +44,7 @@ type FigAttrs = React.DetailedHTMLProps<
|
|
|
44
44
|
|
|
45
45
|
type FigTag =
|
|
46
46
|
| "fig-3d-rotate"
|
|
47
|
+
| "fig-angle"
|
|
47
48
|
| "fig-ai-context"
|
|
48
49
|
| "fig-ai-prompt"
|
|
49
50
|
| "fig-attachment"
|
|
@@ -71,7 +72,6 @@ type FigTag =
|
|
|
71
72
|
| "fig-header"
|
|
72
73
|
| "fig-icon"
|
|
73
74
|
| "fig-image"
|
|
74
|
-
| "fig-input-angle"
|
|
75
75
|
| "fig-input-color"
|
|
76
76
|
| "fig-input-combo"
|
|
77
77
|
| "fig-input-file"
|
|
@@ -23,6 +23,24 @@ Public API: `README.md`. React recipes: [components.md](components.md).
|
|
|
23
23
|
- `value`, `placeholder`, `multiline`, `autoresize`, `resizable`, `disabled`, `readonly`, `full`
|
|
24
24
|
- Adornments: `slot="prepend"` and `slot="append"`
|
|
25
25
|
|
|
26
|
+
## `fig-input-number`
|
|
27
|
+
|
|
28
|
+
- `size`: `""`, `large` (32px tall)
|
|
29
|
+
- `variant`: `""`, `ghost`
|
|
30
|
+
- `value`, `placeholder`, `min`, `max`, `step`, `precision`, `units`, `units-disallow`, `steppers`, `tabular`, `disabled`, `full`
|
|
31
|
+
- Adornments: `slot="prepend"` and `slot="append"`
|
|
32
|
+
|
|
33
|
+
## `fig-angle`
|
|
34
|
+
|
|
35
|
+
- `value`, `default`, `precision` (defaults: deg/grad `0`, rad `2`, turn `3`), `dial`, optional `min`/`max`, `step` (defaults: deg/° `1`, rad `0.01`, turn `0.001`, grad `0.1`), `rotations`, `disabled`, `full`
|
|
36
|
+
- `defaultValue`: resolved numeric default; values are otherwise unbounded
|
|
37
|
+
- `units`: `deg` (default; `°` alias), `rad`, `turn`, or `grad`. Degree units display as `°` in the number field.
|
|
38
|
+
- Changing `units` converts `value`, `default`, `min`, `max`, and `step`.
|
|
39
|
+
- Shared surface focus outline for dial/input focus and dragging; dial Arrow keys use `step`, Shift-drag/dial Shift+Arrow move by 15°, and the number input retains built-in Up/Down, Shift×10, and Alt-drag scrubbing
|
|
40
|
+
- An inset reset button appears when `value` differs from `default`
|
|
41
|
+
- Events: `input` while editing; `change` on commit; detail `{ value, angle, units }`, rounded to `precision` while stored values remain high precision
|
|
42
|
+
- Static `rotationIcon(angle, size)` returns the centered SVG arc/arrow swept from zero to the signed angle; `size` defaults to `48`.
|
|
43
|
+
|
|
26
44
|
## `fig-dropdown`
|
|
27
45
|
|
|
28
46
|
- `value`, `type="select|dropdown"`, `variant="ghost"`, `size="large"` (32px), `full`, `disabled`
|
package/README.md
CHANGED
|
@@ -105,7 +105,7 @@ Minimal example:
|
|
|
105
105
|
| [Input Wheel](#input-wheel) | `<fig-input-wheel>` | Standalone SVG tick-and-handle numeric scrubber |
|
|
106
106
|
| [Text Input](#text-input) | `<fig-input-text>` | Styled text/textarea input |
|
|
107
107
|
| [Number Input](#number-input) | `<fig-input-number>` | Numeric input with units |
|
|
108
|
-
| [
|
|
108
|
+
| [Angle](#angle) | `<fig-angle>` | Instrument-style angle/rotation dial |
|
|
109
109
|
| [Swatch](#swatch) | `<fig-swatch>` | Color/gradient/image swatch |
|
|
110
110
|
| [Color Tip](#color-tip) | `<fig-color-tip>` | Compact color tip with picker |
|
|
111
111
|
| [Color Input](#color-input) | `<fig-input-color>` | Color picker with hex/alpha |
|
|
@@ -344,7 +344,7 @@ document.querySelector("fig-select").menuAnchor =
|
|
|
344
344
|
| `precision` | number | — | Decimal places for output |
|
|
345
345
|
| `disabled` | boolean | `false` | Disabled state |
|
|
346
346
|
|
|
347
|
-
**Events:** `input` (continuous), `change` (on release).
|
|
347
|
+
**Events:** `input` (continuous), `change` (on release), with detail `{ value, angle, units }`. Event values are rounded to `precision`; the component retains its higher-precision internal value.
|
|
348
348
|
|
|
349
349
|
```html
|
|
350
350
|
<fig-slider min="0" max="100" value="50" units="%"></fig-slider>
|
|
@@ -417,6 +417,7 @@ The `value`, `min`, `max`, and `step` properties mirror their attributes. `aria-
|
|
|
417
417
|
| `value` | string | — | Numeric value |
|
|
418
418
|
| `placeholder` | string | — | Placeholder text |
|
|
419
419
|
| `size` | string | — | Set to `"large"` for a 32px-tall input |
|
|
420
|
+
| `variant` | string | — | Set to `"ghost"` for a borderless control |
|
|
420
421
|
| `min` | number | — | Minimum |
|
|
421
422
|
| `max` | number | — | Maximum |
|
|
422
423
|
| `step` | number | — | Step increment |
|
|
@@ -426,39 +427,48 @@ The `value`, `min`, `max`, and `step` properties mirror their attributes. `aria-
|
|
|
426
427
|
| `transform` | number | — | Display multiplier |
|
|
427
428
|
| `precision` | number | — | Fixed displayed decimal places; omitted values use up to two places |
|
|
428
429
|
| `steppers` | boolean | `false` | Show spin buttons |
|
|
430
|
+
| `tabular` | boolean | `false` | Tabular numerals (`font-variant-numeric: tabular-nums`) |
|
|
429
431
|
| `disabled` | boolean | `false` | Disabled state |
|
|
430
432
|
|
|
431
433
|
```html
|
|
432
434
|
<fig-input-number value="100" units="px"></fig-input-number>
|
|
433
435
|
<fig-input-number size="large" value="100" units="px"></fig-input-number>
|
|
436
|
+
<fig-input-number variant="ghost" value="100" units="px"></fig-input-number>
|
|
437
|
+
<fig-input-number tabular value="100" units="px"></fig-input-number>
|
|
434
438
|
<fig-input-number value="50" units="%" min="0" max="100"></fig-input-number>
|
|
435
439
|
```
|
|
436
440
|
|
|
437
441
|
---
|
|
438
442
|
|
|
439
|
-
####
|
|
443
|
+
#### Angle
|
|
444
|
+
|
|
445
|
+
`<fig-angle>` — [demo](https://rog.ie/figui3/#angle)
|
|
440
446
|
|
|
441
|
-
|
|
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`.
|
|
442
448
|
|
|
443
|
-
|
|
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`.
|
|
444
450
|
|
|
445
451
|
| Attribute | Type | Default | Description |
|
|
446
452
|
|---|---|---|---|
|
|
447
453
|
| `value` | number | `0` | Angle value |
|
|
448
|
-
| `
|
|
449
|
-
| `
|
|
454
|
+
| `default` | number | `0` | Default/reset value, clamped to bounds |
|
|
455
|
+
| `precision` | number | unit-dependent | Decimal places (`0` deg/grad, `2` rad, `3` turn) |
|
|
450
456
|
| `dial` | boolean | `true` | Show circular dial |
|
|
451
457
|
| `min` | number | — | Minimum (omit for unbounded) |
|
|
452
458
|
| `max` | number | — | Maximum (omit for unbounded) |
|
|
453
|
-
| `
|
|
459
|
+
| `step` | number | unit-dependent | Keyboard and text-input step (`1` deg/°, `0.01` rad, `0.001` turn, `0.1` grad) |
|
|
460
|
+
| `units` | string | `"deg"` | `"deg"` / `"°"`, `"rad"`, `"turn"`, `"grad"` |
|
|
454
461
|
| `rotations` | boolean | `false` | Show rotation counter |
|
|
455
462
|
|
|
463
|
+
The `defaultValue` property returns the resolved numeric default in the active unit.
|
|
464
|
+
|
|
456
465
|
**Events:** `input` (continuous), `change` (on release).
|
|
457
466
|
|
|
458
467
|
```html
|
|
459
|
-
<fig-
|
|
460
|
-
<fig-
|
|
461
|
-
<fig-
|
|
468
|
+
<fig-angle value="90"></fig-angle>
|
|
469
|
+
<fig-angle units="rad" value="3.14159"></fig-angle>
|
|
470
|
+
<fig-angle units="grad" value="100"></fig-angle>
|
|
471
|
+
<fig-angle rotations value="1080"></fig-angle>
|
|
462
472
|
```
|
|
463
473
|
|
|
464
474
|
---
|
package/components.css
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
--figma-color-bg-brand-tertiary: light-dark(#e5f4ff, #394360);
|
|
15
15
|
--figma-color-bg-component: light-dark(#9747ff, #8a38f5);
|
|
16
16
|
--figma-color-bg-component-hover: light-dark(#8638e5, #7a2ed6);
|
|
17
|
-
--figma-color-bg-component-pressed: light-dark(#
|
|
17
|
+
--figma-color-bg-component-pressed: light-dark(#7c2bda, #652ca8);
|
|
18
18
|
--figma-color-bg-component-secondary: light-dark(#7c2bda, #652ca8);
|
|
19
19
|
--figma-color-bg-component-tertiary: light-dark(#f1e5ff, #473956);
|
|
20
20
|
--figma-color-bg-danger: light-dark(#f24822, #e03e1a);
|
|
@@ -27,26 +27,26 @@
|
|
|
27
27
|
--figma-color-bg-hover: light-dark(#f5f5f5, #383838);
|
|
28
28
|
--figma-color-bg-active: var(--figma-color-bg-pressed);
|
|
29
29
|
--figma-color-bg-inverse: light-dark(#2c2c2c, #ffffff);
|
|
30
|
-
--figma-color-bg-onselected: light-dark(#bde3ff, #
|
|
31
|
-
--figma-color-bg-onselected-hover: light-dark(#bde3ff, #
|
|
32
|
-
--figma-color-bg-onselected-pressed: light-dark(#bde3ff, #
|
|
30
|
+
--figma-color-bg-onselected: light-dark(#bde3ff, #4a5878);
|
|
31
|
+
--figma-color-bg-onselected-hover: light-dark(#bde3ff, #4a5878);
|
|
32
|
+
--figma-color-bg-onselected-pressed: light-dark(#bde3ff, #4a5878);
|
|
33
33
|
--figma-color-bg-pressed: light-dark(#f5f5f5, #383838);
|
|
34
34
|
--figma-color-bg-secondary: light-dark(#f5f5f5, #383838);
|
|
35
|
-
--figma-color-bg-selected: light-dark(#e5f4ff, #
|
|
36
|
-
--figma-color-bg-selected-hover: light-dark(#bde3ff, #
|
|
37
|
-
--figma-color-bg-selected-pressed: light-dark(#
|
|
38
|
-
--figma-color-bg-selected-secondary: light-dark(#f2f9ff, #
|
|
35
|
+
--figma-color-bg-selected: light-dark(#e5f4ff, #394360);
|
|
36
|
+
--figma-color-bg-selected-hover: light-dark(#bde3ff, #4a5878);
|
|
37
|
+
--figma-color-bg-selected-pressed: light-dark(#80caff, #394360);
|
|
38
|
+
--figma-color-bg-selected-secondary: light-dark(#f2f9ff, #32394d);
|
|
39
39
|
--figma-color-bg-selected-strong: light-dark(#0d99ff, #0c8ce9);
|
|
40
|
-
--figma-color-bg-selected-tertiary: light-dark(#f2f9ff, #
|
|
40
|
+
--figma-color-bg-selected-tertiary: light-dark(#f2f9ff, #32394d);
|
|
41
41
|
--figma-color-bg-success: light-dark(#14ae5c, #198f51);
|
|
42
42
|
--figma-color-bg-success-hover: light-dark(#009951, #078348);
|
|
43
|
-
--figma-color-bg-success-pressed: light-dark(#
|
|
43
|
+
--figma-color-bg-success-pressed: light-dark(#008043, #0a5c35);
|
|
44
44
|
--figma-color-bg-success-secondary: light-dark(#008043, #0a5c35);
|
|
45
|
-
--figma-color-bg-success-tertiary: light-dark(#
|
|
45
|
+
--figma-color-bg-success-tertiary: light-dark(#e0f6e5, #2f483c);
|
|
46
46
|
--figma-color-bg-tertiary: light-dark(#e6e6e6, #444444);
|
|
47
47
|
--figma-color-bg-warning: light-dark(#ffcd29, #f3c11b);
|
|
48
48
|
--figma-color-bg-warning-hover: light-dark(#ffc21a, #f2b50d);
|
|
49
|
-
--figma-color-bg-warning-pressed: light-dark(#
|
|
49
|
+
--figma-color-bg-warning-pressed: light-dark(#fab815, #e4a711);
|
|
50
50
|
--figma-color-bg-warning-secondary: light-dark(#fab815, #e4a711);
|
|
51
51
|
--figma-color-bg-warning-tertiary: light-dark(#fff1c2, #5c4100);
|
|
52
52
|
--figma-color-bg-switch: light-dark(#e6e6e6, #444444);
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
--figma-color-border: light-dark(#e6e6e6, #444444);
|
|
60
60
|
--figma-color-border-brand: light-dark(#bde3ff, #105cad);
|
|
61
61
|
--figma-color-border-brand-strong: light-dark(#007be5, #7cc4f8);
|
|
62
|
-
--figma-color-border-component: light-dark(#e4ccff, #
|
|
62
|
+
--figma-color-border-component: light-dark(#e4ccff, #604d75);
|
|
63
63
|
--figma-color-border-component-hover: light-dark(#9747ff, #8a38f5);
|
|
64
64
|
--figma-color-border-component-strong: light-dark(#8638e5, #d6b6fb);
|
|
65
65
|
--figma-color-border-danger: light-dark(#ffc7c2, #963323);
|
|
@@ -82,9 +82,9 @@
|
|
|
82
82
|
--figma-color-border-selected: light-dark(#0d99ff, #0c8ce9);
|
|
83
83
|
--figma-color-border-selected-strong: light-dark(#007be5, #7cc4f8);
|
|
84
84
|
--figma-color-border-strong: light-dark(#2c2c2c, #ffffffe5);
|
|
85
|
-
--figma-color-border-success: light-dark(#
|
|
86
|
-
--figma-color-border-success-strong: light-dark(#009951, #
|
|
87
|
-
--figma-color-border-warning: light-dark(#
|
|
85
|
+
--figma-color-border-success: light-dark(#b9ebc6, #517361);
|
|
86
|
+
--figma-color-border-success-strong: light-dark(#009951, #7cd797);
|
|
87
|
+
--figma-color-border-warning: light-dark(#f5dfa8, #7a5800);
|
|
88
88
|
--figma-color-border-warning-strong: light-dark(#b86200, #f7d15f);
|
|
89
89
|
--figma-color-border-slot: light-dark(#ff24bd, #f316b0);
|
|
90
90
|
|
|
@@ -101,8 +101,8 @@
|
|
|
101
101
|
--figma-color-icon-brand-tertiary: light-dark(#bde3ff, #394360);
|
|
102
102
|
--figma-color-icon-component: light-dark(#8638e5, #d1a8ff);
|
|
103
103
|
--figma-color-icon-component-pressed: light-dark(#7c2bda, #d6b6fb);
|
|
104
|
-
--figma-color-icon-component-secondary: light-dark(#
|
|
105
|
-
--figma-color-icon-component-tertiary: light-dark(#
|
|
104
|
+
--figma-color-icon-component-secondary: light-dark(#a38cc0, #7f699b);
|
|
105
|
+
--figma-color-icon-component-tertiary: light-dark(#c5b2dc, #7f699b);
|
|
106
106
|
--figma-color-icon-danger: light-dark(#f24822, #e03e1a);
|
|
107
107
|
--figma-color-icon-danger-hover: light-dark(#bd2915, #fbbcb6);
|
|
108
108
|
--figma-color-icon-danger-pressed: light-dark(#bd2915, #fbbcb6);
|
|
@@ -133,21 +133,21 @@
|
|
|
133
133
|
--figma-color-icon-onwarning-secondary: #00000080;
|
|
134
134
|
--figma-color-icon-onwarning-tertiary: #0000004d;
|
|
135
135
|
--figma-color-icon-pressed: light-dark(#007be5, #0a6dc2);
|
|
136
|
-
--figma-color-icon-secondary: light-dark(#00000080, #
|
|
136
|
+
--figma-color-icon-secondary: light-dark(#00000080, #ffffffb2);
|
|
137
137
|
--figma-color-icon-secondary-hover: light-dark(#000000e5, #ffffff);
|
|
138
138
|
--figma-color-icon-selected: light-dark(#007be5, #7cc4f8);
|
|
139
|
-
--figma-color-icon-selected-secondary: light-dark(#
|
|
140
|
-
--figma-color-icon-selected-tertiary: light-dark(#
|
|
141
|
-
--figma-color-icon-success: light-dark(#
|
|
142
|
-
--figma-color-icon-success-pressed: light-dark(#008043, #
|
|
143
|
-
--figma-color-icon-success-secondary: light-dark(#
|
|
144
|
-
--figma-color-icon-success-tertiary: light-dark(#
|
|
145
|
-
--figma-color-icon-tertiary: light-dark(#
|
|
139
|
+
--figma-color-icon-selected-secondary: light-dark(#0d99ff, #0c8ce9);
|
|
140
|
+
--figma-color-icon-selected-tertiary: light-dark(#80caff, #0a6dc2);
|
|
141
|
+
--figma-color-icon-success: light-dark(#009951, #7cd797);
|
|
142
|
+
--figma-color-icon-success-pressed: light-dark(#008043, #a5e5b7);
|
|
143
|
+
--figma-color-icon-success-secondary: light-dark(#009951, #7cd797);
|
|
144
|
+
--figma-color-icon-success-tertiary: light-dark(#009951, #7cd797);
|
|
145
|
+
--figma-color-icon-tertiary: light-dark(#0000004d, #fff6);
|
|
146
146
|
--figma-color-icon-tertiary-hover: light-dark(#000000e5, #ffffff);
|
|
147
|
-
--figma-color-icon-warning: light-dark(#
|
|
147
|
+
--figma-color-icon-warning: light-dark(#b86200, #f7d15f);
|
|
148
148
|
--figma-color-icon-warning-pressed: light-dark(#b86200, #f7d15f);
|
|
149
|
-
--figma-color-icon-warning-secondary: light-dark(#
|
|
150
|
-
--figma-color-icon-warning-tertiary: light-dark(#
|
|
149
|
+
--figma-color-icon-warning-secondary: light-dark(#b86200, #f7d15f);
|
|
150
|
+
--figma-color-icon-warning-tertiary: light-dark(#b86200, #f7d15f);
|
|
151
151
|
|
|
152
152
|
/* Text Colors */
|
|
153
153
|
--figma-color-text: light-dark(#000000e5, #ffffff);
|
|
@@ -156,8 +156,8 @@
|
|
|
156
156
|
--figma-color-text-brand-tertiary: light-dark(#007be5, #7cc4f8);
|
|
157
157
|
--figma-color-text-component: light-dark(#8638e5, #d1a8ff);
|
|
158
158
|
--figma-color-text-component-pressed: light-dark(#7c2bda, #d6b6fb);
|
|
159
|
-
--figma-color-text-component-secondary: light-dark(#
|
|
160
|
-
--figma-color-text-component-tertiary: light-dark(#
|
|
159
|
+
--figma-color-text-component-secondary: light-dark(#a38cc0, #a38cc0);
|
|
160
|
+
--figma-color-text-component-tertiary: light-dark(#c5b2dc, #7f699b);
|
|
161
161
|
--figma-color-text-danger: light-dark(#dc3412, #fca397);
|
|
162
162
|
--figma-color-text-danger-secondary: light-dark(#dc3412, #fca397);
|
|
163
163
|
--figma-color-text-danger-tertiary: light-dark(#dc3412, #fca397);
|
|
@@ -184,16 +184,16 @@
|
|
|
184
184
|
--figma-color-text-onwarning: #000000e5;
|
|
185
185
|
--figma-color-text-onwarning-secondary: #00000080;
|
|
186
186
|
--figma-color-text-onwarning-tertiary: #0000004d;
|
|
187
|
-
--figma-color-text-secondary: light-dark(#00000099, #
|
|
187
|
+
--figma-color-text-secondary: light-dark(#00000099, #ffffffb2);
|
|
188
188
|
--figma-color-text-secondary-hover: light-dark(#000000e5, #ffffff);
|
|
189
189
|
--figma-color-text-selection: rgba(13, 153, 255, 0.4);
|
|
190
190
|
--figma-color-text-selected: light-dark(#007be5, #7cc4f8);
|
|
191
191
|
--figma-color-text-selected-secondary: light-dark(#007be5, #7cc4f8);
|
|
192
192
|
--figma-color-text-selected-tertiary: light-dark(#007be5, #7cc4f8);
|
|
193
|
-
--figma-color-text-success: light-dark(#009951, #
|
|
194
|
-
--figma-color-text-success-secondary: light-dark(#009951, #
|
|
195
|
-
--figma-color-text-success-tertiary: light-dark(#009951, #
|
|
196
|
-
--figma-color-text-tertiary: light-dark(#
|
|
193
|
+
--figma-color-text-success: light-dark(#009951, #7cd797);
|
|
194
|
+
--figma-color-text-success-secondary: light-dark(#009951, #7cd797);
|
|
195
|
+
--figma-color-text-success-tertiary: light-dark(#009951, #7cd797);
|
|
196
|
+
--figma-color-text-tertiary: light-dark(#0000004d, #ffffff66);
|
|
197
197
|
--figma-color-text-tertiary-hover: light-dark(#000000e5, #ffffff);
|
|
198
198
|
--figma-color-text-warning: light-dark(#b86200, #f7d15f);
|
|
199
199
|
--figma-color-text-warning-secondary: light-dark(#b86200, #f7d15f);
|
|
@@ -221,12 +221,13 @@
|
|
|
221
221
|
--body-large-fontSize: var(--text-body-large-font-size);
|
|
222
222
|
--body-letter-spacing: 0.055px;
|
|
223
223
|
--body-medium-strong-fontWeight: 550;
|
|
224
|
-
--body-large-strong-fontWeight:
|
|
224
|
+
--body-large-strong-fontWeight: 550;
|
|
225
225
|
--body-medium-fontWeight: 450;
|
|
226
226
|
|
|
227
227
|
--line-height: 1rem;
|
|
228
228
|
|
|
229
229
|
/* Spacing */
|
|
230
|
+
--spacer-0: 0;
|
|
230
231
|
--spacer-1: 0.25rem;
|
|
231
232
|
--spacer-2: 0.5rem;
|
|
232
233
|
--spacer-2-5: 0.75rem;
|
|
@@ -242,11 +243,19 @@
|
|
|
242
243
|
--radius-medium: 0.3125rem;
|
|
243
244
|
--radius-medium-large: 0.5625rem;
|
|
244
245
|
--radius-large: 0.8125rem;
|
|
246
|
+
--radius-xlarge: 1.3125rem;
|
|
247
|
+
--radius-xxlarge: 1.8125rem;
|
|
248
|
+
--radius-xxxlarge: 2.3125rem;
|
|
249
|
+
--radius-full: 9999px;
|
|
245
250
|
--figma-radius-none: var(--radius-none);
|
|
246
251
|
--figma-radius-small: var(--radius-small);
|
|
247
252
|
--figma-radius-medium: var(--radius-medium);
|
|
248
253
|
--figma-radius-medium-large: var(--radius-medium-large);
|
|
249
254
|
--figma-radius-large: var(--radius-large);
|
|
255
|
+
--figma-radius-xlarge: var(--radius-xlarge);
|
|
256
|
+
--figma-radius-xxlarge: var(--radius-xxlarge);
|
|
257
|
+
--figma-radius-xxxlarge: var(--radius-xxxlarge);
|
|
258
|
+
--figma-radius-full: var(--radius-full);
|
|
250
259
|
|
|
251
260
|
/* Transitions */
|
|
252
261
|
--input-transition: all 0.08s ease-out;
|
|
@@ -281,8 +290,8 @@
|
|
|
281
290
|
rgba(255, 255, 255, 0.1)
|
|
282
291
|
);
|
|
283
292
|
--figma-color-bg-transparent-secondary: light-dark(
|
|
284
|
-
rgba(0, 0, 0, 0.
|
|
285
|
-
rgba(255, 255, 255, 0.
|
|
293
|
+
rgba(0, 0, 0, 0.1),
|
|
294
|
+
rgba(255, 255, 255, 0.1)
|
|
286
295
|
);
|
|
287
296
|
|
|
288
297
|
/* Gradients */
|
|
@@ -1998,6 +2007,185 @@ fig-easing-curve {
|
|
|
1998
2007
|
}
|
|
1999
2008
|
}
|
|
2000
2009
|
|
|
2010
|
+
/* Angle */
|
|
2011
|
+
fig-angle {
|
|
2012
|
+
--stroke-width: 1.5;
|
|
2013
|
+
--aspect-ratio: 1 / 1;
|
|
2014
|
+
display: flex;
|
|
2015
|
+
flex-direction: column;
|
|
2016
|
+
gap: var(--spacer-2);
|
|
2017
|
+
width: 100%;
|
|
2018
|
+
min-width: 0;
|
|
2019
|
+
user-select: none;
|
|
2020
|
+
|
|
2021
|
+
.fig-angle-surface {
|
|
2022
|
+
position: relative;
|
|
2023
|
+
box-sizing: border-box;
|
|
2024
|
+
width: 100%;
|
|
2025
|
+
aspect-ratio: var(--aspect-ratio);
|
|
2026
|
+
display: grid;
|
|
2027
|
+
place-items: center;
|
|
2028
|
+
padding: var(--spacer-3);
|
|
2029
|
+
border-radius: var(--radius-medium);
|
|
2030
|
+
background: var(--figma-color-bg-secondary);
|
|
2031
|
+
overflow: hidden;
|
|
2032
|
+
|
|
2033
|
+
&:has(.fig-angle-svg:focus, .fig-angle-input:focus-within),
|
|
2034
|
+
&.dragging {
|
|
2035
|
+
outline: var(--figma-focus-outline);
|
|
2036
|
+
outline-offset: var(--figma-focus-outline-offset);
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
&.dragging .fig-angle-svg {
|
|
2040
|
+
cursor: grabbing;
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
.fig-angle-svg {
|
|
2045
|
+
display: block;
|
|
2046
|
+
width: 100%;
|
|
2047
|
+
height: 100%;
|
|
2048
|
+
min-width: 0;
|
|
2049
|
+
min-height: 0;
|
|
2050
|
+
overflow: visible;
|
|
2051
|
+
cursor: grab;
|
|
2052
|
+
touch-action: none;
|
|
2053
|
+
pointer-events: auto;
|
|
2054
|
+
|
|
2055
|
+
&:focus {
|
|
2056
|
+
outline: 0;
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
.fig-angle-boundary,
|
|
2061
|
+
.fig-angle-tick,
|
|
2062
|
+
.fig-angle-indicator,
|
|
2063
|
+
.fig-angle-indicator-halo,
|
|
2064
|
+
.fig-angle-reference-path {
|
|
2065
|
+
vector-effect: non-scaling-stroke;
|
|
2066
|
+
stroke-linecap: round;
|
|
2067
|
+
stroke-linejoin: round;
|
|
2068
|
+
pointer-events: none;
|
|
2069
|
+
stroke-width: var(--stroke-width);
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
.fig-angle-boundary {
|
|
2073
|
+
fill: none;
|
|
2074
|
+
stroke: var(--figma-color-bordertranslucent);
|
|
2075
|
+
stroke-width: var(--stroke-width);
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
.fig-angle-tick {
|
|
2079
|
+
stroke: var(--figma-color-icon-tertiary);
|
|
2080
|
+
stroke-width: var(--stroke-width);
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
.fig-angle-reference {
|
|
2084
|
+
color: var(--figma-color-icon-secondary);
|
|
2085
|
+
pointer-events: none;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
.fig-angle-indicator-halo {
|
|
2089
|
+
stroke: var(--figma-color-border);
|
|
2090
|
+
stroke-width: calc(var(--stroke-width) * 3);
|
|
2091
|
+
}
|
|
2092
|
+
|
|
2093
|
+
.fig-angle-indicator {
|
|
2094
|
+
stroke: var(--figma-color-icon);
|
|
2095
|
+
stroke-width: calc(var(--stroke-width) * 2);
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
.fig-angle-input {
|
|
2099
|
+
flex: 0 0 auto;
|
|
2100
|
+
width: 100%;
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
.fig-angle-surface > .fig-angle-input {
|
|
2104
|
+
position: absolute;
|
|
2105
|
+
z-index: 2;
|
|
2106
|
+
top: 50%;
|
|
2107
|
+
left: 50%;
|
|
2108
|
+
width: fit-content;
|
|
2109
|
+
transform: translate(-50%, -50%);
|
|
2110
|
+
outline: 0;
|
|
2111
|
+
|
|
2112
|
+
input {
|
|
2113
|
+
field-sizing: content;
|
|
2114
|
+
flex: 0 0 auto;
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
.fig-angle-reset {
|
|
2119
|
+
position: absolute;
|
|
2120
|
+
right: var(--spacer-1);
|
|
2121
|
+
bottom: var(--spacer-1);
|
|
2122
|
+
z-index: 3;
|
|
2123
|
+
background-color: var(--figma-color-bg-secondary) !important;
|
|
2124
|
+
|
|
2125
|
+
&:hover fig-icon {
|
|
2126
|
+
background-color: var(--figma-color-text);
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
fig-icon {
|
|
2130
|
+
background-color: var(--figma-color-text-tertiary);
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
.fig-angle-rotations {
|
|
2135
|
+
font-variant-numeric: tabular-nums;
|
|
2136
|
+
color: var(--figma-color-text-secondary);
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
&[full] {
|
|
2140
|
+
display: flex;
|
|
2141
|
+
width: 100%;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
&[disabled]:not([disabled="false"]) {
|
|
2145
|
+
.fig-angle-surface {
|
|
2146
|
+
.fig-angle-svg {
|
|
2147
|
+
cursor: default;
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
.fig-angle-boundary,
|
|
2152
|
+
.fig-angle-tick,
|
|
2153
|
+
.fig-angle-indicator-halo {
|
|
2154
|
+
stroke: var(--figma-color-border-disabled-strong);
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2157
|
+
.fig-angle-reference {
|
|
2158
|
+
color: var(--figma-color-icon-disabled);
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
.fig-angle-indicator {
|
|
2162
|
+
stroke: var(--figma-color-icon-disabled);
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
fig-field:not([direction="vertical"]) & {
|
|
2167
|
+
flex: 1;
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
@media (forced-colors: active) {
|
|
2172
|
+
fig-angle {
|
|
2173
|
+
.fig-angle-boundary,
|
|
2174
|
+
.fig-angle-tick,
|
|
2175
|
+
.fig-angle-indicator-halo {
|
|
2176
|
+
stroke: CanvasText;
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2179
|
+
.fig-angle-reference {
|
|
2180
|
+
color: CanvasText;
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
.fig-angle-indicator {
|
|
2184
|
+
stroke: Highlight;
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2001
2189
|
/* 3D Rotate */
|
|
2002
2190
|
fig-3d-rotate {
|
|
2003
2191
|
display: flex;
|
|
@@ -3805,6 +3993,13 @@ fig-input-number {
|
|
|
3805
3993
|
flex: 1;
|
|
3806
3994
|
width: 100%;
|
|
3807
3995
|
}
|
|
3996
|
+
&[tabular]:not([tabular="false"]) {
|
|
3997
|
+
font-variant-numeric: tabular-nums;
|
|
3998
|
+
|
|
3999
|
+
& input {
|
|
4000
|
+
font-variant-numeric: tabular-nums;
|
|
4001
|
+
}
|
|
4002
|
+
}
|
|
3808
4003
|
&[size="large"] {
|
|
3809
4004
|
& > input,
|
|
3810
4005
|
& > textarea {
|
|
@@ -3934,6 +4129,24 @@ fig-input-number {
|
|
|
3934
4129
|
background-color: var(--figma-color-bg);
|
|
3935
4130
|
box-shadow: inset 0 0 0 1px var(--figma-color-border-disabled);
|
|
3936
4131
|
}
|
|
4132
|
+
|
|
4133
|
+
&:is(fig-input-number)[variant="ghost"] {
|
|
4134
|
+
background-color: transparent;
|
|
4135
|
+
box-shadow: none;
|
|
4136
|
+
|
|
4137
|
+
&:hover {
|
|
4138
|
+
box-shadow: none;
|
|
4139
|
+
}
|
|
4140
|
+
|
|
4141
|
+
&:is(:hover, :focus-within):not([disabled]):not([disabled="false"]) {
|
|
4142
|
+
background-color: var(--figma-color-bg-secondary);
|
|
4143
|
+
}
|
|
4144
|
+
|
|
4145
|
+
&[disabled]:not([disabled="false"]) {
|
|
4146
|
+
background-color: transparent;
|
|
4147
|
+
box-shadow: none;
|
|
4148
|
+
}
|
|
4149
|
+
}
|
|
3937
4150
|
}
|
|
3938
4151
|
|
|
3939
4152
|
fig-input-number > [slot],
|