mp-design-system 1.2.47 → 1.2.50
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/build/js/app.js +1 -1
- package/dist/build/js/app.js.map +1 -1
- package/dist/build/scss/main.css +1 -1
- package/dist/build/scss/main.css.map +1 -1
- package/package.json +1 -1
- package/src/_headers +1 -1
- package/src/_includes/components/accordion/accordion.scss +5 -0
- package/src/_includes/components/card/card.scss +1 -0
- package/src/_redirects +5 -1
- package/src/assets/js/imports/off-canvas.js +0 -2
- package/src/assets/scss/components/form.scss +235 -89
- package/src/assets/scss/utilities/display.scss +4 -0
- package/src/patterns/mp-form.njk +111 -0
- package/src/prototype/events-hub.njk +111 -116
- package/src/prototype/form-altcha.njk +705 -0
- package/src/prototype/form-cloudflare.njk +688 -0
- package/src/prototype/form-hcaptcha.njk +693 -0
- package/src/prototype/forms.njk +0 -3105
package/package.json
CHANGED
package/src/_headers
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
Content-Security-Policy: default-src 'self';
|
2
|
+
Content-Security-Policy: default-src 'self'; base-uri 'self'; block-all-mixed-content; font-src 'self' https://fonts.gstatic.com; form-action 'self'; frame-src 'self' https://brand.malvernpanalytical.com https://www.youtube.com https://challenges.cloudflare.com https://newassets.hcaptcha.com; frame-ancestors 'self' https://brand.malvernpanalytical.com; img-src 'self' data: https://p3.aprimocdn.net https://img.youtube.com; object-src 'none'; picture-in-picture 'self'; sandbox allow-forms allow-same-origin allow-scripts allow-downloads; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://polyfill.io https://eu.altcha.org https://challenges.cloudflare.com https://js.hcaptcha.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; upgrade-insecure-requests;
|
3
3
|
X-Content-Type-Options: nosniff
|
4
4
|
X-Frame-Options: SAMEORIGIN
|
5
5
|
X-XSS-Protection: 1; mode=block
|
package/src/_redirects
CHANGED
@@ -5,4 +5,8 @@
|
|
5
5
|
/brand/visual/colors /brand/colors 301
|
6
6
|
/brand/visual/images /brand/images 301
|
7
7
|
/brand/visual/logo /brand/logo 301
|
8
|
-
/brand/visual/typography /brand/typography 301
|
8
|
+
/brand/visual/typography /brand/typography 301
|
9
|
+
http://project-franklin.netlify.app https://brand.malvernpanalytical.com 301
|
10
|
+
https://project-franklin.netlify.app https://brand.malvernpanalytical.com 301
|
11
|
+
http://project-franklin.netlify.app/* https://brand.malvernpanalytical.com/:splat 301
|
12
|
+
https://project-franklin.netlify.app/* https://brand.malvernpanalytical.com/:splat 301
|
@@ -40,8 +40,6 @@ function isVisible(element) {
|
|
40
40
|
// Function to handle off-canvas behavior based on visibility
|
41
41
|
function handleOffCanvas(toggle, isVisible) {
|
42
42
|
const target = document.getElementById(toggle.getAttribute('data-target'));
|
43
|
-
console.log(target);
|
44
|
-
console.log(isVisible);
|
45
43
|
if (isVisible === true) {
|
46
44
|
createOffCanvas(target);
|
47
45
|
} else {
|
@@ -1,99 +1,99 @@
|
|
1
1
|
.mp-dynamicform {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
.c-form {
|
3
|
+
&__header {
|
4
|
+
@extend .o-prose;
|
5
|
+
@include flow('s');
|
6
|
+
@include padding-bottom('m');
|
7
|
+
}
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
&__title {
|
10
|
+
font-size: var(--step-4) !important;
|
11
|
+
letter-spacing: -0.02em;
|
12
|
+
}
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
.c-form__input {
|
19
|
-
flex: 1 0 298px;
|
20
|
-
|
21
|
-
@media only screen and (max-width: 31.25em) {
|
22
|
-
flex-shrink: 1;
|
23
|
-
}
|
24
|
-
}
|
25
|
-
|
26
|
-
.c-input {
|
27
|
-
flex-shrink: 1;
|
28
|
-
}
|
29
|
-
}
|
30
|
-
|
31
|
-
&__input-wrap {
|
32
|
-
display: flex;
|
33
|
-
gap: var(--space-3xs) var(--space-s);
|
34
|
-
flex-wrap: wrap;
|
35
|
-
align-items: flex-start;
|
36
|
-
|
37
|
-
.c-label {
|
38
|
-
min-width: 115px;
|
39
|
-
flex-basis: 115px;
|
40
|
-
@include margin-bottom(0);
|
41
|
-
word-wrap: break-word;
|
42
|
-
|
43
|
-
@media only screen and (max-width: 31.25em) {
|
44
|
-
flex-basis: 100%;
|
45
|
-
}
|
46
|
-
|
47
|
-
&+ * {
|
48
|
-
flex: 1 0 115px;
|
49
|
-
}
|
50
|
-
}
|
51
|
-
|
52
|
-
.c-input--textarea {
|
53
|
-
flex-basis: 100%;
|
54
|
-
}
|
55
|
-
}
|
14
|
+
&__row.o-grid {
|
15
|
+
flex-wrap: wrap;
|
16
|
+
gap: var(--space-s);
|
56
17
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
@include margin-top('2xs');
|
63
|
-
letter-spacing: -.01em;
|
64
|
-
font-size: var(--step--1);
|
65
|
-
}
|
18
|
+
.c-form__input {
|
19
|
+
flex: 1 0 298px;
|
20
|
+
|
21
|
+
@media only screen and (max-width: 31.25em) {
|
22
|
+
flex-shrink: 1;
|
66
23
|
}
|
24
|
+
}
|
25
|
+
|
26
|
+
.c-input {
|
27
|
+
flex-shrink: 1;
|
28
|
+
}
|
67
29
|
}
|
68
30
|
|
69
|
-
&
|
70
|
-
|
71
|
-
|
72
|
-
|
31
|
+
&__input-wrap {
|
32
|
+
display: flex;
|
33
|
+
gap: var(--space-3xs) var(--space-s);
|
34
|
+
flex-wrap: wrap;
|
35
|
+
align-items: flex-start;
|
36
|
+
|
37
|
+
.c-label {
|
38
|
+
min-width: 115px;
|
39
|
+
flex-basis: 115px;
|
40
|
+
@include margin-bottom(0);
|
41
|
+
word-wrap: break-word;
|
42
|
+
|
43
|
+
@media only screen and (max-width: 31.25em) {
|
44
|
+
flex-basis: 100%;
|
73
45
|
}
|
74
|
-
}
|
75
46
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
position: relative;
|
81
|
-
top: -2px;
|
82
|
-
}
|
47
|
+
& + * {
|
48
|
+
flex: 1 0 115px;
|
49
|
+
}
|
50
|
+
}
|
83
51
|
|
84
|
-
|
85
|
-
|
86
|
-
|
52
|
+
.c-input--textarea {
|
53
|
+
flex-basis: 100%;
|
54
|
+
}
|
87
55
|
}
|
88
56
|
|
89
|
-
|
90
|
-
|
57
|
+
&__messages-wrap {
|
58
|
+
row-gap: 0;
|
59
|
+
flex-basis: 100%;
|
60
|
+
|
61
|
+
p {
|
62
|
+
@include margin-top('2xs');
|
63
|
+
letter-spacing: -0.01em;
|
64
|
+
font-size: var(--step--1);
|
65
|
+
}
|
91
66
|
}
|
67
|
+
}
|
92
68
|
|
93
|
-
|
94
|
-
|
95
|
-
|
69
|
+
& > .c-fieldset,
|
70
|
+
& > .c-tab > .c-fieldset {
|
71
|
+
& > * + *:not(:has(> .u-hidden)) {
|
72
|
+
@include padding-top('s');
|
96
73
|
}
|
74
|
+
}
|
75
|
+
|
76
|
+
.c-label--required:after {
|
77
|
+
content: '*';
|
78
|
+
color: color('red');
|
79
|
+
padding: 0 2px;
|
80
|
+
position: relative;
|
81
|
+
top: -2px;
|
82
|
+
}
|
83
|
+
|
84
|
+
.c-input__spacer {
|
85
|
+
height: 0;
|
86
|
+
flex-basis: 148px;
|
87
|
+
}
|
88
|
+
|
89
|
+
.c-input--select {
|
90
|
+
cursor: pointer;
|
91
|
+
}
|
92
|
+
|
93
|
+
.c-checkbox + label,
|
94
|
+
.c-radio + label {
|
95
|
+
display: inline-block;
|
96
|
+
}
|
97
97
|
}
|
98
98
|
|
99
99
|
.c-fieldset {
|
@@ -112,7 +112,7 @@
|
|
112
112
|
width: 100%;
|
113
113
|
|
114
114
|
+ * {
|
115
|
-
|
115
|
+
clear: both;
|
116
116
|
}
|
117
117
|
}
|
118
118
|
|
@@ -121,12 +121,12 @@
|
|
121
121
|
position: relative;
|
122
122
|
|
123
123
|
&::before {
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
124
|
+
content: '';
|
125
|
+
position: absolute;
|
126
|
+
height: 1px;
|
127
|
+
width: 100%;
|
128
|
+
background: color('petrol', 'step-2');
|
129
|
+
top: 0;
|
130
130
|
}
|
131
131
|
}
|
132
132
|
|
@@ -143,4 +143,150 @@
|
|
143
143
|
align-self: center;
|
144
144
|
font-size: var(--step--1);
|
145
145
|
font-weight: weight('bold');
|
146
|
-
}
|
146
|
+
}
|
147
|
+
|
148
|
+
/* === MP FORM === */
|
149
|
+
.mp-dynamicform {
|
150
|
+
&.c-form {
|
151
|
+
display: flex;
|
152
|
+
flex-direction: column;
|
153
|
+
gap: var(--space-s);
|
154
|
+
|
155
|
+
&:not(.c-tabs__content) {
|
156
|
+
background: color('blue', 'step-3');
|
157
|
+
@include padding('s-l');
|
158
|
+
}
|
159
|
+
}
|
160
|
+
|
161
|
+
.c-form {
|
162
|
+
&__header {
|
163
|
+
@extend .o-prose;
|
164
|
+
@include flow('s');
|
165
|
+
@include padding-bottom('2xs');
|
166
|
+
}
|
167
|
+
|
168
|
+
&__heading {
|
169
|
+
font-size: var(--step-4) !important;
|
170
|
+
letter-spacing: -0.02em;
|
171
|
+
}
|
172
|
+
|
173
|
+
// &__lede {
|
174
|
+
// }
|
175
|
+
|
176
|
+
&__section {
|
177
|
+
min-width: 0;
|
178
|
+
margin: 0;
|
179
|
+
border: 0;
|
180
|
+
display: flex;
|
181
|
+
flex-flow: column;
|
182
|
+
gap: var(--space-s);
|
183
|
+
|
184
|
+
&--submit {
|
185
|
+
align-items: flex-start;
|
186
|
+
|
187
|
+
.c-button {
|
188
|
+
@include margin(0);
|
189
|
+
}
|
190
|
+
}
|
191
|
+
}
|
192
|
+
|
193
|
+
&__section + .c-form__section:not(.c-form__section--submit) {
|
194
|
+
@include padding-top('s');
|
195
|
+
position: relative;
|
196
|
+
|
197
|
+
&::before {
|
198
|
+
content: '';
|
199
|
+
position: absolute;
|
200
|
+
height: 1px;
|
201
|
+
width: 100%;
|
202
|
+
background: color('petrol', 'step-2');
|
203
|
+
top: 0;
|
204
|
+
}
|
205
|
+
}
|
206
|
+
|
207
|
+
&__section-title {
|
208
|
+
@extend .c-h--step-1;
|
209
|
+
font-weight: weight('bold');
|
210
|
+
letter-spacing: ls('-3%');
|
211
|
+
display: table;
|
212
|
+
float: left;
|
213
|
+
padding: 0;
|
214
|
+
width: 100%;
|
215
|
+
}
|
216
|
+
|
217
|
+
&__group {
|
218
|
+
&.o-grid {
|
219
|
+
@include margin(0);
|
220
|
+
@include padding(0);
|
221
|
+
flex-wrap: wrap;
|
222
|
+
gap: var(--space-s);
|
223
|
+
|
224
|
+
.c-form__field {
|
225
|
+
flex: 1 0 298px;
|
226
|
+
|
227
|
+
@media only screen and (max-width: 31.25em) {
|
228
|
+
flex-shrink: 1;
|
229
|
+
}
|
230
|
+
}
|
231
|
+
|
232
|
+
.c-form__input {
|
233
|
+
flex-shrink: 1;
|
234
|
+
}
|
235
|
+
}
|
236
|
+
}
|
237
|
+
|
238
|
+
&__field {
|
239
|
+
@include margin-bottom(0);
|
240
|
+
}
|
241
|
+
|
242
|
+
&__input-wrap {
|
243
|
+
display: flex;
|
244
|
+
gap: var(--space-3xs) var(--space-s);
|
245
|
+
flex-wrap: wrap;
|
246
|
+
align-items: flex-start;
|
247
|
+
}
|
248
|
+
|
249
|
+
&__label {
|
250
|
+
@extend .c-label;
|
251
|
+
min-width: 115px;
|
252
|
+
flex-basis: 115px;
|
253
|
+
word-wrap: break-word;
|
254
|
+
|
255
|
+
@media only screen and (max-width: 31.25em) {
|
256
|
+
flex-basis: 100%;
|
257
|
+
}
|
258
|
+
|
259
|
+
& + * {
|
260
|
+
flex: 1 0 115px;
|
261
|
+
}
|
262
|
+
}
|
263
|
+
|
264
|
+
&__input {
|
265
|
+
@extend .c-input;
|
266
|
+
|
267
|
+
&--checkbox {
|
268
|
+
@extend .c-checkbox;
|
269
|
+
}
|
270
|
+
|
271
|
+
&--select {
|
272
|
+
@extend .c-input, .c-input--select;
|
273
|
+
}
|
274
|
+
|
275
|
+
&--textarea {
|
276
|
+
@extend .c-input, .c-input--textarea;
|
277
|
+
flex-basis: 100%;
|
278
|
+
}
|
279
|
+
}
|
280
|
+
|
281
|
+
&__messages-wrap {
|
282
|
+
row-gap: 0;
|
283
|
+
flex-basis: 100%;
|
284
|
+
|
285
|
+
p {
|
286
|
+
@include margin-top('2xs');
|
287
|
+
letter-spacing: -0.01em;
|
288
|
+
font-size: var(--step--1);
|
289
|
+
}
|
290
|
+
}
|
291
|
+
}
|
292
|
+
}
|
@@ -0,0 +1,111 @@
|
|
1
|
+
---
|
2
|
+
title: New Style Form
|
3
|
+
layout: patterns-page
|
4
|
+
---
|
5
|
+
|
6
|
+
<div class="o-grid o-grid--8/3 o-grid--float o-grid--layout">
|
7
|
+
<form class="mp-dynamicform c-form">
|
8
|
+
<header class="c-form__header">
|
9
|
+
<h1 class="c-form__heading">You're almost done...</h1>
|
10
|
+
<p class="c-form__lede">Just one more step and our sales team will have everything they need to contact you. Complete the form below and our team will aim to be in touch within 1 business day.</p>
|
11
|
+
</header>
|
12
|
+
<fieldset class="c-form__section">
|
13
|
+
<legend class="c-form__section-title">Your enquiry</legend>
|
14
|
+
<div class="c-form__group">
|
15
|
+
<div class="c-form__field Product">
|
16
|
+
<div class="c-form__input-wrap">
|
17
|
+
<label class="c-form__label" for="Product">Product</label>
|
18
|
+
<select class="c-form__input c-form__input--select Product" name="Product" id="Product">
|
19
|
+
<option value=""></option>
|
20
|
+
<option value="option-1">Option 1</option>
|
21
|
+
<option value="option-2">Option 2</option>
|
22
|
+
<option value="option-3">Option 3</option>
|
23
|
+
</select>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
<div class="c-form__group o-grid o-grid--of-two">
|
28
|
+
<div class="c-form__field FirstName required">
|
29
|
+
<div class="c-form__input-wrap">
|
30
|
+
<label class="c-form__label c-form__label--required" for="FirstName">First name</label>
|
31
|
+
<input type="text" class="c-form__input" name="FirstName" value="" placeholder="" id="FirstName" required="" />
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
<div class="c-form__field LastName required">
|
35
|
+
<div class="c-form__input-wrap">
|
36
|
+
<label class="c-form__label c-form__label--required" for="LastName">Last name</label>
|
37
|
+
<input type="text" class="c-form__input" name="LastName" value="" placeholder="" id="LastName" required="" />
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
<div class="c-form__group">
|
42
|
+
<div class="c-form__field EmailAddress required">
|
43
|
+
<div class="c-form__input-wrap">
|
44
|
+
<label class="c-form__label c-form__label--required" for="EmailAddress">Email address</label>
|
45
|
+
<input type="email" class="c-input" name="EmailAddress" value="" placeholder="" id="EmailAddress" required="" />
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
<div class="c-form__group">
|
50
|
+
<div class="c-form__field Telephone required">
|
51
|
+
<div class="c-form__input-wrap">
|
52
|
+
<label class="c-form__label c-form__label--required" for="Telephone">Telephone</label>
|
53
|
+
<input type="tel" class="c-input" name="Telephone" value="" placeholder="" id="Telephone" required="" />
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
</fieldset>
|
58
|
+
<fieldset class="c-form__section">
|
59
|
+
<legend class="c-form__section-title">
|
60
|
+
About your company or institution
|
61
|
+
</legend>
|
62
|
+
<div class="c-form__group">
|
63
|
+
<div class="c-form__field CompanyName required">
|
64
|
+
<div class="c-form__input-wrap">
|
65
|
+
<label class="c-form__label c-form__label--required" for="CompanyName">Company / institution</label>
|
66
|
+
<input type="text" class="c-input" name="CompanyName" value="" placeholder="" id="CompanyName" required="" />
|
67
|
+
</div>
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
<div class="c-form__group o-grid o-grid--of-two">
|
71
|
+
<div class="c-form__field City required">
|
72
|
+
<div class="c-form__input-wrap">
|
73
|
+
<label class="c-form__label c-form__label--required" for="City">City</label>
|
74
|
+
<input type="text" class="c-input" name="City" value="" placeholder="" id="City" required="" />
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
<div class="c-form__field Country required">
|
78
|
+
<div class="c-form__input-wrap">
|
79
|
+
<label class="c-form__label c-form__label--required" for="Country">Country</label>
|
80
|
+
<select class="c-input c-input--select Country" name="Country" id="Country" required="">
|
81
|
+
<option value=""></option>
|
82
|
+
<option value="option-1">Option 1</option>
|
83
|
+
<option value="option-2">Option 2</option>
|
84
|
+
<option value="option-3">Option 3</option>
|
85
|
+
</select>
|
86
|
+
</div>
|
87
|
+
</div>
|
88
|
+
</div>
|
89
|
+
</fieldset>
|
90
|
+
<fieldset class="c-form__section">
|
91
|
+
<legend class="c-form__section-title">More details</legend>
|
92
|
+
<div class="c-form__group">
|
93
|
+
<div class="c-form__field ApplicationDetails">
|
94
|
+
<div class="c-form__input-wrap">
|
95
|
+
<label class="c-form__label u-flex-1" for="ApplicationDetails">Please give more details about your requirements / application (optional)</label>
|
96
|
+
<textarea class="c-form__input c-form__input--textarea ApplicationDetails" cols="20" id="ApplicationDetails" name="ApplicationDetails" rows="2"></textarea>
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
<div class="c-form__group">
|
101
|
+
<div class="c-form__field emailOptIn">
|
102
|
+
<input class="c-form__input c-form__input--checkbox" id="emailOptIn" name="emailOptIn" type="checkbox" value="true" /><input name="emailOptIn" type="hidden" value="false" />
|
103
|
+
<label for="emailOptIn">I wish to receive emails tailored to my personal preferences (you can unsubscribe at any time)<br />For more information please read our <a class="u-link" href="">Privacy Policy</a></label>
|
104
|
+
</div>
|
105
|
+
</div>
|
106
|
+
</fieldset>
|
107
|
+
<div class="c-form__section c-form__section--submit">
|
108
|
+
<button id="btnSubmit" class="mp c-button c-button--inline">Contact sales</button>
|
109
|
+
</div>
|
110
|
+
</form>
|
111
|
+
</div>
|