@ons/design-system 70.0.17 → 72.0.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 (204) hide show
  1. package/components/access-code/_macro.njk +4 -4
  2. package/components/access-code/_macro.spec.js +8 -8
  3. package/components/access-code/example-access-code-error.njk +2 -2
  4. package/components/access-code/example-access-code.njk +2 -2
  5. package/components/accordion/_macro.njk +1 -1
  6. package/components/accordion/_macro.spec.js +1 -1
  7. package/components/address-input/_macro.njk +7 -7
  8. package/components/address-input/_macro.spec.js +16 -15
  9. package/components/address-input/autosuggest.address.error.js +1 -1
  10. package/components/address-input/autosuggest.address.js +25 -25
  11. package/components/address-input/autosuggest.address.spec.js +6 -5
  12. package/components/address-input/example-address-input-editable.njk +5 -4
  13. package/components/address-input/example-address-input.njk +4 -5
  14. package/components/autosuggest/_autosuggest.scss +8 -8
  15. package/components/autosuggest/_macro.njk +5 -5
  16. package/components/autosuggest/autosuggest.spec.js +1 -1
  17. package/components/back-to-top/_back-to-top.scss +2 -2
  18. package/components/back-to-top/example-full-page-back-to-top.njk +6 -6
  19. package/components/breadcrumbs/_breadcrumbs.scss +1 -1
  20. package/components/button/_button.scss +24 -16
  21. package/components/button/_macro.njk +3 -3
  22. package/components/button/example-button-custom.njk +1 -1
  23. package/components/card/_card.scss +0 -6
  24. package/components/card/_macro.njk +9 -9
  25. package/components/card/_macro.spec.js +57 -24
  26. package/components/card/example-card-set-with-images.njk +30 -18
  27. package/components/card/example-card-set-with-lists.njk +57 -45
  28. package/components/card/example-card-set.njk +27 -15
  29. package/components/card/example-card.njk +9 -5
  30. package/components/char-check-limit/_macro.njk +1 -1
  31. package/components/checkboxes/_checkbox.scss +4 -4
  32. package/components/checkboxes/_checkboxes.scss +1 -1
  33. package/components/checkboxes/example-checkboxes-with-hidden-label.njk +4 -4
  34. package/components/cookies-banner/_cookies-banner.scss +5 -5
  35. package/components/cookies-banner/_macro.njk +15 -13
  36. package/components/cookies-banner/_macro.spec.js +1 -1
  37. package/components/details/_details.scss +5 -6
  38. package/components/details/_macro.njk +4 -4
  39. package/components/details/_macro.spec.js +1 -1
  40. package/components/document-list/_document-list.scss +0 -2
  41. package/components/document-list/_macro.njk +18 -18
  42. package/components/document-list/_macro.spec.js +16 -14
  43. package/components/document-list/example-document-list-article-featured.njk +5 -3
  44. package/components/document-list/example-document-list-articles.njk +15 -9
  45. package/components/document-list/example-document-list-downloads.njk +15 -9
  46. package/components/document-list/example-document-list-search-result-featured.njk +5 -3
  47. package/components/document-list/example-document-list-search-results.njk +20 -12
  48. package/components/download-resources/_download-resources.scss +1 -2
  49. package/components/download-resources/download-resources.spec.js +12 -6
  50. package/components/external-link/_macro.njk +1 -1
  51. package/components/external-link/_macro.spec.js +1 -1
  52. package/components/external-link/example-external-link.njk +1 -1
  53. package/components/feedback/_macro.njk +1 -1
  54. package/components/feedback/_macro.spec.js +3 -3
  55. package/components/feedback/example-feedback-call-to-action.njk +1 -1
  56. package/components/field/_field-group.scss +0 -2
  57. package/components/field/_field.scss +1 -2
  58. package/components/fieldset/_fieldset.scss +2 -2
  59. package/components/fieldset/_macro.njk +1 -1
  60. package/components/fieldset/_macro.spec.js +1 -1
  61. package/components/footer/_footer.scss +12 -7
  62. package/components/footer/_macro.njk +54 -34
  63. package/components/footer/_macro.spec.js +90 -28
  64. package/components/footer/example-footer-cymraeg.njk +1 -1
  65. package/components/footer/example-footer-transactional.njk +1 -1
  66. package/components/footer/example-footer-warning.njk +1 -1
  67. package/components/footer/example-footer-with-alternative-organisation.njk +99 -94
  68. package/components/footer/example-footer-with-coat-of-arms.njk +1 -1
  69. package/components/footer/example-footer-with-copyright.njk +1 -1
  70. package/components/footer/example-footer-with-multiple-logos-and-split-display.njk +173 -0
  71. package/components/footer/example-footer-with-multiple-logos.njk +172 -0
  72. package/components/footer/example-footer.njk +1 -1
  73. package/components/header/_header.scss +7 -14
  74. package/components/header/_macro.njk +19 -19
  75. package/components/header/_macro.spec.js +17 -17
  76. package/components/header/example-header-external-for-surveys.njk +2 -2
  77. package/components/header/example-header-external-welsh.njk +2 -2
  78. package/components/header/example-header-external-with-sub-navigation-removed.njk +1 -1
  79. package/components/header/example-header-external-with-sub-navigation.njk +1 -1
  80. package/components/header/example-header-multiple-logos.njk +4 -4
  81. package/components/hero/_hero.scss +6 -8
  82. package/components/hero/_macro.njk +1 -1
  83. package/components/icon/_icon.scss +4 -4
  84. package/components/icon/_macro.njk +4 -4
  85. package/components/icon/_macro.spec.js +2 -2
  86. package/components/image/_image.scss +1 -1
  87. package/components/image/_macro.njk +1 -1
  88. package/components/image/_macro.spec.js +10 -10
  89. package/components/image/example-image-for-regular-screens.njk +1 -1
  90. package/components/input/_input-type.scss +0 -2
  91. package/components/input/_input.scss +10 -10
  92. package/components/input/_macro.njk +4 -2
  93. package/components/input/example-input-search-with-character-check.njk +1 -1
  94. package/components/input/example-input-search.njk +1 -1
  95. package/components/label/_label.scss +1 -3
  96. package/components/language-selector/_macro.njk +3 -3
  97. package/components/language-selector/_macro.spec.js +7 -7
  98. package/components/list/_list.scss +1 -5
  99. package/components/list/_macro.njk +9 -10
  100. package/components/list/_macro.spec.js +50 -9
  101. package/components/list/example-inline-list-with-social-icon-prefix.njk +1 -1
  102. package/components/message/_macro.njk +3 -3
  103. package/components/message/_macro.spec.js +3 -3
  104. package/components/message-list/_macro.njk +2 -2
  105. package/components/message-list/_macro.spec.js +8 -4
  106. package/components/message-list/_message-list.scss +2 -2
  107. package/components/navigation/_macro.njk +9 -9
  108. package/components/navigation/_macro.spec.js +2 -2
  109. package/components/navigation/_navigation.scss +2 -6
  110. package/components/navigation/navigation.dom.js +1 -1
  111. package/components/navigation/navigation.spec.js +4 -4
  112. package/components/pagination/_macro.njk +2 -2
  113. package/components/pagination/_pagination.scss +1 -7
  114. package/components/panel/_macro.njk +5 -4
  115. package/components/panel/_macro.spec.js +2 -2
  116. package/components/panel/_panel.scss +12 -8
  117. package/components/password/_macro.njk +1 -1
  118. package/components/password/_macro.spec.js +2 -2
  119. package/components/phase-banner/_macro.njk +1 -1
  120. package/components/phase-banner/_phase-banner.scss +3 -4
  121. package/components/phase-banner/example-phase-banner-alpha.njk +1 -1
  122. package/components/phase-banner/example-phase-banner-beta.njk +1 -1
  123. package/components/question/_macro.njk +8 -8
  124. package/components/question/_macro.spec.js +3 -3
  125. package/components/question/_question.scss +3 -3
  126. package/components/radios/_macro.njk +1 -1
  127. package/components/radios/_macro.spec.js +1 -1
  128. package/components/radios/_radios.scss +1 -1
  129. package/components/radios/example-radios-with-clear-button-expanded.njk +1 -1
  130. package/components/radios/example-radios-with-clear-button.njk +1 -1
  131. package/components/related-content/_macro.spec.js +2 -2
  132. package/components/related-content/_related-content.scss +1 -1
  133. package/components/related-content/example-related-content-general.njk +2 -2
  134. package/components/related-content/example-related-content-social-media.njk +1 -1
  135. package/components/reply/_macro.njk +3 -1
  136. package/components/reply/_macro.spec.js +1 -1
  137. package/components/reply/reply.spec.js +1 -1
  138. package/components/section-navigation/_macro.njk +10 -10
  139. package/components/section-navigation/_macro.spec.js +15 -15
  140. package/components/section-navigation/_section-navigation.scss +4 -10
  141. package/components/section-navigation/example-section-navigation-single-vertical-with-title.njk +3 -3
  142. package/components/section-navigation/example-section-navigation-vertical.njk +14 -14
  143. package/components/section-navigation/example-section-navigation.njk +3 -3
  144. package/components/select/example-select-with-inline-label.njk +1 -1
  145. package/components/share-page/_macro.njk +7 -7
  146. package/components/share-page/_macro.spec.js +2 -2
  147. package/components/share-page/example-share-page.njk +1 -1
  148. package/components/status/_status.scss +1 -1
  149. package/components/summary/_macro.njk +33 -33
  150. package/components/summary/_macro.spec.js +34 -34
  151. package/components/summary/_summary.scss +2 -4
  152. package/components/summary/example-summary-card-grouped.njk +34 -34
  153. package/components/summary/example-summary-grouped-total.njk +7 -7
  154. package/components/summary/example-summary-grouped-with-errors.njk +9 -9
  155. package/components/summary/example-summary-grouped.njk +34 -34
  156. package/components/summary/example-summary-household.njk +7 -7
  157. package/components/summary/example-summary-hub-minimal.njk +8 -8
  158. package/components/summary/example-summary-hub.njk +16 -16
  159. package/components/summary/example-summary-multiple.njk +7 -7
  160. package/components/summary/example-summary-no-action.njk +5 -5
  161. package/components/summary/example-summary.njk +9 -9
  162. package/components/table/_table.scss +2 -3
  163. package/components/table-of-contents/_macro.njk +3 -3
  164. package/components/table-of-contents/_macro.spec.js +3 -3
  165. package/components/table-of-contents/example-table-of-contents-sticky-full-page.njk +1 -1
  166. package/components/tabs/_macro.njk +3 -3
  167. package/components/tabs/_macro.spec.js +3 -3
  168. package/components/tabs/_tabs.scss +3 -4
  169. package/components/tabs/example-tabs-details.njk +1 -1
  170. package/components/text-indent/_text-indent.scss +1 -1
  171. package/components/timeline/_macro.njk +4 -4
  172. package/components/timeline/_macro.spec.js +3 -3
  173. package/components/timeline/_timeline.scss +4 -3
  174. package/components/timeline/example-timeline.njk +1 -1
  175. package/components/upload/_upload.scss +2 -2
  176. package/components/video/_macro.njk +4 -4
  177. package/components/video/_macro.spec.js +2 -2
  178. package/components/video/_video.scss +1 -1
  179. package/components/video/example-video.njk +2 -2
  180. package/components/video/video.spec.js +2 -2
  181. package/css/main.css +1 -1
  182. package/layout/_dsTemplate.njk +1 -1
  183. package/layout/_template.njk +31 -31
  184. package/package.json +4 -5
  185. package/scripts/main.es5.js +1 -1
  186. package/scripts/main.js +1 -1
  187. package/scss/base/_global.scss +2 -0
  188. package/scss/base/_typography.scss +0 -2
  189. package/scss/main.scss +0 -1
  190. package/scss/objects/_container.scss +1 -1
  191. package/scss/objects/_page.scss +2 -3
  192. package/scss/overrides/rtl.scss +1 -1
  193. package/scss/utilities/_grid.scss +103 -96
  194. package/scss/utilities/_margin.scss +11 -5
  195. package/scss/utilities/_padding.scss +12 -5
  196. package/scss/utilities/_typography.scss +2 -1
  197. package/scss/vars/_forms.scss +8 -10
  198. package/scss/vars/_grid.scss +4 -4
  199. package/scss/vars/_typography.scss +26 -19
  200. package/components/call-to-action/_call-to-action.scss +0 -8
  201. package/components/call-to-action/_macro.njk +0 -24
  202. package/components/call-to-action/_macro.spec.js +0 -48
  203. package/components/call-to-action/example-call-to-action-default.njk +0 -15
  204. package/components/metadata/_macro.njk +0 -14
@@ -3,8 +3,8 @@
3
3
 
4
4
  {% macro onsAccessCode(params) %}
5
5
  {% set groupSize = params.groupSize | default(4) %}
6
- {% set extraSpaces = (params.maxlength | default(16) / groupSize) - 1 %}
7
- {% set maxlength = params.maxlength | default(16) + extraSpaces %}
6
+ {% set extraSpaces = (params.maxLength | default(16) / groupSize) - 1 %}
7
+ {% set maxLength = params.maxLength | default(16) + extraSpaces %}
8
8
 
9
9
  {% set content %}
10
10
  {{
@@ -12,10 +12,10 @@
12
12
  "id": params.id,
13
13
  "type": params.type,
14
14
  "name": params.name,
15
- "classes": "ons-access-code__input ons-js-access-code" + (" ons-u-mb-xs" if params.postTextboxLinkText else ""),
15
+ "classes": "ons-access-code__input ons-js-access-code" + (" ons-u-mb-2xs" if params.postTextboxLinkText else ""),
16
16
  "label": params.label,
17
+ "maxLength": maxLength,
17
18
  "attributes": {
18
- "maxlength": maxlength,
19
19
  "data-group-size": groupSize,
20
20
  "autocomplete": "off",
21
21
  "autocapitalize": "characters"
@@ -102,23 +102,23 @@ describe('FOR: Macro: Access-code', () => {
102
102
  });
103
103
  });
104
104
  });
105
- describe('GIVEN: Params: maxlength & groupSize', () => {
105
+ describe('GIVEN: Params: maxLength & groupSize', () => {
106
106
  describe('WHEN: params are at default state', () => {
107
107
  const $ = cheerio.load(renderComponent('access-code'));
108
- test('THEN: renders input with total maxlength of 19', () => {
108
+ test('THEN: renders input with total maxLength of 19', () => {
109
109
  expect($('input').attr('maxlength')).toBe('19');
110
110
  });
111
111
  test('THEN: renders input with groupSize of 4', () => {
112
112
  expect($('input').attr('data-group-size')).toBe('4');
113
113
  });
114
114
  });
115
- describe('WHEN: maxlength param is provided', () => {
115
+ describe('WHEN: maxLength param is provided', () => {
116
116
  const $ = cheerio.load(
117
117
  renderComponent('access-code', {
118
- maxlength: 8,
118
+ maxLength: 8,
119
119
  }),
120
120
  );
121
- test('THEN: renders input with provided maxlength', () => {
121
+ test('THEN: renders input with provided maxLength', () => {
122
122
  expect($('input').attr('maxlength')).toBe('9');
123
123
  });
124
124
  });
@@ -132,14 +132,14 @@ describe('FOR: Macro: Access-code', () => {
132
132
  expect($('input').attr('data-group-size')).toBe('2');
133
133
  });
134
134
  });
135
- describe('WHEN: maxlength and groupSize params are provided', () => {
135
+ describe('WHEN: maxLength and groupSize params are provided', () => {
136
136
  const $ = cheerio.load(
137
137
  renderComponent('access-code', {
138
- maxlength: 6,
138
+ maxLength: 6,
139
139
  groupSize: 3,
140
140
  }),
141
141
  );
142
- test('THEN: renders input with provided maxlength accounting for provided groupSize', () => {
142
+ test('THEN: renders input with provided maxLength accounting for provided groupSize', () => {
143
143
  expect($('input').attr('maxlength')).toBe('7');
144
144
  });
145
145
  });
@@ -36,7 +36,7 @@ layout: ~
36
36
  }}
37
37
  {% endcall %}
38
38
 
39
- <h1 class="ons-u-mt-l">Start study</h1>
39
+ <h1 class="ons-u-mt-2xl">Start study</h1>
40
40
 
41
41
  {{
42
42
  onsAccessCode({
@@ -59,7 +59,7 @@ layout: ~
59
59
  {{
60
60
  onsButton({
61
61
  "text": "Access study",
62
- "classes": "ons-u-mb-xl"
62
+ "classes": "ons-u-mb-2xl ons-u-mt-s"
63
63
  })
64
64
  }}
65
65
 
@@ -17,7 +17,7 @@ layout: ~
17
17
  %}
18
18
 
19
19
  {% block main %}
20
- <h1 class="ons-u-mt-l">Start study</h1>
20
+ <h1 class="ons-u-mt-2xl">Start study</h1>
21
21
 
22
22
  {{
23
23
  onsAccessCode({
@@ -36,7 +36,7 @@ layout: ~
36
36
  {{
37
37
  onsButton({
38
38
  "text": "Access study",
39
- "classes": "ons-u-mb-xl"
39
+ "classes": "ons-u-mb-2xl ons-u-mt-s"
40
40
  })
41
41
  }}
42
42
 
@@ -32,7 +32,7 @@
32
32
  "headingAttributes": item.headingAttributes,
33
33
  "contentAttributes": item.contentAttributes,
34
34
  "title": item.title,
35
- "titleTag": item.titleTag,
35
+ "headingLevel": item.headingLevel,
36
36
  "content": item.content,
37
37
  "group": params.id,
38
38
  "saveState": params.saveState,
@@ -85,7 +85,7 @@ describe('FOR: Macro: Accordion', () => {
85
85
  itemsList: [
86
86
  {
87
87
  title: 'Title for item 1',
88
- titleTag: 'h5',
88
+ headingLevel: 5,
89
89
  content: 'Content for item 1',
90
90
  },
91
91
  ],
@@ -132,9 +132,9 @@
132
132
  "mutuallyExclusive": params.mutuallyExclusive
133
133
  },
134
134
  "externalInitialiser": true,
135
- "APIDomain": params.APIDomain,
136
- "APIDomainBearerToken": params.APIDomainBearerToken,
137
- "APIManualQueryParams": params.APIManualQueryParams,
135
+ "apiDomain": params.apiDomain,
136
+ "apiDomainBearerToken": params.apiDomainBearerToken,
137
+ "apiManualQueryParams": params.apiManualQueryParams,
138
138
  "allowMultiple": params.allowMultiple,
139
139
  "mandatory": params.mandatory,
140
140
  "instructions": params.instructions,
@@ -157,15 +157,15 @@
157
157
  "errorTitle": params.errorTitle,
158
158
  "errorMessageEnter": params.errorMessageEnter,
159
159
  "errorMessageSelect": params.errorMessageSelect,
160
- "errorMessageAPI": params.errorMessageAPI,
161
- "errorMessageAPILinkText": params.errorMessageAPILinkText,
160
+ "errorMessageApi": params.errorMessageApi,
161
+ "errorMessageApiLinkText": params.errorMessageApiLinkText,
162
162
  "options": params.options,
163
- "manualLink": params.manualLink,
163
+ "manualLinkUrl": params.manualLinkUrl,
164
164
  "manualLinkText": params.manualLinkText
165
165
  })
166
166
  }}
167
167
  {% if params.manualLinkText %}
168
- <a href="{{ params.manualLink | default('#0') }}" class="ons-js-address-manual-btn ons-u-mt-s ons-u-dib"
168
+ <a href="{{ params.manualLinkUrl }}" class="ons-js-address-manual-btn ons-u-mt-s ons-u-dib"
169
169
  >{{ params.manualLinkText }}</a
170
170
  >
171
171
  {% endif %}
@@ -312,9 +312,9 @@ describe('macro: address-input', () => {
312
312
  error: '[params.error]',
313
313
  name: '[params.name]',
314
314
  mutuallyExclusive: '[params.mutuallyExclusive]',
315
- APIDomain: '[params.APIDomain]',
316
- APIDomainBearerToken: '[params.APIDomainBearerToken]',
317
- APIManualQueryParams: '[params.APIManualQueryParams]',
315
+ apiDomain: '[params.apiDomain]',
316
+ apiDomainBearerToken: '[params.apiDomainBearerToken]',
317
+ apiManualQueryParams: '[params.apiManualQueryParams]',
318
318
  allowMultiple: '[params.allowMultiple]',
319
319
  mandatory: '[params.mandatory]',
320
320
  instructions: '[params.instructions]',
@@ -338,10 +338,10 @@ describe('macro: address-input', () => {
338
338
  errorTitle: '[params.errorTitle]',
339
339
  errorMessageEnter: '[params.errorMessageEnter]',
340
340
  errorMessageSelect: '[params.errorMessageSelect]',
341
- errorMessageAPI: '[params.errorMessageAPI]',
342
- errorMessageAPILinkText: '[params.errorMessageAPILinkText]',
341
+ errorMessageApi: '[params.errorMessageApi]',
342
+ errorMessageApiLinkText: '[params.errorMessageApiLinkText]',
343
343
  options: '[params.options]',
344
- manualLink: '[params.manualLink]',
344
+ manualLinkUrl: '[params.manualLinkUrl]',
345
345
  manualLinkText: '[params.manualLinkText]',
346
346
  });
347
347
 
@@ -362,9 +362,9 @@ describe('macro: address-input', () => {
362
362
  mutuallyExclusive: '[params.mutuallyExclusive]',
363
363
  },
364
364
  externalInitialiser: true,
365
- APIDomain: '[params.APIDomain]',
366
- APIDomainBearerToken: '[params.APIDomainBearerToken]',
367
- APIManualQueryParams: '[params.APIManualQueryParams]',
365
+ apiDomain: '[params.apiDomain]',
366
+ apiDomainBearerToken: '[params.apiDomainBearerToken]',
367
+ apiManualQueryParams: '[params.apiManualQueryParams]',
368
368
  allowMultiple: '[params.allowMultiple]',
369
369
  mandatory: '[params.mandatory]',
370
370
  instructions: '[params.instructions]',
@@ -387,18 +387,19 @@ describe('macro: address-input', () => {
387
387
  errorTitle: '[params.errorTitle]',
388
388
  errorMessageEnter: '[params.errorMessageEnter]',
389
389
  errorMessageSelect: '[params.errorMessageSelect]',
390
- errorMessageAPI: '[params.errorMessageAPI]',
391
- errorMessageAPILinkText: '[params.errorMessageAPILinkText]',
390
+ errorMessageApi: '[params.errorMessageApi]',
391
+ errorMessageApiLinkText: '[params.errorMessageApiLinkText]',
392
392
  options: '[params.options]',
393
- manualLink: '[params.manualLink]',
393
+ manualLinkUrl: '[params.manualLinkUrl]',
394
394
  manualLinkText: '[params.manualLinkText]',
395
395
  });
396
396
  });
397
397
 
398
- it('renders manualLinkText` when provided with a default value for `manualLink`', () => {
398
+ it('renders manualLinkText` when provided with a default value for `manualLinkUrl`', () => {
399
399
  const $ = cheerio.load(
400
400
  renderComponent('address-input', {
401
401
  ...EXAMPLE_AUTOSUGGEST_ADDRESS_MINIMAL,
402
+ manualLinkUrl: '#0',
402
403
  manualLinkText: 'Manually enter address',
403
404
  }),
404
405
  );
@@ -407,11 +408,11 @@ describe('macro: address-input', () => {
407
408
  expect($('.ons-js-address-manual-btn').text().trim()).toBe('Manually enter address');
408
409
  });
409
410
 
410
- it('renders `manualLinkText` with `manualLink` when provided', () => {
411
+ it('renders `manualLinkText` with `manualLinkUrl` when provided', () => {
411
412
  const $ = cheerio.load(
412
413
  renderComponent('address-input', {
413
414
  ...EXAMPLE_AUTOSUGGEST_ADDRESS_MINIMAL,
414
- manualLink: 'https://example.com/edit-address',
415
+ manualLinkUrl: 'https://example.com/edit-address',
415
416
  manualLinkText: 'Manually enter address',
416
417
  }),
417
418
  );
@@ -32,7 +32,7 @@ export default class AddressError {
32
32
  const errorListElement = document.createElement('p');
33
33
  const errorLinkElement = document.createElement('a');
34
34
 
35
- errorElement.className = 'ons-panel ons-panel--error ons-u-mb-m ons-js-autosuggest-error-panel';
35
+ errorElement.className = 'ons-panel ons-panel--error ons-u-mb-l ons-js-autosuggest-error-panel';
36
36
  errorElementHeader.className = 'ons-panel__header';
37
37
  errorElementTitle.className = 'ons-panel__title ons-u-fs-r--b';
38
38
  errorBodyElement.className = 'ons-panel__body';
@@ -57,10 +57,10 @@ export default class AutosuggestAddress {
57
57
  });
58
58
 
59
59
  // Set up AIMS api variables and auth
60
- this.APIDomain = this.container.getAttribute('data-api-domain');
61
- this.lookupURL = `${this.APIDomain}/addresses/eq?input=`;
62
- this.lookupGroupURL = `${this.APIDomain}/addresses/eq/bucket?`;
63
- this.retrieveURL = `${this.APIDomain}/addresses/eq/uprn/`;
60
+ this.apiDomain = this.container.getAttribute('data-api-domain');
61
+ this.lookupUrl = `${this.apiDomain}/addresses/eq?input=`;
62
+ this.lookupGroupUrl = `${this.apiDomain}/addresses/eq/bucket?`;
63
+ this.retrieveUrl = `${this.apiDomain}/addresses/eq/uprn/`;
64
64
 
65
65
  // Query string options
66
66
  this.manualQueryParams = this.container.getAttribute('data-query-params');
@@ -77,7 +77,7 @@ export default class AutosuggestAddress {
77
77
  }
78
78
 
79
79
  async checkAPIStatus() {
80
- this.fetch = abortableFetch(this.lookupURL + 'cf142&limit=10', {
80
+ this.fetch = abortableFetch(this.lookupUrl + 'cf142&limit=10', {
81
81
  method: 'GET',
82
82
  headers: this.setAuthorization(this.authorizationToken),
83
83
  });
@@ -109,24 +109,24 @@ export default class AutosuggestAddress {
109
109
  }
110
110
 
111
111
  async findAddress(text, grouped) {
112
- let queryURL, fullQueryURL;
112
+ let queryUrl, fullQueryUrl;
113
113
 
114
114
  if (this.manualQueryParams) {
115
115
  const manualQueryParams = this.container.getAttribute('data-query-params');
116
- fullQueryURL = this.lookupURL + text + manualQueryParams;
116
+ fullQueryUrl = this.lookupUrl + text + manualQueryParams;
117
117
  } else {
118
118
  const fullPostcodeQuery = this.testFullPostcodeQuery(text);
119
119
  let limit = fullPostcodeQuery ? 100 : 10;
120
120
 
121
- queryURL = grouped ? this.lookupGroupURL + this.groupQuery : this.lookupURL + text + '&limit=' + limit;
121
+ queryUrl = grouped ? this.lookupGroupUrl + this.groupQuery : this.lookupUrl + text + '&limit=' + limit;
122
122
 
123
- fullQueryURL = this.generateURLParams(queryURL);
123
+ fullQueryUrl = this.generateUrlParams(queryUrl);
124
124
  if (fullPostcodeQuery && grouped !== false) {
125
- fullQueryURL = fullQueryURL + '&groupfullpostcodes=combo';
125
+ fullQueryUrl = fullQueryUrl + '&groupfullpostcodes=combo';
126
126
  }
127
127
  }
128
128
 
129
- this.fetch = abortableFetch(fullQueryURL, {
129
+ this.fetch = abortableFetch(fullQueryUrl, {
130
130
  method: 'GET',
131
131
  headers: this.setAuthorization(this.authorizationToken),
132
132
  });
@@ -248,11 +248,11 @@ export default class AutosuggestAddress {
248
248
  }
249
249
 
250
250
  async retrieveAddress(id, type = null) {
251
- let retrieveUrl = this.retrieveURL + id;
251
+ let retrieveUrl = this.retrieveUrl + id;
252
252
 
253
- const fullUPRNURL = this.generateURLParams(retrieveUrl, id, type);
253
+ const fullUprnUrl = this.generateUrlParams(retrieveUrl, id, type);
254
254
 
255
- this.fetch = abortableFetch(fullUPRNURL, {
255
+ this.fetch = abortableFetch(fullUprnUrl, {
256
256
  method: 'GET',
257
257
  headers: this.setAuthorization(this.authorizationToken),
258
258
  });
@@ -315,8 +315,8 @@ export default class AutosuggestAddress {
315
315
  };
316
316
  }
317
317
 
318
- generateURLParams(baseURL, uprn, type) {
319
- let fullURL = baseURL,
318
+ generateUrlParams(baseUrl, uprn, type) {
319
+ let fullUrl = baseUrl,
320
320
  addressType;
321
321
 
322
322
  const classificationFilterParam = '&classificationfilter=',
@@ -336,37 +336,37 @@ export default class AutosuggestAddress {
336
336
 
337
337
  if (!uprn) {
338
338
  if (this.classificationFilter && this.classificationFilter !== 'residential') {
339
- fullURL = fullURL + classificationFilterParam + this.classificationFilter;
339
+ fullUrl = fullUrl + classificationFilterParam + this.classificationFilter;
340
340
  }
341
341
 
342
342
  if (this.classificationFilter === 'workplace') {
343
343
  if (this.regionCode === 'gb-eng') {
344
- fullURL = fullURL + eboostParam;
344
+ fullUrl = fullUrl + eboostParam;
345
345
  } else if (this.regionCode === 'gb-wls') {
346
- fullURL = fullURL + wboostParam;
346
+ fullUrl = fullUrl + wboostParam;
347
347
  }
348
348
  }
349
349
 
350
350
  if (this.regionCode === 'gb-nir') {
351
351
  if (this.classificationFilter === 'educational') {
352
- fullURL = fullURL + nionlyParam;
352
+ fullUrl = fullUrl + nionlyParam;
353
353
  } else {
354
- fullURL = fullURL + niboostParam;
354
+ fullUrl = fullUrl + niboostParam;
355
355
  }
356
356
  }
357
357
 
358
358
  if (this.lang === 'cy') {
359
- fullURL = fullURL + favourwelshParam;
359
+ fullUrl = fullUrl + favourwelshParam;
360
360
  }
361
361
  } else if (uprn) {
362
- fullURL = baseURL + addresstypeParam + addressType;
362
+ fullUrl = baseUrl + addresstypeParam + addressType;
363
363
  }
364
364
 
365
365
  if (this.epoch === 'true') {
366
- fullURL = fullURL + epochParam;
366
+ fullUrl = fullUrl + epochParam;
367
367
  }
368
368
 
369
- return fullURL;
369
+ return fullUrl;
370
370
  }
371
371
 
372
372
  handleAPIError() {
@@ -30,8 +30,8 @@ const EXAMPLE_ADDRESS_INPUT = {
30
30
  errorTitle: 'There is a problem with your answer',
31
31
  errorMessageEnter: 'Enter an address',
32
32
  errorMessageSelect: 'Select an address',
33
- errorMessageAPI: 'Sorry, there is a problem loading addresses',
34
- errorMessageAPILinkText: 'Enter address manually',
33
+ errorMessageApi: 'Sorry, there is a problem loading addresses',
34
+ errorMessageApiLinkText: 'Enter address manually',
35
35
  options: {
36
36
  regionCode: 'gb-eng',
37
37
  addressType: 'residential',
@@ -52,20 +52,21 @@ const EXAMPLE_ADDRESS_INPUT = {
52
52
  label: 'Postcode',
53
53
  },
54
54
  searchButton: 'Search for an address',
55
+ manualLinkUrl: '#0',
55
56
  manualLinkText: 'Manually enter address',
56
57
  };
57
58
 
58
59
  const EXAMPLE_ADDRESS_INPUT_WITH_API = {
59
60
  ...EXAMPLE_ADDRESS_INPUT,
60
- APIDomain: '/fake/api',
61
- APIDomainBearerToken: 'someToken',
61
+ apiDomain: '/fake/api',
62
+ apiDomainBearerToken: 'someToken',
62
63
  externalInitialiser: true,
63
64
  };
64
65
 
65
66
  const { setTimeout } = require('node:timers/promises');
66
67
 
67
68
  describe('script: address-input', () => {
68
- const apiFaker = new PuppeteerEndpointFaker(EXAMPLE_ADDRESS_INPUT_WITH_API.APIDomain);
69
+ const apiFaker = new PuppeteerEndpointFaker(EXAMPLE_ADDRESS_INPUT_WITH_API.apiDomain);
69
70
 
70
71
  apiFaker.setOverrides(
71
72
  [
@@ -10,8 +10,8 @@
10
10
  },
11
11
  "isEditable": true,
12
12
  "mandatory": true,
13
- "APIDomain": "https://mock-address-api.gcp.onsdigital.uk",
14
- 'APIDomainBearerToken': "some_token",
13
+ "apiDomain": "https://mock-address-api.gcp.onsdigital.uk",
14
+ 'apiDomainBearerToken': "some_token",
15
15
  "instructions": "Use up and down keys to navigate suggestions once you\'ve typed more than two characters. Use the enter key to select a suggestion. Touch device users, explore by touch or with swipe gestures.",
16
16
  "ariaYouHaveSelected": "You have selected",
17
17
  "ariaMinChars": "Enter 3 or more characters for suggestions.",
@@ -30,8 +30,8 @@
30
30
  "errorTitle": "There is a problem with your answer",
31
31
  "errorMessageEnter": "Enter an address",
32
32
  "errorMessageSelect": "Select an address",
33
- "errorMessageAPI": "Sorry, there is a problem loading addresses.",
34
- "errorMessageAPILinkText": "Enter address manually",
33
+ "errorMessageApi": "Sorry, there is a problem loading addresses.",
34
+ "errorMessageApiLinkText": "Enter address manually",
35
35
  "options": {
36
36
  "regionCode": "gb-eng",
37
37
  "addressType": "residential"
@@ -49,6 +49,7 @@
49
49
  "label": "Postcode"
50
50
  },
51
51
  "searchButton": "Search for an address",
52
+ "manualLinkUrl": "#0",
52
53
  "manualLinkText": "Manually enter address"
53
54
  })
54
55
  }}
@@ -12,8 +12,8 @@
12
12
  "mandatory": true,
13
13
  "externalInitialiser": true,
14
14
  "autocomplete": "off",
15
- "APIDomain": "https://mock-address-api.gcp.onsdigital.uk",
16
- 'APIDomainBearerToken': "some_token",
15
+ "apiDomain": "https://mock-address-api.gcp.onsdigital.uk",
16
+ 'apiDomainBearerToken': "some_token",
17
17
  "instructions": "Use up and down keys to navigate suggestions once you\'ve typed more than two characters. Use the enter key to select a suggestion. Touch device users, explore by touch or with swipe gestures.",
18
18
  "ariaYouHaveSelected": "You have selected",
19
19
  "ariaMinChars": "Enter 3 or more characters for suggestions.",
@@ -31,9 +31,8 @@
31
31
  "errorTitle": "There is a problem with your answer",
32
32
  "errorMessageEnter": "Enter an address",
33
33
  "errorMessageSelect": "Select an address",
34
- "errorMessageAPI": "Sorry, there is a problem. We are working to fix it. Please try again later or",
35
- "errorMessageAPILinkText": "contact us for more help",
36
- "errorMessageAPILink": "#0",
34
+ "errorMessageApi": "Sorry, there is a problem. We are working to fix it. Please try again later or",
35
+ "errorMessageApiLinkText": "contact us for more help",
37
36
  "options": {
38
37
  "regionCode": "gb-eng",
39
38
  "addressType": "residential"
@@ -5,7 +5,7 @@
5
5
  border-radius: $input-radius;
6
6
  display: inline-block;
7
7
 
8
- @include mq(xxs, s) {
8
+ @include mq('2xs', s) {
9
9
  width: 100%;
10
10
  }
11
11
  }
@@ -94,19 +94,19 @@
94
94
  &__panel.ons-panel--warn {
95
95
  background: none;
96
96
  border: 0;
97
- margin: 0;
97
+ margin: 0 !important;
98
98
  .ons-panel__icon {
99
- font-size: 21px;
100
- line-height: 25px;
99
+ font-size: 1.3rem;
100
+ line-height: 1.5rem;
101
101
  margin-top: 0;
102
- min-height: 24px;
103
- min-width: 26px;
104
- top: 17px;
102
+ min-height: 1.5rem;
103
+ min-width: 1.5rem;
104
+ top: 1rem;
105
105
  }
106
106
 
107
107
  .ons-panel__body {
108
108
  font-weight: $font-weight-bold;
109
- padding: 0.8rem 0.8rem 0.8rem 2rem;
109
+ padding: 0.75rem 0.75rem 0.75rem 2rem;
110
110
  }
111
111
  }
112
112
 
@@ -15,9 +15,9 @@
15
15
  data-results-title="{{ params.resultsTitle }}"
16
16
  data-no-results="{{ params.noResults }}"
17
17
  data-type-more="{{ params.typeMore }}"
18
- {% if params.APIDomain %}data-api-domain="{{ params.APIDomain }}"{% endif %}
19
- {% if params.APIDomainBearerToken %}data-authorization-token="{{ params.APIDomainBearerToken }}"{% endif %}
20
- {% if params.APIManualQueryParams == true %}data-query-params=""{% endif %}
18
+ {% if params.apiDomain %}data-api-domain="{{ params.apiDomain }}"{% endif %}
19
+ {% if params.apiDomainBearerToken %}data-authorization-token="{{ params.apiDomainBearerToken }}"{% endif %}
20
+ {% if params.apiManualQueryParams == true %}data-query-params=""{% endif %}
21
21
  {% if params.allowMultiple == true %}data-allow-multiple="true"{% endif %}
22
22
  {% if params.autosuggestData %}data-autosuggest-data="{{ params.autosuggestData }}"{% endif %}
23
23
  {% if params.errorTitle %}data-error-title="{{ params.errorTitle }}"{% endif %}
@@ -26,8 +26,8 @@
26
26
  {% if params.ariaGroupedResults %}data-aria-grouped-results="{{ params.ariaGroupedResults }}"{% endif %}
27
27
  {% if params.groupCount %}data-group-count="{{ params.groupCount }}"{% endif %}
28
28
  {% if params.tooManyResults %}data-too-many-results="{{ params.tooManyResults }}"{% endif %}
29
- {% if params.errorMessageAPI %}data-error-api="{{ params.errorMessageAPI }}"{% endif %}
30
- {% if params.errorMessageAPILinkText %}data-error-api-link-text="{{ params.errorMessageAPILinkText }}"{% endif %}
29
+ {% if params.errorMessageApi %}data-error-api="{{ params.errorMessageApi }}"{% endif %}
30
+ {% if params.errorMessageApiLinkText %}data-error-api-link-text="{{ params.errorMessageApiLinkText }}"{% endif %}
31
31
  {% if params.language %}data-lang="{{ params.language }}"{% endif %}
32
32
  {% if params.options %}
33
33
  {% if params.options.oneYearAgo %}data-options-one-year-ago="true"{% endif %}
@@ -597,7 +597,7 @@ describe('script: autosuggest', () => {
597
597
  ...EXAMPLE_AUTOSUGGEST,
598
598
  errorTitle: 'There is a problem with your answer',
599
599
  errorMessage: 'Enter an address ',
600
- errorMessageAPI: 'Sorry, there is a problem.',
600
+ errorMessageApi: 'Sorry, there is a problem.',
601
601
  }),
602
602
  );
603
603
 
@@ -1,12 +1,12 @@
1
1
  .ons-back-to-top {
2
2
  &__description {
3
- margin-left: 0.2rem;
3
+ margin-left: 0.25rem;
4
4
  }
5
5
 
6
6
  &__enabled {
7
7
  background: none;
8
8
  width: fit-content;
9
- padding: 0.5em 0;
9
+ padding: 0.5rem 0;
10
10
  }
11
11
 
12
12
  &__sticky {
@@ -31,15 +31,15 @@ layout: ~
31
31
  %}
32
32
 
33
33
  {% block main %}
34
- <h1 class="ons-u-fs-xxl">
35
- <span class="ons-u-fs-m ons-u-db ons-u-mb-xs ons-u-lighter">Press releases</span>
34
+ <h1 class="ons-u-fs-2xl">
35
+ <span class="ons-u-fs-m ons-u-db ons-u-mb-2xs ons-u-lighter">Press releases</span>
36
36
  <span class="ons-u-vh">: </span>
37
- <span class="ons-u-fs-xxl ons-u-db">ONS launches Integrated Data Service to boost government collaboration on data sharing</span>
37
+ <span class="ons-u-fs-2xl ons-u-db">ONS launches Integrated Data Service to boost government collaboration on data sharing</span>
38
38
  </h1>
39
39
 
40
40
  <div class="ons-grid">
41
41
  <div class="ons-grid__col ons-col-7@m">
42
- <div class="ons-page__body ons-u-mt-m">
42
+ <div class="ons-page__body ons-u-mt-l">
43
43
  <p>
44
44
  In a groundbreaking move, the Office for National Statistics (ONS) has embarked on a transformative journey with the
45
45
  introduction of the Integrated Data Service (IDS). This sophisticated, cloud-based platform is meticulously crafted to
@@ -106,7 +106,7 @@ layout: ~
106
106
  appropriately and making sure it is put to use for the public good."
107
107
  </p>
108
108
 
109
- <div class="ons-u-mt-l ons-u-mt-xl@m">
109
+ <div class="ons-u-mt-xl ons-u-mt-3xl@m">
110
110
  {{
111
111
  onsContentPagination({
112
112
  "ariaLabel": 'Article pagination',
@@ -179,7 +179,7 @@ layout: ~
179
179
  "id": 'share-this-article',
180
180
  "title": 'Share this article',
181
181
  "iconPosition": 'before',
182
- "iconSize": 'xxl',
182
+ "iconSize": '2xl',
183
183
  "itemsList": [
184
184
  {
185
185
  "url": '#0',
@@ -22,7 +22,7 @@ $breadcrumb-chevron-height: 0.65rem;
22
22
 
23
23
  .ons-icon {
24
24
  height: $breadcrumb-chevron-height;
25
- margin: 0 0.2rem;
25
+ margin: 0 0.25rem;
26
26
  vertical-align: middle;
27
27
  width: $breadcrumb-chevron-height;
28
28
  }