@magicgol/polyjuice 0.22.1 → 0.23.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 +1 -1
- package/src/assets/palette.scss +4 -4
- package/src/components/card/vertical-card/VCard.stories.js +13 -5
- package/src/components/card/vertical-card/VCard.vue +22 -18
- package/src/components/footballer/horizontal-footballer/HFootballer.stories.js +9 -0
- package/src/components/footballer/horizontal-footballer/HFootballer.vue +11 -1
- package/src/components/footballer/role-badge/RoleBadge.vue +2 -1
- package/src/components/label/label/Label.vue +3 -1
- package/src/components/list/head/ListHead.vue +1 -1
- package/src/components/typography/h1/HeadingOne.vue +3 -1
- package/src/components/typography/h2/HeadingTwo.vue +3 -1
- package/src/components/typography/h3/HeadingThree.vue +3 -1
- package/src/components/typography/h4/HeadingFour.vue +3 -1
- package/src/components/typography/h5/HeadingFive.vue +1 -1
- package/src/documentation/Footballer.stories.mdx +4 -4
package/package.json
CHANGED
package/src/assets/palette.scss
CHANGED
|
@@ -11,10 +11,10 @@ $palette: (
|
|
|
11
11
|
'success': #349B50,
|
|
12
12
|
'info': #004781,
|
|
13
13
|
// FOOTBALLERS
|
|
14
|
-
'goalkeeper': #
|
|
15
|
-
'defender': #
|
|
16
|
-
'midfielder': #
|
|
17
|
-
'forward': #
|
|
14
|
+
'goalkeeper': #fcd777,
|
|
15
|
+
'defender': #89f4a1,
|
|
16
|
+
'midfielder': #8fc6f9,
|
|
17
|
+
'forward': #f58383,
|
|
18
18
|
// LIVE
|
|
19
19
|
'online': #00b669,
|
|
20
20
|
'offline': #ea7203,
|
|
@@ -20,7 +20,7 @@ export default {
|
|
|
20
20
|
},
|
|
21
21
|
theme: {
|
|
22
22
|
control: { type: 'select' },
|
|
23
|
-
options: [null, 'club', 'rating', '
|
|
23
|
+
options: [null, 'club', 'rating', 'goalkeeper', 'defender', 'midfielder', 'forward', 'transparent'],
|
|
24
24
|
defaultValue: null
|
|
25
25
|
},
|
|
26
26
|
footer: {
|
|
@@ -80,7 +80,7 @@ Rating.args = {
|
|
|
80
80
|
export const Goalkeeper = Template.bind({});
|
|
81
81
|
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
|
82
82
|
Goalkeeper.args = {
|
|
83
|
-
theme: '
|
|
83
|
+
theme: 'goalkeeper',
|
|
84
84
|
default: '<div>This is a vertical card.</div><div>What do you think about?</div>',
|
|
85
85
|
footer: '<div>The footer content goes here</div>'
|
|
86
86
|
};
|
|
@@ -88,7 +88,7 @@ Goalkeeper.args = {
|
|
|
88
88
|
export const Defender = Template.bind({});
|
|
89
89
|
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
|
90
90
|
Defender.args = {
|
|
91
|
-
theme: '
|
|
91
|
+
theme: 'defender',
|
|
92
92
|
default: '<div>This is a vertical card.</div><div>What do you think about?</div>',
|
|
93
93
|
footer: '<div>The footer content goes here</div>'
|
|
94
94
|
};
|
|
@@ -96,7 +96,7 @@ Defender.args = {
|
|
|
96
96
|
export const Midfielder = Template.bind({});
|
|
97
97
|
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
|
98
98
|
Midfielder.args = {
|
|
99
|
-
theme: '
|
|
99
|
+
theme: 'midfielder',
|
|
100
100
|
default: '<div>This is a vertical card.</div><div>What do you think about?</div>',
|
|
101
101
|
footer: '<div>The footer content goes here</div>'
|
|
102
102
|
};
|
|
@@ -104,7 +104,15 @@ Midfielder.args = {
|
|
|
104
104
|
export const Forward = Template.bind({});
|
|
105
105
|
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
|
106
106
|
Forward.args = {
|
|
107
|
-
theme: '
|
|
107
|
+
theme: 'forward',
|
|
108
|
+
default: '<div>This is a vertical card.</div><div>What do you think about?</div>',
|
|
109
|
+
footer: '<div>The footer content goes here</div>'
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const Transparent = Template.bind({});
|
|
113
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
|
114
|
+
Transparent.args = {
|
|
115
|
+
theme: 'transparent',
|
|
108
116
|
default: '<div>This is a vertical card.</div><div>What do you think about?</div>',
|
|
109
117
|
footer: '<div>The footer content goes here</div>'
|
|
110
118
|
};
|
|
@@ -25,7 +25,7 @@ export default {
|
|
|
25
25
|
type: String,
|
|
26
26
|
default: null,
|
|
27
27
|
validator: function (value) {
|
|
28
|
-
return ['club', 'rating', '
|
|
28
|
+
return ['club', 'rating', 'goalkeeper', 'defender', 'midfielder', 'forward', 'transparent'].indexOf(value) !== -1;
|
|
29
29
|
},
|
|
30
30
|
}
|
|
31
31
|
},
|
|
@@ -36,10 +36,11 @@ export default {
|
|
|
36
36
|
'mg-v-card': true,
|
|
37
37
|
'mg-v-card--theme-club': this.theme === 'club',
|
|
38
38
|
'mg-v-card--theme-rating': this.theme === 'rating',
|
|
39
|
-
'mg-v-card--theme-
|
|
40
|
-
'mg-v-card--theme-
|
|
41
|
-
'mg-v-card--theme-
|
|
42
|
-
'mg-v-card--theme-
|
|
39
|
+
'mg-v-card--theme-goalkeeper': this.theme === 'goalkeeper',
|
|
40
|
+
'mg-v-card--theme-defender': this.theme === 'defender',
|
|
41
|
+
'mg-v-card--theme-midfielder': this.theme === 'midfielder',
|
|
42
|
+
'mg-v-card--theme-forward': this.theme === 'forward',
|
|
43
|
+
'mg-v-card--theme-transparent': this.theme === 'transparent',
|
|
43
44
|
};
|
|
44
45
|
},
|
|
45
46
|
footerVisibility() {
|
|
@@ -73,22 +74,25 @@ export default {
|
|
|
73
74
|
color: #777;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
&-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
77
|
+
&-goalkeeper {
|
|
78
|
+
background-color: map-get($palette, 'goalkeeper');
|
|
79
|
+
}
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
&-defender {
|
|
82
|
+
background-color: map-get($palette, 'defender');
|
|
83
|
+
}
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
&-midfielder {
|
|
86
|
+
background-color: map-get($palette, 'midfielder');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&-forward {
|
|
90
|
+
background-color: map-get($palette, 'forward');
|
|
91
|
+
}
|
|
88
92
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
&-transparent {
|
|
94
|
+
background: rgba(255, 255, 255, 0.95) !important;
|
|
95
|
+
box-shadow: none;
|
|
92
96
|
}
|
|
93
97
|
}
|
|
94
98
|
|
|
@@ -34,3 +34,12 @@ export const Empty = Template.bind({});
|
|
|
34
34
|
Empty.args = {
|
|
35
35
|
role: null
|
|
36
36
|
};
|
|
37
|
+
|
|
38
|
+
export const Disabled = Template.bind({});
|
|
39
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
|
40
|
+
Disabled.args = {
|
|
41
|
+
disabled: true,
|
|
42
|
+
role: 'A',
|
|
43
|
+
firstname: 'Paulo',
|
|
44
|
+
lastname: 'Dybala',
|
|
45
|
+
};
|
|
@@ -40,6 +40,10 @@ export default {
|
|
|
40
40
|
type: Boolean,
|
|
41
41
|
default: false,
|
|
42
42
|
},
|
|
43
|
+
disabled: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false,
|
|
46
|
+
},
|
|
43
47
|
role: {
|
|
44
48
|
type: String,
|
|
45
49
|
default: null,
|
|
@@ -61,6 +65,7 @@ export default {
|
|
|
61
65
|
classes() {
|
|
62
66
|
return {
|
|
63
67
|
'mg-h-footballer': true,
|
|
68
|
+
'mg-h-footballer--disabled': this.disabled,
|
|
64
69
|
};
|
|
65
70
|
},
|
|
66
71
|
hasOnlyLastname() {
|
|
@@ -87,12 +92,17 @@ export default {
|
|
|
87
92
|
@import '../../../assets/palette';
|
|
88
93
|
|
|
89
94
|
.mg-h-footballer {
|
|
90
|
-
color:
|
|
95
|
+
color: map-get($palette, 'text');
|
|
91
96
|
font-family: 'Ubuntu', sans-serif;
|
|
92
97
|
font-size: 0.75rem;
|
|
93
98
|
|
|
94
99
|
&-strong {
|
|
95
100
|
font-weight: 500;
|
|
96
101
|
}
|
|
102
|
+
|
|
103
|
+
&--disabled {
|
|
104
|
+
opacity: 0.6;
|
|
105
|
+
cursor: not-allowed !important;
|
|
106
|
+
}
|
|
97
107
|
}
|
|
98
108
|
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="d-inline-flex text-center
|
|
3
|
+
class="d-inline-flex text-center rounded-circle justify-content-center align-items-center"
|
|
4
4
|
:class="classes"
|
|
5
5
|
>
|
|
6
6
|
<slot v-if="slotVisibility"></slot>
|
|
@@ -57,6 +57,7 @@ export default {
|
|
|
57
57
|
|
|
58
58
|
.mg-role-badge {
|
|
59
59
|
background-color: #c2c2c2;
|
|
60
|
+
color: map-get($palette, 'text');
|
|
60
61
|
font-family: 'Ubuntu', sans-serif;
|
|
61
62
|
font-weight: 600;
|
|
62
63
|
|
|
@@ -45,6 +45,8 @@ export default {
|
|
|
45
45
|
</script>
|
|
46
46
|
|
|
47
47
|
<style lang="scss">
|
|
48
|
+
@import '../../../assets/palette';
|
|
49
|
+
|
|
48
50
|
.mg-label {
|
|
49
51
|
border-radius: 32px;
|
|
50
52
|
padding-top: 0.0625rem;
|
|
@@ -68,7 +70,7 @@ export default {
|
|
|
68
70
|
&--theme {
|
|
69
71
|
&-light {
|
|
70
72
|
background: #f7f7f7;
|
|
71
|
-
color:
|
|
73
|
+
color: map-get($palette, 'text');
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
&-dark {
|
|
@@ -5,18 +5,18 @@ import {ColorItem, ColorPalette, Meta} from '@storybook/addon-docs';
|
|
|
5
5
|
<ColorPalette>
|
|
6
6
|
<ColorItem
|
|
7
7
|
title="Goalkeeper"
|
|
8
|
-
colors={{'
|
|
8
|
+
colors={{'Goldenrod': '#fcd777'}}
|
|
9
9
|
/>
|
|
10
10
|
<ColorItem
|
|
11
11
|
title="Defender"
|
|
12
|
-
colors={{'
|
|
12
|
+
colors={{'Mint Green': '#89f4a1'}}
|
|
13
13
|
/>
|
|
14
14
|
<ColorItem
|
|
15
15
|
title="Midfielder"
|
|
16
|
-
colors={{'
|
|
16
|
+
colors={{'Malibu': '#8fc6f9'}}
|
|
17
17
|
/>
|
|
18
18
|
<ColorItem
|
|
19
19
|
title="Forward"
|
|
20
|
-
colors={{'
|
|
20
|
+
colors={{'Froly': '#f58383'}}
|
|
21
21
|
/>
|
|
22
22
|
</ColorPalette>
|