govuk-components 2.1.3 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/components/govuk_component/accordion_component/section_component.rb +1 -3
- data/app/components/govuk_component/breadcrumbs_component.rb +5 -4
- data/app/components/govuk_component/cookie_banner_component.rb +6 -5
- data/app/components/govuk_component/footer_component.html.erb +10 -3
- data/app/components/govuk_component/footer_component.rb +2 -1
- data/app/components/govuk_component/tab_component.rb +1 -3
- data/app/components/govuk_component/table_component/caption_component.rb +1 -3
- data/app/components/govuk_component/table_component/cell_component.rb +3 -9
- data/lib/govuk/components/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14fa3254f2a6cfe00069f3342241b165dbf00f746a6bff31170f291977614f32
|
4
|
+
data.tar.gz: a61d4942fa381ee173bc0f397517485f0b0617e5eff7b7a015bbdb9c7ab2fd5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 163dc576f943962d3730e505b131a98963231b3ae95d3bfdf0d78409c5aa35f9198c518978dfbfc16e8dbadc99ae19fcde97a7b318e782fbb476190eb810dad1
|
7
|
+
data.tar.gz: 05a0b60347a348e4f006d0c5e4dad3e2afe3a603b0a6fae3150d2ef34ff200f6f83ab6dce65bd009dcf897ca649aaaca1fc7e66ac59044ba1bd40c0aef884bf5
|
@@ -34,8 +34,6 @@ class GovukComponent::AccordionComponent::SectionComponent < GovukComponent::Bas
|
|
34
34
|
private
|
35
35
|
|
36
36
|
def default_classes
|
37
|
-
|
38
|
-
classes.append("govuk-accordion__section--expanded") if expanded?
|
39
|
-
end
|
37
|
+
class_names("govuk-accordion__section", "govuk-accordion__section--expanded" => expanded?).split
|
40
38
|
end
|
41
39
|
end
|
@@ -12,10 +12,11 @@ class GovukComponent::BreadcrumbsComponent < GovukComponent::Base
|
|
12
12
|
private
|
13
13
|
|
14
14
|
def default_classes
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
class_names(
|
16
|
+
"govuk-breadcrumbs",
|
17
|
+
"govuk-!-display-none-print" => hide_in_print,
|
18
|
+
"govuk-breadcrumbs--collapse-on-mobile" => collapse_on_mobile
|
19
|
+
).split
|
19
20
|
end
|
20
21
|
|
21
22
|
def build_list(breadcrumbs)
|
@@ -1,13 +1,14 @@
|
|
1
1
|
class GovukComponent::CookieBannerComponent < GovukComponent::Base
|
2
2
|
renders_many :messages, GovukComponent::CookieBannerComponent::MessageComponent
|
3
3
|
|
4
|
-
attr_accessor :aria_label, :hidden
|
4
|
+
attr_accessor :aria_label, :hidden, :hide_in_print
|
5
5
|
|
6
|
-
def initialize(aria_label: "Cookie banner", hidden: false, classes: [], html_attributes: {})
|
6
|
+
def initialize(aria_label: "Cookie banner", hidden: false, hide_in_print: true, classes: [], html_attributes: {})
|
7
7
|
super(classes: classes, html_attributes: html_attributes)
|
8
8
|
|
9
|
-
@aria_label
|
10
|
-
@hidden
|
9
|
+
@aria_label = aria_label
|
10
|
+
@hidden = hidden
|
11
|
+
@hide_in_print = hide_in_print
|
11
12
|
end
|
12
13
|
|
13
14
|
def call
|
@@ -19,6 +20,6 @@ class GovukComponent::CookieBannerComponent < GovukComponent::Base
|
|
19
20
|
private
|
20
21
|
|
21
22
|
def default_classes
|
22
|
-
|
23
|
+
class_names("govuk-cookie-banner", "govuk-!-display-none-print" => hide_in_print).split
|
23
24
|
end
|
24
25
|
end
|
@@ -1,5 +1,13 @@
|
|
1
1
|
<%= tag.footer(class: classes, role: 'contentinfo', **html_attributes) do %>
|
2
2
|
<%= tag.div(class: container_classes, **container_html_attributes) do %>
|
3
|
+
<% if navigation.present? %>
|
4
|
+
<div class="govuk-footer__navigation">
|
5
|
+
<%= navigation %>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<hr class="govuk-footer__section-break">
|
9
|
+
<% end %>
|
10
|
+
|
3
11
|
<%= tag.div(class: meta_classes, **meta_html_attributes) do %>
|
4
12
|
<% if meta.present? %>
|
5
13
|
<%= meta %>
|
@@ -31,9 +39,8 @@
|
|
31
39
|
<%= meta_content %>
|
32
40
|
<% end %>
|
33
41
|
</div>
|
34
|
-
|
35
|
-
|
36
|
-
</div>
|
42
|
+
|
43
|
+
<%= tag.div(copyright, class: "govuk-footer__meta-item") %>
|
37
44
|
<% end %>
|
38
45
|
<% end %>
|
39
46
|
<% end %>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
class GovukComponent::FooterComponent < GovukComponent::Base
|
2
2
|
renders_one :meta_html
|
3
3
|
renders_one :meta
|
4
|
+
renders_one :navigation
|
4
5
|
|
5
6
|
attr_reader :meta_items, :meta_text, :meta_items_title, :meta_licence, :copyright, :custom_container_classes
|
6
7
|
|
@@ -76,7 +77,7 @@ private
|
|
76
77
|
end
|
77
78
|
|
78
79
|
def default_copright_text
|
79
|
-
raw(%(
|
80
|
+
raw(%(© Crown copyright))
|
80
81
|
end
|
81
82
|
|
82
83
|
def default_copyright_url
|
@@ -35,9 +35,7 @@ private
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def li_classes(i = nil)
|
38
|
-
|
39
|
-
c.append("govuk-tabs__list-item--selected") if i&.zero?
|
40
|
-
end
|
38
|
+
class_names("govuk-tabs__list-item", "govuk-tabs__list-item--selected" => i&.zero?).split
|
41
39
|
end
|
42
40
|
|
43
41
|
def li_link
|
@@ -37,19 +37,13 @@ private
|
|
37
37
|
|
38
38
|
def default_classes
|
39
39
|
if header
|
40
|
-
|
41
|
-
c << "govuk-table__header--numeric" if numeric?
|
42
|
-
c << width_class if width?
|
43
|
-
end
|
40
|
+
class_names("govuk-table__header", "govuk-table__header--numeric" => numeric?, width_class => width?).split
|
44
41
|
else
|
45
|
-
|
46
|
-
c << "govuk-table__cell--numeric" if numeric?
|
47
|
-
c << width_class if width?
|
48
|
-
end
|
42
|
+
class_names("govuk-table__cell", "govuk-table__cell--numeric" => numeric?, width_class => width?).split
|
49
43
|
end
|
50
44
|
end
|
51
45
|
|
52
46
|
def width_class
|
53
|
-
WIDTHS.fetch(width)
|
47
|
+
WIDTHS.fetch(width, nil)
|
54
48
|
end
|
55
49
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk-components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DfE developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
47
|
+
version: 2.49.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.
|
54
|
+
version: 2.49.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: pry-byebug
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -235,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '0'
|
237
237
|
requirements: []
|
238
|
-
rubygems_version: 3.
|
238
|
+
rubygems_version: 3.3.3
|
239
239
|
signing_key:
|
240
240
|
specification_version: 4
|
241
241
|
summary: Lightweight set of reusable GOV.UK Design System components
|