govuk_publishing_components 9.6.0 → 9.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/components/radio.js +32 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss +4 -31
- data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +13 -42
- data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +4 -32
- data/app/assets/stylesheets/govuk_publishing_components/components/_label.scss +4 -23
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +0 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/_radio.scss +5 -129
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +5 -3
- data/app/views/govuk_publishing_components/components/_back_link.html.erb +7 -6
- data/app/views/govuk_publishing_components/components/_button.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_input.html.erb +32 -25
- data/app/views/govuk_publishing_components/components/_label.html.erb +13 -31
- data/app/views/govuk_publishing_components/components/_radio.html.erb +54 -38
- data/app/views/govuk_publishing_components/components/docs/radio.yml +14 -2
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/all.js +172 -172
- data/node_modules/govuk-frontend/components/checkboxes/README.md +92 -4
- data/node_modules/govuk-frontend/components/checkboxes/_checkboxes.scss +7 -1
- data/node_modules/govuk-frontend/components/checkboxes/checkboxes.js +356 -1
- data/node_modules/govuk-frontend/components/checkboxes/template.njk +15 -3
- data/node_modules/govuk-frontend/components/date-input/README.md +3 -3
- data/node_modules/govuk-frontend/components/file-upload/README.md +3 -3
- data/node_modules/govuk-frontend/components/header/_header.scss +5 -3
- data/node_modules/govuk-frontend/components/input/README.md +3 -3
- data/node_modules/govuk-frontend/components/phase-banner/README.md +1 -1
- data/node_modules/govuk-frontend/components/radios/README.md +176 -3
- data/node_modules/govuk-frontend/components/radios/_radios.scss +15 -1
- data/node_modules/govuk-frontend/components/radios/radios.js +356 -1
- data/node_modules/govuk-frontend/components/radios/template.njk +19 -3
- data/node_modules/govuk-frontend/components/select/README.md +3 -3
- data/node_modules/govuk-frontend/components/tabs/_tabs.scss +4 -4
- data/node_modules/govuk-frontend/components/tabs/tabs.js +1 -1
- data/node_modules/govuk-frontend/components/textarea/README.md +3 -3
- data/node_modules/govuk-frontend/package.json +18 -18
- data/node_modules/govuk-frontend/template.njk +4 -2
- data/node_modules/govuk-frontend/tools/_font-url.scss +1 -1
- data/node_modules/govuk-frontend/tools/_image-url.scss +1 -1
- metadata +3 -2
@@ -47,24 +47,40 @@
|
|
47
47
|
{% for item in params.items %}
|
48
48
|
{% set id = item.id if item.id else idPrefix + "-" + loop.index %}
|
49
49
|
{% set conditionalId = "conditional-" + id %}
|
50
|
+
{%- if item.divider %}
|
51
|
+
<div class="govuk-radios__divider">{{ item.divider }}</div>
|
52
|
+
{%- else %}
|
53
|
+
{% set hasHint = true if item.hint.text or item.hint.html %}
|
54
|
+
{% set itemHintId = id + '-item-hint' %}
|
50
55
|
<div class="govuk-radios__item">
|
51
56
|
<input class="govuk-radios__input" id="{{ id }}" name="{{ params.name }}" type="radio" value="{{ item.value }}"
|
52
57
|
{{-" checked" if item.checked }}
|
53
58
|
{{-" disabled" if item.disabled }}
|
54
|
-
{%- if item.conditional %} data-aria-controls="{{ conditionalId }}"{% endif -%}
|
59
|
+
{%- if item.conditional %} data-aria-controls="{{ conditionalId }}"{% endif -%}
|
60
|
+
{%- if hasHint %} aria-describedby="{{ itemHintId }}"{% endif -%}>
|
55
61
|
{{ govukLabel({
|
56
62
|
html: item.html,
|
57
63
|
text: item.text,
|
58
|
-
classes: 'govuk-radios__label',
|
64
|
+
classes: 'govuk-radios__label' + (' ' + item.label.classes if item.label.classes),
|
59
65
|
attributes: item.label.attributes,
|
60
66
|
for: id
|
61
67
|
}) | indent(6) | trim }}
|
68
|
+
{%- if hasHint %}
|
69
|
+
{{ govukHint({
|
70
|
+
id: itemHintId,
|
71
|
+
classes: 'govuk-radios__hint',
|
72
|
+
attributes: item.hint.attributes,
|
73
|
+
html: item.hint.html,
|
74
|
+
text: item.hint.text
|
75
|
+
}) | indent(6) | trim }}
|
76
|
+
{%- endif %}
|
62
77
|
</div>
|
63
78
|
{% if item.conditional %}
|
64
|
-
<div class="govuk-radios__conditional" id="{{ conditionalId }}">
|
79
|
+
<div class="govuk-radios__conditional{% if not item.checked %} govuk-radios__conditional--hidden{% endif %}" id="{{ conditionalId }}">
|
65
80
|
{{ item.conditional.html | safe }}
|
66
81
|
</div>
|
67
82
|
{% endif %}
|
83
|
+
{% endif %}
|
68
84
|
{% endfor %}
|
69
85
|
</div>
|
70
86
|
{% endset -%}
|
@@ -310,7 +310,7 @@ If you are using Nunjucks,then macros take the following arguments
|
|
310
310
|
|
311
311
|
<td class="govuk-table__cell ">No</td>
|
312
312
|
|
313
|
-
<td class="govuk-table__cell ">Optional label text or HTML by specifying value for either text or html keys. See label component.</td>
|
313
|
+
<td class="govuk-table__cell ">Optional label text or HTML by specifying value for either text or html keys. See <a href="../label/README.md#component-arguments">label</a> component.</td>
|
314
314
|
|
315
315
|
</tr>
|
316
316
|
|
@@ -322,7 +322,7 @@ If you are using Nunjucks,then macros take the following arguments
|
|
322
322
|
|
323
323
|
<td class="govuk-table__cell ">No</td>
|
324
324
|
|
325
|
-
<td class="govuk-table__cell ">Arguments for the hint component (e.g. text). See hint component.</td>
|
325
|
+
<td class="govuk-table__cell ">Arguments for the hint component (e.g. text). See <a href="../hint/README.md#component-arguments">hint</a> component.</td>
|
326
326
|
|
327
327
|
</tr>
|
328
328
|
|
@@ -334,7 +334,7 @@ If you are using Nunjucks,then macros take the following arguments
|
|
334
334
|
|
335
335
|
<td class="govuk-table__cell ">No</td>
|
336
336
|
|
337
|
-
<td class="govuk-table__cell ">Arguments for the errorMessage component (e.g. text). See errorMessage component.</td>
|
337
|
+
<td class="govuk-table__cell ">Arguments for the errorMessage component (e.g. text). See <a href="../error-message/README.md#component-arguments">errorMessage</a> component.</td>
|
338
338
|
|
339
339
|
</tr>
|
340
340
|
|
@@ -116,6 +116,10 @@
|
|
116
116
|
border: 1px solid $govuk-border-colour;
|
117
117
|
border-top: 0;
|
118
118
|
|
119
|
+
&--hidden {
|
120
|
+
display: none;
|
121
|
+
}
|
122
|
+
|
119
123
|
& > :last-child {
|
120
124
|
margin-bottom: 0;
|
121
125
|
}
|
@@ -123,8 +127,4 @@
|
|
123
127
|
}
|
124
128
|
|
125
129
|
}
|
126
|
-
|
127
|
-
.js-hidden {
|
128
|
-
display: none;
|
129
|
-
}
|
130
130
|
}
|
@@ -1033,7 +1033,7 @@ function Tabs ($module) {
|
|
1033
1033
|
this.$tabs = $module.querySelectorAll('.govuk-tabs__tab');
|
1034
1034
|
|
1035
1035
|
this.keys = { left: 37, right: 39, up: 38, down: 40 };
|
1036
|
-
this.jsHiddenClass = '
|
1036
|
+
this.jsHiddenClass = 'govuk-tabs__panel--hidden';
|
1037
1037
|
}
|
1038
1038
|
|
1039
1039
|
Tabs.prototype.init = function () {
|
@@ -273,7 +273,7 @@ If you are using Nunjucks,then macros take the following arguments
|
|
273
273
|
|
274
274
|
<td class="govuk-table__cell ">Yes</td>
|
275
275
|
|
276
|
-
<td class="govuk-table__cell ">Arguments for the label component. See label component.</td>
|
276
|
+
<td class="govuk-table__cell ">Arguments for the label component. See <a href="../label/README.md#component-arguments">label</a> component.</td>
|
277
277
|
|
278
278
|
</tr>
|
279
279
|
|
@@ -285,7 +285,7 @@ If you are using Nunjucks,then macros take the following arguments
|
|
285
285
|
|
286
286
|
<td class="govuk-table__cell ">No</td>
|
287
287
|
|
288
|
-
<td class="govuk-table__cell ">Arguments for the hint component (e.g. text). See hint component.</td>
|
288
|
+
<td class="govuk-table__cell ">Arguments for the hint component (e.g. text). See <a href="../hint/README.md#component-arguments">hint</a> component.</td>
|
289
289
|
|
290
290
|
</tr>
|
291
291
|
|
@@ -297,7 +297,7 @@ If you are using Nunjucks,then macros take the following arguments
|
|
297
297
|
|
298
298
|
<td class="govuk-table__cell ">No</td>
|
299
299
|
|
300
|
-
<td class="govuk-table__cell ">Arguments for the errorMessage component (e.g. text). See errorMessage component.</td>
|
300
|
+
<td class="govuk-table__cell ">Arguments for the errorMessage component (e.g. text). See <a href="../error-message/README.md#component-arguments">errorMessage</a> component.</td>
|
301
301
|
|
302
302
|
</tr>
|
303
303
|
|
@@ -2,25 +2,25 @@
|
|
2
2
|
"_args": [
|
3
3
|
[
|
4
4
|
{
|
5
|
-
"raw": "govuk-frontend@^1.
|
5
|
+
"raw": "govuk-frontend@^1.2.0",
|
6
6
|
"scope": null,
|
7
7
|
"escapedName": "govuk-frontend",
|
8
8
|
"name": "govuk-frontend",
|
9
|
-
"rawSpec": "^1.
|
10
|
-
"spec": ">=1.
|
9
|
+
"rawSpec": "^1.2.0",
|
10
|
+
"spec": ">=1.2.0 <2.0.0",
|
11
11
|
"type": "range"
|
12
12
|
},
|
13
13
|
"/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ"
|
14
14
|
]
|
15
15
|
],
|
16
|
-
"_from": "govuk-frontend@>=1.
|
17
|
-
"_id": "govuk-frontend@1.
|
16
|
+
"_from": "govuk-frontend@>=1.2.0 <2.0.0",
|
17
|
+
"_id": "govuk-frontend@1.2.0",
|
18
18
|
"_inCache": true,
|
19
19
|
"_location": "/govuk-frontend",
|
20
20
|
"_nodeVersion": "8.9.4",
|
21
21
|
"_npmOperationalInternal": {
|
22
22
|
"host": "s3://npm-registry-packages",
|
23
|
-
"tmp": "tmp/govuk-frontend_1.
|
23
|
+
"tmp": "tmp/govuk-frontend_1.2.0_1532676432170_0.8460384917464794"
|
24
24
|
},
|
25
25
|
"_npmUser": {
|
26
26
|
"name": "govuk-patterns-and-tools",
|
@@ -29,21 +29,21 @@
|
|
29
29
|
"_npmVersion": "5.6.0",
|
30
30
|
"_phantomChildren": {},
|
31
31
|
"_requested": {
|
32
|
-
"raw": "govuk-frontend@^1.
|
32
|
+
"raw": "govuk-frontend@^1.2.0",
|
33
33
|
"scope": null,
|
34
34
|
"escapedName": "govuk-frontend",
|
35
35
|
"name": "govuk-frontend",
|
36
|
-
"rawSpec": "^1.
|
37
|
-
"spec": ">=1.
|
36
|
+
"rawSpec": "^1.2.0",
|
37
|
+
"spec": ">=1.2.0 <2.0.0",
|
38
38
|
"type": "range"
|
39
39
|
},
|
40
40
|
"_requiredBy": [
|
41
41
|
"/"
|
42
42
|
],
|
43
|
-
"_resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-1.
|
44
|
-
"_shasum": "
|
43
|
+
"_resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-1.2.0.tgz",
|
44
|
+
"_shasum": "a741364f903534755e134c0db6ac65a63a368592",
|
45
45
|
"_shrinkwrap": null,
|
46
|
-
"_spec": "govuk-frontend@^1.
|
46
|
+
"_spec": "govuk-frontend@^1.2.0",
|
47
47
|
"_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ",
|
48
48
|
"author": {
|
49
49
|
"name": "GOV.UK Design System Team",
|
@@ -58,12 +58,12 @@
|
|
58
58
|
"devDependencies": {},
|
59
59
|
"directories": {},
|
60
60
|
"dist": {
|
61
|
-
"integrity": "sha512-
|
62
|
-
"shasum": "
|
63
|
-
"tarball": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-1.
|
61
|
+
"integrity": "sha512-pHKghu9J1nB7F/MKpiYaimPoJXUJdmMZUGuORv9K1Ek1sVNdTRlEKR+rogpfR4GkroS0tS1LMwQJrQkiCvxIIw==",
|
62
|
+
"shasum": "a741364f903534755e134c0db6ac65a63a368592",
|
63
|
+
"tarball": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-1.2.0.tgz",
|
64
64
|
"fileCount": 211,
|
65
|
-
"unpackedSize":
|
66
|
-
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\
|
65
|
+
"unpackedSize": 1374381,
|
66
|
+
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbWslQCRA9TVsSAnZWagAAJXcP/1FbQ/s+ZDBeLjmSgYGu\np+gLSDEO+V7kpNuSqAME0tS5JeJOEyj8IB0KoYASyENv08ezL2yXe7f+P8SX\nX3RIMa5QjYBxTP4ImhSlRUjCyygcoX3e4khOxzno1/+OCaTrz5Kv6CoADCRu\nmu0Lz0JtYSYFoxxfbxUUbSesmYlLvkzMtmL+uMkj0+BTT7VNynWLUEKfqR1f\n1hDJCDkG5ClwfOVt7EfjxN2Ih4q9hRrClLT3xZJFTzV9xP180tn06Yw9OoNL\nX32Ii63LVjvl6gIvUPXLkY7VgbqZ8q7Y4WfJaiNVNbYydq3lNxe+BN2WMwJ8\nNG0deFEHRiIqjhTp2cyWU3WeZyv7Ca7/9YdaeVPXmb3gN93UapVFVJdENV6H\nDgJ81kTFNy0PM7pnjbI06rOxvPVhSEwN2ChyV2Y3A5upVfNNh8isYmV62WP/\nTppqqLBjglQuAkc8L0CNQfR0iHBMDTNOh0qDYT6ITbmyC4++Ws6qqsCMV0Pt\naD9jwplH/KBMhwu4epX1z6OpFkL2B1gYKhy05bOVN5k+s0wkXZiu4nGMKKMP\nMz+twbyT4a5jiGpPkm+tzKHl22XQaLY7F6Qe1F9/mT9iikrryfWxaeIvxkUj\nitkfgq9467oxpglauyD8Zekss5MH0dOR4Er80H+uiK7zcIdMDIem/kjBetJ8\nx4F7\r\n=bd4f\r\n-----END PGP SIGNATURE-----\r\n"
|
67
67
|
},
|
68
68
|
"engines": {
|
69
69
|
"node": ">= 4.2.0"
|
@@ -91,5 +91,5 @@
|
|
91
91
|
"url": "git+https://github.com/alphagov/govuk-frontend.git"
|
92
92
|
},
|
93
93
|
"sass": "all.scss",
|
94
|
-
"version": "1.
|
94
|
+
"version": "1.2.0"
|
95
95
|
}
|
@@ -1,6 +1,8 @@
|
|
1
1
|
{% from "./components/skip-link/macro.njk" import govukSkipLink %}
|
2
2
|
{% from "./components/header/macro.njk" import govukHeader %}
|
3
3
|
{% from "./components/footer/macro.njk" import govukFooter %}
|
4
|
+
{# specify absolute url for the static assets folder e.g. http://wwww.domain.com/assets #}
|
5
|
+
{% set assetUrl = assetUrl | default(assetPath) %}
|
4
6
|
<!DOCTYPE html>
|
5
7
|
<html lang="{{ htmlLang | default('en') }}" class="govuk-template {{ htmlClasses }}">
|
6
8
|
<head>
|
@@ -19,9 +21,9 @@
|
|
19
21
|
{% endblock %}
|
20
22
|
|
21
23
|
{% block head %}{% endblock %}
|
22
|
-
|
23
24
|
{# The default og:image is added below head so that scrapers see any custom metatags first, and this is just a fallback #}
|
24
|
-
|
25
|
+
{# image url needs to be absolute e.g. http://wwww.domain.com/.../govuk-opengraph-image.png #}
|
26
|
+
<meta property="og:image" content="{{ assetUrl | default('/assets') }}/images/govuk-opengraph-image.png">
|
25
27
|
</head>
|
26
28
|
<body class="govuk-template__body {{ bodyClasses }}">
|
27
29
|
<script>document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
|
@@ -21,7 +21,7 @@
|
|
21
21
|
and function-exists($govuk-font-url-function);
|
22
22
|
|
23
23
|
@if ($use-custom-function) {
|
24
|
-
@return call($govuk-font-url-function, $filename);
|
24
|
+
@return call(get-function($govuk-font-url-function), $filename);
|
25
25
|
} @else {
|
26
26
|
@return url($govuk-fonts-path + $filename);
|
27
27
|
}
|
@@ -21,7 +21,7 @@
|
|
21
21
|
and function-exists($govuk-image-url-function);
|
22
22
|
|
23
23
|
@if ($use-custom-function) {
|
24
|
-
@return call($govuk-image-url-function, $filename);
|
24
|
+
@return call(get-function($govuk-image-url-function), $filename);
|
25
25
|
} @else {
|
26
26
|
@return url($govuk-images-path + $filename);
|
27
27
|
}
|
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: 9.
|
4
|
+
version: 9.7.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: 2018-07-
|
11
|
+
date: 2018-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|
@@ -325,6 +325,7 @@ files:
|
|
325
325
|
- app/assets/javascripts/govuk_publishing_components/all_components.js
|
326
326
|
- app/assets/javascripts/govuk_publishing_components/components/error-summary.js
|
327
327
|
- app/assets/javascripts/govuk_publishing_components/components/feedback.js
|
328
|
+
- app/assets/javascripts/govuk_publishing_components/components/radio.js
|
328
329
|
- app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js
|
329
330
|
- app/assets/javascripts/govuk_publishing_components/components/success-alert.js
|
330
331
|
- app/assets/javascripts/govuk_publishing_components/lib/current-location.js
|