@ons/design-system 73.9.1 → 73.10.0-beta.2
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/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/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 +93 -0
- package/components/figure/_macro.spec.js +423 -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/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/table/_macro.njk +125 -111
- package/components/table/_macro.spec.js +107 -2
- package/components/table/example-table-with-figure-fields.njk +85 -0
- package/css/main.css +1 -1
- package/package.json +2 -2
- package/scss/main.scss +1 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{% from "components/table/_macro.njk" import onsTable %}
|
|
2
|
+
{{
|
|
3
|
+
onsTable({
|
|
4
|
+
"id": "table-with-figure-fields",
|
|
5
|
+
"headingLevel": 3,
|
|
6
|
+
"figureNumber": "Table 1",
|
|
7
|
+
"title": "Population by region, mid-2023",
|
|
8
|
+
"subtitle": "Estimates for England and Wales",
|
|
9
|
+
"caption": "Population estimates by region",
|
|
10
|
+
"ths": [
|
|
11
|
+
{
|
|
12
|
+
"value": "Region"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"value": "Population",
|
|
16
|
+
"numeric": true
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"value": "Change (%)",
|
|
20
|
+
"numeric": true
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"trs": [
|
|
24
|
+
{
|
|
25
|
+
"tds": [
|
|
26
|
+
{
|
|
27
|
+
"value": "North East"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"value": "2,647,000",
|
|
31
|
+
"numeric": true
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"value": "0.3",
|
|
35
|
+
"numeric": true
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"tds": [
|
|
41
|
+
{
|
|
42
|
+
"value": "North West"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"value": "7,417,000",
|
|
46
|
+
"numeric": true
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"value": "0.5",
|
|
50
|
+
"numeric": true
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"tds": [
|
|
56
|
+
{
|
|
57
|
+
"value": "South East"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"value": "9,294,000",
|
|
61
|
+
"numeric": true
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"value": "0.7",
|
|
65
|
+
"numeric": true
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"footnotes": {
|
|
71
|
+
"title": "Footnotes",
|
|
72
|
+
"content": "Figures are rounded to the nearest thousand. Percentage change is compared with mid-2022 estimates."
|
|
73
|
+
},
|
|
74
|
+
"download": {
|
|
75
|
+
"title": "Download this table",
|
|
76
|
+
"itemsList": [
|
|
77
|
+
{
|
|
78
|
+
"text": "Population by region (CSV format, 1KB)",
|
|
79
|
+
"url": "/data/population-by-region.csv",
|
|
80
|
+
"download": "file"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
}}
|