govuk_publishing_components 63.1.2 → 63.2.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/analytics-ga4/ga4-page-views.js +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +0 -13
- data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +0 -14
- data/app/assets/stylesheets/govuk_publishing_components/components/_summary-list.scss +2 -12
- data/app/controllers/govuk_publishing_components/applications_page_controller.rb +1 -2
- data/app/controllers/govuk_publishing_components/audit_controller.rb +0 -2
- data/app/models/govuk_publishing_components/applications_page.rb +0 -4
- data/app/models/govuk_publishing_components/audit_comparer.rb +3 -54
- data/app/views/govuk_publishing_components/applications_page/_table-content.html.erb +0 -7
- data/app/views/govuk_publishing_components/applications_page/show.html.erb +0 -1
- data/app/views/govuk_publishing_components/audit/_applications.html.erb +2 -6
- data/app/views/govuk_publishing_components/components/_summary_card.html.erb +4 -2
- data/app/views/govuk_publishing_components/components/_summary_list.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/docs/accordion.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/summary_card.yml +7 -0
- data/app/views/govuk_publishing_components/components/docs/tabs.yml +1 -1
- data/lib/govuk_publishing_components/app_helpers/asset_helper.rb +0 -27
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/axe.d.ts +4 -2
- data/node_modules/axe-core/axe.js +80 -39
- data/node_modules/axe-core/axe.min.js +3 -3
- data/node_modules/axe-core/locales/_template.json +4 -2
- data/node_modules/axe-core/package.json +3 -5
- data/node_modules/axe-core/sri-history.json +4 -0
- 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: a21156257b5e597ea82c72a0c2d50ee9c1aa716b7ac8f266e9aefa07c46580e2
|
|
4
|
+
data.tar.gz: 5304c6a976883f19ee7077ea326894c424a56d8d1e288502892f0245a9a331d1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e2f7d8055249839b700a30d2621e5a8383013f8d09b73f48fe316b595f487234a5f2e2908a93cbc385fbc5eb3533090d28d66aa915bb19ebf7db3568379c0e7
|
|
7
|
+
data.tar.gz: a07a2387f95f2c00321326973d3fa17a18d472cc22b2ff834d5f40f5eddb32a502d2e94a1759659400cc42737671d38b7dfc8cebca2e386eedd4df9a997cbd30
|
|
@@ -172,8 +172,8 @@ window.GOVUK.analyticsGa4.analyticsModules = window.GOVUK.analyticsGa4.analytics
|
|
|
172
172
|
return this.PIIRemover.stripPIIWithOverride(document.title, false, true)
|
|
173
173
|
},
|
|
174
174
|
|
|
175
|
-
// window.httpStatusCode is set in the source of the error page
|
|
176
|
-
// https://github.com/alphagov/
|
|
175
|
+
// window.httpStatusCode is set in the source of the error page
|
|
176
|
+
// https://github.com/alphagov/frontend/blob/1d92fe5f0ada726d1c95dae645e1dc2195d9d3fe/app/views/static_error_pages/_error_page.html.erb#L26
|
|
177
177
|
getStatusCode: function () {
|
|
178
178
|
if (window.httpStatusCode) {
|
|
179
179
|
return window.httpStatusCode.toString()
|
|
@@ -248,16 +248,3 @@ $feedback-prompt-border-top-colour: $govuk-blue-tint-50;
|
|
|
248
248
|
color: $govuk-focus-text-colour;
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
-
|
|
252
|
-
// static.css on GOV.UK overwrites the component styles using input[type="text"]
|
|
253
|
-
// so we need to apply govuk-input styles using a stronger selector
|
|
254
|
-
.gem-c-feedback .gem-c-input[type="text"] {
|
|
255
|
-
margin: 0;
|
|
256
|
-
padding: govuk-spacing(1);
|
|
257
|
-
border: $govuk-border-width-form-element solid $govuk-input-border-colour;
|
|
258
|
-
@include govuk-font($size: 19);
|
|
259
|
-
|
|
260
|
-
&:focus {
|
|
261
|
-
outline: $govuk-focus-width solid $govuk-focus-colour;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
@@ -14,17 +14,3 @@ $search-icon-size: 40px;
|
|
|
14
14
|
height: govuk-px-to-rem($search-icon-size);
|
|
15
15
|
background: url("govuk_publishing_components/icon-search.svg") no-repeat -3px center;
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
// this overrides styles from static that break the look of the component
|
|
19
|
-
// unfortunately we then need to override the override for the search icon variant
|
|
20
|
-
// TODO: remove these styles once static is made less aggressive
|
|
21
|
-
.gem-c-input.govuk-input {
|
|
22
|
-
margin: 0;
|
|
23
|
-
min-width: 0;
|
|
24
|
-
padding: govuk-spacing(1);
|
|
25
|
-
box-sizing: border-box;
|
|
26
|
-
|
|
27
|
-
&.gem-c-input--with-search-icon {
|
|
28
|
-
padding-left: govuk-spacing(6);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -2,21 +2,11 @@
|
|
|
2
2
|
@import "govuk/components/summary-list/summary-list";
|
|
3
3
|
|
|
4
4
|
.gem-c-summary-list {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
margin-bottom: govuk-spacing(6);
|
|
7
6
|
@include govuk-font(19);
|
|
8
|
-
@include govuk-responsive-margin(6, "top");
|
|
9
|
-
|
|
10
|
-
&:nth-of-type(1) {
|
|
11
|
-
margin-top: govuk-spacing(0);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&:nth-last-of-type(1) {
|
|
15
|
-
border-bottom: 0;
|
|
16
|
-
}
|
|
17
7
|
|
|
18
8
|
.govuk-summary-list {
|
|
19
|
-
|
|
9
|
+
margin-bottom: 0;
|
|
20
10
|
}
|
|
21
11
|
}
|
|
22
12
|
|
|
@@ -4,7 +4,7 @@ module GovukPublishingComponents
|
|
|
4
4
|
applications = [
|
|
5
5
|
{
|
|
6
6
|
type: "public-facing",
|
|
7
|
-
apps: %w[collections email-alert-frontend feedback finder-frontend frontend government-frontend smart-answers
|
|
7
|
+
apps: %w[collections email-alert-frontend feedback finder-frontend frontend government-frontend smart-answers].sort,
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
type: "publishing",
|
|
@@ -39,7 +39,6 @@ module GovukPublishingComponents
|
|
|
39
39
|
source: app.source,
|
|
40
40
|
gem_version: app.gem_version,
|
|
41
41
|
gem_version_status: app.gem_version == GovukPublishingComponents::VERSION ? "green" : "red",
|
|
42
|
-
slimmer_version: app.slimmer_version,
|
|
43
42
|
sass_version: app.sass_version,
|
|
44
43
|
}
|
|
45
44
|
end
|
|
@@ -20,7 +20,6 @@ module GovukPublishingComponents
|
|
|
20
20
|
govuk-developer-docs
|
|
21
21
|
local-links-manager
|
|
22
22
|
manuals-publisher
|
|
23
|
-
maslow
|
|
24
23
|
places-manager
|
|
25
24
|
publisher
|
|
26
25
|
release
|
|
@@ -31,7 +30,6 @@ module GovukPublishingComponents
|
|
|
31
30
|
signon
|
|
32
31
|
smart-answers
|
|
33
32
|
specialist-publisher
|
|
34
|
-
static
|
|
35
33
|
support
|
|
36
34
|
transition
|
|
37
35
|
travel-advice-publisher
|
|
@@ -16,10 +16,6 @@ module GovukPublishingComponents
|
|
|
16
16
|
parse_file(@gemfilelock, /govuk_publishing_components \(([^)>=~ ]+)\)/)
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
def slimmer_version
|
|
20
|
-
parse_file(@gemfilelock, /slimmer \(([^)>=~ ]+)\)/)
|
|
21
|
-
end
|
|
22
|
-
|
|
23
19
|
def sass_version
|
|
24
20
|
parse_file(@gemfilelock, /sass-embedded \(([^)>=~ ]+)\)/)
|
|
25
21
|
end
|
|
@@ -4,15 +4,6 @@ module GovukPublishingComponents
|
|
|
4
4
|
|
|
5
5
|
def initialize(gem_data, results)
|
|
6
6
|
if gem_data[:gem_found]
|
|
7
|
-
@applications_using_static = %w[
|
|
8
|
-
collections
|
|
9
|
-
finder-frontend
|
|
10
|
-
government-frontend
|
|
11
|
-
service-manual-frontend
|
|
12
|
-
smart-answers
|
|
13
|
-
]
|
|
14
|
-
|
|
15
|
-
@static_data = find_static(results)
|
|
16
7
|
@gem_data = gem_data
|
|
17
8
|
@applications_data = sort_results(results)
|
|
18
9
|
@gem_data[:components_by_application] = get_components_by_application || []
|
|
@@ -23,23 +14,6 @@ module GovukPublishingComponents
|
|
|
23
14
|
|
|
24
15
|
private
|
|
25
16
|
|
|
26
|
-
# find static to check for global includes, reduce false warnings
|
|
27
|
-
def find_static(results)
|
|
28
|
-
results.each do |result|
|
|
29
|
-
if result[:name] == "static" && result[:application_found] == true
|
|
30
|
-
return clean_static(result)
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
false
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
# turn static data into an object so locations can be easily referenced
|
|
38
|
-
# should give object of form { "template" => [], "stylesheet" => [] }
|
|
39
|
-
def clean_static(data)
|
|
40
|
-
Hash[data[:components_found].map { |d| [d[:location], d[:components]] }]
|
|
41
|
-
end
|
|
42
|
-
|
|
43
17
|
def prettify_key(key)
|
|
44
18
|
key.to_s.gsub("_", " ").capitalize
|
|
45
19
|
end
|
|
@@ -50,20 +24,19 @@ module GovukPublishingComponents
|
|
|
50
24
|
results.each do |result|
|
|
51
25
|
if result[:application_found]
|
|
52
26
|
@current_uses_individual_asset_model = result[:uses_individual_asset_model]
|
|
53
|
-
application_uses_static = @applications_using_static.include?(result[:name])
|
|
54
27
|
templates = result[:components_found].find { |c| c[:location] == "template" }
|
|
55
28
|
stylesheets = result[:components_found].find { |c| c[:location] == "stylesheet" }
|
|
56
29
|
javascripts = result[:components_found].find { |c| c[:location] == "javascript" }
|
|
57
30
|
ruby = result[:components_found].find { |c| c[:location] == "ruby" }
|
|
58
31
|
|
|
59
32
|
templates[:components] = include_any_components_within_components(templates[:components])
|
|
33
|
+
ruby[:components] = include_any_components_within_components(ruby[:components])
|
|
60
34
|
|
|
61
35
|
warnings = []
|
|
62
36
|
warnings << warn_about_missing_components(result[:components_found])
|
|
63
37
|
warnings << warn_about_missing_assets(result[:components_found])
|
|
64
38
|
warnings << warn_about_style_overrides(result[:gem_style_references])
|
|
65
39
|
warnings << warn_about_jquery_references(result[:jquery_references])
|
|
66
|
-
warnings << check_for_assets_already_in_static(result[:components_found]) if @static_data && application_uses_static
|
|
67
40
|
warnings = warnings.flatten
|
|
68
41
|
|
|
69
42
|
summary = [
|
|
@@ -89,7 +62,6 @@ module GovukPublishingComponents
|
|
|
89
62
|
name: result[:name],
|
|
90
63
|
dir: result[:dir],
|
|
91
64
|
application_found: result[:application_found],
|
|
92
|
-
uses_static: application_uses_static,
|
|
93
65
|
summary:,
|
|
94
66
|
warnings:,
|
|
95
67
|
warning_count: warnings.length,
|
|
@@ -155,12 +127,10 @@ module GovukPublishingComponents
|
|
|
155
127
|
asset_in_gem = false
|
|
156
128
|
end
|
|
157
129
|
|
|
158
|
-
check_static = @static_data && second_location != "code"
|
|
159
|
-
asset_in_static = asset_already_in_static(second_location, component) if check_static
|
|
160
130
|
suppress_warning = @current_uses_individual_asset_model && second_location == "stylesheet"
|
|
161
|
-
raise_warning = asset_in_gem && !
|
|
131
|
+
raise_warning = asset_in_gem && !suppress_warning
|
|
162
132
|
|
|
163
|
-
# this raises a warning if the asset exists and isn't included
|
|
133
|
+
# this raises a warning if the asset exists and isn't included in the application
|
|
164
134
|
warnings << create_warning(component, "Included in #{first_location} but not #{second_location}") if raise_warning
|
|
165
135
|
end
|
|
166
136
|
end
|
|
@@ -169,27 +139,6 @@ module GovukPublishingComponents
|
|
|
169
139
|
warnings
|
|
170
140
|
end
|
|
171
141
|
|
|
172
|
-
def asset_already_in_static(location, component)
|
|
173
|
-
return true if @static_data[location].include?(component)
|
|
174
|
-
|
|
175
|
-
false
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
def check_for_assets_already_in_static(locations)
|
|
179
|
-
warnings = []
|
|
180
|
-
|
|
181
|
-
locations.each do |location|
|
|
182
|
-
next if %w[template ruby].include?(location[:location])
|
|
183
|
-
|
|
184
|
-
location[:components].each do |component|
|
|
185
|
-
raise_warning = asset_already_in_static(location[:location], component)
|
|
186
|
-
warnings << create_warning(component, "Included in #{location[:location]} but already included in static") if raise_warning
|
|
187
|
-
end
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
warnings
|
|
191
|
-
end
|
|
192
|
-
|
|
193
142
|
def warn_about_missing_assets(components)
|
|
194
143
|
warnings = []
|
|
195
144
|
|
|
@@ -21,13 +21,6 @@
|
|
|
21
21
|
} %>
|
|
22
22
|
<% end %>
|
|
23
23
|
</td>
|
|
24
|
-
<td class="govuk-table__cell">
|
|
25
|
-
<% if app[:slimmer_version] %>
|
|
26
|
-
<%= render "govuk_publishing_components/components/tag", {
|
|
27
|
-
text: app[:slimmer_version],
|
|
28
|
-
} %>
|
|
29
|
-
<% end %>
|
|
30
|
-
</td>
|
|
31
24
|
<td class="govuk-table__cell">
|
|
32
25
|
<% if app[:sass_version] %>
|
|
33
26
|
<%= render "govuk_publishing_components/components/tag", {
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
<th scope="col" class="govuk-table__header sticky-table-header">Type</th>
|
|
25
25
|
<th scope="col" class="govuk-table__header sticky-table-header">Source</th>
|
|
26
26
|
<th scope="col" class="govuk-table__header sticky-table-header">Gem version</th>
|
|
27
|
-
<th scope="col" class="govuk-table__header sticky-table-header">Slimmer version</th>
|
|
28
27
|
<th scope="col" class="govuk-table__header sticky-table-header">Sass version</th>
|
|
29
28
|
</tr>
|
|
30
29
|
</thead>
|
|
@@ -43,12 +43,6 @@
|
|
|
43
43
|
} %>
|
|
44
44
|
<% end %>
|
|
45
45
|
|
|
46
|
-
<% if application[:uses_static] %>
|
|
47
|
-
<%= render "govuk_publishing_components/components/warning_text", {
|
|
48
|
-
text: raw("This application uses <a href=\"https://github.com/alphagov/static\" class=\"govuk-link\">static</a>, which can contain assets for components used in more than one application. Warnings for missing component assets in this application that are already included in static have been suppressed."),
|
|
49
|
-
} %>
|
|
50
|
-
<% end %>
|
|
51
|
-
|
|
52
46
|
<% application[:warnings].each do |warning| %>
|
|
53
47
|
<p class="govuk-body">
|
|
54
48
|
<strong class="govuk-tag">Warn</strong>
|
|
@@ -66,6 +60,8 @@
|
|
|
66
60
|
heading_level: 3,
|
|
67
61
|
} %>
|
|
68
62
|
|
|
63
|
+
<p class="govuk-body">Note that this information includes components within components - the application may not directly reference them.</p>
|
|
64
|
+
|
|
69
65
|
<% items = [] %>
|
|
70
66
|
<% application[:summary].each do |item| %>
|
|
71
67
|
<% content = capture do %>
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
title ||= nil
|
|
6
6
|
summary_card_actions ||= []
|
|
7
7
|
rows ||=[]
|
|
8
|
+
block ||= yield
|
|
8
9
|
|
|
9
10
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
|
10
11
|
component_helper.add_class("gem-c-summary-card")
|
|
@@ -26,8 +27,8 @@
|
|
|
26
27
|
<% end %>
|
|
27
28
|
<% end %>
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
<%= tag.div class: "govuk-summary-card__content" do %>
|
|
31
|
+
<% if rows.any? %>
|
|
31
32
|
<%= tag.dl class: "govuk-summary-list" do %>
|
|
32
33
|
<% rows.each do |row| %>
|
|
33
34
|
<%
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
<% end %>
|
|
63
64
|
<% end %>
|
|
64
65
|
<% end %>
|
|
66
|
+
<%= tag.div block, class: "gem-c-summary__block" if block.present? %>
|
|
65
67
|
<% end %>
|
|
66
68
|
<% end %>
|
|
67
69
|
<% end %>
|
|
@@ -4,7 +4,7 @@ govuk_frontend_components:
|
|
|
4
4
|
- accordion
|
|
5
5
|
body: |
|
|
6
6
|
This component is based on the [GOV.UK Design System accordion component](https://design-system.service.gov.uk/components/accordion/)
|
|
7
|
-
and is currently experimental because more research is needed to validate it. If using this component, [please feed back any research findings to the Design System team](https://design-system.service.gov.uk/
|
|
7
|
+
and is currently experimental because more research is needed to validate it. If using this component, [please feed back any research findings to the Design System team](https://design-system.service.gov.uk/contact/).
|
|
8
8
|
|
|
9
9
|
accessibility_criteria: |
|
|
10
10
|
The accordion must:
|
|
@@ -102,3 +102,10 @@ examples:
|
|
|
102
102
|
value: value1
|
|
103
103
|
data:
|
|
104
104
|
module: "something"
|
|
105
|
+
|
|
106
|
+
with_block:
|
|
107
|
+
description: Use the summary card with a block when you need to show an empty state message or load another component.
|
|
108
|
+
data:
|
|
109
|
+
title: "Topics"
|
|
110
|
+
block: |
|
|
111
|
+
<p class="govuk-body">No topics specified for this document.</p>
|
|
@@ -2,7 +2,7 @@ name: "Tabs (experimental)"
|
|
|
2
2
|
description: "The tabs component lets users toggle between related sections of content."
|
|
3
3
|
body: |
|
|
4
4
|
This component is based on the [GOV.UK Design System tabs component](https://design-system.service.gov.uk/components/tabs/)
|
|
5
|
-
and is currently experimental. If using this component, please feed back any research findings to the [GOV.UK Design System team](https://design-system.service.gov.uk/
|
|
5
|
+
and is currently experimental. If using this component, please feed back any research findings to the [GOV.UK Design System team](https://design-system.service.gov.uk/contact/).
|
|
6
6
|
|
|
7
7
|
The tabs component lets users navigate between related sections of content on a single page,
|
|
8
8
|
displaying one section at a time. Note that they are not intended to be used to navigate
|
|
@@ -10,32 +10,6 @@ module GovukPublishingComponents
|
|
|
10
10
|
"govuk_publishing_components/components/_#{component_name}.css"
|
|
11
11
|
}.freeze
|
|
12
12
|
|
|
13
|
-
# This list includes components already included in Static; taken from
|
|
14
|
-
# https://github.com/alphagov/static/blob/198a598682df40ce4a2c3c286c06244297c18cf0/app/assets/stylesheets/application.scss
|
|
15
|
-
|
|
16
|
-
# This is used to dedupe stylesheets.
|
|
17
|
-
STATIC_STYLESHEET_LIST = %w[
|
|
18
|
-
breadcrumbs
|
|
19
|
-
button
|
|
20
|
-
error-message
|
|
21
|
-
heading
|
|
22
|
-
hint
|
|
23
|
-
input
|
|
24
|
-
label
|
|
25
|
-
search
|
|
26
|
-
search-with-autocomplete
|
|
27
|
-
skip-link
|
|
28
|
-
textarea
|
|
29
|
-
title
|
|
30
|
-
cookie-banner
|
|
31
|
-
cross-service-header
|
|
32
|
-
feedback
|
|
33
|
-
layout-footer
|
|
34
|
-
layout-for-public
|
|
35
|
-
layout-header
|
|
36
|
-
layout-super-navigation-header
|
|
37
|
-
].freeze
|
|
38
|
-
|
|
39
13
|
def add_stylesheet_path(component_path)
|
|
40
14
|
unless is_already_used?(component_path)
|
|
41
15
|
all_component_stylesheets_being_used << component_path
|
|
@@ -86,7 +60,6 @@ module GovukPublishingComponents
|
|
|
86
60
|
def css_exclude_list
|
|
87
61
|
return [] if viewing_component_guide?
|
|
88
62
|
return GovukPublishingComponents::Config.custom_css_exclude_list if GovukPublishingComponents::Config.custom_css_exclude_list&.any?
|
|
89
|
-
return STATIC_STYLESHEET_LIST if GovukPublishingComponents::Config.exclude_css_from_static
|
|
90
63
|
|
|
91
64
|
[]
|
|
92
65
|
end
|
|
@@ -386,8 +386,10 @@ declare namespace axe {
|
|
|
386
386
|
frameContext: FrameContextObject;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
-
interface RawCheckResult
|
|
390
|
-
|
|
389
|
+
interface RawCheckResult extends Omit<
|
|
390
|
+
CheckResult,
|
|
391
|
+
'relatedNodes' | 'impact'
|
|
392
|
+
> {
|
|
391
393
|
relatedNodes?: Array<SerialDqElement | DqElement>;
|
|
392
394
|
impact?: ImpactValue;
|
|
393
395
|
}
|