govuk-components 6.2.0 → 6.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0ce8f8650a866c52719d796e2ef51f6387ac23ab117be33632ab7ffa66bf8d5
4
- data.tar.gz: 3dc3120c0a546a0278f102de61accda6964b18a266d574e9d6bf25f5ebf17b49
3
+ metadata.gz: 599145bab2755c839151a6b0274aedf1ce13e05a8f17ae59422fc114ee46c7d4
4
+ data.tar.gz: ba51ce7a153d2b3679eb3230822bee50eccdb188b78f9eaf10da62e78bd05dc1
5
5
  SHA512:
6
- metadata.gz: bdd302c5144af2e903cf71ab8641e126101af2c8c66dd1d3b925f5526b3dda77ec86e09aee673e3e118da5c81e343f8feface4a412879650cdf972a95412be48
7
- data.tar.gz: 1f547ea9fcedfc3e69de2dcf29e5a313700b9f9575fce671866c4825da3fc94587c2a6c6e44365783aa15c10f0360459bb8e9dcec68b69db51adee98fdf2fe95
6
+ metadata.gz: f1ddf79f5f07a8e6864d2fdc2be917e2f53b6b0f243ea25edc6610c0aee3610b608316f1028683a7c92be6ffdfa7e1b52f107870be6084e223dc57f41465cca8
7
+ data.tar.gz: 74f782050a58f32622423ba4157a2e801f94c4d5ac92b91c7f0774dfe02a2506b7c0052e8847de8e1df180dc777d8fef5943c705c244cc6059d4afb05bd3f968
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![Gem version](https://badge.fury.io/rb/govuk-components.svg)](https://badge.fury.io/rb/govuk-components)
5
5
  [![Gem](https://img.shields.io/gem/dt/govuk-components?logo=rubygems)](https://rubygems.org/gems/govuk-components)
6
6
  [![Licence](https://img.shields.io/github/license/x-govuk/govuk-components)](https://github.com/x-govuk/govuk-components/blob/main/LICENSE.txt)
7
- [![GOV.UK Design System version](https://img.shields.io/badge/GOV.UK%20Design%20System-6.0.0-brightgreen)](https://design-system.service.gov.uk)
7
+ [![GOV.UK Design System version](https://img.shields.io/badge/GOV.UK%20Design%20System-6.2.0-brightgreen)](https://design-system.service.gov.uk)
8
8
  [![ViewComponent](https://img.shields.io/badge/ViewComponent-4.6.0-brightgreen)](https://viewcomponent.org/)
9
9
  [![Rails](https://img.shields.io/badge/Rails-7.2.2%20%E2%95%B1%208.0.2%20%E2%95%B1%208.1.0-E16D6D)](https://weblog.rubyonrails.org/releases/)
10
10
  [![Ruby](https://img.shields.io/badge/Ruby-3.3.11%20%20%E2%95%B1%204.0.2-E16D6D)](https://www.ruby-lang.org/en/downloads/)
@@ -1,63 +1,66 @@
1
- <%= tag.footer(role: 'contentinfo', **html_attributes) do %>
2
- <%= tag.div(**container_html_attributes) do %>
3
- <%= tag.svg(class: "#{brand}-footer__crown", focusable: "false", role: "presentation", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 60", height: "30", width: "32", fill: "currentColor") do %>
4
- <g>
5
- <circle cx="20" cy="17.6" r="3.7"/>
6
- <circle cx="10.2" cy="23.5" r="3.7"/>
7
- <circle cx="3.7" cy="33.2" r="3.7"/>
8
- <circle cx="31.7" cy="30.6" r="3.7"/>
9
- <circle cx="43.3" cy="17.6" r="3.7"/>
10
- <circle cx="53.2" cy="23.5" r="3.7"/>
11
- <circle cx="59.7" cy="33.2" r="3.7"/>
12
- <circle cx="31.7" cy="30.6" r="3.7"/>
13
- <path d="M33.1,9.8c.2-.1.3-.3.5-.5l4.6,2.4v-6.8l-4.6,1.5c-.1-.2-.3-.3-.5-.5l1.9-5.9h-6.7l1.9,5.9c-.2.1-.3.3-.5.5l-4.6-1.5v6.8l4.6-2.4c.1.2.3.3.5.5l-2.6,8c-.9,2.8,1.2,5.7,4.1,5.7h0c3,0,5.1-2.9,4.1-5.7l-2.6-8ZM37,37.9s-3.4,3.8-4.1,6.1c2.2,0,4.2-.5,6.4-2.8l-.7,8.5c-2-2.8-4.4-4.1-5.7-3.8.1,3.1.5,6.7,5.8,7.2,3.7.3,6.7-1.5,7-3.8.4-2.6-2-4.3-3.7-1.6-1.4-4.5,2.4-6.1,4.9-3.2-1.9-4.5-1.8-7.7,2.4-10.9,3,4,2.6,7.3-1.2,11.1,2.4-1.3,6.2,0,4,4.6-1.2-2.8-3.7-2.2-4.2.2-.3,1.7.7,3.7,3,4.2,1.9.3,4.7-.9,7-5.9-1.3,0-2.4.7-3.9,1.7l2.4-8c.6,2.3,1.4,3.7,2.2,4.5.6-1.6.5-2.8,0-5.3l5,1.8c-2.6,3.6-5.2,8.7-7.3,17.5-7.4-1.1-15.7-1.7-24.5-1.7h0c-8.8,0-17.1.6-24.5,1.7-2.1-8.9-4.7-13.9-7.3-17.5l5-1.8c-.5,2.5-.6,3.7,0,5.3.8-.8,1.6-2.3,2.2-4.5l2.4,8c-1.5-1-2.6-1.7-3.9-1.7,2.3,5,5.2,6.2,7,5.9,2.3-.4,3.3-2.4,3-4.2-.5-2.4-3-3.1-4.2-.2-2.2-4.6,1.6-6,4-4.6-3.7-3.7-4.2-7.1-1.2-11.1,4.2,3.2,4.3,6.4,2.4,10.9,2.5-2.8,6.3-1.3,4.9,3.2-1.8-2.7-4.1-1-3.7,1.6.3,2.3,3.3,4.1,7,3.8,5.4-.5,5.7-4.2,5.8-7.2-1.3-.2-3.7,1-5.7,3.8l-.7-8.5c2.2,2.3,4.2,2.7,6.4,2.8-.7-2.3-4.1-6.1-4.1-6.1h10.6,0Z"/>
14
- </g>
15
- <% end %>
1
+ <%= tag.footer(**footer_attributes) do %>
2
+ <%= content %>
3
+ <%= tag.div(role: 'contentinfo', **html_attributes) do %>
4
+ <%= tag.div(**container_html_attributes) do %>
5
+ <%= tag.svg(class: "#{brand}-footer__crown", focusable: "false", role: "presentation", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 60", height: "30", width: "32", fill: "currentColor") do %>
6
+ <g>
7
+ <circle cx="20" cy="17.6" r="3.7"/>
8
+ <circle cx="10.2" cy="23.5" r="3.7"/>
9
+ <circle cx="3.7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2.4,10.9,2.5-2.8,6.3-1.3,4.9,3.2-1.8-2.7-4.1-1-3.7,1.6.3,2.3,3.3,4.1,7,3.8,5.4-.5,5.7-4.2,5.8-7.2-1.3-.2-3.7,1-5.7,3.8l-.7-8.5c2.2,2.3,4.2,2.7,6.4,2.8-.7-2.3-4.1-6.1-4.1-6.1h10.6,0Z"/>
16
+ </g>
17
+ <% end %>
16
18
 
17
- <% if navigation.present? %>
18
- <div class="<%= brand %>-footer__navigation">
19
- <%= navigation %>
20
- </div>
19
+ <% if navigation.present? %>
20
+ <div class="<%= brand %>-footer__navigation">
21
+ <%= navigation %>
22
+ </div>
21
23
 
22
- <%= tag.hr(class: "#{brand}-footer__section-break") %>
23
- <% end %>
24
+ <%= tag.hr(class: "#{brand}-footer__section-break") %>
25
+ <% end %>
24
26
 
25
- <%= tag.div(class: meta_classes, **meta_html_attributes) do %>
26
- <% if meta.present? %>
27
- <%= meta %>
28
- <% else %>
29
- <div class="<%= brand %>-footer__meta-item <%= brand %>-footer__meta-item--grow">
30
- <% if meta_items.any? %>
31
- <h2 class="<%= brand %>-visually-hidden"><%= meta_items_title %></h2>
32
- <%= content_before_meta_items %>
33
- <ul class="<%= brand %>-footer__inline-list">
34
- <% @meta_items.each do |hyperlink| %>
35
- <li class="<%= brand %>-footer__inline-list-item">
36
- <%= hyperlink %>
37
- </li>
38
- <% end %>
39
- </ul>
40
- <%= content_after_meta_items %>
41
- <% end %>
27
+ <%= tag.div(class: meta_classes, **meta_html_attributes) do %>
28
+ <% if meta.present? %>
29
+ <%= meta %>
30
+ <% else %>
31
+ <div class="<%= brand %>-footer__meta-item <%= brand %>-footer__meta-item--grow">
32
+ <% if meta_items.any? %>
33
+ <h2 class="<%= brand %>-visually-hidden"><%= meta_items_title %></h2>
34
+ <%= content_before_meta_items %>
35
+ <ul class="<%= brand %>-footer__inline-list">
36
+ <% @meta_items.each do |hyperlink| %>
37
+ <li class="<%= brand %>-footer__inline-list-item">
38
+ <%= hyperlink %>
39
+ </li>
40
+ <% end %>
41
+ </ul>
42
+ <%= content_after_meta_items %>
43
+ <% end %>
42
44
 
43
- <% if meta_content.present? %>
44
- <div class="<%= brand %>-footer__meta-custom">
45
- <%= meta_content %>
46
- </div>
47
- <% end %>
45
+ <% if meta_content.present? %>
46
+ <div class="<%= brand %>-footer__meta-custom">
47
+ <%= meta_content %>
48
+ </div>
49
+ <% end %>
48
50
 
49
- <% if meta_licence_content.nil? %>
50
- <svg aria-hidden="true" focusable="false" class="<%= brand %>-footer__licence-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 483.2 195.7" height="17" width="41">
51
- <path fill="currentColor" d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"/>
52
- </svg>
51
+ <% if meta_licence_content.nil? %>
52
+ <svg aria-hidden="true" focusable="false" class="<%= brand %>-footer__licence-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 483.2 195.7" height="17" width="41">
53
+ <path fill="currentColor" d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"/>
54
+ </svg>
53
55
 
54
- <%= tag.span(default_licence, class: "#{brand}-footer__licence-description") %>
55
- <% elsif meta_licence_content.present? %>
56
- <%= tag.span(meta_licence_content, class: "#{brand}-footer__licence-description") %>
57
- <% end %>
58
- </div>
56
+ <%= tag.span(default_licence, class: "#{brand}-footer__licence-description") %>
57
+ <% elsif meta_licence_content.present? %>
58
+ <%= tag.span(meta_licence_content, class: "#{brand}-footer__licence-description") %>
59
+ <% end %>
60
+ </div>
59
61
 
60
- <%= tag.div(copyright, class: "#{brand}-footer__meta-item") %>
62
+ <%= tag.div(copyright, class: "#{brand}-footer__meta-item") %>
63
+ <% end %>
61
64
  <% end %>
62
65
  <% end %>
63
66
  <% end %>
@@ -10,7 +10,7 @@ class GovukComponent::FooterComponent < GovukComponent::Base
10
10
  renders_one :content_after_meta_items
11
11
  renders_one :meta_licence_html
12
12
 
13
- attr_reader :meta_items, :meta_text, :meta_items_title, :meta_licence, :copyright_text, :copyright_url, :custom_container_classes
13
+ attr_reader :meta_items, :meta_text, :meta_items_title, :meta_licence, :copyright_text, :copyright_url, :custom_container_classes, :footer_attributes
14
14
 
15
15
  def initialize(
16
16
  classes: [],
@@ -18,6 +18,7 @@ class GovukComponent::FooterComponent < GovukComponent::Base
18
18
  container_html_attributes: {},
19
19
  copyright_text: config.default_footer_copyright_text,
20
20
  copyright_url: config.default_footer_copyright_url,
21
+ footer_attributes: {},
21
22
  html_attributes: {},
22
23
  meta_items: {},
23
24
  meta_items_title: "Support links",
@@ -36,6 +37,7 @@ class GovukComponent::FooterComponent < GovukComponent::Base
36
37
  @copyright_url = copyright_url
37
38
  @custom_container_classes = container_classes
38
39
  @custom_container_html_attributes = container_html_attributes
40
+ @footer_attributes = footer_attributes
39
41
 
40
42
  super(classes:, html_attributes:)
41
43
  end
@@ -1,16 +1,21 @@
1
1
  <%= tag.div(**html_attributes) do %>
2
- <div class="<%= brand %>-summary-card__title-wrapper">
2
+ <%= tag.div(class: "#{brand}-summary-card__title-wrapper") do %>
3
3
  <%= content_tag(heading_level, title, class: "#{brand}-summary-card__title") %>
4
4
 
5
- <% if actions.any? %>
6
- <ul class="<%= brand %>-summary-card__actions">
5
+ <% if actions.count == 1 && (action = actions.first) %>
6
+ <%= tag.div(class: "#{brand}-summary-card__actions") do %>
7
+ <%= action_text(action) %>
8
+ <% end %>
9
+ <% elsif actions.count > 1 %>
10
+ <%= tag.ul(class: "#{brand}-summary-card__actions") do %>
7
11
  <% actions.each do |action| %>
8
12
  <%= tag.li(action_text(action), class: "#{brand}-summary-card__action") %>
9
13
  <% end %>
10
- </ul>
14
+ <% end %>
11
15
  <% end %>
12
- </div>
13
- <div class="<%= brand %>-summary-card__content">
16
+ <% end %>
17
+
18
+ <%= tag.div(class: "#{brand}-summary-card__content") do %>
14
19
  <%= summary_list || content %>
15
- </div>
20
+ <% end %>
16
21
  <% end %>
@@ -1,5 +1,5 @@
1
1
  module Govuk
2
2
  module Components
3
- VERSION = '6.2.0'.freeze
3
+ VERSION = '6.3.0'.freeze
4
4
  end
5
5
  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: 6.2.0
4
+ version: 6.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - DfE developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-13 00:00:00.000000000 Z
11
+ date: 2026-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: html-attributes-utils
@@ -59,7 +59,7 @@ dependencies:
59
59
  version: '4.9'
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
- version: '4.10'
62
+ version: '4.13'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
@@ -69,7 +69,7 @@ dependencies:
69
69
  version: '4.9'
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
- version: '4.10'
72
+ version: '4.13'
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: deep_merge
75
75
  requirement: !ruby/object:Gem::Requirement
@@ -244,14 +244,14 @@ dependencies:
244
244
  requirements:
245
245
  - - "~>"
246
246
  - !ruby/object:Gem::Version
247
- version: 4.7.0
247
+ version: 5.0.0
248
248
  type: :development
249
249
  prerelease: false
250
250
  version_requirements: !ruby/object:Gem::Requirement
251
251
  requirements:
252
252
  - - "~>"
253
253
  - !ruby/object:Gem::Version
254
- version: 4.7.0
254
+ version: 5.0.0
255
255
  - !ruby/object:Gem::Dependency
256
256
  name: rubypants
257
257
  requirement: !ruby/object:Gem::Requirement
@@ -314,14 +314,14 @@ dependencies:
314
314
  requirements:
315
315
  - - "~>"
316
316
  - !ruby/object:Gem::Version
317
- version: 0.33.0
317
+ version: 0.34.0
318
318
  type: :development
319
319
  prerelease: false
320
320
  version_requirements: !ruby/object:Gem::Requirement
321
321
  requirements:
322
322
  - - "~>"
323
323
  - !ruby/object:Gem::Version
324
- version: 0.33.0
324
+ version: 0.34.0
325
325
  - !ruby/object:Gem::Dependency
326
326
  name: webrick
327
327
  requirement: !ruby/object:Gem::Requirement