mp-design-system 0.6.3 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. package/dist/build/js/app.js +9 -5
  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 +1 -1
  8. package/src/_includes/components/button/button.njk +1 -1
  9. package/src/_includes/components/campaign/campaign.config.js +3 -3
  10. package/src/_includes/components/card/card.scss +4 -14
  11. package/src/_includes/components/comparison-table/comparison-table.scss +5 -0
  12. package/src/_includes/components/hero/hero.config.js +26 -2
  13. package/src/_includes/components/hero/hero.njk +23 -1
  14. package/src/_includes/components/hero/hero.scss +34 -0
  15. package/src/_includes/components/industry-card/industry-card.njk +2 -2
  16. package/src/_includes/components/industry-card/industry-card.scss +4 -4
  17. package/src/_includes/components/meta-box/meta-box.scss +5 -1
  18. package/src/_includes/components/table/table.config.js +12 -0
  19. package/src/_includes/components/table/table.njk +8 -2
  20. package/src/_includes/includes/related-events.njk +1 -1
  21. package/src/_includes/includes/resources.njk +1 -1
  22. package/src/_includes/layout.njk +28 -4
  23. package/src/assets/js/app.js +6 -2
  24. package/src/assets/js/imports/hero-video.js +34 -0
  25. package/src/assets/js/imports/scrollbar-width.js +15 -0
  26. package/src/assets/js/imports/utilities.js +10 -0
  27. package/src/assets/scss/components/gallery.scss +16 -68
  28. package/src/assets/scss/components/index.scss +1 -0
  29. package/src/assets/scss/components/lightbox.scss +62 -0
  30. package/src/assets/scss/library.scss +6 -2
  31. package/src/assets/scss/objects/grid.scss +0 -1
  32. package/src/assets/scss/tools/breakout.scss +2 -0
  33. package/src/assets/scss/utilities/display.scss +6 -4
  34. package/src/assets/scss/utilities/hr.scss +4 -0
  35. package/src/assets/scss/utilities/index.scss +4 -0
  36. package/src/components/utilities.md +47 -4
  37. package/src/patterns/grid-of-cards.njk +57 -21
  38. package/src/prototype/index.njk +1 -1
@@ -26,7 +26,6 @@ $grid-gutter-width: 36;
26
26
  display: flex;
27
27
  flex-wrap: wrap;
28
28
  justify-content: stretch;
29
- align-items: flex-start;
30
29
  margin-bottom: calc(-1 * #{space-unit()});
31
30
  margin-bottom: calc(-1 * var(--gutter));
32
31
  width: 100%;
@@ -3,9 +3,11 @@
3
3
 
4
4
  @mixin breakout($pad: 0) {
5
5
  left: 50%;
6
+ left: calc( 50% + var(--scrollbarWidth)/2.0001 );
6
7
  position: relative;
7
8
  transform: translateX(-50vw);
8
9
  width: 100vw;
10
+ width: calc( 100vw - var(--scrollbarWidth) );
9
11
  padding-left: safe-space($pad);
10
12
  padding-right: safe-space($pad);
11
13
  }
@@ -109,10 +109,12 @@
109
109
  @include gap("s-l");
110
110
  }
111
111
 
112
- .u-16\/9 {
113
- height: 0;
114
- padding-bottom: 56.25%;
115
- position: relative;
112
+ @supports (object-fit: cover) {
113
+ .u-2\/1 {
114
+ aspect-ratio: 2 / 1;
115
+ object-fit: cover;
116
+ object-position: 75% 50%;
117
+ }
116
118
  }
117
119
 
118
120
  @media (min-width: 640px) {
@@ -12,4 +12,8 @@
12
12
 
13
13
  .u-border {
14
14
  border: 1px solid color('petrol', 'step-2');
15
+ }
16
+
17
+ .o-prose hr {
18
+ @extend .u-hr
15
19
  }
@@ -1,3 +1,5 @@
1
+ html body {
2
+
1
3
  @import './typography.scss';
2
4
  @import './link.scss';
3
5
  @import './colour.scss';
@@ -9,3 +11,5 @@
9
11
  @import './hr.scss';
10
12
  @import './ellipsis.scss';
11
13
  @import './scroll-shadows.scss';
14
+
15
+ }
@@ -63,17 +63,60 @@ More typography utility classes are documented on the [typography page](/compone
63
63
  ```
64
64
 
65
65
  ```html
66
- <div class="u-sticky">Sticky positioning at the top of the viewport</div>
66
+ <p class="u-sticky">This will "stick" to the top of the screen while scrolling</p>
67
67
  ```
68
68
 
69
69
  ```html
70
- <div class="u-sticky--gutter">Sticky positioning with gutter spacing</div>
70
+ <div class="u-sticky--gutter">Sticky positioning, with a gap above</div>
71
71
  ```
72
72
 
73
73
  ```html
74
74
  <div class="u-split">
75
- <h2>Webinars and events</h2>
76
- <a href>View all</a>
75
+ <p>Split: aligned left</p>
76
+ <a class="u-link">Aligned right</a>
77
77
  </div>
78
78
  The two child items will be aligned in a horizontal row
79
+ ```
80
+ <div class="u-split u-pad-s u-border">
81
+ <p>Split: aligned left</p>
82
+ <a class="u-link">Aligned right</a>
83
+ </div>
84
+
85
+ ## Padding and margins
86
+
87
+ More padding and margin utility classes are documented on the [space page](/components/space).
88
+
89
+ #### Syntax:
90
+ `u`-`(pad or margin)`-`(optional direction)`-`(size)`-`(optional flex size)`
91
+
92
+ Sizes | Directions
93
+ ------|-----------
94
+ 3xs | top
95
+ 2xs | bottom
96
+ xs | left
97
+ s | right
98
+ m | y
99
+ l | x
100
+ xl |
101
+ 2xl |
102
+ 3xl |
103
+ 4xl |
104
+
105
+ N.B. Not all permutations are available in the existing CSS, as that would amount to over 4800 extra lines of code. Currently we've only implemented a handful - but we can add more as needed.
106
+
107
+ ```html
108
+ <div class="u-pad-s">Small padding on all sides</div>
109
+ ```
110
+
111
+ ```html
112
+ <div class="u-margin-y-xl">Extra large margin on top and bottom</div>
113
+ ```
114
+
115
+ ```html
116
+ <div class="u-margin-left-m">Medium margin on left side only</div>
117
+ ```
118
+
119
+ ```html
120
+ <div class="u-pad-x-s-xl">Flexible (small to XL) padding on left and right</div>
121
+ Grows from small padding on small screens, to xl padding on large screens
79
122
  ```
@@ -6,25 +6,61 @@ layout: patterns-page
6
6
  {% from "components/card/macro.njk" import card %}
7
7
 
8
8
  <div class="o-grid o-grid--of-three o-grid--swipeable">
9
- {% for _ in [0, 1, 2] %}
10
- {{ card({
11
- theme: {
12
- layout: 'single',
13
- size: 'medium',
14
- name: 'alt'
15
- },
16
- image: {
17
- src: '/static/img/blog-page-image-1.jpg',
18
- alt: ''
19
- },
20
- header: {
21
- title: 'Mixing it with the Mastersizer!'
22
- },
23
- body: {
24
- content: '<p>At a major leading manufacturer of mixing equipment, the Mastersizer particle size analyzer is one of the analytical instruments used by customers during process simulations.</p>'
25
- },
26
- link: '/prototype/blog-post',
27
- tag: 'News'
28
- }) }}
29
- {% endfor %}
9
+ {{ card({
10
+ theme: {
11
+ layout: 'single',
12
+ size: 'medium',
13
+ name: 'alt'
14
+ },
15
+ image: {
16
+ src: '/static/img/blog-page-image-1.jpg',
17
+ alt: ''
18
+ },
19
+ header: {
20
+ title: 'Mixing it with the Mastersizer!'
21
+ },
22
+ body: {
23
+ content: '<p>At a major leading manufacturer of mixing equipment, the Mastersizer particle size analyzer is one of the analytical instruments used by customers during process simulations.</p>'
24
+ },
25
+ link: '/prototype/blog-post',
26
+ tag: 'News'
27
+ }) }}
28
+ {{ card({
29
+ theme: {
30
+ layout: 'single',
31
+ size: 'medium',
32
+ name: 'alt'
33
+ },
34
+ image: {
35
+ src: '/static/img/blog-page-image-1.jpg',
36
+ alt: ''
37
+ },
38
+ header: {
39
+ title: 'GPC/SEC standards: making them last'
40
+ },
41
+ body: {
42
+ content: '<p>Earlier this year I highlighted the different types of GPC/SEC standards available and where to find them on our eStore. In this post, I’m going to share some tips and tricks about preparing your standards and making them last. But first, what standard should you be using? In my previous post, I discussed how the […]</p>'
43
+ },
44
+ link: '/prototype/blog-post',
45
+ tag: 'News'
46
+ }) }}
47
+ {{ card({
48
+ theme: {
49
+ layout: 'single',
50
+ size: 'medium',
51
+ name: 'alt'
52
+ },
53
+ image: {
54
+ src: '/static/img/blog-page-image-1.jpg',
55
+ alt: ''
56
+ },
57
+ header: {
58
+ title: 'Viral Vector Vaccines: A Borrowed Technology from Gene Therapy Advancements'
59
+ },
60
+ body: {
61
+ content: '<p>Advances in recombinant DNA technology, genomics, and immunology have greatly influenced the vaccine development process. The genetic manipulation of viruses makes them suitable as vectors for gene delivery, providing a novel and unique opportunity for vaccine design. Viruses survive and replicate by invading their host’s cells and hijacking their protein-making machinery. These virus particles contain […]</p>'
62
+ },
63
+ link: '/prototype/blog-post',
64
+ tag: 'News'
65
+ }) }}
30
66
  </div>
@@ -445,7 +445,7 @@ tags: prototype
445
445
  </div>
446
446
 
447
447
  <div id="tab-events" class="c-tab">
448
- <div class="o-grid o-grid--of-three">
448
+ <div class="o-grid o-grid--of-three o-grid--swipeable">
449
449
  {{ card({
450
450
  theme: {
451
451
  layout: 'single',