defra_ruby_template 3.13.0 → 3.15.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +14 -0
  3. data/.github/workflows/ci.yml +27 -0
  4. data/.rubocop.yml +3 -0
  5. data/.ruby-version +1 -0
  6. data/Gemfile +2 -0
  7. data/Gemfile.lock +24 -1
  8. data/README.md +5 -1
  9. data/Rakefile +22 -22
  10. data/app/views/layouts/defra_ruby_template.html.erb +17 -2
  11. data/defra_ruby_template.gemspec +14 -3
  12. data/lib/defra_ruby_template/version.rb +3 -1
  13. data/lib/defra_ruby_template.rb +4 -2
  14. data/node_modules/.package-lock.json +16 -0
  15. data/node_modules/govuk-frontend/govuk/assets/images/favicon.ico +0 -0
  16. data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-152x152.png +0 -0
  17. data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-167x167.png +0 -0
  18. data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-180x180.png +0 -0
  19. data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon.png +0 -0
  20. data/node_modules/govuk-frontend/govuk/assets/images/govuk-logotype-tudor-crown.png +0 -0
  21. data/node_modules/govuk-frontend/govuk/assets/images/govuk-mask-icon.svg +1 -7
  22. data/node_modules/govuk-frontend/govuk/assets/images/govuk-opengraph-image.png +0 -0
  23. data/node_modules/govuk-frontend/govuk/components/accordion/macro-options.json +2 -2
  24. data/node_modules/govuk-frontend/govuk/components/back-link/macro-options.json +3 -3
  25. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +3 -4
  26. data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +9 -0
  27. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +6 -6
  28. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +14 -0
  29. data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +8 -8
  30. data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro-options.json +1 -1
  31. data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +5 -5
  32. data/node_modules/govuk-frontend/govuk/components/details/_index.scss +2 -1
  33. data/node_modules/govuk-frontend/govuk/components/details/macro-options.json +2 -2
  34. data/node_modules/govuk-frontend/govuk/components/error-message/macro-options.json +3 -3
  35. data/node_modules/govuk-frontend/govuk/components/fieldset/macro-options.json +1 -1
  36. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +1 -0
  37. data/node_modules/govuk-frontend/govuk/components/file-upload/macro-options.json +4 -4
  38. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +3 -0
  39. data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +2 -2
  40. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +16 -0
  41. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +26 -18
  42. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +12 -6
  43. data/node_modules/govuk-frontend/govuk/components/header/template.njk +56 -31
  44. data/node_modules/govuk-frontend/govuk/components/hint/macro-options.json +1 -1
  45. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +7 -7
  46. data/node_modules/govuk-frontend/govuk/components/inset-text/macro-options.json +1 -1
  47. data/node_modules/govuk-frontend/govuk/components/label/macro-options.json +1 -1
  48. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +13 -1
  49. data/node_modules/govuk-frontend/govuk/components/panel/macro-options.json +1 -1
  50. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +14 -0
  51. data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +8 -8
  52. data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +3 -3
  53. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +2 -2
  54. data/node_modules/govuk-frontend/govuk/components/summary-list/macro-options.json +7 -7
  55. data/node_modules/govuk-frontend/govuk/components/tabs/macro-options.json +4 -4
  56. data/node_modules/govuk-frontend/govuk/components/textarea/macro-options.json +5 -5
  57. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +2 -2
  58. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +22 -4
  59. data/node_modules/govuk-frontend/govuk/overrides/_all.scss +1 -0
  60. data/node_modules/govuk-frontend/govuk/overrides/_text-align.scss +20 -0
  61. data/node_modules/govuk-frontend/package.json +14 -41
  62. data/package-lock.json +17 -6
  63. data/package.json +1 -1
  64. data/vendor/assets/images/favicon.ico +0 -0
  65. data/vendor/assets/images/govuk-apple-touch-icon-152x152.png +0 -0
  66. data/vendor/assets/images/govuk-apple-touch-icon-167x167.png +0 -0
  67. data/vendor/assets/images/govuk-apple-touch-icon-180x180.png +0 -0
  68. data/vendor/assets/images/govuk-apple-touch-icon.png +0 -0
  69. data/vendor/assets/images/govuk-logotype-tudor-crown.png +0 -0
  70. data/vendor/assets/images/govuk-mask-icon.svg +1 -7
  71. data/vendor/assets/images/govuk-opengraph-image.png +0 -0
  72. metadata +29 -7
@@ -71,7 +71,8 @@
71
71
  }
72
72
 
73
73
  .govuk-details__text {
74
- padding: govuk-spacing(3);
74
+ padding-top: govuk-spacing(3);
75
+ padding-bottom: govuk-spacing(3);
75
76
  padding-left: govuk-spacing(4);
76
77
  border-left: $govuk-border-width solid $govuk-border-colour;
77
78
  }
@@ -27,13 +27,13 @@
27
27
  "name": "id",
28
28
  "type": "string",
29
29
  "required": false,
30
- "description": "Id to add to the details element."
30
+ "description": "ID to add to the details element."
31
31
  },
32
32
  {
33
33
  "name": "open",
34
34
  "type": "boolean",
35
35
  "required": false,
36
- "description": "If true, details element will be expanded."
36
+ "description": "If `true`, details element will be expanded."
37
37
  },
38
38
  {
39
39
  "name": "classes",
@@ -15,7 +15,7 @@
15
15
  "name": "id",
16
16
  "type": "string",
17
17
  "required": false,
18
- "description": "Id attribute to add to the error message span tag."
18
+ "description": "ID attribute to add to the error message span tag."
19
19
  },
20
20
  {
21
21
  "name": "classes",
@@ -27,12 +27,12 @@
27
27
  "name": "attributes",
28
28
  "type": "object",
29
29
  "required": false,
30
- "description": "HTML attributes (for example data attributes) to add to the error message span tag"
30
+ "description": "HTML attributes (for example data attributes) to add to the error message span tag."
31
31
  },
32
32
  {
33
33
  "name": "visuallyHiddenText",
34
34
  "type": "string",
35
35
  "required": false,
36
- "description": "A visually hidden prefix used before the error message. Defaults to \"Error\"."
36
+ "description": "A visually hidden prefix used before the error message. Defaults to 'Error'."
37
37
  }
38
38
  ]
@@ -65,6 +65,6 @@
65
65
  "name": "caller",
66
66
  "type": "nunjucks-block",
67
67
  "required": false,
68
- "description": "Not strictly a parameter but [Nunjucks code convention](https://mozilla.github.io/nunjucks/templating.html#call). Using a `call` block enables you to call a macro with all the text inside the tag. This is helpful if you want to pass a lot of content into a macro. To use it, you will need to wrap the entire fielset component in a `call` block."
68
+ "description": "Not strictly a parameter but [Nunjucks code convention](https://mozilla.github.io/nunjucks/templating.html#call). Using a `call` block enables you to call a macro with all the text inside the tag. This is helpful if you want to pass a lot of content into a macro. To use it, you will need to wrap the entire fieldset component in a `call` block."
69
69
  }
70
70
  ]
@@ -8,6 +8,7 @@
8
8
  .govuk-file-upload {
9
9
  @include govuk-font($size: 19);
10
10
  @include govuk-text-colour;
11
+ max-width: 100%;
11
12
  margin-left: -$component-padding;
12
13
  padding: $component-padding;
13
14
 
@@ -9,13 +9,13 @@
9
9
  "name": "id",
10
10
  "type": "string",
11
11
  "required": true,
12
- "description": "The id of the input"
12
+ "description": "The ID of the input."
13
13
  },
14
14
  {
15
15
  "name": "value",
16
16
  "type": "string",
17
17
  "required": false,
18
- "description": "Optional initial value of the input"
18
+ "description": "Optional initial value of the input."
19
19
  },
20
20
  {
21
21
  "name": "describedBy",
@@ -48,13 +48,13 @@
48
48
  "name": "formGroup",
49
49
  "type": "object",
50
50
  "required": false,
51
- "description": "Options for the form-group wrapper",
51
+ "description": "Options for the form-group wrapper.",
52
52
  "params": [
53
53
  {
54
54
  "name": "classes",
55
55
  "type": "string",
56
56
  "required": false,
57
- "description": "Classes to add to the form group (for example to show error state for the whole group)"
57
+ "description": "Classes to add to the form group (for example to show error state for the whole group)."
58
58
  }
59
59
  ]
60
60
  },
@@ -111,6 +111,9 @@
111
111
  margin-bottom: govuk-spacing(3);
112
112
  }
113
113
  vertical-align: top;
114
+ // Work around SVGs not inheriting color from parent in forced color mode
115
+ // (https://github.com/w3c/csswg-drafts/issues/6310)
116
+ forced-color-adjust: auto;
114
117
  }
115
118
 
116
119
  .govuk-footer__licence-description {
@@ -9,7 +9,7 @@
9
9
  "name": "visuallyHiddenTitle",
10
10
  "type": "string",
11
11
  "required": false,
12
- "description": "Title for a meta item section, which defaults to Support links"
12
+ "description": "Title for a meta item section. Defaults to 'Support links'."
13
13
  },
14
14
  {
15
15
  "name": "html",
@@ -61,7 +61,7 @@
61
61
  "name": "title",
62
62
  "type": "string",
63
63
  "required": true,
64
- "description": "Title for a section"
64
+ "description": "Title for a section."
65
65
  },
66
66
  {
67
67
  "name": "columns",
@@ -62,6 +62,14 @@
62
62
  vertical-align: top;
63
63
  }
64
64
 
65
+ // Spacing adjustment for Tudor crown, as the new graphic is narrower than the
66
+ // existing crown. In Frontend v5, this rule should replace the equivalent in
67
+ // the block above.
68
+ .govuk-header__logotype-crown[width="32"] {
69
+ top: -3px;
70
+ margin-right: 2px;
71
+ }
72
+
65
73
  .govuk-header__logotype-crown-fallback-image {
66
74
  width: 36px;
67
75
  height: 32px;
@@ -69,6 +77,14 @@
69
77
  vertical-align: bottom;
70
78
  }
71
79
 
80
+ // Sizing adjustment for Tudor crown, as the new graphic is smaller than the
81
+ // existing crown. In Frontend v5, these rules should replace their
82
+ // equivalents in the block above.
83
+ .govuk-header__logotype-crown-fallback-image[width="32"] {
84
+ width: 32px;
85
+ height: 30px;
86
+ }
87
+
72
88
  .govuk-header__product-name {
73
89
  @include govuk-font($size: 24, $line-height: 1);
74
90
  display: inline-table;