mp-design-system 1.2.61 → 1.2.63
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/build/js/app.js +22 -2
- package/dist/build/scss/library.css +1 -2
- package/dist/build/scss/main.css +1 -2
- package/package.json +12 -6
- package/src/_includes/components/alert/alert.config.js +1 -1
- package/src/_includes/components/alert/alert.njk +1 -1
- package/src/_includes/components/alert/alert.scss +7 -1
- package/src/_includes/components/card/card.scss +1 -0
- package/src/_includes/components/card/product-card.njk +8 -0
- package/src/_includes/components/card-new/card-new.config.js +95 -0
- package/src/_includes/components/card-new/card-new.md +0 -0
- package/src/_includes/components/card-new/card-new.njk +169 -0
- package/src/_includes/components/card-new/card-new.scss +156 -0
- package/src/_includes/components/card-new/macro.njk +5 -0
- package/src/_includes/components/event-card/event-card.config.js +108 -0
- package/src/_includes/components/event-card/event-card.njk +1 -0
- package/src/_includes/components/event-card/event-card.scss +49 -0
- package/src/_includes/components/event-card/macro.njk +5 -0
- package/src/_includes/components/product-card/macro.njk +5 -0
- package/src/_includes/components/product-card/product-card.config.js +84 -0
- package/src/_includes/components/product-card/product-card.njk +1 -0
- package/src/_includes/components/product-card/product-card.scss +36 -0
- package/src/_includes/components/resource-card/macro.njk +5 -0
- package/src/_includes/components/resource-card/resource-card.config.js +59 -0
- package/src/_includes/components/resource-card/resource-card.njk +1 -0
- package/src/_includes/components/resource-card/resource-card.scss +0 -0
- package/src/_includes/components/twi/twi.scss +14 -0
- package/src/_includes/includes/system-scripts.njk +13 -0
- package/src/_includes/layout.njk +1 -1
- package/src/_includes/system-home-page.njk +1 -1
- package/src/assets/scss/components/index.scss +3 -0
- package/src/assets/scss/library.scss +94 -67
- package/src/assets/scss/objects/button-wrap.scss +18 -0
- package/src/assets/scss/objects/clickable-parent.scss +3 -0
- package/src/assets/scss/objects/index.scss +2 -0
- package/src/assets/scss/tools/index.scss +1 -0
- package/src/components-full-pages.njk +2 -3
- package/src/components-pages.njk +5 -4
- package/src/index.njk +1 -86
- package/src/prototype/events-hub.njk +10 -9
- package/src/prototype/index.njk +330 -201
- package/src/prototype/range.njk +23 -12
- package/dist/build/arc.abe174a6.svg +0 -1
- package/dist/build/concentric.465e6b4d.svg +0 -1
- package/dist/build/crystal.8300dbe3.svg +0 -1
- package/dist/build/dots-pattern.1bae0e23.svg +0 -1
- package/dist/build/js/app.js.map +0 -1
- package/dist/build/scss/library.css.map +0 -1
- package/dist/build/scss/main.css.map +0 -1
@@ -0,0 +1,49 @@
|
|
1
|
+
// Extend the basic card scss
|
2
|
+
@import '../card-new/card-new.scss';
|
3
|
+
|
4
|
+
.c-card-new--event {
|
5
|
+
|
6
|
+
// Colour themes
|
7
|
+
&.c-card-new--dark {
|
8
|
+
.c-card__day {
|
9
|
+
color: color('white');
|
10
|
+
}
|
11
|
+
.c-card__specs {
|
12
|
+
color: color('petrol', 'step-2');
|
13
|
+
}
|
14
|
+
}
|
15
|
+
&.c-card-new--alt {
|
16
|
+
.c-card__specs {
|
17
|
+
color: color('petrol', 'step-1');
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
.c-card__meta {
|
22
|
+
line-height: lh('prose');
|
23
|
+
}
|
24
|
+
|
25
|
+
&:not(.c-card-new--small) .c-card__datetime {
|
26
|
+
@container card (width > #{$card-s}) {
|
27
|
+
.c-card__day {
|
28
|
+
font-size: var(--step-4);
|
29
|
+
}
|
30
|
+
.c-card__month {
|
31
|
+
font-size: var(--step-2);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
@container card (width > #{$card-m}) {
|
35
|
+
.c-card__day {
|
36
|
+
font-size: var(--step-5);
|
37
|
+
}
|
38
|
+
.c-card__month {
|
39
|
+
font-size: var(--step-3);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
@container card (width < #{$card-s}) {
|
45
|
+
.c-card__specs {
|
46
|
+
display: none;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
const categories = require('../component/categories');
|
2
|
+
|
3
|
+
module.exports = {
|
4
|
+
title: 'NEW Product card',
|
5
|
+
component: {
|
6
|
+
name: 'product-card',
|
7
|
+
},
|
8
|
+
category: categories.card,
|
9
|
+
context: {
|
10
|
+
type: 'product',
|
11
|
+
theme: 'bordered',
|
12
|
+
size: 'medium',
|
13
|
+
header: {
|
14
|
+
title: 'Product card medium',
|
15
|
+
subtitle: 'Lorem ipsum dolor sit amet'
|
16
|
+
},
|
17
|
+
body: {
|
18
|
+
content: `<p>Nam duis leo phasellus quisque ac a volutpat euismod ultrices condimentum sociosqu et natoque volutpat eros.</p>`
|
19
|
+
},
|
20
|
+
footer: {
|
21
|
+
buttons: [
|
22
|
+
{
|
23
|
+
link: '#',
|
24
|
+
label: 'View product'
|
25
|
+
},
|
26
|
+
{
|
27
|
+
link: '#',
|
28
|
+
label: 'Request a quote',
|
29
|
+
colour: 'outline-green'
|
30
|
+
}
|
31
|
+
]
|
32
|
+
},
|
33
|
+
image: {
|
34
|
+
src: '/static/img/aeris.jpg',
|
35
|
+
alt: 'Alt text'
|
36
|
+
}
|
37
|
+
},
|
38
|
+
variants: [
|
39
|
+
{
|
40
|
+
title: 'With features list',
|
41
|
+
context: {
|
42
|
+
list: [
|
43
|
+
{
|
44
|
+
label: 'Classic 90° DLS',
|
45
|
+
icon: 'cross',
|
46
|
+
classes: 'c-twi--grey'
|
47
|
+
},
|
48
|
+
{
|
49
|
+
label: 'Dynamic light scattering',
|
50
|
+
icon: 'tick',
|
51
|
+
classes: 'c-twi--green'
|
52
|
+
},
|
53
|
+
{
|
54
|
+
label: 'Static light scattering',
|
55
|
+
icon: 'tick',
|
56
|
+
classes: 'c-twi--green'
|
57
|
+
},
|
58
|
+
{
|
59
|
+
label: 'Non-invasive back scatter DLS',
|
60
|
+
icon: 'tick',
|
61
|
+
classes: 'c-twi--green'
|
62
|
+
},
|
63
|
+
{
|
64
|
+
label: 'Multi-angle dynamic light scattering',
|
65
|
+
icon: 'cross',
|
66
|
+
classes: 'c-twi--grey'
|
67
|
+
}
|
68
|
+
],
|
69
|
+
}
|
70
|
+
},
|
71
|
+
{
|
72
|
+
title: 'Small',
|
73
|
+
context: {
|
74
|
+
size: 'small',
|
75
|
+
url: '#',
|
76
|
+
footer: false,
|
77
|
+
header: {
|
78
|
+
title: 'Product card small',
|
79
|
+
subtitle: 'Lorem ipsum dolor sit amet'
|
80
|
+
},
|
81
|
+
},
|
82
|
+
},
|
83
|
+
]
|
84
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{% extends "components/card-new/card-new.njk" %}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
// Extend the basic card scss
|
2
|
+
@import '../card-new/card-new.scss';
|
3
|
+
|
4
|
+
// Complex CSS to make images work in both portrait and landscape
|
5
|
+
// Separate it out into a li'l mixin
|
6
|
+
@mixin productCardImage($size: 's-m') {
|
7
|
+
@include space('top', $size);
|
8
|
+
@include space('left', $size);
|
9
|
+
position: absolute;
|
10
|
+
// height: 100%;
|
11
|
+
height: calc(100% - (var(--space-#{$size}) *2) );
|
12
|
+
// width: 100%;
|
13
|
+
width: calc(100% - var(--space-#{$size}));
|
14
|
+
}
|
15
|
+
|
16
|
+
.c-card-new--product {
|
17
|
+
.c-card-new__image {
|
18
|
+
img {
|
19
|
+
margin-inline: auto;
|
20
|
+
object-fit: contain;
|
21
|
+
object-position: top center;
|
22
|
+
}
|
23
|
+
|
24
|
+
@container card (width > #{$card-m}) {
|
25
|
+
flex-basis: 50%;
|
26
|
+
|
27
|
+
img {
|
28
|
+
@include productCardImage('s-m');
|
29
|
+
|
30
|
+
.c-card-new--small & {
|
31
|
+
@include productCardImage('xs')
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
const categories = require('../component/categories');
|
2
|
+
|
3
|
+
module.exports = {
|
4
|
+
title: 'NEW Resource card',
|
5
|
+
component: {
|
6
|
+
name: 'resource-card',
|
7
|
+
},
|
8
|
+
category: categories.card,
|
9
|
+
context: {
|
10
|
+
type: 'resource',
|
11
|
+
theme: 'bordered',
|
12
|
+
size: 'medium',
|
13
|
+
tag: 'Whitepaper',
|
14
|
+
header: {
|
15
|
+
title: 'Accelerating the deformation workflow for oral solid dosage forms',
|
16
|
+
date: {
|
17
|
+
date: new Date(2015,0,12)
|
18
|
+
},
|
19
|
+
language: 'English'
|
20
|
+
},
|
21
|
+
body: {
|
22
|
+
content: `<p>This whitepaper on Oral Solid Dose (OSD) deformulation demonstrates how the analytical technique of Morphologically Directed Raman Spectroscopy (MDRS) can be used to accelerate the development of generic products to a successful conclusion.</p>`
|
23
|
+
},
|
24
|
+
body: {
|
25
|
+
keySpecs: [
|
26
|
+
{
|
27
|
+
title: 'Products',
|
28
|
+
term: 'Epsilon 4'
|
29
|
+
},
|
30
|
+
{
|
31
|
+
title: 'Technology',
|
32
|
+
term: 'X-ray fluorescence (XRF)'
|
33
|
+
},
|
34
|
+
{
|
35
|
+
title: 'Industry',
|
36
|
+
term: 'Metals, Advanced manufacturing'
|
37
|
+
},
|
38
|
+
]
|
39
|
+
},
|
40
|
+
link: {
|
41
|
+
url: '#',
|
42
|
+
label: 'Read the whitepaper'
|
43
|
+
}
|
44
|
+
},
|
45
|
+
variants: [
|
46
|
+
{
|
47
|
+
title: 'Small',
|
48
|
+
context: {
|
49
|
+
size: 'small',
|
50
|
+
url: '#',
|
51
|
+
footer: false,
|
52
|
+
specs: false,
|
53
|
+
link: {
|
54
|
+
label: false
|
55
|
+
}
|
56
|
+
},
|
57
|
+
},
|
58
|
+
]
|
59
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{% extends "components/card-new/card-new.njk" %}
|
File without changes
|
@@ -71,5 +71,18 @@
|
|
71
71
|
iframe.classList.toggle('u-pad-s');
|
72
72
|
}
|
73
73
|
}
|
74
|
+
|
75
|
+
// Show iframe width
|
76
|
+
const iframeWrap = document.getElementById('iframe-wrap');
|
77
|
+
function reportIframeWidth(entry){
|
78
|
+
const width = (entry.contentBoxSize) ? entry.contentBoxSize[0].inlineSize : entry.contentRect.width;
|
79
|
+
iframeWrap.style.setProperty('--width',width);
|
80
|
+
};
|
81
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
82
|
+
for (const entry of entries) {
|
83
|
+
reportIframeWidth(entry);
|
84
|
+
}
|
85
|
+
});
|
86
|
+
resizeObserver.observe(iframeWrap);
|
74
87
|
})();
|
75
88
|
</script>
|
package/src/_includes/layout.njk
CHANGED
@@ -11,8 +11,10 @@
|
|
11
11
|
@import '~comp/card/product-card.scss';
|
12
12
|
@import '~comp/card/search-result-card.scss';
|
13
13
|
@import '~comp/card/technology-card.scss';
|
14
|
+
@import '~comp/card-new/card-new.scss';
|
14
15
|
@import '~comp/comparison-table/comparison-table.scss';
|
15
16
|
@import '~comp/embed/embed.scss';
|
17
|
+
@import '~comp/event-card/event-card.scss';
|
16
18
|
@import '~comp/eyebrow/eyebrow.scss';
|
17
19
|
@import '~comp/facet/facet.scss';
|
18
20
|
@import '~comp/featured-article-card/featured-article-card.scss';
|
@@ -32,6 +34,7 @@
|
|
32
34
|
@import '~comp/off-canvas/off-canvas.scss';
|
33
35
|
@import '~comp/option-list/option-list.scss';
|
34
36
|
@import '~comp/post-meta/post-meta.scss';
|
37
|
+
@import '~comp/product-card/product-card.scss';
|
35
38
|
@import '~comp/product-signpost/product-signpost.scss';
|
36
39
|
@import '~comp/quote/quote.scss';
|
37
40
|
@import '~comp/scroll-spy/scroll-spy.scss';
|