@nationalarchives/frontend 0.1.29-prerelease → 0.1.31
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 +2 -2
- package/nationalarchives/all.css +2 -2
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/assets/images/tna-square-logo.svg +3 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
- package/nationalarchives/components/button/button.css +1 -1
- package/nationalarchives/components/button/button.css.map +1 -1
- package/nationalarchives/components/button/button.scss +6 -6
- package/nationalarchives/components/button/template.njk +7 -7
- package/nationalarchives/components/card/card.css +1 -1
- package/nationalarchives/components/card/card.css.map +1 -1
- package/nationalarchives/components/card/template.njk +2 -2
- package/nationalarchives/components/checkboxes/checkboxes.css +1 -1
- package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -1
- package/nationalarchives/components/cookie-banner/README.md +77 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.css +1 -1
- 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 +14 -13
- package/nationalarchives/components/cookie-banner/fixtures.json +10 -10
- package/nationalarchives/components/cookie-banner/template.njk +3 -2
- 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/featured-records/featured-records.css +1 -1
- package/nationalarchives/components/featured-records/featured-records.css.map +1 -1
- package/nationalarchives/components/filters/filters.css +1 -1
- package/nationalarchives/components/filters/filters.css.map +1 -1
- package/nationalarchives/components/footer/fixtures.json +1 -1
- package/nationalarchives/components/footer/footer.css +1 -1
- package/nationalarchives/components/footer/footer.css.map +1 -1
- package/nationalarchives/components/footer/footer.scss +2 -5
- package/nationalarchives/components/gallery/gallery.css +1 -1
- package/nationalarchives/components/gallery/gallery.css.map +1 -1
- package/nationalarchives/components/grid/grid.css +1 -1
- package/nationalarchives/components/grid/grid.css.map +1 -1
- package/nationalarchives/components/header/header.css +1 -1
- package/nationalarchives/components/header/header.css.map +1 -1
- package/nationalarchives/components/hero/fixtures.json +8 -8
- package/nationalarchives/components/hero/hero.css +1 -1
- package/nationalarchives/components/hero/hero.css.map +1 -1
- package/nationalarchives/components/hero/hero.scss +1 -1
- package/nationalarchives/components/hero/template.njk +2 -4
- package/nationalarchives/components/index-grid/index-grid.css +1 -1
- package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
- package/nationalarchives/components/message/fixtures.json +1 -1
- package/nationalarchives/components/message/message.css +1 -1
- package/nationalarchives/components/message/message.css.map +1 -1
- package/nationalarchives/components/message/template.njk +2 -2
- package/nationalarchives/components/pagination/fixtures.json +1 -1
- package/nationalarchives/components/pagination/pagination.css +1 -1
- package/nationalarchives/components/pagination/pagination.css.map +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.css +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
- package/nationalarchives/components/picture/fixtures.json +74 -4
- package/nationalarchives/components/picture/macro-options.json +30 -4
- package/nationalarchives/components/picture/picture.css +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 +10 -4
- package/nationalarchives/components/picture/picture.scss +32 -3
- package/nationalarchives/components/picture/picture.stories.js +21 -8
- package/nationalarchives/components/picture/template.njk +6 -19
- package/nationalarchives/components/radios/radios.css +1 -1
- package/nationalarchives/components/radios/radios.css.map +1 -1
- package/nationalarchives/components/search-field/fixtures.json +3 -3
- 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-field/template.njk +0 -2
- 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/skip-link/skip-link.css +1 -1
- package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
- package/nationalarchives/components/tabs/tabs.css +1 -1
- package/nationalarchives/components/tabs/tabs.css.map +1 -1
- 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/lib/cookies.mjs +3 -2
- package/nationalarchives/prototype-kit.css +2 -2
- package/nationalarchives/prototype-kit.css.map +1 -1
- package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +43 -6
- package/nationalarchives/stories/utilities/lists/lists.stories.js +26 -6
- package/nationalarchives/stories/utilities/typography/typography.mdx +2 -1
- package/nationalarchives/tests/cookies.test.js +39 -0
- package/nationalarchives/utilities/_lists.scss +52 -29
- package/nationalarchives/utilities/_typography.scss +49 -94
- package/package.json +1 -5
@@ -385,10 +385,19 @@ const Template = ({ theme, accent }) => {
|
|
385
385
|
<a href="#" class="tna-chip">Chip 1</a>
|
386
386
|
</li>
|
387
387
|
<li class="tna-chip-list__item">
|
388
|
-
<a href="#" class="tna-chip">
|
388
|
+
<a href="#" class="tna-chip">
|
389
|
+
<i class="fa-solid fa-heart"></i>
|
390
|
+
Chip 2
|
391
|
+
</a>
|
389
392
|
</li>
|
390
393
|
<li class="tna-chip-list__item">
|
391
|
-
<a href="#" class="tna-chip">Chip 3</a>
|
394
|
+
<a href="#" class="tna-chip tna-chip--plain">Chip 3</a>
|
395
|
+
</li>
|
396
|
+
<li class="tna-chip-list__item">
|
397
|
+
<a href="#" class="tna-chip tna-chip--plain">
|
398
|
+
<i class="fa-solid fa-heart"></i>
|
399
|
+
Chip 4
|
400
|
+
</a>
|
392
401
|
</li>
|
393
402
|
</ul>
|
394
403
|
${Message({
|
@@ -549,8 +558,18 @@ const Template = ({ theme, accent }) => {
|
|
549
558
|
width: 499,
|
550
559
|
height: 333,
|
551
560
|
caption: "<p>This is a pretty image</p>",
|
552
|
-
|
553
|
-
|
561
|
+
information: [
|
562
|
+
{
|
563
|
+
id: "transcript",
|
564
|
+
title: "Transcript",
|
565
|
+
body: "<p>Lorem ipsum transcript</p>",
|
566
|
+
},
|
567
|
+
{
|
568
|
+
id: "translation",
|
569
|
+
title: "Translation",
|
570
|
+
body: "<p>Lorem ipsum translation</p>",
|
571
|
+
},
|
572
|
+
],
|
554
573
|
classes: "tna-picture--demo",
|
555
574
|
},
|
556
575
|
})}
|
@@ -1395,9 +1414,27 @@ const CombinationsTemplate = () => {
|
|
1395
1414
|
`${blockOutput}<div class="tna-colour-contrast-demo__example tna-template ${theme} ${accent}">
|
1396
1415
|
<div class="tna-template__body">
|
1397
1416
|
<div class="tna-colour-contrast-demo__example-content ${block}">
|
1398
|
-
<p><strong>Text / <span class="dark-text">Dark</span> / <span class="light-text">Light</span></strong></p>
|
1417
|
+
<p><strong>Text / <span class="dark-text">Dark</span> / <span class="light-text">Light</span></strong> / <i class="fa-solid fa-heart"></i> <i class="fa-solid fa-heart light-icon"></i></p>
|
1399
1418
|
<p><a href="#"><strong>Link</strong></a> / <a href="#" class="tna-colour-contrast-demo__link--visited"><strong>Link (visited)</strong></a></p>
|
1400
|
-
|
1419
|
+
<!--
|
1420
|
+
<span class="tna-chip">Chip</span>
|
1421
|
+
<a href="#" class="tna-chip">Chip</a>
|
1422
|
+
<a href="#" class="tna-chip"><i class="fa-solid fa-heart"></i>Chip</a>
|
1423
|
+
<a href="#" class="tna-chip tna-chip--plain"><i class="fa-solid fa-heart"></i>Chip</a>
|
1424
|
+
<span class="tna-chip"><i class="fa-solid fa-heart"></i>Chip</span>
|
1425
|
+
<span class="tna-chip tna-chip--plain">Chip</span>
|
1426
|
+
-->
|
1427
|
+
<ul class="tna-chip-list">
|
1428
|
+
<li class="tna-chip-list__item">
|
1429
|
+
<span class="tna-chip">Chip</span>
|
1430
|
+
</li>
|
1431
|
+
<li class="tna-chip-list__item">
|
1432
|
+
<span class="tna-chip"><i class="fa-solid fa-heart"></i>Chip</span>
|
1433
|
+
</li>
|
1434
|
+
<li class="tna-chip-list__item">
|
1435
|
+
<span class="tna-chip tna-chip--plain"><i class="fa-solid fa-heart"></i>Chip</span>
|
1436
|
+
</li>
|
1437
|
+
</ul>
|
1401
1438
|
<div class="tna-button-group">
|
1402
1439
|
${Button({
|
1403
1440
|
params: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
const argTypes = {
|
2
2
|
items: { control: "object" },
|
3
3
|
plain: { control: "boolean" },
|
4
|
+
classes: { control: "text" },
|
4
5
|
};
|
5
6
|
|
6
7
|
export default {
|
@@ -8,8 +9,8 @@ export default {
|
|
8
9
|
argTypes,
|
9
10
|
};
|
10
11
|
|
11
|
-
const UnorderedListTemplate = ({ items, plain }) =>
|
12
|
-
`<ul class="tna-ul${plain ? " tna-ul--plain" : ""}">${items.reduce(
|
12
|
+
const UnorderedListTemplate = ({ items, plain, classes }) =>
|
13
|
+
`<ul class="tna-ul${plain ? " tna-ul--plain" : ""} ${classes}">${items.reduce(
|
13
14
|
(list, item) => `${list}<li>${item}</li>`,
|
14
15
|
"",
|
15
16
|
)}</ul>`;
|
@@ -23,8 +24,8 @@ UnorderedListPlain.args = {
|
|
23
24
|
plain: true,
|
24
25
|
};
|
25
26
|
|
26
|
-
const OrderedListTemplate = ({ items, plain }) =>
|
27
|
-
`<ol class="tna-ol${plain ? " tna-ol--plain" : ""}">${items.reduce(
|
27
|
+
const OrderedListTemplate = ({ items, plain, classes }) =>
|
28
|
+
`<ol class="tna-ol${plain ? " tna-ol--plain" : ""} ${classes}">${items.reduce(
|
28
29
|
(list, item) => `${list}<li>${item}</li>`,
|
29
30
|
"",
|
30
31
|
)}</ol>`;
|
@@ -38,10 +39,10 @@ OrderedListPlain.args = {
|
|
38
39
|
plain: true,
|
39
40
|
};
|
40
41
|
|
41
|
-
const DescriptionListTemplate = ({ items, plain }) =>
|
42
|
+
const DescriptionListTemplate = ({ items, plain, classes }) =>
|
42
43
|
`<dl class="tna-dl${plain ? " tna-dl--plain" : ""}${
|
43
44
|
items.some((item) => item.icon) ? " tna-dl--icon-padding" : ""
|
44
|
-
}">${items.reduce(
|
45
|
+
} ${classes}">${items.reduce(
|
45
46
|
(list, item) => `${list}
|
46
47
|
<dt>
|
47
48
|
${item.icon ? `<i class="fa-solid fa-${item.icon}"></i>` : ""}
|
@@ -129,3 +130,22 @@ ComplexDescriptionList.args = {
|
|
129
130
|
{ title: "Eta", description: ["Lorem ipsum 1", "Lorem ipsum 2"] },
|
130
131
|
],
|
131
132
|
};
|
133
|
+
|
134
|
+
const ChipListTemplate = ({ items, plain, classes }) =>
|
135
|
+
`<ul class="tna-chip-list ${classes}">${items.reduce(
|
136
|
+
(list, item) => `${list}<li class="tna-chip-list__item">
|
137
|
+
<span class="tna-chip${plain ? " tna-chip--plain" : ""}">
|
138
|
+
${item.icon ? `<i class="fa-solid fa-${item.icon}"></i>` : ""}
|
139
|
+
${item.text}
|
140
|
+
</span>
|
141
|
+
</li>`,
|
142
|
+
"",
|
143
|
+
)}</ul>`;
|
144
|
+
export const ChipList = ChipListTemplate.bind({});
|
145
|
+
ChipList.args = {
|
146
|
+
items: [
|
147
|
+
{ text: "Alpha", icon: "heart" },
|
148
|
+
{ text: "Beta" },
|
149
|
+
{ text: "Gamma" },
|
150
|
+
],
|
151
|
+
};
|
@@ -15,7 +15,8 @@ import * as TypographyStories from './typography.stories';
|
|
15
15
|
## Heading groups
|
16
16
|
|
17
17
|
<Canvas of={HeadingGroupStories.HeadingGroup} />
|
18
|
-
<Canvas of={HeadingGroupStories.
|
18
|
+
<Canvas of={HeadingGroupStories.HeadingGroupSingleSentence} />
|
19
|
+
<Canvas of={HeadingGroupStories.HeadingGroupPlainSupertitle} />
|
19
20
|
|
20
21
|
## General typography
|
21
22
|
|
@@ -356,6 +356,45 @@ describe("No existing cookies", () => {
|
|
356
356
|
cookies2.set(testKey, testValue);
|
357
357
|
expect(mockCallback.mock.calls).toHaveLength(3);
|
358
358
|
});
|
359
|
+
|
360
|
+
test("Custom policies", async () => {
|
361
|
+
const cookies = new Cookies({ extraPolicies: ["custom"] });
|
362
|
+
|
363
|
+
expect(cookies.policies).toHaveProperty("essential");
|
364
|
+
expect(cookies.policies).toHaveProperty("settings");
|
365
|
+
expect(cookies.policies).toHaveProperty("usage");
|
366
|
+
expect(cookies.policies).toHaveProperty("custom");
|
367
|
+
expect(cookies.policies.custom).toEqual(false);
|
368
|
+
expect(cookies.isPolicyAccepted("custom")).toEqual(false);
|
369
|
+
|
370
|
+
cookies.acceptPolicy("custom");
|
371
|
+
expect(cookies.policies.custom).toEqual(true);
|
372
|
+
expect(cookies.isPolicyAccepted("custom")).toEqual(true);
|
373
|
+
|
374
|
+
cookies.rejectPolicy("custom");
|
375
|
+
expect(cookies.policies.custom).toEqual(false);
|
376
|
+
expect(cookies.isPolicyAccepted("custom")).toEqual(false);
|
377
|
+
|
378
|
+
cookies.acceptAllPolicies();
|
379
|
+
expect(cookies.policies.custom).toEqual(true);
|
380
|
+
expect(cookies.isPolicyAccepted("custom")).toEqual(true);
|
381
|
+
|
382
|
+
cookies.rejectAllPolicies();
|
383
|
+
expect(cookies.policies.custom).toEqual(false);
|
384
|
+
expect(cookies.isPolicyAccepted("custom")).toEqual(false);
|
385
|
+
});
|
386
|
+
|
387
|
+
test("Custom policy key", async () => {
|
388
|
+
const cookies = new Cookies({ policiesKey: ["custom"] });
|
389
|
+
|
390
|
+
expect(cookies.all).not.toHaveProperty("cookies_policy");
|
391
|
+
expect(cookies.all).toHaveProperty("custom");
|
392
|
+
|
393
|
+
expect(cookies.policies.settings).toEqual(false);
|
394
|
+
|
395
|
+
cookies.acceptAllPolicies();
|
396
|
+
expect(cookies.policies.settings).toEqual(true);
|
397
|
+
});
|
359
398
|
});
|
360
399
|
|
361
400
|
describe("Existing cookies", () => {
|
@@ -29,6 +29,46 @@
|
|
29
29
|
}
|
30
30
|
}
|
31
31
|
|
32
|
+
@mixin stacked-dl {
|
33
|
+
dt,
|
34
|
+
dd {
|
35
|
+
width: 100%;
|
36
|
+
margin-left: 0;
|
37
|
+
}
|
38
|
+
|
39
|
+
dd {
|
40
|
+
padding-left: 1rem;
|
41
|
+
}
|
42
|
+
|
43
|
+
&.tna-dl--plain {
|
44
|
+
dt {
|
45
|
+
padding-top: 0;
|
46
|
+
padding-bottom: 0;
|
47
|
+
|
48
|
+
.fa-solid {
|
49
|
+
margin-top: 0;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
dd {
|
54
|
+
margin-left: 0;
|
55
|
+
padding-top: 0;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
&:not(.tna-dl--plain) {
|
60
|
+
dt {
|
61
|
+
@include colour.colour-background("background-tint");
|
62
|
+
}
|
63
|
+
|
64
|
+
dd {
|
65
|
+
background: transparent !important;
|
66
|
+
|
67
|
+
margin-left: 0;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
32
72
|
.tna-dl {
|
33
73
|
margin: 1rem 0 0;
|
34
74
|
|
@@ -53,11 +93,16 @@
|
|
53
93
|
|
54
94
|
&--plain {
|
55
95
|
dt {
|
96
|
+
padding-top: 0;
|
97
|
+
// padding-bottom: 0;
|
56
98
|
padding-left: 0;
|
57
99
|
}
|
58
100
|
|
59
101
|
dd {
|
102
|
+
// margin-bottom: 0.5rem;
|
103
|
+
padding-top: 0;
|
60
104
|
padding-right: 0;
|
105
|
+
// padding-bottom: 0;
|
61
106
|
}
|
62
107
|
}
|
63
108
|
|
@@ -101,6 +146,8 @@
|
|
101
146
|
padding-left: 2rem !important;
|
102
147
|
|
103
148
|
.fa-solid {
|
149
|
+
margin-top: -0.25rem;
|
150
|
+
|
104
151
|
left: 0;
|
105
152
|
}
|
106
153
|
}
|
@@ -132,36 +179,12 @@
|
|
132
179
|
}
|
133
180
|
}
|
134
181
|
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
width: 100%;
|
139
|
-
margin-left: 0;
|
140
|
-
}
|
141
|
-
|
142
|
-
dd {
|
143
|
-
padding-left: 1rem;
|
144
|
-
}
|
145
|
-
|
146
|
-
&--plain {
|
147
|
-
dt {
|
148
|
-
padding-bottom: 0;
|
149
|
-
}
|
150
|
-
|
151
|
-
dd {
|
152
|
-
padding-top: 0;
|
153
|
-
}
|
154
|
-
}
|
155
|
-
|
156
|
-
&:not(&--plain) {
|
157
|
-
dt {
|
158
|
-
@include colour.colour-background("background-tint");
|
159
|
-
}
|
182
|
+
&--stacked {
|
183
|
+
@include stacked-dl;
|
184
|
+
}
|
160
185
|
|
161
|
-
|
162
|
-
|
163
|
-
}
|
164
|
-
}
|
186
|
+
@include media.on-tiny {
|
187
|
+
@include stacked-dl;
|
165
188
|
}
|
166
189
|
|
167
190
|
@include colour.on-high-contrast-and-forced-colours {
|
@@ -41,7 +41,6 @@
|
|
41
41
|
// font-display: swap;
|
42
42
|
}
|
43
43
|
} @else {
|
44
|
-
// @import "https://use.typekit.net/hkj3kuz.css";
|
45
44
|
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@#{typographyVars.$main-font-weight};#{typographyVars.$main-font-weight-bold}&family=Roboto+Mono:wght@#{typographyVars.$detail-font-weight};#{typographyVars.$detail-font-weight-bold}&display=swap"); /* stylelint-disable-line */
|
46
45
|
}
|
47
46
|
|
@@ -52,6 +51,7 @@
|
|
52
51
|
-webkit-font-smoothing: antialiased;
|
53
52
|
text-rendering: optimizeLegibility;
|
54
53
|
-webkit-text-size-adjust: none;
|
54
|
+
text-size-adjust: none;
|
55
55
|
direction: ltr;
|
56
56
|
}
|
57
57
|
|
@@ -107,16 +107,6 @@ a {
|
|
107
107
|
}
|
108
108
|
}
|
109
109
|
|
110
|
-
// @include colour.on-high-contrast {
|
111
|
-
// &:active {
|
112
|
-
// box-shadow: none;
|
113
|
-
// }
|
114
|
-
|
115
|
-
// &:hover:not(:focus) {
|
116
|
-
// box-shadow: 0 0 0 0.3125rem var(--focus-outline);
|
117
|
-
// }
|
118
|
-
// }
|
119
|
-
|
120
110
|
// &[target="_blank"]:not([title*="opens in a new"]) {
|
121
111
|
// &::after {
|
122
112
|
// content: "" / " (opens in a new window)"
|
@@ -130,59 +120,73 @@ small {
|
|
130
120
|
);
|
131
121
|
}
|
132
122
|
|
133
|
-
%chip {
|
123
|
+
%chip-base {
|
134
124
|
max-width: max-content;
|
135
125
|
padding: 0.125em 0.25rem;
|
136
126
|
|
137
|
-
display:
|
127
|
+
display: flex;
|
128
|
+
align-items: center;
|
129
|
+
gap: 0.5rem;
|
138
130
|
|
139
|
-
@include colour.colour-font("font-
|
131
|
+
@include colour.colour-font("font-base");
|
140
132
|
@include typography.detail-font-small;
|
141
133
|
line-height: 1;
|
134
|
+
}
|
135
|
+
|
136
|
+
%chip-plain {
|
137
|
+
padding: 0;
|
138
|
+
|
139
|
+
background-color: transparent;
|
142
140
|
|
141
|
+
border: none;
|
142
|
+
}
|
143
|
+
|
144
|
+
%chip-accent {
|
143
145
|
@include colour.accent;
|
144
146
|
|
145
147
|
@include colour.colour-border("accent-background", 0.125rem);
|
146
148
|
|
147
|
-
.tna-background-accent
|
148
|
-
@include colour.
|
149
|
+
.tna-background-accent & {
|
150
|
+
@include colour.contrast;
|
149
151
|
|
150
|
-
@include colour.colour-border("background");
|
152
|
+
@include colour.colour-border("contrast-background");
|
151
153
|
}
|
152
154
|
}
|
153
155
|
|
154
156
|
.tna-chip {
|
155
|
-
@extend %chip;
|
157
|
+
@extend %chip-base;
|
156
158
|
|
157
159
|
&--plain {
|
158
|
-
|
160
|
+
@extend %chip-plain;
|
161
|
+
}
|
159
162
|
|
160
|
-
|
163
|
+
&:not(#{&}--plain) {
|
164
|
+
@extend %chip-accent;
|
165
|
+
}
|
161
166
|
|
162
|
-
|
167
|
+
.fa-solid,
|
168
|
+
.fa-brand {
|
169
|
+
@include colour.colour-font("icon-light");
|
170
|
+
|
171
|
+
@include colour.on-high-contrast {
|
172
|
+
padding-right: 0.5rem;
|
163
173
|
|
164
|
-
|
174
|
+
color: inherit;
|
175
|
+
|
176
|
+
@include colour.colour-border("keyline-dark", 1px, solid, right);
|
177
|
+
}
|
165
178
|
}
|
166
179
|
|
167
180
|
@at-root #{selector.unify("a", &)} {
|
168
181
|
text-decoration: none;
|
169
182
|
|
170
|
-
&,
|
171
|
-
&:link,
|
172
|
-
&:visited {
|
173
|
-
@include colour.colour-font("font-dark");
|
174
|
-
}
|
175
|
-
|
176
183
|
&:hover {
|
177
184
|
@include typography.interacted-text-decoration;
|
178
185
|
}
|
179
186
|
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
&:visited {
|
184
|
-
color: inherit;
|
185
|
-
}
|
187
|
+
.fa-solid,
|
188
|
+
.fa-brand {
|
189
|
+
color: inherit;
|
186
190
|
}
|
187
191
|
}
|
188
192
|
}
|
@@ -199,50 +203,6 @@ small {
|
|
199
203
|
&__item {
|
200
204
|
display: flex;
|
201
205
|
align-items: center;
|
202
|
-
|
203
|
-
.tna-chip {
|
204
|
-
display: flex;
|
205
|
-
align-items: center;
|
206
|
-
gap: 0.5rem;
|
207
|
-
}
|
208
|
-
|
209
|
-
.fa-solid,
|
210
|
-
.fa-brand {
|
211
|
-
@include colour.colour-font("icon-light");
|
212
|
-
}
|
213
|
-
|
214
|
-
@include colour.on-high-contrast {
|
215
|
-
@include colour.colour-border("keyline-dark", 1px, solid);
|
216
|
-
|
217
|
-
.fa-solid,
|
218
|
-
.fa-brand {
|
219
|
-
padding: 0.375rem 0.25rem;
|
220
|
-
|
221
|
-
@include colour.colour-font("contrast-font-base");
|
222
|
-
|
223
|
-
@include colour.colour-background("contrast-background");
|
224
|
-
|
225
|
-
@include colour.colour-border("keyline-dark", 1px, solid, right);
|
226
|
-
}
|
227
|
-
|
228
|
-
.tna-chip {
|
229
|
-
&:has(.fa-solid, .fa-brand) {
|
230
|
-
padding-left: 0;
|
231
|
-
|
232
|
-
.fa-solid,
|
233
|
-
.fa-brand {
|
234
|
-
margin-right: 0.5rem;
|
235
|
-
}
|
236
|
-
}
|
237
|
-
}
|
238
|
-
}
|
239
|
-
}
|
240
|
-
|
241
|
-
&--accent {
|
242
|
-
.fa-solid,
|
243
|
-
.fa-brand {
|
244
|
-
@include colour.colour-font("accent-background");
|
245
|
-
}
|
246
206
|
}
|
247
207
|
}
|
248
208
|
|
@@ -253,8 +213,7 @@ small {
|
|
253
213
|
a {
|
254
214
|
display: inline-block;
|
255
215
|
|
256
|
-
text-wrap: balance;
|
257
|
-
// text-decoration-thickness: .1em;
|
216
|
+
// text-wrap: balance;
|
258
217
|
|
259
218
|
&::after {
|
260
219
|
padding-left: 0.25rem;
|
@@ -266,13 +225,11 @@ small {
|
|
266
225
|
content: "\203A";
|
267
226
|
}
|
268
227
|
|
269
|
-
&:hover {
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
}
|
275
|
-
}
|
228
|
+
// &:hover {
|
229
|
+
// &::after {
|
230
|
+
// padding-left: 0.5rem;
|
231
|
+
// }
|
232
|
+
// }
|
276
233
|
}
|
277
234
|
}
|
278
235
|
}
|
@@ -376,16 +333,14 @@ small {
|
|
376
333
|
&__supertitle {
|
377
334
|
margin: 0 0 0.25rem;
|
378
335
|
|
379
|
-
@extend %chip;
|
336
|
+
@extend %chip-base;
|
380
337
|
|
381
338
|
&--plain {
|
382
|
-
|
383
|
-
|
384
|
-
color: inherit;
|
385
|
-
|
386
|
-
background-color: transparent;
|
339
|
+
@extend %chip-plain;
|
340
|
+
}
|
387
341
|
|
388
|
-
|
342
|
+
&:not(#{&}--plain) {
|
343
|
+
@extend %chip-accent;
|
389
344
|
}
|
390
345
|
}
|
391
346
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nationalarchives/frontend",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.31",
|
4
4
|
"description": "The National Archives frontend styles",
|
5
5
|
"scripts": {
|
6
6
|
"start": "storybook dev -p 6006",
|
@@ -34,10 +34,6 @@
|
|
34
34
|
"./nationalarchives/": "./nationalarchives/"
|
35
35
|
},
|
36
36
|
"sass": "nationalarchives/all.scss",
|
37
|
-
"engines": {
|
38
|
-
"npm": "9.x",
|
39
|
-
"node": "18.x"
|
40
|
-
},
|
41
37
|
"homepage": "https://github.com/nationalarchives/tna-frontend#readme",
|
42
38
|
"devDependencies": {
|
43
39
|
"@babel/core": "^7.23.2",
|