govuk_publishing_components 12.8.0 → 12.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/views/govuk_publishing_components/components/_checkboxes.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/docs/checkboxes.yml +13 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/all.js +161 -1
- data/node_modules/govuk-frontend/components/back-link/README.md +3 -77
- data/node_modules/govuk-frontend/components/breadcrumbs/README.md +3 -101
- data/node_modules/govuk-frontend/components/button/README.md +3 -137
- data/node_modules/govuk-frontend/components/character-count/README.md +3 -149
- data/node_modules/govuk-frontend/components/character-count/character-count.js +1 -1
- data/node_modules/govuk-frontend/components/checkboxes/README.md +3 -257
- data/node_modules/govuk-frontend/components/checkboxes/checkboxes.js +1 -1
- data/node_modules/govuk-frontend/components/checkboxes/template.njk +5 -0
- data/node_modules/govuk-frontend/components/date-input/README.md +3 -173
- data/node_modules/govuk-frontend/components/date-input/macro-options.json +14 -0
- data/node_modules/govuk-frontend/components/date-input/template.njk +1 -1
- data/node_modules/govuk-frontend/components/details/README.md +3 -101
- data/node_modules/govuk-frontend/components/error-message/README.md +3 -77
- data/node_modules/govuk-frontend/components/error-summary/README.md +3 -125
- data/node_modules/govuk-frontend/components/error-summary/error-summary.js +405 -87
- data/node_modules/govuk-frontend/components/fieldset/README.md +3 -113
- data/node_modules/govuk-frontend/components/file-upload/README.md +3 -125
- data/node_modules/govuk-frontend/components/file-upload/macro-options.json +14 -0
- data/node_modules/govuk-frontend/components/file-upload/template.njk +1 -1
- data/node_modules/govuk-frontend/components/footer/README.md +3 -233
- data/node_modules/govuk-frontend/components/header/README.md +3 -197
- data/node_modules/govuk-frontend/components/hint/README.md +3 -77
- data/node_modules/govuk-frontend/components/input/README.md +3 -137
- data/node_modules/govuk-frontend/components/input/macro-options.json +14 -0
- data/node_modules/govuk-frontend/components/input/template.njk +1 -1
- data/node_modules/govuk-frontend/components/inset-text/README.md +7 -77
- data/node_modules/govuk-frontend/components/label/README.md +3 -89
- data/node_modules/govuk-frontend/components/panel/README.md +3 -89
- data/node_modules/govuk-frontend/components/phase-banner/README.md +3 -77
- data/node_modules/govuk-frontend/components/radios/README.md +3 -269
- data/node_modules/govuk-frontend/components/radios/radios.js +1 -1
- data/node_modules/govuk-frontend/components/select/README.md +3 -185
- data/node_modules/govuk-frontend/components/select/macro-options.json +14 -0
- data/node_modules/govuk-frontend/components/select/template.njk +1 -1
- data/node_modules/govuk-frontend/components/skip-link/README.md +3 -77
- data/node_modules/govuk-frontend/components/table/README.md +3 -233
- data/node_modules/govuk-frontend/components/tabs/README.md +3 -149
- data/node_modules/govuk-frontend/components/tabs/tabs.js +111 -111
- data/node_modules/govuk-frontend/components/tag/README.md +3 -65
- data/node_modules/govuk-frontend/components/textarea/README.md +3 -149
- data/node_modules/govuk-frontend/components/textarea/macro-options.json +14 -0
- data/node_modules/govuk-frontend/components/textarea/template.njk +1 -1
- data/node_modules/govuk-frontend/components/warning-text/README.md +3 -77
- data/node_modules/govuk-frontend/package.json +11 -11
- data/node_modules/govuk-frontend/vendor/polyfills/Element/prototype/classList.js +141 -1
- data/node_modules/govuk-frontend/vendor/polyfills/Element/prototype/closest.js +54 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Element/prototype/matches.js +31 -0
- metadata +4 -2
@@ -937,7 +937,7 @@ if (detect) return
|
|
937
937
|
|
938
938
|
if (detect) return
|
939
939
|
|
940
|
-
// Polyfill from https://
|
940
|
+
// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Element.prototype.classList&flags=always
|
941
941
|
(function (global) {
|
942
942
|
var dpSupport = true;
|
943
943
|
var defineGetter = function (object, name, fn, configurable) {
|
@@ -243,193 +243,11 @@ In order to include the images used in the components, you need to configure you
|
|
243
243
|
|
244
244
|
app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets')))
|
245
245
|
|
246
|
-
## Component
|
246
|
+
## Component options
|
247
247
|
|
248
|
-
|
248
|
+
Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
|
249
249
|
|
250
|
-
|
251
|
-
|
252
|
-
<table class="govuk-table">
|
253
|
-
|
254
|
-
<thead class="govuk-table__head">
|
255
|
-
|
256
|
-
<tr class="govuk-table__row">
|
257
|
-
|
258
|
-
<th class="govuk-table__header" scope="col">Name</th>
|
259
|
-
|
260
|
-
<th class="govuk-table__header" scope="col">Type</th>
|
261
|
-
|
262
|
-
<th class="govuk-table__header" scope="col">Required</th>
|
263
|
-
|
264
|
-
<th class="govuk-table__header" scope="col">Description</th>
|
265
|
-
|
266
|
-
</tr>
|
267
|
-
|
268
|
-
</thead>
|
269
|
-
|
270
|
-
<tbody class="govuk-table__body">
|
271
|
-
|
272
|
-
<tr class="govuk-table__row">
|
273
|
-
|
274
|
-
<th class="govuk-table__header" scope="row">id</th>
|
275
|
-
|
276
|
-
<td class="govuk-table__cell">string</td>
|
277
|
-
|
278
|
-
<td class="govuk-table__cell">Yes</td>
|
279
|
-
|
280
|
-
<td class="govuk-table__cell">Id for each select box</td>
|
281
|
-
|
282
|
-
</tr>
|
283
|
-
|
284
|
-
<tr class="govuk-table__row">
|
285
|
-
|
286
|
-
<th class="govuk-table__header" scope="row">name</th>
|
287
|
-
|
288
|
-
<td class="govuk-table__cell">string</td>
|
289
|
-
|
290
|
-
<td class="govuk-table__cell">Yes</td>
|
291
|
-
|
292
|
-
<td class="govuk-table__cell">Name property for the select.</td>
|
293
|
-
|
294
|
-
</tr>
|
295
|
-
|
296
|
-
<tr class="govuk-table__row">
|
297
|
-
|
298
|
-
<th class="govuk-table__header" scope="row">items</th>
|
299
|
-
|
300
|
-
<td class="govuk-table__cell">array</td>
|
301
|
-
|
302
|
-
<td class="govuk-table__cell">Yes</td>
|
303
|
-
|
304
|
-
<td class="govuk-table__cell">Array of option items for the select.</td>
|
305
|
-
|
306
|
-
</tr>
|
307
|
-
|
308
|
-
<tr class="govuk-table__row">
|
309
|
-
|
310
|
-
<th class="govuk-table__header" scope="row">item.value</th>
|
311
|
-
|
312
|
-
<td class="govuk-table__cell">string</td>
|
313
|
-
|
314
|
-
<td class="govuk-table__cell">No</td>
|
315
|
-
|
316
|
-
<td class="govuk-table__cell">Value for the option item.</td>
|
317
|
-
|
318
|
-
</tr>
|
319
|
-
|
320
|
-
<tr class="govuk-table__row">
|
321
|
-
|
322
|
-
<th class="govuk-table__header" scope="row">item.text</th>
|
323
|
-
|
324
|
-
<td class="govuk-table__cell">string</td>
|
325
|
-
|
326
|
-
<td class="govuk-table__cell">Yes</td>
|
327
|
-
|
328
|
-
<td class="govuk-table__cell">Text for the option item.</td>
|
329
|
-
|
330
|
-
</tr>
|
331
|
-
|
332
|
-
<tr class="govuk-table__row">
|
333
|
-
|
334
|
-
<th class="govuk-table__header" scope="row">item.selected</th>
|
335
|
-
|
336
|
-
<td class="govuk-table__cell">boolean</td>
|
337
|
-
|
338
|
-
<td class="govuk-table__cell">No</td>
|
339
|
-
|
340
|
-
<td class="govuk-table__cell">Sets the option as the selected.</td>
|
341
|
-
|
342
|
-
</tr>
|
343
|
-
|
344
|
-
<tr class="govuk-table__row">
|
345
|
-
|
346
|
-
<th class="govuk-table__header" scope="row">item.disabled</th>
|
347
|
-
|
348
|
-
<td class="govuk-table__cell">boolean</td>
|
349
|
-
|
350
|
-
<td class="govuk-table__cell">No</td>
|
351
|
-
|
352
|
-
<td class="govuk-table__cell">Sets the option item as disabled.</td>
|
353
|
-
|
354
|
-
</tr>
|
355
|
-
|
356
|
-
<tr class="govuk-table__row">
|
357
|
-
|
358
|
-
<th class="govuk-table__header" scope="row">item.attributes</th>
|
359
|
-
|
360
|
-
<td class="govuk-table__cell">object</td>
|
361
|
-
|
362
|
-
<td class="govuk-table__cell">No</td>
|
363
|
-
|
364
|
-
<td class="govuk-table__cell">Any extra HTML attributes (for example data attributes) to the select option tag.</td>
|
365
|
-
|
366
|
-
</tr>
|
367
|
-
|
368
|
-
<tr class="govuk-table__row">
|
369
|
-
|
370
|
-
<th class="govuk-table__header" scope="row">label</th>
|
371
|
-
|
372
|
-
<td class="govuk-table__cell">object</td>
|
373
|
-
|
374
|
-
<td class="govuk-table__cell">No</td>
|
375
|
-
|
376
|
-
<td class="govuk-table__cell">Optional label text or HTML by specifying value for either text or html keys. See <a href="../label/README.md#component-arguments">label</a> component.</td>
|
377
|
-
|
378
|
-
</tr>
|
379
|
-
|
380
|
-
<tr class="govuk-table__row">
|
381
|
-
|
382
|
-
<th class="govuk-table__header" scope="row">hint</th>
|
383
|
-
|
384
|
-
<td class="govuk-table__cell">object</td>
|
385
|
-
|
386
|
-
<td class="govuk-table__cell">No</td>
|
387
|
-
|
388
|
-
<td class="govuk-table__cell">Arguments for the hint component (e.g. text). See <a href="../hint/README.md#component-arguments">hint</a> component.</td>
|
389
|
-
|
390
|
-
</tr>
|
391
|
-
|
392
|
-
<tr class="govuk-table__row">
|
393
|
-
|
394
|
-
<th class="govuk-table__header" scope="row">errorMessage</th>
|
395
|
-
|
396
|
-
<td class="govuk-table__cell">object</td>
|
397
|
-
|
398
|
-
<td class="govuk-table__cell">No</td>
|
399
|
-
|
400
|
-
<td class="govuk-table__cell">Arguments for the errorMessage component (e.g. text). See <a href="../error-message/README.md#component-arguments">errorMessage</a> component.</td>
|
401
|
-
|
402
|
-
</tr>
|
403
|
-
|
404
|
-
<tr class="govuk-table__row">
|
405
|
-
|
406
|
-
<th class="govuk-table__header" scope="row">classes</th>
|
407
|
-
|
408
|
-
<td class="govuk-table__cell">string</td>
|
409
|
-
|
410
|
-
<td class="govuk-table__cell">No</td>
|
411
|
-
|
412
|
-
<td class="govuk-table__cell">Optional additional classes to add to the select component.</td>
|
413
|
-
|
414
|
-
</tr>
|
415
|
-
|
416
|
-
<tr class="govuk-table__row">
|
417
|
-
|
418
|
-
<th class="govuk-table__header" scope="row">attributes</th>
|
419
|
-
|
420
|
-
<td class="govuk-table__cell">object</td>
|
421
|
-
|
422
|
-
<td class="govuk-table__cell">No</td>
|
423
|
-
|
424
|
-
<td class="govuk-table__cell">Any extra HTML attributes (for example data attributes) to add to the select component.</td>
|
425
|
-
|
426
|
-
</tr>
|
427
|
-
|
428
|
-
</tbody>
|
429
|
-
|
430
|
-
</table>
|
431
|
-
|
432
|
-
**If you’re using Nunjucks macros in production be aware that using `html` arguments, or ones ending with `Html` can be a [security risk](https://en.wikipedia.org/wiki/Cross-site_scripting). More about it in the [Nunjucks documentation](https://mozilla.github.io/nunjucks/api.html#user-defined-templates-warning).**
|
250
|
+
See [options table](https://design-system.service.gov.uk/components/select/#options-example-default) for details.
|
433
251
|
|
434
252
|
### Setting up Nunjucks views and paths
|
435
253
|
|
@@ -64,6 +64,20 @@
|
|
64
64
|
"description": "Options for the errorMessage component (e.g. text).",
|
65
65
|
"isComponent": true
|
66
66
|
},
|
67
|
+
{
|
68
|
+
"name": "formGroup",
|
69
|
+
"type": "object",
|
70
|
+
"required": false,
|
71
|
+
"description": "Options for the form-group wrapper",
|
72
|
+
"params": [
|
73
|
+
{
|
74
|
+
"name": "classes",
|
75
|
+
"type": "string",
|
76
|
+
"required": false,
|
77
|
+
"description": "Optional classes to add to the form group (e.g. to show error state for the whole group)"
|
78
|
+
}
|
79
|
+
]
|
80
|
+
},
|
67
81
|
{
|
68
82
|
"name": "classes",
|
69
83
|
"type": "string",
|
@@ -5,7 +5,7 @@
|
|
5
5
|
{#- a record of other elements that we need to associate with the input using
|
6
6
|
aria-describedby – for example hints or error messages -#}
|
7
7
|
{% set describedBy = "" %}
|
8
|
-
<div class="govuk-form-group {%- if params.errorMessage %} govuk-form-group--error{% endif %}">
|
8
|
+
<div class="govuk-form-group {%- if params.errorMessage %} govuk-form-group--error{% endif %} {%- if params.formGroup.classes %} {{ params.formGroup.classes }}{% endif %}">
|
9
9
|
{{ govukLabel({
|
10
10
|
html: params.label.html,
|
11
11
|
text: params.label.text,
|
@@ -43,85 +43,11 @@ In order to include the images used in the components, you need to configure you
|
|
43
43
|
|
44
44
|
app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets')))
|
45
45
|
|
46
|
-
## Component
|
46
|
+
## Component options
|
47
47
|
|
48
|
-
|
48
|
+
Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
|
49
49
|
|
50
|
-
|
51
|
-
|
52
|
-
<table class="govuk-table">
|
53
|
-
|
54
|
-
<thead class="govuk-table__head">
|
55
|
-
|
56
|
-
<tr class="govuk-table__row">
|
57
|
-
|
58
|
-
<th class="govuk-table__header" scope="col">Name</th>
|
59
|
-
|
60
|
-
<th class="govuk-table__header" scope="col">Type</th>
|
61
|
-
|
62
|
-
<th class="govuk-table__header" scope="col">Required</th>
|
63
|
-
|
64
|
-
<th class="govuk-table__header" scope="col">Description</th>
|
65
|
-
|
66
|
-
</tr>
|
67
|
-
|
68
|
-
</thead>
|
69
|
-
|
70
|
-
<tbody class="govuk-table__body">
|
71
|
-
|
72
|
-
<tr class="govuk-table__row">
|
73
|
-
|
74
|
-
<th class="govuk-table__header" scope="row">text (or) html</th>
|
75
|
-
|
76
|
-
<td class="govuk-table__cell">string</td>
|
77
|
-
|
78
|
-
<td class="govuk-table__cell">No</td>
|
79
|
-
|
80
|
-
<td class="govuk-table__cell">Text or HTML to use within the skip link. If `html` is provided, the `text` argument will be ignored.</td>
|
81
|
-
|
82
|
-
</tr>
|
83
|
-
|
84
|
-
<tr class="govuk-table__row">
|
85
|
-
|
86
|
-
<th class="govuk-table__header" scope="row">href</th>
|
87
|
-
|
88
|
-
<td class="govuk-table__cell">string</td>
|
89
|
-
|
90
|
-
<td class="govuk-table__cell">Yes</td>
|
91
|
-
|
92
|
-
<td class="govuk-table__cell">The value of the skip link href attribute. Defaults to #content</td>
|
93
|
-
|
94
|
-
</tr>
|
95
|
-
|
96
|
-
<tr class="govuk-table__row">
|
97
|
-
|
98
|
-
<th class="govuk-table__header" scope="row">classes</th>
|
99
|
-
|
100
|
-
<td class="govuk-table__cell">string</td>
|
101
|
-
|
102
|
-
<td class="govuk-table__cell">No</td>
|
103
|
-
|
104
|
-
<td class="govuk-table__cell">Optional additional classes to add to the skip link.</td>
|
105
|
-
|
106
|
-
</tr>
|
107
|
-
|
108
|
-
<tr class="govuk-table__row">
|
109
|
-
|
110
|
-
<th class="govuk-table__header" scope="row">attributes</th>
|
111
|
-
|
112
|
-
<td class="govuk-table__cell">object</td>
|
113
|
-
|
114
|
-
<td class="govuk-table__cell">No</td>
|
115
|
-
|
116
|
-
<td class="govuk-table__cell">Any extra HTML attributes (for example data attributes) to add to the skip link.</td>
|
117
|
-
|
118
|
-
</tr>
|
119
|
-
|
120
|
-
</tbody>
|
121
|
-
|
122
|
-
</table>
|
123
|
-
|
124
|
-
**If you’re using Nunjucks macros in production be aware that using `html` arguments, or ones ending with `Html` can be a [security risk](https://en.wikipedia.org/wiki/Cross-site_scripting). More about it in the [Nunjucks documentation](https://mozilla.github.io/nunjucks/api.html#user-defined-templates-warning).**
|
50
|
+
See [options table](https://design-system.service.gov.uk/components/skip-link/#options-example-default) for details.
|
125
51
|
|
126
52
|
### Setting up Nunjucks views and paths
|
127
53
|
|
@@ -354,241 +354,11 @@ In order to include the images used in the components, you need to configure you
|
|
354
354
|
|
355
355
|
app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets')))
|
356
356
|
|
357
|
-
## Component
|
357
|
+
## Component options
|
358
358
|
|
359
|
-
|
359
|
+
Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
|
360
360
|
|
361
|
-
|
362
|
-
|
363
|
-
<table class="govuk-table">
|
364
|
-
|
365
|
-
<thead class="govuk-table__head">
|
366
|
-
|
367
|
-
<tr class="govuk-table__row">
|
368
|
-
|
369
|
-
<th class="govuk-table__header" scope="col">Name</th>
|
370
|
-
|
371
|
-
<th class="govuk-table__header" scope="col">format</th>
|
372
|
-
|
373
|
-
<th class="govuk-table__header" scope="col">Required</th>
|
374
|
-
|
375
|
-
<th class="govuk-table__header" scope="col">Description</th>
|
376
|
-
|
377
|
-
</tr>
|
378
|
-
|
379
|
-
</thead>
|
380
|
-
|
381
|
-
<tbody class="govuk-table__body">
|
382
|
-
|
383
|
-
<tr class="govuk-table__row">
|
384
|
-
|
385
|
-
<th class="govuk-table__header" scope="row">rows</th>
|
386
|
-
|
387
|
-
<td class="govuk-table__cell">array</td>
|
388
|
-
|
389
|
-
<td class="govuk-table__cell">Yes</td>
|
390
|
-
|
391
|
-
<td class="govuk-table__cell">Array of table rows and cells.</td>
|
392
|
-
|
393
|
-
</tr>
|
394
|
-
|
395
|
-
<tr class="govuk-table__row">
|
396
|
-
|
397
|
-
<th class="govuk-table__header" scope="row">rows.[].text (or) rows.[].html</th>
|
398
|
-
|
399
|
-
<td class="govuk-table__cell">string</td>
|
400
|
-
|
401
|
-
<td class="govuk-table__cell">Yes</td>
|
402
|
-
|
403
|
-
<td class="govuk-table__cell">Text or HTML for cells in table rows. If `html` is specified, the `text` argument will be ignored.</td>
|
404
|
-
|
405
|
-
</tr>
|
406
|
-
|
407
|
-
<tr class="govuk-table__row">
|
408
|
-
|
409
|
-
<th class="govuk-table__header" scope="row">rows.[].format</th>
|
410
|
-
|
411
|
-
<td class="govuk-table__cell">string</td>
|
412
|
-
|
413
|
-
<td class="govuk-table__cell">No</td>
|
414
|
-
|
415
|
-
<td class="govuk-table__cell">Specify format of a cell. Currently we only use "numeric".</td>
|
416
|
-
|
417
|
-
</tr>
|
418
|
-
|
419
|
-
<tr class="govuk-table__row">
|
420
|
-
|
421
|
-
<th class="govuk-table__header" scope="row">rows.[].colspan</th>
|
422
|
-
|
423
|
-
<td class="govuk-table__cell">number</td>
|
424
|
-
|
425
|
-
<td class="govuk-table__cell">No</td>
|
426
|
-
|
427
|
-
<td class="govuk-table__cell">Specify how many columns a cell extends.</td>
|
428
|
-
|
429
|
-
</tr>
|
430
|
-
|
431
|
-
<tr class="govuk-table__row">
|
432
|
-
|
433
|
-
<th class="govuk-table__header" scope="row">rows.[].rowspan</th>
|
434
|
-
|
435
|
-
<td class="govuk-table__cell">number</td>
|
436
|
-
|
437
|
-
<td class="govuk-table__cell">No</td>
|
438
|
-
|
439
|
-
<td class="govuk-table__cell">Specify how many rows a cell extends.</td>
|
440
|
-
|
441
|
-
</tr>
|
442
|
-
|
443
|
-
<tr class="govuk-table__row">
|
444
|
-
|
445
|
-
<th class="govuk-table__header" scope="row">rows.[].attributes</th>
|
446
|
-
|
447
|
-
<td class="govuk-table__cell">object</td>
|
448
|
-
|
449
|
-
<td class="govuk-table__cell">No</td>
|
450
|
-
|
451
|
-
<td class="govuk-table__cell">Any extra HTML attributes (for example data attributes) to add to the cell.</td>
|
452
|
-
|
453
|
-
</tr>
|
454
|
-
|
455
|
-
<tr class="govuk-table__row">
|
456
|
-
|
457
|
-
<th class="govuk-table__header" scope="row">head</th>
|
458
|
-
|
459
|
-
<td class="govuk-table__cell">array</td>
|
460
|
-
|
461
|
-
<td class="govuk-table__cell">No</td>
|
462
|
-
|
463
|
-
<td class="govuk-table__cell">Optional array of table head cells.</td>
|
464
|
-
|
465
|
-
</tr>
|
466
|
-
|
467
|
-
<tr class="govuk-table__row">
|
468
|
-
|
469
|
-
<th class="govuk-table__header" scope="row">head.[].text or head.[].html</th>
|
470
|
-
|
471
|
-
<td class="govuk-table__cell">array</td>
|
472
|
-
|
473
|
-
<td class="govuk-table__cell">No</td>
|
474
|
-
|
475
|
-
<td class="govuk-table__cell">Optional array of table head cells. If `html` is specified, the `text` argument will be ignored.</td>
|
476
|
-
|
477
|
-
</tr>
|
478
|
-
|
479
|
-
<tr class="govuk-table__row">
|
480
|
-
|
481
|
-
<th class="govuk-table__header" scope="row">head.[].colspan</th>
|
482
|
-
|
483
|
-
<td class="govuk-table__cell">number</td>
|
484
|
-
|
485
|
-
<td class="govuk-table__cell">No</td>
|
486
|
-
|
487
|
-
<td class="govuk-table__cell">Specify how many columns a cell extends.</td>
|
488
|
-
|
489
|
-
</tr>
|
490
|
-
|
491
|
-
<tr class="govuk-table__row">
|
492
|
-
|
493
|
-
<th class="govuk-table__header" scope="row">head.[].rowspan</th>
|
494
|
-
|
495
|
-
<td class="govuk-table__cell">number</td>
|
496
|
-
|
497
|
-
<td class="govuk-table__cell">No</td>
|
498
|
-
|
499
|
-
<td class="govuk-table__cell">Specify how many rows a cell extends.</td>
|
500
|
-
|
501
|
-
</tr>
|
502
|
-
|
503
|
-
<tr class="govuk-table__row">
|
504
|
-
|
505
|
-
<th class="govuk-table__header" scope="row">head.[].format</th>
|
506
|
-
|
507
|
-
<td class="govuk-table__cell">string</td>
|
508
|
-
|
509
|
-
<td class="govuk-table__cell">No</td>
|
510
|
-
|
511
|
-
<td class="govuk-table__cell">Specify format of a cell. Currently we only use "numeric".</td>
|
512
|
-
|
513
|
-
</tr>
|
514
|
-
|
515
|
-
<tr class="govuk-table__row">
|
516
|
-
|
517
|
-
<th class="govuk-table__header" scope="row">head.[].attributes</th>
|
518
|
-
|
519
|
-
<td class="govuk-table__cell">object</td>
|
520
|
-
|
521
|
-
<td class="govuk-table__cell">No</td>
|
522
|
-
|
523
|
-
<td class="govuk-table__cell">Any extra HTML attributes (for example data attributes) to add to the cell.</td>
|
524
|
-
|
525
|
-
</tr>
|
526
|
-
|
527
|
-
<tr class="govuk-table__row">
|
528
|
-
|
529
|
-
<th class="govuk-table__header" scope="row">caption</th>
|
530
|
-
|
531
|
-
<td class="govuk-table__cell">string</td>
|
532
|
-
|
533
|
-
<td class="govuk-table__cell">No</td>
|
534
|
-
|
535
|
-
<td class="govuk-table__cell">Optional caption text.</td>
|
536
|
-
|
537
|
-
</tr>
|
538
|
-
|
539
|
-
<tr class="govuk-table__row">
|
540
|
-
|
541
|
-
<th class="govuk-table__header" scope="row">captionClasses</th>
|
542
|
-
|
543
|
-
<td class="govuk-table__cell">string</td>
|
544
|
-
|
545
|
-
<td class="govuk-table__cell">No</td>
|
546
|
-
|
547
|
-
<td class="govuk-table__cell">Optional classes for caption text size. Class should correspond to the available typography heading classes.</td>
|
548
|
-
|
549
|
-
</tr>
|
550
|
-
|
551
|
-
<tr class="govuk-table__row">
|
552
|
-
|
553
|
-
<th class="govuk-table__header" scope="row">firstCellIsHeader</th>
|
554
|
-
|
555
|
-
<td class="govuk-table__cell">boolean</td>
|
556
|
-
|
557
|
-
<td class="govuk-table__cell">No</td>
|
558
|
-
|
559
|
-
<td class="govuk-table__cell">If set to true, first cell in table row will be a TH instead of a TD.</td>
|
560
|
-
|
561
|
-
</tr>
|
562
|
-
|
563
|
-
<tr class="govuk-table__row">
|
564
|
-
|
565
|
-
<th class="govuk-table__header" scope="row">classes</th>
|
566
|
-
|
567
|
-
<td class="govuk-table__cell">string</td>
|
568
|
-
|
569
|
-
<td class="govuk-table__cell">No</td>
|
570
|
-
|
571
|
-
<td class="govuk-table__cell">Optional additional classes to add to the table container.</td>
|
572
|
-
|
573
|
-
</tr>
|
574
|
-
|
575
|
-
<tr class="govuk-table__row">
|
576
|
-
|
577
|
-
<th class="govuk-table__header" scope="row">attributes</th>
|
578
|
-
|
579
|
-
<td class="govuk-table__cell">object</td>
|
580
|
-
|
581
|
-
<td class="govuk-table__cell">No</td>
|
582
|
-
|
583
|
-
<td class="govuk-table__cell">Any extra HTML attributes (for example data attributes) to add to the table container.</td>
|
584
|
-
|
585
|
-
</tr>
|
586
|
-
|
587
|
-
</tbody>
|
588
|
-
|
589
|
-
</table>
|
590
|
-
|
591
|
-
**If you’re using Nunjucks macros in production be aware that using `html` arguments, or ones ending with `Html` can be a [security risk](https://en.wikipedia.org/wiki/Cross-site_scripting). More about it in the [Nunjucks documentation](https://mozilla.github.io/nunjucks/api.html#user-defined-templates-warning).**
|
361
|
+
See [options table](https://design-system.service.gov.uk/components/table/#options-example-default) for details.
|
592
362
|
|
593
363
|
### Setting up Nunjucks views and paths
|
594
364
|
|