@ons/design-system 74.0.0-next.1 → 74.0.0-next.10
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.
- package/README.md +15 -3
- package/components/access-code/example-access-code-error.njk +1 -1
- package/components/access-code/example-access-code.njk +1 -1
- package/components/address-input/autosuggest.address.spec.js +23 -0
- package/components/autosuggest/autosuggest.ui.js +3 -0
- package/components/back-to-top/example-full-page-back-to-top.njk +1 -1
- package/components/breadcrumbs/_breadcrumbs.scss +4 -7
- package/components/breadcrumbs/_macro.njk +29 -25
- package/components/breadcrumbs/_macro.spec.js +39 -0
- package/components/breadcrumbs/example-breadcrumbs-wide.njk +52 -0
- package/components/chart/_chart.scss +0 -9
- package/components/chart/_macro.njk +96 -128
- package/components/chart/_macro.spec.js +43 -28
- package/components/chart/example-area-chart-with-axis-min-and-max-values.njk +6 -3
- package/components/chart/example-area-chart.njk +6 -3
- package/components/chart/example-bar-chart-with-annotations.njk +6 -3
- package/components/chart/example-bar-chart-with-axis-min-and-max-values.njk +6 -3
- package/components/chart/example-bar-chart-with-point-range-and-reference-line-annotations.njk +6 -3
- package/components/chart/example-bar-chart.njk +6 -3
- package/components/chart/example-bar-with-confidence-levels.njk +6 -3
- package/components/chart/example-clustered-bar-chart.njk +6 -3
- package/components/chart/example-clustered-column-chart.njk +6 -3
- package/components/chart/example-column-chart-with-annotations.njk +6 -3
- package/components/chart/example-column-chart-with-axis-min-and-max-values.njk +6 -3
- package/components/chart/example-column-chart-with-custom-reference-line-value.njk +6 -3
- package/components/chart/example-column-chart-with-range-annotations.njk +6 -3
- package/components/chart/example-column-chart-with-reference-line-annotations.njk +6 -3
- package/components/chart/example-column-chart.njk +6 -3
- package/components/chart/example-column-with-confidence-levels.njk +6 -3
- package/components/chart/example-column-with-line-chart.njk +6 -3
- package/components/chart/example-iframe-chart.njk +6 -3
- package/components/chart/example-line-chart-with-annotations.njk +6 -3
- package/components/chart/example-line-chart-with-axis-min-and-max-values.njk +6 -3
- package/components/chart/example-line-chart-with-custom-reference-line-value.njk +6 -3
- package/components/chart/example-line-chart-with-label-format.njk +6 -3
- package/components/chart/example-line-chart-with-markers.njk +6 -3
- package/components/chart/example-line-chart-with-range-annotations-inside.njk +6 -3
- package/components/chart/example-line-chart-with-range-annotations-outside-left-right.njk +6 -3
- package/components/chart/example-line-chart-with-range-annotations-outside-top-bottom.njk +6 -3
- package/components/chart/example-line-chart-with-reference-line-annotations.njk +6 -3
- package/components/chart/example-line-chart.njk +6 -3
- package/components/chart/example-scatter-chart-with-axis-min-and-max-values.njk +6 -3
- package/components/chart/example-scatter-chart.njk +6 -3
- package/components/chart/example-stacked-bar-chart.njk +6 -3
- package/components/chart/example-stacked-column-chart.njk +6 -3
- package/components/document-list/_macro.njk +2 -2
- package/components/document-list/_macro.spec.js +55 -0
- package/components/featured-article/_macro.njk +3 -37
- package/components/featured-article/example-featured-article-with-chart.njk +19 -14
- package/components/featured-article/example-featured-article-with-image.njk +12 -7
- package/components/featured-article/featured-article.scss +1 -1
- package/components/featured-article/macro.spec.js +44 -67
- package/components/figure/_figure.scss +31 -0
- package/components/figure/_macro.njk +98 -0
- package/components/figure/_macro.spec.js +520 -0
- package/components/figure/example-figure-heading-level-2.njk +34 -0
- package/components/figure/example-figure-with-div.njk +29 -0
- package/components/figure/example-figure-without-footer.njk +12 -0
- package/components/figure/example-figure-without-header.njk +24 -0
- package/components/figure/example-figure.njk +34 -0
- package/components/header/_header.scss +1 -3
- package/components/header/_macro.njk +8 -4
- package/components/header/_macro.spec.js +48 -0
- package/components/hero/_macro.njk +3 -2
- package/components/hero/_macro.spec.js +36 -0
- package/components/hero/example-hero-dark-wide.njk +17 -0
- package/components/hero/example-hero-dark-with-external-breadcrumbs.njk +17 -21
- package/components/hero/example-hero-default-full-width.njk +16 -0
- package/components/hero/example-hero-default-with-external-breadcrumbs.njk +165 -169
- package/components/hero/example-hero-grey-with-external-breadcrumbs.njk +207 -211
- package/components/hero/example-hero-navy-blue-with-external-breadcrumbs.njk +163 -167
- package/components/hero/example-hero-pale-blue-with-external-breadcrumbs.njk +165 -169
- package/components/image/_image.scss +0 -7
- package/components/image/_macro.njk +25 -14
- package/components/image/_macro.spec.js +122 -7
- package/components/image/example-image-with-figure-fields.njk +25 -0
- package/components/list/_macro.njk +1 -0
- package/components/list/_macro.spec.js +16 -0
- package/components/question/example-question-ccs.njk +1 -1
- package/components/question/example-question-fieldset.njk +1 -1
- package/components/question/example-question-interviewer-note.njk +1 -1
- package/components/question/example-question-no-fieldset.njk +1 -1
- package/components/relationships/example-relationships-error.njk +1 -1
- package/components/relationships/example-relationships-you.njk +1 -1
- package/components/relationships/example-relationships.njk +1 -1
- package/components/table/_macro.njk +138 -111
- package/components/table/_macro.spec.js +175 -16
- package/components/table/_table.scss +6 -1
- package/components/table/example-table-basic-no-caption.njk +46 -0
- package/components/table/example-table-basic-visually-hidden-caption.njk +47 -0
- package/components/table/example-table-with-figure-fields.njk +86 -0
- package/components/table/table.spec.js +2 -0
- package/components/table-of-contents/_macro.njk +6 -4
- package/components/table-of-contents/_macro.spec.js +43 -3
- package/components/table-of-contents/example-table-of-contents-ordered.njk +64 -0
- package/components/table-of-contents/example-table-of-contents-sticky-full-page-ordered.njk +156 -0
- package/components/table-of-contents/example-table-of-contents-sticky-full-page.njk +1 -1
- package/components/table-of-contents/table-of-contents.spec.js +4 -5
- package/css/main.css +1 -1
- package/layout/_template.njk +66 -46
- package/package.json +45 -36
- package/scripts/main.es5.js +3 -3
- package/scripts/main.js +2 -2
- package/scss/base/_global.scss +8 -0
- package/scss/main.scss +1 -0
- package/scss/objects/_page.scss +1 -1
- package/scss/objects/_spacing.scss +0 -4
|
@@ -15,16 +15,19 @@
|
|
|
15
15
|
'itemsList': [
|
|
16
16
|
{
|
|
17
17
|
"text": "Excel spreadsheet (XLSX format, 18KB)",
|
|
18
|
-
"url": "#"
|
|
18
|
+
"url": "#",
|
|
19
|
+
"download": "file"
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
"text": "Simple text file (CSV format, 25KB)",
|
|
22
|
-
"url": "#"
|
|
23
|
+
"url": "#",
|
|
24
|
+
"download": "file"
|
|
23
25
|
},
|
|
24
26
|
{
|
|
25
27
|
|
|
26
28
|
"text": "Image (PNG format, 25KB)",
|
|
27
|
-
"url": "#"
|
|
29
|
+
"url": "#",
|
|
30
|
+
"download": "file"
|
|
28
31
|
}
|
|
29
32
|
]},
|
|
30
33
|
"legend": true,
|
|
@@ -15,16 +15,19 @@
|
|
|
15
15
|
'itemsList': [
|
|
16
16
|
{
|
|
17
17
|
"text": "Excel spreadsheet (XLSX format, 18KB)",
|
|
18
|
-
"url": "#"
|
|
18
|
+
"url": "#",
|
|
19
|
+
"download": "file"
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
"text": "Simple text file (CSV format, 25KB)",
|
|
22
|
-
"url": "#"
|
|
23
|
+
"url": "#",
|
|
24
|
+
"download": "file"
|
|
23
25
|
},
|
|
24
26
|
{
|
|
25
27
|
|
|
26
28
|
"text": "Image (PNG format, 25KB)",
|
|
27
|
-
"url": "#"
|
|
29
|
+
"url": "#",
|
|
30
|
+
"download": "file"
|
|
28
31
|
}
|
|
29
32
|
]},
|
|
30
33
|
"legend": true,
|
|
@@ -15,16 +15,19 @@
|
|
|
15
15
|
'itemsList': [
|
|
16
16
|
{
|
|
17
17
|
"text": "Excel spreadsheet (XLSX format, 18KB)",
|
|
18
|
-
"url": "#"
|
|
18
|
+
"url": "#",
|
|
19
|
+
"download": "file"
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
"text": "Simple text file (CSV format, 25KB)",
|
|
22
|
-
"url": "#"
|
|
23
|
+
"url": "#",
|
|
24
|
+
"download": "file"
|
|
23
25
|
},
|
|
24
26
|
{
|
|
25
27
|
|
|
26
28
|
"text": "Image (PNG format, 25KB)",
|
|
27
|
-
"url": "#"
|
|
29
|
+
"url": "#",
|
|
30
|
+
"download": "file"
|
|
28
31
|
}
|
|
29
32
|
]},
|
|
30
33
|
"footnotes": {
|
|
@@ -15,16 +15,19 @@
|
|
|
15
15
|
'itemsList': [
|
|
16
16
|
{
|
|
17
17
|
"text": "Excel spreadsheet (XLSX format, 18KB)",
|
|
18
|
-
"url": "#"
|
|
18
|
+
"url": "#",
|
|
19
|
+
"download": "file"
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
"text": "Simple text file (CSV format, 25KB)",
|
|
22
|
-
"url": "#"
|
|
23
|
+
"url": "#",
|
|
24
|
+
"download": "file"
|
|
23
25
|
},
|
|
24
26
|
{
|
|
25
27
|
|
|
26
28
|
"text": "Image (PNG format, 25KB)",
|
|
27
|
-
"url": "#"
|
|
29
|
+
"url": "#",
|
|
30
|
+
"download": "file"
|
|
28
31
|
}
|
|
29
32
|
]},
|
|
30
33
|
"legend": true,
|
|
@@ -15,16 +15,19 @@
|
|
|
15
15
|
'itemsList': [
|
|
16
16
|
{
|
|
17
17
|
"text": "Excel spreadsheet (XLSX format, 18KB)",
|
|
18
|
-
"url": "#"
|
|
18
|
+
"url": "#",
|
|
19
|
+
"download": "file"
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
"text": "Simple text file (CSV format, 25KB)",
|
|
22
|
-
"url": "#"
|
|
23
|
+
"url": "#",
|
|
24
|
+
"download": "file"
|
|
23
25
|
},
|
|
24
26
|
{
|
|
25
27
|
|
|
26
28
|
"text": "Image (PNG format, 25KB)",
|
|
27
|
-
"url": "#"
|
|
29
|
+
"url": "#",
|
|
30
|
+
"download": "file"
|
|
28
31
|
}
|
|
29
32
|
]},
|
|
30
33
|
"legend": true,
|
|
@@ -15,16 +15,19 @@
|
|
|
15
15
|
'itemsList': [
|
|
16
16
|
{
|
|
17
17
|
"text": "Excel spreadsheet (XLSX format, 18KB)",
|
|
18
|
-
"url": "#"
|
|
18
|
+
"url": "#",
|
|
19
|
+
"download": "file"
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
"text": "Simple text file (CSV format, 25KB)",
|
|
22
|
-
"url": "#"
|
|
23
|
+
"url": "#",
|
|
24
|
+
"download": "file"
|
|
23
25
|
},
|
|
24
26
|
{
|
|
25
27
|
|
|
26
28
|
"text": "Image (PNG format, 25KB)",
|
|
27
|
-
"url": "#"
|
|
29
|
+
"url": "#",
|
|
30
|
+
"download": "file"
|
|
28
31
|
}
|
|
29
32
|
]},
|
|
30
33
|
"legend": true,
|
|
@@ -15,16 +15,19 @@
|
|
|
15
15
|
'itemsList': [
|
|
16
16
|
{
|
|
17
17
|
"text": "Excel spreadsheet (XLSX format, 18KB)",
|
|
18
|
-
"url": "#"
|
|
18
|
+
"url": "#",
|
|
19
|
+
"download": "file"
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
"text": "Simple text file (CSV format, 25KB)",
|
|
22
|
-
"url": "#"
|
|
23
|
+
"url": "#",
|
|
24
|
+
"download": "file"
|
|
23
25
|
},
|
|
24
26
|
{
|
|
25
27
|
|
|
26
28
|
"text": "Image (PNG format, 25KB)",
|
|
27
|
-
"url": "#"
|
|
29
|
+
"url": "#",
|
|
30
|
+
"download": "file"
|
|
28
31
|
}
|
|
29
32
|
]},
|
|
30
33
|
"legend": true,
|
|
@@ -15,16 +15,19 @@
|
|
|
15
15
|
'itemsList': [
|
|
16
16
|
{
|
|
17
17
|
"text": "Excel spreadsheet (XLSX format, 18KB)",
|
|
18
|
-
"url": "#"
|
|
18
|
+
"url": "#",
|
|
19
|
+
"download": "file"
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
"text": "Simple text file (CSV format, 25KB)",
|
|
22
|
-
"url": "#"
|
|
23
|
+
"url": "#",
|
|
24
|
+
"download": "file"
|
|
23
25
|
},
|
|
24
26
|
{
|
|
25
27
|
|
|
26
28
|
"text": "Image (PNG format, 25KB)",
|
|
27
|
-
"url": "#"
|
|
29
|
+
"url": "#",
|
|
30
|
+
"download": "file"
|
|
28
31
|
}
|
|
29
32
|
]},
|
|
30
33
|
"legend": true,
|
|
@@ -15,16 +15,19 @@
|
|
|
15
15
|
'itemsList': [
|
|
16
16
|
{
|
|
17
17
|
"text": "Excel spreadsheet (XLSX format, 18KB)",
|
|
18
|
-
"url": "#"
|
|
18
|
+
"url": "#",
|
|
19
|
+
"download": "file"
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
"text": "Simple text file (CSV format, 25KB)",
|
|
22
|
-
"url": "#"
|
|
23
|
+
"url": "#",
|
|
24
|
+
"download": "file"
|
|
23
25
|
},
|
|
24
26
|
{
|
|
25
27
|
|
|
26
28
|
"text": "Image (PNG format, 25KB)",
|
|
27
|
-
"url": "#"
|
|
29
|
+
"url": "#",
|
|
30
|
+
"download": "file"
|
|
28
31
|
}
|
|
29
32
|
]},
|
|
30
33
|
"footnotes": {
|
|
@@ -15,16 +15,19 @@
|
|
|
15
15
|
'itemsList': [
|
|
16
16
|
{
|
|
17
17
|
"text": "Excel spreadsheet (XLSX format, 18KB)",
|
|
18
|
-
"url": "#"
|
|
18
|
+
"url": "#",
|
|
19
|
+
"download": "file"
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
"text": "Simple text file (CSV format, 25KB)",
|
|
22
|
-
"url": "#"
|
|
23
|
+
"url": "#",
|
|
24
|
+
"download": "file"
|
|
23
25
|
},
|
|
24
26
|
{
|
|
25
27
|
|
|
26
28
|
"text": "Image (PNG format, 25KB)",
|
|
27
|
-
"url": "#"
|
|
29
|
+
"url": "#",
|
|
30
|
+
"download": "file"
|
|
28
31
|
}
|
|
29
32
|
]},
|
|
30
33
|
"xAxis": {
|
|
@@ -15,16 +15,19 @@
|
|
|
15
15
|
'itemsList': [
|
|
16
16
|
{
|
|
17
17
|
"text": "Excel spreadsheet (XLSX format, 18KB)",
|
|
18
|
-
"url": "#"
|
|
18
|
+
"url": "#",
|
|
19
|
+
"download": "file"
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
"text": "Simple text file (CSV format, 25KB)",
|
|
22
|
-
"url": "#"
|
|
23
|
+
"url": "#",
|
|
24
|
+
"download": "file"
|
|
23
25
|
},
|
|
24
26
|
{
|
|
25
27
|
|
|
26
28
|
"text": "Image (PNG format, 25KB)",
|
|
27
|
-
"url": "#"
|
|
29
|
+
"url": "#",
|
|
30
|
+
"download": "file"
|
|
28
31
|
}
|
|
29
32
|
]},
|
|
30
33
|
"footnotes": {
|
|
@@ -14,15 +14,18 @@
|
|
|
14
14
|
'itemsList': [
|
|
15
15
|
{
|
|
16
16
|
"text": "Excel spreadsheet (XLSX format, 18KB)",
|
|
17
|
-
"url": "#"
|
|
17
|
+
"url": "#",
|
|
18
|
+
"download": "file"
|
|
18
19
|
},
|
|
19
20
|
{
|
|
20
21
|
"text": "Simple text file (CSV format, 25KB)",
|
|
21
|
-
"url": "#"
|
|
22
|
+
"url": "#",
|
|
23
|
+
"download": "file"
|
|
22
24
|
},
|
|
23
25
|
{
|
|
24
26
|
"text": "Image (PNG format, 25KB)",
|
|
25
|
-
"url": "#"
|
|
27
|
+
"url": "#",
|
|
28
|
+
"download": "file"
|
|
26
29
|
}
|
|
27
30
|
]
|
|
28
31
|
},
|
|
@@ -12,9 +12,12 @@
|
|
|
12
12
|
"download": {
|
|
13
13
|
"title": "Download Figure 6 data",
|
|
14
14
|
"itemsList": [
|
|
15
|
-
{ "text": "Excel spreadsheet (XLSX format, 22KB)", "url": "#"
|
|
16
|
-
|
|
17
|
-
{ "text": "
|
|
15
|
+
{ "text": "Excel spreadsheet (XLSX format, 22KB)", "url": "#",
|
|
16
|
+
"download": "file" },
|
|
17
|
+
{ "text": "Simple text file (CSV format, 28KB)", "url": "#",
|
|
18
|
+
"download": "file" },
|
|
19
|
+
{ "text": "Image (PNG format, 32KB)", "url": "#",
|
|
20
|
+
"download": "file" }
|
|
18
21
|
]
|
|
19
22
|
},
|
|
20
23
|
"legend": true,
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
document.metadata.file.fileSize if document.metadata.file.fileSize,
|
|
43
43
|
document.metadata.file.filePages if document.metadata.file.filePages ]
|
|
44
44
|
%}
|
|
45
|
-
, {{ fileMetadataItems | join(', ') }}
|
|
45
|
+
, {{ fileMetadataItems | select | join(', ') }}
|
|
46
46
|
</span>
|
|
47
47
|
{% endif %}
|
|
48
48
|
</a>
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
document.metadata.file.fileSize if document.metadata.file.fileSize,
|
|
90
90
|
document.metadata.file.filePages if document.metadata.file.filePages ]
|
|
91
91
|
%}
|
|
92
|
-
{{ fileMetadataItems | join(', ') }}
|
|
92
|
+
{{ fileMetadataItems | select | join(', ') }}
|
|
93
93
|
</li>
|
|
94
94
|
{%- endif -%}
|
|
95
95
|
</ul>
|
|
@@ -277,6 +277,61 @@ describe('FOR: Macro: Document list', () => {
|
|
|
277
277
|
expect(fileInfo).toBe('PDF, 499KB, 1 page');
|
|
278
278
|
});
|
|
279
279
|
});
|
|
280
|
+
|
|
281
|
+
describe('WHEN: file configuration is missing optional fileSize and filePages', () => {
|
|
282
|
+
const $ = cheerio.load(
|
|
283
|
+
renderComponent('document-list', {
|
|
284
|
+
documents: [
|
|
285
|
+
{
|
|
286
|
+
...EXAMPLE_DOCUMENT_LIST_BASIC,
|
|
287
|
+
metadata: {
|
|
288
|
+
file: {
|
|
289
|
+
fileType: 'PDF',
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
],
|
|
294
|
+
}),
|
|
295
|
+
);
|
|
296
|
+
|
|
297
|
+
test('THEN: has visually hidden file information without stray separators', () => {
|
|
298
|
+
const hiddenText = $('.ons-document-list__item-title a .ons-u-vh').text().trim();
|
|
299
|
+
expect(hiddenText).toBe(', PDF document download');
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
test('THEN: has file information without stray separators', () => {
|
|
303
|
+
const fileInfo = $('.ons-document-list__item-attribute').text().trim();
|
|
304
|
+
expect(fileInfo).toBe('PDF');
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
describe('WHEN: file configuration is missing optional filePages', () => {
|
|
309
|
+
const $ = cheerio.load(
|
|
310
|
+
renderComponent('document-list', {
|
|
311
|
+
documents: [
|
|
312
|
+
{
|
|
313
|
+
...EXAMPLE_DOCUMENT_LIST_BASIC,
|
|
314
|
+
metadata: {
|
|
315
|
+
file: {
|
|
316
|
+
fileType: 'PDF',
|
|
317
|
+
fileSize: '499KB',
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
],
|
|
322
|
+
}),
|
|
323
|
+
);
|
|
324
|
+
|
|
325
|
+
test('THEN: has visually hidden file information without stray separators', () => {
|
|
326
|
+
const hiddenText = $('.ons-document-list__item-title a .ons-u-vh').text().trim();
|
|
327
|
+
expect(hiddenText).toBe(', PDF document download, 499KB');
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
test('THEN: has file information without stray separators', () => {
|
|
331
|
+
const fileInfo = $('.ons-document-list__item-attribute').text().trim();
|
|
332
|
+
expect(fileInfo).toBe('PDF, 499KB');
|
|
333
|
+
});
|
|
334
|
+
});
|
|
280
335
|
});
|
|
281
336
|
|
|
282
337
|
describe('GIVEN: Params: object', () => {
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
{% from "components/chart/_macro.njk" import onsChart %}
|
|
2
|
-
{% from "components/image/_macro.njk" import onsImage %}
|
|
3
|
-
|
|
4
1
|
{% macro onsFeaturedArticle(params) %}
|
|
5
2
|
{% set headingLevel = params.headingLevel | default(2) %}
|
|
6
3
|
{% set openingArticleTitleTag = "<h" ~ headingLevel %}
|
|
@@ -32,41 +29,10 @@
|
|
|
32
29
|
</ul>
|
|
33
30
|
{% endif %}
|
|
34
31
|
|
|
32
|
+
{# The media (a nested figure containing a chart or image) is provided via the caller
|
|
33
|
+
block, so the article does not need to know how the content is rendered. #}
|
|
35
34
|
<div class="ons-featured__media">
|
|
36
|
-
{
|
|
37
|
-
{{
|
|
38
|
-
onsChart({
|
|
39
|
-
"chartType": params.chart.chartType,
|
|
40
|
-
"description": params.chart.description,
|
|
41
|
-
"theme": params.chart.theme,
|
|
42
|
-
"title": params.chart.title,
|
|
43
|
-
"id": params.chart.id,
|
|
44
|
-
"headingLevel": headingLevel + 1,
|
|
45
|
-
"legend": params.chart.legend,
|
|
46
|
-
"xAxis": params.chart.xAxis,
|
|
47
|
-
"yAxis": params.chart.yAxis,
|
|
48
|
-
"series": params.chart.series,
|
|
49
|
-
"annotations": params.chart.annotations,
|
|
50
|
-
"rangeAnnotations": params.chart.rangeAnnotations,
|
|
51
|
-
"referenceLineAnnotations": params.chart.referenceLineAnnotations,
|
|
52
|
-
"estimateLineLabel": params.chart.estimateLineLabel,
|
|
53
|
-
"uncertaintyRangeLabel": params.chart.uncertaintyRangeLabel,
|
|
54
|
-
"isChartInverted": params.chart.isChartInverted,
|
|
55
|
-
"useStackedLayout": params.chart.useStackedLayout,
|
|
56
|
-
"percentageHeightDesktop": params.chart.percentageHeightDesktop,
|
|
57
|
-
"percentageHeightMobile": params.chart.percentageHeightMobile
|
|
58
|
-
})
|
|
59
|
-
}}
|
|
60
|
-
{% elif params.image %}
|
|
61
|
-
<div class="ons-featured__image">
|
|
62
|
-
{{
|
|
63
|
-
onsImage({
|
|
64
|
-
"src": params.image.src,
|
|
65
|
-
"alt": params.image.alt
|
|
66
|
-
})
|
|
67
|
-
}}
|
|
68
|
-
</div>
|
|
69
|
-
{% endif %}
|
|
35
|
+
{{ caller() if caller }}
|
|
70
36
|
</div>
|
|
71
37
|
|
|
72
38
|
{% if params.description %}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{% from "components/featured-article/_macro.njk" import onsFeaturedArticle %}
|
|
2
|
-
{
|
|
3
|
-
|
|
2
|
+
{% from "components/chart/_macro.njk" import onsChart %}
|
|
3
|
+
|
|
4
|
+
{%
|
|
5
|
+
call onsFeaturedArticle({
|
|
4
6
|
"title": {
|
|
5
7
|
"text": 'Retail sales, Great Britain: July 2024',
|
|
6
8
|
"url": '#0'
|
|
@@ -15,14 +17,22 @@
|
|
|
15
17
|
}
|
|
16
18
|
},
|
|
17
19
|
"headingLevel": 3,
|
|
18
|
-
"
|
|
20
|
+
"description": "<ul>
|
|
21
|
+
<li>Retail sales volumes increased by 0.4% in July 2024, following a 0.2% increase in June 2024.</li>
|
|
22
|
+
<li>Retail sales values increased by 0.5% in July 2024, following a 0.3% increase in June 2024.</li>
|
|
23
|
+
<li>The annual rate of inflation for the Consumer Prices Index including owner occupiers’ housing costs (CPIH) was 2.8% in July 2024, up from 2.6% in June 2024.</li>
|
|
24
|
+
</ul>"
|
|
25
|
+
})
|
|
26
|
+
%}
|
|
27
|
+
|
|
28
|
+
{{
|
|
29
|
+
onsChart({
|
|
19
30
|
"chartType": "line",
|
|
20
|
-
"description": "Line chart showing the annual rate of inflation for the Consumer Prices Index including owner occupiers’ housing costs (CPIH) and its components.",
|
|
21
31
|
"theme": "primary",
|
|
32
|
+
"headingLevel": 4,
|
|
22
33
|
"title": "Sales volumes and values saw moderate growth in July 2024",
|
|
23
|
-
"
|
|
34
|
+
"audioDescription": "Line chart showing the annual rate of inflation for the Consumer Prices Index including owner occupiers’ housing costs (CPIH) and its components.",
|
|
24
35
|
"id": "id",
|
|
25
|
-
"headingLevel": 4,
|
|
26
36
|
"legend": true,
|
|
27
37
|
"xAxis": {
|
|
28
38
|
"title": "Year",
|
|
@@ -213,11 +223,6 @@
|
|
|
213
223
|
],
|
|
214
224
|
"percentageHeightDesktop": 35,
|
|
215
225
|
"percentageHeightMobile": 90
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
<li>Retail sales values increased by 0.5% in July 2024, following a 0.3% increase in June 2024.</li>
|
|
220
|
-
<li>The annual rate of inflation for the Consumer Prices Index including owner occupiers’ housing costs (CPIH) was 2.8% in July 2024, up from 2.6% in June 2024.</li>
|
|
221
|
-
</ul>"
|
|
222
|
-
})
|
|
223
|
-
}}
|
|
226
|
+
})
|
|
227
|
+
}}
|
|
228
|
+
{% endcall %}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{% from "components/featured-article/_macro.njk" import onsFeaturedArticle %}
|
|
2
|
-
{
|
|
3
|
-
|
|
2
|
+
{% from "components/image/_macro.njk" import onsImage %}
|
|
3
|
+
|
|
4
|
+
{%
|
|
5
|
+
call onsFeaturedArticle({
|
|
4
6
|
"title": {
|
|
5
7
|
"text": 'Retail sales, Great Britain: July 2024',
|
|
6
8
|
"url": '#0'
|
|
@@ -15,10 +17,13 @@
|
|
|
15
17
|
}
|
|
16
18
|
},
|
|
17
19
|
"headingLevel": 3,
|
|
18
|
-
"image": {
|
|
19
|
-
"src": '/img/small/census-monuments-lights-featured.jpg',
|
|
20
|
-
"alt": 'census monuments lights featured'
|
|
21
|
-
},
|
|
22
20
|
"description": "Retail sales volumes and values saw moderate growth in July 2024, with the annual rate of inflation for the Consumer Prices Index including owner occupiers’ housing costs (CPIH) rising to 2.8%."
|
|
23
21
|
})
|
|
24
|
-
}
|
|
22
|
+
%}
|
|
23
|
+
{{
|
|
24
|
+
onsImage({
|
|
25
|
+
"src": '/img/small/census-monuments-lights-featured.jpg',
|
|
26
|
+
"alt": 'census monuments lights featured'
|
|
27
|
+
})
|
|
28
|
+
}}
|
|
29
|
+
{% endcall %}
|