@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.
Files changed (88) hide show
  1. package/nationalarchives/all.css +13 -1
  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.scss +2 -3
  6. package/nationalarchives/assets/fonts/fa-brands-400.ttf +0 -0
  7. package/nationalarchives/assets/fonts/fa-brands-400.woff2 +0 -0
  8. package/nationalarchives/assets/fonts/fa-regular-400.ttf +0 -0
  9. package/nationalarchives/assets/fonts/fa-regular-400.woff2 +0 -0
  10. package/nationalarchives/assets/fonts/fa-solid-900.ttf +0 -0
  11. package/nationalarchives/assets/fonts/fa-solid-900.woff2 +0 -0
  12. package/nationalarchives/components/breadcrumbs/_index.scss +2 -2
  13. package/nationalarchives/components/button/_button-group.scss +18 -0
  14. package/nationalarchives/components/button/_index.scss +24 -7
  15. package/nationalarchives/components/button/button.stories.js +63 -6
  16. package/nationalarchives/components/button/fixtures.json +3 -3
  17. package/nationalarchives/components/button/macro-options.json +13 -1
  18. package/nationalarchives/components/button/template.njk +7 -2
  19. package/nationalarchives/components/card/_index.scss +62 -47
  20. package/nationalarchives/components/card/card.stories.js +59 -8
  21. package/nationalarchives/components/card/fixtures.json +59 -20
  22. package/nationalarchives/components/card/macro-options.json +14 -2
  23. package/nationalarchives/components/card/template.njk +12 -8
  24. package/nationalarchives/components/filters/_index.scss +19 -14
  25. package/nationalarchives/components/footer/_index.scss +194 -60
  26. package/nationalarchives/components/footer/fixtures.json +1 -1
  27. package/nationalarchives/components/footer/footer.stories.js +80 -71
  28. package/nationalarchives/components/footer/macro-options.json +34 -8
  29. package/nationalarchives/components/footer/template.njk +110 -53
  30. package/nationalarchives/components/header/_index.scss +40 -4
  31. package/nationalarchives/components/hero/_index.scss +1 -1
  32. package/nationalarchives/components/index-grid/_index.scss +27 -5
  33. package/nationalarchives/components/index-grid/index-grid.stories.js +25 -1
  34. package/nationalarchives/components/index-grid/macro-options.json +12 -0
  35. package/nationalarchives/components/index-grid/template.njk +9 -11
  36. package/nationalarchives/components/message/_index.scss +8 -0
  37. package/nationalarchives/components/picture/_index.scss +2 -0
  38. package/nationalarchives/components/picture/picture.js +1 -1
  39. package/nationalarchives/components/picture/picture.js.map +1 -1
  40. package/nationalarchives/components/picture/picture.mjs +2 -0
  41. package/nationalarchives/components/skip-link/skip-link.stories.js +3 -2
  42. package/nationalarchives/components/tabs/_index.scss +6 -3
  43. package/nationalarchives/components/tabs/tabs.stories.js +6 -6
  44. package/nationalarchives/lib/font-awesome/_animated.scss +276 -0
  45. package/nationalarchives/lib/font-awesome/_bordered-pulled.scss +20 -0
  46. package/nationalarchives/lib/font-awesome/_core.scss +42 -0
  47. package/nationalarchives/lib/font-awesome/_fixed-width.scss +7 -0
  48. package/nationalarchives/lib/font-awesome/_functions.scss +57 -0
  49. package/nationalarchives/lib/font-awesome/_icons.scss +11 -0
  50. package/nationalarchives/lib/font-awesome/_list.scss +20 -0
  51. package/nationalarchives/lib/font-awesome/_mixins.scss +74 -0
  52. package/nationalarchives/lib/font-awesome/_rotated-flipped.scss +31 -0
  53. package/nationalarchives/lib/font-awesome/_screen-reader.scss +14 -0
  54. package/nationalarchives/lib/font-awesome/_shims.scss +2653 -0
  55. package/nationalarchives/lib/font-awesome/_sizing.scss +16 -0
  56. package/nationalarchives/lib/font-awesome/_stacked.scss +32 -0
  57. package/nationalarchives/lib/font-awesome/_variables.scss +4976 -0
  58. package/nationalarchives/lib/font-awesome/brands.scss +34 -0
  59. package/nationalarchives/lib/font-awesome/fontawesome.scss +21 -0
  60. package/nationalarchives/lib/font-awesome/regular.scss +28 -0
  61. package/nationalarchives/lib/font-awesome/solid.scss +28 -0
  62. package/nationalarchives/lib/font-awesome/v4-shims.scss +11 -0
  63. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.mdx +22 -0
  64. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +483 -97
  65. package/nationalarchives/stories/utilities/overrides/overrides.mdx +37 -57
  66. package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +1 -1
  67. package/nationalarchives/stories/utilities/typography/typography.mdx +2 -0
  68. package/nationalarchives/stories/utilities/typography/typography.stories.js +20 -1
  69. package/nationalarchives/templates/layouts/_generic.njk +1 -1
  70. package/nationalarchives/tools/_colour.scss +86 -41
  71. package/nationalarchives/tools/_typography.scss +13 -0
  72. package/nationalarchives/utilities/_font-awesome.scss +5 -0
  73. package/nationalarchives/utilities/_global.scss +70 -26
  74. package/nationalarchives/utilities/_index.scss +1 -0
  75. package/nationalarchives/utilities/_overrides.scss +42 -10
  76. package/nationalarchives/utilities/_typography.scss +198 -59
  77. package/nationalarchives/variables/_assets.scss +1 -0
  78. package/nationalarchives/variables/_colour.scss +29 -23
  79. package/nationalarchives/variables/_index.scss +1 -0
  80. package/nationalarchives/variables/_spacing.scss +3 -1
  81. package/nationalarchives/variables/_typography.scss +4 -1
  82. package/package.json +13 -13
  83. package/nationalarchives/patterns/_index.scss +0 -1
  84. package/nationalarchives/patterns/featured-collection/_index.scss +0 -13
  85. package/nationalarchives/patterns/featured-collection/featured-collection.stories.js +0 -34
  86. package/nationalarchives/patterns/featured-collection/macro-options.json +0 -20
  87. package/nationalarchives/patterns/featured-collection/macro.njk +0 -3
  88. 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-thickness: 3.5px;
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
- .tna-heading {
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
- &--xl {
102
- @include typography.relative-font-size(64);
103
- line-height: 1;
187
+ a {
188
+ &::after {
189
+ padding-left: 0.25rem;
190
+
191
+ display: inline-block;
104
192
 
105
- @include media.on-medium {
106
- @include typography.relative-font-size(42);
193
+ font-weight: 700;
194
+
195
+ content: "\203A";
107
196
  }
108
197
 
109
- @include media.on-mobile {
110
- @include typography.relative-font-size(36);
198
+ &:hover {
199
+ &::after {
200
+ transform: translateX(0.25rem);
201
+ }
111
202
  }
112
203
  }
204
+ }
113
205
 
114
- &--l {
115
- @include typography.relative-font-size(32);
116
- line-height: 1.2;
206
+ .tna-heading {
207
+ @extend %heading;
208
+ // @extend %heading-l;
117
209
 
118
- @include media.on-medium {
119
- @include typography.relative-font-size(26);
120
- }
210
+ &--xl {
211
+ @extend %heading-xl;
212
+ }
121
213
 
122
- @include media.on-mobile {
123
- @include typography.relative-font-size(24);
124
- }
214
+ &--l {
215
+ @extend %heading-l;
125
216
  }
126
217
 
127
218
  &--m {
128
- @include typography.relative-font-size(20);
129
- line-height: 1.4;
219
+ @extend %heading-m;
130
220
  }
131
221
 
132
222
  &--s {
133
- @include typography.relative-font-size(18);
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
- @include colour.colour-font("font-base");
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
- @include colour.colour-font("font-dark");
239
+ display: block;
160
240
 
161
- .tna-hgroup__supertitle {
162
- display: block;
241
+ @extend %heading;
242
+ // @extend %heading-l;
243
+ }
163
244
 
164
- @include colour.colour-font("font-base");
165
- }
245
+ &--xl &__title {
246
+ @extend %heading-xl;
166
247
  }
167
248
 
168
- &--xl {
169
- .tna-hgroup__title {
170
- @include typography.relative-font-size(64);
171
- line-height: 1;
172
- }
249
+ &--l &__title {
250
+ @extend %heading-l;
173
251
  }
174
252
 
175
- &--l {
176
- .tna-hgroup__title {
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
- &--m {
183
- .tna-hgroup__title {
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
- &--s {
190
- .tna-hgroup__title {
191
- @include typography.relative-font-size(18);
192
- line-height: 1.6;
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("keyline", 0.35rem, solid, left);
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": map.get($colour-palette-brand, "white"),
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
- "button-secondary-text": map.get($colour-palette-brand, "black"),
57
- "button-secondary-background": map.get($colour-palette-brand, "yellow"),
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, "blue"),
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": #222,
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
- "accent-default": $-accent-colour-default-dark,
87
- "contrast-background": #111,
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": map.get($colour-palette-brand, "white"),
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
- "button-primary-text": map.get($colour-palette-brand, "black"),
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,3 +1,4 @@
1
+ @use "assets";
1
2
  @use "colour";
2
3
  @use "grid";
3
4
  @use "media";
@@ -3,7 +3,8 @@ $spacing: (
3
3
  "s": 1,
4
4
  "m": 2,
5
5
  "l": 3,
6
- "xl": 6,
6
+ "xl": 5,
7
+ "xxl": 8,
7
8
  );
8
9
 
9
10
  $spacing-mobile: (
@@ -12,4 +13,5 @@ $spacing-mobile: (
12
13
  "m": 1.5,
13
14
  "l": 2,
14
15
  "xl": 3,
16
+ "xxl": 5,
15
17
  );
@@ -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.16-prerelease",
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.2.1",
46
- "@storybook/addon-docs": "^7.2.1",
47
- "@storybook/addon-essentials": "^7.2.1",
48
- "@storybook/addon-interactions": "^7.2.1",
49
- "@storybook/addon-links": "^7.2.1",
50
- "@storybook/addon-mdx-gfm": "^7.2.1",
51
- "@storybook/html": "^7.2.1",
52
- "@storybook/html-webpack5": "^7.2.1",
53
- "@storybook/jest": "^0.1.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": "^6.21.0",
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.2.1",
73
+ "storybook": "^7.4.0",
74
74
  "style-loader": "^3.3.1",
75
75
  "stylelint": "^15.10.2",
76
- "stylelint-config-standard-scss": "^10.0.0",
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,13 +0,0 @@
1
- @use "../../tools/colour";
2
-
3
- .tna-featured-collection {
4
- padding-top: 2rem;
5
- padding-bottom: 2rem;
6
-
7
- background-color: colour.brand-colour("cream");
8
-
9
- .tna-card {
10
- margin-top: 1rem;
11
- margin-bottom: 1rem;
12
- }
13
- }
@@ -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
- ]
@@ -1,3 +0,0 @@
1
- {% macro tnaFeaturedCollection(params) %}
2
- {%- include "nationalarchives/patterns/featured-collection/template.njk" -%}
3
- {% endmacro %}