@ons/design-system 72.10.7 → 72.10.9

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 (45) hide show
  1. package/components/accordion/accordion.js +3 -2
  2. package/components/autosuggest/autosuggest.spec.js +2 -0
  3. package/components/autosuggest/autosuggest.ui.js +12 -7
  4. package/components/breadcrumbs/_breadcrumbs.scss +53 -0
  5. package/components/breadcrumbs/_macro.njk +33 -24
  6. package/components/breadcrumbs/_macro.spec.js +25 -0
  7. package/components/chart/_chart.scss +91 -0
  8. package/components/chart/_macro.njk +38 -7
  9. package/components/chart/_macro.spec.js +102 -13
  10. package/components/chart/bar-chart.js +9 -1
  11. package/components/chart/chart-iframe-resize.js +1 -1
  12. package/components/chart/chart.dom.js +5 -3
  13. package/components/chart/chart.js +8 -2
  14. package/components/chart/common-chart-options.js +9 -0
  15. package/components/chart/example-area-chart.njk +2 -1
  16. package/components/chart/example-bar-chart-with-axis-min-and-max-values.njk +0 -1
  17. package/components/chart/example-bar-chart-with-point-range-and-reference-line-annotations.njk +4 -4
  18. package/components/chart/example-bar-chart.njk +0 -1
  19. package/components/chart/example-iframe-chart.njk +2 -1
  20. package/components/chart/example-line-chart.njk +2 -1
  21. package/components/chart/range-annotations-options.js +1 -1
  22. package/components/download-resources/download-resources.spec.js +2 -0
  23. package/components/hero/_hero.scss +17 -22
  24. package/components/hero/_macro.njk +1 -1
  25. package/components/hero/_macro.spec.js +1 -1
  26. package/components/hero/example-hero-dark-with-external-breadcrumbs.njk +194 -0
  27. package/components/hero/example-hero-default-with-external-breadcrumbs.njk +201 -0
  28. package/components/hero/example-hero-grey-with-external-breadcrumbs.njk +243 -0
  29. package/components/hero/example-hero-navy-blue-with-external-breadcrumbs.njk +200 -0
  30. package/components/hero/example-hero-pale-blue-with-external-breadcrumbs.njk +201 -0
  31. package/components/icon/_macro.njk +1 -1
  32. package/components/mutually-exclusive/mutually-exclusive.js +3 -1
  33. package/components/radios/clear-radios.js +4 -2
  34. package/components/relationships/relationships.js +4 -2
  35. package/components/tabs/tabs.js +2 -2
  36. package/components/video/video.js +2 -0
  37. package/css/main.css +1 -1
  38. package/img/small/area-chart-screenshot.png +0 -0
  39. package/img/small/line-chart-screenshot.png +0 -0
  40. package/js/timeout.js +9 -6
  41. package/layout/_template.njk +4 -1
  42. package/package.json +7 -5
  43. package/scripts/main.es5.js +4 -2
  44. package/scripts/main.js +4 -2
  45. package/scss/objects/_page.scss +1 -1
@@ -0,0 +1,201 @@
1
+ ---
2
+ title: 'Example: Table of contents on full page'
3
+ layout: ~
4
+ ---
5
+
6
+ {% from "components/hero/_macro.njk" import onsHero %}
7
+ {% from "components/breadcrumbs/_macro.njk" import onsBreadcrumbs %}
8
+ {% extends "layout/_template.njk" %}
9
+ {%
10
+ set pageConfig = {
11
+ "header": {
12
+ "variants": 'basic',
13
+ "menuLinks": {
14
+ "id": "menu-links",
15
+ "keyLinks": [
16
+ {
17
+ 'heading': 'Taking part in a survey?',
18
+ 'description': 'It’s never been more important.'
19
+ },
20
+ {
21
+ 'heading': 'Release calendar',
22
+ 'description': 'View our latest and upcoming releases.'
23
+ },
24
+ {
25
+ 'heading': 'Explore local statistics',
26
+ 'url': '#0',
27
+ 'description': 'Explore statistics across the UK.'
28
+ }
29
+ ],
30
+ "columns": [
31
+ {
32
+ "groups": [
33
+ {
34
+ "heading": "People, population and community",
35
+ "groupItems": [
36
+ {
37
+ "text": "Armed forces community"
38
+ },
39
+ {
40
+ "text": "Births, deaths and marriages"
41
+ },
42
+ {
43
+ "text": "Crime and justice"
44
+ },
45
+ {
46
+ "text": "Cultural identity"
47
+ },
48
+ {
49
+ "text": "Education and childcare"
50
+ },
51
+ {
52
+ "text": "Elections"
53
+ },
54
+ {
55
+ "text": "Health and social care"
56
+ },
57
+ {
58
+ "text": "Household characteristics"
59
+ },
60
+ {
61
+ "text": "Housing"
62
+ },
63
+ {
64
+ "text": "Leisure and tourism"
65
+ },
66
+ {
67
+ "text": "Personal and household finances"
68
+ },
69
+ {
70
+ "text": "Population and migration"
71
+ },
72
+ {
73
+ "text": "Well-being"
74
+ }
75
+ ]
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ "groups": [
81
+ {
82
+ "heading": "Business, industry and trade",
83
+ "groupItems": [
84
+ {
85
+ "text": "Business"
86
+ },
87
+ {
88
+ "text": "Changes to business"
89
+ },
90
+ {
91
+ "text": "Construction industry"
92
+ },
93
+ {
94
+ "text": "International trade"
95
+ },
96
+ {
97
+ "text": "IT and internet industry"
98
+ },
99
+ {
100
+ "text": "Manufacturing and production industry"
101
+ },
102
+ {
103
+ "text": "Retail industry",
104
+ "url": "#0"
105
+ },
106
+ {
107
+ "text": "Tourism industry"
108
+ }
109
+ ]
110
+ },
111
+ {
112
+ "heading": "Employment and labour market",
113
+ "url": "#0",
114
+ "groupItems":
115
+ [
116
+ {
117
+ "text": "People in work"
118
+ },
119
+ {
120
+ "text": "People not in work"
121
+ }
122
+ ]
123
+
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "groups": [
129
+ {
130
+ "heading": "Economy",
131
+ "groupItems": [
132
+ {
133
+ "text": "Economic output and productivity"
134
+ },
135
+ {
136
+ "text": "Government, public sector and taxes"
137
+ },
138
+ {
139
+ "text": "Gross Value Added (GVA)"
140
+ },
141
+ {
142
+ "text": "Investments, pensions and trusts"
143
+ },
144
+ {
145
+ "text": "Regional accounts"
146
+ },
147
+ {
148
+ "text": "Environmental accounts"
149
+ },
150
+ {
151
+ "text": "Gross Domestic Product (GDP)"
152
+ },
153
+ {
154
+ "text": "Inflation and price indices"
155
+ },
156
+ {
157
+ "text": "National accounts"
158
+ }
159
+ ]
160
+ }
161
+ ]
162
+ }
163
+ ]
164
+ }
165
+ }
166
+ }
167
+ %}
168
+ {% block pageContent %}
169
+ {{
170
+ onsBreadcrumbs({
171
+ "ariaLabel": 'Breadcrumbs',
172
+ "variant": "pale-blue",
173
+ "itemsList": [
174
+ {
175
+ "url": '/',
176
+ "text": 'Home'
177
+ },
178
+ {
179
+ "url": '/',
180
+ "text": 'Business, industry and trade'
181
+ },
182
+ {
183
+ "url": '/',
184
+ "text": 'Retail industry'
185
+ }
186
+ ]
187
+ })
188
+ }}
189
+ <main id="main-content">
190
+ {{
191
+ onsHero({
192
+ "title": 'Design and build digital services for the ONS',
193
+ "text": 'Everything you need to make accessible, consistent digital products',
194
+ "button": {
195
+ "url": '#0',
196
+ "text": 'Get started'
197
+ }
198
+ })
199
+ }}
200
+ </main>
201
+ {% endblock %}
@@ -0,0 +1,243 @@
1
+ ---
2
+ title: 'Example: Table of contents on full page'
3
+ layout: ~
4
+ ---
5
+
6
+ {% from "components/hero/_macro.njk" import onsHero %}
7
+ {% from "components/breadcrumbs/_macro.njk" import onsBreadcrumbs %}
8
+ {% extends "layout/_template.njk" %}
9
+ {%
10
+ set pageConfig = {
11
+ "header": {
12
+ "variants": 'basic',
13
+ "menuLinks": {
14
+ "id": "menu-links",
15
+ "keyLinks": [
16
+ {
17
+ 'heading': 'Taking part in a survey?',
18
+ 'description': 'It’s never been more important.'
19
+ },
20
+ {
21
+ 'heading': 'Release calendar',
22
+ 'description': 'View our latest and upcoming releases.'
23
+ },
24
+ {
25
+ 'heading': 'Explore local statistics',
26
+ 'url': '#0',
27
+ 'description': 'Explore statistics across the UK.'
28
+ }
29
+ ],
30
+ "columns": [
31
+ {
32
+ "groups": [
33
+ {
34
+ "heading": "People, population and community",
35
+ "groupItems": [
36
+ {
37
+ "text": "Armed forces community"
38
+ },
39
+ {
40
+ "text": "Births, deaths and marriages"
41
+ },
42
+ {
43
+ "text": "Crime and justice"
44
+ },
45
+ {
46
+ "text": "Cultural identity"
47
+ },
48
+ {
49
+ "text": "Education and childcare"
50
+ },
51
+ {
52
+ "text": "Elections"
53
+ },
54
+ {
55
+ "text": "Health and social care"
56
+ },
57
+ {
58
+ "text": "Household characteristics"
59
+ },
60
+ {
61
+ "text": "Housing"
62
+ },
63
+ {
64
+ "text": "Leisure and tourism"
65
+ },
66
+ {
67
+ "text": "Personal and household finances"
68
+ },
69
+ {
70
+ "text": "Population and migration"
71
+ },
72
+ {
73
+ "text": "Well-being"
74
+ }
75
+ ]
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ "groups": [
81
+ {
82
+ "heading": "Business, industry and trade",
83
+ "groupItems": [
84
+ {
85
+ "text": "Business"
86
+ },
87
+ {
88
+ "text": "Changes to business"
89
+ },
90
+ {
91
+ "text": "Construction industry"
92
+ },
93
+ {
94
+ "text": "International trade"
95
+ },
96
+ {
97
+ "text": "IT and internet industry"
98
+ },
99
+ {
100
+ "text": "Manufacturing and production industry"
101
+ },
102
+ {
103
+ "text": "Retail industry",
104
+ "url": "#0"
105
+ },
106
+ {
107
+ "text": "Tourism industry"
108
+ }
109
+ ]
110
+ },
111
+ {
112
+ "heading": "Employment and labour market",
113
+ "url": "#0",
114
+ "groupItems":
115
+ [
116
+ {
117
+ "text": "People in work"
118
+ },
119
+ {
120
+ "text": "People not in work"
121
+ }
122
+ ]
123
+
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "groups": [
129
+ {
130
+ "heading": "Economy",
131
+ "groupItems": [
132
+ {
133
+ "text": "Economic output and productivity"
134
+ },
135
+ {
136
+ "text": "Government, public sector and taxes"
137
+ },
138
+ {
139
+ "text": "Gross Value Added (GVA)"
140
+ },
141
+ {
142
+ "text": "Investments, pensions and trusts"
143
+ },
144
+ {
145
+ "text": "Regional accounts"
146
+ },
147
+ {
148
+ "text": "Environmental accounts"
149
+ },
150
+ {
151
+ "text": "Gross Domestic Product (GDP)"
152
+ },
153
+ {
154
+ "text": "Inflation and price indices"
155
+ },
156
+ {
157
+ "text": "National accounts"
158
+ }
159
+ ]
160
+ }
161
+ ]
162
+ }
163
+ ]
164
+ }
165
+ }
166
+ }
167
+ %}
168
+ {% block pageContent %}
169
+ {{
170
+ onsBreadcrumbs({
171
+ "ariaLabel": 'Breadcrumbs',
172
+ "variant": "grey",
173
+ "itemsList": [
174
+ {
175
+ "url": '/',
176
+ "text": 'Home'
177
+ },
178
+ {
179
+ "url": '/',
180
+ "text": 'Business, industry and trade'
181
+ },
182
+ {
183
+ "url": '/',
184
+ "text": 'Retail industry'
185
+ }
186
+ ]
187
+ })
188
+ }}
189
+ <main id="main-content">
190
+ {{
191
+ onsHero({
192
+ "variants": "grey",
193
+ "detailsColumns": '12',
194
+ "officialStatisticsBadge": true,
195
+ "officialStatisticsBadgeUrl": 'https://uksa.statisticsauthority.gov.uk/about-the-authority/uk-statistical-system/types-of-official-statistics/',
196
+ "informationPanel":{
197
+ "panelText": 'Latest release',
198
+ "panelType": 'ons-green',
199
+ "panelLink": {
200
+ "text": 'View previous releases',
201
+ "url": '#0',
202
+ "ariaLabel": 'View previous release of Retail sales rise amid summer discounts and sporting events'
203
+ }
204
+ },
205
+ "topic": 'Statistical article',
206
+ "title": 'Retail sales rise amid summer discounts and sporting events, according to a first estimate',
207
+ "text": 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum id mattis ligula, nec sollicitudin arcu. Donec non tristique tellus. Donec eget malesuada lorem.',
208
+ "censusLogo": true,
209
+ "descriptionList": {
210
+ "termCol": "5",
211
+ "descriptionCol": "7",
212
+ "itemsList": [
213
+ {
214
+ "term": "Release date:",
215
+ "descriptions": [
216
+ {
217
+ "description": "16 August 2024"
218
+ }
219
+ ]
220
+ },
221
+ {
222
+ "term": "Next release:",
223
+ "descriptions": [
224
+ {
225
+ "description": "20 September 2024"
226
+ }
227
+ ]
228
+ },
229
+ {
230
+ "term": "Contact:",
231
+ "descriptions": [
232
+ {
233
+ "description": "Retail sales team",
234
+ "url": "#0"
235
+ }
236
+ ]
237
+ }
238
+ ]
239
+ }
240
+ })
241
+ }}
242
+ </main>
243
+ {% endblock %}
@@ -0,0 +1,200 @@
1
+ ---
2
+ title: 'Example: Table of contents on full page'
3
+ layout: ~
4
+ ---
5
+
6
+ {% from "components/hero/_macro.njk" import onsHero %}
7
+ {% from "components/breadcrumbs/_macro.njk" import onsBreadcrumbs %}
8
+ {% extends "layout/_template.njk" %}
9
+ {%
10
+ set pageConfig = {
11
+ "header": {
12
+ "variants": 'basic',
13
+ "menuLinks": {
14
+ "id": "menu-links",
15
+ "keyLinks": [
16
+ {
17
+ 'heading': 'Taking part in a survey?',
18
+ 'description': 'It’s never been more important.'
19
+ },
20
+ {
21
+ 'heading': 'Release calendar',
22
+ 'description': 'View our latest and upcoming releases.'
23
+ },
24
+ {
25
+ 'heading': 'Explore local statistics',
26
+ 'url': '#0',
27
+ 'description': 'Explore statistics across the UK.'
28
+ }
29
+ ],
30
+ "columns": [
31
+ {
32
+ "groups": [
33
+ {
34
+ "heading": "People, population and community",
35
+ "groupItems": [
36
+ {
37
+ "text": "Armed forces community"
38
+ },
39
+ {
40
+ "text": "Births, deaths and marriages"
41
+ },
42
+ {
43
+ "text": "Crime and justice"
44
+ },
45
+ {
46
+ "text": "Cultural identity"
47
+ },
48
+ {
49
+ "text": "Education and childcare"
50
+ },
51
+ {
52
+ "text": "Elections"
53
+ },
54
+ {
55
+ "text": "Health and social care"
56
+ },
57
+ {
58
+ "text": "Household characteristics"
59
+ },
60
+ {
61
+ "text": "Housing"
62
+ },
63
+ {
64
+ "text": "Leisure and tourism"
65
+ },
66
+ {
67
+ "text": "Personal and household finances"
68
+ },
69
+ {
70
+ "text": "Population and migration"
71
+ },
72
+ {
73
+ "text": "Well-being"
74
+ }
75
+ ]
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ "groups": [
81
+ {
82
+ "heading": "Business, industry and trade",
83
+ "groupItems": [
84
+ {
85
+ "text": "Business"
86
+ },
87
+ {
88
+ "text": "Changes to business"
89
+ },
90
+ {
91
+ "text": "Construction industry"
92
+ },
93
+ {
94
+ "text": "International trade"
95
+ },
96
+ {
97
+ "text": "IT and internet industry"
98
+ },
99
+ {
100
+ "text": "Manufacturing and production industry"
101
+ },
102
+ {
103
+ "text": "Retail industry",
104
+ "url": "#0"
105
+ },
106
+ {
107
+ "text": "Tourism industry"
108
+ }
109
+ ]
110
+ },
111
+ {
112
+ "heading": "Employment and labour market",
113
+ "url": "#0",
114
+ "groupItems":
115
+ [
116
+ {
117
+ "text": "People in work"
118
+ },
119
+ {
120
+ "text": "People not in work"
121
+ }
122
+ ]
123
+
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "groups": [
129
+ {
130
+ "heading": "Economy",
131
+ "groupItems": [
132
+ {
133
+ "text": "Economic output and productivity"
134
+ },
135
+ {
136
+ "text": "Government, public sector and taxes"
137
+ },
138
+ {
139
+ "text": "Gross Value Added (GVA)"
140
+ },
141
+ {
142
+ "text": "Investments, pensions and trusts"
143
+ },
144
+ {
145
+ "text": "Regional accounts"
146
+ },
147
+ {
148
+ "text": "Environmental accounts"
149
+ },
150
+ {
151
+ "text": "Gross Domestic Product (GDP)"
152
+ },
153
+ {
154
+ "text": "Inflation and price indices"
155
+ },
156
+ {
157
+ "text": "National accounts"
158
+ }
159
+ ]
160
+ }
161
+ ]
162
+ }
163
+ ]
164
+ }
165
+ }
166
+ }
167
+ %}
168
+ {% block pageContent %}
169
+ {{
170
+ onsBreadcrumbs({
171
+ "ariaLabel": 'Breadcrumbs',
172
+ "variant": "navy-blue",
173
+ "itemsList": [
174
+ {
175
+ "url": '/',
176
+ "text": 'Home'
177
+ },
178
+ {
179
+ "url": '/',
180
+ "text": 'Business, industry and trade'
181
+ },
182
+ {
183
+ "url": '/',
184
+ "text": 'Retail industry'
185
+ }
186
+ ]
187
+ })
188
+ }}
189
+ <main id="main-content">
190
+ {{
191
+ onsHero({
192
+ "title": 'Welcome to the ONS Beta',
193
+ "text": 'Thank you for participating in our beta test. This limited preview of the ONS website focuses on our
194
+ new design and navigation for the retail insutry section. Please be aware that greyed-out links indicate sections still under development.
195
+ The active links will take you through the journey to test the new design features.',
196
+ "variants": 'navy-blue'
197
+ })
198
+ }}
199
+ </main>
200
+ {% endblock %}