govuk_publishing_components 12.10.0 → 12.11.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: 232e20cae276803302aa437940d4f806de53fc2d6dae36e901682847f727c738
4
- data.tar.gz: d2381cb3ac59795f5f05f5df10e9f6bb14489a07b1c473d320b1b41fe970c5a3
3
+ metadata.gz: 5418d09427a87d2d13d40a2e6a16bf117077f662d10c345135b3b7e3e3446aa8
4
+ data.tar.gz: fd19c7eb53eaf6e21bba7b2e94b87c4a713c83b0bff26b0eb5b301fc7023fc9d
5
5
  SHA512:
6
- metadata.gz: 7b8a94ea7869a1831636b438700f769505f6a7b69c0af454fa4adb0796244e2b6f63cd39618c45d836c698db8b016224c905313c9efcaa95a9b4281133306e48
7
- data.tar.gz: ed1431b12bc73d3c48db73d7f9c7e0540fde21bb09a8217c177bd7e5cc897a60a5aff12cbc654a1acfa8ef36e2bcc1231a2fecb234af35bd270f26b911ed89b2
6
+ metadata.gz: df60ea3c2ad2cf82d0e1ff60dd6ceecd5e8a1042a8e5350eb70bc84520a2c2da76b6daa7bf02d7d3e84986a140be228bc755dd432cb3a623e85d6be61257ee04
7
+ data.tar.gz: 351589a50ea516cee20dc23c235f8b57a5ff3ef96a6e421af1fb47e9948d840a8fc09022b22a649e767e69a39788ea6cbcce9ab423730b44dab5d45323980bdb
@@ -8,6 +8,7 @@
8
8
  heading ||= nil
9
9
  hint_text ||= "Select all that apply."
10
10
  items ||= []
11
+ is_page_heading ||= false
11
12
 
12
13
  # check if any item is set as being conditional
13
14
  has_conditional = items.any? { |item| item.is_a?(Hash) && item[:conditional] }
@@ -18,8 +19,12 @@
18
19
  <%= tag.fieldset class: "govuk-fieldset", "aria-describedby": "#{id}-hint #{"#{id}-error" if error}" do %>
19
20
 
20
21
  <% if heading.present? %>
21
- <%= tag.legend class: "govuk-fieldset__legend govuk-fieldset__legend--xl" do %>
22
- <%= tag.h1 heading, class: "govuk-fieldset__heading" %>
22
+ <% if is_page_heading %>
23
+ <%= tag.legend class: "govuk-fieldset__legend govuk-fieldset__legend--xl gem-c-title gem-c-title--margin-bottom-5" do %>
24
+ <%= tag.h1 heading, class: "gem-c-title__text" %>
25
+ <% end %>
26
+ <% else %>
27
+ <%= tag.legend heading, class: "govuk-fieldset__legend govuk-fieldset__legend--m" %>
23
28
  <% end %>
24
29
  <% end %>
25
30
 
@@ -26,6 +26,18 @@ examples:
26
26
  value: "green"
27
27
  - label: "Blue"
28
28
  value: "blue"
29
+ with_legend_as_page_heading:
30
+ data:
31
+ name: "favourite_colour"
32
+ heading: "What is your favourite colour?"
33
+ is_page_heading: true
34
+ items:
35
+ - label: "Red"
36
+ value: "red"
37
+ - label: "Green"
38
+ value: "green"
39
+ - label: "Blue"
40
+ value: "blue"
29
41
  custom_hint_text:
30
42
  data:
31
43
  name: "favourite_skittle"
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '12.10.0'.freeze
2
+ VERSION = '12.11.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: 12.10.0
4
+ version: 12.11.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-11-20 00:00:00.000000000 Z
11
+ date: 2018-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config