govuk_publishing_components 19.0.0 → 20.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (19) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +4 -0
  3. data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +0 -19
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +1 -1
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +5 -0
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +2 -2
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +5 -2
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_textarea.scss +8 -2
  9. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss +1 -1
  10. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_clearfix.scss +0 -4
  11. data/app/views/govuk_publishing_components/components/_attachment.html.erb +1 -1
  12. data/app/views/govuk_publishing_components/components/_contents_list.html.erb +1 -5
  13. data/app/views/govuk_publishing_components/components/_inset_text.html.erb +5 -2
  14. data/app/views/govuk_publishing_components/components/docs/attachment.yml +1 -1
  15. data/app/views/govuk_publishing_components/components/docs/contents_list.yml +0 -13
  16. data/app/views/govuk_publishing_components/components/docs/image_card.yml +1 -1
  17. data/app/views/govuk_publishing_components/components/docs/inset_text.yml +10 -0
  18. data/lib/govuk_publishing_components/version.rb +1 -1
  19. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a99efb997d66a0e0b8352a2a278679c8eb2d58d3f6173aae146c232dcb4dc5e0
4
- data.tar.gz: 91ef81fded7dc833d48994f6b405dfd07a3de3901c9af119c6a2ca271961a3e0
3
+ metadata.gz: 990b02a0baa723fb517e965dac760988a241c25961e0aa967d975c706f2b84e2
4
+ data.tar.gz: d49b26ffa0222193f227a35ca102e02eebba1274627eae1af13c801ad2a9b130
5
5
  SHA512:
6
- metadata.gz: 9d6532435e8af54f7f1bd9adf37f4c28f7ff8a77b986d9e016b50e70185d3f2e46725bf89b01b7403373b1df9d7eb81c17d9371fd68619d6f19fcd5e6a45f941
7
- data.tar.gz: 6ed9732bef8db933228174bbba6ba556685ab514d759f6b78251aa2d86097516fff0a5a93bfe6449f7215e499f1f8ff6878daa13c126e7bfe74f629cfa2d6c78
6
+ metadata.gz: 7c6405ee37d9f4b6b6a1b62c48fc246c03f7ab4a6df1018b6f1d899850ded84752a1b40ff39002dbcd7509e3a867c26883dacd16d1659d319d77b105c6deff29
7
+ data.tar.gz: 1899063ce48abb43bc7c34d4d93e2af84d11c3679fb06bc8111c5afe35aef58d79df7200245d579c623b47bff73ae8be7729019ea7ba677e770b8bd3683dbaa9
@@ -48,6 +48,10 @@ $thumbnail-icon-border-colour: govuk-colour("mid-grey", $legacy: "grey-3");
48
48
  margin: 0 0 govuk-spacing(3);
49
49
  }
50
50
 
51
+ .gem-c-attachment__link {
52
+ line-height: 1.29;
53
+ }
54
+
51
55
  .gem-c-attachment__metadata {
52
56
  @include govuk-font($size: 14);
53
57
  margin: 0 0 govuk-spacing(3);
@@ -10,27 +10,12 @@
10
10
  box-shadow: 0 20px 15px -10px govuk-colour("white");
11
11
  }
12
12
 
13
- .gem-c-contents-list--inverse {
14
- background: transparent;
15
- box-shadow: none;
16
- }
17
-
18
13
  .gem-c-contents-list__title {
19
14
  @include govuk-text-colour;
20
15
  @include govuk-font($size: 16, $weight: regular, $line-height: 1.5);
21
16
  margin: 0;
22
17
  }
23
18
 
24
- .gem-c-contents-list--inverse .gem-c-contents-list__title,
25
- .gem-c-contents-list--inverse .gem-c-contents-list__link:link,
26
- .gem-c-contents-list--inverse .gem-c-contents-list__link:visited {
27
- color: govuk-colour("white");
28
- }
29
-
30
- .gem-c-contents-list--inverse .gem-c-contents-list__link:focus {
31
- color: $govuk-focus-text-colour;
32
- }
33
-
34
19
  .gem-c-contents-list__list,
35
20
  .gem-c-contents-list__nested-list {
36
21
  @include govuk-text-colour;
@@ -90,10 +75,6 @@
90
75
  }
91
76
  }
92
77
 
93
- .gem-c-contents-list--inverse &:before {
94
- color: govuk-colour("white");
95
- }
96
-
97
78
  // Focus styles on IE8 and older include the
98
79
  // left margin, creating an odd white box with
99
80
  // orange border around the em dash.
@@ -45,7 +45,7 @@
45
45
 
46
46
  .gem-c-document-list__item-description {
47
47
  @include govuk-text-colour;
48
- margin: 0 0 5px 0;
48
+ margin: govuk-spacing(1) 0;
49
49
  }
50
50
 
51
51
  .gem-c-document-list__subtext {
@@ -110,8 +110,13 @@
110
110
  margin: 0;
111
111
  list-style: none;
112
112
 
113
+ .gem-c-image-card__list-item {
114
+ margin-bottom: govuk-spacing(1);
115
+ }
116
+
113
117
  .gem-c-image-card__list-item-link {
114
118
  @extend %govuk-link;
119
+ line-height: 1.35em;
115
120
  }
116
121
 
117
122
  &.gem-c-image-card__list--indented {
@@ -31,7 +31,7 @@
31
31
 
32
32
  .gem-c-metadata__term {
33
33
  margin-top: .5em;
34
- line-height: normal;
34
+ line-height: 1.4;
35
35
 
36
36
  @include govuk-media-query($from: tablet) {
37
37
  box-sizing: border-box;
@@ -56,7 +56,7 @@
56
56
 
57
57
  .gem-c-metadata__definition {
58
58
  margin: 0;
59
- line-height: normal;
59
+ line-height: 1.4;
60
60
 
61
61
  @include govuk-media-query($from: tablet) {
62
62
  float: left;
@@ -56,10 +56,13 @@
56
56
  @include govuk-link-style-text;
57
57
  font-family: "HelveticaNeue", "Helvetica Neue", "Arial", "Helvetica", sans-serif;
58
58
 
59
- &:hover,
60
- &:focus {
59
+ &:hover {
61
60
  text-decoration: underline;
62
61
  }
62
+
63
+ &:focus {
64
+ box-shadow: 0 -2px $govuk-focus-colour, 0 4px $govuk-focus-colour, 0 8px $govuk-focus-text-colour;
65
+ }
63
66
  }
64
67
 
65
68
  // all crest images are currently in whitehall
@@ -1,5 +1,11 @@
1
1
  @import "govuk/components/textarea/textarea";
2
2
 
3
- .gem-c-textarea .govuk-textarea {
4
- margin-bottom: 0;
3
+ .gem-c-textarea {
4
+ .govuk-textarea {
5
+ margin-bottom: 0;
6
+
7
+ + .govuk-hint {
8
+ margin-top: govuk-spacing(1);
9
+ }
10
+ }
5
11
  }
@@ -15,7 +15,7 @@
15
15
 
16
16
  &:hover,
17
17
  &:focus {
18
- color: darken(govuk-organisation-colour($organisation), 10%);
18
+ color: govuk-colour("black");
19
19
  }
20
20
  }
21
21
 
@@ -5,8 +5,4 @@
5
5
  display: block;
6
6
  clear: both;
7
7
  }
8
-
9
- @include ie-lte(7) {
10
- zoom: 1;
11
- }
12
8
  }
@@ -51,7 +51,7 @@
51
51
  <%= tag.div class: "gem-c-attachment__details" do %>
52
52
  <%= tag.h2 class: "gem-c-attachment__title" do %>
53
53
  <%= link_to attachment.title, attachment.url,
54
- class: "govuk-link",
54
+ class: "govuk-link gem-c-attachment__link",
55
55
  target: target,
56
56
  data: data_attributes %>
57
57
  <% end %>
@@ -2,7 +2,6 @@
2
2
  cl_helper = GovukPublishingComponents::Presenters::ContentsListHelper.new
3
3
  format_numbers ||= false
4
4
  underline_links ||= false
5
- inverse ||= false
6
5
  contents ||= []
7
6
  aria_label ||= ''
8
7
  nested = !!contents.find { |c| c[:items] && c[:items].any? }
@@ -20,10 +19,7 @@
20
19
  <% if contents.any? %>
21
20
  <nav
22
21
  role="navigation"
23
- class="gem-c-contents-list
24
- <%= 'gem-c-contents-list--inverse' if inverse %>
25
- <%= 'gem-c-contents-list--no-underline' unless underline_links %>
26
- <%= brand_helper.brand_class %>"
22
+ class="gem-c-contents-list <%= 'gem-c-contents-list--no-underline' unless underline_links %> <%= brand_helper.brand_class %>"
27
23
  data-module="track-click"
28
24
  <% if aria_label.present? %>
29
25
  aria-label="<%= aria_label %>"
@@ -1,7 +1,10 @@
1
1
  <%
2
2
  id ||= "inset-text-#{SecureRandom.hex(4)}"
3
3
  %>
4
-
5
4
  <%= tag.div id: id, class: "gem-c-inset-text govuk-inset-text" do %>
6
- <%= text %>
5
+ <% if defined? text %>
6
+ <%= text %>
7
+ <% elsif block_given? %>
8
+ <%= yield %>
9
+ <% end %>
7
10
  <% end %>
@@ -29,7 +29,7 @@ examples:
29
29
  with_number_of_pages:
30
30
  data:
31
31
  attachment:
32
- title: "Temporary snow ploughs: guidance note"
32
+ title: "Department for Transport, temporary snow ploughs: guidance note"
33
33
  url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/259634/temporary-snow-ploughs.pdf
34
34
  filename: temporary-snow-ploughs.pdf
35
35
  content_type: application/pdf
@@ -215,16 +215,3 @@ examples:
215
215
  text: Guidance and regulation
216
216
  - href: "#third-thing"
217
217
  text: Consultations
218
- inverse:
219
- description: Displays with no background colour, no box shadow and white text, for use on (for example) the [inverse header](/component-guide/inverse_header)
220
- data:
221
- inverse: true
222
- contents:
223
- - href: "#item-1"
224
- text: "Item 1"
225
- - href: "#item-2"
226
- text: "Item 2"
227
- context:
228
- dark_background: true
229
-
230
-
@@ -57,7 +57,7 @@ examples:
57
57
  href: "/1"
58
58
  },
59
59
  {
60
- text: "Prime Minister's and Cabinet Office ministers' transparency publications",
60
+ text: "Prime Minister's and Cabinet Office ministers' transparency publications relating to freedom of information requests for general consumption and the public interest in general",
61
61
  href: "/2"
62
62
  },
63
63
  {
@@ -8,3 +8,13 @@ examples:
8
8
  default:
9
9
  data:
10
10
  text: "It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application."
11
+
12
+ with_block:
13
+ description: |
14
+ Note that the contents should be styled separately from the component, which takes no responsibility for what it is passed.
15
+ data:
16
+ block: |
17
+ <div>
18
+ <h2 id='heading'>To publish this step by step you need to</h2>
19
+ <a href='/foo'>Check for broken links</a>
20
+ </div>
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '19.0.0'.freeze
2
+ VERSION = '20.0.0'.freeze
3
3
  end
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: 19.0.0
4
+ version: 20.0.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-09-03 00:00:00.000000000 Z
11
+ date: 2019-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gds-api-adapters