govuk_publishing_components 10.1.0 → 10.2.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: 79208a2aa5fe09127a376f0b1dfbe4a703c03c738b06cee07b04b0a41c2e5527
4
- data.tar.gz: 3a8b99c01ab4b32e6bf18beddfaf798043b83b967d1d93d6be3775ae5932d0e7
3
+ metadata.gz: '0649b5020dae2cba694ad63df39cd6cb0b89cd0576c2b5ca3e3dcfcb49ab15ec'
4
+ data.tar.gz: 5113282e562ce2007cfc5b42224f5843fcd85046c9c31d7ebbaf105827efc556
5
5
  SHA512:
6
- metadata.gz: 5602b8c9c50df8e12d28bba3a5ee08a1141cdc67892700745610ac452b8380a0310c51a1b395f91e7273d9d7b7913cfd38ef448a2a229e3e8ea2dcea125ba9ea
7
- data.tar.gz: c3dd7d269ed451de61be94db9667121ab96211de00497f197050d9f4d8a25ba21775a4824bd0eea30c83764d5da8273aab87903844fcb2bc554ceb132546c4e5
6
+ metadata.gz: be36558fc5aab493495122f07488db2c715d94a663e1d5aaba56dc21fe34a8ca6fb4a76ab7f64ee365283d0bc8b5b234e6cc8e55f8a209652e333420ed9e0eeb
7
+ data.tar.gz: 3ea11fa1c9249fddffa6b9701468ec394bd37da45ace0abe6dfc3c300f494123df2595b4b5f4c75a4fcd4297efdb405c0f2c848e65792b0bbe23d9e364b3e3e2
@@ -45,6 +45,9 @@
45
45
  label_id = item[:id] ? item[:id] : "#{id_prefix}-#{index}"
46
46
  label_hint_id = "label-hint-#{SecureRandom.hex(4)}" if item[:hint_text].present?
47
47
  conditional_id = "conditional-#{SecureRandom.hex(4)}" if item[:conditional].present?
48
+
49
+ data_attrs = { "aria-controls": conditional_id }
50
+ data_attrs["tracking-url"] = item[:url] if item.key?(:url)
48
51
  %>
49
52
  <%= tag.div class: %w( gem-c-radio govuk-radios__item ) do %>
50
53
  <%= check_box_tag name,
@@ -57,9 +60,7 @@
57
60
  aria: {
58
61
  describedby: label_hint_id
59
62
  },
60
- data: {
61
- "aria-controls": conditional_id
62
- }
63
+ data: data_attrs,
63
64
  }
64
65
  %>
65
66
  <%= render "govuk_publishing_components/components/label", {
@@ -151,3 +151,14 @@ examples:
151
151
  - value: "govuk-verify"
152
152
  text: "Use GOV.UK Verify"
153
153
  conditional: "You’ll need to prove your identity using GOV.UK Verify"
154
+ tracking-url:
155
+ data:
156
+ name: "radio-group-tracking-url"
157
+ id_prefix: "tracking-url"
158
+ items:
159
+ - value: "government-gateway"
160
+ text: "Use Government Gateway"
161
+ url: "https://www.tax.service.gov.uk/gg/sign-in?continue=%2Fcheck-your-state-pension"
162
+ - value: "govuk-verify"
163
+ text: "Use GOV.UK Verify"
164
+ url: "https://www.tax.service.gov.uk/check-your-state-pension/signin/verify?journey_hint=uk_idp_sign_in"
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '10.1.0'.freeze
2
+ VERSION = '10.2.0'.freeze
3
3
  end
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: 10.1.0
4
+ version: 10.2.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-09-27 00:00:00.000000000 Z
11
+ date: 2018-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config