govuk_publishing_components 24.21.0 → 25.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics.js +2 -0
  3. data/app/assets/javascripts/govuk_publishing_components/{lib → analytics}/track-click.js +0 -0
  4. data/app/assets/javascripts/govuk_publishing_components/{lib/select.js → analytics/track-select-change.js} +0 -0
  5. data/app/assets/javascripts/govuk_publishing_components/components/intervention.js +16 -0
  6. data/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js +234 -40
  7. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js +6 -0
  8. data/app/assets/javascripts/govuk_publishing_components/lib/header-navigation.js +34 -5
  9. data/app/assets/javascripts/govuk_publishing_components/modules.js +11 -17
  10. data/app/assets/stylesheets/govuk_publishing_components/component_support.scss +0 -1
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss +12 -10
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +580 -41
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_notice.scss +2 -17
  14. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +5 -0
  15. data/app/views/govuk_publishing_components/components/_fieldset.html.erb +1 -1
  16. data/app/views/govuk_publishing_components/components/_input.html.erb +1 -1
  17. data/app/views/govuk_publishing_components/components/_intervention.html.erb +26 -8
  18. data/app/views/govuk_publishing_components/components/_label.html.erb +6 -4
  19. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +1 -1
  20. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +244 -63
  21. data/app/views/govuk_publishing_components/components/_notice.html.erb +19 -13
  22. data/app/views/govuk_publishing_components/components/_radio.html.erb +5 -6
  23. data/app/views/govuk_publishing_components/components/_search.html.erb +11 -3
  24. data/app/views/govuk_publishing_components/components/_select.html.erb +3 -1
  25. data/app/views/govuk_publishing_components/components/_summary_list.html.erb +1 -1
  26. data/app/views/govuk_publishing_components/components/_title.html.erb +14 -7
  27. data/app/views/govuk_publishing_components/components/docs/notice.yml +15 -0
  28. data/app/views/govuk_publishing_components/components/docs/radio.yml +4 -15
  29. data/app/views/govuk_publishing_components/components/docs/search.yml +5 -0
  30. data/app/views/govuk_publishing_components/components/docs/title.yml +7 -12
  31. data/config/locales/ar.yml +5 -3
  32. data/config/locales/az.yml +5 -3
  33. data/config/locales/be.yml +5 -3
  34. data/config/locales/bg.yml +5 -3
  35. data/config/locales/bn.yml +5 -3
  36. data/config/locales/cs.yml +5 -3
  37. data/config/locales/cy.yml +8 -6
  38. data/config/locales/da.yml +5 -3
  39. data/config/locales/de.yml +5 -3
  40. data/config/locales/dr.yml +5 -3
  41. data/config/locales/el.yml +5 -3
  42. data/config/locales/en.yml +91 -84
  43. data/config/locales/es-419.yml +5 -3
  44. data/config/locales/es.yml +5 -3
  45. data/config/locales/et.yml +5 -3
  46. data/config/locales/fa.yml +5 -3
  47. data/config/locales/fi.yml +5 -3
  48. data/config/locales/fr.yml +5 -3
  49. data/config/locales/gd.yml +5 -3
  50. data/config/locales/gu.yml +5 -3
  51. data/config/locales/he.yml +5 -3
  52. data/config/locales/hi.yml +5 -3
  53. data/config/locales/hr.yml +5 -3
  54. data/config/locales/hu.yml +5 -3
  55. data/config/locales/hy.yml +5 -3
  56. data/config/locales/id.yml +5 -3
  57. data/config/locales/is.yml +5 -3
  58. data/config/locales/it.yml +5 -3
  59. data/config/locales/ja.yml +5 -3
  60. data/config/locales/ka.yml +5 -3
  61. data/config/locales/kk.yml +5 -3
  62. data/config/locales/ko.yml +5 -3
  63. data/config/locales/lt.yml +5 -3
  64. data/config/locales/lv.yml +5 -3
  65. data/config/locales/ms.yml +5 -3
  66. data/config/locales/mt.yml +5 -3
  67. data/config/locales/nl.yml +5 -3
  68. data/config/locales/no.yml +5 -3
  69. data/config/locales/pa-pk.yml +5 -3
  70. data/config/locales/pa.yml +5 -3
  71. data/config/locales/pl.yml +5 -3
  72. data/config/locales/ps.yml +5 -3
  73. data/config/locales/pt.yml +5 -3
  74. data/config/locales/ro.yml +5 -3
  75. data/config/locales/ru.yml +5 -3
  76. data/config/locales/si.yml +5 -3
  77. data/config/locales/sk.yml +5 -3
  78. data/config/locales/sl.yml +5 -3
  79. data/config/locales/so.yml +5 -3
  80. data/config/locales/sq.yml +5 -3
  81. data/config/locales/sr.yml +5 -3
  82. data/config/locales/sv.yml +5 -3
  83. data/config/locales/sw.yml +5 -3
  84. data/config/locales/ta.yml +5 -3
  85. data/config/locales/th.yml +5 -3
  86. data/config/locales/tk.yml +5 -3
  87. data/config/locales/tr.yml +5 -3
  88. data/config/locales/uk.yml +5 -3
  89. data/config/locales/ur.yml +5 -3
  90. data/config/locales/uz.yml +5 -3
  91. data/config/locales/vi.yml +5 -3
  92. data/config/locales/zh-hk.yml +5 -3
  93. data/config/locales/zh-tw.yml +5 -3
  94. data/config/locales/zh.yml +5 -3
  95. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_priority.rb +2 -0
  96. data/lib/govuk_publishing_components/presenters/shared_helper.rb +5 -1
  97. data/lib/govuk_publishing_components/version.rb +1 -1
  98. metadata +5 -16
  99. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss +0 -12
  100. data/app/assets/stylesheets/govuk_publishing_components/components/print/_attachment.scss +0 -2
  101. data/app/assets/stylesheets/govuk_publishing_components/components/print/_back-link.scss +0 -2
  102. data/app/assets/stylesheets/govuk_publishing_components/components/print/_feedback.scss +0 -2
  103. data/app/assets/stylesheets/govuk_publishing_components/components/print/_layout-footer.scss +0 -2
  104. data/app/assets/stylesheets/govuk_publishing_components/components/print/_layout-header.scss +0 -2
  105. data/app/assets/stylesheets/govuk_publishing_components/components/print/_metadata.scss +0 -2
  106. data/app/assets/stylesheets/govuk_publishing_components/components/print/_search.scss +0 -2
  107. data/app/assets/stylesheets/govuk_publishing_components/components/print/_share-links.scss +0 -2
  108. data/app/assets/stylesheets/govuk_publishing_components/components/print/_skip-link.scss +0 -2
  109. data/app/assets/stylesheets/govuk_publishing_components/components/print/_subscription-links.scss +0 -2
  110. data/app/assets/stylesheets/govuk_publishing_components/components/print/_translation-nav.scss +0 -2
@@ -1,10 +1,8 @@
1
+ @import "govuk/components/notification-banner/notification-banner";
2
+
1
3
  .gem-c-notice {
2
- @include govuk-text-colour;
3
- @include govuk-responsive-padding(4);
4
4
  @include govuk-responsive-margin(8, "bottom");
5
-
6
5
  clear: both;
7
- border: $govuk-border-width solid govuk-colour("blue");
8
6
 
9
7
  .govuk-govspeak {
10
8
  p:last-child {
@@ -18,22 +16,9 @@
18
16
  }
19
17
 
20
18
  .gem-c-notice__title {
21
- @include govuk-font(24, $weight: bold);
22
- margin-top: 0;
23
- @include govuk-responsive-margin(4, "bottom");
24
-
25
- &:last-child {
26
- margin-bottom: 0;
27
- }
28
-
29
19
  a {
30
20
  @include govuk-link-common;
31
21
  @include govuk-link-style-default;
32
22
  @include govuk-link-print-friendly;
33
23
  }
34
24
  }
35
-
36
- .gem-c-notice__description {
37
- @include govuk-font(19);
38
- margin: 0;
39
- }
@@ -279,6 +279,11 @@
279
279
  padding: govuk-spacing(2);
280
280
  background-color: govuk-colour("white");
281
281
 
282
+ &:hover {
283
+ background-color: govuk-colour("light-grey");
284
+ color: $govuk-link-hover-colour;
285
+ }
286
+
282
287
  &:focus {
283
288
  @include govuk-focused-text;
284
289
  background-color: $govuk-focus-colour;
@@ -5,7 +5,7 @@
5
5
  describedby ||= nil
6
6
  role ||= nil
7
7
  heading_level ||= nil
8
- heading_size = false unless ['s', 'm', 'l', 'xl'].include?(heading_size)
8
+ heading_size = false unless shared_helper.valid_heading_size?(heading_size)
9
9
  error_message ||= nil
10
10
  error_id ||= nil
11
11
  id ||= nil
@@ -23,7 +23,7 @@
23
23
  hint_id = "hint-#{SecureRandom.hex(4)}"
24
24
  error_id = "error-#{SecureRandom.hex(4)}"
25
25
  search_icon ||= nil
26
- heading_size = false unless ['s', 'm', 'l', 'xl'].include?(heading_size)
26
+ heading_size = false unless shared_helper.valid_heading_size?(heading_size)
27
27
  heading_level ||= nil
28
28
  prefix ||= nil
29
29
  suffix ||= nil
@@ -1,15 +1,33 @@
1
- <%= tag.section class: "gem-c-intervention", role: "region" do %>
2
- <h2 class="gem-c-intervention__title">
3
- <a class="govuk-link" href="/next-steps-for-your-business">
4
- <%= t("components.intervention.title") %>
5
- </a>
1
+ <%
2
+ data_attributes ||= {}
3
+ data_attributes[:module] = 'intervention'
4
+ %>
5
+
6
+ <%= tag.section class: "gem-c-intervention", role: "region", data: data_attributes do %>
7
+ <h2 class="gem-c-intervention__title govuk-heading-s">
8
+ <a class="govuk-link" href="/next-steps-for-your-business"
9
+ data-module="gem-track-click"
10
+ data-track-category="interventionBanner"
11
+ data-track-action="interventionClicked"
12
+ data-track-dimension="<%= t("components.intervention.title") %>"
13
+ data-track-dimension-index="29"
14
+ data-track-label="/next-steps-for-your-business">
15
+ <%= t("components.intervention.title") %></a>
6
16
  </h2>
7
17
 
8
- <p class="gem-c-intervention__paragraph">
18
+ <p class="govuk-body">
9
19
  <%= t("components.intervention.description") %>
10
20
  </p>
11
21
 
12
- <p class="gem-c-intervention__paragraph">
13
- <%= t("components.intervention.dismiss_html") %>
22
+ <p class="govuk-body">
23
+ <a class="govuk-link" href="?hide-intervention=true"
24
+ data-module="gem-track-click"
25
+ data-track-category="interventionBanner"
26
+ data-track-action="interventionDismissed"
27
+ data-track-label="?hide-intervention=true"
28
+ data-track-dimension="<%= t("components.intervention.dismiss_link_text") %>"
29
+ data-track-dimension-index="29">
30
+ <%= t("components.intervention.dismiss_link_text") %></a>
31
+ <%= t("components.intervention.dismiss_post_link") %>
14
32
  </p>
15
33
  <% end %>
@@ -1,16 +1,18 @@
1
1
  <%
2
- hint_text ||= ''
2
+ shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
3
+
4
+ hint_text ||= ""
3
5
  is_radio_label ||= false
4
6
  bold ||= false
5
- heading_size = false unless ['s', 'm', 'l', 'xl'].include?(heading_size)
7
+ heading_size = false unless shared_helper.valid_heading_size?(heading_size)
6
8
  is_page_heading ||= false
7
9
 
8
- css_classes = %w( gem-c-label govuk-label )
10
+ css_classes = %w[gem-c-label govuk-label]
9
11
  css_classes << "govuk-label--s" if bold
10
12
  css_classes << "govuk-radios__label" if is_radio_label
11
13
  css_classes << "govuk-label--#{heading_size}" if heading_size
12
14
 
13
- hint_text_css_classes = %w( govuk-hint )
15
+ hint_text_css_classes = %w[govuk-hint]
14
16
  hint_text_css_classes << "govuk-radios__hint" if is_radio_label
15
17
  %>
16
18
 
@@ -17,7 +17,7 @@
17
17
  # This is a hack - but it's the only way I can find to not have two blue bars on
18
18
  # constrained width layouts.
19
19
  #
20
- # The full width layout hides the blue bar underneath the blar header bar - so
20
+ # The full width layout hides the blue bar underneath the black header bar - so
21
21
  # full width pages won't see the blue bar unless it's added by another component
22
22
  # - and for most pages that component is the global banner.
23
23
  #
@@ -4,17 +4,28 @@ logo_link_title = t("components.layout_super_navigation_header.logo_link_title")
4
4
  logo_text = t("components.layout_super_navigation_header.logo_text")
5
5
  navigation_links = t("components.layout_super_navigation_header.navigation_links")
6
6
  navigation_menu_heading = t("components.layout_super_navigation_header.navigation_menu_heading")
7
+ navigation_search_heading = t("components.layout_super_navigation_header.navigation_search_heading")
8
+ navigation_search_subheading = t("components.layout_super_navigation_header.navigation_search_subheading")
7
9
  popular_links = t("components.layout_super_navigation_header.popular_links")
8
10
  popular_links_heading = t("components.layout_super_navigation_header.popular_links_heading")
9
- search_text= t("components.layout_super_navigation_header.search_text")
11
+ search_text = t("components.layout_super_navigation_header.search_text")
12
+
13
+ hide_search_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.hide", :label => "search")
14
+ show_search_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.show", :label => "search")
15
+ hide_navigation_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.hide", :label => "navigation")
16
+ show_navigation_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.show", :label => "navigation")
17
+
10
18
  %>
11
19
  <header role="banner" class="gem-c-layout-super-navigation-header">
12
20
  <div class="gem-c-layout-super-navigation-header__container govuk-width-container govuk-clearfix">
13
21
  <div class="gem-c-layout-super-navigation-header__header-logo">
14
22
  <a class="govuk-header__link govuk-header__link--homepage"
15
23
  data-module="gem-track-click"
16
- data-track-action="homeHeader"
17
- data-track-category="homeLinkClicked"
24
+ data-track-action="logoLink"
25
+ data-track-category="headerClicked"
26
+ data-track-label="<%= logo_link %>"
27
+ data-track-dimension="<%= logo_text %>"
28
+ data-track-dimension-index="29"
18
29
  href="<%= logo_link %>"
19
30
  id="logo"
20
31
  title="<%= logo_link_title %>">
@@ -46,76 +57,246 @@ search_text= t("components.layout_super_navigation_header.search_text")
46
57
  <nav
47
58
  aria-labelledby="super-navigation-menu-heading"
48
59
  class="gem-c-layout-super-navigation-header__content"
49
- data-module="super-navigation-toggle"
50
- data-text-for-button="Menu"
51
- data-text-for-show-menu="Show navigation menu"
52
- data-text-for-hide-menu="Hide navigation menu"
60
+ data-module="super-navigation-mega-menu"
53
61
  >
54
- <h2 id="super-navigation-menu-heading" class="govuk-visually-hidden"><%= navigation_menu_heading %></h2>
55
- <ul id="super-navigation-menu" class="gem-c-layout-super-navigation-header__items">
56
- <% navigation_links.each do | link | %>
57
- <li class="govuk-header__navigation-item gem-c-layout-super-navigation-header__item">
58
- <a class="govuk-header__link gem-c-layout-super-navigation-header__item-link" href="<%= link[:href] %>">
62
+ <h2 id="super-navigation-menu-heading" class="govuk-visually-hidden">
63
+ <%= navigation_menu_heading %>
64
+ </h2>
65
+ <button
66
+ aria-controls="super-navigation-menu"
67
+ aria-expanded="true"
68
+ aria-label="<%= hide_navigation_menu_text %>"
69
+ class="gem-c-layout-super-navigation-header__navigation-top-toggle-button"
70
+ data-text-for-hide="<%= hide_navigation_menu_text %>"
71
+ data-text-for-show="<%= show_navigation_menu_text %>"
72
+ data-toggle-desktop-group="hidden"
73
+ data-toggle-mobile-group="top"
74
+ data-tracking-key="menu"
75
+ hidden
76
+ id="super-navigation-menu-toggle"
77
+ type="button"
78
+ >
79
+ Menu
80
+ </button>
81
+ <ul id="super-navigation-menu" class="gem-c-layout-super-navigation-header__navigation-items">
82
+ <% navigation_links.each_with_index do | link, index | %>
83
+ <%
84
+ has_children = (link[:menu_contents].present? or link[:footer_links].present?)
85
+ li_classes = %w[gem-c-layout-super-navigation-header__navigation-item]
86
+ li_classes << "gem-c-layout-super-navigation-header__navigation-item--with-children" if has_children
87
+ unique_id = SecureRandom.hex(4)
88
+ show_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.show", :label => link[:label])
89
+ hide_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.hide", :label => link[:label])
90
+ tracking_label = link[:label].downcase.gsub(/\s+/, "")
91
+ %>
92
+ <%= tag.li class: li_classes do %>
93
+ <a class="gem-c-layout-super-navigation-header__navigation-item-link" href="<%= link[:href] %>">
59
94
  <%= link[:label] %>
60
95
  </a>
61
- <% if link[:menu_contents].present? or link[:footer_links].present? %>
62
- <div class="gem-c-layout-super-navigation-header__dropdown-menu">
63
- <% if link[:menu_contents].present? %>
64
- <ul class="govuk-list">
65
- <% link[:menu_contents].each do | item | %>
66
- <li class="gem-c-layout-super-navigation-header__dropdown-list-item">
67
- <a class="govuk-link gem-c-layout-super-navigation-header__dropdown-list-item-link" href="<%= item[:href] %>">
68
- <%= item[:label] %>
69
- </a>
70
- <%= tag.p item[:description], class: "govuk-body-s gem-c-layout-super-navigation-header__dropdown-list-item-description" if item[:description].present? %>
71
- </li>
96
+ <% if has_children %>
97
+ <button
98
+ aria-controls="super-navigation-menu__section-<%= unique_id %>"
99
+ aria-expanded="false"
100
+ aria-label="<%= show_menu_text %>"
101
+ class="gem-c-layout-super-navigation-header__navigation-second-toggle-button"
102
+ data-text-for-hide="<%= hide_menu_text %>"
103
+ data-text-for-show="<%= show_menu_text %>"
104
+ data-toggle-desktop-group="top"
105
+ data-toggle-mobile-group="second"
106
+ data-tracking-key="<%= tracking_label %>"
107
+ hidden
108
+ id="super-navigation-menu__section-<%= unique_id %>-toggle"
109
+ type="button"
110
+ >
111
+ <%= link[:label] %>
112
+ </button>
113
+ <div
114
+ hidden
115
+ class="gem-c-layout-super-navigation-header__navigation-dropdown-menu"
116
+ id="super-navigation-menu__section-<%= unique_id %>"
117
+ >
118
+ <div class="govuk-width-container">
119
+ <div class="govuk-grid-row">
120
+ <div class="govuk-grid-column-one-third-from-desktop">
121
+ <% if link[:description].present? %>
122
+ <p class="govuk-body-l gem-c-layout-super-navigation-header__menu-description">
123
+ <%= link[:description] %>
124
+ </p>
125
+ <% end %>
126
+ </div>
127
+ <% if link[:menu_contents].present? %>
128
+ <div class="govuk-grid-column-two-thirds-from-desktop">
129
+ <ul class="govuk-list gem-c-layout-super-navigation-header__navigation-second-items">
130
+ <% link[:menu_contents].each do | item | %>
131
+ <%
132
+ has_description = item[:description].present?
133
+ link_classes = %w[govuk-link gem-c-layout-super-navigation-header__navigation-second-item-link]
134
+ link_classes << "gem-c-layout-super-navigation-header__navigation-second-item-link--with-description" if has_description
135
+ %>
136
+ <li class="gem-c-layout-super-navigation-header__dropdown-list-item">
137
+ <%= link_to item[:label], item[:href], { class: link_classes } %>
138
+ <%= tag.p item[:description], class: "govuk-body govuk-!-margin-0" if has_description %>
139
+ </li>
140
+ <% end %>
141
+ </ul>
142
+ </div>
72
143
  <% end %>
73
- </ul>
74
- <% end %>
75
- <% if link[:footer_links].present? %>
76
- <ul class="govuk-list">
77
- <% link[:footer_links].each do | item | %>
78
- <li class="gem-c-layout-super-navigation-header__dropdown-list-item">
79
- <a class="govuk-link gem-c-layout-super-navigation-header__dropdown-list-item-link" href="<%= item[:href] %>">
80
- <%= item[:label] %>
81
- </a>
82
- </li>
83
- <% end %>
84
- </ul>
85
- <% end %>
144
+ </div>
145
+ <% if link[:footer_links].present? %>
146
+ <div class="govuk-grid-row">
147
+ <div class="govuk-grid-column-full">
148
+ <div class="gem-c-layout-super-navigation-header__navigation-second-footer">
149
+ <div class="govuk-grid-row">
150
+ <ul class="gem-c-layout-super-navigation-header__navigation-second-footer-list">
151
+ <% link[:footer_links].each do | item | %>
152
+ <li class="gem-c-layout-super-navigation-header__navigation-second-footer-item">
153
+ <a class="govuk-link gem-c-layout-super-navigation-header__navigation-second-footer-link" href="<%= item[:href] %>">
154
+ <%= item[:label] %>
155
+ </a>
156
+ </li>
157
+ <% end %>
158
+ </ul>
159
+ </div>
160
+ </div>
161
+ </div>
162
+ </div>
163
+ <% end %>
164
+ </div>
86
165
  </div>
87
166
  <% end %>
88
- </li>
167
+ <% end %>
89
168
  <% end %>
90
- <li class="govuk-header__navigation-item gem-c-layout-super-navigation-header__item gem-c-layout-super-navigation-header__item--search">
91
- <a class="govuk-header__link gem-c-layout-super-navigation-header__item-link gem-c-layout-super-navigation-header__item-link--search" href="/search">
92
- <span class="gem-c-layout-super-navigation-header__item-link-text--search"><%= search_text %></span>
93
- <svg class="gem-c-layout-super-navigation-header__item-link-icon--search" width="27" height="27" viewBox="0 0 27 27" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
94
- <circle cx="10.0161" cy="10.0161" r="8.51613" stroke="currentColor" stroke-width="3" />
95
- <line x1="15.8668" y1="16.3587" x2="25.4475" y2="25.9393" stroke="currentColor" stroke-width="3" />
169
+ </ul>
170
+
171
+ <button
172
+ aria-controls="super-search-menu"
173
+ aria-expanded="true"
174
+ aria-label="<%= hide_search_menu_text %>"
175
+ class="gem-c-layout-super-navigation-header__search-toggle-button"
176
+ data-text-for-hide="<%= hide_search_menu_text %>"
177
+ data-text-for-show="<%= show_search_menu_text %>"
178
+ data-toggle-mobile-group="top"
179
+ data-toggle-desktop-group="top"
180
+ data-tracking-key="search"
181
+ hidden
182
+ id="super-search-menu-toggle"
183
+ type="button"
184
+ >
185
+ <span class="govuk-visually-hidden">
186
+ <%= search_text %>
187
+ </span>
188
+ <svg
189
+ class="gem-c-layout-super-navigation-header__search-toggle-button-link-icon"
190
+ width="27"
191
+ height="27"
192
+ viewBox="0 0 27 27"
193
+ fill="none"
194
+ xmlns="http://www.w3.org/2000/svg"
195
+ aria-hidden="true"
196
+ focusable="false"
197
+ >
198
+ <circle
199
+ cx="10.0161"
200
+ cy="10.0161"
201
+ r="8.51613"
202
+ stroke="currentColor"
203
+ stroke-width="3" />
204
+ <line
205
+ x1="15.8668"
206
+ y1="16.3587"
207
+ x2="25.4475"
208
+ y2="25.9393"
209
+ stroke="currentColor"
210
+ stroke-width="3" />
211
+ </svg>
212
+ </button>
213
+
214
+ <div id="super-search-menu" class="gem-c-layout-super-navigation-header__search-items">
215
+ <h3 class="govuk-visually-hidden">
216
+ <%= navigation_search_subheading %>
217
+ </h3>
218
+ <div class="gem-c-layout-super-navigation-header__search-item">
219
+ <a class="gem-c-layout-super-navigation-header__search-item-link" href="/search">
220
+ <span class="gem-c-layout-super-navigation-header__search-item-link-text">
221
+ <%= search_text %>
222
+ </span>
223
+ <svg
224
+ class="gem-c-layout-super-navigation-header__search-item-link-icon"
225
+ width="27"
226
+ height="27"
227
+ viewBox="0 0 27 27"
228
+ fill="none"
229
+ xmlns="http://www.w3.org/2000/svg"
230
+ aria-hidden="true"
231
+ focusable="false"
232
+ >
233
+ <circle
234
+ cx="10.0161"
235
+ cy="10.0161"
236
+ r="8.51613"
237
+ stroke="currentColor"
238
+ stroke-width="3" />
239
+ <line
240
+ x1="15.8668"
241
+ y1="16.3587"
242
+ x2="25.4475"
243
+ y2="25.9393"
244
+ stroke="currentColor"
245
+ stroke-width="3" />
96
246
  </svg>
97
247
  </a>
98
- <div class="gem-c-layout-super-navigation-header__dropdown-menu">
99
- <form id="search" action="/search" method="get" role="search" aria-label="Site-wide">
100
- <%= render "govuk_publishing_components/components/search", {
101
- inline_label: false,
102
- label_text: raw("<h2 class=\"govuk-heading-m\">#{search_text}</h2>"),
103
- size: "large",
104
- } %>
105
- </form>
106
- <h2 class="govuk-heading-m"><%= popular_links_heading %></h2>
107
- <ul class="govuk-list">
108
- <% popular_links.each do | popular_link | %>
109
- <li class="gem-c-layout-super-navigation-header__dropdown-list-item">
110
- <a class="govuk-link gem-c-layout-super-navigation-header__dropdown-list-item-link" href="<%= popular_link[:href] %>">
111
- <%= popular_link[:label] %>
112
- </a>
113
- </li>
114
- <% end %>
115
- </ul>
248
+ </div>
249
+
250
+ <div class="govuk-width-container gem-c-layout-super-navigation-header__search-and-popular">
251
+ <div class="govuk-grid-row">
252
+ <div class="govuk-grid-column-full">
253
+ <form
254
+ class="gem-c-layout-super-navigation-header__search-form"
255
+ id="search"
256
+ action="/search"
257
+ method="get"
258
+ role="search"
259
+ aria-label="Site-wide"
260
+ >
261
+ <%= render "govuk_publishing_components/components/search", {
262
+ inline_label: false,
263
+ label_size: "m",
264
+ label_text: search_text,
265
+ size: "large",
266
+ data_attributes: {
267
+ track_category: "headerClicked",
268
+ track_action: "searchSubmitted",
269
+ track_label: "/search/all",
270
+ track_dimension: t("components.search_box.label"),
271
+ track_dimension_index: 29,
272
+ },
273
+ } %>
274
+ </form>
275
+ </div>
116
276
  </div>
117
- </li>
118
- </ul>
277
+ <div class="govuk-grid-row">
278
+ <div class="govuk-grid-column-full">
279
+ <h3 class="govuk-heading-m"><%= popular_links_heading %></h3>
280
+ <ul class="govuk-list">
281
+ <% popular_links.each do | popular_link | %>
282
+ <li class="gem-c-layout-super-navigation-header__popular-item">
283
+ <a class="govuk-link gem-c-layout-super-navigation-header__popular-link"
284
+ href="<%= popular_link[:href] %>"
285
+ data-module="gem-track-click"
286
+ data-track-action="popularLink"
287
+ data-track-category="headerClicked"
288
+ data-track-label="<%= popular_link[:href] %>"
289
+ data-track-dimension="<%= popular_link[:label] %>"
290
+ data-track-dimension-index="29">
291
+ <%= popular_link[:label] %>
292
+ </a>
293
+ </li>
294
+ <% end %>
295
+ </ul>
296
+ </div>
297
+ </div>
298
+ </div>
299
+ </div>
119
300
  </nav>
120
301
  </div>
121
302
  </header>