diff --git a/Gemfile.lock b/Gemfile.lock
index 9b04fb4845..6f1b4aede4 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -10,6 +10,7 @@ PATH
rouge
sprockets (>= 3)
sprockets-rails
+ terser
GEM
remote: https://rubygems.org/
diff --git a/app/assets/config/govuk_publishing_components_manifest.js b/app/assets/config/govuk_publishing_components_manifest.js
index 2fe27c8045..5d2f149b13 100644
--- a/app/assets/config/govuk_publishing_components_manifest.js
+++ b/app/assets/config/govuk_publishing_components_manifest.js
@@ -1,7 +1,8 @@
// Pre-compile image and font assets from here and govuk-frontend
//= link_tree ../images
-//= link_tree ../../../node_modules/govuk-frontend/govuk/assets/images
-//= link_tree ../../../node_modules/govuk-frontend/govuk/assets/fonts
+//= link_tree ../../../node_modules/govuk-frontend/dist/govuk/assets/images
+//= link_tree ../../../node_modules/govuk-frontend/dist/govuk/assets/fonts
+//= link_tree ../../../node_modules/govuk-frontend/dist/govuk/assets
// Create asset files of each of the files in these directory
//= link_directory ../javascripts/component_guide
diff --git a/app/assets/config/govuk_publishing_components_sassc-rails_manifest.js b/app/assets/config/govuk_publishing_components_sassc-rails_manifest.js
index e738d35d46..c8a4559df8 100644
--- a/app/assets/config/govuk_publishing_components_sassc-rails_manifest.js
+++ b/app/assets/config/govuk_publishing_components_sassc-rails_manifest.js
@@ -1,7 +1,7 @@
// Pre-compile image and font assets from here and govuk-frontend
//= link_tree ../images
-//= link_tree ../../../node_modules/govuk-frontend/govuk/assets/images
-//= link_tree ../../../node_modules/govuk-frontend/govuk/assets/fonts
+//= link_tree ../../../node_modules/govuk-frontend/dist/govuk/assets/images
+//= link_tree ../../../node_modules/govuk-frontend/dist/govuk/assets/fonts
// Create asset files of each of the files in these directory
//= link_directory ../javascripts/component_guide
diff --git a/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-auto-tracker.js b/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-auto-tracker.js
index 9f36748f2d..8eec07a8d0 100644
--- a/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-auto-tracker.js
+++ b/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-auto-tracker.js
@@ -8,6 +8,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
this.module = module
this.trackingTrigger = 'data-ga4-auto'
this.PIIRemover = new window.GOVUK.analyticsGa4.PIIRemover()
+
+ this.init()
}
Ga4AutoTracker.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-ecommerce-tracker.js b/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-ecommerce-tracker.js
index 7404004b18..23db841d23 100644
--- a/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-ecommerce-tracker.js
+++ b/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-ecommerce-tracker.js
@@ -1,4 +1,3 @@
-//= require govuk/vendor/polyfills/Element/prototype/closest.js
;(function (global) {
'use strict'
diff --git a/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js b/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js
index 6df16f3a9f..f1a2ce36b4 100644
--- a/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js
+++ b/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js
@@ -8,6 +8,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
function Ga4EventTracker (module) {
this.module = module
this.trackingTrigger = 'data-ga4-event' // elements with this attribute get tracked
+
+ this.init()
}
Ga4EventTracker.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-link-tracker.js b/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-link-tracker.js
index 946a3d0016..849e45c09f 100644
--- a/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-link-tracker.js
+++ b/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-link-tracker.js
@@ -11,6 +11,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
this.trackLinksOnly = this.module.hasAttribute('data-ga4-track-links-only')
this.limitToElementClass = this.module.getAttribute('data-ga4-limit-to-element-class')
this.PIIRemover = new window.GOVUK.analyticsGa4.PIIRemover()
+
+ this.init()
}
Ga4LinkTracker.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-specialist-link-tracker.js b/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-specialist-link-tracker.js
index 3b4e0cbe30..468fbeaf67 100644
--- a/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-specialist-link-tracker.js
+++ b/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-specialist-link-tracker.js
@@ -1,4 +1,3 @@
-// = require govuk/vendor/polyfills/Element/prototype/closest.js
window.GOVUK = window.GOVUK || {}
window.GOVUK.analyticsGa4 = window.GOVUK.analyticsGa4 || {}
window.GOVUK.analyticsGa4.analyticsModules = window.GOVUK.analyticsGa4.analyticsModules || {};
diff --git a/app/assets/javascripts/govuk_publishing_components/analytics/auto-scroll-tracker.js b/app/assets/javascripts/govuk_publishing_components/analytics/auto-scroll-tracker.js
index 73306b007d..84076cd0bc 100644
--- a/app/assets/javascripts/govuk_publishing_components/analytics/auto-scroll-tracker.js
+++ b/app/assets/javascripts/govuk_publishing_components/analytics/auto-scroll-tracker.js
@@ -14,6 +14,8 @@ window.GOVUK.analyticsVars = window.GOVUK.analyticsVars || {};
resizeTimeoutDelay: 100,
pageHeightTimeoutDelay: 500
}
+
+ this.init()
}
AutoScrollTracker.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/analytics/auto-track-event.js b/app/assets/javascripts/govuk_publishing_components/analytics/auto-track-event.js
index 9d367447c7..a7e9d133a0 100644
--- a/app/assets/javascripts/govuk_publishing_components/analytics/auto-track-event.js
+++ b/app/assets/javascripts/govuk_publishing_components/analytics/auto-track-event.js
@@ -4,6 +4,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
(function (Modules) {
function AutoTrackEvent ($module) {
this.$module = $module
+
+ this.init()
}
AutoTrackEvent.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/analytics/cross-domain-tracking.js b/app/assets/javascripts/govuk_publishing_components/analytics/cross-domain-tracking.js
index 63c5155300..3b89b288a0 100644
--- a/app/assets/javascripts/govuk_publishing_components/analytics/cross-domain-tracking.js
+++ b/app/assets/javascripts/govuk_publishing_components/analytics/cross-domain-tracking.js
@@ -5,6 +5,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
function CrossDomainTracking ($module) {
this.$module = $module
Modules.crossDomainLinkedTrackers = Modules.crossDomainLinkedTrackers || []
+
+ this.init()
}
CrossDomainTracking.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/analytics/explicit-cross-domain-links.js b/app/assets/javascripts/govuk_publishing_components/analytics/explicit-cross-domain-links.js
index e0dabf3040..ec75a0e34b 100644
--- a/app/assets/javascripts/govuk_publishing_components/analytics/explicit-cross-domain-links.js
+++ b/app/assets/javascripts/govuk_publishing_components/analytics/explicit-cross-domain-links.js
@@ -4,6 +4,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
(function (Modules) {
function ExplicitCrossDomainLinks ($module) {
this.$module = $module
+
+ this.init()
}
ExplicitCrossDomainLinks.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/analytics/external-link-tracker.js b/app/assets/javascripts/govuk_publishing_components/analytics/external-link-tracker.js
index 50d4f5fdec..c130f37e5c 100644
--- a/app/assets/javascripts/govuk_publishing_components/analytics/external-link-tracker.js
+++ b/app/assets/javascripts/govuk_publishing_components/analytics/external-link-tracker.js
@@ -1,4 +1,3 @@
-// = require govuk/vendor/polyfills/Element/prototype/closest.js
;(function (global) {
'use strict'
diff --git a/app/assets/javascripts/govuk_publishing_components/analytics/track-click.js b/app/assets/javascripts/govuk_publishing_components/analytics/track-click.js
index 03e3f51419..8cab9277fd 100644
--- a/app/assets/javascripts/govuk_publishing_components/analytics/track-click.js
+++ b/app/assets/javascripts/govuk_publishing_components/analytics/track-click.js
@@ -6,6 +6,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
(function (Modules) {
function GemTrackClick ($module) {
this.$module = $module
+
+ this.init()
}
GemTrackClick.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/analytics/track-select-change.js b/app/assets/javascripts/govuk_publishing_components/analytics/track-select-change.js
index 21d50d58ee..ba4829f538 100644
--- a/app/assets/javascripts/govuk_publishing_components/analytics/track-select-change.js
+++ b/app/assets/javascripts/govuk_publishing_components/analytics/track-select-change.js
@@ -4,6 +4,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
(function (Modules) {
function TrackSelectChange ($module) {
this.$module = $module
+
+ this.init()
}
TrackSelectChange.prototype.init = function ($module) {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/accordion.js b/app/assets/javascripts/govuk_publishing_components/components/accordion.js
index e56818c510..b959d781c7 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/accordion.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/accordion.js
@@ -1,7 +1,7 @@
/* global nodeListForEach */
// = require ../vendor/polyfills/common.js
// This component relies on JavaScript from GOV.UK Frontend
-// = require govuk/components/accordion/accordion.js
+// = require govuk/components/accordion/accordion.bundle.js
window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {}
window.GOVUK.Modules.GovukAccordion = window.GOVUKFrontend.Accordion;
@@ -21,6 +21,8 @@ window.GOVUK.Modules.GovukAccordion = window.GOVUKFrontend.Accordion;
// language attribute pulled from data attributes
this.$module.actions = {}
this.$module.actions.locale = this.$module.getAttribute('data-locale')
+
+ this.init()
}
GemAccordion.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/button.js b/app/assets/javascripts/govuk_publishing_components/components/button.js
index 7f95df0a54..74008eb64c 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/button.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/button.js
@@ -1,5 +1,5 @@
// This component relies on JavaScript from GOV.UK Frontend
-// = require govuk/components/button/button.js
+// = require govuk/components/button/button.bundle.js
window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {}
window.GOVUK.Modules.GovukButton = window.GOVUKFrontend.Button
diff --git a/app/assets/javascripts/govuk_publishing_components/components/character-count.js b/app/assets/javascripts/govuk_publishing_components/components/character-count.js
index 3fac518369..78c9a1e7a0 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/character-count.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/character-count.js
@@ -1,5 +1,5 @@
// This component relies on JavaScript from GOV.UK Frontend
-// = require govuk/components/character-count/character-count.js
+// = require govuk/components/character-count/character-count.bundle.js
window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {}
window.GOVUK.Modules.GovukCharacterCount = window.GOVUKFrontend.CharacterCount
diff --git a/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js b/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js
index 2670693873..b802198660 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js
@@ -1,5 +1,4 @@
-// = require govuk/vendor/polyfills/Element/prototype/closest.js
-// = require govuk/components/checkboxes/checkboxes.js
+// = require govuk/components/checkboxes/checkboxes.bundle.js
window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {}
window.GOVUK.Modules.GovukCheckboxes = window.GOVUKFrontend.Checkboxes;
@@ -9,6 +8,8 @@ window.GOVUK.Modules.GovukCheckboxes = window.GOVUKFrontend.Checkboxes;
this.$module = $module
this.$checkboxes = this.$module.querySelectorAll('input[type=checkbox]')
this.$nestedCheckboxes = this.$module.querySelectorAll('[data-nested=true] input[type=checkbox]')
+
+ this.init()
}
GemCheckboxes.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/contextual-guidance.js b/app/assets/javascripts/govuk_publishing_components/components/contextual-guidance.js
index 6ae776b654..0b0b094426 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/contextual-guidance.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/contextual-guidance.js
@@ -7,6 +7,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
this.$guidance = this.$module.querySelector('.gem-c-contextual-guidance__wrapper')
this.$inputId = this.$guidance.getAttribute('for')
this.$input = this.$module.querySelector('#' + this.$inputId)
+
+ this.init()
}
ContextualGuidance.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js b/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js
index f982eee389..7e26de8e48 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js
@@ -6,6 +6,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
this.$module = $module
this.$module.cookieBannerConfirmationMessage = this.$module.querySelector('.gem-c-cookie-banner__confirmation')
this.$module.cookieBannerConfirmationMessageText = this.$module.querySelector('.gem-c-cookie-banner__confirmation-message')
+
+ this.init()
}
CookieBanner.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/copy-to-clipboard.js b/app/assets/javascripts/govuk_publishing_components/components/copy-to-clipboard.js
index 9310e4ca82..bd69aa8186 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/copy-to-clipboard.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/copy-to-clipboard.js
@@ -6,6 +6,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
this.$module = $module
this.$input = this.$module.querySelector('.gem-c-input')
this.$copyButton = this.$module.querySelector('.gem-c-button')
+
+ this.init()
}
CopyToClipboard.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/cross-service-header.js b/app/assets/javascripts/govuk_publishing_components/components/cross-service-header.js
index 9c53e27926..af789cc3e2 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/cross-service-header.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/cross-service-header.js
@@ -11,6 +11,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
this.$header = $module
this.$navigation = $module && $module.querySelectorAll('[data-one-login-header-nav]')
this.$numberOfNavs = this.$navigation && this.$navigation.length
+
+ this.init()
}
/**
* Initialise header
diff --git a/app/assets/javascripts/govuk_publishing_components/components/details.js b/app/assets/javascripts/govuk_publishing_components/components/details.js
index 36665e5758..ed15d126e7 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/details.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/details.js
@@ -1,7 +1,5 @@
-// = require govuk/components/details/details.js
window.GOVUK = window.GOVUK || {}
-window.GOVUK.Modules = window.GOVUK.Modules || {}
-window.GOVUK.Modules.GovukDetails = window.GOVUKFrontend.Details;
+window.GOVUK.Modules = window.GOVUK.Modules || {};
(function (Modules) {
function GemDetails ($module) {
@@ -10,6 +8,8 @@ window.GOVUK.Modules.GovukDetails = window.GOVUKFrontend.Details;
this.customTrackLabel = this.$summary.getAttribute('data-track-label')
this.detailsClick = this.$module.querySelector('[data-details-track-click]')
+
+ this.init()
}
GemDetails.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/error-summary.js b/app/assets/javascripts/govuk_publishing_components/components/error-summary.js
index 8378ed13e5..60fe3008f8 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/error-summary.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/error-summary.js
@@ -1,5 +1,5 @@
// This component relies on JavaScript from GOV.UK Frontend
-// = require govuk/components/error-summary/error-summary.js
+// = require govuk/components/error-summary/error-summary.bundle.js
window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {}
window.GOVUK.Modules.GovukErrorSummary = window.GOVUKFrontend.ErrorSummary
diff --git a/app/assets/javascripts/govuk_publishing_components/components/feedback.js b/app/assets/javascripts/govuk_publishing_components/components/feedback.js
index 796db2568e..0809b2057f 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/feedback.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/feedback.js
@@ -21,6 +21,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
this.jshiddenClass = 'js-hidden'
this.whatDoingInput = this.$module.querySelector('[name=what_doing]')
this.whatWrongInput = this.$module.querySelector('[name=what_wrong]')
+
+ // this.init()
}
Feedback.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/govspeak.js b/app/assets/javascripts/govuk_publishing_components/components/govspeak.js
index 505c63ba51..aa916aeba2 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/govspeak.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/govspeak.js
@@ -4,6 +4,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
(function (Modules) {
function Govspeak ($module) {
this.$module = $module
+
+ this.init()
}
Govspeak.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/image-card.js b/app/assets/javascripts/govuk_publishing_components/components/image-card.js
index aac62e987a..084d9a51db 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/image-card.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/image-card.js
@@ -5,6 +5,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
function ImageCard ($module) {
this.$module = $module
this.$module.youtubeLink = this.$module.querySelector('.gem-c-image-card__image-wrapper div')
+
+ this.init()
}
ImageCard.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/intervention.js b/app/assets/javascripts/govuk_publishing_components/components/intervention.js
index 1ea158a31a..e60c7c69fb 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/intervention.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/intervention.js
@@ -7,6 +7,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
this.$closeLink = this.$module.querySelector('.js-dismiss-link')
this.$campaignName = this.$module.getAttribute('data-intervention-name')
this.$campaignCookie = window.GOVUK.cookie('intervention_campaign') || ''
+
+ this.init()
}
Intervention.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/layout-header.js b/app/assets/javascripts/govuk_publishing_components/components/layout-header.js
index b4c526acb0..a3ac49d8cf 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/layout-header.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/layout-header.js
@@ -1,5 +1,5 @@
// This component relies on JavaScript from GOV.UK Frontend
-// = require govuk/components/header/header.js
+// = require govuk/components/header/header.bundle.js
window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {}
window.GOVUK.Modules.GovukHeader = window.GOVUKFrontend.Header
diff --git a/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js b/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js
index 553123fea2..448d342043 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js
@@ -1,5 +1,3 @@
-//= require govuk/vendor/polyfills/Element/prototype/classList.js
-
window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {};
@@ -107,6 +105,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
)
this.hiddenButtons = this.$module.querySelectorAll('button[hidden]')
+
+ this.init()
}
SuperNavigationMegaMenu.prototype.buttonHandler = function (event) {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/metadata.js b/app/assets/javascripts/govuk_publishing_components/components/metadata.js
index 0c85703cf4..d73a37f0c5 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/metadata.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/metadata.js
@@ -4,6 +4,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
(function (Modules) {
function Metadata ($module) {
this.$module = $module
+
+ this.init()
}
Metadata.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/modal-dialogue.js b/app/assets/javascripts/govuk_publishing_components/components/modal-dialogue.js
index 241647d07d..d5c73f8c20 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/modal-dialogue.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/modal-dialogue.js
@@ -8,6 +8,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
this.$closeButton = this.$module.querySelector('.gem-c-modal-dialogue__close-button')
this.$html = document.querySelector('html')
this.$body = document.querySelector('body')
+
+ this.init()
}
ModalDialogue.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/option-select.js b/app/assets/javascripts/govuk_publishing_components/components/option-select.js
index f25a1b1e9b..98d23b2653 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/option-select.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/option-select.js
@@ -19,6 +19,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
this.mq = window.matchMedia('(min-width: 641px)')
this.isClosedOnLoad = this.$optionSelect.getAttribute('data-closed-on-load')
this.isClosedOnLoadMobile = this.$optionSelect.getAttribute('data-closed-on-load-mobile')
+
+ this.init()
}
OptionSelect.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/print-link.js b/app/assets/javascripts/govuk_publishing_components/components/print-link.js
index 8a6bb78a86..8834b4764e 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/print-link.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/print-link.js
@@ -4,6 +4,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
(function (Modules) {
function PrintLink ($module) {
this.$module = $module
+
+ this.init()
}
PrintLink.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/radio.js b/app/assets/javascripts/govuk_publishing_components/components/radio.js
index 0ede1d0f19..76597f39d0 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/radio.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/radio.js
@@ -1,5 +1,5 @@
// This component relies on JavaScript from GOV.UK Frontend
-// = require govuk/components/radios/radios.js
+// = require govuk/components/radios/radios.bundle.js
window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {}
window.GOVUK.Modules.GovukRadios = window.GOVUKFrontend.Radios
diff --git a/app/assets/javascripts/govuk_publishing_components/components/reorderable-list.js b/app/assets/javascripts/govuk_publishing_components/components/reorderable-list.js
index 8cf4d117b5..8f0233d2eb 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/reorderable-list.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/reorderable-list.js
@@ -7,6 +7,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
this.$module = $module
this.$upButtons = this.$module.querySelectorAll('.js-reorderable-list-up')
this.$downButtons = this.$module.querySelectorAll('.js-reorderable-list-down')
+
+ this.init()
}
ReorderableList.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/single-page-notification-button.js b/app/assets/javascripts/govuk_publishing_components/components/single-page-notification-button.js
index 13faee1536..4f47dc8f66 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/single-page-notification-button.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/single-page-notification-button.js
@@ -12,6 +12,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
this.personalisationEndpoint = '/api/personalisation/check-email-subscription?base_path=' + this.basePath
// This attribute is passed through to the personalisation API to ensure the updated button has the same button_location for analytics
if (this.buttonLocation) this.personalisationEndpoint += '&button_location=' + this.buttonLocation
+
+ this.init()
}
SinglePageNotificationButton.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/skip-link.js b/app/assets/javascripts/govuk_publishing_components/components/skip-link.js
index bb2da95709..ea922326a7 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/skip-link.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/skip-link.js
@@ -1,5 +1,5 @@
// This component relies on JavaScript from GOV.UK Frontend
-// = require govuk/components/skip-link/skip-link.js
+// = require govuk/components/skip-link/skip-link.bundle.js
window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {}
window.GOVUK.Modules.GovukSkipLink = window.GOVUKFrontend.SkipLink
diff --git a/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js b/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js
index f6a3694d31..bb4d6ab229 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js
@@ -1,7 +1,3 @@
-//= require govuk/vendor/polyfills/Element/prototype/classList.js
-//= require ../vendor/polyfills/closest.js
-//= require ../vendor/polyfills/indexOf.js
-
window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {};
@@ -16,6 +12,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
this.$module.activeStepClass = 'gem-c-step-nav__step--active'
this.$module.activeLinkHref = '#content'
this.$module.uniqueId = false
+
+ this.init()
}
Gemstepnav.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/table.js b/app/assets/javascripts/govuk_publishing_components/components/table.js
index b9b262ebcb..a9ede75aae 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/table.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/table.js
@@ -16,6 +16,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
for (var i = 0; i < this.tableRows.length; i++) {
this.tableRowsContent.push(this.tableRows[i].textContent.toUpperCase())
}
+
+ this.init()
}
Table.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/components/tabs.js b/app/assets/javascripts/govuk_publishing_components/components/tabs.js
index 512e0fa063..12030312d2 100644
--- a/app/assets/javascripts/govuk_publishing_components/components/tabs.js
+++ b/app/assets/javascripts/govuk_publishing_components/components/tabs.js
@@ -1,5 +1,5 @@
// This component relies on JavaScript from GOV.UK Frontend
-// = require govuk/components/tabs/tabs.js
+// = require govuk/components/tabs/tabs.bundle.js
window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {}
window.GOVUK.Modules.GovukTabs = window.GOVUKFrontend.Tabs
diff --git a/app/assets/javascripts/govuk_publishing_components/lib/cookie-settings.js b/app/assets/javascripts/govuk_publishing_components/lib/cookie-settings.js
index 45c01eb8ab..5d841316ec 100644
--- a/app/assets/javascripts/govuk_publishing_components/lib/cookie-settings.js
+++ b/app/assets/javascripts/govuk_publishing_components/lib/cookie-settings.js
@@ -4,6 +4,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
(function (Modules) {
function CookieSettings ($module) {
this.$module = $module
+
+ this.init()
}
CookieSettings.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js b/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js
index 55f4df8bb2..38379e3bf4 100644
--- a/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js
+++ b/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js
@@ -1,4 +1,3 @@
-//= require govuk/vendor/polyfills/Element/prototype/classList.js
// This is a non-jQuery version of Magna Charta: https://github.com/alphagov/magna-charta
window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {};
diff --git a/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js b/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js
index 96ddd21ed8..8657d70788 100644
--- a/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js
+++ b/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js
@@ -6,6 +6,8 @@
var YoutubeLinkEnhancement = function ($element, $classOverride) {
this.$element = $element
this.$classOverride = typeof $classOverride !== 'undefined' ? $classOverride : 'gem-c-govspeak__youtube-video'
+
+ this.init()
}
YoutubeLinkEnhancement.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/lib/initial-focus.js b/app/assets/javascripts/govuk_publishing_components/lib/initial-focus.js
index cd5af39a02..404d049047 100644
--- a/app/assets/javascripts/govuk_publishing_components/lib/initial-focus.js
+++ b/app/assets/javascripts/govuk_publishing_components/lib/initial-focus.js
@@ -4,6 +4,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
(function (Modules) {
function InitialFocus ($module) {
this.$module = $module
+
+ this.init()
}
InitialFocus.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/lib/toggle-input-class-on-focus.js b/app/assets/javascripts/govuk_publishing_components/lib/toggle-input-class-on-focus.js
index 8ed4a6fa12..020f741761 100644
--- a/app/assets/javascripts/govuk_publishing_components/lib/toggle-input-class-on-focus.js
+++ b/app/assets/javascripts/govuk_publishing_components/lib/toggle-input-class-on-focus.js
@@ -1,4 +1,3 @@
-//= require govuk/vendor/polyfills/Element/prototype/classList.js
/*
Toggle the class 'focus' on input boxes on element focus/blur
Used by the search component but generic enough for reuse
@@ -9,6 +8,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
(function (Modules) {
function GemToggleInputClassOnFocus ($module) {
this.$module = $module
+
+ this.init()
}
GemToggleInputClassOnFocus.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/lib/toggle.js b/app/assets/javascripts/govuk_publishing_components/lib/toggle.js
index d790e0cdc7..67b6bf5b11 100644
--- a/app/assets/javascripts/govuk_publishing_components/lib/toggle.js
+++ b/app/assets/javascripts/govuk_publishing_components/lib/toggle.js
@@ -89,6 +89,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
(function (Modules) {
function GemToggle ($module) {
this.$module = $module
+
+ this.init()
}
GemToggle.prototype.init = function () {
diff --git a/app/assets/javascripts/govuk_publishing_components/modules.js b/app/assets/javascripts/govuk_publishing_components/modules.js
index 2a1c44a8c5..8085dbc545 100644
--- a/app/assets/javascripts/govuk_publishing_components/modules.js
+++ b/app/assets/javascripts/govuk_publishing_components/modules.js
@@ -37,9 +37,10 @@
var started = element.getAttribute('data-' + moduleNames[j] + '-module-started')
if (typeof GOVUK.Modules[moduleName] === 'function' && !started) {
// Vanilla JavaScript GOV.UK Modules and GOV.UK Frontend Modules
- if (GOVUK.Modules[moduleName].prototype.init) {
+ if (GOVUK.Modules[moduleName]) {
try {
- new GOVUK.Modules[moduleName](element).init()
+ /* eslint-disable no-new */
+ new GOVUK.Modules[moduleName](element)
element.setAttribute('data-' + moduleNames[j] + '-module-started', true)
} catch (e) {
// if there's a problem with the module, catch the error to allow other modules to start
diff --git a/app/assets/stylesheets/component_guide/application.scss b/app/assets/stylesheets/component_guide/application.scss
index 82a5d112be..a9fa63b37e 100644
--- a/app/assets/stylesheets/component_guide/application.scss
+++ b/app/assets/stylesheets/component_guide/application.scss
@@ -1,8 +1,5 @@
// This file contains the styles for the Component Guide.
-// feature flag for accessible link styles
-$govuk-new-link-styles: true;
-
@import "govuk_publishing_components/govuk_frontend_support";
@import "govuk_publishing_components/component_support";
@@ -270,7 +267,7 @@ html {
// Rouge syntax highlighting
// Based on https://github.com/alphagov/tech-docs-template/blob/master/template/source/stylesheets/palette/_syntax-highlighting.scss
-$code-00: scale-color(govuk-colour("light-grey", $legacy: "grey-4"), $lightness: 50%); // Default Background
+$code-00: scale-color(govuk-colour("light-grey"), $lightness: 50%); // Default Background
$code-01: #f5f5f5; // Lighter Background (Unused)
$code-02: #bfc1c3; // Selection Background
$code-03: darken($govuk-secondary-text-colour, 2%); // Comments, Invisibles, Line Highlighting
diff --git a/app/assets/stylesheets/govuk_publishing_components/_all_components.scss b/app/assets/stylesheets/govuk_publishing_components/_all_components.scss
index e8d8e11996..5e104ceda7 100644
--- a/app/assets/stylesheets/govuk_publishing_components/_all_components.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/_all_components.scss
@@ -1,9 +1,6 @@
// This is the file that the application needs to include in order to use
// the components.
-// feature flag for accessible link styles
-$govuk-new-link-styles: true;
-
@import "govuk_publishing_components/govuk_frontend_support";
@import "govuk_publishing_components/component_support";
diff --git a/app/assets/stylesheets/govuk_publishing_components/_individual_component_support.scss b/app/assets/stylesheets/govuk_publishing_components/_individual_component_support.scss
index 2d55fe18a2..c3ce63ad8f 100644
--- a/app/assets/stylesheets/govuk_publishing_components/_individual_component_support.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/_individual_component_support.scss
@@ -1,5 +1,3 @@
-$govuk-new-link-styles: true;
-
// This flag stops the font from being included in this components's
// stylesheet - the font is being served by Static across all of GOV.UK, so is
// not needed here.
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss b/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss
index 976f25e9b5..954b05df8f 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss
@@ -7,7 +7,7 @@ $thumbnail-background: govuk-colour("white");
$thumbnail-border-colour: rgba(11, 12, 12, .1);
$thumbnail-shadow-colour: rgba(11, 12, 12, .4);
$thumbnail-shadow-width: 0 2px 2px;
-$thumbnail-icon-border-colour: govuk-colour("mid-grey", $legacy: "grey-3");
+$thumbnail-icon-border-colour: govuk-colour("mid-grey");
.gem-c-attachment {
@include govuk-font(19);
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss b/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss
index 7ddc075695..e8eb3e210a 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss
@@ -1,12 +1,18 @@
@import "govuk_publishing_components/individual_component_support";
@import "govuk/components/checkboxes/checkboxes";
+.govuk-checkboxes__item {
+ // Ensure the requied font-size and line-height are always set, see
+ // https://github.com/alphagov/govuk-frontend/pull/4267
+ @include govuk-font($size: 19);
+}
+
.govuk-checkboxes--nested {
margin-left: -(govuk-spacing(4) + 2px); // 22px
box-sizing: border-box;
border-left-style: solid;
border-left-width: 4px;
- border-color: govuk-colour("mid-grey", $legacy: "grey-2");
+ border-color: govuk-colour("mid-grey");
margin-top: govuk-spacing(2);
margin-bottom: govuk-spacing(2);
padding: govuk-spacing(2) govuk-spacing(4);
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss b/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss
index bcb1474ef2..3dcd5be66a 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss
@@ -27,7 +27,7 @@
.gem-c-contextual-sidebar__cta {
border-top: 2px solid $govuk-brand-colour;
margin-bottom: govuk-spacing(6);
- background-color: govuk-colour("light-grey", $legacy: "grey-4");
+ background-color: govuk-colour("light-grey");
display: block;
padding: 0 govuk-spacing(3) govuk-spacing(3);
text-decoration: none;
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss b/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss
index 17e4c85991..3760c31f09 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss
@@ -53,7 +53,7 @@
}
.gem-c-document-list__item-context {
- color: govuk-colour("dark-grey", $legacy: "grey-1");
+ color: govuk-colour("dark-grey");
}
.gem-c-document-list__item-description {
@@ -93,7 +93,7 @@
}
.gem-c-document-list__item--highlight {
- border: 1px solid govuk-colour("mid-grey", $legacy: "grey-2");
+ border: 1px solid govuk-colour("mid-grey");
padding: govuk-spacing(6);
margin-bottom: govuk-spacing(6);
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss b/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss
index bbaaec649e..ff00386e4a 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss
@@ -77,7 +77,7 @@
// and make all of thead and tfoot stand out
thead,
tfoot {
- background-color: govuk-colour("light-grey", $legacy: "grey-3");
+ background-color: govuk-colour("light-grey");
}
thead th,
@@ -122,7 +122,7 @@
// total and subtotal rows
tr.subtotal > *,
tr.total > * {
- border-top: 3px solid govuk-colour("mid-grey", $legacy: "grey-2");
+ border-top: 3px solid govuk-colour("mid-grey");
}
tr.total > *,
@@ -133,7 +133,7 @@
// the total is usually in the tfoot, so already has that background colour
// but when it's used inside the tbody, it should also be highlighted
tr.total {
- background-color: govuk-colour("light-grey", $legacy: "grey-3");
+ background-color: govuk-colour("light-grey");
}
}
// stylelint-enable selector-no-qualifying-type
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss b/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss
index de05432e08..e60ef44cb6 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss
@@ -187,7 +187,7 @@
font-size: 16px;
font-size: govuk-px-to-rem(16px);
margin: 0 0 calc(govuk-spacing(3) / 2);
- color: govuk-colour("dark-grey", $legacy: "grey-1");
+ color: govuk-colour("dark-grey");
@include govuk-media-query($from: tablet) {
margin-bottom: 0;
@@ -213,7 +213,7 @@
}
.gem-c-image-card__list-item--text {
- color: govuk-colour("dark-grey", $legacy: "grey-1");
+ color: govuk-colour("dark-grey");
}
.gem-c-image-card__list-item-link {
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss b/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss
index 331722e13b..826f1606fa 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss
@@ -4,7 +4,7 @@
@include govuk-text-colour;
@include govuk-responsive-padding(3);
@include govuk-responsive-margin(6, "bottom");
- background-color: govuk-colour("light-grey", $legacy: "grey-4");
+ background-color: govuk-colour("light-grey");
border-left: 10px solid $govuk-success-colour;
.govuk-body:last-of-type {
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss b/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss
index 066cfaf0b8..da8f5ce223 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss
@@ -5,7 +5,7 @@
@import "govuk/components/tag/tag";
.gem-c-layout-header--production .govuk-header__container {
- border-bottom-color: govuk-colour("red", $legacy: "bright-red");
+ border-bottom-color: govuk-colour("red");
}
.gem-c-layout-header--integration .govuk-header__container,
@@ -18,7 +18,7 @@
}
.gem-c-layout-header--development .govuk-header__container {
- border-bottom-color: govuk-colour("dark-grey", $legacy: "grey-1");
+ border-bottom-color: govuk-colour("dark-grey");
}
.gem-c-layout-header--no-bottom-border,
@@ -103,12 +103,9 @@
}
}
-.gem-c-header__logotype {
- vertical-align: middle;
-}
-
.gem-c-header__product-name {
display: none;
+ margin-top: govuk-spacing(-1);
@include govuk-media-query($from: tablet) {
display: inline-block;
@@ -119,12 +116,14 @@
.gem-c-environment-tag {
padding: 2px 5px 0;
margin-left: 3px;
+ margin-top: govuk-spacing(-2);
vertical-align: middle;
@include govuk-font($size: 16, $weight: "bold");
}
.gem-c-environment-tag--production {
- background-color: govuk-colour("red", $legacy: "bright-red");
+ background-color: govuk-colour("red");
+ color: govuk-colour("white");
}
.gem-c-environment-tag--example {
@@ -132,7 +131,8 @@
}
.gem-c-environment-tag--development {
- background-color: govuk-colour("dark-grey", $legacy: "grey-1");
+ background-color: govuk-colour("dark-grey");
+ color: govuk-colour("white");
}
.gem-c-environment-tag--staging,
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss b/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss
index 5696a4ca21..de155fce71 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss
@@ -14,7 +14,7 @@
.gem-c-related-navigation__sub-heading {
@include govuk-font(16);
- border-top: 1px solid govuk-colour("mid-grey", $legacy: "grey-2");
+ border-top: 1px solid govuk-colour("mid-grey");
margin: 0;
padding-top: govuk-spacing(3);
}
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss b/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss
index 71d987f586..49f0c34f45 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss
@@ -6,7 +6,7 @@
position: relative;
padding: 10px;
- background: govuk-colour("light-grey", $legacy: "grey-4");
+ background: govuk-colour("light-grey");
border-bottom: solid 1px govuk-colour("blue");
margin-top: govuk-spacing(3);
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss b/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss
index 5feaea2179..f3ffefd2d1 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss
@@ -3,7 +3,7 @@
$stroke-width: 1px;
$number-circle-size: 30px;
$number-circle-size-large: 35px;
-$top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
+$top-border: solid 1px govuk-colour("mid-grey");
@mixin step-nav-vertical-line($line-style: solid) {
content: "";
@@ -11,7 +11,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
z-index: 2;
width: 0;
height: 100%;
- border-left: $line-style $stroke-width govuk-colour("mid-grey", $legacy: "grey-2");
+ border-left: $line-style $stroke-width govuk-colour("mid-grey");
background: govuk-colour("white");
}
@@ -263,7 +263,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
margin-left: calc($number-circle-size / 4);
width: calc($number-circle-size / 2);
height: 0;
- border-bottom: solid $stroke-width govuk-colour("mid-grey", $legacy: "grey-2");
+ border-bottom: solid $stroke-width govuk-colour("mid-grey");
}
&::after {
@@ -322,7 +322,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
.gem-c-step-nav__circle--number {
@include step-nav-font(16, $weight: bold, $line-height: 29px);
- border: solid $stroke-width govuk-colour("mid-grey", $legacy: "grey-2");
+ border: solid $stroke-width govuk-colour("mid-grey");
.gem-c-step-nav--large & {
@include step-nav-font(16, $tablet-size: 19, $weight: bold, $line-height: 29px, $tablet-line-height: 34px);
@@ -532,7 +532,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
.gem-c-step-nav__context {
display: inline-block;
font-weight: normal;
- color: govuk-colour("dark-grey", $legacy: "grey-1");
+ color: govuk-colour("dark-grey");
&::before {
content: " \2013\00a0"; // dash followed by
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss b/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss
index 2d5d5c073a..2285fb4370 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss
@@ -96,7 +96,7 @@
.gem-c-subscription-links__feed-box {
padding: govuk-spacing(3);
margin-bottom: govuk-spacing(3);
- background: govuk-colour("light-grey", $legacy: "grey-3");
+ background: govuk-colour("light-grey");
.js-enabled &.js-hidden {
display: none;
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_table.scss b/app/assets/stylesheets/govuk_publishing_components/components/_table.scss
index e1e66102ca..7a3c10bef0 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/_table.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/_table.scss
@@ -2,15 +2,15 @@
@import "govuk/components/table/table";
$table-border-width: 1px;
-$table-border-colour: govuk-colour("mid-grey", $legacy: "grey-2");
+$table-border-colour: govuk-colour("mid-grey");
$table-header-border-width: 2px;
-$table-header-background-colour: govuk-colour("light-grey", $legacy: "grey-3");
+$table-header-background-colour: govuk-colour("light-grey");
$sort-link-active-colour: govuk-colour("white");
$sort-link-arrow-size: 14px;
$sort-link-arrow-size-small: 8px;
$sort-link-arrow-spacing: calc($sort-link-arrow-size / 2);
$table-row-hover-background-colour: rgba(43, 140, 196, .2);
-$table-row-even-background-colour: govuk-colour("light-grey", $legacy: "grey-4");
+$table-row-even-background-colour: govuk-colour("light-grey");
.govuk-table__cell:empty,
.govuk-table__cell--empty {
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_warning-text.scss b/app/assets/stylesheets/govuk_publishing_components/components/_warning-text.scss
index 6b962a2a51..63283a8d04 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/_warning-text.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/_warning-text.scss
@@ -2,6 +2,10 @@
@import "govuk/components/warning-text/warning-text";
.gem-c-warning-text .govuk-warning-text__text {
+ // Ensure the font-size is always set to 19px
+ // This prevents the default user agent styles being applied to heading elements used in the warning-text component following a change in v5.0.0, see:
+ // https://github.com/alphagov/govuk-frontend/pull/4267
+ @include govuk-font($size: 19, $weight: bold);
margin: 0;
}
@@ -10,7 +14,7 @@
margin-left: 0;
}
-.gem-c-warning-text__text--large {
+.gem-c-warning-text .gem-c-warning-text__text--large {
@include govuk-font($size: 24, $weight: bold);
}
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_advisory.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_advisory.scss
index 4abb817bc7..1dd7c7ec0c 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_advisory.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_advisory.scss
@@ -25,7 +25,7 @@ $high-alert-border: #cc0000;
}
&.high-alert {
- background-color: govuk-colour("light-grey", $legacy: "grey-3");
+ background-color: govuk-colour("light-grey");
border: 1px solid $high-alert-border;
}
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss
index 2836daea52..bcefe0cdc2 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss
@@ -49,8 +49,8 @@
}
svg {
- fill: govuk-colour("mid-grey", $legacy: "grey-3");
- stroke: govuk-colour("mid-grey", $legacy: "grey-3");
+ fill: govuk-colour("mid-grey");
+ stroke: govuk-colour("mid-grey");
}
}
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss
index 382a31dfa8..af5b29c50e 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss
@@ -10,7 +10,7 @@
.gem-c-govspeak {
.call-to-action {
margin: 2em 0;
- background-color: govuk-colour("light-grey", $legacy: "grey-3");
+ background-color: govuk-colour("light-grey");
padding: 2em;
&:first-child {
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss
index a96fbba31d..84f5b04237 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss
@@ -12,7 +12,7 @@
// .address is used by the `$A` markdown pattern
.address,
.contact {
- border-left: 1px solid govuk-colour("mid-grey", $legacy: "grey-2");
+ border-left: 1px solid govuk-colour("mid-grey");
padding-left: govuk-spacing(3);
margin-bottom: govuk-spacing(6);
margin-top: govuk-spacing(6);
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss
index 095535f452..603baa00e1 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss
@@ -8,7 +8,7 @@
.govspeak, // Legacy class name that's still used in some content items - needs to be kept until `.govspeak` is removed from the content items.
.gem-c-govspeak {
.example {
- border-left: 10px solid govuk-colour("mid-grey", $legacy: "grey-3");
+ border-left: 10px solid govuk-colour("mid-grey");
padding: 1em 0 1em 1em;
margin: 2em 0;
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss
index 8a12d1c17f..b982c84bf6 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss
@@ -14,7 +14,7 @@
.govspeak, // Legacy class name that's still used in some content items - needs to be kept until `.govspeak` is removed from the content items.
.gem-c-govspeak {
.footnotes {
- border-top: 1px solid govuk-colour("mid-grey", $legacy: "grey-2");
+ border-top: 1px solid govuk-colour("mid-grey");
margin-top: govuk-spacing(6);
padding-top: govuk-spacing(2);
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss
index 82a383dbb6..959a26bd22 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss
@@ -9,7 +9,7 @@
.govspeak, // Legacy class name that's still used in some content items - needs to be kept until `.govspeak` is removed from the content items.
.gem-c-govspeak {
.info-notice {
- border-left: 10px solid govuk-colour("mid-grey", $legacy: "grey-3");
+ border-left: 10px solid govuk-colour("mid-grey");
padding: 1em 0 1em 1em;
margin: 2em 0;
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss
index c45794c1d5..375927f52d 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss
@@ -3,7 +3,7 @@
.gem-c-govspeak {
.place {
margin: 1.5em 0;
- border-bottom: solid 1px govuk-colour("mid-grey", $legacy: "grey-2");
+ border-bottom: solid 1px govuk-colour("mid-grey");
padding-bottom: 1.5em;
.address {
diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss
index 9774affa3d..9c4eccab7e 100644
--- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss
@@ -25,7 +25,7 @@
td {
vertical-align: top;
padding: govuk-spacing(2) govuk-spacing(4) govuk-spacing(2) 0;
- border-bottom: 1px solid govuk-colour("mid-grey", $legacy: "grey-2");
+ border-bottom: 1px solid govuk-colour("mid-grey");
&:last-child {
padding: govuk-spacing(2) 0 govuk-spacing(2) 0;
diff --git a/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss b/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss
index 504933a5d4..78c7a492cf 100644
--- a/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss
+++ b/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss
@@ -11,9 +11,9 @@
$gem-secondary-button-colour: #00823b;
$gem-secondary-button-hover-colour: darken($gem-secondary-button-colour, 5%);
$gem-secondary-button-background-colour: govuk-colour("white");
-$gem-secondary-button-hover-background-colour: govuk-colour("light-grey", $legacy: "grey-4");
+$gem-secondary-button-hover-background-colour: govuk-colour("light-grey");
-$gem-quiet-button-colour: govuk-colour("dark-grey", $legacy: "grey-1");
+$gem-quiet-button-colour: govuk-colour("dark-grey");
$gem-quiet-button-hover-colour: darken($gem-quiet-button-colour, 5%);
$gem-hover-dark-background: #dddcdb;
diff --git a/app/views/govuk_publishing_components/components/_accordion.html.erb b/app/views/govuk_publishing_components/components/_accordion.html.erb
index 152eeeeba6..a928f8e749 100644
--- a/app/views/govuk_publishing_components/components/_accordion.html.erb
+++ b/app/views/govuk_publishing_components/components/_accordion.html.erb
@@ -93,7 +93,6 @@
item[:content][:html],
id: "#{id}-content-#{index}",
class: "govuk-accordion__section-content",
- 'aria-labelledby': "#{id}-heading-#{index}",
data: ga4_link_data_attributes
) %>
<% end %>
diff --git a/app/views/govuk_publishing_components/components/_details.html.erb b/app/views/govuk_publishing_components/components/_details.html.erb
index ed50663b9e..3f4f347604 100644
--- a/app/views/govuk_publishing_components/components/_details.html.erb
+++ b/app/views/govuk_publishing_components/components/_details.html.erb
@@ -13,8 +13,8 @@
css_classes << shared_helper.get_margin_bottom
details_data_attributes = {}
- details_data_attributes[:module] = 'govuk-details gem-details'
- details_data_attributes[:module] = 'govuk-details gem-details ga4-event-tracker' unless disable_ga4
+ details_data_attributes[:module] = 'gem-details'
+ details_data_attributes[:module] = 'gem-details ga4-event-tracker' unless disable_ga4
data_attributes ||= {}
data_attributes[:details_track_click] = ''
diff --git a/app/views/govuk_publishing_components/components/_layout_for_public.html.erb b/app/views/govuk_publishing_components/components/_layout_for_public.html.erb
index 8e6aa70288..1f4831dee2 100644
--- a/app/views/govuk_publishing_components/components/_layout_for_public.html.erb
+++ b/app/views/govuk_publishing_components/components/_layout_for_public.html.erb
@@ -79,12 +79,11 @@
<%= stylesheet_link_tag "application", media: "all" %>
-
-
- ">
- ">
- ">
- ">
+
+
+
+
+ ">
@@ -186,6 +185,9 @@
meta: layout_helper.footer_meta,
} %>
<% end %>
+ <% if GovukPublishingComponents::Config.use_es6_components %>
+ <%= javascript_include_tag 'es6-components', type: "module" %>
+ <% end %>
<%= javascript_include_tag 'application' %>
<% end %>