govuk_publishing_components 35.3.3 → 35.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (272) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +4 -0
  3. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/init-ga4.js +1 -1
  4. data/app/assets/stylesheets/component_guide/application.scss +37 -1
  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 +0 -24
  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/_layout_super_navigation_header.html.erb +2 -2
  12. data/app/views/govuk_publishing_components/components/_metadata.html.erb +1 -1
  13. data/app/views/govuk_publishing_components/components/_related_navigation.html.erb +3 -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/govuk_publishing_components/components/related_navigation/_section.html.erb +1 -1
  20. data/app/views/layouts/govuk_publishing_components/application.html.erb +1 -0
  21. data/config/locales/en.yml +2 -2
  22. data/lib/govuk_publishing_components/app_helpers/asset_helper.rb +4 -0
  23. data/lib/govuk_publishing_components/presenters/breadcrumbs_helper.rb +1 -1
  24. data/lib/govuk_publishing_components/version.rb +1 -1
  25. data/node_modules/axe-core/axe.d.ts +77 -6
  26. data/node_modules/axe-core/axe.js +955 -600
  27. data/node_modules/axe-core/axe.min.js +2 -2
  28. data/node_modules/axe-core/locales/_template.json +6 -6
  29. data/node_modules/axe-core/locales/ja.json +91 -11
  30. data/node_modules/axe-core/package.json +5 -5
  31. data/node_modules/axe-core/sri-history.json +4 -0
  32. data/node_modules/govuk-frontend/README.md +4 -5
  33. data/node_modules/govuk-frontend/govuk/all-ie8.scss +8 -0
  34. data/node_modules/govuk-frontend/govuk/all.js +738 -258
  35. data/node_modules/govuk-frontend/govuk/all.js.map +1 -1
  36. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +11 -7
  37. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js.map +1 -1
  38. data/node_modules/govuk-frontend/govuk/common/govuk-frontend-version.js +17 -0
  39. data/node_modules/govuk-frontend/govuk/common/govuk-frontend-version.js.map +1 -0
  40. data/node_modules/govuk-frontend/govuk/common/index.js +16 -4
  41. data/node_modules/govuk-frontend/govuk/common/index.js.map +1 -1
  42. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +20 -10
  43. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js.map +1 -1
  44. data/node_modules/govuk-frontend/govuk/common.js +16 -4
  45. data/node_modules/govuk-frontend/govuk/common.js.map +1 -1
  46. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +3 -3
  47. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +234 -86
  48. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js.map +1 -1
  49. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +32 -13
  50. data/node_modules/govuk-frontend/govuk/components/accordion/macro-options.json +8 -2
  51. data/node_modules/govuk-frontend/govuk/components/accordion/template.njk +1 -0
  52. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +1 -1
  53. data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +1 -1
  54. data/node_modules/govuk-frontend/govuk/components/back-link/macro-options.json +1 -1
  55. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +1 -1
  56. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +12 -12
  57. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro-options.json +1 -1
  58. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +8 -6
  59. data/node_modules/govuk-frontend/govuk/components/button/button.js +54 -19
  60. data/node_modules/govuk-frontend/govuk/components/button/button.js.map +1 -1
  61. data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +11 -1
  62. data/node_modules/govuk-frontend/govuk/components/button/macro-options.json +7 -1
  63. data/node_modules/govuk-frontend/govuk/components/button/template.njk +1 -1
  64. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +170 -76
  65. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js.map +1 -1
  66. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +24 -24
  67. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +3 -3
  68. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +6 -6
  69. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +75 -24
  70. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js.map +1 -1
  71. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +47 -47
  72. data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +1 -1
  73. data/node_modules/govuk-frontend/govuk/components/checkboxes/template.njk +3 -3
  74. data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +24 -24
  75. data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro-options.json +1 -1
  76. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +26 -26
  77. data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +1 -1
  78. data/node_modules/govuk-frontend/govuk/components/date-input/template.njk +1 -1
  79. data/node_modules/govuk-frontend/govuk/components/details/details.js +39 -13
  80. data/node_modules/govuk-frontend/govuk/components/details/details.js.map +1 -1
  81. data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +1 -1
  82. data/node_modules/govuk-frontend/govuk/components/details/macro-options.json +1 -1
  83. data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +10 -10
  84. data/node_modules/govuk-frontend/govuk/components/error-message/macro-options.json +1 -1
  85. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +67 -27
  86. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js.map +1 -1
  87. data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +19 -19
  88. data/node_modules/govuk-frontend/govuk/components/error-summary/macro-options.json +1 -1
  89. data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +19 -19
  90. data/node_modules/govuk-frontend/govuk/components/fieldset/macro-options.json +1 -1
  91. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +6 -1
  92. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +14 -14
  93. data/node_modules/govuk-frontend/govuk/components/file-upload/macro-options.json +7 -1
  94. data/node_modules/govuk-frontend/govuk/components/file-upload/template.njk +2 -1
  95. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +0 -7
  96. data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +24 -24
  97. data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +1 -1
  98. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +22 -22
  99. data/node_modules/govuk-frontend/govuk/components/header/header.js +46 -14
  100. data/node_modules/govuk-frontend/govuk/components/header/header.js.map +1 -1
  101. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +1 -1
  102. data/node_modules/govuk-frontend/govuk/components/header/template.njk +1 -1
  103. data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +1 -1
  104. data/node_modules/govuk-frontend/govuk/components/hint/macro-options.json +1 -1
  105. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +15 -3
  106. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +54 -41
  107. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +7 -1
  108. data/node_modules/govuk-frontend/govuk/components/input/template.njk +2 -1
  109. data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +1 -1
  110. data/node_modules/govuk-frontend/govuk/components/inset-text/macro-options.json +1 -1
  111. data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +6 -6
  112. data/node_modules/govuk-frontend/govuk/components/label/macro-options.json +1 -1
  113. data/node_modules/govuk-frontend/govuk/components/notification-banner/fixtures.json +1 -1
  114. data/node_modules/govuk-frontend/govuk/components/notification-banner/macro-options.json +1 -1
  115. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +49 -22
  116. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js.map +1 -1
  117. data/node_modules/govuk-frontend/govuk/components/pagination/fixtures.json +16 -16
  118. data/node_modules/govuk-frontend/govuk/components/pagination/macro-options.json +1 -1
  119. data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +10 -10
  120. data/node_modules/govuk-frontend/govuk/components/panel/macro-options.json +1 -1
  121. data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +1 -1
  122. data/node_modules/govuk-frontend/govuk/components/phase-banner/macro-options.json +1 -1
  123. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +5 -5
  124. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +46 -46
  125. data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +1 -1
  126. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +65 -22
  127. data/node_modules/govuk-frontend/govuk/components/radios/radios.js.map +1 -1
  128. data/node_modules/govuk-frontend/govuk/components/radios/template.njk +2 -2
  129. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +7 -1
  130. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +19 -20
  131. data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +7 -1
  132. data/node_modules/govuk-frontend/govuk/components/select/template.njk +5 -2
  133. data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +1 -1
  134. data/node_modules/govuk-frontend/govuk/components/skip-link/macro-options.json +1 -1
  135. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +41 -13
  136. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js.map +1 -1
  137. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +34 -34
  138. data/node_modules/govuk-frontend/govuk/components/summary-list/macro-options.json +1 -1
  139. data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +21 -21
  140. data/node_modules/govuk-frontend/govuk/components/table/macro-options.json +1 -1
  141. data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +15 -15
  142. data/node_modules/govuk-frontend/govuk/components/tabs/macro-options.json +1 -1
  143. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +178 -60
  144. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js.map +1 -1
  145. data/node_modules/govuk-frontend/govuk/components/tabs/template.njk +1 -1
  146. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +18 -18
  147. data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +1 -1
  148. data/node_modules/govuk-frontend/govuk/components/tag/macro-options.json +1 -1
  149. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +8 -1
  150. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +18 -18
  151. data/node_modules/govuk-frontend/govuk/components/textarea/macro-options.json +7 -1
  152. data/node_modules/govuk-frontend/govuk/components/textarea/template.njk +2 -1
  153. data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +9 -5
  154. data/node_modules/govuk-frontend/govuk/components/warning-text/macro-options.json +3 -3
  155. data/node_modules/govuk-frontend/govuk/components/warning-text/template.njk +1 -1
  156. data/node_modules/govuk-frontend/govuk/core/_all.scss +1 -0
  157. data/node_modules/govuk-frontend/govuk/core/_govuk-frontend-version.scss +5 -0
  158. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +5 -2
  159. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +1 -1
  160. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +1 -1
  161. data/node_modules/govuk-frontend/govuk/i18n.js +38 -30
  162. data/node_modules/govuk-frontend/govuk/i18n.js.map +1 -1
  163. data/node_modules/govuk-frontend/govuk/macros/i18n.njk +12 -11
  164. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +1 -1
  165. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +4 -0
  166. data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +16 -0
  167. data/node_modules/govuk-frontend/govuk/settings/_links.scss +5 -1
  168. data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +38 -2
  169. data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js +2 -1
  170. data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js.map +1 -1
  171. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +2 -1
  172. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js.map +1 -1
  173. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js +2 -1
  174. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js.map +1 -1
  175. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js +10 -3
  176. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js.map +1 -1
  177. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +4 -1
  178. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js.map +1 -1
  179. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +13 -7
  180. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js.map +1 -1
  181. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js +2 -1
  182. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js.map +1 -1
  183. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +8 -2
  184. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js.map +1 -1
  185. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +8 -2
  186. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js.map +1 -1
  187. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js +4 -1
  188. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js.map +1 -1
  189. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js +10 -3
  190. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js.map +1 -1
  191. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js +4 -1
  192. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js.map +1 -1
  193. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js +2 -1
  194. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js.map +1 -1
  195. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +3 -2
  196. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js.map +1 -1
  197. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js +2 -1
  198. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js.map +1 -1
  199. data/node_modules/govuk-frontend/govuk-esm/all.mjs +81 -60
  200. data/node_modules/govuk-frontend/govuk-esm/all.mjs.map +1 -0
  201. data/node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs +12 -8
  202. data/node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map +1 -0
  203. data/node_modules/govuk-frontend/govuk-esm/common/govuk-frontend-version.mjs +9 -0
  204. data/node_modules/govuk-frontend/govuk-esm/common/govuk-frontend-version.mjs.map +1 -0
  205. data/node_modules/govuk-frontend/govuk-esm/common/index.mjs +44 -29
  206. data/node_modules/govuk-frontend/govuk-esm/common/index.mjs.map +1 -0
  207. data/node_modules/govuk-frontend/govuk-esm/common/normalise-dataset.mjs +15 -9
  208. data/node_modules/govuk-frontend/govuk-esm/common/normalise-dataset.mjs.map +1 -0
  209. data/node_modules/govuk-frontend/govuk-esm/common.mjs +3 -5
  210. data/node_modules/govuk-frontend/govuk-esm/common.mjs.map +1 -0
  211. data/node_modules/govuk-frontend/govuk-esm/components/accordion/accordion.mjs +319 -211
  212. data/node_modules/govuk-frontend/govuk-esm/components/accordion/accordion.mjs.map +1 -0
  213. data/node_modules/govuk-frontend/govuk-esm/components/button/button.mjs +47 -30
  214. data/node_modules/govuk-frontend/govuk-esm/components/button/button.mjs.map +1 -0
  215. data/node_modules/govuk-frontend/govuk-esm/components/character-count/character-count.mjs +169 -115
  216. data/node_modules/govuk-frontend/govuk-esm/components/character-count/character-count.mjs.map +1 -0
  217. data/node_modules/govuk-frontend/govuk-esm/components/checkboxes/checkboxes.mjs +88 -51
  218. data/node_modules/govuk-frontend/govuk-esm/components/checkboxes/checkboxes.mjs.map +1 -0
  219. data/node_modules/govuk-frontend/govuk-esm/components/details/details.mjs +64 -54
  220. data/node_modules/govuk-frontend/govuk-esm/components/details/details.mjs.map +1 -0
  221. data/node_modules/govuk-frontend/govuk-esm/components/error-summary/error-summary.mjs +69 -50
  222. data/node_modules/govuk-frontend/govuk-esm/components/error-summary/error-summary.mjs.map +1 -0
  223. data/node_modules/govuk-frontend/govuk-esm/components/header/header.mjs +59 -35
  224. data/node_modules/govuk-frontend/govuk-esm/components/header/header.mjs.map +1 -0
  225. data/node_modules/govuk-frontend/govuk-esm/components/notification-banner/notification-banner.mjs +36 -25
  226. data/node_modules/govuk-frontend/govuk-esm/components/notification-banner/notification-banner.mjs.map +1 -0
  227. data/node_modules/govuk-frontend/govuk-esm/components/radios/radios.mjs +67 -38
  228. data/node_modules/govuk-frontend/govuk-esm/components/radios/radios.mjs.map +1 -0
  229. data/node_modules/govuk-frontend/govuk-esm/components/skip-link/skip-link.mjs +49 -32
  230. data/node_modules/govuk-frontend/govuk-esm/components/skip-link/skip-link.mjs.map +1 -0
  231. data/node_modules/govuk-frontend/govuk-esm/components/tabs/tabs.mjs +263 -163
  232. data/node_modules/govuk-frontend/govuk-esm/components/tabs/tabs.mjs.map +1 -0
  233. data/node_modules/govuk-frontend/govuk-esm/i18n.mjs +68 -57
  234. data/node_modules/govuk-frontend/govuk-esm/i18n.mjs.map +1 -0
  235. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/DOMTokenList.mjs +5 -3
  236. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/DOMTokenList.mjs.map +1 -0
  237. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Date/now.mjs +4 -2
  238. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Date/now.mjs.map +1 -0
  239. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs +4 -2
  240. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs.map +1 -0
  241. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/classList.mjs +7 -4
  242. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/classList.mjs.map +1 -0
  243. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs +5 -2
  244. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs.map +1 -0
  245. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/dataset.mjs +13 -10
  246. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/dataset.mjs.map +1 -0
  247. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/matches.mjs +4 -2
  248. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/matches.mjs.map +1 -0
  249. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/nextElementSibling.mjs +6 -3
  250. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/nextElementSibling.mjs.map +1 -0
  251. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/previousElementSibling.mjs +6 -3
  252. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/previousElementSibling.mjs.map +1 -0
  253. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element.mjs +5 -2
  254. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element.mjs.map +1 -0
  255. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Event.mjs +7 -4
  256. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Event.mjs.map +1 -0
  257. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Function/prototype/bind.mjs +5 -2
  258. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Function/prototype/bind.mjs.map +1 -0
  259. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Object/defineProperty.mjs +4 -2
  260. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Object/defineProperty.mjs.map +1 -0
  261. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/String/prototype/trim.mjs +5 -3
  262. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/String/prototype/trim.mjs.map +1 -0
  263. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Window.mjs +4 -2
  264. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Window.mjs.map +1 -0
  265. data/node_modules/govuk-frontend/govuk-prototype-kit/init.js +1 -0
  266. data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +2 -1
  267. data/node_modules/govuk-frontend/package.json +3 -2
  268. metadata +44 -7
  269. /data/app/assets/images/govuk_publishing_components/crests/{dit_crest_13px.png → dbt_crest_13px.png} +0 -0
  270. /data/app/assets/images/govuk_publishing_components/crests/{dit_crest_13px_x2.png → dbt_crest_13px_x2.png} +0 -0
  271. /data/app/assets/images/govuk_publishing_components/crests/{dit_crest_18px.png → dbt_crest_18px.png} +0 -0
  272. /data/app/assets/images/govuk_publishing_components/crests/{dit_crest_18px_x2.png → dbt_crest_18px_x2.png} +0 -0
@@ -1,10 +1,10 @@
1
- /* eslint-disable es-x/no-function-prototype-bind -- Polyfill imported */
1
+ import { mergeConfigs } from '../../common/index.mjs';
2
+ import { normaliseDataset } from '../../common/normalise-dataset.mjs';
3
+ import '../../vendor/polyfills/Element/prototype/closest.mjs';
4
+ import '../../vendor/polyfills/Event.mjs';
5
+ import '../../vendor/polyfills/Function/prototype/bind.mjs';
2
6
 
3
- import { mergeConfigs } from '../../common/index.mjs'
4
- import { normaliseDataset } from '../../common/normalise-dataset.mjs'
5
- import '../../vendor/polyfills/Element/prototype/closest.mjs'
6
- import '../../vendor/polyfills/Event.mjs' // addEventListener, event.target normalization and DOMContentLoaded
7
- import '../../vendor/polyfills/Function/prototype/bind.mjs'
7
+ /* eslint-disable es-x/no-function-prototype-bind -- Polyfill imported */
8
8
 
9
9
  /**
10
10
  * JavaScript enhancements for the ErrorSummary
@@ -12,7 +12,7 @@ import '../../vendor/polyfills/Function/prototype/bind.mjs'
12
12
  * Takes focus on initialisation for accessible announcement, unless disabled in configuration.
13
13
  *
14
14
  * @class
15
- * @param {HTMLElement} $module - HTML element to use for error summary
15
+ * @param {Element} $module - HTML element to use for error summary
16
16
  * @param {ErrorSummaryConfig} [config] - Error summary config
17
17
  */
18
18
  function ErrorSummary ($module, config) {
@@ -23,42 +23,52 @@ function ErrorSummary ($module, config) {
23
23
  // To avoid breaking further JavaScript initialisation
24
24
  // we need to safeguard against this so things keep
25
25
  // working the same now we read the elements data attributes
26
- if (!$module) {
26
+ if (!($module instanceof HTMLElement)) {
27
27
  // Little safety in case code gets ported as-is
28
28
  // into and ES6 class constructor, where the return value matters
29
29
  return this
30
30
  }
31
31
 
32
- this.$module = $module
32
+ /** @deprecated Will be made private in v5.0 */
33
+ this.$module = $module;
33
34
 
34
35
  var defaultConfig = {
35
36
  disableAutoFocus: false
36
- }
37
+ };
38
+
39
+ /**
40
+ * @deprecated Will be made private in v5.0
41
+ * @type {ErrorSummaryConfig}
42
+ */
37
43
  this.config = mergeConfigs(
38
44
  defaultConfig,
39
45
  config || {},
40
46
  normaliseDataset($module.dataset)
41
- )
47
+ );
42
48
  }
43
49
 
44
50
  /**
45
51
  * Initialise component
46
52
  */
47
53
  ErrorSummary.prototype.init = function () {
48
- var $module = this.$module
49
- if (!$module) {
54
+ // Check that required elements are present
55
+ if (!this.$module) {
50
56
  return
51
57
  }
52
58
 
53
- this.setFocus()
54
- $module.addEventListener('click', this.handleClick.bind(this))
55
- }
59
+ var $module = this.$module;
60
+
61
+ this.setFocus();
62
+ $module.addEventListener('click', this.handleClick.bind(this));
63
+ };
56
64
 
57
65
  /**
58
66
  * Focus the error summary
67
+ *
68
+ * @deprecated Will be made private in v5.0
59
69
  */
60
70
  ErrorSummary.prototype.setFocus = function () {
61
- var $module = this.$module
71
+ var $module = this.$module;
62
72
 
63
73
  if (this.config.disableAutoFocus) {
64
74
  return
@@ -66,26 +76,27 @@ ErrorSummary.prototype.setFocus = function () {
66
76
 
67
77
  // Set tabindex to -1 to make the element programmatically focusable, but
68
78
  // remove it on blur as the error summary doesn't need to be focused again.
69
- $module.setAttribute('tabindex', '-1')
79
+ $module.setAttribute('tabindex', '-1');
70
80
 
71
81
  $module.addEventListener('blur', function () {
72
- $module.removeAttribute('tabindex')
73
- })
82
+ $module.removeAttribute('tabindex');
83
+ });
74
84
 
75
- $module.focus()
76
- }
85
+ $module.focus();
86
+ };
77
87
 
78
88
  /**
79
89
  * Click event handler
80
90
  *
91
+ * @deprecated Will be made private in v5.0
81
92
  * @param {MouseEvent} event - Click event
82
93
  */
83
94
  ErrorSummary.prototype.handleClick = function (event) {
84
- var $target = event.target
95
+ var $target = event.target;
85
96
  if (this.focusTarget($target)) {
86
- event.preventDefault()
97
+ event.preventDefault();
87
98
  }
88
- }
99
+ };
89
100
 
90
101
  /**
91
102
  * Focus the target element
@@ -102,22 +113,27 @@ ErrorSummary.prototype.handleClick = function (event) {
102
113
  * NVDA (as tested in 2018.3.2) - without this only the field type is announced
103
114
  * (e.g. "Edit, has autocomplete").
104
115
  *
116
+ * @deprecated Will be made private in v5.0
105
117
  * @param {EventTarget} $target - Event target
106
118
  * @returns {boolean} True if the target was able to be focussed
107
119
  */
108
120
  ErrorSummary.prototype.focusTarget = function ($target) {
109
121
  // If the element that was clicked was not a link, return early
110
- if ($target.tagName !== 'A' || $target.href === false) {
122
+ if (!($target instanceof HTMLAnchorElement)) {
111
123
  return false
112
124
  }
113
125
 
114
- var inputId = this.getFragmentFromUrl($target.href)
115
- var $input = document.getElementById(inputId)
126
+ var inputId = this.getFragmentFromUrl($target.href);
127
+ if (!inputId) {
128
+ return false
129
+ }
130
+
131
+ var $input = document.getElementById(inputId);
116
132
  if (!$input) {
117
133
  return false
118
134
  }
119
135
 
120
- var $legendOrLabel = this.getAssociatedLegendOrLabel($input)
136
+ var $legendOrLabel = this.getAssociatedLegendOrLabel($input);
121
137
  if (!$legendOrLabel) {
122
138
  return false
123
139
  }
@@ -125,11 +141,11 @@ ErrorSummary.prototype.focusTarget = function ($target) {
125
141
  // Scroll the legend or label into view *before* calling focus on the input to
126
142
  // avoid extra scrolling in browsers that don't support `preventScroll` (which
127
143
  // at time of writing is most of them...)
128
- $legendOrLabel.scrollIntoView()
129
- $input.focus({ preventScroll: true })
144
+ $legendOrLabel.scrollIntoView();
145
+ $input.focus({ preventScroll: true });
130
146
 
131
147
  return true
132
- }
148
+ };
133
149
 
134
150
  /**
135
151
  * Get fragment from URL
@@ -137,16 +153,17 @@ ErrorSummary.prototype.focusTarget = function ($target) {
137
153
  * Extract the fragment (everything after the hash) from a URL, but not including
138
154
  * the hash.
139
155
  *
156
+ * @deprecated Will be made private in v5.0
140
157
  * @param {string} url - URL
141
- * @returns {string} Fragment from URL, without the hash
158
+ * @returns {string | undefined} Fragment from URL, without the hash
142
159
  */
143
160
  ErrorSummary.prototype.getFragmentFromUrl = function (url) {
144
161
  if (url.indexOf('#') === -1) {
145
- return false
162
+ return undefined
146
163
  }
147
164
 
148
165
  return url.split('#').pop()
149
- }
166
+ };
150
167
 
151
168
  /**
152
169
  * Get associated legend or label
@@ -159,22 +176,23 @@ ErrorSummary.prototype.getFragmentFromUrl = function (url) {
159
176
  * - The first `<label>` that is associated with the input using for="inputId"
160
177
  * - The closest parent `<label>`
161
178
  *
162
- * @param {HTMLElement} $input - The input
163
- * @returns {HTMLElement} Associated legend or label, or null if no associated
164
- * legend or label can be found
179
+ * @deprecated Will be made private in v5.0
180
+ * @param {Element} $input - The input
181
+ * @returns {Element | null} Associated legend or label, or null if no associated
182
+ * legend or label can be found
165
183
  */
166
184
  ErrorSummary.prototype.getAssociatedLegendOrLabel = function ($input) {
167
- var $fieldset = $input.closest('fieldset')
185
+ var $fieldset = $input.closest('fieldset');
168
186
 
169
187
  if ($fieldset) {
170
- var $legends = $fieldset.getElementsByTagName('legend')
188
+ var $legends = $fieldset.getElementsByTagName('legend');
171
189
 
172
190
  if ($legends.length) {
173
- var $candidateLegend = $legends[0]
191
+ var $candidateLegend = $legends[0];
174
192
 
175
193
  // If the input type is radio or checkbox, always use the legend if there
176
194
  // is one.
177
- if ($input.type === 'checkbox' || $input.type === 'radio') {
195
+ if ($input instanceof HTMLInputElement && ($input.type === 'checkbox' || $input.type === 'radio')) {
178
196
  return $candidateLegend
179
197
  }
180
198
 
@@ -184,13 +202,13 @@ ErrorSummary.prototype.getAssociatedLegendOrLabel = function ($input) {
184
202
  //
185
203
  // This should avoid situations where the input either ends up off the
186
204
  // screen, or obscured by a software keyboard.
187
- var legendTop = $candidateLegend.getBoundingClientRect().top
188
- var inputRect = $input.getBoundingClientRect()
205
+ var legendTop = $candidateLegend.getBoundingClientRect().top;
206
+ var inputRect = $input.getBoundingClientRect();
189
207
 
190
208
  // If the browser doesn't support Element.getBoundingClientRect().height
191
209
  // or window.innerHeight (like IE8), bail and just link to the label.
192
210
  if (inputRect.height && window.innerHeight) {
193
- var inputBottom = inputRect.top + inputRect.height
211
+ var inputBottom = inputRect.top + inputRect.height;
194
212
 
195
213
  if (inputBottom - legendTop < window.innerHeight / 2) {
196
214
  return $candidateLegend
@@ -201,14 +219,15 @@ ErrorSummary.prototype.getAssociatedLegendOrLabel = function ($input) {
201
219
 
202
220
  return document.querySelector("label[for='" + $input.getAttribute('id') + "']") ||
203
221
  $input.closest('label')
204
- }
205
-
206
- export default ErrorSummary
222
+ };
207
223
 
208
224
  /**
209
225
  * Error summary config
210
226
  *
211
227
  * @typedef {object} ErrorSummaryConfig
212
- * @property {boolean} [disableAutoFocus = false] -
213
- * If set to `true` the error summary will not be focussed when the page loads.
228
+ * @property {boolean} [disableAutoFocus = false] - If set to `true` the error
229
+ * summary will not be focussed when the page loads.
214
230
  */
231
+
232
+ export default ErrorSummary;
233
+ //# sourceMappingURL=components/error-summary/error-summary.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-summary.mjs","sources":["../../../../src/govuk/components/error-summary/error-summary.mjs"],"sourcesContent":["/* eslint-disable es-x/no-function-prototype-bind -- Polyfill imported */\n\nimport { mergeConfigs } from '../../common/index.mjs'\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs'\nimport '../../vendor/polyfills/Element/prototype/closest.mjs'\nimport '../../vendor/polyfills/Event.mjs' // addEventListener, event.target normalization and DOMContentLoaded\nimport '../../vendor/polyfills/Function/prototype/bind.mjs'\n\n/**\n * JavaScript enhancements for the ErrorSummary\n *\n * Takes focus on initialisation for accessible announcement, unless disabled in configuration.\n *\n * @class\n * @param {Element} $module - HTML element to use for error summary\n * @param {ErrorSummaryConfig} [config] - Error summary config\n */\nfunction ErrorSummary ($module, config) {\n // Some consuming code may not be passing a module,\n // for example if they initialise the component\n // on their own by directly passing the result\n // of `document.querySelector`.\n // To avoid breaking further JavaScript initialisation\n // we need to safeguard against this so things keep\n // working the same now we read the elements data attributes\n if (!($module instanceof HTMLElement)) {\n // Little safety in case code gets ported as-is\n // into and ES6 class constructor, where the return value matters\n return this\n }\n\n /** @deprecated Will be made private in v5.0 */\n this.$module = $module\n\n var defaultConfig = {\n disableAutoFocus: false\n }\n\n /**\n * @deprecated Will be made private in v5.0\n * @type {ErrorSummaryConfig}\n */\n this.config = mergeConfigs(\n defaultConfig,\n config || {},\n normaliseDataset($module.dataset)\n )\n}\n\n/**\n * Initialise component\n */\nErrorSummary.prototype.init = function () {\n // Check that required elements are present\n if (!this.$module) {\n return\n }\n\n var $module = this.$module\n\n this.setFocus()\n $module.addEventListener('click', this.handleClick.bind(this))\n}\n\n/**\n * Focus the error summary\n *\n * @deprecated Will be made private in v5.0\n */\nErrorSummary.prototype.setFocus = function () {\n var $module = this.$module\n\n if (this.config.disableAutoFocus) {\n return\n }\n\n // Set tabindex to -1 to make the element programmatically focusable, but\n // remove it on blur as the error summary doesn't need to be focused again.\n $module.setAttribute('tabindex', '-1')\n\n $module.addEventListener('blur', function () {\n $module.removeAttribute('tabindex')\n })\n\n $module.focus()\n}\n\n/**\n * Click event handler\n *\n * @deprecated Will be made private in v5.0\n * @param {MouseEvent} event - Click event\n */\nErrorSummary.prototype.handleClick = function (event) {\n var $target = event.target\n if (this.focusTarget($target)) {\n event.preventDefault()\n }\n}\n\n/**\n * Focus the target element\n *\n * By default, the browser will scroll the target into view. Because our labels\n * or legends appear above the input, this means the user will be presented with\n * an input without any context, as the label or legend will be off the top of\n * the screen.\n *\n * Manually handling the click event, scrolling the question into view and then\n * focussing the element solves this.\n *\n * This also results in the label and/or legend being announced correctly in\n * NVDA (as tested in 2018.3.2) - without this only the field type is announced\n * (e.g. \"Edit, has autocomplete\").\n *\n * @deprecated Will be made private in v5.0\n * @param {EventTarget} $target - Event target\n * @returns {boolean} True if the target was able to be focussed\n */\nErrorSummary.prototype.focusTarget = function ($target) {\n // If the element that was clicked was not a link, return early\n if (!($target instanceof HTMLAnchorElement)) {\n return false\n }\n\n var inputId = this.getFragmentFromUrl($target.href)\n if (!inputId) {\n return false\n }\n\n var $input = document.getElementById(inputId)\n if (!$input) {\n return false\n }\n\n var $legendOrLabel = this.getAssociatedLegendOrLabel($input)\n if (!$legendOrLabel) {\n return false\n }\n\n // Scroll the legend or label into view *before* calling focus on the input to\n // avoid extra scrolling in browsers that don't support `preventScroll` (which\n // at time of writing is most of them...)\n $legendOrLabel.scrollIntoView()\n $input.focus({ preventScroll: true })\n\n return true\n}\n\n/**\n * Get fragment from URL\n *\n * Extract the fragment (everything after the hash) from a URL, but not including\n * the hash.\n *\n * @deprecated Will be made private in v5.0\n * @param {string} url - URL\n * @returns {string | undefined} Fragment from URL, without the hash\n */\nErrorSummary.prototype.getFragmentFromUrl = function (url) {\n if (url.indexOf('#') === -1) {\n return undefined\n }\n\n return url.split('#').pop()\n}\n\n/**\n * Get associated legend or label\n *\n * Returns the first element that exists from this list:\n *\n * - The `<legend>` associated with the closest `<fieldset>` ancestor, as long\n * as the top of it is no more than half a viewport height away from the\n * bottom of the input\n * - The first `<label>` that is associated with the input using for=\"inputId\"\n * - The closest parent `<label>`\n *\n * @deprecated Will be made private in v5.0\n * @param {Element} $input - The input\n * @returns {Element | null} Associated legend or label, or null if no associated\n * legend or label can be found\n */\nErrorSummary.prototype.getAssociatedLegendOrLabel = function ($input) {\n var $fieldset = $input.closest('fieldset')\n\n if ($fieldset) {\n var $legends = $fieldset.getElementsByTagName('legend')\n\n if ($legends.length) {\n var $candidateLegend = $legends[0]\n\n // If the input type is radio or checkbox, always use the legend if there\n // is one.\n if ($input instanceof HTMLInputElement && ($input.type === 'checkbox' || $input.type === 'radio')) {\n return $candidateLegend\n }\n\n // For other input types, only scroll to the fieldset’s legend (instead of\n // the label associated with the input) if the input would end up in the\n // top half of the screen.\n //\n // This should avoid situations where the input either ends up off the\n // screen, or obscured by a software keyboard.\n var legendTop = $candidateLegend.getBoundingClientRect().top\n var inputRect = $input.getBoundingClientRect()\n\n // If the browser doesn't support Element.getBoundingClientRect().height\n // or window.innerHeight (like IE8), bail and just link to the label.\n if (inputRect.height && window.innerHeight) {\n var inputBottom = inputRect.top + inputRect.height\n\n if (inputBottom - legendTop < window.innerHeight / 2) {\n return $candidateLegend\n }\n }\n }\n }\n\n return document.querySelector(\"label[for='\" + $input.getAttribute('id') + \"']\") ||\n $input.closest('label')\n}\n\nexport default ErrorSummary\n\n/**\n * Error summary config\n *\n * @typedef {object} ErrorSummaryConfig\n * @property {boolean} [disableAutoFocus = false] - If set to `true` the error\n * summary will not be focussed when the page loads.\n */\n"],"names":[],"mappings":"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"}
@@ -1,31 +1,48 @@
1
- /* eslint-disable es-x/no-function-prototype-bind -- Polyfill imported */
1
+ import '../../vendor/polyfills/Event.mjs';
2
+ import '../../vendor/polyfills/Function/prototype/bind.mjs';
2
3
 
3
- import '../../vendor/polyfills/Event.mjs'
4
- import '../../vendor/polyfills/Function/prototype/bind.mjs'
4
+ /* eslint-disable es-x/no-function-prototype-bind -- Polyfill imported */
5
5
 
6
6
  /**
7
7
  * Header component
8
8
  *
9
9
  * @class
10
- * @param {HTMLElement} $module - HTML element to use for header
10
+ * @param {Element} $module - HTML element to use for header
11
11
  */
12
12
  function Header ($module) {
13
- this.$module = $module
14
- this.$menuButton = $module && $module.querySelector('.govuk-js-header-toggle')
13
+ if (!($module instanceof HTMLElement)) {
14
+ return this
15
+ }
16
+
17
+ /** @deprecated Will be made private in v5.0 */
18
+ this.$module = $module;
19
+
20
+ /** @deprecated Will be made private in v5.0 */
21
+ this.$menuButton = $module.querySelector('.govuk-js-header-toggle');
22
+
23
+ /** @deprecated Will be made private in v5.0 */
15
24
  this.$menu = this.$menuButton && $module.querySelector(
16
25
  '#' + this.$menuButton.getAttribute('aria-controls')
17
- )
26
+ );
18
27
 
19
- // Save the opened/closed state for the nav in memory so that we can
20
- // accurately maintain state when the screen is changed from small to
21
- // big and back to small
22
- this.menuIsOpen = false
28
+ /**
29
+ * Save the opened/closed state for the nav in memory so that we can
30
+ * accurately maintain state when the screen is changed from small to
31
+ * big and back to small
32
+ *
33
+ * @deprecated Will be made private in v5.0
34
+ */
35
+ this.menuIsOpen = false;
23
36
 
24
- // A global const for storing a matchMedia instance which we'll use to
25
- // detect when a screen size change happens. We set this later during the
26
- // init function and rely on it being null if the feature isn't available
27
- // to initially apply hidden attributes
28
- this.mql = null
37
+ /**
38
+ * A global const for storing a matchMedia instance which we'll use to
39
+ * detect when a screen size change happens. We set this later during the
40
+ * init function and rely on it being null if the feature isn't available
41
+ * to initially apply hidden attributes
42
+ *
43
+ * @deprecated Will be made private in v5.0
44
+ */
45
+ this.mql = null;
29
46
  }
30
47
 
31
48
  /**
@@ -39,29 +56,31 @@ function Header ($module) {
39
56
  * version of the menu to the user.
40
57
  */
41
58
  Header.prototype.init = function () {
59
+ // Check that required elements are present
42
60
  if (!this.$module || !this.$menuButton || !this.$menu) {
43
61
  return
44
62
  }
45
63
 
46
64
  if ('matchMedia' in window) {
47
65
  // Set the matchMedia to the govuk-frontend desktop breakpoint
48
- this.mql = window.matchMedia('(min-width: 48.0625em)')
66
+ this.mql = window.matchMedia('(min-width: 48.0625em)');
49
67
 
50
68
  if ('addEventListener' in this.mql) {
51
- this.mql.addEventListener('change', this.syncState.bind(this))
69
+ this.mql.addEventListener('change', this.syncState.bind(this));
52
70
  } else {
53
71
  // addListener is a deprecated function, however addEventListener
54
- // isn't supported by IE or Safari. We therefore add this in as
72
+ // isn't supported by IE or Safari < 14. We therefore add this in as
55
73
  // a fallback for those browsers
56
- this.mql.addListener(this.syncState.bind(this))
74
+ // @ts-expect-error Property 'addListener' does not exist
75
+ this.mql.addListener(this.syncState.bind(this));
57
76
  }
58
77
 
59
- this.syncState()
60
- this.$menuButton.addEventListener('click', this.handleMenuButtonClick.bind(this))
78
+ this.syncState();
79
+ this.$menuButton.addEventListener('click', this.handleMenuButtonClick.bind(this));
61
80
  } else {
62
- this.$menuButton.setAttribute('hidden', '')
81
+ this.$menuButton.setAttribute('hidden', '');
63
82
  }
64
- }
83
+ };
65
84
 
66
85
  /**
67
86
  * Sync menu state
@@ -70,32 +89,37 @@ Header.prototype.init = function () {
70
89
  * visual states of the menu and the menu button.
71
90
  * Additionally will force the menu to be visible and the menu button to be
72
91
  * hidden if the matchMedia is triggered to desktop.
92
+ *
93
+ * @deprecated Will be made private in v5.0
73
94
  */
74
95
  Header.prototype.syncState = function () {
75
96
  if (this.mql.matches) {
76
- this.$menu.removeAttribute('hidden')
77
- this.$menuButton.setAttribute('hidden', '')
97
+ this.$menu.removeAttribute('hidden');
98
+ this.$menuButton.setAttribute('hidden', '');
78
99
  } else {
79
- this.$menuButton.removeAttribute('hidden')
80
- this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen)
100
+ this.$menuButton.removeAttribute('hidden');
101
+ this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString());
81
102
 
82
103
  if (this.menuIsOpen) {
83
- this.$menu.removeAttribute('hidden')
104
+ this.$menu.removeAttribute('hidden');
84
105
  } else {
85
- this.$menu.setAttribute('hidden', '')
106
+ this.$menu.setAttribute('hidden', '');
86
107
  }
87
108
  }
88
- }
109
+ };
89
110
 
90
111
  /**
91
112
  * Handle menu button click
92
113
  *
93
114
  * When the menu button is clicked, change the visibility of the menu and then
94
115
  * sync the accessibility state and menu button state
116
+ *
117
+ * @deprecated Will be made private in v5.0
95
118
  */
96
119
  Header.prototype.handleMenuButtonClick = function () {
97
- this.menuIsOpen = !this.menuIsOpen
98
- this.syncState()
99
- }
120
+ this.menuIsOpen = !this.menuIsOpen;
121
+ this.syncState();
122
+ };
100
123
 
101
- export default Header
124
+ export default Header;
125
+ //# sourceMappingURL=components/header/header.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header.mjs","sources":["../../../../src/govuk/components/header/header.mjs"],"sourcesContent":["/* eslint-disable es-x/no-function-prototype-bind -- Polyfill imported */\n\nimport '../../vendor/polyfills/Event.mjs'\nimport '../../vendor/polyfills/Function/prototype/bind.mjs'\n\n/**\n * Header component\n *\n * @class\n * @param {Element} $module - HTML element to use for header\n */\nfunction Header ($module) {\n if (!($module instanceof HTMLElement)) {\n return this\n }\n\n /** @deprecated Will be made private in v5.0 */\n this.$module = $module\n\n /** @deprecated Will be made private in v5.0 */\n this.$menuButton = $module.querySelector('.govuk-js-header-toggle')\n\n /** @deprecated Will be made private in v5.0 */\n this.$menu = this.$menuButton && $module.querySelector(\n '#' + this.$menuButton.getAttribute('aria-controls')\n )\n\n /**\n * Save the opened/closed state for the nav in memory so that we can\n * accurately maintain state when the screen is changed from small to\n * big and back to small\n *\n * @deprecated Will be made private in v5.0\n */\n this.menuIsOpen = false\n\n /**\n * A global const for storing a matchMedia instance which we'll use to\n * detect when a screen size change happens. We set this later during the\n * init function and rely on it being null if the feature isn't available\n * to initially apply hidden attributes\n *\n * @deprecated Will be made private in v5.0\n */\n this.mql = null\n}\n\n/**\n * Initialise component\n *\n * Check for the presence of the header, menu and menu button – if any are\n * missing then there's nothing to do so return early.\n * Feature sniff for and apply a matchMedia for desktop which will\n * trigger a state sync if the browser viewport moves between states. If\n * matchMedia isn't available, hide the menu button and present the \"no js\"\n * version of the menu to the user.\n */\nHeader.prototype.init = function () {\n // Check that required elements are present\n if (!this.$module || !this.$menuButton || !this.$menu) {\n return\n }\n\n if ('matchMedia' in window) {\n // Set the matchMedia to the govuk-frontend desktop breakpoint\n this.mql = window.matchMedia('(min-width: 48.0625em)')\n\n if ('addEventListener' in this.mql) {\n this.mql.addEventListener('change', this.syncState.bind(this))\n } else {\n // addListener is a deprecated function, however addEventListener\n // isn't supported by IE or Safari < 14. We therefore add this in as\n // a fallback for those browsers\n // @ts-expect-error Property 'addListener' does not exist\n this.mql.addListener(this.syncState.bind(this))\n }\n\n this.syncState()\n this.$menuButton.addEventListener('click', this.handleMenuButtonClick.bind(this))\n } else {\n this.$menuButton.setAttribute('hidden', '')\n }\n}\n\n/**\n * Sync menu state\n *\n * Uses the global variable menuIsOpen to correctly set the accessible and\n * visual states of the menu and the menu button.\n * Additionally will force the menu to be visible and the menu button to be\n * hidden if the matchMedia is triggered to desktop.\n *\n * @deprecated Will be made private in v5.0\n */\nHeader.prototype.syncState = function () {\n if (this.mql.matches) {\n this.$menu.removeAttribute('hidden')\n this.$menuButton.setAttribute('hidden', '')\n } else {\n this.$menuButton.removeAttribute('hidden')\n this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString())\n\n if (this.menuIsOpen) {\n this.$menu.removeAttribute('hidden')\n } else {\n this.$menu.setAttribute('hidden', '')\n }\n }\n}\n\n/**\n * Handle menu button click\n *\n * When the menu button is clicked, change the visibility of the menu and then\n * sync the accessibility state and menu button state\n *\n * @deprecated Will be made private in v5.0\n */\nHeader.prototype.handleMenuButtonClick = function () {\n this.menuIsOpen = !this.menuIsOpen\n this.syncState()\n}\n\nexport default Header\n"],"names":[],"mappings":";;;AAAA;AACA,AAGA;;;;;;;AAOA,SAAS,MAAM,EAAE,OAAO,EAAE;EACxB,IAAI,EAAE,OAAO,YAAY,WAAW,CAAC,EAAE;IACrC,OAAO,IAAI;GACZ;;;EAGD,IAAI,CAAC,OAAO,GAAG,QAAO;;;EAGtB,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,yBAAyB,EAAC;;;EAGnE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,IAAI,OAAO,CAAC,aAAa;IACpD,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,eAAe,CAAC;IACrD;;;;;;;;;EASD,IAAI,CAAC,UAAU,GAAG,MAAK;;;;;;;;;;EAUvB,IAAI,CAAC,GAAG,GAAG,KAAI;CAChB;;;;;;;;;;;;AAYD,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,YAAY;;EAElC,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;IACrD,MAAM;GACP;;EAED,IAAI,YAAY,IAAI,MAAM,EAAE;;IAE1B,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,wBAAwB,EAAC;;IAEtD,IAAI,kBAAkB,IAAI,IAAI,CAAC,GAAG,EAAE;MAClC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAC;KAC/D,MAAM;;;;;MAKL,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAC;KAChD;;IAED,IAAI,CAAC,SAAS,GAAE;IAChB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAC;GAClF,MAAM;IACL,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,EAAC;GAC5C;EACF;;;;;;;;;;;;AAYD,MAAM,CAAC,SAAS,CAAC,SAAS,GAAG,YAAY;EACvC,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;IACpB,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,QAAQ,EAAC;IACpC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,EAAC;GAC5C,MAAM;IACL,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,QAAQ,EAAC;IAC1C,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,eAAe,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAC;;IAE1E,IAAI,IAAI,CAAC,UAAU,EAAE;MACnB,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,QAAQ,EAAC;KACrC,MAAM;MACL,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,EAAC;KACtC;GACF;EACF;;;;;;;;;;AAUD,MAAM,CAAC,SAAS,CAAC,qBAAqB,GAAG,YAAY;EACnD,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,WAAU;EAClC,IAAI,CAAC,SAAS,GAAE;CACjB;;;;"}
@@ -1,39 +1,48 @@
1
- import { mergeConfigs } from '../../common/index.mjs'
2
- import { normaliseDataset } from '../../common/normalise-dataset.mjs'
3
- import '../../vendor/polyfills/Event.mjs' // addEventListener, event.target normalization and DOMContentLoaded
1
+ import { mergeConfigs } from '../../common/index.mjs';
2
+ import { normaliseDataset } from '../../common/normalise-dataset.mjs';
3
+ import '../../vendor/polyfills/Event.mjs';
4
4
 
5
5
  /**
6
6
  * Notification Banner component
7
7
  *
8
8
  * @class
9
- * @param {HTMLElement} $module - HTML element to use for notification banner
9
+ * @param {Element} $module - HTML element to use for notification banner
10
10
  * @param {NotificationBannerConfig} [config] - Notification banner config
11
11
  */
12
12
  function NotificationBanner ($module, config) {
13
- this.$module = $module
13
+ if (!($module instanceof HTMLElement)) {
14
+ return this
15
+ }
16
+
17
+ /** @deprecated Will be made private in v5.0 */
18
+ this.$module = $module;
14
19
 
15
20
  var defaultConfig = {
16
21
  disableAutoFocus: false
17
- }
22
+ };
23
+
24
+ /**
25
+ * @deprecated Will be made private in v5.0
26
+ * @type {NotificationBannerConfig}
27
+ */
18
28
  this.config = mergeConfigs(
19
29
  defaultConfig,
20
30
  config || {},
21
31
  normaliseDataset($module.dataset)
22
- )
32
+ );
23
33
  }
24
34
 
25
35
  /**
26
36
  * Initialise component
27
37
  */
28
38
  NotificationBanner.prototype.init = function () {
29
- var $module = this.$module
30
- // Check for module
31
- if (!$module) {
39
+ // Check that required elements are present
40
+ if (!this.$module) {
32
41
  return
33
42
  }
34
43
 
35
- this.setFocus()
36
- }
44
+ this.setFocus();
45
+ };
37
46
 
38
47
  /**
39
48
  * Focus the element
@@ -44,9 +53,11 @@ NotificationBanner.prototype.init = function () {
44
53
  * You can turn off the auto-focus functionality by setting `data-disable-auto-focus="true"` in the
45
54
  * component HTML. You might wish to do this based on user research findings, or to avoid a clash
46
55
  * with another element which should be focused when the page loads.
56
+ *
57
+ * @deprecated Will be made private in v5.0
47
58
  */
48
59
  NotificationBanner.prototype.setFocus = function () {
49
- var $module = this.$module
60
+ var $module = this.$module;
50
61
 
51
62
  if (this.config.disableAutoFocus) {
52
63
  return
@@ -60,25 +71,25 @@ NotificationBanner.prototype.setFocus = function () {
60
71
  // Remove the tabindex on blur as the component doesn't need to be focusable after the page has
61
72
  // loaded.
62
73
  if (!$module.getAttribute('tabindex')) {
63
- $module.setAttribute('tabindex', '-1')
74
+ $module.setAttribute('tabindex', '-1');
64
75
 
65
76
  $module.addEventListener('blur', function () {
66
- $module.removeAttribute('tabindex')
67
- })
77
+ $module.removeAttribute('tabindex');
78
+ });
68
79
  }
69
80
 
70
- $module.focus()
71
- }
72
-
73
- export default NotificationBanner
81
+ $module.focus();
82
+ };
74
83
 
75
84
  /**
76
85
  * Notification banner config
77
86
  *
78
87
  * @typedef {object} NotificationBannerConfig
79
- * @property {boolean} [disableAutoFocus = false] -
80
- * If set to `true` the notification banner will not be focussed when the page
81
- * loads. This only applies if the component has a `role` of `alert` – in
82
- * other cases the component will not be focused on page load, regardless of
83
- * this option.
88
+ * @property {boolean} [disableAutoFocus = false] - If set to `true` the
89
+ * notification banner will not be focussed when the page loads. This only
90
+ * applies if the component has a `role` of `alert` – in other cases the
91
+ * component will not be focused on page load, regardless of this option.
84
92
  */
93
+
94
+ export default NotificationBanner;
95
+ //# sourceMappingURL=components/notification-banner/notification-banner.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-banner.mjs","sources":["../../../../src/govuk/components/notification-banner/notification-banner.mjs"],"sourcesContent":["import { mergeConfigs } from '../../common/index.mjs'\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs'\nimport '../../vendor/polyfills/Event.mjs' // addEventListener, event.target normalization and DOMContentLoaded\n\n/**\n * Notification Banner component\n *\n * @class\n * @param {Element} $module - HTML element to use for notification banner\n * @param {NotificationBannerConfig} [config] - Notification banner config\n */\nfunction NotificationBanner ($module, config) {\n if (!($module instanceof HTMLElement)) {\n return this\n }\n\n /** @deprecated Will be made private in v5.0 */\n this.$module = $module\n\n var defaultConfig = {\n disableAutoFocus: false\n }\n\n /**\n * @deprecated Will be made private in v5.0\n * @type {NotificationBannerConfig}\n */\n this.config = mergeConfigs(\n defaultConfig,\n config || {},\n normaliseDataset($module.dataset)\n )\n}\n\n/**\n * Initialise component\n */\nNotificationBanner.prototype.init = function () {\n // Check that required elements are present\n if (!this.$module) {\n return\n }\n\n this.setFocus()\n}\n\n/**\n * Focus the element\n *\n * If `role=\"alert\"` is set, focus the element to help some assistive technologies\n * prioritise announcing it.\n *\n * You can turn off the auto-focus functionality by setting `data-disable-auto-focus=\"true\"` in the\n * component HTML. You might wish to do this based on user research findings, or to avoid a clash\n * with another element which should be focused when the page loads.\n *\n * @deprecated Will be made private in v5.0\n */\nNotificationBanner.prototype.setFocus = function () {\n var $module = this.$module\n\n if (this.config.disableAutoFocus) {\n return\n }\n\n if ($module.getAttribute('role') !== 'alert') {\n return\n }\n\n // Set tabindex to -1 to make the element focusable with JavaScript.\n // Remove the tabindex on blur as the component doesn't need to be focusable after the page has\n // loaded.\n if (!$module.getAttribute('tabindex')) {\n $module.setAttribute('tabindex', '-1')\n\n $module.addEventListener('blur', function () {\n $module.removeAttribute('tabindex')\n })\n }\n\n $module.focus()\n}\n\nexport default NotificationBanner\n\n/**\n * Notification banner config\n *\n * @typedef {object} NotificationBannerConfig\n * @property {boolean} [disableAutoFocus = false] - If set to `true` the\n * notification banner will not be focussed when the page loads. This only\n * applies if the component has a `role` of `alert` – in other cases the\n * component will not be focused on page load, regardless of this option.\n */\n"],"names":[],"mappings":";;;;AAIA;;;;;;;AAOA,SAAS,kBAAkB,EAAE,OAAO,EAAE,MAAM,EAAE;EAC5C,IAAI,EAAE,OAAO,YAAY,WAAW,CAAC,EAAE;IACrC,OAAO,IAAI;GACZ;;;EAGD,IAAI,CAAC,OAAO,GAAG,QAAO;;EAEtB,IAAI,aAAa,GAAG;IAClB,gBAAgB,EAAE,KAAK;IACxB;;;;;;EAMD,IAAI,CAAC,MAAM,GAAG,YAAY;IACxB,aAAa;IACb,MAAM,IAAI,EAAE;IACZ,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC;IAClC;CACF;;;;;AAKD,kBAAkB,CAAC,SAAS,CAAC,IAAI,GAAG,YAAY;;EAE9C,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;IACjB,MAAM;GACP;;EAED,IAAI,CAAC,QAAQ,GAAE;EAChB;;;;;;;;;;;;;;AAcD,kBAAkB,CAAC,SAAS,CAAC,QAAQ,GAAG,YAAY;EAClD,IAAI,OAAO,GAAG,IAAI,CAAC,QAAO;;EAE1B,IAAI,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE;IAChC,MAAM;GACP;;EAED,IAAI,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,OAAO,EAAE;IAC5C,MAAM;GACP;;;;;EAKD,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE;IACrC,OAAO,CAAC,YAAY,CAAC,UAAU,EAAE,IAAI,EAAC;;IAEtC,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,YAAY;MAC3C,OAAO,CAAC,eAAe,CAAC,UAAU,EAAC;KACpC,EAAC;GACH;;EAED,OAAO,CAAC,KAAK,GAAE;EAChB;AACD,AAEA;;;;;;;;;GASG;;;;"}