@ons/design-system 70.0.8 → 70.0.9

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 (201) 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/select/_macro.njk +21 -18
  166. package/components/share-page/_macro.njk +10 -5
  167. package/components/skip-to-content/_macro.njk +1 -1
  168. package/components/skip-to-content/example-skip-to-content.njk +1 -0
  169. package/components/status/_macro.njk +1 -1
  170. package/components/summary/_macro.njk +53 -23
  171. package/components/summary/example-summary-household-no-rows.njk +18 -16
  172. package/components/summary/example-summary-household.njk +75 -73
  173. package/components/summary/example-summary-hub-minimal.njk +74 -72
  174. package/components/summary/example-summary-hub.njk +169 -167
  175. package/components/table/_macro.njk +72 -45
  176. package/components/table-of-contents/_macro.njk +34 -32
  177. package/components/table-of-contents/example-table-of-contents-grouped.njk +1 -1
  178. package/components/table-of-contents/example-table-of-contents-single.njk +1 -1
  179. package/components/table-of-contents/example-table-of-contents-sticky-full-page.njk +79 -38
  180. package/components/table-of-contents/example-table-of-contents-sticky.njk +50 -13
  181. package/components/tabs/_macro.njk +12 -6
  182. package/components/tabs/example-tabs-details.njk +5 -6
  183. package/components/text-indent/_macro.njk +1 -3
  184. package/components/textarea/_macro.njk +49 -46
  185. package/components/textarea/_macro.spec.js +0 -11
  186. package/components/timeline/_macro.njk +4 -6
  187. package/components/timeout-modal/_macro.njk +21 -19
  188. package/components/timeout-modal/example-timeout-modal.njk +16 -14
  189. package/components/timeout-panel/_macro.njk +19 -17
  190. package/components/timeout-panel/example-panel-with-timeout-warning.njk +13 -11
  191. package/components/upload/_macro.njk +20 -16
  192. package/components/video/_macro.njk +16 -2
  193. package/components/video/example-video.njk +2 -2
  194. package/css/main.css +1 -1
  195. package/layout/_dsTemplate.njk +22 -20
  196. package/layout/_template.njk +63 -49
  197. package/package.json +4 -3
  198. package/scripts/main.es5.js +1 -1
  199. package/scripts/main.js +1 -1
  200. package/scss/overrides/hcm.scss +1 -1
  201. package/scss/vars/_colors.scss +1 -1
@@ -1,60 +1,62 @@
1
1
  {% from "components/document-list/_macro.njk" import onsDocumentList %}
2
2
 
3
- {{ onsDocumentList({
4
- "documents": [
5
- {
6
- "thumbnail": {
7
- "smallSrc": '/img/small/census-monuments-lights.jpg',
8
- "largeSrc": '/img/large/census-monuments-lights.jpg'
9
- },
10
- "url": '#0',
11
- "title": 'Landmarks are lighting up purple to mark Census Day',
12
- "metadata": {
13
- "type": {
14
- "text": 'Press releases',
15
- "url": '#0'
3
+ {{
4
+ onsDocumentList({
5
+ "documents": [
6
+ {
7
+ "thumbnail": {
8
+ "smallSrc": '/img/small/census-monuments-lights.jpg',
9
+ "largeSrc": '/img/large/census-monuments-lights.jpg'
16
10
  },
17
- "date": {
18
- "iso": '2022-01-01',
19
- "short": '1 January 2022'
20
- }
21
- },
22
- "description": 'Hundreds of buildings & landmarks across England and Wales are lighting up purple this weekend to celebrate the census and its importance to communities.'
23
- },
24
- {
25
- "thumbnail": {
26
- "smallSrc": '/img/small/ons-award-winners.jpg',
27
- "largeSrc": '/img/large/ons-award-winners.jpg'
28
- },
29
- "url": '#0',
30
- "title": 'Office for National Statistics win top Royal Statistical Society award',
31
- "metadata": {
32
- "type": {
33
- "text": 'Press releases',
34
- "url": '#0'
11
+ "url": '#0',
12
+ "title": 'Landmarks are lighting up purple to mark Census Day',
13
+ "metadata": {
14
+ "type": {
15
+ "text": 'Press releases',
16
+ "url": '#0'
17
+ },
18
+ "date": {
19
+ "iso": '2022-01-01',
20
+ "short": '1 January 2022'
21
+ }
35
22
  },
36
- "date": {
37
- "iso": '2021-07-15',
38
- "short": '15 July 2021'
39
- }
23
+ "description": 'Hundreds of buildings & landmarks across England and Wales are lighting up purple this weekend to celebrate the census and its importance to communities.'
40
24
  },
41
- "description": 'The Office for National Statistics’ (ONS) analysis showing that people from certain ethnicities had a higher risk of dying from COVID-19 has been recognised by the Royal Statistical Society (RSS) with the renowned Campion Award.'
42
- },
43
- {
44
- "thumbnail": true,
45
- "url": '#0',
46
- "title": 'Five Office for National Statistics names in New Year’s Honours',
47
- "metadata": {
48
- "type": {
49
- "text": 'Press releases',
50
- "url": '#0'
25
+ {
26
+ "thumbnail": {
27
+ "smallSrc": '/img/small/ons-award-winners.jpg',
28
+ "largeSrc": '/img/large/ons-award-winners.jpg'
51
29
  },
52
- "date": {
53
- "iso": '2022-01-01',
54
- "short": '1 January 2022'
55
- }
30
+ "url": '#0',
31
+ "title": 'Office for National Statistics win top Royal Statistical Society award',
32
+ "metadata": {
33
+ "type": {
34
+ "text": 'Press releases',
35
+ "url": '#0'
36
+ },
37
+ "date": {
38
+ "iso": '2021-07-15',
39
+ "short": '15 July 2021'
40
+ }
41
+ },
42
+ "description": 'The Office for National Statistics’ (ONS) analysis showing that people from certain ethnicities had a higher risk of dying from COVID-19 has been recognised by the Royal Statistical Society (RSS) with the renowned Campion Award.'
56
43
  },
57
- "description": 'After another year in which data and statistics have dominated public debate, five Office for National Statistics (ONS) employees have been recognised for their contributions to statistics, public health and the census in the New Year’s Honours list.'
58
- }
59
- ]
60
- }) }}
44
+ {
45
+ "thumbnail": true,
46
+ "url": '#0',
47
+ "title": 'Five Office for National Statistics names in New Year’s Honours',
48
+ "metadata": {
49
+ "type": {
50
+ "text": 'Press releases',
51
+ "url": '#0'
52
+ },
53
+ "date": {
54
+ "iso": '2022-01-01',
55
+ "short": '1 January 2022'
56
+ }
57
+ },
58
+ "description": 'After another year in which data and statistics have dominated public debate, five Office for National Statistics (ONS) employees have been recognised for their contributions to statistics, public health and the census in the New Year’s Honours list.'
59
+ }
60
+ ]
61
+ })
62
+ }}
@@ -1,53 +1,55 @@
1
1
  {% from "components/document-list/_macro.njk" import onsDocumentList %}
2
- {{ onsDocumentList({
3
- "documents": [
4
- {
5
- "thumbnail": true,
6
- "url": '#',
7
- "title": 'Including everyone in Census 2021',
8
- "metadata": {
9
- "type": {
10
- "text": 'Poster'
2
+ {{
3
+ onsDocumentList({
4
+ "documents": [
5
+ {
6
+ "thumbnail": true,
7
+ "url": '#',
8
+ "title": 'Including everyone in Census 2021',
9
+ "metadata": {
10
+ "type": {
11
+ "text": 'Poster'
12
+ },
13
+ "file": {
14
+ "fileType": 'PDF',
15
+ "fileSize": '499KB',
16
+ "filePages": '1 page'
17
+ }
11
18
  },
12
- "file": {
13
- "fileType": 'PDF',
14
- "fileSize": '499KB',
15
- "filePages": '1 page'
16
- }
19
+ "description": 'Empty belly poster, aimed at advertising census events.'
17
20
  },
18
- "description": 'Empty belly poster, aimed at advertising census events.'
19
- },
20
- {
21
- "thumbnail": true,
22
- "url": '#',
23
- "title": 'Community handbook for Census 2021',
24
- "metadata": {
25
- "type": {
26
- "text": 'Booklet'
21
+ {
22
+ "thumbnail": true,
23
+ "url": '#',
24
+ "title": 'Community handbook for Census 2021',
25
+ "metadata": {
26
+ "type": {
27
+ "text": 'Booklet'
28
+ },
29
+ "file": {
30
+ "fileType": 'PDF',
31
+ "fileSize": '3.3MB',
32
+ "filePages": '16 pages'
33
+ }
27
34
  },
28
- "file": {
29
- "fileType": 'PDF',
30
- "fileSize": '3.3MB',
31
- "filePages": '16 pages'
32
- }
35
+ "description": 'This handbook explains what the census is, why it matters to everyone and how we can work together to spread the word within your community.'
33
36
  },
34
- "description": 'This handbook explains what the census is, why it matters to everyone and how we can work together to spread the word within your community.'
35
- },
36
- {
37
- "thumbnail": true,
38
- "url": '#',
39
- "title": 'Census 2021 matters to everyone',
40
- "metadata": {
41
- "type": {
42
- "text": 'Poster'
37
+ {
38
+ "thumbnail": true,
39
+ "url": '#',
40
+ "title": 'Census 2021 matters to everyone',
41
+ "metadata": {
42
+ "type": {
43
+ "text": 'Poster'
44
+ },
45
+ "file": {
46
+ "fileType": 'PDF',
47
+ "fileSize": '866KB',
48
+ "filePages": '1 page'
49
+ }
43
50
  },
44
- "file": {
45
- "fileType": 'PDF',
46
- "fileSize": '866KB',
47
- "filePages": '1 page'
48
- }
49
- },
50
- "description": 'By taking part and encouraging others to do the same, you’ll make sure your community gets the services it needs.'
51
- }
52
- ]
53
- }) }}
51
+ "description": 'By taking part and encouraging others to do the same, you’ll make sure your community gets the services it needs.'
52
+ }
53
+ ]
54
+ })
55
+ }}
@@ -1,19 +1,21 @@
1
1
  {% from "components/document-list/_macro.njk" import onsDocumentList %}
2
2
 
3
- {{ onsDocumentList({
4
- "documents": [
5
- {
6
- "featured": true,
7
- "showMetadataFirst": true,
8
- "url": '#0',
9
- "title": 'Crime and justice',
10
- "metadata": {
11
- "type": {
12
- "text": 'Topic'
13
- }
14
- },
15
- "description": '<p>Figures on <mark>crime</mark> levels and trends for England and Wales based primarily on two sets of statistics: the <mark>Crime</mark> Survey for England and Wales (CSEW) and police recorded crime data.</p>
16
- <p>View all <a href="#0">datasets</a> or <a href="#0">publications</a> related to <a href="#0">Crime and justice</a></p>'
17
- }
18
- ]
19
- }) }}
3
+ {{
4
+ onsDocumentList({
5
+ "documents": [
6
+ {
7
+ "featured": true,
8
+ "showMetadataFirst": true,
9
+ "url": '#0',
10
+ "title": 'Crime and justice',
11
+ "metadata": {
12
+ "type": {
13
+ "text": 'Topic'
14
+ }
15
+ },
16
+ "description": '<p>Figures on <mark>crime</mark> levels and trends for England and Wales based primarily on two sets of statistics: the <mark>Crime</mark> Survey for England and Wales (CSEW) and police recorded crime data.</p>
17
+ <p>View all <a href="#0">datasets</a> or <a href="#0">publications</a> related to <a href="#0">Crime and justice</a></p>'
18
+ }
19
+ ]
20
+ })
21
+ }}
@@ -1,67 +1,69 @@
1
1
  {% from "components/document-list/_macro.njk" import onsDocumentList %}
2
2
 
3
- {{ onsDocumentList({
4
- "documents": [
5
- {
6
- "featured": true,
7
- "showMetadataFirst": true,
8
- "url": '#0',
9
- "title": 'Crime and justice',
10
- "metadata": {
11
- "type": {
12
- "text": 'Topic'
13
- }
14
- },
15
- "description": '<p>Figures on <mark>crime</mark> levels and trends for England and Wales based primarily on two sets of statistics: the <mark>Crime</mark> Survey for England and Wales (CSEW) and police recorded <mark>crime</mark> data.</p>
16
- <p>View all <a href="#0">datasets</a> or <a href="#0">publications</a> related to <a href="#0">Crime and justice</a></p>'
17
- },
18
- {
19
- "url": '#0',
20
- "title": 'Disability and crime',
21
- "metadata": {
22
- "type": {
23
- "text": 'Dataset'
3
+ {{
4
+ onsDocumentList({
5
+ "documents": [
6
+ {
7
+ "featured": true,
8
+ "showMetadataFirst": true,
9
+ "url": '#0',
10
+ "title": 'Crime and justice',
11
+ "metadata": {
12
+ "type": {
13
+ "text": 'Topic'
14
+ }
24
15
  },
25
- "date": {
26
- "prefix": 'Released',
27
- "showPrefix": true,
28
- "iso": '2021-02-18',
29
- "short": '18 February 2021'
30
- }
16
+ "description": '<p>Figures on <mark>crime</mark> levels and trends for England and Wales based primarily on two sets of statistics: the <mark>Crime</mark> Survey for England and Wales (CSEW) and police recorded <mark>crime</mark> data.</p>
17
+ <p>View all <a href="#0">datasets</a> or <a href="#0">publications</a> related to <a href="#0">Crime and justice</a></p>'
31
18
  },
32
- "description": '<p>Domestic abuse and sexual assault outcomes for disabled people in England and Wales aged 16 to 59 years, with analysis by age, sex, impairment type, impairment severity, country and region using the <mark>Crime</mark> Survey for England and Wales (CSEW) data.</p>'
33
- },
34
- {
35
- "url": '#0',
36
- "title": 'Disability and crime, UK: 2019 (Latest release)',
37
- "metadata": {
38
- "type": {
39
- "text": 'Statistical bulletin'
19
+ {
20
+ "url": '#0',
21
+ "title": 'Disability and crime',
22
+ "metadata": {
23
+ "type": {
24
+ "text": 'Dataset'
25
+ },
26
+ "date": {
27
+ "prefix": 'Released',
28
+ "showPrefix": true,
29
+ "iso": '2021-02-18',
30
+ "short": '18 February 2021'
31
+ }
40
32
  },
41
- "date": {
42
- "prefix": 'Released',
43
- "showPrefix": true,
44
- "iso": '2019-12-01',
45
- "short": '2 December 2019'
46
- }
33
+ "description": '<p>Domestic abuse and sexual assault outcomes for disabled people in England and Wales aged 16 to 59 years, with analysis by age, sex, impairment type, impairment severity, country and region using the <mark>Crime</mark> Survey for England and Wales (CSEW) data.</p>'
47
34
  },
48
- "description": '<p>An overview of published data on disability and <mark>crime</mark> in the UK and analysis of the experience of domestic abuse and sexual assault for disabled adults aged 16 to 59 years in England and Wales. Analysis by age, sex and impairment type.</p>'
49
- },
50
- {
51
- "url": '#0',
52
- "title": 'Hate crime by disability status, Crime Survey for England and Wales (CSEW) combined years 2013 and 2014 to 2015 and 2016',
53
- "metadata": {
54
- "type": {
55
- "text": 'User requested data',
56
- "ref": 'Ref 008052'
35
+ {
36
+ "url": '#0',
37
+ "title": 'Disability and crime, UK: 2019 (Latest release)',
38
+ "metadata": {
39
+ "type": {
40
+ "text": 'Statistical bulletin'
41
+ },
42
+ "date": {
43
+ "prefix": 'Released',
44
+ "showPrefix": true,
45
+ "iso": '2019-12-01',
46
+ "short": '2 December 2019'
47
+ }
57
48
  },
58
- "date": {
59
- "prefix": 'Released',
60
- "showPrefix": true,
61
- "iso": '2017-04-20',
62
- "short": '20 April 2017'
49
+ "description": '<p>An overview of published data on disability and <mark>crime</mark> in the UK and analysis of the experience of domestic abuse and sexual assault for disabled adults aged 16 to 59 years in England and Wales. Analysis by age, sex and impairment type.</p>'
50
+ },
51
+ {
52
+ "url": '#0',
53
+ "title": 'Hate crime by disability status, Crime Survey for England and Wales (CSEW) combined years 2013 and 2014 to 2015 and 2016',
54
+ "metadata": {
55
+ "type": {
56
+ "text": 'User requested data',
57
+ "ref": 'Ref 008052'
58
+ },
59
+ "date": {
60
+ "prefix": 'Released',
61
+ "showPrefix": true,
62
+ "iso": '2017-04-20',
63
+ "short": '20 April 2017'
64
+ }
63
65
  }
64
66
  }
65
- }
66
- ]
67
- }) }}
67
+ ]
68
+ })
69
+ }}
@@ -2,7 +2,7 @@
2
2
  {% from "components/input/_macro.njk" import onsInput %}
3
3
 
4
4
  {% macro onsDuration(params) %}
5
- {% set exclusiveClass = " ons-js-exclusive-group-item" if params.mutuallyExclusive else "" %}
5
+ {% set exclusiveClass = " ons-js-exclusive-group-item" if params.mutuallyExclusive %}
6
6
  {% set numberOfFields = 0 %}
7
7
 
8
8
  {% if params.field1 %}
@@ -15,64 +15,70 @@
15
15
 
16
16
  {% set fields %}
17
17
  {% if params.field1 %}
18
- {{ onsInput({
19
- "id": params.field1.id,
20
- "type": "number",
21
- "name": params.field1.name,
22
- "classes": (" ons-input--error" if (params.error and params.field1.error) or (numberOfFields > 1 and params.error and not params.field1.error and not params.field2.error) else "") + exclusiveClass | default(""),
23
- "width": "2",
24
- "attributes": params.field1.attributes,
25
- "value": params.field1.value,
26
- "suffix": {
27
- "text": params.field1.suffix.text,
28
- "title": params.field1.suffix.title,
29
- "id": params.field1.suffix.id
30
- },
31
- "label": {
32
- "text": params.legendOrLabel if numberOfFields < 2,
33
- "description": params.description if numberOfFields < 2
34
- },
35
- "fieldId": params.id if numberOfFields < 2,
36
- "error": params.error if numberOfFields < 2
37
- }) }}
18
+ {{
19
+ onsInput({
20
+ "id": params.field1.id,
21
+ "type": "number",
22
+ "name": params.field1.name,
23
+ "classes": (" ons-input--error" if (params.error and params.field1.error) or (numberOfFields > 1 and params.error and not params.field1.error and not params.field2.error) else "") + exclusiveClass | default(""),
24
+ "width": "2",
25
+ "attributes": params.field1.attributes,
26
+ "value": params.field1.value,
27
+ "suffix": {
28
+ "text": params.field1.suffix.text,
29
+ "title": params.field1.suffix.title,
30
+ "id": params.field1.suffix.id
31
+ },
32
+ "label": {
33
+ "text": params.legendOrLabel if numberOfFields < 2,
34
+ "description": params.description if numberOfFields < 2
35
+ },
36
+ "fieldId": params.id if numberOfFields < 2,
37
+ "error": params.error if numberOfFields < 2
38
+ })
39
+ }}
38
40
  {% endif %}
39
41
 
40
42
  {% if params.field2 %}
41
- {{ onsInput({
42
- "id": params.field2.id,
43
- "type": "number",
44
- "name": params.field2.name,
45
- "classes": (" ons-input--error" if (params.error and params.field2.error) or (numberOfFields > 1 and params.error and not params.field1.error and not params.field2.error) else "") + exclusiveClass | default(""),
46
- "width": "2",
47
- "attributes": params.field2.attributes,
48
- "value": params.field2.value,
49
- "suffix": {
50
- "text": params.field2.suffix.text,
51
- "title": params.field2.suffix.title,
52
- "id": params.field2.suffix.id
53
- },
54
- "label": {
55
- "text": params.legendOrLabel if numberOfFields < 2,
56
- "description": params.description if numberOfFields < 2
57
- },
58
- "fieldId": params.id if numberOfFields < 2,
59
- "error": params.error if numberOfFields < 2
60
- }) }}
43
+ {{
44
+ onsInput({
45
+ "id": params.field2.id,
46
+ "type": "number",
47
+ "name": params.field2.name,
48
+ "classes": (" ons-input--error" if (params.error and params.field2.error) or (numberOfFields > 1 and params.error and not params.field1.error and not params.field2.error) else "") + exclusiveClass | default(""),
49
+ "width": "2",
50
+ "attributes": params.field2.attributes,
51
+ "value": params.field2.value,
52
+ "suffix": {
53
+ "text": params.field2.suffix.text,
54
+ "title": params.field2.suffix.title,
55
+ "id": params.field2.suffix.id
56
+ },
57
+ "label": {
58
+ "text": params.legendOrLabel if numberOfFields < 2,
59
+ "description": params.description if numberOfFields < 2
60
+ },
61
+ "fieldId": params.id if numberOfFields < 2,
62
+ "error": params.error if numberOfFields < 2
63
+ })
64
+ }}
61
65
  {% endif %}
62
66
  {% endset %}
63
67
 
64
- {{ onsMultipleInputFields({
65
- "id": params.id,
66
- "legendOrLabel": params.legendOrLabel,
67
- "description": params.description,
68
- "mutuallyExclusive": params.mutuallyExclusive,
69
- "numberOfFields": numberOfFields,
70
- "fields": fields,
71
- "error": params.error,
72
- "legend": params.legendOrLabel,
73
- "dontWrap": params.dontWrap,
74
- "classes": params.classes,
75
- "legendClasses": params.legendClasses,
76
- "legendIsQuestionTitle": params.legendIsQuestionTitle
77
- }) }}
68
+ {{
69
+ onsMultipleInputFields({
70
+ "id": params.id,
71
+ "legendOrLabel": params.legendOrLabel,
72
+ "description": params.description,
73
+ "mutuallyExclusive": params.mutuallyExclusive,
74
+ "numberOfFields": numberOfFields,
75
+ "fields": fields,
76
+ "error": params.error,
77
+ "legend": params.legendOrLabel,
78
+ "dontWrap": params.dontWrap,
79
+ "classes": params.classes,
80
+ "legendClasses": params.legendClasses,
81
+ "legendIsQuestionTitle": params.legendIsQuestionTitle
82
+ })
83
+ }}
78
84
  {% endmacro %}
@@ -1,31 +1,33 @@
1
1
  {% from "components/question/_macro.njk" import onsQuestion %}
2
2
  {% from "components/duration/_macro.njk" import onsDuration %}
3
3
 
4
- {{ onsDuration({
5
- "id": "travel-time",
6
- "legendOrLabel": 'How long do you spend travelling to and from work each day?',
7
- "legendClasses": 'ons-u-vh',
8
- "error": {
9
- "text": "Enter a number of minutes that is less than 60",
10
- "id": "duration-error"
11
- },
12
- "field1": {
13
- "id": "travel-time-hours",
14
- "name": "travel-time-hours",
15
- "suffix": {
16
- "text": "Hours",
17
- "id": "address-time-hours-suffix"
4
+ {{
5
+ onsDuration({
6
+ "id": "travel-time",
7
+ "legendOrLabel": 'How long do you spend travelling to and from work each day?',
8
+ "legendClasses": 'ons-u-vh',
9
+ "error": {
10
+ "text": "Enter a number of minutes that is less than 60",
11
+ "id": "duration-error"
18
12
  },
19
- "value": "2"
20
- },
21
- "field2": {
22
- "id": "travel-time-minutes",
23
- "name": "travel-time-minutes",
24
- "suffix": {
25
- "text": "Minutes",
26
- "id": "address-time-minutes-suffix"
13
+ "field1": {
14
+ "id": "travel-time-hours",
15
+ "name": "travel-time-hours",
16
+ "suffix": {
17
+ "text": "Hours",
18
+ "id": "address-time-hours-suffix"
19
+ },
20
+ "value": "2"
27
21
  },
28
- "value": "60",
29
- "error": true
30
- }
31
- }) }}
22
+ "field2": {
23
+ "id": "travel-time-minutes",
24
+ "name": "travel-time-minutes",
25
+ "suffix": {
26
+ "text": "Minutes",
27
+ "id": "address-time-minutes-suffix"
28
+ },
29
+ "value": "60",
30
+ "error": true
31
+ }
32
+ })
33
+ }}