govuk_publishing_components 61.3.0 → 61.4.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.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-form-change-tracker.js +147 -0
  3. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-form-tracker.js +1 -1
  4. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4-publishing.js +1 -0
  5. data/app/assets/stylesheets/component_guide/application.scss +1 -2
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +0 -4
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss +0 -21
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_emergency-banner.scss +0 -13
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_notice.scss +0 -3
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_signup-link.scss +2 -2
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +0 -4
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +0 -23
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_translation-nav.scss +2 -11
  14. data/app/controllers/govuk_publishing_components/component_guide_controller.rb +0 -44
  15. data/app/views/govuk_publishing_components/component_guide/preview.html.erb +1 -17
  16. data/app/views/govuk_publishing_components/components/_attachment.html.erb +1 -1
  17. data/app/views/govuk_publishing_components/components/_breadcrumbs.html.erb +1 -1
  18. data/app/views/govuk_publishing_components/components/_emergency_banner.html.erb +1 -1
  19. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +6 -4
  20. data/app/views/govuk_publishing_components/components/_published_dates.html.erb +1 -1
  21. data/app/views/govuk_publishing_components/components/_signup_link.html.erb +2 -2
  22. data/app/views/govuk_publishing_components/components/_success_alert.html.erb +1 -1
  23. data/app/views/govuk_publishing_components/components/_translation_nav.html.erb +1 -1
  24. data/app/views/layouts/govuk_publishing_components/application.html.erb +9 -2
  25. data/config/locales/es.yml +2 -2
  26. data/lib/govuk_publishing_components/config.rb +5 -1
  27. data/lib/govuk_publishing_components/presenters/translation_nav_helper.rb +4 -0
  28. data/lib/govuk_publishing_components/version.rb +1 -1
  29. data/node_modules/axe-core/README.md +4 -4
  30. data/node_modules/axe-core/axe.d.ts +74 -10
  31. data/node_modules/axe-core/axe.js +17306 -17047
  32. data/node_modules/axe-core/axe.min.js +2 -2
  33. data/node_modules/axe-core/locales/_template.json +18 -10
  34. data/node_modules/axe-core/locales/de.json +5 -1
  35. data/node_modules/axe-core/locales/ja.json +127 -118
  36. data/node_modules/axe-core/locales/pt_PT.json +1123 -0
  37. data/node_modules/axe-core/locales/ru.json +1127 -0
  38. data/node_modules/axe-core/package.json +9 -9
  39. data/node_modules/axe-core/sri-history.json +4 -0
  40. metadata +5 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a87851becee1d2a17743023f74057913c96f5a6b1f7b59e05f7209149e28a9b
4
- data.tar.gz: 0263a75ae09eb9fa63677a03b146e6668ec4da01b9c989256864cd4db6663aef
3
+ metadata.gz: 7a08a24ff51a519b72ea17e880bba2d3de320188e4b20b7326cb97aaa566eb56
4
+ data.tar.gz: ac0a25916cdd1cbb8a913d7ed554e610a22aefd3e2f403b3a2165db93d6f90d0
5
5
  SHA512:
6
- metadata.gz: 18a4f902404fc7757833b25044bbeddb6b5730845d2f1ed4232be223b49ca4939874a8f26036fc26c37dfe193f13cc1821307b3b2ba518c39d487f7e32dc708b
7
- data.tar.gz: d15b3f54fd67cdd8bc0677a6040e594ade6c7455756709a8c6d933e7231d97a543e7c4884764c271b3a501e0467c271c564d814e3226ae1defc327c96ee6aefc
6
+ metadata.gz: 69ed671966bbbf93e4fe3f5403572bb8a6cfd24741d03ea4331584bb82182660b8701c3690235b35e957e14c78ae7a75bd2d1539dbcd6358e4b8e4bc533f8294
7
+ data.tar.gz: 54dcbf6077fcdb4d1c749233f7f0158c01da501b3ca6191cfb36443b1228902932fcb27ab14746f4d55e38dabdcd3f3c961daac9c870b11cc2dd7e432c125e6e
@@ -0,0 +1,147 @@
1
+ window.GOVUK = window.GOVUK || {}
2
+ window.GOVUK.Modules = window.GOVUK.Modules || {};
3
+
4
+ // This does not meet Grade C browser support for Edge
5
+ // as `CSS.escape` is not supported in Edge 12-18.
6
+ //
7
+ // Running this will cause an error in Edge 12-18
8
+ // but will not impact other JS being run.
9
+
10
+ (function (Modules) {
11
+ 'use strict'
12
+
13
+ function Ga4FormChangeTracker (module) {
14
+ this.module = module
15
+ }
16
+
17
+ Ga4FormChangeTracker.prototype.init = function () {
18
+ var consentCookie = window.GOVUK.getConsentCookie()
19
+
20
+ if (consentCookie && consentCookie.usage) {
21
+ this.startModule()
22
+ } else {
23
+ this.start = this.startModule.bind(this)
24
+ window.addEventListener('cookie-consent', this.start)
25
+ }
26
+ }
27
+
28
+ // triggered by cookie-consent event, which happens when users consent to cookies
29
+ Ga4FormChangeTracker.prototype.startModule = function () {
30
+ if (window.dataLayer) {
31
+ window.removeEventListener('cookie-consent', this.start)
32
+ this.module.addEventListener('change', this.trackFormChange.bind(this))
33
+ }
34
+ }
35
+
36
+ Ga4FormChangeTracker.prototype.getSection = function (target, checkableValue) {
37
+ const { id } = target
38
+
39
+ const fieldset = target.closest('fieldset')
40
+ const legend = fieldset && fieldset.querySelector('legend')
41
+ const sectionContainer = this.module.closest('[data-ga4-section]')
42
+ const label = this.module.querySelector(`label[for='${window.CSS.escape(id)}']`)
43
+
44
+ const ga4FormSectionContainer = target.closest('[data-ga4-form-section]')
45
+
46
+ // by default use the nearest `data-ga4-section` (if present)
47
+ let section = sectionContainer && sectionContainer.dataset.ga4Section
48
+
49
+ // unless there is a nearest `data-ga4-form-section`
50
+ if (ga4FormSectionContainer) {
51
+ section = ga4FormSectionContainer.dataset.ga4FormSection
52
+ } else {
53
+ // otherwise use the label of input (if it is a text field)
54
+ section = label ? label.innerText : section
55
+ // or use the legend of the input (if it is checkable field)
56
+ section = legend && checkableValue ? legend.innerText : section
57
+ }
58
+
59
+ return section
60
+ }
61
+
62
+ Ga4FormChangeTracker.prototype.handleDateComponent = function (target) {
63
+ const isDateComponent = target.closest('.govuk-date-input')
64
+ const value = target.value
65
+
66
+ if (!isDateComponent) { return value.length }
67
+
68
+ // only track if completely filled in
69
+ const inputs = [
70
+ ...target.closest('.govuk-date-input').querySelectorAll('input')
71
+ ]
72
+ const allInputsSet = inputs.every((input) => input.value)
73
+
74
+ if (allInputsSet) {
75
+ return inputs.map((input) => input.value).join('/')
76
+ }
77
+ }
78
+
79
+ Ga4FormChangeTracker.prototype.trackFormChange = function (event) {
80
+ const target = event.target
81
+ const { type, id } = target
82
+
83
+ if (type === 'search') return
84
+
85
+ const indexContainer =
86
+ window.GOVUK.analyticsGa4.core.trackFunctions.findTrackingAttributes(
87
+ target,
88
+ 'data-ga4-index'
89
+ )
90
+
91
+ let index = {}
92
+
93
+ if (indexContainer) {
94
+ try {
95
+ index = JSON.parse(indexContainer.getAttribute('data-ga4-index'))
96
+ } catch (e) {
97
+ console.warn('GA4 configuration error: ' + e.message, window.location)
98
+ }
99
+ }
100
+
101
+ const value = (event.detail && event.detail.value) || target.value
102
+
103
+ // a radio or check input with a `name` and `value`
104
+ // or an option of `value` within a `select` with `name`
105
+ const checkableValue = this.module.querySelector(
106
+ `#${window.CSS.escape(id)}[value="${window.CSS.escape(value)}"], #${window.CSS.escape(id)} [value="${window.CSS.escape(value)}"]`
107
+ )
108
+
109
+ let action = 'select'
110
+ let text
111
+
112
+ if (checkableValue) {
113
+ // radio, check, option can have `:checked` pseudo-class
114
+ if (!checkableValue.matches(':checked')) {
115
+ action = 'remove'
116
+ }
117
+
118
+ text = checkableValue.innerText ||
119
+ this.module.querySelector(`label[for='${window.CSS.escape(id)}']`).innerText
120
+
121
+ if (text) {
122
+ text = text.replace(/\r?\n|\r/g, ' ')
123
+ }
124
+ } else if (!text) {
125
+ // it's a free form text field
126
+ text = this.handleDateComponent(target)
127
+
128
+ if (!text) return
129
+ }
130
+
131
+ window.GOVUK.analyticsGa4.core.applySchemaAndSendData(
132
+ {
133
+ ...index,
134
+ section: this.getSection(
135
+ target,
136
+ checkableValue && checkableValue.matches(':not(option)')
137
+ ),
138
+ event_name: 'select_content',
139
+ action,
140
+ text
141
+ },
142
+ 'event_data'
143
+ )
144
+ }
145
+
146
+ Modules.Ga4FormChangeTracker = Ga4FormChangeTracker
147
+ })(window.GOVUK.Modules)
@@ -85,7 +85,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
85
85
  var labelFor = label.getAttribute('for')
86
86
  var input = false
87
87
  if (labelFor) {
88
- input = this.module.querySelector('[id=' + labelFor + ']')
88
+ input = this.module.querySelector('[id="' + labelFor + '"]')
89
89
  } else {
90
90
  input = label.querySelector('input')
91
91
  }
@@ -0,0 +1 @@
1
+ //= require ./analytics-ga4/ga4-form-change-tracker
@@ -1,7 +1,6 @@
1
1
  // This file contains the styles for the Component Guide.
2
2
  @use "sass:color";
3
- @import "govuk_publishing_components/govuk_frontend_support";
4
- @import "govuk_publishing_components/component_support";
3
+ @import "govuk_publishing_components/all_components";
5
4
 
6
5
  // Include required helpers
7
6
  @import "../../stylesheets/govuk_publishing_components/components/helpers/markdown-typography";
@@ -59,10 +59,6 @@ $thumbnail-icon-border-colour: govuk-colour("mid-grey");
59
59
  @include govuk-font($size: 27);
60
60
  }
61
61
 
62
- .gem-c-attachment__link {
63
- line-height: 1.29;
64
- }
65
-
66
62
  .gem-c-attachment__metadata {
67
63
  margin: 0 0 govuk-spacing(3);
68
64
  color: $govuk-secondary-text-colour;
@@ -1,27 +1,6 @@
1
1
  @import "govuk_publishing_components/individual_component_support";
2
2
  @import "govuk/components/breadcrumbs/breadcrumbs";
3
3
 
4
- .gem-c-breadcrumbs--inverse .govuk-breadcrumbs__list-item .govuk-breadcrumbs__link {
5
- &:link,
6
- &:visited,
7
- &:hover,
8
- &:active {
9
- color: govuk-colour("white");
10
- }
11
-
12
- &:focus {
13
- color: $govuk-focus-text-colour;
14
- }
15
- }
16
-
17
- .gem-c-breadcrumbs--inverse .govuk-breadcrumbs__list-item {
18
- color: govuk-colour("white");
19
- }
20
-
21
- .gem-c-breadcrumbs--inverse .govuk-breadcrumbs__list-item::before {
22
- border-color: govuk-colour("white");
23
- }
24
-
25
4
  .gem-c-breadcrumbs--border-bottom {
26
5
  border-bottom: 1px solid $govuk-border-colour;
27
6
  padding-bottom: govuk-spacing(1);
@@ -49,19 +49,6 @@
49
49
  margin: govuk-spacing(4) 0;
50
50
  }
51
51
 
52
- .gem-c-emergency-banner__link {
53
- @include govuk-font(19);
54
- }
55
-
56
- .gem-c-emergency-banner__link:link,
57
- .gem-c-emergency-banner__link:visited {
58
- color: govuk-colour("white");
59
- }
60
-
61
- .gem-c-emergency-banner__link:focus {
62
- @include govuk-focused-text;
63
- }
64
-
65
52
  .gem-c-emergency-banner--notable-death {
66
53
  background-color: govuk-colour("black");
67
54
  }
@@ -2,9 +2,6 @@
2
2
  @import "govuk/components/notification-banner/notification-banner";
3
3
 
4
4
  .gem-c-notice {
5
- clear: both;
6
- @include govuk-responsive-margin(8, "bottom");
7
-
8
5
  .govuk-govspeak {
9
6
  p:last-child {
10
7
  margin-bottom: 0;
@@ -17,8 +17,8 @@
17
17
  }
18
18
 
19
19
  .gem-c-signup-link__title {
20
- margin-bottom: govuk-spacing(2);
21
- margin-left: govuk-spacing(5);
20
+ margin: 0 0 govuk-spacing(2) govuk-spacing(5);
21
+ @include govuk-font(19, $weight: "bold");
22
22
  }
23
23
 
24
24
  .gem-c-signup-link--with-background-and-border {
@@ -1,10 +1,6 @@
1
1
  @import "govuk_publishing_components/individual_component_support";
2
2
  @import "govuk/components/notification-banner/notification-banner";
3
3
 
4
- .gem-c-success-alert__message {
5
- @include govuk-font(19, $weight: bold);
6
- }
7
-
8
4
  // stylelint-disable declaration-no-important
9
5
  @include govuk-media-query($media-type: print) {
10
6
  .gem-c-success-alert {
@@ -9,29 +9,6 @@
9
9
  }
10
10
  }
11
11
 
12
- // We have some styles within GOVUK (.content-block) which can leak into the list styles for this component.
13
- // These styles are defined in Static:
14
- // https://github.com/alphagov/static/blob/a815620cada7ea1c65428c1c3b3ac4dbe28977bf/app/assets/stylesheets/helpers/_text.scss
15
- // This sets more specific selectors so those unwanted styles are overidden
16
- ul.govuk-tabs__list { // stylelint-disable-line selector-no-qualifying-type
17
- margin: 0;
18
- padding: 0;
19
- list-style: none;
20
- @include govuk-responsive-margin(6, "bottom");
21
- }
22
-
23
- li.govuk-tabs__list-item { // stylelint-disable-line selector-no-qualifying-type
24
- margin-left: govuk-spacing(5);
25
- }
26
-
27
- .govuk-frontend-supported { // stylelint-disable-line no-duplicate-selectors
28
- @include govuk-media-query($from: tablet) {
29
- ul.govuk-tabs__list { // stylelint-disable-line selector-no-qualifying-type
30
- margin-bottom: 0;
31
- }
32
- }
33
- }
34
-
35
12
  @include govuk-media-query($media-type: print) {
36
13
  .govuk-tabs__title {
37
14
  display: block !important; // stylelint-disable-line declaration-no-important
@@ -33,18 +33,9 @@
33
33
 
34
34
  .gem-c-translation-nav--inverse {
35
35
  border-color: govuk-colour("white");
36
-
37
- .gem-c-translation-nav__list-item,
38
- .gem-c-translation-nav__link {
39
- color: govuk-colour("white");
40
-
41
- &:focus {
42
- color: govuk-colour("black");
43
- }
44
- }
36
+ color: govuk-colour("white");
45
37
  }
46
38
 
47
39
  .gem-c-translation-nav__list-item:last-child {
48
- border-right: 0;
49
- border-left: 0;
40
+ border: 0;
50
41
  }
@@ -35,21 +35,6 @@ module GovukPublishingComponents
35
35
  def preview
36
36
  @component_examples = []
37
37
  @component_doc = component_docs.get(params[:component])
38
-
39
- @all_components = true if params[:all_components] == "true"
40
- @all_gem_component_docs = []
41
- @all_app_component_docs = []
42
- if @all_components
43
- @component_gem_path = Gem.loaded_specs["govuk_publishing_components"].full_gem_path
44
-
45
- # Remove components without CSS, and the current component. The current component is excluded as the view will handle rendering its CSS.
46
- @all_gem_component_docs = gem_component_docs.all.reject { |component| !component_has_sass_file(component.id.gsub("_", "-")) || component.id == @component_doc.id }
47
- @all_app_component_docs = component_docs.all.reject { |component| !app_component_has_sass_file(component.id.gsub("_", "-")) || component.id == @component_doc.id }
48
-
49
- @current_component_id = @component_doc.id.gsub("_", "-")
50
- @render_component_first = params[:render_component_first] == "true" unless !component_has_sass_file(@current_component_id) && !app_component_has_sass_file(@current_component_id)
51
- end
52
-
53
38
  @preview = true
54
39
 
55
40
  if params[:example].present?
@@ -57,9 +42,6 @@ module GovukPublishingComponents
57
42
  else
58
43
  @component_examples = @component_doc.examples
59
44
  end
60
-
61
- @percy = true if params[:percy] == "true"
62
- @preview_title = preview_title(@component_doc, @component_examples, @all_components, @render_component_first, @percy)
63
45
  end
64
46
 
65
47
  def components_in_use_sass
@@ -154,10 +136,6 @@ module GovukPublishingComponents
154
136
  extra_components.flatten.uniq.sort
155
137
  end
156
138
 
157
- def app_component_has_sass_file(component)
158
- Pathname.new(Rails.root + "app/assets/stylesheets/components/_#{component}.scss").exist?
159
- end
160
-
161
139
  def component_has_sass_file(component)
162
140
  Pathname.new(@component_gem_path + "/app/assets/stylesheets/govuk_publishing_components/components/_#{component}.scss").exist?
163
141
  end
@@ -190,27 +168,5 @@ module GovukPublishingComponents
190
168
  h[:url] = component_doc_path(component_doc.id) if component_example
191
169
  end
192
170
  end
193
-
194
- def preview_title(component, component_examples, all_components, render_component_first, percy)
195
- title = [component.name]
196
-
197
- if component_examples.length == 1 && !percy
198
- title[0] << ": #{component_examples.first.name} preview"
199
- end
200
-
201
- if all_components
202
- title << "+ every component's CSS file"
203
-
204
- title << if render_component_first
205
- "- component rendering first"
206
- else
207
- "- component rendering last"
208
- end
209
- end
210
-
211
- title << "- #{GovukPublishingComponents::Config.component_guide_title}" unless percy
212
-
213
- title.join(" ")
214
- end
215
171
  end
216
172
  end
@@ -1,20 +1,4 @@
1
- <% content_for :application_stylesheet do
2
- if @all_components
3
- # If rendering the component CSS first, do it explicitly here. If not, the component partial render will handle the CSS import.
4
- if @render_component_first
5
- if @component_doc.source == "application"
6
- add_app_component_stylesheet(@current_component_id)
7
- else
8
- add_gem_component_stylesheet(@current_component_id)
9
- end
10
- end
11
- @all_gem_component_docs.each do |component|
12
- add_gem_component_stylesheet(component.id.gsub("_", "-"))
13
- end
14
- @all_app_component_docs.each do |component|
15
- add_app_component_stylesheet(component.id.gsub("_", "-"))
16
- end
17
- end %>
1
+ <% content_for :application_stylesheet do %>
18
2
  <% if @component_doc.source == "application" && application_stylesheet_in_use? %>
19
3
  <%= render "application_stylesheet" %>
20
4
  <% end %>
@@ -88,7 +88,7 @@
88
88
  <%= tag.div class: "gem-c-attachment__details" do %>
89
89
  <%= content_tag(shared_helper.get_heading_level, class: "gem-c-attachment__title") do %>
90
90
  <%= link_to attachment.title, attachment.url,
91
- class: "govuk-link gem-c-attachment__link",
91
+ class: "govuk-link",
92
92
  target: target,
93
93
  data: url_data_attributes %>
94
94
  <% end %>
@@ -10,7 +10,7 @@
10
10
 
11
11
  classes = %w[gem-c-breadcrumbs govuk-breadcrumbs]
12
12
  classes << "govuk-breadcrumbs--collapse-on-mobile" if collapse_on_mobile
13
- classes << "gem-c-breadcrumbs--inverse" if inverse
13
+ classes << "govuk-breadcrumbs--inverse" if inverse
14
14
  classes << "gem-c-breadcrumbs--border-bottom" if border == "bottom"
15
15
 
16
16
  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
@@ -58,7 +58,7 @@
58
58
  <% end %>
59
59
  <% end %>
60
60
  <% if link %>
61
- <a href="<%= link %>" class="gem-c-emergency-banner__link">
61
+ <a href="<%= link %>" class="govuk-link govuk-link--inverse">
62
62
  <%= link_text %>
63
63
  </a>
64
64
  <% end %>
@@ -82,10 +82,12 @@
82
82
  service_name: service_name,
83
83
  } %>
84
84
  <% else %>
85
- <%= render "govuk_publishing_components/components/layout_super_navigation_header", {
86
- homepage:,
87
- logo_link: logo_link,
88
- } %>
85
+ <% I18n.with_locale(:en) do %>
86
+ <%= render "govuk_publishing_components/components/layout_super_navigation_header", {
87
+ homepage:,
88
+ logo_link: logo_link,
89
+ } %>
90
+ <% end %>
89
91
  <% end %>
90
92
  <% end %>
91
93
 
@@ -23,7 +23,7 @@
23
23
  <% if last_updated %>
24
24
  <%= t("components.published_dates.last_updated", date: last_updated) %>
25
25
  <% if link_to_history && history.empty? %>
26
- <span aria-hidden="true">— </span><a href="#history" class="gem-c-published-dates__history-link govuk-link"><%= t("components.published_dates.see_all_updates", locale: :en) %></a>
26
+ <span aria-hidden="true">— </span><a href="#history" class="govuk-link"><%= t("components.published_dates.see_all_updates", locale: :en) %></a>
27
27
  <% elsif history.any? %>
28
28
  <a href="#full-history"
29
29
  class="gem-c-published-dates__toggle govuk-link"
@@ -17,11 +17,11 @@
17
17
  %>
18
18
  <% if link_text && link_href %>
19
19
  <%= tag.div(**component_helper.all_attributes) do %>
20
- <div class="gem-c-signup-link__inner govuk-width-container">
20
+ <div class="gem-c-signup-link__inner">
21
21
  <svg class="gem-c-signup-link__icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="18" width="18" viewBox="0 0 459.334 459.334">
22
22
  <path fill="black" d="M177.216 404.514c-.001.12-.009.239-.009.359 0 30.078 24.383 54.461 54.461 54.461s54.461-24.383 54.461-54.461c0-.12-.008-.239-.009-.359H175.216zM403.549 336.438l-49.015-72.002v-89.83c0-60.581-43.144-111.079-100.381-122.459V24.485C254.152 10.963 243.19 0 229.667 0s-24.485 10.963-24.485 24.485v27.663c-57.237 11.381-100.381 61.879-100.381 122.459v89.83l-49.015 72.002a24.76 24.76 0 0 0 20.468 38.693H383.08a24.761 24.761 0 0 0 20.469-38.694z" />
23
23
  </svg>
24
- <%= content_tag(shared_helper.get_heading_level, heading, class: "govuk-heading-s gem-c-signup-link__title") if heading %>
24
+ <%= content_tag(shared_helper.get_heading_level, heading, class: "gem-c-signup-link__title") if heading %>
25
25
  <%= link_to( link_text, link_href, {
26
26
  class: "govuk-link gem-c-signup-link__link",
27
27
  data: data,
@@ -21,7 +21,7 @@
21
21
  <%= tag.h3 message, class: "govuk-notification-banner__heading" %>
22
22
  <%= description %>
23
23
  <% else %>
24
- <%= tag.p message, class: "govuk-body gem-c-success-alert__message" %>
24
+ <%= tag.p message, class: "govuk-notification-banner__heading" %>
25
25
  <% end %>
26
26
  </div>
27
27
  <% end %>
@@ -21,7 +21,7 @@
21
21
  hreflang: translation[:locale],
22
22
  lang: translation[:locale],
23
23
  rel: "alternate",
24
- class: "govuk-link gem-c-translation-nav__link #{brand_helper.color_class}",
24
+ class: "govuk-link #{translation_helper.link_class} #{brand_helper.color_class}",
25
25
  data: translation[:data_attributes] %>
26
26
  <% end %>
27
27
  </li>
@@ -26,7 +26,15 @@
26
26
  <html lang="en" class="<%= "govuk-template" unless @preview %> govuk-template--rebranded">
27
27
  <head>
28
28
  <meta charset="utf-8">
29
- <title><% if @preview %><%= @preview_title %><% else %><%= yield :title %><% if content_for(:title) %> - <% end %><%= GovukPublishingComponents::Config.component_guide_title %><% end %></title>
29
+ <title>
30
+ <% if @preview %>
31
+ <%= @component_doc.name %><% if @component_examples.length == 1 %>:
32
+ <%= @component_examples.first.name %>
33
+ <% end %>
34
+ preview -
35
+ <% end %>
36
+ <%= yield :title %><% if content_for(:title) %> - <% end %><%= GovukPublishingComponents::Config.component_guide_title %>
37
+ </title>
30
38
  <meta name="robots" content="noindex,nofollow,noimageindex">
31
39
  <meta name="viewport" content="width=device-width, initial-scale=1">
32
40
  <%= csrf_meta_tags %>
@@ -34,7 +42,6 @@
34
42
 
35
43
  <%= stylesheet_link_tag "component_guide/application", media: "all" %>
36
44
  <%= yield :application_stylesheet %>
37
- <%= render_component_stylesheets %>
38
45
  <%= yield :extra_headers %>
39
46
  </head>
40
47
  <body class="gem-c-layout-for-admin govuk-template__body">
@@ -104,8 +104,8 @@ es:
104
104
  intervention:
105
105
  accessible_link_text_suffix:
106
106
  layout_footer:
107
- copyright_html: <a class='govuk-footer__link govuk-footer__copyright-logo' href='http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Derechos de autor de la corona</a>
108
- licence_html: Todo el contenido está disponible bajo la <a class='govuk-footer__link' href='https://www.nationalarchives.gov.uk/doc/open-government-license/version/3/" rel='license'>Licencia de Gobierno Abierto v3,0</a>, excepto donde se indique lo contrario
107
+ copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Derechos de autor de la corona</a>
108
+ licence_html: Todo el contenido está disponible bajo la <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-license/version/3/" rel="license">Licencia de Gobierno Abierto v3,0</a>, excepto donde se indique lo contrario
109
109
  navigation_links:
110
110
  support_links: Enlaces de soporte
111
111
  layout_for_public:
@@ -35,10 +35,14 @@ module GovukPublishingComponents
35
35
  Gem::Specification.find_by_name("govuk_publishing_components").gem_dir
36
36
  end
37
37
 
38
+ def self.component_guide_stylesheet
39
+ { "#{gem_directory}/app/assets/stylesheets/component_guide/application.scss" => "component_guide/application.css" }
40
+ end
41
+
38
42
  def self.all_stylesheets
39
43
  stylesheets = Dir.glob("#{gem_directory}/app/assets/stylesheets/govuk_publishing_components/components/*.scss")
40
44
 
41
- application_stylesheet_hash = { "#{gem_directory}/app/assets/stylesheets/component_guide/application.scss" => "component_guide/application.css" }
45
+ application_stylesheet_hash = component_guide_stylesheet
42
46
 
43
47
  stylesheets.each_with_object(application_stylesheet_hash) do |path, hsh|
44
48
  hsh[path] = "govuk_publishing_components/components/#{File.basename(path, '.*')}.css"
@@ -22,6 +22,10 @@ module GovukPublishingComponents
22
22
  def inverse_class
23
23
  "gem-c-translation-nav--inverse"
24
24
  end
25
+
26
+ def link_class
27
+ "govuk-link--inverse" if @inverse
28
+ end
25
29
  end
26
30
  end
27
31
  end
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "61.3.0".freeze
2
+ VERSION = "61.4.0".freeze
3
3
  end
@@ -138,21 +138,21 @@ axe.configure({
138
138
  Axe-core supports the following locales. Do note that since locales are contributed by our community, they are not guaranteed to include all translations needed in a release.
139
139
 
140
140
  - Basque
141
+ - Chinese (Simplified)
142
+ - Chinese (Traditional)
141
143
  - Danish
142
144
  - Dutch
143
145
  - French
144
146
  - German
147
+ - Greek
145
148
  - Hebrew
149
+ - Italian
146
150
  - Japanese
147
151
  - Korean
148
152
  - Norwegian (Bokmål)
149
153
  - Polish
150
154
  - Portuguese (Brazilian)
151
155
  - Spanish
152
- - Greek
153
- - Italian
154
- - Simplified Chinese
155
- - Traditional Chinese
156
156
 
157
157
  ## Updates & Security
158
158