@ons/design-system 65.2.5 → 66.0.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.
package/js/analytics.js CHANGED
@@ -11,7 +11,7 @@ if (typeof window.ga !== 'undefined') {
11
11
  };
12
12
  }
13
13
 
14
- export const trackElement = el => {
14
+ export const trackElement = (el) => {
15
15
  return trackEvent('send', {
16
16
  hitType: 'event',
17
17
  eventCategory: el.getAttribute('data-ga-category') || '',
@@ -24,7 +24,7 @@ export default function initAnalytics() {
24
24
  let trackVisibleElements = [...document.querySelectorAll('[data-ga=visible]')];
25
25
 
26
26
  const interval = window.setInterval(() => {
27
- trackVisibleElements = trackVisibleElements.filter(element => {
27
+ trackVisibleElements = trackVisibleElements.filter((element) => {
28
28
  return element ? trackElement(element) && false : true;
29
29
  });
30
30
  if (trackVisibleElements.length === 0) {
@@ -45,16 +45,13 @@ export default function initAnalytics() {
45
45
  hitType: 'event',
46
46
  eventCategory: 'Print Intent',
47
47
  eventAction: 'Print Intent',
48
- eventLabel: window.location.pathname
49
- .split('/')
50
- .slice(-3)
51
- .join('/'),
48
+ eventLabel: window.location.pathname.split('/').slice(-3).join('/'),
52
49
  });
53
50
  };
54
51
 
55
52
  if (window.matchMedia) {
56
53
  const mediaQueryList = window.matchMedia('print');
57
- mediaQueryList.addListener(function(mql) {
54
+ mediaQueryList.addListener(function (mql) {
58
55
  if (!mql.matches) {
59
56
  afterPrint();
60
57
  }
@@ -127,21 +127,14 @@
127
127
  {% block body %}
128
128
  <div class="ons-page">
129
129
  <div class="ons-page__content">
130
- {% if form and form.attributes %}
131
- <form
132
- {% if form.classes %}class="{{ form.classes }}"{% endif %}
133
- method="{{ form.method | default('POST') }}"
134
- {% if form.attributes %}{% for attribute, value in (form.attributes.items() if form.attributes is mapping and form.attributes.items else form.attributes) %}{{ attribute }}{% if value %}="{{value}}" {% endif %}{% endfor %}{% endif %}
135
- >
136
- {% endif %}
137
130
  {% block preHeader %}{% endblock %}
138
131
  {% block skipLink %}
139
132
  {{
140
- onsSkipToContent({
141
- "url": "#main-content",
142
- "text": "Skip to main content"
143
- })
144
- }}
133
+ onsSkipToContent({
134
+ "url": "#main-content",
135
+ "text": "Skip to main content"
136
+ })
137
+ }}
145
138
  {% endblock %}
146
139
  {% block header %}
147
140
  {{
@@ -192,10 +185,6 @@
192
185
  </div>
193
186
  </div>
194
187
  {% endblock %}
195
-
196
- {% if form and form.attributes %}
197
- </form>
198
- {% endif %}
199
188
  </div>
200
189
  {% block preFooter %}{% endblock %}
201
190
  {% block footer %}
@@ -222,8 +211,8 @@
222
211
  {% endif %}
223
212
  {% endblock %}
224
213
  </div>
225
- {% block bodyEnd %}{% endblock %}
226
214
  {% endblock %}
215
+ {% block bodyEnd %}{% endblock %}
227
216
 
228
217
  <script{% if pageConfig.cspNonce %} nonce="{{ pageConfig.cspNonce }}"{% elif pageConfig.cspNonce is not defined and csp_nonce %} nonce="{{ csp_nonce() }}"{% endif %}>
229
218
  (function() {
@@ -248,4 +237,4 @@
248
237
 
249
238
  {% block scripts %}{% endblock %}
250
239
  </body>
251
- </html>
240
+ </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.5",
4
+ "version": "66.0.0",
5
5
  "main": "index.js",
6
6
  "license": "MIT",
7
7
  "author": {
@@ -86,7 +86,7 @@
86
86
  "front-matter": "^4.0.2",
87
87
  "fs-extra": "^11.1.1",
88
88
  "fuse.js": "^3.6.1",
89
- "glob": "^7.1.3",
89
+ "glob": "^10.2.3",
90
90
  "gulp": "^4.0.2",
91
91
  "gulp-babel": "^8.0.0",
92
92
  "gulp-cli": "^2.3.0",
@@ -101,12 +101,10 @@
101
101
  "jest-axe": "^8.0.0",
102
102
  "jest-environment-jsdom": "^29.6.1",
103
103
  "jest-puppeteer": "^9.0.0",
104
- "js-beautify": "^1.11.0",
105
104
  "lighthouse": "^11.0.0",
106
105
  "lint-staged": "^8.1.0",
107
106
  "lodash": "^4.17.21",
108
107
  "mdn-polyfills": "^5.14.0",
109
- "minimist": "^1.2.5",
110
108
  "normalize.css": "^8.0.1",
111
109
  "nunjucks": "^3.2.3",
112
110
  "pinst": "^3.0.0",
@@ -115,7 +113,7 @@
115
113
  "prepend-file": "^2.0.1",
116
114
  "prettier": "^3.0.0",
117
115
  "puppeteer": "^21.0.2",
118
- "remark-cli": "^11.0.0",
116
+ "remark-cli": "^12.0.0",
119
117
  "remark-lint": "^9.1.2",
120
118
  "remark-preset-lint-recommended": "^6.1.3",
121
119
  "stylelint": "^15.10.1",
@@ -134,8 +132,5 @@
134
132
  },
135
133
  "publishConfig": {
136
134
  "access": "public"
137
- },
138
- "resolutions": {
139
- "minimist": "^1.2.5"
140
135
  }
141
136
  }