@ons/design-system 70.0.8 → 70.0.10

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 (202) hide show
  1. package/components/access-code/_macro.njk +31 -25
  2. package/components/access-code/example-access-code-error.njk +49 -37
  3. package/components/access-code/example-access-code.njk +40 -30
  4. package/components/accordion/_macro.njk +7 -6
  5. package/components/accordion/example-accordion-open.njk +0 -1
  6. package/components/address-input/_macro.njk +23 -11
  7. package/components/address-input/autosuggest.address.js +0 -5
  8. package/components/address-input/example-address-input-editable.njk +52 -50
  9. package/components/address-input/example-address-input-manual.njk +23 -21
  10. package/components/address-input/example-address-input.njk +40 -38
  11. package/components/address-output/_macro.njk +6 -6
  12. package/components/autosuggest/_macro.njk +57 -37
  13. package/components/autosuggest/example-autosuggest-country-multiple.njk +26 -26
  14. package/components/autosuggest/example-autosuggest-country.njk +24 -24
  15. package/components/back-to-top/example-back-to-top.njk +183 -6
  16. package/components/back-to-top/example-full-page-back-to-top.njk +135 -123
  17. package/components/breadcrumbs/_macro.njk +12 -4
  18. package/components/browser-banner/_macro.njk +6 -3
  19. package/components/button/_button.scss +36 -1
  20. package/components/button/_macro.njk +63 -62
  21. package/components/button/example-button-ghost.njk +1 -0
  22. package/components/call-to-action/_macro.njk +7 -5
  23. package/components/call-to-action/example-call-to-action-default.njk +3 -2
  24. package/components/card/_macro.njk +26 -10
  25. package/components/card/example-card-set-with-images.njk +31 -29
  26. package/components/card/example-card-set-with-lists.njk +58 -56
  27. package/components/card/example-card-set.njk +28 -26
  28. package/components/card/example-card.njk +9 -7
  29. package/components/char-check-limit/_macro.njk +1 -3
  30. package/components/checkboxes/_checkbox-macro.njk +19 -15
  31. package/components/checkboxes/_macro.njk +81 -72
  32. package/components/checkboxes/example-checkboxes-disabled.njk +30 -30
  33. package/components/checkboxes/example-checkboxes-error.njk +0 -1
  34. package/components/checkboxes/example-checkboxes-with-descriptions.njk +7 -5
  35. package/components/checkboxes/example-checkboxes-with-hidden-label.njk +162 -170
  36. package/components/checkboxes/example-checkboxes-with-revealed-checkboxes-expanded.njk +81 -81
  37. package/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk +79 -79
  38. package/components/checkboxes/example-checkboxes-with-revealed-select-expanded.njk +7 -5
  39. package/components/checkboxes/example-checkboxes-with-revealed-select.njk +7 -5
  40. package/components/checkboxes/example-checkboxes-with-revealed-text-input-expanded.njk +7 -5
  41. package/components/checkboxes/example-checkboxes-with-revealed-text-input.njk +7 -5
  42. package/components/checkboxes/example-checkboxes-with-select-all-button.njk +7 -5
  43. package/components/checkboxes/example-checkboxes-with-visible-text-input.njk +7 -5
  44. package/components/checkboxes/example-checkboxes.njk +7 -5
  45. package/components/content-pagination/_macro.njk +34 -32
  46. package/components/content-pagination/example-content-pagination.njk +17 -17
  47. package/components/cookies-banner/_macro.njk +19 -6
  48. package/components/cookies-banner/example-cookies-banner-cymraeg.njk +2 -1
  49. package/components/cookies-banner/example-cookies-banner.njk +3 -4
  50. package/components/date-input/_macro.njk +71 -63
  51. package/components/date-input/example-date-input-error-for-single-field.njk +0 -1
  52. package/components/date-input/example-date-input-error.njk +0 -1
  53. package/components/description-list/_macro.njk +20 -11
  54. package/components/details/_macro.njk +18 -11
  55. package/components/details/example-details-with-warning.njk +15 -10
  56. package/components/document-list/_macro.njk +102 -93
  57. package/components/document-list/example-document-list-article-featured.njk +27 -25
  58. package/components/document-list/example-document-list-articles.njk +55 -53
  59. package/components/document-list/example-document-list-downloads.njk +49 -47
  60. package/components/document-list/example-document-list-search-result-featured.njk +19 -17
  61. package/components/document-list/example-document-list-search-results.njk +60 -58
  62. package/components/duration/_macro.njk +61 -55
  63. package/components/duration/example-duration-error-for-single-field.njk +28 -26
  64. package/components/duration/example-duration-single-field.njk +23 -19
  65. package/components/duration/example-duration.njk +33 -29
  66. package/components/error/_macro.njk +8 -6
  67. package/components/external-link/_macro.njk +7 -5
  68. package/components/external-link/example-external-link.njk +9 -6
  69. package/components/feedback/_macro.njk +7 -5
  70. package/components/field/_macro.njk +2 -2
  71. package/components/fieldset/_macro.njk +23 -16
  72. package/components/footer/_macro.njk +28 -21
  73. package/components/footer/_macro.spec.js +1 -1
  74. package/components/footer/example-footer-cymraeg.njk +2 -1
  75. package/components/footer/example-footer-default.njk +3 -4
  76. package/components/footer/example-footer-transactional.njk +2 -1
  77. package/components/footer/example-footer-warning.njk +2 -1
  78. package/components/footer/example-footer-with-alternative-organisation.njk +2 -1
  79. package/components/footer/example-footer-with-coat-of-arms.njk +2 -1
  80. package/components/footer/example-footer-with-copyright.njk +2 -1
  81. package/components/footer/example-footer.njk +2 -1
  82. package/components/header/_header.scss +24 -19
  83. package/components/header/_macro.njk +183 -141
  84. package/components/header/example-header-default.njk +2 -1
  85. package/components/header/example-header-external-for-survey-with-description.njk +2 -1
  86. package/components/header/example-header-external-for-surveys.njk +2 -1
  87. package/components/header/example-header-external-welsh.njk +7 -7
  88. package/components/header/example-header-external-with-navigation-and-search.njk +3 -2
  89. package/components/header/example-header-external-with-navigation.njk +2 -1
  90. package/components/header/example-header-external-with-service-links.njk +2 -1
  91. package/components/header/example-header-external-with-sub-navigation-removed.njk +2 -1
  92. package/components/header/example-header-external-with-sub-navigation.njk +3 -2
  93. package/components/header/example-header-internal.njk +2 -1
  94. package/components/header/example-header-multiple-logos.njk +2 -1
  95. package/components/header/{example-header-neutral-for-multicoloured-logo.njk → example-header-neutral.njk} +2 -1
  96. package/components/helpers/grid.njk +17 -16
  97. package/components/hero/_macro.njk +6 -11
  98. package/components/hero/example-hero-dark.njk +2 -1
  99. package/components/hero/example-hero-default.njk +2 -1
  100. package/components/icon/_macro.njk +601 -168
  101. package/components/image/_macro.njk +7 -5
  102. package/components/input/_macro.njk +114 -95
  103. package/components/input/example-input-search-with-character-check.njk +1 -1
  104. package/components/input/example-input-search-with-placeholder.njk +1 -1
  105. package/components/input/example-input-search.njk +1 -1
  106. package/components/label/_macro.njk +32 -26
  107. package/components/language-selector/_macro.njk +11 -2
  108. package/components/list/_list.scss +13 -0
  109. package/components/list/_macro.njk +93 -73
  110. package/components/message/_macro.njk +20 -7
  111. package/components/message-list/_macro.njk +26 -20
  112. package/components/modal/_macro.njk +11 -12
  113. package/components/multiple-input-fields/_macro.njk +30 -28
  114. package/components/mutually-exclusive/_macro.njk +20 -13
  115. package/components/mutually-exclusive/example-mutually-exclusive-checkboxes.njk +6 -4
  116. package/components/mutually-exclusive/example-mutually-exclusive-date.njk +7 -5
  117. package/components/mutually-exclusive/example-mutually-exclusive-duration.njk +44 -40
  118. package/components/mutually-exclusive/example-mutually-exclusive-email.njk +7 -5
  119. package/components/mutually-exclusive/example-mutually-exclusive-multiple-options.njk +6 -4
  120. package/components/mutually-exclusive/example-mutually-exclusive-number.njk +6 -4
  121. package/components/mutually-exclusive/example-mutually-exclusive-textarea.njk +6 -4
  122. package/components/navigation/_macro.njk +133 -67
  123. package/components/navigation/_navigation.scss +0 -9
  124. package/components/pagination/_macro.njk +42 -20
  125. package/components/panel/_macro.njk +27 -16
  126. package/components/panel/example-panel-bare.njk +6 -4
  127. package/components/panel/example-panel-with-announcement.njk +7 -4
  128. package/components/panel/example-panel-with-error-summary.njk +6 -4
  129. package/components/panel/example-panel-with-warning.njk +5 -3
  130. package/components/password/_macro.njk +7 -5
  131. package/components/phase-banner/_macro.njk +3 -3
  132. package/components/phase-banner/example-phase-banner-alpha.njk +2 -1
  133. package/components/phase-banner/example-phase-banner-beta.njk +4 -3
  134. package/components/question/_macro.njk +62 -47
  135. package/components/question/example-question-ccs.njk +40 -35
  136. package/components/question/example-question-fieldset.njk +84 -80
  137. package/components/question/example-question-interviewer-note.njk +27 -24
  138. package/components/question/example-question-no-fieldset.njk +39 -33
  139. package/components/quote/_macro.njk +3 -1
  140. package/components/radios/_macro.njk +54 -36
  141. package/components/radios/_macro.spec.js +21 -0
  142. package/components/radios/example-radios-with-clear-button-expanded.njk +6 -4
  143. package/components/radios/example-radios-with-clear-button.njk +6 -4
  144. package/components/radios/example-radios-with-descriptions.njk +7 -5
  145. package/components/radios/example-radios-with-revealed-select-expanded.njk +6 -4
  146. package/components/radios/example-radios-with-revealed-select.njk +6 -4
  147. package/components/radios/example-radios-with-revealed-text-area-expanded.njk +7 -5
  148. package/components/radios/example-radios-with-revealed-text-area.njk +7 -5
  149. package/components/radios/example-radios-with-revealed-text-input-expanded.njk +7 -5
  150. package/components/radios/example-radios-with-revealed-text-input.njk +7 -5
  151. package/components/radios/example-radios-with-separator.njk +6 -4
  152. package/components/radios/example-radios-with-visible-text-input.njk +7 -5
  153. package/components/radios/example-radios-without-border.njk +0 -1
  154. package/components/radios/example-radios.njk +7 -5
  155. package/components/related-content/_macro.njk +10 -11
  156. package/components/related-content/_section-macro.njk +7 -7
  157. package/components/related-content/example-related-content-general.njk +5 -3
  158. package/components/related-content/example-related-content-multiple-rows-of-links.njk +51 -49
  159. package/components/related-content/example-related-content-social-media.njk +40 -38
  160. package/components/relationships/_macro.njk +10 -8
  161. package/components/relationships/example-relationships-error.njk +176 -168
  162. package/components/relationships/example-relationships-you.njk +169 -163
  163. package/components/relationships/example-relationships.njk +167 -161
  164. package/components/section-navigation/_macro.njk +34 -12
  165. package/components/section-navigation/example-section-navigation-single-vertical-with-title.njk +23 -0
  166. package/components/select/_macro.njk +21 -18
  167. package/components/share-page/_macro.njk +10 -5
  168. package/components/skip-to-content/_macro.njk +1 -1
  169. package/components/skip-to-content/example-skip-to-content.njk +1 -0
  170. package/components/status/_macro.njk +1 -1
  171. package/components/summary/_macro.njk +53 -23
  172. package/components/summary/example-summary-household-no-rows.njk +18 -16
  173. package/components/summary/example-summary-household.njk +75 -73
  174. package/components/summary/example-summary-hub-minimal.njk +74 -72
  175. package/components/summary/example-summary-hub.njk +169 -167
  176. package/components/table/_macro.njk +72 -45
  177. package/components/table-of-contents/_macro.njk +34 -32
  178. package/components/table-of-contents/example-table-of-contents-grouped.njk +1 -1
  179. package/components/table-of-contents/example-table-of-contents-single.njk +1 -1
  180. package/components/table-of-contents/example-table-of-contents-sticky-full-page.njk +79 -38
  181. package/components/table-of-contents/example-table-of-contents-sticky.njk +50 -13
  182. package/components/tabs/_macro.njk +12 -6
  183. package/components/tabs/example-tabs-details.njk +5 -6
  184. package/components/text-indent/_macro.njk +1 -3
  185. package/components/textarea/_macro.njk +49 -46
  186. package/components/textarea/_macro.spec.js +0 -11
  187. package/components/timeline/_macro.njk +4 -6
  188. package/components/timeout-modal/_macro.njk +21 -19
  189. package/components/timeout-modal/example-timeout-modal.njk +16 -14
  190. package/components/timeout-panel/_macro.njk +19 -17
  191. package/components/timeout-panel/example-panel-with-timeout-warning.njk +13 -11
  192. package/components/upload/_macro.njk +20 -16
  193. package/components/video/_macro.njk +16 -2
  194. package/components/video/example-video.njk +2 -2
  195. package/css/main.css +1 -1
  196. package/layout/_dsTemplate.njk +22 -20
  197. package/layout/_template.njk +63 -49
  198. package/package.json +4 -3
  199. package/scripts/main.es5.js +1 -1
  200. package/scripts/main.js +1 -1
  201. package/scss/overrides/hcm.scss +1 -1
  202. package/scss/vars/_colors.scss +1 -1
@@ -1,37 +1,38 @@
1
1
  ---
2
- title: "Example: Table of contents on full page"
2
+ title: 'Example: Table of contents on full page'
3
3
  layout: ~
4
4
  ---
5
- {% from "components/table-of-contents/_macro.njk" import onsTableOfContents %}
6
5
 
6
+ {% from "components/table-of-contents/_macro.njk" import onsTableOfContents %}
7
7
  {% extends "layout/_template.njk" %}
8
-
9
- {% set pageConfig = {
10
- "header": {
11
- "title": "What is the census?"
12
- },
13
- "breadcrumbs": {
14
- "ariaLabel": 'Back',
15
- "itemsList": [
16
- {
17
- "url": '/',
18
- "id": "back-example-feedback-form-error",
19
- "text": 'Back',
20
- "attributes": {
21
- "data-attribute": "Example attribute"
8
+ {%
9
+ set pageConfig = {
10
+ "header": {
11
+ "title": "What is the census?"
12
+ },
13
+ "breadcrumbs": {
14
+ "ariaLabel": 'Back',
15
+ "itemsList": [
16
+ {
17
+ "url": '/',
18
+ "id": "back-example-feedback-form-error",
19
+ "text": 'Back',
20
+ "attributes": {
21
+ "data-attribute": "Example attribute"
22
+ }
22
23
  }
24
+ ]
25
+ },
26
+ "footer": {
27
+ "OGLLink": {
28
+ "pre": 'All content is available under the',
29
+ "link": 'Open Government Licence v3.0',
30
+ "url": 'https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/',
31
+ "post": ', except where otherwise stated'
23
32
  }
24
- ]
25
- },
26
- "footer": {
27
- "OGLLink": {
28
- "pre": 'All content is available under the',
29
- "link": 'Open Government Licence v3.0',
30
- "url": 'https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/',
31
- "post": ', except where otherwise stated'
32
33
  }
33
34
  }
34
- } %}
35
+ %}
35
36
 
36
37
  {% block main %}
37
38
  <div class="ons-page__container ons-container">
@@ -69,42 +70,82 @@ layout: ~
69
70
  <div class="ons-grid__col ons-col-7@m ons-push-1@m">
70
71
  <section id="section1">
71
72
  <h2>What is the census?</h2>
72
- <p>The census is a survey that happens every 10 years and gives us a picture of all the people and households in England and Wales.</p>
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>
73
77
 
74
- <p>Your answers to the census questions will help organisations make decisions on planning and funding public services in your area, including transport, education and healthcare.</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>
75
82
  </section>
76
83
  <section id="section2">
77
84
  <h2>The online census has now closed</h2>
78
85
  <p>Census Day was on Sunday 21 March 2021.</p>
79
86
 
80
- <p>If you still have a paper census questionnaire, fill it in as soon as you can and return it to FREEPOST, Census 2021.</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>
81
91
  </section>
82
92
  <section id="section3">
83
93
  <h2>What happens after Census Day</h2>
84
- <p>Two follow-up surveys, the <a href="#0">Census Coverage Survey</a> and the <a href="#0">Census Quality Survey</a>, help to improve the quality and accuracy of the census results.</p>
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>
85
98
 
86
- <p>Over the next year, we work hard to process the answers from all the census questionnaires. This is so that we can publish the initial Census 2021 findings one year after the census and the main releases two years after the census.</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>
87
103
 
88
- <p>To make sure the Census 2021 statistics we publish meet the needs of those who use them, we also run an outputs consultation.</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>
89
108
  </section>
90
109
  <section id="section4">
91
110
  <h2>The census in Northern Ireland and Scotland</h2>
92
111
  <p>The Office for National Statistics (ONS) runs the census in England and Wales.</p>
93
112
 
94
- <p>If you live in Northern Ireland, visit the Northern Ireland Statistics Agency (NISRA) census website to find out about the census for Northern Ireland.</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>
95
117
 
96
- <p>If you live in Scotland, visit the National Records of Scotland census website to find out how to take part in the census for Scotland.</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>
97
122
  </section>
98
123
  <section id="section5">
99
124
  <h2>The last census</h2>
100
- <p>The last census took place in 2011. Many people and organisations used information from the 2011 Census in a variety of ways.</p>
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>
101
129
 
102
- <p>For example, Bristol City Council used it to inform decisions on how to fund local housing improvements. It was also essential for the charity Redbridge Council for Voluntary Services to help people from ethnic minority groups learn more about dementia.</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>
103
135
 
104
- <p>To read more about the benefits that information from the 2011 Census helped to create, visit the Office for National Statistics (ONS) website.</p>
105
- <p>The Census Coverage Survey (CCS) was a short, separate survey that we at the Office for National Statistics (ONS) started six to eight weeks after Census Day.</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>
106
144
 
107
- <p>The CCS helps make sure everyone is counted and our census results are as accurate as possible. It asked similar questions to the main census, just fewer of them, at addresses in a selection of postcodes across England and Wales.</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>
108
149
 
109
150
  <p>The CCS has now closed.</p>
110
151
  </section>
@@ -29,14 +29,20 @@
29
29
  }
30
30
  ]
31
31
  })
32
- }}
32
+ -}}
33
33
  </div>
34
34
  <div class="ons-grid__col ons-col-7@m ons-push-1@m">
35
35
  <section id="section1">
36
36
  <h2>What is the census?</h2>
37
- <p>The census is a survey that happens every 10 years and gives us a picture of all the people and households in England and Wales.</p>
37
+ <p>
38
+ The census is a survey that happens every 10 years and gives us a picture of all the people and households in England
39
+ and Wales.
40
+ </p>
38
41
 
39
- <p>Your answers to the census questions will help organisations make decisions on planning and funding public services in your area, including transport, education and healthcare.</p>
42
+ <p>
43
+ Your answers to the census questions will help organisations make decisions on planning and funding public services in
44
+ your area, including transport, education and healthcare.
45
+ </p>
40
46
  </section>
41
47
  <section id="section2">
42
48
  <h2>The online census has now closed</h2>
@@ -46,30 +52,61 @@
46
52
  </section>
47
53
  <section id="section3">
48
54
  <h2>What happens after Census Day</h2>
49
- <p>Two follow-up surveys, the <a href="#0">Census Coverage Survey</a> and the <a href="#0">Census Quality Survey</a>, help to improve the quality and accuracy of the census results.</p>
55
+ <p>
56
+ Two follow-up surveys, the <a href="#0">Census Coverage Survey</a> and the <a href="#0">Census Quality Survey</a>, help
57
+ to improve the quality and accuracy of the census results.
58
+ </p>
50
59
 
51
- <p>Over the next year, we work hard to process the answers from all the census questionnaires. This is so that we can publish the initial Census 2021 findings one year after the census and the main releases two years after the census.</p>
60
+ <p>
61
+ Over the next year, we work hard to process the answers from all the census questionnaires. This is so that we can
62
+ publish the initial Census 2021 findings one year after the census and the main releases two years after the census.
63
+ </p>
52
64
 
53
- <p>To make sure the Census 2021 statistics we publish meet the needs of those who use them, we also run an outputs consultation.</p>
65
+ <p>
66
+ To make sure the Census 2021 statistics we publish meet the needs of those who use them, we also run an outputs
67
+ consultation.
68
+ </p>
54
69
  </section>
55
70
  <section id="section4">
56
71
  <h2>The census in Northern Ireland and Scotland</h2>
57
72
  <p>The Office for National Statistics (ONS) runs the census in England and Wales.</p>
58
73
 
59
- <p>If you live in Northern Ireland, visit the Northern Ireland Statistics Agency (NISRA) census website to find out about the census for Northern Ireland.</p>
74
+ <p>
75
+ If you live in Northern Ireland, visit the Northern Ireland Statistics Agency (NISRA) census website to find out about
76
+ the census for Northern Ireland.
77
+ </p>
60
78
 
61
- <p>If you live in Scotland, visit the National Records of Scotland census website to find out how to take part in the census for Scotland.</p>
79
+ <p>
80
+ If you live in Scotland, visit the National Records of Scotland census website to find out how to take part in the
81
+ census for Scotland.
82
+ </p>
62
83
  </section>
63
84
  <section id="section5">
64
85
  <h2>The last census</h2>
65
- <p>The last census took place in 2011. Many people and organisations used information from the 2011 Census in a variety of ways.</p>
86
+ <p>
87
+ The last census took place in 2011. Many people and organisations used information from the 2011 Census in a variety of
88
+ ways.
89
+ </p>
66
90
 
67
- <p>For example, Bristol City Council used it to inform decisions on how to fund local housing improvements. It was also essential for the charity Redbridge Council for Voluntary Services to help people from ethnic minority groups learn more about dementia.</p>
91
+ <p>
92
+ For example, Bristol City Council used it to inform decisions on how to fund local housing improvements. It was also
93
+ essential for the charity Redbridge Council for Voluntary Services to help people from ethnic minority groups learn more
94
+ about dementia.
95
+ </p>
68
96
 
69
- <p>To read more about the benefits that information from the 2011 Census helped to create, visit the Office for National Statistics (ONS) website.</p>
70
- <p>The Census Coverage Survey (CCS) was a short, separate survey that we at the Office for National Statistics (ONS) started six to eight weeks after Census Day.</p>
97
+ <p>
98
+ To read more about the benefits that information from the 2011 Census helped to create, visit the Office for National
99
+ Statistics (ONS) website.
100
+ </p>
101
+ <p>
102
+ The Census Coverage Survey (CCS) was a short, separate survey that we at the Office for National Statistics (ONS)
103
+ started six to eight weeks after Census Day.
104
+ </p>
71
105
 
72
- <p>The CCS helps make sure everyone is counted and our census results are as accurate as possible. It asked similar questions to the main census, just fewer of them, at addresses in a selection of postcodes across England and Wales.</p>
106
+ <p>
107
+ The CCS helps make sure everyone is counted and our census results are as accurate as possible. It asked similar
108
+ questions to the main census, just fewer of them, at addresses in a selection of postcodes across England and Wales.
109
+ </p>
73
110
 
74
111
  <p>The CCS has now closed.</p>
75
112
  </section>
@@ -7,21 +7,27 @@
7
7
  {% endfor %}
8
8
  {% endset %}
9
9
 
10
- <section class="{{ classes }}"
11
- {% if params.noInitialActiveTab %}data-no-initial-active-tab="true"{% endif %}
12
- >
10
+ <section class="{{ classes }}" {% if params.noInitialActiveTab %}data-no-initial-active-tab="true"{% endif %}>
13
11
  {% set titleTag = params.titleTag | default("h2") %}
14
- <{{ titleTag }} class="ons-tabs__title ons-u-fs-r--b ons-u-mt-no{% if params.titleClasses %} {{ params.titleClasses }}{% endif %}">{{ params.title }}</{{ titleTag }}>
12
+ {% set openingTag = "<" + titleTag %}
13
+ {% set closingTag = "</" + titleTag + ">" %}
14
+ {{ openingTag | safe }}
15
+ class="ons-tabs__title ons-u-fs-r--b
16
+ ons-u-mt-no{{ ' ' + params.titleClasses if params.titleClasses else '' }}">{{ params.title }}{{ closingTag | safe }}
15
17
  <div>
16
18
  <ul class="ons-tabs__list">
19
+ <!-- prettier-ignore-start -->
17
20
  {%- for tab in params.tabs -%}
18
- <li class="ons-tab__list-item"><a href="#{{ tab.id if tab.id else tab.title|trim|replace(' ','-')|lower}}" class="ons-tab"{% if tab.attributes %}{% for attribute, value in (tab.attributes.items() if tab.attributes is mapping and tab.attributes.items else tab.attributes) %} {{ attribute }}{% if value %}="{{ value }}"{% endif %} {% endfor %}{% endif %}>{{ tab.title }}{% if tab.hiddenSpan %}<span class='ons-u-vh'>{{tab.hiddenSpan}}</span>{% endif %}</a></li>
21
+ <li class="ons-tab__list-item"><a href="#{{ tab.id if tab.id else tab.title|trim|replace(' ','-')|lower }}" class="ons-tab"{% if tab.attributes %}{% for attribute, value in (tab.attributes.items() if tab.attributes is mapping and tab.attributes.items else tab.attributes) %}{{ ' ' }}{{ attribute }}{% if value %}="{{ value }}"{% endif %}{% endfor %}{% endif %}>{{ tab.title }}{% if tab.hiddenSpan %}<span class="ons-u-vh">{{ tab.hiddenSpan }}</span>{% endif %}</a></li>
19
22
  {%- endfor -%}
23
+ <!-- prettier-ignore-end -->
20
24
  </ul>
21
25
  </div>
22
26
  {% for tab in params.tabs %}
23
27
  <section id="{{ tab.id if tab.id else tab.title|trim|replace(' ','-')|lower }}" class="ons-tabs__panel">
24
- {% if tab.showTitle %}<h2 id="{{ tab.title|trim|replace(' ','-')|lower + '-content-title' }}" class="ons-u-vh">{{ tab.title }}</h2>{% endif %}
28
+ {% if tab.showTitle %}
29
+ <h2 id="{{ tab.title|trim|replace(' ','-')|lower + '-content-title' }}" class="ons-u-vh">{{ tab.title }}</h2>
30
+ {% endif %}
25
31
  {{ tab.content | safe }}
26
32
  </section>
27
33
  {% endfor %}
@@ -1,7 +1,7 @@
1
1
  <style>
2
- .example-video-block {
3
- border: solid 1px #707071;
4
- }
2
+ .example-video-block {
3
+ border: solid 1px #707071;
4
+ }
5
5
  </style>
6
6
 
7
7
  <div class="example-video-block">
@@ -11,15 +11,14 @@
11
11
  "videoEmbedUrl": 'https://www.youtube.com/embed/OwYVwPPxPj4',
12
12
  "videoLinkURL": 'https://www.youtube.com/watch?v=OwYVwPPxPj4',
13
13
  "image": {
14
- "largeSrc": '/patternlib-img/youtube-example-cover.png',
15
- "smallSrc": '/patternlib-img/youtube-example-cover.png',
14
+ "largeSrc": '/ds-img/youtube-example-cover.png',
15
+ "smallSrc": '/ds-img/youtube-example-cover.png',
16
16
  "alt": "Youtube video"
17
17
  },
18
18
  "title": 'Transforming the way we produce statistics | Explaining the Dynamic Population Model | BSL',
19
19
  "linkText": 'Watch “Transforming the way we produce statistics | Explaining the Dynamic Population Model | BSL“ on Youtube'
20
20
  })
21
21
  }}
22
-
23
22
  {% from "components/tabs/_macro.njk" import onsTabs %}
24
23
  {{
25
24
  onsTabs({
@@ -1,5 +1,3 @@
1
1
  {% macro onsTextIndent(params) %}
2
- <div class="ons-text-indent">
3
- {{ caller() if caller else params.text | safe }}
4
- </div>
2
+ <div class="ons-text-indent">{{ caller() if caller else params.text | safe }}</div>
5
3
  {% endmacro %}
@@ -3,75 +3,78 @@
3
3
  {% from "components/field/_macro.njk" import onsField %}
4
4
  {% from "components/label/_macro.njk" import onsLabel %}
5
5
  {% from "components/char-check-limit/_macro.njk" import onsCharLimit %}
6
-
6
+ {% set textareaExclusiveClass = " ons-js-exclusive-group-item" if params.mutuallyExclusive %}
7
7
 
8
8
  {% set field %}
9
- {% set textareaExclusiveClass = " ons-js-exclusive-group-item" if params.mutuallyExclusive else "" %}
10
-
11
9
  {% if params.label %}
12
- {{ onsLabel({
13
- "for": params.id,
14
- "text": params.label.text,
15
- "description": params.label.description,
16
- "classes": params.label.classes
17
- }) }}
10
+ {{
11
+ onsLabel({
12
+ "for": params.id,
13
+ "text": params.label.text,
14
+ "description": params.label.description,
15
+ "classes": params.label.classes
16
+ })
17
+ }}
18
18
  {% endif %}
19
19
 
20
20
  <textarea
21
21
  id="{{ params.id }}"
22
- class="ons-input ons-input--textarea {% if params.error %} ons-input--error {% endif %}{% if params.charCheckLimit and params.charCheckLimit.limit %} ons-js-char-limit-input{% endif %}{{ textareaExclusiveClass }} {{ params.classes if params.classes }} {% if params.width %}ons-input--w-{{ params.width }}{% endif %}"
22
+ class="ons-input ons-input--textarea{{ ' ons-input--error' if params.error }}{{ ' ons-js-char-limit-input' if params.charCheckLimit and params.charCheckLimit.limit }}{{ textareaExclusiveClass }}{{ ' ' + params.classes if params.classes else '' }}{% if params.width %}{{ ' ' }}ons-input--w-{{ params.width }}{% endif %}"
23
23
  {% if params.name %}
24
- name="{{ params.name }}"
24
+ name="{{ params.name }}"
25
25
  {% endif %}
26
26
  rows="{{ params.rows | default(8) }}"
27
27
  {% if params.charCheckLimit and params.charCheckLimit.limit %}
28
- maxlength="{{ params.charCheckLimit.limit }}"
29
- data-char-limit-ref="{{ params.id }}-lim"
28
+ maxlength="{{ params.charCheckLimit.limit }}" data-char-limit-ref="{{ params.id }}-lim"
30
29
  aria-describedby="{{ params.id }}-lim"
31
30
  {% endif %}
32
- {% if params.attributes %}{% for attribute, value in (params.attributes.items() if params.attributes is mapping and params.attributes.items else params.attributes) %}{{ attribute }}{% if value %}="{{ value }}"{% endif %} {% endfor %}{% endif %}
33
- >{{ params.value if params.value }}</textarea>
31
+ {% if params.attributes %}{% for attribute, value in (params.attributes.items() if params.attributes is mapping and params.attributes.items else params.attributes) %}{{ ' ' }}{{ attribute }}{% if value %}="{{ value }}"{% endif %}{% endfor %}{% endif %}
32
+ >
33
+ {{- params.value if params.value -}}</textarea
34
+ >
34
35
 
35
36
  {% if params.charCheckLimit and params.charCheckLimit.limit %}
36
- {% call onsCharLimit({
37
- "id": params.id ~ "-lim",
38
- "limit": params.charCheckLimit.limit,
39
- "charCountSingular": params.charCheckLimit.charCountSingular,
40
- "charCountPlural": params.charCheckLimit.charCountPlural
41
- }) %}
37
+ {%
38
+ call onsCharLimit({
39
+ "id": params.id ~ "-lim",
40
+ "limit": params.charCheckLimit.limit,
41
+ "charCountSingular": params.charCheckLimit.charCountSingular,
42
+ "charCountPlural": params.charCheckLimit.charCountPlural
43
+ })
44
+ %}
42
45
  {% endcall %}
43
46
  {% endif %}
44
47
  {% endset %}
45
48
 
46
49
  {% if params.mutuallyExclusive %}
47
- {% call onsMutuallyExclusive({
48
- "id": params.fieldId,
49
- "classes": params.fieldClasses,
50
- "legend": params.legend,
51
- "legendClasses": params.legendClasses,
52
- "description": params.description,
53
- "dontWrap": params.dontWrap,
54
- "legendIsQuestionTitle": params.legendIsQuestionTitle,
55
- "exclusiveOptions": params.mutuallyExclusive.exclusiveOptions,
56
- "or": params.mutuallyExclusive.or,
57
- "deselectMessage": params.mutuallyExclusive.deselectMessage,
58
- "deselectGroupAdjective": params.mutuallyExclusive.deselectGroupAdjective,
59
- "deselectExclusiveOptionAdjective": params.mutuallyExclusive.deselectExclusiveOptionAdjective,
60
- "error": params.error
61
- }) %}
62
- {% call onsField({
50
+ {%
51
+ call onsMutuallyExclusive({
52
+ "id": params.fieldId,
53
+ "classes": params.fieldClasses,
54
+ "legend": params.legend,
55
+ "legendClasses": params.legendClasses,
56
+ "description": params.description,
57
+ "dontWrap": params.dontWrap,
58
+ "legendIsQuestionTitle": params.legendIsQuestionTitle,
59
+ "exclusiveOptions": params.mutuallyExclusive.exclusiveOptions,
60
+ "or": params.mutuallyExclusive.or,
61
+ "deselectMessage": params.mutuallyExclusive.deselectMessage,
62
+ "deselectGroupAdjective": params.mutuallyExclusive.deselectGroupAdjective,
63
+ "deselectExclusiveOptionAdjective": params.mutuallyExclusive.deselectExclusiveOptionAdjective,
63
64
  "error": params.error
64
- }) %}
65
- {{ field | safe }}
66
- {% endcall %}
65
+ })
66
+ %}
67
+ {{ field | safe }}
67
68
  {% endcall %}
68
69
  {% else %}
69
- {% call onsField({
70
- "id": params.fieldId,
71
- "classes": params.fieldClasses,
72
- "dontWrap": params.dontWrap,
73
- "error": params.error
74
- }) %}
70
+ {%
71
+ call onsField({
72
+ "id": params.fieldId,
73
+ "classes": params.fieldClasses,
74
+ "dontWrap": params.dontWrap,
75
+ "error": params.error
76
+ })
77
+ %}
75
78
  {{ field | safe }}
76
79
  {% endcall %}
77
80
  {% endif %}
@@ -285,16 +285,5 @@ describe('macro: textarea', () => {
285
285
  error: EXAMPLE_TEXTAREA_WITH_MUTUALLY_EXCLUSIVE_WITH_ERROR.error,
286
286
  });
287
287
  });
288
-
289
- it('still renders field component', () => {
290
- const faker = templateFaker();
291
- const fieldSpy = faker.spy('field');
292
-
293
- faker.renderComponent('textarea', EXAMPLE_TEXTAREA_WITH_MUTUALLY_EXCLUSIVE_WITH_ERROR);
294
-
295
- expect(fieldSpy.occurrences).toContainEqual({
296
- error: EXAMPLE_TEXTAREA_WITH_MUTUALLY_EXCLUSIVE_WITH_ERROR.error,
297
- });
298
- });
299
288
  });
300
289
  });
@@ -1,12 +1,13 @@
1
1
  {% macro onsTimeline(params) %}
2
-
3
2
  {% from "components/list/_macro.njk" import onsList %}
4
3
 
5
4
  <div class="ons-timeline{{ ' ' + params.classes if params.classes else '' }}">
6
5
  {% set titleTag = params.titleTag | default("h2") %}
6
+ {% set openingTag = "<" + titleTag %}
7
+ {% set closingTag = "</" + titleTag + ">" %}
7
8
  {% for item in params.items %}
8
9
  <div class="ons-timeline__item">
9
- <{{ titleTag }} class="ons-timeline__heading">{{ item.heading }}</{{ titleTag }}>
10
+ {{ openingTag | safe }} class="ons-timeline__heading">{{ item.heading }}{{ closingTag | safe }}
10
11
  {% if item.itemsList %}
11
12
  <div class="ons-timeline__content">
12
13
  {{
@@ -17,12 +18,9 @@
17
18
  }}
18
19
  </div>
19
20
  {% elif item.content %}
20
- <div class="ons-timeline__content">
21
- {{ item.content | safe }}
22
- </div>
21
+ <div class="ons-timeline__content">{{ item.content | safe }}</div>
23
22
  {% endif %}
24
23
  </div>
25
24
  {% endfor %}
26
25
  </div>
27
-
28
26
  {% endmacro %}
@@ -1,24 +1,26 @@
1
1
  {% from "components/modal/_macro.njk" import onsModal %}
2
2
  {% macro onsTimeoutModal(params) %}
3
- {% call onsModal({
4
- "title": params.title,
5
- "btnText": params.btnText,
6
- "classes": "ons-js-timeout-modal",
7
- "attributes": {
8
- "data-redirect-url": params.redirectUrl,
9
- "data-server-session-expires-at": params.sessionExpiresAt,
10
- "data-show-modal-time": params.showModalTimeInSeconds,
11
- "data-server-session-expiry-endpoint": params.serverSessionExpiryEndpoint,
12
- "data-countdown-text": params.countdownText,
13
- "data-countdown-expired-text": params.countdownExpiredText,
14
- "data-minutes-text-singular": params.minutesTextSingular,
15
- "data-minutes-text-plural": params.minutesTextPlural,
16
- "data-seconds-text-singular": params.secondsTextSingular,
17
- "data-seconds-text-plural": params.secondsTextPlural,
18
- "data-full-stop": params.endWithFullStop,
19
- "aria-describedby": "timeout-time-remaining"
20
- }
21
- }) %}
3
+ {%
4
+ call onsModal({
5
+ "title": params.title,
6
+ "btnText": params.btnText,
7
+ "classes": "ons-js-timeout-modal",
8
+ "attributes": {
9
+ "data-redirect-url": params.redirectUrl,
10
+ "data-server-session-expires-at": params.sessionExpiresAt,
11
+ "data-show-modal-time": params.showModalTimeInSeconds,
12
+ "data-server-session-expiry-endpoint": params.serverSessionExpiryEndpoint,
13
+ "data-countdown-text": params.countdownText,
14
+ "data-countdown-expired-text": params.countdownExpiredText,
15
+ "data-minutes-text-singular": params.minutesTextSingular,
16
+ "data-minutes-text-plural": params.minutesTextPlural,
17
+ "data-seconds-text-singular": params.secondsTextSingular,
18
+ "data-seconds-text-plural": params.secondsTextPlural,
19
+ "data-full-stop": params.endWithFullStop,
20
+ "aria-describedby": "timeout-time-remaining"
21
+ }
22
+ })
23
+ %}
22
24
  <p>{{ params.textFirstLine }}</p>
23
25
  <p class="ons-js-timeout-timer" aria-hidden="true" aria-relevant="additions"></p>
24
26
  <p class="ons-js-timeout-timer-acc ons-u-vh" role="status" id="timeout-time-remaining"></p>
@@ -1,18 +1,20 @@
1
1
  {% from "components/timeout-modal/_macro.njk" import onsTimeoutModal %}
2
2
 
3
3
  <div style="min-height:20rem;">
4
- {{ onsTimeoutModal({
5
- "showModalTimeInSeconds": 60,
6
- "redirectUrl": "#!",
7
- "title": "You will be signed out soon",
8
- "textFirstLine": "It appears you have been inactive for a while.",
9
- "countdownText": "To protect your information, your progress will be saved and you will be signed out in",
10
- "countdownExpiredText": "You are being signed out.",
11
- "btnText": "Continue survey",
12
- "minutesTextSingular": "minute",
13
- "minutesTextPlural": "minutes",
14
- "secondsTextSingular": "second",
15
- "secondsTextPlural": "seconds",
16
- "endWithFullStop": true
17
- }) }}
4
+ {{
5
+ onsTimeoutModal({
6
+ "showModalTimeInSeconds": 60,
7
+ "redirectUrl": "#!",
8
+ "title": "You will be signed out soon",
9
+ "textFirstLine": "It appears you have been inactive for a while.",
10
+ "countdownText": "To protect your information, your progress will be saved and you will be signed out in",
11
+ "countdownExpiredText": "You are being signed out.",
12
+ "btnText": "Continue survey",
13
+ "minutesTextSingular": "minute",
14
+ "minutesTextPlural": "minutes",
15
+ "secondsTextSingular": "second",
16
+ "secondsTextPlural": "seconds",
17
+ "endWithFullStop": true
18
+ })
19
+ }}
18
20
  </div>