govuk_publishing_components 23.3.0 → 23.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/components/copy-to-clipboard.js +16 -14
  3. data/app/assets/javascripts/govuk_publishing_components/components/details.js +38 -34
  4. data/app/assets/javascripts/govuk_publishing_components/components/print-link.js +8 -7
  5. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +10 -9
  6. data/app/assets/javascripts/govuk_publishing_components/lib/initial-focus.js +13 -0
  7. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +2 -0
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +1 -0
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +0 -46
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_transition-countdown.scss +125 -0
  12. data/app/views/govuk_publishing_components/component_guide/show.html.erb +1 -2
  13. data/app/views/govuk_publishing_components/components/_attachment.html.erb +5 -4
  14. data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +14 -1
  15. data/app/views/govuk_publishing_components/components/_input.html.erb +6 -6
  16. data/app/views/govuk_publishing_components/components/_transition_countdown.html.erb +34 -0
  17. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +5 -3
  18. data/app/views/govuk_publishing_components/components/docs/attachment.yml +10 -0
  19. data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +0 -1
  20. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +55 -0
  21. data/app/views/govuk_publishing_components/components/docs/transition_countdown.yml +17 -0
  22. data/config/locales/cy.yml +9 -1
  23. data/config/locales/en.yml +7 -0
  24. data/lib/govuk_publishing_components.rb +1 -0
  25. data/lib/govuk_publishing_components/app_helpers/countdown_helper.rb +33 -0
  26. data/lib/govuk_publishing_components/version.rb +1 -1
  27. data/node_modules/govuk-frontend/govuk/all.js +31 -37
  28. data/node_modules/govuk-frontend/govuk/components/accordion/README.md +1 -1
  29. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +0 -1
  30. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +235 -0
  31. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +0 -2
  32. data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +56 -0
  33. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +0 -1
  34. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +172 -0
  35. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +3 -3
  36. data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +275 -0
  37. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +170 -0
  38. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +13 -13
  39. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +1015 -0
  40. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +499 -0
  41. data/node_modules/govuk-frontend/govuk/components/details/_index.scss +0 -1
  42. data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +83 -0
  43. data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +66 -0
  44. data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +0 -2
  45. data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +181 -0
  46. data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +1 -1
  47. data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +93 -0
  48. data/node_modules/govuk-frontend/govuk/components/fieldset/macro-options.json +6 -0
  49. data/node_modules/govuk-frontend/govuk/components/fieldset/template.njk +5 -1
  50. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +151 -0
  51. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +0 -1
  52. data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +482 -0
  53. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +2 -5
  54. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +360 -0
  55. data/node_modules/govuk-frontend/govuk/components/header/header.js +665 -316
  56. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +13 -1
  57. data/node_modules/govuk-frontend/govuk/components/header/template.njk +9 -5
  58. data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +0 -2
  59. data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +50 -0
  60. data/node_modules/govuk-frontend/govuk/components/hint/macro-options.json +1 -1
  61. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +91 -0
  62. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +538 -0
  63. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +64 -0
  64. data/node_modules/govuk-frontend/govuk/components/input/template.njk +17 -0
  65. data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +49 -0
  66. data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +75 -0
  67. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +6 -2
  68. data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +74 -0
  69. data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +65 -0
  70. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +13 -13
  71. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +1066 -0
  72. data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +2 -2
  73. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +0 -1
  74. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +248 -0
  75. data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +72 -0
  76. data/node_modules/govuk-frontend/govuk/components/summary-list/README.md +1 -1
  77. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +2 -10
  78. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +991 -0
  79. data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +468 -0
  80. data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +3 -6
  81. data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +229 -0
  82. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +0 -1
  83. data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +117 -0
  84. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +0 -1
  85. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +199 -0
  86. data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +0 -1
  87. data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +68 -0
  88. data/node_modules/govuk-frontend/govuk/helpers/_device-pixels.scss +3 -3
  89. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +9 -11
  90. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +1 -3
  91. data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +1 -5
  92. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +2 -1
  93. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +7 -6
  94. data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +0 -1
  95. data/node_modules/govuk-frontend/govuk/objects/_grid.scss +2 -3
  96. data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +0 -1
  97. data/node_modules/govuk-frontend/govuk/overrides/_display.scss +1 -1
  98. data/node_modules/govuk-frontend/govuk/overrides/_width.scss +1 -0
  99. data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +0 -3
  100. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
  101. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +9 -2
  102. data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +0 -1
  103. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +0 -4
  104. data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +2 -2
  105. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +11 -5
  106. data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +6 -2
  107. data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +0 -3
  108. data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +0 -3
  109. data/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss +0 -1
  110. data/node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss +0 -4
  111. data/node_modules/govuk-frontend/package.json +1 -1
  112. metadata +36 -3
  113. data/app/assets/javascripts/govuk_publishing_components/components/initial-focus.js +0 -12
@@ -0,0 +1,1066 @@
1
+ {
2
+ "component": "radios",
3
+ "fixtures": [
4
+ {
5
+ "name": "default",
6
+ "options": {
7
+ "name": "example-default",
8
+ "hint": {
9
+ "text": "This includes changing your last name or spelling your name differently."
10
+ },
11
+ "items": [
12
+ {
13
+ "value": "yes",
14
+ "text": "Yes"
15
+ },
16
+ {
17
+ "value": "no",
18
+ "text": "No",
19
+ "checked": true
20
+ }
21
+ ]
22
+ },
23
+ "html": "<div class=\"govuk-form-group\">\n\n <div id=\"example-default-hint\" class=\"govuk-hint\">\n This includes changing your last name or spelling your name differently.\n </div>\n\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-default\" name=\"example-default\" type=\"radio\" value=\"yes\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-default\">\n Yes\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-default-2\" name=\"example-default\" type=\"radio\" value=\"no\" checked>\n <label class=\"govuk-label govuk-radios__label\" for=\"example-default-2\">\n No\n </label>\n \n </div>\n \n \n \n \n </div>\n\n</div>"
24
+ },
25
+ {
26
+ "name": "inline",
27
+ "options": {
28
+ "idPrefix": "example",
29
+ "classes": "govuk-radios--inline",
30
+ "name": "example",
31
+ "fieldset": {
32
+ "legend": {
33
+ "text": "Have you changed your name?"
34
+ }
35
+ },
36
+ "hint": {
37
+ "text": "This includes changing your last name or spelling your name differently."
38
+ },
39
+ "items": [
40
+ {
41
+ "value": "yes",
42
+ "text": "Yes"
43
+ },
44
+ {
45
+ "value": "no",
46
+ "text": "No",
47
+ "checked": true
48
+ }
49
+ ]
50
+ },
51
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"example-hint\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n Have you changed your name?\n \n </legend>\n \n\n <div id=\"example-hint\" class=\"govuk-hint\">\n This includes changing your last name or spelling your name differently.\n </div>\n\n\n <div class=\"govuk-radios govuk-radios--inline\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example\" name=\"example\" type=\"radio\" value=\"yes\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example\">\n Yes\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-2\" name=\"example\" type=\"radio\" value=\"no\" checked>\n <label class=\"govuk-label govuk-radios__label\" for=\"example-2\">\n No\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
52
+ },
53
+ {
54
+ "name": "with disabled",
55
+ "options": {
56
+ "idPrefix": "example-disabled",
57
+ "name": "example-disabled",
58
+ "fieldset": {
59
+ "legend": {
60
+ "text": "Have you changed your name?"
61
+ }
62
+ },
63
+ "hint": {
64
+ "text": "This includes changing your last name or spelling your name differently."
65
+ },
66
+ "items": [
67
+ {
68
+ "value": "yes",
69
+ "text": "Yes",
70
+ "disabled": true
71
+ },
72
+ {
73
+ "value": "no",
74
+ "text": "No",
75
+ "disabled": true
76
+ }
77
+ ]
78
+ },
79
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"example-disabled-hint\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n Have you changed your name?\n \n </legend>\n \n\n <div id=\"example-disabled-hint\" class=\"govuk-hint\">\n This includes changing your last name or spelling your name differently.\n </div>\n\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-disabled\" name=\"example-disabled\" type=\"radio\" value=\"yes\" disabled>\n <label class=\"govuk-label govuk-radios__label\" for=\"example-disabled\">\n Yes\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-disabled-2\" name=\"example-disabled\" type=\"radio\" value=\"no\" disabled>\n <label class=\"govuk-label govuk-radios__label\" for=\"example-disabled-2\">\n No\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
80
+ },
81
+ {
82
+ "name": "with legend as page heading",
83
+ "options": {
84
+ "idPrefix": "housing-act",
85
+ "name": "housing-act",
86
+ "fieldset": {
87
+ "legend": {
88
+ "text": "Which part of the Housing Act was your licence issued under?",
89
+ "classes": "govuk-fieldset__legend--l",
90
+ "isPageHeading": true
91
+ }
92
+ },
93
+ "hint": {
94
+ "text": "Select one of the options below."
95
+ },
96
+ "items": [
97
+ {
98
+ "value": "part-2",
99
+ "html": "<span class=\"govuk-heading-s govuk-!-margin-bottom-1\">Part 2 of the Housing Act 2004</span> For properties that are 3 or more stories high and occupied by 5 or more people"
100
+ },
101
+ {
102
+ "value": "part-3",
103
+ "html": "<span class=\"govuk-heading-s govuk-!-margin-bottom-1\">Part 3 of the Housing Act 2004</span> For properties that are within a geographical area defined by a local council"
104
+ }
105
+ ]
106
+ },
107
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"housing-act-hint\">\n \n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n \n <h1 class=\"govuk-fieldset__heading\">\n Which part of the Housing Act was your licence issued under?\n </h1>\n \n </legend>\n \n\n <div id=\"housing-act-hint\" class=\"govuk-hint\">\n Select one of the options below.\n </div>\n\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"housing-act\" name=\"housing-act\" type=\"radio\" value=\"part-2\">\n <label class=\"govuk-label govuk-radios__label\" for=\"housing-act\">\n <span class=\"govuk-heading-s govuk-!-margin-bottom-1\">Part 2 of the Housing Act 2004</span> For properties that are 3 or more stories high and occupied by 5 or more people\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"housing-act-2\" name=\"housing-act\" type=\"radio\" value=\"part-3\">\n <label class=\"govuk-label govuk-radios__label\" for=\"housing-act-2\">\n <span class=\"govuk-heading-s govuk-!-margin-bottom-1\">Part 3 of the Housing Act 2004</span> For properties that are within a geographical area defined by a local council\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
108
+ },
109
+ {
110
+ "name": "with a medium legend",
111
+ "options": {
112
+ "idPrefix": "housing-act",
113
+ "name": "housing-act",
114
+ "fieldset": {
115
+ "legend": {
116
+ "text": "Which part of the Housing Act was your licence issued under?",
117
+ "classes": "govuk-fieldset__legend--m"
118
+ }
119
+ },
120
+ "hint": {
121
+ "text": "Select one of the options below."
122
+ },
123
+ "items": [
124
+ {
125
+ "value": "part-2",
126
+ "html": "<span class=\"govuk-heading-s govuk-!-margin-bottom-1\">Part 2 of the Housing Act 2004</span> For properties that are 3 or more stories high and occupied by 5 or more people"
127
+ },
128
+ {
129
+ "value": "part-3",
130
+ "html": "<span class=\"govuk-heading-s govuk-!-margin-bottom-1\">Part 3 of the Housing Act 2004</span> For properties that are within a geographical area defined by a local council"
131
+ }
132
+ ]
133
+ },
134
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"housing-act-hint\">\n \n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n \n Which part of the Housing Act was your licence issued under?\n \n </legend>\n \n\n <div id=\"housing-act-hint\" class=\"govuk-hint\">\n Select one of the options below.\n </div>\n\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"housing-act\" name=\"housing-act\" type=\"radio\" value=\"part-2\">\n <label class=\"govuk-label govuk-radios__label\" for=\"housing-act\">\n <span class=\"govuk-heading-s govuk-!-margin-bottom-1\">Part 2 of the Housing Act 2004</span> For properties that are 3 or more stories high and occupied by 5 or more people\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"housing-act-2\" name=\"housing-act\" type=\"radio\" value=\"part-3\">\n <label class=\"govuk-label govuk-radios__label\" for=\"housing-act-2\">\n <span class=\"govuk-heading-s govuk-!-margin-bottom-1\">Part 3 of the Housing Act 2004</span> For properties that are within a geographical area defined by a local council\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
135
+ },
136
+ {
137
+ "name": "with a divider",
138
+ "options": {
139
+ "idPrefix": "example-divider",
140
+ "name": "example",
141
+ "fieldset": {
142
+ "legend": {
143
+ "text": "How do you want to sign in?"
144
+ }
145
+ },
146
+ "items": [
147
+ {
148
+ "value": "governement-gateway",
149
+ "text": "Use Government Gateway"
150
+ },
151
+ {
152
+ "value": "govuk-verify",
153
+ "text": "Use GOV.UK Verify"
154
+ },
155
+ {
156
+ "divider": "or"
157
+ },
158
+ {
159
+ "value": "create-account",
160
+ "text": "Create an account"
161
+ }
162
+ ]
163
+ },
164
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n How do you want to sign in?\n \n </legend>\n \n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-divider\" name=\"example\" type=\"radio\" value=\"governement-gateway\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-divider\">\n Use Government Gateway\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-divider-2\" name=\"example\" type=\"radio\" value=\"govuk-verify\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-divider-2\">\n Use GOV.UK Verify\n </label>\n \n </div>\n \n \n \n \n \n <div class=\"govuk-radios__divider\">or</div>\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-divider-4\" name=\"example\" type=\"radio\" value=\"create-account\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-divider-4\">\n Create an account\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
165
+ },
166
+ {
167
+ "name": "with hints on items",
168
+ "options": {
169
+ "idPrefix": "gov",
170
+ "name": "gov",
171
+ "fieldset": {
172
+ "legend": {
173
+ "text": "How do you want to sign in?",
174
+ "isPageHeading": true
175
+ }
176
+ },
177
+ "items": [
178
+ {
179
+ "value": "gateway",
180
+ "text": "Sign in with Government Gateway",
181
+ "id": "gateway",
182
+ "hint": {
183
+ "text": "You’ll have a user ID if you’ve registered for Self Assessment or filed a tax return online before."
184
+ }
185
+ },
186
+ {
187
+ "value": "verify",
188
+ "text": "Sign in with GOV.UK Verify",
189
+ "id": "verify",
190
+ "hint": {
191
+ "text": "You’ll have an account if you’ve already proved your identity with either Barclays, CitizenSafe, Digidentity, Experian, Post Office, Royal Mail or SecureIdentity."
192
+ }
193
+ }
194
+ ]
195
+ },
196
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n <h1 class=\"govuk-fieldset__heading\">\n How do you want to sign in?\n </h1>\n \n </legend>\n \n\n <div class=\"govuk-radios\">\n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"gateway\" name=\"gov\" type=\"radio\" value=\"gateway\" aria-describedby=\"gateway-item-hint\">\n <label class=\"govuk-label govuk-radios__label\" for=\"gateway\">\n Sign in with Government Gateway\n </label>\n \n <div id=\"gateway-item-hint\" class=\"govuk-hint govuk-radios__hint\">\n You’ll have a user ID if you’ve registered for Self Assessment or filed a tax return online before.\n </div>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"verify\" name=\"gov\" type=\"radio\" value=\"verify\" aria-describedby=\"verify-item-hint\">\n <label class=\"govuk-label govuk-radios__label\" for=\"verify\">\n Sign in with GOV.UK Verify\n </label>\n \n <div id=\"verify-item-hint\" class=\"govuk-hint govuk-radios__hint\">\n You’ll have an account if you’ve already proved your identity with either Barclays, CitizenSafe, Digidentity, Experian, Post Office, Royal Mail or SecureIdentity.\n </div>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
197
+ },
198
+ {
199
+ "name": "without fieldset",
200
+ "options": {
201
+ "name": "colours",
202
+ "items": [
203
+ {
204
+ "value": "red",
205
+ "text": "Red"
206
+ },
207
+ {
208
+ "value": "green",
209
+ "text": "Green"
210
+ },
211
+ {
212
+ "value": "blue",
213
+ "text": "Blue"
214
+ }
215
+ ]
216
+ },
217
+ "html": "<div class=\"govuk-form-group\">\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"colours\" name=\"colours\" type=\"radio\" value=\"red\">\n <label class=\"govuk-label govuk-radios__label\" for=\"colours\">\n Red\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"colours-2\" name=\"colours\" type=\"radio\" value=\"green\">\n <label class=\"govuk-label govuk-radios__label\" for=\"colours-2\">\n Green\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"colours-3\" name=\"colours\" type=\"radio\" value=\"blue\">\n <label class=\"govuk-label govuk-radios__label\" for=\"colours-3\">\n Blue\n </label>\n \n </div>\n \n \n \n \n </div>\n\n</div>"
218
+ },
219
+ {
220
+ "name": "with fieldset and error message",
221
+ "options": {
222
+ "idPrefix": "example",
223
+ "name": "example",
224
+ "errorMessage": {
225
+ "text": "Please select an option"
226
+ },
227
+ "fieldset": {
228
+ "legend": {
229
+ "text": "Have you changed your name?"
230
+ }
231
+ },
232
+ "items": [
233
+ {
234
+ "value": "yes",
235
+ "text": "Yes"
236
+ },
237
+ {
238
+ "value": "no",
239
+ "text": "No",
240
+ "checked": true
241
+ }
242
+ ]
243
+ },
244
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"example-error\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n Have you changed your name?\n \n </legend>\n \n\n <span id=\"example-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Please select an option\n </span>\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example\" name=\"example\" type=\"radio\" value=\"yes\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example\">\n Yes\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-2\" name=\"example\" type=\"radio\" value=\"no\" checked>\n <label class=\"govuk-label govuk-radios__label\" for=\"example-2\">\n No\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
245
+ },
246
+ {
247
+ "name": "with very long option text",
248
+ "options": {
249
+ "name": "waste",
250
+ "hint": {
251
+ "text": "Nullam id dolor id nibh ultricies vehicula ut id elit."
252
+ },
253
+ "errorMessage": {
254
+ "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
255
+ },
256
+ "fieldset": {
257
+ "legend": {
258
+ "text": "Maecenas faucibus mollis interdum?"
259
+ }
260
+ },
261
+ "items": [
262
+ {
263
+ "value": "nullam",
264
+ "text": "Nullam id dolor id nibh ultricies vehicula ut id elit. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Maecenas faucibus mollis interdum. Donec id elit non mi porta gravida at eget metus."
265
+ },
266
+ {
267
+ "value": "aenean",
268
+ "text": "Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Donec sed odio dui. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Cras mattis consectetur purus sit amet fermentum."
269
+ },
270
+ {
271
+ "value": "fusce",
272
+ "text": "Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Etiam porta sem malesuada magna mollis euismod. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. Sed posuere consectetur est at lobortis."
273
+ }
274
+ ]
275
+ },
276
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"waste-hint waste-error\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n Maecenas faucibus mollis interdum?\n \n </legend>\n \n\n <div id=\"waste-hint\" class=\"govuk-hint\">\n Nullam id dolor id nibh ultricies vehicula ut id elit.\n </div>\n\n\n \n \n <span id=\"waste-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n </span>\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"waste\" name=\"waste\" type=\"radio\" value=\"nullam\">\n <label class=\"govuk-label govuk-radios__label\" for=\"waste\">\n Nullam id dolor id nibh ultricies vehicula ut id elit. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Maecenas faucibus mollis interdum. Donec id elit non mi porta gravida at eget metus.\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"waste-2\" name=\"waste\" type=\"radio\" value=\"aenean\">\n <label class=\"govuk-label govuk-radios__label\" for=\"waste-2\">\n Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Donec sed odio dui. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Cras mattis consectetur purus sit amet fermentum.\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"waste-3\" name=\"waste\" type=\"radio\" value=\"fusce\">\n <label class=\"govuk-label govuk-radios__label\" for=\"waste-3\">\n Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Etiam porta sem malesuada magna mollis euismod. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. Sed posuere consectetur est at lobortis.\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
277
+ },
278
+ {
279
+ "name": "with conditional items",
280
+ "options": {
281
+ "idPrefix": "how-contacted",
282
+ "name": "how-contacted",
283
+ "fieldset": {
284
+ "legend": {
285
+ "text": "How do you want to be contacted?"
286
+ }
287
+ },
288
+ "items": [
289
+ {
290
+ "value": "email",
291
+ "text": "Email",
292
+ "conditional": {
293
+ "html": "<label class=\"govuk-label\" for=\"context-email\">Mobile phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"context-email\" type=\"text\" id=\"context-email\">\n"
294
+ }
295
+ },
296
+ {
297
+ "value": "phone",
298
+ "text": "Phone",
299
+ "conditional": {
300
+ "html": "<label class=\"govuk-label\" for=\"contact-phone\">Phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"contact-phone\" type=\"text\" id=\"contact-phone\">\n"
301
+ }
302
+ },
303
+ {
304
+ "value": "text",
305
+ "text": "Text message",
306
+ "conditional": {
307
+ "html": "<label class=\"govuk-label\" for=\"contact-text-message\">Mobile phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"contact-text-message\" type=\"text\" id=\"contact-text-message\">\n"
308
+ }
309
+ }
310
+ ]
311
+ },
312
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n How do you want to be contacted?\n \n </legend>\n \n\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted\" name=\"how-contacted\" type=\"radio\" value=\"email\" data-aria-controls=\"conditional-how-contacted\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted\">\n Email\n </label>\n \n </div>\n \n <div class=\"govuk-radios__conditional govuk-radios__conditional--hidden\" id=\"conditional-how-contacted\">\n <label class=\"govuk-label\" for=\"context-email\">Mobile phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"context-email\" type=\"text\" id=\"context-email\">\n\n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2\" name=\"how-contacted\" type=\"radio\" value=\"phone\" data-aria-controls=\"conditional-how-contacted-2\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2\">\n Phone\n </label>\n \n </div>\n \n <div class=\"govuk-radios__conditional govuk-radios__conditional--hidden\" id=\"conditional-how-contacted-2\">\n <label class=\"govuk-label\" for=\"contact-phone\">Phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"contact-phone\" type=\"text\" id=\"contact-phone\">\n\n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-3\" name=\"how-contacted\" type=\"radio\" value=\"text\" data-aria-controls=\"conditional-how-contacted-3\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-3\">\n Text message\n </label>\n \n </div>\n \n <div class=\"govuk-radios__conditional govuk-radios__conditional--hidden\" id=\"conditional-how-contacted-3\">\n <label class=\"govuk-label\" for=\"contact-text-message\">Mobile phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"contact-text-message\" type=\"text\" id=\"contact-text-message\">\n\n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
313
+ },
314
+ {
315
+ "name": "inline with conditional items",
316
+ "options": {
317
+ "classes": "govuk-radios--inline",
318
+ "idPrefix": "how-contacted",
319
+ "name": "how-contacted",
320
+ "fieldset": {
321
+ "legend": {
322
+ "text": "How do you want to be contacted?"
323
+ }
324
+ },
325
+ "items": [
326
+ {
327
+ "value": "email",
328
+ "text": "Email",
329
+ "conditional": {
330
+ "html": "<label class=\"govuk-label\" for=\"context-email\">Email address</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"context-email\" type=\"text\" id=\"context-email\">\n"
331
+ }
332
+ },
333
+ {
334
+ "value": "phone",
335
+ "text": "Phone",
336
+ "conditional": {
337
+ "html": "<label class=\"govuk-label\" for=\"contact-phone\">Phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"contact-phone\" type=\"text\" id=\"contact-phone\">\n"
338
+ }
339
+ },
340
+ {
341
+ "value": "text",
342
+ "text": "Text message",
343
+ "conditional": {
344
+ "html": "<label class=\"govuk-label\" for=\"contact-text-message\">Mobile phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"contact-text-message\" type=\"text\" id=\"contact-text-message\">\n"
345
+ }
346
+ }
347
+ ]
348
+ },
349
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n How do you want to be contacted?\n \n </legend>\n \n\n <div class=\"govuk-radios govuk-radios--inline govuk-radios--conditional\" data-module=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted\" name=\"how-contacted\" type=\"radio\" value=\"email\" data-aria-controls=\"conditional-how-contacted\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted\">\n Email\n </label>\n \n </div>\n \n <div class=\"govuk-radios__conditional govuk-radios__conditional--hidden\" id=\"conditional-how-contacted\">\n <label class=\"govuk-label\" for=\"context-email\">Email address</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"context-email\" type=\"text\" id=\"context-email\">\n\n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2\" name=\"how-contacted\" type=\"radio\" value=\"phone\" data-aria-controls=\"conditional-how-contacted-2\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2\">\n Phone\n </label>\n \n </div>\n \n <div class=\"govuk-radios__conditional govuk-radios__conditional--hidden\" id=\"conditional-how-contacted-2\">\n <label class=\"govuk-label\" for=\"contact-phone\">Phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"contact-phone\" type=\"text\" id=\"contact-phone\">\n\n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-3\" name=\"how-contacted\" type=\"radio\" value=\"text\" data-aria-controls=\"conditional-how-contacted-3\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-3\">\n Text message\n </label>\n \n </div>\n \n <div class=\"govuk-radios__conditional govuk-radios__conditional--hidden\" id=\"conditional-how-contacted-3\">\n <label class=\"govuk-label\" for=\"contact-text-message\">Mobile phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"contact-text-message\" type=\"text\" id=\"contact-text-message\">\n\n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
350
+ },
351
+ {
352
+ "name": "with conditional item checked",
353
+ "options": {
354
+ "idPrefix": "how-contacted-checked",
355
+ "name": "how-contacted-checked",
356
+ "fieldset": {
357
+ "legend": {
358
+ "text": "How do you want to be contacted?"
359
+ }
360
+ },
361
+ "items": [
362
+ {
363
+ "value": "email",
364
+ "text": "Email",
365
+ "checked": true,
366
+ "conditional": {
367
+ "html": "<label class=\"govuk-label\" for=\"context-email\">Email</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"context-email\" type=\"text\" id=\"context-email\">\n"
368
+ }
369
+ },
370
+ {
371
+ "value": "phone",
372
+ "text": "Phone",
373
+ "conditional": {
374
+ "html": "<label class=\"govuk-label\" for=\"contact-phone\">Phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"contact-phone\" type=\"text\" id=\"contact-phone\">\n"
375
+ }
376
+ },
377
+ {
378
+ "value": "text",
379
+ "text": "Text message",
380
+ "conditional": {
381
+ "html": "<label class=\"govuk-label\" for=\"contact-text-message\">Mobile phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"contact-text-message\" type=\"text\" id=\"contact-text-message\">\n"
382
+ }
383
+ }
384
+ ]
385
+ },
386
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n How do you want to be contacted?\n \n </legend>\n \n\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-checked\" name=\"how-contacted-checked\" type=\"radio\" value=\"email\" checked data-aria-controls=\"conditional-how-contacted-checked\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-checked\">\n Email\n </label>\n \n </div>\n \n <div class=\"govuk-radios__conditional\" id=\"conditional-how-contacted-checked\">\n <label class=\"govuk-label\" for=\"context-email\">Email</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"context-email\" type=\"text\" id=\"context-email\">\n\n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-checked-2\" name=\"how-contacted-checked\" type=\"radio\" value=\"phone\" data-aria-controls=\"conditional-how-contacted-checked-2\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-checked-2\">\n Phone\n </label>\n \n </div>\n \n <div class=\"govuk-radios__conditional govuk-radios__conditional--hidden\" id=\"conditional-how-contacted-checked-2\">\n <label class=\"govuk-label\" for=\"contact-phone\">Phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"contact-phone\" type=\"text\" id=\"contact-phone\">\n\n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-checked-3\" name=\"how-contacted-checked\" type=\"radio\" value=\"text\" data-aria-controls=\"conditional-how-contacted-checked-3\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-checked-3\">\n Text message\n </label>\n \n </div>\n \n <div class=\"govuk-radios__conditional govuk-radios__conditional--hidden\" id=\"conditional-how-contacted-checked-3\">\n <label class=\"govuk-label\" for=\"contact-text-message\">Mobile phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"contact-text-message\" type=\"text\" id=\"contact-text-message\">\n\n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
387
+ },
388
+ {
389
+ "name": "with optional form-group classes showing group error",
390
+ "options": {
391
+ "idPrefix": "how-contacted-2",
392
+ "name": "how-contacted-2",
393
+ "formGroup": {
394
+ "classes": "govuk-form-group--error"
395
+ },
396
+ "fieldset": {
397
+ "legend": {
398
+ "text": "How do you want to be contacted?"
399
+ }
400
+ },
401
+ "items": [
402
+ {
403
+ "value": "email",
404
+ "text": "Email",
405
+ "conditional": {
406
+ "html": "<label class=\"govuk-label\" for=\"context-email\">Mobile phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"context-email\" type=\"text\" id=\"context-email\">\n"
407
+ }
408
+ },
409
+ {
410
+ "value": "phone",
411
+ "text": "Phone",
412
+ "checked": true,
413
+ "conditional": {
414
+ "html": "<label class=\"govuk-label\" for=\"contact-phone\">Phone number</label>\n<span id=\"contact-phone-error\" class=\"govuk-error-message\">Problem with input</span>\n<input class=\"govuk-input govuk-input--error govuk-!-width-one-third\" name=\"contact-phone\" type=\"text\" id=\"contact-phone\" aria-describedby=\"contact-phone-error\">\n"
415
+ }
416
+ },
417
+ {
418
+ "value": "text",
419
+ "text": "Text message",
420
+ "conditional": {
421
+ "html": "<label class=\"govuk-label\" for=\"contact-text-message\">Mobile phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"contact-text-message\" type=\"text\" id=\"contact-text-message\">\n"
422
+ }
423
+ }
424
+ ]
425
+ },
426
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n\n <fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n How do you want to be contacted?\n \n </legend>\n \n\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2\" name=\"how-contacted-2\" type=\"radio\" value=\"email\" data-aria-controls=\"conditional-how-contacted-2\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2\">\n Email\n </label>\n \n </div>\n \n <div class=\"govuk-radios__conditional govuk-radios__conditional--hidden\" id=\"conditional-how-contacted-2\">\n <label class=\"govuk-label\" for=\"context-email\">Mobile phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"context-email\" type=\"text\" id=\"context-email\">\n\n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2-2\" name=\"how-contacted-2\" type=\"radio\" value=\"phone\" checked data-aria-controls=\"conditional-how-contacted-2-2\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2-2\">\n Phone\n </label>\n \n </div>\n \n <div class=\"govuk-radios__conditional\" id=\"conditional-how-contacted-2-2\">\n <label class=\"govuk-label\" for=\"contact-phone\">Phone number</label>\n<span id=\"contact-phone-error\" class=\"govuk-error-message\">Problem with input</span>\n<input class=\"govuk-input govuk-input--error govuk-!-width-one-third\" name=\"contact-phone\" type=\"text\" id=\"contact-phone\" aria-describedby=\"contact-phone-error\">\n\n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2-3\" name=\"how-contacted-2\" type=\"radio\" value=\"text\" data-aria-controls=\"conditional-how-contacted-2-3\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2-3\">\n Text message\n </label>\n \n </div>\n \n <div class=\"govuk-radios__conditional govuk-radios__conditional--hidden\" id=\"conditional-how-contacted-2-3\">\n <label class=\"govuk-label\" for=\"contact-text-message\">Mobile phone number</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"contact-text-message\" type=\"text\" id=\"contact-text-message\">\n\n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
427
+ },
428
+ {
429
+ "name": "small",
430
+ "options": {
431
+ "idPrefix": "how-contacted-2",
432
+ "name": "how-contacted-2",
433
+ "formGroup": {
434
+ "classes": "govuk-radios--small"
435
+ },
436
+ "fieldset": {
437
+ "legend": {
438
+ "text": "How do you want to be contacted?"
439
+ }
440
+ },
441
+ "items": [
442
+ {
443
+ "value": "email",
444
+ "text": "Email"
445
+ },
446
+ {
447
+ "value": "phone",
448
+ "text": "Phone"
449
+ },
450
+ {
451
+ "value": "text",
452
+ "text": "Text message"
453
+ }
454
+ ]
455
+ },
456
+ "html": "<div class=\"govuk-form-group govuk-radios--small\">\n\n <fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n How do you want to be contacted?\n \n </legend>\n \n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2\" name=\"how-contacted-2\" type=\"radio\" value=\"email\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2\">\n Email\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2-2\" name=\"how-contacted-2\" type=\"radio\" value=\"phone\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2-2\">\n Phone\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2-3\" name=\"how-contacted-2\" type=\"radio\" value=\"text\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2-3\">\n Text message\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
457
+ },
458
+ {
459
+ "name": "small with long text",
460
+ "options": {
461
+ "idPrefix": "foo",
462
+ "name": "foo",
463
+ "classes": "govuk-radios--small",
464
+ "fieldset": {
465
+ "legend": {
466
+ "text": "Venenatis Condimentum"
467
+ }
468
+ },
469
+ "items": [
470
+ {
471
+ "value": "nullam",
472
+ "text": "Nullam id dolor id nibh ultricies vehicula ut id elit. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Maecenas faucibus mollis interdum. Donec id elit non mi porta gravida at eget metus."
473
+ },
474
+ {
475
+ "value": "aenean",
476
+ "text": "Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Donec sed odio dui. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Cras mattis consectetur purus sit amet fermentum."
477
+ },
478
+ {
479
+ "value": "fusce",
480
+ "text": "Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Etiam porta sem malesuada magna mollis euismod. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. Sed posuere consectetur est at lobortis."
481
+ }
482
+ ]
483
+ },
484
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n Venenatis Condimentum\n \n </legend>\n \n\n <div class=\"govuk-radios govuk-radios--small\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"foo\" name=\"foo\" type=\"radio\" value=\"nullam\">\n <label class=\"govuk-label govuk-radios__label\" for=\"foo\">\n Nullam id dolor id nibh ultricies vehicula ut id elit. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Maecenas faucibus mollis interdum. Donec id elit non mi porta gravida at eget metus.\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"foo-2\" name=\"foo\" type=\"radio\" value=\"aenean\">\n <label class=\"govuk-label govuk-radios__label\" for=\"foo-2\">\n Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Donec sed odio dui. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Cras mattis consectetur purus sit amet fermentum.\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"foo-3\" name=\"foo\" type=\"radio\" value=\"fusce\">\n <label class=\"govuk-label govuk-radios__label\" for=\"foo-3\">\n Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Etiam porta sem malesuada magna mollis euismod. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. Sed posuere consectetur est at lobortis.\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
485
+ },
486
+ {
487
+ "name": "small with error",
488
+ "options": {
489
+ "idPrefix": "how-contacted-2",
490
+ "name": "how-contacted-2",
491
+ "formGroup": {
492
+ "classes": "govuk-radios--small"
493
+ },
494
+ "fieldset": {
495
+ "legend": {
496
+ "text": "How do you want to be contacted?"
497
+ }
498
+ },
499
+ "errorMessage": {
500
+ "text": "Select a thing"
501
+ },
502
+ "items": [
503
+ {
504
+ "value": "email",
505
+ "text": "Email"
506
+ },
507
+ {
508
+ "value": "phone",
509
+ "text": "Phone"
510
+ },
511
+ {
512
+ "value": "text",
513
+ "text": "Text message"
514
+ }
515
+ ]
516
+ },
517
+ "html": "<div class=\"govuk-form-group govuk-form-group--error govuk-radios--small\">\n\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"how-contacted-2-error\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n How do you want to be contacted?\n \n </legend>\n \n\n <span id=\"how-contacted-2-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Select a thing\n </span>\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2\" name=\"how-contacted-2\" type=\"radio\" value=\"email\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2\">\n Email\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2-2\" name=\"how-contacted-2\" type=\"radio\" value=\"phone\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2-2\">\n Phone\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2-3\" name=\"how-contacted-2\" type=\"radio\" value=\"text\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2-3\">\n Text message\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
518
+ },
519
+ {
520
+ "name": "small with hint",
521
+ "options": {
522
+ "idPrefix": "how-contacted-2",
523
+ "name": "how-contacted-2",
524
+ "formGroup": {
525
+ "classes": "govuk-radios--small"
526
+ },
527
+ "fieldset": {
528
+ "legend": {
529
+ "text": "How do you want to be contacted?"
530
+ }
531
+ },
532
+ "items": [
533
+ {
534
+ "value": "email",
535
+ "text": "Email",
536
+ "hint": {
537
+ "text": "Hint for email address"
538
+ }
539
+ },
540
+ {
541
+ "value": "phone",
542
+ "text": "Phone"
543
+ },
544
+ {
545
+ "value": "text",
546
+ "text": "Text message"
547
+ }
548
+ ]
549
+ },
550
+ "html": "<div class=\"govuk-form-group govuk-radios--small\">\n\n <fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n How do you want to be contacted?\n \n </legend>\n \n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2\" name=\"how-contacted-2\" type=\"radio\" value=\"email\" aria-describedby=\"how-contacted-2-item-hint\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2\">\n Email\n </label>\n \n <div id=\"how-contacted-2-item-hint\" class=\"govuk-hint govuk-radios__hint\">\n Hint for email address\n </div>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2-2\" name=\"how-contacted-2\" type=\"radio\" value=\"phone\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2-2\">\n Phone\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2-3\" name=\"how-contacted-2\" type=\"radio\" value=\"text\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2-3\">\n Text message\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
551
+ },
552
+ {
553
+ "name": "small with disabled",
554
+ "options": {
555
+ "idPrefix": "how-contacted-2",
556
+ "name": "how-contacted-2",
557
+ "formGroup": {
558
+ "classes": "govuk-radios--small"
559
+ },
560
+ "fieldset": {
561
+ "legend": {
562
+ "text": "How do you want to be contacted?"
563
+ }
564
+ },
565
+ "items": [
566
+ {
567
+ "value": "email",
568
+ "text": "Email"
569
+ },
570
+ {
571
+ "value": "phone",
572
+ "text": "Phone"
573
+ },
574
+ {
575
+ "value": "text",
576
+ "text": "Text message",
577
+ "disabled": true
578
+ }
579
+ ]
580
+ },
581
+ "html": "<div class=\"govuk-form-group govuk-radios--small\">\n\n <fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n How do you want to be contacted?\n \n </legend>\n \n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2\" name=\"how-contacted-2\" type=\"radio\" value=\"email\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2\">\n Email\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2-2\" name=\"how-contacted-2\" type=\"radio\" value=\"phone\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2-2\">\n Phone\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2-3\" name=\"how-contacted-2\" type=\"radio\" value=\"text\" disabled>\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2-3\">\n Text message\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
582
+ },
583
+ {
584
+ "name": "small with conditional reveal",
585
+ "options": {
586
+ "idPrefix": "how-contacted-2",
587
+ "name": "how-contacted-2",
588
+ "formGroup": {
589
+ "classes": "govuk-radios--small"
590
+ },
591
+ "fieldset": {
592
+ "legend": {
593
+ "text": "How do you want to be contacted?"
594
+ }
595
+ },
596
+ "items": [
597
+ {
598
+ "value": "email",
599
+ "text": "Email",
600
+ "conditional": {
601
+ "html": "<label class=\"govuk-label\" for=\"context-email\">Foo</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"context-email\" type=\"text\" id=\"context-email\">\n"
602
+ }
603
+ },
604
+ {
605
+ "value": "phone",
606
+ "text": "Phone"
607
+ },
608
+ {
609
+ "value": "text",
610
+ "text": "Text message"
611
+ }
612
+ ]
613
+ },
614
+ "html": "<div class=\"govuk-form-group govuk-radios--small\">\n\n <fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n How do you want to be contacted?\n \n </legend>\n \n\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2\" name=\"how-contacted-2\" type=\"radio\" value=\"email\" data-aria-controls=\"conditional-how-contacted-2\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2\">\n Email\n </label>\n \n </div>\n \n <div class=\"govuk-radios__conditional govuk-radios__conditional--hidden\" id=\"conditional-how-contacted-2\">\n <label class=\"govuk-label\" for=\"context-email\">Foo</label>\n<input class=\"govuk-input govuk-!-width-one-third\" name=\"context-email\" type=\"text\" id=\"context-email\">\n\n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2-2\" name=\"how-contacted-2\" type=\"radio\" value=\"phone\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2-2\">\n Phone\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"how-contacted-2-3\" name=\"how-contacted-2\" type=\"radio\" value=\"text\">\n <label class=\"govuk-label govuk-radios__label\" for=\"how-contacted-2-3\">\n Text message\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
615
+ },
616
+ {
617
+ "name": "small inline",
618
+ "options": {
619
+ "idPrefix": "sort",
620
+ "classes": "govuk-radios--small govuk-radios--inline",
621
+ "name": "example",
622
+ "fieldset": {
623
+ "legend": {
624
+ "text": "Sort by"
625
+ }
626
+ },
627
+ "items": [
628
+ {
629
+ "value": "relevance",
630
+ "text": "relevance"
631
+ },
632
+ {
633
+ "value": "title",
634
+ "text": "title"
635
+ },
636
+ {
637
+ "value": "created",
638
+ "text": "created"
639
+ }
640
+ ]
641
+ },
642
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n Sort by\n \n </legend>\n \n\n <div class=\"govuk-radios govuk-radios--small govuk-radios--inline\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"sort\" name=\"example\" type=\"radio\" value=\"relevance\">\n <label class=\"govuk-label govuk-radios__label\" for=\"sort\">\n relevance\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"sort-2\" name=\"example\" type=\"radio\" value=\"title\">\n <label class=\"govuk-label govuk-radios__label\" for=\"sort-2\">\n title\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"sort-3\" name=\"example\" type=\"radio\" value=\"created\">\n <label class=\"govuk-label govuk-radios__label\" for=\"sort-3\">\n created\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
643
+ },
644
+ {
645
+ "name": "small inline extreme",
646
+ "options": {
647
+ "idPrefix": "sort",
648
+ "classes": "govuk-radios--small govuk-radios--inline",
649
+ "name": "example",
650
+ "fieldset": {
651
+ "legend": {
652
+ "text": "Sort by"
653
+ }
654
+ },
655
+ "items": [
656
+ {
657
+ "value": "relevance",
658
+ "text": "relevance"
659
+ },
660
+ {
661
+ "value": "title",
662
+ "text": "title"
663
+ },
664
+ {
665
+ "value": "created",
666
+ "text": "created"
667
+ },
668
+ {
669
+ "value": "modified",
670
+ "text": "modified"
671
+ },
672
+ {
673
+ "value": "category",
674
+ "text": "category"
675
+ },
676
+ {
677
+ "value": "votes",
678
+ "text": "votes"
679
+ },
680
+ {
681
+ "value": "flavour",
682
+ "text": "flavour"
683
+ },
684
+ {
685
+ "value": "hue",
686
+ "text": "hue"
687
+ },
688
+ {
689
+ "value": "happiness",
690
+ "text": "happiness"
691
+ },
692
+ {
693
+ "value": "funkiness",
694
+ "text": "funkiness"
695
+ }
696
+ ]
697
+ },
698
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n Sort by\n \n </legend>\n \n\n <div class=\"govuk-radios govuk-radios--small govuk-radios--inline\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"sort\" name=\"example\" type=\"radio\" value=\"relevance\">\n <label class=\"govuk-label govuk-radios__label\" for=\"sort\">\n relevance\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"sort-2\" name=\"example\" type=\"radio\" value=\"title\">\n <label class=\"govuk-label govuk-radios__label\" for=\"sort-2\">\n title\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"sort-3\" name=\"example\" type=\"radio\" value=\"created\">\n <label class=\"govuk-label govuk-radios__label\" for=\"sort-3\">\n created\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"sort-4\" name=\"example\" type=\"radio\" value=\"modified\">\n <label class=\"govuk-label govuk-radios__label\" for=\"sort-4\">\n modified\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"sort-5\" name=\"example\" type=\"radio\" value=\"category\">\n <label class=\"govuk-label govuk-radios__label\" for=\"sort-5\">\n category\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"sort-6\" name=\"example\" type=\"radio\" value=\"votes\">\n <label class=\"govuk-label govuk-radios__label\" for=\"sort-6\">\n votes\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"sort-7\" name=\"example\" type=\"radio\" value=\"flavour\">\n <label class=\"govuk-label govuk-radios__label\" for=\"sort-7\">\n flavour\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"sort-8\" name=\"example\" type=\"radio\" value=\"hue\">\n <label class=\"govuk-label govuk-radios__label\" for=\"sort-8\">\n hue\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"sort-9\" name=\"example\" type=\"radio\" value=\"happiness\">\n <label class=\"govuk-label govuk-radios__label\" for=\"sort-9\">\n happiness\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"sort-10\" name=\"example\" type=\"radio\" value=\"funkiness\">\n <label class=\"govuk-label govuk-radios__label\" for=\"sort-10\">\n funkiness\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
699
+ },
700
+ {
701
+ "name": "small with a divider",
702
+ "options": {
703
+ "idPrefix": "example-small-divider",
704
+ "name": "example",
705
+ "fieldset": {
706
+ "legend": {
707
+ "text": "How do you want to sign in?"
708
+ }
709
+ },
710
+ "classes": "govuk-radios--small",
711
+ "items": [
712
+ {
713
+ "value": "governement-gateway",
714
+ "text": "Use Government Gateway"
715
+ },
716
+ {
717
+ "value": "govuk-verify",
718
+ "text": "Use GOV.UK Verify"
719
+ },
720
+ {
721
+ "divider": "or"
722
+ },
723
+ {
724
+ "value": "create-account",
725
+ "text": "Create an account"
726
+ }
727
+ ]
728
+ },
729
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n How do you want to sign in?\n \n </legend>\n \n\n <div class=\"govuk-radios govuk-radios--small\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-small-divider\" name=\"example\" type=\"radio\" value=\"governement-gateway\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-small-divider\">\n Use Government Gateway\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-small-divider-2\" name=\"example\" type=\"radio\" value=\"govuk-verify\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-small-divider-2\">\n Use GOV.UK Verify\n </label>\n \n </div>\n \n \n \n \n \n <div class=\"govuk-radios__divider\">or</div>\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-small-divider-4\" name=\"example\" type=\"radio\" value=\"create-account\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-small-divider-4\">\n Create an account\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
730
+ },
731
+ {
732
+ "name": "with idPrefix",
733
+ "options": {
734
+ "name": "example-radio",
735
+ "idPrefix": "example-id-prefix",
736
+ "items": [
737
+ {
738
+ "value": "yes",
739
+ "text": "Yes"
740
+ },
741
+ {
742
+ "value": "no",
743
+ "text": "No"
744
+ }
745
+ ]
746
+ },
747
+ "html": "<div class=\"govuk-form-group\">\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-id-prefix\" name=\"example-radio\" type=\"radio\" value=\"yes\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-id-prefix\">\n Yes\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-id-prefix-2\" name=\"example-radio\" type=\"radio\" value=\"no\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-id-prefix-2\">\n No\n </label>\n \n </div>\n \n \n \n \n </div>\n\n</div>"
748
+ },
749
+ {
750
+ "name": "minimal items and name",
751
+ "options": {
752
+ "name": "example-name",
753
+ "items": [
754
+ {
755
+ "value": "yes",
756
+ "text": "Yes"
757
+ },
758
+ {
759
+ "value": "no",
760
+ "text": "No"
761
+ }
762
+ ]
763
+ },
764
+ "html": "<div class=\"govuk-form-group\">\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-name\" name=\"example-name\" type=\"radio\" value=\"yes\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-name\">\n Yes\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-name-2\" name=\"example-name\" type=\"radio\" value=\"no\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-name-2\">\n No\n </label>\n \n </div>\n \n \n \n \n </div>\n\n</div>"
765
+ },
766
+ {
767
+ "name": "with falsey items",
768
+ "options": {
769
+ "name": "example-name",
770
+ "items": [
771
+ {
772
+ "value": "yes",
773
+ "text": "Yes"
774
+ },
775
+ null,
776
+ false,
777
+ {
778
+ "value": "no",
779
+ "text": "No"
780
+ }
781
+ ]
782
+ },
783
+ "html": "<div class=\"govuk-form-group\">\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-name\" name=\"example-name\" type=\"radio\" value=\"yes\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-name\">\n Yes\n </label>\n \n </div>\n \n \n \n \n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-name-4\" name=\"example-name\" type=\"radio\" value=\"no\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-name-4\">\n No\n </label>\n \n </div>\n \n \n \n \n </div>\n\n</div>"
784
+ },
785
+ {
786
+ "name": "fieldset with describedBy",
787
+ "options": {
788
+ "name": "example-name",
789
+ "fieldset": {
790
+ "describedBy": "some-id"
791
+ },
792
+ "items": [
793
+ {
794
+ "value": "yes",
795
+ "text": "Yes"
796
+ },
797
+ {
798
+ "value": "no",
799
+ "text": "No"
800
+ }
801
+ ]
802
+ },
803
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"some-id\">\n \n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-name\" name=\"example-name\" type=\"radio\" value=\"yes\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-name\">\n Yes\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-name-2\" name=\"example-name\" type=\"radio\" value=\"no\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-name-2\">\n No\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
804
+ },
805
+ {
806
+ "name": "attributes",
807
+ "options": {
808
+ "name": "example-name",
809
+ "attributes": {
810
+ "data-attribute": "value",
811
+ "data-second-attribute": "second-value"
812
+ },
813
+ "items": [
814
+ {
815
+ "value": "yes",
816
+ "text": "Yes"
817
+ },
818
+ {
819
+ "value": "no",
820
+ "text": "No"
821
+ }
822
+ ]
823
+ },
824
+ "html": "<div class=\"govuk-form-group\">\n\n <div class=\"govuk-radios\" data-attribute=\"value\" data-second-attribute=\"second-value\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-name\" name=\"example-name\" type=\"radio\" value=\"yes\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-name\">\n Yes\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-name-2\" name=\"example-name\" type=\"radio\" value=\"no\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-name-2\">\n No\n </label>\n \n </div>\n \n \n \n \n </div>\n\n</div>"
825
+ },
826
+ {
827
+ "name": "items with attributes",
828
+ "options": {
829
+ "name": "example-name",
830
+ "items": [
831
+ {
832
+ "value": "yes",
833
+ "text": "Yes",
834
+ "attributes": {
835
+ "data-attribute": "ABC",
836
+ "data-second-attribute": "DEF"
837
+ }
838
+ },
839
+ {
840
+ "value": "no",
841
+ "text": "No",
842
+ "attributes": {
843
+ "data-attribute": "GHI",
844
+ "data-second-attribute": "JKL"
845
+ }
846
+ }
847
+ ]
848
+ },
849
+ "html": "<div class=\"govuk-form-group\">\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-name\" name=\"example-name\" type=\"radio\" value=\"yes\" data-attribute=\"ABC\" data-second-attribute=\"DEF\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-name\">\n Yes\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-name-2\" name=\"example-name\" type=\"radio\" value=\"no\" data-attribute=\"GHI\" data-second-attribute=\"JKL\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-name-2\">\n No\n </label>\n \n </div>\n \n \n \n \n </div>\n\n</div>"
850
+ },
851
+ {
852
+ "name": "with empty conditional",
853
+ "options": {
854
+ "name": "example-conditional",
855
+ "items": [
856
+ {
857
+ "value": "yes",
858
+ "text": "Yes",
859
+ "conditional": {
860
+ "html": false
861
+ }
862
+ },
863
+ {
864
+ "value": "no",
865
+ "text": "No"
866
+ }
867
+ ]
868
+ },
869
+ "html": "<div class=\"govuk-form-group\">\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-conditional\" name=\"example-conditional\" type=\"radio\" value=\"yes\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-conditional\">\n Yes\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-conditional-2\" name=\"example-conditional\" type=\"radio\" value=\"no\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-conditional-2\">\n No\n </label>\n \n </div>\n \n \n \n \n </div>\n\n</div>"
870
+ },
871
+ {
872
+ "name": "label with classes",
873
+ "options": {
874
+ "name": "example-label-classes",
875
+ "items": [
876
+ {
877
+ "value": "yes",
878
+ "text": "Yes",
879
+ "label": {
880
+ "classes": "bold"
881
+ }
882
+ }
883
+ ]
884
+ },
885
+ "html": "<div class=\"govuk-form-group\">\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-label-classes\" name=\"example-label-classes\" type=\"radio\" value=\"yes\">\n <label class=\"govuk-label govuk-radios__label bold\" for=\"example-label-classes\">\n Yes\n </label>\n \n </div>\n \n \n \n \n </div>\n\n</div>"
886
+ },
887
+ {
888
+ "name": "with hints on parent and items",
889
+ "options": {
890
+ "name": "example-multiple-hints",
891
+ "fieldset": {
892
+ "legend": {
893
+ "text": "Have you changed your name?"
894
+ }
895
+ },
896
+ "hint": {
897
+ "text": "This includes changing your last name or spelling your name differently."
898
+ },
899
+ "items": [
900
+ {
901
+ "hint": {
902
+ "text": "Hint for yes option here"
903
+ }
904
+ },
905
+ {
906
+ "hint": {
907
+ "text": "Hint for no option here"
908
+ }
909
+ }
910
+ ]
911
+ },
912
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"example-multiple-hints-hint\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n Have you changed your name?\n \n </legend>\n \n\n <div id=\"example-multiple-hints-hint\" class=\"govuk-hint\">\n This includes changing your last name or spelling your name differently.\n </div>\n\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-multiple-hints\" name=\"example-multiple-hints\" type=\"radio\" value=\"\" aria-describedby=\"example-multiple-hints-item-hint\">\n \n \n <div id=\"example-multiple-hints-item-hint\" class=\"govuk-hint govuk-radios__hint\">\n Hint for yes option here\n </div>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-multiple-hints-2\" name=\"example-multiple-hints\" type=\"radio\" value=\"\" aria-describedby=\"example-multiple-hints-2-item-hint\">\n \n \n <div id=\"example-multiple-hints-2-item-hint\" class=\"govuk-hint govuk-radios__hint\">\n Hint for no option here\n </div>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
913
+ },
914
+ {
915
+ "name": "with describedBy and hint",
916
+ "options": {
917
+ "name": "example-hint-describedby",
918
+ "fieldset": {
919
+ "describedBy": "some-id",
920
+ "legend": {
921
+ "text": "Have you changed your name?"
922
+ }
923
+ },
924
+ "hint": {
925
+ "text": "This includes changing your last name or spelling your name differently."
926
+ }
927
+ },
928
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"some-id example-hint-describedby-hint\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n Have you changed your name?\n \n </legend>\n \n\n <div id=\"example-hint-describedby-hint\" class=\"govuk-hint\">\n This includes changing your last name or spelling your name differently.\n </div>\n\n\n <div class=\"govuk-radios\">\n \n </div>\n \n\n</fieldset>\n\n\n</div>"
929
+ },
930
+ {
931
+ "name": "with error message",
932
+ "options": {
933
+ "name": "example-error-message",
934
+ "errorMessage": {
935
+ "text": "Please select an option"
936
+ }
937
+ },
938
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n\n <span id=\"example-error-message-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Please select an option\n </span>\n\n <div class=\"govuk-radios\">\n \n </div>\n\n</div>"
939
+ },
940
+ {
941
+ "name": "with error message and idPrefix",
942
+ "options": {
943
+ "name": "example-error-message",
944
+ "idPrefix": "id-prefix",
945
+ "errorMessage": {
946
+ "text": "Please select an option"
947
+ }
948
+ },
949
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n\n <span id=\"id-prefix-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Please select an option\n </span>\n\n <div class=\"govuk-radios\">\n \n </div>\n\n</div>"
950
+ },
951
+ {
952
+ "name": "with hint and error message",
953
+ "options": {
954
+ "name": "example-error-message-hint",
955
+ "errorMessage": {
956
+ "text": "Please select an option"
957
+ },
958
+ "fieldset": {
959
+ "legend": {
960
+ "text": "Have you changed your name?"
961
+ }
962
+ },
963
+ "hint": {
964
+ "text": "This includes changing your last name or spelling your name differently."
965
+ }
966
+ },
967
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"example-error-message-hint-hint example-error-message-hint-error\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n Have you changed your name?\n \n </legend>\n \n\n <div id=\"example-error-message-hint-hint\" class=\"govuk-hint\">\n This includes changing your last name or spelling your name differently.\n </div>\n\n\n \n \n <span id=\"example-error-message-hint-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Please select an option\n </span>\n\n <div class=\"govuk-radios\">\n \n </div>\n \n\n</fieldset>\n\n\n</div>"
968
+ },
969
+ {
970
+ "name": "with hint, error message and describedBy",
971
+ "options": {
972
+ "name": "example-error-message-hint",
973
+ "errorMessage": {
974
+ "text": "Please select an option"
975
+ },
976
+ "fieldset": {
977
+ "describedBy": "some-id",
978
+ "legend": {
979
+ "text": "Have you changed your name?"
980
+ }
981
+ },
982
+ "hint": {
983
+ "text": "This includes changing your last name or spelling your name differently."
984
+ }
985
+ },
986
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"some-id example-error-message-hint-hint example-error-message-hint-error\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n Have you changed your name?\n \n </legend>\n \n\n <div id=\"example-error-message-hint-hint\" class=\"govuk-hint\">\n This includes changing your last name or spelling your name differently.\n </div>\n\n\n \n \n <span id=\"example-error-message-hint-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Please select an option\n </span>\n\n <div class=\"govuk-radios\">\n \n </div>\n \n\n</fieldset>\n\n\n</div>"
987
+ },
988
+ {
989
+ "name": "label with attributes",
990
+ "options": {
991
+ "items": [
992
+ {
993
+ "value": "yes",
994
+ "text": "Yes",
995
+ "label": {
996
+ "attributes": {
997
+ "data-attribute": "value",
998
+ "data-second-attribute": "second-value"
999
+ }
1000
+ }
1001
+ }
1002
+ ]
1003
+ },
1004
+ "html": "<div class=\"govuk-form-group\">\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"\" name=\"\" type=\"radio\" value=\"yes\">\n <label class=\"govuk-label govuk-radios__label\" data-attribute=\"value\" data-second-attribute=\"second-value\">\n Yes\n </label>\n \n </div>\n \n \n \n \n </div>\n\n</div>"
1005
+ },
1006
+ {
1007
+ "name": "fieldset params",
1008
+ "options": {
1009
+ "name": "example-fieldset-params",
1010
+ "fieldset": {
1011
+ "classes": "app-fieldset--custom-modifier",
1012
+ "legend": {
1013
+ "text": "Have you changed your name?"
1014
+ },
1015
+ "attributes": {
1016
+ "data-attribute": "value",
1017
+ "data-second-attribute": "second-value"
1018
+ }
1019
+ },
1020
+ "hint": {
1021
+ "text": "This includes changing your last name or spelling your name differently."
1022
+ }
1023
+ },
1024
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset app-fieldset--custom-modifier\" aria-describedby=\"example-fieldset-params-hint\" data-attribute=\"value\" data-second-attribute=\"second-value\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n Have you changed your name?\n \n </legend>\n \n\n <div id=\"example-fieldset-params-hint\" class=\"govuk-hint\">\n This includes changing your last name or spelling your name differently.\n </div>\n\n\n <div class=\"govuk-radios\">\n \n </div>\n \n\n</fieldset>\n\n\n</div>"
1025
+ },
1026
+ {
1027
+ "name": "fieldset with html",
1028
+ "options": {
1029
+ "fieldset": {
1030
+ "legend": {
1031
+ "html": "Have <b>you</b> changed your name?"
1032
+ }
1033
+ }
1034
+ },
1035
+ "html": "<div class=\"govuk-form-group\">\n\n <fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n Have <b>you</b> changed your name?\n \n </legend>\n \n\n <div class=\"govuk-radios\">\n \n </div>\n \n\n</fieldset>\n\n\n</div>"
1036
+ },
1037
+ {
1038
+ "name": "with fieldset, error message and describedBy",
1039
+ "options": {
1040
+ "idPrefix": "example",
1041
+ "name": "example",
1042
+ "errorMessage": {
1043
+ "text": "Please select an option"
1044
+ },
1045
+ "fieldset": {
1046
+ "describedBy": "some-id",
1047
+ "legend": {
1048
+ "text": "Have you changed your name?"
1049
+ }
1050
+ },
1051
+ "items": [
1052
+ {
1053
+ "value": "yes",
1054
+ "text": "Yes"
1055
+ },
1056
+ {
1057
+ "value": "no",
1058
+ "text": "No",
1059
+ "checked": true
1060
+ }
1061
+ ]
1062
+ },
1063
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"some-id example-error\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n Have you changed your name?\n \n </legend>\n \n\n <span id=\"example-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Please select an option\n </span>\n\n <div class=\"govuk-radios\">\n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example\" name=\"example\" type=\"radio\" value=\"yes\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example\">\n Yes\n </label>\n \n </div>\n \n \n \n \n \n \n \n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-2\" name=\"example\" type=\"radio\" value=\"no\" checked>\n <label class=\"govuk-label govuk-radios__label\" for=\"example-2\">\n No\n </label>\n \n </div>\n \n \n \n \n </div>\n \n\n</fieldset>\n\n\n</div>"
1064
+ }
1065
+ ]
1066
+ }