govuk_publishing_components 24.9.4 → 24.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) 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 +6 -248
  4. data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +2 -3
  5. data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +1 -0
  6. data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +142 -104
  7. data/app/assets/javascripts/govuk_publishing_components/components/reorderable-list.js +1 -1
  8. data/app/assets/javascripts/govuk_publishing_components/components/show-password.js +12 -0
  9. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +2 -2
  10. data/app/assets/javascripts/govuk_publishing_components/lib/trigger-event.js +18 -0
  11. data/app/assets/stylesheets/govuk_publishing_components/_all_components_print.scss +0 -11
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +34 -34
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak.scss +1 -0
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +15 -18
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_notice.scss +4 -2
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +4 -4
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +20 -20
  18. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_advisory.scss +27 -24
  19. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +1 -1
  20. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +1 -0
  21. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss +1 -0
  22. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +1 -0
  23. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss +1 -0
  24. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss +1 -0
  25. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss +1 -0
  26. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_form-download.scss +19 -16
  27. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_fraction.scss +1 -0
  28. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_highlight-answer.scss +30 -27
  29. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_images.scss +1 -0
  30. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss +1 -0
  31. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_legislative-list.scss +1 -0
  32. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss +26 -21
  33. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_stat-headline.scss +1 -0
  34. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_steps.scss +19 -16
  35. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_summary.scss +21 -18
  36. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +1 -0
  37. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss +1 -0
  38. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +1 -0
  39. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss +2 -0
  40. data/app/assets/stylesheets/govuk_publishing_components/components/print/_attachment.scss +2 -3
  41. data/app/assets/stylesheets/govuk_publishing_components/components/print/_back-link.scss +2 -3
  42. data/app/assets/stylesheets/govuk_publishing_components/components/print/_button.scss +0 -4
  43. data/app/assets/stylesheets/govuk_publishing_components/components/print/_feedback.scss +2 -3
  44. data/app/assets/stylesheets/govuk_publishing_components/components/print/_layout-footer.scss +2 -6
  45. data/app/assets/stylesheets/govuk_publishing_components/components/print/_layout-header.scss +2 -3
  46. data/app/assets/stylesheets/govuk_publishing_components/components/print/_metadata.scss +2 -6
  47. data/app/assets/stylesheets/govuk_publishing_components/components/print/_search.scss +2 -3
  48. data/app/assets/stylesheets/govuk_publishing_components/components/print/_share-links.scss +2 -3
  49. data/app/assets/stylesheets/govuk_publishing_components/components/print/_skip-link.scss +2 -3
  50. data/app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav-header.scss +0 -4
  51. data/app/assets/stylesheets/govuk_publishing_components/components/print/_subscription-links.scss +2 -3
  52. data/app/assets/stylesheets/govuk_publishing_components/components/print/_translation-nav.scss +2 -3
  53. data/app/views/govuk_publishing_components/components/_attachment.html.erb +1 -1
  54. data/app/views/govuk_publishing_components/components/_back_link.html.erb +1 -1
  55. data/app/views/govuk_publishing_components/components/_button.html.erb +1 -1
  56. data/app/views/govuk_publishing_components/components/_feedback.html.erb +1 -1
  57. data/app/views/govuk_publishing_components/components/_government_navigation.html.erb +7 -7
  58. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +2 -2
  59. data/app/views/govuk_publishing_components/components/_layout_header.html.erb +1 -1
  60. data/app/views/govuk_publishing_components/components/_machine_readable_metadata.html.erb +1 -1
  61. data/app/views/govuk_publishing_components/components/_metadata.html.erb +9 -8
  62. data/app/views/govuk_publishing_components/components/_notice.html.erb +1 -1
  63. data/app/views/govuk_publishing_components/components/_phase_banner.html.erb +1 -5
  64. data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +1 -1
  65. data/app/views/govuk_publishing_components/components/_print_link.html.erb +1 -1
  66. data/app/views/govuk_publishing_components/components/_radio.html.erb +6 -11
  67. data/app/views/govuk_publishing_components/components/_search.html.erb +1 -1
  68. data/app/views/govuk_publishing_components/components/_share_links.html.erb +1 -1
  69. data/app/views/govuk_publishing_components/components/_show_password.html.erb +2 -0
  70. data/app/views/govuk_publishing_components/components/_skip_link.html.erb +1 -1
  71. data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +6 -6
  72. data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +1 -1
  73. data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +2 -2
  74. data/app/views/govuk_publishing_components/components/_success_alert.html.erb +1 -1
  75. data/app/views/govuk_publishing_components/components/_translation_nav.html.erb +1 -1
  76. data/app/views/govuk_publishing_components/components/docs/feedback.yml +2 -0
  77. data/app/views/govuk_publishing_components/components/docs/phase_banner.yml +2 -2
  78. data/app/views/govuk_publishing_components/components/docs/show_password.yml +10 -0
  79. data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +2 -2
  80. data/app/views/govuk_publishing_components/components/metadata/_sentence.html.erb +4 -4
  81. data/app/views/govuk_publishing_components/components/related_navigation/_section.html.erb +2 -2
  82. data/config/locales/ar.yml +123 -0
  83. data/config/locales/az.yml +123 -0
  84. data/config/locales/be.yml +123 -0
  85. data/config/locales/bg.yml +123 -0
  86. data/config/locales/bn.yml +123 -0
  87. data/config/locales/cs.yml +123 -0
  88. data/config/locales/cy.yml +115 -6
  89. data/config/locales/da.yml +123 -0
  90. data/config/locales/de.yml +123 -0
  91. data/config/locales/dr.yml +123 -0
  92. data/config/locales/el.yml +123 -0
  93. data/config/locales/en.yml +111 -103
  94. data/config/locales/es-419.yml +123 -0
  95. data/config/locales/es.yml +123 -0
  96. data/config/locales/et.yml +120 -0
  97. data/config/locales/fa.yml +123 -0
  98. data/config/locales/fi.yml +123 -0
  99. data/config/locales/fr.yml +120 -0
  100. data/config/locales/gd.yml +123 -0
  101. data/config/locales/gu.yml +123 -0
  102. data/config/locales/he.yml +123 -0
  103. data/config/locales/hi.yml +123 -0
  104. data/config/locales/hr.yml +123 -0
  105. data/config/locales/hu.yml +123 -0
  106. data/config/locales/hy.yml +123 -0
  107. data/config/locales/id.yml +123 -0
  108. data/config/locales/is.yml +123 -0
  109. data/config/locales/it.yml +123 -0
  110. data/config/locales/ja.yml +123 -0
  111. data/config/locales/ka.yml +123 -0
  112. data/config/locales/kk.yml +123 -0
  113. data/config/locales/ko.yml +123 -0
  114. data/config/locales/lt.yml +123 -0
  115. data/config/locales/lv.yml +123 -0
  116. data/config/locales/ms.yml +123 -0
  117. data/config/locales/mt.yml +123 -0
  118. data/config/locales/nl.yml +123 -0
  119. data/config/locales/no.yml +124 -1
  120. data/config/locales/pa-pk.yml +123 -0
  121. data/config/locales/pa.yml +123 -0
  122. data/config/locales/pl.yml +123 -0
  123. data/config/locales/ps.yml +123 -0
  124. data/config/locales/pt.yml +123 -0
  125. data/config/locales/ro.yml +123 -0
  126. data/config/locales/ru.yml +123 -0
  127. data/config/locales/si.yml +123 -0
  128. data/config/locales/sk.yml +123 -0
  129. data/config/locales/sl.yml +123 -0
  130. data/config/locales/so.yml +123 -0
  131. data/config/locales/sq.yml +123 -0
  132. data/config/locales/sr.yml +123 -0
  133. data/config/locales/sv.yml +123 -0
  134. data/config/locales/sw.yml +123 -0
  135. data/config/locales/ta.yml +123 -0
  136. data/config/locales/th.yml +123 -0
  137. data/config/locales/tk.yml +123 -0
  138. data/config/locales/tr.yml +123 -0
  139. data/config/locales/uk.yml +123 -0
  140. data/config/locales/ur.yml +123 -0
  141. data/config/locales/uz.yml +123 -0
  142. data/config/locales/vi.yml +123 -0
  143. data/config/locales/zh-hk.yml +123 -0
  144. data/config/locales/zh-tw.yml +123 -0
  145. data/config/locales/zh.yml +123 -0
  146. data/lib/govuk_publishing_components/presenters/breadcrumb_selector.rb +5 -0
  147. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_taxons.rb +1 -2
  148. data/lib/govuk_publishing_components/presenters/content_item.rb +4 -0
  149. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +4 -0
  150. data/lib/govuk_publishing_components/presenters/machine_readable/page.rb +4 -0
  151. data/lib/govuk_publishing_components/version.rb +1 -1
  152. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +7 -16
  153. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +4 -15
  154. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +1 -1
  155. data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +3 -3
  156. data/node_modules/govuk-frontend/govuk/components/cookie-banner/README.md +15 -0
  157. data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +40 -22
  158. data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro-options.json +6 -6
  159. data/node_modules/govuk-frontend/govuk/components/cookie-banner/template.njk +15 -5
  160. data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +2 -2
  161. data/node_modules/govuk-frontend/govuk/components/details/_index.scss +5 -1
  162. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +13 -14
  163. data/node_modules/govuk-frontend/govuk/components/file-upload/macro-options.json +1 -1
  164. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +14 -19
  165. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +39 -21
  166. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +1 -1
  167. data/node_modules/govuk-frontend/govuk/components/phase-banner/_index.scss +1 -1
  168. data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +3 -3
  169. data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +1 -1
  170. data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +1 -1
  171. data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +1 -6
  172. data/node_modules/govuk-frontend/govuk/components/textarea/macro-options.json +1 -1
  173. data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +10 -0
  174. data/node_modules/govuk-frontend/govuk/core/_links.scss +8 -0
  175. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +153 -38
  176. data/node_modules/govuk-frontend/govuk/settings/_all.scss +2 -0
  177. data/node_modules/govuk-frontend/govuk/settings/_links.scss +62 -0
  178. data/node_modules/govuk-frontend/package.json +1 -1
  179. metadata +20 -4
  180. data/app/assets/javascripts/component_guide/visual-regression.js +0 -71
@@ -1,3 +1,2 @@
1
- .gem-c-header__menu-button {
2
- display: none;
3
- }
1
+ // Left this as an empty file as opposed to deleting it because it is @imported in application print stylesheets for example here:
2
+ // https://github.com/alphagov/govuk-account-manager-prototype/blob/7858b55afcddc2f855d909abd051838d95f21f13/app/assets/stylesheets/print.scss#L6
@@ -1,6 +1,2 @@
1
- .gem-c-metadata {
2
- .gem-c-metadata__definition-link,
3
- .gem-c-metadata__toggle-wrap {
4
- display: none;
5
- }
6
- }
1
+ // Left this as an empty file as opposed to deleting it because it is @imported in application print stylesheets for example here:
2
+ // https://github.com/alphagov/manuals-frontend/blob/466b4c7a6507a3d76818e26612f174616f5cdf94/app/assets/stylesheets/print.scss#L15
@@ -1,3 +1,2 @@
1
- .gem-c-search {
2
- display: none;
3
- }
1
+ // Left this as an empty file as opposed to deleting it because it is @imported in application print stylesheets for example here:
2
+ // https://github.com/alphagov/govuk-account-manager-prototype/blob/7858b55afcddc2f855d909abd051838d95f21f13/app/assets/stylesheets/print.scss#L7
@@ -1,3 +1,2 @@
1
- .gem-c-share-links {
2
- display: none;
3
- }
1
+ // Left this as an empty file as opposed to deleting it because it is @imported in application print stylesheets for example here:
2
+ // https://github.com/alphagov/collections/blob/fc9db4ef6d87ad52d0ac795d1dd05d5fa116dde1/app/assets/stylesheets/print.scss#L9
@@ -1,3 +1,2 @@
1
- .gem-c-skip-link {
2
- display: none;
3
- }
1
+ // Left this as an empty file as opposed to deleting it because it is @imported in application print stylesheets for example here:
2
+ // https://github.com/alphagov/govuk-account-manager-prototype/blob/7858b55afcddc2f855d909abd051838d95f21f13/app/assets/stylesheets/print.scss#L8
@@ -5,7 +5,3 @@
5
5
  .gem-c-step-nav-header__title {
6
6
  @include govuk-font(24, $weight: bold);
7
7
  }
8
-
9
- .gem-c-step-nav-header__skip-link {
10
- display: none;
11
- }
@@ -1,3 +1,2 @@
1
- .gem-c-subscription-links {
2
- display: none;
3
- }
1
+ // Left this as an empty file as opposed to deleting it because it is @imported in application print stylesheets for example here:
2
+ // https://github.com/alphagov/frontend/blob/34e84c7d6dc22bd4b06ce4c18a3d00b29fdcee83/app/assets/stylesheets/print.scss#L12
@@ -1,3 +1,2 @@
1
- .gem-c-translation-nav {
2
- display: none;
3
- }
1
+ // Left this as an empty file as opposed to deleting it because it is @imported in application print stylesheets for example here:
2
+ // https://github.com/alphagov/government-frontend/blob/7a0b068a0faa1da07f58acf0b1d3a0aa3e1daf56/app/assets/stylesheets/print.scss#L16
@@ -32,7 +32,7 @@
32
32
  )
33
33
  end
34
34
  %>
35
- <%= tag.section class: "gem-c-attachment" do %>
35
+ <%= tag.section class: "gem-c-attachment govuk-!-display-none-print" do %>
36
36
  <%= tag.div class: "gem-c-attachment__thumbnail" do %>
37
37
  <%= link_to attachment.url,
38
38
  class: "govuk-link",
@@ -5,6 +5,6 @@
5
5
  <%= link_to(
6
6
  text,
7
7
  href,
8
- class: %w(gem-c-back-link govuk-back-link),
8
+ class: %w(gem-c-back-link govuk-back-link govuk-!-display-none-print),
9
9
  data: data_attributes
10
10
  ) %>
@@ -7,7 +7,7 @@
7
7
 
8
8
  <% start_button_text = capture do %>
9
9
  <%= button.text %>
10
- <svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" role="presentation" focusable="false">
10
+ <svg class="govuk-button__start-icon govuk-!-display-none-print" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" role="presentation" focusable="false">
11
11
  <path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z" />
12
12
  </svg>
13
13
  <% end %>
@@ -8,7 +8,7 @@
8
8
  path_without_pii = utf_encode(request.fullpath.gsub(email_regex, '[email]'))
9
9
  %>
10
10
 
11
- <div class="gem-c-feedback" data-module="feedback">
11
+ <div class="gem-c-feedback govuk-!-display-none-print" data-module="feedback">
12
12
  <%= render "govuk_publishing_components/components/feedback/yes_no_banner" %>
13
13
  <%= render "govuk_publishing_components/components/feedback/problem_form", url_without_pii: url_without_pii %>
14
14
  <%= render "govuk_publishing_components/components/feedback/survey_signup_form", path_without_pii: path_without_pii %>
@@ -6,37 +6,37 @@
6
6
  <ul id="proposition-links">
7
7
  <li>
8
8
  <a class="<%= 'active' if active == 'departments' %>" href="/government/organisations">
9
- <%= t("govuk_component.government_navigation.departments", default: "Departments") %>
9
+ <%= t("components.government_navigation.departments", default: "Departments") %>
10
10
  </a>
11
11
  </li>
12
12
  <li>
13
13
  <a class="<%= 'active' if active == 'worldwide' %>" href="/government/world">
14
- <%= t("govuk_component.government_navigation.worldwide", default: "Worldwide") %>
14
+ <%= t("components.government_navigation.worldwide", default: "Worldwide") %>
15
15
  </a>
16
16
  </li>
17
17
  <li>
18
18
  <a class="<%= 'active' if active == 'how-government-works' %>" href="/government/how-government-works">
19
- <%= t("govuk_component.government_navigation.how-government-works", default: "How government works") %>
19
+ <%= t("components.government_navigation.how-government-works", default: "How government works") %>
20
20
  </a>
21
21
  </li>
22
22
  <li>
23
23
  <a class="<%= 'active' if active == 'get-involved' %>" href="/government/get-involved">
24
- <%= t("govuk_component.government_navigation.get-involved", default: "Get involved") %>
24
+ <%= t("components.government_navigation.get-involved", default: "Get involved") %>
25
25
  </a>
26
26
  </li>
27
27
  <li class="clear-child">
28
28
  <a class="<%= 'active' if active == 'consultations' %>" href="<%= CGI::escapeHTML('/search/policy-papers-and-consultations?content_store_document_type[]=open_consultations&content_store_document_type[]=closed_consultations') %>">
29
- <%= t("govuk_component.government_navigation.consultations", default: "Consultations") %>
29
+ <%= t("components.government_navigation.consultations", default: "Consultations") %>
30
30
  </a>
31
31
  </li>
32
32
  <li>
33
33
  <a class="<%= 'active' if active == 'statistics' %>" href="/search/research-and-statistics">
34
- <%= t("govuk_component.government_navigation.statistics", default: "Statistics") %>
34
+ <%= t("components.government_navigation.statistics", default: "Statistics") %>
35
35
  </a>
36
36
  </li>
37
37
  <li>
38
38
  <a class="<%= 'active' if active == 'announcements' %>" href="/news-and-communications">
39
- <%= t("govuk_component.government_navigation.news_and_communications", default: "News and communications") %>
39
+ <%= t("components.government_navigation.news_and_communications", default: "News and communications") %>
40
40
  </a>
41
41
  </li>
42
42
  </ul>
@@ -29,7 +29,7 @@
29
29
  list_classes = %w[govuk-footer__list]
30
30
  list_classes << "govuk-footer__list--columns-#{item[:columns]}" if item[:columns] unless single_item_list
31
31
  %>
32
- <div class="<%= width_class %>">
32
+ <div class="<%= width_class %> govuk-!-display-none-print">
33
33
  <h2 class="govuk-footer__heading govuk-heading-m"><%= item[:title] %></h2>
34
34
  <ul class="<%= list_classes.join(' ') %>">
35
35
  <% item[:items].each do |item| %>
@@ -58,7 +58,7 @@
58
58
  <div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
59
59
  <% if meta.any? %>
60
60
  <h2 class="govuk-visually-hidden">Support links</h2>
61
- <ul class="govuk-footer__inline-list">
61
+ <ul class="govuk-footer__inline-list govuk-!-display-none-print">
62
62
  <% meta[:items].each do |item| %>
63
63
  <li class="govuk-footer__inline-list-item">
64
64
  <%
@@ -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
@@ -17,7 +17,7 @@
17
17
  <meta property="og:site_name" content="GOV.UK" />
18
18
  <meta property="og:type" content="article" />
19
19
  <meta property="og:url" content="<%= page.canonical_url %>" />
20
- <meta property="og:title" content="<%= page.title %>" />
20
+ <meta property="og:title" content="<% if page.withdrawn? %>[Withdrawn] <% end %><%= page.title %>" />
21
21
  <meta property="og:description" content="<%= strip_tags(page.description) %>" />
22
22
 
23
23
  <% if page.has_image? %>
@@ -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 govuk-!-display-none-print"
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'}
@@ -4,10 +4,6 @@ phase ||= nil
4
4
  message ||= nil
5
5
  inverse ||= false
6
6
 
7
- unless phase.in?(%w[alpha beta])
8
- raise ArgumentError, "The phase banner component expects a `phase` (`beta` or `alpha`), #{phase.inspect} given"
9
- end
10
-
11
7
  unless message.present?
12
8
  if phase == "beta"
13
9
  message = raw("This part of GOV.UK is being rebuilt &ndash; <a class=\"govuk-link\" href=\"/help/beta\">find out what beta means</a>")
@@ -23,7 +19,7 @@ container_css_classes << "gem-c-phase-banner--inverse" if inverse
23
19
  <%= tag.div class: container_css_classes do %>
24
20
  <%= tag.p class: "govuk-phase-banner__content" do %>
25
21
  <%= tag.strong app_name, class: "govuk-phase-banner__content__app-name" if app_name %>
26
- <%= tag.strong phase, class: "govuk-tag govuk-phase-banner__content__tag" %>
22
+ <%= tag.strong phase, class: "govuk-tag govuk-phase-banner__content__tag" if phase %>
27
23
  <%= tag.span message, class: "govuk-phase-banner__text" if message %>
28
24
  <% end %>
29
25
  <% end %>
@@ -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) %>
@@ -13,7 +13,7 @@
13
13
  margin_bottom: margin_bottom
14
14
  })
15
15
 
16
- wrapper_classes = %w(gem-c-print-link)
16
+ wrapper_classes = %w(gem-c-print-link govuk-!-display-none-print)
17
17
  wrapper_classes << "gem-c-print-link--show-without-js" unless require_js
18
18
  wrapper_classes << (shared_helper.get_margin_top)
19
19
  wrapper_classes << (shared_helper.get_margin_bottom)
@@ -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 %>
@@ -10,7 +10,7 @@
10
10
  size ||= ""
11
11
  value ||= ""
12
12
 
13
- classes = %w[gem-c-search]
13
+ classes = %w[gem-c-search govuk-!-display-none-print]
14
14
  classes << (shared_helper.get_margin_top)
15
15
  classes << (shared_helper.get_margin_bottom) if local_assigns[:margin_bottom]
16
16
  classes << "gem-c-search--large" if size == "large"
@@ -8,7 +8,7 @@
8
8
  brand ||= false
9
9
  brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
10
10
 
11
- classes = %w(gem-c-share-links)
11
+ classes = %w(gem-c-share-links govuk-!-display-none-print)
12
12
  classes << "gem-c-share-links--stacked" if stacked
13
13
  classes << "gem-c-share-links--columns" if columns
14
14
  classes << brand_helper.brand_class
@@ -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 %>
@@ -2,4 +2,4 @@
2
2
  href ||= '#main-content'
3
3
  text ||= t('components.skip_link.text')
4
4
  %>
5
- <%= link_to(text, href, class: "gem-c-skip-link govuk-skip-link") %>
5
+ <%= link_to(text, href, class: "gem-c-skip-link govuk-skip-link govuk-!-display-none-print") %>
@@ -19,13 +19,13 @@
19
19
  <% if steps %>
20
20
  <div
21
21
  data-module="gemstepnav"
22
- class="gem-c-step-nav js-hidden <% unless small %>gem-c-step-nav--large<% end %>"
22
+ class="gem-c-step-nav js-hidden <% if small %>govuk-!-display-none-print<% end %> <% 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| %>
@@ -56,7 +56,7 @@
56
56
  <%= logic %>
57
57
  <% else %>
58
58
  <% step_number += 1 %>
59
- <span class="gem-c-step-nav__circle-step-label visuallyhidden">Step</span> <%= step_number %><span class="gem-c-step-nav__circle-step-colon visuallyhidden" aria-hidden="true">:</span>
59
+ <span class="gem-c-step-nav__circle-step-label govuk-!-display-none-print visuallyhidden">Step</span> <%= step_number %><span class="gem-c-step-nav__circle-step-colon govuk-!-display-none-print visuallyhidden" aria-hidden="true">:</span>
60
60
  <% end %>
61
61
  </span>
62
62
  </span>
@@ -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? %>
@@ -8,7 +8,7 @@
8
8
  local_assigns[:margin_bottom] ||= 0
9
9
  local_assigns[:margin_bottom] = 0 if local_assigns[:margin_bottom] > 9
10
10
 
11
- css_classes = %w( gem-c-subscription-links )
11
+ css_classes = %w( gem-c-subscription-links govuk-!-display-none-print )
12
12
  css_classes << (shared_helper.get_margin_bottom) unless local_assigns[:margin_bottom] == 0
13
13
  css_classes << brand_helper.brand_class
14
14
  css_classes << "gem-c-subscription-links--with-feed-box" if sl_helper.feed_link_box_value
@@ -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? %>
@@ -5,7 +5,7 @@
5
5
  %>
6
6
  <% if translation_helper.has_translations? %>
7
7
  <nav role="navigation"
8
- class="gem-c-translation-nav <%= translation_helper.classes %> <%= brand_helper.brand_class %>"
8
+ class="gem-c-translation-nav govuk-!-display-none-print <%= translation_helper.classes %> <%= brand_helper.brand_class %>"
9
9
  aria-label="<%= t("common.translations") %>"
10
10
  <%= "data-module=\"gem-track-click\"" if translation_helper.tracking_is_present? %>
11
11
  >
@@ -2,6 +2,8 @@ name: Feedback
2
2
  description: Invites user feedback on the current page.
3
3
  body: |
4
4
  This component is designed to sit at the bottom of pages on GOV.UK to allow users to submit feedback on that page.
5
+
6
+ This component uses JavaScript for expanding and collapsing and also for submitting form responses. This code is not compatible with Internet Explorer, so IE11 and down do not use JavaScript to submit the forms, instead falling back to a normal form submission.
5
7
  accessibility_criteria: |
6
8
  Form elements in the component must:
7
9