govuk_publishing_components 28.4.0 → 28.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/app/assets/javascripts/govuk_publishing_components/analytics/track-select-change.js +4 -3
  4. data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +21 -291
  5. data/app/assets/javascripts/govuk_publishing_components/components/button.js +1 -1
  6. data/app/assets/javascripts/govuk_publishing_components/components/character-count.js +1 -1
  7. data/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js +1 -1
  8. data/app/assets/javascripts/govuk_publishing_components/components/details.js +1 -1
  9. data/app/assets/javascripts/govuk_publishing_components/components/error-summary.js +1 -1
  10. data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +7 -6
  11. data/app/assets/javascripts/govuk_publishing_components/components/layout-header.js +1 -1
  12. data/app/assets/javascripts/govuk_publishing_components/components/radio.js +1 -1
  13. data/app/assets/javascripts/govuk_publishing_components/components/skip-link.js +5 -0
  14. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +40 -37
  15. data/app/assets/javascripts/govuk_publishing_components/components/tabs.js +1 -1
  16. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/barchart-enhancement.js +2 -1
  17. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +8 -10
  18. data/app/assets/javascripts/govuk_publishing_components/lib/initial-focus.js +4 -3
  19. data/app/assets/javascripts/govuk_publishing_components/lib/toggle-input-class-on-focus.js +4 -3
  20. data/app/assets/javascripts/govuk_publishing_components/lib/toggle.js +4 -3
  21. data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +1796 -911
  22. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +1 -329
  23. data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +1 -1
  24. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +95 -56
  25. data/app/assets/stylesheets/govuk_publishing_components/components/print/_accordion.scss +6 -17
  26. data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +0 -9
  27. data/app/models/govuk_publishing_components/component_docs.rb +1 -1
  28. data/app/views/govuk_publishing_components/components/_accordion.html.erb +30 -15
  29. data/app/views/govuk_publishing_components/components/_action_link.html.erb +1 -1
  30. data/app/views/govuk_publishing_components/components/_button.html.erb +4 -4
  31. data/app/views/govuk_publishing_components/components/_character_count.html.erb +2 -2
  32. data/app/views/govuk_publishing_components/components/_checkboxes.html.erb +2 -2
  33. data/app/views/govuk_publishing_components/components/_details.html.erb +1 -1
  34. data/app/views/govuk_publishing_components/components/_error_message.html.erb +1 -1
  35. data/app/views/govuk_publishing_components/components/_error_summary.html.erb +0 -1
  36. data/app/views/govuk_publishing_components/components/_heading.html.erb +1 -1
  37. data/app/views/govuk_publishing_components/components/_hint.html.erb +1 -1
  38. data/app/views/govuk_publishing_components/components/_input.html.erb +3 -3
  39. data/app/views/govuk_publishing_components/components/_inset_text.html.erb +12 -1
  40. data/app/views/govuk_publishing_components/components/_intervention.html.erb +2 -2
  41. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +1 -1
  42. data/app/views/govuk_publishing_components/components/_list.html.erb +1 -1
  43. data/app/views/govuk_publishing_components/components/_modal_dialogue.html.erb +1 -1
  44. data/app/views/govuk_publishing_components/components/_notice.html.erb +1 -1
  45. data/app/views/govuk_publishing_components/components/_print_link.html.erb +2 -2
  46. data/app/views/govuk_publishing_components/components/_radio.html.erb +1 -1
  47. data/app/views/govuk_publishing_components/components/_search.html.erb +4 -6
  48. data/app/views/govuk_publishing_components/components/_select.html.erb +20 -30
  49. data/app/views/govuk_publishing_components/components/_skip_link.html.erb +1 -1
  50. data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +8 -9
  51. data/app/views/govuk_publishing_components/components/_textarea.html.erb +1 -1
  52. data/app/views/govuk_publishing_components/components/_title.html.erb +3 -3
  53. data/app/views/govuk_publishing_components/components/docs/accordion.yml +2 -97
  54. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +1 -1
  55. data/app/views/govuk_publishing_components/components/docs/inset_text.yml +6 -0
  56. data/app/views/govuk_publishing_components/components/docs/select.yml +12 -0
  57. data/app/views/govuk_publishing_components/components/docs/share_links.yml +1 -1
  58. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml +13 -13
  59. data/app/views/govuk_publishing_components/components/docs/tabs.yml +1 -1
  60. data/app/views/govuk_publishing_components/components/docs/textarea.yml +1 -1
  61. data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +3 -3
  62. data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +11 -11
  63. data/config/initializers/assets.rb +1 -0
  64. data/config/locales/ar.yml +2 -0
  65. data/config/locales/az.yml +2 -1
  66. data/config/locales/be.yml +2 -0
  67. data/config/locales/bg.yml +2 -0
  68. data/config/locales/bn.yml +2 -0
  69. data/config/locales/cs.yml +2 -0
  70. data/config/locales/cy.yml +2 -0
  71. data/config/locales/da.yml +2 -0
  72. data/config/locales/de.yml +2 -0
  73. data/config/locales/dr.yml +2 -0
  74. data/config/locales/el.yml +2 -0
  75. data/config/locales/es-419.yml +2 -0
  76. data/config/locales/es.yml +2 -0
  77. data/config/locales/et.yml +2 -0
  78. data/config/locales/fa.yml +2 -1
  79. data/config/locales/fi.yml +2 -0
  80. data/config/locales/fr.yml +2 -0
  81. data/config/locales/gd.yml +2 -0
  82. data/config/locales/gu.yml +2 -0
  83. data/config/locales/he.yml +2 -0
  84. data/config/locales/hi.yml +2 -0
  85. data/config/locales/hr.yml +2 -0
  86. data/config/locales/hu.yml +2 -0
  87. data/config/locales/hy.yml +2 -0
  88. data/config/locales/id.yml +2 -1
  89. data/config/locales/is.yml +2 -0
  90. data/config/locales/it.yml +2 -0
  91. data/config/locales/ja.yml +2 -1
  92. data/config/locales/ka.yml +2 -0
  93. data/config/locales/kk.yml +2 -0
  94. data/config/locales/ko.yml +2 -1
  95. data/config/locales/lt.yml +2 -0
  96. data/config/locales/lv.yml +2 -0
  97. data/config/locales/ms.yml +2 -1
  98. data/config/locales/mt.yml +2 -0
  99. data/config/locales/nl.yml +2 -0
  100. data/config/locales/no.yml +2 -0
  101. data/config/locales/pa-pk.yml +2 -0
  102. data/config/locales/pa.yml +2 -0
  103. data/config/locales/pl.yml +2 -0
  104. data/config/locales/ps.yml +2 -0
  105. data/config/locales/pt.yml +2 -0
  106. data/config/locales/ro.yml +2 -0
  107. data/config/locales/ru.yml +2 -0
  108. data/config/locales/si.yml +2 -0
  109. data/config/locales/sk.yml +2 -0
  110. data/config/locales/sl.yml +2 -0
  111. data/config/locales/so.yml +2 -0
  112. data/config/locales/sq.yml +2 -0
  113. data/config/locales/sr.yml +2 -1
  114. data/config/locales/sv.yml +2 -0
  115. data/config/locales/sw.yml +2 -0
  116. data/config/locales/ta.yml +2 -0
  117. data/config/locales/th.yml +2 -1
  118. data/config/locales/tk.yml +2 -0
  119. data/config/locales/tr.yml +2 -0
  120. data/config/locales/uk.yml +2 -0
  121. data/config/locales/ur.yml +2 -0
  122. data/config/locales/uz.yml +2 -0
  123. data/config/locales/vi.yml +2 -1
  124. data/config/locales/zh-hk.yml +2 -1
  125. data/config/locales/zh-tw.yml +2 -1
  126. data/config/locales/zh.yml +2 -1
  127. data/lib/govuk_publishing_components/presenters/select_helper.rb +85 -0
  128. data/lib/govuk_publishing_components/version.rb +1 -1
  129. data/lib/govuk_publishing_components.rb +1 -1
  130. data/node_modules/govuk-frontend/govuk/all.js +294 -76
  131. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +274 -99
  132. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +169 -65
  133. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +37 -5
  134. data/node_modules/govuk-frontend/govuk/components/accordion/macro-options.json +4 -4
  135. data/node_modules/govuk-frontend/govuk/components/button/button.js +2 -2
  136. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +3 -3
  137. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +15 -2
  138. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +8 -10
  139. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +52 -15
  140. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +0 -2
  141. data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +31 -0
  142. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +25 -25
  143. data/node_modules/govuk-frontend/govuk/components/details/details.js +2 -2
  144. data/node_modules/govuk-frontend/govuk/components/error-message/_index.scss +1 -0
  145. data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +8 -8
  146. data/node_modules/govuk-frontend/govuk/components/error-message/template.njk +2 -2
  147. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +24 -3
  148. data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +25 -16
  149. data/node_modules/govuk-frontend/govuk/components/error-summary/macro-options.json +6 -0
  150. data/node_modules/govuk-frontend/govuk/components/error-summary/template.njk +2 -1
  151. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +4 -4
  152. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +3 -37
  153. data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +119 -15
  154. data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +6 -0
  155. data/node_modules/govuk-frontend/govuk/components/footer/template.njk +1 -1
  156. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +10 -4
  157. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +11 -11
  158. data/node_modules/govuk-frontend/govuk/components/header/header.js +4 -4
  159. data/node_modules/govuk-frontend/govuk/components/header/template.njk +4 -3
  160. data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +1 -3
  161. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +1 -1
  162. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +40 -40
  163. data/node_modules/govuk-frontend/govuk/components/input/template.njk +4 -3
  164. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +499 -2
  165. data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +2 -2
  166. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +0 -8
  167. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +44 -45
  168. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +4 -4
  169. data/node_modules/govuk-frontend/govuk/components/radios/template.njk +2 -9
  170. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +6 -1
  171. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +3 -3
  172. data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +13 -0
  173. data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +9 -9
  174. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +1108 -0
  175. data/node_modules/govuk-frontend/govuk/components/skip-link/template.njk +1 -1
  176. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +20 -23
  177. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +86 -1
  178. data/node_modules/govuk-frontend/govuk/components/summary-list/template.njk +1 -4
  179. data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +2 -2
  180. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +2 -2
  181. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +0 -5
  182. data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +2 -2
  183. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +1 -1
  184. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +4 -4
  185. data/node_modules/govuk-frontend/govuk/core/_all.scss +0 -1
  186. data/node_modules/govuk-frontend/govuk/core/_global-styles.scss +0 -6
  187. data/node_modules/govuk-frontend/govuk/core/_links.scss +0 -6
  188. data/node_modules/govuk-frontend/govuk/core/_lists.scss +0 -6
  189. data/node_modules/govuk-frontend/govuk/core/_section-break.scss +0 -6
  190. data/node_modules/govuk-frontend/govuk/core/_typography.scss +0 -6
  191. data/node_modules/govuk-frontend/govuk/objects/_all.scss +1 -0
  192. data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +15 -30
  193. data/node_modules/govuk-frontend/govuk/{core → objects}/_template.scss +1 -5
  194. data/node_modules/govuk-frontend/govuk/overrides/_display.scss +0 -6
  195. data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +0 -6
  196. data/node_modules/govuk-frontend/govuk/overrides/_text-align.scss +0 -6
  197. data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +0 -6
  198. data/node_modules/govuk-frontend/govuk/overrides/_width.scss +0 -6
  199. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
  200. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +0 -10
  201. data/node_modules/govuk-frontend/govuk/tools/_all.scss +0 -1
  202. data/node_modules/govuk-frontend/package.json +1 -1
  203. metadata +24 -45
  204. data/app/assets/javascripts/govuk_publishing_components/lib/header-navigation.js +0 -100
  205. data/lib/govuk_publishing_components/presenters/select.rb +0 -43
  206. data/lib/tasks/govuk_publishing_components_tasks.rake +0 -49
  207. data/node_modules/govuk-frontend/govuk/tools/_iff.scss +0 -17
@@ -81,6 +81,8 @@ mt:
81
81
  what_doing: X'kont qed tagħmel?
82
82
  what_wrong: X'mar ħażin?
83
83
  'yes': Iva
84
+ intervention:
85
+ accessible_link_text_suffix:
84
86
  layout_footer:
85
87
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
86
88
  licence_html: Il-kontenut huwa kollu disponibbli taħt <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Liċenzja ta' Gvern miftuħ v3.0</a>, except where otherwise stated
@@ -79,6 +79,8 @@ nl:
79
79
  what_doing: Wat was u aan het doen?
80
80
  what_wrong: Wat ging er mis?
81
81
  'yes': Ja
82
+ intervention:
83
+ accessible_link_text_suffix:
82
84
  layout_footer:
83
85
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
84
86
  licence_html: Alle inhoud is beschikbaar onder de <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Overheidslicentie v3.0</a>, behalve waar anders vermeld
@@ -79,6 +79,8 @@
79
79
  what_doing: Hva gjorde du?
80
80
  what_wrong: Hva gikk galt?
81
81
  'yes': Ja
82
+ intervention:
83
+ accessible_link_text_suffix:
82
84
  layout_footer:
83
85
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
84
86
  licence_html: Alt innhold er tilgjengelig under<a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, med mindre annet er angitt
@@ -75,6 +75,8 @@ pa-pk:
75
75
  what_doing: تُسی کیہ کر رئے سو
76
76
  what_wrong: کیہ غلط ہویا اے
77
77
  'yes': جی ہاں
78
+ intervention:
79
+ accessible_link_text_suffix:
78
80
  layout_footer:
79
81
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/ information-management/re-using-public-sector-information/copyright-and-re-use/ /crown-copyright/">© کاپی کراؤن رائٹ</a>
80
82
  licence_html: سارا مواد ایندے تھلے موجود اے <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">اوپن گورنمنٹ لائسنس v3.0</a>, ایہ قبول کر لو جیڑا ایس توں علاوہ اے
@@ -79,6 +79,8 @@ pa:
79
79
  what_doing: ਤੁਸੀਂ ਕੀ ਕਰ ਰਹੇ ਸੀ?
80
80
  what_wrong: ਕੀ ਗਲਤ ਹੋਇਆ?
81
81
  'yes': ਹਾਂ
82
+ intervention:
83
+ accessible_link_text_suffix:
82
84
  layout_footer:
83
85
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© ਕ੍ਰਾਊਨ ਕਾਪੀਰਾਈਟ</a>
84
86
  licence_html: ਸਾਰੀ ਸਮਗਰੀ <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">ਓਪਨ ਗਵਰਨਮੈਂਟ ਲਾਇਸੈਂਸ v3.0</a>, ਦੇ ਅਧੀਨ ਸਾਰੀ ਸਮਗਰੀ ਉਪਲਬਧ ਹੈ ਸਿਵਾਏ ਇਸਦੇ ਜਿੱਥੇ ਹੋਰ ਨਹੀਂ ਕਿਹਾ ਗਿਆ ਹੈ
@@ -83,6 +83,8 @@ pl:
83
83
  what_doing: Co robiłeś?
84
84
  what_wrong: Co poszło nie tak?
85
85
  'yes': Tak
86
+ intervention:
87
+ accessible_link_text_suffix:
86
88
  layout_footer:
87
89
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Właścicielem praw autorskich jest Korona</a>
88
90
  licence_html: Cała zawartość objęta jest licencją <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, chyba że zaznaczono inaczej
@@ -76,6 +76,8 @@ ps:
76
76
  what_doing: ته څه کوې؟
77
77
  what_wrong: څه غلط شول؟
78
78
  'yes': هو
79
+ intervention:
80
+ accessible_link_text_suffix:
79
81
  layout_footer:
80
82
  copyright_html: <a class = "govuk-footer__link govuk-footer__copyright-logo" href = "http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use /crown-copyright/"> rown د تاج کاپي حق </a>
81
83
  licence_html: ټول مینځپانګه د <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license"> لاندې خلاصې دي د حکومت جواز v3.0 </a> ، پرته لدې چیرې چې بل ډول ویل شوي
@@ -79,6 +79,8 @@ pt:
79
79
  what_doing: O que estava a fazer?
80
80
  what_wrong: O que correu mal?
81
81
  'yes': Sim
82
+ intervention:
83
+ accessible_link_text_suffix:
82
84
  layout_footer:
83
85
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Direitos de autor da Coroa</a>
84
86
  licence_html: Todo o conteúdo está disponível ao abrigo da <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, exceto quando indicado em contrário
@@ -80,6 +80,8 @@ ro:
80
80
  what_doing: Ce făceați?
81
81
  what_wrong: Ce eroare a survenit?
82
82
  'yes': Da
83
+ intervention:
84
+ accessible_link_text_suffix:
83
85
  layout_footer:
84
86
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
85
87
  licence_html: Tot conținutul este disponibil conform <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, cu excepția cazurilor în care s-a specificat altceva
@@ -83,6 +83,8 @@ ru:
83
83
  what_doing: Что вы делали?
84
84
  what_wrong: Что пошло не так?
85
85
  'yes': Да
86
+ intervention:
87
+ accessible_link_text_suffix:
86
88
  layout_footer:
87
89
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Авторское право Британского содружества наций</a>
88
90
  licence_html: Все содержимое доступно на <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license"> Открытой государственной лицензии v3.0</a>, если не указано иное
@@ -79,6 +79,8 @@ si:
79
79
  what_doing: ඔබ කුමක් ද කරමින් සිටියේ?
80
80
  what_wrong: වැරදුණේ කුමක්ද?
81
81
  'yes': ඔව්
82
+ intervention:
83
+ accessible_link_text_suffix:
82
84
  layout_footer:
83
85
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© රාජ්‍ය කතුහිමිකම</a>
84
86
  licence_html: සියලු අන්තගතයන් වෙනත් ආකාරයකින් සඳහන් කර තිබුණොත් මිසක <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">රජයේ විවෘත බලපත්‍ර v3.0</a>, යටතේ ලබා ගත හැකිය
@@ -84,6 +84,8 @@ sk:
84
84
  what_doing: Čo ste robili?
85
85
  what_wrong: Čo sa pokazilo?
86
86
  'yes': Áno
87
+ intervention:
88
+ accessible_link_text_suffix:
87
89
  layout_footer:
88
90
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Korunné autorské práva</a>
89
91
  licence_html: Všetok obsah je k dispozícii pod <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">licenciou Open Government Licence v3.0</a>, okrem prípadov, keď je uvedené inak
@@ -86,6 +86,8 @@ sl:
86
86
  what_doing: Kaj ste počeli?
87
87
  what_wrong: Kaj je šlo narobe?
88
88
  'yes': Da
89
+ intervention:
90
+ accessible_link_text_suffix:
89
91
  layout_footer:
90
92
  copyright_html: <a class="govnu-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Avtorske pravice krone</a>
91
93
  licence_html: Vsa vsebina je na voljo na <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Odprto vladno dovoljenje v3.0</a>, razen kjer je zapisano drugače
@@ -79,6 +79,8 @@ so:
79
79
  what_doing: Maxaad doonaysaa inuu laguu qabto?
80
80
  what_wrong: Maxaa qaldamay?
81
81
  'yes': Haa
82
+ intervention:
83
+ accessible_link_text_suffix:
82
84
  layout_footer:
83
85
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
84
86
  licence_html: Dhamaan qaybaha waxa laga heli karaa <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, except where otherwise stated
@@ -79,6 +79,8 @@ sq:
79
79
  what_doing: Cfare po bënit?
80
80
  what_wrong: Çfarë shkoi keq?
81
81
  'yes': Po
82
+ intervention:
83
+ accessible_link_text_suffix:
82
84
  layout_footer:
83
85
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown e drejta e autorit</a>
84
86
  licence_html: E gjithë përmbajtja është në dispozicion nën <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Licencën e Qeverisë së Hapur v3.0</a>, përveç rasteve kur thuhet ndryshe
@@ -16,7 +16,6 @@ sr:
16
16
  order_a_copy: Zatražite primerak
17
17
  page:
18
18
  few:
19
- many:
20
19
  one: 1 stranica
21
20
  other: "%{count} str."
22
21
  reference: 'Ref: %{reference}'
@@ -81,6 +80,8 @@ sr:
81
80
  what_doing: Šta ste radili?
82
81
  what_wrong: Koji problem se javio?
83
82
  'yes': Da
83
+ intervention:
84
+ accessible_link_text_suffix:
84
85
  layout_footer:
85
86
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
86
87
  licence_html: Sav sadržaj je dostupan pod licencom <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, izuzev ako je drugačije naznačeno
@@ -79,6 +79,8 @@ sv:
79
79
  what_doing: Vad gjorde du?
80
80
  what_wrong: Vad gick fel?
81
81
  'yes': Ja
82
+ intervention:
83
+ accessible_link_text_suffix:
82
84
  layout_footer:
83
85
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
84
86
  licence_html: Allt innehåll är tillgängligt enligt <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, om inget annat anges
@@ -79,6 +79,8 @@ sw:
79
79
  what_doing: Ulikuwa unafanya nini?
80
80
  what_wrong: Tatizo lipi lililotokea?
81
81
  'yes': Ndiyo
82
+ intervention:
83
+ accessible_link_text_suffix:
82
84
  layout_footer:
83
85
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Hakimiliki ya Crown</a>
84
86
  licence_html: Maudhui yote yanapatikana chini ya <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, isipokuwa ibainishwe vinginevyo
@@ -80,6 +80,8 @@ ta:
80
80
  what_doing: நீங்கள் என்ன செய்து கொண்டிருந்தீர்கள்?
81
81
  what_wrong: என்ன தவறு நடந்தது?
82
82
  'yes': ஆம்
83
+ intervention:
84
+ accessible_link_text_suffix:
83
85
  layout_footer:
84
86
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown காப்புரிமை</a>
85
87
  licence_html: வேறுவகையில் குறிப்பிடப்படாதவரை அனைத்து உள்ளடக்கமும் <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>-ன்கீழ் கிடைக்கிறது.
@@ -15,7 +15,6 @@ th:
15
15
  opendocument_html: ไฟล์นี้อยู่ในรูปแบบ <a href='https://www.gov.uk/guidance/using-open-document-formats-odf-in-your-organisation' target=%{target} class='govuk-link'>OpenDocument</a>
16
16
  order_a_copy: สั่งซื้อสำเนา
17
17
  page:
18
- one: 1 หน้า
19
18
  other: "%{count} หน้า"
20
19
  reference: 'อ้างอิง: %{reference}'
21
20
  request_format_cta: ขอรูปแบบไฟล์ที่สามารถเข้าถึงได้
@@ -78,6 +77,8 @@ th:
78
77
  what_doing: คุณทำอะไรอยู่ในขณะนั้น
79
78
  what_wrong: มีสิ่งใดผิดปกติ
80
79
  'yes': ใช่
80
+ intervention:
81
+ accessible_link_text_suffix:
81
82
  layout_footer:
82
83
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">ลิขสิทธิ์ © Crown</a>
83
84
  licence_html: เนื้อหาทั้งหมดอยู่ภายใต้สัญญาอนุญาต <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government License v3.0</a> ยกเว้นจะระบุไว้เป็นอย่างอื่น
@@ -80,6 +80,8 @@ tk:
80
80
  what_doing: Näme edýärdiňiz?
81
81
  what_wrong: Näme nädogry boldy?
82
82
  'yes': Hawa
83
+ intervention:
84
+ accessible_link_text_suffix:
83
85
  layout_footer:
84
86
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown awtorlyk hukugy</a>
85
87
  licence_html: Ähli mazmun <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Açyk hökümet ygtyýarnamasy v3.0-da görkezilen</a>, eger başgaça bellenilmedik bolsa
@@ -80,6 +80,8 @@ tr:
80
80
  what_doing: Ne yapmaktaydınız?
81
81
  what_wrong: Nasıl bir sorun oldu?
82
82
  'yes': Evet
83
+ intervention:
84
+ accessible_link_text_suffix:
83
85
  layout_footer:
84
86
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
85
87
  licence_html: Aksi ifade edilmedikçe tüm içeriğe <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a> adresinden erişilebilir
@@ -86,6 +86,8 @@ uk:
86
86
  what_doing: Що ви робили?
87
87
  what_wrong: Що пішло не так?
88
88
  'yes': Так
89
+ intervention:
90
+ accessible_link_text_suffix:
89
91
  layout_footer:
90
92
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
91
93
  licence_html: Весь вміст доступний за <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Відкритою державною ліцензією v3.0</a>, якщо не зазначено інше
@@ -76,6 +76,8 @@ ur:
76
76
  what_doing: آپ کیا کر رہے تھے؟
77
77
  what_wrong: کیا غلط ہوا؟
78
78
  'yes': جی ہاں
79
+ intervention:
80
+ accessible_link_text_suffix:
79
81
  layout_footer:
80
82
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown کاپی رائٹ</a>
81
83
  licence_html: سوائے ان کے جنہیں بصورت دیگر بیان کیا گیا ہے، <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a> کے تحت تمام مواد دستیاب ہے
@@ -81,6 +81,8 @@ uz:
81
81
  what_doing: Сиз нима қилаётган эдингиз?
82
82
  what_wrong: Қандай хатолик бўлди?
83
83
  'yes': Ҳа
84
+ intervention:
85
+ accessible_link_text_suffix:
84
86
  layout_footer:
85
87
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Британия миллатлар ҳамдўстлигининг муаллифлик ҳуқуқи</a>
86
88
  licence_html: Бутун таркиб <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">“Очиқ давлат лицензияси, версия 3.0” дастурида эришимли</a>, агар бошқаси кўрсатилмаган бўлса
@@ -15,7 +15,6 @@ vi:
15
15
  opendocument_html: Tệp này có định dạng <a href='https://www.gov.uk/guidance/using-open-document-formats-odf-in-your-organisation' target=%{target} class='govuk-link'>OpenDocument</a>
16
16
  order_a_copy: Đặt hàng một bản sao
17
17
  page:
18
- one: 1 trang
19
18
  other: "%{count} trang"
20
19
  reference: 'Tham khảo: %{reference}'
21
20
  request_format_cta: Yêu cầu một định dạng có thể truy cập.
@@ -79,6 +78,8 @@ vi:
79
78
  what_doing: Bạn đang làm gì?
80
79
  what_wrong: Sự cố gì đã xảy ra?
81
80
  'yes': Có
81
+ intervention:
82
+ accessible_link_text_suffix:
82
83
  layout_footer:
83
84
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Bản quyền Crown</a>
84
85
  licence_html: Tất cả nội dung đều có sẵn theo <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Giấy phép Chính phủ Mở pb3.0</a>, trừ khi có quy định khác
@@ -15,7 +15,6 @@ zh-hk:
15
15
  opendocument_html: 此文檔為 <a href='https://www.gov.uk/guidance/using-open-document-formats-odf-in-your-organisation' target=%{target} class='govuk-link'>OpenDocument</a> 格式
16
16
  order_a_copy: 索取副本
17
17
  page:
18
- one: 1 頁
19
18
  other: "%{count} 頁"
20
19
  reference: 'Ref: %{reference}'
21
20
  request_format_cta: 索取可讀取之格式。
@@ -78,6 +77,8 @@ zh-hk:
78
77
  what_doing: 您剛才在做什麼?
79
78
  what_wrong: 出現什麼錯誤?
80
79
  'yes': 是
80
+ intervention:
81
+ accessible_link_text_suffix:
81
82
  layout_footer:
82
83
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown 版權所有</a>
83
84
  licence_html: 除另有說明者外,所有內容均可在 <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>獲取。
@@ -15,7 +15,6 @@ zh-tw:
15
15
  opendocument_html: 本檔案於 <a href='https://www.gov.uk/guidance/using-open-document-formats-odf-in-your-organisation' target=%{target} class='govuk-link'>開放文件</a> 格式
16
16
  order_a_copy: 預定副本
17
17
  page:
18
- one: 一頁
19
18
  other: "%{count} 頁面"
20
19
  reference: 參考:%{reference}
21
20
  request_format_cta: 請求可參閱格式。
@@ -78,6 +77,8 @@ zh-tw:
78
77
  what_doing: 你做了什麼?
79
78
  what_wrong: 哪出錯了?
80
79
  'yes': 是的
80
+ intervention:
81
+ accessible_link_text_suffix:
81
82
  layout_footer:
82
83
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
83
84
  licence_html: 所有內容都具 <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">英國政府開放授權v3.0</a>,除非另有說明
@@ -15,7 +15,6 @@ zh:
15
15
  opendocument_html: 本文件是 <a href='https://www.gov.uk/guidance/using-open-document-formats-odf-in-your-organisation' target=%{target} class='govuk-link'>开放式文本</a> 格式
16
16
  order_a_copy: 订购副本
17
17
  page:
18
- one: 1页
19
18
  other: "%{count} 页"
20
19
  reference: 参考号:%{reference}
21
20
  request_format_cta: 申请可访问格式。
@@ -78,6 +77,8 @@ zh:
78
77
  what_doing: 您在干什么?
79
78
  what_wrong: 发生了哪些错误?
80
79
  'yes': 是
80
+ intervention:
81
+ accessible_link_text_suffix:
81
82
  layout_footer:
82
83
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown版权所有</a>
83
84
  licence_html: 除另有说明外,所有内容均可在 <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">开放政府许可证第3.0版</a>获取
@@ -0,0 +1,85 @@
1
+ module GovukPublishingComponents
2
+ module Presenters
3
+ class SelectHelper
4
+ attr_reader :options, :option_markup, :selected_option, :error_message, :error_id, :hint, :hint_id, :describedby
5
+
6
+ def initialize(local_assigns)
7
+ @options = local_assigns[:options] || []
8
+ @error_message = local_assigns[:error_message]
9
+ @error_id = local_assigns[:error_id] || nil
10
+ @hint = local_assigns[:hint] || nil
11
+ @hint_id = local_assigns[:hint_id] || nil
12
+ @heading_size = local_assigns[:heading_size]
13
+ @full_width = local_assigns[:full_width] || false
14
+ @option_markup = get_options
15
+ @describedby = get_describedby
16
+ end
17
+
18
+ def data_tracking?
19
+ @options.any? { |item| item[:data_attributes] && item[:data_attributes][:track_category] && item[:data_attributes][:track_action] }
20
+ end
21
+
22
+ def css_classes
23
+ classes = %w[govuk-form-group gem-c-select]
24
+ classes << "govuk-form-group--error" if @error_message
25
+ classes
26
+ end
27
+
28
+ def select_classes
29
+ classes = %w[govuk-select]
30
+ classes << "gem-c-select__select--full-width" if @full_width
31
+ classes << "govuk-select--error" if @error_id
32
+ classes
33
+ end
34
+
35
+ def label_classes
36
+ classes = %w[govuk-label]
37
+ classes << "govuk-label--#{@heading_size}" if @heading_size
38
+ classes
39
+ end
40
+
41
+ private
42
+
43
+ def get_options
44
+ return if options.nil?
45
+
46
+ options.map do |option|
47
+ @selected_option = option[:value] if option[:selected]
48
+ [
49
+ option[:text],
50
+ option[:value],
51
+ options_data_attribute(option[:data_attributes]),
52
+ ]
53
+ end
54
+ end
55
+
56
+ def options_data_attribute(attributes)
57
+ return {} if attributes.nil?
58
+
59
+ attrs = {}
60
+ attributes.each do |key, value|
61
+ key_name = "data-#{key.to_s.split('_').join('-')}"
62
+ attrs[key_name] = value.is_a?(Hash) ? value.to_json : value
63
+ end
64
+
65
+ attrs
66
+ end
67
+
68
+ def get_describedby
69
+ describedby = %w[]
70
+
71
+ if @error_message || @error_id
72
+ @error_id ||= "error-#{SecureRandom.hex(4)}"
73
+ describedby << @error_id
74
+ end
75
+
76
+ if @hint
77
+ @hint_id ||= "hint-#{SecureRandom.hex(4)}"
78
+ describedby << @hint_id
79
+ end
80
+
81
+ describedby
82
+ end
83
+ end
84
+ end
85
+ end
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "28.4.0".freeze
2
+ VERSION = "28.7.1".freeze
3
3
  end
@@ -21,7 +21,7 @@ require "govuk_publishing_components/presenters/content_breadcrumbs_based_on_pri
21
21
  require "govuk_publishing_components/presenters/content_breadcrumbs_based_on_taxons"
22
22
  require "govuk_publishing_components/presenters/content_breadcrumbs_based_on_topic"
23
23
  require "govuk_publishing_components/presenters/checkboxes_helper"
24
- require "govuk_publishing_components/presenters/select"
24
+ require "govuk_publishing_components/presenters/select_helper"
25
25
  require "govuk_publishing_components/presenters/meta_tags"
26
26
  require "govuk_publishing_components/presenters/content_item"
27
27
  require "govuk_publishing_components/presenters/translation_nav_helper"