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
@@ -0,0 +1,35 @@
1
+ @import "../../settings/all";
2
+ @import "../../tools/all";
3
+ @import "../../helpers/all";
4
+
5
+ @import "../error-message/error-message";
6
+ @import "../hint/hint";
7
+ @import "../label/label";
8
+
9
+ @include govuk-exports("govuk/component/select") {
10
+ .govuk-select {
11
+ @include govuk-font($size: 19, $line-height: 1.25);
12
+ @include govuk-focusable;
13
+
14
+ -webkit-box-sizing: border-box;
15
+
16
+ box-sizing: border-box; // should this be global?
17
+ width: 100%;
18
+ height: 40px;
19
+
20
+ padding: govuk-spacing(1); // was 5px 4px 4px - size of it should be adjusted to match other form elements
21
+ border: $govuk-border-width-form-element solid $govuk-input-border-colour;
22
+ }
23
+
24
+ .govuk-select option:active,
25
+ .govuk-select option:checked,
26
+ .govuk-select:focus::-ms-value {
27
+ color: govuk-colour("white");
28
+ background-color: govuk-colour("blue");
29
+ }
30
+
31
+ .govuk-select--error {
32
+ border: $govuk-border-width-form-element-error solid $govuk-error-colour;
33
+ }
34
+
35
+ }
@@ -0,0 +1,3 @@
1
+ {% macro govukSelect(params) %}
2
+ {%- include "./template.njk" -%}
3
+ {% endmacro %}
@@ -0,0 +1,24 @@
1
+ {% from "select/macro.njk" import govukSelect %}
2
+
3
+ {{ govukSelect({
4
+ "id": "select-1",
5
+ "name": "select-1",
6
+ "label": {
7
+ "html": "Label text goes here"
8
+ },
9
+ "items": [
10
+ {
11
+ "value": 1,
12
+ "text": "GOV.UK frontend option 1"
13
+ },
14
+ {
15
+ "value": 2,
16
+ "text": "GOV.UK frontend option 2",
17
+ "selected": true
18
+ },
19
+ {
20
+ "value": 3,
21
+ "text": "GOV.UK frontend option 3"
22
+ }
23
+ ]
24
+ }) }}
@@ -0,0 +1,44 @@
1
+ {% from "../error-message/macro.njk" import govukErrorMessage -%}
2
+ {% from "../hint/macro.njk" import govukHint %}
3
+ {% from "../label/macro.njk" import govukLabel %}
4
+
5
+ {#- a record of other elements that we need to associate with the input using
6
+ aria-describedby – for example hints or error messages -#}
7
+ {% set describedBy = "" %}
8
+ <div class="govuk-form-group {%- if params.errorMessage %} govuk-form-group--error{% endif %}">
9
+ {{ govukLabel({
10
+ html: params.label.html,
11
+ text: params.label.text,
12
+ classes: params.label.classes,
13
+ isPageHeading: params.label.isPageHeading,
14
+ attributes: params.label.attributes,
15
+ for: params.id
16
+ }) | indent(2) | trim }}
17
+ {% if params.hint %}
18
+ {% set hintId = params.id + '-hint' %}
19
+ {% set describedBy = describedBy + ' ' + hintId if describedBy else hintId %}
20
+ {{ govukHint({
21
+ id: hintId,
22
+ classes: params.hint.classes,
23
+ attributes: params.hint.attributes,
24
+ html: params.hint.html,
25
+ text: params.hint.text
26
+ }) | indent(2) | trim }}
27
+ {% endif %}
28
+ {% if params.errorMessage %}
29
+ {% set errorId = params.id + '-error' %}
30
+ {% set describedBy = describedBy + ' ' + errorId if describedBy else errorId %}
31
+ {{ govukErrorMessage({
32
+ id: errorId,
33
+ classes: params.errorMessage.classes,
34
+ html: params.errorMessage.html,
35
+ text: params.errorMessage.text
36
+ }) | indent(2) | trim }}
37
+ {% endif %}
38
+ <select class="govuk-select
39
+ {%- if params.classes %} {{ params.classes }}{% endif %}{%- if params.errorMessage %} govuk-select--error{% endif %}" id="{{ params.id }}" name="{{ params.name }}" {%- if describedBy %} aria-describedby="{{ describedBy }}"{% endif %} {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
40
+ {% for item in params.items %}
41
+ <option value="{{ item.value }}"{{" selected" if item.selected}}{{" disabled" if item.disabled}}>{{ item.text }}</option>
42
+ {% endfor %}
43
+ </select>
44
+ </div>
@@ -0,0 +1,142 @@
1
+ # Skip link
2
+
3
+ ## Introduction
4
+
5
+ Skip link component. Make skip links visible when they are tabbed to. You'll need to add correct id to your main content area, to ensure the skip link will work.
6
+
7
+ ## Guidance
8
+
9
+ Find out when to use the Skip link component in your service in the [GOV.UK Design System](https://govuk-design-system-production.cloudapps.digital/components/skip-link).
10
+
11
+ ## Quick start examples
12
+
13
+ ### Component default
14
+
15
+ [Preview the skip-link component](http://govuk-frontend-review.herokuapp.com/components/skip-link/preview)
16
+
17
+ #### Markup
18
+
19
+ <a href="#content" class="govuk-skip-link">Skip to main content</a>
20
+
21
+ #### Macro
22
+
23
+ {% from 'skip-link/macro.njk' import govukSkipLink %}
24
+
25
+ {{ govukSkipLink({
26
+ "text": "Skip to main content",
27
+ "href": "#content"
28
+ }) }}
29
+
30
+ ## Requirements
31
+
32
+ ### Build tool configuration
33
+
34
+ When compiling the Sass files you'll need to define includePaths to reference the node_modules directory. Below is a sample configuration using gulp
35
+
36
+ .pipe(sass({
37
+ includePaths: 'node_modules/'
38
+ }))
39
+
40
+ ### Static asset path configuration
41
+
42
+ In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js:
43
+
44
+ app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets')))
45
+
46
+ ## Component arguments
47
+
48
+ If you are using Nunjucks,then macros take the following arguments
49
+
50
+ **If you’re using Nunjucks macros in production be aware that using `html` arguments, or ones ending with `Html` can be a [security risk](https://en.wikipedia.org/wiki/Cross-site_scripting). More about it in the [Nunjucks documentation](https://mozilla.github.io/nunjucks/api.html#user-defined-templates-warning).**
51
+
52
+ <table class="govuk-table">
53
+
54
+ <thead class="govuk-table__head">
55
+
56
+ <tr class="govuk-table__row">
57
+
58
+ <th class="govuk-table__header" scope="col">Name</th>
59
+
60
+ <th class="govuk-table__header" scope="col">Type</th>
61
+
62
+ <th class="govuk-table__header" scope="col">Required</th>
63
+
64
+ <th class="govuk-table__header" scope="col">Description</th>
65
+
66
+ </tr>
67
+
68
+ </thead>
69
+
70
+ <tbody class="govuk-table__body">
71
+
72
+ <tr class="govuk-table__row">
73
+
74
+ <th class="govuk-table__header" scope="row">text (or) html</th>
75
+
76
+ <td class="govuk-table__cell ">string</td>
77
+
78
+ <td class="govuk-table__cell ">No</td>
79
+
80
+ <td class="govuk-table__cell ">Text or HTML to use within the skip link. If `html` is provided, the `text` argument will be ignored.</td>
81
+
82
+ </tr>
83
+
84
+ <tr class="govuk-table__row">
85
+
86
+ <th class="govuk-table__header" scope="row">href</th>
87
+
88
+ <td class="govuk-table__cell ">string</td>
89
+
90
+ <td class="govuk-table__cell ">Yes</td>
91
+
92
+ <td class="govuk-table__cell ">The value of the skip link href attribute. Defaults to #content</td>
93
+
94
+ </tr>
95
+
96
+ <tr class="govuk-table__row">
97
+
98
+ <th class="govuk-table__header" scope="row">classes</th>
99
+
100
+ <td class="govuk-table__cell ">string</td>
101
+
102
+ <td class="govuk-table__cell ">No</td>
103
+
104
+ <td class="govuk-table__cell ">Optional additional classes to add to the skip link.</td>
105
+
106
+ </tr>
107
+
108
+ <tr class="govuk-table__row">
109
+
110
+ <th class="govuk-table__header" scope="row">attributes</th>
111
+
112
+ <td class="govuk-table__cell ">object</td>
113
+
114
+ <td class="govuk-table__cell ">No</td>
115
+
116
+ <td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the skip link.</td>
117
+
118
+ </tr>
119
+
120
+ </tbody>
121
+
122
+ </table>
123
+
124
+ **If you’re using Nunjucks macros in production be aware that using `html` arguments, or ones ending with `Html` can be a [security risk](https://en.wikipedia.org/wiki/Cross-site_scripting). More about it in the [Nunjucks documentation](https://mozilla.github.io/nunjucks/api.html#user-defined-templates-warning).**
125
+
126
+ ### Setting up Nunjucks views and paths
127
+
128
+ Below is an example setup using express configure views:
129
+
130
+ nunjucks.configure('node_modules/govuk-frontend/components', {
131
+ autoescape: true,
132
+ cache: false,
133
+ express: app
134
+ })
135
+
136
+ ## Contribution
137
+
138
+ Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository")
139
+
140
+ ## License
141
+
142
+ MIT
@@ -0,0 +1,15 @@
1
+ @import "../../settings/all";
2
+ @import "../../tools/all";
3
+ @import "../../helpers/all";
4
+
5
+ @include govuk-exports("govuk/component/skip-link") {
6
+ .govuk-skip-link {
7
+ @include govuk-visually-hidden-focusable;
8
+ @include govuk-link-common;
9
+ @include govuk-link-style-text;
10
+ @include govuk-typography-responsive($size: 16);
11
+
12
+ display: block;
13
+ padding: govuk-spacing(2) govuk-spacing(3);
14
+ }
15
+ }
@@ -0,0 +1,3 @@
1
+ {% macro govukSkipLink(params) %}
2
+ {%- include "./template.njk" -%}
3
+ {% endmacro %}
@@ -0,0 +1,3 @@
1
+ {% from "skip-link/macro.njk" import govukSkipLink %}
2
+
3
+ {{ govukSkipLink({href: '#content', text: 'Skip to main content'}) }}
@@ -0,0 +1,3 @@
1
+ <a href="{{ params.href | default('#content') }}" class="govuk-skip-link{%- if params.classes %} {{ params.classes }}{% endif -%}"{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
2
+ {{- params.html | safe if params.html else params.text -}}
3
+ </a>
@@ -0,0 +1,585 @@
1
+ # Table
2
+
3
+ ## Introduction
4
+
5
+ Table description.
6
+
7
+ ## Guidance
8
+
9
+ Find out when to use the Table component in your service in the [GOV.UK Design System](https://govuk-design-system-production.cloudapps.digital/components/table).
10
+
11
+ ## Quick start examples
12
+
13
+ ### Component default
14
+
15
+ [Preview the table component](http://govuk-frontend-review.herokuapp.com/components/table/preview)
16
+
17
+ #### Markup
18
+
19
+ <table class="govuk-table">
20
+
21
+ <tbody class="govuk-table__body">
22
+
23
+ <tr class="govuk-table__row">
24
+
25
+ <td class="govuk-table__cell">January</td>
26
+
27
+ <td class="govuk-table__cell govuk-table__cell--numeric">£85</td>
28
+
29
+ <td class="govuk-table__cell govuk-table__cell--numeric">£95</td>
30
+
31
+ </tr>
32
+
33
+ <tr class="govuk-table__row">
34
+
35
+ <td class="govuk-table__cell">February</td>
36
+
37
+ <td class="govuk-table__cell govuk-table__cell--numeric">£75</td>
38
+
39
+ <td class="govuk-table__cell govuk-table__cell--numeric">£55</td>
40
+
41
+ </tr>
42
+
43
+ <tr class="govuk-table__row">
44
+
45
+ <td class="govuk-table__cell">March</td>
46
+
47
+ <td class="govuk-table__cell govuk-table__cell--numeric">£165</td>
48
+
49
+ <td class="govuk-table__cell govuk-table__cell--numeric">£125</td>
50
+
51
+ </tr>
52
+
53
+ </tbody>
54
+ </table>
55
+
56
+ #### Macro
57
+
58
+ {% from 'table/macro.njk' import govukTable %}
59
+
60
+ {{ govukTable({
61
+ "rows": [
62
+ [
63
+ {
64
+ "text": "January"
65
+ },
66
+ {
67
+ "text": "£85",
68
+ "format": "numeric"
69
+ },
70
+ {
71
+ "text": "£95",
72
+ "format": "numeric"
73
+ }
74
+ ],
75
+ [
76
+ {
77
+ "text": "February"
78
+ },
79
+ {
80
+ "text": "£75",
81
+ "format": "numeric"
82
+ },
83
+ {
84
+ "text": "£55",
85
+ "format": "numeric"
86
+ }
87
+ ],
88
+ [
89
+ {
90
+ "text": "March"
91
+ },
92
+ {
93
+ "text": "£165",
94
+ "format": "numeric"
95
+ },
96
+ {
97
+ "text": "£125",
98
+ "format": "numeric"
99
+ }
100
+ ]
101
+ ]
102
+ }) }}
103
+
104
+ ### Table--table-with-head
105
+
106
+ [Preview the table--table-with-head example](http://govuk-frontend-review.herokuapp.com/components/table/table-with-head/preview)
107
+
108
+ #### Markup
109
+
110
+ <table class="govuk-table">
111
+
112
+ <thead class="govuk-table__head">
113
+ <tr class="govuk-table__row">
114
+
115
+ <th class="govuk-table__header" scope="col">Month you apply</th>
116
+
117
+ <th class="govuk-table__header govuk-table__header--numeric" scope="col">Rate for bicycles</th>
118
+
119
+ <th class="govuk-table__header govuk-table__header--numeric" scope="col">Rate for vehicles</th>
120
+
121
+ </tr>
122
+ </thead>
123
+
124
+ <tbody class="govuk-table__body">
125
+
126
+ <tr class="govuk-table__row">
127
+
128
+ <td class="govuk-table__cell">January</td>
129
+
130
+ <td class="govuk-table__cell govuk-table__cell--numeric">£85</td>
131
+
132
+ <td class="govuk-table__cell govuk-table__cell--numeric">£95</td>
133
+
134
+ </tr>
135
+
136
+ <tr class="govuk-table__row">
137
+
138
+ <td class="govuk-table__cell">February</td>
139
+
140
+ <td class="govuk-table__cell govuk-table__cell--numeric">£75</td>
141
+
142
+ <td class="govuk-table__cell govuk-table__cell--numeric">£55</td>
143
+
144
+ </tr>
145
+
146
+ <tr class="govuk-table__row">
147
+
148
+ <td class="govuk-table__cell">March</td>
149
+
150
+ <td class="govuk-table__cell govuk-table__cell--numeric">£165</td>
151
+
152
+ <td class="govuk-table__cell govuk-table__cell--numeric">£125</td>
153
+
154
+ </tr>
155
+
156
+ </tbody>
157
+ </table>
158
+
159
+ #### Macro
160
+
161
+ {% from 'table/macro.njk' import govukTable %}
162
+
163
+ {{ govukTable({
164
+ "head": [
165
+ {
166
+ "text": "Month you apply"
167
+ },
168
+ {
169
+ "text": "Rate for bicycles",
170
+ "format": "numeric"
171
+ },
172
+ {
173
+ "text": "Rate for vehicles",
174
+ "format": "numeric"
175
+ }
176
+ ],
177
+ "rows": [
178
+ [
179
+ {
180
+ "text": "January"
181
+ },
182
+ {
183
+ "text": "£85",
184
+ "format": "numeric"
185
+ },
186
+ {
187
+ "text": "£95",
188
+ "format": "numeric"
189
+ }
190
+ ],
191
+ [
192
+ {
193
+ "text": "February"
194
+ },
195
+ {
196
+ "text": "£75",
197
+ "format": "numeric"
198
+ },
199
+ {
200
+ "text": "£55",
201
+ "format": "numeric"
202
+ }
203
+ ],
204
+ [
205
+ {
206
+ "text": "March"
207
+ },
208
+ {
209
+ "text": "£165",
210
+ "format": "numeric"
211
+ },
212
+ {
213
+ "text": "£125",
214
+ "format": "numeric"
215
+ }
216
+ ]
217
+ ]
218
+ }) }}
219
+
220
+ ### Table--table-with-caption-and-head
221
+
222
+ [Preview the table--table-with-caption-and-head example](http://govuk-frontend-review.herokuapp.com/components/table/table-with-caption-and-head/preview)
223
+
224
+ #### Markup
225
+
226
+ <table class="govuk-table">
227
+
228
+ <caption class="govuk-table__caption govuk-heading-m">Caption 1 : Months and rates</caption>
229
+
230
+ <thead class="govuk-table__head">
231
+ <tr class="govuk-table__row">
232
+
233
+ <th class="govuk-table__header" scope="col">Month you apply</th>
234
+
235
+ <th class="govuk-table__header govuk-table__header--numeric" scope="col">Rate for bicycles</th>
236
+
237
+ <th class="govuk-table__header govuk-table__header--numeric" scope="col">Rate for vehicles</th>
238
+
239
+ </tr>
240
+ </thead>
241
+
242
+ <tbody class="govuk-table__body">
243
+
244
+ <tr class="govuk-table__row">
245
+
246
+ <th class="govuk-table__header" scope="row">January</th>
247
+
248
+ <td class="govuk-table__cell govuk-table__cell--numeric">£85</td>
249
+
250
+ <td class="govuk-table__cell govuk-table__cell--numeric">£95</td>
251
+
252
+ </tr>
253
+
254
+ <tr class="govuk-table__row">
255
+
256
+ <th class="govuk-table__header" scope="row">February</th>
257
+
258
+ <td class="govuk-table__cell govuk-table__cell--numeric">£75</td>
259
+
260
+ <td class="govuk-table__cell govuk-table__cell--numeric">£55</td>
261
+
262
+ </tr>
263
+
264
+ <tr class="govuk-table__row">
265
+
266
+ <th class="govuk-table__header" scope="row">March</th>
267
+
268
+ <td class="govuk-table__cell govuk-table__cell--numeric">£165</td>
269
+
270
+ <td class="govuk-table__cell govuk-table__cell--numeric">£125</td>
271
+
272
+ </tr>
273
+
274
+ </tbody>
275
+ </table>
276
+
277
+ #### Macro
278
+
279
+ {% from 'table/macro.njk' import govukTable %}
280
+
281
+ {{ govukTable({
282
+ "caption": "Caption 1 : Months and rates",
283
+ "captionClasses": "govuk-heading-m",
284
+ "firstCellIsHeader": true,
285
+ "head": [
286
+ {
287
+ "text": "Month you apply"
288
+ },
289
+ {
290
+ "text": "Rate for bicycles",
291
+ "format": "numeric"
292
+ },
293
+ {
294
+ "text": "Rate for vehicles",
295
+ "format": "numeric"
296
+ }
297
+ ],
298
+ "rows": [
299
+ [
300
+ {
301
+ "text": "January"
302
+ },
303
+ {
304
+ "text": "£85",
305
+ "format": "numeric"
306
+ },
307
+ {
308
+ "text": "£95",
309
+ "format": "numeric"
310
+ }
311
+ ],
312
+ [
313
+ {
314
+ "text": "February"
315
+ },
316
+ {
317
+ "text": "£75",
318
+ "format": "numeric"
319
+ },
320
+ {
321
+ "text": "£55",
322
+ "format": "numeric"
323
+ }
324
+ ],
325
+ [
326
+ {
327
+ "text": "March"
328
+ },
329
+ {
330
+ "text": "£165",
331
+ "format": "numeric"
332
+ },
333
+ {
334
+ "text": "£125",
335
+ "format": "numeric"
336
+ }
337
+ ]
338
+ ]
339
+ }) }}
340
+
341
+ ## Requirements
342
+
343
+ ### Build tool configuration
344
+
345
+ When compiling the Sass files you'll need to define includePaths to reference the node_modules directory. Below is a sample configuration using gulp
346
+
347
+ .pipe(sass({
348
+ includePaths: 'node_modules/'
349
+ }))
350
+
351
+ ### Static asset path configuration
352
+
353
+ In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js:
354
+
355
+ app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets')))
356
+
357
+ ## Component arguments
358
+
359
+ If you are using Nunjucks,then macros take the following arguments
360
+
361
+ **If you’re using Nunjucks macros in production be aware that using `html` arguments, or ones ending with `Html` can be a [security risk](https://en.wikipedia.org/wiki/Cross-site_scripting). More about it in the [Nunjucks documentation](https://mozilla.github.io/nunjucks/api.html#user-defined-templates-warning).**
362
+
363
+ <table class="govuk-table">
364
+
365
+ <thead class="govuk-table__head">
366
+
367
+ <tr class="govuk-table__row">
368
+
369
+ <th class="govuk-table__header" scope="col">Name</th>
370
+
371
+ <th class="govuk-table__header" scope="col">format</th>
372
+
373
+ <th class="govuk-table__header" scope="col">Required</th>
374
+
375
+ <th class="govuk-table__header" scope="col">Description</th>
376
+
377
+ </tr>
378
+
379
+ </thead>
380
+
381
+ <tbody class="govuk-table__body">
382
+
383
+ <tr class="govuk-table__row">
384
+
385
+ <th class="govuk-table__header" scope="row">rows</th>
386
+
387
+ <td class="govuk-table__cell ">array</td>
388
+
389
+ <td class="govuk-table__cell ">Yes</td>
390
+
391
+ <td class="govuk-table__cell ">Array of table rows and cells.</td>
392
+
393
+ </tr>
394
+
395
+ <tr class="govuk-table__row">
396
+
397
+ <th class="govuk-table__header" scope="row">rows.[].text (or) rows.[].html</th>
398
+
399
+ <td class="govuk-table__cell ">string</td>
400
+
401
+ <td class="govuk-table__cell ">Yes</td>
402
+
403
+ <td class="govuk-table__cell ">Text or HTML for cells in table rows. If `html` is specified, the `text` argument will be ignored.</td>
404
+
405
+ </tr>
406
+
407
+ <tr class="govuk-table__row">
408
+
409
+ <th class="govuk-table__header" scope="row">rows.[].format</th>
410
+
411
+ <td class="govuk-table__cell ">string</td>
412
+
413
+ <td class="govuk-table__cell ">No</td>
414
+
415
+ <td class="govuk-table__cell ">Specify format of a cell. Currently we only use "numeric".</td>
416
+
417
+ </tr>
418
+
419
+ <tr class="govuk-table__row">
420
+
421
+ <th class="govuk-table__header" scope="row">rows.[].colspan</th>
422
+
423
+ <td class="govuk-table__cell ">number</td>
424
+
425
+ <td class="govuk-table__cell ">No</td>
426
+
427
+ <td class="govuk-table__cell ">Specify how many columns a cell extends.</td>
428
+
429
+ </tr>
430
+
431
+ <tr class="govuk-table__row">
432
+
433
+ <th class="govuk-table__header" scope="row">rows.[].rowspan</th>
434
+
435
+ <td class="govuk-table__cell ">number</td>
436
+
437
+ <td class="govuk-table__cell ">No</td>
438
+
439
+ <td class="govuk-table__cell ">Specify how many rows a cell extends.</td>
440
+
441
+ </tr>
442
+
443
+ <tr class="govuk-table__row">
444
+
445
+ <th class="govuk-table__header" scope="row">head</th>
446
+
447
+ <td class="govuk-table__cell ">array</td>
448
+
449
+ <td class="govuk-table__cell ">No</td>
450
+
451
+ <td class="govuk-table__cell ">Optional array of table head cells.</td>
452
+
453
+ </tr>
454
+
455
+ <tr class="govuk-table__row">
456
+
457
+ <th class="govuk-table__header" scope="row">head.[].text or head.[].html</th>
458
+
459
+ <td class="govuk-table__cell ">array</td>
460
+
461
+ <td class="govuk-table__cell ">No</td>
462
+
463
+ <td class="govuk-table__cell ">Optional array of table head cells. If `html` is specified, the `text` argument will be ignored.</td>
464
+
465
+ </tr>
466
+
467
+ <tr class="govuk-table__row">
468
+
469
+ <th class="govuk-table__header" scope="row">head.[].colspan</th>
470
+
471
+ <td class="govuk-table__cell ">number</td>
472
+
473
+ <td class="govuk-table__cell ">No</td>
474
+
475
+ <td class="govuk-table__cell ">Specify how many columns a cell extends.</td>
476
+
477
+ </tr>
478
+
479
+ <tr class="govuk-table__row">
480
+
481
+ <th class="govuk-table__header" scope="row">head.[].rowspan</th>
482
+
483
+ <td class="govuk-table__cell ">number</td>
484
+
485
+ <td class="govuk-table__cell ">No</td>
486
+
487
+ <td class="govuk-table__cell ">Specify how many rows a cell extends.</td>
488
+
489
+ </tr>
490
+
491
+ <tr class="govuk-table__row">
492
+
493
+ <th class="govuk-table__header" scope="row">head.[].format</th>
494
+
495
+ <td class="govuk-table__cell ">string</td>
496
+
497
+ <td class="govuk-table__cell ">No</td>
498
+
499
+ <td class="govuk-table__cell ">Specify format of a cell. Currently we only use "numeric".</td>
500
+
501
+ </tr>
502
+
503
+ <tr class="govuk-table__row">
504
+
505
+ <th class="govuk-table__header" scope="row">caption</th>
506
+
507
+ <td class="govuk-table__cell ">string</td>
508
+
509
+ <td class="govuk-table__cell ">No</td>
510
+
511
+ <td class="govuk-table__cell ">Optional caption text.</td>
512
+
513
+ </tr>
514
+
515
+ <tr class="govuk-table__row">
516
+
517
+ <th class="govuk-table__header" scope="row">captionClasses</th>
518
+
519
+ <td class="govuk-table__cell ">string</td>
520
+
521
+ <td class="govuk-table__cell ">No</td>
522
+
523
+ <td class="govuk-table__cell ">Optional classes for caption text size. Class should correspond to the available typography heading classes.</td>
524
+
525
+ </tr>
526
+
527
+ <tr class="govuk-table__row">
528
+
529
+ <th class="govuk-table__header" scope="row">firstCellIsHeader</th>
530
+
531
+ <td class="govuk-table__cell ">boolean</td>
532
+
533
+ <td class="govuk-table__cell ">No</td>
534
+
535
+ <td class="govuk-table__cell ">If set to true, first cell in table row will be a TH instead of a TD.</td>
536
+
537
+ </tr>
538
+
539
+ <tr class="govuk-table__row">
540
+
541
+ <th class="govuk-table__header" scope="row">classes</th>
542
+
543
+ <td class="govuk-table__cell ">string</td>
544
+
545
+ <td class="govuk-table__cell ">No</td>
546
+
547
+ <td class="govuk-table__cell ">Optional additional classes to add to the table container.</td>
548
+
549
+ </tr>
550
+
551
+ <tr class="govuk-table__row">
552
+
553
+ <th class="govuk-table__header" scope="row">attributes</th>
554
+
555
+ <td class="govuk-table__cell ">object</td>
556
+
557
+ <td class="govuk-table__cell ">No</td>
558
+
559
+ <td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the table container.</td>
560
+
561
+ </tr>
562
+
563
+ </tbody>
564
+
565
+ </table>
566
+
567
+ **If you’re using Nunjucks macros in production be aware that using `html` arguments, or ones ending with `Html` can be a [security risk](https://en.wikipedia.org/wiki/Cross-site_scripting). More about it in the [Nunjucks documentation](https://mozilla.github.io/nunjucks/api.html#user-defined-templates-warning).**
568
+
569
+ ### Setting up Nunjucks views and paths
570
+
571
+ Below is an example setup using express configure views:
572
+
573
+ nunjucks.configure('node_modules/govuk-frontend/components', {
574
+ autoescape: true,
575
+ cache: false,
576
+ express: app
577
+ })
578
+
579
+ ## Contribution
580
+
581
+ Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository")
582
+
583
+ ## License
584
+
585
+ MIT