govuk_publishing_components 24.11.0 → 24.13.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics/scroll-tracker.js +1 -1
  3. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +3 -0
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +50 -31
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +0 -35
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +0 -13
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +0 -6
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_inverse-header.scss +0 -4
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +10 -3
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +11 -1
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_print-link.scss +1 -1
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +0 -1
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_show-password.scss +1 -0
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +8 -2
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +6 -2
  16. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +1 -0
  17. data/app/views/govuk_publishing_components/components/_action_link.html.erb +2 -1
  18. data/app/views/govuk_publishing_components/components/_attachment.html.erb +3 -3
  19. data/app/views/govuk_publishing_components/components/_attachment_link.html.erb +1 -1
  20. data/app/views/govuk_publishing_components/components/_character_count.html.erb +1 -1
  21. data/app/views/govuk_publishing_components/components/_contents_list.html.erb +10 -3
  22. data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +2 -2
  23. data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +16 -6
  24. data/app/views/govuk_publishing_components/components/_government_navigation.html.erb +14 -14
  25. data/app/views/govuk_publishing_components/components/_image_card.html.erb +15 -2
  26. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +6 -9
  27. data/app/views/govuk_publishing_components/components/_metadata.html.erb +6 -6
  28. data/app/views/govuk_publishing_components/components/_modal_dialogue.html.erb +1 -1
  29. data/app/views/govuk_publishing_components/components/_organisation_logo.html.erb +13 -13
  30. data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +11 -7
  31. data/app/views/govuk_publishing_components/components/_share_links.html.erb +1 -1
  32. data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +4 -4
  33. data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +1 -1
  34. data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +9 -9
  35. data/app/views/govuk_publishing_components/components/_success_alert.html.erb +1 -1
  36. data/app/views/govuk_publishing_components/components/_tabs.html.erb +1 -1
  37. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +9 -4
  38. data/app/views/govuk_publishing_components/components/docs/government_navigation.yml +2 -0
  39. data/app/views/govuk_publishing_components/components/docs/inset_text.yml +2 -2
  40. data/app/views/govuk_publishing_components/components/docs/inverse_header.yml +18 -15
  41. data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +6 -6
  42. data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +5 -5
  43. data/app/views/govuk_publishing_components/components/feedback/_yes_no_banner.html.erb +6 -6
  44. data/app/views/govuk_publishing_components/components/metadata/_sentence.html.erb +2 -2
  45. data/app/views/govuk_publishing_components/components/related_navigation/_section.html.erb +1 -1
  46. data/config/locales/ar.yml +33 -0
  47. data/config/locales/az.yml +33 -0
  48. data/config/locales/be.yml +33 -0
  49. data/config/locales/bg.yml +33 -0
  50. data/config/locales/bn.yml +33 -0
  51. data/config/locales/cs.yml +33 -0
  52. data/config/locales/cy.yml +34 -1
  53. data/config/locales/da.yml +33 -0
  54. data/config/locales/de.yml +33 -0
  55. data/config/locales/dr.yml +33 -0
  56. data/config/locales/el.yml +33 -0
  57. data/config/locales/en.yml +45 -9
  58. data/config/locales/es-419.yml +33 -0
  59. data/config/locales/es.yml +33 -0
  60. data/config/locales/et.yml +33 -0
  61. data/config/locales/fa.yml +33 -0
  62. data/config/locales/fi.yml +33 -0
  63. data/config/locales/fr.yml +33 -0
  64. data/config/locales/gd.yml +33 -0
  65. data/config/locales/gu.yml +33 -0
  66. data/config/locales/he.yml +33 -0
  67. data/config/locales/hi.yml +33 -0
  68. data/config/locales/hr.yml +33 -0
  69. data/config/locales/hu.yml +33 -0
  70. data/config/locales/hy.yml +33 -0
  71. data/config/locales/id.yml +33 -0
  72. data/config/locales/is.yml +33 -0
  73. data/config/locales/it.yml +33 -0
  74. data/config/locales/ja.yml +33 -0
  75. data/config/locales/ka.yml +33 -0
  76. data/config/locales/kk.yml +33 -0
  77. data/config/locales/ko.yml +33 -0
  78. data/config/locales/lt.yml +33 -0
  79. data/config/locales/lv.yml +33 -0
  80. data/config/locales/ms.yml +33 -0
  81. data/config/locales/mt.yml +33 -0
  82. data/config/locales/nl.yml +33 -0
  83. data/config/locales/no.yml +33 -0
  84. data/config/locales/pa-pk.yml +33 -0
  85. data/config/locales/pa.yml +33 -0
  86. data/config/locales/pl.yml +33 -0
  87. data/config/locales/ps.yml +33 -0
  88. data/config/locales/pt.yml +33 -0
  89. data/config/locales/ro.yml +33 -0
  90. data/config/locales/ru.yml +33 -0
  91. data/config/locales/si.yml +33 -0
  92. data/config/locales/sk.yml +33 -0
  93. data/config/locales/sl.yml +33 -0
  94. data/config/locales/so.yml +33 -0
  95. data/config/locales/sq.yml +33 -0
  96. data/config/locales/sr.yml +33 -0
  97. data/config/locales/sv.yml +33 -0
  98. data/config/locales/sw.yml +33 -0
  99. data/config/locales/ta.yml +33 -0
  100. data/config/locales/th.yml +33 -0
  101. data/config/locales/tk.yml +33 -0
  102. data/config/locales/tr.yml +33 -0
  103. data/config/locales/uk.yml +33 -0
  104. data/config/locales/ur.yml +33 -0
  105. data/config/locales/uz.yml +33 -0
  106. data/config/locales/vi.yml +33 -0
  107. data/config/locales/zh-hk.yml +33 -0
  108. data/config/locales/zh-tw.yml +33 -0
  109. data/config/locales/zh.yml +33 -0
  110. data/lib/govuk_publishing_components.rb +1 -0
  111. data/lib/govuk_publishing_components/presenters/brexit_cta_helper.rb +33 -0
  112. data/lib/govuk_publishing_components/presenters/content_item.rb +1 -3
  113. data/lib/govuk_publishing_components/presenters/contents_list_helper.rb +0 -3
  114. data/lib/govuk_publishing_components/presenters/public_layout_helper.rb +1 -1
  115. data/lib/govuk_publishing_components/version.rb +1 -1
  116. metadata +8 -7
@@ -13,15 +13,36 @@ zh-tw:
13
13
  scoped_search_description:
14
14
  attachment:
15
15
  opendocument_html:
16
+ order_a_copy:
17
+ page:
18
+ one:
19
+ other:
20
+ reference:
16
21
  request_format_cta:
17
22
  request_format_details_html:
18
23
  request_format_text:
19
24
  back_link:
20
25
  back:
26
+ character_count:
27
+ body:
28
+ type:
29
+ characters:
30
+ words:
21
31
  checkboxes:
22
32
  or:
23
33
  contents_list:
24
34
  contents:
35
+ contextual_sidebar:
36
+ pretitle:
37
+ cookie_banner:
38
+ buttons:
39
+ accept_cookies:
40
+ reject_cookies:
41
+ confirmation_message:
42
+ confirmation_message_link:
43
+ hide:
44
+ text:
45
+ title:
25
46
  feedback:
26
47
  close:
27
48
  dont_include_personal_info:
@@ -48,6 +69,10 @@ zh-tw:
48
69
  news_and_communications:
49
70
  statistics:
50
71
  worldwide:
72
+ layout_footer:
73
+ copyright_html:
74
+ licence_html:
75
+ support_links:
51
76
  layout_header:
52
77
  hide_button:
53
78
  menu:
@@ -63,6 +88,8 @@ zh-tw:
63
88
  see_all_updates:
64
89
  toggle_less:
65
90
  toggle_more:
91
+ modal_dialogue:
92
+ close_modal:
66
93
  organisation_schema:
67
94
  all_content_search_description:
68
95
  previous_and_next_navigation:
@@ -89,6 +116,9 @@ zh-tw:
89
116
  topical_events:
90
117
  topics:
91
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
92
122
  link_path:
93
123
  link_text:
94
124
  title:
@@ -115,6 +145,7 @@ zh-tw:
115
145
  part_of:
116
146
  subscription_links:
117
147
  email_signup_link_text:
148
+ feed_link_label:
118
149
  feed_link_text:
119
150
  subscriptions:
120
151
  success_alert:
@@ -122,3 +153,5 @@ zh-tw:
122
153
  summary_list:
123
154
  delete:
124
155
  edit:
156
+ tabs:
157
+ contents:
@@ -13,15 +13,36 @@ zh:
13
13
  scoped_search_description:
14
14
  attachment:
15
15
  opendocument_html:
16
+ order_a_copy:
17
+ page:
18
+ one:
19
+ other:
20
+ reference:
16
21
  request_format_cta:
17
22
  request_format_details_html:
18
23
  request_format_text:
19
24
  back_link:
20
25
  back:
26
+ character_count:
27
+ body:
28
+ type:
29
+ characters:
30
+ words:
21
31
  checkboxes:
22
32
  or:
23
33
  contents_list:
24
34
  contents:
35
+ contextual_sidebar:
36
+ pretitle:
37
+ cookie_banner:
38
+ buttons:
39
+ accept_cookies:
40
+ reject_cookies:
41
+ confirmation_message:
42
+ confirmation_message_link:
43
+ hide:
44
+ text:
45
+ title:
25
46
  feedback:
26
47
  close:
27
48
  dont_include_personal_info:
@@ -48,6 +69,10 @@ zh:
48
69
  news_and_communications:
49
70
  statistics:
50
71
  worldwide:
72
+ layout_footer:
73
+ copyright_html:
74
+ licence_html:
75
+ support_links:
51
76
  layout_header:
52
77
  hide_button:
53
78
  menu:
@@ -63,6 +88,8 @@ zh:
63
88
  see_all_updates:
64
89
  toggle_less:
65
90
  toggle_more:
91
+ modal_dialogue:
92
+ close_modal:
66
93
  organisation_schema:
67
94
  all_content_search_description:
68
95
  previous_and_next_navigation:
@@ -89,6 +116,9 @@ zh:
89
116
  topical_events:
90
117
  topics:
91
118
  transition:
119
+ hub_page_link_path:
120
+ hub_page_link_text:
121
+ hub_page_title:
92
122
  link_path:
93
123
  link_text:
94
124
  title:
@@ -115,6 +145,7 @@ zh:
115
145
  part_of:
116
146
  subscription_links:
117
147
  email_signup_link_text:
148
+ feed_link_label:
118
149
  feed_link_text:
119
150
  subscriptions:
120
151
  success_alert:
@@ -122,3 +153,5 @@ zh:
122
153
  summary_list:
123
154
  delete:
124
155
  edit:
156
+ tabs:
157
+ contents:
@@ -7,6 +7,7 @@ require "govuk_publishing_components/presenters/shared_helper"
7
7
  require "govuk_publishing_components/presenters/attachment"
8
8
  require "govuk_publishing_components/presenters/breadcrumbs"
9
9
  require "govuk_publishing_components/presenters/breadcrumb_selector"
10
+ require "govuk_publishing_components/presenters/brexit_cta_helper"
10
11
  require "govuk_publishing_components/presenters/button_helper"
11
12
  require "govuk_publishing_components/presenters/contextual_navigation"
12
13
  require "govuk_publishing_components/presenters/related_navigation_helper"
@@ -0,0 +1,33 @@
1
+ module GovukPublishingComponents
2
+ module Presenters
3
+ class BrexitCtaHelper
4
+ BREXIT_HUB_PAGE_IDS = %w[
5
+ 6555e0bf-c270-4cf9-a0c5-d20b95fab7f1
6
+ 91cd6143-69d5-4f27-99ff-a52fb0d51c78
7
+ ].freeze
8
+
9
+ def initialize(content_item)
10
+ @content_item = content_item
11
+ end
12
+
13
+ def title_key
14
+ use_brexit_hub_page_navigation? ? "components.related_navigation.transition.hub_page_title" : "components.related_navigation.transition.title"
15
+ end
16
+
17
+ def link_text_key
18
+ use_brexit_hub_page_navigation? ? "components.related_navigation.transition.hub_page_link_text" : "components.related_navigation.transition.link_text"
19
+ end
20
+
21
+ def link_path_key
22
+ use_brexit_hub_page_navigation? ? "components.related_navigation.transition.hub_page_link_path" : "components.related_navigation.transition.link_path"
23
+ end
24
+
25
+ private
26
+
27
+ def use_brexit_hub_page_navigation?
28
+ I18n.locale == :en &&
29
+ BREXIT_HUB_PAGE_IDS.include?(@content_item["content_id"])
30
+ end
31
+ end
32
+ end
33
+ end
@@ -26,11 +26,9 @@ module GovukPublishingComponents
26
26
  end
27
27
 
28
28
  def parent_taxons
29
- @parent_taxons ||= begin
30
- taxon_links
29
+ @parent_taxons ||= taxon_links
31
30
  .select { |t| phase_is_live?(t) }
32
31
  .map { |taxon| ContentItem.new(taxon) }.sort_by(&:title)
33
- end
34
32
  end
35
33
 
36
34
  def phase_is_live?(taxon)
@@ -11,9 +11,6 @@ module GovukPublishingComponents
11
11
  @contents = options[:contents] || []
12
12
  @nested = @contents.any? { |c| c[:items] && c[:items].any? }
13
13
  @format_numbers = options[:format_numbers]
14
-
15
- @classes = %w[gem-c-contents-list]
16
- @classes << " gem-c-contents-list--no-underline" unless options[:underline_links]
17
14
  end
18
15
 
19
16
  def list_item_classes(list_item, nested)
@@ -24,7 +24,7 @@ module GovukPublishingComponents
24
24
  columns: 1,
25
25
  items: [
26
26
  {
27
- href: "/transition",
27
+ href: "/brexit",
28
28
  text: "Check what you need to do",
29
29
  attributes: {
30
30
  data: {
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "24.11.0".freeze
2
+ VERSION = "24.13.2".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: 24.11.0
4
+ version: 24.13.2
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-05-27 00:00:00.000000000 Z
11
+ date: 2021-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -272,16 +272,16 @@ dependencies:
272
272
  name: rubocop-govuk
273
273
  requirement: !ruby/object:Gem::Requirement
274
274
  requirements:
275
- - - '='
275
+ - - ">="
276
276
  - !ruby/object:Gem::Version
277
- version: 4.0.0.pre.1
277
+ version: '0'
278
278
  type: :development
279
279
  prerelease: false
280
280
  version_requirements: !ruby/object:Gem::Requirement
281
281
  requirements:
282
- - - '='
282
+ - - ">="
283
283
  - !ruby/object:Gem::Version
284
- version: 4.0.0.pre.1
284
+ version: '0'
285
285
  - !ruby/object:Gem::Dependency
286
286
  name: sassc-rails
287
287
  requirement: !ruby/object:Gem::Requirement
@@ -883,6 +883,7 @@ files:
883
883
  - lib/govuk_publishing_components/presenters/attachment.rb
884
884
  - lib/govuk_publishing_components/presenters/breadcrumb_selector.rb
885
885
  - lib/govuk_publishing_components/presenters/breadcrumbs.rb
886
+ - lib/govuk_publishing_components/presenters/brexit_cta_helper.rb
886
887
  - lib/govuk_publishing_components/presenters/button_helper.rb
887
888
  - lib/govuk_publishing_components/presenters/checkboxes_helper.rb
888
889
  - lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_ancestors.rb
@@ -1977,7 +1978,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1977
1978
  - !ruby/object:Gem::Version
1978
1979
  version: '0'
1979
1980
  requirements: []
1980
- rubygems_version: 3.1.6
1981
+ rubygems_version: 3.0.3
1981
1982
  signing_key:
1982
1983
  specification_version: 4
1983
1984
  summary: A gem to document components in GOV.UK frontend applications