@nationalarchives/frontend 0.1.15-prerelease → 0.1.17-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/LICENCE +21 -0
- 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/_index.scss +1 -0
- package/nationalarchives/components/breadcrumbs/_index.scss +13 -41
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +8 -4
- package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +9 -30
- package/nationalarchives/components/breadcrumbs/fixtures.json +23 -1
- package/nationalarchives/components/breadcrumbs/macro-options.json +6 -0
- package/nationalarchives/components/breadcrumbs/template.njk +17 -12
- package/nationalarchives/components/button/_button-group.scss +18 -0
- package/nationalarchives/components/button/_index.scss +25 -9
- package/nationalarchives/components/button/button.stories.js +64 -8
- 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 +67 -51
- package/nationalarchives/components/card/card.stories.js +123 -10
- package/nationalarchives/components/card/fixtures.json +62 -10
- package/nationalarchives/components/card/macro-options.json +9 -3
- package/nationalarchives/components/card/template.njk +12 -8
- package/nationalarchives/components/filters/_index.scss +19 -14
- package/nationalarchives/components/filters/filters.stories.js +3 -4
- package/nationalarchives/components/footer/_index.scss +195 -72
- package/nationalarchives/components/footer/fixtures.json +1 -1
- package/nationalarchives/components/footer/footer.stories.js +82 -74
- package/nationalarchives/components/footer/macro-options.json +34 -8
- package/nationalarchives/components/footer/template.njk +110 -53
- package/nationalarchives/components/grid/_index.scss +2 -2
- package/nationalarchives/components/grid/grid.stories.js +2 -3
- package/nationalarchives/components/header/_index.scss +57 -23
- package/nationalarchives/components/header/header.stories.js +2 -3
- package/nationalarchives/components/hero/_index.scss +4 -8
- package/nationalarchives/components/hero/hero.stories.js +2 -3
- package/nationalarchives/components/index-grid/_index.scss +28 -7
- package/nationalarchives/components/index-grid/index-grid.stories.js +27 -4
- 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 +12 -6
- package/nationalarchives/components/message/phase-banner.stories.js +2 -3
- package/nationalarchives/components/phase-banner/phase-banner.stories.js +2 -3
- package/nationalarchives/components/picture/_index.scss +5 -5
- 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/picture/picture.stories.js +2 -3
- package/nationalarchives/components/profile/profile.stories.js +2 -3
- package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +3 -4
- package/nationalarchives/components/skip-link/_index.scss +63 -0
- package/nationalarchives/components/skip-link/fixtures.json +11 -0
- package/nationalarchives/{patterns/featured-collection → components/skip-link}/macro-options.json +10 -4
- package/nationalarchives/components/skip-link/macro.njk +3 -0
- package/nationalarchives/{patterns/featured-collection/featured-collection.stories.js → components/skip-link/skip-link.stories.js} +7 -10
- package/nationalarchives/components/skip-link/template.njk +4 -0
- package/nationalarchives/components/tabs/_index.scss +7 -5
- package/nationalarchives/components/tabs/tabs.stories.js +8 -9
- 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 +494 -91
- package/nationalarchives/stories/utilities/overrides/overrides.mdx +37 -57
- package/nationalarchives/stories/utilities/overrides/overrides.stories.js +8 -14
- 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 +10 -8
- package/nationalarchives/tools/_colour.scss +163 -49
- package/nationalarchives/tools/_index.scss +0 -1
- package/nationalarchives/tools/_typography.scss +13 -0
- package/nationalarchives/utilities/_debug.scss +41 -1
- package/nationalarchives/utilities/_font-awesome.scss +5 -0
- package/nationalarchives/utilities/_global.scss +75 -26
- package/nationalarchives/utilities/_index.scss +1 -0
- package/nationalarchives/utilities/_overrides.scss +54 -9
- package/nationalarchives/utilities/_typography.scss +203 -65
- package/nationalarchives/variables/_assets.scss +1 -1
- package/nationalarchives/variables/_colour.scss +93 -93
- package/nationalarchives/variables/_grid.scss +1 -1
- package/nationalarchives/variables/_media.scss +23 -23
- package/nationalarchives/variables/_spacing.scss +12 -2
- package/nationalarchives/variables/_typography.scss +4 -1
- package/package.json +14 -14
- package/nationalarchives/patterns/_index.scss +0 -1
- package/nationalarchives/patterns/featured-collection/_index.scss +0 -13
- package/nationalarchives/patterns/featured-collection/macro.njk +0 -3
- package/nationalarchives/patterns/featured-collection/template.njk +0 -96
- package/nationalarchives/tools/_assets.scss +0 -5
@@ -1,80 +1,74 @@
|
|
1
1
|
@use "sass:map";
|
2
|
-
@use "../features";
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
$colour-palette-brand: (
|
4
|
+
"black": #000,
|
5
|
+
"grey": #8c9694,
|
6
|
+
"light-grey": #d9d9d6,
|
7
|
+
"white": #fff,
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
"yellow": #fc0,
|
10
|
+
"pink": #fe1d57,
|
11
|
+
"orange": #fd3f03,
|
12
|
+
"green": #86bc25,
|
13
|
+
"blue": #00b0ff,
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
"brown": #654e37,
|
16
|
+
"maroon": #9c193a,
|
17
|
+
"chestnut": #8f3415,
|
18
|
+
"forest": #00623b,
|
19
|
+
"navy": #004c7e,
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
$-dark-grey: #26262a;
|
28
|
-
$-base-font: #343338;
|
29
|
-
|
30
|
-
$-accent-colour-default: $-tna-yellow;
|
31
|
-
$-accent-colour-default-dark: $-accent-colour-default;
|
21
|
+
"cream": #f9f7e2,
|
22
|
+
"pastel-pink": #fad3d4,
|
23
|
+
"pastel-orange": #f9e1bc,
|
24
|
+
"pastel-green": #dde5d5,
|
25
|
+
"pastel-blue": #d4e5ef,
|
26
|
+
);
|
32
27
|
|
33
|
-
|
34
|
-
$
|
35
|
-
$dark-grey: $-dark-grey;
|
36
|
-
$tna-yellow: $-tna-yellow;
|
37
|
-
$tna-pink: $-tna-pink;
|
38
|
-
$tna-orange: $-tna-orange;
|
39
|
-
$tna-green: $-tna-green;
|
40
|
-
$tna-forest: $-tna-forest;
|
41
|
-
$tna-blue: $-tna-blue;
|
42
|
-
$tna-cream: $-tna-cream;
|
43
|
-
$tna-white: $-tna-white;
|
28
|
+
$dark-grey: #26262a;
|
29
|
+
$base-font: #343338;
|
44
30
|
|
45
31
|
/*
|
46
32
|
=========================================
|
47
|
-
LIGHT
|
33
|
+
LIGHT THEME (DEFAULT)
|
48
34
|
=========================================
|
49
35
|
*/
|
50
36
|
$colour-palette-default: (
|
51
|
-
"page-background":
|
52
|
-
"font-base":
|
53
|
-
"font-dark":
|
54
|
-
"font-light": rgba(
|
37
|
+
"page-background": #f4f4f4,
|
38
|
+
"font-base": $base-font,
|
39
|
+
"font-dark": map.get($colour-palette-brand, "black"),
|
40
|
+
"font-light": rgba($base-font, 0.7),
|
55
41
|
"link": #1d70ab,
|
56
42
|
"link-visited": #4c2c92,
|
57
|
-
|
58
|
-
"focus-outline": $-tna-blue,
|
43
|
+
"focus-outline": map.get($colour-palette-brand, "blue"),
|
59
44
|
"keyline": #ccc,
|
60
|
-
"keyline-dark":
|
61
|
-
"
|
62
|
-
"button-primary-
|
63
|
-
"button-primary-
|
64
|
-
"button-primary-hover-
|
65
|
-
"
|
66
|
-
|
67
|
-
"
|
68
|
-
"
|
69
|
-
"
|
70
|
-
"contrast-
|
71
|
-
"contrast-
|
72
|
-
"contrast-
|
73
|
-
"contrast-
|
74
|
-
"contrast-
|
75
|
-
"
|
76
|
-
"
|
77
|
-
"
|
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"),
|
50
|
+
"contrast-background": #1e1e1e,
|
51
|
+
// TODO: #343338 ?
|
52
|
+
"contrast-font-base": map.get($colour-palette-brand, "white"),
|
53
|
+
"contrast-font-dark": map.get($colour-palette-brand, "white"),
|
54
|
+
"contrast-font-light": rgba(map.get($colour-palette-brand, "white"), 0.7),
|
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"),
|
58
|
+
"contrast-keyline": rgba(map.get($colour-palette-brand, "white"), 0.5),
|
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"),
|
78
72
|
);
|
79
73
|
|
80
74
|
/*
|
@@ -85,18 +79,23 @@ DARK THEME
|
|
85
79
|
$colour-palette-dark: map.merge(
|
86
80
|
$colour-palette-default,
|
87
81
|
(
|
88
|
-
"page-background": #
|
89
|
-
"font-base": rgba(
|
90
|
-
"font-dark":
|
91
|
-
"font-light": rgba(
|
92
|
-
"link":
|
82
|
+
"page-background": #111,
|
83
|
+
"font-base": rgba(map.get($colour-palette-brand, "white"), 0.95),
|
84
|
+
"font-dark": map.get($colour-palette-brand, "white"),
|
85
|
+
"font-light": rgba(map.get($colour-palette-brand, "white"), 0.5),
|
86
|
+
"link": map.get($colour-palette-brand, "blue"),
|
93
87
|
"link-visited": map.get($colour-palette-default, "contrast-link-visited"),
|
94
|
-
"keyline": rgba(
|
95
|
-
"keyline-dark":
|
96
|
-
"
|
97
|
-
"
|
88
|
+
"keyline": rgba(map.get($colour-palette-brand, "white"), 0.25),
|
89
|
+
"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
|
+
"contrast-background": #1e1e1e,
|
98
95
|
"contrast-link-visited":
|
99
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,
|
100
99
|
)
|
101
100
|
);
|
102
101
|
|
@@ -108,21 +107,22 @@ LIGHT, HIGH_CONTRAST THEME
|
|
108
107
|
$colour-palette-high-contrast: map.merge(
|
109
108
|
$colour-palette-default,
|
110
109
|
(
|
111
|
-
"
|
112
|
-
"font-
|
113
|
-
"
|
114
|
-
"link
|
115
|
-
"
|
116
|
-
"
|
117
|
-
"keyline
|
118
|
-
"
|
119
|
-
"contrast-
|
120
|
-
"contrast-font-
|
121
|
-
"contrast-font-
|
122
|
-
"contrast-
|
123
|
-
"contrast-link
|
124
|
-
"contrast-
|
125
|
-
"contrast-keyline
|
110
|
+
"page-background": map.get($colour-palette-brand, "white"),
|
111
|
+
"font-base": map.get($colour-palette-brand, "black"),
|
112
|
+
"font-light": map.get($colour-palette-brand, "black"),
|
113
|
+
"link": map.get($colour-palette-brand, "navy"),
|
114
|
+
"link-visited": map.get($colour-palette-brand, "black"),
|
115
|
+
"focus-outline": map.get($colour-palette-brand, "orange"),
|
116
|
+
"keyline": map.get($colour-palette-brand, "black"),
|
117
|
+
"keyline-dark": map.get($colour-palette-brand, "black"),
|
118
|
+
"contrast-background": #f4f4f4,
|
119
|
+
"contrast-font-base": map.get($colour-palette-brand, "black"),
|
120
|
+
"contrast-font-dark": map.get($colour-palette-brand, "black"),
|
121
|
+
"contrast-font-light": map.get($colour-palette-brand, "black"),
|
122
|
+
"contrast-link": map.get($colour-palette-brand, "navy"),
|
123
|
+
"contrast-link-visited": map.get($colour-palette-brand, "black"),
|
124
|
+
"contrast-keyline": map.get($colour-palette-brand, "black"),
|
125
|
+
"contrast-keyline-dark": map.get($colour-palette-brand, "black"),
|
126
126
|
)
|
127
127
|
);
|
128
128
|
|
@@ -134,12 +134,12 @@ DARK, HIGH_CONTRAST THEME
|
|
134
134
|
$colour-palette-high-contrast-dark: map.merge(
|
135
135
|
$colour-palette-dark,
|
136
136
|
(
|
137
|
-
"page-background": $
|
138
|
-
"font-base":
|
139
|
-
"font-light":
|
140
|
-
"link":
|
141
|
-
"link-visited":
|
142
|
-
"keyline":
|
143
|
-
"contrast-background":
|
137
|
+
"page-background": map.get($colour-palette-brand, "black"),
|
138
|
+
"font-base": map.get($colour-palette-brand, "white"),
|
139
|
+
"font-light": map.get($colour-palette-brand, "white"),
|
140
|
+
"link": map.get($colour-palette-brand, "white"),
|
141
|
+
"link-visited": map.get($colour-palette-brand, "white"),
|
142
|
+
"keyline": map.get($colour-palette-brand, "white"),
|
143
|
+
"contrast-background": #111,
|
144
144
|
)
|
145
145
|
);
|
@@ -1,40 +1,40 @@
|
|
1
1
|
@use "sass:math";
|
2
2
|
@use "./typography";
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
$-largest-medium-device-px: 1024 !default;
|
5
|
+
$-largest-small-device-px: 768 !default;
|
6
|
+
$-largest-tiny-device-px: 480 !default;
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
$-smallest-large-device-em: #{math.div(
|
9
|
+
$-largest-medium-device-px + 1,
|
10
10
|
typography.$base-font-size-px
|
11
11
|
)}em;
|
12
|
-
|
13
|
-
|
12
|
+
$-largest-medium-device-em: #{math.div(
|
13
|
+
$-largest-medium-device-px,
|
14
14
|
typography.$base-font-size-px
|
15
15
|
)}em;
|
16
|
-
|
17
|
-
|
16
|
+
$-smallest-medium-device-em: #{math.div(
|
17
|
+
$-largest-small-device-px + 1,
|
18
18
|
typography.$base-font-size-px
|
19
19
|
)}em;
|
20
|
-
|
21
|
-
|
20
|
+
$-largest-small-device-em: #{math.div(
|
21
|
+
$-largest-small-device-px,
|
22
22
|
typography.$base-font-size-px
|
23
23
|
)}em;
|
24
|
-
|
25
|
-
|
24
|
+
$-smallest-small-device-em: #{math.div(
|
25
|
+
$-largest-tiny-device-px + 1,
|
26
26
|
typography.$base-font-size-px
|
27
27
|
)}em;
|
28
|
-
|
29
|
-
|
28
|
+
$-largest-tiny-device-em: #{math.div(
|
29
|
+
$-largest-tiny-device-px,
|
30
30
|
typography.$base-font-size-px
|
31
31
|
)}em;
|
32
32
|
|
33
|
-
$media-large: "(min-width: #{
|
34
|
-
$media-lt-large: "(max-width: #{
|
35
|
-
$media-medium: "(min-width: #{
|
36
|
-
$media-gt-mobile: "(min-width: #{
|
37
|
-
$media-mobile: "(max-width: #{
|
38
|
-
$media-small: "(min-width: #{
|
39
|
-
$media-gt-tiny: "(min-width: #{
|
40
|
-
$media-tiny: "(max-width: #{
|
33
|
+
$media-large: "(min-width: #{$-smallest-large-device-em})";
|
34
|
+
$media-lt-large: "(max-width: #{$-largest-medium-device-em})";
|
35
|
+
$media-medium: "(min-width: #{$-smallest-medium-device-em}) and (max-width: #{$-largest-medium-device-em})";
|
36
|
+
$media-gt-mobile: "(min-width: #{$-smallest-medium-device-em})";
|
37
|
+
$media-mobile: "(max-width: #{$-largest-small-device-em})";
|
38
|
+
$media-small: "(min-width: #{$-smallest-small-device-em}) and (max-width: #{$-largest-small-device-em})";
|
39
|
+
$media-gt-tiny: "(min-width: #{$-smallest-small-device-em})";
|
40
|
+
$media-tiny: "(max-width: #{$-largest-tiny-device-em})";
|
@@ -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.17-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 --
|
11
|
+
"package:sass": "sass --style=compressed --embed-sources src/nationalarchives/all.scss package/nationalarchives/all.css",
|
12
12
|
"package:scripts": "webpack"
|
13
13
|
},
|
14
14
|
"repository": {
|
@@ -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,96 +0,0 @@
|
|
1
|
-
{% from "nationalarchives/components/grid/macro.njk" import tnaGrid %}
|
2
|
-
{% from "nationalarchives/components/card/macro.njk" import tnaCard %}
|
3
|
-
|
4
|
-
{% set exampleCard = {
|
5
|
-
heading: {
|
6
|
-
title: "Card title",
|
7
|
-
level: 3,
|
8
|
-
size: "m",
|
9
|
-
singleSentence: true
|
10
|
-
},
|
11
|
-
href: "#",
|
12
|
-
image: {
|
13
|
-
src: "https://picsum.photos/id/29/640/360",
|
14
|
-
alt: "A placeholder image"
|
15
|
-
},
|
16
|
-
body: "<p>Card body</p>"
|
17
|
-
} %}
|
18
|
-
|
19
|
-
{%- set containerClasses = [params.classes] if params.classes else [] -%}
|
20
|
-
{%- set containerClasses = containerClasses.concat('tna-featured-collection') -%}
|
21
|
-
|
22
|
-
{{ tnaGrid({
|
23
|
-
columns: [
|
24
|
-
{
|
25
|
-
width: "full",
|
26
|
-
widthMedium: "full",
|
27
|
-
widthSmall: "full",
|
28
|
-
widthTiny: "full",
|
29
|
-
html: "<h2 class=\"tna-heading\">" + params.heading + "</h2>"
|
30
|
-
},
|
31
|
-
{
|
32
|
-
width: "1-2",
|
33
|
-
widthMedium: "2-3",
|
34
|
-
widthSmall: "1-2",
|
35
|
-
widthTiny: "full",
|
36
|
-
html: tnaCard({
|
37
|
-
heading: {
|
38
|
-
title: "Card title",
|
39
|
-
level: 3,
|
40
|
-
size: "m",
|
41
|
-
singleSentence: true
|
42
|
-
},
|
43
|
-
href: "#",
|
44
|
-
image: {
|
45
|
-
src: "https://picsum.photos/id/29/640/360",
|
46
|
-
alt: "A placeholder image"
|
47
|
-
},
|
48
|
-
label: "Feature",
|
49
|
-
body: "<p>Card body</p>"
|
50
|
-
})
|
51
|
-
},
|
52
|
-
{
|
53
|
-
width: "1-2",
|
54
|
-
widthMedium: "1-3",
|
55
|
-
widthSmall: "1-2",
|
56
|
-
widthTiny: "full",
|
57
|
-
html: tnaGrid({
|
58
|
-
columns: [
|
59
|
-
{
|
60
|
-
width: "1-2",
|
61
|
-
widthMedium: "full",
|
62
|
-
widthSmall: "full",
|
63
|
-
widthTiny: "full",
|
64
|
-
html: tnaCard(exampleCard)
|
65
|
-
},
|
66
|
-
{
|
67
|
-
width: "1-2",
|
68
|
-
widthMedium: "full",
|
69
|
-
widthSmall: "full",
|
70
|
-
widthTiny: "full",
|
71
|
-
html: tnaCard(exampleCard)
|
72
|
-
},
|
73
|
-
{
|
74
|
-
width: "1-2",
|
75
|
-
widthMedium: "full",
|
76
|
-
widthSmall: "full",
|
77
|
-
widthTiny: "full",
|
78
|
-
html: tnaCard(exampleCard)
|
79
|
-
},
|
80
|
-
{
|
81
|
-
width: "1-2",
|
82
|
-
widthMedium: "full",
|
83
|
-
widthSmall: "full",
|
84
|
-
widthTiny: "full",
|
85
|
-
html: tnaCard(exampleCard)
|
86
|
-
}
|
87
|
-
],
|
88
|
-
noPadding: true
|
89
|
-
}),
|
90
|
-
noPadding: true
|
91
|
-
}
|
92
|
-
],
|
93
|
-
htmlElement: "section",
|
94
|
-
classes: containerClasses | join(' '),
|
95
|
-
attributes: params.attributes
|
96
|
-
}) }}
|