mp-design-system 0.8.4 → 0.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-design-system",
3
- "version": "0.8.4",
3
+ "version": "0.8.6",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "npm-run-all --parallel bundle:*",
@@ -37,6 +37,12 @@ module.exports = {
37
37
  context: {
38
38
  colour: 'outline-white'
39
39
  }
40
+ },
41
+ {
42
+ title: 'Small',
43
+ context: {
44
+ classes: 'c-button--small'
45
+ }
40
46
  }
41
47
  ],
42
48
  props: [
@@ -11,8 +11,7 @@
11
11
  font-family: $font-stack;
12
12
  }
13
13
 
14
- .mp.c-button,
15
- .c-button {
14
+ %c-button {
16
15
  // Reset
17
16
  border-radius: 0;
18
17
  background: transparent;
@@ -45,6 +44,11 @@
45
44
  text-decoration: none;
46
45
  color: color("white");
47
46
  }
47
+ }
48
+
49
+ .mp.c-button,
50
+ .c-button {
51
+ @extend %c-button;
48
52
 
49
53
  &--wide {
50
54
  width: 100%;
@@ -1,9 +1,9 @@
1
1
  {% inputWrapper params.error %}
2
- <label class="{{ 'u-hidden' if params.hideLabel else 'c-label' }}{{ params.classes }}" for="{{ params.id }}">{{ params.label }}</label>
2
+ <label class="{{ 'u-hidden' if params.hideLabel else 'c-label' }}" for="{{ params.id }}">{{ params.label }}</label>
3
3
  {% if params.button %}
4
4
  <div class="u-flex u-border">
5
5
  {% endif %}
6
- <input type="{{ params.type or 'text' }}" class="c-input {{ 'c-input--with-button' if params.button }}" name="{{ params.name or params.id }}" placeholder="{{ params.placeholder }}" id="{{ params.id }}" {{ 'required' if params.required }} />
6
+ <input type="{{ params.type or 'text' }}" class="c-input {{ 'c-input--with-button' if params.button }}{{ params.classes }}" name="{{ params.name or params.id }}" placeholder="{{ params.placeholder }}" id="{{ params.id }}" {{ 'required' if params.required }} />
7
7
  {% if params.button %}
8
8
  <button type="button" class="mp c-button--white">Search</button>
9
9
  {% endif %}
@@ -41,6 +41,19 @@
41
41
  min-height: 10rem;;
42
42
  }
43
43
 
44
+ &--file {
45
+ border: 0;
46
+ padding: 0;
47
+ cursor: pointer;
48
+
49
+ @at-root ::-webkit-file-upload-button {
50
+ @extend %c-button;
51
+ @extend .c-button--blue;
52
+ display: inline-flex;
53
+ @include margin-right('xs');
54
+ }
55
+ }
56
+
44
57
  &-error {
45
58
  --error-state: #{color('red')};
46
59
  position: relative;
@@ -1,21 +1,23 @@
1
1
  .c-quote {
2
2
  color: color('petrol', 'step-1');
3
3
  padding-top: 74px;
4
- @include padding-top('2xl');
4
+ @include padding('2xl', 0, 'l', 'xl');
5
5
  position: relative;
6
6
 
7
7
  &:before {
8
8
  content: '“';
9
- // color: color('petrol', 'step-2');
9
+ color: color('petrol', 'step-3');
10
10
  position: absolute;
11
11
  height: 57px;
12
12
  width: 45px;
13
13
  left: 0;
14
- top: 0;
14
+ top: 0.1em;
15
+ font-family: "Arial", sans-serif;
15
16
  font-size: 10em;
16
17
  font-weight: 900;
17
18
  line-height: 0.9;
18
- margin-left: -0.05em;
19
+ margin-left: -0.025em;
20
+ z-index: -1;
19
21
  }
20
22
 
21
23
  p {
@@ -37,7 +37,7 @@
37
37
  overflow-x: auto;
38
38
 
39
39
  &-list {
40
- border-bottom: 4px solid color('petrol', 'step-2');
40
+ border-bottom: 4px solid color('utility-blue', 'step-3');
41
41
  display: flex;
42
42
  width: 100%;
43
43
  min-width: min-content;
@@ -58,7 +58,7 @@
58
58
  @include padding(0, 0 , 's-m');
59
59
  @include margin-right('m');
60
60
  display: block;
61
- border-bottom: 4px solid color('petrol', 'step-2');
61
+ border-bottom: 4px solid color('utility-blue', 'step-3');
62
62
  margin-bottom: -4px;
63
63
  position: relative;
64
64
  z-index: 1;
@@ -244,12 +244,15 @@
244
244
  }
245
245
 
246
246
  iframe {
247
- position: absolute;
248
247
  height: 100%;
249
248
  width: 100%;
250
249
  left: 0;
251
250
  top: 0;
252
251
  transition: all .3s cubic-bezier(0.22, 0.61, 0.36, 1);
252
+
253
+ @media only screen and (min-width: 600px) {
254
+ position: absolute;
255
+ }
253
256
  }
254
257
  }
255
258
 
@@ -130,15 +130,15 @@
130
130
 
131
131
  @media (min-width: 35em) {
132
132
  &:not(.o-prose--left-blockquote) blockquote {
133
- padding-left: 107px;
133
+ @include padding-left('3xl');
134
134
 
135
135
  &:before {
136
- left: 107px;
136
+ left: var(--space-xl);
137
137
  }
138
138
  }
139
139
 
140
140
  &.o-prose--left-blockquote blockquote {
141
- padding-right: 107px;
141
+ @include padding-right('3xl');
142
142
  }
143
143
  }
144
144
 
@@ -1,7 +1,3 @@
1
- html {
2
- font-size:18px;
3
- }
4
-
5
1
  html body {
6
2
 
7
3
  @import './typography.scss';
@@ -9,12 +9,12 @@ sidebar: components
9
9
  The simplest way to consume the design system is with a `<link>` & `<script>` tag. Unpkg is a CDN of the built CSS & JavaScript, and can be included like so:
10
10
 
11
11
  ```html
12
- <link rel="stylesheet" href="https://unpkg.com/mp-design-system@{{ config.dsVersion }}/dist/build/scss/main.css" />
12
+ <link rel="stylesheet" href="https://unpkg.com/mp-design-system@latest/dist/build/scss/main.css" />
13
13
 
14
- <script src="https://unpkg.com/mp-design-system@{{ config.dsVersion }}/dist/build/js/app.js"></script>
14
+ <script src="https://unpkg.com/mp-design-system@latest/dist/build/js/app.js"></script>
15
15
  ```
16
16
 
17
- The latest version number is **V.{{ config.dsVersion }}**, and is visible in the top-right of the page throughout the design system.
17
+ The latest version number is **V.{{ config.dsVersion }}**, and is visible in the top-right of the page throughout the design system. You can access previous versions by replacing "latest" in the URL, e.g. `https://unpkg.com/mp-design-system@0.8.2/dist/build/scss/main.css`
18
18
 
19
19
  ## Consuming the design system via NPM
20
20
 
@@ -122,6 +122,14 @@ layout: patterns-page
122
122
  type: 'number',
123
123
  placeholder: 'Placeholder'
124
124
  })}}
125
+
126
+ {{ input({
127
+ label: 'File',
128
+ name: 'file_input',
129
+ id: 'file_input',
130
+ type: 'file',
131
+ classes: 'c-input--file'
132
+ })}}
125
133
 
126
134
  {{ input({
127
135
  label: 'Range',