govuk_publishing_components 24.9.2 → 24.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics/pii.js +1 -1
  3. data/app/assets/javascripts/govuk_publishing_components/analytics/scroll-tracker.js +13 -248
  4. data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +1 -2
  5. data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +1 -0
  6. data/app/assets/javascripts/govuk_publishing_components/components/show-password.js +12 -0
  7. data/app/assets/javascripts/govuk_publishing_components/lib/trigger-event.js +18 -0
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +34 -34
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +0 -37
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak.scss +1 -0
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +15 -18
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_notice.scss +4 -2
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +4 -4
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +20 -20
  15. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_advisory.scss +27 -24
  16. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +1 -1
  17. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +1 -0
  18. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss +1 -0
  19. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +1 -0
  20. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss +1 -0
  21. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss +1 -0
  22. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss +1 -0
  23. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_form-download.scss +19 -16
  24. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_fraction.scss +1 -0
  25. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_highlight-answer.scss +30 -27
  26. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_images.scss +1 -0
  27. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss +1 -0
  28. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_legislative-list.scss +1 -0
  29. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss +26 -21
  30. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_stat-headline.scss +1 -0
  31. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_steps.scss +19 -16
  32. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_summary.scss +21 -18
  33. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +1 -0
  34. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss +1 -0
  35. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +1 -0
  36. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss +2 -0
  37. data/app/views/govuk_publishing_components/components/_government_navigation.html.erb +7 -7
  38. data/app/views/govuk_publishing_components/components/_layout_header.html.erb +1 -1
  39. data/app/views/govuk_publishing_components/components/_metadata.html.erb +9 -8
  40. data/app/views/govuk_publishing_components/components/_notice.html.erb +1 -1
  41. data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +1 -1
  42. data/app/views/govuk_publishing_components/components/_radio.html.erb +6 -11
  43. data/app/views/govuk_publishing_components/components/_show_password.html.erb +2 -0
  44. data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +4 -4
  45. data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +1 -1
  46. data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +1 -1
  47. data/app/views/govuk_publishing_components/components/_success_alert.html.erb +1 -1
  48. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +9 -27
  49. data/app/views/govuk_publishing_components/components/docs/show_password.yml +10 -0
  50. data/app/views/govuk_publishing_components/components/docs/success_alert.yml +5 -0
  51. data/app/views/govuk_publishing_components/components/feedback/_yes_no_banner.html.erb +1 -1
  52. data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +1 -1
  53. data/app/views/govuk_publishing_components/components/metadata/_sentence.html.erb +2 -2
  54. data/app/views/govuk_publishing_components/components/related_navigation/_section.html.erb +4 -3
  55. data/config/locales/cy.yml +0 -5
  56. data/config/locales/en.yml +12 -9
  57. data/lib/govuk_publishing_components/presenters/breadcrumb_selector.rb +5 -0
  58. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +4 -0
  59. data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +0 -1
  60. data/lib/govuk_publishing_components/version.rb +1 -1
  61. metadata +17 -3
  62. data/app/assets/javascripts/component_guide/visual-regression.js +0 -71
@@ -1,7 +1,7 @@
1
1
  <%
2
2
  environment ||= nil
3
3
  full_width ||= false
4
- navigation_aria_label ||= "Top level"
4
+ navigation_aria_label ||= t("components.layout_header.top_level")
5
5
  navigation_items ||= []
6
6
  product_name ||= nil
7
7
  remove_bottom_border ||= false
@@ -18,34 +18,35 @@
18
18
  <%= content_tag :div, class: classes, data: { module: "gem-toggle" } do %>
19
19
  <dl data-module="gem-track-click">
20
20
  <% if from.any? %>
21
- <dt class="gem-c-metadata__term"><%= t("govuk_component.metadata.from", default: "From") %>:</dt>
21
+ <dt class="gem-c-metadata__term"><%= t("components.metadata.from", default: "From") %>:</dt>
22
22
  <dd class="gem-c-metadata__definition">
23
23
  <%= render 'govuk_publishing_components/components/metadata/sentence', items: from, toggle_id: "from-#{SecureRandom.hex(4)}" %>
24
24
  </dd>
25
25
  <% end %>
26
26
  <% if part_of.any? %>
27
- <dt class="gem-c-metadata__term"><%= t("govuk_component.metadata.part_of", default: "Part of") %>:</dt>
27
+ <dt class="gem-c-metadata__term"><%= t("components.metadata.part_of", default: "Part of") %>:</dt>
28
28
  <dd class="gem-c-metadata__definition">
29
29
  <%= render 'govuk_publishing_components/components/metadata/sentence', items: part_of, toggle_id: "part-of-#{SecureRandom.hex(4)}" %>
30
30
  </dd>
31
31
  <% end %>
32
32
  <% if local_assigns.include?(:history) %>
33
- <dt class="gem-c-metadata__term"><%= t("govuk_component.metadata.history", default: "History") %>:</dt>
33
+ <dt class="gem-c-metadata__term"><%= t("components.metadata.history", default: "History") %>:</dt>
34
34
  <dd class="gem-c-metadata__definition"><%= history %></dd>
35
35
  <% end %>
36
36
  <% if local_assigns.include?(:first_published) && first_published %>
37
- <dt class="gem-c-metadata__term"><%= t("govuk_component.metadata.published", default: "Published") %>:</dt>
37
+ <dt class="gem-c-metadata__term"><%= t("components.metadata.published", default: "Published") %></dt>
38
38
  <dd class="gem-c-metadata__definition"><%= first_published %></dd>
39
39
  <% end %>
40
40
  <% if local_assigns.include?(:last_updated) && last_updated %>
41
- <dt class="gem-c-metadata__term"><%= t("govuk_component.metadata.last_updated", default: "Last updated") %>:</dt>
41
+ <dt class="gem-c-metadata__term"><%= t("components.metadata.last_updated", default: "Last updated") %></dt>
42
42
  <dd class="gem-c-metadata__definition">
43
- <%= last_updated %><% if local_assigns.include?(:see_updates_link) %>,
44
- <a href="#history" class="gem-c-metadata__definition-link"
43
+ <%= last_updated %>
44
+ <% if local_assigns.include?(:see_updates_link) %>
45
+ &#8212; <a href="#history" class="gem-c-metadata__definition-link"
45
46
  data-track-category="content-history"
46
47
  data-track-action="see-all-updates-link-clicked"
47
48
  data-track-label="history">
48
- <%= t("govuk_component.metadata.see_all_updates", default: "see all updates") %>
49
+ <%= t("components.metadata.see_all_updates", default: "see all updates") %>
49
50
  </a>
50
51
  <% end %>
51
52
  </dd>
@@ -10,7 +10,7 @@
10
10
 
11
11
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
12
12
 
13
- css_classes = %w(gem-c-notice)
13
+ css_classes = %w[gem-c-notice]
14
14
  css_classes << (shared_helper.get_margin_bottom)
15
15
 
16
16
  aria_attributes = aria_live ? {label: 'Notice', live: 'polite'} : {label: 'Notice'}
@@ -2,7 +2,7 @@
2
2
  <nav
3
3
  class="gem-c-pagination"
4
4
  role="navigation"
5
- aria-label="<%= t("govuk_component.previous_and_next_navigation.pagination", default: "Pagination") %>"
5
+ aria-label="<%= t("components.previous_and_next_navigation.pagination", default: "Pagination") %>"
6
6
  >
7
7
  <ul class="gem-c-pagination__list" data-module="gem-track-click">
8
8
  <% if local_assigns.include?(:previous_page) %>
@@ -11,6 +11,9 @@
11
11
  small ||= false
12
12
  inline ||= false
13
13
  is_page_heading ||= false
14
+ heading_level = is_page_heading ? 'h1' : shared_helper.get_heading_level
15
+ heading_classes = %w(govuk-fieldset__heading)
16
+ heading_classes << "gem-c-radio__heading-text" if heading_level == 'h1'
14
17
 
15
18
  if ['s', 'm', 'l', 'xl'].include?(heading_size)
16
19
  size = heading_size
@@ -46,20 +49,12 @@
46
49
  %>
47
50
  <%= tag.div id: id, class: form_group_css_classes do %>
48
51
  <%= tag.fieldset class: "govuk-fieldset", "aria-describedby": aria do %>
49
-
50
52
  <% if heading.present? %>
51
- <% if is_page_heading %>
52
- <%= tag.legend class: legend_classes do %>
53
- <%= tag.span(heading_caption, class: "govuk-caption-#{size}") if heading_caption.present? %>
54
- <%= tag.h1 heading, class: "gem-c-radio__heading-text govuk-fieldset__heading" %>
55
- <% end %>
56
- <% else %>
57
- <%= tag.legend class: legend_classes do %>
58
- <%= content_tag(shared_helper.get_heading_level, heading, class: "govuk-fieldset__heading") %>
59
- <% end %>
53
+ <%= tag.legend class: legend_classes do %>
54
+ <%= tag.span(heading_caption, class: "govuk-caption-#{size}") if heading_caption.present? %>
55
+ <%= content_tag(heading_level, heading, class: heading_classes) %>
60
56
  <% end %>
61
57
  <% end %>
62
-
63
58
  <% if description.present? %>
64
59
  <%= tag.div description, class: "govuk-body" %>
65
60
  <% end %>
@@ -9,6 +9,7 @@
9
9
  hint ||= nil
10
10
  error_message ||= nil
11
11
  error_items ||= nil
12
+ data ||= nil
12
13
 
13
14
  if !label
14
15
  raise ArgumentError, "This component requires a label"
@@ -37,6 +38,7 @@
37
38
  error_items: error_items,
38
39
  type: "password",
39
40
  autocomplete: autocomplete,
41
+ data: data,
40
42
  } %>
41
43
  <% end %>
42
44
  <% end %>
@@ -22,10 +22,10 @@
22
22
  class="gem-c-step-nav js-hidden <% unless small %>gem-c-step-nav--large<% end %>"
23
23
  <%= "data-remember" if remember_last_step %>
24
24
  <%= "data-id=#{tracking_id}" if tracking_id %>
25
- data-show-text="<%= t("govuk_component.step_by_step_nav.show", default: "show") %>"
26
- data-hide-text="<%= t("govuk_component.step_by_step_nav.hide", default: "hide") %>"
27
- data-show-all-text="<%= t("govuk_component.step_by_step_nav.show_all", default: "Show all steps") %>"
28
- data-hide-all-text="<%= t("govuk_component.step_by_step_nav.hide_all", default: "Hide all steps") %>"
25
+ data-show-text="<%= t("components.step_by_step_nav.show", default: "show") %>"
26
+ data-hide-text="<%= t("components.step_by_step_nav.hide", default: "hide") %>"
27
+ data-show-all-text="<%= t("components.step_by_step_nav.show_all", default: "Show all steps") %>"
28
+ data-hide-all-text="<%= t("components.step_by_step_nav.hide_all", default: "Hide all steps") %>"
29
29
  >
30
30
  <ol class="gem-c-step-nav__steps">
31
31
  <% steps.each_with_index do |step, step_index| %>
@@ -1,6 +1,6 @@
1
1
  <%
2
2
  links ||= []
3
- pretitle ||= t("govuk_component.step_by_step_nav_related.part_of", default: "Part of")
3
+ pretitle ||= t("components.step_by_step_nav_related.part_of", default: "Part of")
4
4
  always_display_as_list ||= false
5
5
  %>
6
6
  <% if links.any? %>
@@ -23,7 +23,7 @@
23
23
  <% if sl_helper.component_data_is_valid? %>
24
24
  <%= tag.section class: css_classes, data: data do %>
25
25
  <% unless hide_heading %>
26
- <h2 class="gem-c-subscription-links__hidden-header visuallyhidden"><%= t("govuk_component.subscription_links.subscriptions", default: "Subscriptions") %></h2>
26
+ <h2 class="gem-c-subscription-links__hidden-header visuallyhidden"><%= t("components.subscription_links.subscriptions", default: "Subscriptions") %></h2>
27
27
  <% end %>
28
28
  <ul
29
29
  class="gem-c-subscription-links__list<%= ' gem-c-subscription-links__list--small' if local_assigns[:small_form] == true %>"
@@ -13,7 +13,7 @@
13
13
  module: "initial-focus",
14
14
  } do %>
15
15
  <div class="govuk-notification-banner__header">
16
- <%= tag.h2 t("govuk_component.success_alert.success", default: "Success"), class: "govuk-notification-banner__title", id: title_id %>
16
+ <%= tag.h2 t("components.success_alert.success", default: "Success"), class: "govuk-notification-banner__title", id: title_id %>
17
17
  </div>
18
18
  <div class="govuk-notification-banner__content">
19
19
  <% if description.present? %>
@@ -11,31 +11,13 @@
11
11
  "track-dimension-index": "29",
12
12
  } %>
13
13
 
14
- <%= link_to link_path,
15
- class: "govuk-link gem-c-contextual-sidebar__brexit-cta",
16
- data: data_attributes,
17
- aria: { label: "#{t("components.related_navigation.take_action_list.aria_label")} #{link_text}" },
18
- lang: shared_helper.t_locale("components.related_navigation.transition.title") do %>
19
- <h2 class="gem-c-contextual-sidebar__brexit-heading govuk-heading-s"><%= t("components.related_navigation.transition.title") %></h2>
20
- <ul class="govuk-list gem-c-contextual-sidebar__take-action-traffic-lights">
21
- <li>
22
- <%= image_tag 'govuk_publishing_components/take-action-red.svg', class: "gem-c-contextual-sidebar__take-action-traffic-lists-icon", alt: "" %>
23
- <span class="gem-c-contextual-sidebar__take-action-traffic-lists-text">
24
- <%= t("components.related_navigation.take_action_list.red") %>
25
- </span>
26
- </li>
27
- <li>
28
- <%= image_tag 'govuk_publishing_components/take-action-amber.svg', class: "gem-c-contextual-sidebar__take-action-traffic-lists-icon", alt: "" %>
29
- <span class="gem-c-contextual-sidebar__take-action-traffic-lists-text">
30
- <%= t("components.related_navigation.take_action_list.amber") %>
31
- </span>
32
- </li>
33
- <li>
34
- <%= image_tag 'govuk_publishing_components/take-action-green.svg', class: "gem-c-contextual-sidebar__take-action-traffic-lists-icon", alt: "" %>
35
- <span class="gem-c-contextual-sidebar__take-action-traffic-lists-text">
36
- <%= t("components.related_navigation.take_action_list.green") %>
37
- </span>
38
- </li>
39
- </ul>
40
- <p class="gem-c-contextual-sidebar__brexit-text"><%= link_text %></p>
14
+ <%= tag.div class: "gem-c-contextual-sidebar__brexit-cta" do %>
15
+ <%= tag.h2 t("components.related_navigation.transition.title"), class: "gem-c-contextual-sidebar__brexit-heading govuk-heading-s" %>
16
+ <%= tag.p class: "gem-c-contextual-sidebar__brexit-text govuk-body" do %>
17
+ <%= link_to link_text,
18
+ link_path,
19
+ class: "govuk-link",
20
+ data: data_attributes,
21
+ lang: shared_helper.t_locale("components.related_navigation.transition.title") %>
22
+ <% end %>
41
23
  <% end %>
@@ -79,3 +79,13 @@ examples:
79
79
  error_items:
80
80
  - text: Look I keep telling you
81
81
  - text: This isn't your password
82
+ with_data_attributes:
83
+ description: Data attributes can be passed to add to the input element. If the data attribute starts with `data-button-` this attribute will be applied to the show/hide button, instead of the input. Note that if JS is disabled, all attributes are added to the input.
84
+ data:
85
+ label:
86
+ text: Your password
87
+ data:
88
+ example_1: value
89
+ example_2: thing
90
+ button_example_1: wotsit
91
+ button_example_2: doodad
@@ -24,6 +24,11 @@ examples:
24
24
  data:
25
25
  message: Message to alert the user to a successful action goes here
26
26
  title_id: my-custom-success-id
27
+ with_styled_link:
28
+ description: If you need to include a link in your success alert, you need to specify the `govuk-link` and `govuk-notification-banner__link` classes on that link element. This is in line with Design System guidance that the colour of the link in success notification banners can look jarring if any links are a different colour to the principal colour used by the success banner.
29
+ data:
30
+ message: Message to alert the user to a successful action goes here
31
+ description: <p class="govuk-body">A further description with <a href="/a-cool-page" class="govuk-link govuk-notification-banner__link">a link</a></p>
27
32
  long_example:
28
33
  data:
29
34
  message: |
@@ -28,7 +28,7 @@
28
28
  </div>
29
29
  <div class="gem-c-feedback__prompt-questions gem-c-feedback__prompt-questions--something-is-wrong js-prompt-questions">
30
30
  <button class="govuk-button gem-c-feedback__prompt-link js-toggle-form js-something-is-wrong" data-track-category="Onsite Feedback" data-track-action="GOV-UK Open Form" aria-controls="something-is-wrong" aria-expanded="false">
31
- <%= t("components.feedback.something_wrong", default: "There is something wrong with this page") %>
31
+ <%= t("components.feedback.something_wrong", default: "Report a problem with this page") %>
32
32
  </button>
33
33
  </div>
34
34
  </div>
@@ -7,7 +7,7 @@
7
7
  class="govuk-header__menu-button govuk-js-header-toggle gem-c-header__menu-button"
8
8
  type="button"
9
9
  >
10
- Menu
10
+ <%= t("components.layout_header.menu") %>
11
11
  </button>
12
12
  <%= tag.nav class: "gem-c-header__nav", aria: { label: navigation_aria_label } do %>
13
13
  <ul id="navigation" class="govuk-header__navigation govuk-header__navigation--end">
@@ -13,8 +13,8 @@
13
13
  class="gem-c-metadata__definition-link"
14
14
  data-controls="toggle-<%= toggle_id %>"
15
15
  data-expanded="false"
16
- data-toggled-text="<%= t("govuk_component.metadata.toggle_less", default: "Show fewer") %>">
17
- <%= t("govuk_component.metadata.toggle_more", number: remaining.length, default: "+ #{remaining.length} more") %>
16
+ data-toggled-text="<%= t("components.metadata.toggle_less", default: "Show fewer") %>">
17
+ <%= t("components.metadata.toggle_more", number: remaining.length, default: "+ #{remaining.length} more") %>
18
18
  </a>
19
19
  </div>
20
20
  <span id="toggle-<%= toggle_id %>" class="gem-c-metadata__toggle-items js-hidden"><%= remaining.to_sentence.html_safe %></span>
@@ -23,10 +23,11 @@
23
23
 
24
24
  <% links.each.with_index(1) do |link, index| %>
25
25
  <%
26
+ link_class = "govuk-link #{related_nav_helper.section_css_class("govuk-link gem-c-related-navigation__section-link", section_title, link: link, link_is_inline: (index >= section_link_limit))}"
26
27
  link_element = link_to(
27
28
  link[:text],
28
29
  link[:path],
29
- class: related_nav_helper.section_css_class("gem-c-related-navigation__section-link", section_title, link: link, link_is_inline: (index >= section_link_limit)),
30
+ class: link_class,
30
31
  rel: link[:rel],
31
32
  lang: shared_helper.t_locale_check(link[:locale]),
32
33
  data: {
@@ -53,8 +54,8 @@
53
54
  class="gem-c-related-navigation__toggle"
54
55
  data-controls="toggle_<%= section_title %>"
55
56
  data-expanded="false"
56
- data-toggled-text="<%= t("govuk_component.metadata.toggle_less", default: "Show fewer") %>">
57
- <%= t("govuk_component.metadata.toggle_more",
57
+ data-toggled-text="<%= t("components.metadata.toggle_less", default: "Show fewer") %>">
58
+ <%= t("components.metadata.toggle_more",
58
59
  number: related_nav_helper.remaining_link_count(links),
59
60
  default: "+ #{related_nav_helper.remaining_link_count(links)} more") %>
60
61
  </a>
@@ -13,8 +13,3 @@ cy:
13
13
  title: "Brexit"
14
14
  link_path: "/transition.cy"
15
15
  link_text: "Gwiriwch beth sydd angen i chi ei wneud"
16
- take_action_list:
17
- red: Gwiriwch
18
- amber: Newidiwch
19
- green: Ewch
20
- aria_label: Ymgyrch slogan Brexit, Gwiriwch, Newidiwch, Ewch.
@@ -44,13 +44,13 @@ en:
44
44
  contents: "Contents"
45
45
  feedback:
46
46
  is_this_page_useful: "Is this page useful?"
47
- yes: "Yes"
48
- no: "No"
47
+ "yes": "Yes"
48
+ "no": "No"
49
49
  maybe: "Maybe"
50
50
  is_useful: "this page is useful"
51
51
  is_not_useful: "this page is not useful"
52
52
  thank_you_for_feedback: "Thank you for your feedback"
53
- something_wrong: "There is something wrong with this page"
53
+ something_wrong: "Report a problem with this page"
54
54
  close: "Close"
55
55
  help_us_improve_govuk: "Help us improve GOV.UK"
56
56
  more_about_visit: "To help us improve GOV.UK, we’d like to know more about your visit today. We’ll send you a link to a feedback form. It will take only 2 minutes to fill in. Don’t worry we won’t send you spam or share your email address with anyone."
@@ -65,8 +65,16 @@ en:
65
65
  show_button: "Show search"
66
66
  hide_button: "Hide search"
67
67
  top_level: "Top level"
68
- nav_items_aria_label: "Show or hide Top Level Navigation"
69
68
  menu: "Menu"
69
+ metadata:
70
+ from: "From"
71
+ part_of: "Part of"
72
+ history: "History"
73
+ published: "Published"
74
+ last_updated: "Last updated"
75
+ see_all_updates: "See all updates"
76
+ toggle_less: "Show fewer"
77
+ toggle_more: "+ %{number} more"
70
78
  organisation_schema:
71
79
  all_content_search_description: "Find all content from %{organisation}"
72
80
  radio:
@@ -88,11 +96,6 @@ en:
88
96
  title: "Brexit"
89
97
  link_path: "/transition"
90
98
  link_text: "Check what you need to do"
91
- take_action_list:
92
- red: "Check"
93
- amber: "Change"
94
- green: "Go"
95
- aria_label: "Brexit campaign slogan, Check, Change, Go."
96
99
  related_footer_navigation:
97
100
  collections: "Collections"
98
101
  policies: "Policies"
@@ -60,6 +60,11 @@ module GovukPublishingComponents
60
60
  step_by_step: false,
61
61
  breadcrumbs: navigation.breadcrumbs,
62
62
  }
63
+ elsif navigation.content_is_travel_advice?
64
+ {
65
+ step_by_step: false,
66
+ breadcrumbs: navigation.breadcrumbs,
67
+ }
63
68
  elsif navigation.content_has_a_topic?
64
69
  {
65
70
  step_by_step: false,
@@ -16,6 +16,10 @@ module GovukPublishingComponents
16
16
  content_item["document_type"] == "simple_smart_answer"
17
17
  end
18
18
 
19
+ def content_is_travel_advice?
20
+ content_item["document_type"] == "travel_advice"
21
+ end
22
+
19
23
  def html_publication_with_parent?
20
24
  (content_item["document_type"] == "html_publication") && parent_api_path
21
25
  end
@@ -67,7 +67,6 @@ module GovukPublishingComponents
67
67
 
68
68
  def section_css_class(css_class, section_title, link: {}, link_is_inline: false)
69
69
  css_classes = [css_class]
70
- css_classes << "govuk-link"
71
70
  css_classes << "#{css_class}--#{@context}" unless @context.nil?
72
71
  css_classes << "#{css_class}--inline" if link_is_inline
73
72
 
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "24.9.2".freeze
2
+ VERSION = "24.10.2".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 24.9.2
4
+ version: 24.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-15 00:00:00.000000000 Z
11
+ date: 2021-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -164,6 +164,20 @@ dependencies:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '2'
167
+ - !ruby/object:Gem::Dependency
168
+ name: i18n-coverage
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
167
181
  - !ruby/object:Gem::Dependency
168
182
  name: jasmine
169
183
  requirement: !ruby/object:Gem::Requirement
@@ -416,7 +430,6 @@ files:
416
430
  - app/assets/javascripts/component_guide/filter-components.js
417
431
  - app/assets/javascripts/component_guide/vendor/bind-polyfill.js
418
432
  - app/assets/javascripts/component_guide/vendor/matches-polyfill.min.js
419
- - app/assets/javascripts/component_guide/visual-regression.js
420
433
  - app/assets/javascripts/govuk_publishing_components/all_components.js
421
434
  - app/assets/javascripts/govuk_publishing_components/analytics.js
422
435
  - app/assets/javascripts/govuk_publishing_components/analytics/analytics.js
@@ -469,6 +482,7 @@ files:
469
482
  - app/assets/javascripts/govuk_publishing_components/lib/toggle-input-class-on-focus.js
470
483
  - app/assets/javascripts/govuk_publishing_components/lib/toggle.js
471
484
  - app/assets/javascripts/govuk_publishing_components/lib/track-click.js
485
+ - app/assets/javascripts/govuk_publishing_components/lib/trigger-event.js
472
486
  - app/assets/javascripts/govuk_publishing_components/modules.js
473
487
  - app/assets/javascripts/govuk_publishing_components/vendor/html5shiv-printshiv.js
474
488
  - app/assets/javascripts/govuk_publishing_components/vendor/json2.js