mp-design-system 1.2.28 → 1.2.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) 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 +1 -1
  6. package/src/_includes/components/button/button.scss +1 -1
  7. package/src/_includes/components/card/existing-customer-card.config.js +2 -2
  8. package/src/_includes/components/card/existing-customer-card.njk +7 -3
  9. package/src/_includes/components/card/industry-card.config.js +26 -3
  10. package/src/_includes/components/card/industry-card.njk +32 -6
  11. package/src/_includes/components/card/industry-card.scss +76 -6
  12. package/src/_includes/components/card/macro.njk +10 -2
  13. package/src/_includes/components/card/measurement-type-card.config.js +35 -0
  14. package/src/_includes/components/card/measurement-type-card.njk +35 -0
  15. package/src/_includes/components/card/measurement-type-card.scss +56 -0
  16. package/src/_includes/components/card/{product-comparison-card.config.js → product-card.config.js} +28 -27
  17. package/src/_includes/components/card/product-card.njk +50 -0
  18. package/src/_includes/components/card/product-card.scss +88 -0
  19. package/src/_includes/components/card/search-result-card.config.js +2 -2
  20. package/src/_includes/components/card/search-result-card.njk +9 -5
  21. package/src/_includes/components/card/search-result-card.scss +5 -1
  22. package/src/_includes/components/card/technology-card.config.js +35 -0
  23. package/src/_includes/components/card/technology-card.njk +35 -0
  24. package/src/_includes/components/card/technology-card.scss +56 -0
  25. package/src/_includes/components/signpost/signpost.config.js +14 -1
  26. package/src/_includes/components/signpost/signpost.njk +7 -4
  27. package/src/_includes/components/signpost/signpost.scss +23 -0
  28. package/src/_includes/components/tabs/tabs.scss +4 -0
  29. package/src/_includes/components/twi/twi.scss +4 -0
  30. package/src/_includes/navigation/corporate.njk +0 -3
  31. package/src/assets/scss/components/index.scss +3 -1
  32. package/src/assets/scss/components/product-finder.scss +1 -1
  33. package/src/assets/scss/tools/cutoff.scss +5 -1
  34. package/src/assets/scss/utilities/space.scss +6 -0
  35. package/src/index.njk +1 -1
  36. package/src/prototype/events-hub.njk +463 -0
  37. package/src/prototype/index.njk +251 -182
  38. package/src/prototype/range.njk +5 -5
  39. package/src/prototype/sections.njk +6 -1
  40. package/src/static/svg/icon-globe-alt.svg +4 -0
  41. package/src/static/svg/icon-live-webinars.svg +6 -0
  42. package/src/static/svg/icon-recorded-webinars.svg +4 -0
  43. package/src/static/svg/icon-user-trainings.svg +5 -0
  44. package/src/_includes/components/card/product-comparison-card.njk +0 -37
  45. package/src/_includes/components/card/product-comparison-card.scss +0 -79
@@ -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
+ }
@@ -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
  }
@@ -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>
@@ -6,8 +6,10 @@
6
6
  @import '~comp/card/card.scss';
7
7
  @import '~comp/card/existing-customer-card.scss';
8
8
  @import '~comp/card/industry-card.scss';
9
- @import '~comp/card/product-comparison-card.scss';
9
+ @import '~comp/card/measurement-type-card.scss';
10
+ @import '~comp/card/product-card.scss';
10
11
  @import '~comp/card/search-result-card.scss';
12
+ @import '~comp/card/technology-card.scss';
11
13
  @import '~comp/comparison-table/comparison-table.scss';
12
14
  @import '~comp/embed/embed.scss';
13
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
+ }
@@ -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 %}