govuk_publishing_components 28.8.1 → 28.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/govuk_publishing_components/analytics/cross-domain-tracking.js +55 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics.js +3 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components_print.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +2 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +102 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +1 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +2 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_cards.scss +4 -0
- data/app/views/govuk_publishing_components/components/_cards.html.erb +46 -0
- data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_input.html.erb +3 -0
- data/app/views/govuk_publishing_components/components/_lead_paragraph.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_summary_list.html.erb +27 -22
- data/app/views/govuk_publishing_components/components/contextual_sidebar/{_brexit_cta.html.erb → _ukraine_cta.html.erb} +6 -6
- data/app/views/govuk_publishing_components/components/docs/attachment.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/cards.yml +145 -0
- data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +12 -21
- data/app/views/govuk_publishing_components/components/docs/input.yml +16 -13
- data/app/views/govuk_publishing_components/components/docs/list.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/summary_list.yml +2 -7
- data/config/locales/ar.yml +4 -0
- data/config/locales/az.yml +4 -0
- data/config/locales/be.yml +4 -0
- data/config/locales/bg.yml +4 -0
- data/config/locales/bn.yml +4 -0
- data/config/locales/cs.yml +4 -0
- data/config/locales/cy.yml +4 -0
- data/config/locales/da.yml +4 -0
- data/config/locales/de.yml +4 -0
- data/config/locales/dr.yml +4 -0
- data/config/locales/el.yml +4 -0
- data/config/locales/en.yml +6 -2
- data/config/locales/es-419.yml +4 -0
- data/config/locales/es.yml +4 -0
- data/config/locales/et.yml +4 -0
- data/config/locales/fa.yml +4 -0
- data/config/locales/fi.yml +4 -0
- data/config/locales/fr.yml +4 -0
- data/config/locales/gd.yml +4 -0
- data/config/locales/gu.yml +4 -0
- data/config/locales/he.yml +4 -0
- data/config/locales/hi.yml +4 -0
- data/config/locales/hr.yml +4 -0
- data/config/locales/hu.yml +4 -0
- data/config/locales/hy.yml +4 -0
- data/config/locales/id.yml +4 -0
- data/config/locales/is.yml +4 -0
- data/config/locales/it.yml +4 -0
- data/config/locales/ja.yml +4 -0
- data/config/locales/ka.yml +4 -0
- data/config/locales/kk.yml +4 -0
- data/config/locales/ko.yml +4 -0
- data/config/locales/lt.yml +4 -0
- data/config/locales/lv.yml +4 -0
- data/config/locales/ms.yml +4 -0
- data/config/locales/mt.yml +4 -0
- data/config/locales/nl.yml +4 -0
- data/config/locales/no.yml +4 -0
- data/config/locales/pa-pk.yml +4 -0
- data/config/locales/pa.yml +4 -0
- data/config/locales/pl.yml +4 -0
- data/config/locales/ps.yml +4 -0
- data/config/locales/pt.yml +4 -0
- data/config/locales/ro.yml +4 -0
- data/config/locales/ru.yml +4 -0
- data/config/locales/si.yml +4 -0
- data/config/locales/sk.yml +4 -0
- data/config/locales/sl.yml +4 -0
- data/config/locales/so.yml +4 -0
- data/config/locales/sq.yml +4 -0
- data/config/locales/sr.yml +4 -0
- data/config/locales/sv.yml +4 -0
- data/config/locales/sw.yml +4 -0
- data/config/locales/ta.yml +4 -0
- data/config/locales/th.yml +4 -0
- data/config/locales/tk.yml +4 -0
- data/config/locales/tr.yml +4 -0
- data/config/locales/uk.yml +4 -0
- data/config/locales/ur.yml +4 -0
- data/config/locales/uz.yml +4 -0
- data/config/locales/vi.yml +4 -0
- data/config/locales/zh-hk.yml +4 -0
- data/config/locales/zh-tw.yml +4 -0
- data/config/locales/zh.yml +4 -0
- data/lib/govuk_publishing_components/presenters/attachment.rb +3 -7
- data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +16 -45
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +11 -6
@@ -86,29 +86,20 @@ examples:
|
|
86
86
|
- text: The Highway Code
|
87
87
|
href: "/guidance/the-highway-code"
|
88
88
|
optional: false
|
89
|
-
|
90
|
-
description: For documents tagged
|
89
|
+
with_ukraine_cta:
|
90
|
+
description: For documents tagged to the Ukraine topical event we show a custom 'Ukraine Invasion' call to action element.
|
91
91
|
data:
|
92
92
|
content_item:
|
93
|
-
title: "
|
94
|
-
content_id: "
|
93
|
+
title: "UK forces arrive to reinforce NATO’s eastern flank"
|
94
|
+
content_id: "a342fd46-d801-4c1e-9d8f-f41fba6da563"
|
95
95
|
locale: "en"
|
96
96
|
links:
|
97
97
|
ordered_related_items:
|
98
|
-
- title:
|
99
|
-
base_path: /
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
base_path: /government/collections/apprenticeship-vacancies
|
107
|
-
document_type: document_collection
|
108
|
-
- title: The future of jobs and skills
|
109
|
-
base_path: /government/collections/the-future-of-jobs-and-skills
|
110
|
-
document_type: document_collection
|
111
|
-
taxons:
|
112
|
-
- content_id: "2f8b848d-23c8-4f42-a41a-df1f81c64d0f"
|
113
|
-
title: "Exporting"
|
114
|
-
phase: "live"
|
98
|
+
- title: Protecting the UK and promoting a Global Britain
|
99
|
+
base_path: "/government/collections/protecting-the-uk-and-promoting-a-global-britain"
|
100
|
+
locale: "en"
|
101
|
+
topical_events:
|
102
|
+
- content_id: "bfa79635-ffda-4b5d-8266-a9cd3a03649c"
|
103
|
+
title: "Russian invasion of Ukraine: UK government response"
|
104
|
+
base_path: "/government/topical-events/russian-invasion-of-ukraine-uk-government-response"
|
105
|
+
locale: "en"
|
@@ -24,12 +24,19 @@ examples:
|
|
24
24
|
text: "What is your name?"
|
25
25
|
name: "name"
|
26
26
|
specific_input_type:
|
27
|
-
description: By default the input will be type="text"
|
27
|
+
description: By default the input will be `type="text"`. This parameter accepts an alternative, e.g. `search` or `email`. `spellcheck="false"` is the default this can be changed by passing a `true` value. Consider adding `autocomplete`. No validation is done on this input.
|
28
28
|
data:
|
29
29
|
label:
|
30
30
|
text: "What is your email address?"
|
31
31
|
name: "address"
|
32
32
|
type: "email"
|
33
|
+
with_autocomplete:
|
34
|
+
data:
|
35
|
+
label:
|
36
|
+
text: "Automatically complete the field with a user's email address (in supporting browsers)"
|
37
|
+
name: "name"
|
38
|
+
type: "email"
|
39
|
+
autocomplete: "email"
|
33
40
|
numeric_input:
|
34
41
|
description: If input is set to `type="number"` we set the component up as described in the [GOV.UK Design System guidance](https://design-system.service.gov.uk/components/text-input/#numbers) adding `inputmode` and `pattern`. These values can be overridden if necessary.
|
35
42
|
data:
|
@@ -46,11 +53,11 @@ examples:
|
|
46
53
|
id: "hasid"
|
47
54
|
with_aria_attributes:
|
48
55
|
description: |
|
49
|
-
The component accepts two possible aria attributes: aria-describedby and aria-controls
|
56
|
+
The component accepts two possible aria attributes: `aria-describedby` and `aria-controls`.
|
50
57
|
|
51
|
-
[aria-describedby](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute) is used to indicate the ID of the element that describes the input. This will be overridden in the event of an error, where the error will be used for the describedby attribute value. This example uses the ID of the main container for demonstration purposes as there aren't any useful elements with IDs in the component guide. In real use this would be passed the ID of an element that correctly described the input.
|
58
|
+
[`aria-describedby`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute) is used to indicate the `ID` of the element that describes the input. This will be overridden in the event of an error, where the error will be used for the `describedby` attribute value. This example uses the `ID` of the main container for demonstration purposes as there aren't any useful elements with `IDs` in the component guide. In real use this would be passed the `ID` of an element that correctly described the input.
|
52
59
|
|
53
|
-
aria-controls allows the addition of an aria-controls attribute, for use in places like the finders where the page is updated dynamically after value changes to the input.
|
60
|
+
`aria-controls` allows the addition of an `aria-controls` attribute, for use in places like the finders where the page is updated dynamically after value changes to the input.
|
54
61
|
data:
|
55
62
|
label:
|
56
63
|
text: "This is an example only and may not work with a screen reader"
|
@@ -104,13 +111,6 @@ examples:
|
|
104
111
|
name: "name"
|
105
112
|
value: "You can't type more"
|
106
113
|
maxlength: 10
|
107
|
-
with_autocomplete:
|
108
|
-
data:
|
109
|
-
label:
|
110
|
-
text: "Automatically complete the field with a user's email address (in supporting browsers)"
|
111
|
-
name: "name"
|
112
|
-
type: "email"
|
113
|
-
autocomplete: "email"
|
114
114
|
with_custom_width:
|
115
115
|
data:
|
116
116
|
label:
|
@@ -119,17 +119,20 @@ examples:
|
|
119
119
|
name: "name"
|
120
120
|
width: 10
|
121
121
|
with_search_icon:
|
122
|
+
description: |
|
123
|
+
Adds a search icon, [spellcheck](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck) can also be added to indicate that the element should be, if possible, checked for spelling errors.
|
122
124
|
data:
|
123
125
|
label:
|
124
126
|
text: "Search the internet"
|
125
127
|
name: "search-box"
|
126
128
|
type: "search"
|
127
129
|
search_icon: true
|
130
|
+
spellcheck: true
|
128
131
|
with_label_as_heading:
|
129
132
|
description: |
|
130
|
-
Wraps the label in a heading tag. Valid options are 1 to 6
|
133
|
+
Wraps the label in a heading tag. Valid options are `1` to `6`. To adjust the size of the label/heading, use the `heading_size` option. Valid options are `s`, `m`, `l` and `xl`.
|
131
134
|
|
132
|
-
Based on the [heading/label pattern](https://design-system.service.gov.uk/patterns/question-pages/) in the Design System.
|
135
|
+
Based on the [heading/label pattern](https://design-system.service.gov.uk/patterns/question-pages/) in the GOV.UK Design System.
|
133
136
|
data:
|
134
137
|
label:
|
135
138
|
text: "This is a heading 1 and a label"
|
@@ -66,7 +66,7 @@ examples:
|
|
66
66
|
description: |
|
67
67
|
Sets the margin on the bottom of the list element.
|
68
68
|
|
69
|
-
The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having a 20px margin.
|
69
|
+
The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having a `20px` margin.
|
70
70
|
data:
|
71
71
|
margin_bottom: 9
|
72
72
|
<<: *default-example-data
|
@@ -1,6 +1,6 @@
|
|
1
1
|
name: Summary list
|
2
2
|
description: Use the summary list to summarise information, for example, a user’s responses at the end of a form.
|
3
|
-
body: This component extends the [Summary list component in the Design System](https://design-system.service.gov.uk/components/summary-list/) allowing the rendering of multiple groups of lists, and actions at the group level.
|
3
|
+
body: This component extends the [Summary list component in the GOV.UK Design System](https://design-system.service.gov.uk/components/summary-list/) allowing the rendering of multiple groups of lists, and actions at the group level.
|
4
4
|
accessibility_criteria: |
|
5
5
|
Action links in the component must:
|
6
6
|
|
@@ -102,18 +102,13 @@ examples:
|
|
102
102
|
heading_level: 2
|
103
103
|
heading_size: l
|
104
104
|
|
105
|
-
|
105
|
+
with_edit_on_some_individual_items:
|
106
106
|
description: For all links shown in the component, see the <a href="/component-guide/summary_list/with_customised_links">with customised links example</a> for guidance.
|
107
107
|
data:
|
108
108
|
title: "Title, summary and body"
|
109
109
|
items:
|
110
110
|
- field: "Title"
|
111
111
|
value: "Ethical standards for public service providers"
|
112
|
-
edit:
|
113
|
-
href: "edit-title"
|
114
|
-
text: "Edit"
|
115
|
-
data_attributes:
|
116
|
-
gtm: "edit-title"
|
117
112
|
- field: "Summary"
|
118
113
|
value: "Find out more about our reviews on the subject of ethical standards for public service providers, including our 2014 report, 2015 guidance and 2018 follow-up publication."
|
119
114
|
edit:
|
data/config/locales/ar.yml
CHANGED
data/config/locales/az.yml
CHANGED
data/config/locales/be.yml
CHANGED
data/config/locales/bg.yml
CHANGED
data/config/locales/bn.yml
CHANGED
data/config/locales/cs.yml
CHANGED
data/config/locales/cy.yml
CHANGED
data/config/locales/da.yml
CHANGED
data/config/locales/de.yml
CHANGED
data/config/locales/dr.yml
CHANGED
data/config/locales/el.yml
CHANGED
data/config/locales/en.yml
CHANGED
@@ -177,10 +177,10 @@ en:
|
|
177
177
|
navigation_search_heading: Search and popular pages
|
178
178
|
navigation_search_subheading: Search
|
179
179
|
popular_links:
|
180
|
+
- label: 'Invasion of Ukraine'
|
181
|
+
href: "/government/topical-events/russian-invasion-of-ukraine-uk-government-response"
|
180
182
|
- label: 'Coronavirus (COVID-19)'
|
181
183
|
href: "/coronavirus"
|
182
|
-
- label: 'Brexit: check what you need to do'
|
183
|
-
href: "/brexit"
|
184
184
|
- label: Find a job
|
185
185
|
href: "/find-a-job"
|
186
186
|
- label: 'Personal tax account: sign in'
|
@@ -234,6 +234,10 @@ en:
|
|
234
234
|
link_path: "/brexit"
|
235
235
|
link_text: Check what you need to do
|
236
236
|
title: Brexit
|
237
|
+
ukraine:
|
238
|
+
link_path: "/government/topical-events/russian-invasion-of-ukraine-uk-government-response"
|
239
|
+
link_text: Find out about the UK’s response
|
240
|
+
title: Invasion of Ukraine
|
237
241
|
world_locations: World locations
|
238
242
|
search_box:
|
239
243
|
input_title: Search
|
data/config/locales/es-419.yml
CHANGED
data/config/locales/es.yml
CHANGED
data/config/locales/et.yml
CHANGED
data/config/locales/fa.yml
CHANGED
data/config/locales/fi.yml
CHANGED
data/config/locales/fr.yml
CHANGED
data/config/locales/gd.yml
CHANGED
data/config/locales/gu.yml
CHANGED
data/config/locales/he.yml
CHANGED
data/config/locales/hi.yml
CHANGED
data/config/locales/hr.yml
CHANGED
data/config/locales/hu.yml
CHANGED
data/config/locales/hy.yml
CHANGED
data/config/locales/id.yml
CHANGED
data/config/locales/is.yml
CHANGED
data/config/locales/it.yml
CHANGED
data/config/locales/ja.yml
CHANGED
data/config/locales/ka.yml
CHANGED
data/config/locales/kk.yml
CHANGED
data/config/locales/ko.yml
CHANGED
data/config/locales/lt.yml
CHANGED
data/config/locales/lv.yml
CHANGED
data/config/locales/ms.yml
CHANGED
data/config/locales/mt.yml
CHANGED
data/config/locales/nl.yml
CHANGED
data/config/locales/no.yml
CHANGED
data/config/locales/pa-pk.yml
CHANGED
data/config/locales/pa.yml
CHANGED