@ons/design-system 62.0.1 → 62.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/README.md +0 -63
  2. package/components/access-code/example-access-code-error.njk +87 -0
  3. package/components/access-code/example-access-code.njk +63 -0
  4. package/components/accordion/example-accordion-open.njk +126 -0
  5. package/components/accordion/example-accordion.njk +25 -0
  6. package/components/address-input/example-address-input-editable.njk +52 -0
  7. package/components/address-input/example-address-input-manual.njk +23 -0
  8. package/components/address-input/example-address-input.njk +40 -0
  9. package/components/autosuggest/example-autosuggest-country-multiple.njk +30 -0
  10. package/components/autosuggest/example-autosuggest-country.njk +29 -0
  11. package/components/back-link/example-back-link.njk +17 -0
  12. package/components/breadcrumbs/example-breadcrumbs-single.njk +13 -0
  13. package/components/breadcrumbs/example-breadcrumbs.njk +17 -0
  14. package/components/button/_button.scss +5 -3
  15. package/components/button/example-button-custom.njk +20 -0
  16. package/components/button/example-button-disabled.njk +7 -0
  17. package/components/button/example-button-download.njk +9 -0
  18. package/components/button/example-button-ghost.njk +15 -0
  19. package/components/button/example-button-group.njk +16 -0
  20. package/components/button/example-button-link.njk +7 -0
  21. package/components/button/example-button-loader.njk +9 -0
  22. package/components/button/example-button-new-window.njk +12 -0
  23. package/components/button/example-button-print.njk +8 -0
  24. package/components/button/example-button-secondary-small.njk +8 -0
  25. package/components/button/example-button-secondary.njk +8 -0
  26. package/components/button/example-button-small.njk +8 -0
  27. package/components/button/example-button-timer.njk +9 -0
  28. package/components/button/example-button.njk +6 -0
  29. package/components/call-to-action/example-call-to-action-default.njk +14 -0
  30. package/components/card/example-card-set-with-images.njk +41 -0
  31. package/components/card/example-card-set-with-lists.njk +68 -0
  32. package/components/card/example-card-set.njk +38 -0
  33. package/components/card/example-card.njk +9 -0
  34. package/components/checkboxes/example-checkboxes-disabled.njk +34 -0
  35. package/components/checkboxes/example-checkboxes-error.njk +60 -0
  36. package/components/checkboxes/example-checkboxes-with-descriptions.njk +71 -0
  37. package/components/checkboxes/example-checkboxes-with-hidden-label.njk +177 -0
  38. package/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk +86 -0
  39. package/components/checkboxes/example-checkboxes-with-revealed-radios.njk +69 -0
  40. package/components/checkboxes/example-checkboxes-with-revealed-select.njk +71 -0
  41. package/components/checkboxes/example-checkboxes-with-revealed-text-input.njk +59 -0
  42. package/components/checkboxes/example-checkboxes-with-select-all-button.njk +51 -0
  43. package/components/checkboxes/example-checkboxes-with-visible-text-input.njk +61 -0
  44. package/components/checkboxes/example-checkboxes-without-border.njk +33 -0
  45. package/components/checkboxes/example-checkboxes.njk +46 -0
  46. package/components/content-pagination/example-content-pagination.njk +20 -0
  47. package/components/cookies-banner/_macro.njk +4 -4
  48. package/components/cookies-banner/_macro.spec.js +41 -1
  49. package/components/cookies-banner/example-cookies-banner-cymraeg.njk +9 -0
  50. package/components/cookies-banner/example-cookies-banner.njk +7 -0
  51. package/components/date-input/example-date-input-error.njk +62 -0
  52. package/components/date-input/example-date-input.njk +36 -0
  53. package/components/details/example-details-with-saved-state.njk +10 -0
  54. package/components/details/example-details-with-warning.njk +19 -0
  55. package/components/details/example-details.njk +9 -0
  56. package/components/document-list/example-document-list-article-featured.njk +31 -0
  57. package/components/document-list/example-document-list-articles.njk +60 -0
  58. package/components/document-list/example-document-list-downloads.njk +59 -0
  59. package/components/document-list/example-document-list-search-result-featured.njk +19 -0
  60. package/components/document-list/example-document-list-search-results.njk +67 -0
  61. package/components/duration/example-duration-error.njk +30 -0
  62. package/components/duration/example-duration.njk +35 -0
  63. package/components/duration/examples-duration-error-for-single-field.njk +31 -0
  64. package/components/external-link/example-external-link.njk +8 -0
  65. package/components/feedback/example-feedback-call-to-action.njk +14 -0
  66. package/components/footer/example-footer-cymraeg.njk +54 -0
  67. package/components/footer/example-footer-default.njk +7 -0
  68. package/components/footer/example-footer-transactional.njk +62 -0
  69. package/components/footer/example-footer-warning.njk +32 -0
  70. package/components/footer/example-footer-with-alternative-organisation.njk +124 -0
  71. package/components/footer/example-footer-with-coat-of-arms.njk +32 -0
  72. package/components/footer/example-footer-with-copyright.njk +35 -0
  73. package/components/footer/example-footer.njk +85 -0
  74. package/components/header/_header.scss +2 -2
  75. package/components/header/_macro.spec.js +97 -0
  76. package/components/header/example-header-default.njk +12 -0
  77. package/components/header/example-header-external-for-survey-with-description.njk +20 -0
  78. package/components/header/example-header-external-for-surveys.njk +33 -0
  79. package/components/header/example-header-external-welsh.njk +29 -0
  80. package/components/header/example-header-external-with-navigation.njk +42 -0
  81. package/components/header/example-header-external-with-service-links.njk +35 -0
  82. package/components/header/example-header-external-with-sub-navigation.njk +132 -0
  83. package/components/header/example-header-internal.njk +32 -0
  84. package/components/header/example-header-neutral-for-multicoloured-logo.njk +59 -0
  85. package/components/hero/example-hero-dark.njk +15 -0
  86. package/components/hero/example-hero-default.njk +14 -0
  87. package/components/images/example-images-for-regular-screens.njk +8 -0
  88. package/components/images/example-images-for-retina-screens.njk +10 -0
  89. package/components/input/example-input-email.njk +12 -0
  90. package/components/input/example-input-number-prefixed.njk +17 -0
  91. package/components/input/example-input-number-suffixed.njk +34 -0
  92. package/components/input/example-input-number.njk +15 -0
  93. package/components/input/example-input-numeric-values.njk +64 -0
  94. package/components/input/example-input-telephone.njk +13 -0
  95. package/components/input/example-input-text-width-constrained.njk +11 -0
  96. package/components/input/example-input-text-with-character-limit-checker.njk +17 -0
  97. package/components/input/example-input-text-with-description.njk +10 -0
  98. package/components/input/example-input-text.njk +9 -0
  99. package/components/label/example-label-with-description.njk +8 -0
  100. package/components/label/example-label.njk +8 -0
  101. package/components/metadata/example-metadata.njk +57 -0
  102. package/components/mutually-exclusive/example-mutually-exclusive-checkboxes.njk +71 -0
  103. package/components/mutually-exclusive/example-mutually-exclusive-date-with-error.njk +47 -0
  104. package/components/mutually-exclusive/example-mutually-exclusive-date.njk +49 -0
  105. package/components/mutually-exclusive/example-mutually-exclusive-duration.njk +45 -0
  106. package/components/mutually-exclusive/example-mutually-exclusive-email.njk +36 -0
  107. package/components/mutually-exclusive/example-mutually-exclusive-multiple-options.njk +63 -0
  108. package/components/mutually-exclusive/example-mutually-exclusive-number.njk +43 -0
  109. package/components/mutually-exclusive/example-mutually-exclusive-textarea.njk +40 -0
  110. package/components/navigation/_macro.njk +1 -1
  111. package/components/pagination/example-pagination-first.njk +24 -0
  112. package/components/pagination/example-pagination-last.njk +24 -0
  113. package/components/pagination/example-pagination-with-no-range-indicator.njk +42 -0
  114. package/components/pagination/example-pagination.njk +116 -0
  115. package/components/panel/example-panel-bare.njk +9 -0
  116. package/components/panel/example-panel-with-announcement.njk +18 -0
  117. package/components/panel/example-panel-with-error-details.njk +18 -0
  118. package/components/panel/example-panel-with-error-summary.njk +25 -0
  119. package/components/panel/example-panel-with-information.njk +7 -0
  120. package/components/panel/example-panel-with-spacious-information.njk +7 -0
  121. package/components/panel/example-panel-with-success-message.njk +10 -0
  122. package/components/panel/example-panel-with-warning.njk +8 -0
  123. package/components/password/example-password.njk +11 -0
  124. package/components/phase-banner/example-phase-banner-alpha.njk +10 -0
  125. package/components/phase-banner/example-phase-banner-beta.njk +9 -0
  126. package/components/question/example-question-ccs.njk +49 -0
  127. package/components/question/example-question-fieldset.njk +99 -0
  128. package/components/question/example-question-interviewer-note.njk +38 -0
  129. package/components/question/example-question-no-fieldset.njk +46 -0
  130. package/components/radios/example-radios-with-clear-button.njk +97 -0
  131. package/components/radios/example-radios-with-descriptions.njk +57 -0
  132. package/components/radios/example-radios-with-error.njk +38 -0
  133. package/components/radios/example-radios-with-revealed-checkboxes.njk +69 -0
  134. package/components/radios/example-radios-with-revealed-radios.njk +68 -0
  135. package/components/radios/example-radios-with-revealed-select.njk +69 -0
  136. package/components/radios/example-radios-with-revealed-text-input.njk +80 -0
  137. package/components/radios/example-radios-with-separator.njk +59 -0
  138. package/components/radios/example-radios-with-visible-text-input.njk +40 -0
  139. package/components/radios/example-radios-without-border.njk +48 -0
  140. package/components/radios/examples-radios.njk +38 -0
  141. package/components/related-content/example-related-content-general.njk +44 -0
  142. package/components/related-content/example-related-content-multiple-rows-of-links.njk +51 -0
  143. package/components/related-content/example-related-content-social-media.njk +40 -0
  144. package/components/relationships/example-relationships-error.njk +211 -0
  145. package/components/relationships/example-relationships-you.njk +187 -0
  146. package/components/relationships/example-relationships.njk +185 -0
  147. package/components/search/example-search-with-character-check.njk +23 -0
  148. package/components/search/example-search-with-placeholder.njk +16 -0
  149. package/components/search/example-search.njk +16 -0
  150. package/components/section-navigation/example-section-navigation-vertical.njk +40 -0
  151. package/components/section-navigation/example-section-navigation.njk +21 -0
  152. package/components/select/example-select-wide.njk +55 -0
  153. package/components/select/example-select-with-error.njk +58 -0
  154. package/components/select/example-select-with-inline-label.njk +23 -0
  155. package/components/select/example-select.njk +50 -0
  156. package/components/share-page/example-share-page.njk +11 -0
  157. package/components/skip-to-content/example-skip-to-content.njk +10 -0
  158. package/components/status/example-status-dead.njk +7 -0
  159. package/components/status/example-status-error.njk +7 -0
  160. package/components/status/example-status-neutral-information.njk +6 -0
  161. package/components/status/example-status-pending.njk +7 -0
  162. package/components/status/example-status-small.njk +8 -0
  163. package/components/status/example-status-success.njk +7 -0
  164. package/components/summary/example-summary-grouped-total.njk +67 -0
  165. package/components/summary/example-summary-grouped-with-errors.njk +96 -0
  166. package/components/summary/example-summary-grouped.njk +353 -0
  167. package/components/summary/example-summary-household-no-rows.njk +20 -0
  168. package/components/summary/example-summary-household.njk +77 -0
  169. package/components/summary/example-summary-hub.njk +170 -0
  170. package/components/summary/example-summary-multiple.njk +81 -0
  171. package/components/summary/example-summary-no-action.njk +40 -0
  172. package/components/summary/example-summary.njk +107 -0
  173. package/components/table/_macro.njk +1 -1
  174. package/components/table/_table.scss +10 -10
  175. package/components/table/example-table-basic.njk +47 -0
  176. package/components/table/example-table-compact.njk +73 -0
  177. package/components/table/example-table-footer.njk +56 -0
  178. package/components/table/example-table-numeric.njk +81 -0
  179. package/components/table/example-table-responsive.njk +89 -0
  180. package/components/table/example-table-scrollable.njk +158 -0
  181. package/components/table/example-table-sortable.njk +236 -0
  182. package/components/table/sortable-table.dom.js +1 -1
  183. package/components/table/sortable-table.js +5 -2
  184. package/components/table-of-contents/example-table-of-contents-grouped.njk +50 -0
  185. package/components/table-of-contents/example-table-of-contents-single.njk +39 -0
  186. package/components/table-of-contents/example-table-of-contents-sticky.njk +78 -0
  187. package/components/tabs/example-tabs-details.njk +59 -0
  188. package/components/tabs/example-tabs.njk +39 -0
  189. package/components/textarea/example-textarea-error.njk +16 -0
  190. package/components/textarea/example-textarea-with-character-limit.njk +18 -0
  191. package/components/textarea/example-textarea.njk +12 -0
  192. package/components/timeline/example-timeline.njk +35 -0
  193. package/components/timeout-modal/example-timeout-modal.njk +16 -0
  194. package/components/timeout-panel/example-panel-with-timeout-warning.njk +13 -0
  195. package/components/upload/example-upload-error.njk +16 -0
  196. package/components/upload/example-upload.njk +12 -0
  197. package/components/video/example-video.njk +14 -0
  198. package/css/main.css +3 -3
  199. package/css/print.css +1 -1
  200. package/layout/_template.njk +1 -12
  201. package/package.json +3 -8
  202. package/scripts/main.es5.js +1 -1
  203. package/scripts/main.js +2 -2
  204. package/scss/base/_typography.scss +2 -2
  205. package/scss/main.scss +0 -1
  206. package/scss/print.scss +13 -5
  207. package/scss/utilities/_highlight.scss +6 -0
  208. package/scss/utilities/_index.scss +1 -0
  209. package/components/code-highlight/_macro.njk +0 -5
  210. package/components/code-highlight/_macro.spec.js +0 -56
  211. package/components/code-highlight/code-highlight.spec.js +0 -18
  212. package/scss/patternlib.scss +0 -148
@@ -0,0 +1,10 @@
1
+ ---
2
+ "fullWidth": true
3
+ ---
4
+ {% from "components/phase-banner/_macro.njk" import onsPhaseBanner %}
5
+ {{
6
+ onsPhaseBanner({
7
+ "badge": 'Alpha',
8
+ "html": 'This is a new service. To help us improve it, <a href="#0">give feedback</a>'
9
+ })
10
+ }}
@@ -0,0 +1,9 @@
1
+ ---
2
+ "fullWidth": true
3
+ ---
4
+ {% from "components/phase-banner/_macro.njk" import onsPhaseBanner %}
5
+ {{
6
+ onsPhaseBanner({
7
+ "html": 'This is a new service. To help us improve it, <a href="#0">give feedback</a>'
8
+ })
9
+ }}
@@ -0,0 +1,49 @@
1
+ ---
2
+ title: "Example: Question with an interviewer instruction"
3
+ layout: ~
4
+ ---
5
+ {% extends "layout/_template.njk" %}
6
+ {% from "components/question/_macro.njk" import onsQuestion %}
7
+ {% from "components/details/_macro.njk" import onsDetails %}
8
+ {% from "components/input/_macro.njk" import onsInput %}
9
+ {% from "components/button/_macro.njk" import onsButton %}
10
+
11
+ {% set pageConfig = {
12
+ "header": {
13
+ "title": "Interviewer led question example"
14
+ },
15
+ "breadcrumbs": {
16
+ "ariaLabel": 'Breadcrumbs',
17
+ "itemsList": [
18
+ {
19
+ "url": '#0',
20
+ "text": 'Previous'
21
+ }
22
+ ]
23
+ }
24
+ } %}
25
+
26
+ {% block main %}
27
+ {% call onsQuestion({
28
+ "title": "How many visitors do you have staying overnight at 3 Severn Road on Sunday 21 March 2021?",
29
+ "description": "<p>A visitor is anyone aged <strong>16 years or over</strong> who usually lives at another address. Enter “0” if there are no visitors staying overnight.</p>",
30
+ "instruction": "<p>Tell respondent to turn to <strong>Showcard 2</strong> or show them the following Electronic Showcard</p>",
31
+ "definition": {
32
+ "title": "Electronic Showcard",
33
+ "content": "<p>Visitor information is collected to ensure that everyone is counted, in order to produce accurate estimates of the population, to facilitate effective planning and funding decisions</p>"
34
+ },
35
+ "submitButton": true
36
+ }) %}
37
+
38
+ {{ onsInput({
39
+ "id": "number-of-visitors",
40
+ "name": "number-of-visitors",
41
+ "type": "number",
42
+ "width": "2",
43
+ "label": {
44
+ "text": "Number of visitors"
45
+ }
46
+ }) }}
47
+
48
+ {% endcall %}
49
+ {% endblock %}
@@ -0,0 +1,99 @@
1
+ ---
2
+ title: "Example: Question as a fieldset"
3
+ layout: ~
4
+ ---
5
+ {% extends "layout/_template.njk" %}
6
+ {% from "components/question/_macro.njk" import onsQuestion %}
7
+ {% from "components/details/_macro.njk" import onsDetails %}
8
+ {% from "components/panel/_macro.njk" import onsPanel %}
9
+ {% from "components/radios/_macro.njk" import onsRadios %}
10
+ {% from "components/button/_macro.njk" import onsButton %}
11
+
12
+ {% set pageConfig = {
13
+ "header": {
14
+ "title": "Question example"
15
+ },
16
+ "breadcrumbs": {
17
+ "ariaLabel": 'Breadcrumbs',
18
+ "itemsList": [
19
+ {
20
+ "url": '#0',
21
+ "text": 'Previous'
22
+ }
23
+ ]
24
+ }
25
+ } %}
26
+
27
+ {% set questionTitle = "On 1 May 2016, what was the number of employees for Bolt and Ratchet?" %}
28
+
29
+ {% block main %}
30
+ {% call onsQuestion({
31
+ "title": questionTitle,
32
+ "description": "<p>This is all employees aged 16 years or over that your organisation employs</p>",
33
+ "definition": {
34
+ "title": "What we mean by “employee”",
35
+ "content": "<p>An employee is a person that your organisation directly pays from its payroll(s), in return for carrying out a full-time or part-time job</p>"
36
+ },
37
+ "guidance": {
38
+ "lists": [
39
+ {
40
+ "listHeading": "Include:",
41
+ "itemsList": [
42
+ {
43
+ "text": "all employees in Great Britain (England, Scotland and Wales), both full and part-time, who received pay in the relevant period"
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "listHeading": "Exclude:",
49
+ "itemsList": [
50
+ {
51
+ "text": "trainees on government schemes"
52
+ },
53
+ {
54
+ "text": "employees working abroad unless paid directly from this business’s GB payroll"
55
+ }
56
+ ]
57
+ }
58
+ ]
59
+ },
60
+ "justification": {
61
+ "title": "Why we ask this question",
62
+ "content": "<p>We ask this question in order to understand the size of organisations in the UK</p>"
63
+ },
64
+ "submitButton": true
65
+ }) %}
66
+
67
+ {{ onsRadios({
68
+ "id": "number-of-employees",
69
+ "name": "number-of-employees",
70
+ "legend": questionTitle,
71
+ "legendClasses": "ons-u-vh",
72
+ "radios": [
73
+ {
74
+ "id": "number-of-employees-1-9",
75
+ "label": {
76
+ "text": "1 – 9 employees"
77
+ },
78
+ "value": "1-9"
79
+ },
80
+ {
81
+ "id": "number-of-employees-10-49",
82
+ "label": {
83
+ "text": "10 – 49 employees"
84
+ },
85
+ "value": "10-49"
86
+ },
87
+ {
88
+ "id": "number-of-employees-50-100",
89
+ "label": {
90
+ "text": "50 – 100+ employees",
91
+ "description": "Include multi-corporations"
92
+ },
93
+ "value": "50-100"
94
+ }
95
+ ]
96
+ }) }}
97
+
98
+ {% endcall %}
99
+ {% endblock %}
@@ -0,0 +1,38 @@
1
+ ---
2
+ title: "Example: Interstitial page with interviewer note"
3
+ layout: ~
4
+ ---
5
+ {# TO DO: To be used in a new 'Interstitial' page pattern #}
6
+
7
+ {% extends "layout/_template.njk" %}
8
+ {% from "components/question/_macro.njk" import onsQuestion %}
9
+ {% from "components/details/_macro.njk" import onsDetails %}
10
+ {% from "components/input/_macro.njk" import onsInput %}
11
+ {% from "components/button/_macro.njk" import onsButton %}
12
+
13
+ {% set pageConfig = {
14
+ "header": {
15
+ "title": "Interviewer led interstitial"
16
+ },
17
+ "breadcrumbs": {
18
+ "ariaLabel": 'Breadcrumbs',
19
+ "itemsList": [
20
+ {
21
+ "url": '#0',
22
+ "text": 'Previous'
23
+ }
24
+ ]
25
+ }
26
+ } %}
27
+
28
+ {% block main %}
29
+ {% call onsQuestion({
30
+ "title": "<mark class=\"ons-instruction\">Interviewer note:</mark>Who to interview",
31
+ "instruction": "<p>Only interview a person who was usually living at the property on <em>Sunday 21 March 2021</em>.</p><p>If none of those house members are available, you must save and sign out and return to the address to interview one of them at a later date.</p>",
32
+ "submitButton": {
33
+ "variants": "timer",
34
+ "text": "Continue"
35
+ }
36
+ }) %}
37
+ {% endcall %}
38
+ {% endblock %}
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: "Example: Question without a fieldset"
3
+ layout: ~
4
+ ---
5
+ {% extends "layout/_template.njk" %}
6
+ {% from "components/question/_macro.njk" import onsQuestion %}
7
+ {% from "components/details/_macro.njk" import onsDetails %}
8
+ {% from "components/input/_macro.njk" import onsInput %}
9
+ {% from "components/button/_macro.njk" import onsButton %}
10
+
11
+ {% set pageConfig = {
12
+ "header": {
13
+ "title": "Question example"
14
+ },
15
+ "breadcrumbs": {
16
+ "ariaLabel": 'Breadcrumbs',
17
+ "itemsList": [
18
+ {
19
+ "url": '#0',
20
+ "text": 'Previous'
21
+ }
22
+ ]
23
+ }
24
+ } %}
25
+
26
+ {% block main %}
27
+ {% call onsQuestion({
28
+ "title": "How many visitors are staying overnight at 3 Severn Road on 13 May 2019?",
29
+ "description": "<p>Enter “0” if there are no visitors staying overnight</p>",
30
+ "justification": {
31
+ "title": "Why we ask this question",
32
+ "content": "<p>Visitor information is collected to ensure that everyone is counted, in order to produce accurate estimates of the population, to facilitate effective planning and funding decisions.</p>"
33
+ },
34
+ "submitButton": true
35
+ }) %}
36
+ {{ onsInput({
37
+ "id": "number-of-visitors",
38
+ "name": "number-of-visitors",
39
+ "type": "number",
40
+ "width": "2",
41
+ "label": {
42
+ "text": "Number of visitors"
43
+ }
44
+ }) }}
45
+ {% endcall %}
46
+ {% endblock %}
@@ -0,0 +1,97 @@
1
+ {% from "components/radios/_macro.njk" import onsRadios %}
2
+ {% from "components/button/_macro.njk" import onsButton %}
3
+ {% from "components/question/_macro.njk" import onsQuestion %}
4
+ {% from "components/panel/_macro.njk" import onsPanel %}
5
+
6
+ {% call onsQuestion({
7
+ "title": "What is your religion?",
8
+ "legendIsQuestionTitle": true
9
+ }) %}
10
+ {{
11
+ onsPanel({
12
+ "body": '<p>This question is <strong>voluntary</strong></p>',
13
+ "classes": 'ons-u-mb-m'
14
+ })
15
+ }}
16
+ <form onsubmit="return false;">
17
+ {{
18
+ onsRadios({
19
+ "dontWrap": true,
20
+ "name": "religion",
21
+ "clearRadios": {
22
+ "text": "Clear selection",
23
+ "name": "clear-radios",
24
+ "ariaClearText": "You can clear your answer using the clear selection button after the radio inputs",
25
+ "ariaClearedText": "You have cleared your answer"
26
+ },
27
+ "radios": [
28
+ {
29
+ "id": "none",
30
+ "label": {
31
+ "text": "No religion"
32
+ },
33
+ "value": "none"
34
+ },
35
+ {
36
+ "id": "christian",
37
+ "label": {
38
+ "text": "Christian",
39
+ "description": "Including Church of England, Catholic, Protestant and all other Christian denominations"
40
+ },
41
+ "value": "christian"
42
+ },
43
+ {
44
+ "id": "buddhist",
45
+ "label": {
46
+ "text": "Buddhist"
47
+ },
48
+ "value": "buddhist"
49
+ },
50
+ {
51
+ "id": "hindu",
52
+ "label": {
53
+ "text": "Hindu"
54
+ },
55
+ "value": "hindu"
56
+ },
57
+ {
58
+ "id": "jewish",
59
+ "label": {
60
+ "text": "Jewish"
61
+ },
62
+ "value": "jewish"
63
+ },
64
+ {
65
+ "id": "muslim",
66
+ "label": {
67
+ "text": "Muslim"
68
+ },
69
+ "value": "muslim"
70
+ },
71
+ {
72
+ "id": "sikh",
73
+ "label": {
74
+ "text": "Sikh"
75
+ },
76
+ "value": "sikh"
77
+ },
78
+ {
79
+ "id": "other-radio",
80
+ "label": {
81
+ "text": "Any other religion"
82
+ },
83
+ "value": "other",
84
+ "other": {
85
+ "otherType": "input",
86
+ "id": "other-textbox",
87
+ "name": "other-answer",
88
+ "label": {
89
+ "text": "Enter your religion"
90
+ }
91
+ }
92
+ }
93
+ ]
94
+ })
95
+ }}
96
+ </form>
97
+ {% endcall %}
@@ -0,0 +1,57 @@
1
+ {% from "components/radios/_macro.njk" import onsRadios %}
2
+ {% from "components/question/_macro.njk" import onsQuestion %}
3
+
4
+ {% call onsQuestion({
5
+ "title": "What is your ethnic group or background?",
6
+ "classes": "ons-u-mt-no",
7
+ "legendIsQuestionTitle": true
8
+ }) %}
9
+ {{
10
+ onsRadios({
11
+ "dontWrap": true,
12
+ "name": "ethnicity",
13
+ "radios": [
14
+ {
15
+ "id": "white",
16
+ "label": {
17
+ "text": "White",
18
+ "description": "Includes British, Northern Irish, Irish, Gypsy, Irish Traveller, Roma or any other White background"
19
+ },
20
+ "name": "white"
21
+ },
22
+ {
23
+ "id": "mixed",
24
+ "label": {
25
+ "text": "Mixed or Multiple ethnic groups",
26
+ "description": "Includes White and Black Caribbean, White and Black African, White and Asian or any other Mixed or Multiple background"
27
+ },
28
+ "name": "mixed"
29
+ },
30
+ {
31
+ "id": "asian",
32
+ "label": {
33
+ "text": "Asian or Asian British",
34
+ "description": "Includes Indian, Pakistani, Bangladeshi, Chinese or any other Asian background"
35
+ },
36
+ "name": "asian"
37
+ },
38
+ {
39
+ "id": "black",
40
+ "label": {
41
+ "text": "Black, Black British, Caribbean or African",
42
+ "description": "Includes Black British, Caribbean, African or any other Black background"
43
+ },
44
+ "name": "black"
45
+ },
46
+ {
47
+ "id": "other",
48
+ "label": {
49
+ "text": "Other ethnic group",
50
+ "description": "Includes Arab or any other ethnic group"
51
+ },
52
+ "name": "other"
53
+ }
54
+ ]
55
+ })
56
+ }}
57
+ {% endcall %}
@@ -0,0 +1,38 @@
1
+ {% from "components/radios/_macro.njk" import onsRadios %}
2
+
3
+ {{
4
+ onsRadios({
5
+ "name": "gender-identity",
6
+ "dontWrap": true,
7
+ "radios": [
8
+ {
9
+ "id": "yes",
10
+ "label": {
11
+ "text": "Yes"
12
+ },
13
+ "value": "yes"
14
+ },
15
+ {
16
+ "id": "no",
17
+ "label": {
18
+ "text": "No"
19
+ },
20
+ "value": "no",
21
+ "checked": true,
22
+ "other": {
23
+ "open": true,
24
+ "otherType": "input",
25
+ "id": "no-textbox",
26
+ "name": "no-answer",
27
+ "label": {
28
+ "text": "Enter your gender identity"
29
+ }
30
+ }
31
+ }
32
+ ],
33
+ "error": {
34
+ "id": "dietary-error",
35
+ "text": "Enter your gender identity"
36
+ }
37
+ })
38
+ }}
@@ -0,0 +1,69 @@
1
+ {% from "components/radios/_macro.njk" import onsRadios %}
2
+
3
+ {{
4
+ onsRadios({
5
+ "legend": "How would you like us to contact you?",
6
+ "name": "contact",
7
+ "borderless": true,
8
+ "radios": [
9
+ {
10
+ "id": "post",
11
+ "label": {
12
+ "text": "By post"
13
+ },
14
+ "value": "post"
15
+ },
16
+ {
17
+ "id": "email",
18
+ "label": {
19
+ "text": "By email"
20
+ },
21
+ "value": "email"
22
+ },
23
+ {
24
+ "id": "phone",
25
+ "label": {
26
+ "text": "By phone"
27
+ },
28
+ "value": "phone",
29
+ "other": {
30
+ "otherType": "checkboxes",
31
+ "selectAllChildren": true,
32
+ "id": "phone-time",
33
+ "name": "phone-time",
34
+ "legend": "Select preferred times of day",
35
+ "checkboxes": [
36
+ {
37
+ "value": "anytime",
38
+ "id": "anytime",
39
+ "label": {
40
+ "text": "Anytime of day"
41
+ }
42
+ },
43
+ {
44
+ "value": "morning",
45
+ "id": "morning",
46
+ "label": {
47
+ "text": "Morning"
48
+ }
49
+ },
50
+ {
51
+ "value": "afternoon",
52
+ "id": "afternoon",
53
+ "label": {
54
+ "text": "Afternoon"
55
+ }
56
+ },
57
+ {
58
+ "value": "evening",
59
+ "id": "evening",
60
+ "label": {
61
+ "text": "Evening"
62
+ }
63
+ }
64
+ ]
65
+ }
66
+ }
67
+ ]
68
+ })
69
+ }}
@@ -0,0 +1,68 @@
1
+ {% from "components/radios/_macro.njk" import onsRadios %}
2
+
3
+ {{
4
+ onsRadios({
5
+ "legend": "How would you like us to contact you?",
6
+ "name": "contact",
7
+ "borderless": true,
8
+ "radios": [
9
+ {
10
+ "id": "post",
11
+ "label": {
12
+ "text": "By post"
13
+ },
14
+ "value": "post"
15
+ },
16
+ {
17
+ "id": "email",
18
+ "label": {
19
+ "text": "By email"
20
+ },
21
+ "value": "email"
22
+ },
23
+ {
24
+ "id": "phone",
25
+ "label": {
26
+ "text": "By phone"
27
+ },
28
+ "value": "phone",
29
+ "other": {
30
+ "otherType": "radios",
31
+ "id": "phone-time",
32
+ "name": "phone-time",
33
+ "legend": "Choose preferred time of day",
34
+ "radios": [
35
+ {
36
+ "value": "anytime",
37
+ "id": "anytime",
38
+ "label": {
39
+ "text": "Anytime of day"
40
+ }
41
+ },
42
+ {
43
+ "value": "morning",
44
+ "id": "morning",
45
+ "label": {
46
+ "text": "Morning"
47
+ }
48
+ },
49
+ {
50
+ "value": "afternoon",
51
+ "id": "afternoon",
52
+ "label": {
53
+ "text": "Afternoon"
54
+ }
55
+ },
56
+ {
57
+ "value": "evening",
58
+ "id": "evening",
59
+ "label": {
60
+ "text": "Evening"
61
+ }
62
+ }
63
+ ]
64
+ }
65
+ }
66
+ ]
67
+ })
68
+ }}
@@ -0,0 +1,69 @@
1
+ {% from "components/question/_macro.njk" import onsQuestion %}
2
+ {% from "components/radios/_macro.njk" import onsRadios %}
3
+
4
+ {% call onsQuestion({
5
+ "title": "How would you like us to contact you?",
6
+ "legendIsQuestionTitle": true
7
+ }) %}
8
+ {{
9
+ onsRadios({
10
+ "dontWrap": true,
11
+ "name": "contact",
12
+ "radios": [
13
+ {
14
+ "id": "post",
15
+ "label": {
16
+ "text": "By post"
17
+ },
18
+ "value": "post"
19
+ },
20
+ {
21
+ "id": "email",
22
+ "label": {
23
+ "text": "By email"
24
+ },
25
+ "value": "email"
26
+ },
27
+ {
28
+ "id": "phone",
29
+ "label": {
30
+ "text": "By phone"
31
+ },
32
+ "value": "phone",
33
+ "other": {
34
+ "otherType": "select",
35
+ "id": "phone-time",
36
+ "name": "phone-time",
37
+ "label": {
38
+ "text": "Choose preferred time of day"
39
+ },
40
+ "options": [
41
+ {
42
+ "value": "",
43
+ "text": "Select an option",
44
+ "disabled": true,
45
+ "selected": true
46
+ },
47
+ {
48
+ "value": "anytime",
49
+ "text": "Any time of day"
50
+ },
51
+ {
52
+ "value": "morning",
53
+ "text": "Morning"
54
+ },
55
+ {
56
+ "value": "afternoon",
57
+ "text": "Afternoon"
58
+ },
59
+ {
60
+ "value": "evening",
61
+ "text": "Evening"
62
+ }
63
+ ]
64
+ }
65
+ }
66
+ ]
67
+ })
68
+ }}
69
+ {% endcall %}