mp-design-system 1.2.37 → 1.2.39
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/build/scss/main.css +1 -1
- package/dist/build/scss/main.css.map +1 -1
- package/package.json +1 -1
- package/src/_includes/components/input/input.njk +12 -10
- package/src/_includes/components/input/input.scss +10 -13
- package/src/_includes/components/input/select.njk +11 -9
- package/src/assets/scss/components/form.scss +16 -14
- package/src/brand/resources.njk +7 -0
- package/src/patterns/form.njk +313 -319
- package/src/static/adobe/MP Franklin colour swatches.ai +914 -0
package/package.json
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
{% inputWrapper params.error %}
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
<div class="c-input__wrap">
|
3
|
+
<label class="{{ 'u-hidden' if params.hideLabel else 'c-label' }}" for="{{ params.id }}">{{ params.label }}</label>
|
4
|
+
{% if params.button %}
|
5
|
+
<div class="u-flex u-border">
|
6
|
+
{% endif %}
|
7
|
+
<input type="{{ params.type or 'text' }}" class="c-input {{ 'c-input--with-button' if params.button }}{{ params.classes }}" name="{{ params.name or params.id }}" placeholder="{{ params.placeholder }}" id="{{ params.id }}" {{ 'required' if params.required }} {{ 'disabled' if params.disabled }} />
|
8
|
+
{% if params.button %}
|
9
|
+
<button type="button" class="mp c-button--white">Search</button>
|
10
|
+
{% endif %}
|
11
|
+
{% if params.button %}
|
12
|
+
</div>
|
13
|
+
{% endif %}
|
11
14
|
</div>
|
12
|
-
{% endif %}
|
13
15
|
{% endinputWrapper %}
|
@@ -58,19 +58,15 @@
|
|
58
58
|
--error-state: #{color('red')};
|
59
59
|
position: relative;
|
60
60
|
|
61
|
-
.c-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
@include margin-left('xs');
|
71
|
-
@include padding('xs');
|
72
|
-
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><circle cx="12" cy="12" r="12" fill="%23CE0058"/><path stroke="%23fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16.666 7.333l-9.333 9.334M7.333 7.333l9.333 9.334"/></svg>') no-repeat center;
|
73
|
-
background-size: 100% 100%;
|
61
|
+
.c-input__wrap,
|
62
|
+
&> field {
|
63
|
+
&::after {
|
64
|
+
content: '';
|
65
|
+
height: 2rem;
|
66
|
+
width: 2rem;
|
67
|
+
@include margin('auto', 0);
|
68
|
+
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><circle cx="12" cy="12" r="12" fill="%23CE0058"/><path stroke="%23fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16.666 7.333l-9.333 9.334M7.333 7.333l9.333 9.334"/></svg>') no-repeat center;
|
69
|
+
}
|
74
70
|
}
|
75
71
|
}
|
76
72
|
|
@@ -127,6 +123,7 @@
|
|
127
123
|
font-weight: weight('bold');
|
128
124
|
@include margin-bottom('2xs');
|
129
125
|
display: block;
|
126
|
+
align-self: center;
|
130
127
|
}
|
131
128
|
|
132
129
|
.c-fieldset {
|
@@ -1,11 +1,13 @@
|
|
1
1
|
{% inputWrapper params.error %}
|
2
|
-
<
|
3
|
-
|
4
|
-
{
|
5
|
-
|
6
|
-
{%
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
<div class="c-input__wrap">
|
3
|
+
<label class="{{ 'u-hidden' if params.hideLabel else 'c-label' }}{{ params.classes }}" for="{{ params.id }}">{{ params.label }}</label>
|
4
|
+
<select class="c-input c-input--select" name="{{ params.name or params.id }}" id="{{ params.id }}" {{ 'required' if params.required }} {{ 'disabled' if params.disabled }}>
|
5
|
+
{% if params.placeholder %}<option value="">{{ params.placeholder }}</option>{% endif %}
|
6
|
+
{% if params.options | length %}
|
7
|
+
{% for option in params.options %}
|
8
|
+
<option value="{{ option[0] }}" {{ 'selected' if params.value == option[0] }}>{{ option[1] or option[0] }}</option>
|
9
|
+
{% endfor %}
|
10
|
+
{% endif %}
|
11
|
+
</select>
|
12
|
+
</div>
|
11
13
|
{% endinputWrapper %}
|
@@ -24,24 +24,26 @@
|
|
24
24
|
}
|
25
25
|
}
|
26
26
|
|
27
|
-
.c-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
.c-label {
|
34
|
-
flex-basis: 148px;
|
35
|
-
margin-bottom: 0;
|
27
|
+
.c-input {
|
28
|
+
&__wrap {
|
29
|
+
align-items: flex-start;
|
30
|
+
gap: var(--space-s);
|
31
|
+
flex-wrap: wrap;
|
32
|
+
display: flex;
|
36
33
|
|
37
|
-
|
38
|
-
|
39
|
-
|
34
|
+
.c-label {
|
35
|
+
flex-basis: 148px;
|
36
|
+
margin-bottom: 0;
|
37
|
+
|
38
|
+
&+ * {
|
39
|
+
flex: 1 0 148px;
|
40
|
+
}
|
41
|
+
}
|
40
42
|
}
|
41
43
|
|
42
|
-
|
44
|
+
&__messages-wrap {
|
43
45
|
row-gap: 0;
|
44
|
-
|
46
|
+
flex-basis: 100%;
|
45
47
|
|
46
48
|
p {
|
47
49
|
@include margin-top('2xs');
|
package/src/brand/resources.njk
CHANGED
@@ -27,6 +27,13 @@ tags: brand
|
|
27
27
|
icon: "file"
|
28
28
|
}) }}
|
29
29
|
|
30
|
+
{{ twi({
|
31
|
+
link: "/static/adobe/MP%20Franklin%20colour%20swatches.ai"
|
32
|
+
label: "Adobe colour swatches",
|
33
|
+
classes: "u-link u-border u-pad-s",
|
34
|
+
icon: "file"
|
35
|
+
})}}
|
36
|
+
|
30
37
|
{{ twi({
|
31
38
|
link: "https://malvern.sharepoint.com/:b:/r/sites/Intranet/Shared%20Documents/FINAL%20Tone%20of%20voice%20guidelines%20April%202021.pdf?csf=1&web=1&e=vW1Qzs",
|
32
39
|
label: "Tone of voice guidelines",
|