@magicgol/polyjuice 0.34.4 → 0.36.0
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/svg/check.js +10 -0
- package/src/assets/svg/index.js +1 -0
- package/src/components/components/filter-option/FilterOption.vue +3 -0
- package/src/components/components/icon-badge/IconBadge.vue +4 -0
- package/src/components/components/label/Label.stories.js +2 -2
- package/src/components/components/label/Label.vue +17 -6
- package/src/components/content/box/vertical-box/VBox.stories.js +44 -0
- package/src/components/content/box/vertical-box/VBox.vue +46 -0
- package/src/components/content/list/head/ListHead.vue +3 -0
- package/src/components/context/actions/filter-button/FilterButton.vue +1 -0
- package/src/components/context/actions/remove-button/RemoveButton.vue +1 -0
- package/src/components/context/club/button/primary-club-button/PrimaryClubButton.vue +4 -1
- package/src/components/context/club/button/secondary-club-button/SecondaryClubButton.vue +4 -1
- package/src/components/context/club/plate/ClubPlate.stories.js +1 -1
- package/src/components/context/club/plate/ClubPlate.vue +3 -0
- package/src/components/context/club/square/ClubSquare.stories.js +31 -0
- package/src/components/context/club/square/ClubSquare.vue +64 -0
- package/src/components/context/footballer/horizontal-footballer/HFootballer.vue +1 -1
- package/src/components/context/footballer/horizontal-footballer-placeholder/HFootballerPlaceholder.vue +1 -0
- package/src/components/context/magic-coin/credits/Credits.vue +1 -0
- package/src/components/form/button/tertiary-button/TertiaryButton.vue +1 -1
- package/src/components/form/checkbox/switch/Switch.vue +1 -0
- package/src/components/form/radio/Radio.stories.js +30 -0
- package/src/components/form/radio/Radio.vue +105 -0
- package/src/components/social/button/SocialButton.vue +1 -0
- package/src/svg/check.svg +4 -0
package/package.json
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
/* eslint-disable */
|
2
|
+
var icon = require('vue-svgicon')
|
3
|
+
icon.register({
|
4
|
+
'check': {
|
5
|
+
width: 16,
|
6
|
+
height: 16,
|
7
|
+
viewBox: '0 0 12 16',
|
8
|
+
data: '<path pid="0" _fill="#fff" d="M3.03 11.03l7.274-7.273 1.212 1.211-7.274 7.274z"/><path pid="1" _fill="#fff" d="M3.03 11.03L4.244 9.82 1.212 6.788 0 8z"/>'
|
9
|
+
}
|
10
|
+
})
|
package/src/assets/svg/index.js
CHANGED
@@ -73,6 +73,8 @@ export default {
|
|
73
73
|
|
74
74
|
svg {
|
75
75
|
height: 1rem;
|
76
|
+
min-height: 1rem;
|
77
|
+
min-width: 1rem;
|
76
78
|
width: 1rem;
|
77
79
|
}
|
78
80
|
}
|
@@ -84,6 +86,8 @@ export default {
|
|
84
86
|
|
85
87
|
svg {
|
86
88
|
height: 1.25rem;
|
89
|
+
min-height: 1.25rem;
|
90
|
+
min-width: 1.25rem;
|
87
91
|
width: 1.25rem;
|
88
92
|
}
|
89
93
|
}
|
@@ -8,12 +8,12 @@ export default {
|
|
8
8
|
argTypes: {
|
9
9
|
size: {
|
10
10
|
control: { type: 'select' },
|
11
|
-
options: ['normal', '
|
11
|
+
options: ['normal', 'small'],
|
12
12
|
defaultValue: 'normal'
|
13
13
|
},
|
14
14
|
theme: {
|
15
15
|
control: { type: 'select' },
|
16
|
-
options: ['light', 'dark', 'goalkeeper', 'defender', 'midfielder', 'forward',],
|
16
|
+
options: ['light', 'dark', 'goalkeeper', 'defender', 'midfielder', 'forward', 'success'],
|
17
17
|
defaultValue: 'light'
|
18
18
|
},
|
19
19
|
default: {
|
@@ -18,14 +18,14 @@ export default {
|
|
18
18
|
type: String,
|
19
19
|
default: 'normal',
|
20
20
|
validator: function (value) {
|
21
|
-
return ['normal', '
|
21
|
+
return ['normal', 'small'].indexOf(value) !== -1;
|
22
22
|
},
|
23
23
|
},
|
24
24
|
theme: {
|
25
25
|
type: String,
|
26
26
|
default: 'light',
|
27
27
|
validator: function (value) {
|
28
|
-
return ['light', 'dark', 'goalkeeper', 'defender', 'midfielder', 'forward'].indexOf(value) !== -1;
|
28
|
+
return ['light', 'dark', 'goalkeeper', 'defender', 'midfielder', 'forward', 'success'].indexOf(value) !== -1;
|
29
29
|
},
|
30
30
|
},
|
31
31
|
},
|
@@ -34,7 +34,7 @@ export default {
|
|
34
34
|
classes() {
|
35
35
|
return {
|
36
36
|
'mg-label': true,
|
37
|
-
'mg-label--size-
|
37
|
+
'mg-label--size-small': this.size === 'small',
|
38
38
|
'mg-label--size-normal': this.size === 'normal',
|
39
39
|
'mg-label--theme-light': this.theme === 'light',
|
40
40
|
'mg-label--theme-dark': this.theme === 'dark',
|
@@ -42,6 +42,7 @@ export default {
|
|
42
42
|
'mg-label--theme-defender': this.theme === 'defender',
|
43
43
|
'mg-label--theme-midfielder': this.theme === 'midfielder',
|
44
44
|
'mg-label--theme-forward': this.theme === 'forward',
|
45
|
+
'mg-label--theme-success': this.theme === 'success',
|
45
46
|
};
|
46
47
|
}
|
47
48
|
},
|
@@ -63,8 +64,12 @@ export default {
|
|
63
64
|
}
|
64
65
|
|
65
66
|
&--size {
|
66
|
-
&-
|
67
|
+
&-small {
|
67
68
|
font-size: 0.625rem;
|
69
|
+
|
70
|
+
> div {
|
71
|
+
line-height: 1.1;
|
72
|
+
}
|
68
73
|
}
|
69
74
|
|
70
75
|
&-normal {
|
@@ -75,13 +80,13 @@ export default {
|
|
75
80
|
&--theme {
|
76
81
|
&-light {
|
77
82
|
background: #f7f7f7;
|
78
|
-
border-color: #
|
83
|
+
border-color: #f1f1f1;
|
79
84
|
color: map-get($palette, 'text');
|
80
85
|
}
|
81
86
|
|
82
87
|
&-dark {
|
83
88
|
background: #5b5b5b;
|
84
|
-
border-color: #
|
89
|
+
border-color: #555555;
|
85
90
|
color: #fff;
|
86
91
|
}
|
87
92
|
|
@@ -108,6 +113,12 @@ export default {
|
|
108
113
|
border-color: map-get($palette, 'text');
|
109
114
|
color: map-get($palette, 'text');
|
110
115
|
}
|
116
|
+
|
117
|
+
&-success {
|
118
|
+
background: map-get($palette, 'success');
|
119
|
+
border-color: map-get($palette, 'success');
|
120
|
+
color: #fff;
|
121
|
+
}
|
111
122
|
}
|
112
123
|
}
|
113
124
|
</style>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import MgVBox from './VBox.vue';
|
2
|
+
|
3
|
+
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
|
4
|
+
export default {
|
5
|
+
title: 'Content/Box/VBox',
|
6
|
+
component: MgVBox,
|
7
|
+
// More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
|
8
|
+
argTypes: {
|
9
|
+
default: {
|
10
|
+
description: "The default Vue slot",
|
11
|
+
control: {
|
12
|
+
type: 'text',
|
13
|
+
},
|
14
|
+
table: {
|
15
|
+
category: 'Slots',
|
16
|
+
type: {
|
17
|
+
summary: 'html',
|
18
|
+
},
|
19
|
+
}
|
20
|
+
}
|
21
|
+
},
|
22
|
+
};
|
23
|
+
|
24
|
+
// More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
|
25
|
+
const Template = (args, { argTypes }) => ({
|
26
|
+
props: Object.keys(argTypes),
|
27
|
+
components: { MgVBox },
|
28
|
+
template: `<mg-v-box @click="$emit('click')" v-bind="$props">
|
29
|
+
<template v-if="${'default' in args}" v-slot>${args.default}</template>
|
30
|
+
</mg-v-box>`,
|
31
|
+
});
|
32
|
+
|
33
|
+
export const Default = Template.bind({});
|
34
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
35
|
+
Default.args = {
|
36
|
+
default: '<div>This is a vertical card.</div><div>What do you think about?</div>'
|
37
|
+
};
|
38
|
+
|
39
|
+
export const Selected = Template.bind({});
|
40
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
41
|
+
Selected.args = {
|
42
|
+
default: '<div>This is a vertical card.</div><div>What do you think about?</div>',
|
43
|
+
selected: true
|
44
|
+
};
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<template>
|
2
|
+
<div
|
3
|
+
class="p-3"
|
4
|
+
:class="classes"
|
5
|
+
:selected="selected"
|
6
|
+
>
|
7
|
+
<slot></slot>
|
8
|
+
</div>
|
9
|
+
</template>
|
10
|
+
|
11
|
+
<script>
|
12
|
+
export default {
|
13
|
+
name: 'mg-v-box',
|
14
|
+
|
15
|
+
props: {
|
16
|
+
selected: {
|
17
|
+
type: Boolean,
|
18
|
+
default: false
|
19
|
+
},
|
20
|
+
},
|
21
|
+
|
22
|
+
computed: {
|
23
|
+
classes() {
|
24
|
+
return {
|
25
|
+
'mg-v-box': true,
|
26
|
+
'mg-v-box--selected': this.selected === true,
|
27
|
+
};
|
28
|
+
},
|
29
|
+
},
|
30
|
+
};
|
31
|
+
</script>
|
32
|
+
|
33
|
+
<style lang="scss">
|
34
|
+
@import '../../../../assets/palette';
|
35
|
+
|
36
|
+
.mg-v-box {
|
37
|
+
background: white;
|
38
|
+
border-radius: 10px;
|
39
|
+
border: 1px solid #bababa;
|
40
|
+
|
41
|
+
&--selected {
|
42
|
+
background: rgba(map-get($palette, 'brand'), 0.05);
|
43
|
+
border-color: map-get($palette, 'brand');
|
44
|
+
}
|
45
|
+
}
|
46
|
+
</style>
|
@@ -59,10 +59,13 @@ export default {
|
|
59
59
|
svg {
|
60
60
|
fill: map-get($palette, 'expertClub');
|
61
61
|
height: 1.25rem;
|
62
|
+
min-height: 1.25rem;
|
63
|
+
min-width: 1.25rem;
|
64
|
+
width: 1.25rem;
|
62
65
|
}
|
63
66
|
|
64
67
|
&--disabled {
|
65
|
-
opacity: 0.
|
68
|
+
opacity: 0.3 !important;
|
66
69
|
cursor: not-allowed !important;
|
67
70
|
}
|
68
71
|
}
|
@@ -2,7 +2,7 @@ import MgClubPlate from './ClubPlate.vue';
|
|
2
2
|
|
3
3
|
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
|
4
4
|
export default {
|
5
|
-
title: 'Context/Club/
|
5
|
+
title: 'Context/Club/Plate/Club Plate',
|
6
6
|
component: MgClubPlate,
|
7
7
|
};
|
8
8
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import MgClubSquare from './ClubSquare.vue';
|
2
|
+
|
3
|
+
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
|
4
|
+
export default {
|
5
|
+
title: 'Context/Club/Square/Club Square',
|
6
|
+
component: MgClubSquare,
|
7
|
+
};
|
8
|
+
|
9
|
+
// More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
|
10
|
+
const Template = (args, { argTypes }) => ({
|
11
|
+
props: Object.keys(argTypes),
|
12
|
+
components: { MgClubSquare },
|
13
|
+
template: `<mg-club-square v-bind="$props"></mg-club-square>`,
|
14
|
+
});
|
15
|
+
|
16
|
+
export const Default = Template.bind({});
|
17
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
18
|
+
Default.args = {
|
19
|
+
};
|
20
|
+
|
21
|
+
export const Trial = Template.bind({});
|
22
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
23
|
+
Trial.args = {
|
24
|
+
trial: true
|
25
|
+
};
|
26
|
+
|
27
|
+
export const Disabled = Template.bind({});
|
28
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
29
|
+
Disabled.args = {
|
30
|
+
disabled: true
|
31
|
+
};
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<template>
|
2
|
+
<div
|
3
|
+
class="d-flex rounded p-2"
|
4
|
+
:class="classes"
|
5
|
+
>
|
6
|
+
<svgicon v-bind:name="icon"></svgicon>
|
7
|
+
</div>
|
8
|
+
</template>
|
9
|
+
|
10
|
+
<script>
|
11
|
+
export default {
|
12
|
+
name: 'mg-club-square',
|
13
|
+
|
14
|
+
props: {
|
15
|
+
trial: {
|
16
|
+
type: Boolean,
|
17
|
+
default: false
|
18
|
+
},
|
19
|
+
|
20
|
+
disabled: {
|
21
|
+
type: Boolean,
|
22
|
+
default: false
|
23
|
+
},
|
24
|
+
},
|
25
|
+
|
26
|
+
computed: {
|
27
|
+
classes() {
|
28
|
+
return {
|
29
|
+
'mg-club-square': true,
|
30
|
+
'mg-club-square--disabled': this.disabled === true,
|
31
|
+
};
|
32
|
+
},
|
33
|
+
icon () {
|
34
|
+
return this.trial ? 'star-stroke-p' : 'star-c';
|
35
|
+
}
|
36
|
+
},
|
37
|
+
};
|
38
|
+
</script>
|
39
|
+
|
40
|
+
<style lang="scss">
|
41
|
+
@import '../../../../assets/palette';
|
42
|
+
|
43
|
+
.mg-club-square {
|
44
|
+
background-color: lighten(map-get($palette, 'expertClub'), 55%);
|
45
|
+
height: 2.25rem;
|
46
|
+
width: 2.25rem;
|
47
|
+
|
48
|
+
svg {
|
49
|
+
fill: map-get($palette, 'expertClub');
|
50
|
+
height: 1.25rem;
|
51
|
+
min-height: 1.25rem;
|
52
|
+
min-width: 1.25rem;
|
53
|
+
width: 1.25rem;
|
54
|
+
}
|
55
|
+
|
56
|
+
&--disabled {
|
57
|
+
background-color: #efefef;
|
58
|
+
|
59
|
+
svg {
|
60
|
+
fill: #6d6d6d;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
</style>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import MgRadio from './Radio.vue';
|
2
|
+
|
3
|
+
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
|
4
|
+
export default {
|
5
|
+
title: 'Form/Radio',
|
6
|
+
component: MgRadio,
|
7
|
+
// More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
|
8
|
+
argTypes: {
|
9
|
+
},
|
10
|
+
};
|
11
|
+
|
12
|
+
// More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
|
13
|
+
const Template = (args, { argTypes }) => ({
|
14
|
+
props: Object.keys(argTypes),
|
15
|
+
components: { MgRadio },
|
16
|
+
template: `<mg-radio @input="$emit('input')" v-bind="$props"></mg-radio>`,
|
17
|
+
});
|
18
|
+
|
19
|
+
export const Default = Template.bind({});
|
20
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
21
|
+
Default.args = {
|
22
|
+
value: 'given input'
|
23
|
+
};
|
24
|
+
|
25
|
+
export const Checked = Template.bind({});
|
26
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
27
|
+
Checked.args = {
|
28
|
+
checked: true,
|
29
|
+
value: 'given input'
|
30
|
+
};
|
@@ -0,0 +1,105 @@
|
|
1
|
+
<template>
|
2
|
+
<label :class="classes" class="m-0">
|
3
|
+
<input
|
4
|
+
class="d-none"
|
5
|
+
type="radio"
|
6
|
+
:value="value"
|
7
|
+
@input="onInput"
|
8
|
+
/>
|
9
|
+
<span class="d-inline-flex justify-content-center align-items-center">
|
10
|
+
<svgicon name="check"></svgicon>
|
11
|
+
</span>
|
12
|
+
</label>
|
13
|
+
</template>
|
14
|
+
|
15
|
+
<script>
|
16
|
+
export default {
|
17
|
+
name: 'mg-input',
|
18
|
+
|
19
|
+
props: {
|
20
|
+
value: {
|
21
|
+
type: [String, Number],
|
22
|
+
default: null
|
23
|
+
},
|
24
|
+
|
25
|
+
checked: {
|
26
|
+
type: Boolean,
|
27
|
+
default: false
|
28
|
+
},
|
29
|
+
},
|
30
|
+
|
31
|
+
computed: {
|
32
|
+
classes() {
|
33
|
+
return {
|
34
|
+
'mg-radio': true,
|
35
|
+
'mg-radio--checked': this.checked === true,
|
36
|
+
};
|
37
|
+
}
|
38
|
+
},
|
39
|
+
|
40
|
+
methods: {
|
41
|
+
onInput($event) {
|
42
|
+
this.$emit('input', $event.target.value);
|
43
|
+
},
|
44
|
+
}
|
45
|
+
};
|
46
|
+
</script>
|
47
|
+
|
48
|
+
<style lang="scss">
|
49
|
+
@import '../../../assets/palette';
|
50
|
+
|
51
|
+
.mg-radio {
|
52
|
+
//border-bottom: 1px solid #d8d8d8;
|
53
|
+
|
54
|
+
input {
|
55
|
+
//background-color: #fff;
|
56
|
+
//color: #666;
|
57
|
+
//font-family: 'Raleway', sans-serif;
|
58
|
+
//font-size: 1rem;
|
59
|
+
//font-weight: 600;
|
60
|
+
//letter-spacing: 0.54px;
|
61
|
+
//padding: 0.5rem;
|
62
|
+
|
63
|
+
//&:-webkit-autofill {
|
64
|
+
// -webkit-box-shadow: 0 0 0 30px white inset;
|
65
|
+
// -webkit-text-fill-color: #666666;
|
66
|
+
// caret-color: #666666;
|
67
|
+
//}
|
68
|
+
|
69
|
+
//&:focus {
|
70
|
+
// outline: 0;
|
71
|
+
//}
|
72
|
+
|
73
|
+
//&::placeholder {
|
74
|
+
// color: #ccc;
|
75
|
+
// font-size: 0.8125rem;
|
76
|
+
// font-weight: 600;
|
77
|
+
//}
|
78
|
+
}
|
79
|
+
|
80
|
+
span {
|
81
|
+
background-color: #fff;
|
82
|
+
border: 1px solid #989898;
|
83
|
+
border-radius: 50%;
|
84
|
+
height: 1.375rem;
|
85
|
+
width: 1.375rem;
|
86
|
+
|
87
|
+
svg {
|
88
|
+
display: none;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
&--checked {
|
93
|
+
span {
|
94
|
+
background-color: map-get($palette, 'brand');
|
95
|
+
border-color: map-get($palette, 'brand');
|
96
|
+
|
97
|
+
svg {
|
98
|
+
display: block;
|
99
|
+
fill: white;
|
100
|
+
height: 18px;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
104
|
+
}
|
105
|
+
</style>
|
@@ -0,0 +1,4 @@
|
|
1
|
+
<svg viewBox="0 0 12 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<rect x="3.03052" y="11.0305" width="10.2857" height="1.71429" transform="rotate(-45 3.03052 11.0305)" fill="white"/>
|
3
|
+
<rect width="1.71429" height="4.28571" transform="matrix(0.707107 -0.707107 -0.707107 -0.707107 3.03052 11.0305)" fill="white"/>
|
4
|
+
</svg>
|