govuk_publishing_components 35.20.1 → 35.21.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-core.js +9 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-form-tracker.js +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +4 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +4 -1
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +8 -1
- data/app/views/govuk_publishing_components/components/docs/metadata.yml +20 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3bc95850fa0d38a7b0783eed1d3e5b1fd846c9b11c8ae5562d8fa8f7111696f4
|
|
4
|
+
data.tar.gz: edafc5b87bd54a90cce6cfe616589eddb820eb6dc3d0d4d0e8f17953ad51a74f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 576b4d036af878138116870dcf1045cf91cdb9ba31a9f68b1b8571fac840f7728d177f9d3293c83e921a3f93a5a3110b19e681568367706ca89280dc995abe8d
|
|
7
|
+
data.tar.gz: bf87713f8b29033d63800bd4851bbca0778968a4318432b828a907a60e83a85da966307394ef77c43b3bb715ee14a23ebe81b9984303bf11a1fe5e1b2f5550f1
|
|
@@ -30,7 +30,16 @@ window.GOVUK.analyticsGa4 = window.GOVUK.analyticsGa4 || {};
|
|
|
30
30
|
firstScript.parentNode.insertBefore(newScript, firstScript)
|
|
31
31
|
},
|
|
32
32
|
|
|
33
|
+
getUserAgent: function () {
|
|
34
|
+
return navigator.userAgent
|
|
35
|
+
},
|
|
36
|
+
|
|
33
37
|
sendData: function (data) {
|
|
38
|
+
// Prevent any GA4 data being sent during Smokey tests
|
|
39
|
+
if (this.getUserAgent() === 'Smokey Test / Ruby') {
|
|
40
|
+
return
|
|
41
|
+
}
|
|
42
|
+
|
|
34
43
|
data.govuk_gem_version = this.getGemVersion()
|
|
35
44
|
// set this in the console as a debugging aid
|
|
36
45
|
if (window.GOVUK.analyticsGa4.showDebug) {
|
|
@@ -46,7 +46,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
|
46
46
|
var formData = this.getInputValues(formInputs)
|
|
47
47
|
data.text = data.text || this.combineGivenAnswers(formData) || this.useFallbackValue
|
|
48
48
|
|
|
49
|
-
if (data.action === 'search') {
|
|
49
|
+
if (data.action === 'search' && data.text) {
|
|
50
50
|
data.text = data.text.toLowerCase()
|
|
51
51
|
data.text = window.GOVUK.analyticsGa4.core.trackFunctions.removeLinesAndExtraSpaces(data.text)
|
|
52
52
|
}
|
|
@@ -880,6 +880,10 @@ $after-button-padding-left: govuk-spacing(4);
|
|
|
880
880
|
width: 68px;
|
|
881
881
|
}
|
|
882
882
|
|
|
883
|
+
.gem-c-layout-super-navigation-header__navigation-second-item-description {
|
|
884
|
+
margin-top: govuk-spacing(1);
|
|
885
|
+
}
|
|
886
|
+
|
|
883
887
|
.gem-c-layout-super-navigation-header__navigation-dropdown-menu--large-navbar .gem-c-layout-super-navigation-header__navigation-second-item-description {
|
|
884
888
|
font-size: 19px;
|
|
885
889
|
font-size: govuk-px-to-rem(19px);
|
|
@@ -25,11 +25,14 @@
|
|
|
25
25
|
.gem-c-metadata--inverse {
|
|
26
26
|
background-color: govuk-colour("blue");
|
|
27
27
|
color: govuk-colour("white");
|
|
28
|
-
padding: govuk-spacing(2);
|
|
29
28
|
|
|
30
29
|
a {
|
|
31
30
|
@include govuk-link-style-inverse;
|
|
32
31
|
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.gem-c-metadata--inverse-padded {
|
|
35
|
+
padding: govuk-spacing(2);
|
|
33
36
|
|
|
34
37
|
.gem-c-metadata__list {
|
|
35
38
|
margin: govuk-spacing(2);
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
other ||= nil
|
|
11
11
|
inverse ||= false
|
|
12
|
+
inverse_compress ||= false
|
|
12
13
|
|
|
13
14
|
direction_class = ""
|
|
14
15
|
direction_class = " direction-#{direction}" if local_assigns.include?(:direction)
|
|
@@ -16,7 +17,13 @@
|
|
|
16
17
|
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
|
17
18
|
classes = %w(gem-c-metadata)
|
|
18
19
|
classes << "direction-#{direction}" if local_assigns.include?(:direction)
|
|
19
|
-
|
|
20
|
+
|
|
21
|
+
if inverse && inverse_compress
|
|
22
|
+
classes << "gem-c-metadata--inverse"
|
|
23
|
+
elsif inverse
|
|
24
|
+
classes << "gem-c-metadata--inverse gem-c-metadata--inverse-padded"
|
|
25
|
+
end
|
|
26
|
+
|
|
20
27
|
classes << shared_helper.get_margin_bottom if local_assigns[:margin_bottom]
|
|
21
28
|
|
|
22
29
|
ga4_tracking ||= false
|
|
@@ -355,6 +355,26 @@ examples:
|
|
|
355
355
|
see_updates_link: true
|
|
356
356
|
other:
|
|
357
357
|
Applies to: England, Scotland, and Wales (see detailed guidance for <a href="http://www.dardni.gov.uk/news-dard-pa022-a-13-new-procedure-for" rel="external">Northern Ireland</a>)
|
|
358
|
+
on_a_dark_background_without_padding:
|
|
359
|
+
description: By default the inverse option includes extra spacing around the component. This option removes this padding. Note that both the `inverse` and `inverse_compress` options must be supplied.
|
|
360
|
+
data:
|
|
361
|
+
inverse: true
|
|
362
|
+
inverse_compress: true
|
|
363
|
+
from: [
|
|
364
|
+
"<a href='/government/organisations/ministry-of-defence'>Ministry of Defence</a>",
|
|
365
|
+
"<a href='/government/organisations/cabinet-office'>Cabinet Office</a>",
|
|
366
|
+
"<a href=\"/government/organisations/department-for-business-energy-and-industrial-strategy\">Department for Business, Energy & Industrial Strategy</a>",
|
|
367
|
+
"<a href=\"/government/organisations/foreign-commonwealth-office\">Foreign & Commonwealth Office</a>",
|
|
368
|
+
"<a href=\"/government/people/william-hague\">The Rt Hon William Hague</a>",
|
|
369
|
+
"<a href=\"/government/organisations/department-for-environment-food-rural-affairs\">Department for Environment, Food & Rural Affairs</a>",
|
|
370
|
+
"<a href=\"/government/organisations/department-for-work-pensions\">Department for work and pensions</a>",
|
|
371
|
+
"<a href=\"/government/organisations/foreign-commonwealth-office\">Foreign and Commonwealth Office</a>"
|
|
372
|
+
]
|
|
373
|
+
first_published: 14 June 2014
|
|
374
|
+
last_updated: 10 September 2015
|
|
375
|
+
see_updates_link: true
|
|
376
|
+
other:
|
|
377
|
+
Applies to: England, Scotland, and Wales (see detailed guidance for <a href="http://www.dardni.gov.uk/news-dard-pa022-a-13-new-procedure-for" rel="external">Northern Ireland</a>)
|
|
358
378
|
with_custom_margin_bottom:
|
|
359
379
|
description: |
|
|
360
380
|
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 the `margin-bottom` values defined in the [responsive-bottom-margin mixin](https://github.com/alphagov/govuk_publishing_components/blob/main/app/assets/stylesheets/govuk_publishing_components/components/mixins/_margins.scss#L1)
|
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: 35.
|
|
4
|
+
version: 35.21.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-10-
|
|
11
|
+
date: 2023-10-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: govuk_app_config
|