@nationalarchives/frontend 0.1.9-prerelease → 0.1.11-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/README.md +3 -3
- package/govuk-prototype-kit.config.json +0 -3
- package/nationalarchives/_features.scss +4 -0
- package/nationalarchives/all.css +1 -1
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/all.mjs +54 -3
- package/nationalarchives/all.scss +8 -4
- package/nationalarchives/assets/images/footer/facebook.svg +11 -0
- package/nationalarchives/assets/images/footer/flickr.svg +11 -0
- package/nationalarchives/assets/images/footer/instagram.svg +17 -0
- package/nationalarchives/assets/images/footer/rss.svg +13 -0
- package/nationalarchives/assets/images/footer/twitter.svg +14 -0
- package/nationalarchives/assets/images/footer/youtube.svg +12 -0
- package/nationalarchives/assets/images/tna-square-logo.svg +5 -24
- package/nationalarchives/components/_index.scss +13 -0
- package/nationalarchives/components/breadcrumbs/_index.scss +28 -6
- package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +1 -2
- package/nationalarchives/components/breadcrumbs/fixtures.json +1 -1
- package/nationalarchives/components/breadcrumbs/macro.njk +1 -1
- package/nationalarchives/components/breadcrumbs/template.njk +14 -13
- package/nationalarchives/components/button/_index.scss +23 -11
- package/nationalarchives/components/button/button.stories.js +1 -2
- package/nationalarchives/components/button/fixtures.json +5 -5
- package/nationalarchives/components/button/macro.njk +1 -1
- package/nationalarchives/components/card/_index.scss +51 -7
- package/nationalarchives/components/card/card.js +2 -0
- package/nationalarchives/components/card/card.js.map +1 -0
- package/nationalarchives/components/card/card.mjs +45 -0
- package/nationalarchives/components/card/card.stories.js +18 -15
- package/nationalarchives/components/card/fixtures.json +14 -12
- package/nationalarchives/components/card/macro-options.json +18 -0
- package/nationalarchives/components/card/macro.njk +1 -1
- package/nationalarchives/components/card/template.njk +9 -4
- package/nationalarchives/components/filters/filters.stories.js +1 -2
- package/nationalarchives/components/filters/macro.njk +1 -1
- package/nationalarchives/components/filters/template.njk +2 -2
- package/nationalarchives/components/footer/_index.scss +68 -13
- package/nationalarchives/components/footer/fixtures.json +1 -1
- package/nationalarchives/components/footer/footer.stories.js +20 -23
- package/nationalarchives/components/footer/macro-options.json +12 -6
- package/nationalarchives/components/footer/macro.njk +1 -1
- package/nationalarchives/components/footer/template.njk +26 -16
- package/nationalarchives/components/grid/_index.scss +10 -12
- package/nationalarchives/components/grid/fixtures.json +12 -12
- package/nationalarchives/components/grid/grid.stories.js +56 -3
- package/nationalarchives/components/grid/macro-options.json +30 -0
- package/nationalarchives/components/grid/macro.njk +1 -1
- package/nationalarchives/components/grid/template.njk +17 -1
- package/nationalarchives/components/header/_index.scss +269 -60
- package/nationalarchives/components/header/header.js +1 -1
- package/nationalarchives/components/header/header.js.map +1 -1
- package/nationalarchives/components/header/header.mjs +7 -12
- package/nationalarchives/components/header/header.stories.js +156 -6
- package/nationalarchives/components/header/macro-options.json +83 -5
- package/nationalarchives/components/header/macro.njk +1 -1
- package/nationalarchives/components/header/template.njk +45 -36
- package/nationalarchives/components/hero/_index.scss +36 -6
- package/nationalarchives/components/hero/fixtures.json +16 -1
- package/nationalarchives/components/hero/hero.stories.js +32 -16
- package/nationalarchives/components/hero/macro-options.json +14 -2
- package/nationalarchives/components/hero/macro.njk +1 -1
- package/nationalarchives/components/hero/template.njk +7 -5
- package/nationalarchives/components/phase-banner/_index.scss +60 -0
- package/nationalarchives/components/phase-banner/fixtures.json +81 -0
- package/nationalarchives/components/phase-banner/macro-options.json +26 -0
- package/nationalarchives/components/phase-banner/macro.njk +3 -0
- package/nationalarchives/components/phase-banner/phase-banner.stories.js +64 -0
- package/nationalarchives/components/phase-banner/template.njk +16 -0
- package/nationalarchives/components/picture/_index.scss +77 -0
- package/nationalarchives/components/picture/fixtures.json +4 -0
- package/nationalarchives/components/picture/macro-options.json +88 -0
- package/nationalarchives/components/picture/macro.njk +3 -0
- package/nationalarchives/components/picture/picture.js +2 -0
- package/nationalarchives/components/picture/picture.js.map +1 -0
- package/nationalarchives/components/picture/picture.mjs +57 -0
- package/nationalarchives/components/picture/picture.stories.js +63 -0
- package/nationalarchives/components/picture/template.njk +42 -0
- package/nationalarchives/components/profile/_index.scss +2 -0
- package/nationalarchives/components/profile/fixtures.json +4 -0
- package/nationalarchives/components/profile/macro-options.json +14 -0
- package/nationalarchives/components/profile/macro.njk +3 -0
- package/nationalarchives/components/profile/profile.stories.js +32 -0
- package/nationalarchives/components/profile/template.njk +15 -0
- package/nationalarchives/components/sensitive-image/fixtures.json +3 -3
- package/nationalarchives/components/sensitive-image/macro.njk +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +1 -2
- package/nationalarchives/components/tabs/_index.scss +148 -0
- package/nationalarchives/components/tabs/fixtures.json +4 -0
- package/nationalarchives/components/tabs/macro-options.json +52 -0
- package/nationalarchives/components/tabs/macro.njk +3 -0
- package/nationalarchives/components/tabs/tabs.js +2 -0
- package/nationalarchives/components/tabs/tabs.js.map +1 -0
- package/nationalarchives/components/tabs/tabs.mjs +214 -0
- package/nationalarchives/components/tabs/tabs.stories.js +302 -0
- package/nationalarchives/components/tabs/template.njk +20 -0
- package/nationalarchives/patterns/_index.scss +1 -0
- package/nationalarchives/patterns/featured-collection/_index.scss +13 -0
- package/nationalarchives/patterns/featured-collection/featured-collection.stories.js +35 -0
- package/nationalarchives/patterns/featured-collection/macro-options.json +20 -0
- package/nationalarchives/patterns/featured-collection/macro.njk +3 -0
- package/nationalarchives/patterns/featured-collection/template.njk +96 -0
- package/nationalarchives/stories/development/contributing.mdx +39 -0
- package/nationalarchives/stories/development/dependencies.mdx +2 -0
- package/nationalarchives/stories/development/technologies.mdx +65 -0
- package/nationalarchives/stories/utilities/colour.stories.js +189 -0
- package/nationalarchives/stories/utilities/typography.mdx +1 -0
- package/nationalarchives/stories/utilities/typography.stories.js +15 -0
- package/nationalarchives/templates/layouts/_generic.njk +1 -1
- package/nationalarchives/tools/_assets.scss +5 -0
- package/nationalarchives/tools/_colour.scss +129 -0
- package/nationalarchives/tools/_grid.scss +2 -2
- package/nationalarchives/tools/_index.scss +5 -0
- package/nationalarchives/tools/_media.scss +12 -11
- package/nationalarchives/tools/_typography.scss +15 -0
- package/nationalarchives/utilities/_debug.scss +11 -0
- package/nationalarchives/utilities/_global.scss +120 -3
- package/nationalarchives/utilities/_index.scss +3 -0
- package/nationalarchives/utilities/_typography.scss +155 -111
- package/nationalarchives/variables/_assets.scss +1 -0
- package/nationalarchives/variables/_colour.scss +120 -11
- package/nationalarchives/variables/{_all.scss → _index.scss} +1 -0
- package/nationalarchives/variables/_media.scss +39 -11
- package/nationalarchives/variables/_typography.scss +1 -1
- package/package.json +18 -15
- package/nationalarchives/components/_all.scss +0 -7
- package/nationalarchives/stories/development/structure.mdx +0 -7
- package/nationalarchives/tools/_all.scss +0 -3
- package/nationalarchives/utilities/_all.scss +0 -2
@@ -1,178 +1,222 @@
|
|
1
|
-
@use "../
|
2
|
-
@use "../variables/typography";
|
1
|
+
@use "../tools/colour";
|
3
2
|
@use "../tools/media";
|
4
|
-
@use "../tools/typography"
|
3
|
+
@use "../tools/typography";
|
5
4
|
|
6
5
|
// Temporary - will eventually bundle font files into package
|
7
6
|
@import "https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&family=Roboto+Mono:wght@500;700&display=swap";
|
8
7
|
@import "https://use.typekit.net/hkj3kuz.css";
|
9
8
|
|
10
9
|
.tna-template {
|
11
|
-
|
12
|
-
|
13
|
-
color: colour.$base-font-colour;
|
10
|
+
@include colour.colour-font("font-base");
|
11
|
+
@include typography.main-font;
|
14
12
|
-moz-osx-font-smoothing: grayscale;
|
15
13
|
-webkit-font-smoothing: antialiased;
|
16
14
|
text-rendering: optimizeLegibility;
|
17
15
|
-webkit-text-size-adjust: none;
|
18
16
|
direction: ltr;
|
17
|
+
}
|
19
18
|
|
20
|
-
|
21
|
-
|
19
|
+
.tna-template__body {
|
20
|
+
color: inherit;
|
21
|
+
@include typography.relative-font-size(18);
|
22
|
+
line-height: 1.6;
|
23
|
+
}
|
22
24
|
|
23
|
-
|
24
|
-
|
25
|
-
|
25
|
+
h1,
|
26
|
+
h2,
|
27
|
+
h3,
|
28
|
+
h4,
|
29
|
+
h5,
|
30
|
+
h6,
|
31
|
+
ul,
|
32
|
+
ol {
|
33
|
+
margin-top: 0;
|
34
|
+
}
|
35
|
+
|
36
|
+
p {
|
37
|
+
margin: 0 0 1.5rem;
|
38
|
+
|
39
|
+
&:last-child {
|
40
|
+
margin-bottom: 0;
|
26
41
|
}
|
42
|
+
}
|
27
43
|
|
28
|
-
|
29
|
-
|
30
|
-
text-decoration-thickness: 4px;
|
31
|
-
}
|
44
|
+
a {
|
45
|
+
@include colour.colour-font("link");
|
32
46
|
|
33
|
-
|
34
|
-
|
35
|
-
}
|
47
|
+
&:visited {
|
48
|
+
@include colour.colour-font("link-visited");
|
36
49
|
}
|
37
50
|
|
38
|
-
|
39
|
-
|
40
|
-
line-height: 1.6;
|
51
|
+
&:active {
|
52
|
+
text-decoration-thickness: 4px;
|
41
53
|
}
|
42
54
|
|
43
|
-
|
44
|
-
|
45
|
-
|
55
|
+
&:hover {
|
56
|
+
text-decoration-thickness: 3px;
|
57
|
+
}
|
58
|
+
}
|
46
59
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
60
|
+
.tna-ul,
|
61
|
+
.tna-ol {
|
62
|
+
padding-left: 2rem;
|
63
|
+
|
64
|
+
li::marker {
|
65
|
+
@include colour.colour-font("accent");
|
66
|
+
font-weight: 700;
|
51
67
|
}
|
52
68
|
|
53
|
-
|
54
|
-
.tna-ol--plain {
|
69
|
+
&--plain {
|
55
70
|
padding-left: 0;
|
56
71
|
|
57
72
|
list-style: none;
|
58
73
|
}
|
74
|
+
}
|
59
75
|
|
60
|
-
|
61
|
-
|
62
|
-
margin-bottom: 1.5rem;
|
63
|
-
|
64
|
-
color: colour.$tna-black;
|
65
|
-
font-family: typography.$font-family-heading;
|
66
|
-
font-weight: typography.$font-weight-heading;
|
76
|
+
.tna-heading {
|
77
|
+
margin-bottom: 1.5rem;
|
67
78
|
|
68
|
-
|
69
|
-
|
70
|
-
}
|
79
|
+
@include colour.colour-font("font-dark");
|
80
|
+
@include typography.heading-font;
|
71
81
|
|
72
|
-
|
73
|
-
|
74
|
-
|
82
|
+
&:last-child {
|
83
|
+
margin-bottom: 0;
|
84
|
+
}
|
75
85
|
|
76
|
-
|
77
|
-
|
78
|
-
|
86
|
+
&--xl {
|
87
|
+
@include typography.relative-font-size(64);
|
88
|
+
line-height: 1;
|
79
89
|
|
80
|
-
|
81
|
-
|
82
|
-
}
|
90
|
+
@include media.on-medium {
|
91
|
+
@include typography.relative-font-size(42);
|
83
92
|
}
|
84
93
|
|
85
|
-
|
86
|
-
@include
|
87
|
-
|
94
|
+
@include media.on-mobile {
|
95
|
+
@include typography.relative-font-size(36);
|
96
|
+
}
|
97
|
+
}
|
88
98
|
|
89
|
-
|
90
|
-
|
91
|
-
|
99
|
+
&--l {
|
100
|
+
@include typography.relative-font-size(32);
|
101
|
+
line-height: 1.2;
|
92
102
|
|
93
|
-
|
94
|
-
|
95
|
-
}
|
103
|
+
@include media.on-medium {
|
104
|
+
@include typography.relative-font-size(26);
|
96
105
|
}
|
97
106
|
|
98
|
-
|
99
|
-
@include
|
100
|
-
line-height: 1.4;
|
107
|
+
@include media.on-mobile {
|
108
|
+
@include typography.relative-font-size(24);
|
101
109
|
}
|
110
|
+
}
|
102
111
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
}
|
112
|
+
&--m {
|
113
|
+
@include typography.relative-font-size(20);
|
114
|
+
line-height: 1.4;
|
107
115
|
}
|
108
116
|
|
109
|
-
|
110
|
-
|
117
|
+
&--s {
|
118
|
+
@include typography.relative-font-size(18);
|
119
|
+
line-height: 1.6;
|
120
|
+
}
|
121
|
+
}
|
111
122
|
|
112
|
-
|
113
|
-
|
114
|
-
}
|
123
|
+
.tna-hgroup {
|
124
|
+
margin-bottom: 2rem;
|
115
125
|
|
116
|
-
|
117
|
-
|
126
|
+
&:last-child {
|
127
|
+
margin-bottom: 0;
|
128
|
+
}
|
118
129
|
|
119
|
-
|
120
|
-
|
121
|
-
font-family: typography.$font-family-detail;
|
122
|
-
font-weight: typography.$font-weight-detail;
|
123
|
-
text-transform: uppercase;
|
130
|
+
&__supertitle {
|
131
|
+
margin: 0;
|
124
132
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
133
|
+
@include colour.colour-font("font-base");
|
134
|
+
@include typography.relative-font-size(14);
|
135
|
+
@include typography.detail-font;
|
136
|
+
text-transform: uppercase;
|
129
137
|
|
130
|
-
&
|
138
|
+
.tna-hgroup & {
|
131
139
|
margin: 0;
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
&__title {
|
144
|
+
margin: 0;
|
132
145
|
|
133
|
-
|
146
|
+
@include colour.colour-font("font-dark");
|
134
147
|
|
135
|
-
|
136
|
-
|
148
|
+
.tna-hgroup__supertitle {
|
149
|
+
display: block;
|
150
|
+
|
151
|
+
@include colour.colour-font("font-base");
|
152
|
+
}
|
153
|
+
}
|
137
154
|
|
138
|
-
|
139
|
-
|
155
|
+
&--xl {
|
156
|
+
.tna-hgroup__supertitle {
|
140
157
|
}
|
141
158
|
|
142
|
-
|
143
|
-
.
|
144
|
-
|
159
|
+
.tna-hgroup__title {
|
160
|
+
@include typography.relative-font-size(64);
|
161
|
+
}
|
162
|
+
}
|
145
163
|
|
146
|
-
|
147
|
-
|
148
|
-
}
|
164
|
+
&--l {
|
165
|
+
.tna-hgroup__supertitle {
|
149
166
|
}
|
150
167
|
|
151
|
-
|
152
|
-
.
|
153
|
-
|
168
|
+
.tna-hgroup__title {
|
169
|
+
@include typography.relative-font-size(32);
|
170
|
+
}
|
171
|
+
}
|
154
172
|
|
155
|
-
|
156
|
-
|
157
|
-
}
|
173
|
+
&--m {
|
174
|
+
.tna-hgroup__supertitle {
|
158
175
|
}
|
159
176
|
|
160
|
-
|
161
|
-
.
|
162
|
-
|
177
|
+
.tna-hgroup__title {
|
178
|
+
@include typography.relative-font-size(20);
|
179
|
+
}
|
180
|
+
}
|
163
181
|
|
164
|
-
|
165
|
-
|
166
|
-
}
|
182
|
+
&--s {
|
183
|
+
.tna-hgroup__supertitle {
|
167
184
|
}
|
168
185
|
|
169
|
-
|
170
|
-
.
|
171
|
-
|
186
|
+
.tna-hgroup__title {
|
187
|
+
@include typography.relative-font-size(18);
|
188
|
+
}
|
189
|
+
}
|
190
|
+
}
|
191
|
+
|
192
|
+
.tna-blockquote {
|
193
|
+
margin: 0;
|
194
|
+
padding: 1rem 1rem 1rem 2rem;
|
195
|
+
|
196
|
+
border-left: 0.35rem solid;
|
197
|
+
@include colour.colour-border("keyline");
|
198
|
+
|
199
|
+
quotes: "“" "”" "‘" "’";
|
200
|
+
|
201
|
+
&::before {
|
202
|
+
float: left;
|
203
|
+
|
204
|
+
content: open-quote;
|
205
|
+
}
|
206
|
+
|
207
|
+
&__quote {
|
208
|
+
font-weight: 700;
|
209
|
+
}
|
210
|
+
|
211
|
+
&__author {
|
212
|
+
font-style: italic;
|
213
|
+
|
214
|
+
.tna-blockquote & {
|
215
|
+
margin: 1rem 0 0;
|
216
|
+
}
|
172
217
|
|
173
|
-
|
174
|
-
|
175
|
-
}
|
218
|
+
&::before {
|
219
|
+
content: "\2014" " ";
|
176
220
|
}
|
177
221
|
}
|
178
222
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
$tna-assets-path: "/assets" !default;
|
@@ -1,11 +1,120 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
@use "sass:map";
|
2
|
+
@use "../features";
|
3
|
+
|
4
|
+
$-tna-black: #000;
|
5
|
+
$-tna-grey: #8c9694;
|
6
|
+
$-tna-light-grey: #d9d9d6;
|
7
|
+
$-tna-white: #fff;
|
8
|
+
|
9
|
+
$-tna-yellow: #fc0;
|
10
|
+
$-tna-pink: #fe1d57;
|
11
|
+
$-tna-orange: #fd3f03;
|
12
|
+
$-tna-green: #86bc25;
|
13
|
+
$-tna-blue: #00b0ff;
|
14
|
+
|
15
|
+
$-tna-brown: #654e37;
|
16
|
+
$-tna-maroon: #9c193a;
|
17
|
+
$-tna-chestnut: #8f3415;
|
18
|
+
$-tna-forest: #00623b;
|
19
|
+
$-tna-navy: #004c7e;
|
20
|
+
|
21
|
+
$-tna-cream: #f9f7e2;
|
22
|
+
$-tna-pastel-pink: #fad3d4;
|
23
|
+
$-tna-pastel-orange: #f9e1bc;
|
24
|
+
$-tna-pastel-green: #dde5d5;
|
25
|
+
$-tna-pastel-blue: #d4e5ef;
|
26
|
+
|
27
|
+
$-dark-grey: #26262a;
|
28
|
+
$-base-font: #343338;
|
29
|
+
|
30
|
+
$-accent-colour: $-tna-yellow;
|
31
|
+
$-accent-colour-dark: $-accent-colour;
|
32
|
+
|
33
|
+
// @debug $-accent-colour;
|
34
|
+
// @mixin configure($accent-colour: null) {
|
35
|
+
// @debug $accent-colour;
|
36
|
+
// @if $accent-colour {
|
37
|
+
// $-accent-colour: $accent-colour !global;
|
38
|
+
// }
|
39
|
+
// }
|
40
|
+
// @debug $-accent-colour;
|
41
|
+
|
42
|
+
// @function -accent-colour() {
|
43
|
+
// @return $-accent-colour or $-tna-yellow;
|
44
|
+
// }
|
45
|
+
|
46
|
+
// @function -accent-colour-dark() {
|
47
|
+
// @return $-accent-colour-dark or -accent-colour();
|
48
|
+
// }
|
49
|
+
|
50
|
+
// TODO: Scoped variables should not be used directly outside of this file
|
51
|
+
$tna-black: $-tna-black;
|
52
|
+
$dark-grey: $-dark-grey;
|
53
|
+
$tna-yellow: $-tna-yellow;
|
54
|
+
$tna-pink: $-tna-pink;
|
55
|
+
$tna-orange: $-tna-orange;
|
56
|
+
$tna-green: $-tna-green;
|
57
|
+
$tna-blue: $-tna-blue;
|
58
|
+
$tna-cream: $-tna-cream;
|
59
|
+
|
60
|
+
$colour-palette-default: (
|
61
|
+
"page-background": $-tna-white,
|
62
|
+
"font-base": $-base-font,
|
63
|
+
"font-dark": $-tna-black,
|
64
|
+
"font-light": rgba($-base-font, 0.7),
|
65
|
+
"link": #1d70ab,
|
66
|
+
"link-visited": #4c2c92,
|
67
|
+
// "focus-outline": #004c7e,
|
68
|
+
"focus-outline": $-tna-blue,
|
69
|
+
"keyline": #ccc,
|
70
|
+
"keyline-dark": $-dark-grey,
|
71
|
+
"accent": -accent-colour(),
|
72
|
+
"button-primary-text": $-tna-white,
|
73
|
+
"button-primary-background": $-tna-black,
|
74
|
+
"button-primary-hover-text": $-tna-black,
|
75
|
+
"button-primary-hover-background": $-tna-white,
|
76
|
+
"button-secondary-text": $-tna-black,
|
77
|
+
"button-secondary-background": $-tna-yellow,
|
78
|
+
"button-secondary-hover-text": $-tna-black,
|
79
|
+
"button-secondary-hover-background": $-tna-white,
|
80
|
+
);
|
81
|
+
|
82
|
+
$colour-palette-dark: map.merge(
|
83
|
+
$colour-palette-default,
|
84
|
+
(
|
85
|
+
"page-background": #222,
|
86
|
+
"font-base": rgba($-tna-white, 0.95),
|
87
|
+
"font-dark": $-tna-white,
|
88
|
+
"font-light": rgba($-tna-white, 0.8),
|
89
|
+
"link": $-tna-blue,
|
90
|
+
"link-visited": #b9f,
|
91
|
+
"keyline": rgba($-tna-white, 0.5),
|
92
|
+
"keyline-dark": $-tna-white,
|
93
|
+
"accent": -accent-colour-dark(),
|
94
|
+
)
|
95
|
+
);
|
96
|
+
|
97
|
+
$colour-palette-high-contrast: map.merge(
|
98
|
+
$colour-palette-default,
|
99
|
+
(
|
100
|
+
"font-base": $-tna-black,
|
101
|
+
"font-light": $-tna-black,
|
102
|
+
"link": $-tna-black,
|
103
|
+
"link-visited": $-tna-black,
|
104
|
+
"focus-outline": $-tna-orange,
|
105
|
+
"keyline": $-tna-black,
|
106
|
+
"keyline-dark": $-tna-black,
|
107
|
+
)
|
108
|
+
);
|
109
|
+
|
110
|
+
$colour-palette-high-contrast-dark: map.merge(
|
111
|
+
$colour-palette-dark,
|
112
|
+
(
|
113
|
+
"page-background": #191919,
|
114
|
+
"font-base": $-tna-white,
|
115
|
+
"font-light": $-tna-white,
|
116
|
+
"link": $-tna-white,
|
117
|
+
"link-visited": $-tna-white,
|
118
|
+
"keyline": $-tna-white,
|
119
|
+
)
|
120
|
+
);
|
@@ -1,12 +1,40 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
$largest-tiny-device: 480px !default;
|
1
|
+
@use "sass:math";
|
2
|
+
@use "./typography";
|
4
3
|
|
5
|
-
$
|
6
|
-
$
|
7
|
-
$
|
8
|
-
|
9
|
-
$
|
10
|
-
$
|
11
|
-
|
12
|
-
|
4
|
+
$largest-medium-device-px: 1024 !default;
|
5
|
+
$largest-small-device-px: 768 !default;
|
6
|
+
$largest-tiny-device-px: 480 !default;
|
7
|
+
|
8
|
+
$smallest-large-device-em: #{math.div(
|
9
|
+
$largest-medium-device-px + 1,
|
10
|
+
typography.$base-font-size-px
|
11
|
+
)}em;
|
12
|
+
$largest-medium-device-em: #{math.div(
|
13
|
+
$largest-medium-device-px,
|
14
|
+
typography.$base-font-size-px
|
15
|
+
)}em;
|
16
|
+
$smallest-medium-device-em: #{math.div(
|
17
|
+
$largest-small-device-px + 1,
|
18
|
+
typography.$base-font-size-px
|
19
|
+
)}em;
|
20
|
+
$largest-small-device-em: #{math.div(
|
21
|
+
$largest-small-device-px,
|
22
|
+
typography.$base-font-size-px
|
23
|
+
)}em;
|
24
|
+
$smallest-small-device-em: #{math.div(
|
25
|
+
$largest-tiny-device-px + 1,
|
26
|
+
typography.$base-font-size-px
|
27
|
+
)}em;
|
28
|
+
$largest-tiny-device-em: #{math.div(
|
29
|
+
$largest-tiny-device-px,
|
30
|
+
typography.$base-font-size-px
|
31
|
+
)}em;
|
32
|
+
|
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})";
|
@@ -3,7 +3,7 @@ $base-font-size-px: 16;
|
|
3
3
|
$font-family-main: "Open Sans", sans-serif;
|
4
4
|
$font-weight-main: 400;
|
5
5
|
|
6
|
-
$font-family-heading: supria-sans-condensed,
|
6
|
+
$font-family-heading: supria-sans-condensed, sans-serif;
|
7
7
|
$font-weight-heading: 600;
|
8
8
|
|
9
9
|
$font-family-detail: "Roboto Mono", monospace;
|
package/package.json
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nationalarchives/frontend",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.11-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",
|
8
|
-
"test": "
|
9
|
-
"lint": "prettier --check '{src,.storybook,tasks}/**/*.{js,mjs,scss,json}' && stylelint 'src/**/*.scss' && eslint 'src/**/*.mjs'",
|
10
|
-
"lint:fix": "prettier --write '{src,.storybook,tasks}/**/*.{js,mjs,scss,json}' && stylelint --fix 'src/**/*.scss' && eslint --fix 'src/**/*.mjs'",
|
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'",
|
11
11
|
"package:sass": "sass --style=compressed --quiet-deps src/nationalarchives/all.scss package/nationalarchives/all.css",
|
12
|
-
"package:scripts": "webpack"
|
12
|
+
"package:scripts": "webpack",
|
13
|
+
"package:test": "tasks/build-package.sh && node tasks/test-package.js"
|
13
14
|
},
|
14
15
|
"repository": {
|
15
16
|
"type": "git",
|
@@ -42,22 +43,24 @@
|
|
42
43
|
"@babel/core": "^7.19.1",
|
43
44
|
"@babel/preset-env": "^7.22.5",
|
44
45
|
"@mdx-js/react": "^2.1.3",
|
45
|
-
"@storybook/addon-a11y": "^7.0
|
46
|
-
"@storybook/addon-docs": "^7.0
|
47
|
-
"@storybook/addon-essentials": "^7.0
|
48
|
-
"@storybook/addon-interactions": "^7.0
|
49
|
-
"@storybook/addon-links": "^7.0
|
50
|
-
"@storybook/addon-mdx-gfm": "^7.0
|
51
|
-
"@storybook/html": "^7.0
|
52
|
-
"@storybook/html-webpack5": "^7.0
|
46
|
+
"@storybook/addon-a11y": "^7.2.0",
|
47
|
+
"@storybook/addon-docs": "^7.2.0",
|
48
|
+
"@storybook/addon-essentials": "^7.2.0",
|
49
|
+
"@storybook/addon-interactions": "^7.2.0",
|
50
|
+
"@storybook/addon-links": "^7.2.0",
|
51
|
+
"@storybook/addon-mdx-gfm": "^7.2.0",
|
52
|
+
"@storybook/html": "^7.2.0",
|
53
|
+
"@storybook/html-webpack5": "^7.2.0",
|
53
54
|
"@storybook/jest": "^0.1.0",
|
54
|
-
"@storybook/test-runner": "^0.
|
55
|
+
"@storybook/test-runner": "^0.12.0",
|
55
56
|
"@storybook/testing-library": "^0.2.0",
|
56
57
|
"babel-loader": "^9.0.1",
|
58
|
+
"chromatic": "^6.19.9",
|
57
59
|
"copy-webpack-plugin": "^11.0.0",
|
58
60
|
"css-loader": "^6.7.1",
|
59
61
|
"diff": "^5.1.0",
|
60
62
|
"eslint": "^8.43.0",
|
63
|
+
"eslint-plugin-storybook": "^0.6.13",
|
61
64
|
"glob": "^10.2.7",
|
62
65
|
"jest-image-snapshot": "^6.1.0",
|
63
66
|
"nunjucks": "^3.2.3",
|
@@ -67,7 +70,7 @@
|
|
67
70
|
"sass": "^1.54.9",
|
68
71
|
"sass-loader": "^13.0.2",
|
69
72
|
"simple-nunjucks-loader": "^3.2.0",
|
70
|
-
"storybook": "^7.0
|
73
|
+
"storybook": "^7.2.0",
|
71
74
|
"style-loader": "^3.3.1",
|
72
75
|
"stylelint": "^15.9.0",
|
73
76
|
"stylelint-config-standard-scss": "^10.0.0",
|