@magicgol/polyjuice 0.15.0 → 0.16.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 +1 -0
- package/src/components/box/filing-cabinet/FilingCabinet.vue +5 -34
- package/src/components/card/vertical-card/VCard.stories.js +5 -0
- package/src/components/card/vertical-card/VCard.vue +27 -3
- package/src/components/footballer/role-badge/RoleBadge.vue +4 -3
- package/src/components/label/traffic-light/TrafficLight.stories.js +41 -0
- package/src/components/label/traffic-light/TrafficLight.vue +60 -0
- package/src/components/social/button/SocialButton.vue +4 -6
- package/src/components/typography/h1/HeadingOne.stories.js +1 -1
- package/src/components/typography/h3/HeadingThree.stories.js +34 -0
- package/src/components/typography/h3/HeadingThree.vue +25 -0
- package/src/components/typography/h4/HeadingFour.stories.js +1 -1
- package/src/components/typography/h6/HeadingSix.stories.js +1 -1
package/package.json
CHANGED
package/src/assets/palette.scss
CHANGED
@@ -8,45 +8,16 @@
|
|
8
8
|
<slot name="tab-right"></slot>
|
9
9
|
</div>
|
10
10
|
</div>
|
11
|
-
<div class="
|
12
|
-
<
|
11
|
+
<div class="p-4">
|
12
|
+
<div class="px-2">
|
13
|
+
<slot></slot>
|
14
|
+
</div>
|
13
15
|
</div>
|
14
16
|
</div>
|
15
17
|
</template>
|
16
18
|
|
17
19
|
<script>
|
18
20
|
export default {
|
19
|
-
name: 'mg-filing-cabinet'
|
20
|
-
|
21
|
-
props: {
|
22
|
-
// icon: {
|
23
|
-
// type: String
|
24
|
-
// },
|
25
|
-
// level: {
|
26
|
-
// type: String,
|
27
|
-
// default: 'normal',
|
28
|
-
// validator: function (value) {
|
29
|
-
// return ['normal', 'club'].indexOf(value) !== -1;
|
30
|
-
// },
|
31
|
-
// }
|
32
|
-
},
|
33
|
-
|
34
|
-
computed: {
|
35
|
-
classes() {
|
36
|
-
return {
|
37
|
-
'mg-filing-cabinet': true,
|
38
|
-
// 'mg-icon-badge--club': this.level === 'club',
|
39
|
-
// 'mg-icon-badge--normal': this.level === 'normal',
|
40
|
-
};
|
41
|
-
},
|
42
|
-
},
|
21
|
+
name: 'mg-filing-cabinet'
|
43
22
|
};
|
44
23
|
</script>
|
45
|
-
|
46
|
-
<style lang="scss">
|
47
|
-
@import '../../../assets/palette';
|
48
|
-
|
49
|
-
.mg-filing-cabinet {
|
50
|
-
|
51
|
-
}
|
52
|
-
</style>
|
@@ -4,9 +4,9 @@
|
|
4
4
|
:class="classes"
|
5
5
|
@click="onClick"
|
6
6
|
>
|
7
|
-
<div class="p-3
|
7
|
+
<div class="mg-v-card-content p-3"><slot></slot></div>
|
8
8
|
<div
|
9
|
-
class="mg-footer p-3"
|
9
|
+
class="mg-v-card-footer p-3"
|
10
10
|
v-if="footerVisibility"
|
11
11
|
><slot name="footer"></slot></div>
|
12
12
|
</div>
|
@@ -16,10 +16,21 @@
|
|
16
16
|
export default {
|
17
17
|
name: 'mg-v-card',
|
18
18
|
|
19
|
+
props: {
|
20
|
+
theme: {
|
21
|
+
type: String,
|
22
|
+
default: null,
|
23
|
+
validator: function (value) {
|
24
|
+
return ['club'].indexOf(value) !== -1;
|
25
|
+
},
|
26
|
+
}
|
27
|
+
},
|
28
|
+
|
19
29
|
computed: {
|
20
30
|
classes() {
|
21
31
|
return {
|
22
32
|
'mg-v-card': true,
|
33
|
+
'mg-v-card--theme-club': this.theme === 'club',
|
23
34
|
};
|
24
35
|
},
|
25
36
|
footerVisibility() {
|
@@ -41,7 +52,20 @@ export default {
|
|
41
52
|
.mg-v-card {
|
42
53
|
box-shadow: 0 8px 22px 0 rgba(0, 0, 0, 0.3);
|
43
54
|
|
44
|
-
|
55
|
+
&-content {
|
56
|
+
background: white;
|
57
|
+
}
|
58
|
+
|
59
|
+
&--theme {
|
60
|
+
&-club {
|
61
|
+
& .mg-v-card-content {
|
62
|
+
background: linear-gradient(90deg, #D1EFFF 0%, #DDDAFC 99.65%) !important;
|
63
|
+
color: #777;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
&-footer {
|
45
69
|
background-color: rgba(map-get($palette, 'brand'), 0.04);
|
46
70
|
}
|
47
71
|
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import MgTrafficLight from './TrafficLight.vue';
|
2
|
+
|
3
|
+
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
|
4
|
+
export default {
|
5
|
+
title: 'Label/Traffic Light',
|
6
|
+
component: MgTrafficLight,
|
7
|
+
// More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
|
8
|
+
argTypes: {
|
9
|
+
light: {
|
10
|
+
control: { type: 'select' },
|
11
|
+
options: ['red', 'yellow', 'green'],
|
12
|
+
defaultValue: 'green'
|
13
|
+
},
|
14
|
+
default: {
|
15
|
+
description: "The default Vue slot",
|
16
|
+
control: {
|
17
|
+
type: 'text',
|
18
|
+
},
|
19
|
+
table: {
|
20
|
+
category: 'Slots',
|
21
|
+
type: {
|
22
|
+
summary: 'html',
|
23
|
+
},
|
24
|
+
}
|
25
|
+
}
|
26
|
+
},
|
27
|
+
};
|
28
|
+
|
29
|
+
// More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
|
30
|
+
const Template = (args, { argTypes }) => ({
|
31
|
+
props: Object.keys(argTypes),
|
32
|
+
components: { MgTrafficLight },
|
33
|
+
template: `<mg-traffic-light v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-traffic-light>`,
|
34
|
+
});
|
35
|
+
|
36
|
+
export const Default = Template.bind({});
|
37
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
38
|
+
Default.args = {
|
39
|
+
light: 'green',
|
40
|
+
default: '300',
|
41
|
+
};
|
@@ -0,0 +1,60 @@
|
|
1
|
+
<template>
|
2
|
+
<div
|
3
|
+
class="d-inline-flex bg-white align-items-center px-3"
|
4
|
+
:class="classes"
|
5
|
+
>
|
6
|
+
<div><slot></slot></div>
|
7
|
+
</div>
|
8
|
+
</template>
|
9
|
+
|
10
|
+
<script>
|
11
|
+
export default {
|
12
|
+
name: 'mg-traffic-light',
|
13
|
+
|
14
|
+
props: {
|
15
|
+
light: {
|
16
|
+
type: String,
|
17
|
+
default: 'green',
|
18
|
+
validator: function (value) {
|
19
|
+
return ['red', 'yellow', 'green'].indexOf(value) !== -1;
|
20
|
+
},
|
21
|
+
},
|
22
|
+
},
|
23
|
+
|
24
|
+
computed: {
|
25
|
+
classes() {
|
26
|
+
return {
|
27
|
+
'mg-traffic-light': true,
|
28
|
+
'mg-traffic-light--error': this.light === 'red',
|
29
|
+
'mg-traffic-light--warning': this.light === 'yellow',
|
30
|
+
'mg-traffic-light--success': this.light === 'green',
|
31
|
+
};
|
32
|
+
}
|
33
|
+
},
|
34
|
+
};
|
35
|
+
</script>
|
36
|
+
|
37
|
+
<style lang="scss">
|
38
|
+
@import '../../../assets/palette';
|
39
|
+
|
40
|
+
.mg-traffic-light {
|
41
|
+
border: 2px solid;
|
42
|
+
border-radius: 50px;
|
43
|
+
font-family: 'Ubuntu', sans-serif;
|
44
|
+
font-size: 1.3125rem;
|
45
|
+
font-weight: 500;
|
46
|
+
height: 2.25rem;
|
47
|
+
|
48
|
+
&--error {
|
49
|
+
border-color: map-get($palette, 'error');
|
50
|
+
}
|
51
|
+
|
52
|
+
&--warning {
|
53
|
+
border-color: map-get($palette, 'warning');
|
54
|
+
}
|
55
|
+
|
56
|
+
&--success {
|
57
|
+
border-color: map-get($palette, 'success');
|
58
|
+
}
|
59
|
+
}
|
60
|
+
</style>
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
2
|
+
<button
|
3
|
+
type="button"
|
3
4
|
class="p-3 d-flex align-items-center w-100 text-white border-0"
|
4
5
|
:class="classes"
|
5
|
-
:href="href"
|
6
6
|
:disabled="disabled"
|
7
7
|
@click="$emit('click')"
|
8
8
|
>
|
9
9
|
<span class="flex-grow-0"><svgicon :name="channel"></svgicon></span>
|
10
10
|
<span class="flex-grow-1 text-center"><slot></slot></span>
|
11
|
-
</
|
11
|
+
</button>
|
12
12
|
</template>
|
13
13
|
|
14
14
|
<script>
|
@@ -26,9 +26,6 @@ export default {
|
|
26
26
|
validator: function (value) {
|
27
27
|
return ['facebook', 'google'].indexOf(value) !== -1;
|
28
28
|
},
|
29
|
-
},
|
30
|
-
href: {
|
31
|
-
type: String
|
32
29
|
}
|
33
30
|
},
|
34
31
|
|
@@ -61,6 +58,7 @@ export default {
|
|
61
58
|
font-size: 0.8125rem;
|
62
59
|
font-weight: 700;
|
63
60
|
outline: none;
|
61
|
+
text-decoration: none;
|
64
62
|
|
65
63
|
svg {
|
66
64
|
fill: white;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import MgHeadingThree from './HeadingThree.vue';
|
2
|
+
|
3
|
+
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
|
4
|
+
export default {
|
5
|
+
title: 'Typography/Heading/H3',
|
6
|
+
component: MgHeadingThree,
|
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 => ({
|
26
|
+
components: { MgHeadingThree },
|
27
|
+
template: `<mg-heading-three><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-heading-three>`,
|
28
|
+
});
|
29
|
+
|
30
|
+
export const Default = Template.bind({});
|
31
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
32
|
+
Default.args = {
|
33
|
+
default: 'heading 3'
|
34
|
+
};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<template>
|
2
|
+
<div v-bind:class="classes"><slot></slot></div>
|
3
|
+
</template>
|
4
|
+
|
5
|
+
<script>
|
6
|
+
export default {
|
7
|
+
name: 'mg-heading-three',
|
8
|
+
|
9
|
+
computed: {
|
10
|
+
classes() {
|
11
|
+
return {
|
12
|
+
'mg-h3': true,
|
13
|
+
};
|
14
|
+
}
|
15
|
+
},
|
16
|
+
};
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<style lang="scss">
|
20
|
+
.mg-h3 {
|
21
|
+
font-family: 'Ubuntu', sans-serif;
|
22
|
+
font-size: 1rem;
|
23
|
+
font-weight: 500;
|
24
|
+
}
|
25
|
+
</style>
|