mp-design-system 1.2.12 → 1.2.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. package/dist/build/js/app.js.map +1 -1
  2. package/dist/build/scss/library.css +1 -1
  3. package/dist/build/scss/library.css.map +1 -1
  4. package/dist/build/scss/main.css +1 -1
  5. package/dist/build/scss/main.css.map +1 -1
  6. package/package.json +1 -1
  7. package/src/_includes/components/card/card.njk +2 -2
  8. package/src/_includes/components/card/card.scss +38 -0
  9. package/src/_includes/components/card/product-comparison-card.scss +2 -0
  10. package/src/_includes/components/comparison-table/comparison-table.config.js +10 -10
  11. package/src/_includes/components/comparison-table/comparison-table.njk +1 -1
  12. package/src/_includes/components/comparison-table/comparison-table.scss +1 -0
  13. package/src/_includes/components/component/preview-default.njk +1 -1
  14. package/src/_includes/components/hero/hero.njk +4 -5
  15. package/src/_includes/components/input/radio.scss +65 -25
  16. package/src/_includes/components/internal-nav/internal-nav.config.js +1 -1
  17. package/src/_includes/components/internal-nav/internal-nav.scss +1 -0
  18. package/src/assets/scss/components/index.scss +1 -1
  19. package/src/assets/scss/components/product-finder.scss +66 -0
  20. package/src/assets/scss/objects/grid.scss +6 -0
  21. package/src/components-full-pages.njk +1 -1
  22. package/src/components-pages.njk +1 -1
  23. package/src/index.njk +75 -12
  24. package/src/prototype/range.njk +161 -40
  25. package/src/prototype/webinars-3-2-1.njk +43 -1
  26. package/src/_includes/components/card/event-series-card.config.js +0 -36
  27. package/src/_includes/components/card/event-series-card.njk +0 -45
  28. package/src/_includes/components/card/event-series-card.scss +0 -57
  29. package/src/_includes/components/dynamic-form/dynamic-form.config.js +0 -16
  30. package/src/_includes/components/dynamic-form/dynamic-form.njk +0 -319
  31. package/src/_includes/components/dynamic-form/dynamic-form.scss +0 -77
  32. package/src/_includes/components/dynamic-form/macro.njk +0 -5
  33. package/src/_includes/components/input/combobox.njk +0 -17
  34. package/src/_includes/components/input/combobox.scss +0 -31
  35. package/src/_includes/components/input/combox.config.js +0 -49
  36. package/src/assets/js/imports/combobox.js +0 -66
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-design-system",
3
- "version": "1.2.12",
3
+ "version": "1.2.14",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "npm-run-all --parallel bundle:*",
@@ -72,14 +72,14 @@
72
72
  <div class="c-card__primary">
73
73
  {% if header %}
74
74
  <header class="c-card__header u-flow--2xs">
75
- {% if hasDate and not isInPast and hasFormat == false %}
75
+ {% if hasDate and not isInPast and not hasFormat %}
76
76
  <time class="c-card__datetime">
77
77
  <span class="c-card__day">{{ header.date.date.getDate() }} </span>
78
78
  <span class="c-card__month">{{ header.date.date.getMonth() | months }}</span>
79
79
  </time>
80
80
  {% endif %}
81
81
 
82
- {% if hasDate and hasFormat == true %}
82
+ {% if hasDate and hasFormat %}
83
83
  <time class="c-card__datetime">
84
84
  <span>{{ header.date.date }}</span>
85
85
  </time>
@@ -448,6 +448,44 @@
448
448
  }
449
449
  }
450
450
  }
451
+
452
+ &--event-series {
453
+ box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 20%);
454
+
455
+ .c-card__image img {
456
+ max-height: 252px;
457
+ aspect-ratio: 2/1;
458
+ object-fit: cover;
459
+ }
460
+
461
+ .c-card__wrapper,
462
+ .c-card__primary {
463
+ height: 100%;
464
+ }
465
+
466
+ .c-card__primary {
467
+ flex-shrink: 1;
468
+ }
469
+
470
+ .c-card__header > * + * {
471
+ @include margin('s', 0, 0, 0);
472
+ }
473
+
474
+ .c-card__datetime {
475
+ font-size: var(--step--1);
476
+ font-weight: normal;
477
+ }
478
+
479
+ .c-card__title {
480
+ font-size: var(--step-0);
481
+ }
482
+
483
+ .c-card__footer .u-link,
484
+ .c-card__footer .u-link svg {
485
+ color: color('utility-blue', 'step-1');
486
+ font-size: var(--step--1);
487
+ }
488
+ }
451
489
  }
452
490
 
453
491
  .grid-view > .c-card--event.c-card--has-image .c-card__wrapper {
@@ -1,7 +1,9 @@
1
1
  .c-product-comparison-card {
2
2
  @extend .u-flow--2xs;
3
+ background: color('white');
3
4
  display: flex;
4
5
  flex-flow: column;
6
+ flex-grow: 1;
5
7
  border: 1px solid color('petrol', 'step-2');
6
8
 
7
9
  & > * + * {
@@ -1,6 +1,11 @@
1
1
  const products = [
2
2
  {
3
3
  title: 'Mastersizer 3000',
4
+ image: {
5
+ src: '/static/img/range-product-1.jpg',
6
+ alt: 'Mastersizer 3000'
7
+ },
8
+ description: 'Delivering the data you need for outcomes you can trust',
4
9
  buttons: [
5
10
  {
6
11
  link: '#',
@@ -11,11 +16,6 @@ const products = [
11
16
  label: 'Request a quote'
12
17
  }
13
18
  ],
14
- image: {
15
- src: '/static/img/range-product-1.jpg',
16
- alt: 'Mastersizer 3000'
17
- },
18
- description: 'Delivering the data you need for outcomes you can trust',
19
19
  sections: [
20
20
  ['Laser diffraction', '0.01µm - 3500µm'],
21
21
  [true, true, true, false],
@@ -25,6 +25,11 @@ const products = [
25
25
  },
26
26
  {
27
27
  title: 'Mastersizer 3000E',
28
+ image: {
29
+ src: '/static/img/range-product-2.jpg',
30
+ alt: 'Mastersizer 3000E'
31
+ },
32
+ description: 'Entry level particle size analyzer',
28
33
  buttons: [
29
34
  {
30
35
  link: '#',
@@ -35,11 +40,6 @@ const products = [
35
40
  label: 'Request a quote'
36
41
  }
37
42
  ],
38
- image: {
39
- src: '/static/img/range-product-2.jpg',
40
- alt: 'Mastersizer 3000E'
41
- },
42
- description: 'Entry level particle size analyzer',
43
43
  sections: [
44
44
  ['Laser diffraction', '0.1µm - 1000µm'],
45
45
  [false, false, true, true],
@@ -1,7 +1,7 @@
1
1
  {% from "components/button/macro.njk" import button %}
2
2
  {% from "components/icon/macro.njk" import icon %}
3
3
 
4
- <section id="product-comparison-table" class="mp u-bg-grey-step-3 u-pad-bottom-l">
4
+ <section id="product-comparison-table" class="mp u-bg-grey-step-3 u-pad-y-xl" style="scroll-margin-top:70px">
5
5
  <div class="c-comparison-table__mobile u-wrap"></div>
6
6
  <div class="c-comparison-table__desktop u-wrap">
7
7
  <table class="c-comparison-table">
@@ -52,6 +52,7 @@
52
52
  @include space('max-height', '3xl');
53
53
  @include margin(0, 'auto');
54
54
  object-fit: contain;
55
+ mix-blend-mode: multiply;
55
56
  }
56
57
 
57
58
  p {
@@ -1,3 +1,3 @@
1
- <div class="u-pad-m">
1
+ <div class="mp u-pad-m">
2
2
  {{ comp | safe }}
3
3
  </div>
@@ -1,4 +1,4 @@
1
- {% from "components/twi/macro.njk" import twi %}
1
+ {% from "components/button/macro.njk" import button %}
2
2
  {% from "components/breadcrumb/macro.njk" import breadcrumb %}
3
3
  {% from "components/button/macro.njk" import button %}
4
4
  {% from "components/icon/macro.njk" import icon %}
@@ -33,12 +33,11 @@
33
33
  </header>
34
34
 
35
35
  {% if params.cta %}
36
- {{ twi({
36
+ {{ button({
37
37
  link: params.cta.link,
38
+ inline: true,
38
39
  label: params.cta.label,
39
- classes: 'u-link',
40
- icon: params.cta.icon or 'arrow-right',
41
- attrs: params.cta.attrs
40
+ color: 'green'
42
41
  }) }}
43
42
  {% endif %}
44
43
  </div>
@@ -2,8 +2,8 @@
2
2
  .c-checkbox {
3
3
  @extend .u-hidden;
4
4
 
5
- & + label,
6
- & + input[type=hidden] + label {
5
+ &+label,
6
+ &+input[type=hidden]+label {
7
7
  @include padding-left('l');
8
8
  position: relative;
9
9
  @include step(-1);
@@ -23,33 +23,70 @@
23
23
  }
24
24
  }
25
25
 
26
- &:focus + label:before,
27
- &:focus + input[type=hidden] + label:before {
26
+ &:focus+label:before,
27
+ &:focus+input[type=hidden]+label:before {
28
28
  outline: 2px solid;
29
29
  }
30
30
 
31
31
  &[disabled],
32
32
  [disabled] & {
33
- & + label:before {
33
+ &+label:before {
34
34
  background-color: color('petrol', 'step-2');
35
35
  cursor: not-allowed;
36
36
  opacity: 0.6;
37
37
 
38
38
  }
39
- &:hover + label:before {
39
+
40
+ &:hover+label:before {
40
41
  background-color: color('petrol', 'step-2');
41
42
  }
42
43
  }
44
+
45
+
46
+ &--box {
47
+ &+label {
48
+ @include padding('s');
49
+ height: 100%;
50
+ width: 100%;
51
+ background: color('white');
52
+ display: flex;
53
+ align-items: center;
54
+ justify-content: center;
55
+ border-radius: 6px;
56
+ text-align: center;
57
+ font-weight: 700;
58
+ word-break: break-word;
59
+
60
+ &:before,
61
+ &:after {
62
+ display: none;
63
+ }
64
+ }
65
+
66
+ &:checked+label {
67
+ background: color('blue');
68
+ color: color('white');
69
+ }
70
+
71
+ &[disabled]+label {
72
+ background: color('grey', 'step-3');
73
+ color: color('grey', 'step-1');
74
+ border: 1px solid color('grey', 'step-2');
75
+ cursor: not-allowed;
76
+ }
77
+ }
78
+
43
79
  }
44
80
 
45
81
  .c-checkbox {
46
- &:checked + label:before,
47
- &:checked + input[type=hidden] + label:before {
82
+
83
+ &:checked+label:before,
84
+ &:checked+input[type=hidden]+label:before {
48
85
  background: color('utility-blue');
49
86
  }
50
-
51
- &:checked + label:after,
52
- &:checked + input[type=hidden] + label:after {
87
+
88
+ &:checked+label:after,
89
+ &:checked+input[type=hidden]+label:after {
53
90
  transform: translateX(6.5px) translateY(-1.5px) translateY(-50%) rotate(45deg);
54
91
  position: absolute;
55
92
  content: '';
@@ -64,38 +101,41 @@
64
101
 
65
102
  .c-radio,
66
103
  .c-checkbox {
67
- & + label:hover:before,
68
- & + input[type=hidden] + label:hover:before {
69
- background-color: color('utility-blue','step-3');
104
+
105
+ &+label:hover:before,
106
+ &+input[type=hidden]+label:hover:before {
107
+ background-color: color('utility-blue', 'step-3');
70
108
  }
71
109
  }
72
110
 
73
- .c-checkbox {
74
- &:checked + label:hover:before,
75
- &:checked + input[type=hidden] + label:hover:before {
111
+ .c-checkbox {
112
+
113
+ &:checked+label:hover:before,
114
+ &:checked+input[type=hidden]+label:hover:before {
76
115
  background: color('utility-blue', 'step--1');
77
116
  }
78
117
  }
79
118
 
80
119
  .c-radio {
81
- & + label:before,
82
- & + input[type=hidden] + label:before {
120
+
121
+ &+label:before,
122
+ &+input[type=hidden]+label:before {
83
123
  border-radius: 100%;
84
124
  }
85
125
 
86
- &:checked + label:before,
87
- &:checked + input[type=hidden] + label:before {
126
+ &:checked+label:before,
127
+ &:checked+input[type=hidden]+label:before {
88
128
  box-shadow: inset 0 0 0 5px color('utility-blue');
89
129
  }
90
-
91
- &:checked + label:hover:before,
92
- &:checked + input[type=hidden] + label:hover:before {
130
+
131
+ &:checked+label:hover:before,
132
+ &:checked+input[type=hidden]+label:hover:before {
93
133
  box-shadow: inset 0 0 0 5px color('utility-blue', 'step--1');
94
134
  }
95
135
  }
96
136
 
97
137
  .c-off-canvas .c-checkbox-group {
98
- &> * {
138
+ &>* {
99
139
  width: 100%;
100
140
  margin-left: 0;
101
141
  }
@@ -22,7 +22,7 @@ module.exports = {
22
22
  links: [
23
23
  { link: '#overview', label: 'Overview' },
24
24
  { link: '#products', label: 'Products' },
25
- { link: '#compare', label: 'Compare' },
25
+ { link: '#product-comparison-table', label: 'Compare' },
26
26
  ],
27
27
  button: {
28
28
  link: '#',
@@ -5,6 +5,7 @@
5
5
 
6
6
  &--stuck {
7
7
  @extend .u-bg-white;
8
+ z-index: 9999;
8
9
 
9
10
  .c-internal-nav__title {
10
11
  opacity: 1;
@@ -4,7 +4,6 @@
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/event-series-card.scss';
8
7
  @import '~comp/card/industry-card.scss';
9
8
  @import '~comp/card/product-comparison-card.scss';
10
9
  @import '~comp/comparison-table/comparison-table.scss';
@@ -39,3 +38,4 @@
39
38
  @import './form.scss';
40
39
  @import './headings.scss';
41
40
  @import './lightbox.scss';
41
+ @import './product-finder.scss';
@@ -0,0 +1,66 @@
1
+ .c-product-finder {
2
+ &__panel {
3
+ background: color('petrol', 'step-3');
4
+ @include padding('xl-2xl', 'm-xl');
5
+ position: relative;
6
+
7
+ &--intro {
8
+ background: radial-gradient(circle at top right, color('petrol', 'step-3') 0%, color('petrol', 'step-3') 30%, color('blue', 'step-2') 100%);
9
+ }
10
+
11
+ &:after {
12
+ content: '';
13
+ position: absolute;
14
+ width: 0;
15
+ height: 0;
16
+ border-style: solid;
17
+ @include space('border-width', 'xl', 'xl', 0, 0);
18
+ border-color: transparent color('white') transparent transparent;
19
+ bottom: 0;
20
+ right: 0;
21
+ display: none;
22
+ }
23
+
24
+ @media (min-width: 48em) {
25
+ &:after {
26
+ display: block;
27
+ }
28
+ }
29
+ }
30
+
31
+ &__result {
32
+ display: flex;
33
+ flex-flow: column;
34
+ flex: 1;
35
+ @include flow('s');
36
+
37
+ &>.c-h {
38
+ font-size: var(--step--1);
39
+ text-transform: uppercase;
40
+ }
41
+
42
+ &--upgrade {
43
+ &>.c-h {
44
+ color: color('petrol');
45
+
46
+ @supports(-webkit-text-fill-color:transparent) {
47
+ background-image: linear-gradient(to right, color('petrol'), color('blue'));
48
+ -webkit-background-clip: text;
49
+ -webkit-text-fill-color: transparent;
50
+ display: inline-block;
51
+
52
+ &::selection {
53
+ -webkit-background-clip: none;
54
+ }
55
+ }
56
+ }
57
+
58
+ .c-product-comparison-card {
59
+ border: 1px solid;
60
+ border-image-slice: 1;
61
+ border-image-source: linear-gradient(to right, rgba(color('blue'), 0.5), rgba(color('green'), 0.5));
62
+ }
63
+ }
64
+
65
+ }
66
+ }
@@ -72,6 +72,12 @@ $grid-gutter-width: 36;
72
72
  }
73
73
  }
74
74
 
75
+ &--of-two-switch {
76
+ @media (min-width: 40em) {
77
+ @include o-grid(2);
78
+ }
79
+ }
80
+
75
81
  &--of-two-late {
76
82
  @media (min-width: 55em) {
77
83
  @include o-grid(2)
@@ -6,7 +6,7 @@ pagination:
6
6
  permalink: "components/full/{{ component.slug }}/"
7
7
  title: 'Components'
8
8
  renderData:
9
- title: "{{ component.title }}"
9
+ title: '{{ component.title }}'
10
10
  ---
11
11
 
12
12
  {% extends "layout.njk" %}
@@ -7,7 +7,7 @@ permalink: "components/{{ component.slug }}/"
7
7
  title: "Components"
8
8
  sidebar: components
9
9
  renderData:
10
- title: "{{ component.title }}"
10
+ title: '{{ component.title }}'
11
11
  ---
12
12
 
13
13
  {% extends "library.njk" %}
package/src/index.njk CHANGED
@@ -8,10 +8,74 @@ renderData:
8
8
  ---
9
9
 
10
10
  {% from "components/prose/macro.njk" import markdown %}
11
- {% from "components/card/macro.njk" import card %}
12
- {% from "components/usp/macro.njk" import usp %}
11
+ {% from "components/product-signpost/macro.njk" import productSignpost %}
12
+
13
+ <div class="o-grid o-grid--of-two u-margin-bottom-l-xl">
14
+ <div class="u-flow u-pad-right-l">
15
+ <h2 class="c-usp__title">For developers</h2>
16
+ <p>If you're developing a web site or app, start here.</p>
17
+ <ul class="o-grid o-grid--of-two">
18
+ {{ productSignpost ({
19
+ title: 'Getting started',
20
+ description: '<p>Using the Franklin design system</p>',
21
+ link: '/components',
22
+ classes: 'c-product-signpost--bordered'
23
+ }) }}
24
+ {{ productSignpost ({
25
+ title: 'Installation',
26
+ description: '<p>How to consume our CSS & JS via NPM</p>',
27
+ link: '/components/installation',
28
+ classes: 'c-product-signpost--bordered'
29
+ }) }}
30
+ {{ productSignpost ({
31
+ title: 'Component library',
32
+ description: '<p>Styles and reusable building blocks</p>',
33
+ link: '/components',
34
+ classes: 'c-product-signpost--bordered'
35
+ }) }}
36
+ {{ productSignpost ({
37
+ title: 'Grid system',
38
+ description: '<p>How to lay out pages and screens</p>',
39
+ link: '/components/grid',
40
+ classes: 'c-product-signpost--bordered'
41
+ }) }}
42
+ </ul>
43
+ </div>
44
+ <div class="u-flow u-pad-left-l">
45
+ <h2 class="c-usp__title">For non-developers</h2>
46
+ <p>Not writing code? Start here.</p>
47
+ <ul class="o-grid o-grid--of-two">
48
+ {{ productSignpost ({
49
+ title: 'Quick start guide',
50
+ description: '<p>The basics of Malvern Panalytical\'s visual style</p>',
51
+ link: '/quickstart',
52
+ classes: 'c-product-signpost--bordered'
53
+ }) }}
54
+ {{ productSignpost ({
55
+ title: 'Color',
56
+ description: '<p>The Malvern Panalytical brand color palette</p>',
57
+ link: '/brand/colors',
58
+ classes: 'c-product-signpost--bordered'
59
+ }) }}
60
+ {{ productSignpost ({
61
+ title: 'Typography',
62
+ description: '<p>Our guidelines for fonts, weights, and spacing</p>',
63
+ link: '/brand/typography',
64
+ classes: 'c-product-signpost--bordered'
65
+ }) }}
66
+ {{ productSignpost ({
67
+ title: 'Tone of voice',
68
+ description: '<p>Make your writing clearer, simpler, and more inspiring</p>',
69
+ link: '/content',
70
+ classes: 'c-product-signpost--bordered'
71
+ }) }}
72
+ </ul>
73
+ </div>
74
+ </div>
75
+
13
76
 
14
- <div class="o-grid o-grid--of-four">
77
+
78
+ {# <div class="o-grid o-grid--of-four">
15
79
  {{ card({
16
80
  theme: {
17
81
  layout: 'single',
@@ -91,7 +155,7 @@ renderData:
91
155
  }
92
156
  }
93
157
  }) }}
94
- </div>
158
+ </div> #}
95
159
 
96
160
  {% set content %}
97
161
 
@@ -99,20 +163,20 @@ renderData:
99
163
 
100
164
  Franklin is Malvern Panalytical's **design system** for web-based marketing materials.
101
165
 
102
- ## What's a design system?
166
+ #### What's a design system?
103
167
 
104
168
  A set of brand guidelines and a library of HTML/CSS/JS components. Using this system is the quickest and easiest way to ensure your website or web-app is on brand.
105
169
 
106
170
  The [Design Systems Handbook](https://www.designbetter.co/design-systems-handbook) by InVision is a great (free) way to learn more about design systems.
107
171
 
108
- ## Are there other design systems in use?
172
+ #### Are there other design systems in use?
109
173
 
110
174
  There are two other design systems in use at Malvern Panalytical.
111
175
 
112
176
  - [Sencillo](https://confluence.systems.mp/pages/viewpage.action?spaceKey=FA&title=MP+Sencillo+-+Design+System) (pronounced *sehn-see-yoh*) is a design system used in Smart Manager, Agrilytics, and other web-based customer-facing software applications.
113
177
  - [Malvern Panalytical User Interface Guidelines](https://malvern.sharepoint.com/sites/o365-sw-ebl/SitePages/User%20Interface%20Guidelines/Malvern-Panalytical-User-Interface-Guidelines.aspx) (also known as the XBL) is the Design System that is used in our desktop software, including the new OmniTrust. At the time of writing, it hasn't been rolled out to all platforms but it should be the go to Design System for any new software that we create for our products. It is also backed up with a reusable framework that provides the styles and controls within a fixed layout base application.
114
178
 
115
- ## Where does Franklin come in?
179
+ #### Where does Franklin come in?
116
180
 
117
181
  <div class="ds-table c-table c-table--responsive">
118
182
 
@@ -130,12 +194,11 @@ There are two other design systems in use at Malvern Panalytical.
130
194
 
131
195
  {% set latest %}
132
196
  ## Latest updates
133
- ##### V1.1.0 - June 2023
197
+ ##### V1.2.13 - November 2023
134
198
 
135
- - Add off-canvas pattern for mobile
136
- - Update disabled input styles
137
- - Add header component variants: blog and store
138
- - Misc. fixes
199
+ - New [product comparison cards](/components/product-comparison-card)
200
+ - New ["Sticky" internal nav](/components/internal-nav-sticky-on-scroll)
201
+ - Updated [comparison table](/components/comparison-table) design
139
202
  {% endset %}
140
203
 
141
204
  <div class="o-grid o-grid--layout o-grid--8/4">