govuk_publishing_components 16.27.1 → 16.28.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/stylesheets/govuk_publishing_components/components/_button.scss +9 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +4 -1
- data/app/models/govuk_publishing_components/component_example.rb +12 -1
- data/app/views/govuk_publishing_components/components/docs/attachment.yml +7 -9
- data/app/views/govuk_publishing_components/components/docs/attachment_link.yml +2 -10
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/accessible-autocomplete/package.json +1 -1
- data/node_modules/standard/node_modules/ansi-styles/package.json +1 -0
- 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: 5019de614e7c4f66b158635d6009879da1cf018f429afea31d5381baeab26e6b
|
|
4
|
+
data.tar.gz: daeb9cb11b64ceb0a8e1c83630ff088efc4e42bec30b38cda3882fd5751dbe1a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 66c9997ed80951cb65589b5f9c6faad068b5a33eb5e539e0b57f26f5f12a4dc7c6591af146f9fb48f921b9712396734b8037560be4e66785f4ce250b57f2f409
|
|
7
|
+
data.tar.gz: 8a3c7dfd43d53913e1aa8b8c3c7557919f6026d2fc7314d28128ae54e0926110e410be1ef145a02dab90f03a8245f447de907490fd966442d6d900b4c04eaebc
|
|
@@ -23,12 +23,17 @@ $gem-quiet-button-hover-colour: darken($gem-quiet-button-colour, 5%);
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.gem-c-button--inline {
|
|
26
|
-
|
|
26
|
+
display: block;
|
|
27
27
|
margin-bottom: govuk-spacing(1);
|
|
28
|
-
margin-right: govuk-spacing(2);
|
|
29
28
|
|
|
30
|
-
@include govuk-media-query($from:
|
|
31
|
-
|
|
29
|
+
@include govuk-media-query($from: mobile) {
|
|
30
|
+
@include box-sizing(border-box);
|
|
31
|
+
display: inline-block;
|
|
32
|
+
width: 48%;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@include govuk-media-query($from: desktop) {
|
|
36
|
+
width: auto;
|
|
32
37
|
}
|
|
33
38
|
}
|
|
34
39
|
|
|
@@ -41,8 +41,11 @@ $govuk-cookie-banner-background-new: govuk-colour("white");
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.gem-c-cookie-banner__buttons {
|
|
44
|
-
display: inline-block;
|
|
45
44
|
vertical-align: middle;
|
|
45
|
+
|
|
46
|
+
@include govuk-media-query($from: desktop) {
|
|
47
|
+
display: inline-block;
|
|
48
|
+
}
|
|
46
49
|
}
|
|
47
50
|
|
|
48
51
|
.gem-c-cookie-banner__confirmation {
|
|
@@ -29,7 +29,18 @@ module GovukPublishingComponents
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def pretty_data
|
|
32
|
-
|
|
32
|
+
json_key_regex = /"(\w*)":/ # matches quoted keys ending with a colon, i.e. "key":
|
|
33
|
+
output = JSON.pretty_generate(data).gsub('\\n', "\n ").gsub(json_key_regex, '\1:')
|
|
34
|
+
|
|
35
|
+
quoted_string_regex = /"((?:[^"\\]|\\.)*)"/ # matches "some text" - ignores escaped quotes, i.e. \"
|
|
36
|
+
output.gsub(quoted_string_regex) do |group|
|
|
37
|
+
match = Regexp.last_match[1]
|
|
38
|
+
contains_html?(match) ? "sanitize(#{group})" : group
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def contains_html?(input)
|
|
43
|
+
ActionController::Base.helpers.strip_tags(input) != input
|
|
33
44
|
end
|
|
34
45
|
|
|
35
46
|
def data?
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
name: Attachment
|
|
1
|
+
name: Attachment
|
|
2
2
|
description: Displays a link to download an attachment and metadata about the file
|
|
3
3
|
body: |
|
|
4
|
-
This component
|
|
5
|
-
|
|
6
|
-
within [Govspeak][] and [Whitehall][]). The API for this
|
|
7
|
-
component may change during this process.
|
|
8
|
-
|
|
9
|
-
It shows a link to a document that is attached to GOV.UK content along with a
|
|
10
|
-
thumbnail and relevant file data.
|
|
4
|
+
This component shows a link to a document that is attached to GOV.UK content
|
|
5
|
+
along with a thumbnail and relevant file data.
|
|
11
6
|
|
|
12
7
|
It is intended to be rendered in Govspeak and as an attachment 'preview' in
|
|
13
8
|
Content Publisher.
|
|
14
9
|
|
|
15
|
-
[
|
|
10
|
+
It is not as rich in features as the [attachment rendering][Whitehall]
|
|
11
|
+
provided by Whitehall, it lacks support for multiple languages, CSV previews
|
|
12
|
+
and publication fields
|
|
13
|
+
|
|
16
14
|
[Whitehall]: https://github.com/alphagov/whitehall/blob/5c760eea912320c5a80ef59791df47161d889f2f/app/helpers/document_helper.rb
|
|
17
15
|
shared_accessibility_criteria:
|
|
18
16
|
- link
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
name: Attachment link
|
|
1
|
+
name: Attachment link
|
|
2
2
|
description: A link to a file with metadata of the file contents
|
|
3
3
|
body: |
|
|
4
|
-
This component
|
|
5
|
-
a consistent place for attachment presentation logic (currently this logic is
|
|
6
|
-
within [Govspeak][] and [Whitehall][]). The API for this
|
|
7
|
-
component may change during this process.
|
|
8
|
-
|
|
9
|
-
It provides a means to show a link to an attachment with some
|
|
4
|
+
This component provides a means to show a link to an attachment with some
|
|
10
5
|
relevant file data.
|
|
11
6
|
|
|
12
7
|
It is expected to be embedded inside an element that provides text styles
|
|
13
8
|
(such as `.govuk-body`) so does not provide its own text styling.
|
|
14
|
-
|
|
15
|
-
[Govspeak]: https://github.com/alphagov/govspeak/blob/c3a0742c87537a371108d097cea23688efa90a14/lib/govspeak/presenters/attachment_presenter.rb
|
|
16
|
-
[Whitehall]: https://github.com/alphagov/whitehall/blob/5c760eea912320c5a80ef59791df47161d889f2f/app/helpers/document_helper.rb
|
|
17
9
|
shared_accessibility_criteria:
|
|
18
10
|
- link
|
|
19
11
|
examples:
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"/"
|
|
50
50
|
],
|
|
51
51
|
"_resolved": "git://github.com/alphagov/accessible-autocomplete.git#97727b82f2283469e85523598cb62615a4de944b",
|
|
52
|
-
"_shasum": "
|
|
52
|
+
"_shasum": "86f959f5eb628dc42dbfe9e5cc0c3bea4ac3c15f",
|
|
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.28.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-
|
|
11
|
+
date: 2019-06-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gds-api-adapters
|