@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.
Files changed (62) hide show
  1. package/dist/index.js +6 -6
  2. package/package.json +1 -1
  3. package/templates/angular/src/app/data.ts +17 -17
  4. package/templates/angular/src/app/docs.ts +9 -9
  5. package/templates/angular/src/app/landing.html +39 -74
  6. package/templates/angular/src/app/landing.ts +0 -2
  7. package/templates/angular/src/app/overview.html +2 -2
  8. package/templates/angular/src/app/pathname.ts +1 -1
  9. package/templates/angular/src/app/signup-form.html +13 -14
  10. package/templates/angular/src/app/site-footer.html +3 -6
  11. package/templates/angular/src/app/site-footer.ts +2 -2
  12. package/templates/angular/src/app/site-header.html +3 -6
  13. package/templates/angular/src/app/site-header.ts +2 -3
  14. package/templates/angular/src/app.css +151 -158
  15. package/templates/react-nextjs/app/app.css +151 -158
  16. package/templates/react-nextjs/app/data.ts +17 -17
  17. package/templates/react-nextjs/app/docs.ts +9 -9
  18. package/templates/react-nextjs/app/landing.tsx +66 -128
  19. package/templates/react-nextjs/app/overview.tsx +24 -26
  20. package/templates/react-nextjs/app/signup-form.tsx +36 -40
  21. package/templates/react-nextjs/app/site-footer.tsx +9 -15
  22. package/templates/react-nextjs/app/site-header.tsx +18 -26
  23. package/templates/react-nextjs/helix-jsx.d.ts +5 -7
  24. package/templates/react-nextjs/tsconfig.json +4 -1
  25. package/templates/react-vite/helix-jsx.d.ts +5 -7
  26. package/templates/react-vite/src/app.css +151 -158
  27. package/templates/react-vite/src/data.ts +17 -17
  28. package/templates/react-vite/src/docs.ts +9 -9
  29. package/templates/react-vite/src/landing.tsx +66 -128
  30. package/templates/react-vite/src/overview.tsx +24 -26
  31. package/templates/react-vite/src/routes.tsx +11 -13
  32. package/templates/react-vite/src/signup-form.tsx +36 -40
  33. package/templates/react-vite/src/site-footer.tsx +9 -15
  34. package/templates/react-vite/src/site-header.tsx +16 -24
  35. package/templates/solid-vite/src/app.css +151 -158
  36. package/templates/solid-vite/src/data.ts +17 -17
  37. package/templates/solid-vite/src/docs.ts +9 -9
  38. package/templates/solid-vite/src/landing.tsx +54 -105
  39. package/templates/solid-vite/src/overview.tsx +2 -2
  40. package/templates/solid-vite/src/routes.ts +6 -6
  41. package/templates/solid-vite/src/signup-form.tsx +14 -14
  42. package/templates/solid-vite/src/site-footer.tsx +5 -8
  43. package/templates/solid-vite/src/site-header.tsx +5 -9
  44. package/templates/svelte-vite/src/Landing.svelte +39 -76
  45. package/templates/svelte-vite/src/Overview.svelte +2 -2
  46. package/templates/svelte-vite/src/SignupForm.svelte +13 -14
  47. package/templates/svelte-vite/src/SiteFooter.svelte +5 -8
  48. package/templates/svelte-vite/src/SiteHeader.svelte +5 -8
  49. package/templates/svelte-vite/src/app.css +151 -158
  50. package/templates/svelte-vite/src/data.ts +17 -17
  51. package/templates/svelte-vite/src/docs.ts +9 -9
  52. package/templates/svelte-vite/src/routes.svelte.ts +5 -5
  53. package/templates/vue-vite/src/LandingPage.vue +39 -76
  54. package/templates/vue-vite/src/OverviewPage.vue +2 -2
  55. package/templates/vue-vite/src/SignupForm.vue +14 -14
  56. package/templates/vue-vite/src/SiteFooter.vue +5 -8
  57. package/templates/vue-vite/src/SiteHeader.vue +5 -9
  58. package/templates/vue-vite/src/app.css +151 -158
  59. package/templates/vue-vite/src/data.ts +17 -17
  60. package/templates/vue-vite/src/docs.ts +9 -9
  61. package/templates/vue-vite/src/routes.ts +6 -6
  62. 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-text emphasis="muted" variant="label">Helix starter</helix-text>
29
- <helix-text as="h1">Every tag on this page is Helix</helix-text>
30
- <helix-text as="p" class="lede" emphasis="muted" variant="body">
31
- Nothing here is a wrapper: the tags are the library's own elements, and every color,
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 figures are the roster the data view draws, read from the same
42
- module, so the panel is the app at work. `helix-stat` sets the number
43
- on the display face at a size the type scale does not reach. -->
44
- <helix-card class="specimen" separation="outlined">
45
- <helix-text as="h2" slot="header" variant="title">The roster, in three figures</helix-text>
46
- <helix-stat-group divided>
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
- <!-- Three paragraphs about one installed thing, so they take a rule each
67
- and no box. `app.css` says why at more length. -->
68
- <div class="facts">
69
- <article class="fact">
70
- <helix-text as="h3" variant="title">Elements, not wrappers</helix-text>
71
- <helix-text as="p" emphasis="muted" variant="body">
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
- <helix-flex align-items="baseline" gap="sm" justify-content="between" slot="header">
112
- <helix-text as="h3" variant="title">The data view</helix-text>
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
- Twelve people from a local module, sorted, paged and selected with nothing wired up.
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
- <helix-flex align-items="baseline" gap="sm" justify-content="between" slot="header">
126
- <helix-text as="h3" variant="title">The form</helix-text>
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
- Five controls a <helix-code>&lt;form&gt;</helix-code> reads with
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
- </helix-grid>
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 that asks you
64
- for a page are all on
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 reader has
76
- touched the field. Set `feedback` to say it in your own words. -->
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. `tone` is the meaning,
109
- and the component draws it with a tint and a bar on the inline
110
- start, so it survives being read in grayscale. -->
111
- <helix-callout tone="info">
112
- Nothing is posted anywhere. Submit it and the message shows exactly what a server would
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
113
+ receive.
114
114
  </helix-callout>
115
- <helix-text as="h2" variant="title">What this is showing</helix-text>
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> and nothing gathers the answers by hand.
119
- Reset the form and they all go back, the way an <helix-code>input</helix-code> does.
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 complaint is the browser's own, in the reader's language.
123
- Handle is the controlled one: it refuses the change and writes back what it will accept.
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="subtle"` reads as body text until it is hovered, which suits a
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="subtle" :href="DOCS.gallery">Components</a>
23
- <a data-link="subtle" :href="DOCS.elements">Documentation</a>
24
- <a data-link="subtle" :href="DOCS.vue">Vue</a>
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, so the control draws the same glyph before and
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
- * freeze the page there the moment the reader's machine changed.
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 is also the only name
45
- of the project on the screen. The mark is a placeholder for your own,
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-icon name="cube" />
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