govuk_publishing_components 23.0.0 → 23.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics/init.js +56 -0
  3. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +9 -8
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +1 -0
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +0 -46
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +5 -0
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_print-link.scss +0 -2
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +7 -1
  9. data/app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak.scss +4 -0
  10. data/app/views/govuk_publishing_components/components/_input.html.erb +6 -6
  11. data/app/views/govuk_publishing_components/components/_print_link.html.erb +18 -11
  12. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +14 -0
  13. data/app/views/govuk_publishing_components/components/docs/print_link.yml +5 -0
  14. data/lib/govuk_publishing_components/version.rb +1 -1
  15. data/node_modules/govuk-frontend/govuk/all.js +31 -37
  16. data/node_modules/govuk-frontend/govuk/components/accordion/README.md +1 -1
  17. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +0 -1
  18. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +235 -0
  19. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +0 -2
  20. data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +56 -0
  21. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +0 -1
  22. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +172 -0
  23. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +3 -3
  24. data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +275 -0
  25. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +170 -0
  26. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +13 -13
  27. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +1015 -0
  28. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +499 -0
  29. data/node_modules/govuk-frontend/govuk/components/details/_index.scss +0 -1
  30. data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +83 -0
  31. data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +66 -0
  32. data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +0 -2
  33. data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +181 -0
  34. data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +1 -1
  35. data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +93 -0
  36. data/node_modules/govuk-frontend/govuk/components/fieldset/macro-options.json +6 -0
  37. data/node_modules/govuk-frontend/govuk/components/fieldset/template.njk +5 -1
  38. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +151 -0
  39. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +0 -1
  40. data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +482 -0
  41. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +2 -5
  42. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +360 -0
  43. data/node_modules/govuk-frontend/govuk/components/header/header.js +665 -316
  44. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +13 -1
  45. data/node_modules/govuk-frontend/govuk/components/header/template.njk +9 -5
  46. data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +0 -2
  47. data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +50 -0
  48. data/node_modules/govuk-frontend/govuk/components/hint/macro-options.json +1 -1
  49. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +91 -0
  50. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +538 -0
  51. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +64 -0
  52. data/node_modules/govuk-frontend/govuk/components/input/template.njk +17 -0
  53. data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +49 -0
  54. data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +75 -0
  55. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +6 -2
  56. data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +74 -0
  57. data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +65 -0
  58. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +13 -13
  59. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +1066 -0
  60. data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +2 -2
  61. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +0 -1
  62. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +248 -0
  63. data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +72 -0
  64. data/node_modules/govuk-frontend/govuk/components/summary-list/README.md +1 -1
  65. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +2 -10
  66. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +991 -0
  67. data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +468 -0
  68. data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +3 -6
  69. data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +229 -0
  70. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +0 -1
  71. data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +117 -0
  72. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +0 -1
  73. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +199 -0
  74. data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +0 -1
  75. data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +68 -0
  76. data/node_modules/govuk-frontend/govuk/helpers/_device-pixels.scss +3 -3
  77. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +9 -11
  78. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +1 -3
  79. data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +1 -5
  80. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +2 -1
  81. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +7 -6
  82. data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +0 -1
  83. data/node_modules/govuk-frontend/govuk/objects/_grid.scss +2 -3
  84. data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +0 -1
  85. data/node_modules/govuk-frontend/govuk/overrides/_display.scss +1 -1
  86. data/node_modules/govuk-frontend/govuk/overrides/_width.scss +1 -0
  87. data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +0 -3
  88. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
  89. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +9 -2
  90. data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +0 -1
  91. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +0 -4
  92. data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +2 -2
  93. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +11 -5
  94. data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +6 -2
  95. data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +0 -3
  96. data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +0 -3
  97. data/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss +0 -1
  98. data/node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss +0 -4
  99. data/node_modules/govuk-frontend/package.json +1 -1
  100. metadata +32 -3
  101. data/app/assets/javascripts/govuk_publishing_components/analytics/init.js.erb +0 -50
@@ -1,5 +1,4 @@
1
1
  @include govuk-exports("govuk/component/details") {
2
-
3
2
  .govuk-details {
4
3
  @include govuk-font($size: 19);
5
4
  @include govuk-text-colour;
@@ -0,0 +1,83 @@
1
+ {
2
+ "component": "details",
3
+ "fixtures": [
4
+ {
5
+ "name": "default",
6
+ "options": {
7
+ "summaryText": "Help with nationality",
8
+ "text": "We need to know your nationality so we can work out which elections you’re entitled to vote in. If you can’t provide your nationality, you’ll have to send copies of identity documents through the post."
9
+ },
10
+ "html": "<details class=\"govuk-details\" data-module=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n Help with nationality\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n We need to know your nationality so we can work out which elections you’re entitled to vote in. If you can’t provide your nationality, you’ll have to send copies of identity documents through the post.\n </div>\n</details>"
11
+ },
12
+ {
13
+ "name": "expanded",
14
+ "options": {
15
+ "id": "help-with-nationality",
16
+ "summaryText": "Help with nationality",
17
+ "text": "We need to know your nationality so we can work out which elections you’re entitled to vote in. If you can’t provide your nationality, you’ll have to send copies of identity documents through the post.",
18
+ "open": true
19
+ },
20
+ "html": "<details id=\"help-with-nationality\" class=\"govuk-details\" data-module=\"govuk-details\" open>\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n Help with nationality\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n We need to know your nationality so we can work out which elections you’re entitled to vote in. If you can’t provide your nationality, you’ll have to send copies of identity documents through the post.\n </div>\n</details>"
21
+ },
22
+ {
23
+ "name": "with html",
24
+ "options": {
25
+ "summaryText": "Where to find your National Insurance Number",
26
+ "html": "Your National Insurance number can be found on\n<ul>\n <li>your National Insurance card</li>\n <li>your payslip</li>\n <li>P60</li>\n <li>benefits information</li>\n <li>tax return</li>\n</ul>\n"
27
+ },
28
+ "html": "<details class=\"govuk-details\" data-module=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n Where to find your National Insurance Number\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n Your National Insurance number can be found on\n<ul>\n <li>your National Insurance card</li>\n <li>your payslip</li>\n <li>P60</li>\n <li>benefits information</li>\n <li>tax return</li>\n</ul>\n\n </div>\n</details>"
29
+ },
30
+ {
31
+ "name": "id",
32
+ "options": {
33
+ "id": "my-details-element"
34
+ },
35
+ "html": "<details id=\"my-details-element\" class=\"govuk-details\" data-module=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n \n </span>\n </summary>\n <div class=\"govuk-details__text\">\n \n </div>\n</details>"
36
+ },
37
+ {
38
+ "name": "html as text",
39
+ "options": {
40
+ "text": "More about the greater than symbol (>)"
41
+ },
42
+ "html": "<details class=\"govuk-details\" data-module=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n \n </span>\n </summary>\n <div class=\"govuk-details__text\">\n More about the greater than symbol (&gt;)\n </div>\n</details>"
43
+ },
44
+ {
45
+ "name": "html",
46
+ "options": {
47
+ "html": "More about <b>bold text</b>"
48
+ },
49
+ "html": "<details class=\"govuk-details\" data-module=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n \n </span>\n </summary>\n <div class=\"govuk-details__text\">\n More about <b>bold text</b>\n </div>\n</details>"
50
+ },
51
+ {
52
+ "name": "summary html as text",
53
+ "options": {
54
+ "summaryText": "The greater than symbol (>) is the best"
55
+ },
56
+ "html": "<details class=\"govuk-details\" data-module=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n The greater than symbol (&gt;) is the best\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n \n </div>\n</details>"
57
+ },
58
+ {
59
+ "name": "summary html",
60
+ "options": {
61
+ "summaryHtml": "Use <b>bold text</b> sparingly"
62
+ },
63
+ "html": "<details class=\"govuk-details\" data-module=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n Use <b>bold text</b> sparingly\n </span>\n </summary>\n <div class=\"govuk-details__text\">\n \n </div>\n</details>"
64
+ },
65
+ {
66
+ "name": "classes",
67
+ "options": {
68
+ "classes": "some-additional-class"
69
+ },
70
+ "html": "<details class=\"govuk-details some-additional-class\" data-module=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n \n </span>\n </summary>\n <div class=\"govuk-details__text\">\n \n </div>\n</details>"
71
+ },
72
+ {
73
+ "name": "attributes",
74
+ "options": {
75
+ "attributes": {
76
+ "data-some-data-attribute": "i-love-data",
77
+ "another-attribute": true
78
+ }
79
+ },
80
+ "html": "<details class=\"govuk-details\" data-module=\"govuk-details\" data-some-data-attribute=\"i-love-data\" another-attribute=\"true\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n \n </span>\n </summary>\n <div class=\"govuk-details__text\">\n \n </div>\n</details>"
81
+ }
82
+ ]
83
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "component": "error-message",
3
+ "fixtures": [
4
+ {
5
+ "name": "default",
6
+ "options": {
7
+ "text": "Error message about full name goes here"
8
+ },
9
+ "html": "<span class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message about full name goes here\n</span>"
10
+ },
11
+ {
12
+ "name": "id",
13
+ "options": {
14
+ "id": "my-error-message-id"
15
+ },
16
+ "html": "<span id=\"my-error-message-id\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> \n</span>"
17
+ },
18
+ {
19
+ "name": "classes",
20
+ "options": {
21
+ "classes": "custom-class"
22
+ },
23
+ "html": "<span class=\"govuk-error-message custom-class\">\n <span class=\"govuk-visually-hidden\">Error:</span> \n</span>"
24
+ },
25
+ {
26
+ "name": "html as text",
27
+ "options": {
28
+ "text": "Unexpected > in body"
29
+ },
30
+ "html": "<span class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Unexpected &gt; in body\n</span>"
31
+ },
32
+ {
33
+ "name": "html",
34
+ "options": {
35
+ "html": "Unexpected <b>bold text</b> in body copy"
36
+ },
37
+ "html": "<span class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Unexpected <b>bold text</b> in body copy\n</span>"
38
+ },
39
+ {
40
+ "name": "attributes",
41
+ "options": {
42
+ "attributes": {
43
+ "data-test": "attribute",
44
+ "id": "my-error-message"
45
+ }
46
+ },
47
+ "html": "<span class=\"govuk-error-message\" data-test=\"attribute\" id=\"my-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> \n</span>"
48
+ },
49
+ {
50
+ "name": "with visually hidden text",
51
+ "options": {
52
+ "text": "Rhowch eich enw llawn",
53
+ "visuallyHiddenText": "Gwall"
54
+ },
55
+ "html": "<span class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Gwall:</span> Rhowch eich enw llawn\n</span>"
56
+ },
57
+ {
58
+ "name": "visually hidden text removed",
59
+ "options": {
60
+ "text": "There is an error on line 42",
61
+ "visuallyHiddenText": false
62
+ },
63
+ "html": "<span class=\"govuk-error-message\">\n There is an error on line 42\n</span>"
64
+ }
65
+ ]
66
+ }
@@ -1,7 +1,6 @@
1
1
  @import "../../core/lists";
2
2
 
3
3
  @include govuk-exports("govuk/component/error-summary") {
4
-
5
4
  .govuk-error-summary {
6
5
  @include govuk-text-colour;
7
6
  @include govuk-responsive-padding(4);
@@ -51,5 +50,4 @@
51
50
  @include govuk-focused-text;
52
51
  }
53
52
  }
54
-
55
53
  }
@@ -0,0 +1,181 @@
1
+ {
2
+ "component": "error-summary",
3
+ "fixtures": [
4
+ {
5
+ "name": "default",
6
+ "options": {
7
+ "titleText": "There is a problem",
8
+ "errorList": [
9
+ {
10
+ "text": "The date your passport was issued must be in the past",
11
+ "href": "#example-error-1"
12
+ },
13
+ {
14
+ "text": "Enter a postcode, like AA1 1AA",
15
+ "href": "#example-error-2"
16
+ }
17
+ ]
18
+ },
19
+ "html": "<div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n \n <ul class=\"govuk-list govuk-error-summary__list\">\n \n <li>\n \n <a href=\"#example-error-1\">The date your passport was issued must be in the past</a>\n \n </li>\n \n <li>\n \n <a href=\"#example-error-2\">Enter a postcode, like AA1 1AA</a>\n \n </li>\n \n </ul>\n </div>\n</div>"
20
+ },
21
+ {
22
+ "name": "without links",
23
+ "options": {
24
+ "titleText": "There is a problem",
25
+ "errorList": [
26
+ {
27
+ "text": "Invalid username or password"
28
+ }
29
+ ]
30
+ },
31
+ "html": "<div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n \n <ul class=\"govuk-list govuk-error-summary__list\">\n \n <li>\n \n Invalid username or password\n \n </li>\n \n </ul>\n </div>\n</div>"
32
+ },
33
+ {
34
+ "name": "mixed with and without links",
35
+ "options": {
36
+ "titleText": "There is a problem",
37
+ "errorList": [
38
+ {
39
+ "text": "Invalid username or password"
40
+ },
41
+ {
42
+ "text": "Agree to the terms of service to log in",
43
+ "href": "#example-error-1"
44
+ }
45
+ ]
46
+ },
47
+ "html": "<div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n \n <ul class=\"govuk-list govuk-error-summary__list\">\n \n <li>\n \n Invalid username or password\n \n </li>\n \n <li>\n \n <a href=\"#example-error-1\">Agree to the terms of service to log in</a>\n \n </li>\n \n </ul>\n </div>\n</div>"
48
+ },
49
+ {
50
+ "name": "with everything",
51
+ "options": {
52
+ "titleText": "There is a problem",
53
+ "descriptionText": "Please fix the errors below.",
54
+ "errorList": [
55
+ {
56
+ "text": "Invalid username or password"
57
+ },
58
+ {
59
+ "text": "Agree to the terms of service to log in",
60
+ "href": "#example-error-1"
61
+ }
62
+ ]
63
+ },
64
+ "html": "<div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n \n <p>\n Please fix the errors below.\n </p>\n \n <ul class=\"govuk-list govuk-error-summary__list\">\n \n <li>\n \n Invalid username or password\n \n </li>\n \n <li>\n \n <a href=\"#example-error-1\">Agree to the terms of service to log in</a>\n \n </li>\n \n </ul>\n </div>\n</div>"
65
+ },
66
+ {
67
+ "name": "html as titleText",
68
+ "options": {
69
+ "titleText": "Alert, <em>alert</em>"
70
+ },
71
+ "html": "<div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n Alert, &lt;em&gt;alert&lt;/em&gt;\n </h2>\n <div class=\"govuk-error-summary__body\">\n \n <ul class=\"govuk-list govuk-error-summary__list\">\n \n </ul>\n </div>\n</div>"
72
+ },
73
+ {
74
+ "name": "title html",
75
+ "options": {
76
+ "titleHtml": "Alert, <em>alert</em>"
77
+ },
78
+ "html": "<div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n Alert, <em>alert</em>\n </h2>\n <div class=\"govuk-error-summary__body\">\n \n <ul class=\"govuk-list govuk-error-summary__list\">\n \n </ul>\n </div>\n</div>"
79
+ },
80
+ {
81
+ "name": "description",
82
+ "options": {
83
+ "descriptionText": "Lorem ipsum"
84
+ },
85
+ "html": "<div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n \n </h2>\n <div class=\"govuk-error-summary__body\">\n \n <p>\n Lorem ipsum\n </p>\n \n <ul class=\"govuk-list govuk-error-summary__list\">\n \n </ul>\n </div>\n</div>"
86
+ },
87
+ {
88
+ "name": "html as descriptionText",
89
+ "options": {
90
+ "descriptionText": "See errors below (▼)"
91
+ },
92
+ "html": "<div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n \n </h2>\n <div class=\"govuk-error-summary__body\">\n \n <p>\n See errors below (▼)\n </p>\n \n <ul class=\"govuk-list govuk-error-summary__list\">\n \n </ul>\n </div>\n</div>"
93
+ },
94
+ {
95
+ "name": "description html",
96
+ "options": {
97
+ "descriptionHtml": "See <span>errors</span> below"
98
+ },
99
+ "html": "<div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n \n </h2>\n <div class=\"govuk-error-summary__body\">\n \n <p>\n See <span>errors</span> below\n </p>\n \n <ul class=\"govuk-list govuk-error-summary__list\">\n \n </ul>\n </div>\n</div>"
100
+ },
101
+ {
102
+ "name": "classes",
103
+ "options": {
104
+ "classes": "extra-class one-more-class"
105
+ },
106
+ "html": "<div class=\"govuk-error-summary extra-class one-more-class\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n \n </h2>\n <div class=\"govuk-error-summary__body\">\n \n <ul class=\"govuk-list govuk-error-summary__list\">\n \n </ul>\n </div>\n</div>"
107
+ },
108
+ {
109
+ "name": "attributes",
110
+ "options": {
111
+ "attributes": {
112
+ "first-attribute": "true",
113
+ "second-attribute": "false"
114
+ }
115
+ },
116
+ "html": "<div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" first-attribute=\"true\" second-attribute=\"false\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n \n </h2>\n <div class=\"govuk-error-summary__body\">\n \n <ul class=\"govuk-list govuk-error-summary__list\">\n \n </ul>\n </div>\n</div>"
117
+ },
118
+ {
119
+ "name": "error list with attributes",
120
+ "options": {
121
+ "errorList": [
122
+ {
123
+ "text": "Error-1",
124
+ "href": "#item",
125
+ "attributes": {
126
+ "data-attribute": "my-attribute",
127
+ "data-attribute-2": "my-attribute-2"
128
+ }
129
+ }
130
+ ]
131
+ },
132
+ "html": "<div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n \n </h2>\n <div class=\"govuk-error-summary__body\">\n \n <ul class=\"govuk-list govuk-error-summary__list\">\n \n <li>\n \n <a href=\"#item\" data-attribute=\"my-attribute\" data-attribute-2=\"my-attribute-2\">Error-1</a>\n \n </li>\n \n </ul>\n </div>\n</div>"
133
+ },
134
+ {
135
+ "name": "error list with html as text",
136
+ "options": {
137
+ "errorList": [
138
+ {
139
+ "text": "Descriptive link to the <b>question</b> with an error"
140
+ }
141
+ ]
142
+ },
143
+ "html": "<div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n \n </h2>\n <div class=\"govuk-error-summary__body\">\n \n <ul class=\"govuk-list govuk-error-summary__list\">\n \n <li>\n \n Descriptive link to the &lt;b&gt;question&lt;/b&gt; with an error\n \n </li>\n \n </ul>\n </div>\n</div>"
144
+ },
145
+ {
146
+ "name": "error list with html",
147
+ "options": {
148
+ "errorList": [
149
+ {
150
+ "html": "The date your passport was issued <b>must</b> be in the past"
151
+ }
152
+ ]
153
+ },
154
+ "html": "<div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n \n </h2>\n <div class=\"govuk-error-summary__body\">\n \n <ul class=\"govuk-list govuk-error-summary__list\">\n \n <li>\n \n The date your passport was issued <b>must</b> be in the past\n \n </li>\n \n </ul>\n </div>\n</div>"
155
+ },
156
+ {
157
+ "name": "error list with html link",
158
+ "options": {
159
+ "errorList": [
160
+ {
161
+ "html": "Descriptive link to the <b>question</b> with an error",
162
+ "href": "#error-1"
163
+ }
164
+ ]
165
+ },
166
+ "html": "<div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n \n </h2>\n <div class=\"govuk-error-summary__body\">\n \n <ul class=\"govuk-list govuk-error-summary__list\">\n \n <li>\n \n <a href=\"#error-1\">Descriptive link to the <b>question</b> with an error</a>\n \n </li>\n \n </ul>\n </div>\n</div>"
167
+ },
168
+ {
169
+ "name": "error list with html as text link",
170
+ "options": {
171
+ "errorList": [
172
+ {
173
+ "text": "Descriptive link to the <b>question</b> with an error",
174
+ "href": "#error-1"
175
+ }
176
+ ]
177
+ },
178
+ "html": "<div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n \n </h2>\n <div class=\"govuk-error-summary__body\">\n \n <ul class=\"govuk-list govuk-error-summary__list\">\n \n <li>\n \n <a href=\"#error-1\">Descriptive link to the &lt;b&gt;question&lt;/b&gt; with an error</a>\n \n </li>\n \n </ul>\n </div>\n</div>"
179
+ }
180
+ ]
181
+ }
@@ -11,7 +11,7 @@
11
11
  // https://bugzilla.mozilla.org/show_bug.cgi?id=504622
12
12
  @supports not (caret-color: auto) {
13
13
  .govuk-fieldset,
14
- x:-moz-any-link {
14
+ x:-moz-any-link { // stylelint-disable-line selector-type-no-unknown
15
15
  display: table-cell;
16
16
  }
17
17
  }
@@ -0,0 +1,93 @@
1
+ {
2
+ "component": "fieldset",
3
+ "fixtures": [
4
+ {
5
+ "name": "default",
6
+ "options": {
7
+ "legend": {
8
+ "text": "What is your address?"
9
+ }
10
+ },
11
+ "html": "<fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n What is your address?\n \n </legend>\n \n\n</fieldset>"
12
+ },
13
+ {
14
+ "name": "as page heading",
15
+ "options": {
16
+ "legend": {
17
+ "text": "What is your address?",
18
+ "classes": "govuk-fieldset__legend--xl",
19
+ "isPageHeading": true
20
+ }
21
+ },
22
+ "html": "<fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--xl\">\n \n <h1 class=\"govuk-fieldset__heading\">\n What is your address?\n </h1>\n \n </legend>\n \n\n</fieldset>"
23
+ },
24
+ {
25
+ "name": "html fieldset content",
26
+ "options": {
27
+ "legend": {
28
+ "text": "What is your address?"
29
+ },
30
+ "html": "<div class=\"my-content\">\n <p>This is some content to put inside the fieldset</p>\n</div>\n"
31
+ },
32
+ "html": "<fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n What is your address?\n \n </legend>\n \n\n <div class=\"my-content\">\n <p>This is some content to put inside the fieldset</p>\n</div>\n\n\n</fieldset>"
33
+ },
34
+ {
35
+ "name": "with describedBy",
36
+ "options": {
37
+ "describedBy": "some-id"
38
+ },
39
+ "html": "<fieldset class=\"govuk-fieldset\" aria-describedby=\"some-id\">\n \n\n</fieldset>"
40
+ },
41
+ {
42
+ "name": "html as text",
43
+ "options": {
44
+ "legend": {
45
+ "text": "What is <b>your</b> address?"
46
+ }
47
+ },
48
+ "html": "<fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n What is &lt;b&gt;your&lt;/b&gt; address?\n \n </legend>\n \n\n</fieldset>"
49
+ },
50
+ {
51
+ "name": "html",
52
+ "options": {
53
+ "legend": {
54
+ "html": "What is <b>your</b> address?"
55
+ }
56
+ },
57
+ "html": "<fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend\">\n \n What is <b>your</b> address?\n \n </legend>\n \n\n</fieldset>"
58
+ },
59
+ {
60
+ "name": "legend classes",
61
+ "options": {
62
+ "legend": {
63
+ "text": "What is your address?",
64
+ "classes": "my-custom-class"
65
+ }
66
+ },
67
+ "html": "<fieldset class=\"govuk-fieldset\">\n \n <legend class=\"govuk-fieldset__legend my-custom-class\">\n \n What is your address?\n \n </legend>\n \n\n</fieldset>"
68
+ },
69
+ {
70
+ "name": "classes",
71
+ "options": {
72
+ "classes": "app-fieldset--custom-modifier"
73
+ },
74
+ "html": "<fieldset class=\"govuk-fieldset app-fieldset--custom-modifier\">\n \n\n</fieldset>"
75
+ },
76
+ {
77
+ "name": "role",
78
+ "options": {
79
+ "role": "group"
80
+ },
81
+ "html": "<fieldset class=\"govuk-fieldset\" role=\"group\">\n \n\n</fieldset>"
82
+ },
83
+ {
84
+ "name": "attributes",
85
+ "options": {
86
+ "attributes": {
87
+ "data-attribute": "value"
88
+ }
89
+ },
90
+ "html": "<fieldset class=\"govuk-fieldset\" data-attribute=\"value\">\n \n\n</fieldset>"
91
+ }
92
+ ]
93
+ }