@nationalarchives/frontend 0.1.52 → 0.1.54
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/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 +7 -0
- package/nationalarchives/analytics.js +1 -1
- package/nationalarchives/analytics.js.map +1 -1
- package/nationalarchives/analytics.mjs +4 -4
- package/nationalarchives/assets/fonts/OpenSans-SemiBold.ttf +0 -0
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.scss +9 -8
- package/nationalarchives/components/button/button-group.stories.js +0 -8
- package/nationalarchives/components/button/button.css +1 -1
- package/nationalarchives/components/button/button.css.map +1 -1
- package/nationalarchives/components/button/button.scss +12 -6
- package/nationalarchives/components/button/fixtures.json +76 -0
- package/nationalarchives/components/card/card.css +1 -1
- package/nationalarchives/components/card/card.css.map +1 -1
- package/nationalarchives/components/card/card.scss +1 -1
- package/nationalarchives/components/card/fixtures.json +24 -24
- package/nationalarchives/components/card/macro-options.json +1 -1
- package/nationalarchives/components/card/template.njk +1 -1
- package/nationalarchives/components/checkboxes/checkboxes.css +1 -1
- package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -1
- package/nationalarchives/components/checkboxes/checkboxes.scss +3 -2
- package/nationalarchives/components/compound-filters/compound-filters.css +1 -1
- package/nationalarchives/components/compound-filters/compound-filters.css.map +1 -1
- package/nationalarchives/components/compound-filters/compound-filters.scss +10 -6
- package/nationalarchives/components/cookie-banner/README.md +6 -2
- package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.js +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.mjs +2 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.stories.js +7 -8
- package/nationalarchives/components/date-input/date-input.css +1 -1
- package/nationalarchives/components/date-input/date-input.css.map +1 -1
- package/nationalarchives/components/date-search/date-search.css +1 -1
- package/nationalarchives/components/date-search/date-search.css.map +1 -1
- package/nationalarchives/components/date-search/date-search.scss +2 -0
- package/nationalarchives/components/error-summary/error-summary.css +1 -1
- package/nationalarchives/components/error-summary/error-summary.css.map +1 -1
- package/nationalarchives/components/featured-records/featured-records.css +1 -1
- package/nationalarchives/components/featured-records/featured-records.css.map +1 -1
- package/nationalarchives/components/featured-records/featured-records.scss +5 -3
- package/nationalarchives/components/footer/analytics.js +8 -0
- package/nationalarchives/components/footer/fixtures.json +9 -2
- package/nationalarchives/components/footer/footer.css +1 -1
- package/nationalarchives/components/footer/footer.css.map +1 -1
- package/nationalarchives/components/footer/footer.js +2 -0
- package/nationalarchives/components/footer/footer.js.map +1 -0
- package/nationalarchives/components/footer/footer.mjs +87 -0
- package/nationalarchives/components/footer/footer.scss +28 -8
- package/nationalarchives/components/footer/footer.stories.js +62 -3
- package/nationalarchives/components/footer/template.njk +168 -120
- package/nationalarchives/components/gallery/gallery.css +1 -1
- package/nationalarchives/components/gallery/gallery.css.map +1 -1
- package/nationalarchives/components/gallery/gallery.scss +2 -1
- package/nationalarchives/components/global-header/global-header.css +1 -1
- package/nationalarchives/components/global-header/global-header.css.map +1 -1
- package/nationalarchives/components/global-header/global-header.scss +13 -10
- package/nationalarchives/components/grid/grid.css +1 -1
- package/nationalarchives/components/grid/grid.css.map +1 -1
- package/nationalarchives/components/grid/grid.scss +3 -3
- package/nationalarchives/components/header/header.css +1 -1
- package/nationalarchives/components/header/header.css.map +1 -1
- package/nationalarchives/components/header/header.scss +17 -15
- package/nationalarchives/components/hero/fixtures.json +106 -18
- package/nationalarchives/components/hero/hero.css +1 -1
- package/nationalarchives/components/hero/hero.css.map +1 -1
- package/nationalarchives/components/hero/hero.scss +78 -19
- package/nationalarchives/components/hero/hero.stories.js +60 -32
- package/nationalarchives/components/hero/macro-options.json +34 -3
- package/nationalarchives/components/hero/template.njk +27 -6
- package/nationalarchives/components/index-grid/index-grid.css +1 -1
- package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
- package/nationalarchives/components/index-grid/macro-options.json +1 -1
- package/nationalarchives/components/pagination/pagination.css +1 -1
- package/nationalarchives/components/pagination/pagination.css.map +1 -1
- package/nationalarchives/components/pagination/pagination.scss +2 -2
- package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
- package/nationalarchives/components/picture/picture.css +1 -1
- package/nationalarchives/components/picture/picture.css.map +1 -1
- package/nationalarchives/components/picture/picture.scss +5 -1
- package/nationalarchives/components/quick-filters/quick-filters.css +1 -1
- package/nationalarchives/components/quick-filters/quick-filters.css.map +1 -1
- package/nationalarchives/components/quick-filters/quick-filters.scss +4 -2
- package/nationalarchives/components/radios/radios.css +1 -1
- package/nationalarchives/components/radios/radios.css.map +1 -1
- package/nationalarchives/components/radios/radios.scss +3 -2
- package/nationalarchives/components/search-field/search-field.css +1 -1
- package/nationalarchives/components/search-field/search-field.css.map +1 -1
- package/nationalarchives/components/search-filters/search-filters.css +1 -1
- package/nationalarchives/components/search-filters/search-filters.css.map +1 -1
- package/nationalarchives/components/search-filters/search-filters.scss +7 -6
- package/nationalarchives/components/select/select.css +1 -1
- package/nationalarchives/components/select/select.css.map +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.css +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.css.map +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.scss +7 -6
- package/nationalarchives/components/skip-link/skip-link.css +1 -1
- package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
- package/nationalarchives/components/skip-link/skip-link.scss +4 -4
- package/nationalarchives/components/tabs/tabs.css +1 -1
- package/nationalarchives/components/tabs/tabs.css.map +1 -1
- package/nationalarchives/components/tabs/tabs.scss +8 -6
- package/nationalarchives/components/text-input/text-input.css +1 -1
- package/nationalarchives/components/text-input/text-input.css.map +1 -1
- package/nationalarchives/components/textarea/textarea.css +1 -1
- package/nationalarchives/components/textarea/textarea.css.map +1 -1
- package/nationalarchives/components/textarea/textarea.scss +7 -4
- package/nationalarchives/components/warning/warning.css +1 -1
- package/nationalarchives/components/warning/warning.css.map +1 -1
- package/nationalarchives/components/warning/warning.scss +7 -5
- package/nationalarchives/global-header-package.css +1 -1
- package/nationalarchives/global-header-package.css.map +1 -1
- package/nationalarchives/lib/cookies.mjs +21 -4
- package/nationalarchives/lib/functions.css +1 -0
- package/nationalarchives/lib/functions.css.map +1 -0
- package/nationalarchives/lib/functions.scss +16 -0
- package/nationalarchives/prototype-kit.css +1 -1
- package/nationalarchives/prototype-kit.css.map +1 -1
- package/nationalarchives/stories/utilities/colour-schemes/colour-combinations.stories.js +6 -2
- package/nationalarchives/stories/utilities/colour-schemes/colour-themes.stories.js +2 -1
- package/nationalarchives/templates/fixtures.json +27 -4
- package/nationalarchives/templates/layouts/_generic.njk +15 -15
- package/nationalarchives/tools/_colour.scss +3 -3
- package/nationalarchives/tools/_typography.scss +8 -9
- package/nationalarchives/utilities/_a11y.scss +4 -4
- package/nationalarchives/utilities/_debug.scss +2 -2
- package/nationalarchives/utilities/_global.scss +8 -0
- package/nationalarchives/utilities/_imports.scss +57 -0
- package/nationalarchives/utilities/_index.scss +1 -0
- package/nationalarchives/utilities/_lists.scss +36 -19
- package/nationalarchives/utilities/_tables.scss +8 -8
- package/nationalarchives/utilities/_typography.scss +6 -42
- package/nationalarchives/variables/_colour.scss +7 -2
- package/nationalarchives/variables/_typography.scss +55 -4
- package/package.json +21 -20
- package/nationalarchives/assets/fonts/OpenSans-Italic.ttf +0 -0
@@ -1,5 +1,5 @@
|
|
1
|
-
@use "sass:map";
|
2
1
|
@use "sass:list";
|
2
|
+
@use "sass:map";
|
3
3
|
@use "../variables/borders";
|
4
4
|
@use "../variables/colour";
|
5
5
|
@use "../tools/media";
|
@@ -335,8 +335,8 @@
|
|
335
335
|
--accent-link-visited: #{colour.brand-colour("black")} !important;
|
336
336
|
--accent-keyline: #{colour.brand-colour("black", 0.5)} !important;
|
337
337
|
--accent-keyline-dark: #{colour.brand-colour("black", 0.8)} !important;
|
338
|
-
--button-accent-text: #{colour.brand-colour("
|
339
|
-
--button-accent-background: #{colour.brand-colour("
|
338
|
+
--button-accent-text: #{colour.brand-colour("white")} !important;
|
339
|
+
--button-accent-background: #{colour.brand-colour("brown")} !important;
|
340
340
|
}
|
341
341
|
|
342
342
|
@mixin yellow-accent {
|
@@ -21,14 +21,14 @@
|
|
21
21
|
|
22
22
|
@mixin main-font($bold: false) {
|
23
23
|
font-family: typography.$main-font-family;
|
24
|
+
font-style: normal;
|
25
|
+
font-optical-sizing: auto;
|
26
|
+
font-variation-settings: "wdth" 100;
|
24
27
|
@if $bold {
|
25
28
|
@include main-font-weight-bold;
|
26
29
|
} @else {
|
27
30
|
@include main-font-weight;
|
28
31
|
}
|
29
|
-
font-optical-sizing: auto;
|
30
|
-
font-style: normal;
|
31
|
-
font-variation-settings: "wdth" 100;
|
32
32
|
}
|
33
33
|
|
34
34
|
@mixin heading-font {
|
@@ -38,20 +38,20 @@
|
|
38
38
|
|
39
39
|
@mixin detail-font($bold: false) {
|
40
40
|
font-family: typography.$detail-font-family;
|
41
|
+
font-style: normal;
|
42
|
+
font-optical-sizing: auto;
|
41
43
|
@if $bold {
|
42
44
|
font-weight: typography.$detail-font-weight-bold;
|
43
45
|
} @else {
|
44
46
|
font-weight: typography.$detail-font-weight;
|
45
47
|
}
|
46
|
-
font-optical-sizing: auto;
|
47
|
-
font-style: normal;
|
48
48
|
}
|
49
49
|
|
50
50
|
@mixin detail-font-small {
|
51
51
|
@include detail-font;
|
52
52
|
@include relative-font-size(14);
|
53
|
-
text-transform: uppercase;
|
54
53
|
line-height: 1.1;
|
54
|
+
text-transform: uppercase;
|
55
55
|
}
|
56
56
|
|
57
57
|
@mixin interacted-text-decoration {
|
@@ -66,14 +66,13 @@
|
|
66
66
|
$font-size-tiny,
|
67
67
|
$line-height
|
68
68
|
) {
|
69
|
-
@include relative-font-size($font-size-default);
|
70
|
-
line-height: $line-height;
|
71
|
-
|
72
69
|
$small-and-tiny-identical: $font-size-small == $font-size-tiny;
|
73
70
|
$medium-small-and-tiny-identical: $font-size-medium == $font-size-small and
|
74
71
|
$small-and-tiny-identical;
|
75
72
|
$all-identical: $font-size-default == $font-size-medium and
|
76
73
|
$medium-small-and-tiny-identical and $small-and-tiny-identical;
|
74
|
+
line-height: $line-height;
|
75
|
+
@include relative-font-size($font-size-default);
|
77
76
|
|
78
77
|
@if $all-identical != true {
|
79
78
|
@if $medium-small-and-tiny-identical != true {
|
@@ -7,18 +7,18 @@
|
|
7
7
|
margin: 0 !important;
|
8
8
|
padding: 0 !important;
|
9
9
|
|
10
|
+
overflow: hidden !important;
|
11
|
+
|
10
12
|
position: absolute !important;
|
11
13
|
top: -9999px !important;
|
12
14
|
left: -9999px !important;
|
13
15
|
z-index: -1 !important;
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
-
clip: rect(0, 0, 0, 0) !important;
|
17
|
+
background-color: transparent !important;
|
18
18
|
|
19
19
|
border: 0 !important;
|
20
20
|
|
21
|
-
|
21
|
+
clip: rect(0, 0, 0, 0) !important;
|
22
22
|
|
23
23
|
// &::before,
|
24
24
|
// &::after {
|
@@ -19,6 +19,8 @@
|
|
19
19
|
0 0 0.5rem #f0a !important;
|
20
20
|
|
21
21
|
&::after {
|
22
|
+
content: "";
|
23
|
+
|
22
24
|
width: 20px;
|
23
25
|
height: 20px;
|
24
26
|
|
@@ -39,8 +41,6 @@
|
|
39
41
|
0 0 0.5rem #0f3 !important;
|
40
42
|
|
41
43
|
transform: translateX(-50%) translateY(-50%);
|
42
|
-
|
43
|
-
content: "";
|
44
44
|
}
|
45
45
|
|
46
46
|
&:not(.tna-checkboxes__item-label, .tna-radios__item-label) {
|
@@ -1,4 +1,12 @@
|
|
1
1
|
.tna-template {
|
2
|
+
/*
|
3
|
+
* ------------------------------------------
|
4
|
+
* A minimum page width of 320px is needed in
|
5
|
+
* order to meet the WCAG AA success criteria
|
6
|
+
* for 1.4.10 (Reflow)
|
7
|
+
* https://www.w3.org/WAI/WCAG21/Understanding/reflow.html
|
8
|
+
* ------------------------------------------
|
9
|
+
*/
|
2
10
|
min-width: 320px;
|
3
11
|
width: 100%;
|
4
12
|
height: 100%;
|
@@ -0,0 +1,57 @@
|
|
1
|
+
@use "../variables/assets";
|
2
|
+
@use "../variables/typography";
|
3
|
+
@use "../lib/functions";
|
4
|
+
|
5
|
+
@if typography.$use-local-fonts {
|
6
|
+
@font-face {
|
7
|
+
font-family: typography.$main-font-family-name;
|
8
|
+
src: url("#{assets.$tna-font-path}/#{typography.$main-font-file}");
|
9
|
+
font-weight: typography.$main-font-weight;
|
10
|
+
font-style: normal;
|
11
|
+
font-display: swap;
|
12
|
+
}
|
13
|
+
|
14
|
+
@font-face {
|
15
|
+
font-family: typography.$main-font-family-name;
|
16
|
+
src: url("#{assets.$tna-font-path}/#{typography.$main-font-file-medium}");
|
17
|
+
font-weight: typography.$main-font-weight-medium;
|
18
|
+
font-style: normal;
|
19
|
+
font-display: swap;
|
20
|
+
}
|
21
|
+
|
22
|
+
@font-face {
|
23
|
+
font-family: typography.$main-font-family-name;
|
24
|
+
src: url("#{assets.$tna-font-path}/#{typography.$main-font-file-bold}");
|
25
|
+
font-weight: typography.$main-font-weight-bold;
|
26
|
+
font-style: normal;
|
27
|
+
font-display: swap;
|
28
|
+
}
|
29
|
+
|
30
|
+
@font-face {
|
31
|
+
font-family: typography.$detail-font-family-name;
|
32
|
+
src: url("#{assets.$tna-font-path}/#{typography.$detail-font-file}");
|
33
|
+
font-weight: typography.$detail-font-weight;
|
34
|
+
font-style: normal;
|
35
|
+
font-display: swap;
|
36
|
+
}
|
37
|
+
|
38
|
+
@font-face {
|
39
|
+
font-family: typography.$detail-font-family-name;
|
40
|
+
src: url("#{assets.$tna-font-path}/#{typography.$detail-font-file-bold}");
|
41
|
+
font-weight: typography.$detail-font-weight-bold;
|
42
|
+
font-style: normal;
|
43
|
+
font-display: swap;
|
44
|
+
}
|
45
|
+
} @else {
|
46
|
+
$main-font-family-name: functions.str-replace(
|
47
|
+
typography.$main-font-family-name,
|
48
|
+
" ",
|
49
|
+
"+"
|
50
|
+
);
|
51
|
+
$detail-font-family-name: functions.str-replace(
|
52
|
+
typography.$detail-font-family-name,
|
53
|
+
" ",
|
54
|
+
"+"
|
55
|
+
);
|
56
|
+
@import url("https://fonts.googleapis.com/css2?family=#{$main-font-family-name}:wght@#{typography.$main-font-weight}..#{typography.$main-font-weight-bold}&family=#{$detail-font-family-name}:wght@#{typography.$detail-font-weight}..#{typography.$detail-font-weight-bold}&display=swap"); /* stylelint-disable-line */
|
57
|
+
}
|
@@ -4,28 +4,45 @@
|
|
4
4
|
@use "../tools/typography";
|
5
5
|
|
6
6
|
.tna-ul,
|
7
|
-
.tna-
|
8
|
-
|
9
|
-
|
7
|
+
.tna-ul ul {
|
8
|
+
list-style-type: disc;
|
9
|
+
}
|
10
10
|
|
11
|
-
|
11
|
+
.tna-ul,
|
12
|
+
.tna-ol {
|
13
|
+
ul,
|
14
|
+
ol {
|
12
15
|
margin-top: 0;
|
13
16
|
}
|
14
17
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
18
|
+
&,
|
19
|
+
& ul,
|
20
|
+
& ol {
|
21
|
+
margin: spacing.space(1) 0 0;
|
22
|
+
padding: 0 0 0 spacing.space(2);
|
19
23
|
|
20
|
-
|
21
|
-
|
24
|
+
&--plain {
|
25
|
+
padding-left: 0;
|
22
26
|
|
23
|
-
|
24
|
-
|
27
|
+
&,
|
28
|
+
& ul,
|
29
|
+
& ol {
|
30
|
+
list-style: none;
|
31
|
+
}
|
32
|
+
}
|
25
33
|
|
26
|
-
|
27
|
-
|
28
|
-
|
34
|
+
&:first-child {
|
35
|
+
margin-top: 0;
|
36
|
+
}
|
37
|
+
|
38
|
+
li::marker {
|
39
|
+
@include colour.colour-font("accent-background");
|
40
|
+
font-weight: 700;
|
41
|
+
|
42
|
+
.tna-background-accent & {
|
43
|
+
@include colour.colour-font("font-dark");
|
44
|
+
}
|
45
|
+
}
|
29
46
|
}
|
30
47
|
}
|
31
48
|
|
@@ -64,9 +81,9 @@
|
|
64
81
|
}
|
65
82
|
|
66
83
|
dd {
|
67
|
-
background: transparent !important;
|
68
|
-
|
69
84
|
margin-left: 0;
|
85
|
+
|
86
|
+
background: transparent !important;
|
70
87
|
}
|
71
88
|
}
|
72
89
|
}
|
@@ -86,10 +103,10 @@
|
|
86
103
|
margin: 0;
|
87
104
|
padding: spacing.space(0.5) spacing.space(1);
|
88
105
|
|
89
|
-
position: relative;
|
90
|
-
|
91
106
|
box-sizing: border-box;
|
92
107
|
|
108
|
+
position: relative;
|
109
|
+
|
93
110
|
word-wrap: break-word;
|
94
111
|
}
|
95
112
|
|
@@ -8,12 +8,12 @@
|
|
8
8
|
|
9
9
|
.tna-table {
|
10
10
|
width: 100%;
|
11
|
-
@include spacing.space-above;
|
12
|
-
|
13
|
-
border-collapse: collapse;
|
14
11
|
|
15
12
|
text-align: left;
|
16
13
|
|
14
|
+
border-collapse: collapse;
|
15
|
+
@include spacing.space-above;
|
16
|
+
|
17
17
|
&:first-child {
|
18
18
|
margin-top: 0;
|
19
19
|
}
|
@@ -85,18 +85,18 @@
|
|
85
85
|
|
86
86
|
.tna-table-wrapper {
|
87
87
|
width: 100%;
|
88
|
-
@include spacing.space-above;
|
89
|
-
padding-left: grid.gutter-width();
|
90
88
|
padding-right: grid.gutter-width();
|
89
|
+
padding-left: grid.gutter-width();
|
90
|
+
|
91
|
+
overflow: auto;
|
91
92
|
|
92
93
|
position: relative;
|
93
94
|
left: -#{grid.gutter-width()};
|
94
|
-
|
95
|
-
overflow: auto;
|
95
|
+
@include spacing.space-above;
|
96
96
|
|
97
97
|
@include media.on-tiny {
|
98
|
-
padding-left: grid.gutter-width-tiny();
|
99
98
|
padding-right: grid.gutter-width-tiny();
|
99
|
+
padding-left: grid.gutter-width-tiny();
|
100
100
|
|
101
101
|
left: -#{grid.gutter-width-tiny()};
|
102
102
|
}
|
@@ -1,57 +1,20 @@
|
|
1
1
|
@use "sass:math";
|
2
2
|
@use "sass:selector";
|
3
|
-
@use "../variables/assets";
|
4
3
|
@use "../variables/typography" as typographyVars;
|
5
4
|
@use "../tools/colour";
|
6
5
|
@use "../tools/media";
|
7
6
|
@use "../tools/spacing";
|
8
7
|
@use "../tools/typography";
|
9
8
|
|
10
|
-
@if typographyVars.$use-local-fonts {
|
11
|
-
@font-face {
|
12
|
-
font-family: "Open Sans";
|
13
|
-
src: url("#{assets.$tna-font-path}/OpenSans-Regular.ttf");
|
14
|
-
font-weight: typographyVars.$main-font-weight;
|
15
|
-
font-style: normal;
|
16
|
-
font-display: swap;
|
17
|
-
}
|
18
|
-
|
19
|
-
@font-face {
|
20
|
-
font-family: "Open Sans";
|
21
|
-
src: url("#{assets.$tna-font-path}/OpenSans-Bold.ttf");
|
22
|
-
font-weight: typographyVars.$main-font-weight-bold;
|
23
|
-
font-style: normal;
|
24
|
-
font-display: swap;
|
25
|
-
}
|
26
|
-
|
27
|
-
@font-face {
|
28
|
-
font-family: "Roboto Mono";
|
29
|
-
src: url("#{assets.$tna-font-path}/RobotoMono-Regular.ttf");
|
30
|
-
font-weight: typographyVars.$detail-font-weight;
|
31
|
-
font-style: normal;
|
32
|
-
font-display: swap;
|
33
|
-
}
|
34
|
-
|
35
|
-
@font-face {
|
36
|
-
font-family: "Roboto Mono";
|
37
|
-
src: url("#{assets.$tna-font-path}/RobotoMono-Medium.ttf");
|
38
|
-
font-weight: typographyVars.$detail-font-weight-bold;
|
39
|
-
font-style: normal;
|
40
|
-
font-display: swap;
|
41
|
-
}
|
42
|
-
} @else {
|
43
|
-
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300..800&family=Roboto+Mono:wght@100..700&display=swap"); /* stylelint-disable-line */
|
44
|
-
}
|
45
|
-
|
46
9
|
.tna-template {
|
47
10
|
@include colour.colour-font("font-base");
|
48
11
|
@include typography.main-font;
|
49
|
-
|
50
|
-
-webkit-font-smoothing: antialiased;
|
12
|
+
direction: ltr;
|
51
13
|
text-rendering: optimizeLegibility;
|
52
14
|
-webkit-text-size-adjust: none;
|
53
15
|
text-size-adjust: none;
|
54
|
-
|
16
|
+
-moz-osx-font-smoothing: grayscale;
|
17
|
+
-webkit-font-smoothing: antialiased;
|
55
18
|
}
|
56
19
|
|
57
20
|
.tna-template__body {
|
@@ -121,6 +84,7 @@ small {
|
|
121
84
|
@include colour.colour-font("font-base");
|
122
85
|
@include typography.detail-font-small;
|
123
86
|
line-height: 1;
|
87
|
+
text-align: center;
|
124
88
|
}
|
125
89
|
|
126
90
|
%chip-plain {
|
@@ -227,13 +191,13 @@ small {
|
|
227
191
|
display: inline-block;
|
228
192
|
|
229
193
|
&::after {
|
194
|
+
content: "\203A";
|
195
|
+
|
230
196
|
padding-left: spacing.space(0.5);
|
231
197
|
|
232
198
|
display: inline-block;
|
233
199
|
|
234
200
|
font-weight: 700;
|
235
|
-
|
236
|
-
content: "\203A";
|
237
201
|
}
|
238
202
|
|
239
203
|
&:hover {
|
@@ -1,3 +1,4 @@
|
|
1
|
+
@use "sass:color";
|
1
2
|
@use "sass:map";
|
2
3
|
|
3
4
|
$colour-palette-brand: (
|
@@ -27,9 +28,11 @@ $colour-palette-brand: (
|
|
27
28
|
|
28
29
|
@function hex-to-rgb($hex, $opacity: 1) {
|
29
30
|
@if $opacity == 1 {
|
30
|
-
@return rgb(red($hex) green($hex) blue($hex));
|
31
|
+
@return rgb(color.red($hex) color.green($hex) color.blue($hex));
|
31
32
|
} @else {
|
32
|
-
@return rgb(
|
33
|
+
@return rgb(
|
34
|
+
color.red($hex) color.green($hex) color.blue($hex) / #{$opacity}
|
35
|
+
);
|
33
36
|
}
|
34
37
|
}
|
35
38
|
|
@@ -136,6 +139,7 @@ $colour-palette-high-contrast: map.merge(
|
|
136
139
|
$colour-palette-default,
|
137
140
|
(
|
138
141
|
"background": brand-colour("white"),
|
142
|
+
"background-tint": #f4f4f4,
|
139
143
|
"font-base": brand-colour("black"),
|
140
144
|
"font-light": brand-colour("black"),
|
141
145
|
"icon-light": brand-colour("black", 0.75),
|
@@ -148,6 +152,7 @@ $colour-palette-high-contrast: map.merge(
|
|
148
152
|
"contrast-font-base": brand-colour("black"),
|
149
153
|
"contrast-font-dark": brand-colour("black"),
|
150
154
|
"contrast-font-light": brand-colour("black"),
|
155
|
+
"contrast-icon-light": brand-colour("black", 0.45),
|
151
156
|
"contrast-link": #34d,
|
152
157
|
"contrast-link-visited": #848,
|
153
158
|
"contrast-keyline": brand-colour("black"),
|
@@ -1,5 +1,24 @@
|
|
1
|
+
/*
|
2
|
+
* ------------------------------------------
|
3
|
+
* The typefaces, sizes and spacings that are
|
4
|
+
* defined in this file have been selected to
|
5
|
+
* ensure 100% match with the latest National
|
6
|
+
* Archives brand guidelines - avoid changing
|
7
|
+
* or overwriting any of these values without
|
8
|
+
* signing off with the Digital Services team
|
9
|
+
* first
|
10
|
+
* ------------------------------------------
|
11
|
+
*/
|
12
|
+
|
1
13
|
$relative-1rem-px: 16; // 16px = 1rem
|
2
14
|
|
15
|
+
/*
|
16
|
+
* ------------------------------------------
|
17
|
+
* When true, use the included font files for
|
18
|
+
* Open Sans and Roboto Mono, rather than the
|
19
|
+
* versions hosted by Google Fonts
|
20
|
+
* ------------------------------------------
|
21
|
+
*/
|
3
22
|
$use-local-fonts: false !default;
|
4
23
|
|
5
24
|
$body-font-size-px: 18 !default;
|
@@ -8,18 +27,50 @@ $body-line-height: 1.75 !default;
|
|
8
27
|
|
9
28
|
$interactive-text-decoration-thickness: 3.5px !default;
|
10
29
|
|
11
|
-
$main-font: "Open Sans" !default;
|
12
|
-
$main-font-family:
|
30
|
+
$main-font-family-name: "Open Sans" !default;
|
31
|
+
$main-font-family:
|
32
|
+
#{$main-font-family-name},
|
33
|
+
sans-serif;
|
13
34
|
$main-font-weight: 400 !default;
|
14
35
|
$main-font-weight-medium: 600 !default;
|
15
36
|
$main-font-weight-bold: 700 !default;
|
37
|
+
$main-font-file: "OpenSans-Regular.ttf" !default;
|
38
|
+
$main-font-file-medium: "OpenSans-SemiBold.ttf" !default;
|
39
|
+
$main-font-file-bold: "OpenSans-Bold.ttf" !default;
|
16
40
|
|
17
|
-
|
41
|
+
/*
|
42
|
+
* ------------------------------------------
|
43
|
+
* To use Supria Sans Condensed (which is the
|
44
|
+
* approved heading typeface for The National
|
45
|
+
* Archives), you need to obtain a licence to
|
46
|
+
* properly embed the CSS files with the font
|
47
|
+
* definitions in your service - check with a
|
48
|
+
* member of the Digital Services team on how
|
49
|
+
* to get a licence
|
50
|
+
* ------------------------------------------
|
51
|
+
*/
|
52
|
+
$heading-font-family-name: "supria-sans-condensed" !default;
|
53
|
+
$heading-font-family:
|
54
|
+
#{$heading-font-family-name},
|
55
|
+
"Arial Narrow",
|
56
|
+
sans-serif;
|
18
57
|
$heading-font-weight: 500 !default;
|
19
58
|
|
20
|
-
|
59
|
+
/*
|
60
|
+
* ------------------------------------------
|
61
|
+
* The detail font should be a monospace font
|
62
|
+
* and is used for chips, supertitles as well
|
63
|
+
* as the date search component
|
64
|
+
* ------------------------------------------
|
65
|
+
*/
|
66
|
+
$detail-font-family-name: "Roboto Mono" !default;
|
67
|
+
$detail-font-family:
|
68
|
+
#{$detail-font-family-name},
|
69
|
+
monospace;
|
21
70
|
$detail-font-weight: 400 !default;
|
22
71
|
$detail-font-weight-bold: 500 !default;
|
72
|
+
$detail-font-file: "RobotoMono-Regular.ttf" !default;
|
73
|
+
$detail-font-file-bold: "RobotoMono-Medium.ttf" !default;
|
23
74
|
|
24
75
|
$heading-xl-font-size-default: 64 !default;
|
25
76
|
$heading-xl-font-size-medium: 48 !default;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nationalarchives/frontend",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.54",
|
4
4
|
"description": "The National Archives frontend styles",
|
5
5
|
"scripts": {
|
6
6
|
"start": "storybook dev -p 6006",
|
@@ -44,42 +44,43 @@
|
|
44
44
|
"sass": "nationalarchives/all.scss",
|
45
45
|
"homepage": "https://github.com/nationalarchives/tna-frontend#readme",
|
46
46
|
"devDependencies": {
|
47
|
-
"@babel/core": "^7.
|
48
|
-
"@babel/preset-env": "^7.
|
47
|
+
"@babel/core": "^7.24.5",
|
48
|
+
"@babel/preset-env": "^7.24.5",
|
49
49
|
"@mdx-js/react": "^3.0.0",
|
50
|
-
"@storybook/addon-a11y": "^8.0.
|
51
|
-
"@storybook/addon-docs": "^8.0.
|
52
|
-
"@storybook/addon-essentials": "^8.0.
|
53
|
-
"@storybook/addon-interactions": "^8.0.
|
54
|
-
"@storybook/addon-links": "^8.0.
|
55
|
-
"@storybook/addon-mdx-gfm": "^8.0.
|
56
|
-
"@storybook/html": "^8.0.
|
57
|
-
"@storybook/html-webpack5": "^8.0.
|
58
|
-
"@storybook/test": "^8.0.
|
50
|
+
"@storybook/addon-a11y": "^8.0.10",
|
51
|
+
"@storybook/addon-docs": "^8.0.10",
|
52
|
+
"@storybook/addon-essentials": "^8.0.10",
|
53
|
+
"@storybook/addon-interactions": "^8.0.10",
|
54
|
+
"@storybook/addon-links": "^8.0.10",
|
55
|
+
"@storybook/addon-mdx-gfm": "^8.0.10",
|
56
|
+
"@storybook/html": "^8.0.10",
|
57
|
+
"@storybook/html-webpack5": "^8.0.10",
|
58
|
+
"@storybook/test": "^8.0.10",
|
59
59
|
"@storybook/test-runner": "^0.17.0",
|
60
60
|
"axe-playwright": "^2.0.1",
|
61
61
|
"babel-jest": "^29.7.0",
|
62
62
|
"babel-loader": "^9.0.1",
|
63
|
-
"chromatic": "^
|
63
|
+
"chromatic": "^11.3.1",
|
64
64
|
"copy-webpack-plugin": "^12.0.2",
|
65
|
-
"css-loader": "^
|
65
|
+
"css-loader": "^7.1.1",
|
66
66
|
"diff": "^5.1.0",
|
67
67
|
"eslint": "^8.52.0",
|
68
68
|
"eslint-plugin-storybook": "^0.8.0",
|
69
69
|
"glob": "^10.3.10",
|
70
|
-
"html-validate": "^8.
|
70
|
+
"html-validate": "^8.18.2",
|
71
71
|
"jest-environment-jsdom": "^29.7.0",
|
72
72
|
"mdx-mermaid": "^2.0.0",
|
73
73
|
"node-self": "^1.0.2",
|
74
74
|
"nunjucks": "^3.2.3",
|
75
75
|
"prettier": "^3.0.1",
|
76
|
-
"sass": "^1.
|
77
|
-
"sass-loader": "^14.1
|
76
|
+
"sass": "^1.77.0",
|
77
|
+
"sass-loader": "^14.2.1",
|
78
78
|
"simple-nunjucks-loader": "^3.2.0",
|
79
|
-
"storybook": "^8.0.
|
80
|
-
"style-loader": "^
|
81
|
-
"stylelint": "^16.0
|
79
|
+
"storybook": "^8.0.10",
|
80
|
+
"style-loader": "^4.0.0",
|
81
|
+
"stylelint": "^16.5.0",
|
82
82
|
"stylelint-config-standard-scss": "^13.0.0",
|
83
|
+
"stylelint-order": "^6.0.4",
|
83
84
|
"stylelint-selector-bem-pattern": "^4.0.0",
|
84
85
|
"webpack": "^5.89.0",
|
85
86
|
"webpack-cli": "^5.1.4"
|
Binary file
|