govuk_publishing_components 66.4.1 → 66.5.0
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/vendor/lux/lux-reporter.js +80 -47
- data/app/assets/stylesheets/component_guide/application.scss +27 -11
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +7 -1
- data/app/controllers/govuk_publishing_components/component_guide_controller.rb +40 -11
- data/app/models/govuk_publishing_components/component_doc.rb +6 -2
- data/app/models/govuk_publishing_components/component_docs.rb +8 -2
- data/app/models/govuk_publishing_components/component_example.rb +4 -0
- data/app/models/govuk_publishing_components/shared_accessibility_criteria.rb +2 -2
- data/app/views/govuk_publishing_components/applications_page/show.html.erb +2 -2
- data/app/views/govuk_publishing_components/audit/_component_contents.html.erb +1 -1
- data/app/views/govuk_publishing_components/audit/show.html.erb +1 -1
- data/app/views/govuk_publishing_components/component_guide/_component_list.html.erb +5 -1
- data/app/views/govuk_publishing_components/component_guide/component_doc/_component.html.erb +11 -6
- data/app/views/govuk_publishing_components/component_guide/component_doc/_component_output.html.erb +11 -2
- data/app/views/govuk_publishing_components/component_guide/example.html.erb +1 -1
- data/app/views/govuk_publishing_components/component_guide/index.html.erb +7 -0
- data/app/views/govuk_publishing_components/component_guide/preview.html.erb +9 -1
- data/app/views/govuk_publishing_components/component_guide/show.html.erb +35 -14
- data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +14 -32
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +3 -1
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +231 -221
- data/app/views/govuk_publishing_components/components/_published_dates.html.erb +13 -12
- data/app/views/govuk_publishing_components/components/_signup_link.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +0 -19
- data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +12 -23
- data/app/views/govuk_publishing_components/components/docs/published_dates.yml +0 -6
- data/app/views/govuk_publishing_components/components/docs/signup_link.yml +8 -0
- data/config/locales/en.yml +2 -2
- data/config/routes.rb +10 -2
- data/lib/govuk_publishing_components/config.rb +4 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/axe.d.ts +39 -1
- data/node_modules/axe-core/axe.js +1062 -534
- data/node_modules/axe-core/axe.min.js +2 -2
- data/node_modules/axe-core/gather-internals.js +219 -0
- data/node_modules/axe-core/locales/_template.json +5 -0
- data/node_modules/axe-core/locales/ja.json +1 -0
- data/node_modules/axe-core/locales/{no_NB.json → nb.json} +1 -1
- data/node_modules/axe-core/locales/pt_BR.json +1 -1
- data/node_modules/axe-core/locales/pt_PT.json +1 -1
- data/node_modules/axe-core/locales/zh_CN.json +1 -1
- data/node_modules/axe-core/locales/zh_TW.json +1 -1
- data/node_modules/axe-core/package.json +11 -6
- data/node_modules/axe-core/sri-history.json +4 -0
- metadata +4 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<% content_for :title, "#{@component_doc.name}
|
|
1
|
+
<% content_for :title, "#{@component_doc.name} #{@component_doc.type}" %>
|
|
2
|
+
|
|
2
3
|
<% content_for :application_stylesheet do %>
|
|
3
4
|
<% if @component_doc.source == "application" %>
|
|
4
5
|
<%= render "application_stylesheet" %>
|
|
@@ -7,7 +8,7 @@
|
|
|
7
8
|
|
|
8
9
|
<%= render "govuk_publishing_components/components/heading", {
|
|
9
10
|
text: @component_doc.name,
|
|
10
|
-
context:
|
|
11
|
+
context: @component_doc.type.capitalize,
|
|
11
12
|
heading_level: 1,
|
|
12
13
|
font_size: "xl",
|
|
13
14
|
margin_bottom: 8,
|
|
@@ -30,7 +31,9 @@
|
|
|
30
31
|
</div>
|
|
31
32
|
</div>
|
|
32
33
|
<% end %>
|
|
33
|
-
|
|
34
|
+
<% if @component_doc.type == "component" %>
|
|
35
|
+
<p class="govuk-body"><%= link_to "Search for usage of this component on GitHub", @component_doc.github_search_url, class: "govuk-link" %>.</p>
|
|
36
|
+
<% end %>
|
|
34
37
|
</div>
|
|
35
38
|
</div>
|
|
36
39
|
|
|
@@ -52,8 +55,8 @@
|
|
|
52
55
|
href: "#overview",
|
|
53
56
|
text: "Overview",
|
|
54
57
|
items: [
|
|
55
|
-
{ href: "#how-it-looks", text: "How it looks" },
|
|
56
|
-
{ href: "#how-to-call-this-component", text: "How to call this component" },
|
|
58
|
+
({ href: "#how-it-looks", text: "How it looks" } if @component_doc.display_preview? || @component_doc.display_html?),
|
|
59
|
+
{ href: "#how-to-call-this-component", text: @component_doc.type == "component" ? "How to call this component" : "Passing data to this flexible section" },
|
|
57
60
|
({ href: "#govuk-design-system", text: "GOV.UK Design System" } if @component_doc.govuk_frontend_components.any?),
|
|
58
61
|
({ href: "#accessibility-acceptance-criteria", text: "Accessibility acceptance criteria" } if @component_doc.accessibility_criteria.present?),
|
|
59
62
|
].compact,
|
|
@@ -72,14 +75,23 @@
|
|
|
72
75
|
</div>
|
|
73
76
|
|
|
74
77
|
<h2 class="govuk-heading-l" id="overview">Overview</h2>
|
|
75
|
-
|
|
76
|
-
<
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
<% if @component_doc.display_preview? || @component_doc.display_html? %>
|
|
79
|
+
<h3 class="govuk-heading-m" id="how-it-looks">
|
|
80
|
+
<a href="<%= @example_path %>" class="govuk-link">How it looks</a>
|
|
81
|
+
<small class="govuk-!-font-size-16">(<a href="<%= @preview_path %>" class="govuk-link">preview</a>)</small>
|
|
82
|
+
<small class="govuk-!-font-size-16">(<a href="<%= @preview_all_path %>" class="govuk-link">preview all</a>)</small>
|
|
83
|
+
</h3>
|
|
84
|
+
<%= render "govuk_publishing_components/component_guide/component_doc/preview", component_doc: @component_doc, example: @component_doc.example %>
|
|
85
|
+
<% end %>
|
|
81
86
|
|
|
82
|
-
|
|
87
|
+
<% if @component_doc.type == "component" %>
|
|
88
|
+
<h3 class="govuk-heading-m govuk-!-margin-top-4" id="how-to-call-this-component">How to call this component</h3>
|
|
89
|
+
<% else %>
|
|
90
|
+
<h3 class="govuk-heading-m govuk-!-margin-top-4" id="how-to-call-this-component">Passing data to this flexible section</h3>
|
|
91
|
+
<div class="component-markdown component-markdown--no-margin">
|
|
92
|
+
<p>Flexible sections are not called in the way shown below, however this information serves as a reference for the data required by this flexible section.</p>
|
|
93
|
+
</div>
|
|
94
|
+
<% end %>
|
|
83
95
|
<%= render "govuk_publishing_components/component_guide/component_doc/call", component_doc: @component_doc, example: @component_doc.example %>
|
|
84
96
|
|
|
85
97
|
<% if @component_doc.govuk_frontend_components.any? %>
|
|
@@ -127,8 +139,17 @@
|
|
|
127
139
|
<% @component_doc.other_examples.each do |example| %>
|
|
128
140
|
<div class="component-example" id="<%= example.id %>">
|
|
129
141
|
<h3 class="govuk-heading-m">
|
|
130
|
-
|
|
131
|
-
|
|
142
|
+
<%
|
|
143
|
+
if @component_doc.type == "component"
|
|
144
|
+
example_path = component_example_path(@component_doc.id, example.id)
|
|
145
|
+
preview_path = component_preview_path(@component_doc.id, example.id)
|
|
146
|
+
else
|
|
147
|
+
example_path = flexible_section_example_path(@component_doc.id, example.id)
|
|
148
|
+
preview_path = flexible_section_preview_path(@component_doc.id, example.id)
|
|
149
|
+
end
|
|
150
|
+
%>
|
|
151
|
+
<a href="<%= example_path %>" class="govuk-link"><%= example.name %></a>
|
|
152
|
+
<small>(<a href="<%= preview_path %>" class="govuk-link">preview</a>)</small>
|
|
132
153
|
</h3>
|
|
133
154
|
<% if example.html_description %>
|
|
134
155
|
<div class="component-markdown component-markdown--no-margin">
|
|
@@ -20,12 +20,10 @@
|
|
|
20
20
|
cookie_preferences_href,
|
|
21
21
|
class: "govuk-link",
|
|
22
22
|
)))
|
|
23
|
-
services_cookies ||= nil
|
|
24
23
|
|
|
25
24
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
|
26
25
|
component_helper.set_id(id)
|
|
27
26
|
component_helper.add_class("gem-c-cookie-banner govuk-clearfix govuk-cookie-banner js-banner-wrapper")
|
|
28
|
-
component_helper.add_class("gem-c-cookie-banner--services") if services_cookies
|
|
29
27
|
|
|
30
28
|
component_helper.add_data_attribute({ module: "cookie-banner", nosnippet: "" })
|
|
31
29
|
component_helper.add_role("region")
|
|
@@ -54,38 +52,22 @@
|
|
|
54
52
|
</div>
|
|
55
53
|
</div>
|
|
56
54
|
<div class="js-confirmation-buttons govuk-button-group">
|
|
57
|
-
|
|
58
|
-
<%= render "govuk_publishing_components/components/button", {
|
|
55
|
+
<%= render "govuk_publishing_components/components/button", {
|
|
59
56
|
name: "cookies",
|
|
60
|
-
text:
|
|
61
|
-
data_attributes: {
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
text: t("components.cookie_banner.buttons.accept_cookies"),
|
|
58
|
+
data_attributes: {
|
|
59
|
+
"accept-cookies": "true",
|
|
60
|
+
"cookie-types": "all",
|
|
61
|
+
},
|
|
62
|
+
} %>
|
|
63
|
+
<%= render "govuk_publishing_components/components/button", {
|
|
64
64
|
name: "cookies",
|
|
65
|
-
text:
|
|
66
|
-
data_attributes: {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<% else %>
|
|
72
|
-
<%= render "govuk_publishing_components/components/button", {
|
|
73
|
-
name: "cookies",
|
|
74
|
-
text: t("components.cookie_banner.buttons.accept_cookies"),
|
|
75
|
-
data_attributes: {
|
|
76
|
-
"accept-cookies": "true",
|
|
77
|
-
"cookie-types": "all",
|
|
78
|
-
},
|
|
79
|
-
} %>
|
|
80
|
-
<%= render "govuk_publishing_components/components/button", {
|
|
81
|
-
name: "cookies",
|
|
82
|
-
text: t("components.cookie_banner.buttons.reject_cookies"),
|
|
83
|
-
data_attributes: {
|
|
84
|
-
"reject-cookies": "true",
|
|
85
|
-
},
|
|
86
|
-
} %>
|
|
87
|
-
<a class="govuk-link" href="<%= cookie_preferences_href %>"><%= t("components.cookie_banner.buttons.view_cookies") %></a>
|
|
88
|
-
<% end %>
|
|
65
|
+
text: t("components.cookie_banner.buttons.reject_cookies"),
|
|
66
|
+
data_attributes: {
|
|
67
|
+
"reject-cookies": "true",
|
|
68
|
+
},
|
|
69
|
+
} %>
|
|
70
|
+
<a class="govuk-link" href="<%= cookie_preferences_href %>"><%= t("components.cookie_banner.buttons.view_cookies") %></a>
|
|
89
71
|
</div>
|
|
90
72
|
<div hidden class="js-hide-button govuk-button-group">
|
|
91
73
|
<%
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<%
|
|
2
2
|
emergency_banner ||= nil
|
|
3
3
|
global_banner ||= nil
|
|
4
|
+
phase_banner ||= nil
|
|
4
5
|
html_lang ||= "en"
|
|
5
6
|
homepage ||= false
|
|
6
7
|
layout_helper = GovukPublishingComponents::Presenters::PublicLayoutHelper.new(local_assigns)
|
|
@@ -90,7 +91,8 @@
|
|
|
90
91
|
<% I18n.with_locale(:en) do %>
|
|
91
92
|
<%= render "govuk_publishing_components/components/layout_super_navigation_header", {
|
|
92
93
|
homepage:,
|
|
93
|
-
logo_link
|
|
94
|
+
logo_link:,
|
|
95
|
+
phase_banner:,
|
|
94
96
|
} %>
|
|
95
97
|
<% end %>
|
|
96
98
|
<% end %>
|