govuk_publishing_components 32.0.0 → 33.0.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 (206) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/component_guide/accessibility-test.js +0 -1
  3. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +175 -0
  4. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-ecommerce-tracker.js +1 -1
  5. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js +5 -13
  6. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-link-tracker.js +80 -309
  7. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +2 -2
  8. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-specialist-link-tracker.js +140 -0
  9. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/init-ga4.js +3 -0
  10. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4.js +1 -0
  11. data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +12 -1
  12. data/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js +13 -4
  13. data/app/assets/javascripts/govuk_publishing_components/components/single-page-notification-button.js +24 -8
  14. data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +83 -86
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_big-number.scss +2 -5
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +1 -5
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +3 -5
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +10 -30
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +0 -7
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +0 -6
  21. data/app/views/govuk_publishing_components/components/_accordion.html.erb +14 -1
  22. data/app/views/govuk_publishing_components/components/_error_summary.html.erb +27 -26
  23. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +2 -2
  24. data/app/views/govuk_publishing_components/components/_phase_banner.html.erb +1 -1
  25. data/app/views/govuk_publishing_components/components/_share_links.html.erb +18 -15
  26. data/app/views/govuk_publishing_components/components/_single_page_notification_button.html.erb +1 -1
  27. data/app/views/govuk_publishing_components/components/docs/accordion.yml +15 -3
  28. data/app/views/govuk_publishing_components/components/docs/button.yml +10 -0
  29. data/app/views/govuk_publishing_components/components/docs/share_links.yml +59 -30
  30. data/app/views/govuk_publishing_components/components/docs/single_page_notification_button.yml +10 -1
  31. data/app/views/govuk_publishing_components/components/feedback/_yes_no_banner.html.erb +3 -3
  32. data/config/locales/ar.yml +4 -1
  33. data/config/locales/az.yml +4 -1
  34. data/config/locales/be.yml +4 -1
  35. data/config/locales/bg.yml +4 -1
  36. data/config/locales/bn.yml +4 -1
  37. data/config/locales/cs.yml +4 -1
  38. data/config/locales/cy.yml +4 -1
  39. data/config/locales/da.yml +4 -1
  40. data/config/locales/de.yml +4 -1
  41. data/config/locales/dr.yml +4 -1
  42. data/config/locales/el.yml +4 -1
  43. data/config/locales/en.yml +20 -17
  44. data/config/locales/es-419.yml +4 -1
  45. data/config/locales/es.yml +4 -1
  46. data/config/locales/et.yml +4 -1
  47. data/config/locales/fa.yml +4 -1
  48. data/config/locales/fi.yml +4 -1
  49. data/config/locales/fr.yml +4 -1
  50. data/config/locales/gd.yml +4 -1
  51. data/config/locales/gu.yml +4 -1
  52. data/config/locales/he.yml +4 -1
  53. data/config/locales/hi.yml +4 -1
  54. data/config/locales/hr.yml +4 -1
  55. data/config/locales/hu.yml +4 -1
  56. data/config/locales/hy.yml +4 -1
  57. data/config/locales/id.yml +4 -1
  58. data/config/locales/is.yml +4 -1
  59. data/config/locales/it.yml +4 -1
  60. data/config/locales/ja.yml +4 -1
  61. data/config/locales/ka.yml +4 -1
  62. data/config/locales/kk.yml +4 -1
  63. data/config/locales/ko.yml +4 -1
  64. data/config/locales/lt.yml +4 -1
  65. data/config/locales/lv.yml +4 -1
  66. data/config/locales/ms.yml +4 -1
  67. data/config/locales/mt.yml +4 -1
  68. data/config/locales/nl.yml +4 -1
  69. data/config/locales/no.yml +4 -1
  70. data/config/locales/pa-pk.yml +4 -1
  71. data/config/locales/pa.yml +4 -1
  72. data/config/locales/pl.yml +4 -1
  73. data/config/locales/ps.yml +4 -1
  74. data/config/locales/pt.yml +4 -1
  75. data/config/locales/ro.yml +4 -1
  76. data/config/locales/ru.yml +4 -1
  77. data/config/locales/si.yml +4 -1
  78. data/config/locales/sk.yml +4 -1
  79. data/config/locales/sl.yml +4 -1
  80. data/config/locales/so.yml +4 -1
  81. data/config/locales/sq.yml +4 -1
  82. data/config/locales/sr.yml +4 -1
  83. data/config/locales/sv.yml +4 -1
  84. data/config/locales/sw.yml +4 -1
  85. data/config/locales/ta.yml +4 -1
  86. data/config/locales/th.yml +4 -1
  87. data/config/locales/tk.yml +4 -1
  88. data/config/locales/tr.yml +4 -1
  89. data/config/locales/uk.yml +4 -1
  90. data/config/locales/ur.yml +4 -1
  91. data/config/locales/uz.yml +4 -1
  92. data/config/locales/vi.yml +4 -1
  93. data/config/locales/zh-hk.yml +4 -1
  94. data/config/locales/zh-tw.yml +4 -1
  95. data/config/locales/zh.yml +4 -1
  96. data/lib/govuk_publishing_components/presenters/button_helper.rb +7 -1
  97. data/lib/govuk_publishing_components/presenters/single_page_notification_button_helper.rb +25 -1
  98. data/lib/govuk_publishing_components/version.rb +1 -1
  99. data/node_modules/axe-core/axe.js +4567 -4678
  100. data/node_modules/axe-core/axe.min.js +2 -2
  101. data/node_modules/axe-core/package.json +2 -2
  102. data/node_modules/axe-core/sri-history.json +8 -0
  103. data/node_modules/govuk-frontend/README.md +1 -2
  104. data/node_modules/govuk-frontend/govuk/all.js +1398 -273
  105. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +70 -0
  106. data/node_modules/govuk-frontend/govuk/common/index.js +172 -0
  107. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +373 -0
  108. data/node_modules/govuk-frontend/govuk/common.js +138 -3
  109. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +753 -25
  110. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +54 -22
  111. data/node_modules/govuk-frontend/govuk/components/accordion/macro-options.json +36 -0
  112. data/node_modules/govuk-frontend/govuk/components/accordion/template.njk +7 -1
  113. data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +12 -12
  114. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +22 -22
  115. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +23 -5
  116. data/node_modules/govuk-frontend/govuk/components/button/button.js +365 -107
  117. data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +85 -66
  118. data/node_modules/govuk-frontend/govuk/components/button/template.njk +1 -1
  119. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +9 -0
  120. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +1033 -121
  121. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +112 -36
  122. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +42 -0
  123. data/node_modules/govuk-frontend/govuk/components/character-count/template.njk +27 -3
  124. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +30 -2
  125. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +96 -93
  126. data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +46 -46
  127. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +50 -50
  128. data/node_modules/govuk-frontend/govuk/components/details/details.js +43 -13
  129. data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +20 -20
  130. data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +20 -20
  131. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +268 -6
  132. data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +44 -35
  133. data/node_modules/govuk-frontend/govuk/components/error-summary/template.njk +25 -21
  134. data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +51 -39
  135. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +26 -26
  136. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +1 -1
  137. data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +46 -46
  138. data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +2 -2
  139. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +93 -38
  140. data/node_modules/govuk-frontend/govuk/components/header/header.js +6 -0
  141. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +8 -2
  142. data/node_modules/govuk-frontend/govuk/components/header/template.njk +4 -2
  143. data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +12 -12
  144. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +80 -80
  145. data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +12 -12
  146. data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +34 -34
  147. data/node_modules/govuk-frontend/govuk/components/notification-banner/fixtures.json +56 -46
  148. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +252 -2
  149. data/node_modules/govuk-frontend/govuk/components/notification-banner/template.njk +1 -1
  150. data/node_modules/govuk-frontend/govuk/components/pagination/_index.scss +10 -7
  151. data/node_modules/govuk-frontend/govuk/components/pagination/fixtures.json +33 -26
  152. data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +18 -18
  153. data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +14 -14
  154. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +94 -91
  155. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +30 -2
  156. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +32 -32
  157. data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +22 -20
  158. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +10 -4
  159. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +50 -50
  160. data/node_modules/govuk-frontend/govuk/components/table/_index.scss +1 -1
  161. data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +40 -40
  162. data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +29 -29
  163. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +28 -0
  164. data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +28 -28
  165. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +34 -34
  166. data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +14 -14
  167. data/node_modules/govuk-frontend/govuk/core/_section-break.scss +1 -1
  168. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +2 -2
  169. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +6 -6
  170. data/node_modules/govuk-frontend/govuk/i18n.js +390 -0
  171. data/node_modules/govuk-frontend/govuk/macros/i18n.njk +15 -0
  172. data/node_modules/govuk-frontend/govuk/settings/_all.scss +1 -0
  173. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +12 -0
  174. data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +26 -0
  175. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +23 -0
  176. data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +12 -0
  177. data/node_modules/govuk-frontend/govuk/settings/_warnings.scss +53 -0
  178. data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +20 -6
  179. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +21 -0
  180. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +300 -0
  181. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +21 -0
  182. data/node_modules/govuk-frontend/govuk-esm/all.mjs +50 -27
  183. data/node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs +15 -0
  184. data/node_modules/govuk-frontend/govuk-esm/common/index.mjs +159 -0
  185. data/node_modules/govuk-frontend/govuk-esm/common/normalise-dataset.mjs +58 -0
  186. data/node_modules/govuk-frontend/govuk-esm/common.mjs +6 -28
  187. data/node_modules/govuk-frontend/govuk-esm/components/accordion/accordion.mjs +113 -43
  188. data/node_modules/govuk-frontend/govuk-esm/components/button/button.mjs +67 -30
  189. data/node_modules/govuk-frontend/govuk-esm/components/character-count/character-count.mjs +325 -123
  190. data/node_modules/govuk-frontend/govuk-esm/components/checkboxes/checkboxes.mjs +9 -3
  191. data/node_modules/govuk-frontend/govuk-esm/components/details/details.mjs +22 -8
  192. data/node_modules/govuk-frontend/govuk-esm/components/error-summary/error-summary.mjs +48 -6
  193. data/node_modules/govuk-frontend/govuk-esm/components/header/header.mjs +6 -0
  194. data/node_modules/govuk-frontend/govuk-esm/components/notification-banner/notification-banner.mjs +32 -2
  195. data/node_modules/govuk-frontend/govuk-esm/components/radios/radios.mjs +9 -3
  196. data/node_modules/govuk-frontend/govuk-esm/components/skip-link/skip-link.mjs +10 -4
  197. data/node_modules/govuk-frontend/govuk-esm/components/tabs/tabs.mjs +8 -2
  198. data/node_modules/govuk-frontend/govuk-esm/i18n.mjs +380 -0
  199. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Date/now.mjs +13 -0
  200. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/dataset.mjs +68 -0
  201. data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/String/prototype/trim.mjs +13 -0
  202. data/node_modules/govuk-frontend/govuk-prototype-kit/init.js +7 -0
  203. data/node_modules/govuk-frontend/govuk-prototype-kit/init.scss +12 -0
  204. data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +138 -7
  205. data/node_modules/govuk-frontend/package.json +1 -1
  206. metadata +22 -3
@@ -164,13 +164,16 @@ pt:
164
164
  link_text: Verifique o que precisa de fazer
165
165
  title: Brexit
166
166
  ukraine:
167
- title:
168
167
  links:
168
+ title:
169
169
  world_locations: Locais mundiais
170
170
  search_box:
171
171
  input_title: Pesquisar
172
172
  label: Pesquisar em GOV.UK
173
173
  search_button: Pesquisar
174
+ share_links:
175
+ all_opens_in_new_tab:
176
+ opens_in_new_tab:
174
177
  show_password:
175
178
  announce_hide: A sua palavra-passe é ocultada
176
179
  announce_show: A sua palavra-passe é mostrada
@@ -165,13 +165,16 @@ ro:
165
165
  link_text: Verificați ce trebuie să faceți
166
166
  title: Brexit
167
167
  ukraine:
168
- title:
169
168
  links:
169
+ title:
170
170
  world_locations: Locații pe glob
171
171
  search_box:
172
172
  input_title: Căutați
173
173
  label: Căutați pe GOV.UK
174
174
  search_button: Căutați
175
+ share_links:
176
+ all_opens_in_new_tab:
177
+ opens_in_new_tab:
175
178
  show_password:
176
179
  announce_hide: Parola dvs. este ascunsă
177
180
  announce_show: Parola dvs. este afișată
@@ -168,13 +168,16 @@ ru:
168
168
  link_text: Проверьте, что вам нужно сделать
169
169
  title: Брексит
170
170
  ukraine:
171
- title:
172
171
  links:
172
+ title:
173
173
  world_locations: Места нахождения по миру
174
174
  search_box:
175
175
  input_title: Поиск
176
176
  label: Поиск на GOV.UK
177
177
  search_button: Поиск
178
+ share_links:
179
+ all_opens_in_new_tab:
180
+ opens_in_new_tab:
178
181
  show_password:
179
182
  announce_hide: Ваш пароль скрыт
180
183
  announce_show: Ваш пароль показан
@@ -164,13 +164,16 @@ si:
164
164
  link_text: ඔබ කළ යුතු දේ පරීක්ෂා කරන්න
165
165
  title: බ්රෙක්සිට්
166
166
  ukraine:
167
- title:
168
167
  links:
168
+ title:
169
169
  world_locations: ලෝක ස්ථාන
170
170
  search_box:
171
171
  input_title: සොයන්න
172
172
  label: GOV.UK මත සොයන්න
173
173
  search_button: සොයන්න
174
+ share_links:
175
+ all_opens_in_new_tab:
176
+ opens_in_new_tab:
174
177
  show_password:
175
178
  announce_hide: ඔබගේ මුරපදය සඟවා ඇත
176
179
  announce_show: ඔබගේ මුරපදය පෙන්වා ඇත
@@ -169,13 +169,16 @@ sk:
169
169
  link_text: Skontrolujte, čo je potrebné urobiť
170
170
  title: Brexit
171
171
  ukraine:
172
- title:
173
172
  links:
173
+ title:
174
174
  world_locations: Svetové lokality
175
175
  search_box:
176
176
  input_title: Vyhľadávanie
177
177
  label: Vyhľadávanie na GOV.UK
178
178
  search_button: Vyhľadávanie
179
+ share_links:
180
+ all_opens_in_new_tab:
181
+ opens_in_new_tab:
179
182
  show_password:
180
183
  announce_hide: Vaše heslo je skryté
181
184
  announce_show: Vaše heslo sa zobrazuje.
@@ -171,13 +171,16 @@ sl:
171
171
  link_text: Preverite, kaj morate storiti
172
172
  title: Brexit
173
173
  ukraine:
174
- title:
175
174
  links:
175
+ title:
176
176
  world_locations: Lokacije po svetu
177
177
  search_box:
178
178
  input_title: Iskanje
179
179
  label: Iskanje po GOV.UK
180
180
  search_button: Iskanje
181
+ share_links:
182
+ all_opens_in_new_tab:
183
+ opens_in_new_tab:
181
184
  show_password:
182
185
  announce_hide: Vaše geslo je skrito
183
186
  announce_show: Vaše geslo je prikazano
@@ -164,13 +164,16 @@ so:
164
164
  link_text: Hubi waxaad u baahantahay inaad qabato
165
165
  title: Ka bixitaanka Ingiriiska
166
166
  ukraine:
167
- title:
168
167
  links:
168
+ title:
169
169
  world_locations: Goobaha Dunida
170
170
  search_box:
171
171
  input_title: Baadh
172
172
  label: Baadh GOV.UK
173
173
  search_button: Baadh
174
+ share_links:
175
+ all_opens_in_new_tab:
176
+ opens_in_new_tab:
174
177
  show_password:
175
178
  announce_hide: Fure sireedkaagu wuu qarsoonayhay
176
179
  announce_show: Fure sireedkaagu wuu muuqdaa
@@ -164,13 +164,16 @@ sq:
164
164
  link_text: Kontrolloni se çfarë duhet të bëni
165
165
  title: Brexit
166
166
  ukraine:
167
- title:
168
167
  links:
168
+ title:
169
169
  world_locations: Vendndodhjet globale
170
170
  search_box:
171
171
  input_title: Kërko
172
172
  label: Kërko në GOV.UK
173
173
  search_button: Kërko
174
+ share_links:
175
+ all_opens_in_new_tab:
176
+ opens_in_new_tab:
174
177
  show_password:
175
178
  announce_hide: Fjalëkalimi juaj është fshehur
176
179
  announce_show: Fjalëkalimi juaj është treguar
@@ -165,13 +165,16 @@ sr:
165
165
  link_text: Proverite šta treba da uradite
166
166
  title: Bregzit
167
167
  ukraine:
168
- title:
169
168
  links:
169
+ title:
170
170
  world_locations: Globalne lokacije
171
171
  search_box:
172
172
  input_title: Pretraži
173
173
  label: Pretraži na GOV.UK
174
174
  search_button: Pretraži
175
+ share_links:
176
+ all_opens_in_new_tab:
177
+ opens_in_new_tab:
175
178
  show_password:
176
179
  announce_hide: Lozinka je sakrivena
177
180
  announce_show: Lozinka je prikazana
@@ -164,13 +164,16 @@ sv:
164
164
  link_text: Kontrollera vad du behöver göra
165
165
  title: Brexit
166
166
  ukraine:
167
- title:
168
167
  links:
168
+ title:
169
169
  world_locations: Platser i världen
170
170
  search_box:
171
171
  input_title: Sök på
172
172
  label: Sök på GOV.UK
173
173
  search_button: Sök på
174
+ share_links:
175
+ all_opens_in_new_tab:
176
+ opens_in_new_tab:
174
177
  show_password:
175
178
  announce_hide: Ditt lösenord är dolt
176
179
  announce_show: Ditt lösenord visas
@@ -164,13 +164,16 @@ sw:
164
164
  link_text: Angalia unachopaswa kufanya
165
165
  title: Brexit
166
166
  ukraine:
167
- title:
168
167
  links:
168
+ title:
169
169
  world_locations: Maeneo ya kimataifa
170
170
  search_box:
171
171
  input_title: Tafuta
172
172
  label: Tafuta kwenye tovuti ya GOV.UK
173
173
  search_button: Tafuta
174
+ share_links:
175
+ all_opens_in_new_tab:
176
+ opens_in_new_tab:
174
177
  show_password:
175
178
  announce_hide: Nenosiri lako limefichwa
176
179
  announce_show: Nenosiri lako limeonyeshwa
@@ -165,13 +165,16 @@ ta:
165
165
  link_text: நீங்கள் செய்யவேண்டியது என்ன என்று பாருங்கள்
166
166
  title: பிரெக்சிட்
167
167
  ukraine:
168
- title:
169
168
  links:
169
+ title:
170
170
  world_locations: உலக இருப்பிடங்கள்
171
171
  search_box:
172
172
  input_title: தேடு
173
173
  label: GOV.UK-யில் தேடுக
174
174
  search_button: தேடு
175
+ share_links:
176
+ all_opens_in_new_tab:
177
+ opens_in_new_tab:
175
178
  show_password:
176
179
  announce_hide: உங்கள் கடவுச்சொல் மறைக்கப்பட்டுள்ளது
177
180
  announce_show: உங்கள் கடவுச்சொல் காட்டப்படுகிறது
@@ -162,13 +162,16 @@ th:
162
162
  link_text: ตรวจสอบสิ่งที่คุณต้องทำ
163
163
  title: Brexit
164
164
  ukraine:
165
- title:
166
165
  links:
166
+ title:
167
167
  world_locations: สถานที่ทั่วโลก
168
168
  search_box:
169
169
  input_title: ค้นหา
170
170
  label: ค้นหาใน GOV.UK
171
171
  search_button: ค้นหา
172
+ share_links:
173
+ all_opens_in_new_tab:
174
+ opens_in_new_tab:
172
175
  show_password:
173
176
  announce_hide: รหัสผ่านของคุณถูกซ่อน
174
177
  announce_show: รหัสผ่านของคุณถูกแสดง
@@ -165,13 +165,16 @@ tk:
165
165
  link_text: Näme etmelidigiňizi belläň
166
166
  title: Brexit
167
167
  ukraine:
168
- title:
169
168
  links:
169
+ title:
170
170
  world_locations: Dünýä ýerleri
171
171
  search_box:
172
172
  input_title: Gözlemek
173
173
  label: GOV.UK-de gözle
174
174
  search_button: Gözlemek
175
+ share_links:
176
+ all_opens_in_new_tab:
177
+ opens_in_new_tab:
175
178
  show_password:
176
179
  announce_hide: Açar sözüňiz gizlenen
177
180
  announce_show: Açar sözüňiz görkezilen
@@ -165,13 +165,16 @@ tr:
165
165
  link_text: Ne yapmaya ihtiyacınız olduğunu kontrol edin
166
166
  title: Brexit
167
167
  ukraine:
168
- title:
169
168
  links:
169
+ title:
170
170
  world_locations: Dünya geneli konumlar
171
171
  search_box:
172
172
  input_title: Ara
173
173
  label: GOV.UK adresini ara
174
174
  search_button: Ara
175
+ share_links:
176
+ all_opens_in_new_tab:
177
+ opens_in_new_tab:
175
178
  show_password:
176
179
  announce_hide: Şifreniz gizli
177
180
  announce_show: Şifreniz gösteriliyor
@@ -171,13 +171,16 @@ uk:
171
171
  link_text: Перевірте, що вам потрібно зробити
172
172
  title: Brexit
173
173
  ukraine:
174
- title:
175
174
  links:
175
+ title:
176
176
  world_locations: Світові локації
177
177
  search_box:
178
178
  input_title: Пошук
179
179
  label: Пошук на GOV.UK
180
180
  search_button: Пошук
181
+ share_links:
182
+ all_opens_in_new_tab:
183
+ opens_in_new_tab:
181
184
  show_password:
182
185
  announce_hide: Ваш пароль приховано
183
186
  announce_show: Ваш пароль показано
@@ -161,13 +161,16 @@ ur:
161
161
  link_text: پڑتال کریں کہ آپ کو کیا کرنے کی ضرورت ہے
162
162
  title: Brexit
163
163
  ukraine:
164
- title:
165
164
  links:
165
+ title:
166
166
  world_locations: عالمی مقامات
167
167
  search_box:
168
168
  input_title: تلاش
169
169
  label: GOV.UK پر تلاش کریں
170
170
  search_button: تلاش
171
+ share_links:
172
+ all_opens_in_new_tab:
173
+ opens_in_new_tab:
171
174
  show_password:
172
175
  announce_hide: آپ کا پاس ورڈ پوشیدہ ہے
173
176
  announce_show: آپ کا پاس ورڈ دکھائی دے رہا ہے
@@ -166,13 +166,16 @@ uz:
166
166
  link_text: Нима қилиш зарурлигини текшириш
167
167
  title: Брексит
168
168
  ukraine:
169
- title:
170
169
  links:
170
+ title:
171
171
  world_locations: Жаҳондаги жойлашиш жойи
172
172
  search_box:
173
173
  input_title: Излаш
174
174
  label: GOV.UKда излаш
175
175
  search_button: Излаш
176
+ share_links:
177
+ all_opens_in_new_tab:
178
+ opens_in_new_tab:
176
179
  show_password:
177
180
  announce_hide: Сизнинг пароль яширилган
178
181
  announce_show: Сизнинг пароль акс эттирилган
@@ -163,13 +163,16 @@ vi:
163
163
  link_text: Kiểm tra những gì bạn cần làm
164
164
  title: Brexit
165
165
  ukraine:
166
- title:
167
166
  links:
167
+ title:
168
168
  world_locations: Các vị trí trên thế giới
169
169
  search_box:
170
170
  input_title: Tìm kiếm
171
171
  label: Tìm kiếm trên GOV.UK
172
172
  search_button: Tìm kiếm
173
+ share_links:
174
+ all_opens_in_new_tab:
175
+ opens_in_new_tab:
173
176
  show_password:
174
177
  announce_hide: Mật khẩu của bạn bị ẩn
175
178
  announce_show: Mật khẩu của bạn được hiển thị
@@ -162,13 +162,16 @@ zh-hk:
162
162
  link_text: 查看您需要做的事
163
163
  title: 英國脫歐
164
164
  ukraine:
165
- title:
166
165
  links:
166
+ title:
167
167
  world_locations: 全世界之地點
168
168
  search_box:
169
169
  input_title: 搜尋
170
170
  label: 搜尋 GOV.UK
171
171
  search_button: 搜尋
172
+ share_links:
173
+ all_opens_in_new_tab:
174
+ opens_in_new_tab:
172
175
  show_password:
173
176
  announce_hide: 您的密碼已隱藏
174
177
  announce_show: 您的密碼已顯示
@@ -162,13 +162,16 @@ zh-tw:
162
162
  link_text: 確認你需要:
163
163
  title: 脫歐
164
164
  ukraine:
165
- title:
166
165
  links:
166
+ title:
167
167
  world_locations: 世界地點
168
168
  search_box:
169
169
  input_title: 搜尋
170
170
  label: 在英國政府網站上搜尋
171
171
  search_button: 搜尋
172
+ share_links:
173
+ all_opens_in_new_tab:
174
+ opens_in_new_tab:
172
175
  show_password:
173
176
  announce_hide: 隱藏你的密碼
174
177
  announce_show: 顯示你的密碼
@@ -162,13 +162,16 @@ zh:
162
162
  link_text: 检查您需要做的事情
163
163
  title: 英国脱欧
164
164
  ukraine:
165
- title:
166
165
  links:
166
+ title:
167
167
  world_locations: 世界地点
168
168
  search_box:
169
169
  input_title: 搜索
170
170
  label: 搜索GOV.UK
171
171
  search_button: 搜索
172
+ share_links:
173
+ all_opens_in_new_tab:
174
+ opens_in_new_tab:
172
175
  show_password:
173
176
  announce_hide: 您的密码已隐藏
174
177
  announce_show: 您的密码已显示
@@ -23,7 +23,9 @@ module GovukPublishingComponents
23
23
  :name,
24
24
  :value,
25
25
  :classes,
26
- :aria_label
26
+ :aria_label,
27
+ :aria_controls,
28
+ :aria_describedby
27
29
 
28
30
  def initialize(local_assigns)
29
31
  @href = local_assigns[:href]
@@ -52,6 +54,8 @@ module GovukPublishingComponents
52
54
  @aria_label = local_assigns[:aria_label]
53
55
  @info_text_id = "info-text-id-#{SecureRandom.hex(4)}"
54
56
  @button_id = "button-id-#{SecureRandom.hex(4)}"
57
+ @aria_controls = local_assigns[:aria_controls]
58
+ @aria_describedby = local_assigns[:aria_describedby]
55
59
  end
56
60
 
57
61
  def link?
@@ -90,6 +94,8 @@ module GovukPublishingComponents
90
94
  options[:name] = name if name.present? && value.present?
91
95
  options[:value] = value if name.present? && value.present?
92
96
  options[:aria] = { label: aria_label } if aria_label
97
+ options[:aria][:controls] = aria_controls if aria_controls
98
+ options[:aria][:describedby] = aria_describedby if aria_describedby
93
99
  options[:draggable] = false if link?
94
100
  options
95
101
  end
@@ -13,6 +13,8 @@ module GovukPublishingComponents
13
13
  @button_type = @local_assigns[:already_subscribed] ? "Unsubscribe" : "Subscribe"
14
14
  @classes = %w[gem-c-single-page-notification-button]
15
15
  @classes << "js-personalisation-enhancement" if js_enhancement
16
+ @button_text_subscribe = custom_button_text_is_valid? ? custom_subscribe_text : default_subscribe_text
17
+ @button_text_unsubscribe = custom_button_text_is_valid? ? custom_unsubscribe_text : default_unsubscribe_text
16
18
  end
17
19
 
18
20
  def data
@@ -24,6 +26,8 @@ module GovukPublishingComponents
24
26
  @data_attributes[:track_category] = "Single-page-notification-button"
25
27
  # This attribute is passed through to the personalisation API to ensure when a new button is returned from the API, it has the same button_location
26
28
  @data_attributes[:button_location] = button_location
29
+ @data_attributes[:button_text_subscribe] = @button_text_subscribe
30
+ @data_attributes[:button_text_unsubscribe] = @button_text_unsubscribe
27
31
  @data_attributes
28
32
  end
29
33
 
@@ -32,7 +36,27 @@ module GovukPublishingComponents
32
36
  end
33
37
 
34
38
  def button_text
35
- @already_subscribed ? I18n.t("components.single_page_notification_button.unsubscribe_text") : I18n.t("components.single_page_notification_button.subscribe_text")
39
+ @already_subscribed ? @button_text_unsubscribe : @button_text_subscribe
40
+ end
41
+
42
+ def custom_button_text_is_valid?
43
+ custom_subscribe_text.present? && custom_unsubscribe_text.present?
44
+ end
45
+
46
+ def custom_subscribe_text
47
+ @local_assigns.dig(:button_text, :subscribe)
48
+ end
49
+
50
+ def custom_unsubscribe_text
51
+ @local_assigns.dig(:button_text, :unsubscribe)
52
+ end
53
+
54
+ def default_subscribe_text
55
+ I18n.t("components.single_page_notification_button.subscribe_text")
56
+ end
57
+
58
+ def default_unsubscribe_text
59
+ I18n.t("components.single_page_notification_button.unsubscribe_text")
36
60
  end
37
61
  end
38
62
  end
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "32.0.0".freeze
2
+ VERSION = "33.0.0".freeze
3
3
  end