mp-design-system 1.2.4 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. package/dist/build/js/app.js +1 -1
  2. package/dist/build/js/app.js.map +1 -1
  3. package/dist/build/scss/library.css +1 -1
  4. package/dist/build/scss/library.css.map +1 -1
  5. package/dist/build/scss/main.css +1 -1
  6. package/dist/build/scss/main.css.map +1 -1
  7. package/package.json +3 -3
  8. package/src/_includes/components/{industry-card → card}/industry-card.config.js +1 -0
  9. package/src/_includes/components/card/macro.njk +8 -0
  10. package/src/_includes/components/card/product-comparison-card.config.js +90 -0
  11. package/src/_includes/components/card/product-comparison-card.njk +37 -0
  12. package/src/_includes/components/card/product-comparison-card.scss +74 -0
  13. package/src/_includes/components/input/macro.njk +10 -14
  14. package/src/_includes/components/twi/twi.scss +1 -1
  15. package/src/assets/js/app.js +0 -2
  16. package/src/assets/scss/components/form.scss +67 -0
  17. package/src/assets/scss/components/index.scss +3 -1
  18. package/src/assets/scss/utilities/space.scss +3 -0
  19. package/src/brand/logo.md +26 -11
  20. package/src/brand/patterns.njk +7 -1
  21. package/src/prototype/index.njk +1 -1
  22. package/src/prototype/sections.njk +1 -1
  23. package/src/static/zip/SVG_patterns.zip +0 -0
  24. package/src/_includes/components/dynamic-form/dynamic-form.config.js +0 -16
  25. package/src/_includes/components/dynamic-form/dynamic-form.njk +0 -319
  26. package/src/_includes/components/dynamic-form/dynamic-form.scss +0 -77
  27. package/src/_includes/components/dynamic-form/macro.njk +0 -5
  28. package/src/_includes/components/industry-card/macro.njk +0 -5
  29. package/src/_includes/components/input/combobox.njk +0 -17
  30. package/src/_includes/components/input/combobox.scss +0 -31
  31. package/src/_includes/components/input/combox.config.js +0 -49
  32. package/src/assets/js/imports/combobox.js +0 -66
  33. /package/src/_includes/components/{industry-card → card}/industry-card.njk +0 -0
  34. /package/src/_includes/components/{industry-card → card}/industry-card.scss +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-design-system",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "npm-run-all --parallel bundle:*",
@@ -19,7 +19,7 @@
19
19
  "author": "",
20
20
  "license": "ISC",
21
21
  "devDependencies": {
22
- "@11ty/eleventy": "^0.12.1",
22
+ "@11ty/eleventy": "^2.0.1",
23
23
  "@11ty/eleventy-plugin-syntaxhighlight": "^3.2.2",
24
24
  "@parcel/transformer-sass": "^2.4.0",
25
25
  "dotenv": "^8.6.0",
@@ -28,7 +28,7 @@
28
28
  "markdown-it-prism": "^2.2.3",
29
29
  "npm-run-all": "^4.1.5",
30
30
  "parcel": "^2.4.0",
31
- "require-glob": "^3.2.0",
31
+ "require-glob": "^4.1.0",
32
32
  "rimraf": "^3.0.2",
33
33
  "sass": "^1.49.10",
34
34
  "slugify": "^1.6.5"
@@ -5,6 +5,7 @@ module.exports = {
5
5
  category: categories.card,
6
6
  component: {
7
7
  name: 'industry-card',
8
+ folder: 'card'
8
9
  },
9
10
  preview: 'cards-three',
10
11
  context: {
@@ -3,3 +3,11 @@
3
3
  {% macro card(params) %}
4
4
  {{ c({ name: 'card' }, params) }}
5
5
  {% endmacro %}
6
+
7
+ {% macro industryCard(params) %}
8
+ {{ c({ name: 'industry-card', folder: 'card' }, params) }}
9
+ {% endmacro %}
10
+
11
+ {% macro productComparisonCard(params) %}
12
+ {{ c({ name: 'product-comparison-card', folder: 'card' }, params) }}
13
+ {% endmacro %}
@@ -0,0 +1,90 @@
1
+ const categories = require('../component/categories');
2
+
3
+ module.exports = {
4
+ title: 'Product comparison card',
5
+ category: categories.card,
6
+ component: {
7
+ name: 'product-comparison-card',
8
+ folder: 'card'
9
+ },
10
+ preview: 'cards-three',
11
+ context: {
12
+ title: 'Zetasizer Pro',
13
+ description: 'The Zetasizer Pro is your go-to instrument to measure a wide range of sample types and concentrations.',
14
+ image: {
15
+ src: '/static/img/range-product-1.jpg',
16
+ alt: ''
17
+ },
18
+ features: [
19
+ {
20
+ icon: 'cross',
21
+ label: 'Classic 90° DLS'
22
+ },
23
+ {
24
+ icon: 'tick',
25
+ label: 'Dynamic light scattering'
26
+ },
27
+ {
28
+ icon: 'tick',
29
+ label: 'Static light scattering'
30
+ },
31
+ {
32
+ icon: 'tick',
33
+ label: 'Non-Invasive Back Scatter DLS'
34
+ },
35
+ {
36
+ icon: 'cross',
37
+ label: 'Multi-Angle Dynamic Light Scattering'
38
+ }
39
+ ],
40
+ footer: {
41
+ buttons: [
42
+ {
43
+ link: '#',
44
+ label: 'More details'
45
+ },
46
+ {
47
+ link: '#',
48
+ label: 'Request a quote'
49
+ }
50
+ ]
51
+ }
52
+ },
53
+ variants: [
54
+ {
55
+ title: 'Without features list',
56
+ preview: 'cards-three',
57
+ context: {
58
+ title: 'Zetasizer Pro',
59
+ description: 'The Zetasizer Pro is your go-to instrument to measure a wide range of sample types and concentrations.',
60
+ image: {
61
+ src: '/static/img/range-product-1.jpg',
62
+ alt: ''
63
+ },
64
+ features: [
65
+ ],
66
+ footer: {
67
+ buttons: [
68
+ {
69
+ link: '#',
70
+ label: 'More details'
71
+ },
72
+ {
73
+ link: '#',
74
+ label: 'Request a quote'
75
+ }
76
+ ]
77
+ }
78
+ },
79
+ }
80
+ ],
81
+ props: [
82
+ {
83
+ table: [
84
+ ['title', 'string'],
85
+ ['link', 'string'],
86
+ ['image', 'object', 'Image object']
87
+ ]
88
+ }
89
+ ]
90
+ }
@@ -0,0 +1,37 @@
1
+ {%- from "components/button/macro.njk" import button -%}
2
+ {%- from "components/twi/macro.njk" import twi -%}
3
+
4
+ <article class="mp c-product-comparison-card" role="article" aria-label="Product card">
5
+ <div class="c-product-comparison-card__body">
6
+ <h3 class="c-product-comparison-card__heading">{{ params.title }}</h3>
7
+ <p>{{ params.description }}</p>
8
+ {% if params.features | length %}
9
+ <p class="c-product-comparison-card__features-list-heading">Features include</p>
10
+ <ul class="c-product-comparison-card__features-list">
11
+ {% for feature in params.features %}
12
+ <li class="c-product-comparison-card__feature--{{ feature.icon }}">
13
+ {{ twi({
14
+ label: feature.label,
15
+ icon: feature.icon
16
+ }) }}
17
+ </li>
18
+ {% endfor %}
19
+ </ul>
20
+ {% endif %}
21
+ <footer class="c-product-comparison-card__footer">
22
+ {% if params.footer.buttons | length %}
23
+ {% for item in params.footer.buttons %}
24
+ {{ button({
25
+ link: item.link,
26
+ label: item.label,
27
+ colour: 'outline-green' if loop.index0 == 0 else 'green'
28
+ }) }}
29
+ {% endfor %}
30
+ {% endif %}
31
+ </footer>
32
+ </div>
33
+ <figure class="c-product-comparison-card__image">
34
+ <img src="{{ params.image.src }}" alt="{{ params.image.alt or params.title }}" />
35
+ </figure>
36
+ </article>
37
+
@@ -0,0 +1,74 @@
1
+ .c-product-comparison-card {
2
+ @extend .u-flow--2xs;
3
+ display: flex;
4
+ flex-flow: column;
5
+ border: 1px solid color('petrol', 'step-2');
6
+
7
+ & > * + * {
8
+ @include margin-top('2xs');
9
+ }
10
+
11
+ &__body {
12
+ @include padding('s-m');
13
+ display: flex;
14
+ flex-flow: column;
15
+ flex-grow: 1;
16
+
17
+ & > * + * {
18
+ @include margin-top('xs');
19
+ }
20
+ }
21
+
22
+ &__heading {
23
+ @extend .c-h;
24
+ @extend .c-h--step-1;
25
+ }
26
+
27
+ &__features-list {
28
+ @include margin-top('2xs');
29
+ list-style: none;
30
+
31
+ &-heading {
32
+ @include margin-top('s');
33
+ font-weight: weight("bold");
34
+ }
35
+
36
+ & > * + * {
37
+ @include margin-top('3xs');
38
+ }
39
+ }
40
+
41
+ &__feature {
42
+
43
+ &--tick {
44
+ svg {
45
+ color: color('green');
46
+ }
47
+ }
48
+
49
+ &--cross {
50
+ color: color('grey', 'step-2');
51
+ }
52
+ }
53
+
54
+ &__footer {
55
+ @include margin-top('auto');
56
+ @include padding-top('s');
57
+
58
+ & > * + * {
59
+ @include margin-top('2xs');
60
+ }
61
+ }
62
+
63
+ &__image {
64
+ height: 10em;
65
+ order: -1;
66
+ aspect-ratio: 16/9;
67
+
68
+ img {
69
+ height: 100%;
70
+ width: 100%;
71
+ object-fit: contain;
72
+ }
73
+ }
74
+ }
@@ -1,29 +1,25 @@
1
1
  {% from "components/component/component.njk" import c %}
2
2
 
3
- {% macro combobox(params, type = 'combobox') %}
4
- {{ c({ name: 'combobox', folder: 'input' }, params) }}
3
+ {% macro input(params) %}
4
+ {{ c({ name: 'input' }, params) }}
5
5
  {% endmacro %}
6
6
 
7
- {% macro checkbox(params, type = 'checkbox') %}
8
- {{ c({ name: 'checkbox', folder: 'input' }, params) }}
7
+ {% macro select(params) %}
8
+ {{ c({ name: 'select', folder: 'input' }, params) }}
9
9
  {% endmacro %}
10
10
 
11
- {% macro input(params) %}
12
- {{ c({ name: 'input' }, params) }}
11
+ {% macro textarea(params) %}
12
+ {{ c({ name: 'textarea', folder: 'input' }, params) }}
13
13
  {% endmacro %}
14
14
 
15
- {% macro radio(params) %}
16
- {{ c({ name: 'radio', folder: 'input' }, params) }}
15
+ {% macro checkbox(params, type = 'checkbox') %}
16
+ {{ c({ name: 'checkbox', folder: 'input' }, params) }}
17
17
  {% endmacro %}
18
18
 
19
- {% macro select(params) %}
20
- {{ c({ name: 'select', folder: 'input' }, params) }}
19
+ {% macro radio(params) %}
20
+ {{ c({ name: 'radio', folder: 'input' }, params) }}
21
21
  {% endmacro %}
22
22
 
23
23
  {% macro toggle(params, type='toggle') %}
24
24
  {{ c({ name: 'toggle', folder: 'input' }, params) }}
25
25
  {% endmacro %}
26
-
27
- {% macro textarea(params) %}
28
- {{ c({ name: 'textarea', folder: 'input' }, params) }}
29
- {% endmacro %}
@@ -8,7 +8,7 @@
8
8
 
9
9
  &:hover,
10
10
  &:focus {
11
- text-decoration: underline;
11
+ text-decoration: inherit;
12
12
  }
13
13
 
14
14
  svg {
@@ -1,7 +1,6 @@
1
1
  import Accordion from './imports/accordion';
2
2
  import Carousel from './imports/carousel';
3
3
  import ClearForm from './imports/clear-form';
4
- import Combobox from './imports/combobox';
5
4
  import Comparison from './imports/comparison';
6
5
  import Gallery from './imports/gallery';
7
6
  import HeroPattern from './imports/hero-pattern';
@@ -23,7 +22,6 @@ import Tabs from './imports/tabs';
23
22
  Accordion();
24
23
  Carousel();
25
24
  ClearForm();
26
- Combobox();
27
25
  Comparison();
28
26
  Gallery();
29
27
  HeroPattern();
@@ -0,0 +1,67 @@
1
+ .mp-dynamicform {
2
+ .c-form {
3
+ &__section {
4
+ padding: 36px;
5
+ padding: var(--space-l);
6
+ background: color('petrol', 'step-3');
7
+ }
8
+
9
+ &__section + &__section {
10
+ border-top: 2px solid color('white');
11
+ }
12
+
13
+ &__section-title {
14
+ letter-spacing: -.02em;
15
+ font-size: var(--step-3);
16
+ }
17
+
18
+ .c-label--required:after {
19
+ content: "*";
20
+ color: color('red');
21
+ padding: 0 2px;
22
+ position: relative;
23
+ top: -2px;
24
+ }
25
+ }
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;
36
+
37
+ &+ * {
38
+ flex: 1 0 148px;
39
+ }
40
+ }
41
+
42
+ &--messages {
43
+ row-gap: 0;
44
+ margin-top: 0;
45
+
46
+ p {
47
+ @include margin-top('2xs');
48
+ letter-spacing: -.01em;
49
+ font-size: var(--step--1);
50
+ }
51
+ }
52
+ }
53
+
54
+ .c-input__spacer {
55
+ height: 0;
56
+ flex-basis: 148px;
57
+ }
58
+
59
+ .c-input--select {
60
+ cursor: pointer;
61
+ }
62
+
63
+ .c-checkbox + label,
64
+ .c-radio + label {
65
+ display: inline-block;
66
+ }
67
+ }
@@ -4,6 +4,8 @@
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/industry-card.scss';
8
+ @import '~comp/card/product-comparison-card.scss';
7
9
  @import '~comp/comparison-table/comparison-table.scss';
8
10
  @import '~comp/embed/embed.scss';
9
11
  @import '~comp/featured-article-card/featured-article-card.scss';
@@ -14,7 +16,6 @@
14
16
  @import '~comp/header/header.scss';
15
17
  @import '~comp/hero/hero.scss';
16
18
  @import '~comp/icon/icon.scss';
17
- @import '~comp/industry-card/industry-card.scss';
18
19
  @import '~comp/input/input.scss';
19
20
  @import '~comp/input/radio.scss';
20
21
  @import '~comp/input/toggle.scss';
@@ -34,5 +35,6 @@
34
35
  @import '~comp/twi/twi.scss';
35
36
  @import '~comp/usp/usp.scss';
36
37
 
38
+ @import './form.scss';
37
39
  @import './headings.scss';
38
40
  @import './lightbox.scss';
@@ -163,6 +163,9 @@
163
163
  .u-margin-top-0 {
164
164
  margin-top: 0;
165
165
  }
166
+ .u-margin-top-auto {
167
+ margin-top: auto;
168
+ }
166
169
  .u-margin-top-2xs {
167
170
  @include margin-top('2xs');
168
171
  }
package/src/brand/logo.md CHANGED
@@ -6,9 +6,14 @@ tags: brand
6
6
  version: 1.0.0
7
7
  status: 'Ready'
8
8
  ---
9
+ <br>
9
10
 
10
11
  {% button 'Download the logo' '/static/zip/MP_logo.zip' %}
11
12
 
13
+ ---
14
+
15
+ ## Basic use
16
+
12
17
  The Malvern Panalytical logo is available in three formats:
13
18
 
14
19
  - Standard, with the text alongside the 'X' brandmark;
@@ -30,6 +35,8 @@ The Malvern Panalytical logo is available in three formats:
30
35
  </figure>
31
36
  </div>
32
37
 
38
+ ---
39
+
33
40
  ## Spacing
34
41
  Where it is used in close proximity to other design elements the logo must be separated from them by, at least, multiples of the height of the uppercase M in the word Malvern:
35
42
 
@@ -47,11 +54,13 @@ Where it is used in close proximity to other design elements the logo must be se
47
54
  </figure>
48
55
  </div>
49
56
 
57
+ ---
58
+
50
59
  ## Colors
51
- The Malvern Panalytical logo may also be used in a single color black or white to achieve maximum contrast and legibility.
60
+ The logo may be used in a single color black or white to achieve maximum contrast and legibility.
52
61
 
53
62
  <div class="o-grid o-grid--of-two">
54
- <figure style="max-width:320px">
63
+ <figure style="max-width:320px">
55
64
  <figcaption>Single color black</figcaption>
56
65
  <img src="/static/svg/logo-black.svg" alt="Malvern Panalytical logo, black variant">
57
66
  </figure>
@@ -61,22 +70,21 @@ The Malvern Panalytical logo may also be used in a single color black or white t
61
70
  </figure>
62
71
  </div>
63
72
 
64
- The Malvern Panalytical logo may also be used on dark backgrounds with the wordmark and strapline in white to achieve maximum contrast and legibility.
73
+ The logo may also be used on dark backgrounds with the wordmark and strapline in white to achieve maximum contrast and legibility.
65
74
 
66
75
  <figure style="max-width:640px">
67
76
  <figcaption>Colour logo on dark background</figcaption>
68
77
  <img src="/static/svg/logo-color-white-text.svg" alt="Malvern Panalytical logo with white text on a dark background">
69
78
  </figure>
70
79
 
71
- {% alert 'warning' %}
72
- - **Do not** alter the proportion of the Malvern Panalytical logo in any way.
73
- - **Do not** attempt to recreate the Malvern Panalytical logo.
74
- - **Ask** Marketing for a copy, suited to your requirements.
75
- - The arms of the 'X' brandmark must be at 90&deg; to each other. You can use the corner of a sheet of paper, diagonally against the top of the 'X' mark, to check if the logo is in proportion.
76
- {% endalert %}
80
+ ---
77
81
 
78
- ## Cropping
82
+ ## Strapline
83
+ The strapline "a Spectris company" is part of the logo and must be included. It may only be removed if it's not readable: e.g. on a digital screen if the logo is so small that there are not enough pixels to resolve the text, or in a print application if the substrate is too textured to allow a clear print.
84
+
85
+ ---
79
86
 
87
+ ## Cropping
80
88
  <figure style="max-width:640px">
81
89
  <img src="/static/svg/crop-diagram-1.svg" alt="Cropping the brandmark: 'X' brandmark is cropped 7% top and bottom when used in a color bar">
82
90
  </figure>
@@ -89,4 +97,11 @@ Ensure that the three colors of the brandmark are visible at all times.
89
97
 
90
98
  <figure style="max-width:640px">
91
99
  <img src="/static/svg/crop-diagram-2.svg" alt="Cropping the brandmark: shows maximum and minimum horizontal crop sizes">
92
- </figure>
100
+ </figure>
101
+
102
+ {% alert 'warning' %}
103
+ - **Do not** alter the proportion of the Malvern Panalytical logo in any way.
104
+ - **Do not** attempt to recreate the Malvern Panalytical logo.
105
+ - **Ask** Marketing for a copy, suited to your requirements.
106
+ - The arms of the 'X' brandmark must be at 90&deg; to each other. You can use the corner of a sheet of paper, diagonally against the top of the 'X' mark, to check if the logo is in proportion.
107
+ {% endalert %}
@@ -3,12 +3,18 @@ title: Patterns
3
3
  layout: content-page
4
4
  sidebar: brand
5
5
  tags: brand
6
- version: 1.0.0
6
+ version: 1.1.0
7
7
  status: 'Ready'
8
8
  ---
9
9
  {% from "components/header/macro.njk" import header %}
10
+ {% from "components/button/macro.njk" import button %}
10
11
 
11
12
  <p>We can make our digital designs a bit more visually appealing by adding background patterns and decorative gradients.</p>
13
+ <p>The patterns designs are available to download in SVG format here:</p>
14
+
15
+ {% button 'Download SVG patterns', '/static/zip/SVG_patterns.zip' %}
16
+
17
+ <h2>Examples</h2>
12
18
 
13
19
  <div class="o-grid xo-grid--of-two">
14
20
  <div class="c-slat c-slat--concentric vh50 u-bg-blue-step-3">
@@ -7,7 +7,7 @@ tags: prototype
7
7
  {% from "components/prose/macro.njk" import prose %}
8
8
  {% from "components/signpost/macro.njk" import signpost %}
9
9
  {% from "components/button/macro.njk" import button %}
10
- {% from "components/industry-card/macro.njk" import industryCard %}
10
+ {% from "components/card/macro.njk" import industryCard %}
11
11
  {% from "components/campaign/macro.njk" import campaign %}
12
12
  {% from "components/card/macro.njk" import card %}
13
13
  {% from "components/option-list/macro.njk" import optionList %}
@@ -15,7 +15,7 @@ tagTitle: Industry
15
15
  {% from "components/card/macro.njk" import card %}
16
16
  {% from "components/hero/macro.njk" import hero %}
17
17
  {% from "components/prose/macro.njk" import prose, markdown %}
18
- {% from "components/industry-card/macro.njk" import industryCard %}
18
+ {% from "components/card/macro.njk" import industryCard %}
19
19
  {% from "components/accordion/macro.njk" import accordion %}
20
20
 
21
21
  {% set siteNav %}{% include "navigation/corporate.njk" %}{% endset %}
Binary file
@@ -1,16 +0,0 @@
1
- module.exports = {
2
- title: 'Dynamic form',
3
- component: {
4
- name: 'dynamic-form'
5
- },
6
- context: {
7
- label: 'Find the perfect event for you'
8
- },
9
- props: [
10
- {
11
- table: [
12
- ['label', 'string', 'Label the input']
13
- ]
14
- }
15
- ]
16
- }