govuk_publishing_components 35.3.3 → 35.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/component_guide/application.scss +37 -1
  3. data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +10 -6
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +2 -2
  5. data/app/views/govuk_publishing_components/component_guide/example.html.erb +1 -1
  6. data/app/views/govuk_publishing_components/component_guide/preview.html.erb +1 -1
  7. data/app/views/govuk_publishing_components/component_guide/show.html.erb +1 -1
  8. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +2 -2
  9. data/app/views/govuk_publishing_components/components/_metadata.html.erb +1 -1
  10. data/app/views/govuk_publishing_components/components/_share_links.html.erb +6 -2
  11. data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +1 -1
  12. data/app/views/govuk_publishing_components/components/docs/metadata.yml +1 -3
  13. data/app/views/govuk_publishing_components/components/docs/organisation_logo.yml +5 -5
  14. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_related.yml +1 -0
  15. data/app/views/layouts/govuk_publishing_components/application.html.erb +1 -0
  16. data/lib/govuk_publishing_components/app_helpers/asset_helper.rb +4 -0
  17. data/lib/govuk_publishing_components/presenters/breadcrumbs_helper.rb +1 -1
  18. data/lib/govuk_publishing_components/version.rb +1 -1
  19. data/node_modules/axe-core/axe.d.ts +77 -6
  20. data/node_modules/axe-core/axe.js +955 -600
  21. data/node_modules/axe-core/axe.min.js +2 -2
  22. data/node_modules/axe-core/locales/_template.json +6 -6
  23. data/node_modules/axe-core/locales/ja.json +91 -11
  24. data/node_modules/axe-core/package.json +5 -5
  25. data/node_modules/axe-core/sri-history.json +4 -0
  26. data/node_modules/govuk-frontend/README.md +4 -5
  27. data/node_modules/govuk-frontend/govuk/all-ie8.scss +8 -0
  28. data/node_modules/govuk-frontend/govuk/all.js +738 -258
  29. data/node_modules/govuk-frontend/govuk/all.js.map +1 -1
  30. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +11 -7
  31. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js.map +1 -1
  32. data/node_modules/govuk-frontend/govuk/common/govuk-frontend-version.js +17 -0
  33. data/node_modules/govuk-frontend/govuk/common/govuk-frontend-version.js.map +1 -0
  34. data/node_modules/govuk-frontend/govuk/common/index.js +16 -4
  35. data/node_modules/govuk-frontend/govuk/common/index.js.map +1 -1
  36. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +20 -10
  37. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js.map +1 -1
  38. data/node_modules/govuk-frontend/govuk/common.js +16 -4
  39. data/node_modules/govuk-frontend/govuk/common.js.map +1 -1
  40. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +3 -3
  41. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +234 -86
  42. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js.map +1 -1
  43. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +32 -13
  44. data/node_modules/govuk-frontend/govuk/components/accordion/macro-options.json +8 -2
  45. data/node_modules/govuk-frontend/govuk/components/accordion/template.njk +1 -0
  46. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +1 -1
  47. data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +1 -1
  48. data/node_modules/govuk-frontend/govuk/components/back-link/macro-options.json +1 -1
  49. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +1 -1
  50. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +12 -12
  51. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro-options.json +1 -1
  52. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +8 -6
  53. data/node_modules/govuk-frontend/govuk/components/button/button.js +54 -19
  54. data/node_modules/govuk-frontend/govuk/components/button/button.js.map +1 -1
  55. data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +11 -1
  56. data/node_modules/govuk-frontend/govuk/components/button/macro-options.json +7 -1
  57. data/node_modules/govuk-frontend/govuk/components/button/template.njk +1 -1
  58. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +170 -76
  59. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js.map +1 -1
  60. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +24 -24
  61. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +3 -3
  62. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +6 -6
  63. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +75 -24
  64. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js.map +1 -1
  65. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +47 -47
  66. data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +1 -1
  67. data/node_modules/govuk-frontend/govuk/components/checkboxes/template.njk +3 -3
  68. data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +24 -24
  69. data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro-options.json +1 -1
  70. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +26 -26
  71. data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +1 -1
  72. data/node_modules/govuk-frontend/govuk/components/date-input/template.njk +1 -1
  73. data/node_modules/govuk-frontend/govuk/components/details/details.js +39 -13
  74. data/node_modules/govuk-frontend/govuk/components/details/details.js.map +1 -1
  75. data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +1 -1
  76. data/node_modules/govuk-frontend/govuk/components/details/macro-options.json +1 -1
  77. data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +10 -10
  78. data/node_modules/govuk-frontend/govuk/components/error-message/macro-options.json +1 -1
  79. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +67 -27
  80. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js.map +1 -1
  81. data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +19 -19
  82. data/node_modules/govuk-frontend/govuk/components/error-summary/macro-options.json +1 -1
  83. data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +19 -19
  84. data/node_modules/govuk-frontend/govuk/components/fieldset/macro-options.json +1 -1
  85. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +6 -1
  86. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +14 -14
  87. data/node_modules/govuk-frontend/govuk/components/file-upload/macro-options.json +7 -1
  88. data/node_modules/govuk-frontend/govuk/components/file-upload/template.njk +2 -1
  89. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +0 -7
  90. data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +24 -24
  91. data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +1 -1
  92. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +22 -22
  93. data/node_modules/govuk-frontend/govuk/components/header/header.js +46 -14
  94. data/node_modules/govuk-frontend/govuk/components/header/header.js.map +1 -1
  95. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +1 -1
  96. data/node_modules/govuk-frontend/govuk/components/header/template.njk +1 -1
  97. data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +1 -1
  98. data/node_modules/govuk-frontend/govuk/components/hint/macro-options.json +1 -1
  99. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +15 -3
  100. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +54 -41
  101. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +7 -1
  102. data/node_modules/govuk-frontend/govuk/components/input/template.njk +2 -1
  103. data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +1 -1
  104. data/node_modules/govuk-frontend/govuk/components/inset-text/macro-options.json +1 -1
  105. data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +6 -6
  106. data/node_modules/govuk-frontend/govuk/components/label/macro-options.json +1 -1
  107. data/node_modules/govuk-frontend/govuk/components/notification-banner/fixtures.json +1 -1
  108. data/node_modules/govuk-frontend/govuk/components/notification-banner/macro-options.json +1 -1
  109. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +49 -22
  110. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js.map +1 -1
  111. data/node_modules/govuk-frontend/govuk/components/pagination/fixtures.json +16 -16
  112. data/node_modules/govuk-frontend/govuk/components/pagination/macro-options.json +1 -1
  113. data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +10 -10
  114. data/node_modules/govuk-frontend/govuk/components/panel/macro-options.json +1 -1
  115. data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +1 -1
  116. data/node_modules/govuk-frontend/govuk/components/phase-banner/macro-options.json +1 -1
  117. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +5 -5
  118. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +46 -46
  119. data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +1 -1
  120. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +65 -22
  121. data/node_modules/govuk-frontend/govuk/components/radios/radios.js.map +1 -1
  122. data/node_modules/govuk-frontend/govuk/components/radios/template.njk +2 -2
  123. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +7 -1
  124. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +19 -20
  125. data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +7 -1
  126. data/node_modules/govuk-frontend/govuk/components/select/template.njk +5 -2
  127. data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +1 -1
  128. data/node_modules/govuk-frontend/govuk/components/skip-link/macro-options.json +1 -1
  129. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +41 -13
  130. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js.map +1 -1
  131. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +34 -34
  132. data/node_modules/govuk-frontend/govuk/components/summary-list/macro-options.json +1 -1
  133. data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +21 -21
  134. data/node_modules/govuk-frontend/govuk/components/table/macro-options.json +1 -1
  135. data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +15 -15
  136. data/node_modules/govuk-frontend/govuk/components/tabs/macro-options.json +1 -1
  137. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +178 -60
  138. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js.map +1 -1
  139. data/node_modules/govuk-frontend/govuk/components/tabs/template.njk +1 -1
  140. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +18 -18
  141. data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +1 -1
  142. data/node_modules/govuk-frontend/govuk/components/tag/macro-options.json +1 -1
  143. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +8 -1
  144. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +18 -18
  145. data/node_modules/govuk-frontend/govuk/components/textarea/macro-options.json +7 -1
  146. data/node_modules/govuk-frontend/govuk/components/textarea/template.njk +2 -1
  147. data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +9 -5
  148. data/node_modules/govuk-frontend/govuk/components/warning-text/macro-options.json +3 -3
  149. data/node_modules/govuk-frontend/govuk/components/warning-text/template.njk +1 -1
  150. data/node_modules/govuk-frontend/govuk/core/_all.scss +1 -0
  151. data/node_modules/govuk-frontend/govuk/core/_govuk-frontend-version.scss +5 -0
  152. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +5 -2
  153. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +1 -1
  154. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +1 -1
  155. data/node_modules/govuk-frontend/govuk/i18n.js +38 -30
  156. data/node_modules/govuk-frontend/govuk/i18n.js.map +1 -1
  157. data/node_modules/govuk-frontend/govuk/macros/i18n.njk +12 -11
  158. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +1 -1
  159. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +4 -0
  160. data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +16 -0
  161. data/node_modules/govuk-frontend/govuk/settings/_links.scss +5 -1
  162. data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +38 -2
  163. data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js +2 -1
  164. data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js.map +1 -1
  165. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +2 -1
  166. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js.map +1 -1
  167. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js +2 -1
  168. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js.map +1 -1
  169. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js +10 -3
  170. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js.map +1 -1
  171. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +4 -1
  172. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js.map +1 -1
  173. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +13 -7
  174. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js.map +1 -1
  175. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js +2 -1
  176. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js.map +1 -1
  177. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +8 -2
  178. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js.map +1 -1
  179. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +8 -2
  180. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js.map +1 -1
  181. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js +4 -1
  182. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js.map +1 -1
  183. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js +10 -3
  184. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js.map +1 -1
  185. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js +4 -1
  186. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js.map +1 -1
  187. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js +2 -1
  188. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js.map +1 -1
  189. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +3 -2
  190. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js.map +1 -1
  191. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js +2 -1
  192. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js.map +1 -1
  193. data/node_modules/govuk-frontend/govuk-esm/all.mjs +81 -60
  194. data/node_modules/govuk-frontend/govuk-esm/all.mjs.map +1 -0
  195. data/node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs +12 -8
  196. data/node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map +1 -0
  197. data/node_modules/govuk-frontend/govuk-esm/common/govuk-frontend-version.mjs +9 -0
  198. data/node_modules/govuk-frontend/govuk-esm/common/govuk-frontend-version.mjs.map +1 -0
  199. data/node_modules/govuk-frontend/govuk-esm/common/index.mjs +44 -29
  200. data/node_modules/govuk-frontend/govuk-esm/common/index.mjs.map +1 -0
  201. data/node_modules/govuk-frontend/govuk-esm/common/normalise-dataset.mjs +15 -9
  202. data/node_modules/govuk-frontend/govuk-esm/common/normalise-dataset.mjs.map +1 -0
  203. data/node_modules/govuk-frontend/govuk-esm/common.mjs +3 -5
  204. data/node_modules/govuk-frontend/govuk-esm/common.mjs.map +1 -0
  205. data/node_modules/govuk-frontend/govuk-esm/components/accordion/accordion.mjs +319 -211
  206. data/node_modules/govuk-frontend/govuk-esm/components/accordion/accordion.mjs.map +1 -0
  207. data/node_modules/govuk-frontend/govuk-esm/components/button/button.mjs +47 -30
  208. data/node_modules/govuk-frontend/govuk-esm/components/button/button.mjs.map +1 -0
  209. data/node_modules/govuk-frontend/govuk-esm/components/character-count/character-count.mjs +169 -115
  210. data/node_modules/govuk-frontend/govuk-esm/components/character-count/character-count.mjs.map +1 -0
  211. data/node_modules/govuk-frontend/govuk-esm/components/checkboxes/checkboxes.mjs +88 -51
  212. data/node_modules/govuk-frontend/govuk-esm/components/checkboxes/checkboxes.mjs.map +1 -0
  213. data/node_modules/govuk-frontend/govuk-esm/components/details/details.mjs +64 -54
  214. data/node_modules/govuk-frontend/govuk-esm/components/details/details.mjs.map +1 -0
  215. data/node_modules/govuk-frontend/govuk-esm/components/error-summary/error-summary.mjs +69 -50
  216. data/node_modules/govuk-frontend/govuk-esm/components/error-summary/error-summary.mjs.map +1 -0
  217. data/node_modules/govuk-frontend/govuk-esm/components/header/header.mjs +59 -35
  218. data/node_modules/govuk-frontend/govuk-esm/components/header/header.mjs.map +1 -0
  219. data/node_modules/govuk-frontend/govuk-esm/components/notification-banner/notification-banner.mjs +36 -25
  220. data/node_modules/govuk-frontend/govuk-esm/components/notification-banner/notification-banner.mjs.map +1 -0
  221. data/node_modules/govuk-frontend/govuk-esm/components/radios/radios.mjs +67 -38
  222. data/node_modules/govuk-frontend/govuk-esm/components/radios/radios.mjs.map +1 -0
  223. data/node_modules/govuk-frontend/govuk-esm/components/skip-link/skip-link.mjs +49 -32
  224. data/node_modules/govuk-frontend/govuk-esm/components/skip-link/skip-link.mjs.map +1 -0
  225. data/node_modules/govuk-frontend/govuk-esm/components/tabs/tabs.mjs +263 -163
  226. data/node_modules/govuk-frontend/govuk-esm/components/tabs/tabs.mjs.map +1 -0
  227. data/node_modules/govuk-frontend/govuk-esm/i18n.mjs +68 -57
  228. data/node_modules/govuk-frontend/govuk-esm/i18n.mjs.map +1 -0
  229. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/DOMTokenList.mjs +5 -3
  230. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/DOMTokenList.mjs.map +1 -0
  231. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Date/now.mjs +4 -2
  232. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Date/now.mjs.map +1 -0
  233. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs +4 -2
  234. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs.map +1 -0
  235. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/classList.mjs +7 -4
  236. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/classList.mjs.map +1 -0
  237. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs +5 -2
  238. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs.map +1 -0
  239. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/dataset.mjs +13 -10
  240. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/dataset.mjs.map +1 -0
  241. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/matches.mjs +4 -2
  242. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/matches.mjs.map +1 -0
  243. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/nextElementSibling.mjs +6 -3
  244. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/nextElementSibling.mjs.map +1 -0
  245. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/previousElementSibling.mjs +6 -3
  246. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/previousElementSibling.mjs.map +1 -0
  247. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element.mjs +5 -2
  248. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element.mjs.map +1 -0
  249. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Event.mjs +7 -4
  250. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Event.mjs.map +1 -0
  251. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Function/prototype/bind.mjs +5 -2
  252. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Function/prototype/bind.mjs.map +1 -0
  253. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Object/defineProperty.mjs +4 -2
  254. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Object/defineProperty.mjs.map +1 -0
  255. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/String/prototype/trim.mjs +5 -3
  256. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/String/prototype/trim.mjs.map +1 -0
  257. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Window.mjs +4 -2
  258. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Window.mjs.map +1 -0
  259. data/node_modules/govuk-frontend/govuk-prototype-kit/init.js +1 -0
  260. data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +2 -1
  261. data/node_modules/govuk-frontend/package.json +3 -2
  262. metadata +43 -6
  263. /data/app/assets/images/govuk_publishing_components/crests/{dit_crest_13px.png → dbt_crest_13px.png} +0 -0
  264. /data/app/assets/images/govuk_publishing_components/crests/{dit_crest_13px_x2.png → dbt_crest_13px_x2.png} +0 -0
  265. /data/app/assets/images/govuk_publishing_components/crests/{dit_crest_18px.png → dbt_crest_18px.png} +0 -0
  266. /data/app/assets/images/govuk_publishing_components/crests/{dit_crest_18px_x2.png → dbt_crest_18px_x2.png} +0 -0
@@ -27,7 +27,7 @@
27
27
  ]
28
28
  },
29
29
  "hidden": false,
30
- "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"select-1\">\n Label text goes here\n </label>\n\n\n <select class=\"govuk-select\" id=\"select-1\" name=\"select-1\">\n \n \n <option value=\"1\">GOV.UK frontend option 1</option>\n \n \n \n <option value=\"2\" selected>GOV.UK frontend option 2</option>\n \n \n \n <option value=\"3\" disabled>GOV.UK frontend option 3</option>\n \n \n </select>\n</div>"
30
+ "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"select-1\">\n Label text goes here\n </label>\n <select class=\"govuk-select\" id=\"select-1\" name=\"select-1\">\n <option value=\"1\">GOV.UK frontend option 1</option>\n <option value=\"2\" selected>GOV.UK frontend option 2</option>\n <option value=\"3\" disabled>GOV.UK frontend option 3</option>\n </select>\n</div>"
31
31
  },
32
32
  {
33
33
  "name": "with no items",
@@ -40,7 +40,7 @@
40
40
  "items": []
41
41
  },
42
42
  "hidden": false,
43
- "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"select-1\">\n Horse with no name\n </label>\n\n\n <select class=\"govuk-select\" id=\"select-1\" name=\"select-1\">\n \n </select>\n</div>"
43
+ "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"select-1\">\n Horse with no name\n </label>\n <select class=\"govuk-select\" id=\"select-1\" name=\"select-1\">\n </select>\n</div>"
44
44
  },
45
45
  {
46
46
  "name": "with selected value",
@@ -57,8 +57,7 @@
57
57
  },
58
58
  {
59
59
  "value": 2,
60
- "text": "GOV.UK frontend option 2",
61
- "selected": true
60
+ "text": "GOV.UK frontend option 2"
62
61
  },
63
62
  {
64
63
  "value": 3,
@@ -66,10 +65,10 @@
66
65
  "disabled": true
67
66
  }
68
67
  ],
69
- "value": 3
68
+ "value": 2
70
69
  },
71
70
  "hidden": false,
72
- "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"select-1\">\n Label text goes here\n </label>\n\n\n <select class=\"govuk-select\" id=\"select-1\" name=\"select-1\">\n \n \n <option value=\"1\">GOV.UK frontend option 1</option>\n \n \n \n <option value=\"2\" selected>GOV.UK frontend option 2</option>\n \n \n \n <option value=\"3\" selected disabled>GOV.UK frontend option 3</option>\n \n \n </select>\n</div>"
71
+ "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"select-1\">\n Label text goes here\n </label>\n <select class=\"govuk-select\" id=\"select-1\" name=\"select-1\">\n <option value=\"1\">GOV.UK frontend option 1</option>\n <option value=\"2\" selected>GOV.UK frontend option 2</option>\n <option value=\"3\" disabled>GOV.UK frontend option 3</option>\n </select>\n</div>"
73
72
  },
74
73
  {
75
74
  "name": "with hint text and error message",
@@ -101,7 +100,7 @@
101
100
  ]
102
101
  },
103
102
  "hidden": false,
104
- "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"select-2\">\n Label text goes here\n </label>\n\n \n \n <div id=\"select-2-hint\" class=\"govuk-hint\">\n Hint text goes here\n </div>\n\n\n \n \n <p id=\"select-2-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message goes here\n </p>\n\n <select class=\"govuk-select govuk-select--error\" id=\"select-2\" name=\"select-2\" aria-describedby=\"select-2-hint select-2-error\">\n \n \n <option value=\"1\">GOV.UK frontend option 1</option>\n \n \n \n <option value=\"2\">GOV.UK frontend option 2</option>\n \n \n \n <option value=\"3\">GOV.UK frontend option 3</option>\n \n \n </select>\n</div>"
103
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"select-2\">\n Label text goes here\n </label>\n <div id=\"select-2-hint\" class=\"govuk-hint\">\n Hint text goes here\n </div>\n <p id=\"select-2-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message goes here\n </p>\n <select class=\"govuk-select govuk-select--error\" id=\"select-2\" name=\"select-2\" aria-describedby=\"select-2-hint select-2-error\">\n <option value=\"1\">GOV.UK frontend option 1</option>\n <option value=\"2\">GOV.UK frontend option 2</option>\n <option value=\"3\">GOV.UK frontend option 3</option>\n </select>\n</div>"
105
104
  },
106
105
  {
107
106
  "name": "with label as page heading",
@@ -131,7 +130,7 @@
131
130
  ]
132
131
  },
133
132
  "hidden": false,
134
- "html": "<div class=\"govuk-form-group\">\n <h1 class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--l\" for=\"select-3\">\n Label text goes here\n </label>\n </h1>\n\n\n <select class=\"govuk-select\" id=\"select-3\" name=\"select-3\">\n \n \n <option value=\"1\">GOV.UK frontend option 1</option>\n \n \n \n <option value=\"2\" selected>GOV.UK frontend option 2</option>\n \n \n \n <option value=\"3\" disabled>GOV.UK frontend option 3</option>\n \n \n </select>\n</div>"
133
+ "html": "<div class=\"govuk-form-group\">\n <h1 class=\"govuk-label-wrapper\"><label class=\"govuk-label govuk-label--l\" for=\"select-3\">\n Label text goes here\n </label>\n </h1>\n <select class=\"govuk-select\" id=\"select-3\" name=\"select-3\">\n <option value=\"1\">GOV.UK frontend option 1</option>\n <option value=\"2\" selected>GOV.UK frontend option 2</option>\n <option value=\"3\" disabled>GOV.UK frontend option 3</option>\n </select>\n</div>"
135
134
  },
136
135
  {
137
136
  "name": "with full width override",
@@ -160,7 +159,7 @@
160
159
  ]
161
160
  },
162
161
  "hidden": false,
163
- "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"select-1\">\n Label text goes here\n </label>\n\n\n <select class=\"govuk-select govuk-!-width-full\" id=\"select-1\" name=\"select-1\">\n \n \n <option value=\"1\">GOV.UK frontend option 1</option>\n \n \n \n <option value=\"2\" selected>GOV.UK frontend option 2</option>\n \n \n \n <option value=\"3\" disabled>GOV.UK frontend option 3</option>\n \n \n </select>\n</div>"
162
+ "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"select-1\">\n Label text goes here\n </label>\n <select class=\"govuk-select govuk-!-width-full\" id=\"select-1\" name=\"select-1\">\n <option value=\"1\">GOV.UK frontend option 1</option>\n <option value=\"2\" selected>GOV.UK frontend option 2</option>\n <option value=\"3\" disabled>GOV.UK frontend option 3</option>\n </select>\n</div>"
164
163
  },
165
164
  {
166
165
  "name": "with optional form-group classes",
@@ -192,7 +191,7 @@
192
191
  ]
193
192
  },
194
193
  "hidden": false,
195
- "html": "<div class=\"govuk-form-group extra-class\">\n <label class=\"govuk-label\" for=\"select-1\">\n Label text goes here\n </label>\n\n\n <select class=\"govuk-select govuk-!-width-full\" id=\"select-1\" name=\"select-1\">\n \n \n <option value=\"1\">GOV.UK frontend option 1</option>\n \n \n \n <option value=\"2\" selected>GOV.UK frontend option 2</option>\n \n \n \n <option value=\"3\" disabled>GOV.UK frontend option 3</option>\n \n \n </select>\n</div>"
194
+ "html": "<div class=\"govuk-form-group extra-class\">\n <label class=\"govuk-label\" for=\"select-1\">\n Label text goes here\n </label>\n <select class=\"govuk-select govuk-!-width-full\" id=\"select-1\" name=\"select-1\">\n <option value=\"1\">GOV.UK frontend option 1</option>\n <option value=\"2\" selected>GOV.UK frontend option 2</option>\n <option value=\"3\" disabled>GOV.UK frontend option 3</option>\n </select>\n</div>"
196
195
  },
197
196
  {
198
197
  "name": "with describedBy",
@@ -212,7 +211,7 @@
212
211
  "describedBy": "some-id"
213
212
  },
214
213
  "hidden": true,
215
- "html": "<div class=\"govuk-form-group\">\n \n\n\n <select class=\"govuk-select\" id=\"with-describedby\" name=\"with-describedby\" aria-describedby=\"some-id\">\n \n \n <option value=\"1\">GOV.UK frontend option 1</option>\n \n \n \n <option value=\"2\">GOV.UK frontend option 2</option>\n \n \n </select>\n</div>"
214
+ "html": "<div class=\"govuk-form-group\">\n \n <select class=\"govuk-select\" id=\"with-describedby\" name=\"with-describedby\" aria-describedby=\"some-id\">\n <option value=\"1\">GOV.UK frontend option 1</option>\n <option value=\"2\">GOV.UK frontend option 2</option>\n </select>\n</div>"
216
215
  },
217
216
  {
218
217
  "name": "attributes",
@@ -234,7 +233,7 @@
234
233
  }
235
234
  },
236
235
  "hidden": true,
237
- "html": "<div class=\"govuk-form-group\">\n \n\n\n <select class=\"govuk-select\" id=\"with-attributes\" name=\"with-attributes\" data-attribute=\"my data value\">\n \n \n <option value=\"1\">GOV.UK frontend option 1</option>\n \n \n \n <option value=\"2\">GOV.UK frontend option 2</option>\n \n \n </select>\n</div>"
236
+ "html": "<div class=\"govuk-form-group\">\n \n <select class=\"govuk-select\" id=\"with-attributes\" name=\"with-attributes\" data-attribute=\"my data value\">\n <option value=\"1\">GOV.UK frontend option 1</option>\n <option value=\"2\">GOV.UK frontend option 2</option>\n </select>\n</div>"
238
237
  },
239
238
  {
240
239
  "name": "attributes on items",
@@ -262,7 +261,7 @@
262
261
  ]
263
262
  },
264
263
  "hidden": true,
265
- "html": "<div class=\"govuk-form-group\">\n \n\n\n <select class=\"govuk-select\" id=\"with-item-attributes\" name=\"with-item-attributes\">\n \n \n <option value=\"1\" data-attribute=\"ABC\" data-second-attribute=\"DEF\">Option 1</option>\n \n \n \n <option value=\"2\" selected data-attribute=\"GHI\" data-second-attribute=\"JKL\">Option 2</option>\n \n \n </select>\n</div>"
264
+ "html": "<div class=\"govuk-form-group\">\n \n <select class=\"govuk-select\" id=\"with-item-attributes\" name=\"with-item-attributes\">\n <option value=\"1\" data-attribute=\"ABC\" data-second-attribute=\"DEF\">Option 1</option>\n <option value=\"2\" selected data-attribute=\"GHI\" data-second-attribute=\"JKL\">Option 2</option>\n </select>\n</div>"
266
265
  },
267
266
  {
268
267
  "name": "with falsey values",
@@ -284,7 +283,7 @@
284
283
  ]
285
284
  },
286
285
  "hidden": true,
287
- "html": "<div class=\"govuk-form-group\">\n \n\n\n <select class=\"govuk-select\" id=\"with-falsey-values\" name=\"with-falsey-values\">\n \n \n <option value=\"1\">Option 1</option>\n \n \n \n \n \n \n \n \n \n <option value=\"2\">Options 2</option>\n \n \n </select>\n</div>"
286
+ "html": "<div class=\"govuk-form-group\">\n \n <select class=\"govuk-select\" id=\"with-falsey-values\" name=\"with-falsey-values\">\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Options 2</option>\n </select>\n</div>"
288
287
  },
289
288
  {
290
289
  "name": "hint",
@@ -296,7 +295,7 @@
296
295
  }
297
296
  },
298
297
  "hidden": true,
299
- "html": "<div class=\"govuk-form-group\">\n \n\n \n \n <div id=\"select-with-hint-hint\" class=\"govuk-hint\">\n Hint text goes here\n </div>\n\n\n <select class=\"govuk-select\" id=\"select-with-hint\" name=\"select-with-hint\" aria-describedby=\"select-with-hint-hint\">\n \n </select>\n</div>"
298
+ "html": "<div class=\"govuk-form-group\">\n \n <div id=\"select-with-hint-hint\" class=\"govuk-hint\">\n Hint text goes here\n </div>\n <select class=\"govuk-select\" id=\"select-with-hint\" name=\"select-with-hint\" aria-describedby=\"select-with-hint-hint\">\n </select>\n</div>"
300
299
  },
301
300
  {
302
301
  "name": "hint and describedBy",
@@ -319,7 +318,7 @@
319
318
  ]
320
319
  },
321
320
  "hidden": true,
322
- "html": "<div class=\"govuk-form-group\">\n \n\n \n \n <div id=\"select-with-hint-hint\" class=\"govuk-hint\">\n Hint text goes here\n </div>\n\n\n <select class=\"govuk-select\" id=\"select-with-hint\" name=\"select-with-hint\" aria-describedby=\"some-id select-with-hint-hint\">\n \n \n <option value=\"1\">GOV.UK frontend option 1</option>\n \n \n \n <option value=\"2\">GOV.UK frontend option 2</option>\n \n \n </select>\n</div>"
321
+ "html": "<div class=\"govuk-form-group\">\n \n <div id=\"select-with-hint-hint\" class=\"govuk-hint\">\n Hint text goes here\n </div>\n <select class=\"govuk-select\" id=\"select-with-hint\" name=\"select-with-hint\" aria-describedby=\"some-id select-with-hint-hint\">\n <option value=\"1\">GOV.UK frontend option 1</option>\n <option value=\"2\">GOV.UK frontend option 2</option>\n </select>\n</div>"
323
322
  },
324
323
  {
325
324
  "name": "error",
@@ -341,7 +340,7 @@
341
340
  ]
342
341
  },
343
342
  "hidden": true,
344
- "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n \n\n\n \n \n <p id=\"select-with-error-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </p>\n\n <select class=\"govuk-select govuk-select--error\" id=\"select-with-error\" name=\"select-with-error\" aria-describedby=\"select-with-error-error\">\n \n \n <option value=\"1\">GOV.UK frontend option 1</option>\n \n \n \n <option value=\"2\">GOV.UK frontend option 2</option>\n \n \n </select>\n</div>"
343
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n \n <p id=\"select-with-error-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </p>\n <select class=\"govuk-select govuk-select--error\" id=\"select-with-error\" name=\"select-with-error\" aria-describedby=\"select-with-error-error\">\n <option value=\"1\">GOV.UK frontend option 1</option>\n <option value=\"2\">GOV.UK frontend option 2</option>\n </select>\n</div>"
345
344
  },
346
345
  {
347
346
  "name": "error and describedBy",
@@ -364,7 +363,7 @@
364
363
  ]
365
364
  },
366
365
  "hidden": true,
367
- "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n \n\n\n \n \n <p id=\"select-with-error-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </p>\n\n <select class=\"govuk-select govuk-select--error\" id=\"select-with-error\" name=\"select-with-error\" aria-describedby=\"some-id select-with-error-error\">\n \n \n <option value=\"1\">GOV.UK frontend option 1</option>\n \n \n \n <option value=\"2\">GOV.UK frontend option 2</option>\n \n \n </select>\n</div>"
366
+ "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n \n <p id=\"select-with-error-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </p>\n <select class=\"govuk-select govuk-select--error\" id=\"select-with-error\" name=\"select-with-error\" aria-describedby=\"some-id select-with-error-error\">\n <option value=\"1\">GOV.UK frontend option 1</option>\n <option value=\"2\">GOV.UK frontend option 2</option>\n </select>\n</div>"
368
367
  },
369
368
  {
370
369
  "name": "item selected overrides value",
@@ -389,7 +388,7 @@
389
388
  "value": "green"
390
389
  },
391
390
  "hidden": true,
392
- "html": "<div class=\"govuk-form-group\">\n \n\n\n <select class=\"govuk-select\" id=\"colors\" name=\"colors\">\n \n \n <option value=\"red\">Red</option>\n \n \n \n <option value=\"green\">Green</option>\n \n \n \n <option value=\"blue\">Blue</option>\n \n \n </select>\n</div>"
391
+ "html": "<div class=\"govuk-form-group\">\n \n <select class=\"govuk-select\" id=\"colors\" name=\"colors\">\n <option value=\"red\">Red</option>\n <option value=\"green\">Green</option>\n <option value=\"blue\">Blue</option>\n </select>\n</div>"
393
392
  }
394
393
  ]
395
- }
394
+ }
@@ -55,6 +55,12 @@
55
55
  "required": false,
56
56
  "description": "Value for the option which should be selected. Use this as an alternative to setting the `selected` option on each individual item."
57
57
  },
58
+ {
59
+ "name": "disabled",
60
+ "type": "boolean",
61
+ "required": false,
62
+ "description": "If `true`, select box will be disabled. Use the `disabled` option on each individual item to only disable certain options."
63
+ },
58
64
  {
59
65
  "name": "describedBy",
60
66
  "type": "string",
@@ -108,4 +114,4 @@
108
114
  "required": false,
109
115
  "description": "HTML attributes (for example data attributes) to add to the select."
110
116
  }
111
- ]
117
+ ]
@@ -3,7 +3,7 @@
3
3
  {% from "../label/macro.njk" import govukLabel %}
4
4
 
5
5
  {#- a record of other elements that we need to associate with the input using
6
- aria-describedby – for example hints or error messages -#}
6
+ aria-describedby – for example hints or error messages -#}
7
7
  {% set describedBy = params.describedBy if params.describedBy else "" %}
8
8
  <div class="govuk-form-group {%- if params.errorMessage %} govuk-form-group--error{% endif %} {%- if params.formGroup.classes %} {{ params.formGroup.classes }}{% endif %}">
9
9
  {{ govukLabel({
@@ -38,7 +38,10 @@
38
38
  }) | indent(2) | trim }}
39
39
  {% endif %}
40
40
  <select class="govuk-select
41
- {%- if params.classes %} {{ params.classes }}{% endif %}{%- if params.errorMessage %} govuk-select--error{% endif %}" id="{{ params.id }}" name="{{ params.name }}" {%- if describedBy %} aria-describedby="{{ describedBy }}"{% endif %} {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
41
+ {%- if params.classes %} {{ params.classes }}{% endif %}{%- if params.errorMessage %} govuk-select--error{% endif %}" id="{{ params.id }}" name="{{ params.name }}"
42
+ {%- if params.disabled %} disabled{% endif %}
43
+ {%- if describedBy %} aria-describedby="{{ describedBy }}"{% endif %}
44
+ {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
42
45
  {% for item in params.items %}
43
46
  {% if item %}
44
47
  <option value="{{ item.value }}"
@@ -83,4 +83,4 @@
83
83
  "html": "<a href=\"#content\" class=\"govuk-skip-link\" data-test=\"attribute\" aria-label=\"Skip to content\" data-module=\"govuk-skip-link\">Skip link</a>"
84
84
  }
85
85
  ]
86
- }
86
+ }
@@ -29,4 +29,4 @@
29
29
  "required": false,
30
30
  "description": "HTML attributes (for example data attributes) to add to the skip link."
31
31
  }
32
- ]
32
+ ]
@@ -4,7 +4,8 @@
4
4
  (global.GOVUKFrontend = global.GOVUKFrontend || {}, global.GOVUKFrontend.SkipLink = factory());
5
5
  }(this, (function () { 'use strict';
6
6
 
7
- (function(undefined) {
7
+ // @ts-nocheck
8
+ (function (undefined) {
8
9
 
9
10
  // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Object/defineProperty/detect.js
10
11
  var detect = (
@@ -91,7 +92,8 @@
91
92
  })
92
93
  .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
93
94
 
94
- (function(undefined) {
95
+ // @ts-nocheck
96
+ (function (undefined) {
95
97
 
96
98
  // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-service/master/packages/polyfill-library/polyfills/DOMTokenList/detect.js
97
99
  var detect = (
@@ -356,7 +358,8 @@
356
358
 
357
359
  }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
358
360
 
359
- (function(undefined) {
361
+ // @ts-nocheck
362
+ (function (undefined) {
360
363
 
361
364
  // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Document/detect.js
362
365
  var detect = ("Document" in this);
@@ -383,6 +386,8 @@
383
386
  })
384
387
  .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
385
388
 
389
+ // @ts-nocheck
390
+
386
391
  (function(undefined) {
387
392
 
388
393
  // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Element/detect.js
@@ -496,6 +501,8 @@
496
501
  })
497
502
  .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
498
503
 
504
+ // @ts-nocheck
505
+
499
506
  (function(undefined) {
500
507
 
501
508
  // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-service/8717a9e04ac7aff99b4980fbedead98036b0929a/packages/polyfill-library/polyfills/Element/prototype/classList/detect.js
@@ -586,7 +593,8 @@
586
593
 
587
594
  }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
588
595
 
589
- (function(undefined) {
596
+ // @ts-nocheck
597
+ (function (undefined) {
590
598
 
591
599
  // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Window/detect.js
592
600
  var detect = ('Window' in this);
@@ -607,6 +615,8 @@
607
615
  })
608
616
  .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
609
617
 
618
+ // @ts-nocheck
619
+
610
620
  (function(undefined) {
611
621
 
612
622
  // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Event/detect.js
@@ -856,6 +866,8 @@
856
866
  })
857
867
  .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
858
868
 
869
+ // @ts-nocheck
870
+
859
871
  (function(undefined) {
860
872
  // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Function/prototype/bind/detect.js
861
873
  var detect = 'bind' in Function.prototype;
@@ -1020,11 +1032,20 @@
1020
1032
  * Skip link component
1021
1033
  *
1022
1034
  * @class
1023
- * @param {HTMLElement} $module - HTML element to use for skip link
1035
+ * @param {Element} $module - HTML element to use for skip link
1024
1036
  */
1025
1037
  function SkipLink ($module) {
1038
+ if (!($module instanceof HTMLAnchorElement)) {
1039
+ return this
1040
+ }
1041
+
1042
+ /** @deprecated Will be made private in v5.0 */
1026
1043
  this.$module = $module;
1044
+
1045
+ /** @deprecated Will be made private in v5.0 */
1027
1046
  this.$linkedElement = null;
1047
+
1048
+ /** @deprecated Will be made private in v5.0 */
1028
1049
  this.linkedElementListener = false;
1029
1050
  }
1030
1051
 
@@ -1032,30 +1053,31 @@
1032
1053
  * Initialise component
1033
1054
  */
1034
1055
  SkipLink.prototype.init = function () {
1035
- // Check for module
1056
+ // Check that required elements are present
1036
1057
  if (!this.$module) {
1037
1058
  return
1038
1059
  }
1039
1060
 
1040
1061
  // Check for linked element
1041
- this.$linkedElement = this.getLinkedElement();
1042
- if (!this.$linkedElement) {
1062
+ var $linkedElement = this.getLinkedElement();
1063
+ if (!$linkedElement) {
1043
1064
  return
1044
1065
  }
1045
1066
 
1067
+ this.$linkedElement = $linkedElement;
1046
1068
  this.$module.addEventListener('click', this.focusLinkedElement.bind(this));
1047
1069
  };
1048
1070
 
1049
1071
  /**
1050
1072
  * Get linked element
1051
1073
  *
1052
- * @returns {HTMLElement} $linkedElement - DOM element linked to from the skip link
1074
+ * @deprecated Will be made private in v5.0
1075
+ * @returns {HTMLElement | null} $linkedElement - DOM element linked to from the skip link
1053
1076
  */
1054
1077
  SkipLink.prototype.getLinkedElement = function () {
1055
1078
  var linkedElementId = this.getFragmentFromUrl();
1056
-
1057
1079
  if (!linkedElementId) {
1058
- return false
1080
+ return null
1059
1081
  }
1060
1082
 
1061
1083
  return document.getElementById(linkedElementId)
@@ -1065,6 +1087,8 @@
1065
1087
  * Focus the linked element
1066
1088
  *
1067
1089
  * Set tabindex and helper CSS class. Set listener to remove them on blur.
1090
+ *
1091
+ * @deprecated Will be made private in v5.0
1068
1092
  */
1069
1093
  SkipLink.prototype.focusLinkedElement = function () {
1070
1094
  var $linkedElement = this.$linkedElement;
@@ -1080,6 +1104,7 @@
1080
1104
  this.linkedElementListener = true;
1081
1105
  }
1082
1106
  }
1107
+
1083
1108
  $linkedElement.focus();
1084
1109
  };
1085
1110
 
@@ -1088,6 +1113,8 @@
1088
1113
  * focusable until it has received programmatic focus and a screen reader has announced it.
1089
1114
  *
1090
1115
  * Remove the CSS class that removes the native focus styles.
1116
+ *
1117
+ * @deprecated Will be made private in v5.0
1091
1118
  */
1092
1119
  SkipLink.prototype.removeFocusProperties = function () {
1093
1120
  this.$linkedElement.removeAttribute('tabindex');
@@ -1100,12 +1127,13 @@
1100
1127
  * Extract the fragment (everything after the hash symbol) from a URL, but not including
1101
1128
  * the symbol.
1102
1129
  *
1103
- * @returns {string} Fragment from URL, without the hash symbol
1130
+ * @deprecated Will be made private in v5.0
1131
+ * @returns {string | undefined} Fragment from URL, without the hash symbol
1104
1132
  */
1105
1133
  SkipLink.prototype.getFragmentFromUrl = function () {
1106
1134
  // Bail if the anchor link doesn't have a hash
1107
1135
  if (!this.$module.hash) {
1108
- return false
1136
+ return
1109
1137
  }
1110
1138
 
1111
1139
  return this.$module.hash.split('#').pop()