govuk_publishing_components 43.4.0 → 43.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/govuk_publishing_components/components/_radio.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/docs/inverse_header.yml +2 -30
- data/app/views/govuk_publishing_components/components/docs/radio.yml +15 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/accessible-autocomplete/CHANGELOG.md +398 -0
- data/node_modules/accessible-autocomplete/CODEOWNERS +2 -0
- data/node_modules/accessible-autocomplete/CONTRIBUTING.md +161 -0
- data/node_modules/accessible-autocomplete/LICENSE.txt +20 -0
- data/node_modules/accessible-autocomplete/Procfile +1 -0
- data/node_modules/accessible-autocomplete/README.md +490 -0
- data/node_modules/accessible-autocomplete/accessibility-criteria.md +43 -0
- data/node_modules/accessible-autocomplete/app.json +15 -0
- data/node_modules/accessible-autocomplete/babel.config.js +29 -0
- data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.css +3 -0
- data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.css.map +1 -0
- data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js +2 -0
- data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js.map +1 -0
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js +2 -0
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js.map +1 -0
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js +2 -0
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js.map +1 -0
- data/node_modules/accessible-autocomplete/examples/ajax-source.html +300 -0
- data/node_modules/accessible-autocomplete/examples/form-single.html +381 -0
- data/node_modules/accessible-autocomplete/examples/form.html +673 -0
- data/node_modules/accessible-autocomplete/examples/index.html +693 -0
- data/node_modules/accessible-autocomplete/examples/preact/index.html +346 -0
- data/node_modules/accessible-autocomplete/examples/react/index.html +347 -0
- data/node_modules/accessible-autocomplete/examples/suggestions.json +258 -0
- data/node_modules/accessible-autocomplete/package.json +93 -0
- data/node_modules/accessible-autocomplete/postcss.config.js +16 -0
- data/node_modules/accessible-autocomplete/preact.js +1 -0
- data/node_modules/accessible-autocomplete/react.js +1 -0
- data/node_modules/accessible-autocomplete/scripts/check-staged.mjs +16 -0
- data/node_modules/accessible-autocomplete/src/autocomplete.css +167 -0
- data/node_modules/accessible-autocomplete/src/autocomplete.js +610 -0
- data/node_modules/accessible-autocomplete/src/dropdown-arrow-down.js +11 -0
- data/node_modules/accessible-autocomplete/src/status.js +125 -0
- data/node_modules/accessible-autocomplete/src/wrapper.js +60 -0
- data/node_modules/accessible-autocomplete/test/functional/dropdown-arrow-down.js +46 -0
- data/node_modules/accessible-autocomplete/test/functional/index.js +809 -0
- data/node_modules/accessible-autocomplete/test/functional/wrapper.js +339 -0
- data/node_modules/accessible-autocomplete/test/integration/index.js +309 -0
- data/node_modules/accessible-autocomplete/test/karma.config.js +46 -0
- data/node_modules/accessible-autocomplete/test/wdio.config.js +123 -0
- data/node_modules/accessible-autocomplete/webpack.config.mjs +244 -0
- metadata +57 -2
@@ -0,0 +1,123 @@
|
|
1
|
+
require('dotenv').config()
|
2
|
+
require('@babel/register')({
|
3
|
+
rootMode: 'upward'
|
4
|
+
})
|
5
|
+
|
6
|
+
const { join } = require('path')
|
7
|
+
const { cwd } = require('process')
|
8
|
+
const puppeteer = require('puppeteer')
|
9
|
+
|
10
|
+
const {
|
11
|
+
PORT = 4567,
|
12
|
+
SAUCE_ACCESS_KEY,
|
13
|
+
SAUCE_BUILD_NUMBER,
|
14
|
+
SAUCE_ENABLED,
|
15
|
+
SAUCE_USERNAME
|
16
|
+
} = process.env
|
17
|
+
|
18
|
+
/**
|
19
|
+
* Browsers for local tests
|
20
|
+
*
|
21
|
+
* @type {RemoteCapabilities}
|
22
|
+
*/
|
23
|
+
const capabilitiesLocal = [
|
24
|
+
{
|
25
|
+
browserName: 'chrome',
|
26
|
+
'goog:chromeOptions': {
|
27
|
+
args: ['--headless=new'],
|
28
|
+
binary: puppeteer.executablePath()
|
29
|
+
}
|
30
|
+
}
|
31
|
+
]
|
32
|
+
|
33
|
+
/**
|
34
|
+
* Browsers for Sauce Labs tests
|
35
|
+
*
|
36
|
+
* @type {RemoteCapabilities}
|
37
|
+
*/
|
38
|
+
const capabilitiesSauce = [
|
39
|
+
{
|
40
|
+
browserName: 'chrome',
|
41
|
+
browserVersion: 'latest',
|
42
|
+
platformName: 'Windows 10',
|
43
|
+
'sauce:options': {
|
44
|
+
build: SAUCE_BUILD_NUMBER
|
45
|
+
}
|
46
|
+
},
|
47
|
+
{
|
48
|
+
browserName: 'firefox',
|
49
|
+
browserVersion: '55',
|
50
|
+
platformName: 'Windows 10',
|
51
|
+
'sauce:options': {
|
52
|
+
build: SAUCE_BUILD_NUMBER
|
53
|
+
}
|
54
|
+
},
|
55
|
+
{
|
56
|
+
browserName: 'internet explorer',
|
57
|
+
browserVersion: 'latest',
|
58
|
+
platformName: 'Windows 10',
|
59
|
+
'sauce:options': {
|
60
|
+
build: SAUCE_BUILD_NUMBER
|
61
|
+
}
|
62
|
+
}
|
63
|
+
]
|
64
|
+
|
65
|
+
/**
|
66
|
+
* WebdriverIO config
|
67
|
+
*
|
68
|
+
* @type {Testrunner}
|
69
|
+
*/
|
70
|
+
exports.config = {
|
71
|
+
user: SAUCE_USERNAME,
|
72
|
+
key: SAUCE_ACCESS_KEY,
|
73
|
+
|
74
|
+
// Use DevTools prototype for Puppeteer
|
75
|
+
automationProtocol: SAUCE_ENABLED === 'true'
|
76
|
+
? 'webdriver'
|
77
|
+
: 'devtools',
|
78
|
+
|
79
|
+
baseUrl: `http://localhost:${PORT}`,
|
80
|
+
|
81
|
+
capabilities: SAUCE_ENABLED === 'true'
|
82
|
+
? capabilitiesSauce
|
83
|
+
: capabilitiesLocal,
|
84
|
+
|
85
|
+
framework: 'mocha',
|
86
|
+
outputDir: join(cwd(), 'logs'),
|
87
|
+
reporters: ['spec'],
|
88
|
+
|
89
|
+
services: [
|
90
|
+
/**
|
91
|
+
* Web server options
|
92
|
+
*
|
93
|
+
* @type {[string, StaticServerOptions]}
|
94
|
+
*/
|
95
|
+
['static-server', {
|
96
|
+
folders: [
|
97
|
+
{ mount: '/', path: join(cwd(), 'examples') },
|
98
|
+
{ mount: '/dist/', path: join(cwd(), 'dist') }
|
99
|
+
],
|
100
|
+
port: PORT
|
101
|
+
}],
|
102
|
+
|
103
|
+
/**
|
104
|
+
* Browser testing options
|
105
|
+
*
|
106
|
+
* @type {[string, SauceServiceConfig]}
|
107
|
+
*/
|
108
|
+
['sauce', {
|
109
|
+
// Optionally connect to Sauce Labs
|
110
|
+
sauceConnect: SAUCE_ENABLED === 'true'
|
111
|
+
}]
|
112
|
+
],
|
113
|
+
|
114
|
+
specs: [join(cwd(), 'test/integration/**/*.js')],
|
115
|
+
waitforTimeout: 30 * 10000
|
116
|
+
}
|
117
|
+
|
118
|
+
/**
|
119
|
+
* @typedef {import('@wdio/types').Options.Testrunner} Testrunner
|
120
|
+
* @typedef {import('@wdio/types').Capabilities.RemoteCapabilities} RemoteCapabilities
|
121
|
+
* @typedef {import('@wdio/static-server-service').StaticServerOptions} StaticServerOptions
|
122
|
+
* @typedef {import('@wdio/sauce-service').SauceServiceConfig} SauceServiceConfig
|
123
|
+
*/
|
@@ -0,0 +1,244 @@
|
|
1
|
+
import { join } from 'path'
|
2
|
+
import { cwd } from 'process'
|
3
|
+
|
4
|
+
import MiniCssExtractPlugin from 'mini-css-extract-plugin'
|
5
|
+
import TerserPlugin from 'terser-webpack-plugin'
|
6
|
+
import webpack from 'webpack'
|
7
|
+
|
8
|
+
const {
|
9
|
+
NODE_ENV = 'development',
|
10
|
+
PORT = 8080
|
11
|
+
} = process.env
|
12
|
+
|
13
|
+
/**
|
14
|
+
* Base webpack build mode
|
15
|
+
*/
|
16
|
+
const mode = ['development', 'test'].includes(NODE_ENV)
|
17
|
+
? 'development'
|
18
|
+
: 'production'
|
19
|
+
|
20
|
+
/**
|
21
|
+
* Base webpack config
|
22
|
+
*
|
23
|
+
* @satisfies {WebpackConfiguration}
|
24
|
+
*/
|
25
|
+
const config = {
|
26
|
+
bail: mode === 'production',
|
27
|
+
context: join(cwd(), 'src'),
|
28
|
+
|
29
|
+
devtool: mode === 'development'
|
30
|
+
? 'inline-source-map'
|
31
|
+
: 'source-map',
|
32
|
+
|
33
|
+
externalsType: 'umd',
|
34
|
+
mode,
|
35
|
+
|
36
|
+
module: {
|
37
|
+
rules: [
|
38
|
+
{
|
39
|
+
test: /\.css$/,
|
40
|
+
use: [
|
41
|
+
MiniCssExtractPlugin.loader,
|
42
|
+
'css-loader',
|
43
|
+
'postcss-loader'
|
44
|
+
]
|
45
|
+
},
|
46
|
+
{
|
47
|
+
test: /\.js$/,
|
48
|
+
include: join(cwd(), 'src'),
|
49
|
+
enforce: 'pre',
|
50
|
+
loader: 'source-map-loader'
|
51
|
+
},
|
52
|
+
{
|
53
|
+
test: /\.js$/,
|
54
|
+
exclude: /node_modules/,
|
55
|
+
use: {
|
56
|
+
loader: 'babel-loader',
|
57
|
+
options: {
|
58
|
+
rootMode: 'upward'
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
]
|
63
|
+
},
|
64
|
+
|
65
|
+
node: {
|
66
|
+
global: true,
|
67
|
+
__filename: false,
|
68
|
+
__dirname: false
|
69
|
+
},
|
70
|
+
|
71
|
+
optimization: {
|
72
|
+
emitOnErrors: mode === 'production',
|
73
|
+
minimize: mode === 'production',
|
74
|
+
minimizer: [new TerserPlugin({
|
75
|
+
extractComments: true,
|
76
|
+
terserOptions: {
|
77
|
+
format: { comments: false },
|
78
|
+
|
79
|
+
// Include sources content from dependency source maps
|
80
|
+
sourceMap: {
|
81
|
+
includeSources: true
|
82
|
+
},
|
83
|
+
|
84
|
+
// Compatibility workarounds
|
85
|
+
safari10: true
|
86
|
+
}
|
87
|
+
})]
|
88
|
+
},
|
89
|
+
|
90
|
+
output: {
|
91
|
+
path: join(cwd(), 'dist'),
|
92
|
+
publicPath: '/dist'
|
93
|
+
},
|
94
|
+
|
95
|
+
stats: {
|
96
|
+
colors: true
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
/**
|
101
|
+
* Bundle standalone 'accessible-autocomplete'
|
102
|
+
*
|
103
|
+
* @satisfies {WebpackConfiguration}
|
104
|
+
*/
|
105
|
+
const bundleStandalone = {
|
106
|
+
...config,
|
107
|
+
|
108
|
+
devServer: {
|
109
|
+
allowedHosts: 'all',
|
110
|
+
host: '0.0.0.0',
|
111
|
+
open: '/dist',
|
112
|
+
port: PORT,
|
113
|
+
static: [
|
114
|
+
{
|
115
|
+
directory: join(cwd(), 'examples'),
|
116
|
+
publicPath: '/dist',
|
117
|
+
watch: true
|
118
|
+
}
|
119
|
+
]
|
120
|
+
},
|
121
|
+
|
122
|
+
entry: {
|
123
|
+
'accessible-autocomplete': {
|
124
|
+
import: [
|
125
|
+
join(cwd(), 'src/autocomplete.css'),
|
126
|
+
join(cwd(), 'src/wrapper.js')
|
127
|
+
],
|
128
|
+
filename: '[name].min.js',
|
129
|
+
library: {
|
130
|
+
export: 'default',
|
131
|
+
name: 'accessibleAutocomplete',
|
132
|
+
type: 'umd'
|
133
|
+
}
|
134
|
+
}
|
135
|
+
},
|
136
|
+
|
137
|
+
plugins: [
|
138
|
+
new webpack.DefinePlugin({
|
139
|
+
'process.env.COMPONENT_LIBRARY': '"PREACT"',
|
140
|
+
'process.env.NODE_ENV': `"${mode}"`
|
141
|
+
}),
|
142
|
+
new MiniCssExtractPlugin({
|
143
|
+
filename: '[name].min.css'
|
144
|
+
})
|
145
|
+
]
|
146
|
+
}
|
147
|
+
|
148
|
+
/**
|
149
|
+
* Bundle for Preact 'accessible-autocomplete/preact.js'
|
150
|
+
*
|
151
|
+
* @satisfies {WebpackConfiguration}
|
152
|
+
*/
|
153
|
+
const bundlePreact = {
|
154
|
+
...config,
|
155
|
+
|
156
|
+
entry: {
|
157
|
+
'accessible-autocomplete.preact': {
|
158
|
+
import: join(cwd(), 'src/autocomplete.js'),
|
159
|
+
filename: 'lib/[name].min.js',
|
160
|
+
library: {
|
161
|
+
name: 'Autocomplete',
|
162
|
+
type: 'umd',
|
163
|
+
umdNamedDefine: true
|
164
|
+
}
|
165
|
+
}
|
166
|
+
},
|
167
|
+
|
168
|
+
externals: {
|
169
|
+
preact: 'preact'
|
170
|
+
},
|
171
|
+
|
172
|
+
output: {
|
173
|
+
...config.output,
|
174
|
+
|
175
|
+
// Support `window.preact` when not bundled
|
176
|
+
// e.g. with all dependencies included via unpkg.com
|
177
|
+
globalObject: 'this'
|
178
|
+
},
|
179
|
+
|
180
|
+
plugins: [
|
181
|
+
new webpack.DefinePlugin({
|
182
|
+
'process.env.COMPONENT_LIBRARY': '"PREACT"',
|
183
|
+
'process.env.NODE_ENV': `"${mode}"`
|
184
|
+
})
|
185
|
+
]
|
186
|
+
}
|
187
|
+
|
188
|
+
/**
|
189
|
+
* Bundle for React 'accessible-autocomplete/react.js'
|
190
|
+
*
|
191
|
+
* @satisfies {WebpackConfiguration}
|
192
|
+
*/
|
193
|
+
const bundleReact = {
|
194
|
+
...config,
|
195
|
+
|
196
|
+
entry: {
|
197
|
+
'accessible-autocomplete.react': {
|
198
|
+
import: join(cwd(), 'src/autocomplete.js'),
|
199
|
+
filename: 'lib/[name].min.js',
|
200
|
+
library: {
|
201
|
+
name: 'Autocomplete',
|
202
|
+
type: 'umd',
|
203
|
+
umdNamedDefine: true
|
204
|
+
}
|
205
|
+
}
|
206
|
+
},
|
207
|
+
|
208
|
+
externals: {
|
209
|
+
preact: {
|
210
|
+
amd: 'react',
|
211
|
+
commonjs: 'react',
|
212
|
+
commonjs2: 'react',
|
213
|
+
root: 'React'
|
214
|
+
}
|
215
|
+
},
|
216
|
+
|
217
|
+
output: {
|
218
|
+
...config.output,
|
219
|
+
|
220
|
+
// Support extending `window.React` when not bundled
|
221
|
+
// e.g. with all dependencies included via unpkg.com
|
222
|
+
globalObject: 'this'
|
223
|
+
},
|
224
|
+
|
225
|
+
plugins: [
|
226
|
+
new webpack.DefinePlugin({
|
227
|
+
'process.env.COMPONENT_LIBRARY': '"REACT"',
|
228
|
+
'process.env.NODE_ENV': `"${mode}"`
|
229
|
+
})
|
230
|
+
]
|
231
|
+
}
|
232
|
+
|
233
|
+
/**
|
234
|
+
* Multiple webpack config export
|
235
|
+
*/
|
236
|
+
export default [
|
237
|
+
bundleStandalone,
|
238
|
+
bundlePreact,
|
239
|
+
bundleReact
|
240
|
+
]
|
241
|
+
|
242
|
+
/**
|
243
|
+
* @typedef {import('webpack-dev-server').WebpackConfiguration} WebpackConfiguration
|
244
|
+
*/
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 43.
|
4
|
+
version: 43.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: ostruct
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: plek
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -948,6 +962,47 @@ files:
|
|
948
962
|
- lib/govuk_publishing_components/presenters/subscription_links_helper.rb
|
949
963
|
- lib/govuk_publishing_components/presenters/translation_nav_helper.rb
|
950
964
|
- lib/govuk_publishing_components/version.rb
|
965
|
+
- node_modules/accessible-autocomplete/CHANGELOG.md
|
966
|
+
- node_modules/accessible-autocomplete/CODEOWNERS
|
967
|
+
- node_modules/accessible-autocomplete/CONTRIBUTING.md
|
968
|
+
- node_modules/accessible-autocomplete/LICENSE.txt
|
969
|
+
- node_modules/accessible-autocomplete/Procfile
|
970
|
+
- node_modules/accessible-autocomplete/README.md
|
971
|
+
- node_modules/accessible-autocomplete/accessibility-criteria.md
|
972
|
+
- node_modules/accessible-autocomplete/app.json
|
973
|
+
- node_modules/accessible-autocomplete/babel.config.js
|
974
|
+
- node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.css
|
975
|
+
- node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.css.map
|
976
|
+
- node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js
|
977
|
+
- node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js.map
|
978
|
+
- node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js
|
979
|
+
- node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js.map
|
980
|
+
- node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js
|
981
|
+
- node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js.map
|
982
|
+
- node_modules/accessible-autocomplete/examples/ajax-source.html
|
983
|
+
- node_modules/accessible-autocomplete/examples/form-single.html
|
984
|
+
- node_modules/accessible-autocomplete/examples/form.html
|
985
|
+
- node_modules/accessible-autocomplete/examples/index.html
|
986
|
+
- node_modules/accessible-autocomplete/examples/preact/index.html
|
987
|
+
- node_modules/accessible-autocomplete/examples/react/index.html
|
988
|
+
- node_modules/accessible-autocomplete/examples/suggestions.json
|
989
|
+
- node_modules/accessible-autocomplete/package.json
|
990
|
+
- node_modules/accessible-autocomplete/postcss.config.js
|
991
|
+
- node_modules/accessible-autocomplete/preact.js
|
992
|
+
- node_modules/accessible-autocomplete/react.js
|
993
|
+
- node_modules/accessible-autocomplete/scripts/check-staged.mjs
|
994
|
+
- node_modules/accessible-autocomplete/src/autocomplete.css
|
995
|
+
- node_modules/accessible-autocomplete/src/autocomplete.js
|
996
|
+
- node_modules/accessible-autocomplete/src/dropdown-arrow-down.js
|
997
|
+
- node_modules/accessible-autocomplete/src/status.js
|
998
|
+
- node_modules/accessible-autocomplete/src/wrapper.js
|
999
|
+
- node_modules/accessible-autocomplete/test/functional/dropdown-arrow-down.js
|
1000
|
+
- node_modules/accessible-autocomplete/test/functional/index.js
|
1001
|
+
- node_modules/accessible-autocomplete/test/functional/wrapper.js
|
1002
|
+
- node_modules/accessible-autocomplete/test/integration/index.js
|
1003
|
+
- node_modules/accessible-autocomplete/test/karma.config.js
|
1004
|
+
- node_modules/accessible-autocomplete/test/wdio.config.js
|
1005
|
+
- node_modules/accessible-autocomplete/webpack.config.mjs
|
951
1006
|
- node_modules/axe-core/LICENSE
|
952
1007
|
- node_modules/axe-core/LICENSE-3RD-PARTY.txt
|
953
1008
|
- node_modules/axe-core/README.md
|