govuk_publishing_components 12.17.0 → 12.18.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/stylesheets/govuk_publishing_components/components/_metadata.scss +19 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_warning-text.scss +13 -0
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +10 -5
- data/app/views/govuk_publishing_components/components/_warning_text.html.erb +14 -4
- data/app/views/govuk_publishing_components/components/docs/metadata.yml +20 -0
- data/app/views/govuk_publishing_components/components/docs/warning_text.yml +12 -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: 9637ab77188a87e3315641594e6b9b8658353730fdad44ec14e8b4883cb79a0b
|
4
|
+
data.tar.gz: eb41ede84098dc57a10a1401239f1d8766f66680256f9b9e8b18dc6ff0bb82b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71b761c24f67ac9dd032dddaef4ff3bffc03423d376ed786176446fe1c44072c8aa41518a59d81301641190fc5534b2cc113f39e48e8d3ef786b0fc675a3f2e7
|
7
|
+
data.tar.gz: 1bee91ed89443c0d31e09597b5f56c8d56a329ecf763eb8ea0ac15d3442ea721087e1b0f85f29f26c6c1c60327033d4e928a5a8119666622e705810949bc9947
|
@@ -3,6 +3,11 @@
|
|
3
3
|
@include core-16;
|
4
4
|
@include responsive-bottom-margin;
|
5
5
|
@extend %contain-floats;
|
6
|
+
|
7
|
+
a {
|
8
|
+
@include govuk-link-common;
|
9
|
+
@include govuk-link-style-default;
|
10
|
+
}
|
6
11
|
}
|
7
12
|
|
8
13
|
.gem-c-metadata.direction-rtl {
|
@@ -10,6 +15,20 @@
|
|
10
15
|
text-align: start;
|
11
16
|
}
|
12
17
|
|
18
|
+
.gem-c-metadata--inverse {
|
19
|
+
color: govuk-colour('white');
|
20
|
+
|
21
|
+
a:link,
|
22
|
+
a:active,
|
23
|
+
a:visited {
|
24
|
+
color: govuk-colour('white');
|
25
|
+
}
|
26
|
+
|
27
|
+
a:focus {
|
28
|
+
color: govuk-colour('black');
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
13
32
|
.gem-c-metadata__term {
|
14
33
|
margin-top: 0.5em;
|
15
34
|
line-height: normal;
|
@@ -43,14 +62,9 @@
|
|
43
62
|
float: left;
|
44
63
|
width: 70%;
|
45
64
|
}
|
46
|
-
|
47
|
-
a {
|
48
|
-
@extend %govuk-link;
|
49
|
-
}
|
50
65
|
}
|
51
66
|
|
52
67
|
.gem-c-metadata__definition-link {
|
53
|
-
@extend %govuk-link;
|
54
68
|
text-decoration: none;
|
55
69
|
}
|
56
70
|
|
@@ -1,2 +1,15 @@
|
|
1
1
|
@import "helpers/govuk-frontend-settings";
|
2
2
|
@import "govuk-frontend/components/warning-text/warning-text";
|
3
|
+
|
4
|
+
.gem-c-warning-text__text--no-indent {
|
5
|
+
padding-left: 0;
|
6
|
+
margin-left: 0;
|
7
|
+
}
|
8
|
+
|
9
|
+
.gem-c-warning-text__text--large {
|
10
|
+
@include govuk-font($size: 24, $weight: bold);
|
11
|
+
}
|
12
|
+
|
13
|
+
.gem-c-warning-text__text--highlight {
|
14
|
+
color: $govuk-error-colour;
|
15
|
+
}
|
@@ -6,22 +6,27 @@
|
|
6
6
|
part_of = Array(part_of)
|
7
7
|
|
8
8
|
other ||= nil
|
9
|
+
inverse ||= false
|
9
10
|
|
10
11
|
direction_class = ""
|
11
12
|
direction_class = " direction-#{direction}" if local_assigns.include?(:direction)
|
13
|
+
|
14
|
+
classes = %w(gem-c-metadata)
|
15
|
+
classes << "direction-#{direction}" if local_assigns.include?(:direction)
|
16
|
+
classes << "gem-c-metadata--inverse" if inverse
|
12
17
|
%>
|
13
|
-
|
18
|
+
<%= content_tag :div, class: classes, data: { module: "gem-toggle" } do %>
|
14
19
|
<dl data-module="track-click">
|
15
20
|
<% if from.any? %>
|
16
21
|
<dt class="gem-c-metadata__term"><%= t("govuk_component.metadata.from", default: "From") %>:</dt>
|
17
22
|
<dd class="gem-c-metadata__definition">
|
18
|
-
<%= render 'govuk_publishing_components/components/metadata/sentence', items: from, toggle_id: "from" %>
|
23
|
+
<%= render 'govuk_publishing_components/components/metadata/sentence', items: from, toggle_id: "from-#{SecureRandom.hex(4)}" %>
|
19
24
|
</dd>
|
20
25
|
<% end %>
|
21
26
|
<% if part_of.any? %>
|
22
27
|
<dt class="gem-c-metadata__term"><%= t("govuk_component.metadata.part_of", default: "Part of") %>:</dt>
|
23
28
|
<dd class="gem-c-metadata__definition">
|
24
|
-
<%= render 'govuk_publishing_components/components/metadata/sentence', items: part_of, toggle_id: "part-of" %>
|
29
|
+
<%= render 'govuk_publishing_components/components/metadata/sentence', items: part_of, toggle_id: "part-of-#{SecureRandom.hex(4)}" %>
|
25
30
|
</dd>
|
26
31
|
<% end %>
|
27
32
|
<% if local_assigns.include?(:history) %>
|
@@ -54,10 +59,10 @@
|
|
54
59
|
<% if definition.any? %>
|
55
60
|
<dt class="gem-c-metadata__term"><%= title %>:</dt>
|
56
61
|
<dd class="gem-c-metadata__definition">
|
57
|
-
<%= render 'govuk_publishing_components/components/metadata/sentence', items: definition, toggle_id: index %>
|
62
|
+
<%= render 'govuk_publishing_components/components/metadata/sentence', items: definition, toggle_id: "#{index}-#{SecureRandom.hex(4)}" %>
|
58
63
|
</dd>
|
59
64
|
<% end %>
|
60
65
|
<% end %>
|
61
66
|
<% end %>
|
62
67
|
</dl>
|
63
|
-
|
68
|
+
<% end %>
|
@@ -1,15 +1,25 @@
|
|
1
1
|
<%
|
2
2
|
id ||= "warning-text-#{SecureRandom.hex(4)}"
|
3
3
|
classes ||= ''
|
4
|
-
css_classes = %w(gem-c-warning-text govuk-warning-text)
|
5
|
-
css_classes << classes if classes
|
6
4
|
text_assistive ||= 'Warning'
|
7
5
|
text_icon ||= '!'
|
6
|
+
large_font ||= false
|
7
|
+
highlight_text ||= false
|
8
|
+
|
9
|
+
css_classes = %w(gem-c-warning-text govuk-warning-text)
|
10
|
+
css_classes << classes if classes
|
11
|
+
|
12
|
+
text_classes = %w(govuk-warning-text__text)
|
13
|
+
text_classes << "gem-c-warning-text__text--no-indent" if text_icon.empty?
|
14
|
+
text_classes << "gem-c-warning-text__text--large" if large_font
|
15
|
+
text_classes << "gem-c-warning-text__text--highlight" if highlight_text
|
8
16
|
%>
|
9
17
|
|
10
18
|
<%= tag.div id: id, class: css_classes do %>
|
11
|
-
|
12
|
-
|
19
|
+
<% unless text_icon.empty? %>
|
20
|
+
<%= tag.span text_icon, class: "govuk-warning-text__icon", "aria-hidden": "true" %>
|
21
|
+
<% end %>
|
22
|
+
<%= tag.strong class: text_classes do %>
|
13
23
|
<%= tag.span text_assistive, class: "govuk-warning-text__assistive" %>
|
14
24
|
<%= text %>
|
15
25
|
<% end %>
|
@@ -335,3 +335,23 @@ examples:
|
|
335
335
|
first_published: 14 June 2014
|
336
336
|
other:
|
337
337
|
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>)
|
338
|
+
on_a_dark_background:
|
339
|
+
data:
|
340
|
+
inverse: true
|
341
|
+
from: [
|
342
|
+
"<a href='/government/organisations/ministry-of-defence'>Ministry of Defence</a>",
|
343
|
+
"<a href='/government/organisations/cabinet-office'>Cabinet Office</a>",
|
344
|
+
"<a href=\"/government/organisations/department-for-business-energy-and-industrial-strategy\">Department for Business, Energy & Industrial Strategy</a>",
|
345
|
+
"<a href=\"/government/organisations/foreign-commonwealth-office\">Foreign & Commonwealth Office</a>",
|
346
|
+
"<a href=\"/government/people/william-hague\">The Rt Hon William Hague</a>",
|
347
|
+
"<a href=\"/government/organisations/department-for-environment-food-rural-affairs\">Department for Environment, Food & Rural Affairs</a>",
|
348
|
+
"<a href=\"/government/organisations/department-for-work-pensions\">Department for work and pensions</a>",
|
349
|
+
"<a href=\"/government/organisations/foreign-commonwealth-office\">Foreign and Commonwealth Office</a>"
|
350
|
+
]
|
351
|
+
first_published: 14 June 2014
|
352
|
+
last_updated: 10 September 2015
|
353
|
+
see_updates_link: true
|
354
|
+
other:
|
355
|
+
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>)
|
356
|
+
context:
|
357
|
+
dark_background: true
|
@@ -17,3 +17,15 @@ examples:
|
|
17
17
|
data:
|
18
18
|
text_icon: "£"
|
19
19
|
text: "You can be fined up to £5,000 if you don’t register."
|
20
|
+
without_icon:
|
21
|
+
data:
|
22
|
+
text_icon: ""
|
23
|
+
text: "You can be fined up to £320 if you don't register."
|
24
|
+
with_larger_font:
|
25
|
+
data:
|
26
|
+
text: "This content was updated on the 24th of November 2018"
|
27
|
+
large_font: true
|
28
|
+
with_red_font:
|
29
|
+
data:
|
30
|
+
text: "This content has changed"
|
31
|
+
highlight_text: true
|
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: 12.
|
4
|
+
version: 12.18.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: 2018-12-
|
11
|
+
date: 2018-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govspeak
|