govuk_publishing_components 23.15.0 → 24.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +0 -4
  3. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +23 -14
  4. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +0 -1
  5. data/app/assets/stylesheets/govuk_publishing_components/component_support.scss +0 -2
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_error-alert.scss +4 -4
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +101 -48
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +8 -8
  9. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss +0 -5
  10. data/app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav.scss +2 -2
  11. data/app/views/govuk_publishing_components/components/_document_list.html.erb +10 -1
  12. data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +5 -0
  13. data/app/views/govuk_publishing_components/components/docs/document_list.yml +18 -0
  14. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +3 -3
  15. data/config/initializers/assets.rb +0 -1
  16. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +61 -2
  17. data/lib/govuk_publishing_components/version.rb +1 -1
  18. data/node_modules/govuk-frontend/govuk/all.js +1 -1
  19. data/node_modules/govuk-frontend/govuk/components/_all.scss +1 -0
  20. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +10 -10
  21. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/template.njk +2 -2
  22. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +2 -0
  23. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +1 -0
  24. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +1 -1
  25. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +13 -0
  26. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
  27. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +51 -0
  28. data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +425 -0
  29. data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro-options.json +132 -0
  30. data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro.njk +3 -0
  31. data/node_modules/govuk-frontend/govuk/components/cookie-banner/template.njk +63 -0
  32. data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +2 -2
  33. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +18 -18
  34. data/node_modules/govuk-frontend/govuk/components/header/template.njk +4 -4
  35. data/node_modules/govuk-frontend/govuk/components/table/_index.scss +21 -0
  36. data/node_modules/govuk-frontend/govuk/components/table/macro-options.json +2 -2
  37. data/node_modules/govuk-frontend/govuk/objects/_all.scss +1 -0
  38. data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +94 -0
  39. data/node_modules/govuk-frontend/package.json +1 -1
  40. metadata +9 -17
  41. data/app/assets/images/govuk_publishing_components/chevron-banner/chevron-banner-small-focus.svg +0 -4
  42. data/app/assets/images/govuk_publishing_components/chevron-banner/chevron-banner-small.svg +0 -4
  43. data/app/assets/javascripts/govuk_publishing_components/components/header.js +0 -8
  44. data/app/assets/javascripts/govuk_publishing_components/lib/auto-track-event.js +0 -31
  45. data/app/assets/stylesheets/govuk_publishing_components/components/_chevron-banner.scss +0 -138
  46. data/app/assets/stylesheets/govuk_publishing_components/components/_list.scss +0 -1
  47. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_variables.scss +0 -27
  48. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_back-arrow.scss +0 -13
  49. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_clearfix.scss +0 -8
  50. data/app/views/govuk_publishing_components/components/_chevron_banner.html.erb +0 -19
  51. data/app/views/govuk_publishing_components/components/_subscription-links.html.erb +0 -85
  52. data/app/views/govuk_publishing_components/components/_translation-nav.html.erb +0 -33
  53. data/app/views/govuk_publishing_components/components/docs/chevron_banner.yml +0 -33
  54. data/app/views/govuk_publishing_components/components/docs/subscription-links.yml +0 -103
  55. data/app/views/govuk_publishing_components/components/docs/translation-nav.yml +0 -139
@@ -1,12 +1,12 @@
1
1
  .gem-c-success-alert {
2
- color: $gem-text-colour;
3
- padding: $gem-spacing-scale-3;
4
- border: $gem-border-width-mobile solid $gem-success-colour;
2
+ color: $govuk-text-colour;
3
+ padding: govuk-spacing(3);
4
+ border: $govuk-border-width-narrow solid $govuk-success-colour;
5
5
  @include govuk-responsive-margin(8, "bottom");
6
6
 
7
7
  @include govuk-media-query($from: tablet) {
8
- padding: $gem-spacing-scale-4;
9
- border-width: $gem-border-width-tablet;
8
+ padding: govuk-spacing(4);
9
+ border-width: $govuk-border-width;
10
10
  }
11
11
  }
12
12
 
@@ -17,10 +17,10 @@
17
17
 
18
18
  .gem-c-success-summary__title {
19
19
  margin-top: 0;
20
- margin-bottom: $gem-spacing-scale-3;
20
+ margin-bottom: govuk-spacing(3);
21
21
 
22
22
  @include govuk-media-query($from: tablet) {
23
- margin-bottom: $gem-spacing-scale-4;
23
+ margin-bottom: govuk-spacing(4);
24
24
  }
25
25
 
26
26
  @include govuk-font(24, $weight: bold);
@@ -32,5 +32,5 @@
32
32
  }
33
33
 
34
34
  .gem-c-success-alert:focus {
35
- outline: $gem-focus-width solid $gem-focus-colour;
35
+ outline: $govuk-focus-width solid $govuk-focus-colour;
36
36
  }
@@ -25,11 +25,6 @@
25
25
  float: none;
26
26
  width: 100%;
27
27
 
28
- h3 {
29
- @include govuk-font($size: 19, $weight: bold);
30
- margin-bottom: 5px;
31
- }
32
-
33
28
  .email-url-number {
34
29
  .email {
35
30
  word-wrap: break-word;
@@ -1,7 +1,7 @@
1
1
  $grey-2: #bfc1c3;
2
2
  $white: #ffffff;
3
3
  $number-circle-size: 35px;
4
- $stroke-width: 3px;
4
+ $stroke-width: 1px;
5
5
 
6
6
  .gem-c-step-nav:not(.gem-c-step-nav--large),
7
7
  .gem-c-step-nav__controls,
@@ -63,7 +63,7 @@ $stroke-width: 3px;
63
63
  }
64
64
 
65
65
  .gem-c-step-nav__circle--number {
66
- border: solid 3px $grey-2;
66
+ border: solid 1px $grey-2;
67
67
  }
68
68
 
69
69
  .gem-c-step-nav__step,
@@ -29,12 +29,21 @@
29
29
  item_classes = "gem-c-document-list__item-title #{brand_helper.color_class} #{title_with_context_class if item[:link][:context]}"
30
30
 
31
31
  if item[:link][:path]
32
+ rel = [
33
+ "external",
34
+ "nofollow",
35
+ "noopener",
36
+ "noreferrer",
37
+ "opener",
38
+ ].include?(item[:link][:rel]) ? item[:link][:rel] : nil
39
+
32
40
  link_to(
33
41
  item[:link][:text],
34
42
  item[:link][:path],
35
43
  data: item[:link][:data_attributes],
36
44
  class: "#{item_classes} gem-c-document-list__item-link",
37
- lang: item[:link][:locale].presence
45
+ lang: item[:link][:locale].presence,
46
+ rel: rel,
38
47
  )
39
48
  else
40
49
  content_tag(
@@ -72,6 +72,11 @@ examples:
72
72
  - text: Check what age you can drive
73
73
  href: "/vehicles-can-drive"
74
74
  optional: false
75
+ - title: Testing the and
76
+ logic: and
77
+ contents:
78
+ - type: paragraph
79
+ text: hello hello what's UP
75
80
  - title: Driving lessons and practice
76
81
  contents:
77
82
  - type: paragraph
@@ -305,3 +305,21 @@ examples:
305
305
  path: '/become-an-apprentice'
306
306
  description: 'Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship.'
307
307
  full_size_description: true
308
+ with_rel_link_attribute:
309
+ description: |
310
+ The [rel attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel) is an option attribute to dictate the relationship between the document being linked to and the current page. This is predominantly used by search engines to help index journeys through a website.
311
+
312
+ On GOV.UK, this is typically used to dictate an external website being linked to with `rel="external"`, however this component supports:
313
+
314
+ - external
315
+ - nofollow
316
+ - noopener
317
+ - noreferrer
318
+ - opener
319
+ data:
320
+ items:
321
+ - link:
322
+ text: 'Report Fraud'
323
+ path: 'https://www.actionfraud.police.uk/contact-us'
324
+ rel: 'external'
325
+ description: "Contact Action Fraud to report fraud and cyber crime, or to tell them you've been the victim of a scam."
@@ -312,8 +312,8 @@ examples:
312
312
  block: |
313
313
  <div class="contact" id="contact_1017">
314
314
  <div class="content">
315
- <h3>Media enquiries</h3>
316
315
  <div class="vcard contact-inner">
316
+ <p>Media enquiries</p>
317
317
  <p class="adr">
318
318
  <span class="street-address">2 Marsham Street<br>London</span><br>
319
319
  <span class="postal-code">SW1P 4DF</span>
@@ -332,8 +332,8 @@ examples:
332
332
  <h2>This is a title</h2>
333
333
  <div class="contact" id="contact_1018">
334
334
  <div class="content">
335
- <h3>Media enquiries</h3>
336
335
  <div class="vcard contact-inner">
336
+ <p>Media enquiries</p>
337
337
  <p class="adr">
338
338
  <span class="street-address">2 Marsham Street<br>London</span><br>
339
339
  <span class="postal-code">SW1P 4DF</span>
@@ -349,8 +349,8 @@ examples:
349
349
  <p>This is a paragraph.</p>
350
350
  <div class="contact" id="contact_1019">
351
351
  <div class="content">
352
- <h3>Media enquiries</h3>
353
352
  <div class="vcard contact-inner">
353
+ <p>Media enquiries</p>
354
354
  <p class="adr">
355
355
  <span class="street-address">2 Marsham Street<br>London</span><br>
356
356
  <span class="postal-code">SW1P 4DF</span>
@@ -25,7 +25,6 @@ Rails.application.config.assets.precompile += %w[
25
25
  govuk_publishing_components/search-button.png
26
26
  govuk_publishing_components/icon-file-download.svg
27
27
  govuk_publishing_components/icon-important.svg
28
- govuk_publishing_components/chevron-banner/*.svg
29
28
  govuk_publishing_components/crests/*.png
30
29
  govuk_publishing_components/take-action-amber.svg
31
30
  govuk_publishing_components/take-action-green.svg
@@ -115,7 +115,67 @@ module GovukPublishingComponents
115
115
 
116
116
  def brexit_cta_document_exceptions
117
117
  # /government/news/30-creative-teams-awarded-up-to-100000-each-for-festival-uk-2022-rd-project
118
- %w[c3752802-f091-43a9-ba90-33568fccf391]
118
+ # and answer pages that have a start button (tracked in https://docs.google.com/spreadsheets/d/1ynH8zIjvElvK-u8JLI8KOYylxTbzJsoXRqEnqrnqv_4/edit)
119
+ %w[
120
+ c3752802-f091-43a9-ba90-33568fccf391
121
+ e1a9ce2b-4085-4761-b70f-d125a6571de3
122
+ 6a2bf66e-2313-4204-afd5-9940de5e1d66
123
+ f65b0ac7-b8cd-476b-bd5d-738268517659
124
+ 45ad868a-2e79-4029-991b-c29559d7eb29
125
+ e4e9c4ec-385e-4758-93ac-388bc154815e
126
+ cee73f76-83f0-44e2-b657-3b51a9cbc76e
127
+ 9a945506-60bc-44d8-a2ec-0eb2824732d6
128
+ 6ae16c12-a554-44e2-b3e3-596375aa1b9a
129
+ 9add4ccc-dc4c-44cf-9b69-6878c162d431
130
+ 4f5cf1cd-efda-4c49-8292-1db1c6c3cfb0
131
+ 73058592-dedf-4379-9a1d-d8222a796c0a
132
+ c9259172-5432-43a6-b710-409d463c7627
133
+ 59ecfc6d-cb9e-49b8-b013-fc368ebdf8ed
134
+ 9897695d-624b-4cb9-b873-f3113f0332a1
135
+ 715f4659-b058-46ec-84c8-cc346c210778
136
+ c63890f9-2356-4be3-9e07-6cf4b8de7081
137
+ e7661ec8-b678-444e-b4d0-a221fa83a7f7
138
+ 723f9c0a-bcdb-4d8f-952c-6df0ed468c57
139
+ a1c420b7-11d7-4b9c-a97e-406fb73c0200
140
+ c1347936-839b-4547-a570-0c315c34ee45
141
+ 1396f68b-6ffa-47ef-a049-414e7b548e81
142
+ 3b054acf-d0af-470e-b912-9481204d1a9a
143
+ 317b9c08-928b-4fd2-bc8e-4c6acf287c58
144
+ 44d6cb7a-d853-4cd8-a9cb-69eff0299d9e
145
+ 15517245-f142-4e45-ad84-773250f7d5a2
146
+ 6fe6644d-d037-4ea4-baf6-800dc1966ed0
147
+ 4a63625c-a195-4b86-9562-cb6653dd26ff
148
+ 47521233-20a8-4d02-ba31-6e1977448fd1
149
+ 7b8ca4ac-f3a3-41b8-9555-9e244c36575b
150
+ be1a82d1-e53c-431a-9e7a-337ed4b2654f
151
+ 6c445001-4e29-4853-8c14-444d7f9374ee
152
+ c8cf2a7c-5c13-4f3d-b1ff-6a7eb5533973
153
+ 2422a237-f8f1-4e9f-ad51-f1d44fde9755
154
+ ae000c08-c74f-467b-b8a4-90f138252a5c
155
+ 7eec7800-9c4d-4160-af53-57b5d3e02972
156
+ eb545b3b-111b-4c3c-890c-c9ec29b9090d
157
+ 8d705ade-8977-480d-9080-72a19e341c2a
158
+ 2a0dd317-0252-4c7c-8c13-b43af28406bc
159
+ f27e5792-a84b-4164-9890-7e86767634e8
160
+ b0b9a600-1fe6-4257-9e68-2be0f59ea25d
161
+ 28fa04ea-42e1-46ad-9abc-acf132c5666d
162
+ 64b27b8a-ae53-4034-a812-f4805cd7e3ad
163
+ 1dd5a75f-18b4-419d-b2b6-6d4808f2c7e4
164
+ b21b9e34-455c-4305-b4cc-4e6b8d3f7522
165
+ 0ab53a0d-b098-43a8-b3cc-8b3224697228
166
+ e3862156-ba5a-41ba-8ee6-22e5cd6a6144
167
+ 2e8f7fae-7164-459c-898b-0c0538eee3e0
168
+ 6087439c-26d2-4881-b345-5160e23f3b5e
169
+ cac78a0a-9c28-436a-a29e-8ccbe8fbc956
170
+ c2fd13a5-537b-4368-ac2e-6078b2c463f1
171
+ 98f0a21d-7b67-4089-a98c-f0a0177291a2
172
+ 06692612-8c39-464c-8aee-2aa62e6c8887
173
+ df943977-69cb-479d-a921-9410d603c471
174
+ 2656eb6b-f2eb-4982-8a90-e40d03a34a4d
175
+ 4ca8698b-4a24-45ff-baea-7633cc24b679
176
+ ed73581f-9bf8-48b5-bb66-935581a255e3
177
+ 15f1c594-af1d-4f16-97cc-ad4d12017509
178
+ ]
119
179
  end
120
180
 
121
181
  def brexit_cta_document_exception?
@@ -125,7 +185,6 @@ module GovukPublishingComponents
125
185
  def brexit_cta_document_type_exceptions
126
186
  %w[
127
187
  aaib_report
128
- answer
129
188
  asylum_support_decision
130
189
  fatality_notice
131
190
  maib_report
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "23.15.0".freeze
2
+ VERSION = "24.0.0".freeze
3
3
  end
@@ -1498,7 +1498,7 @@ function CharacterCount ($module) {
1498
1498
  this.$module = $module;
1499
1499
  this.$textarea = $module.querySelector('.govuk-js-character-count');
1500
1500
  if (this.$textarea) {
1501
- this.$countMessage = $module.querySelector('[id=' + this.$textarea.id + '-info]');
1501
+ this.$countMessage = $module.querySelector('[id="' + this.$textarea.id + '-info"]');
1502
1502
  }
1503
1503
  }
1504
1504
 
@@ -6,6 +6,7 @@
6
6
  @import "button/index";
7
7
  @import "checkboxes/index";
8
8
  @import "character-count/index";
9
+ @import "cookie-banner/index";
9
10
  @import "summary-list/index";
10
11
  @import "date-input/index";
11
12
  @import "details/index";
@@ -15,7 +15,7 @@
15
15
  }
16
16
  ]
17
17
  },
18
- "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section\">Sub-section</a>\n </li>\n \n \n </ol>\n</div>",
18
+ "html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section\">Sub-section</a>\n </li>\n \n \n </ol>\n</div>",
19
19
  "hidden": false
20
20
  },
21
21
  {
@@ -28,7 +28,7 @@
28
28
  }
29
29
  ]
30
30
  },
31
- "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n </ol>\n</div>",
31
+ "html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n </ol>\n</div>",
32
32
  "hidden": false
33
33
  },
34
34
  {
@@ -53,7 +53,7 @@
53
53
  }
54
54
  ]
55
55
  },
56
- "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section\">Sub-section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section/sub-sub-section\">Sub Sub-section</a>\n </li>\n \n \n </ol>\n</div>",
56
+ "html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section\">Sub-section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section/sub-sub-section\">Sub Sub-section</a>\n </li>\n \n \n </ol>\n</div>",
57
57
  "hidden": false
58
58
  },
59
59
  {
@@ -70,7 +70,7 @@
70
70
  }
71
71
  ]
72
72
  },
73
- "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/service-manual\">Service Manual</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/service-manual/agile-delivery\">Agile Delivery</a>\n </li>\n \n \n </ol>\n</div>",
73
+ "html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/service-manual\">Service Manual</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/service-manual/agile-delivery\">Agile Delivery</a>\n </li>\n \n \n </ol>\n</div>",
74
74
  "hidden": false
75
75
  },
76
76
  {
@@ -90,7 +90,7 @@
90
90
  }
91
91
  ]
92
92
  },
93
- "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/browse/abroad\">Passports, travel and living abroad</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">Travel abroad</li>\n \n \n </ol>\n</div>",
93
+ "html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/browse/abroad\">Passports, travel and living abroad</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">Travel abroad</li>\n \n \n </ol>\n</div>",
94
94
  "hidden": false
95
95
  },
96
96
  {
@@ -112,7 +112,7 @@
112
112
  }
113
113
  ]
114
114
  },
115
- "html": "<div class=\"govuk-breadcrumbs govuk-breadcrumbs--collapse-on-mobile\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/education\">Education, training and skills</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/education/special-educational-needs-and-disability-send-and-high-needs\">Special educational needs and disability (SEND) and high needs</a>\n </li>\n \n \n </ol>\n</div>",
115
+ "html": "<div class=\"govuk-breadcrumbs govuk-breadcrumbs--collapse-on-mobile\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/education\">Education, training and skills</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/education/special-educational-needs-and-disability-send-and-high-needs\">Special educational needs and disability (SEND) and high needs</a>\n </li>\n \n \n </ol>\n</div>",
116
116
  "hidden": false
117
117
  },
118
118
  {
@@ -141,7 +141,7 @@
141
141
  }
142
142
  ]
143
143
  },
144
- "html": "<div class=\"govuk-breadcrumbs \" id=\"my-navigation\" role=\"navigation\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">Home</li>\n \n \n </ol>\n</div>",
144
+ "html": "<div class=\"govuk-breadcrumbs\" id=\"my-navigation\" role=\"navigation\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">Home</li>\n \n \n </ol>\n</div>",
145
145
  "hidden": true
146
146
  },
147
147
  {
@@ -158,7 +158,7 @@
158
158
  }
159
159
  ]
160
160
  },
161
- "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\" data-attribute=\"my-attribute\" data-attribute-2=\"my-attribute-2\">Section 1</a>\n </li>\n \n \n </ol>\n</div>",
161
+ "html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\" data-attribute=\"my-attribute\" data-attribute-2=\"my-attribute-2\">Section 1</a>\n </li>\n \n \n </ol>\n</div>",
162
162
  "hidden": true
163
163
  },
164
164
  {
@@ -170,7 +170,7 @@
170
170
  }
171
171
  ]
172
172
  },
173
- "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">&lt;span&gt;Section 1&lt;/span&gt;</li>\n \n \n </ol>\n</div>",
173
+ "html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">&lt;span&gt;Section 1&lt;/span&gt;</li>\n \n \n </ol>\n</div>",
174
174
  "hidden": true
175
175
  },
176
176
  {
@@ -186,7 +186,7 @@
186
186
  }
187
187
  ]
188
188
  },
189
- "html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\"><em>Section 1</em></li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section-2\"><em>Section 2</em></a>\n </li>\n \n \n </ol>\n</div>",
189
+ "html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\"><em>Section 1</em></li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section-2\"><em>Section 2</em></a>\n </li>\n \n \n </ol>\n</div>",
190
190
  "hidden": true
191
191
  }
192
192
  ]
@@ -1,8 +1,8 @@
1
1
  {# Set classes for this component #}
2
- {%- set classNames = "govuk-breadcrumbs " -%}
2
+ {%- set classNames = "govuk-breadcrumbs" -%}
3
3
 
4
4
  {% if params.classes %}
5
- {% set classNames = classNames + params.classes %}
5
+ {% set classNames = classNames + " " + params.classes %}
6
6
  {% endif -%}
7
7
 
8
8
  {% if params.collapseOnMobile %}
@@ -29,6 +29,8 @@
29
29
  position: relative;
30
30
  width: 100%;
31
31
  margin-top: 0;
32
+ margin-right: 0;
33
+ margin-left: 0;
32
34
  @include govuk-responsive-margin(6, "bottom", $adjustment: $button-shadow-size); // s2
33
35
  padding: (govuk-spacing(2) - $govuk-border-width-form-element) govuk-spacing(2) (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2)); // s1
34
36
  border: $govuk-border-width-form-element solid transparent;
@@ -14,6 +14,7 @@
14
14
  }
15
15
 
16
16
  .govuk-character-count__message {
17
+ @include govuk-font($size: false, $tabular: true);
17
18
  margin-top: 0;
18
19
  margin-bottom: 0;
19
20
  }
@@ -1018,7 +1018,7 @@ function CharacterCount ($module) {
1018
1018
  this.$module = $module;
1019
1019
  this.$textarea = $module.querySelector('.govuk-js-character-count');
1020
1020
  if (this.$textarea) {
1021
- this.$countMessage = $module.querySelector('[id=' + this.$textarea.id + '-info]');
1021
+ this.$countMessage = $module.querySelector('[id="' + this.$textarea.id + '-info"]');
1022
1022
  }
1023
1023
  }
1024
1024
 
@@ -222,6 +222,19 @@
222
222
  },
223
223
  "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"with-custom-error-class\">\n With custom error class\n </label>\n\n\n \n \n <span id=\"with-custom-error-class-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </span>\n\n <textarea class=\"govuk-textarea govuk-textarea--error govuk-js-character-count govuk-textarea--error app-character-count--custom-modifier\" id=\"with-custom-error-class\" name=\"with-custom-error-class\" rows=\"5\" aria-describedby=\"with-custom-error-class-info with-custom-error-class-error\"></textarea>\n</div>\n\n <div id=\"with-custom-error-class-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
224
224
  "hidden": true
225
+ },
226
+ {
227
+ "name": "with id starting with number",
228
+ "options": {
229
+ "name": "more-detail",
230
+ "id": "1_more-detail",
231
+ "maxlength": 10,
232
+ "label": {
233
+ "text": "Can you provide more detail?"
234
+ }
235
+ },
236
+ "html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"1_more-detail\">\n Can you provide more detail?\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"1_more-detail\" name=\"more-detail\" rows=\"5\" aria-describedby=\"1_more-detail-info\"></textarea>\n</div>\n\n <div id=\"1_more-detail-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
237
+ "hidden": true
225
238
  }
226
239
  ]
227
240
  }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,51 @@
1
+ @include govuk-exports("govuk/component/cookie-banner") {
2
+
3
+ // This needs to be kept in sync with the header component's styles
4
+ $border-bottom-width: govuk-spacing(2);
5
+
6
+ .govuk-cookie-banner {
7
+ @include govuk-font($size: 19);
8
+
9
+ padding-top: govuk-spacing(4);
10
+ // The component does not set bottom spacing.
11
+ // The bottom spacing should be created by the items inside the component.
12
+
13
+ // Visually separate the cookie banner from content underneath
14
+ // when user changes colours in their browser.
15
+ border-bottom: $border-bottom-width solid transparent;
16
+
17
+ background-color: govuk-colour("light-grey", $legacy: "grey-3");
18
+ }
19
+
20
+ // Support older browsers which don't hide elements with the `hidden` attribute
21
+ // when user hides the whole cookie banner with a 'Hide' button.
22
+ .govuk-cookie-banner[hidden] {
23
+ display: none;
24
+ }
25
+
26
+ .govuk-cookie-banner__message {
27
+ // Remove the extra height added by the separator border.
28
+ margin-bottom: -$border-bottom-width;
29
+
30
+ &[hidden] {
31
+ // Support older browsers which don't hide elements with the `hidden` attribute
32
+ // when the visibility of cookie and replacement messages is toggled.
33
+ display: none;
34
+ }
35
+
36
+ &:focus {
37
+ // Remove the native visible focus indicator when the element is programmatically focused.
38
+ //
39
+ // The focused cookie banner is the first element on the page and the last thing the user
40
+ // interacted with prior to it gaining focus.
41
+ // We therefore assume that moving focus to it is not going to surprise users, and that giving
42
+ // it a visible focus indicator could be more confusing than helpful, especially as the
43
+ // element is not normally keyboard operable.
44
+ //
45
+ // We have flagged this in the research section of the guidance as something to monitor.
46
+ //
47
+ // A related discussion: https://github.com/w3c/wcag/issues/1001
48
+ outline: none;
49
+ }
50
+ }
51
+ }