govuk_publishing_components 12.0.0 → 12.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +1 -0
  3. data/lib/govuk_publishing_components/version.rb +1 -1
  4. data/node_modules/govuk-frontend/all.js +188 -0
  5. data/node_modules/govuk-frontend/components/_all.scss +1 -0
  6. data/node_modules/govuk-frontend/components/back-link/README.md +12 -12
  7. data/node_modules/govuk-frontend/components/breadcrumbs/README.md +18 -18
  8. data/node_modules/govuk-frontend/components/button/README.md +30 -30
  9. data/node_modules/govuk-frontend/components/button/template.njk +1 -1
  10. data/node_modules/govuk-frontend/components/character-count/README.md +497 -0
  11. data/node_modules/govuk-frontend/components/character-count/_character-count.scss +31 -0
  12. data/node_modules/govuk-frontend/components/character-count/character-count.js +1201 -0
  13. data/node_modules/govuk-frontend/components/character-count/macro-options.json +83 -0
  14. data/node_modules/govuk-frontend/components/character-count/macro.njk +3 -0
  15. data/node_modules/govuk-frontend/components/character-count/template.njk +32 -0
  16. data/node_modules/govuk-frontend/components/checkboxes/README.md +57 -57
  17. data/node_modules/govuk-frontend/components/date-input/README.md +36 -36
  18. data/node_modules/govuk-frontend/components/details/README.md +18 -18
  19. data/node_modules/govuk-frontend/components/error-message/README.md +12 -12
  20. data/node_modules/govuk-frontend/components/error-summary/README.md +24 -24
  21. data/node_modules/govuk-frontend/components/fieldset/README.md +21 -21
  22. data/node_modules/govuk-frontend/components/file-upload/README.md +24 -24
  23. data/node_modules/govuk-frontend/components/footer/README.md +51 -51
  24. data/node_modules/govuk-frontend/components/header/README.md +42 -42
  25. data/node_modules/govuk-frontend/components/header/_header.scss +2 -0
  26. data/node_modules/govuk-frontend/components/hint/README.md +12 -12
  27. data/node_modules/govuk-frontend/components/input/README.md +27 -27
  28. data/node_modules/govuk-frontend/components/inset-text/README.md +12 -12
  29. data/node_modules/govuk-frontend/components/label/README.md +15 -15
  30. data/node_modules/govuk-frontend/components/panel/README.md +15 -15
  31. data/node_modules/govuk-frontend/components/phase-banner/README.md +12 -12
  32. data/node_modules/govuk-frontend/components/radios/README.md +60 -60
  33. data/node_modules/govuk-frontend/components/radios/_radios.scss +1 -0
  34. data/node_modules/govuk-frontend/components/select/README.md +39 -39
  35. data/node_modules/govuk-frontend/components/select/_select.scss +1 -1
  36. data/node_modules/govuk-frontend/components/skip-link/README.md +12 -12
  37. data/node_modules/govuk-frontend/components/table/README.md +45 -45
  38. data/node_modules/govuk-frontend/components/table/macro-options.json +12 -0
  39. data/node_modules/govuk-frontend/components/table/template.njk +7 -3
  40. data/node_modules/govuk-frontend/components/tabs/README.md +30 -30
  41. data/node_modules/govuk-frontend/components/tag/README.md +9 -9
  42. data/node_modules/govuk-frontend/components/textarea/README.md +30 -30
  43. data/node_modules/govuk-frontend/components/warning-text/README.md +12 -12
  44. data/node_modules/govuk-frontend/package.json +11 -11
  45. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ee32f536043a1a2f64756b001e8461fc1d9c1115224355d5c4df4e5e85345fb
4
- data.tar.gz: ab008670e129c580ad58822896f218a3d310aba562ffa9bbad94e1ddc2cada38
3
+ metadata.gz: c7e628f695d27fab28cdd1c5f3ccd9f4cc64072f74d99632161415be96e071f7
4
+ data.tar.gz: f149159545b6d352235327dd5e1a07c9871085aed4c6eac8daec15422dd868ca
5
5
  SHA512:
6
- metadata.gz: 478e64833260a3752fe680760bdfcb1b227ac8cd9cf3cacb53de5e76d8a2fc4588b1d631f223029c033e47caae2eba1abd667faf544b9b288a177fc354ba3039
7
- data.tar.gz: f58a472db124e4eef3ec5f79c1087d2e112d22d4150b80cf98ba2e5d030861ad2718655c91e48835a67bdec4da05089c4fb05fac938398d3f850b2aeb09d460b
6
+ metadata.gz: ce62ca884692de80d481d60233ff466647d93999fb212c11d0315ca1efc1ef6febd7861dd84a57fb98d003a93ccb953da76a40342d9f7d92786fd21470b90966
7
+ data.tar.gz: 12db548d533afd3a89629d351840613cb4e88e46c2492bfcb6656450d4937153219a39c977f85f64e95bf2e57cf4c83e3313e370ebedef35e4229267b98b9783
@@ -2,6 +2,7 @@
2
2
  color: $gem-text-colour;
3
3
  padding: $gem-spacing-scale-3;
4
4
  border: $gem-border-width-mobile solid $gem-success-colour;
5
+ margin-bottom: $gem-spacing-scale-4;
5
6
 
6
7
  @include media(tablet) {
7
8
  padding: $gem-spacing-scale-4;
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '12.0.0'.freeze
2
+ VERSION = '12.0.1'.freeze
3
3
  end
@@ -1236,6 +1236,188 @@ Details.prototype.destroy = function (node) {
1236
1236
 
1237
1237
  }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
1238
1238
 
1239
+ function CharacterCount ($module) {
1240
+ this.$module = $module;
1241
+ this.$textarea = $module.querySelector('.js-character-count');
1242
+ }
1243
+
1244
+ CharacterCount.prototype.defaults = {
1245
+ characterCountAttribute: 'data-maxlength',
1246
+ wordCountAttribute: 'data-maxwords'
1247
+ };
1248
+
1249
+ // Initialize component
1250
+ CharacterCount.prototype.init = function () {
1251
+ // Check for module
1252
+ var $module = this.$module;
1253
+ var $textarea = this.$textarea;
1254
+ if (!$textarea) {
1255
+ return
1256
+ }
1257
+
1258
+ // Read options set using dataset ('data-' values)
1259
+ this.options = this.getDataset($module);
1260
+
1261
+ // Determine the limit attribute (characters or words)
1262
+ var countAttribute = this.defaults.characterCountAttribute;
1263
+ if (this.options.maxwords) {
1264
+ countAttribute = this.defaults.wordCountAttribute;
1265
+ }
1266
+
1267
+ // Save the element limit
1268
+ this.maxLength = $module.getAttribute(countAttribute);
1269
+
1270
+ // Check for limit
1271
+ if (!this.maxLength) {
1272
+ return
1273
+ }
1274
+
1275
+ // Generate and reference message
1276
+ var boundCreateCountMessage = this.createCountMessage.bind(this);
1277
+ this.countMessage = boundCreateCountMessage();
1278
+
1279
+ // If there's a maximum length defined and the count message exists
1280
+ if (this.countMessage) {
1281
+ // Remove hard limit if set
1282
+ $module.removeAttribute('maxlength');
1283
+
1284
+ // Bind event changes to the textarea
1285
+ var boundChangeEvents = this.bindChangeEvents.bind(this);
1286
+ boundChangeEvents();
1287
+
1288
+ // Update count message
1289
+ var boundUpdateCountMessage = this.updateCountMessage.bind(this);
1290
+ boundUpdateCountMessage();
1291
+ }
1292
+ };
1293
+
1294
+ // Read data attributes
1295
+ CharacterCount.prototype.getDataset = function (element) {
1296
+ var dataset = {};
1297
+ var attributes = element.attributes;
1298
+ if (attributes) {
1299
+ for (var i = 0; i < attributes.length; i++) {
1300
+ var attribute = attributes[i];
1301
+ var match = attribute.name.match(/^data-(.+)/);
1302
+ if (match) {
1303
+ dataset[match[1]] = attribute.value;
1304
+ }
1305
+ }
1306
+ }
1307
+ return dataset
1308
+ };
1309
+
1310
+ // Counts characters or words in text
1311
+ CharacterCount.prototype.count = function (text) {
1312
+ var length;
1313
+ if (this.options.maxwords) {
1314
+ var tokens = text.match(/\S+/g) || []; // Matches consecutive non-whitespace chars
1315
+ length = tokens.length;
1316
+ } else {
1317
+ length = text.length;
1318
+ }
1319
+ return length
1320
+ };
1321
+
1322
+ // Generate count message and bind it to the input
1323
+ // returns reference to the generated element
1324
+ CharacterCount.prototype.createCountMessage = function () {
1325
+ var countElement = this.$textarea;
1326
+ var elementId = countElement.id;
1327
+ // Check for existing info count message
1328
+ var countMessage = document.getElementById(elementId + '-info');
1329
+ // If there is no existing info count message we add one right after the field
1330
+ if (elementId && !countMessage) {
1331
+ countElement.insertAdjacentHTML('afterend', '<span id="' + elementId + '-info" class="govuk-hint govuk-character-count__message" aria-live="polite"></span>');
1332
+ this.describedBy = countElement.getAttribute('aria-describedby');
1333
+ this.describedByInfo = this.describedBy + ' ' + elementId + '-info';
1334
+ countElement.setAttribute('aria-describedby', this.describedByInfo);
1335
+ countMessage = document.getElementById(elementId + '-info');
1336
+ } else {
1337
+ // If there is an existing info count message we move it right after the field
1338
+ countElement.insertAdjacentElement('afterend', countMessage);
1339
+ }
1340
+ return countMessage
1341
+ };
1342
+
1343
+ // Bind input propertychange to the elements and update based on the change
1344
+ CharacterCount.prototype.bindChangeEvents = function () {
1345
+ var $textarea = this.$textarea;
1346
+ $textarea.addEventListener('keyup', this.checkIfValueChanged.bind(this));
1347
+
1348
+ // Bind focus/blur events to start/stop polling
1349
+ $textarea.addEventListener('focus', this.handleFocus.bind(this));
1350
+ $textarea.addEventListener('blur', this.handleBlur.bind(this));
1351
+ };
1352
+
1353
+ // Speech recognition software such as Dragon NaturallySpeaking will modify the
1354
+ // fields by directly changing its `value`. These changes don't trigger events
1355
+ // in JavaScript, so we need to poll to handle when and if they occur.
1356
+ CharacterCount.prototype.checkIfValueChanged = function () {
1357
+ if (!this.$textarea.oldValue) this.$textarea.oldValue = '';
1358
+ if (this.$textarea.value !== this.$textarea.oldValue) {
1359
+ this.$textarea.oldValue = this.$textarea.value;
1360
+ var boundUpdateCountMessage = this.updateCountMessage.bind(this);
1361
+ boundUpdateCountMessage();
1362
+ }
1363
+ };
1364
+
1365
+ // Update message box
1366
+ CharacterCount.prototype.updateCountMessage = function () {
1367
+ var countElement = this.$textarea;
1368
+ var options = this.options;
1369
+ var countMessage = this.countMessage;
1370
+
1371
+ // Determine the remaining number of characters/words
1372
+ var currentLength = this.count(countElement.value);
1373
+ var maxLength = this.maxLength;
1374
+ var remainingNumber = maxLength - currentLength;
1375
+
1376
+ // Set threshold if presented in options
1377
+ var thresholdPercent = options.threshold ? options.threshold : 0;
1378
+ var thresholdValue = maxLength * thresholdPercent / 100;
1379
+ if (thresholdValue > currentLength) {
1380
+ countMessage.classList.add('govuk-character-count__message--disabled');
1381
+ } else {
1382
+ countMessage.classList.remove('govuk-character-count__message--disabled');
1383
+ }
1384
+
1385
+ // Update styles
1386
+ if (remainingNumber < 0) {
1387
+ countElement.classList.add('govuk-textarea--error');
1388
+ countMessage.classList.remove('govuk-hint');
1389
+ countMessage.classList.add('govuk-error-message');
1390
+ } else {
1391
+ countElement.classList.remove('govuk-textarea--error');
1392
+ countMessage.classList.remove('govuk-error-message');
1393
+ countMessage.classList.add('govuk-hint');
1394
+ }
1395
+
1396
+ // Update message
1397
+ var charVerb = 'remaining';
1398
+ var charNoun = 'character';
1399
+ var displayNumber = remainingNumber;
1400
+ if (options.maxwords) {
1401
+ charNoun = 'word';
1402
+ }
1403
+ charNoun = charNoun + ((remainingNumber === -1 || remainingNumber === 1) ? '' : 's');
1404
+
1405
+ charVerb = (remainingNumber < 0) ? 'too many' : 'remaining';
1406
+ displayNumber = Math.abs(remainingNumber);
1407
+
1408
+ countMessage.innerHTML = 'You have ' + displayNumber + ' ' + charNoun + ' ' + charVerb;
1409
+ };
1410
+
1411
+ CharacterCount.prototype.handleFocus = function () {
1412
+ // Check if value changed on focus
1413
+ this.valueChecker = setInterval(this.checkIfValueChanged.bind(this), 1000);
1414
+ };
1415
+
1416
+ CharacterCount.prototype.handleBlur = function () {
1417
+ // Cancel value checking on blur
1418
+ clearInterval(this.valueChecker);
1419
+ };
1420
+
1239
1421
  function Checkboxes ($module) {
1240
1422
  this.$module = $module;
1241
1423
  this.$inputs = $module.querySelectorAll('input[type="checkbox"]');
@@ -1688,6 +1870,11 @@ function initAll () {
1688
1870
  new Details($detail).init();
1689
1871
  });
1690
1872
 
1873
+ var $characterCount = document.querySelectorAll('[data-module="character-count"]');
1874
+ nodeListForEach($characterCount, function ($characterCount) {
1875
+ new CharacterCount($characterCount).init();
1876
+ });
1877
+
1691
1878
  var $checkboxes = document.querySelectorAll('[data-module="checkboxes"]');
1692
1879
  nodeListForEach($checkboxes, function ($checkbox) {
1693
1880
  new Checkboxes($checkbox).init();
@@ -1715,6 +1902,7 @@ function initAll () {
1715
1902
  exports.initAll = initAll;
1716
1903
  exports.Button = Button;
1717
1904
  exports.Details = Details;
1905
+ exports.CharacterCount = CharacterCount;
1718
1906
  exports.Checkboxes = Checkboxes;
1719
1907
  exports.ErrorSummary = ErrorSummary;
1720
1908
  exports.Header = Header;
@@ -2,6 +2,7 @@
2
2
  @import "breadcrumbs/breadcrumbs";
3
3
  @import "button/button";
4
4
  @import "checkboxes/checkboxes";
5
+ @import "character-count/character-count";
5
6
  @import "date-input/date-input";
6
7
  @import "details/details";
7
8
  @import "error-message/error-message";
@@ -89,11 +89,11 @@ If you are using Nunjucks,then macros take the following arguments
89
89
 
90
90
  <th class="govuk-table__header" scope="row">text (or) html</th>
91
91
 
92
- <td class="govuk-table__cell ">string</td>
92
+ <td class="govuk-table__cell">string</td>
93
93
 
94
- <td class="govuk-table__cell ">Yes</td>
94
+ <td class="govuk-table__cell">Yes</td>
95
95
 
96
- <td class="govuk-table__cell ">Text or HTML to use within the back link component. If `html` is provided, the `text` argument will be ignored.</td>
96
+ <td class="govuk-table__cell">Text or HTML to use within the back link component. If `html` is provided, the `text` argument will be ignored.</td>
97
97
 
98
98
  </tr>
99
99
 
@@ -101,11 +101,11 @@ If you are using Nunjucks,then macros take the following arguments
101
101
 
102
102
  <th class="govuk-table__header" scope="row">href</th>
103
103
 
104
- <td class="govuk-table__cell ">string</td>
104
+ <td class="govuk-table__cell">string</td>
105
105
 
106
- <td class="govuk-table__cell ">Yes</td>
106
+ <td class="govuk-table__cell">Yes</td>
107
107
 
108
- <td class="govuk-table__cell ">The value of the link href attribute</td>
108
+ <td class="govuk-table__cell">The value of the link href attribute</td>
109
109
 
110
110
  </tr>
111
111
 
@@ -113,11 +113,11 @@ If you are using Nunjucks,then macros take the following arguments
113
113
 
114
114
  <th class="govuk-table__header" scope="row">classes</th>
115
115
 
116
- <td class="govuk-table__cell ">string</td>
116
+ <td class="govuk-table__cell">string</td>
117
117
 
118
- <td class="govuk-table__cell ">No</td>
118
+ <td class="govuk-table__cell">No</td>
119
119
 
120
- <td class="govuk-table__cell ">Optional additional classes to add to the anchor tag.</td>
120
+ <td class="govuk-table__cell">Optional additional classes to add to the anchor tag.</td>
121
121
 
122
122
  </tr>
123
123
 
@@ -125,11 +125,11 @@ If you are using Nunjucks,then macros take the following arguments
125
125
 
126
126
  <th class="govuk-table__header" scope="row">attributes</th>
127
127
 
128
- <td class="govuk-table__cell ">object</td>
128
+ <td class="govuk-table__cell">object</td>
129
129
 
130
- <td class="govuk-table__cell ">No</td>
130
+ <td class="govuk-table__cell">No</td>
131
131
 
132
- <td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the anchor tag.</td>
132
+ <td class="govuk-table__cell">Any extra HTML attributes (for example data attributes) to add to the anchor tag.</td>
133
133
 
134
134
  </tr>
135
135
 
@@ -254,11 +254,11 @@ If you are using Nunjucks,then macros take the following arguments
254
254
 
255
255
  <th class="govuk-table__header" scope="row">items</th>
256
256
 
257
- <td class="govuk-table__cell ">array</td>
257
+ <td class="govuk-table__cell">array</td>
258
258
 
259
- <td class="govuk-table__cell ">Yes</td>
259
+ <td class="govuk-table__cell">Yes</td>
260
260
 
261
- <td class="govuk-table__cell ">Array of breadcrumbs item objects.</td>
261
+ <td class="govuk-table__cell">Array of breadcrumbs item objects.</td>
262
262
 
263
263
  </tr>
264
264
 
@@ -266,11 +266,11 @@ If you are using Nunjucks,then macros take the following arguments
266
266
 
267
267
  <th class="govuk-table__header" scope="row">items.{}.text (or) items.{}.html</th>
268
268
 
269
- <td class="govuk-table__cell ">string</td>
269
+ <td class="govuk-table__cell">string</td>
270
270
 
271
- <td class="govuk-table__cell ">Yes</td>
271
+ <td class="govuk-table__cell">Yes</td>
272
272
 
273
- <td class="govuk-table__cell ">Text or HTML to use within the breadcrumbs item. If `html` is provided, the `text` argument will be ignored.</td>
273
+ <td class="govuk-table__cell">Text or HTML to use within the breadcrumbs item. If `html` is provided, the `text` argument will be ignored.</td>
274
274
 
275
275
  </tr>
276
276
 
@@ -278,11 +278,11 @@ If you are using Nunjucks,then macros take the following arguments
278
278
 
279
279
  <th class="govuk-table__header" scope="row">items.{}.href</th>
280
280
 
281
- <td class="govuk-table__cell ">string</td>
281
+ <td class="govuk-table__cell">string</td>
282
282
 
283
- <td class="govuk-table__cell ">no</td>
283
+ <td class="govuk-table__cell">no</td>
284
284
 
285
- <td class="govuk-table__cell ">Link for the breadcrumbs item. If not specified, breadcrumbs item is a normal list item</td>
285
+ <td class="govuk-table__cell">Link for the breadcrumbs item. If not specified, breadcrumbs item is a normal list item</td>
286
286
 
287
287
  </tr>
288
288
 
@@ -290,11 +290,11 @@ If you are using Nunjucks,then macros take the following arguments
290
290
 
291
291
  <th class="govuk-table__header" scope="row">items.{}.attributes</th>
292
292
 
293
- <td class="govuk-table__cell ">object</td>
293
+ <td class="govuk-table__cell">object</td>
294
294
 
295
- <td class="govuk-table__cell ">No</td>
295
+ <td class="govuk-table__cell">No</td>
296
296
 
297
- <td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the breadcrumb anchor item.</td>
297
+ <td class="govuk-table__cell">Any extra HTML attributes (for example data attributes) to add to the breadcrumb anchor item.</td>
298
298
 
299
299
  </tr>
300
300
 
@@ -302,11 +302,11 @@ If you are using Nunjucks,then macros take the following arguments
302
302
 
303
303
  <th class="govuk-table__header" scope="row">classes</th>
304
304
 
305
- <td class="govuk-table__cell ">string</td>
305
+ <td class="govuk-table__cell">string</td>
306
306
 
307
- <td class="govuk-table__cell ">No</td>
307
+ <td class="govuk-table__cell">No</td>
308
308
 
309
- <td class="govuk-table__cell ">Optional additional classes to add to the breadcrumbs container.</td>
309
+ <td class="govuk-table__cell">Optional additional classes to add to the breadcrumbs container.</td>
310
310
 
311
311
  </tr>
312
312
 
@@ -314,11 +314,11 @@ If you are using Nunjucks,then macros take the following arguments
314
314
 
315
315
  <th class="govuk-table__header" scope="row">attributes</th>
316
316
 
317
- <td class="govuk-table__cell ">object</td>
317
+ <td class="govuk-table__cell">object</td>
318
318
 
319
- <td class="govuk-table__cell ">No</td>
319
+ <td class="govuk-table__cell">No</td>
320
320
 
321
- <td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the breadcrumbs container.</td>
321
+ <td class="govuk-table__cell">Any extra HTML attributes (for example data attributes) to add to the breadcrumbs container.</td>
322
322
 
323
323
  </tr>
324
324
 
@@ -55,7 +55,7 @@ Buttons are configured to perform an action and they can have a different look.
55
55
 
56
56
  #### Markup
57
57
 
58
- <a href="/" role="button" class="govuk-button">
58
+ <a href="/" role="button" draggable="false" class="govuk-button">
59
59
  Link button
60
60
  </a>
61
61
 
@@ -74,7 +74,7 @@ Buttons are configured to perform an action and they can have a different look.
74
74
 
75
75
  #### Markup
76
76
 
77
- <a href="/" role="button" class="govuk-button govuk-button--disabled">
77
+ <a href="/" role="button" draggable="false" class="govuk-button govuk-button--disabled">
78
78
  Disabled link button
79
79
  </a>
80
80
 
@@ -94,7 +94,7 @@ Buttons are configured to perform an action and they can have a different look.
94
94
 
95
95
  #### Markup
96
96
 
97
- <a href="/" role="button" class="govuk-button govuk-button--start">
97
+ <a href="/" role="button" draggable="false" class="govuk-button govuk-button--start">
98
98
  Start now link button
99
99
  </a>
100
100
 
@@ -190,11 +190,11 @@ If you are using Nunjucks,then macros take the following arguments
190
190
 
191
191
  <th class="govuk-table__header" scope="row">element</th>
192
192
 
193
- <td class="govuk-table__cell ">string</td>
193
+ <td class="govuk-table__cell">string</td>
194
194
 
195
- <td class="govuk-table__cell ">No</td>
195
+ <td class="govuk-table__cell">No</td>
196
196
 
197
- <td class="govuk-table__cell ">Whether to use an `input`, `button` or `a` element to create the button. In most cases you will not need to set this as it will be configured automatically if you use `href` or `html`.</td>
197
+ <td class="govuk-table__cell">Whether to use an `input`, `button` or `a` element to create the button. In most cases you will not need to set this as it will be configured automatically if you use `href` or `html`.</td>
198
198
 
199
199
  </tr>
200
200
 
@@ -202,11 +202,11 @@ If you are using Nunjucks,then macros take the following arguments
202
202
 
203
203
  <th class="govuk-table__header" scope="row">text (or) html</th>
204
204
 
205
- <td class="govuk-table__cell ">string</td>
205
+ <td class="govuk-table__cell">string</td>
206
206
 
207
- <td class="govuk-table__cell ">Yes</td>
207
+ <td class="govuk-table__cell">Yes</td>
208
208
 
209
- <td class="govuk-table__cell ">Text or HTML for the button or link. If `html` is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`.</td>
209
+ <td class="govuk-table__cell">Text or HTML for the button or link. If `html` is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`.</td>
210
210
 
211
211
  </tr>
212
212
 
@@ -214,11 +214,11 @@ If you are using Nunjucks,then macros take the following arguments
214
214
 
215
215
  <th class="govuk-table__header" scope="row">name</th>
216
216
 
217
- <td class="govuk-table__cell ">string</td>
217
+ <td class="govuk-table__cell">string</td>
218
218
 
219
- <td class="govuk-table__cell ">Yes</td>
219
+ <td class="govuk-table__cell">Yes</td>
220
220
 
221
- <td class="govuk-table__cell ">Name for the `input` or `button`. This has no effect on `a` elements.</td>
221
+ <td class="govuk-table__cell">Name for the `input` or `button`. This has no effect on `a` elements.</td>
222
222
 
223
223
  </tr>
224
224
 
@@ -226,11 +226,11 @@ If you are using Nunjucks,then macros take the following arguments
226
226
 
227
227
  <th class="govuk-table__header" scope="row">type</th>
228
228
 
229
- <td class="govuk-table__cell ">string</td>
229
+ <td class="govuk-table__cell">string</td>
230
230
 
231
- <td class="govuk-table__cell ">Yes</td>
231
+ <td class="govuk-table__cell">Yes</td>
232
232
 
233
- <td class="govuk-table__cell ">Type of `input` or `button` – `button`, `submit` or `reset`. Defaults to `submit`. This has no effect on `a` elements.</td>
233
+ <td class="govuk-table__cell">Type of `input` or `button` – `button`, `submit` or `reset`. Defaults to `submit`. This has no effect on `a` elements.</td>
234
234
 
235
235
  </tr>
236
236
 
@@ -238,11 +238,11 @@ If you are using Nunjucks,then macros take the following arguments
238
238
 
239
239
  <th class="govuk-table__header" scope="row">value</th>
240
240
 
241
- <td class="govuk-table__cell ">string</td>
241
+ <td class="govuk-table__cell">string</td>
242
242
 
243
- <td class="govuk-table__cell ">Yes</td>
243
+ <td class="govuk-table__cell">Yes</td>
244
244
 
245
- <td class="govuk-table__cell ">Value for the `button` tag. This has no effect on `a` or `input` elements.</td>
245
+ <td class="govuk-table__cell">Value for the `button` tag. This has no effect on `a` or `input` elements.</td>
246
246
 
247
247
  </tr>
248
248
 
@@ -250,11 +250,11 @@ If you are using Nunjucks,then macros take the following arguments
250
250
 
251
251
  <th class="govuk-table__header" scope="row">disabled</th>
252
252
 
253
- <td class="govuk-table__cell ">boolean</td>
253
+ <td class="govuk-table__cell">boolean</td>
254
254
 
255
- <td class="govuk-table__cell ">No</td>
255
+ <td class="govuk-table__cell">No</td>
256
256
 
257
- <td class="govuk-table__cell ">Whether the button should be disabled. For button and input elements, `disabled` and `aria-disabled` attributes will be set automatically.</td>
257
+ <td class="govuk-table__cell">Whether the button should be disabled. For button and input elements, `disabled` and `aria-disabled` attributes will be set automatically.</td>
258
258
 
259
259
  </tr>
260
260
 
@@ -262,11 +262,11 @@ If you are using Nunjucks,then macros take the following arguments
262
262
 
263
263
  <th class="govuk-table__header" scope="row">href</th>
264
264
 
265
- <td class="govuk-table__cell ">string</td>
265
+ <td class="govuk-table__cell">string</td>
266
266
 
267
- <td class="govuk-table__cell ">No</td>
267
+ <td class="govuk-table__cell">No</td>
268
268
 
269
- <td class="govuk-table__cell ">The URL that the button should link to. If this is set, `element` will be automatically set to `a` if it has not already been defined.</td>
269
+ <td class="govuk-table__cell">The URL that the button should link to. If this is set, `element` will be automatically set to `a` if it has not already been defined.</td>
270
270
 
271
271
  </tr>
272
272
 
@@ -274,11 +274,11 @@ If you are using Nunjucks,then macros take the following arguments
274
274
 
275
275
  <th class="govuk-table__header" scope="row">classes</th>
276
276
 
277
- <td class="govuk-table__cell ">string</td>
277
+ <td class="govuk-table__cell">string</td>
278
278
 
279
- <td class="govuk-table__cell ">No</td>
279
+ <td class="govuk-table__cell">No</td>
280
280
 
281
- <td class="govuk-table__cell ">Optional additional classes</td>
281
+ <td class="govuk-table__cell">Optional additional classes</td>
282
282
 
283
283
  </tr>
284
284
 
@@ -286,11 +286,11 @@ If you are using Nunjucks,then macros take the following arguments
286
286
 
287
287
  <th class="govuk-table__header" scope="row">attributes</th>
288
288
 
289
- <td class="govuk-table__cell ">object</td>
289
+ <td class="govuk-table__cell">object</td>
290
290
 
291
- <td class="govuk-table__cell ">No</td>
291
+ <td class="govuk-table__cell">No</td>
292
292
 
293
- <td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the button component.</td>
293
+ <td class="govuk-table__cell">Any extra HTML attributes (for example data attributes) to add to the button component.</td>
294
294
 
295
295
  </tr>
296
296