@ons/design-system 65.2.0 → 65.2.1
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 +1 -0
- package/components/access-code/example-access-code-error.njk +1 -1
- package/components/access-code/example-access-code.njk +1 -1
- package/components/accordion/example-accordion-open.njk +10 -10
- package/components/accordion/example-accordion.njk +1 -1
- package/components/address-input/example-address-input-editable.njk +2 -2
- package/components/address-input/example-address-input-manual.njk +3 -3
- package/components/address-input/example-address-input.njk +2 -2
- package/components/autosuggest/_macro.njk +1 -0
- package/components/autosuggest/autosuggest.js +2 -1
- package/components/autosuggest/autosuggest.spec.js +89 -55
- package/components/autosuggest/autosuggest.ui.js +8 -12
- package/components/autosuggest/example-autosuggest-country-multiple.njk +4 -3
- package/components/autosuggest/example-autosuggest-country.njk +1 -1
- package/components/back-link/example-back-link.njk +1 -1
- package/components/card/example-card-set-with-images.njk +3 -3
- package/components/card/example-card-set-with-lists.njk +3 -3
- package/components/card/example-card-set.njk +3 -3
- package/components/card/example-card.njk +1 -1
- package/components/checkboxes/example-checkboxes-disabled.njk +3 -3
- package/components/checkboxes/example-checkboxes-error.njk +7 -7
- package/components/checkboxes/example-checkboxes-with-descriptions.njk +7 -7
- package/components/checkboxes/example-checkboxes-with-hidden-label.njk +9 -9
- package/components/checkboxes/example-checkboxes-with-revealed-checkboxes-expanded.njk +8 -8
- package/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk +8 -8
- package/components/checkboxes/example-checkboxes-with-revealed-radios-expanded.njk +8 -8
- package/components/checkboxes/example-checkboxes-with-revealed-radios.njk +8 -8
- package/components/checkboxes/example-checkboxes-with-revealed-select-expanded.njk +4 -4
- package/components/checkboxes/example-checkboxes-with-revealed-select.njk +4 -4
- package/components/checkboxes/example-checkboxes-with-revealed-text-input-expanded.njk +6 -6
- package/components/checkboxes/example-checkboxes-with-revealed-text-input.njk +6 -6
- package/components/checkboxes/example-checkboxes-with-select-all-button.njk +4 -4
- package/components/checkboxes/example-checkboxes-with-visible-text-input.njk +6 -6
- package/components/checkboxes/example-checkboxes-without-border.njk +3 -3
- package/components/checkboxes/example-checkboxes.njk +4 -4
- package/components/date-input/example-date-input-error.njk +2 -2
- package/components/date-input/example-date-input.njk +1 -1
- package/components/details/example-details-with-warning.njk +1 -1
- package/components/details/example-details.njk +1 -1
- package/components/duration/example-duration-error.njk +6 -6
- package/components/duration/example-duration.njk +5 -5
- package/components/header/example-header-external-with-service-links.njk +1 -1
- package/components/header/example-header-internal.njk +1 -1
- package/components/input/example-input-email.njk +1 -1
- package/components/input/example-input-number.njk +1 -1
- package/components/input/example-input-numeric-values.njk +7 -7
- package/components/input/example-input-text-with-character-limit-checker.njk +1 -1
- package/components/input/example-input-text-with-description.njk +1 -1
- package/components/input/example-input-text.njk +1 -1
- package/components/mutually-exclusive/example-mutually-exclusive-checkboxes.njk +6 -6
- package/components/mutually-exclusive/example-mutually-exclusive-date-with-error.njk +2 -2
- package/components/mutually-exclusive/example-mutually-exclusive-email.njk +2 -2
- package/components/mutually-exclusive/example-mutually-exclusive-multiple-options.njk +5 -5
- package/components/radios/example-radios-with-clear-button-expanded.njk +9 -9
- package/components/radios/example-radios-with-clear-button.njk +9 -9
- package/components/radios/example-radios-with-descriptions.njk +5 -5
- package/components/radios/example-radios-with-error.njk +4 -4
- package/components/radios/example-radios-with-revealed-checkboxes-expanded.njk +8 -8
- package/components/radios/example-radios-with-revealed-checkboxes.njk +8 -8
- package/components/radios/example-radios-with-revealed-radios-expanded.njk +9 -9
- package/components/radios/example-radios-with-revealed-radios.njk +8 -8
- package/components/radios/example-radios-with-revealed-select-expanded.njk +5 -5
- package/components/radios/example-radios-with-revealed-select.njk +4 -4
- package/components/radios/example-radios-with-revealed-text-input-expanded.njk +9 -9
- package/components/radios/example-radios-with-revealed-text-input.njk +9 -9
- package/components/radios/example-radios-with-visible-text-input.njk +3 -3
- package/components/relationships/example-relationships-error.njk +13 -13
- package/components/relationships/example-relationships-you.njk +13 -13
- package/components/relationships/example-relationships.njk +13 -13
- package/components/select/example-select-with-error.njk +1 -1
- package/components/select/example-select-with-inline-label.njk +1 -1
- package/components/select/example-select.njk +1 -1
- package/components/textarea/example-textarea-error.njk +1 -1
- package/components/upload/example-upload-error.njk +1 -1
- package/components/upload/example-upload.njk +1 -1
- package/package.json +2 -3
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +1 -1
|
@@ -64,6 +64,7 @@ export default class AutosuggestUI {
|
|
|
64
64
|
this.errorAPI = errorAPI || context.getAttribute('data-error-api');
|
|
65
65
|
this.errorAPILinkText = errorAPILinkText || context.getAttribute('data-error-api-link-text');
|
|
66
66
|
this.typeMore = typeMore || context.getAttribute('data-type-more');
|
|
67
|
+
this.language = context.getAttribute('data-lang');
|
|
67
68
|
this.allowMultiple = context.getAttribute('data-allow-multiple') || false;
|
|
68
69
|
this.listboxId = this.listbox.getAttribute('id');
|
|
69
70
|
this.resultLimit = resultLimit || 10;
|
|
@@ -104,7 +105,7 @@ export default class AutosuggestUI {
|
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
get lang() {
|
|
107
|
-
return document.documentElement.getAttribute('lang').toLowerCase();
|
|
108
|
+
return !this.language ? document.documentElement.getAttribute('lang').toLowerCase() : this.language.toLowerCase();
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
initialiseUI() {
|
|
@@ -261,7 +262,7 @@ export default class AutosuggestUI {
|
|
|
261
262
|
getSuggestions(force, groupResults) {
|
|
262
263
|
if (!this.settingResult) {
|
|
263
264
|
if (this.allowMultiple === 'true' && this.allSelections.length) {
|
|
264
|
-
const newQuery = this.input.value.split(', ').find(item => !this.allSelections.includes(item));
|
|
265
|
+
const newQuery = this.input.value.split(', ').find((item) => !this.allSelections.includes(item));
|
|
265
266
|
this.query = newQuery ? newQuery : this.input.value;
|
|
266
267
|
} else {
|
|
267
268
|
this.query = this.input.value;
|
|
@@ -276,7 +277,7 @@ export default class AutosuggestUI {
|
|
|
276
277
|
if (this.sanitisedQuery.length >= this.minChars) {
|
|
277
278
|
this.fetchSuggestions(this.sanitisedQuery, this.data, groupResults)
|
|
278
279
|
.then(this.handleResults.bind(this))
|
|
279
|
-
.catch(error => {
|
|
280
|
+
.catch((error) => {
|
|
280
281
|
if (error.name !== 'AbortError') {
|
|
281
282
|
console.log('error:', error);
|
|
282
283
|
this.handleNoResults(500);
|
|
@@ -292,7 +293,7 @@ export default class AutosuggestUI {
|
|
|
292
293
|
async fetchSuggestions(sanitisedQuery, data) {
|
|
293
294
|
this.abortFetch();
|
|
294
295
|
const results = await runFuse(sanitisedQuery, data, this.lang, this.resultLimit);
|
|
295
|
-
results.forEach(result => {
|
|
296
|
+
results.forEach((result) => {
|
|
296
297
|
result.sanitisedText = sanitiseAutosuggestText(result[this.lang], this.sanitisedQueryReplaceChars);
|
|
297
298
|
});
|
|
298
299
|
return {
|
|
@@ -520,14 +521,14 @@ export default class AutosuggestUI {
|
|
|
520
521
|
}
|
|
521
522
|
|
|
522
523
|
storeExistingSelections(value) {
|
|
523
|
-
this.currentSelections = this.input.value.split(', ').filter(items => this.allSelections.includes(items));
|
|
524
|
+
this.currentSelections = this.input.value.split(', ').filter((items) => this.allSelections.includes(items));
|
|
524
525
|
this.allSelections = [];
|
|
525
526
|
if (this.currentSelections.length) {
|
|
526
527
|
this.allSelections = this.currentSelections;
|
|
527
528
|
}
|
|
528
529
|
this.allSelections.push(value);
|
|
529
530
|
|
|
530
|
-
this.allSelections = this.allSelections.filter(function(value, index, array) {
|
|
531
|
+
this.allSelections = this.allSelections.filter(function (value, index, array) {
|
|
531
532
|
return array.indexOf(value) == index;
|
|
532
533
|
});
|
|
533
534
|
|
|
@@ -535,12 +536,7 @@ export default class AutosuggestUI {
|
|
|
535
536
|
}
|
|
536
537
|
|
|
537
538
|
emboldenMatch(string, query) {
|
|
538
|
-
let reg = new RegExp(
|
|
539
|
-
this.escapeRegExp(query)
|
|
540
|
-
.split(' ')
|
|
541
|
-
.join('[\\s,]*'),
|
|
542
|
-
'gi',
|
|
543
|
-
);
|
|
539
|
+
let reg = new RegExp(this.escapeRegExp(query).split(' ').join('[\\s,]*'), 'gi');
|
|
544
540
|
|
|
545
541
|
return string.replace(reg, '<strong>$&</strong>');
|
|
546
542
|
}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
<div class="ons-grid__col ons-col-8@m">
|
|
5
5
|
|
|
6
6
|
{{ onsAutosuggest({
|
|
7
|
-
"id": "country-of-birth",
|
|
7
|
+
"id": "country-of-birth-autosuggest-multiple",
|
|
8
8
|
"label": {
|
|
9
9
|
"text": "Passport",
|
|
10
|
-
"id": "country-of-birth-label",
|
|
10
|
+
"id": "country-of-birth-label-multiple",
|
|
11
11
|
"description": "Enter your own answer or select from suggestions. You can enter multiple countries if you have a passport for more than one."
|
|
12
12
|
},
|
|
13
13
|
"autocomplete": "off",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"allowMultiple": true,
|
|
24
24
|
"autosuggestData": "/examples/data/country-of-birth.json",
|
|
25
25
|
"noResults": "No suggestions found. You can enter your own answer",
|
|
26
|
-
"typeMore": "Continue entering to get suggestions"
|
|
26
|
+
"typeMore": "Continue entering to get suggestions",
|
|
27
|
+
"language": "en"
|
|
27
28
|
}) }}
|
|
28
29
|
|
|
29
30
|
</div>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
<div class="ons-grid__col ons-col-4@m">
|
|
7
7
|
{{ onsCard({
|
|
8
|
-
"id": '
|
|
8
|
+
"id": 'card-with-image-1',
|
|
9
9
|
"textId": 'text1',
|
|
10
10
|
"title": 'About the census',
|
|
11
11
|
"url": '#0',
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
<div class="ons-grid__col ons-col-4@m">
|
|
18
18
|
{{ onsCard({
|
|
19
|
-
"id": '
|
|
19
|
+
"id": 'card-with-image-2',
|
|
20
20
|
"textId": 'text2',
|
|
21
21
|
"title": 'Working on the census',
|
|
22
22
|
"url": '#0',
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
<div class="ons-grid__col ons-col-4@m">
|
|
29
29
|
{{ onsCard({
|
|
30
|
-
"id": '
|
|
30
|
+
"id": 'card-with-image-3',
|
|
31
31
|
"textId": 'text3',
|
|
32
32
|
"title": 'Your data and security',
|
|
33
33
|
"url": '#0',
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
<div class="ons-grid__col ons-col-4@m">
|
|
7
7
|
{{ onsCard({
|
|
8
|
-
"id": '
|
|
8
|
+
"id": 'card-with-list-1',
|
|
9
9
|
"textId": 'text1',
|
|
10
10
|
"title": 'About the census',
|
|
11
11
|
"url": '#0',
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
<div class="ons-grid__col ons-col-4@m">
|
|
27
27
|
{{ onsCard({
|
|
28
|
-
"id": '
|
|
28
|
+
"id": 'card-with-list-2',
|
|
29
29
|
"textId": 'text2',
|
|
30
30
|
"title": 'Working on the census',
|
|
31
31
|
"url": '#0',
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
<div class="ons-grid__col ons-col-4@m">
|
|
47
47
|
{{ onsCard({
|
|
48
|
-
"id": '
|
|
48
|
+
"id": 'card-with-list-3',
|
|
49
49
|
"textId": 'text3',
|
|
50
50
|
"title": 'Your data and security',
|
|
51
51
|
"url": '#0',
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
<div class="ons-grid__col ons-col-4@m">
|
|
7
7
|
{{ onsCard({
|
|
8
|
-
"id": '
|
|
8
|
+
"id": 'card-set-1',
|
|
9
9
|
"textId": 'text1',
|
|
10
10
|
"title": 'About the census',
|
|
11
11
|
"url": '#0',
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
<div class="ons-grid__col ons-col-4@m">
|
|
17
17
|
{{ onsCard({
|
|
18
|
-
"id": '
|
|
18
|
+
"id": 'card-set-2',
|
|
19
19
|
"textId": 'text2',
|
|
20
20
|
"title": 'Working on the census',
|
|
21
21
|
"url": '#0',
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
<div class="ons-grid__col ons-col-4@m">
|
|
27
27
|
{{ onsCard({
|
|
28
|
-
"id": '
|
|
28
|
+
"id": 'card-set-3',
|
|
29
29
|
"textId": 'text3',
|
|
30
30
|
"title": 'Your data and security',
|
|
31
31
|
"url": '#0',
|
|
@@ -8,21 +8,21 @@
|
|
|
8
8
|
"name": "dietary",
|
|
9
9
|
"checkboxes": [
|
|
10
10
|
{
|
|
11
|
-
"id": "data",
|
|
11
|
+
"id": "data-checkbox-disabled",
|
|
12
12
|
"label": {
|
|
13
13
|
"text": "Data (309)"
|
|
14
14
|
},
|
|
15
15
|
"value": "data"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"id": "publications",
|
|
18
|
+
"id": "publications-checkbox-disabled",
|
|
19
19
|
"label": {
|
|
20
20
|
"text": "Publications (137)"
|
|
21
21
|
},
|
|
22
22
|
"value": "publications"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
"id": "areas",
|
|
25
|
+
"id": "areas-checkbox-disabled",
|
|
26
26
|
"label": {
|
|
27
27
|
"text": "Areas (0)"
|
|
28
28
|
},
|
|
@@ -8,42 +8,42 @@
|
|
|
8
8
|
"dontWrap": true,
|
|
9
9
|
"checkboxes": [
|
|
10
10
|
{
|
|
11
|
-
"id": "gluten-free",
|
|
11
|
+
"id": "gluten-free-checkbox-error",
|
|
12
12
|
"label": {
|
|
13
13
|
"text": "Gluten free"
|
|
14
14
|
},
|
|
15
15
|
"value": "gluten-free"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"id": "lactose-intolerant",
|
|
18
|
+
"id": "lactose-intolerant-checkbox-error",
|
|
19
19
|
"label": {
|
|
20
20
|
"text": "Lactose intolerant"
|
|
21
21
|
},
|
|
22
22
|
"value": "lactose-intolerant"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
"id": "vegan",
|
|
25
|
+
"id": "vegan-checkbox-error",
|
|
26
26
|
"label": {
|
|
27
27
|
"text": "Vegan"
|
|
28
28
|
},
|
|
29
29
|
"value": "vegan"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
-
"id": "vegetarian",
|
|
32
|
+
"id": "vegetarian-checkbox-error",
|
|
33
33
|
"label": {
|
|
34
34
|
"text": "Vegetarian"
|
|
35
35
|
},
|
|
36
36
|
"value": "vegetarian"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
"id": "other-checkbox",
|
|
39
|
+
"id": "other-checkbox-error",
|
|
40
40
|
"label": {
|
|
41
41
|
"text": "Other"
|
|
42
42
|
},
|
|
43
43
|
"checked": true,
|
|
44
44
|
"value": "other",
|
|
45
45
|
"other": {
|
|
46
|
-
"id": "other-textbox",
|
|
46
|
+
"id": "other-textbox-checbox-error",
|
|
47
47
|
"name": "other-answer",
|
|
48
48
|
"label": {
|
|
49
49
|
"text": "Enter dietary requirements"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
],
|
|
54
54
|
"error": {
|
|
55
55
|
"classes": "test",
|
|
56
|
-
"id": "dietary-error",
|
|
56
|
+
"id": "dietary-error-checkbox",
|
|
57
57
|
"text": "Enter your dietary requirements"
|
|
58
58
|
}
|
|
59
59
|
})
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"name": "central-heating",
|
|
14
14
|
"checkboxes": [
|
|
15
15
|
{
|
|
16
|
-
"id": "none",
|
|
16
|
+
"id": "none-checkbox-with-description",
|
|
17
17
|
"label": {
|
|
18
18
|
"text": "No central heating"
|
|
19
19
|
},
|
|
20
20
|
"name": "none"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
"id": "mains-gas",
|
|
23
|
+
"id": "mains-gas-checkbox-with-description",
|
|
24
24
|
"label": {
|
|
25
25
|
"text": "Gas",
|
|
26
26
|
"description": "Including tank or bottled gas"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"name": "mains-gas"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
"id": "electric",
|
|
31
|
+
"id": "electric-checkbox-with-description",
|
|
32
32
|
"label": {
|
|
33
33
|
"text": "Electric",
|
|
34
34
|
"description": "Including storage headers"
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"name": "electric"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
"id": "oil",
|
|
39
|
+
"id": "oil-checkbox-with-description",
|
|
40
40
|
"label": {
|
|
41
41
|
"text": "Oil"
|
|
42
42
|
},
|
|
43
43
|
"name": "oil"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
-
"id": "wood",
|
|
46
|
+
"id": "wood-checkbox-with-description",
|
|
47
47
|
"label": {
|
|
48
48
|
"text": "Wood",
|
|
49
49
|
"description": "For example, logs, waste wood or pellets"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"name": "wood"
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
"id": "solid-fuel",
|
|
54
|
+
"id": "solid-fuel-checkbox-with-description",
|
|
55
55
|
"label": {
|
|
56
56
|
"text": "Solid fuel",
|
|
57
57
|
"description": "For example, coal"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"name": "solid-fuel"
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
|
-
"id": "renewable",
|
|
62
|
+
"id": "renewable-checkbox-with-description",
|
|
63
63
|
"label": {
|
|
64
64
|
"text": "Renewable energy",
|
|
65
65
|
"description": "For example, solar thermal or heat pumps"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
<td class="ons-table__cell">
|
|
41
41
|
{{
|
|
42
42
|
onsCheckbox({
|
|
43
|
-
"id": "surveys-view",
|
|
43
|
+
"id": "surveys-view-example-checkbox-with-hidden-label",
|
|
44
44
|
"hideLabel": true,
|
|
45
45
|
"label": {
|
|
46
46
|
"text": "View surveys"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<td class="ons-table__cell" colspan="2">
|
|
55
55
|
{{
|
|
56
56
|
onsCheckbox({
|
|
57
|
-
"id": "surveys-edit",
|
|
57
|
+
"id": "surveys-edit-example-checkbox-with-hidden-label",
|
|
58
58
|
"hideLabel": true,
|
|
59
59
|
"label": {
|
|
60
60
|
"text": "Edit surveys"
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
<td class="ons-table__cell">
|
|
72
72
|
{{
|
|
73
73
|
onsCheckbox({
|
|
74
|
-
"id": "reporting-units-view",
|
|
74
|
+
"id": "reporting-units-view-example-checkbox-with-hidden-label",
|
|
75
75
|
"hideLabel": true,
|
|
76
76
|
"label": {
|
|
77
77
|
"text": "View reporting units"
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<td class="ons-table__cell" colspan="2">
|
|
86
86
|
{{
|
|
87
87
|
onsCheckbox({
|
|
88
|
-
"id": "reporting-units-edit",
|
|
88
|
+
"id": "reporting-units-edit-example-checkbox-with-hidden-label",
|
|
89
89
|
"hideLabel": true,
|
|
90
90
|
"label": {
|
|
91
91
|
"text": "Edit reporting units"
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
<td class="ons-table__cell">
|
|
103
103
|
{{
|
|
104
104
|
onsCheckbox({
|
|
105
|
-
"id": "respondents-view",
|
|
105
|
+
"id": "respondents-view-example-checkbox-with-hidden-label",
|
|
106
106
|
"hideLabel": true,
|
|
107
107
|
"label": {
|
|
108
108
|
"text": "View respondents"
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<td class="ons-table__cell">
|
|
117
117
|
{{
|
|
118
118
|
onsCheckbox({
|
|
119
|
-
"id": "respondents-edit",
|
|
119
|
+
"id": "respondents-edit-example-checkbox-with-hidden-label",
|
|
120
120
|
"hideLabel": true,
|
|
121
121
|
"label": {
|
|
122
122
|
"text": "Edit respondents"
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
<td class="ons-table__cell">
|
|
130
130
|
{{
|
|
131
131
|
onsCheckbox({
|
|
132
|
-
"id": "respondents-delete",
|
|
132
|
+
"id": "respondents-delete-example-checkbox-with-hidden-label",
|
|
133
133
|
"hideLabel": true,
|
|
134
134
|
"label": {
|
|
135
135
|
"text": "Delete respondents"
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
<td class="ons-table__cell">
|
|
147
147
|
{{
|
|
148
148
|
onsCheckbox({
|
|
149
|
-
"id": "messages-view",
|
|
149
|
+
"id": "messages-view-example-checkbox-with-hidden-label",
|
|
150
150
|
"hideLabel": true,
|
|
151
151
|
"label": {
|
|
152
152
|
"text": "View messages"
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
<td class="ons-table__cell" colspan="2">
|
|
161
161
|
{{
|
|
162
162
|
onsCheckbox({
|
|
163
|
-
"id": "messages-edit",
|
|
163
|
+
"id": "messages-edit-example-checkbox-with-hidden-label",
|
|
164
164
|
"hideLabel": true,
|
|
165
165
|
"label": {
|
|
166
166
|
"text": "Edit messages"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"name": "dietary",
|
|
9
9
|
"checkboxes": [
|
|
10
10
|
{
|
|
11
|
-
"id": "data",
|
|
11
|
+
"id": "data-example-checkbox-with-revealed-checkboxes-expanded",
|
|
12
12
|
"label": {
|
|
13
13
|
"text": "Data (309)"
|
|
14
14
|
},
|
|
@@ -22,21 +22,21 @@
|
|
|
22
22
|
"name": "name",
|
|
23
23
|
"checkboxes": [
|
|
24
24
|
{
|
|
25
|
-
"id": "datasets",
|
|
25
|
+
"id": "datasets-example-checkbox-with-revealed-checkboxes-expanded",
|
|
26
26
|
"label": {
|
|
27
27
|
"text": "Datasets (100)"
|
|
28
28
|
},
|
|
29
29
|
"value": "datasets"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
-
"id": "timeseries",
|
|
32
|
+
"id": "timeseries-example-checkbox-with-revealed-checkboxes-expanded",
|
|
33
33
|
"label": {
|
|
34
34
|
"text": "Timeseries (20)"
|
|
35
35
|
},
|
|
36
36
|
"value": "timeseries"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
"id": "requested",
|
|
39
|
+
"id": "requested-example-checkbox-with-revealed-checkboxes-expanded",
|
|
40
40
|
"label": {
|
|
41
41
|
"text": "User requested data (17)"
|
|
42
42
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
|
-
"id": "publications",
|
|
49
|
+
"id": "publications-example-checkbox-with-revealed-checkboxes-expanded",
|
|
50
50
|
"label": {
|
|
51
51
|
"text": "Publications (137)"
|
|
52
52
|
},
|
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
"name": "name",
|
|
61
61
|
"checkboxes": [
|
|
62
62
|
{
|
|
63
|
-
"id": "press-release",
|
|
63
|
+
"id": "press-release-example-checkbox-with-revealed-checkboxes-expanded",
|
|
64
64
|
"label": {
|
|
65
65
|
"text": "Press release (100)"
|
|
66
66
|
},
|
|
67
67
|
"value": "pressrelease"
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
|
-
"id": "bulletin",
|
|
70
|
+
"id": "bulletin-example-checkbox-with-revealed-checkboxes-expanded",
|
|
71
71
|
"label": {
|
|
72
72
|
"text": "Bulletin (20)"
|
|
73
73
|
},
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
|
-
"id": "areas",
|
|
80
|
+
"id": "areas-example-checkbox-with-revealed-checkboxes-expanded",
|
|
81
81
|
"label": {
|
|
82
82
|
"text": "Areas (0)"
|
|
83
83
|
},
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"name": "dietary",
|
|
9
9
|
"checkboxes": [
|
|
10
10
|
{
|
|
11
|
-
"id": "data",
|
|
11
|
+
"id": "data-example-with-revealed-checkboxes",
|
|
12
12
|
"label": {
|
|
13
13
|
"text": "Data (309)"
|
|
14
14
|
},
|
|
@@ -21,21 +21,21 @@
|
|
|
21
21
|
"name": "name",
|
|
22
22
|
"checkboxes": [
|
|
23
23
|
{
|
|
24
|
-
"id": "datasets",
|
|
24
|
+
"id": "datasets-example-with-revealed-checkboxes",
|
|
25
25
|
"label": {
|
|
26
26
|
"text": "Datasets (100)"
|
|
27
27
|
},
|
|
28
28
|
"value": "datasets"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
"id": "timeseries",
|
|
31
|
+
"id": "timeseries-example-with-revealed-checkboxes",
|
|
32
32
|
"label": {
|
|
33
33
|
"text": "Timeseries (20)"
|
|
34
34
|
},
|
|
35
35
|
"value": "timeseries"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
"id": "requested",
|
|
38
|
+
"id": "requested-example-with-revealed-checkboxes",
|
|
39
39
|
"label": {
|
|
40
40
|
"text": "User requested data (17)"
|
|
41
41
|
},
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
|
-
"id": "publications",
|
|
48
|
+
"id": "publications-example-with-revealed-checkboxes",
|
|
49
49
|
"label": {
|
|
50
50
|
"text": "Publications (137)"
|
|
51
51
|
},
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"name": "name",
|
|
59
59
|
"checkboxes": [
|
|
60
60
|
{
|
|
61
|
-
"id": "press-release",
|
|
61
|
+
"id": "press-release-example-with-revealed-checkboxes",
|
|
62
62
|
"label": {
|
|
63
63
|
"text": "Press release (100)"
|
|
64
64
|
},
|
|
65
65
|
"value": "pressrelease"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
|
-
"id": "bulletin",
|
|
68
|
+
"id": "bulletin-example-with-revealed-checkboxes",
|
|
69
69
|
"label": {
|
|
70
70
|
"text": "Bulletin (20)"
|
|
71
71
|
},
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
|
-
"id": "areas",
|
|
78
|
+
"id": "areas-example-with-revealed-checkboxes",
|
|
79
79
|
"label": {
|
|
80
80
|
"text": "Areas (0)"
|
|
81
81
|
},
|
|
@@ -8,21 +8,21 @@
|
|
|
8
8
|
"borderless": true,
|
|
9
9
|
"checkboxes": [
|
|
10
10
|
{
|
|
11
|
-
"id": "post",
|
|
11
|
+
"id": "post-example-with-revealed-radios-expanded",
|
|
12
12
|
"label": {
|
|
13
13
|
"text": "By post"
|
|
14
14
|
},
|
|
15
15
|
"value": "post"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"id": "email",
|
|
18
|
+
"id": "email-example-with-revealed-radios-expanded",
|
|
19
19
|
"label": {
|
|
20
20
|
"text": "By email"
|
|
21
21
|
},
|
|
22
22
|
"value": "email"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
"id": "phone",
|
|
25
|
+
"id": "phone-example-with-revealed-radios-expanded",
|
|
26
26
|
"label": {
|
|
27
27
|
"text": "By phone"
|
|
28
28
|
},
|
|
@@ -30,34 +30,34 @@
|
|
|
30
30
|
"checked": true,
|
|
31
31
|
"other": {
|
|
32
32
|
"otherType": "radios",
|
|
33
|
-
"id": "phone-time",
|
|
33
|
+
"id": "phone-time-example-with-revealed-radios-expanded",
|
|
34
34
|
"name": "phone-time",
|
|
35
35
|
"legend": "Choose preferred time of day",
|
|
36
36
|
"radios": [
|
|
37
37
|
{
|
|
38
38
|
"value": "anytime",
|
|
39
|
-
"id": "anytime",
|
|
39
|
+
"id": "anytime-example-with-revealed-radios-expanded",
|
|
40
40
|
"label": {
|
|
41
41
|
"text": "Any time of day"
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"value": "morning",
|
|
46
|
-
"id": "morning",
|
|
46
|
+
"id": "morning-example-with-revealed-radios-expanded",
|
|
47
47
|
"label": {
|
|
48
48
|
"text": "Morning"
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"value": "afternoon",
|
|
53
|
-
"id": "afternoon",
|
|
53
|
+
"id": "afternoon-example-with-revealed-radios-expanded",
|
|
54
54
|
"label": {
|
|
55
55
|
"text": "Afternoon"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
"value": "evening",
|
|
60
|
-
"id": "evening",
|
|
60
|
+
"id": "evening-example-with-revealed-radios-expanded",
|
|
61
61
|
"label": {
|
|
62
62
|
"text": "Evening"
|
|
63
63
|
}
|