govuk_publishing_components 16.11.0 → 16.12.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/components/cookie-banner.js +6 -9
- data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +5 -0
- data/app/views/govuk_publishing_components/components/_input.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/docs/input.yml +7 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/accessible-autocomplete/package.json +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: 984c4648406c82e9c1ca6f94180c0a66d84846197a4f393eb8420253075cf8ab
|
|
4
|
+
data.tar.gz: 73d85dbc099ca146d7f2b27cd6e36858411e7636de3270aa88de41112e070e24
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4ca4f24eaedc49b2f279c8009d614791ef52ceb0de236e7d2ab97abc5d16dd0a8a5c9d263742ecf171058955a2410f3ced0a2092a0e0c077ed2de6b6769c04d8
|
|
7
|
+
data.tar.gz: 3b7468cdce116387de6d60b0fd7041401e062f4364e0045d34eca87898341bfa6df0ef6634b47af6bc4a49f42febfc64e3c064e37314c545f227f8e2a9bc2e24
|
|
@@ -18,17 +18,14 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
|
18
18
|
|
|
19
19
|
CookieBanner.prototype.showCookieMessage = function () {
|
|
20
20
|
var hasCookieMessage = (this.$module && window.GOVUK.cookie('seen_cookie_message') !== 'true')
|
|
21
|
-
|
|
22
21
|
if (hasCookieMessage) {
|
|
23
22
|
this.$module.style.display = 'block'
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
})
|
|
23
|
+
} else {
|
|
24
|
+
if (window.GOVUK.analytics && typeof window.GOVUK.analytics.trackEvent === 'function') {
|
|
25
|
+
window.GOVUK.analytics.trackEvent('cookieBanner', 'Cookie banner not shown', {
|
|
26
|
+
nonInteraction: true
|
|
27
|
+
})
|
|
28
|
+
}
|
|
32
29
|
}
|
|
33
30
|
}
|
|
34
31
|
|
|
@@ -1 +1,6 @@
|
|
|
1
1
|
@import "govuk-frontend/components/input/input";
|
|
2
|
+
|
|
3
|
+
.gem-c-input--search-icon {
|
|
4
|
+
background: govuk-colour("white") url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' width='40' height='40'%3E%3Cpath d='M25.7 24.8L21.9 21c.7-1 1.1-2.2 1.1-3.5 0-3.6-2.9-6.5-6.5-6.5S10 13.9 10 17.5s2.9 6.5 6.5 6.5c1.6 0 3-.6 4.1-1.5l3.7 3.7 1.4-1.4zM12 17.5c0-2.5 2-4.5 4.5-4.5s4.5 2 4.5 4.5-2 4.5-4.5 4.5-4.5-2-4.5-4.5z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E") no-repeat -5px -3px;
|
|
5
|
+
padding-left: govuk-spacing(6);
|
|
6
|
+
}
|
|
@@ -20,10 +20,12 @@
|
|
|
20
20
|
has_error ||= error_message || error_items&.any?
|
|
21
21
|
hint_id = "hint-#{SecureRandom.hex(4)}"
|
|
22
22
|
error_id = "error-#{SecureRandom.hex(4)}"
|
|
23
|
+
search_icon ||= nil
|
|
23
24
|
|
|
24
25
|
css_classes = %w(gem-c-input govuk-input)
|
|
25
26
|
css_classes << "govuk-input--error" if has_error
|
|
26
27
|
css_classes << "govuk-input--width-#{width}" if [2, 3, 4, 5, 10, 20, 30].include?(width)
|
|
28
|
+
css_classes << "gem-c-input--search-icon" if search_icon
|
|
27
29
|
form_group_css_classes = %w(govuk-form-group)
|
|
28
30
|
form_group_css_classes << "govuk-form-group--error" if has_error && !grouped
|
|
29
31
|
|
|
@@ -117,3 +117,10 @@ examples:
|
|
|
117
117
|
hint: It’s on your National insurance card, benefit letter, payslip or P60. For example, ‘QQ 12 34 56 C’.
|
|
118
118
|
name: "name"
|
|
119
119
|
width: 10
|
|
120
|
+
with_search_icon:
|
|
121
|
+
data:
|
|
122
|
+
label:
|
|
123
|
+
text: "Search the internet"
|
|
124
|
+
name: "search-box"
|
|
125
|
+
type: "search"
|
|
126
|
+
search_icon: true
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"/"
|
|
50
50
|
],
|
|
51
51
|
"_resolved": "git://github.com/alphagov/accessible-autocomplete.git#0c518b4fa79b9a95b544410858486ed9e6403c84",
|
|
52
|
-
"_shasum": "
|
|
52
|
+
"_shasum": "6ad6c8bd233a1f1778a78567287f642f5ace054f",
|
|
53
53
|
"_shrinkwrap": null,
|
|
54
54
|
"_spec": "accessible-autocomplete@git://github.com/alphagov/accessible-autocomplete.git#add-multiselect-support",
|
|
55
55
|
"_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ",
|
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: 16.
|
|
4
|
+
version: 16.12.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: 2019-04-
|
|
11
|
+
date: 2019-04-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: govspeak
|
|
@@ -1608,7 +1608,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1608
1608
|
- !ruby/object:Gem::Version
|
|
1609
1609
|
version: '0'
|
|
1610
1610
|
requirements: []
|
|
1611
|
-
rubygems_version: 3.0.
|
|
1611
|
+
rubygems_version: 3.0.3
|
|
1612
1612
|
signing_key:
|
|
1613
1613
|
specification_version: 4
|
|
1614
1614
|
summary: A gem to document components in GOV.UK frontend applications
|