@nationalarchives/frontend 0.41.0 → 0.42.0
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/config/.htmlvalidate.json +2 -1
- package/nationalarchives/all+analytics.js +1 -1
- package/nationalarchives/all+analytics.js.map +1 -1
- package/nationalarchives/all+analytics.mjs +5 -3
- 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 +44 -30
- package/nationalarchives/analytics.js +1 -1
- package/nationalarchives/analytics.js.map +1 -1
- package/nationalarchives/analytics.mjs +39 -21
- package/nationalarchives/components/accordion/accordion.css +1 -1
- package/nationalarchives/components/accordion/accordion.css.map +1 -1
- package/nationalarchives/components/accordion/accordion.js +1 -1
- package/nationalarchives/components/accordion/accordion.js.map +1 -1
- package/nationalarchives/components/accordion/accordion.mjs +1 -1
- package/nationalarchives/components/back-link/back-link.css.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +2 -1
- package/nationalarchives/components/button/button.css +1 -1
- package/nationalarchives/components/button/button.css.map +1 -1
- package/nationalarchives/components/button/button.scss +2 -1
- package/nationalarchives/components/card/card.css +1 -1
- package/nationalarchives/components/card/card.css.map +1 -1
- package/nationalarchives/components/card/card.scss +4 -4
- package/nationalarchives/components/checkboxes/checkboxes.css +1 -1
- package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -1
- package/nationalarchives/components/checkboxes/checkboxes.scss +2 -2
- package/nationalarchives/components/checkboxes/fixtures.json +27 -0
- package/nationalarchives/components/checkboxes/macro-options.json +6 -0
- package/nationalarchives/components/checkboxes/template.njk +2 -2
- package/nationalarchives/components/code-block/code-block.css +1 -1
- package/nationalarchives/components/code-block/code-block.css.map +1 -1
- package/nationalarchives/components/code-block/code-block.js +1 -1
- package/nationalarchives/components/code-block/code-block.js.map +1 -1
- package/nationalarchives/components/code-block/code-block.mjs +2 -2
- package/nationalarchives/components/code-block/code-block.scss +6 -6
- package/nationalarchives/components/code-block/fixtures.json +6 -6
- package/nationalarchives/components/code-block/macro-options.json +1 -1
- package/nationalarchives/components/code-block/template.njk +12 -12
- 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 +2 -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/date-input/date-input.css.map +1 -1
- package/nationalarchives/components/date-input/date-input.js +1 -1
- package/nationalarchives/components/date-input/date-input.js.map +1 -1
- package/nationalarchives/components/date-input/date-input.mjs +5 -2
- package/nationalarchives/components/details/analytics.js +1 -1
- package/nationalarchives/components/details/details.css.map +1 -1
- package/nationalarchives/components/details/macro-options.json +1 -1
- package/nationalarchives/components/error-summary/error-summary.css.map +1 -1
- package/nationalarchives/components/error-summary/error-summary.js +1 -1
- package/nationalarchives/components/error-summary/error-summary.js.map +1 -1
- package/nationalarchives/components/error-summary/error-summary.mjs +19 -15
- package/nationalarchives/components/fieldset/fieldset.css.map +1 -1
- package/nationalarchives/components/file-input/analytics.js +3 -3
- package/nationalarchives/components/file-input/file-input.css.map +1 -1
- package/nationalarchives/components/file-input/file-input.js +1 -1
- package/nationalarchives/components/file-input/file-input.js.map +1 -1
- package/nationalarchives/components/file-input/file-input.mjs +33 -17
- package/nationalarchives/components/files-list/files-list.css +1 -1
- package/nationalarchives/components/files-list/files-list.css.map +1 -1
- package/nationalarchives/components/files-list/files-list.scss +8 -8
- package/nationalarchives/components/footer/fixtures.json +2 -2
- 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/footer/footer.mjs +2 -2
- package/nationalarchives/components/footer/template.njk +3 -3
- package/nationalarchives/components/gallery/analytics.js +1 -0
- 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/gallery/gallery.mjs +16 -4
- package/nationalarchives/components/global-header/global-header.css.map +1 -1
- package/nationalarchives/components/global-header/global-header.js +1 -1
- package/nationalarchives/components/global-header/global-header.js.map +1 -1
- package/nationalarchives/components/global-header/global-header.mjs +11 -11
- package/nationalarchives/components/global-header/global-header.scss +1 -0
- package/nationalarchives/components/header/header.css.map +1 -1
- package/nationalarchives/components/header/header.js +1 -1
- package/nationalarchives/components/header/header.js.map +1 -1
- package/nationalarchives/components/header/header.mjs +11 -11
- package/nationalarchives/components/hero/hero.css.map +1 -1
- 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/index-grid.scss +3 -3
- package/nationalarchives/components/pagination/pagination.css.map +1 -1
- package/nationalarchives/components/panel/panel.css.map +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 +4 -2
- package/nationalarchives/components/quick-filters/quick-filters.css.map +1 -1
- package/nationalarchives/components/radios/fixtures.json +27 -0
- package/nationalarchives/components/radios/macro-options.json +7 -1
- package/nationalarchives/components/radios/radios.css +1 -1
- package/nationalarchives/components/radios/radios.css.map +1 -1
- package/nationalarchives/components/radios/radios.scss +2 -2
- package/nationalarchives/components/radios/template.njk +2 -2
- package/nationalarchives/components/search-field/analytics.js +0 -1
- 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/search-field.scss +2 -2
- package/nationalarchives/components/secondary-navigation/secondary-navigation.css +1 -1
- package/nationalarchives/components/secondary-navigation/secondary-navigation.css.map +1 -1
- package/nationalarchives/components/secondary-navigation/secondary-navigation.scss +4 -3
- package/nationalarchives/components/sidebar/fixtures.json +69 -0
- package/nationalarchives/components/sidebar/macro-options.json +7 -0
- package/nationalarchives/components/sidebar/sidebar.css +1 -1
- package/nationalarchives/components/sidebar/sidebar.css.map +1 -1
- package/nationalarchives/components/sidebar/sidebar.js +2 -0
- package/nationalarchives/components/sidebar/sidebar.js.map +1 -0
- package/nationalarchives/components/sidebar/sidebar.mjs +97 -0
- package/nationalarchives/components/sidebar/sidebar.scss +2 -2
- package/nationalarchives/components/sidebar/template.njk +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.map +1 -1
- package/nationalarchives/components/tabs/tabs.js.map +1 -1
- package/nationalarchives/components/tabs/tabs.mjs +11 -3
- package/nationalarchives/components/text-input/analytics.js +1 -1
- package/nationalarchives/components/text-input/fixtures.json +14 -2
- package/nationalarchives/components/text-input/template.njk +1 -1
- package/nationalarchives/components/textarea/analytics.js +0 -1
- package/nationalarchives/components/textarea/textarea.css +1 -1
- package/nationalarchives/components/textarea/textarea.css.map +1 -1
- package/nationalarchives/components/textarea/textarea.js +1 -1
- package/nationalarchives/components/textarea/textarea.js.map +1 -1
- package/nationalarchives/components/textarea/textarea.mjs +19 -13
- package/nationalarchives/components/textarea/textarea.scss +2 -2
- package/nationalarchives/components/warning/warning.css +1 -1
- package/nationalarchives/components/warning/warning.css.map +1 -1
- package/nationalarchives/components/warning/warning.scss +2 -2
- package/nationalarchives/error-page.css +1 -1
- package/nationalarchives/error-page.css.map +1 -1
- package/nationalarchives/lib/analytics-helpers.mjs +21 -19
- package/nationalarchives/lib/cookie-events.mjs +70 -0
- package/nationalarchives/lib/cookies.mjs +54 -92
- package/nationalarchives/lib/helpers.mjs +7 -13
- package/nationalarchives/lib/uuid.mjs +5 -3
- package/nationalarchives/prototype-kit.css +1 -1
- package/nationalarchives/prototype-kit.css.map +1 -1
- package/nationalarchives/templates/fixtures.json +1 -1
- package/nationalarchives/templates/layouts/email.njk +2 -2
- package/nationalarchives/templates/prototype-kit/plain-with-sidebar.njk +74 -0
- package/nationalarchives/templates/prototype-kit/plain.njk +1 -1
- package/nationalarchives/tools/_grid.scss +3 -0
- package/nationalarchives/tools/_typography.scss +1 -1
- package/nationalarchives/utilities/reset/_index.scss +4 -0
- package/nationalarchives/utilities/tables/_index.scss +6 -5
- package/nationalarchives/utilities/typography/_index.scss +1 -0
- package/package.json +18 -22
- package/config/.eslintrc.js +0 -25
- package/config/stylelint.config.js +0 -244
- package/nationalarchives/templates/prototype-kit/index-grid.njk +0 -146
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"options": {
|
|
65
65
|
"subject": "Respond to a request to access a record",
|
|
66
66
|
"content": "<p>You have received a request to access the following record:</p><dl class=\"tna-dl tna-dl--plain\"><dt>Record IAID</dt><dd>C1234</dd><dt>Record name</dt><dd>Example record</dd></dl><p>Please review the request and either accept or reject it.</p>",
|
|
67
|
-
"
|
|
67
|
+
"ctaButtons": [
|
|
68
68
|
{
|
|
69
69
|
"text": "Accept this request",
|
|
70
70
|
"href": "#"
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
</tr>
|
|
58
58
|
{% endif %}
|
|
59
59
|
|
|
60
|
-
{% if
|
|
60
|
+
{% if ctaButtons is defined and ctaButtons %}
|
|
61
61
|
<tr>
|
|
62
62
|
<td style="padding:0 32px 32px;">
|
|
63
|
-
{% for button in
|
|
63
|
+
{% for button in ctaButtons %}
|
|
64
64
|
<table role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
|
|
65
65
|
<tr>
|
|
66
66
|
<td style="padding:0 0 12px 0;">
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{%- extends "nationalarchives/templates/prototype-kit/_base.njk" -%}
|
|
2
|
+
|
|
3
|
+
{%- from "nationalarchives/components/breadcrumbs/macro.njk" import tnaBreadcrumbs -%}
|
|
4
|
+
{%- from "nationalarchives/components/sidebar/macro.njk" import tnaSidebar -%}
|
|
5
|
+
|
|
6
|
+
{% set pageTitle = 'Plain page with sidebar' %}
|
|
7
|
+
{% set theme = 'light' %}
|
|
8
|
+
{% set themeAccent = 'blue' %}
|
|
9
|
+
|
|
10
|
+
{% block beforeContent %}
|
|
11
|
+
<div class="tna-container">
|
|
12
|
+
{{ tnaBreadcrumbs({
|
|
13
|
+
items: [
|
|
14
|
+
{
|
|
15
|
+
text: 'Home',
|
|
16
|
+
href: '/'
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
classes: 'tna-column tna-column--full tna-!--padding-top-s'
|
|
20
|
+
}) }}
|
|
21
|
+
</div>
|
|
22
|
+
{% endblock beforeContent %}
|
|
23
|
+
|
|
24
|
+
{% block content %}
|
|
25
|
+
<div class="tna-container tna-!--padding-top-l tna-!--padding-bottom-xl">
|
|
26
|
+
<div class="tna-column tna-column--full">
|
|
27
|
+
<h1 class="tna-heading-xl">{{ pageTitle }}</h1>
|
|
28
|
+
<p class="tna-large-paragraph">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet luctus libero. Cras nec mauris ex. Fusce nisl erat, efficitur sed auctor ornare, varius fermentum arcu.</p>
|
|
29
|
+
</div>
|
|
30
|
+
{% set sidebar_example_items = [
|
|
31
|
+
{
|
|
32
|
+
text: 'Alpha',
|
|
33
|
+
href: '#alpha'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
text: 'Beta',
|
|
37
|
+
href: '#beta'
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
text: 'Gamma',
|
|
41
|
+
href: '#gamma'
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
text: 'Delta',
|
|
45
|
+
href: '#delta'
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
text: 'Epsilon',
|
|
49
|
+
href: '#epsilon'
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
text: 'Zeta',
|
|
53
|
+
href: '#zeta'
|
|
54
|
+
}
|
|
55
|
+
] %}
|
|
56
|
+
<div class="tna-column tna-column--width-1-3 tna-column--full-small tna-column--full-tiny">
|
|
57
|
+
{{ tnaSidebar({
|
|
58
|
+
title: 'On this page',
|
|
59
|
+
headingLevel: 2,
|
|
60
|
+
items: sidebar_example_items,
|
|
61
|
+
type: 'sections',
|
|
62
|
+
sticky: true,
|
|
63
|
+
classes: 'tna-!--margin-top-m tna-!--padding-top-s'
|
|
64
|
+
}) }}
|
|
65
|
+
</div>
|
|
66
|
+
<div class="tna-column tna-column--width-2-3 tna-column--full-small tna-column--full-tiny tna-!--padding-bottom-xl tna-!--margin-top-m">
|
|
67
|
+
{%- for item in sidebar_example_items %}
|
|
68
|
+
<h2 class="tna-heading-l tna-!--padding-top-s" id="{{ item.href.slice(1) }}">{{ item.text }}</h2>
|
|
69
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque quis vulputate nulla, nec aliquet velit. Aliquam tristique lorem tortor, et volutpat diam fringilla vel. Etiam aliquet pulvinar justo, a aliquet sem rhoncus non. Donec non felis elementum, accumsan eros ut, feugiat elit. Integer suscipit, sapien elementum vulputate pretium, risus nunc imperdiet purus, ut sagittis tellus velit vel magna. Etiam mauris massa, fringilla eu tincidunt sit amet, commodo bibendum tortor. Curabitur aliquam scelerisque ex, id fringilla metus ultricies cursus. Curabitur eget malesuada dui. Etiam vel iaculis nibh, tincidunt ullamcorper lectus. Integer sed efficitur erat.</p>
|
|
70
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque quis vulputate nulla, nec aliquet velit. Aliquam tristique lorem tortor, et volutpat diam fringilla vel. Etiam aliquet pulvinar justo, a aliquet sem rhoncus non. Donec non felis elementum, accumsan eros ut, feugiat elit. Integer suscipit, sapien elementum vulputate pretium, risus nunc imperdiet purus, ut sagittis tellus velit vel magna. Etiam mauris massa, fringilla eu tincidunt sit amet, commodo bibendum tortor. Curabitur aliquam scelerisque ex, id fringilla metus ultricies cursus. Curabitur eget malesuada dui. Etiam vel iaculis nibh, tincidunt ullamcorper lectus. Integer sed efficitur erat.</p>
|
|
71
|
+
{%- endfor %}
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
{% endblock content %}
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
.tna-column {
|
|
35
35
|
&--full#{$suffix} {
|
|
36
36
|
width: 100%;
|
|
37
|
+
|
|
37
38
|
flex: none;
|
|
38
39
|
}
|
|
39
40
|
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
) {
|
|
47
48
|
&--width-#{math.div($i, $j)}-#{math.div($count, $j)}#{$suffix} {
|
|
48
49
|
width: math.div(100%, $count) * $i;
|
|
50
|
+
|
|
49
51
|
flex: none;
|
|
50
52
|
}
|
|
51
53
|
|
|
@@ -64,6 +66,7 @@
|
|
|
64
66
|
@if $simplest-fraction-found != true {
|
|
65
67
|
&--width-#{$i}-#{$count}#{$suffix} {
|
|
66
68
|
width: math.div(100%, $count) * $i;
|
|
69
|
+
|
|
67
70
|
flex: none;
|
|
68
71
|
}
|
|
69
72
|
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
|
|
27
27
|
@mixin main-font($bold: false) {
|
|
28
28
|
font-family: typography.$main-font-family;
|
|
29
|
+
font-variation-settings: "wdth" 100;
|
|
29
30
|
font-style: normal;
|
|
30
31
|
font-optical-sizing: auto;
|
|
31
|
-
font-variation-settings: "wdth" 100;
|
|
32
32
|
@if $bold {
|
|
33
33
|
@include main-font-weight-bold;
|
|
34
34
|
} @else {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use "../../variables/media" as mediaVars;
|
|
1
2
|
@use "../../tools/colour";
|
|
2
3
|
@use "../../tools/typography";
|
|
3
4
|
|
|
@@ -17,6 +18,9 @@
|
|
|
17
18
|
* ------------------------------------------
|
|
18
19
|
*/
|
|
19
20
|
:root {
|
|
21
|
+
--media-breakpoint-tiny: #{mediaVars.$largest-tiny-device-px}px;
|
|
22
|
+
--media-breakpoint-small: #{mediaVars.$largest-small-device-px}px;
|
|
23
|
+
--media-breakpoint-medium: #{mediaVars.$largest-medium-device-px}px;
|
|
20
24
|
color-scheme: only light;
|
|
21
25
|
}
|
|
22
26
|
|
|
@@ -13,15 +13,15 @@ $table-overflow-shadow-colour: rgb(0 0 0 / 40%);
|
|
|
13
13
|
$table-overflow-shadow-colour-hidden: rgb(0 0 0 / 0%);
|
|
14
14
|
|
|
15
15
|
@property --overflow-shadow-start {
|
|
16
|
-
syntax: "<color>";
|
|
17
16
|
inherits: false;
|
|
18
17
|
initial-value: #{$table-overflow-shadow-colour-hidden};
|
|
18
|
+
syntax: "<color>";
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
@property --overflow-shadow-end {
|
|
22
|
-
syntax: "<color>";
|
|
23
22
|
inherits: false;
|
|
24
23
|
initial-value: #{$table-overflow-shadow-colour-hidden};
|
|
24
|
+
syntax: "<color>";
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
@keyframes overflow-shadows {
|
|
@@ -162,6 +162,8 @@ $table-overflow-shadow-colour-hidden: rgb(0 0 0 / 0%);
|
|
|
162
162
|
@include spacing.space-above;
|
|
163
163
|
margin-bottom: spacing.space(4);
|
|
164
164
|
|
|
165
|
+
container-type: inline-size;
|
|
166
|
+
|
|
165
167
|
overflow: auto;
|
|
166
168
|
|
|
167
169
|
background:
|
|
@@ -193,17 +195,15 @@ $table-overflow-shadow-colour-hidden: rgb(0 0 0 / 0%);
|
|
|
193
195
|
100% 100%,
|
|
194
196
|
100% 100%;
|
|
195
197
|
background-repeat: no-repeat;
|
|
198
|
+
background-attachment: local, local, scroll, scroll;
|
|
196
199
|
background-position:
|
|
197
200
|
0 0,
|
|
198
201
|
100%,
|
|
199
202
|
0 0,
|
|
200
203
|
100%;
|
|
201
|
-
background-attachment: local, local, scroll, scroll;
|
|
202
204
|
|
|
203
205
|
border-radius: 0.1px;
|
|
204
206
|
|
|
205
|
-
container-type: inline-size;
|
|
206
|
-
|
|
207
207
|
contain: paint;
|
|
208
208
|
|
|
209
209
|
@include a11y.focus-indicator-only-on-keyboard-focus;
|
|
@@ -236,6 +236,7 @@ $table-overflow-shadow-colour-hidden: rgb(0 0 0 / 0%);
|
|
|
236
236
|
|
|
237
237
|
animation: overflow-shadows 1ms linear;
|
|
238
238
|
animation-timeline: --overflow-shadows;
|
|
239
|
+
|
|
239
240
|
scroll-timeline: --overflow-shadows x;
|
|
240
241
|
}
|
|
241
242
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nationalarchives/frontend",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "The National Archives frontend styles",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "storybook dev -p 6006",
|
|
@@ -51,29 +51,29 @@
|
|
|
51
51
|
"@babel/core": "^7.25.8",
|
|
52
52
|
"@babel/preset-env": "^7.25.8",
|
|
53
53
|
"@mdx-js/react": "^3.0.1",
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@storybook/addon-
|
|
54
|
+
"@nationalarchives/stylelint-config": "^0.1.1",
|
|
55
|
+
"@nationalarchives/eslint-config": "^0.1.4",
|
|
56
|
+
"@storybook/addon-a11y": "^10.4.0",
|
|
57
|
+
"@storybook/addon-docs": "^10.4.0",
|
|
58
|
+
"@storybook/addon-links": "^10.4.0",
|
|
57
59
|
"@storybook/addon-styling-webpack": "^3.0.0",
|
|
58
|
-
"@storybook/addon-vitest": "^10.
|
|
59
|
-
"@storybook/html-vite": "^10.
|
|
60
|
-
"@storybook/web-components-vite": "^10.
|
|
60
|
+
"@storybook/addon-vitest": "^10.4.0",
|
|
61
|
+
"@storybook/html-vite": "^10.4.0",
|
|
62
|
+
"@storybook/web-components-vite": "^10.4.0",
|
|
61
63
|
"@vitest/browser-playwright": "^4.0.6",
|
|
62
64
|
"@vitest/coverage-v8": "^4.0.6",
|
|
63
65
|
"axe-playwright": "^2.0.3",
|
|
64
66
|
"babel-jest": "^30.1.1",
|
|
65
67
|
"babel-loader": "^10.0.0",
|
|
66
|
-
"chromatic": "^
|
|
68
|
+
"chromatic": "^16.0.0",
|
|
67
69
|
"copy-webpack-plugin": "^14.0.0",
|
|
68
70
|
"css-loader": "^7.1.2",
|
|
69
|
-
"diff": "^
|
|
70
|
-
"eslint": "^
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"html-validate": "^10.0.0",
|
|
71
|
+
"diff": "^9.0.0",
|
|
72
|
+
"eslint-plugin-storybook": "^10.4.0",
|
|
73
|
+
"glob": "^13.0.0",
|
|
74
|
+
"html-validate": "^11.0.0",
|
|
74
75
|
"jest": "^30.2.0",
|
|
75
76
|
"jest-environment-jsdom": "^30.1.1",
|
|
76
|
-
"mdx-mermaid": "^2.0.1",
|
|
77
77
|
"node-self": "^1.0.2",
|
|
78
78
|
"nunjucks": "^3.2.4",
|
|
79
79
|
"playwright": "^1.56.1",
|
|
@@ -81,17 +81,13 @@
|
|
|
81
81
|
"prismjs": "^1.30.0",
|
|
82
82
|
"sass": "^1.79.5",
|
|
83
83
|
"sass-embedded": "^1.91.0",
|
|
84
|
-
"sass-loader": "^
|
|
84
|
+
"sass-loader": "^17.0.0",
|
|
85
85
|
"simple-nunjucks-loader": "^3.2.0",
|
|
86
|
-
"storybook": "^10.
|
|
86
|
+
"storybook": "^10.4.0",
|
|
87
87
|
"style-loader": "^4.0.0",
|
|
88
|
-
"
|
|
89
|
-
"stylelint-config-standard-scss": "^16.0.0",
|
|
90
|
-
"stylelint-order": "^7.0.0",
|
|
91
|
-
"stylelint-selector-bem-pattern": "^4.0.1",
|
|
92
|
-
"vite-plugin-static-copy": "^3.1.4",
|
|
88
|
+
"vite-plugin-static-copy": "^4.0.0",
|
|
93
89
|
"vitest": "^4.0.6",
|
|
94
90
|
"webpack": "^5.95.0",
|
|
95
|
-
"webpack-cli": "^
|
|
91
|
+
"webpack-cli": "^7.0.0"
|
|
96
92
|
}
|
|
97
93
|
}
|
package/config/.eslintrc.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
env: {
|
|
3
|
-
browser: true,
|
|
4
|
-
es2021: true,
|
|
5
|
-
},
|
|
6
|
-
extends: ["eslint:recommended"],
|
|
7
|
-
overrides: [
|
|
8
|
-
{
|
|
9
|
-
env: {
|
|
10
|
-
browser: true,
|
|
11
|
-
es2021: true,
|
|
12
|
-
node: true,
|
|
13
|
-
},
|
|
14
|
-
files: [".eslintrc.{js,cjs}", "**/*.test.js"],
|
|
15
|
-
parserOptions: {
|
|
16
|
-
sourceType: "module",
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
parserOptions: {
|
|
21
|
-
ecmaVersion: "latest",
|
|
22
|
-
sourceType: "module",
|
|
23
|
-
},
|
|
24
|
-
rules: {},
|
|
25
|
-
};
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
extends: ["stylelint-config-standard-scss"],
|
|
3
|
-
plugins: ["stylelint-selector-bem-pattern", "stylelint-order"],
|
|
4
|
-
ignoreFiles: ["src/nationalarchives/lib/font-awesome/**/*.scss", "**/*.css"],
|
|
5
|
-
rules: {
|
|
6
|
-
"at-rule-empty-line-before": null,
|
|
7
|
-
"block-no-empty": null,
|
|
8
|
-
"declaration-empty-line-before": null,
|
|
9
|
-
"property-no-vendor-prefix": null,
|
|
10
|
-
"value-keyword-case": null,
|
|
11
|
-
"scss/dollar-variable-empty-line-before": null,
|
|
12
|
-
"scss/double-slash-comment-empty-line-before": null,
|
|
13
|
-
"selector-class-pattern": null,
|
|
14
|
-
"no-invalid-position-at-import-rule": null,
|
|
15
|
-
"plugin/selector-bem-pattern": {
|
|
16
|
-
preset: "bem",
|
|
17
|
-
},
|
|
18
|
-
"color-function-notation": [
|
|
19
|
-
"modern",
|
|
20
|
-
{
|
|
21
|
-
ignore: ["with-var-inside"],
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
"scss/operator-no-newline-after": null,
|
|
25
|
-
"order/order": ["dollar-variables", "custom-properties", "declarations"],
|
|
26
|
-
"order/properties-order": [
|
|
27
|
-
[
|
|
28
|
-
{
|
|
29
|
-
emptyLineBefore: "always",
|
|
30
|
-
properties: ["content"],
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
emptyLineBefore: "always",
|
|
34
|
-
properties: [
|
|
35
|
-
"min-width",
|
|
36
|
-
"width",
|
|
37
|
-
"max-width",
|
|
38
|
-
"min-height",
|
|
39
|
-
"height",
|
|
40
|
-
"max-height",
|
|
41
|
-
"aspect-ratio",
|
|
42
|
-
"margin",
|
|
43
|
-
"margin-top",
|
|
44
|
-
"margin-right",
|
|
45
|
-
"margin-bottom",
|
|
46
|
-
"margin-left",
|
|
47
|
-
"padding",
|
|
48
|
-
"padding-top",
|
|
49
|
-
"padding-right",
|
|
50
|
-
"padding-bottom",
|
|
51
|
-
"padding-left",
|
|
52
|
-
],
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
emptyLineBefore: "always",
|
|
56
|
-
properties: [
|
|
57
|
-
"grid-column-start",
|
|
58
|
-
"grid-column-end",
|
|
59
|
-
"grid-row-start",
|
|
60
|
-
"grid-row-end",
|
|
61
|
-
"grid-column",
|
|
62
|
-
"grid-row",
|
|
63
|
-
"grid-area",
|
|
64
|
-
"justify-self",
|
|
65
|
-
"align-self",
|
|
66
|
-
"place-self",
|
|
67
|
-
],
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
emptyLineBefore: "always",
|
|
71
|
-
properties: [
|
|
72
|
-
"appearance",
|
|
73
|
-
"display",
|
|
74
|
-
"flex-wrap",
|
|
75
|
-
"flex-direction",
|
|
76
|
-
"grid",
|
|
77
|
-
"grid-template",
|
|
78
|
-
"grid-template-columns",
|
|
79
|
-
"grid-template-rows",
|
|
80
|
-
"grid-template-areas",
|
|
81
|
-
"grid-auto-columns",
|
|
82
|
-
"grid-auto-rows",
|
|
83
|
-
"grid-auto-flow",
|
|
84
|
-
"justify-items",
|
|
85
|
-
"align-items",
|
|
86
|
-
"place-items",
|
|
87
|
-
"justify-content",
|
|
88
|
-
"align-content",
|
|
89
|
-
"place-content",
|
|
90
|
-
"grid-column-gap",
|
|
91
|
-
"grid-row-gap",
|
|
92
|
-
"grid-gap",
|
|
93
|
-
"gap",
|
|
94
|
-
"box-sizing",
|
|
95
|
-
"visibility",
|
|
96
|
-
"overflow",
|
|
97
|
-
"overflow-x",
|
|
98
|
-
"overflow-y",
|
|
99
|
-
"resize",
|
|
100
|
-
],
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
emptyLineBefore: "always",
|
|
104
|
-
properties: ["float", "clear"],
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
emptyLineBefore: "always",
|
|
108
|
-
properties: [
|
|
109
|
-
"position",
|
|
110
|
-
"inset",
|
|
111
|
-
"top",
|
|
112
|
-
"right",
|
|
113
|
-
"bottom",
|
|
114
|
-
"left",
|
|
115
|
-
"z-index",
|
|
116
|
-
],
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
emptyLineBefore: "always",
|
|
120
|
-
properties: [
|
|
121
|
-
"color",
|
|
122
|
-
"font-family",
|
|
123
|
-
"src",
|
|
124
|
-
"font-size",
|
|
125
|
-
"font-weight",
|
|
126
|
-
"line-height",
|
|
127
|
-
"text-align",
|
|
128
|
-
"text-align-last",
|
|
129
|
-
"vertical-align",
|
|
130
|
-
"font-style",
|
|
131
|
-
"font-display",
|
|
132
|
-
"font-optical-sizing",
|
|
133
|
-
"text-transform",
|
|
134
|
-
"text-decoration",
|
|
135
|
-
"text-decoration-thickness",
|
|
136
|
-
"text-decoration-style",
|
|
137
|
-
"text-decoration-color",
|
|
138
|
-
"text-underline-position",
|
|
139
|
-
"text-underline-offset",
|
|
140
|
-
"direction",
|
|
141
|
-
"letter-spacing",
|
|
142
|
-
"word-spacing",
|
|
143
|
-
"text-indent",
|
|
144
|
-
"text-justify",
|
|
145
|
-
"text-overflow",
|
|
146
|
-
"text-overflow-ellipsis",
|
|
147
|
-
"text-overflow-mode",
|
|
148
|
-
"text-rendering",
|
|
149
|
-
"text-size-adjust",
|
|
150
|
-
"text-outline",
|
|
151
|
-
"text-shadow",
|
|
152
|
-
"text-transform",
|
|
153
|
-
"text-wrap",
|
|
154
|
-
"word-wrap",
|
|
155
|
-
"word-break",
|
|
156
|
-
"text-emphasis",
|
|
157
|
-
"white-space",
|
|
158
|
-
"word-spacing",
|
|
159
|
-
"hyphens",
|
|
160
|
-
],
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
emptyLineBefore: "always",
|
|
164
|
-
properties: ["columns", "column-gap"],
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
emptyLineBefore: "always",
|
|
168
|
-
properties: ["list-style", "list-style-position"],
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
emptyLineBefore: "always",
|
|
172
|
-
properties: ["fill"],
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
emptyLineBefore: "always",
|
|
176
|
-
properties: [
|
|
177
|
-
"background",
|
|
178
|
-
"background-color",
|
|
179
|
-
"background-image",
|
|
180
|
-
"background-size",
|
|
181
|
-
"background-repeat",
|
|
182
|
-
"background-clip",
|
|
183
|
-
],
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
emptyLineBefore: "always",
|
|
187
|
-
properties: [
|
|
188
|
-
"border",
|
|
189
|
-
"border-width",
|
|
190
|
-
"border-color",
|
|
191
|
-
"border-style",
|
|
192
|
-
"border-top-width",
|
|
193
|
-
"border-top-color",
|
|
194
|
-
"border-top-style",
|
|
195
|
-
"border-right-width",
|
|
196
|
-
"border-right-color",
|
|
197
|
-
"border-right-style",
|
|
198
|
-
"border-bottom-width",
|
|
199
|
-
"border-bottom-color",
|
|
200
|
-
"border-bottom-style",
|
|
201
|
-
"border-left-width",
|
|
202
|
-
"border-left-color",
|
|
203
|
-
"border-left-style",
|
|
204
|
-
"border-collapse",
|
|
205
|
-
"border-radius",
|
|
206
|
-
"border-top-left-radius",
|
|
207
|
-
"border-top-right-radius",
|
|
208
|
-
"border-bottom-left-radius",
|
|
209
|
-
"border-bottom-right-radius",
|
|
210
|
-
"outline",
|
|
211
|
-
"outline-width",
|
|
212
|
-
"outline-color",
|
|
213
|
-
"outline-style",
|
|
214
|
-
"outline-offset",
|
|
215
|
-
],
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
emptyLineBefore: "always",
|
|
219
|
-
properties: ["box-shadow"],
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
emptyLineBefore: "always",
|
|
223
|
-
properties: ["transform"],
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
emptyLineBefore: "always",
|
|
227
|
-
properties: ["translate"],
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
emptyLineBefore: "always",
|
|
231
|
-
properties: ["opacity"],
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
emptyLineBefore: "always",
|
|
235
|
-
properties: ["cursor"],
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
emptyLineBefore: "always",
|
|
239
|
-
properties: ["clip", "clip-path", "zoom", "resize"],
|
|
240
|
-
},
|
|
241
|
-
],
|
|
242
|
-
],
|
|
243
|
-
},
|
|
244
|
-
};
|