govuk_publishing_components 9.3.6 → 9.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -0
  3. data/app/assets/stylesheets/component_guide/application.scss +10 -0
  4. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
  5. data/app/assets/stylesheets/govuk_publishing_components/admin_styles.scss +13 -0
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +66 -0
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +1 -0
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-admin.scss +1 -0
  9. data/app/models/govuk_publishing_components/component_doc.rb +12 -0
  10. data/app/views/govuk_publishing_components/component_guide/component_doc/_preview.html.erb +7 -5
  11. data/app/views/govuk_publishing_components/component_guide/show.html.erb +22 -0
  12. data/app/views/govuk_publishing_components/components/_highlight_boxes.html.erb +39 -0
  13. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +26 -0
  14. data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +10 -0
  15. data/app/views/govuk_publishing_components/components/docs/highlight_boxes.yml +142 -0
  16. data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +12 -0
  17. data/app/views/govuk_publishing_components/components/docs/layout_for_admin.yml +28 -0
  18. data/app/views/govuk_publishing_components/components/docs/metadata.yml +1 -0
  19. data/app/views/layouts/govuk_publishing_components/application.html.erb +5 -0
  20. data/config/initializers/assets.rb +12 -0
  21. data/lib/govuk_publishing_components.rb +1 -0
  22. data/lib/govuk_publishing_components/presenters/highlight_boxes_helper.rb +13 -0
  23. data/lib/govuk_publishing_components/presenters/meta_tags.rb +1 -0
  24. data/lib/govuk_publishing_components/version.rb +1 -1
  25. data/node_modules/govuk-frontend/README.md +96 -0
  26. data/node_modules/govuk-frontend/all-ie8.scss +6 -0
  27. data/node_modules/govuk-frontend/all.js +1720 -0
  28. data/node_modules/govuk-frontend/all.scss +11 -0
  29. data/node_modules/govuk-frontend/assets/fonts/bold-a2452cb66f-v1.woff2 +0 -0
  30. data/node_modules/govuk-frontend/assets/fonts/bold-f38c792ac2-v1.woff +0 -0
  31. data/node_modules/govuk-frontend/assets/fonts/bold-fb2676462a-v1.eot +0 -0
  32. data/node_modules/govuk-frontend/assets/fonts/bold-tabular-357fdfbcc3-v1.eot +0 -0
  33. data/node_modules/govuk-frontend/assets/fonts/bold-tabular-784c21afb8-v1.woff +0 -0
  34. data/node_modules/govuk-frontend/assets/fonts/bold-tabular-b89238d840-v1.woff2 +0 -0
  35. data/node_modules/govuk-frontend/assets/fonts/light-2c037cf7e1-v1.eot +0 -0
  36. data/node_modules/govuk-frontend/assets/fonts/light-458f8ea81c-v1.woff +0 -0
  37. data/node_modules/govuk-frontend/assets/fonts/light-f38ad40456-v1.woff2 +0 -0
  38. data/node_modules/govuk-frontend/assets/fonts/light-tabular-498ea8ffe2-v1.eot +0 -0
  39. data/node_modules/govuk-frontend/assets/fonts/light-tabular-62cc6f0a28-v1.woff +0 -0
  40. data/node_modules/govuk-frontend/assets/fonts/light-tabular-851b10ccdd-v1.woff2 +0 -0
  41. data/node_modules/govuk-frontend/assets/images/favicon.ico +0 -0
  42. data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon-152x152.png +0 -0
  43. data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon-167x167.png +0 -0
  44. data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon-180x180.png +0 -0
  45. data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon.png +0 -0
  46. data/node_modules/govuk-frontend/assets/images/govuk-crest-2x.png +0 -0
  47. data/node_modules/govuk-frontend/assets/images/govuk-crest.png +0 -0
  48. data/node_modules/govuk-frontend/assets/images/govuk-logotype-crown.png +0 -0
  49. data/node_modules/govuk-frontend/assets/images/govuk-mask-icon.svg +7 -0
  50. data/node_modules/govuk-frontend/assets/images/govuk-opengraph-image.png +0 -0
  51. data/node_modules/govuk-frontend/assets/images/icon-arrow-left.png +0 -0
  52. data/node_modules/govuk-frontend/assets/images/icon-important.png +0 -0
  53. data/node_modules/govuk-frontend/assets/images/icon-pointer-2x.png +0 -0
  54. data/node_modules/govuk-frontend/assets/images/icon-pointer.png +0 -0
  55. data/node_modules/govuk-frontend/common.js +39 -0
  56. data/node_modules/govuk-frontend/components/_all.scss +26 -0
  57. data/node_modules/govuk-frontend/components/back-link/README.md +142 -0
  58. data/node_modules/govuk-frontend/components/back-link/_back-link.scss +54 -0
  59. data/node_modules/govuk-frontend/components/back-link/back-link.njk +3 -0
  60. data/node_modules/govuk-frontend/components/back-link/macro.njk +3 -0
  61. data/node_modules/govuk-frontend/components/back-link/template.njk +2 -0
  62. data/node_modules/govuk-frontend/components/breadcrumbs/README.md +335 -0
  63. data/node_modules/govuk-frontend/components/breadcrumbs/_breadcrumbs.scss +119 -0
  64. data/node_modules/govuk-frontend/components/breadcrumbs/breadcrumbs.njk +14 -0
  65. data/node_modules/govuk-frontend/components/breadcrumbs/macro.njk +3 -0
  66. data/node_modules/govuk-frontend/components/breadcrumbs/template.njk +13 -0
  67. data/node_modules/govuk-frontend/components/button/README.md +319 -0
  68. data/node_modules/govuk-frontend/components/button/_button.scss +185 -0
  69. data/node_modules/govuk-frontend/components/button/button.js +548 -0
  70. data/node_modules/govuk-frontend/components/button/button.njk +3 -0
  71. data/node_modules/govuk-frontend/components/button/macro.njk +3 -0
  72. data/node_modules/govuk-frontend/components/button/template.njk +35 -0
  73. data/node_modules/govuk-frontend/components/checkboxes/README.md +782 -0
  74. data/node_modules/govuk-frontend/components/checkboxes/_checkboxes.scss +151 -0
  75. data/node_modules/govuk-frontend/components/checkboxes/checkboxes.js +730 -0
  76. data/node_modules/govuk-frontend/components/checkboxes/checkboxes.njk +27 -0
  77. data/node_modules/govuk-frontend/components/checkboxes/macro.njk +3 -0
  78. data/node_modules/govuk-frontend/components/checkboxes/template.njk +86 -0
  79. data/node_modules/govuk-frontend/components/date-input/README.md +640 -0
  80. data/node_modules/govuk-frontend/components/date-input/_date-input.scss +35 -0
  81. data/node_modules/govuk-frontend/components/date-input/date-input.njk +23 -0
  82. data/node_modules/govuk-frontend/components/date-input/macro.njk +3 -0
  83. data/node_modules/govuk-frontend/components/date-input/template.njk +76 -0
  84. data/node_modules/govuk-frontend/components/details/README.md +237 -0
  85. data/node_modules/govuk-frontend/components/details/_details.scss +86 -0
  86. data/node_modules/govuk-frontend/components/details/details.js +836 -0
  87. data/node_modules/govuk-frontend/components/details/details.njk +7 -0
  88. data/node_modules/govuk-frontend/components/details/implementation.md +43 -0
  89. data/node_modules/govuk-frontend/components/details/macro.njk +3 -0
  90. data/node_modules/govuk-frontend/components/details/template.njk +10 -0
  91. data/node_modules/govuk-frontend/components/error-message/README.md +143 -0
  92. data/node_modules/govuk-frontend/components/error-message/_error-message.scss +15 -0
  93. data/node_modules/govuk-frontend/components/error-message/error-message.njk +7 -0
  94. data/node_modules/govuk-frontend/components/error-message/macro.njk +3 -0
  95. data/node_modules/govuk-frontend/components/error-message/template.njk +3 -0
  96. data/node_modules/govuk-frontend/components/error-summary/README.md +215 -0
  97. data/node_modules/govuk-frontend/components/error-summary/_error-summary.scss +68 -0
  98. data/node_modules/govuk-frontend/components/error-summary/error-summary.js +520 -0
  99. data/node_modules/govuk-frontend/components/error-summary/error-summary.njk +17 -0
  100. data/node_modules/govuk-frontend/components/error-summary/macro.njk +3 -0
  101. data/node_modules/govuk-frontend/components/error-summary/template.njk +25 -0
  102. data/node_modules/govuk-frontend/components/fieldset/README.md +213 -0
  103. data/node_modules/govuk-frontend/components/fieldset/_fieldset.scss +58 -0
  104. data/node_modules/govuk-frontend/components/fieldset/fieldset.njk +13 -0
  105. data/node_modules/govuk-frontend/components/fieldset/macro.njk +3 -0
  106. data/node_modules/govuk-frontend/components/fieldset/template.njk +17 -0
  107. data/node_modules/govuk-frontend/components/file-upload/README.md +332 -0
  108. data/node_modules/govuk-frontend/components/file-upload/_file-upload.scss +19 -0
  109. data/node_modules/govuk-frontend/components/file-upload/file-upload.njk +9 -0
  110. data/node_modules/govuk-frontend/components/file-upload/macro.njk +3 -0
  111. data/node_modules/govuk-frontend/components/file-upload/template.njk +42 -0
  112. data/node_modules/govuk-frontend/components/footer/README.md +284 -0
  113. data/node_modules/govuk-frontend/components/footer/_footer.scss +216 -0
  114. data/node_modules/govuk-frontend/components/footer/footer.njk +3 -0
  115. data/node_modules/govuk-frontend/components/footer/macro.njk +3 -0
  116. data/node_modules/govuk-frontend/components/footer/template.njk +80 -0
  117. data/node_modules/govuk-frontend/components/header/README.md +524 -0
  118. data/node_modules/govuk-frontend/components/header/_header.scss +285 -0
  119. data/node_modules/govuk-frontend/components/header/header.js +717 -0
  120. data/node_modules/govuk-frontend/components/header/header.njk +3 -0
  121. data/node_modules/govuk-frontend/components/header/macro.njk +3 -0
  122. data/node_modules/govuk-frontend/components/header/template.njk +82 -0
  123. data/node_modules/govuk-frontend/components/hint/README.md +157 -0
  124. data/node_modules/govuk-frontend/components/hint/_hint.scss +29 -0
  125. data/node_modules/govuk-frontend/components/hint/hint.njk +7 -0
  126. data/node_modules/govuk-frontend/components/hint/macro.njk +3 -0
  127. data/node_modules/govuk-frontend/components/hint/template.njk +4 -0
  128. data/node_modules/govuk-frontend/components/input/README.md +416 -0
  129. data/node_modules/govuk-frontend/components/input/_input.scss +62 -0
  130. data/node_modules/govuk-frontend/components/input/input.njk +9 -0
  131. data/node_modules/govuk-frontend/components/input/macro.njk +3 -0
  132. data/node_modules/govuk-frontend/components/input/template.njk +42 -0
  133. data/node_modules/govuk-frontend/components/inset-text/README.md +157 -0
  134. data/node_modules/govuk-frontend/components/inset-text/_inset-text.scss +28 -0
  135. data/node_modules/govuk-frontend/components/inset-text/inset-text.njk +7 -0
  136. data/node_modules/govuk-frontend/components/inset-text/macro.njk +3 -0
  137. data/node_modules/govuk-frontend/components/inset-text/template.njk +4 -0
  138. data/node_modules/govuk-frontend/components/label/README.md +193 -0
  139. data/node_modules/govuk-frontend/components/label/_label.scss +45 -0
  140. data/node_modules/govuk-frontend/components/label/label.njk +6 -0
  141. data/node_modules/govuk-frontend/components/label/macro.njk +3 -0
  142. data/node_modules/govuk-frontend/components/label/template.njk +15 -0
  143. data/node_modules/govuk-frontend/components/panel/README.md +151 -0
  144. data/node_modules/govuk-frontend/components/panel/_panel.scss +42 -0
  145. data/node_modules/govuk-frontend/components/panel/macro.njk +3 -0
  146. data/node_modules/govuk-frontend/components/panel/panel.njk +7 -0
  147. data/node_modules/govuk-frontend/components/panel/template.njk +12 -0
  148. data/node_modules/govuk-frontend/components/phase-banner/README.md +152 -0
  149. data/node_modules/govuk-frontend/components/phase-banner/_phase-banner.scss +31 -0
  150. data/node_modules/govuk-frontend/components/phase-banner/macro.njk +3 -0
  151. data/node_modules/govuk-frontend/components/phase-banner/phase-banner.njk +7 -0
  152. data/node_modules/govuk-frontend/components/phase-banner/template.njk +17 -0
  153. data/node_modules/govuk-frontend/components/radios/README.md +686 -0
  154. data/node_modules/govuk-frontend/components/radios/_radios.scss +157 -0
  155. data/node_modules/govuk-frontend/components/radios/macro.njk +3 -0
  156. data/node_modules/govuk-frontend/components/radios/radios.js +730 -0
  157. data/node_modules/govuk-frontend/components/radios/radios.njk +27 -0
  158. data/node_modules/govuk-frontend/components/radios/template.njk +85 -0
  159. data/node_modules/govuk-frontend/components/select/README.md +387 -0
  160. data/node_modules/govuk-frontend/components/select/_select.scss +35 -0
  161. data/node_modules/govuk-frontend/components/select/macro.njk +3 -0
  162. data/node_modules/govuk-frontend/components/select/select.njk +24 -0
  163. data/node_modules/govuk-frontend/components/select/template.njk +44 -0
  164. data/node_modules/govuk-frontend/components/skip-link/README.md +142 -0
  165. data/node_modules/govuk-frontend/components/skip-link/_skip-link.scss +15 -0
  166. data/node_modules/govuk-frontend/components/skip-link/macro.njk +3 -0
  167. data/node_modules/govuk-frontend/components/skip-link/skip-link.njk +3 -0
  168. data/node_modules/govuk-frontend/components/skip-link/template.njk +3 -0
  169. data/node_modules/govuk-frontend/components/table/README.md +585 -0
  170. data/node_modules/govuk-frontend/components/table/_table.scss +50 -0
  171. data/node_modules/govuk-frontend/components/table/macro.njk +3 -0
  172. data/node_modules/govuk-frontend/components/table/table.njk +45 -0
  173. data/node_modules/govuk-frontend/components/table/template.njk +39 -0
  174. data/node_modules/govuk-frontend/components/tabs/README.md +375 -0
  175. data/node_modules/govuk-frontend/components/tabs/_tabs.scss +120 -0
  176. data/node_modules/govuk-frontend/components/tabs/macro.njk +3 -0
  177. data/node_modules/govuk-frontend/components/tabs/tabs.js +1302 -0
  178. data/node_modules/govuk-frontend/components/tabs/tabs.njk +3 -0
  179. data/node_modules/govuk-frontend/components/tabs/template.njk +29 -0
  180. data/node_modules/govuk-frontend/components/tag/README.md +150 -0
  181. data/node_modules/govuk-frontend/components/tag/_tag.scss +23 -0
  182. data/node_modules/govuk-frontend/components/tag/macro.njk +3 -0
  183. data/node_modules/govuk-frontend/components/tag/tag.njk +7 -0
  184. data/node_modules/govuk-frontend/components/tag/template.njk +3 -0
  185. data/node_modules/govuk-frontend/components/textarea/README.md +350 -0
  186. data/node_modules/govuk-frontend/components/textarea/_textarea.scss +31 -0
  187. data/node_modules/govuk-frontend/components/textarea/macro.njk +3 -0
  188. data/node_modules/govuk-frontend/components/textarea/template.njk +41 -0
  189. data/node_modules/govuk-frontend/components/textarea/textarea.njk +11 -0
  190. data/node_modules/govuk-frontend/components/warning-text/README.md +148 -0
  191. data/node_modules/govuk-frontend/components/warning-text/_warning-text.scss +50 -0
  192. data/node_modules/govuk-frontend/components/warning-text/macro.njk +3 -0
  193. data/node_modules/govuk-frontend/components/warning-text/template.njk +9 -0
  194. data/node_modules/govuk-frontend/components/warning-text/warning-text.njk +9 -0
  195. data/node_modules/govuk-frontend/core/_all.scss +6 -0
  196. data/node_modules/govuk-frontend/core/_global-styles.scss +19 -0
  197. data/node_modules/govuk-frontend/core/_links.scss +40 -0
  198. data/node_modules/govuk-frontend/core/_lists.scss +63 -0
  199. data/node_modules/govuk-frontend/core/_section-break.scss +56 -0
  200. data/node_modules/govuk-frontend/core/_template.scss +16 -0
  201. data/node_modules/govuk-frontend/core/_typography.scss +186 -0
  202. data/node_modules/govuk-frontend/helpers/_all.scss +12 -0
  203. data/node_modules/govuk-frontend/helpers/_clearfix.scss +15 -0
  204. data/node_modules/govuk-frontend/helpers/_colour.scss +51 -0
  205. data/node_modules/govuk-frontend/helpers/_device-pixels.scss +38 -0
  206. data/node_modules/govuk-frontend/helpers/_focusable.scss +34 -0
  207. data/node_modules/govuk-frontend/helpers/_font-faces.scss +67 -0
  208. data/node_modules/govuk-frontend/helpers/_grid.scss +100 -0
  209. data/node_modules/govuk-frontend/helpers/_links.scss +149 -0
  210. data/node_modules/govuk-frontend/helpers/_media-queries.scss +95 -0
  211. data/node_modules/govuk-frontend/helpers/_shape-arrow.scss +80 -0
  212. data/node_modules/govuk-frontend/helpers/_spacing.scss +152 -0
  213. data/node_modules/govuk-frontend/helpers/_typography.scss +153 -0
  214. data/node_modules/govuk-frontend/helpers/_visually-hidden.scss +76 -0
  215. data/node_modules/govuk-frontend/objects/_all.scss +4 -0
  216. data/node_modules/govuk-frontend/objects/_form-group.scss +21 -0
  217. data/node_modules/govuk-frontend/objects/_grid.scss +10 -0
  218. data/node_modules/govuk-frontend/objects/_main-wrapper.scss +37 -0
  219. data/node_modules/govuk-frontend/objects/_width-container.scss +28 -0
  220. data/node_modules/govuk-frontend/overrides/_all.scss +4 -0
  221. data/node_modules/govuk-frontend/overrides/_display.scss +14 -0
  222. data/node_modules/govuk-frontend/overrides/_spacing.scss +58 -0
  223. data/node_modules/govuk-frontend/overrides/_typography.scss +21 -0
  224. data/node_modules/govuk-frontend/overrides/_width.scss +41 -0
  225. data/node_modules/govuk-frontend/package.json +89 -0
  226. data/node_modules/govuk-frontend/settings/_all.scss +21 -0
  227. data/node_modules/govuk-frontend/settings/_assets.scss +82 -0
  228. data/node_modules/govuk-frontend/settings/_colours-applied.scss +130 -0
  229. data/node_modules/govuk-frontend/settings/_colours-organisations.scss +136 -0
  230. data/node_modules/govuk-frontend/settings/_colours-palette.scss +37 -0
  231. data/node_modules/govuk-frontend/settings/_compatibility.scss +51 -0
  232. data/node_modules/govuk-frontend/settings/_global-styles.scss +13 -0
  233. data/node_modules/govuk-frontend/settings/_ie8.scss +18 -0
  234. data/node_modules/govuk-frontend/settings/_measurements.scss +85 -0
  235. data/node_modules/govuk-frontend/settings/_media-queries.scss +23 -0
  236. data/node_modules/govuk-frontend/settings/_spacing.scss +80 -0
  237. data/node_modules/govuk-frontend/settings/_typography-font-families.scss +22 -0
  238. data/node_modules/govuk-frontend/settings/_typography-font.scss +48 -0
  239. data/node_modules/govuk-frontend/settings/_typography-responsive.scss +138 -0
  240. data/node_modules/govuk-frontend/template.njk +56 -0
  241. data/node_modules/govuk-frontend/tools/_all.scss +7 -0
  242. data/node_modules/govuk-frontend/tools/_compatibility.scss +36 -0
  243. data/node_modules/govuk-frontend/tools/_exports.scss +33 -0
  244. data/node_modules/govuk-frontend/tools/_font-url.scss +28 -0
  245. data/node_modules/govuk-frontend/tools/_ie8.scss +51 -0
  246. data/node_modules/govuk-frontend/tools/_iff.scss +15 -0
  247. data/node_modules/govuk-frontend/tools/_image-url.scss +28 -0
  248. data/node_modules/govuk-frontend/tools/_px-to-em.scss +20 -0
  249. data/node_modules/govuk-frontend/utilities/_all.scss +2 -0
  250. data/node_modules/govuk-frontend/utilities/_clearfix.scss +5 -0
  251. data/node_modules/govuk-frontend/utilities/_visually-hidden.scss +9 -0
  252. data/node_modules/govuk-frontend/vendor/_sass-mq.scss +351 -0
  253. data/node_modules/govuk-frontend/vendor/polyfills/DOMTokenList.js +272 -0
  254. data/node_modules/govuk-frontend/vendor/polyfills/Document.js +34 -0
  255. data/node_modules/govuk-frontend/vendor/polyfills/Element.js +147 -0
  256. data/node_modules/govuk-frontend/vendor/polyfills/Element/prototype/classList.js +449 -0
  257. data/node_modules/govuk-frontend/vendor/polyfills/Event.js +504 -0
  258. data/node_modules/govuk-frontend/vendor/polyfills/Function/prototype/bind.js +252 -0
  259. data/node_modules/govuk-frontend/vendor/polyfills/Object/defineProperty.js +94 -0
  260. data/node_modules/govuk-frontend/vendor/polyfills/Window.js +28 -0
  261. metadata +249 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 91608383235d300d56657df62187bb825665dc99cdaacfbcb12591f111cc0600
4
- data.tar.gz: d1d0957629c575a9401e5d2af03910f39e357dc915eeb2a8083e42a398e1b908
3
+ metadata.gz: 17673b0fafadbf9937d4a6df90dfe194a19c8a83a7a0a8c2dbe65be551402f64
4
+ data.tar.gz: 5146a665a20166d526cb1a6b4f78dc333800d0e421a847515e3f1574d7f43784
5
5
  SHA512:
6
- metadata.gz: 0b0856a83b0b663dfe443ce02a6f2a910802119b48bf3d7ce9246aa9db8df1eafe2caa47358dbbc60758d383df036382e3623141d79ff7c7bfd4789366bc9163
7
- data.tar.gz: 4fd0e833b724f73ac432c118c96b753f8130c305f41c014b34cbe8742ae35d981c902fe110ed4235a7f239e52d32da5ffcd40934649cbdfe1a990b90cbae81fc
6
+ metadata.gz: a95e67dc05e77c76c2d537330a94884fc5feced188d3e0fefac35c2e130fa6a239ec7235cc6374be4907e84bed6cf2e8006b2ace9fd4f4e06ba24ccfb0a58a09
7
+ data.tar.gz: f1ae0591b02e3a4ddca6ee7a45e47cb44c62322eabe5ca9292162cd73db19368fdc81d7ccf225628b9396512933261a127b1bb2af8bf47bb20c9e7c050e8dd18
data/README.md CHANGED
@@ -30,6 +30,19 @@ There are 2 types of helper classes in this app:
30
30
  - [AppHelpers](lib/govuk_publishing_components/app_helpers). Are exposed to the applications using this gem. They should be documented using RDoc.
31
31
  - [Component Presenters](lib/govuk_publishing_components/presenters). Anything in these classes is only for use within the components. They should be marked `@private`.
32
32
 
33
+ ## GOV.UK Frontend
34
+
35
+ This gem is the way GOV.UK consumes [GOV.UK Frontend](https://github.com/alphagov/govuk-frontend), part of the GOV.UK Design System.
36
+
37
+ We use NPM to pull in the GOV.UK Frontend styles and Javascript, but we don't commit
38
+ the `node_modules` directory. To install GOV.UK Frontend on your machine, run:
39
+
40
+ ```
41
+ npm install
42
+ ```
43
+
44
+ You'll need to have installed Node and NPM for this.
45
+
33
46
  ## Documentation
34
47
 
35
48
  [See the rubydoc.info documentation](http://www.rubydoc.info/gems/govuk_publishing_components)
@@ -50,6 +50,16 @@ $border-color: #ccc;
50
50
  }
51
51
  }
52
52
 
53
+ .component-warning {
54
+ border: 3px solid $orange;
55
+ margin: 0 0 $gutter;
56
+ padding: $gutter $gutter 0 $gutter;
57
+
58
+ .component-warning__title {
59
+ @include bold-24;
60
+ }
61
+ }
62
+
53
63
  .component-doc-h2 {
54
64
  @include bold-27;
55
65
  margin: ($gutter * 1.5) 0 $gutter;
@@ -19,6 +19,7 @@
19
19
  @import "components/fieldset";
20
20
  @import "components/govspeak";
21
21
  @import "components/heading";
22
+ @import "components/highlight-boxes";
22
23
  @import "components/image-card";
23
24
  @import "components/input";
24
25
  @import "components/inverse-header";
@@ -0,0 +1,13 @@
1
+ // Include all of the GOV.UK Frontend styles. This includes global styles, fonts,
2
+ // and individual components.
3
+ $govuk-global-styles: true;
4
+ $govuk-image-url-function: 'image-url';
5
+ $govuk-font-url-function: 'font-url';
6
+
7
+ @import "../../../node_modules/govuk-frontend/all";
8
+
9
+ // Include our GOV.UK components
10
+ @import "govuk_publishing_components/all_components";
11
+
12
+ // Components that are only available inside the admin layout
13
+ @import "govuk_publishing_components/components/layout-footer";
@@ -0,0 +1,66 @@
1
+ .gem-c-highlight-boxes {
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ margin-top: $gutter-half;
5
+
6
+ @include media(tablet) {
7
+ margin-right: -25px;
8
+ }
9
+ }
10
+
11
+ .gem-c-highlight-boxes__item-wrapper {
12
+ @include core-19;
13
+ @include box-sizing(border-box);
14
+ list-style-type: none;
15
+ padding: ($gutter / 6) $gutter-one-third ($gutter-half + $gutter-one-third) 0;
16
+ width: 100%;
17
+
18
+ @include media(tablet) {
19
+ width: 50%;
20
+ padding: ($gutter / 6) ($gutter-half + $gutter-one-third) ($gutter-half + $gutter-one-third) 0;
21
+ }
22
+
23
+ @include media(desktop) {
24
+ width: (1 / 3) * 100%;
25
+ padding: ($gutter / 6) ($gutter-half + $gutter-one-third) ($gutter-half + $gutter-one-third) 0;
26
+ }
27
+ }
28
+
29
+ .gem-c-highlight-boxes__item {
30
+ @include box-sizing(border-box);
31
+ border: 1px solid $grey-2;
32
+ padding: $gutter-half * 1.5;
33
+ height: 100%;
34
+ box-shadow: 7px 7px 0 $white, 8px 8px 0 $grey-2;
35
+ }
36
+
37
+ .gem-c-highlight-boxes--inverse {
38
+ background-color: $govuk-blue;
39
+ border: 0;
40
+ color: $white;
41
+ }
42
+
43
+ .gem-c-highlight-boxes--inverse .gem-c-highlight-boxes__title {
44
+ color: $white;
45
+ }
46
+
47
+ .gem-c-highlight-boxes__title {
48
+ @include bold-19;
49
+ display: block;
50
+ text-decoration: underline;
51
+ margin-bottom: 5px;
52
+ }
53
+
54
+ .gem-c-highlight-boxes__title--featured {
55
+ @include bold-24;
56
+ }
57
+
58
+ .gem-c-highlight-boxes__description {
59
+ margin-bottom: $gutter-one-third;
60
+ }
61
+
62
+ .gem-c-highlight-boxes__metadata {
63
+ @include core-16;
64
+ display: inline-block;
65
+ margin-right: $gutter-half;
66
+ }
@@ -0,0 +1 @@
1
+ // This component relies on styles from GOV.UK Frontend
@@ -0,0 +1 @@
1
+ // This component relies on styles from GOV.UK Frontend
@@ -42,6 +42,14 @@ module GovukPublishingComponents
42
42
  component[:display_html]
43
43
  end
44
44
 
45
+ def display_preview?
46
+ component[:display_preview].nil? ? true : component[:display_preview]
47
+ end
48
+
49
+ def part_of_admin_layout?
50
+ component[:part_of_admin_layout]
51
+ end
52
+
45
53
  def html_body
46
54
  govspeak_to_html(body) if body.present?
47
55
  end
@@ -58,6 +66,10 @@ module GovukPublishingComponents
58
66
  end
59
67
  end
60
68
 
69
+ def govuk_frontend_components
70
+ component[:govuk_frontend_components].to_a
71
+ end
72
+
61
73
  def github_search_url
62
74
  params = { q: "org:alphagov #{partial_path}", type: "Code" }
63
75
  "https://github.com/search?#{params.to_query}"
@@ -1,8 +1,10 @@
1
- <div data-module="test-a11y" data-excluded-rules="<%= @component_doc.accessibility_excluded_rules %>">
2
- <%= render "govuk_publishing_components/component_guide/component_doc/component", component_doc: @component_doc, example: example, preview_page: false %>
3
- <div class="component-guide-preview component-guide-preview--violation" data-module="test-a11y-violation" data-content="Accessibility Issues"></div>
4
- <div class="component-guide-preview component-guide-preview--warning" data-module="test-a11y-warning" data-content="Potential accessibility issues: need manual check"></div>
5
- </div>
1
+ <% if component_doc.display_preview? %>
2
+ <div data-module="test-a11y" data-excluded-rules="<%= @component_doc.accessibility_excluded_rules %>">
3
+ <%= render "govuk_publishing_components/component_guide/component_doc/component", component_doc: @component_doc, example: example, preview_page: false %>
4
+ <div class="component-guide-preview component-guide-preview--violation" data-module="test-a11y-violation" data-content="Accessibility Issues"></div>
5
+ <div class="component-guide-preview component-guide-preview--warning" data-module="test-a11y-warning" data-content="Potential accessibility issues: need manual check"></div>
6
+ </div>
7
+ <% end %>
6
8
 
7
9
  <% if component_doc.display_html? %>
8
10
  <div class="component-guide-preview component-call component-highlight component-output" data-content="HTML OUTPUT">
@@ -1,6 +1,15 @@
1
1
  <% content_for :title, "#{@component_doc.name} component" %>
2
2
  <%= render 'govuk_publishing_components/components/title', title: @component_doc.name, context: "Component" %>
3
3
 
4
+ <% if @component_doc.part_of_admin_layout? %>
5
+ <div class="component-warning">
6
+ <h2 class="component-warning__title">Admin layout only</h2>
7
+ <p>
8
+ This component uses the Design System, so only works inside the <%= link_to "admin layout", "/component-guide/layout_for_admin" %>
9
+ </p>
10
+ </div>
11
+ <% end %>
12
+
4
13
  <div class="component-show">
5
14
  <div class="grid-row">
6
15
  <div class="column-two-thirds">
@@ -28,6 +37,19 @@
28
37
 
29
38
  <%= render "govuk_publishing_components/component_guide/component_doc/preview", component_doc: @component_doc, example: @component_doc.example %>
30
39
 
40
+ <% if @component_doc.govuk_frontend_components.any? %>
41
+ <h2 class="component-doc-h2">GOV.UK Design System</h2>
42
+ <%= render 'govuk_publishing_components/components/govspeak' do %>
43
+ <p>This component incorporates components from the <%= link_to "GOV.UK Design System", "https://design-system.service.gov.uk" %>:</p>
44
+
45
+ <ul>
46
+ <% @component_doc.govuk_frontend_components.each do |component| %>
47
+ <li><%= link_to component.humanize, "https://design-system.service.gov.uk/components/#{component}" %></li>
48
+ <% end %>
49
+ </ul>
50
+ <% end %>
51
+ <% end %>
52
+
31
53
  <% if @component_doc.accessibility_criteria.present? %>
32
54
  <div class="grid-row component-accessibility-criteria">
33
55
  <div class="column-two-thirds">
@@ -0,0 +1,39 @@
1
+ <%
2
+ items ||= []
3
+ inverse ||= false
4
+ inverse_class = "gem-c-highlight-boxes--inverse" if inverse
5
+ highlight_boxes_helper = GovukPublishingComponents::Presenters::HighlightBoxesHelper.new(local_assigns)
6
+ %>
7
+ <% if items.any? %>
8
+ <ol class="gem-c-highlight-boxes" <%= "data-module=track-click" if highlight_boxes_helper.data_tracking? %>>
9
+ <% items.each do |content_item| %>
10
+ <li class="gem-c-highlight-boxes__item-wrapper">
11
+ <div class="gem-c-highlight-boxes__item <%= inverse_class %>">
12
+ <%= link_to(
13
+ content_item[:link].fetch(:text),
14
+ content_item[:link].fetch(:path),
15
+ class: "gem-c-highlight-boxes__title #{"gem-c-highlight-boxes__title--featured" if content_item[:link][:featured]}",
16
+ data: content_item[:link][:data_attributes]
17
+ )
18
+ %>
19
+
20
+ <% if content_item[:link][:description] %>
21
+ <p class="gem-c-highlight-boxes__description"><%= content_item[:link][:description] %></p>
22
+ <% end %>
23
+
24
+ <% if content_item[:metadata] %>
25
+ <% content_item[:metadata].each do |metadata_key, metadata_value| %>
26
+ <% if metadata_key.to_s.eql?("public_updated_at") %>
27
+ <time class="gem-c-highlight-boxes__metadata" datetime="<%= metadata_value.iso8601 %>">
28
+ <%= l(metadata_value, format: '%e %B %Y') %>
29
+ </time>
30
+ <% else %>
31
+ <p class="gem-c-highlight-boxes__metadata"><%= metadata_value %></p>
32
+ <% end %>
33
+ <% end %>
34
+ <% end %>
35
+ </div>
36
+ </li>
37
+ <% end %>
38
+ </ol>
39
+ <% end %>
@@ -0,0 +1,26 @@
1
+ <footer class="govuk-footer " role="contentinfo">
2
+ <div class="govuk-width-container ">
3
+ <div class="govuk-footer__meta">
4
+ <div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
5
+
6
+ <svg role="presentation" focusable="false" class="govuk-footer__licence-logo" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 483.2 195.7" height="17" width="41">
7
+ <path
8
+ fill="currentColor"
9
+ d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"
10
+ />
11
+ </svg>
12
+ <span class="govuk-footer__licence-description">
13
+ All content is available under the
14
+ <a
15
+ class="govuk-footer__link"
16
+ href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
17
+ rel="license"
18
+ >Open Government Licence v3.0</a>, except where otherwise stated
19
+ </span>
20
+ </div>
21
+ <div class="govuk-footer__meta-item">
22
+ <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>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </footer>
@@ -0,0 +1,10 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title><%= browser_title %></title>
5
+ <%= stylesheet_link_tag 'govuk_publishing_components/admin_styles' %>
6
+ </head>
7
+ <body class="govuk-template__body">
8
+ <%= yield %>
9
+ </body>
10
+ </html>
@@ -0,0 +1,142 @@
1
+ name: Highlight boxes
2
+ description: Displays content item details in a grid of highlight boxes, with a max of 3 items per row.
3
+ body: |
4
+ The highlight boxes have several optional flags which can be set:
5
+
6
+ - Inverse - renders the highlight boxes as white text on a blue background
7
+ - Featured - renders a specific highlight box with larger font size
8
+ accessibility_criteria: |
9
+ The highlight boxes must:
10
+
11
+ - be visually distinct from other content on the page
12
+ - have a text contrast ratio higher than 4.5:1 against the background colour to meet WCAG AA
13
+ shared_accessibility_criteria:
14
+ - link
15
+ examples:
16
+ default:
17
+ data:
18
+ items:
19
+ - link:
20
+ text: If your child is taken into care
21
+ path: /child-into-care
22
+ metadata:
23
+ document_type: Detailed guide
24
+ - link:
25
+ text: High needs funding
26
+ path: /high-needs-funding
27
+ metadata:
28
+ document_type: Guide
29
+ - link:
30
+ text: Joint Statement of the 4th meeting of the UK-China High-Level People to People Dialogue
31
+ path: /government/publications/joint-statement-of-the-4th-meeting-of-the-uk-china-high-level-people-to-people-dialogue
32
+ metadata:
33
+ document_type: Policy paper
34
+ with_descriptions_and_metadata:
35
+ data:
36
+ items:
37
+ - link:
38
+ text: Becoming an apprentice
39
+ path: /becoming-an-apprentice
40
+ description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
41
+ metadata:
42
+ document_type: Speech
43
+ organisation: DfE and Ofqual
44
+ public_updated_at: 2016-06-27 10:29:44
45
+ - link:
46
+ text: Becoming an apprentice
47
+ path: /becoming-an-apprentice
48
+ description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
49
+ metadata:
50
+ document_type: Speech
51
+ organisation: DfE and Ofqual
52
+ public_updated_at: 2016-06-27 10:29:44
53
+ - link:
54
+ text: Becoming an apprentice
55
+ path: /becoming-an-apprentice
56
+ description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
57
+ metadata:
58
+ document_type: Speech
59
+ organisation: DfE and Ofqual
60
+ public_updated_at: 2016-06-27 10:29:44
61
+ inverse:
62
+ data:
63
+ inverse: true
64
+ items:
65
+ - link:
66
+ text: Becoming an apprentice
67
+ path: /becoming-an-apprentice
68
+ description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
69
+ metadata:
70
+ document_type: Speech
71
+ organisation: DfE and Ofqual
72
+ public_updated_at: 2016-06-27 10:29:44
73
+ - link:
74
+ text: Becoming an apprentice
75
+ path: /becoming-an-apprentice
76
+ description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
77
+ metadata:
78
+ document_type: Speech
79
+ organisation: DfE and Ofqual
80
+ public_updated_at: 2016-06-27 10:29:44
81
+ - link:
82
+ text: Becoming an apprentice
83
+ path: /becoming-an-apprentice
84
+ description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
85
+ metadata:
86
+ document_type: Speech
87
+ organisation: DfE and Ofqual
88
+ public_updated_at: 2016-06-27 10:29:44
89
+ featured_card:
90
+ description: "Used to highlight a specific content item within the highlight boxes, e.g: the most popular."
91
+ data:
92
+ items:
93
+ - link:
94
+ text: Becoming an apprentice
95
+ path: /becoming-an-apprentice
96
+ description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
97
+ featured: true
98
+ metadata:
99
+ document_type: Speech
100
+ organisation: DfE and Ofqual
101
+ public_updated_at: 2016-06-27 10:29:44
102
+ - link:
103
+ text: Becoming an apprentice
104
+ path: /becoming-an-apprentice
105
+ description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
106
+ metadata:
107
+ document_type: Speech
108
+ organisation: DfE and Ofqual
109
+ public_updated_at: 2016-06-27 10:29:44
110
+ with_data_tracking_attributes:
111
+ data:
112
+ items:
113
+ - link:
114
+ text: Becoming an apprentice
115
+ path: /becoming-an-apprentice
116
+ description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
117
+ data_attributes: {
118
+ track_category: "servicesHighlightBoxClicked",
119
+ track_action: 1,
120
+ track_label: "/becoming-an-apprentice"
121
+ }
122
+ metadata:
123
+ document_type: Speech
124
+ organisation: DfE and Ofqual
125
+ public_updated_at: 2016-06-27 10:29:44
126
+ - link:
127
+ text: Becoming an apprentice
128
+ path: /becoming-an-apprentice
129
+ description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
130
+ data_attributes: {
131
+ track_category: "servicesHighlightBoxClicked",
132
+ track_action: 2,
133
+ track_label: "/becoming-an-apprentice",
134
+ track_options: {
135
+ dimension28: 2,
136
+ dimension29: "Becoming an apprentice"
137
+ }
138
+ }
139
+ metadata:
140
+ document_type: Speech
141
+ organisation: DfE and Ofqual
142
+ public_updated_at: 2016-06-27 10:29:44