govuk_publishing_components 34.6.0 → 34.7.0
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-ga4/ga4-link-tracker.js +2 -1
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/init-ga4.js +6 -4
- data/app/assets/javascripts/govuk_publishing_components/load-analytics.js +6 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +6 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +12 -0
- data/app/views/govuk_publishing_components/components/_document_list.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/docs/document_list.yml +18 -1
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +22 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba0772875b264020843365a19ead36547d07face7b083d93fee75253637ad2f4
|
4
|
+
data.tar.gz: 0c43bc5ff4999895e9f7c7f7daf0061636b06b7d29f4c089c0c2354b42ff3d04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c30252644aed7426ecf32d1af456654914bdf367217775208343a2d7e7f6477aa4d9cf7b1370608d75dc4b24e469e713a6478e71d39cb15178c0990ffcc12d5
|
7
|
+
data.tar.gz: 4c29ed5588601742877861156543a535313c7f4202c9420faa71f3bea86ec1e065dca8c93c5d4ca2a219765768da40aba51f65767c907d0b1d5b3a9bf9966888
|
@@ -72,7 +72,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
72
72
|
schema.event = 'event_data'
|
73
73
|
var text = data.text || event.target.textContent
|
74
74
|
data.text = window.GOVUK.analyticsGa4.core.trackFunctions.removeLinesAndExtraSpaces(text)
|
75
|
-
data.url
|
75
|
+
var url = data.url || this.findLink(event.target).getAttribute('href')
|
76
|
+
data.url = window.GOVUK.analyticsGa4.core.trackFunctions.removeCrossDomainParams(url)
|
76
77
|
data.link_domain = window.GOVUK.analyticsGa4.core.trackFunctions.populateLinkDomain(data.url)
|
77
78
|
data.link_path_parts = window.GOVUK.analyticsGa4.core.trackFunctions.populateLinkPathParts(data.url)
|
78
79
|
data.method = window.GOVUK.analyticsGa4.core.trackFunctions.getClickType(event)
|
@@ -2,8 +2,6 @@ window.GOVUK = window.GOVUK || {}
|
|
2
2
|
window.GOVUK.analyticsGa4 = window.GOVUK.analyticsGa4 || {}
|
3
3
|
|
4
4
|
var initFunction = function () {
|
5
|
-
// to be added: digital identity consent mechanism
|
6
|
-
|
7
5
|
var consentCookie = window.GOVUK.getConsentCookie()
|
8
6
|
|
9
7
|
if (consentCookie && consentCookie.usage) {
|
@@ -16,10 +14,14 @@ var initFunction = function () {
|
|
16
14
|
for (var property in analyticsModules) {
|
17
15
|
var module = analyticsModules[property]
|
18
16
|
if (typeof module.init === 'function') {
|
19
|
-
|
17
|
+
try {
|
18
|
+
module.init()
|
19
|
+
} catch (e) {
|
20
|
+
// if there's a problem with the module, catch the error to allow other modules to start
|
21
|
+
console.warn('Error starting analytics module ' + property + ': ' + e.message, window.location)
|
22
|
+
}
|
20
23
|
}
|
21
24
|
}
|
22
|
-
// to be added: cross domain tracking code
|
23
25
|
} else {
|
24
26
|
window.addEventListener('cookie-consent', window.GOVUK.analyticsGa4.init)
|
25
27
|
}
|
@@ -5,15 +5,18 @@
|
|
5
5
|
window.GOVUK.loadAnalytics = {
|
6
6
|
productionDomains: [
|
7
7
|
'www.gov.uk',
|
8
|
-
'www-origin.publishing.service.gov.uk'
|
8
|
+
'www-origin.publishing.service.gov.uk',
|
9
|
+
'assets.publishing.service.gov.uk'
|
9
10
|
],
|
10
11
|
stagingDomains: [
|
11
12
|
'www.staging.publishing.service.gov.uk',
|
12
|
-
'www-origin.staging.publishing.service.gov.uk'
|
13
|
+
'www-origin.staging.publishing.service.gov.uk',
|
14
|
+
'assets.staging.publishing.service.gov.uk'
|
13
15
|
],
|
14
16
|
integrationDomains: [
|
15
17
|
'www.integration.publishing.service.gov.uk',
|
16
|
-
'www-origin.integration.publishing.service.gov.uk'
|
18
|
+
'www-origin.integration.publishing.service.gov.uk',
|
19
|
+
'assets.integration.publishing.service.gov.uk'
|
17
20
|
],
|
18
21
|
developmentDomains: [
|
19
22
|
'localhost', '127.0.0.1', '0.0.0.0'
|
@@ -741,9 +741,9 @@ $after-button-padding-left: govuk-spacing(4);
|
|
741
741
|
.gem-c-layout-super-navigation-header__navigation-second-item-link {
|
742
742
|
font-size: 16px;
|
743
743
|
font-size: govuk-px-to-rem(16px);
|
744
|
+
font-weight: bold;
|
744
745
|
|
745
746
|
@include govuk-media-query($from: "desktop") {
|
746
|
-
font-weight: bold;
|
747
747
|
padding: 0;
|
748
748
|
|
749
749
|
&:after {
|
@@ -6,6 +6,7 @@
|
|
6
6
|
classes << " gem-c-document-list--bottom-margin" if local_assigns[:margin_bottom]
|
7
7
|
classes << " gem-c-document-list--no-underline" if local_assigns[:remove_underline]
|
8
8
|
classes << " gem-c-document-list--no-top-border" if local_assigns[:remove_top_border]
|
9
|
+
classes << " gem-c-document-list--no-top-border-first-child" if local_assigns[:remove_top_border_from_first_child]
|
9
10
|
|
10
11
|
within_multitype_list ||= false
|
11
12
|
within_multitype_list_class = " gem-c-document-list__multi-list" if within_multitype_list
|
@@ -195,7 +195,7 @@ examples:
|
|
195
195
|
document_type: 'Statistical data set'
|
196
196
|
subtext: 'First published during the 1996 Conservative Government'
|
197
197
|
without_top_border_on_list_element:
|
198
|
-
description: Several interfaces across GOV.UK benefit from the semantics of the document list but have their own bespoke designs, sometimes meaning that the visual border element doesn't gel with said interface. Removing it using the below attribute allows for cleaner visual fidelity in
|
198
|
+
description: Several interfaces across GOV.UK benefit from the semantics of the document list but have their own bespoke designs, sometimes meaning that the visual border element doesn't gel with said interface. Removing it using the below attribute allows for cleaner visual fidelity in these instances.
|
199
199
|
data:
|
200
200
|
remove_top_border: true
|
201
201
|
items:
|
@@ -211,6 +211,23 @@ examples:
|
|
211
211
|
metadata:
|
212
212
|
public_updated_at: 2017-07-19 15:01:48
|
213
213
|
document_type: 'Statistical data set'
|
214
|
+
without_top_border_on_first_list_element:
|
215
|
+
description: Several interfaces across GOV.UK benefit from the semantics of the document list but have their own bespoke designs, sometimes meaning that the visual border element doesn't gel with said interface. Removing it using the below attribute allows for cleaner visual fidelity in these instances.
|
216
|
+
data:
|
217
|
+
remove_top_border_from_first_child: true
|
218
|
+
items:
|
219
|
+
- link:
|
220
|
+
text: 'Department for Education – Statistics at DfE'
|
221
|
+
path: '/government/organisations/department-for-education/about/statistics'
|
222
|
+
metadata:
|
223
|
+
public_updated_at: 2017-07-19 15:01:48
|
224
|
+
document_type: 'Corporate information'
|
225
|
+
- link:
|
226
|
+
text: 'State-funded school inspections and outcomes: management information'
|
227
|
+
path: '/government/organisations/department-for-education/about/statistics'
|
228
|
+
metadata:
|
229
|
+
public_updated_at: 2017-07-19 15:01:48
|
230
|
+
document_type: 'Statistical data set'
|
214
231
|
highlighted_result:
|
215
232
|
description: Highlight one or more of the items in the list. This is used on finders to provide a 'top result' for a search. The `highlight_text` parameter is optional.
|
216
233
|
data:
|
@@ -180,11 +180,32 @@ examples:
|
|
180
180
|
</tr>
|
181
181
|
</tbody>
|
182
182
|
</table>
|
183
|
+
tables_with_alignments:
|
184
|
+
data:
|
185
|
+
block: |
|
186
|
+
<table>
|
187
|
+
<thead>
|
188
|
+
<tr>
|
189
|
+
<th scope="col">Default aligned</th>
|
190
|
+
<th class="cell-text-left" scope="col">Left aligned</th>
|
191
|
+
<th class="cell-text-center" scope="col">Center aligned</th>
|
192
|
+
<th class="cell-text-right" scope="col">Right aligned</th>
|
193
|
+
</tr>
|
194
|
+
</thead>
|
195
|
+
<tbody>
|
196
|
+
<tr>
|
197
|
+
<td>First body part</td>
|
198
|
+
<td class="cell-text-left">Second cell</td>
|
199
|
+
<td class="cell-text-center">Third cell</td>
|
200
|
+
<td class="cell-text-right">fourth cell</td>
|
201
|
+
</tr>
|
202
|
+
</tbody>
|
203
|
+
</table>
|
183
204
|
charts:
|
184
205
|
description: |
|
185
206
|
The Government Statistical Service (GSS) guidance recommends [a limit of four categories as best practice for basic data visualisations](https://gss.civilservice.gov.uk/policy-store/data-visualisation-colours-in-charts/#section-5).
|
186
207
|
|
187
|
-
Note that charts which have up to 7 categories, [chart with colours](http://govuk-publishing-components.dev.gov.uk/component-guide/govspeak/chart_with_colours/preview), for example, will display subsequent bars in `#3d3d3d`, `#a285d1` and the 7th bar in the default colour of `#0b0c0c` and will still meet the colour contrast requirements for adjacent colours.
|
208
|
+
Note that charts which have up to 7 categories, [chart with colours](http://govuk-publishing-components.dev.gov.uk/component-guide/govspeak/chart_with_colours/preview), for example, will display subsequent bars in `#3d3d3d`, `#a285d1` and the 7th bar in the default colour of `#0b0c0c` and will still meet the colour contrast requirements for adjacent colours.
|
188
209
|
Charts that have 8 or more categories will display additional bars in the default colour and will not meet colour contrast requirements for adjacent colours.
|
189
210
|
data:
|
190
211
|
block: |
|
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: 34.
|
4
|
+
version: 34.7.0
|
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: 2023-
|
11
|
+
date: 2023-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|
@@ -1374,7 +1374,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1374
1374
|
- !ruby/object:Gem::Version
|
1375
1375
|
version: '0'
|
1376
1376
|
requirements: []
|
1377
|
-
rubygems_version: 3.4.
|
1377
|
+
rubygems_version: 3.4.6
|
1378
1378
|
signing_key:
|
1379
1379
|
specification_version: 4
|
1380
1380
|
summary: A gem to document components in GOV.UK frontend applications
|