govuk_publishing_components 23.2.0 → 23.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) 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 +9 -8
  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/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +5 -0
  11. data/app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak.scss +4 -0
  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/govspeak.yml +14 -0
  15. data/config/locales/cy.yml +4 -1
  16. data/config/locales/en.yml +4 -0
  17. data/lib/govuk_publishing_components/version.rb +1 -1
  18. data/node_modules/govuk-frontend/govuk/all.js +31 -37
  19. data/node_modules/govuk-frontend/govuk/components/accordion/README.md +1 -1
  20. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +0 -1
  21. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +235 -0
  22. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +0 -2
  23. data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +56 -0
  24. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +0 -1
  25. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +172 -0
  26. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +3 -3
  27. data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +275 -0
  28. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +170 -0
  29. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +13 -13
  30. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +1015 -0
  31. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +499 -0
  32. data/node_modules/govuk-frontend/govuk/components/details/_index.scss +0 -1
  33. data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +83 -0
  34. data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +66 -0
  35. data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +0 -2
  36. data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +181 -0
  37. data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +1 -1
  38. data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +93 -0
  39. data/node_modules/govuk-frontend/govuk/components/fieldset/macro-options.json +6 -0
  40. data/node_modules/govuk-frontend/govuk/components/fieldset/template.njk +5 -1
  41. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +151 -0
  42. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +0 -1
  43. data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +482 -0
  44. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +2 -5
  45. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +360 -0
  46. data/node_modules/govuk-frontend/govuk/components/header/header.js +665 -316
  47. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +13 -1
  48. data/node_modules/govuk-frontend/govuk/components/header/template.njk +9 -5
  49. data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +0 -2
  50. data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +50 -0
  51. data/node_modules/govuk-frontend/govuk/components/hint/macro-options.json +1 -1
  52. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +91 -0
  53. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +538 -0
  54. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +64 -0
  55. data/node_modules/govuk-frontend/govuk/components/input/template.njk +17 -0
  56. data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +49 -0
  57. data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +75 -0
  58. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +6 -2
  59. data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +74 -0
  60. data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +65 -0
  61. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +13 -13
  62. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +1066 -0
  63. data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +2 -2
  64. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +0 -1
  65. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +248 -0
  66. data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +72 -0
  67. data/node_modules/govuk-frontend/govuk/components/summary-list/README.md +1 -1
  68. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +2 -10
  69. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +991 -0
  70. data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +468 -0
  71. data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +3 -6
  72. data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +229 -0
  73. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +0 -1
  74. data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +117 -0
  75. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +0 -1
  76. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +199 -0
  77. data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +0 -1
  78. data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +68 -0
  79. data/node_modules/govuk-frontend/govuk/helpers/_device-pixels.scss +3 -3
  80. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +9 -11
  81. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +1 -3
  82. data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +1 -5
  83. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +2 -1
  84. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +7 -6
  85. data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +0 -1
  86. data/node_modules/govuk-frontend/govuk/objects/_grid.scss +2 -3
  87. data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +0 -1
  88. data/node_modules/govuk-frontend/govuk/overrides/_display.scss +1 -1
  89. data/node_modules/govuk-frontend/govuk/overrides/_width.scss +1 -0
  90. data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +0 -3
  91. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
  92. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +9 -2
  93. data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +0 -1
  94. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +0 -4
  95. data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +2 -2
  96. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +11 -5
  97. data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +6 -2
  98. data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +0 -3
  99. data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +0 -3
  100. data/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss +0 -1
  101. data/node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss +0 -4
  102. data/node_modules/govuk-frontend/package.json +1 -1
  103. metadata +32 -3
  104. data/app/assets/javascripts/govuk_publishing_components/components/initial-focus.js +0 -12
@@ -15,7 +15,6 @@
15
15
  border-bottom: govuk-spacing(2) solid govuk-colour("white");
16
16
  color: $govuk-header-text;
17
17
  background: $govuk-header-background;
18
-
19
18
  }
20
19
 
21
20
  .govuk-header__container--full-width {
@@ -168,7 +167,7 @@
168
167
  @include govuk-focused-text;
169
168
  }
170
169
 
171
- &::after {
170
+ &:after {
172
171
  @include govuk-shape-arrow($direction: down, $base: 10px, $display: inline-block);
173
172
  content: "";
174
173
  margin-left: govuk-spacing(1);
@@ -180,7 +179,7 @@
180
179
  }
181
180
 
182
181
  .govuk-header__menu-button--open {
183
- &::after {
182
+ &:after {
184
183
  @include govuk-shape-arrow($direction: up, $base: 10px, $display: inline-block);
185
184
  }
186
185
  }
@@ -213,7 +212,6 @@
213
212
  }
214
213
  }
215
214
 
216
-
217
215
  .govuk-header__navigation--end {
218
216
  @include govuk-media-query ($from: desktop) {
219
217
  margin: 0;
@@ -308,5 +306,4 @@
308
306
  }
309
307
  // End adjustments
310
308
  }
311
-
312
309
  }
@@ -0,0 +1,360 @@
1
+ {
2
+ "component": "header",
3
+ "fixtures": [
4
+ {
5
+ "name": "default",
6
+ "options": {},
7
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 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.7-5.9 8-.5 4.3-8.7-3-11.4-7.6-8.8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n </a>\n </div>\n \n </div>\n</header>"
8
+ },
9
+ {
10
+ "name": "with service name",
11
+ "options": {
12
+ "serviceName": "Service Name",
13
+ "serviceUrl": "/components/header"
14
+ },
15
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.5-3.8 9zm4.7 17.7c-3.6 1.5-7.8-.2-9.2-3.8-1.5-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.3 3.5-.4 7.6-3.9 9.1zM89.3 35.8c-3.6 1.5-7.8-.2-9.2-3.8-1.4-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.4 3.6-.3 7.7-3.9 9.1zM69.7 17.7l8.9 4.7V9.3l-8.9 2.8c-.2-.3-.5-.6-.9-.9L72.4 0H59.6l3.5 11.2c-.3.3-.6.5-.9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3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n </a>\n </div>\n \n <div class=\"govuk-header__content\">\n \n <a href=\"/components/header\" class=\"govuk-header__link govuk-header__link--service-name\">\n Service Name\n </a>\n \n \n </div>\n \n </div>\n</header>"
16
+ },
17
+ {
18
+ "name": "with navigation",
19
+ "options": {
20
+ "navigation": [
21
+ {
22
+ "href": "#1",
23
+ "text": "Navigation item 1",
24
+ "active": true
25
+ },
26
+ {
27
+ "href": "#2",
28
+ "text": "Navigation item 2"
29
+ },
30
+ {
31
+ "href": "#3",
32
+ "text": "Navigation item 3"
33
+ },
34
+ {
35
+ "href": "#4",
36
+ "text": "Navigation item 4"
37
+ }
38
+ ]
39
+ },
40
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1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.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n </a>\n </div>\n \n <div class=\"govuk-header__content\">\n \n \n <button type=\"button\" class=\"govuk-header__menu-button govuk-js-header-toggle\" aria-controls=\"navigation\" aria-label=\"Show or hide navigation menu\">Menu</button>\n <nav>\n <ul id=\"navigation\" class=\"govuk-header__navigation \" aria-label=\"Navigation menu\">\n \n \n <li class=\"govuk-header__navigation-item govuk-header__navigation-item--active\">\n \n <a class=\"govuk-header__link\" href=\"#1\">\n \n Navigation item 1\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#2\">\n \n Navigation item 2\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#3\">\n \n Navigation item 3\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#4\">\n \n Navigation item 4\n \n </a>\n \n </li>\n \n \n </ul>\n </nav>\n \n </div>\n \n </div>\n</header>"
41
+ },
42
+ {
43
+ "name": "with custom navigation label",
44
+ "options": {
45
+ "navigationLabel": "Custom navigation label",
46
+ "navigation": [
47
+ {
48
+ "href": "#1",
49
+ "text": "Navigation item 1",
50
+ "active": true
51
+ },
52
+ {
53
+ "href": "#2",
54
+ "text": "Navigation item 2"
55
+ },
56
+ {
57
+ "href": "#3",
58
+ "text": "Navigation item 3"
59
+ },
60
+ {
61
+ "href": "#4",
62
+ "text": "Navigation item 4"
63
+ }
64
+ ]
65
+ },
66
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.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8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n </a>\n </div>\n \n <div class=\"govuk-header__content\">\n \n \n <button type=\"button\" class=\"govuk-header__menu-button govuk-js-header-toggle\" aria-controls=\"navigation\" aria-label=\"Show or hide navigation menu\">Menu</button>\n <nav>\n <ul id=\"navigation\" class=\"govuk-header__navigation \" aria-label=\"Custom navigation label\">\n \n \n <li class=\"govuk-header__navigation-item govuk-header__navigation-item--active\">\n \n <a class=\"govuk-header__link\" href=\"#1\">\n \n Navigation item 1\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#2\">\n \n Navigation item 2\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#3\">\n \n Navigation item 3\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#4\">\n \n Navigation item 4\n \n </a>\n \n </li>\n \n \n </ul>\n </nav>\n \n </div>\n \n </div>\n</header>"
67
+ },
68
+ {
69
+ "name": "with custom menu button label",
70
+ "options": {
71
+ "menuButtonLabel": "Custom button label",
72
+ "navigation": [
73
+ {
74
+ "href": "#1",
75
+ "text": "Navigation item 1",
76
+ "active": true
77
+ },
78
+ {
79
+ "href": "#2",
80
+ "text": "Navigation item 2"
81
+ },
82
+ {
83
+ "href": "#3",
84
+ "text": "Navigation item 3"
85
+ },
86
+ {
87
+ "href": "#4",
88
+ "text": "Navigation item 4"
89
+ }
90
+ ]
91
+ },
92
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9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-.5 4.3-8.7-3-11.4-7.6-8.8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n </a>\n </div>\n \n <div class=\"govuk-header__content\">\n \n \n <button type=\"button\" class=\"govuk-header__menu-button govuk-js-header-toggle\" aria-controls=\"navigation\" aria-label=\"Custom button label\">Menu</button>\n <nav>\n <ul id=\"navigation\" class=\"govuk-header__navigation \" aria-label=\"Navigation menu\">\n \n \n <li class=\"govuk-header__navigation-item govuk-header__navigation-item--active\">\n \n <a class=\"govuk-header__link\" href=\"#1\">\n \n Navigation item 1\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#2\">\n \n Navigation item 2\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#3\">\n \n Navigation item 3\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#4\">\n \n Navigation item 4\n \n </a>\n \n </li>\n \n \n </ul>\n </nav>\n \n </div>\n \n </div>\n</header>"
93
+ },
94
+ {
95
+ "name": "with service name and navigation",
96
+ "options": {
97
+ "serviceName": "Service Name",
98
+ "serviceUrl": "/components/header",
99
+ "navigation": [
100
+ {
101
+ "href": "#1",
102
+ "text": "Navigation item 1",
103
+ "active": true
104
+ },
105
+ {
106
+ "href": "#2",
107
+ "text": "Navigation item 2"
108
+ },
109
+ {
110
+ "href": "#3",
111
+ "text": "Navigation item 3"
112
+ },
113
+ {
114
+ "href": "#4",
115
+ "text": "Navigation item 4"
116
+ }
117
+ ]
118
+ },
119
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5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-6.3-4.6-5.6-7.9 1-4.7 5.7-5.9 8-.5 4.3-8.7-3-11.4-7.6-8.8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n </a>\n </div>\n \n <div class=\"govuk-header__content\">\n \n <a href=\"/components/header\" class=\"govuk-header__link govuk-header__link--service-name\">\n Service Name\n </a>\n \n \n <button type=\"button\" class=\"govuk-header__menu-button govuk-js-header-toggle\" aria-controls=\"navigation\" aria-label=\"Show or hide navigation menu\">Menu</button>\n <nav>\n <ul id=\"navigation\" class=\"govuk-header__navigation \" aria-label=\"Navigation menu\">\n \n \n <li class=\"govuk-header__navigation-item govuk-header__navigation-item--active\">\n \n <a class=\"govuk-header__link\" href=\"#1\">\n \n Navigation item 1\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#2\">\n \n Navigation item 2\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#3\">\n \n Navigation item 3\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#4\">\n \n Navigation item 4\n \n </a>\n \n </li>\n \n \n </ul>\n </nav>\n \n </div>\n \n </div>\n</header>"
120
+ },
121
+ {
122
+ "name": "with large navigation",
123
+ "options": {
124
+ "navigation": [
125
+ {
126
+ "href": "/browse/benefits",
127
+ "text": "Benefits"
128
+ },
129
+ {
130
+ "href": "/browse/births-deaths-marriages",
131
+ "text": "Births, deaths, marriages and care"
132
+ },
133
+ {
134
+ "href": "/browse/business",
135
+ "text": "Business and self-employed"
136
+ },
137
+ {
138
+ "href": "/browse/childcare-parenting",
139
+ "text": "Childcare and parenting"
140
+ },
141
+ {
142
+ "href": "/browse/citizenship",
143
+ "text": "Citizenship and living in the UK"
144
+ },
145
+ {
146
+ "href": "/browse/justice",
147
+ "text": "Crime, justice and the law"
148
+ },
149
+ {
150
+ "href": "/browse/disabilities",
151
+ "text": "Disabled people"
152
+ },
153
+ {
154
+ "href": "/browse/driving",
155
+ "text": "Driving and transport"
156
+ },
157
+ {
158
+ "href": "/browse/education",
159
+ "text": "Education and learning"
160
+ },
161
+ {
162
+ "href": "/browse/employing-people",
163
+ "text": "Employing people"
164
+ },
165
+ {
166
+ "href": "/browse/environment-countryside",
167
+ "text": "Environment and countryside"
168
+ },
169
+ {
170
+ "href": "/browse/housing-local-services",
171
+ "text": "Housing and local services"
172
+ },
173
+ {
174
+ "href": "/browse/tax",
175
+ "text": "Money and tax"
176
+ },
177
+ {
178
+ "href": "/browse/abroad",
179
+ "text": "Passports, travel and living abroad"
180
+ },
181
+ {
182
+ "href": "/browse/visas-immigration",
183
+ "text": "Visas and immigration"
184
+ },
185
+ {
186
+ "href": "/browse/working",
187
+ "text": "Working, jobs and pensions"
188
+ }
189
+ ]
190
+ },
191
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.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7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n </a>\n </div>\n \n <div class=\"govuk-header__content\">\n \n \n <button type=\"button\" class=\"govuk-header__menu-button govuk-js-header-toggle\" aria-controls=\"navigation\" aria-label=\"Show or hide navigation menu\">Menu</button>\n <nav>\n <ul id=\"navigation\" class=\"govuk-header__navigation \" aria-label=\"Navigation menu\">\n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/browse/benefits\">\n \n Benefits\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/browse/births-deaths-marriages\">\n \n Births, deaths, marriages and care\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/browse/business\">\n \n Business and self-employed\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/browse/childcare-parenting\">\n \n Childcare and parenting\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/browse/citizenship\">\n \n Citizenship and living in the UK\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/browse/justice\">\n \n Crime, justice and the law\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/browse/disabilities\">\n \n Disabled people\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/browse/driving\">\n \n Driving and transport\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/browse/education\">\n \n Education and learning\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/browse/employing-people\">\n \n Employing people\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/browse/environment-countryside\">\n \n Environment and countryside\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/browse/housing-local-services\">\n \n Housing and local services\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/browse/tax\">\n \n Money and tax\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/browse/abroad\">\n \n Passports, travel and living abroad\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/browse/visas-immigration\">\n \n Visas and immigration\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/browse/working\">\n \n Working, jobs and pensions\n \n </a>\n \n </li>\n \n \n </ul>\n </nav>\n \n </div>\n \n </div>\n</header>"
192
+ },
193
+ {
194
+ "name": "with product name",
195
+ "options": {
196
+ "navigationClasses": "govuk-header__navigation--end",
197
+ "productName": "Product Name"
198
+ },
199
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.5-3.8 9zm4.7 17.7c-3.6 1.5-7.8-.2-9.2-3.8-1.5-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.3 3.5-.4 7.6-3.9 9.1zM89.3 35.8c-3.6 1.5-7.8-.2-9.2-3.8-1.4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3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n <span class=\"govuk-header__product-name\">\n Product Name\n </span>\n \n </a>\n </div>\n \n </div>\n</header>"
200
+ },
201
+ {
202
+ "name": "full width",
203
+ "options": {
204
+ "containerClasses": "govuk-header__container--full-width",
205
+ "navigationClasses": "govuk-header__navigation--end",
206
+ "productName": "Product Name"
207
+ },
208
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-header__container--full-width\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1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.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n <span class=\"govuk-header__product-name\">\n Product Name\n </span>\n \n </a>\n </div>\n \n </div>\n</header>"
209
+ },
210
+ {
211
+ "name": "full width with navigation",
212
+ "options": {
213
+ "containerClasses": "govuk-header__container--full-width",
214
+ "navigationClasses": "govuk-header__navigation--end",
215
+ "productName": "Product Name",
216
+ "navigation": [
217
+ {
218
+ "href": "#1",
219
+ "text": "Navigation item 1",
220
+ "active": true
221
+ },
222
+ {
223
+ "href": "#2",
224
+ "text": "Navigation item 2"
225
+ },
226
+ {
227
+ "href": "#3",
228
+ "text": "Navigation item 3"
229
+ }
230
+ ]
231
+ },
232
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-header__container--full-width\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.5-3.8 9zm4.7 17.7c-3.6 1.5-7.8-.2-9.2-3.8-1.5-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.3 3.5-.4 7.6-3.9 9.1zM89.3 35.8c-3.6 1.5-7.8-.2-9.2-3.8-1.4-3.6.2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9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n <span class=\"govuk-header__product-name\">\n Product Name\n </span>\n \n </a>\n </div>\n \n <div class=\"govuk-header__content\">\n \n \n <button type=\"button\" class=\"govuk-header__menu-button govuk-js-header-toggle\" aria-controls=\"navigation\" aria-label=\"Show or hide navigation menu\">Menu</button>\n <nav>\n <ul id=\"navigation\" class=\"govuk-header__navigation govuk-header__navigation--end\" aria-label=\"Navigation menu\">\n \n \n <li class=\"govuk-header__navigation-item govuk-header__navigation-item--active\">\n \n <a class=\"govuk-header__link\" href=\"#1\">\n \n Navigation item 1\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#2\">\n \n Navigation item 2\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#3\">\n \n Navigation item 3\n \n </a>\n \n </li>\n \n \n </ul>\n </nav>\n \n </div>\n \n </div>\n</header>"
233
+ },
234
+ {
235
+ "name": "navigation item with html",
236
+ "options": {
237
+ "serviceName": "Service Name",
238
+ "serviceUrl": "/components/header",
239
+ "navigation": [
240
+ {
241
+ "href": "#1",
242
+ "html": "<em>Navigation item 1</em>",
243
+ "active": true
244
+ },
245
+ {
246
+ "href": "#2",
247
+ "html": "<em>Navigation item 2</em>"
248
+ },
249
+ {
250
+ "href": "#3",
251
+ "html": "<em>Navigation item 3</em>"
252
+ }
253
+ ]
254
+ },
255
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.5-3.8 9zm4.7 17.7c-3.6 1.5-7.8-.2-9.2-3.8-1.5-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.3 3.5-.4 7.6-3.9 9.1zM89.3 35.8c-3.6 1.5-7.8-.2-9.2-3.8-1.4-3.6.2-7.7 3.9-9.1 3.6-1.5 7.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 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n </a>\n </div>\n \n <div class=\"govuk-header__content\">\n \n <a href=\"/components/header\" class=\"govuk-header__link govuk-header__link--service-name\">\n Service Name\n </a>\n \n \n <button type=\"button\" class=\"govuk-header__menu-button govuk-js-header-toggle\" aria-controls=\"navigation\" aria-label=\"Show or hide navigation menu\">Menu</button>\n <nav>\n <ul id=\"navigation\" class=\"govuk-header__navigation \" aria-label=\"Navigation menu\">\n \n \n <li class=\"govuk-header__navigation-item govuk-header__navigation-item--active\">\n \n <a class=\"govuk-header__link\" href=\"#1\">\n \n <em>Navigation item 1</em>\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#2\">\n \n <em>Navigation item 2</em>\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#3\">\n \n <em>Navigation item 3</em>\n \n </a>\n \n </li>\n \n \n </ul>\n </nav>\n \n </div>\n \n </div>\n</header>"
256
+ },
257
+ {
258
+ "name": "navigation item with text without link",
259
+ "options": {
260
+ "serviceName": "Service Name",
261
+ "serviceUrl": "/components/header",
262
+ "navigation": [
263
+ {
264
+ "text": "Navigation item 1"
265
+ },
266
+ {
267
+ "text": "Navigation item 2"
268
+ },
269
+ {
270
+ "text": "Navigation item 3"
271
+ }
272
+ ]
273
+ },
274
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.5-3.8 9zm4.7 17.7c-3.6 1.5-7.8-.2-9.2-3.8-1.5-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.3 3.5-.4 7.6-3.9 9.1zM89.3 35.8c-3.6 1.5-7.8-.2-9.2-3.8-1.4-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.4 3.6-.3 7.7-3.9 9.1zM69.7 17.7l8.9 4.7V9.3l-8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3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n </a>\n </div>\n \n <div class=\"govuk-header__content\">\n \n <a href=\"/components/header\" class=\"govuk-header__link govuk-header__link--service-name\">\n Service Name\n </a>\n \n \n <button type=\"button\" class=\"govuk-header__menu-button govuk-js-header-toggle\" aria-controls=\"navigation\" aria-label=\"Show or hide navigation menu\">Menu</button>\n <nav>\n <ul id=\"navigation\" class=\"govuk-header__navigation \" aria-label=\"Navigation menu\">\n \n \n <li class=\"govuk-header__navigation-item\">\n \n Navigation item 1\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n Navigation item 2\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n Navigation item 3\n \n </li>\n \n \n </ul>\n </nav>\n \n </div>\n \n </div>\n</header>"
275
+ },
276
+ {
277
+ "name": "attributes",
278
+ "options": {
279
+ "attributes": {
280
+ "data-test-attribute": "value",
281
+ "data-test-attribute-2": "value-2"
282
+ }
283
+ },
284
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\" data-test-attribute=\"value\" data-test-attribute-2=\"value-2\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3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c16.9 0 32.8 1.1 47.1 3.2 4-16.9 8.9-26.7 14-33.5l-9.6-3.4c1 4.9 1.1 7.2 0 10.2-1.5-1.4-3-4.3-4.2-8.7L108.6 76c2.8-2 5-3.2 7.5-3.3-4.4 9.4-10 11.9-13.6 11.2-4.3-.8-6.3-4.6-5.6-7.9 1-4.7 5.7-5.9 8-.5 4.3-8.7-3-11.4-7.6-8.8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n </a>\n </div>\n \n </div>\n</header>"
285
+ },
286
+ {
287
+ "name": "classes",
288
+ "options": {
289
+ "classes": "app-header--custom-modifier"
290
+ },
291
+ "html": "<header class=\"govuk-header app-header--custom-modifier\" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.5-3.8 9zm4.7 17.7c-3.6 1.5-7.8-.2-9.2-3.8-1.5-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.3 3.5-.4 7.6-3.9 9.1zM89.3 35.8c-3.6 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7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n </a>\n </div>\n \n </div>\n</header>"
292
+ },
293
+ {
294
+ "name": "custom homepage url",
295
+ "options": {
296
+ "homepageUrl": "/"
297
+ },
298
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-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13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n </a>\n </div>\n \n </div>\n</header>"
299
+ },
300
+ {
301
+ "name": "navigation item with attributes",
302
+ "options": {
303
+ "navigation": [
304
+ {
305
+ "href": "/link",
306
+ "text": "Item",
307
+ "attributes": {
308
+ "data-attribute": "my-attribute",
309
+ "data-attribute-2": "my-attribute-2"
310
+ }
311
+ }
312
+ ]
313
+ },
314
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"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-.4 2.4 0 4.1 3.1 7.5 7 8.1h.2c.3 0 .7.1 1 .1.4 0 .7 0 1-.1h.2c4-.6 7.1-4.1 7.1-8.1 0-.8-.1-1.7-.4-2.4V34l-5.1-15.4c.4-.2.7-.6 1-.9zM66 92.8c16.9 0 32.8 1.1 47.1 3.2 4-16.9 8.9-26.7 14-33.5l-9.6-3.4c1 4.9 1.1 7.2 0 10.2-1.5-1.4-3-4.3-4.2-8.7L108.6 76c2.8-2 5-3.2 7.5-3.3-4.4 9.4-10 11.9-13.6 11.2-4.3-.8-6.3-4.6-5.6-7.9 1-4.7 5.7-5.9 8-.5 4.3-8.7-3-11.4-7.6-8.8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n </a>\n </div>\n \n <div class=\"govuk-header__content\">\n \n \n <button type=\"button\" class=\"govuk-header__menu-button govuk-js-header-toggle\" aria-controls=\"navigation\" aria-label=\"Show or hide navigation menu\">Menu</button>\n <nav>\n <ul id=\"navigation\" class=\"govuk-header__navigation \" aria-label=\"Navigation menu\">\n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"/link\" data-attribute=\"my-attribute\" data-attribute-2=\"my-attribute-2\">\n \n Item\n \n </a>\n \n </li>\n \n \n </ul>\n </nav>\n \n </div>\n \n </div>\n</header>"
315
+ },
316
+ {
317
+ "name": "navigation item with html as text",
318
+ "options": {
319
+ "serviceName": "Service Name",
320
+ "serviceUrl": "/components/header",
321
+ "navigation": [
322
+ {
323
+ "href": "#1",
324
+ "text": "<em>Navigation item 1</em>",
325
+ "active": true
326
+ },
327
+ {
328
+ "href": "#2",
329
+ "text": "<em>Navigation item 2</em>"
330
+ },
331
+ {
332
+ "href": "#3",
333
+ "text": "<em>Navigation item 3</em>"
334
+ }
335
+ ]
336
+ },
337
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6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2-1.5-1.4-3-4.3-4.2-8.7L108.6 76c2.8-2 5-3.2 7.5-3.3-4.4 9.4-10 11.9-13.6 11.2-4.3-.8-6.3-4.6-5.6-7.9 1-4.7 5.7-5.9 8-.5 4.3-8.7-3-11.4-7.6-8.8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n </a>\n </div>\n \n <div class=\"govuk-header__content\">\n \n <a href=\"/components/header\" class=\"govuk-header__link govuk-header__link--service-name\">\n Service Name\n </a>\n \n \n <button type=\"button\" class=\"govuk-header__menu-button govuk-js-header-toggle\" aria-controls=\"navigation\" aria-label=\"Show or hide navigation menu\">Menu</button>\n <nav>\n <ul id=\"navigation\" class=\"govuk-header__navigation \" aria-label=\"Navigation menu\">\n \n \n <li class=\"govuk-header__navigation-item govuk-header__navigation-item--active\">\n \n <a class=\"govuk-header__link\" href=\"#1\">\n \n &lt;em&gt;Navigation item 1&lt;/em&gt;\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#2\">\n \n &lt;em&gt;Navigation item 2&lt;/em&gt;\n \n </a>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <a class=\"govuk-header__link\" href=\"#3\">\n \n &lt;em&gt;Navigation item 3&lt;/em&gt;\n \n </a>\n \n </li>\n \n \n </ul>\n </nav>\n \n </div>\n \n </div>\n</header>"
338
+ },
339
+ {
340
+ "name": "navigation item with html without link",
341
+ "options": {
342
+ "serviceName": "Service Name",
343
+ "serviceUrl": "/components/header",
344
+ "navigation": [
345
+ {
346
+ "html": "<em>Navigation item 1</em>",
347
+ "active": true
348
+ },
349
+ {
350
+ "html": "<em>Navigation item 2</em>"
351
+ },
352
+ {
353
+ "html": "<em>Navigation item 3</em>"
354
+ }
355
+ ]
356
+ },
357
+ "html": "<header class=\"govuk-header \" role=\"banner\" data-module=\"govuk-header\">\n <div class=\"govuk-header__container govuk-width-container\">\n <div class=\"govuk-header__logo\">\n <a href=\"/\" class=\"govuk-header__link govuk-header__link--homepage\">\n <span class=\"govuk-header__logotype\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n class=\"govuk-header__logotype-crown\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 132 97\"\n height=\"30\"\n width=\"36\"\n >\n <path\n fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9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7.2 0 10.2-1.5-1.4-3-4.3-4.2-8.7L108.6 76c2.8-2 5-3.2 7.5-3.3-4.4 9.4-10 11.9-13.6 11.2-4.3-.8-6.3-4.6-5.6-7.9 1-4.7 5.7-5.9 8-.5 4.3-8.7-3-11.4-7.6-8.8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"\n ></path>\n <image src=\"/assets/images/govuk-logotype-crown.png\" xlink:href=\"\" class=\"govuk-header__logotype-crown-fallback-image\" width=\"36\" height=\"32\"></image>\n </svg>\n <span class=\"govuk-header__logotype-text\">\n GOV.UK\n </span>\n </span>\n \n </a>\n </div>\n \n <div class=\"govuk-header__content\">\n \n <a href=\"/components/header\" class=\"govuk-header__link govuk-header__link--service-name\">\n Service Name\n </a>\n \n \n <button type=\"button\" class=\"govuk-header__menu-button govuk-js-header-toggle\" aria-controls=\"navigation\" aria-label=\"Show or hide navigation menu\">Menu</button>\n <nav>\n <ul id=\"navigation\" class=\"govuk-header__navigation \" aria-label=\"Navigation menu\">\n \n \n <li class=\"govuk-header__navigation-item govuk-header__navigation-item--active\">\n \n <em>Navigation item 1</em>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <em>Navigation item 2</em>\n \n </li>\n \n \n \n <li class=\"govuk-header__navigation-item\">\n \n <em>Navigation item 3</em>\n \n </li>\n \n \n </ul>\n </nav>\n \n </div>\n \n </div>\n</header>"
358
+ }
359
+ ]
360
+ }
@@ -6,251 +6,6 @@
6
6
 
7
7
  (function(undefined) {
8
8
 
9
- // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Object/defineProperty/detect.js
10
- var detect = (
11
- // In IE8, defineProperty could only act on DOM elements, so full support
12
- // for the feature requires the ability to set a property on an arbitrary object
13
- 'defineProperty' in Object && (function() {
14
- try {
15
- var a = {};
16
- Object.defineProperty(a, 'test', {value:42});
17
- return true;
18
- } catch(e) {
19
- return false
20
- }
21
- }())
22
- );
23
-
24
- if (detect) return
25
-
26
- // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Object.defineProperty&flags=always
27
- (function (nativeDefineProperty) {
28
-
29
- var supportsAccessors = Object.prototype.hasOwnProperty('__defineGetter__');
30
- var ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine';
31
- var ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value';
32
-
33
- Object.defineProperty = function defineProperty(object, property, descriptor) {
34
-
35
- // Where native support exists, assume it
36
- if (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) {
37
- return nativeDefineProperty(object, property, descriptor);
38
- }
39
-
40
- if (object === null || !(object instanceof Object || typeof object === 'object')) {
41
- throw new TypeError('Object.defineProperty called on non-object');
42
- }
43
-
44
- if (!(descriptor instanceof Object)) {
45
- throw new TypeError('Property description must be an object');
46
- }
47
-
48
- var propertyString = String(property);
49
- var hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor;
50
- var getterType = 'get' in descriptor && typeof descriptor.get;
51
- var setterType = 'set' in descriptor && typeof descriptor.set;
52
-
53
- // handle descriptor.get
54
- if (getterType) {
55
- if (getterType !== 'function') {
56
- throw new TypeError('Getter must be a function');
57
- }
58
- if (!supportsAccessors) {
59
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
60
- }
61
- if (hasValueOrWritable) {
62
- throw new TypeError(ERR_VALUE_ACCESSORS);
63
- }
64
- Object.__defineGetter__.call(object, propertyString, descriptor.get);
65
- } else {
66
- object[propertyString] = descriptor.value;
67
- }
68
-
69
- // handle descriptor.set
70
- if (setterType) {
71
- if (setterType !== 'function') {
72
- throw new TypeError('Setter must be a function');
73
- }
74
- if (!supportsAccessors) {
75
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
76
- }
77
- if (hasValueOrWritable) {
78
- throw new TypeError(ERR_VALUE_ACCESSORS);
79
- }
80
- Object.__defineSetter__.call(object, propertyString, descriptor.set);
81
- }
82
-
83
- // OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above
84
- if ('value' in descriptor) {
85
- object[propertyString] = descriptor.value;
86
- }
87
-
88
- return object;
89
- };
90
- }(Object.defineProperty));
91
- })
92
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
93
-
94
- (function(undefined) {
95
- // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Function/prototype/bind/detect.js
96
- var detect = 'bind' in Function.prototype;
97
-
98
- if (detect) return
99
-
100
- // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Function.prototype.bind&flags=always
101
- Object.defineProperty(Function.prototype, 'bind', {
102
- value: function bind(that) { // .length is 1
103
- // add necessary es5-shim utilities
104
- var $Array = Array;
105
- var $Object = Object;
106
- var ObjectPrototype = $Object.prototype;
107
- var ArrayPrototype = $Array.prototype;
108
- var Empty = function Empty() {};
109
- var to_string = ObjectPrototype.toString;
110
- var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
111
- var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, tryFunctionObject = function tryFunctionObject(value) { try { fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]'; isCallable = function isCallable(value) { if (typeof value !== 'function') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; };
112
- var array_slice = ArrayPrototype.slice;
113
- var array_concat = ArrayPrototype.concat;
114
- var array_push = ArrayPrototype.push;
115
- var max = Math.max;
116
- // /add necessary es5-shim utilities
117
-
118
- // 1. Let Target be the this value.
119
- var target = this;
120
- // 2. If IsCallable(Target) is false, throw a TypeError exception.
121
- if (!isCallable(target)) {
122
- throw new TypeError('Function.prototype.bind called on incompatible ' + target);
123
- }
124
- // 3. Let A be a new (possibly empty) internal list of all of the
125
- // argument values provided after thisArg (arg1, arg2 etc), in order.
126
- // XXX slicedArgs will stand in for "A" if used
127
- var args = array_slice.call(arguments, 1); // for normal call
128
- // 4. Let F be a new native ECMAScript object.
129
- // 11. Set the [[Prototype]] internal property of F to the standard
130
- // built-in Function prototype object as specified in 15.3.3.1.
131
- // 12. Set the [[Call]] internal property of F as described in
132
- // 15.3.4.5.1.
133
- // 13. Set the [[Construct]] internal property of F as described in
134
- // 15.3.4.5.2.
135
- // 14. Set the [[HasInstance]] internal property of F as described in
136
- // 15.3.4.5.3.
137
- var bound;
138
- var binder = function () {
139
-
140
- if (this instanceof bound) {
141
- // 15.3.4.5.2 [[Construct]]
142
- // When the [[Construct]] internal method of a function object,
143
- // F that was created using the bind function is called with a
144
- // list of arguments ExtraArgs, the following steps are taken:
145
- // 1. Let target be the value of F's [[TargetFunction]]
146
- // internal property.
147
- // 2. If target has no [[Construct]] internal method, a
148
- // TypeError exception is thrown.
149
- // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
150
- // property.
151
- // 4. Let args be a new list containing the same values as the
152
- // list boundArgs in the same order followed by the same
153
- // values as the list ExtraArgs in the same order.
154
- // 5. Return the result of calling the [[Construct]] internal
155
- // method of target providing args as the arguments.
156
-
157
- var result = target.apply(
158
- this,
159
- array_concat.call(args, array_slice.call(arguments))
160
- );
161
- if ($Object(result) === result) {
162
- return result;
163
- }
164
- return this;
165
-
166
- } else {
167
- // 15.3.4.5.1 [[Call]]
168
- // When the [[Call]] internal method of a function object, F,
169
- // which was created using the bind function is called with a
170
- // this value and a list of arguments ExtraArgs, the following
171
- // steps are taken:
172
- // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
173
- // property.
174
- // 2. Let boundThis be the value of F's [[BoundThis]] internal
175
- // property.
176
- // 3. Let target be the value of F's [[TargetFunction]] internal
177
- // property.
178
- // 4. Let args be a new list containing the same values as the
179
- // list boundArgs in the same order followed by the same
180
- // values as the list ExtraArgs in the same order.
181
- // 5. Return the result of calling the [[Call]] internal method
182
- // of target providing boundThis as the this value and
183
- // providing args as the arguments.
184
-
185
- // equiv: target.call(this, ...boundArgs, ...args)
186
- return target.apply(
187
- that,
188
- array_concat.call(args, array_slice.call(arguments))
189
- );
190
-
191
- }
192
-
193
- };
194
-
195
- // 15. If the [[Class]] internal property of Target is "Function", then
196
- // a. Let L be the length property of Target minus the length of A.
197
- // b. Set the length own property of F to either 0 or L, whichever is
198
- // larger.
199
- // 16. Else set the length own property of F to 0.
200
-
201
- var boundLength = max(0, target.length - args.length);
202
-
203
- // 17. Set the attributes of the length own property of F to the values
204
- // specified in 15.3.5.1.
205
- var boundArgs = [];
206
- for (var i = 0; i < boundLength; i++) {
207
- array_push.call(boundArgs, '$' + i);
208
- }
209
-
210
- // XXX Build a dynamic function with desired amount of arguments is the only
211
- // way to set the length property of a function.
212
- // In environments where Content Security Policies enabled (Chrome extensions,
213
- // for ex.) all use of eval or Function costructor throws an exception.
214
- // However in all of these environments Function.prototype.bind exists
215
- // and so this code will never be executed.
216
- bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);
217
-
218
- if (target.prototype) {
219
- Empty.prototype = target.prototype;
220
- bound.prototype = new Empty();
221
- // Clean up dangling references.
222
- Empty.prototype = null;
223
- }
224
-
225
- // TODO
226
- // 18. Set the [[Extensible]] internal property of F to true.
227
-
228
- // TODO
229
- // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
230
- // 20. Call the [[DefineOwnProperty]] internal method of F with
231
- // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
232
- // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
233
- // false.
234
- // 21. Call the [[DefineOwnProperty]] internal method of F with
235
- // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
236
- // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
237
- // and false.
238
-
239
- // TODO
240
- // NOTE Function objects created using Function.prototype.bind do not
241
- // have a prototype property or the [[Code]], [[FormalParameters]], and
242
- // [[Scope]] internal properties.
243
- // XXX can't delete prototype in pure-js.
244
-
245
- // 22. Return F.
246
- return bound;
247
- }
248
- });
249
- })
250
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
251
-
252
- (function(undefined) {
253
-
254
9
  // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Window/detect.js
255
10
  var detect = ('Window' in this);
256
11
 
@@ -370,43 +125,130 @@ if (detect) return
370
125
  }
371
126
  }
372
127
 
373
- cache[propertyName] = newValue;
374
- });
375
-
376
- prototype.constructor = Element;
377
-
378
- if (!prototype.hasAttribute) {
379
- // <Element>.hasAttribute
380
- prototype.hasAttribute = function hasAttribute(name) {
381
- return this.getAttribute(name) !== null;
382
- };
383
- }
384
-
385
- // Apply Element prototype to the pre-existing DOM as soon as the body element appears.
386
- function bodyCheck() {
387
- if (!(loopLimit--)) clearTimeout(interval);
388
- if (document.body && !document.body.prototype && /(complete|interactive)/.test(document.readyState)) {
389
- shiv(document, true);
390
- if (interval && document.body.prototype) clearTimeout(interval);
391
- return (!!document.body.prototype);
128
+ cache[propertyName] = newValue;
129
+ });
130
+
131
+ prototype.constructor = Element;
132
+
133
+ if (!prototype.hasAttribute) {
134
+ // <Element>.hasAttribute
135
+ prototype.hasAttribute = function hasAttribute(name) {
136
+ return this.getAttribute(name) !== null;
137
+ };
138
+ }
139
+
140
+ // Apply Element prototype to the pre-existing DOM as soon as the body element appears.
141
+ function bodyCheck() {
142
+ if (!(loopLimit--)) clearTimeout(interval);
143
+ if (document.body && !document.body.prototype && /(complete|interactive)/.test(document.readyState)) {
144
+ shiv(document, true);
145
+ if (interval && document.body.prototype) clearTimeout(interval);
146
+ return (!!document.body.prototype);
147
+ }
148
+ return false;
149
+ }
150
+ if (!bodyCheck()) {
151
+ document.onreadystatechange = bodyCheck;
152
+ interval = setInterval(bodyCheck, 25);
153
+ }
154
+
155
+ // Apply to any new elements created after load
156
+ document.createElement = function createElement(nodeName) {
157
+ var element = nativeCreateElement(String(nodeName).toLowerCase());
158
+ return shiv(element);
159
+ };
160
+
161
+ // remove sandboxed iframe
162
+ document.removeChild(vbody);
163
+ }());
164
+
165
+ })
166
+ .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
167
+
168
+ (function(undefined) {
169
+
170
+ // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Object/defineProperty/detect.js
171
+ var detect = (
172
+ // In IE8, defineProperty could only act on DOM elements, so full support
173
+ // for the feature requires the ability to set a property on an arbitrary object
174
+ 'defineProperty' in Object && (function() {
175
+ try {
176
+ var a = {};
177
+ Object.defineProperty(a, 'test', {value:42});
178
+ return true;
179
+ } catch(e) {
180
+ return false
181
+ }
182
+ }())
183
+ );
184
+
185
+ if (detect) return
186
+
187
+ // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Object.defineProperty&flags=always
188
+ (function (nativeDefineProperty) {
189
+
190
+ var supportsAccessors = Object.prototype.hasOwnProperty('__defineGetter__');
191
+ var ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine';
192
+ var ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value';
193
+
194
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
195
+
196
+ // Where native support exists, assume it
197
+ if (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) {
198
+ return nativeDefineProperty(object, property, descriptor);
199
+ }
200
+
201
+ if (object === null || !(object instanceof Object || typeof object === 'object')) {
202
+ throw new TypeError('Object.defineProperty called on non-object');
203
+ }
204
+
205
+ if (!(descriptor instanceof Object)) {
206
+ throw new TypeError('Property description must be an object');
207
+ }
208
+
209
+ var propertyString = String(property);
210
+ var hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor;
211
+ var getterType = 'get' in descriptor && typeof descriptor.get;
212
+ var setterType = 'set' in descriptor && typeof descriptor.set;
213
+
214
+ // handle descriptor.get
215
+ if (getterType) {
216
+ if (getterType !== 'function') {
217
+ throw new TypeError('Getter must be a function');
218
+ }
219
+ if (!supportsAccessors) {
220
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
221
+ }
222
+ if (hasValueOrWritable) {
223
+ throw new TypeError(ERR_VALUE_ACCESSORS);
224
+ }
225
+ Object.__defineGetter__.call(object, propertyString, descriptor.get);
226
+ } else {
227
+ object[propertyString] = descriptor.value;
228
+ }
229
+
230
+ // handle descriptor.set
231
+ if (setterType) {
232
+ if (setterType !== 'function') {
233
+ throw new TypeError('Setter must be a function');
234
+ }
235
+ if (!supportsAccessors) {
236
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
237
+ }
238
+ if (hasValueOrWritable) {
239
+ throw new TypeError(ERR_VALUE_ACCESSORS);
240
+ }
241
+ Object.__defineSetter__.call(object, propertyString, descriptor.set);
242
+ }
243
+
244
+ // OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above
245
+ if ('value' in descriptor) {
246
+ object[propertyString] = descriptor.value;
392
247
  }
393
- return false;
394
- }
395
- if (!bodyCheck()) {
396
- document.onreadystatechange = bodyCheck;
397
- interval = setInterval(bodyCheck, 25);
398
- }
399
248
 
400
- // Apply to any new elements created after load
401
- document.createElement = function createElement(nodeName) {
402
- var element = nativeCreateElement(String(nodeName).toLowerCase());
403
- return shiv(element);
249
+ return object;
404
250
  };
405
-
406
- // remove sandboxed iframe
407
- document.removeChild(vbody);
408
- }());
409
-
251
+ }(Object.defineProperty));
410
252
  })
411
253
  .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
412
254
 
@@ -659,57 +501,564 @@ if (detect) return
659
501
  })
660
502
  .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
661
503
 
504
+ (function(undefined) {
505
+
506
+ // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-service/master/packages/polyfill-library/polyfills/DOMTokenList/detect.js
507
+ var detect = (
508
+ 'DOMTokenList' in this && (function (x) {
509
+ return 'classList' in x ? !x.classList.toggle('x', false) && !x.className : true;
510
+ })(document.createElement('x'))
511
+ );
512
+
513
+ if (detect) return
514
+
515
+ // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-service/master/packages/polyfill-library/polyfills/DOMTokenList/polyfill.js
516
+ (function (global) {
517
+ var nativeImpl = "DOMTokenList" in global && global.DOMTokenList;
518
+
519
+ if (
520
+ !nativeImpl ||
521
+ (
522
+ !!document.createElementNS &&
523
+ !!document.createElementNS('http://www.w3.org/2000/svg', 'svg') &&
524
+ !(document.createElementNS("http://www.w3.org/2000/svg", "svg").classList instanceof DOMTokenList)
525
+ )
526
+ ) {
527
+ global.DOMTokenList = (function() { // eslint-disable-line no-unused-vars
528
+ var dpSupport = true;
529
+ var defineGetter = function (object, name, fn, configurable) {
530
+ if (Object.defineProperty)
531
+ Object.defineProperty(object, name, {
532
+ configurable: false === dpSupport ? true : !!configurable,
533
+ get: fn
534
+ });
535
+
536
+ else object.__defineGetter__(name, fn);
537
+ };
538
+
539
+ /** Ensure the browser allows Object.defineProperty to be used on native JavaScript objects. */
540
+ try {
541
+ defineGetter({}, "support");
542
+ }
543
+ catch (e) {
544
+ dpSupport = false;
545
+ }
546
+
547
+
548
+ var _DOMTokenList = function (el, prop) {
549
+ var that = this;
550
+ var tokens = [];
551
+ var tokenMap = {};
552
+ var length = 0;
553
+ var maxLength = 0;
554
+ var addIndexGetter = function (i) {
555
+ defineGetter(that, i, function () {
556
+ preop();
557
+ return tokens[i];
558
+ }, false);
559
+
560
+ };
561
+ var reindex = function () {
562
+
563
+ /** Define getter functions for array-like access to the tokenList's contents. */
564
+ if (length >= maxLength)
565
+ for (; maxLength < length; ++maxLength) {
566
+ addIndexGetter(maxLength);
567
+ }
568
+ };
569
+
570
+ /** Helper function called at the start of each class method. Internal use only. */
571
+ var preop = function () {
572
+ var error;
573
+ var i;
574
+ var args = arguments;
575
+ var rSpace = /\s+/;
576
+
577
+ /** Validate the token/s passed to an instance method, if any. */
578
+ if (args.length)
579
+ for (i = 0; i < args.length; ++i)
580
+ if (rSpace.test(args[i])) {
581
+ error = new SyntaxError('String "' + args[i] + '" ' + "contains" + ' an invalid character');
582
+ error.code = 5;
583
+ error.name = "InvalidCharacterError";
584
+ throw error;
585
+ }
586
+
587
+
588
+ /** Split the new value apart by whitespace*/
589
+ if (typeof el[prop] === "object") {
590
+ tokens = ("" + el[prop].baseVal).replace(/^\s+|\s+$/g, "").split(rSpace);
591
+ } else {
592
+ tokens = ("" + el[prop]).replace(/^\s+|\s+$/g, "").split(rSpace);
593
+ }
594
+
595
+ /** Avoid treating blank strings as single-item token lists */
596
+ if ("" === tokens[0]) tokens = [];
597
+
598
+ /** Repopulate the internal token lists */
599
+ tokenMap = {};
600
+ for (i = 0; i < tokens.length; ++i)
601
+ tokenMap[tokens[i]] = true;
602
+ length = tokens.length;
603
+ reindex();
604
+ };
605
+
606
+ /** Populate our internal token list if the targeted attribute of the subject element isn't empty. */
607
+ preop();
608
+
609
+ /** Return the number of tokens in the underlying string. Read-only. */
610
+ defineGetter(that, "length", function () {
611
+ preop();
612
+ return length;
613
+ });
614
+
615
+ /** Override the default toString/toLocaleString methods to return a space-delimited list of tokens when typecast. */
616
+ that.toLocaleString =
617
+ that.toString = function () {
618
+ preop();
619
+ return tokens.join(" ");
620
+ };
621
+
622
+ that.item = function (idx) {
623
+ preop();
624
+ return tokens[idx];
625
+ };
626
+
627
+ that.contains = function (token) {
628
+ preop();
629
+ return !!tokenMap[token];
630
+ };
631
+
632
+ that.add = function () {
633
+ preop.apply(that, args = arguments);
634
+
635
+ for (var args, token, i = 0, l = args.length; i < l; ++i) {
636
+ token = args[i];
637
+ if (!tokenMap[token]) {
638
+ tokens.push(token);
639
+ tokenMap[token] = true;
640
+ }
641
+ }
642
+
643
+ /** Update the targeted attribute of the attached element if the token list's changed. */
644
+ if (length !== tokens.length) {
645
+ length = tokens.length >>> 0;
646
+ if (typeof el[prop] === "object") {
647
+ el[prop].baseVal = tokens.join(" ");
648
+ } else {
649
+ el[prop] = tokens.join(" ");
650
+ }
651
+ reindex();
652
+ }
653
+ };
654
+
655
+ that.remove = function () {
656
+ preop.apply(that, args = arguments);
657
+
658
+ /** Build a hash of token names to compare against when recollecting our token list. */
659
+ for (var args, ignore = {}, i = 0, t = []; i < args.length; ++i) {
660
+ ignore[args[i]] = true;
661
+ delete tokenMap[args[i]];
662
+ }
663
+
664
+ /** Run through our tokens list and reassign only those that aren't defined in the hash declared above. */
665
+ for (i = 0; i < tokens.length; ++i)
666
+ if (!ignore[tokens[i]]) t.push(tokens[i]);
667
+
668
+ tokens = t;
669
+ length = t.length >>> 0;
670
+
671
+ /** Update the targeted attribute of the attached element. */
672
+ if (typeof el[prop] === "object") {
673
+ el[prop].baseVal = tokens.join(" ");
674
+ } else {
675
+ el[prop] = tokens.join(" ");
676
+ }
677
+ reindex();
678
+ };
679
+
680
+ that.toggle = function (token, force) {
681
+ preop.apply(that, [token]);
682
+
683
+ /** Token state's being forced. */
684
+ if (undefined !== force) {
685
+ if (force) {
686
+ that.add(token);
687
+ return true;
688
+ } else {
689
+ that.remove(token);
690
+ return false;
691
+ }
692
+ }
693
+
694
+ /** Token already exists in tokenList. Remove it, and return FALSE. */
695
+ if (tokenMap[token]) {
696
+ that.remove(token);
697
+ return false;
698
+ }
699
+
700
+ /** Otherwise, add the token and return TRUE. */
701
+ that.add(token);
702
+ return true;
703
+ };
704
+
705
+ return that;
706
+ };
707
+
708
+ return _DOMTokenList;
709
+ }());
710
+ }
711
+
712
+ // Add second argument to native DOMTokenList.toggle() if necessary
713
+ (function () {
714
+ var e = document.createElement('span');
715
+ if (!('classList' in e)) return;
716
+ e.classList.toggle('x', false);
717
+ if (!e.classList.contains('x')) return;
718
+ e.classList.constructor.prototype.toggle = function toggle(token /*, force*/) {
719
+ var force = arguments[1];
720
+ if (force === undefined) {
721
+ var add = !this.contains(token);
722
+ this[add ? 'add' : 'remove'](token);
723
+ return add;
724
+ }
725
+ force = !!force;
726
+ this[force ? 'add' : 'remove'](token);
727
+ return force;
728
+ };
729
+ }());
730
+
731
+ // Add multiple arguments to native DOMTokenList.add() if necessary
732
+ (function () {
733
+ var e = document.createElement('span');
734
+ if (!('classList' in e)) return;
735
+ e.classList.add('a', 'b');
736
+ if (e.classList.contains('b')) return;
737
+ var native = e.classList.constructor.prototype.add;
738
+ e.classList.constructor.prototype.add = function () {
739
+ var args = arguments;
740
+ var l = arguments.length;
741
+ for (var i = 0; i < l; i++) {
742
+ native.call(this, args[i]);
743
+ }
744
+ };
745
+ }());
746
+
747
+ // Add multiple arguments to native DOMTokenList.remove() if necessary
748
+ (function () {
749
+ var e = document.createElement('span');
750
+ if (!('classList' in e)) return;
751
+ e.classList.add('a');
752
+ e.classList.add('b');
753
+ e.classList.remove('a', 'b');
754
+ if (!e.classList.contains('b')) return;
755
+ var native = e.classList.constructor.prototype.remove;
756
+ e.classList.constructor.prototype.remove = function () {
757
+ var args = arguments;
758
+ var l = arguments.length;
759
+ for (var i = 0; i < l; i++) {
760
+ native.call(this, args[i]);
761
+ }
762
+ };
763
+ }());
764
+
765
+ }(this));
766
+
767
+ }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
768
+
769
+ (function(undefined) {
770
+
771
+ // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-service/8717a9e04ac7aff99b4980fbedead98036b0929a/packages/polyfill-library/polyfills/Element/prototype/classList/detect.js
772
+ var detect = (
773
+ 'document' in this && "classList" in document.documentElement && 'Element' in this && 'classList' in Element.prototype && (function () {
774
+ var e = document.createElement('span');
775
+ e.classList.add('a', 'b');
776
+ return e.classList.contains('b');
777
+ }())
778
+ );
779
+
780
+ if (detect) return
781
+
782
+ // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Element.prototype.classList&flags=always
783
+ (function (global) {
784
+ var dpSupport = true;
785
+ var defineGetter = function (object, name, fn, configurable) {
786
+ if (Object.defineProperty)
787
+ Object.defineProperty(object, name, {
788
+ configurable: false === dpSupport ? true : !!configurable,
789
+ get: fn
790
+ });
791
+
792
+ else object.__defineGetter__(name, fn);
793
+ };
794
+ /** Ensure the browser allows Object.defineProperty to be used on native JavaScript objects. */
795
+ try {
796
+ defineGetter({}, "support");
797
+ }
798
+ catch (e) {
799
+ dpSupport = false;
800
+ }
801
+ /** Polyfills a property with a DOMTokenList */
802
+ var addProp = function (o, name, attr) {
803
+
804
+ defineGetter(o.prototype, name, function () {
805
+ var tokenList;
806
+
807
+ var THIS = this,
808
+
809
+ /** Prevent this from firing twice for some reason. What the hell, IE. */
810
+ gibberishProperty = "__defineGetter__" + "DEFINE_PROPERTY" + name;
811
+ if(THIS[gibberishProperty]) return tokenList;
812
+ THIS[gibberishProperty] = true;
813
+
814
+ /**
815
+ * IE8 can't define properties on native JavaScript objects, so we'll use a dumb hack instead.
816
+ *
817
+ * What this is doing is creating a dummy element ("reflection") inside a detached phantom node ("mirror")
818
+ * that serves as the target of Object.defineProperty instead. While we could simply use the subject HTML
819
+ * element instead, this would conflict with element types which use indexed properties (such as forms and
820
+ * select lists).
821
+ */
822
+ if (false === dpSupport) {
823
+
824
+ var visage;
825
+ var mirror = addProp.mirror || document.createElement("div");
826
+ var reflections = mirror.childNodes;
827
+ var l = reflections.length;
828
+
829
+ for (var i = 0; i < l; ++i)
830
+ if (reflections[i]._R === THIS) {
831
+ visage = reflections[i];
832
+ break;
833
+ }
834
+
835
+ /** Couldn't find an element's reflection inside the mirror. Materialise one. */
836
+ visage || (visage = mirror.appendChild(document.createElement("div")));
837
+
838
+ tokenList = DOMTokenList.call(visage, THIS, attr);
839
+ } else tokenList = new DOMTokenList(THIS, attr);
840
+
841
+ defineGetter(THIS, name, function () {
842
+ return tokenList;
843
+ });
844
+ delete THIS[gibberishProperty];
845
+
846
+ return tokenList;
847
+ }, true);
848
+ };
849
+
850
+ addProp(global.Element, "classList", "className");
851
+ addProp(global.HTMLElement, "classList", "className");
852
+ addProp(global.HTMLLinkElement, "relList", "rel");
853
+ addProp(global.HTMLAnchorElement, "relList", "rel");
854
+ addProp(global.HTMLAreaElement, "relList", "rel");
855
+ }(this));
856
+
857
+ }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
858
+
859
+ (function(undefined) {
860
+ // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Function/prototype/bind/detect.js
861
+ var detect = 'bind' in Function.prototype;
862
+
863
+ if (detect) return
864
+
865
+ // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Function.prototype.bind&flags=always
866
+ Object.defineProperty(Function.prototype, 'bind', {
867
+ value: function bind(that) { // .length is 1
868
+ // add necessary es5-shim utilities
869
+ var $Array = Array;
870
+ var $Object = Object;
871
+ var ObjectPrototype = $Object.prototype;
872
+ var ArrayPrototype = $Array.prototype;
873
+ var Empty = function Empty() {};
874
+ var to_string = ObjectPrototype.toString;
875
+ var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
876
+ var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, tryFunctionObject = function tryFunctionObject(value) { try { fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]'; isCallable = function isCallable(value) { if (typeof value !== 'function') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; };
877
+ var array_slice = ArrayPrototype.slice;
878
+ var array_concat = ArrayPrototype.concat;
879
+ var array_push = ArrayPrototype.push;
880
+ var max = Math.max;
881
+ // /add necessary es5-shim utilities
882
+
883
+ // 1. Let Target be the this value.
884
+ var target = this;
885
+ // 2. If IsCallable(Target) is false, throw a TypeError exception.
886
+ if (!isCallable(target)) {
887
+ throw new TypeError('Function.prototype.bind called on incompatible ' + target);
888
+ }
889
+ // 3. Let A be a new (possibly empty) internal list of all of the
890
+ // argument values provided after thisArg (arg1, arg2 etc), in order.
891
+ // XXX slicedArgs will stand in for "A" if used
892
+ var args = array_slice.call(arguments, 1); // for normal call
893
+ // 4. Let F be a new native ECMAScript object.
894
+ // 11. Set the [[Prototype]] internal property of F to the standard
895
+ // built-in Function prototype object as specified in 15.3.3.1.
896
+ // 12. Set the [[Call]] internal property of F as described in
897
+ // 15.3.4.5.1.
898
+ // 13. Set the [[Construct]] internal property of F as described in
899
+ // 15.3.4.5.2.
900
+ // 14. Set the [[HasInstance]] internal property of F as described in
901
+ // 15.3.4.5.3.
902
+ var bound;
903
+ var binder = function () {
904
+
905
+ if (this instanceof bound) {
906
+ // 15.3.4.5.2 [[Construct]]
907
+ // When the [[Construct]] internal method of a function object,
908
+ // F that was created using the bind function is called with a
909
+ // list of arguments ExtraArgs, the following steps are taken:
910
+ // 1. Let target be the value of F's [[TargetFunction]]
911
+ // internal property.
912
+ // 2. If target has no [[Construct]] internal method, a
913
+ // TypeError exception is thrown.
914
+ // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
915
+ // property.
916
+ // 4. Let args be a new list containing the same values as the
917
+ // list boundArgs in the same order followed by the same
918
+ // values as the list ExtraArgs in the same order.
919
+ // 5. Return the result of calling the [[Construct]] internal
920
+ // method of target providing args as the arguments.
921
+
922
+ var result = target.apply(
923
+ this,
924
+ array_concat.call(args, array_slice.call(arguments))
925
+ );
926
+ if ($Object(result) === result) {
927
+ return result;
928
+ }
929
+ return this;
930
+
931
+ } else {
932
+ // 15.3.4.5.1 [[Call]]
933
+ // When the [[Call]] internal method of a function object, F,
934
+ // which was created using the bind function is called with a
935
+ // this value and a list of arguments ExtraArgs, the following
936
+ // steps are taken:
937
+ // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
938
+ // property.
939
+ // 2. Let boundThis be the value of F's [[BoundThis]] internal
940
+ // property.
941
+ // 3. Let target be the value of F's [[TargetFunction]] internal
942
+ // property.
943
+ // 4. Let args be a new list containing the same values as the
944
+ // list boundArgs in the same order followed by the same
945
+ // values as the list ExtraArgs in the same order.
946
+ // 5. Return the result of calling the [[Call]] internal method
947
+ // of target providing boundThis as the this value and
948
+ // providing args as the arguments.
949
+
950
+ // equiv: target.call(this, ...boundArgs, ...args)
951
+ return target.apply(
952
+ that,
953
+ array_concat.call(args, array_slice.call(arguments))
954
+ );
955
+
956
+ }
957
+
958
+ };
959
+
960
+ // 15. If the [[Class]] internal property of Target is "Function", then
961
+ // a. Let L be the length property of Target minus the length of A.
962
+ // b. Set the length own property of F to either 0 or L, whichever is
963
+ // larger.
964
+ // 16. Else set the length own property of F to 0.
965
+
966
+ var boundLength = max(0, target.length - args.length);
967
+
968
+ // 17. Set the attributes of the length own property of F to the values
969
+ // specified in 15.3.5.1.
970
+ var boundArgs = [];
971
+ for (var i = 0; i < boundLength; i++) {
972
+ array_push.call(boundArgs, '$' + i);
973
+ }
974
+
975
+ // XXX Build a dynamic function with desired amount of arguments is the only
976
+ // way to set the length property of a function.
977
+ // In environments where Content Security Policies enabled (Chrome extensions,
978
+ // for ex.) all use of eval or Function costructor throws an exception.
979
+ // However in all of these environments Function.prototype.bind exists
980
+ // and so this code will never be executed.
981
+ bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);
982
+
983
+ if (target.prototype) {
984
+ Empty.prototype = target.prototype;
985
+ bound.prototype = new Empty();
986
+ // Clean up dangling references.
987
+ Empty.prototype = null;
988
+ }
989
+
990
+ // TODO
991
+ // 18. Set the [[Extensible]] internal property of F to true.
992
+
993
+ // TODO
994
+ // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
995
+ // 20. Call the [[DefineOwnProperty]] internal method of F with
996
+ // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
997
+ // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
998
+ // false.
999
+ // 21. Call the [[DefineOwnProperty]] internal method of F with
1000
+ // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
1001
+ // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
1002
+ // and false.
1003
+
1004
+ // TODO
1005
+ // NOTE Function objects created using Function.prototype.bind do not
1006
+ // have a prototype property or the [[Code]], [[FormalParameters]], and
1007
+ // [[Scope]] internal properties.
1008
+ // XXX can't delete prototype in pure-js.
1009
+
1010
+ // 22. Return F.
1011
+ return bound;
1012
+ }
1013
+ });
1014
+ })
1015
+ .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
1016
+
662
1017
  function Header ($module) {
663
1018
  this.$module = $module;
1019
+ this.$menuButton = $module && $module.querySelector('.govuk-js-header-toggle');
1020
+ this.$menu = this.$menuButton && $module.querySelector(
1021
+ '#' + this.$menuButton.getAttribute('aria-controls')
1022
+ );
664
1023
  }
665
1024
 
1025
+ /**
1026
+ * Initialise header
1027
+ *
1028
+ * Check for the presence of the header, menu and menu button – if any are
1029
+ * missing then there's nothing to do so return early.
1030
+ */
666
1031
  Header.prototype.init = function () {
667
- // Check for module
668
- var $module = this.$module;
669
- if (!$module) {
670
- return
671
- }
672
-
673
- // Check for button
674
- var $toggleButton = $module.querySelector('.govuk-js-header-toggle');
675
- if (!$toggleButton) {
1032
+ if (!this.$module || !this.$menuButton || !this.$menu) {
676
1033
  return
677
1034
  }
678
1035
 
679
- // Handle $toggleButton click events
680
- $toggleButton.addEventListener('click', this.handleClick.bind(this));
1036
+ this.syncState(this.$menu.classList.contains('govuk-header__navigation--open'));
1037
+ this.$menuButton.addEventListener('click', this.handleMenuButtonClick.bind(this));
681
1038
  };
682
1039
 
683
1040
  /**
684
- * Toggle class
685
- * @param {object} node element
686
- * @param {string} className to toggle
687
- */
688
- Header.prototype.toggleClass = function (node, className) {
689
- if (node.className.indexOf(className) > 0) {
690
- node.className = node.className.replace(' ' + className, '');
691
- } else {
692
- node.className += ' ' + className;
693
- }
1041
+ * Sync menu state
1042
+ *
1043
+ * Sync the menu button class and the accessible state of the menu and the menu
1044
+ * button with the visible state of the menu
1045
+ *
1046
+ * @param {boolean} isVisible Whether the menu is currently visible
1047
+ */
1048
+ Header.prototype.syncState = function (isVisible) {
1049
+ this.$menuButton.classList.toggle('govuk-header__menu-button--open', isVisible);
1050
+ this.$menuButton.setAttribute('aria-expanded', isVisible);
694
1051
  };
695
1052
 
696
1053
  /**
697
- * An event handler for click event on $toggleButton
698
- * @param {object} event event
699
- */
700
- Header.prototype.handleClick = function (event) {
701
- var $module = this.$module;
702
- var $toggleButton = event.target || event.srcElement;
703
- var $target = $module.querySelector('#' + $toggleButton.getAttribute('aria-controls'));
704
-
705
- // If a button with aria-controls, handle click
706
- if ($toggleButton && $target) {
707
- this.toggleClass($target, 'govuk-header__navigation--open');
708
- this.toggleClass($toggleButton, 'govuk-header__menu-button--open');
709
-
710
- $toggleButton.setAttribute('aria-expanded', $toggleButton.getAttribute('aria-expanded') !== 'true');
711
- $target.setAttribute('aria-hidden', $target.getAttribute('aria-hidden') === 'false');
712
- }
1054
+ * Handle menu button click
1055
+ *
1056
+ * When the menu button is clicked, change the visibility of the menu and then
1057
+ * sync the accessibility state and menu button state
1058
+ */
1059
+ Header.prototype.handleMenuButtonClick = function () {
1060
+ var isVisible = this.$menu.classList.toggle('govuk-header__navigation--open');
1061
+ this.syncState(isVisible);
713
1062
  };
714
1063
 
715
1064
  return Header;