@ons/design-system 65.2.0 → 65.2.2

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.
Files changed (101) hide show
  1. package/README.md +1 -0
  2. package/components/access-code/example-access-code-error.njk +1 -1
  3. package/components/access-code/example-access-code.njk +1 -1
  4. package/components/accordion/example-accordion-open.njk +10 -10
  5. package/components/accordion/example-accordion.njk +1 -1
  6. package/components/address-input/example-address-input-editable.njk +2 -2
  7. package/components/address-input/example-address-input-manual.njk +3 -3
  8. package/components/address-input/example-address-input.njk +2 -2
  9. package/components/autosuggest/_macro.njk +1 -0
  10. package/components/autosuggest/autosuggest.js +2 -1
  11. package/components/autosuggest/autosuggest.spec.js +89 -55
  12. package/components/autosuggest/autosuggest.ui.js +8 -12
  13. package/components/autosuggest/example-autosuggest-country-multiple.njk +4 -3
  14. package/components/autosuggest/example-autosuggest-country.njk +1 -1
  15. package/components/back-link/example-back-link.njk +1 -1
  16. package/components/breadcrumbs/_macro.njk +1 -1
  17. package/components/breadcrumbs/_macro.spec.js +5 -5
  18. package/components/card/example-card-set-with-images.njk +3 -3
  19. package/components/card/example-card-set-with-lists.njk +3 -3
  20. package/components/card/example-card-set.njk +3 -3
  21. package/components/card/example-card.njk +1 -1
  22. package/components/checkboxes/example-checkboxes-disabled.njk +3 -3
  23. package/components/checkboxes/example-checkboxes-error.njk +7 -7
  24. package/components/checkboxes/example-checkboxes-with-descriptions.njk +7 -7
  25. package/components/checkboxes/example-checkboxes-with-hidden-label.njk +9 -9
  26. package/components/checkboxes/example-checkboxes-with-revealed-checkboxes-expanded.njk +8 -8
  27. package/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk +8 -8
  28. package/components/checkboxes/example-checkboxes-with-revealed-radios-expanded.njk +8 -8
  29. package/components/checkboxes/example-checkboxes-with-revealed-radios.njk +8 -8
  30. package/components/checkboxes/example-checkboxes-with-revealed-select-expanded.njk +4 -4
  31. package/components/checkboxes/example-checkboxes-with-revealed-select.njk +4 -4
  32. package/components/checkboxes/example-checkboxes-with-revealed-text-input-expanded.njk +6 -6
  33. package/components/checkboxes/example-checkboxes-with-revealed-text-input.njk +6 -6
  34. package/components/checkboxes/example-checkboxes-with-select-all-button.njk +4 -4
  35. package/components/checkboxes/example-checkboxes-with-visible-text-input.njk +6 -6
  36. package/components/checkboxes/example-checkboxes-without-border.njk +3 -3
  37. package/components/checkboxes/example-checkboxes.njk +4 -4
  38. package/components/cookies-banner/_macro.njk +55 -41
  39. package/components/cookies-banner/_macro.spec.js +9 -27
  40. package/components/date-input/example-date-input-error.njk +2 -2
  41. package/components/date-input/example-date-input.njk +1 -1
  42. package/components/details/example-details-with-warning.njk +1 -1
  43. package/components/details/example-details.njk +1 -1
  44. package/components/duration/example-duration-error.njk +6 -6
  45. package/components/duration/example-duration.njk +5 -5
  46. package/components/header/example-header-external-with-service-links.njk +1 -1
  47. package/components/header/example-header-internal.njk +1 -1
  48. package/components/input/example-input-email.njk +1 -1
  49. package/components/input/example-input-number.njk +1 -1
  50. package/components/input/example-input-numeric-values.njk +7 -7
  51. package/components/input/example-input-text-with-character-limit-checker.njk +1 -1
  52. package/components/input/example-input-text-with-description.njk +1 -1
  53. package/components/input/example-input-text.njk +1 -1
  54. package/components/mutually-exclusive/example-mutually-exclusive-checkboxes.njk +6 -6
  55. package/components/mutually-exclusive/example-mutually-exclusive-date-with-error.njk +2 -2
  56. package/components/mutually-exclusive/example-mutually-exclusive-email.njk +2 -2
  57. package/components/mutually-exclusive/example-mutually-exclusive-multiple-options.njk +5 -5
  58. package/components/panel/_macro.spec.js +7 -29
  59. package/components/phase-banner/_macro.njk +1 -1
  60. package/components/radios/example-radios-with-clear-button-expanded.njk +9 -9
  61. package/components/radios/example-radios-with-clear-button.njk +9 -9
  62. package/components/radios/example-radios-with-descriptions.njk +5 -5
  63. package/components/radios/example-radios-with-error.njk +4 -4
  64. package/components/radios/example-radios-with-revealed-checkboxes-expanded.njk +8 -8
  65. package/components/radios/example-radios-with-revealed-checkboxes.njk +8 -8
  66. package/components/radios/example-radios-with-revealed-radios-expanded.njk +9 -9
  67. package/components/radios/example-radios-with-revealed-radios.njk +8 -8
  68. package/components/radios/example-radios-with-revealed-select-expanded.njk +5 -5
  69. package/components/radios/example-radios-with-revealed-select.njk +4 -4
  70. package/components/radios/example-radios-with-revealed-text-input-expanded.njk +9 -9
  71. package/components/radios/example-radios-with-revealed-text-input.njk +9 -9
  72. package/components/radios/example-radios-with-visible-text-input.njk +3 -3
  73. package/components/relationships/example-relationships-error.njk +13 -13
  74. package/components/relationships/example-relationships-you.njk +13 -13
  75. package/components/relationships/example-relationships.njk +13 -13
  76. package/components/select/example-select-with-error.njk +1 -1
  77. package/components/select/example-select-with-inline-label.njk +1 -1
  78. package/components/select/example-select.njk +1 -1
  79. package/components/summary/_macro.njk +2 -2
  80. package/components/summary/_macro.spec.js +28 -25
  81. package/components/summary/example-summary-grouped-total.njk +2 -0
  82. package/components/summary/example-summary-grouped-with-errors.njk +4 -0
  83. package/components/summary/example-summary-grouped.njk +19 -0
  84. package/components/summary/example-summary-household.njk +5 -0
  85. package/components/summary/example-summary-hub.njk +8 -0
  86. package/components/summary/example-summary-multiple.njk +4 -0
  87. package/components/summary/example-summary.njk +4 -0
  88. package/components/textarea/example-textarea-error.njk +1 -1
  89. package/components/upload/example-upload-error.njk +1 -1
  90. package/components/upload/example-upload.njk +1 -1
  91. package/package.json +2 -3
  92. package/scripts/main.es5.js +1 -1
  93. package/scripts/main.js +1 -1
  94. /package/{fonts → scss/fonts}/opensans-bold.woff +0 -0
  95. /package/{fonts → scss/fonts}/opensans-bold.woff2 +0 -0
  96. /package/{fonts → scss/fonts}/opensans-regular.woff +0 -0
  97. /package/{fonts → scss/fonts}/opensans-regular.woff2 +0 -0
  98. /package/{fonts → scss/fonts}/robotomono-bold.woff +0 -0
  99. /package/{fonts → scss/fonts}/robotomono-bold.woff2 +0 -0
  100. /package/{fonts → scss/fonts}/robotomono-regular.woff +0 -0
  101. /package/{fonts → scss/fonts}/robotomono-regular.woff2 +0 -0
@@ -43,18 +43,14 @@ describe('macro: cookies-banner', () => {
43
43
  it('has `statementTitle` title text', () => {
44
44
  const $ = cheerio.load(renderComponent('cookies-banner', EXAMPLE_COOKIES_BANNER_PARAMS));
45
45
 
46
- const statementTitle = $('.ons-cookies-banner__title')
47
- .text()
48
- .trim();
46
+ const statementTitle = $('.ons-cookies-banner__title').text().trim();
49
47
  expect(statementTitle).toBe('Cookies on override ons.gov.uk override');
50
48
  });
51
49
 
52
50
  it('has `statementText` text', () => {
53
51
  const $ = cheerio.load(renderComponent('cookies-banner', EXAMPLE_COOKIES_BANNER_PARAMS));
54
52
 
55
- const statementText = $('.ons-cookies-banner__primary .ons-cookies-banner__statement')
56
- .html()
57
- .trim();
53
+ const statementText = $('.ons-cookies-banner__primary .ons-cookies-banner__statement').html().trim();
58
54
  expect(statementText).toBe('Statement override');
59
55
  });
60
56
 
@@ -79,9 +75,7 @@ describe('macro: cookies-banner', () => {
79
75
  it('Renders a link with text', () => {
80
76
  const $ = cheerio.load(renderComponent('cookies-banner', EXAMPLE_COOKIES_BANNER_PARAMS));
81
77
 
82
- const linkText = $('.ons-cookies-banner__link')
83
- .text()
84
- .trim();
78
+ const linkText = $('.ons-cookies-banner__link').text().trim();
85
79
  expect(linkText).toBe('Cookie settings override');
86
80
  });
87
81
 
@@ -97,9 +91,7 @@ describe('macro: cookies-banner', () => {
97
91
  it('has `preferencesText` text', () => {
98
92
  const $ = cheerio.load(renderComponent('cookies-banner', EXAMPLE_COOKIES_BANNER_PARAMS));
99
93
 
100
- const preferencesText = $('.ons-cookies-banner__confirmation .ons-cookies-banner__preferences-text')
101
- .html()
102
- .trim();
94
+ const preferencesText = $('.ons-cookies-banner__confirmation .ons-cookies-banner__preferences-text').html().trim();
103
95
  expect(preferencesText).toBe('Text override');
104
96
  });
105
97
 
@@ -134,18 +126,14 @@ describe('macro: cookies-banner', () => {
134
126
  it('has `statementTitle` title text', () => {
135
127
  const $ = cheerio.load(renderComponent('cookies-banner', {}));
136
128
 
137
- const statementTitle = $('.ons-cookies-banner__title')
138
- .text()
139
- .trim();
129
+ const statementTitle = $('.ons-cookies-banner__title').text().trim();
140
130
  expect(statementTitle).toBe('Cookies on ons.gov.uk');
141
131
  });
142
132
 
143
133
  it('has `statementText` text', () => {
144
134
  const $ = cheerio.load(renderComponent('cookies-banner', {}));
145
135
 
146
- const statementText = $('.ons-cookies-banner__primary .ons-cookies-banner__statement')
147
- .html()
148
- .trim();
136
+ const statementText = $('.ons-cookies-banner__primary .ons-cookies-banner__statement').html().trim();
149
137
  expect(statementText).toBe(
150
138
  '<p>Cookies are small files stored on your device when you visit a website. We use some essential cookies to make this website work.</p><p>We would like to set <a href="/cookies">additional cookies</a> to remember your settings and understand how you use the site. This helps us to improve our services. </p>',
151
139
  );
@@ -172,9 +160,7 @@ describe('macro: cookies-banner', () => {
172
160
  it('Renders a link with text', () => {
173
161
  const $ = cheerio.load(renderComponent('cookies-banner', {}));
174
162
 
175
- const linkText = $('.ons-cookies-banner__link')
176
- .text()
177
- .trim();
163
+ const linkText = $('.ons-cookies-banner__link').text().trim();
178
164
  expect(linkText).toBe('View cookies');
179
165
  });
180
166
 
@@ -210,9 +196,7 @@ describe('macro: cookies-banner', () => {
210
196
  it('has `preferencesText` text', () => {
211
197
  const $ = cheerio.load(renderComponent('cookies-banner', {}));
212
198
 
213
- const preferencesText = $('.ons-cookies-banner__confirmation .ons-cookies-banner__preferences-text')
214
- .html()
215
- .trim();
199
+ const preferencesText = $('.ons-cookies-banner__confirmation .ons-cookies-banner__preferences-text').html().trim();
216
200
  expect(preferencesText).toBe('You can <a href="/cookies">change your cookie preferences</a> at any time.');
217
201
  });
218
202
 
@@ -260,9 +244,7 @@ describe('macro: cookies-banner', () => {
260
244
  it('has the welsh version of default values', () => {
261
245
  const $ = cheerio.load(renderComponent('cookies-banner', { lang: 'cy' }));
262
246
 
263
- const statementTitle = $('.ons-cookies-banner__title')
264
- .text()
265
- .trim();
247
+ const statementTitle = $('.ons-cookies-banner__title').text().trim();
266
248
  expect(statementTitle).toBe('Cwcis ar ons.gov.uk');
267
249
  });
268
250
  });
@@ -2,7 +2,7 @@
2
2
  {% from "components/date-input/_macro.njk" import onsDateInput %}
3
3
  {{
4
4
  onsDateInput({
5
- "id": "period-from-date",
5
+ "id": "period-from-date-input-error-example",
6
6
  "legendOrLabel": "Period from:",
7
7
  "description": "For example, 31 3 2019",
8
8
  "day": {
@@ -31,7 +31,7 @@
31
31
 
32
32
  {{
33
33
  onsDateInput({
34
- "id": "period-to-date",
34
+ "id": "period-to-date-input-error-example",
35
35
  "legendOrLabel": "Period to:",
36
36
  "description": "For example, 31 3 2020",
37
37
  "day": {
@@ -2,7 +2,7 @@
2
2
 
3
3
  {{
4
4
  onsDateInput({
5
- "id": "date",
5
+ "id": "date-input-example",
6
6
  "legendOrLabel": "Date of birth",
7
7
  "description": "For example, 31 3 1980",
8
8
  "day": {
@@ -3,7 +3,7 @@
3
3
 
4
4
  {%
5
5
  call onsDetails({
6
- "id": "details",
6
+ "id": "details-example-with-warning",
7
7
  "title": "Need to answer separately from your household?"
8
8
  })
9
9
  %}
@@ -2,7 +2,7 @@
2
2
 
3
3
  {{
4
4
  onsDetails({
5
- "id": "details",
5
+ "id": "details-example",
6
6
  "title": "What is a photovoltaic system?",
7
7
  "content": "<p>A typical photovoltaic system employs solar panels, each comprising a number of solar cells, which generate electrical power. PV installations may be ground-mounted, rooftop mounted or wall mounted. The mount may be fixed, or use a solar tracker to follow the sun across the sky.</p>"
8
8
  })
@@ -3,27 +3,27 @@
3
3
 
4
4
  {{
5
5
  onsDuration({
6
- "id": "address-duration",
6
+ "id": "address-duration-error-example",
7
7
  "legendOrLabel": 'How long have you lived at this address?',
8
8
  "legendClasses": 'ons-u-vh',
9
9
  "field1": {
10
- "id": "address-duration-years",
10
+ "id": "address-duration-years-error-example",
11
11
  "name": "address-duration-years",
12
12
  "suffix": {
13
13
  "text": "Years",
14
- "id": "address-duration-years-suffix"
14
+ "id": "address-duration-years-suffix-error-example"
15
15
  }
16
16
  },
17
17
  "field2": {
18
- "id": "address-duration-months",
18
+ "id": "address-duration-months-error-example",
19
19
  "name": "address-duration-months",
20
20
  "suffix": {
21
21
  "text": "Months",
22
- "id": "address-duration-months-suffix"
22
+ "id": "address-duration-months-suffix-error-example"
23
23
  }
24
24
  },
25
25
  "error": {
26
- "id": "address-duration-error",
26
+ "id": "address-duration-error-example",
27
27
  "text": "Enter how long you have lived at this address"
28
28
  }
29
29
  })
@@ -7,25 +7,25 @@
7
7
  "legendIsQuestionTitle": true
8
8
  }) %}
9
9
  {{ onsDuration({
10
- "id": "address-duration",
10
+ "id": "address-duration-example",
11
11
  "dontWrap": true,
12
12
  "field1": {
13
- "id": "address-duration-years",
13
+ "id": "address-duration-years-example",
14
14
  "name": "address-duration-years",
15
15
  "suffix": {
16
16
  "text": "Years",
17
- "id": "address-duration-years-suffix"
17
+ "id": "address-duration-years-suffix-example"
18
18
  },
19
19
  "attributes": {
20
20
  "autocomplete": "off"
21
21
  }
22
22
  },
23
23
  "field2": {
24
- "id": "address-duration-months",
24
+ "id": "address-duration-months-example",
25
25
  "name": "address-duration-months",
26
26
  "suffix": {
27
27
  "text": "Months",
28
- "id": "address-duration-months-suffix"
28
+ "id": "address-duration-months-suffix-example"
29
29
  },
30
30
  "attributes": {
31
31
  "autocomplete": "off"
@@ -9,7 +9,7 @@
9
9
  "mastheadLogoUrl": '#0',
10
10
  "titleUrl": '#0',
11
11
  "serviceLinks": {
12
- "id": "service-links",
12
+ "id": "service-links-external",
13
13
  "ariaLabel": 'Services menu',
14
14
  "ariaListLabel": 'Menu',
15
15
  "toggleServicesButton": {
@@ -10,7 +10,7 @@
10
10
  "variants": 'internal',
11
11
  "titleUrl": '#0',
12
12
  "serviceLinks": {
13
- "id": "service-links",
13
+ "id": "service-links-internal",
14
14
  "ariaLabel": 'Services menu',
15
15
  "ariaListLabel": 'Menu',
16
16
  "toggleServicesButton": {
@@ -1,7 +1,7 @@
1
1
  {% from "components/input/_macro.njk" import onsInput %}
2
2
  {{
3
3
  onsInput({
4
- "id": "email",
4
+ "id": "email-example-input-email",
5
5
  "type": "email",
6
6
  "autocomplete": "email",
7
7
  "label": {
@@ -1,7 +1,7 @@
1
1
  {% from "components/input/_macro.njk" import onsInput %}
2
2
  {{
3
3
  onsInput({
4
- "id": "number",
4
+ "id": "number-example-input",
5
5
  "type": "number",
6
6
  "width": "2",
7
7
  "autocomplete": "off",
@@ -1,7 +1,7 @@
1
1
  {% from "components/input/_macro.njk" import onsInput %}
2
2
  {{
3
3
  onsInput({
4
- "id": "number",
4
+ "id": "number-example-input-numeric-values",
5
5
  "type": "number",
6
6
  "width": "2",
7
7
  "autocomplete": "off",
@@ -15,7 +15,7 @@
15
15
  }}
16
16
  {{
17
17
  onsInput({
18
- "id": "prefixed",
18
+ "id": "prefixed-example-input-numeric-values",
19
19
  "type": "number",
20
20
  "width": "6",
21
21
  "autocomplete": "off",
@@ -25,13 +25,13 @@
25
25
  "prefix": {
26
26
  "text": "£",
27
27
  "title": "British pounds (GBP)",
28
- "id": "annual-salary-gpb-prefix"
28
+ "id": "annual-salary-gpb-prefix-example-input-numeric-values"
29
29
  }
30
30
  })
31
31
  }}
32
32
  {{
33
33
  onsInput({
34
- "id": "suffixed-percent",
34
+ "id": "suffixed-percent-example-input-numeric-values",
35
35
  "type": "number",
36
36
  "width": "3",
37
37
  "autocomplete": "off",
@@ -41,13 +41,13 @@
41
41
  "suffix": {
42
42
  "title": "per cent",
43
43
  "text": "%",
44
- "id": "internet-access-per-cent-suffix"
44
+ "id": "internet-access-per-cent-suffix-example-input-numeric-values"
45
45
  }
46
46
  })
47
47
  }}
48
48
  {{
49
49
  onsInput({
50
- "id": "suffixed-centimetres",
50
+ "id": "suffixed-centimetres-example-input-numeric-values",
51
51
  "type": "number",
52
52
  "width": "4",
53
53
  "autocomplete": "off",
@@ -58,7 +58,7 @@
58
58
  "suffix": {
59
59
  "title": "centimetres",
60
60
  "text": "cm",
61
- "id": "length-cm-suffix"
61
+ "id": "length-cm-suffix-example-input-numeric-values"
62
62
  }
63
63
  })
64
64
  }}
@@ -1,7 +1,7 @@
1
1
  {% from "components/input/_macro.njk" import onsInput %}
2
2
  {{
3
3
  onsInput({
4
- "id": "text",
4
+ "id": "text-example-input-with-char-limit-checker",
5
5
  "label": {
6
6
  "text": "Enter some text"
7
7
  },
@@ -1,7 +1,7 @@
1
1
  {% from "components/input/_macro.njk" import onsInput %}
2
2
  {{
3
3
  onsInput({
4
- "id": "text",
4
+ "id": "text-example-input-with-description",
5
5
  "label": {
6
6
  "text": "Enter some text",
7
7
  "description": "Example description hint text"
@@ -1,7 +1,7 @@
1
1
  {% from "components/input/_macro.njk" import onsInput %}
2
2
  {{
3
3
  onsInput({
4
- "id": "text",
4
+ "id": "text-example-input",
5
5
  "label": {
6
6
  "text": "Enter some text"
7
7
  }
@@ -13,34 +13,34 @@
13
13
  "name": "mutually-exclusive",
14
14
  "checkboxes": [
15
15
  {
16
- "id": "gas",
16
+ "id": "gas-example-mutually-exclusive-checkbox",
17
17
  "label": {
18
18
  "text": "Gas"
19
19
  },
20
20
  "value": "gas"
21
21
  },
22
22
  {
23
- "id": "electric",
23
+ "id": "electric-example-mutually-exclusive-checkbox",
24
24
  "label": {
25
25
  "text": "Electric"
26
26
  },
27
27
  "value": "electric"
28
28
  },
29
29
  {
30
- "id": "solid-fuel",
30
+ "id": "solid-fuel-example-mutually-exclusive-checkbox",
31
31
  "label": {
32
32
  "text": "Solid fuel"
33
33
  },
34
34
  "value": "solid-fuel"
35
35
  },
36
36
  {
37
- "id": "other-fuel",
37
+ "id": "other-fuel-example-mutually-exclusive-checkbox",
38
38
  "label": {
39
39
  "text": "Other"
40
40
  },
41
41
  "value": "other",
42
42
  "other": {
43
- "id": "other-fuel-textbox",
43
+ "id": "other-fuel-textbox-example-mutually-exclusive-checkbox",
44
44
  "name": "other-fuel-answer",
45
45
  "label": {
46
46
  "text": "Please specify"
@@ -55,7 +55,7 @@
55
55
  "deselectExclusiveOptionAdjective": "deselected",
56
56
  "exclusiveOptions": [
57
57
  {
58
- "id": "no-central-heating",
58
+ "id": "no-central-heating-example-mutually-exclusive-checkbox",
59
59
  "label": {
60
60
  "text": "No central heating"
61
61
  },
@@ -2,7 +2,7 @@
2
2
 
3
3
  {{
4
4
  onsDateInput({
5
- "id": "date-mutually-exclusive",
5
+ "id": "date-mutually-exclusive-with-error",
6
6
  "legendOrLabel": "When did you leave your last paid job?",
7
7
  "legendClasses": "ons-u-vh",
8
8
  "day": {
@@ -30,7 +30,7 @@
30
30
  "deselectExclusiveOptionAdjective": "deselected",
31
31
  "exclusiveOptions": [
32
32
  {
33
- "id": "date-exclusive-checkbox",
33
+ "id": "date-exclusive-checkbox-with-error",
34
34
  "name": "no-paid-job",
35
35
  "value": "no-paid-job",
36
36
  "label": {
@@ -8,7 +8,7 @@
8
8
  }) %}
9
9
  {{
10
10
  onsInput({
11
- "id": "email",
11
+ "id": "email-example-mutually-exclusive",
12
12
  "type": "email",
13
13
  "label": {
14
14
  "text": "Email address",
@@ -22,7 +22,7 @@
22
22
  "deselectExclusiveOptionAdjective": "deselected",
23
23
  "exclusiveOptions": [
24
24
  {
25
- "id": "email-checkbox",
25
+ "id": "email-checkbox-example-mutually-exclusive",
26
26
  "name": "no-email",
27
27
  "value": "no-email",
28
28
  "label": {
@@ -13,21 +13,21 @@
13
13
  "name": "mutually-exclusive",
14
14
  "checkboxes": [
15
15
  {
16
- "id": "gas",
16
+ "id": "gas-example-mutually-exclusive-multiple-options",
17
17
  "label": {
18
18
  "text": "Gas"
19
19
  },
20
20
  "value": "gas"
21
21
  },
22
22
  {
23
- "id": "electric",
23
+ "id": "electric-example-mutually-exclusive-multiple-options",
24
24
  "label": {
25
25
  "text": "Electric"
26
26
  },
27
27
  "value": "electric"
28
28
  },
29
29
  {
30
- "id": "solid-fuel",
30
+ "id": "solid-fuel-example-mutually-exclusive-multiple-options",
31
31
  "label": {
32
32
  "text": "Solid fuel"
33
33
  },
@@ -41,7 +41,7 @@
41
41
  "deselectExclusiveOptionAdjective": "deselected",
42
42
  "exclusiveOptions": [
43
43
  {
44
- "id": "no-central-heating",
44
+ "id": "no-central-heating-example-mutually-exclusive-multiple-options",
45
45
  "name": "no central heating",
46
46
  "label": {
47
47
  "text": "No central heating"
@@ -49,7 +49,7 @@
49
49
  "value": "no-central-heating"
50
50
  },
51
51
  {
52
- "id": "other",
52
+ "id": "other-example-mutually-exclusive-multiple-options",
53
53
  "name": "other",
54
54
  "label": {
55
55
  "text": "Other"
@@ -51,19 +51,13 @@ describe('macro: panel', () => {
51
51
  }),
52
52
  );
53
53
 
54
- expect(
55
- $('.ons-panel__body')
56
- .text()
57
- .trim(),
58
- ).toBe('Some panel text');
54
+ expect($('.ons-panel__body').text().trim()).toBe('Some panel text');
59
55
  });
60
56
 
61
57
  it('calls with content', () => {
62
58
  const $ = cheerio.load(renderComponent('panel', { EXAMPLE_PANEL_BASIC, type: panelType }, 'Example content...'));
63
59
 
64
- const content = $('.ons-panel__body')
65
- .text()
66
- .trim();
60
+ const content = $('.ons-panel__body').text().trim();
67
61
  expect(content).toBe('Example content...');
68
62
  });
69
63
 
@@ -124,11 +118,7 @@ describe('macro: panel', () => {
124
118
  }),
125
119
  );
126
120
 
127
- expect(
128
- $('.ons-panel__assistive-text')
129
- .text()
130
- .trim(),
131
- ).toBe(accessibleText);
121
+ expect($('.ons-panel__assistive-text').text().trim()).toBe(accessibleText);
132
122
  });
133
123
 
134
124
  it('has the provided visually hidden accessible text', () => {
@@ -140,11 +130,7 @@ describe('macro: panel', () => {
140
130
  }),
141
131
  );
142
132
 
143
- expect(
144
- $('.ons-panel__assistive-text')
145
- .text()
146
- .trim(),
147
- ).toBe('Some helpful text:');
133
+ expect($('.ons-panel__assistive-text').text().trim()).toBe('Some helpful text:');
148
134
  });
149
135
  });
150
136
 
@@ -333,11 +319,7 @@ describe('macro: panel', () => {
333
319
  }),
334
320
  );
335
321
 
336
- expect(
337
- $('.ons-panel__icon')
338
- .text()
339
- .trim(),
340
- ).toBe('!');
322
+ expect($('.ons-panel__icon').text().trim()).toBe('!');
341
323
  });
342
324
  });
343
325
 
@@ -362,11 +344,7 @@ describe('macro: panel', () => {
362
344
  }),
363
345
  );
364
346
 
365
- expect(
366
- $('.ons-panel__icon')
367
- .text()
368
- .trim(),
369
- ).toBe('!');
347
+ expect($('.ons-panel__icon').text().trim()).toBe('!');
370
348
  });
371
349
  });
372
350
 
@@ -406,7 +384,7 @@ describe('macro: panel', () => {
406
384
  expect($('.ons-panel__icon').hasClass('ons-u-fs-r')).toBe(true);
407
385
  });
408
386
 
409
- it.each(['r', 'm', 'l', 'xl'])('has the correct class for the provided `iconSize` override (%s)', customIconSize => {
387
+ it.each(['r', 'm', 'l', 'xl'])('has the correct class for the provided `iconSize` override (%s)', (customIconSize) => {
410
388
  const $ = cheerio.load(
411
389
  renderComponent('panel', {
412
390
  ...EXAMPLE_PANEL_BASIC,
@@ -4,7 +4,7 @@
4
4
  <div class="ons-grid ons-grid--flex ons-grid--gutterless ons-grid--vertical-top ons-grid--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
- <h3 class="ons-phase-banner__badge">{{ params.badge | default("Beta") }}</h3>
7
+ <strong class="ons-phase-banner__badge">{{ params.badge | default("Beta") }}</strong>
8
8
  </div>
9
9
  {% endif %}
10
10
  <div class="ons-grid__col ons-col-auto ons-u-flex-shrink">
@@ -26,14 +26,14 @@
26
26
  },
27
27
  "radios": [
28
28
  {
29
- "id": "none",
29
+ "id": "none-radio-with-clear-button-expanded",
30
30
  "label": {
31
31
  "text": "No religion"
32
32
  },
33
33
  "value": "none"
34
34
  },
35
35
  {
36
- "id": "christian",
36
+ "id": "christian-radio-with-clear-button-expanded",
37
37
  "label": {
38
38
  "text": "Christian",
39
39
  "description": "Including Church of England, Catholic, Protestant and all other Christian denominations"
@@ -41,14 +41,14 @@
41
41
  "value": "christian"
42
42
  },
43
43
  {
44
- "id": "buddhist",
44
+ "id": "buddhist-radio-with-clear-button-expanded",
45
45
  "label": {
46
46
  "text": "Buddhist"
47
47
  },
48
48
  "value": "buddhist"
49
49
  },
50
50
  {
51
- "id": "hindu",
51
+ "id": "hindu-radio-with-clear-button-expanded",
52
52
  "label": {
53
53
  "text": "Hindu"
54
54
  },
@@ -62,21 +62,21 @@
62
62
  "value": "jewish"
63
63
  },
64
64
  {
65
- "id": "muslim",
65
+ "id": "muslim-radio-with-clear-button-expanded",
66
66
  "label": {
67
67
  "text": "Muslim"
68
68
  },
69
69
  "value": "muslim"
70
70
  },
71
71
  {
72
- "id": "sikh",
72
+ "id": "sikh-radio-with-clear-button-expanded",
73
73
  "label": {
74
74
  "text": "Sikh"
75
75
  },
76
76
  "value": "sikh"
77
77
  },
78
78
  {
79
- "id": "other-radio",
79
+ "id": "other-radio-with-clear-button-expanded",
80
80
  "label": {
81
81
  "text": "Any other religion"
82
82
  },
@@ -84,7 +84,7 @@
84
84
  "checked": true,
85
85
  "other": {
86
86
  "otherType": "input",
87
- "id": "other-textbox",
87
+ "id": "other-textbox-radio-with-clear-button-expanded",
88
88
  "name": "other-answer",
89
89
  "label": {
90
90
  "text": "Enter your religion"
@@ -95,4 +95,4 @@
95
95
  })
96
96
  }}
97
97
  </form>
98
- {% endcall %}
98
+ {% endcall %}