@fusion.dev/helix-templates 0.236.0 → 0.237.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/package.json +1 -1
- package/templates/angular/package.json +7 -0
- package/templates/angular/src/app/landing.html +10 -2
- package/templates/angular/src/app/overview.html +1 -1
- package/templates/angular/src/app/signup-form.html +7 -3
- package/templates/angular/src/app/signup-form.ts +3 -3
- package/templates/angular/src/app.css +120 -11
- package/templates/angular/src/main.ts +10 -1
- package/templates/react-nextjs/app/app.css +120 -11
- package/templates/react-nextjs/app/landing.tsx +4 -2
- package/templates/react-nextjs/app/overview.tsx +8 -7
- package/templates/react-nextjs/app/signup-form.tsx +12 -6
- package/templates/react-nextjs/next.config.ts +7 -0
- package/templates/react-nextjs/package.json +7 -0
- package/templates/react-vite/src/app.css +120 -11
- package/templates/react-vite/src/landing.tsx +4 -2
- package/templates/react-vite/src/overview.tsx +8 -7
- package/templates/react-vite/src/signup-form.tsx +12 -6
- package/templates/react-vite/vite.config.ts +11 -1
- package/templates/solid-vite/src/app.css +120 -11
- package/templates/solid-vite/src/landing.tsx +4 -2
- package/templates/solid-vite/src/overview.tsx +1 -1
- package/templates/solid-vite/src/signup-form.tsx +8 -6
- package/templates/solid-vite/vite.config.ts +11 -1
- package/templates/svelte-vite/src/Landing.svelte +4 -2
- package/templates/svelte-vite/src/Overview.svelte +1 -1
- package/templates/svelte-vite/src/SignupForm.svelte +10 -6
- package/templates/svelte-vite/src/app.css +120 -11
- package/templates/svelte-vite/vite.config.ts +11 -1
- package/templates/vue-vite/src/LandingPage.vue +4 -2
- package/templates/vue-vite/src/OverviewPage.vue +1 -1
- package/templates/vue-vite/src/SignupForm.vue +8 -6
- package/templates/vue-vite/src/app.css +120 -11
- package/templates/vue-vite/vite.config.ts +11 -0
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* `:root`, and every token follows it.
|
|
12
12
|
*
|
|
13
13
|
* **Color appears in two places, and both are named.** Each tile's icon takes
|
|
14
|
-
* `--helix-color-
|
|
14
|
+
* `--helix-color-brand-mark` on `--helix-color-primary-subtle`, and a chosen row
|
|
15
15
|
* takes `--helix-color-primary-subtle` through the parts the table publishes.
|
|
16
16
|
* Everywhere else the page is the foreground on the background, and the
|
|
17
17
|
* components carry their own color.
|
|
@@ -140,10 +140,46 @@ helix-app-header {
|
|
|
140
140
|
and faded out behind the words so they keep their contrast: it is at full
|
|
141
141
|
strength only behind the card, which is below the words in one column and
|
|
142
142
|
beside them in two. */
|
|
143
|
+
/*
|
|
144
|
+
* **On a light page the light is a pale sheen on the page itself.** By default
|
|
145
|
+
* an aura ramps from the page up to `primary`, which in dark is light on black.
|
|
146
|
+
* In light that ramp runs from white to a dark color, and with no brand it drew
|
|
147
|
+
* a gray smoke behind the card: at 390 the muted stat labels sat on #cccccc at
|
|
148
|
+
* 3.7:1. Turned around, from a tint up to white, it laid a #d1d1d1 slab over
|
|
149
|
+
* the end of the hero that read as a smudge. Now the ground is the page, the
|
|
150
|
+
* strands are `primary-subtle`, and their cores take a third of `primary`, so
|
|
151
|
+
* only the strokes show: at 1440 the darkest is #bebebe, 1.86:1, on a thin
|
|
152
|
+
* line, and the strip beside the card stays white where the slab covered 93%
|
|
153
|
+
* of it. A brand colors the strokes. The second half of each pair is the
|
|
154
|
+
* aura's own default, so dark is unchanged.
|
|
155
|
+
*
|
|
156
|
+
* **Side by side, the light starts at 45% of the panel's width.** From 35%, the
|
|
157
|
+
* dark plume reached the end of the lede's lines, and the lede measured 3.84:1
|
|
158
|
+
* against the brightest pixel behind it at 1440. From 45% it measures 8.9:1, and
|
|
159
|
+
* the light reaches full strength at 75%, behind the card.
|
|
160
|
+
*
|
|
161
|
+
* **In one column, the light is measured up from the bottom edge**, so it
|
|
162
|
+
* starts under the actions however the words above them wrap. From 40% of the
|
|
163
|
+
* panel's height, the bright plume passed behind "Open the form" at 390: in dark
|
|
164
|
+
* its label fell to 5.33:1 against the brightest pixel behind it, and its edge
|
|
165
|
+
* to 1.02:1, gone. The light now fades in from 14rem above the bottom, under the
|
|
166
|
+
* actions, and is at full strength from 7rem, behind the card.
|
|
167
|
+
*/
|
|
143
168
|
.first-light {
|
|
169
|
+
--aura-ground: var(--helix-color-background);
|
|
170
|
+
--aura-glow: light-dark(var(--helix-color-primary-subtle), var(--helix-color-primary));
|
|
171
|
+
--aura-haze: light-dark(
|
|
172
|
+
color-mix(in oklab, var(--helix-color-primary-subtle) 50%, var(--helix-color-background)),
|
|
173
|
+
var(--helix-color-primary-subtle)
|
|
174
|
+
);
|
|
175
|
+
--aura-peak: light-dark(
|
|
176
|
+
color-mix(in oklab, var(--helix-color-primary) 34%, var(--helix-color-primary-subtle)),
|
|
177
|
+
var(--helix-color-foreground)
|
|
178
|
+
);
|
|
179
|
+
|
|
144
180
|
block-size: auto;
|
|
145
181
|
inset: 0;
|
|
146
|
-
mask-image: linear-gradient(to
|
|
182
|
+
mask-image: linear-gradient(to top, black 7rem, transparent 14rem);
|
|
147
183
|
pointer-events: none;
|
|
148
184
|
position: absolute;
|
|
149
185
|
z-index: var(--helix-layer-beneath);
|
|
@@ -151,10 +187,18 @@ helix-app-header {
|
|
|
151
187
|
|
|
152
188
|
@media (width >= 60rem) {
|
|
153
189
|
.first-light {
|
|
154
|
-
mask-image: linear-gradient(to right, transparent
|
|
190
|
+
mask-image: linear-gradient(to right, transparent 45%, black 75%);
|
|
155
191
|
}
|
|
156
192
|
}
|
|
157
193
|
|
|
194
|
+
/* **The pause control lines up with the card's trailing edge**, at the panel's
|
|
195
|
+
inline padding, where the aura's own corner put it 12 pixels from the
|
|
196
|
+
panel's edge. At 390 that left it 12 pixels past the card's edge and 4 under
|
|
197
|
+
the card, and its 44-pixel press box overlapped the card by 2. */
|
|
198
|
+
.first-light::part(pause) {
|
|
199
|
+
inset-inline-end: var(--helix-space-2xl);
|
|
200
|
+
}
|
|
201
|
+
|
|
158
202
|
/* A heading and the lines around it are one block, with a smaller gap than the
|
|
159
203
|
one between blocks. Every route opens with one. */
|
|
160
204
|
.hero {
|
|
@@ -164,11 +208,17 @@ helix-app-header {
|
|
|
164
208
|
}
|
|
165
209
|
|
|
166
210
|
/* The first screen's heading takes more room around it than a route's, and
|
|
167
|
-
its lede a step more size
|
|
211
|
+
its lede a step more size. Both wrap to even lines where they wrap. Balance
|
|
212
|
+
cannot split three words evenly, so on a phone the heading takes a smaller
|
|
213
|
+
size, below. */
|
|
168
214
|
.first-screen .hero {
|
|
169
215
|
gap: var(--helix-space-md);
|
|
170
216
|
}
|
|
171
217
|
|
|
218
|
+
.first-screen .hero > [as="h1"] {
|
|
219
|
+
text-wrap: balance;
|
|
220
|
+
}
|
|
221
|
+
|
|
172
222
|
.first-screen .lede {
|
|
173
223
|
font-size: var(--helix-text-lg);
|
|
174
224
|
text-wrap: balance;
|
|
@@ -224,12 +274,14 @@ helix-app-header {
|
|
|
224
274
|
block-size: 100%;
|
|
225
275
|
}
|
|
226
276
|
|
|
227
|
-
/* Each tile's icon, on a tint of the brand.
|
|
277
|
+
/* Each tile's icon, on a tint of the brand. The icon is a graphic, so it takes
|
|
278
|
+
`brand-mark`, the brand as a graphic: a graphic needs 3:1 where text needs
|
|
279
|
+
4.5:1, so a theme can set it nearer the color you chose than `primary`. */
|
|
228
280
|
.feature-mark {
|
|
229
281
|
--icon-size: 1.25rem;
|
|
230
282
|
background-color: var(--helix-color-primary-subtle);
|
|
231
283
|
border-radius: var(--helix-radii-md);
|
|
232
|
-
color: var(--helix-color-
|
|
284
|
+
color: var(--helix-color-brand-mark);
|
|
233
285
|
display: inline-flex;
|
|
234
286
|
inline-size: fit-content;
|
|
235
287
|
padding: var(--helix-space-xs);
|
|
@@ -280,9 +332,17 @@ helix-app-header {
|
|
|
280
332
|
|
|
281
333
|
/* The callout takes the column, which `start` above would otherwise size to its
|
|
282
334
|
own words: a notice narrower than the paragraph under it reads as a stray. The
|
|
283
|
-
link beside it is meant to be its own width.
|
|
335
|
+
link beside it is meant to be its own width.
|
|
336
|
+
|
|
337
|
+
**The notes' text size, and a step more room under it.** A callout draws at
|
|
338
|
+
the control size, 13px, which beside the notes' 14px read as a smaller voice
|
|
339
|
+
for the one fact that matters. And at the column's 12px gap the heading sat as
|
|
340
|
+
close to the callout as to its own paragraph, so it belonged to neither; 24px
|
|
341
|
+
above it and 12 below tie it to what it heads. */
|
|
284
342
|
.notes > helix-callout {
|
|
343
|
+
--callout-font-size: var(--helix-text-md);
|
|
285
344
|
inline-size: 100%;
|
|
345
|
+
margin-block-end: var(--helix-space-sm);
|
|
286
346
|
}
|
|
287
347
|
|
|
288
348
|
/*
|
|
@@ -310,17 +370,66 @@ helix-app-header {
|
|
|
310
370
|
display: flex;
|
|
311
371
|
flex-wrap: wrap;
|
|
312
372
|
gap: var(--helix-space-md);
|
|
373
|
+
/* Wide enough on a touch screen for the press areas below to meet without
|
|
374
|
+
overlapping, where the links wrap onto a second row. */
|
|
375
|
+
row-gap: max(var(--helix-space-md), calc(var(--helix-size-target) - 1lh));
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/*
|
|
379
|
+
* **A link reaches the touch target in a transparent box**, as Helix's own row
|
|
380
|
+
* of destinations does, so nothing drawn moves. On a 390 phone the wordmark and
|
|
381
|
+
* the footer links were 21 pixels tall and "React" 37 wide, against a 44-pixel
|
|
382
|
+
* target. The box grows only on the axis the link is short on, into the bar's
|
|
383
|
+
* padding and the gap between links, and `--helix-size-target` is 44 only on a
|
|
384
|
+
* coarse pointer.
|
|
385
|
+
*/
|
|
386
|
+
.wordmark,
|
|
387
|
+
.footer-links a {
|
|
388
|
+
position: relative;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.wordmark::after,
|
|
392
|
+
.footer-links a::after {
|
|
393
|
+
content: "";
|
|
394
|
+
inset-block: min(0px, calc((100% - var(--helix-size-target)) / 2));
|
|
395
|
+
inset-inline: min(0px, calc((100% - var(--helix-size-target)) / 2));
|
|
396
|
+
position: absolute;
|
|
313
397
|
}
|
|
314
398
|
|
|
315
399
|
/*
|
|
316
400
|
* **Narrow, the gutter gives first.** 24 pixels either side of a 390 window
|
|
317
|
-
* spend 48 of 390 on margin, and the table needs 355 of what is left. At `
|
|
318
|
-
*
|
|
319
|
-
*
|
|
401
|
+
* spend 48 of 390 on margin, and the table needs 355 of what is left. At `lg`
|
|
402
|
+
* it was 13 pixels short, and the last column sat outside the box until you
|
|
403
|
+
* scrolled the table sideways. At `md`, 16, the table has 358 and every row
|
|
404
|
+
* holds one line, 40 under a mouse and 45 on a touch screen, in Chromium and
|
|
405
|
+
* WebKit alike. The header, the page, and the footer keep one edge.
|
|
320
406
|
*/
|
|
321
407
|
@media (width < 40rem) {
|
|
408
|
+
/* **Room under the card for the pause control**: the control, and a 12-pixel
|
|
409
|
+
gap on each side of it. The panel's 48 put the control 4 pixels under the
|
|
410
|
+
card. */
|
|
322
411
|
.first-screen {
|
|
323
|
-
padding: var(--helix-space-2xl) var(--helix-space-lg)
|
|
412
|
+
padding: var(--helix-space-2xl) var(--helix-space-lg)
|
|
413
|
+
calc(var(--helix-size-control-sm) + var(--helix-space-sm) * 2);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.first-light::part(pause) {
|
|
417
|
+
inset-inline-end: var(--helix-space-lg);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/* **The heading a step down, so it is one line at 390.** At the display
|
|
421
|
+
size, 42px, "Helix design system" is 370 pixels wide in a 316 pixel
|
|
422
|
+
column, and balance broke it as "Helix design" over a lone "system". At
|
|
423
|
+
`2xl`, 32px, it is 282 pixels wide. Narrower than that, it balances again. */
|
|
424
|
+
.first-screen .hero > [as="h1"] {
|
|
425
|
+
--text-font-size: var(--helix-text-2xl);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/* One step less between blocks, as the gutter gives: 64 pixels between the
|
|
429
|
+
first screen and the section under it was more than a phone screen's
|
|
430
|
+
blocks need, so the page reads 48. */
|
|
431
|
+
.stack {
|
|
432
|
+
gap: var(--helix-space-2xl);
|
|
324
433
|
}
|
|
325
434
|
|
|
326
435
|
.page {
|
|
@@ -29,8 +29,10 @@ export function Landing() {
|
|
|
29
29
|
{/* **The light behind the first screen**: a helix, drawn by the library
|
|
30
30
|
in the theme's colors, so a new brand color relights it. It shows
|
|
31
31
|
one still frame where motion is reduced, and a gradient where the
|
|
32
|
-
browser draws without a GPU.
|
|
33
|
-
|
|
32
|
+
browser draws without a GPU. `pause-control` draws a button in
|
|
33
|
+
its corner that stops the motion and starts it again, since the
|
|
34
|
+
light moves for longer than five seconds. */}
|
|
35
|
+
<helix-aura className="first-light" speed={0.4} terminus={0.8} pattern="braid" pause-control />
|
|
34
36
|
<div className="hero">
|
|
35
37
|
<helix-tag emphasis="subtle" tone="primary">
|
|
36
38
|
Starter
|
|
@@ -37,7 +37,7 @@ export function Overview() {
|
|
|
37
37
|
|
|
38
38
|
<section className="section">
|
|
39
39
|
<helix-data-table
|
|
40
|
-
columns="minmax(5.5rem, 1.6fr) minmax(4.
|
|
40
|
+
columns="minmax(5.5rem, 1.6fr) minmax(4.75rem, 1fr) minmax(4.25rem, 1fr) max-content"
|
|
41
41
|
default-sort="name:asc"
|
|
42
42
|
label="Roster"
|
|
43
43
|
page-size={6}
|
|
@@ -52,12 +52,13 @@ export function Overview() {
|
|
|
52
52
|
cell, so the last column is pushed outside the box and you have to
|
|
53
53
|
scroll the table sideways to read a value. Each track here has a
|
|
54
54
|
floor and a share: the floor is what the words need, and the share
|
|
55
|
-
is how the spare width is divided. Measured
|
|
56
|
-
390
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
is how the spare width is divided. Measured November 4, 2026, at
|
|
56
|
+
390 in a box of 366: nothing is cut, and no name on the first page
|
|
57
|
+
wraps with a mouse or on a touch screen, where the text steps up
|
|
58
|
+
from 13 to 14. On touch "Kwame Asante", the longest name, takes two
|
|
59
|
+
lines. The floors alone come to 342 with a mouse, so at a 366
|
|
60
|
+
pixel window they exactly fit, and below it the table scrolls its
|
|
61
|
+
own box and fades whichever edge has more behind it. The last is `max-content`, since a column of numerals has one
|
|
61
62
|
right width. On the table, so a page rendered on a server is laid
|
|
62
63
|
out at these widths before the script runs. */}
|
|
63
64
|
<helix-table-column field="name" sortable>
|
|
@@ -6,7 +6,8 @@ import { DOCS } from './docs.js'
|
|
|
6
6
|
/** One message in the toast region, and what it says. */
|
|
7
7
|
interface Message {
|
|
8
8
|
readonly id: number
|
|
9
|
-
|
|
9
|
+
/** The answers, one `name=value` pair each, so a line breaks only between pairs. */
|
|
10
|
+
readonly pairs: readonly string[]
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -31,8 +32,7 @@ export function SignupForm() {
|
|
|
31
32
|
event.preventDefault()
|
|
32
33
|
const answers = [...new FormData(event.currentTarget).entries()]
|
|
33
34
|
.map(([field, value]) => `${field}=${value}`)
|
|
34
|
-
|
|
35
|
-
setMessages((sent) => [...sent, { id: Date.now(), text: answers }])
|
|
35
|
+
setMessages((sent) => [...sent, { id: Date.now(), pairs: answers }])
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
return (
|
|
@@ -117,8 +117,8 @@ export function SignupForm() {
|
|
|
117
117
|
<aside className="notes">
|
|
118
118
|
{/* The one fact you need before typing your name into a page you have
|
|
119
119
|
had for five minutes, so it is a callout. `neutral` is a note that
|
|
120
|
-
reports no status, drawn
|
|
121
|
-
|
|
120
|
+
reports no status, drawn as a tint of the muted ink with a hairline of
|
|
121
|
+
it around the box, so it stays in the palette, ink or brand. */}
|
|
122
122
|
<helix-callout tone="neutral">
|
|
123
123
|
The form posts nothing. Submit it, and a message shows exactly what a server would
|
|
124
124
|
receive.
|
|
@@ -159,7 +159,13 @@ export function SignupForm() {
|
|
|
159
159
|
>
|
|
160
160
|
<helix-flex direction="column" gap="2xs">
|
|
161
161
|
<helix-text scale="body-strong">Read by the form</helix-text>
|
|
162
|
-
<helix-
|
|
162
|
+
<helix-flex column-gap="md" wrap>
|
|
163
|
+
{message.pairs.map((pair) => (
|
|
164
|
+
<helix-text key={pair} scale="code">
|
|
165
|
+
{pair}
|
|
166
|
+
</helix-text>
|
|
167
|
+
))}
|
|
168
|
+
</helix-flex>
|
|
163
169
|
</helix-flex>
|
|
164
170
|
</helix-toast-item>
|
|
165
171
|
))}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import react from '@vitejs/plugin-react'
|
|
2
2
|
import { defineConfig } from 'vite'
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/* **The browsers that have `light-dark()`**, which every Helix color token is
|
|
5
|
+
written with. Vite's default targets reach back to Safari 16.4, so a
|
|
6
|
+
production build rewrites each `light-dark()` into a fallback that resolves
|
|
7
|
+
on the root element. A Toast then draws in the page's mode, white on a white
|
|
8
|
+
page, and so does a `data-color-mode` panel. The development server does not
|
|
9
|
+
minify CSS, so only a build shows it. Safari 18 and Firefox 128 are the
|
|
10
|
+
first with relative colors, `oklch(from ...)`, which the brand ramp is
|
|
11
|
+
built from. */
|
|
12
|
+
const cssTarget = ['chrome123', 'edge123', 'firefox128', 'safari18', 'ios18']
|
|
13
|
+
|
|
14
|
+
export default defineConfig({ build: { cssTarget }, plugins: [react()] })
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* `:root`, and every token follows it.
|
|
12
12
|
*
|
|
13
13
|
* **Color appears in two places, and both are named.** Each tile's icon takes
|
|
14
|
-
* `--helix-color-
|
|
14
|
+
* `--helix-color-brand-mark` on `--helix-color-primary-subtle`, and a chosen row
|
|
15
15
|
* takes `--helix-color-primary-subtle` through the parts the table publishes.
|
|
16
16
|
* Everywhere else the page is the foreground on the background, and the
|
|
17
17
|
* components carry their own color.
|
|
@@ -140,10 +140,46 @@ helix-app-header {
|
|
|
140
140
|
and faded out behind the words so they keep their contrast: it is at full
|
|
141
141
|
strength only behind the card, which is below the words in one column and
|
|
142
142
|
beside them in two. */
|
|
143
|
+
/*
|
|
144
|
+
* **On a light page the light is a pale sheen on the page itself.** By default
|
|
145
|
+
* an aura ramps from the page up to `primary`, which in dark is light on black.
|
|
146
|
+
* In light that ramp runs from white to a dark color, and with no brand it drew
|
|
147
|
+
* a gray smoke behind the card: at 390 the muted stat labels sat on #cccccc at
|
|
148
|
+
* 3.7:1. Turned around, from a tint up to white, it laid a #d1d1d1 slab over
|
|
149
|
+
* the end of the hero that read as a smudge. Now the ground is the page, the
|
|
150
|
+
* strands are `primary-subtle`, and their cores take a third of `primary`, so
|
|
151
|
+
* only the strokes show: at 1440 the darkest is #bebebe, 1.86:1, on a thin
|
|
152
|
+
* line, and the strip beside the card stays white where the slab covered 93%
|
|
153
|
+
* of it. A brand colors the strokes. The second half of each pair is the
|
|
154
|
+
* aura's own default, so dark is unchanged.
|
|
155
|
+
*
|
|
156
|
+
* **Side by side, the light starts at 45% of the panel's width.** From 35%, the
|
|
157
|
+
* dark plume reached the end of the lede's lines, and the lede measured 3.84:1
|
|
158
|
+
* against the brightest pixel behind it at 1440. From 45% it measures 8.9:1, and
|
|
159
|
+
* the light reaches full strength at 75%, behind the card.
|
|
160
|
+
*
|
|
161
|
+
* **In one column, the light is measured up from the bottom edge**, so it
|
|
162
|
+
* starts under the actions however the words above them wrap. From 40% of the
|
|
163
|
+
* panel's height, the bright plume passed behind "Open the form" at 390: in dark
|
|
164
|
+
* its label fell to 5.33:1 against the brightest pixel behind it, and its edge
|
|
165
|
+
* to 1.02:1, gone. The light now fades in from 14rem above the bottom, under the
|
|
166
|
+
* actions, and is at full strength from 7rem, behind the card.
|
|
167
|
+
*/
|
|
143
168
|
.first-light {
|
|
169
|
+
--aura-ground: var(--helix-color-background);
|
|
170
|
+
--aura-glow: light-dark(var(--helix-color-primary-subtle), var(--helix-color-primary));
|
|
171
|
+
--aura-haze: light-dark(
|
|
172
|
+
color-mix(in oklab, var(--helix-color-primary-subtle) 50%, var(--helix-color-background)),
|
|
173
|
+
var(--helix-color-primary-subtle)
|
|
174
|
+
);
|
|
175
|
+
--aura-peak: light-dark(
|
|
176
|
+
color-mix(in oklab, var(--helix-color-primary) 34%, var(--helix-color-primary-subtle)),
|
|
177
|
+
var(--helix-color-foreground)
|
|
178
|
+
);
|
|
179
|
+
|
|
144
180
|
block-size: auto;
|
|
145
181
|
inset: 0;
|
|
146
|
-
mask-image: linear-gradient(to
|
|
182
|
+
mask-image: linear-gradient(to top, black 7rem, transparent 14rem);
|
|
147
183
|
pointer-events: none;
|
|
148
184
|
position: absolute;
|
|
149
185
|
z-index: var(--helix-layer-beneath);
|
|
@@ -151,10 +187,18 @@ helix-app-header {
|
|
|
151
187
|
|
|
152
188
|
@media (width >= 60rem) {
|
|
153
189
|
.first-light {
|
|
154
|
-
mask-image: linear-gradient(to right, transparent
|
|
190
|
+
mask-image: linear-gradient(to right, transparent 45%, black 75%);
|
|
155
191
|
}
|
|
156
192
|
}
|
|
157
193
|
|
|
194
|
+
/* **The pause control lines up with the card's trailing edge**, at the panel's
|
|
195
|
+
inline padding, where the aura's own corner put it 12 pixels from the
|
|
196
|
+
panel's edge. At 390 that left it 12 pixels past the card's edge and 4 under
|
|
197
|
+
the card, and its 44-pixel press box overlapped the card by 2. */
|
|
198
|
+
.first-light::part(pause) {
|
|
199
|
+
inset-inline-end: var(--helix-space-2xl);
|
|
200
|
+
}
|
|
201
|
+
|
|
158
202
|
/* A heading and the lines around it are one block, with a smaller gap than the
|
|
159
203
|
one between blocks. Every route opens with one. */
|
|
160
204
|
.hero {
|
|
@@ -164,11 +208,17 @@ helix-app-header {
|
|
|
164
208
|
}
|
|
165
209
|
|
|
166
210
|
/* The first screen's heading takes more room around it than a route's, and
|
|
167
|
-
its lede a step more size
|
|
211
|
+
its lede a step more size. Both wrap to even lines where they wrap. Balance
|
|
212
|
+
cannot split three words evenly, so on a phone the heading takes a smaller
|
|
213
|
+
size, below. */
|
|
168
214
|
.first-screen .hero {
|
|
169
215
|
gap: var(--helix-space-md);
|
|
170
216
|
}
|
|
171
217
|
|
|
218
|
+
.first-screen .hero > [as="h1"] {
|
|
219
|
+
text-wrap: balance;
|
|
220
|
+
}
|
|
221
|
+
|
|
172
222
|
.first-screen .lede {
|
|
173
223
|
font-size: var(--helix-text-lg);
|
|
174
224
|
text-wrap: balance;
|
|
@@ -224,12 +274,14 @@ helix-app-header {
|
|
|
224
274
|
block-size: 100%;
|
|
225
275
|
}
|
|
226
276
|
|
|
227
|
-
/* Each tile's icon, on a tint of the brand.
|
|
277
|
+
/* Each tile's icon, on a tint of the brand. The icon is a graphic, so it takes
|
|
278
|
+
`brand-mark`, the brand as a graphic: a graphic needs 3:1 where text needs
|
|
279
|
+
4.5:1, so a theme can set it nearer the color you chose than `primary`. */
|
|
228
280
|
.feature-mark {
|
|
229
281
|
--icon-size: 1.25rem;
|
|
230
282
|
background-color: var(--helix-color-primary-subtle);
|
|
231
283
|
border-radius: var(--helix-radii-md);
|
|
232
|
-
color: var(--helix-color-
|
|
284
|
+
color: var(--helix-color-brand-mark);
|
|
233
285
|
display: inline-flex;
|
|
234
286
|
inline-size: fit-content;
|
|
235
287
|
padding: var(--helix-space-xs);
|
|
@@ -280,9 +332,17 @@ helix-app-header {
|
|
|
280
332
|
|
|
281
333
|
/* The callout takes the column, which `start` above would otherwise size to its
|
|
282
334
|
own words: a notice narrower than the paragraph under it reads as a stray. The
|
|
283
|
-
link beside it is meant to be its own width.
|
|
335
|
+
link beside it is meant to be its own width.
|
|
336
|
+
|
|
337
|
+
**The notes' text size, and a step more room under it.** A callout draws at
|
|
338
|
+
the control size, 13px, which beside the notes' 14px read as a smaller voice
|
|
339
|
+
for the one fact that matters. And at the column's 12px gap the heading sat as
|
|
340
|
+
close to the callout as to its own paragraph, so it belonged to neither; 24px
|
|
341
|
+
above it and 12 below tie it to what it heads. */
|
|
284
342
|
.notes > helix-callout {
|
|
343
|
+
--callout-font-size: var(--helix-text-md);
|
|
285
344
|
inline-size: 100%;
|
|
345
|
+
margin-block-end: var(--helix-space-sm);
|
|
286
346
|
}
|
|
287
347
|
|
|
288
348
|
/*
|
|
@@ -310,17 +370,66 @@ helix-app-header {
|
|
|
310
370
|
display: flex;
|
|
311
371
|
flex-wrap: wrap;
|
|
312
372
|
gap: var(--helix-space-md);
|
|
373
|
+
/* Wide enough on a touch screen for the press areas below to meet without
|
|
374
|
+
overlapping, where the links wrap onto a second row. */
|
|
375
|
+
row-gap: max(var(--helix-space-md), calc(var(--helix-size-target) - 1lh));
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/*
|
|
379
|
+
* **A link reaches the touch target in a transparent box**, as Helix's own row
|
|
380
|
+
* of destinations does, so nothing drawn moves. On a 390 phone the wordmark and
|
|
381
|
+
* the footer links were 21 pixels tall and "React" 37 wide, against a 44-pixel
|
|
382
|
+
* target. The box grows only on the axis the link is short on, into the bar's
|
|
383
|
+
* padding and the gap between links, and `--helix-size-target` is 44 only on a
|
|
384
|
+
* coarse pointer.
|
|
385
|
+
*/
|
|
386
|
+
.wordmark,
|
|
387
|
+
.footer-links a {
|
|
388
|
+
position: relative;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.wordmark::after,
|
|
392
|
+
.footer-links a::after {
|
|
393
|
+
content: "";
|
|
394
|
+
inset-block: min(0px, calc((100% - var(--helix-size-target)) / 2));
|
|
395
|
+
inset-inline: min(0px, calc((100% - var(--helix-size-target)) / 2));
|
|
396
|
+
position: absolute;
|
|
313
397
|
}
|
|
314
398
|
|
|
315
399
|
/*
|
|
316
400
|
* **Narrow, the gutter gives first.** 24 pixels either side of a 390 window
|
|
317
|
-
* spend 48 of 390 on margin, and the table needs 355 of what is left. At `
|
|
318
|
-
*
|
|
319
|
-
*
|
|
401
|
+
* spend 48 of 390 on margin, and the table needs 355 of what is left. At `lg`
|
|
402
|
+
* it was 13 pixels short, and the last column sat outside the box until you
|
|
403
|
+
* scrolled the table sideways. At `md`, 16, the table has 358 and every row
|
|
404
|
+
* holds one line, 40 under a mouse and 45 on a touch screen, in Chromium and
|
|
405
|
+
* WebKit alike. The header, the page, and the footer keep one edge.
|
|
320
406
|
*/
|
|
321
407
|
@media (width < 40rem) {
|
|
408
|
+
/* **Room under the card for the pause control**: the control, and a 12-pixel
|
|
409
|
+
gap on each side of it. The panel's 48 put the control 4 pixels under the
|
|
410
|
+
card. */
|
|
322
411
|
.first-screen {
|
|
323
|
-
padding: var(--helix-space-2xl) var(--helix-space-lg)
|
|
412
|
+
padding: var(--helix-space-2xl) var(--helix-space-lg)
|
|
413
|
+
calc(var(--helix-size-control-sm) + var(--helix-space-sm) * 2);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.first-light::part(pause) {
|
|
417
|
+
inset-inline-end: var(--helix-space-lg);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/* **The heading a step down, so it is one line at 390.** At the display
|
|
421
|
+
size, 42px, "Helix design system" is 370 pixels wide in a 316 pixel
|
|
422
|
+
column, and balance broke it as "Helix design" over a lone "system". At
|
|
423
|
+
`2xl`, 32px, it is 282 pixels wide. Narrower than that, it balances again. */
|
|
424
|
+
.first-screen .hero > [as="h1"] {
|
|
425
|
+
--text-font-size: var(--helix-text-2xl);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/* One step less between blocks, as the gutter gives: 64 pixels between the
|
|
429
|
+
first screen and the section under it was more than a phone screen's
|
|
430
|
+
blocks need, so the page reads 48. */
|
|
431
|
+
.stack {
|
|
432
|
+
gap: var(--helix-space-2xl);
|
|
324
433
|
}
|
|
325
434
|
|
|
326
435
|
.page {
|
|
@@ -26,8 +26,10 @@ export function Landing() {
|
|
|
26
26
|
{/* **The light behind the first screen**: a helix, drawn by the library
|
|
27
27
|
in the theme's colors, so a new brand color relights it. It shows
|
|
28
28
|
one still frame where motion is reduced, and a gradient where the
|
|
29
|
-
browser draws without a GPU.
|
|
30
|
-
|
|
29
|
+
browser draws without a GPU. `pause-control` draws a button in
|
|
30
|
+
its corner that stops the motion and starts it again, since the
|
|
31
|
+
light moves for longer than five seconds. */}
|
|
32
|
+
<helix-aura class="first-light" speed={0.4} terminus={0.8} pattern="braid" pause-control />
|
|
31
33
|
<div class="hero">
|
|
32
34
|
<helix-tag emphasis="subtle" tone="primary">
|
|
33
35
|
Starter
|
|
@@ -36,7 +36,7 @@ export function Overview() {
|
|
|
36
36
|
|
|
37
37
|
<section class="section">
|
|
38
38
|
<helix-data-table
|
|
39
|
-
columns="minmax(5.5rem, 1.6fr) minmax(4.
|
|
39
|
+
columns="minmax(5.5rem, 1.6fr) minmax(4.75rem, 1fr) minmax(4.25rem, 1fr) max-content"
|
|
40
40
|
default-sort="name:asc"
|
|
41
41
|
label="Roster"
|
|
42
42
|
page-size={6}
|
|
@@ -5,7 +5,8 @@ import { DOCS } from './docs.ts'
|
|
|
5
5
|
/** One message in the toast region, and what it says. */
|
|
6
6
|
interface Message {
|
|
7
7
|
readonly id: number
|
|
8
|
-
|
|
8
|
+
/** The answers, one `name=value` pair each, so a line breaks only between pairs. */
|
|
9
|
+
readonly pairs: readonly string[]
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
/**
|
|
@@ -30,8 +31,7 @@ export function SignupForm() {
|
|
|
30
31
|
event.preventDefault()
|
|
31
32
|
const answers = [...new FormData(event.currentTarget).entries()]
|
|
32
33
|
.map(([field, value]) => `${field}=${value}`)
|
|
33
|
-
|
|
34
|
-
setMessages((sent) => [...sent, { id: Date.now(), text: answers }])
|
|
34
|
+
setMessages((sent) => [...sent, { id: Date.now(), pairs: answers }])
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
return (
|
|
@@ -99,8 +99,8 @@ export function SignupForm() {
|
|
|
99
99
|
<aside class="notes">
|
|
100
100
|
{/* The one fact you need before typing your name into a page you have
|
|
101
101
|
had for five minutes, so it is a callout. `neutral` is a note that
|
|
102
|
-
reports no status, drawn
|
|
103
|
-
|
|
102
|
+
reports no status, drawn as a tint of the muted ink with a hairline of
|
|
103
|
+
it around the box, so it stays in the palette, ink or brand. */}
|
|
104
104
|
<helix-callout tone="neutral">
|
|
105
105
|
The form posts nothing. Submit it, and a message shows exactly what a server would
|
|
106
106
|
receive.
|
|
@@ -140,7 +140,9 @@ export function SignupForm() {
|
|
|
140
140
|
>
|
|
141
141
|
<helix-flex direction="column" gap="2xs">
|
|
142
142
|
<helix-text scale="body-strong">Read by the form</helix-text>
|
|
143
|
-
<helix-
|
|
143
|
+
<helix-flex column-gap="md" wrap>
|
|
144
|
+
<For each={message.pairs}>{(pair) => <helix-text scale="code">{pair}</helix-text>}</For>
|
|
145
|
+
</helix-flex>
|
|
144
146
|
</helix-flex>
|
|
145
147
|
</helix-toast-item>
|
|
146
148
|
)}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { defineConfig } from 'vite'
|
|
2
2
|
import solid from 'vite-plugin-solid'
|
|
3
3
|
|
|
4
|
+
/* **The browsers that have `light-dark()`**, which every Helix color token is
|
|
5
|
+
written with. Vite's default targets reach back to Safari 16.4, so a
|
|
6
|
+
production build rewrites each `light-dark()` into a fallback that resolves
|
|
7
|
+
on the root element. A Toast then draws in the page's mode, white on a white
|
|
8
|
+
page, and so does a `data-color-mode` panel. The development server does not
|
|
9
|
+
minify CSS, so only a build shows it. Safari 18 and Firefox 128 are the
|
|
10
|
+
first with relative colors, `oklch(from ...)`, which the brand ramp is
|
|
11
|
+
built from. */
|
|
12
|
+
const cssTarget = ['chrome123', 'edge123', 'firefox128', 'safari18', 'ios18']
|
|
13
|
+
|
|
4
14
|
/* Solid needs no setting for custom elements: it sets a property on one by
|
|
5
15
|
default, `attr:` forces an attribute, and `on:` binds an event by its own
|
|
6
16
|
name. */
|
|
7
|
-
export default defineConfig({ plugins: [solid()] })
|
|
17
|
+
export default defineConfig({ build: { cssTarget }, plugins: [solid()] })
|
|
@@ -24,8 +24,10 @@
|
|
|
24
24
|
<!-- **The light behind the first screen**: a helix, drawn by the library in
|
|
25
25
|
the theme's colors, so a new brand color relights it. It shows one still
|
|
26
26
|
frame where motion is reduced, and a gradient where the browser draws
|
|
27
|
-
without a GPU.
|
|
28
|
-
|
|
27
|
+
without a GPU. `pause-control` draws a button in its corner that stops
|
|
28
|
+
the motion and starts it again, since the light moves for longer than
|
|
29
|
+
five seconds. -->
|
|
30
|
+
<helix-aura class="first-light" speed={0.4} terminus={0.8} pattern="braid" pause-control></helix-aura>
|
|
29
31
|
<div class="hero">
|
|
30
32
|
<helix-tag emphasis="subtle" tone="primary">Starter</helix-tag>
|
|
31
33
|
<helix-text as="h1" scale="display">Helix design system</helix-text>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
<section class="section">
|
|
28
28
|
<helix-data-table
|
|
29
|
-
columns="minmax(5.5rem, 1.6fr) minmax(4.
|
|
29
|
+
columns="minmax(5.5rem, 1.6fr) minmax(4.75rem, 1fr) minmax(4.25rem, 1fr) max-content"
|
|
30
30
|
default-sort="name:asc"
|
|
31
31
|
label="Roster"
|
|
32
32
|
page-size={6}
|