@moduk/frontend 1.0.4 → 1.0.6

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.
@@ -6,10 +6,10 @@
6
6
  {% endset -%}
7
7
 
8
8
  {{ modukCookieBanner({
9
- ariaLabel: "Cookies on the Defence Service Manual",
9
+ ariaLabel: "Cookies on [name of service]",
10
10
  messages: [
11
11
  {
12
- headingText: "Cookies on the Defence Service Manual",
12
+ headingText: "Cookies on [name of service]",
13
13
  html: html,
14
14
  actions: [
15
15
  {
@@ -2,7 +2,6 @@
2
2
 
3
3
  {{ modukErrorSummary({
4
4
  titleText: "There is a problem",
5
- descriptionText: "There have been some errors when trying to submit your application.",
6
5
  errorList: [
7
6
  {
8
7
  text: "The start date of the contract must include a year",
@@ -0,0 +1,16 @@
1
+ {% from "moduk/components/error-summary/macro.njk" import modukErrorSummary -%}
2
+
3
+ {{ modukErrorSummary({
4
+ titleText: "There is a problem",
5
+ descriptionText: "There have been some errors when trying to submit your application.",
6
+ errorList: [
7
+ {
8
+ text: "The start date of the contract must include a year",
9
+ href: "#incorect-date-format"
10
+ },
11
+ {
12
+ text: "Enter your full name",
13
+ href: "#full-name-input"
14
+ }
15
+ ]
16
+ }) -}}
@@ -4,7 +4,7 @@ import { render, renderFile } from '../../../../../test-utils'
4
4
 
5
5
  describe('error summary', async () => {
6
6
  it('renders the content when using the text property', () => {
7
- const element = renderFile('moduk/components/error-summary/__examples__/default.njk')
7
+ const element = renderFile('moduk/components/error-summary/__examples__/with-description-and-error-list.njk')
8
8
  expect(element).toHaveTextContent('There is a problem')
9
9
  })
10
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moduk/frontend",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "The MOD.UK Frontend contains the code you need to start building a user interface for Ministry of Defence platforms and services.",
5
5
  "main": "dist/lib/index.js",
6
6
  "sass": "src/css/index.scss",
@@ -84,7 +84,7 @@
84
84
  "@babel/cli": "^7.20.7",
85
85
  "@babel/core": "^7.21.0",
86
86
  "@babel/preset-env": "^7.20.2",
87
- "@babel/preset-typescript": "^7.18.6",
87
+ "@babel/preset-typescript": "^7.21.0",
88
88
  "@commitlint/cli": "^17.4.4",
89
89
  "@commitlint/config-conventional": "^17.4.4",
90
90
  "@playwright/test": "^1.30.0",
@@ -103,7 +103,7 @@
103
103
  "eslint-config-airbnb-base": "^15.0.0",
104
104
  "eslint-import-resolver-typescript": "^3.5.3",
105
105
  "eslint-plugin-import": "^2.27.5",
106
- "eslint-plugin-unicorn": "^45.0.1",
106
+ "eslint-plugin-unicorn": "^46.0.0",
107
107
  "glob": "^8.1.0",
108
108
  "happy-dom": "^8.9.0",
109
109
  "husky": "^8.0.3",
@@ -111,7 +111,7 @@
111
111
  "postcss-cli": "^10.1.0",
112
112
  "postcss-fail-on-warn": "^0.2.1",
113
113
  "release-it": "^15.6.0",
114
- "sass": "^1.58.0",
114
+ "sass": "^1.58.3",
115
115
  "shx": "^0.3.4",
116
116
  "ts-node": "^10.9.1",
117
117
  "typescript": "^4.9.5",