@ons/design-system 58.0.2 → 59.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/components/access-code/uac.scss +1 -1
- package/components/autosuggest/_autosuggest.scss +1 -1
- package/components/button/_button.scss +3 -3
- package/components/download-resources/_download-resources.scss +1 -1
- package/components/fieldset/_fieldset.scss +2 -2
- package/components/hero/_hero.scss +1 -1
- package/components/navigation/_navigation.scss +1 -1
- package/components/panel/_panel.scss +1 -1
- package/components/summary/_summary.scss +2 -2
- package/components/table/_table.scss +3 -3
- package/components/video/_macro.njk +2 -2
- package/components/video/_macro.spec.js +28 -2
- package/css/census.css +3 -3
- package/css/ids.css +3 -3
- package/css/main.css +3 -3
- package/fonts/opensans-bold.woff +0 -0
- package/fonts/opensans-bold.woff2 +0 -0
- package/fonts/opensans-regular.woff +0 -0
- package/fonts/opensans-regular.woff2 +0 -0
- package/layout/_template.njk +4 -2
- package/package.json +1 -1
- package/scss/base/_typography.scss +1 -0
- package/scss/patternlib.scss +2 -1
- package/scss/utilities/_typography.scss +1 -1
- package/scss/vars/_colors.scss +1 -0
- package/scss/vars/_typography.scss +1 -1
|
@@ -139,7 +139,7 @@ $button-shadow-size: 3px;
|
|
|
139
139
|
&__inner {
|
|
140
140
|
background: var(--ons-color-button-secondary);
|
|
141
141
|
color: var(--ons-color-text);
|
|
142
|
-
font-weight:
|
|
142
|
+
font-weight: $font-weight-regular;
|
|
143
143
|
|
|
144
144
|
.ons-svg-icon {
|
|
145
145
|
fill: var(--ons-color-text);
|
|
@@ -187,7 +187,7 @@ $button-shadow-size: 3px;
|
|
|
187
187
|
border-radius: 0;
|
|
188
188
|
box-shadow: none;
|
|
189
189
|
color: var(--ons-color-text-link);
|
|
190
|
-
font-weight:
|
|
190
|
+
font-weight: $font-weight-regular;
|
|
191
191
|
padding: 0;
|
|
192
192
|
.ons-svg-icon {
|
|
193
193
|
fill: var(--ons-color-text-link);
|
|
@@ -445,7 +445,7 @@ $button-shadow-size: 3px;
|
|
|
445
445
|
color: var(--ons-color-branded-text);
|
|
446
446
|
display: block;
|
|
447
447
|
font-size: 1rem;
|
|
448
|
-
font-weight:
|
|
448
|
+
font-weight: $font-weight-regular;
|
|
449
449
|
padding: 0.6rem 1rem;
|
|
450
450
|
text-align: left;
|
|
451
451
|
|
|
@@ -35,7 +35,7 @@ $hub-row-spacing: 1.3rem;
|
|
|
35
35
|
@extend .ons-u-fs-m;
|
|
36
36
|
|
|
37
37
|
border-width: 2px;
|
|
38
|
-
font-weight:
|
|
38
|
+
font-weight: $font-weight-bold;
|
|
39
39
|
|
|
40
40
|
.ons-summary__values {
|
|
41
41
|
padding-top: 23px;
|
|
@@ -109,7 +109,7 @@ $hub-row-spacing: 1.3rem;
|
|
|
109
109
|
&__item--error & {
|
|
110
110
|
&__row-title--error {
|
|
111
111
|
color: var(--ons-color-errors);
|
|
112
|
-
font-weight:
|
|
112
|
+
font-weight: $font-weight-bold;
|
|
113
113
|
padding: $summary-row-spacing $summary-col-spacing;
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
&__caption {
|
|
12
|
-
font-weight:
|
|
12
|
+
font-weight: $font-weight-bold;
|
|
13
13
|
text-align: left;
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
&::before {
|
|
89
89
|
content: attr(data-th);
|
|
90
90
|
float: left;
|
|
91
|
-
font-weight:
|
|
91
|
+
font-weight: $font-weight-bold;
|
|
92
92
|
padding-right: 1rem;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
color: var(--ons-color-text-link);
|
|
199
199
|
display: inline-block;
|
|
200
200
|
font-family: $font-sans;
|
|
201
|
-
font-weight:
|
|
201
|
+
font-weight: $font-weight-bold;
|
|
202
202
|
line-height: 1rem;
|
|
203
203
|
padding: 0 0 0.2rem;
|
|
204
204
|
text-decoration: underline;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{%- macro onsVideo(params) -%}
|
|
2
2
|
<div class="ons-video">
|
|
3
|
-
{% if params.
|
|
4
|
-
<iframe title="{{ params.title }}" class="ons-video__iframe" src="{{ params.
|
|
3
|
+
{% if params.videoEmbedUrl %}
|
|
4
|
+
<iframe title="{{ params.title }}" class="ons-video__iframe" src="{{ params.videoEmbedUrl }}" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
|
5
5
|
{% endif %}
|
|
6
6
|
</div>
|
|
7
7
|
{%- endmacro -%}
|
|
@@ -6,10 +6,15 @@ import axe from '../../tests/helpers/axe';
|
|
|
6
6
|
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
|
title: 'Census 2021 promotional TV advert',
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
+
const EXAMPLE_VIDEO_VIMEO = {
|
|
14
|
+
videoEmbedUrl: 'https://player.vimeo.com/video/508878572',
|
|
15
|
+
title: 'A message from National Statistician Ian Diamond for National Apprenticeship Week 2021',
|
|
16
|
+
};
|
|
17
|
+
|
|
13
18
|
describe('macro: video', () => {
|
|
14
19
|
describe('mode: YouTube', () => {
|
|
15
20
|
it('passes jest-axe checks', async () => {
|
|
@@ -25,10 +30,31 @@ describe('macro: video', () => {
|
|
|
25
30
|
expect($('iframe').attr('title')).toBe('Census 2021 promotional TV advert');
|
|
26
31
|
});
|
|
27
32
|
|
|
28
|
-
it('outputs an <iframe> element with the provided `
|
|
33
|
+
it('outputs an <iframe> element with the provided `videoEmbedUrl`', () => {
|
|
29
34
|
const $ = cheerio.load(renderComponent('video', EXAMPLE_VIDEO_YOUTUBE));
|
|
30
35
|
|
|
31
36
|
expect($('iframe').attr('src')).toBe('https://www.youtube.com/embed/_EGJlvkgbPo');
|
|
32
37
|
});
|
|
33
38
|
});
|
|
39
|
+
|
|
40
|
+
describe('mode: Vimeo', () => {
|
|
41
|
+
it('passes jest-axe checks', async () => {
|
|
42
|
+
const $ = cheerio.load(renderComponent('video', EXAMPLE_VIDEO_VIMEO));
|
|
43
|
+
|
|
44
|
+
const results = await axe($.html());
|
|
45
|
+
expect(results).toHaveNoViolations();
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('outputs an <iframe> element with the provided `title`', () => {
|
|
49
|
+
const $ = cheerio.load(renderComponent('video', EXAMPLE_VIDEO_VIMEO));
|
|
50
|
+
|
|
51
|
+
expect($('iframe').attr('title')).toBe('A message from National Statistician Ian Diamond for National Apprenticeship Week 2021');
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('outputs an <iframe> element with the provided `videoEmbedUrl`', () => {
|
|
55
|
+
const $ = cheerio.load(renderComponent('video', EXAMPLE_VIDEO_VIMEO));
|
|
56
|
+
|
|
57
|
+
expect($('iframe').attr('src')).toBe('https://player.vimeo.com/video/508878572');
|
|
58
|
+
});
|
|
59
|
+
});
|
|
34
60
|
});
|