govuk_publishing_components 24.21.1 → 25.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) 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 +606 -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 +265 -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/shared_helper.rb +5 -1
  96. data/lib/govuk_publishing_components/version.rb +1 -1
  97. metadata +5 -16
  98. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss +0 -12
  99. data/app/assets/stylesheets/govuk_publishing_components/components/print/_attachment.scss +0 -2
  100. data/app/assets/stylesheets/govuk_publishing_components/components/print/_back-link.scss +0 -2
  101. data/app/assets/stylesheets/govuk_publishing_components/components/print/_feedback.scss +0 -2
  102. data/app/assets/stylesheets/govuk_publishing_components/components/print/_layout-footer.scss +0 -2
  103. data/app/assets/stylesheets/govuk_publishing_components/components/print/_layout-header.scss +0 -2
  104. data/app/assets/stylesheets/govuk_publishing_components/components/print/_metadata.scss +0 -2
  105. data/app/assets/stylesheets/govuk_publishing_components/components/print/_search.scss +0 -2
  106. data/app/assets/stylesheets/govuk_publishing_components/components/print/_share-links.scss +0 -2
  107. data/app/assets/stylesheets/govuk_publishing_components/components/print/_skip-link.scss +0 -2
  108. data/app/assets/stylesheets/govuk_publishing_components/components/print/_subscription-links.scss +0 -2
  109. 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,267 @@ 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], {
138
+ class: link_classes,
139
+ data: {
140
+ module: "gem-track-click",
141
+ track_action: "#{tracking_label}Link",
142
+ track_category: "headerClicked",
143
+ track_label: item[:href],
144
+ track_dimension: item[:label],
145
+ track_dimension_index: "29",
146
+ }
147
+ } %>
148
+ <%= tag.p item[:description], class: "govuk-body govuk-!-margin-0" if has_description %>
149
+ </li>
150
+ <% end %>
151
+ </ul>
152
+ </div>
72
153
  <% 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 %>
154
+ </div>
155
+ <% if link[:footer_links].present? %>
156
+ <div class="govuk-grid-row">
157
+ <div class="govuk-grid-column-full">
158
+ <div class="gem-c-layout-super-navigation-header__navigation-second-footer">
159
+ <div class="govuk-grid-row">
160
+ <ul class="gem-c-layout-super-navigation-header__navigation-second-footer-list">
161
+ <% link[:footer_links].each do | item | %>
162
+ <li class="gem-c-layout-super-navigation-header__navigation-second-footer-item">
163
+ <%= link_to item[:label], item[:href], {
164
+ class: [
165
+ "govuk-link",
166
+ "gem-c-layout-super-navigation-header__navigation-second-footer-link",
167
+ ],
168
+ data: {
169
+ module: "gem-track-lick",
170
+ track_action: "#{tracking_label}Link",
171
+ track_cateogry: "headerClicked",
172
+ track_label: item[:href],
173
+ track_dimension: item[:label],
174
+ track_dimension_index: "29",
175
+ }
176
+ } %>
177
+ </li>
178
+ <% end %>
179
+ </ul>
180
+ </div>
181
+ </div>
182
+ </div>
183
+ </div>
184
+ <% end %>
185
+ </div>
86
186
  </div>
87
187
  <% end %>
88
- </li>
188
+ <% end %>
89
189
  <% 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" />
190
+ </ul>
191
+
192
+ <button
193
+ aria-controls="super-search-menu"
194
+ aria-expanded="true"
195
+ aria-label="<%= hide_search_menu_text %>"
196
+ class="gem-c-layout-super-navigation-header__search-toggle-button"
197
+ data-text-for-hide="<%= hide_search_menu_text %>"
198
+ data-text-for-show="<%= show_search_menu_text %>"
199
+ data-toggle-mobile-group="top"
200
+ data-toggle-desktop-group="top"
201
+ data-tracking-key="search"
202
+ hidden
203
+ id="super-search-menu-toggle"
204
+ type="button"
205
+ >
206
+ <span class="govuk-visually-hidden">
207
+ <%= search_text %>
208
+ </span>
209
+ <svg
210
+ class="gem-c-layout-super-navigation-header__search-toggle-button-link-icon"
211
+ width="27"
212
+ height="27"
213
+ viewBox="0 0 27 27"
214
+ fill="none"
215
+ xmlns="http://www.w3.org/2000/svg"
216
+ aria-hidden="true"
217
+ focusable="false"
218
+ >
219
+ <circle
220
+ cx="10.0161"
221
+ cy="10.0161"
222
+ r="8.51613"
223
+ stroke="currentColor"
224
+ stroke-width="3" />
225
+ <line
226
+ x1="15.8668"
227
+ y1="16.3587"
228
+ x2="25.4475"
229
+ y2="25.9393"
230
+ stroke="currentColor"
231
+ stroke-width="3" />
232
+ </svg>
233
+ </button>
234
+
235
+ <div id="super-search-menu" class="gem-c-layout-super-navigation-header__search-items">
236
+ <h3 class="govuk-visually-hidden">
237
+ <%= navigation_search_subheading %>
238
+ </h3>
239
+ <div class="gem-c-layout-super-navigation-header__search-item">
240
+ <a class="gem-c-layout-super-navigation-header__search-item-link" href="/search">
241
+ <span class="gem-c-layout-super-navigation-header__search-item-link-text">
242
+ <%= search_text %>
243
+ </span>
244
+ <svg
245
+ class="gem-c-layout-super-navigation-header__search-item-link-icon"
246
+ width="27"
247
+ height="27"
248
+ viewBox="0 0 27 27"
249
+ fill="none"
250
+ xmlns="http://www.w3.org/2000/svg"
251
+ aria-hidden="true"
252
+ focusable="false"
253
+ >
254
+ <circle
255
+ cx="10.0161"
256
+ cy="10.0161"
257
+ r="8.51613"
258
+ stroke="currentColor"
259
+ stroke-width="3" />
260
+ <line
261
+ x1="15.8668"
262
+ y1="16.3587"
263
+ x2="25.4475"
264
+ y2="25.9393"
265
+ stroke="currentColor"
266
+ stroke-width="3" />
96
267
  </svg>
97
268
  </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>
269
+ </div>
270
+
271
+ <div class="govuk-width-container gem-c-layout-super-navigation-header__search-and-popular">
272
+ <div class="govuk-grid-row">
273
+ <div class="govuk-grid-column-full">
274
+ <form
275
+ class="gem-c-layout-super-navigation-header__search-form"
276
+ id="search"
277
+ action="/search"
278
+ method="get"
279
+ role="search"
280
+ aria-label="Site-wide"
281
+ >
282
+ <%= render "govuk_publishing_components/components/search", {
283
+ inline_label: false,
284
+ label_size: "m",
285
+ label_text: search_text,
286
+ size: "large",
287
+ data_attributes: {
288
+ track_category: "headerClicked",
289
+ track_action: "searchSubmitted",
290
+ track_label: "/search/all",
291
+ track_dimension: t("components.search_box.label"),
292
+ track_dimension_index: 29,
293
+ },
294
+ } %>
295
+ </form>
296
+ </div>
116
297
  </div>
117
- </li>
118
- </ul>
298
+ <div class="govuk-grid-row">
299
+ <div class="govuk-grid-column-full">
300
+ <h3 class="govuk-heading-m"><%= popular_links_heading %></h3>
301
+ <ul class="govuk-list">
302
+ <% popular_links.each do | popular_link | %>
303
+ <li class="gem-c-layout-super-navigation-header__popular-item">
304
+ <a class="govuk-link gem-c-layout-super-navigation-header__popular-link"
305
+ href="<%= popular_link[:href] %>"
306
+ data-module="gem-track-click"
307
+ data-track-action="popularLink"
308
+ data-track-category="headerClicked"
309
+ data-track-label="<%= popular_link[:href] %>"
310
+ data-track-dimension="<%= popular_link[:label] %>"
311
+ data-track-dimension-index="29">
312
+ <%= popular_link[:label] %>
313
+ </a>
314
+ </li>
315
+ <% end %>
316
+ </ul>
317
+ </div>
318
+ </div>
319
+ </div>
320
+ </div>
119
321
  </nav>
120
322
  </div>
121
323
  </header>