@ons/design-system 70.0.15 → 70.0.17

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/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": "70.0.15",
4
+ "version": "70.0.17",
5
5
  "main": "index.js",
6
6
  "license": "MIT",
7
7
  "author": {
@@ -15,6 +15,7 @@
15
15
  "test:no-build": "TEST_PORT=3020 TEST_WITH_PUPPETEER=1 jest '.*\\.spec\\.js'",
16
16
  "test:with-log": "yarn test --no-color 2>test.log",
17
17
  "test:start-server": "TEST_PORT=3020 gulp start-dev-server",
18
+ "test-lighthouse": "yarn build && node ./lighthouse/lighthouse-get-urls.js && lhci autorun --config=./lighthouse/lighthouserc.js",
18
19
  "build": "yarn && yarn tidy-clean && NODE_ENV=production gulp build",
19
20
  "build-serve": "yarn build && gulp start-dev-server",
20
21
  "npm-bundle": "NODE_ENV=production yarn tidy-clean && NODE_ENV=production gulp build-package && babel-node ci/generate-npm-package.js",
@@ -95,7 +96,7 @@
95
96
  "gulp-sourcemaps": "^3.0.0",
96
97
  "gulp-terser": "^2.0.1",
97
98
  "http-server": "^14.1.1",
98
- "husky": "^8.0.3",
99
+ "husky": "^9.1.6",
99
100
  "jest": "^29.6.1",
100
101
  "jest-axe": "^8.0.0",
101
102
  "jest-environment-jsdom": "^29.6.1",
@@ -1,157 +0,0 @@
1
- export {
2
- EXAMPLE_HEADER_BASIC,
3
- EXAMPLE_SERVICE_LINKS_CONFIG,
4
- EXAMPLE_HEADER_SERVICE_LINKS_MULTIPLE,
5
- EXAMPLE_HEADER_SERVICE_LINKS_SINGLE,
6
- EXAMPLE_HEADER_LANGUAGE_CONFIG,
7
- EXAMPLE_HEADER_NAVIGATION_WITH_SUBNAVIGATION_CONFIG,
8
- EXAMPLE_HEADER_NAVIGATION_WITH_SITESEARCHAUTOSUGGEST,
9
- };
10
-
11
- const EXAMPLE_HEADER_BASIC = {
12
- title: 'Header title',
13
- };
14
- const EXAMPLE_SERVICE_LINKS_CONFIG = {
15
- id: 'service-links',
16
- ariaLabel: 'Services menu',
17
- classes: 'custom-class',
18
- toggleServicesButton: {
19
- text: 'Menu',
20
- ariaLabel: 'Toggle services menu',
21
- },
22
- };
23
- const EXAMPLE_HEADER_SERVICE_LINKS_MULTIPLE = {
24
- ...EXAMPLE_HEADER_BASIC,
25
- serviceLinks: {
26
- ...EXAMPLE_SERVICE_LINKS_CONFIG,
27
- itemsList: [
28
- {
29
- title: 'Title 1',
30
- url: '#1',
31
- },
32
- {
33
- title: 'Title 2',
34
- url: '#2',
35
- },
36
- {
37
- title: 'Title 3',
38
- url: '#3',
39
- },
40
- ],
41
- },
42
- };
43
- const EXAMPLE_HEADER_SERVICE_LINKS_SINGLE = {
44
- ...EXAMPLE_HEADER_BASIC,
45
- serviceLinks: {
46
- ...EXAMPLE_SERVICE_LINKS_CONFIG,
47
- itemsList: [
48
- {
49
- title: 'Title',
50
- url: '#0',
51
- },
52
- ],
53
- },
54
- };
55
- const EXAMPLE_HEADER_LANGUAGE_CONFIG = {
56
- language: {
57
- languages: [
58
- {
59
- url: '#0',
60
- ISOCode: 'en',
61
- text: 'English',
62
- buttonAriaLabel: 'Language selector. Current language: English',
63
- chooseLanguage: 'Choose language',
64
- current: true,
65
- },
66
- {
67
- url: '#0',
68
- ISOCode: 'cy',
69
- text: 'Cymraeg',
70
- buttonAriaLabel: 'Dewisydd iaith. Iaith gyfredol: Cymraeg',
71
- chooseLanguage: 'Dewiswch iaith',
72
- current: false,
73
- },
74
- ],
75
- },
76
- };
77
- const EXAMPLE_HEADER_NAVIGATION_WITH_SUBNAVIGATION_CONFIG = {
78
- navigation: {
79
- id: 'main-nav',
80
- ariaLabel: 'Main menu',
81
- currentPath: '#1',
82
- currentPageTitle: 'Guidance',
83
- itemsList: [
84
- {
85
- title: 'Home',
86
- url: '#0',
87
- },
88
- {
89
- title: 'Guidance',
90
- url: '#1',
91
- },
92
- ],
93
- toggleNavigationButton: {
94
- text: 'Menu',
95
- ariaLabel: 'Toggle main menu',
96
- },
97
- subNavigation: {
98
- id: 'sub-nav',
99
- overviewURL: '#overview',
100
- overviewText: 'Overview',
101
- ariaLabel: 'Section menu',
102
- currentPath: '#1',
103
- itemsList: [
104
- {
105
- title: 'Sub nav item 1',
106
- url: '#0',
107
- classes: 'custom-class-sub-item-1',
108
- id: 'sub-item-1',
109
- },
110
- {
111
- title: 'Sub nav item 2',
112
- url: '#1',
113
- classes: 'custom-class-sub-item-2',
114
- id: 'sub-item-2',
115
- },
116
- ],
117
- },
118
- },
119
- };
120
- const EXAMPLE_HEADER_NAVIGATION_WITH_SITESEARCHAUTOSUGGEST = {
121
- navigation: {
122
- id: 'main-nav',
123
- ariaLabel: 'Main menu',
124
- currentPath: '#home',
125
- itemsList: [
126
- {
127
- title: 'Home',
128
- url: '#home',
129
- },
130
- {
131
- title: 'Guidance',
132
- url: '#0',
133
- },
134
- ],
135
- toggleNavigationButton: {
136
- text: 'Menu',
137
- ariaLabel: 'Toggle main menu',
138
- },
139
- },
140
- siteSearchAutosuggest: {
141
- label: 'label',
142
- instructions: 'Use up and down keys to navigate.',
143
- ariaYouHaveSelected: 'You have selected',
144
- ariaMinChars: 'Enter 3 or more characters for suggestions.',
145
- minChars: 3,
146
- ariaResultsLabel: 'Country suggestions',
147
- ariaOneResult: 'There is one suggestion available.',
148
- ariaNResults: 'There are {n} suggestions available.',
149
- ariaLimitedResults: 'Type more characters to improve your search',
150
- moreResults: 'Continue entering to improve suggestions',
151
- resultsTitle: 'Suggestions',
152
- resultsTitleId: 'country-of-birth-suggestions',
153
- noResults: 'No suggestions found.',
154
- typeMore: 'Continue entering to get suggestions',
155
- language: 'en-gb',
156
- },
157
- };