govuk_publishing_components 17.21.0 → 18.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (476) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/all_components.js +1 -1
  3. data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +1 -1
  4. data/app/assets/javascripts/govuk_publishing_components/components/character-count.js +1 -1
  5. data/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js +1 -1
  6. data/app/assets/javascripts/govuk_publishing_components/components/error-summary.js +1 -1
  7. data/app/assets/javascripts/govuk_publishing_components/components/radio.js +1 -1
  8. data/app/assets/javascripts/govuk_publishing_components/lib/header-navigation.js +1 -1
  9. data/app/assets/stylesheets/component_guide/application.scss +5 -7
  10. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -2
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +1 -1
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +1 -1
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss +1 -1
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss +5 -1
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +3 -15
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_character-count.scss +1 -1
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss +2 -2
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +28 -9
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_date-input.scss +1 -1
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_details.scss +1 -1
  21. data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +2 -2
  22. data/app/assets/stylesheets/govuk_publishing_components/components/_error-message.scss +1 -1
  23. data/app/assets/stylesheets/govuk_publishing_components/components/_error-summary.scss +1 -1
  24. data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +1 -13
  25. data/app/assets/stylesheets/govuk_publishing_components/components/_fieldset.scss +1 -1
  26. data/app/assets/stylesheets/govuk_publishing_components/components/_file-upload.scss +1 -1
  27. data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss +3 -3
  28. data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +3 -3
  29. data/app/assets/stylesheets/govuk_publishing_components/components/_hint.scss +1 -1
  30. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +18 -7
  31. data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +1 -1
  32. data/app/assets/stylesheets/govuk_publishing_components/components/_inset-text.scss +1 -1
  33. data/app/assets/stylesheets/govuk_publishing_components/components/_label.scss +1 -1
  34. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +1 -1
  35. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-admin.scss +1 -1
  36. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +6 -6
  37. data/app/assets/stylesheets/govuk_publishing_components/components/_modal-dialogue.scss +8 -3
  38. data/app/assets/stylesheets/govuk_publishing_components/components/_panel.scss +1 -1
  39. data/app/assets/stylesheets/govuk_publishing_components/components/_phase-banner.scss +1 -1
  40. data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +6 -3
  41. data/app/assets/stylesheets/govuk_publishing_components/components/_radio.scss +1 -1
  42. data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +1 -1
  43. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +10 -3
  44. data/app/assets/stylesheets/govuk_publishing_components/components/_select.scss +1 -1
  45. data/app/assets/stylesheets/govuk_publishing_components/components/_skip-link.scss +1 -1
  46. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +3 -3
  47. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +17 -1
  48. data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +1 -1
  49. data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +8 -6
  50. data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +1 -1
  51. data/app/assets/stylesheets/govuk_publishing_components/components/_textarea.scss +1 -1
  52. data/app/assets/stylesheets/govuk_publishing_components/components/_title.scss +5 -5
  53. data/app/assets/stylesheets/govuk_publishing_components/components/_warning-text.scss +1 -1
  54. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_advisory.scss +1 -1
  55. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +2 -2
  56. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +1 -1
  57. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss +2 -2
  58. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +2 -2
  59. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss +2 -2
  60. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss +2 -2
  61. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss +2 -2
  62. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_fraction.scss +2 -2
  63. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_highlight-answer.scss +2 -2
  64. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss +2 -2
  65. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_legislative-list.scss +1 -1
  66. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_media-player.scss +1 -1
  67. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss +1 -1
  68. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_stat-headline.scss +1 -1
  69. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +2 -2
  70. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss +4 -4
  71. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +1 -1
  72. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss +2 -2
  73. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_govuk-frontend-settings.scss +0 -4
  74. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +4 -1
  75. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_variables.scss +1 -1
  76. data/app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak.scss +1 -1
  77. data/app/views/govuk_publishing_components/component_guide/index.html.erb +14 -12
  78. data/app/views/govuk_publishing_components/components/_accordion.html.erb +1 -1
  79. data/app/views/govuk_publishing_components/components/_button.html.erb +16 -2
  80. data/app/views/govuk_publishing_components/components/_character_count.html.erb +1 -1
  81. data/app/views/govuk_publishing_components/components/_checkboxes.html.erb +1 -1
  82. data/app/views/govuk_publishing_components/components/_contents_list.html.erb +5 -1
  83. data/app/views/govuk_publishing_components/components/_details.html.erb +3 -1
  84. data/app/views/govuk_publishing_components/components/_error_summary.html.erb +1 -1
  85. data/app/views/govuk_publishing_components/components/_layout_header.html.erb +2 -2
  86. data/app/views/govuk_publishing_components/components/_radio.html.erb +1 -1
  87. data/app/views/govuk_publishing_components/components/_subscription-links.html.erb +2 -2
  88. data/app/views/govuk_publishing_components/components/_tabs.html.erb +1 -1
  89. data/app/views/govuk_publishing_components/components/_textarea.html.erb +1 -1
  90. data/app/views/govuk_publishing_components/components/_title.html.erb +1 -1
  91. data/app/views/govuk_publishing_components/components/docs/button.yml +1 -1
  92. data/app/views/govuk_publishing_components/components/docs/contents_list.yml +12 -0
  93. data/app/views/govuk_publishing_components/components/docs/contextual_breadcrumbs.yml +1 -1
  94. data/app/views/govuk_publishing_components/components/docs/fieldset.yml +1 -1
  95. data/app/views/govuk_publishing_components/components/docs/label.yml +4 -1
  96. data/app/views/govuk_publishing_components/components/docs/table.yml +1 -0
  97. data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +2 -2
  98. data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +2 -2
  99. data/config/initializers/assets.rb +3 -3
  100. data/config/locales/en.yml +0 -2
  101. data/lib/govuk_publishing_components/version.rb +1 -1
  102. data/node_modules/govuk-frontend/README.md +4 -9
  103. data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +4 -5
  104. data/node_modules/govuk-frontend/{all-ie8.scss → govuk/all-ie8.scss} +0 -0
  105. data/node_modules/govuk-frontend/{all.js → govuk/all.js} +116 -63
  106. data/node_modules/govuk-frontend/{all.scss → govuk/all.scss} +0 -0
  107. data/node_modules/govuk-frontend/govuk/assets/fonts/bold-affa96571d-v2.woff +0 -0
  108. data/node_modules/govuk-frontend/govuk/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
  109. data/node_modules/govuk-frontend/govuk/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
  110. data/node_modules/govuk-frontend/govuk/assets/fonts/light-f591b13f7d-v2.woff +0 -0
  111. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/favicon.ico +0 -0
  112. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-apple-touch-icon-152x152.png +0 -0
  113. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-apple-touch-icon-167x167.png +0 -0
  114. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-apple-touch-icon-180x180.png +0 -0
  115. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-apple-touch-icon.png +0 -0
  116. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-crest-2x.png +0 -0
  117. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-crest.png +0 -0
  118. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-logotype-crown.png +0 -0
  119. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-mask-icon.svg +0 -0
  120. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-opengraph-image.png +0 -0
  121. data/node_modules/govuk-frontend/{common.js → govuk/common.js} +0 -0
  122. data/node_modules/govuk-frontend/{components → govuk/components}/_all.scss +0 -0
  123. data/node_modules/govuk-frontend/{components → govuk/components}/accordion/README.md +0 -0
  124. data/node_modules/govuk-frontend/{components → govuk/components}/accordion/_accordion.scss +48 -28
  125. data/node_modules/govuk-frontend/{components → govuk/components}/accordion/accordion.js +0 -0
  126. data/node_modules/govuk-frontend/{components → govuk/components}/accordion/macro-options.json +8 -2
  127. data/node_modules/govuk-frontend/{components → govuk/components}/accordion/macro.njk +0 -0
  128. data/node_modules/govuk-frontend/{components → govuk/components}/accordion/template.njk +1 -3
  129. data/node_modules/govuk-frontend/{components → govuk/components}/back-link/README.md +0 -0
  130. data/node_modules/govuk-frontend/{components → govuk/components}/back-link/_back-link.scss +17 -9
  131. data/node_modules/govuk-frontend/{components → govuk/components}/back-link/macro-options.json +0 -0
  132. data/node_modules/govuk-frontend/{components → govuk/components}/back-link/macro.njk +0 -0
  133. data/node_modules/govuk-frontend/{components → govuk/components}/back-link/template.njk +0 -0
  134. data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/README.md +0 -0
  135. data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/_breadcrumbs.scss +10 -11
  136. data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/macro-options.json +0 -0
  137. data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/macro.njk +0 -0
  138. data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/template.njk +0 -0
  139. data/node_modules/govuk-frontend/{components → govuk/components}/button/README.md +0 -0
  140. data/node_modules/govuk-frontend/{components → govuk/components}/button/_button.scss +76 -46
  141. data/node_modules/govuk-frontend/{components → govuk/components}/button/button.js +168 -17
  142. data/node_modules/govuk-frontend/{components → govuk/components}/button/macro-options.json +0 -0
  143. data/node_modules/govuk-frontend/{components → govuk/components}/button/macro.njk +0 -0
  144. data/node_modules/govuk-frontend/govuk/components/button/template.njk +60 -0
  145. data/node_modules/govuk-frontend/{components → govuk/components}/character-count/README.md +0 -0
  146. data/node_modules/govuk-frontend/{components → govuk/components}/character-count/_character-count.scss +0 -0
  147. data/node_modules/govuk-frontend/{components → govuk/components}/character-count/character-count.js +5 -1
  148. data/node_modules/govuk-frontend/{components → govuk/components}/character-count/macro-options.json +0 -0
  149. data/node_modules/govuk-frontend/{components → govuk/components}/character-count/macro.njk +0 -0
  150. data/node_modules/govuk-frontend/{components → govuk/components}/character-count/template.njk +2 -2
  151. data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/README.md +0 -0
  152. data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/_checkboxes.scss +4 -6
  153. data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/checkboxes.js +0 -0
  154. data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/macro-options.json +6 -0
  155. data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/macro.njk +0 -0
  156. data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/template.njk +18 -5
  157. data/node_modules/govuk-frontend/{components → govuk/components}/date-input/README.md +0 -0
  158. data/node_modules/govuk-frontend/{components → govuk/components}/date-input/_date-input.scss +0 -0
  159. data/node_modules/govuk-frontend/{components → govuk/components}/date-input/macro-options.json +0 -0
  160. data/node_modules/govuk-frontend/{components → govuk/components}/date-input/macro.njk +0 -0
  161. data/node_modules/govuk-frontend/{components → govuk/components}/date-input/template.njk +1 -1
  162. data/node_modules/govuk-frontend/{components → govuk/components}/details/README.md +0 -0
  163. data/node_modules/govuk-frontend/{components → govuk/components}/details/_details.scss +12 -13
  164. data/node_modules/govuk-frontend/{components → govuk/components}/details/details.js +3 -4
  165. data/node_modules/govuk-frontend/{components → govuk/components}/details/implementation.md +0 -0
  166. data/node_modules/govuk-frontend/{components → govuk/components}/details/macro-options.json +0 -0
  167. data/node_modules/govuk-frontend/{components → govuk/components}/details/macro.njk +0 -0
  168. data/node_modules/govuk-frontend/{components → govuk/components}/details/template.njk +1 -1
  169. data/node_modules/govuk-frontend/{components → govuk/components}/error-message/README.md +0 -0
  170. data/node_modules/govuk-frontend/{components → govuk/components}/error-message/_error-message.scss +0 -0
  171. data/node_modules/govuk-frontend/{components → govuk/components}/error-message/macro-options.json +0 -0
  172. data/node_modules/govuk-frontend/{components → govuk/components}/error-message/macro.njk +0 -0
  173. data/node_modules/govuk-frontend/{components → govuk/components}/error-message/template.njk +0 -0
  174. data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/README.md +0 -0
  175. data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/_error-summary.scss +4 -17
  176. data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/error-summary.js +0 -10
  177. data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/macro-options.json +0 -0
  178. data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/macro.njk +0 -0
  179. data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/template.njk +1 -1
  180. data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/README.md +0 -0
  181. data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/_fieldset.scss +0 -0
  182. data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/macro-options.json +1 -1
  183. data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/macro.njk +0 -0
  184. data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/template.njk +0 -0
  185. data/node_modules/govuk-frontend/{components → govuk/components}/file-upload/README.md +0 -0
  186. data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +81 -0
  187. data/node_modules/govuk-frontend/{components → govuk/components}/file-upload/macro-options.json +6 -0
  188. data/node_modules/govuk-frontend/{components → govuk/components}/file-upload/macro.njk +0 -0
  189. data/node_modules/govuk-frontend/{components → govuk/components}/file-upload/template.njk +1 -1
  190. data/node_modules/govuk-frontend/{components → govuk/components}/footer/README.md +0 -0
  191. data/node_modules/govuk-frontend/{components → govuk/components}/footer/_footer.scss +47 -16
  192. data/node_modules/govuk-frontend/{components → govuk/components}/footer/macro-options.json +5 -0
  193. data/node_modules/govuk-frontend/{components → govuk/components}/footer/macro.njk +0 -0
  194. data/node_modules/govuk-frontend/{components → govuk/components}/footer/template.njk +1 -1
  195. data/node_modules/govuk-frontend/{components → govuk/components}/header/README.md +0 -0
  196. data/node_modules/govuk-frontend/{components → govuk/components}/header/_header.scss +34 -21
  197. data/node_modules/govuk-frontend/{components → govuk/components}/header/header.js +1 -1
  198. data/node_modules/govuk-frontend/{components → govuk/components}/header/macro-options.json +2 -2
  199. data/node_modules/govuk-frontend/{components → govuk/components}/header/macro.njk +0 -0
  200. data/node_modules/govuk-frontend/{components → govuk/components}/header/template.njk +6 -9
  201. data/node_modules/govuk-frontend/{components → govuk/components}/hint/README.md +0 -0
  202. data/node_modules/govuk-frontend/{components → govuk/components}/hint/_hint.scss +0 -0
  203. data/node_modules/govuk-frontend/{components → govuk/components}/hint/macro-options.json +0 -0
  204. data/node_modules/govuk-frontend/{components → govuk/components}/hint/macro.njk +0 -0
  205. data/node_modules/govuk-frontend/{components → govuk/components}/hint/template.njk +0 -0
  206. data/node_modules/govuk-frontend/{components → govuk/components}/input/README.md +0 -0
  207. data/node_modules/govuk-frontend/{components → govuk/components}/input/_input.scss +24 -1
  208. data/node_modules/govuk-frontend/{components → govuk/components}/input/macro-options.json +6 -0
  209. data/node_modules/govuk-frontend/{components → govuk/components}/input/macro.njk +0 -0
  210. data/node_modules/govuk-frontend/{components → govuk/components}/input/template.njk +1 -1
  211. data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/README.md +0 -0
  212. data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/_inset-text.scss +0 -0
  213. data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/macro-options.json +0 -0
  214. data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/macro.njk +0 -0
  215. data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/template.njk +0 -0
  216. data/node_modules/govuk-frontend/{components → govuk/components}/label/README.md +0 -0
  217. data/node_modules/govuk-frontend/{components → govuk/components}/label/_label.scss +0 -0
  218. data/node_modules/govuk-frontend/{components → govuk/components}/label/macro-options.json +0 -0
  219. data/node_modules/govuk-frontend/{components → govuk/components}/label/macro.njk +0 -0
  220. data/node_modules/govuk-frontend/{components → govuk/components}/label/template.njk +0 -0
  221. data/node_modules/govuk-frontend/{components → govuk/components}/panel/README.md +0 -0
  222. data/node_modules/govuk-frontend/{components → govuk/components}/panel/_panel.scss +1 -1
  223. data/node_modules/govuk-frontend/{components → govuk/components}/panel/macro-options.json +0 -0
  224. data/node_modules/govuk-frontend/{components → govuk/components}/panel/macro.njk +0 -0
  225. data/node_modules/govuk-frontend/{components → govuk/components}/panel/template.njk +0 -0
  226. data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/README.md +0 -0
  227. data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/_phase-banner.scss +0 -0
  228. data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/macro-options.json +0 -0
  229. data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/macro.njk +0 -0
  230. data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/template.njk +5 -7
  231. data/node_modules/govuk-frontend/{components → govuk/components}/radios/README.md +0 -0
  232. data/node_modules/govuk-frontend/{components → govuk/components}/radios/_radios.scss +7 -9
  233. data/node_modules/govuk-frontend/{components → govuk/components}/radios/macro-options.json +0 -0
  234. data/node_modules/govuk-frontend/{components → govuk/components}/radios/macro.njk +0 -0
  235. data/node_modules/govuk-frontend/{components → govuk/components}/radios/radios.js +24 -11
  236. data/node_modules/govuk-frontend/{components → govuk/components}/radios/template.njk +15 -5
  237. data/node_modules/govuk-frontend/{components → govuk/components}/select/README.md +0 -0
  238. data/node_modules/govuk-frontend/{components → govuk/components}/select/_select.scss +23 -1
  239. data/node_modules/govuk-frontend/{components → govuk/components}/select/macro-options.json +6 -0
  240. data/node_modules/govuk-frontend/{components → govuk/components}/select/macro.njk +0 -0
  241. data/node_modules/govuk-frontend/{components → govuk/components}/select/template.njk +1 -1
  242. data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/README.md +0 -0
  243. data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/_skip-link.scss +6 -1
  244. data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/macro-options.json +0 -0
  245. data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/macro.njk +0 -0
  246. data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/template.njk +0 -0
  247. data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/README.md +0 -0
  248. data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/_summary-list.scss +0 -0
  249. data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/macro-options.json +7 -1
  250. data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/macro.njk +0 -0
  251. data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/template.njk +1 -1
  252. data/node_modules/govuk-frontend/{components → govuk/components}/table/README.md +0 -0
  253. data/node_modules/govuk-frontend/{components → govuk/components}/table/_table.scss +1 -0
  254. data/node_modules/govuk-frontend/{components → govuk/components}/table/macro-options.json +0 -0
  255. data/node_modules/govuk-frontend/{components → govuk/components}/table/macro.njk +0 -0
  256. data/node_modules/govuk-frontend/{components → govuk/components}/table/template.njk +14 -14
  257. data/node_modules/govuk-frontend/{components → govuk/components}/tabs/README.md +0 -0
  258. data/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss +142 -0
  259. data/node_modules/govuk-frontend/{components → govuk/components}/tabs/macro-options.json +0 -0
  260. data/node_modules/govuk-frontend/{components → govuk/components}/tabs/macro.njk +0 -0
  261. data/node_modules/govuk-frontend/{components → govuk/components}/tabs/tabs.js +59 -5
  262. data/node_modules/govuk-frontend/{components → govuk/components}/tabs/template.njk +4 -6
  263. data/node_modules/govuk-frontend/{components → govuk/components}/tag/README.md +0 -0
  264. data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +44 -0
  265. data/node_modules/govuk-frontend/{components → govuk/components}/tag/macro-options.json +0 -0
  266. data/node_modules/govuk-frontend/{components → govuk/components}/tag/macro.njk +0 -0
  267. data/node_modules/govuk-frontend/{components → govuk/components}/tag/template.njk +0 -0
  268. data/node_modules/govuk-frontend/{components → govuk/components}/textarea/README.md +0 -0
  269. data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +55 -0
  270. data/node_modules/govuk-frontend/{components → govuk/components}/textarea/macro-options.json +6 -0
  271. data/node_modules/govuk-frontend/{components → govuk/components}/textarea/macro.njk +0 -0
  272. data/node_modules/govuk-frontend/{components → govuk/components}/textarea/template.njk +1 -1
  273. data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/README.md +0 -0
  274. data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/_warning-text.scss +0 -0
  275. data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/macro-options.json +0 -0
  276. data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/macro.njk +0 -0
  277. data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/template.njk +0 -0
  278. data/node_modules/govuk-frontend/{core → govuk/core}/_all.scss +0 -0
  279. data/node_modules/govuk-frontend/{core → govuk/core}/_global-styles.scss +0 -0
  280. data/node_modules/govuk-frontend/{core → govuk/core}/_links.scss +0 -0
  281. data/node_modules/govuk-frontend/{core → govuk/core}/_lists.scss +0 -0
  282. data/node_modules/govuk-frontend/{core → govuk/core}/_section-break.scss +0 -0
  283. data/node_modules/govuk-frontend/{core → govuk/core}/_template.scss +0 -0
  284. data/node_modules/govuk-frontend/{core → govuk/core}/_typography.scss +0 -0
  285. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_all.scss +1 -1
  286. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_clearfix.scss +0 -0
  287. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_colour.scss +23 -1
  288. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_device-pixels.scss +0 -0
  289. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +28 -0
  290. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +41 -0
  291. data/node_modules/govuk-frontend/govuk/helpers/_grid.scss +60 -0
  292. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_links.scss +15 -1
  293. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_media-queries.scss +0 -0
  294. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_shape-arrow.scss +0 -0
  295. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_spacing.scss +0 -0
  296. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_typography.scss +23 -5
  297. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_visually-hidden.scss +4 -2
  298. data/node_modules/govuk-frontend/{objects → govuk/objects}/_all.scss +0 -0
  299. data/node_modules/govuk-frontend/{objects → govuk/objects}/_form-group.scss +0 -0
  300. data/node_modules/govuk-frontend/{objects → govuk/objects}/_grid.scss +2 -2
  301. data/node_modules/govuk-frontend/{objects → govuk/objects}/_main-wrapper.scss +15 -1
  302. data/node_modules/govuk-frontend/{objects → govuk/objects}/_width-container.scss +0 -0
  303. data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_all.scss +0 -0
  304. data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_display.scss +0 -0
  305. data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_spacing.scss +0 -0
  306. data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_typography.scss +0 -0
  307. data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_width.scss +0 -0
  308. data/node_modules/govuk-frontend/{settings → govuk/settings}/_all.scss +0 -0
  309. data/node_modules/govuk-frontend/{settings → govuk/settings}/_assets.scss +0 -0
  310. data/node_modules/govuk-frontend/{settings → govuk/settings}/_colours-applied.scss +9 -8
  311. data/node_modules/govuk-frontend/{settings → govuk/settings}/_colours-organisations.scss +1 -1
  312. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +101 -0
  313. data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +75 -0
  314. data/node_modules/govuk-frontend/{settings → govuk/settings}/_global-styles.scss +0 -0
  315. data/node_modules/govuk-frontend/{settings → govuk/settings}/_ie8.scss +0 -0
  316. data/node_modules/govuk-frontend/{settings → govuk/settings}/_measurements.scss +2 -2
  317. data/node_modules/govuk-frontend/{settings → govuk/settings}/_media-queries.scss +0 -0
  318. data/node_modules/govuk-frontend/{settings → govuk/settings}/_spacing.scss +0 -0
  319. data/node_modules/govuk-frontend/{settings → govuk/settings}/_typography-font-families.scss +11 -1
  320. data/node_modules/govuk-frontend/{settings → govuk/settings}/_typography-font.scss +27 -7
  321. data/node_modules/govuk-frontend/{settings → govuk/settings}/_typography-responsive.scss +9 -10
  322. data/node_modules/govuk-frontend/{template.njk → govuk/template.njk} +0 -0
  323. data/node_modules/govuk-frontend/{tools → govuk/tools}/_all.scss +0 -0
  324. data/node_modules/govuk-frontend/{tools → govuk/tools}/_compatibility.scss +0 -0
  325. data/node_modules/govuk-frontend/{tools → govuk/tools}/_exports.scss +0 -0
  326. data/node_modules/govuk-frontend/{tools → govuk/tools}/_font-url.scss +0 -0
  327. data/node_modules/govuk-frontend/{tools → govuk/tools}/_ie8.scss +0 -0
  328. data/node_modules/govuk-frontend/{tools → govuk/tools}/_iff.scss +0 -0
  329. data/node_modules/govuk-frontend/{tools → govuk/tools}/_image-url.scss +0 -0
  330. data/node_modules/govuk-frontend/{tools → govuk/tools}/_px-to-em.scss +0 -0
  331. data/node_modules/govuk-frontend/{tools → govuk/tools}/_px-to-rem.scss +0 -0
  332. data/node_modules/govuk-frontend/{utilities → govuk/utilities}/_all.scss +0 -0
  333. data/node_modules/govuk-frontend/{utilities → govuk/utilities}/_clearfix.scss +0 -0
  334. data/node_modules/govuk-frontend/{utilities → govuk/utilities}/_visually-hidden.scss +0 -0
  335. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/_sass-mq.scss +0 -0
  336. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/DOMTokenList.js +0 -0
  337. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Document.js +0 -0
  338. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Element.js +0 -0
  339. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Element/prototype/classList.js +0 -0
  340. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Element/prototype/closest.js +0 -0
  341. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Element/prototype/matches.js +0 -0
  342. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +259 -0
  343. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +257 -0
  344. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Event.js +0 -0
  345. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Function/prototype/bind.js +0 -0
  346. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Object/defineProperty.js +0 -0
  347. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Window.js +0 -0
  348. data/node_modules/govuk-frontend/package.json +21 -21
  349. data/node_modules/react-is/README.md +2 -12
  350. data/node_modules/react-is/build-info.json +5 -5
  351. data/node_modules/react-is/cjs/react-is.development.js +7 -2
  352. data/node_modules/react-is/cjs/react-is.production.min.js +6 -6
  353. data/node_modules/react-is/package.json +13 -13
  354. data/node_modules/react-is/umd/react-is.development.js +7 -2
  355. data/node_modules/react-is/umd/react-is.production.min.js +5 -5
  356. data/node_modules/type/CHANGELOG.md +62 -50
  357. data/node_modules/type/LICENSE +15 -0
  358. data/node_modules/type/README.md +19 -19
  359. data/node_modules/type/error/is.js +28 -7
  360. data/node_modules/type/package.json +36 -22
  361. data/node_modules/type/test/error/is.js +13 -5
  362. metadata +247 -344
  363. data/app/assets/javascripts/govuk_publishing_components/components/accessible-autocomplete.js +0 -79
  364. data/app/assets/stylesheets/govuk_publishing_components/components/_accessible-autocomplete.scss +0 -41
  365. data/app/views/govuk_publishing_components/components/_accessible_autocomplete.html.erb +0 -35
  366. data/app/views/govuk_publishing_components/components/docs/accessible_autocomplete.yml +0 -49
  367. data/node_modules/accessible-autocomplete/CHANGELOG.md +0 -269
  368. data/node_modules/accessible-autocomplete/CONTRIBUTING.md +0 -150
  369. data/node_modules/accessible-autocomplete/LICENSE.txt +0 -20
  370. data/node_modules/accessible-autocomplete/Procfile +0 -1
  371. data/node_modules/accessible-autocomplete/README.md +0 -416
  372. data/node_modules/accessible-autocomplete/accessibility-criteria.md +0 -42
  373. data/node_modules/accessible-autocomplete/app.json +0 -15
  374. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.css +0 -1
  375. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js +0 -2
  376. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js.map +0 -1
  377. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js +0 -2
  378. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js.map +0 -1
  379. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js +0 -2
  380. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js.map +0 -1
  381. data/node_modules/accessible-autocomplete/examples/form.html +0 -671
  382. data/node_modules/accessible-autocomplete/examples/index.html +0 -665
  383. data/node_modules/accessible-autocomplete/examples/multiselect.html +0 -134
  384. data/node_modules/accessible-autocomplete/examples/preact/index.html +0 -346
  385. data/node_modules/accessible-autocomplete/examples/react/index.html +0 -347
  386. data/node_modules/accessible-autocomplete/package-lock.json +0 -14491
  387. data/node_modules/accessible-autocomplete/package.json +0 -173
  388. data/node_modules/accessible-autocomplete/preact.js +0 -1
  389. data/node_modules/accessible-autocomplete/react.js +0 -1
  390. data/node_modules/accessible-autocomplete/scripts/check-staged.js +0 -14
  391. data/node_modules/accessible-autocomplete/src/autocomplete.css +0 -192
  392. data/node_modules/accessible-autocomplete/src/autocomplete.js +0 -618
  393. data/node_modules/accessible-autocomplete/src/dropdown-arrow-down.js +0 -11
  394. data/node_modules/accessible-autocomplete/src/status.js +0 -80
  395. data/node_modules/accessible-autocomplete/src/wrapper.js +0 -76
  396. data/node_modules/accessible-autocomplete/test/functional/dropdown-arrow-down.js +0 -44
  397. data/node_modules/accessible-autocomplete/test/functional/index.js +0 -485
  398. data/node_modules/accessible-autocomplete/test/functional/wrapper.js +0 -318
  399. data/node_modules/accessible-autocomplete/test/integration/index.js +0 -188
  400. data/node_modules/accessible-autocomplete/test/karma.config.js +0 -42
  401. data/node_modules/accessible-autocomplete/test/wdio.config.js +0 -80
  402. data/node_modules/accessible-autocomplete/webpack.config.babel.js +0 -193
  403. data/node_modules/govuk-frontend/assets/fonts/bold-a2452cb66f-v1.woff2 +0 -0
  404. data/node_modules/govuk-frontend/assets/fonts/bold-f38c792ac2-v1.woff +0 -0
  405. data/node_modules/govuk-frontend/assets/fonts/bold-fb2676462a-v1.eot +0 -0
  406. data/node_modules/govuk-frontend/assets/fonts/bold-tabular-357fdfbcc3-v1.eot +0 -0
  407. data/node_modules/govuk-frontend/assets/fonts/bold-tabular-784c21afb8-v1.woff +0 -0
  408. data/node_modules/govuk-frontend/assets/fonts/bold-tabular-b89238d840-v1.woff2 +0 -0
  409. data/node_modules/govuk-frontend/assets/fonts/light-2c037cf7e1-v1.eot +0 -0
  410. data/node_modules/govuk-frontend/assets/fonts/light-458f8ea81c-v1.woff +0 -0
  411. data/node_modules/govuk-frontend/assets/fonts/light-f38ad40456-v1.woff2 +0 -0
  412. data/node_modules/govuk-frontend/assets/fonts/light-tabular-498ea8ffe2-v1.eot +0 -0
  413. data/node_modules/govuk-frontend/assets/fonts/light-tabular-62cc6f0a28-v1.woff +0 -0
  414. data/node_modules/govuk-frontend/assets/fonts/light-tabular-851b10ccdd-v1.woff2 +0 -0
  415. data/node_modules/govuk-frontend/assets/images/icon-arrow-left.png +0 -0
  416. data/node_modules/govuk-frontend/assets/images/icon-important.png +0 -0
  417. data/node_modules/govuk-frontend/assets/images/icon-pointer-2x.png +0 -0
  418. data/node_modules/govuk-frontend/assets/images/icon-pointer.png +0 -0
  419. data/node_modules/govuk-frontend/components/button/template.njk +0 -35
  420. data/node_modules/govuk-frontend/components/file-upload/_file-upload.scss +0 -19
  421. data/node_modules/govuk-frontend/components/tabs/_tabs.scss +0 -130
  422. data/node_modules/govuk-frontend/components/tag/_tag.scss +0 -33
  423. data/node_modules/govuk-frontend/components/textarea/_textarea.scss +0 -32
  424. data/node_modules/govuk-frontend/helpers/_focusable.scss +0 -34
  425. data/node_modules/govuk-frontend/helpers/_font-faces.scss +0 -67
  426. data/node_modules/govuk-frontend/helpers/_grid.scss +0 -107
  427. data/node_modules/govuk-frontend/settings/_colours-palette.scss +0 -37
  428. data/node_modules/govuk-frontend/settings/_compatibility.scss +0 -51
  429. data/node_modules/preact/LICENSE +0 -21
  430. data/node_modules/preact/README.md +0 -592
  431. data/node_modules/preact/debug.js +0 -740
  432. data/node_modules/preact/debug.js.map +0 -1
  433. data/node_modules/preact/debug/dist/debug.js +0 -2
  434. data/node_modules/preact/debug/dist/debug.js.map +0 -1
  435. data/node_modules/preact/debug/dist/debug.mjs +0 -681
  436. data/node_modules/preact/debug/dist/debug.mjs.map +0 -1
  437. data/node_modules/preact/debug/dist/debug.module.js +0 -2
  438. data/node_modules/preact/debug/dist/debug.module.js.map +0 -1
  439. data/node_modules/preact/debug/dist/debug.umd.js +0 -2
  440. data/node_modules/preact/debug/dist/debug.umd.js.map +0 -1
  441. data/node_modules/preact/debug/index.js +0 -122
  442. data/node_modules/preact/devtools.js +0 -403
  443. data/node_modules/preact/devtools.js.map +0 -1
  444. data/node_modules/preact/devtools/devtools.js +0 -395
  445. data/node_modules/preact/devtools/index.js +0 -4
  446. data/node_modules/preact/dist/preact.d.ts +0 -1712
  447. data/node_modules/preact/dist/preact.dev.js +0 -727
  448. data/node_modules/preact/dist/preact.dev.js.map +0 -1
  449. data/node_modules/preact/dist/preact.js +0 -414
  450. data/node_modules/preact/dist/preact.js.flow +0 -25
  451. data/node_modules/preact/dist/preact.js.map +0 -1
  452. data/node_modules/preact/dist/preact.min.js +0 -2
  453. data/node_modules/preact/dist/preact.min.js.map +0 -1
  454. data/node_modules/preact/dist/preact.mjs +0 -724
  455. data/node_modules/preact/dist/preact.mjs.map +0 -1
  456. data/node_modules/preact/dist/preact.umd.js +0 -751
  457. data/node_modules/preact/dist/preact.umd.js.map +0 -1
  458. data/node_modules/preact/package.json +0 -226
  459. data/node_modules/preact/src/clone-element.js +0 -18
  460. data/node_modules/preact/src/component.js +0 -90
  461. data/node_modules/preact/src/constants.js +0 -17
  462. data/node_modules/preact/src/dom/index.js +0 -139
  463. data/node_modules/preact/src/h.js +0 -86
  464. data/node_modules/preact/src/options.js +0 -22
  465. data/node_modules/preact/src/preact.d.ts +0 -1712
  466. data/node_modules/preact/src/preact.js +0 -32
  467. data/node_modules/preact/src/preact.js.flow +0 -25
  468. data/node_modules/preact/src/render-queue.js +0 -27
  469. data/node_modules/preact/src/render.js +0 -22
  470. data/node_modules/preact/src/util.js +0 -30
  471. data/node_modules/preact/src/vdom/component-recycler.js +0 -48
  472. data/node_modules/preact/src/vdom/component.js +0 -296
  473. data/node_modules/preact/src/vdom/diff.js +0 -337
  474. data/node_modules/preact/src/vdom/index.js +0 -54
  475. data/node_modules/preact/src/vnode.js +0 -9
  476. data/node_modules/preact/typings.json +0 -5
@@ -1,150 +0,0 @@
1
- # Contributing
2
-
3
- Contributions welcome, please raise a pull request.
4
-
5
- If you want to help and want to get more familiar with the codebase, try starting with the ["good for beginners"](https://github.com/alphagov/accessible-autocomplete/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+for+beginners%22) issues. Feel free to request more guidance in the issue comments.
6
-
7
- ## Requirements
8
-
9
- You will need a recent version of Node and npm installed:
10
-
11
- ```bash
12
- $ node -v
13
- v7.10.0
14
- $ npm -v
15
- v5.0.0
16
- ```
17
-
18
- If you want to run the selenium tests, you will also need a local copy of the Java Development Kit:
19
-
20
- ```bash
21
- $ java -version
22
- java version "1.8.0_131"
23
- Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
24
- Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
25
- ```
26
-
27
- To install Node (with npm) and Java locally on macOS, you can use [brew](https://brew.sh/):
28
-
29
- ```bash
30
- brew install node
31
- brew cask install java
32
- ```
33
-
34
- ## Project structure
35
-
36
- ```
37
- $ ls
38
- coverage/ # Gets outputted by the tests, `open html/src/index.html` to see latest coverage reports.
39
- dist/ # The compiled and ready to distribute build artefacts.
40
- screenshots/ # Gets outputted by the end to end tests when something goes wrong.
41
- examples/ # GitHub pages examples of using the autocomplete.
42
- scripts/ # Build scripts that don't fit in `package.json`.
43
- src/ # The source code for the library.
44
- test/ # The tests for the library.
45
- ```
46
-
47
- ## Build tasks
48
-
49
- To develop locally:
50
-
51
- ```bash
52
- npm install
53
- npm run dev
54
- ```
55
-
56
- Contributions will need to pass the linter and tests. To run everything once:
57
-
58
- ```bash
59
- npm test
60
- ```
61
-
62
- To run the linter on its own:
63
-
64
- ```bash
65
- npm run standard
66
- ```
67
-
68
- To run the functional tests in dev mode (automatically reruns when a file changes):
69
-
70
- ```bash
71
- npm run karma:dev
72
- ```
73
-
74
- To run the integration tests locally with Chrome (specified in [wdio.config.js](test/wdio.config.js)):
75
-
76
- ```bash
77
- npm run wdio
78
- ```
79
-
80
- To run the integration tests on [Sauce Labs](https://saucelabs.com/), create a `.env` file with the following:
81
-
82
- ```bash
83
- SAUCE_ENABLED="true"
84
- SAUCE_USERNAME="XXXXXXXX"
85
- SAUCE_ACCESS_KEY="YYYYYYYY"
86
- ```
87
-
88
- And run the same command:
89
-
90
- ```bash
91
- npm run wdio
92
- ```
93
-
94
- Failed integration tests should output screenshots to the `./screenshots/` folder.
95
-
96
- To build the project for distribution:
97
-
98
- ```bash
99
- npm run build
100
- ```
101
-
102
- You should do this and commit it before you attempt to `git push`, otherwise the prepush checks will prevent you from pushing.
103
-
104
- ## Prepush checks
105
-
106
- When you push to a branch, git will run a `npm run prepush` [script](scripts/check-staged.js) that will compile the build on your behalf to the `dist/` folder. If it then finds unstaged files in `dist/`, it will fail your push.
107
-
108
- The solution is to commit the files, preferably as part of a separate commit:
109
-
110
- ```bash
111
- npm run build
112
- git add dist/
113
- git commit -m "Rebuild dist"
114
- git push
115
- ```
116
-
117
- If you want to ignore the checks and push regardless:
118
-
119
- ```bash
120
- git push --no-verify
121
- ```
122
-
123
- ## PR nice to haves
124
-
125
- - Tests for your feature or fix
126
- - Updates to the README.md when necessary
127
- - A 1 line update in CHANGELOG.md describing your changes
128
-
129
- ## Cutting a new release
130
-
131
- `git pull --rebase` and then run:
132
-
133
- ```bash
134
- git checkout -b "v1.2.3"
135
- vim CHANGELOG.md # Update CHANGELOG, put all unreleased changes under new heading.
136
- git commit -am "Update CHANGELOG"
137
- npm version <major|minor|patch> -m "## 1.2.3 - 2017-01-13
138
-
139
- - Change included in this release
140
- - Another change included in this release"
141
- git push --tags --set-upstream origin refs/heads/v1.2.3:refs/heads/v1.2.3
142
- ```
143
-
144
- To actually publish, you will need access to an `npm` account that owns `accessible-autocomplete`. Merge the version PR and then run:
145
-
146
- ```bash
147
- git checkout master
148
- git pull --rebase
149
- npm publish
150
- ```
@@ -1,20 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2017 Crown Copyright (Government Digital Service)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the "Software"), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
- the Software, and to permit persons to whom the Software is furnished to do so,
10
- subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1 +0,0 @@
1
- web: python -m SimpleHTTPServer $PORT
@@ -1,416 +0,0 @@
1
- # Accessible autocomplete
2
-
3
- [![npm version](https://img.shields.io/npm/v/accessible-autocomplete.svg)](http://npm.im/accessible-autocomplete)
4
- [![Build Status](https://travis-ci.org/alphagov/accessible-autocomplete.svg?branch=master)](https://travis-ci.org/alphagov/accessible-autocomplete)
5
- [![Coverage Status](https://coveralls.io/repos/github/alphagov/accessible-autocomplete/badge.svg?branch=master)](https://coveralls.io/github/alphagov/accessible-autocomplete?branch=master)
6
- [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
7
- [![Greenkeeper badge](https://badges.greenkeeper.io/alphagov/accessible-autocomplete.svg)](https://greenkeeper.io/)
8
- [![gzip size](http://img.badgesize.io/https://unpkg.com/accessible-autocomplete/dist/accessible-autocomplete.min.js?compression=gzip)](https://unpkg.com/accessible-autocomplete/dist/accessible-autocomplete.min.js)
9
-
10
- [![Sauce Labs Build Status](https://saucelabs.com/browser-matrix/tvararu-alphagov.svg)](https://saucelabs.com/u/tvararu-alphagov)
11
-
12
- `accessible-autocomplete` is a JavaScript autocomplete built from the ground up to be accessible. The design goals are:
13
-
14
- - **Accessibility**: Following WAI-ARIA best practices and testing with assistive technologies.
15
- - **User experience**: Supporting a wide variety of user needs.
16
- - **Compatibility**: Working with as many browsers, devices, and assistive technologies as possible.
17
-
18
- [Try out the examples!](https://alphagov.github.io/accessible-autocomplete/examples/)
19
-
20
- ## Installation / usage
21
-
22
- ### Using npm and a module system
23
-
24
- Install it by running:
25
-
26
- ```bash
27
- npm install --save accessible-autocomplete
28
- ```
29
-
30
- The `accessibleAutocomplete` function will render an autocomplete `<input>` and its accompanying suggestions and `aria-live` region. Your page should provide a `<label>` and a container element:
31
-
32
- ```html
33
- <label for="my-autocomplete">Select your country</label>
34
- <div id="my-autocomplete-container"></div>
35
- ```
36
-
37
- Then import it using a module system like Browserify / Webpack / Rollup, and call the `accessibleAutocomplete` function, providing an array of values:
38
-
39
- ```js
40
- import accessibleAutocomplete from 'accessible-autocomplete'
41
-
42
- const countries = [
43
- 'France',
44
- 'Germany',
45
- 'United Kingdom'
46
- ]
47
-
48
- accessibleAutocomplete({
49
- element: document.querySelector('#my-autocomplete-container'),
50
- id: 'my-autocomplete', // To match it to the existing <label>.
51
- source: countries
52
- })
53
- ```
54
-
55
- If you want to use it as a replacement for a `<select>` element, read the [Progressive enhancement](#progressive-enhancement) section.
56
-
57
- ### As a plain JavaScript module
58
-
59
- You can copy the [dist/accessible-autocomplete.min.js](dist/accessible-autocomplete.min.js) file to your JavaScript folder and import it into the browser:
60
-
61
- ```html
62
- <script type="text/javascript" src="assets/js/accessible-autocomplete.min.js"></script>
63
- ```
64
-
65
- ### Styling the autocomplete
66
-
67
- A stylesheet is included with the package at [dist/accessible-autocomplete.min.css](dist/accessible-autocomplete.min.css).
68
-
69
- You can copy it to your stylesheets folder and import it into the browser:
70
-
71
- ```html
72
- <link rel="stylesheet" href="assets/css/accessible-autocomplete.min.css" />
73
- ```
74
-
75
- You can also import it using Sass:
76
-
77
- ```css
78
- @import "accessible-autocomplete";
79
- ```
80
-
81
- ### Using with Preact
82
-
83
- If you already use Preact in your application, you can import a bundle that will use that:
84
-
85
- ```js
86
- import preact from 'preact'
87
- import Autocomplete from 'accessible-autocomplete/preact'
88
-
89
- preact.render(
90
- <Autocomplete id='autocomplete' source={suggest} />,
91
- document.querySelector('#container')
92
- )
93
- ```
94
-
95
- [Try out the Preact example!](https://alphagov.github.io/accessible-autocomplete/examples/preact/)
96
-
97
- ### Using with React
98
-
99
- If you already use React in your application, you can import a bundle that will use that:
100
-
101
- ```js
102
- import React from 'react'
103
- import ReactDOM from 'react-dom'
104
- import Autocomplete from 'accessible-autocomplete/react'
105
-
106
- ReactDOM.render(
107
- <Autocomplete id='autocomplete' source={suggest} />,
108
- document.querySelector('#container')
109
- )
110
- ```
111
-
112
- [Try out the React example!](https://alphagov.github.io/accessible-autocomplete/examples/react/)
113
-
114
- #### React versions
115
-
116
- React v15.5.4 has been tested to work with the Accessible Autocomplete - although make sure to check
117
- out [documented issues](https://github.com/alphagov/accessible-autocomplete/issues).
118
-
119
- React v15.6.2 and 16.0 have been incompletely tested with the Accessible Autocomplete: while no undocumented issues were found, we recommend you carry out thorough testing if you wish to use these or later versions of React.
120
-
121
- ## API documentation
122
-
123
- ### Required options
124
-
125
- #### `element`
126
-
127
- Type: `HTMLElement`
128
-
129
- The container element in which the autocomplete will be rendered in.
130
-
131
- #### `id`
132
-
133
- Type: `string`
134
-
135
- The `id` to assign to the autocomplete input field, to use with a `<label for=id>`. Not required if using `enhanceSelectElement`.
136
-
137
- #### `source`
138
-
139
- Type: `Array | Function`
140
-
141
- An array of values to search when the user types in the input field, or a function to take what the user types and call a callback function with the results to be displayed.
142
-
143
- An example of an array of values:
144
-
145
- ```js
146
- const countries = [
147
- 'France',
148
- 'Germany',
149
- 'United Kingdom'
150
- ]
151
- ```
152
-
153
- If `source` is a function, the arguments are: `query: string, populateResults: Function`
154
-
155
- Similar to the [`source` argument for typeahead.js](https://github.com/corejavascript/typeahead.js/blob/47d46b40cb834d8285ac9328c4b436e5eccf7197/doc/jquery_typeahead.md#datasets), a backing data source for suggestions. `query` is what gets typed into the input field, which will callback to `populateResults` synchronously with the array of string results to display in the menu.
156
-
157
- An example of a simple suggestion engine:
158
-
159
- ```js
160
- function suggest (query, populateResults) {
161
- const results = [
162
- 'France',
163
- 'Germany',
164
- 'United Kingdom'
165
- ]
166
- const filteredResults = results.filter(result => result.indexOf(query) !== -1)
167
- populateResults(filteredResults)
168
- }
169
- ```
170
-
171
- ### Other options
172
-
173
- #### `autoselect` (default: `false`)
174
-
175
- Type: `Boolean`
176
-
177
- Set to true to highlight the first option when the user types in something and receives results. Pressing enter will select it.
178
-
179
- #### `confirmOnBlur` (default: `true`)
180
-
181
- Type: `Boolean`
182
-
183
- The autocomplete will confirm the currently selected option when the user clicks outside of the component. Set to `false` to disable.
184
-
185
- #### `cssNamespace` (default: `'autocomplete'`)
186
-
187
- Type: `string`
188
-
189
- Use this property to override the [BEM](http://getbem.com/) block name that the JavaScript component will use. You will need to rewrite the CSS class names to use your specified block name.
190
-
191
- #### `defaultValue` (default: `''`)
192
-
193
- Type: `string`
194
-
195
- Specify a string to prefill the autocomplete with.
196
-
197
- #### `displayMenu` (default: `'inline'`)
198
-
199
- Type: `'inline' | 'overlay'`
200
-
201
- You can set this property to specify the way the menu should appear, whether inline or as an overlay.
202
-
203
- #### `minLength` (default: `0`)
204
-
205
- Type: `number`
206
-
207
- The minimum number of characters that should be entered before the autocomplete will attempt to suggest options. When the query length is under this, the aria status region will also provide helpful text to the user informing them they should type in more.
208
-
209
- #### `name` (default: `'input-autocomplete'`)
210
-
211
- Type: `string`
212
-
213
- The `name` for the autocomplete input field, to use with a parent `<form>`.
214
-
215
- #### `onConfirm` (default: `() => {}`)
216
-
217
- Type: `Function`
218
-
219
- Arguments: `confirmed: Object`
220
-
221
- This function will be called when the user confirms an option, with the option they've confirmed.
222
-
223
- #### `placeholder` (default: `''`) :warning: not recommended :warning:
224
-
225
- Type: `string`
226
-
227
- This option will populate the `placeholder` attribute on the input element.
228
-
229
- We think [placeholders have usability issues](http://adamsilver.io/articles/placeholders-are-problematic/) and that there are [better alternatives to input placeholder text](https://govuk-elements.herokuapp.com/form-elements/#form-hint-text), so we do not recommend using this option.
230
-
231
- #### `required` (default: `false`)
232
-
233
- Type: `Boolean`
234
-
235
- The input field will be rendered with a `required` attribute, see [W3C `required` attribute definition](https://www.w3.org/TR/html5/forms.html#the-required-attribute).
236
-
237
- #### `showAllValues` (default: `false`)
238
-
239
- Type: `Boolean`
240
-
241
- If this is set to `true`, all values are shown when the user clicks the input. This is similar
242
- to a default dropdown, so the autocomplete is rendered with a dropdown arrow to convey
243
- this behaviour.
244
-
245
- #### `showNoOptionsFound` (default: `true`)
246
-
247
- Type: `Boolean`
248
-
249
- The autocomplete will display a "No results found" template when there are no results. Set to `false` to disable.
250
-
251
- #### `templates` (default: `undefined`)
252
-
253
- Type:
254
-
255
- ```js
256
- {
257
- inputValue: Function,
258
- suggestion: Function
259
- }
260
- ```
261
-
262
- This object defines templates (functions) that are used for displaying parts of the autocomplete.
263
-
264
- `inputValue` is a function that receives one argument, the currently selected suggestion. It returns the string value to be inserted into the input.
265
-
266
- `suggestion` is a function that receives one argument, a suggestion to be displayed. It is used when rendering suggestions, and should return a string, which can contain HTML. :warning: **Caution:** because this function allows you to output arbitrary HTML, you should [make sure it's trusted](https://en.wikipedia.org/wiki/Cross-site_scripting), and accessible.
267
-
268
- #### `dropdownArrow` (default: A rectangle pointing down)
269
-
270
- Type: `Function`
271
-
272
- A function that gets passed an object with the property `className` (`{ className: '' }`) and should return a string of HTML or a (P)React element. :warning: **Caution:** because this function allows you to output arbitrary HTML, you should [make sure it's trusted](https://en.wikipedia.org/wiki/Cross-site_scripting), and accessible.
273
-
274
- ### Internationalization
275
-
276
- #### `tNoResults` (default: `() => 'No results found'`)
277
-
278
- Type: `Function`
279
-
280
- A function that receives no arguments and should return the text used in the dropdown to indicate that there are no results.
281
-
282
- #### `tStatusQueryTooShort` (default: `` (minQueryLength) => `Type in ${minQueryLength} or more characters for results.` ``)
283
-
284
- Type: `Function`
285
-
286
- A function that receives one argument that indicates the minimal amount of characters needed for the dropdown to trigger and should return the text used in the accessibility hint to indicate that the query is too short.
287
-
288
- #### `tStatusNoResults` (default: `() => 'No search results.'`)
289
-
290
- Type: `Function`
291
-
292
- A function that receives no arguments and should return the text that is used in the accessibility hint to indicate that there are no results.
293
-
294
- #### `tStatusSelectedOption` (default: `` (selectedOption, length, index) => `${selectedOption} (${index + 1} of ${length}) is selected.` ``)
295
-
296
- Type: `Function`
297
-
298
- A function that receives two arguments, the selectedOption and the amount of available options, and it should return the text used in the accessibility hint to indicate which option is selected.
299
-
300
- #### `tStatusResults`
301
-
302
- Default:
303
-
304
- ```js
305
- (length, contentSelectedOption) => {
306
- const words = {
307
- result: (length === 1) ? 'result' : 'results',
308
- is: (length === 1) ? 'is' : 'are'
309
- }
310
-
311
- return <span>{length} {words.result} {words.is} available. {contentSelectedOption}</span>
312
- }
313
- ```
314
-
315
- Type: `Function`
316
-
317
- A function that receives two arguments, the count of available options and the return value of `tStatusSelectedOption`, and should return the text used in the accessibility hint to indicate which options are available and which is selected.
318
-
319
- ## Progressive enhancement
320
-
321
- If your autocomplete is meant to select from a small list of options (a few hundred), we strongly suggest that you render a `<select>` menu on the server, and use progressive enhancement.
322
-
323
- If you have the following HTML:
324
-
325
- ```html
326
- <select id="location-picker">
327
- <option value="fr">France</option>
328
- <option value="de">Germany</option>
329
- <option value="gb">United Kingdom</option>
330
- </select>
331
- ```
332
-
333
- You can use the `accessibleAutocomplete.enhanceSelectElement` function to enhance it into an autocomplete:
334
-
335
- ```js
336
- accessibleAutocomplete.enhanceSelectElement({
337
- selectElement: document.querySelector('#location-picker')
338
- })
339
- ```
340
-
341
- This will:
342
-
343
- - Place an autocomplete input field after the specified `<select>`
344
- - Default the autocomplete `autoselect` to `true`
345
- - Default the autocomplete `defaultValue` to the select's `option[selected]`
346
- - Default the autocomplete `id` to the `<select>`'s `id`
347
- - Default the autocomplete `name` attribute to `''` to prevent it being included in form submissions
348
- - Default the autocomplete `source` to use existing `<option>`s from the `<select>`
349
- - Hide the `<select>` using inline `display: none`
350
- - Set the `<select>`'s `id` to `${id}-select` to decouple from any `<label>`
351
- - Upon confirming a value in the autocomplete, update the original `<select>`
352
-
353
- This function takes the same options as `accessibleAutocomplete`, with the only difference being that it uses `selectElement` instead of `element`, which needs to be an instance of `HTMLSelectElement`.
354
-
355
- > **Note**: The `accessibleAutocomplete.enhanceSelectElement` function is fairly light and wraps the public API for `accessibleAutocomplete`. If your use case doesn't fit the above defaults, try [reading the source](src/wrapper.js) and seeing if you can write your own.
356
-
357
- ### Null options
358
-
359
- If your `<select>` element has a "null" option - a default option with no value - then you can pass a `defaultValue` option to `enhanceSelectElement` which will replace the label of this option when it is selected.
360
-
361
- With the following HTML:
362
-
363
- ```html
364
- <select id="location-picker">
365
- <option value="">Select a country</option>
366
- <option value="fr">France</option>
367
- <option value="de">Germany</option>
368
- <option value="gb">United Kingdom</option>
369
- </select>
370
- ```
371
-
372
- Then passing a `defaultValue` option of `''` will then leave the autocomplete blank if the null option is selected.
373
-
374
- ```js
375
- accessibleAutocomplete.enhanceSelectElement({
376
- defaultValue: '',
377
- selectElement: document.querySelector('#location-picker')
378
- })
379
- ```
380
-
381
- Any null options will also be filtered out of the options used to populate the `source` of the autocomplete element. To preserve options with no value in the autcomplete then pass a `preserveNullOptions` flag of `true` to `enhanceSelectElement`.
382
-
383
- ## Analytics and tracking
384
-
385
- The following events get triggered on the input element during the life cycle of the autocomplete:
386
-
387
- - `onConfirm` - This function will be called when the user confirms an option, with the option they've chosen.
388
-
389
- Example usage:
390
-
391
- ```js
392
- accessibleAutocomplete({
393
- // additional options
394
- onConfirm: (val) => {
395
- track(val)
396
- }
397
- })
398
- ```
399
-
400
- ## Why another autocomplete?
401
-
402
- `accessible-autocomplete` was built after studying many existing solutions and prototyping patches to fix user experience or accessibility issues. It draws heavy inspiration from the following (and a lot of others):
403
-
404
- - [ljwatson/design-patterns](http://ljwatson.github.io/design-patterns/autocomplete/index.html): great accessible experience
405
- - [corejavascript/corejs-typeahead](https://github.com/corejavascript/typeahead.js): flexible autocomplete/suggestion engine architecture
406
- - [JamieAppleseed/selectToAutocomplete](https://github.com/JamieAppleseed/selectToAutocomplete): ease of use
407
-
408
- ## Developing locally
409
-
410
- Check out the [CONTRIBUTING](CONTRIBUTING.md) guide for instructions.
411
-
412
- If you want to help and want to get more familiar with the codebase, try starting with the ["good for beginners"](https://github.com/alphagov/accessible-autocomplete/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+for+beginners%22) issues.
413
-
414
- ## License
415
-
416
- [MIT](LICENSE.txt).