Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
3ae0b8e
Upgrade to NHS.UK frontend v10.0.0
colinrotherham Sep 1, 2025
ac97ac1
Set up environments for NHS.UK frontend v10.0.0
colinrotherham Sep 8, 2025
67278a0
Prevent clashes with NHS.UK frontend exports
colinrotherham Sep 23, 2025
253c876
Replace NHS.UK frontend CommonJS workarounds
colinrotherham Sep 8, 2025
cd6a5e0
Prevent unnecessary Babel transforms
colinrotherham Jul 3, 2025
6a30fd4
Prevent duplicate initialisation
colinrotherham Sep 8, 2025
e0febb1
Run Prettier `--write`
colinrotherham Sep 7, 2025
c2e88c5
Fix Storybook path to Sass
colinrotherham Sep 1, 2025
4f1ae5e
Fix links to NHS.UK frontend repo
colinrotherham Sep 1, 2025
7f566ba
Update back link for NHS.UK frontend v10.0.0
colinrotherham Sep 7, 2025
7c17662
Remove support for `nhsuk-button--disabled` class on buttons
colinrotherham Sep 6, 2025
305cf43
Remove support for `disabled` attribute on button links
colinrotherham Sep 6, 2025
d9e9343
Remove support for `debounceTimeout` param on buttons
colinrotherham Sep 8, 2025
b64688d
Update button for NHS.UK frontend v10.0.0
colinrotherham Sep 8, 2025
a819179
Change to new "colour" spelling in NHS.UK frontend v10.0.0
colinrotherham Sep 7, 2025
3cd98ed
Remove icons not in NHS.UK frontend v10.0.0
colinrotherham Sep 7, 2025
b373f1c
Update icons for NHS.UK frontend v10.0.0
colinrotherham Sep 26, 2025
f59a524
Update skip link for NHS.UK frontend v10.0.0
colinrotherham Sep 9, 2025
fc7d44e
Update action link for NHS.UK frontend v10.0.0
colinrotherham Sep 7, 2025
b3353a9
Remove support for breadcrumb back link `accessiblePrefix`
colinrotherham Sep 9, 2025
341240e
Update breadcrumb for NHS.UK frontend v10.0.0
colinrotherham Sep 9, 2025
3d18d41
Update radios for NHS.UK frontend v10.0.0
colinrotherham Sep 9, 2025
27da7cc
Update checkboxes for NHS.UK frontend v10.0.0
colinrotherham Sep 9, 2025
f2096a5
Update footer for NHS.UK frontend v10.0.0
colinrotherham Sep 26, 2025
b449531
Update header for NHS.UK frontend v10.0.0
colinrotherham Sep 26, 2025
59148e7
Fix React warning "Use the `defaultValue` or `value` props instead of…
colinrotherham Sep 8, 2025
c8aaba2
Align character count with NHS.UK frontend
colinrotherham Sep 24, 2025
1ddd345
Align warning callout with NHS.UK frontend
colinrotherham Sep 8, 2025
1408c6b
Align error message with NHS.UK frontend
colinrotherham Sep 8, 2025
7e74d6b
Align error summary with NHS.UK frontend
colinrotherham Sep 11, 2025
a255054
Remove unnecessary comment
colinrotherham Sep 9, 2025
5393ae1
Remove support for contents list optional visually hidden text
colinrotherham Sep 8, 2025
ca52fae
Remove support for inset text optional visually hidden text
colinrotherham Sep 8, 2025
774d2dd
Remove support for care card optional visually hidden text
colinrotherham Sep 8, 2025
cc7691d
Remove support for warning callout custom visually hidden text
colinrotherham Sep 8, 2025
de83ba3
Fix contents list missing ARIA attributes
colinrotherham Sep 8, 2025
f685b87
Avoid casting date input change event
colinrotherham Sep 9, 2025
057a45e
Always update date input value without change handler
colinrotherham Sep 23, 2025
2c6cfb8
Remove unsupported `autoSelectNext` date input feature
colinrotherham Sep 23, 2025
485e951
Remove incorrect `pattern` from date inputs
colinrotherham Sep 9, 2025
0d317bf
Split out separate `Legend` component
colinrotherham Sep 9, 2025
6959158
Skip rendering empty form elements
colinrotherham Sep 9, 2025
12194ea
Remove wrapping form groups around fieldsets
colinrotherham Sep 9, 2025
75f8e65
Fix date input missing `role="group"` accessibility issue
colinrotherham Sep 9, 2025
f3dcad3
Consolidate `<FormGroup>` to support fieldsets and legends
colinrotherham Sep 24, 2025
c6376f5
Add missing migration guides to storybook
colinrotherham Sep 11, 2025
817b3ba
Move display names to exported components
colinrotherham Sep 11, 2025
0ebe087
Remove legacy list panel component
colinrotherham Sep 11, 2025
b089107
Remove automatic sizing from labels and legends
colinrotherham Sep 11, 2025
804c858
Remove unused `LabelBlock` component
colinrotherham Sep 22, 2025
ef1fba5
Update types from `HTMLProps` to `ComponentProps`
colinrotherham Sep 24, 2025
020112e
Remove support for uppercase heading levels
colinrotherham Sep 22, 2025
086fdac
Add default images `alt=""` when not set
colinrotherham Sep 24, 2025
3f5de7b
Align table caption with NHS.UK frontend
colinrotherham Sep 25, 2025
2785580
Widen support for `ref`, `as` and `asElement` props
colinrotherham Sep 26, 2025
961bb38
Polyfill TextEncoder/TextDecoder for ReactDOM
colinrotherham Sep 26, 2025
82d59b0
Document breaking changes
colinrotherham Sep 26, 2025
cce6766
Allow server-side rendering (SSR) in all components
colinrotherham Sep 26, 2025
4539418
Add React DOM render tests
colinrotherham Sep 26, 2025
12ec82f
Remove support for error lines without error messages
colinrotherham Sep 29, 2025
38a0281
Align table with NHS.UK frontend
colinrotherham Sep 29, 2025
a5cacf9
Update changelog
colinrotherham Sep 29, 2025
d270b8e
Remove Jest globals from utils
colinrotherham Sep 29, 2025
cefb631
Update package version to v6.0.0-beta.0
colinrotherham Sep 30, 2025
7932d3a
Resolve various Sonar issues
colinrotherham Sep 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version-file: .nvmrc

- name: Enable corepack
run: corepack enable

- name: Set Yarn version
run: yarn set version stable

Expand Down
15 changes: 7 additions & 8 deletions .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import { addons } from '@storybook/manager-api';
import nhsTheme from './theme';
import { startCase, upperFirst } from "lodash";
import { startCase, upperFirst } from 'lodash';

const sentenceCase = string => {
if (typeof string !== 'string') return ''
return upperFirst(startCase(string).toLowerCase())
}
const sentenceCase = (string) => {
if (typeof string !== 'string') return '';
return upperFirst(startCase(string).toLowerCase());
};

addons.setConfig({
sidebar: {
renderLabel: ({ name, type }) =>
sentenceCase(name),
renderLabel: ({ name, type }) => sentenceCase(name),
},
theme: nhsTheme
theme: nhsTheme,
});
4 changes: 4 additions & 0 deletions .storybook/preview-body.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<script>
document.body.className +=
' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' nhsuk-frontend-supported' : '');
</script>
9 changes: 0 additions & 9 deletions .storybook/preview-head.html

This file was deleted.

2 changes: 1 addition & 1 deletion .storybook/storybook.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Allow current nhsuk styles to override legacy
@import '../node_modules/nhsuk-frontend/packages/nhsuk.scss';
@import 'nhsuk-frontend/dist/nhsuk';

.tag-wrapper {
display: flex;
Expand Down
34 changes: 15 additions & 19 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/dist/index.js",
"outFiles": [
"${workspaceFolder}/**/*.js"
]
}
]
}
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": ["<node_internals>/**"],
"program": "${workspaceFolder}/dist/index.js",
"outFiles": ["${workspaceFolder}/**/*.js"]
}
]
}
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# NHS.UK React components

## 5.0.0 - TBC
## 6.0.0-beta.0 - 30 September 2025

This version provides support for nhsuk-frontend version 10.

For a full list of changes in this release please refer to the [migration doc](https://github.com/NHSDigital/nhsuk-react-components/blob/main/docs/upgrade-to-6.0.md).

## 5.0.0 - 4 November 2024

This version provides support for nhsuk-frontend version 9.

Expand Down
3 changes: 1 addition & 2 deletions bundle-base.tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"@navigation/*": ["src/components/navigation/*"],
"@typography/*": ["src/components/typography/*"],
"@util/*": ["src/util/*"],
"@patterns/*": ["src/patterns/*"],
"@resources/*": ["src/resources/*"]
"@patterns/*": ["src/patterns/*"]
}
},
"include": ["src"],
Expand Down
10 changes: 5 additions & 5 deletions docs/upgrade-to-2.0.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Upgrading to 2.0

There are some breaking changes you'll need to be aware of when upgrading to v2. These are mostly related to us upgrading our dependency on [nhsuk-frontend to v4](https://github.com/nhsuk/nhsuk-frontend/blob/master/CHANGELOG.md#400---26-october-2020) which also includes some breaking changes.
There are some breaking changes you'll need to be aware of when upgrading to v2. These are mostly related to us upgrading our dependency on [nhsuk-frontend to v4](https://github.com/nhsuk/nhsuk-frontend/blob/master/CHANGELOG.md#400---26-october-2020) which also includes some breaking changes.

## New Card Component

Expand Down Expand Up @@ -59,11 +59,11 @@ The `Panel` and `Promo` components have been removed from `nhsuk-frontend` since

```jsx
// Old Imports
import { Button, Panel, Promo } from "nhsuk-react-components";
import { Button, Panel, Promo } from 'nhsuk-react-components';

// New Imports
import { Button } from "nhsuk-react-components";
import { Panel, Promo } from "nhsuk-react-components/dist/deprecated";
import { Button } from 'nhsuk-react-components';
import { Panel, Promo } from 'nhsuk-react-components/dist/deprecated';
```

A warning is printed to the console in dev environments when using these components, as they are set to be removed in the next major release.
Expand All @@ -73,7 +73,7 @@ A warning is printed to the console in dev environments when using these compone
In line with the upstream nhsuk-frontend, NHS Design Kit and GDS recommendations, we now render the input boxes in the date component as follows:

```html
<input type="text" inputType="numeric" pattern="[0-9]*">
<input type="text" inputType="numeric" pattern="[0-9]*" />
```

There is more on this change here:
Expand Down
14 changes: 7 additions & 7 deletions docs/upgrade-to-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

> v3.0 is an upcoming release, this page is a work in progress.

There are some breaking changes you'll need to be aware of when upgrading to v3. These are mostly related to us upgrading our dependency on [nhsuk-frontend to v5](https://github.com/nhsuk/nhsuk-frontend/blob/main/CHANGELOG.md#500---16-march-2021) which also includes some breaking changes.
There are some breaking changes you'll need to be aware of when upgrading to v3. These are mostly related to us upgrading our dependency on [nhsuk-frontend to v5](https://github.com/nhsuk/nhsuk-frontend/blob/main/CHANGELOG.md#500---16-march-2021) which also includes some breaking changes.

## Review Date component is now a pattern

The `ReviewDate` component has been removed from nhsuk-frontend in version 5.0.0. This component is now a `pattern` in the nhsuk-frontend library.
The `ReviewDate` component has been removed from nhsuk-frontend in version 5.0.0. This component is now a `pattern` in the nhsuk-frontend library.

The only change is that the Default import has a new path.

Expand All @@ -16,12 +16,12 @@ There are no functional changes to the component, and it works exactly as it did

```tsx
// Old Import
import { ReviewDate } from "nhsuk-react-components";
import ReviewDate from "nhsuk-react-components/lib/components/review-date";
import { ReviewDate } from 'nhsuk-react-components';
import ReviewDate from 'nhsuk-react-components/lib/components/review-date';

// New Import
import { ReviewDate } from "nhsuk-react-components";
import ReviewDate from "nhsuk-react-components/lib/patterns/review-date";
import { ReviewDate } from 'nhsuk-react-components';
import ReviewDate from 'nhsuk-react-components/lib/patterns/review-date';
```

## NHS Logo PNG Fallback Removed
Expand All @@ -38,4 +38,4 @@ In NHS.UK Frontend v5 and above, the header text now defaults to wrapping undern

## The `prefixText` prop has been added to the `DoDontList.Item` component

You can now add prefixed text to each `DoDontList.Item` component by supplying the `prefixText` prop. Items with a `type` of `dont` will automatically have a 'do not' prefix text added in the next major release to align with the NHS.UK frontend library v5.
You can now add prefixed text to each `DoDontList.Item` component by supplying the `prefixText` prop. Items with a `type` of `dont` will automatically have a 'do not' prefix text added in the next major release to align with the NHS.UK frontend library v5.
Loading