WIP - Deprecate non index component entry points#6761
Draft
romaricpascal wants to merge 5 commits intomainfrom
Draft
WIP - Deprecate non index component entry points#6761romaricpascal wants to merge 5 commits intomainfrom
romaricpascal wants to merge 5 commits intomainfrom
Conversation
…ponents As it now takes over `<COMPONENT_NAME>.scss` files, we should check they include the correct custom properties.
This will help add tests specifically for the `_<COMPONENT_NAME>.scss` files, as well as clean the tests up once we're done with the tests.
Other changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/components/accordion/_accordion.scss b/packages/govuk-frontend/dist/govuk/components/accordion/_accordion.scss
index ada3c0fc4..ca155d4a8 100644
--- a/packages/govuk-frontend/dist/govuk/components/accordion/_accordion.scss
+++ b/packages/govuk-frontend/dist/govuk/components/accordion/_accordion.scss
@@ -1,4 +1,9 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning('accordion');
+
@import "./index";
+
+
/*# sourceMappingURL=_accordion.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/accordion/_index.scss b/packages/govuk-frontend/dist/govuk/components/accordion/_index.scss
index 544854292..ce2695e49 100644
--- a/packages/govuk-frontend/dist/govuk/components/accordion/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/accordion/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@include govuk-exports("govuk/component/accordion") {
$govuk-accordion-base-colour: govuk-colour("black");
$govuk-accordion-hover-colour: govuk-colour("black", $variant: "tint-95");
diff --git a/packages/govuk-frontend/dist/govuk/components/back-link/_back-link.scss b/packages/govuk-frontend/dist/govuk/components/back-link/_back-link.scss
index ca41c5714..62fe8becd 100644
--- a/packages/govuk-frontend/dist/govuk/components/back-link/_back-link.scss
+++ b/packages/govuk-frontend/dist/govuk/components/back-link/_back-link.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning('back-link');
+
@import "./index";
/*# sourceMappingURL=_back-link.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/back-link/_index.scss b/packages/govuk-frontend/dist/govuk/components/back-link/_index.scss
index b258714a0..33772398b 100644
--- a/packages/govuk-frontend/dist/govuk/components/back-link/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/back-link/_index.scss
@@ -1,5 +1,7 @@
@use "sass:string";
+@import "../../base";
+
@include govuk-exports("govuk/component/back-link") {
// Component font-size on the Frontend (used for calculations)
$font-size: 16;
diff --git a/packages/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss b/packages/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss
index d102cd82e..e7f203f43 100644
--- a/packages/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss
+++ b/packages/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("breadcrumbs");
+
@import "./index";
/*# sourceMappingURL=_breadcrumbs.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss b/packages/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss
index 35fd4ea39..5c1bf9ab1 100644
--- a/packages/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss
@@ -1,5 +1,7 @@
@use "sass:string";
+@import "../../base";
+
@include govuk-exports("govuk/component/breadcrumbs") {
// Component font-size on the Frontend (used for calculations)
$font-size: 16;
diff --git a/packages/govuk-frontend/dist/govuk/components/button/_button.scss b/packages/govuk-frontend/dist/govuk/components/button/_button.scss
index a8d9b2778..cbeb86b79 100644
--- a/packages/govuk-frontend/dist/govuk/components/button/_button.scss
+++ b/packages/govuk-frontend/dist/govuk/components/button/_button.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("button");
+
@import "./index";
/*# sourceMappingURL=_button.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/button/_index.scss b/packages/govuk-frontend/dist/govuk/components/button/_index.scss
index 8e98a1f13..88fb4c989 100644
--- a/packages/govuk-frontend/dist/govuk/components/button/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/button/_index.scss
@@ -2,6 +2,8 @@
/// @group components/button
////
+@import "../../base";
+
/// Button component background colour
///
/// @type Colour
diff --git a/packages/govuk-frontend/dist/govuk/components/character-count/_character-count.scss b/packages/govuk-frontend/dist/govuk/components/character-count/_character-count.scss
index ca39b3852..d2215856e 100644
--- a/packages/govuk-frontend/dist/govuk/components/character-count/_character-count.scss
+++ b/packages/govuk-frontend/dist/govuk/components/character-count/_character-count.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("character-count");
+
@import "./index";
/*# sourceMappingURL=_character-count.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/character-count/_index.scss b/packages/govuk-frontend/dist/govuk/components/character-count/_index.scss
index db379e15d..f547646ec 100644
--- a/packages/govuk-frontend/dist/govuk/components/character-count/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/character-count/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@import "../error-message/index";
@import "../hint/index";
@import "../label/index";
diff --git a/packages/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss b/packages/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss
index a9b352d3a..27f85ea39 100644
--- a/packages/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss
+++ b/packages/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("checkboxes");
+
@import "./index";
/*# sourceMappingURL=_checkboxes.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/checkboxes/_index.scss b/packages/govuk-frontend/dist/govuk/components/checkboxes/_index.scss
index 1eb4ba5f0..1686fda0e 100644
--- a/packages/govuk-frontend/dist/govuk/components/checkboxes/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/checkboxes/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@import "../error-message/index";
@import "../fieldset/index";
@import "../hint/index";
diff --git a/packages/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss b/packages/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss
index 9227cf9c4..8292a6c97 100644
--- a/packages/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss
+++ b/packages/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("cookie-banner");
+
@import "./index";
/*# sourceMappingURL=_cookie-banner.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss b/packages/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss
index 4131e787c..032afd740 100644
--- a/packages/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@import "../button/index";
@include govuk-exports("govuk/component/cookie-banner") {
diff --git a/packages/govuk-frontend/dist/govuk/components/date-input/_date-input.scss b/packages/govuk-frontend/dist/govuk/components/date-input/_date-input.scss
index c222da23d..9c726af8c 100644
--- a/packages/govuk-frontend/dist/govuk/components/date-input/_date-input.scss
+++ b/packages/govuk-frontend/dist/govuk/components/date-input/_date-input.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("date-input");
+
@import "./index";
/*# sourceMappingURL=_date-input.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/date-input/_index.scss b/packages/govuk-frontend/dist/govuk/components/date-input/_index.scss
index 38c670858..60df958de 100644
--- a/packages/govuk-frontend/dist/govuk/components/date-input/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/date-input/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@import "../error-message/index";
@import "../input/index";
@import "../hint/index";
diff --git a/packages/govuk-frontend/dist/govuk/components/details/_details.scss b/packages/govuk-frontend/dist/govuk/components/details/_details.scss
index c9a475866..1a617daf2 100644
--- a/packages/govuk-frontend/dist/govuk/components/details/_details.scss
+++ b/packages/govuk-frontend/dist/govuk/components/details/_details.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("details");
+
@import "./index";
/*# sourceMappingURL=_details.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/details/_index.scss b/packages/govuk-frontend/dist/govuk/components/details/_index.scss
index 90606ad61..0e69d8b18 100644
--- a/packages/govuk-frontend/dist/govuk/components/details/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/details/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@include govuk-exports("govuk/component/details") {
.govuk-details {
@include govuk-font($size: 19);
diff --git a/packages/govuk-frontend/dist/govuk/components/error-message/_error-message.scss b/packages/govuk-frontend/dist/govuk/components/error-message/_error-message.scss
index 76d89f09d..10fb0947c 100644
--- a/packages/govuk-frontend/dist/govuk/components/error-message/_error-message.scss
+++ b/packages/govuk-frontend/dist/govuk/components/error-message/_error-message.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("error-message");
+
@import "./index";
/*# sourceMappingURL=_error-message.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/error-message/_index.scss b/packages/govuk-frontend/dist/govuk/components/error-message/_index.scss
index 7161e6596..d23c87786 100644
--- a/packages/govuk-frontend/dist/govuk/components/error-message/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/error-message/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@include govuk-exports("govuk/component/error-message") {
.govuk-error-message {
@include govuk-font($size: 19, $weight: bold);
diff --git a/packages/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss b/packages/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss
index 128abc2ea..e91ca4398 100644
--- a/packages/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss
+++ b/packages/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("error-summary");
+
@import "./index";
/*# sourceMappingURL=_error-summary.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/error-summary/_index.scss b/packages/govuk-frontend/dist/govuk/components/error-summary/_index.scss
index 03791c151..b3466f4c6 100644
--- a/packages/govuk-frontend/dist/govuk/components/error-summary/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/error-summary/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@import "../../core/lists";
@include govuk-exports("govuk/component/error-summary") {
diff --git a/packages/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss b/packages/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss
index c6c43a384..2877f7e48 100644
--- a/packages/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss
+++ b/packages/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("exit-this-page");
+
@import "./index";
/*# sourceMappingURL=_exit-this-page.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss b/packages/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss
index 52c3aa88d..559c214d1 100644
--- a/packages/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@import "../button/index";
@include govuk-exports("govuk/component/exit-this-page") {
diff --git a/packages/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss b/packages/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss
index 89ee7c6bb..a46ee6ba9 100644
--- a/packages/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss
+++ b/packages/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("fieldset");
+
@import "./index";
/*# sourceMappingURL=_fieldset.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/fieldset/_index.scss b/packages/govuk-frontend/dist/govuk/components/fieldset/_index.scss
index 2ab7c447f..0b54c6da8 100644
--- a/packages/govuk-frontend/dist/govuk/components/fieldset/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/fieldset/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@include govuk-exports("govuk/component/fieldset") {
.govuk-fieldset {
min-width: 0;
diff --git a/packages/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss b/packages/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss
index dec9aeb7e..e5e169940 100644
--- a/packages/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss
+++ b/packages/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("file-upload");
+
@import "./index";
/*# sourceMappingURL=_file-upload.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/file-upload/_index.scss b/packages/govuk-frontend/dist/govuk/components/file-upload/_index.scss
index 2b7d503d0..8423e736c 100644
--- a/packages/govuk-frontend/dist/govuk/components/file-upload/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/file-upload/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@import "../error-message/index";
@import "../hint/index";
@import "../label/index";
diff --git a/packages/govuk-frontend/dist/govuk/components/footer/_footer.scss b/packages/govuk-frontend/dist/govuk/components/footer/_footer.scss
index ee11b638b..6bf9f3d5c 100644
--- a/packages/govuk-frontend/dist/govuk/components/footer/_footer.scss
+++ b/packages/govuk-frontend/dist/govuk/components/footer/_footer.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("footer");
+
@import "./index";
/*# sourceMappingURL=_footer.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/footer/_index.scss b/packages/govuk-frontend/dist/govuk/components/footer/_index.scss
index 4a9ef5d85..6c425fd87 100644
--- a/packages/govuk-frontend/dist/govuk/components/footer/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/footer/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@include govuk-exports("govuk/component/footer") {
$govuk-footer-background: govuk-functional-colour(surface-background);
$govuk-footer-text: govuk-functional-colour(surface-text);
diff --git a/packages/govuk-frontend/dist/govuk/components/header/_header.scss b/packages/govuk-frontend/dist/govuk/components/header/_header.scss
index 58f250edd..9e41876f7 100644
--- a/packages/govuk-frontend/dist/govuk/components/header/_header.scss
+++ b/packages/govuk-frontend/dist/govuk/components/header/_header.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("header");
+
@import "./index";
/*# sourceMappingURL=_header.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/header/_index.scss b/packages/govuk-frontend/dist/govuk/components/header/_index.scss
index fc4b4a889..d1614e7da 100644
--- a/packages/govuk-frontend/dist/govuk/components/header/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/header/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@include govuk-exports("govuk/component/header") {
$govuk-header-background: govuk-functional-colour(brand);
$govuk-header-text: govuk-colour("white");
diff --git a/packages/govuk-frontend/dist/govuk/components/hint/_hint.scss b/packages/govuk-frontend/dist/govuk/components/hint/_hint.scss
index ccf6424b3..69f67da2e 100644
--- a/packages/govuk-frontend/dist/govuk/components/hint/_hint.scss
+++ b/packages/govuk-frontend/dist/govuk/components/hint/_hint.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("hint");
+
@import "./index";
/*# sourceMappingURL=_hint.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/hint/_index.scss b/packages/govuk-frontend/dist/govuk/components/hint/_index.scss
index 0980542b5..a55c59523 100644
--- a/packages/govuk-frontend/dist/govuk/components/hint/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/hint/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@include govuk-exports("govuk/component/hint") {
.govuk-hint {
@include govuk-font($size: 19);
diff --git a/packages/govuk-frontend/dist/govuk/components/input/_index.scss b/packages/govuk-frontend/dist/govuk/components/input/_index.scss
index 9b6199438..df884ce97 100644
--- a/packages/govuk-frontend/dist/govuk/components/input/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/input/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@import "../error-message/index";
@import "../hint/index";
@import "../label/index";
diff --git a/packages/govuk-frontend/dist/govuk/components/input/_input.scss b/packages/govuk-frontend/dist/govuk/components/input/_input.scss
index 370afa422..132645ec8 100644
--- a/packages/govuk-frontend/dist/govuk/components/input/_input.scss
+++ b/packages/govuk-frontend/dist/govuk/components/input/_input.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("input");
+
@import "./index";
/*# sourceMappingURL=_input.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/inset-text/_index.scss b/packages/govuk-frontend/dist/govuk/components/inset-text/_index.scss
index 5f9bef5f7..7b989ed44 100644
--- a/packages/govuk-frontend/dist/govuk/components/inset-text/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/inset-text/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@include govuk-exports("govuk/component/inset-text") {
.govuk-inset-text {
@include govuk-font($size: 19);
diff --git a/packages/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss b/packages/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss
index eda04c6e9..a37d1c9ce 100644
--- a/packages/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss
+++ b/packages/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("inset-text");
+
@import "./index";
/*# sourceMappingURL=_inset-text.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/label/_index.scss b/packages/govuk-frontend/dist/govuk/components/label/_index.scss
index aaacd85e2..17fea614f 100644
--- a/packages/govuk-frontend/dist/govuk/components/label/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/label/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@include govuk-exports("govuk/component/label") {
.govuk-label {
@include govuk-font($size: 19);
diff --git a/packages/govuk-frontend/dist/govuk/components/label/_label.scss b/packages/govuk-frontend/dist/govuk/components/label/_label.scss
index 4a41994b1..09ad4a265 100644
--- a/packages/govuk-frontend/dist/govuk/components/label/_label.scss
+++ b/packages/govuk-frontend/dist/govuk/components/label/_label.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("label");
+
@import "./index";
/*# sourceMappingURL=_label.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/notification-banner/_index.scss b/packages/govuk-frontend/dist/govuk/components/notification-banner/_index.scss
index f859c5859..c82b81e95 100644
--- a/packages/govuk-frontend/dist/govuk/components/notification-banner/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/notification-banner/_index.scss
@@ -1,5 +1,7 @@
@use "sass:math";
+@import "../../base";
+
@include govuk-exports("govuk/component/notification-banner") {
.govuk-notification-banner {
@include govuk-font($size: 19);
diff --git a/packages/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss b/packages/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss
index 1329d6947..159946006 100644
--- a/packages/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss
+++ b/packages/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("notification-banner");
+
@import "./index";
/*# sourceMappingURL=_notification-banner.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/pagination/_index.scss b/packages/govuk-frontend/dist/govuk/components/pagination/_index.scss
index a3aec2601..7c06373c4 100644
--- a/packages/govuk-frontend/dist/govuk/components/pagination/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/pagination/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@include govuk-exports("govuk/component/pagination") {
// Flexbox enhancement for small screen visual design
// Falls back to a float: left layout on non-flex browsers
diff --git a/packages/govuk-frontend/dist/govuk/components/pagination/_pagination.scss b/packages/govuk-frontend/dist/govuk/components/pagination/_pagination.scss
index cbf110bf3..a90c94822 100644
--- a/packages/govuk-frontend/dist/govuk/components/pagination/_pagination.scss
+++ b/packages/govuk-frontend/dist/govuk/components/pagination/_pagination.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("pagination");
+
@import "./index";
/*# sourceMappingURL=_pagination.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/panel/_index.scss b/packages/govuk-frontend/dist/govuk/components/panel/_index.scss
index 9a8524008..74d158130 100644
--- a/packages/govuk-frontend/dist/govuk/components/panel/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/panel/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@include govuk-exports("govuk/component/panel") {
.govuk-panel {
@include govuk-font($size: 36);
diff --git a/packages/govuk-frontend/dist/govuk/components/panel/_panel.scss b/packages/govuk-frontend/dist/govuk/components/panel/_panel.scss
index ab38dd42d..92d43b951 100644
--- a/packages/govuk-frontend/dist/govuk/components/panel/_panel.scss
+++ b/packages/govuk-frontend/dist/govuk/components/panel/_panel.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("panel");
+
@import "./index";
/*# sourceMappingURL=_panel.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/password-input/_index.scss b/packages/govuk-frontend/dist/govuk/components/password-input/_index.scss
index 95e971320..02cfbd6a2 100644
--- a/packages/govuk-frontend/dist/govuk/components/password-input/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/password-input/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@import "../button/index";
@import "../input/index";
diff --git a/packages/govuk-frontend/dist/govuk/components/password-input/_password-input.scss b/packages/govuk-frontend/dist/govuk/components/password-input/_password-input.scss
index 189d8057b..dda1bc319 100644
--- a/packages/govuk-frontend/dist/govuk/components/password-input/_password-input.scss
+++ b/packages/govuk-frontend/dist/govuk/components/password-input/_password-input.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("password-input");
+
@import "./index";
/*# sourceMappingURL=_password-input.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/phase-banner/_index.scss b/packages/govuk-frontend/dist/govuk/components/phase-banner/_index.scss
index 8e33fa17b..a26b6afa1 100644
--- a/packages/govuk-frontend/dist/govuk/components/phase-banner/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/phase-banner/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@import "../tag/index";
@include govuk-exports("govuk/component/phase-banner") {
diff --git a/packages/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.scss b/packages/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.scss
index 25b9da9a2..f239fbc0f 100644
--- a/packages/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.scss
+++ b/packages/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("phase-banner");
+
@import "./index";
/*# sourceMappingURL=_phase-banner.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/radios/_index.scss b/packages/govuk-frontend/dist/govuk/components/radios/_index.scss
index c8e5737d1..79f1a2f15 100644
--- a/packages/govuk-frontend/dist/govuk/components/radios/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/radios/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@import "../error-message/index";
@import "../fieldset/index";
@import "../hint/index";
diff --git a/packages/govuk-frontend/dist/govuk/components/radios/_radios.scss b/packages/govuk-frontend/dist/govuk/components/radios/_radios.scss
index a124eac7f..f3ac18600 100644
--- a/packages/govuk-frontend/dist/govuk/components/radios/_radios.scss
+++ b/packages/govuk-frontend/dist/govuk/components/radios/_radios.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("radios");
+
@import "./index";
/*# sourceMappingURL=_radios.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/select/_index.scss b/packages/govuk-frontend/dist/govuk/components/select/_index.scss
index ffa77412b..8e67c1705 100644
--- a/packages/govuk-frontend/dist/govuk/components/select/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/select/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@import "../error-message/index";
@import "../hint/index";
@import "../label/index";
diff --git a/packages/govuk-frontend/dist/govuk/components/select/_select.scss b/packages/govuk-frontend/dist/govuk/components/select/_select.scss
index 3672c7ec5..2b233e53d 100644
--- a/packages/govuk-frontend/dist/govuk/components/select/_select.scss
+++ b/packages/govuk-frontend/dist/govuk/components/select/_select.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("select");
+
@import "./index";
/*# sourceMappingURL=_select.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/service-navigation/_index.scss b/packages/govuk-frontend/dist/govuk/components/service-navigation/_index.scss
index 2ea6fa71b..b454f4f0a 100644
--- a/packages/govuk-frontend/dist/govuk/components/service-navigation/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/service-navigation/_index.scss
@@ -1,5 +1,7 @@
@use "sass:math";
+@import "../../base";
+
@include govuk-exports("govuk/component/service-navigation") {
$govuk-service-navigation-active-link-border-width: govuk-spacing(1);
$govuk-service-navigation-text-colour: govuk-functional-colour(surface-text);
diff --git a/packages/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss b/packages/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss
index 8003c1e24..59dc15bb4 100644
--- a/packages/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss
+++ b/packages/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("service-navigation");
+
@import "./index";
/*# sourceMappingURL=_service-navigation.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/skip-link/_index.scss b/packages/govuk-frontend/dist/govuk/components/skip-link/_index.scss
index 0ae4fdb33..693592670 100644
--- a/packages/govuk-frontend/dist/govuk/components/skip-link/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/skip-link/_index.scss
@@ -1,5 +1,7 @@
@use "sass:string";
+@import "../../base";
+
@include govuk-exports("govuk/component/skip-link") {
.govuk-skip-link {
@include govuk-visually-hidden-focusable;
diff --git a/packages/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss b/packages/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss
index 5c675f509..56822fafe 100644
--- a/packages/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss
+++ b/packages/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("skip-link");
+
@import "./index";
/*# sourceMappingURL=_skip-link.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/summary-list/_index.scss b/packages/govuk-frontend/dist/govuk/components/summary-list/_index.scss
index 226874c3f..612f84792 100644
--- a/packages/govuk-frontend/dist/govuk/components/summary-list/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/summary-list/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@include govuk-exports("govuk/component/summary-list") {
.govuk-summary-list {
@include govuk-font($size: 19);
diff --git a/packages/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss b/packages/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss
index 03a34e625..3cccb7866 100644
--- a/packages/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss
+++ b/packages/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("summary-list");
+
@import "./index";
/*# sourceMappingURL=_summary-list.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/table/_index.scss b/packages/govuk-frontend/dist/govuk/components/table/_index.scss
index 939cd6636..3fd857c6d 100644
--- a/packages/govuk-frontend/dist/govuk/components/table/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/table/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@include govuk-exports("govuk/component/table") {
.govuk-table {
@include govuk-font($size: 19);
diff --git a/packages/govuk-frontend/dist/govuk/components/table/_table.scss b/packages/govuk-frontend/dist/govuk/components/table/_table.scss
index 6a2573489..e54c26ff3 100644
--- a/packages/govuk-frontend/dist/govuk/components/table/_table.scss
+++ b/packages/govuk-frontend/dist/govuk/components/table/_table.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("table");
+
@import "./index";
/*# sourceMappingURL=_table.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/tabs/_index.scss b/packages/govuk-frontend/dist/govuk/components/tabs/_index.scss
index 522fd75f5..3c64241fa 100644
--- a/packages/govuk-frontend/dist/govuk/components/tabs/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/tabs/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@include govuk-exports("govuk/component/tabs") {
.govuk-tabs {
@include govuk-responsive-margin(1, "top");
diff --git a/packages/govuk-frontend/dist/govuk/components/tabs/_tabs.scss b/packages/govuk-frontend/dist/govuk/components/tabs/_tabs.scss
index 3cf177a05..849899157 100644
--- a/packages/govuk-frontend/dist/govuk/components/tabs/_tabs.scss
+++ b/packages/govuk-frontend/dist/govuk/components/tabs/_tabs.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("tabs");
+
@import "./index";
/*# sourceMappingURL=_tabs.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/tag/_index.scss b/packages/govuk-frontend/dist/govuk/components/tag/_index.scss
index 62d067a55..8e5b11fa4 100644
--- a/packages/govuk-frontend/dist/govuk/components/tag/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/tag/_index.scss
@@ -3,7 +3,7 @@
////
@use "sass:map";
-@import "../../tools/if";
+@import "../../base";
/// Get tag text colour
/// Almost all tags should use the 50% shade of their colour for their text
diff --git a/packages/govuk-frontend/dist/govuk/components/tag/_tag.scss b/packages/govuk-frontend/dist/govuk/components/tag/_tag.scss
index 4ffe96963..741ca39a0 100644
--- a/packages/govuk-frontend/dist/govuk/components/tag/_tag.scss
+++ b/packages/govuk-frontend/dist/govuk/components/tag/_tag.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("tag");
+
@import "./index";
/*# sourceMappingURL=_tag.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/task-list/_index.scss b/packages/govuk-frontend/dist/govuk/components/task-list/_index.scss
index 86f301532..0a3ea3cd8 100644
--- a/packages/govuk-frontend/dist/govuk/components/task-list/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/task-list/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@import "../tag/index";
@include govuk-exports("govuk/component/task-list") {
diff --git a/packages/govuk-frontend/dist/govuk/components/task-list/_task-list.scss b/packages/govuk-frontend/dist/govuk/components/task-list/_task-list.scss
index f88c502ea..f73474a85 100644
--- a/packages/govuk-frontend/dist/govuk/components/task-list/_task-list.scss
+++ b/packages/govuk-frontend/dist/govuk/components/task-list/_task-list.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("task-list");
+
@import "./index";
/*# sourceMappingURL=_task-list.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/textarea/_index.scss b/packages/govuk-frontend/dist/govuk/components/textarea/_index.scss
index facdb604b..879fd71a3 100644
--- a/packages/govuk-frontend/dist/govuk/components/textarea/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/textarea/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@import "../error-message/index";
@import "../hint/index";
@import "../label/index";
diff --git a/packages/govuk-frontend/dist/govuk/components/textarea/_textarea.scss b/packages/govuk-frontend/dist/govuk/components/textarea/_textarea.scss
index f4ed68f8d..e0237d705 100644
--- a/packages/govuk-frontend/dist/govuk/components/textarea/_textarea.scss
+++ b/packages/govuk-frontend/dist/govuk/components/textarea/_textarea.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("textarea");
+
@import "./index";
/*# sourceMappingURL=_textarea.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/components/warning-text/_index.scss b/packages/govuk-frontend/dist/govuk/components/warning-text/_index.scss
index 3df603234..1ae90fce4 100644
--- a/packages/govuk-frontend/dist/govuk/components/warning-text/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/warning-text/_index.scss
@@ -1,3 +1,5 @@
+@import "../../base";
+
@include govuk-exports("govuk/component/warning-text") {
.govuk-warning-text {
@include govuk-font($size: 19);
diff --git a/packages/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss b/packages/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss
index 81eb6f087..cac935eca 100644
--- a/packages/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss
+++ b/packages/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss
@@ -1,4 +1,7 @@
-@import "../../base";
+@import "../../settings/warnings";
+
+@include _component-scss-file-warning("warning-text");
+
@import "./index";
/*# sourceMappingURL=_warning-text.scss.map */
diff --git a/packages/govuk-frontend/dist/govuk/settings/_warnings.scss b/packages/govuk-frontend/dist/govuk/settings/_warnings.scss
index 8746dc774..487a24c5e 100644
--- a/packages/govuk-frontend/dist/govuk/settings/_warnings.scss
+++ b/packages/govuk-frontend/dist/govuk/settings/_warnings.scss
@@ -57,6 +57,18 @@ $govuk-suppressed-warnings: () !default;
}
}
+/// Logs a deprecation warning that the given component's `<COMPONENT_NAME>.scss` file is deprecated
+///
+/// @access private
+@mixin _component-scss-file-warning($component-name) {
+ $component-path: "<PATH_TO_GOVUK_FRONTEND>/components/#{$component-name}";
+
+ $message: "Importing `#{$component-path}/_#{$component-name}` is deprecated." +
+ " Import `#{$component-path}` instead.";
+
+ @include _warning("component-scss-files", $message);
+}
+
/// Check whether a key is present in the suppressed warnings list.
///
/// @param {String} $key - The key to be checked against `$govuk-suppressed-warnings`.
diff --git a/packages/govuk-frontend/dist/govuk/tools/_index.scss b/packages/govuk-frontend/dist/govuk/tools/_index.scss
index df0739053..02c782b69 100644
--- a/packages/govuk-frontend/dist/govuk/tools/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/tools/_index.scss
@@ -1,5 +1,6 @@
@import "exports";
@import "font-url";
+@import "if";
@import "image-url";
@import "px-to-em";
@import "px-to-rem";
Action run for d4f83ce |
📋 StatsNo changes to any distributed file sizes! Action run for d4f83ce |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO:
Fixes #6752