mp-design-system 1.2.27 → 1.2.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. package/dist/build/scss/library.css +1 -1
  2. package/dist/build/scss/library.css.map +1 -1
  3. package/dist/build/scss/main.css +1 -1
  4. package/dist/build/scss/main.css.map +1 -1
  5. package/package.json +2 -2
  6. package/src/_includes/components/button/button.scss +1 -1
  7. package/src/_includes/components/card/existing-customer-card.config.js +51 -0
  8. package/src/_includes/components/card/existing-customer-card.njk +40 -0
  9. package/src/_includes/components/card/existing-customer-card.scss +100 -0
  10. package/src/_includes/components/card/industry-card.config.js +26 -3
  11. package/src/_includes/components/card/industry-card.njk +32 -6
  12. package/src/_includes/components/card/industry-card.scss +76 -6
  13. package/src/_includes/components/card/macro.njk +14 -2
  14. package/src/_includes/components/card/measurement-type-card.config.js +35 -0
  15. package/src/_includes/components/card/measurement-type-card.njk +35 -0
  16. package/src/_includes/components/card/measurement-type-card.scss +56 -0
  17. package/src/_includes/components/card/{product-comparison-card.config.js → product-card.config.js} +28 -27
  18. package/src/_includes/components/card/product-card.njk +50 -0
  19. package/src/_includes/components/card/product-card.scss +88 -0
  20. package/src/_includes/components/card/search-result-card.config.js +2 -2
  21. package/src/_includes/components/card/search-result-card.njk +27 -18
  22. package/src/_includes/components/card/search-result-card.scss +5 -5
  23. package/src/_includes/components/card/technology-card.config.js +35 -0
  24. package/src/_includes/components/card/technology-card.njk +35 -0
  25. package/src/_includes/components/card/technology-card.scss +56 -0
  26. package/src/_includes/components/component/preview-fixed-width.njk +5 -0
  27. package/src/_includes/components/eyebrow/eyebrow.config.js +14 -0
  28. package/src/_includes/components/eyebrow/eyebrow.scss +10 -0
  29. package/src/_includes/components/signpost/signpost.config.js +14 -1
  30. package/src/_includes/components/signpost/signpost.njk +7 -4
  31. package/src/_includes/components/signpost/signpost.scss +23 -0
  32. package/src/_includes/components/tabs/tabs.scss +4 -0
  33. package/src/_includes/components/twi/twi.scss +4 -0
  34. package/src/_includes/layout.njk +0 -2
  35. package/src/_includes/navigation/corporate.njk +0 -3
  36. package/src/assets/scss/components/index.scss +4 -1
  37. package/src/assets/scss/components/product-finder.scss +1 -1
  38. package/src/assets/scss/tools/cutoff.scss +5 -1
  39. package/src/assets/scss/tools/index.scss +11 -7
  40. package/src/assets/scss/utilities/space.scss +6 -0
  41. package/src/index.njk +1 -1
  42. package/src/prototype/events-hub.njk +463 -0
  43. package/src/prototype/index.njk +251 -182
  44. package/src/prototype/range.njk +5 -5
  45. package/src/prototype/sections.njk +6 -1
  46. package/src/static/svg/icon-globe-alt.svg +4 -0
  47. package/src/static/svg/icon-live-webinars.svg +6 -0
  48. package/src/static/svg/icon-recorded-webinars.svg +4 -0
  49. package/src/static/svg/icon-user-trainings.svg +5 -0
  50. package/src/_includes/components/card/product-comparison-card.njk +0 -37
  51. package/src/_includes/components/card/product-comparison-card.scss +0 -79
  52. /package/src/assets/fonts/{inter-bold.woff → Inter-Bold.woff} +0 -0
  53. /package/src/assets/fonts/{inter-bold.woff2 → Inter-Bold.woff2} +0 -0
  54. /package/src/assets/fonts/{inter-regular.woff → Inter-Regular.woff} +0 -0
  55. /package/src/assets/fonts/{inter-regular.woff2 → Inter-Regular.woff2} +0 -0
  56. /package/src/assets/fonts/{inter-semibold.woff → Inter-SemiBold.woff} +0 -0
  57. /package/src/assets/fonts/{inter-semibold.woff2 → Inter-SemiBold.woff2} +0 -0
@@ -0,0 +1,88 @@
1
+ .c-product-card {
2
+ background: color('white');
3
+ display: flex;
4
+ flex-flow: column;
5
+ border: 1px solid color('petrol', 'step-2');
6
+
7
+ &__body {
8
+ @include padding('s-m');
9
+ display: flex;
10
+ flex-flow: column;
11
+ flex-grow: 1;
12
+
13
+ & > * + * {
14
+ @include margin-top('xs');
15
+ }
16
+ }
17
+
18
+ &__heading {
19
+ @extend .c-h, .c-h--step-0;
20
+ }
21
+
22
+ &__lede {
23
+ @extend .u-step--1;
24
+ }
25
+
26
+ &__footer {
27
+ @include margin-top('auto');
28
+ @include padding-top('s');
29
+ display: flex;
30
+ flex-flow: row;
31
+ flex-wrap: wrap;
32
+ gap: var(--space-2xs);
33
+
34
+ & > * {
35
+ flex-grow: 1;
36
+ }
37
+ }
38
+
39
+ &__image {
40
+ height: 10em;
41
+ order: -1;
42
+
43
+ img {
44
+ height: 100%;
45
+ width: 100%;
46
+ aspect-ratio: 16/9;
47
+ object-fit: cover;
48
+ }
49
+ }
50
+ }
51
+
52
+ .c-product-card--features-list {
53
+ .c-product-card {
54
+ &__heading {
55
+ @extend .c-h--step-1;
56
+ }
57
+
58
+ &__lede {
59
+ @extend .u-step-0;
60
+ }
61
+
62
+ &__features-list {
63
+ @include margin-top('2xs');
64
+ list-style: none;
65
+
66
+ &-heading {
67
+ @include margin-top('s');
68
+ font-weight: weight("bold");
69
+ }
70
+
71
+ & > * + * {
72
+ @include margin-top('3xs');
73
+ }
74
+ }
75
+
76
+ &__feature {
77
+ &--tick {
78
+ svg {
79
+ color: color('green');
80
+ }
81
+ }
82
+
83
+ &--cross {
84
+ color: color('grey', 'step-2');
85
+ }
86
+ }
87
+ }
88
+ }
@@ -11,7 +11,7 @@ module.exports = {
11
11
  context: {
12
12
  title: 'Mastersizer range',
13
13
  description: 'The Mastersizer range of laser diffraction particle size analyzers set the standard for delivering rapid, accurate particle size distributions for both wet and dry dispersions.',
14
- url: '/en/products/product-range/mastersizer-range',
14
+ link: '/en/products/product-range/mastersizer-range',
15
15
  tag: 'Product range'
16
16
  },
17
17
  variants: [
@@ -21,7 +21,7 @@ module.exports = {
21
21
  table: [
22
22
  ['title', 'string'],
23
23
  ['description', 'string'],
24
- ['url', 'string'],
24
+ ['link', 'string'],
25
25
  ['tag', 'string'],
26
26
  ]
27
27
  }
@@ -1,24 +1,33 @@
1
1
  {%- from "components/eyebrow/macro.njk" import eyebrow -%}
2
2
 
3
-
4
- <article class="mp c-search-result-card">
5
- <header class="c-search-result-card__header">
6
- <h2 class="c-search-result-card__title">
7
- <a href="{{ params.url }}">
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
+ {% if params.link | length %}
8
+ <a href="{{ params.link }}" aria-label="{{ params.title }}">
8
9
  {{ params.title }}
9
10
  </a>
10
- </h2>
11
- {% if params.tag | length %}
12
- <div class="c-search-result-card__tag">
13
- {{ eyebrow({
14
- text: params.tag,
15
- colour: 'blue'
16
- }) }}
17
- </div>
11
+ {% else %}
12
+ {{ params.title }}
18
13
  {% 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>
14
+ </h2>
15
+ {% endif %}
16
+ {% if params.tag | length %}
17
+ <div class="c-search-result-card__tag">
18
+ {{ eyebrow({
19
+ text: params.tag,
20
+ colour: 'blue'
21
+ }) }}
23
22
  </div>
24
- </article>
23
+ {% endif %}
24
+ </header>
25
+ <div class="c-search-result-card__body">
26
+ {% if params.description | length %}
27
+ <p class="c-search-result-card__description">{{ params.description }}</p>
28
+ {% endif %}
29
+ {% if params.link | length %}
30
+ <span class="c-search-result-card__url">{{ params.link }}</span>
31
+ {% endif %}
32
+ </div>
33
+ </article>
@@ -8,7 +8,7 @@
8
8
  outline: 2px solid color('petrol');
9
9
  }
10
10
 
11
- &:where(:hover, :focus-within) .c-search-result-card__title {
11
+ &:where(:hover) .c-search-result-card__title {
12
12
  text-decoration: underline;
13
13
  text-underline-offset: 0.1em;
14
14
  }
@@ -24,10 +24,6 @@
24
24
 
25
25
  a {
26
26
  @include clickable-parent;
27
-
28
- &:focus {
29
- outline: 0;
30
- }
31
27
  }
32
28
  }
33
29
 
@@ -44,5 +40,9 @@
44
40
 
45
41
  &__url {
46
42
  color: color('utility-blue');
43
+ overflow: hidden;
44
+ display: -webkit-box;
45
+ -webkit-line-clamp: 1;
46
+ -webkit-box-orient: vertical;
47
47
  }
48
48
  }
@@ -0,0 +1,35 @@
1
+ const categories = require('../component/categories');
2
+
3
+ module.exports = {
4
+ title: 'Technology card',
5
+ category: categories.card,
6
+ component: {
7
+ name: 'technology-card',
8
+ folder: 'card'
9
+ },
10
+ preview: 'cards-three',
11
+ context: {
12
+ title: 'X-ray Diffraction (XRD)',
13
+ link: '#',
14
+ description: 'XRD is the only laboratory technique that non-destructively and accurately obtains information such as chemical composition.',
15
+ image: {
16
+ src: '/static/img/range-product-1.jpg',
17
+ alt: ''
18
+ },
19
+ footer: {
20
+ button: {
21
+ label: 'View technology'
22
+ }
23
+ }
24
+ },
25
+ variants: [],
26
+ props: [
27
+ {
28
+ table: [
29
+ ['title', 'string'],
30
+ ['link', 'string'],
31
+ ['image', 'object', 'Image object']
32
+ ]
33
+ }
34
+ ]
35
+ }
@@ -0,0 +1,35 @@
1
+ {%- from "components/twi/macro.njk" import twi -%}
2
+
3
+ {%- set classes = 'mp c-technology-card' -%}
4
+
5
+ {%- if params.classes -%}{% set classes = classes + ' ' + params.classes %}{%- endif -%}
6
+
7
+ <article class="{{ classes }}" role="article" aria-label="Technology card">
8
+ <div class="c-technology-card__body">
9
+ {% if params.title | length %}
10
+ <h3 class="c-technology-card__heading">
11
+ {% if params.link | length %}
12
+ <a href="{{ params.link }}" aria-label="{{ params.title }}">
13
+ {{ params.title }}
14
+ </a>
15
+ {% else %}
16
+ {{ params.title }}
17
+ {% endif %}
18
+ </h3>
19
+ {% endif %}
20
+ {% if params.description | length %}
21
+ <p class="c-technology-card__lede">{{ params.description }}</p>
22
+ {% endif %}
23
+ {% if params.footer.button | length %}
24
+ <footer class="c-technology-card__footer">
25
+ {{ twi({ label: params.footer.button.label, icon: 'arrow-right', classes: 'c-twi--small u-link' }) }}
26
+ </footer>
27
+ {% endif %}
28
+ </div>
29
+ {% if params.image | length %}
30
+ <figure class="c-technology-card__image">
31
+ <img src="{{ params.image.src }}" alt="{{ params.image.alt or params.title }}" />
32
+ </figure>
33
+ {% endif %}
34
+ </article>
35
+
@@ -0,0 +1,56 @@
1
+ .c-technology-card {
2
+ background: color('white');
3
+ display: flex;
4
+ flex-flow: column;
5
+ border: 1px solid color('petrol', 'step-2');
6
+ position: relative;
7
+
8
+ &:focus-within {
9
+ outline: 2px solid color('petrol');
10
+ }
11
+
12
+ &:where(:hover) .c-twi.u-link {
13
+ text-decoration: underline;
14
+ text-underline-offset: 0.1em;
15
+ }
16
+
17
+ &__body {
18
+ @include padding('s-m');
19
+ display: flex;
20
+ flex-flow: column;
21
+ flex-grow: 1;
22
+
23
+ & > * + * {
24
+ @include margin-top('xs');
25
+ }
26
+ }
27
+
28
+ &__heading {
29
+ @extend .c-h, .c-h--step-0;
30
+
31
+ a {
32
+ @include clickable-parent;
33
+ }
34
+ }
35
+
36
+ &__lede {
37
+ @extend .u-step--1;
38
+ }
39
+
40
+ &__footer {
41
+ @include margin-top('auto');
42
+ @include padding-top('s');
43
+ }
44
+
45
+ &__image {
46
+ height: 10em;
47
+ order: -1;
48
+
49
+ img {
50
+ height: 100%;
51
+ width: 100%;
52
+ aspect-ratio: 16/9;
53
+ object-fit: cover;
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,5 @@
1
+ <div class="u-wrap u-pad-m">
2
+ <div>
3
+ {{ comp | safe }}
4
+ </div>
5
+ </div>
@@ -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
  }
@@ -12,5 +12,18 @@ module.exports = {
12
12
  icon: 'large-student',
13
13
  title: 'Dive into our knowledge center',
14
14
  description: 'Our huge freely-available library of manuals, instrument and application information.'
15
- }
15
+ },
16
+ variants: [
17
+ {
18
+ title: "Vertical",
19
+ preview: 'cards-three',
20
+ context: {
21
+ direction: 'vertical',
22
+ size: 'l',
23
+ color: 'blue',
24
+ icon: 'icon-user-training',
25
+ description: false
26
+ }
27
+ }
28
+ ]
16
29
  }
@@ -1,11 +1,14 @@
1
- <article class="mp c-signpost">
2
- <a class="c-signpost__link" href="{{ params.link }}">
1
+ <article
2
+ class="mp c-signpost {{ "c-signpost--vertical" if params.direction == "vertical" }} {{ "c-signpost--l" if params.size == "l" }} {{ params.classes }}">
3
+ <a class="c-signpost__link {{ "u-white u-bg-" if params.color }}{{params.color}}" href="{{ params.link }}">
3
4
  <figure class="c-signpost__image">
4
5
  <img src="/static/svg/{{ params.icon }}.svg" />
5
6
  </figure>
6
7
  <div class="c-signpost__content u-flow--2xs">
7
- <h3 class="c-h c-h--step--1">{{ params.title }}</h3>
8
- <p>{{ params.description }}</p>
8
+ <h3 class="{{ "c-h c-h--step--1" if params.direction !== "vertical" }}">{{ params.title }}</h3>
9
+ {% if params.description %}
10
+ <p>{{ params.description }}</p>
11
+ {% endif %}
9
12
  </div>
10
13
  </a>
11
14
  </article>
@@ -10,6 +10,11 @@
10
10
  max-width: 72px;
11
11
  flex-grow: 1;
12
12
  flex-shrink: 0;
13
+
14
+ .c-signpost--l & {
15
+ max-width: var(--space-3xl);
16
+ width: auto;
17
+ }
13
18
  }
14
19
 
15
20
  &__content {
@@ -19,9 +24,27 @@
19
24
  color: color('utility-blue');
20
25
  text-decoration: underline;
21
26
  }
27
+
28
+ .c-signpost--l & {
29
+ @include step(0);
30
+ }
22
31
  }
23
32
 
24
33
  &:hover &__content p {
25
34
  text-decoration: none;
26
35
  }
36
+ }
37
+
38
+ .c-signpost--vertical {
39
+ .c-signpost__link {
40
+ @include cutoff($size: #{var(--space-m)});
41
+ @include padding('m');
42
+ flex-direction: column;
43
+ text-align: center;
44
+ }
45
+
46
+ .c-signpost__image {
47
+ @include margin-bottom('s-m');
48
+ margin-right: 0;
49
+ }
27
50
  }
@@ -7,6 +7,10 @@
7
7
  }
8
8
  }
9
9
 
10
+ .no-js &__content > * + * {
11
+ @include margin-top('gutter');
12
+ }
13
+
10
14
  &__content > * {
11
15
  display: none;
12
16
 
@@ -22,4 +22,8 @@
22
22
  margin-left: 0;
23
23
  order: -1;
24
24
  }
25
+
26
+ &--small {
27
+ @include step(-1);
28
+ }
25
29
  }
@@ -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" />
@@ -6,9 +6,6 @@
6
6
  <li>
7
7
  <a href="/prototype/sections">Solutions</a>
8
8
  </li>
9
- <li>
10
- <a href="">CRO services</a>
11
- </li>
12
9
  <li>
13
10
  <a href="/prototype/webinars">Webinars and events</a>
14
11
  </li>
@@ -4,9 +4,12 @@
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
- @import '~comp/card/product-comparison-card.scss';
9
+ @import '~comp/card/measurement-type-card.scss';
10
+ @import '~comp/card/product-card.scss';
9
11
  @import '~comp/card/search-result-card.scss';
12
+ @import '~comp/card/technology-card.scss';
10
13
  @import '~comp/comparison-table/comparison-table.scss';
11
14
  @import '~comp/embed/embed.scss';
12
15
  @import '~comp/eyebrow/eyebrow.scss';
@@ -64,7 +64,7 @@
64
64
  }
65
65
  }
66
66
 
67
- .c-product-comparison-card {
67
+ .c-product-card {
68
68
  border: 1px solid;
69
69
  border-image-slice: 1;
70
70
  border-image-source: linear-gradient(to right, rgba(color('blue'), 0.5), rgba(color('green'), 0.5));
@@ -41,6 +41,10 @@
41
41
  @include cutoff("bottom-left")
42
42
  }
43
43
 
44
+ .u-cutoff--m {
45
+ @include cutoff($size: var(--space-m))
46
+ }
47
+
44
48
  .u-cutoff--xl {
45
49
  @include cutoff($size: var(--space-xl))
46
- }
50
+ }
@@ -157,11 +157,15 @@
157
157
  @mixin clickable-parent {
158
158
  position: static;
159
159
 
160
- &::after {
161
- content: '';
162
- position: absolute;
163
- inset: 0;
164
- cursor: pointer !important;
165
- display: flex;
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
  }
@@ -90,6 +90,9 @@
90
90
  .u-pad-s {
91
91
  @include padding('s');
92
92
  }
93
+ .u-pad-s-m {
94
+ @include padding('s-m');
95
+ }
93
96
  .u-pad-m {
94
97
  @include padding('m');
95
98
  }
@@ -166,6 +169,9 @@
166
169
  .u-margin-top-auto {
167
170
  margin-top: auto;
168
171
  }
172
+ .u-margin-top-negative-2xl {
173
+ margin-top: calc(-1 * #{var(--space-2xl)})
174
+ }
169
175
  .u-margin-top-2xs {
170
176
  @include margin-top('2xs');
171
177
  }
package/src/index.njk CHANGED
@@ -196,7 +196,7 @@ There are two other design systems in use at Malvern Panalytical.
196
196
  ## Latest updates
197
197
  ##### V1.2.13 - November 2023
198
198
 
199
- - New [product comparison cards](/components/product-comparison-card)
199
+ - New [product comparison cards](/components/product-card-with-features-list)
200
200
  - New ["Sticky" internal nav](/components/internal-nav-sticky-on-scroll)
201
201
  - Updated [comparison table](/components/comparison-table) design
202
202
  {% endset %}