govuk_publishing_components 54.0.0 → 54.0.1
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/_attachment.scss +13 -9
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_legislative-list.scss +5 -0
- data/app/controllers/govuk_publishing_components/component_guide_controller.rb +1 -1
- data/app/models/govuk_publishing_components/audit_applications.rb +1 -1
- data/app/models/govuk_publishing_components/audit_comparer.rb +1 -1
- data/app/models/govuk_publishing_components/audit_components.rb +1 -1
- data/app/views/govuk_publishing_components/components/_attachment.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_feedback.html.erb +2 -6
- data/app/views/govuk_publishing_components/components/_heading.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +0 -3
- data/app/views/govuk_publishing_components/components/_radio.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +7 -4
- data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +0 -1
- data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +0 -4
- data/config/locales/ar.yml +0 -1
- data/config/locales/az.yml +0 -1
- data/config/locales/be.yml +0 -1
- data/config/locales/bg.yml +0 -1
- data/config/locales/bn.yml +0 -1
- data/config/locales/cs.yml +0 -1
- data/config/locales/cy.yml +0 -1
- data/config/locales/da.yml +0 -1
- data/config/locales/de.yml +0 -1
- data/config/locales/dr.yml +0 -1
- data/config/locales/el.yml +0 -1
- data/config/locales/en.yml +6 -7
- data/config/locales/es-419.yml +1 -2
- data/config/locales/es.yml +1 -2
- data/config/locales/et.yml +0 -1
- data/config/locales/fa.yml +0 -1
- data/config/locales/fi.yml +0 -1
- data/config/locales/fr.yml +0 -1
- data/config/locales/gd.yml +0 -1
- data/config/locales/gu.yml +0 -1
- data/config/locales/he.yml +0 -1
- data/config/locales/hi.yml +0 -1
- data/config/locales/hr.yml +0 -1
- data/config/locales/hu.yml +0 -1
- data/config/locales/hy.yml +0 -1
- data/config/locales/id.yml +0 -1
- data/config/locales/is.yml +0 -1
- data/config/locales/it.yml +0 -1
- data/config/locales/ja.yml +0 -1
- data/config/locales/ka.yml +0 -1
- data/config/locales/kk.yml +0 -1
- data/config/locales/ko.yml +0 -1
- data/config/locales/lt.yml +0 -1
- data/config/locales/lv.yml +0 -1
- data/config/locales/ms.yml +0 -1
- data/config/locales/mt.yml +0 -1
- data/config/locales/nl.yml +0 -1
- data/config/locales/no.yml +0 -1
- data/config/locales/pa-pk.yml +0 -1
- data/config/locales/pa.yml +0 -1
- data/config/locales/pl.yml +0 -1
- data/config/locales/ps.yml +0 -1
- data/config/locales/pt.yml +0 -1
- data/config/locales/ro.yml +0 -1
- data/config/locales/ru.yml +0 -1
- data/config/locales/si.yml +0 -1
- data/config/locales/sk.yml +0 -1
- data/config/locales/sl.yml +0 -1
- data/config/locales/so.yml +0 -1
- data/config/locales/sq.yml +0 -1
- data/config/locales/sr.yml +0 -1
- data/config/locales/sv.yml +0 -1
- data/config/locales/sw.yml +0 -1
- data/config/locales/ta.yml +0 -1
- data/config/locales/th.yml +0 -1
- data/config/locales/tk.yml +0 -1
- data/config/locales/tr.yml +0 -1
- data/config/locales/uk.yml +0 -1
- data/config/locales/ur.yml +0 -1
- data/config/locales/uz.yml +0 -1
- data/config/locales/vi.yml +0 -1
- data/config/locales/zh-hk.yml +0 -1
- data/config/locales/zh-tw.yml +0 -1
- data/config/locales/zh.yml +0 -1
- data/lib/govuk_publishing_components/app_helpers/asset_helper.rb +35 -26
- data/lib/govuk_publishing_components/config.rb +3 -0
- data/lib/govuk_publishing_components/presenters/attachment_helper.rb +2 -6
- data/lib/govuk_publishing_components/presenters/checkboxes_helper.rb +2 -2
- data/lib/govuk_publishing_components/presenters/component_wrapper_helper.rb +14 -14
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_organisations.rb +1 -1
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_taxons.rb +1 -1
- data/lib/govuk_publishing_components/presenters/content_item.rb +1 -3
- data/lib/govuk_publishing_components/presenters/machine_readable/article_schema.rb +1 -1
- data/lib/govuk_publishing_components/presenters/machine_readable/government_service_schema.rb +2 -2
- data/lib/govuk_publishing_components/presenters/machine_readable/organisation_schema.rb +3 -3
- data/lib/govuk_publishing_components/presenters/meta_tags.rb +2 -2
- data/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb +1 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86dda672f3ba9aab6652fe7a61262828fcbf325846d677dac46bf3acbee0288d
|
4
|
+
data.tar.gz: c6fdf3be956c6c65886324672be78cd312f3a2b89f8cc3707410dfa1404e7c8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e72340ed40f1523cda2b245a131fb54c042af7d1f2968a5202e8416aef9cc7fa936582df26d4fbb6fa9f9bb422c46cf215cbc9078627a6f3b199f5b6d12d7e7
|
7
|
+
data.tar.gz: ecbe763dc4259ff481dccfedba4a08827b131f070cacddeab8bd429d3d5af40348906645c23f1a0ff7c6bb51d62f1e5dfeac67ea149375a7f3ee797382d0f171
|
@@ -13,17 +13,11 @@ $thumbnail-icon-border-colour: govuk-colour("mid-grey");
|
|
13
13
|
position: relative;
|
14
14
|
@include govuk-font(19);
|
15
15
|
@include govuk-clearfix;
|
16
|
-
|
17
|
-
.govuk-details {
|
18
|
-
margin: govuk-spacing(3) 0;
|
19
|
-
}
|
20
16
|
}
|
21
17
|
|
22
18
|
.gem-c-attachment__thumbnail {
|
23
19
|
position: relative;
|
24
20
|
width: auto;
|
25
|
-
margin-right: govuk-spacing(5);
|
26
|
-
margin-bottom: govuk-spacing(3);
|
27
21
|
padding: $thumbnail-border-width;
|
28
22
|
float: left;
|
29
23
|
}
|
@@ -31,20 +25,30 @@ $thumbnail-icon-border-colour: govuk-colour("mid-grey");
|
|
31
25
|
.gem-c-attachment__thumbnail-image {
|
32
26
|
display: block;
|
33
27
|
width: auto; // for IE8
|
34
|
-
max-width: $thumbnail-width;
|
35
|
-
height: $thumbnail-height;
|
28
|
+
max-width: calc($thumbnail-width / 1.5);
|
29
|
+
height: calc($thumbnail-height / 1.5);
|
36
30
|
border: $thumbnail-border-colour; // for IE9 & IE10
|
37
31
|
outline: $thumbnail-border-width solid $thumbnail-border-colour;
|
38
32
|
background: $thumbnail-background;
|
39
33
|
box-shadow: $thumbnail-shadow-width $thumbnail-shadow-colour;
|
40
34
|
fill: $thumbnail-icon-border-colour;
|
41
35
|
stroke: $thumbnail-icon-border-colour;
|
36
|
+
|
37
|
+
@include govuk-media-query($from: tablet) {
|
38
|
+
max-width: $thumbnail-width;
|
39
|
+
height: $thumbnail-height;
|
40
|
+
}
|
42
41
|
}
|
43
42
|
|
44
43
|
.gem-c-attachment__details {
|
45
|
-
padding-left: $thumbnail-width + $thumbnail-border-width * 2 + govuk-spacing(5);
|
44
|
+
padding-left: calc(($thumbnail-width + $thumbnail-border-width * 2 + govuk-spacing(5)) / 1.5);
|
45
|
+
|
46
|
+
@include govuk-media-query($from: tablet) {
|
47
|
+
padding-left: $thumbnail-width + $thumbnail-border-width * 2 + govuk-spacing(5);
|
48
|
+
}
|
46
49
|
|
47
50
|
.gem-c-details {
|
51
|
+
margin-top: govuk-spacing(3);
|
48
52
|
word-break: break-word;
|
49
53
|
word-wrap: break-word;
|
50
54
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module GovukPublishingComponents
|
2
2
|
class ComponentGuideController < GovukPublishingComponents::ApplicationController
|
3
|
-
append_view_path
|
3
|
+
append_view_path Rails.root.join("app", "views", GovukPublishingComponents::Config.component_directory_name).to_s
|
4
4
|
|
5
5
|
MATCH_COMPONENTS = /(?<=govuk_publishing_components\/components\/)[\/a-zA-Z_-]+(?=['"])/
|
6
6
|
|
@@ -290,7 +290,7 @@ module GovukPublishingComponents
|
|
290
290
|
results = []
|
291
291
|
|
292
292
|
@applications_data.each do |application|
|
293
|
-
next unless application[:application_found] &&
|
293
|
+
next unless application[:application_found] && application[:helper_references].present?
|
294
294
|
|
295
295
|
application[:helper_references].each do |key, value|
|
296
296
|
location = {
|
@@ -275,7 +275,7 @@ module GovukPublishingComponents
|
|
275
275
|
next unless File.file?(file)
|
276
276
|
|
277
277
|
helpers.each do |helper|
|
278
|
-
next
|
278
|
+
next if File.foreach(file).grep(helper[:match]).blank?
|
279
279
|
|
280
280
|
helper[:used_by] << {
|
281
281
|
name: component[:name],
|
@@ -8,6 +8,7 @@
|
|
8
8
|
attributes = []
|
9
9
|
url_data_attributes ||= {}
|
10
10
|
details_ga4_attributes ||= {}
|
11
|
+
local_assigns[:margin_bottom] ||= 6
|
11
12
|
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
12
13
|
|
13
14
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
@@ -126,6 +127,7 @@
|
|
126
127
|
<%= render "govuk_publishing_components/components/details", {
|
127
128
|
title: t("components.attachment.request_format_cta"),
|
128
129
|
ga4_attributes: details_ga4_attributes,
|
130
|
+
margin_bottom: 0,
|
129
131
|
} do %>
|
130
132
|
<%= t("components.attachment.request_format_details_html", alternative_format_contact_email: attachment.alternative_format_contact_email) %>
|
131
133
|
<% end %>
|
@@ -2,13 +2,9 @@
|
|
2
2
|
add_gem_component_stylesheet("button")
|
3
3
|
add_gem_component_stylesheet("feedback")
|
4
4
|
|
5
|
-
def utf_encode(element)
|
6
|
-
element.is_a?(String) ? element.encode : element
|
7
|
-
end
|
8
|
-
|
9
5
|
email_regex = /[^\s=\/?&]+(?:@|%40)[^\s=\/?&]+/
|
10
|
-
url_without_pii =
|
11
|
-
path_without_pii =
|
6
|
+
url_without_pii = request.original_url.gsub(email_regex, '[email]').encode
|
7
|
+
path_without_pii = request.fullpath.gsub(email_regex, '[email]').encode
|
12
8
|
|
13
9
|
disable_ga4 ||= false
|
14
10
|
|
@@ -21,7 +21,6 @@
|
|
21
21
|
product_name ||= nil
|
22
22
|
show_cross_service_header ||= false
|
23
23
|
draft_watermark ||= false
|
24
|
-
show_search = local_assigns.include?(:show_search) ? local_assigns[:show_search] : true
|
25
24
|
title ||= "GOV.UK - The best place to find government services and information"
|
26
25
|
|
27
26
|
show_account_layout ||= false
|
data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb
CHANGED
@@ -12,7 +12,6 @@
|
|
12
12
|
|
13
13
|
navigation_links_columns = t("components.layout_super_navigation_header.navigation_links_columns")
|
14
14
|
navigation_menu_heading = t("components.layout_super_navigation_header.navigation_menu_heading")
|
15
|
-
navigation_search_heading = t("components.layout_super_navigation_header.navigation_search_heading")
|
16
15
|
navigation_search_subheading = t("components.layout_super_navigation_header.navigation_search_subheading")
|
17
16
|
search_text = t("components.layout_super_navigation_header.search_text")
|
18
17
|
|
@@ -13,9 +13,6 @@
|
|
13
13
|
inverse ||= false
|
14
14
|
inverse_compress ||= false
|
15
15
|
|
16
|
-
direction_class = ""
|
17
|
-
direction_class = " direction-#{direction}" if local_assigns.include?(:direction)
|
18
|
-
|
19
16
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
20
17
|
component_helper.add_class("gem-c-metadata")
|
21
18
|
component_helper.add_class("direction-#{direction}") if local_assigns.include?(:direction)
|
@@ -90,7 +90,6 @@
|
|
90
90
|
<%= tag.div t('components.radio.or'), class: "govuk-radios__divider" %>
|
91
91
|
<% else %>
|
92
92
|
<%
|
93
|
-
item_next = items[index + 1] unless index === items.size - 1
|
94
93
|
label_id = item[:id] ? item[:id] : "#{id_prefix}-#{index}"
|
95
94
|
label_hint_id = "label-hint-#{SecureRandom.hex(4)}" if item[:hint_text].present?
|
96
95
|
conditional_id = "conditional-#{SecureRandom.hex(4)}" if item[:conditional].present?
|
@@ -775,13 +775,16 @@ examples:
|
|
775
775
|
<li>three</li>
|
776
776
|
</ul>
|
777
777
|
legislative_lists:
|
778
|
+
description: Example taken from [GOV.UK Immigration rules](https://www.gov.uk/guidance/immigration-rules/immigration-rules-introduction)
|
778
779
|
data:
|
779
780
|
block: |
|
780
|
-
<h2>ordered list:</h2>
|
781
781
|
<ol class="legislative-list">
|
782
|
-
<li>
|
783
|
-
|
784
|
-
|
782
|
+
<li>6.2. In these rules:
|
783
|
+
<ol>
|
784
|
+
<li>(a) references to primary and secondary legislation refers to that legislation as amended from time to time; and</li>
|
785
|
+
<li>(b) unless the contrary intention appears, the following definitions apply:</li>
|
786
|
+
</ol>
|
787
|
+
</li>
|
785
788
|
</ol>
|
786
789
|
nested_lists:
|
787
790
|
data:
|
@@ -1,7 +1,3 @@
|
|
1
|
-
<%
|
2
|
-
absolute_links_helper = GovukPublishingComponents::Presenters::AbsoluteLinksHelper.new()
|
3
|
-
%>
|
4
|
-
|
5
1
|
<div id="page-is-not-useful" class="gem-c-feedback__form gem-c-feedback__form--email gem-c-feedback__js-show js-feedback-form">
|
6
2
|
<div class="govuk-grid-row">
|
7
3
|
<div class="govuk-grid-column-two-thirds" id="survey-wrapper">
|
data/config/locales/ar.yml
CHANGED
data/config/locales/az.yml
CHANGED
data/config/locales/be.yml
CHANGED
data/config/locales/bg.yml
CHANGED
data/config/locales/bn.yml
CHANGED
data/config/locales/cs.yml
CHANGED
data/config/locales/cy.yml
CHANGED
data/config/locales/da.yml
CHANGED
data/config/locales/de.yml
CHANGED
data/config/locales/dr.yml
CHANGED
data/config/locales/el.yml
CHANGED
data/config/locales/en.yml
CHANGED
@@ -229,7 +229,6 @@ en:
|
|
229
229
|
href: "/search/transparency-and-freedom-of-information-releases"
|
230
230
|
description: Data, Freedom of Information releases and corporate reports
|
231
231
|
navigation_menu_heading: Navigation menu
|
232
|
-
navigation_search_heading: Search and popular pages
|
233
232
|
navigation_search_subheading: Search
|
234
233
|
search_text: Search GOV.UK
|
235
234
|
metadata:
|
@@ -245,20 +244,20 @@ en:
|
|
245
244
|
notice:
|
246
245
|
banner_title: Important
|
247
246
|
option_select:
|
248
|
-
found_single: option found
|
249
247
|
found_multiple: options found
|
248
|
+
found_single: option found
|
250
249
|
selected: selected
|
251
250
|
organisation_schema:
|
252
251
|
all_content_search_description: Find all content from %{organisation}
|
253
252
|
password_input:
|
254
|
-
label: Password
|
255
253
|
button: Show
|
256
|
-
button_hide: Hide
|
257
|
-
button_aria_label: Show password
|
258
254
|
button_aria_hide_label: Hide password
|
259
|
-
|
260
|
-
|
255
|
+
button_aria_label: Show password
|
256
|
+
button_hide: Hide
|
261
257
|
error_text_prefix: Error
|
258
|
+
label: Password
|
259
|
+
password_hidden_announcement: Your password is hidden
|
260
|
+
password_shown_announcement: Your password is visible
|
262
261
|
previous_and_next_navigation:
|
263
262
|
next: Next
|
264
263
|
pagination: Pagination
|
data/config/locales/es-419.yml
CHANGED
@@ -122,11 +122,10 @@ es-419:
|
|
122
122
|
label:
|
123
123
|
navigation_links_columns:
|
124
124
|
navigation_menu_heading:
|
125
|
-
navigation_search_heading:
|
126
125
|
navigation_search_subheading:
|
127
126
|
search_text:
|
128
127
|
metadata:
|
129
|
-
and: y
|
128
|
+
and: "y"
|
130
129
|
from: Desde
|
131
130
|
history: Historial
|
132
131
|
last_updated: Última actualización
|
data/config/locales/es.yml
CHANGED
@@ -122,11 +122,10 @@ es:
|
|
122
122
|
label:
|
123
123
|
navigation_links_columns:
|
124
124
|
navigation_menu_heading:
|
125
|
-
navigation_search_heading:
|
126
125
|
navigation_search_subheading:
|
127
126
|
search_text:
|
128
127
|
metadata:
|
129
|
-
and: y
|
128
|
+
and: "y"
|
130
129
|
from: Desde
|
131
130
|
history: Historial
|
132
131
|
last_updated: Última actualización
|
data/config/locales/et.yml
CHANGED
data/config/locales/fa.yml
CHANGED
data/config/locales/fi.yml
CHANGED
data/config/locales/fr.yml
CHANGED
data/config/locales/gd.yml
CHANGED
data/config/locales/gu.yml
CHANGED
data/config/locales/he.yml
CHANGED
data/config/locales/hi.yml
CHANGED
data/config/locales/hr.yml
CHANGED
data/config/locales/hu.yml
CHANGED
data/config/locales/hy.yml
CHANGED
data/config/locales/id.yml
CHANGED
data/config/locales/is.yml
CHANGED
data/config/locales/it.yml
CHANGED
data/config/locales/ja.yml
CHANGED
data/config/locales/ka.yml
CHANGED
data/config/locales/kk.yml
CHANGED
data/config/locales/ko.yml
CHANGED
data/config/locales/lt.yml
CHANGED
data/config/locales/lv.yml
CHANGED
data/config/locales/ms.yml
CHANGED
data/config/locales/mt.yml
CHANGED
data/config/locales/nl.yml
CHANGED
data/config/locales/no.yml
CHANGED
data/config/locales/pa-pk.yml
CHANGED