govuk_publishing_components 60.0.2 → 60.2.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 (386) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -0
  3. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +11 -1
  4. data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +0 -14
  5. data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +570 -595
  6. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss +5 -0
  7. data/app/views/govuk_publishing_components/audit/_applications.html.erb +13 -13
  8. data/app/views/govuk_publishing_components/audit/_component_contents.html.erb +2 -2
  9. data/app/views/govuk_publishing_components/audit/_components.html.erb +17 -19
  10. data/app/views/govuk_publishing_components/audit/_items_in_applications.html.erb +3 -3
  11. data/app/views/govuk_publishing_components/audit/show.html.erb +5 -6
  12. data/app/views/govuk_publishing_components/component_guide/component_doc/_call.html.erb +2 -2
  13. data/app/views/govuk_publishing_components/component_guide/example.html.erb +4 -5
  14. data/app/views/govuk_publishing_components/component_guide/index.html.erb +9 -10
  15. data/app/views/govuk_publishing_components/component_guide/preview.html.erb +1 -1
  16. data/app/views/govuk_publishing_components/component_guide/show.html.erb +9 -10
  17. data/app/views/govuk_publishing_components/components/_accordion.html.erb +5 -5
  18. data/app/views/govuk_publishing_components/components/_action_link.html.erb +2 -2
  19. data/app/views/govuk_publishing_components/components/_add_another.html.erb +3 -3
  20. data/app/views/govuk_publishing_components/components/_attachment.html.erb +4 -4
  21. data/app/views/govuk_publishing_components/components/_back_link.html.erb +1 -1
  22. data/app/views/govuk_publishing_components/components/_back_to_top_link.html.erb +1 -1
  23. data/app/views/govuk_publishing_components/components/_big_number.html.erb +1 -1
  24. data/app/views/govuk_publishing_components/components/_cards.html.erb +4 -4
  25. data/app/views/govuk_publishing_components/components/_character_count.html.erb +1 -1
  26. data/app/views/govuk_publishing_components/components/_checkboxes.html.erb +3 -3
  27. data/app/views/govuk_publishing_components/components/_contents_list.html.erb +6 -9
  28. data/app/views/govuk_publishing_components/components/_contents_list_with_body.html.erb +2 -2
  29. data/app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb +2 -2
  30. data/app/views/govuk_publishing_components/components/_contextual_footer.html.erb +1 -1
  31. data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +6 -6
  32. data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +6 -6
  33. data/app/views/govuk_publishing_components/components/_date_input.html.erb +5 -5
  34. data/app/views/govuk_publishing_components/components/_details.html.erb +1 -1
  35. data/app/views/govuk_publishing_components/components/_devolved_nations.html.erb +1 -1
  36. data/app/views/govuk_publishing_components/components/_document_list.html.erb +8 -8
  37. data/app/views/govuk_publishing_components/components/_emergency_banner.html.erb +3 -3
  38. data/app/views/govuk_publishing_components/components/_feedback.html.erb +2 -2
  39. data/app/views/govuk_publishing_components/components/_fieldset.html.erb +3 -4
  40. data/app/views/govuk_publishing_components/components/_figure.html.erb +1 -1
  41. data/app/views/govuk_publishing_components/components/_file_upload.html.erb +5 -5
  42. data/app/views/govuk_publishing_components/components/_glance_metric.html.erb +1 -1
  43. data/app/views/govuk_publishing_components/components/_global_banner.html.erb +2 -2
  44. data/app/views/govuk_publishing_components/components/_google_tag_manager_script.html.erb +7 -7
  45. data/app/views/govuk_publishing_components/components/_govspeak_html_publication.html.erb +1 -1
  46. data/app/views/govuk_publishing_components/components/_image_card.html.erb +4 -5
  47. data/app/views/govuk_publishing_components/components/_input.html.erb +14 -14
  48. data/app/views/govuk_publishing_components/components/_intervention.html.erb +4 -6
  49. data/app/views/govuk_publishing_components/components/_label.html.erb +1 -1
  50. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +6 -9
  51. data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +2 -2
  52. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +15 -15
  53. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +16 -19
  54. data/app/views/govuk_publishing_components/components/_machine_readable_metadata.html.erb +18 -17
  55. data/app/views/govuk_publishing_components/components/_metadata.html.erb +4 -4
  56. data/app/views/govuk_publishing_components/components/_notice.html.erb +1 -1
  57. data/app/views/govuk_publishing_components/components/_option_select.html.erb +8 -9
  58. data/app/views/govuk_publishing_components/components/_organisation_logo.html.erb +1 -1
  59. data/app/views/govuk_publishing_components/components/_password_input.html.erb +17 -17
  60. data/app/views/govuk_publishing_components/components/_phase_banner.html.erb +2 -3
  61. data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +6 -8
  62. data/app/views/govuk_publishing_components/components/_print_link.html.erb +3 -3
  63. data/app/views/govuk_publishing_components/components/_published_dates.html.erb +6 -7
  64. data/app/views/govuk_publishing_components/components/_radio.html.erb +7 -8
  65. data/app/views/govuk_publishing_components/components/_related_navigation.html.erb +4 -6
  66. data/app/views/govuk_publishing_components/components/_reorderable_list.html.erb +7 -7
  67. data/app/views/govuk_publishing_components/components/_search_with_autocomplete.html.erb +2 -2
  68. data/app/views/govuk_publishing_components/components/_secondary_navigation.html.erb +1 -1
  69. data/app/views/govuk_publishing_components/components/_select.html.erb +1 -1
  70. data/app/views/govuk_publishing_components/components/_select_with_search.html.erb +1 -1
  71. data/app/views/govuk_publishing_components/components/_share_links.html.erb +18 -18
  72. data/app/views/govuk_publishing_components/components/_signup_link.html.erb +3 -3
  73. data/app/views/govuk_publishing_components/components/_single_page_notification_button.html.erb +3 -3
  74. data/app/views/govuk_publishing_components/components/_skip_link.html.erb +2 -3
  75. data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +9 -10
  76. data/app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb +2 -3
  77. data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +5 -9
  78. data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +8 -8
  79. data/app/views/govuk_publishing_components/components/_summary_list.html.erb +1 -1
  80. data/app/views/govuk_publishing_components/components/_table.html.erb +3 -3
  81. data/app/views/govuk_publishing_components/components/_tag.html.erb +1 -1
  82. data/app/views/govuk_publishing_components/components/_textarea.html.erb +4 -4
  83. data/app/views/govuk_publishing_components/components/_translation_nav.html.erb +1 -2
  84. data/app/views/govuk_publishing_components/components/_warning_text.html.erb +2 -2
  85. data/app/views/govuk_publishing_components/components/attachment/_thumbnail_document.html.erb +1 -1
  86. data/app/views/govuk_publishing_components/components/attachment/_thumbnail_external.html.erb +1 -1
  87. data/app/views/govuk_publishing_components/components/attachment/_thumbnail_generic.html.erb +2 -2
  88. data/app/views/govuk_publishing_components/components/attachment/_thumbnail_html.html.erb +1 -1
  89. data/app/views/govuk_publishing_components/components/attachment/_thumbnail_pdf.html.erb +1 -1
  90. data/app/views/govuk_publishing_components/components/attachment/_thumbnail_spreadsheet.html.erb +3 -3
  91. data/app/views/govuk_publishing_components/components/cross_service_header/_one_login_header.html.erb +10 -10
  92. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +7 -3
  93. data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +10 -10
  94. data/app/views/govuk_publishing_components/components/feedback/_yes_no_banner.html.erb +6 -8
  95. data/app/views/govuk_publishing_components/components/govuk_logo/_govuk_logo_crown_only.html.erb +1 -2
  96. data/app/views/govuk_publishing_components/components/layout_for_public/_account-layout.html.erb +2 -2
  97. data/app/views/govuk_publishing_components/components/layout_for_public/_account-navigation.html.erb +2 -2
  98. data/app/views/govuk_publishing_components/components/layout_header/_header_logo.html.erb +1 -1
  99. data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +2 -3
  100. data/app/views/govuk_publishing_components/components/metadata/_sentence.html.erb +1 -1
  101. data/app/views/govuk_publishing_components/components/related_navigation/_section.html.erb +4 -4
  102. data/app/views/govuk_publishing_components/components/search/_search_icon.html.erb +2 -3
  103. data/app/views/layouts/govuk_publishing_components/application.html.erb +3 -3
  104. data/lib/govuk_publishing_components/presenters/component_wrapper_helper.rb +1 -1
  105. data/lib/govuk_publishing_components/presenters/heading_helper.rb +3 -3
  106. data/lib/govuk_publishing_components/presenters/meta_tags.rb +1 -0
  107. data/lib/govuk_publishing_components/version.rb +1 -1
  108. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +99 -73
  109. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js.map +1 -1
  110. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +99 -73
  111. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs.map +1 -1
  112. data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs +29 -2
  113. data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs.map +1 -1
  114. data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
  115. data/node_modules/govuk-frontend/dist/govuk/common/index.mjs +5 -11
  116. data/node_modules/govuk-frontend/dist/govuk/common/index.mjs.map +1 -1
  117. data/node_modules/govuk-frontend/dist/govuk/component.mjs.map +1 -1
  118. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js +13 -11
  119. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js.map +1 -1
  120. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs +13 -11
  121. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs.map +1 -1
  122. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs +4 -4
  123. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs.map +1 -1
  124. data/node_modules/govuk-frontend/dist/govuk/components/accordion/fixtures.json +102 -97
  125. data/node_modules/govuk-frontend/dist/govuk/components/back-link/fixtures.json +21 -32
  126. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/fixtures.json +25 -45
  127. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-default.html +6 -0
  128. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js +7 -5
  129. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js.map +1 -1
  130. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs +7 -5
  131. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs.map +1 -1
  132. data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs.map +1 -1
  133. data/node_modules/govuk-frontend/dist/govuk/components/button/fixtures.json +66 -210
  134. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js +10 -8
  135. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js.map +1 -1
  136. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs +10 -8
  137. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs.map +1 -1
  138. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs +1 -1
  139. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs.map +1 -1
  140. data/node_modules/govuk-frontend/dist/govuk/components/character-count/fixtures.json +72 -86
  141. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js +10 -5
  142. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js.map +1 -1
  143. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs +10 -5
  144. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs.map +1 -1
  145. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs.map +1 -1
  146. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/fixtures.json +305 -464
  147. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-default.html +24 -19
  148. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-divider-and-none.html +2 -4
  149. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-divider-none-and-conditional-items.html +2 -4
  150. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-error-message.html +12 -3
  151. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/{template-with-fieldset-and-error-message.html → template-with-hint.html} +5 -5
  152. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-hints-on-items.html +2 -4
  153. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-pre-checked-values.html +36 -27
  154. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-very-long-option-text.html +2 -5
  155. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/fixtures.json +115 -79
  156. data/node_modules/govuk-frontend/dist/govuk/components/date-input/fixtures.json +147 -159
  157. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-default.html +30 -22
  158. data/node_modules/govuk-frontend/dist/govuk/components/details/fixtures.json +22 -22
  159. data/node_modules/govuk-frontend/dist/govuk/components/error-message/fixtures.json +10 -10
  160. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js +8 -12
  161. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js.map +1 -1
  162. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs +8 -12
  163. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs.map +1 -1
  164. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs +2 -2
  165. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs.map +1 -1
  166. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/fixtures.json +21 -21
  167. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js +9 -7
  168. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js.map +1 -1
  169. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs +9 -7
  170. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs.map +1 -1
  171. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs.map +1 -1
  172. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/fixtures.json +19 -19
  173. data/node_modules/govuk-frontend/dist/govuk/components/fieldset/fixtures.json +19 -19
  174. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js +10 -8
  175. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js.map +1 -1
  176. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs +10 -8
  177. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs.map +1 -1
  178. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs +1 -1
  179. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs.map +1 -1
  180. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/fixtures.json +99 -150
  181. data/node_modules/govuk-frontend/dist/govuk/components/footer/fixtures.json +53 -64
  182. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +10 -4
  183. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss.map +1 -1
  184. data/node_modules/govuk-frontend/dist/govuk/components/header/fixtures.json +155 -103
  185. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js +12 -6
  186. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js.map +1 -1
  187. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs +12 -6
  188. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs.map +1 -1
  189. data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs +1 -0
  190. data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs.map +1 -1
  191. data/node_modules/govuk-frontend/dist/govuk/components/header/template-full-width-with-navigation.html +0 -1
  192. data/node_modules/govuk-frontend/dist/govuk/components/header/template-full-width.html +0 -1
  193. data/node_modules/govuk-frontend/dist/govuk/components/header/template-navigation-item-with-html.html +0 -3
  194. data/node_modules/govuk-frontend/dist/govuk/components/header/template-navigation-item-with-text-without-link.html +0 -3
  195. data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-full-width-border.html +0 -1
  196. data/node_modules/govuk-frontend/dist/govuk/components/hint/fixtures.json +7 -7
  197. data/node_modules/govuk-frontend/dist/govuk/components/input/fixtures.json +158 -179
  198. data/node_modules/govuk-frontend/dist/govuk/components/inset-text/fixtures.json +7 -7
  199. data/node_modules/govuk-frontend/dist/govuk/components/label/fixtures.json +18 -18
  200. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/fixtures.json +74 -108
  201. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js +7 -5
  202. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js.map +1 -1
  203. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs +7 -5
  204. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs.map +1 -1
  205. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs.map +1 -1
  206. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-with-text-as-html.html +7 -1
  207. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +4 -0
  208. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss.map +1 -1
  209. data/node_modules/govuk-frontend/dist/govuk/components/pagination/fixtures.json +80 -98
  210. data/node_modules/govuk-frontend/dist/govuk/components/pagination/macro-options.json +4 -4
  211. data/node_modules/govuk-frontend/dist/govuk/components/panel/fixtures.json +22 -22
  212. data/node_modules/govuk-frontend/dist/govuk/components/password-input/fixtures.json +53 -48
  213. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js +9 -7
  214. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js.map +1 -1
  215. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs +9 -7
  216. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs.map +1 -1
  217. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs.map +1 -1
  218. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/fixtures.json +8 -8
  219. data/node_modules/govuk-frontend/dist/govuk/components/radios/fixtures.json +213 -328
  220. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js +10 -5
  221. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js.map +1 -1
  222. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs +10 -5
  223. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs.map +1 -1
  224. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs.map +1 -1
  225. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-default.html +18 -16
  226. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-hint.html +24 -0
  227. data/node_modules/govuk-frontend/dist/govuk/components/select/fixtures.json +99 -115
  228. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +72 -5
  229. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss.map +1 -1
  230. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/fixtures.json +228 -62
  231. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/macro-options.json +6 -0
  232. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js +11 -6
  233. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js.map +1 -1
  234. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs +11 -6
  235. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs.map +1 -1
  236. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs.map +1 -1
  237. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/{template-with-navigation-with-an-active-item.html → template-inverse.html} +7 -2
  238. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-a-single-navigation-item-and-collapsenavigationonmobile-set-to-true.html +38 -0
  239. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-a-single-navigation-item.html +35 -0
  240. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-collapsenavigationonmobile-set-to-false.html +60 -0
  241. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template.njk +3 -0
  242. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss +1 -2
  243. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss.map +1 -1
  244. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/fixtures.json +10 -10
  245. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js +12 -19
  246. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js.map +1 -1
  247. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs +12 -19
  248. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs.map +1 -1
  249. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs +3 -9
  250. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs.map +1 -1
  251. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/fixtures.json +282 -518
  252. data/node_modules/govuk-frontend/dist/govuk/components/table/fixtures.json +75 -75
  253. data/node_modules/govuk-frontend/dist/govuk/components/tabs/fixtures.json +44 -39
  254. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js +13 -14
  255. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js.map +1 -1
  256. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs +13 -14
  257. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs.map +1 -1
  258. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs +3 -3
  259. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs.map +1 -1
  260. data/node_modules/govuk-frontend/dist/govuk/components/tag/fixtures.json +14 -26
  261. data/node_modules/govuk-frontend/dist/govuk/components/task-list/fixtures.json +14 -71
  262. data/node_modules/govuk-frontend/dist/govuk/components/textarea/fixtures.json +81 -81
  263. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/fixtures.json +9 -9
  264. data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +5 -2
  265. data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss.map +1 -1
  266. data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs +5 -3
  267. data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs.map +1 -1
  268. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css +2 -2
  269. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css.map +1 -1
  270. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
  271. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js.map +1 -1
  272. data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss +31 -2
  273. data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss.map +1 -1
  274. data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss +4 -1
  275. data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss.map +1 -1
  276. data/node_modules/govuk-frontend/dist/govuk/i18n.mjs +4 -2
  277. data/node_modules/govuk-frontend/dist/govuk/i18n.mjs.map +1 -1
  278. data/node_modules/govuk-frontend/dist/govuk/init.mjs +52 -43
  279. data/node_modules/govuk-frontend/dist/govuk/init.mjs.map +1 -1
  280. data/node_modules/govuk-frontend/dist/govuk/macros/logo.njk +2 -2
  281. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.scss +2 -2
  282. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.scss.map +1 -1
  283. data/node_modules/govuk-frontend/dist/govuk/settings/_index.scss +13 -0
  284. data/node_modules/govuk-frontend/dist/govuk/settings/_index.scss.map +1 -1
  285. data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +1 -1
  286. data/node_modules/govuk-frontend/package.json +13 -13
  287. metadata +27 -102
  288. data/node_modules/govuk-frontend/dist/govuk/components/accordion/template-with-focusable-elements-inside.html +0 -26
  289. data/node_modules/govuk-frontend/dist/govuk/components/accordion/template-with-one-section-open.html +0 -30
  290. data/node_modules/govuk-frontend/dist/govuk/components/accordion/template-with-translations.html +0 -30
  291. data/node_modules/govuk-frontend/dist/govuk/components/back-link/template-with-custom-link.html +0 -1
  292. data/node_modules/govuk-frontend/dist/govuk/components/back-link/template-with-custom-text.html +0 -1
  293. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-with-multiple-levels.html +0 -16
  294. data/node_modules/govuk-frontend/dist/govuk/components/button/template-input-disabled.html +0 -1
  295. data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse-disabled.html +0 -3
  296. data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse-link.html +0 -3
  297. data/node_modules/govuk-frontend/dist/govuk/components/button/template-inverse-start.html +0 -6
  298. data/node_modules/govuk-frontend/dist/govuk/components/button/template-prevent-double-click.html +0 -3
  299. data/node_modules/govuk-frontend/dist/govuk/components/button/template-secondary-disabled.html +0 -3
  300. data/node_modules/govuk-frontend/dist/govuk/components/button/template-secondary-link.html +0 -3
  301. data/node_modules/govuk-frontend/dist/govuk/components/button/template-start-link.html +0 -6
  302. data/node_modules/govuk-frontend/dist/govuk/components/button/template-warning-disabled.html +0 -3
  303. data/node_modules/govuk-frontend/dist/govuk/components/button/template-warning-link.html +0 -3
  304. data/node_modules/govuk-frontend/dist/govuk/components/button/template-with-active-state.html +0 -3
  305. data/node_modules/govuk-frontend/dist/govuk/components/button/template-with-focus-state.html +0 -3
  306. data/node_modules/govuk-frontend/dist/govuk/components/button/template-with-hover-state.html +0 -3
  307. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-custom-textarea-description.html +0 -9
  308. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-error.html +0 -12
  309. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-translations.html +0 -9
  310. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-disabled.html +0 -27
  311. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-a-medium-legend.html +0 -33
  312. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-conditional-item-checked.html +0 -39
  313. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-conditional-items-with-special-characters.html +0 -39
  314. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-disabled-item.html +0 -29
  315. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-error-message-and-hints-on-items.html +0 -39
  316. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-id-and-name.html +0 -30
  317. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-single-option-and-hint-set-aria-describedby-on-input.html +0 -16
  318. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-single-option-set-aria-describedby-on-input.html +0 -13
  319. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-without-fieldset.html +0 -22
  320. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/template-client-side-implementation.html +0 -60
  321. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-autocomplete-values.html +0 -36
  322. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-default-items.html +0 -36
  323. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-input-attributes.html +0 -36
  324. data/node_modules/govuk-frontend/dist/govuk/components/date-input/template-with-optional-form-group-classes.html +0 -36
  325. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/template-translated.html +0 -5
  326. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-allows-direct-media-capture.html +0 -6
  327. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-allows-image-files-only.html +0 -6
  328. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-allows-multiple-files.html +0 -6
  329. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-disabled.html +0 -6
  330. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced-disabled.html +0 -13
  331. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-with-optional-form-group-classes.html +0 -6
  332. data/node_modules/govuk-frontend/dist/govuk/components/footer/template-with-meta.html +0 -56
  333. data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-menu-button-label.html +0 -59
  334. data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-navigation-label.html +0 -59
  335. data/node_modules/govuk-frontend/dist/govuk/components/input/template-disabled.html +0 -6
  336. data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-autocapitalize-turned-off.html +0 -6
  337. data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-autocomplete-attribute.html +0 -6
  338. data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-optional-form-group-classes.html +0 -6
  339. data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-pattern-attribute.html +0 -6
  340. data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-prefix-and-long-suffix.html +0 -10
  341. data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-spellcheck-disabled.html +0 -6
  342. data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-spellcheck-enabled.html +0 -6
  343. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-auto-focus-disabled-with-type-as-success.html +0 -12
  344. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-auto-focus-explicitly-enabled-with-type-as-success.html +0 -12
  345. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-custom-tabindex.html +0 -12
  346. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-paragraph-as-html-heading.html +0 -10
  347. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-rolealert-overridden-to-roleregion-with-type-as-success.html +0 -12
  348. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-success-with-custom-html.html +0 -16
  349. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/template-with-a-list.html +0 -16
  350. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-custom-accessible-labels-on-item-links.html +0 -39
  351. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-custom-navigation-landmark.html +0 -39
  352. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-prev-and-next-only-in-a-different-language.html +0 -22
  353. data/node_modules/govuk-frontend/dist/govuk/components/panel/template-custom-heading-level.html +0 -8
  354. data/node_modules/govuk-frontend/dist/govuk/components/password-input/template-with-new-password-autocomplete.html +0 -11
  355. data/node_modules/govuk-frontend/dist/govuk/components/password-input/template-with-translations.html +0 -11
  356. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-prechecked-using-value.html +0 -16
  357. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-prechecked.html +0 -19
  358. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-inline-extreme.html +0 -69
  359. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-disabled.html +0 -27
  360. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-a-medium-legend.html +0 -24
  361. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-conditional-items-with-special-characters.html +0 -39
  362. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-disabled.html +0 -29
  363. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-idprefix.html +0 -16
  364. data/node_modules/govuk-frontend/dist/govuk/components/select/template-id.html +0 -7
  365. data/node_modules/govuk-frontend/dist/govuk/components/select/template-with-no-items.html +0 -7
  366. data/node_modules/govuk-frontend/dist/govuk/components/select/template-with-optional-form-group-classes.html +0 -10
  367. data/node_modules/govuk-frontend/dist/govuk/components/select/template-with-selected-value.html +0 -10
  368. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-as-a-summary-card-with-a-custom-header-level.html +0 -28
  369. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-check-your-answers.html +0 -98
  370. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-overridden-widths.html +0 -58
  371. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-translated.html +0 -51
  372. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-with-no-first-action.html +0 -58
  373. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-with-some-actions.html +0 -45
  374. data/node_modules/govuk-frontend/dist/govuk/components/table/template-with-small-text-modifier-for-tables-with-a-lot-of-data.html +0 -19
  375. data/node_modules/govuk-frontend/dist/govuk/components/tag/template-blue.html +0 -3
  376. data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-example-with-3-states.html +0 -49
  377. data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-autocomplete-attribute.html +0 -6
  378. data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-optional-form-group-classes.html +0 -6
  379. data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-spellcheck-disabled.html +0 -6
  380. data/node_modules/govuk-frontend/dist/govuk/components/textarea/template-with-spellcheck-enabled.html +0 -6
  381. /data/node_modules/govuk-frontend/dist/govuk/components/date-input/{template-complete-question.html → template-with-items.html} +0 -0
  382. /data/node_modules/govuk-frontend/dist/govuk/components/table/{template-table-with-head-and-caption.html → template-with-head-and-caption.html} +0 -0
  383. /data/node_modules/govuk-frontend/dist/govuk/components/table/{template-table-with-head.html → template-with-head.html} +0 -0
  384. /data/node_modules/govuk-frontend/dist/govuk/components/task-list/{template-example-with-all-possible-colours.html → template-with-all-possible-colours.html} +0 -0
  385. /data/node_modules/govuk-frontend/dist/govuk/components/task-list/{template-example-with-hint-text-and-additional-states.html → template-with-hint-text-and-additional-states.html} +0 -0
  386. /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
@@ -11,8 +11,8 @@
11
11
  },
12
12
  "hidden": false,
13
13
  "description": "",
14
- "previewLayoutModifiers": [],
15
- "screenshot": false,
14
+ "pageTemplateOptions": {},
15
+ "screenshot": true,
16
16
  "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"more-detail\">\n Can you provide more detail?\n </label>\n <textarea class=\"govuk-textarea\" id=\"more-detail\" name=\"more-detail\" rows=\"5\"></textarea>\n</div>"
17
17
  },
18
18
  {
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "hidden": false,
31
31
  "description": "",
32
- "previewLayoutModifiers": [],
32
+ "pageTemplateOptions": {},
33
33
  "screenshot": false,
34
34
  "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"more-detail\">\n Can you provide more detail?\n </label>\n <div id=\"more-detail-hint\" class=\"govuk-hint\">\n Don&#39;t include personal or financial information, eg your National Insurance number or credit card details.\n </div>\n <textarea class=\"govuk-textarea\" id=\"more-detail\" name=\"more-detail\" rows=\"5\" aria-describedby=\"more-detail-hint\"></textarea>\n</div>"
35
35
  },
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "hidden": false,
49
49
  "description": "",
50
- "previewLayoutModifiers": [],
50
+ "pageTemplateOptions": {},
51
51
  "screenshot": false,
52
52
  "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"no-ni-reason\">\n Why can’t you provide a National Insurance number?\n </label>\n <p id=\"no-ni-reason-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> You must provide an explanation\n </p>\n <textarea class=\"govuk-textarea govuk-textarea--error\" id=\"no-ni-reason\" name=\"no-ni-reason\" rows=\"5\" aria-describedby=\"no-ni-reason-error\"></textarea>\n</div>"
53
53
  },
@@ -63,7 +63,7 @@
63
63
  },
64
64
  "hidden": false,
65
65
  "description": "",
66
- "previewLayoutModifiers": [],
66
+ "pageTemplateOptions": {},
67
67
  "screenshot": false,
68
68
  "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"full-address\">\n Full address\n </label>\n <textarea class=\"govuk-textarea\" id=\"full-address\" name=\"address\" rows=\"5\">221B Baker Street\nLondon\nNW1 6XE\n</textarea>\n</div>"
69
69
  },
@@ -79,7 +79,7 @@
79
79
  },
80
80
  "hidden": false,
81
81
  "description": "",
82
- "previewLayoutModifiers": [],
82
+ "pageTemplateOptions": {},
83
83
  "screenshot": false,
84
84
  "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"full-address\">\n Full address\n </label>\n <textarea class=\"govuk-textarea\" id=\"full-address\" name=\"address\" rows=\"8\"></textarea>\n</div>"
85
85
  },
@@ -96,76 +96,10 @@
96
96
  },
97
97
  "hidden": false,
98
98
  "description": "",
99
- "previewLayoutModifiers": [],
99
+ "pageTemplateOptions": {},
100
100
  "screenshot": false,
101
101
  "html": "<div class=\"govuk-form-group\">\n <h1 class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--l\" for=\"textarea-with-page-heading\">\n Full address\n </label>\n </h1>\n <textarea class=\"govuk-textarea\" id=\"textarea-with-page-heading\" name=\"address\" rows=\"5\"></textarea>\n</div>"
102
102
  },
103
- {
104
- "name": "with optional form-group classes",
105
- "options": {
106
- "id": "textarea-with-page-heading",
107
- "name": "address",
108
- "label": {
109
- "text": "Full address"
110
- },
111
- "formGroup": {
112
- "classes": "extra-class"
113
- }
114
- },
115
- "hidden": false,
116
- "description": "",
117
- "previewLayoutModifiers": [],
118
- "screenshot": false,
119
- "html": "<div class=\"govuk-form-group extra-class\">\n <label class=\"govuk-label\" for=\"textarea-with-page-heading\">\n Full address\n </label>\n <textarea class=\"govuk-textarea\" id=\"textarea-with-page-heading\" name=\"address\" rows=\"5\"></textarea>\n</div>"
120
- },
121
- {
122
- "name": "with autocomplete attribute",
123
- "options": {
124
- "id": "textarea-with-autocomplete-attribute",
125
- "name": "address",
126
- "label": {
127
- "text": "Full address"
128
- },
129
- "autocomplete": "street-address"
130
- },
131
- "hidden": false,
132
- "description": "",
133
- "previewLayoutModifiers": [],
134
- "screenshot": false,
135
- "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"textarea-with-autocomplete-attribute\">\n Full address\n </label>\n <textarea class=\"govuk-textarea\" id=\"textarea-with-autocomplete-attribute\" name=\"address\" rows=\"5\" autocomplete=\"street-address\"></textarea>\n</div>"
136
- },
137
- {
138
- "name": "with spellcheck enabled",
139
- "options": {
140
- "label": {
141
- "text": "Spellcheck is enabled"
142
- },
143
- "id": "textarea-with-spellcheck-enabled",
144
- "name": "spellcheck",
145
- "spellcheck": true
146
- },
147
- "hidden": false,
148
- "description": "",
149
- "previewLayoutModifiers": [],
150
- "screenshot": false,
151
- "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"textarea-with-spellcheck-enabled\">\n Spellcheck is enabled\n </label>\n <textarea class=\"govuk-textarea\" id=\"textarea-with-spellcheck-enabled\" name=\"spellcheck\" rows=\"5\" spellcheck=\"true\"></textarea>\n</div>"
152
- },
153
- {
154
- "name": "with spellcheck disabled",
155
- "options": {
156
- "label": {
157
- "text": "Spellcheck is disabled"
158
- },
159
- "id": "textarea-with-spellcheck-disabled",
160
- "name": "spellcheck",
161
- "spellcheck": false
162
- },
163
- "hidden": false,
164
- "description": "",
165
- "previewLayoutModifiers": [],
166
- "screenshot": false,
167
- "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"textarea-with-spellcheck-disabled\">\n Spellcheck is disabled\n </label>\n <textarea class=\"govuk-textarea\" id=\"textarea-with-spellcheck-disabled\" name=\"spellcheck\" rows=\"5\" spellcheck=\"false\"></textarea>\n</div>"
168
- },
169
103
  {
170
104
  "name": "id",
171
105
  "options": {
@@ -177,7 +111,7 @@
177
111
  },
178
112
  "hidden": true,
179
113
  "description": "",
180
- "previewLayoutModifiers": [],
114
+ "pageTemplateOptions": {},
181
115
  "screenshot": false,
182
116
  "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"textarea-id\">\n With custom id\n </label>\n <textarea class=\"govuk-textarea\" id=\"textarea-id\" name=\"test-name\" rows=\"5\"></textarea>\n</div>"
183
117
  },
@@ -193,7 +127,7 @@
193
127
  },
194
128
  "hidden": true,
195
129
  "description": "",
196
- "previewLayoutModifiers": [],
130
+ "pageTemplateOptions": {},
197
131
  "screenshot": false,
198
132
  "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-classes\">\n With classes\n </label>\n <textarea class=\"govuk-textarea app-textarea--custom-modifier\" id=\"with-classes\" name=\"with-classes\" rows=\"5\"></textarea>\n</div>"
199
133
  },
@@ -211,7 +145,7 @@
211
145
  },
212
146
  "hidden": true,
213
147
  "description": "",
214
- "previewLayoutModifiers": [],
148
+ "pageTemplateOptions": {},
215
149
  "screenshot": false,
216
150
  "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-attributes\">\n With attributes\n </label>\n <textarea class=\"govuk-textarea\" id=\"with-attributes\" name=\"with-attributes\" rows=\"5\" data-attribute=\"my data value\"></textarea>\n</div>"
217
151
  },
@@ -227,7 +161,7 @@
227
161
  },
228
162
  "hidden": true,
229
163
  "description": "",
230
- "previewLayoutModifiers": [],
164
+ "pageTemplateOptions": {},
231
165
  "screenshot": false,
232
166
  "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-describedby\">\n With describedBy\n </label>\n <textarea class=\"govuk-textarea\" id=\"with-describedby\" name=\"with-describedby\" rows=\"5\" aria-describedby=\"test-target-element\"></textarea>\n</div>"
233
167
  },
@@ -246,7 +180,7 @@
246
180
  },
247
181
  "hidden": true,
248
182
  "description": "",
249
- "previewLayoutModifiers": [],
183
+ "pageTemplateOptions": {},
250
184
  "screenshot": false,
251
185
  "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-hint-describedby\">\n With hint and describedBy\n </label>\n <div id=\"with-hint-describedby-hint\" class=\"govuk-hint\">\n It’s on your National Insurance card, benefit letter, payslip or P60. For example, ‘QQ 12 34 56 C’.\n </div>\n <textarea class=\"govuk-textarea\" id=\"with-hint-describedby\" name=\"with-hint-describedby\" rows=\"5\" aria-describedby=\"test-target-element with-hint-describedby-hint\"></textarea>\n</div>"
252
186
  },
@@ -265,7 +199,7 @@
265
199
  },
266
200
  "hidden": true,
267
201
  "description": "",
268
- "previewLayoutModifiers": [],
202
+ "pageTemplateOptions": {},
269
203
  "screenshot": false,
270
204
  "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"textarea-with-error\">\n Textarea with error\n </label>\n <p id=\"textarea-with-error-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </p>\n <textarea class=\"govuk-textarea govuk-textarea--error\" id=\"textarea-with-error\" name=\"textarea-with-error\" rows=\"5\" aria-describedby=\"test-target-element textarea-with-error-error\"></textarea>\n</div>"
271
205
  },
@@ -286,7 +220,7 @@
286
220
  },
287
221
  "hidden": true,
288
222
  "description": "",
289
- "previewLayoutModifiers": [],
223
+ "pageTemplateOptions": {},
290
224
  "screenshot": false,
291
225
  "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"with-hint-error\">\n With hint and error\n </label>\n <div id=\"with-hint-error-hint\" class=\"govuk-hint\">\n Hint\n </div>\n <p id=\"with-hint-error-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </p>\n <textarea class=\"govuk-textarea govuk-textarea--error\" id=\"with-hint-error\" name=\"with-hint-error\" rows=\"5\" aria-describedby=\"with-hint-error-hint with-hint-error-error\"></textarea>\n</div>"
292
226
  },
@@ -308,9 +242,75 @@
308
242
  },
309
243
  "hidden": true,
310
244
  "description": "",
311
- "previewLayoutModifiers": [],
245
+ "pageTemplateOptions": {},
312
246
  "screenshot": false,
313
247
  "html": "<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"with-hint-error-describedby\">\n With hint, error and describedBy\n </label>\n <div id=\"with-hint-error-describedby-hint\" class=\"govuk-hint\">\n Hint\n </div>\n <p id=\"with-hint-error-describedby-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </p>\n <textarea class=\"govuk-textarea govuk-textarea--error\" id=\"with-hint-error-describedby\" name=\"with-hint-error-describedby\" rows=\"5\" aria-describedby=\"test-target-element with-hint-error-describedby-hint with-hint-error-describedby-error\"></textarea>\n</div>"
248
+ },
249
+ {
250
+ "name": "with optional form-group classes",
251
+ "options": {
252
+ "id": "textarea-with-page-heading",
253
+ "name": "address",
254
+ "label": {
255
+ "text": "Full address"
256
+ },
257
+ "formGroup": {
258
+ "classes": "extra-class"
259
+ }
260
+ },
261
+ "hidden": true,
262
+ "description": "",
263
+ "pageTemplateOptions": {},
264
+ "screenshot": false,
265
+ "html": "<div class=\"govuk-form-group extra-class\">\n <label class=\"govuk-label\" for=\"textarea-with-page-heading\">\n Full address\n </label>\n <textarea class=\"govuk-textarea\" id=\"textarea-with-page-heading\" name=\"address\" rows=\"5\"></textarea>\n</div>"
266
+ },
267
+ {
268
+ "name": "with autocomplete attribute",
269
+ "options": {
270
+ "id": "textarea-with-autocomplete-attribute",
271
+ "name": "address",
272
+ "label": {
273
+ "text": "Full address"
274
+ },
275
+ "autocomplete": "street-address"
276
+ },
277
+ "hidden": true,
278
+ "description": "",
279
+ "pageTemplateOptions": {},
280
+ "screenshot": false,
281
+ "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"textarea-with-autocomplete-attribute\">\n Full address\n </label>\n <textarea class=\"govuk-textarea\" id=\"textarea-with-autocomplete-attribute\" name=\"address\" rows=\"5\" autocomplete=\"street-address\"></textarea>\n</div>"
282
+ },
283
+ {
284
+ "name": "with spellcheck enabled",
285
+ "options": {
286
+ "label": {
287
+ "text": "Spellcheck is enabled"
288
+ },
289
+ "id": "textarea-with-spellcheck-enabled",
290
+ "name": "spellcheck",
291
+ "spellcheck": true
292
+ },
293
+ "hidden": true,
294
+ "description": "",
295
+ "pageTemplateOptions": {},
296
+ "screenshot": false,
297
+ "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"textarea-with-spellcheck-enabled\">\n Spellcheck is enabled\n </label>\n <textarea class=\"govuk-textarea\" id=\"textarea-with-spellcheck-enabled\" name=\"spellcheck\" rows=\"5\" spellcheck=\"true\"></textarea>\n</div>"
298
+ },
299
+ {
300
+ "name": "with spellcheck disabled",
301
+ "options": {
302
+ "label": {
303
+ "text": "Spellcheck is disabled"
304
+ },
305
+ "id": "textarea-with-spellcheck-disabled",
306
+ "name": "spellcheck",
307
+ "spellcheck": false
308
+ },
309
+ "hidden": true,
310
+ "description": "",
311
+ "pageTemplateOptions": {},
312
+ "screenshot": false,
313
+ "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"textarea-with-spellcheck-disabled\">\n Spellcheck is disabled\n </label>\n <textarea class=\"govuk-textarea\" id=\"textarea-with-spellcheck-disabled\" name=\"spellcheck\" rows=\"5\" spellcheck=\"false\"></textarea>\n</div>"
314
314
  }
315
315
  ]
316
316
  }
@@ -9,8 +9,8 @@
9
9
  },
10
10
  "hidden": false,
11
11
  "description": "",
12
- "previewLayoutModifiers": [],
13
- "screenshot": false,
12
+ "pageTemplateOptions": {},
13
+ "screenshot": true,
14
14
  "html": "<div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n You can be fined up to £5,000 if you don’t register.\n </strong>\n</div>"
15
15
  },
16
16
  {
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "hidden": false,
23
23
  "description": "",
24
- "previewLayoutModifiers": [],
24
+ "pageTemplateOptions": {},
25
25
  "screenshot": false,
26
26
  "html": "<div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n If you are not covered by this License), You must: (a) comply with the terms stated above for the purpose of this license. It explains, for example, the production of a Source form, including but not limited to, the implied warranties or conditions of this License, without any additional file created by such Respondent to you under Sections 2.1 and 2.2 above. Larger Works. You may choose to distribute such a notice and a brief idea of what it does.\n </strong>\n</div>"
27
27
  },
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "hidden": true,
38
38
  "description": "",
39
- "previewLayoutModifiers": [],
39
+ "pageTemplateOptions": {},
40
40
  "screenshot": false,
41
41
  "html": "<div class=\"govuk-warning-text\" id=\"my-warning-text\" data-test=\"attribute\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n You can be fined up to £5,000 if you don’t register.\n </strong>\n</div>"
42
42
  },
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "hidden": true,
50
50
  "description": "",
51
- "previewLayoutModifiers": [],
51
+ "pageTemplateOptions": {},
52
52
  "screenshot": false,
53
53
  "html": "<div class=\"govuk-warning-text govuk-warning-text--custom-class\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n Warning text\n </strong>\n</div>"
54
54
  },
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "hidden": true,
62
62
  "description": "",
63
- "previewLayoutModifiers": [],
63
+ "pageTemplateOptions": {},
64
64
  "screenshot": false,
65
65
  "html": "<div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <span>Some custom warning text</span>\n </strong>\n</div>"
66
66
  },
@@ -71,7 +71,7 @@
71
71
  },
72
72
  "hidden": true,
73
73
  "description": "",
74
- "previewLayoutModifiers": [],
74
+ "pageTemplateOptions": {},
75
75
  "screenshot": false,
76
76
  "html": "<div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n &lt;span&gt;Some custom warning text&lt;/span&gt;\n </strong>\n</div>"
77
77
  },
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "hidden": true,
84
84
  "description": "",
85
- "previewLayoutModifiers": [],
85
+ "pageTemplateOptions": {},
86
86
  "screenshot": false,
87
87
  "html": "<div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Some custom fallback text</span>\n \n </strong>\n</div>"
88
88
  },
@@ -93,7 +93,7 @@
93
93
  },
94
94
  "hidden": true,
95
95
  "description": "",
96
- "previewLayoutModifiers": [],
96
+ "pageTemplateOptions": {},
97
97
  "screenshot": false,
98
98
  "html": "<div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n This is a warning\n </strong>\n</div>"
99
99
  }
@@ -1,11 +1,14 @@
1
1
  :root {
2
2
  // This variable is automatically overwritten during builds and releases.
3
3
  // It doesn't need to be updated manually.
4
- --govuk-frontend-version: "5.10.1";
4
+ --govuk-frontend-version: "5.11.2";
5
5
 
6
6
  // CSS custom property for each breakpoint
7
7
  @each $name, $value in $govuk-breakpoints {
8
- --govuk-frontend-breakpoint-#{$name}: #{govuk-px-to-rem($value)};
8
+ --govuk-breakpoint-#{$name}: #{govuk-px-to-rem($value)};
9
+
10
+ // Deprecated, use `--govuk-breakpoint-[name]` instead
11
+ --govuk-frontend-breakpoint-#{$name}: var(--govuk-breakpoint-#{$name});
9
12
  }
10
13
  }
11
14
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/govuk/core/_govuk-frontend-properties.scss"],"names":[],"mappings":"AAAA;EACE,wEAAwE;EACxE,yCAAyC;EACzC,kCAAuC;;EAEvC,yCAAyC;EACzC;IACE,gEAAgE;EAClE;AACF","file":"_govuk-frontend-properties.scss","sourcesContent":[":root {\n // This variable is automatically overwritten during builds and releases.\n // It doesn't need to be updated manually.\n --govuk-frontend-version: \"development\";\n\n // CSS custom property for each breakpoint\n @each $name, $value in $govuk-breakpoints {\n --govuk-frontend-breakpoint-#{$name}: #{govuk-px-to-rem($value)};\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../src/govuk/core/_govuk-frontend-properties.scss"],"names":[],"mappings":"AAAA;EACE,wEAAwE;EACxE,yCAAyC;EACzC,kCAAuC;;EAEvC,yCAAyC;EACzC;IACE,uDAAuD;;IAEvD,qDAAqD;IACrD,sEAAsE;EACxE;AACF","file":"_govuk-frontend-properties.scss","sourcesContent":[":root {\n // This variable is automatically overwritten during builds and releases.\n // It doesn't need to be updated manually.\n --govuk-frontend-version: \"development\";\n\n // CSS custom property for each breakpoint\n @each $name, $value in $govuk-breakpoints {\n --govuk-breakpoint-#{$name}: #{govuk-px-to-rem($value)};\n\n // Deprecated, use `--govuk-breakpoint-[name]` instead\n --govuk-frontend-breakpoint-#{$name}: var(--govuk-breakpoint-#{$name});\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { formatErrorMessage } from '../common/index.mjs';
1
+ import { isObject, formatErrorMessage } from '../common/index.mjs';
2
2
 
3
3
  class GOVUKFrontendError extends Error {
4
4
  constructor(...args) {
@@ -27,7 +27,7 @@ class ConfigError extends GOVUKFrontendError {
27
27
  class ElementError extends GOVUKFrontendError {
28
28
  constructor(messageOrOptions) {
29
29
  let message = typeof messageOrOptions === 'string' ? messageOrOptions : '';
30
- if (typeof messageOrOptions === 'object') {
30
+ if (isObject(messageOrOptions)) {
31
31
  const {
32
32
  component,
33
33
  identifier,
@@ -36,7 +36,9 @@ class ElementError extends GOVUKFrontendError {
36
36
  } = messageOrOptions;
37
37
  message = identifier;
38
38
  message += element ? ` is not of type ${expectedType != null ? expectedType : 'HTMLElement'}` : ' not found';
39
- message = formatErrorMessage(component, message);
39
+ if (component) {
40
+ message = formatErrorMessage(component, message);
41
+ }
40
42
  }
41
43
  super(message);
42
44
  this.name = 'ElementError';
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/govuk/errors/index.mjs"],"sourcesContent":["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"],"names":["GOVUKFrontendError","Error","constructor","args","name","SupportError","$scope","document","body","supportMessage","HTMLScriptElement","prototype","ConfigError","ElementError","messageOrOptions","message","component","identifier","element","expectedType","formatErrorMessage","InitError","componentOrMessage"],"mappings":";;AAsBO,MAAMA,kBAAkB,SAASC,KAAK,CAAC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;IAAA,IAC5CC,CAAAA,IAAI,GAAG,oBAAoB;AAAA;AAC7B;AAKO,MAAMC,YAAY,SAASL,kBAAkB,CAAC;AAGnD;AACF;AACA;AACA;AACA;AACEE,EAAAA,WAAWA,CAACI,MAAM,GAAGC,QAAQ,CAACC,IAAI,EAAE;IAClC,MAAMC,cAAc,GAClB,UAAU,IAAIC,iBAAiB,CAACC,SAAS,GACrC,gHAAgH,GAChH,kDAAkD;AAExD,IAAA,KAAK,CACHL,MAAM,GACFG,cAAc,GACd,8DACN,CAAC;IAAA,IAjBHL,CAAAA,IAAI,GAAG,cAAc;AAkBrB;AACF;AAKO,MAAMQ,WAAW,SAASZ,kBAAkB,CAAC;AAAAE,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;IAAA,IAClDC,CAAAA,IAAI,GAAG,aAAa;AAAA;AACtB;AAKO,MAAMS,YAAY,SAASb,kBAAkB,CAAC;EAmBnDE,WAAWA,CAACY,gBAAgB,EAAE;IAC5B,IAAIC,OAAO,GAAG,OAAOD,gBAAgB,KAAK,QAAQ,GAAGA,gBAAgB,GAAG,EAAE;AAG1E,IAAA,IAAI,OAAOA,gBAAgB,KAAK,QAAQ,EAAE;MACxC,MAAM;QAAEE,SAAS;QAAEC,UAAU;QAAEC,OAAO;AAAEC,QAAAA;AAAa,OAAC,GAAGL,gBAAgB;AAEzEC,MAAAA,OAAO,GAAGE,UAAU;MAGpBF,OAAO,IAAIG,OAAO,GACd,CAAmBC,gBAAAA,EAAAA,YAAY,IAAZA,IAAAA,GAAAA,YAAY,GAAI,aAAa,CAAE,CAAA,GAClD,YAAY;AAEhBJ,MAAAA,OAAO,GAAGK,kBAAkB,CAACJ,SAAS,EAAED,OAAO,CAAC;AAClD;IAEA,KAAK,CAACA,OAAO,CAAC;IAAA,IAnChBX,CAAAA,IAAI,GAAG,cAAc;AAoCrB;AACF;AAKO,MAAMiB,SAAS,SAASrB,kBAAkB,CAAC;EAOhDE,WAAWA,CAACoB,kBAAkB,EAAE;AAC9B,IAAA,MAAMP,OAAO,GACX,OAAOO,kBAAkB,KAAK,QAAQ,GAClCA,kBAAkB,GAClBF,kBAAkB,CAChBE,kBAAkB,EAClB,8CACF,CAAC;IAEP,KAAK,CAACP,OAAO,CAAC;IAAA,IAfhBX,CAAAA,IAAI,GAAG,WAAW;AAgBlB;AACF;AAaA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/govuk/errors/index.mjs"],"sourcesContent":["import { formatErrorMessage, isObject } 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 (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"],"names":["GOVUKFrontendError","Error","constructor","args","name","SupportError","$scope","document","body","supportMessage","HTMLScriptElement","prototype","ConfigError","ElementError","messageOrOptions","message","isObject","component","identifier","element","expectedType","formatErrorMessage","InitError","componentOrMessage"],"mappings":";;AAsBO,MAAMA,kBAAkB,SAASC,KAAK,CAAC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;IAAA,IAAA,CAC5CC,IAAI,GAAG,oBAAoB;AAAA,EAAA;AAC7B;AAKO,MAAMC,YAAY,SAASL,kBAAkB,CAAC;AAGnD;AACF;AACA;AACA;AACA;AACEE,EAAAA,WAAWA,CAACI,MAAM,GAAGC,QAAQ,CAACC,IAAI,EAAE;IAClC,MAAMC,cAAc,GAClB,UAAU,IAAIC,iBAAiB,CAACC,SAAS,GACrC,gHAAgH,GAChH,kDAAkD;AAExD,IAAA,KAAK,CACHL,MAAM,GACFG,cAAc,GACd,8DACN,CAAC;IAAA,IAAA,CAjBHL,IAAI,GAAG,cAAc;AAkBrB,EAAA;AACF;AAKO,MAAMQ,WAAW,SAASZ,kBAAkB,CAAC;AAAAE,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;IAAA,IAAA,CAClDC,IAAI,GAAG,aAAa;AAAA,EAAA;AACtB;AAKO,MAAMS,YAAY,SAASb,kBAAkB,CAAC;EAmBnDE,WAAWA,CAACY,gBAAgB,EAAE;IAC5B,IAAIC,OAAO,GAAG,OAAOD,gBAAgB,KAAK,QAAQ,GAAGA,gBAAgB,GAAG,EAAE;AAG1E,IAAA,IAAIE,QAAQ,CAACF,gBAAgB,CAAC,EAAE;MAC9B,MAAM;QAAEG,SAAS;QAAEC,UAAU;QAAEC,OAAO;AAAEC,QAAAA;AAAa,OAAC,GAAGN,gBAAgB;AAEzEC,MAAAA,OAAO,GAAGG,UAAU;MAGpBH,OAAO,IAAII,OAAO,GACd,CAAA,gBAAA,EAAmBC,YAAY,IAAA,IAAA,GAAZA,YAAY,GAAI,aAAa,CAAA,CAAE,GAClD,YAAY;AAGhB,MAAA,IAAIH,SAAS,EAAE;AACbF,QAAAA,OAAO,GAAGM,kBAAkB,CAACJ,SAAS,EAAEF,OAAO,CAAC;AAClD,MAAA;AACF,IAAA;IAEA,KAAK,CAACA,OAAO,CAAC;IAAA,IAAA,CAtChBX,IAAI,GAAG,cAAc;AAuCrB,EAAA;AACF;AAKO,MAAMkB,SAAS,SAAStB,kBAAkB,CAAC;EAOhDE,WAAWA,CAACqB,kBAAkB,EAAE;AAC9B,IAAA,MAAMR,OAAO,GACX,OAAOQ,kBAAkB,KAAK,QAAQ,GAClCA,kBAAkB,GAClBF,kBAAkB,CAChBE,kBAAkB,EAClB,8CACF,CAAC;IAEP,KAAK,CAACR,OAAO,CAAC;IAAA,IAAA,CAfhBX,IAAI,GAAG,WAAW;AAgBlB,EAAA;AACF;AAaA;AACA;AACA;;;;"}