@magicgol/polyjuice 0.53.0 → 0.54.1
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/assets/palette.scss +2 -2
- package/src/components/content/card/horizontal-card/HCard.vue +23 -1
- package/src/components/content/card/vertical-card/VCard.vue +2 -1
- package/src/components/context/footballer/horizontal-footballer-card/HFootballerCard.vue +37 -5
- package/src/documentation/Alert.stories.mdx +2 -2
package/package.json
CHANGED
package/src/assets/palette.scss
CHANGED
@@ -8,8 +8,8 @@ $palette: (
|
|
8
8
|
'club': linear-gradient(134.42deg, #0df2bb 0.99%, #a714ed 100%),
|
9
9
|
'text': #343434,
|
10
10
|
// ALERT
|
11
|
-
'error': #
|
12
|
-
'warning': #
|
11
|
+
'error': #f00,
|
12
|
+
'warning': #ffa44c,
|
13
13
|
'success': #349B50,
|
14
14
|
'info': #004781,
|
15
15
|
'highlighted': #ffdb59,
|
@@ -1,15 +1,24 @@
|
|
1
1
|
<template>
|
2
2
|
<div
|
3
|
-
class="d-flex text-truncate justify-content-between align-items-center
|
3
|
+
class="d-flex text-truncate justify-content-between align-items-center px-3 position-relative"
|
4
4
|
v-bind:class="classes"
|
5
5
|
>
|
6
|
+
<div
|
7
|
+
v-if="progressBar"
|
8
|
+
class="position-absolute h-100"
|
9
|
+
style="top: 0; left: 0; border-radius: 16px"
|
10
|
+
:class="progressBarClass"
|
11
|
+
:style="{ width: progressBar + '%' }"
|
12
|
+
></div>
|
6
13
|
<div
|
7
14
|
class="flex-fill text-truncate"
|
15
|
+
style="z-index: 1"
|
8
16
|
><slot></slot></div>
|
9
17
|
<!-- ACTIONS -->
|
10
18
|
<div
|
11
19
|
v-if="actionsSlotVisibility"
|
12
20
|
class="pl-3"
|
21
|
+
style="z-index: 1"
|
13
22
|
>
|
14
23
|
<slot name="actions"></slot>
|
15
24
|
</div>
|
@@ -21,6 +30,18 @@
|
|
21
30
|
export default {
|
22
31
|
name: 'mg-h-card',
|
23
32
|
|
33
|
+
props: {
|
34
|
+
progressBar: {
|
35
|
+
type: Number,
|
36
|
+
default: null
|
37
|
+
},
|
38
|
+
|
39
|
+
progressBarClass: {
|
40
|
+
type: String,
|
41
|
+
default: null,
|
42
|
+
},
|
43
|
+
},
|
44
|
+
|
24
45
|
computed: {
|
25
46
|
classes() {
|
26
47
|
return {
|
@@ -37,6 +58,7 @@ export default {
|
|
37
58
|
<style lang="scss">
|
38
59
|
.mg-h-card {
|
39
60
|
background: #fff;
|
61
|
+
border-radius: 16px;
|
40
62
|
box-shadow: 0 8px 12px 0 rgba(0, 0, 0, 0.25);
|
41
63
|
height: 3.75rem;
|
42
64
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<div
|
3
|
-
class="
|
3
|
+
class="overflow-hidden"
|
4
4
|
:class="classes"
|
5
5
|
@click="onClick"
|
6
6
|
>
|
@@ -85,6 +85,7 @@ export default {
|
|
85
85
|
|
86
86
|
.mg-v-card {
|
87
87
|
background: white;
|
88
|
+
border-radius: 16px;
|
88
89
|
box-shadow: 0 8px 15px 0 rgba(0, 0, 0, 0.3);
|
89
90
|
|
90
91
|
&--highlighted {
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<template>
|
2
2
|
<mg-h-card
|
3
3
|
:class="classes"
|
4
|
+
:progress-bar="progressBar"
|
5
|
+
:progress-bar-class="progressBarClass"
|
4
6
|
>
|
5
7
|
<template v-slot:default>
|
6
8
|
<mg-h-footballer
|
@@ -15,8 +17,8 @@
|
|
15
17
|
</template>
|
16
18
|
|
17
19
|
<script>
|
18
|
-
import MgHFootballer from
|
19
|
-
import MgHCard from
|
20
|
+
import MgHFootballer from '../horizontal-footballer/HFootballer';
|
21
|
+
import MgHCard from '../../../content/card/horizontal-card/HCard';
|
20
22
|
|
21
23
|
export default {
|
22
24
|
name: 'mg-h-footballer-card',
|
@@ -42,18 +44,34 @@ export default {
|
|
42
44
|
type: Boolean,
|
43
45
|
default: false
|
44
46
|
}
|
45
|
-
}
|
47
|
+
},
|
48
|
+
progressBar: {
|
49
|
+
type: Number,
|
50
|
+
default: null
|
51
|
+
},
|
46
52
|
},
|
47
53
|
|
48
54
|
computed: {
|
49
|
-
classes() {
|
55
|
+
classes () {
|
50
56
|
return {
|
51
57
|
'mg-h-footballer-card': true,
|
52
58
|
'mg-h-footballer-card--pressed': this.pressed === true,
|
53
59
|
};
|
54
60
|
},
|
55
|
-
actionsSlotVisibility() {
|
61
|
+
actionsSlotVisibility () {
|
56
62
|
return 'actions' in this.$slots && !!this.$slots.actions;
|
63
|
+
},
|
64
|
+
progressBarClass () {
|
65
|
+
if (!this.progressBar) {
|
66
|
+
return null;
|
67
|
+
}
|
68
|
+
|
69
|
+
if (this.progressBar > 66) {
|
70
|
+
return 'mg-h-footballer-card--theme-success';
|
71
|
+
} else if (this.progressBar > 33) {
|
72
|
+
return 'mg-h-footballer-card--theme-warning';
|
73
|
+
}
|
74
|
+
return 'mg-h-footballer-card--theme-error';
|
57
75
|
}
|
58
76
|
},
|
59
77
|
|
@@ -65,10 +83,24 @@ export default {
|
|
65
83
|
</script>
|
66
84
|
|
67
85
|
<style lang="scss">
|
86
|
+
@import '../../../../assets/palette';
|
87
|
+
|
68
88
|
.mg-h-footballer-card {
|
69
89
|
&--pressed {
|
70
90
|
background: #daf0d9 !important;
|
71
91
|
box-shadow: inset 0 4px 9px rgba(0, 0, 0, 0.1) !important;
|
72
92
|
}
|
93
|
+
|
94
|
+
&--theme {
|
95
|
+
&-success {
|
96
|
+
background-color: rgba(map-get($palette, 'success'), 0.2);
|
97
|
+
}
|
98
|
+
&-warning {
|
99
|
+
background-color: rgba(map-get($palette, 'warning'), 0.2);
|
100
|
+
}
|
101
|
+
&-error {
|
102
|
+
background-color: rgba(map-get($palette, 'error'), 0.2);
|
103
|
+
}
|
104
|
+
}
|
73
105
|
}
|
74
106
|
</style>
|
@@ -6,12 +6,12 @@ import {ColorItem, ColorPalette, Meta} from '@storybook/addon-docs';
|
|
6
6
|
<ColorItem
|
7
7
|
title="Error"
|
8
8
|
subtitle="Used for error messages"
|
9
|
-
colors={{'
|
9
|
+
colors={{'Red': '#f00'}}
|
10
10
|
/>
|
11
11
|
<ColorItem
|
12
12
|
title="Warning"
|
13
13
|
subtitle="Used for warning messages"
|
14
|
-
colors={{'
|
14
|
+
colors={{'Yellow Orange': '#ffa44c'}}
|
15
15
|
/>
|
16
16
|
<ColorItem
|
17
17
|
title="Success"
|