govuk_publishing_components 21.68.0 → 21.68.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c5472741da244e97899f84ef1a0e35c9aee688ae1f7f2f02f8090dc74c92b6b1
4
- data.tar.gz: 936ca8437c60e546170a29792520431d7498d05198063d06d4181885b8db001c
3
+ metadata.gz: f7bcc949d090e6749b90e1edb109c3b203c9354ce117379de1c375d13fc26d46
4
+ data.tar.gz: 4d1e83af55288054987ea823d2faf1124eab767cc76bccb1640684cf7ffe7f46
5
5
  SHA512:
6
- metadata.gz: 479712e62c490344d7c916961ca9ec6416e614aef2d8012a680f6df4da57f92aa4d3045e042e7b359d032505c365187bdd8889a67d046b2849d6af53717cc757
7
- data.tar.gz: 07fff22879ff514527f9d1da0162826060a1d671428d3bec15c75c629e99edb920c70c6986071220b41e97ca02786765bcd16894ebe67868081c132022b70e08
6
+ metadata.gz: b4cd75cb969bea6c2a3aeefa5ddb2e0f55f87a96f3286242a581efd710ffd0b9d389f0758d96b60bbb7a91c0748b0679c83779d953de66c075dba34f75b9d9de
7
+ data.tar.gz: e9a2a7b9f07c2f012444543e57434c43e9b8af46cd18bccdd5cca38739d74b7236972272330215c4de5ab200f0ab5975ff209efcbb1529355c52c3fbf0dc2be3
@@ -1,3 +1,5 @@
1
+ $gem-hover-dark-background: #dddcdb;
2
+
1
3
  .gem-c-action-link {
2
4
  display: table;
3
5
 
@@ -171,10 +173,18 @@
171
173
  color: govuk-colour("white");
172
174
  }
173
175
 
176
+ &:hover {
177
+ color: $gem-hover-dark-background;
178
+ }
179
+
174
180
  &:focus,
175
181
  &:active {
176
182
  text-decoration: none;
177
183
  color: govuk-colour("black");
184
+
185
+ &:hover {
186
+ color: govuk-colour("black");
187
+ }
178
188
  }
179
189
  }
180
190
 
@@ -1,79 +1,129 @@
1
1
  .gem-c-subscription-links {
2
2
  @include govuk-text-colour;
3
3
  @include govuk-font(19, $weight: bold);
4
+ }
4
5
 
5
- .gem-c-subscription-links__hidden-header {
6
- @include govuk-visually-hidden;
6
+ .gem-c-subscription-links__hidden-header {
7
+ @include govuk-visually-hidden;
8
+ }
9
+
10
+ .gem-c-subscription-links__list {
11
+ list-style: none;
12
+ margin: 0;
13
+ padding: 0;
14
+ }
15
+
16
+ .gem-c-subscription-links__list--small {
17
+ @include govuk-font(16);
18
+ }
19
+
20
+ .gem-c-subscription-links__list-item {
21
+ display: inline-block;
22
+ vertical-align: middle;
23
+ margin-right: govuk-spacing(4);
24
+ margin-bottom: govuk-spacing(3);
25
+
26
+ &:last-child {
27
+ margin-right: 0;
7
28
  }
29
+ }
30
+
31
+ .gem-c-subscription-links__list-item--small {
32
+ display: inline-block;
33
+ margin-left: 0;
34
+ margin-right: 0;
35
+ margin-bottom: govuk-spacing(2);
8
36
 
9
- .gem-c-subscription-links__list {
10
- list-style: none;
11
- margin: 0;
12
- padding: 0;
37
+ &:first-child {
38
+ margin-right: govuk-spacing(2);
13
39
  }
14
40
 
15
- .gem-c-subscription-links__list--small {
16
- @include govuk-font(16);
41
+ &:only-child {
42
+ margin-right: 0;
17
43
  }
44
+ }
18
45
 
19
- .gem-c-subscription-links__list-item {
20
- display: inline-block;
21
- margin-right: govuk-spacing(4);
22
- margin-bottom: govuk-spacing(3);
46
+ .gem-c-subscription-links__item {
47
+ @extend %govuk-link;
48
+ display: inline-block;
49
+ text-decoration: none;
50
+ background-repeat: no-repeat;
51
+ background-position: 0 20%;
23
52
 
24
- &:last-child {
25
- margin-right: 0;
26
- }
53
+ @include govuk-media-query($from: tablet) {
54
+ background-position: 0 35%;
27
55
  }
56
+ }
28
57
 
29
- .gem-c-subscription-links__list-item--small {
30
- display: inline-block;
31
- margin-left: 0;
32
- margin-right: 0;
33
- margin-bottom: govuk-spacing(2);
58
+ .gem-c-subscription-links__item--button {
59
+ display: none;
60
+ font-size: inherit;
61
+ font-weight: inherit;
62
+ line-height: inherit;
63
+ padding: govuk-spacing(2);
64
+ border: 1px solid $gem-quiet-button-colour;
65
+ background-color: $gem-secondary-button-background-colour;
34
66
 
35
- &:first-child {
36
- margin-right: govuk-spacing(2);
37
- }
67
+ .js-enabled & {
68
+ display: inline-block;
69
+ }
38
70
 
39
- &:only-child {
40
- margin-right: 0;
41
- }
71
+ &:not(.brand__color) {
72
+ color: $govuk-link-colour;
42
73
  }
43
74
 
44
- .gem-c-subscription-links__link {
45
- @extend %govuk-link;
75
+ &:visited,
76
+ &:active,
77
+ &:focus {
46
78
  text-decoration: none;
47
- background-repeat: no-repeat;
48
- background-position: 0 20%;
79
+ }
49
80
 
50
- @include govuk-media-query($from: tablet) {
51
- background-position: 0 35%;
52
- }
81
+ &:focus {
82
+ color: $govuk-focus-text-colour;
83
+ border: 1px solid $govuk-focus-colour;
84
+ outline: 3px solid transparent;
85
+ }
86
+
87
+ &:hover:not(:focus) {
88
+ background-color: $gem-secondary-button-hover-background-colour;
89
+ text-decoration: none;
53
90
  }
91
+ }
54
92
 
55
- .gem-c-subscription-links__feed-box {
56
- padding: govuk-spacing(3);
57
- margin-bottom: govuk-spacing(3);
58
- background: govuk-colour("light-grey", $legacy: "grey-3");
93
+ .gem-c-subscription-links__feed-box {
94
+ padding: govuk-spacing(3);
95
+ margin-bottom: govuk-spacing(3);
96
+ background: govuk-colour("light-grey", $legacy: "grey-3");
59
97
 
60
- .js-enabled &.js-hidden {
61
- display: none;
62
- }
98
+ .js-enabled &.js-hidden {
99
+ display: none;
63
100
  }
101
+ }
64
102
 
65
- .gem-c-subscription-links__feed-hidden-description {
103
+ .gem-c-subscription-links__feed-hidden-description {
104
+ .js-enabled & {
66
105
  @include govuk-visually-hidden;
67
106
  }
68
107
  }
69
108
 
70
109
  .gem-c-subscription-links__icon {
71
110
  margin-right: .1em;
111
+ color: govuk-colour("black");
72
112
  }
73
113
 
74
- .gem-c-subscription-links__list-item--small {
75
- .gem-c-subscription-links__icon {
76
- @include scale(.9);
77
- transform-origin: bottom left;
114
+ .gem-c-subscription-links__list-item--small .gem-c-subscription-links__icon {
115
+ @include scale(.9);
116
+ transform-origin: bottom left;
117
+ }
118
+
119
+ .gem-c-subscription-links--with-feed-box {
120
+ .gem-c-subscription-links__item--link {
121
+ padding: govuk-spacing(2) govuk-spacing(2) govuk-spacing(2) 0;
122
+ border: 1px solid transparent;
123
+ border-bottom: 1px solid govuk-colour("dark-grey");
124
+
125
+ &:focus {
126
+ border-bottom-color: transparent;
127
+ }
78
128
  }
79
129
  }
@@ -16,7 +16,7 @@
16
16
 
17
17
  value ||= ""
18
18
  id ||= "search-main-" + SecureRandom.hex(4)
19
- label_text ||= "Search GOV.UK"
19
+ label_text ||= "Search on GOV.UK"
20
20
  name ||= 'q'
21
21
  aria_controls ||= nil
22
22
  %>
@@ -11,6 +11,7 @@
11
11
  css_classes = %w( gem-c-subscription-links )
12
12
  css_classes << (shared_helper.get_margin_bottom) unless local_assigns[:margin_bottom] == 0
13
13
  css_classes << brand_helper.brand_class
14
+ css_classes << "gem-c-subscription-links--with-feed-box" if sl_helper.feed_link_box_value
14
15
 
15
16
  data = {"module": "gem-toggle"} if sl_helper.feed_link_box_value
16
17
 
@@ -30,9 +31,12 @@
30
31
  >
31
32
  <% if sl_helper.email_signup_link.present? %>
32
33
  <li class="gem-c-subscription-links__list-item<%= ' gem-c-subscription-links__list-item--small' if local_assigns[:small_form] == true %>" >
33
- <svg xmlns="http://www.w3.org/2000/svg" width="21" height="15.75" class="gem-c-subscription-links__icon" focusable="false" fill="currentColor" aria-hidden="true"><path d="M19.687 0H1.312C.589 0 0 .587 0 1.313v13.124c0 .726.588 1.313 1.313 1.313h18.374c.725 0 1.313-.587 1.313-1.313V1.313C21 .587 20.412 0 19.687 0zm-2.625 2.625L10.5 7.875l-6.563-5.25h13.126zm1.313 10.5H2.625V3.937L10.5 10.5l7.875-6.563v9.188z"/></svg>
34
- <%= link_to sl_helper.email_signup_link_text, sl_helper.email_signup_link, {
35
- class: "gem-c-subscription-links__link #{brand_helper.color_class}",
34
+ <% email_link_text = capture do %>
35
+ <svg xmlns="http://www.w3.org/2000/svg" width="21" height="15.75" class="gem-c-subscription-links__icon" focusable="false" fill="currentColor" aria-hidden="true"><path d="M19.687 0H1.312C.589 0 0 .587 0 1.313v13.124c0 .726.588 1.313 1.313 1.313h18.374c.725 0 1.313-.587 1.313-1.313V1.313C21 .587 20.412 0 19.687 0zm-2.625 2.625L10.5 7.875l-6.563-5.25h13.126zm1.313 10.5H2.625V3.937L10.5 10.5l7.875-6.563v9.188z"/></svg>
36
+ <%= sl_helper.email_signup_link_text %>
37
+ <% end %>
38
+ <%= link_to email_link_text, sl_helper.email_signup_link, {
39
+ class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--link",
36
40
  data: sl_helper.email_signup_link_data_attributes,
37
41
  lang: email_signup_link_text_locale
38
42
  } %>
@@ -41,21 +45,28 @@
41
45
 
42
46
  <% if sl_helper.feed_link_box_value || sl_helper.feed_link %>
43
47
  <li class="gem-c-subscription-links__list-item<%= ' gem-c-subscription-links__list-item--small' if local_assigns[:small_form] == true %>">
44
- <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" class="gem-c-subscription-links__icon" focusable="false" fill="currentColor" aria-hidden="true"><path d="M1.996 11A2 2 0 0 0 0 12.993c0 1.101.895 1.99 1.996 1.99 1.106 0 2-.889 2-1.99a2 2 0 0 0-2-1.993zM.002 5.097V7.97c1.872 0 3.632.733 4.958 2.059A6.984 6.984 0 0 1 7.015 15h2.888c0-5.461-4.443-9.903-9.9-9.903zM.006 0v2.876c6.676 0 12.11 5.44 12.11 12.124H15C15 6.731 8.273 0 .006 0z"/></svg>
45
- <%= link_to sl_helper.feed_link_text, sl_helper.feed_link,
48
+ <% feed_link_text = capture do %>
49
+ <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" class="gem-c-subscription-links__icon" focusable="false" fill="currentColor" aria-hidden="true"><path d="M1.996 11A2 2 0 0 0 0 12.993c0 1.101.895 1.99 1.996 1.99 1.106 0 2-.889 2-1.99a2 2 0 0 0-2-1.993zM.002 5.097V7.97c1.872 0 3.632.733 4.958 2.059A6.984 6.984 0 0 1 7.015 15h2.888c0-5.461-4.443-9.903-9.9-9.903zM.006 0v2.876c6.676 0 12.11 5.44 12.11 12.124H15C15 6.731 8.273 0 .006 0z"/></svg>
50
+ <%= sl_helper.feed_link_text %>
51
+ <% end %>
52
+ <%= tag.button feed_link_text, {
53
+ class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--button",
54
+ data: sl_helper.feed_link_data_attributes,
55
+ lang: feed_link_text_locale
56
+ } if sl_helper.feed_link_box_value %>
57
+ <%= link_to feed_link_text, sl_helper.feed_link,
46
58
  {
47
- class: "gem-c-subscription-links__link #{brand_helper.color_class}",
59
+ class: "gem-c-subscription-links__item #{brand_helper.color_class} gem-c-subscription-links__item--link",
48
60
  data: sl_helper.feed_link_data_attributes,
49
61
  lang: feed_link_text_locale
50
- }
51
- %>
62
+ } unless sl_helper.feed_link_box_value %>
52
63
  </li>
53
64
  <% end %>
54
65
  </ul>
55
66
 
56
67
  <% if sl_helper.feed_link_box_value %>
57
68
  <div class="gem-c-subscription-links__feed-box js-hidden" id="<%= sl_helper.feed_box_id %>">
58
- <p class="gem-c-subscription-links__feed-hidden-description visuallyhidden"><%= sl_helper.feed_link_text %></p>
69
+ <h3 class="gem-c-subscription-links__feed-hidden-description visuallyhidden govuk-!-margin-top-0"><%= sl_helper.feed_link_text %></h3>
59
70
  <div lang="en">
60
71
  <%= render "govuk_publishing_components/components/input", {
61
72
  label: {
@@ -2,7 +2,6 @@
2
2
  <form id="search" class="gem-c-layout-header__search-form govuk-clearfix" action="/search" method="get" role="search">
3
3
  <%= render "govuk_publishing_components/components/search", {
4
4
  id: "site-search-text",
5
- label_text: "Search",
6
5
  no_border: true,
7
6
  margin_bottom: 0
8
7
  } %>
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "21.68.0".freeze
2
+ VERSION = "21.68.1".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: 21.68.0
4
+ version: 21.68.1
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: 2020-10-08 00:00:00.000000000 Z
11
+ date: 2020-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config