govuk_publishing_components 23.2.1 → 23.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics/init.js +23 -15
  3. data/app/assets/javascripts/govuk_publishing_components/components/copy-to-clipboard.js +16 -14
  4. data/app/assets/javascripts/govuk_publishing_components/components/details.js +38 -34
  5. data/app/assets/javascripts/govuk_publishing_components/components/print-link.js +8 -7
  6. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +10 -9
  7. data/app/assets/javascripts/govuk_publishing_components/lib/initial-focus.js +13 -0
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +1 -0
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +0 -46
  10. data/app/views/govuk_publishing_components/component_guide/show.html.erb +1 -2
  11. data/app/views/govuk_publishing_components/components/_attachment.html.erb +5 -4
  12. data/app/views/govuk_publishing_components/components/_input.html.erb +6 -6
  13. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +5 -3
  14. data/app/views/govuk_publishing_components/components/docs/attachment.yml +10 -0
  15. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +55 -0
  16. data/config/locales/cy.yml +4 -1
  17. data/config/locales/en.yml +4 -0
  18. data/lib/govuk_publishing_components/version.rb +1 -1
  19. data/node_modules/govuk-frontend/govuk/all.js +31 -37
  20. data/node_modules/govuk-frontend/govuk/components/accordion/README.md +1 -1
  21. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +0 -1
  22. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +235 -0
  23. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +0 -2
  24. data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +56 -0
  25. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +0 -1
  26. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +172 -0
  27. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +3 -3
  28. data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +275 -0
  29. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +170 -0
  30. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +13 -13
  31. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +1015 -0
  32. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +499 -0
  33. data/node_modules/govuk-frontend/govuk/components/details/_index.scss +0 -1
  34. data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +83 -0
  35. data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +66 -0
  36. data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +0 -2
  37. data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +181 -0
  38. data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +1 -1
  39. data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +93 -0
  40. data/node_modules/govuk-frontend/govuk/components/fieldset/macro-options.json +6 -0
  41. data/node_modules/govuk-frontend/govuk/components/fieldset/template.njk +5 -1
  42. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +151 -0
  43. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +0 -1
  44. data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +482 -0
  45. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +2 -5
  46. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +360 -0
  47. data/node_modules/govuk-frontend/govuk/components/header/header.js +665 -316
  48. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +13 -1
  49. data/node_modules/govuk-frontend/govuk/components/header/template.njk +9 -5
  50. data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +0 -2
  51. data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +50 -0
  52. data/node_modules/govuk-frontend/govuk/components/hint/macro-options.json +1 -1
  53. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +91 -0
  54. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +538 -0
  55. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +64 -0
  56. data/node_modules/govuk-frontend/govuk/components/input/template.njk +17 -0
  57. data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +49 -0
  58. data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +75 -0
  59. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +6 -2
  60. data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +74 -0
  61. data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +65 -0
  62. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +13 -13
  63. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +1066 -0
  64. data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +2 -2
  65. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +0 -1
  66. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +248 -0
  67. data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +72 -0
  68. data/node_modules/govuk-frontend/govuk/components/summary-list/README.md +1 -1
  69. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +2 -10
  70. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +991 -0
  71. data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +468 -0
  72. data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +3 -6
  73. data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +229 -0
  74. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +0 -1
  75. data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +117 -0
  76. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +0 -1
  77. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +199 -0
  78. data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +0 -1
  79. data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +68 -0
  80. data/node_modules/govuk-frontend/govuk/helpers/_device-pixels.scss +3 -3
  81. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +9 -11
  82. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +1 -3
  83. data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +1 -5
  84. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +2 -1
  85. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +7 -6
  86. data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +0 -1
  87. data/node_modules/govuk-frontend/govuk/objects/_grid.scss +2 -3
  88. data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +0 -1
  89. data/node_modules/govuk-frontend/govuk/overrides/_display.scss +1 -1
  90. data/node_modules/govuk-frontend/govuk/overrides/_width.scss +1 -0
  91. data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +0 -3
  92. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
  93. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +9 -2
  94. data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +0 -1
  95. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +0 -4
  96. data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +2 -2
  97. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +11 -5
  98. data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +6 -2
  99. data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +0 -3
  100. data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +0 -3
  101. data/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss +0 -1
  102. data/node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss +0 -4
  103. data/node_modules/govuk-frontend/package.json +1 -1
  104. metadata +32 -3
  105. data/app/assets/javascripts/govuk_publishing_components/components/initial-focus.js +0 -12
@@ -1,5 +1,4 @@
1
1
  @include govuk-exports("govuk/component/tabs") {
2
-
3
2
  .govuk-tabs {
4
3
  @include govuk-responsive-margin(1, "top");
5
4
  @include govuk-responsive-margin(6, "bottom");
@@ -22,7 +21,7 @@
22
21
  @include govuk-font($size: 19);
23
22
  margin-left: govuk-spacing(5);
24
23
 
25
- &::before {
24
+ &:before {
26
25
  @include govuk-text-colour;
27
26
  content: "\2014 "; // "— "
28
27
  margin-left: - govuk-spacing(5);
@@ -51,7 +50,6 @@
51
50
  .js-enabled {
52
51
 
53
52
  @include govuk-media-query($from: tablet) {
54
-
55
53
  .govuk-tabs__list {
56
54
  @include govuk-clearfix;
57
55
  margin-bottom: 0;
@@ -74,7 +72,7 @@
74
72
  background-color: govuk-colour("light-grey", $legacy: "grey-4");
75
73
  text-align: center;
76
74
 
77
- &::before {
75
+ &:before {
78
76
  content: none;
79
77
  }
80
78
  }
@@ -108,7 +106,7 @@
108
106
 
109
107
  margin-bottom: 0;
110
108
 
111
- &::after {
109
+ &:after {
112
110
  content: "";
113
111
  position: absolute;
114
112
  top: 0;
@@ -133,6 +131,5 @@
133
131
  display: none;
134
132
  }
135
133
  }
136
-
137
134
  }
138
135
  }
@@ -0,0 +1,229 @@
1
+ {
2
+ "component": "tabs",
3
+ "fixtures": [
4
+ {
5
+ "name": "default",
6
+ "options": {
7
+ "items": [
8
+ {
9
+ "label": "Past day",
10
+ "id": "past-day",
11
+ "panel": {
12
+ "html": "<h2 class=\"govuk-heading-l\">Past day</h2>\n<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Case manager</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases opened</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases closed</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">David Francis</td>\n <td class=\"govuk-table__cell\">3</td>\n <td class=\"govuk-table__cell\">0</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Paul Farmer</td>\n <td class=\"govuk-table__cell\">1</td>\n <td class=\"govuk-table__cell\">0</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Rita Patel</td>\n <td class=\"govuk-table__cell\">2</td>\n <td class=\"govuk-table__cell\">0</td>\n </tr>\n </tbody>\n</table>\n"
13
+ }
14
+ },
15
+ {
16
+ "label": "Past week",
17
+ "id": "past-week",
18
+ "panel": {
19
+ "html": "<h2 class=\"govuk-heading-l\">Past week</h2>\n<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Case manager</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases opened</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases closed</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">David Francis</td>\n <td class=\"govuk-table__cell\">24</td>\n <td class=\"govuk-table__cell\">18</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Paul Farmer</td>\n <td class=\"govuk-table__cell\">16</td>\n <td class=\"govuk-table__cell\">20</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Rita Patel</td>\n <td class=\"govuk-table__cell\">24</td>\n <td class=\"govuk-table__cell\">27</td>\n </tr>\n </tbody>\n</table>\n"
20
+ }
21
+ },
22
+ {
23
+ "label": "Past month",
24
+ "id": "past-month",
25
+ "panel": {
26
+ "html": "<h2 class=\"govuk-heading-l\">Past month</h2>\n<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Case manager</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases opened</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases closed</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">David Francis</td>\n <td class=\"govuk-table__cell\">98</td>\n <td class=\"govuk-table__cell\">95</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Paul Farmer</td>\n <td class=\"govuk-table__cell\">122</td>\n <td class=\"govuk-table__cell\">131</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Rita Patel</td>\n <td class=\"govuk-table__cell\">126</td>\n <td class=\"govuk-table__cell\">142</td>\n </tr>\n </tbody>\n</table>\n"
27
+ }
28
+ },
29
+ {
30
+ "label": "Past year",
31
+ "id": "past-year",
32
+ "panel": {
33
+ "html": "<h2 class=\"govuk-heading-l\">Past year</h2>\n<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Case manager</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases opened</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases closed</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">David Francis</td>\n <td class=\"govuk-table__cell\">1380</td>\n <td class=\"govuk-table__cell\">1472</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Paul Farmer</td>\n <td class=\"govuk-table__cell\">1129</td>\n <td class=\"govuk-table__cell\">1083</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Rita Patel</td>\n <td class=\"govuk-table__cell\">1539</td>\n <td class=\"govuk-table__cell\">1265</td>\n </tr>\n </tbody>\n</table>\n"
34
+ }
35
+ }
36
+ ]
37
+ },
38
+ "html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#past-day\">\n Past day\n </a>\n </li>\n \n \n \n \n <li class=\"govuk-tabs__list-item\">\n <a class=\"govuk-tabs__tab\" href=\"#past-week\">\n Past week\n </a>\n </li>\n \n \n \n \n <li class=\"govuk-tabs__list-item\">\n <a class=\"govuk-tabs__tab\" href=\"#past-month\">\n Past month\n </a>\n </li>\n \n \n \n \n <li class=\"govuk-tabs__list-item\">\n <a class=\"govuk-tabs__tab\" href=\"#past-year\">\n Past year\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"past-day\">\n <h2 class=\"govuk-heading-l\">Past day</h2>\n<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Case manager</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases opened</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases closed</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">David Francis</td>\n <td class=\"govuk-table__cell\">3</td>\n <td class=\"govuk-table__cell\">0</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Paul Farmer</td>\n <td class=\"govuk-table__cell\">1</td>\n <td class=\"govuk-table__cell\">0</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Rita Patel</td>\n <td class=\"govuk-table__cell\">2</td>\n <td class=\"govuk-table__cell\">0</td>\n </tr>\n </tbody>\n</table>\n\n </div>\n \n \n \n \n <div class=\"govuk-tabs__panel govuk-tabs__panel--hidden\" id=\"past-week\">\n <h2 class=\"govuk-heading-l\">Past week</h2>\n<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Case manager</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases opened</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases closed</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">David Francis</td>\n <td class=\"govuk-table__cell\">24</td>\n <td class=\"govuk-table__cell\">18</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Paul Farmer</td>\n <td class=\"govuk-table__cell\">16</td>\n <td class=\"govuk-table__cell\">20</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Rita Patel</td>\n <td class=\"govuk-table__cell\">24</td>\n <td class=\"govuk-table__cell\">27</td>\n </tr>\n </tbody>\n</table>\n\n </div>\n \n \n \n \n <div class=\"govuk-tabs__panel govuk-tabs__panel--hidden\" id=\"past-month\">\n <h2 class=\"govuk-heading-l\">Past month</h2>\n<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Case manager</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases opened</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases closed</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">David Francis</td>\n <td class=\"govuk-table__cell\">98</td>\n <td class=\"govuk-table__cell\">95</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Paul Farmer</td>\n <td class=\"govuk-table__cell\">122</td>\n <td class=\"govuk-table__cell\">131</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Rita Patel</td>\n <td class=\"govuk-table__cell\">126</td>\n <td class=\"govuk-table__cell\">142</td>\n </tr>\n </tbody>\n</table>\n\n </div>\n \n \n \n \n <div class=\"govuk-tabs__panel govuk-tabs__panel--hidden\" id=\"past-year\">\n <h2 class=\"govuk-heading-l\">Past year</h2>\n<table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Case manager</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases opened</th>\n <th class=\"govuk-table__header\" scope=\"col\">Cases closed</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">David Francis</td>\n <td class=\"govuk-table__cell\">1380</td>\n <td class=\"govuk-table__cell\">1472</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Paul Farmer</td>\n <td class=\"govuk-table__cell\">1129</td>\n <td class=\"govuk-table__cell\">1083</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">Rita Patel</td>\n <td class=\"govuk-table__cell\">1539</td>\n <td class=\"govuk-table__cell\">1265</td>\n </tr>\n </tbody>\n</table>\n\n </div>\n \n \n</div>"
39
+ },
40
+ {
41
+ "name": "tabs-with-anchor-in-panel",
42
+ "options": {
43
+ "items": [
44
+ {
45
+ "label": "Tab 1",
46
+ "id": "tab-1",
47
+ "panel": {
48
+ "html": "<h2 class=\"govuk-heading-l\">Tab 1</h2>\n<p class=\"govuk-body\">Testing that when you click the anchor it moves to the anchor point successfully</p>\n<p class=\"govuk-body\"><a class=\"govuk-link\" href=\"#anchor\">Anchor</a></p>\n<p class=\"govuk-body\"><a id=\"anchor\" tabIndex=\"0\">Anchor Point</a></p>\n"
49
+ }
50
+ },
51
+ {
52
+ "label": "Tab 2",
53
+ "id": "tab-2",
54
+ "panel": {
55
+ "html": "<h2 class=\"govuk-heading-l\">Tab 2</h2>\n"
56
+ }
57
+ }
58
+ ]
59
+ },
60
+ "html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-1\">\n Tab 1\n </a>\n </li>\n \n \n \n \n <li class=\"govuk-tabs__list-item\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-2\">\n Tab 2\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"tab-1\">\n <h2 class=\"govuk-heading-l\">Tab 1</h2>\n<p class=\"govuk-body\">Testing that when you click the anchor it moves to the anchor point successfully</p>\n<p class=\"govuk-body\"><a class=\"govuk-link\" href=\"#anchor\">Anchor</a></p>\n<p class=\"govuk-body\"><a id=\"anchor\" tabIndex=\"0\">Anchor Point</a></p>\n\n </div>\n \n \n \n \n <div class=\"govuk-tabs__panel govuk-tabs__panel--hidden\" id=\"tab-2\">\n <h2 class=\"govuk-heading-l\">Tab 2</h2>\n\n </div>\n \n \n</div>"
61
+ },
62
+ {
63
+ "name": "classes",
64
+ "options": {
65
+ "classes": "app-tabs--custom-modifier"
66
+ },
67
+ "html": "<div class=\"govuk-tabs app-tabs--custom-modifier\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n \n</div>"
68
+ },
69
+ {
70
+ "name": "id",
71
+ "options": {
72
+ "id": "my-tabs"
73
+ },
74
+ "html": "<div id=\"my-tabs\" class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n \n</div>"
75
+ },
76
+ {
77
+ "name": "title",
78
+ "options": {
79
+ "title": "Custom title for Contents"
80
+ },
81
+ "html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Custom title for Contents\n </h2>\n \n \n</div>"
82
+ },
83
+ {
84
+ "name": "attributes",
85
+ "options": {
86
+ "attributes": {
87
+ "data-attribute": "my data value"
88
+ }
89
+ },
90
+ "html": "<div class=\"govuk-tabs\" data-attribute=\"my data value\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n \n</div>"
91
+ },
92
+ {
93
+ "name": "item with attributes",
94
+ "options": {
95
+ "items": [
96
+ {
97
+ "id": "tab-1",
98
+ "label": "Tab 1",
99
+ "attributes": {
100
+ "data-attribute": "my-attribute",
101
+ "data-attribute-2": "my-attribute-2"
102
+ }
103
+ }
104
+ ]
105
+ },
106
+ "html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-1\" data-attribute=\"my-attribute\" data-attribute-2=\"my-attribute-2\">\n Tab 1\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"tab-1\">\n \n </div>\n \n \n</div>"
107
+ },
108
+ {
109
+ "name": "panel with attributes",
110
+ "options": {
111
+ "items": [
112
+ {
113
+ "id": "tab-1",
114
+ "label": "Tab 1",
115
+ "panel": {
116
+ "text": "Panel text",
117
+ "attributes": {
118
+ "data-attribute": "my-attribute",
119
+ "data-attribute-2": "my-attribute-2"
120
+ }
121
+ }
122
+ }
123
+ ]
124
+ },
125
+ "html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-1\">\n Tab 1\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"tab-1\" data-attribute=\"my-attribute\" data-attribute-2=\"my-attribute-2\">\n Panel text\n </div>\n \n \n</div>"
126
+ },
127
+ {
128
+ "name": "no item list",
129
+ "options": {
130
+ "id": "my-tabs",
131
+ "classes": "app-tabs--custom-modifier"
132
+ },
133
+ "html": "<div id=\"my-tabs\" class=\"govuk-tabs app-tabs--custom-modifier\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n \n</div>"
134
+ },
135
+ {
136
+ "name": "empty item list",
137
+ "options": {
138
+ "items": []
139
+ },
140
+ "html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n \n</div>"
141
+ },
142
+ {
143
+ "name": "with falsey values",
144
+ "options": {
145
+ "items": [
146
+ {
147
+ "label": "Tab 1",
148
+ "id": "tab-1",
149
+ "panel": {
150
+ "text": "Panel 1 content"
151
+ }
152
+ },
153
+ null,
154
+ false,
155
+ "",
156
+ {
157
+ "label": "Tab 2",
158
+ "id": "tab-2",
159
+ "panel": {
160
+ "text": "Panel 2 content"
161
+ }
162
+ }
163
+ ]
164
+ },
165
+ "html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-1\">\n Tab 1\n </a>\n </li>\n \n \n \n \n \n \n \n \n \n \n <li class=\"govuk-tabs__list-item\">\n <a class=\"govuk-tabs__tab\" href=\"#tab-2\">\n Tab 2\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"tab-1\">\n Panel 1 content\n </div>\n \n \n \n \n \n \n \n \n \n \n <div class=\"govuk-tabs__panel govuk-tabs__panel--hidden\" id=\"tab-2\">\n Panel 2 content\n </div>\n \n \n</div>"
166
+ },
167
+ {
168
+ "name": "idPrefix",
169
+ "options": {
170
+ "idPrefix": "custom",
171
+ "items": [
172
+ {
173
+ "label": "Tab 1",
174
+ "panel": {
175
+ "text": "Panel 1 content"
176
+ }
177
+ },
178
+ {
179
+ "label": "Tab 2",
180
+ "panel": {
181
+ "text": "Panel 2 content"
182
+ }
183
+ }
184
+ ]
185
+ },
186
+ "html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#custom-1\">\n Tab 1\n </a>\n </li>\n \n \n \n \n <li class=\"govuk-tabs__list-item\">\n <a class=\"govuk-tabs__tab\" href=\"#custom-2\">\n Tab 2\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"custom-1\">\n Panel 1 content\n </div>\n \n \n \n \n <div class=\"govuk-tabs__panel govuk-tabs__panel--hidden\" id=\"custom-2\">\n Panel 2 content\n </div>\n \n \n</div>"
187
+ },
188
+ {
189
+ "name": "html as text",
190
+ "options": {
191
+ "items": [
192
+ {
193
+ "label": "Tab 1",
194
+ "panel": {
195
+ "text": "<p>Panel 1 content</p>"
196
+ }
197
+ },
198
+ {
199
+ "label": "Tab 2",
200
+ "panel": {
201
+ "text": "<p>Panel 2 content</p>"
202
+ }
203
+ }
204
+ ]
205
+ },
206
+ "html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#-1\">\n Tab 1\n </a>\n </li>\n \n \n \n \n <li class=\"govuk-tabs__list-item\">\n <a class=\"govuk-tabs__tab\" href=\"#-2\">\n Tab 2\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"-1\">\n &lt;p&gt;Panel 1 content&lt;/p&gt;\n </div>\n \n \n \n \n <div class=\"govuk-tabs__panel govuk-tabs__panel--hidden\" id=\"-2\">\n &lt;p&gt;Panel 2 content&lt;/p&gt;\n </div>\n \n \n</div>"
207
+ },
208
+ {
209
+ "name": "html",
210
+ "options": {
211
+ "items": [
212
+ {
213
+ "label": "Tab 1",
214
+ "panel": {
215
+ "html": "<p>Panel 1 content</p>"
216
+ }
217
+ },
218
+ {
219
+ "label": "Tab 2",
220
+ "panel": {
221
+ "html": "<p>Panel 2 content</p>"
222
+ }
223
+ }
224
+ ]
225
+ },
226
+ "html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n \n <ul class=\"govuk-tabs__list\">\n \n \n \n <li class=\"govuk-tabs__list-item govuk-tabs__list-item--selected\">\n <a class=\"govuk-tabs__tab\" href=\"#-1\">\n Tab 1\n </a>\n </li>\n \n \n \n \n <li class=\"govuk-tabs__list-item\">\n <a class=\"govuk-tabs__tab\" href=\"#-2\">\n Tab 2\n </a>\n </li>\n \n \n </ul>\n \n \n \n \n <div class=\"govuk-tabs__panel\" id=\"-1\">\n <p>Panel 1 content</p>\n </div>\n \n \n \n \n <div class=\"govuk-tabs__panel govuk-tabs__panel--hidden\" id=\"-2\">\n <p>Panel 2 content</p>\n </div>\n \n \n</div>"
227
+ }
228
+ ]
229
+ }
@@ -83,5 +83,4 @@
83
83
  color: govuk-shade(govuk-colour("green"), 20);
84
84
  background: govuk-tint(govuk-colour("green"), 80);
85
85
  }
86
-
87
86
  }
@@ -0,0 +1,117 @@
1
+ {
2
+ "component": "tag",
3
+ "fixtures": [
4
+ {
5
+ "name": "default",
6
+ "options": {
7
+ "text": "alpha"
8
+ },
9
+ "html": "<strong class=\"govuk-tag\">\n alpha\n</strong>"
10
+ },
11
+ {
12
+ "name": "inactive",
13
+ "options": {
14
+ "text": "alpha",
15
+ "classes": "govuk-tag--inactive"
16
+ },
17
+ "html": "<strong class=\"govuk-tag govuk-tag--inactive\">\n alpha\n</strong>"
18
+ },
19
+ {
20
+ "name": "grey",
21
+ "options": {
22
+ "text": "Grey",
23
+ "classes": "govuk-tag--grey"
24
+ },
25
+ "html": "<strong class=\"govuk-tag govuk-tag--grey\">\n Grey\n</strong>"
26
+ },
27
+ {
28
+ "name": "blue",
29
+ "options": {
30
+ "text": "Blue",
31
+ "classes": "govuk-tag--blue"
32
+ },
33
+ "html": "<strong class=\"govuk-tag govuk-tag--blue\">\n Blue\n</strong>"
34
+ },
35
+ {
36
+ "name": "turquoise",
37
+ "options": {
38
+ "text": "Turquoise",
39
+ "classes": "govuk-tag--turquoise"
40
+ },
41
+ "html": "<strong class=\"govuk-tag govuk-tag--turquoise\">\n Turquoise\n</strong>"
42
+ },
43
+ {
44
+ "name": "green",
45
+ "options": {
46
+ "text": "Green",
47
+ "classes": "govuk-tag--green"
48
+ },
49
+ "html": "<strong class=\"govuk-tag govuk-tag--green\">\n Green\n</strong>"
50
+ },
51
+ {
52
+ "name": "purple",
53
+ "options": {
54
+ "text": "Purple",
55
+ "classes": "govuk-tag--purple"
56
+ },
57
+ "html": "<strong class=\"govuk-tag govuk-tag--purple\">\n Purple\n</strong>"
58
+ },
59
+ {
60
+ "name": "pink",
61
+ "options": {
62
+ "text": "Pink",
63
+ "classes": "govuk-tag--pink"
64
+ },
65
+ "html": "<strong class=\"govuk-tag govuk-tag--pink\">\n Pink\n</strong>"
66
+ },
67
+ {
68
+ "name": "red",
69
+ "options": {
70
+ "text": "Red",
71
+ "classes": "govuk-tag--red"
72
+ },
73
+ "html": "<strong class=\"govuk-tag govuk-tag--red\">\n Red\n</strong>"
74
+ },
75
+ {
76
+ "name": "orange",
77
+ "options": {
78
+ "text": "Orange",
79
+ "classes": "govuk-tag--orange"
80
+ },
81
+ "html": "<strong class=\"govuk-tag govuk-tag--orange\">\n Orange\n</strong>"
82
+ },
83
+ {
84
+ "name": "yellow",
85
+ "options": {
86
+ "text": "Yellow",
87
+ "classes": "govuk-tag--yellow"
88
+ },
89
+ "html": "<strong class=\"govuk-tag govuk-tag--yellow\">\n Yellow\n</strong>"
90
+ },
91
+ {
92
+ "name": "attributes",
93
+ "options": {
94
+ "text": "Tag with attributes",
95
+ "attributes": {
96
+ "data-test": "attribute",
97
+ "id": "my-tag"
98
+ }
99
+ },
100
+ "html": "<strong class=\"govuk-tag\" data-test=\"attribute\" id=\"my-tag\">\n Tag with attributes\n</strong>"
101
+ },
102
+ {
103
+ "name": "html as text",
104
+ "options": {
105
+ "text": "<span>alpha</span>"
106
+ },
107
+ "html": "<strong class=\"govuk-tag\">\n &lt;span&gt;alpha&lt;/span&gt;\n</strong>"
108
+ },
109
+ {
110
+ "name": "html",
111
+ "options": {
112
+ "html": "<span>alpha</span>"
113
+ },
114
+ "html": "<strong class=\"govuk-tag\">\n <span>alpha</span>\n</strong>"
115
+ }
116
+ ]
117
+ }
@@ -43,6 +43,5 @@
43
43
  &:focus {
44
44
  border-color: $govuk-input-border-colour;
45
45
  }
46
-
47
46
  }
48
47
  }
@@ -0,0 +1,199 @@
1
+ {
2
+ "component": "textarea",
3
+ "fixtures": [
4
+ {
5
+ "name": "default",
6
+ "options": {
7
+ "name": "more-detail",
8
+ "id": "more-detail",
9
+ "label": {
10
+ "text": "Can you provide more detail?"
11
+ }
12
+ },
13
+ "html": "<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\" id=\"more-detail\" name=\"more-detail\" rows=\"5\"></textarea>\n</div>"
14
+ },
15
+ {
16
+ "name": "with hint",
17
+ "options": {
18
+ "name": "more-detail",
19
+ "id": "more-detail",
20
+ "label": {
21
+ "text": "Can you provide more detail?"
22
+ },
23
+ "hint": {
24
+ "text": "Don't include personal or financial information, eg your National Insurance number or credit card details."
25
+ }
26
+ },
27
+ "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"more-detail\">\n Can you provide more detail?\n </label>\n\n \n \n <div id=\"more-detail-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\" id=\"more-detail\" name=\"more-detail\" rows=\"5\" aria-describedby=\"more-detail-hint\"></textarea>\n</div>"
28
+ },
29
+ {
30
+ "name": "with error message",
31
+ "options": {
32
+ "name": "no-ni-reason",
33
+ "id": "no-ni-reason",
34
+ "label": {
35
+ "text": "Why can’t you provide a National Insurance number?"
36
+ },
37
+ "errorMessage": {
38
+ "text": "You must provide an explanation"
39
+ }
40
+ },
41
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"no-ni-reason\">\n Why can’t you provide a National Insurance number?\n </label>\n\n\n \n \n <span id=\"no-ni-reason-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> You must provide an explanation\n </span>\n\n <textarea class=\"govuk-textarea govuk-textarea--error\" id=\"no-ni-reason\" name=\"no-ni-reason\" rows=\"5\" aria-describedby=\"no-ni-reason-error\"></textarea>\n</div>"
42
+ },
43
+ {
44
+ "name": "with default value",
45
+ "options": {
46
+ "id": "full-address",
47
+ "name": "address",
48
+ "value": "221B Baker Street\nLondon\nNW1 6XE\n",
49
+ "label": {
50
+ "text": "Full address"
51
+ }
52
+ },
53
+ "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"full-address\">\n Full address\n </label>\n\n\n <textarea class=\"govuk-textarea\" id=\"full-address\" name=\"address\" rows=\"5\">221B Baker Street\nLondon\nNW1 6XE\n</textarea>\n</div>"
54
+ },
55
+ {
56
+ "name": "with custom rows",
57
+ "options": {
58
+ "id": "full-address",
59
+ "name": "address",
60
+ "label": {
61
+ "text": "Full address"
62
+ },
63
+ "rows": 8
64
+ },
65
+ "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"full-address\">\n Full address\n </label>\n\n\n <textarea class=\"govuk-textarea\" id=\"full-address\" name=\"address\" rows=\"8\"></textarea>\n</div>"
66
+ },
67
+ {
68
+ "name": "with label as page heading",
69
+ "options": {
70
+ "id": "textarea-with-page-heading",
71
+ "name": "address",
72
+ "label": {
73
+ "text": "Full address",
74
+ "isPageHeading": true
75
+ }
76
+ },
77
+ "html": "<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\" id=\"textarea-with-page-heading\" name=\"address\" rows=\"5\"></textarea>\n</div>"
78
+ },
79
+ {
80
+ "name": "with optional form-group classes",
81
+ "options": {
82
+ "id": "textarea-with-page-heading",
83
+ "name": "address",
84
+ "label": {
85
+ "text": "Full address"
86
+ },
87
+ "formGroup": {
88
+ "classes": "extra-class"
89
+ }
90
+ },
91
+ "html": "<div class=\"govuk-form-group extra-class\">\n <label class=\"govuk-label\" for=\"textarea-with-page-heading\">\n Full address\n </label>\n\n\n <textarea class=\"govuk-textarea\" id=\"textarea-with-page-heading\" name=\"address\" rows=\"5\"></textarea>\n</div>"
92
+ },
93
+ {
94
+ "name": "with autocomplete attribute",
95
+ "options": {
96
+ "id": "textarea-with-autocomplete-attribute",
97
+ "name": "address",
98
+ "label": {
99
+ "text": "Full address"
100
+ },
101
+ "autocomplete": "street-address"
102
+ },
103
+ "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"textarea-with-autocomplete-attribute\">\n Full address\n </label>\n\n\n <textarea class=\"govuk-textarea\" id=\"textarea-with-autocomplete-attribute\" name=\"address\" rows=\"5\" autocomplete=\"street-address\"></textarea>\n</div>"
104
+ },
105
+ {
106
+ "name": "with spellcheck enabled",
107
+ "options": {
108
+ "label": {
109
+ "text": "Spellcheck is enabled"
110
+ },
111
+ "id": "textarea-with-spellcheck-enabled",
112
+ "name": "spellcheck",
113
+ "spellcheck": true
114
+ },
115
+ "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"textarea-with-spellcheck-enabled\">\n Spellcheck is enabled\n </label>\n\n\n <textarea class=\"govuk-textarea\" id=\"textarea-with-spellcheck-enabled\" name=\"spellcheck\" rows=\"5\" spellcheck=\"true\"></textarea>\n</div>"
116
+ },
117
+ {
118
+ "name": "with spellcheck disabled",
119
+ "options": {
120
+ "label": {
121
+ "text": "Spellcheck is disabled"
122
+ },
123
+ "id": "textarea-with-spellcheck-disabled",
124
+ "name": "spellcheck",
125
+ "spellcheck": false
126
+ },
127
+ "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"textarea-with-spellcheck-disabled\">\n Spellcheck is disabled\n </label>\n\n\n <textarea class=\"govuk-textarea\" id=\"textarea-with-spellcheck-disabled\" name=\"spellcheck\" rows=\"5\" spellcheck=\"false\"></textarea>\n</div>"
128
+ },
129
+ {
130
+ "name": "classes",
131
+ "options": {
132
+ "classes": "app-textarea--custom-modifier"
133
+ },
134
+ "html": "<div class=\"govuk-form-group\">\n \n\n\n <textarea class=\"govuk-textarea app-textarea--custom-modifier\" id=\"\" name=\"\" rows=\"5\"></textarea>\n</div>"
135
+ },
136
+ {
137
+ "name": "attributes",
138
+ "options": {
139
+ "attributes": {
140
+ "data-attribute": "my data value"
141
+ }
142
+ },
143
+ "html": "<div class=\"govuk-form-group\">\n \n\n\n <textarea class=\"govuk-textarea\" id=\"\" name=\"\" rows=\"5\" data-attribute=\"my data value\"></textarea>\n</div>"
144
+ },
145
+ {
146
+ "name": "with describedBy",
147
+ "options": {
148
+ "describedBy": "some-id"
149
+ },
150
+ "html": "<div class=\"govuk-form-group\">\n \n\n\n <textarea class=\"govuk-textarea\" id=\"\" name=\"\" rows=\"5\" aria-describedby=\"some-id\"></textarea>\n</div>"
151
+ },
152
+ {
153
+ "name": "with hint and described by",
154
+ "options": {
155
+ "describedBy": "some-id",
156
+ "hint": {
157
+ "text": "It’s on your National Insurance card, benefit letter, payslip or P60. For example, ‘QQ 12 34 56 C’."
158
+ }
159
+ },
160
+ "html": "<div class=\"govuk-form-group\">\n \n\n \n \n <div id=\"undefined-hint\" class=\"govuk-hint\">\n It’s on your National Insurance card, benefit letter, payslip or P60. For example, ‘QQ 12 34 56 C’.\n </div>\n\n\n <textarea class=\"govuk-textarea\" id=\"\" name=\"\" rows=\"5\" aria-describedby=\"some-id undefined-hint\"></textarea>\n</div>"
161
+ },
162
+ {
163
+ "name": "with error message and described by",
164
+ "options": {
165
+ "describedBy": "some-id",
166
+ "id": "textarea-with-error",
167
+ "errorMessage": {
168
+ "text": "Error message"
169
+ }
170
+ },
171
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n \n\n\n \n \n <span id=\"textarea-with-error-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\" id=\"textarea-with-error\" name=\"\" rows=\"5\" aria-describedby=\"some-id textarea-with-error-error\"></textarea>\n</div>"
172
+ },
173
+ {
174
+ "name": "with hint and error message",
175
+ "options": {
176
+ "errorMessage": {
177
+ "text": "Error message"
178
+ },
179
+ "hint": {
180
+ "text": "Hint"
181
+ }
182
+ },
183
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n \n\n \n \n <div id=\"undefined-hint\" class=\"govuk-hint\">\n Hint\n </div>\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\" id=\"\" name=\"\" rows=\"5\" aria-describedby=\"undefined-hint undefined-error\"></textarea>\n</div>"
184
+ },
185
+ {
186
+ "name": "with hint, error message and described by",
187
+ "options": {
188
+ "describedBy": "some-id",
189
+ "errorMessage": {
190
+ "text": "Error message"
191
+ },
192
+ "hint": {
193
+ "text": "Hint"
194
+ }
195
+ },
196
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n \n\n \n \n <div id=\"undefined-hint\" class=\"govuk-hint\">\n Hint\n </div>\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\" id=\"\" name=\"\" rows=\"5\" aria-describedby=\"some-id undefined-hint undefined-error\"></textarea>\n</div>"
197
+ }
198
+ ]
199
+ }