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
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.mjs","sources":["../../../../src/govuk/components/tabs/tabs.mjs"],"sourcesContent":["import { getBreakpoint, getFragmentFromUrl } from '../../common/index.mjs'\nimport { Component } from '../../component.mjs'\nimport { ElementError } from '../../errors/index.mjs'\n\n/**\n * Tabs component\n *\n * @preserve\n */\nexport class Tabs extends Component {\n /** @private */\n $tabs\n\n /** @private */\n $tabList\n\n /** @private */\n $tabListItems\n\n /** @private */\n jsHiddenClass = 'govuk-tabs__panel--hidden'\n\n /** @private */\n changingHash = false\n\n /** @private */\n boundTabClick\n\n /** @private */\n boundTabKeydown\n\n /** @private */\n boundOnHashChange\n\n /**\n * @private\n * @type {MediaQueryList | null}\n */\n mql = null\n\n /**\n * @param {Element | null} $root - HTML element to use for tabs\n */\n constructor($root) {\n super($root)\n\n const $tabs = this.$root.querySelectorAll('a.govuk-tabs__tab')\n if (!$tabs.length) {\n throw new ElementError({\n component: Tabs,\n identifier: 'Links (`<a class=\"govuk-tabs__tab\">`)'\n })\n }\n\n this.$tabs = $tabs\n\n // Save bound functions so we can remove event listeners during teardown\n this.boundTabClick = this.onTabClick.bind(this)\n this.boundTabKeydown = this.onTabKeydown.bind(this)\n this.boundOnHashChange = this.onHashChange.bind(this)\n\n const $tabList = this.$root.querySelector('.govuk-tabs__list')\n const $tabListItems = this.$root.querySelectorAll(\n 'li.govuk-tabs__list-item'\n )\n\n if (!$tabList) {\n throw new ElementError({\n component: Tabs,\n identifier: 'List (`<ul class=\"govuk-tabs__list\">`)'\n })\n }\n\n if (!$tabListItems.length) {\n throw new ElementError({\n component: Tabs,\n identifier: 'List items (`<li class=\"govuk-tabs__list-item\">`)'\n })\n }\n\n this.$tabList = $tabList\n this.$tabListItems = $tabListItems\n\n this.setupResponsiveChecks()\n }\n\n /**\n * Setup viewport resize check\n *\n * @private\n */\n setupResponsiveChecks() {\n const breakpoint = getBreakpoint('tablet')\n\n if (!breakpoint.value) {\n throw new ElementError({\n component: Tabs,\n identifier: `CSS custom property (\\`${breakpoint.property}\\`) on pseudo-class \\`:root\\``\n })\n }\n\n // Media query list for GOV.UK Frontend tablet breakpoint\n this.mql = window.matchMedia(`(min-width: ${breakpoint.value})`)\n\n // MediaQueryList.addEventListener isn't supported by Safari < 14 so we need\n // to be able to fall back to the deprecated MediaQueryList.addListener\n if ('addEventListener' in this.mql) {\n this.mql.addEventListener('change', () => this.checkMode())\n } else {\n // @ts-expect-error Property 'addListener' does not exist\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n this.mql.addListener(() => this.checkMode())\n }\n\n this.checkMode()\n }\n\n /**\n * Setup or teardown handler for viewport resize check\n *\n * @private\n */\n checkMode() {\n if (this.mql?.matches) {\n this.setup()\n } else {\n this.teardown()\n }\n }\n\n /**\n * Setup tab component\n *\n * @private\n */\n setup() {\n this.$tabList.setAttribute('role', 'tablist')\n\n this.$tabListItems.forEach(($item) => {\n $item.setAttribute('role', 'presentation')\n })\n\n this.$tabs.forEach(($tab) => {\n // Set HTML attributes\n this.setAttributes($tab)\n\n // Handle events\n $tab.addEventListener('click', this.boundTabClick, true)\n $tab.addEventListener('keydown', this.boundTabKeydown, true)\n\n // Remove old active panels\n this.hideTab($tab)\n })\n\n // Show either the active tab according to the URL's hash or the first tab\n const $activeTab = this.getTab(window.location.hash) ?? this.$tabs[0]\n\n this.showTab($activeTab)\n\n // Handle hashchange events\n window.addEventListener('hashchange', this.boundOnHashChange, true)\n }\n\n /**\n * Teardown tab component\n *\n * @private\n */\n teardown() {\n this.$tabList.removeAttribute('role')\n\n this.$tabListItems.forEach(($item) => {\n $item.removeAttribute('role')\n })\n\n this.$tabs.forEach(($tab) => {\n // Remove events\n $tab.removeEventListener('click', this.boundTabClick, true)\n $tab.removeEventListener('keydown', this.boundTabKeydown, true)\n\n // Unset HTML attributes\n this.unsetAttributes($tab)\n })\n\n // Remove hashchange event handler\n window.removeEventListener('hashchange', this.boundOnHashChange, true)\n }\n\n /**\n * Handle hashchange event\n *\n * @private\n * @returns {void | undefined} Returns void, or undefined when prevented\n */\n onHashChange() {\n const hash = window.location.hash\n const $tabWithHash = this.getTab(hash)\n if (!$tabWithHash) {\n return\n }\n\n // Prevent changing the hash\n if (this.changingHash) {\n this.changingHash = false\n return\n }\n\n // Show either the active tab according to the URL's hash or the first tab\n const $previousTab = this.getCurrentTab()\n if (!$previousTab) {\n return\n }\n\n this.hideTab($previousTab)\n this.showTab($tabWithHash)\n $tabWithHash.focus()\n }\n\n /**\n * Hide panel for tab link\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n hideTab($tab) {\n this.unhighlightTab($tab)\n this.hidePanel($tab)\n }\n\n /**\n * Show panel for tab link\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n showTab($tab) {\n this.highlightTab($tab)\n this.showPanel($tab)\n }\n\n /**\n * Get tab link by hash\n *\n * @private\n * @param {string} hash - Hash fragment including #\n * @returns {HTMLAnchorElement | null} Tab link\n */\n getTab(hash) {\n return this.$root.querySelector(`a.govuk-tabs__tab[href=\"${hash}\"]`)\n }\n\n /**\n * Set tab link and panel attributes\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n setAttributes($tab) {\n const panelId = getFragmentFromUrl($tab.href)\n if (!panelId) {\n return\n }\n\n // Set tab attributes\n $tab.setAttribute('id', `tab_${panelId}`)\n $tab.setAttribute('role', 'tab')\n $tab.setAttribute('aria-controls', panelId)\n $tab.setAttribute('aria-selected', 'false')\n $tab.setAttribute('tabindex', '-1')\n\n // Set panel attributes\n const $panel = this.getPanel($tab)\n if (!$panel) {\n return\n }\n\n $panel.setAttribute('role', 'tabpanel')\n $panel.setAttribute('aria-labelledby', $tab.id)\n $panel.classList.add(this.jsHiddenClass)\n }\n\n /**\n * Unset tab link and panel attributes\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n unsetAttributes($tab) {\n // unset tab attributes\n $tab.removeAttribute('id')\n $tab.removeAttribute('role')\n $tab.removeAttribute('aria-controls')\n $tab.removeAttribute('aria-selected')\n $tab.removeAttribute('tabindex')\n\n // unset panel attributes\n const $panel = this.getPanel($tab)\n if (!$panel) {\n return\n }\n\n $panel.removeAttribute('role')\n $panel.removeAttribute('aria-labelledby')\n $panel.classList.remove(this.jsHiddenClass)\n }\n\n /**\n * Handle tab link clicks\n *\n * @private\n * @param {MouseEvent} event - Mouse click event\n * @returns {void} Returns void\n */\n onTabClick(event) {\n const $currentTab = this.getCurrentTab()\n const $nextTab = event.currentTarget\n\n if (!$currentTab || !($nextTab instanceof HTMLAnchorElement)) {\n return\n }\n\n event.preventDefault()\n\n this.hideTab($currentTab)\n this.showTab($nextTab)\n this.createHistoryEntry($nextTab)\n }\n\n /**\n * Update browser URL hash fragment for tab\n *\n * - Allows back/forward to navigate tabs\n * - Avoids page jump when hash changes\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n createHistoryEntry($tab) {\n const $panel = this.getPanel($tab)\n if (!$panel) {\n return\n }\n\n // Save and restore the id so the page doesn't jump when a user clicks a tab\n // (which changes the hash)\n const panelId = $panel.id\n $panel.id = ''\n this.changingHash = true\n window.location.hash = panelId\n $panel.id = panelId\n }\n\n /**\n * Handle tab keydown event\n *\n * - Press right arrow for next tab\n * - Press left arrow for previous tab\n *\n * @private\n * @param {KeyboardEvent} event - Keydown event\n */\n onTabKeydown(event) {\n switch (event.key) {\n // 'Left' and 'Right' required for Edge 16 support.\n case 'ArrowLeft':\n case 'Left':\n this.activatePreviousTab()\n event.preventDefault()\n break\n case 'ArrowRight':\n case 'Right':\n this.activateNextTab()\n event.preventDefault()\n break\n }\n }\n\n /**\n * Activate next tab\n *\n * @private\n */\n activateNextTab() {\n const $currentTab = this.getCurrentTab()\n if (!$currentTab?.parentElement) {\n return\n }\n\n const $nextTabListItem = $currentTab.parentElement.nextElementSibling\n if (!$nextTabListItem) {\n return\n }\n\n const $nextTab = $nextTabListItem.querySelector('a.govuk-tabs__tab')\n if (!$nextTab) {\n return\n }\n\n this.hideTab($currentTab)\n this.showTab($nextTab)\n $nextTab.focus()\n this.createHistoryEntry($nextTab)\n }\n\n /**\n * Activate previous tab\n *\n * @private\n */\n activatePreviousTab() {\n const $currentTab = this.getCurrentTab()\n if (!$currentTab?.parentElement) {\n return\n }\n\n const $previousTabListItem =\n $currentTab.parentElement.previousElementSibling\n if (!$previousTabListItem) {\n return\n }\n\n const $previousTab = $previousTabListItem.querySelector('a.govuk-tabs__tab')\n if (!$previousTab) {\n return\n }\n\n this.hideTab($currentTab)\n this.showTab($previousTab)\n $previousTab.focus()\n this.createHistoryEntry($previousTab)\n }\n\n /**\n * Get tab panel for tab link\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n * @returns {Element | null} Tab panel\n */\n getPanel($tab) {\n const panelId = getFragmentFromUrl($tab.href)\n if (!panelId) {\n return null\n }\n\n return this.$root.querySelector(`#${panelId}`)\n }\n\n /**\n * Show tab panel for tab link\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n showPanel($tab) {\n const $panel = this.getPanel($tab)\n if (!$panel) {\n return\n }\n\n $panel.classList.remove(this.jsHiddenClass)\n }\n\n /**\n * Hide tab panel for tab link\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n hidePanel($tab) {\n const $panel = this.getPanel($tab)\n if (!$panel) {\n return\n }\n\n $panel.classList.add(this.jsHiddenClass)\n }\n\n /**\n * Unset 'selected' state for tab link\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n unhighlightTab($tab) {\n if (!$tab.parentElement) {\n return\n }\n\n $tab.setAttribute('aria-selected', 'false')\n $tab.parentElement.classList.remove('govuk-tabs__list-item--selected')\n $tab.setAttribute('tabindex', '-1')\n }\n\n /**\n * Set 'selected' state for tab link\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n highlightTab($tab) {\n if (!$tab.parentElement) {\n return\n }\n\n $tab.setAttribute('aria-selected', 'true')\n $tab.parentElement.classList.add('govuk-tabs__list-item--selected')\n $tab.setAttribute('tabindex', '0')\n }\n\n /**\n * Get current tab link\n *\n * @private\n * @returns {HTMLAnchorElement | null} Tab link\n */\n getCurrentTab() {\n return this.$root.querySelector(\n '.govuk-tabs__list-item--selected a.govuk-tabs__tab'\n )\n }\n\n /**\n * Name for the component used when initialising using data-module attributes.\n */\n static moduleName = 'govuk-tabs'\n}\n"],"names":["Tabs","Component","constructor","$root","$tabs","$tabList","$tabListItems","jsHiddenClass","changingHash","boundTabClick","boundTabKeydown","boundOnHashChange","mql","querySelectorAll","length","ElementError","component","identifier","onTabClick","bind","onTabKeydown","onHashChange","querySelector","setupResponsiveChecks","breakpoint","getBreakpoint","value","property","window","matchMedia","addEventListener","checkMode","addListener","_this$mql","matches","setup","teardown","_this$getTab","setAttribute","forEach","$item","$tab","setAttributes","hideTab","$activeTab","getTab","location","hash","showTab","removeAttribute","removeEventListener","unsetAttributes","$tabWithHash","$previousTab","getCurrentTab","focus","unhighlightTab","hidePanel","highlightTab","showPanel","panelId","getFragmentFromUrl","href","$panel","getPanel","id","classList","add","remove","event","$currentTab","$nextTab","currentTarget","HTMLAnchorElement","preventDefault","createHistoryEntry","key","activatePreviousTab","activateNextTab","parentElement","$nextTabListItem","nextElementSibling","$previousTabListItem","previousElementSibling","moduleName"],"mappings":";;;;AAIA;AACA;AACA;AACA;AACA;AACO,MAAMA,IAAI,SAASC,SAAS,CAAC;AA+BlC;AACF;AACA;EACEC,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;AAAA,IAAA,IAAA,CAjCdC,KAAK,GAAA,MAAA;AAAA,IAAA,IAAA,CAGLC,QAAQ,GAAA,MAAA;AAAA,IAAA,IAAA,CAGRC,aAAa,GAAA,MAAA;IAAA,IAGbC,CAAAA,aAAa,GAAG,2BAA2B;IAAA,IAG3CC,CAAAA,YAAY,GAAG,KAAK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,CAACH,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC;AACpC;AAQAgB,EAAAA,aAAaA,GAAG;AACd,IAAA,OAAO,IAAI,CAACnD,KAAK,CAACmB,aAAa,CAC7B,oDACF,CAAC;AACH;AAMF;AArgBatB,IAAI,CAogBRoF,UAAU,GAAG,YAAY;;;;"}
1
+ {"version":3,"file":"tabs.mjs","sources":["../../../../src/govuk/components/tabs/tabs.mjs"],"sourcesContent":["import { getBreakpoint } from '../../common/index.mjs'\nimport { Component } from '../../component.mjs'\nimport { ElementError } from '../../errors/index.mjs'\n\n/**\n * Tabs component\n *\n * @preserve\n */\nexport class Tabs extends Component {\n /** @private */\n $tabs\n\n /** @private */\n $tabList\n\n /** @private */\n $tabListItems\n\n /** @private */\n jsHiddenClass = 'govuk-tabs__panel--hidden'\n\n /** @private */\n changingHash = false\n\n /** @private */\n boundTabClick\n\n /** @private */\n boundTabKeydown\n\n /** @private */\n boundOnHashChange\n\n /**\n * @private\n * @type {MediaQueryList | null}\n */\n mql = null\n\n /**\n * @param {Element | null} $root - HTML element to use for tabs\n */\n constructor($root) {\n super($root)\n\n const $tabs = this.$root.querySelectorAll('a.govuk-tabs__tab')\n if (!$tabs.length) {\n throw new ElementError({\n component: Tabs,\n identifier: 'Links (`<a class=\"govuk-tabs__tab\">`)'\n })\n }\n\n this.$tabs = $tabs\n\n // Save bound functions so we can remove event listeners during teardown\n this.boundTabClick = this.onTabClick.bind(this)\n this.boundTabKeydown = this.onTabKeydown.bind(this)\n this.boundOnHashChange = this.onHashChange.bind(this)\n\n const $tabList = this.$root.querySelector('.govuk-tabs__list')\n const $tabListItems = this.$root.querySelectorAll(\n 'li.govuk-tabs__list-item'\n )\n\n if (!$tabList) {\n throw new ElementError({\n component: Tabs,\n identifier: 'List (`<ul class=\"govuk-tabs__list\">`)'\n })\n }\n\n if (!$tabListItems.length) {\n throw new ElementError({\n component: Tabs,\n identifier: 'List items (`<li class=\"govuk-tabs__list-item\">`)'\n })\n }\n\n this.$tabList = $tabList\n this.$tabListItems = $tabListItems\n\n this.setupResponsiveChecks()\n }\n\n /**\n * Setup viewport resize check\n *\n * @private\n */\n setupResponsiveChecks() {\n const breakpoint = getBreakpoint('tablet')\n\n if (!breakpoint.value) {\n throw new ElementError({\n component: Tabs,\n identifier: `CSS custom property (\\`${breakpoint.property}\\`) on pseudo-class \\`:root\\``\n })\n }\n\n // Media query list for GOV.UK Frontend tablet breakpoint\n this.mql = window.matchMedia(`(min-width: ${breakpoint.value})`)\n\n // MediaQueryList.addEventListener isn't supported by Safari < 14 so we need\n // to be able to fall back to the deprecated MediaQueryList.addListener\n if ('addEventListener' in this.mql) {\n this.mql.addEventListener('change', () => this.checkMode())\n } else {\n // @ts-expect-error Property 'addListener' does not exist\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n this.mql.addListener(() => this.checkMode())\n }\n\n this.checkMode()\n }\n\n /**\n * Setup or teardown handler for viewport resize check\n *\n * @private\n */\n checkMode() {\n if (this.mql?.matches) {\n this.setup()\n } else {\n this.teardown()\n }\n }\n\n /**\n * Setup tab component\n *\n * @private\n */\n setup() {\n this.$tabList.setAttribute('role', 'tablist')\n\n this.$tabListItems.forEach(($item) => {\n $item.setAttribute('role', 'presentation')\n })\n\n this.$tabs.forEach(($tab) => {\n // Set HTML attributes\n this.setAttributes($tab)\n\n // Handle events\n $tab.addEventListener('click', this.boundTabClick, true)\n $tab.addEventListener('keydown', this.boundTabKeydown, true)\n\n // Remove old active panels\n this.hideTab($tab)\n })\n\n // Show either the active tab according to the URL's hash or the first tab\n const $activeTab = this.getTab(window.location.hash) ?? this.$tabs[0]\n\n this.showTab($activeTab)\n\n // Handle hashchange events\n window.addEventListener('hashchange', this.boundOnHashChange, true)\n }\n\n /**\n * Teardown tab component\n *\n * @private\n */\n teardown() {\n this.$tabList.removeAttribute('role')\n\n this.$tabListItems.forEach(($item) => {\n $item.removeAttribute('role')\n })\n\n this.$tabs.forEach(($tab) => {\n // Remove events\n $tab.removeEventListener('click', this.boundTabClick, true)\n $tab.removeEventListener('keydown', this.boundTabKeydown, true)\n\n // Unset HTML attributes\n this.unsetAttributes($tab)\n })\n\n // Remove hashchange event handler\n window.removeEventListener('hashchange', this.boundOnHashChange, true)\n }\n\n /**\n * Handle hashchange event\n *\n * @private\n * @returns {void | undefined} Returns void, or undefined when prevented\n */\n onHashChange() {\n const hash = window.location.hash\n const $tabWithHash = this.getTab(hash)\n if (!$tabWithHash) {\n return\n }\n\n // Prevent changing the hash\n if (this.changingHash) {\n this.changingHash = false\n return\n }\n\n // Show either the active tab according to the URL's hash or the first tab\n const $previousTab = this.getCurrentTab()\n if (!$previousTab) {\n return\n }\n\n this.hideTab($previousTab)\n this.showTab($tabWithHash)\n $tabWithHash.focus()\n }\n\n /**\n * Hide panel for tab link\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n hideTab($tab) {\n this.unhighlightTab($tab)\n this.hidePanel($tab)\n }\n\n /**\n * Show panel for tab link\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n showTab($tab) {\n this.highlightTab($tab)\n this.showPanel($tab)\n }\n\n /**\n * Get tab link by hash\n *\n * @private\n * @param {string} hash - Hash fragment including #\n * @returns {HTMLAnchorElement | null} Tab link\n */\n getTab(hash) {\n return this.$root.querySelector(`a.govuk-tabs__tab[href=\"${hash}\"]`)\n }\n\n /**\n * Set tab link and panel attributes\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n setAttributes($tab) {\n const panelId = $tab.hash.replace('#', '')\n if (!panelId) {\n return\n }\n\n // Set tab attributes\n $tab.setAttribute('id', `tab_${panelId}`)\n $tab.setAttribute('role', 'tab')\n $tab.setAttribute('aria-controls', panelId)\n $tab.setAttribute('aria-selected', 'false')\n $tab.setAttribute('tabindex', '-1')\n\n // Set panel attributes\n const $panel = this.getPanel($tab)\n if (!$panel) {\n return\n }\n\n $panel.setAttribute('role', 'tabpanel')\n $panel.setAttribute('aria-labelledby', $tab.id)\n $panel.classList.add(this.jsHiddenClass)\n }\n\n /**\n * Unset tab link and panel attributes\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n unsetAttributes($tab) {\n // unset tab attributes\n $tab.removeAttribute('id')\n $tab.removeAttribute('role')\n $tab.removeAttribute('aria-controls')\n $tab.removeAttribute('aria-selected')\n $tab.removeAttribute('tabindex')\n\n // unset panel attributes\n const $panel = this.getPanel($tab)\n if (!$panel) {\n return\n }\n\n $panel.removeAttribute('role')\n $panel.removeAttribute('aria-labelledby')\n $panel.classList.remove(this.jsHiddenClass)\n }\n\n /**\n * Handle tab link clicks\n *\n * @private\n * @param {MouseEvent} event - Mouse click event\n * @returns {void} Returns void\n */\n onTabClick(event) {\n const $currentTab = this.getCurrentTab()\n const $nextTab = event.currentTarget\n\n if (!$currentTab || !($nextTab instanceof HTMLAnchorElement)) {\n return\n }\n\n event.preventDefault()\n\n this.hideTab($currentTab)\n this.showTab($nextTab)\n this.createHistoryEntry($nextTab)\n }\n\n /**\n * Update browser URL hash fragment for tab\n *\n * - Allows back/forward to navigate tabs\n * - Avoids page jump when hash changes\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n createHistoryEntry($tab) {\n const $panel = this.getPanel($tab)\n if (!$panel) {\n return\n }\n\n // Save and restore the id so the page doesn't jump when a user clicks a tab\n // (which changes the hash)\n const panelId = $panel.id\n $panel.id = ''\n this.changingHash = true\n window.location.hash = panelId\n $panel.id = panelId\n }\n\n /**\n * Handle tab keydown event\n *\n * - Press right arrow for next tab\n * - Press left arrow for previous tab\n *\n * @private\n * @param {KeyboardEvent} event - Keydown event\n */\n onTabKeydown(event) {\n switch (event.key) {\n // 'Left' and 'Right' required for Edge 16 support.\n case 'ArrowLeft':\n case 'Left':\n this.activatePreviousTab()\n event.preventDefault()\n break\n case 'ArrowRight':\n case 'Right':\n this.activateNextTab()\n event.preventDefault()\n break\n }\n }\n\n /**\n * Activate next tab\n *\n * @private\n */\n activateNextTab() {\n const $currentTab = this.getCurrentTab()\n if (!$currentTab?.parentElement) {\n return\n }\n\n const $nextTabListItem = $currentTab.parentElement.nextElementSibling\n if (!$nextTabListItem) {\n return\n }\n\n const $nextTab = $nextTabListItem.querySelector('a.govuk-tabs__tab')\n if (!$nextTab) {\n return\n }\n\n this.hideTab($currentTab)\n this.showTab($nextTab)\n $nextTab.focus()\n this.createHistoryEntry($nextTab)\n }\n\n /**\n * Activate previous tab\n *\n * @private\n */\n activatePreviousTab() {\n const $currentTab = this.getCurrentTab()\n if (!$currentTab?.parentElement) {\n return\n }\n\n const $previousTabListItem =\n $currentTab.parentElement.previousElementSibling\n if (!$previousTabListItem) {\n return\n }\n\n const $previousTab = $previousTabListItem.querySelector('a.govuk-tabs__tab')\n if (!$previousTab) {\n return\n }\n\n this.hideTab($currentTab)\n this.showTab($previousTab)\n $previousTab.focus()\n this.createHistoryEntry($previousTab)\n }\n\n /**\n * Get tab panel for tab link\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n * @returns {Element | null} Tab panel\n */\n getPanel($tab) {\n const panelId = $tab.hash.replace('#', '')\n if (!panelId) {\n return null\n }\n\n return this.$root.querySelector(`#${panelId}`)\n }\n\n /**\n * Show tab panel for tab link\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n showPanel($tab) {\n const $panel = this.getPanel($tab)\n if (!$panel) {\n return\n }\n\n $panel.classList.remove(this.jsHiddenClass)\n }\n\n /**\n * Hide tab panel for tab link\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n hidePanel($tab) {\n const $panel = this.getPanel($tab)\n if (!$panel) {\n return\n }\n\n $panel.classList.add(this.jsHiddenClass)\n }\n\n /**\n * Unset 'selected' state for tab link\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n unhighlightTab($tab) {\n if (!$tab.parentElement) {\n return\n }\n\n $tab.setAttribute('aria-selected', 'false')\n $tab.parentElement.classList.remove('govuk-tabs__list-item--selected')\n $tab.setAttribute('tabindex', '-1')\n }\n\n /**\n * Set 'selected' state for tab link\n *\n * @private\n * @param {HTMLAnchorElement} $tab - Tab link\n */\n highlightTab($tab) {\n if (!$tab.parentElement) {\n return\n }\n\n $tab.setAttribute('aria-selected', 'true')\n $tab.parentElement.classList.add('govuk-tabs__list-item--selected')\n $tab.setAttribute('tabindex', '0')\n }\n\n /**\n * Get current tab link\n *\n * @private\n * @returns {HTMLAnchorElement | null} Tab link\n */\n getCurrentTab() {\n return this.$root.querySelector(\n '.govuk-tabs__list-item--selected a.govuk-tabs__tab'\n )\n }\n\n /**\n * Name for the component used when initialising using data-module attributes.\n */\n static moduleName = 'govuk-tabs'\n}\n"],"names":["Tabs","Component","constructor","$root","$tabs","$tabList","$tabListItems","jsHiddenClass","changingHash","boundTabClick","boundTabKeydown","boundOnHashChange","mql","querySelectorAll","length","ElementError","component","identifier","onTabClick","bind","onTabKeydown","onHashChange","querySelector","setupResponsiveChecks","breakpoint","getBreakpoint","value","property","window","matchMedia","addEventListener","checkMode","addListener","_this$mql","matches","setup","teardown","_this$getTab","setAttribute","forEach","$item","$tab","setAttributes","hideTab","$activeTab","getTab","location","hash","showTab","removeAttribute","removeEventListener","unsetAttributes","$tabWithHash","$previousTab","getCurrentTab","focus","unhighlightTab","hidePanel","highlightTab","showPanel","panelId","replace","$panel","getPanel","id","classList","add","remove","event","$currentTab","$nextTab","currentTarget","HTMLAnchorElement","preventDefault","createHistoryEntry","key","activatePreviousTab","activateNextTab","parentElement","$nextTabListItem","nextElementSibling","$previousTabListItem","previousElementSibling","moduleName"],"mappings":";;;;AAIA;AACA;AACA;AACA;AACA;AACO,MAAMA,IAAI,SAASC,SAAS,CAAC;AA+BlC;AACF;AACA;EACEC,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;AAAA,IAAA,IAAA,CAjCdC,KAAK,GAAA,MAAA;AAAA,IAAA,IAAA,CAGLC,QAAQ,GAAA,MAAA;AAAA,IAAA,IAAA,CAGRC,aA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;IAC3CG,IAAI,CAACqC,aAAa,CAACb,SAAS,CAACE,MAAM,CAAC,iCAAiC,CAAC;AACtE1B,IAAAA,IAAI,CAACH,YAAY,CAAC,UAAU,EAAE,IAAI,CAAC;AACrC,EAAA;EAQAoB,YAAYA,CAACjB,IAAI,EAAE;AACjB,IAAA,IAAI,CAACA,IAAI,CAACqC,aAAa,EAAE;AACvB,MAAA;AACF,IAAA;AAEArC,IAAAA,IAAI,CAACH,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC;IAC1CG,IAAI,CAACqC,aAAa,CAACb,SAAS,CAACC,GAAG,CAAC,iCAAiC,CAAC;AACnEzB,IAAAA,IAAI,CAACH,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC;AACpC,EAAA;AAQAgB,EAAAA,aAAaA,GAAG;AACd,IAAA,OAAO,IAAI,CAACnD,KAAK,CAACmB,aAAa,CAC7B,oDACF,CAAC;AACH,EAAA;AAMF;AArgBatB,IAAI,CAogBRmF,UAAU,GAAG,YAAY;;;;"}
@@ -8,8 +8,8 @@
8
8
  },
9
9
  "hidden": false,
10
10
  "description": "",
11
- "previewLayoutModifiers": [],
12
- "screenshot": false,
11
+ "pageTemplateOptions": {},
12
+ "screenshot": true,
13
13
  "html": "<strong class=\"govuk-tag\">\n Alpha\n</strong>"
14
14
  },
15
15
  {
@@ -20,22 +20,10 @@
20
20
  },
21
21
  "hidden": false,
22
22
  "description": "",
23
- "previewLayoutModifiers": [],
23
+ "pageTemplateOptions": {},
24
24
  "screenshot": false,
25
25
  "html": "<strong class=\"govuk-tag govuk-tag--grey\">\n Grey\n</strong>"
26
26
  },
27
- {
28
- "name": "blue",
29
- "options": {
30
- "text": "Blue",
31
- "classes": "govuk-tag--blue"
32
- },
33
- "hidden": false,
34
- "description": "",
35
- "previewLayoutModifiers": [],
36
- "screenshot": false,
37
- "html": "<strong class=\"govuk-tag govuk-tag--blue\">\n Blue\n</strong>"
38
- },
39
27
  {
40
28
  "name": "light blue",
41
29
  "options": {
@@ -44,7 +32,7 @@
44
32
  },
45
33
  "hidden": false,
46
34
  "description": "",
47
- "previewLayoutModifiers": [],
35
+ "pageTemplateOptions": {},
48
36
  "screenshot": false,
49
37
  "html": "<strong class=\"govuk-tag govuk-tag--light-blue\">\n Light blue\n</strong>"
50
38
  },
@@ -56,7 +44,7 @@
56
44
  },
57
45
  "hidden": false,
58
46
  "description": "",
59
- "previewLayoutModifiers": [],
47
+ "pageTemplateOptions": {},
60
48
  "screenshot": false,
61
49
  "html": "<strong class=\"govuk-tag govuk-tag--turquoise\">\n Turquoise\n</strong>"
62
50
  },
@@ -68,7 +56,7 @@
68
56
  },
69
57
  "hidden": false,
70
58
  "description": "",
71
- "previewLayoutModifiers": [],
59
+ "pageTemplateOptions": {},
72
60
  "screenshot": false,
73
61
  "html": "<strong class=\"govuk-tag govuk-tag--green\">\n Green\n</strong>"
74
62
  },
@@ -80,7 +68,7 @@
80
68
  },
81
69
  "hidden": false,
82
70
  "description": "",
83
- "previewLayoutModifiers": [],
71
+ "pageTemplateOptions": {},
84
72
  "screenshot": false,
85
73
  "html": "<strong class=\"govuk-tag govuk-tag--purple\">\n Purple\n</strong>"
86
74
  },
@@ -92,7 +80,7 @@
92
80
  },
93
81
  "hidden": false,
94
82
  "description": "",
95
- "previewLayoutModifiers": [],
83
+ "pageTemplateOptions": {},
96
84
  "screenshot": false,
97
85
  "html": "<strong class=\"govuk-tag govuk-tag--pink\">\n Pink\n</strong>"
98
86
  },
@@ -104,7 +92,7 @@
104
92
  },
105
93
  "hidden": false,
106
94
  "description": "",
107
- "previewLayoutModifiers": [],
95
+ "pageTemplateOptions": {},
108
96
  "screenshot": false,
109
97
  "html": "<strong class=\"govuk-tag govuk-tag--red\">\n Red\n</strong>"
110
98
  },
@@ -116,7 +104,7 @@
116
104
  },
117
105
  "hidden": false,
118
106
  "description": "",
119
- "previewLayoutModifiers": [],
107
+ "pageTemplateOptions": {},
120
108
  "screenshot": false,
121
109
  "html": "<strong class=\"govuk-tag govuk-tag--orange\">\n Orange\n</strong>"
122
110
  },
@@ -128,7 +116,7 @@
128
116
  },
129
117
  "hidden": false,
130
118
  "description": "",
131
- "previewLayoutModifiers": [],
119
+ "pageTemplateOptions": {},
132
120
  "screenshot": false,
133
121
  "html": "<strong class=\"govuk-tag govuk-tag--yellow\">\n Yellow\n</strong>"
134
122
  },
@@ -143,7 +131,7 @@
143
131
  },
144
132
  "hidden": true,
145
133
  "description": "",
146
- "previewLayoutModifiers": [],
134
+ "pageTemplateOptions": {},
147
135
  "screenshot": false,
148
136
  "html": "<strong class=\"govuk-tag\" data-test=\"attribute\" id=\"my-tag\">\n Tag with attributes\n</strong>"
149
137
  },
@@ -154,7 +142,7 @@
154
142
  },
155
143
  "hidden": true,
156
144
  "description": "",
157
- "previewLayoutModifiers": [],
145
+ "pageTemplateOptions": {},
158
146
  "screenshot": false,
159
147
  "html": "<strong class=\"govuk-tag\">\n &lt;span&gt;Alpha&lt;/span&gt;\n</strong>"
160
148
  },
@@ -165,7 +153,7 @@
165
153
  },
166
154
  "hidden": true,
167
155
  "description": "",
168
- "previewLayoutModifiers": [],
156
+ "pageTemplateOptions": {},
169
157
  "screenshot": false,
170
158
  "html": "<strong class=\"govuk-tag\">\n <span>Alpha</span>\n</strong>"
171
159
  }
@@ -42,69 +42,12 @@
42
42
  },
43
43
  "hidden": false,
44
44
  "description": "",
45
- "previewLayoutModifiers": [],
45
+ "pageTemplateOptions": {},
46
46
  "screenshot": false,
47
47
  "html": "<ul class=\"govuk-task-list\">\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-1-status\">\n Company Directors\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-1-status\">\n Completed\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-2-status\">\n Registered company details\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-2-status\">\n <strong class=\"govuk-tag govuk-tag--blue\">\n Incomplete\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-3-status\">\n Business plan\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-3-status\">\n <strong class=\"govuk-tag govuk-tag--blue\">\n Incomplete\n </strong>\n </div>\n </li>\n</ul>"
48
48
  },
49
49
  {
50
- "name": "example with 3 states",
51
- "options": {
52
- "items": [
53
- {
54
- "title": {
55
- "text": "Company Directors"
56
- },
57
- "href": "#",
58
- "status": {
59
- "text": "Completed"
60
- }
61
- },
62
- {
63
- "title": {
64
- "text": "Registered company details"
65
- },
66
- "href": "#",
67
- "status": {
68
- "tag": {
69
- "text": "Not started",
70
- "classes": "govuk-tag--light-blue"
71
- }
72
- }
73
- },
74
- {
75
- "title": {
76
- "text": "Business plan"
77
- },
78
- "href": "#",
79
- "status": {
80
- "tag": {
81
- "text": "In progress",
82
- "classes": "govuk-tag--blue"
83
- }
84
- }
85
- },
86
- {
87
- "title": {
88
- "text": "Documentation"
89
- },
90
- "href": "#",
91
- "status": {
92
- "tag": {
93
- "text": "Not started",
94
- "classes": "govuk-tag--light-blue"
95
- }
96
- }
97
- }
98
- ]
99
- },
100
- "hidden": false,
101
- "description": "",
102
- "previewLayoutModifiers": [],
103
- "screenshot": false,
104
- "html": "<ul class=\"govuk-task-list\">\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-1-status\">\n Company Directors\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-1-status\">\n Completed\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-2-status\">\n Registered company details\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-2-status\">\n <strong class=\"govuk-tag govuk-tag--light-blue\">\n Not started\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-3-status\">\n Business plan\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-3-status\">\n <strong class=\"govuk-tag govuk-tag--blue\">\n In progress\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-4-status\">\n Documentation\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-4-status\">\n <strong class=\"govuk-tag govuk-tag--light-blue\">\n Not started\n </strong>\n </div>\n </li>\n</ul>"
105
- },
106
- {
107
- "name": "example with hint text and additional states",
50
+ "name": "with hint text and additional states",
108
51
  "options": {
109
52
  "items": [
110
53
  {
@@ -183,12 +126,12 @@
183
126
  },
184
127
  "hidden": false,
185
128
  "description": "",
186
- "previewLayoutModifiers": [],
187
- "screenshot": false,
129
+ "pageTemplateOptions": {},
130
+ "screenshot": true,
188
131
  "html": "<ul class=\"govuk-task-list\">\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-1-status\">\n Company Directors\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-1-status\">\n Completed\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-2-status\">\n Registered company details\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-2-status\">\n <strong class=\"govuk-tag govuk-tag--light-blue\">\n Not started\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-3-hint task-list-3-status\">\n Business plan\n </a>\n <div id=\"task-list-3-hint\" class=\"govuk-task-list__hint\">\n Ensure the plan covers objectives, strategies, sales, marketing and financial forecasts.\n </div>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-3-status\">\n <strong class=\"govuk-tag govuk-tag--pink\">\n Review\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-4-status\">\n Documentation\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-4-status\">\n <strong class=\"govuk-tag govuk-tag--blue\">\n In progress\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-5-status\">\n Charitable status\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-5-status\">\n <strong class=\"govuk-tag govuk-tag--red\">\n Error\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item\">\n <div class=\"govuk-task-list__name-and-hint\">\n <div>\n Payment\n </div>\n <div id=\"task-list-6-hint\" class=\"govuk-task-list__hint\">\n It will cost between £15 and £75\n </div>\n </div>\n <div class=\"govuk-task-list__status govuk-task-list__status--cannot-start-yet\" id=\"task-list-6-status\">\n Cannot start yet\n </div>\n </li>\n</ul>"
189
132
  },
190
133
  {
191
- "name": "example with all possible colours",
134
+ "name": "with all possible colours",
192
135
  "options": {
193
136
  "items": [
194
137
  {
@@ -334,12 +277,12 @@
334
277
  },
335
278
  "hidden": false,
336
279
  "description": "",
337
- "previewLayoutModifiers": [],
280
+ "pageTemplateOptions": {},
338
281
  "screenshot": false,
339
282
  "html": "<ul class=\"govuk-task-list\">\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-1-status\">\n Task A\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-1-status\">\n Text colour\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-2-status\">\n Task B\n </a>\n </div>\n <div class=\"govuk-task-list__status govuk-task-list__status--cannot-start-yet\" id=\"task-list-2-status\">\n Secondary text colour\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-3-status\">\n Task C\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-3-status\">\n <strong class=\"govuk-tag govuk-tag--grey\">\n Grey\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-4-status\">\n Task D\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-4-status\">\n <strong class=\"govuk-tag govuk-tag--blue\">\n Blue\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-5-status\">\n Task E\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-5-status\">\n <strong class=\"govuk-tag govuk-tag--light-blue\">\n Light blue\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-6-status\">\n Task F\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-6-status\">\n <strong class=\"govuk-tag govuk-tag--turquoise\">\n Turquoise\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-7-status\">\n Task G\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-7-status\">\n <strong class=\"govuk-tag govuk-tag--green\">\n Green\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-8-status\">\n Task H\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-8-status\">\n <strong class=\"govuk-tag govuk-tag--purple\">\n Purple\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-9-status\">\n Task I\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-9-status\">\n <strong class=\"govuk-tag govuk-tag--pink\">\n Pink\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-10-status\">\n Task J\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-10-status\">\n <strong class=\"govuk-tag govuk-tag--red\">\n Red\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-11-status\">\n Task K\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-11-status\">\n <strong class=\"govuk-tag govuk-tag--orange\">\n Orange\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-12-status\">\n Task L\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-12-status\">\n <strong class=\"govuk-tag govuk-tag--yellow\">\n Yellow\n </strong>\n </div>\n </li>\n</ul>"
340
283
  },
341
284
  {
342
- "name": "example with very long single word tags",
285
+ "name": "with very long single word tags",
343
286
  "options": {
344
287
  "items": [
345
288
  {
@@ -379,7 +322,7 @@
379
322
  },
380
323
  "hidden": false,
381
324
  "description": "",
382
- "previewLayoutModifiers": [],
325
+ "pageTemplateOptions": {},
383
326
  "screenshot": false,
384
327
  "html": "<ul class=\"govuk-task-list\">\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-1-status\">\n Company Directors\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-1-status\">\n Completed\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-2-status\">\n Registered company details\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-2-status\">\n <strong class=\"govuk-tag govuk-tag--blue\">\n Incomplete\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-3-status\">\n A very very very long Business plan\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-3-status\">\n <strong class=\"govuk-tag govuk-tag--blue\">\n Thisisaverylongwaytosaythatsomethingisincomplete\n </strong>\n </div>\n </li>\n</ul>"
385
328
  },
@@ -418,7 +361,7 @@
418
361
  },
419
362
  "hidden": true,
420
363
  "description": "",
421
- "previewLayoutModifiers": [],
364
+ "pageTemplateOptions": {},
422
365
  "screenshot": false,
423
366
  "html": "<ul class=\"govuk-task-list custom-class-on-component\">\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link custom-class-on-task\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link custom-class-on-linked-title\" href=\"#\" aria-describedby=\"task-list-1-status\">\n A Link\n </a>\n </div>\n <div class=\"govuk-task-list__status custom-class-on-status\" id=\"task-list-1-status\">\n <strong class=\"govuk-tag custom-class-on-tag\">\n Status\n </strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item\">\n <div class=\"govuk-task-list__name-and-hint\">\n <div class=\"custom-class-on-unlinked-title\">\n Not a link\n </div>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-2-status\">\n <strong class=\"govuk-tag\">\n Status\n </strong>\n </div>\n </li>\n</ul>"
424
367
  },
@@ -447,7 +390,7 @@
447
390
  },
448
391
  "hidden": true,
449
392
  "description": "",
450
- "previewLayoutModifiers": [],
393
+ "pageTemplateOptions": {},
451
394
  "screenshot": false,
452
395
  "html": "<ul class=\"govuk-task-list\" data-custom-attribute=\"custom-value\">\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-1-status\">\n A Link\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-1-status\">\n <strong class=\"govuk-tag\" data-tag-attribute=\"tag-value\">\n Status\n </strong>\n </div>\n </li>\n</ul>"
453
396
  },
@@ -474,7 +417,7 @@
474
417
  },
475
418
  "hidden": true,
476
419
  "description": "",
477
- "previewLayoutModifiers": [],
420
+ "pageTemplateOptions": {},
478
421
  "screenshot": false,
479
422
  "html": "<ul class=\"govuk-task-list\">\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"my-custom-id-1-hint my-custom-id-1-status\">\n A Link\n </a>\n <div id=\"my-custom-id-1-hint\" class=\"govuk-task-list__hint\">\n Hint text\n </div>\n </div>\n <div class=\"govuk-task-list__status\" id=\"my-custom-id-1-status\">\n <strong class=\"govuk-tag\">\n Status\n </strong>\n </div>\n </li>\n</ul>"
480
423
  },
@@ -509,7 +452,7 @@
509
452
  },
510
453
  "hidden": true,
511
454
  "description": "",
512
- "previewLayoutModifiers": [],
455
+ "pageTemplateOptions": {},
513
456
  "screenshot": false,
514
457
  "html": "<ul class=\"govuk-task-list\">\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"my-custom-id-1-hint my-custom-id-1-status\">\n &lt;strong&gt;Linked Title&lt;/strong&gt;\n </a>\n <div id=\"my-custom-id-1-hint\" class=\"govuk-task-list__hint\">\n &lt;strong&gt;Hint&lt;/strong&gt;\n </div>\n </div>\n <div class=\"govuk-task-list__status\" id=\"my-custom-id-1-status\">\n &lt;strong&gt;Status&lt;/strong&gt;\n </div>\n </li>\n <li class=\"govuk-task-list__item\">\n <div class=\"govuk-task-list__name-and-hint\">\n <div>\n &lt;strong&gt;Unlinked Title&lt;/strong&gt;\n </div>\n </div>\n <div class=\"govuk-task-list__status\" id=\"my-custom-id-2-status\">\n <strong class=\"govuk-tag\">\n &lt;strong&gt;Tag&lt;/strong&gt;\n </strong>\n </div>\n </li>\n</ul>"
515
458
  },
@@ -544,7 +487,7 @@
544
487
  },
545
488
  "hidden": true,
546
489
  "description": "",
547
- "previewLayoutModifiers": [],
490
+ "pageTemplateOptions": {},
548
491
  "screenshot": false,
549
492
  "html": "<ul class=\"govuk-task-list\">\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"my-custom-id-1-hint my-custom-id-1-status\">\n <strong>Linked Title</strong>\n </a>\n <div id=\"my-custom-id-1-hint\" class=\"govuk-task-list__hint\">\n <strong>Hint</strong>\n </div>\n </div>\n <div class=\"govuk-task-list__status\" id=\"my-custom-id-1-status\">\n <strong>Status</strong>\n </div>\n </li>\n <li class=\"govuk-task-list__item\">\n <div class=\"govuk-task-list__name-and-hint\">\n <div>\n <strong>Unlinked Title</strong>\n </div>\n </div>\n <div class=\"govuk-task-list__status\" id=\"my-custom-id-2-status\">\n <strong class=\"govuk-tag\">\n <strong>Tag</strong>\n </strong>\n </div>\n </li>\n</ul>"
550
493
  },
@@ -578,7 +521,7 @@
578
521
  },
579
522
  "hidden": false,
580
523
  "description": "",
581
- "previewLayoutModifiers": [],
524
+ "pageTemplateOptions": {},
582
525
  "screenshot": false,
583
526
  "html": "<ul class=\"govuk-task-list\">\n\n\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-3-status\">\n Task A\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-3-status\">\n Completed\n </div>\n </li>\n\n\n <li class=\"govuk-task-list__item govuk-task-list__item--with-link\">\n <div class=\"govuk-task-list__name-and-hint\">\n <a class=\"govuk-link govuk-task-list__link\" href=\"#\" aria-describedby=\"task-list-6-status\">\n Task B\n </a>\n </div>\n <div class=\"govuk-task-list__status\" id=\"task-list-6-status\">\n Completed\n </div>\n </li>\n</ul>"
584
527
  }