Skip to content

Commit 2ee6aee

Browse files
Merge pull request #2 from LandRegistry/feature/update-govuk-frontend
Feature/update govuk frontend
2 parents 5f54bdc + 80220d5 commit 2ee6aee

File tree

58 files changed

+723
-912
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+723
-912
lines changed

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
npm run lint
55

66
# Run format before commit
7-
npm run format
7+
npm run lint-fix
88

99
# generate uml diagram before commit
1010
npm run uml

.storybook/main.ts

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,28 @@ const config: StorybookConfig = {
4444
test: /\.s[ac]ss$/i,
4545
use: [
4646
"style-loader",
47-
"css-loader",
48-
{ loader: "sass-loader", options: { implementation: sass } },
47+
{
48+
loader: "css-loader",
49+
options: {
50+
url: false, // stops css-loader trying to resolve /assets/fonts/... as modules
51+
},
52+
},
53+
{
54+
loader: "sass-loader",
55+
options: {
56+
implementation: sass,
57+
sassOptions: {
58+
quietDeps: true, // suppresses variable conflict from @use ... as *
59+
silenceDeprecations: [
60+
"import",
61+
"global-builtin",
62+
"color-functions",
63+
"if-function",
64+
],
65+
},
66+
// NO additionalData — that's what's causing the duplicate $govuk-assets-path error
67+
},
68+
},
4969
],
5070
},
5171
],
@@ -90,7 +110,13 @@ const config: StorybookConfig = {
90110
},
91111
docs: {},
92112
typescript: { reactDocgen: "react-docgen-typescript" },
93-
staticDirs: ["./public"],
113+
staticDirs: [
114+
"./public",
115+
{
116+
from: "../node_modules/govuk-frontend/dist/govuk/assets",
117+
to: "/assets",
118+
},
119+
],
94120
};
95121

96122
export default config;

assets/uml-diagram.svg

Lines changed: 310 additions & 282 deletions
Loading

package-lock.json

Lines changed: 16 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,47 +55,45 @@
5555
"license": "MIT",
5656
"devDependencies": {
5757
"@babel/core": "^7.29.0",
58-
"@babel/preset-env": "^7.29.0",
58+
"@babel/preset-env": "^7.29.2",
5959
"@babel/preset-react": "^7.28.5",
6060
"@babel/preset-typescript": "^7.28.5",
6161
"@chromatic-com/storybook": "^5.0.1",
62-
"@commitlint/cli": "^20.4.4",
63-
"@commitlint/config-conventional": "^20.4.4",
62+
"@commitlint/cli": "^20.5.0",
63+
"@commitlint/config-conventional": "^20.5.0",
6464
"@eslint/js": "^9.37.0",
6565
"@jest/globals": "^30.3.0",
6666
"@rollup/plugin-commonjs": "^29.0.2",
6767
"@rollup/plugin-json": "^6.1.0",
6868
"@rollup/plugin-node-resolve": "^16.0.3",
6969
"@rollup/plugin-terser": "^1.0.0",
7070
"@rollup/plugin-typescript": "^12.3.0",
71-
"@storybook/addon-a11y": "^10.2.18",
72-
"@storybook/addon-links": "^10.2.18",
71+
"@storybook/addon-a11y": "^10.2.19",
72+
"@storybook/addon-links": "^10.2.19",
7373
"@storybook/addon-styling-webpack": "^3.0.0",
7474
"@storybook/addon-webpack5-compiler-swc": "^4.0.2",
7575
"@storybook/csf": "^0.1.13",
76-
"@storybook/react-vite": "^10.2.18",
77-
"@storybook/react-webpack5": "^10.2.18",
76+
"@storybook/react-vite": "^10.2.19",
77+
"@storybook/react-webpack5": "^10.2.19",
7878
"@storybook/test-runner": "^0.24.2",
7979
"@testing-library/jest-dom": "^6.9.1",
8080
"@testing-library/react": "^16.3.2",
8181
"@types/govuk-frontend": "^5.11.0",
8282
"@types/jest": "^30.0.0",
8383
"@types/react": "^19.2.14",
8484
"@types/react-dom": "^19.2.3",
85-
"@typescript-eslint/eslint-plugin": "^8.46.0",
86-
"@typescript-eslint/parser": "^8.57.0",
8785
"assert": "^2.1.0",
8886
"autoprefixer": "^10.4.27",
8987
"babel-jest": "^30.3.0",
9088
"bootstrap": "^5.3.8",
91-
"chromatic": "^15.2.0",
89+
"chromatic": "^15.3.0",
9290
"css-loader": "^7.1.4",
9391
"deep-iterator": "^1.1.0",
9492
"eslint": "^9.37.0",
9593
"eslint-plugin-react": "^7.37.5",
96-
"eslint-plugin-storybook": "^10.2.18",
94+
"eslint-plugin-storybook": "^10.2.19",
9795
"globals": "^17.4.0",
98-
"govuk-frontend": "^5.14.0",
96+
"govuk-frontend": "^6.1.0",
9997
"html-react-parser": "^5.2.17",
10098
"husky": "^9.1.7",
10199
"identity-obj-proxy": "^3.0.0",
@@ -121,7 +119,7 @@
121119
"sass": "^1.98.0",
122120
"sass-loader": "^16.0.7",
123121
"standard-version": "^9.5.0",
124-
"storybook": "^10.2.18",
122+
"storybook": "^10.2.19",
125123
"style-loader": "^4.0.0",
126124
"stylelint": "^17.4.0",
127125
"stylelint-config-recess-order": "^7.6.1",
@@ -131,10 +129,10 @@
131129
"tslib": "^2.8.1",
132130
"tsuml2": "^0.17.1",
133131
"typescript": "^5.9.3",
134-
"typescript-eslint": "^8.57.0",
132+
"typescript-eslint": "^8.57.1",
135133
"unplugin": "^3.0.0",
136134
"webpack": "^5.105.4",
137-
"@storybook/addon-docs": "^10.2.18"
135+
"@storybook/addon-docs": "^10.2.19"
138136
},
139137
"peerDependencies": {
140138
"govuk-frontend": ">=5.14.0",
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1+
// src/components/Accordion/Accordion.scss
12
// GOV.UK design system
2-
$govuk-images-path: "~govuk-frontend/dist/govuk/assets/images/";
3-
$govuk-fonts-path: "~govuk-frontend/dist/govuk/assets/fonts/";
4-
$govuk-assets-path: "~govuk-frontend/govuk/assets/";
5-
$govuk-font-family: "Arial", sans-serif;
3+
// To customise brand colour in v6 use:
4+
// $govuk-functional-colours: (brand: #87c426);
65

7-
// $govuk-brand-colour: #87c426;
8-
9-
@import "~govuk-frontend/dist/govuk/components/accordion/accordion";
6+
@use "~govuk-frontend/dist/govuk/components/accordion" as *;

src/components/BackLink/BackLink.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "~govuk-frontend/dist/govuk/base";
1+
@use "~govuk-frontend/dist/govuk/base" as *;
22

33
.govuk-back-link.back-link-style-override:hover,
44
.govuk-back-link.back-link-style-override a:hover {

0 commit comments

Comments
 (0)