@nationalarchives/frontend 0.1.23-prerelease → 0.1.25-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 (159) hide show
  1. package/README.md +22 -0
  2. package/govuk-prototype-kit.config.json +4 -12
  3. package/nationalarchives/all.css +2 -2
  4. package/nationalarchives/all.css.map +1 -1
  5. package/nationalarchives/all.js +1 -1
  6. package/nationalarchives/all.js.map +1 -1
  7. package/nationalarchives/assets/fonts/OpenSans-Regular.ttf +0 -0
  8. package/nationalarchives/assets/fonts/RobotoMono-Medium.ttf +0 -0
  9. package/nationalarchives/components/_index.scss +1 -1
  10. package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -1
  11. package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
  12. package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +1 -1
  13. package/nationalarchives/components/button/button.css +1 -1
  14. package/nationalarchives/components/button/button.css.map +1 -1
  15. package/nationalarchives/components/button/button.scss +12 -12
  16. package/nationalarchives/components/button/template.njk +2 -2
  17. package/nationalarchives/components/card/card.css +1 -1
  18. package/nationalarchives/components/card/card.css.map +1 -1
  19. package/nationalarchives/components/card/card.scss +9 -4
  20. package/nationalarchives/components/card/card.stories.js +27 -78
  21. package/nationalarchives/components/card/fixtures.json +17 -17
  22. package/nationalarchives/components/card/macro-options.json +47 -17
  23. package/nationalarchives/components/card/template.njk +47 -46
  24. package/nationalarchives/components/cookie-banner/cookie-banner.css +1 -1
  25. package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -1
  26. package/nationalarchives/components/cookie-banner/cookie-banner.js +1 -1
  27. package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -1
  28. package/nationalarchives/components/cookie-banner/cookie-banner.mjs +17 -16
  29. package/nationalarchives/components/cookie-banner/cookie-banner.scss +1 -1
  30. package/nationalarchives/components/cookie-banner/cookie-banner.stories.js +95 -45
  31. package/nationalarchives/components/cookie-banner/fixtures.json +84 -1
  32. package/nationalarchives/components/cookie-banner/macro-options.json +7 -1
  33. package/nationalarchives/components/cookie-banner/template.njk +4 -4
  34. package/nationalarchives/components/featured-records/_index.scss +1 -0
  35. package/nationalarchives/components/featured-records/featured-records.css +1 -0
  36. package/nationalarchives/components/featured-records/featured-records.css.map +1 -0
  37. package/nationalarchives/components/featured-records/featured-records.scss +95 -0
  38. package/nationalarchives/components/featured-records/featured-records.stories.js +51 -0
  39. package/nationalarchives/components/featured-records/fixtures.json +4 -0
  40. package/nationalarchives/components/featured-records/macro-options.json +70 -0
  41. package/nationalarchives/components/featured-records/macro.njk +3 -0
  42. package/nationalarchives/components/featured-records/template.njk +20 -0
  43. package/nationalarchives/components/filters/filters.css +1 -1
  44. package/nationalarchives/components/filters/filters.css.map +1 -1
  45. package/nationalarchives/components/filters/filters.scss +6 -6
  46. package/nationalarchives/components/filters/template.njk +1 -1
  47. package/nationalarchives/components/footer/footer.css +1 -1
  48. package/nationalarchives/components/footer/footer.css.map +1 -1
  49. package/nationalarchives/components/footer/footer.scss +2 -5
  50. package/nationalarchives/components/footer/footer.stories.js +1 -1
  51. package/nationalarchives/components/footer/template.njk +4 -4
  52. package/nationalarchives/components/gallery/gallery.css +1 -1
  53. package/nationalarchives/components/gallery/gallery.css.map +1 -1
  54. package/nationalarchives/components/gallery/gallery.scss +2 -2
  55. package/nationalarchives/components/gallery/gallery.stories.js +2 -2
  56. package/nationalarchives/components/grid/grid.css +1 -1
  57. package/nationalarchives/components/grid/grid.css.map +1 -1
  58. package/nationalarchives/components/grid/grid.scss +12 -0
  59. package/nationalarchives/components/grid/grid.stories.js +12 -0
  60. package/nationalarchives/components/header/header.css +1 -1
  61. package/nationalarchives/components/header/header.css.map +1 -1
  62. package/nationalarchives/components/header/header.scss +59 -27
  63. package/nationalarchives/components/header/header.stories.js +4 -6
  64. package/nationalarchives/components/header/macro-options.json +2 -2
  65. package/nationalarchives/components/header/template.njk +4 -4
  66. package/nationalarchives/components/hero/hero.css +1 -1
  67. package/nationalarchives/components/hero/hero.css.map +1 -1
  68. package/nationalarchives/components/hero/hero.scss +6 -6
  69. package/nationalarchives/components/hero/hero.stories.js +6 -0
  70. package/nationalarchives/components/index-grid/index-grid.css +1 -1
  71. package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
  72. package/nationalarchives/components/index-grid/index-grid.scss +1 -1
  73. package/nationalarchives/components/index-grid/index-grid.stories.js +3 -1
  74. package/nationalarchives/components/message/message.css +1 -1
  75. package/nationalarchives/components/message/message.css.map +1 -1
  76. package/nationalarchives/components/pagination/macro-options.json +6 -0
  77. package/nationalarchives/components/pagination/pagination.css +1 -1
  78. package/nationalarchives/components/pagination/pagination.css.map +1 -1
  79. package/nationalarchives/components/pagination/pagination.scss +5 -1
  80. package/nationalarchives/components/pagination/pagination.stories.js +417 -2
  81. package/nationalarchives/components/pagination/template.njk +10 -3
  82. package/nationalarchives/components/phase-banner/fixtures.json +5 -41
  83. package/nationalarchives/components/phase-banner/macro-options.json +6 -0
  84. package/nationalarchives/components/phase-banner/phase-banner.css +1 -1
  85. package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
  86. package/nationalarchives/components/phase-banner/phase-banner.scss +1 -1
  87. package/nationalarchives/components/phase-banner/phase-banner.stories.js +4 -28
  88. package/nationalarchives/components/phase-banner/template.njk +3 -1
  89. package/nationalarchives/components/picture/picture.css +1 -1
  90. package/nationalarchives/components/picture/picture.css.map +1 -1
  91. package/nationalarchives/components/picture/picture.scss +5 -4
  92. package/nationalarchives/components/sensitive-image/sensitive-image.css +1 -1
  93. package/nationalarchives/components/sensitive-image/sensitive-image.css.map +1 -1
  94. package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +3 -0
  95. package/nationalarchives/components/skip-link/skip-link.css +1 -1
  96. package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
  97. package/nationalarchives/components/skip-link/skip-link.stories.js +4 -1
  98. package/nationalarchives/components/tabs/tabs.css +1 -1
  99. package/nationalarchives/components/tabs/tabs.css.map +1 -1
  100. package/nationalarchives/components/tabs/tabs.js +1 -1
  101. package/nationalarchives/components/tabs/tabs.js.map +1 -1
  102. package/nationalarchives/components/tabs/tabs.mjs +0 -4
  103. package/nationalarchives/components/tabs/tabs.stories.js +6 -3
  104. package/nationalarchives/lib/cookies.mjs +165 -62
  105. package/nationalarchives/prototype-kit.css +23 -0
  106. package/nationalarchives/prototype-kit.css.map +1 -0
  107. package/nationalarchives/{_prototype-kit.scss → prototype-kit.scss} +3 -3
  108. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +189 -74
  109. package/nationalarchives/stories/utilities/lists/lists.mdx +18 -0
  110. package/nationalarchives/stories/utilities/{typography → lists}/lists.stories.js +1 -1
  111. package/nationalarchives/stories/utilities/overrides/overrides.mdx +27 -20
  112. package/nationalarchives/stories/utilities/overrides/overrides.stories.js +19 -2
  113. package/nationalarchives/stories/utilities/tables/tables.mdx +8 -0
  114. package/nationalarchives/stories/utilities/tables/tables.stories.js +45 -0
  115. package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +59 -19
  116. package/nationalarchives/stories/utilities/typography/typography.mdx +3 -25
  117. package/nationalarchives/stories/utilities/typography/typography.stories.js +28 -2
  118. package/nationalarchives/templates/layouts/_generic.njk +1 -0
  119. package/nationalarchives/templates/layouts/_prototype-kit.njk +4 -1
  120. package/nationalarchives/tests/cookies.test.js +427 -0
  121. package/nationalarchives/tests/uuid.test.js +17 -0
  122. package/nationalarchives/tools/_colour.scss +15 -20
  123. package/nationalarchives/tools/_spacing.scss +91 -2
  124. package/nationalarchives/tools/_typography.scss +15 -8
  125. package/nationalarchives/utilities/_a11y.scss +2 -1
  126. package/nationalarchives/utilities/_colour.scss +100 -0
  127. package/nationalarchives/utilities/_global.scss +2 -98
  128. package/nationalarchives/utilities/_index.scss +2 -0
  129. package/nationalarchives/utilities/_lists.scss +5 -0
  130. package/nationalarchives/utilities/_overrides.scss +16 -36
  131. package/nationalarchives/utilities/_tables.scss +86 -0
  132. package/nationalarchives/utilities/_typography.scss +150 -71
  133. package/nationalarchives/variables/_colour.scss +10 -8
  134. package/nationalarchives/variables/_spacing.scss +14 -9
  135. package/nationalarchives/variables/_typography.scss +10 -7
  136. package/package.json +14 -14
  137. package/nationalarchives/assets/fonts/OpenSans-Medium.ttf +0 -0
  138. package/nationalarchives/assets/fonts/fa-regular-400.ttf +0 -0
  139. package/nationalarchives/assets/fonts/fa-regular-400.woff2 +0 -0
  140. package/nationalarchives/components/profile/_index.scss +0 -1
  141. package/nationalarchives/components/profile/fixtures.json +0 -4
  142. package/nationalarchives/components/profile/macro-options.json +0 -14
  143. package/nationalarchives/components/profile/macro.njk +0 -3
  144. package/nationalarchives/components/profile/profile.css +0 -1
  145. package/nationalarchives/components/profile/profile.css.map +0 -1
  146. package/nationalarchives/components/profile/profile.scss +0 -5
  147. package/nationalarchives/components/profile/profile.stories.js +0 -31
  148. package/nationalarchives/components/profile/template.njk +0 -15
  149. package/nationalarchives/lib/font-awesome/regular.css +0 -5
  150. package/nationalarchives/lib/font-awesome/regular.css.map +0 -1
  151. package/nationalarchives/lib/font-awesome/regular.scss +0 -28
  152. package/nationalarchives/stories/development/about.mdx +0 -122
  153. package/nationalarchives/stories/development/contributing.mdx +0 -32
  154. package/nationalarchives/stories/development/cookies.mdx +0 -82
  155. package/nationalarchives/stories/development/publishing.mdx +0 -15
  156. package/nationalarchives/stories/development/structure.mdx +0 -88
  157. package/nationalarchives/stories/development/using/compiled.mdx +0 -9
  158. package/nationalarchives/stories/development/using/hosted.mdx +0 -53
  159. package/nationalarchives/stories/development/using/npm.mdx +0 -59
@@ -1,4 +1,5 @@
1
1
  @use "sass:math";
2
+ @use "sass:selector";
2
3
  @use "../tools/colour";
3
4
  @use "../tools/media";
4
5
  @use "../tools/spacing";
@@ -7,30 +8,41 @@
7
8
  @use "../variables/grid";
8
9
  @use "../variables/typography" as typographyVars;
9
10
 
10
- @import "https://use.typekit.net/hkj3kuz.css";
11
-
12
- @font-face {
13
- font-family: "Open Sans";
14
- src: url("#{assets.$tna-font-path}/OpenSans-Medium.ttf");
15
- font-weight: normal;
16
- font-style: normal;
17
- // font-display: swap;
18
- }
19
-
20
- @font-face {
21
- font-family: "Open Sans";
22
- src: url("#{assets.$tna-font-path}/OpenSans-Bold.ttf");
23
- font-weight: bold;
24
- font-style: normal;
25
- // font-display: swap;
26
- }
27
-
28
- @font-face {
29
- font-family: "Roboto Mono";
30
- src: url("#{assets.$tna-font-path}/RobotoMono-Regular.ttf");
31
- font-weight: normal;
32
- font-style: normal;
33
- // font-display: swap;
11
+ @if typographyVars.$use-local-fonts {
12
+ @font-face {
13
+ font-family: "Open Sans";
14
+ src: url("#{assets.$tna-font-path}/OpenSans-Regular.ttf");
15
+ font-weight: typographyVars.$main-font-weight;
16
+ font-style: normal;
17
+ // font-display: swap;
18
+ }
19
+
20
+ @font-face {
21
+ font-family: "Open Sans";
22
+ src: url("#{assets.$tna-font-path}/OpenSans-Bold.ttf");
23
+ font-weight: typographyVars.$main-font-weight-bold;
24
+ font-style: normal;
25
+ // font-display: swap;
26
+ }
27
+
28
+ @font-face {
29
+ font-family: "Roboto Mono";
30
+ src: url("#{assets.$tna-font-path}/RobotoMono-Regular.ttf");
31
+ font-weight: typographyVars.$detail-font-weight;
32
+ font-style: normal;
33
+ // font-display: swap;
34
+ }
35
+
36
+ @font-face {
37
+ font-family: "Roboto Mono";
38
+ src: url("#{assets.$tna-font-path}/RobotoMono-Medium.ttf");
39
+ font-weight: typographyVars.$detail-font-weight-bold;
40
+ font-style: normal;
41
+ // font-display: swap;
42
+ }
43
+ } @else {
44
+ // @import "https://use.typekit.net/hkj3kuz.css";
45
+ @import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@#{typographyVars.$main-font-weight};#{typographyVars.$main-font-weight-bold}&family=Roboto+Mono:wght@#{typographyVars.$detail-font-weight};#{typographyVars.$detail-font-weight-bold}&display=swap"); /* stylelint-disable-line */
34
46
  }
35
47
 
36
48
  .tna-template {
@@ -55,43 +67,31 @@
55
67
  }
56
68
  }
57
69
 
58
- h1,
59
- h2,
60
- h3,
61
- h4,
62
- h5,
63
- h6,
64
- ul,
65
- ol {
66
- margin-top: 0;
70
+ * {
71
+ margin: 0;
72
+ padding: 0;
67
73
  }
68
74
 
69
- h1,
70
- h2,
71
- h3,
72
- h4,
73
- h5,
74
- h6,
75
75
  strong {
76
76
  @include typography.main-font-weight-bold;
77
77
  }
78
78
 
79
79
  p {
80
- margin: 2rem 0 0;
80
+ @include spacing.space-above;
81
81
 
82
82
  + p {
83
83
  margin-top: 1rem;
84
84
  }
85
-
86
- &:first-child {
87
- margin-top: 0;
88
- }
89
85
  }
90
86
 
91
87
  a {
92
- @include colour.colour-font("link");
93
88
  text-decoration-thickness: 1.5px;
94
89
 
90
+ &,
91
+ &:link {
92
+ @include colour.colour-font("link");
93
+ }
94
+
95
95
  &:visited {
96
96
  @include colour.colour-font("link-visited");
97
97
  }
@@ -100,6 +100,28 @@ a {
100
100
  &:active {
101
101
  @include typography.interacted-text-decoration;
102
102
  }
103
+
104
+ &.tna-link--no-visited-state {
105
+ &:visited {
106
+ @include colour.colour-font("link");
107
+ }
108
+ }
109
+
110
+ @include colour.on-high-contrast {
111
+ &:active {
112
+ box-shadow: none;
113
+ }
114
+
115
+ &:hover:not(:focus) {
116
+ box-shadow: 0 0 0 0.3125rem var(--link);
117
+ }
118
+ }
119
+
120
+ // &[target="_blank"]:not([title*="opens in a new"]) {
121
+ // &::after {
122
+ // content: "" / " (opens in a new window)"
123
+ // }
124
+ // }
103
125
  }
104
126
 
105
127
  small {
@@ -108,6 +130,47 @@ small {
108
130
  );
109
131
  }
110
132
 
133
+ // .tna-detail[title][data-type] {
134
+ // padding: 0 0.375rem;
135
+
136
+ // display: inline-flex;
137
+ // flex-flow: row nowrap;
138
+ // align-items: baseline;
139
+ // gap: 0.5rem;
140
+
141
+ // vertical-align: baseline;
142
+
143
+ // background-color: #ccc;
144
+
145
+ // &::after {
146
+ // @include colour.colour-font("font-base");
147
+ // @include typography.detail-font-small;
148
+ // vertical-align: baseline;
149
+
150
+ // content: attr(data-type) / "";
151
+ // }
152
+
153
+ // &[data-type="misc"] {
154
+ // background-color: #f28482;
155
+ // }
156
+
157
+ // &[data-type="loc"] {
158
+ // background-color: #edae49;
159
+ // }
160
+
161
+ // &[data-type="per"] {
162
+ // background-color: #b5e2fa;
163
+ // }
164
+
165
+ // @at-root #{selector.unify("a", &)} {
166
+ // @include colour.colour-font("font-base");
167
+
168
+ // &::after {
169
+ // text-decoration: none;
170
+ // }
171
+ // }
172
+ // }
173
+
111
174
  .tna-chip-list {
112
175
  @include spacing.space-above;
113
176
  margin-bottom: 0;
@@ -129,6 +192,7 @@ small {
129
192
 
130
193
  display: block;
131
194
 
195
+ @include colour.colour-font("font-dark");
132
196
  @include typography.detail-font-small;
133
197
  line-height: 1;
134
198
 
@@ -141,32 +205,34 @@ small {
141
205
  @extend %chip;
142
206
 
143
207
  &--plain {
208
+ padding: 0;
209
+
144
210
  color: inherit;
145
211
 
146
212
  background-color: transparent;
147
213
 
148
- border-color: transparent;
214
+ border: none;
149
215
  }
150
- }
151
-
152
- a.tna-chip {
153
- text-decoration: none;
154
216
 
155
- &,
156
- &:link,
157
- &:visited {
158
- @include colour.colour-font("font-dark");
159
- }
160
-
161
- &:hover {
162
- @include typography.interacted-text-decoration;
163
- }
217
+ @at-root #{selector.unify("a", &)} {
218
+ text-decoration: none;
164
219
 
165
- &--plain {
166
220
  &,
167
221
  &:link,
168
222
  &:visited {
169
- color: inherit;
223
+ @include colour.colour-font("font-dark");
224
+ }
225
+
226
+ &:hover {
227
+ @include typography.interacted-text-decoration;
228
+ }
229
+
230
+ &--plain {
231
+ &,
232
+ &:link,
233
+ &:visited {
234
+ color: inherit;
235
+ }
170
236
  }
171
237
  }
172
238
  }
@@ -174,12 +240,13 @@ a.tna-chip {
174
240
  %heading {
175
241
  @include colour.colour-font("font-dark");
176
242
 
177
- text-wrap: balance;
178
-
179
243
  &:not(.tna-heading--no-link-arrow) {
180
244
  a {
181
245
  display: inline-block;
182
246
 
247
+ text-wrap: balance;
248
+ // text-decoration-thickness: .1em;
249
+
183
250
  &::after {
184
251
  padding-left: 0.25rem;
185
252
 
@@ -191,6 +258,8 @@ a.tna-chip {
191
258
  }
192
259
 
193
260
  &:hover {
261
+ // text-decoration-thickness: .15em;
262
+
194
263
  &::after {
195
264
  padding-left: 0.5rem;
196
265
  }
@@ -254,17 +323,12 @@ a.tna-chip {
254
323
  %headings-and-heading-groups {
255
324
  @include spacing.space-above;
256
325
  margin-bottom: 0;
257
- padding-top: 1rem;
326
+ padding: 1rem 0 0;
258
327
 
259
328
  &:first-child {
260
329
  padding-top: 0;
261
330
  }
262
331
 
263
- &:last-child {
264
- margin-bottom: 0;
265
- padding-bottom: 0;
266
- }
267
-
268
332
  + p {
269
333
  margin-top: 1rem;
270
334
  }
@@ -304,6 +368,16 @@ a.tna-chip {
304
368
  margin: 0 0 0.25rem;
305
369
 
306
370
  @extend %chip;
371
+
372
+ &--plain {
373
+ padding: 0;
374
+
375
+ color: inherit;
376
+
377
+ background-color: transparent;
378
+
379
+ border: none;
380
+ }
307
381
  }
308
382
 
309
383
  &__title {
@@ -336,7 +410,7 @@ a.tna-chip {
336
410
  margin-left: 0;
337
411
  padding: 1rem 1rem 1rem 2rem;
338
412
 
339
- @include colour.colour-border("accent-background", 0.35rem, solid, left);
413
+ @include colour.colour-border("accent-background", 0.375rem, solid, left);
340
414
 
341
415
  &__quote {
342
416
  font-weight: 700;
@@ -358,7 +432,8 @@ a.tna-chip {
358
432
  .tna-large-paragraph {
359
433
  @include spacing.space-above;
360
434
 
361
- @include typography.relative-font-size(20);
435
+ @include typography.relative-font-size(22);
436
+ @include colour.colour-font("font-dark");
362
437
  }
363
438
 
364
439
  .tna-scene-setter {
@@ -382,4 +457,8 @@ a.tna-chip {
382
457
  text-decoration-thickness: 4.5px;
383
458
  }
384
459
  }
460
+
461
+ &--small {
462
+ @include typography.relative-font-size(24);
463
+ }
385
464
  }
@@ -39,7 +39,7 @@ $colour-palette-brand: (
39
39
 
40
40
  $dark-grey: #26262a;
41
41
  $base-font: #343338 !default;
42
- $link-colour: #1d70ab !default;
42
+ $link-colour: brand-colour("navy") !default;
43
43
  $link-colour-visited: #4c2c92 !default;
44
44
 
45
45
  /*
@@ -49,7 +49,7 @@ LIGHT THEME (DEFAULT)
49
49
  */
50
50
  $colour-palette-default: (
51
51
  "page-background": #f4f4f4,
52
- "background-tint": #d8d8d8,
52
+ "background-tint": #e2e2e2,
53
53
  "font-base": $base-font,
54
54
  "font-dark": brand-colour("black"),
55
55
  "font-light": hex-to-rgb($base-font, 0.7),
@@ -100,7 +100,7 @@ DARK THEME
100
100
  $colour-palette-dark: map.merge(
101
101
  $colour-palette-default,
102
102
  (
103
- "page-background": #111,
103
+ "page-background": #222,
104
104
  "background-tint": #333,
105
105
  "font-base": brand-colour("white", 0.95),
106
106
  "font-dark": brand-colour("white"),
@@ -108,13 +108,14 @@ $colour-palette-dark: map.merge(
108
108
  "icon-light": brand-colour("white", 0.35),
109
109
  "link": brand-colour("blue"),
110
110
  "link-visited": #a8f,
111
+ "focus-outline": brand-colour("orange"),
111
112
  "keyline": brand-colour("white", 0.25),
112
113
  "keyline-dark": brand-colour("white"),
113
114
  "button-text": brand-colour("black"),
114
115
  "button-background": brand-colour("white"),
115
116
  "button-hover-text": brand-colour("white"),
116
117
  "button-hover-background": brand-colour("black"),
117
- "contrast-background": #1e1e1e,
118
+ "contrast-background": #111,
118
119
  "contrast-link-visited":
119
120
  map.get($colour-palette-default, "contrast-link-visited"),
120
121
  // --accent-background-light is the same as --contrast-background on dark themes
@@ -134,8 +135,8 @@ $colour-palette-high-contrast: map.merge(
134
135
  "font-base": brand-colour("black"),
135
136
  "font-light": brand-colour("black"),
136
137
  "icon-light": brand-colour("black", 0.75),
137
- "link": brand-colour("navy"),
138
- "link-visited": brand-colour("black"),
138
+ "link": #34d,
139
+ "link-visited": #848,
139
140
  "focus-outline": brand-colour("orange"),
140
141
  "keyline": brand-colour("black"),
141
142
  "keyline-dark": brand-colour("black"),
@@ -162,11 +163,12 @@ DARK, HIGH_CONTRAST THEME
162
163
  $colour-palette-high-contrast-dark: map.merge(
163
164
  $colour-palette-dark,
164
165
  (
166
+ "page-background": #111,
165
167
  "font-base": brand-colour("white"),
166
168
  "font-light": brand-colour("white"),
167
169
  "icon-light": brand-colour("white", 0.75),
168
- "link": brand-colour("white"),
169
- "link-visited": brand-colour("white"),
170
+ "link": #69f,
171
+ "link-visited": #a6c,
170
172
  "keyline": brand-colour("white"),
171
173
  "contrast-background": brand-colour("black"),
172
174
  )
@@ -1,3 +1,5 @@
1
+ @use "sass:map";
2
+
1
3
  $spacing: (
2
4
  "xs": 0.5rem,
3
5
  "s": 1rem,
@@ -5,13 +7,16 @@ $spacing: (
5
7
  "l": 3rem,
6
8
  "xl": 5rem,
7
9
  "xxl": 8rem,
8
- );
10
+ ) !default;
9
11
 
10
- $spacing-mobile: (
11
- "xs": 0.5rem,
12
- "s": 0.75rem,
13
- "m": 1.5rem,
14
- "l": 2rem,
15
- "xl": 3rem,
16
- "xxl": 5rem,
17
- );
12
+ $spacing-mobile: map.merge(
13
+ $spacing,
14
+ (
15
+ "xs": 0.5rem,
16
+ "s": 0.75rem,
17
+ "m": 1.5rem,
18
+ "l": 2rem,
19
+ "xl": 3rem,
20
+ "xxl": 5rem,
21
+ )
22
+ ) !default;
@@ -1,5 +1,7 @@
1
1
  @use "sass:math";
2
2
 
3
+ $use-local-fonts: false !default;
4
+
3
5
  $relative-1rem-px: 16;
4
6
 
5
7
  $body-font-size-px: 18 !default;
@@ -8,12 +10,13 @@ $body-line-height: #{math.div(16, 18) * 2} !default; // 1.77777
8
10
 
9
11
  $interactive-text-decoration-thickness: 3.5px !default;
10
12
 
11
- $font-family-main: "Open Sans", sans-serif !default;
12
- $font-weight-main: normal !default; // Defined in utilities/_typography.scss
13
- $font-weight-main-bold: bold !default; // Defined in utilities/_typography.scss
13
+ $main-font-family: "Open Sans", sans-serif !default;
14
+ $main-font-weight: 400 !default;
15
+ $main-font-weight-bold: 700 !default;
14
16
 
15
- $font-family-heading: supria-sans-condensed, "Arial Narrow", sans-serif !default;
16
- $font-weight-heading: 500 !default;
17
+ $heading-font-family: supria-sans-condensed, "Arial Narrow", sans-serif !default;
18
+ $heading-font-weight: 500 !default;
17
19
 
18
- $font-family-detail: "Roboto Mono", monospace !default;
19
- $font-weight-detail: normal !default;
20
+ $detail-font-family: "Roboto Mono", monospace !default;
21
+ $detail-font-weight: 400 !default;
22
+ $detail-font-weight-bold: 500 !default;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@nationalarchives/frontend",
3
- "version": "0.1.23-prerelease",
3
+ "version": "0.1.25-prerelease",
4
4
  "description": "The National Archives frontend styles",
5
5
  "scripts": {
6
6
  "start": "storybook dev -p 6006",
7
7
  "build": "storybook build -o storybook --webpack-stats-json",
8
- "test": "node tasks/test-fixtures.js && test-storybook --verbose --stories-json",
9
- "lint": "prettier --check '{src,.storybook,tasks}/**/*.{js,mjs,scss,json,html}' && stylelint 'src/**/*.scss' && eslint 'src/**/*.mjs'",
10
- "lint:fix": "prettier --write '{src,.storybook,tasks}/**/*.{js,mjs,scss,json,html}' && stylelint --fix 'src/**/*.scss' && eslint --fix 'src/**/*.mjs'",
8
+ "test": "node tasks/test-fixtures.js && test-storybook --verbose && jest",
9
+ "lint": "prettier --check '{src,.storybook,tasks,.}/**/*.{js,mjs,scss,json,html}' && stylelint 'src/**/*.scss' && eslint 'src/**/*.{js,mjs}'",
10
+ "lint:fix": "prettier --write '{src,.storybook,tasks,.}/**/*.{js,mjs,scss,json,html}' && stylelint --fix 'src/**/*.scss' && eslint --fix 'src/**/*.{js,mjs}'",
11
11
  "package:sass": "sass --style=compressed --embed-sources src/nationalarchives:package/nationalarchives",
12
12
  "package:scripts": "webpack"
13
13
  },
@@ -39,8 +39,8 @@
39
39
  },
40
40
  "homepage": "https://github.com/nationalarchives/tna-frontend#readme",
41
41
  "devDependencies": {
42
- "@babel/core": "^7.22.10",
43
- "@babel/preset-env": "^7.22.10",
42
+ "@babel/core": "^7.23.2",
43
+ "@babel/preset-env": "^7.23.2",
44
44
  "@chromaui/addon-visual-tests": "^0.0.109",
45
45
  "@mdx-js/react": "^2.1.3",
46
46
  "@storybook/addon-a11y": "^7.5.1",
@@ -55,31 +55,31 @@
55
55
  "@storybook/test-runner": "^0.13.0",
56
56
  "@storybook/testing-library": "^0.2.2",
57
57
  "axe-playwright": "^1.2.3",
58
+ "babel-jest": "^29.7.0",
58
59
  "babel-loader": "^9.0.1",
59
- "chromatic": "^7.0.0",
60
+ "chromatic": "^7.5.0",
60
61
  "copy-webpack-plugin": "^11.0.0",
61
62
  "css-loader": "^6.7.1",
62
63
  "diff": "^5.1.0",
63
- "eslint": "^8.46.0",
64
+ "eslint": "^8.52.0",
64
65
  "eslint-plugin-storybook": "^0.6.15",
65
- "glob": "^10.2.7",
66
- "jest-image-snapshot": "^6.2.0",
67
- "jsdom": "^22.1.0",
66
+ "glob": "^10.3.10",
67
+ "jest-environment-jsdom": "^29.7.0",
68
68
  "mdx-mermaid": "^2.0.0",
69
69
  "node-self": "^1.0.2",
70
70
  "nunjucks": "^3.2.3",
71
71
  "prettier": "^3.0.1",
72
72
  "react": "^18.2.0",
73
73
  "react-dom": "^18.2.0",
74
- "sass": "^1.64.2",
74
+ "sass": "^1.69.4",
75
75
  "sass-loader": "^13.0.2",
76
76
  "simple-nunjucks-loader": "^3.2.0",
77
77
  "storybook": "^7.5.1",
78
78
  "style-loader": "^3.3.1",
79
- "stylelint": "^15.10.2",
79
+ "stylelint": "^15.11.0",
80
80
  "stylelint-config-standard-scss": "^11.0.0",
81
81
  "stylelint-selector-bem-pattern": "^3.0.0",
82
- "webpack": "^5.88.2",
82
+ "webpack": "^5.89.0",
83
83
  "webpack-cli": "^5.1.4"
84
84
  }
85
85
  }
@@ -1 +0,0 @@
1
- @use "profile";
@@ -1,4 +0,0 @@
1
- {
2
- "component": "profile",
3
- "fixtures": []
4
- }
@@ -1,14 +0,0 @@
1
- [
2
- {
3
- "name": "classes",
4
- "type": "string",
5
- "required": false,
6
- "description": "Classes to add to the profile."
7
- },
8
- {
9
- "name": "attributes",
10
- "type": "object",
11
- "required": false,
12
- "description": "HTML attributes (for example data attributes) to add to the profile."
13
- }
14
- ]
@@ -1,3 +0,0 @@
1
- {% macro tnaProfile(params) %}
2
- {%- include "nationalarchives/components/profile/template.njk" -%}
3
- {% endmacro %}