@ukhomeoffice/formio-gds-template 1.0.13-alpha → 1.2.0
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/.github/workflows/build-and-test.yml +22 -0
- package/.github/workflows/publish-to-npm.yml +1 -1
- package/README.md +30 -4
- package/lib/components/datetime/GDSDatetimeComponent.js +35 -13
- package/lib/components/index.js +7 -4
- package/lib/components/time/GDSTimeComponent.js +6 -3
- package/lib/index.js +5 -2
- package/lib/templates/gds/button/index.js +4 -1
- package/lib/templates/gds/checkbox/index.js +4 -1
- package/lib/templates/gds/columns/index.js +4 -1
- package/lib/templates/gds/component/index.js +4 -1
- package/lib/templates/gds/container/index.js +4 -1
- package/lib/templates/gds/datagrid/form.ejs.js +1 -0
- package/lib/templates/gds/datagrid/index.js +4 -1
- package/lib/templates/gds/datamap/index.js +4 -1
- package/lib/templates/gds/datetime/index.js +4 -1
- package/lib/templates/gds/day/index.js +4 -1
- package/lib/templates/gds/editgrid/index.js +4 -1
- package/lib/templates/gds/field/index.js +4 -1
- package/lib/templates/gds/fieldset/index.js +4 -1
- package/lib/templates/gds/file/index.js +4 -1
- package/lib/templates/gds/index.js +34 -31
- package/lib/templates/gds/input/index.js +4 -1
- package/lib/templates/gds/label/index.js +4 -1
- package/lib/templates/gds/message/index.js +4 -1
- package/lib/templates/gds/panel/index.js +4 -1
- package/lib/templates/gds/radio/index.js +4 -1
- package/lib/templates/gds/select/index.js +4 -1
- package/lib/templates/gds/selectOption/index.js +4 -1
- package/lib/templates/gds/selectboxes/index.js +4 -1
- package/lib/templates/gds/survey/index.js +4 -1
- package/lib/templates/gds/tab/index.js +4 -1
- package/lib/templates/gds/table/index.js +4 -1
- package/lib/templates/gds/template.css +107 -28
- package/lib/templates/gds/template.css.map +1 -0
- package/lib/templates/gds/time/index.js +4 -1
- package/lib/templates/gds/warning/index.js +4 -1
- package/lib/templates/gds/wizard/index.js +4 -1
- package/lib/templates/gds/wizardHeader/index.js +4 -1
- package/lib/templates/gds/wizardNav/index.js +4 -1
- package/lib/templates/index.js +4 -1
- package/package.json +7 -7
- package/src/components/datetime/GDSDatetimeComponent.ts +1 -1
- package/src/components/time/GDSTimeComponent.ts +1 -1
- package/src/templates/gds/datagrid/form.ejs +1 -0
- package/tsconfig.json +2 -1
- package/dist/gds.js +0 -298
|
@@ -1,13 +1,68 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
1
55
|
.govuk-checkboxes__item * {
|
|
2
56
|
-webkit-box-sizing: content-box;
|
|
3
57
|
-moz-box-sizing: content-box;
|
|
4
|
-
box-sizing: content-box;
|
|
5
|
-
|
|
58
|
+
box-sizing: content-box;
|
|
59
|
+
}
|
|
6
60
|
.govuk-checkboxes__item *:before,
|
|
7
61
|
.govuk-checkboxes__item *:after {
|
|
8
62
|
-webkit-box-sizing: content-box;
|
|
9
63
|
-moz-box-sizing: content-box;
|
|
10
|
-
box-sizing: content-box;
|
|
64
|
+
box-sizing: content-box;
|
|
65
|
+
}
|
|
11
66
|
|
|
12
67
|
.input-prefix-tag {
|
|
13
68
|
height: 2.5rem;
|
|
@@ -18,7 +73,8 @@
|
|
|
18
73
|
text-align: center;
|
|
19
74
|
background-color: #1d70b8;
|
|
20
75
|
border-right: none;
|
|
21
|
-
color: white;
|
|
76
|
+
color: white;
|
|
77
|
+
}
|
|
22
78
|
|
|
23
79
|
.input-suffix-tag {
|
|
24
80
|
height: 2.5rem;
|
|
@@ -29,15 +85,18 @@
|
|
|
29
85
|
text-align: center;
|
|
30
86
|
background-color: #1d70b8;
|
|
31
87
|
border-left: none;
|
|
32
|
-
color: white;
|
|
88
|
+
color: white;
|
|
89
|
+
}
|
|
33
90
|
|
|
34
91
|
.govuk-input:disabled, .govuk-textarea:disabled, .form-control:disabled, .form-control[readonly] {
|
|
35
92
|
background-color: #e9ecef;
|
|
36
|
-
opacity: 1;
|
|
93
|
+
opacity: 1;
|
|
94
|
+
}
|
|
37
95
|
|
|
38
96
|
@media screen and (max-width: 639px) {
|
|
39
97
|
#reorder {
|
|
40
|
-
display: none;
|
|
98
|
+
display: none;
|
|
99
|
+
}
|
|
41
100
|
table.res-datagrid thead {
|
|
42
101
|
border: none;
|
|
43
102
|
clip: rect(0 0 0 0);
|
|
@@ -46,41 +105,54 @@
|
|
|
46
105
|
overflow: hidden;
|
|
47
106
|
padding: 0;
|
|
48
107
|
position: absolute;
|
|
49
|
-
width: 1px;
|
|
108
|
+
width: 1px;
|
|
109
|
+
}
|
|
50
110
|
table.res-datagrid tr {
|
|
51
|
-
display: block;
|
|
111
|
+
display: block;
|
|
112
|
+
}
|
|
52
113
|
table.res-datagrid td {
|
|
53
114
|
display: block;
|
|
54
|
-
width: 100%;
|
|
115
|
+
width: 100%;
|
|
116
|
+
}
|
|
55
117
|
table.res-datagrid td::before {
|
|
56
|
-
content: attr(data-label);
|
|
118
|
+
content: attr(data-label);
|
|
119
|
+
}
|
|
57
120
|
table.res-datagrid td:last-child {
|
|
58
|
-
border-bottom: 10px;
|
|
59
|
-
|
|
121
|
+
border-bottom: 10px;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
60
124
|
.govuk-details {
|
|
61
|
-
margin-bottom: 0px !important;
|
|
125
|
+
margin-bottom: 0px !important;
|
|
126
|
+
}
|
|
62
127
|
|
|
63
128
|
.small-button {
|
|
64
|
-
padding: .25rem .5rem;
|
|
65
|
-
font-size: .875rem;
|
|
66
|
-
line-height: 1.5;
|
|
129
|
+
padding: 0.25rem 0.5rem;
|
|
130
|
+
font-size: 0.875rem;
|
|
131
|
+
line-height: 1.5;
|
|
132
|
+
}
|
|
67
133
|
|
|
68
134
|
.govuk-form-input--error {
|
|
69
|
-
border: 2px solid #d4351c !important;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
135
|
+
border: 2px solid #d4351c !important;
|
|
136
|
+
}
|
|
137
|
+
.govuk-form-input--error:focus {
|
|
138
|
+
border-color: #0b0c0c !important;
|
|
139
|
+
box-shadow: none !important;
|
|
140
|
+
}
|
|
73
141
|
|
|
74
142
|
.dataGrid-hr {
|
|
75
143
|
border-bottom: 2px solid #1d70b8;
|
|
76
|
-
border-top: none;
|
|
144
|
+
border-top: none;
|
|
145
|
+
}
|
|
77
146
|
|
|
78
147
|
.gov-accordion-no-bottom {
|
|
79
|
-
border-bottom: none !important;
|
|
148
|
+
border-bottom: none !important;
|
|
149
|
+
}
|
|
80
150
|
|
|
81
151
|
@media (min-width: 20em) {
|
|
82
152
|
.js-enabled .govuk-tabs__panel--hidden {
|
|
83
|
-
display: none;
|
|
153
|
+
display: none;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
84
156
|
|
|
85
157
|
@media (max-width: 768px) {
|
|
86
158
|
.custom-table {
|
|
@@ -88,17 +160,24 @@
|
|
|
88
160
|
overflow-y: scroll;
|
|
89
161
|
max-height: 400px;
|
|
90
162
|
overflow-x: auto;
|
|
91
|
-
white-space: nowrap;
|
|
163
|
+
white-space: nowrap;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
92
166
|
|
|
93
167
|
.custom-th {
|
|
94
168
|
position: sticky;
|
|
95
169
|
top: 0;
|
|
96
|
-
background: #ffffff;
|
|
170
|
+
background: #ffffff;
|
|
171
|
+
}
|
|
97
172
|
|
|
98
173
|
.custom-body {
|
|
99
174
|
height: 100px;
|
|
100
175
|
overflow-y: auto;
|
|
101
|
-
overflow-x: hidden;
|
|
176
|
+
overflow-x: hidden;
|
|
177
|
+
}
|
|
102
178
|
|
|
103
179
|
.govuk-select.auto-height {
|
|
104
|
-
height: auto;
|
|
180
|
+
height: auto;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/*# sourceMappingURL=template.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../src/templates/gds/template.scss","../../../node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKE;EACE;EACA;EACA;;AAGF;AAAA;EAEE;EACA;EACA;;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;IACE;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;;EAGF;IACE;IACA;;EAGF;IACE;;EAEF;IACE;;;AAKJ;EACE;;;AAGF;EACE;EACA;EACA;;;AAIF;EACE;;AAEA;EACE;EAGA;;;AAKJ;EACE;EACA;;;AAGF;EACE;;;ACqHM;EDhHJ;IACE;;;;AAMJ;EADF;IAEI;IACA;IACA;IACA;IACA;;;;AAIJ;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE","file":"template.css"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var form_ejs_1 = require("./form.ejs");
|
|
6
|
+
var form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
4
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var form_ejs_1 = require("./form.ejs");
|
|
6
|
+
var form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
4
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var form_ejs_1 = require("./form.ejs");
|
|
6
|
+
var form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
4
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var form_ejs_1 = require("./form.ejs");
|
|
6
|
+
var form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
4
7
|
exports.default = { form: form_ejs_1.default };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var form_ejs_1 = require("./form.ejs");
|
|
6
|
+
var form_ejs_1 = __importDefault(require("./form.ejs"));
|
|
4
7
|
exports.default = { form: form_ejs_1.default };
|
package/lib/templates/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var gds_1 = require("./gds");
|
|
6
|
+
var gds_1 = __importDefault(require("./gds"));
|
|
4
7
|
exports.default = {
|
|
5
8
|
gds: gds_1.default,
|
|
6
9
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ukhomeoffice/formio-gds-template",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Gov UK design system formio templates",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test:coverage": "nyc --reporter=text mocha --reporter spec './{,!(node_modules)/**/}*.spec.js'",
|
|
11
11
|
"test": "mocha --require ts-node/register --reporter spec './{,!(node_modules)/**/}*.spec.ts'",
|
|
12
|
-
"build-sass": "
|
|
13
|
-
"watch-sass": "
|
|
12
|
+
"build-sass": "sass src/templates/gds/template.scss lib/templates/gds/template.css",
|
|
13
|
+
"watch-sass": "sass -w src/templates/gds/template.scss lib/templates/gds/template.css",
|
|
14
14
|
"watch-ts": "tsc -w",
|
|
15
15
|
"watch": "concurrently \"npm run watch-ts\" \"npm run watch-sass\"",
|
|
16
16
|
"build": "tsc && gulp templates && npm run build-sass && webpack",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"homepage": "https://github.com/UKHomeOffice/formio-gds-template#readme",
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"formiojs": "^4.9.26",
|
|
44
|
-
"govuk-frontend": "^
|
|
44
|
+
"govuk-frontend": "^4.0.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"lodash": "^4.17.15"
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/chai": "^4.2.11",
|
|
51
51
|
"@types/ejs": "^3.0.3",
|
|
52
|
-
"@types/lodash": "
|
|
52
|
+
"@types/lodash": "4.14.186",
|
|
53
53
|
"@types/mocha": "^7.0.2",
|
|
54
54
|
"@types/moment": "^2.13.0",
|
|
55
55
|
"@types/node": "^13.13.5",
|
|
@@ -59,16 +59,16 @@
|
|
|
59
59
|
"concurrently": "^5.2.0",
|
|
60
60
|
"css-loader": "^3.5.3",
|
|
61
61
|
"formiojs": "^4.9.26",
|
|
62
|
-
"govuk-frontend": "^
|
|
62
|
+
"govuk-frontend": "^4.0.0",
|
|
63
63
|
"gulp": "^4.0.2",
|
|
64
64
|
"gulp-insert": "^0.5.0",
|
|
65
65
|
"gulp-rename": "^2.0.0",
|
|
66
66
|
"gulp-template": "^5.0.0",
|
|
67
67
|
"mocha": "^7.1.2",
|
|
68
68
|
"moment": "^2.25.3",
|
|
69
|
-
"node-sass": "^4.14.1",
|
|
70
69
|
"nyc": "^15.0.1",
|
|
71
70
|
"pre-commit": "^1.2.2",
|
|
71
|
+
"sass": "^1.77.6",
|
|
72
72
|
"sass-loader": "^8.0.2",
|
|
73
73
|
"sinon": "^9.0.2",
|
|
74
74
|
"style-loader": "^1.2.1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {Components} from 'formiojs';
|
|
2
2
|
import FormioUtils from 'formiojs/utils';
|
|
3
3
|
import * as _ from 'lodash';
|
|
4
|
-
import
|
|
4
|
+
import moment from 'moment';
|
|
5
5
|
import TimeHelper from '../util/TimeHelper';
|
|
6
6
|
|
|
7
7
|
const Field = Components.components.field;
|