@ons/design-system 62.0.2 → 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/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 +2 -2
- package/components/cookies-banner/_macro.spec.js +1 -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/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/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/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-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/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,63 @@
|
|
|
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
|
+
"mutuallyExclusive": {
|
|
38
|
+
"or": "Or",
|
|
39
|
+
"deselectMessage": "Selecting these will uncheck all other checkboxes",
|
|
40
|
+
"deselectGroupAdjective": "deselected",
|
|
41
|
+
"deselectExclusiveOptionAdjective": "deselected",
|
|
42
|
+
"exclusiveOptions": [
|
|
43
|
+
{
|
|
44
|
+
"id": "no-central-heating",
|
|
45
|
+
"name": "no central heating",
|
|
46
|
+
"label": {
|
|
47
|
+
"text": "No central heating"
|
|
48
|
+
},
|
|
49
|
+
"value": "no-central-heating"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "other",
|
|
53
|
+
"name": "other",
|
|
54
|
+
"label": {
|
|
55
|
+
"text": "Other"
|
|
56
|
+
},
|
|
57
|
+
"value": "other"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
}}
|
|
63
|
+
{% endcall %}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{% from "components/input/_macro.njk" import onsInput %}
|
|
2
|
+
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
3
|
+
|
|
4
|
+
{% call onsQuestion({
|
|
5
|
+
"title": "What was your annual income before tax in 2018/19?",
|
|
6
|
+
"legendIsQuestionTitle": true
|
|
7
|
+
}) %}
|
|
8
|
+
{{
|
|
9
|
+
onsInput({
|
|
10
|
+
"id": "currency",
|
|
11
|
+
"dontWrap": true,
|
|
12
|
+
"type": "number",
|
|
13
|
+
"width": "4",
|
|
14
|
+
"attributes": {
|
|
15
|
+
"min": 0
|
|
16
|
+
},
|
|
17
|
+
"label": {
|
|
18
|
+
"text": "Gross annual income"
|
|
19
|
+
},
|
|
20
|
+
"prefix": {
|
|
21
|
+
"title": "British pounds (GBP)",
|
|
22
|
+
"text": "£",
|
|
23
|
+
"id": "annual-salary-gpb-prefix"
|
|
24
|
+
},
|
|
25
|
+
"mutuallyExclusive": {
|
|
26
|
+
"or": "Or",
|
|
27
|
+
"deselectMessage": "Selecting this will clear your inputted annual income",
|
|
28
|
+
"deselectGroupAdjective": "cleared",
|
|
29
|
+
"deselectExclusiveOptionAdjective": "deselected",
|
|
30
|
+
"exclusiveOptions": [
|
|
31
|
+
{
|
|
32
|
+
"id": "currency-checkbox",
|
|
33
|
+
"name": "no-currency",
|
|
34
|
+
"value": "no-currency",
|
|
35
|
+
"label": {
|
|
36
|
+
"text": "I prefer not to say"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
}}
|
|
43
|
+
{% endcall %}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{% from "components/textarea/_macro.njk" import onsTextarea %}
|
|
2
|
+
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
3
|
+
|
|
4
|
+
{% call onsQuestion({
|
|
5
|
+
"title": "What do you think of this service?",
|
|
6
|
+
"legendIsQuestionTitle": true
|
|
7
|
+
}) %}
|
|
8
|
+
{{
|
|
9
|
+
onsTextarea({
|
|
10
|
+
"id": "feedback",
|
|
11
|
+
"name": "feedback",
|
|
12
|
+
"dontWrap": true,
|
|
13
|
+
"width": "30",
|
|
14
|
+
"label": {
|
|
15
|
+
"text": "Enter your feedback"
|
|
16
|
+
},
|
|
17
|
+
"charCheckLimit": {
|
|
18
|
+
"limit": 200,
|
|
19
|
+
"charCountSingular": "You have {x} character remaining",
|
|
20
|
+
"charCountPlural": "You have {x} characters remaining"
|
|
21
|
+
},
|
|
22
|
+
"mutuallyExclusive": {
|
|
23
|
+
"or": "Or",
|
|
24
|
+
"deselectMessage": "Selecting this will clear your feedback",
|
|
25
|
+
"deselectGroupAdjective": "cleared",
|
|
26
|
+
"deselectExclusiveOptionAdjective": "deselected",
|
|
27
|
+
"exclusiveOptions": [
|
|
28
|
+
{
|
|
29
|
+
"id": "feedback-checkbox",
|
|
30
|
+
"name": "no-feedback",
|
|
31
|
+
"value": "no-feedback",
|
|
32
|
+
"label": {
|
|
33
|
+
"text": "I don’t want to provide feedback"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
}}
|
|
40
|
+
{% endcall %}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{% from "components/pagination/_macro.njk" import onsPagination %}
|
|
2
|
+
|
|
3
|
+
{{
|
|
4
|
+
onsPagination({
|
|
5
|
+
"previous": "Previous",
|
|
6
|
+
"next": "Next",
|
|
7
|
+
"hideRangeIndicator": true,
|
|
8
|
+
"pages": [
|
|
9
|
+
{
|
|
10
|
+
"url": "#page1",
|
|
11
|
+
"current": true
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"url": "#page2"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"url": "#page3"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"url": "#page4"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
})
|
|
24
|
+
}}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{% from "components/pagination/_macro.njk" import onsPagination %}
|
|
2
|
+
|
|
3
|
+
{{
|
|
4
|
+
onsPagination({
|
|
5
|
+
"previous": "Previous",
|
|
6
|
+
"next": "Next",
|
|
7
|
+
"hideRangeIndicator": true,
|
|
8
|
+
"pages": [
|
|
9
|
+
{
|
|
10
|
+
"url": "#page1"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"url": "#page2"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"url": "#page3"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"url": "#page4",
|
|
20
|
+
"current": true
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
})
|
|
24
|
+
}}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{% from "components/pagination/_macro.njk" import onsPagination %}
|
|
2
|
+
|
|
3
|
+
{{
|
|
4
|
+
onsPagination({
|
|
5
|
+
"previous": "Previous",
|
|
6
|
+
"next": "Next",
|
|
7
|
+
"hideRangeIndicator": true,
|
|
8
|
+
"pages": [
|
|
9
|
+
{
|
|
10
|
+
"url": "#page1"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"url": "#page2"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"url": "#page3"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"url": "#page4"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"url": "#page5",
|
|
23
|
+
"current": true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"url": "#page6"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"url": "#page7"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"url": "#page8"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"url": "#page9"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"url": "#page10"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
})
|
|
42
|
+
}}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
{% from "components/pagination/_macro.njk" import onsPagination %}
|
|
2
|
+
|
|
3
|
+
{{
|
|
4
|
+
onsPagination({
|
|
5
|
+
"previous": "Previous",
|
|
6
|
+
"next": "Next",
|
|
7
|
+
"pages": [
|
|
8
|
+
{
|
|
9
|
+
"url": "#0"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"url": "#0"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"url": "#0"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"url": "#0"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"url": "#0",
|
|
22
|
+
"current": true
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"url": "#0"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"url": "#0"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"url": "#0"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"url": "#0"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"url": "#0"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"url": "#0"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"url": "#0"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"url": "#0"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"url": "#0"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"url": "#0"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"url": "#0"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"url": "#0"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"url": "#0"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"url": "#0"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"url": "#0"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"url": "#0"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"url": "#0"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"url": "#0"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"url": "#0"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"url": "#0"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"url": "#0"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"url": "#0"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"url": "#0"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"url": "#0"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"url": "#0"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"url": "#0"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"url": "#0"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"url": "#0"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"url": "#0"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"url": "#0"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
})
|
|
116
|
+
}}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
|
|
3
|
+
"fullWidth": true
|
|
4
|
+
---
|
|
5
|
+
{% from "components/panel/_macro.njk" import onsPanel %}
|
|
6
|
+
|
|
7
|
+
{% call onsPanel({
|
|
8
|
+
"type": 'announcement'
|
|
9
|
+
})
|
|
10
|
+
%}
|
|
11
|
+
|
|
12
|
+
<p class="ons-u-mb-no">National lockdown: stay at home</p>
|
|
13
|
+
|
|
14
|
+
<div class="ons-u-fs-r">
|
|
15
|
+
<p>Coronavirus (COVID-19) remains a serious threat across the country. <a href="#0">Find out more</a></p>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
{% endcall %}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{% from "components/input/_macro.njk" import onsInput %}
|
|
2
|
+
|
|
3
|
+
{{
|
|
4
|
+
onsInput({
|
|
5
|
+
"id": 'number',
|
|
6
|
+
"type": 'number',
|
|
7
|
+
"width": '5',
|
|
8
|
+
"attributes": {
|
|
9
|
+
"min": 0
|
|
10
|
+
},
|
|
11
|
+
"label": {
|
|
12
|
+
"text": 'Number of employees paid monthly'
|
|
13
|
+
},
|
|
14
|
+
"error": {
|
|
15
|
+
"text": 'Enter a number'
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
}}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{% from "components/panel/_macro.njk" import onsPanel %}
|
|
2
|
+
{% from "components/lists/_macro.njk" import onsList %}
|
|
3
|
+
|
|
4
|
+
{% call onsPanel({
|
|
5
|
+
"title": 'There are 2 problems with your answer',
|
|
6
|
+
"type": 'error'
|
|
7
|
+
}) %}
|
|
8
|
+
{{
|
|
9
|
+
onsList({
|
|
10
|
+
"element": 'ol',
|
|
11
|
+
"itemsList": [
|
|
12
|
+
{
|
|
13
|
+
"text": 'Enter a number',
|
|
14
|
+
"url": '#container-test-number',
|
|
15
|
+
"variants": "inPageLink"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"text": 'Enter a number less than or equal to 100',
|
|
19
|
+
"url": '#container-test-percent',
|
|
20
|
+
"variants": "inPageLink"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
})
|
|
24
|
+
}}
|
|
25
|
+
{% endcall %}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{% from "components/panel/_macro.njk" import onsPanel %}
|
|
2
|
+
{{
|
|
3
|
+
onsPanel({
|
|
4
|
+
"spacious": true,
|
|
5
|
+
"body": '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><ul><li>VAT</li><li>Internet sales</li></ul>'
|
|
6
|
+
})
|
|
7
|
+
}}
|
|
@@ -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 %}
|