@x-govuk/nhsuk-eleventy-plugin 1.0.6 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/components/_index.scss +1 -1
- package/src/components/card-group/template.njk +1 -2
- package/src/components/{blockquote → govspeak}/_index.scss +8 -2
- package/src/components/search/search.js +1 -1
- package/src/filters/items-from-collection.js +1 -2
- package/src/markdown-it.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@x-govuk/nhsuk-eleventy-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Write documentation using Markdown and publish it using NHS.UK styles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nhsuk",
|
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
"markdown-it-sub": "^2.0.0",
|
|
75
75
|
"markdown-it-sup": "^2.0.0",
|
|
76
76
|
"markdown-it-table-of-contents": "^1.0.0",
|
|
77
|
-
"nhsuk-frontend": "^10.
|
|
77
|
+
"nhsuk-frontend": "^10.3.0",
|
|
78
78
|
"rollup": "^4.1.0",
|
|
79
79
|
"sass": "^1.45.1"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@x-govuk/eslint-config": "^0.0.1",
|
|
83
83
|
"@x-govuk/nhsuk-eleventy-plugin": "file:./",
|
|
84
|
-
"np": "^
|
|
84
|
+
"np": "^11.0.0",
|
|
85
85
|
"prettier": "^3.1.0",
|
|
86
86
|
"stylelint": "^16.0.0",
|
|
87
87
|
"stylelint-config-gds": "^2.0.0",
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
@use "../../vendor/nhsuk-frontend" as *;
|
|
2
2
|
|
|
3
|
-
@include nhsuk-exports("nhsuk-eleventy-plugin/components/
|
|
4
|
-
//
|
|
3
|
+
@include nhsuk-exports("nhsuk-eleventy-plugin/components/govspeak") {
|
|
4
|
+
// Information callout
|
|
5
|
+
// https://components.publishing.service.gov.uk/component-guide/govspeak/information_callout
|
|
6
|
+
[data-govspeak="information-callout"] {
|
|
7
|
+
@extend .nhsuk-inset-text;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Blockquote
|
|
5
11
|
// https://components.publishing.service.gov.uk/component-guide/govspeak/blockquote
|
|
6
12
|
// https://github.com/alphagov/govuk_publishing_components/blob/main/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss
|
|
7
13
|
blockquote[data-govspeak="blockquote"] {
|
|
@@ -7,7 +7,7 @@ export class SearchElement extends HTMLElement {
|
|
|
7
7
|
this.statusMessage = null
|
|
8
8
|
this.$container = this.querySelector('.nhsuk-header__search')
|
|
9
9
|
this.$searchForm = this.querySelector('.nhsuk-header__search-form')
|
|
10
|
-
this.$searchInput = this.querySelector('.nhsuk-header__search-input')
|
|
10
|
+
this.$searchInput = this.querySelector('.nhsuk-header__search .nhsuk-input')
|
|
11
11
|
this.searchIndex = null
|
|
12
12
|
this.searchIndexUrl = this.getAttribute('index')
|
|
13
13
|
this.searchResults = []
|
|
@@ -70,8 +70,7 @@ export function itemsFromCollection(array, n) {
|
|
|
70
70
|
...(item.caption && { caption: item.caption }),
|
|
71
71
|
heading: smart(item.title),
|
|
72
72
|
descriptionHtml: getDescriptionHtml(item),
|
|
73
|
-
...(item.image && {
|
|
74
|
-
...(item.image && { imgALT: item.image.alt })
|
|
73
|
+
...(item.image && { image: item.image })
|
|
75
74
|
}))
|
|
76
75
|
|
|
77
76
|
return sliceFromCollection(array, n)
|
package/src/markdown-it.js
CHANGED
|
@@ -43,7 +43,7 @@ export function md(markdownOptions = {}) {
|
|
|
43
43
|
.use(markdownItGovuk, {
|
|
44
44
|
brand: 'nhsuk',
|
|
45
45
|
calvert: true,
|
|
46
|
-
govspeak: ['blockquote'],
|
|
46
|
+
govspeak: ['blockquote', 'information-callout'],
|
|
47
47
|
headingsStartWith: markdownOptions.headingsStartWith
|
|
48
48
|
})
|
|
49
49
|
.use(markdownItAbbr)
|