govuk_publishing_components 61.0.2 → 61.0.3
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/assets/stylesheets/govuk_publishing_components/components/_print-link.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_content-block.scss +5 -9
- data/app/assets/stylesheets/govuk_publishing_components/lib/_print_support.scss +4 -4
- data/app/views/govuk_publishing_components/components/_action_link.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_cards.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_contents_list.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_devolved_nations.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_document_list.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_image_card.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_inset_text.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_intervention.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_print_link.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +2 -2
- data/lib/govuk_publishing_components/presenters/component_wrapper_helper.rb +1 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae1a49b64074fcbbbce599826af44bc090b1ab98005a920e153dc3a4183fd53e
|
4
|
+
data.tar.gz: 1b7aabf01fdae6e731872d5a20367b97a42851178053a574482b38fcd9b5f7a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fbfb1567a35a512306336c930433917e12b259a32ba7d68f69469f03cca0c4ec5620f45f5e0c4c9f27e6458becefdcde31c86fd0a4ad43e7156f6b36dab33d2
|
7
|
+
data.tar.gz: a8b632a21e87b0cf177bbe0cd0beb39766c9f5443dbb99f7087417e075b9a5d95959fa416deb53017046ac4584faf1b1b829e8793161bf546760be086f04ca0d
|
data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_content-block.scss
CHANGED
@@ -1,6 +1,3 @@
|
|
1
|
-
@import "govuk/core/lists";
|
2
|
-
@import "govuk/core/typography";
|
3
|
-
|
4
1
|
.content-block,
|
5
2
|
.content-block__contact-key,
|
6
3
|
.content-block__contact-value,
|
@@ -9,19 +6,18 @@
|
|
9
6
|
padding: 0;
|
10
7
|
}
|
11
8
|
|
12
|
-
.content-block__contact-
|
13
|
-
|
14
|
-
|
15
|
-
}
|
9
|
+
.content-block__contact-key {
|
10
|
+
@include govuk-responsive-margin(4, "bottom");
|
11
|
+
@include govuk-font(24, $weight: "bold");
|
16
12
|
}
|
17
13
|
|
18
14
|
.content-block__contact-list--nested {
|
19
15
|
.content-block__contact-key {
|
20
|
-
@
|
16
|
+
@include govuk-font(19, $weight: "bold");
|
21
17
|
}
|
22
18
|
}
|
23
19
|
|
24
20
|
.content-block .content-block__list {
|
25
|
-
@extend %govuk-list;
|
26
21
|
margin-left: 0;
|
22
|
+
list-style: none;
|
27
23
|
}
|
@@ -36,13 +36,13 @@
|
|
36
36
|
// to black, reduce the font size, and improve the layout
|
37
37
|
// of the printed href.
|
38
38
|
//
|
39
|
-
// .gem-
|
39
|
+
// .gem-print-force-link-styles
|
40
40
|
// ----------------------------------------------------------
|
41
41
|
// Typically this class will be applied to existing
|
42
42
|
// elements that have the `govuk-link` class but it can
|
43
43
|
// also be used on other link elements.
|
44
44
|
//
|
45
|
-
// .gem-
|
45
|
+
// .gem-print-force-link-styles-within
|
46
46
|
// ----------------------------------------------------------
|
47
47
|
// A variation of the previous print style, to be used on
|
48
48
|
// parent elements that contain links with the `govuk-link`
|
@@ -52,8 +52,8 @@
|
|
52
52
|
|
53
53
|
// stylelint-disable declaration-no-important
|
54
54
|
@include govuk-media-query($media-type: print) {
|
55
|
-
.gem-
|
56
|
-
.gem-
|
55
|
+
.gem-print-force-link-styles,
|
56
|
+
.gem-print-force-link-styles-within .govuk-link {
|
57
57
|
&,
|
58
58
|
&:link,
|
59
59
|
&:visited {
|
@@ -8,7 +8,7 @@
|
|
8
8
|
simple ||= false
|
9
9
|
simple_light ||= false
|
10
10
|
|
11
|
-
link_classes = %w(govuk-link gem-c-action-link__link gem-
|
11
|
+
link_classes = %w(govuk-link gem-c-action-link__link gem-print-force-link-styles)
|
12
12
|
link_classes << "govuk-link--inverse" if inverse
|
13
13
|
|
14
14
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
@@ -38,7 +38,7 @@
|
|
38
38
|
<%= content_tag("h#{sub_heading_level}", class: "gem-c-cards__sub-heading govuk-heading-s") do %>
|
39
39
|
<%=
|
40
40
|
link_to link[:text], link[:path],
|
41
|
-
class: "govuk-link gem-c-cards__link gem-
|
41
|
+
class: "govuk-link gem-c-cards__link gem-print-force-link-styles",
|
42
42
|
data: link[:data_attributes]
|
43
43
|
%>
|
44
44
|
<% end %>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
cl_helper = GovukPublishingComponents::Presenters::ContentsListHelper.new(local_assigns)
|
13
13
|
brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
|
14
14
|
|
15
|
-
link_classes = %w[gem-c-contents-list__link govuk-link gem-
|
15
|
+
link_classes = %w[gem-c-contents-list__link govuk-link gem-print-force-link-styles]
|
16
16
|
link_classes << brand_helper.color_class
|
17
17
|
link_classes << "govuk-link--no-underline" unless underline_links
|
18
18
|
|
@@ -36,7 +36,7 @@
|
|
36
36
|
<% if devolved_nations_helper.nations_with_urls.any? %>
|
37
37
|
<%= content_tag :ul, class: "govuk-list govuk-!-margin-top-1 govuk-!-margin-bottom-0" do -%>
|
38
38
|
<% devolved_nations_helper.nations_with_urls.each do |k, v| %>
|
39
|
-
<%= content_tag(:li, link_to(devolved_nations_helper.alternative_content_text(k), v[:alternative_url], class: "govuk-link gem-
|
39
|
+
<%= content_tag(:li, link_to(devolved_nations_helper.alternative_content_text(k), v[:alternative_url], class: "govuk-link gem-print-force-link-styles")) %>
|
40
40
|
<% end %>
|
41
41
|
<% end %>
|
42
42
|
<% end %>
|
@@ -55,7 +55,7 @@
|
|
55
55
|
item[:link][:text],
|
56
56
|
item[:link][:path],
|
57
57
|
data: item[:link][:data_attributes],
|
58
|
-
class: "#{item_classes} govuk-link gem-
|
58
|
+
class: "#{item_classes} govuk-link gem-print-force-link-styles #{extra_link_classes}",
|
59
59
|
lang: item[:link][:locale].presence,
|
60
60
|
rel: rel,
|
61
61
|
)
|
@@ -116,7 +116,7 @@
|
|
116
116
|
part[:link][:text],
|
117
117
|
part[:link][:path],
|
118
118
|
data: part[:link][:data_attributes],
|
119
|
-
class: "gem-c-document-list-child__heading gem-c-document-list-child__link #{brand_helper.color_class} govuk-link gem-
|
119
|
+
class: "gem-c-document-list-child__heading gem-c-document-list-child__link #{brand_helper.color_class} govuk-link gem-print-force-link-styles #{extra_link_classes}",
|
120
120
|
)
|
121
121
|
else
|
122
122
|
content_tag(
|
@@ -25,14 +25,14 @@
|
|
25
25
|
heading_link_classes = %w[
|
26
26
|
gem-c-image-card__title-link
|
27
27
|
govuk-link
|
28
|
-
gem-
|
28
|
+
gem-print-force-link-styles
|
29
29
|
]
|
30
30
|
heading_link_classes << brand_helper.color_class
|
31
31
|
heading_link_classes << "gem-c-image-card__title-link--large-font-size-mobile" if card_helper.large_mobile_font_size?
|
32
32
|
extra_link_classes = %w[
|
33
33
|
gem-c-image-card__list-item-link
|
34
34
|
govuk-link
|
35
|
-
gem-
|
35
|
+
gem-print-force-link-styles
|
36
36
|
]
|
37
37
|
extra_link_classes << brand_helper.color_class
|
38
38
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
local_assigns[:margin_bottom] ||= 6
|
6
6
|
|
7
7
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
8
|
-
component_helper.add_class("gem-c-inset-text gem-
|
8
|
+
component_helper.add_class("gem-c-inset-text gem-print-force-link-styles-within")
|
9
9
|
component_helper.set_id(id)
|
10
10
|
%>
|
11
11
|
<%= tag.div(**component_helper.all_attributes) do %>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
suggestion_data_attributes[:ga4_link] = { event_name: "navigation", type: "intervention", section: suggestion_text, index_link: 1, index_total: 1 }.to_json unless disable_ga4
|
33
33
|
|
34
34
|
suggestion_tag_options = {
|
35
|
-
class: "govuk-link gem-
|
35
|
+
class: "govuk-link gem-print-force-link-styles",
|
36
36
|
href: suggestion_link_url,
|
37
37
|
data: suggestion_data_attributes,
|
38
38
|
}
|
@@ -10,7 +10,7 @@
|
|
10
10
|
((child_data_attributes[:module] ||= "") << " " << (require_js ? "print-link" : "button")).strip!
|
11
11
|
|
12
12
|
child_classes = %w[govuk-link]
|
13
|
-
child_classes << "
|
13
|
+
child_classes << "gem-c-print-link__button" if href.nil?
|
14
14
|
child_classes << "gem-c-print-link__link govuk-link--no-visited-state" if href.present?
|
15
15
|
|
16
16
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<strong class="gem-c-step-nav-header__part-of">Part of</strong>
|
33
33
|
<% if path %>
|
34
34
|
<a href="<%= path %>"
|
35
|
-
class="gem-c-step-nav-header__title govuk-link gem-
|
35
|
+
class="gem-c-step-nav-header__title govuk-link gem-print-force-link-styles"
|
36
36
|
<% unless disable_ga4 %>
|
37
37
|
data-ga4-link='<%= ga4_data %>'
|
38
38
|
<% end %>>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<span class="gem-c-step-nav-related__pretitle"><%= pretitle %></span>
|
17
17
|
<% if links.length == 1 && !always_display_as_list %>
|
18
18
|
<a href="<%= links[0][:href] %>"
|
19
|
-
class="govuk-link gem-
|
19
|
+
class="govuk-link gem-print-force-link-styles"
|
20
20
|
<% unless disable_ga4
|
21
21
|
ga4_attributes = {
|
22
22
|
event_name: "navigation",
|
@@ -36,7 +36,7 @@
|
|
36
36
|
<% links.each_with_index do |link, index| %>
|
37
37
|
<li class="gem-c-step-nav-related__link-item">
|
38
38
|
<a href="<%= link[:href] %>"
|
39
|
-
class="govuk-link gem-
|
39
|
+
class="govuk-link gem-print-force-link-styles"
|
40
40
|
<% unless disable_ga4
|
41
41
|
ga4_attributes = {
|
42
42
|
event_name: "navigation",
|
@@ -151,7 +151,7 @@ module GovukPublishingComponents
|
|
151
151
|
return if classes.blank?
|
152
152
|
|
153
153
|
class_array = classes.split(" ")
|
154
|
-
unless class_array.all? { |c| c.start_with?("js-", "gem-c-", "govuk-", "app-c-", "brand--", "brand__") || c == "direction-rtl" }
|
154
|
+
unless class_array.all? { |c| c.start_with?("js-", "gem-c-", "govuk-", "app-c-", "brand--", "brand__", "gem-print-") || c == "direction-rtl" }
|
155
155
|
raise(ArgumentError, "Classes (#{classes}) must be prefixed with `js-`")
|
156
156
|
end
|
157
157
|
end
|