@nationalarchives/frontend 0.1.20-prerelease → 0.1.22-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/README.md +1 -1
- package/govuk-prototype-kit.config.json +7 -2
- package/nationalarchives/_prototype-kit.scss +16 -0
- package/nationalarchives/all.css +3 -3
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/all.mjs +17 -10
- package/nationalarchives/all.scss +1 -5
- package/nationalarchives/assets/images/favicon.ico +0 -0
- package/nationalarchives/assets/images/mask-icon.svg +17 -5
- package/nationalarchives/assets/images/mstile-150x150.png +0 -0
- package/nationalarchives/components/_index.scss +1 -0
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +5 -15
- package/nationalarchives/components/breadcrumbs/breadcrumbs.scss +12 -4
- package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +64 -0
- package/nationalarchives/components/breadcrumbs/fixtures.json +2 -2
- package/nationalarchives/components/breadcrumbs/template.njk +11 -15
- package/nationalarchives/components/button/_button-group.scss +1 -1
- package/nationalarchives/components/button/button.css +1 -13
- package/nationalarchives/components/button/button.css.map +1 -1
- package/nationalarchives/components/button/button.scss +24 -6
- package/nationalarchives/components/card/card.css +1 -13
- package/nationalarchives/components/card/card.css.map +1 -1
- package/nationalarchives/components/card/card.scss +52 -7
- package/nationalarchives/components/card/card.stories.js +78 -36
- package/nationalarchives/components/card/fixtures.json +40 -16
- package/nationalarchives/components/card/macro-options.json +26 -0
- package/nationalarchives/components/card/template.njk +38 -26
- package/nationalarchives/components/cookie-banner/cookie-banner.css +1 -13
- package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.js +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.mjs +15 -7
- package/nationalarchives/components/cookie-banner/cookie-banner.scss +9 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.stories.js +23 -10
- package/nationalarchives/components/cookie-banner/macro-options.json +1 -1
- package/nationalarchives/components/cookie-banner/template.njk +4 -4
- package/nationalarchives/components/filters/filters.css +1 -1
- package/nationalarchives/components/filters/filters.css.map +1 -1
- package/nationalarchives/components/filters/filters.scss +2 -2
- package/nationalarchives/components/footer/fixtures.json +1 -1
- package/nationalarchives/components/footer/footer.css +1 -13
- package/nationalarchives/components/footer/footer.css.map +1 -1
- package/nationalarchives/components/footer/footer.scss +8 -55
- package/nationalarchives/components/footer/footer.stories.js +1 -1
- package/nationalarchives/components/footer/template.njk +16 -14
- package/nationalarchives/components/gallery/gallery.css +1 -13
- package/nationalarchives/components/gallery/gallery.css.map +1 -1
- package/nationalarchives/components/gallery/template.njk +2 -2
- package/nationalarchives/components/grid/grid.css +1 -1
- package/nationalarchives/components/grid/grid.css.map +1 -1
- package/nationalarchives/components/grid/grid.scss +15 -11
- package/nationalarchives/components/grid/grid.stories.js +21 -0
- package/nationalarchives/components/grid/macro-options.json +48 -0
- package/nationalarchives/components/grid/template.njk +29 -3
- package/nationalarchives/components/header/header.css +1 -1
- package/nationalarchives/components/header/header.css.map +1 -1
- package/nationalarchives/components/header/header.scss +60 -145
- package/nationalarchives/components/header/header.stories.js +2 -0
- package/nationalarchives/components/header/macro-options.json +12 -0
- package/nationalarchives/components/header/template.njk +6 -1
- package/nationalarchives/components/hero/fixtures.json +166 -6
- package/nationalarchives/components/hero/hero.css +1 -1
- package/nationalarchives/components/hero/hero.css.map +1 -1
- package/nationalarchives/components/hero/hero.scss +187 -64
- package/nationalarchives/components/hero/hero.stories.js +98 -23
- package/nationalarchives/components/hero/macro-options.json +48 -12
- package/nationalarchives/components/hero/template.njk +34 -24
- package/nationalarchives/components/index-grid/index-grid.css +1 -1
- package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
- package/nationalarchives/components/index-grid/template.njk +2 -2
- package/nationalarchives/components/message/message.css +1 -1
- package/nationalarchives/components/message/message.css.map +1 -1
- package/nationalarchives/components/message/message.scss +4 -0
- package/nationalarchives/components/pagination/_index.scss +1 -0
- package/nationalarchives/components/pagination/fixtures.json +4 -0
- package/nationalarchives/components/pagination/macro-options.json +116 -0
- package/nationalarchives/components/pagination/macro.njk +3 -0
- package/nationalarchives/components/pagination/pagination.css +1 -0
- package/nationalarchives/components/pagination/pagination.css.map +1 -0
- package/nationalarchives/components/pagination/pagination.scss +98 -0
- package/nationalarchives/components/pagination/pagination.stories.js +73 -0
- package/nationalarchives/components/pagination/template.njk +38 -0
- package/nationalarchives/components/phase-banner/phase-banner.css +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.scss +5 -1
- package/nationalarchives/components/picture/picture.css +1 -13
- package/nationalarchives/components/picture/picture.css.map +1 -1
- package/nationalarchives/components/picture/picture.scss +1 -1
- package/nationalarchives/components/picture/picture.stories.js +2 -2
- package/nationalarchives/components/profile/profile.css +1 -1
- package/nationalarchives/components/profile/profile.css.map +1 -1
- package/nationalarchives/components/profile/template.njk +2 -2
- package/nationalarchives/components/sensitive-image/sensitive-image.css +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.css.map +1 -1
- package/nationalarchives/components/skip-link/fixtures.json +1 -1
- package/nationalarchives/components/skip-link/skip-link.css +1 -1
- package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
- package/nationalarchives/components/skip-link/skip-link.js +2 -0
- package/nationalarchives/components/skip-link/skip-link.js.map +1 -0
- package/nationalarchives/components/skip-link/skip-link.mjs +40 -0
- package/nationalarchives/components/skip-link/skip-link.scss +18 -16
- package/nationalarchives/components/skip-link/skip-link.stories.js +48 -6
- package/nationalarchives/components/skip-link/template.njk +1 -1
- package/nationalarchives/components/tabs/tabs.css +1 -1
- package/nationalarchives/components/tabs/tabs.css.map +1 -1
- package/nationalarchives/components/tabs/tabs.js +1 -1
- package/nationalarchives/components/tabs/tabs.js.map +1 -1
- package/nationalarchives/components/tabs/tabs.mjs +6 -2
- package/nationalarchives/components/tabs/tabs.scss +17 -2
- package/nationalarchives/components/tabs/tabs.stories.js +6 -6
- package/nationalarchives/lib/_font-awesome.scss +3 -2
- package/nationalarchives/lib/cookies.mjs +122 -50
- package/nationalarchives/stories/development/contributing.mdx +0 -10
- package/nationalarchives/stories/development/cookies.mdx +82 -0
- package/nationalarchives/stories/development/structure.mdx +88 -0
- package/nationalarchives/stories/development/using/compiled.mdx +9 -0
- package/nationalarchives/stories/development/using/hosted.mdx +53 -0
- package/nationalarchives/stories/development/using/npm.mdx +59 -0
- package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +333 -72
- package/nationalarchives/stories/utilities/overrides/overrides.stories.js +10 -21
- package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +2 -2
- package/nationalarchives/stories/utilities/typography/headings.stories.js +6 -3
- package/nationalarchives/stories/utilities/typography/lists.stories.js +93 -0
- package/nationalarchives/stories/utilities/typography/typography.mdx +11 -1
- package/nationalarchives/stories/utilities/typography/typography.stories.js +1 -1
- package/nationalarchives/templates/homepage.njk +11 -58
- package/nationalarchives/templates/layouts/_generic.njk +31 -14
- package/nationalarchives/templates/layouts/_prototype-kit.njk +11 -0
- package/nationalarchives/templates/search-results.njk +11 -15
- package/nationalarchives/templates/topics.njk +18 -22
- package/nationalarchives/tools/_colour.scss +77 -23
- package/nationalarchives/tools/_grid.scss +12 -12
- package/nationalarchives/tools/_media.scss +6 -0
- package/nationalarchives/tools/_spacing.scss +6 -6
- package/nationalarchives/tools/_typography.scss +4 -2
- package/nationalarchives/utilities/_a11y.scss +15 -0
- package/nationalarchives/utilities/_columns.scss +42 -0
- package/nationalarchives/utilities/_debug.scss +1 -1
- package/nationalarchives/utilities/_global.scss +32 -32
- package/nationalarchives/utilities/_index.scss +2 -0
- package/nationalarchives/utilities/_lists.scss +181 -0
- package/nationalarchives/utilities/_typography.scss +129 -138
- package/nationalarchives/variables/_assets.scss +2 -1
- package/nationalarchives/variables/_colour.scss +94 -74
- package/nationalarchives/variables/_features.scss +1 -0
- package/nationalarchives/variables/_grid.scss +5 -5
- package/nationalarchives/variables/_index.scss +1 -0
- package/nationalarchives/variables/_media.scss +29 -29
- package/nationalarchives/variables/_typography.scss +15 -12
- package/package.json +15 -14
- package/nationalarchives/_features.scss +0 -1
- package/nationalarchives/assets/images/tna-horizontal-logo-inverted.svg +0 -51
- package/nationalarchives/assets/images/tna-horizontal-logo.svg +0 -51
- package/nationalarchives/stories/design/about.mdx +0 -25
- package/nationalarchives/stories/development/relationships.mdx +0 -57
- package/nationalarchives/stories/development/using.mdx +0 -75
@@ -9,6 +9,7 @@ import Header from "../../../components/header/template.njk";
|
|
9
9
|
import Hero from "../../../components/hero/template.njk";
|
10
10
|
import IndexGrid from "../../../components/index-grid/template.njk";
|
11
11
|
import Message from "../../../components/message/template.njk";
|
12
|
+
import Pagination from "../../../components/pagination/template.njk";
|
12
13
|
import PhaseBanner from "../../../components/phase-banner/template.njk";
|
13
14
|
import Picture from "../../../components/picture/template.njk";
|
14
15
|
import Tabs from "../../../components/tabs/template.njk";
|
@@ -40,13 +41,13 @@ const Template = ({ theme, accent }) => {
|
|
40
41
|
supertitle: "Card supertitle",
|
41
42
|
title: "Card title",
|
42
43
|
headingLevel: 3,
|
43
|
-
headingSize: "
|
44
|
+
headingSize: "s",
|
44
45
|
href: "#",
|
45
46
|
imageSrc:
|
46
47
|
"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
47
48
|
imageAlt: "The National Archives office",
|
48
|
-
imageWidth:
|
49
|
-
imageHeight:
|
49
|
+
imageWidth: 499,
|
50
|
+
imageHeight: 333,
|
50
51
|
label: "New",
|
51
52
|
body: "<p>Card body</p>",
|
52
53
|
actions: [
|
@@ -86,11 +87,13 @@ const Template = ({ theme, accent }) => {
|
|
86
87
|
: ""
|
87
88
|
}">
|
88
89
|
<div class="tna-template__body tna-template__body--padded">
|
90
|
+
<!--
|
89
91
|
${CookieBanner({
|
90
92
|
params: {
|
91
93
|
cookiesUrl: "#",
|
92
94
|
},
|
93
95
|
})}
|
96
|
+
-->
|
94
97
|
${SkipLink({
|
95
98
|
params: {
|
96
99
|
href: "main-content",
|
@@ -101,6 +104,7 @@ const Template = ({ theme, accent }) => {
|
|
101
104
|
phase: "beta",
|
102
105
|
message:
|
103
106
|
'This is a new service - <a href="#">give us your feedback</a> to help improve it.',
|
107
|
+
classes: "tna-phase-banner--accent",
|
104
108
|
},
|
105
109
|
})}
|
106
110
|
${Header({
|
@@ -126,48 +130,53 @@ const Template = ({ theme, accent }) => {
|
|
126
130
|
],
|
127
131
|
},
|
128
132
|
})}
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
{
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
133
|
+
<div class="tna-container">
|
134
|
+
<div class="tna-column tna-column--full">
|
135
|
+
${Breadcrumbs({
|
136
|
+
params: {
|
137
|
+
items: [
|
138
|
+
{
|
139
|
+
text: "Alpha",
|
140
|
+
href: "#/alpha",
|
141
|
+
},
|
142
|
+
{
|
143
|
+
text: "Beta",
|
144
|
+
href: "#/beta",
|
145
|
+
},
|
146
|
+
{
|
147
|
+
text: "Gamma",
|
148
|
+
href: "#/gamma",
|
149
|
+
},
|
150
|
+
{
|
151
|
+
text: "Delta",
|
152
|
+
href: "#/delta",
|
153
|
+
},
|
154
|
+
{
|
155
|
+
text: "Epsilon",
|
156
|
+
href: "#/epsilon",
|
157
|
+
},
|
158
|
+
],
|
151
159
|
},
|
152
|
-
|
153
|
-
|
154
|
-
|
160
|
+
})}
|
161
|
+
</div>
|
162
|
+
</div>
|
155
163
|
<main id="main-content" role="main">
|
156
164
|
${Hero({
|
157
165
|
params: {
|
158
166
|
heading: "Title",
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
167
|
+
body: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
|
168
|
+
imageSrc:
|
169
|
+
"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
170
|
+
imageAlt: "The National Archives office",
|
171
|
+
imageWidth: 499,
|
172
|
+
imageHeight: 333,
|
173
|
+
imageCaption: "An interesting photo by a famous photographer ©2023",
|
165
174
|
classes: "tna-hero--demo",
|
166
175
|
},
|
167
176
|
})}
|
168
177
|
<div class="tna-container tna-section">
|
169
178
|
<div class="tna-column tna-column--width-2-3 tna-column--full-small tna-column--full-tiny">
|
170
|
-
<hgroup class="tna-hgroup
|
179
|
+
<hgroup class="tna-hgroup-l">
|
171
180
|
<p class="tna-hgroup__supertitle">TNA colour theme</p>
|
172
181
|
<h2 class="tna-hgroup__title">Heading</h2>
|
173
182
|
</hgroup>
|
@@ -224,50 +233,74 @@ const Template = ({ theme, accent }) => {
|
|
224
233
|
})}
|
225
234
|
</div>
|
226
235
|
</div>
|
227
|
-
<div class="tna-column tna-column--width-1-3 tna-column--full-small tna-column--full-tiny">
|
228
|
-
<div class="tna-
|
229
|
-
<
|
230
|
-
|
231
|
-
|
232
|
-
|
236
|
+
<div class="tna-column tna-column--no-padding tna-column--width-1-3 tna-column--full-medium tna-column--full-small tna-column--full-tiny">
|
237
|
+
<div class="tna-container tna-container--no-padding">
|
238
|
+
<div class="tna-column tna-column--full tna-column--width-1-2-medium tna-column--width-1-2-small tna-!--margin-top-l-medium tna-!--margin-top-l-small tna-!--margin-top-l-tiny">
|
239
|
+
<div class="tna-aside tna-background--contrast">
|
240
|
+
<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>
|
241
|
+
<div class="tna-button-group">
|
242
|
+
${Button({
|
243
|
+
params: {
|
244
|
+
text: "Accent button",
|
245
|
+
href: "#",
|
246
|
+
accent: true,
|
247
|
+
},
|
248
|
+
})}
|
249
|
+
</div>
|
250
|
+
</div>
|
251
|
+
</div>
|
252
|
+
<div class="tna-column tna-column--full tna-column--width-1-2-medium tna-column--width-1-2-small tna-!--margin-top-m tna-!--margin-top-l-medium tna-!--margin-top-l-small tna-!--margin-top-l-tiny">
|
253
|
+
<div class="tna-aside tna-background--accent">
|
254
|
+
<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
|
+
<div class="tna-button-group">
|
256
|
+
${Button({
|
257
|
+
params: {
|
258
|
+
text: "Primary button",
|
259
|
+
href: "#",
|
260
|
+
classes: "tna-button--solid-hover",
|
261
|
+
},
|
262
|
+
})}
|
263
|
+
</div>
|
264
|
+
</div>
|
265
|
+
</div>
|
233
266
|
</div>
|
234
267
|
</div>
|
235
268
|
</div>
|
236
269
|
<hr>
|
237
270
|
<div class="tna-container tna-section">
|
238
271
|
<div class="tna-column tna-column--full">
|
239
|
-
<h1 class="tna-heading
|
272
|
+
<h1 class="tna-heading-xl">
|
240
273
|
This is a heading (XL)
|
241
274
|
</h1>
|
242
275
|
<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>
|
243
|
-
<h2 class="tna-heading
|
276
|
+
<h2 class="tna-heading-l">
|
244
277
|
This is a heading (L)
|
245
278
|
</h2>
|
246
279
|
<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>
|
247
|
-
<h3 class="tna-heading
|
280
|
+
<h3 class="tna-heading-m">
|
248
281
|
This is a heading (M)
|
249
282
|
</h3>
|
250
283
|
<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>
|
251
|
-
<h4 class="tna-heading
|
284
|
+
<h4 class="tna-heading-s">
|
252
285
|
This is a heading (S)
|
253
286
|
</h4>
|
254
287
|
<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
|
288
|
+
<hgroup class="tna-hgroup-xl">
|
256
289
|
<p class="tna-hgroup__supertitle">Supertitle</p>
|
257
290
|
<h2 class="tna-hgroup__title">This is a heading (XL)</h2>
|
258
291
|
</hgroup>
|
259
292
|
<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
|
-
<hgroup class="tna-hgroup
|
293
|
+
<hgroup class="tna-hgroup-l">
|
261
294
|
<p class="tna-hgroup__supertitle">Supertitle</p>
|
262
295
|
<h2 class="tna-hgroup__title">This is a heading (L)</h2>
|
263
296
|
</hgroup>
|
264
297
|
<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>
|
265
|
-
<hgroup class="tna-hgroup
|
298
|
+
<hgroup class="tna-hgroup-m">
|
266
299
|
<p class="tna-hgroup__supertitle">Supertitle</p>
|
267
300
|
<h2 class="tna-hgroup__title">This is a heading (M)</h2>
|
268
301
|
</hgroup>
|
269
302
|
<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>
|
270
|
-
<hgroup class="tna-hgroup
|
303
|
+
<hgroup class="tna-hgroup-s">
|
271
304
|
<p class="tna-hgroup__supertitle">Supertitle</p>
|
272
305
|
<h2 class="tna-hgroup__title">This is a heading (S)</h2>
|
273
306
|
</hgroup>
|
@@ -281,18 +314,66 @@ const Template = ({ theme, accent }) => {
|
|
281
314
|
</div>
|
282
315
|
<p class="tna-blockquote__author">Douglas Adams, Mostly Harmless</p>
|
283
316
|
</blockquote>
|
284
|
-
<h2 class="tna-heading
|
317
|
+
<h2 class="tna-heading-m">
|
285
318
|
<a href="#">Reaerching with The National Archives</a>
|
286
319
|
</h2>
|
287
320
|
<p>Lorem ipsum <a href="#">link</a></p>
|
288
|
-
<hgroup class="tna-hgroup
|
321
|
+
<hgroup class="tna-hgroup-m">
|
289
322
|
<p class="tna-hgroup__supertitle">Supertitle</p>
|
290
323
|
<h2 class="tna-hgroup__title">
|
291
324
|
<a href="#">Reaerching with The National Archives</a>
|
292
325
|
</h2>
|
293
326
|
</hgroup>
|
294
327
|
<p>Lorem ipsum <a href="#">link</a></p>
|
295
|
-
|
328
|
+
</div>
|
329
|
+
<div class="tna-column tna-column--width-1-2 tna-column--full-small tna-column--full-tiny tna-!--margin-top-m">
|
330
|
+
<h3 class="tna-heading-m">
|
331
|
+
Descriptions
|
332
|
+
</h3>
|
333
|
+
<dl class="tna-dl">
|
334
|
+
<dt>Alpha</dt>
|
335
|
+
<dd>Lorem ipsum</dd>
|
336
|
+
<dt>Beta</dt>
|
337
|
+
<dd>Lorem ipsum</dd>
|
338
|
+
<dt>Gamma</dt>
|
339
|
+
<dd>Lorem ipsum</dd>
|
340
|
+
</dl>
|
341
|
+
</div>
|
342
|
+
<div class="tna-column tna-column--width-1-2 tna-column--full-small tna-column--full-tiny tna-!--margin-top-m">
|
343
|
+
<h3 class="tna-heading-m">
|
344
|
+
Descriptions
|
345
|
+
</h3>
|
346
|
+
<dl class="tna-dl tna-dl--plain">
|
347
|
+
<dt>Alpha</dt>
|
348
|
+
<dd>Lorem ipsum</dd>
|
349
|
+
<dt>Beta</dt>
|
350
|
+
<dd>Lorem ipsum</dd>
|
351
|
+
<dt>Gamma</dt>
|
352
|
+
<dd>Lorem ipsum</dd>
|
353
|
+
</dl>
|
354
|
+
</div>
|
355
|
+
<div class="tna-column tna-column--full tna-!--margin-top-m">
|
356
|
+
<h3 class="tna-heading-m">
|
357
|
+
Descriptions
|
358
|
+
</h3>
|
359
|
+
<dl class="tna-dl tna-dl--icon-padding ">
|
360
|
+
<dt>
|
361
|
+
<i class="fa-solid fa-landmark"></i>
|
362
|
+
Held by
|
363
|
+
</dt>
|
364
|
+
<dd>The National Archives, Kew</dd>
|
365
|
+
<dt>
|
366
|
+
<i class="fa-solid fa-calendar"></i>
|
367
|
+
Date
|
368
|
+
</dt>
|
369
|
+
<dd>1972–1979</dd>
|
370
|
+
<dt>
|
371
|
+
<i class="fa-solid fa-database"></i>
|
372
|
+
Reference
|
373
|
+
</dt>
|
374
|
+
<dd>LC 4</dd>
|
375
|
+
</dl>
|
376
|
+
<h2 class="tna-heading-l">
|
296
377
|
Categories
|
297
378
|
</h2>
|
298
379
|
<ul class="tna-chip-list">
|
@@ -317,15 +398,26 @@ const Template = ({ theme, accent }) => {
|
|
317
398
|
<hr>
|
318
399
|
<div class="tna-container tna-section">
|
319
400
|
<div class="tna-column tna-column--full">
|
320
|
-
<p
|
321
|
-
<p class="tna-!--no-margin-
|
322
|
-
<p class="tna-!--
|
323
|
-
<p class="tna-!--
|
324
|
-
<p class="tna-!--
|
325
|
-
<p class="tna-!--
|
401
|
+
<p>Lorem ipsum</p>
|
402
|
+
<p class="tna-!--no-margin-top">Lorem ipsum (tna-!--no-margin-top)</p>
|
403
|
+
<p class="tna-!--margin-top-xs">Lorem ipsum (tna-!--margin-top-xs)</p>
|
404
|
+
<p class="tna-!--margin-top-s">Lorem ipsum (tna-!--margin-top-s)</p>
|
405
|
+
<p class="tna-!--margin-top-m">Lorem ipsum (tna-!--margin-top-m)</p>
|
406
|
+
<p class="tna-!--margin-top-l">Lorem ipsum (tna-!--margin-top-l)</p>
|
407
|
+
<p class="tna-!--margin-top-xl">Lorem ipsum (tna-!--margin-top-xl)</p>
|
326
408
|
</div>
|
327
409
|
</div>
|
328
|
-
|
410
|
+
${Hero({
|
411
|
+
params: {
|
412
|
+
imageSrc:
|
413
|
+
"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
414
|
+
imageAlt: "The National Archives office",
|
415
|
+
imageWidth: 499,
|
416
|
+
imageHeight: 333,
|
417
|
+
imageCaption: "An interesting photo by a famous photographer ©2023",
|
418
|
+
classes: "tna-hero--demo",
|
419
|
+
},
|
420
|
+
})}
|
329
421
|
<div class="tna-container tna-section tna-!--padding-bottom-s">
|
330
422
|
<div class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny">
|
331
423
|
${Card({
|
@@ -395,17 +487,17 @@ const Template = ({ theme, accent }) => {
|
|
395
487
|
{
|
396
488
|
id: "unique-id-a",
|
397
489
|
title: "Alpha section",
|
398
|
-
body: '<h2 class="tna-heading">Alpha title</h2><p>Lorem ipsum</p>',
|
490
|
+
body: '<h2 class="tna-heading-l">Alpha title</h2><p>Lorem ipsum</p>',
|
399
491
|
},
|
400
492
|
{
|
401
493
|
id: "unique-id-b",
|
402
494
|
title: "Beta section",
|
403
|
-
body: '<h2 class="tna-heading">Beta title</h2><p>Lorem ipsum</p>',
|
495
|
+
body: '<h2 class="tna-heading-l">Beta title</h2><p>Lorem ipsum</p>',
|
404
496
|
},
|
405
497
|
{
|
406
498
|
id: "unique-id-c",
|
407
499
|
title: "Gamma section",
|
408
|
-
body: '<h2 class="tna-heading">Gamma title</h2><p>Lorem ipsum</p>',
|
500
|
+
body: '<h2 class="tna-heading-l">Gamma title</h2><p>Lorem ipsum</p>',
|
409
501
|
},
|
410
502
|
],
|
411
503
|
classes: "tna-tabs--demo",
|
@@ -420,8 +512,8 @@ const Template = ({ theme, accent }) => {
|
|
420
512
|
params: {
|
421
513
|
src: "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
422
514
|
alt: "The National Archives office",
|
423
|
-
width:
|
424
|
-
height:
|
515
|
+
width: 499,
|
516
|
+
height: 333,
|
425
517
|
caption: "<p>This is a pretty image</p>",
|
426
518
|
transcript: "<p>Lorem ipsum transcript</p>",
|
427
519
|
translation: "<p>Lorem ipsum translation</p>",
|
@@ -521,9 +613,51 @@ const Template = ({ theme, accent }) => {
|
|
521
613
|
})}
|
522
614
|
<div class="tna-container">
|
523
615
|
<div class="tna-column tna-column--full">
|
616
|
+
${Pagination({
|
617
|
+
params: {
|
618
|
+
landmarkLabel: "My dogs 1 results",
|
619
|
+
previous: {
|
620
|
+
href: "#",
|
621
|
+
},
|
622
|
+
items: [
|
623
|
+
{
|
624
|
+
number: 1,
|
625
|
+
href: "#",
|
626
|
+
},
|
627
|
+
{
|
628
|
+
ellipsis: true,
|
629
|
+
},
|
630
|
+
{
|
631
|
+
number: 6,
|
632
|
+
href: "#",
|
633
|
+
},
|
634
|
+
{
|
635
|
+
number: 7,
|
636
|
+
current: true,
|
637
|
+
href: "#",
|
638
|
+
},
|
639
|
+
{
|
640
|
+
number: 8,
|
641
|
+
href: "#",
|
642
|
+
},
|
643
|
+
{
|
644
|
+
ellipsis: true,
|
645
|
+
},
|
646
|
+
{
|
647
|
+
number: 42,
|
648
|
+
href: "#",
|
649
|
+
},
|
650
|
+
],
|
651
|
+
next: {
|
652
|
+
href: "#",
|
653
|
+
},
|
654
|
+
classes: "tna-pagination--demo",
|
655
|
+
},
|
656
|
+
})}
|
524
657
|
<div class="tna-button-group">
|
525
|
-
<a href="#" class="tna-button">Primary button</a>
|
526
|
-
<a href="#" class="tna-button tna-button--accent">Accent button</a>
|
658
|
+
<a href="#" class="tna-button" role="button">Primary button</a>
|
659
|
+
<a href="#" class="tna-button tna-button--accent" role="button">Accent button</a>
|
660
|
+
<a href="" class="tna-button tna-button--plain" role="button">Plain button</a>
|
527
661
|
</div>
|
528
662
|
</div>
|
529
663
|
</div>
|
@@ -561,9 +695,51 @@ const Template = ({ theme, accent }) => {
|
|
561
695
|
})}
|
562
696
|
<div class="tna-container">
|
563
697
|
<div class="tna-column tna-column--full">
|
698
|
+
${Pagination({
|
699
|
+
params: {
|
700
|
+
landmarkLabel: "My dogs 2 results",
|
701
|
+
previous: {
|
702
|
+
href: "#",
|
703
|
+
},
|
704
|
+
items: [
|
705
|
+
{
|
706
|
+
number: 1,
|
707
|
+
href: "#",
|
708
|
+
},
|
709
|
+
{
|
710
|
+
ellipsis: true,
|
711
|
+
},
|
712
|
+
{
|
713
|
+
number: 6,
|
714
|
+
href: "#",
|
715
|
+
},
|
716
|
+
{
|
717
|
+
number: 7,
|
718
|
+
current: true,
|
719
|
+
href: "#",
|
720
|
+
},
|
721
|
+
{
|
722
|
+
number: 8,
|
723
|
+
href: "#",
|
724
|
+
},
|
725
|
+
{
|
726
|
+
ellipsis: true,
|
727
|
+
},
|
728
|
+
{
|
729
|
+
number: 42,
|
730
|
+
href: "#",
|
731
|
+
},
|
732
|
+
],
|
733
|
+
next: {
|
734
|
+
href: "#",
|
735
|
+
},
|
736
|
+
classes: "tna-pagination--demo",
|
737
|
+
},
|
738
|
+
})}
|
564
739
|
<div class="tna-button-group">
|
565
|
-
<a href="#" class="tna-button">Primary button</a>
|
566
|
-
<a href="#" class="tna-button tna-button--accent">Accent button</a>
|
740
|
+
<a href="#" class="tna-button" role="button">Primary button</a>
|
741
|
+
<a href="#" class="tna-button tna-button--accent" role="button">Accent button</a>
|
742
|
+
<a href="" class="tna-button tna-button--plain" role="button">Plain button</a>
|
567
743
|
</div>
|
568
744
|
</div>
|
569
745
|
</div>
|
@@ -601,9 +777,51 @@ const Template = ({ theme, accent }) => {
|
|
601
777
|
})}
|
602
778
|
<div class="tna-container">
|
603
779
|
<div class="tna-column tna-column--full">
|
780
|
+
${Pagination({
|
781
|
+
params: {
|
782
|
+
landmarkLabel: "My dogs 3 results",
|
783
|
+
previous: {
|
784
|
+
href: "#",
|
785
|
+
},
|
786
|
+
items: [
|
787
|
+
{
|
788
|
+
number: 1,
|
789
|
+
href: "#",
|
790
|
+
},
|
791
|
+
{
|
792
|
+
ellipsis: true,
|
793
|
+
},
|
794
|
+
{
|
795
|
+
number: 6,
|
796
|
+
href: "#",
|
797
|
+
},
|
798
|
+
{
|
799
|
+
number: 7,
|
800
|
+
current: true,
|
801
|
+
href: "#",
|
802
|
+
},
|
803
|
+
{
|
804
|
+
number: 8,
|
805
|
+
href: "#",
|
806
|
+
},
|
807
|
+
{
|
808
|
+
ellipsis: true,
|
809
|
+
},
|
810
|
+
{
|
811
|
+
number: 42,
|
812
|
+
href: "#",
|
813
|
+
},
|
814
|
+
],
|
815
|
+
next: {
|
816
|
+
href: "#",
|
817
|
+
},
|
818
|
+
classes: "tna-pagination--demo",
|
819
|
+
},
|
820
|
+
})}
|
604
821
|
<div class="tna-button-group">
|
605
|
-
<a href="#" class="tna-button">Primary button</a>
|
606
|
-
<a href="#" class="tna-button tna-button--accent">Accent button</a>
|
822
|
+
<a href="#" class="tna-button" role="button">Primary button</a>
|
823
|
+
<a href="#" class="tna-button tna-button--accent" role="button">Accent button</a>
|
824
|
+
<a href="" class="tna-button tna-button--plain" role="button">Plain button</a>
|
607
825
|
</div>
|
608
826
|
</div>
|
609
827
|
</div>
|
@@ -641,8 +859,51 @@ const Template = ({ theme, accent }) => {
|
|
641
859
|
})}
|
642
860
|
<div class="tna-container">
|
643
861
|
<div class="tna-column tna-column--full">
|
862
|
+
${Pagination({
|
863
|
+
params: {
|
864
|
+
landmarkLabel: "My dogs 4 results",
|
865
|
+
previous: {
|
866
|
+
href: "#",
|
867
|
+
},
|
868
|
+
items: [
|
869
|
+
{
|
870
|
+
number: 1,
|
871
|
+
href: "#",
|
872
|
+
},
|
873
|
+
{
|
874
|
+
ellipsis: true,
|
875
|
+
},
|
876
|
+
{
|
877
|
+
number: 6,
|
878
|
+
href: "#",
|
879
|
+
},
|
880
|
+
{
|
881
|
+
number: 7,
|
882
|
+
current: true,
|
883
|
+
href: "#",
|
884
|
+
},
|
885
|
+
{
|
886
|
+
number: 8,
|
887
|
+
href: "#",
|
888
|
+
},
|
889
|
+
{
|
890
|
+
ellipsis: true,
|
891
|
+
},
|
892
|
+
{
|
893
|
+
number: 42,
|
894
|
+
href: "#",
|
895
|
+
},
|
896
|
+
],
|
897
|
+
next: {
|
898
|
+
href: "#",
|
899
|
+
},
|
900
|
+
classes: "tna-pagination--demo",
|
901
|
+
},
|
902
|
+
})}
|
644
903
|
<div class="tna-button-group">
|
645
|
-
<a href="#" class="tna-button">Primary button</a>
|
904
|
+
<a href="#" class="tna-button" role="button">Primary button</a>
|
905
|
+
<a href="#" class="tna-button tna-button--accent" role="button">Accent button</a>
|
906
|
+
<a href="" class="tna-button tna-button--plain" role="button">Plain button</a>
|
646
907
|
</div>
|
647
908
|
</div>
|
648
909
|
</div>
|
@@ -730,7 +991,7 @@ const Template = ({ theme, accent }) => {
|
|
730
991
|
],
|
731
992
|
},
|
732
993
|
{
|
733
|
-
title: "Our websites
|
994
|
+
title: "Our websites",
|
734
995
|
items: [
|
735
996
|
{
|
736
997
|
text: "UK Government Web Archive",
|
@@ -1,30 +1,19 @@
|
|
1
|
-
const argTypes = {
|
2
|
-
marginTop: {
|
3
|
-
control: "radio",
|
4
|
-
options: ["none", "xs", "s", "m", "l", "xl"],
|
5
|
-
},
|
6
|
-
};
|
1
|
+
const argTypes = {};
|
7
2
|
|
8
3
|
export default {
|
9
4
|
title: "Utilities/Overrides",
|
10
5
|
argTypes,
|
11
6
|
};
|
12
7
|
|
13
|
-
const Template = (
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<p class="tna-!--margin-bottom-s">Lorem ipsum (tna-!--margin-bottom-s)</p>
|
22
|
-
<p class="tna-!--margin-bottom-xs">Lorem ipsum (tna-!--margin-bottom-xs)</p>
|
23
|
-
<p class="tna-!--no-margin-bottom">Lorem ipsum (tna-!--no-margin-bottom)</p>
|
24
|
-
<p class="${marginClass}">Lorem ipsum (${marginClass})</p>`;
|
8
|
+
const Template = () => {
|
9
|
+
return `<p>Lorem ipsum</p>
|
10
|
+
<p class="tna-!--no-margin-top">Lorem ipsum (tna-!--no-margin-top)</p>
|
11
|
+
<p class="tna-!--margin-top-xs">Lorem ipsum (tna-!--margin-top-xs)</p>
|
12
|
+
<p class="tna-!--margin-top-s">Lorem ipsum (tna-!--margin-top-s)</p>
|
13
|
+
<p class="tna-!--margin-top-m">Lorem ipsum (tna-!--margin-top-m)</p>
|
14
|
+
<p class="tna-!--margin-top-l">Lorem ipsum (tna-!--margin-top-l)</p>
|
15
|
+
<p class="tna-!--margin-top-xl">Lorem ipsum (tna-!--margin-top-xl)</p>`;
|
25
16
|
};
|
26
17
|
|
27
18
|
export const Margin = Template.bind({});
|
28
|
-
Margin.args = {
|
29
|
-
marginTop: "none",
|
30
|
-
};
|
19
|
+
Margin.args = {};
|
@@ -19,13 +19,13 @@ const Template = ({
|
|
19
19
|
singleSentence,
|
20
20
|
}) =>
|
21
21
|
singleSentence
|
22
|
-
? `<hgroup class="tna-hgroup
|
22
|
+
? `<hgroup class="tna-hgroup-${size}">
|
23
23
|
<h${level} class="tna-hgroup__title">
|
24
24
|
<span class="tna-hgroup__supertitle">${supertitle}</span>
|
25
25
|
<span class="tna-hgroup__title">${title}</span>
|
26
26
|
</h${level}>
|
27
27
|
</hgroup>`
|
28
|
-
: `<hgroup class="tna-hgroup
|
28
|
+
: `<hgroup class="tna-hgroup-${size}">
|
29
29
|
<p class="tna-hgroup__supertitle">${supertitle}</p>
|
30
30
|
<h${level} class="tna-hgroup__title">${title}</h${level}>
|
31
31
|
</hgroup>`;
|
@@ -8,8 +8,8 @@ export default {
|
|
8
8
|
argTypes,
|
9
9
|
};
|
10
10
|
|
11
|
-
const HeadingTemplate = ({ params }, level) => `<h${level} class="tna-heading
|
12
|
-
params.size
|
11
|
+
const HeadingTemplate = ({ params }, level) => `<h${level} class="tna-heading-${
|
12
|
+
params.size
|
13
13
|
}">
|
14
14
|
${params.text} (${params.size.toUpperCase()})
|
15
15
|
</h${level}>
|
@@ -19,7 +19,10 @@ const HeadingsTemplate = ({ text }) =>
|
|
19
19
|
`${HeadingTemplate({ params: { text, size: "xl" } }, 1)}${HeadingTemplate(
|
20
20
|
{ params: { text, size: "l" } },
|
21
21
|
2,
|
22
|
-
)}${HeadingTemplate({ params: { text, size: "m" } }, 3)}
|
22
|
+
)}${HeadingTemplate({ params: { text, size: "m" } }, 3)}${HeadingTemplate(
|
23
|
+
{ params: { text, size: "s" } },
|
24
|
+
4,
|
25
|
+
)}`;
|
23
26
|
|
24
27
|
export const Headings = HeadingsTemplate.bind({});
|
25
28
|
Headings.args = {
|