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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/component_guide/application.js +3 -0
- data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +35 -4
- data/app/assets/javascripts/govuk_publishing_components/lib/cookie-functions.js +1 -0
- data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +0 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +0 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +1 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +0 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +1 -11
- data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_print-link.scss +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +0 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +1 -32
- data/app/assets/stylesheets/govuk_publishing_components/components/_title.scss +0 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_translation-nav.scss +0 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +16 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +15 -0
- data/app/controllers/govuk_publishing_components/audit_controller.rb +21 -17
- data/app/controllers/govuk_publishing_components/component_guide_controller.rb +9 -0
- data/app/helpers/govuk_publishing_components/application_helper.rb +3 -0
- data/app/models/govuk_publishing_components/audit_applications.rb +3 -3
- data/app/models/govuk_publishing_components/audit_comparer.rb +16 -8
- data/app/models/govuk_publishing_components/audit_components.rb +6 -3
- data/app/views/govuk_publishing_components/audit/_applications.html.erb +126 -0
- data/app/views/govuk_publishing_components/audit/_components.html.erb +142 -0
- data/app/views/govuk_publishing_components/audit/show.html.erb +22 -277
- data/app/views/govuk_publishing_components/component_guide/index.html.erb +18 -2
- data/app/views/govuk_publishing_components/component_guide/show.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_accordion.html.erb +25 -0
- data/app/views/govuk_publishing_components/components/_highlight_boxes.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_image_card.html.erb +14 -11
- data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +7 -2
- data/app/views/govuk_publishing_components/components/_layout_header.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_print_link.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_share_links.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +4 -4
- data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +3 -3
- data/app/views/govuk_publishing_components/components/_success_alert.html.erb +24 -8
- data/app/views/govuk_publishing_components/components/_title.html.erb +6 -2
- data/app/views/govuk_publishing_components/components/_translation_nav.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/docs/accordion.yml +73 -73
- data/app/views/govuk_publishing_components/components/docs/button.yml +7 -6
- data/app/views/govuk_publishing_components/components/docs/image_card.yml +12 -0
- data/app/views/govuk_publishing_components/components/docs/modal_dialogue.yml +3 -0
- data/app/views/govuk_publishing_components/components/docs/success_alert.yml +12 -1
- data/config/locales/ar.yml +1 -0
- data/config/locales/az.yml +1 -0
- data/config/locales/be.yml +1 -0
- data/config/locales/bg.yml +1 -0
- data/config/locales/bn.yml +1 -0
- data/config/locales/cs.yml +1 -0
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +1 -0
- data/config/locales/dr.yml +1 -0
- data/config/locales/el.yml +1 -0
- data/config/locales/en.yml +11 -0
- data/config/locales/es-419.yml +1 -0
- data/config/locales/es.yml +1 -0
- data/config/locales/fa.yml +1 -0
- data/config/locales/fi.yml +1 -0
- data/config/locales/gd.yml +1 -0
- data/config/locales/gu.yml +1 -0
- data/config/locales/he.yml +1 -0
- data/config/locales/hi.yml +1 -0
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +1 -0
- data/config/locales/hy.yml +1 -0
- data/config/locales/id.yml +1 -0
- data/config/locales/is.yml +1 -0
- data/config/locales/it.yml +1 -0
- data/config/locales/ja.yml +1 -0
- data/config/locales/ka.yml +1 -0
- data/config/locales/kk.yml +1 -0
- data/config/locales/ko.yml +1 -0
- data/config/locales/lt.yml +1 -0
- data/config/locales/lv.yml +1 -0
- data/config/locales/ms.yml +1 -0
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +1 -0
- data/config/locales/no.yml +1 -0
- data/config/locales/pa-pk.yml +1 -0
- data/config/locales/pa.yml +1 -0
- data/config/locales/pl.yml +1 -0
- data/config/locales/ps.yml +1 -0
- data/config/locales/pt.yml +1 -0
- data/config/locales/ro.yml +1 -0
- data/config/locales/ru.yml +1 -0
- data/config/locales/si.yml +1 -0
- data/config/locales/sk.yml +1 -0
- data/config/locales/sl.yml +1 -0
- data/config/locales/so.yml +1 -0
- data/config/locales/sq.yml +1 -0
- data/config/locales/sr.yml +1 -0
- data/config/locales/sv.yml +1 -0
- data/config/locales/sw.yml +1 -0
- data/config/locales/ta.yml +1 -0
- data/config/locales/th.yml +1 -0
- data/config/locales/tk.yml +1 -0
- data/config/locales/tr.yml +1 -0
- data/config/locales/uk.yml +1 -0
- data/config/locales/ur.yml +1 -0
- data/config/locales/uz.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-hk.yml +1 -0
- data/config/locales/zh-tw.yml +1 -0
- data/config/locales/zh.yml +1 -0
- data/lib/govuk_publishing_components/presenters/button_helper.rb +13 -2
- data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +0 -4
- data/lib/govuk_publishing_components/presenters/public_layout_helper.rb +15 -31
- data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +1 -0
- data/lib/govuk_publishing_components/presenters/shared_helper.rb +10 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- 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)
|
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.
|
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-
|
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
|