govuk_publishing_components 24.7.0 → 24.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/component_guide/application.js +3 -0
  3. data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +35 -4
  4. data/app/assets/javascripts/govuk_publishing_components/lib/cookie-functions.js +1 -0
  5. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +1 -1
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +0 -2
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +0 -8
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +2 -2
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +1 -2
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +0 -4
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +1 -11
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +0 -1
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_print-link.scss +0 -1
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +0 -1
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +0 -1
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +0 -4
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +0 -1
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +1 -32
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_title.scss +0 -5
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_translation-nav.scss +0 -4
  21. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +16 -2
  22. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +0 -1
  23. data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +15 -0
  24. data/app/controllers/govuk_publishing_components/audit_controller.rb +21 -17
  25. data/app/controllers/govuk_publishing_components/component_guide_controller.rb +9 -0
  26. data/app/helpers/govuk_publishing_components/application_helper.rb +3 -0
  27. data/app/models/govuk_publishing_components/audit_applications.rb +3 -3
  28. data/app/models/govuk_publishing_components/audit_comparer.rb +16 -8
  29. data/app/models/govuk_publishing_components/audit_components.rb +6 -3
  30. data/app/views/govuk_publishing_components/audit/_applications.html.erb +126 -0
  31. data/app/views/govuk_publishing_components/audit/_components.html.erb +142 -0
  32. data/app/views/govuk_publishing_components/audit/show.html.erb +22 -277
  33. data/app/views/govuk_publishing_components/component_guide/index.html.erb +18 -2
  34. data/app/views/govuk_publishing_components/component_guide/show.html.erb +1 -1
  35. data/app/views/govuk_publishing_components/components/_accordion.html.erb +25 -0
  36. data/app/views/govuk_publishing_components/components/_highlight_boxes.html.erb +1 -1
  37. data/app/views/govuk_publishing_components/components/_image_card.html.erb +14 -11
  38. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +7 -2
  39. data/app/views/govuk_publishing_components/components/_layout_header.html.erb +2 -2
  40. data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +2 -2
  41. data/app/views/govuk_publishing_components/components/_print_link.html.erb +2 -2
  42. data/app/views/govuk_publishing_components/components/_share_links.html.erb +1 -1
  43. data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +4 -4
  44. data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +3 -3
  45. data/app/views/govuk_publishing_components/components/_success_alert.html.erb +24 -8
  46. data/app/views/govuk_publishing_components/components/_title.html.erb +6 -2
  47. data/app/views/govuk_publishing_components/components/_translation_nav.html.erb +1 -1
  48. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +1 -1
  49. data/app/views/govuk_publishing_components/components/docs/accordion.yml +73 -73
  50. data/app/views/govuk_publishing_components/components/docs/button.yml +7 -6
  51. data/app/views/govuk_publishing_components/components/docs/image_card.yml +12 -0
  52. data/app/views/govuk_publishing_components/components/docs/modal_dialogue.yml +3 -0
  53. data/app/views/govuk_publishing_components/components/docs/success_alert.yml +12 -1
  54. data/config/locales/ar.yml +1 -0
  55. data/config/locales/az.yml +1 -0
  56. data/config/locales/be.yml +1 -0
  57. data/config/locales/bg.yml +1 -0
  58. data/config/locales/bn.yml +1 -0
  59. data/config/locales/cs.yml +1 -0
  60. data/config/locales/da.yml +1 -0
  61. data/config/locales/de.yml +1 -0
  62. data/config/locales/dr.yml +1 -0
  63. data/config/locales/el.yml +1 -0
  64. data/config/locales/en.yml +11 -0
  65. data/config/locales/es-419.yml +1 -0
  66. data/config/locales/es.yml +1 -0
  67. data/config/locales/fa.yml +1 -0
  68. data/config/locales/fi.yml +1 -0
  69. data/config/locales/gd.yml +1 -0
  70. data/config/locales/gu.yml +1 -0
  71. data/config/locales/he.yml +1 -0
  72. data/config/locales/hi.yml +1 -0
  73. data/config/locales/hr.yml +1 -0
  74. data/config/locales/hu.yml +1 -0
  75. data/config/locales/hy.yml +1 -0
  76. data/config/locales/id.yml +1 -0
  77. data/config/locales/is.yml +1 -0
  78. data/config/locales/it.yml +1 -0
  79. data/config/locales/ja.yml +1 -0
  80. data/config/locales/ka.yml +1 -0
  81. data/config/locales/kk.yml +1 -0
  82. data/config/locales/ko.yml +1 -0
  83. data/config/locales/lt.yml +1 -0
  84. data/config/locales/lv.yml +1 -0
  85. data/config/locales/ms.yml +1 -0
  86. data/config/locales/mt.yml +1 -0
  87. data/config/locales/nl.yml +1 -0
  88. data/config/locales/no.yml +1 -0
  89. data/config/locales/pa-pk.yml +1 -0
  90. data/config/locales/pa.yml +1 -0
  91. data/config/locales/pl.yml +1 -0
  92. data/config/locales/ps.yml +1 -0
  93. data/config/locales/pt.yml +1 -0
  94. data/config/locales/ro.yml +1 -0
  95. data/config/locales/ru.yml +1 -0
  96. data/config/locales/si.yml +1 -0
  97. data/config/locales/sk.yml +1 -0
  98. data/config/locales/sl.yml +1 -0
  99. data/config/locales/so.yml +1 -0
  100. data/config/locales/sq.yml +1 -0
  101. data/config/locales/sr.yml +1 -0
  102. data/config/locales/sv.yml +1 -0
  103. data/config/locales/sw.yml +1 -0
  104. data/config/locales/ta.yml +1 -0
  105. data/config/locales/th.yml +1 -0
  106. data/config/locales/tk.yml +1 -0
  107. data/config/locales/tr.yml +1 -0
  108. data/config/locales/uk.yml +1 -0
  109. data/config/locales/ur.yml +1 -0
  110. data/config/locales/uz.yml +1 -0
  111. data/config/locales/vi.yml +1 -0
  112. data/config/locales/zh-hk.yml +1 -0
  113. data/config/locales/zh-tw.yml +1 -0
  114. data/config/locales/zh.yml +1 -0
  115. data/lib/govuk_publishing_components/presenters/button_helper.rb +13 -2
  116. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +0 -4
  117. data/lib/govuk_publishing_components/presenters/public_layout_helper.rb +15 -31
  118. data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +1 -0
  119. data/lib/govuk_publishing_components/presenters/shared_helper.rb +10 -0
  120. data/lib/govuk_publishing_components/version.rb +1 -1
  121. metadata +84 -2
@@ -67,6 +67,7 @@ module GovukPublishingComponents
67
67
 
68
68
  def section_css_class(css_class, section_title, link: {}, link_is_inline: false)
69
69
  css_classes = [css_class]
70
+ css_classes << "govuk-link"
70
71
  css_classes << "#{css_class}--#{@context}" unless @context.nil?
71
72
  css_classes << "#{css_class}--inline" if link_is_inline
72
73
 
@@ -31,6 +31,16 @@ module GovukPublishingComponents
31
31
  "span"
32
32
  end
33
33
 
34
+ def get_heading_size(option, fallback)
35
+ govuk_class = "govuk-heading-"
36
+
37
+ if %w[xl l m s].include? option
38
+ "#{govuk_class}#{option}"
39
+ else
40
+ "#{govuk_class}#{fallback}"
41
+ end
42
+ end
43
+
34
44
  def t_locale(content, options = {})
35
45
  # Check if the content string has a translation
36
46
  content_translation_available = translation_present?(content)
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "24.7.0".freeze
2
+ VERSION = "24.9.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.7.0
4
+ version: 24.9.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-03-19 00:00:00.000000000 Z
11
+ date: 2021-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -192,6 +192,26 @@ dependencies:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
194
  version: 3.0.0
195
+ - !ruby/object:Gem::Dependency
196
+ name: percy-capybara
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: '4.0'
202
+ - - ">="
203
+ - !ruby/object:Gem::Version
204
+ version: 4.0.2
205
+ type: :development
206
+ prerelease: false
207
+ version_requirements: !ruby/object:Gem::Requirement
208
+ requirements:
209
+ - - "~>"
210
+ - !ruby/object:Gem::Version
211
+ version: '4.0'
212
+ - - ">="
213
+ - !ruby/object:Gem::Version
214
+ version: 4.0.2
195
215
  - !ruby/object:Gem::Dependency
196
216
  name: pry-byebug
197
217
  requirement: !ruby/object:Gem::Requirement
@@ -592,6 +612,8 @@ files:
592
612
  - app/models/govuk_publishing_components/component_docs.rb
593
613
  - app/models/govuk_publishing_components/component_example.rb
594
614
  - app/models/govuk_publishing_components/shared_accessibility_criteria.rb
615
+ - app/views/govuk_publishing_components/audit/_applications.html.erb
616
+ - app/views/govuk_publishing_components/audit/_components.html.erb
595
617
  - app/views/govuk_publishing_components/audit/show.html.erb
596
618
  - app/views/govuk_publishing_components/component_guide/_application_stylesheet.html.erb
597
619
  - app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb
@@ -766,10 +788,70 @@ files:
766
788
  - app/views/govuk_publishing_components/components/related_navigation/_section.html.erb
767
789
  - app/views/layouts/govuk_publishing_components/application.html.erb
768
790
  - config/initializers/assets.rb
791
+ - config/locales/ar.yml
792
+ - config/locales/az.yml
793
+ - config/locales/be.yml
794
+ - config/locales/bg.yml
795
+ - config/locales/bn.yml
796
+ - config/locales/cs.yml
769
797
  - config/locales/cy.yml
798
+ - config/locales/da.yml
799
+ - config/locales/de.yml
800
+ - config/locales/dr.yml
801
+ - config/locales/el.yml
770
802
  - config/locales/en.yml
803
+ - config/locales/es-419.yml
804
+ - config/locales/es.yml
771
805
  - config/locales/et.yml
806
+ - config/locales/fa.yml
807
+ - config/locales/fi.yml
772
808
  - config/locales/fr.yml
809
+ - config/locales/gd.yml
810
+ - config/locales/gu.yml
811
+ - config/locales/he.yml
812
+ - config/locales/hi.yml
813
+ - config/locales/hr.yml
814
+ - config/locales/hu.yml
815
+ - config/locales/hy.yml
816
+ - config/locales/id.yml
817
+ - config/locales/is.yml
818
+ - config/locales/it.yml
819
+ - config/locales/ja.yml
820
+ - config/locales/ka.yml
821
+ - config/locales/kk.yml
822
+ - config/locales/ko.yml
823
+ - config/locales/lt.yml
824
+ - config/locales/lv.yml
825
+ - config/locales/ms.yml
826
+ - config/locales/mt.yml
827
+ - config/locales/nl.yml
828
+ - config/locales/no.yml
829
+ - config/locales/pa-pk.yml
830
+ - config/locales/pa.yml
831
+ - config/locales/pl.yml
832
+ - config/locales/ps.yml
833
+ - config/locales/pt.yml
834
+ - config/locales/ro.yml
835
+ - config/locales/ru.yml
836
+ - config/locales/si.yml
837
+ - config/locales/sk.yml
838
+ - config/locales/sl.yml
839
+ - config/locales/so.yml
840
+ - config/locales/sq.yml
841
+ - config/locales/sr.yml
842
+ - config/locales/sv.yml
843
+ - config/locales/sw.yml
844
+ - config/locales/ta.yml
845
+ - config/locales/th.yml
846
+ - config/locales/tk.yml
847
+ - config/locales/tr.yml
848
+ - config/locales/uk.yml
849
+ - config/locales/ur.yml
850
+ - config/locales/uz.yml
851
+ - config/locales/vi.yml
852
+ - config/locales/zh-hk.yml
853
+ - config/locales/zh-tw.yml
854
+ - config/locales/zh.yml
773
855
  - config/routes.rb
774
856
  - lib/generators/govuk_publishing_components/USAGE
775
857
  - lib/generators/govuk_publishing_components/component_generator.rb