@ons/design-system 67.0.5 → 67.1.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 (29) hide show
  1. package/components/access-code/example-access-code-error.njk +6 -9
  2. package/components/access-code/example-access-code.njk +7 -10
  3. package/components/date-field-input/_macro.njk +86 -0
  4. package/components/date-input/_macro.njk +79 -115
  5. package/components/{metadata/_metadata.scss → description-list/_description-list.scss} +2 -2
  6. package/components/description-list/_macro.njk +14 -0
  7. package/components/{metadata → description-list}/_macro.spec.js +26 -26
  8. package/components/{metadata/example-metadata.njk → description-list/example-description-list.njk} +3 -3
  9. package/components/duration/_macro.njk +60 -85
  10. package/components/header/_header.scss +8 -0
  11. package/components/header/_macro.njk +59 -35
  12. package/components/header/_macro.spec.js +115 -0
  13. package/components/header/example-header-multiple-logos.njk +110 -0
  14. package/components/metadata/_macro.njk +12 -12
  15. package/components/navigation/_navigation.scss +4 -2
  16. package/components/summary/_summary.scss +1 -1
  17. package/css/main.css +1 -1
  18. package/css/print.css +1 -1
  19. package/package.json +2 -5
  20. package/scss/main.scss +1 -1
  21. package/scss/utilities/_margin.scss +1 -0
  22. /package/{scss/fonts → fonts}/opensans-bold.woff +0 -0
  23. /package/{scss/fonts → fonts}/opensans-bold.woff2 +0 -0
  24. /package/{scss/fonts → fonts}/opensans-regular.woff +0 -0
  25. /package/{scss/fonts → fonts}/opensans-regular.woff2 +0 -0
  26. /package/{scss/fonts → fonts}/robotomono-bold.woff +0 -0
  27. /package/{scss/fonts → fonts}/robotomono-bold.woff2 +0 -0
  28. /package/{scss/fonts → fonts}/robotomono-regular.woff +0 -0
  29. /package/{scss/fonts → fonts}/robotomono-regular.woff2 +0 -0
@@ -58,28 +58,25 @@ layout: ~
58
58
  "classes": "ons-u-mb-xl"
59
59
  }) }}
60
60
 
61
- <h2>If you don’t have an access code</h2>
61
+ <h2>If you do not have an access code</h2>
62
62
  <p>
63
- You can <a href="#0">request a new access code</a> to start a new study if you have lost or not received an access code. This can be sent to you by text or post.
63
+ If you have lost or not received an access code, you can <a href="#0">request a new access code</a>.
64
+ This can be sent to you by text or post.
64
65
  </p>
65
66
 
66
67
  {% set content %}
67
- <p>If you need to answer separately from the people you live with, you can <a href='#0'>request an individual access code</a> to start a separate study.</p>
68
+ <p>If you need to answer separately from the people you live with, you can <a href="#0">request an individual access code</a>.</p>
68
69
  {% call onsPanel({
69
70
  "type": "warn"
70
71
  })
71
72
  %}
72
- Someone in your household must still complete a study using a household access code
73
+ Someone in your household must still complete a study using this household access code
73
74
  {% endcall %}
74
75
  {% endset %}
75
76
 
76
77
  {% call onsDetails({
77
78
  "id": "details-access-code-error",
78
- "title": "Need to answer separately from your household?",
79
- "button": {
80
- "close": "Hide this",
81
- "contextSuffix": "content"
82
- }
79
+ "title": "Need to answer separately from your household?"
83
80
  })
84
81
  %}
85
82
  {{ content | safe }}
@@ -34,28 +34,25 @@ layout: ~
34
34
  "classes": "ons-u-mb-xl"
35
35
  }) }}
36
36
 
37
- <h2>If you don’t have an access code</h2>
37
+ <h2>If you do not have an access code</h2>
38
38
  <p>
39
- You can <a href="#0">request a new access code</a> to start a new study if you have lost or not received an access code. This can be sent to you by text or post.
39
+ If you have lost or not received an access code, you can <a href="#0">request a new access code</a>.
40
+ This can be sent to you by text or post.
40
41
  </p>
41
42
 
42
43
  {% set content %}
43
- <p>If you need to answer separately from the people you live with, you can <a href='#0'>request an individual access code</a> to start a separate study.</p>
44
+ <p>If you need to answer separately from the people you live with, you can <a href="#0">request an individual access code</a>.</p>
44
45
  {% call onsPanel({
45
46
  type: "warn"
46
47
  })
47
48
  %}
48
- Someone in your household must still complete a study using a household access code
49
+ Someone in your household must still complete a study using this household access code
49
50
  {% endcall %}
50
51
  {% endset %}
51
52
 
52
53
  {% call onsDetails({
53
- id: "details",
54
- title: "Need to answer separately from your household?",
55
- button: {
56
- "close": "Hide this",
57
- "contextSuffix": "content"
58
- }
54
+ "id": "details",
55
+ "title": "Need to answer separately from your household?"
59
56
  })
60
57
  %}
61
58
  {{ content | safe }}
@@ -0,0 +1,86 @@
1
+ {% from "components/mutually-exclusive/_macro.njk" import onsMutuallyExclusive %}
2
+ {% from "components/fieldset/_macro.njk" import onsFieldset %}
3
+ {% from "components/input/_macro.njk" import onsInput %}
4
+ {% from "components/error/_macro.njk" import onsError %}
5
+
6
+ {% macro onsDateFieldInput(params) %}
7
+ {% set fields %}
8
+ {% for field in params.fields %}
9
+ {{
10
+ onsInput({
11
+ "id": field.id,
12
+ "classes": field.classes,
13
+ "width": field.width,
14
+ "type": "number",
15
+ "name": field.name,
16
+ "value": field.value,
17
+ "min": field.min,
18
+ "max": field.max,
19
+ "maxLength": field.maxLength,
20
+ "suffix": field.suffix,
21
+ "label": field.label,
22
+ "attributes": field.attributes,
23
+ "error": field.error,
24
+ "fieldId": field.fieldId
25
+ })
26
+ }}
27
+ {% endfor %}
28
+ {% endset %}
29
+
30
+ {% if numberOfFields > 1 %}
31
+ {% set fields %}
32
+ <div class="ons-field-group">
33
+ {{ fields | safe }}
34
+ </div>
35
+ {% endset %}
36
+ {% endif %}
37
+
38
+ {% if params.mutuallyExclusive %}
39
+ {% set mutuallyExclusive = params.mutuallyExclusive | setAttributes({
40
+ "id": params.id,
41
+ "legend": params.legendOrLabel,
42
+ "legendClasses": params.legendClasses,
43
+ "description": params.description,
44
+ "error": params.error,
45
+ "classes": params.classes,
46
+ "legendIsQuestionTitle": params.legendIsQuestionTitle,
47
+ "dontWrap": params.dontWrap,
48
+ "exclusiveOptions": params.mutuallyExclusive.exclusiveOptions,
49
+ "or": params.mutuallyExclusive.or,
50
+ "deselectMessage": params.mutuallyExclusive.deselectMessage,
51
+ "deselectGroupAdjective": params.mutuallyExclusive.deselectGroupAdjective,
52
+ "deselectExclusiveOptionAdjective": params.mutuallyExclusive.deselectExclusiveOptionAdjective
53
+ }) %}
54
+
55
+ {% call onsMutuallyExclusive(mutuallyExclusive) %}
56
+ <div class="ons-field-group">
57
+ {{ fields | safe }}
58
+ </div>
59
+ {% endcall %}
60
+ {% elif params.numberOfFields > 1 %}
61
+ {% call onsFieldset({
62
+ "id": params.id,
63
+ "legend": params.legendOrLabel,
64
+ "classes": params.classes,
65
+ "description": params.description,
66
+ "legendClasses": params.legendClasses,
67
+ "error": params.error,
68
+ "legendIsQuestionTitle": params.legendIsQuestionTitle,
69
+ "dontWrap": params.dontWrap
70
+ }) %}
71
+ <div class="ons-field-group">
72
+ {{ fields | safe }}
73
+ </div>
74
+ {% endcall %}
75
+ {% elif params.numberOfFields == 1 %}
76
+ {% if params.error %}
77
+ {% call onsError(params.error) %}
78
+ {{ fields | safe }}
79
+ {% endcall %}
80
+ {% else %}
81
+ {{ fields | safe }}
82
+ {% endif %}
83
+ {% else %}
84
+ {{ fields | safe }}
85
+ {% endif %}
86
+ {% endmacro %}
@@ -1,12 +1,8 @@
1
- {% macro onsDateInput(params) %}
2
- {% from "components/fieldset/_macro.njk" import onsFieldset %}
3
- {% from "components/mutually-exclusive/_macro.njk" import onsMutuallyExclusive %}
4
- {% from "components/input/_macro.njk" import onsInput %}
5
- {% from "components/error/_macro.njk" import onsError %}
1
+ {% from "components/date-field-input/_macro.njk" import onsDateFieldInput %}
6
2
 
3
+ {% macro onsDateInput(params) %}
7
4
  {% set exclusiveClass = " ons-js-exclusive-group-item" if params.mutuallyExclusive else "" %}
8
-
9
- {%- set numberOfFields = 0 -%}
5
+ {%- set numberOfFields = 0 -%}
10
6
 
11
7
  {%- if params.day -%}
12
8
  {%- set numberOfFields = numberOfFields + 1 -%}
@@ -20,114 +16,82 @@
20
16
  {%- set numberOfFields = numberOfFields + 1 -%}
21
17
  {%- endif -%}
22
18
 
23
- {% set fields %}
24
- {% if params.day %}
25
- {{ onsInput({
26
- "id": params.id + "-day",
27
- "type": "number",
28
- "name": params.day.name,
29
- "classes": (" ons-input--error" if (params.error and params.day.error) or (params.error and not params.day.error and not params.month.error and not params.year.error) else "") + exclusiveClass | default(""),
30
- "width": "2",
31
- "min": 1,
32
- "max": 31,
33
- "maxLength": 2,
34
- "attributes": params.day.attributes,
35
- "label": {
36
- "text": params.day.label.text if numberOfFields > 1 else params.legendOrLabel,
37
- "description": params.day.label.description if numberOfFields > 1 else params.description,
38
- "id": params.id + "-day-label"
39
- },
40
- "value": params.day.value
41
- }) }}
42
- {% endif %}
43
-
44
- {% if params.month %}
45
- {{ onsInput({
46
- "id": params.id + "-month",
47
- "type": "number",
48
- "name": params.month.name,
49
- "classes": (" ons-input--error" if (params.error and params.month.error) or (params.error and not params.day.error and not params.month.error and not params.year.error) else "") + exclusiveClass | default(""),
50
- "width": "2",
51
- "min": 1,
52
- "max": 12,
53
- "maxLength": 2,
54
- "attributes": params.month.attributes,
55
- "label": {
56
- "text": params.month.label.text if numberOfFields > 1 else params.legendOrLabel,
57
- "description": params.month.label.description if numberOfFields > 1 else params.description,
58
- "id": params.id + "-month-label"
59
- },
60
- "value": params.month.value
61
- }) }}
62
- {% endif %}
63
-
64
- {% if params.year %}
65
- {{ onsInput({
66
- "id": params.id + "-year",
67
- "type": "number",
68
- "name": params.year.name,
69
- "classes": (" ons-input--error" if (params.error and params.year.error) or (params.error and not params.day.error and not params.month.error and not params.year.error) else "") + exclusiveClass | default(""),
70
- "width": "4",
71
- "min": 1000,
72
- "max": 3000,
73
- "maxLength": 4,
74
- "attributes": params.year.attributes,
75
- "label": {
76
- "text": params.year.label.text if numberOfFields > 1 else params.legendOrLabel,
77
- "description": params.year.label.description if numberOfFields > 1 else params.description,
78
- "id": params.id + "-year-label"
79
- },
80
- "value": params.year.value
81
- }) }}
82
- {% endif %}
83
- {% endset %}
84
-
85
- {% if numberOfFields > 1 %}
86
- {% set fields %}
87
- <div class="ons-field-group">
88
- {{ fields | safe }}
89
- </div>
90
- {% endset %}
19
+ {% set fields = [] %}
20
+ {% if params.day %}
21
+ {% set dayField = {
22
+ "id": params.id + "-day",
23
+ "label": {
24
+ "text": params.day.label.text if numberOfFields > 1 else params.legendOrLabel,
25
+ "description": params.day.label.description if numberOfFields > 1 else params.description,
26
+ "id": params.id + "-day-label"
27
+ },
28
+ "name": params.day.name,
29
+ "width": "2",
30
+ "min": 1,
31
+ "max": 31,
32
+ "maxLength": 2,
33
+ "attributes": params.day.attributes,
34
+ "value": params.day.value,
35
+ "classes": (" ons-input--error" if (params.error and params.day.error) or (params.error and not params.day.error and not params.month.error and not params.year.error) else "") + exclusiveClass | default("")
36
+ } %}
37
+ {% set fields = (fields.push(dayField), fields) %}
91
38
  {% endif %}
92
-
93
- {% if params.mutuallyExclusive %}
94
- {% call onsMutuallyExclusive({
95
- "id": params.id,
96
- "legend": params.legendOrLabel,
97
- "legendClasses": params.legendClasses,
98
- "description": params.description,
99
- "classes": params.classes,
100
- "dontWrap": params.dontWrap if numberOfFields > 1 else true,
101
- "legendIsQuestionTitle": params.legendIsQuestionTitle,
102
- "exclusiveOptions": params.mutuallyExclusive.exclusiveOptions,
103
- "or": params.mutuallyExclusive.or,
104
- "deselectMessage": params.mutuallyExclusive.deselectMessage,
105
- "deselectGroupAdjective": params.mutuallyExclusive.deselectGroupAdjective,
106
- "deselectExclusiveOptionAdjective": params.mutuallyExclusive.deselectExclusiveOptionAdjective,
107
- "error": params.error
108
- }) %}
109
- {{ fields | safe }}
110
- {% endcall %}
111
- {% elif numberOfFields == 1 %}
112
- {% if params.error %}
113
- {% call onsError(params.error) %}
114
- {{ fields | safe }}
115
- {% endcall %}
116
- {% else %}
117
- {{ fields | safe }}
118
- {% endif %}
119
- {% else %}
120
- {% call onsFieldset({
121
- "id": params.id,
122
- "legend": params.legendOrLabel,
123
- "legendClasses": params.legendClasses,
124
- "description": params.description,
125
- "classes": params.classes,
126
- "dontWrap": params.dontWrap,
127
- "legendIsQuestionTitle": params.legendIsQuestionTitle,
128
- "error": params.error
129
- }) %}
130
- {{ fields | safe }}
131
- {% endcall %}
39
+ {% if params.month %}
40
+ {% set monthField = {
41
+ "id": params.id + "-month",
42
+ "label": {
43
+ "text": params.month.label.text if numberOfFields > 1 else params.legendOrLabel,
44
+ "description": params.month.label.description if numberOfFields > 1 else params.description,
45
+ "id": params.id + "-month-label"
46
+ },
47
+ "name": params.month.name,
48
+ "width": "2",
49
+ "min": 1,
50
+ "max": 12,
51
+ "maxLength": 2,
52
+ "attributes": params.month.attributes,
53
+ "value": params.month.value,
54
+ "classes": (" ons-input--error" if (params.error and params.month.error) or (params.error and not params.day.error and not params.month.error and not params.year.error) else "") + exclusiveClass | default("")
55
+ } %}
56
+ {% set fields = (fields.push(monthField), fields) %}
132
57
  {% endif %}
58
+ {% if params.year %}
59
+ {% set yearField = {
60
+ "id": params.id + "-year",
61
+ "label": {
62
+ "text": params.year.label.text if numberOfFields > 1 else params.legendOrLabel,
63
+ "description": params.year.label.description if numberOfFields > 1 else params.description,
64
+ "id": params.id + "-year-label"
65
+ },
66
+ "name": params.year.name,
67
+ "width": "4",
68
+ "min": 1000,
69
+ "max": 3000,
70
+ "maxLength": 4,
71
+ "attributes": params.year.attributes,
72
+ "value": params.year.value,
73
+ "classes": (" ons-input--error" if (params.error and params.year.error) or (params.error and not params.day.error and not params.month.error and not params.year.error) else "") + exclusiveClass | default("")
74
+ } %}
75
+ {% set fields = (fields.push(yearField), fields) %}
76
+ {% endif %}
77
+
78
+ {{ onsDateFieldInput({
79
+ "id": params.id,
80
+ "legendOrLabel": params.legendOrLabel,
81
+ "description": params.description,
82
+ "mutuallyExclusive": params.mutuallyExclusive,
83
+ "fields": fields,
84
+ "numberOfFields": numberOfFields,
85
+ "error": params.error,
86
+ "legend": params.legendOrLabel,
87
+ "dontWrap": params.dontWrap,
88
+ "legendClasses": params.legendClasses,
89
+ "legendIsQuestionTitle": params.legendIsQuestionTitle,
90
+ "classes": params.classes,
91
+ "exclusiveOptions": params.mutuallyExclusive.exclusiveOptions,
92
+ "or": params.mutuallyExclusive.or,
93
+ "deselectMessage": params.mutuallyExclusive.deselectMessage,
94
+ "deselectGroupAdjective": params.mutuallyExclusive.deselectGroupAdjective,
95
+ "deselectExclusiveOptionAdjective": params.mutuallyExclusive.deselectExclusiveOptionAdjective
96
+ }) }}
133
97
  {% endmacro %}
@@ -1,5 +1,5 @@
1
- .ons-metadata {
2
- &__list {
1
+ .ons-description-list {
2
+ &__items {
3
3
  margin: 0 0 2rem;
4
4
  }
5
5
 
@@ -0,0 +1,14 @@
1
+ {% macro onsDescriptionList(params) %}
2
+ <dl class="ons-description-list ons-description-list__items ons-grid ons-grid--gutterless ons-u-cf{{ (' ' + params.classes) if params.classes }}"{% if params.id %} id="{{ params.id }}" {% endif %}{% if params.descriptionListLabel %} title="{{ params.descriptionListLabel }}" aria-label="{{ params.descriptionListLabel }}"{% endif %}>
3
+ {% for item in params.itemsList %}
4
+ {% if item.term | length %}
5
+ <dt class="ons-description-list__term ons-grid__col ons-col-{{ params.termCol }}@m">{{ item.term }}</dt>
6
+ {% endif %}
7
+ {% for descriptionItem in item.descriptions %}
8
+ {% if descriptionItem.description | length %}
9
+ <dd {% if descriptionItem.id %}id="{{ descriptionItem.id }}" {% endif %}class="ons-description-list__value ons-grid__col ons-col-{{ params.descriptionCol }}@m">{{ descriptionItem.description }}</dd>
10
+ {% endif %}
11
+ {% endfor %}
12
+ {% endfor %}
13
+ </dl>
14
+ {% endmacro %}
@@ -5,10 +5,10 @@ import * as cheerio from 'cheerio';
5
5
  import axe from '../../tests/helpers/axe';
6
6
  import { renderComponent } from '../../tests/helpers/rendering';
7
7
 
8
- const EXAMPLE_METADATA_FULL = {
8
+ const EXAMPLE_DESCRIPTION_LIST_FULL = {
9
9
  id: 'example-id',
10
10
  classes: 'ons-u-mb-no',
11
- metadataLabel: 'This is an example of the metadata component',
11
+ descriptionListLabel: 'This is an example of the description list component',
12
12
  termCol: 2,
13
13
  descriptionCol: 10,
14
14
  itemsList: [
@@ -37,7 +37,7 @@ const EXAMPLE_METADATA_FULL = {
37
37
  ],
38
38
  };
39
39
 
40
- const EXAMPLE_METADATA_MINIMAL = {
40
+ const EXAMPLE_DESCRIPTION_LIST_MINIMAL = {
41
41
  itemsList: [
42
42
  {
43
43
  term: 'Survey:',
@@ -61,16 +61,16 @@ const EXAMPLE_METADATA_MINIMAL = {
61
61
  ],
62
62
  };
63
63
 
64
- describe('macro: metadata', () => {
64
+ describe('macro: description-list', () => {
65
65
  it('passes jest-axe checks when all parameters are provided', async () => {
66
- const $ = cheerio.load(renderComponent('metadata', EXAMPLE_METADATA_FULL));
66
+ const $ = cheerio.load(renderComponent('description-list', EXAMPLE_DESCRIPTION_LIST_FULL));
67
67
 
68
68
  const results = await axe($.html());
69
69
  expect(results).toHaveNoViolations();
70
70
  });
71
71
 
72
72
  it('passes jest-axe checks when minimal parameters are provided', async () => {
73
- const $ = cheerio.load(renderComponent('metadata', EXAMPLE_METADATA_MINIMAL));
73
+ const $ = cheerio.load(renderComponent('description-list', EXAMPLE_DESCRIPTION_LIST_MINIMAL));
74
74
 
75
75
  const results = await axe($.html());
76
76
  expect(results).toHaveNoViolations();
@@ -78,8 +78,8 @@ describe('macro: metadata', () => {
78
78
 
79
79
  it('has the provided `id` attribute', () => {
80
80
  const $ = cheerio.load(
81
- renderComponent('metadata', {
82
- ...EXAMPLE_METADATA_MINIMAL,
81
+ renderComponent('description-list', {
82
+ ...EXAMPLE_DESCRIPTION_LIST_MINIMAL,
83
83
  id: 'example-id',
84
84
  }),
85
85
  );
@@ -89,32 +89,32 @@ describe('macro: metadata', () => {
89
89
 
90
90
  it('has additionally provided style classes', () => {
91
91
  const $ = cheerio.load(
92
- renderComponent('metadata', {
93
- ...EXAMPLE_METADATA_MINIMAL,
92
+ renderComponent('description-list', {
93
+ ...EXAMPLE_DESCRIPTION_LIST_MINIMAL,
94
94
  classes: 'extra-class another-extra-class',
95
95
  }),
96
96
  );
97
97
 
98
- expect($('.ons-metadata').hasClass('extra-class')).toBe(true);
99
- expect($('.ons-metadata').hasClass('another-extra-class')).toBe(true);
98
+ expect($('.ons-description-list').hasClass('extra-class')).toBe(true);
99
+ expect($('.ons-description-list').hasClass('another-extra-class')).toBe(true);
100
100
  });
101
101
 
102
- it('outputs `title` and `aria-label` attributes when `metadataLabel` is provided', () => {
102
+ it('outputs `title` and `aria-label` attributes when `descriptionListLabel` is provided', () => {
103
103
  const $ = cheerio.load(
104
- renderComponent('metadata', {
105
- ...EXAMPLE_METADATA_MINIMAL,
106
- metadataLabel: 'This is an example of the metadata component',
104
+ renderComponent('description-list', {
105
+ ...EXAMPLE_DESCRIPTION_LIST_MINIMAL,
106
+ descriptionListLabel: 'This is an example of the description list component',
107
107
  }),
108
108
  );
109
109
 
110
- expect($('.ons-metadata').attr('title')).toBe('This is an example of the metadata component');
111
- expect($('.ons-metadata').attr('aria-label')).toBe('This is an example of the metadata component');
110
+ expect($('.ons-description-list').attr('title')).toBe('This is an example of the description list component');
111
+ expect($('.ons-description-list').attr('aria-label')).toBe('This is an example of the description list component');
112
112
  });
113
113
 
114
114
  it('outputs list items as expected', () => {
115
- const $ = cheerio.load(renderComponent('metadata', EXAMPLE_METADATA_FULL));
115
+ const $ = cheerio.load(renderComponent('description-list', EXAMPLE_DESCRIPTION_LIST_FULL));
116
116
 
117
- const $listElements = $('.ons-metadata__term, .ons-metadata__value');
117
+ const $listElements = $('.ons-description-list__term, .ons-description-list__value');
118
118
 
119
119
  expect($listElements[0].tagName).toBe('dt');
120
120
  expect($($listElements[0]).text()).toBe('Survey:');
@@ -140,13 +140,13 @@ describe('macro: metadata', () => {
140
140
  [4, 'ons-col-4\\@m'],
141
141
  ])('applies class for the provided `termCol` (%i -> %s)', (termCol, expectedClass) => {
142
142
  const $ = cheerio.load(
143
- renderComponent('metadata', {
144
- ...EXAMPLE_METADATA_MINIMAL,
143
+ renderComponent('description-list', {
144
+ ...EXAMPLE_DESCRIPTION_LIST_MINIMAL,
145
145
  termCol,
146
146
  }),
147
147
  );
148
148
 
149
- const $termElements = $(`.ons-metadata__term.${expectedClass}`);
149
+ const $termElements = $(`.ons-description-list__term.${expectedClass}`);
150
150
  expect($termElements.length).toBe(2);
151
151
  });
152
152
 
@@ -155,13 +155,13 @@ describe('macro: metadata', () => {
155
155
  [4, 'ons-col-4\\@m'],
156
156
  ])('applies class for the provided `descriptionCol` (%i -> %s)', (descriptionCol, expectedClass) => {
157
157
  const $ = cheerio.load(
158
- renderComponent('metadata', {
159
- ...EXAMPLE_METADATA_MINIMAL,
158
+ renderComponent('description-list', {
159
+ ...EXAMPLE_DESCRIPTION_LIST_MINIMAL,
160
160
  descriptionCol,
161
161
  }),
162
162
  );
163
163
 
164
- const $valueElements = $(`.ons-metadata__value.${expectedClass}`);
164
+ const $valueElements = $(`.ons-description-list__value.${expectedClass}`);
165
165
  expect($valueElements.length).toBe(3);
166
166
  });
167
167
  });
@@ -1,8 +1,8 @@
1
- {% from "components/metadata/_macro.njk" import onsMetadata %}
1
+ {% from "components/description-list/_macro.njk" import onsDescriptionList %}
2
2
  {{
3
- onsMetadata({
3
+ onsDescriptionList({
4
4
  "classes": "ons-u-mb-no",
5
- "metadataLabel": "Information about this business and its survey requirements",
5
+ "descriptionListLabel": "Information about this business and its survey requirements",
6
6
  "termCol": "2",
7
7
  "descriptionCol": "10",
8
8
  "itemsList": [