@ons/design-system 73.13.1 → 74.0.0-cookies.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.
Files changed (81) hide show
  1. package/README.md +12 -2
  2. package/components/access-code/example-access-code-error.njk +2 -2
  3. package/components/access-code/example-access-code.njk +2 -2
  4. package/components/address-input/_macro.njk +6 -6
  5. package/components/address-input/_macro.spec.js +0 -3
  6. package/components/address-output/_macro.njk +1 -1
  7. package/components/announcement-banner/_announcement-banner.scss +5 -0
  8. package/components/autosuggest/_autosuggest.scss +8 -0
  9. package/components/autosuggest/autosuggest.ui.js +8 -5
  10. package/components/back-to-top/_back-to-top.scss +7 -0
  11. package/components/back-to-top/_macro.njk +1 -1
  12. package/components/back-to-top/example-full-page-back-to-top.njk +1 -1
  13. package/components/breadcrumbs/_breadcrumbs.scss +4 -7
  14. package/components/breadcrumbs/_macro.njk +29 -25
  15. package/components/breadcrumbs/_macro.spec.js +39 -0
  16. package/components/breadcrumbs/example-breadcrumbs-wide.njk +52 -0
  17. package/components/char-check-limit/_macro.njk +16 -14
  18. package/components/cookies-banner/_macro.njk +1 -1
  19. package/components/cookies-banner/_macro.spec.js +15 -3
  20. package/components/details/_details.scss +9 -0
  21. package/components/details/example-details-with-warning.njk +1 -1
  22. package/components/details-panel/_macro.njk +1 -1
  23. package/components/featured-article/_macro.njk +4 -4
  24. package/components/featured-article/macro.spec.js +2 -2
  25. package/components/feedback/_macro.njk +4 -1
  26. package/components/feedback/_macro.spec.js +1 -1
  27. package/components/figure/_figure.scss +1 -0
  28. package/components/figure/_macro.njk +3 -3
  29. package/components/footer/_macro.njk +5 -2
  30. package/components/header/_macro.njk +7 -3
  31. package/components/header/_macro.spec.js +27 -0
  32. package/components/hero/_hero.scss +4 -0
  33. package/components/hero/_macro.njk +3 -2
  34. package/components/hero/_macro.spec.js +36 -0
  35. package/components/hero/example-hero-dark-wide.njk +17 -0
  36. package/components/hero/example-hero-dark-with-external-breadcrumbs.njk +17 -21
  37. package/components/hero/example-hero-default-full-width.njk +16 -0
  38. package/components/hero/example-hero-default-with-external-breadcrumbs.njk +165 -169
  39. package/components/hero/example-hero-grey-with-external-breadcrumbs.njk +207 -211
  40. package/components/hero/example-hero-navy-blue-with-external-breadcrumbs.njk +163 -167
  41. package/components/hero/example-hero-pale-blue-with-external-breadcrumbs.njk +165 -169
  42. package/components/input/_input.scss +4 -0
  43. package/components/input/_macro.njk +4 -1
  44. package/components/label/_label.scss +3 -0
  45. package/components/list/_list.scss +5 -0
  46. package/components/message-list/_message-list.scss +2 -0
  47. package/components/panel/_macro.njk +1 -1
  48. package/components/panel/_panel.scss +8 -0
  49. package/components/panel/example-panel-bare.njk +1 -1
  50. package/components/phase-banner/_phase-banner.scss +1 -0
  51. package/components/question/example-question-ccs.njk +1 -1
  52. package/components/question/example-question-fieldset.njk +1 -1
  53. package/components/question/example-question-interviewer-note.njk +1 -1
  54. package/components/question/example-question-no-fieldset.njk +1 -1
  55. package/components/quote/_macro.njk +1 -1
  56. package/components/relationships/example-relationships-error.njk +1 -1
  57. package/components/relationships/example-relationships-you.njk +1 -1
  58. package/components/relationships/example-relationships.njk +1 -1
  59. package/components/skip-to-content/_macro.njk +1 -1
  60. package/components/skip-to-content/_skip.scss +8 -0
  61. package/components/summary/_macro.njk +3 -2
  62. package/components/summary/_summary.scss +6 -1
  63. package/components/table-of-contents/example-table-of-contents-sticky-full-page-ordered.njk +105 -107
  64. package/components/table-of-contents/example-table-of-contents-sticky-full-page.njk +104 -106
  65. package/components/table-of-contents/example-table-of-contents-sticky.njk +1 -1
  66. package/components/table-of-contents/table-of-contents.spec.js +4 -5
  67. package/css/main.css +1 -1
  68. package/js/cookies-functions.js +46 -40
  69. package/js/cookies-functions.spec.js +103 -46
  70. package/layout/_template.njk +60 -47
  71. package/package.json +1 -1
  72. package/scripts/main.es5.js +1 -1
  73. package/scripts/main.js +1 -1
  74. package/scss/base/_typography.scss +9 -0
  75. package/scss/helpers/_mixins.scss +8 -0
  76. package/scss/objects/_page.scss +1 -1
  77. package/scss/objects/_spacing.scss +0 -4
  78. package/scss/utilities/_utilities.scss +10 -0
  79. package/scss/vars/_forms.scss +2 -1
  80. package/scss/vars/_index.scss +1 -0
  81. package/scss/vars/_utilities.scss +2 -0
@@ -34,123 +34,121 @@ layout: ~
34
34
  }
35
35
  %}
36
36
 
37
- {% block main %}
38
- <div class="ons-page__container ons-container">
39
- <div class="ons-grid ons-js-table-of-contents-container">
40
- <div class="ons-grid__col ons-grid__col--sticky@m ons-col-4@m">
41
- {{
42
- onsTableOfContents({
43
- "title": 'Contents',
44
- "ariaLabel": 'Sections in this page',
45
- "ordered": true,
46
- "itemsList": [
47
- {
48
- "url": '#section1',
49
- "text": 'What is the census?'
50
- },
51
- {
52
- "url": '#section2',
53
- "text": 'The online census has now closed'
54
- },
55
- {
56
- "url": '#section3',
57
- "text": 'What happens after Census Day'
58
- },
59
- {
60
- "url": '#section4',
61
- "text": 'The census in Northern Ireland and Scotland'
62
- },
63
- {
64
- "url": '#section5',
65
- "text": 'The last census'
66
- }
67
- ]
68
- })
69
- }}
70
- </div>
71
- <div class="ons-grid__col ons-col-7@m ons-push-1@m">
72
- <section id="section1">
73
- <h2>1. What is the census?</h2>
74
- <p>
75
- The census is a survey that happens every 10 years and gives us a picture of all the people and households in
76
- England and Wales.
77
- </p>
37
+ {% block mainContent %}
38
+ <div class="ons-grid ons-js-table-of-contents-container">
39
+ <div class="ons-grid__col ons-grid__col--sticky@m ons-col-4@m">
40
+ {{
41
+ onsTableOfContents({
42
+ "title": 'Contents',
43
+ "ariaLabel": 'Sections in this page',
44
+ "ordered": true,
45
+ "itemsList": [
46
+ {
47
+ "url": '#section1',
48
+ "text": 'What is the census?'
49
+ },
50
+ {
51
+ "url": '#section2',
52
+ "text": 'The online census has now closed'
53
+ },
54
+ {
55
+ "url": '#section3',
56
+ "text": 'What happens after Census Day'
57
+ },
58
+ {
59
+ "url": '#section4',
60
+ "text": 'The census in Northern Ireland and Scotland'
61
+ },
62
+ {
63
+ "url": '#section5',
64
+ "text": 'The last census'
65
+ }
66
+ ]
67
+ })
68
+ }}
69
+ </div>
70
+ <div class="ons-grid__col ons-col-8@m">
71
+ <section id="section1">
72
+ <h2>1. What is the census?</h2>
73
+ <p>
74
+ The census is a survey that happens every 10 years and gives us a picture of all the people and households in
75
+ England and Wales.
76
+ </p>
78
77
 
79
- <p>
80
- Your answers to the census questions will help organisations make decisions on planning and funding public services
81
- in your area, including transport, education and healthcare.
82
- </p>
83
- </section>
84
- <section id="section2">
85
- <h2>2. The online census has now closed</h2>
86
- <p>Census Day was on Sunday 21 March 2021.</p>
78
+ <p>
79
+ Your answers to the census questions will help organisations make decisions on planning and funding public services
80
+ in your area, including transport, education and healthcare.
81
+ </p>
82
+ </section>
83
+ <section id="section2">
84
+ <h2>2. The online census has now closed</h2>
85
+ <p>Census Day was on Sunday 21 March 2021.</p>
87
86
 
88
- <p>
89
- If you still have a paper census questionnaire, fill it in as soon as you can and return it to FREEPOST, Census
90
- 2021.
91
- </p>
92
- </section>
93
- <section id="section3">
94
- <h2>3. What happens after Census Day</h2>
95
- <p>
96
- Two follow-up surveys, the <a href="#0">Census Coverage Survey</a> and the <a href="#0">Census Quality Survey</a>,
97
- help to improve the quality and accuracy of the census results.
98
- </p>
87
+ <p>
88
+ If you still have a paper census questionnaire, fill it in as soon as you can and return it to FREEPOST, Census
89
+ 2021.
90
+ </p>
91
+ </section>
92
+ <section id="section3">
93
+ <h2>3. What happens after Census Day</h2>
94
+ <p>
95
+ Two follow-up surveys, the <a href="#0">Census Coverage Survey</a> and the <a href="#0">Census Quality Survey</a>,
96
+ help to improve the quality and accuracy of the census results.
97
+ </p>
99
98
 
100
- <p>
101
- Over the next year, we work hard to process the answers from all the census questionnaires. This is so that we can
102
- publish the initial Census 2021 findings one year after the census and the main releases two years after the census.
103
- </p>
99
+ <p>
100
+ Over the next year, we work hard to process the answers from all the census questionnaires. This is so that we can
101
+ publish the initial Census 2021 findings one year after the census and the main releases two years after the census.
102
+ </p>
104
103
 
105
- <p>
106
- To make sure the Census 2021 statistics we publish meet the needs of those who use them, we also run an outputs
107
- consultation.
108
- </p>
109
- </section>
110
- <section id="section4">
111
- <h2>4. The census in Northern Ireland and Scotland</h2>
112
- <p>The Office for National Statistics (ONS) runs the census in England and Wales.</p>
104
+ <p>
105
+ To make sure the Census 2021 statistics we publish meet the needs of those who use them, we also run an outputs
106
+ consultation.
107
+ </p>
108
+ </section>
109
+ <section id="section4">
110
+ <h2>4. The census in Northern Ireland and Scotland</h2>
111
+ <p>The Office for National Statistics (ONS) runs the census in England and Wales.</p>
113
112
 
114
- <p>
115
- If you live in Northern Ireland, visit the Northern Ireland Statistics Agency (NISRA) census website to find out
116
- about the census for Northern Ireland.
117
- </p>
113
+ <p>
114
+ If you live in Northern Ireland, visit the Northern Ireland Statistics Agency (NISRA) census website to find out
115
+ about the census for Northern Ireland.
116
+ </p>
118
117
 
119
- <p>
120
- If you live in Scotland, visit the National Records of Scotland census website to find out how to take part in the
121
- census for Scotland.
122
- </p>
123
- </section>
124
- <section id="section5">
125
- <h2>5. The last census</h2>
126
- <p>
127
- The last census took place in 2011. Many people and organisations used information from the 2011 Census in a variety
128
- of ways.
129
- </p>
118
+ <p>
119
+ If you live in Scotland, visit the National Records of Scotland census website to find out how to take part in the
120
+ census for Scotland.
121
+ </p>
122
+ </section>
123
+ <section id="section5">
124
+ <h2>5. The last census</h2>
125
+ <p>
126
+ The last census took place in 2011. Many people and organisations used information from the 2011 Census in a variety
127
+ of ways.
128
+ </p>
130
129
 
131
- <p>
132
- For example, Bristol City Council used it to inform decisions on how to fund local housing improvements. It was also
133
- essential for the charity Redbridge Council for Voluntary Services to help people from ethnic minority groups learn
134
- more about dementia.
135
- </p>
130
+ <p>
131
+ For example, Bristol City Council used it to inform decisions on how to fund local housing improvements. It was also
132
+ essential for the charity Redbridge Council for Voluntary Services to help people from ethnic minority groups learn
133
+ more about dementia.
134
+ </p>
136
135
 
137
- <p>
138
- To read more about the benefits that information from the 2011 Census helped to create, visit the Office for
139
- National Statistics (ONS) website.
140
- </p>
141
- <p>
142
- The Census Coverage Survey (CCS) was a short, separate survey that we at the Office for National Statistics (ONS)
143
- started six to eight weeks after Census Day.
144
- </p>
136
+ <p>
137
+ To read more about the benefits that information from the 2011 Census helped to create, visit the Office for
138
+ National Statistics (ONS) website.
139
+ </p>
140
+ <p>
141
+ The Census Coverage Survey (CCS) was a short, separate survey that we at the Office for National Statistics (ONS)
142
+ started six to eight weeks after Census Day.
143
+ </p>
145
144
 
146
- <p>
147
- The CCS helps make sure everyone is counted and our census results are as accurate as possible. It asked similar
148
- questions to the main census, just fewer of them, at addresses in a selection of postcodes across England and Wales.
149
- </p>
145
+ <p>
146
+ The CCS helps make sure everyone is counted and our census results are as accurate as possible. It asked similar
147
+ questions to the main census, just fewer of them, at addresses in a selection of postcodes across England and Wales.
148
+ </p>
150
149
 
151
- <p>The CCS has now closed.</p>
152
- </section>
153
- </div>
150
+ <p>The CCS has now closed.</p>
151
+ </section>
154
152
  </div>
155
153
  </div>
156
154
  {% endblock %}
@@ -34,122 +34,120 @@ layout: ~
34
34
  }
35
35
  %}
36
36
 
37
- {% block main %}
38
- <div class="ons-page__container ons-container">
39
- <div class="ons-grid ons-js-table-of-contents-container">
40
- <div class="ons-grid__col ons-grid__col--sticky@m ons-col-4@m">
41
- {{
42
- onsTableOfContents({
43
- "title": 'Contents',
44
- "ariaLabel": 'Sections in this page',
45
- "itemsList": [
46
- {
47
- "url": '#section1',
48
- "text": 'What is the census?'
49
- },
50
- {
51
- "url": '#section2',
52
- "text": 'The online census has now closed'
53
- },
54
- {
55
- "url": '#section3',
56
- "text": 'What happens after Census Day'
57
- },
58
- {
59
- "url": '#section4',
60
- "text": 'The census in Northern Ireland and Scotland'
61
- },
62
- {
63
- "url": '#section5',
64
- "text": 'The last census'
65
- }
66
- ]
67
- })
68
- }}
69
- </div>
70
- <div class="ons-grid__col ons-col-7@m ons-push-1@m">
71
- <section id="section1">
72
- <h2>What is the census?</h2>
73
- <p>
74
- The census is a survey that happens every 10 years and gives us a picture of all the people and households in
75
- England and Wales.
76
- </p>
37
+ {% block mainContent %}
38
+ <div class="ons-grid ons-js-table-of-contents-container">
39
+ <div class="ons-grid__col ons-grid__col--sticky@m ons-col-4@m">
40
+ {{
41
+ onsTableOfContents({
42
+ "title": 'Contents',
43
+ "ariaLabel": 'Sections in this page',
44
+ "itemsList": [
45
+ {
46
+ "url": '#section1',
47
+ "text": 'What is the census?'
48
+ },
49
+ {
50
+ "url": '#section2',
51
+ "text": 'The online census has now closed'
52
+ },
53
+ {
54
+ "url": '#section3',
55
+ "text": 'What happens after Census Day'
56
+ },
57
+ {
58
+ "url": '#section4',
59
+ "text": 'The census in Northern Ireland and Scotland'
60
+ },
61
+ {
62
+ "url": '#section5',
63
+ "text": 'The last census'
64
+ }
65
+ ]
66
+ })
67
+ }}
68
+ </div>
69
+ <div class="ons-grid__col ons-col-8@m">
70
+ <section id="section1">
71
+ <h2>What is the census?</h2>
72
+ <p>
73
+ The census is a survey that happens every 10 years and gives us a picture of all the people and households in
74
+ England and Wales.
75
+ </p>
77
76
 
78
- <p>
79
- Your answers to the census questions will help organisations make decisions on planning and funding public services
80
- in your area, including transport, education and healthcare.
81
- </p>
82
- </section>
83
- <section id="section2">
84
- <h2>The online census has now closed</h2>
85
- <p>Census Day was on Sunday 21 March 2021.</p>
77
+ <p>
78
+ Your answers to the census questions will help organisations make decisions on planning and funding public services
79
+ in your area, including transport, education and healthcare.
80
+ </p>
81
+ </section>
82
+ <section id="section2">
83
+ <h2>The online census has now closed</h2>
84
+ <p>Census Day was on Sunday 21 March 2021.</p>
86
85
 
87
- <p>
88
- If you still have a paper census questionnaire, fill it in as soon as you can and return it to FREEPOST, Census
89
- 2021.
90
- </p>
91
- </section>
92
- <section id="section3">
93
- <h2>What happens after Census Day</h2>
94
- <p>
95
- Two follow-up surveys, the <a href="#0">Census Coverage Survey</a> and the <a href="#0">Census Quality Survey</a>,
96
- help to improve the quality and accuracy of the census results.
97
- </p>
86
+ <p>
87
+ If you still have a paper census questionnaire, fill it in as soon as you can and return it to FREEPOST, Census
88
+ 2021.
89
+ </p>
90
+ </section>
91
+ <section id="section3">
92
+ <h2>What happens after Census Day</h2>
93
+ <p>
94
+ Two follow-up surveys, the <a href="#0">Census Coverage Survey</a> and the <a href="#0">Census Quality Survey</a>,
95
+ help to improve the quality and accuracy of the census results.
96
+ </p>
98
97
 
99
- <p>
100
- Over the next year, we work hard to process the answers from all the census questionnaires. This is so that we can
101
- publish the initial Census 2021 findings one year after the census and the main releases two years after the census.
102
- </p>
98
+ <p>
99
+ Over the next year, we work hard to process the answers from all the census questionnaires. This is so that we can
100
+ publish the initial Census 2021 findings one year after the census and the main releases two years after the census.
101
+ </p>
103
102
 
104
- <p>
105
- To make sure the Census 2021 statistics we publish meet the needs of those who use them, we also run an outputs
106
- consultation.
107
- </p>
108
- </section>
109
- <section id="section4">
110
- <h2>The census in Northern Ireland and Scotland</h2>
111
- <p>The Office for National Statistics (ONS) runs the census in England and Wales.</p>
103
+ <p>
104
+ To make sure the Census 2021 statistics we publish meet the needs of those who use them, we also run an outputs
105
+ consultation.
106
+ </p>
107
+ </section>
108
+ <section id="section4">
109
+ <h2>The census in Northern Ireland and Scotland</h2>
110
+ <p>The Office for National Statistics (ONS) runs the census in England and Wales.</p>
112
111
 
113
- <p>
114
- If you live in Northern Ireland, visit the Northern Ireland Statistics Agency (NISRA) census website to find out
115
- about the census for Northern Ireland.
116
- </p>
112
+ <p>
113
+ If you live in Northern Ireland, visit the Northern Ireland Statistics Agency (NISRA) census website to find out
114
+ about the census for Northern Ireland.
115
+ </p>
117
116
 
118
- <p>
119
- If you live in Scotland, visit the National Records of Scotland census website to find out how to take part in the
120
- census for Scotland.
121
- </p>
122
- </section>
123
- <section id="section5">
124
- <h2>The last census</h2>
125
- <p>
126
- The last census took place in 2011. Many people and organisations used information from the 2011 Census in a variety
127
- of ways.
128
- </p>
117
+ <p>
118
+ If you live in Scotland, visit the National Records of Scotland census website to find out how to take part in the
119
+ census for Scotland.
120
+ </p>
121
+ </section>
122
+ <section id="section5">
123
+ <h2>The last census</h2>
124
+ <p>
125
+ The last census took place in 2011. Many people and organisations used information from the 2011 Census in a variety
126
+ of ways.
127
+ </p>
129
128
 
130
- <p>
131
- For example, Bristol City Council used it to inform decisions on how to fund local housing improvements. It was also
132
- essential for the charity Redbridge Council for Voluntary Services to help people from ethnic minority groups learn
133
- more about dementia.
134
- </p>
129
+ <p>
130
+ For example, Bristol City Council used it to inform decisions on how to fund local housing improvements. It was also
131
+ essential for the charity Redbridge Council for Voluntary Services to help people from ethnic minority groups learn
132
+ more about dementia.
133
+ </p>
135
134
 
136
- <p>
137
- To read more about the benefits that information from the 2011 Census helped to create, visit the Office for
138
- National Statistics (ONS) website.
139
- </p>
140
- <p>
141
- The Census Coverage Survey (CCS) was a short, separate survey that we at the Office for National Statistics (ONS)
142
- started six to eight weeks after Census Day.
143
- </p>
135
+ <p>
136
+ To read more about the benefits that information from the 2011 Census helped to create, visit the Office for
137
+ National Statistics (ONS) website.
138
+ </p>
139
+ <p>
140
+ The Census Coverage Survey (CCS) was a short, separate survey that we at the Office for National Statistics (ONS)
141
+ started six to eight weeks after Census Day.
142
+ </p>
144
143
 
145
- <p>
146
- The CCS helps make sure everyone is counted and our census results are as accurate as possible. It asked similar
147
- questions to the main census, just fewer of them, at addresses in a selection of postcodes across England and Wales.
148
- </p>
144
+ <p>
145
+ The CCS helps make sure everyone is counted and our census results are as accurate as possible. It asked similar
146
+ questions to the main census, just fewer of them, at addresses in a selection of postcodes across England and Wales.
147
+ </p>
149
148
 
150
- <p>The CCS has now closed.</p>
151
- </section>
152
- </div>
149
+ <p>The CCS has now closed.</p>
150
+ </section>
153
151
  </div>
154
152
  </div>
155
153
  {% endblock %}
@@ -31,7 +31,7 @@
31
31
  })
32
32
  -}}
33
33
  </div>
34
- <div class="ons-grid__col ons-col-7@m ons-push-1@m">
34
+ <div class="ons-grid__col ons-col-8@m">
35
35
  <section id="section1">
36
36
  <h2>What is the census?</h2>
37
37
  <p>
@@ -6,7 +6,7 @@ describe('script: table-of-contents', () => {
6
6
  beforeEach(async () => {
7
7
  await setTestPage(
8
8
  '/test',
9
- /* eslint-disable indent */
9
+
10
10
  `
11
11
  <div class="ons-page__container ons-container">
12
12
  <div class="ons-grid ons-js-table-of-contents-container">
@@ -47,7 +47,6 @@ describe('script: table-of-contents', () => {
47
47
  </div>
48
48
  </div>
49
49
  `,
50
- /* eslint-enable indent */
51
50
  );
52
51
  });
53
52
 
@@ -68,7 +67,7 @@ describe('script: table-of-contents-fixed-position', () => {
68
67
  beforeEach(async () => {
69
68
  await setTestPage(
70
69
  '/test',
71
- /* eslint-disable indent */
70
+
72
71
  `
73
72
  <div class="ons-page__container ons-container">
74
73
  <div class="ons-grid ons-js-table-of-contents-container">
@@ -146,8 +145,8 @@ describe('script: table-of-contents-fixed-position', () => {
146
145
  </div>
147
146
  </div>
148
147
  `,
149
- /* eslint-enable indent */
150
- 'main',
148
+
149
+ 'mainContent',
151
150
  );
152
151
  });
153
152