@moduk/frontend 0.3.5 → 0.3.7

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.
@@ -1,7 +1,7 @@
1
1
  {% from "moduk/components/radios/macro.njk" import modukRadios %}
2
2
 
3
3
  {{ modukRadios({
4
- name: "organisation",
4
+ name: "organisation-default",
5
5
  fieldset: {
6
6
  legend: {
7
7
  text: "Which organisation do you work for?",
@@ -0,0 +1,26 @@
1
+ {%- from "moduk/components/radios/macro.njk" import modukRadios -%}
2
+
3
+ {{ modukRadios({
4
+ classes: "govuk-radios--inline",
5
+ name: "changed-name",
6
+ fieldset: {
7
+ legend: {
8
+ text: "Have you changed your name?",
9
+ isPageHeading: true,
10
+ classes: "govuk-fieldset__legend--l"
11
+ }
12
+ },
13
+ hint: {
14
+ text: "This includes changing your last name or spelling your name differently."
15
+ },
16
+ items: [
17
+ {
18
+ value: "yes",
19
+ text: "Yes"
20
+ },
21
+ {
22
+ value: "no",
23
+ text: "No"
24
+ }
25
+ ]
26
+ }) }}
@@ -1,7 +1,7 @@
1
1
  {% from "moduk/components/radios/macro.njk" import modukRadios %}
2
2
 
3
3
  {{ modukRadios({
4
- name: "organisation",
4
+ name: "organisation-not-as-page-heading",
5
5
  fieldset: {
6
6
  legend: {
7
7
  text: "Which organisation do you work for?"
@@ -1,7 +1,7 @@
1
1
  {% from "moduk/components/radios/macro.njk" import modukRadios %}
2
2
 
3
3
  {{ modukRadios({
4
- name: "organisation",
4
+ name: "organisation-small",
5
5
  classes: "govuk-radios--small",
6
6
  fieldset: {
7
7
  legend: {
@@ -1,32 +1,29 @@
1
1
  {% from "moduk/components/radios/macro.njk" import modukRadios %}
2
2
 
3
3
  {{ modukRadios({
4
- name: "sign-on",
4
+ name: "with-divider-option",
5
5
  fieldset: {
6
6
  legend: {
7
- text: "Sign on",
7
+ text: "How do you want to sign in?",
8
8
  isPageHeading: true,
9
9
  classes: "govuk-fieldset__legend--l"
10
10
  }
11
11
  },
12
- hint: {
13
- text: "You need an account to use this service"
14
- },
15
12
  items: [
16
13
  {
17
14
  value: "biometric",
18
- text: "Sign on with USB security key"
15
+ text: "Sign in with a security key"
19
16
  },
20
17
  {
21
18
  value: "userpass",
22
- text: "Sign on with username and password"
19
+ text: "Sign in with a username and password"
23
20
  },
24
21
  {
25
22
  divider: "or"
26
23
  },
27
24
  {
28
- value: "reset",
29
- text: "Reset account"
25
+ value: "register",
26
+ text: "Register for a new account"
30
27
  }
31
28
  ]
32
29
  }) }}
@@ -1,7 +1,7 @@
1
1
  {% from "moduk/components/radios/macro.njk" import modukRadios %}
2
2
 
3
3
  {{ modukRadios({
4
- name: "organisation",
4
+ name: "organisation-with-error",
5
5
  fieldset: {
6
6
  legend: {
7
7
  text: "Which organisation do you work for?",
@@ -1,10 +1,10 @@
1
1
  {% from "moduk/components/radios/macro.njk" import modukRadios %}
2
2
 
3
3
  {{ modukRadios({
4
- name: "sign-on",
4
+ name: "sign-in-with-hint",
5
5
  fieldset: {
6
6
  legend: {
7
- text: "Sign on",
7
+ text: "How do you want to sign in?",
8
8
  isPageHeading: true,
9
9
  classes: "govuk-fieldset__legend--l"
10
10
  }
@@ -15,16 +15,16 @@
15
15
  items: [
16
16
  {
17
17
  value: "biometric",
18
- text: "Sign on with USB security key",
18
+ text: "Sign in with a security key",
19
19
  hint: {
20
- text: "You will need USB secuirty key."
20
+ text: "You’ll need a registered USB security key."
21
21
  }
22
22
  },
23
23
  {
24
24
  value: "userpass",
25
- text: "Sign on with username and password",
25
+ text: "Sign in with a username and password",
26
26
  hint: {
27
- text: "You will need 2FA enabled."
27
+ text: "You’ll need access to your two-factor authentication device."
28
28
  }
29
29
  }
30
30
  ]
@@ -1,14 +1,12 @@
1
- {% from "moduk/components/skip-link/macro.njk" import modukSkipLink %}
1
+ {%- from "moduk/components/skip-link/macro.njk" import modukSkipLink -%}
2
2
 
3
3
  {# Wrapped in a <div> so there is one root element, for visual regression tests to use #}
4
4
 
5
5
  <div>
6
+ <p class="govuk-body" id="content">To view the skip link component tab to this example, or click inside this example and press tab.</p>
6
7
 
7
8
  {{ modukSkipLink({
8
9
  text: "Skip to main content",
9
10
  href: "#content"
10
11
  }) }}
11
-
12
- <p class="govuk-body" id="content">Press tab to view the skip link component.</p>
13
-
14
12
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moduk/frontend",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
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",
@@ -86,12 +86,12 @@
86
86
  "@babel/preset-env": "^7.20.2",
87
87
  "@babel/preset-typescript": "^7.18.6",
88
88
  "@commitlint/cli": "^17.4.2",
89
- "@commitlint/config-conventional": "^17.3.0",
89
+ "@commitlint/config-conventional": "^17.4.2",
90
90
  "@playwright/test": "^1.29.2",
91
91
  "@release-it/conventional-changelog": "^5.1.1",
92
- "@testing-library/dom": "^8.19.1",
92
+ "@testing-library/dom": "^8.20.0",
93
93
  "@testing-library/jest-dom": "^5.16.5",
94
- "@types/glob": "^8.0.0",
94
+ "@types/glob": "^8.0.1",
95
95
  "@types/lodash": "^4.14.189",
96
96
  "@types/nunjucks": "^3.2.1",
97
97
  "@typescript-eslint/eslint-plugin": "^5.48.2",
@@ -110,11 +110,11 @@
110
110
  "lint-staged": "^13.1.0",
111
111
  "postcss-cli": "^10.1.0",
112
112
  "postcss-fail-on-warn": "^0.2.1",
113
- "release-it": "^15.5.0",
113
+ "release-it": "^15.6.0",
114
114
  "sass": "^1.57.1",
115
115
  "shx": "^0.3.4",
116
116
  "ts-node": "^10.9.1",
117
- "typescript": "^4.9.3",
117
+ "typescript": "^4.9.5",
118
118
  "vitest": "^0.28.3",
119
119
  "webpack": "^5.75.0",
120
120
  "webpack-cli": "^5.0.1"