@ons/design-system 62.2.2 → 62.2.4
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/autosuggest/_macro.njk +1 -1
- package/components/autosuggest/_macro.spec.js +6 -0
- package/components/radios/_radio.scss +8 -6
- package/components/search/_macro.njk +1 -1
- package/components/search/_macro.spec.js +2 -2
- package/components/search/_search.scss +1 -8
- package/components/summary/example-summary-grouped-total.njk +3 -3
- package/components/table/_table.scss +1 -1
- package/components/tabs/_macro.njk +1 -1
- package/components/tabs/_macro.spec.js +3 -6
- package/components/tabs/example-tabs.njk +1 -0
- package/components/timeout-modal/example-timeout-modal.njk +2 -0
- package/css/main.css +1 -1
- package/package.json +2 -2
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<ul class="ons-autosuggest-input__listbox ons-js-autosuggest-listbox" title="{{ params.resultsTitle }}" role="listbox" id="{{ params.id }}-listbox" tabindex="-1"></ul>
|
|
42
42
|
</div>
|
|
43
43
|
<div class="ons-autosuggest-input__instructions ons-u-vh ons-js-autosuggest-instructions" id="{{ params.id }}-instructions" tabindex="-1">{{ params.instructions }}</div>
|
|
44
|
-
<div class="ons-autosuggest-input__status ons-u-vh ons-js-autosuggest-aria-status" aria-live="assertive" role="status" tabindex="-1"></div>
|
|
44
|
+
<div class="ons-autosuggest-input__status ons-u-vh ons-js-autosuggest-aria-status" aria-live="assertive" aria-atomic="true" role="status" tabindex="-1"></div>
|
|
45
45
|
{% endset %}
|
|
46
46
|
|
|
47
47
|
{{ onsInput({
|
|
@@ -216,6 +216,12 @@ describe('macro: autosuggest', () => {
|
|
|
216
216
|
expect($('.ons-autosuggest-input__instructions').attr('id')).toBe('country-of-birth-instructions');
|
|
217
217
|
});
|
|
218
218
|
|
|
219
|
+
it('adds aria-atomic=true value to status container', () => {
|
|
220
|
+
const $ = cheerio.load(renderComponent('autosuggest', EXAMPLE_AUTOSUGGEST));
|
|
221
|
+
|
|
222
|
+
expect($('.ons-autosuggest-input__status').attr('aria-atomic')).toBe('true');
|
|
223
|
+
});
|
|
224
|
+
|
|
219
225
|
it('renders instructions text', () => {
|
|
220
226
|
const $ = cheerio.load(renderComponent('autosuggest', EXAMPLE_AUTOSUGGEST));
|
|
221
227
|
|
|
@@ -9,13 +9,15 @@
|
|
|
9
9
|
box-shadow: inset 0 0 0 3px var(--ons-color-input-bg);
|
|
10
10
|
|
|
11
11
|
&::after {
|
|
12
|
-
|
|
12
|
+
background-color: var(--ons-color-input-border);
|
|
13
13
|
border-radius: 50%;
|
|
14
|
-
border-width:
|
|
15
|
-
height:
|
|
16
|
-
left:
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
border-width: 0;
|
|
15
|
+
height: 12px;
|
|
16
|
+
left: 50%;
|
|
17
|
+
margin-left: -6px;
|
|
18
|
+
margin-top: -6px;
|
|
19
|
+
top: 50%;
|
|
20
|
+
width: 12px;
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"html": buttonLabel,
|
|
21
21
|
"id": params.searchButton.id,
|
|
22
22
|
"variants": 'small',
|
|
23
|
-
"classes": 'ons-search__btn
|
|
23
|
+
"classes": 'ons-search__btn' + (" " + params.searchButton.classes if params.searchButton.classes else ""),
|
|
24
24
|
"attributes": params.searchButton.attributes,
|
|
25
25
|
"iconType": params.searchButton.iconType,
|
|
26
26
|
"iconPosition": 'only' if params.searchButton.visuallyHideButtonText == true else 'before'
|
|
@@ -35,7 +35,7 @@ describe('macro: search', () => {
|
|
|
35
35
|
type: 'button',
|
|
36
36
|
html: 'Search for address',
|
|
37
37
|
variants: 'small',
|
|
38
|
-
classes: 'ons-search__btn
|
|
38
|
+
classes: 'ons-search__btn extra-search-button-class',
|
|
39
39
|
attributes: EXAMPLE_SEARCH.searchButton.attributes,
|
|
40
40
|
iconType: 'search',
|
|
41
41
|
iconPosition: 'before',
|
|
@@ -61,7 +61,7 @@ describe('macro: search', () => {
|
|
|
61
61
|
type: 'button',
|
|
62
62
|
html: '<span class="ons-u-vh">Search for address</span>',
|
|
63
63
|
variants: 'small',
|
|
64
|
-
classes: 'ons-search__btn
|
|
64
|
+
classes: 'ons-search__btn',
|
|
65
65
|
iconPosition: 'only',
|
|
66
66
|
iconType: 'search',
|
|
67
67
|
});
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
.ons-search-component {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-flow: row wrap;
|
|
4
|
+
gap: 0.5rem;
|
|
4
5
|
|
|
5
6
|
@include mq(s) {
|
|
6
7
|
flex-flow: row nowrap !important;
|
|
7
8
|
}
|
|
8
|
-
.ons-search__btn {
|
|
9
|
-
margin-top: -3px;
|
|
10
|
-
}
|
|
11
|
-
.ons-search__btn {
|
|
12
|
-
@include mq(s) {
|
|
13
|
-
margin-left: 0.5rem;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
9
|
}
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"groupTitle": "Summary - Section Title",
|
|
9
9
|
"rows": [
|
|
10
10
|
{
|
|
11
|
-
"rowTitle": "Total value of acquisitions for transport assets and equipment",
|
|
12
11
|
"rowItems": [
|
|
13
12
|
{
|
|
13
|
+
"rowTitle": "Total value of acquisitions for transport assets and equipment",
|
|
14
14
|
"valueList": [
|
|
15
15
|
{
|
|
16
16
|
"text": "£9,000.00"
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
]
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"rowTitle": "Total value of acquisitions for computers and peripheral devices (hardware)",
|
|
31
30
|
"rowItems": [
|
|
32
31
|
{
|
|
32
|
+
"rowTitle": "Total value of acquisitions for computers and peripheral devices (hardware)",
|
|
33
33
|
"valueList": [
|
|
34
34
|
{
|
|
35
35
|
"text": "£225,000.00"
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
]
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
|
-
"rowTitle": "Grand total for value of acquisitions",
|
|
50
49
|
"total": true,
|
|
51
50
|
"rowItems": [
|
|
52
51
|
{
|
|
52
|
+
"rowTitle": "Grand total for value of acquisitions",
|
|
53
53
|
"valueList": [
|
|
54
54
|
{
|
|
55
55
|
"text": "£234,000.00"
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
}
|
|
113
113
|
&__content {
|
|
114
114
|
overflow: visible;
|
|
115
|
-
overflow-x:
|
|
115
|
+
overflow-x: auto;
|
|
116
116
|
width: 100%;
|
|
117
117
|
&:focus {
|
|
118
118
|
box-shadow: 0 0 0 3px var(--ons-color-page-light), 0 0 0 5px var(--ons-color-text-link-focus), 0 0 0 8px var(--ons-color-focus);
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
<ul class="ons-tabs__list">
|
|
17
17
|
{%- for tab in params.tabs -%}
|
|
18
|
-
<li class="ons-tab__list-item"><a href="#{{ tab.id if tab.id else 'tabId' ~ loop.index }}" class="ons-tab" data-ga="click" data-ga-category="tabs" data-ga-action="Show: {{ tab.title }}" data-ga-label="Show: {{ tab.title }}">{{ tab.title }}</a></li>
|
|
18
|
+
<li class="ons-tab__list-item"><a href="#{{ tab.id if tab.id else 'tabId' ~ loop.index }}" class="ons-tab" data-ga="click" data-ga-category="tabs" data-ga-action="Show: {{ tab.title }}" data-ga-label="Show: {{ tab.title }}">{{ tab.title }}{% if tab.hiddenSpan %}<span class='ons-u-d-no'>{{tab.hiddenSpan}}</span>{% endif %}</a></li>
|
|
19
19
|
{%- endfor -%}
|
|
20
20
|
</ul>
|
|
21
21
|
|
|
@@ -12,6 +12,7 @@ const EXAMPLE_TABS = {
|
|
|
12
12
|
id: 'first-tab',
|
|
13
13
|
title: 'Tab 1',
|
|
14
14
|
content: 'Example content...',
|
|
15
|
+
hiddenSpan: 'for Example',
|
|
15
16
|
},
|
|
16
17
|
{
|
|
17
18
|
id: 'second-tab',
|
|
@@ -91,14 +92,10 @@ describe('macro: tabs', () => {
|
|
|
91
92
|
expect($('.ons-tabs__panel:last').attr('id')).toBe('tabId2');
|
|
92
93
|
});
|
|
93
94
|
|
|
94
|
-
it('has expected label text in tab links', () => {
|
|
95
|
+
it('has expected label text in tab links and visually hidden span in tab 1', () => {
|
|
95
96
|
const $ = cheerio.load(renderComponent('tabs', EXAMPLE_TABS));
|
|
96
97
|
|
|
97
|
-
expect(
|
|
98
|
-
$('.ons-tab:first')
|
|
99
|
-
.text()
|
|
100
|
-
.trim(),
|
|
101
|
-
).toBe('Tab 1');
|
|
98
|
+
expect($('.ons-tab:first').html()).toBe('Tab 1<span class="ons-u-d-no">for Example</span>');
|
|
102
99
|
expect(
|
|
103
100
|
$('.ons-tab:last')
|
|
104
101
|
.text()
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
{
|
|
8
8
|
"id": "ukis",
|
|
9
9
|
"title": 'UKIS',
|
|
10
|
+
"hiddenSpan": 'for UKIS',
|
|
10
11
|
"content": '<h2 class="ons-u-d-no@m">UKIS</h2>
|
|
11
12
|
<h3>Aim of this survey</h3>
|
|
12
13
|
<p class="ons-u-fs-r">The aim of the UK Innovation Survey (UKIS) is to collect data from businesses about various aspects of their innovation related activities. Using this data we can measure the level, types and trends in innovation.</p>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{% from "components/timeout-modal/_macro.njk" import onsTimeoutModal %}
|
|
2
2
|
|
|
3
|
+
<div style="min-height:20rem;">
|
|
3
4
|
{{ onsTimeoutModal({
|
|
4
5
|
"showModalTimeInSeconds": 60,
|
|
5
6
|
"redirectUrl": "#!",
|
|
@@ -14,3 +15,4 @@
|
|
|
14
15
|
"secondsTextPlural": "seconds",
|
|
15
16
|
"endWithFullStop": true
|
|
16
17
|
}) }}
|
|
18
|
+
</div>
|