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