Releases: x-govuk/govuk-prototype-components
v5.0.2
- Provide distributable SCSS file for GOV.UK Prototype Kit, fixing duplicate GOV.UK Frontend styles being generated. Thanks to @joelanman for reporting. 52c0277
- Update dependencies 8745b95
v5.0.1
v5.0.0
Breaking changes
-
The masthead component now uses a design with a lighter background by default. To reinstate the design with a darker background, add the
x-govuk-masthead--inversemodifier class to the outer<div>element of the component HTML. Or if you’re using Nunjucks, addinverse: trueto the Nunjucks macro. -
The image in the masthead is no longer hidden on the tablet breakpoint and below. To reinstate this behaviour, add the
x-govuk-masthead__image--hide-on-mobilemodifier class to the outer<div>element that surrounds the image. Or if you’re using Nunjucks, addhideOnMobile: trueto theimageoption in the Nunjucks macro.
Documentation
- Update guidance about adapting service navigation when directly above masthead bfa7d3a
- Remove guidance about removing bottom border from header when directly above masthead ab4322c
- Correct path to
iframeResizer8097c13
v4.0.1
Fixes
- Use
govukAttributesmacro in component templates e5ce5ca - Remove unneeded
role="navigation"on<nav>elements 0cd8b0d - Update indenting for component markup 98ae5bf
- Export Sass for individual components 1855f37
Chores
- Update dependencies bfb92b5
Documentation
- Ensure correct JavaScript files are copied to documentation site 72f9aad
- Ensure prototype component scripts only init after
DOMContentLoaded245f76b - Fix script location for example layout 909d3fa
- Fix link in service navigation on documentation site c7af2fd
- Fix broken GitHub link by replacing git+ with an empty string 92b7cf4
- Update release notes ff36aa0
- Use final release of
govuk-eleventy-plugine9ad012
v4.0.0
Breaking changes
-
Removes the primary navigation component. Use the service navigation component in the GOV.UK Design System to help users navigate to the main sections of your service.
-
Minified JavaScript file is now provided at
/dist/govuk-prototype-components.min.js. -
The location of SCSS files has changed. For all components, update your import statement to:
- @import "node_modules/@x-govuk/govuk-prototype-components/x-govuk/all"; + @import "node_modules/@x-govuk/govuk-prototype-components/src/x-govuk"
For individual components, update your import statements to:
- @import "node_modules/@x-govuk/govuk-prototype-components/x-govuk/components/masthead/masthead"; + @import "node_modules/@x-govuk/govuk-prototype-components/src/x-govuk/components/masthead";
-
The location of Nunjucks files has changed. Either update the path used in your templates:
- {% raw %}{% from "node_modules/@x-govuk/govuk-prototype-components/x-govuk/components/masthead/macro.njk" import xGovukMasthead %}{% endraw %} + {% raw %}{% from "node_modules/@x-govuk/govuk-prototype-components/src/x-govuk/components/masthead/macro.njk" import xGovukMasthead %}{% endraw %}
or update the your searchPaths array to point to the
/srcdirectory:const nunjucks = new Nunjucks.Environment( new Nunjucks.FileSystemLoader([ - './node_modules/@x-govuk/govuk-prototype-components' + './node_modules/@x-govuk/govuk-prototype-components/src' ]) )
New features
-
Adds support for Sass modules and
pkg:importing. You can now import component styles into your project like so:- @import "node_modules/@x-govuk/govuk-prototype-components/x-govuk/all"; + @import "pkg:@x-govuk/govuk-prototype-components"
For individual components, use the following:
- @import "node_modules/@x-govuk/govuk-prototype-components/x-govuk/components/masthead/masthead"; + @import "pkg:@x-govuk/govuk-prototype-components/masthead";"
v4.0.0 (Pre-release 1)
v4.0.0 (Pre-release 0)
- Update
rimrafandstylelint-orderdependencies e8e670d - Update getting started documentation and release notes c747b1f
- Update supported versions 54cd881
- Explicitly call
govuk-frontendfromnode_modulesaa5b566 - Move files in
srcdirectory c8fa0a9 - Convert project to ES modules 6cc512e
- Use
govuk-exportsfor components 53c7f2e - Update documentation site 924232d
- Replace Sass imports with module loading methods cd96d8e
- Use index for all component Sass files 8f3fd7b
- Update references to primary navigation component ec6dd2b
- Remove documentation for primary navigation component 692b096
- Remove primary navigation component f78bd05
- Require Require Node v20.19 or above 5479b1f
- Use ESM for documentation directory data file 10989b9
- Lint JavaScript 2b34754
- Use Node version from
.nvmrcfor test workflow b0465ee