govuk_publishing_components 16.0.0 → 16.1.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/checkboxes.js +2 -2
- data/app/views/govuk_publishing_components/components/_radio.html.erb +4 -0
- data/app/views/govuk_publishing_components/components/docs/radio.yml +9 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/accessible-autocomplete/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1c43a8de608bcadb260cb50450159ed9a1afb2629bf108bc3d21897cea0531e
|
4
|
+
data.tar.gz: 9a1bf967473efb25ee611861a94d8084a430d095ca3fb39f27008863b2481da8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd69d01ebf621bc839d7ff47c1eaa47c7ea721d47971958cb9172d9be7e604d5633301fede44e60f6f9b9bfb0d95da24b023d756effbc3e2a18071af3e7e81e0
|
7
|
+
data.tar.gz: 6e8add99822a200e2f2652c6735bc44e211e302e6fd1b28ebf2926f6c7c0e0a2b14f072c6304a3e5a6d12b8ec073058953eea2d3b9dcf632c716b3410b9d6d93
|
@@ -11,7 +11,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
11
11
|
var _this = this;
|
12
12
|
this.applyAriaControlsAttributes(scope);
|
13
13
|
|
14
|
-
$(scope).
|
14
|
+
$(scope).on('change', '[data-nested=true] input[type=checkbox]', function(e) {
|
15
15
|
var checkbox = e.target;
|
16
16
|
var isNested = $(checkbox).closest('.govuk-checkboxes--nested');
|
17
17
|
var hasNested = $('.govuk-checkboxes--nested[data-parent=' + checkbox.id + ']');
|
@@ -23,7 +23,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
23
23
|
}
|
24
24
|
});
|
25
25
|
|
26
|
-
$(scope).
|
26
|
+
$(scope).on('change', 'input[type=checkbox]', function(e) {
|
27
27
|
if (GOVUK.analytics && GOVUK.analytics.trackEvent) {
|
28
28
|
var $checkbox = $(e.target);
|
29
29
|
var category = $checkbox.data("track-category");
|
@@ -71,6 +71,10 @@
|
|
71
71
|
|
72
72
|
data_attrs = { "aria-controls": conditional_id }
|
73
73
|
data_attrs["tracking-url"] = item[:url] if item.key?(:url)
|
74
|
+
|
75
|
+
if item.fetch(:data_attributes, {}).any?
|
76
|
+
data_attrs = data_attrs.merge(item[:data_attributes])
|
77
|
+
end
|
74
78
|
%>
|
75
79
|
<%= tag.div class: %w( gem-c-radio govuk-radios__item ) do %>
|
76
80
|
<%= check_box_tag name,
|
@@ -130,6 +130,15 @@ examples:
|
|
130
130
|
- value: "govuk-verify"
|
131
131
|
text: "Use GOV.UK Verify"
|
132
132
|
checked: true
|
133
|
+
with_data_attributes:
|
134
|
+
data:
|
135
|
+
name: "radio-group-data-attributes"
|
136
|
+
items:
|
137
|
+
- value: "cool-button"
|
138
|
+
text: "Best button in town"
|
139
|
+
data_attributes: { "contextual-guidance": "cool-buttons-guidance" }
|
140
|
+
- value: "no-data-attributes-button"
|
141
|
+
text: "Worst button in town"
|
133
142
|
with_custom_id_prefix:
|
134
143
|
data:
|
135
144
|
id_prefix: 'custom'
|
@@ -49,7 +49,7 @@
|
|
49
49
|
"/"
|
50
50
|
],
|
51
51
|
"_resolved": "git://github.com/alphagov/accessible-autocomplete.git#0c518b4fa79b9a95b544410858486ed9e6403c84",
|
52
|
-
"_shasum": "
|
52
|
+
"_shasum": "81318b920b7ddddd526e2a9a6dc935344ebdd964",
|
53
53
|
"_shrinkwrap": null,
|
54
54
|
"_spec": "accessible-autocomplete@git://github.com/alphagov/accessible-autocomplete.git#add-multiselect-support",
|
55
55
|
"_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ",
|
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: 16.
|
4
|
+
version: 16.1.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: 2019-02-
|
11
|
+
date: 2019-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govspeak
|