@nationalarchives/frontend 0.1.16-prerelease → 0.1.17-prerelease

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 (87) hide show
  1. package/nationalarchives/all.css +13 -1
  2. package/nationalarchives/all.css.map +1 -1
  3. package/nationalarchives/all.js +1 -1
  4. package/nationalarchives/all.js.map +1 -1
  5. package/nationalarchives/all.scss +2 -3
  6. package/nationalarchives/assets/fonts/fa-brands-400.ttf +0 -0
  7. package/nationalarchives/assets/fonts/fa-brands-400.woff2 +0 -0
  8. package/nationalarchives/assets/fonts/fa-regular-400.ttf +0 -0
  9. package/nationalarchives/assets/fonts/fa-regular-400.woff2 +0 -0
  10. package/nationalarchives/assets/fonts/fa-solid-900.ttf +0 -0
  11. package/nationalarchives/assets/fonts/fa-solid-900.woff2 +0 -0
  12. package/nationalarchives/components/breadcrumbs/_index.scss +2 -2
  13. package/nationalarchives/components/button/_button-group.scss +18 -0
  14. package/nationalarchives/components/button/_index.scss +24 -7
  15. package/nationalarchives/components/button/button.stories.js +63 -6
  16. package/nationalarchives/components/button/fixtures.json +3 -3
  17. package/nationalarchives/components/button/macro-options.json +13 -1
  18. package/nationalarchives/components/button/template.njk +7 -2
  19. package/nationalarchives/components/card/_index.scss +62 -47
  20. package/nationalarchives/components/card/card.stories.js +59 -8
  21. package/nationalarchives/components/card/fixtures.json +59 -20
  22. package/nationalarchives/components/card/macro-options.json +14 -2
  23. package/nationalarchives/components/card/template.njk +12 -8
  24. package/nationalarchives/components/filters/_index.scss +19 -14
  25. package/nationalarchives/components/footer/_index.scss +194 -60
  26. package/nationalarchives/components/footer/fixtures.json +1 -1
  27. package/nationalarchives/components/footer/footer.stories.js +80 -71
  28. package/nationalarchives/components/footer/macro-options.json +34 -8
  29. package/nationalarchives/components/footer/template.njk +110 -53
  30. package/nationalarchives/components/header/_index.scss +40 -4
  31. package/nationalarchives/components/hero/_index.scss +1 -1
  32. package/nationalarchives/components/index-grid/_index.scss +27 -5
  33. package/nationalarchives/components/index-grid/index-grid.stories.js +25 -1
  34. package/nationalarchives/components/index-grid/macro-options.json +12 -0
  35. package/nationalarchives/components/index-grid/template.njk +9 -11
  36. package/nationalarchives/components/message/_index.scss +8 -0
  37. package/nationalarchives/components/picture/_index.scss +2 -0
  38. package/nationalarchives/components/picture/picture.js +1 -1
  39. package/nationalarchives/components/picture/picture.js.map +1 -1
  40. package/nationalarchives/components/picture/picture.mjs +2 -0
  41. package/nationalarchives/components/skip-link/skip-link.stories.js +3 -2
  42. package/nationalarchives/components/tabs/_index.scss +6 -3
  43. package/nationalarchives/components/tabs/tabs.stories.js +6 -6
  44. package/nationalarchives/lib/font-awesome/_animated.scss +276 -0
  45. package/nationalarchives/lib/font-awesome/_bordered-pulled.scss +20 -0
  46. package/nationalarchives/lib/font-awesome/_core.scss +42 -0
  47. package/nationalarchives/lib/font-awesome/_fixed-width.scss +7 -0
  48. package/nationalarchives/lib/font-awesome/_functions.scss +57 -0
  49. package/nationalarchives/lib/font-awesome/_icons.scss +11 -0
  50. package/nationalarchives/lib/font-awesome/_list.scss +20 -0
  51. package/nationalarchives/lib/font-awesome/_mixins.scss +74 -0
  52. package/nationalarchives/lib/font-awesome/_rotated-flipped.scss +31 -0
  53. package/nationalarchives/lib/font-awesome/_screen-reader.scss +14 -0
  54. package/nationalarchives/lib/font-awesome/_shims.scss +2653 -0
  55. package/nationalarchives/lib/font-awesome/_sizing.scss +16 -0
  56. package/nationalarchives/lib/font-awesome/_stacked.scss +32 -0
  57. package/nationalarchives/lib/font-awesome/_variables.scss +4976 -0
  58. package/nationalarchives/lib/font-awesome/brands.scss +34 -0
  59. package/nationalarchives/lib/font-awesome/fontawesome.scss +21 -0
  60. package/nationalarchives/lib/font-awesome/regular.scss +28 -0
  61. package/nationalarchives/lib/font-awesome/solid.scss +28 -0
  62. package/nationalarchives/lib/font-awesome/v4-shims.scss +11 -0
  63. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.mdx +22 -0
  64. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +483 -97
  65. package/nationalarchives/stories/utilities/overrides/overrides.mdx +37 -57
  66. package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +1 -1
  67. package/nationalarchives/stories/utilities/typography/typography.mdx +2 -0
  68. package/nationalarchives/stories/utilities/typography/typography.stories.js +20 -1
  69. package/nationalarchives/tools/_colour.scss +86 -41
  70. package/nationalarchives/tools/_typography.scss +13 -0
  71. package/nationalarchives/utilities/_font-awesome.scss +5 -0
  72. package/nationalarchives/utilities/_global.scss +70 -26
  73. package/nationalarchives/utilities/_index.scss +1 -0
  74. package/nationalarchives/utilities/_overrides.scss +42 -10
  75. package/nationalarchives/utilities/_typography.scss +198 -59
  76. package/nationalarchives/variables/_assets.scss +1 -0
  77. package/nationalarchives/variables/_colour.scss +29 -23
  78. package/nationalarchives/variables/_index.scss +1 -0
  79. package/nationalarchives/variables/_spacing.scss +3 -1
  80. package/nationalarchives/variables/_typography.scss +4 -1
  81. package/package.json +13 -13
  82. package/nationalarchives/patterns/_index.scss +0 -1
  83. package/nationalarchives/patterns/featured-collection/_index.scss +0 -13
  84. package/nationalarchives/patterns/featured-collection/featured-collection.stories.js +0 -34
  85. package/nationalarchives/patterns/featured-collection/macro-options.json +0 -20
  86. package/nationalarchives/patterns/featured-collection/macro.njk +0 -3
  87. package/nationalarchives/patterns/featured-collection/template.njk +0 -96
@@ -1,6 +1,7 @@
1
1
  import SkipLink from "../../../components/skip-link/template.njk";
2
2
  import Header from "../../../components/header/template.njk";
3
3
  import Breadcrumbs from "../../../components/breadcrumbs/template.njk";
4
+ import Button from "../../../components/button/template.njk";
4
5
  import Card from "../../../components/card/template.njk";
5
6
  import Hero from "../../../components/hero/template.njk";
6
7
  import IndexGrid from "../../../components/index-grid/template.njk";
@@ -20,6 +21,10 @@ const argTypes = {
20
21
  "dark high-contrast",
21
22
  ],
22
23
  },
24
+ accent: {
25
+ control: "radio",
26
+ options: ["none", /*"black",*/ "yellow", "pink", "orange", "green", "blue"],
27
+ },
23
28
  };
24
29
 
25
30
  export default {
@@ -27,7 +32,33 @@ export default {
27
32
  argTypes,
28
33
  };
29
34
 
30
- const Template = ({ theme }) => {
35
+ const Template = ({ theme, accent }) => {
36
+ const cardDefaultOptions = {
37
+ heading: {
38
+ supertitle: "Card supertitle",
39
+ title: "Card title",
40
+ level: 3,
41
+ size: "m",
42
+ singleSentence: false,
43
+ },
44
+ href: "#",
45
+ image: {
46
+ src: "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
47
+ alt: "The National Archives office",
48
+ width: 1996,
49
+ height: 1331,
50
+ },
51
+ label: "New",
52
+ body: "<p>Card body</p>",
53
+ actions: [
54
+ {
55
+ text: "Card action",
56
+ href: "#",
57
+ title: "Go and do the action",
58
+ },
59
+ ],
60
+ };
61
+
31
62
  return `<div class="tna-template ${
32
63
  theme === "system"
33
64
  ? "tna-template--system-theme"
@@ -40,6 +71,20 @@ const Template = ({ theme }) => {
40
71
  : theme === "dark high-contrast"
41
72
  ? "tna-template--dark-theme tna-template--high-contrast-theme"
42
73
  : ""
74
+ } ${
75
+ accent === "black"
76
+ ? "tna-template--black-accent"
77
+ : accent === "yellow"
78
+ ? "tna-template--yellow-accent"
79
+ : accent === "pink"
80
+ ? "tna-template--pink-accent"
81
+ : accent === "orange"
82
+ ? "tna-template--orange-accent"
83
+ : accent === "green"
84
+ ? "tna-template--green-accent"
85
+ : accent === "blue"
86
+ ? "tna-template--blue-accent"
87
+ : ""
43
88
  }">
44
89
  <div class="tna-template__body tna-template__body--padded">
45
90
  ${SkipLink({
@@ -110,36 +155,139 @@ const Template = ({ theme }) => {
110
155
  classes: "tna-hero--demo",
111
156
  },
112
157
  })}
113
- <div class="tna-container">
114
- <div class="tna-column tna-column--full">
115
- <hgroup class="tna-hgroup tna-hgroup--l">
158
+ <div class="tna-container tna-section">
159
+ <div class="tna-column tna-column--width-2-3 tna-column--full-small tna-column--full-tiny">
160
+ <hgroup class="tna-hgroup tna-hgroup--xl">
116
161
  <p class="tna-hgroup__supertitle">TNA colour theme</p>
117
162
  <h2 class="tna-hgroup__title">Heading</h2>
118
163
  </hgroup>
119
- <p class="tna-p">Lorem ipsum <a href="#">link</a></p>
164
+ <p class="tna-p">This is some body text <a href="#">link</a>.</p>
165
+ <p class="tna-p">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
166
+ <p class="tna-p">Donec ac tellus in dui rutrum maximus. Aliquam vel euismod eros. Integer ut magna velit. Fusce sed dui sit amet metus eleifend dictum quis vitae mi. Aenean sagittis euismod purus, in accumsan metus venenatis nec. Nullam nec velit felis. Sed nec felis eu nisl varius dictum eu quis nisl.</p>
167
+ <p class="tna-p">Donec dapibus est arcu, vel pellentesque risus pellentesque eget.</p>
120
168
  <ul class="tna-ul">
121
169
  <li>Alpha</li>
122
170
  <li>Beta</li>
123
171
  <li>Gamma</li>
124
172
  </ul>
125
- <a href="#" class="tna-button">Primary button</a>
126
- <a href="#" class="tna-button tna-button--secondary">Secondary button</a>
173
+ <div class="tna-button-group">
174
+ ${Button({
175
+ params: {
176
+ text: "Primary button",
177
+ href: "#",
178
+ },
179
+ })}
180
+ ${Button({
181
+ params: {
182
+ text: "Accent button",
183
+ href: "#",
184
+ accent: true,
185
+ },
186
+ })}
187
+ ${Button({
188
+ params: {
189
+ text: "Explore the collection",
190
+ href: "#",
191
+ icon: "map-location-dot",
192
+ },
193
+ })}
194
+ ${Button({
195
+ params: {
196
+ text: "Tweet us",
197
+ href: "#",
198
+ brandIcon: "twitter",
199
+ },
200
+ })}
201
+ ${Button({
202
+ params: {
203
+ text: "Tweet us",
204
+ href: "#",
205
+ accent: true,
206
+ brandIcon: "twitter",
207
+ },
208
+ })}
209
+ </div>
127
210
  </div>
128
- </div>
129
- <hr>
130
- <div class="tna-container">
131
- <div class="tna-column tna-column--full">
132
- <p class="tna-!--no-margin-bottom">Lorem ipsum</p>
133
- <p class="tna-!--no-margin-bottom tna-!__padding-top--xs">Lorem ipsum</p>
134
- <p class="tna-!--no-margin-bottom tna-!__padding-top--s">Lorem ipsum</p>
135
- <p class="tna-!--no-margin-bottom tna-!__padding-top--m">Lorem ipsum</p>
136
- <p class="tna-!--no-margin-bottom tna-!__padding-top--l">Lorem ipsum</p>
137
- <p class="tna-!--no-margin-bottom tna-!__padding-top--xl">Lorem ipsum</p>
211
+ <div class="tna-column tna-column--width-1-3 tna-column--full-small tna-column--full-tiny">
212
+ <div class="tna-aside tna-background--contrast tna-!--margin-top-l-small tna-!--margin-top-xl-tiny">
213
+ <p class="tna-p">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
214
+ </div>
215
+ <div class="tna-aside tna-background--accent">
216
+ <p class="tna-p">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
217
+ </div>
138
218
  </div>
139
219
  </div>
140
220
  <hr>
141
- <div class="tna-container">
221
+ <div class="tna-container tna-section">
142
222
  <div class="tna-column tna-column--full">
223
+ <h1 class="tna-heading tna-heading--xl">
224
+ This is a heading (XL)
225
+ </h1>
226
+ <p class="tna-p">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
227
+ <h2 class="tna-heading tna-heading--l">
228
+ This is a heading (L)
229
+ </h2>
230
+ <p class="tna-p">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
231
+ <h3 class="tna-heading tna-heading--m">
232
+ This is a heading (M)
233
+ </h3>
234
+ <p class="tna-p">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
235
+ <p class="tna-p">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
236
+ <h4 class="tna-heading tna-heading--s">
237
+ This is a heading (S)
238
+ </h4>
239
+ <p class="tna-p">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
240
+ <hgroup class="tna-hgroup tna-hgroup--xl">
241
+ <p class="tna-hgroup__supertitle">Supertitle</p>
242
+ <h2 class="tna-hgroup__title">This is a heading (XL)</h2>
243
+ </hgroup>
244
+ <p class="tna-p">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
245
+ <hgroup class="tna-hgroup tna-hgroup--l">
246
+ <p class="tna-hgroup__supertitle">Supertitle</p>
247
+ <h2 class="tna-hgroup__title">This is a heading (L)</h2>
248
+ </hgroup>
249
+ <p class="tna-p">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
250
+ <hgroup class="tna-hgroup tna-hgroup--m">
251
+ <p class="tna-hgroup__supertitle">Supertitle</p>
252
+ <h2 class="tna-hgroup__title">This is a heading (M)</h2>
253
+ </hgroup>
254
+ <p class="tna-p">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
255
+ <hgroup class="tna-hgroup tna-hgroup--s">
256
+ <p class="tna-hgroup__supertitle">Supertitle</p>
257
+ <h2 class="tna-hgroup__title">This is a heading (S)</h2>
258
+ </hgroup>
259
+ <p class="tna-p">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
260
+ <p class="tna-scene-setter">
261
+ We are the official archive of England and Wales. Discover 1,000 years of history through <a href="#">fascinating stories</a> from the past or <a href="#">start your own research</a> and <a href="#">search our catalogue</a> of 32 million records. <a href="#">Plan a visit</a> to access original historic documents from our collections then enjoy the grounds, café, and <a href="#">free exhibitions</a>.
262
+ </p>
263
+ <blockquote class="tna-blockquote">
264
+ <div class="tna-blockquote__quote">
265
+ <p>A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.</p>
266
+ </div>
267
+ <p class="tna-blockquote__author">Douglas Adams, Mostly Harmless</p>
268
+ </blockquote>
269
+ <h2 class="tna-heading tna-heading--l">
270
+ <a href="#">Reaerching with The National Archives</a>
271
+ </h2>
272
+ <p class="tna-p">Lorem ipsum <a href="#">link</a></p>
273
+ <hgroup class="tna-hgroup tna-hgroup--l">
274
+ <p class="tna-hgroup__supertitle">Supertitle</p>
275
+ <h2 class="tna-hgroup__title">
276
+ <a href="#">Reaerching with The National Archives</a>
277
+ </h2>
278
+ </hgroup>
279
+ <p class="tna-p">Lorem ipsum <a href="#">link</a></p>
280
+ <ul class="tna-chip-list">
281
+ <li class="tna-chip-list__item">
282
+ <a href="#" class="tna-chip">Chip 1</a>
283
+ </li>
284
+ <li class="tna-chip-list__item">
285
+ <a href="#" class="tna-chip">Chip 2</a>
286
+ </li>
287
+ <li class="tna-chip-list__item">
288
+ <a href="#" class="tna-chip">Chip 3</a>
289
+ </li>
290
+ </ul>
143
291
  ${Message({
144
292
  params: {
145
293
  message:
@@ -149,61 +297,61 @@ const Template = ({ theme }) => {
149
297
  </div>
150
298
  </div>
151
299
  <hr>
152
- <div class="tna-container">
300
+ <div class="tna-container tna-section">
153
301
  <div class="tna-column tna-column--full">
302
+ <p class="tna-!--no-margin-bottom">Lorem ipsum</p>
303
+ <p class="tna-!--no-margin-bottom tna-!--padding-top-xs">Lorem ipsum</p>
304
+ <p class="tna-!--no-margin-bottom tna-!--padding-top-s">Lorem ipsum</p>
305
+ <p class="tna-!--no-margin-bottom tna-!--padding-top-m">Lorem ipsum</p>
306
+ <p class="tna-!--no-margin-bottom tna-!--padding-top-l">Lorem ipsum</p>
307
+ <p class="tna-!--no-margin-bottom tna-!--padding-top-xl">Lorem ipsum</p>
308
+ </div>
309
+ </div>
310
+ <hr>
311
+ <div class="tna-container">
312
+ <div class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny">
154
313
  ${Card({
155
- params: {
156
- heading: {
157
- supertitle: "Card supertitle",
158
- title: "Card title",
159
- level: 3,
160
- size: "m",
161
- singleSentence: false,
162
- },
163
- href: "#",
164
- image: {
165
- src: "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
166
- alt: "The National Archives office",
167
- width: 1996,
168
- height: 1331,
169
- },
170
- label: "New",
171
- body: "<p>Card body</p>",
172
- classes: "tna-card--demo",
173
- },
314
+ params: { ...cardDefaultOptions },
315
+ })}
316
+ </div>
317
+ <div class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny">
318
+ ${Card({
319
+ params: { ...cardDefaultOptions, style: "boxed" },
320
+ })}
321
+ </div>
322
+ <div class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny">
323
+ ${Card({
324
+ params: { ...cardDefaultOptions, style: "accent" },
174
325
  })}
175
326
  </div>
176
327
  </div>
177
328
  <hr>
178
329
  <div class="tna-container">
179
- <div class="tna-column tna-column--full">
330
+ <div class="tna-column tna-column--width-2-3 tna-column--full-medium tna-column--full-small tna-column--full-tiny">
180
331
  ${Card({
181
332
  params: {
182
- heading: {
183
- supertitle: "Card supertitle",
184
- title: "Card title",
185
- level: 3,
186
- size: "l",
187
- singleSentence: false,
188
- },
189
- href: "#",
190
- image: {
191
- src: "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
192
- alt: "The National Archives office",
193
- width: 1996,
194
- height: 1331,
195
- },
196
- label: "New",
197
- body: "<p>Card body</p>",
198
- actions: [
199
- {
200
- text: "Card action",
201
- href: "#",
202
- title: "Go and do the action",
203
- },
204
- ],
205
- featured: true,
206
- classes: "tna-card--demo",
333
+ ...cardDefaultOptions,
334
+ horizontal: true,
335
+ classes: "tna-!--margin-bottom-m",
336
+ },
337
+ })}
338
+ </div>
339
+ <div class="tna-column tna-column--width-2-3 tna-column--full-medium tna-column--full-small tna-column--full-tiny">
340
+ ${Card({
341
+ params: {
342
+ ...cardDefaultOptions,
343
+ horizontal: true,
344
+ style: "boxed",
345
+ classes: "tna-!--margin-bottom-m",
346
+ },
347
+ })}
348
+ </div>
349
+ <div class="tna-column tna-column--width-2-3 tna-column--full-medium tna-column--full-small tna-column--full-tiny">
350
+ ${Card({
351
+ params: {
352
+ ...cardDefaultOptions,
353
+ horizontal: true,
354
+ style: "accent",
207
355
  },
208
356
  })}
209
357
  </div>
@@ -218,17 +366,17 @@ const Template = ({ theme }) => {
218
366
  {
219
367
  id: "unique-id-a",
220
368
  title: "Alpha section",
221
- body: "<h2>Alpha title</h2><p>Lorem ipsum</p>",
369
+ body: '<h2 class="tna-heading">Alpha title</h2><p>Lorem ipsum</p>',
222
370
  },
223
371
  {
224
372
  id: "unique-id-b",
225
373
  title: "Beta section",
226
- body: "<h2>Beta title</h2><p>Lorem ipsum</p>",
374
+ body: '<h2 class="tna-heading">Beta title</h2><p>Lorem ipsum</p>',
227
375
  },
228
376
  {
229
377
  id: "unique-id-c",
230
378
  title: "Gamma section",
231
- body: "<h2>Gamma title</h2><p>Lorem ipsum</p>",
379
+ body: '<h2 class="tna-heading">Gamma title</h2><p>Lorem ipsum</p>',
232
380
  },
233
381
  ],
234
382
  classes: "tna-tabs--demo",
@@ -254,38 +402,271 @@ const Template = ({ theme }) => {
254
402
  </div>
255
403
  </div>
256
404
  <hr>
257
- ${IndexGrid({
258
- params: {
259
- heading: "My dogs",
260
- items: Array(12)
261
- .fill({
262
- ...{
405
+ <div class="tna-section tna-background--contrast">
406
+ ${IndexGrid({
407
+ params: {
408
+ heading: { title: "My dogs", href: "#" },
409
+ items: Array(12)
410
+ .fill({
411
+ ...{
412
+ href: "#",
413
+ src: "https://picsum.photos/id/237/800/600",
414
+ alt: "Photo of a puppy",
415
+ width: "800",
416
+ height: "600",
417
+ title: "Cat",
418
+ subtitle: "4 photos",
419
+ },
420
+ })
421
+ .map((item, index) => {
422
+ const pseudoRandom = ((index * 29) % 8) + 1;
423
+ return {
424
+ ...item,
425
+ href: `#/category-${index}`,
426
+ title: `Category #${index + 101}`,
427
+ subtitle: `${pseudoRandom} photos`,
428
+ };
429
+ }),
430
+ columns: 4,
431
+ columnsMedium: 3,
432
+ columnsSmall: 2,
433
+ columnsTiny: 1,
434
+ },
435
+ })}
436
+ <div class="tna-container">
437
+ <div class="tna-column tna-column--full">
438
+ <div class="tna-button-group">
439
+ <a href="#" class="tna-button">Primary button</a>
440
+ <a href="#" class="tna-button tna-button--accent">Accent button</a>
441
+ </div>
442
+ </div>
443
+ </div>
444
+ </div>
445
+ <div class="tna-section tna-background--accent-light">
446
+ ${IndexGrid({
447
+ params: {
448
+ heading: { title: "My dogs", href: "#" },
449
+ items: Array(12)
450
+ .fill({
451
+ ...{
452
+ href: "#",
453
+ src: "https://picsum.photos/id/237/800/600",
454
+ alt: "Photo of a puppy",
455
+ width: "800",
456
+ height: "600",
457
+ title: "Cat",
458
+ subtitle: "4 photos",
459
+ },
460
+ })
461
+ .map((item, index) => {
462
+ const pseudoRandom = ((index * 29) % 8) + 1;
463
+ return {
464
+ ...item,
465
+ href: `#/category-${index}`,
466
+ title: `Category #${index + 101}`,
467
+ subtitle: `${pseudoRandom} photos`,
468
+ };
469
+ }),
470
+ columns: 4,
471
+ columnsMedium: 3,
472
+ columnsSmall: 2,
473
+ columnsTiny: 1,
474
+ },
475
+ })}
476
+ <div class="tna-container">
477
+ <div class="tna-column tna-column--full">
478
+ <div class="tna-button-group">
479
+ <a href="#" class="tna-button">Primary button</a>
480
+ <a href="#" class="tna-button tna-button--accent">Accent button</a>
481
+ </div>
482
+ </div>
483
+ </div>
484
+ </div>
485
+ <div class="tna-section tna-background--accent">
486
+ ${IndexGrid({
487
+ params: {
488
+ heading: { title: "My dogs", href: "#" },
489
+ items: Array(12)
490
+ .fill({
491
+ ...{
492
+ href: "#",
493
+ src: "https://picsum.photos/id/237/800/600",
494
+ alt: "Photo of a puppy",
495
+ width: "800",
496
+ height: "600",
497
+ title: "Cat",
498
+ subtitle: "4 photos",
499
+ },
500
+ })
501
+ .map((item, index) => {
502
+ const pseudoRandom = ((index * 29) % 8) + 1;
503
+ return {
504
+ ...item,
505
+ href: `#/category-${index}`,
506
+ title: `Category #${index + 101}`,
507
+ subtitle: `${pseudoRandom} photos`,
508
+ };
509
+ }),
510
+ columns: 4,
511
+ columnsMedium: 3,
512
+ columnsSmall: 2,
513
+ columnsTiny: 1,
514
+ },
515
+ })}
516
+ <div class="tna-container">
517
+ <div class="tna-column tna-column--full">
518
+ <div class="tna-button-group">
519
+ <a href="#" class="tna-button">Primary button</a>
520
+ </div>
521
+ </div>
522
+ </div>
523
+ </div>
524
+ </main>
525
+ ${Footer({
526
+ params: {
527
+ meta: "<p>Open today<br />09:00&mdash;19:00</p>",
528
+ social: [
529
+ {
530
+ text: "Twitter",
531
+ href: "#",
532
+ image: "./images/footer/twitter.svg",
533
+ },
534
+ {
535
+ text: "YouTube",
536
+ href: "#",
537
+ image: "./images/footer/youtube.svg",
538
+ },
539
+ {
540
+ text: "Facebook",
541
+ href: "#",
542
+ image: "./images/footer/facebook.svg",
543
+ },
544
+ {
545
+ text: "Flickr",
546
+ href: "#",
547
+ image: "./images/footer/flickr.svg",
548
+ },
549
+ {
550
+ text: "Instagram",
551
+ href: "#",
552
+ image: "./images/footer/instagram.svg",
553
+ },
554
+ {
555
+ text: "RSS",
556
+ href: "#",
557
+ image: "./images/footer/rss.svg",
558
+ },
559
+ ],
560
+ navigation: [
561
+ {
562
+ title: "About us",
563
+ items: [
564
+ {
565
+ text: "Our role",
263
566
  href: "#",
264
- src: "https://picsum.photos/id/237/800/600",
265
- alt: "Photo of a puppy",
266
- width: "800",
267
- height: "600",
268
- title: "Cat",
269
- subtitle: "4 photos",
270
567
  },
271
- })
272
- .map((item, index) => {
273
- const pseudoRandom = ((index * 29) % 8) + 1;
274
- return {
275
- ...item,
276
- href: `#/category-${index}`,
277
- title: `Category #${index + 101}`,
278
- subtitle: `${pseudoRandom} photos`,
279
- };
280
- }),
281
- columns: 4,
282
- columnsMedium: 3,
283
- columnsSmall: 2,
284
- columnsTiny: 1,
285
- },
286
- })}
287
- </main>
288
- ${Footer({})}
568
+ {
569
+ text: "Our history",
570
+ href: "#",
571
+ },
572
+ {
573
+ text: "Our collection",
574
+ href: "#",
575
+ },
576
+ {
577
+ text: "Our people",
578
+ href: "#",
579
+ },
580
+ {
581
+ text: "How we are run",
582
+ href: "#",
583
+ },
584
+ {
585
+ text: "Our research amd academic collaboration",
586
+ href: "#",
587
+ },
588
+ {
589
+ text: "News",
590
+ href: "#",
591
+ },
592
+ {
593
+ text: "Contact us",
594
+ href: "#",
595
+ },
596
+ {
597
+ text: "Jobs & careers",
598
+ href: "#",
599
+ },
600
+ {
601
+ text: "Get involved",
602
+ href: "#",
603
+ },
604
+ ],
605
+ },
606
+ {
607
+ title: "Our websites help",
608
+ items: [
609
+ {
610
+ text: "UK Government Web Archive",
611
+ href: "#",
612
+ newTab: true,
613
+ },
614
+ {
615
+ text: "Legislation.gov.uk",
616
+ href: "#",
617
+ newTab: true,
618
+ },
619
+ {
620
+ text: "Find case law",
621
+ href: "#",
622
+ newTab: true,
623
+ },
624
+ {
625
+ text: "The Gazette",
626
+ href: "#",
627
+ newTab: true,
628
+ },
629
+ ],
630
+ },
631
+ {
632
+ title: "Quick links",
633
+ items: [
634
+ {
635
+ text: "Press room",
636
+ href: "#",
637
+ },
638
+ {
639
+ text: "Venue hire",
640
+ href: "#",
641
+ },
642
+ ],
643
+ },
644
+ ],
645
+ showNewsletter: true,
646
+ legal: [
647
+ {
648
+ text: "Accessibility statement",
649
+ href: "#",
650
+ },
651
+ {
652
+ text: "Freedom of information",
653
+ href: "#",
654
+ },
655
+ {
656
+ text: "Terms and condidtions",
657
+ href: "#",
658
+ },
659
+ {
660
+ text: "Privacy policy",
661
+ href: "#",
662
+ },
663
+ {
664
+ text: "Cookies",
665
+ href: "#",
666
+ },
667
+ ],
668
+ },
669
+ })}
289
670
  </div>
290
671
  </div>`;
291
672
  };
@@ -294,24 +675,29 @@ export const System = Template.bind({});
294
675
  // System.parameters = { options: { showPanel: false } };
295
676
  System.args = {
296
677
  theme: "system",
678
+ accent: "pink",
297
679
  };
298
680
 
299
681
  export const Light = Template.bind({});
300
682
  Light.args = {
301
683
  theme: "light",
684
+ accent: "pink",
302
685
  };
303
686
 
304
687
  export const Dark = Template.bind({});
305
688
  Dark.args = {
306
689
  theme: "dark",
690
+ accent: "pink",
307
691
  };
308
692
 
309
693
  export const LightHighContrast = Template.bind({});
310
694
  LightHighContrast.args = {
311
695
  theme: "light high-contrast",
696
+ accent: "pink",
312
697
  };
313
698
 
314
699
  export const DarkHighContrast = Template.bind({});
315
700
  DarkHighContrast.args = {
316
701
  theme: "dark high-contrast",
702
+ accent: "pink",
317
703
  };