@magicgol/polyjuice 0.54.2 → 0.55.1

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": "@magicgol/polyjuice",
3
- "version": "0.54.2",
3
+ "version": "0.55.1",
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', 'py-1 px-2': size === 'x-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,17 @@ 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
+ 'x-small',
58
+ 'small',
59
+ 'normal',
60
+ ].indexOf(value) !== -1;
61
+ },
62
+ },
46
63
  highlighted: {
47
64
  type: Boolean,
48
65
  default: false
@@ -54,7 +71,9 @@ export default {
54
71
  return {
55
72
  'mg-v-card': true,
56
73
  'mg-v-card--highlighted': this.highlighted === true,
57
- 'mg-v-card--theme-club': this.theme === 'club',
74
+ 'mg-v-card--size-x-small': this.size === 'x-small',
75
+ 'mg-v-card--size-small': this.size === 'small',
76
+ 'mg-v-card--size-normal': this.size === 'normal',
58
77
  'mg-v-card--theme-rating': this.theme === 'rating',
59
78
  'mg-v-card--theme-goalkeeper': this.theme === 'goalkeeper',
60
79
  'mg-v-card--theme-defender': this.theme === 'defender',
@@ -85,9 +104,19 @@ export default {
85
104
 
86
105
  .mg-v-card {
87
106
  background: white;
88
- border-radius: 16px;
89
107
  box-shadow: 0 8px 15px 0 rgba(0, 0, 0, 0.3);
90
108
 
109
+ &--size {
110
+ &-small,
111
+ &-normal {
112
+ border-radius: 16px;
113
+ }
114
+
115
+ &-x-small {
116
+ border-radius: 9px;
117
+ }
118
+ }
119
+
91
120
  &--highlighted {
92
121
  border: 2px solid map-get($palette, 'highlighted');
93
122
  }
@@ -125,6 +154,7 @@ export default {
125
154
 
126
155
  &-transparent {
127
156
  background: rgba(255, 255, 255, 0.95) !important;
157
+ border: 1px solid #eee;
128
158
  box-shadow: none;
129
159
  }
130
160
  }