fix(deps): update npm minor updates to ^10.5.1#376
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
0f39079 to
10e0171
Compare
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.
This PR contains the following updates:
^10.4.2→^10.5.1Release Notes
nhsuk/nhsuk-frontend (nhsuk-frontend)
v10.5.1Compare Source
Note: This release was created from the
support/10.xbranch.🔧 Fixes
v10.5.0Compare Source
Note: This release was created from the
support/10.xbranch.🆕 New features
New search input component
We've added a new search input component.
To use the
searchInputNunjucks macro in your service:If you are not using Nunjucks macros, use the HTML markup from the search input examples in the NHS digital service manual.
This change was introduced in pull request #1660: Add search input component.
Improved character count counting
We've added a new
countTypeoption to the character count component to enable improved counting withIntl.Segmenter.This feature was introduced because JavaScript counts
String: lengthin code units not characters, for example:ȩ́counted as 2 code unitsȩwith combining marḱcounted as 2 code unitsewith combining markśanḑcounted as 3 code unitsSimilarly when counting words, "my mother-in-law" is now counted as 4 (not 2) words to correctly follow the Unicode Default Word Boundary Specification.
To enable improved counting in supported browsers you should either:
countType: "characters"to count user-perceived characterscountType: "words"to count words between word boundariesUnsupported browsers will default to the
textareaDescriptionTextmessage shown when JavaScript is unavailable, such as:When using Nunjucks to count characters:
{{ characterCount({ label: { text: "Can you provide more detail?", size: "l", isPageHeading: true }, name: "more-detail", - maxlength: 350 + maxlength: 350, + countType: "characters" }) }}Or when using Nunjucks to count words:
{{ characterCount({ label: { text: "Can you provide more detail?", size: "l", isPageHeading: true }, name: "more-detail", - maxwords: 150 + maxlength: 150, + countType: "words" }) }}Note: The character count
maxwordsoption and word counting behaviour are deprecated and will be removed in a future release. You must replacemaxwordswithmaxlengthwhen usingcountType: "words".This was added in pull requests #1892: Refactor character count method to reduce repeated updates, #1893: Deprecate character count
maxwordsand addcountTypeoption, #1895: Add character countcountType: "characters"option using Intl.Segmenter and #1899: Add character countcountType: "words"option using Intl.Segmenter.Custom character count functions
We've added a new
countFunctionoption to the character count component.Service teams can now cater for server-side differences in:
\nversus\r\nFor example, services might already count multi-byte strings server-side (e.g.
len()in Python) resulting in client-side count mismatches, yet support for improved character count counting may be blocked by a 3rd party library integration.Custom count functions are called with:
text(string) - Textarea valuecontext(object) - Character count contextCharacter count
contextobjects contain the following properties:$textarea- Textarea HTML elementconfig- Character count configsegmenter- Character countIntl.Segmenter(optional)Our built in count functions are available to call or extend via:
This was added in pull request #1897: Add character count
countFunctionoption.Add date input
day,monthandyearNunjucks optionsWe've updated the date input component to add individual
day,monthandyearNunjucks options.These new options can be used to partially override the defaults. For example, setting
error: trueon the year item no longer requires all other item defaults to be set:{{ dateInput({ fieldset: { legend: { text: "What is your date of birth?", size: "l", isPageHeading: true } }, errorMessage: { text: "Date of birth must include a year" }, namePrefix: "dob", values: data.dob, - items: [ - { - name: "day", - label: "Day", - width: 2 - }, - { - name: "month", - label: "Month", - width: 2 - }, - { - name: "year", - label: "Year", - width: 4, - error: true - } - ] + year: { + error: true + } }) }}This was added in pull request #1869: Add date input
day,monthandyearoptions.Updated Nunjucks macro options for components
For consistency with other components, we’ve added new Nunjucks macro options:
elementandtypeoptionstypeoptionautocompleteoptionformGroup.classesoptioninputWrapperoptioncode,prefixandsuffixoptionsvariantoptionformGroup.classesoptionVisit the design system in the NHS digital service manual to see Nunjucks options for each component.
This was added in pull requests #1916: Add disabled component examples and review Nunjucks options and #1946: Updates to link classes and mixins, support for action link as a button.
Added a top-level
disabledNunjucks option to more form controlsWe’ve updated more components to include a top-level
disabledNunjucks option. This will make it easier to set the disabled state for these form controls.disabledoptiondisabledoptiondisabledoptiondisabledoptionDisabled form controls have poor contrast and can confuse some users, so avoid them if possible.
Only use disabled form controls if research shows it makes the user interface easier to understand.
This was added in pull request #1916: Add disabled component examples and review Nunjucks options.
Add icons to buttons
You can now add icons to buttons using the
iconNunjucks options.For example, using
icon: "search"to add an icon-only search button to a text input:With support for both an icon and text shown together:
html: button({ - ariaLabel: "Find", + text: "Find", icon: "search", small: true })Or to change the icon and adjust placement:
html: button({ text: "Find", - icon: "search", + icon: { + name: "arrow-right", + placement: "end" + } })This was added in pull request #1712: Add support for icon buttons.
Add icons using SVGs
You can also add icons using SVG files in the
nhsuk-frontend/dist/nhsuk/assetsdirectory:images/nhsuk-icon-arrow-down-circle.svgimages/nhsuk-icon-arrow-down.svgimages/nhsuk-icon-arrow-left-circle.svgimages/nhsuk-icon-arrow-left.svgimages/nhsuk-icon-arrow-right-circle.svgimages/nhsuk-icon-arrow-right.svgimages/nhsuk-icon-arrow-up-circle.svgimages/nhsuk-icon-arrow-up.svgimages/nhsuk-icon-chevron-down-circle.svgimages/nhsuk-icon-chevron-left-circle.svgimages/nhsuk-icon-chevron-right-circle.svgimages/nhsuk-icon-chevron-up-circle.svgimages/nhsuk-icon-cross.svgimages/nhsuk-icon-minus.svgimages/nhsuk-icon-plus.svgimages/nhsuk-icon-search.svgimages/nhsuk-icon-tick.svgimages/nhsuk-icon-user.svgIf you use Sass and you've changed the default
/assets/public path (for example, NunjucksassetPath), make sure$nhsuk-assets-pathis configured:@​forward "nhsuk-frontend/dist/nhsuk" with ( + $nhsuk-assets-path: "/public/assets/", $nhsuk-fonts-path: "https://assets.nhs.uk/fonts/" );This was added in pull request #1915: Render Nunjucks icon macro into SVG files.
Add a modifier class for inline checkboxes
We've added a new
.nhsuk-checkboxes--inlineclass andinlineNunjucks option for the checkboxes component.If there are only 2 short options, you can use this to display the checkboxes horizontally (inline). On small screens such as mobile devices, the checkboxes will still stack vertically.
For example:
{{ checkboxes({ fieldset: { legend: { text: "Which nipple has changed?" } }, name: "area", + inline: true, items: [ { value: "right", text: "Right nipple" }, { value: "left", text: "Left nipple" } ] }) }}This was added in pull request #1937: Add a modifier class for inline checkboxes.
Add a template with all components imported
If you are using our Nunjucks page template, you can now extend
template-with-imports.njkinstead oftemplate.njkto automatically import all components.This was added in pull request #1921: Add a template with all components imported.
Style links with text colour
You can now style links with text colour by adding the
nhsuk-link--text-colourHTML class, or by including the Sass mixin for custom components:This was added in pull request #1946: Updates to link classes and mixins, support for action link as a button.
Style links to remove underlines
You can now remove underlines from links by adding the
nhsuk-link--no-underlineHTML class, or by including the Sass mixin for custom components:An underline still appears when the user hovers their cursor over the link.
This was added in pull request #1946: Updates to link classes and mixins, support for action link as a button.
🗑️ Deprecated features
Rename the character count
maxwordsoptionTo support improved word counting using the browser
Intl.SegmenterAPI, you should replace the character countmaxwordsoption withmaxlengthand setcountType: "words".For example, using Nunjucks:
{{ characterCount({ label: { text: "Can you provide more detail?", size: "l", isPageHeading: true }, name: "more-detail", - maxwords: 150 + maxlength: 150, + countType: "words" }) }}Or when using the JavaScript API:
new CharacterCount($root, { - maxwords: 150 + maxlength: 150, + countType: 'words' })The previous
maxwordsoption and word counting behaviour are deprecated and will be removed in a future release.This change was introduced in pull requests #1893: Deprecate character count
maxwordsand addcountTypeoption and #1899: Add character countcountType: "words"option using Intl.Segmenter.Rename Sass mixin for white link style
If you use the Sass
nhsuk-link-style-whitemixin, you should rename it tonhsuk-link-style-reverse.The previous name is deprecated and will be removed in a future release.
This change was introduced in pull request #1946: Updates to link classes and mixins, support for action link as a button.
♻️ Changes
Change border colour for details component and conditionally revealed content
We've changed the border colour shown to the left of details component and conditionally revealed content.
#d8dde0) to grey-3 (#aeb7bd)#​4c6272) to grey-3 (#aeb7bd)This change was introduced in pull request #1788: Change border colour for details component and conditionally revealed content.
Update search and tick icon SVG paths
SVG paths for the search and tick icons have been updated for improved vertical alignment. You do not need to do anything if you're using Nunjucks macros.
If you are not using Nunjucks macros, update your SVG paths using the icon examples in the NHS digital service manual as shown below.
To update the search icon:
To update the tick icon:
This change was introduced in pull request #1951: Improve vertical alignment for search and tick SVG icon paths.
Improve screen reader announcements for header search button
We've updated the HTML for the header search button to improve NVDA screen reader announcements.
If you are not using Nunjucks macros, update your HTML markup using the header examples in the NHS digital service manual as follows:
aria-label="Search"attribute to the<button>elementaria-label="Search"androle="img"attributes from the<svg>icon<title>Search</title>child element from the<svg>iconaria-hidden="true"attribute to the<svg>iconThis change was introduced in pull request #1712: Add support for icon buttons.
🔧 Fixes
Configuration
📅 Schedule: (in timezone Europe/London)
* 9-16 * * 1-5)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.