@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,9 @@
1
+ {% from "components/button/_macro.njk" import onsButton %}
2
+ {{
3
+ onsButton({
4
+ "text": 'Save answers as PDF',
5
+ "url": '#0',
6
+ "variants": ['download', 'small', 'secondary'],
7
+ "removeDownloadAttribute": true
8
+ })
9
+ }}
@@ -0,0 +1,15 @@
1
+ ---
2
+ fullWidth: true
3
+ ---
4
+ {% from "components/button/_macro.njk" import onsButton %}
5
+ <div style="padding: 1.5rem; background: #206095">
6
+ {{
7
+ onsButton({
8
+ "text": 'Save and sign out',
9
+ "url": '#0',
10
+ "variants": 'ghost',
11
+ "iconType": "exit",
12
+ "iconPosition": "after"
13
+ })
14
+ }}
15
+ </div>
@@ -0,0 +1,16 @@
1
+ {% from "components/button/_macro.njk" import onsButton %}
2
+
3
+ <div class="ons-btn-group">
4
+ {{
5
+ onsButton({
6
+ "text": 'Continue'
7
+ })
8
+ }}
9
+ {{
10
+ onsButton({
11
+ "type": 'button',
12
+ "text": 'Cancel',
13
+ "variants": 'secondary'
14
+ })
15
+ }}
16
+ </div>
@@ -0,0 +1,7 @@
1
+ {% from "components/button/_macro.njk" import onsButton %}
2
+ {{
3
+ onsButton({
4
+ "text": 'Get started',
5
+ "url": '#0'
6
+ })
7
+ }}
@@ -0,0 +1,9 @@
1
+ {% from "components/button/_macro.njk" import onsButton %}
2
+ <form onsubmit="return false;">
3
+ {{
4
+ onsButton({
5
+ "text": 'Submit',
6
+ "variants": 'loader'
7
+ })
8
+ }}
9
+ </form>
@@ -0,0 +1,12 @@
1
+ {% from "components/button/_macro.njk" import onsButton %}
2
+ {{
3
+ onsButton({
4
+ "text": 'Web chat',
5
+ "url": '/patterns/send-a-web-form/examples/form/',
6
+ "newWindow": true,
7
+ "newWindowDescription": 'opens in a new window',
8
+ "attributes": {
9
+ "onclick": "window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=360,height=680'); return false;"
10
+ }
11
+ })
12
+ }}
@@ -0,0 +1,8 @@
1
+ {% from "components/button/_macro.njk" import onsButton %}
2
+
3
+ {{
4
+ onsButton({
5
+ "text": 'Print this page',
6
+ "variants": ['print', 'small', 'secondary']
7
+ })
8
+ }}
@@ -0,0 +1,8 @@
1
+ {% from "components/button/_macro.njk" import onsButton %}
2
+ {{
3
+ onsButton({
4
+ "type": 'button',
5
+ "text": 'Add',
6
+ "variants": ['secondary', 'small']
7
+ })
8
+ }}
@@ -0,0 +1,8 @@
1
+ {% from "components/button/_macro.njk" import onsButton %}
2
+ {{
3
+ onsButton({
4
+ "type": 'button',
5
+ "text": 'Add a person',
6
+ "variants": 'secondary'
7
+ })
8
+ }}
@@ -0,0 +1,8 @@
1
+ {% from "components/button/_macro.njk" import onsButton %}
2
+ {{
3
+ onsButton({
4
+ "type": 'button',
5
+ "text": 'Add',
6
+ "variants": 'small'
7
+ })
8
+ }}
@@ -0,0 +1,9 @@
1
+ {% from "components/button/_macro.njk" import onsButton %}
2
+ <form onsubmit="return false;">
3
+ {{
4
+ onsButton({
5
+ "text": 'Submit',
6
+ "variants": 'timer'
7
+ })
8
+ }}
9
+ </form>
@@ -0,0 +1,6 @@
1
+ {% from "components/button/_macro.njk" import onsButton %}
2
+ {{
3
+ onsButton({
4
+ "text": "Save and continue"
5
+ })
6
+ }}
@@ -0,0 +1,14 @@
1
+ ---
2
+ "fullWidth": true
3
+ ---
4
+ {% from "components/call-to-action/_macro.njk" import onsCallToAction %}
5
+ {{-
6
+ onsCallToAction({
7
+ "headingText": 'Call to action heading.',
8
+ "paragraphText": 'Descriptive text about call to action',
9
+ "button": {
10
+ "text": 'Start',
11
+ "url": '#0'
12
+ }
13
+ })
14
+ }}
@@ -0,0 +1,41 @@
1
+ {% from "components/card/_macro.njk" import onsCard %}
2
+ <div class="ons-container">
3
+
4
+ <div class="ons-grid ons-grid--column@xxs@s">
5
+
6
+ <div class="ons-grid__col ons-col-4@m">
7
+ {{ onsCard({
8
+ "id": 'title1',
9
+ "textId": 'text1',
10
+ "title": 'About the census',
11
+ "url": '#0',
12
+ "text": 'The census is a survey that gives us information about all the households in England and Wales.',
13
+ "image": true
14
+ }) }}
15
+ </div>
16
+
17
+ <div class="ons-grid__col ons-col-4@m">
18
+ {{ onsCard({
19
+ "id": 'title2',
20
+ "textId": 'text2',
21
+ "title": 'Working on the census',
22
+ "url": '#0',
23
+ "text": 'For Census 2021, we’ll be hiring at least 30,000 field staff across England and Wales.',
24
+ "image": true
25
+ }) }}
26
+ </div>
27
+
28
+ <div class="ons-grid__col ons-col-4@m">
29
+ {{ onsCard({
30
+ "id": 'title3',
31
+ "textId": 'text3',
32
+ "title": 'Your data and security',
33
+ "url": '#0',
34
+ "text": 'How we keep your data safe and what happens to your personal information.',
35
+ "image": true
36
+ }) }}
37
+ </div>
38
+
39
+ </div>
40
+
41
+ </div>
@@ -0,0 +1,68 @@
1
+ {% from "components/card/_macro.njk" import onsCard %}
2
+ <div class="ons-container">
3
+
4
+ <div class="ons-grid ons-grid--column@xxs@s">
5
+
6
+ <div class="ons-grid__col ons-col-4@m">
7
+ {{ onsCard({
8
+ "id": 'title1',
9
+ "textId": 'text1',
10
+ "title": 'About the census',
11
+ "url": '#0',
12
+ "text": 'The census is a survey that gives us information about all the households in England and Wales.',
13
+ "itemsList": [
14
+ {
15
+ "url": '#0',
16
+ "text": 'List item 1'
17
+ },
18
+ {
19
+ "url": '#0',
20
+ "text": 'List item 2'
21
+ }
22
+ ]
23
+ }) }}
24
+ </div>
25
+
26
+ <div class="ons-grid__col ons-col-4@m">
27
+ {{ onsCard({
28
+ "id": 'title2',
29
+ "textId": 'text2',
30
+ "title": 'Working on the census',
31
+ "url": '#0',
32
+ "text": 'For Census 2021, we’ll be hiring at least 30,000 field staff across England and Wales.',
33
+ "itemsList": [
34
+ {
35
+ "url": '#0',
36
+ "text": 'List item 1'
37
+ },
38
+ {
39
+ "url": '#0',
40
+ "text": 'List item 2'
41
+ }
42
+ ]
43
+ }) }}
44
+ </div>
45
+
46
+ <div class="ons-grid__col ons-col-4@m">
47
+ {{ onsCard({
48
+ "id": 'title3',
49
+ "textId": 'text3',
50
+ "title": 'Your data and security',
51
+ "url": '#0',
52
+ "text": 'How we keep your data safe and what happens to your personal information.',
53
+ "itemsList": [
54
+ {
55
+ "url": '#0',
56
+ "text": 'List item 1'
57
+ },
58
+ {
59
+ "url": '#0',
60
+ "text": 'List item 2'
61
+ }
62
+ ]
63
+ }) }}
64
+ </div>
65
+
66
+ </div>
67
+
68
+ </div>
@@ -0,0 +1,38 @@
1
+ {% from "components/card/_macro.njk" import onsCard %}
2
+ <div class="ons-container">
3
+
4
+ <div class="ons-grid ons-grid--column@xxs@s">
5
+
6
+ <div class="ons-grid__col ons-col-4@m">
7
+ {{ onsCard({
8
+ "id": 'title1',
9
+ "textId": 'text1',
10
+ "title": 'About the census',
11
+ "url": '#0',
12
+ "text": 'The census is a survey that gives us information about all the households in England and Wales.'
13
+ }) }}
14
+ </div>
15
+
16
+ <div class="ons-grid__col ons-col-4@m">
17
+ {{ onsCard({
18
+ "id": 'title2',
19
+ "textId": 'text2',
20
+ "title": 'Working on the census',
21
+ "url": '#0',
22
+ "text": 'For Census 2021, we’ll be hiring at least 30,000 field staff across England and Wales.'
23
+ }) }}
24
+ </div>
25
+
26
+ <div class="ons-grid__col ons-col-4@m">
27
+ {{ onsCard({
28
+ "id": 'title3',
29
+ "textId": 'text3',
30
+ "title": 'Your data and security',
31
+ "url": '#0',
32
+ "text": 'How we keep your data safe and what happens to your personal information.'
33
+ }) }}
34
+ </div>
35
+
36
+ </div>
37
+
38
+ </div>
@@ -0,0 +1,9 @@
1
+ {% from "components/card/_macro.njk" import onsCard %}
2
+
3
+ {{ onsCard({
4
+ "id": 'title',
5
+ "textId": 'text',
6
+ "title": 'Your data and security',
7
+ "url": '#0',
8
+ "text": 'How we keep your data safe and what happens to your personal information.'
9
+ }) }}
@@ -0,0 +1,34 @@
1
+ {% from "components/checkboxes/_macro.njk" import onsCheckboxes %}
2
+
3
+ {{
4
+ onsCheckboxes({
5
+ "legend": "Content type",
6
+ "checkboxesLabel": "Show only:",
7
+ "borderless": true,
8
+ "name": "dietary",
9
+ "checkboxes": [
10
+ {
11
+ "id": "data",
12
+ "label": {
13
+ "text": "Data (309)"
14
+ },
15
+ "value": "data"
16
+ },
17
+ {
18
+ "id": "publications",
19
+ "label": {
20
+ "text": "Publications (137)"
21
+ },
22
+ "value": "publications"
23
+ },
24
+ {
25
+ "id": "areas",
26
+ "label": {
27
+ "text": "Areas (0)"
28
+ },
29
+ "value": "areas",
30
+ "disabled": true
31
+ }
32
+ ]
33
+ })
34
+ }}
@@ -0,0 +1,60 @@
1
+
2
+ {% from "components/checkboxes/_macro.njk" import onsCheckboxes %}
3
+
4
+ {{
5
+ onsCheckboxes({
6
+ "checkboxesLabel": "Select all that apply",
7
+ "name": "dietary",
8
+ "dontWrap": true,
9
+ "checkboxes": [
10
+ {
11
+ "id": "gluten-free",
12
+ "label": {
13
+ "text": "Gluten free"
14
+ },
15
+ "value": "gluten-free"
16
+ },
17
+ {
18
+ "id": "lactose-intolerant",
19
+ "label": {
20
+ "text": "Lactose intolerant"
21
+ },
22
+ "value": "lactose-intolerant"
23
+ },
24
+ {
25
+ "id": "vegan",
26
+ "label": {
27
+ "text": "Vegan"
28
+ },
29
+ "value": "vegan"
30
+ },
31
+ {
32
+ "id": "vegetarian",
33
+ "label": {
34
+ "text": "Vegetarian"
35
+ },
36
+ "value": "vegetarian"
37
+ },
38
+ {
39
+ "id": "other-checkbox",
40
+ "label": {
41
+ "text": "Other"
42
+ },
43
+ "checked": true,
44
+ "value": "other",
45
+ "other": {
46
+ "id": "other-textbox",
47
+ "name": "other-answer",
48
+ "label": {
49
+ "text": "Enter dietary requirements"
50
+ }
51
+ }
52
+ }
53
+ ],
54
+ "error": {
55
+ "classes": "test",
56
+ "id": "dietary-error",
57
+ "text": "Enter your dietary requirements"
58
+ }
59
+ })
60
+ }}
@@ -0,0 +1,71 @@
1
+ {% from "components/checkboxes/_macro.njk" import onsCheckboxes %}
2
+ {% from "components/question/_macro.njk" import onsQuestion %}
3
+
4
+ {% call onsQuestion({
5
+ "title": "What type of central heating does your accommodation have?",
6
+ "classes": "ons-u-mt-no",
7
+ "legendIsQuestionTitle": true
8
+ }) %}
9
+ {{
10
+ onsCheckboxes({
11
+ "dontWrap": true,
12
+ "name": "central-heating",
13
+ "checkboxes": [
14
+ {
15
+ "id": "none",
16
+ "label": {
17
+ "text": "No central heating"
18
+ },
19
+ "name": "none"
20
+ },
21
+ {
22
+ "id": "mains-gas",
23
+ "label": {
24
+ "text": "Gas",
25
+ "description": "Including tank or bottled gas"
26
+ },
27
+ "name": "mains-gas"
28
+ },
29
+ {
30
+ "id": "electric",
31
+ "label": {
32
+ "text": "Electric",
33
+ "description": "Including storage headers"
34
+ },
35
+ "name": "electric"
36
+ },
37
+ {
38
+ "id": "oil",
39
+ "label": {
40
+ "text": "Oil"
41
+ },
42
+ "name": "oil"
43
+ },
44
+ {
45
+ "id": "wood",
46
+ "label": {
47
+ "text": "Wood",
48
+ "description": "For example, logs, waste wood or pellets"
49
+ },
50
+ "name": "wood"
51
+ },
52
+ {
53
+ "id": "solid-fuel",
54
+ "label": {
55
+ "text": "Solid fuel",
56
+ "description": "For example, coal"
57
+ },
58
+ "name": "solid-fuel"
59
+ },
60
+ {
61
+ "id": "renewable",
62
+ "label": {
63
+ "text": "Renewable energy",
64
+ "description": "For example, solar thermal or heat pumps"
65
+ },
66
+ "name": "renewable"
67
+ }
68
+ ]
69
+ })
70
+ }}
71
+ {% endcall %}
@@ -0,0 +1,177 @@
1
+ {% from "components/checkboxes/_checkbox-macro.njk" import onsCheckbox %}
2
+
3
+ <div class="ons-grid ons-grid--flex ons-grid--between">
4
+ <div class="ons-grid__col">
5
+ <h1 class="ons-u-fs-l u-mb-xs" name="page-manage-account-title">{{ name }}</h1>
6
+ </div>
7
+ </div>
8
+
9
+ <div class="ons-grid ons-grid--flex ons-grid--between">
10
+ <div class="ons-grid__col">
11
+ <h2 class="ons-u-fs-m u-mb-xs" name="page-manage-account-subtitle">Select user permissions</h2>
12
+ </div>
13
+ </div>
14
+
15
+ <form id="user-permissions" action="" method="post">
16
+ <input type="hidden" name="csrf_token" value="" />
17
+ <section class="ons-u-mt-s">
18
+ <table id="tbl-users" class="ons-table" >
19
+ <thead class="ons-table__head">
20
+ <tr class="ons-table__row">
21
+ <th scope="col" class="ons-table__header">
22
+ <span>Survey Data Collection area</span>
23
+ </th>
24
+ <th scope="col" class="ons-table__header">
25
+ <span>View</span>
26
+ </th>
27
+ <th scope="col" class="ons-table__header">
28
+ <span>Edit</span>
29
+ </th>
30
+ <th scope="col" class="ons-table__header">
31
+ <span>Delete</span>
32
+ </th>
33
+ </tr>
34
+ </thead>
35
+ <tbody class="ons-table__body">
36
+ <tr class="ons-table__row">
37
+ <td class="ons-table__cell">
38
+ Surveys
39
+ </td>
40
+ <td class="ons-table__cell">
41
+ {{
42
+ onsCheckbox({
43
+ "id": "surveys-view",
44
+ "hideLabel": true,
45
+ "label": {
46
+ "text": "View surveys"
47
+ },
48
+ "value": "y",
49
+ "checked": true,
50
+ "disabled": true
51
+ })
52
+ }}
53
+ </td>
54
+ <td class="ons-table__cell" colspan="2">
55
+ {{
56
+ onsCheckbox({
57
+ "id": "surveys-edit",
58
+ "hideLabel": true,
59
+ "label": {
60
+ "text": "Edit surveys"
61
+ },
62
+ "value": "n"
63
+ })
64
+ }}
65
+ </td>
66
+ </tr>
67
+ <tr class="ons-table__row">
68
+ <td class="ons-table__cell">
69
+ Reporting units
70
+ </td>
71
+ <td class="ons-table__cell">
72
+ {{
73
+ onsCheckbox({
74
+ "id": "reporting-units-view",
75
+ "hideLabel": true,
76
+ "label": {
77
+ "text": "View reporting units"
78
+ },
79
+ "value": "y",
80
+ "checked": true,
81
+ "disabled": true
82
+ })
83
+ }}
84
+ </td>
85
+ <td class="ons-table__cell" colspan="2">
86
+ {{
87
+ onsCheckbox({
88
+ "id": "reporting-units-edit",
89
+ "hideLabel": true,
90
+ "label": {
91
+ "text": "Edit reporting units"
92
+ },
93
+ "value": "n"
94
+ })
95
+ }}
96
+ </td>
97
+ </tr>
98
+ <tr class="ons-table__row">
99
+ <td class="ons-table__cell">
100
+ Respondents
101
+ </td>
102
+ <td class="ons-table__cell">
103
+ {{
104
+ onsCheckbox({
105
+ "id": "respondents-view",
106
+ "hideLabel": true,
107
+ "label": {
108
+ "text": "View respondents"
109
+ },
110
+ "value": "y",
111
+ "checked": true,
112
+ "disabled": true
113
+ })
114
+ }}
115
+ </td>
116
+ <td class="ons-table__cell">
117
+ {{
118
+ onsCheckbox({
119
+ "id": "respondents-edit",
120
+ "hideLabel": true,
121
+ "label": {
122
+ "text": "Edit respondents"
123
+ },
124
+ "value": "y",
125
+ "checked": true
126
+ })
127
+ }}
128
+ </td>
129
+ <td class="ons-table__cell">
130
+ {{
131
+ onsCheckbox({
132
+ "id": "respondents-delete",
133
+ "hideLabel": true,
134
+ "label": {
135
+ "text": "Delete respondents"
136
+ },
137
+ "value": "n"
138
+ })
139
+ }}
140
+ </td>
141
+ </tr>
142
+ <tr class="ons-table__row">
143
+ <td class="ons-table__cell">
144
+ Messages
145
+ </td>
146
+ <td class="ons-table__cell">
147
+ {{
148
+ onsCheckbox({
149
+ "id": "messages-view",
150
+ "hideLabel": true,
151
+ "label": {
152
+ "text": "View messages"
153
+ },
154
+ "value": "y",
155
+ "checked": true,
156
+ "disabled": true
157
+ })
158
+ }}
159
+ </td>
160
+ <td class="ons-table__cell" colspan="2">
161
+ {{
162
+ onsCheckbox({
163
+ "id": "messages-edit",
164
+ "hideLabel": true,
165
+ "label": {
166
+ "text": "Edit messages"
167
+ },
168
+ "value": "y",
169
+ "checked": true
170
+ })
171
+ }}
172
+ </td>
173
+ </tr>
174
+ </tbody>
175
+ </table>
176
+ </section>
177
+ </form>