@nationalarchives/frontend 0.1.11-prerelease → 0.1.13-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 +1 -1
- package/nationalarchives/_features.scss +1 -1
- package/nationalarchives/all.css +1 -1
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/components/_index.scss +2 -0
- package/nationalarchives/components/breadcrumbs/_index.scss +30 -26
- package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +1 -1
- package/nationalarchives/components/breadcrumbs/fixtures.json +1 -1
- package/nationalarchives/components/breadcrumbs/template.njk +1 -1
- package/nationalarchives/components/button/button.stories.js +1 -1
- package/nationalarchives/components/card/_index.scss +2 -1
- package/nationalarchives/components/card/card.stories.js +1 -1
- package/nationalarchives/components/footer/_index.scss +3 -3
- package/nationalarchives/components/footer/fixtures.json +1 -1
- package/nationalarchives/components/footer/template.njk +1 -1
- package/nationalarchives/components/header/_index.scss +36 -7
- package/nationalarchives/components/header/header.stories.js +15 -15
- package/nationalarchives/components/index-grid/_index.scss +46 -0
- package/nationalarchives/components/index-grid/fixtures.json +4 -0
- package/nationalarchives/components/index-grid/index-grid.stories.js +77 -0
- package/nationalarchives/components/index-grid/macro-options.json +94 -0
- package/nationalarchives/components/index-grid/macro.njk +3 -0
- package/nationalarchives/components/index-grid/template.njk +56 -0
- package/nationalarchives/components/message/_index.scss +27 -0
- package/nationalarchives/components/message/fixtures.json +4 -0
- package/nationalarchives/components/message/macro-options.json +20 -0
- package/nationalarchives/components/message/macro.njk +3 -0
- package/nationalarchives/components/message/phase-banner.stories.js +36 -0
- package/nationalarchives/components/message/template.njk +9 -0
- package/nationalarchives/components/phase-banner/phase-banner.stories.js +1 -1
- package/nationalarchives/components/phase-banner/template.njk +1 -1
- package/nationalarchives/components/picture/_index.scss +5 -1
- package/nationalarchives/components/picture/picture.stories.js +1 -1
- package/nationalarchives/components/profile/profile.stories.js +1 -1
- package/nationalarchives/components/profile/template.njk +1 -1
- package/nationalarchives/components/tabs/tabs.stories.js +1 -1
- package/nationalarchives/stories/development/publishing.mdx +1 -12
- package/nationalarchives/stories/utilities/heading-groups.stories.js +1 -0
- package/nationalarchives/stories/utilities/headings.stories.js +8 -22
- package/nationalarchives/stories/utilities/typography.mdx +1 -3
- package/nationalarchives/templates/layouts/_generic.njk +42 -50
- package/nationalarchives/utilities/_global.scss +9 -2
- package/nationalarchives/utilities/_typography.scss +2 -2
- package/nationalarchives/variables/_colour.scss +11 -9
- package/nationalarchives/variables/_typography.scss +4 -2
- package/package.json +22 -22
@@ -112,9 +112,16 @@
|
|
112
112
|
margin: 0;
|
113
113
|
padding: 0;
|
114
114
|
|
115
|
-
// @include colour.colour-background("page-background");
|
116
|
-
|
117
115
|
overflow: auto;
|
116
|
+
|
117
|
+
&:has(.tna-header):has(#main[role="main"]):has(.tna-footer) {
|
118
|
+
display: flex;
|
119
|
+
flex-direction: column;
|
120
|
+
|
121
|
+
#main[role="main"] {
|
122
|
+
flex: 1;
|
123
|
+
}
|
124
|
+
}
|
118
125
|
}
|
119
126
|
|
120
127
|
img,
|
@@ -3,7 +3,7 @@
|
|
3
3
|
@use "../tools/typography";
|
4
4
|
|
5
5
|
// Temporary - will eventually bundle font files into package
|
6
|
-
@import "https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&family=Roboto+Mono:wght@
|
6
|
+
@import "https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&family=Roboto+Mono:wght@400;700&display=swap";
|
7
7
|
@import "https://use.typekit.net/hkj3kuz.css";
|
8
8
|
|
9
9
|
.tna-template {
|
@@ -74,7 +74,7 @@ a {
|
|
74
74
|
}
|
75
75
|
|
76
76
|
.tna-heading {
|
77
|
-
margin-bottom:
|
77
|
+
margin-bottom: 1rem;
|
78
78
|
|
79
79
|
@include colour.colour-font("font-dark");
|
80
80
|
@include typography.heading-font;
|
@@ -39,13 +39,15 @@ $-accent-colour-dark: $-accent-colour;
|
|
39
39
|
// }
|
40
40
|
// @debug $-accent-colour;
|
41
41
|
|
42
|
-
|
43
|
-
//
|
44
|
-
|
42
|
+
@function accent-colour() {
|
43
|
+
// @return $-accent-colour or $-tna-yellow;
|
44
|
+
@return $-accent-colour;
|
45
|
+
}
|
45
46
|
|
46
|
-
|
47
|
-
//
|
48
|
-
|
47
|
+
@function accent-colour-dark() {
|
48
|
+
// @return $-accent-colour-dark or -accent-colour();
|
49
|
+
@return $-accent-colour-dark or accent-colour();
|
50
|
+
}
|
49
51
|
|
50
52
|
// TODO: Scoped variables should not be used directly outside of this file
|
51
53
|
$tna-black: $-tna-black;
|
@@ -68,7 +70,7 @@ $colour-palette-default: (
|
|
68
70
|
"focus-outline": $-tna-blue,
|
69
71
|
"keyline": #ccc,
|
70
72
|
"keyline-dark": $-dark-grey,
|
71
|
-
"accent":
|
73
|
+
"accent": accent-colour(),
|
72
74
|
"button-primary-text": $-tna-white,
|
73
75
|
"button-primary-background": $-tna-black,
|
74
76
|
"button-primary-hover-text": $-tna-black,
|
@@ -85,12 +87,12 @@ $colour-palette-dark: map.merge(
|
|
85
87
|
"page-background": #222,
|
86
88
|
"font-base": rgba($-tna-white, 0.95),
|
87
89
|
"font-dark": $-tna-white,
|
88
|
-
"font-light": rgba($-tna-white, 0.
|
90
|
+
"font-light": rgba($-tna-white, 0.5),
|
89
91
|
"link": $-tna-blue,
|
90
92
|
"link-visited": #b9f,
|
91
93
|
"keyline": rgba($-tna-white, 0.5),
|
92
94
|
"keyline-dark": $-tna-white,
|
93
|
-
"accent":
|
95
|
+
"accent": accent-colour-dark(),
|
94
96
|
)
|
95
97
|
);
|
96
98
|
|
@@ -4,7 +4,9 @@ $font-family-main: "Open Sans", sans-serif;
|
|
4
4
|
$font-weight-main: 400;
|
5
5
|
|
6
6
|
$font-family-heading: supria-sans-condensed, sans-serif;
|
7
|
-
$font-weight-heading:
|
7
|
+
$font-weight-heading: 400;
|
8
8
|
|
9
9
|
$font-family-detail: "Roboto Mono", monospace;
|
10
|
-
$font-weight-detail:
|
10
|
+
$font-weight-detail: 400;
|
11
|
+
// $font-family-detail: $font-family-main;
|
12
|
+
// $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.13-prerelease",
|
4
4
|
"description": "The National Archives frontend styles",
|
5
5
|
"scripts": {
|
6
6
|
"start": "storybook dev -p 6006",
|
@@ -9,8 +9,7 @@
|
|
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
11
|
"package:sass": "sass --style=compressed --quiet-deps src/nationalarchives/all.scss package/nationalarchives/all.css",
|
12
|
-
"package:scripts": "webpack"
|
13
|
-
"package:test": "tasks/build-package.sh && node tasks/test-package.js"
|
12
|
+
"package:scripts": "webpack"
|
14
13
|
},
|
15
14
|
"repository": {
|
16
15
|
"type": "git",
|
@@ -40,42 +39,43 @@
|
|
40
39
|
},
|
41
40
|
"homepage": "https://github.com/nationalarchives/tna-frontend#readme",
|
42
41
|
"devDependencies": {
|
43
|
-
"@babel/core": "^7.
|
44
|
-
"@babel/preset-env": "^7.22.
|
42
|
+
"@babel/core": "^7.22.10",
|
43
|
+
"@babel/preset-env": "^7.22.10",
|
45
44
|
"@mdx-js/react": "^2.1.3",
|
46
|
-
"@storybook/addon-a11y": "^7.2.
|
47
|
-
"@storybook/addon-docs": "^7.2.
|
48
|
-
"@storybook/addon-essentials": "^7.2.
|
49
|
-
"@storybook/addon-interactions": "^7.2.
|
50
|
-
"@storybook/addon-links": "^7.2.
|
51
|
-
"@storybook/addon-mdx-gfm": "^7.2.
|
52
|
-
"@storybook/html": "^7.2.
|
53
|
-
"@storybook/html-webpack5": "^7.2.
|
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",
|
54
53
|
"@storybook/jest": "^0.1.0",
|
55
|
-
"@storybook/test-runner": "^0.
|
54
|
+
"@storybook/test-runner": "^0.13.0",
|
56
55
|
"@storybook/testing-library": "^0.2.0",
|
56
|
+
"axe-playwright": "^1.2.3",
|
57
57
|
"babel-loader": "^9.0.1",
|
58
|
-
"chromatic": "^6.
|
58
|
+
"chromatic": "^6.21.0",
|
59
59
|
"copy-webpack-plugin": "^11.0.0",
|
60
60
|
"css-loader": "^6.7.1",
|
61
61
|
"diff": "^5.1.0",
|
62
|
-
"eslint": "^8.
|
62
|
+
"eslint": "^8.46.0",
|
63
63
|
"eslint-plugin-storybook": "^0.6.13",
|
64
64
|
"glob": "^10.2.7",
|
65
|
-
"jest-image-snapshot": "^6.
|
65
|
+
"jest-image-snapshot": "^6.2.0",
|
66
66
|
"nunjucks": "^3.2.3",
|
67
|
-
"prettier": "^3.0.
|
67
|
+
"prettier": "^3.0.1",
|
68
68
|
"react": "^18.2.0",
|
69
69
|
"react-dom": "^18.2.0",
|
70
|
-
"sass": "^1.
|
70
|
+
"sass": "^1.64.2",
|
71
71
|
"sass-loader": "^13.0.2",
|
72
72
|
"simple-nunjucks-loader": "^3.2.0",
|
73
|
-
"storybook": "^7.2.
|
73
|
+
"storybook": "^7.2.1",
|
74
74
|
"style-loader": "^3.3.1",
|
75
|
-
"stylelint": "^15.
|
75
|
+
"stylelint": "^15.10.2",
|
76
76
|
"stylelint-config-standard-scss": "^10.0.0",
|
77
77
|
"stylelint-selector-bem-pattern": "^3.0.0",
|
78
|
-
"webpack": "^5.
|
78
|
+
"webpack": "^5.88.2",
|
79
79
|
"webpack-cli": "^5.1.4"
|
80
80
|
}
|
81
81
|
}
|