mp-design-system 1.2.54 → 1.2.55

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-design-system",
3
- "version": "1.2.54",
3
+ "version": "1.2.55",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "npm-run-all --parallel bundle:*",
@@ -0,0 +1,10 @@
1
+ module.exports = {
2
+ title: 'Back to top',
3
+ component: {
4
+ name: 'back-to-top',
5
+ },
6
+ context: {
7
+ text: 'Back to top',
8
+ },
9
+ variants: [],
10
+ };
@@ -0,0 +1,7 @@
1
+ {%- from "components/icon/macro.njk" import icon -%}
2
+
3
+ {%- set classNames = "mp c-back-to-top" -%}
4
+
5
+ <a href="#header" class="{{ classNames }}" title="{{ params.text }}">
6
+ {{ icon({ id: 'chevron-up', class: 'c-back-to-top__icon' }) }}
7
+ </a>
@@ -0,0 +1,22 @@
1
+ .c-back-to-top {
2
+ position: fixed;
3
+ background: color('blue');
4
+ color: color('white') !important;
5
+ height: 2.6rem;
6
+ width: 2.6rem;
7
+ right: var(--space-xs);
8
+ bottom: var(--space-xs);
9
+ display: flex;
10
+ justify-content: center;
11
+ align-items: center;
12
+ border-radius: 4rem;
13
+ box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 20%);
14
+ transition: 300ms background-color, 300ms color;
15
+
16
+ &:where(:hover, :focus) {
17
+ background: color('blue', 'step--1');
18
+ }
19
+
20
+ &__icon {
21
+ }
22
+ }
@@ -0,0 +1,5 @@
1
+ {%- from "components/component/component.njk" import c -%}
2
+
3
+ {%- macro backToTop(params) -%}
4
+ {{ c({ name: 'back-to-top' }, params) }}
5
+ {%- endmacro -%}
@@ -1,4 +1,5 @@
1
1
  {% from "components/icon/macro.njk" import icon %}
2
+ {% from "components/back-to-top/macro.njk" import backToTop %}
2
3
 
3
4
  <footer class="mp c-footer" role="contentinfo">
4
5
  <nav class="c-footer__primary u-wrap" aria-label="Footer">
@@ -76,3 +77,5 @@
76
77
  </div>
77
78
  </div>
78
79
  </footer>
80
+
81
+ {{ backToTop({}) }}
@@ -1,3 +1,13 @@
1
- <svg role="img" aria-hidden="true" focusable="false" class="mp c-icon c-icon--{{ params.id }}">
1
+ {%- set classNames = "mp c-icon c-icon" -%}
2
+
3
+ {%- if params.id -%}
4
+ {% set classNames = classNames + " c-icon--" + params.id %}
5
+ {% endif -%}
6
+
7
+ {%- if params.class -%}
8
+ {% set classNames = classNames + " " + params.class %}
9
+ {% endif -%}
10
+
11
+ <svg role="img" aria-hidden="true" focusable="false" class="{{ classNames }}">
2
12
  <use xlink:href="/static/svg/sprite.svg#{{ params.id }}"></use>
3
13
  </svg>
@@ -1,5 +1,6 @@
1
1
  @import '~comp/accordion/accordion.scss';
2
2
  @import '~comp/alert/alert.scss';
3
+ @import '~comp/back-to-top/back-to-top.scss';
3
4
  @import '~comp/breadcrumb/breadcrumb.scss';
4
5
  @import '~comp/button/button.scss';
5
6
  @import '~comp/campaign/campaign.scss';
@@ -2,15 +2,15 @@
2
2
  color: inherit;
3
3
 
4
4
  h2 {
5
- @extend .c-h,.c-h--step-3;
5
+ @extend .c-h, .c-h--step-3;
6
6
  }
7
7
 
8
8
  h3 {
9
- @extend .c-h,.c-h--step-2;
9
+ @extend .c-h, .c-h--step-2;
10
10
  }
11
11
 
12
12
  h4 {
13
- @extend .c-h,.c-h--step-1;
13
+ @extend .c-h, .c-h--step-1;
14
14
  }
15
15
 
16
16
  p,
@@ -25,14 +25,15 @@
25
25
  color: color('utility-blue');
26
26
  text-decoration: underline;
27
27
  text-underline-offset: 3px;
28
-
28
+
29
29
  &:hover {
30
30
  text-decoration: none;
31
31
  }
32
32
  }
33
33
 
34
34
  ul li {
35
- list-style: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="20" viewBox="0 0 10 20"><circle cx="5" cy="14" r="3.5" fill="%2313AA13" fill-rule="evenodd"/></svg>') outside;
35
+ list-style: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="20" viewBox="0 0 10 20"><circle cx="5" cy="14" r="3.5" fill="%2313AA13" fill-rule="evenodd"/></svg>')
36
+ outside;
36
37
  margin-left: 1em;
37
38
  padding-left: 0.5rem;
38
39
 
@@ -152,6 +153,10 @@
152
153
  table {
153
154
  @extend .c-table;
154
155
  }
156
+
157
+ video {
158
+ max-width: 100%;
159
+ }
155
160
  }
156
161
 
157
162
  .o-featured-image {
@@ -9,15 +9,15 @@ status: 'Ready'
9
9
 
10
10
  ## Inter
11
11
 
12
- Our brand font is [Inter](https://rsms.me/inter). This typeface has been selected for its;
12
+ Our brand font is **Inter**. This typeface has been selected for its;
13
13
  - Excellent clarity and legibility
14
14
  - Extensive character set
15
15
  - Comprehensive weight and style options
16
16
  - Understated authority
17
17
 
18
- Find more information about Inter at [https://rsms.me/inter](https://rsms.me/inter)
18
+ **We use Inter version 3**. Inter recently received a new v4 update, which changes the spacing and overall look of the font. To maintain consistent branding for Malvern Panalytical materials, we recommend avoiding any version later than v3.19.
19
19
 
20
- {% button 'Download Inter font' 'https://github.com/rsms/inter/releases/download/v3.19/Inter-3.19.zip' %}
20
+ {% button 'Download Inter font (v3.19)' 'https://github.com/rsms/inter/releases/download/v3.19/Inter-3.19.zip' %}
21
21
 
22
22
  Inter is also available from [Google Fonts](https://fonts.google.com/specimen/Inter).
23
23