Releases: NHSDigital/nhsuk-react-components
New Release - 1.2.6
๐ New Release - 1.2.6 ๐
Changelog:
- Fixed an issue with the DateInput component where the internal state was being cleared on input changes.
You can install this version by running
yarn add [email protected]
# Or
npm i --save [email protected]
New Release - 1.2.5
๐ New Release - 1.2.5 ๐
Changelog:
- Fixes a keyboard focus issue with the SkipLink component
You can install this version by running
yarn add [email protected]
# Or
npm i --save [email protected]New Release - 1.2.4
๐ New Release - 1.2.4 ๐
Changelog:
- Fixes some minor alignment issues with nhsuk-frontend
You can install this version by running
yarn add [email protected]
# Or
npm i --save [email protected]New Release - 1.2.3
๐ New Release - 1.2.3 ๐
Note: Releases 1.2.1 and 1.2.2 included a minor patch to fix an uncontrolled input warning.
Changelog:
- Fixes an issue where the nhsuk-form-group--wrapper was being applied to the Form component where it should not have been - thanks @AdamChrimes
- Allows passing of custom props to the in any form element
- Fixes an issue where the disableErrorFromComponents prop disabled displaying the error text as well as the error line - thanks @lukepearson
You can install this version by running
yarn add [email protected]
# Or
npm i --save [email protected]New Release - 1.2.0
๐ New Release - 1.2.0 ๐
This release contains a refactor of the logic around the Form components. Each form component is now wrapped inside of it's own <div class="nhsuk-form-group"> element, and that is where the error classes are set when a component has an error. Note that if you have multiple form elements inside of a Fieldset component, then only one error line will be present for that Fieldset, not for each individual component (this can be disabled with the disableErrorLine={true} prop).
This refactor also helps improve the accessibility of each form component by default. If a hint prop is supplied, the input will automatically gain a aria-describedby prop set to the ID of the Hint component. This is also true of the label prop, where an aria-labelledby prop is supplied. Note that if an ID is not supplied to any form component, it will generate it's own unique ID. This has the potential to break snapshot testing, so any form elements tested using snapshots will require IDs to be set.
If you have previously used the disableErrorFromComponents prop on the Form component in order to implement custom behaviour, this will continue to work.
The final small change is pertinent to the Radios and Checkboxes components - each child (Radios.Radio and Checkboxes.Box respectively) will now assign itself an ID according to (in order of preference) the idPrefix prop (if supplied) or the id of the input component (whether supplied or generated). If an ID is assigned directly to a child component, that will override any generated IDs. Previously, the generated IDs could fall back to using the name prop supplied to the Input component. Because name props do not have to be unique, this was taken back out.
If you have any issues with this release, feel free to pop a message in this channel, or raise an issue on the Github repository.
You can install this version by running:
yarn add [email protected]
# Or
npm i --save [email protected]Release 1.1.2
๐ New Release - 1.1.2 ๐
Changelog
- Fix to the DoDontList component, allowing custom headings to be passed.
Release 1.1.1
๐ New Release - 1.1.1 ๐
Changelog
- Fix to the DateInput component where values were not being passed back as an object in the onChange handler.
- Allow passing of
valueanddefaultValueto the DateInput to prepopulate the fields without using individual elements. - Fix a typing issue with the Input width prop where the
20and30values were not specified.
Release v1.1.0
๐ New Release - 1.1.0 ๐
Changelog
- Added Row and Column examples to the Storybook
- Added an example of the disableErrorFromComponents prop for the Form component to the Storybook
- Added an example of a pre-populated DateInput to the Storybook
- Consistent behaviour of
label,hintanderrorprops in Form components, each with their own respectivelabelPropsprops to further customise behaviour if needed. - Fixed an issue where the
classNameprop was not being passed to theWarningCalloutcomponent. - Fixed an issue where props were not being directly passed to the
Fieldset.Legendcomponent. - Added optional
sizeprops to theFieldset.LegendandLabelcomponents to allow for variable sizing (i.e."s", "m", "l", "xl").
Release 1.0.1
๐ New Release - 1.0.0 ๐
Seeing as we haven't seen many issues, I thought to take the release out of the @next tag and finally publish version 1.0.0!
(We're actually now on 1.0.1 as there was a dependency still in the dependencies which should have been in devDependencies ).
Changes:
- Fix: the classNames function was being passed into itself, instead of the className variable (thanks @aiwatko !)
- Fix: the disableDefaultBehaviour prop was being passed to the SkipLink component inside of the ...rest variable, causing a React "React does not recognise the prop on a DOM element" error (thanks @lukepearson !)
- Feature: A useFormContext hook has been created to allow other packages (i.e nhsuk-react-components-extensions to be able to easily integrate into the existing Form error logic.
- Fix: The dependency @storybook/storybook-deployer has been removed from the dependencies, and now lives in the devDependencies.