govuk_publishing_components 33.1.0 → 34.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/govuk_publishing_components_manifest.js +0 -1
  3. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +16 -27
  4. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js +2 -0
  5. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +4 -4
  6. data/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js +12 -69
  7. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +14 -13
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +28 -0
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +11 -0
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +19 -0
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +20 -0
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +6 -0
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_emergency-banner.scss +6 -0
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss +8 -0
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak.scss +83 -0
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +253 -412
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +15 -0
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +6 -0
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_textarea.scss +16 -0
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_title.scss +10 -0
  21. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_contents-list-helper.scss +0 -1
  22. data/app/controllers/govuk_publishing_components/component_guide_controller.rb +6 -9
  23. data/app/views/govuk_publishing_components/component_guide/_application_stylesheet.html.erb +0 -3
  24. data/app/views/govuk_publishing_components/component_guide/index.html.erb +0 -7
  25. data/app/views/govuk_publishing_components/components/_label.html.erb +3 -2
  26. data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +1 -2
  27. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +0 -1
  28. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +94 -143
  29. data/app/views/govuk_publishing_components/components/docs/label.yml +6 -0
  30. data/app/views/layouts/govuk_publishing_components/application.html.erb +1 -2
  31. data/config/locales/ar.yml +4 -8
  32. data/config/locales/az.yml +5 -8
  33. data/config/locales/be.yml +4 -8
  34. data/config/locales/bg.yml +4 -8
  35. data/config/locales/bn.yml +4 -8
  36. data/config/locales/cs.yml +4 -8
  37. data/config/locales/cy.yml +4 -8
  38. data/config/locales/da.yml +4 -8
  39. data/config/locales/de.yml +4 -8
  40. data/config/locales/dr.yml +4 -8
  41. data/config/locales/el.yml +4 -8
  42. data/config/locales/en.yml +6 -17
  43. data/config/locales/es-419.yml +4 -8
  44. data/config/locales/es.yml +4 -8
  45. data/config/locales/et.yml +4 -8
  46. data/config/locales/fa.yml +5 -8
  47. data/config/locales/fi.yml +4 -8
  48. data/config/locales/fr.yml +4 -8
  49. data/config/locales/gd.yml +4 -8
  50. data/config/locales/gu.yml +4 -8
  51. data/config/locales/he.yml +4 -8
  52. data/config/locales/hi.yml +4 -8
  53. data/config/locales/hr.yml +4 -8
  54. data/config/locales/hu.yml +4 -8
  55. data/config/locales/hy.yml +4 -8
  56. data/config/locales/id.yml +4 -8
  57. data/config/locales/is.yml +4 -8
  58. data/config/locales/it.yml +4 -8
  59. data/config/locales/ja.yml +4 -8
  60. data/config/locales/ka.yml +4 -8
  61. data/config/locales/kk.yml +4 -8
  62. data/config/locales/ko.yml +4 -8
  63. data/config/locales/lt.yml +4 -8
  64. data/config/locales/lv.yml +4 -8
  65. data/config/locales/ms.yml +4 -8
  66. data/config/locales/mt.yml +4 -8
  67. data/config/locales/nl.yml +4 -8
  68. data/config/locales/no.yml +4 -8
  69. data/config/locales/pa-pk.yml +4 -8
  70. data/config/locales/pa.yml +4 -8
  71. data/config/locales/pl.yml +4 -8
  72. data/config/locales/ps.yml +4 -8
  73. data/config/locales/pt.yml +4 -8
  74. data/config/locales/ro.yml +4 -8
  75. data/config/locales/ru.yml +4 -8
  76. data/config/locales/si.yml +4 -8
  77. data/config/locales/sk.yml +4 -8
  78. data/config/locales/sl.yml +4 -8
  79. data/config/locales/so.yml +4 -8
  80. data/config/locales/sq.yml +4 -8
  81. data/config/locales/sr.yml +4 -8
  82. data/config/locales/sv.yml +4 -8
  83. data/config/locales/sw.yml +4 -8
  84. data/config/locales/ta.yml +4 -8
  85. data/config/locales/th.yml +4 -8
  86. data/config/locales/tk.yml +4 -8
  87. data/config/locales/tr.yml +4 -8
  88. data/config/locales/uk.yml +4 -8
  89. data/config/locales/ur.yml +4 -8
  90. data/config/locales/uz.yml +4 -8
  91. data/config/locales/vi.yml +4 -8
  92. data/config/locales/zh-hk.yml +4 -8
  93. data/config/locales/zh-tw.yml +4 -8
  94. data/config/locales/zh.yml +4 -8
  95. data/lib/govuk_publishing_components/config.rb +0 -3
  96. data/lib/govuk_publishing_components/version.rb +1 -1
  97. data/node_modules/axe-core/axe.d.ts +75 -24
  98. data/node_modules/axe-core/axe.js +4765 -4555
  99. data/node_modules/axe-core/axe.min.js +2 -2
  100. data/node_modules/axe-core/package.json +2 -2
  101. data/node_modules/axe-core/sri-history.json +4 -0
  102. metadata +2 -17
  103. data/app/assets/stylesheets/component_guide/print.scss +0 -1
  104. data/app/assets/stylesheets/govuk_publishing_components/_all_components_print.scss +0 -18
  105. data/app/assets/stylesheets/govuk_publishing_components/components/print/_accordion.scss +0 -28
  106. data/app/assets/stylesheets/govuk_publishing_components/components/print/_button.scss +0 -8
  107. data/app/assets/stylesheets/govuk_publishing_components/components/print/_cards.scss +0 -4
  108. data/app/assets/stylesheets/govuk_publishing_components/components/print/_contents-list.scss +0 -19
  109. data/app/assets/stylesheets/govuk_publishing_components/components/print/_emergency-banner.scss +0 -3
  110. data/app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak-html-publication.scss +0 -5
  111. data/app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak.scss +0 -80
  112. data/app/assets/stylesheets/govuk_publishing_components/components/print/_layout-super-navigation-header.scss +0 -3
  113. data/app/assets/stylesheets/govuk_publishing_components/components/print/_organisation-logo.scss +0 -7
  114. data/app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav-header.scss +0 -7
  115. data/app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav.scss +0 -116
  116. data/app/assets/stylesheets/govuk_publishing_components/components/print/_textarea.scss +0 -13
  117. data/app/assets/stylesheets/govuk_publishing_components/components/print/_title.scss +0 -7
@@ -17,3 +17,18 @@
17
17
  @include govuk-font(19, $weight: bold);
18
18
  display: block;
19
19
  }
20
+
21
+ @include govuk-media-query($media-type: print) {
22
+ .gem-c-step-nav-header {
23
+ padding: 0 0 govuk-spacing(4) 0;
24
+ background: none;
25
+ }
26
+
27
+ .gem-c-step-nav-header__part-of {
28
+ display: block;
29
+ }
30
+
31
+ .gem-c-step-nav-header__title {
32
+ @include govuk-font(24, $weight: bold);
33
+ }
34
+ }
@@ -532,3 +532,9 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
532
532
  content: " \2013\00a0"; // dash followed by  
533
533
  }
534
534
  }
535
+
536
+ @include govuk-media-query($media-type: print) {
537
+ .gem-c-step-nav__panel {
538
+ display: block !important; // stylelint-disable-line declaration-no-important
539
+ }
540
+ }
@@ -9,3 +9,19 @@
9
9
  }
10
10
  }
11
11
  }
12
+
13
+ @include govuk-media-query($media-type: print) {
14
+ .gem-c-textarea {
15
+ .gem-c-label,
16
+ .gem-c-error-message,
17
+ .govuk-hint,
18
+ .govuk-character-count__message {
19
+ display: block;
20
+ }
21
+
22
+ .govuk-textarea {
23
+ width: 400px;
24
+ height: 40px;
25
+ }
26
+ }
27
+ }
@@ -28,3 +28,13 @@
28
28
  .gem-c-title__text {
29
29
  margin: 0;
30
30
  }
31
+
32
+ @include govuk-media-query($media-type: print) {
33
+ .gem-c-title__context {
34
+ margin: 0;
35
+ }
36
+
37
+ .gem-c-title__text {
38
+ margin-top: 0;
39
+ }
40
+ }
@@ -1,4 +1,3 @@
1
- // Contents list helper is used in both print and screen stylesheets
2
1
  .gem-c-contents-list__list-item--numbered {
3
2
  .gem-c-contents-list__link {
4
3
  display: table;
@@ -10,8 +10,7 @@ module GovukPublishingComponents
10
10
  @component_docs = component_docs.all
11
11
  @gem_component_docs = gem_component_docs.all
12
12
  @components_in_use_docs = components_in_use_docs.used_in_this_app
13
- @components_in_use_sass = components_in_use_sass(false)
14
- @components_in_use_print_sass = components_in_use_sass(true)
13
+ @components_in_use_sass = components_in_use_sass
15
14
  @components_in_use_js = components_in_use_js
16
15
  end
17
16
 
@@ -44,15 +43,14 @@ module GovukPublishingComponents
44
43
  end
45
44
  end
46
45
 
47
- def components_in_use_sass(print_styles)
48
- print_path = "print/" if print_styles
46
+ def components_in_use_sass
49
47
  additional_files = "@import 'govuk_publishing_components/govuk_frontend_support';\n"
50
- additional_files << "@import 'govuk_publishing_components/component_support';\n" unless print_styles
48
+ additional_files << "@import 'govuk_publishing_components/component_support';\n"
51
49
 
52
50
  components = find_all_partials_in(components_in_use)
53
51
 
54
52
  components.map { |component|
55
- "@import 'govuk_publishing_components/components/#{print_path}#{component.gsub('_', '-')}';" if component_has_sass_file(component.gsub("_", "-"), print_styles)
53
+ "@import 'govuk_publishing_components/components/#{component.gsub('_', '-')}';" if component_has_sass_file(component.gsub("_", "-"))
56
54
  }.compact.uniq.sort.join("\n").squeeze("\n").prepend(additional_files)
57
55
  end
58
56
 
@@ -128,9 +126,8 @@ module GovukPublishingComponents
128
126
  extra_components.flatten.uniq.sort
129
127
  end
130
128
 
131
- def component_has_sass_file(component, print_styles)
132
- print_path = "print/" if print_styles
133
- Pathname.new(@component_gem_path + "/app/assets/stylesheets/govuk_publishing_components/components/#{print_path}_#{component}.scss").exist?
129
+ def component_has_sass_file(component)
130
+ Pathname.new(@component_gem_path + "/app/assets/stylesheets/govuk_publishing_components/components/_#{component}.scss").exist?
134
131
  end
135
132
 
136
133
  def component_has_js_file(component)
@@ -1,4 +1 @@
1
1
  <%= stylesheet_link_tag "#{GovukPublishingComponents::Config.application_stylesheet}" %>
2
- <% if GovukPublishingComponents::Config.application_print_stylesheet %>
3
- <%= stylesheet_link_tag "#{GovukPublishingComponents::Config.application_print_stylesheet}", media: "print" %>
4
- <% end %>
@@ -28,13 +28,6 @@
28
28
  name: "main-sass",
29
29
  value: @components_in_use_sass
30
30
  } %>
31
- <%= render "govuk_publishing_components/components/textarea", {
32
- label: {
33
- text: "Add this to your application's print scss file, before your other local imports."
34
- },
35
- name: "print-sass",
36
- value: @components_in_use_print_sass
37
- } %>
38
31
  <%= render "govuk_publishing_components/components/textarea", {
39
32
  label: {
40
33
  text: "Add this to your application's main js file, before your other local imports."
@@ -2,6 +2,7 @@
2
2
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
3
3
 
4
4
  hint_text ||= ""
5
+ id ||= nil
5
6
  is_radio_label ||= false
6
7
  bold ||= false
7
8
  heading_size = false unless shared_helper.valid_heading_size?(heading_size)
@@ -18,10 +19,10 @@
18
19
 
19
20
  <% if is_page_heading %>
20
21
  <%= tag.h1 text, class: "govuk-label-wrapper" do %>
21
- <%= tag.label text, for: html_for, class: css_classes %>
22
+ <%= tag.label text, id: id, for: html_for, class: css_classes %>
22
23
  <% end %>
23
24
  <% else %>
24
- <%= tag.label text, for: html_for, class: css_classes %>
25
+ <%= tag.label text, id: id, for: html_for, class: css_classes %>
25
26
  <% end %>
26
27
 
27
28
  <% if hint_text.present? %>
@@ -9,8 +9,7 @@
9
9
  <meta name="viewport" content="width=device-width, initial-scale=1">
10
10
  <%= csrf_meta_tags %>
11
11
  <%= favicon_link_tag "govuk_publishing_components/favicon-#{environment}.png" %>
12
- <%= stylesheet_link_tag "application" %>
13
- <%= stylesheet_link_tag "print", media: "print" %>
12
+ <%= stylesheet_link_tag "application", media: "all" %>
14
13
  <%= javascript_include_tag "govuk_publishing_components/vendor/modernizr" %>
15
14
  <%= yield :head %>
16
15
  </head>
@@ -62,7 +62,6 @@
62
62
  <%= csrf_meta_tags %>
63
63
 
64
64
  <%= stylesheet_link_tag "application", media: "all" %>
65
- <%= stylesheet_link_tag "print", media: "print" %>
66
65
  <!--[if lt IE 9]><%= javascript_include_tag "govuk_publishing_components/ie", integrity: true, crossorigin: "anonymous" %><![endif]-->
67
66
  <link rel="shortcut icon" href="<%= asset_path 'favicon.ico' %>" type="image/x-icon" />
68
67
  <link rel="mask-icon" href="<%= asset_path 'govuk-mask-icon.svg' %>" color="#0b0c0c">
@@ -2,7 +2,7 @@
2
2
  logo_link ||= "https://www.gov.uk/"
3
3
  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
- navigation_links = t("components.layout_super_navigation_header.navigation_links")
5
+ navigation_links_columns = t("components.layout_super_navigation_header.navigation_links_columns")
6
6
  navigation_menu_heading = t("components.layout_super_navigation_header.navigation_menu_heading")
7
7
  navigation_search_heading = t("components.layout_super_navigation_header.navigation_search_heading")
8
8
  navigation_search_subheading = t("components.layout_super_navigation_header.navigation_search_subheading")
@@ -65,140 +65,93 @@
65
65
  <h2 id="super-navigation-menu-heading" class="govuk-visually-hidden">
66
66
  <%= navigation_menu_heading %>
67
67
  </h2>
68
- <button
69
- aria-controls="super-navigation-menu"
70
- aria-expanded="true"
71
- aria-label="<%= hide_navigation_menu_text %>"
72
- class="gem-c-layout-super-navigation-header__navigation-top-toggle-button"
73
- data-text-for-hide="<%= hide_navigation_menu_text %>"
74
- data-text-for-show="<%= show_navigation_menu_text %>"
75
- data-toggle-desktop-group="hidden"
76
- data-toggle-mobile-group="top"
77
- data-tracking-key="menu"
78
- hidden
79
- id="super-navigation-menu-toggle"
80
- type="button"
81
- data-ga4-event="<%= {
82
- "event_name": "select_content",
83
- "type": "header menu bar",
84
- "text": "Menu",
85
- "index": 1,
86
- "index_total": navigation_links.length + 2,
87
- "section": "Menu"
88
- }.to_json %>"
89
- >
90
- <span class="gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner">
91
- Menu
68
+
69
+ <%
70
+ link = t("components.layout_super_navigation_header.navigation_link")
71
+ unique_id = SecureRandom.hex(4)
72
+ show_menu_text = show_navigation_menu_text
73
+ hide_menu_text = hide_navigation_menu_text
74
+ tracking_label = link[:label].downcase.gsub(/\s+/, "")
75
+ %>
76
+
77
+ <%= link_to link[:href], {
78
+ class: "gem-c-layout-super-navigation-header__navigation-item-link",
79
+ data: {
80
+ track_action: "#{tracking_label}Link",
81
+ track_category: "headerClicked",
82
+ track_label: link[:href],
83
+ track_dimension: link[:label],
84
+ track_dimension_index: "29",
85
+ }
86
+ } do %>
87
+ <span class="gem-c-layout-super-navigation-header__navigation-item-link-inner">
88
+ <%= link[:label] %>
92
89
  </span>
93
- </button>
94
- <ul id="super-navigation-menu" class="gem-c-layout-super-navigation-header__navigation-items">
95
- <% navigation_links.each_with_index do | link, index | %>
96
- <%
97
- has_children = (link[:menu_contents].present? or link[:footer_links].present?)
98
- li_classes = %w[gem-c-layout-super-navigation-header__navigation-item]
99
- li_classes << "gem-c-layout-super-navigation-header__navigation-item--with-children" if has_children
100
- unique_id = SecureRandom.hex(4)
101
- show_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.show", :label => link[:label])
102
- hide_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.hide", :label => link[:label])
103
- tracking_label = link[:label].downcase.gsub(/\s+/, "")
104
- %>
105
- <%= tag.li class: li_classes do %>
106
- <div class="gem-c-layout-super-navigation-header__navigation-toggle-wrapper govuk-clearfix">
107
- <%= link_to link[:href], {
108
- class: "gem-c-layout-super-navigation-header__navigation-item-link",
109
- data: {
110
- track_action: "#{tracking_label}Link",
111
- track_category: "headerClicked",
112
- track_label: link[:href],
113
- track_dimension: link[:label],
114
- track_dimension_index: "29",
115
- }
116
- } do %>
117
- <span class="gem-c-layout-super-navigation-header__navigation-item-link-inner">
118
- <%= link[:label] %>
119
- </span>
120
- <% end %>
121
- <% if has_children %>
122
- <%= content_tag(:button, {
123
- aria: {
124
- controls: "super-navigation-menu__section-#{unique_id}",
125
- expanded: false,
126
- label: show_menu_text,
127
- },
128
- class: "gem-c-layout-super-navigation-header__navigation-second-toggle-button",
129
- data: {
130
- text_for_hide: hide_menu_text,
131
- text_for_show: show_menu_text,
132
- toggle_desktop_group: "top",
133
- toggle_mobile_group: "second",
134
- tracking_key: tracking_label,
135
- ga4: {
136
- event_name: "select_content",
137
- type: "header menu bar",
138
- text: link[:label],
139
- index: index + 2,
140
- index_total: navigation_links.length + 2,
141
- section: link[:label]
142
- }
143
- },
144
- hidden: true,
145
- id: "super-navigation-menu__section-#{unique_id}-toggle",
146
- type: "button",
147
- }) do %>
148
- <%= tag.span link[:label], class: "gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner" %>
149
- <% end %>
150
- <% end %>
151
- </div>
152
- <% if has_children %>
153
- <div
154
- hidden
155
- class="gem-c-layout-super-navigation-header__navigation-dropdown-menu"
156
- id="super-navigation-menu__section-<%= unique_id %>"
157
- >
158
- <div class="govuk-width-container gem-c-layout-super-navigation-header__width-container">
159
- <div class="govuk-grid-row">
160
- <div class="govuk-grid-column-one-third-from-desktop">
161
- <% if link[:description].present? %>
162
- <h3 class="govuk-body-l gem-c-layout-super-navigation-header__menu-description">
163
- <%= link[:description] %>
164
- </h3>
165
- <% end %>
166
- </div>
167
- <div class="govuk-grid-column-two-thirds-from-desktop">
168
- <% if link[:menu_contents].present? %>
169
- <ul class="gem-c-layout-super-navigation-header__navigation-second-items gem-c-layout-super-navigation-header__navigation-second-items--<%= link[:label].parameterize %>">
170
- <% link[:menu_contents].each do | item | %>
171
- <%
172
- has_description = item[:description].present?
173
- link_classes = %w[govuk-link gem-c-layout-super-navigation-header__navigation-second-item-link]
174
- link_classes << "gem-c-layout-super-navigation-header__navigation-second-item-link--with-description" if has_description
175
- %>
176
- <li class="gem-c-layout-super-navigation-header__dropdown-list-item">
177
- <%= link_to item[:label], item[:href], {
178
- class: link_classes,
179
- data: {
180
- track_action: "#{tracking_label}Link",
181
- track_category: "headerClicked",
182
- track_label: item[:href],
183
- track_dimension: item[:label],
184
- track_dimension_index: "29",
185
- }
186
- } %>
187
- <%= tag.p item[:description], class: "gem-c-layout-super-navigation-header__navigation-second-item-description" if has_description %>
188
- </li>
189
- <% end %>
190
- </ul>
191
- <% end %>
192
- <% if link[:footer_links].present? %>
193
- <hr class="gem-c-layout-super-navigation-header__navigation-second-footer-break govuk-section-break govuk-section-break--visible">
194
- <ul class="gem-c-layout-super-navigation-header__navigation-second-footer-list">
195
- <% link[:footer_links].each do | item | %>
196
- <li class="gem-c-layout-super-navigation-header__navigation-second-footer-item">
90
+ <% end %>
91
+
92
+ <%= content_tag(:button, {
93
+ aria: {
94
+ controls: "super-navigation-menu-#{unique_id}",
95
+ expanded: false,
96
+ label: show_menu_text,
97
+ },
98
+ class: "gem-c-layout-super-navigation-header__navigation-top-toggle-button",
99
+ data: {
100
+ text_for_hide: hide_menu_text,
101
+ text_for_show: show_menu_text,
102
+ toggle_desktop_group: "top",
103
+ toggle_mobile_group: "top",
104
+ tracking_key: tracking_label,
105
+ ga4_event: {
106
+ event_name: "select_content",
107
+ type: "header menu bar",
108
+ text: link[:label],
109
+ index: 1,
110
+ index_total: 2,
111
+ section: link[:label]
112
+ }
113
+ },
114
+ hidden: true,
115
+ id: "super-navigation-menu-#{unique_id}-toggle",
116
+ type: "button",
117
+ }) do %>
118
+ <%= tag.span link[:label], class: "gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner" %>
119
+ <% end %>
120
+ <%= tag.div class: "gem-c-layout-super-navigation-header__navigation-items" do %>
121
+ <div
122
+ id="super-navigation-menu-<%= unique_id %>" hidden
123
+ class="gem-c-layout-super-navigation-header__navigation-dropdown-menu"
124
+ >
125
+ <div class="gem-c-layout-super-navigation-header__width-container">
126
+ <div class="govuk-grid-row">
127
+
128
+ <% navigation_links_columns.each_with_index do | column, index | %>
129
+ <%
130
+ case column[:size]
131
+ when 2
132
+ width_class = "govuk-grid-column-two-thirds-from-desktop"
133
+ when 3
134
+ width_class = "govuk-grid-column-full-from-desktop"
135
+ else
136
+ width_class = "govuk-grid-column-one-third-from-desktop"
137
+ end
138
+ %>
139
+
140
+ <div class="<%= width_class %> gem-c-layout-super-navigation-header__column--<%= column[:label].downcase.sub(" ", "-") %>">
141
+ <h3 class="govuk-heading-m gem-c-layout-super-navigation-header__column-header">
142
+ <%= column[:label] %>
143
+ </h3>
144
+ <ul class="gem-c-layout-super-navigation-header__navigation-second-items gem-c-layout-super-navigation-header__navigation-second-items--<%= column[:label].downcase.sub(" ", "-") %>">
145
+ <% column[:menu_contents].each do | item | %>
146
+ <%
147
+ has_description = item[:description].present?
148
+ link_classes = %w[govuk-link gem-c-layout-super-navigation-header__navigation-second-item-link]
149
+ link_classes << "gem-c-layout-super-navigation-header__navigation-second-item-link--with-description" if has_description
150
+ tracking_label = column[:label].downcase.gsub(/\s+/, "")
151
+ %>
152
+ <li class="gem-c-layout-super-navigation-header__dropdown-list-item">
197
153
  <%= link_to item[:label], item[:href], {
198
- class: [
199
- "govuk-link",
200
- "gem-c-layout-super-navigation-header__navigation-second-footer-link",
201
- ],
154
+ class: link_classes,
202
155
  data: {
203
156
  track_action: "#{tracking_label}Link",
204
157
  track_category: "headerClicked",
@@ -207,18 +160,16 @@
207
160
  track_dimension_index: "29",
208
161
  }
209
162
  } %>
163
+ <%= tag.p item[:description], class: "gem-c-layout-super-navigation-header__navigation-second-item-description" if has_description %>
210
164
  </li>
211
- <% end %>
212
- </ul>
213
- <% end %>
165
+ <% end %>
166
+ </ul>
214
167
  </div>
215
- </div>
168
+ <% end %>
216
169
  </div>
217
170
  </div>
218
- <% end %>
219
- <% end %>
171
+ </div>
220
172
  <% end %>
221
- </ul>
222
173
 
223
174
  <button
224
175
  aria-controls="super-search-menu"
@@ -237,8 +188,8 @@
237
188
  "event_name": "select_content",
238
189
  "type": "header menu bar",
239
190
  "text": "Search",
240
- "index": navigation_links.length + 2,
241
- "index_total": navigation_links.length + 2,
191
+ "index": 2,
192
+ "index_total": 2,
242
193
  "section": "Search"
243
194
  }.to_json %>"
244
195
  >
@@ -265,7 +216,7 @@
265
216
  </h3>
266
217
  <div class="gem-c-layout-super-navigation-header__search-item">
267
218
  <a class="gem-c-layout-super-navigation-header__search-item-link" href="/search">
268
- <span class="gem-c-layout-super-navigation-header__search-item-link-text">
219
+ <span class="govuk-visually-hidden">
269
220
  <%= search_text %>
270
221
  </span>
271
222
  <svg
@@ -59,3 +59,9 @@ examples:
59
59
  html_for: "id-radio"
60
60
  hint_id: "id-radio"
61
61
  hint_text: "It’s on your National Insurance card, benefit letter, payslip or P60. For example, ‘QQ 12 34 56 C’."
62
+ with_id:
63
+ description:
64
+ data:
65
+ text: "Label with an ID"
66
+ id: "id-for-the-label"
67
+ html_for: "id-that-matches-input-6"
@@ -16,8 +16,7 @@
16
16
  <%= csrf_meta_tags %>
17
17
  <%= favicon_link_tag "govuk_publishing_components/favicon-production.png" %>
18
18
 
19
- <%= stylesheet_link_tag "component_guide/application", media: "screen" %>
20
- <%= stylesheet_link_tag "component_guide/print", media: "print" %>
19
+ <%= stylesheet_link_tag "component_guide/application", media: "all" %>
21
20
  <%= yield :application_stylesheet %>
22
21
 
23
22
  <%= javascript_include_tag "govuk_publishing_components/vendor/modernizr" %>
@@ -112,7 +112,10 @@ ar:
112
112
  menu_toggle_label:
113
113
  hide:
114
114
  show:
115
- navigation_links:
115
+ navigation_link:
116
+ href:
117
+ label:
118
+ navigation_links_columns:
116
119
  navigation_menu_heading:
117
120
  navigation_search_heading:
118
121
  navigation_search_subheading:
@@ -159,13 +162,6 @@ ar:
159
162
  statistical_data_sets: مجموعة بيانات إحصائية
160
163
  topical_events: حدث موضوعي
161
164
  topics: استكشف الموضوع
162
- transition:
163
- hub_page_link_path: "/transition-check/questions"
164
- hub_page_link_text: احصل على قائمة مخصصة للإجراءات
165
- hub_page_title: أداة التحقق الخاصة ببرِيكْسِت
166
- link_path: "/brexit"
167
- link_text: تحقق مما تحتاج إلى القيام به
168
- title: برِيكْسِت
169
165
  ukraine:
170
166
  links:
171
167
  title:
@@ -15,6 +15,7 @@ az:
15
15
  opendocument_html: Bu fayl <a href='https://www.gov.uk/guidance/using-open-document-formats-odf-in-your-organisation' target=%{target} class='govuk-link'>OpenDocument</a> formatındadır
16
16
  order_a_copy: Surətini sifariş edin
17
17
  page:
18
+ one:
18
19
  other: "%{count} səhifə"
19
20
  reference: 'İst: %{reference}'
20
21
  request_format_cta: İstifadə edilə bilən format tələb edin.
@@ -108,7 +109,10 @@ az:
108
109
  menu_toggle_label:
109
110
  hide:
110
111
  show:
111
- navigation_links:
112
+ navigation_link:
113
+ href:
114
+ label:
115
+ navigation_links_columns:
112
116
  navigation_menu_heading:
113
117
  navigation_search_heading:
114
118
  navigation_search_subheading:
@@ -155,13 +159,6 @@ az:
155
159
  statistical_data_sets: Statistik məlumat paketi
156
160
  topical_events: Aktual tədbir
157
161
  topics: Mövzunu araşdırın
158
- transition:
159
- hub_page_link_path: "/transition-check/questions"
160
- hub_page_link_text: Fəaliyyətlər üzrə fərdi siyahı əldə edin
161
- hub_page_title: Brexit yoxlayıcısı
162
- link_path: "/brexit"
163
- link_text: Nələri etməli olduğunuzu yoxlayın
164
- title: Brexit
165
162
  ukraine:
166
163
  links:
167
164
  title:
@@ -115,7 +115,10 @@ be:
115
115
  menu_toggle_label:
116
116
  hide:
117
117
  show:
118
- navigation_links:
118
+ navigation_link:
119
+ href:
120
+ label:
121
+ navigation_links_columns:
119
122
  navigation_menu_heading:
120
123
  navigation_search_heading:
121
124
  navigation_search_subheading:
@@ -162,13 +165,6 @@ be:
162
165
  statistical_data_sets: Статыстычныя дадзеныя
163
166
  topical_events: Актуальная падзея
164
167
  topics: Вывучыць тэму
165
- transition:
166
- hub_page_link_path: "/transition-check/questions"
167
- hub_page_link_text: Атрымайце персанальны спіс дзеянняў
168
- hub_page_title: Праверка Брэкзiт
169
- link_path: "/brexit"
170
- link_text: Праверце, што вам трэба зрабіць
171
- title: Брэкзiт
172
168
  ukraine:
173
169
  links:
174
170
  title:
@@ -113,7 +113,10 @@ bg:
113
113
  menu_toggle_label:
114
114
  hide:
115
115
  show:
116
- navigation_links:
116
+ navigation_link:
117
+ href:
118
+ label:
119
+ navigation_links_columns:
117
120
  navigation_menu_heading:
118
121
  navigation_search_heading:
119
122
  navigation_search_subheading:
@@ -160,13 +163,6 @@ bg:
160
163
  statistical_data_sets: Набор от статистически данни
161
164
  topical_events: Тематично събитие
162
165
  topics: Разглеждане на темата
163
- transition:
164
- hub_page_link_path: "/transition-check/questions"
165
- hub_page_link_text: Получаване на персонализиран списък с действия
166
- hub_page_title: Проверка за Брекзит
167
- link_path: "/brexit"
168
- link_text: Проверете какво трябва да направите
169
- title: Брекзит
170
166
  ukraine:
171
167
  links:
172
168
  title:
@@ -110,7 +110,10 @@ bn:
110
110
  menu_toggle_label:
111
111
  hide:
112
112
  show:
113
- navigation_links:
113
+ navigation_link:
114
+ href:
115
+ label:
116
+ navigation_links_columns:
114
117
  navigation_menu_heading:
115
118
  navigation_search_heading:
116
119
  navigation_search_subheading:
@@ -157,13 +160,6 @@ bn:
157
160
  statistical_data_sets: পরিসংখ্যানগত তথ্য সংকলন
158
161
  topical_events: বিষয়ভিত্তিক ইভেন্ট
159
162
  topics: বিষয়টি অনুসন্ধান করুন
160
- transition:
161
- hub_page_link_path: "/transition-check/questions"
162
- hub_page_link_text: গৃহীত পদক্ষেপের ব্যক্তিগতকৃত তালিকা নিন
163
- hub_page_title: ব্রেক্সিট চেকার
164
- link_path: "/brexit"
165
- link_text: আপনার যা করা প্রয়োজন তা দেখুন
166
- title: ব্রেক্সিট
167
163
  ukraine:
168
164
  links:
169
165
  title:
@@ -114,7 +114,10 @@ cs:
114
114
  menu_toggle_label:
115
115
  hide:
116
116
  show:
117
- navigation_links:
117
+ navigation_link:
118
+ href:
119
+ label:
120
+ navigation_links_columns:
118
121
  navigation_menu_heading:
119
122
  navigation_search_heading:
120
123
  navigation_search_subheading:
@@ -161,13 +164,6 @@ cs:
161
164
  statistical_data_sets: Soubor statistických údajů.
162
165
  topical_events: Aktuální událost
163
166
  topics: Prozkoumat téma
164
- transition:
165
- hub_page_link_path: "/transition-check/questions"
166
- hub_page_link_text: Získejte personalizovaný seznam akcí
167
- hub_page_title: Kontrola brexitu
168
- link_path: "/brexit"
169
- link_text: Zkontrolujte, co je třeba udělat
170
- title: Brexit
171
167
  ukraine:
172
168
  links:
173
169
  title: