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.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/app/views/govuk_publishing_components/components/_checkboxes.html.erb +1 -0
  3. data/app/views/govuk_publishing_components/components/docs/checkboxes.yml +13 -0
  4. data/lib/govuk_publishing_components/version.rb +1 -1
  5. data/node_modules/govuk-frontend/all.js +161 -1
  6. data/node_modules/govuk-frontend/components/back-link/README.md +3 -77
  7. data/node_modules/govuk-frontend/components/breadcrumbs/README.md +3 -101
  8. data/node_modules/govuk-frontend/components/button/README.md +3 -137
  9. data/node_modules/govuk-frontend/components/character-count/README.md +3 -149
  10. data/node_modules/govuk-frontend/components/character-count/character-count.js +1 -1
  11. data/node_modules/govuk-frontend/components/checkboxes/README.md +3 -257
  12. data/node_modules/govuk-frontend/components/checkboxes/checkboxes.js +1 -1
  13. data/node_modules/govuk-frontend/components/checkboxes/template.njk +5 -0
  14. data/node_modules/govuk-frontend/components/date-input/README.md +3 -173
  15. data/node_modules/govuk-frontend/components/date-input/macro-options.json +14 -0
  16. data/node_modules/govuk-frontend/components/date-input/template.njk +1 -1
  17. data/node_modules/govuk-frontend/components/details/README.md +3 -101
  18. data/node_modules/govuk-frontend/components/error-message/README.md +3 -77
  19. data/node_modules/govuk-frontend/components/error-summary/README.md +3 -125
  20. data/node_modules/govuk-frontend/components/error-summary/error-summary.js +405 -87
  21. data/node_modules/govuk-frontend/components/fieldset/README.md +3 -113
  22. data/node_modules/govuk-frontend/components/file-upload/README.md +3 -125
  23. data/node_modules/govuk-frontend/components/file-upload/macro-options.json +14 -0
  24. data/node_modules/govuk-frontend/components/file-upload/template.njk +1 -1
  25. data/node_modules/govuk-frontend/components/footer/README.md +3 -233
  26. data/node_modules/govuk-frontend/components/header/README.md +3 -197
  27. data/node_modules/govuk-frontend/components/hint/README.md +3 -77
  28. data/node_modules/govuk-frontend/components/input/README.md +3 -137
  29. data/node_modules/govuk-frontend/components/input/macro-options.json +14 -0
  30. data/node_modules/govuk-frontend/components/input/template.njk +1 -1
  31. data/node_modules/govuk-frontend/components/inset-text/README.md +7 -77
  32. data/node_modules/govuk-frontend/components/label/README.md +3 -89
  33. data/node_modules/govuk-frontend/components/panel/README.md +3 -89
  34. data/node_modules/govuk-frontend/components/phase-banner/README.md +3 -77
  35. data/node_modules/govuk-frontend/components/radios/README.md +3 -269
  36. data/node_modules/govuk-frontend/components/radios/radios.js +1 -1
  37. data/node_modules/govuk-frontend/components/select/README.md +3 -185
  38. data/node_modules/govuk-frontend/components/select/macro-options.json +14 -0
  39. data/node_modules/govuk-frontend/components/select/template.njk +1 -1
  40. data/node_modules/govuk-frontend/components/skip-link/README.md +3 -77
  41. data/node_modules/govuk-frontend/components/table/README.md +3 -233
  42. data/node_modules/govuk-frontend/components/tabs/README.md +3 -149
  43. data/node_modules/govuk-frontend/components/tabs/tabs.js +111 -111
  44. data/node_modules/govuk-frontend/components/tag/README.md +3 -65
  45. data/node_modules/govuk-frontend/components/textarea/README.md +3 -149
  46. data/node_modules/govuk-frontend/components/textarea/macro-options.json +14 -0
  47. data/node_modules/govuk-frontend/components/textarea/template.njk +1 -1
  48. data/node_modules/govuk-frontend/components/warning-text/README.md +3 -77
  49. data/node_modules/govuk-frontend/package.json +11 -11
  50. data/node_modules/govuk-frontend/vendor/polyfills/Element/prototype/classList.js +141 -1
  51. data/node_modules/govuk-frontend/vendor/polyfills/Element/prototype/closest.js +54 -0
  52. data/node_modules/govuk-frontend/vendor/polyfills/Element/prototype/matches.js +31 -0
  53. metadata +4 -2
@@ -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,
@@ -4,6 +4,10 @@
4
4
 
5
5
  Use bordered inset text to draw attention to important content on the page.
6
6
 
7
+ ## Guidance
8
+
9
+ Find out when to use the inset text component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/inset-text).
10
+
7
11
  ## Quick start examples
8
12
 
9
13
  ### Inset text
@@ -58,85 +62,11 @@ In order to include the images used in the components, you need to configure you
58
62
 
59
63
  app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets')))
60
64
 
61
- ## Component arguments
62
-
63
- If you are using Nunjucks,then macros take the following arguments
64
-
65
- **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).**
66
-
67
- <table class="govuk-table">
68
-
69
- <thead class="govuk-table__head">
70
-
71
- <tr class="govuk-table__row">
72
-
73
- <th class="govuk-table__header" scope="col">Name</th>
74
-
75
- <th class="govuk-table__header" scope="col">Type</th>
76
-
77
- <th class="govuk-table__header" scope="col">Required</th>
78
-
79
- <th class="govuk-table__header" scope="col">Description</th>
80
-
81
- </tr>
82
-
83
- </thead>
84
-
85
- <tbody class="govuk-table__body">
86
-
87
- <tr class="govuk-table__row">
88
-
89
- <th class="govuk-table__header" scope="row">text (or) html</th>
90
-
91
- <td class="govuk-table__cell">string</td>
92
-
93
- <td class="govuk-table__cell">Yes</td>
94
-
95
- <td class="govuk-table__cell">Text or HTML to use within the inset text. If `html` is provided, the `text` argument will be ignored.</td>
96
-
97
- </tr>
98
-
99
- <tr class="govuk-table__row">
100
-
101
- <th class="govuk-table__header" scope="row">id</th>
102
-
103
- <td class="govuk-table__cell">string</td>
104
-
105
- <td class="govuk-table__cell">No</td>
106
-
107
- <td class="govuk-table__cell">Optional id attribute to add to the inset text container.</td>
108
-
109
- </tr>
110
-
111
- <tr class="govuk-table__row">
112
-
113
- <th class="govuk-table__header" scope="row">classes</th>
114
-
115
- <td class="govuk-table__cell">string</td>
116
-
117
- <td class="govuk-table__cell">No</td>
118
-
119
- <td class="govuk-table__cell">Optional additional classes to add to the inset text container.</td>
120
-
121
- </tr>
122
-
123
- <tr class="govuk-table__row">
124
-
125
- <th class="govuk-table__header" scope="row">attributes</th>
126
-
127
- <td class="govuk-table__cell">object</td>
128
-
129
- <td class="govuk-table__cell">No</td>
130
-
131
- <td class="govuk-table__cell">Any extra HTML attributes (for example data attributes) to add to the inset text container.</td>
132
-
133
- </tr>
134
-
135
- </tbody>
65
+ ## Component options
136
66
 
137
- </table>
67
+ Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
138
68
 
139
- **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).**
69
+ See [options table](https://design-system.service.gov.uk/components/inset-text/#options-example-default) for details.
140
70
 
141
71
  ### Setting up Nunjucks views and paths
142
72
 
@@ -82,97 +82,11 @@ In order to include the images used in the components, you need to configure you
82
82
 
83
83
  app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets')))
84
84
 
85
- ## Component arguments
85
+ ## Component options
86
86
 
87
- If you are using Nunjucks,then macros take the following arguments
87
+ Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
88
88
 
89
- **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).**
90
-
91
- <table class="govuk-table">
92
-
93
- <thead class="govuk-table__head">
94
-
95
- <tr class="govuk-table__row">
96
-
97
- <th class="govuk-table__header" scope="col">Name</th>
98
-
99
- <th class="govuk-table__header" scope="col">Type</th>
100
-
101
- <th class="govuk-table__header" scope="col">Required</th>
102
-
103
- <th class="govuk-table__header" scope="col">Description</th>
104
-
105
- </tr>
106
-
107
- </thead>
108
-
109
- <tbody class="govuk-table__body">
110
-
111
- <tr class="govuk-table__row">
112
-
113
- <th class="govuk-table__header" scope="row">text (or) html</th>
114
-
115
- <td class="govuk-table__cell">string</td>
116
-
117
- <td class="govuk-table__cell">Yes</td>
118
-
119
- <td class="govuk-table__cell">Text or HTML to use within the label. If `html` is provided, the `text` argument will be ignored.</td>
120
-
121
- </tr>
122
-
123
- <tr class="govuk-table__row">
124
-
125
- <th class="govuk-table__header" scope="row">for</th>
126
-
127
- <td class="govuk-table__cell">string</td>
128
-
129
- <td class="govuk-table__cell">Yes</td>
130
-
131
- <td class="govuk-table__cell">The value of the for attribute, the id of the input the label is associated with.</td>
132
-
133
- </tr>
134
-
135
- <tr class="govuk-table__row">
136
-
137
- <th class="govuk-table__header" scope="row">isPageHeading</th>
138
-
139
- <td class="govuk-table__cell">boolean</td>
140
-
141
- <td class="govuk-table__cell">No</td>
142
-
143
- <td class="govuk-table__cell">Whether the label also acts as the heading for the page.</td>
144
-
145
- </tr>
146
-
147
- <tr class="govuk-table__row">
148
-
149
- <th class="govuk-table__header" scope="row">classes</th>
150
-
151
- <td class="govuk-table__cell">string</td>
152
-
153
- <td class="govuk-table__cell">No</td>
154
-
155
- <td class="govuk-table__cell">Optional additional classes to add to the label tag.</td>
156
-
157
- </tr>
158
-
159
- <tr class="govuk-table__row">
160
-
161
- <th class="govuk-table__header" scope="row">attributes</th>
162
-
163
- <td class="govuk-table__cell">object</td>
164
-
165
- <td class="govuk-table__cell">No</td>
166
-
167
- <td class="govuk-table__cell">Any extra HTML attributes (for example data attributes) to add to the label tag.</td>
168
-
169
- </tr>
170
-
171
- </tbody>
172
-
173
- </table>
174
-
175
- **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).**
89
+ See [options table](https://design-system.service.gov.uk/components/file-upload/#options-example-default--label) for details.
176
90
 
177
91
  ### Setting up Nunjucks views and paths
178
92
 
@@ -79,97 +79,11 @@ In order to include the images used in the components, you need to configure you
79
79
 
80
80
  app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets')))
81
81
 
82
- ## Component arguments
82
+ ## Component options
83
83
 
84
- If you are using Nunjucks,then macros take the following arguments
84
+ Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
85
85
 
86
- **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).**
87
-
88
- <table class="govuk-table">
89
-
90
- <thead class="govuk-table__head">
91
-
92
- <tr class="govuk-table__row">
93
-
94
- <th class="govuk-table__header" scope="col">Name</th>
95
-
96
- <th class="govuk-table__header" scope="col">Type</th>
97
-
98
- <th class="govuk-table__header" scope="col">Required</th>
99
-
100
- <th class="govuk-table__header" scope="col">Description</th>
101
-
102
- </tr>
103
-
104
- </thead>
105
-
106
- <tbody class="govuk-table__body">
107
-
108
- <tr class="govuk-table__row">
109
-
110
- <th class="govuk-table__header" scope="row">titleText (or) titleHtml</th>
111
-
112
- <td class="govuk-table__cell">string</td>
113
-
114
- <td class="govuk-table__cell">Yes</td>
115
-
116
- <td class="govuk-table__cell">Text or HTML for the panel title. If `titleHtml` is provided, the `titleText` argument is ignored.</td>
117
-
118
- </tr>
119
-
120
- <tr class="govuk-table__row">
121
-
122
- <th class="govuk-table__header" scope="row">headingLevel</th>
123
-
124
- <td class="govuk-table__cell">number</td>
125
-
126
- <td class="govuk-table__cell">no</td>
127
-
128
- <td class="govuk-table__cell">Optional heading level, from 1 to 6\. Default is 2.</td>
129
-
130
- </tr>
131
-
132
- <tr class="govuk-table__row">
133
-
134
- <th class="govuk-table__header" scope="row">text (or) html</th>
135
-
136
- <td class="govuk-table__cell">string</td>
137
-
138
- <td class="govuk-table__cell">No</td>
139
-
140
- <td class="govuk-table__cell">Text or HTML for the panel content. If `html` is provided, the `text` argument is ignored.</td>
141
-
142
- </tr>
143
-
144
- <tr class="govuk-table__row">
145
-
146
- <th class="govuk-table__header" scope="row">classes</th>
147
-
148
- <td class="govuk-table__cell">string</td>
149
-
150
- <td class="govuk-table__cell">No</td>
151
-
152
- <td class="govuk-table__cell">Optional additional classes to add to the panel container.</td>
153
-
154
- </tr>
155
-
156
- <tr class="govuk-table__row">
157
-
158
- <th class="govuk-table__header" scope="row">attributes</th>
159
-
160
- <td class="govuk-table__cell">object</td>
161
-
162
- <td class="govuk-table__cell">No</td>
163
-
164
- <td class="govuk-table__cell">Any extra HTML attributes (for example data attributes) to add to the panel container.</td>
165
-
166
- </tr>
167
-
168
- </tbody>
169
-
170
- </table>
171
-
172
- **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).**
86
+ See [options table](https://design-system.service.gov.uk/components/panel/#options-example-default) for details.
173
87
 
174
88
  ### Setting up Nunjucks views and paths
175
89
 
@@ -53,85 +53,11 @@ In order to include the images used in the components, you need to configure you
53
53
 
54
54
  app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets')))
55
55
 
56
- ## Component arguments
56
+ ## Component options
57
57
 
58
- If you are using Nunjucks,then macros take the following arguments
58
+ Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
59
59
 
60
- **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).**
61
-
62
- <table class="govuk-table">
63
-
64
- <thead class="govuk-table__head">
65
-
66
- <tr class="govuk-table__row">
67
-
68
- <th class="govuk-table__header" scope="col">Name</th>
69
-
70
- <th class="govuk-table__header" scope="col">Type</th>
71
-
72
- <th class="govuk-table__header" scope="col">Required</th>
73
-
74
- <th class="govuk-table__header" scope="col">Description</th>
75
-
76
- </tr>
77
-
78
- </thead>
79
-
80
- <tbody class="govuk-table__body">
81
-
82
- <tr class="govuk-table__row">
83
-
84
- <th class="govuk-table__header" scope="row">text (or) html</th>
85
-
86
- <td class="govuk-table__cell">string</td>
87
-
88
- <td class="govuk-table__cell">Yes</td>
89
-
90
- <td class="govuk-table__cell">HTML to use for the phase-banner message. If `html` is provided, the `text` argument will be ignored.</td>
91
-
92
- </tr>
93
-
94
- <tr class="govuk-table__row">
95
-
96
- <th class="govuk-table__header" scope="row">tag</th>
97
-
98
- <td class="govuk-table__cell">object</td>
99
-
100
- <td class="govuk-table__cell">No</td>
101
-
102
- <td class="govuk-table__cell">Arguments for the tag object. See <a href="../tag/README.md#component-arguments">tag</a> component.</td>
103
-
104
- </tr>
105
-
106
- <tr class="govuk-table__row">
107
-
108
- <th class="govuk-table__header" scope="row">classes</th>
109
-
110
- <td class="govuk-table__cell">string</td>
111
-
112
- <td class="govuk-table__cell">No</td>
113
-
114
- <td class="govuk-table__cell">Optional additional classes to add to the phase banner container.</td>
115
-
116
- </tr>
117
-
118
- <tr class="govuk-table__row">
119
-
120
- <th class="govuk-table__header" scope="row">attributes</th>
121
-
122
- <td class="govuk-table__cell">object</td>
123
-
124
- <td class="govuk-table__cell">No</td>
125
-
126
- <td class="govuk-table__cell">Any extra HTML attributes (for example data attributes) to add to the phase banner container.</td>
127
-
128
- </tr>
129
-
130
- </tbody>
131
-
132
- </table>
133
-
134
- **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).**
60
+ See [options table](https://design-system.service.gov.uk/components/phase-banner/#options-example-default) for details.
135
61
 
136
62
  ### Setting up Nunjucks views and paths
137
63
 
@@ -651,277 +651,11 @@ In order to include the images used in the components, you need to configure you
651
651
 
652
652
  app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets')))
653
653
 
654
- ## Component arguments
654
+ ## Component options
655
655
 
656
- If you are using Nunjucks,then macros take the following arguments
656
+ Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.
657
657
 
658
- **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).**
659
-
660
- <table class="govuk-table">
661
-
662
- <thead class="govuk-table__head">
663
-
664
- <tr class="govuk-table__row">
665
-
666
- <th class="govuk-table__header" scope="col">Name</th>
667
-
668
- <th class="govuk-table__header" scope="col">Type</th>
669
-
670
- <th class="govuk-table__header" scope="col">Required</th>
671
-
672
- <th class="govuk-table__header" scope="col">Description</th>
673
-
674
- </tr>
675
-
676
- </thead>
677
-
678
- <tbody class="govuk-table__body">
679
-
680
- <tr class="govuk-table__row">
681
-
682
- <th class="govuk-table__header" scope="row">fieldset</th>
683
-
684
- <td class="govuk-table__cell">object</td>
685
-
686
- <td class="govuk-table__cell">No</td>
687
-
688
- <td class="govuk-table__cell">Arguments for the fieldset component (e.g. legend). See <a href="../fieldset/README.md#component-arguments">fieldset</a> component.</td>
689
-
690
- </tr>
691
-
692
- <tr class="govuk-table__row">
693
-
694
- <th class="govuk-table__header" scope="row">hint</th>
695
-
696
- <td class="govuk-table__cell">object</td>
697
-
698
- <td class="govuk-table__cell">No</td>
699
-
700
- <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>
701
-
702
- </tr>
703
-
704
- <tr class="govuk-table__row">
705
-
706
- <th class="govuk-table__header" scope="row">errorMessage</th>
707
-
708
- <td class="govuk-table__cell">object</td>
709
-
710
- <td class="govuk-table__cell">No</td>
711
-
712
- <td class="govuk-table__cell">Arguments for the errorMessage component (e.g. text). See errorMessage component.</td>
713
-
714
- </tr>
715
-
716
- <tr class="govuk-table__row">
717
-
718
- <th class="govuk-table__header" scope="row">idPrefix</th>
719
-
720
- <td class="govuk-table__cell">string</td>
721
-
722
- <td class="govuk-table__cell">No</td>
723
-
724
- <td class="govuk-table__cell">String to prefix id for each radio item if no id is specified on each item. If`idPrefix` is not passed, fallback to using the name attribute instead.</td>
725
-
726
- </tr>
727
-
728
- <tr class="govuk-table__row">
729
-
730
- <th class="govuk-table__header" scope="row">name</th>
731
-
732
- <td class="govuk-table__cell">string</td>
733
-
734
- <td class="govuk-table__cell">Yes</td>
735
-
736
- <td class="govuk-table__cell">Name attribute for each radio item.</td>
737
-
738
- </tr>
739
-
740
- <tr class="govuk-table__row">
741
-
742
- <th class="govuk-table__header" scope="row">items</th>
743
-
744
- <td class="govuk-table__cell">array</td>
745
-
746
- <td class="govuk-table__cell">Yes</td>
747
-
748
- <td class="govuk-table__cell">Array of checkbox items objects.</td>
749
-
750
- </tr>
751
-
752
- <tr class="govuk-table__row">
753
-
754
- <th class="govuk-table__header" scope="row">items.{}.text (or) items.{}.html</th>
755
-
756
- <td class="govuk-table__cell">string</td>
757
-
758
- <td class="govuk-table__cell">Yes</td>
759
-
760
- <td class="govuk-table__cell">Text or HTML to use within each radio item label. If `html` is provided, the `text` argument will be ignored.</td>
761
-
762
- </tr>
763
-
764
- <tr class="govuk-table__row">
765
-
766
- <th class="govuk-table__header" scope="row">items.{}.id</th>
767
-
768
- <td class="govuk-table__cell">string</td>
769
-
770
- <td class="govuk-table__cell">No</td>
771
-
772
- <td class="govuk-table__cell">Specific id attribute for the radio item. If ommited, then `idPrefix` string will be applied.</td>
773
-
774
- </tr>
775
-
776
- <tr class="govuk-table__row">
777
-
778
- <th class="govuk-table__header" scope="row">items.{}.name</th>
779
-
780
- <td class="govuk-table__cell">string</td>
781
-
782
- <td class="govuk-table__cell">Yes</td>
783
-
784
- <td class="govuk-table__cell">Specific name for the radio item. If ommited, then component global `name` string will be applied.</td>
785
-
786
- </tr>
787
-
788
- <tr class="govuk-table__row">
789
-
790
- <th class="govuk-table__header" scope="row">items.{}.value</th>
791
-
792
- <td class="govuk-table__cell">string</td>
793
-
794
- <td class="govuk-table__cell">Yes</td>
795
-
796
- <td class="govuk-table__cell">Value for the radio input.</td>
797
-
798
- </tr>
799
-
800
- <tr class="govuk-table__row">
801
-
802
- <th class="govuk-table__header" scope="row">items.{}.label</th>
803
-
804
- <td class="govuk-table__cell">object</td>
805
-
806
- <td class="govuk-table__cell">No</td>
807
-
808
- <td class="govuk-table__cell">Provide additional attributes and classes to each radio item label. See [label](../label/README.md#component-arguments) component for more details.</td>
809
-
810
- </tr>
811
-
812
- <tr class="govuk-table__row">
813
-
814
- <th class="govuk-table__header" scope="row">items.{}.hint</th>
815
-
816
- <td class="govuk-table__cell">object</td>
817
-
818
- <td class="govuk-table__cell">No</td>
819
-
820
- <td class="govuk-table__cell">Provide optional hint to each radio item. See `hint` component for more details.</td>
821
-
822
- </tr>
823
-
824
- <tr class="govuk-table__row">
825
-
826
- <th class="govuk-table__header" scope="row">items.{}.divider</th>
827
-
828
- <td class="govuk-table__cell">string</td>
829
-
830
- <td class="govuk-table__cell">No</td>
831
-
832
- <td class="govuk-table__cell">Optional divider text to separate radio items, for example the text "or".</td>
833
-
834
- </tr>
835
-
836
- <tr class="govuk-table__row">
837
-
838
- <th class="govuk-table__header" scope="row">items.{}.checked</th>
839
-
840
- <td class="govuk-table__cell">boolean</td>
841
-
842
- <td class="govuk-table__cell">No</td>
843
-
844
- <td class="govuk-table__cell">If true, radio will be checked.</td>
845
-
846
- </tr>
847
-
848
- <tr class="govuk-table__row">
849
-
850
- <th class="govuk-table__header" scope="row">items.{}.conditional</th>
851
-
852
- <td class="govuk-table__cell">boolean</td>
853
-
854
- <td class="govuk-table__cell">No</td>
855
-
856
- <td class="govuk-table__cell">If true, content provided will be revealed when the item is checked.</td>
857
-
858
- </tr>
859
-
860
- <tr class="govuk-table__row">
861
-
862
- <th class="govuk-table__header" scope="row">items.{}.conditional.html</th>
863
-
864
- <td class="govuk-table__cell">boolean</td>
865
-
866
- <td class="govuk-table__cell">No</td>
867
-
868
- <td class="govuk-table__cell">Provide content for the conditional reveal.</td>
869
-
870
- </tr>
871
-
872
- <tr class="govuk-table__row">
873
-
874
- <th class="govuk-table__header" scope="row">items.{}.disabled</th>
875
-
876
- <td class="govuk-table__cell">boolean</td>
877
-
878
- <td class="govuk-table__cell">No</td>
879
-
880
- <td class="govuk-table__cell">If true, radio will be disabled.</td>
881
-
882
- </tr>
883
-
884
- <tr class="govuk-table__row">
885
-
886
- <th class="govuk-table__header" scope="row">items.{}.attributes</th>
887
-
888
- <td class="govuk-table__cell">object</td>
889
-
890
- <td class="govuk-table__cell">No</td>
891
-
892
- <td class="govuk-table__cell">Any extra HTML attributes (for example data attributes) to add to the radio input tag.</td>
893
-
894
- </tr>
895
-
896
- <tr class="govuk-table__row">
897
-
898
- <th class="govuk-table__header" scope="row">classes</th>
899
-
900
- <td class="govuk-table__cell">string</td>
901
-
902
- <td class="govuk-table__cell">No</td>
903
-
904
- <td class="govuk-table__cell">Optional additional classes to add to the radios container.</td>
905
-
906
- </tr>
907
-
908
- <tr class="govuk-table__row">
909
-
910
- <th class="govuk-table__header" scope="row">attributes</th>
911
-
912
- <td class="govuk-table__cell">object</td>
913
-
914
- <td class="govuk-table__cell">No</td>
915
-
916
- <td class="govuk-table__cell">Any extra HTML attributes (for example data attributes) to add to the radios container.</td>
917
-
918
- </tr>
919
-
920
- </tbody>
921
-
922
- </table>
923
-
924
- **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).**
658
+ See [options table](https://design-system.service.gov.uk/components/radios/#options-example-default) for details.
925
659
 
926
660
  ### Setting up Nunjucks views and paths
927
661