govuk_publishing_components 23.12.3 → 24.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/govuk_publishing_components/take-action-amber.svg +4 -0
  3. data/app/assets/images/govuk_publishing_components/take-action-green.svg +4 -0
  4. data/app/assets/images/govuk_publishing_components/take-action-red.svg +4 -0
  5. data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +0 -4
  6. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +44 -39
  7. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +0 -1
  8. data/app/assets/stylesheets/govuk_publishing_components/component_support.scss +0 -2
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +34 -17
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +14 -8
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_error-alert.scss +4 -4
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +35 -44
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +112 -47
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +8 -8
  15. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss +0 -5
  16. data/app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav.scss +2 -2
  17. data/app/models/govuk_publishing_components/component_doc.rb +1 -1
  18. data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +2 -8
  19. data/app/views/govuk_publishing_components/components/_document_list.html.erb +12 -2
  20. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +9 -4
  21. data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +2 -2
  22. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +21 -0
  23. data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +65 -1
  24. data/app/views/govuk_publishing_components/components/docs/document_list.yml +50 -7
  25. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +3 -3
  26. data/app/views/govuk_publishing_components/components/docs/layout_header.yml +11 -0
  27. data/app/views/govuk_publishing_components/components/docs/meta_tags.yml +99 -1
  28. data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +9 -4
  29. data/config/initializers/assets.rb +3 -1
  30. data/config/locales/cy.yml +6 -1
  31. data/config/locales/en.yml +8 -3
  32. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +183 -2
  33. data/lib/govuk_publishing_components/presenters/meta_tags.rb +2 -0
  34. data/lib/govuk_publishing_components/version.rb +1 -1
  35. data/node_modules/govuk-frontend/govuk/all.js +58 -1
  36. data/node_modules/govuk-frontend/govuk/components/_all.scss +2 -0
  37. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +25 -10
  38. data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +12 -6
  39. data/node_modules/govuk-frontend/govuk/components/back-link/macro-options.json +4 -4
  40. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +34 -13
  41. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro-options.json +1 -0
  42. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/template.njk +2 -2
  43. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +2 -0
  44. data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +74 -31
  45. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +1 -0
  46. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +1 -1
  47. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +85 -15
  48. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +1 -1
  49. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +145 -52
  50. data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +2 -2
  51. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
  52. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +51 -0
  53. data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +425 -0
  54. data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro-options.json +132 -0
  55. data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro.njk +3 -0
  56. data/node_modules/govuk-frontend/govuk/components/cookie-banner/template.njk +63 -0
  57. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +84 -34
  58. data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +1 -1
  59. data/node_modules/govuk-frontend/govuk/components/date-input/template.njk +1 -1
  60. data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +35 -15
  61. data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +21 -10
  62. data/node_modules/govuk-frontend/govuk/components/error-message/macro-options.json +1 -0
  63. data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +2 -12
  64. data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +86 -25
  65. data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +20 -10
  66. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +60 -13
  67. data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +37 -18
  68. data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +8 -5
  69. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +36 -18
  70. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +2 -2
  71. data/node_modules/govuk-frontend/govuk/components/header/template.njk +4 -4
  72. data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +17 -8
  73. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +130 -40
  74. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +1 -1
  75. data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +17 -8
  76. data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +20 -11
  77. data/node_modules/govuk-frontend/govuk/components/label/macro-options.json +1 -1
  78. data/node_modules/govuk-frontend/govuk/components/notification-banner/README.md +15 -0
  79. data/node_modules/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
  80. data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
  81. data/node_modules/govuk-frontend/govuk/components/notification-banner/fixtures.json +212 -0
  82. data/node_modules/govuk-frontend/govuk/components/notification-banner/macro-options.json +68 -0
  83. data/node_modules/govuk-frontend/govuk/components/notification-banner/macro.njk +3 -0
  84. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +61 -0
  85. data/node_modules/govuk-frontend/govuk/components/notification-banner/template.njk +47 -0
  86. data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +30 -13
  87. data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +20 -9
  88. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +167 -50
  89. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +97 -18
  90. data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +1 -1
  91. data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +21 -9
  92. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +118 -25
  93. data/node_modules/govuk-frontend/govuk/components/table/_index.scss +21 -0
  94. data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +92 -22
  95. data/node_modules/govuk-frontend/govuk/components/table/macro-options.json +2 -2
  96. data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +75 -18
  97. data/node_modules/govuk-frontend/govuk/components/tabs/macro-options.json +1 -1
  98. data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +28 -14
  99. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +68 -17
  100. data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +19 -14
  101. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +94 -0
  102. data/node_modules/govuk-frontend/govuk/objects/_all.scss +1 -0
  103. data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +94 -0
  104. data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +9 -0
  105. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +3 -0
  106. data/node_modules/govuk-frontend/package.json +1 -1
  107. metadata +20 -18
  108. data/app/assets/images/govuk_publishing_components/chevron-banner/chevron-banner-small-focus.svg +0 -4
  109. data/app/assets/images/govuk_publishing_components/chevron-banner/chevron-banner-small.svg +0 -4
  110. data/app/assets/javascripts/govuk_publishing_components/components/header.js +0 -8
  111. data/app/assets/javascripts/govuk_publishing_components/lib/auto-track-event.js +0 -31
  112. data/app/assets/stylesheets/govuk_publishing_components/components/_chevron-banner.scss +0 -138
  113. data/app/assets/stylesheets/govuk_publishing_components/components/_list.scss +0 -1
  114. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_variables.scss +0 -27
  115. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_back-arrow.scss +0 -13
  116. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_clearfix.scss +0 -8
  117. data/app/views/govuk_publishing_components/components/_chevron_banner.html.erb +0 -19
  118. data/app/views/govuk_publishing_components/components/_subscription-links.html.erb +0 -85
  119. data/app/views/govuk_publishing_components/components/_translation-nav.html.erb +0 -33
  120. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_related_links.html.erb +0 -6
  121. data/app/views/govuk_publishing_components/components/docs/chevron_banner.yml +0 -33
  122. data/app/views/govuk_publishing_components/components/docs/subscription-links.yml +0 -103
  123. data/app/views/govuk_publishing_components/components/docs/translation-nav.yml +0 -139
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0836916950b2ba5523342245a89390195dbc6687424656f229384afc5d079313'
4
- data.tar.gz: 838a58d52afa6587637a377cee6a68077b6eb8ff1fecb2edfe820775943e4be9
3
+ metadata.gz: aba99b9b513b88a9b3ac310bdca5299af17ff94d6c296a13e8087deb510ddf64
4
+ data.tar.gz: 9238695c7fac3e53a47cda06d2de2114b7036dd805f9acba97dfc91c13151cdb
5
5
  SHA512:
6
- metadata.gz: c04d9f5166eb2689a04e4b2307404d2f9e8c8aeeb419fd48d102351532b3c361e002b8e31b7901763eba35ff0ceb38bcf14db3042ef6757d7072ce4e6fd9d7c2
7
- data.tar.gz: 89cb76ebcb46366ffb1197e6031115d527ce40ae2eaf30301b8f6985df197875b34d4545e41512f9f789b1f7107f9beac28fc1a716be51990f8eacb9959dbed4
6
+ metadata.gz: 8c39fe32ea761ab5d7a4c01752430b909c96947c3e8dfc9126071392a2ec10234f1948f1a4ca8724cb379c13ed712b361cf2de68f71263d4b80010043add2ba3
7
+ data.tar.gz: 53e5a2d17340534140eedd509128853c27ea1c3633110c2039f7afd9f363fcbc3f152c73829cdd32a291867b655501f58b53a8a442bcb401dc4052073c7afb23
@@ -0,0 +1,4 @@
1
+ <svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="17.5" cy="17.5" r="17.5" fill="#FF5800"/>
3
+ <path d="M28.5 10L13.6739 24L6.5 17.2258" stroke="white" stroke-width="3"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="17.5" cy="17.5" r="17.5" fill="#0EBA72"/>
3
+ <path d="M28.5 10L13.6739 24L6.5 17.2258" stroke="white" stroke-width="3"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="17.5" cy="17.5" r="17.5" fill="#FF003B"/>
3
+ <path d="M28.5 10.5L13.6739 24.5L6.5 17.7258" stroke="white" stroke-width="3"/>
4
+ </svg>
@@ -85,10 +85,6 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
85
85
  this.$module.cookieBannerConfirmationMessage.style.display = 'block'
86
86
  }
87
87
 
88
- CookieBanner.prototype.listenForCrossOriginMessages = function () {
89
- window.addEventListener('message', this.receiveMessage.bind(this), false)
90
- }
91
-
92
88
  CookieBanner.prototype.isInCookiesPage = function () {
93
89
  return window.location.pathname === '/help/cookies'
94
90
  }
@@ -40,6 +40,15 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
40
40
  this.$module.sessionStoreLink = this.$module.sessionStoreLink + '_' + this.$module.uniqueId
41
41
  }
42
42
 
43
+ this.$module.upChevronSvg = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">' +
44
+ '<path class="gem-c-step-nav__chevron-stroke" d="M19.5 10C19.5 15.2467 15.2467 19.5 10 19.5C4.75329 19.5 0.499997 15.2467 0.499998 10C0.499999 4.7533 4.7533 0.500001 10 0.500002C15.2467 0.500003 19.5 4.7533 19.5 10Z" stroke="#1D70B8"/>' +
45
+ '<path class="gem-c-step-nav__chevron-stroke" d="M6.32617 12.3262L10 8.65234L13.6738 12.3262" stroke="#1D70B8" stroke-width="2"/>' +
46
+ '</svg>'
47
+ this.$module.downChevronSvg = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">' +
48
+ '<path class="gem-c-step-nav__chevron-stroke" d="M0.499997 10C0.499998 4.75329 4.75329 0.499999 10 0.499999C15.2467 0.5 19.5 4.75329 19.5 10C19.5 15.2467 15.2467 19.5 10 19.5C4.75329 19.5 0.499997 15.2467 0.499997 10Z" stroke="#1D70B8"/>' +
49
+ '<path class="gem-c-step-nav__chevron-stroke" d="M13.6738 8.67383L10 12.3477L6.32617 8.67383" stroke="#1D70B8" stroke-width="2"/>' +
50
+ '</svg>'
51
+
43
52
  var stepNavTracker = new this.StepNavTracker(this.$module.uniqueId, this.$module.totalSteps, this.$module.totalLinks)
44
53
 
45
54
  this.getTextForInsertedElements()
@@ -66,7 +75,10 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
66
75
  Gemstepnav.prototype.addShowHideAllButton = function () {
67
76
  var showall = document.createElement('div')
68
77
  showall.className = 'gem-c-step-nav__controls'
69
- showall.innerHTML = '<button aria-expanded="false" class="gem-c-step-nav__button gem-c-step-nav__button--controls js-step-controls-button">' + this.$module.actions.showAllText + '</button>'
78
+ showall.innerHTML = '<button aria-expanded="false" class="gem-c-step-nav__button gem-c-step-nav__button--controls js-step-controls-button">' +
79
+ '<span class="gem-c-step-nav__button-text gem-c-step-nav__button-text--all js-step-controls-button-text">' + this.$module.actions.showAllText + '</span>' +
80
+ '<span class="gem-c-step-nav__chevron js-step-controls-button-icon">' + this.$module.downChevronSvg + '</span>' +
81
+ '</button>'
70
82
 
71
83
  var steps = this.$module.querySelectorAll('.gem-c-step-nav__steps')[0]
72
84
  this.$module.insertBefore(showall, steps)
@@ -81,13 +93,20 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
81
93
  if (!thisel.querySelectorAll('.js-toggle-link').length) {
82
94
  var span = document.createElement('span')
83
95
  var showHideSpan = document.createElement('span')
96
+ var showHideSpanText = document.createElement('span')
97
+ var showHideSpanIcon = document.createElement('span')
84
98
  var commaSpan = document.createElement('span')
85
99
  var thisSectionSpan = document.createElement('span')
86
100
 
87
101
  showHideSpan.className = 'gem-c-step-nav__toggle-link js-toggle-link'
102
+ showHideSpanText.className = 'gem-c-step-nav__button-text js-toggle-link-text'
103
+ showHideSpanIcon.className = 'gem-c-step-nav__chevron js-toggle-link-icon'
88
104
  commaSpan.className = 'govuk-visually-hidden'
89
105
  thisSectionSpan.className = 'govuk-visually-hidden'
90
106
 
107
+ showHideSpan.appendChild(showHideSpanText)
108
+ showHideSpan.appendChild(showHideSpanIcon)
109
+
91
110
  commaSpan.innerHTML = ', '
92
111
  thisSectionSpan.innerHTML = ' this section'
93
112
 
@@ -114,7 +133,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
114
133
  var data = []
115
134
 
116
135
  for (var i = 0; i < this.$module.steps.length; i++) {
117
- var stepView = new this.StepView(this.$module.steps[i], this.$module.actions.showText, this.$module.actions.hideText)
136
+ var stepView = new this.StepView(this.$module.steps[i], this.$module)
118
137
  stepView.setIsShown(isShown)
119
138
 
120
139
  if (isShown) {
@@ -136,7 +155,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
136
155
  for (var i = 0; i < this.$module.steps.length; i++) {
137
156
  var thisel = this.$module.steps[i]
138
157
  var id = thisel.getAttribute('id')
139
- var stepView = new this.StepView(thisel, this.$module.actions.showText, this.$module.actions.hideText)
158
+ var stepView = new this.StepView(thisel, this.$module)
140
159
  var shouldBeShown = thisel.hasAttribute('data-show')
141
160
 
142
161
  // show the step if it has been remembered or if it has the 'data-show' attribute
@@ -165,7 +184,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
165
184
  '<button ' +
166
185
  'class="gem-c-step-nav__button gem-c-step-nav__button--title js-step-title-button" ' +
167
186
  'aria-expanded="false" aria-controls="' + contentId + '">' +
168
- '<span class="js-step-title-text">' + titleText + '</span>' +
187
+ '<span class="gem-c-step-nav__title-text js-step-title-text">' + titleText + '</span>' +
169
188
  '</button>' +
170
189
  '</span>'
171
190
  }
@@ -177,7 +196,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
177
196
 
178
197
  for (var i = 0; i < togglePanels.length; i++) {
179
198
  togglePanels[i].addEventListener('click', function (event) {
180
- var stepView = new that.StepView(this.parentNode, that.$module.actions.showText, that.$module.actions.hideText)
199
+ var stepView = new that.StepView(this.parentNode, that.$module)
181
200
  stepView.toggle()
182
201
 
183
202
  var stepIsOptional = this.parentNode.hasAttribute('data-optional')
@@ -321,34 +340,16 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
321
340
  var that = this
322
341
 
323
342
  this.$module.showOrHideAllButton.addEventListener('click', function (event) {
324
- var shouldshowAll
325
- var showHideTexts = that.$module.querySelectorAll('.js-toggle-link')
326
343
  var textContent = this.textContent || this.innerText
344
+ var shouldShowAll = textContent === that.$module.actions.showAllText
327
345
 
328
- if (textContent === that.$module.actions.showAllText) {
329
- that.$module.showOrHideAllButton.textContent = that.$module.actions.hideAllText
330
- for (var i = 0; i < showHideTexts.length; i++) {
331
- showHideTexts[i].innerHTML = that.$module.actions.hideText
332
- }
333
- shouldshowAll = true
334
-
335
- stepNavTracker.trackClick('pageElementInteraction', 'stepNavAllShown', {
336
- label: that.$module.actions.showAllText + ': ' + that.$module.stepNavSize
337
- })
338
- } else {
339
- that.$module.showOrHideAllButton.textContent = that.$module.actions.showAllText
340
- for (var j = 0; j < showHideTexts.length; j++) {
341
- showHideTexts[j].innerHTML = that.$module.actions.showText
342
- }
343
- shouldshowAll = false
344
-
345
- stepNavTracker.trackClick('pageElementInteraction', 'stepNavAllHidden', {
346
- label: that.$module.actions.hideAllText + ': ' + that.$module.stepNavSize
347
- })
348
- }
346
+ // Fire GA click tracking
347
+ stepNavTracker.trackClick('pageElementInteraction', (shouldShowAll ? 'stepNavAllShown' : 'stepNavAllHidden'), {
348
+ label: (shouldShowAll ? that.$module.actions.showAllText : that.$module.actions.hideAllText) + ': ' + that.$module.stepNavSize
349
+ })
349
350
 
350
- that.setAllStepsShownState(shouldshowAll)
351
- that.$module.showOrHideAllButton.setAttribute('aria-expanded', shouldshowAll)
351
+ that.setAllStepsShownState(shouldShowAll)
352
+ that.$module.showOrHideAllButton.setAttribute('aria-expanded', shouldShowAll)
352
353
  that.setShowHideAllText()
353
354
 
354
355
  return false
@@ -357,23 +358,25 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
357
358
 
358
359
  Gemstepnav.prototype.setShowHideAllText = function () {
359
360
  var shownSteps = this.$module.querySelectorAll('.step-is-shown').length
361
+
360
362
  // Find out if the number of is-opens == total number of steps
361
- if (shownSteps === this.$module.totalSteps) {
362
- this.$module.showOrHideAllButton.textContent = this.$module.actions.hideAllText
363
- } else {
364
- this.$module.showOrHideAllButton.textContent = this.$module.actions.showAllText
365
- }
363
+ var shownStepsIsTotalSteps = shownSteps === this.$module.totalSteps
364
+
365
+ this.$module.showOrHideAllButton.querySelector('.js-step-controls-button-text').innerHTML = shownStepsIsTotalSteps ? this.$module.actions.hideAllText : this.$module.actions.showAllText
366
+ this.$module.showOrHideAllButton.querySelector('.js-step-controls-button-icon').innerHTML = shownStepsIsTotalSteps ? this.$module.upChevronSvg : this.$module.downChevronSvg
366
367
  }
367
368
 
368
- Gemstepnav.prototype.StepView = function (stepElement, showText, hideText) {
369
+ Gemstepnav.prototype.StepView = function (stepElement, $module) {
369
370
  this.stepElement = stepElement
370
371
  this.stepContent = this.stepElement.querySelectorAll('.js-panel')[0]
371
372
  this.titleButton = this.stepElement.querySelectorAll('.js-step-title-button')[0]
372
373
  var textElement = this.stepElement.querySelectorAll('.js-step-title-text')[0]
373
374
  this.title = textElement.textContent || textElement.innerText
374
375
  this.title = this.title.replace(/^\s+|\s+$/g, '') // this is 'trim' but supporting IE8
375
- this.showText = showText
376
- this.hideText = hideText
376
+ this.showText = $module.actions.showText
377
+ this.hideText = $module.actions.hideText
378
+ this.upChevronSvg = $module.upChevronSvg
379
+ this.downChevronSvg = $module.downChevronSvg
377
380
 
378
381
  this.show = function () {
379
382
  this.setIsShown(true)
@@ -398,7 +401,9 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
398
401
 
399
402
  this.titleButton.setAttribute('aria-expanded', isShown)
400
403
  var showHideText = this.stepElement.querySelectorAll('.js-toggle-link')[0]
401
- showHideText.innerHTML = isShown ? this.hideText : this.showText
404
+
405
+ showHideText.querySelector('.js-toggle-link-text').innerHTML = isShown ? this.hideText : this.showText
406
+ showHideText.querySelector('.js-toggle-link-icon').innerHTML = isShown ? this.upChevronSvg : this.downChevronSvg
402
407
  }
403
408
 
404
409
  this.isShown = function () {
@@ -17,7 +17,6 @@
17
17
  @import "components/button";
18
18
  @import "components/character-count";
19
19
  @import "components/checkboxes";
20
- @import "components/chevron-banner";
21
20
  @import "components/contents-list";
22
21
  @import "components/contextual-guidance";
23
22
  @import "components/contextual-sidebar";
@@ -6,12 +6,10 @@
6
6
  @import "govuk/utilities/all";
7
7
  @import "govuk/overrides/all";
8
8
 
9
- @import "govuk_publishing_components/components/helpers/variables";
10
9
  @import "govuk_publishing_components/components/helpers/brand-colours";
11
10
  @import "govuk_publishing_components/components/helpers/link";
12
11
  @import "govuk_publishing_components/components/helpers/px-to-em";
13
12
  @import "govuk_publishing_components/components/mixins/govuk-template-link-focus-override";
14
13
  @import "govuk_publishing_components/components/mixins/media-down";
15
14
  @import "govuk_publishing_components/components/mixins/margins";
16
- @import "govuk_publishing_components/components/mixins/clearfix";
17
15
  @import "govuk_publishing_components/components/mixins/css3";
@@ -3,45 +3,38 @@ $transition-campaign-dark-blue: #1e1348;
3
3
 
4
4
  .gem-c-contextual-sidebar__brexit-related-links {
5
5
  border-top: 2px solid $govuk-brand-colour;
6
+ }
6
7
 
7
- .gem-c-contextual-sidebar__brexit-heading {
8
- @include govuk-font(19, $weight: bold);
9
- padding-top: govuk-spacing(3);
10
- margin-bottom: govuk-spacing(2);
11
- }
8
+ .gem-c-contextual-sidebar__brexit-heading {
9
+ @extend %govuk-heading-s;
10
+ margin-top: govuk-spacing(3);
11
+ margin-bottom: govuk-spacing(2);
12
12
  }
13
13
 
14
14
  .gem-c-contextual-sidebar__brexit-cta {
15
- @include govuk-font(19);
16
15
  margin-bottom: govuk-spacing(6);
17
16
  background-color: govuk-colour('light-grey', $legacy: 'grey-4');
18
- border-top: 4px solid $transition-campaign-red;
17
+ border-top: 2px solid $transition-campaign-red;
19
18
  display: block;
20
- padding: govuk-spacing(3);
19
+ padding: 0 govuk-spacing(3) govuk-spacing(3);
21
20
  text-decoration: none;
22
21
 
23
22
  .gem-c-contextual-sidebar__brexit-heading {
24
- @extend %govuk-heading-m;
25
- color: $transition-campaign-dark-blue;
23
+ color: $govuk-text-colour;
26
24
  }
27
25
 
28
26
  .gem-c-contextual-sidebar__brexit-text {
29
27
  @extend %govuk-link;
28
+ @include govuk-font(16);
30
29
 
31
30
  margin-top: 0;
32
- margin-bottom: 0;
31
+ margin-bottom: govuk-spacing(1);
33
32
  text-decoration: underline;
34
33
 
35
34
  @include govuk-media-query($from: tablet) {
36
35
  margin-bottom: govuk-spacing(2);
37
36
  }
38
37
  }
39
-
40
- @include govuk-compatibility(govuk_template) {
41
- .gem-c-contextual-sidebar__brexit-title {
42
- margin-bottom: govuk-spacing(3);
43
- }
44
- }
45
38
  }
46
39
 
47
40
  .gem-c-contextual-sidebar__brexit-cta:focus {
@@ -49,3 +42,27 @@ $transition-campaign-dark-blue: #1e1348;
49
42
  text-decoration: none;
50
43
  }
51
44
  }
45
+
46
+ .gem-c-contextual-sidebar__take-action-traffic-lights {
47
+ text-align: left;
48
+ margin-bottom: govuk-spacing(2);
49
+ }
50
+
51
+ .gem-c-contextual-sidebar__take-action-traffic-lights > li {
52
+ white-space: nowrap;
53
+ display: inline;
54
+ margin-right: 7px;
55
+ margin-bottom: govuk-spacing(1);
56
+ }
57
+
58
+ .gem-c-contextual-sidebar__take-action-traffic-lists-icon {
59
+ vertical-align: middle;
60
+ margin-top: -2px;
61
+ width: 22px;
62
+ margin-right: 2px;
63
+ }
64
+
65
+ .gem-c-contextual-sidebar__take-action-traffic-lists-text {
66
+ @include govuk-font($size: 19, $weight: bold, $line-height: 2);
67
+ vertical-align: middle;
68
+ }
@@ -7,14 +7,10 @@
7
7
 
8
8
  .gem-c-document-list__item {
9
9
  overflow: hidden;
10
- margin-bottom: govuk-spacing(4);
11
- padding-bottom: govuk-spacing(4);
12
- border-bottom: 1px solid $govuk-border-colour;
10
+ margin-bottom: govuk-spacing(5);
11
+ padding-top: govuk-spacing(2);
12
+ border-top: 1px solid $govuk-border-colour;
13
13
  list-style: none;
14
-
15
- &:last-child {
16
- border-bottom: 0;
17
- }
18
14
  }
19
15
 
20
16
  .gem-c-document-list__item-title {
@@ -33,6 +29,12 @@
33
29
  }
34
30
  }
35
31
 
32
+ .gem-c-document-list--no-top-border {
33
+ .gem-c-document-list__item {
34
+ border-top: none;
35
+ }
36
+ }
37
+
36
38
  .gem-c-document-list__item-title--context {
37
39
  margin-right: govuk-spacing(2);
38
40
 
@@ -52,7 +54,7 @@
52
54
  }
53
55
 
54
56
  .gem-c-document-list__subtext {
55
- margin: govuk-spacing(1) 0 0 0;
57
+ margin: 0;
56
58
  }
57
59
 
58
60
  .gem-c-document-list__item-description,
@@ -60,6 +62,10 @@
60
62
  @include govuk-font($size: 16, $line-height: 1.5);
61
63
  }
62
64
 
65
+ .gem-c-document-list__item-description--full-size {
66
+ @include govuk-font($size: 19);
67
+ }
68
+
63
69
  .gem-c-document-list__item-metadata {
64
70
  padding: 0;
65
71
  }
@@ -1,12 +1,12 @@
1
1
  .gem-c-error-alert {
2
- color: $gem-text-colour;
2
+ color: $govuk-text-colour;
3
3
  padding: govuk-spacing(3);
4
- border: $gem-border-width-mobile solid $gem-error-colour;
4
+ border: $govuk-border-width-narrow solid $govuk-error-colour;
5
5
  @include govuk-responsive-margin(8, "bottom");
6
6
 
7
7
  @include govuk-media-query($from: tablet) {
8
8
  padding: govuk-spacing(4);
9
- border-width: $gem-border-width-tablet;
9
+ border-width: $govuk-border-width;
10
10
  }
11
11
  }
12
12
 
@@ -32,5 +32,5 @@
32
32
  }
33
33
 
34
34
  .gem-c-error-alert:focus {
35
- outline: $gem-focus-width solid $gem-focus-colour;
35
+ outline: $govuk-focus-width solid $govuk-focus-colour;
36
36
  }
@@ -8,41 +8,6 @@
8
8
  }
9
9
  }
10
10
 
11
- // hide without js
12
- // show with js, unless also has the js-hidden class
13
- .gem-c-feedback__js-show,
14
- .gem-c-feedback__prompt-success,
15
- .gem-c-feedback__prompt-questions,
16
- .gem-c-feedback__error-summary {
17
- display: none;
18
-
19
- .js-enabled & {
20
- display: block;
21
-
22
- &.js-hidden {
23
- display: none;
24
- }
25
- }
26
- }
27
-
28
- // maintain table display for prompt and prompt-questions
29
- .js-enabled .gem-c-feedback__prompt {
30
- @include govuk-media-query($from: tablet) {
31
- display: table;
32
- }
33
- }
34
-
35
- .js-enabled .gem-c-feedback__prompt-questions {
36
- @include govuk-media-query($from: tablet) {
37
- display: table-cell;
38
- }
39
- }
40
-
41
- // show the default feedback form without js
42
- .js-enabled .gem-c-feedback__form.js-hidden {
43
- display: none;
44
- }
45
-
46
11
  .gem-c-feedback__prompt-questions {
47
12
  text-align: center;
48
13
  border-bottom: 1px solid govuk-colour("white");
@@ -137,15 +102,6 @@
137
102
  .gem-c-feedback__email-link,
138
103
  .gem-c-feedback__prompt-link {
139
104
  position: relative;
140
-
141
- &:after {
142
- content: "";
143
- position: absolute;
144
- top: -14px;
145
- right: -14px;
146
- left: -14px;
147
- bottom: -14px;
148
- }
149
105
  }
150
106
 
151
107
  .gem-c-feedback__prompt-link:link,
@@ -282,3 +238,38 @@
282
238
  outline: $govuk-focus-width solid $govuk-focus-colour;
283
239
  }
284
240
  }
241
+
242
+ // hide without js
243
+ // show with js, unless also has the js-hidden class
244
+ .gem-c-feedback__js-show,
245
+ .gem-c-feedback__prompt-success,
246
+ .gem-c-feedback__prompt-questions,
247
+ .gem-c-feedback__error-summary {
248
+ display: none;
249
+
250
+ .js-enabled & {
251
+ display: block;
252
+
253
+ &.js-hidden {
254
+ display: none;
255
+ }
256
+ }
257
+ }
258
+
259
+ // maintain table display for prompt and prompt-questions
260
+ .js-enabled .gem-c-feedback__prompt {
261
+ @include govuk-media-query($from: tablet) {
262
+ display: table;
263
+ }
264
+ }
265
+
266
+ .js-enabled .gem-c-feedback__prompt-questions {
267
+ @include govuk-media-query($from: tablet) {
268
+ display: table-cell;
269
+ }
270
+ }
271
+
272
+ // show the default feedback form without js
273
+ .js-enabled .gem-c-feedback__form.js-hidden {
274
+ display: none;
275
+ }