@ons/design-system 65.2.2 → 65.2.4
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/card/example-card-set-with-lists.njk +6 -6
- package/components/checkboxes/_checkbox.scss +0 -2
- package/components/download-resources/download-resources.spec.js +37 -36
- package/components/navigation/navigation.js +0 -2
- package/components/tabs/_macro.njk +2 -2
- package/components/tabs/_macro.spec.js +4 -20
- package/components/tabs/example-tabs.njk +1 -0
- package/components/tabs/tabs.spec.js +52 -44
- package/css/main.css +1 -243
- package/layout/_template.njk +48 -43
- package/package.json +13 -15
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +1 -1
package/layout/_template.njk
CHANGED
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
{% if pageConfig.cdn or release_version or designSystemVersion %}
|
|
15
15
|
{# Production #}
|
|
16
16
|
{% set cdn_url = (pageConfig.cdn.url if pageConfig.cdn and pageConfig.cdn.url) or "https://cdn.ons.gov.uk/sdc/design-system" %}
|
|
17
|
-
{% set slash = "" if cdn_url | last == "/" else
|
|
18
|
-
|
|
17
|
+
{% set slash = "" if cdn_url | last == "/" else
|
|
18
|
+
"/" %}
|
|
19
|
+
{% set assetsURL = cdn_url + slash + ((pageConfig.cdn.version if pageConfig.cdn and pageConfig.cdn.version)or release_version or designSystemVersion) %}
|
|
19
20
|
{% elif pageConfig.assetsURL %}
|
|
20
21
|
{# Runner Dev #}
|
|
21
22
|
{% set assetsURL = pageConfig.assetsURL %}
|
|
@@ -43,9 +44,12 @@
|
|
|
43
44
|
|
|
44
45
|
{# Page columns #}
|
|
45
46
|
{% set pageColNumber = pageConfig.pageColNumber | default("12") %}
|
|
46
|
-
{% set pageColClasses = pageConfig.pageColClasses if pageConfig.pageColClasses else
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
{% set pageColClasses = pageConfig.pageColClasses if pageConfig.pageColClasses else
|
|
48
|
+
'' %}
|
|
49
|
+
{% set mainClasses = pageConfig.mainColClasses if pageConfig.mainColClasses else
|
|
50
|
+
'' %}
|
|
51
|
+
{% set themeColor = pageConfig.themeColor if pageConfig.themeColor else
|
|
52
|
+
"#206095" %}
|
|
49
53
|
<!doctype html>
|
|
50
54
|
<html lang="{{ currentLanguageISOCode }}">
|
|
51
55
|
<head>
|
|
@@ -55,7 +59,7 @@
|
|
|
55
59
|
<title>{{ page_title }}</title>
|
|
56
60
|
<link rel="stylesheet" href="{{ assetsURL }}/css/main.css">
|
|
57
61
|
<link rel="stylesheet" media="print" href="{{ assetsURL }}/css/print.css">
|
|
58
|
-
<meta name="theme-color" content="
|
|
62
|
+
<meta name="theme-color" content="{{ themeColor }}"/>
|
|
59
63
|
{% block meta %}
|
|
60
64
|
{% if pageConfig.meta %}
|
|
61
65
|
{% if pageConfig.meta.description or pageConfig.description %}
|
|
@@ -87,12 +91,13 @@
|
|
|
87
91
|
<meta property="og:locale" content="{{ currentLanguageISOCode }}">
|
|
88
92
|
|
|
89
93
|
{% if otherLanguageISOCode %}
|
|
90
|
-
<meta property="og:locale:alternate" content="{{ otherLanguageISOCode }}">
|
|
94
|
+
<meta property="og:locale:alternate" content="{{ otherLanguageISOCode }}">
|
|
91
95
|
{% endif %}
|
|
92
96
|
|
|
93
97
|
{% if pageConfig.social %}
|
|
94
98
|
|
|
95
|
-
{% set twitterImagePath = pageConfig.social.twitterImage if pageConfig.social.twitterImage else
|
|
99
|
+
{% set twitterImagePath = pageConfig.social.twitterImage if pageConfig.social.twitterImage else
|
|
100
|
+
assetsURL + '/favicons/twitter.png' %}
|
|
96
101
|
<!-- Twitter -->
|
|
97
102
|
<meta name="twitter:card" content="summary">
|
|
98
103
|
<meta name="twitter:site" content="{{ pageConfig.social.twitterSite }}">
|
|
@@ -132,37 +137,37 @@
|
|
|
132
137
|
{% block preHeader %}{% endblock %}
|
|
133
138
|
{% block skipLink %}
|
|
134
139
|
{{
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
+
onsSkipToContent({
|
|
141
|
+
"url": "#main-content",
|
|
142
|
+
"text": "Skip to main content"
|
|
143
|
+
})
|
|
144
|
+
}}
|
|
140
145
|
{% endblock %}
|
|
141
146
|
{% block header %}
|
|
142
147
|
{{
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
148
|
+
onsHeader({
|
|
149
|
+
"wide": pageConfig.wide,
|
|
150
|
+
"fullWidth": pageConfig.fullWidth,
|
|
151
|
+
"language": pageConfig.header.language,
|
|
152
|
+
"button": pageConfig.header.signoutButton,
|
|
153
|
+
"toggleNavigationButton": pageConfig.header.toggleNavigationButton,
|
|
154
|
+
"navigation": pageConfig.header.navigation,
|
|
155
|
+
"siteSearchAutosuggest": pageConfig.header.siteSearchAutosuggest,
|
|
156
|
+
"browserBanner": pageConfig.header.browserBanner,
|
|
157
|
+
"phase": pageConfig.header.phase,
|
|
158
|
+
"assetsURL": assetsURL,
|
|
159
|
+
"serviceLinks": pageConfig.header.serviceLinks,
|
|
160
|
+
"variants": pageConfig.header.variants,
|
|
161
|
+
"classes": pageConfig.header.classes,
|
|
162
|
+
"mastheadLogo": pageConfig.header.mastheadLogo,
|
|
163
|
+
"mastheadLogoUrl": pageConfig.header.mastheadLogoUrl,
|
|
164
|
+
"titleUrl": pageConfig.header.titleUrl,
|
|
165
|
+
"title": pageConfig.header.title | default(pageConfig.title),
|
|
166
|
+
"description": pageConfig.header.description,
|
|
167
|
+
"titleAsH1": pageConfig.header.titleAsH1,
|
|
168
|
+
"titleLogo": pageConfig.header.titleLogo
|
|
169
|
+
})
|
|
170
|
+
}}
|
|
166
171
|
{% endblock %}
|
|
167
172
|
{% block pageContent %}
|
|
168
173
|
<div class="ons-page__container ons-container{{ containerClasses }}">
|
|
@@ -170,12 +175,12 @@
|
|
|
170
175
|
{% if pageConfig.breadcrumbs %}
|
|
171
176
|
{% from "components/breadcrumbs/_macro.njk" import onsBreadcrumbs %}
|
|
172
177
|
{{
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
178
|
+
onsBreadcrumbs({
|
|
179
|
+
"id": pageConfig.breadcrumbs.id,
|
|
180
|
+
"ariaLabel": pageConfig.breadcrumbs.ariaLabel,
|
|
181
|
+
"itemsList": pageConfig.breadcrumbs.itemsList
|
|
182
|
+
})
|
|
183
|
+
}}
|
|
179
184
|
{% endif %}
|
|
180
185
|
{% endblock %}
|
|
181
186
|
<div class="ons-grid">
|
|
@@ -243,4 +248,4 @@
|
|
|
243
248
|
|
|
244
249
|
{% block scripts %}{% endblock %}
|
|
245
250
|
</body>
|
|
246
|
-
</html>
|
|
251
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ons/design-system",
|
|
3
3
|
"description": "ONS Design System built CSS, JS, and Nunjucks templates",
|
|
4
|
-
"version": "65.2.
|
|
4
|
+
"version": "65.2.4",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": {
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
"dialog-polyfill": "^0.5.6",
|
|
81
81
|
"eslint": "^8.45.0",
|
|
82
82
|
"eslint-cli": "^1.1.1",
|
|
83
|
-
"eslint-config-prettier": "^
|
|
83
|
+
"eslint-config-prettier": "^9.0.0",
|
|
84
84
|
"eslint-plugin-prettier": "^5.0.0",
|
|
85
85
|
"express": "^4.17.1",
|
|
86
86
|
"front-matter": "^4.0.2",
|
|
87
|
-
"fs-extra": "^
|
|
87
|
+
"fs-extra": "^11.1.1",
|
|
88
88
|
"fuse.js": "^3.6.1",
|
|
89
89
|
"glob": "^7.1.3",
|
|
90
90
|
"gulp": "^4.0.2",
|
|
@@ -95,13 +95,14 @@
|
|
|
95
95
|
"gulp-postcss": "^9.0.0",
|
|
96
96
|
"gulp-sourcemaps": "^3.0.0",
|
|
97
97
|
"gulp-terser": "^2.0.1",
|
|
98
|
-
"http-server": "^
|
|
98
|
+
"http-server": "^14.1.1",
|
|
99
99
|
"husky": "^8.0.3",
|
|
100
|
-
"jest": "^
|
|
101
|
-
"jest-axe": "^
|
|
102
|
-
"jest-
|
|
100
|
+
"jest": "^29.6.1",
|
|
101
|
+
"jest-axe": "^8.0.0",
|
|
102
|
+
"jest-environment-jsdom": "^29.6.1",
|
|
103
|
+
"jest-puppeteer": "^9.0.0",
|
|
103
104
|
"js-beautify": "^1.11.0",
|
|
104
|
-
"lighthouse": "^
|
|
105
|
+
"lighthouse": "^11.0.0",
|
|
105
106
|
"lint-staged": "^8.1.0",
|
|
106
107
|
"lodash": "^4.17.21",
|
|
107
108
|
"mdn-polyfills": "^5.14.0",
|
|
@@ -110,14 +111,13 @@
|
|
|
110
111
|
"nunjucks": "^3.2.3",
|
|
111
112
|
"pinst": "^3.0.0",
|
|
112
113
|
"postcss": "^8.3.5",
|
|
113
|
-
"postcss-url": "^
|
|
114
|
-
"prepend-file": "^
|
|
114
|
+
"postcss-url": "^10.1.3",
|
|
115
|
+
"prepend-file": "^2.0.1",
|
|
115
116
|
"prettier": "^3.0.0",
|
|
116
|
-
"puppeteer": "^
|
|
117
|
+
"puppeteer": "^21.0.2",
|
|
117
118
|
"remark-cli": "^11.0.0",
|
|
118
119
|
"remark-lint": "^9.1.2",
|
|
119
120
|
"remark-preset-lint-recommended": "^6.1.3",
|
|
120
|
-
"replace-in-file": "^6.1.0",
|
|
121
121
|
"stylelint": "^15.10.1",
|
|
122
122
|
"stylelint-config-recommended": "^13.0.0",
|
|
123
123
|
"stylelint-config-sass-guidelines": "^10.0.0",
|
|
@@ -126,12 +126,10 @@
|
|
|
126
126
|
"stylelint-scss": "^5.0.1",
|
|
127
127
|
"through2": "^4.0.2",
|
|
128
128
|
"tick-manager": "^1.0.3",
|
|
129
|
-
"url-search-params-polyfill": "^5.0.0",
|
|
130
129
|
"util": "^0.12.3",
|
|
131
|
-
"viewport-details": "^
|
|
130
|
+
"viewport-details": "^3.0.4",
|
|
132
131
|
"vinyl-buffer": "^1.0.1",
|
|
133
132
|
"vinyl-source-stream": "^2.0.0",
|
|
134
|
-
"watchify": "^3.0.0",
|
|
135
133
|
"whatwg-fetch": "^3.0.0"
|
|
136
134
|
},
|
|
137
135
|
"publishConfig": {
|