diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fe1314da..c2ec28a00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # NHS.UK React components +## Unreleased + +This version provides support for NHS.UK frontend v10.2 and includes: + +- [Password input component](https://service-manual.nhs.uk/design-system/components/password-input) +- [Smaller and inline buttons](https://service-manual.nhs.uk/design-system/components/buttons#smaller-buttons) +- [Text input styles for codes and sequences](https://service-manual.nhs.uk/design-system/components/text-input#codes-and-sequences) +- [Select](https://service-manual.nhs.uk/design-system/components/select) dividers using `` + +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). + ## 6.0.0-beta.4 - 5 November 2025 This version provides support for NHS.UK frontend v10.1 and includes: diff --git a/docs/upgrade-to-6.0.md b/docs/upgrade-to-6.0.md index 9c0026167..3ed03af05 100644 --- a/docs/upgrade-to-6.0.md +++ b/docs/upgrade-to-6.0.md @@ -18,10 +18,76 @@ The updated [header](https://service-manual.nhs.uk/design-system/components/head - update NHS logo in the header to have higher contrast when focused - refactor CSS classes and BEM naming, use hidden attributes instead of modifier classes, use generic search element +#### Use the password input component to help users accessibly enter passwords + +The [password input](https://service-manual.nhs.uk/design-system/components/password-input) component from NHS.UK frontend v10.2 allows users to choose: + +- whether their passwords are visible or not +- to enter their passwords in plain text + +This helps users use longer and more complex passwords without needing to remember what they've already typed. + #### Smaller versions of radio buttons and checkboxes You can now use smaller versions of the [radios](https://service-manual.nhs.uk/design-system/components/radios) and [checkboxes](https://service-manual.nhs.uk/design-system/components/checkboxes) components by adding the `small` prop. +#### Smaller versions of buttons + +You can now use smaller versions of [buttons](https://service-manual.nhs.uk/design-system/components/buttons) by adding the `small` prop. + +#### Secondary buttons with solid white background + +By default, the secondary button is transparent and has no colour. + +You can now make the [button](https://service-manual.nhs.uk/design-system/components/button) component white when you use it on darker backgrounds by adding the `secondarySolid` prop. + +#### Add inline buttons to text inputs and select menus + +You can now add inline buttons to text inputs and select menus using the `formGroupProps.afterInput` prop. + +```jsx + ( + + ), + }}, +/> +``` + +#### Add a 'code' prop for text inputs that accept codes and sequences + +We've added a new `code` prop for the [text input](https://service-manual.nhs.uk/design-system/components/text-input) component. This improves readability of text inputs that receive codes and sequences (like NHS numbers, security codes or booking references). + +```patch + +``` + +#### Add a 'divider' between select options + +Newer browsers support [using `
` (horizontal rule) elements inside a ` + First name (A to Z) + First name (Z to A) ++ + Last name (A to Z) + Last name (Z to A) + +``` + ### Numbered pagination component The [pagination](https://service-manual.nhs.uk/design-system/components/pagination) component from NHS.UK frontend v10.1 has been updated to support numbered pagination: diff --git a/package.json b/package.json index 5375d9e0a..5f632a13b 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "jest-axe": "^10.0.0", "jest-environment-jsdom": "^30.2.0", "lodash": "^4.17.21", - "nhsuk-frontend": "^10.1.0", + "nhsuk-frontend": "^10.2.2", "outdent": "^0.8.0", "prettier": "^3.7.4", "react": "^19.2.3", @@ -116,7 +116,7 @@ }, "peerDependencies": { "classnames": ">=2.5.0", - "nhsuk-frontend": ">=10.1.0 <11.0.0", + "nhsuk-frontend": ">=10.2.0 <11.0.0", "react": ">=18.2.0", "react-dom": ">=18.2.0", "tslib": ">=2.8.0" diff --git a/src/__tests__/index.test.ts b/src/__tests__/index.test.ts index c6a86f285..9daf3b7ff 100644 --- a/src/__tests__/index.test.ts +++ b/src/__tests__/index.test.ts @@ -101,6 +101,7 @@ describe('Index', () => { 'PaginationLinkText', 'Panel', 'PanelTitle', + 'PasswordInput', 'Radios', 'RadiosContext', 'RadiosDivider', @@ -110,6 +111,7 @@ describe('Index', () => { 'Row', 'SearchIcon', 'Select', + 'SelectDivider', 'SelectOption', 'SkipLink', 'SummaryList', diff --git a/src/components/content-presentation/do-and-dont-list/DoAndDontList.tsx b/src/components/content-presentation/do-and-dont-list/DoAndDontList.tsx index 38280ca2e..be6aeb060 100644 --- a/src/components/content-presentation/do-and-dont-list/DoAndDontList.tsx +++ b/src/components/content-presentation/do-and-dont-list/DoAndDontList.tsx @@ -20,12 +20,14 @@ const DoAndDontListComponent = forwardRef( {heading || (listType === 'do' ? 'Do' : "Don't")} + {/* eslint-disable-next-line jsx-a11y/no-redundant-roles */}
    {children}
diff --git a/src/components/content-presentation/do-and-dont-list/__tests__/__snapshots__/DoAndDontList.test.tsx.snap b/src/components/content-presentation/do-and-dont-list/__tests__/__snapshots__/DoAndDontList.test.tsx.snap index 549880e7e..8dd10330e 100644 --- a/src/components/content-presentation/do-and-dont-list/__tests__/__snapshots__/DoAndDontList.test.tsx.snap +++ b/src/components/content-presentation/do-and-dont-list/__tests__/__snapshots__/DoAndDontList.test.tsx.snap @@ -33,6 +33,7 @@ exports[`DoAndDontList list type "do" matches snapshot (via server): client 1`]