@nationalarchives/frontend 0.1.16-prerelease → 0.1.18-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/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/breadcrumbs/_index.scss +2 -2
- package/nationalarchives/components/button/_button-group.scss +18 -0
- package/nationalarchives/components/button/_index.scss +24 -7
- package/nationalarchives/components/button/button.stories.js +63 -6
- 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 +62 -47
- package/nationalarchives/components/card/card.stories.js +59 -8
- package/nationalarchives/components/card/fixtures.json +59 -20
- package/nationalarchives/components/card/macro-options.json +14 -2
- package/nationalarchives/components/card/template.njk +12 -8
- package/nationalarchives/components/filters/_index.scss +19 -14
- package/nationalarchives/components/footer/_index.scss +194 -60
- package/nationalarchives/components/footer/fixtures.json +1 -1
- package/nationalarchives/components/footer/footer.stories.js +80 -71
- package/nationalarchives/components/footer/macro-options.json +34 -8
- package/nationalarchives/components/footer/template.njk +110 -53
- package/nationalarchives/components/header/_index.scss +40 -4
- package/nationalarchives/components/hero/_index.scss +1 -1
- package/nationalarchives/components/index-grid/_index.scss +27 -5
- package/nationalarchives/components/index-grid/index-grid.stories.js +25 -1
- 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 +8 -0
- package/nationalarchives/components/picture/_index.scss +2 -0
- 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/skip-link/skip-link.stories.js +3 -2
- package/nationalarchives/components/tabs/_index.scss +6 -3
- package/nationalarchives/components/tabs/tabs.stories.js +6 -6
- 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 +483 -97
- package/nationalarchives/stories/utilities/overrides/overrides.mdx +37 -57
- 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 +1 -1
- package/nationalarchives/tools/_colour.scss +86 -41
- package/nationalarchives/tools/_typography.scss +13 -0
- package/nationalarchives/utilities/_font-awesome.scss +5 -0
- package/nationalarchives/utilities/_global.scss +70 -26
- package/nationalarchives/utilities/_index.scss +1 -0
- package/nationalarchives/utilities/_overrides.scss +42 -10
- package/nationalarchives/utilities/_typography.scss +198 -59
- package/nationalarchives/variables/_assets.scss +1 -0
- package/nationalarchives/variables/_colour.scss +29 -23
- package/nationalarchives/variables/_index.scss +1 -0
- package/nationalarchives/variables/_spacing.scss +3 -1
- package/nationalarchives/variables/_typography.scss +4 -1
- package/package.json +13 -13
- package/nationalarchives/patterns/_index.scss +0 -1
- package/nationalarchives/patterns/featured-collection/_index.scss +0 -13
- package/nationalarchives/patterns/featured-collection/featured-collection.stories.js +0 -34
- package/nationalarchives/patterns/featured-collection/macro-options.json +0 -20
- package/nationalarchives/patterns/featured-collection/macro.njk +0 -3
- package/nationalarchives/patterns/featured-collection/template.njk +0 -96
@@ -2,6 +2,7 @@
|
|
2
2
|
@use "../tools/colour";
|
3
3
|
@use "../tools/media";
|
4
4
|
@use "../tools/typography";
|
5
|
+
@use "../variables/grid";
|
5
6
|
|
6
7
|
// TODO: Temporary - will eventually bundle font files into package
|
7
8
|
@import "https://fonts.googleapis.com/css2?family=Open+Sans:wght@500;700&family=Roboto+Mono:wght@400&display=swap";
|
@@ -63,7 +64,23 @@ a {
|
|
63
64
|
|
64
65
|
&:hover,
|
65
66
|
&:active {
|
66
|
-
text-decoration
|
67
|
+
@include typography.interacted-text-decoration;
|
68
|
+
}
|
69
|
+
|
70
|
+
&.tna-chip {
|
71
|
+
// display: block;
|
72
|
+
|
73
|
+
text-decoration: none;
|
74
|
+
|
75
|
+
&,
|
76
|
+
&:link,
|
77
|
+
&:visited {
|
78
|
+
@include colour.colour-font("font-dark");
|
79
|
+
}
|
80
|
+
|
81
|
+
&:hover {
|
82
|
+
@include typography.interacted-text-decoration;
|
83
|
+
}
|
67
84
|
}
|
68
85
|
}
|
69
86
|
|
@@ -77,7 +94,7 @@ a {
|
|
77
94
|
}
|
78
95
|
|
79
96
|
li::marker {
|
80
|
-
@include colour.colour-font("accent");
|
97
|
+
@include colour.colour-font("accent-background");
|
81
98
|
font-weight: 700;
|
82
99
|
}
|
83
100
|
|
@@ -88,7 +105,76 @@ a {
|
|
88
105
|
}
|
89
106
|
}
|
90
107
|
|
91
|
-
|
108
|
+
%chip {
|
109
|
+
max-width: max-content;
|
110
|
+
padding: 0.375em 0.5rem;
|
111
|
+
|
112
|
+
// display: inline-block;
|
113
|
+
display: block;
|
114
|
+
|
115
|
+
@include colour.colour-font("font-dark");
|
116
|
+
@include typography.detail-font-small;
|
117
|
+
line-height: 1;
|
118
|
+
|
119
|
+
@include colour.accent;
|
120
|
+
}
|
121
|
+
|
122
|
+
.tna-chip {
|
123
|
+
@extend %chip;
|
124
|
+
}
|
125
|
+
|
126
|
+
.tna-chip-list {
|
127
|
+
padding-left: 0;
|
128
|
+
|
129
|
+
display: flex;
|
130
|
+
flex-wrap: wrap;
|
131
|
+
|
132
|
+
list-style: none;
|
133
|
+
|
134
|
+
&__item {
|
135
|
+
margin: 0 1rem 1rem 0;
|
136
|
+
|
137
|
+
display: inline-block;
|
138
|
+
}
|
139
|
+
}
|
140
|
+
|
141
|
+
%heading-xl {
|
142
|
+
@include typography.relative-font-size(64);
|
143
|
+
line-height: 1.2;
|
144
|
+
|
145
|
+
@include media.on-medium {
|
146
|
+
@include typography.relative-font-size(42);
|
147
|
+
}
|
148
|
+
|
149
|
+
@include media.on-mobile {
|
150
|
+
@include typography.relative-font-size(36);
|
151
|
+
}
|
152
|
+
}
|
153
|
+
|
154
|
+
%heading-l {
|
155
|
+
@include typography.relative-font-size(32);
|
156
|
+
line-height: 1.4;
|
157
|
+
|
158
|
+
@include media.on-medium {
|
159
|
+
@include typography.relative-font-size(26);
|
160
|
+
}
|
161
|
+
|
162
|
+
@include media.on-mobile {
|
163
|
+
@include typography.relative-font-size(24);
|
164
|
+
}
|
165
|
+
}
|
166
|
+
|
167
|
+
%heading-m {
|
168
|
+
@include typography.relative-font-size(20);
|
169
|
+
line-height: 1.6;
|
170
|
+
}
|
171
|
+
|
172
|
+
%heading-s {
|
173
|
+
@include typography.relative-font-size(18);
|
174
|
+
line-height: 1.6;
|
175
|
+
}
|
176
|
+
|
177
|
+
%heading {
|
92
178
|
margin-bottom: 1rem;
|
93
179
|
|
94
180
|
@include colour.colour-font("font-dark");
|
@@ -98,99 +184,91 @@ a {
|
|
98
184
|
margin-bottom: 0;
|
99
185
|
}
|
100
186
|
|
101
|
-
|
102
|
-
|
103
|
-
|
187
|
+
a {
|
188
|
+
&::after {
|
189
|
+
padding-left: 0.25rem;
|
190
|
+
|
191
|
+
display: inline-block;
|
104
192
|
|
105
|
-
|
106
|
-
|
193
|
+
font-weight: 700;
|
194
|
+
|
195
|
+
content: "\203A";
|
107
196
|
}
|
108
197
|
|
109
|
-
|
110
|
-
|
198
|
+
&:hover {
|
199
|
+
&::after {
|
200
|
+
transform: translateX(0.25rem);
|
201
|
+
}
|
111
202
|
}
|
112
203
|
}
|
204
|
+
}
|
113
205
|
|
114
|
-
|
115
|
-
|
116
|
-
|
206
|
+
.tna-heading {
|
207
|
+
@extend %heading;
|
208
|
+
// @extend %heading-l;
|
117
209
|
|
118
|
-
|
119
|
-
|
120
|
-
|
210
|
+
&--xl {
|
211
|
+
@extend %heading-xl;
|
212
|
+
}
|
121
213
|
|
122
|
-
|
123
|
-
|
124
|
-
}
|
214
|
+
&--l {
|
215
|
+
@extend %heading-l;
|
125
216
|
}
|
126
217
|
|
127
218
|
&--m {
|
128
|
-
@
|
129
|
-
line-height: 1.4;
|
219
|
+
@extend %heading-m;
|
130
220
|
}
|
131
221
|
|
132
222
|
&--s {
|
133
|
-
@
|
134
|
-
line-height: 1.6;
|
223
|
+
@extend %heading-s;
|
135
224
|
}
|
136
225
|
}
|
137
226
|
|
138
227
|
.tna-hgroup {
|
139
228
|
margin-bottom: 1rem;
|
140
229
|
|
141
|
-
&:last-child {
|
142
|
-
margin-bottom: 0;
|
143
|
-
}
|
144
|
-
|
145
230
|
&__supertitle {
|
146
231
|
margin: 0 0 0.5rem;
|
147
232
|
|
148
|
-
@
|
149
|
-
@include typography.detail-font;
|
150
|
-
|
151
|
-
.tna-hgroup & {
|
152
|
-
// margin: 0;
|
153
|
-
}
|
233
|
+
@extend %chip;
|
154
234
|
}
|
155
235
|
|
156
236
|
&__title {
|
157
237
|
margin: 0;
|
158
238
|
|
159
|
-
|
239
|
+
display: block;
|
160
240
|
|
161
|
-
|
162
|
-
|
241
|
+
@extend %heading;
|
242
|
+
// @extend %heading-l;
|
243
|
+
}
|
163
244
|
|
164
|
-
|
165
|
-
|
245
|
+
&--xl &__title {
|
246
|
+
@extend %heading-xl;
|
166
247
|
}
|
167
248
|
|
168
|
-
&--
|
169
|
-
|
170
|
-
@include typography.relative-font-size(64);
|
171
|
-
line-height: 1;
|
172
|
-
}
|
249
|
+
&--l &__title {
|
250
|
+
@extend %heading-l;
|
173
251
|
}
|
174
252
|
|
175
|
-
&--
|
176
|
-
|
177
|
-
@include typography.relative-font-size(32);
|
178
|
-
line-height: 1.2;
|
179
|
-
}
|
253
|
+
&--m &__title {
|
254
|
+
@extend %heading-m;
|
180
255
|
}
|
181
256
|
|
182
|
-
&--
|
183
|
-
|
184
|
-
@include typography.relative-font-size(20);
|
185
|
-
line-height: 1.4;
|
186
|
-
}
|
257
|
+
&--s &__title {
|
258
|
+
@extend %heading-s;
|
187
259
|
}
|
260
|
+
}
|
188
261
|
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
262
|
+
.tna-heading,
|
263
|
+
.tna-hgroup {
|
264
|
+
margin-top: 3rem;
|
265
|
+
|
266
|
+
&:first-child {
|
267
|
+
margin-top: 0;
|
268
|
+
}
|
269
|
+
|
270
|
+
&:last-child {
|
271
|
+
margin-bottom: 0;
|
194
272
|
}
|
195
273
|
}
|
196
274
|
|
@@ -198,7 +276,7 @@ a {
|
|
198
276
|
margin: 0 0 2rem;
|
199
277
|
padding: 1rem 1rem 1rem 2rem;
|
200
278
|
|
201
|
-
@include colour.colour-border("
|
279
|
+
@include colour.colour-border("accent-background", 0.35rem, solid, left);
|
202
280
|
|
203
281
|
// quotes: "“" "”" "‘" "’";
|
204
282
|
|
@@ -228,3 +306,64 @@ a {
|
|
228
306
|
}
|
229
307
|
}
|
230
308
|
}
|
309
|
+
|
310
|
+
.tna-scene-setter {
|
311
|
+
@include typography.detail-font;
|
312
|
+
@include colour.colour-font("font-dark");
|
313
|
+
@include typography.relative-font-size(30);
|
314
|
+
line-height: math.div(50, 30);
|
315
|
+
|
316
|
+
@include media.on-mobile {
|
317
|
+
@include typography.relative-font-size(24);
|
318
|
+
line-height: 2;
|
319
|
+
}
|
320
|
+
|
321
|
+
a {
|
322
|
+
color: inherit;
|
323
|
+
text-decoration-thickness: 2px;
|
324
|
+
|
325
|
+
&:hover {
|
326
|
+
text-decoration-thickness: 4.5px;
|
327
|
+
}
|
328
|
+
}
|
329
|
+
}
|
330
|
+
|
331
|
+
.tna-columns {
|
332
|
+
column-gap: grid.$gutter-width;
|
333
|
+
|
334
|
+
&--2 {
|
335
|
+
column-count: 2;
|
336
|
+
}
|
337
|
+
|
338
|
+
&--3 {
|
339
|
+
column-count: 3;
|
340
|
+
}
|
341
|
+
|
342
|
+
@include media.on-mobile {
|
343
|
+
column-gap: grid.$gutter-width-mobile;
|
344
|
+
}
|
345
|
+
|
346
|
+
@include media.on-small {
|
347
|
+
@for $i from 1 through 4 {
|
348
|
+
&--#{$i}-small {
|
349
|
+
column-count: $i;
|
350
|
+
}
|
351
|
+
}
|
352
|
+
}
|
353
|
+
|
354
|
+
@include media.on-tiny {
|
355
|
+
@for $i from 1 through 4 {
|
356
|
+
&--#{$i}-tiny {
|
357
|
+
column-count: $i;
|
358
|
+
}
|
359
|
+
}
|
360
|
+
}
|
361
|
+
|
362
|
+
&__block {
|
363
|
+
break-inside: avoid;
|
364
|
+
}
|
365
|
+
|
366
|
+
&:has(&__block:only-of-type) {
|
367
|
+
column-count: 1;
|
368
|
+
}
|
369
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
$tna-font-path: "assets/fonts" !default;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
@use "sass:map";
|
2
|
-
@use "../features";
|
3
2
|
|
4
3
|
$colour-palette-brand: (
|
5
4
|
"black": #000,
|
@@ -29,42 +28,47 @@ $colour-palette-brand: (
|
|
29
28
|
$dark-grey: #26262a;
|
30
29
|
$base-font: #343338;
|
31
30
|
|
32
|
-
$-accent-colour-default: map.get($colour-palette-brand, "yellow");
|
33
|
-
$-accent-colour-default-dark: $-accent-colour-default;
|
34
|
-
|
35
31
|
/*
|
36
32
|
=========================================
|
37
33
|
LIGHT THEME (DEFAULT)
|
38
34
|
=========================================
|
39
35
|
*/
|
40
36
|
$colour-palette-default: (
|
41
|
-
"page-background":
|
37
|
+
"page-background": #f4f4f4,
|
42
38
|
"font-base": $base-font,
|
43
39
|
"font-dark": map.get($colour-palette-brand, "black"),
|
44
40
|
"font-light": rgba($base-font, 0.7),
|
45
41
|
"link": #1d70ab,
|
46
42
|
"link-visited": #4c2c92,
|
47
|
-
// "focus-outline": #004c7e, // Old value
|
48
43
|
"focus-outline": map.get($colour-palette-brand, "blue"),
|
49
44
|
"keyline": #ccc,
|
50
45
|
"keyline-dark": $dark-grey,
|
51
|
-
"accent-default": $-accent-colour-default,
|
52
46
|
"button-primary-text": map.get($colour-palette-brand, "white"),
|
53
47
|
"button-primary-background": map.get($colour-palette-brand, "black"),
|
54
48
|
"button-primary-hover-text": map.get($colour-palette-brand, "black"),
|
55
49
|
"button-primary-hover-background": map.get($colour-palette-brand, "white"),
|
56
|
-
"
|
57
|
-
|
58
|
-
"button-secondary-hover-text": map.get($colour-palette-brand, "black"),
|
59
|
-
"button-secondary-hover-background": map.get($colour-palette-brand, "white"),
|
60
|
-
"contrast-background": $dark-grey,
|
50
|
+
"contrast-background": #1e1e1e,
|
51
|
+
// TODO: #343338 ?
|
61
52
|
"contrast-font-base": map.get($colour-palette-brand, "white"),
|
62
53
|
"contrast-font-dark": map.get($colour-palette-brand, "white"),
|
63
54
|
"contrast-font-light": rgba(map.get($colour-palette-brand, "white"), 0.7),
|
64
|
-
"contrast-link": map.get($colour-palette-brand, "
|
65
|
-
"contrast-link-visited": #b9f,
|
55
|
+
"contrast-link": map.get($colour-palette-brand, "white"),
|
56
|
+
// "contrast-link-visited": #b9f, // Don't show visited state on contrasting backgrounds
|
57
|
+
"contrast-link-visited": map.get($colour-palette-brand, "white"),
|
66
58
|
"contrast-keyline": rgba(map.get($colour-palette-brand, "white"), 0.5),
|
67
59
|
"contrast-keyline-dark": rgba(map.get($colour-palette-brand, "white"), 0.8),
|
60
|
+
"accent": map.get($colour-palette-brand, "light-grey"),
|
61
|
+
"accent-background": #111,
|
62
|
+
"accent-background-light": map.get($colour-palette-brand, "light-grey"),
|
63
|
+
"accent-font-base": map.get($colour-palette-brand, "white"),
|
64
|
+
"accent-font-dark": map.get($colour-palette-brand, "white"),
|
65
|
+
"accent-font-light": rgba(map.get($colour-palette-brand, "white"), 0.7),
|
66
|
+
"accent-link": map.get($colour-palette-brand, "white"),
|
67
|
+
"accent-link-visited": #b9f,
|
68
|
+
"accent-keyline": rgba(map.get($colour-palette-brand, "white"), 0.5),
|
69
|
+
"accent-keyline-dark": rgba(map.get($colour-palette-brand, "white"), 0.8),
|
70
|
+
"button-accent-text": map.get($colour-palette-brand, "black"),
|
71
|
+
"button-accent-background": map.get($colour-palette-brand, "grey"),
|
68
72
|
);
|
69
73
|
|
70
74
|
/*
|
@@ -75,7 +79,7 @@ DARK THEME
|
|
75
79
|
$colour-palette-dark: map.merge(
|
76
80
|
$colour-palette-default,
|
77
81
|
(
|
78
|
-
"page-background": #
|
82
|
+
"page-background": #111,
|
79
83
|
"font-base": rgba(map.get($colour-palette-brand, "white"), 0.95),
|
80
84
|
"font-dark": map.get($colour-palette-brand, "white"),
|
81
85
|
"font-light": rgba(map.get($colour-palette-brand, "white"), 0.5),
|
@@ -83,10 +87,15 @@ $colour-palette-dark: map.merge(
|
|
83
87
|
"link-visited": map.get($colour-palette-default, "contrast-link-visited"),
|
84
88
|
"keyline": rgba(map.get($colour-palette-brand, "white"), 0.25),
|
85
89
|
"keyline-dark": map.get($colour-palette-brand, "white"),
|
86
|
-
"
|
87
|
-
"
|
90
|
+
"button-primary-text": map.get($colour-palette-brand, "black"),
|
91
|
+
"button-primary-background": map.get($colour-palette-brand, "white"),
|
92
|
+
"button-primary-hover-text": map.get($colour-palette-brand, "white"),
|
93
|
+
"button-primary-hover-background": map.get($colour-palette-brand, "black"),
|
94
|
+
"contrast-background": #1e1e1e,
|
88
95
|
"contrast-link-visited":
|
89
96
|
map.get($colour-palette-default, "contrast-link-visited"),
|
97
|
+
// --accent-background-light is the same as --contrast-background on dark themes
|
98
|
+
"accent-background-light": #111,
|
90
99
|
)
|
91
100
|
);
|
92
101
|
|
@@ -98,6 +107,7 @@ LIGHT, HIGH_CONTRAST THEME
|
|
98
107
|
$colour-palette-high-contrast: map.merge(
|
99
108
|
$colour-palette-default,
|
100
109
|
(
|
110
|
+
"page-background": map.get($colour-palette-brand, "white"),
|
101
111
|
"font-base": map.get($colour-palette-brand, "black"),
|
102
112
|
"font-light": map.get($colour-palette-brand, "black"),
|
103
113
|
"link": map.get($colour-palette-brand, "navy"),
|
@@ -105,7 +115,7 @@ $colour-palette-high-contrast: map.merge(
|
|
105
115
|
"focus-outline": map.get($colour-palette-brand, "orange"),
|
106
116
|
"keyline": map.get($colour-palette-brand, "black"),
|
107
117
|
"keyline-dark": map.get($colour-palette-brand, "black"),
|
108
|
-
"contrast-background":
|
118
|
+
"contrast-background": #f4f4f4,
|
109
119
|
"contrast-font-base": map.get($colour-palette-brand, "black"),
|
110
120
|
"contrast-font-dark": map.get($colour-palette-brand, "black"),
|
111
121
|
"contrast-font-light": map.get($colour-palette-brand, "black"),
|
@@ -130,10 +140,6 @@ $colour-palette-high-contrast-dark: map.merge(
|
|
130
140
|
"link": map.get($colour-palette-brand, "white"),
|
131
141
|
"link-visited": map.get($colour-palette-brand, "white"),
|
132
142
|
"keyline": map.get($colour-palette-brand, "white"),
|
133
|
-
"
|
134
|
-
"button-primary-background": map.get($colour-palette-brand, "white"),
|
135
|
-
"button-primary-hover-text": map.get($colour-palette-brand, "white"),
|
136
|
-
"button-primary-hover-background": map.get($colour-palette-brand, "black"),
|
137
|
-
"contrast-background": map.get($colour-palette-brand, "black"),
|
143
|
+
"contrast-background": #111,
|
138
144
|
)
|
139
145
|
);
|
@@ -1,13 +1,16 @@
|
|
1
1
|
$base-font-size-px: 16;
|
2
2
|
|
3
|
+
$interactive-text-decoration-thickness: 3.5px;
|
4
|
+
|
3
5
|
$font-family-main: "Open Sans", sans-serif;
|
4
6
|
$font-weight-main: 500;
|
5
7
|
$font-weight-main-bold: 700;
|
6
8
|
|
7
|
-
$font-family-heading: supria-sans-condensed, sans-serif;
|
9
|
+
$font-family-heading: supria-sans-condensed, "Arial Narrow", sans-serif;
|
8
10
|
$font-weight-heading: 400;
|
9
11
|
|
10
12
|
$font-family-detail: "Roboto Mono", monospace;
|
11
13
|
$font-weight-detail: 400;
|
14
|
+
$font-weight-detail-bold: 700;
|
12
15
|
// $font-family-detail: $font-family-main;
|
13
16
|
// $font-weight-detail: $font-weight-main;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nationalarchives/frontend",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.18-prerelease",
|
4
4
|
"description": "The National Archives frontend styles",
|
5
5
|
"scripts": {
|
6
6
|
"start": "storybook dev -p 6006",
|
@@ -42,20 +42,20 @@
|
|
42
42
|
"@babel/core": "^7.22.10",
|
43
43
|
"@babel/preset-env": "^7.22.10",
|
44
44
|
"@mdx-js/react": "^2.1.3",
|
45
|
-
"@storybook/addon-a11y": "^7.
|
46
|
-
"@storybook/addon-docs": "^7.
|
47
|
-
"@storybook/addon-essentials": "^7.
|
48
|
-
"@storybook/addon-interactions": "^7.
|
49
|
-
"@storybook/addon-links": "^7.
|
50
|
-
"@storybook/addon-mdx-gfm": "^7.
|
51
|
-
"@storybook/html": "^7.
|
52
|
-
"@storybook/html-webpack5": "^7.
|
53
|
-
"@storybook/jest": "^0.
|
45
|
+
"@storybook/addon-a11y": "^7.4.0",
|
46
|
+
"@storybook/addon-docs": "^7.4.0",
|
47
|
+
"@storybook/addon-essentials": "^7.4.0",
|
48
|
+
"@storybook/addon-interactions": "^7.4.0",
|
49
|
+
"@storybook/addon-links": "^7.4.0",
|
50
|
+
"@storybook/addon-mdx-gfm": "^7.4.0",
|
51
|
+
"@storybook/html": "^7.4.0",
|
52
|
+
"@storybook/html-webpack5": "^7.4.0",
|
53
|
+
"@storybook/jest": "^0.2.2",
|
54
54
|
"@storybook/test-runner": "^0.13.0",
|
55
55
|
"@storybook/testing-library": "^0.2.0",
|
56
56
|
"axe-playwright": "^1.2.3",
|
57
57
|
"babel-loader": "^9.0.1",
|
58
|
-
"chromatic": "^
|
58
|
+
"chromatic": "^7.0.0",
|
59
59
|
"copy-webpack-plugin": "^11.0.0",
|
60
60
|
"css-loader": "^6.7.1",
|
61
61
|
"diff": "^5.1.0",
|
@@ -70,10 +70,10 @@
|
|
70
70
|
"sass": "^1.64.2",
|
71
71
|
"sass-loader": "^13.0.2",
|
72
72
|
"simple-nunjucks-loader": "^3.2.0",
|
73
|
-
"storybook": "^7.
|
73
|
+
"storybook": "^7.4.0",
|
74
74
|
"style-loader": "^3.3.1",
|
75
75
|
"stylelint": "^15.10.2",
|
76
|
-
"stylelint-config-standard-scss": "^
|
76
|
+
"stylelint-config-standard-scss": "^11.0.0",
|
77
77
|
"stylelint-selector-bem-pattern": "^3.0.0",
|
78
78
|
"webpack": "^5.88.2",
|
79
79
|
"webpack-cli": "^5.1.4"
|
@@ -1 +0,0 @@
|
|
1
|
-
@forward "featured-collection/index";
|
@@ -1,34 +0,0 @@
|
|
1
|
-
import FeaturedCollection from "./template.njk";
|
2
|
-
import macroOptions from "./macro-options.json";
|
3
|
-
|
4
|
-
const argTypes = {
|
5
|
-
heading: { control: "text" },
|
6
|
-
classes: { control: "text" },
|
7
|
-
attributes: { control: "object" },
|
8
|
-
};
|
9
|
-
|
10
|
-
Object.keys(argTypes).forEach((argType) => {
|
11
|
-
argTypes[argType].description = macroOptions.find(
|
12
|
-
(option) => option.name === argType,
|
13
|
-
)?.description;
|
14
|
-
});
|
15
|
-
|
16
|
-
export default {
|
17
|
-
title: "Patterns/Experimental/Featured collection",
|
18
|
-
argTypes,
|
19
|
-
};
|
20
|
-
|
21
|
-
const Template = ({ heading, classes, attributes }) =>
|
22
|
-
FeaturedCollection({
|
23
|
-
params: {
|
24
|
-
heading,
|
25
|
-
classes,
|
26
|
-
attributes,
|
27
|
-
},
|
28
|
-
});
|
29
|
-
|
30
|
-
export const Standard = Template.bind({});
|
31
|
-
Standard.args = {
|
32
|
-
heading: "Records from the collection",
|
33
|
-
classes: "tna-featured-collection--demo",
|
34
|
-
};
|
@@ -1,20 +0,0 @@
|
|
1
|
-
[
|
2
|
-
{
|
3
|
-
"name": "heading",
|
4
|
-
"type": "string",
|
5
|
-
"required": true,
|
6
|
-
"description": ""
|
7
|
-
},
|
8
|
-
{
|
9
|
-
"name": "classes",
|
10
|
-
"type": "string",
|
11
|
-
"required": false,
|
12
|
-
"description": "Classes to add to the featured collection."
|
13
|
-
},
|
14
|
-
{
|
15
|
-
"name": "attributes",
|
16
|
-
"type": "object",
|
17
|
-
"required": false,
|
18
|
-
"description": "HTML attributes (for example data attributes) to add to the featured collection."
|
19
|
-
}
|
20
|
-
]
|