govuk_publishing_components 27.10.0 → 27.10.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
- .gem-c-super-navigation-header a:after {
2
- content: " ( " attr(href) " ) ";
1
+ .gem-c-layout-super-navigation-header__content {
2
+ display: none;
3
3
  }
@@ -1,4 +1,7 @@
1
- <% user_organisation ||= nil %>
1
+ <%
2
+ warn('DEPRECATION WARNING: admin_analytics component is deprecated and will be removed in a future major release of govuk_publishing_components')
3
+ user_organisation ||= nil
4
+ %>
2
5
 
3
6
  <script class="analytics">
4
7
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@@ -1,4 +1,5 @@
1
1
  <%
2
+ warn('DEPRECATION WARNING: government_navigation component is deprecated and will be removed in a future major release of govuk_publishing_components')
2
3
  active ||= nil
3
4
  %>
4
5
 
@@ -1,4 +1,5 @@
1
1
  <%
2
+ warn('DEPRECATION WARNING: highlight_boxes component is deprecated and will be removed in a future major release of govuk_publishing_components')
2
3
  items ||= []
3
4
  inverse ||= false
4
5
  half_width ||= false
@@ -18,7 +18,8 @@
18
18
  <header role="banner" class="gem-c-layout-super-navigation-header">
19
19
  <div class="gem-c-layout-super-navigation-header__container govuk-width-container govuk-clearfix">
20
20
  <div class="gem-c-layout-super-navigation-header__header-logo">
21
- <a class="govuk-header__link govuk-header__link--homepage"
21
+ <a
22
+ class="govuk-header__link govuk-header__link--homepage"
22
23
  data-module="gem-track-click"
23
24
  data-track-action="logoLink"
24
25
  data-track-category="headerClicked"
@@ -27,26 +28,30 @@
27
28
  data-track-dimension-index="29"
28
29
  href="<%= logo_link %>"
29
30
  id="logo"
30
- title="<%= logo_link_title %>">
31
+ title="<%= logo_link_title %>"
32
+ >
31
33
  <span class="govuk-header__logotype">
32
- <svg aria-hidden="true"
34
+ <!--[if gt IE 8]><!-->
35
+ <svg
36
+ aria-hidden="true"
33
37
  class="govuk-header__logotype-crown gem-c-layout-super-navigation-header__logotype-crown"
34
38
  focusable="false"
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4-.2.7-.6 1-.9zM66 92.8c16.9 0 32.8 1.1 47.1 3.2 4-16.9 8.9-26.7 14-33.5l-9.6-3.4c1 4.9 1.1 7.2 0 10.2-1.5-1.4-3-4.3-4.2-8.7L108.6 76c2.8-2 5-3.2 7.5-3.3-4.4 9.4-10 11.9-13.6 11.2-4.3-.8-6.3-4.6-5.6-7.9 1-4.7 5.7-5.9 8-.5 4.3-8.7-3-11.4-7.6-8.8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z">
48
+ >
42
49
  </path>
43
- <image class="govuk-header__logotype-crown-fallback-image"
44
- height="30"
45
- src="<%= asset_path('govuk-logotype-crown.png') %>"
46
- width="36"
47
- xlink:href="">
48
- </image>
49
50
  </svg>
51
+ <!--<![endif]-->
52
+ <!--[if IE 8]>
53
+ <img src="<%= asset_path('govuk-logotype-crown.png') %>" alt="" class="govuk-header__logotype-crown-fallback-image" width="36" height="32">
54
+ <![endif]-->
50
55
  <span class="govuk-header__logotype-text">
51
56
  <%= logo_text %>
52
57
  </span>
@@ -76,6 +81,13 @@
76
81
  type="button"
77
82
  >
78
83
  Menu
84
+ <span
85
+ aria-hidden="true"
86
+ class="gem-c-layout-super-navigation-header__navigation-top-toggle-close-icon"
87
+ focusable="false"
88
+ >
89
+ &times;
90
+ </span>
79
91
  </button>
80
92
  <ul id="super-navigation-menu" class="gem-c-layout-super-navigation-header__navigation-items">
81
93
  <% navigation_links.each_with_index do | link, index | %>
@@ -89,34 +101,38 @@
89
101
  tracking_label = link[:label].downcase.gsub(/\s+/, "")
90
102
  %>
91
103
  <%= tag.li class: li_classes do %>
92
- <%= link_to link[:label], link[:href], {
93
- class: "gem-c-layout-super-navigation-header__navigation-item-link",
94
- data: {
95
- module: "gem-track-click",
96
- track_action: "#{tracking_label}Link",
97
- track_category: "headerClicked",
98
- track_label: link[:href],
99
- track_dimension: link[:label],
100
- track_dimension_index: "29",
101
- }
102
- } %>
104
+ <div class="gem-c-layout-super-navigation-header__navigation-toggle-wrapper govuk-clearfix">
105
+ <%= link_to link[:label], link[:href], {
106
+ class: "gem-c-layout-super-navigation-header__navigation-item-link",
107
+ data: {
108
+ module: "gem-track-click",
109
+ track_action: "#{tracking_label}Link",
110
+ track_category: "headerClicked",
111
+ track_label: link[:href],
112
+ track_dimension: link[:label],
113
+ track_dimension_index: "29",
114
+ }
115
+ } %>
116
+ <%= content_tag(:button, link[:label], {
117
+ aria: {
118
+ controls: "super-navigation-menu__section-#{unique_id}",
119
+ expanded: false,
120
+ label: show_menu_text,
121
+ },
122
+ class: "gem-c-layout-super-navigation-header__navigation-second-toggle-button",
123
+ data: {
124
+ text_for_hide: hide_menu_text,
125
+ text_for_show: show_menu_text,
126
+ toggle_desktop_group: "top",
127
+ toggle_mobile_group: "second",
128
+ tracking_key: tracking_label,
129
+ },
130
+ hidden: true,
131
+ id: "super-navigation-menu__section-#{unique_id}-toggle",
132
+ type: "button",
133
+ }) if has_children %>
134
+ </div>
103
135
  <% if has_children %>
104
- <button
105
- aria-controls="super-navigation-menu__section-<%= unique_id %>"
106
- aria-expanded="false"
107
- aria-label="<%= show_menu_text %>"
108
- class="gem-c-layout-super-navigation-header__navigation-second-toggle-button"
109
- data-text-for-hide="<%= hide_menu_text %>"
110
- data-text-for-show="<%= show_menu_text %>"
111
- data-toggle-desktop-group="top"
112
- data-toggle-mobile-group="second"
113
- data-tracking-key="<%= tracking_label %>"
114
- hidden
115
- id="super-navigation-menu__section-<%= unique_id %>-toggle"
116
- type="button"
117
- >
118
- <%= link[:label] %>
119
- </button>
120
136
  <div
121
137
  hidden
122
138
  class="gem-c-layout-super-navigation-header__navigation-dropdown-menu"
@@ -152,7 +168,7 @@
152
168
  track_dimension_index: "29",
153
169
  }
154
170
  } %>
155
- <%= tag.p item[:description], class: "govuk-body govuk-!-margin-0" if has_description %>
171
+ <%= tag.p item[:description], class: "govuk-body govuk-!-margin-0 govuk-!-margin-top-1" if has_description %>
156
172
  </li>
157
173
  <% end %>
158
174
  </ul>
@@ -214,9 +230,17 @@
214
230
  <%= search_text %>
215
231
  </span>
216
232
  <%=
217
- render "govuk_publishing_components/components/search/search_icon",
218
- classes: %W[gem-c-layout-super-navigation-header__search-toggle-button-link-icon]
233
+ render "govuk_publishing_components/components/search/search_icon", {
234
+ classes: %w[gem-c-layout-super-navigation-header__search-toggle-button-link-icon],
235
+ }
219
236
  %>
237
+ <span
238
+ aria-hidden="true"
239
+ class="gem-c-layout-super-navigation-header__navigation-top-toggle-close-icon"
240
+ focusable="false"
241
+ >
242
+ &times;
243
+ </span>
220
244
  </button>
221
245
 
222
246
  <div id="super-search-menu" class="gem-c-layout-super-navigation-header__search-items">
@@ -243,14 +267,16 @@
243
267
  cy="10.0161"
244
268
  r="8.51613"
245
269
  stroke="currentColor"
246
- stroke-width="3" />
270
+ stroke-width="3"
271
+ />
247
272
  <line
248
273
  x1="15.8668"
249
274
  y1="16.3587"
250
275
  x2="25.4475"
251
276
  y2="25.9393"
252
277
  stroke="currentColor"
253
- stroke-width="3" />
278
+ stroke-width="3"
279
+ />
254
280
  </svg>
255
281
  </a>
256
282
  </div>
@@ -288,16 +314,20 @@
288
314
  <ul class="govuk-list">
289
315
  <% popular_links.each do | popular_link | %>
290
316
  <li class="gem-c-layout-super-navigation-header__popular-item">
291
- <a class="govuk-link gem-c-layout-super-navigation-header__popular-link"
292
- href="<%= popular_link[:href] %>"
293
- data-module="gem-track-click"
294
- data-track-action="popularLink"
295
- data-track-category="headerClicked"
296
- data-track-label="<%= popular_link[:href] %>"
297
- data-track-dimension="<%= popular_link[:label] %>"
298
- data-track-dimension-index="29">
299
- <%= popular_link[:label] %>
300
- </a>
317
+ <%= link_to popular_link[:label], popular_link[:href], {
318
+ class: [
319
+ "govuk-link",
320
+ "gem-c-layout-super-navigation-header__popular-link",
321
+ ],
322
+ data: {
323
+ module: "gem-track-click",
324
+ track_action: "popularLink",
325
+ track_category: "headerClicked",
326
+ track_label: popular_link[:href],
327
+ track_dimension: popular_link[:label],
328
+ track_dimension_index: "29",
329
+ }
330
+ } %>
301
331
  </li>
302
332
  <% end %>
303
333
  </ul>
@@ -1,4 +1,5 @@
1
1
  <%
2
+ warn('DEPRECATION WARNING: taxonomy_list component is deprecated and will be removed in a future major release of govuk_publishing_components')
2
3
  highlight_box ||= false
3
4
  document_list ||= false
4
5
  image_cards ||= false
@@ -16,12 +16,21 @@ accessibility_criteria: |
16
16
 
17
17
  * have a role of banner at the root of the component (<header>) (ARIA 1.1)
18
18
  accessibility_excluded_rules:
19
- - landmark-banner-is-top-level # The header element can not be top level in the examples
20
- - landmark-no-duplicate-banner # banners will be duplicated in component examples list
19
+ # The header element can not be top level in the examples.
20
+ - landmark-banner-is-top-level
21
+ # Banners will be duplicated in component examples list.
22
+ - duplicate-id
23
+ - duplicate-id-active
24
+ - duplicate-id-aria
25
+ - landmark-no-duplicate-banner
26
+ - landmark-unique
21
27
  examples:
22
28
  default:
23
29
  with_custom_logo_link:
24
- description: The header logo links to root by default. This option allows us to override that in certain instances. Remember to change the title, as the default is "Go to the GOV.UK homepage".
30
+ description: |
31
+ The header logo links to root by default. This option allows us to override that in certain instances.
32
+
33
+ Remember to update the title, as the default is "Go to the GOV.UK homepage".
25
34
  data:
26
35
  logo_link: "https://www.example.com"
27
36
  logo_link_title: "Go to example"
@@ -1,15 +1,7 @@
1
1
  <div class="govuk-width-container">
2
- <% message = capture do %>
3
- <%= t("components.layout_for_public.account_layout.feedback.banners.phase_intro") %>
4
- <a class="govuk-link" href=<%= GovukPersonalisation::Urls.feedback %>>
5
- <%= t("components.layout_for_public.account_layout.feedback.banners.phase_link") %>
6
- </a>
7
- <%= t("components.layout_for_public.account_layout.feedback.banners.phase_outro") %>
8
- <% end %>
9
-
10
2
  <%= render "govuk_publishing_components/components/phase_banner", {
11
3
  phase: "beta",
12
- message: message
4
+ message: sanitize(t("components.layout_for_public.account_layout.feedback.banners.phase_banner_html"))
13
5
  } unless omit_account_phase_banner %>
14
6
 
15
7
  <div class="govuk-grid-row govuk-main-wrapper">
@@ -94,9 +94,7 @@ en:
94
94
  account_layout:
95
95
  feedback:
96
96
  banners:
97
- phase_intro: This is a new service – your
98
- phase_link: feedback
99
- phase_outro: will help us to improve it.
97
+ phase_banner_html: This is a new service – your <a class="govuk-link" href="https://signin.account.gov.uk/contact-us?supportType=PUBLIC">feedback</a> will help us to improve it.
100
98
  navigation:
101
99
  destroy_user_session: Sign out
102
100
  menu_bar:
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "27.10.0".freeze
2
+ VERSION = "27.10.4".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 27.10.0
4
+ version: 27.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-29 00:00:00.000000000 Z
11
+ date: 2021-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -268,6 +268,20 @@ dependencies:
268
268
  - - ">="
269
269
  - !ruby/object:Gem::Version
270
270
  version: '0'
271
+ - !ruby/object:Gem::Dependency
272
+ name: rails_translation_manager
273
+ requirement: !ruby/object:Gem::Requirement
274
+ requirements:
275
+ - - ">="
276
+ - !ruby/object:Gem::Version
277
+ version: '0'
278
+ type: :development
279
+ prerelease: false
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ requirements:
282
+ - - ">="
283
+ - !ruby/object:Gem::Version
284
+ version: '0'
271
285
  - !ruby/object:Gem::Dependency
272
286
  name: rake
273
287
  requirement: !ruby/object:Gem::Requirement