@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
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
|
|
34
34
|
// Removes inherited bottom margin to make whitespace inside panel equal
|
|
35
35
|
> *:last-child {
|
|
36
|
-
|
|
36
|
+
@extend .ons-u-mb-no;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.ons-field {
|
|
40
|
-
|
|
40
|
+
@extend .ons-u-mb-no;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
&:focus {
|
|
@@ -66,17 +66,17 @@
|
|
|
66
66
|
// Removes inherited bottom margin to make whitespace inside panel equal
|
|
67
67
|
> *:last-child,
|
|
68
68
|
strong > *:last-child {
|
|
69
|
-
|
|
69
|
+
@extend .ons-u-mb-no;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
&.ons-icon-margin--
|
|
72
|
+
&.ons-icon-margin--3xl {
|
|
73
73
|
padding-left: 2.7rem !important;
|
|
74
74
|
|
|
75
75
|
@include mq(m) {
|
|
76
76
|
padding-left: 3.5rem !important;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
&.ons-icon-margin--
|
|
79
|
+
&.ons-icon-margin--2xl {
|
|
80
80
|
padding-left: 2.45rem !important;
|
|
81
81
|
|
|
82
82
|
@include mq(m) {
|
|
@@ -121,7 +121,8 @@
|
|
|
121
121
|
|
|
122
122
|
&--footer {
|
|
123
123
|
background-color: var(--ons-color-grey-15) !important;
|
|
124
|
-
|
|
124
|
+
@extend .ons-u-mb-no;
|
|
125
|
+
|
|
125
126
|
padding: 1rem 0 !important;
|
|
126
127
|
}
|
|
127
128
|
}
|
|
@@ -130,7 +131,8 @@
|
|
|
130
131
|
&--announcement {
|
|
131
132
|
border: 0 !important;
|
|
132
133
|
color: var(--ons-color-white);
|
|
133
|
-
|
|
134
|
+
@extend .ons-u-mb-no;
|
|
135
|
+
|
|
134
136
|
outline: none !important;
|
|
135
137
|
padding: 1rem 0 !important;
|
|
136
138
|
a {
|
|
@@ -198,6 +200,7 @@
|
|
|
198
200
|
}
|
|
199
201
|
|
|
200
202
|
&__icon {
|
|
203
|
+
top: 1.2rem;
|
|
201
204
|
background-color: var(--ons-color-white);
|
|
202
205
|
color: var(--ons-color-black);
|
|
203
206
|
display: flex;
|
|
@@ -217,10 +220,10 @@
|
|
|
217
220
|
&--success & {
|
|
218
221
|
&__icon {
|
|
219
222
|
left: 0;
|
|
223
|
+
top: 0.875rem;
|
|
220
224
|
padding-left: 1rem;
|
|
221
225
|
.ons-icon {
|
|
222
226
|
fill: var(--ons-color-success) !important;
|
|
223
|
-
margin-top: -15% !important;
|
|
224
227
|
}
|
|
225
228
|
}
|
|
226
229
|
}
|
|
@@ -231,6 +234,7 @@
|
|
|
231
234
|
|
|
232
235
|
&--bare & {
|
|
233
236
|
&__icon {
|
|
237
|
+
top: -0.2rem;
|
|
234
238
|
height: 1.3rem;
|
|
235
239
|
width: 1.3rem;
|
|
236
240
|
}
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"id": params.id,
|
|
36
36
|
"name": params.name,
|
|
37
37
|
"type": "password",
|
|
38
|
-
"classes": "ons-u-mt-
|
|
38
|
+
"classes": "ons-u-mt-2xs ons-js-password-input" + (" ons-input--error" if params.error else ""),
|
|
39
39
|
"dontWrap": true
|
|
40
40
|
})
|
|
41
41
|
}}
|
|
@@ -115,7 +115,7 @@ describe('macro: password', () => {
|
|
|
115
115
|
id: 'example-password',
|
|
116
116
|
name: 'example-password-name',
|
|
117
117
|
type: 'password',
|
|
118
|
-
classes: 'ons-u-mt-
|
|
118
|
+
classes: 'ons-u-mt-2xs ons-js-password-input',
|
|
119
119
|
dontWrap: true,
|
|
120
120
|
});
|
|
121
121
|
});
|
|
@@ -130,7 +130,7 @@ describe('macro: password', () => {
|
|
|
130
130
|
id: 'example-password',
|
|
131
131
|
name: 'example-password-name',
|
|
132
132
|
type: 'password',
|
|
133
|
-
classes: 'ons-u-mt-
|
|
133
|
+
classes: 'ons-u-mt-2xs ons-js-password-input ons-input--error',
|
|
134
134
|
dontWrap: true,
|
|
135
135
|
});
|
|
136
136
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{% macro onsPhaseBanner(params) %}
|
|
2
2
|
<div class="ons-phase-banner">
|
|
3
3
|
<div class="ons-container{{ ' ons-container--full-width' if params.fullWidth }}{{ ' ons-container--wide' if params.wide }}">
|
|
4
|
-
<div class="ons-grid ons-grid
|
|
4
|
+
<div class="ons-grid ons-grid-flex ons-grid--gutterless ons-grid-flex--vertical-center ons-grid-flex--no-wrap">
|
|
5
5
|
{% if not params.hideBadge %}
|
|
6
6
|
<div class="ons-grid__col ons-col-auto ons-u-flex-no-grow ons-u-flex-no-shrink">
|
|
7
7
|
<strong class="ons-phase-banner__badge">{{ params.badge | default("Beta") }}</strong>
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
background: var(--ons-color-white);
|
|
3
3
|
border-bottom: 1px solid var(--ons-color-borders);
|
|
4
4
|
padding: 0.5rem 0;
|
|
5
|
-
|
|
6
5
|
&__badge {
|
|
7
6
|
background: var(--ons-color-black);
|
|
8
7
|
color: var(--ons-color-white);
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
@extend .ons-u-fs-s--b;
|
|
9
|
+
|
|
11
10
|
margin: 0 0.5rem 0 0;
|
|
12
11
|
outline: 2px solid transparent; // Add transparent outline because Windows High Contrast Mode doesn't show background
|
|
13
12
|
padding: 0.4rem;
|
|
@@ -15,6 +14,6 @@
|
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
&__desc {
|
|
18
|
-
margin-top: 0.
|
|
17
|
+
margin-top: 0.25rem;
|
|
19
18
|
}
|
|
20
19
|
}
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
{{- params.description | safe -}}
|
|
17
17
|
</div>
|
|
18
18
|
{% elif params.legendIsQuestionTitle is not defined %}
|
|
19
|
-
<div class="ons-question__description ons-u-mb-
|
|
19
|
+
<div class="ons-question__description ons-u-mb-l">{{- params.description | safe -}}</div>
|
|
20
20
|
{% else %}
|
|
21
21
|
{{- params.description | safe -}}
|
|
22
22
|
{%- endif -%}
|
|
23
23
|
{%- endset -%}
|
|
24
24
|
|
|
25
25
|
{% set instHtml %}
|
|
26
|
-
<div class="ons-question__instruction ons-u-mb-
|
|
26
|
+
<div class="ons-question__instruction ons-u-mb-l">{{ params.instruction | safe }}</div>
|
|
27
27
|
{% endset %}
|
|
28
28
|
|
|
29
29
|
{% if params.definition %}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
{%
|
|
33
33
|
call onsDetails({
|
|
34
34
|
"id": params.definition.id,
|
|
35
|
-
"classes": 'ons-u-mb-
|
|
35
|
+
"classes": 'ons-u-mb-l',
|
|
36
36
|
"title": params.definition.title,
|
|
37
37
|
"headingAttributes": params.definition.headingAttributes,
|
|
38
38
|
"contentAttributes": params.definition.contentAttributes
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
{%
|
|
52
52
|
call onsPanel({
|
|
53
53
|
"id": params.guidance.id,
|
|
54
|
-
"classes": "ons-question-guidance ons-u-mb-
|
|
54
|
+
"classes": "ons-question-guidance ons-u-mb-l",
|
|
55
55
|
"attributes": params.guidance.attributes
|
|
56
56
|
})
|
|
57
57
|
%}
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
|
|
81
81
|
<div
|
|
82
82
|
{% if params.id %}id="{{ params.id }}"{% endif %}
|
|
83
|
-
class="ons-question ons-u-mb-
|
|
83
|
+
class="ons-question ons-u-mb-xl{{ ' ' + params.classes if params.classes else '' }}"
|
|
84
84
|
{% if params.attributes %}{% for attribute, value in (params.attributes.items() if params.attributes is mapping and params.attributes.items else params.attributes) %}{{ ' ' }}{{ attribute }}{% if value %}="{{ value }}"{% endif %}{% endfor %}{% endif %}
|
|
85
85
|
>
|
|
86
86
|
{% set additionalContent %}
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
|
|
115
115
|
{# Resolves caller issue in Jinja: https://github.com/pallets/jinja/issues/371 #}
|
|
116
116
|
{% set content = caller() if caller %}
|
|
117
|
-
<div class="ons-question__answer ons-u-mb-
|
|
117
|
+
<div class="ons-question__answer ons-u-mb-l">
|
|
118
118
|
{%
|
|
119
119
|
call onsFieldset({
|
|
120
120
|
"legendIsQuestionTitle": params.legendIsQuestionTitle,
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
|
|
138
138
|
{{- additionalContent | safe -}}
|
|
139
139
|
|
|
140
|
-
<div class="ons-question__answer ons-u-mb-
|
|
140
|
+
<div class="ons-question__answer ons-u-mb-l">{{ caller() if caller }}</div>
|
|
141
141
|
{% endif %}
|
|
142
142
|
|
|
143
143
|
{% if params.justification %}
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
{%
|
|
146
146
|
call onsDetails({
|
|
147
147
|
"id": params.justification.id,
|
|
148
|
-
"classes": 'ons-u-mb-
|
|
148
|
+
"classes": 'ons-u-mb-l',
|
|
149
149
|
"title": params.justification.title | default('Why we ask this question'),
|
|
150
150
|
"headingAttributes": params.justification.headingAttributes,
|
|
151
151
|
"contentAttributes": params.justification.contentAttributes
|
|
@@ -187,7 +187,7 @@ describe('macro: question', () => {
|
|
|
187
187
|
|
|
188
188
|
faker.renderComponent('question', EXAMPLE_QUESTION_DEFINITION);
|
|
189
189
|
|
|
190
|
-
expect(detailsSpy.occurrences[0]).toHaveProperty('classes', 'ons-u-mb-
|
|
190
|
+
expect(detailsSpy.occurrences[0]).toHaveProperty('classes', 'ons-u-mb-l');
|
|
191
191
|
expect(detailsSpy.occurrences[0]).toHaveProperty('id', 'definition-id');
|
|
192
192
|
expect(detailsSpy.occurrences[0]).toHaveProperty('title', 'Definition title');
|
|
193
193
|
});
|
|
@@ -206,7 +206,7 @@ describe('macro: question', () => {
|
|
|
206
206
|
|
|
207
207
|
faker.renderComponent('question', EXAMPLE_QUESTION_GUIDANCE);
|
|
208
208
|
|
|
209
|
-
expect(panelSpy.occurrences[0]).toHaveProperty('classes', 'ons-question-guidance ons-u-mb-
|
|
209
|
+
expect(panelSpy.occurrences[0]).toHaveProperty('classes', 'ons-question-guidance ons-u-mb-l');
|
|
210
210
|
});
|
|
211
211
|
|
|
212
212
|
it('outputs the expected panel call content', () => {
|
|
@@ -251,7 +251,7 @@ describe('macro: question', () => {
|
|
|
251
251
|
|
|
252
252
|
faker.renderComponent('question', EXAMPLE_QUESTION_JUSTIFICATION);
|
|
253
253
|
|
|
254
|
-
expect(detailsSpy.occurrences[0]).toHaveProperty('classes', 'ons-u-mb-
|
|
254
|
+
expect(detailsSpy.occurrences[0]).toHaveProperty('classes', 'ons-u-mb-l');
|
|
255
255
|
expect(detailsSpy.occurrences[0]).toHaveProperty('id', 'justification-id');
|
|
256
256
|
expect(detailsSpy.occurrences[0]).toHaveProperty('title', 'Justification title');
|
|
257
257
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
margin: 1rem 0 0;
|
|
3
3
|
|
|
4
4
|
&__title {
|
|
5
|
-
@extend .ons-u-mb-
|
|
5
|
+
@extend .ons-u-mb-l;
|
|
6
6
|
|
|
7
7
|
mark,
|
|
8
8
|
.ons-instruction {
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
|
|
17
17
|
&__description {
|
|
18
18
|
p:last-of-type {
|
|
19
|
-
|
|
19
|
+
@extend .ons-u-mb-no;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
&__instruction {
|
|
24
24
|
background-color: var(--ons-color-instruction-tint);
|
|
25
|
-
border:
|
|
25
|
+
border: 4px solid var(--ons-color-instruction);
|
|
26
26
|
display: block;
|
|
27
27
|
font-weight: $font-weight-regular;
|
|
28
28
|
padding: 1rem;
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"name": radio.other.name,
|
|
118
118
|
"borderless": true,
|
|
119
119
|
"legend": radio.other.legend,
|
|
120
|
-
"legendClasses": radio.other.legendClasses | default('') + ' ons-u-mb-
|
|
120
|
+
"legendClasses": radio.other.legendClasses | default('') + ' ons-u-mb-2xs',
|
|
121
121
|
"attributes": radio.other.attributes,
|
|
122
122
|
"classes": "ons-js-other-fieldset-radio",
|
|
123
123
|
"radios": radio.other.radios
|
|
@@ -541,7 +541,7 @@ describe('macro: radios', () => {
|
|
|
541
541
|
name: 'example-radios-name',
|
|
542
542
|
borderless: true,
|
|
543
543
|
legend: 'Select preferred times of day',
|
|
544
|
-
legendClasses: 'extra-legend-class ons-u-mb-
|
|
544
|
+
legendClasses: 'extra-legend-class ons-u-mb-2xs',
|
|
545
545
|
attributes: { a: 42 },
|
|
546
546
|
classes: 'ons-js-other-fieldset-radio',
|
|
547
547
|
radios: EXAMPLE_RADIO_ITEM_RADIOS.other.radios,
|
|
@@ -27,7 +27,7 @@ const EXAMPLE_RELATED_CONTENT_LINKS = {
|
|
|
27
27
|
id: 'related-links',
|
|
28
28
|
title: 'Related links',
|
|
29
29
|
iconPosition: 'after',
|
|
30
|
-
iconSize: '
|
|
30
|
+
iconSize: '2xl',
|
|
31
31
|
itemsList: [
|
|
32
32
|
{ text: 'A', url: '/article/a' },
|
|
33
33
|
{ text: 'B', url: '/article/b' },
|
|
@@ -121,7 +121,7 @@ describe('macro: related-content', () => {
|
|
|
121
121
|
]);
|
|
122
122
|
|
|
123
123
|
expect(listsSpy.occurrences[1]).toHaveProperty('iconPosition', 'after');
|
|
124
|
-
expect(listsSpy.occurrences[1]).toHaveProperty('iconSize', '
|
|
124
|
+
expect(listsSpy.occurrences[1]).toHaveProperty('iconSize', '2xl');
|
|
125
125
|
expect(listsSpy.occurrences[1]).toHaveProperty('itemsList', [
|
|
126
126
|
{ text: 'A', url: '/article/a' },
|
|
127
127
|
{ text: 'B', url: '/article/b' },
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
})
|
|
9
9
|
%}
|
|
10
10
|
{% call onsRelatedContentSection() %}
|
|
11
|
-
<p class="ons-u-mb-
|
|
11
|
+
<p class="ons-u-mb-2xs">Telephone: 0800 587 2021</p>
|
|
12
12
|
|
|
13
13
|
{{
|
|
14
14
|
onsList({
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}}
|
|
27
27
|
{% endcall %}
|
|
28
28
|
{% call onsRelatedContentSection() %}
|
|
29
|
-
<p class="ons-u-mb-
|
|
29
|
+
<p class="ons-u-mb-2xs">Live chat</p>
|
|
30
30
|
|
|
31
31
|
{{
|
|
32
32
|
onsList({
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
"rows": params.textarea.rows
|
|
15
15
|
})
|
|
16
16
|
}}
|
|
17
|
-
<div
|
|
17
|
+
<div
|
|
18
|
+
class="ons-grid ons-grid-flex ons-grid--gutterless ons-grid-flex--vertical-center ons-grid-flex--no-wrap@s ons-u-mt-l ons-u-mb-l"
|
|
19
|
+
>
|
|
18
20
|
<div class="ons-grid__col ons-u-mr-m ons-u-mb-s">
|
|
19
21
|
{{
|
|
20
22
|
onsButton({
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
{% endif %}
|
|
23
23
|
<ul class="ons-section-nav__list">
|
|
24
24
|
{% for item in section.itemsList %}
|
|
25
|
-
{% if (params.currentPath and item.url == params.currentPath) or (params.tabQuery and params.tabQuery == item.
|
|
25
|
+
{% if (params.currentPath and item.url == params.currentPath) or (params.tabQuery and params.tabQuery == item.text | lower) %}
|
|
26
26
|
{% set isCurrent = true %}
|
|
27
27
|
{% else %}
|
|
28
28
|
{% set isCurrent = false %}
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
{% if isCurrent == true %}
|
|
34
34
|
{{ openingHeadingTag | replace(headingLevel, sectionItemHeadingLevel | string) | safe }}
|
|
35
35
|
class="ons-section-nav__link ons-section-nav__item-header" href="{{ item.url }}"
|
|
36
|
-
aria-current="location">{{ item.
|
|
36
|
+
aria-current="location">{{ item.text }}{{ closingHeadingTag | replace(headingLevel, sectionItemHeadingLevel | string) | safe }}
|
|
37
37
|
{% else %}
|
|
38
|
-
<a class="ons-section-nav__link" href="{{ item.url }}">{{ item.
|
|
38
|
+
<a class="ons-section-nav__link" href="{{ item.url }}">{{ item.text }}</a>
|
|
39
39
|
{% endif %}
|
|
40
40
|
{% if item.anchors and isCurrent == true %}
|
|
41
|
-
<ul class="ons-section-nav__sub-items ons-list ons-list--dashed ons-u-mt-
|
|
41
|
+
<ul class="ons-section-nav__sub-items ons-list ons-list--dashed ons-u-mt-2xs ons-u-mb-2xs">
|
|
42
42
|
{% for anchor in item.anchors %}
|
|
43
43
|
<li class="ons-section-nav__item ons-list__item">
|
|
44
44
|
<a href="{{ anchor.url }}" class="ons-section-nav__link ons-list__link"
|
|
45
|
-
>{{ anchor.
|
|
45
|
+
>{{ anchor.text }}</a
|
|
46
46
|
>
|
|
47
47
|
</li>
|
|
48
48
|
{% endfor %}
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
<ul class="ons-section-nav__list">
|
|
63
63
|
{% for item in params.itemsList %}
|
|
64
64
|
{% set sectionItemHeadingLevel = headingLevel + 2 if params.title else headingLevel + 1 %}
|
|
65
|
-
{% if (params.currentPath and item.url == params.currentPath) or (params.tabQuery and params.tabQuery == item.
|
|
65
|
+
{% if (params.currentPath and item.url == params.currentPath) or (params.tabQuery and params.tabQuery == item.text | lower) %}
|
|
66
66
|
{% set isCurrent = true %}
|
|
67
67
|
{% else %}
|
|
68
68
|
{% set isCurrent = false %}
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
{% if isCurrent == true %}
|
|
74
74
|
{{ openingHeadingTag | replace(headingLevel, sectionItemHeadingLevel | string) | safe }}
|
|
75
75
|
class="ons-section-nav__link ons-section-nav__item-header" href="{{ item.url }}"
|
|
76
|
-
aria-current="location">{{ item.
|
|
76
|
+
aria-current="location">{{ item.text }}{{ closingHeadingTag | replace(headingLevel, sectionItemHeadingLevel | string) | safe }}
|
|
77
77
|
{% else %}
|
|
78
|
-
<a class="ons-section-nav__link" href="{{ item.url }}">{{ item.
|
|
78
|
+
<a class="ons-section-nav__link" href="{{ item.url }}">{{ item.text }}</a>
|
|
79
79
|
{% endif %}
|
|
80
80
|
{% if item.anchors %}
|
|
81
|
-
<ul class="ons-section-nav__sub-items ons-list ons-list--dashed ons-u-mt-
|
|
81
|
+
<ul class="ons-section-nav__sub-items ons-list ons-list--dashed ons-u-mt-2xs ons-u-mb-2xs">
|
|
82
82
|
{% for anchor in item.anchors %}
|
|
83
83
|
<li class="ons-section-nav__item ons-list__item">
|
|
84
|
-
<a href="{{ anchor.url }}" class="ons-section-nav__link ons-list__link">{{ anchor.
|
|
84
|
+
<a href="{{ anchor.url }}" class="ons-section-nav__link ons-list__link">{{ anchor.text }}</a>
|
|
85
85
|
</li>
|
|
86
86
|
{% endfor %}
|
|
87
87
|
</ul>
|
|
@@ -11,11 +11,11 @@ const EXAMPLE_SECTION_NAVIGATION = {
|
|
|
11
11
|
currentPath: '/results',
|
|
12
12
|
itemsList: [
|
|
13
13
|
{
|
|
14
|
-
|
|
14
|
+
text: 'Results',
|
|
15
15
|
url: '/results',
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
|
|
18
|
+
text: 'Dashboard',
|
|
19
19
|
url: '/results/dashboard',
|
|
20
20
|
},
|
|
21
21
|
],
|
|
@@ -26,29 +26,29 @@ const EXAMPLE_SECTION_NAVIGATION_VERTICAL = {
|
|
|
26
26
|
currentPath: '#section-2',
|
|
27
27
|
itemsList: [
|
|
28
28
|
{
|
|
29
|
-
|
|
29
|
+
text: 'Section 1',
|
|
30
30
|
url: '#section-1',
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
|
-
|
|
33
|
+
text: 'Section 2',
|
|
34
34
|
url: '#section-2',
|
|
35
35
|
anchors: [
|
|
36
36
|
{
|
|
37
|
-
|
|
37
|
+
text: 'Sub section 1',
|
|
38
38
|
url: '#sub-section-1',
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
|
-
|
|
41
|
+
text: 'Sub section 2',
|
|
42
42
|
url: '#sub-section-2',
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
|
-
|
|
45
|
+
text: 'Sub section 3',
|
|
46
46
|
url: '#sub-section-3',
|
|
47
47
|
},
|
|
48
48
|
],
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
|
|
51
|
+
text: 'Section 3',
|
|
52
52
|
url: '#0',
|
|
53
53
|
},
|
|
54
54
|
],
|
|
@@ -62,29 +62,29 @@ const EXAMPLE_SECTION_NAVIGATION_VERTICAL_WITH_SECTIONS = {
|
|
|
62
62
|
title: 'Section Title',
|
|
63
63
|
itemsList: [
|
|
64
64
|
{
|
|
65
|
-
|
|
65
|
+
text: 'Section 1',
|
|
66
66
|
url: '#section-1',
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
|
-
|
|
69
|
+
text: 'Section 2',
|
|
70
70
|
url: '#section-2',
|
|
71
71
|
anchors: [
|
|
72
72
|
{
|
|
73
|
-
|
|
73
|
+
text: 'Sub section 1',
|
|
74
74
|
url: '#sub-section-1',
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
|
-
|
|
77
|
+
text: 'Sub section 2',
|
|
78
78
|
url: '#sub-section-2',
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
|
-
|
|
81
|
+
text: 'Sub section 3',
|
|
82
82
|
url: '#sub-section-3',
|
|
83
83
|
},
|
|
84
84
|
],
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
|
-
|
|
87
|
+
text: 'Section 3',
|
|
88
88
|
url: '#0',
|
|
89
89
|
},
|
|
90
90
|
],
|
|
@@ -159,7 +159,7 @@ describe('macro: section-navigation', () => {
|
|
|
159
159
|
itemsList: [
|
|
160
160
|
{
|
|
161
161
|
classes: 'extra-class another-extra-class',
|
|
162
|
-
|
|
162
|
+
text: 'Section 1',
|
|
163
163
|
url: '#section-1',
|
|
164
164
|
},
|
|
165
165
|
],
|
|
@@ -23,13 +23,12 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
&__item {
|
|
26
|
-
font-size: 1rem;
|
|
27
26
|
padding: 0;
|
|
28
27
|
&--active {
|
|
29
28
|
border-left: 4px solid var(--ons-color-text-link-active);
|
|
30
29
|
font-weight: $font-weight-bold;
|
|
31
|
-
margin-left: -
|
|
32
|
-
padding-left:
|
|
30
|
+
margin-left: -1rem;
|
|
31
|
+
padding-left: 0.75rem;
|
|
33
32
|
a,
|
|
34
33
|
h2,
|
|
35
34
|
h3,
|
|
@@ -40,16 +39,12 @@
|
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
& & {
|
|
43
|
-
margin-bottom: 0.
|
|
42
|
+
margin-bottom: 0.25rem;
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
&__item-header {
|
|
48
47
|
@extend .ons-u-mb-no;
|
|
49
|
-
|
|
50
|
-
font-size: 1rem;
|
|
51
|
-
font-weight: 700;
|
|
52
|
-
line-height: 1.6;
|
|
53
48
|
}
|
|
54
49
|
|
|
55
50
|
&__sub-items {
|
package/components/section-navigation/example-section-navigation-single-vertical-with-title.njk
CHANGED
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
"title": "Sections title",
|
|
8
8
|
"itemsList": [
|
|
9
9
|
{
|
|
10
|
-
"
|
|
10
|
+
"text": "Section 1",
|
|
11
11
|
"url": "#section-1"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
|
-
"
|
|
14
|
+
"text": "Section 2",
|
|
15
15
|
"url": "#0"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"
|
|
18
|
+
"text": "Section 3",
|
|
19
19
|
"url": "#0"
|
|
20
20
|
}
|
|
21
21
|
]
|