govuk_publishing_components 21.55.4 → 21.57.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/components/print-link.js +14 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/component_support.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +11 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +4 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +9 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_print-link.scss +52 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_summary-list.scss +18 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_link.scss +17 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak.scss +5 -1
- data/app/views/govuk_publishing_components/components/_action_link.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb +11 -7
- data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +3 -1
- data/app/views/govuk_publishing_components/components/_input.html.erb +3 -4
- data/app/views/govuk_publishing_components/components/_print_link.html.erb +27 -0
- data/app/views/govuk_publishing_components/components/_summary_list.html.erb +34 -14
- data/app/views/govuk_publishing_components/components/docs/action_link.yml +5 -0
- data/app/views/govuk_publishing_components/components/docs/input.yml +9 -1
- data/app/views/govuk_publishing_components/components/docs/print_link.yml +24 -0
- data/app/views/govuk_publishing_components/components/docs/summary_list.yml +27 -0
- data/config/locales/en.yml +5 -0
- data/lib/govuk_publishing_components.rb +2 -1
- data/lib/govuk_publishing_components/presenters/breadcrumb_selector.rb +50 -42
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_ancestors.rb +41 -0
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_priority.rb +1 -0
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_taxons.rb +4 -0
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_topic.rb +38 -0
- data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +15 -4
- data/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb +3 -1
- data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +18 -17
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/CHANGELOG.md +11 -0
- data/node_modules/axe-core/axe.js +36 -9
- data/node_modules/axe-core/axe.min.js +2 -2
- data/node_modules/axe-core/bower.json +1 -1
- data/node_modules/axe-core/lib/checks/color/color-contrast.js +2 -2
- data/node_modules/axe-core/lib/checks/lists/listitem.js +1 -1
- data/node_modules/axe-core/lib/checks/mobile/meta-viewport-scale.js +3 -0
- data/node_modules/axe-core/lib/commons/dom/is-visible.js +37 -19
- data/node_modules/axe-core/lib/core/public/configure.js +26 -0
- data/node_modules/axe-core/lib/rules/aria-input-field-name.json +1 -1
- data/node_modules/axe-core/package.json +12 -12
- data/node_modules/axe-core/sri-history.json +4 -0
- metadata +9 -3
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_parent.rb +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5de5c1f4596f4f0f7eae60d3c76ad22f0ed61ce04619e72a7c9074ba3a31320c
|
4
|
+
data.tar.gz: 8feefd4ad704ce099dca964212c995b76aeef60c628458033e1b2611aabfecaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d396d8049e9a935808e3b3468b6a623a7d2d5093433037381278e2b907a664547007a124b34f1e91a5394a3bad076ad45f89fc1ba49a70505ea7b29e21ef9ff3
|
7
|
+
data.tar.gz: 7d4295428f49d6d1e7db3c3f1894aa48ddcb32a39ba5cd95c169ae725cd86869f0257d4ae94da27265e2614ebe949c948f3feb28bd42fa266d2feb8a8e3e50b7
|
@@ -0,0 +1,14 @@
|
|
1
|
+
window.GOVUK = window.GOVUK || {}
|
2
|
+
window.GOVUK.Modules = window.GOVUK.Modules || {};
|
3
|
+
|
4
|
+
(function (Modules) {
|
5
|
+
'use strict'
|
6
|
+
|
7
|
+
Modules.PrintLink = function () {
|
8
|
+
this.start = function (element) {
|
9
|
+
element[0].addEventListener('click', function () {
|
10
|
+
window.print()
|
11
|
+
})
|
12
|
+
}
|
13
|
+
}
|
14
|
+
})(window.GOVUK.Modules)
|
@@ -53,6 +53,7 @@
|
|
53
53
|
@import "components/panel";
|
54
54
|
@import "components/phase-banner";
|
55
55
|
@import "components/previous-and-next-navigation";
|
56
|
+
@import "components/print-link";
|
56
57
|
@import "components/radio";
|
57
58
|
@import "components/related-navigation";
|
58
59
|
@import "components/search";
|
@@ -8,6 +8,7 @@
|
|
8
8
|
|
9
9
|
@import "govuk_publishing_components/components/helpers/variables";
|
10
10
|
@import "govuk_publishing_components/components/helpers/brand-colours";
|
11
|
+
@import "govuk_publishing_components/components/helpers/link";
|
11
12
|
@import "govuk_publishing_components/components/mixins/govuk-template-link-focus-override";
|
12
13
|
@import "govuk_publishing_components/components/mixins/media-down";
|
13
14
|
@import "govuk_publishing_components/components/mixins/margins";
|
@@ -118,6 +118,16 @@
|
|
118
118
|
}
|
119
119
|
|
120
120
|
.gem-c-action-link--dark-icon {
|
121
|
+
&:before {
|
122
|
+
// sass-lint:disable no-duplicate-properties
|
123
|
+
background: image-url("govuk_publishing_components/action-link-arrow--dark.png");
|
124
|
+
background: image-url("govuk_publishing_components/action-link-arrow--dark.svg"), linear-gradient(transparent, transparent);
|
125
|
+
// sass-lint:enable no-duplicate-properties
|
126
|
+
}
|
127
|
+
}
|
128
|
+
|
129
|
+
.gem-c-action-link--dark-icon,
|
130
|
+
.gem-c-action-link--small-icon {
|
121
131
|
max-width: none;
|
122
132
|
|
123
133
|
@include govuk-media-query($until: tablet) {
|
@@ -125,12 +135,8 @@
|
|
125
135
|
}
|
126
136
|
|
127
137
|
&:before {
|
128
|
-
width: 30px;
|
129
138
|
height: 30px;
|
130
|
-
|
131
|
-
background: image-url("govuk_publishing_components/action-link-arrow--dark.png");
|
132
|
-
background: image-url("govuk_publishing_components/action-link-arrow--dark.svg"), linear-gradient(transparent, transparent);
|
133
|
-
// sass-lint:enable no-duplicate-properties
|
139
|
+
width: 35px;
|
134
140
|
background-repeat: no-repeat;
|
135
141
|
background-size: 25px auto;
|
136
142
|
background-position: 0 2px;
|
@@ -12,6 +12,10 @@ $govuk-cookie-banner-background: govuk-colour("light-grey", "grey-4");
|
|
12
12
|
background-color: $govuk-cookie-banner-background;
|
13
13
|
}
|
14
14
|
|
15
|
+
.gem-c-cookie-banner--services {
|
16
|
+
display: none;
|
17
|
+
}
|
18
|
+
|
15
19
|
.gem-c-cookie-banner__message {
|
16
20
|
display: inline-block;
|
17
21
|
padding-bottom: govuk-spacing(2);
|
@@ -10,6 +10,7 @@
|
|
10
10
|
// TODO: remove these styles once static is made less aggressive
|
11
11
|
.gem-c-input.govuk-input {
|
12
12
|
margin: 0;
|
13
|
+
min-width: 0;
|
13
14
|
padding: govuk-spacing(1);
|
14
15
|
|
15
16
|
&.gem-c-input--search-icon {
|
@@ -40,16 +41,19 @@
|
|
40
41
|
box-sizing: border-box;
|
41
42
|
cursor: default; // emphasise non-editable status of prefixes and suffixes
|
42
43
|
display: inline-block;
|
43
|
-
|
44
|
-
width: auto;
|
45
|
-
text-align: center;
|
44
|
+
flex: 0 0 auto;
|
46
45
|
height: 40px;
|
47
|
-
|
46
|
+
margin-top: 0;
|
48
47
|
min-width: 40px;
|
48
|
+
padding: govuk-spacing(1);
|
49
|
+
text-align: center;
|
50
|
+
white-space: nowrap;
|
51
|
+
width: auto;
|
52
|
+
|
49
53
|
@if $govuk-typography-use-rem {
|
54
|
+
height: govuk-px-to-rem(40px);
|
50
55
|
min-width: govuk-px-to-rem(40px);
|
51
56
|
}
|
52
|
-
margin-top: 0;
|
53
57
|
}
|
54
58
|
|
55
59
|
.gem-c-input__prefix {
|
@@ -0,0 +1,52 @@
|
|
1
|
+
.gem-c-print-link {
|
2
|
+
display: none;
|
3
|
+
margin-bottom: 2em;
|
4
|
+
margin-top: 2em;
|
5
|
+
}
|
6
|
+
|
7
|
+
.gem-c-print-link.gem-c-print-link--show-without-js {
|
8
|
+
display: block;
|
9
|
+
}
|
10
|
+
|
11
|
+
.js-enabled {
|
12
|
+
.gem-c-print-link {
|
13
|
+
display: block;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
.gem-c-print-link__link {
|
18
|
+
background: image-url("govuk_publishing_components/icon-print.png") no-repeat 10px 50%;
|
19
|
+
|
20
|
+
margin-left: -10px;
|
21
|
+
padding: .5em .5em .5em 38px;
|
22
|
+
|
23
|
+
@include govuk-device-pixel-ratio($ratio: 2) {
|
24
|
+
background-image: image-url("govuk_publishing_components/icon-print-2x.png");
|
25
|
+
background-size: 16px 18px;
|
26
|
+
}
|
27
|
+
|
28
|
+
&:focus {
|
29
|
+
@include govuk-focused-text;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
.gem-c-print-link__button {
|
34
|
+
@extend %govuk-body-s;
|
35
|
+
background: image-url("govuk_publishing_components/icon-print.png") no-repeat 10px 50%;
|
36
|
+
border: 0;
|
37
|
+
color: $govuk-link-colour;
|
38
|
+
cursor: pointer;
|
39
|
+
margin: 0;
|
40
|
+
margin-left: -10px;
|
41
|
+
padding: .5em .5em .5em 38px;
|
42
|
+
text-decoration: underline;
|
43
|
+
|
44
|
+
@include govuk-device-pixel-ratio($ratio: 2) {
|
45
|
+
background-image: image-url("govuk_publishing_components/icon-print-2x.png");
|
46
|
+
background-size: 16px 18px;
|
47
|
+
}
|
48
|
+
|
49
|
+
&:focus {
|
50
|
+
@include govuk-focused-text;
|
51
|
+
}
|
52
|
+
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
@import "govuk/components/summary-list/summary-list";
|
2
2
|
|
3
3
|
.gem-c-summary-list {
|
4
|
-
position: relative;
|
5
4
|
border-bottom: 1px solid $govuk-border-colour;
|
6
5
|
|
7
6
|
@include govuk-font(19);
|
@@ -14,12 +13,26 @@
|
|
14
13
|
&:nth-last-of-type(1) {
|
15
14
|
border-bottom: 0;
|
16
15
|
}
|
16
|
+
|
17
|
+
.govuk-summary-list {
|
18
|
+
clear: both;
|
19
|
+
}
|
17
20
|
}
|
18
21
|
|
19
|
-
.gem-c-summary-
|
20
|
-
|
21
|
-
|
22
|
-
|
22
|
+
.gem-c-summary-list__group-title {
|
23
|
+
@include govuk-media-query($from: tablet) {
|
24
|
+
display: inline-block;
|
25
|
+
margin-right: govuk-spacing(3);
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
.gem-c-summary-list__group-actions-list {
|
30
|
+
margin-bottom: govuk-spacing(3);
|
31
|
+
|
32
|
+
@include govuk-media-query($from: tablet) {
|
33
|
+
float: right;
|
34
|
+
width: auto;
|
35
|
+
}
|
23
36
|
}
|
24
37
|
|
25
38
|
.gem-c-summary__block {
|
@@ -0,0 +1,17 @@
|
|
1
|
+
.gem-link--destructive {
|
2
|
+
@include govuk-font(19);
|
3
|
+
|
4
|
+
&:link {
|
5
|
+
color: $govuk-error-colour;
|
6
|
+
}
|
7
|
+
|
8
|
+
&:visited,
|
9
|
+
&:hover,
|
10
|
+
&:active {
|
11
|
+
color: darken($govuk-error-colour, 5%);
|
12
|
+
}
|
13
|
+
|
14
|
+
&:focus {
|
15
|
+
color: $govuk-focus-text-colour;
|
16
|
+
}
|
17
|
+
}
|
@@ -11,6 +11,7 @@
|
|
11
11
|
light_text ||= false
|
12
12
|
simple ||= false
|
13
13
|
dark_icon ||= false
|
14
|
+
small_icon ||= false
|
14
15
|
nhs_icon ||= false
|
15
16
|
data ||= nil
|
16
17
|
classes ||= nil
|
@@ -18,6 +19,7 @@
|
|
18
19
|
css_classes = %w(gem-c-action-link)
|
19
20
|
css_classes << "gem-c-action-link--light-text" if light_text
|
20
21
|
css_classes << "gem-c-action-link--dark-icon" if dark_icon
|
22
|
+
css_classes << "gem-c-action-link--small-icon" if small_icon
|
21
23
|
css_classes << "gem-c-action-link--nhs" if nhs_icon
|
22
24
|
css_classes << "gem-c-action-link--simple" if simple
|
23
25
|
css_classes << "gem-c-action-link--with-subtext" if subtext
|
@@ -1,16 +1,20 @@
|
|
1
1
|
<% prioritise_taxon_breadcrumbs ||= false %>
|
2
|
-
<% breadcrumb_selector = GovukPublishingComponents::Presenters::BreadcrumbSelector.
|
2
|
+
<% breadcrumb_selector = GovukPublishingComponents::Presenters::BreadcrumbSelector.new(content_item, request, prioritise_taxon_breadcrumbs) %>
|
3
3
|
<% inverse ||= false %>
|
4
4
|
<% collapse_on_mobile ||= true unless local_assigns[:collapse_on_mobile].eql?(false) %>
|
5
5
|
|
6
|
-
<div class=
|
7
|
-
<% if breadcrumb_selector
|
8
|
-
<%= render 'govuk_publishing_components/components/step_by_step_nav_header',
|
9
|
-
|
10
|
-
<% elsif breadcrumb_selector[:breadcrumbs] %>
|
6
|
+
<div class="gem-c-contextual-breadcrumbs">
|
7
|
+
<% if breadcrumb_selector.step_by_step %>
|
8
|
+
<%= render 'govuk_publishing_components/components/step_by_step_nav_header', breadcrumb_selector.breadcrumbs %>
|
9
|
+
<% elsif breadcrumb_selector.breadcrumbs %>
|
11
10
|
<%= render 'govuk_publishing_components/components/breadcrumbs',
|
12
|
-
breadcrumbs: breadcrumb_selector
|
11
|
+
breadcrumbs: breadcrumb_selector.breadcrumbs,
|
13
12
|
inverse: inverse,
|
14
13
|
collapse_on_mobile: collapse_on_mobile %>
|
15
14
|
<% end %>
|
15
|
+
|
16
|
+
<%= render(
|
17
|
+
'govuk_publishing_components/components/step_by_step_nav_header', breadcrumb_selector.priority_breadcrumbs
|
18
|
+
) if breadcrumb_selector.priority_breadcrumbs
|
19
|
+
%>
|
16
20
|
</div>
|
@@ -5,9 +5,11 @@
|
|
5
5
|
cookie_preferences_href ||= "/help/cookies"
|
6
6
|
confirmation_message ||= raw("You’ve accepted all cookies. You can <a class='govuk-link' href='#{cookie_preferences_href}' data-module='track-click' data-track-category='cookieBanner' data-track-action='Cookie banner settings clicked from confirmation'>change your cookie settings</a> at any time.")
|
7
7
|
services_cookies ||= nil
|
8
|
+
css_classes = %w(gem-c-cookie-banner govuk-clearfix)
|
9
|
+
css_classes << "gem-c-cookie-banner--services" if services_cookies
|
8
10
|
%>
|
9
11
|
|
10
|
-
<div id="<%= id %>" class="
|
12
|
+
<div id="<%= id %>" class="<%= css_classes.join(' ') %>" data-module="cookie-banner" role="region" aria-label="cookie banner" data-nosnippet>
|
11
13
|
<div class="gem-c-cookie-banner__wrapper govuk-width-container">
|
12
14
|
<div class="govuk-grid-row">
|
13
15
|
<div class="govuk-grid-column-two-thirds">
|
@@ -95,15 +95,14 @@
|
|
95
95
|
|
96
96
|
<% if prefix && suffix %>
|
97
97
|
<%= tag.div class: "gem-c-input__wrapper" do %>
|
98
|
-
|
99
|
-
<%= input_tag %>
|
100
|
-
<%= tag.span suffix, class: "gem-c-input__suffix", aria: { hidden: true } %>
|
98
|
+
<% # The line below relies on in-line styling for legacy browsers and it's whitespace-sensitive %>
|
99
|
+
<%= tag.span prefix, class: "gem-c-input__prefix", aria: { hidden: true } %><%= input_tag %><%= tag.span suffix, class: "gem-c-input__suffix", aria: { hidden: true } %>
|
101
100
|
<% end %>
|
102
101
|
<% elsif prefix %>
|
103
102
|
<%= tag.div class: "gem-c-input__wrapper" do %>
|
104
103
|
<%= tag.span prefix, class: "gem-c-input__prefix", aria: { hidden: true } %><%= input_tag %>
|
105
104
|
<% end %>
|
106
|
-
<% elsif suffix %>
|
105
|
+
<% elsif suffix %>
|
107
106
|
<%= tag.div class: "gem-c-input__wrapper" do %>
|
108
107
|
<%= input_tag %><%= tag.span suffix, class: "gem-c-input__suffix", aria: { hidden: true } %>
|
109
108
|
<% end %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<%
|
2
|
+
text ||= t('components.print_link.text')
|
3
|
+
href ||= nil
|
4
|
+
data_attributes ||= {}
|
5
|
+
|
6
|
+
require_js ||= href.nil?
|
7
|
+
data_attributes[:module] = 'print-link' if require_js
|
8
|
+
%>
|
9
|
+
|
10
|
+
<% if require_js %>
|
11
|
+
<div class="gem-c-print-link" >
|
12
|
+
<%= content_tag(:button, text, {
|
13
|
+
class: %w(gem-c-print-link__button govuk-link),
|
14
|
+
data: data_attributes
|
15
|
+
}) %>
|
16
|
+
</div>
|
17
|
+
<% else %>
|
18
|
+
<div class="gem-c-print-link gem-c-print-link--show-without-js">
|
19
|
+
<%= link_to(
|
20
|
+
text,
|
21
|
+
href,
|
22
|
+
class: %w(gem-c-print-link__link govuk-link),
|
23
|
+
rel: "alternate",
|
24
|
+
data: data_attributes
|
25
|
+
) %>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
@@ -1,23 +1,42 @@
|
|
1
1
|
<%
|
2
|
+
local_assigns[:heading_level] ||= 3
|
3
|
+
heading_size = 'm' unless ['s', 'm', 'l', 'xl'].include?(heading_size)
|
4
|
+
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
5
|
+
|
2
6
|
id ||= nil
|
3
7
|
title ||= nil
|
4
8
|
borderless ||= false
|
5
9
|
edit ||= {}
|
10
|
+
delete ||= {}
|
6
11
|
items ||= []
|
7
12
|
block ||= yield
|
8
13
|
%>
|
9
14
|
<% if title || items.any? %>
|
10
15
|
<%= tag.div class: "gem-c-summary-list #{"govuk-summary-list--no-border" if borderless}", id: id do %>
|
11
16
|
<% if title %>
|
12
|
-
<%=
|
13
|
-
<% if edit.any? %>
|
14
|
-
<%= tag.ul class: "govuk-summary-list__actions-list" do %>
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
<%= content_tag(shared_helper.get_heading_level, title, class: "govuk-heading-#{heading_size} gem-c-summary-list__group-title") %>
|
18
|
+
<% if edit.any? || delete.any? %>
|
19
|
+
<%= tag.ul class: "govuk-summary-list__actions-list gem-c-summary-list__group-actions-list" do %>
|
20
|
+
<%- if edit.any? %>
|
21
|
+
<% edit_section_link_text = edit[:link_text] || t("components.summary_list.edit") %>
|
22
|
+
<%= tag.li class: "govuk-summary-list__actions-list-item" do -%>
|
23
|
+
<%= link_to edit.fetch(:href),
|
24
|
+
class: "govuk-link",
|
25
|
+
title: "#{edit_section_link_text} #{title}",
|
26
|
+
data: edit.fetch(:data_attributes, {}) do %>
|
27
|
+
<%= edit_section_link_text %><%= tag.span " #{title}", class: "govuk-visually-hidden" -%>
|
28
|
+
<% end %>
|
29
|
+
<% end %>
|
30
|
+
<% end %>
|
31
|
+
<% if delete.any? %>
|
32
|
+
<% delete_section_link_text = delete[:link_text] || t("components.summary_list.delete") %>
|
33
|
+
<%= tag.li class: "govuk-summary-list__actions-list-item" do -%>
|
34
|
+
<%= link_to delete.fetch(:href),
|
35
|
+
class: "govuk-link gem-link--destructive",
|
36
|
+
title: "#{delete_section_link_text} #{title}",
|
37
|
+
data: delete.fetch(:data_attributes, {}) do %>
|
38
|
+
<%= delete_section_link_text %><%= tag.span " #{title}", class: "govuk-visually-hidden" -%>
|
39
|
+
<% end %>
|
21
40
|
<% end %>
|
22
41
|
<% end %>
|
23
42
|
<% end %>
|
@@ -37,22 +56,23 @@
|
|
37
56
|
<%= tag.ul class: "govuk-summary-list__actions-list" do %>
|
38
57
|
<% if item.fetch(:edit, {}).any? %>
|
39
58
|
<%= tag.li class: "govuk-summary-list__actions-list-item" do %>
|
40
|
-
<% edit_link_text = item[:edit][:link_text] || "
|
59
|
+
<% edit_link_text = item[:edit][:link_text] || t("components.summary_list.edit") %>
|
41
60
|
<%= link_to item[:edit].fetch(:href),
|
42
61
|
class: "govuk-link",
|
43
62
|
title: "#{edit_link_text} #{item[:field]}",
|
44
63
|
data: item[:edit].fetch(:data_attributes, {}) do %>
|
45
|
-
<%= edit_link_text %><%= tag.span " #{item[:field]}", class: "govuk-visually-hidden"
|
64
|
+
<%= edit_link_text %><%= tag.span " #{item[:field]}", class: "govuk-visually-hidden" -%>
|
65
|
+
<% end %>
|
46
66
|
<% end %>
|
47
67
|
<% end %>
|
48
68
|
<% if item.fetch(:delete, {}).any? %>
|
49
69
|
<%= tag.li class: "govuk-summary-list__actions-list-item" do %>
|
50
|
-
<% delete_link_text = item[:delete][:link_text] || "
|
70
|
+
<% delete_link_text = item[:delete][:link_text] || t("components.summary_list.delete") %>
|
51
71
|
<%= link_to item[:delete].fetch(:href),
|
52
|
-
class: "govuk-link",
|
72
|
+
class: "govuk-link gem-link--destructive",
|
53
73
|
title: "#{delete_link_text} #{item[:field]}",
|
54
74
|
data: item[:delete].fetch(:data_attributes, {}) do %>
|
55
|
-
<%= delete_link_text %><%= tag.span " #{item[:field]}", class: "govuk-visually-hidden"
|
75
|
+
<%= delete_link_text %><%= tag.span " #{item[:field]}", class: "govuk-visually-hidden" -%>
|
56
76
|
<% end %>
|
57
77
|
<% end %>
|
58
78
|
<% end %>
|
@@ -75,6 +75,11 @@ examples:
|
|
75
75
|
text: Getting financial help and keeping your business safe
|
76
76
|
href: "/financial-help"
|
77
77
|
simple: true
|
78
|
+
with_small_icon:
|
79
|
+
data:
|
80
|
+
text: Coronavirus (COVID-19)
|
81
|
+
href: "/my-test-page"
|
82
|
+
small_icon: true
|
78
83
|
with_dark_icon:
|
79
84
|
data:
|
80
85
|
text: Coronavirus (COVID-19)
|