@ons/design-system 53.0.2 → 53.1.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/components/autosuggest/_autosuggest.scss +1 -1
- package/components/browser-banner/_browser-banner.scss +39 -0
- package/components/browser-banner/_macro.njk +17 -0
- package/components/browser-banner/_macro.spec.js +83 -0
- package/components/header/_macro.njk +7 -0
- package/components/navigation/_macro.njk +4 -4
- package/components/navigation/_macro.spec.js +20 -0
- package/css/census.css +1 -1
- package/css/error.css +1 -1
- package/css/ids.css +1 -1
- package/css/main.css +1 -1
- package/favicons/ids/cy/android-chrome-192x192.png +0 -0
- package/favicons/ids/cy/android-chrome-512x512.png +0 -0
- package/favicons/ids/cy/apple-touch-icon.png +0 -0
- package/favicons/ids/cy/browserconfig.xml +12 -0
- package/favicons/ids/cy/favicon-16x16.png +0 -0
- package/favicons/ids/cy/favicon-32x32.png +0 -0
- package/favicons/ids/cy/favicon.ico +0 -0
- package/favicons/ids/cy/manifest.json +20 -0
- package/favicons/ids/cy/mstile-150x150.png +0 -0
- package/favicons/ids/cy/mstile-310x150.png +0 -0
- package/favicons/ids/cy/mstile-310x310.png +0 -0
- package/favicons/ids/cy/mstile-70x70.png +0 -0
- package/favicons/ids/cy/opengraph.png +0 -0
- package/favicons/ids/cy/safari-pinned-tab.svg +27 -0
- package/favicons/ids/cy/site.webmanifest +54 -0
- package/favicons/ids/cy/twitter.png +0 -0
- package/favicons/ids/en/android-chrome-192x192.png +0 -0
- package/favicons/ids/en/android-chrome-512x512.png +0 -0
- package/favicons/ids/en/apple-touch-icon.png +0 -0
- package/favicons/ids/en/browserconfig.xml +12 -0
- package/favicons/ids/en/favicon-16x16.png +0 -0
- package/favicons/ids/en/favicon-32x32.png +0 -0
- package/favicons/ids/en/favicon.ico +0 -0
- package/favicons/ids/en/manifest.json +20 -0
- package/favicons/ids/en/mstile-150x150.png +0 -0
- package/favicons/ids/en/mstile-310x150.png +0 -0
- package/favicons/ids/en/mstile-310x310.png +0 -0
- package/favicons/ids/en/mstile-70x70.png +0 -0
- package/favicons/ids/en/opengraph.png +0 -0
- package/favicons/ids/en/safari-pinned-tab.svg +27 -0
- package/favicons/ids/en/site.webmanifest +54 -0
- package/favicons/ids/en/twitter.png +0 -0
- package/js/cookies-settings.js +5 -3
- package/js/cookies-settings.spec.js +25 -1
- package/layout/_template.njk +3 -2
- package/package.json +1 -1
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +1 -1
- package/scss/main.scss +1 -0
- package/scss/vars/_colors.scss +1 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<browserconfig>
|
|
3
|
+
<msapplication>
|
|
4
|
+
<tile>
|
|
5
|
+
<square70x70logo src="/mstile-70x70.png"/>
|
|
6
|
+
<square150x150logo src="/mstile-150x150.png"/>
|
|
7
|
+
<square310x310logo src="/mstile-310x310.png"/>
|
|
8
|
+
<wide310x150logo src="/mstile-310x150.png"/>
|
|
9
|
+
<TileColor>#da532c</TileColor>
|
|
10
|
+
</tile>
|
|
11
|
+
</msapplication>
|
|
12
|
+
</browserconfig>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Integrated Data Service",
|
|
3
|
+
"short_name": "IDS",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "/android-chrome-192x192.png",
|
|
7
|
+
"sizes": "192x192",
|
|
8
|
+
"type": "image/png"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "/android-chrome-512x512.png",
|
|
12
|
+
"sizes": "512x512",
|
|
13
|
+
"type": "image/png"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"content_security_policy": "script-src 'self' https://cdn.ons.gov.uk; object-src 'self' https://cdn.ons.gov.uk;",
|
|
17
|
+
"theme_color": "#ffffff",
|
|
18
|
+
"background_color": "#ffffff",
|
|
19
|
+
"display": "standalone"
|
|
20
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
|
3
|
+
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
4
|
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
|
|
6
|
+
preserveAspectRatio="xMidYMid meet">
|
|
7
|
+
<metadata>
|
|
8
|
+
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
|
9
|
+
</metadata>
|
|
10
|
+
<g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
|
|
11
|
+
fill="#000000" stroke="none">
|
|
12
|
+
<path d="M3455 3371 c-16 -10 -251 -241 -522 -512 -431 -433 -492 -499 -498
|
|
13
|
+
-531 -26 -143 110 -258 236 -200 33 15 172 149 536 513 435 437 492 498 499
|
|
14
|
+
532 16 89 -16 161 -86 197 -51 26 -125 26 -165 1z"/>
|
|
15
|
+
<path d="M3681 2996 c-43 -24 -1003 -989 -1017 -1023 -20 -46 -17 -92 9 -143
|
|
16
|
+
26 -53 59 -78 116 -91 94 -21 86 -28 549 434 l422 421 423 -421 c462 -462 454
|
|
17
|
+
-455 548 -434 57 13 90 38 117 91 24 49 28 100 9 143 -14 33 -980 1002 -1019
|
|
18
|
+
1023 -34 18 -125 18 -157 0z"/>
|
|
19
|
+
<path d="M1040 2744 c-39 -16 -741 -710 -766 -756 -20 -39 -18 -121 5 -167 23
|
|
20
|
+
-45 53 -66 115 -83 90 -24 99 -18 424 305 l292 292 288 -287 c341 -342 354
|
|
21
|
+
-350 469 -292 40 19 57 35 72 68 23 46 27 109 10 153 -15 42 -715 741 -764
|
|
22
|
+
764 -48 22 -98 23 -145 3z"/>
|
|
23
|
+
<path d="M1656 2750 c-16 -5 -42 -22 -59 -37 -64 -61 -76 -150 -28 -224 16
|
|
24
|
+
-24 186 -200 377 -390 269 -267 358 -349 387 -359 69 -22 153 8 200 72 30 41
|
|
25
|
+
34 124 9 174 -30 56 -717 739 -764 759 -41 16 -77 18 -122 5z"/>
|
|
26
|
+
</g>
|
|
27
|
+
</svg>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "IDS",
|
|
3
|
+
"short_name": "IDS",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "/android-chrome-36x36.png",
|
|
7
|
+
"sizes": "36x36",
|
|
8
|
+
"type": "image/png"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "/android-chrome-48x48.png",
|
|
12
|
+
"sizes": "48x48",
|
|
13
|
+
"type": "image/png"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"src": "/android-chrome-72x72.png",
|
|
17
|
+
"sizes": "72x72",
|
|
18
|
+
"type": "image/png"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"src": "/android-chrome-96x96.png",
|
|
22
|
+
"sizes": "96x96",
|
|
23
|
+
"type": "image/png"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"src": "/android-chrome-144x144.png",
|
|
27
|
+
"sizes": "144x144",
|
|
28
|
+
"type": "image/png"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"src": "/android-chrome-192x192.png",
|
|
32
|
+
"sizes": "192x192",
|
|
33
|
+
"type": "image/png"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"src": "/android-chrome-256x256.png",
|
|
37
|
+
"sizes": "256x256",
|
|
38
|
+
"type": "image/png"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"src": "/android-chrome-384x384.png",
|
|
42
|
+
"sizes": "384x384",
|
|
43
|
+
"type": "image/png"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"src": "/android-chrome-512x512.png",
|
|
47
|
+
"sizes": "512x512",
|
|
48
|
+
"type": "image/png"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"theme_color": "#ffffff",
|
|
52
|
+
"background_color": "#ffffff",
|
|
53
|
+
"display": "standalone"
|
|
54
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<browserconfig>
|
|
3
|
+
<msapplication>
|
|
4
|
+
<tile>
|
|
5
|
+
<square70x70logo src="/mstile-70x70.png"/>
|
|
6
|
+
<square150x150logo src="/mstile-150x150.png"/>
|
|
7
|
+
<square310x310logo src="/mstile-310x310.png"/>
|
|
8
|
+
<wide310x150logo src="/mstile-310x150.png"/>
|
|
9
|
+
<TileColor>#da532c</TileColor>
|
|
10
|
+
</tile>
|
|
11
|
+
</msapplication>
|
|
12
|
+
</browserconfig>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Integrated Data Service",
|
|
3
|
+
"short_name": "IDS",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "/android-chrome-192x192.png",
|
|
7
|
+
"sizes": "192x192",
|
|
8
|
+
"type": "image/png"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "/android-chrome-512x512.png",
|
|
12
|
+
"sizes": "512x512",
|
|
13
|
+
"type": "image/png"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"content_security_policy": "script-src 'self' https://cdn.ons.gov.uk; object-src 'self' https://cdn.ons.gov.uk;",
|
|
17
|
+
"theme_color": "#ffffff",
|
|
18
|
+
"background_color": "#ffffff",
|
|
19
|
+
"display": "standalone"
|
|
20
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
|
3
|
+
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
4
|
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
|
|
6
|
+
preserveAspectRatio="xMidYMid meet">
|
|
7
|
+
<metadata>
|
|
8
|
+
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
|
9
|
+
</metadata>
|
|
10
|
+
<g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
|
|
11
|
+
fill="#000000" stroke="none">
|
|
12
|
+
<path d="M3455 3371 c-16 -10 -251 -241 -522 -512 -431 -433 -492 -499 -498
|
|
13
|
+
-531 -26 -143 110 -258 236 -200 33 15 172 149 536 513 435 437 492 498 499
|
|
14
|
+
532 16 89 -16 161 -86 197 -51 26 -125 26 -165 1z"/>
|
|
15
|
+
<path d="M3681 2996 c-43 -24 -1003 -989 -1017 -1023 -20 -46 -17 -92 9 -143
|
|
16
|
+
26 -53 59 -78 116 -91 94 -21 86 -28 549 434 l422 421 423 -421 c462 -462 454
|
|
17
|
+
-455 548 -434 57 13 90 38 117 91 24 49 28 100 9 143 -14 33 -980 1002 -1019
|
|
18
|
+
1023 -34 18 -125 18 -157 0z"/>
|
|
19
|
+
<path d="M1040 2744 c-39 -16 -741 -710 -766 -756 -20 -39 -18 -121 5 -167 23
|
|
20
|
+
-45 53 -66 115 -83 90 -24 99 -18 424 305 l292 292 288 -287 c341 -342 354
|
|
21
|
+
-350 469 -292 40 19 57 35 72 68 23 46 27 109 10 153 -15 42 -715 741 -764
|
|
22
|
+
764 -48 22 -98 23 -145 3z"/>
|
|
23
|
+
<path d="M1656 2750 c-16 -5 -42 -22 -59 -37 -64 -61 -76 -150 -28 -224 16
|
|
24
|
+
-24 186 -200 377 -390 269 -267 358 -349 387 -359 69 -22 153 8 200 72 30 41
|
|
25
|
+
34 124 9 174 -30 56 -717 739 -764 759 -41 16 -77 18 -122 5z"/>
|
|
26
|
+
</g>
|
|
27
|
+
</svg>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "IDS",
|
|
3
|
+
"short_name": "IDS",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "/android-chrome-36x36.png",
|
|
7
|
+
"sizes": "36x36",
|
|
8
|
+
"type": "image/png"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "/android-chrome-48x48.png",
|
|
12
|
+
"sizes": "48x48",
|
|
13
|
+
"type": "image/png"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"src": "/android-chrome-72x72.png",
|
|
17
|
+
"sizes": "72x72",
|
|
18
|
+
"type": "image/png"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"src": "/android-chrome-96x96.png",
|
|
22
|
+
"sizes": "96x96",
|
|
23
|
+
"type": "image/png"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"src": "/android-chrome-144x144.png",
|
|
27
|
+
"sizes": "144x144",
|
|
28
|
+
"type": "image/png"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"src": "/android-chrome-192x192.png",
|
|
32
|
+
"sizes": "192x192",
|
|
33
|
+
"type": "image/png"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"src": "/android-chrome-256x256.png",
|
|
37
|
+
"sizes": "256x256",
|
|
38
|
+
"type": "image/png"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"src": "/android-chrome-384x384.png",
|
|
42
|
+
"sizes": "384x384",
|
|
43
|
+
"type": "image/png"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"src": "/android-chrome-512x512.png",
|
|
47
|
+
"sizes": "512x512",
|
|
48
|
+
"type": "image/png"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"theme_color": "#ffffff",
|
|
52
|
+
"background_color": "#ffffff",
|
|
53
|
+
"display": "standalone"
|
|
54
|
+
}
|
|
Binary file
|
package/js/cookies-settings.js
CHANGED
|
@@ -33,12 +33,14 @@ export default class CookiesSettings {
|
|
|
33
33
|
let radioButton;
|
|
34
34
|
|
|
35
35
|
if (currentConsentCookieJSON[cookieType]) {
|
|
36
|
-
radioButton = document.querySelector(
|
|
36
|
+
radioButton = document.querySelector(`input[name=cookies-${cookieType}][value=on]`);
|
|
37
37
|
} else {
|
|
38
|
-
radioButton = document.querySelector(
|
|
38
|
+
radioButton = document.querySelector(`input[name=cookies-${cookieType}][value=off]`);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
radioButton
|
|
41
|
+
if (radioButton) {
|
|
42
|
+
radioButton.checked = true;
|
|
43
|
+
}
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
|
|
@@ -22,6 +22,20 @@ const EXAMPLE_COOKIES_SETTINGS_PAGE = `
|
|
|
22
22
|
</div>
|
|
23
23
|
`;
|
|
24
24
|
|
|
25
|
+
const EXAMPLE_PART_COOKIES_SETTINGS_PAGE = `
|
|
26
|
+
<form data-module="cookie-settings">
|
|
27
|
+
<input type="radio" class="ons-js-radio" name="cookies-settings" value="on">
|
|
28
|
+
<input type="radio" class="ons-js-radio" name="cookies-settings" value="off">
|
|
29
|
+
<input type="radio" class="ons-js-radio" name="cookies-campaigns" value="on">
|
|
30
|
+
<input type="radio" class="ons-js-radio" name="cookies-campaigns" value="off">
|
|
31
|
+
<button id="submit-button" type="submit">Submit</button>
|
|
32
|
+
</form>
|
|
33
|
+
|
|
34
|
+
<div class="ons-cookies-confirmation-message ons-u-d-no">
|
|
35
|
+
<a class="ons-js-return-link" href="#0">Return to previous page</a>
|
|
36
|
+
</div>
|
|
37
|
+
`;
|
|
38
|
+
|
|
25
39
|
describe('script: cookies-settings', () => {
|
|
26
40
|
beforeEach(async () => {
|
|
27
41
|
const client = await page.target().createCDPSession();
|
|
@@ -43,7 +57,7 @@ describe('script: cookies-settings', () => {
|
|
|
43
57
|
});
|
|
44
58
|
});
|
|
45
59
|
|
|
46
|
-
it('sets all radio buttons to the default values', async () => {
|
|
60
|
+
it('sets all radio buttons to the default values of every `cookieType`', async () => {
|
|
47
61
|
await setTestPage('/test', EXAMPLE_COOKIES_SETTINGS_PAGE);
|
|
48
62
|
|
|
49
63
|
const cookiesSettingsOffRadio = await page.$eval('input[name=cookies-settings][value=off]', node => node.checked);
|
|
@@ -55,6 +69,16 @@ describe('script: cookies-settings', () => {
|
|
|
55
69
|
expect(cookiesCampaignsOffRadio).toBe(true);
|
|
56
70
|
});
|
|
57
71
|
|
|
72
|
+
it('sets the provided radio buttons to the default values of every matched `cookieType`', async () => {
|
|
73
|
+
await setTestPage('/test', EXAMPLE_PART_COOKIES_SETTINGS_PAGE);
|
|
74
|
+
|
|
75
|
+
const cookiesSettingsOffRadio = await page.$eval('input[name=cookies-settings][value=off]', node => node.checked);
|
|
76
|
+
const cookiesCampaignsOffRadio = await page.$eval('input[name=cookies-campaigns][value=off]', node => node.checked);
|
|
77
|
+
|
|
78
|
+
expect(cookiesSettingsOffRadio).toBe(true);
|
|
79
|
+
expect(cookiesCampaignsOffRadio).toBe(true);
|
|
80
|
+
});
|
|
81
|
+
|
|
58
82
|
it('sets all radios to on from off when accepting cookies', async () => {
|
|
59
83
|
await setTestPage('/test', EXAMPLE_COOKIES_SETTINGS_PAGE);
|
|
60
84
|
|
package/layout/_template.njk
CHANGED
|
@@ -155,6 +155,7 @@
|
|
|
155
155
|
"button": pageConfig.signoutButton,
|
|
156
156
|
"toggleNavigationButton": pageConfig.toggleNavigationButton,
|
|
157
157
|
"navigation": pageConfig.navigation,
|
|
158
|
+
"browserBanner": pageConfig.browserBanner,
|
|
158
159
|
"phase": pageConfig.phase,
|
|
159
160
|
"assetsURL": assetsURL,
|
|
160
161
|
"serviceLinks": pageConfig.serviceLinks,
|
|
@@ -165,8 +166,8 @@
|
|
|
165
166
|
"orgLogoHref": pageConfig.header.orgLogoHref,
|
|
166
167
|
"titleLogo": pageConfig.header.titleLogo,
|
|
167
168
|
"titleLogoClasses": pageConfig.header.titleLogoClasses,
|
|
168
|
-
"
|
|
169
|
-
"
|
|
169
|
+
"titleLogoMobile": pageConfig.header.titleLogoMobile,
|
|
170
|
+
"titleLogoMobileClasses": pageConfig.header.titleLogoMobileClasses,
|
|
170
171
|
"titleLogoAlt": pageConfig.header.titleLogoAlt,
|
|
171
172
|
"titleLogoHref": pageConfig.header.titleLogoHref,
|
|
172
173
|
"customHeaderLogo": pageConfig.header.customHeaderLogo
|