@fusion.dev/helix-templates 0.139.0 → 0.140.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 (57) hide show
  1. package/package.json +1 -1
  2. package/templates/angular/src/app/data.ts +17 -17
  3. package/templates/angular/src/app/docs.ts +9 -9
  4. package/templates/angular/src/app/landing.html +36 -71
  5. package/templates/angular/src/app/landing.ts +0 -2
  6. package/templates/angular/src/app/overview.html +2 -2
  7. package/templates/angular/src/app/pathname.ts +1 -1
  8. package/templates/angular/src/app/signup-form.html +9 -10
  9. package/templates/angular/src/app/site-footer.html +1 -1
  10. package/templates/angular/src/app/site-header.ts +2 -3
  11. package/templates/angular/src/app.css +144 -152
  12. package/templates/react-nextjs/app/app.css +144 -152
  13. package/templates/react-nextjs/app/data.ts +17 -17
  14. package/templates/react-nextjs/app/docs.ts +9 -9
  15. package/templates/react-nextjs/app/landing.tsx +63 -121
  16. package/templates/react-nextjs/app/overview.tsx +24 -26
  17. package/templates/react-nextjs/app/signup-form.tsx +36 -39
  18. package/templates/react-nextjs/app/site-footer.tsx +7 -10
  19. package/templates/react-nextjs/app/site-header.tsx +17 -21
  20. package/templates/react-nextjs/helix-jsx.d.ts +5 -7
  21. package/templates/react-vite/helix-jsx.d.ts +5 -7
  22. package/templates/react-vite/src/app.css +144 -152
  23. package/templates/react-vite/src/data.ts +17 -17
  24. package/templates/react-vite/src/docs.ts +9 -9
  25. package/templates/react-vite/src/landing.tsx +63 -121
  26. package/templates/react-vite/src/overview.tsx +24 -26
  27. package/templates/react-vite/src/routes.tsx +11 -13
  28. package/templates/react-vite/src/signup-form.tsx +36 -39
  29. package/templates/react-vite/src/site-footer.tsx +7 -10
  30. package/templates/react-vite/src/site-header.tsx +15 -19
  31. package/templates/solid-vite/src/app.css +144 -152
  32. package/templates/solid-vite/src/data.ts +17 -17
  33. package/templates/solid-vite/src/docs.ts +9 -9
  34. package/templates/solid-vite/src/landing.tsx +51 -98
  35. package/templates/solid-vite/src/overview.tsx +2 -2
  36. package/templates/solid-vite/src/routes.ts +6 -6
  37. package/templates/solid-vite/src/signup-form.tsx +10 -10
  38. package/templates/solid-vite/src/site-footer.tsx +1 -1
  39. package/templates/solid-vite/src/site-header.tsx +2 -3
  40. package/templates/svelte-vite/src/Landing.svelte +36 -73
  41. package/templates/svelte-vite/src/Overview.svelte +2 -2
  42. package/templates/svelte-vite/src/SignupForm.svelte +9 -10
  43. package/templates/svelte-vite/src/SiteFooter.svelte +1 -1
  44. package/templates/svelte-vite/src/SiteHeader.svelte +2 -3
  45. package/templates/svelte-vite/src/app.css +144 -152
  46. package/templates/svelte-vite/src/data.ts +17 -17
  47. package/templates/svelte-vite/src/docs.ts +9 -9
  48. package/templates/svelte-vite/src/routes.svelte.ts +5 -5
  49. package/templates/vue-vite/src/LandingPage.vue +36 -73
  50. package/templates/vue-vite/src/OverviewPage.vue +2 -2
  51. package/templates/vue-vite/src/SignupForm.vue +10 -10
  52. package/templates/vue-vite/src/SiteFooter.vue +1 -1
  53. package/templates/vue-vite/src/SiteHeader.vue +2 -3
  54. package/templates/vue-vite/src/app.css +144 -152
  55. package/templates/vue-vite/src/data.ts +17 -17
  56. package/templates/vue-vite/src/docs.ts +9 -9
  57. package/templates/vue-vite/src/routes.ts +6 -6
@@ -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,10 +39,10 @@ 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">
42
+ <!-- **The library at work, on the first screen.** The figures are the roster
43
+ the data view draws, read from the same module, so the panel is the app
44
+ itself, on glass over the light. -->
45
+ <helix-card class="specimen" material="glass" separation="outlined">
45
46
  <helix-text as="h2" slot="header" variant="title">The roster, in three figures</helix-text>
46
47
  <helix-stat-group divided>
47
48
  <helix-stat>
@@ -63,77 +64,39 @@ const figure = new Intl.NumberFormat('en-US')
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"
@@ -109,18 +109,18 @@ const dismiss = (id: number) => {
109
109
  and the component draws it with a tint and a bar on the inline
110
110
  start, so it survives being read in grayscale. -->
111
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.
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>
@@ -16,7 +16,7 @@ import { DOCS } from './docs.ts'
16
16
  <footer class="site-footer">
17
17
  <div class="footer-row">
18
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.
19
+ Every component here has a page, with its API, its parts, and its examples.
20
20
  </helix-text>
21
21
  <div class="footer-links">
22
22
  <a data-link="subtle" :href="DOCS.gallery">Components</a>
@@ -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'