@ons/design-system 72.0.1 → 72.1.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.
Files changed (55) hide show
  1. package/README.md +1 -1
  2. package/components/accordion/_macro.spec.js +2 -2
  3. package/components/address-input/_macro.spec.js +245 -322
  4. package/components/address-input/autosuggest.address.spec.js +16 -14
  5. package/components/address-output/_macro.spec.js +121 -74
  6. package/components/address-output/_test_examples.js +8 -0
  7. package/components/autosuggest/_macro.njk +1 -0
  8. package/components/autosuggest/_macro.spec.js +373 -178
  9. package/components/autosuggest/autosuggest.spec.js +3 -1
  10. package/components/autosuggest/autosuggest.ui.js +39 -10
  11. package/components/autosuggest/example-autosuggest-country.njk +2 -1
  12. package/components/autosuggest/fuse-config.js +7 -2
  13. package/components/back-to-top/back-to-top.dom.js +4 -4
  14. package/components/back-to-top/back-to-top.js +1 -1
  15. package/components/browser-banner/_macro.spec.js +11 -11
  16. package/components/button/_macro.njk +1 -1
  17. package/components/button/_macro.spec.js +405 -351
  18. package/components/button/example-button-group.njk +1 -0
  19. package/components/checkboxes/_checkbox-macro.njk +20 -0
  20. package/components/checkboxes/_checkbox.scss +3 -3
  21. package/components/checkboxes/_macro.njk +5 -0
  22. package/components/checkboxes/_macro.spec.js +35 -0
  23. package/components/checkboxes/example-checkboxes-with-revealed-text-area-expanded.njk +68 -0
  24. package/components/checkboxes/example-checkboxes-with-revealed-text-area.njk +67 -0
  25. package/components/details/_details.scss +1 -2
  26. package/components/details/example-details-open.njk +10 -0
  27. package/components/external-link/_macro.spec.js +66 -69
  28. package/components/external-link/_test_examples.js +4 -0
  29. package/components/feedback/_macro.spec.js +109 -80
  30. package/components/feedback/_test_examples.js +17 -0
  31. package/components/field/_macro.spec.js +106 -69
  32. package/components/section-navigation/_macro.njk +9 -6
  33. package/components/summary/_macro.njk +73 -78
  34. package/components/summary/_macro.spec.js +5 -15
  35. package/components/summary/_summary.scss +16 -11
  36. package/components/table-of-contents/_macro.njk +3 -3
  37. package/components/table-of-contents/_macro.spec.js +3 -3
  38. package/components/table-of-contents/{_toc.scss → _table-of-contents.scss} +1 -1
  39. package/components/table-of-contents/table-of-contents.dom.js +13 -0
  40. package/components/table-of-contents/{toc.js → table-of-contents.js} +4 -4
  41. package/components/table-of-contents/{toc.spec.js → table-of-contents.spec.js} +2 -2
  42. package/components/tabs/_tabs.scss +10 -11
  43. package/components/tabs/tabs.js +3 -3
  44. package/components/timeout-modal/timeout-modal.spec.js +1 -1
  45. package/css/main.css +1 -1
  46. package/js/analytics.js +1 -1
  47. package/js/main.js +1 -1
  48. package/package.json +2 -2
  49. package/scripts/main.es5.js +1 -1
  50. package/scripts/main.js +1 -1
  51. package/scss/main.scss +1 -1
  52. package/scss/objects/_page.scss +1 -1
  53. package/scss/utilities/_margin.scss +4 -0
  54. package/scss/utilities/_padding.scss +4 -0
  55. package/components/table-of-contents/toc.dom.js +0 -13
@@ -35,96 +35,91 @@
35
35
  {% if row.total %}{% set itemClass = itemClass + " ons-summary__item--total" %}{% endif %}
36
36
  <div {% if row.id %}id="{{ row.id }}"{% endif %}class="ons-summary__item{{ itemClass }}">
37
37
  {% if row.errorMessage %}
38
- <div class="ons-summary__row-title--error ons-u-fs-r">{{ row.errorMessage }}</div>
38
+ <dt class="ons-summary__row-title--error ons-u-fs-r">{{ row.errorMessage }}</dt>
39
39
  {% endif %}
40
40
  {% if row.itemsList | length > 1 and row.title %}
41
- <div class="ons-summary__row-title ons-summary__row-title--no-group-title ons-u-fs-r">
41
+ <dt class="ons-summary__row-title ons-summary__row-title--no-group-title ons-u-fs-r">
42
42
  {{- row.title -}}
43
- </div>
43
+ </dt>
44
44
  {% endif %}
45
45
 
46
46
  {% for item in row.itemsList %}
47
- <div
48
- class="ons-summary__row{{ ' ons-summary__row--has-values' if item.valueList else "" }}"
49
- {% if item.id %}id="{{ item.id }}"{% endif %}
47
+ <dt
48
+ class="ons-summary__item-title"
49
+ {% if item.titleAttributes %}{% for attribute, value in (item.titleAttributes.items() if item.titleAttributes is mapping and item.titleAttributes.items else item.titleAttributes) %}{{ attribute }}="{{ value }}"{% endfor %}{% endif %}
50
50
  >
51
- <dt
52
- class="ons-summary__item-title"
53
- {% if item.titleAttributes %}{% for attribute, value in (item.titleAttributes.items() if item.titleAttributes is mapping and item.titleAttributes.items else item.titleAttributes) %}{{ attribute }}="{{ value }}"{% endfor %}{% endif %}
54
- >
55
- {% if item.iconType %}
56
- {% from "components/icon/_macro.njk" import onsIcon %}
57
- <span
58
- class="ons-summary__item-title-icon{{ ' ons-summary__item-title-icon--check' if item.iconType == 'check' else "" }}"
59
- >
60
- {{-
61
- onsIcon({
62
- "iconType": item.iconType
63
- })
64
- -}}
65
- {% if item.iconVisuallyHiddenText %}
66
- <span class="ons-u-vh">{{ item.iconVisuallyHiddenText }}</span>
67
- {% endif %}
68
- </span>
69
- {% endif %}
70
-
71
- <div
72
- class="ons-summary__item--text{{ ' ons-summary__item-title--text' if item.iconType else "" }}"
51
+ {% if item.iconType %}
52
+ {% from "components/icon/_macro.njk" import onsIcon %}
53
+ <span
54
+ class="ons-summary__item-title-icon{{ ' ons-summary__item-title-icon--check' if item.iconType == 'check' else "" }}"
73
55
  >
74
- {{- item.title | default(row.title) | safe -}}
75
- </div>
56
+ {{-
57
+ onsIcon({
58
+ "iconType": item.iconType
59
+ })
60
+ -}}
61
+ {% if item.iconVisuallyHiddenText %}
62
+ <span class="ons-u-vh">{{ item.iconVisuallyHiddenText }}</span>
63
+ {% endif %}
64
+ </span>
65
+ {% endif %}
76
66
 
77
- {# Render section status for mobile if is hub #}
78
- {% if variantHub and item.valueList %}
79
- <span class="ons-u-d-no@m ons-u-fs-r"> — {{ item.valueList[0].text | safe }}</span>
80
- {% endif %}
81
- </dt>
82
- {% if item.valueList %}
83
- <dd
84
- class="ons-summary__values{{ ' ons-summary__values--2' if not item.actions }}"
85
- {% if item.attributes %}{% for attribute, value in (item.attributes.items() if item.attributes is mapping and item.attributes.items else item.attributes) %}{{ attribute }}="{{ value }}"{% endfor %}{% endif %}
86
- >
87
- {% if item.valueList | length == 1 %}
88
- <span class="ons-summary__text">{{ item.valueList[0].text | safe }}</span>
89
- {% if item.valueList[0].other or item.valueList[0].other == 0 %}
90
- <ul class="ons-u-mb-no">
91
- <li>{{ item.valueList[0].other | safe }}</li>
92
- </ul>
93
- {% endif %}
94
- {% else %}
67
+ <div
68
+ class="ons-summary__item--text{{ ' ons-summary__item-title--text' if item.iconType else "" }}"
69
+ >
70
+ {{- item.title | default(row.title) | safe -}}
71
+ </div>
72
+
73
+ {# Render section status for mobile if is hub #}
74
+ {% if variantHub and item.valueList %}
75
+ <span class="ons-u-d-no@m ons-u-fs-r"> {{ item.valueList[0].text | safe }}</span>
76
+ {% endif %}
77
+ </dt>
78
+ {% if item.valueList %}
79
+ <dd
80
+ class="ons-summary__values{{ ' ons-summary__values--2' if not item.actions }}"
81
+ {% if item.attributes %}{% for attribute, value in (item.attributes.items() if item.attributes is mapping and item.attributes.items else item.attributes) %}{{ attribute }}="{{ value }}"{% endfor %}{% endif %}
82
+ >
83
+ {% if item.valueList | length == 1 %}
84
+ <span class="ons-summary__text">{{ item.valueList[0].text | safe }}</span>
85
+ {% if item.valueList[0].other or item.valueList[0].other == 0 %}
95
86
  <ul class="ons-u-mb-no">
96
- {% for value in item.valueList %}
97
- <li>
98
- <span class="ons-summary__text">{{ value.text | safe }}</span>
99
- {% if value.other or value.other == 0 %}
100
- <ul class="ons-u-mb-no">
101
- <li>{{ value.other | safe }}</li>
102
- </ul>
103
- {% endif %}
104
- </li>
105
- {% endfor %}
87
+ <li>{{ item.valueList[0].other | safe }}</li>
106
88
  </ul>
107
89
  {% endif %}
108
- </dd>
109
- {% endif %}
110
- {% if item.actions %}
111
- <dd class="ons-summary__actions">
112
- {% for action in item.actions %}
113
- {% if loop.index > 1 %}<span class="ons-summary__spacer"></span>{% endif %}
114
- <a
115
- href="{{ action.url }}"
116
- class="ons-summary__button"
117
- {% if action.attributes %}{% for attribute, value in (action.attributes.items() if action.attributes is mapping and action.attributes.items else action.attributes) %}{{ ' ' }}{{ attribute }}="{{ value }}"{% endfor %}{% endif %}
90
+ {% else %}
91
+ <ul class="ons-u-mb-no">
92
+ {% for value in item.valueList %}
93
+ <li>
94
+ <span class="ons-summary__text">{{ value.text | safe }}</span>
95
+ {% if value.other or value.other == 0 %}
96
+ <ul class="ons-u-mb-no">
97
+ <li>{{ value.other | safe }}</li>
98
+ </ul>
99
+ {% endif %}
100
+ </li>
101
+ {% endfor %}
102
+ </ul>
103
+ {% endif %}
104
+ </dd>
105
+ {% endif %}
106
+ {% if item.actions %}
107
+ <dd class="ons-summary__actions">
108
+ {% for action in item.actions %}
109
+ {% if loop.index > 1 %}<span class="ons-summary__spacer"></span>{% endif %}
110
+ <a
111
+ href="{{ action.url }}"
112
+ class="ons-summary__button"
113
+ {% if action.attributes %}{% for attribute, value in (action.attributes.items() if action.attributes is mapping and action.attributes.items else action.attributes) %}{{ ' ' }}{{ attribute }}="{{ value }}"{% endfor %}{% endif %}
114
+ >
115
+ <span class="ons-summary__button-text" aria-hidden="true">{{- action.text -}}</span>
116
+ <span class="ons-u-vh"
117
+ >{{ action.visuallyHiddenText | default (action.text) }}</span
118
118
  >
119
- <span class="ons-summary__button-text" aria-hidden="true">
120
- {{- action.text -}}
121
- </span>
122
- <span class="ons-u-vh">{{ action.visuallyHiddenText }}</span>
123
- </a>
124
- {% endfor %}
125
- </dd>
126
- {% endif %}
127
- </div>
119
+ </a>
120
+ {% endfor %}
121
+ </dd>
122
+ {% endif %}
128
123
  {% endfor %}
129
124
  </div>
130
125
  {% endfor %}
@@ -146,7 +141,7 @@
146
141
  </a>
147
142
  {% endset %}
148
143
  {% if params.variant == 'card' %}
149
- <div>{{ link | safe }}</div>
144
+ <div class="ons-summary__link-container">{{ link | safe }}</div>
150
145
  {% else %}
151
146
  {{ link | safe }}
152
147
  {% endif %}
@@ -399,12 +399,6 @@ describe('macro: summary', () => {
399
399
  expect($('#row-id-3').length).toBe(1);
400
400
  });
401
401
 
402
- it('has the correct class for each row when there is a `valueList`', () => {
403
- const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC));
404
-
405
- expect($('.ons-summary__row--has-values').length).toBe(5);
406
- });
407
-
408
402
  it('has custom row `titleAttributes`', () => {
409
403
  const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC));
410
404
 
@@ -462,18 +456,16 @@ describe('macro: summary', () => {
462
456
  const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC));
463
457
 
464
458
  expect(
465
- $('.ons-summary__items .ons-summary__item:nth-of-type(1) .ons-summary__row .ons-summary__values .ons-summary__text')
466
- .text()
467
- .trim(),
459
+ $('.ons-summary__items .ons-summary__item:nth-of-type(1) .ons-summary__values .ons-summary__text').text().trim(),
468
460
  ).toBe('row value 1');
469
461
  });
470
462
 
471
463
  it('displays the `other` text', () => {
472
464
  const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC));
473
465
 
474
- expect(
475
- $('.ons-summary__items .ons-summary__item:nth-of-type(1) .ons-summary__row .ons-summary__values ul li').text().trim(),
476
- ).toBe('other value');
466
+ expect($('.ons-summary__items .ons-summary__item:nth-of-type(1) .ons-summary__values ul li').text().trim()).toBe(
467
+ 'other value',
468
+ );
477
469
  });
478
470
 
479
471
  it('wraps the `valueList` in a ul if multiple values provided', () => {
@@ -601,9 +593,7 @@ describe('macro: summary', () => {
601
593
  }),
602
594
  );
603
595
 
604
- expect($('.ons-summary__items .ons-summary__item:nth-of-type(2) .ons-summary__row .ons-summary__item-title span').text()).toBe(
605
- ' — row value 2',
606
- );
596
+ expect($('.ons-summary__items .ons-summary__item:nth-of-type(2) .ons-summary__item-title span').text()).toBe(' — row value 2');
607
597
  });
608
598
  });
609
599
 
@@ -18,12 +18,10 @@ $hub-row-spacing: 1.3rem;
18
18
  }
19
19
  }
20
20
 
21
- &__row {
21
+ &__item {
22
22
  display: flex;
23
23
  margin: 0;
24
- }
25
-
26
- &__item {
24
+ flex-wrap: wrap;
27
25
  &:not(:last-child),
28
26
  &:not(.ons-summary__group--card .ons-summary__item):nth-of-type(1) {
29
27
  border-bottom: 1px solid var(--ons-color-borders);
@@ -51,6 +49,7 @@ $hub-row-spacing: 1.3rem;
51
49
  &__row-title {
52
50
  padding: $summary-row-spacing 0;
53
51
  text-align: left;
52
+ flex: 0 0 100%;
54
53
  }
55
54
  // reduces the gap between row title and summary title when there is no group title
56
55
  &__title + &__group &__row-title--no-group-title {
@@ -95,12 +94,13 @@ $hub-row-spacing: 1.3rem;
95
94
  width: 1px;
96
95
  }
97
96
 
98
- // Item Modifiers
97
+ // Row Modifiers
99
98
  &__item--error & {
100
99
  &__row-title--error {
101
100
  color: var(--ons-color-errors);
102
101
  font-weight: $font-weight-bold;
103
102
  padding: $summary-row-spacing $summary-col-spacing;
103
+ flex: 0 0 100%;
104
104
  }
105
105
 
106
106
  &__row-title,
@@ -159,7 +159,7 @@ $hub-row-spacing: 1.3rem;
159
159
  }
160
160
  }
161
161
 
162
- &__row {
162
+ &__item {
163
163
  flex-direction: column;
164
164
  }
165
165
  }
@@ -172,14 +172,19 @@ $hub-row-spacing: 1.3rem;
172
172
  flex: 5 1 33%;
173
173
  padding-top: $summary-row-spacing;
174
174
  vertical-align: top;
175
- &:not(:last-child) {
176
- padding-right: $summary-col-spacing;
177
- }
175
+ }
176
+
177
+ &__item-title,
178
+ &__values {
179
+ padding-right: $summary-col-spacing;
178
180
  }
179
181
 
180
182
  &__actions {
181
183
  display: flex;
182
184
  justify-content: right;
185
+ & :not(.ons-summary__item-title--error) {
186
+ padding-right: 0;
187
+ }
183
188
  }
184
189
 
185
190
  &__button {
@@ -215,7 +220,7 @@ $hub-row-spacing: 1.3rem;
215
220
  }
216
221
  .ons-summary__link {
217
222
  padding: 0 1.25rem;
218
- div {
223
+ &-container {
219
224
  padding: 1rem 0;
220
225
  border-top: 1px solid var(--ons-color-borders-light);
221
226
  }
@@ -225,7 +230,7 @@ $hub-row-spacing: 1.3rem;
225
230
  padding: 0.5rem 1.25rem 0;
226
231
  }
227
232
  .ons-summary__placeholder + .ons-summary__link {
228
- div {
233
+ &-container {
229
234
  border-top: 0;
230
235
  }
231
236
  }
@@ -2,7 +2,7 @@
2
2
  {% from "components/list/_macro.njk" import onsList %}
3
3
  {% from "components/skip-to-content/_macro.njk" import onsSkipToContent %}
4
4
 
5
- <aside class="ons-toc-container" role="complementary">
5
+ <aside class="ons-table-of-contents-container" role="complementary">
6
6
  {% if params.skipLink %}
7
7
  {{
8
8
  onsSkipToContent({
@@ -12,8 +12,8 @@
12
12
  }}
13
13
  {% endif %}
14
14
 
15
- <nav class="ons-toc" aria-label="{{ params.ariaLabel | default('Table of contents') }}">
16
- <h2 class="ons-toc__title ons-u-fs-r--b ons-u-mb-s">{{ params.title }}</h2>
15
+ <nav class="ons-table-of-contents" aria-label="{{ params.ariaLabel | default('Table of contents') }}">
16
+ <h2 class="ons-table-of-contents__title ons-u-fs-r--b ons-u-mb-s">{{ params.title }}</h2>
17
17
  {% if params.lists %}
18
18
  {% for list in params.lists %}
19
19
  {% if list.listHeading %}
@@ -59,7 +59,7 @@ describe('macro: table-of-contents', () => {
59
59
  it('renders a default aria label', () => {
60
60
  const $ = cheerio.load(renderComponent('table-of-contents', EXAMPLE_TABLE_OF_CONTENTS_SINGLE));
61
61
 
62
- expect($('.ons-toc').attr('aria-label')).toBe('Table of contents');
62
+ expect($('.ons-table-of-contents').attr('aria-label')).toBe('Table of contents');
63
63
  });
64
64
 
65
65
  it('renders the provided `ariaLabel`', () => {
@@ -70,13 +70,13 @@ describe('macro: table-of-contents', () => {
70
70
  }),
71
71
  );
72
72
 
73
- expect($('.ons-toc').attr('aria-label')).toBe('Contents');
73
+ expect($('.ons-table-of-contents').attr('aria-label')).toBe('Contents');
74
74
  });
75
75
 
76
76
  it('renders title as heading element', () => {
77
77
  const $ = cheerio.load(renderComponent('table-of-contents', EXAMPLE_TABLE_OF_CONTENTS_SINGLE));
78
78
 
79
- expect($('.ons-toc__title').text().trim()).toBe('Contents');
79
+ expect($('.ons-table-of-contents__title').text().trim()).toBe('Contents');
80
80
  });
81
81
 
82
82
  describe('skip to content when `skipLink` is provided', () => {
@@ -1,4 +1,4 @@
1
- .ons-toc {
1
+ .ons-table-of-contents {
2
2
  &-container {
3
3
  border-bottom: 1px solid var(--ons-color-grey-15);
4
4
  margin-bottom: 2rem;
@@ -0,0 +1,13 @@
1
+ import domready from '../../js/domready';
2
+
3
+ async function tableOfContents() {
4
+ const tableOfContents = [...document.querySelectorAll('.ons-js-toc-container')];
5
+
6
+ if (tableOfContents.length) {
7
+ const TableOfContents = (await import('./table-of-contents')).default;
8
+
9
+ tableOfContents.forEach((component) => new TableOfContents(component));
10
+ }
11
+ }
12
+
13
+ domready(tableOfContents);
@@ -1,4 +1,4 @@
1
- export default class Toc {
1
+ export default class TableOfContents {
2
2
  constructor(component) {
3
3
  this.component = component;
4
4
  this.sections = [...this.component.querySelectorAll('section[id]')];
@@ -28,11 +28,11 @@ export default class Toc {
28
28
  this.activeSection = activeSection;
29
29
 
30
30
  for (let section of this.sections) {
31
- const tocItem = document.querySelector(`.ons-toc .ons-list__link[href="#${section.id}"]`);
31
+ const tocItem = document.querySelector(`.ons-table-of-contents .ons-list__link[href="#${section.id}"]`);
32
32
  if (section === activeSection) {
33
- tocItem.classList.add('ons-toc__link-active');
33
+ tocItem.classList.add('ons-table-of-contents__link-active');
34
34
  } else {
35
- tocItem.classList.remove('ons-toc__link-active');
35
+ tocItem.classList.remove('ons-table-of-contents__link-active');
36
36
  }
37
37
  }
38
38
  }
@@ -59,7 +59,7 @@ describe('script: table-of-contents', () => {
59
59
  await page.$eval(`#${sectionId}`, (node) => node.scrollIntoView());
60
60
  await setTimeout(250);
61
61
 
62
- const activeSection = await page.$eval('.ons-toc__link-active', (node) => node.innerText.trim());
62
+ const activeSection = await page.$eval('.ons-table-of-contents__link-active', (node) => node.innerText.trim());
63
63
  expect(activeSection).toBe(sectionTitle);
64
64
  });
65
65
  });
@@ -151,7 +151,7 @@ describe('script: table-of-contents-fixed-position', () => {
151
151
  );
152
152
  });
153
153
 
154
- it('when the "ons-grid__col--sticky" class is used, then the ToC stays in a fixed position while scrolling', async () => {
154
+ it('when the "ons-grid__col--sticky" class is used, then the table of contents stays in a fixed position while scrolling', async () => {
155
155
  await page.evaluate(() => {
156
156
  window.scrollTo(0, 1000);
157
157
  });
@@ -43,11 +43,10 @@
43
43
  border-radius: 3px 3px 0 0;
44
44
  color: var(--ons-color-text);
45
45
  display: inline-block;
46
- height: 2.55rem;
47
- line-height: 2.25rem;
46
+ height: 2.5rem;
48
47
  margin: 0 0.5rem 0 0;
49
48
  overflow: visible;
50
- padding: 0 1rem;
49
+ padding: 0.25rem 1rem 0.25rem;
51
50
  position: relative;
52
51
  text-decoration: underline;
53
52
 
@@ -62,10 +61,10 @@
62
61
  background-color: var(--ons-color-focus);
63
62
  border-bottom: 1px solid var(--ons-color-borders);
64
63
  box-shadow:
65
- inset 0 0 0 9px var(--ons-color-button-secondary),
66
- inset 17px 0 0 0 var(--ons-color-button-secondary),
67
- inset -17px 0 0 0 var(--ons-color-button-secondary),
68
- inset 0 -13px 0 0 var(--ons-color-text-link-focus);
64
+ inset 0 0 0 5px var(--ons-color-button-secondary),
65
+ inset 15px 0 0 0 var(--ons-color-button-secondary),
66
+ inset -14px 0 0 0 var(--ons-color-button-secondary),
67
+ inset 0 -9px 0 0 var(--ons-color-text-link-focus);
69
68
  color: var(--ons-color-text-link-focus);
70
69
 
71
70
  // Add transparent outline because Windows High Contrast Mode doesn't show box-shadows
@@ -88,10 +87,10 @@
88
87
  &:focus {
89
88
  background-color: var(--ons-color-focus);
90
89
  box-shadow:
91
- inset 0 0 0 9px var(--ons-color-page-light),
92
- inset 17px 0 0 0 var(--ons-color-page-light),
93
- inset -17px 0 0 0 var(--ons-color-page-light),
94
- inset 0 -13px 0 0 var(--ons-color-text-link-focus);
90
+ inset 0 0 0 5px var(--ons-color-page-light),
91
+ inset 15px 0 0 0 var(--ons-color-page-light),
92
+ inset -14px 0 0 0 var(--ons-color-page-light),
93
+ inset 0 -9px 0 0 var(--ons-color-text-link-focus);
95
94
  text-decoration: none;
96
95
  }
97
96
  }
@@ -40,8 +40,8 @@ export default class Tabs {
40
40
 
41
41
  // Set up checks for responsive functionality
42
42
  // The tabs will display as tabs up until this.breakpoint is reached
43
- // Tabs will display as a TOC list and show full content for <this.breakpoint viewports
44
- // Aria tags are added only in toc view
43
+ // Tabs will then display as a table of contents list and show full content for this.breakpoint viewports
44
+ // Aria tags are added only in table of contents view
45
45
  setupViewportChecks() {
46
46
  const breakpoint = () => {
47
47
  let finalBreakpoint = 0;
@@ -183,7 +183,7 @@ export default class Tabs {
183
183
  panel.classList.add(this.jsHiddenClass);
184
184
  }
185
185
 
186
- // Remove aria tags for TOC view
186
+ // Remove aria tags for table of contents view
187
187
  unsetAttributes(tab) {
188
188
  tab.removeAttribute('id');
189
189
  tab.removeAttribute('role');
@@ -216,7 +216,7 @@ describe('script: timeout modal', () => {
216
216
  it('closes the modal', async () => {
217
217
  const modalIsVisible = await page.$eval('.ons-modal', (node) => node.classList.contains('ons-u-db'));
218
218
 
219
- await setTimeout(50);
219
+ await setTimeout(100);
220
220
 
221
221
  expect(modalIsVisible).toBe(false);
222
222
  });