govuk_publishing_components 16.12.0 → 16.13.0

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: 984c4648406c82e9c1ca6f94180c0a66d84846197a4f393eb8420253075cf8ab
4
- data.tar.gz: 73d85dbc099ca146d7f2b27cd6e36858411e7636de3270aa88de41112e070e24
3
+ metadata.gz: f6863e9153d0b12188aed4f43fcb62456b55028092eba4fc787aa551a2593431
4
+ data.tar.gz: ea222dfcc127409a58837e10efa99b9ab00acd271bc0a61ca0aa77250a66035b
5
5
  SHA512:
6
- metadata.gz: 4ca4f24eaedc49b2f279c8009d614791ef52ceb0de236e7d2ab97abc5d16dd0a8a5c9d263742ecf171058955a2410f3ced0a2092a0e0c077ed2de6b6769c04d8
7
- data.tar.gz: 3b7468cdce116387de6d60b0fd7041401e062f4364e0045d34eca87898341bfa6df0ef6634b47af6bc4a49f42febfc64e3c064e37314c545f227f8e2a9bc2e24
6
+ metadata.gz: c7a1d41db49527835781204c6c5da6b76694c3b01217f6050f79cfa1141f8239ceef4d075ad5c4414eeace32f6439d8cd52258dd04f559424a02035b683bbb7e
7
+ data.tar.gz: 84b53ce768d43c4192f250acbe0d533009488087e75b50f60bfecad20a3dc04b1e7e913b608424c82997ab52accd61f98b567fee777e74eaac9f5de2b26f9e48
@@ -34,7 +34,7 @@
34
34
 
35
35
  <% if item[:metadata] %>
36
36
  <ul class="gem-c-document-list__item-metadata">
37
- <% item[:metadata].each do |item_metadata_key, item_metadata_value| %>
37
+ <% item[:metadata].compact.each do |item_metadata_key, item_metadata_value| %>
38
38
  <li class="gem-c-document-list__attribute">
39
39
  <% if item_metadata_key.to_s.eql?("public_updated_at") %>
40
40
  <time datetime="<%= item_metadata_value.iso8601 %>">
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '16.12.0'.freeze
2
+ VERSION = '16.13.0'.freeze
3
3
  end
@@ -49,7 +49,7 @@
49
49
  "/"
50
50
  ],
51
51
  "_resolved": "git://github.com/alphagov/accessible-autocomplete.git#0c518b4fa79b9a95b544410858486ed9e6403c84",
52
- "_shasum": "6ad6c8bd233a1f1778a78567287f642f5ace054f",
52
+ "_shasum": "1a5a047fd7e065ba5647099c5da51dc1f7f621f2",
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",
@@ -3,12 +3,24 @@
3
3
  @import "../../helpers/all";
4
4
 
5
5
  @include govuk-exports("govuk/component/button") {
6
-
7
- $govuk-button-colour: #00823b;
8
- $govuk-button-hover-colour: darken($govuk-button-colour, 5%);
9
- $govuk-button-shadow-colour: darken($govuk-button-colour, 15%);
6
+ // Primary button variables
7
+ $govuk-button-colour: #00823b; // sass-lint:disable no-color-literals
8
+ $govuk-button-hover-colour: govuk-shade($govuk-button-colour, 20%);
9
+ $govuk-button-shadow-colour: govuk-shade($govuk-button-colour, 60%);
10
10
  $govuk-button-text-colour: govuk-colour("white");
11
11
 
12
+ // Secondary button variables
13
+ $govuk-secondary-button-colour: govuk-colour("grey-3");
14
+ $govuk-secondary-button-hover-colour: govuk-shade($govuk-secondary-button-colour, 10%);
15
+ $govuk-secondary-button-shadow-colour: govuk-shade($govuk-secondary-button-colour, 40%);
16
+ $govuk-secondary-button-text-colour: govuk-colour("black");
17
+
18
+ // Warning button variables
19
+ $govuk-warning-button-colour: govuk-colour("red");
20
+ $govuk-warning-button-hover-colour: govuk-shade($govuk-warning-button-colour, 20%);
21
+ $govuk-warning-button-shadow-colour: govuk-shade($govuk-warning-button-colour, 60%);
22
+ $govuk-warning-button-text-colour: govuk-colour("white");
23
+
12
24
  // Because the shadow (s0) is visually 'part of' the button, we need to reduce
13
25
  // the height of the button to compensate by adjusting its padding (s1) and
14
26
  // increase the bottom margin to include it (s2).
@@ -141,6 +153,64 @@
141
153
  }
142
154
  }
143
155
 
156
+ .govuk-button--secondary {
157
+ background-color: $govuk-secondary-button-colour;
158
+ box-shadow: 0 $button-shadow-size 0 $govuk-secondary-button-shadow-colour;
159
+
160
+ &,
161
+ &:link,
162
+ &:visited,
163
+ &:active,
164
+ &:hover {
165
+ color: $govuk-secondary-button-text-colour;
166
+ }
167
+
168
+ // alphagov/govuk_template includes a specific a:link:focus selector
169
+ // designed to make unvisited links a slightly darker blue when focussed, so
170
+ // we need to override the text colour for that combination of selectors so
171
+ // so that unvisited links styled as buttons do not end up with dark blue
172
+ // text when focussed.
173
+ @include govuk-compatibility(govuk_template) {
174
+ &:link:focus {
175
+ color: $govuk-secondary-button-text-colour;
176
+ }
177
+ }
178
+
179
+ &:hover,
180
+ &:focus {
181
+ background-color: $govuk-secondary-button-hover-colour;
182
+ }
183
+ }
184
+
185
+ .govuk-button--warning {
186
+ background-color: $govuk-warning-button-colour;
187
+ box-shadow: 0 $button-shadow-size 0 $govuk-warning-button-shadow-colour;
188
+
189
+ &,
190
+ &:link,
191
+ &:visited,
192
+ &:active,
193
+ &:hover {
194
+ color: $govuk-warning-button-text-colour;
195
+ }
196
+
197
+ // alphagov/govuk_template includes a specific a:link:focus selector
198
+ // designed to make unvisited links a slightly darker blue when focussed, so
199
+ // we need to override the text colour for that combination of selectors so
200
+ // so that unvisited links styled as buttons do not end up with dark blue
201
+ // text when focussed.
202
+ @include govuk-compatibility(govuk_template) {
203
+ &:link:focus {
204
+ color: $govuk-warning-button-text-colour;
205
+ }
206
+ }
207
+
208
+ &:hover,
209
+ &:focus {
210
+ background-color: $govuk-warning-button-hover-colour;
211
+ }
212
+ }
213
+
144
214
  .govuk-button--start {
145
215
  @include govuk-typography-weight-bold;
146
216
  @include govuk-typography-responsive($size: 24, $override-line-height: 1);
@@ -176,5 +246,4 @@
176
246
  padding-top: (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2) + $offset); // s1
177
247
  padding-bottom: (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2) - $offset + 1); // s1
178
248
  }
179
-
180
249
  }
@@ -4,12 +4,22 @@
4
4
 
5
5
  @include govuk-exports("govuk/component/fieldset") {
6
6
  .govuk-fieldset {
7
+ min-width: 0;
7
8
  margin: 0;
8
9
  padding: 0;
9
10
  border: 0;
10
11
  @include govuk-clearfix;
11
12
  }
12
13
 
14
+ // Fix for Firefox < 53
15
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=504622
16
+ @supports not (caret-color: auto) {
17
+ .govuk-fieldset,
18
+ x:-moz-any-link {
19
+ display: table-cell;
20
+ }
21
+ }
22
+
13
23
  .govuk-fieldset__legend {
14
24
  @include govuk-font($size: 19);
15
25
  @include govuk-text-colour;
@@ -208,17 +208,20 @@
208
208
  padding: 0;
209
209
  list-style: none;
210
210
  -webkit-column-gap: $govuk-gutter;
211
+ -moz-column-gap: $govuk-gutter;
211
212
  column-gap: $govuk-gutter; // Support: Columns
212
213
  }
213
214
 
214
215
  @include mq ($from: desktop) {
215
216
  .govuk-footer__list--columns-2 {
216
217
  -webkit-column-count: 2;
218
+ -moz-column-count: 2;
217
219
  column-count: 2; // Support: Columns
218
220
  }
219
221
 
220
222
  .govuk-footer__list--columns-3 {
221
223
  -webkit-column-count: 3;
224
+ -moz-column-count: 3;
222
225
  column-count: 3; // Support: Columns
223
226
  }
224
227
  }
@@ -80,6 +80,13 @@
80
80
  }
81
81
  }
82
82
 
83
+ // Expand width when value is last column (no action)
84
+ .govuk-summary-list__value:last-child {
85
+ @include govuk-media-query($from: tablet) {
86
+ width: 70%;
87
+ }
88
+ }
89
+
83
90
  .govuk-summary-list__value > p {
84
91
  margin-bottom: govuk-spacing(2);
85
92
  }
@@ -112,12 +119,39 @@
112
119
  border: 0;
113
120
  }
114
121
 
122
+ // No border on entire summary list
115
123
  .govuk-summary-list--no-border {
116
- .govuk-summary-list__key,
117
- .govuk-summary-list__value,
118
- .govuk-summary-list__actions,
119
- .govuk-summary-list__row {
124
+ @include govuk-media-query($until: tablet) {
125
+ .govuk-summary-list__row {
126
+ border: 0;
127
+ }
128
+ }
129
+
130
+ @include govuk-media-query($from: tablet) {
131
+ .govuk-summary-list__key,
132
+ .govuk-summary-list__value,
133
+ .govuk-summary-list__actions {
134
+ // Remove 1px border, add 1px height back on
135
+ padding-bottom: govuk-spacing(2) + 1px;
136
+ border: 0;
137
+ }
138
+ }
139
+ }
140
+
141
+ // No border on specific rows
142
+ .govuk-summary-list__row--no-border {
143
+ @include govuk-media-query($until: tablet) {
120
144
  border: 0;
121
145
  }
146
+
147
+ @include govuk-media-query($from: tablet) {
148
+ .govuk-summary-list__key,
149
+ .govuk-summary-list__value,
150
+ .govuk-summary-list__actions {
151
+ // Remove 1px border, add 1px height back on
152
+ padding-bottom: govuk-spacing(2) + 1px;
153
+ border: 0;
154
+ }
155
+ }
122
156
  }
123
157
  }
@@ -6,16 +6,23 @@
6
6
  {% endif -%}
7
7
  </a>
8
8
  {% endmacro -%}
9
+
10
+ {# Determine if we need 2 or 3 columns #}
11
+ {% set anyRowHasActions = false %}
12
+ {% for row in params.rows %}
13
+ {% set anyRowHasActions = true if row.actions.items else anyRowHasActions %}
14
+ {% endfor -%}
15
+
9
16
  <dl class="govuk-summary-list {%- if params.classes %} {{ params.classes }}{% endif %}"{% for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
10
17
  {% for row in params.rows %}
11
- <div class="govuk-summary-list__row">
18
+ <div class="govuk-summary-list__row {%- if row.classes %} {{ row.classes }}{% endif %}">
12
19
  <dt class="govuk-summary-list__key {%- if row.key.classes %} {{ row.key.classes }}{% endif %}">
13
20
  {{ row.key.html | safe if row.key.html else row.key.text }}
14
21
  </dt>
15
22
  <dd class="govuk-summary-list__value {%- if row.value.classes %} {{ row.value.classes }}{% endif %}">
16
23
  {{ row.value.html | indent(8) | trim | safe if row.value.html else row.value.text }}
17
24
  </dd>
18
- {% if row.actions.items %}
25
+ {% if row.actions.items.length %}
19
26
  <dd class="govuk-summary-list__actions {%- if row.actions.classes %} {{ row.actions.classes }}{% endif %}">
20
27
  {% if row.actions.items.length == 1 %}
21
28
  {{ _actionLink(row.actions.items[0]) | indent(12) | trim }}
@@ -29,6 +36,9 @@
29
36
  </ul>
30
37
  {% endif %}
31
38
  </dd>
39
+ {% elseif anyRowHasActions %}
40
+ {# Add dummy column to extend border #}
41
+ <span class="govuk-summary-list__actions"></span>
32
42
  {% endif %}
33
43
  </div>
34
44
  {% endfor %}
@@ -49,3 +49,25 @@
49
49
  @return map-get($org-colour, colour);
50
50
  }
51
51
  }
52
+
53
+ /// Make a colour darker by mixing it with black
54
+ ///
55
+ /// @param {Colour} $colour - colour to shade
56
+ /// @param {Number} $percentage - percentage of `$colour` in returned color
57
+ /// @return {Colour}
58
+ /// @access public
59
+
60
+ @function govuk-shade($colour, $percentage) {
61
+ @return mix(#000000, $colour, $percentage);
62
+ }
63
+
64
+ /// Make a colour lighter by mixing it with white
65
+ ///
66
+ /// @param {Colour} $colour - colour to tint
67
+ /// @param {Number} $percentage - percentage of `$colour` in returned color
68
+ /// @return {Colour}
69
+ /// @access public
70
+
71
+ @function govuk-tint($colour, $percentage) {
72
+ @return mix(govuk-colour("white"), $colour, $percentage);
73
+ }
@@ -29,7 +29,6 @@
29
29
 
30
30
  @mixin govuk-device-pixel-ratio($ratio: 2) {
31
31
  @media only screen and (-webkit-min-device-pixel-ratio: $ratio),
32
- only screen and (min--moz-device-pixel-ratio: $ratio),
33
32
  only screen and ( min-device-pixel-ratio: $ratio),
34
33
  only screen and ( min-resolution: #{($ratio*96)}dpi),
35
34
  only screen and ( min-resolution: #{$ratio}dppx) {
@@ -2,26 +2,26 @@
2
2
  "_args": [
3
3
  [
4
4
  {
5
- "raw": "govuk-frontend@2.10.0",
5
+ "raw": "govuk-frontend@2.11.0",
6
6
  "scope": null,
7
7
  "escapedName": "govuk-frontend",
8
8
  "name": "govuk-frontend",
9
- "rawSpec": "2.10.0",
10
- "spec": "2.10.0",
9
+ "rawSpec": "2.11.0",
10
+ "spec": "2.11.0",
11
11
  "type": "version"
12
12
  },
13
13
  "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ"
14
14
  ]
15
15
  ],
16
- "_from": "govuk-frontend@2.10.0",
16
+ "_from": "govuk-frontend@2.11.0",
17
17
  "_hasShrinkwrap": false,
18
- "_id": "govuk-frontend@2.10.0",
18
+ "_id": "govuk-frontend@2.11.0",
19
19
  "_inCache": true,
20
20
  "_location": "/govuk-frontend",
21
21
  "_nodeVersion": "10.15.1",
22
22
  "_npmOperationalInternal": {
23
23
  "host": "s3://npm-registry-packages",
24
- "tmp": "tmp/govuk-frontend_2.10.0_1555055585302_0.0635054432296085"
24
+ "tmp": "tmp/govuk-frontend_2.11.0_1556196279503_0.18098672341387645"
25
25
  },
26
26
  "_npmUser": {
27
27
  "name": "govuk-patterns-and-tools",
@@ -30,21 +30,21 @@
30
30
  "_npmVersion": "6.4.1",
31
31
  "_phantomChildren": {},
32
32
  "_requested": {
33
- "raw": "govuk-frontend@2.10.0",
33
+ "raw": "govuk-frontend@2.11.0",
34
34
  "scope": null,
35
35
  "escapedName": "govuk-frontend",
36
36
  "name": "govuk-frontend",
37
- "rawSpec": "2.10.0",
38
- "spec": "2.10.0",
37
+ "rawSpec": "2.11.0",
38
+ "spec": "2.11.0",
39
39
  "type": "version"
40
40
  },
41
41
  "_requiredBy": [
42
42
  "/"
43
43
  ],
44
- "_resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-2.10.0.tgz",
45
- "_shasum": "c3302db7187696797ca52541d7cb16cadee7d485",
44
+ "_resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-2.11.0.tgz",
45
+ "_shasum": "f9eb4497a55d22b7eab8364323266680e17be188",
46
46
  "_shrinkwrap": null,
47
- "_spec": "govuk-frontend@2.10.0",
47
+ "_spec": "govuk-frontend@2.11.0",
48
48
  "_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ",
49
49
  "author": {
50
50
  "name": "GOV.UK Design System Team",
@@ -59,12 +59,12 @@
59
59
  "devDependencies": {},
60
60
  "directories": {},
61
61
  "dist": {
62
- "integrity": "sha512-Tfo76yz5ybFMX1heojeiWAyxUx0gABM2/hfMk1zu+9hWvApmfxeTaQOJkje4jeo1ybRo+FhgKFqqAzkBOOUnqg==",
63
- "shasum": "c3302db7187696797ca52541d7cb16cadee7d485",
64
- "tarball": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-2.10.0.tgz",
62
+ "integrity": "sha512-kZR0ZrSju+Jqh8o5niKklj8/m5XmsNNUSQLL4M4urnMcrLypwW2dU3RkR8UCnzS2DDy4BTHb7CZw0VjQPoi3jg==",
63
+ "shasum": "f9eb4497a55d22b7eab8364323266680e17be188",
64
+ "tarball": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-2.11.0.tgz",
65
65
  "fileCount": 257,
66
- "unpackedSize": 1365294,
67
- "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsEPiCRA9TVsSAnZWagAABYcQAJk38n/9YbuZlUtjPNJq\n08cGptMVEFy4DWvQed/wf0nBmlKX07sWUPwAOs0T2fB9E7jVqfATsG9fOdlT\nzfX6vmrWWMZMZ6TklvDf8qIg6mxp8PGy6yemZoP+maoZ4Ab+fHw54MxU2SIJ\nIPFQ/ky3VthzSZo2jdPiEB0UgmJJEK4wmBITVgp8f8lMukkpSpmHPqWeXEoH\nkec4D/2ga6ICbu1JhdTmwu//P+I0BW8M7Xfv4pCY3tJ56F3ZBIVReM5vfM2p\n4J3tl+2+RNXZ/tERmGUmYg/fp3YNx2hE6EWfpQDTs2bewTf1iYZBV5mExmnv\nNKY3cVC7/gYm49Sc7e3edZAwN7QAgujUrcVcE0h7yWGUcx9dcCqMaHHOcQ1i\nh7bc9V2VCyJs4uaEGc5S5YCE1Jzm0hTV5+bQ4i7oKF9WyEWaYpj+UzOb8h1d\nwzd3Jd9VxnWV4Ahzy1r4hwt0BNrZo+9dB2gcVi/Nb+H5yQdC7CpZm38YVAy1\nsY8X8dMBQPjNdzd9j/fcM3QYlWB2xWqRXAhx/YQhw91TpAsvqPQ1Xeh8NQX8\nHQHtRmXHMgItO72nueLPEyDbgjqGfLIYVSYqdSHytWe7uczcKTg4AQPMWK9K\nZ6/KwDuDCysJngFNfdR7lJPFD1hAucp8fujBuezk48HAr1jbGKrMj2+c/EDT\nRNaI\r\n=YoFh\r\n-----END PGP SIGNATURE-----\r\n"
66
+ "unpackedSize": 1369928,
67
+ "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwau4CRA9TVsSAnZWagAAeMUP/19T4yWFauZRqRw4TBJC\nOZ917VbHE6CabUXDA0G/nyFmUTby9NY+yd0aqI6JGNDBj3ITr6XP9lJEXJ7A\nt9K2WW/XCP+p1bHdZ7cQcvXEGMB0KZHBZCsAtP/3RtEvHrNJmw8E5344yGws\nzo3pML6x1TFXlaqRXEH6eyi3n9IGnt8L0zwhtXuHxYwJQBMeccge9nmyf2JC\nyEIyRQO7HRi3jn64bx0C73ERTdbPTnV5llAk0ojM2QXGICU0gnaDL0b5lFfx\nidf3uKzDWAWUN1krCj3S26srrvhG+aV4nAKsul2/ry2W1wjshaoMa/v8yXex\n8SSzWWE9Ibe8K+hZnM/O+jc6huH6IILk7306f+vQ4PpPWoJ9djbyZqEbGLIu\nlFv0V5H1dq47FefQMceYKfzUKFI0uL1lfX0lQBcjLktY5qT2xSqbsgCZ4qr4\n5DrHxKhS5ODSE3j4pvdpGpF2cnP+8OgHzafx50gBC59tx5zEI76Ubk9I51vU\n+iKG++ymRAXGPfIlms3b/YoVKQc2ImwP8pcW8wzYzBgg9PKfLb8y8W0o9zFu\nIn9pqBCp+GfXyGTXF1DsPrgrVn7Ntk56EEgogUlMqOBxqW0RasrDP/A8xt4J\nqURqAYrrBa3UkpEvuYasykHBFX+F9qNgkArlJk3wEookh2LKnUjgBVxy5gkP\nYHtb\r\n=U3Na\r\n-----END PGP SIGNATURE-----\r\n"
68
68
  },
69
69
  "engines": {
70
70
  "node": ">= 4.2.0"
@@ -92,5 +92,5 @@
92
92
  "url": "git+https://github.com/alphagov/govuk-frontend.git"
93
93
  },
94
94
  "sass": "all.scss",
95
- "version": "2.10.0"
95
+ "version": "2.11.0"
96
96
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.12.0
4
+ version: 16.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev