@fusion.dev/helix-templates 0.139.0 → 0.141.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/dist/index.js +6 -6
- package/package.json +1 -1
- package/templates/angular/src/app/data.ts +17 -17
- package/templates/angular/src/app/docs.ts +9 -9
- package/templates/angular/src/app/landing.html +39 -74
- package/templates/angular/src/app/landing.ts +0 -2
- package/templates/angular/src/app/overview.html +2 -2
- package/templates/angular/src/app/pathname.ts +1 -1
- package/templates/angular/src/app/signup-form.html +13 -14
- package/templates/angular/src/app/site-footer.html +3 -6
- package/templates/angular/src/app/site-footer.ts +2 -2
- package/templates/angular/src/app/site-header.html +3 -6
- package/templates/angular/src/app/site-header.ts +2 -3
- package/templates/angular/src/app.css +151 -158
- package/templates/react-nextjs/app/app.css +151 -158
- package/templates/react-nextjs/app/data.ts +17 -17
- package/templates/react-nextjs/app/docs.ts +9 -9
- package/templates/react-nextjs/app/landing.tsx +66 -128
- package/templates/react-nextjs/app/overview.tsx +24 -26
- package/templates/react-nextjs/app/signup-form.tsx +36 -40
- package/templates/react-nextjs/app/site-footer.tsx +9 -15
- package/templates/react-nextjs/app/site-header.tsx +18 -26
- package/templates/react-nextjs/helix-jsx.d.ts +5 -7
- package/templates/react-nextjs/tsconfig.json +4 -1
- package/templates/react-vite/helix-jsx.d.ts +5 -7
- package/templates/react-vite/src/app.css +151 -158
- package/templates/react-vite/src/data.ts +17 -17
- package/templates/react-vite/src/docs.ts +9 -9
- package/templates/react-vite/src/landing.tsx +66 -128
- package/templates/react-vite/src/overview.tsx +24 -26
- package/templates/react-vite/src/routes.tsx +11 -13
- package/templates/react-vite/src/signup-form.tsx +36 -40
- package/templates/react-vite/src/site-footer.tsx +9 -15
- package/templates/react-vite/src/site-header.tsx +16 -24
- package/templates/solid-vite/src/app.css +151 -158
- package/templates/solid-vite/src/data.ts +17 -17
- package/templates/solid-vite/src/docs.ts +9 -9
- package/templates/solid-vite/src/landing.tsx +54 -105
- package/templates/solid-vite/src/overview.tsx +2 -2
- package/templates/solid-vite/src/routes.ts +6 -6
- package/templates/solid-vite/src/signup-form.tsx +14 -14
- package/templates/solid-vite/src/site-footer.tsx +5 -8
- package/templates/solid-vite/src/site-header.tsx +5 -9
- package/templates/svelte-vite/src/Landing.svelte +39 -76
- package/templates/svelte-vite/src/Overview.svelte +2 -2
- package/templates/svelte-vite/src/SignupForm.svelte +13 -14
- package/templates/svelte-vite/src/SiteFooter.svelte +5 -8
- package/templates/svelte-vite/src/SiteHeader.svelte +5 -8
- package/templates/svelte-vite/src/app.css +151 -158
- package/templates/svelte-vite/src/data.ts +17 -17
- package/templates/svelte-vite/src/docs.ts +9 -9
- package/templates/svelte-vite/src/routes.svelte.ts +5 -5
- package/templates/vue-vite/src/LandingPage.vue +39 -76
- package/templates/vue-vite/src/OverviewPage.vue +2 -2
- package/templates/vue-vite/src/SignupForm.vue +14 -14
- package/templates/vue-vite/src/SiteFooter.vue +5 -8
- package/templates/vue-vite/src/SiteHeader.vue +5 -9
- package/templates/vue-vite/src/app.css +151 -158
- package/templates/vue-vite/src/data.ts +17 -17
- package/templates/vue-vite/src/docs.ts +9 -9
- package/templates/vue-vite/src/routes.ts +6 -6
- package/templates.json +4 -10
|
@@ -14,8 +14,6 @@ const figure = new Intl.NumberFormat('en-US')
|
|
|
14
14
|
Delete it once you know your way around: nothing else imports it, and the
|
|
15
15
|
route it answers becomes yours.
|
|
16
16
|
|
|
17
|
-
**The heading says what this is, and the project's name stays in the bar.**
|
|
18
|
-
|
|
19
17
|
**The calls to action are anchors.** A button that navigates is a link
|
|
20
18
|
dressed as a button, and the two are different things to a keyboard and to
|
|
21
19
|
a screen reader. The base stylesheet styles an anchor that asks with
|
|
@@ -24,13 +22,16 @@ const figure = new Intl.NumberFormat('en-US')
|
|
|
24
22
|
<template>
|
|
25
23
|
<div class="stack">
|
|
26
24
|
<header class="first-screen">
|
|
25
|
+
<!-- **The light behind the first screen**: a helix, drawn by the library in
|
|
26
|
+
the theme's colors, so a new brand color relights it. It shows one still
|
|
27
|
+
frame where motion is reduced, and a gradient where the browser draws
|
|
28
|
+
without a GPU. -->
|
|
29
|
+
<helix-aura class="first-light" data-layer :speed="0.4" :terminus="0.8" variant="braid" />
|
|
27
30
|
<div class="hero">
|
|
28
|
-
<helix-
|
|
29
|
-
<helix-text as="h1">
|
|
30
|
-
<helix-text as="p" class="lede"
|
|
31
|
-
|
|
32
|
-
size and space inside them comes from one set of tokens. Three routes are laid down, and
|
|
33
|
-
all of them are yours.
|
|
31
|
+
<helix-tag emphasis="subtle" tone="primary">Starter</helix-tag>
|
|
32
|
+
<helix-text as="h1" variant="display">Helix design system</helix-text>
|
|
33
|
+
<helix-text as="p" class="lede" variant="body">
|
|
34
|
+
Web components in your brand's colors, drawn from one set of tokens.
|
|
34
35
|
</helix-text>
|
|
35
36
|
<div class="actions">
|
|
36
37
|
<a data-button="solid" data-button-tone="primary" href="#/overview">See the data view</a>
|
|
@@ -38,12 +39,13 @@ const figure = new Intl.NumberFormat('en-US')
|
|
|
38
39
|
</div>
|
|
39
40
|
</div>
|
|
40
41
|
|
|
41
|
-
<!-- The
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<helix-
|
|
42
|
+
<!-- **The library at work, on the first screen.** The figures are the
|
|
43
|
+
roster the data view draws, read from the same module, so the panel
|
|
44
|
+
is the app itself, on glass over the light. It has no link of its own:
|
|
45
|
+
the button beside it goes to the same page. -->
|
|
46
|
+
<helix-card class="specimen" material="glass" separation="outlined">
|
|
47
|
+
<helix-text as="h2" slot="header" variant="title">Roster</helix-text>
|
|
48
|
+
<helix-stat-group>
|
|
47
49
|
<helix-stat>
|
|
48
50
|
{{ roster.people }}
|
|
49
51
|
<span slot="label">People</span>
|
|
@@ -57,83 +59,44 @@ const figure = new Intl.NumberFormat('en-US')
|
|
|
57
59
|
<span slot="label">Reviews</span>
|
|
58
60
|
</helix-stat>
|
|
59
61
|
</helix-stat-group>
|
|
60
|
-
<a data-link href="#/overview" slot="footer">Open the data view</a>
|
|
61
62
|
</helix-card>
|
|
62
63
|
</header>
|
|
63
64
|
|
|
64
65
|
<section class="section">
|
|
65
66
|
<helix-text as="h2" variant="subheading">What you have</helix-text>
|
|
66
|
-
<!--
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
They are custom elements, so you write the tags and there is no per-component import
|
|
73
|
-
to keep in step. One line in <helix-code>src/main.ts</helix-code> registers all of
|
|
74
|
-
them, and a subpath like <helix-code>@fusion.dev/helix/tabs</helix-code> registers
|
|
75
|
-
one.
|
|
76
|
-
</helix-text>
|
|
77
|
-
<a data-link :href="DOCS.elements">Using the elements</a>
|
|
78
|
-
</article>
|
|
79
|
-
|
|
80
|
-
<article class="fact">
|
|
81
|
-
<helix-text as="h3" variant="title">One set of tokens</helix-text>
|
|
82
|
-
<helix-text as="p" emphasis="muted" variant="body">
|
|
83
|
-
Every color is written once as a light and dark pair, so the control in the bar moves
|
|
84
|
-
the whole page by setting a single attribute on the root. Type, spacing, radii and
|
|
85
|
-
control sizes come from the same place.
|
|
86
|
-
</helix-text>
|
|
87
|
-
<a data-link :href="DOCS.tokens">Tokens</a>
|
|
88
|
-
</article>
|
|
89
|
-
|
|
90
|
-
<article class="fact">
|
|
91
|
-
<helix-text as="h3" variant="title">A short stylesheet</helix-text>
|
|
92
|
-
<helix-text as="p" emphasis="muted" variant="body">
|
|
93
|
-
<helix-code>src/app.css</helix-code> holds this page's measure, the rhythm between its
|
|
94
|
-
blocks, and nothing a component already draws. Where a component leaves a decision
|
|
95
|
-
open it names a part: the data view reaches one to paint the row you tick.
|
|
96
|
-
</helix-text>
|
|
97
|
-
<a data-link :href="DOCS.parts">Overriding a component</a>
|
|
98
|
-
</article>
|
|
99
|
-
</div>
|
|
100
|
-
</section>
|
|
101
|
-
|
|
102
|
-
<section class="section">
|
|
103
|
-
<helix-text as="h2" variant="subheading">Where to go next</helix-text>
|
|
104
|
-
<!-- **The whole card is the link, which is what `data-card` is for.** The
|
|
105
|
-
base layer draws the ring, moves the card's border to the brand on
|
|
106
|
-
hover, and leaves focus alone. Nothing inside may be interactive,
|
|
107
|
-
since a link inside a link is neither valid nor reachable. -->
|
|
108
|
-
<helix-grid :columns="2" gap="md">
|
|
109
|
-
<a data-card href="#/overview">
|
|
67
|
+
<!-- **Each tile is a link, which is what `data-card` is for.** The base layer
|
|
68
|
+
draws the ring, moves the card's border to the brand on hover, and leaves
|
|
69
|
+
focus alone. Nothing inside may be interactive, since a link inside a link
|
|
70
|
+
is neither valid nor reachable. -->
|
|
71
|
+
<div class="features">
|
|
72
|
+
<a class="feature" data-card :href="DOCS.elements">
|
|
110
73
|
<helix-card separation="outlined">
|
|
111
|
-
<
|
|
112
|
-
|
|
113
|
-
<helix-text emphasis="subtle" variant="code">/overview</helix-text>
|
|
114
|
-
</helix-flex>
|
|
74
|
+
<span class="feature-mark"><helix-icon name="cube" /></span>
|
|
75
|
+
<helix-text as="h3" variant="title">Custom elements</helix-text>
|
|
115
76
|
<helix-text as="p" emphasis="muted" variant="body">
|
|
116
|
-
|
|
117
|
-
The columns are markup you can read and the rows are one property, which is what
|
|
118
|
-
keeps the same component working at ten thousand.
|
|
77
|
+
One import in <helix-code>src/main.ts</helix-code> registers every tag.
|
|
119
78
|
</helix-text>
|
|
120
79
|
</helix-card>
|
|
121
80
|
</a>
|
|
122
|
-
|
|
123
|
-
<a data-card href="#/join">
|
|
81
|
+
<a class="feature" data-card :href="DOCS.tokens">
|
|
124
82
|
<helix-card separation="outlined">
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
<helix-text emphasis="subtle" variant="code">/join</helix-text>
|
|
128
|
-
</helix-flex>
|
|
83
|
+
<span class="feature-mark"><helix-icon name="palette" /></span>
|
|
84
|
+
<helix-text as="h3" variant="title">One set of tokens</helix-text>
|
|
129
85
|
<helix-text as="p" emphasis="muted" variant="body">
|
|
130
|
-
|
|
131
|
-
<helix-code>FormData</helix-code>, because every one of them is a real form
|
|
132
|
-
participant. The email field's complaint is the browser's own.
|
|
86
|
+
Every color, size, and space, in light and dark.
|
|
133
87
|
</helix-text>
|
|
134
88
|
</helix-card>
|
|
135
89
|
</a>
|
|
136
|
-
|
|
90
|
+
<a class="feature" data-card :href="DOCS.parts">
|
|
91
|
+
<helix-card separation="outlined">
|
|
92
|
+
<span class="feature-mark"><helix-icon name="sliders-horizontal" /></span>
|
|
93
|
+
<helix-text as="h3" variant="title">Parts to style</helix-text>
|
|
94
|
+
<helix-text as="p" emphasis="muted" variant="body">
|
|
95
|
+
Reach inside a component with <helix-code>::part()</helix-code>.
|
|
96
|
+
</helix-text>
|
|
97
|
+
</helix-card>
|
|
98
|
+
</a>
|
|
99
|
+
</div>
|
|
137
100
|
</section>
|
|
138
101
|
</div>
|
|
139
102
|
</template>
|
|
@@ -60,8 +60,8 @@ import { DOCS } from './docs.ts'
|
|
|
60
60
|
|
|
61
61
|
<!-- A footnote to the table, so it takes the section's gap. -->
|
|
62
62
|
<helix-text as="p" emphasis="muted" variant="caption">
|
|
63
|
-
Filtering, column reordering, resizing, virtualized rows and a server mode
|
|
64
|
-
|
|
63
|
+
Filtering, column reordering, resizing, virtualized rows, and a server mode for large
|
|
64
|
+
results are on
|
|
65
65
|
<a data-link :href="DOCS.table">the component's own page</a>.
|
|
66
66
|
</helix-text>
|
|
67
67
|
</section>
|
|
@@ -72,8 +72,8 @@ const dismiss = (id: number) => {
|
|
|
72
72
|
<helix-input autocomplete="name" label="Name" name="name" required />
|
|
73
73
|
|
|
74
74
|
<!-- Validation is the platform's: `type` and `required` are set on the
|
|
75
|
-
real input inside, and its own message shows once the
|
|
76
|
-
touched
|
|
75
|
+
real input inside, and its own message shows once the field has been
|
|
76
|
+
touched. Set `feedback` to say it in your own words. -->
|
|
77
77
|
<helix-input
|
|
78
78
|
hint="Where we send the welcome note."
|
|
79
79
|
label="Email"
|
|
@@ -105,22 +105,22 @@ const dismiss = (id: number) => {
|
|
|
105
105
|
|
|
106
106
|
<aside class="notes">
|
|
107
107
|
<!-- The one fact you need before typing your name into a page you have
|
|
108
|
-
had for five minutes, so it is a callout. `
|
|
109
|
-
|
|
110
|
-
start, so it
|
|
111
|
-
<helix-callout tone="
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
had for five minutes, so it is a callout. `neutral` is a note that
|
|
109
|
+
reports no status, drawn in the muted ink with a bar on the inline
|
|
110
|
+
start, so it stays in the palette, ink or brand. -->
|
|
111
|
+
<helix-callout tone="neutral">
|
|
112
|
+
The form posts nothing. Submit it, and a message shows exactly what a server would
|
|
113
|
+
receive.
|
|
114
114
|
</helix-callout>
|
|
115
|
-
<helix-text as="h2" variant="title">What
|
|
115
|
+
<helix-text as="h2" variant="title">What the form shows</helix-text>
|
|
116
116
|
<helix-text as="p" emphasis="muted" variant="body">
|
|
117
|
-
Every control is a form-associated custom element, so the submit reads them with
|
|
118
|
-
<helix-code>new FormData(form)</helix-code
|
|
119
|
-
|
|
117
|
+
Every control is a form-associated custom element, so the submit reads them all with
|
|
118
|
+
<helix-code>new FormData(form)</helix-code>. Reset the form and they all go back,
|
|
119
|
+
the way an <helix-code>input</helix-code> does.
|
|
120
120
|
</helix-text>
|
|
121
121
|
<helix-text as="p" emphasis="muted" variant="body">
|
|
122
|
-
Leave the email wrong and the
|
|
123
|
-
|
|
122
|
+
Leave the email wrong and the browser shows its own message, in your language. Handle is
|
|
123
|
+
the controlled field: the page refuses each change and writes back a cleaned value.
|
|
124
124
|
</helix-text>
|
|
125
125
|
<a data-link :href="DOCS.forms">Forms</a>
|
|
126
126
|
</aside>
|
|
@@ -9,19 +9,16 @@ import { DOCS } from './docs.ts'
|
|
|
9
9
|
and a caption, which on a tall window left the bottom third of the screen
|
|
10
10
|
empty. The footer is also where the links you want once belong.
|
|
11
11
|
|
|
12
|
-
`data-link="
|
|
13
|
-
row of links under a rule.
|
|
12
|
+
`data-link="quiet"` sets a link in the muted ink with no underline, and it
|
|
13
|
+
takes the foreground on hover, which suits a row of links under a rule.
|
|
14
14
|
-->
|
|
15
15
|
<template>
|
|
16
16
|
<footer class="site-footer">
|
|
17
17
|
<div class="footer-row">
|
|
18
|
-
<helix-text as="p" emphasis="subtle" variant="caption">
|
|
19
|
-
Every component in here, with its API, its parts and its examples, has a page.
|
|
20
|
-
</helix-text>
|
|
21
18
|
<div class="footer-links">
|
|
22
|
-
<a data-link="
|
|
23
|
-
<a data-link="
|
|
24
|
-
<a data-link="
|
|
19
|
+
<a data-link="quiet" :href="DOCS.gallery">Components</a>
|
|
20
|
+
<a data-link="quiet" :href="DOCS.elements">Documentation</a>
|
|
21
|
+
<a data-link="quiet" :href="DOCS.vue">Vue</a>
|
|
25
22
|
</div>
|
|
26
23
|
</div>
|
|
27
24
|
</footer>
|
|
@@ -11,8 +11,7 @@ type Mode = (typeof MODES)[number]
|
|
|
11
11
|
const MARKS: Record<Mode, string> = { dark: 'moon', light: 'sun', system: 'monitor' }
|
|
12
12
|
|
|
13
13
|
const path = usePathname()
|
|
14
|
-
/* `system` is the resting state,
|
|
15
|
-
after the reader first touches it. */
|
|
14
|
+
/* `system` is the resting state, the mode the page follows until the control is pressed. */
|
|
16
15
|
const mode = ref<Mode>('system')
|
|
17
16
|
|
|
18
17
|
/**
|
|
@@ -24,7 +23,7 @@ const mode = ref<Mode>('system')
|
|
|
24
23
|
* panel for a light preview inside a dark page.
|
|
25
24
|
*
|
|
26
25
|
* `system` removes the attribute. Writing out whichever mode is current would
|
|
27
|
-
*
|
|
26
|
+
* hold the page there when the system's own setting changed.
|
|
28
27
|
*/
|
|
29
28
|
const cycle = () => {
|
|
30
29
|
const next = MODES[(MODES.indexOf(mode.value) + 1) % MODES.length] ?? 'system'
|
|
@@ -41,13 +40,10 @@ const cycle = () => {
|
|
|
41
40
|
<template>
|
|
42
41
|
<helix-app-header material="glass" sticky>
|
|
43
42
|
<!-- The wordmark is the way back to the first page, so there is no third
|
|
44
|
-
destination in the bar saying the same thing. It
|
|
45
|
-
|
|
46
|
-
drawn in `--helix-color-brand-mark`, the token for the brand as a
|
|
47
|
-
graphic. -->
|
|
43
|
+
destination in the bar saying the same thing. It names the library the
|
|
44
|
+
starter is built on, and it is the place for your own name or logo. -->
|
|
48
45
|
<a class="wordmark" data-link="quiet" href="#/" slot="start">
|
|
49
|
-
<helix-
|
|
50
|
-
<helix-text variant="body-strong">__PROJECT_NAME__</helix-text>
|
|
46
|
+
<helix-text variant="body-strong">Helix</helix-text>
|
|
51
47
|
</a>
|
|
52
48
|
|
|
53
49
|
<!-- The links are yours. Navigation owns the marker that travels between
|