@nationalarchives/frontend 0.1.17-prerelease → 0.1.19-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 (170) hide show
  1. package/nationalarchives/all.css +12 -2
  2. package/nationalarchives/all.css.map +1 -1
  3. package/nationalarchives/all.js +1 -1
  4. package/nationalarchives/all.js.map +1 -1
  5. package/nationalarchives/all.mjs +26 -2
  6. package/nationalarchives/all.scss +20 -4
  7. package/nationalarchives/assets/fonts/OpenSans-Bold.ttf +0 -0
  8. package/nationalarchives/assets/fonts/OpenSans-Medium.ttf +0 -0
  9. package/nationalarchives/assets/fonts/RobotoMono-Regular.ttf +0 -0
  10. package/nationalarchives/components/_index.scss +18 -16
  11. package/nationalarchives/components/breadcrumbs/_index.scss +1 -109
  12. package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -0
  13. package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -0
  14. package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
  15. package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
  16. package/nationalarchives/components/breadcrumbs/breadcrumbs.scss +111 -0
  17. package/nationalarchives/components/button/_button-group.scss +3 -5
  18. package/nationalarchives/components/button/_index.scss +1 -73
  19. package/nationalarchives/components/button/button.css +13 -0
  20. package/nationalarchives/components/button/button.css.map +1 -0
  21. package/nationalarchives/components/button/button.scss +103 -0
  22. package/nationalarchives/components/button/button.stories.js +61 -0
  23. package/nationalarchives/components/button/macro-options.json +19 -1
  24. package/nationalarchives/components/button/template.njk +8 -2
  25. package/nationalarchives/components/card/_index.scss +1 -183
  26. package/nationalarchives/components/card/card.css +13 -0
  27. package/nationalarchives/components/card/card.css.map +1 -0
  28. package/nationalarchives/components/card/card.scss +171 -0
  29. package/nationalarchives/components/card/card.stories.js +185 -95
  30. package/nationalarchives/components/card/fixtures.json +57 -28
  31. package/nationalarchives/components/card/macro-options.json +77 -48
  32. package/nationalarchives/components/card/template.njk +47 -37
  33. package/nationalarchives/components/cookie-banner/_index.scss +1 -0
  34. package/nationalarchives/components/cookie-banner/cookie-banner.css +13 -0
  35. package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -0
  36. package/nationalarchives/components/cookie-banner/cookie-banner.js +2 -0
  37. package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -0
  38. package/nationalarchives/components/cookie-banner/cookie-banner.mjs +83 -0
  39. package/nationalarchives/components/cookie-banner/cookie-banner.scss +32 -0
  40. package/nationalarchives/components/cookie-banner/cookie-banner.stories.js +164 -0
  41. package/nationalarchives/components/cookie-banner/fixtures.json +4 -0
  42. package/nationalarchives/components/cookie-banner/macro-options.json +38 -0
  43. package/nationalarchives/components/cookie-banner/macro.njk +3 -0
  44. package/nationalarchives/components/cookie-banner/template.njk +61 -0
  45. package/nationalarchives/components/filters/_index.scss +1 -54
  46. package/nationalarchives/components/filters/filters.css +1 -0
  47. package/nationalarchives/components/filters/filters.css.map +1 -0
  48. package/nationalarchives/components/filters/filters.scss +53 -0
  49. package/nationalarchives/components/footer/_index.scss +1 -270
  50. package/nationalarchives/components/footer/footer.css +13 -0
  51. package/nationalarchives/components/footer/footer.css.map +1 -0
  52. package/nationalarchives/components/footer/footer.scss +265 -0
  53. package/nationalarchives/components/footer/footer.stories.js +6 -6
  54. package/nationalarchives/components/footer/macro-options.json +7 -1
  55. package/nationalarchives/components/footer/template.njk +10 -6
  56. package/nationalarchives/components/gallery/_index.scss +1 -0
  57. package/nationalarchives/components/gallery/fixtures.json +4 -0
  58. package/nationalarchives/components/gallery/gallery.css +13 -0
  59. package/nationalarchives/components/gallery/gallery.css.map +1 -0
  60. package/nationalarchives/components/gallery/gallery.js +2 -0
  61. package/nationalarchives/components/gallery/gallery.js.map +1 -0
  62. package/nationalarchives/components/gallery/gallery.mjs +80 -0
  63. package/nationalarchives/components/gallery/gallery.scss +129 -0
  64. package/nationalarchives/components/gallery/gallery.stories.js +76 -0
  65. package/nationalarchives/components/gallery/macro-options.json +104 -0
  66. package/nationalarchives/components/gallery/macro.njk +3 -0
  67. package/nationalarchives/components/gallery/template.njk +45 -0
  68. package/nationalarchives/components/grid/_index.scss +1 -79
  69. package/nationalarchives/components/grid/grid.css +1 -0
  70. package/nationalarchives/components/grid/grid.css.map +1 -0
  71. package/nationalarchives/components/grid/grid.scss +81 -0
  72. package/nationalarchives/components/header/_index.scss +1 -586
  73. package/nationalarchives/components/header/header.css +1 -0
  74. package/nationalarchives/components/header/header.css.map +1 -0
  75. package/nationalarchives/components/header/header.js +1 -1
  76. package/nationalarchives/components/header/header.js.map +1 -1
  77. package/nationalarchives/components/header/header.scss +594 -0
  78. package/nationalarchives/components/header/header.stories.js +5 -5
  79. package/nationalarchives/components/hero/_index.scss +1 -167
  80. package/nationalarchives/components/hero/hero.css +1 -0
  81. package/nationalarchives/components/hero/hero.css.map +1 -0
  82. package/nationalarchives/components/hero/hero.scss +169 -0
  83. package/nationalarchives/components/index-grid/_index.scss +1 -82
  84. package/nationalarchives/components/index-grid/index-grid.css +1 -0
  85. package/nationalarchives/components/index-grid/index-grid.css.map +1 -0
  86. package/nationalarchives/components/index-grid/index-grid.scss +84 -0
  87. package/nationalarchives/components/message/_index.scss +1 -35
  88. package/nationalarchives/components/message/message.css +1 -0
  89. package/nationalarchives/components/message/message.css.map +1 -0
  90. package/nationalarchives/components/message/message.scss +36 -0
  91. package/nationalarchives/components/phase-banner/_index.scss +1 -60
  92. package/nationalarchives/components/phase-banner/fixtures.json +8 -8
  93. package/nationalarchives/components/phase-banner/phase-banner.css +1 -0
  94. package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -0
  95. package/nationalarchives/components/phase-banner/phase-banner.scss +31 -0
  96. package/nationalarchives/components/phase-banner/template.njk +2 -2
  97. package/nationalarchives/components/picture/_index.scss +1 -62
  98. package/nationalarchives/components/picture/picture.css +13 -0
  99. package/nationalarchives/components/picture/picture.css.map +1 -0
  100. package/nationalarchives/components/picture/picture.js +1 -1
  101. package/nationalarchives/components/picture/picture.js.map +1 -1
  102. package/nationalarchives/components/picture/picture.mjs +2 -1
  103. package/nationalarchives/components/picture/picture.scss +65 -0
  104. package/nationalarchives/components/profile/_index.scss +1 -2
  105. package/nationalarchives/components/profile/profile.css +1 -0
  106. package/nationalarchives/components/profile/profile.css.map +1 -0
  107. package/nationalarchives/components/profile/profile.scss +5 -0
  108. package/nationalarchives/components/sensitive-image/_index.scss +1 -77
  109. package/nationalarchives/components/sensitive-image/sensitive-image.css +1 -0
  110. package/nationalarchives/components/sensitive-image/sensitive-image.css.map +1 -0
  111. package/nationalarchives/components/sensitive-image/sensitive-image.js +1 -1
  112. package/nationalarchives/components/sensitive-image/sensitive-image.js.map +1 -1
  113. package/nationalarchives/components/sensitive-image/sensitive-image.scss +78 -0
  114. package/nationalarchives/components/skip-link/_index.scss +1 -63
  115. package/nationalarchives/components/skip-link/skip-link.css +1 -0
  116. package/nationalarchives/components/skip-link/skip-link.css.map +1 -0
  117. package/nationalarchives/components/skip-link/skip-link.scss +61 -0
  118. package/nationalarchives/components/tabs/_index.scss +1 -144
  119. package/nationalarchives/components/tabs/tabs.css +1 -0
  120. package/nationalarchives/components/tabs/tabs.css.map +1 -0
  121. package/nationalarchives/components/tabs/tabs.js +1 -1
  122. package/nationalarchives/components/tabs/tabs.js.map +1 -1
  123. package/nationalarchives/components/tabs/tabs.mjs +2 -0
  124. package/nationalarchives/components/tabs/tabs.scss +143 -0
  125. package/nationalarchives/components/tabs/tabs.stories.js +0 -1
  126. package/nationalarchives/lib/_font-awesome.scss +5 -0
  127. package/nationalarchives/lib/_index.scss +1 -0
  128. package/nationalarchives/lib/cookies.mjs +110 -0
  129. package/nationalarchives/lib/font-awesome/brands.css +5 -0
  130. package/nationalarchives/lib/font-awesome/brands.css.map +1 -0
  131. package/nationalarchives/lib/font-awesome/fontawesome.css +5 -0
  132. package/nationalarchives/lib/font-awesome/fontawesome.css.map +1 -0
  133. package/nationalarchives/lib/font-awesome/regular.css +5 -0
  134. package/nationalarchives/lib/font-awesome/regular.css.map +1 -0
  135. package/nationalarchives/lib/font-awesome/solid.css +5 -0
  136. package/nationalarchives/lib/font-awesome/solid.css.map +1 -0
  137. package/nationalarchives/lib/font-awesome/v4-shims.css +5 -0
  138. package/nationalarchives/lib/font-awesome/v4-shims.css.map +1 -0
  139. package/nationalarchives/stories/development/about.mdx +60 -0
  140. package/nationalarchives/stories/development/contributing.mdx +8 -5
  141. package/nationalarchives/stories/development/relationships.mdx +57 -0
  142. package/nationalarchives/stories/development/using.mdx +75 -0
  143. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +176 -50
  144. package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +3 -3
  145. package/nationalarchives/stories/utilities/typography/typography.stories.js +1 -1
  146. package/nationalarchives/templates/layouts/_generic.njk +7 -2
  147. package/nationalarchives/tools/_colour.scss +55 -17
  148. package/nationalarchives/tools/_index.scss +5 -4
  149. package/nationalarchives/tools/_spacing.scss +22 -0
  150. package/nationalarchives/tools/_typography.scss +0 -4
  151. package/nationalarchives/utilities/_a11y.scss +24 -0
  152. package/nationalarchives/utilities/_global.scss +3 -29
  153. package/nationalarchives/utilities/_index.scss +5 -5
  154. package/nationalarchives/utilities/_overrides.scss +5 -15
  155. package/nationalarchives/utilities/_typography.scss +68 -57
  156. package/nationalarchives/variables/_colour.scss +17 -9
  157. package/nationalarchives/variables/_grid.scss +1 -1
  158. package/nationalarchives/variables/_spacing.scss +12 -12
  159. package/nationalarchives/variables/_typography.scss +7 -7
  160. package/package.json +5 -2
  161. package/nationalarchives/assets/images/footer/facebook.svg +0 -11
  162. package/nationalarchives/assets/images/footer/flickr.svg +0 -11
  163. package/nationalarchives/assets/images/footer/instagram.svg +0 -17
  164. package/nationalarchives/assets/images/footer/rss.svg +0 -13
  165. package/nationalarchives/assets/images/footer/twitter.svg +0 -14
  166. package/nationalarchives/assets/images/footer/youtube.svg +0 -12
  167. package/nationalarchives/stories/development/dependencies.mdx +0 -11
  168. package/nationalarchives/stories/development/relationships.md +0 -91
  169. package/nationalarchives/stories/development/technologies.mdx +0 -65
  170. package/nationalarchives/utilities/_font-awesome.scss +0 -5
@@ -1,6 +1,7 @@
1
1
  @use "../features";
2
2
  @use "../tools/colour";
3
3
  @use "../tools/media";
4
+ @use "../tools/spacing";
4
5
  @use "../variables/typography";
5
6
 
6
7
  :root {
@@ -115,6 +116,7 @@
115
116
 
116
117
  img,
117
118
  svg,
119
+ picture,
118
120
  video,
119
121
  canvas {
120
122
  max-width: 100%;
@@ -161,12 +163,9 @@ hr {
161
163
  }
162
164
 
163
165
  .tna-aside {
164
- margin-bottom: 2rem;
165
166
  padding: 2rem;
166
167
 
167
- &:last-child {
168
- margin-bottom: 0;
169
- }
168
+ @include spacing.space-below;
170
169
 
171
170
  @include media.on-mobile {
172
171
  padding: 1rem;
@@ -188,28 +187,3 @@ hr {
188
187
  .tna-background--accent-light {
189
188
  @include colour.light-accent-background;
190
189
  }
191
-
192
- .tna-visually-hidden {
193
- width: 1px !important;
194
- height: 1px !important;
195
- margin: 0 !important;
196
- padding: 0 !important;
197
-
198
- position: absolute !important;
199
- top: -9999px !important;
200
- left: -9999px !important;
201
- z-index: -1 !important;
202
-
203
- overflow: hidden !important;
204
-
205
- clip: rect(0, 0, 0, 0) !important;
206
-
207
- border: 0 !important;
208
-
209
- background-color: transparent !important;
210
-
211
- &::before,
212
- &::after {
213
- content: "\00a0";
214
- }
215
- }
@@ -1,5 +1,5 @@
1
- @forward "debug";
2
- @forward "font-awesome";
3
- @forward "global";
4
- @forward "overrides";
5
- @forward "typography";
1
+ @use "a11y";
2
+ @use "debug";
3
+ @use "global";
4
+ @use "overrides";
5
+ @use "typography";
@@ -16,20 +16,6 @@
16
16
  }
17
17
  }
18
18
 
19
- @include no-spacing-generator;
20
-
21
- @include media.on-medium {
22
- @include no-spacing-generator("medium");
23
- }
24
-
25
- @include media.on-small {
26
- @include no-spacing-generator("small");
27
- }
28
-
29
- @include media.on-tiny {
30
- @include no-spacing-generator("tiny");
31
- }
32
-
33
19
  @mixin overrides($spacing, $suffix: "") {
34
20
  @if $suffix != "" {
35
21
  $suffix: "-" + $suffix;
@@ -40,23 +26,27 @@
40
26
  @each $size, $amount in $spacing {
41
27
  .tna-\!--#{$property}-#{$direction}-#{$size}#{$suffix},
42
28
  .tna-\!--#{$property}-vertical-#{$size}#{$suffix} {
43
- #{$property}-#{$direction}: #{$amount}rem !important;
29
+ #{$property}-#{$direction}: #{$amount} !important;
44
30
  }
45
31
  }
46
32
  }
47
33
  }
48
34
  }
49
35
 
36
+ @include no-spacing-generator;
50
37
  @include overrides(spacing.$spacing);
51
38
 
52
39
  @include media.on-medium {
40
+ @include no-spacing-generator("medium");
53
41
  @include overrides(spacing.$spacing, "medium");
54
42
  }
55
43
 
56
44
  @include media.on-small {
45
+ @include no-spacing-generator("small");
57
46
  @include overrides(spacing.$spacing-mobile, "small");
58
47
  }
59
48
 
60
49
  @include media.on-tiny {
50
+ @include no-spacing-generator("tiny");
61
51
  @include overrides(spacing.$spacing-mobile, "tiny");
62
52
  }
@@ -1,13 +1,34 @@
1
1
  @use "sass:math";
2
2
  @use "../tools/colour";
3
3
  @use "../tools/media";
4
+ @use "../tools/spacing";
4
5
  @use "../tools/typography";
6
+ @use "../variables/assets";
5
7
  @use "../variables/grid";
6
8
 
7
- // TODO: Temporary - will eventually bundle font files into package
8
- @import "https://fonts.googleapis.com/css2?family=Open+Sans:wght@500;700&family=Roboto+Mono:wght@400&display=swap";
9
9
  @import "https://use.typekit.net/hkj3kuz.css";
10
10
 
11
+ @font-face {
12
+ font-family: "Open Sans";
13
+ src: url("#{assets.$tna-font-path}/OpenSans-Medium.ttf");
14
+ font-weight: normal;
15
+ font-style: normal;
16
+ }
17
+
18
+ @font-face {
19
+ font-family: "Open Sans";
20
+ src: url("#{assets.$tna-font-path}/OpenSans-Bold.ttf");
21
+ font-weight: bold;
22
+ font-style: normal;
23
+ }
24
+
25
+ @font-face {
26
+ font-family: "Roboto Mono";
27
+ src: url("#{assets.$tna-font-path}/RobotoMono-Regular.ttf");
28
+ font-weight: normal;
29
+ font-style: normal;
30
+ }
31
+
11
32
  .tna-template {
12
33
  @include colour.colour-font("font-base");
13
34
  @include typography.main-font;
@@ -49,6 +70,10 @@ strong {
49
70
  p {
50
71
  margin: 0 0 1.5rem;
51
72
 
73
+ @include media.on-tiny {
74
+ margin-bottom: 1rem;
75
+ }
76
+
52
77
  &:last-child {
53
78
  margin-bottom: 0;
54
79
  }
@@ -68,8 +93,6 @@ a {
68
93
  }
69
94
 
70
95
  &.tna-chip {
71
- // display: block;
72
-
73
96
  text-decoration: none;
74
97
 
75
98
  &,
@@ -86,12 +109,12 @@ a {
86
109
 
87
110
  .tna-ul,
88
111
  .tna-ol {
89
- margin: 0 0 2rem;
112
+ margin-top: 0;
113
+ margin-right: 0;
114
+ margin-left: 0;
90
115
  padding: 0 0 0 2rem;
91
116
 
92
- &:last-child {
93
- margin-bottom: 0;
94
- }
117
+ @include spacing.space-below;
95
118
 
96
119
  li::marker {
97
120
  @include colour.colour-font("accent-background");
@@ -109,7 +132,6 @@ a {
109
132
  max-width: max-content;
110
133
  padding: 0.375em 0.5rem;
111
134
 
112
- // display: inline-block;
113
135
  display: block;
114
136
 
115
137
  @include colour.colour-font("font-dark");
@@ -128,13 +150,38 @@ a {
128
150
 
129
151
  display: flex;
130
152
  flex-wrap: wrap;
153
+ gap: 1rem;
131
154
 
132
155
  list-style: none;
133
156
 
157
+ @include spacing.space-below;
158
+
134
159
  &__item {
135
- margin: 0 1rem 1rem 0;
160
+ }
161
+ }
162
+
163
+ %heading {
164
+ @include colour.colour-font("font-dark");
165
+ @include typography.heading-font;
136
166
 
167
+ a {
137
168
  display: inline-block;
169
+
170
+ &::after {
171
+ padding-left: 0.25rem;
172
+
173
+ display: inline-block;
174
+
175
+ font-weight: 700;
176
+
177
+ content: "\203A";
178
+ }
179
+
180
+ &:hover {
181
+ &::after {
182
+ padding-left: 0.5rem;
183
+ }
184
+ }
138
185
  }
139
186
  }
140
187
 
@@ -143,7 +190,8 @@ a {
143
190
  line-height: 1.2;
144
191
 
145
192
  @include media.on-medium {
146
- @include typography.relative-font-size(42);
193
+ // @include typography.relative-font-size(42);
194
+ @include typography.relative-font-size(50);
147
195
  }
148
196
 
149
197
  @include media.on-mobile {
@@ -156,7 +204,8 @@ a {
156
204
  line-height: 1.4;
157
205
 
158
206
  @include media.on-medium {
159
- @include typography.relative-font-size(26);
207
+ // @include typography.relative-font-size(26);
208
+ @include typography.relative-font-size(28);
160
209
  }
161
210
 
162
211
  @include media.on-mobile {
@@ -174,38 +223,8 @@ a {
174
223
  line-height: 1.6;
175
224
  }
176
225
 
177
- %heading {
178
- margin-bottom: 1rem;
179
-
180
- @include colour.colour-font("font-dark");
181
- @include typography.heading-font;
182
-
183
- &:last-child {
184
- margin-bottom: 0;
185
- }
186
-
187
- a {
188
- &::after {
189
- padding-left: 0.25rem;
190
-
191
- display: inline-block;
192
-
193
- font-weight: 700;
194
-
195
- content: "\203A";
196
- }
197
-
198
- &:hover {
199
- &::after {
200
- transform: translateX(0.25rem);
201
- }
202
- }
203
- }
204
- }
205
-
206
226
  .tna-heading {
207
227
  @extend %heading;
208
- // @extend %heading-l;
209
228
 
210
229
  &--xl {
211
230
  @extend %heading-xl;
@@ -225,8 +244,6 @@ a {
225
244
  }
226
245
 
227
246
  .tna-hgroup {
228
- margin-bottom: 1rem;
229
-
230
247
  &__supertitle {
231
248
  margin: 0 0 0.5rem;
232
249
 
@@ -239,7 +256,6 @@ a {
239
256
  display: block;
240
257
 
241
258
  @extend %heading;
242
- // @extend %heading-l;
243
259
  }
244
260
 
245
261
  &--xl &__title {
@@ -262,6 +278,7 @@ a {
262
278
  .tna-heading,
263
279
  .tna-hgroup {
264
280
  margin-top: 3rem;
281
+ margin-bottom: 1rem;
265
282
 
266
283
  &:first-child {
267
284
  margin-top: 0;
@@ -273,22 +290,14 @@ a {
273
290
  }
274
291
 
275
292
  .tna-blockquote {
276
- margin: 0 0 2rem;
293
+ margin-top: 0;
294
+ margin-right: 0;
295
+ margin-left: 0;
277
296
  padding: 1rem 1rem 1rem 2rem;
278
297
 
279
298
  @include colour.colour-border("accent-background", 0.35rem, solid, left);
280
299
 
281
- // quotes: "“" "”" "‘" "’";
282
-
283
- &:last-child {
284
- margin-bottom: 0;
285
- }
286
-
287
- // &::before {
288
- // float: left;
289
-
290
- // content: open-quote;
291
- // }
300
+ @include spacing.space-below;
292
301
 
293
302
  &__quote {
294
303
  font-weight: 700;
@@ -313,6 +322,8 @@ a {
313
322
  @include typography.relative-font-size(30);
314
323
  line-height: math.div(50, 30);
315
324
 
325
+ @include spacing.space-below;
326
+
316
327
  @include media.on-mobile {
317
328
  @include typography.relative-font-size(24);
318
329
  line-height: 2;
@@ -43,10 +43,10 @@ $colour-palette-default: (
43
43
  "focus-outline": map.get($colour-palette-brand, "blue"),
44
44
  "keyline": #ccc,
45
45
  "keyline-dark": $dark-grey,
46
- "button-primary-text": map.get($colour-palette-brand, "white"),
47
- "button-primary-background": map.get($colour-palette-brand, "black"),
48
- "button-primary-hover-text": map.get($colour-palette-brand, "black"),
49
- "button-primary-hover-background": map.get($colour-palette-brand, "white"),
46
+ "button-text": map.get($colour-palette-brand, "white"),
47
+ "button-background": map.get($colour-palette-brand, "black"),
48
+ "button-hover-text": map.get($colour-palette-brand, "black"),
49
+ "button-hover-background": map.get($colour-palette-brand, "white"),
50
50
  "contrast-background": #1e1e1e,
51
51
  // TODO: #343338 ?
52
52
  "contrast-font-base": map.get($colour-palette-brand, "white"),
@@ -57,6 +57,10 @@ $colour-palette-default: (
57
57
  "contrast-link-visited": map.get($colour-palette-brand, "white"),
58
58
  "contrast-keyline": rgba(map.get($colour-palette-brand, "white"), 0.5),
59
59
  "contrast-keyline-dark": rgba(map.get($colour-palette-brand, "white"), 0.8),
60
+ "contrast-button-text": map.get($colour-palette-brand, "black"),
61
+ "contrast-button-background": map.get($colour-palette-brand, "white"),
62
+ "contrast-button-hover-text": map.get($colour-palette-brand, "white"),
63
+ "contrast-button-hover-background": map.get($colour-palette-brand, "black"),
60
64
  "accent": map.get($colour-palette-brand, "light-grey"),
61
65
  "accent-background": #111,
62
66
  "accent-background-light": map.get($colour-palette-brand, "light-grey"),
@@ -87,15 +91,15 @@ $colour-palette-dark: map.merge(
87
91
  "link-visited": map.get($colour-palette-default, "contrast-link-visited"),
88
92
  "keyline": rgba(map.get($colour-palette-brand, "white"), 0.25),
89
93
  "keyline-dark": map.get($colour-palette-brand, "white"),
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
+ "button-text": map.get($colour-palette-brand, "black"),
95
+ "button-background": map.get($colour-palette-brand, "white"),
96
+ "button-hover-text": map.get($colour-palette-brand, "white"),
97
+ "button-hover-background": map.get($colour-palette-brand, "black"),
94
98
  "contrast-background": #1e1e1e,
95
99
  "contrast-link-visited":
96
100
  map.get($colour-palette-default, "contrast-link-visited"),
97
101
  // --accent-background-light is the same as --contrast-background on dark themes
98
- "accent-background-light": #111,
102
+ "accent-background-light": map.get($colour-palette-brand, "grey"),
99
103
  )
100
104
  );
101
105
 
@@ -123,6 +127,10 @@ $colour-palette-high-contrast: map.merge(
123
127
  "contrast-link-visited": map.get($colour-palette-brand, "black"),
124
128
  "contrast-keyline": map.get($colour-palette-brand, "black"),
125
129
  "contrast-keyline-dark": map.get($colour-palette-brand, "black"),
130
+ "contrast-button-text": map.get($colour-palette-brand, "white"),
131
+ "contrast-button-background": map.get($colour-palette-brand, "black"),
132
+ "contrast-button-hover-text": map.get($colour-palette-brand, "black"),
133
+ "contrast-button-hover-background": map.get($colour-palette-brand, "white"),
126
134
  )
127
135
  );
128
136
 
@@ -1,7 +1,7 @@
1
1
  $largest-container-width: 75.25rem !default;
2
2
 
3
3
  $gutter-width: 2rem !default;
4
- $gutter-width-mobile: 1rem !default;
4
+ $gutter-width-mobile: 1.5rem !default;
5
5
 
6
6
  $column-count: 12 !default;
7
7
  $column-count-medium: 6 !default;
@@ -1,17 +1,17 @@
1
1
  $spacing: (
2
- "xs": 0.5,
3
- "s": 1,
4
- "m": 2,
5
- "l": 3,
6
- "xl": 5,
7
- "xxl": 8,
2
+ "xs": 0.5rem,
3
+ "s": 1rem,
4
+ "m": 2rem,
5
+ "l": 3rem,
6
+ "xl": 5rem,
7
+ "xxl": 8rem,
8
8
  );
9
9
 
10
10
  $spacing-mobile: (
11
- "xs": 0.5,
12
- "s": 0.75,
13
- "m": 1.5,
14
- "l": 2,
15
- "xl": 3,
16
- "xxl": 5,
11
+ "xs": 0.5rem,
12
+ "s": 0.75rem,
13
+ "m": 1.5rem,
14
+ "l": 2rem,
15
+ "xl": 3rem,
16
+ "xxl": 5rem,
17
17
  );
@@ -2,15 +2,15 @@ $base-font-size-px: 16;
2
2
 
3
3
  $interactive-text-decoration-thickness: 3.5px;
4
4
 
5
- $font-family-main: "Open Sans", sans-serif;
6
- $font-weight-main: 500;
7
- $font-weight-main-bold: 700;
5
+ $font-family-main: "Open Sans", serif;
6
+ // $font-weight-main: 500;
7
+ $font-weight-main: normal;
8
+ // $font-weight-main-bold: 700;
9
+ $font-weight-main-bold: bold;
8
10
 
9
11
  $font-family-heading: supria-sans-condensed, "Arial Narrow", sans-serif;
10
12
  $font-weight-heading: 400;
11
13
 
12
14
  $font-family-detail: "Roboto Mono", monospace;
13
- $font-weight-detail: 400;
14
- $font-weight-detail-bold: 700;
15
- // $font-family-detail: $font-family-main;
16
- // $font-weight-detail: $font-weight-main;
15
+ // $font-weight-detail: 400;
16
+ $font-weight-detail: normal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nationalarchives/frontend",
3
- "version": "0.1.17-prerelease",
3
+ "version": "0.1.19-prerelease",
4
4
  "description": "The National Archives frontend styles",
5
5
  "scripts": {
6
6
  "start": "storybook dev -p 6006",
@@ -8,7 +8,7 @@
8
8
  "test": "node tasks/test-fixtures.js && test-storybook --verbose --stories-json",
9
9
  "lint": "prettier --check '{src,.storybook,tasks}/**/*.{js,mjs,scss,json,html}' && stylelint 'src/**/*.scss' && eslint 'src/**/*.mjs'",
10
10
  "lint:fix": "prettier --write '{src,.storybook,tasks}/**/*.{js,mjs,scss,json,html}' && stylelint --fix 'src/**/*.scss' && eslint --fix 'src/**/*.mjs'",
11
- "package:sass": "sass --style=compressed --embed-sources src/nationalarchives/all.scss package/nationalarchives/all.css",
11
+ "package:sass": "sass --style=compressed --embed-sources src/nationalarchives:package/nationalarchives",
12
12
  "package:scripts": "webpack"
13
13
  },
14
14
  "repository": {
@@ -63,6 +63,9 @@
63
63
  "eslint-plugin-storybook": "^0.6.13",
64
64
  "glob": "^10.2.7",
65
65
  "jest-image-snapshot": "^6.2.0",
66
+ "jsdom": "^22.1.0",
67
+ "mdx-mermaid": "^2.0.0",
68
+ "node-self": "^1.0.2",
66
69
  "nunjucks": "^3.2.3",
67
70
  "prettier": "^3.0.1",
68
71
  "react": "^18.2.0",
@@ -1,11 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License). The fill colour and stroke of this SVG has been modified. -->
3
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
- viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
5
- <style type="text/css">
6
- .st0{fill:#FFFFFF;stroke:#26262A;stroke-width:5;stroke-miterlimit:10;}
7
- </style>
8
- <path class="st0" d="M504,256C504,119,393,8,256,8S8,119,8,256c0,123.8,90.7,226.4,209.2,245V327.7h-63V256h63v-54.6
9
- c0-62.2,37-96.5,93.7-96.5c27.1,0,55.5,4.8,55.5,4.8v61h-31.3c-30.8,0-40.4,19.1-40.4,38.7V256h68.8l-11,71.7h-57.8V501
10
- C413.3,482.4,504,379.8,504,256z"/>
11
- </svg>
@@ -1,11 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License). The fill colour and stroke of this SVG has been modified. -->
3
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
- viewBox="0 0 448 512" style="enable-background:new 0 0 448 512;" xml:space="preserve">
5
- <style type="text/css">
6
- .st0{fill:#FFFFFF;stroke:#000000;stroke-width:5;stroke-miterlimit:10;}
7
- </style>
8
- <path class="st0" d="M400,32H48C21.5,32,0,53.5,0,80v352c0,26.5,21.5,48,48,48h352c26.5,0,48-21.5,48-48V80
9
- C448,53.5,426.5,32,400,32z M144.5,319c-35.1,0-63.5-28.4-63.5-63.5s28.4-63.5,63.5-63.5s63.5,28.4,63.5,63.5S179.6,319,144.5,319z
10
- M303.5,319c-35.1,0-63.5-28.4-63.5-63.5s28.4-63.5,63.5-63.5s63.5,28.4,63.5,63.5S338.6,319,303.5,319z"/>
11
- </svg>
@@ -1,17 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License). The fill colour and stroke of this SVG has been modified. -->
3
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
- viewBox="0 0 448 512" style="enable-background:new 0 0 448 512;" xml:space="preserve">
5
- <style type="text/css">
6
- .st0{fill:#FFFFFF;stroke:#26262A;stroke-width:5;stroke-miterlimit:10;}
7
- </style>
8
- <path class="st0" d="M224.1,141c-63.6,0-114.9,51.3-114.9,114.9s51.3,114.9,114.9,114.9S339,319.5,339,255.9S287.7,141,224.1,141z
9
- M224.1,330.6c-41.1,0-74.7-33.5-74.7-74.7s33.5-74.7,74.7-74.7s74.7,33.5,74.7,74.7S265.2,330.6,224.1,330.6L224.1,330.6z
10
- M370.5,136.3c0,14.9-12,26.8-26.8,26.8c-14.9,0-26.8-12-26.8-26.8s12-26.8,26.8-26.8S370.5,121.5,370.5,136.3z M446.6,163.5
11
- c-1.7-35.9-9.9-67.7-36.2-93.9c-26.2-26.2-58-34.4-93.9-36.2c-37-2.1-147.9-2.1-184.9,0C95.8,35.1,64,43.3,37.7,69.5
12
- s-34.4,58-36.2,93.9c-2.1,37-2.1,147.9,0,184.9c1.7,35.9,9.9,67.7,36.2,93.9s58,34.4,93.9,36.2c37,2.1,147.9,2.1,184.9,0
13
- c35.9-1.7,67.7-9.9,93.9-36.2c26.2-26.2,34.4-58,36.2-93.9C448.7,311.3,448.7,200.5,446.6,163.5L446.6,163.5z M398.8,388
14
- c-7.8,19.6-22.9,34.7-42.6,42.6c-29.5,11.7-99.5,9-132.1,9s-102.7,2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6
15
- c-11.7-29.5-9-99.5-9-132.1s-2.6-102.7,9-132.1c7.8-19.6,22.9-34.7,42.6-42.6c29.5-11.7,99.5-9,132.1-9s102.7-2.6,132.1,9
16
- c19.6,7.8,34.7,22.9,42.6,42.6c11.7,29.5,9,99.5,9,132.1S410.5,358.6,398.8,388z"/>
17
- </svg>
@@ -1,13 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License). The fill colour and stroke of this SVG has been modified. -->
3
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
- viewBox="0 0 448 512" style="enable-background:new 0 0 448 512;" xml:space="preserve">
5
- <style type="text/css">
6
- .st0{fill:#FFFFFF;stroke:#000000;stroke-width:5;stroke-miterlimit:10;}
7
- </style>
8
- <path class="st0" d="M128.1,416c0,35.4-28.7,64-64,64S0,451.3,0,416s28.7-64,64-64S128.1,380.6,128.1,416L128.1,416z M303.7,463.2
9
- c-8.4-154.6-132.2-278.6-287-287c-9.1-0.5-16.8,6.8-16.8,16v48.1c0,8.4,6.5,15.5,14.9,16c111.8,7.3,201.5,96.7,208.8,208.8
10
- c0.5,8.4,7.6,14.9,16,14.9h48.1C296.9,480,304.2,472.3,303.7,463.2L303.7,463.2z M448,463.5C439.6,229.7,251.5,40.4,16.5,32
11
- C7.5,31.7,0,39,0,48v48.1c0,8.6,6.8,15.6,15.5,16c191.2,7.8,344.6,161.3,352.5,352.5c0.4,8.6,7.4,15.5,16,15.5H432
12
- C441,480,448.3,472.5,448,463.5z"/>
13
- </svg>
@@ -1,14 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License). The fill colour and stroke of this SVG has been modified. -->
3
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
- viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
5
- <style type="text/css">
6
- .st0{fill:#FFFFFF;stroke:#000000;stroke-width:5;stroke-miterlimit:10;}
7
- </style>
8
- <path class="st0" d="M459.4,151.7c0.3,4.5,0.3,9.1,0.3,13.6c0,138.7-105.6,298.6-298.6,298.6c-59.5,0-114.7-17.2-161.1-47.1
9
- c8.4,1,16.6,1.3,25.3,1.3c49.1,0,94.2-16.6,130.3-44.8c-46.1-1-84.8-31.2-98.1-72.8c6.5,1,13,1.6,19.8,1.6c9.4,0,18.8-1.3,27.6-3.6
10
- c-48.1-9.7-84.1-52-84.1-103v-1.3c14,7.8,30.2,12.7,47.4,13.3c-28.3-18.8-46.8-51-46.8-87.4c0-19.5,5.2-37.4,14.3-53
11
- C87.4,130.9,165,172.5,252.1,177.1c-1.6-7.8-2.6-15.9-2.6-24c0-57.8,46.8-104.9,104.9-104.9c30.2,0,57.5,12.7,76.7,33.1
12
- c23.7-4.5,46.5-13.3,66.6-25.3c-7.8,24.4-24.4,44.8-46.1,57.8c21.1-2.3,41.6-8.1,60.4-16.2C497.7,118.3,479.8,136.8,459.4,151.7
13
- L459.4,151.7z"/>
14
- </svg>
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License). The fill colour and stroke of this SVG has been modified. -->
3
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
- viewBox="0 0 576 512" style="enable-background:new 0 0 576 512;" xml:space="preserve">
5
- <style type="text/css">
6
- .st0{fill:#FFFFFF;stroke:#000000;stroke-width:5;stroke-miterlimit:10;}
7
- </style>
8
- <path class="st0" d="M549.7,124.1c-6.3-23.7-24.8-42.3-48.3-48.6C458.8,64,288,64,288,64S117.2,64,74.6,75.5
9
- c-23.5,6.3-42,24.9-48.3,48.6c-11.4,42.9-11.4,132.3-11.4,132.3s0,89.4,11.4,132.3c6.3,23.6,24.8,41.5,48.3,47.8
10
- C117.2,448,288,448,288,448s170.8,0,213.4-11.5c23.5-6.3,42-24.2,48.3-47.8c11.4-42.9,11.4-132.3,11.4-132.3
11
- S561.1,166.9,549.7,124.1z M232.1,337.6V175.2l142.7,81.2L232.1,337.6L232.1,337.6z"/>
12
- </svg>
@@ -1,11 +0,0 @@
1
- import { Meta } from "@storybook/blocks";
2
-
3
- <Meta title="Development/Dependencies" />
4
-
5
- # Update Storybook dependencies
6
-
7
- ```sh
8
- npx sb upgrade
9
- # or
10
- npx storybook@latest upgrade
11
- ```