mp-design-system 1.2.37 → 1.2.38

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-design-system",
3
- "version": "1.2.37",
3
+ "version": "1.2.38",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "npm-run-all --parallel bundle:*",
@@ -1,13 +1,15 @@
1
1
  {% inputWrapper params.error %}
2
- <label class="{{ 'u-hidden' if params.hideLabel else 'c-label' }}" for="{{ params.id }}">{{ params.label }}</label>
3
- {% if params.button %}
4
- <div class="u-flex u-border">
5
- {% endif %}
6
- <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 }} />
7
- {% if params.button %}
8
- <button type="button" class="mp c-button--white">Search</button>
9
- {% endif %}
10
- {% if params.button %}
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,19 @@
58
58
  --error-state: #{color('red')};
59
59
  position: relative;
60
60
 
61
- .c-input {
62
- width: calc(100% - (27px + var(--space-xs)));
63
- }
64
-
65
- &:after {
66
- content: '';
67
- position: absolute;
68
- top: 2.3em;
69
- right: 0;
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
+ position: absolute;
66
+ top: 0;
67
+ right: 0;
68
+ bottom: 0;
69
+ @include margin('auto', 0, 'auto', 'xs');
70
+ @include padding('xs');
71
+ 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;
72
+ background-size: 100% 100%;
73
+ }
74
74
  }
75
75
  }
76
76
 
@@ -127,6 +127,7 @@
127
127
  font-weight: weight('bold');
128
128
  @include margin-bottom('2xs');
129
129
  display: block;
130
+ align-self: center;
130
131
  }
131
132
 
132
133
  .c-fieldset {
@@ -1,11 +1,13 @@
1
1
  {% inputWrapper params.error %}
2
- <label class="{{ 'u-hidden' if params.hideLabel else 'c-label' }}{{ params.classes }}" for="{{ params.id }}">{{ params.label }}</label>
3
- <select class="c-input c-input--select" name="{{ params.name or params.id }}" id="{{ params.id }}" {{ 'required' if params.required }} {{ 'disabled' if params.disabled }}>
4
- {% if params.placeholder %}<option value="">{{ params.placeholder }}</option>{% endif %}
5
- {% if params.options | length %}
6
- {% for option in params.options %}
7
- <option value="{{ option[0] }}" {{ 'selected' if params.value == option[0] }}>{{ option[1] or option[0] }}</option>
8
- {% endfor %}
9
- {% endif %}
10
- </select>
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-input__wrap {
28
- align-items: center;
29
- gap: var(--space-s);
30
- flex-wrap: wrap;
31
- display: flex;
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
- flex: 1 0 148px;
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
- &--messages {
44
+ &__messages-wrap {
43
45
  row-gap: 0;
44
- margin-top: 0;
46
+ flex-basis: 100%;
45
47
 
46
48
  p {
47
49
  @include margin-top('2xs');
@@ -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",