@nationalarchives/frontend 0.1.15-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.
- package/LICENCE +21 -0
- package/nationalarchives/all.css +13 -1
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/all.scss +2 -3
- package/nationalarchives/assets/fonts/fa-brands-400.ttf +0 -0
- package/nationalarchives/assets/fonts/fa-brands-400.woff2 +0 -0
- package/nationalarchives/assets/fonts/fa-regular-400.ttf +0 -0
- package/nationalarchives/assets/fonts/fa-regular-400.woff2 +0 -0
- package/nationalarchives/assets/fonts/fa-solid-900.ttf +0 -0
- package/nationalarchives/assets/fonts/fa-solid-900.woff2 +0 -0
- package/nationalarchives/components/_index.scss +1 -0
- package/nationalarchives/components/breadcrumbs/_index.scss +13 -41
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +8 -4
- package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +9 -30
- package/nationalarchives/components/breadcrumbs/fixtures.json +23 -1
- package/nationalarchives/components/breadcrumbs/macro-options.json +6 -0
- package/nationalarchives/components/breadcrumbs/template.njk +17 -12
- package/nationalarchives/components/button/_button-group.scss +18 -0
- package/nationalarchives/components/button/_index.scss +25 -9
- package/nationalarchives/components/button/button.stories.js +64 -8
- package/nationalarchives/components/button/fixtures.json +3 -3
- package/nationalarchives/components/button/macro-options.json +13 -1
- package/nationalarchives/components/button/template.njk +7 -2
- package/nationalarchives/components/card/_index.scss +67 -51
- package/nationalarchives/components/card/card.stories.js +123 -10
- package/nationalarchives/components/card/fixtures.json +62 -10
- package/nationalarchives/components/card/macro-options.json +9 -3
- package/nationalarchives/components/card/template.njk +12 -8
- package/nationalarchives/components/filters/_index.scss +19 -14
- package/nationalarchives/components/filters/filters.stories.js +3 -4
- package/nationalarchives/components/footer/_index.scss +195 -72
- package/nationalarchives/components/footer/fixtures.json +1 -1
- package/nationalarchives/components/footer/footer.stories.js +82 -74
- package/nationalarchives/components/footer/macro-options.json +34 -8
- package/nationalarchives/components/footer/template.njk +110 -53
- package/nationalarchives/components/grid/_index.scss +2 -2
- package/nationalarchives/components/grid/grid.stories.js +2 -3
- package/nationalarchives/components/header/_index.scss +57 -23
- package/nationalarchives/components/header/header.stories.js +2 -3
- package/nationalarchives/components/hero/_index.scss +4 -8
- package/nationalarchives/components/hero/hero.stories.js +2 -3
- package/nationalarchives/components/index-grid/_index.scss +28 -7
- package/nationalarchives/components/index-grid/index-grid.stories.js +27 -4
- package/nationalarchives/components/index-grid/macro-options.json +12 -0
- package/nationalarchives/components/index-grid/template.njk +9 -11
- package/nationalarchives/components/message/_index.scss +12 -6
- package/nationalarchives/components/message/phase-banner.stories.js +2 -3
- package/nationalarchives/components/phase-banner/phase-banner.stories.js +2 -3
- package/nationalarchives/components/picture/_index.scss +5 -5
- package/nationalarchives/components/picture/picture.js +1 -1
- package/nationalarchives/components/picture/picture.js.map +1 -1
- package/nationalarchives/components/picture/picture.mjs +2 -0
- package/nationalarchives/components/picture/picture.stories.js +2 -3
- package/nationalarchives/components/profile/profile.stories.js +2 -3
- package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +3 -4
- package/nationalarchives/components/skip-link/_index.scss +63 -0
- package/nationalarchives/components/skip-link/fixtures.json +11 -0
- package/nationalarchives/{patterns/featured-collection → components/skip-link}/macro-options.json +10 -4
- package/nationalarchives/components/skip-link/macro.njk +3 -0
- package/nationalarchives/{patterns/featured-collection/featured-collection.stories.js → components/skip-link/skip-link.stories.js} +7 -10
- package/nationalarchives/components/skip-link/template.njk +4 -0
- package/nationalarchives/components/tabs/_index.scss +7 -5
- package/nationalarchives/components/tabs/tabs.stories.js +8 -9
- package/nationalarchives/lib/font-awesome/_animated.scss +276 -0
- package/nationalarchives/lib/font-awesome/_bordered-pulled.scss +20 -0
- package/nationalarchives/lib/font-awesome/_core.scss +42 -0
- package/nationalarchives/lib/font-awesome/_fixed-width.scss +7 -0
- package/nationalarchives/lib/font-awesome/_functions.scss +57 -0
- package/nationalarchives/lib/font-awesome/_icons.scss +11 -0
- package/nationalarchives/lib/font-awesome/_list.scss +20 -0
- package/nationalarchives/lib/font-awesome/_mixins.scss +74 -0
- package/nationalarchives/lib/font-awesome/_rotated-flipped.scss +31 -0
- package/nationalarchives/lib/font-awesome/_screen-reader.scss +14 -0
- package/nationalarchives/lib/font-awesome/_shims.scss +2653 -0
- package/nationalarchives/lib/font-awesome/_sizing.scss +16 -0
- package/nationalarchives/lib/font-awesome/_stacked.scss +32 -0
- package/nationalarchives/lib/font-awesome/_variables.scss +4976 -0
- package/nationalarchives/lib/font-awesome/brands.scss +34 -0
- package/nationalarchives/lib/font-awesome/fontawesome.scss +21 -0
- package/nationalarchives/lib/font-awesome/regular.scss +28 -0
- package/nationalarchives/lib/font-awesome/solid.scss +28 -0
- package/nationalarchives/lib/font-awesome/v4-shims.scss +11 -0
- package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.mdx +22 -0
- package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +494 -91
- package/nationalarchives/stories/utilities/overrides/overrides.mdx +37 -57
- package/nationalarchives/stories/utilities/overrides/overrides.stories.js +8 -14
- package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +1 -1
- package/nationalarchives/stories/utilities/typography/typography.mdx +2 -0
- package/nationalarchives/stories/utilities/typography/typography.stories.js +20 -1
- package/nationalarchives/templates/layouts/_generic.njk +10 -8
- package/nationalarchives/tools/_colour.scss +163 -49
- package/nationalarchives/tools/_index.scss +0 -1
- package/nationalarchives/tools/_typography.scss +13 -0
- package/nationalarchives/utilities/_debug.scss +41 -1
- package/nationalarchives/utilities/_font-awesome.scss +5 -0
- package/nationalarchives/utilities/_global.scss +75 -26
- package/nationalarchives/utilities/_index.scss +1 -0
- package/nationalarchives/utilities/_overrides.scss +54 -9
- package/nationalarchives/utilities/_typography.scss +203 -65
- package/nationalarchives/variables/_assets.scss +1 -1
- package/nationalarchives/variables/_colour.scss +93 -93
- package/nationalarchives/variables/_grid.scss +1 -1
- package/nationalarchives/variables/_media.scss +23 -23
- package/nationalarchives/variables/_spacing.scss +12 -2
- package/nationalarchives/variables/_typography.scss +4 -1
- package/package.json +14 -14
- package/nationalarchives/patterns/_index.scss +0 -1
- package/nationalarchives/patterns/featured-collection/_index.scss +0 -13
- package/nationalarchives/patterns/featured-collection/macro.njk +0 -3
- package/nationalarchives/patterns/featured-collection/template.njk +0 -96
- package/nationalarchives/tools/_assets.scss +0 -5
@@ -1,5 +1,7 @@
|
|
1
|
+
import SkipLink from "../../../components/skip-link/template.njk";
|
1
2
|
import Header from "../../../components/header/template.njk";
|
2
3
|
import Breadcrumbs from "../../../components/breadcrumbs/template.njk";
|
4
|
+
import Button from "../../../components/button/template.njk";
|
3
5
|
import Card from "../../../components/card/template.njk";
|
4
6
|
import Hero from "../../../components/hero/template.njk";
|
5
7
|
import IndexGrid from "../../../components/index-grid/template.njk";
|
@@ -19,6 +21,10 @@ const argTypes = {
|
|
19
21
|
"dark high-contrast",
|
20
22
|
],
|
21
23
|
},
|
24
|
+
accent: {
|
25
|
+
control: "radio",
|
26
|
+
options: ["none", /*"black",*/ "yellow", "pink", "orange", "green", "blue"],
|
27
|
+
},
|
22
28
|
};
|
23
29
|
|
24
30
|
export default {
|
@@ -26,7 +32,33 @@ export default {
|
|
26
32
|
argTypes,
|
27
33
|
};
|
28
34
|
|
29
|
-
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
|
+
|
30
62
|
return `<div class="tna-template ${
|
31
63
|
theme === "system"
|
32
64
|
? "tna-template--system-theme"
|
@@ -39,10 +71,33 @@ const Template = ({ theme }) => {
|
|
39
71
|
: theme === "dark high-contrast"
|
40
72
|
? "tna-template--dark-theme tna-template--high-contrast-theme"
|
41
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
|
+
: ""
|
42
88
|
}">
|
43
89
|
<div class="tna-template__body tna-template__body--padded">
|
90
|
+
${SkipLink({
|
91
|
+
params: {
|
92
|
+
href: "main-content",
|
93
|
+
},
|
94
|
+
})}
|
44
95
|
${Header({
|
45
96
|
params: {
|
97
|
+
logo: {
|
98
|
+
strapline: "Colours",
|
99
|
+
href: "#/",
|
100
|
+
},
|
46
101
|
navigation: [
|
47
102
|
{
|
48
103
|
text: "Alpha",
|
@@ -87,7 +142,7 @@ const Template = ({ theme }) => {
|
|
87
142
|
],
|
88
143
|
},
|
89
144
|
})}
|
90
|
-
<
|
145
|
+
<main id="main-content" role="main">
|
91
146
|
${Hero({
|
92
147
|
params: {
|
93
148
|
heading: "Title",
|
@@ -100,36 +155,139 @@ const Template = ({ theme }) => {
|
|
100
155
|
classes: "tna-hero--demo",
|
101
156
|
},
|
102
157
|
})}
|
103
|
-
<div class="tna-container">
|
104
|
-
<div class="tna-column tna-column--full">
|
105
|
-
<hgroup class="tna-hgroup tna-hgroup--
|
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">
|
106
161
|
<p class="tna-hgroup__supertitle">TNA colour theme</p>
|
107
162
|
<h2 class="tna-hgroup__title">Heading</h2>
|
108
163
|
</hgroup>
|
109
|
-
<p class="tna-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>
|
110
168
|
<ul class="tna-ul">
|
111
169
|
<li>Alpha</li>
|
112
170
|
<li>Beta</li>
|
113
171
|
<li>Gamma</li>
|
114
172
|
</ul>
|
115
|
-
<
|
116
|
-
|
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>
|
117
210
|
</div>
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
<
|
123
|
-
|
124
|
-
|
125
|
-
<p class="tna-!--no-margin-bottom tna-!__padding-top--m">Lorem ipsum</p>
|
126
|
-
<p class="tna-!--no-margin-bottom tna-!__padding-top--l">Lorem ipsum</p>
|
127
|
-
<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>
|
128
218
|
</div>
|
129
219
|
</div>
|
130
220
|
<hr>
|
131
|
-
<div class="tna-container">
|
221
|
+
<div class="tna-container tna-section">
|
132
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>
|
133
291
|
${Message({
|
134
292
|
params: {
|
135
293
|
message:
|
@@ -139,54 +297,61 @@ const Template = ({ theme }) => {
|
|
139
297
|
</div>
|
140
298
|
</div>
|
141
299
|
<hr>
|
142
|
-
<div class="tna-container">
|
300
|
+
<div class="tna-container tna-section">
|
143
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">
|
144
313
|
${Card({
|
145
|
-
params: {
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
alt: "The National Archives office",
|
157
|
-
width: 1996,
|
158
|
-
height: 1331,
|
159
|
-
},
|
160
|
-
label: "New",
|
161
|
-
body: "<p>Card body</p>",
|
162
|
-
classes: "tna-card--demo",
|
163
|
-
},
|
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" },
|
164
325
|
})}
|
165
326
|
</div>
|
166
327
|
</div>
|
167
328
|
<hr>
|
168
329
|
<div class="tna-container">
|
169
|
-
<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">
|
170
331
|
${Card({
|
171
332
|
params: {
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
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",
|
190
355
|
},
|
191
356
|
})}
|
192
357
|
</div>
|
@@ -201,17 +366,17 @@ const Template = ({ theme }) => {
|
|
201
366
|
{
|
202
367
|
id: "unique-id-a",
|
203
368
|
title: "Alpha section",
|
204
|
-
body:
|
369
|
+
body: '<h2 class="tna-heading">Alpha title</h2><p>Lorem ipsum</p>',
|
205
370
|
},
|
206
371
|
{
|
207
372
|
id: "unique-id-b",
|
208
373
|
title: "Beta section",
|
209
|
-
body:
|
374
|
+
body: '<h2 class="tna-heading">Beta title</h2><p>Lorem ipsum</p>',
|
210
375
|
},
|
211
376
|
{
|
212
377
|
id: "unique-id-c",
|
213
378
|
title: "Gamma section",
|
214
|
-
body:
|
379
|
+
body: '<h2 class="tna-heading">Gamma title</h2><p>Lorem ipsum</p>',
|
215
380
|
},
|
216
381
|
],
|
217
382
|
classes: "tna-tabs--demo",
|
@@ -237,38 +402,271 @@ const Template = ({ theme }) => {
|
|
237
402
|
</div>
|
238
403
|
</div>
|
239
404
|
<hr>
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
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—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",
|
246
566
|
href: "#",
|
247
|
-
src: "https://picsum.photos/id/237/800/600",
|
248
|
-
alt: "Photo of a puppy",
|
249
|
-
width: "800",
|
250
|
-
height: "600",
|
251
|
-
title: "Cat",
|
252
|
-
subtitle: "4 photos",
|
253
567
|
},
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
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
|
+
})}
|
272
670
|
</div>
|
273
671
|
</div>`;
|
274
672
|
};
|
@@ -277,24 +675,29 @@ export const System = Template.bind({});
|
|
277
675
|
// System.parameters = { options: { showPanel: false } };
|
278
676
|
System.args = {
|
279
677
|
theme: "system",
|
678
|
+
accent: "pink",
|
280
679
|
};
|
281
680
|
|
282
681
|
export const Light = Template.bind({});
|
283
682
|
Light.args = {
|
284
683
|
theme: "light",
|
684
|
+
accent: "pink",
|
285
685
|
};
|
286
686
|
|
287
687
|
export const Dark = Template.bind({});
|
288
688
|
Dark.args = {
|
289
689
|
theme: "dark",
|
690
|
+
accent: "pink",
|
290
691
|
};
|
291
692
|
|
292
693
|
export const LightHighContrast = Template.bind({});
|
293
694
|
LightHighContrast.args = {
|
294
695
|
theme: "light high-contrast",
|
696
|
+
accent: "pink",
|
295
697
|
};
|
296
698
|
|
297
699
|
export const DarkHighContrast = Template.bind({});
|
298
700
|
DarkHighContrast.args = {
|
299
701
|
theme: "dark high-contrast",
|
702
|
+
accent: "pink",
|
300
703
|
};
|