@ons/design-system 65.2.0 → 65.2.2

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.
Files changed (101) hide show
  1. package/README.md +1 -0
  2. package/components/access-code/example-access-code-error.njk +1 -1
  3. package/components/access-code/example-access-code.njk +1 -1
  4. package/components/accordion/example-accordion-open.njk +10 -10
  5. package/components/accordion/example-accordion.njk +1 -1
  6. package/components/address-input/example-address-input-editable.njk +2 -2
  7. package/components/address-input/example-address-input-manual.njk +3 -3
  8. package/components/address-input/example-address-input.njk +2 -2
  9. package/components/autosuggest/_macro.njk +1 -0
  10. package/components/autosuggest/autosuggest.js +2 -1
  11. package/components/autosuggest/autosuggest.spec.js +89 -55
  12. package/components/autosuggest/autosuggest.ui.js +8 -12
  13. package/components/autosuggest/example-autosuggest-country-multiple.njk +4 -3
  14. package/components/autosuggest/example-autosuggest-country.njk +1 -1
  15. package/components/back-link/example-back-link.njk +1 -1
  16. package/components/breadcrumbs/_macro.njk +1 -1
  17. package/components/breadcrumbs/_macro.spec.js +5 -5
  18. package/components/card/example-card-set-with-images.njk +3 -3
  19. package/components/card/example-card-set-with-lists.njk +3 -3
  20. package/components/card/example-card-set.njk +3 -3
  21. package/components/card/example-card.njk +1 -1
  22. package/components/checkboxes/example-checkboxes-disabled.njk +3 -3
  23. package/components/checkboxes/example-checkboxes-error.njk +7 -7
  24. package/components/checkboxes/example-checkboxes-with-descriptions.njk +7 -7
  25. package/components/checkboxes/example-checkboxes-with-hidden-label.njk +9 -9
  26. package/components/checkboxes/example-checkboxes-with-revealed-checkboxes-expanded.njk +8 -8
  27. package/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk +8 -8
  28. package/components/checkboxes/example-checkboxes-with-revealed-radios-expanded.njk +8 -8
  29. package/components/checkboxes/example-checkboxes-with-revealed-radios.njk +8 -8
  30. package/components/checkboxes/example-checkboxes-with-revealed-select-expanded.njk +4 -4
  31. package/components/checkboxes/example-checkboxes-with-revealed-select.njk +4 -4
  32. package/components/checkboxes/example-checkboxes-with-revealed-text-input-expanded.njk +6 -6
  33. package/components/checkboxes/example-checkboxes-with-revealed-text-input.njk +6 -6
  34. package/components/checkboxes/example-checkboxes-with-select-all-button.njk +4 -4
  35. package/components/checkboxes/example-checkboxes-with-visible-text-input.njk +6 -6
  36. package/components/checkboxes/example-checkboxes-without-border.njk +3 -3
  37. package/components/checkboxes/example-checkboxes.njk +4 -4
  38. package/components/cookies-banner/_macro.njk +55 -41
  39. package/components/cookies-banner/_macro.spec.js +9 -27
  40. package/components/date-input/example-date-input-error.njk +2 -2
  41. package/components/date-input/example-date-input.njk +1 -1
  42. package/components/details/example-details-with-warning.njk +1 -1
  43. package/components/details/example-details.njk +1 -1
  44. package/components/duration/example-duration-error.njk +6 -6
  45. package/components/duration/example-duration.njk +5 -5
  46. package/components/header/example-header-external-with-service-links.njk +1 -1
  47. package/components/header/example-header-internal.njk +1 -1
  48. package/components/input/example-input-email.njk +1 -1
  49. package/components/input/example-input-number.njk +1 -1
  50. package/components/input/example-input-numeric-values.njk +7 -7
  51. package/components/input/example-input-text-with-character-limit-checker.njk +1 -1
  52. package/components/input/example-input-text-with-description.njk +1 -1
  53. package/components/input/example-input-text.njk +1 -1
  54. package/components/mutually-exclusive/example-mutually-exclusive-checkboxes.njk +6 -6
  55. package/components/mutually-exclusive/example-mutually-exclusive-date-with-error.njk +2 -2
  56. package/components/mutually-exclusive/example-mutually-exclusive-email.njk +2 -2
  57. package/components/mutually-exclusive/example-mutually-exclusive-multiple-options.njk +5 -5
  58. package/components/panel/_macro.spec.js +7 -29
  59. package/components/phase-banner/_macro.njk +1 -1
  60. package/components/radios/example-radios-with-clear-button-expanded.njk +9 -9
  61. package/components/radios/example-radios-with-clear-button.njk +9 -9
  62. package/components/radios/example-radios-with-descriptions.njk +5 -5
  63. package/components/radios/example-radios-with-error.njk +4 -4
  64. package/components/radios/example-radios-with-revealed-checkboxes-expanded.njk +8 -8
  65. package/components/radios/example-radios-with-revealed-checkboxes.njk +8 -8
  66. package/components/radios/example-radios-with-revealed-radios-expanded.njk +9 -9
  67. package/components/radios/example-radios-with-revealed-radios.njk +8 -8
  68. package/components/radios/example-radios-with-revealed-select-expanded.njk +5 -5
  69. package/components/radios/example-radios-with-revealed-select.njk +4 -4
  70. package/components/radios/example-radios-with-revealed-text-input-expanded.njk +9 -9
  71. package/components/radios/example-radios-with-revealed-text-input.njk +9 -9
  72. package/components/radios/example-radios-with-visible-text-input.njk +3 -3
  73. package/components/relationships/example-relationships-error.njk +13 -13
  74. package/components/relationships/example-relationships-you.njk +13 -13
  75. package/components/relationships/example-relationships.njk +13 -13
  76. package/components/select/example-select-with-error.njk +1 -1
  77. package/components/select/example-select-with-inline-label.njk +1 -1
  78. package/components/select/example-select.njk +1 -1
  79. package/components/summary/_macro.njk +2 -2
  80. package/components/summary/_macro.spec.js +28 -25
  81. package/components/summary/example-summary-grouped-total.njk +2 -0
  82. package/components/summary/example-summary-grouped-with-errors.njk +4 -0
  83. package/components/summary/example-summary-grouped.njk +19 -0
  84. package/components/summary/example-summary-household.njk +5 -0
  85. package/components/summary/example-summary-hub.njk +8 -0
  86. package/components/summary/example-summary-multiple.njk +4 -0
  87. package/components/summary/example-summary.njk +4 -0
  88. package/components/textarea/example-textarea-error.njk +1 -1
  89. package/components/upload/example-upload-error.njk +1 -1
  90. package/components/upload/example-upload.njk +1 -1
  91. package/package.json +2 -3
  92. package/scripts/main.es5.js +1 -1
  93. package/scripts/main.js +1 -1
  94. /package/{fonts → scss/fonts}/opensans-bold.woff +0 -0
  95. /package/{fonts → scss/fonts}/opensans-bold.woff2 +0 -0
  96. /package/{fonts → scss/fonts}/opensans-regular.woff +0 -0
  97. /package/{fonts → scss/fonts}/opensans-regular.woff2 +0 -0
  98. /package/{fonts → scss/fonts}/robotomono-bold.woff +0 -0
  99. /package/{fonts → scss/fonts}/robotomono-bold.woff2 +0 -0
  100. /package/{fonts → scss/fonts}/robotomono-regular.woff +0 -0
  101. /package/{fonts → scss/fonts}/robotomono-regular.woff2 +0 -0
@@ -8,21 +8,21 @@
8
8
  "borderless": true,
9
9
  "checkboxes": [
10
10
  {
11
- "id": "post",
11
+ "id": "post-example-with-revealed-radios-expanded",
12
12
  "label": {
13
13
  "text": "By post"
14
14
  },
15
15
  "value": "post"
16
16
  },
17
17
  {
18
- "id": "email",
18
+ "id": "email-example-with-revealed-radios-expanded",
19
19
  "label": {
20
20
  "text": "By email"
21
21
  },
22
22
  "value": "email"
23
23
  },
24
24
  {
25
- "id": "phone",
25
+ "id": "phone-example-with-revealed-radios-expanded",
26
26
  "label": {
27
27
  "text": "By phone"
28
28
  },
@@ -30,34 +30,34 @@
30
30
  "checked": true,
31
31
  "other": {
32
32
  "otherType": "radios",
33
- "id": "phone-time",
33
+ "id": "phone-time-example-with-revealed-radios-expanded",
34
34
  "name": "phone-time",
35
35
  "legend": "Choose preferred time of day",
36
36
  "radios": [
37
37
  {
38
38
  "value": "anytime",
39
- "id": "anytime",
39
+ "id": "anytime-example-with-revealed-radios-expanded",
40
40
  "label": {
41
41
  "text": "Any time of day"
42
42
  }
43
43
  },
44
44
  {
45
45
  "value": "morning",
46
- "id": "morning",
46
+ "id": "morning-example-with-revealed-radios-expanded",
47
47
  "label": {
48
48
  "text": "Morning"
49
49
  }
50
50
  },
51
51
  {
52
52
  "value": "afternoon",
53
- "id": "afternoon",
53
+ "id": "afternoon-example-with-revealed-radios-expanded",
54
54
  "label": {
55
55
  "text": "Afternoon"
56
56
  }
57
57
  },
58
58
  {
59
59
  "value": "evening",
60
- "id": "evening",
60
+ "id": "evening-example-with-revealed-radios-expanded",
61
61
  "label": {
62
62
  "text": "Evening"
63
63
  }
@@ -8,55 +8,55 @@
8
8
  "borderless": true,
9
9
  "checkboxes": [
10
10
  {
11
- "id": "post",
11
+ "id": "post-example-with-revealed-radios",
12
12
  "label": {
13
13
  "text": "By post"
14
14
  },
15
15
  "value": "post"
16
16
  },
17
17
  {
18
- "id": "email",
18
+ "id": "email-example-with-revealed-radios",
19
19
  "label": {
20
20
  "text": "By email"
21
21
  },
22
22
  "value": "email"
23
23
  },
24
24
  {
25
- "id": "phone",
25
+ "id": "phone-example-with-revealed-radios",
26
26
  "label": {
27
27
  "text": "By phone"
28
28
  },
29
29
  "value": "phone",
30
30
  "other": {
31
31
  "otherType": "radios",
32
- "id": "phone-time",
32
+ "id": "phone-time-example-with-revealed-radios",
33
33
  "name": "phone-time",
34
34
  "legend": "Choose preferred time of day",
35
35
  "radios": [
36
36
  {
37
37
  "value": "anytime",
38
- "id": "anytime",
38
+ "id": "anytime-example-with-revealed-radios",
39
39
  "label": {
40
40
  "text": "Any time of day"
41
41
  }
42
42
  },
43
43
  {
44
44
  "value": "morning",
45
- "id": "morning",
45
+ "id": "morning-example-with-revealed-radios",
46
46
  "label": {
47
47
  "text": "Morning"
48
48
  }
49
49
  },
50
50
  {
51
51
  "value": "afternoon",
52
- "id": "afternoon",
52
+ "id": "afternoon-example-with-revealed-radios",
53
53
  "label": {
54
54
  "text": "Afternoon"
55
55
  }
56
56
  },
57
57
  {
58
58
  "value": "evening",
59
- "id": "evening",
59
+ "id": "evening-example-with-revealed-radios",
60
60
  "label": {
61
61
  "text": "Evening"
62
62
  }
@@ -13,21 +13,21 @@
13
13
  "name": "contact",
14
14
  "checkboxes": [
15
15
  {
16
- "id": "post",
16
+ "id": "post-example-checkbox-with-revealed-select-expanded",
17
17
  "label": {
18
18
  "text": "By post"
19
19
  },
20
20
  "value": "post"
21
21
  },
22
22
  {
23
- "id": "email",
23
+ "id": "email-example-checkbox-with-revealed-select-expanded",
24
24
  "label": {
25
25
  "text": "By email"
26
26
  },
27
27
  "value": "email"
28
28
  },
29
29
  {
30
- "id": "phone",
30
+ "id": "phone-example-checkbox-with-revealed-select-expanded",
31
31
  "label": {
32
32
  "text": "By phone"
33
33
  },
@@ -35,7 +35,7 @@
35
35
  "checked": true,
36
36
  "other": {
37
37
  "otherType": "select",
38
- "id": "phone-time",
38
+ "id": "phone-time-example-checkbox-with-revealed-select-expanded",
39
39
  "name": "phone-time",
40
40
  "label": {
41
41
  "text": "Choose preferred time of day"
@@ -13,28 +13,28 @@
13
13
  "name": "contact",
14
14
  "checkboxes": [
15
15
  {
16
- "id": "post",
16
+ "id": "post-example-checkbox-with-revealed-select",
17
17
  "label": {
18
18
  "text": "By post"
19
19
  },
20
20
  "value": "post"
21
21
  },
22
22
  {
23
- "id": "email",
23
+ "id": "email-example-checkbox-with-revealed-select",
24
24
  "label": {
25
25
  "text": "By email"
26
26
  },
27
27
  "value": "email"
28
28
  },
29
29
  {
30
- "id": "phone",
30
+ "id": "phone-example-checkbox-with-revealed-select",
31
31
  "label": {
32
32
  "text": "By phone"
33
33
  },
34
34
  "value": "phone",
35
35
  "other": {
36
36
  "otherType": "select",
37
- "id": "phone-time",
37
+ "id": "phone-time-example-checkbox-with-revealed-select",
38
38
  "name": "phone-time",
39
39
  "label": {
40
40
  "text": "Choose preferred time of day"
@@ -12,42 +12,42 @@
12
12
  "dontWrap": true,
13
13
  "checkboxes": [
14
14
  {
15
- "id": "gluten-free",
15
+ "id": "gluten-free-example-checkbox-with-revealed-text-input-expanded",
16
16
  "label": {
17
17
  "text": "Gluten free"
18
18
  },
19
19
  "value": "gluten-free"
20
20
  },
21
21
  {
22
- "id": "lactose-intolerant",
22
+ "id": "lactose-intolerant-example-checkbox-with-revealed-text-input-expanded",
23
23
  "label": {
24
24
  "text": "Lactose intolerant"
25
25
  },
26
26
  "value": "lactose-intolerant"
27
27
  },
28
28
  {
29
- "id": "vegan",
29
+ "id": "vegan-example-checkbox-with-revealed-text-input-expanded",
30
30
  "label": {
31
31
  "text": "Vegan"
32
32
  },
33
33
  "value": "vegan"
34
34
  },
35
35
  {
36
- "id": "vegetarian",
36
+ "id": "vegetarian-example-checkbox-with-revealed-text-input-expanded",
37
37
  "label": {
38
38
  "text": "Vegetarian"
39
39
  },
40
40
  "value": "vegetarian"
41
41
  },
42
42
  {
43
- "id": "other-checkbox",
43
+ "id": "other-checkbox-with-revealed-text-input-expanded",
44
44
  "label": {
45
45
  "text": "Other"
46
46
  },
47
47
  "value": "other",
48
48
  "checked": true,
49
49
  "other": {
50
- "id": "other-textbox",
50
+ "id": "other-textbox-example-checkbox-with-revealed-text-input-expanded",
51
51
  "name": "other-answer",
52
52
  "label": {
53
53
  "text": "Enter dietary requirements"
@@ -12,41 +12,41 @@
12
12
  "dontWrap": true,
13
13
  "checkboxes": [
14
14
  {
15
- "id": "gluten-free",
15
+ "id": "gluten-free-example-checkbox-with-revealed-text-input",
16
16
  "label": {
17
17
  "text": "Gluten free"
18
18
  },
19
19
  "value": "gluten-free"
20
20
  },
21
21
  {
22
- "id": "lactose-intolerant",
22
+ "id": "lactose-intolerant-example-checkbox-with-revealed-text-input",
23
23
  "label": {
24
24
  "text": "Lactose intolerant"
25
25
  },
26
26
  "value": "lactose-intolerant"
27
27
  },
28
28
  {
29
- "id": "vegan",
29
+ "id": "vegan-example-checkbox-with-revealed-text-input",
30
30
  "label": {
31
31
  "text": "Vegan"
32
32
  },
33
33
  "value": "vegan"
34
34
  },
35
35
  {
36
- "id": "vegetarian",
36
+ "id": "vegetarian-example-checkbox-with-revealed-text-input",
37
37
  "label": {
38
38
  "text": "Vegetarian"
39
39
  },
40
40
  "value": "vegetarian"
41
41
  },
42
42
  {
43
- "id": "other-checkbox",
43
+ "id": "other-checkbox-with-revealed-text-input",
44
44
  "label": {
45
45
  "text": "Other"
46
46
  },
47
47
  "value": "other",
48
48
  "other": {
49
- "id": "other-textbox",
49
+ "id": "other-textbox-example-checkbox-with-revealed-text-input",
50
50
  "name": "other-answer",
51
51
  "label": {
52
52
  "text": "Enter dietary requirements"
@@ -18,28 +18,28 @@
18
18
  },
19
19
  "checkboxes": [
20
20
  {
21
- "id": "mobile-phone",
21
+ "id": "mobile-phone-example-checkbox-with-select-all-button",
22
22
  "label": {
23
23
  "text": "Mobile phone"
24
24
  },
25
25
  "value": "mobile-phone"
26
26
  },
27
27
  {
28
- "id": "tablet",
28
+ "id": "tablet-example-checkbox-with-select-all-button",
29
29
  "label": {
30
30
  "text": "Tablet"
31
31
  },
32
32
  "value": "tablet"
33
33
  },
34
34
  {
35
- "id": "laptop",
35
+ "id": "laptop-example-checkbox-with-select-all-button",
36
36
  "label": {
37
37
  "text": "Laptop"
38
38
  },
39
39
  "value": "laptop"
40
40
  },
41
41
  {
42
- "id": "desktop",
42
+ "id": "desktop-example-checkbox-with-select-all-button",
43
43
  "label": {
44
44
  "text": "Desktop computer"
45
45
  },
@@ -13,42 +13,42 @@
13
13
  "name": "dietary",
14
14
  "checkboxes": [
15
15
  {
16
- "id": "gluten-free",
16
+ "id": "gluten-free-example-checkbox-with-visible-text-input",
17
17
  "label": {
18
18
  "text": "Gluten free"
19
19
  },
20
20
  "value": "gluten-free"
21
21
  },
22
22
  {
23
- "id": "lactose-intolerant",
23
+ "id": "lactose-intolerant-example-checkbox-with-visible-text-input",
24
24
  "label": {
25
25
  "text": "Lactose intolerant"
26
26
  },
27
27
  "value": "lactose-intolerant"
28
28
  },
29
29
  {
30
- "id": "vegan",
30
+ "id": "vegan-example-checkbox-with-visible-text-input",
31
31
  "label": {
32
32
  "text": "Vegan"
33
33
  },
34
34
  "value": "vegan"
35
35
  },
36
36
  {
37
- "id": "vegetarian",
37
+ "id": "vegetarian-example-checkbox-with-visible-text-input",
38
38
  "label": {
39
39
  "text": "Vegetarian"
40
40
  },
41
41
  "value": "vegetarian"
42
42
  },
43
43
  {
44
- "id": "other-checkbox",
44
+ "id": "other-checkbox-with-visible-text-input",
45
45
  "label": {
46
46
  "text": "Other"
47
47
  },
48
48
  "value": "other",
49
49
  "other": {
50
50
  "open": true,
51
- "id": "other-textbox",
51
+ "id": "other-textbox-example-checkbox-with-visible-text-input",
52
52
  "name": "other-answer",
53
53
  "label": {
54
54
  "text": "Enter dietary requirements"
@@ -8,21 +8,21 @@
8
8
  "borderless": true,
9
9
  "checkboxes": [
10
10
  {
11
- "id": "booklet",
11
+ "id": "booklet-example-checkbox-without-border",
12
12
  "label": {
13
13
  "text": "Booklet"
14
14
  },
15
15
  "value": "booklet"
16
16
  },
17
17
  {
18
- "id": "logo",
18
+ "id": "logo-example-checkbox-without-border",
19
19
  "label": {
20
20
  "text": "Logo"
21
21
  },
22
22
  "value": "logo"
23
23
  },
24
24
  {
25
- "id": "poster",
25
+ "id": "poster-example-checkbox-without-border",
26
26
  "label": {
27
27
  "text": "Poster"
28
28
  },
@@ -13,28 +13,28 @@
13
13
  "name": "devices",
14
14
  "checkboxes": [
15
15
  {
16
- "id": "mobile-phone",
16
+ "id": "mobile-phone-example",
17
17
  "label": {
18
18
  "text": "Mobile phone"
19
19
  },
20
20
  "value": "mobile-phone"
21
21
  },
22
22
  {
23
- "id": "tablet",
23
+ "id": "tablet-example",
24
24
  "label": {
25
25
  "text": "Tablet"
26
26
  },
27
27
  "value": "tablet"
28
28
  },
29
29
  {
30
- "id": "laptop",
30
+ "id": "laptop-example",
31
31
  "label": {
32
32
  "text": "Laptop"
33
33
  },
34
34
  "value": "laptop"
35
35
  },
36
36
  {
37
- "id": "desktop",
37
+ "id": "desktop-example",
38
38
  "label": {
39
39
  "text": "Desktop computer"
40
40
  },
@@ -1,35 +1,50 @@
1
1
  {% macro onsCookiesBanner(params) %}
2
+ {% from "components/button/_macro.njk" import onsButton %}
3
+
2
4
  {% if params.lang == 'cy' %}
3
5
  {% set ariaLabel = 'Cwcis' %}
4
6
  {% set serviceName = 'ons.gov.uk' %}
7
+ {% set defaultCookiesLink = '/cwics' %}
5
8
  {% set statementTitle = 'Cwcis ar' %}
6
9
  {% set settingsLinkText = 'Gweld cwcis' %}
7
- {% set settingsLinkURL = params.settingsLinkTextURL | default('/cwics') %}
8
- {% set statementText = '<p>Ffeiliau bach a gaiff eu storio ar eich dyfais pan fyddwch yn mynd ar wefan yw cwcis. Rydym ni’n defnyddio rhai cwcis hanfodol i wneud i’r wefan hon weithio.</p><p>Hoffem osod <a href="' + settingsLinkURL + '">cwcis ychwanegol</a> er mwyn cofio eich gosodiadau a deall sut rydych chi’n defnyddio’r wefan. Mae hyn yn ein helpu ni i wella ein gwasanaethau.</p>' %}
9
10
  {% set acceptButtonText = 'Derbyn cwcis ychwanegol' %}
10
11
  {% set rejectButtonText = 'Gwrthod cwcis ychwanegol' %}
11
12
  {% set acceptedText = 'Rydych chi wedi derbyn yr holl gwcis ychwanegol.' %}
12
- {% set rejectedText = 'Rydych chi wedi gwrthod yr holl gwcis ychwanegol. ' %}
13
- {% set preferencesText = 'Gallwch chi <a href="' + settingsLinkURL + '">newid eich dewisiadau o ran cwcis</a> ar unrhyw adeg.' %}
13
+ {% set rejectedText = 'Rydych chi wedi gwrthod yr holl gwcis ychwanegol.' %}
14
14
  {% set confirmationButtonText = 'Cuddio' %}
15
- {% set confirmationButtonTextAria = 'neges hon' %}
15
+ {% set contextSuffix = 'neges hon' %}
16
+ {% set beforeLinkPreferencesURL = 'Gallwch chi' %}
17
+ {% set afterLinkPreferencesURL = '"newid eich dewisiadau o ran cwcis</a> ar unrhyw adeg.' %}
18
+ {% set beforeLinkStatementText = '<p>Ffeiliau bach a gaiff eu storio ar eich dyfais pan fyddwch yn mynd ar wefan yw cwcis. Rydym ni’n defnyddio rhai cwcis hanfodol i wneud i’r wefan hon weithio.</p><p>Hoffem osod' %}
19
+ {% set afterLinkStatementText = 'cwcis ychwanegol</a> er mwyn cofio eich gosodiadau a deall sut rydych chi’n defnyddio’r wefan. Mae hyn yn ein helpu ni i wella ein gwasanaethau.</p>' %}
16
20
  {% else %}
17
21
  {% set ariaLabel = 'Cookies banner' %}
18
22
  {% set serviceName = 'ons.gov.uk' %}
23
+ {% set defaultCookiesLink = '/cookies' %}
19
24
  {% set statementTitle = 'Cookies on' %}
20
25
  {% set settingsLinkText = 'View cookies' %}
21
- {% set settingsLinkURL = params.settingsLinkTextURL | default('/cookies') %}
22
- {% set statementText = '<p>Cookies are small files stored on your device when you visit a website. We use some essential cookies to make this website work.</p><p>We would like to set <a href="' + settingsLinkURL + '">additional cookies</a> to remember your settings and understand how you use the site. This helps us to improve our services. </p>' %}
23
26
  {% set acceptButtonText = 'Accept additional cookies' %}
24
27
  {% set rejectButtonText = 'Reject additional cookies' %}
25
28
  {% set acceptedText = 'You have accepted all additional cookies.' %}
26
- {% set rejectedText = 'You have rejected all additional cookies.' %}
27
- {% set preferencesText = 'You can <a href="' + settingsLinkURL + '">change your cookie preferences</a> at any time.' %}
29
+ {% set rejectedText = 'You have rejected all additional cookies.' %}
28
30
  {% set confirmationButtonText = 'Hide' %}
29
31
  {% set contextSuffix = 'this message' %}
32
+ {% set beforeLinkPreferencesURL = 'You can' %}
33
+ {% set afterLinkPreferencesURL = 'change your cookie preferences</a> at any time.' %}
34
+ {% set beforeLinkStatementText = '<p>Cookies are small files stored on your device when you visit a website. We use some essential cookies to make this website work.</p><p>We would like to set' %}
35
+ {% set afterLinkStatementText = 'additional cookies</a> to remember your settings and understand how you use the site. This helps us to improve our services. </p>' %}
30
36
  {% endif %}
31
37
 
32
- <div class="ons-cookies-banner" role="region" aria-label="{{ params.ariaLabel | default(ariaLabel)}}">
38
+ {% if not isDesignSystemExample %}
39
+ {% set settingsLinkURL = params.settingsLinkTextURL | default(defaultCookiesLink) %}
40
+ {% else %}
41
+ {% set settingsLinkURL = '#0' %}
42
+ {% endif %}
43
+
44
+ {% set statementText = beforeLinkStatementText + ' <a href="' + settingsLinkURL + '">' + afterLinkStatementText %}
45
+ {% set preferencesText = beforeLinkPreferencesURL + ' <a href="' + settingsLinkURL + '">' + afterLinkPreferencesURL %}
46
+
47
+ <div class="ons-cookies-banner" role="region" aria-label="{{ params.ariaLabel | default(ariaLabel) }}">
33
48
  <div class="ons-container{{ ' ons-container--full-width' if params.fullWidth }}{{ ' ons-container--wide' if params.wide }} ons-cookies-banner__primary">
34
49
  <div class="ons-grid">
35
50
  <div class="ons-grid__col ons-col-8@m">
@@ -39,50 +54,49 @@
39
54
  </div>
40
55
  <div class="ons-grid ons-grid--flex ons-u-mt-s">
41
56
  <div class="ons-grid__col">
42
- {% from "components/button/_macro.njk" import onsButton %}
43
57
  {{
44
- onsButton({
45
- "type": 'button',
46
- "attributes": {
47
- "data-button": 'accept'
48
- },
49
- "text": params.acceptButtonText | default(acceptButtonText),
50
- "classes": 'ons-btn--small ons-js-accept-cookies ons-cookies-banner__btn'
51
- })
58
+ onsButton({
59
+ "type": 'button',
60
+ "attributes": {
61
+ "data-button": 'accept'
62
+ },
63
+ "text": params.acceptButtonText | default(acceptButtonText),
64
+ "classes": 'ons-btn--small ons-js-accept-cookies ons-cookies-banner__btn'
65
+ })
52
66
  }}
53
67
  </div>
54
68
  <div class="ons-grid__col">
55
69
  {{
56
- onsButton({
57
- "type": 'button',
58
- "attributes": {
59
- "data-button": 'reject'
60
- },
61
- "text": params.rejectButtonText | default(rejectButtonText),
62
- "classes": 'ons-btn--small ons-js-reject-cookies ons-cookies-banner__btn'
63
- })
70
+ onsButton({
71
+ "type": 'button',
72
+ "attributes": {
73
+ "data-button": 'reject'
74
+ },
75
+ "text": params.rejectButtonText | default(rejectButtonText),
76
+ "classes": 'ons-btn--small ons-js-reject-cookies ons-cookies-banner__btn'
77
+ })
64
78
  }}
65
79
  </div>
66
80
  <div class="ons-grid__col">
67
- <a class="ons-cookies-banner__link" href="{{ params.settingsLinkURL | default(settingsLinkURL) }}">{{ params.settingsLinkText | default(settingsLinkText) }}</a>
81
+ <a class="ons-cookies-banner__link" href="{{ settingsLinkURL }}">{{ params.settingsLinkText | default(settingsLinkText) }}</a>
68
82
  </div>
69
83
  </div>
70
84
  </div>
71
85
  <div class="ons-container{{ ' ons-container--full-width' if params.fullWidth }}{{ ' ons-container--wide' if params.wide }} ons-cookies-banner__confirmation ons-u-d-no">
72
86
  <div class="ons-grid ons-grid--flex ons-grid--between ons-grid--gutterless ons-grid--no-wrap@s ons-grid--vertical-center">
73
- <div class="ons-grid__col ons-grid__col--flex ons-col-auto ons-u-flex-shrink@s">
74
- <p class="ons-cookies-banner__desc ons-u-mb-no@s ons-u-mr-s@s"><span class="ons-js-accepted-text ons-u-d-no">{{ params.acceptedText | default(acceptedText) | safe }} </span><span class="ons-js-rejected-text ons-u-d-no">{{ params.rejectedText | default(rejectedText) | safe }} </span><span class="ons-cookies-banner__preferences-text">{{ params.preferencesText | default(preferencesText) | safe }}</span></p>
75
- </div>
76
- <div class="ons-grid__col">
77
- {{
78
- onsButton({
79
- "type": 'button',
80
- "text": params.confirmationButtonText | default(confirmationButtonText),
81
- "buttonContext": params.contextSuffix | default(contextSuffix),
82
- "classes": 'ons-btn--secondary ons-btn--small ons-js-hide-button'
83
- })
84
- }}
85
- </div>
87
+ <div class="ons-grid__col ons-grid__col--flex ons-col-auto ons-u-flex-shrink@s">
88
+ <p class="ons-cookies-banner__desc ons-u-mb-no@s ons-u-mr-s@s"><span class="ons-js-accepted-text ons-u-d-no">{{ params.acceptedText | default(acceptedText) | safe }} </span><span class="ons-js-rejected-text ons-u-d-no">{{ params.rejectedText | default(rejectedText) | safe }} </span><span class="ons-cookies-banner__preferences-text">{{ params.preferencesText | default(preferencesText) | safe }}</span></p>
89
+ </div>
90
+ <div class="ons-grid__col">
91
+ {{
92
+ onsButton({
93
+ "type": 'button',
94
+ "text": params.confirmationButtonText | default(confirmationButtonText),
95
+ "buttonContext": params.contextSuffix | default(contextSuffix),
96
+ "classes": 'ons-btn--secondary ons-btn--small ons-js-hide-button'
97
+ })
98
+ }}
99
+ </div>
86
100
  </div>
87
101
  </div>
88
102
  </div>