govuk_publishing_components 43.4.0 → 43.5.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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/app/views/govuk_publishing_components/components/_radio.html.erb +2 -0
  3. data/app/views/govuk_publishing_components/components/docs/inverse_header.yml +2 -30
  4. data/app/views/govuk_publishing_components/components/docs/radio.yml +15 -0
  5. data/lib/govuk_publishing_components/version.rb +1 -1
  6. data/node_modules/accessible-autocomplete/CHANGELOG.md +398 -0
  7. data/node_modules/accessible-autocomplete/CODEOWNERS +2 -0
  8. data/node_modules/accessible-autocomplete/CONTRIBUTING.md +161 -0
  9. data/node_modules/accessible-autocomplete/LICENSE.txt +20 -0
  10. data/node_modules/accessible-autocomplete/Procfile +1 -0
  11. data/node_modules/accessible-autocomplete/README.md +490 -0
  12. data/node_modules/accessible-autocomplete/accessibility-criteria.md +43 -0
  13. data/node_modules/accessible-autocomplete/app.json +15 -0
  14. data/node_modules/accessible-autocomplete/babel.config.js +29 -0
  15. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.css +3 -0
  16. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.css.map +1 -0
  17. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js +2 -0
  18. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js.map +1 -0
  19. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js +2 -0
  20. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js.map +1 -0
  21. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js +2 -0
  22. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js.map +1 -0
  23. data/node_modules/accessible-autocomplete/examples/ajax-source.html +300 -0
  24. data/node_modules/accessible-autocomplete/examples/form-single.html +381 -0
  25. data/node_modules/accessible-autocomplete/examples/form.html +673 -0
  26. data/node_modules/accessible-autocomplete/examples/index.html +693 -0
  27. data/node_modules/accessible-autocomplete/examples/preact/index.html +346 -0
  28. data/node_modules/accessible-autocomplete/examples/react/index.html +347 -0
  29. data/node_modules/accessible-autocomplete/examples/suggestions.json +258 -0
  30. data/node_modules/accessible-autocomplete/package.json +93 -0
  31. data/node_modules/accessible-autocomplete/postcss.config.js +16 -0
  32. data/node_modules/accessible-autocomplete/preact.js +1 -0
  33. data/node_modules/accessible-autocomplete/react.js +1 -0
  34. data/node_modules/accessible-autocomplete/scripts/check-staged.mjs +16 -0
  35. data/node_modules/accessible-autocomplete/src/autocomplete.css +167 -0
  36. data/node_modules/accessible-autocomplete/src/autocomplete.js +610 -0
  37. data/node_modules/accessible-autocomplete/src/dropdown-arrow-down.js +11 -0
  38. data/node_modules/accessible-autocomplete/src/status.js +125 -0
  39. data/node_modules/accessible-autocomplete/src/wrapper.js +60 -0
  40. data/node_modules/accessible-autocomplete/test/functional/dropdown-arrow-down.js +46 -0
  41. data/node_modules/accessible-autocomplete/test/functional/index.js +809 -0
  42. data/node_modules/accessible-autocomplete/test/functional/wrapper.js +339 -0
  43. data/node_modules/accessible-autocomplete/test/integration/index.js +309 -0
  44. data/node_modules/accessible-autocomplete/test/karma.config.js +46 -0
  45. data/node_modules/accessible-autocomplete/test/wdio.config.js +123 -0
  46. data/node_modules/accessible-autocomplete/webpack.config.mjs +244 -0
  47. metadata +57 -2
@@ -0,0 +1,258 @@
1
+ [
2
+ "Afghanistan",
3
+ "Akrotiri",
4
+ "Albania",
5
+ "Algeria",
6
+ "American Samoa",
7
+ "Andorra",
8
+ "Angola",
9
+ "Anguilla",
10
+ "Antarctica",
11
+ "Antigua and Barbuda",
12
+ "Argentina",
13
+ "Armenia",
14
+ "Aruba",
15
+ "Ashmore and Cartier Islands",
16
+ "Australia",
17
+ "Austria",
18
+ "Azerbaijan",
19
+ "Bahamas, The",
20
+ "Bahrain",
21
+ "Bangladesh",
22
+ "Barbados",
23
+ "Bassas da India",
24
+ "Belarus",
25
+ "Belgium",
26
+ "Belize",
27
+ "Benin",
28
+ "Bermuda",
29
+ "Bhutan",
30
+ "Bolivia",
31
+ "Bosnia and Herzegovina",
32
+ "Botswana",
33
+ "Bouvet Island",
34
+ "Brazil",
35
+ "British Indian Ocean Territory",
36
+ "British Virgin Islands",
37
+ "Brunei",
38
+ "Bulgaria",
39
+ "Burkina Faso",
40
+ "Burma",
41
+ "Burundi",
42
+ "Cambodia",
43
+ "Cameroon",
44
+ "Canada",
45
+ "Cape Verde",
46
+ "Cayman Islands",
47
+ "Central African Republic",
48
+ "Chad",
49
+ "Chile",
50
+ "China",
51
+ "Christmas Island",
52
+ "Clipperton Island",
53
+ "Cocos (Keeling) Islands",
54
+ "Colombia",
55
+ "Comoros",
56
+ "Congo",
57
+ "Cook Islands",
58
+ "Coral Sea Islands",
59
+ "Costa Rica",
60
+ "Cote d\"Ivoire",
61
+ "Croatia",
62
+ "Cuba",
63
+ "Cyprus",
64
+ "Czech Republic",
65
+ "Denmark",
66
+ "Dhekelia",
67
+ "Djibouti",
68
+ "Dominica",
69
+ "Dominican Republic",
70
+ "Ecuador",
71
+ "Egypt",
72
+ "El Salvador",
73
+ "Equatorial Guinea",
74
+ "Eritrea",
75
+ "Estonia",
76
+ "Ethiopia",
77
+ "Europa Island",
78
+ "Falkland Islands",
79
+ "Faroe Islands",
80
+ "Fiji",
81
+ "Finland",
82
+ "France",
83
+ "French Guiana",
84
+ "French Polynesia",
85
+ "French Southern and Antarctic Lands",
86
+ "Gabon",
87
+ "Gambia,",
88
+ "Gaza Strip",
89
+ "Georgia",
90
+ "Germany",
91
+ "Ghana",
92
+ "Gibraltar",
93
+ "Glorioso Islands",
94
+ "Greece",
95
+ "Greenland",
96
+ "Grenada",
97
+ "Guadeloupe",
98
+ "Guam",
99
+ "Guatemala",
100
+ "Guernsey",
101
+ "Guinea",
102
+ "Guinea-Bissau",
103
+ "Guyana",
104
+ "Haiti",
105
+ "Heard Island and McDonald Islands",
106
+ "Holy See (Vatican City)",
107
+ "Honduras",
108
+ "Hong Kong",
109
+ "Hungary",
110
+ "Iceland",
111
+ "India",
112
+ "Indonesia",
113
+ "Iran",
114
+ "Iraq",
115
+ "Ireland",
116
+ "Isle of Man",
117
+ "Israel",
118
+ "Italy",
119
+ "Jamaica",
120
+ "Jan Mayen",
121
+ "Japan",
122
+ "Jersey",
123
+ "Jordan",
124
+ "Juan de Nova Island",
125
+ "Kazakhstan",
126
+ "Kenya",
127
+ "Kiribati",
128
+ "Korea, North",
129
+ "Korea, South",
130
+ "Kuwait",
131
+ "Kyrgyzstan",
132
+ "Laos",
133
+ "Latvia",
134
+ "Lebanon",
135
+ "Lesotho",
136
+ "Liberia",
137
+ "Libya",
138
+ "Liechtenstein",
139
+ "Lithuania",
140
+ "Luxembourg",
141
+ "Macau",
142
+ "Macedonia",
143
+ "Madagascar",
144
+ "Malawi",
145
+ "Malaysia",
146
+ "Maldives",
147
+ "Mali",
148
+ "Malta",
149
+ "Marshall Islands",
150
+ "Martinique",
151
+ "Mauritania",
152
+ "Mauritius",
153
+ "Mayotte",
154
+ "Mexico",
155
+ "Micronesia, Federated States of",
156
+ "Moldova",
157
+ "Monaco",
158
+ "Mongolia",
159
+ "Montserrat",
160
+ "Morocco",
161
+ "Mozambique",
162
+ "Namibia",
163
+ "Nauru",
164
+ "Navassa Island",
165
+ "Nepal",
166
+ "Netherlands",
167
+ "Netherlands Antilles",
168
+ "New Caledonia",
169
+ "New Zealand",
170
+ "Nicaragua",
171
+ "Niger",
172
+ "Nigeria",
173
+ "Niue",
174
+ "Norfolk Island",
175
+ "Northern Mariana Islands",
176
+ "Norway",
177
+ "Oman",
178
+ "Pakistan",
179
+ "Palau",
180
+ "Panama",
181
+ "Papua New Guinea",
182
+ "Paracel Islands",
183
+ "Paraguay",
184
+ "Peru",
185
+ "Philippines",
186
+ "Pitcairn Islands",
187
+ "Poland",
188
+ "Portugal",
189
+ "Puerto Rico",
190
+ "Qatar",
191
+ "Reunion",
192
+ "Romania",
193
+ "Russia",
194
+ "Rwanda",
195
+ "Saint Helena",
196
+ "Saint Kitts and Nevis",
197
+ "Saint Lucia",
198
+ "Saint Pierre and Miquelon",
199
+ "Saint Vincent and the Grenadines",
200
+ "Samoa",
201
+ "San Marino",
202
+ "Sao Tome and Principe",
203
+ "Saudi Arabia",
204
+ "Senegal",
205
+ "Serbia and Montenegro",
206
+ "Seychelles",
207
+ "Sierra Leone",
208
+ "Singapore",
209
+ "Slovakia",
210
+ "Slovenia",
211
+ "Solomon Islands",
212
+ "Somalia",
213
+ "South Africa",
214
+ "South Georgia and the South Sandwich Islands",
215
+ "Spain",
216
+ "Spratly Islands",
217
+ "Sri Lanka",
218
+ "Sudan",
219
+ "Suriname",
220
+ "Svalbard",
221
+ "Swaziland",
222
+ "Sweden",
223
+ "Switzerland",
224
+ "Syria",
225
+ "Taiwan",
226
+ "Tajikistan",
227
+ "Tanzania",
228
+ "Thailand",
229
+ "Timor-Leste",
230
+ "Togo",
231
+ "Tokelau",
232
+ "Tonga",
233
+ "Trinidad and Tobago",
234
+ "Tromelin Island",
235
+ "Tunisia",
236
+ "Turkey",
237
+ "Turkmenistan",
238
+ "Turks and Caicos Islands",
239
+ "Tuvalu",
240
+ "Uganda",
241
+ "Ukraine",
242
+ "United Arab Emirates",
243
+ "United Kingdom",
244
+ "United States",
245
+ "Uruguay",
246
+ "Uzbekistan",
247
+ "Vanuatu",
248
+ "Venezuela",
249
+ "Vietnam",
250
+ "Virgin Islands",
251
+ "Wake Island",
252
+ "Wallis and Futuna",
253
+ "West Bank",
254
+ "Western Sahara",
255
+ "Yemen",
256
+ "Zambia",
257
+ "Zimbabwe"
258
+ ]
@@ -0,0 +1,93 @@
1
+ {
2
+ "name": "accessible-autocomplete",
3
+ "version": "3.0.1",
4
+ "main": "dist/accessible-autocomplete.min.js",
5
+ "style": "dist/accessible-autocomplete.min.css",
6
+ "description": "An autocomplete component, built to be accessible.",
7
+ "repository": "alphagov/accessible-autocomplete",
8
+ "author": "Government Digital Service (https://www.gov.uk/government/organisations/government-digital-service)",
9
+ "license": "MIT",
10
+ "keywords": [
11
+ "a11y",
12
+ "accessibility",
13
+ "autocomplete",
14
+ "component",
15
+ "plugin",
16
+ "typeahead",
17
+ "widget"
18
+ ],
19
+ "scripts": {
20
+ "build": "cross-env NODE_ENV=production webpack --progress",
21
+ "dev": "cross-env NODE_ENV=development webpack serve",
22
+ "karma:dev": "cross-env NODE_ENV=test karma start test/karma.config.js",
23
+ "karma": "npm run karma:dev -- --single-run",
24
+ "prepare": "node -e \"try { (await import('husky')).default() } catch (e) { if (e.code !== 'ERR_MODULE_NOT_FOUND') throw e }\" --input-type module",
25
+ "preversion": "npm test",
26
+ "standard": "standard",
27
+ "pretest": "npm run build",
28
+ "test": "run-p standard karma wdio",
29
+ "version": "git add -A dist",
30
+ "wdio": "cross-env NODE_ENV=test wdio test/wdio.config.js"
31
+ },
32
+ "devDependencies": {
33
+ "@babel/core": "^7.23.9",
34
+ "@babel/eslint-parser": "^7.23.10",
35
+ "@babel/plugin-transform-react-jsx": "^7.23.4",
36
+ "@babel/preset-env": "^7.23.9",
37
+ "@babel/register": "^7.23.7",
38
+ "@wdio/cli": "^8.39.1",
39
+ "@wdio/globals": "^8.39.1",
40
+ "@wdio/local-runner": "^8.39.1",
41
+ "@wdio/mocha-framework": "^8.39.0",
42
+ "@wdio/sauce-service": "^8.39.1",
43
+ "@wdio/spec-reporter": "^8.39.0",
44
+ "@wdio/static-server-service": "^8.39.0",
45
+ "autoprefixer": "^10.4.17",
46
+ "babel-loader": "^9.1.3",
47
+ "babel-plugin-istanbul": "^6.1.1",
48
+ "chai": "^5.1.1",
49
+ "chalk": "^5.3.0",
50
+ "core-js": "^3.36.0",
51
+ "cross-env": "^7.0.3",
52
+ "css-loader": "^6.10.0",
53
+ "cssnano": "^6.0.3",
54
+ "cssnano-preset-default": "^6.0.3",
55
+ "devtools": "^8.39.1",
56
+ "dotenv": "^16.4.5",
57
+ "husky": "^9.1.5",
58
+ "karma": "^6.4.4",
59
+ "karma-chrome-launcher": "^3.2.0",
60
+ "karma-mocha": "^2.0.1",
61
+ "karma-mocha-reporter": "^2.2.5",
62
+ "karma-sourcemap-loader": "^0.4.0",
63
+ "karma-webpack": "^5.0.1",
64
+ "mini-css-extract-plugin": "^2.8.0",
65
+ "mocha": "^10.7.0",
66
+ "npm-run-all": "^4.1.5",
67
+ "postcss": "^8.4.35",
68
+ "postcss-loader": "^8.1.0",
69
+ "preact": "^8.5.3",
70
+ "puppeteer": "^22.15.0",
71
+ "source-map-loader": "^5.0.0",
72
+ "standard": "^17.1.0",
73
+ "terser-webpack-plugin": "^5.3.9",
74
+ "webdriverio": "^8.28.6",
75
+ "webpack": "^5.90.1",
76
+ "webpack-cli": "^5.1.4",
77
+ "webpack-dev-server": "^5.0.1"
78
+ },
79
+ "peerDependencies": {
80
+ "preact": "^8.0.0"
81
+ },
82
+ "peerDependenciesMeta": {
83
+ "preact": {
84
+ "optional": true
85
+ }
86
+ },
87
+ "standard": {
88
+ "ignore": [
89
+ "dist"
90
+ ],
91
+ "parser": "@babel/eslint-parser"
92
+ }
93
+ }
@@ -0,0 +1,16 @@
1
+ const autoprefixer = require('autoprefixer')
2
+ const cssnano = require('cssnano')
3
+ const cssnanoPresetDefault = require('cssnano-preset-default')
4
+
5
+ /**
6
+ * PostCSS config
7
+ */
8
+ module.exports = {
9
+ plugins: [
10
+ // Add vendor prefixes
11
+ autoprefixer({ env: 'stylesheets' }),
12
+
13
+ // Always minify CSS
14
+ cssnano({ preset: [cssnanoPresetDefault] })
15
+ ]
16
+ }
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/lib/accessible-autocomplete.preact.min')
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/lib/accessible-autocomplete.react.min')
@@ -0,0 +1,16 @@
1
+ import { exec } from 'node:child_process'
2
+ import chalk from 'chalk'
3
+
4
+ exec('git diff --name-only dist/', (err, stdout) => {
5
+ if (err) {
6
+ console.log(chalk.red('ERROR:'), err)
7
+ return process.exit(1)
8
+ }
9
+
10
+ if (stdout.toString().length) {
11
+ console.log(chalk.red('ERROR:'), 'There are unstaged changes in `dist/` after running `npm run build`. Please commit them.')
12
+ return process.exit(1)
13
+ }
14
+
15
+ process.exit()
16
+ })
@@ -0,0 +1,167 @@
1
+ .autocomplete__wrapper {
2
+ position: relative;
3
+ }
4
+
5
+ .autocomplete__hint,
6
+ .autocomplete__input {
7
+ appearance: none;
8
+ border: 2px solid #0b0c0c;
9
+ border-radius: 0; /* Safari 10 on iOS adds implicit border rounding. */
10
+ box-sizing: border-box;
11
+ margin-bottom: 0; /* BUG: Safari 10 on macOS seems to add an implicit margin. */
12
+ line-height: 1.25;
13
+ height: 2.5rem;
14
+ width: 100%;
15
+ }
16
+
17
+ .autocomplete__input {
18
+ background-color: transparent;
19
+ position: relative;
20
+ }
21
+
22
+ .autocomplete__hint {
23
+ color: #505a5f;
24
+ position: absolute;
25
+ }
26
+
27
+ .autocomplete__input--default {
28
+ padding: 5px;
29
+ }
30
+
31
+ .autocomplete__input--focused {
32
+ outline: 3px solid #fd0;
33
+ outline-offset: 0;
34
+ box-shadow: inset 0 0 0 2px;
35
+ }
36
+
37
+ .autocomplete__input--show-all-values {
38
+ padding: 5px 35px 5px 5px; /* Space for arrow. Other padding should match .autocomplete__input--default. */
39
+ cursor: pointer;
40
+ }
41
+
42
+ .autocomplete__dropdown-arrow-down {
43
+ z-index: -1;
44
+ display: inline-block;
45
+ position: absolute;
46
+ right: 8px;
47
+ width: 24px;
48
+ height: 24px;
49
+ top: 10px;
50
+ }
51
+
52
+ .autocomplete__menu {
53
+ background-color: #ffffff;
54
+ border: 2px solid #0b0c0c;
55
+ border-top: 0;
56
+ color: #0b0c0c;
57
+ margin: 0;
58
+ max-height: 342px;
59
+ overflow-x: hidden;
60
+ padding: 0;
61
+ width: 100%;
62
+ width: calc(100% - 4px);
63
+ }
64
+
65
+ .autocomplete__menu--visible {
66
+ display: block;
67
+ }
68
+
69
+ .autocomplete__menu--hidden {
70
+ display: none;
71
+ }
72
+
73
+ .autocomplete__menu--overlay {
74
+ box-shadow: rgba(0, 0, 0, 0.256863) 0px 2px 6px;
75
+ left: 0;
76
+ position: absolute;
77
+ top: 100%;
78
+ z-index: 100;
79
+ }
80
+
81
+ .autocomplete__menu--inline {
82
+ position: relative;
83
+ }
84
+
85
+ .autocomplete__option {
86
+ border-bottom: solid #b1b4b6;
87
+ border-width: 1px 0;
88
+ cursor: pointer;
89
+ display: block;
90
+ position: relative;
91
+ }
92
+
93
+ .autocomplete__option > * {
94
+ pointer-events: none;
95
+ }
96
+
97
+ .autocomplete__option:first-of-type {
98
+ border-top-width: 0;
99
+ }
100
+
101
+ .autocomplete__option:last-of-type {
102
+ border-bottom-width: 0;
103
+ }
104
+
105
+ .autocomplete__option--odd {
106
+ background-color: #f3f2f1;
107
+ }
108
+
109
+ .autocomplete__option--focused,
110
+ .autocomplete__option:hover {
111
+ background-color: #1d70b8;
112
+ border-color: #1d70b8;
113
+ color: white;
114
+ outline: none;
115
+ }
116
+
117
+ @media (-ms-high-contrast: active), (forced-colors: active) {
118
+ .autocomplete__menu {
119
+ border-color: FieldText;
120
+ }
121
+
122
+ .autocomplete__option {
123
+ background-color: Field;
124
+ color: FieldText;
125
+ }
126
+
127
+ .autocomplete__option--focused,
128
+ .autocomplete__option:hover {
129
+ forced-color-adjust: none; /* prevent backplate from obscuring text */
130
+ background-color: Highlight;
131
+ border-color: Highlight;
132
+ color: HighlightText;
133
+
134
+ /* Prefer SelectedItem / SelectedItemText in browsers that support it */
135
+ background-color: SelectedItem;
136
+ border-color: SelectedItem;
137
+ color: SelectedItemText;
138
+ outline-color: SelectedItemText;
139
+ }
140
+ }
141
+
142
+ .autocomplete__option--no-results {
143
+ background-color: #f3f2f1;
144
+ color: #505a5f;
145
+ cursor: not-allowed;
146
+ }
147
+
148
+ .autocomplete__hint,
149
+ .autocomplete__input,
150
+ .autocomplete__option {
151
+ font-size: 1rem;
152
+ font-weight: 400;
153
+ }
154
+
155
+ .autocomplete__hint,
156
+ .autocomplete__option {
157
+ padding: 5px;
158
+ }
159
+
160
+ @media (min-width: 641px) {
161
+ .autocomplete__hint,
162
+ .autocomplete__input,
163
+ .autocomplete__option {
164
+ font-size: 1.1875rem;
165
+ line-height: 1.3157894737;
166
+ }
167
+ }