defra_ruby_template 5.11.1 → 6.6.0

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 (1367) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +187 -9
  3. data/Rakefile +123 -22
  4. data/app/views/layouts/defra_ruby_template.html.erb +108 -60
  5. data/lib/defra_ruby_template/version.rb +1 -1
  6. data/lib/defra_ruby_template.rb +12 -8
  7. data/node_modules/govuk-frontend/README.md +1 -1
  8. data/node_modules/govuk-frontend/dist/govuk/_base.import.scss +6 -0
  9. data/node_modules/govuk-frontend/dist/govuk/_base.scss +4 -4
  10. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +407 -453
  11. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js.map +1 -1
  12. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +408 -453
  13. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs.map +1 -1
  14. data/node_modules/govuk-frontend/dist/govuk/all.mjs +0 -1
  15. data/node_modules/govuk-frontend/dist/govuk/all.mjs.map +1 -1
  16. data/node_modules/govuk-frontend/dist/govuk/assets/images/favicon.ico +0 -0
  17. data/node_modules/govuk-frontend/dist/govuk/assets/images/favicon.svg +1 -1
  18. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-180.png +0 -0
  19. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-192.png +0 -0
  20. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-512.png +0 -0
  21. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-opengraph-image.png +0 -0
  22. data/node_modules/govuk-frontend/dist/govuk/common/closest-attribute-value.mjs.map +1 -1
  23. data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs +34 -3
  24. data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs.map +1 -1
  25. data/node_modules/govuk-frontend/dist/govuk/common/create-element.mjs +13 -0
  26. data/node_modules/govuk-frontend/dist/govuk/common/create-element.mjs.map +1 -0
  27. data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
  28. data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs.map +1 -1
  29. data/node_modules/govuk-frontend/dist/govuk/common/index.mjs +5 -11
  30. data/node_modules/govuk-frontend/dist/govuk/common/index.mjs.map +1 -1
  31. data/node_modules/govuk-frontend/dist/govuk/component.mjs +2 -1
  32. data/node_modules/govuk-frontend/dist/govuk/component.mjs.map +1 -1
  33. data/node_modules/govuk-frontend/dist/govuk/components/_index.import.scss +40 -0
  34. data/node_modules/govuk-frontend/dist/govuk/components/_index.scss +39 -39
  35. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.import.scss +6 -0
  36. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.import.scss +8 -0
  37. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss +3 -368
  38. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_mixin.scss +375 -0
  39. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js +101 -199
  40. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js.map +1 -1
  41. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs +101 -199
  42. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs.map +1 -1
  43. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs +64 -60
  44. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs.map +1 -1
  45. data/node_modules/govuk-frontend/dist/govuk/components/accordion/fixtures.json +102 -97
  46. data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.import.scss +6 -0
  47. data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.import.scss +8 -0
  48. data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.scss +3 -81
  49. data/node_modules/govuk-frontend/dist/govuk/components/back-link/_mixin.scss +87 -0
  50. data/node_modules/govuk-frontend/dist/govuk/components/back-link/fixtures.json +21 -32
  51. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.import.scss +6 -0
  52. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.import.scss +8 -0
  53. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss +3 -132
  54. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_mixin.scss +134 -0
  55. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/fixtures.json +25 -45
  56. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-default.html +6 -0
  57. data/node_modules/govuk-frontend/dist/govuk/components/button/_button.import.scss +6 -0
  58. data/node_modules/govuk-frontend/dist/govuk/components/button/_index.import.scss +13 -0
  59. data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss +9 -260
  60. data/node_modules/govuk-frontend/dist/govuk/components/button/_mixin.scss +233 -0
  61. data/node_modules/govuk-frontend/dist/govuk/components/button/_settings.import.scss +32 -0
  62. data/node_modules/govuk-frontend/dist/govuk/components/button/_settings.scss +34 -0
  63. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js +24 -11
  64. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js.map +1 -1
  65. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs +24 -11
  66. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs.map +1 -1
  67. data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs.map +1 -1
  68. data/node_modules/govuk-frontend/dist/govuk/components/button/fixtures.json +193 -209
  69. data/node_modules/govuk-frontend/dist/govuk/components/button/macro-options.json +12 -19
  70. data/node_modules/govuk-frontend/dist/govuk/components/button/template-default-active-state.html +3 -0
  71. data/node_modules/govuk-frontend/dist/govuk/components/button/template-default-focus-state.html +3 -0
  72. data/node_modules/govuk-frontend/dist/govuk/components/button/template-default-hover-state.html +3 -0
  73. data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse-active-state.html +3 -0
  74. data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse-disabled.html +1 -1
  75. data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse-focus-state.html +3 -0
  76. data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse-hover-state.html +3 -0
  77. data/node_modules/govuk-frontend/dist/govuk/components/button/template-secondary-active-state.html +3 -0
  78. data/node_modules/govuk-frontend/dist/govuk/components/button/template-secondary-focus-state.html +3 -0
  79. data/node_modules/govuk-frontend/dist/govuk/components/button/template-secondary-hover-state.html +3 -0
  80. data/node_modules/govuk-frontend/dist/govuk/components/button/template-warning-active-state.html +3 -0
  81. data/node_modules/govuk-frontend/dist/govuk/components/button/template-warning-focus-state.html +3 -0
  82. data/node_modules/govuk-frontend/dist/govuk/components/button/template-warning-hover-state.html +3 -0
  83. data/node_modules/govuk-frontend/dist/govuk/components/button/template.njk +20 -20
  84. data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.import.scss +6 -0
  85. data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.import.scss +12 -0
  86. data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss +7 -42
  87. data/node_modules/govuk-frontend/dist/govuk/components/character-count/_mixin.scss +41 -0
  88. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js +119 -174
  89. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js.map +1 -1
  90. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs +119 -174
  91. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs.map +1 -1
  92. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs +83 -36
  93. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs.map +1 -1
  94. data/node_modules/govuk-frontend/dist/govuk/components/character-count/fixtures.json +245 -92
  95. data/node_modules/govuk-frontend/dist/govuk/components/character-count/macro-options.json +13 -6
  96. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-characters-and-error-message.html +12 -0
  97. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-characters-and-threshold.html +9 -0
  98. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-characters-and-value.html +9 -0
  99. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-characters.html +9 -0
  100. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-length.html +9 -0
  101. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-words-and-error-message.html +12 -0
  102. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-words-and-threshold.html +9 -0
  103. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-words-and-value.html +9 -0
  104. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-words.html +9 -0
  105. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-maxwords.html +9 -0
  106. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template.njk +10 -3
  107. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.import.scss +6 -0
  108. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.import.scss +12 -0
  109. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss +7 -309
  110. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_mixin.scss +317 -0
  111. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js +22 -10
  112. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js.map +1 -1
  113. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs +22 -10
  114. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs.map +1 -1
  115. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs.map +1 -1
  116. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/fixtures.json +326 -480
  117. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/macro-options.json +1 -1
  118. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-default.html +5 -0
  119. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-conditional-reveal.html +21 -21
  120. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-divider-and-none.html +30 -30
  121. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-error.html +26 -26
  122. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-hint.html +25 -25
  123. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-long-text.html +23 -23
  124. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small.html +23 -23
  125. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-conditional-items.html +35 -35
  126. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-divider-and-none.html +30 -32
  127. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-divider-none-and-conditional-items.html +40 -42
  128. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-error-message.html +32 -23
  129. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-hint.html +30 -0
  130. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-hints-on-items.html +21 -23
  131. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-legend-as-a-page-heading.html +27 -27
  132. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-optional-form-group-classes-showing-group-error.html +36 -36
  133. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-pre-checked-values.html +25 -16
  134. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-very-long-option-text.html +27 -30
  135. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template.njk +1 -1
  136. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.import.scss +6 -0
  137. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.import.scss +9 -0
  138. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss +4 -56
  139. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_mixin.scss +62 -0
  140. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/fixtures.json +82 -82
  141. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/template-default.html +2 -2
  142. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/template-with-html.html +2 -2
  143. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.import.scss +6 -0
  144. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.import.scss +13 -0
  145. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss +8 -26
  146. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_mixin.scss +29 -0
  147. data/node_modules/govuk-frontend/dist/govuk/components/date-input/fixtures.json +780 -150
  148. data/node_modules/govuk-frontend/dist/govuk/components/date-input/macro-options.json +50 -0
  149. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-day-and-month-using-items.html +28 -0
  150. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-default.html +30 -22
  151. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-month-and-year-using-items.html +28 -0
  152. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-error-message-and-hint-using-items.html +39 -0
  153. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-error-message-and-hint.html +39 -0
  154. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-error-on-day-input-using-items.html +39 -0
  155. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-error-on-day-input.html +3 -3
  156. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-error-on-month-input-using-items.html +39 -0
  157. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-error-on-month-input.html +3 -3
  158. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-error-on-year-input-using-items.html +39 -0
  159. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-error-on-year-input.html +3 -3
  160. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-errors-only-using-classes.html +33 -0
  161. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-errors-only-using-items-and-classes.html +33 -0
  162. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-errors-only-using-items.html +33 -0
  163. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-errors-only.html +5 -8
  164. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-translations.html +36 -0
  165. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-values-and-name-prefix.html +36 -0
  166. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-values-name-prefix-and-custom-names.html +36 -0
  167. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-values.html +36 -0
  168. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template.njk +84 -29
  169. data/node_modules/govuk-frontend/dist/govuk/components/details/_details.import.scss +6 -0
  170. data/node_modules/govuk-frontend/dist/govuk/components/details/_index.import.scss +8 -0
  171. data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss +3 -137
  172. data/node_modules/govuk-frontend/dist/govuk/components/details/_mixin.scss +143 -0
  173. data/node_modules/govuk-frontend/dist/govuk/components/details/fixtures.json +22 -22
  174. data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.import.scss +6 -0
  175. data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.import.scss +8 -0
  176. data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.scss +3 -12
  177. data/node_modules/govuk-frontend/dist/govuk/components/error-message/_mixin.scss +16 -0
  178. data/node_modules/govuk-frontend/dist/govuk/components/error-message/fixtures.json +10 -10
  179. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_error-summary.import.scss +6 -0
  180. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.import.scss +8 -0
  181. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss +3 -53
  182. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_mixin.scss +58 -0
  183. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js +25 -18
  184. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js.map +1 -1
  185. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs +25 -18
  186. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs.map +1 -1
  187. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs +2 -2
  188. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs.map +1 -1
  189. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/fixtures.json +21 -21
  190. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.import.scss +6 -0
  191. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.import.scss +9 -0
  192. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss +4 -89
  193. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_mixin.scss +96 -0
  194. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js +53 -151
  195. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js.map +1 -1
  196. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs +53 -151
  197. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs.map +1 -1
  198. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs +16 -12
  199. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs.map +1 -1
  200. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/fixtures.json +19 -19
  201. data/node_modules/govuk-frontend/dist/govuk/components/feedback/README.md +15 -0
  202. data/node_modules/govuk-frontend/dist/govuk/components/feedback/_feedback.import.scss +6 -0
  203. data/node_modules/govuk-frontend/dist/govuk/components/feedback/_index.import.scss +8 -0
  204. data/node_modules/govuk-frontend/dist/govuk/components/feedback/_index.scss +5 -0
  205. data/node_modules/govuk-frontend/dist/govuk/components/feedback/_mixin.scss +48 -0
  206. data/node_modules/govuk-frontend/dist/govuk/components/feedback/fixtures.json +95 -0
  207. data/node_modules/govuk-frontend/dist/govuk/components/feedback/macro-options.json +50 -0
  208. data/node_modules/govuk-frontend/dist/govuk/components/feedback/macro.njk +3 -0
  209. data/node_modules/govuk-frontend/dist/govuk/components/feedback/template-default.html +12 -0
  210. data/node_modules/govuk-frontend/dist/govuk/components/feedback/template-silly-example.html +19 -0
  211. data/node_modules/govuk-frontend/dist/govuk/components/feedback/template.njk +24 -0
  212. data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.import.scss +6 -0
  213. data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.import.scss +8 -0
  214. data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss +3 -67
  215. data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_mixin.scss +71 -0
  216. data/node_modules/govuk-frontend/dist/govuk/components/fieldset/fixtures.json +19 -19
  217. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.import.scss +6 -0
  218. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.import.scss +11 -0
  219. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss +6 -216
  220. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_mixin.scss +217 -0
  221. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js +123 -187
  222. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js.map +1 -1
  223. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs +123 -187
  224. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs.map +1 -1
  225. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs +86 -49
  226. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs.map +1 -1
  227. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/fixtures.json +125 -138
  228. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/macro-options.json +15 -10
  229. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced-custom-wrapper-classes-and-attributes.html +11 -0
  230. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced-multiple-files.html +11 -0
  231. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced-with-error-message-and-hint.html +3 -2
  232. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced.html +3 -2
  233. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-translated.html +3 -2
  234. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template.njk +2 -2
  235. data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.import.scss +6 -0
  236. data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.import.scss +8 -0
  237. data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss +3 -192
  238. data/node_modules/govuk-frontend/dist/govuk/components/footer/_mixin.scss +205 -0
  239. data/node_modules/govuk-frontend/dist/govuk/components/footer/fixtures.json +129 -81
  240. data/node_modules/govuk-frontend/dist/govuk/components/footer/macro-options.json +1 -7
  241. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-default.html +45 -24
  242. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-full-gds-example.html +45 -24
  243. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-three-equal-columns.html +45 -24
  244. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-custom-html-content-licence-and-copyright-notice.html +40 -19
  245. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-custom-meta.html +45 -24
  246. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-custom-text-content-licence-and-copyright-notice.html +40 -19
  247. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-default-width-navigation-one-column.html +45 -24
  248. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-default-width-navigation-two-columns.html +45 -24
  249. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-meta-links-and-meta-content.html +45 -24
  250. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-navigation.html +45 -24
  251. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-no-content-licence.html +37 -0
  252. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-only-custom-meta.html +41 -0
  253. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-only-meta-links.html +80 -0
  254. data/node_modules/govuk-frontend/dist/govuk/components/footer/template.njk +36 -39
  255. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/README.md +15 -0
  256. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_generic-header.import.scss +6 -0
  257. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_index.import.scss +8 -0
  258. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_index.scss +5 -0
  259. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_mixin.scss +140 -0
  260. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/fixtures.json +90 -0
  261. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/macro-options.json +38 -0
  262. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/macro.njk +3 -0
  263. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/template-default.html +11 -0
  264. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/template-full-width.html +20 -0
  265. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/template-with-image-logo.html +20 -0
  266. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/template-with-text-and-image-logo.html +20 -0
  267. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/template.njk +14 -0
  268. data/node_modules/govuk-frontend/dist/govuk/components/header/README.md +1 -1
  269. data/node_modules/govuk-frontend/dist/govuk/components/header/_header.import.scss +6 -0
  270. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.import.scss +8 -0
  271. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +3 -546
  272. data/node_modules/govuk-frontend/dist/govuk/components/header/_mixin.scss +119 -0
  273. data/node_modules/govuk-frontend/dist/govuk/components/header/fixtures.json +15 -492
  274. data/node_modules/govuk-frontend/dist/govuk/components/header/macro-options.json +2 -101
  275. data/node_modules/govuk-frontend/dist/govuk/components/header/template-default.html +12 -7
  276. data/node_modules/govuk-frontend/dist/govuk/components/header/template-full-width.html +12 -8
  277. data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-product-name.html +11 -7
  278. data/node_modules/govuk-frontend/dist/govuk/components/header/template.njk +20 -63
  279. data/node_modules/govuk-frontend/dist/govuk/components/hint/_hint.import.scss +6 -0
  280. data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.import.scss +8 -0
  281. data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.scss +3 -43
  282. data/node_modules/govuk-frontend/dist/govuk/components/hint/_mixin.scss +47 -0
  283. data/node_modules/govuk-frontend/dist/govuk/components/hint/fixtures.json +7 -7
  284. data/node_modules/govuk-frontend/dist/govuk/components/input/_index.import.scss +11 -0
  285. data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss +6 -166
  286. data/node_modules/govuk-frontend/dist/govuk/components/input/_input.import.scss +6 -0
  287. data/node_modules/govuk-frontend/dist/govuk/components/input/_mixin.scss +161 -0
  288. data/node_modules/govuk-frontend/dist/govuk/components/input/fixtures.json +161 -180
  289. data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-extra-letter-spacing.html +1 -1
  290. data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.import.scss +8 -0
  291. data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.scss +3 -24
  292. data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.import.scss +6 -0
  293. data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_mixin.scss +31 -0
  294. data/node_modules/govuk-frontend/dist/govuk/components/inset-text/fixtures.json +7 -7
  295. data/node_modules/govuk-frontend/dist/govuk/components/label/_index.import.scss +8 -0
  296. data/node_modules/govuk-frontend/dist/govuk/components/label/_index.scss +3 -44
  297. data/node_modules/govuk-frontend/dist/govuk/components/label/_label.import.scss +6 -0
  298. data/node_modules/govuk-frontend/dist/govuk/components/label/_mixin.scss +48 -0
  299. data/node_modules/govuk-frontend/dist/govuk/components/label/fixtures.json +20 -20
  300. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/README.md +15 -0
  301. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_index.import.scss +8 -0
  302. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_index.scss +6 -0
  303. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_language-navigation.import.scss +6 -0
  304. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_mixin.scss +68 -0
  305. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/fixtures.json +482 -0
  306. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/macro-options.json +88 -0
  307. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/macro.njk +3 -0
  308. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-default.html +12 -0
  309. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-inverse.html +12 -0
  310. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-language-description.html +12 -0
  311. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-large-amount-of-multiple-languages.html +99 -0
  312. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-mixed-text-directions.html +12 -0
  313. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-multiple-languages.html +24 -0
  314. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-translated-navigation-label.html +12 -0
  315. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template.njk +33 -0
  316. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.import.scss +8 -0
  317. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss +3 -91
  318. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_mixin.scss +100 -0
  319. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.import.scss +6 -0
  320. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/fixtures.json +74 -108
  321. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js +24 -11
  322. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js.map +1 -1
  323. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs +24 -11
  324. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs.map +1 -1
  325. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs.map +1 -1
  326. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-with-text-as-html.html +7 -1
  327. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.import.scss +8 -0
  328. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +3 -226
  329. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_mixin.scss +235 -0
  330. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.import.scss +6 -0
  331. data/node_modules/govuk-frontend/dist/govuk/components/pagination/fixtures.json +109 -105
  332. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-default.html +3 -3
  333. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-first-page.html +3 -3
  334. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-last-page.html +3 -3
  335. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-custom-link-and-item-text.html +3 -3
  336. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-many-pages.html +9 -9
  337. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template.njk +4 -2
  338. data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.import.scss +8 -0
  339. data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +3 -56
  340. data/node_modules/govuk-frontend/dist/govuk/components/panel/_mixin.scss +94 -0
  341. data/node_modules/govuk-frontend/dist/govuk/components/panel/_panel.import.scss +6 -0
  342. data/node_modules/govuk-frontend/dist/govuk/components/panel/fixtures.json +251 -16
  343. data/node_modules/govuk-frontend/dist/govuk/components/panel/macro-options.json +58 -0
  344. data/node_modules/govuk-frontend/dist/govuk/components/panel/template-default.html +1 -1
  345. data/node_modules/govuk-frontend/dist/govuk/components/panel/template-interruption-with-content-with-long-line-length.html +17 -0
  346. data/node_modules/govuk-frontend/dist/govuk/components/panel/template-interruption-with-headings-content-and-lists.html +23 -0
  347. data/node_modules/govuk-frontend/dist/govuk/components/panel/template-interruption.html +14 -0
  348. data/node_modules/govuk-frontend/dist/govuk/components/panel/template.njk +42 -2
  349. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.import.scss +10 -0
  350. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +5 -54
  351. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_mixin.scss +56 -0
  352. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_password-input.import.scss +6 -0
  353. data/node_modules/govuk-frontend/dist/govuk/components/password-input/fixtures.json +53 -48
  354. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js +42 -142
  355. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js.map +1 -1
  356. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs +42 -142
  357. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs.map +1 -1
  358. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs +5 -3
  359. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs.map +1 -1
  360. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.import.scss +9 -0
  361. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss +4 -33
  362. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_mixin.scss +42 -0
  363. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.import.scss +6 -0
  364. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/fixtures.json +15 -15
  365. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/template-default.html +1 -1
  366. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/template.njk +1 -1
  367. data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.import.scss +12 -0
  368. data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +7 -325
  369. data/node_modules/govuk-frontend/dist/govuk/components/radios/_mixin.scss +336 -0
  370. data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.import.scss +6 -0
  371. data/node_modules/govuk-frontend/dist/govuk/components/radios/fixtures.json +244 -354
  372. data/node_modules/govuk-frontend/dist/govuk/components/radios/macro-options.json +3 -3
  373. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js +22 -10
  374. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js.map +1 -1
  375. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs +22 -10
  376. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs.map +1 -1
  377. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs.map +1 -1
  378. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-default.html +5 -3
  379. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-inline.html +19 -19
  380. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-inline.html +23 -23
  381. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-a-divider.html +24 -24
  382. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-conditional-reveal.html +27 -27
  383. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-error.html +26 -26
  384. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-hint.html +25 -25
  385. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-long-text.html +23 -23
  386. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small.html +23 -23
  387. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-a-divider.html +24 -24
  388. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-conditional-item-checked.html +35 -35
  389. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-conditional-items-and-pre-checked-value.html +35 -35
  390. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-conditional-items.html +35 -35
  391. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-fieldset-and-error-message.html +20 -20
  392. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-hint.html +24 -0
  393. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-hints-on-items.html +23 -23
  394. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-legend-as-page-heading.html +21 -21
  395. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-optional-form-group-classes-showing-group-error.html +36 -36
  396. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-very-long-option-text.html +28 -28
  397. data/node_modules/govuk-frontend/dist/govuk/components/radios/template.njk +1 -1
  398. data/node_modules/govuk-frontend/dist/govuk/components/select/_index.import.scss +11 -0
  399. data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss +6 -56
  400. data/node_modules/govuk-frontend/dist/govuk/components/select/_mixin.scss +45 -0
  401. data/node_modules/govuk-frontend/dist/govuk/components/select/_select.import.scss +6 -0
  402. data/node_modules/govuk-frontend/dist/govuk/components/select/fixtures.json +99 -115
  403. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.import.scss +8 -0
  404. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +3 -185
  405. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_mixin.scss +283 -0
  406. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.import.scss +6 -0
  407. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/fixtures.json +331 -69
  408. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/macro-options.json +26 -0
  409. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js +53 -13
  410. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js.map +1 -1
  411. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs +53 -13
  412. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs.map +1 -1
  413. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs +30 -2
  414. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs.map +1 -1
  415. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-default.html +1 -1
  416. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-inverse-with-language-navigation.html +72 -0
  417. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-inverse.html +63 -0
  418. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-a-single-navigation-item-and-collapsenavigationonmobile-set-to-true.html +38 -0
  419. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-a-single-navigation-item.html +35 -0
  420. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-collapsenavigationonmobile-set-to-false.html +60 -0
  421. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-html-navigation-items.html +1 -1
  422. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-inline-end-slot.html +33 -0
  423. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-language-navigation.html +62 -0
  424. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-large-navigation.html +1 -1
  425. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-navigation-with-a-current-item.html +1 -1
  426. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-non-link-navigation-items.html +1 -1
  427. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-right-aligned-language-navigation.html +62 -0
  428. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-name-and-navigation.html +1 -1
  429. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template.njk +12 -4
  430. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.import.scss +8 -0
  431. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss +3 -50
  432. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_mixin.scss +60 -0
  433. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.import.scss +6 -0
  434. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/fixtures.json +10 -10
  435. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js +26 -25
  436. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js.map +1 -1
  437. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs +26 -25
  438. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs.map +1 -1
  439. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs +5 -10
  440. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs.map +1 -1
  441. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.import.scss +8 -0
  442. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss +3 -267
  443. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_mixin.scss +286 -0
  444. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_summary-list.import.scss +6 -0
  445. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/fixtures.json +282 -518
  446. data/node_modules/govuk-frontend/dist/govuk/components/table/_index.import.scss +8 -0
  447. data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss +3 -73
  448. data/node_modules/govuk-frontend/dist/govuk/components/table/_mixin.scss +77 -0
  449. data/node_modules/govuk-frontend/dist/govuk/components/table/_table.import.scss +6 -0
  450. data/node_modules/govuk-frontend/dist/govuk/components/table/fixtures.json +75 -75
  451. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.import.scss +8 -0
  452. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss +3 -132
  453. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_mixin.scss +140 -0
  454. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_tabs.import.scss +6 -0
  455. data/node_modules/govuk-frontend/dist/govuk/components/tabs/fixtures.json +44 -39
  456. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js +25 -19
  457. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js.map +1 -1
  458. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs +25 -19
  459. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs.map +1 -1
  460. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs +3 -3
  461. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs.map +1 -1
  462. data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.import.scss +8 -0
  463. data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss +3 -94
  464. data/node_modules/govuk-frontend/dist/govuk/components/tag/_mixin.scss +135 -0
  465. data/node_modules/govuk-frontend/dist/govuk/components/tag/_tag.import.scss +6 -0
  466. data/node_modules/govuk-frontend/dist/govuk/components/tag/fixtures.json +19 -43
  467. data/node_modules/govuk-frontend/dist/govuk/components/tag/template-pink.html +2 -2
  468. data/node_modules/govuk-frontend/dist/govuk/components/tag/template-turquoise.html +2 -2
  469. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.import.scss +9 -0
  470. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss +4 -76
  471. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_mixin.scss +83 -0
  472. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_task-list.import.scss +6 -0
  473. data/node_modules/govuk-frontend/dist/govuk/components/task-list/fixtures.json +35 -58
  474. data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-forced-hover-state.html +37 -0
  475. data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-with-all-possible-colours.html +131 -0
  476. data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-with-hint-text-and-additional-states.html +77 -0
  477. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.import.scss +11 -0
  478. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss +6 -47
  479. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_mixin.scss +43 -0
  480. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.import.scss +6 -0
  481. data/node_modules/govuk-frontend/dist/govuk/components/textarea/fixtures.json +81 -81
  482. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.import.scss +8 -0
  483. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +3 -64
  484. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_mixin.scss +69 -0
  485. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_warning-text.import.scss +6 -0
  486. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/fixtures.json +9 -9
  487. data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.import.scss +10 -0
  488. data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.mixin.scss +19 -0
  489. data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.scss +5 -18
  490. data/node_modules/govuk-frontend/dist/govuk/core/_index.import.scss +6 -0
  491. data/node_modules/govuk-frontend/dist/govuk/core/_index.scss +6 -7
  492. data/node_modules/govuk-frontend/dist/govuk/core/_links.import.scss +10 -0
  493. data/node_modules/govuk-frontend/dist/govuk/core/_links.mixin.scss +44 -0
  494. data/node_modules/govuk-frontend/dist/govuk/core/_links.scss +3 -40
  495. data/node_modules/govuk-frontend/dist/govuk/core/_lists.import.scss +14 -0
  496. data/node_modules/govuk-frontend/dist/govuk/core/_lists.mixin.scss +74 -0
  497. data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss +6 -64
  498. data/node_modules/govuk-frontend/dist/govuk/core/_section-break.import.scss +8 -0
  499. data/node_modules/govuk-frontend/dist/govuk/core/_section-break.mixin.scss +54 -0
  500. data/node_modules/govuk-frontend/dist/govuk/core/_section-break.scss +3 -49
  501. data/node_modules/govuk-frontend/dist/govuk/core/_typography.import.scss +8 -0
  502. data/node_modules/govuk-frontend/dist/govuk/core/_typography.mixin.scss +173 -0
  503. data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss +3 -187
  504. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_breakpoints.import.scss +8 -0
  505. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_breakpoints.mixin.scss +15 -0
  506. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_breakpoints.scss +4 -0
  507. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.import.scss +8 -0
  508. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.mixin.scss +13 -0
  509. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.scss +4 -0
  510. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.import.scss +8 -0
  511. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.mixin.scss +22 -0
  512. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.scss +4 -0
  513. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_index.import.scss +4 -0
  514. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_index.scss +4 -0
  515. data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs +12 -7
  516. data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs.map +1 -1
  517. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css +2 -2
  518. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css.map +1 -1
  519. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
  520. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js.map +1 -1
  521. data/node_modules/govuk-frontend/dist/govuk/helpers/_clearfix.import.scss +2 -0
  522. data/node_modules/govuk-frontend/dist/govuk/helpers/_clearfix.scss +0 -1
  523. data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.import.scss +2 -0
  524. data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss +190 -89
  525. data/node_modules/govuk-frontend/dist/govuk/helpers/_device-pixels.import.scss +2 -0
  526. data/node_modules/govuk-frontend/dist/govuk/helpers/_device-pixels.scss +2 -1
  527. data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.import.scss +2 -0
  528. data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss +44 -7
  529. data/node_modules/govuk-frontend/dist/govuk/helpers/_font-faces--internal.scss +41 -0
  530. data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.import.scss +2 -0
  531. data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss +7 -4
  532. data/node_modules/govuk-frontend/dist/govuk/helpers/_index.import.scss +2 -0
  533. data/node_modules/govuk-frontend/dist/govuk/helpers/_index.scss +12 -13
  534. data/node_modules/govuk-frontend/dist/govuk/helpers/_links.import.scss +2 -0
  535. data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +35 -46
  536. data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.import.scss +2 -0
  537. data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss +174 -34
  538. data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.import.scss +2 -0
  539. data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss +2 -3
  540. data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing--internal.scss +80 -0
  541. data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.import.scss +2 -0
  542. data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss +27 -82
  543. data/node_modules/govuk-frontend/dist/govuk/helpers/_typography--internal.scss +24 -0
  544. data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.import.scss +2 -0
  545. data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +55 -74
  546. data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.import.scss +2 -0
  547. data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss +17 -13
  548. data/node_modules/govuk-frontend/dist/govuk/helpers/_width-container.import.scss +2 -0
  549. data/node_modules/govuk-frontend/dist/govuk/helpers/_width-container.scss +73 -0
  550. data/node_modules/govuk-frontend/dist/govuk/i18n.mjs +5 -128
  551. data/node_modules/govuk-frontend/dist/govuk/i18n.mjs.map +1 -1
  552. data/node_modules/govuk-frontend/dist/govuk/index.import.scss +10 -0
  553. data/node_modules/govuk-frontend/dist/govuk/index.scss +6 -7
  554. data/node_modules/govuk-frontend/dist/govuk/init.mjs +61 -53
  555. data/node_modules/govuk-frontend/dist/govuk/init.mjs.map +1 -1
  556. data/node_modules/govuk-frontend/dist/govuk/macros/attributes.njk +30 -14
  557. data/node_modules/govuk-frontend/dist/govuk/macros/logo.njk +7 -29
  558. data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.import.scss +8 -0
  559. data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.mixin.scss +80 -0
  560. data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.scss +3 -78
  561. data/node_modules/govuk-frontend/dist/govuk/objects/_form-group.import.scss +8 -0
  562. data/node_modules/govuk-frontend/dist/govuk/objects/_form-group.mixin.scss +26 -0
  563. data/node_modules/govuk-frontend/dist/govuk/objects/_form-group.scss +3 -23
  564. data/node_modules/govuk-frontend/dist/govuk/objects/_grid.import.scss +8 -0
  565. data/node_modules/govuk-frontend/dist/govuk/objects/_grid.mixin.scss +28 -0
  566. data/node_modules/govuk-frontend/dist/govuk/objects/_grid.scss +3 -24
  567. data/node_modules/govuk-frontend/dist/govuk/objects/_index.import.scss +7 -0
  568. data/node_modules/govuk-frontend/dist/govuk/objects/_index.scss +6 -7
  569. data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.import.scss +8 -0
  570. data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.mixin.scss +55 -0
  571. data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.scss +3 -53
  572. data/node_modules/govuk-frontend/dist/govuk/objects/_template.import.scss +8 -0
  573. data/node_modules/govuk-frontend/dist/govuk/objects/_template.mixin.scss +53 -0
  574. data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss +3 -55
  575. data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.import.scss +8 -0
  576. data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.mixin.scss +9 -0
  577. data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss +3 -75
  578. data/node_modules/govuk-frontend/dist/govuk/overrides/_display.import.scss +8 -0
  579. data/node_modules/govuk-frontend/dist/govuk/overrides/_display.mixin.scss +26 -0
  580. data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss +2 -24
  581. data/node_modules/govuk-frontend/dist/govuk/overrides/_index.import.scss +6 -0
  582. data/node_modules/govuk-frontend/dist/govuk/overrides/_index.scss +5 -6
  583. data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.import.scss +8 -0
  584. data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.mixin.scss +89 -0
  585. data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.scss +2 -84
  586. data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.import.scss +8 -0
  587. data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.mixin.scss +16 -0
  588. data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.scss +2 -14
  589. data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.import.scss +8 -0
  590. data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.mixin.scss +43 -0
  591. data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss +2 -40
  592. data/node_modules/govuk-frontend/dist/govuk/overrides/_width.import.scss +8 -0
  593. data/node_modules/govuk-frontend/dist/govuk/overrides/_width.mixin.scss +50 -0
  594. data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss +2 -46
  595. data/node_modules/govuk-frontend/dist/govuk/settings/_assets.import.scss +13 -0
  596. data/node_modules/govuk-frontend/dist/govuk/settings/_assets.scss +50 -21
  597. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.import.scss +13 -0
  598. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.import.scss +2 -0
  599. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.scss +168 -0
  600. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-legacy-functional.import.scss +2 -0
  601. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-legacy-functional.scss +188 -0
  602. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.import.scss +2 -0
  603. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +23 -274
  604. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-palette--internal.scss +128 -0
  605. data/node_modules/govuk-frontend/dist/govuk/settings/_custom-properties.import.scss +2 -0
  606. data/node_modules/govuk-frontend/dist/govuk/settings/_custom-properties.scss +17 -0
  607. data/node_modules/govuk-frontend/dist/govuk/settings/_global-styles.import.scss +2 -0
  608. data/node_modules/govuk-frontend/dist/govuk/settings/_global-styles.scss +0 -1
  609. data/node_modules/govuk-frontend/dist/govuk/settings/_index.import.scss +24 -0
  610. data/node_modules/govuk-frontend/dist/govuk/settings/_index.scss +14 -13
  611. data/node_modules/govuk-frontend/dist/govuk/settings/_links.import.scss +2 -0
  612. data/node_modules/govuk-frontend/dist/govuk/settings/_links.scss +3 -3
  613. data/node_modules/govuk-frontend/dist/govuk/settings/_measurements.import.scss +2 -0
  614. data/node_modules/govuk-frontend/dist/govuk/settings/_measurements.scss +8 -17
  615. data/node_modules/govuk-frontend/dist/govuk/settings/_media-queries.import.scss +2 -0
  616. data/node_modules/govuk-frontend/dist/govuk/settings/_media-queries.scss +0 -10
  617. data/node_modules/govuk-frontend/dist/govuk/settings/_spacing.import.scss +2 -0
  618. data/node_modules/govuk-frontend/dist/govuk/settings/_spacing.scss +0 -1
  619. data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.import.scss +2 -0
  620. data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.scss +3 -2
  621. data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.import.scss +2 -0
  622. data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss +12 -190
  623. data/node_modules/govuk-frontend/dist/govuk/settings/_warnings--internal.scss +69 -0
  624. data/node_modules/govuk-frontend/dist/govuk/settings/_warnings.import.scss +2 -0
  625. data/node_modules/govuk-frontend/dist/govuk/settings/_warnings.scss +9 -56
  626. data/node_modules/govuk-frontend/dist/govuk/template.njk +61 -23
  627. data/node_modules/govuk-frontend/dist/govuk/tools/_exports.import.scss +2 -0
  628. data/node_modules/govuk-frontend/dist/govuk/tools/_exports.scss +12 -6
  629. data/node_modules/govuk-frontend/dist/govuk/tools/_font-url.import.scss +31 -0
  630. data/node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss +22 -6
  631. data/node_modules/govuk-frontend/dist/govuk/tools/_if.import.scss +2 -0
  632. data/node_modules/govuk-frontend/dist/govuk/tools/_if.scss +23 -0
  633. data/node_modules/govuk-frontend/dist/govuk/tools/_image-url.import.scss +31 -0
  634. data/node_modules/govuk-frontend/dist/govuk/tools/_image-url.scss +22 -6
  635. data/node_modules/govuk-frontend/dist/govuk/tools/_index.import.scss +2 -0
  636. data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss +6 -7
  637. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.import.scss +2 -0
  638. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.scss +9 -6
  639. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.import.scss +2 -0
  640. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss +6 -3
  641. data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.import.scss +8 -0
  642. data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.mixin.scss +10 -0
  643. data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.scss +3 -6
  644. data/node_modules/govuk-frontend/dist/govuk/utilities/_index.import.scss +3 -0
  645. data/node_modules/govuk-frontend/dist/govuk/utilities/_index.scss +2 -3
  646. data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.import.scss +8 -0
  647. data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.mixin.scss +14 -0
  648. data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.scss +2 -9
  649. data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.scss +4 -3
  650. data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +13 -4
  651. data/node_modules/govuk-frontend/package.json +29 -22
  652. data/vendor/assets/assets/images/favicon.ico +0 -0
  653. data/vendor/assets/assets/images/favicon.svg +1 -1
  654. data/vendor/assets/assets/images/govuk-icon-180.png +0 -0
  655. data/vendor/assets/assets/images/govuk-icon-192.png +0 -0
  656. data/vendor/assets/assets/images/govuk-icon-512.png +0 -0
  657. data/vendor/assets/assets/images/govuk-opengraph-image.png +0 -0
  658. data/vendor/assets/assets/manifest.json.erb +39 -0
  659. data/vendor/assets/images/favicon.ico +0 -0
  660. data/vendor/assets/images/favicon.svg +1 -1
  661. data/vendor/assets/images/govuk-icon-180.png +0 -0
  662. data/vendor/assets/images/govuk-icon-192.png +0 -0
  663. data/vendor/assets/images/govuk-icon-512.png +0 -0
  664. data/vendor/assets/images/govuk-opengraph-image.png +0 -0
  665. data/vendor/assets/javascripts/defra_ruby_template.js +407 -453
  666. data/vendor/assets/javascripts/defra_ruby_template_supported.js +4 -0
  667. data/vendor/assets/stylesheets/_base.import.scss +6 -0
  668. data/vendor/assets/stylesheets/_base.scss +4 -4
  669. data/vendor/assets/stylesheets/components/_index.import.scss +40 -0
  670. data/vendor/assets/stylesheets/components/_index.scss +39 -39
  671. data/vendor/assets/stylesheets/components/accordion/_accordion.import.scss +6 -0
  672. data/vendor/assets/stylesheets/components/accordion/_index.import.scss +8 -0
  673. data/vendor/assets/stylesheets/components/accordion/_index.scss +3 -368
  674. data/vendor/assets/stylesheets/components/accordion/_mixin.scss +375 -0
  675. data/vendor/assets/stylesheets/components/back-link/_back-link.import.scss +6 -0
  676. data/vendor/assets/stylesheets/components/back-link/_index.import.scss +8 -0
  677. data/vendor/assets/stylesheets/components/back-link/_index.scss +3 -81
  678. data/vendor/assets/stylesheets/components/back-link/_mixin.scss +87 -0
  679. data/vendor/assets/stylesheets/components/breadcrumbs/_breadcrumbs.import.scss +6 -0
  680. data/vendor/assets/stylesheets/components/breadcrumbs/_index.import.scss +8 -0
  681. data/vendor/assets/stylesheets/components/breadcrumbs/_index.scss +3 -132
  682. data/vendor/assets/stylesheets/components/breadcrumbs/_mixin.scss +134 -0
  683. data/vendor/assets/stylesheets/components/button/_button.import.scss +6 -0
  684. data/vendor/assets/stylesheets/components/button/_index.import.scss +13 -0
  685. data/vendor/assets/stylesheets/components/button/_index.scss +9 -260
  686. data/vendor/assets/stylesheets/components/button/_mixin.scss +233 -0
  687. data/vendor/assets/stylesheets/components/button/_settings.import.scss +32 -0
  688. data/vendor/assets/stylesheets/components/button/_settings.scss +34 -0
  689. data/vendor/assets/stylesheets/components/character-count/_character-count.import.scss +6 -0
  690. data/vendor/assets/stylesheets/components/character-count/_index.import.scss +12 -0
  691. data/vendor/assets/stylesheets/components/character-count/_index.scss +7 -42
  692. data/vendor/assets/stylesheets/components/character-count/_mixin.scss +41 -0
  693. data/vendor/assets/stylesheets/components/checkboxes/_checkboxes.import.scss +6 -0
  694. data/vendor/assets/stylesheets/components/checkboxes/_index.import.scss +12 -0
  695. data/vendor/assets/stylesheets/components/checkboxes/_index.scss +7 -309
  696. data/vendor/assets/stylesheets/components/checkboxes/_mixin.scss +317 -0
  697. data/vendor/assets/stylesheets/components/cookie-banner/_cookie-banner.import.scss +6 -0
  698. data/vendor/assets/stylesheets/components/cookie-banner/_index.import.scss +9 -0
  699. data/vendor/assets/stylesheets/components/cookie-banner/_index.scss +4 -56
  700. data/vendor/assets/stylesheets/components/cookie-banner/_mixin.scss +62 -0
  701. data/vendor/assets/stylesheets/components/date-input/_date-input.import.scss +6 -0
  702. data/vendor/assets/stylesheets/components/date-input/_index.import.scss +13 -0
  703. data/vendor/assets/stylesheets/components/date-input/_index.scss +8 -26
  704. data/vendor/assets/stylesheets/components/date-input/_mixin.scss +29 -0
  705. data/vendor/assets/stylesheets/components/details/_details.import.scss +6 -0
  706. data/vendor/assets/stylesheets/components/details/_index.import.scss +8 -0
  707. data/vendor/assets/stylesheets/components/details/_index.scss +3 -137
  708. data/vendor/assets/stylesheets/components/details/_mixin.scss +143 -0
  709. data/vendor/assets/stylesheets/components/error-message/_error-message.import.scss +6 -0
  710. data/vendor/assets/stylesheets/components/error-message/_index.import.scss +8 -0
  711. data/vendor/assets/stylesheets/components/error-message/_index.scss +3 -12
  712. data/vendor/assets/stylesheets/components/error-message/_mixin.scss +16 -0
  713. data/vendor/assets/stylesheets/components/error-summary/_error-summary.import.scss +6 -0
  714. data/vendor/assets/stylesheets/components/error-summary/_index.import.scss +8 -0
  715. data/vendor/assets/stylesheets/components/error-summary/_index.scss +3 -53
  716. data/vendor/assets/stylesheets/components/error-summary/_mixin.scss +58 -0
  717. data/vendor/assets/stylesheets/components/exit-this-page/_exit-this-page.import.scss +6 -0
  718. data/vendor/assets/stylesheets/components/exit-this-page/_index.import.scss +9 -0
  719. data/vendor/assets/stylesheets/components/exit-this-page/_index.scss +4 -89
  720. data/vendor/assets/stylesheets/components/exit-this-page/_mixin.scss +96 -0
  721. data/vendor/assets/stylesheets/components/feedback/_feedback.import.scss +6 -0
  722. data/vendor/assets/stylesheets/components/feedback/_index.import.scss +8 -0
  723. data/vendor/assets/stylesheets/components/feedback/_index.scss +5 -0
  724. data/vendor/assets/stylesheets/components/feedback/_mixin.scss +48 -0
  725. data/vendor/assets/stylesheets/components/fieldset/_fieldset.import.scss +6 -0
  726. data/vendor/assets/stylesheets/components/fieldset/_index.import.scss +8 -0
  727. data/vendor/assets/stylesheets/components/fieldset/_index.scss +3 -67
  728. data/vendor/assets/stylesheets/components/fieldset/_mixin.scss +71 -0
  729. data/vendor/assets/stylesheets/components/file-upload/_file-upload.import.scss +6 -0
  730. data/vendor/assets/stylesheets/components/file-upload/_index.import.scss +11 -0
  731. data/vendor/assets/stylesheets/components/file-upload/_index.scss +6 -216
  732. data/vendor/assets/stylesheets/components/file-upload/_mixin.scss +217 -0
  733. data/vendor/assets/stylesheets/components/footer/_footer.import.scss +6 -0
  734. data/vendor/assets/stylesheets/components/footer/_index.import.scss +8 -0
  735. data/vendor/assets/stylesheets/components/footer/_index.scss +3 -192
  736. data/vendor/assets/stylesheets/components/footer/_mixin.scss +205 -0
  737. data/vendor/assets/stylesheets/components/generic-header/_generic-header.import.scss +6 -0
  738. data/vendor/assets/stylesheets/components/generic-header/_index.import.scss +8 -0
  739. data/vendor/assets/stylesheets/components/generic-header/_index.scss +5 -0
  740. data/vendor/assets/stylesheets/components/generic-header/_mixin.scss +140 -0
  741. data/vendor/assets/stylesheets/components/header/_header.import.scss +6 -0
  742. data/vendor/assets/stylesheets/components/header/_index.import.scss +8 -0
  743. data/vendor/assets/stylesheets/components/header/_index.scss +3 -546
  744. data/vendor/assets/stylesheets/components/header/_mixin.scss +119 -0
  745. data/vendor/assets/stylesheets/components/hint/_hint.import.scss +6 -0
  746. data/vendor/assets/stylesheets/components/hint/_index.import.scss +8 -0
  747. data/vendor/assets/stylesheets/components/hint/_index.scss +3 -43
  748. data/vendor/assets/stylesheets/components/hint/_mixin.scss +47 -0
  749. data/vendor/assets/stylesheets/components/input/_index.import.scss +11 -0
  750. data/vendor/assets/stylesheets/components/input/_index.scss +6 -166
  751. data/vendor/assets/stylesheets/components/input/_input.import.scss +6 -0
  752. data/vendor/assets/stylesheets/components/input/_mixin.scss +161 -0
  753. data/vendor/assets/stylesheets/components/inset-text/_index.import.scss +8 -0
  754. data/vendor/assets/stylesheets/components/inset-text/_index.scss +3 -24
  755. data/vendor/assets/stylesheets/components/inset-text/_inset-text.import.scss +6 -0
  756. data/vendor/assets/stylesheets/components/inset-text/_mixin.scss +31 -0
  757. data/vendor/assets/stylesheets/components/label/_index.import.scss +8 -0
  758. data/vendor/assets/stylesheets/components/label/_index.scss +3 -44
  759. data/vendor/assets/stylesheets/components/label/_label.import.scss +6 -0
  760. data/vendor/assets/stylesheets/components/label/_mixin.scss +48 -0
  761. data/vendor/assets/stylesheets/components/language-navigation/_index.import.scss +8 -0
  762. data/vendor/assets/stylesheets/components/language-navigation/_index.scss +6 -0
  763. data/vendor/assets/stylesheets/components/language-navigation/_language-navigation.import.scss +6 -0
  764. data/vendor/assets/stylesheets/components/language-navigation/_mixin.scss +68 -0
  765. data/vendor/assets/stylesheets/components/notification-banner/_index.import.scss +8 -0
  766. data/vendor/assets/stylesheets/components/notification-banner/_index.scss +3 -91
  767. data/vendor/assets/stylesheets/components/notification-banner/_mixin.scss +100 -0
  768. data/vendor/assets/stylesheets/components/notification-banner/_notification-banner.import.scss +6 -0
  769. data/vendor/assets/stylesheets/components/pagination/_index.import.scss +8 -0
  770. data/vendor/assets/stylesheets/components/pagination/_index.scss +3 -226
  771. data/vendor/assets/stylesheets/components/pagination/_mixin.scss +235 -0
  772. data/vendor/assets/stylesheets/components/pagination/_pagination.import.scss +6 -0
  773. data/vendor/assets/stylesheets/components/panel/_index.import.scss +8 -0
  774. data/vendor/assets/stylesheets/components/panel/_index.scss +3 -56
  775. data/vendor/assets/stylesheets/components/panel/_mixin.scss +94 -0
  776. data/vendor/assets/stylesheets/components/panel/_panel.import.scss +6 -0
  777. data/vendor/assets/stylesheets/components/password-input/_index.import.scss +10 -0
  778. data/vendor/assets/stylesheets/components/password-input/_index.scss +5 -54
  779. data/vendor/assets/stylesheets/components/password-input/_mixin.scss +56 -0
  780. data/vendor/assets/stylesheets/components/password-input/_password-input.import.scss +6 -0
  781. data/vendor/assets/stylesheets/components/phase-banner/_index.import.scss +9 -0
  782. data/vendor/assets/stylesheets/components/phase-banner/_index.scss +4 -33
  783. data/vendor/assets/stylesheets/components/phase-banner/_mixin.scss +42 -0
  784. data/vendor/assets/stylesheets/components/phase-banner/_phase-banner.import.scss +6 -0
  785. data/vendor/assets/stylesheets/components/radios/_index.import.scss +12 -0
  786. data/vendor/assets/stylesheets/components/radios/_index.scss +7 -325
  787. data/vendor/assets/stylesheets/components/radios/_mixin.scss +336 -0
  788. data/vendor/assets/stylesheets/components/radios/_radios.import.scss +6 -0
  789. data/vendor/assets/stylesheets/components/select/_index.import.scss +11 -0
  790. data/vendor/assets/stylesheets/components/select/_index.scss +6 -56
  791. data/vendor/assets/stylesheets/components/select/_mixin.scss +45 -0
  792. data/vendor/assets/stylesheets/components/select/_select.import.scss +6 -0
  793. data/vendor/assets/stylesheets/components/service-navigation/_index.import.scss +8 -0
  794. data/vendor/assets/stylesheets/components/service-navigation/_index.scss +3 -185
  795. data/vendor/assets/stylesheets/components/service-navigation/_mixin.scss +283 -0
  796. data/vendor/assets/stylesheets/components/service-navigation/_service-navigation.import.scss +6 -0
  797. data/vendor/assets/stylesheets/components/skip-link/_index.import.scss +8 -0
  798. data/vendor/assets/stylesheets/components/skip-link/_index.scss +3 -50
  799. data/vendor/assets/stylesheets/components/skip-link/_mixin.scss +60 -0
  800. data/vendor/assets/stylesheets/components/skip-link/_skip-link.import.scss +6 -0
  801. data/vendor/assets/stylesheets/components/summary-list/_index.import.scss +8 -0
  802. data/vendor/assets/stylesheets/components/summary-list/_index.scss +3 -267
  803. data/vendor/assets/stylesheets/components/summary-list/_mixin.scss +286 -0
  804. data/vendor/assets/stylesheets/components/summary-list/_summary-list.import.scss +6 -0
  805. data/vendor/assets/stylesheets/components/table/_index.import.scss +8 -0
  806. data/vendor/assets/stylesheets/components/table/_index.scss +3 -73
  807. data/vendor/assets/stylesheets/components/table/_mixin.scss +77 -0
  808. data/vendor/assets/stylesheets/components/table/_table.import.scss +6 -0
  809. data/vendor/assets/stylesheets/components/tabs/_index.import.scss +8 -0
  810. data/vendor/assets/stylesheets/components/tabs/_index.scss +3 -132
  811. data/vendor/assets/stylesheets/components/tabs/_mixin.scss +140 -0
  812. data/vendor/assets/stylesheets/components/tabs/_tabs.import.scss +6 -0
  813. data/vendor/assets/stylesheets/components/tag/_index.import.scss +8 -0
  814. data/vendor/assets/stylesheets/components/tag/_index.scss +3 -94
  815. data/vendor/assets/stylesheets/components/tag/_mixin.scss +135 -0
  816. data/vendor/assets/stylesheets/components/tag/_tag.import.scss +6 -0
  817. data/vendor/assets/stylesheets/components/task-list/_index.import.scss +9 -0
  818. data/vendor/assets/stylesheets/components/task-list/_index.scss +4 -76
  819. data/vendor/assets/stylesheets/components/task-list/_mixin.scss +83 -0
  820. data/vendor/assets/stylesheets/components/task-list/_task-list.import.scss +6 -0
  821. data/vendor/assets/stylesheets/components/textarea/_index.import.scss +11 -0
  822. data/vendor/assets/stylesheets/components/textarea/_index.scss +6 -47
  823. data/vendor/assets/stylesheets/components/textarea/_mixin.scss +43 -0
  824. data/vendor/assets/stylesheets/components/textarea/_textarea.import.scss +6 -0
  825. data/vendor/assets/stylesheets/components/warning-text/_index.import.scss +8 -0
  826. data/vendor/assets/stylesheets/components/warning-text/_index.scss +3 -64
  827. data/vendor/assets/stylesheets/components/warning-text/_mixin.scss +69 -0
  828. data/vendor/assets/stylesheets/components/warning-text/_warning-text.import.scss +6 -0
  829. data/vendor/assets/stylesheets/core/_global-styles.import.scss +10 -0
  830. data/vendor/assets/stylesheets/core/_global-styles.mixin.scss +19 -0
  831. data/vendor/assets/stylesheets/core/_global-styles.scss +5 -18
  832. data/vendor/assets/stylesheets/core/_index.import.scss +6 -0
  833. data/vendor/assets/stylesheets/core/_index.scss +6 -7
  834. data/vendor/assets/stylesheets/core/_links.import.scss +10 -0
  835. data/vendor/assets/stylesheets/core/_links.mixin.scss +44 -0
  836. data/vendor/assets/stylesheets/core/_links.scss +3 -40
  837. data/vendor/assets/stylesheets/core/_lists.import.scss +14 -0
  838. data/vendor/assets/stylesheets/core/_lists.mixin.scss +74 -0
  839. data/vendor/assets/stylesheets/core/_lists.scss +6 -64
  840. data/vendor/assets/stylesheets/core/_section-break.import.scss +8 -0
  841. data/vendor/assets/stylesheets/core/_section-break.mixin.scss +54 -0
  842. data/vendor/assets/stylesheets/core/_section-break.scss +3 -49
  843. data/vendor/assets/stylesheets/core/_typography.import.scss +8 -0
  844. data/vendor/assets/stylesheets/core/_typography.mixin.scss +173 -0
  845. data/vendor/assets/stylesheets/core/_typography.scss +3 -187
  846. data/vendor/assets/stylesheets/custom-properties/_breakpoints.import.scss +8 -0
  847. data/vendor/assets/stylesheets/custom-properties/_breakpoints.mixin.scss +15 -0
  848. data/vendor/assets/stylesheets/custom-properties/_breakpoints.scss +4 -0
  849. data/vendor/assets/stylesheets/custom-properties/_frontend-version.import.scss +8 -0
  850. data/vendor/assets/stylesheets/custom-properties/_frontend-version.mixin.scss +13 -0
  851. data/vendor/assets/stylesheets/custom-properties/_frontend-version.scss +4 -0
  852. data/vendor/assets/stylesheets/custom-properties/_functional-colours.import.scss +8 -0
  853. data/vendor/assets/stylesheets/custom-properties/_functional-colours.mixin.scss +22 -0
  854. data/vendor/assets/stylesheets/custom-properties/_functional-colours.scss +4 -0
  855. data/vendor/assets/stylesheets/custom-properties/_index.import.scss +4 -0
  856. data/vendor/assets/stylesheets/custom-properties/_index.scss +4 -0
  857. data/vendor/assets/stylesheets/defra_ruby_template.scss +8 -11
  858. data/vendor/assets/stylesheets/govuk-frontend.min.css +2 -2
  859. data/vendor/assets/stylesheets/helpers/_clearfix.import.scss +2 -0
  860. data/vendor/assets/stylesheets/helpers/_clearfix.scss +0 -1
  861. data/vendor/assets/stylesheets/helpers/_colour.import.scss +2 -0
  862. data/vendor/assets/stylesheets/helpers/_colour.scss +190 -89
  863. data/vendor/assets/stylesheets/helpers/_device-pixels.import.scss +2 -0
  864. data/vendor/assets/stylesheets/helpers/_device-pixels.scss +2 -1
  865. data/vendor/assets/stylesheets/helpers/_focused.import.scss +2 -0
  866. data/vendor/assets/stylesheets/helpers/_focused.scss +44 -7
  867. data/vendor/assets/stylesheets/helpers/_font-faces--internal.scss +41 -0
  868. data/vendor/assets/stylesheets/helpers/_grid.import.scss +2 -0
  869. data/vendor/assets/stylesheets/helpers/_grid.scss +7 -4
  870. data/vendor/assets/stylesheets/helpers/_index.import.scss +2 -0
  871. data/vendor/assets/stylesheets/helpers/_index.scss +12 -13
  872. data/vendor/assets/stylesheets/helpers/_links.import.scss +2 -0
  873. data/vendor/assets/stylesheets/helpers/_links.scss +35 -46
  874. data/vendor/assets/stylesheets/helpers/_media-queries.import.scss +2 -0
  875. data/vendor/assets/stylesheets/helpers/_media-queries.scss +174 -34
  876. data/vendor/assets/stylesheets/helpers/_shape-arrow.import.scss +2 -0
  877. data/vendor/assets/stylesheets/helpers/_shape-arrow.scss +2 -3
  878. data/vendor/assets/stylesheets/helpers/_spacing--internal.scss +80 -0
  879. data/vendor/assets/stylesheets/helpers/_spacing.import.scss +2 -0
  880. data/vendor/assets/stylesheets/helpers/_spacing.scss +27 -82
  881. data/vendor/assets/stylesheets/helpers/_typography--internal.scss +24 -0
  882. data/vendor/assets/stylesheets/helpers/_typography.import.scss +2 -0
  883. data/vendor/assets/stylesheets/helpers/_typography.scss +55 -74
  884. data/vendor/assets/stylesheets/helpers/_visually-hidden.import.scss +2 -0
  885. data/vendor/assets/stylesheets/helpers/_visually-hidden.scss +17 -13
  886. data/vendor/assets/stylesheets/helpers/_width-container.import.scss +2 -0
  887. data/vendor/assets/stylesheets/helpers/_width-container.scss +73 -0
  888. data/vendor/assets/stylesheets/index.import.scss +10 -0
  889. data/vendor/assets/stylesheets/index.scss +6 -7
  890. data/vendor/assets/stylesheets/objects/_button-group.import.scss +8 -0
  891. data/vendor/assets/stylesheets/objects/_button-group.mixin.scss +80 -0
  892. data/vendor/assets/stylesheets/objects/_button-group.scss +3 -78
  893. data/vendor/assets/stylesheets/objects/_form-group.import.scss +8 -0
  894. data/vendor/assets/stylesheets/objects/_form-group.mixin.scss +26 -0
  895. data/vendor/assets/stylesheets/objects/_form-group.scss +3 -23
  896. data/vendor/assets/stylesheets/objects/_grid.import.scss +8 -0
  897. data/vendor/assets/stylesheets/objects/_grid.mixin.scss +28 -0
  898. data/vendor/assets/stylesheets/objects/_grid.scss +3 -24
  899. data/vendor/assets/stylesheets/objects/_index.import.scss +7 -0
  900. data/vendor/assets/stylesheets/objects/_index.scss +6 -7
  901. data/vendor/assets/stylesheets/objects/_main-wrapper.import.scss +8 -0
  902. data/vendor/assets/stylesheets/objects/_main-wrapper.mixin.scss +55 -0
  903. data/vendor/assets/stylesheets/objects/_main-wrapper.scss +3 -53
  904. data/vendor/assets/stylesheets/objects/_template.import.scss +8 -0
  905. data/vendor/assets/stylesheets/objects/_template.mixin.scss +53 -0
  906. data/vendor/assets/stylesheets/objects/_template.scss +3 -55
  907. data/vendor/assets/stylesheets/objects/_width-container.import.scss +8 -0
  908. data/vendor/assets/stylesheets/objects/_width-container.mixin.scss +9 -0
  909. data/vendor/assets/stylesheets/objects/_width-container.scss +3 -75
  910. data/vendor/assets/stylesheets/overrides/_display.import.scss +8 -0
  911. data/vendor/assets/stylesheets/overrides/_display.mixin.scss +26 -0
  912. data/vendor/assets/stylesheets/overrides/_display.scss +2 -24
  913. data/vendor/assets/stylesheets/overrides/_index.import.scss +6 -0
  914. data/vendor/assets/stylesheets/overrides/_index.scss +5 -6
  915. data/vendor/assets/stylesheets/overrides/_spacing.import.scss +8 -0
  916. data/vendor/assets/stylesheets/overrides/_spacing.mixin.scss +89 -0
  917. data/vendor/assets/stylesheets/overrides/_spacing.scss +2 -84
  918. data/vendor/assets/stylesheets/overrides/_text-align.import.scss +8 -0
  919. data/vendor/assets/stylesheets/overrides/_text-align.mixin.scss +16 -0
  920. data/vendor/assets/stylesheets/overrides/_text-align.scss +2 -14
  921. data/vendor/assets/stylesheets/overrides/_typography.import.scss +8 -0
  922. data/vendor/assets/stylesheets/overrides/_typography.mixin.scss +43 -0
  923. data/vendor/assets/stylesheets/overrides/_typography.scss +2 -40
  924. data/vendor/assets/stylesheets/overrides/_width.import.scss +8 -0
  925. data/vendor/assets/stylesheets/overrides/_width.mixin.scss +50 -0
  926. data/vendor/assets/stylesheets/overrides/_width.scss +2 -46
  927. data/vendor/assets/stylesheets/settings/_assets.import.scss +13 -0
  928. data/vendor/assets/stylesheets/settings/_assets.scss +50 -21
  929. data/vendor/assets/stylesheets/settings/_colours-applied.import.scss +13 -0
  930. data/vendor/assets/stylesheets/settings/_colours-functional.import.scss +2 -0
  931. data/vendor/assets/stylesheets/settings/_colours-functional.scss +168 -0
  932. data/vendor/assets/stylesheets/settings/_colours-legacy-functional.import.scss +2 -0
  933. data/vendor/assets/stylesheets/settings/_colours-legacy-functional.scss +188 -0
  934. data/vendor/assets/stylesheets/settings/_colours-organisations.import.scss +2 -0
  935. data/vendor/assets/stylesheets/settings/_colours-organisations.scss +23 -274
  936. data/vendor/assets/stylesheets/settings/_colours-palette--internal.scss +128 -0
  937. data/vendor/assets/stylesheets/settings/_custom-properties.import.scss +2 -0
  938. data/vendor/assets/stylesheets/settings/_custom-properties.scss +17 -0
  939. data/vendor/assets/stylesheets/settings/_global-styles.import.scss +2 -0
  940. data/vendor/assets/stylesheets/settings/_global-styles.scss +0 -1
  941. data/vendor/assets/stylesheets/settings/_index.import.scss +24 -0
  942. data/vendor/assets/stylesheets/settings/_index.scss +14 -13
  943. data/vendor/assets/stylesheets/settings/_links.import.scss +2 -0
  944. data/vendor/assets/stylesheets/settings/_links.scss +3 -3
  945. data/vendor/assets/stylesheets/settings/_measurements.import.scss +2 -0
  946. data/vendor/assets/stylesheets/settings/_measurements.scss +8 -17
  947. data/vendor/assets/stylesheets/settings/_media-queries.import.scss +2 -0
  948. data/vendor/assets/stylesheets/settings/_media-queries.scss +0 -10
  949. data/vendor/assets/stylesheets/settings/_spacing.import.scss +2 -0
  950. data/vendor/assets/stylesheets/settings/_spacing.scss +0 -1
  951. data/vendor/assets/stylesheets/settings/_typography-font.import.scss +2 -0
  952. data/vendor/assets/stylesheets/settings/_typography-font.scss +3 -2
  953. data/vendor/assets/stylesheets/settings/_typography-responsive.import.scss +2 -0
  954. data/vendor/assets/stylesheets/settings/_typography-responsive.scss +12 -190
  955. data/vendor/assets/stylesheets/settings/_warnings--internal.scss +69 -0
  956. data/vendor/assets/stylesheets/settings/_warnings.import.scss +2 -0
  957. data/vendor/assets/stylesheets/settings/_warnings.scss +9 -56
  958. data/vendor/assets/stylesheets/tools/_exports.import.scss +2 -0
  959. data/vendor/assets/stylesheets/tools/_exports.scss +12 -6
  960. data/vendor/assets/stylesheets/tools/_font-url.import.scss +31 -0
  961. data/vendor/assets/stylesheets/tools/_font-url.scss +22 -6
  962. data/vendor/assets/stylesheets/tools/_if.import.scss +2 -0
  963. data/vendor/assets/stylesheets/tools/_if.scss +23 -0
  964. data/vendor/assets/stylesheets/tools/_image-url.import.scss +31 -0
  965. data/vendor/assets/stylesheets/tools/_image-url.scss +22 -6
  966. data/vendor/assets/stylesheets/tools/_index.import.scss +2 -0
  967. data/vendor/assets/stylesheets/tools/_index.scss +6 -7
  968. data/vendor/assets/stylesheets/tools/_px-to-em.import.scss +2 -0
  969. data/vendor/assets/stylesheets/tools/_px-to-em.scss +9 -6
  970. data/vendor/assets/stylesheets/tools/_px-to-rem.import.scss +2 -0
  971. data/vendor/assets/stylesheets/tools/_px-to-rem.scss +6 -3
  972. data/vendor/assets/stylesheets/utilities/_clearfix.import.scss +8 -0
  973. data/vendor/assets/stylesheets/utilities/_clearfix.mixin.scss +10 -0
  974. data/vendor/assets/stylesheets/utilities/_clearfix.scss +3 -6
  975. data/vendor/assets/stylesheets/utilities/_index.import.scss +3 -0
  976. data/vendor/assets/stylesheets/utilities/_index.scss +2 -3
  977. data/vendor/assets/stylesheets/utilities/_visually-hidden.import.scss +8 -0
  978. data/vendor/assets/stylesheets/utilities/_visually-hidden.mixin.scss +14 -0
  979. data/vendor/assets/stylesheets/utilities/_visually-hidden.scss +2 -9
  980. metadata +541 -409
  981. data/node_modules/govuk-frontend/dist/govuk/_base.scss.map +0 -1
  982. data/node_modules/govuk-frontend/dist/govuk/all.scss +0 -9
  983. data/node_modules/govuk-frontend/dist/govuk/all.scss.map +0 -1
  984. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/favicon.ico +0 -0
  985. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/favicon.svg +0 -1
  986. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-crest.svg +0 -1
  987. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-180.png +0 -0
  988. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-192.png +0 -0
  989. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-512.png +0 -0
  990. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-mask.svg +0 -1
  991. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-opengraph-image.png +0 -0
  992. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/manifest.json +0 -39
  993. data/node_modules/govuk-frontend/dist/govuk/components/_all.scss +0 -10
  994. data/node_modules/govuk-frontend/dist/govuk/components/_all.scss.map +0 -1
  995. data/node_modules/govuk-frontend/dist/govuk/components/_index.scss.map +0 -1
  996. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.scss +0 -4
  997. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.scss.map +0 -1
  998. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss.map +0 -1
  999. data/node_modules/govuk-frontend/dist/govuk/components/accordion/template-with-focusable-elements-inside.html +0 -26
  1000. data/node_modules/govuk-frontend/dist/govuk/components/accordion/template-with-one-section-open.html +0 -30
  1001. data/node_modules/govuk-frontend/dist/govuk/components/accordion/template-with-translations.html +0 -30
  1002. data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.scss +0 -4
  1003. data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.scss.map +0 -1
  1004. data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.scss.map +0 -1
  1005. data/node_modules/govuk-frontend/dist/govuk/components/back-link/template-with-custom-link.html +0 -1
  1006. data/node_modules/govuk-frontend/dist/govuk/components/back-link/template-with-custom-text.html +0 -1
  1007. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss +0 -4
  1008. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss.map +0 -1
  1009. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss.map +0 -1
  1010. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-with-multiple-levels.html +0 -16
  1011. data/node_modules/govuk-frontend/dist/govuk/components/button/_button.scss +0 -4
  1012. data/node_modules/govuk-frontend/dist/govuk/components/button/_button.scss.map +0 -1
  1013. data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss.map +0 -1
  1014. data/node_modules/govuk-frontend/dist/govuk/components/button/template-input-disabled.html +0 -1
  1015. data/node_modules/govuk-frontend/dist/govuk/components/button/template-input.html +0 -1
  1016. data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse-link.html +0 -3
  1017. data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse-start.html +0 -6
  1018. data/node_modules/govuk-frontend/dist/govuk/components/button/template-prevent-double-click.html +0 -3
  1019. data/node_modules/govuk-frontend/dist/govuk/components/button/template-secondary-link.html +0 -3
  1020. data/node_modules/govuk-frontend/dist/govuk/components/button/template-start-link.html +0 -6
  1021. data/node_modules/govuk-frontend/dist/govuk/components/button/template-warning-link.html +0 -3
  1022. data/node_modules/govuk-frontend/dist/govuk/components/button/template-with-active-state.html +0 -3
  1023. data/node_modules/govuk-frontend/dist/govuk/components/button/template-with-focus-state.html +0 -3
  1024. data/node_modules/govuk-frontend/dist/govuk/components/button/template-with-hover-state.html +0 -3
  1025. data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.scss +0 -4
  1026. data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.scss.map +0 -1
  1027. data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss.map +0 -1
  1028. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-custom-textarea-description.html +0 -9
  1029. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-error.html +0 -12
  1030. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-translations.html +0 -9
  1031. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-word-count.html +0 -9
  1032. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss +0 -4
  1033. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss.map +0 -1
  1034. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss.map +0 -1
  1035. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-disabled.html +0 -27
  1036. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-a-medium-legend.html +0 -33
  1037. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-conditional-item-checked.html +0 -39
  1038. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-conditional-items-with-special-characters.html +0 -39
  1039. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-disabled-item.html +0 -29
  1040. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-error-message-and-hints-on-items.html +0 -39
  1041. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-fieldset-and-error-message.html +0 -30
  1042. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-id-and-name.html +0 -30
  1043. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-single-option-and-hint-set-aria-describedby-on-input.html +0 -16
  1044. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-single-option-set-aria-describedby-on-input.html +0 -13
  1045. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-without-fieldset.html +0 -22
  1046. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss +0 -4
  1047. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss.map +0 -1
  1048. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss.map +0 -1
  1049. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/template-client-side-implementation.html +0 -60
  1050. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.scss +0 -4
  1051. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.scss.map +0 -1
  1052. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss.map +0 -1
  1053. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-autocomplete-values.html +0 -36
  1054. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-default-items.html +0 -36
  1055. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-errors-and-hint.html +0 -39
  1056. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-input-attributes.html +0 -36
  1057. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-optional-form-group-classes.html +0 -36
  1058. data/node_modules/govuk-frontend/dist/govuk/components/details/_details.scss +0 -4
  1059. data/node_modules/govuk-frontend/dist/govuk/components/details/_details.scss.map +0 -1
  1060. data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss.map +0 -1
  1061. data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.scss +0 -4
  1062. data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.scss.map +0 -1
  1063. data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.scss.map +0 -1
  1064. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss +0 -4
  1065. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss.map +0 -1
  1066. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss.map +0 -1
  1067. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss +0 -4
  1068. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss.map +0 -1
  1069. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss.map +0 -1
  1070. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/template-translated.html +0 -5
  1071. data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss +0 -4
  1072. data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss.map +0 -1
  1073. data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss.map +0 -1
  1074. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss +0 -4
  1075. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss.map +0 -1
  1076. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss.map +0 -1
  1077. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-allows-direct-media-capture.html +0 -6
  1078. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-allows-image-files-only.html +0 -6
  1079. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-allows-multiple-files.html +0 -6
  1080. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-disabled.html +0 -6
  1081. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced-disabled.html +0 -13
  1082. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-with-optional-form-group-classes.html +0 -6
  1083. data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.scss +0 -4
  1084. data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.scss.map +0 -1
  1085. data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss.map +0 -1
  1086. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-meta.html +0 -56
  1087. data/node_modules/govuk-frontend/dist/govuk/components/header/_header.scss +0 -4
  1088. data/node_modules/govuk-frontend/dist/govuk/components/header/_header.scss.map +0 -1
  1089. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss.map +0 -1
  1090. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js +0 -233
  1091. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js.map +0 -1
  1092. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs +0 -225
  1093. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs.map +0 -1
  1094. data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs +0 -89
  1095. data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs.map +0 -1
  1096. data/node_modules/govuk-frontend/dist/govuk/components/header/template-full-width-with-navigation.html +0 -55
  1097. data/node_modules/govuk-frontend/dist/govuk/components/header/template-navigation-item-with-html.html +0 -57
  1098. data/node_modules/govuk-frontend/dist/govuk/components/header/template-navigation-item-with-text-without-link.html +0 -51
  1099. data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-menu-button-label.html +0 -59
  1100. data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-menu-button-text.html +0 -59
  1101. data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-navigation-label.html +0 -59
  1102. data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-full-width-border.html +0 -30
  1103. data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-large-navigation.html +0 -119
  1104. data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-navigation.html +0 -59
  1105. data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-service-name-and-navigation.html +0 -62
  1106. data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-service-name-but-no-service-url.html +0 -34
  1107. data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-service-name.html +0 -34
  1108. data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-st-edwards-crown.html +0 -19
  1109. data/node_modules/govuk-frontend/dist/govuk/components/hint/_hint.scss +0 -4
  1110. data/node_modules/govuk-frontend/dist/govuk/components/hint/_hint.scss.map +0 -1
  1111. data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.scss.map +0 -1
  1112. data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss.map +0 -1
  1113. data/node_modules/govuk-frontend/dist/govuk/components/input/_input.scss +0 -4
  1114. data/node_modules/govuk-frontend/dist/govuk/components/input/_input.scss.map +0 -1
  1115. data/node_modules/govuk-frontend/dist/govuk/components/input/template-disabled.html +0 -6
  1116. data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-autocapitalize-turned-off.html +0 -6
  1117. data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-autocomplete-attribute.html +0 -6
  1118. data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-optional-form-group-classes.html +0 -6
  1119. data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-pattern-attribute.html +0 -6
  1120. data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-prefix-and-long-suffix.html +0 -10
  1121. data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-spellcheck-disabled.html +0 -6
  1122. data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-spellcheck-enabled.html +0 -6
  1123. data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.scss.map +0 -1
  1124. data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss +0 -4
  1125. data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss.map +0 -1
  1126. data/node_modules/govuk-frontend/dist/govuk/components/label/_index.scss.map +0 -1
  1127. data/node_modules/govuk-frontend/dist/govuk/components/label/_label.scss +0 -4
  1128. data/node_modules/govuk-frontend/dist/govuk/components/label/_label.scss.map +0 -1
  1129. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss.map +0 -1
  1130. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss +0 -4
  1131. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss.map +0 -1
  1132. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-auto-focus-disabled-with-type-as-success.html +0 -12
  1133. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-auto-focus-explicitly-enabled-with-type-as-success.html +0 -12
  1134. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-custom-tabindex.html +0 -12
  1135. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-paragraph-as-html-heading.html +0 -10
  1136. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-rolealert-overridden-to-roleregion-with-type-as-success.html +0 -12
  1137. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-success-with-custom-html.html +0 -16
  1138. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-with-a-list.html +0 -16
  1139. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss.map +0 -1
  1140. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.scss +0 -4
  1141. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.scss.map +0 -1
  1142. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-custom-accessible-labels-on-item-links.html +0 -39
  1143. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-custom-navigation-landmark.html +0 -39
  1144. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-prev-and-next-only-in-a-different-language.html +0 -22
  1145. data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss.map +0 -1
  1146. data/node_modules/govuk-frontend/dist/govuk/components/panel/_panel.scss +0 -4
  1147. data/node_modules/govuk-frontend/dist/govuk/components/panel/_panel.scss.map +0 -1
  1148. data/node_modules/govuk-frontend/dist/govuk/components/panel/template-custom-heading-level.html +0 -8
  1149. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss.map +0 -1
  1150. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_password-input.scss +0 -4
  1151. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_password-input.scss.map +0 -1
  1152. data/node_modules/govuk-frontend/dist/govuk/components/password-input/template-with-new-password-autocomplete.html +0 -11
  1153. data/node_modules/govuk-frontend/dist/govuk/components/password-input/template-with-translations.html +0 -11
  1154. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss.map +0 -1
  1155. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.scss +0 -4
  1156. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.scss.map +0 -1
  1157. data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss.map +0 -1
  1158. data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.scss +0 -4
  1159. data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.scss.map +0 -1
  1160. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-prechecked-using-value.html +0 -16
  1161. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-prechecked.html +0 -19
  1162. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-inline-extreme.html +0 -69
  1163. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-disabled.html +0 -27
  1164. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-a-medium-legend.html +0 -24
  1165. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-conditional-items-with-special-characters.html +0 -39
  1166. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-disabled.html +0 -29
  1167. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-idprefix.html +0 -16
  1168. data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss.map +0 -1
  1169. data/node_modules/govuk-frontend/dist/govuk/components/select/_select.scss +0 -4
  1170. data/node_modules/govuk-frontend/dist/govuk/components/select/_select.scss.map +0 -1
  1171. data/node_modules/govuk-frontend/dist/govuk/components/select/template-id.html +0 -7
  1172. data/node_modules/govuk-frontend/dist/govuk/components/select/template-with-no-items.html +0 -7
  1173. data/node_modules/govuk-frontend/dist/govuk/components/select/template-with-optional-form-group-classes.html +0 -10
  1174. data/node_modules/govuk-frontend/dist/govuk/components/select/template-with-selected-value.html +0 -10
  1175. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss.map +0 -1
  1176. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss +0 -4
  1177. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss.map +0 -1
  1178. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-navigation-with-an-active-item.html +0 -58
  1179. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss.map +0 -1
  1180. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss +0 -4
  1181. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss.map +0 -1
  1182. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss.map +0 -1
  1183. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss +0 -4
  1184. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss.map +0 -1
  1185. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-as-a-summary-card-with-a-custom-header-level.html +0 -28
  1186. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-check-your-answers.html +0 -98
  1187. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-overridden-widths.html +0 -58
  1188. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-translated.html +0 -51
  1189. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-with-no-first-action.html +0 -58
  1190. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-with-some-actions.html +0 -45
  1191. data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss.map +0 -1
  1192. data/node_modules/govuk-frontend/dist/govuk/components/table/_table.scss +0 -4
  1193. data/node_modules/govuk-frontend/dist/govuk/components/table/_table.scss.map +0 -1
  1194. data/node_modules/govuk-frontend/dist/govuk/components/table/template-with-small-text-modifier-for-tables-with-a-lot-of-data.html +0 -19
  1195. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss.map +0 -1
  1196. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_tabs.scss +0 -4
  1197. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_tabs.scss.map +0 -1
  1198. data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss.map +0 -1
  1199. data/node_modules/govuk-frontend/dist/govuk/components/tag/_tag.scss +0 -4
  1200. data/node_modules/govuk-frontend/dist/govuk/components/tag/_tag.scss.map +0 -1
  1201. data/node_modules/govuk-frontend/dist/govuk/components/tag/template-blue.html +0 -3
  1202. data/node_modules/govuk-frontend/dist/govuk/components/tag/template-light-blue.html +0 -3
  1203. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss.map +0 -1
  1204. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_task-list.scss +0 -4
  1205. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_task-list.scss.map +0 -1
  1206. data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-example-with-3-states.html +0 -49
  1207. data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-example-with-all-possible-colours.html +0 -143
  1208. data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-example-with-hint-text-and-additional-states.html +0 -77
  1209. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss.map +0 -1
  1210. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.scss +0 -4
  1211. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.scss.map +0 -1
  1212. data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-autocomplete-attribute.html +0 -6
  1213. data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-optional-form-group-classes.html +0 -6
  1214. data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-spellcheck-disabled.html +0 -6
  1215. data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-spellcheck-enabled.html +0 -6
  1216. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss.map +0 -1
  1217. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss +0 -4
  1218. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss.map +0 -1
  1219. data/node_modules/govuk-frontend/dist/govuk/core/_all.scss +0 -10
  1220. data/node_modules/govuk-frontend/dist/govuk/core/_all.scss.map +0 -1
  1221. data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.scss.map +0 -1
  1222. data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +0 -12
  1223. data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss.map +0 -1
  1224. data/node_modules/govuk-frontend/dist/govuk/core/_index.scss.map +0 -1
  1225. data/node_modules/govuk-frontend/dist/govuk/core/_links.scss.map +0 -1
  1226. data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss.map +0 -1
  1227. data/node_modules/govuk-frontend/dist/govuk/core/_section-break.scss.map +0 -1
  1228. data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss.map +0 -1
  1229. data/node_modules/govuk-frontend/dist/govuk/helpers/_all.scss +0 -10
  1230. data/node_modules/govuk-frontend/dist/govuk/helpers/_all.scss.map +0 -1
  1231. data/node_modules/govuk-frontend/dist/govuk/helpers/_clearfix.scss.map +0 -1
  1232. data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss.map +0 -1
  1233. data/node_modules/govuk-frontend/dist/govuk/helpers/_device-pixels.scss.map +0 -1
  1234. data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss.map +0 -1
  1235. data/node_modules/govuk-frontend/dist/govuk/helpers/_font-faces.scss +0 -41
  1236. data/node_modules/govuk-frontend/dist/govuk/helpers/_font-faces.scss.map +0 -1
  1237. data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss.map +0 -1
  1238. data/node_modules/govuk-frontend/dist/govuk/helpers/_index.scss.map +0 -1
  1239. data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss.map +0 -1
  1240. data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss.map +0 -1
  1241. data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss.map +0 -1
  1242. data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss.map +0 -1
  1243. data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss.map +0 -1
  1244. data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss.map +0 -1
  1245. data/node_modules/govuk-frontend/dist/govuk/index.scss.map +0 -1
  1246. data/node_modules/govuk-frontend/dist/govuk/objects/_all.scss +0 -10
  1247. data/node_modules/govuk-frontend/dist/govuk/objects/_all.scss.map +0 -1
  1248. data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.scss.map +0 -1
  1249. data/node_modules/govuk-frontend/dist/govuk/objects/_form-group.scss.map +0 -1
  1250. data/node_modules/govuk-frontend/dist/govuk/objects/_grid.scss.map +0 -1
  1251. data/node_modules/govuk-frontend/dist/govuk/objects/_index.scss.map +0 -1
  1252. data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.scss.map +0 -1
  1253. data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss.map +0 -1
  1254. data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss.map +0 -1
  1255. data/node_modules/govuk-frontend/dist/govuk/overrides/_all.scss +0 -9
  1256. data/node_modules/govuk-frontend/dist/govuk/overrides/_all.scss.map +0 -1
  1257. data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss.map +0 -1
  1258. data/node_modules/govuk-frontend/dist/govuk/overrides/_index.scss.map +0 -1
  1259. data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.scss.map +0 -1
  1260. data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.scss.map +0 -1
  1261. data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss.map +0 -1
  1262. data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss.map +0 -1
  1263. data/node_modules/govuk-frontend/dist/govuk/settings/_all.scss +0 -10
  1264. data/node_modules/govuk-frontend/dist/govuk/settings/_all.scss.map +0 -1
  1265. data/node_modules/govuk-frontend/dist/govuk/settings/_assets.scss.map +0 -1
  1266. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.scss +0 -195
  1267. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.scss.map +0 -1
  1268. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss.map +0 -1
  1269. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-palette.scss +0 -37
  1270. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-palette.scss.map +0 -1
  1271. data/node_modules/govuk-frontend/dist/govuk/settings/_global-styles.scss.map +0 -1
  1272. data/node_modules/govuk-frontend/dist/govuk/settings/_index.scss.map +0 -1
  1273. data/node_modules/govuk-frontend/dist/govuk/settings/_links.scss.map +0 -1
  1274. data/node_modules/govuk-frontend/dist/govuk/settings/_measurements.scss.map +0 -1
  1275. data/node_modules/govuk-frontend/dist/govuk/settings/_media-queries.scss.map +0 -1
  1276. data/node_modules/govuk-frontend/dist/govuk/settings/_spacing.scss.map +0 -1
  1277. data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.scss.map +0 -1
  1278. data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss.map +0 -1
  1279. data/node_modules/govuk-frontend/dist/govuk/settings/_warnings.scss.map +0 -1
  1280. data/node_modules/govuk-frontend/dist/govuk/tools/_all.scss +0 -10
  1281. data/node_modules/govuk-frontend/dist/govuk/tools/_all.scss.map +0 -1
  1282. data/node_modules/govuk-frontend/dist/govuk/tools/_exports.scss.map +0 -1
  1283. data/node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss.map +0 -1
  1284. data/node_modules/govuk-frontend/dist/govuk/tools/_image-url.scss.map +0 -1
  1285. data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss.map +0 -1
  1286. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.scss.map +0 -1
  1287. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss.map +0 -1
  1288. data/node_modules/govuk-frontend/dist/govuk/tools/_rebrand.scss +0 -65
  1289. data/node_modules/govuk-frontend/dist/govuk/tools/_rebrand.scss.map +0 -1
  1290. data/node_modules/govuk-frontend/dist/govuk/utilities/_all.scss +0 -10
  1291. data/node_modules/govuk-frontend/dist/govuk/utilities/_all.scss.map +0 -1
  1292. data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.scss.map +0 -1
  1293. data/node_modules/govuk-frontend/dist/govuk/utilities/_index.scss.map +0 -1
  1294. data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.scss.map +0 -1
  1295. data/node_modules/govuk-frontend/dist/govuk/vendor/_sass-mq.scss +0 -349
  1296. data/node_modules/govuk-frontend/dist/govuk/vendor/_sass-mq.scss.map +0 -1
  1297. data/node_modules/govuk-frontend/dist/govuk-prototype-kit/functions.js +0 -25
  1298. data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.scss.map +0 -1
  1299. data/spec/spec_helper.rb +0 -98
  1300. data/spec/tasks/assets_spec.rb +0 -53
  1301. data/vendor/assets/assets/manifest.json +0 -39
  1302. data/vendor/assets/assets/rebrand/images/favicon.ico +0 -0
  1303. data/vendor/assets/assets/rebrand/images/favicon.svg +0 -1
  1304. data/vendor/assets/assets/rebrand/images/govuk-crest.svg +0 -1
  1305. data/vendor/assets/assets/rebrand/images/govuk-icon-180.png +0 -0
  1306. data/vendor/assets/assets/rebrand/images/govuk-icon-192.png +0 -0
  1307. data/vendor/assets/assets/rebrand/images/govuk-icon-512.png +0 -0
  1308. data/vendor/assets/assets/rebrand/images/govuk-icon-mask.svg +0 -1
  1309. data/vendor/assets/assets/rebrand/images/govuk-opengraph-image.png +0 -0
  1310. data/vendor/assets/assets/rebrand/manifest.json +0 -39
  1311. data/vendor/assets/images/govuk-crest-2x.png +0 -0
  1312. data/vendor/assets/images/govuk-crest.png +0 -0
  1313. data/vendor/assets/stylesheets/all.scss +0 -9
  1314. data/vendor/assets/stylesheets/components/_all.scss +0 -10
  1315. data/vendor/assets/stylesheets/components/accordion/_accordion.scss +0 -4
  1316. data/vendor/assets/stylesheets/components/back-link/_back-link.scss +0 -4
  1317. data/vendor/assets/stylesheets/components/breadcrumbs/_breadcrumbs.scss +0 -4
  1318. data/vendor/assets/stylesheets/components/button/_button.scss +0 -4
  1319. data/vendor/assets/stylesheets/components/character-count/_character-count.scss +0 -4
  1320. data/vendor/assets/stylesheets/components/checkboxes/_checkboxes.scss +0 -4
  1321. data/vendor/assets/stylesheets/components/cookie-banner/_cookie-banner.scss +0 -4
  1322. data/vendor/assets/stylesheets/components/date-input/_date-input.scss +0 -4
  1323. data/vendor/assets/stylesheets/components/details/_details.scss +0 -4
  1324. data/vendor/assets/stylesheets/components/error-message/_error-message.scss +0 -4
  1325. data/vendor/assets/stylesheets/components/error-summary/_error-summary.scss +0 -4
  1326. data/vendor/assets/stylesheets/components/exit-this-page/_exit-this-page.scss +0 -4
  1327. data/vendor/assets/stylesheets/components/fieldset/_fieldset.scss +0 -4
  1328. data/vendor/assets/stylesheets/components/file-upload/_file-upload.scss +0 -4
  1329. data/vendor/assets/stylesheets/components/footer/_footer.scss +0 -4
  1330. data/vendor/assets/stylesheets/components/header/_header.scss +0 -4
  1331. data/vendor/assets/stylesheets/components/hint/_hint.scss +0 -4
  1332. data/vendor/assets/stylesheets/components/input/_input.scss +0 -4
  1333. data/vendor/assets/stylesheets/components/inset-text/_inset-text.scss +0 -4
  1334. data/vendor/assets/stylesheets/components/label/_label.scss +0 -4
  1335. data/vendor/assets/stylesheets/components/notification-banner/_notification-banner.scss +0 -4
  1336. data/vendor/assets/stylesheets/components/pagination/_pagination.scss +0 -4
  1337. data/vendor/assets/stylesheets/components/panel/_panel.scss +0 -4
  1338. data/vendor/assets/stylesheets/components/password-input/_password-input.scss +0 -4
  1339. data/vendor/assets/stylesheets/components/phase-banner/_phase-banner.scss +0 -4
  1340. data/vendor/assets/stylesheets/components/radios/_radios.scss +0 -4
  1341. data/vendor/assets/stylesheets/components/select/_select.scss +0 -4
  1342. data/vendor/assets/stylesheets/components/service-navigation/_service-navigation.scss +0 -4
  1343. data/vendor/assets/stylesheets/components/skip-link/_skip-link.scss +0 -4
  1344. data/vendor/assets/stylesheets/components/summary-list/_summary-list.scss +0 -4
  1345. data/vendor/assets/stylesheets/components/table/_table.scss +0 -4
  1346. data/vendor/assets/stylesheets/components/tabs/_tabs.scss +0 -4
  1347. data/vendor/assets/stylesheets/components/tag/_tag.scss +0 -4
  1348. data/vendor/assets/stylesheets/components/task-list/_task-list.scss +0 -4
  1349. data/vendor/assets/stylesheets/components/textarea/_textarea.scss +0 -4
  1350. data/vendor/assets/stylesheets/components/warning-text/_warning-text.scss +0 -4
  1351. data/vendor/assets/stylesheets/core/_all.scss +0 -10
  1352. data/vendor/assets/stylesheets/core/_govuk-frontend-properties.scss +0 -12
  1353. data/vendor/assets/stylesheets/helpers/_all.scss +0 -10
  1354. data/vendor/assets/stylesheets/helpers/_font-faces.scss +0 -41
  1355. data/vendor/assets/stylesheets/objects/_all.scss +0 -10
  1356. data/vendor/assets/stylesheets/overrides/_all.scss +0 -9
  1357. data/vendor/assets/stylesheets/settings/_all.scss +0 -10
  1358. data/vendor/assets/stylesheets/settings/_colours-applied.scss +0 -195
  1359. data/vendor/assets/stylesheets/settings/_colours-palette.scss +0 -37
  1360. data/vendor/assets/stylesheets/tools/_all.scss +0 -10
  1361. data/vendor/assets/stylesheets/tools/_rebrand.scss +0 -65
  1362. data/vendor/assets/stylesheets/utilities/_all.scss +0 -10
  1363. data/vendor/assets/stylesheets/vendor/_sass-mq.scss +0 -349
  1364. /data/node_modules/govuk-frontend/dist/govuk/components/date-input/{template-complete-question.html → template-with-items.html} +0 -0
  1365. /data/node_modules/govuk-frontend/dist/govuk/components/table/{template-table-with-head-and-caption.html → template-with-head-and-caption.html} +0 -0
  1366. /data/node_modules/govuk-frontend/dist/govuk/components/table/{template-table-with-head.html → template-with-head.html} +0 -0
  1367. /data/node_modules/govuk-frontend/dist/govuk/components/task-list/{template-example-with-very-long-single-word-tags.html → template-with-very-long-single-word-tags.html} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"notification-banner.bundle.js","sources":["../../../../src/govuk/common/index.mjs","../../../../src/govuk/errors/index.mjs","../../../../src/govuk/component.mjs","../../../../src/govuk/common/configuration.mjs","../../../../src/govuk/components/notification-banner/notification-banner.mjs"],"sourcesContent":["/**\n * Common helpers which do not require polyfill.\n *\n * IMPORTANT: If a helper require a polyfill, please isolate it in its own module\n * so that the polyfill can be properly tree-shaken and does not burden\n * the components that do not need that helper\n */\n\n/**\n * Get hash fragment from URL\n *\n * Extract the hash fragment (everything after the hash) from a URL,\n * but not including the hash symbol\n *\n * @private\n * @param {string} url - URL\n * @returns {string | undefined} Fragment from URL, without the hash\n */\nexport function getFragmentFromUrl(url) {\n if (!url.includes('#')) {\n return undefined\n }\n\n return url.split('#').pop()\n}\n\n/**\n * Get GOV.UK Frontend breakpoint value from CSS custom property\n *\n * @private\n * @param {string} name - Breakpoint name\n * @returns {{ property: string, value?: string }} Breakpoint object\n */\nexport function getBreakpoint(name) {\n const property = `--govuk-frontend-breakpoint-${name}`\n\n // Get value from `<html>` with breakpoints on CSS :root\n const value = window\n .getComputedStyle(document.documentElement)\n .getPropertyValue(property)\n\n return {\n property,\n value: value || undefined\n }\n}\n\n/**\n * Move focus to element\n *\n * Sets tabindex to -1 to make the element programmatically focusable,\n * but removes it on blur as the element doesn't need to be focused again.\n *\n * @private\n * @template {HTMLElement} FocusElement\n * @param {FocusElement} $element - HTML element\n * @param {object} [options] - Handler options\n * @param {function(this: FocusElement): void} [options.onBeforeFocus] - Callback before focus\n * @param {function(this: FocusElement): void} [options.onBlur] - Callback on blur\n */\nexport function setFocus($element, options = {}) {\n const isFocusable = $element.getAttribute('tabindex')\n\n if (!isFocusable) {\n $element.setAttribute('tabindex', '-1')\n }\n\n /**\n * Handle element focus\n */\n function onFocus() {\n $element.addEventListener('blur', onBlur, { once: true })\n }\n\n /**\n * Handle element blur\n */\n function onBlur() {\n options.onBlur?.call($element)\n\n if (!isFocusable) {\n $element.removeAttribute('tabindex')\n }\n }\n\n // Add listener to reset element on blur, after focus\n $element.addEventListener('focus', onFocus, { once: true })\n\n // Focus element\n options.onBeforeFocus?.call($element)\n $element.focus()\n}\n\n/**\n * Checks if component is already initialised\n *\n * @internal\n * @param {Element} $root - HTML element to be checked\n * @param {string} moduleName - name of component module\n * @returns {boolean} Whether component is already initialised\n */\nexport function isInitialised($root, moduleName) {\n return (\n $root instanceof HTMLElement &&\n $root.hasAttribute(`data-${moduleName}-init`)\n )\n}\n\n/**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * Some browsers will load and run our JavaScript but GOV.UK Frontend\n * won't be supported.\n *\n * @param {HTMLElement | null} [$scope] - (internal) `<body>` HTML element checked for browser support\n * @returns {boolean} Whether GOV.UK Frontend is supported on this page\n */\nexport function isSupported($scope = document.body) {\n if (!$scope) {\n return false\n }\n\n return $scope.classList.contains('govuk-frontend-supported')\n}\n\n/**\n * Check for an array\n *\n * @internal\n * @param {unknown} option - Option to check\n * @returns {boolean} Whether the option is an array\n */\nfunction isArray(option) {\n return Array.isArray(option)\n}\n\n/**\n * Check for an object\n *\n * @internal\n * @template {Partial<Record<keyof ObjectType, unknown>>} [ObjectType=ObjectNested]\n * @param {unknown | ObjectType} option - Option to check\n * @returns {option is ObjectType} Whether the option is an object\n */\nexport function isObject(option) {\n return !!option && typeof option === 'object' && !isArray(option)\n}\n\n/**\n * Format error message\n *\n * @internal\n * @param {ComponentWithModuleName} Component - Component that threw the error\n * @param {string} message - Error message\n * @returns {string} - Formatted error message\n */\nexport function formatErrorMessage(Component, message) {\n return `${Component.moduleName}: ${message}`\n}\n\n/* eslint-disable jsdoc/valid-types --\n * `{new(...args: any[] ): object}` is not recognised as valid\n * https://github.com/gajus/eslint-plugin-jsdoc/issues/145#issuecomment-1308722878\n * https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/131\n **/\n\n/**\n * @typedef ComponentWithModuleName\n * @property {string} moduleName - Name of the component\n */\n\n/* eslint-enable jsdoc/valid-types */\n\n/**\n * @import { ObjectNested } from './configuration.mjs'\n */\n","import { formatErrorMessage } from '../common/index.mjs'\n\n/**\n * GOV.UK Frontend error\n *\n * A base class for `Error`s thrown by GOV.UK Frontend.\n *\n * It is meant to be extended into specific types of errors\n * to be thrown by our code.\n *\n * @example\n * ```js\n * class MissingRootError extends GOVUKFrontendError {\n * // Setting an explicit name is important as extending the class will not\n * // set a new `name` on the subclass. The `name` property is important\n * // to ensure intelligible error names even if the class name gets\n * // mangled by a minifier\n * name = \"MissingRootError\"\n * }\n * ```\n * @virtual\n */\nexport class GOVUKFrontendError extends Error {\n name = 'GOVUKFrontendError'\n}\n\n/**\n * Indicates that GOV.UK Frontend is not supported\n */\nexport class SupportError extends GOVUKFrontendError {\n name = 'SupportError'\n\n /**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * @param {HTMLElement | null} [$scope] - HTML element `<body>` checked for browser support\n */\n constructor($scope = document.body) {\n const supportMessage =\n 'noModule' in HTMLScriptElement.prototype\n ? 'GOV.UK Frontend initialised without `<body class=\"govuk-frontend-supported\">` from template `<script>` snippet'\n : 'GOV.UK Frontend is not supported in this browser'\n\n super(\n $scope\n ? supportMessage\n : 'GOV.UK Frontend initialised without `<script type=\"module\">`'\n )\n }\n}\n\n/**\n * Indicates that a component has received an illegal configuration\n */\nexport class ConfigError extends GOVUKFrontendError {\n name = 'ConfigError'\n}\n\n/**\n * Indicates an issue with an element (possibly `null` or `undefined`)\n */\nexport class ElementError extends GOVUKFrontendError {\n name = 'ElementError'\n\n /**\n * @internal\n * @overload\n * @param {string} message - Element error message\n */\n\n /**\n * @internal\n * @overload\n * @param {ElementErrorOptions} options - Element error options\n */\n\n /**\n * @internal\n * @param {string | ElementErrorOptions} messageOrOptions - Element error message or options\n */\n constructor(messageOrOptions) {\n let message = typeof messageOrOptions === 'string' ? messageOrOptions : ''\n\n // Build message from options\n if (typeof messageOrOptions === 'object') {\n const { component, identifier, element, expectedType } = messageOrOptions\n\n message = identifier\n\n // Append reason\n message += element\n ? ` is not of type ${expectedType ?? 'HTMLElement'}`\n : ' not found'\n\n message = formatErrorMessage(component, message)\n }\n\n super(message)\n }\n}\n\n/**\n * Indicates that a component is already initialised\n */\nexport class InitError extends GOVUKFrontendError {\n name = 'InitError'\n\n /**\n * @internal\n * @param {ComponentWithModuleName | string} componentOrMessage - name of the component module\n */\n constructor(componentOrMessage) {\n const message =\n typeof componentOrMessage === 'string'\n ? componentOrMessage\n : formatErrorMessage(\n componentOrMessage,\n `Root element (\\`$root\\`) already initialised`\n )\n\n super(message)\n }\n}\n\n/**\n * Element error options\n *\n * @internal\n * @typedef {object} ElementErrorOptions\n * @property {string} identifier - An identifier that'll let the user understand which element has an error. This is whatever makes the most sense\n * @property {Element | null} [element] - The element in error\n * @property {string} [expectedType] - The type that was expected for the identifier\n * @property {ComponentWithModuleName} component - Component throwing the error\n */\n\n/**\n * @import { ComponentWithModuleName } from '../common/index.mjs'\n */\n","import { isInitialised, isSupported } from './common/index.mjs'\nimport { ElementError, InitError, SupportError } from './errors/index.mjs'\n\n/**\n * Base Component class\n *\n * Centralises the behaviours shared by our components\n *\n * @virtual\n * @template {Element} [RootElementType=HTMLElement]\n */\nexport class Component {\n /**\n * @type {typeof Element}\n */\n static elementType = HTMLElement\n\n // allows Typescript user to work around the lack of types\n // in GOVUKFrontend package, Typescript is not aware of $root\n // in components that extend GOVUKFrontendComponent\n /**\n * Returns the root element of the component\n *\n * @protected\n * @returns {RootElementType} - the root element of component\n */\n get $root() {\n return this._$root\n }\n\n /**\n * @protected\n * @type {RootElementType}\n */\n _$root\n\n /**\n * Constructs a new component, validating that GOV.UK Frontend is supported\n *\n * @internal\n * @param {Element | null} [$root] - HTML element to use for component\n */\n constructor($root) {\n const childConstructor = /** @type {ChildClassConstructor} */ (\n this.constructor\n )\n\n // TypeScript does not enforce that inheriting classes will define a `moduleName`\n // (even if we add a `@virtual` `static moduleName` property to this class).\n // While we trust users to do this correctly, we do a little check to provide them\n // a helpful error message.\n //\n // After this, we'll be sure that `childConstructor` has a `moduleName`\n // as expected of the `ChildClassConstructor` we've cast `this.constructor` to.\n if (typeof childConstructor.moduleName !== 'string') {\n throw new InitError(`\\`moduleName\\` not defined in component`)\n }\n\n if (!($root instanceof childConstructor.elementType)) {\n throw new ElementError({\n element: $root,\n component: childConstructor,\n identifier: 'Root element (`$root`)',\n expectedType: childConstructor.elementType.name\n })\n } else {\n this._$root = /** @type {RootElementType} */ ($root)\n }\n\n childConstructor.checkSupport()\n\n this.checkInitialised()\n\n const moduleName = childConstructor.moduleName\n\n this.$root.setAttribute(`data-${moduleName}-init`, '')\n }\n\n /**\n * Validates whether component is already initialised\n *\n * @private\n * @throws {InitError} when component is already initialised\n */\n checkInitialised() {\n const constructor = /** @type {ChildClassConstructor} */ (this.constructor)\n const moduleName = constructor.moduleName\n\n if (moduleName && isInitialised(this.$root, moduleName)) {\n throw new InitError(constructor)\n }\n }\n\n /**\n * Validates whether components are supported\n *\n * @throws {SupportError} when the components are not supported\n */\n static checkSupport() {\n if (!isSupported()) {\n throw new SupportError()\n }\n }\n}\n\n/**\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n */\n\n/**\n * @typedef {typeof Component & ChildClass} ChildClassConstructor\n */\n","import { Component } from '../component.mjs'\nimport { ConfigError } from '../errors/index.mjs'\n\nimport { isObject, formatErrorMessage } from './index.mjs'\n\nexport const configOverride = Symbol.for('configOverride')\n\n/**\n * Base Component class\n *\n * Centralises the behaviours shared by our components\n *\n * @virtual\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @template {Element & { dataset: DOMStringMap }} [RootElementType=HTMLElement]\n * @augments Component<RootElementType>\n */\nexport class ConfigurableComponent extends Component {\n /**\n * configOverride\n *\n * Function which defines configuration overrides to prioritize\n * properties from the root element's dataset.\n *\n * It should take a subset of configuration as input and return\n * a new configuration object with properties that should be\n * overridden based on the root element's dataset. A Symbol\n * is used for indexing to prevent conflicts.\n *\n * @internal\n * @virtual\n * @param {Partial<ConfigurationType>} [param] - Configuration object\n * @returns {Partial<ConfigurationType>} return - Configuration object\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n [configOverride](param) {\n return {}\n }\n\n /**\n * Returns the root element of the component\n *\n * @protected\n * @returns {ConfigurationType} - the root element of component\n */\n get config() {\n return this._config\n }\n\n /**\n *\n * @type {ConfigurationType}\n */\n _config\n\n /**\n * Constructs a new component, validating that GOV.UK Frontend is supported\n *\n * @internal\n * @param {Element | null} [$root] - HTML element to use for component\n * @param {ConfigurationType} [config] - HTML element to use for component\n */\n constructor($root, config) {\n super($root)\n\n const childConstructor =\n /** @type {ChildClassConstructor<ConfigurationType>} */ (this.constructor)\n\n if (!isObject(childConstructor.defaults)) {\n throw new ConfigError(\n formatErrorMessage(\n childConstructor,\n 'Config passed as parameter into constructor but no defaults defined'\n )\n )\n }\n\n const datasetConfig = /** @type {ConfigurationType} */ (\n normaliseDataset(childConstructor, this._$root.dataset)\n )\n\n this._config = /** @type {ConfigurationType} */ (\n mergeConfigs(\n childConstructor.defaults,\n config ?? {},\n this[configOverride](datasetConfig),\n datasetConfig\n )\n )\n }\n}\n\n/**\n * Normalise string\n *\n * 'If it looks like a duck, and it quacks like a duck…' 🦆\n *\n * If the passed value looks like a boolean or a number, convert it to a boolean\n * or number.\n *\n * Designed to be used to convert config passed via data attributes (which are\n * always strings) into something sensible.\n *\n * @internal\n * @param {DOMStringMap[string]} value - The value to normalise\n * @param {SchemaProperty} [property] - Component schema property\n * @returns {string | boolean | number | undefined} Normalised data\n */\nexport function normaliseString(value, property) {\n const trimmedValue = value ? value.trim() : ''\n\n let output\n let outputType = property?.type\n\n // No schema type set? Determine automatically\n if (!outputType) {\n if (['true', 'false'].includes(trimmedValue)) {\n outputType = 'boolean'\n }\n\n // Empty / whitespace-only strings are considered finite so we need to check\n // the length of the trimmed string as well\n if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {\n outputType = 'number'\n }\n }\n\n switch (outputType) {\n case 'boolean':\n output = trimmedValue === 'true'\n break\n\n case 'number':\n output = Number(trimmedValue)\n break\n\n default:\n output = value\n }\n\n return output\n}\n\n/**\n * Normalise dataset\n *\n * Loop over an object and normalise each value using {@link normaliseString},\n * optionally expanding nested `i18n.field`\n *\n * @internal\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @template {[keyof ConfigurationType, SchemaProperty | undefined][]} SchemaEntryType\n * @param {{ schema?: Schema<ConfigurationType>, moduleName: string }} Component - Component class\n * @param {DOMStringMap} dataset - HTML element dataset\n * @returns {ObjectNested} Normalised dataset\n */\nexport function normaliseDataset(Component, dataset) {\n if (!isObject(Component.schema)) {\n throw new ConfigError(\n formatErrorMessage(\n Component,\n 'Config passed as parameter into constructor but no schema defined'\n )\n )\n }\n\n const out = /** @type {ObjectNested} */ ({})\n const entries = /** @type {SchemaEntryType} */ (\n Object.entries(Component.schema.properties)\n )\n\n // Normalise top-level dataset ('data-*') values using schema types\n for (const entry of entries) {\n const [namespace, property] = entry\n\n // Cast the `namespace` to string so it can be used to access the dataset\n const field = namespace.toString()\n\n if (field in dataset) {\n out[field] = normaliseString(dataset[field], property)\n }\n\n /**\n * Extract and normalise nested object values automatically using\n * {@link normaliseString} but only schema object types are allowed\n */\n if (property?.type === 'object') {\n out[field] = extractConfigByNamespace(\n Component.schema,\n dataset,\n namespace\n )\n }\n }\n\n return out\n}\n\n/**\n * Config merging function\n *\n * Takes any number of objects and combines them together, with\n * greatest priority on the LAST item passed in.\n *\n * @internal\n * @param {...{ [key: string]: unknown }} configObjects - Config objects to merge\n * @returns {{ [key: string]: unknown }} A merged config object\n */\nexport function mergeConfigs(...configObjects) {\n // Start with an empty object as our base\n /** @type {{ [key: string]: unknown }} */\n const formattedConfigObject = {}\n\n // Loop through each of the passed objects\n for (const configObject of configObjects) {\n for (const key of Object.keys(configObject)) {\n const option = formattedConfigObject[key]\n const override = configObject[key]\n\n // Push their keys one-by-one into formattedConfigObject. Any duplicate\n // keys with object values will be merged, otherwise the new value will\n // override the existing value.\n if (isObject(option) && isObject(override)) {\n formattedConfigObject[key] = mergeConfigs(option, override)\n } else {\n // Apply override\n formattedConfigObject[key] = override\n }\n }\n }\n\n return formattedConfigObject\n}\n\n/**\n * Validate component config by schema\n *\n * Follows limited examples in JSON schema for wider support in future\n *\n * {@link https://ajv.js.org/json-schema.html#compound-keywords}\n * {@link https://ajv.js.org/packages/ajv-errors.html#single-message}\n *\n * @internal\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @param {Schema<ConfigurationType>} schema - The schema of a component\n * @param {ConfigurationType} config - Component config\n * @returns {string[]} List of validation errors\n */\nexport function validateConfig(schema, config) {\n const validationErrors = []\n\n // Check errors for each schema\n for (const [name, conditions] of Object.entries(schema)) {\n const errors = []\n\n // Check errors for each schema condition\n if (Array.isArray(conditions)) {\n for (const { required, errorMessage } of conditions) {\n if (!required.every((key) => !!config[key])) {\n errors.push(errorMessage) // Missing config key value\n }\n }\n\n // Check one condition passes or add errors\n if (name === 'anyOf' && !(conditions.length - errors.length >= 1)) {\n validationErrors.push(...errors)\n }\n }\n }\n\n return validationErrors\n}\n\n/**\n * Extracts keys starting with a particular namespace from dataset ('data-*')\n * object, removing the namespace in the process, normalising all values\n *\n * @internal\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @param {Schema<ConfigurationType>} schema - The schema of a component\n * @param {DOMStringMap} dataset - The object to extract key-value pairs from\n * @param {keyof ConfigurationType} namespace - The namespace to filter keys with\n * @returns {ObjectNested | undefined} Nested object with dot-separated key namespace removed\n */\nexport function extractConfigByNamespace(schema, dataset, namespace) {\n const property = schema.properties[namespace]\n\n // Only extract configs for object schema properties\n if (property?.type !== 'object') {\n return\n }\n\n // Add default empty config\n const newObject = /** @type {Record<typeof namespace, ObjectNested>} */ ({\n [namespace]: {}\n })\n\n for (const [key, value] of Object.entries(dataset)) {\n /** @type {ObjectNested | ObjectNested[NestedKey]} */\n let current = newObject\n\n // Split the key into parts, using . as our namespace separator\n const keyParts = key.split('.')\n\n /**\n * Create new level per part\n *\n * e.g. 'i18n.textareaDescription.other' becomes\n * `{ i18n: { textareaDescription: { other } } }`\n */\n for (const [index, name] of keyParts.entries()) {\n if (isObject(current)) {\n // Drop down to nested object until the last part\n if (index < keyParts.length - 1) {\n // New nested object (optionally) replaces existing value\n if (!isObject(current[name])) {\n current[name] = {}\n }\n\n // Drop down into new or existing nested object\n current = current[name]\n } else if (key !== namespace) {\n // Normalised value (optionally) replaces existing value\n current[name] = normaliseString(value)\n }\n }\n }\n }\n\n return newObject[namespace]\n}\n\n/**\n * @internal\n * @typedef {keyof ObjectNested} NestedKey\n * @typedef {{ [key: string]: string | boolean | number | ObjectNested | undefined }} ObjectNested\n */\n\n/**\n * Schema for component config\n *\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @typedef {object} Schema\n * @property {Record<keyof ConfigurationType, SchemaProperty | undefined>} properties - Schema properties\n * @property {SchemaCondition<ConfigurationType>[]} [anyOf] - List of schema conditions\n */\n\n/**\n * Schema property for component config\n *\n * @typedef {object} SchemaProperty\n * @property {'string' | 'boolean' | 'number' | 'object'} type - Property type\n */\n\n/**\n * Schema condition for component config\n *\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @typedef {object} SchemaCondition\n * @property {(keyof ConfigurationType)[]} required - List of required config fields\n * @property {string} errorMessage - Error message when required config fields not provided\n */\n\n/**\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n * @property {Schema<ConfigurationType>} [schema] - The schema of the component configuration\n * @property {ConfigurationType} [defaults] - The default values of the configuration of the component\n */\n\n/**\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @typedef {typeof Component & ChildClass<ConfigurationType>} ChildClassConstructor<ConfigurationType>\n */\n","import { ConfigurableComponent } from '../../common/configuration.mjs'\nimport { setFocus } from '../../common/index.mjs'\n\n/**\n * Notification Banner component\n *\n * @preserve\n * @augments ConfigurableComponent<NotificationBannerConfig>\n */\nexport class NotificationBanner extends ConfigurableComponent {\n /**\n * @param {Element | null} $root - HTML element to use for notification banner\n * @param {NotificationBannerConfig} [config] - Notification banner config\n */\n constructor($root, config = {}) {\n super($root, config)\n\n /**\n * Focus the notification banner\n *\n * If `role=\"alert\"` is set, focus the element to help some assistive\n * technologies prioritise announcing it.\n *\n * You can turn off the auto-focus functionality by setting\n * `data-disable-auto-focus=\"true\"` in the component HTML. You might wish to\n * do this based on user research findings, or to avoid a clash with another\n * element which should be focused when the page loads.\n */\n if (\n this.$root.getAttribute('role') === 'alert' &&\n !this.config.disableAutoFocus\n ) {\n setFocus(this.$root)\n }\n }\n\n /**\n * Name for the component used when initialising using data-module attributes.\n */\n static moduleName = 'govuk-notification-banner'\n\n /**\n * Notification banner default config\n *\n * @see {@link NotificationBannerConfig}\n * @constant\n * @type {NotificationBannerConfig}\n */\n static defaults = Object.freeze({\n disableAutoFocus: false\n })\n\n /**\n * Notification banner config schema\n *\n * @constant\n * @satisfies {Schema<NotificationBannerConfig>}\n */\n static schema = Object.freeze({\n properties: {\n disableAutoFocus: { type: 'boolean' }\n }\n })\n}\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\n/**\n * @import { Schema } from '../../common/configuration.mjs'\n */\n"],"names":["setFocus","$element","options","_options$onBeforeFocu","isFocusable","getAttribute","setAttribute","onFocus","addEventListener","onBlur","once","_options$onBlur","call","removeAttribute","onBeforeFocus","focus","isInitialised","$root","moduleName","HTMLElement","hasAttribute","isSupported","$scope","document","body","classList","contains","isArray","option","Array","isObject","formatErrorMessage","Component","message","GOVUKFrontendError","Error","constructor","args","name","SupportError","supportMessage","HTMLScriptElement","prototype","ConfigError","ElementError","messageOrOptions","component","identifier","element","expectedType","InitError","componentOrMessage","_$root","childConstructor","elementType","checkSupport","checkInitialised","configOverride","Symbol","for","ConfigurableComponent","param","config","_config","defaults","datasetConfig","normaliseDataset","dataset","mergeConfigs","normaliseString","value","property","trimmedValue","trim","output","outputType","type","includes","length","isFinite","Number","schema","out","entries","Object","properties","entry","namespace","field","toString","extractConfigByNamespace","configObjects","formattedConfigObject","configObject","key","keys","override","newObject","current","keyParts","split","index","NotificationBanner","disableAutoFocus","freeze"],"mappings":";;;;;;EA4DO,SAASA,QAAQA,CAACC,QAAQ,EAAEC,OAAO,GAAG,EAAE,EAAE;EAAA,EAAA,IAAAC,qBAAA;EAC/C,EAAA,MAAMC,WAAW,GAAGH,QAAQ,CAACI,YAAY,CAAC,UAAU,CAAC;IAErD,IAAI,CAACD,WAAW,EAAE;EAChBH,IAAAA,QAAQ,CAACK,YAAY,CAAC,UAAU,EAAE,IAAI,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G,MAAM,CAACoB,MAAM,CAAC;EAC5BnB,EAAAA,UAAU,EAAE;EACVkB,IAAAA,gBAAgB,EAAE;EAAE3B,MAAAA,IAAI,EAAE;EAAU;EACtC;EACF,CAAC,CAAC;;;;;;;;"}
1
+ {"version":3,"file":"notification-banner.bundle.js","sources":["../../../../src/govuk/common/index.mjs","../../../../src/govuk/errors/index.mjs","../../../../src/govuk/component.mjs","../../../../src/govuk/common/configuration.mjs","../../../../src/govuk/components/notification-banner/notification-banner.mjs"],"sourcesContent":["/**\n * Common helpers which do not require polyfill.\n *\n * IMPORTANT: If a helper require a polyfill, please isolate it in its own module\n * so that the polyfill can be properly tree-shaken and does not burden\n * the components that do not need that helper\n */\n\n/**\n * Get GOV.UK Frontend breakpoint value from CSS custom property\n *\n * @private\n * @param {string} name - Breakpoint name\n * @returns {{ property: string, value?: string }} Breakpoint object\n */\nexport function getBreakpoint(name) {\n const property = `--govuk-breakpoint-${name}`\n\n // Get value from `<html>` with breakpoints on CSS :root\n const value = window\n .getComputedStyle(document.documentElement)\n .getPropertyValue(property)\n\n return {\n property,\n value: value || undefined\n }\n}\n\n/**\n * Move focus to element\n *\n * Sets tabindex to -1 to make the element programmatically focusable,\n * but removes it on blur as the element doesn't need to be focused again.\n *\n * @private\n * @template {HTMLElement} FocusElement\n * @param {FocusElement} $element - HTML element\n * @param {object} [options] - Handler options\n * @param {function(this: FocusElement): void} [options.onBeforeFocus] - Callback before focus\n * @param {function(this: FocusElement): void} [options.onBlur] - Callback on blur\n */\nexport function setFocus($element, options = {}) {\n const isFocusable = $element.getAttribute('tabindex')\n\n if (!isFocusable) {\n $element.setAttribute('tabindex', '-1')\n }\n\n /**\n * Handle element focus\n */\n function onFocus() {\n $element.addEventListener('blur', onBlur, { once: true })\n }\n\n /**\n * Handle element blur\n */\n function onBlur() {\n options.onBlur?.call($element)\n\n if (!isFocusable) {\n $element.removeAttribute('tabindex')\n }\n }\n\n // Add listener to reset element on blur, after focus\n $element.addEventListener('focus', onFocus, { once: true })\n\n // Focus element\n options.onBeforeFocus?.call($element)\n $element.focus()\n}\n\n/**\n * Checks if component is already initialised\n *\n * @internal\n * @param {Element} $root - HTML element to be checked\n * @param {string} moduleName - name of component module\n * @returns {boolean} Whether component is already initialised\n */\nexport function isInitialised($root, moduleName) {\n return (\n $root instanceof HTMLElement &&\n $root.hasAttribute(`data-${moduleName}-init`)\n )\n}\n\n/**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * Some browsers will load and run our JavaScript but GOV.UK Frontend\n * won't be supported.\n *\n * @param {HTMLElement | null} [$scope] - (internal) `<body>` HTML element checked for browser support\n * @returns {boolean} Whether GOV.UK Frontend is supported on this page\n */\nexport function isSupported($scope = document.body) {\n if (!$scope) {\n return false\n }\n\n return $scope.classList.contains('govuk-frontend-supported')\n}\n\n/**\n * Check for an array\n *\n * @internal\n * @param {unknown} option - Option to check\n * @returns {boolean} Whether the option is an array\n */\nfunction isArray(option) {\n return Array.isArray(option)\n}\n\n/**\n * Check for an object\n *\n * @internal\n * @template {Partial<Record<keyof ObjectType, unknown>>} ObjectType\n * @param {unknown | ObjectType} option - Option to check\n * @returns {option is ObjectType} Whether the option is an object\n */\nexport function isObject(option) {\n return !!option && typeof option === 'object' && !isArray(option)\n}\n\n/**\n * Check for valid scope\n *\n * @internal\n * @template {Element | Document} ScopeType\n * @param {unknown | ScopeType} $scope - Scope of the document to search within\n * @returns {$scope is ScopeType} Whether the scope can be queried\n */\nexport function isScope($scope) {\n return !!$scope && ($scope instanceof Element || $scope instanceof Document)\n}\n\n/**\n * Format error message\n *\n * @internal\n * @param {ComponentWithModuleName} Component - Component that threw the error\n * @param {string} message - Error message\n * @returns {string} - Formatted error message\n */\nexport function formatErrorMessage(Component, message) {\n return `${Component.moduleName}: ${message}`\n}\n\n/* eslint-disable jsdoc/valid-types --\n * `{new(...args: any[] ): object}` is not recognised as valid\n * https://github.com/gajus/eslint-plugin-jsdoc/issues/145#issuecomment-1308722878\n * https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/131\n **/\n\n/**\n * @typedef ComponentWithModuleName\n * @property {string} moduleName - Name of the component\n */\n\n/* eslint-enable jsdoc/valid-types */\n","import { formatErrorMessage, isObject, isScope } from '../common/index.mjs'\n\n/**\n * GOV.UK Frontend error\n *\n * A base class for `Error`s thrown by GOV.UK Frontend.\n *\n * It is meant to be extended into specific types of errors\n * to be thrown by our code.\n *\n * @example\n * ```js\n * class MissingRootError extends GOVUKFrontendError {\n * // Setting an explicit name is important as extending the class will not\n * // set a new `name` on the subclass. The `name` property is important\n * // to ensure intelligible error names even if the class name gets\n * // mangled by a minifier\n * name = \"MissingRootError\"\n * }\n * ```\n * @virtual\n */\nexport class GOVUKFrontendError extends Error {\n name = 'GOVUKFrontendError'\n}\n\n/**\n * Indicates that GOV.UK Frontend is not supported\n */\nexport class SupportError extends GOVUKFrontendError {\n name = 'SupportError'\n\n /**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * @param {Element | Document | null | string} [scopeOrMessage] - HTML element `<body>` checked for browser support or support error message\n */\n constructor(scopeOrMessage = document.body) {\n let supportMessage =\n 'noModule' in HTMLScriptElement.prototype\n ? 'GOV.UK Frontend initialised without `<body class=\"govuk-frontend-supported\">` from template `<script>` snippet'\n : 'GOV.UK Frontend is not supported in this browser'\n\n if (!isScope(scopeOrMessage)) {\n supportMessage =\n 'GOV.UK Frontend initialised without `<script type=\"module\">`'\n }\n\n super(typeof scopeOrMessage === 'string' ? scopeOrMessage : supportMessage)\n }\n}\n\n/**\n * Indicates that a component has received an illegal configuration\n */\nexport class ConfigError extends GOVUKFrontendError {\n name = 'ConfigError'\n}\n\n/**\n * Indicates an issue with an element (possibly `null` or `undefined`)\n */\nexport class ElementError extends GOVUKFrontendError {\n name = 'ElementError'\n\n /**\n * @internal\n * @overload\n * @param {string} message - Element error message\n */\n\n /**\n * @internal\n * @overload\n * @param {ElementErrorOptions} options - Element error options\n */\n\n /**\n * @internal\n * @param {string | ElementErrorOptions} messageOrOptions - Element error message or options\n */\n constructor(messageOrOptions) {\n let message = typeof messageOrOptions === 'string' ? messageOrOptions : ''\n\n // Build message from options\n if (isObject(messageOrOptions)) {\n const { component, identifier, element, expectedType } = messageOrOptions\n\n message = identifier\n\n // Append reason\n message += element\n ? ` is not of type ${expectedType ?? 'HTMLElement'}`\n : ' not found'\n\n // Prepend with module name (optional)\n if (component) {\n message = formatErrorMessage(component, message)\n }\n }\n\n super(message)\n }\n}\n\n/**\n * Indicates that a component is already initialised\n */\nexport class InitError extends GOVUKFrontendError {\n name = 'InitError'\n\n /**\n * @internal\n * @param {ComponentWithModuleName | string} componentOrMessage - name of the component module\n */\n constructor(componentOrMessage) {\n const message =\n typeof componentOrMessage === 'string'\n ? componentOrMessage\n : formatErrorMessage(\n componentOrMessage,\n `Root element (\\`$root\\`) already initialised`\n )\n\n super(message)\n }\n}\n\n/**\n * Element error options\n *\n * @internal\n * @typedef {object} ElementErrorOptions\n * @property {Element | Document | null} [element] - The element in error (optional)\n * @property {ComponentWithModuleName} [component] - Component throwing the error (optional)\n * @property {string} identifier - An identifier that'll let the user understand which element has an error. This is whatever makes the most sense\n * @property {string} [expectedType] - The type that was expected for the identifier (optional)\n */\n\n/**\n * @import { ComponentWithModuleName } from '../common/index.mjs'\n */\n","/* eslint-disable es-x/no-global-this */\n\nimport { isInitialised, isSupported } from './common/index.mjs'\nimport { ElementError, InitError, SupportError } from './errors/index.mjs'\n\nconst _self =\n typeof globalThis !== 'undefined'\n ? globalThis // Modern browsers, Node.js\n : self // Old browsers, web workers\n\n/**\n * Base Component class\n *\n * Centralises the behaviours shared by our components\n *\n * @virtual\n * @template {Element} [RootElementType=HTMLElement]\n */\nexport class Component {\n /**\n * @type {typeof Element}\n */\n static elementType = _self.HTMLElement\n\n // allows Typescript user to work around the lack of types\n // in GOVUKFrontend package, Typescript is not aware of $root\n // in components that extend GOVUKFrontendComponent\n /**\n * Returns the root element of the component\n *\n * @protected\n * @returns {RootElementType} - the root element of component\n */\n get $root() {\n return this._$root\n }\n\n /**\n * @protected\n * @type {RootElementType}\n */\n _$root\n\n /**\n * Constructs a new component, validating that GOV.UK Frontend is supported\n *\n * @internal\n * @param {Element | null} [$root] - HTML element to use for component\n */\n constructor($root) {\n const childConstructor = /** @type {ChildClassConstructor} */ (\n this.constructor\n )\n\n // TypeScript does not enforce that inheriting classes will define a `moduleName`\n // (even if we add a `@virtual` `static moduleName` property to this class).\n // While we trust users to do this correctly, we do a little check to provide them\n // a helpful error message.\n //\n // After this, we'll be sure that `childConstructor` has a `moduleName`\n // as expected of the `ChildClassConstructor` we've cast `this.constructor` to.\n if (typeof childConstructor.moduleName !== 'string') {\n throw new InitError(`\\`moduleName\\` not defined in component`)\n }\n\n if (!($root instanceof childConstructor.elementType)) {\n throw new ElementError({\n element: $root,\n component: childConstructor,\n identifier: 'Root element (`$root`)',\n expectedType: childConstructor.elementType.name\n })\n } else {\n this._$root = /** @type {RootElementType} */ ($root)\n }\n\n childConstructor.checkSupport()\n\n this.checkInitialised()\n\n const moduleName = childConstructor.moduleName\n\n this.$root.setAttribute(`data-${moduleName}-init`, '')\n }\n\n /**\n * Validates whether component is already initialised\n *\n * @private\n * @throws {InitError} when component is already initialised\n */\n checkInitialised() {\n const constructor = /** @type {ChildClassConstructor} */ (this.constructor)\n const moduleName = constructor.moduleName\n\n if (moduleName && isInitialised(this.$root, moduleName)) {\n throw new InitError(constructor)\n }\n }\n\n /**\n * Validates whether components are supported\n *\n * @throws {SupportError} when the components are not supported\n */\n static checkSupport() {\n if (!isSupported()) {\n throw new SupportError()\n }\n }\n}\n\n/**\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n */\n\n/**\n * @typedef {typeof Component & ChildClass} ChildClassConstructor\n */\n","import { Component } from '../component.mjs'\nimport { ConfigError } from '../errors/index.mjs'\n\nimport { isObject, isScope, formatErrorMessage } from './index.mjs'\n\nexport const configOverride = Symbol.for('configOverride')\n\n/**\n * Base Component class\n *\n * Centralises the behaviours shared by our components\n *\n * @virtual\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @template {Element & { dataset: DOMStringMap }} [RootElementType=HTMLElement]\n * @augments Component<RootElementType>\n */\nexport class ConfigurableComponent extends Component {\n /**\n * configOverride\n *\n * Function which defines configuration overrides to prioritize\n * properties from the root element's dataset.\n *\n * It should take a subset of configuration as input and return\n * a new configuration object with properties that should be\n * overridden based on the root element's dataset. A Symbol\n * is used for indexing to prevent conflicts.\n *\n * @internal\n * @virtual\n * @param {Partial<ConfigurationType>} [param] - Configuration object\n * @returns {Partial<ConfigurationType>} return - Configuration object\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n [configOverride](param) {\n return {}\n }\n\n /**\n * Returns the root element of the component\n *\n * @protected\n * @returns {ConfigurationType} - the root element of component\n */\n get config() {\n return this._config\n }\n\n /**\n *\n * @type {ConfigurationType}\n */\n _config\n\n /**\n * Constructs a new component, validating that GOV.UK Frontend is supported\n *\n * @internal\n * @param {Element | null} [$root] - HTML element to use for component\n * @param {ConfigurationType} [config] - HTML element to use for component\n */\n constructor($root, config) {\n super($root)\n\n const childConstructor =\n /** @type {ChildClassConstructor<ConfigurationType>} */ (this.constructor)\n\n if (!isObject(childConstructor.defaults)) {\n throw new ConfigError(\n formatErrorMessage(\n childConstructor,\n 'Config passed as parameter into constructor but no defaults defined'\n )\n )\n }\n\n const datasetConfig = /** @type {ConfigurationType} */ (\n normaliseDataset(childConstructor, this._$root.dataset)\n )\n\n // Override defaults with JavaScript config\n this._config = /** @type {ConfigurationType} */ (\n mergeConfigs(childConstructor.defaults, config ?? {})\n )\n\n // Override merged config with dataset config\n this._config = /** @type {ConfigurationType} */ (\n mergeConfigs(\n this._config,\n this[configOverride](datasetConfig),\n datasetConfig\n )\n )\n }\n}\n\n/**\n * Normalise string\n *\n * 'If it looks like a duck, and it quacks like a duck…' 🦆\n *\n * If the passed value looks like a boolean or a number, convert it to a boolean\n * or number.\n *\n * Designed to be used to convert config passed via data attributes (which are\n * always strings) into something sensible.\n *\n * @internal\n * @param {DOMStringMap[string]} value - The value to normalise\n * @param {SchemaProperty} [property] - Component schema property\n * @returns {string | boolean | number | undefined} Normalised data\n */\nexport function normaliseString(value, property) {\n if (\n property?.type &&\n !['string', 'number', 'boolean'].includes(property.type)\n ) {\n return\n }\n\n const trimmedValue = value ? value.trim() : ''\n\n let output\n let outputType = property?.type\n\n // No schema type set? Determine automatically\n if (!outputType) {\n if (['true', 'false'].includes(trimmedValue)) {\n outputType = 'boolean'\n }\n\n // Empty / whitespace-only strings are considered finite so we need to check\n // the length of the trimmed string as well\n if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {\n outputType = 'number'\n }\n }\n\n switch (outputType) {\n case 'boolean':\n output = trimmedValue === 'true'\n break\n\n case 'number':\n output = Number(trimmedValue)\n break\n\n default:\n output = value\n }\n\n return output\n}\n\n/**\n * Normalise dataset\n *\n * Loop over an object and normalise each value using {@link normaliseString},\n * optionally expanding nested `i18n.field`\n *\n * @internal\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @template {[keyof ConfigurationType, SchemaProperty | undefined][]} SchemaEntryType\n * @param {{ schema?: Schema<ConfigurationType>, moduleName: string }} Component - Component class\n * @param {DOMStringMap} dataset - HTML element dataset\n * @returns {ObjectNested} Normalised dataset\n */\nexport function normaliseDataset(Component, dataset) {\n if (!isObject(Component.schema)) {\n throw new ConfigError(\n formatErrorMessage(\n Component,\n 'Config passed as parameter into constructor but no schema defined'\n )\n )\n }\n\n const out = /** @type {ObjectNested} */ ({})\n const entries = /** @type {SchemaEntryType} */ (\n Object.entries(Component.schema.properties)\n )\n\n // Normalise top-level dataset ('data-*') values using schema types\n for (const entry of entries) {\n const [namespace, property] = entry\n\n // Cast the `namespace` to string so it can be used to access the dataset\n const field = namespace.toString()\n\n if (field in dataset) {\n out[field] = normaliseString(dataset[field], property)\n }\n\n /**\n * Extract and normalise nested object values automatically using\n * {@link normaliseString} but only schema object types are allowed\n */\n if (property?.type === 'object') {\n out[field] = extractConfigByNamespace(\n Component.schema,\n dataset,\n namespace\n )\n }\n }\n\n return out\n}\n\n/**\n * Normalise options passed to `initAll` or `createAll`\n *\n * @internal\n * @template {CompatibleClass} ComponentClass\n * @param {Config | CreateAllOptions<ComponentClass> | OnErrorCallback<ComponentClass> | Element | Document | null} [scopeOrOptions] - Scope of the document to search within, initialisation options or error callback function\n * @returns {CreateAllOptions<ComponentClass>} Normalised options\n */\nexport function normaliseOptions(scopeOrOptions) {\n let /** @type {Element | Document | null} */ $scope = document\n let /** @type {OnErrorCallback<ComponentClass> | undefined} */ onError\n\n // Handle options object\n if (isObject(scopeOrOptions)) {\n const options = scopeOrOptions\n\n // Scope must be valid or null\n if (isScope(options.scope) || options.scope === null) {\n $scope = options.scope\n }\n\n // Error handler must be a function\n if (typeof options.onError === 'function') {\n onError = options.onError\n }\n }\n\n if (isScope(scopeOrOptions)) {\n $scope = scopeOrOptions\n } else if (scopeOrOptions === null) {\n $scope = null\n } else if (typeof scopeOrOptions === 'function') {\n onError = scopeOrOptions\n }\n\n return {\n scope: $scope,\n onError\n }\n}\n\n/**\n * Config merging function\n *\n * Takes any number of objects and combines them together, with\n * greatest priority on the LAST item passed in.\n *\n * @internal\n * @param {...{ [key: string]: unknown }} configObjects - Config objects to merge\n * @returns {{ [key: string]: unknown }} A merged config object\n */\nexport function mergeConfigs(...configObjects) {\n // Start with an empty object as our base\n /** @type {{ [key: string]: unknown }} */\n const formattedConfigObject = {}\n\n // Loop through each of the passed objects\n for (const configObject of configObjects) {\n for (const key of Object.keys(configObject)) {\n const option = formattedConfigObject[key]\n const override = configObject[key]\n\n // Push their keys one-by-one into formattedConfigObject. Any duplicate\n // keys with object values will be merged, otherwise the new value will\n // override the existing value.\n if (isObject(option) && isObject(override)) {\n formattedConfigObject[key] = mergeConfigs(option, override)\n } else {\n // Apply override\n formattedConfigObject[key] = override\n }\n }\n }\n\n return formattedConfigObject\n}\n\n/**\n * Validate component config by schema\n *\n * Follows limited examples in JSON schema for wider support in future\n *\n * {@link https://ajv.js.org/json-schema.html#compound-keywords}\n * {@link https://ajv.js.org/packages/ajv-errors.html#single-message}\n *\n * @internal\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @param {Schema<ConfigurationType>} schema - The schema of a component\n * @param {ConfigurationType} config - Component config\n * @returns {string[]} List of validation errors\n */\nexport function validateConfig(schema, config) {\n const validationErrors = []\n\n // Check errors for each schema\n for (const [name, conditions] of Object.entries(schema)) {\n const errors = []\n\n // Check errors for each schema condition\n if (Array.isArray(conditions)) {\n for (const { required, errorMessage } of conditions) {\n if (!required.every((key) => !!config[key])) {\n errors.push(errorMessage) // Missing config key value\n }\n }\n\n // Check one condition passes or add errors\n if (name === 'anyOf' && !(conditions.length - errors.length >= 1)) {\n validationErrors.push(...errors)\n }\n }\n }\n\n return validationErrors\n}\n\n/**\n * Extracts keys starting with a particular namespace from dataset ('data-*')\n * object, removing the namespace in the process, normalising all values\n *\n * @internal\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @param {Schema<ConfigurationType>} schema - The schema of a component\n * @param {DOMStringMap} dataset - The object to extract key-value pairs from\n * @param {keyof ConfigurationType} namespace - The namespace to filter keys with\n * @returns {ObjectNested | undefined} Nested object with dot-separated key namespace removed\n */\nexport function extractConfigByNamespace(schema, dataset, namespace) {\n const property = schema.properties[namespace]\n\n // Only extract configs for object schema properties\n if (property?.type !== 'object') {\n return\n }\n\n // Add default empty config\n const newObject = /** @type {Record<typeof namespace, ObjectNested>} */ ({\n [namespace]: {}\n })\n\n for (const [key, value] of Object.entries(dataset)) {\n /** @type {ObjectNested | ObjectNested[NestedKey]} */\n let current = newObject\n\n // Split the key into parts, using . as our namespace separator\n const keyParts = key.split('.')\n\n /**\n * Create new level per part\n *\n * e.g. 'i18n.textareaDescription.other' becomes\n * `{ i18n: { textareaDescription: { other } } }`\n */\n for (const [index, name] of keyParts.entries()) {\n if (isObject(current)) {\n // Drop down to nested object until the last part\n if (index < keyParts.length - 1) {\n // New nested object (optionally) replaces existing value\n if (!isObject(current[name])) {\n current[name] = {}\n }\n\n // Drop down into new or existing nested object\n current = current[name]\n } else if (key !== namespace) {\n // Normalised value (optionally) replaces existing value\n current[name] = normaliseString(value)\n }\n }\n }\n }\n\n return newObject[namespace]\n}\n\n/**\n * @internal\n * @typedef {keyof ObjectNested} NestedKey\n * @typedef {{ [key: string]: string | boolean | number | ObjectNested | undefined }} ObjectNested\n */\n\n/**\n * Schema for component config\n *\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @typedef {object} Schema\n * @property {Record<keyof ConfigurationType, SchemaProperty | undefined>} properties - Schema properties\n * @property {SchemaCondition<ConfigurationType>[]} [anyOf] - List of schema conditions\n */\n\n/**\n * Schema property for component config\n *\n * @typedef {object} SchemaProperty\n * @property {'string' | 'boolean' | 'number' | 'object'} type - Property type\n */\n\n/**\n * Schema condition for component config\n *\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @typedef {object} SchemaCondition\n * @property {(keyof ConfigurationType)[]} required - List of required config fields\n * @property {string} errorMessage - Error message when required config fields not provided\n */\n\n/**\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n * @property {Schema<ConfigurationType>} [schema] - The schema of the component configuration\n * @property {ConfigurationType} [defaults] - The default values of the configuration of the component\n */\n\n/**\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @typedef {typeof Component & ChildClass<ConfigurationType>} ChildClassConstructor<ConfigurationType>\n */\n\n/**\n * @import { CompatibleClass, Config, CreateAllOptions, OnErrorCallback } from '../init.mjs'\n */\n","import { ConfigurableComponent } from '../../common/configuration.mjs'\nimport { setFocus } from '../../common/index.mjs'\n\n/**\n * Notification Banner component\n *\n * @preserve\n * @augments ConfigurableComponent<NotificationBannerConfig>\n */\nexport class NotificationBanner extends ConfigurableComponent {\n /**\n * @param {Element | null} $root - HTML element to use for notification banner\n * @param {NotificationBannerConfig} [config] - Notification banner config\n */\n constructor($root, config = {}) {\n super($root, config)\n\n /**\n * Focus the notification banner\n *\n * If `role=\"alert\"` is set, focus the element to help some assistive\n * technologies prioritise announcing it.\n *\n * You can turn off the auto-focus functionality by setting\n * `data-disable-auto-focus=\"true\"` in the component HTML. You might wish to\n * do this based on user research findings, or to avoid a clash with another\n * element which should be focused when the page loads.\n */\n if (\n this.$root.getAttribute('role') === 'alert' &&\n !this.config.disableAutoFocus\n ) {\n setFocus(this.$root)\n }\n }\n\n /**\n * Name for the component used when initialising using data-module attributes.\n */\n static moduleName = 'govuk-notification-banner'\n\n /**\n * Notification banner default config\n *\n * @see {@link NotificationBannerConfig}\n * @constant\n * @type {NotificationBannerConfig}\n */\n static defaults = Object.freeze({\n disableAutoFocus: false\n })\n\n /**\n * Notification banner config schema\n *\n * @constant\n * @satisfies {Schema<NotificationBannerConfig>}\n */\n static schema = Object.freeze({\n properties: {\n disableAutoFocus: { type: 'boolean' }\n }\n })\n}\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\n/**\n * @import { Schema } from '../../common/configuration.mjs'\n */\n"],"names":["setFocus","$element","options","_options$onBeforeFocu","isFocusable","getAttribute","setAttribute","onFocus","addEventListener","onBlur","once","_options$onBlur","call","removeAttribute","onBeforeFocus","focus","isInitialised","$root","moduleName","HTMLElement","hasAttribute","isSupported","$scope","document","body","classList","contains","isArray","option","Array","isObject","isScope","Element","Document","formatErrorMessage","Component","message","GOVUKFrontendError","Error","constructor","args","name","SupportError","scopeOrMessage","supportMessage","HTMLScriptElement","prototype","ConfigError","ElementError","messageOrOptions","component","identifier","element","expectedType","InitError","componentOrMessage","_self","globalThis","self","_$root","childConstructor","elementType","checkSupport","checkInitialised","configOverride","Symbol","for","ConfigurableComponent","param","config","_config","defaults","datasetConfig","normaliseDataset","dataset","mergeConfigs","normaliseString","value","property","type","includes","trimmedValue","trim","output","outputType","length","isFinite","Number","schema","out","entries","Object","properties","entry","namespace","field","toString","extractConfigByNamespace","configObjects","formattedConfigObject","configObject","key","keys","override","newObject","current","keyParts","split","index","NotificationBanner","disableAutoFocus","freeze"],"mappings":";;;;;;EA0CO,SAASA,QAAQA,CAACC,QAAQ,EAAEC,OAAO,GAAG,EAAE,EAAE;EAAA,EAAA,IAAAC,qBAAA;EAC/C,EAAA,MAAMC,WAAW,GAAGH,QAAQ,CAACI,YAAY,CAAC,UAAU,CAAC;IAErD,IAAI,CAACD,WAAW,EAAE;EAChBH,IAAAA,QAAQ,CAACK,YAAY,CAAC,UAAU,EAAE,IAAI,CAAC;EACzC,EAAA;IAKA,SAASC,OAAOA,GAAG;EACjBN,IAAAA,QAAQ,CAACO,gBAAgB,CAAC,MAAM,EAAEC,MAAM,EAAE;EAAEC,MAAAA,IAAI,EAAE;EAAK,KAAC,CAAC;EAC3D,EAAA;IAKA,SAASD,MAAMA,GAAG;EAAA,IAAA,IAAAE,eAAA;MAChB,CAAAA,eAAA,GAAAT,OAAO,CAACO,MAAM,KAAA,IAAA,IAAdE,eAAA,CAAgBC,IAAI,CAACX,QAAQ,CAAC;MAE9B,IAAI,CAACG,WAAW,EAAE;EAChBH,MAAAA,QAAQ,CAACY,eAAe,CAAC,UAAU,CAAC;EACtC,IAAA;EACF,EAAA;EAGAZ,EAAAA,QAAQ,CAACO,gBAAgB,CAAC,OAAO,EAAED,OAAO,EAAE;EAAEG,IAAAA,IAAI,EAAE;EAAK,GAAC,CAAC;IAG3D,CAAAP,qBAAA,GAAAD,OAAO,CAACY,aAAa,KAAA,IAAA,IAArBX,qBAAA,CAAuBS,IAAI,CAACX,QAAQ,CAAC;IACrC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A;;EAEA;EACA;EACA;EApEa4F,kBAAkB,CA8BtB3F,UAAU,GAAG,2BAA2B;EA9BpC2F,kBAAkB,CAuCtBtC,QAAQ,GAAGoB,MAAM,CAACoB,MAAM,CAAC;EAC9BD,EAAAA,gBAAgB,EAAE;EACpB,CAAC,CAAC;EAzCSD,kBAAkB,CAiDtBrB,MAAM,GAAGG,MAAM,CAACoB,MAAM,CAAC;EAC5BnB,EAAAA,UAAU,EAAE;EACVkB,IAAAA,gBAAgB,EAAE;EAAE/B,MAAAA,IAAI,EAAE;EAAU;EACtC;EACF,CAAC,CAAC;;;;"}
@@ -47,6 +47,9 @@ function isArray(option) {
47
47
  function isObject(option) {
48
48
  return !!option && typeof option === 'object' && !isArray(option);
49
49
  }
50
+ function isScope($scope) {
51
+ return !!$scope && ($scope instanceof Element || $scope instanceof Document);
52
+ }
50
53
  function formatErrorMessage(Component, message) {
51
54
  return `${Component.moduleName}: ${message}`;
52
55
  }
@@ -54,9 +57,6 @@ function formatErrorMessage(Component, message) {
54
57
  * @typedef ComponentWithModuleName
55
58
  * @property {string} moduleName - Name of the component
56
59
  */
57
- /**
58
- * @import { ObjectNested } from './configuration.mjs'
59
- */
60
60
 
61
61
  class GOVUKFrontendError extends Error {
62
62
  constructor(...args) {
@@ -68,11 +68,14 @@ class SupportError extends GOVUKFrontendError {
68
68
  /**
69
69
  * Checks if GOV.UK Frontend is supported on this page
70
70
  *
71
- * @param {HTMLElement | null} [$scope] - HTML element `<body>` checked for browser support
71
+ * @param {Element | Document | null | string} [scopeOrMessage] - HTML element `<body>` checked for browser support or support error message
72
72
  */
73
- constructor($scope = document.body) {
74
- const supportMessage = 'noModule' in HTMLScriptElement.prototype ? 'GOV.UK Frontend initialised without `<body class="govuk-frontend-supported">` from template `<script>` snippet' : 'GOV.UK Frontend is not supported in this browser';
75
- super($scope ? supportMessage : 'GOV.UK Frontend initialised without `<script type="module">`');
73
+ constructor(scopeOrMessage = document.body) {
74
+ let supportMessage = 'noModule' in HTMLScriptElement.prototype ? 'GOV.UK Frontend initialised without `<body class="govuk-frontend-supported">` from template `<script>` snippet' : 'GOV.UK Frontend is not supported in this browser';
75
+ if (!isScope(scopeOrMessage)) {
76
+ supportMessage = 'GOV.UK Frontend initialised without `<script type="module">`';
77
+ }
78
+ super(typeof scopeOrMessage === 'string' ? scopeOrMessage : supportMessage);
76
79
  this.name = 'SupportError';
77
80
  }
78
81
  }
@@ -85,7 +88,7 @@ class ConfigError extends GOVUKFrontendError {
85
88
  class ElementError extends GOVUKFrontendError {
86
89
  constructor(messageOrOptions) {
87
90
  let message = typeof messageOrOptions === 'string' ? messageOrOptions : '';
88
- if (typeof messageOrOptions === 'object') {
91
+ if (isObject(messageOrOptions)) {
89
92
  const {
90
93
  component,
91
94
  identifier,
@@ -94,7 +97,9 @@ class ElementError extends GOVUKFrontendError {
94
97
  } = messageOrOptions;
95
98
  message = identifier;
96
99
  message += element ? ` is not of type ${expectedType != null ? expectedType : 'HTMLElement'}` : ' not found';
97
- message = formatErrorMessage(component, message);
100
+ if (component) {
101
+ message = formatErrorMessage(component, message);
102
+ }
98
103
  }
99
104
  super(message);
100
105
  this.name = 'ElementError';
@@ -111,6 +116,7 @@ class InitError extends GOVUKFrontendError {
111
116
  * @import { ComponentWithModuleName } from '../common/index.mjs'
112
117
  */
113
118
 
119
+ const _self = typeof globalThis !== 'undefined' ? globalThis : self;
114
120
  class Component {
115
121
  /**
116
122
  * Returns the root element of the component
@@ -164,7 +170,7 @@ class Component {
164
170
  /**
165
171
  * @typedef {typeof Component & ChildClass} ChildClassConstructor
166
172
  */
167
- Component.elementType = HTMLElement;
173
+ Component.elementType = _self.HTMLElement;
168
174
 
169
175
  const configOverride = Symbol.for('configOverride');
170
176
  class ConfigurableComponent extends Component {
@@ -189,10 +195,14 @@ class ConfigurableComponent extends Component {
189
195
  throw new ConfigError(formatErrorMessage(childConstructor, 'Config passed as parameter into constructor but no defaults defined'));
190
196
  }
191
197
  const datasetConfig = normaliseDataset(childConstructor, this._$root.dataset);
192
- this._config = mergeConfigs(childConstructor.defaults, config != null ? config : {}, this[configOverride](datasetConfig), datasetConfig);
198
+ this._config = mergeConfigs(childConstructor.defaults, config != null ? config : {});
199
+ this._config = mergeConfigs(this._config, this[configOverride](datasetConfig), datasetConfig);
193
200
  }
194
201
  }
195
202
  function normaliseString(value, property) {
203
+ if (property != null && property.type && !['string', 'number', 'boolean'].includes(property.type)) {
204
+ return;
205
+ }
196
206
  const trimmedValue = value ? value.trim() : '';
197
207
  let output;
198
208
  let outputType = property == null ? void 0 : property.type;
@@ -308,6 +318,9 @@ function extractConfigByNamespace(schema, dataset, namespace) {
308
318
  * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]
309
319
  * @typedef {typeof Component & ChildClass<ConfigurationType>} ChildClassConstructor<ConfigurationType>
310
320
  */
321
+ /**
322
+ * @import { CompatibleClass, Config, CreateAllOptions, OnErrorCallback } from '../init.mjs'
323
+ */
311
324
 
312
325
  /**
313
326
  * Notification Banner component
@@ -1 +1 @@
1
- {"version":3,"file":"notification-banner.bundle.mjs","sources":["../../../../src/govuk/common/index.mjs","../../../../src/govuk/errors/index.mjs","../../../../src/govuk/component.mjs","../../../../src/govuk/common/configuration.mjs","../../../../src/govuk/components/notification-banner/notification-banner.mjs"],"sourcesContent":["/**\n * Common helpers which do not require polyfill.\n *\n * IMPORTANT: If a helper require a polyfill, please isolate it in its own module\n * so that the polyfill can be properly tree-shaken and does not burden\n * the components that do not need that helper\n */\n\n/**\n * Get hash fragment from URL\n *\n * Extract the hash fragment (everything after the hash) from a URL,\n * but not including the hash symbol\n *\n * @private\n * @param {string} url - URL\n * @returns {string | undefined} Fragment from URL, without the hash\n */\nexport function getFragmentFromUrl(url) {\n if (!url.includes('#')) {\n return undefined\n }\n\n return url.split('#').pop()\n}\n\n/**\n * Get GOV.UK Frontend breakpoint value from CSS custom property\n *\n * @private\n * @param {string} name - Breakpoint name\n * @returns {{ property: string, value?: string }} Breakpoint object\n */\nexport function getBreakpoint(name) {\n const property = `--govuk-frontend-breakpoint-${name}`\n\n // Get value from `<html>` with breakpoints on CSS :root\n const value = window\n .getComputedStyle(document.documentElement)\n .getPropertyValue(property)\n\n return {\n property,\n value: value || undefined\n }\n}\n\n/**\n * Move focus to element\n *\n * Sets tabindex to -1 to make the element programmatically focusable,\n * but removes it on blur as the element doesn't need to be focused again.\n *\n * @private\n * @template {HTMLElement} FocusElement\n * @param {FocusElement} $element - HTML element\n * @param {object} [options] - Handler options\n * @param {function(this: FocusElement): void} [options.onBeforeFocus] - Callback before focus\n * @param {function(this: FocusElement): void} [options.onBlur] - Callback on blur\n */\nexport function setFocus($element, options = {}) {\n const isFocusable = $element.getAttribute('tabindex')\n\n if (!isFocusable) {\n $element.setAttribute('tabindex', '-1')\n }\n\n /**\n * Handle element focus\n */\n function onFocus() {\n $element.addEventListener('blur', onBlur, { once: true })\n }\n\n /**\n * Handle element blur\n */\n function onBlur() {\n options.onBlur?.call($element)\n\n if (!isFocusable) {\n $element.removeAttribute('tabindex')\n }\n }\n\n // Add listener to reset element on blur, after focus\n $element.addEventListener('focus', onFocus, { once: true })\n\n // Focus element\n options.onBeforeFocus?.call($element)\n $element.focus()\n}\n\n/**\n * Checks if component is already initialised\n *\n * @internal\n * @param {Element} $root - HTML element to be checked\n * @param {string} moduleName - name of component module\n * @returns {boolean} Whether component is already initialised\n */\nexport function isInitialised($root, moduleName) {\n return (\n $root instanceof HTMLElement &&\n $root.hasAttribute(`data-${moduleName}-init`)\n )\n}\n\n/**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * Some browsers will load and run our JavaScript but GOV.UK Frontend\n * won't be supported.\n *\n * @param {HTMLElement | null} [$scope] - (internal) `<body>` HTML element checked for browser support\n * @returns {boolean} Whether GOV.UK Frontend is supported on this page\n */\nexport function isSupported($scope = document.body) {\n if (!$scope) {\n return false\n }\n\n return $scope.classList.contains('govuk-frontend-supported')\n}\n\n/**\n * Check for an array\n *\n * @internal\n * @param {unknown} option - Option to check\n * @returns {boolean} Whether the option is an array\n */\nfunction isArray(option) {\n return Array.isArray(option)\n}\n\n/**\n * Check for an object\n *\n * @internal\n * @template {Partial<Record<keyof ObjectType, unknown>>} [ObjectType=ObjectNested]\n * @param {unknown | ObjectType} option - Option to check\n * @returns {option is ObjectType} Whether the option is an object\n */\nexport function isObject(option) {\n return !!option && typeof option === 'object' && !isArray(option)\n}\n\n/**\n * Format error message\n *\n * @internal\n * @param {ComponentWithModuleName} Component - Component that threw the error\n * @param {string} message - Error message\n * @returns {string} - Formatted error message\n */\nexport function formatErrorMessage(Component, message) {\n return `${Component.moduleName}: ${message}`\n}\n\n/* eslint-disable jsdoc/valid-types --\n * `{new(...args: any[] ): object}` is not recognised as valid\n * https://github.com/gajus/eslint-plugin-jsdoc/issues/145#issuecomment-1308722878\n * https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/131\n **/\n\n/**\n * @typedef ComponentWithModuleName\n * @property {string} moduleName - Name of the component\n */\n\n/* eslint-enable jsdoc/valid-types */\n\n/**\n * @import { ObjectNested } from './configuration.mjs'\n */\n","import { formatErrorMessage } from '../common/index.mjs'\n\n/**\n * GOV.UK Frontend error\n *\n * A base class for `Error`s thrown by GOV.UK Frontend.\n *\n * It is meant to be extended into specific types of errors\n * to be thrown by our code.\n *\n * @example\n * ```js\n * class MissingRootError extends GOVUKFrontendError {\n * // Setting an explicit name is important as extending the class will not\n * // set a new `name` on the subclass. The `name` property is important\n * // to ensure intelligible error names even if the class name gets\n * // mangled by a minifier\n * name = \"MissingRootError\"\n * }\n * ```\n * @virtual\n */\nexport class GOVUKFrontendError extends Error {\n name = 'GOVUKFrontendError'\n}\n\n/**\n * Indicates that GOV.UK Frontend is not supported\n */\nexport class SupportError extends GOVUKFrontendError {\n name = 'SupportError'\n\n /**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * @param {HTMLElement | null} [$scope] - HTML element `<body>` checked for browser support\n */\n constructor($scope = document.body) {\n const supportMessage =\n 'noModule' in HTMLScriptElement.prototype\n ? 'GOV.UK Frontend initialised without `<body class=\"govuk-frontend-supported\">` from template `<script>` snippet'\n : 'GOV.UK Frontend is not supported in this browser'\n\n super(\n $scope\n ? supportMessage\n : 'GOV.UK Frontend initialised without `<script type=\"module\">`'\n )\n }\n}\n\n/**\n * Indicates that a component has received an illegal configuration\n */\nexport class ConfigError extends GOVUKFrontendError {\n name = 'ConfigError'\n}\n\n/**\n * Indicates an issue with an element (possibly `null` or `undefined`)\n */\nexport class ElementError extends GOVUKFrontendError {\n name = 'ElementError'\n\n /**\n * @internal\n * @overload\n * @param {string} message - Element error message\n */\n\n /**\n * @internal\n * @overload\n * @param {ElementErrorOptions} options - Element error options\n */\n\n /**\n * @internal\n * @param {string | ElementErrorOptions} messageOrOptions - Element error message or options\n */\n constructor(messageOrOptions) {\n let message = typeof messageOrOptions === 'string' ? messageOrOptions : ''\n\n // Build message from options\n if (typeof messageOrOptions === 'object') {\n const { component, identifier, element, expectedType } = messageOrOptions\n\n message = identifier\n\n // Append reason\n message += element\n ? ` is not of type ${expectedType ?? 'HTMLElement'}`\n : ' not found'\n\n message = formatErrorMessage(component, message)\n }\n\n super(message)\n }\n}\n\n/**\n * Indicates that a component is already initialised\n */\nexport class InitError extends GOVUKFrontendError {\n name = 'InitError'\n\n /**\n * @internal\n * @param {ComponentWithModuleName | string} componentOrMessage - name of the component module\n */\n constructor(componentOrMessage) {\n const message =\n typeof componentOrMessage === 'string'\n ? componentOrMessage\n : formatErrorMessage(\n componentOrMessage,\n `Root element (\\`$root\\`) already initialised`\n )\n\n super(message)\n }\n}\n\n/**\n * Element error options\n *\n * @internal\n * @typedef {object} ElementErrorOptions\n * @property {string} identifier - An identifier that'll let the user understand which element has an error. This is whatever makes the most sense\n * @property {Element | null} [element] - The element in error\n * @property {string} [expectedType] - The type that was expected for the identifier\n * @property {ComponentWithModuleName} component - Component throwing the error\n */\n\n/**\n * @import { ComponentWithModuleName } from '../common/index.mjs'\n */\n","import { isInitialised, isSupported } from './common/index.mjs'\nimport { ElementError, InitError, SupportError } from './errors/index.mjs'\n\n/**\n * Base Component class\n *\n * Centralises the behaviours shared by our components\n *\n * @virtual\n * @template {Element} [RootElementType=HTMLElement]\n */\nexport class Component {\n /**\n * @type {typeof Element}\n */\n static elementType = HTMLElement\n\n // allows Typescript user to work around the lack of types\n // in GOVUKFrontend package, Typescript is not aware of $root\n // in components that extend GOVUKFrontendComponent\n /**\n * Returns the root element of the component\n *\n * @protected\n * @returns {RootElementType} - the root element of component\n */\n get $root() {\n return this._$root\n }\n\n /**\n * @protected\n * @type {RootElementType}\n */\n _$root\n\n /**\n * Constructs a new component, validating that GOV.UK Frontend is supported\n *\n * @internal\n * @param {Element | null} [$root] - HTML element to use for component\n */\n constructor($root) {\n const childConstructor = /** @type {ChildClassConstructor} */ (\n this.constructor\n )\n\n // TypeScript does not enforce that inheriting classes will define a `moduleName`\n // (even if we add a `@virtual` `static moduleName` property to this class).\n // While we trust users to do this correctly, we do a little check to provide them\n // a helpful error message.\n //\n // After this, we'll be sure that `childConstructor` has a `moduleName`\n // as expected of the `ChildClassConstructor` we've cast `this.constructor` to.\n if (typeof childConstructor.moduleName !== 'string') {\n throw new InitError(`\\`moduleName\\` not defined in component`)\n }\n\n if (!($root instanceof childConstructor.elementType)) {\n throw new ElementError({\n element: $root,\n component: childConstructor,\n identifier: 'Root element (`$root`)',\n expectedType: childConstructor.elementType.name\n })\n } else {\n this._$root = /** @type {RootElementType} */ ($root)\n }\n\n childConstructor.checkSupport()\n\n this.checkInitialised()\n\n const moduleName = childConstructor.moduleName\n\n this.$root.setAttribute(`data-${moduleName}-init`, '')\n }\n\n /**\n * Validates whether component is already initialised\n *\n * @private\n * @throws {InitError} when component is already initialised\n */\n checkInitialised() {\n const constructor = /** @type {ChildClassConstructor} */ (this.constructor)\n const moduleName = constructor.moduleName\n\n if (moduleName && isInitialised(this.$root, moduleName)) {\n throw new InitError(constructor)\n }\n }\n\n /**\n * Validates whether components are supported\n *\n * @throws {SupportError} when the components are not supported\n */\n static checkSupport() {\n if (!isSupported()) {\n throw new SupportError()\n }\n }\n}\n\n/**\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n */\n\n/**\n * @typedef {typeof Component & ChildClass} ChildClassConstructor\n */\n","import { Component } from '../component.mjs'\nimport { ConfigError } from '../errors/index.mjs'\n\nimport { isObject, formatErrorMessage } from './index.mjs'\n\nexport const configOverride = Symbol.for('configOverride')\n\n/**\n * Base Component class\n *\n * Centralises the behaviours shared by our components\n *\n * @virtual\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @template {Element & { dataset: DOMStringMap }} [RootElementType=HTMLElement]\n * @augments Component<RootElementType>\n */\nexport class ConfigurableComponent extends Component {\n /**\n * configOverride\n *\n * Function which defines configuration overrides to prioritize\n * properties from the root element's dataset.\n *\n * It should take a subset of configuration as input and return\n * a new configuration object with properties that should be\n * overridden based on the root element's dataset. A Symbol\n * is used for indexing to prevent conflicts.\n *\n * @internal\n * @virtual\n * @param {Partial<ConfigurationType>} [param] - Configuration object\n * @returns {Partial<ConfigurationType>} return - Configuration object\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n [configOverride](param) {\n return {}\n }\n\n /**\n * Returns the root element of the component\n *\n * @protected\n * @returns {ConfigurationType} - the root element of component\n */\n get config() {\n return this._config\n }\n\n /**\n *\n * @type {ConfigurationType}\n */\n _config\n\n /**\n * Constructs a new component, validating that GOV.UK Frontend is supported\n *\n * @internal\n * @param {Element | null} [$root] - HTML element to use for component\n * @param {ConfigurationType} [config] - HTML element to use for component\n */\n constructor($root, config) {\n super($root)\n\n const childConstructor =\n /** @type {ChildClassConstructor<ConfigurationType>} */ (this.constructor)\n\n if (!isObject(childConstructor.defaults)) {\n throw new ConfigError(\n formatErrorMessage(\n childConstructor,\n 'Config passed as parameter into constructor but no defaults defined'\n )\n )\n }\n\n const datasetConfig = /** @type {ConfigurationType} */ (\n normaliseDataset(childConstructor, this._$root.dataset)\n )\n\n this._config = /** @type {ConfigurationType} */ (\n mergeConfigs(\n childConstructor.defaults,\n config ?? {},\n this[configOverride](datasetConfig),\n datasetConfig\n )\n )\n }\n}\n\n/**\n * Normalise string\n *\n * 'If it looks like a duck, and it quacks like a duck…' 🦆\n *\n * If the passed value looks like a boolean or a number, convert it to a boolean\n * or number.\n *\n * Designed to be used to convert config passed via data attributes (which are\n * always strings) into something sensible.\n *\n * @internal\n * @param {DOMStringMap[string]} value - The value to normalise\n * @param {SchemaProperty} [property] - Component schema property\n * @returns {string | boolean | number | undefined} Normalised data\n */\nexport function normaliseString(value, property) {\n const trimmedValue = value ? value.trim() : ''\n\n let output\n let outputType = property?.type\n\n // No schema type set? Determine automatically\n if (!outputType) {\n if (['true', 'false'].includes(trimmedValue)) {\n outputType = 'boolean'\n }\n\n // Empty / whitespace-only strings are considered finite so we need to check\n // the length of the trimmed string as well\n if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {\n outputType = 'number'\n }\n }\n\n switch (outputType) {\n case 'boolean':\n output = trimmedValue === 'true'\n break\n\n case 'number':\n output = Number(trimmedValue)\n break\n\n default:\n output = value\n }\n\n return output\n}\n\n/**\n * Normalise dataset\n *\n * Loop over an object and normalise each value using {@link normaliseString},\n * optionally expanding nested `i18n.field`\n *\n * @internal\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @template {[keyof ConfigurationType, SchemaProperty | undefined][]} SchemaEntryType\n * @param {{ schema?: Schema<ConfigurationType>, moduleName: string }} Component - Component class\n * @param {DOMStringMap} dataset - HTML element dataset\n * @returns {ObjectNested} Normalised dataset\n */\nexport function normaliseDataset(Component, dataset) {\n if (!isObject(Component.schema)) {\n throw new ConfigError(\n formatErrorMessage(\n Component,\n 'Config passed as parameter into constructor but no schema defined'\n )\n )\n }\n\n const out = /** @type {ObjectNested} */ ({})\n const entries = /** @type {SchemaEntryType} */ (\n Object.entries(Component.schema.properties)\n )\n\n // Normalise top-level dataset ('data-*') values using schema types\n for (const entry of entries) {\n const [namespace, property] = entry\n\n // Cast the `namespace` to string so it can be used to access the dataset\n const field = namespace.toString()\n\n if (field in dataset) {\n out[field] = normaliseString(dataset[field], property)\n }\n\n /**\n * Extract and normalise nested object values automatically using\n * {@link normaliseString} but only schema object types are allowed\n */\n if (property?.type === 'object') {\n out[field] = extractConfigByNamespace(\n Component.schema,\n dataset,\n namespace\n )\n }\n }\n\n return out\n}\n\n/**\n * Config merging function\n *\n * Takes any number of objects and combines them together, with\n * greatest priority on the LAST item passed in.\n *\n * @internal\n * @param {...{ [key: string]: unknown }} configObjects - Config objects to merge\n * @returns {{ [key: string]: unknown }} A merged config object\n */\nexport function mergeConfigs(...configObjects) {\n // Start with an empty object as our base\n /** @type {{ [key: string]: unknown }} */\n const formattedConfigObject = {}\n\n // Loop through each of the passed objects\n for (const configObject of configObjects) {\n for (const key of Object.keys(configObject)) {\n const option = formattedConfigObject[key]\n const override = configObject[key]\n\n // Push their keys one-by-one into formattedConfigObject. Any duplicate\n // keys with object values will be merged, otherwise the new value will\n // override the existing value.\n if (isObject(option) && isObject(override)) {\n formattedConfigObject[key] = mergeConfigs(option, override)\n } else {\n // Apply override\n formattedConfigObject[key] = override\n }\n }\n }\n\n return formattedConfigObject\n}\n\n/**\n * Validate component config by schema\n *\n * Follows limited examples in JSON schema for wider support in future\n *\n * {@link https://ajv.js.org/json-schema.html#compound-keywords}\n * {@link https://ajv.js.org/packages/ajv-errors.html#single-message}\n *\n * @internal\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @param {Schema<ConfigurationType>} schema - The schema of a component\n * @param {ConfigurationType} config - Component config\n * @returns {string[]} List of validation errors\n */\nexport function validateConfig(schema, config) {\n const validationErrors = []\n\n // Check errors for each schema\n for (const [name, conditions] of Object.entries(schema)) {\n const errors = []\n\n // Check errors for each schema condition\n if (Array.isArray(conditions)) {\n for (const { required, errorMessage } of conditions) {\n if (!required.every((key) => !!config[key])) {\n errors.push(errorMessage) // Missing config key value\n }\n }\n\n // Check one condition passes or add errors\n if (name === 'anyOf' && !(conditions.length - errors.length >= 1)) {\n validationErrors.push(...errors)\n }\n }\n }\n\n return validationErrors\n}\n\n/**\n * Extracts keys starting with a particular namespace from dataset ('data-*')\n * object, removing the namespace in the process, normalising all values\n *\n * @internal\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @param {Schema<ConfigurationType>} schema - The schema of a component\n * @param {DOMStringMap} dataset - The object to extract key-value pairs from\n * @param {keyof ConfigurationType} namespace - The namespace to filter keys with\n * @returns {ObjectNested | undefined} Nested object with dot-separated key namespace removed\n */\nexport function extractConfigByNamespace(schema, dataset, namespace) {\n const property = schema.properties[namespace]\n\n // Only extract configs for object schema properties\n if (property?.type !== 'object') {\n return\n }\n\n // Add default empty config\n const newObject = /** @type {Record<typeof namespace, ObjectNested>} */ ({\n [namespace]: {}\n })\n\n for (const [key, value] of Object.entries(dataset)) {\n /** @type {ObjectNested | ObjectNested[NestedKey]} */\n let current = newObject\n\n // Split the key into parts, using . as our namespace separator\n const keyParts = key.split('.')\n\n /**\n * Create new level per part\n *\n * e.g. 'i18n.textareaDescription.other' becomes\n * `{ i18n: { textareaDescription: { other } } }`\n */\n for (const [index, name] of keyParts.entries()) {\n if (isObject(current)) {\n // Drop down to nested object until the last part\n if (index < keyParts.length - 1) {\n // New nested object (optionally) replaces existing value\n if (!isObject(current[name])) {\n current[name] = {}\n }\n\n // Drop down into new or existing nested object\n current = current[name]\n } else if (key !== namespace) {\n // Normalised value (optionally) replaces existing value\n current[name] = normaliseString(value)\n }\n }\n }\n }\n\n return newObject[namespace]\n}\n\n/**\n * @internal\n * @typedef {keyof ObjectNested} NestedKey\n * @typedef {{ [key: string]: string | boolean | number | ObjectNested | undefined }} ObjectNested\n */\n\n/**\n * Schema for component config\n *\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @typedef {object} Schema\n * @property {Record<keyof ConfigurationType, SchemaProperty | undefined>} properties - Schema properties\n * @property {SchemaCondition<ConfigurationType>[]} [anyOf] - List of schema conditions\n */\n\n/**\n * Schema property for component config\n *\n * @typedef {object} SchemaProperty\n * @property {'string' | 'boolean' | 'number' | 'object'} type - Property type\n */\n\n/**\n * Schema condition for component config\n *\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @typedef {object} SchemaCondition\n * @property {(keyof ConfigurationType)[]} required - List of required config fields\n * @property {string} errorMessage - Error message when required config fields not provided\n */\n\n/**\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n * @property {Schema<ConfigurationType>} [schema] - The schema of the component configuration\n * @property {ConfigurationType} [defaults] - The default values of the configuration of the component\n */\n\n/**\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @typedef {typeof Component & ChildClass<ConfigurationType>} ChildClassConstructor<ConfigurationType>\n */\n","import { ConfigurableComponent } from '../../common/configuration.mjs'\nimport { setFocus } from '../../common/index.mjs'\n\n/**\n * Notification Banner component\n *\n * @preserve\n * @augments ConfigurableComponent<NotificationBannerConfig>\n */\nexport class NotificationBanner extends ConfigurableComponent {\n /**\n * @param {Element | null} $root - HTML element to use for notification banner\n * @param {NotificationBannerConfig} [config] - Notification banner config\n */\n constructor($root, config = {}) {\n super($root, config)\n\n /**\n * Focus the notification banner\n *\n * If `role=\"alert\"` is set, focus the element to help some assistive\n * technologies prioritise announcing it.\n *\n * You can turn off the auto-focus functionality by setting\n * `data-disable-auto-focus=\"true\"` in the component HTML. You might wish to\n * do this based on user research findings, or to avoid a clash with another\n * element which should be focused when the page loads.\n */\n if (\n this.$root.getAttribute('role') === 'alert' &&\n !this.config.disableAutoFocus\n ) {\n setFocus(this.$root)\n }\n }\n\n /**\n * Name for the component used when initialising using data-module attributes.\n */\n static moduleName = 'govuk-notification-banner'\n\n /**\n * Notification banner default config\n *\n * @see {@link NotificationBannerConfig}\n * @constant\n * @type {NotificationBannerConfig}\n */\n static defaults = Object.freeze({\n disableAutoFocus: false\n })\n\n /**\n * Notification banner config schema\n *\n * @constant\n * @satisfies {Schema<NotificationBannerConfig>}\n */\n static schema = Object.freeze({\n properties: {\n disableAutoFocus: { type: 'boolean' }\n }\n })\n}\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\n/**\n * @import { Schema } from '../../common/configuration.mjs'\n */\n"],"names":["setFocus","$element","options","_options$onBeforeFocu","isFocusable","getAttribute","setAttribute","onFocus","addEventListener","onBlur","once","_options$onBlur","call","removeAttribute","onBeforeFocus","focus","isInitialised","$root","moduleName","HTMLElement","hasAttribute","isSupported","$scope","document","body","classList","contains","isArray","option","Array","isObject","formatErrorMessage","Component","message","GOVUKFrontendError","Error","constructor","args","name","SupportError","supportMessage","HTMLScriptElement","prototype","ConfigError","ElementError","messageOrOptions","component","identifier","element","expectedType","InitError","componentOrMessage","_$root","childConstructor","elementType","checkSupport","checkInitialised","configOverride","Symbol","for","ConfigurableComponent","param","config","_config","defaults","datasetConfig","normaliseDataset","dataset","mergeConfigs","normaliseString","value","property","trimmedValue","trim","output","outputType","type","includes","length","isFinite","Number","schema","out","entries","Object","properties","entry","namespace","field","toString","extractConfigByNamespace","configObjects","formattedConfigObject","configObject","key","keys","override","newObject","current","keyParts","split","index","NotificationBanner","disableAutoFocus","freeze"],"mappings":"AA4DO,SAASA,QAAQA,CAACC,QAAQ,EAAEC,OAAO,GAAG,EAAE,EAAE;AAAA,EAAA,IAAAC,qBAAA;AAC/C,EAAA,MAAMC,WAAW,GAAGH,QAAQ,CAACI,YAAY,CAAC,UAAU,CAAC;EAErD,IAAI,CAACD,WAAW,EAAE;AAChBH,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CAAC,CAAC;AAzCSD,kBAAkB,CAiDtBrB,MAAM,GAAGG,MAAM,CAACoB,MAAM,CAAC;AAC5BnB,EAAAA,UAAU,EAAE;AACVkB,IAAAA,gBAAgB,EAAE;AAAE3B,MAAAA,IAAI,EAAE;AAAU;AACtC;AACF,CAAC,CAAC;;;;"}
1
+ {"version":3,"file":"notification-banner.bundle.mjs","sources":["../../../../src/govuk/common/index.mjs","../../../../src/govuk/errors/index.mjs","../../../../src/govuk/component.mjs","../../../../src/govuk/common/configuration.mjs","../../../../src/govuk/components/notification-banner/notification-banner.mjs"],"sourcesContent":["/**\n * Common helpers which do not require polyfill.\n *\n * IMPORTANT: If a helper require a polyfill, please isolate it in its own module\n * so that the polyfill can be properly tree-shaken and does not burden\n * the components that do not need that helper\n */\n\n/**\n * Get GOV.UK Frontend breakpoint value from CSS custom property\n *\n * @private\n * @param {string} name - Breakpoint name\n * @returns {{ property: string, value?: string }} Breakpoint object\n */\nexport function getBreakpoint(name) {\n const property = `--govuk-breakpoint-${name}`\n\n // Get value from `<html>` with breakpoints on CSS :root\n const value = window\n .getComputedStyle(document.documentElement)\n .getPropertyValue(property)\n\n return {\n property,\n value: value || undefined\n }\n}\n\n/**\n * Move focus to element\n *\n * Sets tabindex to -1 to make the element programmatically focusable,\n * but removes it on blur as the element doesn't need to be focused again.\n *\n * @private\n * @template {HTMLElement} FocusElement\n * @param {FocusElement} $element - HTML element\n * @param {object} [options] - Handler options\n * @param {function(this: FocusElement): void} [options.onBeforeFocus] - Callback before focus\n * @param {function(this: FocusElement): void} [options.onBlur] - Callback on blur\n */\nexport function setFocus($element, options = {}) {\n const isFocusable = $element.getAttribute('tabindex')\n\n if (!isFocusable) {\n $element.setAttribute('tabindex', '-1')\n }\n\n /**\n * Handle element focus\n */\n function onFocus() {\n $element.addEventListener('blur', onBlur, { once: true })\n }\n\n /**\n * Handle element blur\n */\n function onBlur() {\n options.onBlur?.call($element)\n\n if (!isFocusable) {\n $element.removeAttribute('tabindex')\n }\n }\n\n // Add listener to reset element on blur, after focus\n $element.addEventListener('focus', onFocus, { once: true })\n\n // Focus element\n options.onBeforeFocus?.call($element)\n $element.focus()\n}\n\n/**\n * Checks if component is already initialised\n *\n * @internal\n * @param {Element} $root - HTML element to be checked\n * @param {string} moduleName - name of component module\n * @returns {boolean} Whether component is already initialised\n */\nexport function isInitialised($root, moduleName) {\n return (\n $root instanceof HTMLElement &&\n $root.hasAttribute(`data-${moduleName}-init`)\n )\n}\n\n/**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * Some browsers will load and run our JavaScript but GOV.UK Frontend\n * won't be supported.\n *\n * @param {HTMLElement | null} [$scope] - (internal) `<body>` HTML element checked for browser support\n * @returns {boolean} Whether GOV.UK Frontend is supported on this page\n */\nexport function isSupported($scope = document.body) {\n if (!$scope) {\n return false\n }\n\n return $scope.classList.contains('govuk-frontend-supported')\n}\n\n/**\n * Check for an array\n *\n * @internal\n * @param {unknown} option - Option to check\n * @returns {boolean} Whether the option is an array\n */\nfunction isArray(option) {\n return Array.isArray(option)\n}\n\n/**\n * Check for an object\n *\n * @internal\n * @template {Partial<Record<keyof ObjectType, unknown>>} ObjectType\n * @param {unknown | ObjectType} option - Option to check\n * @returns {option is ObjectType} Whether the option is an object\n */\nexport function isObject(option) {\n return !!option && typeof option === 'object' && !isArray(option)\n}\n\n/**\n * Check for valid scope\n *\n * @internal\n * @template {Element | Document} ScopeType\n * @param {unknown | ScopeType} $scope - Scope of the document to search within\n * @returns {$scope is ScopeType} Whether the scope can be queried\n */\nexport function isScope($scope) {\n return !!$scope && ($scope instanceof Element || $scope instanceof Document)\n}\n\n/**\n * Format error message\n *\n * @internal\n * @param {ComponentWithModuleName} Component - Component that threw the error\n * @param {string} message - Error message\n * @returns {string} - Formatted error message\n */\nexport function formatErrorMessage(Component, message) {\n return `${Component.moduleName}: ${message}`\n}\n\n/* eslint-disable jsdoc/valid-types --\n * `{new(...args: any[] ): object}` is not recognised as valid\n * https://github.com/gajus/eslint-plugin-jsdoc/issues/145#issuecomment-1308722878\n * https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/131\n **/\n\n/**\n * @typedef ComponentWithModuleName\n * @property {string} moduleName - Name of the component\n */\n\n/* eslint-enable jsdoc/valid-types */\n","import { formatErrorMessage, isObject, isScope } from '../common/index.mjs'\n\n/**\n * GOV.UK Frontend error\n *\n * A base class for `Error`s thrown by GOV.UK Frontend.\n *\n * It is meant to be extended into specific types of errors\n * to be thrown by our code.\n *\n * @example\n * ```js\n * class MissingRootError extends GOVUKFrontendError {\n * // Setting an explicit name is important as extending the class will not\n * // set a new `name` on the subclass. The `name` property is important\n * // to ensure intelligible error names even if the class name gets\n * // mangled by a minifier\n * name = \"MissingRootError\"\n * }\n * ```\n * @virtual\n */\nexport class GOVUKFrontendError extends Error {\n name = 'GOVUKFrontendError'\n}\n\n/**\n * Indicates that GOV.UK Frontend is not supported\n */\nexport class SupportError extends GOVUKFrontendError {\n name = 'SupportError'\n\n /**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * @param {Element | Document | null | string} [scopeOrMessage] - HTML element `<body>` checked for browser support or support error message\n */\n constructor(scopeOrMessage = document.body) {\n let supportMessage =\n 'noModule' in HTMLScriptElement.prototype\n ? 'GOV.UK Frontend initialised without `<body class=\"govuk-frontend-supported\">` from template `<script>` snippet'\n : 'GOV.UK Frontend is not supported in this browser'\n\n if (!isScope(scopeOrMessage)) {\n supportMessage =\n 'GOV.UK Frontend initialised without `<script type=\"module\">`'\n }\n\n super(typeof scopeOrMessage === 'string' ? scopeOrMessage : supportMessage)\n }\n}\n\n/**\n * Indicates that a component has received an illegal configuration\n */\nexport class ConfigError extends GOVUKFrontendError {\n name = 'ConfigError'\n}\n\n/**\n * Indicates an issue with an element (possibly `null` or `undefined`)\n */\nexport class ElementError extends GOVUKFrontendError {\n name = 'ElementError'\n\n /**\n * @internal\n * @overload\n * @param {string} message - Element error message\n */\n\n /**\n * @internal\n * @overload\n * @param {ElementErrorOptions} options - Element error options\n */\n\n /**\n * @internal\n * @param {string | ElementErrorOptions} messageOrOptions - Element error message or options\n */\n constructor(messageOrOptions) {\n let message = typeof messageOrOptions === 'string' ? messageOrOptions : ''\n\n // Build message from options\n if (isObject(messageOrOptions)) {\n const { component, identifier, element, expectedType } = messageOrOptions\n\n message = identifier\n\n // Append reason\n message += element\n ? ` is not of type ${expectedType ?? 'HTMLElement'}`\n : ' not found'\n\n // Prepend with module name (optional)\n if (component) {\n message = formatErrorMessage(component, message)\n }\n }\n\n super(message)\n }\n}\n\n/**\n * Indicates that a component is already initialised\n */\nexport class InitError extends GOVUKFrontendError {\n name = 'InitError'\n\n /**\n * @internal\n * @param {ComponentWithModuleName | string} componentOrMessage - name of the component module\n */\n constructor(componentOrMessage) {\n const message =\n typeof componentOrMessage === 'string'\n ? componentOrMessage\n : formatErrorMessage(\n componentOrMessage,\n `Root element (\\`$root\\`) already initialised`\n )\n\n super(message)\n }\n}\n\n/**\n * Element error options\n *\n * @internal\n * @typedef {object} ElementErrorOptions\n * @property {Element | Document | null} [element] - The element in error (optional)\n * @property {ComponentWithModuleName} [component] - Component throwing the error (optional)\n * @property {string} identifier - An identifier that'll let the user understand which element has an error. This is whatever makes the most sense\n * @property {string} [expectedType] - The type that was expected for the identifier (optional)\n */\n\n/**\n * @import { ComponentWithModuleName } from '../common/index.mjs'\n */\n","/* eslint-disable es-x/no-global-this */\n\nimport { isInitialised, isSupported } from './common/index.mjs'\nimport { ElementError, InitError, SupportError } from './errors/index.mjs'\n\nconst _self =\n typeof globalThis !== 'undefined'\n ? globalThis // Modern browsers, Node.js\n : self // Old browsers, web workers\n\n/**\n * Base Component class\n *\n * Centralises the behaviours shared by our components\n *\n * @virtual\n * @template {Element} [RootElementType=HTMLElement]\n */\nexport class Component {\n /**\n * @type {typeof Element}\n */\n static elementType = _self.HTMLElement\n\n // allows Typescript user to work around the lack of types\n // in GOVUKFrontend package, Typescript is not aware of $root\n // in components that extend GOVUKFrontendComponent\n /**\n * Returns the root element of the component\n *\n * @protected\n * @returns {RootElementType} - the root element of component\n */\n get $root() {\n return this._$root\n }\n\n /**\n * @protected\n * @type {RootElementType}\n */\n _$root\n\n /**\n * Constructs a new component, validating that GOV.UK Frontend is supported\n *\n * @internal\n * @param {Element | null} [$root] - HTML element to use for component\n */\n constructor($root) {\n const childConstructor = /** @type {ChildClassConstructor} */ (\n this.constructor\n )\n\n // TypeScript does not enforce that inheriting classes will define a `moduleName`\n // (even if we add a `@virtual` `static moduleName` property to this class).\n // While we trust users to do this correctly, we do a little check to provide them\n // a helpful error message.\n //\n // After this, we'll be sure that `childConstructor` has a `moduleName`\n // as expected of the `ChildClassConstructor` we've cast `this.constructor` to.\n if (typeof childConstructor.moduleName !== 'string') {\n throw new InitError(`\\`moduleName\\` not defined in component`)\n }\n\n if (!($root instanceof childConstructor.elementType)) {\n throw new ElementError({\n element: $root,\n component: childConstructor,\n identifier: 'Root element (`$root`)',\n expectedType: childConstructor.elementType.name\n })\n } else {\n this._$root = /** @type {RootElementType} */ ($root)\n }\n\n childConstructor.checkSupport()\n\n this.checkInitialised()\n\n const moduleName = childConstructor.moduleName\n\n this.$root.setAttribute(`data-${moduleName}-init`, '')\n }\n\n /**\n * Validates whether component is already initialised\n *\n * @private\n * @throws {InitError} when component is already initialised\n */\n checkInitialised() {\n const constructor = /** @type {ChildClassConstructor} */ (this.constructor)\n const moduleName = constructor.moduleName\n\n if (moduleName && isInitialised(this.$root, moduleName)) {\n throw new InitError(constructor)\n }\n }\n\n /**\n * Validates whether components are supported\n *\n * @throws {SupportError} when the components are not supported\n */\n static checkSupport() {\n if (!isSupported()) {\n throw new SupportError()\n }\n }\n}\n\n/**\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n */\n\n/**\n * @typedef {typeof Component & ChildClass} ChildClassConstructor\n */\n","import { Component } from '../component.mjs'\nimport { ConfigError } from '../errors/index.mjs'\n\nimport { isObject, isScope, formatErrorMessage } from './index.mjs'\n\nexport const configOverride = Symbol.for('configOverride')\n\n/**\n * Base Component class\n *\n * Centralises the behaviours shared by our components\n *\n * @virtual\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @template {Element & { dataset: DOMStringMap }} [RootElementType=HTMLElement]\n * @augments Component<RootElementType>\n */\nexport class ConfigurableComponent extends Component {\n /**\n * configOverride\n *\n * Function which defines configuration overrides to prioritize\n * properties from the root element's dataset.\n *\n * It should take a subset of configuration as input and return\n * a new configuration object with properties that should be\n * overridden based on the root element's dataset. A Symbol\n * is used for indexing to prevent conflicts.\n *\n * @internal\n * @virtual\n * @param {Partial<ConfigurationType>} [param] - Configuration object\n * @returns {Partial<ConfigurationType>} return - Configuration object\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n [configOverride](param) {\n return {}\n }\n\n /**\n * Returns the root element of the component\n *\n * @protected\n * @returns {ConfigurationType} - the root element of component\n */\n get config() {\n return this._config\n }\n\n /**\n *\n * @type {ConfigurationType}\n */\n _config\n\n /**\n * Constructs a new component, validating that GOV.UK Frontend is supported\n *\n * @internal\n * @param {Element | null} [$root] - HTML element to use for component\n * @param {ConfigurationType} [config] - HTML element to use for component\n */\n constructor($root, config) {\n super($root)\n\n const childConstructor =\n /** @type {ChildClassConstructor<ConfigurationType>} */ (this.constructor)\n\n if (!isObject(childConstructor.defaults)) {\n throw new ConfigError(\n formatErrorMessage(\n childConstructor,\n 'Config passed as parameter into constructor but no defaults defined'\n )\n )\n }\n\n const datasetConfig = /** @type {ConfigurationType} */ (\n normaliseDataset(childConstructor, this._$root.dataset)\n )\n\n // Override defaults with JavaScript config\n this._config = /** @type {ConfigurationType} */ (\n mergeConfigs(childConstructor.defaults, config ?? {})\n )\n\n // Override merged config with dataset config\n this._config = /** @type {ConfigurationType} */ (\n mergeConfigs(\n this._config,\n this[configOverride](datasetConfig),\n datasetConfig\n )\n )\n }\n}\n\n/**\n * Normalise string\n *\n * 'If it looks like a duck, and it quacks like a duck…' 🦆\n *\n * If the passed value looks like a boolean or a number, convert it to a boolean\n * or number.\n *\n * Designed to be used to convert config passed via data attributes (which are\n * always strings) into something sensible.\n *\n * @internal\n * @param {DOMStringMap[string]} value - The value to normalise\n * @param {SchemaProperty} [property] - Component schema property\n * @returns {string | boolean | number | undefined} Normalised data\n */\nexport function normaliseString(value, property) {\n if (\n property?.type &&\n !['string', 'number', 'boolean'].includes(property.type)\n ) {\n return\n }\n\n const trimmedValue = value ? value.trim() : ''\n\n let output\n let outputType = property?.type\n\n // No schema type set? Determine automatically\n if (!outputType) {\n if (['true', 'false'].includes(trimmedValue)) {\n outputType = 'boolean'\n }\n\n // Empty / whitespace-only strings are considered finite so we need to check\n // the length of the trimmed string as well\n if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {\n outputType = 'number'\n }\n }\n\n switch (outputType) {\n case 'boolean':\n output = trimmedValue === 'true'\n break\n\n case 'number':\n output = Number(trimmedValue)\n break\n\n default:\n output = value\n }\n\n return output\n}\n\n/**\n * Normalise dataset\n *\n * Loop over an object and normalise each value using {@link normaliseString},\n * optionally expanding nested `i18n.field`\n *\n * @internal\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @template {[keyof ConfigurationType, SchemaProperty | undefined][]} SchemaEntryType\n * @param {{ schema?: Schema<ConfigurationType>, moduleName: string }} Component - Component class\n * @param {DOMStringMap} dataset - HTML element dataset\n * @returns {ObjectNested} Normalised dataset\n */\nexport function normaliseDataset(Component, dataset) {\n if (!isObject(Component.schema)) {\n throw new ConfigError(\n formatErrorMessage(\n Component,\n 'Config passed as parameter into constructor but no schema defined'\n )\n )\n }\n\n const out = /** @type {ObjectNested} */ ({})\n const entries = /** @type {SchemaEntryType} */ (\n Object.entries(Component.schema.properties)\n )\n\n // Normalise top-level dataset ('data-*') values using schema types\n for (const entry of entries) {\n const [namespace, property] = entry\n\n // Cast the `namespace` to string so it can be used to access the dataset\n const field = namespace.toString()\n\n if (field in dataset) {\n out[field] = normaliseString(dataset[field], property)\n }\n\n /**\n * Extract and normalise nested object values automatically using\n * {@link normaliseString} but only schema object types are allowed\n */\n if (property?.type === 'object') {\n out[field] = extractConfigByNamespace(\n Component.schema,\n dataset,\n namespace\n )\n }\n }\n\n return out\n}\n\n/**\n * Normalise options passed to `initAll` or `createAll`\n *\n * @internal\n * @template {CompatibleClass} ComponentClass\n * @param {Config | CreateAllOptions<ComponentClass> | OnErrorCallback<ComponentClass> | Element | Document | null} [scopeOrOptions] - Scope of the document to search within, initialisation options or error callback function\n * @returns {CreateAllOptions<ComponentClass>} Normalised options\n */\nexport function normaliseOptions(scopeOrOptions) {\n let /** @type {Element | Document | null} */ $scope = document\n let /** @type {OnErrorCallback<ComponentClass> | undefined} */ onError\n\n // Handle options object\n if (isObject(scopeOrOptions)) {\n const options = scopeOrOptions\n\n // Scope must be valid or null\n if (isScope(options.scope) || options.scope === null) {\n $scope = options.scope\n }\n\n // Error handler must be a function\n if (typeof options.onError === 'function') {\n onError = options.onError\n }\n }\n\n if (isScope(scopeOrOptions)) {\n $scope = scopeOrOptions\n } else if (scopeOrOptions === null) {\n $scope = null\n } else if (typeof scopeOrOptions === 'function') {\n onError = scopeOrOptions\n }\n\n return {\n scope: $scope,\n onError\n }\n}\n\n/**\n * Config merging function\n *\n * Takes any number of objects and combines them together, with\n * greatest priority on the LAST item passed in.\n *\n * @internal\n * @param {...{ [key: string]: unknown }} configObjects - Config objects to merge\n * @returns {{ [key: string]: unknown }} A merged config object\n */\nexport function mergeConfigs(...configObjects) {\n // Start with an empty object as our base\n /** @type {{ [key: string]: unknown }} */\n const formattedConfigObject = {}\n\n // Loop through each of the passed objects\n for (const configObject of configObjects) {\n for (const key of Object.keys(configObject)) {\n const option = formattedConfigObject[key]\n const override = configObject[key]\n\n // Push their keys one-by-one into formattedConfigObject. Any duplicate\n // keys with object values will be merged, otherwise the new value will\n // override the existing value.\n if (isObject(option) && isObject(override)) {\n formattedConfigObject[key] = mergeConfigs(option, override)\n } else {\n // Apply override\n formattedConfigObject[key] = override\n }\n }\n }\n\n return formattedConfigObject\n}\n\n/**\n * Validate component config by schema\n *\n * Follows limited examples in JSON schema for wider support in future\n *\n * {@link https://ajv.js.org/json-schema.html#compound-keywords}\n * {@link https://ajv.js.org/packages/ajv-errors.html#single-message}\n *\n * @internal\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @param {Schema<ConfigurationType>} schema - The schema of a component\n * @param {ConfigurationType} config - Component config\n * @returns {string[]} List of validation errors\n */\nexport function validateConfig(schema, config) {\n const validationErrors = []\n\n // Check errors for each schema\n for (const [name, conditions] of Object.entries(schema)) {\n const errors = []\n\n // Check errors for each schema condition\n if (Array.isArray(conditions)) {\n for (const { required, errorMessage } of conditions) {\n if (!required.every((key) => !!config[key])) {\n errors.push(errorMessage) // Missing config key value\n }\n }\n\n // Check one condition passes or add errors\n if (name === 'anyOf' && !(conditions.length - errors.length >= 1)) {\n validationErrors.push(...errors)\n }\n }\n }\n\n return validationErrors\n}\n\n/**\n * Extracts keys starting with a particular namespace from dataset ('data-*')\n * object, removing the namespace in the process, normalising all values\n *\n * @internal\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @param {Schema<ConfigurationType>} schema - The schema of a component\n * @param {DOMStringMap} dataset - The object to extract key-value pairs from\n * @param {keyof ConfigurationType} namespace - The namespace to filter keys with\n * @returns {ObjectNested | undefined} Nested object with dot-separated key namespace removed\n */\nexport function extractConfigByNamespace(schema, dataset, namespace) {\n const property = schema.properties[namespace]\n\n // Only extract configs for object schema properties\n if (property?.type !== 'object') {\n return\n }\n\n // Add default empty config\n const newObject = /** @type {Record<typeof namespace, ObjectNested>} */ ({\n [namespace]: {}\n })\n\n for (const [key, value] of Object.entries(dataset)) {\n /** @type {ObjectNested | ObjectNested[NestedKey]} */\n let current = newObject\n\n // Split the key into parts, using . as our namespace separator\n const keyParts = key.split('.')\n\n /**\n * Create new level per part\n *\n * e.g. 'i18n.textareaDescription.other' becomes\n * `{ i18n: { textareaDescription: { other } } }`\n */\n for (const [index, name] of keyParts.entries()) {\n if (isObject(current)) {\n // Drop down to nested object until the last part\n if (index < keyParts.length - 1) {\n // New nested object (optionally) replaces existing value\n if (!isObject(current[name])) {\n current[name] = {}\n }\n\n // Drop down into new or existing nested object\n current = current[name]\n } else if (key !== namespace) {\n // Normalised value (optionally) replaces existing value\n current[name] = normaliseString(value)\n }\n }\n }\n }\n\n return newObject[namespace]\n}\n\n/**\n * @internal\n * @typedef {keyof ObjectNested} NestedKey\n * @typedef {{ [key: string]: string | boolean | number | ObjectNested | undefined }} ObjectNested\n */\n\n/**\n * Schema for component config\n *\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @typedef {object} Schema\n * @property {Record<keyof ConfigurationType, SchemaProperty | undefined>} properties - Schema properties\n * @property {SchemaCondition<ConfigurationType>[]} [anyOf] - List of schema conditions\n */\n\n/**\n * Schema property for component config\n *\n * @typedef {object} SchemaProperty\n * @property {'string' | 'boolean' | 'number' | 'object'} type - Property type\n */\n\n/**\n * Schema condition for component config\n *\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @typedef {object} SchemaCondition\n * @property {(keyof ConfigurationType)[]} required - List of required config fields\n * @property {string} errorMessage - Error message when required config fields not provided\n */\n\n/**\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n * @property {Schema<ConfigurationType>} [schema] - The schema of the component configuration\n * @property {ConfigurationType} [defaults] - The default values of the configuration of the component\n */\n\n/**\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @typedef {typeof Component & ChildClass<ConfigurationType>} ChildClassConstructor<ConfigurationType>\n */\n\n/**\n * @import { CompatibleClass, Config, CreateAllOptions, OnErrorCallback } from '../init.mjs'\n */\n","import { ConfigurableComponent } from '../../common/configuration.mjs'\nimport { setFocus } from '../../common/index.mjs'\n\n/**\n * Notification Banner component\n *\n * @preserve\n * @augments ConfigurableComponent<NotificationBannerConfig>\n */\nexport class NotificationBanner extends ConfigurableComponent {\n /**\n * @param {Element | null} $root - HTML element to use for notification banner\n * @param {NotificationBannerConfig} [config] - Notification banner config\n */\n constructor($root, config = {}) {\n super($root, config)\n\n /**\n * Focus the notification banner\n *\n * If `role=\"alert\"` is set, focus the element to help some assistive\n * technologies prioritise announcing it.\n *\n * You can turn off the auto-focus functionality by setting\n * `data-disable-auto-focus=\"true\"` in the component HTML. You might wish to\n * do this based on user research findings, or to avoid a clash with another\n * element which should be focused when the page loads.\n */\n if (\n this.$root.getAttribute('role') === 'alert' &&\n !this.config.disableAutoFocus\n ) {\n setFocus(this.$root)\n }\n }\n\n /**\n * Name for the component used when initialising using data-module attributes.\n */\n static moduleName = 'govuk-notification-banner'\n\n /**\n * Notification banner default config\n *\n * @see {@link NotificationBannerConfig}\n * @constant\n * @type {NotificationBannerConfig}\n */\n static defaults = Object.freeze({\n disableAutoFocus: false\n })\n\n /**\n * Notification banner config schema\n *\n * @constant\n * @satisfies {Schema<NotificationBannerConfig>}\n */\n static schema = Object.freeze({\n properties: {\n disableAutoFocus: { type: 'boolean' }\n }\n })\n}\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\n/**\n * @import { Schema } from '../../common/configuration.mjs'\n */\n"],"names":["setFocus","$element","options","_options$onBeforeFocu","isFocusable","getAttribute","setAttribute","onFocus","addEventListener","onBlur","once","_options$onBlur","call","removeAttribute","onBeforeFocus","focus","isInitialised","$root","moduleName","HTMLElement","hasAttribute","isSupported","$scope","document","body","classList","contains","isArray","option","Array","isObject","isScope","Element","Document","formatErrorMessage","Component","message","GOVUKFrontendError","Error","constructor","args","name","SupportError","scopeOrMessage","supportMessage","HTMLScriptElement","prototype","ConfigError","ElementError","messageOrOptions","component","identifier","element","expectedType","InitError","componentOrMessage","_self","globalThis","self","_$root","childConstructor","elementType","checkSupport","checkInitialised","configOverride","Symbol","for","ConfigurableComponent","param","config","_config","defaults","datasetConfig","normaliseDataset","dataset","mergeConfigs","normaliseString","value","property","type","includes","trimmedValue","trim","output","outputType","length","isFinite","Number","schema","out","entries","Object","properties","entry","namespace","field","toString","extractConfigByNamespace","configObjects","formattedConfigObject","configObject","key","keys","override","newObject","current","keyParts","split","index","NotificationBanner","disableAutoFocus","freeze"],"mappings":"AA0CO,SAASA,QAAQA,CAACC,QAAQ,EAAEC,OAAO,GAAG,EAAE,EAAE;AAAA,EAAA,IAAAC,qBAAA;AAC/C,EAAA,MAAMC,WAAW,GAAGH,QAAQ,CAACI,YAAY,CAAC,UAAU,CAAC;EAErD,IAAI,CAACD,WAAW,EAAE;AAChBH,IAAAA,QAAQ,CAACK,YAAY,CAAC,UAAU,EAAE,IAAI,CAAC;AACzC,EAAA;EAKA,SAASC,OAAOA,GAAG;AACjBN,IAAAA,QAAQ,CAACO,gBAAgB,CAAC,MAAM,EAAEC,MAAM,EAAE;AAAEC,MAAAA,IAAI,EAAE;AAAK,KAAC,CAAC;AAC3D,EAAA;EAKA,SAASD,MAAMA,GAAG;AAAA,IAAA,IAAAE,eAAA;IAChB,CAAAA,eAAA,GAAAT,OAAO,CAACO,MAAM,KAAA,IAAA,IAAdE,eAAA,CAAgBC,IAAI,CAACX,QAAQ,CAAC;IAE9B,IAAI,CAACG,WAAW,EAAE;AAChBH,MAAAA,QAAQ,CAACY,eAAe,CAAC,UAAU,CAAC;AACtC,IAAA;AACF,EAAA;AAGAZ,EAAAA,QAAQ,CAACO,gBAAgB,CAAC,OAAO,EAAED,OAAO,EAAE;AAAEG,IAAAA,IAAI,EAAE;AAAK,GAAC,CAAC;EAG3D,CAAAP,qBAAA,GAAAD,OAAO,CAACY,aAAa,KAAA,IAAA,IAArBX,qBA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AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AApEa4F,kBAAkB,CA8BtB3F,UAAU,GAAG,2BAA2B;AA9BpC2F,kBAAkB,CAuCtBtC,QAAQ,GAAGoB,MAAM,CAACoB,MAAM,CAAC;AAC9BD,EAAAA,gBAAgB,EAAE;AACpB,CAAC,CAAC;AAzCSD,kBAAkB,CAiDtBrB,MAAM,GAAGG,MAAM,CAACoB,MAAM,CAAC;AAC5BnB,EAAAA,UAAU,EAAE;AACVkB,IAAAA,gBAAgB,EAAE;AAAE/B,MAAAA,IAAI,EAAE;AAAU;AACtC;AACF,CAAC,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"notification-banner.mjs","sources":["../../../../src/govuk/components/notification-banner/notification-banner.mjs"],"sourcesContent":["import { ConfigurableComponent } from '../../common/configuration.mjs'\nimport { setFocus } from '../../common/index.mjs'\n\n/**\n * Notification Banner component\n *\n * @preserve\n * @augments ConfigurableComponent<NotificationBannerConfig>\n */\nexport class NotificationBanner extends ConfigurableComponent {\n /**\n * @param {Element | null} $root - HTML element to use for notification banner\n * @param {NotificationBannerConfig} [config] - Notification banner config\n */\n constructor($root, config = {}) {\n super($root, config)\n\n /**\n * Focus the notification banner\n *\n * If `role=\"alert\"` is set, focus the element to help some assistive\n * technologies prioritise announcing it.\n *\n * You can turn off the auto-focus functionality by setting\n * `data-disable-auto-focus=\"true\"` in the component HTML. You might wish to\n * do this based on user research findings, or to avoid a clash with another\n * element which should be focused when the page loads.\n */\n if (\n this.$root.getAttribute('role') === 'alert' &&\n !this.config.disableAutoFocus\n ) {\n setFocus(this.$root)\n }\n }\n\n /**\n * Name for the component used when initialising using data-module attributes.\n */\n static moduleName = 'govuk-notification-banner'\n\n /**\n * Notification banner default config\n *\n * @see {@link NotificationBannerConfig}\n * @constant\n * @type {NotificationBannerConfig}\n */\n static defaults = Object.freeze({\n disableAutoFocus: false\n })\n\n /**\n * Notification banner config schema\n *\n * @constant\n * @satisfies {Schema<NotificationBannerConfig>}\n */\n static schema = Object.freeze({\n properties: {\n disableAutoFocus: { type: 'boolean' }\n }\n })\n}\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\n/**\n * @import { Schema } from '../../common/configuration.mjs'\n */\n"],"names":["NotificationBanner","ConfigurableComponent","constructor","$root","config","getAttribute","disableAutoFocus","setFocus","moduleName","defaults","Object","freeze","schema","properties","type"],"mappings":";;;AAGA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,kBAAkB,SAASC,qBAAqB,CAAC;AAC5D;AACF;AACA;AACA;AACEC,EAAAA,WAAWA,CAACC,KAAK,EAAEC,MAAM,GAAG,EAAE,EAAE;AAC9B,IAAA,KAAK,CAACD,KAAK,EAAEC,MAAM,CAAC;AAapB,IAAA,IACE,IAAI,CAACD,KAAK,CAACE,YAAY,CAAC,MAAM,CAAC,KAAK,OAAO,IAC3C,CAAC,IAAI,CAACD,MAAM,CAACE,gBAAgB,EAC7B;AACAC,MAAAA,QAAQ,CAAC,IAAI,CAACJ,KAAK,CAAC;AACtB;AACF;AA6BF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AApEaH,kBAAkB,CA8BtBQ,UAAU,GAAG,2BAA2B;AA9BpCR,kBAAkB,CAuCtBS,QAAQ,GAAGC,MAAM,CAACC,MAAM,CAAC;AAC9BL,EAAAA,gBAAgB,EAAE;AACpB,CAAC,CAAC;AAzCSN,kBAAkB,CAiDtBY,MAAM,GAAGF,MAAM,CAACC,MAAM,CAAC;AAC5BE,EAAAA,UAAU,EAAE;AACVP,IAAAA,gBAAgB,EAAE;AAAEQ,MAAAA,IAAI,EAAE;AAAU;AACtC;AACF,CAAC,CAAC;;;;"}
1
+ {"version":3,"file":"notification-banner.mjs","sources":["../../../../src/govuk/components/notification-banner/notification-banner.mjs"],"sourcesContent":["import { ConfigurableComponent } from '../../common/configuration.mjs'\nimport { setFocus } from '../../common/index.mjs'\n\n/**\n * Notification Banner component\n *\n * @preserve\n * @augments ConfigurableComponent<NotificationBannerConfig>\n */\nexport class NotificationBanner extends ConfigurableComponent {\n /**\n * @param {Element | null} $root - HTML element to use for notification banner\n * @param {NotificationBannerConfig} [config] - Notification banner config\n */\n constructor($root, config = {}) {\n super($root, config)\n\n /**\n * Focus the notification banner\n *\n * If `role=\"alert\"` is set, focus the element to help some assistive\n * technologies prioritise announcing it.\n *\n * You can turn off the auto-focus functionality by setting\n * `data-disable-auto-focus=\"true\"` in the component HTML. You might wish to\n * do this based on user research findings, or to avoid a clash with another\n * element which should be focused when the page loads.\n */\n if (\n this.$root.getAttribute('role') === 'alert' &&\n !this.config.disableAutoFocus\n ) {\n setFocus(this.$root)\n }\n }\n\n /**\n * Name for the component used when initialising using data-module attributes.\n */\n static moduleName = 'govuk-notification-banner'\n\n /**\n * Notification banner default config\n *\n * @see {@link NotificationBannerConfig}\n * @constant\n * @type {NotificationBannerConfig}\n */\n static defaults = Object.freeze({\n disableAutoFocus: false\n })\n\n /**\n * Notification banner config schema\n *\n * @constant\n * @satisfies {Schema<NotificationBannerConfig>}\n */\n static schema = Object.freeze({\n properties: {\n disableAutoFocus: { type: 'boolean' }\n }\n })\n}\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\n/**\n * @import { Schema } from '../../common/configuration.mjs'\n */\n"],"names":["NotificationBanner","ConfigurableComponent","constructor","$root","config","getAttribute","disableAutoFocus","setFocus","moduleName","defaults","Object","freeze","schema","properties","type"],"mappings":";;;AAGA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,kBAAkB,SAASC,qBAAqB,CAAC;AAC5D;AACF;AACA;AACA;AACEC,EAAAA,WAAWA,CAACC,KAAK,EAAEC,MAAM,GAAG,EAAE,EAAE;AAC9B,IAAA,KAAK,CAACD,KAAK,EAAEC,MAAM,CAAC;AAapB,IAAA,IACE,IAAI,CAACD,KAAK,CAACE,YAAY,CAAC,MAAM,CAAC,KAAK,OAAO,IAC3C,CAAC,IAAI,CAACD,MAAM,CAACE,gBAAgB,EAC7B;AACAC,MAAAA,QAAQ,CAAC,IAAI,CAACJ,KAAK,CAAC;AACtB,IAAA;AACF,EAAA;AA6BF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AApEaH,kBAAkB,CA8BtBQ,UAAU,GAAG,2BAA2B;AA9BpCR,kBAAkB,CAuCtBS,QAAQ,GAAGC,MAAM,CAACC,MAAM,CAAC;AAC9BL,EAAAA,gBAAgB,EAAE;AACpB,CAAC,CAAC;AAzCSN,kBAAkB,CAiDtBY,MAAM,GAAGF,MAAM,CAACC,MAAM,CAAC;AAC5BE,EAAAA,UAAU,EAAE;AACVP,IAAAA,gBAAgB,EAAE;AAAEQ,MAAAA,IAAI,EAAE;AAAU;AACtC;AACF,CAAC,CAAC;;"}
@@ -9,7 +9,13 @@
9
9
  This publication was withdrawn on 7 March 2014
10
10
  </h3>
11
11
  <p class="govuk-body">
12
- Archived and replaced by the <a href="#" class="govuk-notification-banner__link">new planning guidance</a> launched 6 March 2014 on an external website
12
+ The following 4 files are available
13
13
  </p>
14
+ <ul class="govuk-list govuk-list--bullet govuk-!-margin-bottom-0">
15
+ <li><a href="#" class="govuk-notification-banner__link">government-strategy.pdf</a></li>
16
+ <li><a href="#" class="govuk-notification-banner__link">government-strategy-v2.pdf</a></li>
17
+ <li><a href="#" class="govuk-notification-banner__link">government-strategy-v3-FINAL.pdf</a></li>
18
+ <li><a href="#" class="govuk-notification-banner__link">government-strategy-v4-FINAL-v2.pdf</a></li>
19
+ </ul>
14
20
  </div>
15
21
  </div>
@@ -0,0 +1,8 @@
1
+ @use "mixin";
2
+
3
+ @import "../../base";
4
+
5
+ @include govuk-exports("govuk/component/pagination") {
6
+ @include mixin.styles;
7
+ }
8
+