@magicgol/polyjuice 0.33.5 → 0.33.8
Sign up to get free protection for your applications and to get access to all the features.
- package/.storybook/main.js +0 -4
- package/package.json +1 -1
- package/src/components/components/badge/Badge.vue +1 -0
- package/src/components/components/filter-option/FilterOption.vue +11 -1
- package/src/components/context/footballer/list/footballer-list-body/FootballerListBody.vue +1 -1
- package/src/components/form/checkbox/checkbox/Checkbox.vue +7 -1
- package/src/components/modal/selection-box/SelectionBox.stories.js +15 -1
- package/src/components/modal/selection-box/SelectionBox.vue +34 -4
package/.storybook/main.js
CHANGED
package/package.json
CHANGED
@@ -6,7 +6,10 @@
|
|
6
6
|
<div class="p-2">
|
7
7
|
<slot></slot>
|
8
8
|
</div>
|
9
|
-
<div
|
9
|
+
<div
|
10
|
+
class="mg-filter-option-circle d-flex align-items-center justify-content-center bg-white rounded-circle"
|
11
|
+
@click="onClick"
|
12
|
+
>
|
10
13
|
<svgicon name="x"></svgicon>
|
11
14
|
</div>
|
12
15
|
</div>
|
@@ -23,6 +26,12 @@ export default {
|
|
23
26
|
};
|
24
27
|
}
|
25
28
|
},
|
29
|
+
|
30
|
+
methods: {
|
31
|
+
onClick () {
|
32
|
+
this.$emit('click');
|
33
|
+
}
|
34
|
+
}
|
26
35
|
};
|
27
36
|
</script>
|
28
37
|
|
@@ -39,6 +48,7 @@ export default {
|
|
39
48
|
height: 2rem;
|
40
49
|
|
41
50
|
&-circle {
|
51
|
+
cursor: pointer;
|
42
52
|
height: 1.5rem;
|
43
53
|
width: 1.5rem;
|
44
54
|
|
@@ -17,7 +17,10 @@
|
|
17
17
|
<span class="mg-checkbox-check align-middle d-inline-block position-relative"></span>
|
18
18
|
<!-- end of THE SQUARE -->
|
19
19
|
<!-- TEXT AS LABEL -->
|
20
|
-
<span
|
20
|
+
<span
|
21
|
+
v-if="slotVisibility"
|
22
|
+
class="align-middle pl-2"
|
23
|
+
>
|
21
24
|
<slot></slot>
|
22
25
|
</span>
|
23
26
|
<!-- end of TEXT AS LABEL -->
|
@@ -48,6 +51,9 @@ export default {
|
|
48
51
|
'mg-checkbox': true,
|
49
52
|
'mg-checkbox--disabled': this.disabled,
|
50
53
|
};
|
54
|
+
},
|
55
|
+
slotVisibility() {
|
56
|
+
return 'default' in this.$slots && !!this.$slots.default;
|
51
57
|
}
|
52
58
|
},
|
53
59
|
};
|
@@ -20,6 +20,18 @@ export default {
|
|
20
20
|
summary: 'html',
|
21
21
|
},
|
22
22
|
}
|
23
|
+
},
|
24
|
+
detail: {
|
25
|
+
description: "The detail Vue slot",
|
26
|
+
control: {
|
27
|
+
type: 'text',
|
28
|
+
},
|
29
|
+
table: {
|
30
|
+
category: 'Slots',
|
31
|
+
type: {
|
32
|
+
summary: 'html',
|
33
|
+
},
|
34
|
+
}
|
23
35
|
}
|
24
36
|
},
|
25
37
|
};
|
@@ -30,6 +42,7 @@ const Template = (args, { argTypes }) => ({
|
|
30
42
|
components: { MgSelectionBox, MgPrimaryButton, MgTertiaryButton },
|
31
43
|
template: `<mg-selection-box v-bind="$props">
|
32
44
|
<template v-if="${'default' in args}" v-slot>${args.default}</template>
|
45
|
+
<template v-if="${'detail' in args}" v-slot:detail>${args.detail}</template>
|
33
46
|
<template v-slot:cancel>
|
34
47
|
<mg-tertiary-button>Annulla</mg-tertiary-button>
|
35
48
|
</template>
|
@@ -42,7 +55,8 @@ const Template = (args, { argTypes }) => ({
|
|
42
55
|
export const Default = Template.bind({});
|
43
56
|
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
44
57
|
Default.args = {
|
45
|
-
default: 'this is the content'
|
58
|
+
default: 'this is the content',
|
59
|
+
detail: 'this is the detail'
|
46
60
|
};
|
47
61
|
|
48
62
|
const PaymentTemplate = (args, { argTypes }) => ({
|
@@ -4,7 +4,9 @@
|
|
4
4
|
>
|
5
5
|
<div class="mg-selection-box-content fixed-bottom p-2">
|
6
6
|
<div class="bg-white rounded w-100 h-100 p-2">
|
7
|
-
<div class="
|
7
|
+
<div class="mg-selection-box-title text-center"><slot></slot></div>
|
8
|
+
<div><slot name="summary"></slot></div>
|
9
|
+
<div v-if="expanded"><slot name="detail"></slot></div>
|
8
10
|
<div class="d-flex align-items-center mt-2">
|
9
11
|
<div class="w-50 text-center">
|
10
12
|
<slot name="cancel"></slot>
|
@@ -23,13 +25,31 @@
|
|
23
25
|
export default {
|
24
26
|
name: 'mg-selection-box',
|
25
27
|
|
28
|
+
props: {
|
29
|
+
expanded: {
|
30
|
+
type: Boolean,
|
31
|
+
default: false
|
32
|
+
}
|
33
|
+
},
|
34
|
+
|
26
35
|
computed: {
|
27
36
|
classes() {
|
28
37
|
return {
|
29
38
|
'mg-selection-box': true,
|
39
|
+
'mg-selection-box--expanded': this.expanded === true,
|
30
40
|
};
|
31
|
-
}
|
41
|
+
}
|
32
42
|
},
|
43
|
+
|
44
|
+
watch: {
|
45
|
+
expanded (value) {
|
46
|
+
if (value) {
|
47
|
+
document.body.classList.add('overflow-hidden');
|
48
|
+
} else {
|
49
|
+
document.body.classList.remove('overflow-hidden');
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
33
53
|
};
|
34
54
|
</script>
|
35
55
|
|
@@ -39,15 +59,25 @@ export default {
|
|
39
59
|
height: 7.5rem;
|
40
60
|
}
|
41
61
|
|
62
|
+
&-title {
|
63
|
+
font-size: 0.8125rem;
|
64
|
+
font-weight: 500;
|
65
|
+
}
|
66
|
+
|
42
67
|
&-content {
|
43
68
|
bottom: 0;
|
44
69
|
|
45
70
|
> div {
|
46
71
|
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3);
|
47
72
|
font-family: 'Ubuntu', sans-serif;
|
48
|
-
font-size: 0.8125rem;
|
49
|
-
font-weight: 500;
|
50
73
|
}
|
51
74
|
}
|
75
|
+
|
76
|
+
&--expanded {
|
77
|
+
background-color: rgba(0, 0, 0, 0.7);
|
78
|
+
height: 100%;
|
79
|
+
position: fixed;
|
80
|
+
width: 100%;
|
81
|
+
}
|
52
82
|
}
|
53
83
|
</style>
|