Skip to content

Commit

Permalink
Merge pull request #3525 from alphagov/dependabot/npm_and_yarn/govuk-…
Browse files Browse the repository at this point in the history
…frontend-5.1.0

Bump govuk-frontend from 5.0.0 to 5.1.0
  • Loading branch information
colinrotherham committed Feb 6, 2024
2 parents bb93175 + 28cce47 commit ecc5cb5
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/get-macro-options/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function getMacroOptions(componentName) {
name:
option.type === 'array' && option.params
? `Options for ${names.join(' ')} ${option.type} objects`
: `Options for ${names.join(' ')} ${option.type}`,
: `Options for ${names.join(' ')} ${option.isComponent ? 'component' : option.type}`,

options: option.params
}
Expand Down
8 changes: 5 additions & 3 deletions lib/metalsmith.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,16 @@ module.exports = metalsmith
}

await Promise.all([
copyAssets('{fonts,images}/*', {
// GOV.UK Frontend `/assets/images` use new crown
copyAssets('{fonts/*,images/*,manifest.json}', {
cwd: join(dirname(require.resolve('govuk-frontend')), 'assets'),
dest: 'assets'
}),

copyAssets('manifest.json', {
// GOV.UK Frontend `/assets/v5.0.0/images` use old crown via `src/assets`
copyAssets('{fonts/*,manifest.json}', {
cwd: join(dirname(require.resolve('govuk-frontend')), 'assets'),
dest: 'assets'
dest: 'assets/v5.0.0'
}),

copyAssets('govuk-frontend.min.css?(.map)', {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"dependencies": {
"accessible-autocomplete": "^2.0.4",
"clipboard": "^2.0.11",
"govuk-frontend": "^5.0.0",
"govuk-frontend": "^5.1.0",
"iframe-resizer": "^4.3.9",
"lunr": "^2.3.9"
},
Expand Down
Binary file added src/assets/v5.0.0/images/favicon.ico
Binary file not shown.
4 changes: 4 additions & 0 deletions src/assets/v5.0.0/images/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/v5.0.0/images/govuk-crest-2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/v5.0.0/images/govuk-crest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/v5.0.0/images/govuk-icon-180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/v5.0.0/images/govuk-icon-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/v5.0.0/images/govuk-icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/v5.0.0/images/govuk-icon-mask.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ p code {
padding: 1px 3px;
color: $app-code-color;
background-color: govuk-colour("light-grey");
@include govuk-typography-responsive($size: 16);
@include govuk-font-size($size: 16);
@include govuk-media-query($from: tablet) {
padding: 2px 4px;
}
Expand All @@ -269,7 +269,7 @@ pre code {
border: $govuk-focus-width solid transparent;
outline: 1px solid $govuk-border-colour;
background-color: $app-light-grey;
@include govuk-typography-responsive($size: 19);
@include govuk-font-size($size: 19);
@include govuk-responsive-margin(4, "bottom");

&:focus {
Expand Down
3 changes: 2 additions & 1 deletion views/layouts/_generic.njk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends "govuk/template.njk" %}

{% set assetUrl = 'https://design-system.service.gov.uk/assets' %}
{% set assetPath = "/assets/v5.0.0" %}
{% set assetUrl = "https://design-system.service.gov.uk/assets/v5.0.0" %}

{% block pageTitle %}{{ title | smartypants }} – GOV.UK Design System{% endblock %}

Expand Down
4 changes: 2 additions & 2 deletions views/partials/_example.njk
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
<strong>Required.</strong>
{% endif %}
{{ option.description | safe }}
{% if (option.params) or ["hint", "label"].includes(option.slug) %}
{% if option.isComponent and not ["hint", "label"].includes(option.slug) %}
{% if (option.params) or (option.isComponent and ["hint", "label"].includes(option.id)) %}
{% if option.isComponent and not ["hint", "label"].includes(option.id) %}
{# Link to subset of Nunjucks macro options table and Design System component page -#}
See supported <a href="#options-{{ exampleId }}--{{ option.slug }}">{{ option.name | safe }}</a> options for <a href="/components/{{ option.slug }}/#options-{{ option.slug }}-example">{{ optionName | safe }}</a>.
{% else %}
Expand Down

0 comments on commit ecc5cb5

Please sign in to comment.