@ons/design-system 70.0.16 → 72.0.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.
Files changed (212) hide show
  1. package/README.md +10 -1
  2. package/components/access-code/_macro.njk +4 -4
  3. package/components/access-code/_macro.spec.js +10 -10
  4. package/components/access-code/example-access-code-error.njk +2 -2
  5. package/components/access-code/example-access-code.njk +2 -2
  6. package/components/accordion/_macro.njk +1 -1
  7. package/components/accordion/_macro.spec.js +162 -91
  8. package/components/accordion/_test_examples.js +13 -0
  9. package/components/address-input/_macro.njk +7 -7
  10. package/components/address-input/_macro.spec.js +16 -15
  11. package/components/address-input/autosuggest.address.error.js +1 -1
  12. package/components/address-input/autosuggest.address.js +25 -25
  13. package/components/address-input/autosuggest.address.spec.js +6 -5
  14. package/components/address-input/example-address-input-editable.njk +5 -4
  15. package/components/address-input/example-address-input.njk +4 -5
  16. package/components/autosuggest/_autosuggest.scss +8 -8
  17. package/components/autosuggest/_macro.njk +5 -5
  18. package/components/autosuggest/autosuggest.spec.js +1 -1
  19. package/components/back-to-top/_back-to-top.scss +2 -2
  20. package/components/back-to-top/_macro.spec.js +1 -1
  21. package/components/back-to-top/example-full-page-back-to-top.njk +6 -6
  22. package/components/breadcrumbs/_breadcrumbs.scss +1 -1
  23. package/components/breadcrumbs/_macro.spec.js +121 -115
  24. package/components/breadcrumbs/_test_examples.js +36 -0
  25. package/components/browser-banner/_macro.spec.js +1 -1
  26. package/components/button/_button.scss +24 -16
  27. package/components/button/_macro.njk +5 -5
  28. package/components/button/_macro.spec.js +2 -2
  29. package/components/button/example-button-custom.njk +1 -1
  30. package/components/card/_card.scss +0 -6
  31. package/components/card/_macro.njk +9 -9
  32. package/components/card/_macro.spec.js +57 -24
  33. package/components/card/example-card-set-with-images.njk +30 -18
  34. package/components/card/example-card-set-with-lists.njk +57 -45
  35. package/components/card/example-card-set.njk +27 -15
  36. package/components/card/example-card.njk +9 -5
  37. package/components/char-check-limit/_macro.njk +1 -1
  38. package/components/checkboxes/_checkbox.scss +4 -4
  39. package/components/checkboxes/_checkboxes.scss +1 -1
  40. package/components/checkboxes/example-checkboxes-with-hidden-label.njk +4 -4
  41. package/components/cookies-banner/_cookies-banner.scss +5 -5
  42. package/components/cookies-banner/_macro.njk +15 -13
  43. package/components/cookies-banner/_macro.spec.js +1 -1
  44. package/components/details/_details.scss +5 -6
  45. package/components/details/_macro.njk +4 -4
  46. package/components/details/_macro.spec.js +1 -1
  47. package/components/document-list/_document-list.scss +0 -2
  48. package/components/document-list/_macro.njk +18 -18
  49. package/components/document-list/_macro.spec.js +16 -14
  50. package/components/document-list/example-document-list-article-featured.njk +5 -3
  51. package/components/document-list/example-document-list-articles.njk +15 -9
  52. package/components/document-list/example-document-list-downloads.njk +15 -9
  53. package/components/document-list/example-document-list-search-result-featured.njk +5 -3
  54. package/components/document-list/example-document-list-search-results.njk +20 -12
  55. package/components/download-resources/_download-resources.scss +1 -2
  56. package/components/download-resources/download-resources.spec.js +12 -6
  57. package/components/external-link/_macro.njk +1 -1
  58. package/components/external-link/_macro.spec.js +1 -1
  59. package/components/external-link/example-external-link.njk +1 -1
  60. package/components/feedback/_macro.njk +1 -1
  61. package/components/feedback/_macro.spec.js +3 -3
  62. package/components/feedback/example-feedback-call-to-action.njk +1 -1
  63. package/components/field/_field-group.scss +0 -2
  64. package/components/field/_field.scss +1 -2
  65. package/components/fieldset/_fieldset.scss +2 -2
  66. package/components/fieldset/_macro.njk +1 -1
  67. package/components/fieldset/_macro.spec.js +1 -1
  68. package/components/footer/_footer.scss +12 -7
  69. package/components/footer/_macro.njk +54 -34
  70. package/components/footer/_macro.spec.js +90 -28
  71. package/components/footer/example-footer-cymraeg.njk +1 -1
  72. package/components/footer/example-footer-transactional.njk +1 -1
  73. package/components/footer/example-footer-warning.njk +1 -1
  74. package/components/footer/example-footer-with-alternative-organisation.njk +99 -94
  75. package/components/footer/example-footer-with-coat-of-arms.njk +1 -1
  76. package/components/footer/example-footer-with-copyright.njk +1 -1
  77. package/components/footer/example-footer-with-multiple-logos-and-split-display.njk +173 -0
  78. package/components/footer/example-footer-with-multiple-logos.njk +172 -0
  79. package/components/footer/example-footer.njk +1 -1
  80. package/components/header/_header.scss +7 -14
  81. package/components/header/_macro.njk +19 -19
  82. package/components/header/_macro.spec.js +18 -18
  83. package/components/header/example-header-external-for-surveys.njk +2 -2
  84. package/components/header/example-header-external-welsh.njk +2 -2
  85. package/components/header/example-header-external-with-sub-navigation-removed.njk +1 -1
  86. package/components/header/example-header-external-with-sub-navigation.njk +1 -1
  87. package/components/header/example-header-multiple-logos.njk +4 -4
  88. package/components/hero/_hero.scss +6 -8
  89. package/components/hero/_macro.njk +1 -1
  90. package/components/icon/_icon.scss +4 -4
  91. package/components/icon/_macro.njk +4 -4
  92. package/components/icon/_macro.spec.js +2 -2
  93. package/components/image/_image.scss +1 -1
  94. package/components/image/_macro.njk +1 -1
  95. package/components/image/_macro.spec.js +10 -10
  96. package/components/image/example-image-for-regular-screens.njk +1 -1
  97. package/components/input/_input-type.scss +0 -2
  98. package/components/input/_input.scss +10 -10
  99. package/components/input/_macro.njk +4 -2
  100. package/components/input/example-input-search-with-character-check.njk +1 -1
  101. package/components/input/example-input-search.njk +1 -1
  102. package/components/label/_label.scss +1 -3
  103. package/components/language-selector/_macro.njk +3 -3
  104. package/components/language-selector/_macro.spec.js +7 -7
  105. package/components/list/_list.scss +1 -5
  106. package/components/list/_macro.njk +9 -10
  107. package/components/list/_macro.spec.js +50 -9
  108. package/components/list/example-inline-list-with-social-icon-prefix.njk +1 -1
  109. package/components/message/_macro.njk +3 -3
  110. package/components/message/_macro.spec.js +3 -3
  111. package/components/message-list/_macro.njk +2 -2
  112. package/components/message-list/_macro.spec.js +8 -4
  113. package/components/message-list/_message-list.scss +2 -2
  114. package/components/navigation/_macro.njk +9 -9
  115. package/components/navigation/_macro.spec.js +2 -2
  116. package/components/navigation/_navigation.scss +2 -6
  117. package/components/navigation/navigation.dom.js +1 -1
  118. package/components/navigation/navigation.spec.js +4 -4
  119. package/components/pagination/_macro.njk +2 -2
  120. package/components/pagination/_pagination.scss +1 -7
  121. package/components/panel/_macro.njk +5 -4
  122. package/components/panel/_macro.spec.js +2 -2
  123. package/components/panel/_panel.scss +12 -8
  124. package/components/password/_macro.njk +1 -1
  125. package/components/password/_macro.spec.js +2 -2
  126. package/components/phase-banner/_macro.njk +1 -1
  127. package/components/phase-banner/_phase-banner.scss +3 -4
  128. package/components/phase-banner/example-phase-banner-alpha.njk +1 -1
  129. package/components/phase-banner/example-phase-banner-beta.njk +1 -1
  130. package/components/question/_macro.njk +8 -8
  131. package/components/question/_macro.spec.js +3 -3
  132. package/components/question/_question.scss +3 -3
  133. package/components/radios/_macro.njk +1 -1
  134. package/components/radios/_macro.spec.js +1 -1
  135. package/components/radios/_radios.scss +1 -1
  136. package/components/radios/example-radios-with-clear-button-expanded.njk +1 -1
  137. package/components/radios/example-radios-with-clear-button.njk +1 -1
  138. package/components/related-content/_macro.spec.js +2 -2
  139. package/components/related-content/_related-content.scss +1 -1
  140. package/components/related-content/example-related-content-general.njk +2 -2
  141. package/components/related-content/example-related-content-social-media.njk +1 -1
  142. package/components/reply/_macro.njk +3 -1
  143. package/components/reply/_macro.spec.js +1 -1
  144. package/components/reply/reply.spec.js +1 -1
  145. package/components/section-navigation/_macro.njk +10 -10
  146. package/components/section-navigation/_macro.spec.js +15 -15
  147. package/components/section-navigation/_section-navigation.scss +3 -8
  148. package/components/section-navigation/example-section-navigation-single-vertical-with-title.njk +3 -3
  149. package/components/section-navigation/example-section-navigation-vertical.njk +14 -14
  150. package/components/section-navigation/example-section-navigation.njk +3 -3
  151. package/components/select/example-select-with-inline-label.njk +1 -1
  152. package/components/share-page/_macro.njk +7 -7
  153. package/components/share-page/_macro.spec.js +2 -2
  154. package/components/share-page/example-share-page.njk +1 -1
  155. package/components/status/_status.scss +1 -1
  156. package/components/summary/_macro.njk +33 -33
  157. package/components/summary/_macro.spec.js +34 -34
  158. package/components/summary/_summary.scss +2 -4
  159. package/components/summary/example-summary-card-grouped.njk +34 -34
  160. package/components/summary/example-summary-grouped-total.njk +7 -7
  161. package/components/summary/example-summary-grouped-with-errors.njk +9 -9
  162. package/components/summary/example-summary-grouped.njk +34 -34
  163. package/components/summary/example-summary-household.njk +7 -7
  164. package/components/summary/example-summary-hub-minimal.njk +8 -8
  165. package/components/summary/example-summary-hub.njk +16 -16
  166. package/components/summary/example-summary-multiple.njk +7 -7
  167. package/components/summary/example-summary-no-action.njk +5 -5
  168. package/components/summary/example-summary.njk +9 -9
  169. package/components/table/_table.scss +2 -3
  170. package/components/table-of-contents/_macro.njk +3 -3
  171. package/components/table-of-contents/_macro.spec.js +3 -3
  172. package/components/table-of-contents/example-table-of-contents-sticky-full-page.njk +1 -1
  173. package/components/tabs/_macro.njk +3 -3
  174. package/components/tabs/_macro.spec.js +3 -3
  175. package/components/tabs/_tabs.scss +3 -4
  176. package/components/tabs/example-tabs-details.njk +1 -1
  177. package/components/text-indent/_text-indent.scss +1 -1
  178. package/components/text-indent/example-text-indent.njk +1 -1
  179. package/components/timeline/_macro.njk +4 -4
  180. package/components/timeline/_macro.spec.js +3 -3
  181. package/components/timeline/_timeline.scss +4 -3
  182. package/components/timeline/example-timeline.njk +1 -1
  183. package/components/upload/_upload.scss +2 -2
  184. package/components/video/_macro.njk +4 -4
  185. package/components/video/_macro.spec.js +2 -2
  186. package/components/video/_video.scss +1 -1
  187. package/components/video/example-video.njk +2 -2
  188. package/components/video/video.spec.js +2 -2
  189. package/css/main.css +1 -1
  190. package/layout/_dsTemplate.njk +1 -1
  191. package/layout/_template.njk +31 -31
  192. package/package.json +3 -2
  193. package/scripts/main.es5.js +1 -1
  194. package/scripts/main.js +1 -1
  195. package/scss/base/_global.scss +2 -0
  196. package/scss/base/_typography.scss +0 -2
  197. package/scss/main.scss +0 -1
  198. package/scss/objects/_container.scss +1 -1
  199. package/scss/objects/_page.scss +2 -3
  200. package/scss/overrides/rtl.scss +1 -1
  201. package/scss/utilities/_grid.scss +103 -96
  202. package/scss/utilities/_margin.scss +11 -5
  203. package/scss/utilities/_padding.scss +12 -5
  204. package/scss/utilities/_typography.scss +2 -1
  205. package/scss/vars/_forms.scss +8 -10
  206. package/scss/vars/_grid.scss +4 -4
  207. package/scss/vars/_typography.scss +26 -19
  208. package/components/call-to-action/_call-to-action.scss +0 -8
  209. package/components/call-to-action/_macro.njk +0 -24
  210. package/components/call-to-action/_macro.spec.js +0 -48
  211. package/components/call-to-action/example-call-to-action-default.njk +0 -15
  212. package/components/metadata/_macro.njk +0 -14
@@ -9,8 +9,8 @@
9
9
  {
10
10
  "rows": [
11
11
  {
12
- "rowTitle": "People who live here",
13
- "rowItems": [
12
+ "title": "People who live here",
13
+ "itemsList": [
14
14
  {
15
15
  "iconType": "check",
16
16
  "valueList": [
@@ -29,8 +29,8 @@
29
29
  ]
30
30
  },
31
31
  {
32
- "rowTitle": "Accommodation",
33
- "rowItems": [
32
+ "title": "Accommodation",
33
+ "itemsList": [
34
34
  {
35
35
  "iconType": "check",
36
36
  "valueList": [
@@ -49,8 +49,8 @@
49
49
  ]
50
50
  },
51
51
  {
52
- "rowTitle": "Mary Smith (You)",
53
- "rowItems": [
52
+ "title": "Mary Smith (You)",
53
+ "itemsList": [
54
54
  {
55
55
  "iconType": "check",
56
56
  "valueList": [
@@ -69,8 +69,8 @@
69
69
  ]
70
70
  },
71
71
  {
72
- "rowTitle": "John Smith",
73
- "rowItems": [
72
+ "title": "John Smith",
73
+ "itemsList": [
74
74
  {
75
75
  "valueList": [
76
76
  {
@@ -88,8 +88,8 @@
88
88
  ]
89
89
  },
90
90
  {
91
- "rowTitle": "Billy Smith",
92
- "rowItems": [
91
+ "title": "Billy Smith",
92
+ "itemsList": [
93
93
  {
94
94
  "valueList": [
95
95
  {
@@ -107,8 +107,8 @@
107
107
  ]
108
108
  },
109
109
  {
110
- "rowTitle": "Sally Smith",
111
- "rowItems": [
110
+ "title": "Sally Smith",
111
+ "itemsList": [
112
112
  {
113
113
  "valueList": [
114
114
  {
@@ -126,8 +126,8 @@
126
126
  ]
127
127
  },
128
128
  {
129
- "rowTitle": "Wilhelmina Susannah Clementine-Smith (Visitor)",
130
- "rowItems": [
129
+ "title": "Wilhelmina Susannah Clementine-Smith (Visitor)",
130
+ "itemsList": [
131
131
  {
132
132
  "valueList": [
133
133
  {
@@ -145,8 +145,8 @@
145
145
  ]
146
146
  },
147
147
  {
148
- "rowTitle": "Vera Jones (Visitor)",
149
- "rowItems": [
148
+ "title": "Vera Jones (Visitor)",
149
+ "itemsList": [
150
150
  {
151
151
  "valueList": [
152
152
  {
@@ -3,15 +3,15 @@
3
3
  onsSummary({
4
4
  "summaries": [
5
5
  {
6
- "summaryTitle": "Summary - Section Title",
6
+ "title": "Summary - Section Title",
7
7
  "groups": [
8
8
  {
9
9
  "rows": [
10
10
  {
11
- "rowTitle": "What are your monthly household expenses?",
12
- "rowItems": [
11
+ "title": "What are your monthly household expenses?",
12
+ "itemsList": [
13
13
  {
14
- "rowTitle": "Food",
14
+ "title": "Food",
15
15
  "valueList": [
16
16
  {
17
17
  "text": "£50.00"
@@ -26,7 +26,7 @@
26
26
  ]
27
27
  },
28
28
  {
29
- "rowTitle": "Utilities",
29
+ "title": "Utilities",
30
30
  "valueList": [
31
31
  {
32
32
  "text": "£65.00"
@@ -41,7 +41,7 @@
41
41
  ]
42
42
  },
43
43
  {
44
- "rowTitle": "Transport",
44
+ "title": "Transport",
45
45
  "valueList": [
46
46
  {
47
47
  "text": "£70.00"
@@ -56,7 +56,7 @@
56
56
  ]
57
57
  },
58
58
  {
59
- "rowTitle": "Other",
59
+ "title": "Other",
60
60
  "valueList": [
61
61
  {
62
62
  "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
@@ -5,11 +5,11 @@
5
5
  {
6
6
  "groups": [
7
7
  {
8
- "groupTitle": "Turnover",
8
+ "title": "Turnover",
9
9
  "rows": [
10
10
  {
11
- "rowTitle": "What are the dates of the sales period you are reporting for?",
12
- "rowItems": [
11
+ "title": "What are the dates of the sales period you are reporting for?",
12
+ "itemsList": [
13
13
  {
14
14
  "valueList": [
15
15
  {
@@ -20,8 +20,8 @@
20
20
  ]
21
21
  },
22
22
  {
23
- "rowTitle": "Total turnover",
24
- "rowItems": [
23
+ "title": "Total turnover",
24
+ "itemsList": [
25
25
  {
26
26
  "valueList": [
27
27
  {
@@ -8,12 +8,12 @@
8
8
  {
9
9
  "placeholderText": 'test',
10
10
  "id": "turnover",
11
- "groupTitle": "Turnover",
11
+ "title": "Turnover",
12
12
  "rows": [
13
13
  {
14
14
  "id": "sales-dates-row",
15
- "rowTitle": "What are the dates of the sales period you are reporting for?",
16
- "rowItems": [
15
+ "title": "What are the dates of the sales period you are reporting for?",
16
+ "itemsList": [
17
17
  {
18
18
  "id": "sales-dates",
19
19
  "valueList": [
@@ -32,9 +32,9 @@
32
32
  ]
33
33
  },
34
34
  {
35
- "rowTitle": "For the period 1 January 2015 to 2 February 2017, what was the value of your total turnover, excluding VAT?",
35
+ "title": "For the period 1 January 2015 to 2 February 2017, what was the value of your total turnover, excluding VAT?",
36
36
  "id": "sales-value-row",
37
- "rowItems": [
37
+ "itemsList": [
38
38
  {
39
39
  "id": "sales-value",
40
40
  "valueList": [
@@ -54,8 +54,8 @@
54
54
  },
55
55
  {
56
56
  "id": "sales-reasons-row",
57
- "rowTitle": "Please indicate the reasons for any changes in the total turnover",
58
- "rowItems": [
57
+ "title": "Please indicate the reasons for any changes in the total turnover",
58
+ "itemsList": [
59
59
  {
60
60
  "id": "sales-reasons",
61
61
  "valueList": [
@@ -79,8 +79,8 @@
79
79
  },
80
80
  {
81
81
  "id": "sales-detail-row",
82
- "rowTitle": "Please describe the changes in total turnover in more detail",
83
- "rowItems": [
82
+ "title": "Please describe the changes in total turnover in more detail",
83
+ "itemsList": [
84
84
  {
85
85
  "id": "sales-detail",
86
86
  "valueList": [
@@ -63,7 +63,7 @@
63
63
  }
64
64
 
65
65
  &--responsive {
66
- @include mq(xxs, s) {
66
+ @include mq('2xs', s) {
67
67
  .ons-table__header {
68
68
  display: none;
69
69
  }
@@ -124,7 +124,7 @@
124
124
  }
125
125
  .ons-table__header,
126
126
  .ons-table__cell {
127
- @include mq(xxs, m) {
127
+ @include mq('2xs', m) {
128
128
  white-space: nowrap;
129
129
  }
130
130
  }
@@ -207,7 +207,6 @@
207
207
  display: inline-block;
208
208
  font-family: $font-sans;
209
209
  font-weight: $font-weight-bold;
210
- line-height: 1rem;
211
210
  padding: 0 0 0.2rem;
212
211
  white-space: nowrap;
213
212
 
@@ -17,14 +17,14 @@
17
17
  {% if params.lists %}
18
18
  {% for list in params.lists %}
19
19
  {% if list.listHeading %}
20
- <h3 class="ons-u-fs-r ons-u-mb-xs">
20
+ <h3 class="ons-u-fs-r ons-u-mb-2xs">
21
21
  {{ list.listHeading }}<span class="ons-u-vh"> {{ list.listHeadingHidden }}</span>:
22
22
  </h3>
23
23
  {% endif %}
24
24
  {{
25
25
  onsList({
26
26
  "element": 'ol',
27
- "classes": 'ons-u-mb-m',
27
+ "classes": 'ons-u-mb-l',
28
28
  "variants": 'dashed',
29
29
  "itemsList": list.itemsList
30
30
  })
@@ -34,7 +34,7 @@
34
34
  {{
35
35
  onsList({
36
36
  "element": 'ol',
37
- "classes": 'ons-u-mb-m',
37
+ "classes": 'ons-u-mb-l',
38
38
  "variants": 'dashed',
39
39
  "itemsList": params.itemsList
40
40
  })
@@ -116,7 +116,7 @@ describe('macro: table-of-contents', () => {
116
116
 
117
117
  expect(listsSpy.occurrences[0]).toEqual({
118
118
  element: 'ol',
119
- classes: 'ons-u-mb-m',
119
+ classes: 'ons-u-mb-l',
120
120
  variants: 'dashed',
121
121
  itemsList: EXAMPLE_TABLE_OF_CONTENTS_SINGLE.itemsList,
122
122
  });
@@ -155,13 +155,13 @@ describe('macro: table-of-contents', () => {
155
155
 
156
156
  expect(listsSpy.occurrences[0]).toEqual({
157
157
  element: 'ol',
158
- classes: 'ons-u-mb-m',
158
+ classes: 'ons-u-mb-l',
159
159
  variants: 'dashed',
160
160
  itemsList: EXAMPLE_TABLE_OF_CONTENTS_MULTIPLE.lists[0].itemsList,
161
161
  });
162
162
  expect(listsSpy.occurrences[1]).toEqual({
163
163
  element: 'ol',
164
- classes: 'ons-u-mb-m',
164
+ classes: 'ons-u-mb-l',
165
165
  variants: 'dashed',
166
166
  itemsList: EXAMPLE_TABLE_OF_CONTENTS_MULTIPLE.lists[1].itemsList,
167
167
  });
@@ -24,7 +24,7 @@ layout: ~
24
24
  ]
25
25
  },
26
26
  "footer": {
27
- "OGLLink": {
27
+ "oglLink": {
28
28
  "pre": 'All content is available under the',
29
29
  "link": 'Open Government Licence v3.0',
30
30
  "url": 'https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/',
@@ -8,9 +8,9 @@
8
8
  {% endset %}
9
9
 
10
10
  <section class="{{ classes }}" {% if params.noInitialActiveTab %}data-no-initial-active-tab="true"{% endif %}>
11
- {% set titleTag = params.titleTag | default("h2") %}
12
- {% set openingTag = "<" + titleTag %}
13
- {% set closingTag = "</" + titleTag + ">" %}
11
+ {% set titleTag = params.headingLevel | default(2) %}
12
+ {% set openingTag = "<h" ~ titleTag %}
13
+ {% set closingTag = "</h" ~ titleTag ~ ">" %}
14
14
  {{ openingTag | safe }}
15
15
  class="ons-tabs__title ons-u-fs-r--b
16
16
  ons-u-mt-no{{ ' ' + params.titleClasses if params.titleClasses else '' }}">{{ params.title }}{{ closingTag | safe }}
@@ -83,12 +83,12 @@ describe('macro: tabs', () => {
83
83
  const $ = cheerio.load(
84
84
  renderComponent('tabs', {
85
85
  ...EXAMPLE_TABS,
86
- titleTag: 'h4',
86
+ headingLevel: 4,
87
87
  }),
88
88
  );
89
89
 
90
- const titleTag = $('.ons-tabs__title')[0].tagName;
91
- expect(titleTag).toBe('h4');
90
+ const expectedTitleTag = $('.ons-tabs__title')[0].tagName;
91
+ expect(expectedTitleTag).toBe('h4');
92
92
  });
93
93
 
94
94
  it('has the provided tab id attributes', () => {
@@ -30,7 +30,7 @@
30
30
  box-sizing: border-box;
31
31
  display: list-item;
32
32
  list-style: none;
33
- margin: 0 0 0.3rem;
33
+ margin: 0 0 0.25rem;
34
34
 
35
35
  &--row {
36
36
  display: inline;
@@ -44,8 +44,8 @@
44
44
  color: var(--ons-color-text);
45
45
  display: inline-block;
46
46
  height: 2.55rem;
47
- line-height: 2.3rem;
48
- margin: 0 0.4rem 0 0;
47
+ line-height: 2.25rem;
48
+ margin: 0 0.5rem 0 0;
49
49
  overflow: visible;
50
50
  padding: 0 1rem;
51
51
  position: relative;
@@ -143,7 +143,6 @@
143
143
  }
144
144
 
145
145
  .ons-tabs__panel {
146
- margin-top: 1px;
147
146
  padding: 1rem;
148
147
  }
149
148
  }
@@ -16,7 +16,7 @@
16
16
  "alt": "Youtube video"
17
17
  },
18
18
  "title": 'Transforming the way we produce statistics | Explaining the Dynamic Population Model | BSL',
19
- "linkText": 'Watch “Transforming the way we produce statistics | Explaining the Dynamic Population Model | BSL“ on Youtube'
19
+ "videoLinkText": 'Watch “Transforming the way we produce statistics | Explaining the Dynamic Population Model | BSL“ on Youtube'
20
20
  })
21
21
  }}
22
22
  {% from "components/tabs/_macro.njk" import onsTabs %}
@@ -1,5 +1,5 @@
1
1
  .ons-text-indent {
2
2
  border-left: 4px solid var(--ons-color-borders-indent);
3
3
  margin: 0 0 1rem;
4
- padding: 0 0 0 1.3em;
4
+ padding: 0 0 0 1.5rem;
5
5
  }
@@ -1,6 +1,6 @@
1
1
  {% from "components/text-indent/_macro.njk" import onsTextIndent %}
2
2
  {{-
3
3
  onsTextIndent({
4
- text: '<p>Telephone: 0800 141 2021<br>Monday to Friday, 8 am to 7pm<br>Saturday, 8am to 4pm</p>'
4
+ "text": '<p>Telephone: 0800 141 2021<br>Monday to Friday, 8 am to 7pm<br>Saturday, 8am to 4pm</p>'
5
5
  })
6
6
  -}}
@@ -2,10 +2,10 @@
2
2
  {% from "components/list/_macro.njk" import onsList %}
3
3
 
4
4
  <div class="ons-timeline{{ ' ' + params.classes if params.classes else '' }}">
5
- {% set titleTag = params.titleTag | default("h2") %}
6
- {% set openingTag = "<" + titleTag %}
7
- {% set closingTag = "</" + titleTag + ">" %}
8
- {% for item in params.items %}
5
+ {% set titleTag = params.headingLevel | default(2) %}
6
+ {% set openingTag = "<h" ~ titleTag %}
7
+ {% set closingTag = "</h" ~ titleTag ~ ">" %}
8
+ {% for item in params.timelineItems %}
9
9
  <div class="ons-timeline__item">
10
10
  {{ openingTag | safe }} class="ons-timeline__heading">{{ item.heading }}{{ closingTag | safe }}
11
11
  {% if item.itemsList %}
@@ -6,7 +6,7 @@ import axe from '../../tests/helpers/axe';
6
6
  import { renderComponent, templateFaker } from '../../tests/helpers/rendering';
7
7
 
8
8
  const EXAMPLE_TIMELINE = {
9
- items: [
9
+ timelineItems: [
10
10
  {
11
11
  heading: 'January 2020',
12
12
  content: 'Timeline entry 1',
@@ -63,10 +63,10 @@ describe('macro: timeline', () => {
63
63
  expect($secondItem.text()).toContain('Timeline entry 2');
64
64
  });
65
65
 
66
- it('renders a heading based upon titleTag parameter', () => {
66
+ it('renders a heading based upon `headingLevel` parameter', () => {
67
67
  const EXAMPLE_TIMELINE_WITH_TITLE_TAG = {
68
68
  ...EXAMPLE_TIMELINE,
69
- titleTag: 'h3',
69
+ headingLevel: 3,
70
70
  };
71
71
  const $ = cheerio.load(renderComponent('timeline', EXAMPLE_TIMELINE_WITH_TITLE_TAG));
72
72
  const $firstItem = $('.ons-timeline__item:nth-child(1)');
@@ -8,7 +8,7 @@
8
8
  height: 100%;
9
9
  left: 0;
10
10
  position: absolute;
11
- top: 10px;
11
+ top: 12px;
12
12
  }
13
13
  }
14
14
 
@@ -22,7 +22,7 @@
22
22
  height: 4px;
23
23
  left: -1.5rem;
24
24
  position: absolute;
25
- top: 10px;
25
+ top: 12px;
26
26
  width: 12px;
27
27
  }
28
28
 
@@ -32,6 +32,7 @@
32
32
  }
33
33
 
34
34
  .ons-timeline__heading {
35
- font-size: 1rem !important;
35
+ @extend .ons-u-fs-r--b;
36
+
36
37
  margin-bottom: 0.5rem;
37
38
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  {{
4
4
  onsTimeline({
5
- "items": [
5
+ "timelineItems": [
6
6
  {
7
7
  "heading": 'September to October 2020',
8
8
  "itemsList": [
@@ -2,9 +2,10 @@
2
2
  background: var(--ons-color-white);
3
3
  border: 1px solid var(--ons-color-input-border);
4
4
  border-radius: $input-radius;
5
- font-size: 1rem;
6
5
  padding: 0;
7
6
  width: 100%;
7
+ // custom line height to center the placeholder text
8
+ line-height: 1.5rem;
8
9
  &::-webkit-file-upload-button {
9
10
  background: var(--ons-color-button-secondary);
10
11
  border: 0;
@@ -12,7 +13,6 @@
12
13
  border-right: 1px solid var(--ons-color-input-border);
13
14
  border-top-right-radius: 0;
14
15
  color: var(--ons-color-text);
15
- font-size: 1rem;
16
16
  outline: none;
17
17
  padding: 0.5rem 1rem;
18
18
  transition: border-color 200ms ease-in;
@@ -4,22 +4,22 @@
4
4
  {% set linkContents %}
5
5
  {% if params.image.smallSrc %}
6
6
  <img
7
- class="ons-video__img ons-u-mb-xs"
7
+ class="ons-video__img ons-u-mb-2xs"
8
8
  {% if params.image.largeSrc %}srcset="{{ params.image.smallSrc }} 1x, {{ params.image.largeSrc }} 2x"{% endif %}
9
9
  src="{{ params.image.smallSrc }}"
10
10
  alt="{{ params.image.alt }}"
11
11
  loading="lazy"
12
12
  />
13
13
  {% endif %}
14
- <span class="ons-video__link-text ons-u-mt-xs">{{ params.linkText }}</span>
14
+ <span class="ons-video__link-text ons-u-mt-2xs">{{ params.videoLinkText }}</span>
15
15
  {% endset %}
16
16
 
17
17
  <div class="ons-video ons-js-video">
18
18
  {{
19
19
  onsExternalLink({
20
- "url": params.videoLinkURL,
20
+ "url": params.videoLinkUrl,
21
21
  "classes": "ons-video__link ons-js-video-placeholder ons-u-db",
22
- "linkText": linkContents
22
+ "text": linkContents
23
23
  })
24
24
  }}
25
25
  <iframe
@@ -7,9 +7,9 @@ import { renderComponent } from '../../tests/helpers/rendering';
7
7
 
8
8
  const EXAMPLE_VIDEO_YOUTUBE = {
9
9
  videoEmbedUrl: 'https://www.youtube.com/embed/_EGJlvkgbPo',
10
- videoLinkURL: 'https://www.youtube.com/watch?v=_EGJlvkgbPo',
10
+ videoLinkUrl: 'https://www.youtube.com/watch?v=_EGJlvkgbPo',
11
11
  title: 'Census 2021 promotional TV advert',
12
- linkText: 'Example link text',
12
+ videoLinkText: 'Example link text',
13
13
  image: {
14
14
  smallSrc: 'example-small.png',
15
15
  largeSrc: 'example-large.png',
@@ -1,5 +1,5 @@
1
1
  .ons-video {
2
- @extend .ons-u-mb-m;
2
+ @extend .ons-u-mb-l;
3
3
 
4
4
  &--hasIframe {
5
5
  height: 0;
@@ -2,13 +2,13 @@
2
2
  {{
3
3
  onsVideo({
4
4
  "videoEmbedUrl": 'https://www.youtube.com/embed/OwYVwPPxPj4',
5
- "videoLinkURL": 'https://www.youtube.com/watch?v=OwYVwPPxPj4',
5
+ "videoLinkUrl": 'https://www.youtube.com/watch?v=OwYVwPPxPj4',
6
6
  "image": {
7
7
  "largeSrc": '/ds-img/youtube-example-cover.png',
8
8
  "smallSrc": '/ds-img/youtube-example-cover.png',
9
9
  "alt": "Youtube video"
10
10
  },
11
11
  "title": 'Transforming the way we produce statistics | Explaining the Dynamic Population Model | BSL',
12
- "linkText": 'Watch “Transforming the way we produce statistics | Explaining the Dynamic Population Model | BSL“ on Youtube'
12
+ "videoLinkText": 'Watch “Transforming the way we produce statistics | Explaining the Dynamic Population Model | BSL“ on Youtube'
13
13
  })
14
14
  }}
@@ -5,13 +5,13 @@ const { setTimeout } = require('node:timers/promises');
5
5
  const EXAMPLE_VIDEO_YOUTUBE = {
6
6
  videoEmbedUrl: 'https://www.youtube.com/embed/_EGJlvkgbPo',
7
7
  title: 'Census 2021 promotional TV advert',
8
- linkText: 'Example link text',
8
+ videoLinkText: 'Example link text',
9
9
  };
10
10
 
11
11
  const EXAMPLE_VIDEO_VIMEO = {
12
12
  videoEmbedUrl: 'https://player.vimeo.com/video/838454524?h=24551a3754',
13
13
  title: 'Vimeo Video',
14
- linkText: 'Example link text',
14
+ videoLinkText: 'Example link text',
15
15
  };
16
16
 
17
17
  const EXAMPLE_APPROVED_COOKIE = JSON.stringify({ campaigns: true }).replace(/"/g, "'");