@moduk/frontend 0.3.9 → 0.3.11
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/dist/client/moduk-frontend.umd.js +1 -1
- package/dist/client/moduk-frontend.umd.js.map +1 -1
- package/dist/css/index.css +1 -1
- package/dist/lib/nunjucks/moduk/components/summary-list/__examples__/cards-with-action.njk +98 -0
- package/dist/lib/nunjucks/moduk/components/summary-list/__examples__/cards.njk +184 -0
- package/package.json +6 -6
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{%- from "moduk/components/summary-list/macro.njk" import modukSummaryList -%}
|
|
2
|
+
|
|
3
|
+
<div>
|
|
4
|
+
{{- modukSummaryList({
|
|
5
|
+
card: {
|
|
6
|
+
title: {
|
|
7
|
+
text: "Project A"
|
|
8
|
+
},
|
|
9
|
+
actions: {
|
|
10
|
+
items: [
|
|
11
|
+
{
|
|
12
|
+
href: "#",
|
|
13
|
+
text: "Change phase",
|
|
14
|
+
visuallyHiddenText: "of project A"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
href: "#",
|
|
18
|
+
text: "Archive",
|
|
19
|
+
visuallyHiddenText: "project A"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
rows: [
|
|
25
|
+
{
|
|
26
|
+
key: {
|
|
27
|
+
text: "Phase"
|
|
28
|
+
},
|
|
29
|
+
value: {
|
|
30
|
+
html: "Beta"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
key: {
|
|
35
|
+
text: "Start date"
|
|
36
|
+
},
|
|
37
|
+
value: {
|
|
38
|
+
html: "1 November 2022"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
key: {
|
|
43
|
+
text: "Team"
|
|
44
|
+
},
|
|
45
|
+
value: {
|
|
46
|
+
html: "Team A"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}) }}
|
|
51
|
+
{{ modukSummaryList({
|
|
52
|
+
card: {
|
|
53
|
+
title: {
|
|
54
|
+
text: "Project B"
|
|
55
|
+
},
|
|
56
|
+
actions: {
|
|
57
|
+
items: [
|
|
58
|
+
{
|
|
59
|
+
href: "#",
|
|
60
|
+
text: "Change phase",
|
|
61
|
+
visuallyHiddenText: "of project B"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
href: "#",
|
|
65
|
+
text: "Archive",
|
|
66
|
+
visuallyHiddenText: "project B"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
rows: [
|
|
72
|
+
{
|
|
73
|
+
key: {
|
|
74
|
+
text: "Phase"
|
|
75
|
+
},
|
|
76
|
+
value: {
|
|
77
|
+
html: "Live"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
key: {
|
|
82
|
+
text: "Start date"
|
|
83
|
+
},
|
|
84
|
+
value: {
|
|
85
|
+
html: "12 December 2021"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
key: {
|
|
90
|
+
text: "Team"
|
|
91
|
+
},
|
|
92
|
+
value: {
|
|
93
|
+
html: "Team B"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}) -}}
|
|
98
|
+
</div>
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
{%- from "moduk/components/summary-list/macro.njk" import modukSummaryList -%}
|
|
2
|
+
|
|
3
|
+
<div>
|
|
4
|
+
{{- modukSummaryList({
|
|
5
|
+
card: {
|
|
6
|
+
title: {
|
|
7
|
+
text: "Project A"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
rows: [
|
|
11
|
+
{
|
|
12
|
+
key: {
|
|
13
|
+
text: "Phase"
|
|
14
|
+
},
|
|
15
|
+
value: {
|
|
16
|
+
html: "Beta"
|
|
17
|
+
},
|
|
18
|
+
actions: {
|
|
19
|
+
items: [
|
|
20
|
+
{
|
|
21
|
+
href: "#",
|
|
22
|
+
text: "Change",
|
|
23
|
+
visuallyHiddenText: "status"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
key: {
|
|
30
|
+
text: "Start date"
|
|
31
|
+
},
|
|
32
|
+
value: {
|
|
33
|
+
html: "1 November 2022"
|
|
34
|
+
},
|
|
35
|
+
actions: {
|
|
36
|
+
items: [
|
|
37
|
+
{
|
|
38
|
+
href: "#",
|
|
39
|
+
text: "Change",
|
|
40
|
+
visuallyHiddenText: "start date"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: {
|
|
47
|
+
text: "Team"
|
|
48
|
+
},
|
|
49
|
+
value: {
|
|
50
|
+
html: "Team A"
|
|
51
|
+
},
|
|
52
|
+
actions: {
|
|
53
|
+
items: [
|
|
54
|
+
{
|
|
55
|
+
href: "#",
|
|
56
|
+
text: "Change",
|
|
57
|
+
visuallyHiddenText: "team"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}) }}
|
|
64
|
+
{{ modukSummaryList({
|
|
65
|
+
card: {
|
|
66
|
+
title: {
|
|
67
|
+
text: "Project B"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
rows: [
|
|
71
|
+
{
|
|
72
|
+
key: {
|
|
73
|
+
text: "Phase"
|
|
74
|
+
},
|
|
75
|
+
value: {
|
|
76
|
+
html: "Live"
|
|
77
|
+
},
|
|
78
|
+
actions: {
|
|
79
|
+
items: [
|
|
80
|
+
{
|
|
81
|
+
href: "#",
|
|
82
|
+
text: "Change",
|
|
83
|
+
visuallyHiddenText: "status"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
key: {
|
|
90
|
+
text: "Start date"
|
|
91
|
+
},
|
|
92
|
+
value: {
|
|
93
|
+
html: "12 December 2021"
|
|
94
|
+
},
|
|
95
|
+
actions: {
|
|
96
|
+
items: [
|
|
97
|
+
{
|
|
98
|
+
href: "#",
|
|
99
|
+
text: "Change",
|
|
100
|
+
visuallyHiddenText: "start date"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
key: {
|
|
107
|
+
text: "Team"
|
|
108
|
+
},
|
|
109
|
+
value: {
|
|
110
|
+
html: "Team B"
|
|
111
|
+
},
|
|
112
|
+
actions: {
|
|
113
|
+
items: [
|
|
114
|
+
{
|
|
115
|
+
href: "#",
|
|
116
|
+
text: "Change",
|
|
117
|
+
visuallyHiddenText: "team"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}) }}
|
|
124
|
+
{{ modukSummaryList({
|
|
125
|
+
card: {
|
|
126
|
+
title: {
|
|
127
|
+
text: "Project C"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
rows: [
|
|
131
|
+
{
|
|
132
|
+
key: {
|
|
133
|
+
text: "Phase"
|
|
134
|
+
},
|
|
135
|
+
value: {
|
|
136
|
+
html: "Discovery"
|
|
137
|
+
},
|
|
138
|
+
actions: {
|
|
139
|
+
items: [
|
|
140
|
+
{
|
|
141
|
+
href: "#",
|
|
142
|
+
text: "Change",
|
|
143
|
+
visuallyHiddenText: "status"
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
key: {
|
|
150
|
+
text: "Start date"
|
|
151
|
+
},
|
|
152
|
+
value: {
|
|
153
|
+
html: "1 February 2023"
|
|
154
|
+
},
|
|
155
|
+
actions: {
|
|
156
|
+
items: [
|
|
157
|
+
{
|
|
158
|
+
href: "#",
|
|
159
|
+
text: "Change",
|
|
160
|
+
visuallyHiddenText: "start date"
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
key: {
|
|
167
|
+
text: "Team"
|
|
168
|
+
},
|
|
169
|
+
value: {
|
|
170
|
+
html: "Team C"
|
|
171
|
+
},
|
|
172
|
+
actions: {
|
|
173
|
+
items: [
|
|
174
|
+
{
|
|
175
|
+
href: "#",
|
|
176
|
+
text: "Change",
|
|
177
|
+
visuallyHiddenText: "team"
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
}) -}}
|
|
184
|
+
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moduk/frontend",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.11",
|
|
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,7 +86,7 @@
|
|
|
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.4.
|
|
89
|
+
"@commitlint/config-conventional": "^17.4.3",
|
|
90
90
|
"@playwright/test": "^1.29.2",
|
|
91
91
|
"@release-it/conventional-changelog": "^5.1.1",
|
|
92
92
|
"@testing-library/dom": "^8.20.0",
|
|
@@ -94,12 +94,12 @@
|
|
|
94
94
|
"@types/glob": "^8.0.1",
|
|
95
95
|
"@types/lodash": "^4.14.189",
|
|
96
96
|
"@types/nunjucks": "^3.2.1",
|
|
97
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
97
|
+
"@typescript-eslint/eslint-plugin": "^5.51.0",
|
|
98
98
|
"@typescript-eslint/parser": "^5.46.1",
|
|
99
99
|
"autoprefixer": "^10.4.13",
|
|
100
100
|
"babel-loader": "^9.1.2",
|
|
101
101
|
"dprint": "^0.34.4",
|
|
102
|
-
"eslint": "^8.
|
|
102
|
+
"eslint": "^8.34.0",
|
|
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",
|
|
@@ -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.
|
|
114
|
+
"sass": "^1.58.0",
|
|
115
115
|
"shx": "^0.3.4",
|
|
116
116
|
"ts-node": "^10.9.1",
|
|
117
117
|
"typescript": "^4.9.5",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"lodash": "^4.17.21"
|
|
140
140
|
},
|
|
141
141
|
"peerDependencies": {
|
|
142
|
-
"govuk-frontend": "4.
|
|
142
|
+
"govuk-frontend": "4.5.0",
|
|
143
143
|
"nunjucks": "^3.2.3"
|
|
144
144
|
},
|
|
145
145
|
"publishConfig": {
|