mp-design-system 1.2.27 → 1.2.28
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/build/scss/library.css.map +1 -1
- package/dist/build/scss/main.css +1 -1
- package/dist/build/scss/main.css.map +1 -1
- package/package.json +2 -2
- package/src/_includes/components/card/existing-customer-card.config.js +51 -0
- package/src/_includes/components/card/existing-customer-card.njk +36 -0
- package/src/_includes/components/card/existing-customer-card.scss +100 -0
- package/src/_includes/components/card/macro.njk +4 -0
- package/src/_includes/components/card/search-result-card.njk +26 -21
- package/src/_includes/components/card/search-result-card.scss +0 -4
- package/src/_includes/components/component/preview-fixed-width.njk +5 -0
- package/src/_includes/components/eyebrow/eyebrow.config.js +14 -0
- package/src/_includes/components/eyebrow/eyebrow.scss +10 -0
- package/src/_includes/layout.njk +0 -2
- package/src/assets/scss/components/index.scss +1 -0
- package/src/assets/scss/tools/index.scss +11 -7
- /package/src/assets/fonts/{inter-bold.woff → Inter-Bold.woff} +0 -0
- /package/src/assets/fonts/{inter-bold.woff2 → Inter-Bold.woff2} +0 -0
- /package/src/assets/fonts/{inter-regular.woff → Inter-Regular.woff} +0 -0
- /package/src/assets/fonts/{inter-regular.woff2 → Inter-Regular.woff2} +0 -0
- /package/src/assets/fonts/{inter-semibold.woff → Inter-SemiBold.woff} +0 -0
- /package/src/assets/fonts/{inter-semibold.woff2 → Inter-SemiBold.woff2} +0 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "mp-design-system",
|
3
|
-
"version": "1.2.
|
3
|
+
"version": "1.2.28",
|
4
4
|
"description": "",
|
5
5
|
"scripts": {
|
6
6
|
"dev": "npm-run-all --parallel bundle:*",
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"parcel": "^2.4.0",
|
31
31
|
"require-glob": "^4.1.0",
|
32
32
|
"rimraf": "^3.0.2",
|
33
|
-
"sass": "^1.
|
33
|
+
"sass": "^1.71.0",
|
34
34
|
"slugify": "^1.6.5"
|
35
35
|
},
|
36
36
|
"alias": {
|
@@ -0,0 +1,51 @@
|
|
1
|
+
const categories = require('../component/categories');
|
2
|
+
|
3
|
+
module.exports = {
|
4
|
+
title: 'Existing customer card',
|
5
|
+
category: categories.card,
|
6
|
+
component: {
|
7
|
+
name: 'existing-customer-card',
|
8
|
+
folder: 'card'
|
9
|
+
},
|
10
|
+
preview: 'cards-two',
|
11
|
+
context: {
|
12
|
+
title: 'Mastersizer accessories',
|
13
|
+
lede: 'Configure your Mastersizer for your application and requirements with our range of accessories.',
|
14
|
+
cta: {
|
15
|
+
link: 'https://www.malvernpanalytical.com/en/products/product-range/mastersizer-range/mastersizer-3000#accessories',
|
16
|
+
label: 'View accessories',
|
17
|
+
},
|
18
|
+
image: {
|
19
|
+
src: 'https://p3.aprimocdn.net/malvernpanalytical/37015a45-6002-4cc3-9650-ad9e00b43396/636216816480633919JL_Original%20file.jpg?quality=60',
|
20
|
+
alt: 'Mastersizer accessories',
|
21
|
+
}
|
22
|
+
},
|
23
|
+
variants: [
|
24
|
+
{
|
25
|
+
title: 'Large',
|
26
|
+
preview: 'fixed-width',
|
27
|
+
context: {
|
28
|
+
width: 'large',
|
29
|
+
title: 'Looking for support?',
|
30
|
+
lede: 'Looking for support, manuals or software? Malvern Panalytical will provide the support for your business.',
|
31
|
+
cta: {
|
32
|
+
link: 'https://www.malvernpanalytical.com/en/support/product-support/mastersizer-range',
|
33
|
+
label: 'Get support',
|
34
|
+
},
|
35
|
+
image: {
|
36
|
+
src: 'https://p3.aprimocdn.net/malvernpanalytical/15fab5ad-6222-460d-aa00-ae0e011438ad/i_110714_063_m3kBROCHURE_w_MV_Original.JPG?quality=60',
|
37
|
+
alt: 'Mastersizer accessories',
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
],
|
42
|
+
props: [
|
43
|
+
{
|
44
|
+
table: [
|
45
|
+
['title', 'string'],
|
46
|
+
['description', 'string'],
|
47
|
+
['url', 'string'],
|
48
|
+
]
|
49
|
+
}
|
50
|
+
]
|
51
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
{%- from "components/twi/macro.njk" import twi -%}
|
2
|
+
|
3
|
+
{%- set classNames = "mp c-existing-customer-card" -%}
|
4
|
+
|
5
|
+
{%- if params.width -%}
|
6
|
+
{% set classNames = classNames + " c-existing-customer-card--" + params.width %}
|
7
|
+
{% endif -%}
|
8
|
+
|
9
|
+
<div class="{{ classNames }}">
|
10
|
+
<div class="c-existing-customer-card__wrapper">
|
11
|
+
<div class="c-existing-customer-card__main-wrapper">
|
12
|
+
{% if params.title | length %}
|
13
|
+
<h3 class="c-existing-customer-card__title">
|
14
|
+
<a href="{{ params.cta.link }}" aria-label="{{ params.title }}">
|
15
|
+
{{ params.title }}
|
16
|
+
</a>
|
17
|
+
</h3>
|
18
|
+
{% endif %}
|
19
|
+
{% if params.lede | length %}
|
20
|
+
<p class="c-existing-customer-card__lede">{{ params.lede }}</p>
|
21
|
+
{% endif %}
|
22
|
+
{% if params.cta | length %}
|
23
|
+
{{ twi({
|
24
|
+
label: params.cta.label,
|
25
|
+
classes: 'u-link',
|
26
|
+
icon: 'arrow-right'
|
27
|
+
}) }}
|
28
|
+
{% endif %}
|
29
|
+
</div>
|
30
|
+
{% if params.image | length %}
|
31
|
+
<figure class="c-existing-customer-card__media-wrapper">
|
32
|
+
<img class="c-existing-customer-card__image" src="{{ params.image.src }}" alt="{{ params.image.alt }}" />
|
33
|
+
</figure>
|
34
|
+
{% endif %}
|
35
|
+
</div>
|
36
|
+
</div>
|
@@ -0,0 +1,100 @@
|
|
1
|
+
.c-existing-customer-card {
|
2
|
+
background: color('white');
|
3
|
+
position: relative;
|
4
|
+
|
5
|
+
&::before {
|
6
|
+
content: '';
|
7
|
+
position: absolute;
|
8
|
+
top: 0;
|
9
|
+
right: 0;
|
10
|
+
width: 0;
|
11
|
+
height: 0;
|
12
|
+
border-style: solid;
|
13
|
+
border-width: 0 var(--space-l) var(--space-l) 0;
|
14
|
+
border-color: transparent color('grey', 'step-3') transparent transparent;
|
15
|
+
}
|
16
|
+
|
17
|
+
&:focus-within {
|
18
|
+
outline: 2px solid color('petrol');
|
19
|
+
}
|
20
|
+
|
21
|
+
&:where(:hover, :focus-within) .u-link {
|
22
|
+
text-decoration: underline;
|
23
|
+
}
|
24
|
+
|
25
|
+
&__wrapper {
|
26
|
+
@include padding('s-m');
|
27
|
+
display: flex;
|
28
|
+
flex-direction: column;
|
29
|
+
}
|
30
|
+
|
31
|
+
&__main-wrapper {
|
32
|
+
width: auto;
|
33
|
+
@extend .u-flow--s-m;
|
34
|
+
text-align: center;
|
35
|
+
}
|
36
|
+
|
37
|
+
&__title {
|
38
|
+
@include step(2);
|
39
|
+
|
40
|
+
a {
|
41
|
+
@include clickable-parent;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
&__lede {
|
46
|
+
line-height: lh('prose');
|
47
|
+
}
|
48
|
+
|
49
|
+
&__media-wrapper {
|
50
|
+
@include margin-top('m');
|
51
|
+
}
|
52
|
+
|
53
|
+
&__image {
|
54
|
+
max-height: 180px;
|
55
|
+
@include margin(0, 'auto');
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
.c-existing-customer-card--large {
|
60
|
+
@extend .c-existing-customer-card;
|
61
|
+
|
62
|
+
@media (min-width: 55em) {
|
63
|
+
.c-existing-customer-card {
|
64
|
+
&__wrapper {
|
65
|
+
@include o-grid(2);
|
66
|
+
@include padding-right('l-3xl');
|
67
|
+
@include padding-left('l-3xl');
|
68
|
+
display: flex;
|
69
|
+
flex-direction: row;
|
70
|
+
align-items: center;
|
71
|
+
justify-content: space-between;
|
72
|
+
|
73
|
+
& > * {
|
74
|
+
@include margin-bottom(0);
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
&__main-wrapper {
|
79
|
+
display: flex;
|
80
|
+
flex-direction: column;
|
81
|
+
justify-content: center;
|
82
|
+
text-align: left;
|
83
|
+
}
|
84
|
+
|
85
|
+
&__title {
|
86
|
+
@include step(3);
|
87
|
+
}
|
88
|
+
|
89
|
+
&__media-wrapper {
|
90
|
+
@include margin(0);
|
91
|
+
}
|
92
|
+
|
93
|
+
&__image {
|
94
|
+
max-height: unset;
|
95
|
+
height: auto;
|
96
|
+
width: auto;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
@@ -4,6 +4,10 @@
|
|
4
4
|
{{ c({ name: 'card' }, params) }}
|
5
5
|
{% endmacro %}
|
6
6
|
|
7
|
+
{% macro existingCustomerCard(params) %}
|
8
|
+
{{ c({ name: 'existing-customer-card', folder: 'card' }, params) }}
|
9
|
+
{% endmacro %}
|
10
|
+
|
7
11
|
{% macro industryCard(params) %}
|
8
12
|
{{ c({ name: 'industry-card', folder: 'card' }, params) }}
|
9
13
|
{% endmacro %}
|
@@ -1,24 +1,29 @@
|
|
1
1
|
{%- from "components/eyebrow/macro.njk" import eyebrow -%}
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
{% endif %}
|
19
|
-
</header>
|
20
|
-
<div class="c-search-result-card__body">
|
21
|
-
<p class="c-search-result-card__description">{{ params.description }}</p>
|
22
|
-
<span class="c-search-result-card__url">{{ params.url }}</span>
|
3
|
+
<article class="mp c-search-result-card">
|
4
|
+
<header class="c-search-result-card__header">
|
5
|
+
{% if params.title | length %}
|
6
|
+
<h2 class="c-search-result-card__title">
|
7
|
+
<a href="{{ params.url }}" aria-label="{{ params.title }}">
|
8
|
+
{{ params.title }}
|
9
|
+
</a>
|
10
|
+
</h2>
|
11
|
+
{% endif %}
|
12
|
+
{% if params.tag | length %}
|
13
|
+
<div class="c-search-result-card__tag">
|
14
|
+
{{ eyebrow({
|
15
|
+
text: params.tag,
|
16
|
+
colour: 'blue'
|
17
|
+
}) }}
|
23
18
|
</div>
|
24
|
-
|
19
|
+
{% endif %}
|
20
|
+
</header>
|
21
|
+
<div class="c-search-result-card__body">
|
22
|
+
{% if params.description | length %}
|
23
|
+
<p class="c-search-result-card__description">{{ params.description }}</p>
|
24
|
+
{% endif %}
|
25
|
+
{% if params.url | length %}
|
26
|
+
<span class="c-search-result-card__url">{{ params.url }}</span>
|
27
|
+
{% endif %}
|
28
|
+
</div>
|
29
|
+
</article>
|
@@ -15,6 +15,20 @@ module.exports = {
|
|
15
15
|
colour: 'blue'
|
16
16
|
}
|
17
17
|
},
|
18
|
+
{
|
19
|
+
title: 'Blue step 2',
|
20
|
+
context: {
|
21
|
+
text: 'Product range',
|
22
|
+
colour: 'blue-step-2'
|
23
|
+
}
|
24
|
+
},
|
25
|
+
{
|
26
|
+
title: 'Grey',
|
27
|
+
context: {
|
28
|
+
text: 'Product range',
|
29
|
+
colour: 'grey'
|
30
|
+
}
|
31
|
+
},
|
18
32
|
{
|
19
33
|
title: 'Petrol',
|
20
34
|
context: {
|
@@ -11,6 +11,15 @@
|
|
11
11
|
background-color: color('blue');
|
12
12
|
}
|
13
13
|
|
14
|
+
&--blue-step-2 {
|
15
|
+
background-color: color('blue', 'step-2');
|
16
|
+
color: color('petrol');
|
17
|
+
}
|
18
|
+
|
19
|
+
&--grey {
|
20
|
+
background-color: color('grey');
|
21
|
+
}
|
22
|
+
|
14
23
|
&--petrol {
|
15
24
|
background-color: color('petrol');
|
16
25
|
}
|
@@ -25,5 +34,6 @@
|
|
25
34
|
|
26
35
|
&--utility-orange {
|
27
36
|
background-color: color('utility-orange');
|
37
|
+
color: color('grey');
|
28
38
|
}
|
29
39
|
}
|
package/src/_includes/layout.njk
CHANGED
@@ -16,8 +16,6 @@
|
|
16
16
|
<meta property="og:image:alt" content="{{ config.name }}" />
|
17
17
|
<meta name="twitter:image" content="{{ config.openGraphImage }}" />
|
18
18
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
19
|
-
<link rel="preload" href="/build/Inter-Bold.af5441a3.woff2" as="font" type="font/woff2" crossorigin>
|
20
|
-
<link rel="preload" href="/build/Inter-Regular.ed77b881.woff2" as="font" type="font/woff2" crossorigin>
|
21
19
|
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap" as="style">
|
22
20
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/img/favicon.svg">
|
23
21
|
<link rel="stylesheet" href="/build/scss/main.css" />
|
@@ -4,6 +4,7 @@
|
|
4
4
|
@import '~comp/button/button.scss';
|
5
5
|
@import '~comp/campaign/campaign.scss';
|
6
6
|
@import '~comp/card/card.scss';
|
7
|
+
@import '~comp/card/existing-customer-card.scss';
|
7
8
|
@import '~comp/card/industry-card.scss';
|
8
9
|
@import '~comp/card/product-comparison-card.scss';
|
9
10
|
@import '~comp/card/search-result-card.scss';
|
@@ -157,11 +157,15 @@
|
|
157
157
|
@mixin clickable-parent {
|
158
158
|
position: static;
|
159
159
|
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
160
|
+
&:focus {
|
161
|
+
outline: 0;
|
162
|
+
}
|
163
|
+
|
164
|
+
&::after {
|
165
|
+
content: '';
|
166
|
+
position: absolute;
|
167
|
+
inset: 0;
|
168
|
+
cursor: pointer !important;
|
169
|
+
display: flex;
|
170
|
+
}
|
167
171
|
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|