@nationalarchives/frontend 0.1.58 → 0.1.59
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/analytics.js +1 -1
- package/nationalarchives/analytics.js.map +1 -1
- package/nationalarchives/analytics.mjs +1 -1
- package/nationalarchives/components/accordion/accordion.css.map +1 -1
- package/nationalarchives/components/accordion/macro-options.json +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/nationalarchives/components/button/button.css.map +1 -1
- package/nationalarchives/components/card/card.css.map +1 -1
- package/nationalarchives/components/card/macro-options.json +6 -0
- package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -1
- package/nationalarchives/components/compound-filters/compound-filters.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/date-input/date-input.css.map +1 -1
- package/nationalarchives/components/date-search/date-search.css.map +1 -1
- package/nationalarchives/components/details/details.css.map +1 -1
- 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.map +1 -1
- package/nationalarchives/components/footer/footer.css.map +1 -1
- package/nationalarchives/components/footer/footer.js +1 -1
- package/nationalarchives/components/footer/footer.js.map +1 -1
- package/nationalarchives/components/gallery/gallery.css.map +1 -1
- package/nationalarchives/components/gallery/gallery.js +1 -1
- package/nationalarchives/components/gallery/gallery.js.map +1 -1
- package/nationalarchives/components/global-header/global-header.css.map +1 -1
- package/nationalarchives/components/header/header.css.map +1 -1
- package/nationalarchives/components/hero/hero.css +1 -1
- package/nationalarchives/components/hero/hero.css.map +1 -1
- package/nationalarchives/components/hero/hero.scss +24 -0
- package/nationalarchives/components/index-grid/fixtures.json +37 -0
- package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
- package/nationalarchives/components/index-grid/index-grid.stories.js +3 -0
- package/nationalarchives/components/index-grid/macro-options.json +6 -0
- package/nationalarchives/components/index-grid/template.njk +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
- package/nationalarchives/components/picture/picture.css.map +1 -1
- package/nationalarchives/components/picture/picture.js +1 -1
- package/nationalarchives/components/picture/picture.js.map +1 -1
- package/nationalarchives/components/picture/picture.mjs +0 -4
- package/nationalarchives/components/quick-filters/quick-filters.css.map +1 -1
- package/nationalarchives/components/radios/radios.css.map +1 -1
- package/nationalarchives/components/search-field/search-field.css.map +1 -1
- package/nationalarchives/components/search-filters/search-filters.css.map +1 -1
- package/nationalarchives/components/select/select.css.map +1 -1
- package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
- package/nationalarchives/components/tabs/tabs.css.map +1 -1
- package/nationalarchives/components/tabs/tabs.js +1 -1
- package/nationalarchives/components/tabs/tabs.js.map +1 -1
- package/nationalarchives/components/text-input/text-input.css.map +1 -1
- package/nationalarchives/components/textarea/textarea.css.map +1 -1
- package/nationalarchives/components/warning/warning.css.map +1 -1
- package/nationalarchives/global-header-package.css +1 -1
- package/nationalarchives/global-header-package.css.map +1 -1
- 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 +4 -4
- package/nationalarchives/stories/utilities/lists/lists.stories.js +31 -7
- package/nationalarchives/tools/_colour.scss +4 -0
- package/nationalarchives/utilities/_lists.scss +20 -19
- package/nationalarchives/variables/_colour.scss +0 -2
- package/package.json +12 -12
@@ -17,20 +17,20 @@ const Template = ({ theme }) => {
|
|
17
17
|
|
18
18
|
const accents = [
|
19
19
|
"",
|
20
|
-
"tna-accent-black",
|
21
|
-
"tna-accent-yellow",
|
22
20
|
"tna-accent-pink",
|
23
21
|
"tna-accent-orange",
|
22
|
+
"tna-accent-yellow",
|
24
23
|
"tna-accent-green",
|
25
24
|
"tna-accent-blue",
|
25
|
+
"tna-accent-black",
|
26
26
|
];
|
27
27
|
|
28
28
|
const blocks = [
|
29
29
|
"",
|
30
30
|
"tna-background-tint",
|
31
|
-
"tna-background-accent-light",
|
32
|
-
"tna-background-accent",
|
33
31
|
"tna-background-contrast",
|
32
|
+
"tna-background-accent",
|
33
|
+
"tna-background-accent-light",
|
34
34
|
];
|
35
35
|
|
36
36
|
return `<div class="tna-colour-contrast-demo">
|
@@ -9,8 +9,8 @@ export default {
|
|
9
9
|
argTypes,
|
10
10
|
};
|
11
11
|
|
12
|
-
const UnorderedListTemplate = ({ items,
|
13
|
-
`<ul class="tna-ul${
|
12
|
+
const UnorderedListTemplate = ({ items, style, classes = "" }) =>
|
13
|
+
`<ul class="tna-ul${style ? ` tna-ul--${style}` : ""} ${classes}">${items.reduce(
|
14
14
|
(list, item) => `${list}<li>${item}</li>`,
|
15
15
|
"",
|
16
16
|
)}</ul>`;
|
@@ -27,11 +27,19 @@ UnorderedListPlain.parameters = {
|
|
27
27
|
};
|
28
28
|
UnorderedListPlain.args = {
|
29
29
|
items: ["Alpha", "Beta", "Gamma"],
|
30
|
-
|
30
|
+
style: "plain",
|
31
|
+
};
|
32
|
+
export const UnorderedListDashed = UnorderedListTemplate.bind({});
|
33
|
+
UnorderedListDashed.parameters = {
|
34
|
+
chromatic: { disableSnapshot: true },
|
35
|
+
};
|
36
|
+
UnorderedListDashed.args = {
|
37
|
+
items: ["Alpha", "Beta", "Gamma"],
|
38
|
+
style: "dashed",
|
31
39
|
};
|
32
40
|
|
33
|
-
const OrderedListTemplate = ({ items,
|
34
|
-
`<ol class="tna-ol${
|
41
|
+
const OrderedListTemplate = ({ items, style, classes = "" }) =>
|
42
|
+
`<ol class="tna-ol${style ? ` tna-ol--${style}` : ""} ${classes}">${items.reduce(
|
35
43
|
(list, item) => `${list}<li>${item}</li>`,
|
36
44
|
"",
|
37
45
|
)}</ol>`;
|
@@ -48,10 +56,26 @@ OrderedListPlain.parameters = {
|
|
48
56
|
};
|
49
57
|
OrderedListPlain.args = {
|
50
58
|
items: ["Alpha", "Beta", "Gamma"],
|
51
|
-
|
59
|
+
style: "plain",
|
60
|
+
};
|
61
|
+
export const OrderedListDashed = OrderedListTemplate.bind({});
|
62
|
+
OrderedListDashed.parameters = {
|
63
|
+
chromatic: { disableSnapshot: true },
|
64
|
+
};
|
65
|
+
OrderedListDashed.args = {
|
66
|
+
items: ["Alpha", "Beta", "Gamma"],
|
67
|
+
style: "dashed",
|
68
|
+
};
|
69
|
+
export const OrderedListNested = OrderedListTemplate.bind({});
|
70
|
+
OrderedListNested.parameters = {
|
71
|
+
chromatic: { disableSnapshot: true },
|
72
|
+
};
|
73
|
+
OrderedListNested.args = {
|
74
|
+
items: ["Alpha", "Beta", "Gamma", "Delta"],
|
75
|
+
style: "dashed",
|
52
76
|
};
|
53
77
|
|
54
|
-
const DescriptionListTemplate = ({ items, plain, classes }) =>
|
78
|
+
const DescriptionListTemplate = ({ items, plain, classes = "" }) =>
|
55
79
|
`<dl class="tna-dl${plain ? " tna-dl--plain" : ""}${
|
56
80
|
items.some((item) => item.icon) ? " tna-dl--icon-padding" : ""
|
57
81
|
} ${classes}">${items.reduce(
|
@@ -173,6 +173,7 @@
|
|
173
173
|
--button-hover-text: var(--contrast-button-hover-text);
|
174
174
|
--button-hover-background: var(--contrast-button-hover-background);
|
175
175
|
--accent-list-marker: var(--accent-border);
|
176
|
+
// --accent-list-marker: var(--font-base);
|
176
177
|
|
177
178
|
@include colour-background("background");
|
178
179
|
|
@@ -199,6 +200,7 @@
|
|
199
200
|
--button-hover-text: var(--contrast-button-hover-text);
|
200
201
|
--button-hover-background: var(--contrast-button-hover-background);
|
201
202
|
--accent-list-marker: var(--accent-border);
|
203
|
+
// --accent-list-marker: var(--font-base);
|
202
204
|
|
203
205
|
@include colour-background("background");
|
204
206
|
|
@@ -359,6 +361,8 @@
|
|
359
361
|
--accent-background-light: #{colour.brand-colour("light-grey")} !important;
|
360
362
|
--accent-border: #{colour.brand-colour("black")} !important;
|
361
363
|
--accent-list-marker: #{colour.brand-colour("black")} !important;
|
364
|
+
--button-background: #{colour.brand-colour("light-grey")} !important;
|
365
|
+
--button-text: #{colour.brand-colour("black")} !important;
|
362
366
|
--button-accent-text: #{colour.brand-colour("black")} !important;
|
363
367
|
--button-accent-background: #{colour.brand-colour("grey")} !important;
|
364
368
|
}
|
@@ -4,8 +4,7 @@
|
|
4
4
|
@use "../tools/typography";
|
5
5
|
@use "../utilities/typography" as typographyUtils;
|
6
6
|
|
7
|
-
.tna-ul
|
8
|
-
.tna-ul > li > ul {
|
7
|
+
.tna-ul {
|
9
8
|
list-style-type: disc;
|
10
9
|
}
|
11
10
|
|
@@ -13,33 +12,35 @@
|
|
13
12
|
.tna-ol {
|
14
13
|
margin: spacing.space(1) 0 0;
|
15
14
|
|
16
|
-
|
17
|
-
|
15
|
+
padding: 0 0 0 spacing.space(2);
|
16
|
+
|
17
|
+
&:first-child {
|
18
18
|
margin-top: 0;
|
19
19
|
}
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
& > li > ol {
|
24
|
-
padding: 0 0 0 spacing.space(2);
|
21
|
+
&--plain {
|
22
|
+
padding-left: 0;
|
25
23
|
|
26
|
-
|
27
|
-
|
24
|
+
list-style: none;
|
25
|
+
}
|
28
26
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
}
|
33
|
-
}
|
27
|
+
& > li > & {
|
28
|
+
padding-left: spacing.space(1);
|
29
|
+
}
|
34
30
|
|
35
|
-
|
31
|
+
> li {
|
32
|
+
&::marker {
|
36
33
|
@include colour.colour-font("accent-list-marker");
|
37
|
-
font-weight
|
34
|
+
@include typography.main-font-weight-bold;
|
38
35
|
}
|
39
36
|
}
|
40
37
|
|
41
|
-
|
42
|
-
|
38
|
+
&--dashed {
|
39
|
+
> li::marker {
|
40
|
+
content: "— ";
|
41
|
+
@include colour.colour-font("font-light");
|
42
|
+
@include typography.main-font-weight;
|
43
|
+
}
|
43
44
|
}
|
44
45
|
}
|
45
46
|
|
@@ -127,8 +127,6 @@ $colour-palette-dark: map.merge(
|
|
127
127
|
"button-hover-text": brand-colour("white"),
|
128
128
|
"button-hover-background": brand-colour("black"),
|
129
129
|
"contrast-background": #101112,
|
130
|
-
"contrast-link-visited":
|
131
|
-
map.get($colour-palette-default, "contrast-link-visited"),
|
132
130
|
"accent-border": brand-colour("white"),
|
133
131
|
"accent-list-marker": brand-colour("white", 0.51),
|
134
132
|
)
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nationalarchives/frontend",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.59",
|
4
4
|
"description": "The National Archives frontend styles",
|
5
5
|
"scripts": {
|
6
6
|
"start": "storybook dev -p 6006",
|
@@ -47,16 +47,16 @@
|
|
47
47
|
"@babel/core": "^7.24.5",
|
48
48
|
"@babel/preset-env": "^7.24.5",
|
49
49
|
"@mdx-js/react": "^3.0.0",
|
50
|
-
"@storybook/addon-a11y": "^8.
|
51
|
-
"@storybook/addon-docs": "^8.
|
52
|
-
"@storybook/addon-essentials": "^8.
|
53
|
-
"@storybook/addon-interactions": "^8.
|
54
|
-
"@storybook/addon-links": "^8.
|
55
|
-
"@storybook/addon-mdx-gfm": "^8.
|
56
|
-
"@storybook/html": "^8.
|
57
|
-
"@storybook/html-webpack5": "^8.
|
58
|
-
"@storybook/test": "^8.
|
59
|
-
"@storybook/test-runner": "^0.
|
50
|
+
"@storybook/addon-a11y": "^8.1.8",
|
51
|
+
"@storybook/addon-docs": "^8.1.8",
|
52
|
+
"@storybook/addon-essentials": "^8.1.8",
|
53
|
+
"@storybook/addon-interactions": "^8.1.8",
|
54
|
+
"@storybook/addon-links": "^8.1.8",
|
55
|
+
"@storybook/addon-mdx-gfm": "^8.1.8",
|
56
|
+
"@storybook/html": "^8.1.8",
|
57
|
+
"@storybook/html-webpack5": "^8.1.8",
|
58
|
+
"@storybook/test": "^8.1.8",
|
59
|
+
"@storybook/test-runner": "^0.18.2",
|
60
60
|
"axe-playwright": "^2.0.1",
|
61
61
|
"babel-jest": "^29.7.0",
|
62
62
|
"babel-loader": "^9.0.1",
|
@@ -76,7 +76,7 @@
|
|
76
76
|
"sass": "^1.77.0",
|
77
77
|
"sass-loader": "^14.2.1",
|
78
78
|
"simple-nunjucks-loader": "^3.2.0",
|
79
|
-
"storybook": "^8.
|
79
|
+
"storybook": "^8.1.8",
|
80
80
|
"style-loader": "^4.0.0",
|
81
81
|
"stylelint": "^16.5.0",
|
82
82
|
"stylelint-config-standard-scss": "^13.0.0",
|