govuk-components 4.1.2 → 5.0.0b2

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: 6e7b1205d2fa524dd03af86f3f989ca8519a90b2b2504ea220b74748a78f9c86
4
- data.tar.gz: 26d4734f318f8dcb85cc74a88e8ae1f6e63a30afe4b40d582d449fcb7a40f9fc
3
+ metadata.gz: d6c2597cbc2b6db48def0781c11e2173bb2e3a1bf5b661c695145d68ea41fa7f
4
+ data.tar.gz: c6853251961b9b9e2e102cbdd6439cf20b99d695ba548008c1d68edb1c287158
5
5
  SHA512:
6
- metadata.gz: a3dc2f9e9bf058c67e170976d71bf152cf84d6138806bfbd1418f73b881fb2c9715d1d7fd8c60b6d8327fbe3a1b4f2ee7cf232fcb0c911ce940b00cf73488a46
7
- data.tar.gz: a9bbe0c2a21330b61adfeabf56e93dec486519707ce04f5723fa866e95b58a546b0778f4f0df30bdd60397b3a16af91db417aa60dd83c0e4d5ec1fcf00db0bd3
6
+ metadata.gz: 7d908043c42e33bf274e2d06e8873ec6fe207825b866064fc12dcd46ce9c113db3476dd7ee9537d65b5648e2521da1b7abcaccdd23fdbbf715003d9672390952
7
+ data.tar.gz: 3595863554678c2eb81f5a286d71257a0340bcb57d9dda6596d6d7efa0e985e8dd59cd72d984cba87cb86ad0c2f49e3280dc918f207970cdd0e9b3246cd793f9
data/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  [![Licence](https://img.shields.io/github/license/x-govuk/govuk-components)](https://github.com/x-govuk/govuk-components/blob/main/LICENSE.txt)
9
9
  [![GOV.UK Design System version](https://img.shields.io/badge/GOV.UK%20Design%20System-4.7.0-brightgreen)](https://design-system.service.gov.uk)
10
10
  [![ViewComponent](https://img.shields.io/badge/ViewComponent-3.3.0-brightgreen)](https://viewcomponent.org/)
11
- [![Rails](https://img.shields.io/badge/Rails-6.1.7%20%E2%95%B1%207.0.6-E16D6D)](https://weblog.rubyonrails.org/releases/)
11
+ [![Rails](https://img.shields.io/badge/Rails-7.0.8%20%E2%95%B1%207.1.0-E16D6D)](https://weblog.rubyonrails.org/releases/)
12
12
  [![Ruby](https://img.shields.io/badge/Ruby-3.0.6%20%20%E2%95%B1%203.1.4%20%20%E2%95%B1%203.2.2-E16D6D)](https://www.ruby-lang.org/en/downloads/)
13
13
 
14
14
  This gem provides a suite of reusable components for the [GOV.UK Design System](https://design-system.service.gov.uk/). It is intended to provide a lightweight alternative to the [GOV.UK Publishing Components](https://github.com/alphagov/govuk_publishing_components) library and is built with GitHub’s [ViewComponent](https://github.com/github/view_component) framework.
@@ -46,6 +46,7 @@ The provided components are:
46
46
  * [Tabs](https://govuk-components.netlify.app/components/tabs)
47
47
  * [Tables](https://govuk-components.netlify.app/components/table)
48
48
  * [Tags](https://govuk-components.netlify.app/components/tag)
49
+ * [Task list](https://govuk-components.netlify.app/components/task-list)
49
50
  * [Warning text](https://govuk-components.netlify.app/components/warning-text)
50
51
 
51
52
  This library also provides helpers for creating [links](https://govuk-components.netlify.app/helpers/link),
@@ -13,7 +13,7 @@ class GovukComponent::DetailsComponent < GovukComponent::Base
13
13
  end
14
14
 
15
15
  def call
16
- tag.details(data: { module: "#{brand}-details" }, id: id, open: open, **html_attributes) do
16
+ tag.details(id: id, open: open, **html_attributes) do
17
17
  safe_join([summary, description])
18
18
  end
19
19
  end
@@ -2,27 +2,23 @@
2
2
  <%= tag.div(**container_html_attributes) do %>
3
3
  <div class="<%= brand %>-header__logo">
4
4
  <%= link_to(homepage_url, class: ["#{brand}-header__link", "#{brand}-header__link--homepage"]) do %>
5
- <span class="<%= brand %>-header__logotype">
6
- <% if custom_logo.present? %>
7
- <%= custom_logo %>
8
- <% else %>
9
- <% if crown %>
10
- <!--[if gt IE 8]><!-->
11
- <svg aria-hidden="true" focusable="false" class="<%= brand %>-header__logotype-crown" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 97" height="30" width="36">
12
- <path fill="currentColor" fill-rule="evenodd" d="M25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34l-5.1-15.4c.4-.2.7-.6 1-.9zM66 92.8c16.9 0 32.8 1.1 47.1 3.2 4-16.9 8.9-26.7 14-33.5l-9.6-3.4c1 4.9 1.1 7.2 0 10.2-1.5-1.4-3-4.3-4.2-8.7L108.6 76c2.8-2 5-3.2 7.5-3.3-4.4 9.4-10 11.9-13.6 11.2-4.3-.8-6.3-4.6-5.6-7.9 1-4.7 5.7-5.9 8-.5 4.3-8.7-3-11.4-7.6-8.8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z"></path>
13
- </svg>
14
- <!--<![endif]-->
15
- <% end %>
16
-
17
- <% if crown_fallback_image_path.present? %>
18
- <!--[if IE 8]>
19
- <%= image_tag(crown_fallback_image_path, **crown_fallback_image_attributes) %>
20
- <![endif]-->
21
- <% end %>
22
-
23
- <%= tag.span(logotype, class: "#{brand}-header__logotype-text") %>
24
- <% end %>
25
- </span>
5
+ <% if custom_logo.present? %>
6
+ <%= custom_logo %>
7
+ <% else %>
8
+ <svg
9
+ focusable="false"
10
+ role="img"
11
+ class="<%= brand %>-header__logotype"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ viewBox="0 0 152 30"
14
+ height="30"
15
+ width="152"
16
+ aria-label="GOV.UK"
17
+ >
18
+ <title>GOV.UK</title>
19
+ <path d="M6.7 12.2c1 .4 2.1-.1 2.5-1s-.1-2.1-1-2.5c-1-.4-2.1.1-2.5 1-.4 1 0 2.1 1 2.5m-4.3 2.5c1 .4 2.1-.1 2.5-1s-.1-2.1-1-2.5c-1-.4-2.1.1-2.5 1-.5 1 0 2.1 1 2.5m-1.3 4.8c1 .4 2.1-.1 2.5-1 .4-1-.1-2.1-1-2.5-1-.4-2.1.1-2.5 1-.4 1 0 2.1 1 2.5m10.4-5.8c1 .4 2.1-.1 2.5-1s-.1-2.1-1-2.5c-1-.4-2.1.1-2.5 1s0 2.1 1 2.5m17.4-1.5c-1 .4-2.1-.1-2.5-1s.1-2.1 1-2.5c1-.4 2.1.1 2.5 1 .5 1 0 2.1-1 2.5m4.3 2.5c-1 .4-2.1-.1-2.5-1s.1-2.1 1-2.5c1-.4 2.1.1 2.5 1 .5 1 0 2.1-1 2.5m1.3 4.8c-1 .4-2.1-.1-2.5-1-.4-1 .1-2.1 1-2.5 1-.4 2.1.1 2.5 1 .4 1 0 2.1-1 2.5m-10.4-5.8c-1 .4-2.1-.1-2.5-1s.1-2.1 1-2.5c1-.4 2.1.1 2.5 1s0 2.1-1 2.5m-5.3-4.9 2.4 1.3V6.5l-2.4.8c-.1-.1-.1-.2-.2-.2s1-3 1-3h-3.4l1 3c-.1.1-.2.1-.2.2-.1.1-2.4-.7-2.4-.7v3.5L17 8.8c-.1.1 0 .2.1.3l-1.4 4.2c-.1.2-.1.4-.1.7 0 1.1.8 2.1 1.9 2.2h.6C19.2 16 20 15.1 20 14c0-.2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.4 2.7v.1zM92.9 28 87 7h4.7l4 15.7h.1l4-15.7h4.7l-5.9 21h-5.7zm28.8-3.6c.6 0 1.2-.1 1.7-.3.5-.2 1-.4 1.4-.8.4-.4.7-.8.9-1.4.2-.6.3-1.2.3-2v-13h4.1v13.6c0 1.2-.2 2.2-.6 3.1s-1 1.7-1.8 2.4c-.7.7-1.6 1.2-2.7 1.5-1 .4-2.2.5-3.4.5-1.2 0-2.4-.2-3.4-.5-1-.4-1.9-.9-2.7-1.5-.8-.7-1.3-1.5-1.8-2.4-.4-.9-.6-2-.6-3.1V6.9h4.2v13c0 .8.1 1.4.3 2 .2.6.5 1 .9 1.4.4.4.8.6 1.4.8.6.2 1.1.3 1.8.3zm13-17.4h4.2v9.1l7.4-9.1h5.2l-7.2 8.4L152 28h-4.9l-5.5-9.4-2.7 3V28h-4.2V7zm-27.6 16.1c-1.5 0-2.7 1.2-2.7 2.7s1.2 2.7 2.7 2.7 2.7-1.2 2.7-2.7-1.2-2.7-2.7-2.7z"></path>
20
+ </svg>
21
+ <% end %>
26
22
  <% if product_name.present? %>
27
23
  <%= product_name %>
28
24
  <% end %>
@@ -3,10 +3,7 @@ class GovukComponent::HeaderComponent < GovukComponent::Base
3
3
  renders_one :custom_logo
4
4
  renders_one :product_name, "ProductName"
5
5
 
6
- attr_reader :logotype,
7
- :crown,
8
- :crown_fallback_image_path,
9
- :homepage_url,
6
+ attr_reader :homepage_url,
10
7
  :service_name,
11
8
  :service_url,
12
9
  :menu_button_label,
@@ -16,9 +13,6 @@ class GovukComponent::HeaderComponent < GovukComponent::Base
16
13
 
17
14
  def initialize(classes: [],
18
15
  html_attributes: {},
19
- logotype: config.default_header_logotype,
20
- crown: true,
21
- crown_fallback_image_path: nil,
22
16
  homepage_url: config.default_header_homepage_url,
23
17
  menu_button_label: config.default_header_menu_button_label,
24
18
  navigation_classes: [],
@@ -27,9 +21,6 @@ class GovukComponent::HeaderComponent < GovukComponent::Base
27
21
  service_url: config.default_header_service_url,
28
22
  container_classes: nil)
29
23
 
30
- @logotype = logotype
31
- @crown = crown
32
- @crown_fallback_image_path = crown_fallback_image_path
33
24
  @homepage_url = homepage_url
34
25
  @service_name = service_name
35
26
  @service_url = service_url
@@ -57,14 +48,6 @@ private
57
48
  { class: ["#{brand}-header__container", "#{brand}-width-container"].append(custom_container_classes).compact }
58
49
  end
59
50
 
60
- def crown_fallback_image_attributes
61
- {
62
- class: "#{brand}-header__logotype-crown-fallback-image",
63
- width: "36",
64
- height: "32",
65
- }
66
- end
67
-
68
51
  class NavigationItem < GovukComponent::Base
69
52
  attr_reader :text, :href, :options, :active
70
53
 
@@ -27,7 +27,7 @@ class GovukComponent::SummaryListComponent::ActionComponent < GovukComponent::Ba
27
27
  private
28
28
 
29
29
  def default_attributes
30
- link_classes = govuk_link_classes.append(classes).flatten
30
+ link_classes = safe_join([govuk_link_classes, classes], " ")
31
31
 
32
32
  { class: link_classes }
33
33
  end
@@ -1,7 +1,7 @@
1
1
  class GovukComponent::TagComponent < GovukComponent::Base
2
2
  attr_reader :text, :colour
3
3
 
4
- COLOURS = %w(grey green turquoise blue red purple pink orange yellow).freeze
4
+ COLOURS = %w(grey green turquoise blue light-blue red purple pink orange yellow).freeze
5
5
 
6
6
  def initialize(text: nil, colour: config.default_tag_colour, classes: [], html_attributes: {})
7
7
  @text = text
@@ -0,0 +1,77 @@
1
+ module GovukComponent
2
+ class TaskListComponent::ItemComponent < GovukComponent::Base
3
+ renders_one :status, ->(text: nil, classes: [], html_attributes: {}, &block) do
4
+ GovukComponent::TaskListComponent::StatusComponent.new(
5
+ id_prefix: @id_prefix,
6
+ count: @count,
7
+ text: text,
8
+ classes: classes,
9
+ html_attributes: html_attributes,
10
+ &block
11
+ )
12
+ end
13
+
14
+ renders_one :title, ->(text: nil, href: nil, hint: nil, classes: [], html_attributes: {}, &block) do
15
+ GovukComponent::TaskListComponent::TitleComponent.new(
16
+ id_prefix: @id_prefix,
17
+ count: @count,
18
+ text: text,
19
+ href: href,
20
+ hint: hint,
21
+ classes: classes,
22
+ html_attributes: html_attributes,
23
+ &block
24
+ )
25
+ end
26
+
27
+ attr_reader :raw_title, :hint, :href, :raw_status
28
+ attr_writer :count
29
+
30
+ def initialize(title: nil, href: nil, hint: nil, count: nil, id_prefix: nil, status: {}, classes: [], html_attributes: {})
31
+ @raw_title = title
32
+ @href = href
33
+ @hint = hint
34
+ @raw_status = status
35
+ @id_prefix = id_prefix
36
+ @count = count
37
+
38
+ super(classes: classes, html_attributes: html_attributes)
39
+ end
40
+
41
+ def call
42
+ adjusted_html_attributes = if href.present? || title&.href.present?
43
+ html_attributes_with_link_class
44
+ else
45
+ html_attributes
46
+ end
47
+
48
+ tag.li(safe_join([title_content, status_content].compact), **adjusted_html_attributes)
49
+ end
50
+
51
+ private
52
+
53
+ def title_content
54
+ title || with_title(**title_attributes)
55
+ end
56
+
57
+ def status_content
58
+ status || with_status(**status_attributes)
59
+ end
60
+
61
+ def default_attributes
62
+ { class: 'govuk-task-list__item' }
63
+ end
64
+
65
+ def title_attributes
66
+ { text: raw_title, href: href, hint: hint }
67
+ end
68
+
69
+ def html_attributes_with_link_class
70
+ html_attributes.tap { |h| h[:class].append("govuk-task-list__item--with-link") }
71
+ end
72
+
73
+ def status_attributes
74
+ raw_status.is_a?(String) ? { text: raw_status } : raw_status
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,31 @@
1
+ module GovukComponent
2
+ class TaskListComponent::StatusComponent < GovukComponent::Base
3
+ attr_reader :id_prefix, :text, :count
4
+
5
+ def initialize(text: nil, id_prefix: nil, count: nil, classes: [], html_attributes: {})
6
+ @text = text
7
+ @count = count
8
+ @id_prefix = id_prefix
9
+
10
+ super(classes: classes, html_attributes: html_attributes)
11
+ end
12
+
13
+ def call
14
+ tag.div(status_text, **html_attributes)
15
+ end
16
+
17
+ def render?
18
+ status_text.present?
19
+ end
20
+
21
+ private
22
+
23
+ def default_attributes
24
+ { class: %w(govuk-task-list__status), id: [id_prefix, count, "status"].compact.join("-") }
25
+ end
26
+
27
+ def status_text
28
+ text || content
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,53 @@
1
+ module GovukComponent
2
+ class TaskListComponent::TitleComponent < GovukComponent::Base
3
+ using HTMLAttributesUtils
4
+
5
+ attr_reader :id_prefix, :text, :href, :hint, :count
6
+
7
+ def initialize(text: nil, href: nil, hint: nil, id_prefix: nil, count: nil, classes: [], html_attributes: {})
8
+ @text = text
9
+ @href = href
10
+ @hint = hint
11
+ @id_prefix = id_prefix
12
+ @count = count
13
+
14
+ super(classes: classes, html_attributes: html_attributes)
15
+ end
16
+
17
+ def call
18
+ tag.div(**html_attributes) { safe_join([title_content, hint_content]) }
19
+ end
20
+
21
+ private
22
+
23
+ def title_content
24
+ (href.present?) ? govuk_link_to(text, href, **link_attributes) : text
25
+ end
26
+
27
+ def hint_content
28
+ return if hint.blank?
29
+
30
+ tag.div(hint, class: "govuk-task-list__hint", id: hint_id)
31
+ end
32
+
33
+ def default_attributes
34
+ { class: "govuk-task-list__name-and-hint" }
35
+ end
36
+
37
+ def link_attributes
38
+ { class: "govuk-task-list__link", **aria_described_by_attributes }
39
+ end
40
+
41
+ def aria_described_by_attributes
42
+ { aria: { describedby: [*status_id, *hint_id] } }
43
+ end
44
+
45
+ def hint_id
46
+ [id_prefix, count, "hint"].compact.join("-") if hint.present?
47
+ end
48
+
49
+ def status_id
50
+ [id_prefix, count, "status"].compact.join("-")
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,37 @@
1
+ module GovukComponent
2
+ class TaskListComponent < GovukComponent::Base
3
+ renders_many :items, ->(title: nil, href: nil, hint: nil, status: {}, classes: [], html_attributes: {}) do
4
+ GovukComponent::TaskListComponent::ItemComponent.new(
5
+ title: title,
6
+ href: href,
7
+ hint: hint,
8
+ id_prefix: @id_prefix,
9
+ count: @count,
10
+ status: status,
11
+ classes: classes,
12
+ html_attributes: html_attributes
13
+ )
14
+ end
15
+
16
+ def initialize(id_prefix: "task-list", classes: [], html_attributes: {})
17
+ @id_prefix = id_prefix
18
+ @count = 0
19
+
20
+ super(classes: classes, html_attributes: html_attributes)
21
+ end
22
+
23
+ def call
24
+ numbered_items = items.each.with_index(1) { |item, count| item.count = count }
25
+
26
+ tag.ul(**html_attributes) do
27
+ safe_join(numbered_items)
28
+ end
29
+ end
30
+
31
+ private
32
+
33
+ def default_attributes
34
+ { class: 'govuk-task-list' }
35
+ end
36
+ end
37
+ end
@@ -23,12 +23,12 @@ private
23
23
 
24
24
  def warning_text
25
25
  tag.strong(class: "#{brand}-warning-text__text") do
26
- safe_join([assistive, (content || text)])
26
+ safe_join([visually_hidden_text, (content || text)])
27
27
  end
28
28
  end
29
29
 
30
- def assistive
31
- tag.span(icon_fallback_text, class: "#{brand}-warning-text__assistive")
30
+ def visually_hidden_text
31
+ tag.span(icon_fallback_text, class: "#{brand}-visually-hidden")
32
32
  end
33
33
 
34
34
  def default_attributes
@@ -20,6 +20,7 @@ module GovukComponentsHelper
20
20
  govuk_table: 'GovukComponent::TableComponent',
21
21
  govuk_tabs: 'GovukComponent::TabComponent',
22
22
  govuk_tag: 'GovukComponent::TagComponent',
23
+ govuk_task_list: 'GovukComponent::TaskListComponent',
23
24
  govuk_warning_text: 'GovukComponent::WarningTextComponent',
24
25
  }.each do |name, klass|
25
26
  define_method(name) do |*args, **kwargs, &block|
@@ -3,156 +3,132 @@ require "html_attributes_utils"
3
3
  module GovukLinkHelper
4
4
  using HTMLAttributesUtils
5
5
 
6
- def govuk_link_classes(*styles, default_class: "#{brand}-link")
7
- if (invalid_styles = (styles - link_styles.keys)) && invalid_styles.any?
8
- fail(ArgumentError, "invalid styles #{invalid_styles.to_sentence}. Valid styles are #{link_styles.keys.to_sentence}")
9
- end
6
+ def govuk_link_to(name, href = nil, new_tab: false, inverse: false, muted: false, no_underline: false, no_visited_state: false, text_colour: false, visually_hidden_prefix: nil, visually_hidden_suffix: nil, **kwargs, &block)
7
+ link_args = extract_link_args(new_tab: new_tab, inverse: inverse, muted: muted, no_underline: no_underline, no_visited_state: no_visited_state, text_colour: text_colour, **kwargs)
8
+ link_text = build_text(name, visually_hidden_prefix: visually_hidden_prefix, visually_hidden_suffix: visually_hidden_suffix, &block)
10
9
 
11
- [default_class] + link_styles.values_at(*styles).compact
10
+ link_to(link_text, href, **link_args)
12
11
  end
13
12
 
14
- def govuk_button_classes(*styles, default_class: "#{brand}-button")
15
- if (invalid_styles = (styles - button_styles.keys)) && invalid_styles.any?
16
- fail(ArgumentError, "invalid styles #{invalid_styles.to_sentence}. Valid styles are #{button_styles.keys.to_sentence}")
17
- end
13
+ def govuk_mail_to(email_address, name = nil, new_tab: false, inverse: false, muted: false, no_underline: false, no_visited_state: false, text_colour: false, visually_hidden_prefix: nil, visually_hidden_suffix: nil, **kwargs, &block)
14
+ link_args = extract_link_args(new_tab: new_tab, inverse: inverse, muted: muted, no_underline: no_underline, no_visited_state: no_visited_state, text_colour: text_colour, **kwargs)
15
+ link_text = build_text(name, visually_hidden_prefix: visually_hidden_prefix, visually_hidden_suffix: visually_hidden_suffix, &block)
18
16
 
19
- [default_class] + button_styles.values_at(*styles).compact
17
+ mail_to(email_address, link_text, **link_args)
20
18
  end
21
19
 
22
- def govuk_link_to(name = nil, options = nil, extra_options = {}, &block)
23
- extra_options = options if block_given?
24
- html_options = build_html_options(extra_options)
20
+ def govuk_button_to(name, href = nil, disabled: false, inverse: false, secondary: false, warning: false, visually_hidden_prefix: nil, visually_hidden_suffix: nil, **kwargs, &block)
21
+ button_args = extract_button_args(new_tab: false, disabled: disabled, inverse: inverse, secondary: secondary, warning: warning, **kwargs)
22
+ button_text = build_text(name, visually_hidden_prefix: visually_hidden_prefix, visually_hidden_suffix: visually_hidden_suffix, &block)
25
23
 
26
- if block_given?
27
- link_to(name, html_options, &block)
28
- else
29
- link_to(name, options, html_options)
30
- end
24
+ button_to(button_text, href, **button_args)
31
25
  end
32
26
 
33
- def govuk_mail_to(email_address, name = nil, extra_options = {}, &block)
34
- extra_options = name if block_given?
35
- html_options = build_html_options(extra_options)
27
+ def govuk_button_link_to(name, href = nil, new_tab: false, disabled: false, inverse: false, secondary: false, warning: false, visually_hidden_prefix: nil, visually_hidden_suffix: nil, **kwargs, &block)
28
+ button_args = extract_button_link_args(new_tab: new_tab, disabled: disabled, inverse: inverse, secondary: secondary, warning: warning, **kwargs)
29
+ button_text = build_text(name, visually_hidden_prefix: visually_hidden_prefix, visually_hidden_suffix: visually_hidden_suffix, &block)
36
30
 
37
- if block_given?
38
- mail_to(email_address, html_options, &block)
39
- else
40
- mail_to(email_address, name, html_options)
41
- end
31
+ link_to(button_text, href, **button_args)
42
32
  end
43
33
 
44
- def govuk_button_to(name = nil, options = nil, extra_options = {}, &block)
45
- extra_options = options if block_given?
46
- html_options = {
47
- data: { module: "govuk-button" }
48
- }
49
-
50
- if extra_options && extra_options[:prevent_double_click]
51
- html_options[:data]["prevent-double-click"] = "true"
52
- extra_options = extra_options.except(:prevent_double_click)
53
- end
54
-
55
- html_options.merge! build_html_options(extra_options, style: :button)
34
+ def govuk_breadcrumb_link_to(name, href = nil, **kwargs, &block)
35
+ link_args = { class: "#{brand}-breadcrumbs--link" }.deep_merge_html_attributes(kwargs)
56
36
 
57
37
  if block_given?
58
- button_to(options, html_options, &block)
38
+ link_to(block.call, href, **link_args)
59
39
  else
60
- button_to(name, options, html_options)
40
+ link_to(name, href, **link_args)
61
41
  end
62
42
  end
63
43
 
64
- def govuk_button_link_to(name = nil, options = nil, extra_options = {}, &block)
65
- extra_options = options if block_given?
66
- html_options = {
67
- data: { module: "#{brand}-button" },
68
- draggable: 'false',
69
- role: 'button',
70
- }.merge build_html_options(extra_options, style: :button)
71
-
72
- if block_given?
73
- link_to(name, html_options, &block)
74
- else
75
- link_to(name, options, html_options)
44
+ def govuk_link_classes(inverse: false, muted: false, no_underline: false, no_visited_state: false, text_colour: false)
45
+ if [text_colour, inverse, muted].count(true) > 1
46
+ fail("links can be only be one of text_colour, inverse or muted")
76
47
  end
77
- end
78
48
 
79
- def govuk_breadcrumb_link_to(name = nil, options = nil, extra_options = {}, &block)
80
- extra_options = options if block_given?
81
- html_options = build_html_options(extra_options, style: :breadcrumb)
49
+ class_names(
50
+ "#{brand}-link",
51
+ "#{brand}-link--inverse" => inverse,
52
+ "#{brand}-link--muted" => muted,
53
+ "#{brand}-link--no-underline" => no_underline,
54
+ "#{brand}-link--no-visited-state" => no_visited_state,
55
+ "#{brand}-link--text-colour" => text_colour,
56
+ )
57
+ end
82
58
 
83
- if block_given?
84
- link_to(name, html_options, &block)
85
- else
86
- link_to(name, options, html_options)
59
+ def govuk_button_classes(inverse: false, secondary: false, warning: false)
60
+ if [inverse, secondary, warning].count(true) > 1
61
+ fail("buttons can only be one of inverse, secondary or warning")
87
62
  end
63
+
64
+ class_names(
65
+ "#{brand}-button",
66
+ "#{brand}-button--inverse" => inverse,
67
+ "#{brand}-button--secondary" => secondary,
68
+ "#{brand}-button--warning" => warning,
69
+ )
88
70
  end
89
71
 
90
72
  private
91
73
 
92
- def brand
93
- Govuk::Components.brand
94
- end
95
-
96
- def link_styles
97
- {
98
- inverse: "#{brand}-link--inverse",
99
- muted: "#{brand}-link--muted",
100
- no_underline: "#{brand}-link--no-underline",
101
- no_visited_state: "#{brand}-link--no-visited-state",
102
- text_colour: "#{brand}-link--text-colour",
103
- }
74
+ def new_tab_args(new_tab)
75
+ new_tab ? { target: "_blank", rel: "noreferrer noopener" } : {}
104
76
  end
105
77
 
106
- def button_styles
107
- {
108
- disabled: "#{brand}-button--disabled",
109
- secondary: "#{brand}-button--secondary",
110
- warning: "#{brand}-button--warning",
111
- inverse: "#{brand}-button--inverse",
112
- }
78
+ def button_attributes(disabled)
79
+ disabled ? { disabled: true, aria: { disabled: true } } : {}
113
80
  end
114
81
 
115
- def build_html_options(provided_options, style: :link)
116
- element_styles = { link: link_styles, button: button_styles }.fetch(style, {})
82
+ def extract_link_args(new_tab: false, inverse: false, muted: false, no_underline: false, no_visited_state: false, text_colour: false, **kwargs)
83
+ link_classes = extract_link_classes(inverse: inverse, muted: muted, no_underline: no_underline, no_visited_state: no_visited_state, text_colour: text_colour)
117
84
 
118
- # we need to take a couple of extra steps here because we don't want the style
119
- # params (inverse, muted, etc) to end up as extra attributes on the link.
120
-
121
- remaining_options = remove_styles_from_provided_options(element_styles, provided_options)
85
+ { **link_classes, **new_tab_args(new_tab) }.deep_merge_html_attributes(kwargs)
86
+ end
122
87
 
123
- style_classes = build_style_classes(style, extract_styles_from_provided_options(element_styles, provided_options))
88
+ def extract_button_link_args(new_tab: false, disabled: false, inverse: false, secondary: false, warning: false, **kwargs)
89
+ button_classes = extract_button_classes(inverse: inverse, secondary: secondary, warning: warning)
124
90
 
125
- combine_attributes(remaining_options, class_name: style_classes)
91
+ { **button_classes, **button_attributes(disabled), **new_tab_args(new_tab) }.deep_merge_html_attributes(kwargs)
126
92
  end
127
93
 
128
- def build_style_classes(style, provided_options)
129
- keys = *provided_options&.keys
94
+ def extract_button_args(disabled: false, inverse: false, secondary: false, warning: false, **kwargs)
95
+ button_classes = extract_button_classes(inverse: inverse, secondary: secondary, warning: warning)
130
96
 
131
- case style
132
- when :link then govuk_link_classes(*keys)
133
- when :button then govuk_button_classes(*keys)
134
- when :breadcrumb then "#{brand}-breadcrumbs__link"
135
- end
97
+ { **button_classes, **button_attributes(disabled) }.deep_merge_html_attributes(kwargs)
136
98
  end
137
99
 
138
- def combine_attributes(attributes, class_name:)
139
- attributes ||= {}
140
-
141
- attributes.with_indifferent_access.tap do |attrs|
142
- attrs[:class] = Array.wrap(attrs[:class]).prepend(class_name).flatten.join(" ")
143
- end
100
+ def extract_link_classes(inverse: false, muted: false, no_underline: false, no_visited_state: false, text_colour: false)
101
+ {
102
+ class: govuk_link_classes(
103
+ inverse: inverse,
104
+ muted: muted,
105
+ no_underline: no_underline,
106
+ no_visited_state: no_visited_state,
107
+ text_colour: text_colour,
108
+ )
109
+ }
144
110
  end
145
111
 
146
- def extract_styles_from_provided_options(styles, provided_options)
147
- return {} if provided_options.blank?
112
+ def extract_button_classes(inverse: false, secondary: false, warning: false)
113
+ {
114
+ class: govuk_button_classes(
115
+ inverse: inverse,
116
+ secondary: secondary,
117
+ warning: warning
118
+ )
119
+ }
120
+ end
148
121
 
149
- provided_options.slice(*styles.keys)
122
+ def brand
123
+ Govuk::Components.brand
150
124
  end
151
125
 
152
- def remove_styles_from_provided_options(styles, provided_options)
153
- return {} if provided_options.blank?
126
+ def build_text(original, visually_hidden_prefix:, visually_hidden_suffix:, &block)
127
+ prefix = (visually_hidden_prefix.present?) ? visually_hidden_prefix + " " : nil
128
+ text = (block_given?) ? block.call : original
129
+ suffix = (visually_hidden_suffix.present?) ? " " + visually_hidden_suffix : nil
154
130
 
155
- provided_options&.except(*styles.keys)
131
+ safe_join([govuk_visually_hidden(prefix), text, govuk_visually_hidden(suffix)].compact)
156
132
  end
157
133
  end
158
134
 
@@ -0,0 +1,156 @@
1
+ require "html_attributes_utils"
2
+
3
+ module GovukRailsCompatibileLinkHelper
4
+ using HTMLAttributesUtils
5
+
6
+ def govuk_link_classes(*styles, default_class: "#{brand}-link")
7
+ if (invalid_styles = (styles - link_styles.keys)) && invalid_styles.any?
8
+ fail(ArgumentError, "invalid styles #{invalid_styles.to_sentence}. Valid styles are #{link_styles.keys.to_sentence}")
9
+ end
10
+
11
+ [default_class] + link_styles.values_at(*styles).compact
12
+ end
13
+
14
+ def govuk_button_classes(*styles, default_class: "#{brand}-button")
15
+ if (invalid_styles = (styles - button_styles.keys)) && invalid_styles.any?
16
+ fail(ArgumentError, "invalid styles #{invalid_styles.to_sentence}. Valid styles are #{button_styles.keys.to_sentence}")
17
+ end
18
+
19
+ [default_class] + button_styles.values_at(*styles).compact
20
+ end
21
+
22
+ def govuk_link_to(name = nil, options = nil, extra_options = {}, &block)
23
+ extra_options = options if block_given?
24
+ html_options = build_html_options(extra_options)
25
+
26
+ if block_given?
27
+ link_to(name, html_options, &block)
28
+ else
29
+ link_to(name, options, html_options)
30
+ end
31
+ end
32
+
33
+ def govuk_mail_to(email_address, name = nil, extra_options = {}, &block)
34
+ extra_options = name if block_given?
35
+ html_options = build_html_options(extra_options)
36
+
37
+ if block_given?
38
+ mail_to(email_address, html_options, &block)
39
+ else
40
+ mail_to(email_address, name, html_options)
41
+ end
42
+ end
43
+
44
+ def govuk_button_to(name = nil, options = nil, extra_options = {}, &block)
45
+ extra_options = options if block_given?
46
+ html_options = {
47
+ data: { module: "govuk-button" }
48
+ }
49
+
50
+ if extra_options && extra_options[:prevent_double_click]
51
+ html_options[:data]["prevent-double-click"] = "true"
52
+ extra_options = extra_options.except(:prevent_double_click)
53
+ end
54
+
55
+ html_options.merge! build_html_options(extra_options, style: :button)
56
+
57
+ if block_given?
58
+ button_to(options, html_options, &block)
59
+ else
60
+ button_to(name, options, html_options)
61
+ end
62
+ end
63
+
64
+ def govuk_button_link_to(name = nil, options = nil, extra_options = {}, &block)
65
+ extra_options = options if block_given?
66
+ html_options = {
67
+ data: { module: "#{brand}-button" },
68
+ draggable: 'false',
69
+ role: 'button',
70
+ }.merge build_html_options(extra_options, style: :button)
71
+
72
+ if block_given?
73
+ link_to(name, html_options, &block)
74
+ else
75
+ link_to(name, options, html_options)
76
+ end
77
+ end
78
+
79
+ def govuk_breadcrumb_link_to(name = nil, options = nil, extra_options = {}, &block)
80
+ extra_options = options if block_given?
81
+ html_options = build_html_options(extra_options, style: :breadcrumb)
82
+
83
+ if block_given?
84
+ link_to(name, html_options, &block)
85
+ else
86
+ link_to(name, options, html_options)
87
+ end
88
+ end
89
+
90
+ private
91
+
92
+ def brand
93
+ Govuk::Components.brand
94
+ end
95
+
96
+ def link_styles
97
+ {
98
+ inverse: "#{brand}-link--inverse",
99
+ muted: "#{brand}-link--muted",
100
+ no_underline: "#{brand}-link--no-underline",
101
+ no_visited_state: "#{brand}-link--no-visited-state",
102
+ text_colour: "#{brand}-link--text-colour",
103
+ }
104
+ end
105
+
106
+ def button_styles
107
+ {
108
+ secondary: "#{brand}-button--secondary",
109
+ warning: "#{brand}-button--warning",
110
+ inverse: "#{brand}-button--inverse",
111
+ }
112
+ end
113
+
114
+ def build_html_options(provided_options, style: :link)
115
+ element_styles = { link: link_styles, button: button_styles }.fetch(style, {})
116
+
117
+ # we need to take a couple of extra steps here because we don't want the style
118
+ # params (inverse, muted, etc) to end up as extra attributes on the link.
119
+
120
+ remaining_options = remove_styles_from_provided_options(element_styles, provided_options)
121
+
122
+ style_classes = build_style_classes(style, extract_styles_from_provided_options(element_styles, provided_options))
123
+
124
+ combine_attributes(remaining_options, class_name: style_classes)
125
+ end
126
+
127
+ def build_style_classes(style, provided_options)
128
+ keys = *provided_options&.keys
129
+
130
+ case style
131
+ when :link then govuk_link_classes(*keys)
132
+ when :button then govuk_button_classes(*keys)
133
+ when :breadcrumb then "#{brand}-breadcrumbs__link"
134
+ end
135
+ end
136
+
137
+ def combine_attributes(attributes, class_name:)
138
+ attributes ||= {}
139
+
140
+ attributes.with_indifferent_access.tap do |attrs|
141
+ attrs[:class] = Array.wrap(attrs[:class]).prepend(class_name).flatten.join(" ")
142
+ end
143
+ end
144
+
145
+ def extract_styles_from_provided_options(styles, provided_options)
146
+ return {} if provided_options.blank?
147
+
148
+ provided_options.slice(*styles.keys)
149
+ end
150
+
151
+ def remove_styles_from_provided_options(styles, provided_options)
152
+ return {} if provided_options.blank?
153
+
154
+ provided_options&.except(*styles.keys)
155
+ end
156
+ end
@@ -0,0 +1,9 @@
1
+ module GovukVisuallyHiddenHelper
2
+ def govuk_visually_hidden(text = nil, &block)
3
+ return if text.blank? && block.nil?
4
+
5
+ tag.span(text, class: "govuk-visually-hidden", &block)
6
+ end
7
+ end
8
+
9
+ ActiveSupport.on_load(:action_view) { include GovukVisuallyHiddenHelper }
@@ -47,14 +47,13 @@ module Govuk
47
47
  # +:default_exit_this_page_press_one_more_time_text+ Text announced by screen readers when the user must press *Shift* one more time to activate the button. Default in govuk-frontend is 'Shift, press 1 more time to exit.' Defaults to nil so govuk-frontend value is used unless overridden.
48
48
  # +:default_header_navigation_label+ 'Navigation menu'
49
49
  # +:default_header_menu_button_label+ 'Show or hide navigation menu'
50
- # +:default_header_logotype+ 'GOV.UK'
51
50
  # +:default_header_homepage_url+ '/'
52
51
  # +:default_header_service_name+ nil
53
52
  # +:default_header_service_url+ '/'
54
53
  # +:default_footer_meta_text+ nil
55
54
  # +:default_footer_copyright_text+ '© Crown copyright'
56
55
  # +:default_footer_copyright_url+ "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/"
57
- # +:default_pagination_landmark_label+ "results"
56
+ # +:default_pagination_landmark_label+ "Pagination"
58
57
  # +:default_pagination_next_text+ Default 'next' text for pagination. An +Array+ where the first item is visible and the second visually hidden. Defaults to ["Next", "page"]
59
58
  # +:default_pagination_previous_text+ Default 'previous' text for pagination. An +Array+ where the first item is visible and the second visually hidden. Defaults to ["Previous", "page"]
60
59
  # +:default_phase_banner_tag+ nil
@@ -89,14 +88,13 @@ module Govuk
89
88
  default_exit_this_page_press_one_more_time_text: nil,
90
89
  default_header_navigation_label: 'Menu',
91
90
  default_header_menu_button_label: 'Show or hide menu',
92
- default_header_logotype: 'GOV.UK',
93
91
  default_header_homepage_url: '/',
94
92
  default_header_service_name: nil,
95
93
  default_header_service_url: '/',
96
94
  default_footer_meta_text: nil,
97
95
  default_footer_copyright_text: '© Crown copyright',
98
96
  default_footer_copyright_url: "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/",
99
- default_pagination_landmark_label: "results",
97
+ default_pagination_landmark_label: "Pagination",
100
98
  default_pagination_next_text: %w(Next page),
101
99
  default_pagination_previous_text: %w(Previous page),
102
100
  default_phase_banner_tag: nil,
@@ -1,5 +1,5 @@
1
1
  module Govuk
2
2
  module Components
3
- VERSION = '4.1.2'.freeze
3
+ VERSION = '5.0.0b2'.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: 4.1.2
4
+ version: 5.0.0b2
5
5
  platform: ruby
6
6
  authors:
7
7
  - DfE developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-16 00:00:00.000000000 Z
11
+ date: 2023-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: html-attributes-utils
@@ -53,7 +53,7 @@ dependencies:
53
53
  version: '3.3'
54
54
  - - "<"
55
55
  - !ruby/object:Gem::Version
56
- version: '3.7'
56
+ version: '3.8'
57
57
  type: :runtime
58
58
  prerelease: false
59
59
  version_requirements: !ruby/object:Gem::Requirement
@@ -63,7 +63,7 @@ dependencies:
63
63
  version: '3.3'
64
64
  - - "<"
65
65
  - !ruby/object:Gem::Version
66
- version: '3.7'
66
+ version: '3.8'
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: deep_merge
69
69
  requirement: !ruby/object:Gem::Requirement
@@ -374,6 +374,10 @@ files:
374
374
  - app/components/govuk_component/table_component/head_component.rb
375
375
  - app/components/govuk_component/table_component/row_component.rb
376
376
  - app/components/govuk_component/tag_component.rb
377
+ - app/components/govuk_component/task_list_component.rb
378
+ - app/components/govuk_component/task_list_component/item_component.rb
379
+ - app/components/govuk_component/task_list_component/status_component.rb
380
+ - app/components/govuk_component/task_list_component/title_component.rb
377
381
  - app/components/govuk_component/traits.rb
378
382
  - app/components/govuk_component/traits/custom_html_attributes.rb
379
383
  - app/components/govuk_component/warning_text_component.rb
@@ -381,7 +385,9 @@ files:
381
385
  - app/helpers/govuk_components_helper.rb
382
386
  - app/helpers/govuk_exit_this_page_link_helper.rb
383
387
  - app/helpers/govuk_link_helper.rb
388
+ - app/helpers/govuk_rails_compatibile_link_helper.rb
384
389
  - app/helpers/govuk_skip_link_helper.rb
390
+ - app/helpers/govuk_visually_hidden_helper.rb
385
391
  - app/helpers/title_with_error_prefix_helper.rb
386
392
  - config/routes.rb
387
393
  - lib/govuk/components.rb
@@ -404,9 +410,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
404
410
  version: '0'
405
411
  required_rubygems_version: !ruby/object:Gem::Requirement
406
412
  requirements:
407
- - - ">="
413
+ - - ">"
408
414
  - !ruby/object:Gem::Version
409
- version: '0'
415
+ version: 1.3.1
410
416
  requirements: []
411
417
  rubygems_version: 3.2.33
412
418
  signing_key: