@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
@@ -8,7 +8,7 @@ import { renderComponent, templateFaker } from '../../tests/helpers/rendering';
8
8
  const EXAMPLE_SHARE_PAGE = {
9
9
  title: 'Share page',
10
10
  pageTitle: 'An example page',
11
- pageURL: 'https://example.com/an-example-page',
11
+ pageUrl: 'https://example.com/an-example-page',
12
12
  facebook: true,
13
13
  twitter: true,
14
14
  };
@@ -31,7 +31,7 @@ describe('macro: share-page', () => {
31
31
  const $ = cheerio.load(
32
32
  renderComponent('share-page', {
33
33
  ...EXAMPLE_SHARE_PAGE,
34
- titleTag: 'h4',
34
+ headingLevel: 4,
35
35
  }),
36
36
  );
37
37
 
@@ -4,7 +4,7 @@
4
4
  onsSharePage({
5
5
  "title": 'Share this post',
6
6
  "pageTitle": 'A page to share',
7
- "pageURL": 'https://example.com/a-page-to-share',
7
+ "pageUrl": 'https://example.com/a-page-to-share',
8
8
  "facebook": true,
9
9
  "twitter": true
10
10
  })
@@ -17,7 +17,7 @@
17
17
  box-sizing: border-box;
18
18
  content: '';
19
19
  display: inline-block;
20
- margin-right: 0.391rem;
20
+ margin-right: 0.5rem;
21
21
  }
22
22
 
23
23
  /* Small status indicators for information dense situations */
@@ -15,17 +15,17 @@
15
15
 
16
16
  <div class="{{ className }}">
17
17
  {% for summary in params.summaries %}
18
- {% if summary.summaryTitle %}
19
- <h2 class="ons-summary__title ons-u-mb-m{{ ' ons-u-mt-m' if loop.index > 1 }}">{{ summary.summaryTitle }}</h2>
18
+ {% if summary.title %}
19
+ <h2 class="ons-summary__title ons-u-mb-l{{ ' ons-u-mt-l' if loop.index > 1 else "" }}">{{ summary.title }}</h2>
20
20
  {% set headingLevel = "3" %}
21
21
  {% endif %}
22
22
  {% for group in summary.groups %}
23
- <div {% if group.id %}id="{{ group.id }}"{{ ' ' }}{% endif %}class="ons-summary__group{{ variantClasses }}">
24
- {% if group.groupTitle %}
25
- {% set openingHeadingTag = "<h" + headingLevel %}
26
- {% set closingHeadingTag = "</h" + headingLevel + ">" %}
23
+ <div {% if group.id %}id="{{ group.id }}"{% endif %} class="ons-summary__group{{ variantClasses }}">
24
+ {% if group.title %}
25
+ {% set openingHeadingTag = "<h" ~ headingLevel %}
26
+ {% set closingHeadingTag = "</h" ~ headingLevel ~ ">" %}
27
27
  {{ openingHeadingTag | safe }}
28
- class="ons-summary__group-title">{{ group.groupTitle }}{{ closingHeadingTag | safe }}
28
+ class="ons-summary__group-title">{{ group.title }}{{ closingHeadingTag | safe }}
29
29
  {% endif %}
30
30
  {% if group.rows %}
31
31
  <dl class="ons-summary__items">
@@ -37,63 +37,63 @@
37
37
  {% if row.errorMessage %}
38
38
  <div class="ons-summary__row-title--error ons-u-fs-r">{{ row.errorMessage }}</div>
39
39
  {% endif %}
40
- {% if row.rowItems | length > 1 and row.rowTitle %}
40
+ {% if row.itemsList | length > 1 and row.title %}
41
41
  <div class="ons-summary__row-title ons-summary__row-title--no-group-title ons-u-fs-r">
42
- {{- row.rowTitle -}}
42
+ {{- row.title -}}
43
43
  </div>
44
44
  {% endif %}
45
45
 
46
- {% for rowItem in row.rowItems %}
46
+ {% for item in row.itemsList %}
47
47
  <div
48
- class="ons-summary__row{{ ' ons-summary__row--has-values' if rowItem.valueList }}"
49
- {% if rowItem.id %}id="{{ rowItem.id }}"{% endif %}
48
+ class="ons-summary__row{{ ' ons-summary__row--has-values' if item.valueList else "" }}"
49
+ {% if item.id %}id="{{ item.id }}"{% endif %}
50
50
  >
51
51
  <dt
52
52
  class="ons-summary__item-title"
53
- {% if rowItem.rowTitleAttributes %}{% for attribute, value in (rowItem.rowTitleAttributes.items() if rowItem.rowTitleAttributes is mapping and rowItem.rowTitleAttributes.items else rowItem.rowTitleAttributes) %}{{ ' ' }}{{ attribute }}="{{ value }}"{% endfor %}{% endif %}
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
54
  >
55
- {% if rowItem.iconType %}
55
+ {% if item.iconType %}
56
56
  {% from "components/icon/_macro.njk" import onsIcon %}
57
57
  <span
58
- class="ons-summary__item-title-icon{{ ' ons-summary__item-title-icon--check' if rowItem.iconType == 'check' }}"
58
+ class="ons-summary__item-title-icon{{ ' ons-summary__item-title-icon--check' if item.iconType == 'check' else "" }}"
59
59
  >
60
60
  {{-
61
61
  onsIcon({
62
- "iconType": rowItem.iconType
62
+ "iconType": item.iconType
63
63
  })
64
64
  -}}
65
- {% if rowItem.iconVisuallyHiddenText %}
66
- <span class="ons-u-vh">{{ rowItem.iconVisuallyHiddenText }}</span>
65
+ {% if item.iconVisuallyHiddenText %}
66
+ <span class="ons-u-vh">{{ item.iconVisuallyHiddenText }}</span>
67
67
  {% endif %}
68
68
  </span>
69
69
  {% endif %}
70
70
 
71
71
  <div
72
- class="ons-summary__item--text{{ ' ons-summary__item-title--text' if rowItem.iconType }}"
72
+ class="ons-summary__item--text{{ ' ons-summary__item-title--text' if item.iconType else "" }}"
73
73
  >
74
- {{- rowItem.rowTitle | default(row.rowTitle) | safe -}}
74
+ {{- item.title | default(row.title) | safe -}}
75
75
  </div>
76
76
 
77
77
  {# Render section status for mobile if is hub #}
78
- {% if variantHub and rowItem.valueList %}
79
- <span class="ons-u-d-no@m ons-u-fs-r"> — {{ rowItem.valueList[0].text | safe }}</span>
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
80
  {% endif %}
81
81
  </dt>
82
- {% if rowItem.valueList %}
82
+ {% if item.valueList %}
83
83
  <dd
84
- class="ons-summary__values{{ ' ons-summary__values--2' if not rowItem.actions }}"
85
- {% if rowItem.attributes %}{% for attribute, value in (rowItem.attributes.items() if rowItem.attributes is mapping and rowItem.attributes.items else rowItem.attributes) %}{{ ' ' }}{{ attribute }}="{{ value }}"{% endfor %}{% endif %}
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
86
  >
87
- {% if rowItem.valueList | length == 1 %}
88
- <span class="ons-summary__text">{{ rowItem.valueList[0].text | safe }}</span>
89
- {% if rowItem.valueList[0].other or rowItem.valueList[0].other == 0 %}
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
90
  <ul class="ons-u-mb-no">
91
- <li>{{ rowItem.valueList[0].other | safe }}</li>
91
+ <li>{{ item.valueList[0].other | safe }}</li>
92
92
  </ul>
93
93
  {% endif %}
94
94
  {% else %}
95
95
  <ul class="ons-u-mb-no">
96
- {% for value in rowItem.valueList %}
96
+ {% for value in item.valueList %}
97
97
  <li>
98
98
  <span class="ons-summary__text">{{ value.text | safe }}</span>
99
99
  {% if value.other or value.other == 0 %}
@@ -107,9 +107,9 @@
107
107
  {% endif %}
108
108
  </dd>
109
109
  {% endif %}
110
- {% if rowItem.actions %}
110
+ {% if item.actions %}
111
111
  <dd class="ons-summary__actions">
112
- {% for action in rowItem.actions %}
112
+ {% for action in item.actions %}
113
113
  {% if loop.index > 1 %}<span class="ons-summary__spacer"></span>{% endif %}
114
114
  <a
115
115
  href="{{ action.url }}"
@@ -135,7 +135,7 @@
135
135
 
136
136
  {% if group.summaryLink %}
137
137
  <div
138
- class="ons-summary__link{{ ' ons-u-pt-s' if params.variant != 'card' and (group.placeholderText or group.rows) }}{{ ' ons-u-bt' if group.placeholderText is not defined and group.rows | length > 1 and params.variant != 'card' }}{{ ' ons-u-mb-xl' if not group.last }}"
138
+ class="ons-summary__link{{ ' ons-u-pt-s' if params.variant != 'card' and (group.placeholderText or group.rows) }}{{ ' ons-u-bt' if group.placeholderText is not defined and group.rows | length > 1 and params.variant != 'card' }}{{ ' ons-u-mb-3xl' if not group.last }}"
139
139
  >
140
140
  {% set link %}
141
141
  <a
@@ -8,12 +8,12 @@ import { renderComponent, templateFaker } from '../../tests/helpers/rendering';
8
8
  const EXAMPLE_SUMMARY_ROWS = {
9
9
  rows: [
10
10
  {
11
- // Contains - row with icon, attributes and rowTitleAttributes, other value, no action
11
+ // Contains - row with icon, attributes and titleAttributes, other value, no action
12
12
  id: 'row-id-1',
13
- rowTitle: 'row title 1',
14
- rowItems: [
13
+ title: 'row title 1',
14
+ itemsList: [
15
15
  {
16
- rowTitleAttributes: {
16
+ titleAttributes: {
17
17
  a: 123,
18
18
  b: 456,
19
19
  },
@@ -36,10 +36,10 @@ const EXAMPLE_SUMMARY_ROWS = {
36
36
  {
37
37
  // Contains - row with error and multiple actions
38
38
  id: 'row-id-2',
39
- rowTitle: 'row title 2',
39
+ title: 'row title 2',
40
40
  error: true,
41
41
  errorMessage: 'there are errors',
42
- rowItems: [
42
+ itemsList: [
43
43
  {
44
44
  id: 'item-id-2',
45
45
  valueList: [
@@ -69,8 +69,8 @@ const EXAMPLE_SUMMARY_ROWS = {
69
69
  {
70
70
  // Contains - row with multiple rows and multiple values
71
71
  id: 'row-id-3',
72
- rowTitle: 'row title 3',
73
- rowItems: [
72
+ title: 'row title 3',
73
+ itemsList: [
74
74
  {
75
75
  id: 'item-id-3',
76
76
  valueList: [
@@ -95,9 +95,9 @@ const EXAMPLE_SUMMARY_ROWS = {
95
95
  {
96
96
  // Contains - row with total
97
97
  id: 'row-id-4',
98
- rowTitle: 'row title 4',
98
+ title: 'row title 4',
99
99
  total: true,
100
- rowItems: [
100
+ itemsList: [
101
101
  {
102
102
  id: 'item-id-5',
103
103
  valueList: [
@@ -115,7 +115,7 @@ const EXAMPLE_SUMMARY_GROUPS = {
115
115
  groups: [
116
116
  {
117
117
  id: 'group-id-1',
118
- groupTitle: 'group title',
118
+ title: 'group title',
119
119
  ...EXAMPLE_SUMMARY_ROWS,
120
120
  },
121
121
  ],
@@ -139,9 +139,9 @@ const EXAMPLE_SUMMARY_GROUPS_NO_ROWS = {
139
139
  const EXAMPLE_SUMMARY_HOUSEHOLD_GROUP = {
140
140
  rows: [
141
141
  {
142
- rowItems: [
142
+ itemsList: [
143
143
  {
144
- rowTitle: 'row item 1',
144
+ title: 'row item 1',
145
145
  valueList: [
146
146
  {
147
147
  text: 'list item 1',
@@ -161,7 +161,7 @@ const EXAMPLE_SUMMARY_HOUSEHOLD_GROUP = {
161
161
  ],
162
162
  },
163
163
  {
164
- rowTitle: 'row item 2',
164
+ title: 'row item 2',
165
165
  valueList: [
166
166
  {
167
167
  text: 'list item 2',
@@ -176,7 +176,7 @@ const EXAMPLE_SUMMARY_HOUSEHOLD_GROUP = {
176
176
  ],
177
177
  },
178
178
  {
179
- rowTitle: 'row item 3',
179
+ title: 'row item 3',
180
180
  valueList: [
181
181
  {
182
182
  text: 'list item 3',
@@ -193,9 +193,9 @@ const EXAMPLE_SUMMARY_HOUSEHOLD_GROUP = {
193
193
  ],
194
194
  },
195
195
  {
196
- rowItems: [
196
+ itemsList: [
197
197
  {
198
- rowTitle: 'row item 4',
198
+ title: 'row item 4',
199
199
  valueList: [
200
200
  {
201
201
  text: 'list item 4',
@@ -215,7 +215,7 @@ const EXAMPLE_SUMMARY_HOUSEHOLD_GROUP = {
215
215
  ],
216
216
  },
217
217
  {
218
- rowTitle: 'row item 5',
218
+ title: 'row item 5',
219
219
  valueList: [
220
220
  {
221
221
  text: 'list item 5',
@@ -230,7 +230,7 @@ const EXAMPLE_SUMMARY_HOUSEHOLD_GROUP = {
230
230
  ],
231
231
  },
232
232
  {
233
- rowTitle: 'row item 6',
233
+ title: 'row item 6',
234
234
  valueList: [
235
235
  {
236
236
  text: 'list item 6',
@@ -264,7 +264,7 @@ const EXAMPLE_SUMMARY_BASIC = {
264
264
  const EXAMPLE_SUMMARY_WITH_TITLE = {
265
265
  summaries: [
266
266
  {
267
- summaryTitle: 'summary title',
267
+ title: 'summary title',
268
268
  ...EXAMPLE_SUMMARY_GROUPS,
269
269
  },
270
270
  ],
@@ -273,7 +273,7 @@ const EXAMPLE_SUMMARY_WITH_TITLE = {
273
273
  const EXAMPLE_SUMMARY_WITH_NO_ROWS = {
274
274
  summaries: [
275
275
  {
276
- summaryTitle: 'summary title',
276
+ title: 'summary title',
277
277
  ...EXAMPLE_SUMMARY_GROUPS_NO_ROWS,
278
278
  },
279
279
  ],
@@ -282,21 +282,21 @@ const EXAMPLE_SUMMARY_WITH_NO_ROWS = {
282
282
  const EXAMPLE_SUMMARY_MULTIPLE_GROUPS = {
283
283
  summaries: [
284
284
  {
285
- summaryTitle: 'summary title',
285
+ title: 'summary title',
286
286
  groups: [
287
287
  {
288
288
  id: 'group-id-1',
289
- groupTitle: 'group title',
289
+ title: 'group title',
290
290
  ...EXAMPLE_SUMMARY_ROWS,
291
291
  },
292
292
  {
293
293
  id: 'group-id-2',
294
- groupTitle: 'group title',
294
+ title: 'group title',
295
295
  ...EXAMPLE_SUMMARY_HOUSEHOLD_GROUP,
296
296
  },
297
297
  {
298
298
  id: 'group-id-3',
299
- groupTitle: 'group title',
299
+ title: 'group title',
300
300
  ...EXAMPLE_SUMMARY_ROWS,
301
301
  },
302
302
  ],
@@ -345,13 +345,13 @@ describe('macro: summary', () => {
345
345
  expect($('#group-id-1').length).toBe(1);
346
346
  });
347
347
 
348
- it('has the correct `groupTitle` tag', () => {
348
+ it('has the correct group `title` tag', () => {
349
349
  const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC));
350
350
 
351
351
  expect($('.ons-summary__group-title')[0].tagName).toBe('h2');
352
352
  });
353
353
 
354
- it('has the `groupTitle` text', () => {
354
+ it('has the group `title` text', () => {
355
355
  const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC));
356
356
 
357
357
  expect($('.ons-summary__group-title').text()).toBe('group title');
@@ -360,7 +360,7 @@ describe('macro: summary', () => {
360
360
  it('has larger margin between groups if the top one is a household style summary', () => {
361
361
  const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_MULTIPLE_GROUPS));
362
362
 
363
- expect($('.ons-summary__group:nth-last-of-type(2) .ons-summary__link').hasClass('ons-u-mb-xl')).toBe(true);
363
+ expect($('.ons-summary__group:nth-last-of-type(2) .ons-summary__link').hasClass('ons-u-mb-3xl')).toBe(true);
364
364
  });
365
365
  });
366
366
 
@@ -377,13 +377,13 @@ describe('macro: summary', () => {
377
377
  expect($('.ons-summary__items .ons-summary__item:nth-of-type(4)').hasClass('ons-summary__item--total')).toBe(true);
378
378
  });
379
379
 
380
- it('displays the `rowTitle` text', () => {
380
+ it('displays the row `title` text', () => {
381
381
  const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC));
382
382
 
383
383
  expect($('.ons-summary__items .ons-summary__item:nth-of-type(3) .ons-summary__row-title').text()).toBe('row title 3');
384
384
  });
385
385
 
386
- it('overrides the `rowTitle` with the `errorMessage` if provided', () => {
386
+ it('overrides the row `title` with the `errorMessage` if provided', () => {
387
387
  const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_WITH_TITLE));
388
388
 
389
389
  expect($('.ons-summary__items .ons-summary__item:nth-of-type(2) .ons-summary__row-title--error').text()).toBe(
@@ -405,7 +405,7 @@ describe('macro: summary', () => {
405
405
  expect($('.ons-summary__row--has-values').length).toBe(5);
406
406
  });
407
407
 
408
- it('has custom `rowTitleAttributes`', () => {
408
+ it('has custom row `titleAttributes`', () => {
409
409
  const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC));
410
410
 
411
411
  expect($('.ons-summary__item-title').attr('a')).toBe('123');
@@ -414,7 +414,7 @@ describe('macro: summary', () => {
414
414
  });
415
415
 
416
416
  describe('part: item title', () => {
417
- it('displays the `rowTitle` text', () => {
417
+ it('displays the row `title` text', () => {
418
418
  const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC));
419
419
 
420
420
  expect($('.ons-summary__items .ons-summary__item:nth-of-type(1) .ons-summary__item--text').text().trim()).toBe(
@@ -562,7 +562,7 @@ describe('macro: summary', () => {
562
562
  expect(results).toHaveNoViolations();
563
563
  });
564
564
 
565
- it('displays the `summaryTitle`', () => {
565
+ it('displays the summary `title`', () => {
566
566
  const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_WITH_TITLE));
567
567
 
568
568
  expect($('.ons-summary__title').text()).toBe('summary title');
@@ -593,7 +593,7 @@ describe('macro: summary', () => {
593
593
  expect($('.ons-summary').hasClass('ons-summary--hub')).toBe(true);
594
594
  });
595
595
 
596
- it('has the value rendered after the `rowTitle` that shows on mobile', () => {
596
+ it('has the value rendered after the row `title` that shows on mobile', () => {
597
597
  const $ = cheerio.load(
598
598
  renderComponent('summary', {
599
599
  ...EXAMPLE_SUMMARY_BASIC,
@@ -24,8 +24,6 @@ $hub-row-spacing: 1.3rem;
24
24
  }
25
25
 
26
26
  &__item {
27
- line-height: 1.4;
28
-
29
27
  &:not(:last-child),
30
28
  &:not(.ons-summary__group--card .ons-summary__item):nth-of-type(1) {
31
29
  border-bottom: 1px solid var(--ons-color-borders);
@@ -92,7 +90,7 @@ $hub-row-spacing: 1.3rem;
92
90
  background: var(--ons-color-black);
93
91
  display: inline-block;
94
92
  height: 1.15rem;
95
- margin: 0.18rem 0.25rem 0;
93
+ margin: 0.25rem 0.25rem 0;
96
94
  vertical-align: middle;
97
95
  width: 1px;
98
96
  }
@@ -148,7 +146,7 @@ $hub-row-spacing: 1.3rem;
148
146
  }
149
147
 
150
148
  // Breakpoints
151
- @include mq(xxs, m, none, '<') {
149
+ @include mq('2xs', m, none, '<') {
152
150
  &__item-title,
153
151
  &__values,
154
152
  &__actions {
@@ -5,14 +5,14 @@
5
5
  "variant": "card",
6
6
  "summaries": [
7
7
  {
8
- "summaryTitle": "John Doe",
8
+ "title": "John Doe",
9
9
  "groups": [
10
10
  {
11
- "groupTitle": "Personal details",
11
+ "title": "Personal details",
12
12
  "rows": [
13
13
  {
14
- "rowTitle": "Are you John Doe?",
15
- "rowItems": [
14
+ "title": "Are you John Doe?",
15
+ "itemsList": [
16
16
  {
17
17
  "valueList": [
18
18
  {
@@ -30,8 +30,8 @@
30
30
  ]
31
31
  },
32
32
  {
33
- "rowTitle": "What's your date of birth?",
34
- "rowItems": [
33
+ "title": "What's your date of birth?",
34
+ "itemsList": [
35
35
  {
36
36
  "valueList": [
37
37
  {
@@ -49,8 +49,8 @@
49
49
  ]
50
50
  },
51
51
  {
52
- "rowTitle": "What is your sex?",
53
- "rowItems": [
52
+ "title": "What is your sex?",
53
+ "itemsList": [
54
54
  {
55
55
  "valueList": [
56
56
  {
@@ -70,11 +70,11 @@
70
70
  ]
71
71
  },
72
72
  {
73
- "groupTitle": "Identity and health",
73
+ "title": "Identity and health",
74
74
  "rows": [
75
75
  {
76
- "rowTitle": "What is your country of birth?",
77
- "rowItems": [
76
+ "title": "What is your country of birth?",
77
+ "itemsList": [
78
78
  {
79
79
  "valueList": [
80
80
  {
@@ -92,8 +92,8 @@
92
92
  ]
93
93
  },
94
94
  {
95
- "rowTitle": "What passports do you hold?",
96
- "rowItems": [
95
+ "title": "What passports do you hold?",
96
+ "itemsList": [
97
97
  {
98
98
  "valueList": [
99
99
  {
@@ -113,11 +113,11 @@
113
113
  ]
114
114
  },
115
115
  {
116
- "groupTitle": "Qualifications",
116
+ "title": "Qualifications",
117
117
  "rows": [
118
118
  {
119
- "rowTitle": "Have you completed an apprenticeship?",
120
- "rowItems": [
119
+ "title": "Have you completed an apprenticeship?",
120
+ "itemsList": [
121
121
  {
122
122
  "valueList": [
123
123
  {
@@ -135,8 +135,8 @@
135
135
  ]
136
136
  },
137
137
  {
138
- "rowTitle": "Have you achieved a GCSE or equivalent qualification?",
139
- "rowItems": [
138
+ "title": "Have you achieved a GCSE or equivalent qualification?",
139
+ "itemsList": [
140
140
  {
141
141
  "valueList": [
142
142
  {
@@ -156,12 +156,12 @@
156
156
  ]
157
157
  },
158
158
  {
159
- "groupTitle": "Employment history",
159
+ "title": "Employment history",
160
160
  "rows": [
161
161
  {
162
- "rowItems": [
162
+ "itemsList": [
163
163
  {
164
- "rowTitle": "Name of UK company",
164
+ "title": "Name of UK company",
165
165
  "valueList": [
166
166
  {
167
167
  "text": "Company A"
@@ -181,7 +181,7 @@
181
181
  ]
182
182
  },
183
183
  {
184
- "rowTitle": "Head office location",
184
+ "title": "Head office location",
185
185
  "valueList": [
186
186
  {
187
187
  "text": "Cardiff"
@@ -196,7 +196,7 @@
196
196
  ]
197
197
  },
198
198
  {
199
- "rowTitle": "Is this UK company your current employer?",
199
+ "title": "Is this UK company your current employer?",
200
200
  "valueList": [
201
201
  {
202
202
  "text": "No"
@@ -213,9 +213,9 @@
213
213
  ]
214
214
  },
215
215
  {
216
- "rowItems": [
216
+ "itemsList": [
217
217
  {
218
- "rowTitle": "Name of UK company",
218
+ "title": "Name of UK company",
219
219
  "valueList": [
220
220
  {
221
221
  "text": "Company A"
@@ -235,7 +235,7 @@
235
235
  ]
236
236
  },
237
237
  {
238
- "rowTitle": "Head office location",
238
+ "title": "Head office location",
239
239
  "valueList": [
240
240
  {
241
241
  "text": "Newport"
@@ -250,7 +250,7 @@
250
250
  ]
251
251
  },
252
252
  {
253
- "rowTitle": "Is this UK company your current employer?",
253
+ "title": "Is this UK company your current employer?",
254
254
  "valueList": [
255
255
  {
256
256
  "text": "Yes"
@@ -276,13 +276,13 @@
276
276
  }
277
277
  },
278
278
  {
279
- "groupTitle": "Spending",
279
+ "title": "Spending",
280
280
  "rows": [
281
281
  {
282
- "rowTitle": "What are your monthly household expenses?",
283
- "rowItems": [
282
+ "title": "What are your monthly household expenses?",
283
+ "itemsList": [
284
284
  {
285
- "rowTitle": "Food",
285
+ "title": "Food",
286
286
  "valueList": [
287
287
  {
288
288
  "text": "£50.00"
@@ -297,7 +297,7 @@
297
297
  ]
298
298
  },
299
299
  {
300
- "rowTitle": "Utilities",
300
+ "title": "Utilities",
301
301
  "valueList": [
302
302
  {
303
303
  "text": "£65.00"
@@ -312,7 +312,7 @@
312
312
  ]
313
313
  },
314
314
  {
315
- "rowTitle": "Transport",
315
+ "title": "Transport",
316
316
  "valueList": [
317
317
  {
318
318
  "text": "£70.00"
@@ -327,7 +327,7 @@
327
327
  ]
328
328
  },
329
329
  {
330
- "rowTitle": "Other",
330
+ "title": "Other",
331
331
  "valueList": [
332
332
  {
333
333
  "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."