@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.
- package/README.md +0 -63
- package/components/access-code/example-access-code-error.njk +87 -0
- package/components/access-code/example-access-code.njk +63 -0
- package/components/accordion/example-accordion-open.njk +126 -0
- package/components/accordion/example-accordion.njk +25 -0
- package/components/address-input/example-address-input-editable.njk +52 -0
- package/components/address-input/example-address-input-manual.njk +23 -0
- package/components/address-input/example-address-input.njk +40 -0
- package/components/autosuggest/example-autosuggest-country-multiple.njk +30 -0
- package/components/autosuggest/example-autosuggest-country.njk +29 -0
- package/components/back-link/example-back-link.njk +17 -0
- package/components/breadcrumbs/example-breadcrumbs-single.njk +13 -0
- package/components/breadcrumbs/example-breadcrumbs.njk +17 -0
- package/components/button/_button.scss +5 -3
- package/components/button/example-button-custom.njk +20 -0
- package/components/button/example-button-disabled.njk +7 -0
- package/components/button/example-button-download.njk +9 -0
- package/components/button/example-button-ghost.njk +15 -0
- package/components/button/example-button-group.njk +16 -0
- package/components/button/example-button-link.njk +7 -0
- package/components/button/example-button-loader.njk +9 -0
- package/components/button/example-button-new-window.njk +12 -0
- package/components/button/example-button-print.njk +8 -0
- package/components/button/example-button-secondary-small.njk +8 -0
- package/components/button/example-button-secondary.njk +8 -0
- package/components/button/example-button-small.njk +8 -0
- package/components/button/example-button-timer.njk +9 -0
- package/components/button/example-button.njk +6 -0
- package/components/call-to-action/example-call-to-action-default.njk +14 -0
- package/components/card/example-card-set-with-images.njk +41 -0
- package/components/card/example-card-set-with-lists.njk +68 -0
- package/components/card/example-card-set.njk +38 -0
- package/components/card/example-card.njk +9 -0
- package/components/checkboxes/example-checkboxes-disabled.njk +34 -0
- package/components/checkboxes/example-checkboxes-error.njk +60 -0
- package/components/checkboxes/example-checkboxes-with-descriptions.njk +71 -0
- package/components/checkboxes/example-checkboxes-with-hidden-label.njk +177 -0
- package/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk +86 -0
- package/components/checkboxes/example-checkboxes-with-revealed-radios.njk +69 -0
- package/components/checkboxes/example-checkboxes-with-revealed-select.njk +71 -0
- package/components/checkboxes/example-checkboxes-with-revealed-text-input.njk +59 -0
- package/components/checkboxes/example-checkboxes-with-select-all-button.njk +51 -0
- package/components/checkboxes/example-checkboxes-with-visible-text-input.njk +61 -0
- package/components/checkboxes/example-checkboxes-without-border.njk +33 -0
- package/components/checkboxes/example-checkboxes.njk +46 -0
- package/components/content-pagination/example-content-pagination.njk +20 -0
- package/components/cookies-banner/_macro.njk +4 -4
- package/components/cookies-banner/_macro.spec.js +41 -1
- package/components/cookies-banner/example-cookies-banner-cymraeg.njk +9 -0
- package/components/cookies-banner/example-cookies-banner.njk +7 -0
- package/components/date-input/example-date-input-error.njk +62 -0
- package/components/date-input/example-date-input.njk +36 -0
- package/components/details/example-details-with-saved-state.njk +10 -0
- package/components/details/example-details-with-warning.njk +19 -0
- package/components/details/example-details.njk +9 -0
- package/components/document-list/example-document-list-article-featured.njk +31 -0
- package/components/document-list/example-document-list-articles.njk +60 -0
- package/components/document-list/example-document-list-downloads.njk +59 -0
- package/components/document-list/example-document-list-search-result-featured.njk +19 -0
- package/components/document-list/example-document-list-search-results.njk +67 -0
- package/components/duration/example-duration-error.njk +30 -0
- package/components/duration/example-duration.njk +35 -0
- package/components/duration/examples-duration-error-for-single-field.njk +31 -0
- package/components/external-link/example-external-link.njk +8 -0
- package/components/feedback/example-feedback-call-to-action.njk +14 -0
- package/components/footer/example-footer-cymraeg.njk +54 -0
- package/components/footer/example-footer-default.njk +7 -0
- package/components/footer/example-footer-transactional.njk +62 -0
- package/components/footer/example-footer-warning.njk +32 -0
- package/components/footer/example-footer-with-alternative-organisation.njk +124 -0
- package/components/footer/example-footer-with-coat-of-arms.njk +32 -0
- package/components/footer/example-footer-with-copyright.njk +35 -0
- package/components/footer/example-footer.njk +85 -0
- package/components/header/_header.scss +2 -2
- package/components/header/_macro.spec.js +97 -0
- package/components/header/example-header-default.njk +12 -0
- package/components/header/example-header-external-for-survey-with-description.njk +20 -0
- package/components/header/example-header-external-for-surveys.njk +33 -0
- package/components/header/example-header-external-welsh.njk +29 -0
- package/components/header/example-header-external-with-navigation.njk +42 -0
- package/components/header/example-header-external-with-service-links.njk +35 -0
- package/components/header/example-header-external-with-sub-navigation.njk +132 -0
- package/components/header/example-header-internal.njk +32 -0
- package/components/header/example-header-neutral-for-multicoloured-logo.njk +59 -0
- package/components/hero/example-hero-dark.njk +15 -0
- package/components/hero/example-hero-default.njk +14 -0
- package/components/images/example-images-for-regular-screens.njk +8 -0
- package/components/images/example-images-for-retina-screens.njk +10 -0
- package/components/input/example-input-email.njk +12 -0
- package/components/input/example-input-number-prefixed.njk +17 -0
- package/components/input/example-input-number-suffixed.njk +34 -0
- package/components/input/example-input-number.njk +15 -0
- package/components/input/example-input-numeric-values.njk +64 -0
- package/components/input/example-input-telephone.njk +13 -0
- package/components/input/example-input-text-width-constrained.njk +11 -0
- package/components/input/example-input-text-with-character-limit-checker.njk +17 -0
- package/components/input/example-input-text-with-description.njk +10 -0
- package/components/input/example-input-text.njk +9 -0
- package/components/label/example-label-with-description.njk +8 -0
- package/components/label/example-label.njk +8 -0
- package/components/metadata/example-metadata.njk +57 -0
- package/components/mutually-exclusive/example-mutually-exclusive-checkboxes.njk +71 -0
- package/components/mutually-exclusive/example-mutually-exclusive-date-with-error.njk +47 -0
- package/components/mutually-exclusive/example-mutually-exclusive-date.njk +49 -0
- package/components/mutually-exclusive/example-mutually-exclusive-duration.njk +45 -0
- package/components/mutually-exclusive/example-mutually-exclusive-email.njk +36 -0
- package/components/mutually-exclusive/example-mutually-exclusive-multiple-options.njk +63 -0
- package/components/mutually-exclusive/example-mutually-exclusive-number.njk +43 -0
- package/components/mutually-exclusive/example-mutually-exclusive-textarea.njk +40 -0
- package/components/navigation/_macro.njk +1 -1
- package/components/pagination/example-pagination-first.njk +24 -0
- package/components/pagination/example-pagination-last.njk +24 -0
- package/components/pagination/example-pagination-with-no-range-indicator.njk +42 -0
- package/components/pagination/example-pagination.njk +116 -0
- package/components/panel/example-panel-bare.njk +9 -0
- package/components/panel/example-panel-with-announcement.njk +18 -0
- package/components/panel/example-panel-with-error-details.njk +18 -0
- package/components/panel/example-panel-with-error-summary.njk +25 -0
- package/components/panel/example-panel-with-information.njk +7 -0
- package/components/panel/example-panel-with-spacious-information.njk +7 -0
- package/components/panel/example-panel-with-success-message.njk +10 -0
- package/components/panel/example-panel-with-warning.njk +8 -0
- package/components/password/example-password.njk +11 -0
- package/components/phase-banner/example-phase-banner-alpha.njk +10 -0
- package/components/phase-banner/example-phase-banner-beta.njk +9 -0
- package/components/question/example-question-ccs.njk +49 -0
- package/components/question/example-question-fieldset.njk +99 -0
- package/components/question/example-question-interviewer-note.njk +38 -0
- package/components/question/example-question-no-fieldset.njk +46 -0
- package/components/radios/example-radios-with-clear-button.njk +97 -0
- package/components/radios/example-radios-with-descriptions.njk +57 -0
- package/components/radios/example-radios-with-error.njk +38 -0
- package/components/radios/example-radios-with-revealed-checkboxes.njk +69 -0
- package/components/radios/example-radios-with-revealed-radios.njk +68 -0
- package/components/radios/example-radios-with-revealed-select.njk +69 -0
- package/components/radios/example-radios-with-revealed-text-input.njk +80 -0
- package/components/radios/example-radios-with-separator.njk +59 -0
- package/components/radios/example-radios-with-visible-text-input.njk +40 -0
- package/components/radios/example-radios-without-border.njk +48 -0
- package/components/radios/examples-radios.njk +38 -0
- package/components/related-content/example-related-content-general.njk +44 -0
- package/components/related-content/example-related-content-multiple-rows-of-links.njk +51 -0
- package/components/related-content/example-related-content-social-media.njk +40 -0
- package/components/relationships/example-relationships-error.njk +211 -0
- package/components/relationships/example-relationships-you.njk +187 -0
- package/components/relationships/example-relationships.njk +185 -0
- package/components/search/example-search-with-character-check.njk +23 -0
- package/components/search/example-search-with-placeholder.njk +16 -0
- package/components/search/example-search.njk +16 -0
- package/components/section-navigation/example-section-navigation-vertical.njk +40 -0
- package/components/section-navigation/example-section-navigation.njk +21 -0
- package/components/select/example-select-wide.njk +55 -0
- package/components/select/example-select-with-error.njk +58 -0
- package/components/select/example-select-with-inline-label.njk +23 -0
- package/components/select/example-select.njk +50 -0
- package/components/share-page/example-share-page.njk +11 -0
- package/components/skip-to-content/example-skip-to-content.njk +10 -0
- package/components/status/example-status-dead.njk +7 -0
- package/components/status/example-status-error.njk +7 -0
- package/components/status/example-status-neutral-information.njk +6 -0
- package/components/status/example-status-pending.njk +7 -0
- package/components/status/example-status-small.njk +8 -0
- package/components/status/example-status-success.njk +7 -0
- package/components/summary/example-summary-grouped-total.njk +67 -0
- package/components/summary/example-summary-grouped-with-errors.njk +96 -0
- package/components/summary/example-summary-grouped.njk +353 -0
- package/components/summary/example-summary-household-no-rows.njk +20 -0
- package/components/summary/example-summary-household.njk +77 -0
- package/components/summary/example-summary-hub.njk +170 -0
- package/components/summary/example-summary-multiple.njk +81 -0
- package/components/summary/example-summary-no-action.njk +40 -0
- package/components/summary/example-summary.njk +107 -0
- package/components/table/_macro.njk +1 -1
- package/components/table/_table.scss +10 -10
- package/components/table/example-table-basic.njk +47 -0
- package/components/table/example-table-compact.njk +73 -0
- package/components/table/example-table-footer.njk +56 -0
- package/components/table/example-table-numeric.njk +81 -0
- package/components/table/example-table-responsive.njk +89 -0
- package/components/table/example-table-scrollable.njk +158 -0
- package/components/table/example-table-sortable.njk +236 -0
- package/components/table/sortable-table.dom.js +1 -1
- package/components/table/sortable-table.js +5 -2
- package/components/table-of-contents/example-table-of-contents-grouped.njk +50 -0
- package/components/table-of-contents/example-table-of-contents-single.njk +39 -0
- package/components/table-of-contents/example-table-of-contents-sticky.njk +78 -0
- package/components/tabs/example-tabs-details.njk +59 -0
- package/components/tabs/example-tabs.njk +39 -0
- package/components/textarea/example-textarea-error.njk +16 -0
- package/components/textarea/example-textarea-with-character-limit.njk +18 -0
- package/components/textarea/example-textarea.njk +12 -0
- package/components/timeline/example-timeline.njk +35 -0
- package/components/timeout-modal/example-timeout-modal.njk +16 -0
- package/components/timeout-panel/example-panel-with-timeout-warning.njk +13 -0
- package/components/upload/example-upload-error.njk +16 -0
- package/components/upload/example-upload.njk +12 -0
- package/components/video/example-video.njk +14 -0
- package/css/main.css +3 -3
- package/css/print.css +1 -1
- package/layout/_template.njk +1 -12
- package/package.json +3 -8
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +2 -2
- package/scss/base/_typography.scss +2 -2
- package/scss/main.scss +0 -1
- package/scss/print.scss +13 -5
- package/scss/utilities/_highlight.scss +6 -0
- package/scss/utilities/_index.scss +1 -0
- package/components/code-highlight/_macro.njk +0 -5
- package/components/code-highlight/_macro.spec.js +0 -56
- package/components/code-highlight/code-highlight.spec.js +0 -18
- package/scss/patternlib.scss +0 -148
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
"fullWidth": true
|
|
3
|
+
---
|
|
4
|
+
{% from "components/header/_macro.njk" import onsHeader %}
|
|
5
|
+
|
|
6
|
+
{{
|
|
7
|
+
onsHeader({
|
|
8
|
+
"title": 'Service manual',
|
|
9
|
+
"mastheadLogoUrl": '#0',
|
|
10
|
+
"titleUrl": '#0',
|
|
11
|
+
"navigation": {
|
|
12
|
+
"id": 'main-nav',
|
|
13
|
+
"ariaLabel": 'Main menu',
|
|
14
|
+
"currentPath": [ '#design-system', '#patterns', '#access-codes' ],
|
|
15
|
+
"currentPageTitle": 'Design system',
|
|
16
|
+
"itemsList": [
|
|
17
|
+
{
|
|
18
|
+
"title": 'Service standard',
|
|
19
|
+
"url": '#0'
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"title": 'Design system',
|
|
23
|
+
"url": '#design-system'
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"title": 'Accessibility',
|
|
27
|
+
"url": '#0'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"title": 'Brand guidelines',
|
|
31
|
+
"url": '#0'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"title": 'Content style guide',
|
|
35
|
+
"url": '#0'
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"toggleNavigationButton": {
|
|
39
|
+
"text": 'Menu',
|
|
40
|
+
"ariaLabel": 'Toggle main menu'
|
|
41
|
+
},
|
|
42
|
+
"subNavigation": {
|
|
43
|
+
"id": 'sub-nav',
|
|
44
|
+
"overviewURL": '#0',
|
|
45
|
+
"overviewText": 'Overview',
|
|
46
|
+
"ariaLabel": 'Section menu',
|
|
47
|
+
"itemsList": [
|
|
48
|
+
{
|
|
49
|
+
"title": 'Guidance',
|
|
50
|
+
"url": '#0'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"title": 'Foundations',
|
|
54
|
+
"url": '#0'
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"title": 'Components',
|
|
58
|
+
"url": '#0'
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"title": 'Patterns',
|
|
62
|
+
"url": '#patterns',
|
|
63
|
+
"sections": [
|
|
64
|
+
{
|
|
65
|
+
"sectionTitle": 'Ask users for...',
|
|
66
|
+
"children": [
|
|
67
|
+
{
|
|
68
|
+
"title": 'Access codes',
|
|
69
|
+
"url": '#access-codes'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"title": 'Addresses',
|
|
73
|
+
"url": '#0'
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"title": 'Dates',
|
|
77
|
+
"url": '#0'
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"title": 'Durations',
|
|
81
|
+
"url": '#0'
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"title": 'Email addresses',
|
|
85
|
+
"url": '#0'
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"title": 'Numeric values',
|
|
89
|
+
"url": '#0'
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"title": 'Phone numbers',
|
|
93
|
+
"url": '#0'
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"sectionTitle": 'Help users to...',
|
|
99
|
+
"children": [
|
|
100
|
+
{
|
|
101
|
+
"title": 'Access support in multiple languages',
|
|
102
|
+
"url": '#0'
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"title": 'Change language',
|
|
106
|
+
"url": '#0'
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"title": 'Check answers',
|
|
110
|
+
"url": '#0'
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"title": 'Control cookies',
|
|
114
|
+
"url": '#0'
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"title": 'Correct errors',
|
|
118
|
+
"url": '#0'
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"title": 'Extend a session',
|
|
122
|
+
"url": '#0'
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
})
|
|
132
|
+
}}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
"fullWidth": true
|
|
3
|
+
---
|
|
4
|
+
{% from "components/header/_macro.njk" import onsHeader %}
|
|
5
|
+
|
|
6
|
+
{{
|
|
7
|
+
onsHeader({
|
|
8
|
+
"title": 'Service title',
|
|
9
|
+
"mastheadLogoUrl": '#0',
|
|
10
|
+
"variants": 'internal',
|
|
11
|
+
"titleUrl": '#0',
|
|
12
|
+
"serviceLinks": {
|
|
13
|
+
"id": "service-links",
|
|
14
|
+
"ariaLabel": 'Services menu',
|
|
15
|
+
"ariaListLabel": 'Menu',
|
|
16
|
+
"toggleServicesButton": {
|
|
17
|
+
"text": 'Account',
|
|
18
|
+
"ariaLabel": 'Toggle services menu'
|
|
19
|
+
},
|
|
20
|
+
"itemsList": [
|
|
21
|
+
{
|
|
22
|
+
"title": "Jacky Turner",
|
|
23
|
+
"iconType": 'person'
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"title": "Sign out",
|
|
27
|
+
"url": "#0"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
}}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
"fullWidth": true
|
|
3
|
+
---
|
|
4
|
+
{% from "components/header/_macro.njk" import onsHeader %}
|
|
5
|
+
|
|
6
|
+
{{
|
|
7
|
+
onsHeader({
|
|
8
|
+
"title": 'ONS Service',
|
|
9
|
+
"variants": 'neutral',
|
|
10
|
+
"mastheadLogoUrl": '#0',
|
|
11
|
+
"serviceLinks": {
|
|
12
|
+
"id": "service-links",
|
|
13
|
+
"ariaLabel": 'Services menu',
|
|
14
|
+
"ariaListLabel": 'Menu',
|
|
15
|
+
"toggleServicesButton": {
|
|
16
|
+
"text": 'Account',
|
|
17
|
+
"ariaLabel": 'Toggle services menu'
|
|
18
|
+
},
|
|
19
|
+
"itemsList": [
|
|
20
|
+
{
|
|
21
|
+
"title": "Help",
|
|
22
|
+
"url": "#0"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"title": "My Account",
|
|
26
|
+
"url": "#0"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"title": "Sign out",
|
|
30
|
+
"url": "#0"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"navigation": {
|
|
35
|
+
"id": 'main-nav',
|
|
36
|
+
"ariaLabel": 'Main menu',
|
|
37
|
+
"currentPath": '#menu-item-2',
|
|
38
|
+
"currentPageTitle": 'Design system',
|
|
39
|
+
"itemsList": [
|
|
40
|
+
{
|
|
41
|
+
"title": 'Menu item 1',
|
|
42
|
+
"url": '#0'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"title": 'Menu item 2',
|
|
46
|
+
"url": '#menu-item-2'
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"title": 'Menu item 3',
|
|
50
|
+
"url": '#0'
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"toggleNavigationButton": {
|
|
54
|
+
"text": 'Menu',
|
|
55
|
+
"ariaLabel": 'Toggle main menu'
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
}}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
"fullWidth": true
|
|
3
|
+
---
|
|
4
|
+
{% from "components/hero/_macro.njk" import onsHero %}
|
|
5
|
+
{{
|
|
6
|
+
onsHero({
|
|
7
|
+
"title": 'Design and build digital services for the ONS',
|
|
8
|
+
"text": 'Everything you need to make accessible, consistent digital products',
|
|
9
|
+
"button": {
|
|
10
|
+
"url": '#0',
|
|
11
|
+
"text": 'Get started'
|
|
12
|
+
},
|
|
13
|
+
"variants": ['dark']
|
|
14
|
+
})
|
|
15
|
+
}}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
"fullWidth": true
|
|
3
|
+
---
|
|
4
|
+
{% from "components/hero/_macro.njk" import onsHero %}
|
|
5
|
+
{{
|
|
6
|
+
onsHero({
|
|
7
|
+
"title": 'Design and build digital services for the ONS',
|
|
8
|
+
"text": 'Everything you need to make accessible, consistent digital products',
|
|
9
|
+
"button": {
|
|
10
|
+
"url": '#0',
|
|
11
|
+
"text": 'Get started'
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{% from "components/images/_macro.njk" import onsImage %}
|
|
2
|
+
{{
|
|
3
|
+
onsImage({
|
|
4
|
+
"url": '/img/small/woman-in-purple-dress-shirt.jpg',
|
|
5
|
+
"alt": 'Woman in a purple dress shirt using a laptop',
|
|
6
|
+
"caption": 'Image 1 - Woman in a purple dress shirt using a laptop'
|
|
7
|
+
})
|
|
8
|
+
}}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{% from "components/images/_macro.njk" import onsImage %}
|
|
2
|
+
{{
|
|
3
|
+
onsImage({
|
|
4
|
+
"image": {
|
|
5
|
+
"smallSrc": '/img/small/woman-in-purple-dress-shirt.jpg',
|
|
6
|
+
"largeSrc": '/img/large/woman-in-purple-dress-shirt.jpg'
|
|
7
|
+
},
|
|
8
|
+
"caption": 'Image 1 - Woman in a purple dress shirt using a laptop'
|
|
9
|
+
})
|
|
10
|
+
}}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{% from "components/input/_macro.njk" import onsInput %}
|
|
2
|
+
{{
|
|
3
|
+
onsInput({
|
|
4
|
+
"id": "email",
|
|
5
|
+
"type": "email",
|
|
6
|
+
"autocomplete": "email",
|
|
7
|
+
"label": {
|
|
8
|
+
"text": "Email address",
|
|
9
|
+
"description": "This will not be stored and only used once to send your confirmation"
|
|
10
|
+
}
|
|
11
|
+
})
|
|
12
|
+
}}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{% from "components/input/_macro.njk" import onsInput %}
|
|
2
|
+
{{
|
|
3
|
+
onsInput({
|
|
4
|
+
"id": "prefixed",
|
|
5
|
+
"type": "number",
|
|
6
|
+
"width": "6",
|
|
7
|
+
"autocomplete": "off",
|
|
8
|
+
"label": {
|
|
9
|
+
"text": "Your annual salary before taxes"
|
|
10
|
+
},
|
|
11
|
+
"prefix": {
|
|
12
|
+
"title": "British pounds (GBP)",
|
|
13
|
+
"text": "£",
|
|
14
|
+
"id": "annual-salary-gpb-prefix"
|
|
15
|
+
}
|
|
16
|
+
})
|
|
17
|
+
}}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{% from "components/input/_macro.njk" import onsInput %}
|
|
2
|
+
{{
|
|
3
|
+
onsInput({
|
|
4
|
+
"id": "suffixed-per-cent",
|
|
5
|
+
"type": "number",
|
|
6
|
+
"width": "3",
|
|
7
|
+
"autocomplete": "off",
|
|
8
|
+
"label": {
|
|
9
|
+
"text": "People with internet access"
|
|
10
|
+
},
|
|
11
|
+
"suffix": {
|
|
12
|
+
"title": "per cent",
|
|
13
|
+
"text": "%",
|
|
14
|
+
"id": "internet-access-per-cent-suffix"
|
|
15
|
+
}
|
|
16
|
+
})
|
|
17
|
+
}}
|
|
18
|
+
{{
|
|
19
|
+
onsInput({
|
|
20
|
+
"id": "suffixed-centimetres",
|
|
21
|
+
"type": "number",
|
|
22
|
+
"width": "4",
|
|
23
|
+
"autocomplete": "off",
|
|
24
|
+
"label": {
|
|
25
|
+
"text": "Length",
|
|
26
|
+
"description": "For example enter 1250 for 12.5m"
|
|
27
|
+
},
|
|
28
|
+
"suffix": {
|
|
29
|
+
"title": "centimetres",
|
|
30
|
+
"text": "cm",
|
|
31
|
+
"id": "length-cm-suffix"
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
}}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{% from "components/input/_macro.njk" import onsInput %}
|
|
2
|
+
{{
|
|
3
|
+
onsInput({
|
|
4
|
+
"id": "number",
|
|
5
|
+
"type": "number",
|
|
6
|
+
"width": "2",
|
|
7
|
+
"autocomplete": "off",
|
|
8
|
+
"attributes": {
|
|
9
|
+
"min": 0
|
|
10
|
+
},
|
|
11
|
+
"label": {
|
|
12
|
+
"text": "Number of bedrooms"
|
|
13
|
+
}
|
|
14
|
+
})
|
|
15
|
+
}}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{% from "components/input/_macro.njk" import onsInput %}
|
|
2
|
+
{{
|
|
3
|
+
onsInput({
|
|
4
|
+
"id": "number",
|
|
5
|
+
"type": "number",
|
|
6
|
+
"width": "2",
|
|
7
|
+
"autocomplete": "off",
|
|
8
|
+
"attributes": {
|
|
9
|
+
"min": 0
|
|
10
|
+
},
|
|
11
|
+
"label": {
|
|
12
|
+
"text": "Number of bedrooms"
|
|
13
|
+
}
|
|
14
|
+
})
|
|
15
|
+
}}
|
|
16
|
+
{{
|
|
17
|
+
onsInput({
|
|
18
|
+
"id": "prefixed",
|
|
19
|
+
"type": "number",
|
|
20
|
+
"width": "6",
|
|
21
|
+
"autocomplete": "off",
|
|
22
|
+
"label": {
|
|
23
|
+
"text": "Your annual salary before taxes"
|
|
24
|
+
},
|
|
25
|
+
"prefix": {
|
|
26
|
+
"text": "£",
|
|
27
|
+
"title": "British pounds (GBP)",
|
|
28
|
+
"id": "annual-salary-gpb-prefix"
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
}}
|
|
32
|
+
{{
|
|
33
|
+
onsInput({
|
|
34
|
+
"id": "suffixed-percent",
|
|
35
|
+
"type": "number",
|
|
36
|
+
"width": "3",
|
|
37
|
+
"autocomplete": "off",
|
|
38
|
+
"label": {
|
|
39
|
+
"text": "People with internet access"
|
|
40
|
+
},
|
|
41
|
+
"suffix": {
|
|
42
|
+
"title": "per cent",
|
|
43
|
+
"text": "%",
|
|
44
|
+
"id": "internet-access-per-cent-suffix"
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
}}
|
|
48
|
+
{{
|
|
49
|
+
onsInput({
|
|
50
|
+
"id": "suffixed-centimetres",
|
|
51
|
+
"type": "number",
|
|
52
|
+
"width": "4",
|
|
53
|
+
"autocomplete": "off",
|
|
54
|
+
"label": {
|
|
55
|
+
"text": "Length",
|
|
56
|
+
"description": "For example enter 1250 for 12.5m"
|
|
57
|
+
},
|
|
58
|
+
"suffix": {
|
|
59
|
+
"title": "centimetres",
|
|
60
|
+
"text": "cm",
|
|
61
|
+
"id": "length-cm-suffix"
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
}}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{% from "components/input/_macro.njk" import onsInput %}
|
|
2
|
+
{{
|
|
3
|
+
onsInput({
|
|
4
|
+
"id": "telephone",
|
|
5
|
+
"type": "tel",
|
|
6
|
+
"autocomplete": "tel",
|
|
7
|
+
"width": "15",
|
|
8
|
+
"label": {
|
|
9
|
+
"text": "UK mobile number",
|
|
10
|
+
"description": "This will not be stored and only used once to send your access code"
|
|
11
|
+
}
|
|
12
|
+
})
|
|
13
|
+
}}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{% from "components/input/_macro.njk" import onsInput %}
|
|
2
|
+
{{
|
|
3
|
+
onsInput({
|
|
4
|
+
"id": "text",
|
|
5
|
+
"label": {
|
|
6
|
+
"text": "Enter some text"
|
|
7
|
+
},
|
|
8
|
+
"width": "10",
|
|
9
|
+
"charCheckLimit": {
|
|
10
|
+
"limit": 10,
|
|
11
|
+
"charCountOverLimitSingular": "{x} character too many",
|
|
12
|
+
"charCountOverLimitPlural": "{x} characters too many",
|
|
13
|
+
"charCountSingular": "You have {x} character remaining",
|
|
14
|
+
"charCountPlural": "You have {x} characters remaining"
|
|
15
|
+
}
|
|
16
|
+
})
|
|
17
|
+
}}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{% from "components/metadata/_macro.njk" import onsMetadata %}
|
|
2
|
+
{{
|
|
3
|
+
onsMetadata({
|
|
4
|
+
"classes": "ons-u-mb-no",
|
|
5
|
+
"metadataLabel": "Information about this business and its survey requirements",
|
|
6
|
+
"termCol": "2",
|
|
7
|
+
"descriptionCol": "10",
|
|
8
|
+
"itemsList": [
|
|
9
|
+
{
|
|
10
|
+
"term": "Survey:",
|
|
11
|
+
"descriptions": [
|
|
12
|
+
{
|
|
13
|
+
"description": "Bricks & Blocks"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"term": "RU Refs:",
|
|
19
|
+
"descriptions": [
|
|
20
|
+
{
|
|
21
|
+
"description": "49900000118"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"description": "49300005832"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"term": "Business:",
|
|
30
|
+
"descriptions": [
|
|
31
|
+
{
|
|
32
|
+
"description": "Bolts & Ratchets Ltd."
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"term": "Trading as:",
|
|
38
|
+
"descriptions": [
|
|
39
|
+
{
|
|
40
|
+
"description": "Bolts & Ratchets"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"term": "To:",
|
|
46
|
+
"descriptions": [
|
|
47
|
+
{
|
|
48
|
+
"description": "Jacky Turner"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"description": "Louise Goodland"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
})
|
|
57
|
+
}}
|
|
@@ -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 do you have?",
|
|
6
|
+
"legendIsQuestionTitle": true
|
|
7
|
+
}) %}
|
|
8
|
+
{{
|
|
9
|
+
onsCheckboxes({
|
|
10
|
+
"id": "central-heating-answers",
|
|
11
|
+
"dontWrap": true,
|
|
12
|
+
"checkboxesLabel": "Select all that apply",
|
|
13
|
+
"name": "mutually-exclusive",
|
|
14
|
+
"checkboxes": [
|
|
15
|
+
{
|
|
16
|
+
"id": "gas",
|
|
17
|
+
"label": {
|
|
18
|
+
"text": "Gas"
|
|
19
|
+
},
|
|
20
|
+
"value": "gas"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "electric",
|
|
24
|
+
"label": {
|
|
25
|
+
"text": "Electric"
|
|
26
|
+
},
|
|
27
|
+
"value": "electric"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "solid-fuel",
|
|
31
|
+
"label": {
|
|
32
|
+
"text": "Solid fuel"
|
|
33
|
+
},
|
|
34
|
+
"value": "solid-fuel"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "other-fuel",
|
|
38
|
+
"label": {
|
|
39
|
+
"text": "Other"
|
|
40
|
+
},
|
|
41
|
+
"value": "other",
|
|
42
|
+
"other": {
|
|
43
|
+
"id": "other-fuel-textbox",
|
|
44
|
+
"name": "other-fuel-answer",
|
|
45
|
+
"label": {
|
|
46
|
+
"text": "Please specify"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"mutuallyExclusive": {
|
|
52
|
+
"or": "Or",
|
|
53
|
+
"deselectMessage": "Selecting this will uncheck all other checkboxes",
|
|
54
|
+
"deselectGroupAdjective": "deselected",
|
|
55
|
+
"deselectExclusiveOptionAdjective": "deselected",
|
|
56
|
+
"exclusiveOptions": [
|
|
57
|
+
{
|
|
58
|
+
"id": "no-central-heating",
|
|
59
|
+
"label": {
|
|
60
|
+
"text": "No central heating"
|
|
61
|
+
},
|
|
62
|
+
"attributes": {
|
|
63
|
+
"data-attribute": "Example attribute"
|
|
64
|
+
},
|
|
65
|
+
"value": "no-central-heating"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
}}
|
|
71
|
+
{% endcall %}
|