@fusion.dev/helix-docs 0.228.0 → 0.229.1
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/color.mdx +5 -4
- package/content/elevation-and-material.mdx +6 -3
- package/content/maps.mdx +1 -1
- package/content/metrics.mdx +263 -263
- package/content/shape-and-borders.mdx +3 -4
- package/content/size-and-density.mdx +1 -2
- package/content/space-and-size.mdx +3 -2
- package/content/surfaces-and-separation.mdx +11 -11
- package/content/theming.mdx +3 -1
- package/content/typography.mdx +2 -2
- package/content/visual-axes.mdx +34 -29
- package/dist/sources.generated.js +332 -322
- package/package.json +12 -12
|
@@ -38,7 +38,7 @@ This makes every card, dialog, input, and button squarer at once, because `sm`,
|
|
|
38
38
|
See [Deriving a theme](./theming).
|
|
39
39
|
|
|
40
40
|
Setting `--helix-radii-md` changes only what uses `md`. Buttons, inputs, and
|
|
41
|
-
dialogs use `sm`, and cards use `
|
|
41
|
+
dialogs use `sm`, and cards use `md`, so none of them change. Each step is
|
|
42
42
|
computed from the seed on its own, so overriding one step changes only that
|
|
43
43
|
step. To change the rounding everywhere, set the seed.
|
|
44
44
|
|
|
@@ -55,9 +55,8 @@ step. To change the rounding everywhere, set the seed.
|
|
|
55
55
|
They all have the same corner, whatever their size. You compare a radius with
|
|
56
56
|
the corners next to it, so the size of the panel does not matter.
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
does not change them.
|
|
58
|
+
An avatar and a radio are circles by design, so they read `--helix-radii-full`.
|
|
59
|
+
A theme that squares off everything else does not change them.
|
|
61
60
|
|
|
62
61
|
## Border widths
|
|
63
62
|
|
|
@@ -26,8 +26,7 @@ Size does three jobs:
|
|
|
26
26
|
- Emphasis shows which control matters most. The `emphasis` axis sets it. A
|
|
27
27
|
filled primary button marks the important action much more clearly than eight
|
|
28
28
|
more pixels of height.
|
|
29
|
-
- Fit depends on the region. A toolbar is tight
|
|
30
|
-
row is tighter still. The region sets the fit for every control in it.
|
|
29
|
+
- Fit depends on the region. A toolbar is tight and a hero is spacious. The region sets the fit for every control in it.
|
|
31
30
|
- Optical role applies only to things that are not controls. An avatar at 24 in
|
|
32
31
|
a list and at 96 on a profile are two different pictures. That is why
|
|
33
32
|
`Avatar`, `Loader`, and `Orb` keep a `size`.
|
|
@@ -25,6 +25,7 @@ up one step of padding taller than the input beside it.
|
|
|
25
25
|
| `--helix-space-xl` | `calc(2rem * var(--helix-seed-density, 1))` |
|
|
26
26
|
| `--helix-space-2xl` | `calc(3rem * var(--helix-seed-density, 1))` |
|
|
27
27
|
| `--helix-space-3xl` | `calc(4rem * var(--helix-seed-density, 1))` |
|
|
28
|
+
| `--helix-space-field` | `var(--helix-space-sm)` |
|
|
28
29
|
| `--helix-space-control` | `var(--helix-space-md)` |
|
|
29
30
|
|
|
30
31
|
[//]: # (/tokens)
|
|
@@ -34,7 +35,7 @@ arithmetic, such as `space-4` being twice `space-2`. That stops being true as
|
|
|
34
35
|
soon as the scale is tuned, and it leads to a `space-4.5` the first time
|
|
35
36
|
something does not fit.
|
|
36
37
|
|
|
37
|
-
`--helix-space-control`
|
|
38
|
+
`--helix-space-control` and `--helix-space-field` are two more of a different kind. It is the inset a
|
|
38
39
|
control uses, and it follows the region's density. It is not a step on the
|
|
39
40
|
scale. See [Size and density](./size-and-density).
|
|
40
41
|
|
|
@@ -50,7 +51,7 @@ Use the space tokens for gap, padding, and margin:
|
|
|
50
51
|
|
|
51
52
|
## Size
|
|
52
53
|
|
|
53
|
-
|
|
54
|
+
Almost all of the size tokens name a specific
|
|
54
55
|
thing:
|
|
55
56
|
|
|
56
57
|
- `--helix-size-control`
|
|
@@ -6,11 +6,11 @@ title: Surfaces and separation
|
|
|
6
6
|
|
|
7
7
|
# Surfaces and separation
|
|
8
8
|
|
|
9
|
-
**Separate each surface from what is behind it with
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
shadow
|
|
9
|
+
**Separate each surface from what is behind it with four things: a fill, an
|
|
10
|
+
edge, a lift, and space.** A design language leads with one of them. Helix leads
|
|
11
|
+
with an edge for surfaces on the page and a lift for surfaces above it. A card
|
|
12
|
+
has a hairline border and no shadow. A menu has a shadow and a hairline border,
|
|
13
|
+
because a shadow cannot show on a near-black page. The surface ladder below sets the ground color
|
|
14
14
|
for each place a surface can sit.
|
|
15
15
|
|
|
16
16
|
## The four ways to separate a surface
|
|
@@ -59,16 +59,16 @@ A surface's ground color token names where the surface sits:
|
|
|
59
59
|
| --- | --- | --- |
|
|
60
60
|
| `--helix-color-background` | <span data-token-swatch style={{ background: 'var(--helix-color-background)' }} /> | The page background. Every other surface sits on it. |
|
|
61
61
|
| `--helix-color-surface` | <span data-token-swatch style={{ background: 'var(--helix-color-surface)' }} /> | A surface on the page, such as a card or a panel. The separation policy sets it apart with a fill, a border, or a shadow. |
|
|
62
|
-
| `--helix-color-surface-raised` | <span data-token-swatch style={{ background: 'var(--helix-color-surface-raised)' }} /> | A raised
|
|
62
|
+
| `--helix-color-surface-raised` | <span data-token-swatch style={{ background: 'var(--helix-color-surface-raised)' }} /> | A panel raised inside a surface, such as a card inside a card. Its fill is one step down the ramp. |
|
|
63
63
|
| `--helix-color-surface-overlay` | <span data-token-swatch style={{ background: 'var(--helix-color-surface-overlay)' }} /> | A surface over the page, such as a menu, a popover, or a dialog. Its edge and its shadow set it apart. |
|
|
64
|
-
| `--helix-color-surface-sunken` | <span data-token-swatch style={{ background: 'var(--helix-color-surface-sunken)' }} /> | A recessed surface
|
|
64
|
+
| `--helix-color-surface-sunken` | <span data-token-swatch style={{ background: 'var(--helix-color-surface-sunken)' }} /> | A recessed surface, such as a track or a groove. Its fill sets it apart. A field reads `well`. |
|
|
65
65
|
|
|
66
66
|
[//]: # (/tokens)
|
|
67
67
|
|
|
68
|
-
**`raised` goes one step down the ramp.** A
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
**`raised` goes one step down the ramp.** A panel inside a surface has a surface
|
|
69
|
+
on every side. Only its fill separates it, and on a white page a fill has to be a
|
|
70
|
+
step darker to be seen. A lit row is different: it takes `hover`, a wash measured
|
|
71
|
+
against whatever it sits on. `overlay` works the other way. Its edge and its shadow separate it, so on
|
|
72
72
|
a white page it is white.
|
|
73
73
|
|
|
74
74
|
## Using the page color inside a component
|
package/content/theming.mdx
CHANGED
|
@@ -60,7 +60,9 @@ Tuned does not guarantee contrast. CSS has no contrast function.
|
|
|
60
60
|
`oklch(from …)` can step and rotate a color, but it cannot search for the
|
|
61
61
|
lightness that meets a target. The contrast figures built into the ramp were
|
|
62
62
|
measured on one blue seed, so they are exact for that seed and approximate for
|
|
63
|
-
any other.
|
|
63
|
+
any other. The label on a solid button turns black on a seed lighter than L 0.68.
|
|
64
|
+
The focus ring still follows the seed, so use the verified engine for a very
|
|
65
|
+
light brand, where the ring measures 1.23:1 on white.
|
|
64
66
|
|
|
65
67
|
**Verified** uses the theme engine. It searches for each color that meets its
|
|
66
68
|
target, measures every pair, and returns the theme with any violations:
|
package/content/typography.mdx
CHANGED
|
@@ -60,12 +60,12 @@ inside `[data-prose]`, with no changes to the content.
|
|
|
60
60
|
Use `Text` when a heading's element and its appearance need to differ. A
|
|
61
61
|
section's second heading may need to look smaller and keep its place in the
|
|
62
62
|
outline. A `<p>` may need to look like a caption. `as` chooses the element, and
|
|
63
|
-
`
|
|
63
|
+
`scale` chooses the ramp:
|
|
64
64
|
|
|
65
65
|
```html
|
|
66
66
|
<helix-text
|
|
67
67
|
as="h3"
|
|
68
|
-
|
|
68
|
+
scale="body"
|
|
69
69
|
>Reads as body, outlines as a heading</helix-text>
|
|
70
70
|
```
|
|
71
71
|
|
package/content/visual-axes.mdx
CHANGED
|
@@ -66,25 +66,26 @@ sit on two axes:
|
|
|
66
66
|
If you are adding a property and cannot decide which axis it belongs on, it is
|
|
67
67
|
usually two properties.
|
|
68
68
|
|
|
69
|
-
##
|
|
69
|
+
## Name a choice between widgets for what it chooses
|
|
70
70
|
|
|
71
71
|
```html
|
|
72
|
-
<helix-tabs
|
|
73
|
-
<helix-time-picker
|
|
72
|
+
<helix-tabs marker="segmented">…</helix-tabs>
|
|
73
|
+
<helix-time-picker picker="wheels">…</helix-time-picker>
|
|
74
|
+
<helix-splitter handle="grip">…</helix-splitter>
|
|
74
75
|
```
|
|
75
76
|
|
|
76
|
-
|
|
77
|
-
example:
|
|
77
|
+
These words have no registry, because their values belong to the families that take them:
|
|
78
78
|
|
|
79
|
-
- `
|
|
80
|
-
- `
|
|
81
|
-
- `
|
|
79
|
+
- `marker` is how the current item is marked, on Tabs, Navigation, Outline, and Steps.
|
|
80
|
+
- `layout` is how parts are arranged, on Code Block, Megamenu, Spatial Bar Chart, and Button Group.
|
|
81
|
+
- `picker` is which control picks, on Time Input and Time Picker.
|
|
82
|
+
- `stroke` is the line's style, on Canvas Edge and Map Route.
|
|
83
|
+
- `handle` is what you grab, on Splitter.
|
|
84
|
+
- `pattern` is which drawing, on Aura, Strands, Voice Level, and Loader.
|
|
82
85
|
|
|
83
|
-
A
|
|
84
|
-
wherever it is made, so `variant` can appear on either tier.
|
|
86
|
+
A choice between two widgets changes structure wherever it is made, so these can appear on either tier.
|
|
85
87
|
|
|
86
|
-
**Do not use
|
|
87
|
-
problem `appearance` had.
|
|
88
|
+
**Do not use one of these for anything an axis already covers, and do not name a property `variant`.** A word that names no choice is the problem `appearance` had.
|
|
88
89
|
|
|
89
90
|
## Axes on both tiers
|
|
90
91
|
|
|
@@ -114,8 +115,9 @@ reached the same rule in their own declarations, so the rule is stated here.
|
|
|
114
115
|
|
|
115
116
|
**A family that reports a status accepts only the status values.** `Callout` and
|
|
116
117
|
`Toast` both state this. A callout reports a status and never a brand role, so
|
|
117
|
-
it accepts
|
|
118
|
-
value the family cannot draw is worse
|
|
118
|
+
it accepts five of the seven tones, the four statuses and `neutral`, which is a
|
|
119
|
+
note that reports no status. Accepting a value the family cannot draw is worse
|
|
120
|
+
than leaving the value out.
|
|
119
121
|
|
|
120
122
|
**A family whose resting state has no tone does not need `neutral`.** `Text`
|
|
121
123
|
gives this reason for having no `default` value. A value that matches no rule
|
|
@@ -159,13 +161,13 @@ and this section explains why.
|
|
|
159
161
|
| Value | What it draws |
|
|
160
162
|
|---|---|
|
|
161
163
|
| `elevated` | A surface lifted off the page, with a shadow under it |
|
|
162
|
-
| `filled` | A ground of its own, and no edge |
|
|
163
|
-
| `outlined` | An edge
|
|
164
|
-
| `plain` |
|
|
164
|
+
| `filled` | A ground of its own, and no edge. What the ground is belongs to the family |
|
|
165
|
+
| `outlined` | An edge and no fill. A family whose text or thumb needs its ground to read, such as Log or Toggle Group, does not offer it. On Card, this differs from unset, which has a fill and an edge |
|
|
166
|
+
| `plain` | No frame of its own. A family keeps what its content needs to stay readable, and its reference says what stays |
|
|
165
167
|
|
|
166
168
|
**Most families leave out `elevated` because of what the value means.** A shadow
|
|
167
169
|
shows that the box floats above the page. That is true of a card picked up off a
|
|
168
|
-
grid and of
|
|
170
|
+
grid and of a node on a board. It is false of:
|
|
169
171
|
|
|
170
172
|
- a row in a feed
|
|
171
173
|
- a groove a thumb sits in
|
|
@@ -173,7 +175,7 @@ grid and of an announcement laid over the content. It is false of:
|
|
|
173
175
|
- a bar across a video
|
|
174
176
|
|
|
175
177
|
A family that accepts only the other three values needs no reason for it. A
|
|
176
|
-
family that accepts `elevated` has made a choice, and `Card` and `
|
|
178
|
+
family that accepts `elevated` has made a choice, and `Card` and `Canvas Node`
|
|
177
179
|
both accept it.
|
|
178
180
|
|
|
179
181
|
## What each nesting value does
|
|
@@ -203,7 +205,7 @@ value changes meaning partway along.
|
|
|
203
205
|
| Value | What it draws |
|
|
204
206
|
|---|---|
|
|
205
207
|
| `solid` | The tone as a full ground, with the ink flipped to read on it |
|
|
206
|
-
| `subtle` | A wash of the tone and no edge, the quietest thing that still has a surface |
|
|
208
|
+
| `subtle` | A wash of the tone and no edge, the quietest thing that still has a surface. A chart mark keeps its edge |
|
|
207
209
|
| `outlined` | An edge in the tone |
|
|
208
210
|
| `ghost` | Nothing at rest, the tone carried by the ink alone |
|
|
209
211
|
| `muted` | Quieter ink, where there is no surface to quiet |
|
|
@@ -214,8 +216,9 @@ fill stays under the edge, because the area shows a value and removing the fill
|
|
|
214
216
|
would hide that value. In both cases, `outlined` sets how much ink the element
|
|
215
217
|
uses, based on what the element needs the ink for.
|
|
216
218
|
|
|
217
|
-
**`muted` is for something whose only ink is its letterforms.**
|
|
218
|
-
|
|
219
|
+
**`muted` is for something whose only ink is its letterforms.** Text takes it,
|
|
220
|
+
because everything else has a surface to make quieter first. Spatial Bar Chart
|
|
221
|
+
also takes it, to draw neutral bars with one lit in its tone. Leaving it off
|
|
219
222
|
other families is intentional.
|
|
220
223
|
|
|
221
224
|
## What each material draws
|
|
@@ -229,7 +232,7 @@ smeared, and a filter behind an opaque ground cannot be seen. With no
|
|
|
229
232
|
| Value | What it draws |
|
|
230
233
|
|---|---|
|
|
231
234
|
| `glass` | A translucent ground and the backdrop filter that makes it read |
|
|
232
|
-
| `frosted` | The same pair turned up, a heavier ground under a heavier blur |
|
|
235
|
+
| `frosted` | The same pair turned up, a heavier ground under a heavier blur. A Dialog or Drawer's `glass` is already as heavy in light, so there the two differ by blur alone |
|
|
233
236
|
| `transparent` | Neither, so the page shows through structure and spacing |
|
|
234
237
|
|
|
235
238
|
Use `frosted` for a surface that has to stay readable over a busy page. A theme
|
|
@@ -260,15 +263,17 @@ the width the splitter actually has.
|
|
|
260
263
|
|
|
261
264
|
## What each size draws
|
|
262
265
|
|
|
263
|
-
`size` applies to pictures and regions, and never to
|
|
264
|
-
|
|
266
|
+
`size` applies to pictures and regions, and never to one control. Toolbar and
|
|
267
|
+
Button Group take it because they are regions: it sets every control inside
|
|
268
|
+
them at once, as `data-density` does for a block. That rule sets the scope of
|
|
269
|
+
the axis. One of the four values is a different kind of step.
|
|
265
270
|
|
|
266
271
|
| Value | What it draws |
|
|
267
272
|
|---|---|
|
|
268
273
|
| `sm` | The small step |
|
|
269
|
-
| `md` | The middle step, and the resting state for
|
|
274
|
+
| `md` | The middle step, and the resting state for most families. Toolbar rests at `sm`, being dense by nature |
|
|
270
275
|
| `lg` | The large step |
|
|
271
|
-
| `full` | The whole region, less the same inset every other step already leaves |
|
|
276
|
+
| `full` | The whole width of the region, less the same inset every other step already leaves |
|
|
272
277
|
|
|
273
278
|
**`full` is one more step on the `size` axis.** A takeover dialog is the same
|
|
274
279
|
setting taken further, so it belongs on this axis. A separate `fullscreen`
|
|
@@ -291,7 +296,7 @@ The table at the top describes `tone` in words and names four of its values.
|
|
|
291
296
|
| `danger` | Destructive, or already wrong |
|
|
292
297
|
|
|
293
298
|
The first three are intents, and the last four are statuses. A family that
|
|
294
|
-
accepts a subset
|
|
299
|
+
accepts a subset usually chooses between these two groups. The section on `neutral`
|
|
295
300
|
above says when to accept it.
|
|
296
301
|
|
|
297
302
|
## What each width value does
|
|
@@ -302,7 +307,7 @@ component, separate from `size`.
|
|
|
302
307
|
|
|
303
308
|
| Value | What it draws |
|
|
304
309
|
|---|---|
|
|
305
|
-
| `auto` | As wide as its content. This is the resting behavior, written out |
|
|
310
|
+
| `auto` | As wide as its content. This is the resting behavior on most families, written out. On Description List, which fills the row at rest, it is the departure |
|
|
306
311
|
| `full` | All the inline space its parent gives it |
|
|
307
312
|
|
|
308
313
|
**A `width` that takes a number is a different property with the same name.** A
|