@ons/design-system 70.0.16 → 72.0.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 +10 -1
- package/components/access-code/_macro.njk +4 -4
- package/components/access-code/_macro.spec.js +10 -10
- package/components/access-code/example-access-code-error.njk +2 -2
- package/components/access-code/example-access-code.njk +2 -2
- package/components/accordion/_macro.njk +1 -1
- package/components/accordion/_macro.spec.js +162 -91
- package/components/accordion/_test_examples.js +13 -0
- package/components/address-input/_macro.njk +7 -7
- package/components/address-input/_macro.spec.js +16 -15
- package/components/address-input/autosuggest.address.error.js +1 -1
- package/components/address-input/autosuggest.address.js +25 -25
- package/components/address-input/autosuggest.address.spec.js +6 -5
- package/components/address-input/example-address-input-editable.njk +5 -4
- package/components/address-input/example-address-input.njk +4 -5
- package/components/autosuggest/_autosuggest.scss +8 -8
- package/components/autosuggest/_macro.njk +5 -5
- package/components/autosuggest/autosuggest.spec.js +1 -1
- package/components/back-to-top/_back-to-top.scss +2 -2
- package/components/back-to-top/_macro.spec.js +1 -1
- package/components/back-to-top/example-full-page-back-to-top.njk +6 -6
- package/components/breadcrumbs/_breadcrumbs.scss +1 -1
- package/components/breadcrumbs/_macro.spec.js +121 -115
- package/components/breadcrumbs/_test_examples.js +36 -0
- package/components/browser-banner/_macro.spec.js +1 -1
- package/components/button/_button.scss +24 -16
- package/components/button/_macro.njk +5 -5
- package/components/button/_macro.spec.js +2 -2
- package/components/button/example-button-custom.njk +1 -1
- package/components/card/_card.scss +0 -6
- package/components/card/_macro.njk +9 -9
- package/components/card/_macro.spec.js +57 -24
- package/components/card/example-card-set-with-images.njk +30 -18
- package/components/card/example-card-set-with-lists.njk +57 -45
- package/components/card/example-card-set.njk +27 -15
- package/components/card/example-card.njk +9 -5
- package/components/char-check-limit/_macro.njk +1 -1
- package/components/checkboxes/_checkbox.scss +4 -4
- package/components/checkboxes/_checkboxes.scss +1 -1
- package/components/checkboxes/example-checkboxes-with-hidden-label.njk +4 -4
- package/components/cookies-banner/_cookies-banner.scss +5 -5
- package/components/cookies-banner/_macro.njk +15 -13
- package/components/cookies-banner/_macro.spec.js +1 -1
- package/components/details/_details.scss +5 -6
- package/components/details/_macro.njk +4 -4
- package/components/details/_macro.spec.js +1 -1
- package/components/document-list/_document-list.scss +0 -2
- package/components/document-list/_macro.njk +18 -18
- package/components/document-list/_macro.spec.js +16 -14
- package/components/document-list/example-document-list-article-featured.njk +5 -3
- package/components/document-list/example-document-list-articles.njk +15 -9
- package/components/document-list/example-document-list-downloads.njk +15 -9
- package/components/document-list/example-document-list-search-result-featured.njk +5 -3
- package/components/document-list/example-document-list-search-results.njk +20 -12
- package/components/download-resources/_download-resources.scss +1 -2
- package/components/download-resources/download-resources.spec.js +12 -6
- package/components/external-link/_macro.njk +1 -1
- package/components/external-link/_macro.spec.js +1 -1
- package/components/external-link/example-external-link.njk +1 -1
- package/components/feedback/_macro.njk +1 -1
- package/components/feedback/_macro.spec.js +3 -3
- package/components/feedback/example-feedback-call-to-action.njk +1 -1
- package/components/field/_field-group.scss +0 -2
- package/components/field/_field.scss +1 -2
- package/components/fieldset/_fieldset.scss +2 -2
- package/components/fieldset/_macro.njk +1 -1
- package/components/fieldset/_macro.spec.js +1 -1
- package/components/footer/_footer.scss +12 -7
- package/components/footer/_macro.njk +54 -34
- package/components/footer/_macro.spec.js +90 -28
- package/components/footer/example-footer-cymraeg.njk +1 -1
- package/components/footer/example-footer-transactional.njk +1 -1
- package/components/footer/example-footer-warning.njk +1 -1
- package/components/footer/example-footer-with-alternative-organisation.njk +99 -94
- package/components/footer/example-footer-with-coat-of-arms.njk +1 -1
- package/components/footer/example-footer-with-copyright.njk +1 -1
- package/components/footer/example-footer-with-multiple-logos-and-split-display.njk +173 -0
- package/components/footer/example-footer-with-multiple-logos.njk +172 -0
- package/components/footer/example-footer.njk +1 -1
- package/components/header/_header.scss +7 -14
- package/components/header/_macro.njk +19 -19
- package/components/header/_macro.spec.js +18 -18
- package/components/header/example-header-external-for-surveys.njk +2 -2
- package/components/header/example-header-external-welsh.njk +2 -2
- package/components/header/example-header-external-with-sub-navigation-removed.njk +1 -1
- package/components/header/example-header-external-with-sub-navigation.njk +1 -1
- package/components/header/example-header-multiple-logos.njk +4 -4
- package/components/hero/_hero.scss +6 -8
- package/components/hero/_macro.njk +1 -1
- package/components/icon/_icon.scss +4 -4
- package/components/icon/_macro.njk +4 -4
- package/components/icon/_macro.spec.js +2 -2
- package/components/image/_image.scss +1 -1
- package/components/image/_macro.njk +1 -1
- package/components/image/_macro.spec.js +10 -10
- package/components/image/example-image-for-regular-screens.njk +1 -1
- package/components/input/_input-type.scss +0 -2
- package/components/input/_input.scss +10 -10
- package/components/input/_macro.njk +4 -2
- package/components/input/example-input-search-with-character-check.njk +1 -1
- package/components/input/example-input-search.njk +1 -1
- package/components/label/_label.scss +1 -3
- package/components/language-selector/_macro.njk +3 -3
- package/components/language-selector/_macro.spec.js +7 -7
- package/components/list/_list.scss +1 -5
- package/components/list/_macro.njk +9 -10
- package/components/list/_macro.spec.js +50 -9
- package/components/list/example-inline-list-with-social-icon-prefix.njk +1 -1
- package/components/message/_macro.njk +3 -3
- package/components/message/_macro.spec.js +3 -3
- package/components/message-list/_macro.njk +2 -2
- package/components/message-list/_macro.spec.js +8 -4
- package/components/message-list/_message-list.scss +2 -2
- package/components/navigation/_macro.njk +9 -9
- package/components/navigation/_macro.spec.js +2 -2
- package/components/navigation/_navigation.scss +2 -6
- package/components/navigation/navigation.dom.js +1 -1
- package/components/navigation/navigation.spec.js +4 -4
- package/components/pagination/_macro.njk +2 -2
- package/components/pagination/_pagination.scss +1 -7
- package/components/panel/_macro.njk +5 -4
- package/components/panel/_macro.spec.js +2 -2
- package/components/panel/_panel.scss +12 -8
- package/components/password/_macro.njk +1 -1
- package/components/password/_macro.spec.js +2 -2
- package/components/phase-banner/_macro.njk +1 -1
- package/components/phase-banner/_phase-banner.scss +3 -4
- package/components/phase-banner/example-phase-banner-alpha.njk +1 -1
- package/components/phase-banner/example-phase-banner-beta.njk +1 -1
- package/components/question/_macro.njk +8 -8
- package/components/question/_macro.spec.js +3 -3
- package/components/question/_question.scss +3 -3
- package/components/radios/_macro.njk +1 -1
- package/components/radios/_macro.spec.js +1 -1
- package/components/radios/_radios.scss +1 -1
- package/components/radios/example-radios-with-clear-button-expanded.njk +1 -1
- package/components/radios/example-radios-with-clear-button.njk +1 -1
- package/components/related-content/_macro.spec.js +2 -2
- package/components/related-content/_related-content.scss +1 -1
- package/components/related-content/example-related-content-general.njk +2 -2
- package/components/related-content/example-related-content-social-media.njk +1 -1
- package/components/reply/_macro.njk +3 -1
- package/components/reply/_macro.spec.js +1 -1
- package/components/reply/reply.spec.js +1 -1
- package/components/section-navigation/_macro.njk +10 -10
- package/components/section-navigation/_macro.spec.js +15 -15
- package/components/section-navigation/_section-navigation.scss +3 -8
- package/components/section-navigation/example-section-navigation-single-vertical-with-title.njk +3 -3
- package/components/section-navigation/example-section-navigation-vertical.njk +14 -14
- package/components/section-navigation/example-section-navigation.njk +3 -3
- package/components/select/example-select-with-inline-label.njk +1 -1
- package/components/share-page/_macro.njk +7 -7
- package/components/share-page/_macro.spec.js +2 -2
- package/components/share-page/example-share-page.njk +1 -1
- package/components/status/_status.scss +1 -1
- package/components/summary/_macro.njk +33 -33
- package/components/summary/_macro.spec.js +34 -34
- package/components/summary/_summary.scss +2 -4
- package/components/summary/example-summary-card-grouped.njk +34 -34
- package/components/summary/example-summary-grouped-total.njk +7 -7
- package/components/summary/example-summary-grouped-with-errors.njk +9 -9
- package/components/summary/example-summary-grouped.njk +34 -34
- package/components/summary/example-summary-household.njk +7 -7
- package/components/summary/example-summary-hub-minimal.njk +8 -8
- package/components/summary/example-summary-hub.njk +16 -16
- package/components/summary/example-summary-multiple.njk +7 -7
- package/components/summary/example-summary-no-action.njk +5 -5
- package/components/summary/example-summary.njk +9 -9
- package/components/table/_table.scss +2 -3
- package/components/table-of-contents/_macro.njk +3 -3
- package/components/table-of-contents/_macro.spec.js +3 -3
- package/components/table-of-contents/example-table-of-contents-sticky-full-page.njk +1 -1
- package/components/tabs/_macro.njk +3 -3
- package/components/tabs/_macro.spec.js +3 -3
- package/components/tabs/_tabs.scss +3 -4
- package/components/tabs/example-tabs-details.njk +1 -1
- package/components/text-indent/_text-indent.scss +1 -1
- package/components/text-indent/example-text-indent.njk +1 -1
- package/components/timeline/_macro.njk +4 -4
- package/components/timeline/_macro.spec.js +3 -3
- package/components/timeline/_timeline.scss +4 -3
- package/components/timeline/example-timeline.njk +1 -1
- package/components/upload/_upload.scss +2 -2
- package/components/video/_macro.njk +4 -4
- package/components/video/_macro.spec.js +2 -2
- package/components/video/_video.scss +1 -1
- package/components/video/example-video.njk +2 -2
- package/components/video/video.spec.js +2 -2
- package/css/main.css +1 -1
- package/layout/_dsTemplate.njk +1 -1
- package/layout/_template.njk +31 -31
- package/package.json +3 -2
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +1 -1
- package/scss/base/_global.scss +2 -0
- package/scss/base/_typography.scss +0 -2
- package/scss/main.scss +0 -1
- package/scss/objects/_container.scss +1 -1
- package/scss/objects/_page.scss +2 -3
- package/scss/overrides/rtl.scss +1 -1
- package/scss/utilities/_grid.scss +103 -96
- package/scss/utilities/_margin.scss +11 -5
- package/scss/utilities/_padding.scss +12 -5
- package/scss/utilities/_typography.scss +2 -1
- package/scss/vars/_forms.scss +8 -10
- package/scss/vars/_grid.scss +4 -4
- package/scss/vars/_typography.scss +26 -19
- package/components/call-to-action/_call-to-action.scss +0 -8
- package/components/call-to-action/_macro.njk +0 -24
- package/components/call-to-action/_macro.spec.js +0 -48
- package/components/call-to-action/example-call-to-action-default.njk +0 -15
- package/components/metadata/_macro.njk +0 -14
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
{
|
|
10
10
|
"rows": [
|
|
11
11
|
{
|
|
12
|
-
"
|
|
13
|
-
"
|
|
12
|
+
"title": "People who live here",
|
|
13
|
+
"itemsList": [
|
|
14
14
|
{
|
|
15
15
|
"iconType": "check",
|
|
16
16
|
"valueList": [
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
]
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
-
"
|
|
33
|
-
"
|
|
32
|
+
"title": "Accommodation",
|
|
33
|
+
"itemsList": [
|
|
34
34
|
{
|
|
35
35
|
"iconType": "check",
|
|
36
36
|
"valueList": [
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
]
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
|
-
"
|
|
53
|
-
"
|
|
52
|
+
"title": "Mary Smith (You)",
|
|
53
|
+
"itemsList": [
|
|
54
54
|
{
|
|
55
55
|
"iconType": "check",
|
|
56
56
|
"valueList": [
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
|
-
"
|
|
73
|
-
"
|
|
72
|
+
"title": "John Smith",
|
|
73
|
+
"itemsList": [
|
|
74
74
|
{
|
|
75
75
|
"valueList": [
|
|
76
76
|
{
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
]
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
|
-
"
|
|
92
|
-
"
|
|
91
|
+
"title": "Billy Smith",
|
|
92
|
+
"itemsList": [
|
|
93
93
|
{
|
|
94
94
|
"valueList": [
|
|
95
95
|
{
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
]
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
|
-
"
|
|
111
|
-
"
|
|
110
|
+
"title": "Sally Smith",
|
|
111
|
+
"itemsList": [
|
|
112
112
|
{
|
|
113
113
|
"valueList": [
|
|
114
114
|
{
|
|
@@ -126,8 +126,8 @@
|
|
|
126
126
|
]
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
|
-
"
|
|
130
|
-
"
|
|
129
|
+
"title": "Wilhelmina Susannah Clementine-Smith (Visitor)",
|
|
130
|
+
"itemsList": [
|
|
131
131
|
{
|
|
132
132
|
"valueList": [
|
|
133
133
|
{
|
|
@@ -145,8 +145,8 @@
|
|
|
145
145
|
]
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
|
-
"
|
|
149
|
-
"
|
|
148
|
+
"title": "Vera Jones (Visitor)",
|
|
149
|
+
"itemsList": [
|
|
150
150
|
{
|
|
151
151
|
"valueList": [
|
|
152
152
|
{
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
onsSummary({
|
|
4
4
|
"summaries": [
|
|
5
5
|
{
|
|
6
|
-
"
|
|
6
|
+
"title": "Summary - Section Title",
|
|
7
7
|
"groups": [
|
|
8
8
|
{
|
|
9
9
|
"rows": [
|
|
10
10
|
{
|
|
11
|
-
"
|
|
12
|
-
"
|
|
11
|
+
"title": "What are your monthly household expenses?",
|
|
12
|
+
"itemsList": [
|
|
13
13
|
{
|
|
14
|
-
"
|
|
14
|
+
"title": "Food",
|
|
15
15
|
"valueList": [
|
|
16
16
|
{
|
|
17
17
|
"text": "£50.00"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
]
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
|
-
"
|
|
29
|
+
"title": "Utilities",
|
|
30
30
|
"valueList": [
|
|
31
31
|
{
|
|
32
32
|
"text": "£65.00"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
|
-
"
|
|
44
|
+
"title": "Transport",
|
|
45
45
|
"valueList": [
|
|
46
46
|
{
|
|
47
47
|
"text": "£70.00"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
]
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
|
-
"
|
|
59
|
+
"title": "Other",
|
|
60
60
|
"valueList": [
|
|
61
61
|
{
|
|
62
62
|
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing 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."
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
{
|
|
6
6
|
"groups": [
|
|
7
7
|
{
|
|
8
|
-
"
|
|
8
|
+
"title": "Turnover",
|
|
9
9
|
"rows": [
|
|
10
10
|
{
|
|
11
|
-
"
|
|
12
|
-
"
|
|
11
|
+
"title": "What are the dates of the sales period you are reporting for?",
|
|
12
|
+
"itemsList": [
|
|
13
13
|
{
|
|
14
14
|
"valueList": [
|
|
15
15
|
{
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
"
|
|
24
|
-
"
|
|
23
|
+
"title": "Total turnover",
|
|
24
|
+
"itemsList": [
|
|
25
25
|
{
|
|
26
26
|
"valueList": [
|
|
27
27
|
{
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
{
|
|
9
9
|
"placeholderText": 'test',
|
|
10
10
|
"id": "turnover",
|
|
11
|
-
"
|
|
11
|
+
"title": "Turnover",
|
|
12
12
|
"rows": [
|
|
13
13
|
{
|
|
14
14
|
"id": "sales-dates-row",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
15
|
+
"title": "What are the dates of the sales period you are reporting for?",
|
|
16
|
+
"itemsList": [
|
|
17
17
|
{
|
|
18
18
|
"id": "sales-dates",
|
|
19
19
|
"valueList": [
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
"
|
|
35
|
+
"title": "For the period 1 January 2015 to 2 February 2017, what was the value of your total turnover, excluding VAT?",
|
|
36
36
|
"id": "sales-value-row",
|
|
37
|
-
"
|
|
37
|
+
"itemsList": [
|
|
38
38
|
{
|
|
39
39
|
"id": "sales-value",
|
|
40
40
|
"valueList": [
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"id": "sales-reasons-row",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
57
|
+
"title": "Please indicate the reasons for any changes in the total turnover",
|
|
58
|
+
"itemsList": [
|
|
59
59
|
{
|
|
60
60
|
"id": "sales-reasons",
|
|
61
61
|
"valueList": [
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"id": "sales-detail-row",
|
|
82
|
-
"
|
|
83
|
-
"
|
|
82
|
+
"title": "Please describe the changes in total turnover in more detail",
|
|
83
|
+
"itemsList": [
|
|
84
84
|
{
|
|
85
85
|
"id": "sales-detail",
|
|
86
86
|
"valueList": [
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
&--responsive {
|
|
66
|
-
@include mq(
|
|
66
|
+
@include mq('2xs', s) {
|
|
67
67
|
.ons-table__header {
|
|
68
68
|
display: none;
|
|
69
69
|
}
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
}
|
|
125
125
|
.ons-table__header,
|
|
126
126
|
.ons-table__cell {
|
|
127
|
-
@include mq(
|
|
127
|
+
@include mq('2xs', m) {
|
|
128
128
|
white-space: nowrap;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
@@ -207,7 +207,6 @@
|
|
|
207
207
|
display: inline-block;
|
|
208
208
|
font-family: $font-sans;
|
|
209
209
|
font-weight: $font-weight-bold;
|
|
210
|
-
line-height: 1rem;
|
|
211
210
|
padding: 0 0 0.2rem;
|
|
212
211
|
white-space: nowrap;
|
|
213
212
|
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
{% if params.lists %}
|
|
18
18
|
{% for list in params.lists %}
|
|
19
19
|
{% if list.listHeading %}
|
|
20
|
-
<h3 class="ons-u-fs-r ons-u-mb-
|
|
20
|
+
<h3 class="ons-u-fs-r ons-u-mb-2xs">
|
|
21
21
|
{{ list.listHeading }}<span class="ons-u-vh"> {{ list.listHeadingHidden }}</span>:
|
|
22
22
|
</h3>
|
|
23
23
|
{% endif %}
|
|
24
24
|
{{
|
|
25
25
|
onsList({
|
|
26
26
|
"element": 'ol',
|
|
27
|
-
"classes": 'ons-u-mb-
|
|
27
|
+
"classes": 'ons-u-mb-l',
|
|
28
28
|
"variants": 'dashed',
|
|
29
29
|
"itemsList": list.itemsList
|
|
30
30
|
})
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
{{
|
|
35
35
|
onsList({
|
|
36
36
|
"element": 'ol',
|
|
37
|
-
"classes": 'ons-u-mb-
|
|
37
|
+
"classes": 'ons-u-mb-l',
|
|
38
38
|
"variants": 'dashed',
|
|
39
39
|
"itemsList": params.itemsList
|
|
40
40
|
})
|
|
@@ -116,7 +116,7 @@ describe('macro: table-of-contents', () => {
|
|
|
116
116
|
|
|
117
117
|
expect(listsSpy.occurrences[0]).toEqual({
|
|
118
118
|
element: 'ol',
|
|
119
|
-
classes: 'ons-u-mb-
|
|
119
|
+
classes: 'ons-u-mb-l',
|
|
120
120
|
variants: 'dashed',
|
|
121
121
|
itemsList: EXAMPLE_TABLE_OF_CONTENTS_SINGLE.itemsList,
|
|
122
122
|
});
|
|
@@ -155,13 +155,13 @@ describe('macro: table-of-contents', () => {
|
|
|
155
155
|
|
|
156
156
|
expect(listsSpy.occurrences[0]).toEqual({
|
|
157
157
|
element: 'ol',
|
|
158
|
-
classes: 'ons-u-mb-
|
|
158
|
+
classes: 'ons-u-mb-l',
|
|
159
159
|
variants: 'dashed',
|
|
160
160
|
itemsList: EXAMPLE_TABLE_OF_CONTENTS_MULTIPLE.lists[0].itemsList,
|
|
161
161
|
});
|
|
162
162
|
expect(listsSpy.occurrences[1]).toEqual({
|
|
163
163
|
element: 'ol',
|
|
164
|
-
classes: 'ons-u-mb-
|
|
164
|
+
classes: 'ons-u-mb-l',
|
|
165
165
|
variants: 'dashed',
|
|
166
166
|
itemsList: EXAMPLE_TABLE_OF_CONTENTS_MULTIPLE.lists[1].itemsList,
|
|
167
167
|
});
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
{% endset %}
|
|
9
9
|
|
|
10
10
|
<section class="{{ classes }}" {% if params.noInitialActiveTab %}data-no-initial-active-tab="true"{% endif %}>
|
|
11
|
-
{% set titleTag = params.
|
|
12
|
-
{% set openingTag = "<"
|
|
13
|
-
{% set closingTag = "</"
|
|
11
|
+
{% set titleTag = params.headingLevel | default(2) %}
|
|
12
|
+
{% set openingTag = "<h" ~ titleTag %}
|
|
13
|
+
{% set closingTag = "</h" ~ titleTag ~ ">" %}
|
|
14
14
|
{{ openingTag | safe }}
|
|
15
15
|
class="ons-tabs__title ons-u-fs-r--b
|
|
16
16
|
ons-u-mt-no{{ ' ' + params.titleClasses if params.titleClasses else '' }}">{{ params.title }}{{ closingTag | safe }}
|
|
@@ -83,12 +83,12 @@ describe('macro: tabs', () => {
|
|
|
83
83
|
const $ = cheerio.load(
|
|
84
84
|
renderComponent('tabs', {
|
|
85
85
|
...EXAMPLE_TABS,
|
|
86
|
-
|
|
86
|
+
headingLevel: 4,
|
|
87
87
|
}),
|
|
88
88
|
);
|
|
89
89
|
|
|
90
|
-
const
|
|
91
|
-
expect(
|
|
90
|
+
const expectedTitleTag = $('.ons-tabs__title')[0].tagName;
|
|
91
|
+
expect(expectedTitleTag).toBe('h4');
|
|
92
92
|
});
|
|
93
93
|
|
|
94
94
|
it('has the provided tab id attributes', () => {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
box-sizing: border-box;
|
|
31
31
|
display: list-item;
|
|
32
32
|
list-style: none;
|
|
33
|
-
margin: 0 0 0.
|
|
33
|
+
margin: 0 0 0.25rem;
|
|
34
34
|
|
|
35
35
|
&--row {
|
|
36
36
|
display: inline;
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
color: var(--ons-color-text);
|
|
45
45
|
display: inline-block;
|
|
46
46
|
height: 2.55rem;
|
|
47
|
-
line-height: 2.
|
|
48
|
-
margin: 0 0.
|
|
47
|
+
line-height: 2.25rem;
|
|
48
|
+
margin: 0 0.5rem 0 0;
|
|
49
49
|
overflow: visible;
|
|
50
50
|
padding: 0 1rem;
|
|
51
51
|
position: relative;
|
|
@@ -143,7 +143,6 @@
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.ons-tabs__panel {
|
|
146
|
-
margin-top: 1px;
|
|
147
146
|
padding: 1rem;
|
|
148
147
|
}
|
|
149
148
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"alt": "Youtube video"
|
|
17
17
|
},
|
|
18
18
|
"title": 'Transforming the way we produce statistics | Explaining the Dynamic Population Model | BSL',
|
|
19
|
-
"
|
|
19
|
+
"videoLinkText": 'Watch “Transforming the way we produce statistics | Explaining the Dynamic Population Model | BSL“ on Youtube'
|
|
20
20
|
})
|
|
21
21
|
}}
|
|
22
22
|
{% from "components/tabs/_macro.njk" import onsTabs %}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{% from "components/text-indent/_macro.njk" import onsTextIndent %}
|
|
2
2
|
{{-
|
|
3
3
|
onsTextIndent({
|
|
4
|
-
text: '<p>Telephone: 0800 141 2021<br>Monday to Friday, 8 am to 7pm<br>Saturday, 8am to 4pm</p>'
|
|
4
|
+
"text": '<p>Telephone: 0800 141 2021<br>Monday to Friday, 8 am to 7pm<br>Saturday, 8am to 4pm</p>'
|
|
5
5
|
})
|
|
6
6
|
-}}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
{% from "components/list/_macro.njk" import onsList %}
|
|
3
3
|
|
|
4
4
|
<div class="ons-timeline{{ ' ' + params.classes if params.classes else '' }}">
|
|
5
|
-
{% set titleTag = params.
|
|
6
|
-
{% set openingTag = "<"
|
|
7
|
-
{% set closingTag = "</"
|
|
8
|
-
{% for item in params.
|
|
5
|
+
{% set titleTag = params.headingLevel | default(2) %}
|
|
6
|
+
{% set openingTag = "<h" ~ titleTag %}
|
|
7
|
+
{% set closingTag = "</h" ~ titleTag ~ ">" %}
|
|
8
|
+
{% for item in params.timelineItems %}
|
|
9
9
|
<div class="ons-timeline__item">
|
|
10
10
|
{{ openingTag | safe }} class="ons-timeline__heading">{{ item.heading }}{{ closingTag | safe }}
|
|
11
11
|
{% if item.itemsList %}
|
|
@@ -6,7 +6,7 @@ import axe from '../../tests/helpers/axe';
|
|
|
6
6
|
import { renderComponent, templateFaker } from '../../tests/helpers/rendering';
|
|
7
7
|
|
|
8
8
|
const EXAMPLE_TIMELINE = {
|
|
9
|
-
|
|
9
|
+
timelineItems: [
|
|
10
10
|
{
|
|
11
11
|
heading: 'January 2020',
|
|
12
12
|
content: 'Timeline entry 1',
|
|
@@ -63,10 +63,10 @@ describe('macro: timeline', () => {
|
|
|
63
63
|
expect($secondItem.text()).toContain('Timeline entry 2');
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
-
it('renders a heading based upon
|
|
66
|
+
it('renders a heading based upon `headingLevel` parameter', () => {
|
|
67
67
|
const EXAMPLE_TIMELINE_WITH_TITLE_TAG = {
|
|
68
68
|
...EXAMPLE_TIMELINE,
|
|
69
|
-
|
|
69
|
+
headingLevel: 3,
|
|
70
70
|
};
|
|
71
71
|
const $ = cheerio.load(renderComponent('timeline', EXAMPLE_TIMELINE_WITH_TITLE_TAG));
|
|
72
72
|
const $firstItem = $('.ons-timeline__item:nth-child(1)');
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
height: 100%;
|
|
9
9
|
left: 0;
|
|
10
10
|
position: absolute;
|
|
11
|
-
top:
|
|
11
|
+
top: 12px;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
height: 4px;
|
|
23
23
|
left: -1.5rem;
|
|
24
24
|
position: absolute;
|
|
25
|
-
top:
|
|
25
|
+
top: 12px;
|
|
26
26
|
width: 12px;
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.ons-timeline__heading {
|
|
35
|
-
|
|
35
|
+
@extend .ons-u-fs-r--b;
|
|
36
|
+
|
|
36
37
|
margin-bottom: 0.5rem;
|
|
37
38
|
}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
background: var(--ons-color-white);
|
|
3
3
|
border: 1px solid var(--ons-color-input-border);
|
|
4
4
|
border-radius: $input-radius;
|
|
5
|
-
font-size: 1rem;
|
|
6
5
|
padding: 0;
|
|
7
6
|
width: 100%;
|
|
7
|
+
// custom line height to center the placeholder text
|
|
8
|
+
line-height: 1.5rem;
|
|
8
9
|
&::-webkit-file-upload-button {
|
|
9
10
|
background: var(--ons-color-button-secondary);
|
|
10
11
|
border: 0;
|
|
@@ -12,7 +13,6 @@
|
|
|
12
13
|
border-right: 1px solid var(--ons-color-input-border);
|
|
13
14
|
border-top-right-radius: 0;
|
|
14
15
|
color: var(--ons-color-text);
|
|
15
|
-
font-size: 1rem;
|
|
16
16
|
outline: none;
|
|
17
17
|
padding: 0.5rem 1rem;
|
|
18
18
|
transition: border-color 200ms ease-in;
|
|
@@ -4,22 +4,22 @@
|
|
|
4
4
|
{% set linkContents %}
|
|
5
5
|
{% if params.image.smallSrc %}
|
|
6
6
|
<img
|
|
7
|
-
class="ons-video__img ons-u-mb-
|
|
7
|
+
class="ons-video__img ons-u-mb-2xs"
|
|
8
8
|
{% if params.image.largeSrc %}srcset="{{ params.image.smallSrc }} 1x, {{ params.image.largeSrc }} 2x"{% endif %}
|
|
9
9
|
src="{{ params.image.smallSrc }}"
|
|
10
10
|
alt="{{ params.image.alt }}"
|
|
11
11
|
loading="lazy"
|
|
12
12
|
/>
|
|
13
13
|
{% endif %}
|
|
14
|
-
<span class="ons-video__link-text ons-u-mt-
|
|
14
|
+
<span class="ons-video__link-text ons-u-mt-2xs">{{ params.videoLinkText }}</span>
|
|
15
15
|
{% endset %}
|
|
16
16
|
|
|
17
17
|
<div class="ons-video ons-js-video">
|
|
18
18
|
{{
|
|
19
19
|
onsExternalLink({
|
|
20
|
-
"url": params.
|
|
20
|
+
"url": params.videoLinkUrl,
|
|
21
21
|
"classes": "ons-video__link ons-js-video-placeholder ons-u-db",
|
|
22
|
-
"
|
|
22
|
+
"text": linkContents
|
|
23
23
|
})
|
|
24
24
|
}}
|
|
25
25
|
<iframe
|
|
@@ -7,9 +7,9 @@ import { renderComponent } from '../../tests/helpers/rendering';
|
|
|
7
7
|
|
|
8
8
|
const EXAMPLE_VIDEO_YOUTUBE = {
|
|
9
9
|
videoEmbedUrl: 'https://www.youtube.com/embed/_EGJlvkgbPo',
|
|
10
|
-
|
|
10
|
+
videoLinkUrl: 'https://www.youtube.com/watch?v=_EGJlvkgbPo',
|
|
11
11
|
title: 'Census 2021 promotional TV advert',
|
|
12
|
-
|
|
12
|
+
videoLinkText: 'Example link text',
|
|
13
13
|
image: {
|
|
14
14
|
smallSrc: 'example-small.png',
|
|
15
15
|
largeSrc: 'example-large.png',
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
{{
|
|
3
3
|
onsVideo({
|
|
4
4
|
"videoEmbedUrl": 'https://www.youtube.com/embed/OwYVwPPxPj4',
|
|
5
|
-
"
|
|
5
|
+
"videoLinkUrl": 'https://www.youtube.com/watch?v=OwYVwPPxPj4',
|
|
6
6
|
"image": {
|
|
7
7
|
"largeSrc": '/ds-img/youtube-example-cover.png',
|
|
8
8
|
"smallSrc": '/ds-img/youtube-example-cover.png',
|
|
9
9
|
"alt": "Youtube video"
|
|
10
10
|
},
|
|
11
11
|
"title": 'Transforming the way we produce statistics | Explaining the Dynamic Population Model | BSL',
|
|
12
|
-
"
|
|
12
|
+
"videoLinkText": 'Watch “Transforming the way we produce statistics | Explaining the Dynamic Population Model | BSL“ on Youtube'
|
|
13
13
|
})
|
|
14
14
|
}}
|
|
@@ -5,13 +5,13 @@ const { setTimeout } = require('node:timers/promises');
|
|
|
5
5
|
const EXAMPLE_VIDEO_YOUTUBE = {
|
|
6
6
|
videoEmbedUrl: 'https://www.youtube.com/embed/_EGJlvkgbPo',
|
|
7
7
|
title: 'Census 2021 promotional TV advert',
|
|
8
|
-
|
|
8
|
+
videoLinkText: 'Example link text',
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
const EXAMPLE_VIDEO_VIMEO = {
|
|
12
12
|
videoEmbedUrl: 'https://player.vimeo.com/video/838454524?h=24551a3754',
|
|
13
13
|
title: 'Vimeo Video',
|
|
14
|
-
|
|
14
|
+
videoLinkText: 'Example link text',
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
const EXAMPLE_APPROVED_COOKIE = JSON.stringify({ campaigns: true }).replace(/"/g, "'");
|