@fusion.dev/helix-docs 0.249.3 → 0.251.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/content/metrics.mdx +287 -287
- package/content/motion.mdx +20 -9
- package/dist/sources.generated.js +307 -296
- package/package.json +12 -12
package/content/motion.mdx
CHANGED
|
@@ -16,6 +16,7 @@ title: Motion
|
|
|
16
16
|
| `--helix-duration-fast` | `120ms` |
|
|
17
17
|
| `--helix-duration-normal` | `200ms` |
|
|
18
18
|
| `--helix-duration-slow` | `320ms` |
|
|
19
|
+
| `--helix-duration-feedback` | `calc(var(--helix-duration-fast) * 2 / 3)` |
|
|
19
20
|
| `--helix-duration-turn` | `0.8s` |
|
|
20
21
|
| `--helix-duration-crawl` | `4s` |
|
|
21
22
|
| `--helix-duration-fade` | `120ms` |
|
|
@@ -30,14 +31,17 @@ title: Motion
|
|
|
30
31
|
| `--helix-easing-emphasized` | `cubic-bezier(0.3, 0, 0, 1.2)` |
|
|
31
32
|
| `--helix-easing-decelerate` | `cubic-bezier(0, 0, 0, 1)` |
|
|
32
33
|
| `--helix-easing-accelerate` | `cubic-bezier(0.3, 0, 1, 1)` |
|
|
34
|
+
| `--helix-easing-feedback` | `var(--helix-easing-decelerate)` |
|
|
33
35
|
| `--helix-easing-cycle` | `cubic-bezier(0.42, 0, 0.58, 1)` |
|
|
34
36
|
| `--helix-easing-spring` | `linear(0, 0.006, 0.025, 0.101, 0.539, 0.826, 0.976, 1.037, 1.043, 1.026, 1.006, 0.997, 1)` |
|
|
35
37
|
|
|
36
38
|
[//]: # (/tokens)
|
|
37
39
|
|
|
38
|
-
Helix has
|
|
39
|
-
`slow` time a change that answers a
|
|
40
|
-
|
|
40
|
+
Helix has eight durations and seven curves. `instant`, `fast`, `normal`, and
|
|
41
|
+
`slow` time movement. `feedback` times a change that answers a pointer, a key,
|
|
42
|
+
or focus, such as a hover color, a press, or a field taking focus. It is two
|
|
43
|
+
thirds of `fast`, so it follows the theme engine's pace. `fade` is the fade a
|
|
44
|
+
panel keeps while motion is reduced. `turn` is one revolution of a spinner, and `crawl` is
|
|
41
45
|
the same revolution while motion is reduced, so a busy ring still turns
|
|
42
46
|
slowly.
|
|
43
47
|
|
|
@@ -45,6 +49,10 @@ Use each curve for one kind of movement:
|
|
|
45
49
|
|
|
46
50
|
- `standard` for most movement
|
|
47
51
|
- `decelerate` for something arriving, such as a Dialog, a Drawer, or a Toast
|
|
52
|
+
- `feedback` for a change that answers a pointer, a key, or focus. It is
|
|
53
|
+
`decelerate`, which starts at full speed, so a control under a moving pointer
|
|
54
|
+
changes in the first frame. A hover wash that glides from item to item, and
|
|
55
|
+
the focus ring that travels along a toolbar, use it over `fast`
|
|
48
56
|
- `accelerate` for something leaving
|
|
49
57
|
- `cycle` for a loop that repeats, such as a pulse or a loading sweep
|
|
50
58
|
- `emphasized` for a floating panel opening from its trigger, such as a
|
|
@@ -224,8 +232,9 @@ once and the two sides crossfade over `--helix-duration-fade`.
|
|
|
224
232
|
|
|
225
233
|
## Swipes that carry through
|
|
226
234
|
|
|
227
|
-
A touch or a pen drags a `Toast` toward the edge its stack sits at,
|
|
228
|
-
`Drawer` toward the edge it came from
|
|
235
|
+
A touch or a pen drags a `Toast` toward the edge its stack sits at, a
|
|
236
|
+
`Drawer` toward the edge it came from, and a `Menu` that opened as a sheet down
|
|
237
|
+
toward the bottom of the window. The surface follows the finger, and past
|
|
229
238
|
its open end it gives less and less. On release it keeps the speed it had. A
|
|
230
239
|
quick flick dismisses from any distance and carries the surface off the window
|
|
231
240
|
at that speed. A slow drag past halfway dismisses too, and the surface gathers
|
|
@@ -233,12 +242,14 @@ pace as it goes. A shorter drag springs back to rest along
|
|
|
233
242
|
`--helix-easing-spring`, with its speed carried in. A dismissal goes through
|
|
234
243
|
the component's own close, so a page that cancels `helix-before-close` or
|
|
235
244
|
`helix-dismiss` sends the surface back to rest. While a drag and its release
|
|
236
|
-
run, the component has `:state(dragging)
|
|
237
|
-
`--drawer-drag-progress
|
|
238
|
-
finger, and then goes or returns
|
|
245
|
+
run, the component has `:state(dragging)`. A drawer's backdrop fades with
|
|
246
|
+
`--drawer-drag-progress`, and a menu's scrim with `--menu-drag-progress`. Under
|
|
247
|
+
reduced motion the surface still follows the finger, and then goes or returns
|
|
248
|
+
at once. `--drawer-release-duration`, `--menu-release-duration`, and
|
|
239
249
|
`--toast-release-duration` set the longest a release takes, and `0ms` ends it
|
|
240
250
|
at once. `DragDismissController` in `@fusion.dev/helix-core` gives a component
|
|
241
|
-
of your own the same gesture
|
|
251
|
+
of your own the same gesture, and `SheetController` gives a floating surface of
|
|
252
|
+
your own the whole sheet: the scrim, the drag, and the page held still.
|
|
242
253
|
|
|
243
254
|
## Figures that count
|
|
244
255
|
|