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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 545946feac7107939d0fcbc6203e3a788e0d1883f3c1e21bb5671c3ea9f39ed1
4
- data.tar.gz: 1e15babbf28f8844cdcc1c35e87f0ff59bfd8c4d92ec357f69e801626fa4a29a
3
+ metadata.gz: f1c43a8de608bcadb260cb50450159ed9a1afb2629bf108bc3d21897cea0531e
4
+ data.tar.gz: 9a1bf967473efb25ee611861a94d8084a430d095ca3fb39f27008863b2481da8
5
5
  SHA512:
6
- metadata.gz: 1457f8b2260f3caf6d533e4ab9325986f08e71d45760838ac22fe54ebd84ad4b15b72e86a5066a9da60f147f05b20a8ea0f03608ca185d4c02edfe44cad92fc5
7
- data.tar.gz: 0a653dae71525be265024133260fc4a13d0e764ebef2b79afc56db7c2e05e5db786bcc43486c0d4b8e5d9ac211375bee84e3d65c8b88091b319e49cb33299502
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).find('[data-nested=true] input[type=checkbox]').on('change', function(e) {
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).find('input[type=checkbox]').on('change', function(e) {
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'
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '16.0.0'.freeze
2
+ VERSION = '16.1.0'.freeze
3
3
  end
@@ -49,7 +49,7 @@
49
49
  "/"
50
50
  ],
51
51
  "_resolved": "git://github.com/alphagov/accessible-autocomplete.git#0c518b4fa79b9a95b544410858486ed9e6403c84",
52
- "_shasum": "8ebbd2fed8be30664e8a43095c0a70ae6e55c294",
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.0.0
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-25 00:00:00.000000000 Z
11
+ date: 2019-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govspeak