govuk_publishing_components 21.20.0 → 21.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +5 -3
  3. data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +7 -0
  4. data/lib/govuk_publishing_components/presenters/machine_readable/dataset_schema.rb +1 -1
  5. data/lib/govuk_publishing_components/version.rb +1 -1
  6. data/node_modules/govuk-frontend/govuk/all.js +6 -4
  7. data/node_modules/govuk-frontend/govuk/components/button/_button.scss +4 -10
  8. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +14 -0
  9. data/node_modules/govuk-frontend/govuk/components/character-count/template.njk +9 -3
  10. data/node_modules/govuk-frontend/govuk/components/checkboxes/template.njk +1 -1
  11. data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +1 -1
  12. data/node_modules/govuk-frontend/govuk/components/date-input/template.njk +3 -2
  13. data/node_modules/govuk-frontend/govuk/components/error-summary/macro-options.json +3 -3
  14. data/node_modules/govuk-frontend/govuk/components/footer/_footer.scss +16 -41
  15. data/node_modules/govuk-frontend/govuk/components/footer/template.njk +3 -3
  16. data/node_modules/govuk-frontend/govuk/components/header/_header.scss +7 -7
  17. data/node_modules/govuk-frontend/govuk/components/hint/README.md +1 -1
  18. data/node_modules/govuk-frontend/govuk/components/label/README.md +1 -1
  19. data/node_modules/govuk-frontend/govuk/components/radios/_radios.scss +1 -1
  20. data/node_modules/govuk-frontend/govuk/components/radios/template.njk +1 -1
  21. data/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss +6 -0
  22. data/node_modules/govuk-frontend/govuk/components/summary-list/template.njk +1 -1
  23. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +6 -4
  24. data/node_modules/govuk-frontend/govuk/components/tabs/template.njk +1 -1
  25. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +10 -5
  26. data/node_modules/govuk-frontend/govuk/template.njk +4 -4
  27. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +3 -2
  28. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +3 -2
  29. data/node_modules/govuk-frontend/package.json +20 -20
  30. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f0d03eff3ff50934798d21ab6e6af385c305930fbfff876e4510773ba4e0dcb
4
- data.tar.gz: '0708bf5b8626c98f767db02703a9872df4548587e6277ed681f6044981febda1'
3
+ metadata.gz: b87115234a42916a655936bbf566bce7609bd5ab49bf515299f4d67c3ca53ab4
4
+ data.tar.gz: e86af469d10bdd99f253c00a25fd319295b4ba79023f690512256bfb3723bae2
5
5
  SHA512:
6
- metadata.gz: 32d93a2eb3856b27e35b21df3815fd71928f611917d880d329a684efaf01905a4ee8935367da228b55863a4b22964b77c7794dbbcc0f823ff1c6e92ff8487148
7
- data.tar.gz: cd5d01ec8df0c2fe720bdadf66a979fb6f0681dcaf74b6c0c8dbead259bcf78073c575cfc2aac5e5a637517ce2b7b5f4e3b1bd5a97de864d15918aff42e293aa
6
+ metadata.gz: e8c4a724451f9279863cc6aeb0e18c00ff3a41199328a04e11d43416a89075bbdc6513ebca8b8e8db9367528576bfad8f22fb49d5f2cdcc00bc756aef44d8ec4
7
+ data.tar.gz: c3e4a4f817948534d05e0ed16ff2fb17c6ba40097297cf75079c3d67d5ba61a7f9fa5564dc9ec89592125babd503672849821a7e4c39df17abc1e363700df72f
@@ -40,9 +40,11 @@
40
40
  <ul class="govuk-footer__inline-list">
41
41
  <% meta[:items].each do |item| %>
42
42
  <li class="govuk-footer__inline-list-item">
43
- <a class="govuk-footer__link" href="<%= item[:href] %>">
44
- <%= item[:text] %>
45
- </a>
43
+ <%
44
+ attributes = { class: "govuk-footer__link" }.merge(item.fetch(:attributes, {}))
45
+ attributes[:rel] = "noopener" if attributes[:target] == "_blank" && !attributes[:rel]
46
+ %>
47
+ <%= link_to item[:text], item[:href], attributes %>
46
48
  </li>
47
49
  <% end %>
48
50
  </ul>
@@ -140,3 +140,10 @@ examples:
140
140
  attributes:
141
141
  data:
142
142
  tracking: GTM-123AB
143
+ meta:
144
+ items:
145
+ - href: '/cymraeg'
146
+ text: Rhestr o Wasanaethau Cymraeg
147
+ attributes:
148
+ lang: en
149
+ hreflang: en
@@ -20,7 +20,7 @@ module GovukPublishingComponents
20
20
 
21
21
  def description
22
22
  {
23
- "description" => page.description || page.body
23
+ "description" => (page.body || page.description).slice(0..4999)
24
24
  }
25
25
  end
26
26
 
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '21.20.0'.freeze
2
+ VERSION = '21.21.0'.freeze
3
3
  end
@@ -2036,12 +2036,13 @@ Radios.prototype.handleClick = function (event) {
2036
2036
 
2037
2037
  (function (global) {
2038
2038
 
2039
- // Polyfill from https://github.com/Financial-Times/polyfill-service/pull/1062/files#diff-404b69b4750d18dea4174930a49170fd
2039
+ // There is no polyfill in polyfill-library (https://github.com/Financial-Times/polyfill-library/issues/338)
2040
+ // So we source this from https://github.com/Alhadis/Snippets/blob/e09b4dfb7ffc9e250bc28319051e39ead3e5f70a/js/polyfills/IE8-child-elements.js#L28-L33
2040
2041
  Object.defineProperty(Element.prototype, "nextElementSibling", {
2041
2042
  get: function(){
2042
2043
  var el = this.nextSibling;
2043
2044
  while (el && el.nodeType !== 1) { el = el.nextSibling; }
2044
- return (el.nodeType === 1) ? el : null;
2045
+ return el;
2045
2046
  }
2046
2047
  });
2047
2048
 
@@ -2059,12 +2060,13 @@ Radios.prototype.handleClick = function (event) {
2059
2060
  if (detect) return
2060
2061
 
2061
2062
  (function (global) {
2062
- // Polyfill from https://github.com/Financial-Times/polyfill-service/pull/1062/files#diff-b45a1197b842728cb76b624b6ba7d739
2063
+ // There is no polyfill in polyfill-library (https://github.com/Financial-Times/polyfill-library/issues/338)
2064
+ // So we source this from https://github.com/Alhadis/Snippets/blob/e09b4dfb7ffc9e250bc28319051e39ead3e5f70a/js/polyfills/IE8-child-elements.js#L35-L40
2063
2065
  Object.defineProperty(Element.prototype, 'previousElementSibling', {
2064
2066
  get: function(){
2065
2067
  var el = this.previousSibling;
2066
2068
  while (el && el.nodeType !== 1) { el = el.previousSibling; }
2067
- return (el.nodeType === 1) ? el : null;
2069
+ return el;
2068
2070
  }
2069
2071
  });
2070
2072
 
@@ -243,8 +243,6 @@
243
243
 
244
244
  display: -webkit-inline-box;
245
245
 
246
- display: -webkit-inline-flex;
247
-
248
246
  display: -ms-inline-flexbox;
249
247
 
250
248
  display: inline-flex;
@@ -252,8 +250,6 @@
252
250
 
253
251
  -webkit-box-pack: center;
254
252
 
255
- -webkit-justify-content: center;
256
-
257
253
  -ms-flex-pack: center;
258
254
 
259
255
  justify-content: center;
@@ -266,12 +262,10 @@
266
262
  margin-left: govuk-spacing(2);
267
263
  }
268
264
  vertical-align: middle;
269
- -webkit-flex-shrink: 0;
270
- -ms-flex-negative: 0;
271
- flex-shrink: 0;
272
- -webkit-align-self: center;
273
- -ms-flex-item-align: center;
274
- align-self: center;
265
+ -ms-flex-negative: 0;
266
+ flex-shrink: 0;
267
+ -ms-flex-item-align: center;
268
+ align-self: center;
275
269
  }
276
270
 
277
271
  @if $govuk-use-legacy-font {
@@ -87,5 +87,19 @@
87
87
  "type": "object",
88
88
  "required": false,
89
89
  "description": "HTML attributes (for example data attributes) to add to the textarea."
90
+ },
91
+ {
92
+ "name": "countMessage",
93
+ "type": "object",
94
+ "required": false,
95
+ "description": "Options for the count message",
96
+ "params": [
97
+ {
98
+ "name": "classes",
99
+ "type": "string",
100
+ "required": false,
101
+ "description": "Classes to add to the count message"
102
+ }
103
+ ]
90
104
  }
91
105
  ]
@@ -1,4 +1,5 @@
1
1
  {% from "../textarea/macro.njk" import govukTextarea %}
2
+ {% from "../hint/macro.njk" import govukHint %}
2
3
 
3
4
  <div class="govuk-character-count" data-module="govuk-character-count"
4
5
  {%- if params.maxlength %} data-maxlength="{{ params.maxlength }}"{% endif %}
@@ -24,7 +25,12 @@
24
25
  errorMessage: params.errorMessage,
25
26
  attributes: params.attributes
26
27
  }) }}
27
- <span id="{{ params.id }}-info" class="govuk-hint govuk-character-count__message" aria-live="polite">
28
- You can enter up to {{ params.maxlength or params.maxwords }} {{'words' if params.maxwords else 'characters' }}
29
- </span>
28
+ {{ govukHint({
29
+ text: 'You can enter up to ' + (params.maxlength or params.maxwords) + (' words' if params.maxwords else ' characters'),
30
+ id: params.id + '-info',
31
+ classes: 'govuk-character-count__message' + (' ' + params.countMessage.classes if params.countMessage.classes),
32
+ attributes: {
33
+ 'aria-live': 'polite'
34
+ }
35
+ }) }}
30
36
  </div>
@@ -88,7 +88,7 @@
88
88
  {% if hasHint %}
89
89
  {{ govukHint({
90
90
  id: itemHintId,
91
- classes: 'govuk-checkboxes__hint',
91
+ classes: 'govuk-checkboxes__hint' + (' ' + item.hint.classes if item.hint.classes),
92
92
  attributes: item.hint.attributes,
93
93
  html: item.hint.html,
94
94
  text: item.hint.text
@@ -2,7 +2,7 @@
2
2
  {
3
3
  "name": "id",
4
4
  "type": "string",
5
- "required": false,
5
+ "required": true,
6
6
  "description": "This is used for the main component and to compose id attribute for each item."
7
7
  },
8
8
  {
@@ -7,7 +7,7 @@
7
7
  aria-describedby – for example hints or error messages -#}
8
8
  {% set describedBy = params.fieldset.describedBy if params.fieldset.describedBy else "" %}
9
9
 
10
- {% if params.items %}
10
+ {% if params.items | length %}
11
11
  {% set dateInputItems = params.items %}
12
12
  {% else %}
13
13
  {% set dateInputItems = [
@@ -65,7 +65,8 @@
65
65
  classes: "govuk-date-input__input " + (item.classes if item.classes),
66
66
  name: (params.namePrefix + "-" + item.name) if params.namePrefix else item.name,
67
67
  value: item.value,
68
- type: "number",
68
+ type: "text",
69
+ inputmode: "numeric",
69
70
  autocomplete: item.autocomplete,
70
71
  pattern: item.pattern if item.pattern else "[0-9]*",
71
72
  attributes: item.attributes
@@ -15,13 +15,13 @@
15
15
  "name": "descriptionText",
16
16
  "type": "string",
17
17
  "required": false,
18
- "description": "If `descriptionHtml` is set, this is not required. Text to use for the description of the errors. If `descriptionHtml` is provided, `descriptionText` will be ignored."
18
+ "description": "Text to use for the description of the errors. If you set `descriptionHtml`, the component will ignore `descriptionText`."
19
19
  },
20
20
  {
21
21
  "name": "descriptionHtml",
22
22
  "type": "string",
23
- "required": true,
24
- "description": "If `descriptionText` is set, this is not required. HTML to use for the description of the errors. If `descriptionHtml` is provided, `descriptionText` will be ignored."
23
+ "required": false,
24
+ "description": "HTML to use for the description of the errors. If you set this option, the component will ignore `descriptionText`."
25
25
  },
26
26
  {
27
27
  "name": "errorList",
@@ -77,19 +77,6 @@
77
77
  }
78
78
  }
79
79
 
80
- // Internet Explorer 8 does not support `:not()` selectors, so don't conditionally show underlines.
81
- @include govuk-not-ie8 {
82
- .govuk-footer__inline-list .govuk-footer__link,
83
- .govuk-footer__list .govuk-footer__link {
84
- text-decoration: none;
85
-
86
- &:hover:not(:focus),
87
- &:active:not(:focus) {
88
- text-decoration: underline;
89
- }
90
- }
91
- }
92
-
93
80
  .govuk-footer__section-break {
94
81
  margin: 0; // Reset `<hr>` default margins
95
82
  @include govuk-responsive-margin(8, "bottom");
@@ -99,20 +86,16 @@
99
86
 
100
87
  .govuk-footer__meta {
101
88
  display: -webkit-box;
102
- display: -webkit-flex;
103
89
  display: -ms-flexbox;
104
90
  display: flex; // Support: Flexbox
105
91
  margin-right: -$govuk-gutter-half;
106
92
  margin-left: -$govuk-gutter-half;
107
- -webkit-flex-wrap: wrap;
108
- -ms-flex-wrap: wrap;
109
- flex-wrap: wrap; // Support: Flexbox
93
+ -ms-flex-wrap: wrap;
94
+ flex-wrap: wrap; // Support: Flexbox
110
95
  -webkit-box-align: end;
111
- -webkit-align-items: flex-end;
112
96
  -ms-flex-align: end;
113
97
  align-items: flex-end; // Support: Flexbox
114
98
  -webkit-box-pack: center;
115
- -webkit-justify-content: center;
116
99
  -ms-flex-pack: center;
117
100
  justify-content: center; // Support: Flexbox
118
101
  }
@@ -125,20 +108,18 @@
125
108
 
126
109
  .govuk-footer__meta-item--grow {
127
110
  -webkit-box-flex: 1;
128
- -webkit-flex: 1;
129
111
  -ms-flex: 1;
130
112
  flex: 1; // Support: Flexbox
131
- @include mq ($until: tablet) {
132
- -webkit-flex-basis: 320px;
133
- -ms-flex-preferred-size: 320px;
134
- flex-basis: 320px; // Support: Flexbox
113
+ @include govuk-media-query ($until: tablet) {
114
+ -ms-flex-preferred-size: 320px;
115
+ flex-basis: 320px; // Support: Flexbox
135
116
  }
136
117
  }
137
118
 
138
119
  .govuk-footer__licence-logo {
139
120
  display: inline-block;
140
121
  margin-right: govuk-spacing(2);
141
- @include mq ($until: desktop) {
122
+ @include govuk-media-query ($until: desktop) {
142
123
  margin-bottom: govuk-spacing(3);
143
124
  }
144
125
  vertical-align: top;
@@ -183,7 +164,7 @@
183
164
  .govuk-footer__heading {
184
165
  @include govuk-responsive-margin(7, "bottom");
185
166
  padding-bottom: govuk-spacing(4);
186
- @include mq ($until: tablet) {
167
+ @include govuk-media-query ($until: tablet) {
187
168
  padding-bottom: govuk-spacing(2);
188
169
  }
189
170
  border-bottom: 1px solid $govuk-footer-border;
@@ -191,14 +172,12 @@
191
172
 
192
173
  .govuk-footer__navigation {
193
174
  display: -webkit-box;
194
- display: -webkit-flex;
195
175
  display: -ms-flexbox;
196
176
  display: flex; // Support: Flexbox
197
177
  margin-right: -$govuk-gutter-half;
198
178
  margin-left: -$govuk-gutter-half;
199
- -webkit-flex-wrap: wrap;
200
- -ms-flex-wrap: wrap;
201
- flex-wrap: wrap; // Support: Flexbox
179
+ -ms-flex-wrap: wrap;
180
+ flex-wrap: wrap; // Support: Flexbox
202
181
  }
203
182
 
204
183
  .govuk-footer__section {
@@ -209,28 +188,24 @@
209
188
  vertical-align: top;
210
189
  // Ensure columns take up equal width (typically one-half:one-half)
211
190
  -webkit-box-flex: 1;
212
- -webkit-flex-grow: 1;
213
191
  -ms-flex-positive: 1;
214
192
  flex-grow: 1; // Support: Flexbox
215
- -webkit-flex-shrink: 1;
216
- -ms-flex-negative: 1;
217
- flex-shrink: 1; // Support: Flexbox
218
- @include mq ($until: desktop) {
193
+ -ms-flex-negative: 1;
194
+ flex-shrink: 1; // Support: Flexbox
195
+ @include govuk-media-query ($until: desktop) {
219
196
  // Make sure columns do not drop below 200px in width
220
197
  // Will typically result in wrapping, and end up in a single column on smaller screens.
221
- -webkit-flex-basis: 200px;
222
- -ms-flex-preferred-size: 200px;
223
- flex-basis: 200px; // Support: Flexbox
198
+ -ms-flex-preferred-size: 200px;
199
+ flex-basis: 200px; // Support: Flexbox
224
200
  }
225
201
  }
226
202
 
227
203
  // If there are only two sections, set the layout to be two-third:one-third on desktop
228
- @include mq ($from: desktop) {
204
+ @include govuk-media-query ($from: desktop) {
229
205
  // We match the first section with `:first-child`.
230
206
  // To ensure the section is one of two, we can count backwards using `:nth-last-child(2)`.
231
207
  .govuk-footer__section:first-child:nth-last-child(2) {
232
208
  -webkit-box-flex: 2;
233
- -webkit-flex-grow: 2;
234
209
  -ms-flex-positive: 2;
235
210
  flex-grow: 2; // Support: Flexbox
236
211
  }
@@ -245,7 +220,7 @@
245
220
  column-gap: $govuk-gutter; // Support: Columns
246
221
  }
247
222
 
248
- @include mq ($from: desktop) {
223
+ @include govuk-media-query ($from: desktop) {
249
224
  .govuk-footer__list--columns-2 {
250
225
  -webkit-column-count: 2;
251
226
  -moz-column-count: 2;
@@ -1,12 +1,12 @@
1
1
  <footer class="govuk-footer {{ params.classes if params.classes }}" role="contentinfo"
2
2
  {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
3
3
  <div class="govuk-width-container {{ params.containerClasses if params.containerClasses }}">
4
- {% if params.navigation %}
4
+ {% if params.navigation | length %}
5
5
  <div class="govuk-footer__navigation">
6
6
  {% for nav in params.navigation %}
7
7
  <div class="govuk-footer__section">
8
8
  <h2 class="govuk-footer__heading govuk-heading-m">{{ nav.title }}</h2>
9
- {% if nav.items %}
9
+ {% if nav.items | length %}
10
10
  {% set listClasses %}
11
11
  {% if nav.columns %}
12
12
  govuk-footer__list--columns-{{ nav.columns }}
@@ -33,7 +33,7 @@
33
33
  <div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
34
34
  {% if params.meta %}
35
35
  <h2 class="govuk-visually-hidden">{{ params.meta.visuallyHiddenTitle | default("Support links") }}</h2>
36
- {% if params.meta.items %}
36
+ {% if params.meta.items | length %}
37
37
  <ul class="govuk-footer__inline-list">
38
38
  {% for item in params.meta.items %}
39
39
  <li class="govuk-footer__inline-list-item">
@@ -138,7 +138,7 @@
138
138
  @include govuk-responsive-margin(2, "bottom");
139
139
  padding-right: govuk-spacing(8);
140
140
 
141
- @include mq ($from: desktop) {
141
+ @include govuk-media-query ($from: desktop) {
142
142
  width: 33.33%;
143
143
  padding-right: $govuk-gutter-half;
144
144
  float: left;
@@ -147,7 +147,7 @@
147
147
  }
148
148
 
149
149
  .govuk-header__content {
150
- @include mq ($from: desktop) {
150
+ @include govuk-media-query ($from: desktop) {
151
151
  width: 66.66%;
152
152
  padding-left: $govuk-gutter-half;
153
153
  float: left;
@@ -180,7 +180,7 @@
180
180
  margin-left: govuk-spacing(1);
181
181
  }
182
182
 
183
- @include mq ($from: tablet) {
183
+ @include govuk-media-query ($from: tablet) {
184
184
  top: govuk-spacing(3);
185
185
  }
186
186
  }
@@ -202,14 +202,14 @@
202
202
  .js-enabled {
203
203
  .govuk-header__menu-button {
204
204
  display: block;
205
- @include mq ($from: desktop) {
205
+ @include govuk-media-query ($from: desktop) {
206
206
  display: none;
207
207
  }
208
208
  }
209
209
 
210
210
  .govuk-header__navigation {
211
211
  display: none;
212
- @include mq ($from: desktop) {
212
+ @include govuk-media-query ($from: desktop) {
213
213
  display: block;
214
214
  }
215
215
  }
@@ -221,7 +221,7 @@
221
221
 
222
222
 
223
223
  .govuk-header__navigation--end {
224
- @include mq ($from: desktop) {
224
+ @include govuk-media-query ($from: desktop) {
225
225
  margin: 0;
226
226
  padding: govuk-spacing(1) 0;
227
227
  text-align: right;
@@ -236,7 +236,7 @@
236
236
  padding: govuk-spacing(2) 0;
237
237
  border-bottom: 1px solid $govuk-header-nav-item-border-color;
238
238
 
239
- @include mq ($from: desktop) {
239
+ @include govuk-media-query ($from: desktop) {
240
240
  display: inline-block;
241
241
  margin-right: govuk-spacing(3);
242
242
  padding: govuk-spacing(1) 0;
@@ -6,7 +6,7 @@ See the [main README quick start guide](https://github.com/alphagov/govuk-fronte
6
6
 
7
7
  ## Guidance and Examples
8
8
 
9
- The label component is used in other input components, to see an example of it in use see the [text input component](https://design-system.service.gov.uk/components/text-input/#using-hint-text).
9
+ The hint component is used in other input components. To see an example of it in use, see the [text input component](https://design-system.service.gov.uk/components/text-input/#hint-text).
10
10
 
11
11
  ## Component options
12
12
 
@@ -6,7 +6,7 @@ See the [main README quick start guide](https://github.com/alphagov/govuk-fronte
6
6
 
7
7
  ## Guidance and Examples
8
8
 
9
- The label component is used in other input components, to see an example of it in use see the [text input component](https://design-system.service.gov.uk/components/text-input/).
9
+ The label component is used in other input components. To see an example of it in use, see the [text input component](https://design-system.service.gov.uk/components/text-input/).
10
10
 
11
11
  ## Component options
12
12
 
@@ -148,7 +148,7 @@
148
148
  // =========================================================
149
149
 
150
150
  .govuk-radios--inline {
151
- @include mq ($from: tablet) {
151
+ @include govuk-media-query ($from: tablet) {
152
152
  @include govuk-clearfix;
153
153
 
154
154
  .govuk-radios__item {
@@ -82,7 +82,7 @@
82
82
  {% if hasHint %}
83
83
  {{ govukHint({
84
84
  id: itemHintId,
85
- classes: 'govuk-radios__hint',
85
+ classes: 'govuk-radios__hint' + (' ' + item.hint.classes if item.hint.classes),
86
86
  attributes: item.hint.attributes,
87
87
  html: item.hint.html,
88
88
  text: item.hint.text
@@ -26,6 +26,12 @@
26
26
  &:focus {
27
27
  outline: $govuk-focus-width solid $govuk-focus-colour;
28
28
  background-color: $govuk-focus-colour;
29
+
30
+ // Undo unwanted changes when global styles are enabled
31
+ @if ($govuk-global-styles) {
32
+ box-shadow: none;
33
+ text-decoration: underline;
34
+ }
29
35
  }
30
36
  }
31
37
  }
@@ -10,7 +10,7 @@
10
10
  {# Determine if we need 2 or 3 columns #}
11
11
  {% set anyRowHasActions = false %}
12
12
  {% for row in params.rows %}
13
- {% set anyRowHasActions = true if row.actions.items else anyRowHasActions %}
13
+ {% set anyRowHasActions = true if row.actions.items | length else anyRowHasActions %}
14
14
  {% endfor -%}
15
15
 
16
16
  <dl class="govuk-summary-list {%- if params.classes %} {{ params.classes }}{% endif %}"{% for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
@@ -756,12 +756,13 @@ if (detect) return
756
756
 
757
757
  (function (global) {
758
758
 
759
- // Polyfill from https://github.com/Financial-Times/polyfill-service/pull/1062/files#diff-404b69b4750d18dea4174930a49170fd
759
+ // There is no polyfill in polyfill-library (https://github.com/Financial-Times/polyfill-library/issues/338)
760
+ // So we source this from https://github.com/Alhadis/Snippets/blob/e09b4dfb7ffc9e250bc28319051e39ead3e5f70a/js/polyfills/IE8-child-elements.js#L28-L33
760
761
  Object.defineProperty(Element.prototype, "nextElementSibling", {
761
762
  get: function(){
762
763
  var el = this.nextSibling;
763
764
  while (el && el.nodeType !== 1) { el = el.nextSibling; }
764
- return (el.nodeType === 1) ? el : null;
765
+ return el;
765
766
  }
766
767
  });
767
768
 
@@ -779,12 +780,13 @@ if (detect) return
779
780
  if (detect) return
780
781
 
781
782
  (function (global) {
782
- // Polyfill from https://github.com/Financial-Times/polyfill-service/pull/1062/files#diff-b45a1197b842728cb76b624b6ba7d739
783
+ // There is no polyfill in polyfill-library (https://github.com/Financial-Times/polyfill-library/issues/338)
784
+ // So we source this from https://github.com/Alhadis/Snippets/blob/e09b4dfb7ffc9e250bc28319051e39ead3e5f70a/js/polyfills/IE8-child-elements.js#L35-L40
783
785
  Object.defineProperty(Element.prototype, 'previousElementSibling', {
784
786
  get: function(){
785
787
  var el = this.previousSibling;
786
788
  while (el && el.nodeType !== 1) { el = el.previousSibling; }
787
- return (el.nodeType === 1) ? el : null;
789
+ return el;
788
790
  }
789
791
  });
790
792
 
@@ -6,7 +6,7 @@
6
6
  <h2 class="govuk-tabs__title">
7
7
  {{ params.title | default ("Contents") }}
8
8
  </h2>
9
- {% if(params.items) %}
9
+ {% if(params.items | length) %}
10
10
  <ul class="govuk-tabs__list">
11
11
  {% for item in params.items %}
12
12
  {% if item %}
@@ -25,7 +25,8 @@
25
25
  max-width: $width;
26
26
 
27
27
  // On mobile, add half width gutters
28
- margin: 0 $govuk-gutter-half;
28
+ margin-right: $govuk-gutter-half;
29
+ margin-left: $govuk-gutter-half;
29
30
 
30
31
  // Respect 'display cutout' safe area (avoids notches and rounded corners)
31
32
  @supports (margin: unquote("max(calc(0px))")) {
@@ -40,7 +41,8 @@
40
41
 
41
42
  // On tablet, add full width gutters
42
43
  @include govuk-media-query($from: tablet) {
43
- margin: 0 $govuk-gutter;
44
+ margin-right: $govuk-gutter;
45
+ margin-left: $govuk-gutter;
44
46
 
45
47
  // Respect 'display cutout' safe area (avoids notches and rounded corners)
46
48
  @supports (margin: unquote("max(calc(0px))")) {
@@ -57,12 +59,14 @@
57
59
  // As soon as the viewport is greater than the width of the page plus the
58
60
  // gutters, just centre the content instead of adding gutters.
59
61
  @include govuk-media-query($and: "(min-width: #{($width + $govuk-gutter * 2)})") {
60
- margin: 0 auto;
62
+ margin-right: auto;
63
+ margin-left: auto;
61
64
 
62
65
  // Since a safe area may have previously been set above,
63
66
  // we need to duplicate this margin that centers the page.
64
67
  @supports (margin: unquote("max(calc(0px))")) {
65
- margin: 0 auto;
68
+ margin-right: auto;
69
+ margin-left: auto;
66
70
  }
67
71
  }
68
72
 
@@ -70,7 +74,8 @@
70
74
  width: $width;
71
75
  // Since media queries are not supported in IE8,
72
76
  // we need to duplicate this margin that centers the page.
73
- margin: 0 auto;
77
+ margin-right: auto;
78
+ margin-left: auto;
74
79
  }
75
80
  }
76
81
 
@@ -6,15 +6,15 @@
6
6
  <!DOCTYPE html>
7
7
  <html lang="{{ htmlLang | default('en') }}" class="govuk-template {{ htmlClasses }}">
8
8
  <head>
9
- <meta charset="utf-8" />
9
+ <meta charset="utf-8">
10
10
  <title{% if pageTitleLang %} lang="{{ pageTitleLang }}"{% endif %}>{% block pageTitle %}GOV.UK - The best place to find government services and information{% endblock %}</title>
11
11
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
12
- <meta name="theme-color" content="{{ themeColor | default('#0b0c0c') }}" /> {# Hardcoded value of $govuk-black #}
12
+ <meta name="theme-color" content="{{ themeColor | default('#0b0c0c') }}"> {# Hardcoded value of $govuk-black #}
13
13
  {# Ensure that older IE versions always render with the correct rendering engine #}
14
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
14
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
15
15
 
16
16
  {% block headIcons %}
17
- <link rel="shortcut icon" sizes="16x16 32x32 48x48" href="{{ assetPath | default('/assets') }}/images/favicon.ico" type="image/x-icon" />
17
+ <link rel="shortcut icon" sizes="16x16 32x32 48x48" href="{{ assetPath | default('/assets') }}/images/favicon.ico" type="image/x-icon">
18
18
  <link rel="mask-icon" href="{{ assetPath | default('/assets') }}/images/govuk-mask-icon.svg" color="{{ themeColor | default('#0b0c0c') }}"> {# Hardcoded value of $govuk-black #}
19
19
  <link rel="apple-touch-icon" sizes="180x180" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-180x180.png">
20
20
  <link rel="apple-touch-icon" sizes="167x167" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-167x167.png">
@@ -243,12 +243,13 @@ if (detect) return
243
243
 
244
244
  (function (global) {
245
245
 
246
- // Polyfill from https://github.com/Financial-Times/polyfill-service/pull/1062/files#diff-404b69b4750d18dea4174930a49170fd
246
+ // There is no polyfill in polyfill-library (https://github.com/Financial-Times/polyfill-library/issues/338)
247
+ // So we source this from https://github.com/Alhadis/Snippets/blob/e09b4dfb7ffc9e250bc28319051e39ead3e5f70a/js/polyfills/IE8-child-elements.js#L28-L33
247
248
  Object.defineProperty(Element.prototype, "nextElementSibling", {
248
249
  get: function(){
249
250
  var el = this.nextSibling;
250
251
  while (el && el.nodeType !== 1) { el = el.nextSibling; }
251
- return (el.nodeType === 1) ? el : null;
252
+ return el;
252
253
  }
253
254
  });
254
255
 
@@ -241,12 +241,13 @@ if (detect) return
241
241
  if (detect) return
242
242
 
243
243
  (function (global) {
244
- // Polyfill from https://github.com/Financial-Times/polyfill-service/pull/1062/files#diff-b45a1197b842728cb76b624b6ba7d739
244
+ // There is no polyfill in polyfill-library (https://github.com/Financial-Times/polyfill-library/issues/338)
245
+ // So we source this from https://github.com/Alhadis/Snippets/blob/e09b4dfb7ffc9e250bc28319051e39ead3e5f70a/js/polyfills/IE8-child-elements.js#L35-L40
245
246
  Object.defineProperty(Element.prototype, 'previousElementSibling', {
246
247
  get: function(){
247
248
  var el = this.previousSibling;
248
249
  while (el && el.nodeType !== 1) { el = el.previousSibling; }
249
- return (el.nodeType === 1) ? el : null;
250
+ return el;
250
251
  }
251
252
  });
252
253
 
@@ -2,49 +2,49 @@
2
2
  "_args": [
3
3
  [
4
4
  {
5
- "raw": "govuk-frontend@^3.4.0",
5
+ "raw": "govuk-frontend@^3.5.0",
6
6
  "scope": null,
7
7
  "escapedName": "govuk-frontend",
8
8
  "name": "govuk-frontend",
9
- "rawSpec": "^3.4.0",
10
- "spec": ">=3.4.0 <4.0.0",
9
+ "rawSpec": "^3.5.0",
10
+ "spec": ">=3.5.0 <4.0.0",
11
11
  "type": "range"
12
12
  },
13
13
  "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ"
14
14
  ]
15
15
  ],
16
- "_from": "govuk-frontend@>=3.4.0 <4.0.0",
16
+ "_from": "govuk-frontend@>=3.5.0 <4.0.0",
17
17
  "_hasShrinkwrap": false,
18
- "_id": "govuk-frontend@3.4.0",
18
+ "_id": "govuk-frontend@3.5.0",
19
19
  "_inCache": true,
20
20
  "_location": "/govuk-frontend",
21
- "_nodeVersion": "10.15.1",
21
+ "_nodeVersion": "12.13.1",
22
22
  "_npmOperationalInternal": {
23
23
  "host": "s3://npm-registry-packages",
24
- "tmp": "tmp/govuk-frontend_3.4.0_1574162407134_0.4897900579083776"
24
+ "tmp": "tmp/govuk-frontend_3.5.0_1579614167072_0.020461364065953225"
25
25
  },
26
26
  "_npmUser": {
27
27
  "name": "govuk-patterns-and-tools",
28
28
  "email": "design-system-pipeline@digital.cabinet-office.gov.uk"
29
29
  },
30
- "_npmVersion": "6.4.1",
30
+ "_npmVersion": "6.12.1",
31
31
  "_phantomChildren": {},
32
32
  "_requested": {
33
- "raw": "govuk-frontend@^3.4.0",
33
+ "raw": "govuk-frontend@^3.5.0",
34
34
  "scope": null,
35
35
  "escapedName": "govuk-frontend",
36
36
  "name": "govuk-frontend",
37
- "rawSpec": "^3.4.0",
38
- "spec": ">=3.4.0 <4.0.0",
37
+ "rawSpec": "^3.5.0",
38
+ "spec": ">=3.5.0 <4.0.0",
39
39
  "type": "range"
40
40
  },
41
41
  "_requiredBy": [
42
42
  "/"
43
43
  ],
44
- "_resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.4.0.tgz",
45
- "_shasum": "f6694245fbec2dd476d8e161c36be2a4ea785ce3",
44
+ "_resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.5.0.tgz",
45
+ "_shasum": "040e6fd0227f65d3e5820f8a05a9932ffdfb2a9e",
46
46
  "_shrinkwrap": null,
47
- "_spec": "govuk-frontend@^3.4.0",
47
+ "_spec": "govuk-frontend@^3.5.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-rmYPtcCtWgz92QBejYwOnfSxbPGYfvSruLwB4CBk/yJtySHRY0whG1e2/iFRRSj0pMx1Bu+zh/IqCTo+84hbFw==",
63
- "shasum": "f6694245fbec2dd476d8e161c36be2a4ea785ce3",
64
- "tarball": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.4.0.tgz",
62
+ "integrity": "sha512-4tNKgcChO1bMNsrTz2UsK4fDMmU9R87UDxy/KhKIMbnhsuJLVuArDveYLkZuUsZ6B3eaCbl5gmI8i/Q/Mi680A==",
63
+ "shasum": "040e6fd0227f65d3e5820f8a05a9932ffdfb2a9e",
64
+ "tarball": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.5.0.tgz",
65
65
  "fileCount": 247,
66
- "unpackedSize": 1026035,
67
- "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd08/nCRA9TVsSAnZWagAA5mMP/i7X9v6HlLJFyBMcd7cC\nXy/CJT8iaevXeyOgV/2OqtjUeu7r05CVGvUfsTx2Z4lvrpbwfiODnogGdK1T\n0DMpYytrDsTmio1A//jryjpeAvjtZKaq+CE8oy3zvtzIfGnOa2UEIWvwNbvz\nmo+aKJy+L19j+y1O3187Cyy6GJZJ7/AQxzDt+E/gWDroZH9I4KJ/ayR63thC\n4VPObAz/37X0/lhRtJzKKcWY2HMwOJV6BSncZu5vCf66De31T+1JO6TciZwl\nDfpgVPl853XmI4e0tsvrxWfQVUZVW4rRPu6o6SP50obrQkWFbbxMUVFqqrfD\np5I2WFvBkUakxFJQaslPNrhGXFumDNF8Sti8R0+IboslhTIiY3FsJHAZMjXW\nZnfq3VbX1EHFE3JLc8TNgchlKCg/K8V02Nweq4kp6dAZ+7IhdtFKyEnGlSBd\nZqcExaJFluZFcngnzQSk6J/clJXi1fjS54GDGWfTkQP3kEBCNK5OiuLe7a2e\nCk5sNyIwv+vcKXma94CEP7bW7eTeL2nbLNUqQsTLQapodwxeB0J8KRwllnm/\nDkJncvRPSW8p1I71czvH8yc1ul2VoZtF5kW0mRAdAkFVQLP02IqEqOSeN9K+\nEyivhhPla6fzW1xt25WCr4+qi5NzrPzyoQHn1MYW9Jdxo6RP0q7EQmWKnAi5\nNJOq\r\n=c6pS\r\n-----END PGP SIGNATURE-----\r\n"
66
+ "unpackedSize": 1026965,
67
+ "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJv/XCRA9TVsSAnZWagAAVzUP/AxgxJ+hyp/5XkM+OHsq\nwgs5jdMyh19GnnhSaAkDho/q7YCTzmzyxPju1wpR8JIwXBl5IPzDTpkxqZUB\n3P+Ax0P+UvtX7XVgu+2jmd+i6xct2DrCKcSbOu0pfRjT0AxFhvtv/91LNVS3\n3azV5eiqze3z2OyQcXOMGLchKKk2P2DZ1kQzhEF6JpuMuQgtkpfr1e4pId+z\n9bvLDp1TtoBuQVcNy3WiEuf0jYWcd9wX67Y578PeRDNmcuYxkmTAJueGARtB\nkuueNd6lmhNU2dR2aFl5Zr/35mc0RjJVoIQ4nf/HAx1NsMyHfOX3Y9RvR7w4\nolMqQlzQ/8S8zd4d/TzBpHpvgQRSgljyPu/6Ww45nL/R1GMPK0Y8NkDg13aD\nxRQL4OChNCikbycTsY0X9P7cbtLCamfT5GU3PGaeCaQhAhwjdAE1KeKo3mtV\nTW1fGUj99qbLIw7c2nqddKZIDYRK852k5ew3EnmvDB8kn1Gu5veBjt6AP+xE\nvttSU6uB+ee1yRJGVwfybIIxBupwjhX0BlQSETaKyvQMAJIeO58y0AUwq+fS\nPgirvF+Qx7vpbxw1moA/IbAvicjrm3+0hhht0OAXaWMfKn9MfU08LlaKbb+g\n/+FCqZxCJPKgMoR489UF2BkozUZmHDOG40xUELuMa+8AbxDqcOVrDAGcqMe2\n9rvI\r\n=v5bg\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": "govuk/all.scss",
95
- "version": "3.4.0"
95
+ "version": "3.5.0"
96
96
  }
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.20.0
4
+ version: 21.21.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: 2020-01-16 00:00:00.000000000 Z
11
+ date: 2020-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gds-api-adapters