govuk_publishing_components 70.2.0 → 71.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +19 -2
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/pii-remover.js +3 -3
- data/app/assets/javascripts/govuk_publishing_components/components/govspeak.js +9 -0
- data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/table-scroll.js +108 -0
- data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +2 -2
- data/app/assets/stylesheets/component_guide/application.scss +7 -3
- data/app/assets/stylesheets/govuk_publishing_components/all-components.scss +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +0 -13
- data/app/assets/stylesheets/govuk_publishing_components/components/_chart.scss +31 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +0 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_service-navigation.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +67 -0
- data/app/controllers/govuk_publishing_components/component_guide_controller.rb +11 -39
- data/app/models/govuk_publishing_components/component_doc.rb +2 -6
- data/app/models/govuk_publishing_components/component_docs.rb +2 -8
- data/app/views/govuk_publishing_components/component_guide/_component_list.html.erb +1 -5
- data/app/views/govuk_publishing_components/component_guide/component_doc/_component_output.html.erb +2 -10
- data/app/views/govuk_publishing_components/component_guide/example.html.erb +1 -1
- data/app/views/govuk_publishing_components/component_guide/index.html.erb +0 -7
- data/app/views/govuk_publishing_components/component_guide/preview.html.erb +1 -9
- data/app/views/govuk_publishing_components/component_guide/show.html.erb +10 -28
- data/app/views/govuk_publishing_components/components/_chart.html.erb +5 -5
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +0 -6
- data/app/views/govuk_publishing_components/components/_radio.html.erb +1 -2
- data/app/views/govuk_publishing_components/components/docs/chart.yml +76 -2
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +28 -0
- data/app/views/govuk_publishing_components/components/docs/metadata.yml +12 -12
- data/app/views/govuk_publishing_components/components/docs/service_navigation.yml +38 -3
- data/config/locales/ar.yml +2 -10
- data/config/locales/az.yml +2 -10
- data/config/locales/be.yml +2 -10
- data/config/locales/bg.yml +2 -10
- data/config/locales/bn.yml +2 -10
- data/config/locales/cs.yml +2 -10
- data/config/locales/cy.yml +6 -14
- data/config/locales/da.yml +2 -10
- data/config/locales/de.yml +2 -10
- data/config/locales/dr.yml +2 -10
- data/config/locales/el.yml +2 -10
- data/config/locales/en.yml +14 -22
- data/config/locales/es-419.yml +2 -10
- data/config/locales/es.yml +2 -10
- data/config/locales/et.yml +2 -10
- data/config/locales/fa.yml +2 -10
- data/config/locales/fi.yml +2 -10
- data/config/locales/fr.yml +2 -10
- data/config/locales/gd.yml +2 -10
- data/config/locales/gu.yml +2 -10
- data/config/locales/he.yml +2 -10
- data/config/locales/hi.yml +2 -10
- data/config/locales/hr.yml +2 -10
- data/config/locales/hu.yml +2 -10
- data/config/locales/hy.yml +2 -10
- data/config/locales/id.yml +2 -10
- data/config/locales/is.yml +2 -10
- data/config/locales/it.yml +2 -10
- data/config/locales/ja.yml +2 -10
- data/config/locales/ka.yml +2 -10
- data/config/locales/kk.yml +2 -10
- data/config/locales/ko.yml +2 -10
- data/config/locales/ku.yml +2 -10
- data/config/locales/ky.yml +2 -10
- data/config/locales/lt.yml +2 -10
- data/config/locales/lv.yml +2 -10
- data/config/locales/ms.yml +2 -10
- data/config/locales/mt.yml +2 -10
- data/config/locales/ne.yml +2 -10
- data/config/locales/nl.yml +2 -10
- data/config/locales/no.yml +2 -10
- data/config/locales/pa-pk.yml +2 -10
- data/config/locales/pa.yml +2 -10
- data/config/locales/pl.yml +2 -10
- data/config/locales/ps.yml +2 -10
- data/config/locales/pt.yml +2 -10
- data/config/locales/ro.yml +2 -10
- data/config/locales/ru.yml +2 -10
- data/config/locales/si.yml +2 -10
- data/config/locales/sk.yml +2 -10
- data/config/locales/sl.yml +2 -10
- data/config/locales/so.yml +2 -10
- data/config/locales/sq.yml +2 -10
- data/config/locales/sr.yml +2 -10
- data/config/locales/sv.yml +2 -10
- data/config/locales/sw.yml +2 -10
- data/config/locales/ta.yml +2 -10
- data/config/locales/th.yml +2 -10
- data/config/locales/ti.yml +2 -10
- data/config/locales/tk.yml +2 -10
- data/config/locales/tr.yml +2 -10
- data/config/locales/uk.yml +2 -10
- data/config/locales/ur.yml +2 -10
- data/config/locales/uz.yml +2 -10
- data/config/locales/vi.yml +2 -10
- data/config/locales/zh-hk.yml +2 -10
- data/config/locales/zh-tw.yml +2 -10
- data/config/locales/zh.yml +2 -10
- data/config/routes.rb +0 -7
- data/lib/govuk_publishing_components/config.rb +0 -4
- data/lib/govuk_publishing_components/presenters/chart_helper.rb +33 -12
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/README.md +1 -0
- data/node_modules/axe-core/axe.js +7695 -3210
- data/node_modules/axe-core/axe.min.js +2 -2
- data/node_modules/axe-core/locales/_template.json +46 -20
- data/node_modules/axe-core/locales/az.json +1161 -0
- data/node_modules/axe-core/locales/de.json +1 -1
- data/node_modules/axe-core/package.json +7 -8
- data/node_modules/axe-core/sri-history.json +4 -0
- metadata +4 -6
- data/app/assets/javascripts/govuk_publishing_components/components/metadata.js +0 -24
- data/app/assets/stylesheets/govuk_publishing_components/components/_published-dates.scss +0 -55
- data/app/views/govuk_publishing_components/components/_published_dates.html.erb +0 -48
- data/app/views/govuk_publishing_components/components/docs/published_dates.yml +0 -37
data/config/routes.rb
CHANGED
|
@@ -2,13 +2,6 @@ GovukPublishingComponents::Engine.routes.draw do
|
|
|
2
2
|
get "/audit" => "audit#show", as: :audit
|
|
3
3
|
get "/applications" => "applications_page#show", as: :apps
|
|
4
4
|
|
|
5
|
-
scope "/flexible-sections/" do
|
|
6
|
-
get ":flexible_section" => "component_guide#show", as: :flexible_section_doc
|
|
7
|
-
get ":flexible_section/preview" => "component_guide#preview", as: :flexible_section_preview_all
|
|
8
|
-
get ":flexible_section/:example" => "component_guide#example", as: :flexible_section_example
|
|
9
|
-
get ":flexible_section/:example/preview" => "component_guide#preview", as: :flexible_section_preview
|
|
10
|
-
end
|
|
11
|
-
|
|
12
5
|
root to: "component_guide#index", as: :component_guide
|
|
13
6
|
get ":component" => "component_guide#show", as: :component_doc
|
|
14
7
|
get ":component/preview" => "component_guide#preview", as: :component_preview_all
|
|
@@ -25,10 +25,6 @@ module GovukPublishingComponents
|
|
|
25
25
|
APP_COMPONENT_DIRECTORY
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
def self.flexible_sections_directory_name
|
|
29
|
-
"flexible_page/flexible_sections"
|
|
30
|
-
end
|
|
31
|
-
|
|
32
28
|
def self.gem_directory
|
|
33
29
|
Gem::Specification.find_by_name("govuk_publishing_components").gem_dir
|
|
34
30
|
end
|
|
@@ -41,14 +41,14 @@ module GovukPublishingComponents
|
|
|
41
41
|
series: series_options,
|
|
42
42
|
hAxis: {
|
|
43
43
|
textStyle: set_font_16,
|
|
44
|
-
title: @h_axis_title,
|
|
45
|
-
titleTextStyle:
|
|
44
|
+
title: @h_axis_title&.capitalize,
|
|
45
|
+
titleTextStyle: set_font_16,
|
|
46
46
|
format: @h_axis_format,
|
|
47
47
|
},
|
|
48
48
|
vAxis: {
|
|
49
49
|
textStyle: set_font_16,
|
|
50
|
-
title: @v_axis_title,
|
|
51
|
-
titleTextStyle:
|
|
50
|
+
title: @v_axis_title&.capitalize,
|
|
51
|
+
titleTextStyle: set_font_16,
|
|
52
52
|
format: @v_axis_format,
|
|
53
53
|
viewWindow: {
|
|
54
54
|
min: @y_axis_view_window_min,
|
|
@@ -62,14 +62,21 @@ module GovukPublishingComponents
|
|
|
62
62
|
# For charts, the palette should be used instead of the GOV.UK colour palette - https://design-system.service.gov.uk/styles/colour/
|
|
63
63
|
# https://gss.civilservice.gov.uk/policy-store/data-visualisation-colours-in-charts/#section-5
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
chart_blue_shade_50 = "#0f385c"
|
|
66
|
+
chart_teal_tint_25 = "#50a1a5"
|
|
67
|
+
chart_magenta_shade_25 = "#98285d"
|
|
68
|
+
chart_primary_orange = "#f47738"
|
|
69
|
+
chart_green_shade_50 = "#083d29"
|
|
70
|
+
chart_accent_purple = "#ba4aff"
|
|
71
|
+
chart_black = "#0b0c0c"
|
|
72
|
+
colours = [chart_blue_shade_50, chart_teal_tint_25, chart_magenta_shade_25, chart_primary_orange, chart_green_shade_50, chart_accent_purple]
|
|
71
73
|
|
|
72
|
-
|
|
74
|
+
# The chart library will cycle back through all the colours once it gets to the end of the list but we don't want that, so we add 10 black colours to the end of the list.
|
|
75
|
+
10.times do
|
|
76
|
+
colours.push(chart_black)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
colours
|
|
73
80
|
end
|
|
74
81
|
|
|
75
82
|
def chart_format_data
|
|
@@ -86,7 +93,21 @@ module GovukPublishingComponents
|
|
|
86
93
|
private
|
|
87
94
|
|
|
88
95
|
def legend_options
|
|
89
|
-
|
|
96
|
+
unless @hide_legend
|
|
97
|
+
return {
|
|
98
|
+
alignment: "start",
|
|
99
|
+
position: "top",
|
|
100
|
+
textStyle: set_font_16,
|
|
101
|
+
scrollArrows: {
|
|
102
|
+
activeColor: "#000",
|
|
103
|
+
inactiveColor: "#000",
|
|
104
|
+
},
|
|
105
|
+
pagingTextStyle: {
|
|
106
|
+
color: "#000",
|
|
107
|
+
},
|
|
108
|
+
maxLines: 4,
|
|
109
|
+
}
|
|
110
|
+
end
|
|
90
111
|
|
|
91
112
|
"none"
|
|
92
113
|
end
|
|
@@ -139,6 +139,7 @@ axe.configure({
|
|
|
139
139
|
|
|
140
140
|
Axe-core supports the following locales. Do note that since locales are contributed by our community, they are not guaranteed to include all translations needed in a release.
|
|
141
141
|
|
|
142
|
+
- Azerbaijani
|
|
142
143
|
- Basque
|
|
143
144
|
- Chinese (Simplified)
|
|
144
145
|
- Chinese (Traditional)
|