govuk_publishing_components 56.1.0 → 56.2.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/javascripts/govuk_publishing_components/components/service-navigation.js +5 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_service-navigation.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss +1 -1
- data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_devolved_nations.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +0 -4
- data/app/views/govuk_publishing_components/components/_service_navigation.html.erb +61 -0
- data/app/views/govuk_publishing_components/components/_summary_banner.html.erb +3 -2
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +8 -3
- data/app/views/govuk_publishing_components/components/docs/service_navigation.yml +42 -0
- data/config/locales/ar.yml +1 -0
- data/config/locales/az.yml +1 -0
- data/config/locales/be.yml +1 -0
- data/config/locales/bg.yml +1 -0
- data/config/locales/bn.yml +1 -0
- data/config/locales/cs.yml +1 -0
- data/config/locales/cy.yml +1 -0
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +1 -0
- data/config/locales/dr.yml +1 -0
- data/config/locales/el.yml +1 -0
- data/config/locales/en.yml +1 -0
- data/config/locales/es-419.yml +1 -0
- data/config/locales/es.yml +1 -0
- data/config/locales/et.yml +1 -0
- data/config/locales/fa.yml +1 -0
- data/config/locales/fi.yml +1 -0
- data/config/locales/fr.yml +1 -0
- data/config/locales/gd.yml +1 -0
- data/config/locales/gu.yml +1 -0
- data/config/locales/he.yml +1 -0
- data/config/locales/hi.yml +1 -0
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +1 -0
- data/config/locales/hy.yml +1 -0
- data/config/locales/id.yml +1 -0
- data/config/locales/is.yml +1 -0
- data/config/locales/it.yml +1 -0
- data/config/locales/ja.yml +1 -0
- data/config/locales/ka.yml +1 -0
- data/config/locales/kk.yml +1 -0
- data/config/locales/ko.yml +1 -0
- data/config/locales/lt.yml +1 -0
- data/config/locales/lv.yml +1 -0
- data/config/locales/ms.yml +1 -0
- data/config/locales/mt.yml +1 -0
- data/config/locales/ne.yml +1 -0
- data/config/locales/nl.yml +1 -0
- data/config/locales/no.yml +1 -0
- data/config/locales/pa-pk.yml +1 -0
- data/config/locales/pa.yml +1 -0
- data/config/locales/pl.yml +1 -0
- data/config/locales/ps.yml +1 -0
- data/config/locales/pt.yml +1 -0
- data/config/locales/ro.yml +1 -0
- data/config/locales/ru.yml +1 -0
- data/config/locales/si.yml +1 -0
- data/config/locales/sk.yml +1 -0
- data/config/locales/sl.yml +1 -0
- data/config/locales/so.yml +1 -0
- data/config/locales/sq.yml +1 -0
- data/config/locales/sr.yml +1 -0
- data/config/locales/sv.yml +1 -0
- data/config/locales/sw.yml +1 -0
- data/config/locales/ta.yml +1 -0
- data/config/locales/th.yml +1 -0
- data/config/locales/tk.yml +1 -0
- data/config/locales/tr.yml +1 -0
- data/config/locales/uk.yml +1 -0
- data/config/locales/ur.yml +1 -0
- data/config/locales/uz.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-hk.yml +1 -0
- data/config/locales/zh-tw.yml +1 -0
- data/config/locales/zh.yml +1 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68407f5db22229aa78134b622dc8559456e40553df87dd9cb01de60aaf3e462f
|
4
|
+
data.tar.gz: 8b979b368aba80117804a47ae7d0c7595c2fce311578fc731bef81309456db5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8d5952713a5fad747e52900b7e37dac29595e1cc63ebe02aa23b9751660011e7662432a5def3c7bd1ccbbc9328d434c2e40b5709da1290c3df91479cc6822ee
|
7
|
+
data.tar.gz: f5c24bfbf5e24d745757b8add1af84cdc64fd261d41552ba7d9d988d63f04002982c73b927b3210ea636826c334cf02f61ba6074f0e46e8d9a5181f34914f9cf
|
@@ -0,0 +1,5 @@
|
|
1
|
+
// This component relies on JavaScript from GOV.UK Frontend
|
2
|
+
// = require govuk/components/service-navigation/service-navigation.bundle.js
|
3
|
+
window.GOVUK = window.GOVUK || {}
|
4
|
+
window.GOVUK.Modules = window.GOVUK.Modules || {}
|
5
|
+
window.GOVUK.Modules.GovukServiceNavigation = window.GOVUKFrontend.ServiceNavigation
|
@@ -75,6 +75,7 @@
|
|
75
75
|
@import "components/search";
|
76
76
|
@import "components/secondary-navigation";
|
77
77
|
@import "components/select";
|
78
|
+
@import "components/service-navigation";
|
78
79
|
@import "components/share-links";
|
79
80
|
@import "components/signup-link";
|
80
81
|
@import "components/single-page-notification-button";
|
@@ -44,7 +44,7 @@
|
|
44
44
|
<div class="govuk-grid-column-two-thirds">
|
45
45
|
<h2 class="govuk-cookie-banner__heading govuk-heading-m"><%= title %></h2>
|
46
46
|
<div tabindex="-1" class="govuk-cookie-banner__content gem-c-cookie-banner__confirmation">
|
47
|
-
<
|
47
|
+
<div class="gem-c-cookie-banner__content"><%= text %></div>
|
48
48
|
<p class="gem-c-cookie-banner__confirmation-message--accepted govuk-body" hidden
|
49
49
|
<% unless disable_ga4 %>
|
50
50
|
data-ga4-cookie-banner <%# GA4 pageview JS looks for data-ga4-cookie-banner %>
|
@@ -10,6 +10,7 @@
|
|
10
10
|
|
11
11
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
12
12
|
component_helper.add_class("gem-c-devolved-nations")
|
13
|
+
component_helper.add_aria_attribute({ label: t("components.devolved_nations.aria_label") })
|
13
14
|
|
14
15
|
unless disable_ga4
|
15
16
|
component_helper.add_data_attribute({
|
data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb
CHANGED
@@ -110,7 +110,6 @@
|
|
110
110
|
link = t("components.layout_super_navigation_header.navigation_link")
|
111
111
|
show_menu_text = show_navigation_menu_text
|
112
112
|
hide_menu_text = hide_navigation_menu_text
|
113
|
-
tracking_label = link[:label].downcase.gsub(/\s+/, "")
|
114
113
|
%>
|
115
114
|
|
116
115
|
<div class="govuk-width-container gem-c-layout-super-navigation-header__button-width-container">
|
@@ -140,7 +139,6 @@
|
|
140
139
|
text_for_show: show_menu_text,
|
141
140
|
toggle_desktop_group: "top",
|
142
141
|
toggle_mobile_group: "top",
|
143
|
-
tracking_key: tracking_label,
|
144
142
|
ga4_event: {
|
145
143
|
event_name: "select_content",
|
146
144
|
type: "header menu bar",
|
@@ -172,7 +170,6 @@
|
|
172
170
|
"text-for-show": show_search_menu_text,
|
173
171
|
"toggle-mobile-group": "top",
|
174
172
|
"toggle-desktop-group": "top",
|
175
|
-
"tracking-key": "search",
|
176
173
|
"ga4-event": "#{{
|
177
174
|
"event_name": "select_content",
|
178
175
|
"type": "header menu bar",
|
@@ -250,7 +247,6 @@
|
|
250
247
|
has_description = item[:description].present?
|
251
248
|
link_classes = %w[govuk-link gem-c-layout-super-navigation-header__navigation-second-item-link]
|
252
249
|
link_classes << "gem-c-layout-super-navigation-header__navigation-second-item-link--with-description" if has_description
|
253
|
-
tracking_label = column[:label].downcase.gsub(/\s+/, "")
|
254
250
|
link_href = absolute_links_helper.make_url_absolute(item[:href])
|
255
251
|
%>
|
256
252
|
<li class="gem-c-layout-super-navigation-header__dropdown-list-item">
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<%
|
2
|
+
add_gem_component_stylesheet("service-navigation")
|
3
|
+
|
4
|
+
service_name ||= nil
|
5
|
+
service_name_url ||= nil
|
6
|
+
navigation_items ||= []
|
7
|
+
|
8
|
+
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
9
|
+
component_helper.add_class("gem-c-service-navigation govuk-service-navigation")
|
10
|
+
component_helper.add_aria_attribute({ label: "Service information" }) if service_name.present?
|
11
|
+
component_helper.add_data_attribute({ module: "govuk-service-navigation" })
|
12
|
+
%>
|
13
|
+
<% if service_name.present? || navigation_items.present? %>
|
14
|
+
<% service_navigation_content = capture do %>
|
15
|
+
<div class="govuk-width-container">
|
16
|
+
<div class="govuk-service-navigation__container">
|
17
|
+
<% if service_name %>
|
18
|
+
<% if service_name_url %>
|
19
|
+
<%= tag.span(class: "govuk-service-navigation__service-name") do %>
|
20
|
+
<%= link_to(service_name, service_name_url, class: "govuk-service-navigation__link") %>
|
21
|
+
<% end %>
|
22
|
+
<% else %>
|
23
|
+
<%= tag.span(service_name, class: "govuk-service-navigation__service-name") %>
|
24
|
+
<% end %>
|
25
|
+
<% end %>
|
26
|
+
|
27
|
+
<% if navigation_items.present? %>
|
28
|
+
<nav aria-label="<%= t("components.layout_header.menu") %>" class="govuk-service-navigation__wrapper">
|
29
|
+
<button type="button" class="govuk-service-navigation__toggle govuk-js-service-navigation-toggle" aria-controls="navigation" hidden>
|
30
|
+
Menu
|
31
|
+
</button>
|
32
|
+
<ul class="govuk-service-navigation__list" id="navigation">
|
33
|
+
<% navigation_items.each do |nav| %>
|
34
|
+
<%
|
35
|
+
nav_classes = %w(govuk-service-navigation__item)
|
36
|
+
nav_classes << "govuk-service-navigation__item--active" if nav[:active]
|
37
|
+
aria_current = nav[:active]
|
38
|
+
%>
|
39
|
+
<%= tag.li nav[:text], class: nav_classes do %>
|
40
|
+
<% if nav[:active] %>
|
41
|
+
<%= link_to(nav[:href], class: "govuk-service-navigation__link", aria: { current: aria_current }) do %>
|
42
|
+
<%= tag.strong(nav[:text], class: "govuk-service-navigation__active-fallback") %>
|
43
|
+
<% end %>
|
44
|
+
<% else %>
|
45
|
+
<%= link_to nav[:text], nav[:href], class: "govuk-service-navigation__link" %>
|
46
|
+
<% end %>
|
47
|
+
<% end %>
|
48
|
+
<% end %>
|
49
|
+
</ul>
|
50
|
+
</nav>
|
51
|
+
<% end %>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
<% end %>
|
55
|
+
|
56
|
+
<% if service_name.present? %>
|
57
|
+
<%= tag.section(service_navigation_content, **component_helper.all_attributes) %>
|
58
|
+
<% else %>
|
59
|
+
<%= tag.div(service_navigation_content, **component_helper.all_attributes) %>
|
60
|
+
<% end %>
|
61
|
+
<% end %>
|
@@ -2,13 +2,14 @@
|
|
2
2
|
add_gem_component_stylesheet("summary-banner")
|
3
3
|
|
4
4
|
title ||= false
|
5
|
+
title_id = "summary-banner-title-#{SecureRandom.hex(4)}"
|
5
6
|
text ||= false
|
6
7
|
secondary_text ||= false
|
7
8
|
local_assigns[:margin_bottom] ||= 7
|
8
9
|
|
9
10
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
10
11
|
component_helper.add_class("gem-c-summary-banner")
|
11
|
-
component_helper.add_aria_attribute({
|
12
|
+
component_helper.add_aria_attribute({ labelledby: title_id })
|
12
13
|
component_helper.set_lang("en")
|
13
14
|
component_helper.add_data_attribute({ module: "ga4-link-tracker" })
|
14
15
|
component_helper.add_data_attribute({ ga4_track_links_only: "" })
|
@@ -16,7 +17,7 @@
|
|
16
17
|
%>
|
17
18
|
<% if title.present? && text.present? %>
|
18
19
|
<%= tag.section(**component_helper.all_attributes) do %>
|
19
|
-
<h2 class="gem-c-summary-banner__title govuk-heading-m"><%= title %></h2>
|
20
|
+
<h2 class="gem-c-summary-banner__title govuk-heading-m" id="<%= title_id %>"><%= title %></h2>
|
20
21
|
<p class="gem-c-summary-banner__text">
|
21
22
|
<%= text %>
|
22
23
|
</p>
|
@@ -470,9 +470,14 @@ examples:
|
|
470
470
|
data:
|
471
471
|
block: |
|
472
472
|
<blockquote>
|
473
|
-
<p>This
|
474
|
-
<
|
475
|
-
|
473
|
+
<p>This is a blockquote with one line in it. It should have quote marks around it.</p>
|
474
|
+
<cite>Jane Blockquote</cite>
|
475
|
+
</blockquote>
|
476
|
+
<blockquote>
|
477
|
+
<p>This is a multi line blockquote with a citation.</p>
|
478
|
+
<p>It contains extra words such as 'wood' and 'primly' in order to make it wrap onto a second line so we can check that everything's okay.</p>
|
479
|
+
<p>This is a third paragraph, and the last one, so it should have both an opening and a closing quote mark.</p>
|
480
|
+
<cite>John Blockquote</cite>
|
476
481
|
</blockquote>
|
477
482
|
buttons:
|
478
483
|
data:
|
@@ -0,0 +1,42 @@
|
|
1
|
+
name: Service Navigation
|
2
|
+
description: Renders a box with a link to sign up for email notifications
|
3
|
+
accessibility_criteria: |
|
4
|
+
- the component must use the correct heading level for the page
|
5
|
+
- text should have a text contrast ratio higher than 4.5:1 against the background colour to meet WCAG AA
|
6
|
+
- the icon must not be focusable or shown to screenreaders
|
7
|
+
accessibility_excluded_rules:
|
8
|
+
- duplicate-id-aria
|
9
|
+
- landmark-unique
|
10
|
+
uses_component_wrapper_helper: true
|
11
|
+
govuk_frontend_components:
|
12
|
+
- service-navigation
|
13
|
+
shared_accessibility_criteria:
|
14
|
+
- link
|
15
|
+
examples:
|
16
|
+
default:
|
17
|
+
data:
|
18
|
+
navigation_items:
|
19
|
+
- text: Navigation item 1
|
20
|
+
href: "#"
|
21
|
+
active: true
|
22
|
+
- text: Navigation item 2
|
23
|
+
href: "#"
|
24
|
+
- text: Navigation item 3
|
25
|
+
href: "#"
|
26
|
+
with_service_name:
|
27
|
+
data:
|
28
|
+
service_name: My service name
|
29
|
+
with_service_name_and_service_name_url:
|
30
|
+
data:
|
31
|
+
service_name: My service name
|
32
|
+
service_name_url: "#"
|
33
|
+
with_service_name_and_navigation_links:
|
34
|
+
data:
|
35
|
+
service_name: My service name
|
36
|
+
navigation_items:
|
37
|
+
- text: Navigation item 1
|
38
|
+
href: "#"
|
39
|
+
- text: Navigation item 2
|
40
|
+
href: "#"
|
41
|
+
- text: Navigation item 3
|
42
|
+
href: "#"
|
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
data/config/locales/es-419.yml
CHANGED
data/config/locales/es.yml
CHANGED
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/ne.yml
CHANGED
data/config/locales/nl.yml
CHANGED
data/config/locales/no.yml
CHANGED
data/config/locales/pa-pk.yml
CHANGED
data/config/locales/pa.yml
CHANGED
data/config/locales/pl.yml
CHANGED
data/config/locales/ps.yml
CHANGED
data/config/locales/pt.yml
CHANGED
data/config/locales/ro.yml
CHANGED
data/config/locales/ru.yml
CHANGED
data/config/locales/si.yml
CHANGED
data/config/locales/sk.yml
CHANGED
data/config/locales/sl.yml
CHANGED
data/config/locales/so.yml
CHANGED
data/config/locales/sq.yml
CHANGED
data/config/locales/sr.yml
CHANGED
data/config/locales/sv.yml
CHANGED
data/config/locales/sw.yml
CHANGED
data/config/locales/ta.yml
CHANGED
data/config/locales/th.yml
CHANGED
data/config/locales/tk.yml
CHANGED
data/config/locales/tr.yml
CHANGED
data/config/locales/uk.yml
CHANGED
data/config/locales/ur.yml
CHANGED
data/config/locales/uz.yml
CHANGED
data/config/locales/vi.yml
CHANGED
data/config/locales/zh-hk.yml
CHANGED
data/config/locales/zh-tw.yml
CHANGED
data/config/locales/zh.yml
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 56.1
|
4
|
+
version: 56.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: govuk_app_config
|
@@ -496,6 +496,7 @@ files:
|
|
496
496
|
- app/assets/javascripts/govuk_publishing_components/components/radio.js
|
497
497
|
- app/assets/javascripts/govuk_publishing_components/components/reorderable-list.js
|
498
498
|
- app/assets/javascripts/govuk_publishing_components/components/search-with-autocomplete.js
|
499
|
+
- app/assets/javascripts/govuk_publishing_components/components/service-navigation.js
|
499
500
|
- app/assets/javascripts/govuk_publishing_components/components/single-page-notification-button.js
|
500
501
|
- app/assets/javascripts/govuk_publishing_components/components/skip-link.js
|
501
502
|
- app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js
|
@@ -594,6 +595,7 @@ files:
|
|
594
595
|
- app/assets/stylesheets/govuk_publishing_components/components/_search.scss
|
595
596
|
- app/assets/stylesheets/govuk_publishing_components/components/_secondary-navigation.scss
|
596
597
|
- app/assets/stylesheets/govuk_publishing_components/components/_select.scss
|
598
|
+
- app/assets/stylesheets/govuk_publishing_components/components/_service-navigation.scss
|
597
599
|
- app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss
|
598
600
|
- app/assets/stylesheets/govuk_publishing_components/components/_signup-link.scss
|
599
601
|
- app/assets/stylesheets/govuk_publishing_components/components/_single-page-notification-button.scss
|
@@ -744,6 +746,7 @@ files:
|
|
744
746
|
- app/views/govuk_publishing_components/components/_search_with_autocomplete.html.erb
|
745
747
|
- app/views/govuk_publishing_components/components/_secondary_navigation.html.erb
|
746
748
|
- app/views/govuk_publishing_components/components/_select.html.erb
|
749
|
+
- app/views/govuk_publishing_components/components/_service_navigation.html.erb
|
747
750
|
- app/views/govuk_publishing_components/components/_share_links.html.erb
|
748
751
|
- app/views/govuk_publishing_components/components/_signup_link.html.erb
|
749
752
|
- app/views/govuk_publishing_components/components/_single_page_notification_button.html.erb
|
@@ -844,6 +847,7 @@ files:
|
|
844
847
|
- app/views/govuk_publishing_components/components/docs/search_with_autocomplete.yml
|
845
848
|
- app/views/govuk_publishing_components/components/docs/secondary_navigation.yml
|
846
849
|
- app/views/govuk_publishing_components/components/docs/select.yml
|
850
|
+
- app/views/govuk_publishing_components/components/docs/service_navigation.yml
|
847
851
|
- app/views/govuk_publishing_components/components/docs/share_links.yml
|
848
852
|
- app/views/govuk_publishing_components/components/docs/signup_link.yml
|
849
853
|
- app/views/govuk_publishing_components/components/docs/single_page_notification_button.yml
|
@@ -2034,7 +2038,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2034
2038
|
- !ruby/object:Gem::Version
|
2035
2039
|
version: '0'
|
2036
2040
|
requirements: []
|
2037
|
-
rubygems_version: 3.6.
|
2041
|
+
rubygems_version: 3.6.7
|
2038
2042
|
specification_version: 4
|
2039
2043
|
summary: A gem to document components in GOV.UK frontend applications
|
2040
2044
|
test_files: []
|