govuk_publishing_components 21.1.1 → 21.2.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/stylesheets/govuk_publishing_components/components/_feedback.scss +3 -1
- data/app/views/govuk_publishing_components/components/_fieldset.html.erb +10 -4
- data/app/views/govuk_publishing_components/components/_select.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/docs/fieldset.yml +12 -0
- data/lib/govuk_publishing_components/version.rb +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: 622487f061b5e3ce6b708c87a4ff7ef21044fcce36df2b7fd195a093dcd94dc0
|
4
|
+
data.tar.gz: '0164998fd0707382bab460b9dd702e985d7ebc50d76270870f6f2fa5174fe2be'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f63af3bdcc9fadf1653a7070627ac89e914f9ff32828cb60eb1ea17ba3cac7e6941e5a46075b95275d707a33dcde372a8225648a0aa0eb0bd340a3309164755
|
7
|
+
data.tar.gz: 51463c1b48991a4b5db28a663e2bb271d0baa6b5cf88457b073d463612129cca5bc86d6ee44ae4cd40787510cb6b91b8d83b62079fb9fed59e579e132c5e6ae9
|
@@ -1,8 +1,14 @@
|
|
1
|
-
<%
|
2
|
-
|
3
|
-
|
1
|
+
<%
|
2
|
+
text = text || yield
|
3
|
+
describedby ||= nil
|
4
|
+
role ||= nil
|
5
|
+
heading_size = false unless ['s', 'm', 'l', 'xl'].include?(heading_size)
|
6
|
+
|
7
|
+
legend_classes = %w(govuk-fieldset__legend)
|
8
|
+
legend_classes << "govuk-fieldset__legend--#{heading_size}" if heading_size
|
9
|
+
%>
|
4
10
|
<%= tag.fieldset class: "gem-c-fieldset govuk-fieldset", aria: { describedby: describedby }, role: role do %>
|
5
|
-
<%= tag.legend class:
|
11
|
+
<%= tag.legend class: legend_classes do %>
|
6
12
|
<%= legend_text %>
|
7
13
|
<% end %>
|
8
14
|
<%= text %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
label ||= false
|
5
5
|
full_width ||= false
|
6
6
|
name ||= id
|
7
|
-
heading_size =
|
7
|
+
heading_size = false unless ['s', 'm', 'l', 'xl'].include?(heading_size)
|
8
8
|
|
9
9
|
label_classes = %w(govuk-label)
|
10
10
|
label_classes << "govuk-label--#{heading_size}" if heading_size
|
@@ -17,6 +17,18 @@ examples:
|
|
17
17
|
|
18
18
|
<input type="radio" id="default-no" name="default"t>
|
19
19
|
<label for="default-no">No</label>
|
20
|
+
with_custom_legend_size:
|
21
|
+
description: Make the legend different sizes. Valid options are 's', 'm', 'l' and 'xl'.
|
22
|
+
data:
|
23
|
+
legend_text: 'Do you have a driving license?'
|
24
|
+
heading_size: 'l'
|
25
|
+
text: |
|
26
|
+
<!-- Use the radio component, this is hardcoded only for this example -->
|
27
|
+
<input type="radio" id="size-yes" name="default"t>
|
28
|
+
<label for="size-yes">Yes</label>
|
29
|
+
|
30
|
+
<input type="radio" id="size-no" name="default"t>
|
31
|
+
<label for="size-no">No</label>
|
20
32
|
with_html_legend:
|
21
33
|
description: 'If you only have one fieldset on the page you might want to include the title of the page as the legend text. Used with a [captured](http://api.rubyonrails.org/classes/ActionView/Helpers/CaptureHelper.html#method-i-capture) [title](http://components.publishing.service.gov.uk/component-guide/title)'
|
22
34
|
data:
|
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: 21.
|
4
|
+
version: 21.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: 2019-09-
|
11
|
+
date: 2019-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gds-api-adapters
|