@magicgol/polyjuice 0.54.2 → 0.55.0

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": "@magicgol/polyjuice",
3
- "version": "0.54.2",
3
+ "version": "0.55.0",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -8,7 +8,7 @@ export default {
8
8
  argTypes: {
9
9
  theme: {
10
10
  control: { type: 'select' },
11
- options: [null, 'winner'],
11
+ options: [null, 'winner', 'success', 'warning', 'error'],
12
12
  defaultValue: null
13
13
  },
14
14
  },
@@ -22,7 +22,7 @@ export default {
22
22
  type: String,
23
23
  default: null,
24
24
  validator: function (value) {
25
- return ['winner'].indexOf(value) !== -1;
25
+ return ['winner', 'success', 'warning', 'error'].indexOf(value) !== -1;
26
26
  },
27
27
  },
28
28
  },
@@ -32,6 +32,9 @@ export default {
32
32
  return {
33
33
  'mg-bar-chart': true,
34
34
  'mg-bar-chart--theme-winner': this.theme === 'winner',
35
+ 'mg-bar-chart--theme-success': this.theme === 'success',
36
+ 'mg-bar-chart--theme-warning': this.theme === 'warning',
37
+ 'mg-bar-chart--theme-error': this.theme === 'error',
35
38
  };
36
39
  },
37
40
 
@@ -65,5 +68,23 @@ export default {
65
68
  background-color: map_get($palette, 'winner') !important;
66
69
  }
67
70
  }
71
+
72
+ &--theme-success {
73
+ > div {
74
+ background-color: map_get($palette, 'success') !important;
75
+ }
76
+ }
77
+
78
+ &--theme-warning {
79
+ > div {
80
+ background-color: map_get($palette, 'warning') !important;
81
+ }
82
+ }
83
+
84
+ &--theme-error {
85
+ > div {
86
+ background-color: map_get($palette, 'error') !important;
87
+ }
88
+ }
68
89
  }
69
90
  </style>
@@ -10,12 +10,18 @@
10
10
  >
11
11
  <slot name="header"></slot>
12
12
  </div>
13
- <div class="mg-v-card-body p-3"><slot></slot></div>
14
13
  <div
15
- class="mg-v-card-footer px-3 pb-3"
14
+ class="mg-v-card-body"
15
+ :class="{'p-3': size === 'normal', 'p-2': size === 'small'}"
16
+ ><slot></slot></div>
17
+ <div
18
+ class="mg-v-card-footer"
19
+ :class="{'px-3 pb-3': size === 'normal', 'px-2 pb-2': size === 'small'}"
16
20
  v-if="footerVisibility"
17
21
  >
18
- <div class="pt-3">
22
+ <div
23
+ :class="{'pt-3': size === 'normal', 'pt-2': size === 'small'}"
24
+ >
19
25
  <slot name="footer"></slot>
20
26
  </div>
21
27
  </div>
@@ -43,6 +49,16 @@ export default {
43
49
  ].indexOf(value) !== -1;
44
50
  },
45
51
  },
52
+ size: {
53
+ type: String,
54
+ default: 'normal',
55
+ validator: function (value) {
56
+ return [
57
+ 'small',
58
+ 'normal',
59
+ ].indexOf(value) !== -1;
60
+ },
61
+ },
46
62
  highlighted: {
47
63
  type: Boolean,
48
64
  default: false
@@ -54,7 +70,6 @@ export default {
54
70
  return {
55
71
  'mg-v-card': true,
56
72
  'mg-v-card--highlighted': this.highlighted === true,
57
- 'mg-v-card--theme-club': this.theme === 'club',
58
73
  'mg-v-card--theme-rating': this.theme === 'rating',
59
74
  'mg-v-card--theme-goalkeeper': this.theme === 'goalkeeper',
60
75
  'mg-v-card--theme-defender': this.theme === 'defender',
@@ -125,6 +140,7 @@ export default {
125
140
 
126
141
  &-transparent {
127
142
  background: rgba(255, 255, 255, 0.95) !important;
143
+ border: 1px solid #eee;
128
144
  box-shadow: none;
129
145
  }
130
146
  }