govuk_publishing_components 23.12.1 → 23.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/govuk_publishing_components/take-action-amber.svg +4 -0
  3. data/app/assets/images/govuk_publishing_components/take-action-green.svg +4 -0
  4. data/app/assets/images/govuk_publishing_components/take-action-red.svg +4 -0
  5. data/app/assets/javascripts/govuk_publishing_components/components/header.js +3 -0
  6. data/app/assets/javascripts/govuk_publishing_components/components/layout-header.js +5 -0
  7. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +32 -36
  8. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +66 -14
  9. data/app/assets/javascripts/govuk_publishing_components/modules.js +1 -1
  10. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +0 -1
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +34 -17
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +8 -8
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +5 -0
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_show-password.scss +4 -0
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +19 -7
  16. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +17 -6
  17. data/app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak.scss +5 -0
  18. data/app/views/govuk_publishing_components/components/_button.html.erb +1 -0
  19. data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +2 -8
  20. data/app/views/govuk_publishing_components/components/_document_list.html.erb +1 -1
  21. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +4 -2
  22. data/app/views/govuk_publishing_components/components/_layout_header.html.erb +3 -2
  23. data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +2 -2
  24. data/app/views/govuk_publishing_components/components/_subscription-links.html.erb +3 -0
  25. data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +82 -0
  26. data/app/views/govuk_publishing_components/components/_translation-nav.html.erb +3 -0
  27. data/app/views/govuk_publishing_components/components/_translation_nav.html.erb +30 -0
  28. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +21 -0
  29. data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +60 -1
  30. data/app/views/govuk_publishing_components/components/docs/document_list.yml +8 -0
  31. data/app/views/govuk_publishing_components/components/docs/layout_header.yml +21 -0
  32. data/app/views/govuk_publishing_components/components/docs/meta_tags.yml +99 -1
  33. data/app/views/govuk_publishing_components/components/docs/subscription-links.yml +3 -0
  34. data/app/views/govuk_publishing_components/components/docs/subscription_links.yml +100 -0
  35. data/app/views/govuk_publishing_components/components/docs/translation-nav.yml +3 -1
  36. data/app/views/govuk_publishing_components/components/docs/translation_nav.yml +137 -0
  37. data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +3 -3
  38. data/config/initializers/assets.rb +3 -0
  39. data/config/locales/cy.yml +6 -1
  40. data/config/locales/en.yml +8 -3
  41. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +124 -2
  42. data/lib/govuk_publishing_components/presenters/meta_tags.rb +2 -0
  43. data/lib/govuk_publishing_components/version.rb +1 -1
  44. data/node_modules/govuk-frontend/govuk/all.js +57 -0
  45. data/node_modules/govuk-frontend/govuk/components/_all.scss +1 -0
  46. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +25 -10
  47. data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +12 -6
  48. data/node_modules/govuk-frontend/govuk/components/back-link/macro-options.json +4 -4
  49. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +34 -13
  50. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro-options.json +1 -0
  51. data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +74 -31
  52. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +72 -15
  53. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +1 -1
  54. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +145 -52
  55. data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +2 -2
  56. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +84 -34
  57. data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +1 -1
  58. data/node_modules/govuk-frontend/govuk/components/date-input/template.njk +1 -1
  59. data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +34 -14
  60. data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +21 -10
  61. data/node_modules/govuk-frontend/govuk/components/error-message/macro-options.json +1 -0
  62. data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +2 -12
  63. data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +86 -25
  64. data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +20 -10
  65. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +60 -13
  66. data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +37 -18
  67. data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +8 -5
  68. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +36 -18
  69. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +2 -2
  70. data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +17 -8
  71. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +130 -40
  72. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +1 -1
  73. data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +17 -8
  74. data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +20 -11
  75. data/node_modules/govuk-frontend/govuk/components/label/macro-options.json +1 -1
  76. data/node_modules/govuk-frontend/govuk/components/notification-banner/README.md +15 -0
  77. data/node_modules/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
  78. data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
  79. data/node_modules/govuk-frontend/govuk/components/notification-banner/fixtures.json +212 -0
  80. data/node_modules/govuk-frontend/govuk/components/notification-banner/macro-options.json +68 -0
  81. data/node_modules/govuk-frontend/govuk/components/notification-banner/macro.njk +3 -0
  82. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +61 -0
  83. data/node_modules/govuk-frontend/govuk/components/notification-banner/template.njk +47 -0
  84. data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +30 -13
  85. data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +20 -9
  86. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +167 -50
  87. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +97 -18
  88. data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +1 -1
  89. data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +21 -9
  90. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +118 -25
  91. data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +92 -22
  92. data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +75 -18
  93. data/node_modules/govuk-frontend/govuk/components/tabs/macro-options.json +1 -1
  94. data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +28 -14
  95. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +68 -17
  96. data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +19 -14
  97. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +94 -0
  98. data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +9 -0
  99. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +3 -0
  100. data/node_modules/govuk-frontend/package.json +1 -1
  101. metadata +18 -4
  102. data/app/assets/stylesheets/govuk_publishing_components/components/_transition-countdown.scss +0 -125
  103. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_related_links.html.erb +0 -6
@@ -15,7 +15,8 @@
15
15
  }
16
16
  ]
17
17
  },
18
- "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section\">Sub-section</a>\n </li>\n \n \n </ol>\n</div>"
18
+ "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section\">Sub-section</a>\n </li>\n \n \n </ol>\n</div>",
19
+ "hidden": false
19
20
  },
20
21
  {
21
22
  "name": "with one level",
@@ -27,7 +28,8 @@
27
28
  }
28
29
  ]
29
30
  },
30
- "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n </ol>\n</div>"
31
+ "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n </ol>\n</div>",
32
+ "hidden": false
31
33
  },
32
34
  {
33
35
  "name": "with multiple levels",
@@ -51,7 +53,8 @@
51
53
  }
52
54
  ]
53
55
  },
54
- "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section\">Sub-section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section/sub-sub-section\">Sub Sub-section</a>\n </li>\n \n \n </ol>\n</div>"
56
+ "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section\">Sub-section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section/sub-sub-section\">Sub Sub-section</a>\n </li>\n \n \n </ol>\n</div>",
57
+ "hidden": false
55
58
  },
56
59
  {
57
60
  "name": "without the home section",
@@ -67,7 +70,8 @@
67
70
  }
68
71
  ]
69
72
  },
70
- "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/service-manual\">Service Manual</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/service-manual/agile-delivery\">Agile Delivery</a>\n </li>\n \n \n </ol>\n</div>"
73
+ "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/service-manual\">Service Manual</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/service-manual/agile-delivery\">Agile Delivery</a>\n </li>\n \n \n </ol>\n</div>",
74
+ "hidden": false
71
75
  },
72
76
  {
73
77
  "name": "with last breadcrumb as current page",
@@ -86,7 +90,8 @@
86
90
  }
87
91
  ]
88
92
  },
89
- "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/browse/abroad\">Passports, travel and living abroad</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">Travel abroad</li>\n \n \n </ol>\n</div>"
93
+ "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/browse/abroad\">Passports, travel and living abroad</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">Travel abroad</li>\n \n \n </ol>\n</div>",
94
+ "hidden": false
90
95
  },
91
96
  {
92
97
  "name": "with collapse on mobile",
@@ -107,14 +112,21 @@
107
112
  }
108
113
  ]
109
114
  },
110
- "html": "<div class=\"govuk-breadcrumbs govuk-breadcrumbs--collapse-on-mobile\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/education\">Education, training and skills</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/education/special-educational-needs-and-disability-send-and-high-needs\">Special educational needs and disability (SEND) and high needs</a>\n </li>\n \n \n </ol>\n</div>"
115
+ "html": "<div class=\"govuk-breadcrumbs govuk-breadcrumbs--collapse-on-mobile\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/education\">Education, training and skills</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/education/special-educational-needs-and-disability-send-and-high-needs\">Special educational needs and disability (SEND) and high needs</a>\n </li>\n \n \n </ol>\n</div>",
116
+ "hidden": false
111
117
  },
112
118
  {
113
119
  "name": "classes",
114
120
  "options": {
115
- "classes": "app-breadcrumbs--custom-modifier"
121
+ "classes": "app-breadcrumbs--custom-modifier",
122
+ "items": [
123
+ {
124
+ "text": "Home"
125
+ }
126
+ ]
116
127
  },
117
- "html": "<div class=\"govuk-breadcrumbs app-breadcrumbs--custom-modifier\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n </ol>\n</div>"
128
+ "html": "<div class=\"govuk-breadcrumbs app-breadcrumbs--custom-modifier\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">Home</li>\n \n \n </ol>\n</div>",
129
+ "hidden": true
118
130
  },
119
131
  {
120
132
  "name": "attributes",
@@ -122,9 +134,15 @@
122
134
  "attributes": {
123
135
  "id": "my-navigation",
124
136
  "role": "navigation"
125
- }
137
+ },
138
+ "items": [
139
+ {
140
+ "text": "Home"
141
+ }
142
+ ]
126
143
  },
127
- "html": "<div class=\"govuk-breadcrumbs \" id=\"my-navigation\" role=\"navigation\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n </ol>\n</div>"
144
+ "html": "<div class=\"govuk-breadcrumbs \" id=\"my-navigation\" role=\"navigation\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">Home</li>\n \n \n </ol>\n</div>",
145
+ "hidden": true
128
146
  },
129
147
  {
130
148
  "name": "item attributes",
@@ -140,7 +158,8 @@
140
158
  }
141
159
  ]
142
160
  },
143
- "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\" data-attribute=\"my-attribute\" data-attribute-2=\"my-attribute-2\">Section 1</a>\n </li>\n \n \n </ol>\n</div>"
161
+ "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\" data-attribute=\"my-attribute\" data-attribute-2=\"my-attribute-2\">Section 1</a>\n </li>\n \n \n </ol>\n</div>",
162
+ "hidden": true
144
163
  },
145
164
  {
146
165
  "name": "html as text",
@@ -151,7 +170,8 @@
151
170
  }
152
171
  ]
153
172
  },
154
- "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">&lt;span&gt;Section 1&lt;/span&gt;</li>\n \n \n </ol>\n</div>"
173
+ "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">&lt;span&gt;Section 1&lt;/span&gt;</li>\n \n \n </ol>\n</div>",
174
+ "hidden": true
155
175
  },
156
176
  {
157
177
  "name": "html",
@@ -166,7 +186,8 @@
166
186
  }
167
187
  ]
168
188
  },
169
- "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\"><em>Section 1</em></li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section-2\"><em>Section 2</em></a>\n </li>\n \n \n </ol>\n</div>"
189
+ "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\"><em>Section 1</em></li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section-2\"><em>Section 2</em></a>\n </li>\n \n \n </ol>\n</div>",
190
+ "hidden": true
170
191
  }
171
192
  ]
172
193
  }
@@ -26,6 +26,7 @@
26
26
  {
27
27
  "name": "attributes",
28
28
  "type": "object",
29
+ "required": false,
29
30
  "description": "HTML attributes (for example data attributes) to add to the individual crumb."
30
31
  }
31
32
  ]
@@ -6,7 +6,8 @@
6
6
  "options": {
7
7
  "text": "Save and continue"
8
8
  },
9
- "html": "<button class=\"govuk-button\" data-module=\"govuk-button\">\n Save and continue\n</button>"
9
+ "html": "<button class=\"govuk-button\" data-module=\"govuk-button\">\n Save and continue\n</button>",
10
+ "hidden": false
10
11
  },
11
12
  {
12
13
  "name": "disabled",
@@ -14,7 +15,8 @@
14
15
  "text": "Disabled button",
15
16
  "disabled": true
16
17
  },
17
- "html": "<button disabled=\"disabled\" aria-disabled=\"true\" class=\"govuk-button govuk-button--disabled\" data-module=\"govuk-button\">\n Disabled button\n</button>"
18
+ "html": "<button disabled=\"disabled\" aria-disabled=\"true\" class=\"govuk-button govuk-button--disabled\" data-module=\"govuk-button\">\n Disabled button\n</button>",
19
+ "hidden": false
18
20
  },
19
21
  {
20
22
  "name": "link",
@@ -22,7 +24,8 @@
22
24
  "text": "Link button",
23
25
  "href": "/"
24
26
  },
25
- "html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\">\n Link button\n</a>"
27
+ "html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\">\n Link button\n</a>",
28
+ "hidden": false
26
29
  },
27
30
  {
28
31
  "name": "link disabled",
@@ -31,7 +34,8 @@
31
34
  "href": "/",
32
35
  "disabled": true
33
36
  },
34
- "html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--disabled\" data-module=\"govuk-button\">\n Disabled link button\n</a>"
37
+ "html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--disabled\" data-module=\"govuk-button\">\n Disabled link button\n</a>",
38
+ "hidden": false
35
39
  },
36
40
  {
37
41
  "name": "start link",
@@ -40,7 +44,8 @@
40
44
  "href": "/",
41
45
  "isStartButton": true
42
46
  },
43
- "html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--start\" data-module=\"govuk-button\">\n Start now link button\n <svg class=\"govuk-button__start-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"17.5\" height=\"19\" viewBox=\"0 0 33 40\" aria-hidden=\"true\" focusable=\"false\">\n <path fill=\"currentColor\" d=\"M0 0h13l20 20-20 20H0l20-20z\"/>\n </svg></a>"
47
+ "html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--start\" data-module=\"govuk-button\">\n Start now link button\n <svg class=\"govuk-button__start-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"17.5\" height=\"19\" viewBox=\"0 0 33 40\" aria-hidden=\"true\" focusable=\"false\">\n <path fill=\"currentColor\" d=\"M0 0h13l20 20-20 20H0l20-20z\"/>\n </svg></a>",
48
+ "hidden": false
44
49
  },
45
50
  {
46
51
  "name": "input",
@@ -49,7 +54,8 @@
49
54
  "name": "start-now",
50
55
  "text": "Start now"
51
56
  },
52
- "html": "<input value=\"Start now\" type=\"submit\" name=\"start-now\" class=\"govuk-button\" data-module=\"govuk-button\">"
57
+ "html": "<input value=\"Start now\" type=\"submit\" name=\"start-now\" class=\"govuk-button\" data-module=\"govuk-button\">",
58
+ "hidden": false
53
59
  },
54
60
  {
55
61
  "name": "input disabled",
@@ -58,7 +64,8 @@
58
64
  "text": "Explicit input button disabled",
59
65
  "disabled": true
60
66
  },
61
- "html": "<input value=\"Explicit input button disabled\" type=\"submit\" disabled=\"disabled\" aria-disabled=\"true\" class=\"govuk-button govuk-button--disabled\" data-module=\"govuk-button\">"
67
+ "html": "<input value=\"Explicit input button disabled\" type=\"submit\" disabled=\"disabled\" aria-disabled=\"true\" class=\"govuk-button govuk-button--disabled\" data-module=\"govuk-button\">",
68
+ "hidden": false
62
69
  },
63
70
  {
64
71
  "name": "prevent double click",
@@ -66,7 +73,8 @@
66
73
  "text": "Submit",
67
74
  "preventDoubleClick": true
68
75
  },
69
- "html": "<button data-prevent-double-click=\"true\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>"
76
+ "html": "<button data-prevent-double-click=\"true\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>",
77
+ "hidden": false
70
78
  },
71
79
  {
72
80
  "name": "with active state",
@@ -75,7 +83,8 @@
75
83
  "text": "Active",
76
84
  "classes": ":active"
77
85
  },
78
- "html": "<button name=\"active\" class=\"govuk-button :active\" data-module=\"govuk-button\">\n Active\n</button>"
86
+ "html": "<button name=\"active\" class=\"govuk-button :active\" data-module=\"govuk-button\">\n Active\n</button>",
87
+ "hidden": false
79
88
  },
80
89
  {
81
90
  "name": "with hover state",
@@ -84,7 +93,8 @@
84
93
  "text": "Hovered",
85
94
  "classes": ":hover"
86
95
  },
87
- "html": "<button name=\"hover\" class=\"govuk-button :hover\" data-module=\"govuk-button\">\n Hovered\n</button>"
96
+ "html": "<button name=\"hover\" class=\"govuk-button :hover\" data-module=\"govuk-button\">\n Hovered\n</button>",
97
+ "hidden": false
88
98
  },
89
99
  {
90
100
  "name": "with focus state",
@@ -93,7 +103,8 @@
93
103
  "text": "Focussed",
94
104
  "classes": ":focus"
95
105
  },
96
- "html": "<button name=\"focus\" class=\"govuk-button :focus\" data-module=\"govuk-button\">\n Focussed\n</button>"
106
+ "html": "<button name=\"focus\" class=\"govuk-button :focus\" data-module=\"govuk-button\">\n Focussed\n</button>",
107
+ "hidden": false
97
108
  },
98
109
  {
99
110
  "name": "Secondary",
@@ -102,7 +113,8 @@
102
113
  "text": "Secondary button",
103
114
  "classes": "govuk-button--secondary"
104
115
  },
105
- "html": "<button name=\"secondary\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">\n Secondary button\n</button>"
116
+ "html": "<button name=\"secondary\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">\n Secondary button\n</button>",
117
+ "hidden": false
106
118
  },
107
119
  {
108
120
  "name": "Secondary disabled",
@@ -112,7 +124,8 @@
112
124
  "classes": "govuk-button--secondary",
113
125
  "disabled": true
114
126
  },
115
- "html": "<button name=\"secondary\" disabled=\"disabled\" aria-disabled=\"true\" class=\"govuk-button govuk-button--secondary govuk-button--disabled\" data-module=\"govuk-button\">\n Secondary button disabled\n</button>"
127
+ "html": "<button name=\"secondary\" disabled=\"disabled\" aria-disabled=\"true\" class=\"govuk-button govuk-button--secondary govuk-button--disabled\" data-module=\"govuk-button\">\n Secondary button disabled\n</button>",
128
+ "hidden": false
116
129
  },
117
130
  {
118
131
  "name": "Secondary link",
@@ -122,7 +135,8 @@
122
135
  "href": "/",
123
136
  "classes": "govuk-button--secondary"
124
137
  },
125
- "html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">\n Secondary button\n</a>"
138
+ "html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">\n Secondary button\n</a>",
139
+ "hidden": false
126
140
  },
127
141
  {
128
142
  "name": "Warning",
@@ -131,7 +145,8 @@
131
145
  "text": "Warning button",
132
146
  "classes": "govuk-button--warning"
133
147
  },
134
- "html": "<button name=\"Warning\" class=\"govuk-button govuk-button--warning\" data-module=\"govuk-button\">\n Warning button\n</button>"
148
+ "html": "<button name=\"Warning\" class=\"govuk-button govuk-button--warning\" data-module=\"govuk-button\">\n Warning button\n</button>",
149
+ "hidden": false
135
150
  },
136
151
  {
137
152
  "name": "Warning disabled",
@@ -141,7 +156,8 @@
141
156
  "classes": "govuk-button--warning",
142
157
  "disabled": true
143
158
  },
144
- "html": "<button name=\"warning\" disabled=\"disabled\" aria-disabled=\"true\" class=\"govuk-button govuk-button--warning govuk-button--disabled\" data-module=\"govuk-button\">\n Warning button disabled\n</button>"
159
+ "html": "<button name=\"warning\" disabled=\"disabled\" aria-disabled=\"true\" class=\"govuk-button govuk-button--warning govuk-button--disabled\" data-module=\"govuk-button\">\n Warning button disabled\n</button>",
160
+ "hidden": false
145
161
  },
146
162
  {
147
163
  "name": "Warning link",
@@ -151,88 +167,107 @@
151
167
  "href": "/",
152
168
  "classes": "govuk-button--warning"
153
169
  },
154
- "html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--warning\" data-module=\"govuk-button\">\n Warning button\n</a>"
170
+ "html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--warning\" data-module=\"govuk-button\">\n Warning button\n</a>",
171
+ "hidden": false
155
172
  },
156
173
  {
157
174
  "name": "attributes",
158
175
  "options": {
159
176
  "element": "button",
177
+ "text": "Submit",
160
178
  "attributes": {
161
179
  "aria-controls": "example-id",
162
180
  "data-tracking-dimension": 123
163
181
  }
164
182
  },
165
- "html": "<button class=\"govuk-button\" data-module=\"govuk-button\" aria-controls=\"example-id\" data-tracking-dimension=\"123\">\n \n</button>"
183
+ "html": "<button class=\"govuk-button\" data-module=\"govuk-button\" aria-controls=\"example-id\" data-tracking-dimension=\"123\">\n Submit\n</button>",
184
+ "hidden": true
166
185
  },
167
186
  {
168
187
  "name": "link attributes",
169
188
  "options": {
170
189
  "element": "a",
190
+ "text": "Submit",
171
191
  "attributes": {
172
192
  "aria-controls": "example-id",
173
193
  "data-tracking-dimension": 123
174
194
  }
175
195
  },
176
- "html": "<a href=\"#\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\" aria-controls=\"example-id\" data-tracking-dimension=\"123\">\n \n</a>"
196
+ "html": "<a href=\"#\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\" aria-controls=\"example-id\" data-tracking-dimension=\"123\">\n Submit\n</a>",
197
+ "hidden": true
177
198
  },
178
199
  {
179
200
  "name": "input attributes",
180
201
  "options": {
181
202
  "element": "input",
203
+ "text": "Submit",
182
204
  "attributes": {
183
205
  "aria-controls": "example-id",
184
206
  "data-tracking-dimension": 123
185
207
  }
186
208
  },
187
- "html": "<input value=\"\" type=\"submit\" class=\"govuk-button\" data-module=\"govuk-button\" aria-controls=\"example-id\" data-tracking-dimension=\"123\">"
209
+ "html": "<input value=\"Submit\" type=\"submit\" class=\"govuk-button\" data-module=\"govuk-button\" aria-controls=\"example-id\" data-tracking-dimension=\"123\">",
210
+ "hidden": true
188
211
  },
189
212
  {
190
213
  "name": "classes",
191
214
  "options": {
215
+ "text": "Submit",
192
216
  "element": "button",
193
217
  "classes": "app-button--custom-modifier"
194
218
  },
195
- "html": "<button class=\"govuk-button app-button--custom-modifier\" data-module=\"govuk-button\">\n \n</button>"
219
+ "html": "<button class=\"govuk-button app-button--custom-modifier\" data-module=\"govuk-button\">\n Submit\n</button>",
220
+ "hidden": true
196
221
  },
197
222
  {
198
223
  "name": "link classes",
199
224
  "options": {
225
+ "text": "Submit",
200
226
  "element": "a",
201
227
  "classes": "app-button--custom-modifier"
202
228
  },
203
- "html": "<a href=\"#\" role=\"button\" draggable=\"false\" class=\"govuk-button app-button--custom-modifier\" data-module=\"govuk-button\">\n \n</a>"
229
+ "html": "<a href=\"#\" role=\"button\" draggable=\"false\" class=\"govuk-button app-button--custom-modifier\" data-module=\"govuk-button\">\n Submit\n</a>",
230
+ "hidden": true
204
231
  },
205
232
  {
206
233
  "name": "input classes",
207
234
  "options": {
235
+ "text": "Submit",
208
236
  "element": "input",
209
237
  "classes": "app-button--custom-modifier"
210
238
  },
211
- "html": "<input value=\"\" type=\"submit\" class=\"govuk-button app-button--custom-modifier\" data-module=\"govuk-button\">"
239
+ "html": "<input value=\"Submit\" type=\"submit\" class=\"govuk-button app-button--custom-modifier\" data-module=\"govuk-button\">",
240
+ "hidden": true
212
241
  },
213
242
  {
214
243
  "name": "name",
215
244
  "options": {
245
+ "text": "Submit",
216
246
  "element": "button",
217
247
  "name": "start-now"
218
248
  },
219
- "html": "<button name=\"start-now\" class=\"govuk-button\" data-module=\"govuk-button\">\n \n</button>"
249
+ "html": "<button name=\"start-now\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>",
250
+ "hidden": true
220
251
  },
221
252
  {
222
253
  "name": "type",
223
254
  "options": {
255
+ "text": "Submit",
224
256
  "element": "button",
225
257
  "type": "button"
226
258
  },
227
- "html": "<button type=\"button\" class=\"govuk-button\" data-module=\"govuk-button\">\n \n</button>"
259
+ "html": "<button type=\"button\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>",
260
+ "hidden": true
228
261
  },
229
262
  {
230
263
  "name": "input type",
231
264
  "options": {
265
+ "text": "Submit",
232
266
  "element": "input",
233
267
  "type": "button"
234
268
  },
235
- "html": "<input value=\"\" type=\"button\" class=\"govuk-button\" data-module=\"govuk-button\">"
269
+ "html": "<input value=\"Submit\" type=\"button\" class=\"govuk-button\" data-module=\"govuk-button\">",
270
+ "hidden": true
236
271
  },
237
272
  {
238
273
  "name": "explicit link",
@@ -241,35 +276,43 @@
241
276
  "href": "/",
242
277
  "text": "Continue"
243
278
  },
244
- "html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\">\n Continue\n</a>"
279
+ "html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\">\n Continue\n</a>",
280
+ "hidden": true
245
281
  },
246
282
  {
247
283
  "name": "no href",
248
284
  "options": {
285
+ "text": "Submit",
249
286
  "element": "a"
250
287
  },
251
- "html": "<a href=\"#\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\">\n \n</a>"
288
+ "html": "<a href=\"#\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</a>",
289
+ "hidden": true
252
290
  },
253
291
  {
254
292
  "name": "value",
255
293
  "options": {
294
+ "text": "Submit",
256
295
  "element": "button",
257
296
  "value": "start"
258
297
  },
259
- "html": "<button value=\"start\" class=\"govuk-button\" data-module=\"govuk-button\">\n \n</button>"
298
+ "html": "<button value=\"start\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>",
299
+ "hidden": true
260
300
  },
261
301
  {
262
302
  "name": "html",
263
303
  "options": {
304
+ "text": "Submit",
264
305
  "element": "button",
265
306
  "html": "Start <em>now</em>"
266
307
  },
267
- "html": "<button class=\"govuk-button\" data-module=\"govuk-button\">\n Start <em>now</em>\n</button>"
308
+ "html": "<button class=\"govuk-button\" data-module=\"govuk-button\">\n Start <em>now</em>\n</button>",
309
+ "hidden": true
268
310
  },
269
311
  {
270
312
  "name": "no data",
271
313
  "options": {},
272
- "html": "<button class=\"govuk-button\" data-module=\"govuk-button\">\n \n</button>"
314
+ "html": "<button class=\"govuk-button\" data-module=\"govuk-button\">\n \n</button>",
315
+ "hidden": true
273
316
  }
274
317
  ]
275
318
  }
@@ -11,7 +11,8 @@
11
11
  "text": "Can you provide more detail?"
12
12
  }
13
13
  },
14
- "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"more-detail\">\n Can you provide more detail?\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"more-detail\" name=\"more-detail\" rows=\"5\" aria-describedby=\"more-detail-info\"></textarea>\n</div>\n\n <div id=\"more-detail-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>"
14
+ "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"more-detail\">\n Can you provide more detail?\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"more-detail\" name=\"more-detail\" rows=\"5\" aria-describedby=\"more-detail-info\"></textarea>\n</div>\n\n <div id=\"more-detail-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
15
+ "hidden": false
15
16
  },
16
17
  {
17
18
  "name": "with hint",
@@ -26,7 +27,8 @@
26
27
  "text": "Don't include personal or financial information, eg your National Insurance number or credit card details."
27
28
  }
28
29
  },
29
- "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-hint\">\n Can you provide more detail?\n </label>\n\n \n \n <div id=\"with-hint-hint\" class=\"govuk-hint\">\n Don&#39;t include personal or financial information, eg your National Insurance number or credit card details.\n </div>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-hint\" name=\"with-hint\" rows=\"5\" aria-describedby=\"with-hint-info with-hint-hint\"></textarea>\n</div>\n\n <div id=\"with-hint-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>"
30
+ "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-hint\">\n Can you provide more detail?\n </label>\n\n \n \n <div id=\"with-hint-hint\" class=\"govuk-hint\">\n Don&#39;t include personal or financial information, eg your National Insurance number or credit card details.\n </div>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-hint\" name=\"with-hint\" rows=\"5\" aria-describedby=\"with-hint-info with-hint-hint\"></textarea>\n</div>\n\n <div id=\"with-hint-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
31
+ "hidden": false
30
32
  },
31
33
  {
32
34
  "name": "with default value",
@@ -39,7 +41,8 @@
39
41
  },
40
42
  "value": "221B Baker Street\nLondon\nNW1 6XE\n"
41
43
  },
42
- "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"100\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-default-value\">\n Full address\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-default-value\" name=\"default-value\" rows=\"5\" aria-describedby=\"with-default-value-info\">221B Baker Street\nLondon\nNW1 6XE\n</textarea>\n</div>\n\n <div id=\"with-default-value-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 100 characters\n</div>\n\n</div>"
44
+ "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"100\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-default-value\">\n Full address\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-default-value\" name=\"default-value\" rows=\"5\" aria-describedby=\"with-default-value-info\">221B Baker Street\nLondon\nNW1 6XE\n</textarea>\n</div>\n\n <div id=\"with-default-value-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 100 characters\n</div>\n\n</div>",
45
+ "hidden": false
43
46
  },
44
47
  {
45
48
  "name": "with default value exceeding limit",
@@ -55,7 +58,8 @@
55
58
  "text": "Please do not exceed the maximum allowed limit"
56
59
  }
57
60
  },
58
- "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"exceeding-characters\">\n Full address\n </label>\n\n\n \n \n <span id=\"exceeding-characters-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Please do not exceed the maximum allowed limit\n </span>\n\n <textarea class=\"govuk-textarea govuk-textarea--error govuk-js-character-count govuk-textarea--error\" id=\"exceeding-characters\" name=\"exceeding\" rows=\"5\" aria-describedby=\"exceeding-characters-info exceeding-characters-error\">221B Baker Street\nLondon\nNW1 6XE\n</textarea>\n</div>\n\n <div id=\"exceeding-characters-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>"
61
+ "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"exceeding-characters\">\n Full address\n </label>\n\n\n \n \n <span id=\"exceeding-characters-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Please do not exceed the maximum allowed limit\n </span>\n\n <textarea class=\"govuk-textarea govuk-textarea--error govuk-js-character-count govuk-textarea--error\" id=\"exceeding-characters\" name=\"exceeding\" rows=\"5\" aria-describedby=\"exceeding-characters-info exceeding-characters-error\">221B Baker Street\nLondon\nNW1 6XE\n</textarea>\n</div>\n\n <div id=\"exceeding-characters-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
62
+ "hidden": false
59
63
  },
60
64
  {
61
65
  "name": "with custom rows",
@@ -68,7 +72,8 @@
68
72
  },
69
73
  "rows": 8
70
74
  },
71
- "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"custom-rows\">\n Full address\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"custom-rows\" name=\"custom\" rows=\"8\" aria-describedby=\"custom-rows-info\"></textarea>\n</div>\n\n <div id=\"custom-rows-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>"
75
+ "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"custom-rows\">\n Full address\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"custom-rows\" name=\"custom\" rows=\"8\" aria-describedby=\"custom-rows-info\"></textarea>\n</div>\n\n <div id=\"custom-rows-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
76
+ "hidden": false
72
77
  },
73
78
  {
74
79
  "name": "with label as page heading",
@@ -81,7 +86,8 @@
81
86
  "isPageHeading": true
82
87
  }
83
88
  },
84
- "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <h1 class=\"govuk-label-wrapper\">\n <label class=\"govuk-label\" for=\"textarea-with-page-heading\">\n Full address\n </label>\n </h1>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"textarea-with-page-heading\" name=\"address\" rows=\"5\" aria-describedby=\"textarea-with-page-heading-info\"></textarea>\n</div>\n\n <div id=\"textarea-with-page-heading-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>"
89
+ "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <h1 class=\"govuk-label-wrapper\">\n <label class=\"govuk-label\" for=\"textarea-with-page-heading\">\n Full address\n </label>\n </h1>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"textarea-with-page-heading\" name=\"address\" rows=\"5\" aria-describedby=\"textarea-with-page-heading-info\"></textarea>\n</div>\n\n <div id=\"textarea-with-page-heading-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
90
+ "hidden": false
85
91
  },
86
92
  {
87
93
  "name": "with word count",
@@ -93,7 +99,8 @@
93
99
  "text": "Full address"
94
100
  }
95
101
  },
96
- "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxwords=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"word-count\">\n Full address\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"word-count\" name=\"word-count\" rows=\"5\" aria-describedby=\"word-count-info\"></textarea>\n</div>\n\n <div id=\"word-count-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 words\n</div>\n\n</div>"
102
+ "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxwords=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"word-count\">\n Full address\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"word-count\" name=\"word-count\" rows=\"5\" aria-describedby=\"word-count-info\"></textarea>\n</div>\n\n <div id=\"word-count-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 words\n</div>\n\n</div>",
103
+ "hidden": false
97
104
  },
98
105
  {
99
106
  "name": "with threshold",
@@ -106,65 +113,115 @@
106
113
  "text": "Full address"
107
114
  }
108
115
  },
109
- "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\" data-threshold=\"75\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-threshold\">\n Full address\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-threshold\" name=\"with-threshold\" rows=\"5\" aria-describedby=\"with-threshold-info\"></textarea>\n</div>\n\n <div id=\"with-threshold-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>"
116
+ "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\" data-threshold=\"75\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-threshold\">\n Full address\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-threshold\" name=\"with-threshold\" rows=\"5\" aria-describedby=\"with-threshold-info\"></textarea>\n</div>\n\n <div id=\"with-threshold-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
117
+ "hidden": false
110
118
  },
111
119
  {
112
120
  "name": "classes",
113
121
  "options": {
122
+ "id": "with-classes",
123
+ "name": "with-classes",
124
+ "maxlength": 10,
125
+ "label": {
126
+ "text": "With classes"
127
+ },
114
128
  "classes": "app-character-count--custom-modifier"
115
129
  },
116
- "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\">\n \n\n<div class=\"govuk-form-group\">\n \n\n\n <textarea class=\"govuk-textarea govuk-js-character-count app-character-count--custom-modifier\" id=\"\" name=\"\" rows=\"5\" aria-describedby=\"undefined-info\"></textarea>\n</div>\n\n <div id=\"undefined-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to undefined characters\n</div>\n\n</div>"
130
+ "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-classes\">\n With classes\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count app-character-count--custom-modifier\" id=\"with-classes\" name=\"with-classes\" rows=\"5\" aria-describedby=\"with-classes-info\"></textarea>\n</div>\n\n <div id=\"with-classes-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
131
+ "hidden": true
117
132
  },
118
133
  {
119
134
  "name": "attributes",
120
135
  "options": {
136
+ "id": "with-attributes",
137
+ "name": "with-attributes",
138
+ "maxlength": 10,
139
+ "label": {
140
+ "text": "With attributes"
141
+ },
121
142
  "attributes": {
122
143
  "data-attribute": "my data value"
123
144
  }
124
145
  },
125
- "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\">\n \n\n<div class=\"govuk-form-group\">\n \n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"\" name=\"\" rows=\"5\" aria-describedby=\"undefined-info\" data-attribute=\"my data value\"></textarea>\n</div>\n\n <div id=\"undefined-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to undefined characters\n</div>\n\n</div>"
146
+ "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-attributes\">\n With attributes\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-attributes\" name=\"with-attributes\" rows=\"5\" aria-describedby=\"with-attributes-info\" data-attribute=\"my data value\"></textarea>\n</div>\n\n <div id=\"with-attributes-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
147
+ "hidden": true
126
148
  },
127
149
  {
128
150
  "name": "formGroup with classes",
129
151
  "options": {
152
+ "id": "with-formgroup",
153
+ "name": "with-formgroup",
154
+ "maxlength": 10,
155
+ "label": {
156
+ "text": "With formgroup"
157
+ },
130
158
  "formGroup": {
131
159
  "classes": "app-character-count--custom-modifier"
132
160
  }
133
161
  },
134
- "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\">\n \n\n<div class=\"govuk-form-group app-character-count--custom-modifier\">\n \n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"\" name=\"\" rows=\"5\" aria-describedby=\"undefined-info\"></textarea>\n</div>\n\n <div id=\"undefined-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to undefined characters\n</div>\n\n</div>"
162
+ "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group app-character-count--custom-modifier\">\n <label class=\"govuk-label\" for=\"with-formgroup\">\n With formgroup\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-formgroup\" name=\"with-formgroup\" rows=\"5\" aria-describedby=\"with-formgroup-info\"></textarea>\n</div>\n\n <div id=\"with-formgroup-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
163
+ "hidden": true
135
164
  },
136
165
  {
137
166
  "name": "custom classes on countMessage",
138
167
  "options": {
168
+ "id": "with-custom-countmessage-class",
169
+ "name": "with-custom-countmessage-class",
170
+ "maxlength": 10,
171
+ "label": {
172
+ "text": "With custom countMessage class"
173
+ },
139
174
  "countMessage": {
140
175
  "classes": "app-custom-count-message"
141
176
  }
142
177
  },
143
- "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\">\n \n\n<div class=\"govuk-form-group\">\n \n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"\" name=\"\" rows=\"5\" aria-describedby=\"undefined-info\"></textarea>\n</div>\n\n <div id=\"undefined-info\" class=\"govuk-hint govuk-character-count__message app-custom-count-message\" aria-live=\"polite\">\n You can enter up to undefined characters\n</div>\n\n</div>"
178
+ "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-custom-countmessage-class\">\n With custom countMessage class\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-custom-countmessage-class\" name=\"with-custom-countmessage-class\" rows=\"5\" aria-describedby=\"with-custom-countmessage-class-info\"></textarea>\n</div>\n\n <div id=\"with-custom-countmessage-class-info\" class=\"govuk-hint govuk-character-count__message app-custom-count-message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
179
+ "hidden": true
144
180
  },
145
181
  {
146
182
  "name": "spellcheck enabled",
147
183
  "options": {
184
+ "id": "with-spellcheck",
185
+ "name": "with-spellcheck",
186
+ "maxlength": 10,
187
+ "label": {
188
+ "text": "With spellcheck"
189
+ },
148
190
  "spellcheck": true
149
191
  },
150
- "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\">\n \n\n<div class=\"govuk-form-group\">\n \n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"\" name=\"\" rows=\"5\" spellcheck=\"true\" aria-describedby=\"undefined-info\"></textarea>\n</div>\n\n <div id=\"undefined-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to undefined characters\n</div>\n\n</div>"
192
+ "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-spellcheck\">\n With spellcheck\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-spellcheck\" name=\"with-spellcheck\" rows=\"5\" spellcheck=\"true\" aria-describedby=\"with-spellcheck-info\"></textarea>\n</div>\n\n <div id=\"with-spellcheck-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
193
+ "hidden": true
151
194
  },
152
195
  {
153
196
  "name": "spellcheck disabled",
154
197
  "options": {
198
+ "id": "without-spellcheck",
199
+ "name": "without-spellcheck",
200
+ "maxlength": 10,
201
+ "label": {
202
+ "text": "Without spellcheck"
203
+ },
155
204
  "spellcheck": false
156
205
  },
157
- "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\">\n \n\n<div class=\"govuk-form-group\">\n \n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"\" name=\"\" rows=\"5\" spellcheck=\"false\" aria-describedby=\"undefined-info\"></textarea>\n</div>\n\n <div id=\"undefined-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to undefined characters\n</div>\n\n</div>"
206
+ "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"without-spellcheck\">\n Without spellcheck\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"without-spellcheck\" name=\"without-spellcheck\" rows=\"5\" spellcheck=\"false\" aria-describedby=\"without-spellcheck-info\"></textarea>\n</div>\n\n <div id=\"without-spellcheck-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
207
+ "hidden": true
158
208
  },
159
209
  {
160
210
  "name": "custom classes with error message",
161
211
  "options": {
212
+ "id": "with-custom-error-class",
213
+ "name": "with-custom-error-class",
214
+ "maxlength": 10,
215
+ "label": {
216
+ "text": "With custom error class"
217
+ },
162
218
  "classes": "app-character-count--custom-modifier",
163
219
  "errorMessage": {
164
220
  "text": "Error message"
165
221
  }
166
222
  },
167
- "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\">\n \n\n<div class=\"govuk-form-group govuk-form-group--error\">\n \n\n\n \n \n <span id=\"undefined-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </span>\n\n <textarea class=\"govuk-textarea govuk-textarea--error govuk-js-character-count govuk-textarea--error app-character-count--custom-modifier\" id=\"\" name=\"\" rows=\"5\" aria-describedby=\"undefined-info undefined-error\"></textarea>\n</div>\n\n <div id=\"undefined-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to undefined characters\n</div>\n\n</div>"
223
+ "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"with-custom-error-class\">\n With custom error class\n </label>\n\n\n \n \n <span id=\"with-custom-error-class-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </span>\n\n <textarea class=\"govuk-textarea govuk-textarea--error govuk-js-character-count govuk-textarea--error app-character-count--custom-modifier\" id=\"with-custom-error-class\" name=\"with-custom-error-class\" rows=\"5\" aria-describedby=\"with-custom-error-class-info with-custom-error-class-error\"></textarea>\n</div>\n\n <div id=\"with-custom-error-class-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
224
+ "hidden": true
168
225
  }
169
226
  ]
170
227
  }