govuk_publishing_components 35.3.2 → 35.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (271) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +11 -5
  3. data/app/assets/stylesheets/component_guide/application.scss +37 -1
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +8 -59
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +10 -6
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +2 -2
  7. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss +24 -0
  8. data/app/views/govuk_publishing_components/component_guide/example.html.erb +1 -1
  9. data/app/views/govuk_publishing_components/component_guide/preview.html.erb +1 -1
  10. data/app/views/govuk_publishing_components/component_guide/show.html.erb +1 -1
  11. data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +49 -57
  12. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +3 -3
  13. data/app/views/govuk_publishing_components/components/_metadata.html.erb +1 -1
  14. data/app/views/govuk_publishing_components/components/_share_links.html.erb +6 -2
  15. data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +1 -1
  16. data/app/views/govuk_publishing_components/components/docs/metadata.yml +1 -3
  17. data/app/views/govuk_publishing_components/components/docs/organisation_logo.yml +5 -5
  18. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_related.yml +1 -0
  19. data/app/views/layouts/govuk_publishing_components/application.html.erb +1 -0
  20. data/config/locales/cy.yml +1 -1
  21. data/lib/govuk_publishing_components/app_helpers/asset_helper.rb +4 -0
  22. data/lib/govuk_publishing_components/presenters/breadcrumbs_helper.rb +1 -1
  23. data/lib/govuk_publishing_components/version.rb +1 -1
  24. data/node_modules/axe-core/axe.d.ts +77 -6
  25. data/node_modules/axe-core/axe.js +955 -600
  26. data/node_modules/axe-core/axe.min.js +2 -2
  27. data/node_modules/axe-core/locales/_template.json +6 -6
  28. data/node_modules/axe-core/locales/ja.json +91 -11
  29. data/node_modules/axe-core/package.json +5 -5
  30. data/node_modules/axe-core/sri-history.json +4 -0
  31. data/node_modules/govuk-frontend/README.md +4 -5
  32. data/node_modules/govuk-frontend/govuk/all-ie8.scss +8 -0
  33. data/node_modules/govuk-frontend/govuk/all.js +738 -258
  34. data/node_modules/govuk-frontend/govuk/all.js.map +1 -1
  35. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +11 -7
  36. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js.map +1 -1
  37. data/node_modules/govuk-frontend/govuk/common/govuk-frontend-version.js +17 -0
  38. data/node_modules/govuk-frontend/govuk/common/govuk-frontend-version.js.map +1 -0
  39. data/node_modules/govuk-frontend/govuk/common/index.js +16 -4
  40. data/node_modules/govuk-frontend/govuk/common/index.js.map +1 -1
  41. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +20 -10
  42. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js.map +1 -1
  43. data/node_modules/govuk-frontend/govuk/common.js +16 -4
  44. data/node_modules/govuk-frontend/govuk/common.js.map +1 -1
  45. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +3 -3
  46. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +234 -86
  47. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js.map +1 -1
  48. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +32 -13
  49. data/node_modules/govuk-frontend/govuk/components/accordion/macro-options.json +8 -2
  50. data/node_modules/govuk-frontend/govuk/components/accordion/template.njk +1 -0
  51. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +1 -1
  52. data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +1 -1
  53. data/node_modules/govuk-frontend/govuk/components/back-link/macro-options.json +1 -1
  54. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +1 -1
  55. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +12 -12
  56. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro-options.json +1 -1
  57. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +8 -6
  58. data/node_modules/govuk-frontend/govuk/components/button/button.js +54 -19
  59. data/node_modules/govuk-frontend/govuk/components/button/button.js.map +1 -1
  60. data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +11 -1
  61. data/node_modules/govuk-frontend/govuk/components/button/macro-options.json +7 -1
  62. data/node_modules/govuk-frontend/govuk/components/button/template.njk +1 -1
  63. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +170 -76
  64. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js.map +1 -1
  65. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +24 -24
  66. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +3 -3
  67. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +6 -6
  68. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +75 -24
  69. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js.map +1 -1
  70. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +47 -47
  71. data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +1 -1
  72. data/node_modules/govuk-frontend/govuk/components/checkboxes/template.njk +3 -3
  73. data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +24 -24
  74. data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro-options.json +1 -1
  75. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +26 -26
  76. data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +1 -1
  77. data/node_modules/govuk-frontend/govuk/components/date-input/template.njk +1 -1
  78. data/node_modules/govuk-frontend/govuk/components/details/details.js +39 -13
  79. data/node_modules/govuk-frontend/govuk/components/details/details.js.map +1 -1
  80. data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +1 -1
  81. data/node_modules/govuk-frontend/govuk/components/details/macro-options.json +1 -1
  82. data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +10 -10
  83. data/node_modules/govuk-frontend/govuk/components/error-message/macro-options.json +1 -1
  84. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +67 -27
  85. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js.map +1 -1
  86. data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +19 -19
  87. data/node_modules/govuk-frontend/govuk/components/error-summary/macro-options.json +1 -1
  88. data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +19 -19
  89. data/node_modules/govuk-frontend/govuk/components/fieldset/macro-options.json +1 -1
  90. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +6 -1
  91. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +14 -14
  92. data/node_modules/govuk-frontend/govuk/components/file-upload/macro-options.json +7 -1
  93. data/node_modules/govuk-frontend/govuk/components/file-upload/template.njk +2 -1
  94. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +0 -7
  95. data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +24 -24
  96. data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +1 -1
  97. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +22 -22
  98. data/node_modules/govuk-frontend/govuk/components/header/header.js +46 -14
  99. data/node_modules/govuk-frontend/govuk/components/header/header.js.map +1 -1
  100. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +1 -1
  101. data/node_modules/govuk-frontend/govuk/components/header/template.njk +1 -1
  102. data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +1 -1
  103. data/node_modules/govuk-frontend/govuk/components/hint/macro-options.json +1 -1
  104. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +15 -3
  105. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +54 -41
  106. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +7 -1
  107. data/node_modules/govuk-frontend/govuk/components/input/template.njk +2 -1
  108. data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +1 -1
  109. data/node_modules/govuk-frontend/govuk/components/inset-text/macro-options.json +1 -1
  110. data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +6 -6
  111. data/node_modules/govuk-frontend/govuk/components/label/macro-options.json +1 -1
  112. data/node_modules/govuk-frontend/govuk/components/notification-banner/fixtures.json +1 -1
  113. data/node_modules/govuk-frontend/govuk/components/notification-banner/macro-options.json +1 -1
  114. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +49 -22
  115. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js.map +1 -1
  116. data/node_modules/govuk-frontend/govuk/components/pagination/fixtures.json +16 -16
  117. data/node_modules/govuk-frontend/govuk/components/pagination/macro-options.json +1 -1
  118. data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +10 -10
  119. data/node_modules/govuk-frontend/govuk/components/panel/macro-options.json +1 -1
  120. data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +1 -1
  121. data/node_modules/govuk-frontend/govuk/components/phase-banner/macro-options.json +1 -1
  122. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +5 -5
  123. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +46 -46
  124. data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +1 -1
  125. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +65 -22
  126. data/node_modules/govuk-frontend/govuk/components/radios/radios.js.map +1 -1
  127. data/node_modules/govuk-frontend/govuk/components/radios/template.njk +2 -2
  128. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +7 -1
  129. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +19 -20
  130. data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +7 -1
  131. data/node_modules/govuk-frontend/govuk/components/select/template.njk +5 -2
  132. data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +1 -1
  133. data/node_modules/govuk-frontend/govuk/components/skip-link/macro-options.json +1 -1
  134. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +41 -13
  135. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js.map +1 -1
  136. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +34 -34
  137. data/node_modules/govuk-frontend/govuk/components/summary-list/macro-options.json +1 -1
  138. data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +21 -21
  139. data/node_modules/govuk-frontend/govuk/components/table/macro-options.json +1 -1
  140. data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +15 -15
  141. data/node_modules/govuk-frontend/govuk/components/tabs/macro-options.json +1 -1
  142. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +178 -60
  143. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js.map +1 -1
  144. data/node_modules/govuk-frontend/govuk/components/tabs/template.njk +1 -1
  145. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +18 -18
  146. data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +1 -1
  147. data/node_modules/govuk-frontend/govuk/components/tag/macro-options.json +1 -1
  148. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +8 -1
  149. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +18 -18
  150. data/node_modules/govuk-frontend/govuk/components/textarea/macro-options.json +7 -1
  151. data/node_modules/govuk-frontend/govuk/components/textarea/template.njk +2 -1
  152. data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +9 -5
  153. data/node_modules/govuk-frontend/govuk/components/warning-text/macro-options.json +3 -3
  154. data/node_modules/govuk-frontend/govuk/components/warning-text/template.njk +1 -1
  155. data/node_modules/govuk-frontend/govuk/core/_all.scss +1 -0
  156. data/node_modules/govuk-frontend/govuk/core/_govuk-frontend-version.scss +5 -0
  157. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +5 -2
  158. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +1 -1
  159. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +1 -1
  160. data/node_modules/govuk-frontend/govuk/i18n.js +38 -30
  161. data/node_modules/govuk-frontend/govuk/i18n.js.map +1 -1
  162. data/node_modules/govuk-frontend/govuk/macros/i18n.njk +12 -11
  163. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +1 -1
  164. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +4 -0
  165. data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +16 -0
  166. data/node_modules/govuk-frontend/govuk/settings/_links.scss +5 -1
  167. data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +38 -2
  168. data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js +2 -1
  169. data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js.map +1 -1
  170. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +2 -1
  171. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js.map +1 -1
  172. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js +2 -1
  173. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js.map +1 -1
  174. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js +10 -3
  175. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js.map +1 -1
  176. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +4 -1
  177. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js.map +1 -1
  178. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +13 -7
  179. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js.map +1 -1
  180. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js +2 -1
  181. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js.map +1 -1
  182. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +8 -2
  183. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js.map +1 -1
  184. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +8 -2
  185. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js.map +1 -1
  186. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js +4 -1
  187. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js.map +1 -1
  188. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js +10 -3
  189. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js.map +1 -1
  190. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js +4 -1
  191. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js.map +1 -1
  192. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js +2 -1
  193. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js.map +1 -1
  194. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +3 -2
  195. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js.map +1 -1
  196. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js +2 -1
  197. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js.map +1 -1
  198. data/node_modules/govuk-frontend/govuk-esm/all.mjs +81 -60
  199. data/node_modules/govuk-frontend/govuk-esm/all.mjs.map +1 -0
  200. data/node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs +12 -8
  201. data/node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map +1 -0
  202. data/node_modules/govuk-frontend/govuk-esm/common/govuk-frontend-version.mjs +9 -0
  203. data/node_modules/govuk-frontend/govuk-esm/common/govuk-frontend-version.mjs.map +1 -0
  204. data/node_modules/govuk-frontend/govuk-esm/common/index.mjs +44 -29
  205. data/node_modules/govuk-frontend/govuk-esm/common/index.mjs.map +1 -0
  206. data/node_modules/govuk-frontend/govuk-esm/common/normalise-dataset.mjs +15 -9
  207. data/node_modules/govuk-frontend/govuk-esm/common/normalise-dataset.mjs.map +1 -0
  208. data/node_modules/govuk-frontend/govuk-esm/common.mjs +3 -5
  209. data/node_modules/govuk-frontend/govuk-esm/common.mjs.map +1 -0
  210. data/node_modules/govuk-frontend/govuk-esm/components/accordion/accordion.mjs +319 -211
  211. data/node_modules/govuk-frontend/govuk-esm/components/accordion/accordion.mjs.map +1 -0
  212. data/node_modules/govuk-frontend/govuk-esm/components/button/button.mjs +47 -30
  213. data/node_modules/govuk-frontend/govuk-esm/components/button/button.mjs.map +1 -0
  214. data/node_modules/govuk-frontend/govuk-esm/components/character-count/character-count.mjs +169 -115
  215. data/node_modules/govuk-frontend/govuk-esm/components/character-count/character-count.mjs.map +1 -0
  216. data/node_modules/govuk-frontend/govuk-esm/components/checkboxes/checkboxes.mjs +88 -51
  217. data/node_modules/govuk-frontend/govuk-esm/components/checkboxes/checkboxes.mjs.map +1 -0
  218. data/node_modules/govuk-frontend/govuk-esm/components/details/details.mjs +64 -54
  219. data/node_modules/govuk-frontend/govuk-esm/components/details/details.mjs.map +1 -0
  220. data/node_modules/govuk-frontend/govuk-esm/components/error-summary/error-summary.mjs +69 -50
  221. data/node_modules/govuk-frontend/govuk-esm/components/error-summary/error-summary.mjs.map +1 -0
  222. data/node_modules/govuk-frontend/govuk-esm/components/header/header.mjs +59 -35
  223. data/node_modules/govuk-frontend/govuk-esm/components/header/header.mjs.map +1 -0
  224. data/node_modules/govuk-frontend/govuk-esm/components/notification-banner/notification-banner.mjs +36 -25
  225. data/node_modules/govuk-frontend/govuk-esm/components/notification-banner/notification-banner.mjs.map +1 -0
  226. data/node_modules/govuk-frontend/govuk-esm/components/radios/radios.mjs +67 -38
  227. data/node_modules/govuk-frontend/govuk-esm/components/radios/radios.mjs.map +1 -0
  228. data/node_modules/govuk-frontend/govuk-esm/components/skip-link/skip-link.mjs +49 -32
  229. data/node_modules/govuk-frontend/govuk-esm/components/skip-link/skip-link.mjs.map +1 -0
  230. data/node_modules/govuk-frontend/govuk-esm/components/tabs/tabs.mjs +263 -163
  231. data/node_modules/govuk-frontend/govuk-esm/components/tabs/tabs.mjs.map +1 -0
  232. data/node_modules/govuk-frontend/govuk-esm/i18n.mjs +68 -57
  233. data/node_modules/govuk-frontend/govuk-esm/i18n.mjs.map +1 -0
  234. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/DOMTokenList.mjs +5 -3
  235. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/DOMTokenList.mjs.map +1 -0
  236. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Date/now.mjs +4 -2
  237. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Date/now.mjs.map +1 -0
  238. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs +4 -2
  239. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs.map +1 -0
  240. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/classList.mjs +7 -4
  241. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/classList.mjs.map +1 -0
  242. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs +5 -2
  243. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs.map +1 -0
  244. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/dataset.mjs +13 -10
  245. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/dataset.mjs.map +1 -0
  246. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/matches.mjs +4 -2
  247. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/matches.mjs.map +1 -0
  248. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/nextElementSibling.mjs +6 -3
  249. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/nextElementSibling.mjs.map +1 -0
  250. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/previousElementSibling.mjs +6 -3
  251. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/previousElementSibling.mjs.map +1 -0
  252. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element.mjs +5 -2
  253. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element.mjs.map +1 -0
  254. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Event.mjs +7 -4
  255. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Event.mjs.map +1 -0
  256. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Function/prototype/bind.mjs +5 -2
  257. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Function/prototype/bind.mjs.map +1 -0
  258. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Object/defineProperty.mjs +4 -2
  259. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Object/defineProperty.mjs.map +1 -0
  260. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/String/prototype/trim.mjs +5 -3
  261. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/String/prototype/trim.mjs.map +1 -0
  262. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Window.mjs +4 -2
  263. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Window.mjs.map +1 -0
  264. data/node_modules/govuk-frontend/govuk-prototype-kit/init.js +1 -0
  265. data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +2 -1
  266. data/node_modules/govuk-frontend/package.json +3 -2
  267. metadata +43 -6
  268. /data/app/assets/images/govuk_publishing_components/crests/{dit_crest_13px.png → dbt_crest_13px.png} +0 -0
  269. /data/app/assets/images/govuk_publishing_components/crests/{dit_crest_13px_x2.png → dbt_crest_13px_x2.png} +0 -0
  270. /data/app/assets/images/govuk_publishing_components/crests/{dit_crest_18px.png → dbt_crest_18px.png} +0 -0
  271. /data/app/assets/images/govuk_publishing_components/crests/{dit_crest_18px_x2.png → dbt_crest_18px_x2.png} +0 -0
@@ -21,6 +21,7 @@
21
21
  * (e.g. {'i18n.showSection': 'Show section'}) and combines them together, with
22
22
  * greatest priority on the LAST item passed in.
23
23
  *
24
+ * @deprecated Will be made private in v5.0
24
25
  * @returns {Object<string, unknown>} A flattened object of key-value pairs.
25
26
  */
26
27
  function mergeConfigs (/* configObject1, configObject2, ...configObjects */) {
@@ -35,6 +36,7 @@
35
36
  */
36
37
  var flattenObject = function (configObject) {
37
38
  // Prepare an empty return object
39
+ /** @type {Object<string, unknown>} */
38
40
  var flattenedObject = {};
39
41
 
40
42
  /**
@@ -71,6 +73,7 @@
71
73
  };
72
74
 
73
75
  // Start with an empty object as our base
76
+ /** @type {Object<string, unknown>} */
74
77
  var formattedConfigObject = {};
75
78
 
76
79
  // Loop through each of the remaining passed objects and push their keys
@@ -89,14 +92,16 @@
89
92
  }
90
93
 
91
94
  /**
95
+ * @template {Node} ElementType
92
96
  * @callback nodeListIterator
93
- * @param {Element} value - The current node being iterated on
97
+ * @param {ElementType} value - The current node being iterated on
94
98
  * @param {number} index - The current index in the iteration
95
- * @param {NodeListOf<Element>} nodes - NodeList from querySelectorAll()
99
+ * @param {NodeListOf<ElementType>} nodes - NodeList from querySelectorAll()
96
100
  * @returns {void}
97
101
  */
98
102
 
99
- (function(undefined) {
103
+ // @ts-nocheck
104
+ (function (undefined) {
100
105
 
101
106
  // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Object/defineProperty/detect.js
102
107
  var detect = (
@@ -183,7 +188,8 @@
183
188
  })
184
189
  .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
185
190
 
186
- (function(undefined) {
191
+ // @ts-nocheck
192
+ (function (undefined) {
187
193
 
188
194
  // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Document/detect.js
189
195
  var detect = ("Document" in this);
@@ -210,6 +216,8 @@
210
216
  })
211
217
  .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
212
218
 
219
+ // @ts-nocheck
220
+
213
221
  (function(undefined) {
214
222
 
215
223
  // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Element/detect.js
@@ -323,6 +331,8 @@
323
331
  })
324
332
  .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
325
333
 
334
+ // @ts-nocheck
335
+
326
336
  (function(undefined) {
327
337
 
328
338
  // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-library/13cf7c340974d128d557580b5e2dafcd1b1192d1/polyfills/Element/prototype/dataset/detect.js
@@ -343,10 +353,10 @@
343
353
  var element = this;
344
354
  var attributes = this.attributes;
345
355
  var map = {};
346
-
356
+
347
357
  for (var i = 0; i < attributes.length; i++) {
348
358
  var attribute = attributes[i];
349
-
359
+
350
360
  // This regex has been edited from the original polyfill, to add
351
361
  // support for period (.) separators in data-* attribute names. These
352
362
  // are allowed in the HTML spec, but were not covered by the original
@@ -354,11 +364,11 @@
354
364
  if (attribute && attribute.name && (/^data-\w[.\w-]*$/).test(attribute.name)) {
355
365
  var name = attribute.name;
356
366
  var value = attribute.value;
357
-
367
+
358
368
  var propName = name.substr(5).replace(/-./g, function (prop) {
359
369
  return prop.charAt(1).toUpperCase();
360
370
  });
361
-
371
+
362
372
  // If this browser supports __defineGetter__ and __defineSetter__,
363
373
  // continue using defineProperty. If not (like IE 8 and below), we use
364
374
  // a hacky fallback which at least gives an object in the right format
@@ -382,18 +392,19 @@
382
392
 
383
393
  }
384
394
  }
385
-
395
+
386
396
  return map;
387
397
  }
388
398
  });
389
399
 
390
400
  }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
391
401
 
392
- (function(undefined) {
402
+ // @ts-nocheck
403
+ (function (undefined) {
393
404
 
394
405
  // Detection from https://github.com/mdn/content/blob/cf607d68522cd35ee7670782d3ee3a361eaef2e4/files/en-us/web/javascript/reference/global_objects/string/trim/index.md#polyfill
395
406
  var detect = ('trim' in String.prototype);
396
-
407
+
397
408
  if (detect) return
398
409
 
399
410
  // Polyfill from https://github.com/mdn/content/blob/cf607d68522cd35ee7670782d3ee3a361eaef2e4/files/en-us/web/javascript/reference/global_objects/string/trim/index.md#polyfill
@@ -416,6 +427,7 @@
416
427
  * Designed to be used to convert config passed via data attributes (which are
417
428
  * always strings) into something sensible.
418
429
  *
430
+ * @deprecated Will be made private in v5.0
419
431
  * @param {string} value - The value to normalise
420
432
  * @returns {string | boolean | number | undefined} Normalised data
421
433
  */
@@ -436,7 +448,7 @@
436
448
 
437
449
  // Empty / whitespace-only strings are considered finite so we need to check
438
450
  // the length of the trimmed string as well
439
- if (trimmedValue.length > 0 && isFinite(trimmedValue)) {
451
+ if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {
440
452
  return Number(trimmedValue)
441
453
  }
442
454
 
@@ -448,10 +460,12 @@
448
460
  *
449
461
  * Loop over an object and normalise each value using normaliseData function
450
462
  *
463
+ * @deprecated Will be made private in v5.0
451
464
  * @param {DOMStringMap} dataset - HTML element dataset
452
465
  * @returns {Object<string, unknown>} Normalised dataset
453
466
  */
454
467
  function normaliseDataset (dataset) {
468
+ /** @type {Object<string, unknown>} */
455
469
  var out = {};
456
470
 
457
471
  for (var key in dataset) {
@@ -461,7 +475,8 @@
461
475
  return out
462
476
  }
463
477
 
464
- (function(undefined) {
478
+ // @ts-nocheck
479
+ (function (undefined) {
465
480
 
466
481
  // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/matches/detect.js
467
482
  var detect = (
@@ -485,6 +500,8 @@
485
500
 
486
501
  }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
487
502
 
503
+ // @ts-nocheck
504
+
488
505
  (function(undefined) {
489
506
 
490
507
  // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/closest/detect.js
@@ -508,7 +525,8 @@
508
525
 
509
526
  }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
510
527
 
511
- (function(undefined) {
528
+ // @ts-nocheck
529
+ (function (undefined) {
512
530
 
513
531
  // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Window/detect.js
514
532
  var detect = ('Window' in this);
@@ -529,6 +547,8 @@
529
547
  })
530
548
  .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
531
549
 
550
+ // @ts-nocheck
551
+
532
552
  (function(undefined) {
533
553
 
534
554
  // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Event/detect.js
@@ -778,6 +798,8 @@
778
798
  })
779
799
  .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
780
800
 
801
+ // @ts-nocheck
802
+
781
803
  (function(undefined) {
782
804
  // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Function/prototype/bind/detect.js
783
805
  var detect = 'bind' in Function.prototype;
@@ -944,7 +966,7 @@
944
966
  * Takes focus on initialisation for accessible announcement, unless disabled in configuration.
945
967
  *
946
968
  * @class
947
- * @param {HTMLElement} $module - HTML element to use for error summary
969
+ * @param {Element} $module - HTML element to use for error summary
948
970
  * @param {ErrorSummaryConfig} [config] - Error summary config
949
971
  */
950
972
  function ErrorSummary ($module, config) {
@@ -955,17 +977,23 @@
955
977
  // To avoid breaking further JavaScript initialisation
956
978
  // we need to safeguard against this so things keep
957
979
  // working the same now we read the elements data attributes
958
- if (!$module) {
980
+ if (!($module instanceof HTMLElement)) {
959
981
  // Little safety in case code gets ported as-is
960
982
  // into and ES6 class constructor, where the return value matters
961
983
  return this
962
984
  }
963
985
 
986
+ /** @deprecated Will be made private in v5.0 */
964
987
  this.$module = $module;
965
988
 
966
989
  var defaultConfig = {
967
990
  disableAutoFocus: false
968
991
  };
992
+
993
+ /**
994
+ * @deprecated Will be made private in v5.0
995
+ * @type {ErrorSummaryConfig}
996
+ */
969
997
  this.config = mergeConfigs(
970
998
  defaultConfig,
971
999
  config || {},
@@ -977,17 +1005,21 @@
977
1005
  * Initialise component
978
1006
  */
979
1007
  ErrorSummary.prototype.init = function () {
980
- var $module = this.$module;
981
- if (!$module) {
1008
+ // Check that required elements are present
1009
+ if (!this.$module) {
982
1010
  return
983
1011
  }
984
1012
 
1013
+ var $module = this.$module;
1014
+
985
1015
  this.setFocus();
986
1016
  $module.addEventListener('click', this.handleClick.bind(this));
987
1017
  };
988
1018
 
989
1019
  /**
990
1020
  * Focus the error summary
1021
+ *
1022
+ * @deprecated Will be made private in v5.0
991
1023
  */
992
1024
  ErrorSummary.prototype.setFocus = function () {
993
1025
  var $module = this.$module;
@@ -1010,6 +1042,7 @@
1010
1042
  /**
1011
1043
  * Click event handler
1012
1044
  *
1045
+ * @deprecated Will be made private in v5.0
1013
1046
  * @param {MouseEvent} event - Click event
1014
1047
  */
1015
1048
  ErrorSummary.prototype.handleClick = function (event) {
@@ -1034,16 +1067,21 @@
1034
1067
  * NVDA (as tested in 2018.3.2) - without this only the field type is announced
1035
1068
  * (e.g. "Edit, has autocomplete").
1036
1069
  *
1070
+ * @deprecated Will be made private in v5.0
1037
1071
  * @param {EventTarget} $target - Event target
1038
1072
  * @returns {boolean} True if the target was able to be focussed
1039
1073
  */
1040
1074
  ErrorSummary.prototype.focusTarget = function ($target) {
1041
1075
  // If the element that was clicked was not a link, return early
1042
- if ($target.tagName !== 'A' || $target.href === false) {
1076
+ if (!($target instanceof HTMLAnchorElement)) {
1043
1077
  return false
1044
1078
  }
1045
1079
 
1046
1080
  var inputId = this.getFragmentFromUrl($target.href);
1081
+ if (!inputId) {
1082
+ return false
1083
+ }
1084
+
1047
1085
  var $input = document.getElementById(inputId);
1048
1086
  if (!$input) {
1049
1087
  return false
@@ -1069,12 +1107,13 @@
1069
1107
  * Extract the fragment (everything after the hash) from a URL, but not including
1070
1108
  * the hash.
1071
1109
  *
1110
+ * @deprecated Will be made private in v5.0
1072
1111
  * @param {string} url - URL
1073
- * @returns {string} Fragment from URL, without the hash
1112
+ * @returns {string | undefined} Fragment from URL, without the hash
1074
1113
  */
1075
1114
  ErrorSummary.prototype.getFragmentFromUrl = function (url) {
1076
1115
  if (url.indexOf('#') === -1) {
1077
- return false
1116
+ return undefined
1078
1117
  }
1079
1118
 
1080
1119
  return url.split('#').pop()
@@ -1091,9 +1130,10 @@
1091
1130
  * - The first `<label>` that is associated with the input using for="inputId"
1092
1131
  * - The closest parent `<label>`
1093
1132
  *
1094
- * @param {HTMLElement} $input - The input
1095
- * @returns {HTMLElement} Associated legend or label, or null if no associated
1096
- * legend or label can be found
1133
+ * @deprecated Will be made private in v5.0
1134
+ * @param {Element} $input - The input
1135
+ * @returns {Element | null} Associated legend or label, or null if no associated
1136
+ * legend or label can be found
1097
1137
  */
1098
1138
  ErrorSummary.prototype.getAssociatedLegendOrLabel = function ($input) {
1099
1139
  var $fieldset = $input.closest('fieldset');
@@ -1106,7 +1146,7 @@
1106
1146
 
1107
1147
  // If the input type is radio or checkbox, always use the legend if there
1108
1148
  // is one.
1109
- if ($input.type === 'checkbox' || $input.type === 'radio') {
1149
+ if ($input instanceof HTMLInputElement && ($input.type === 'checkbox' || $input.type === 'radio')) {
1110
1150
  return $candidateLegend
1111
1151
  }
1112
1152
 
@@ -1139,8 +1179,8 @@
1139
1179
  * Error summary config
1140
1180
  *
1141
1181
  * @typedef {object} ErrorSummaryConfig
1142
- * @property {boolean} [disableAutoFocus = false] -
1143
- * If set to `true` the error summary will not be focussed when the page loads.
1182
+ * @property {boolean} [disableAutoFocus = false] - If set to `true` the error
1183
+ * summary will not be focussed when the page loads.
1144
1184
  */
1145
1185
 
1146
1186
  return ErrorSummary;