@magicgol/polyjuice 0.56.3 → 0.57.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/components/color/text/Text.vue +19 -1
- package/src/components/components/stack/Stack.stories.js +45 -0
- package/src/components/components/stack/Stack.vue +32 -0
- package/src/components/components/stack/layer/StackLayer.stories.js +45 -0
- package/src/components/components/stack/layer/StackLayer.vue +29 -0
- package/src/components/context/user/profile-image/ProfileImage.vue +1 -0
package/package.json
CHANGED
@@ -11,7 +11,7 @@ export default {
|
|
11
11
|
type: String,
|
12
12
|
default: null,
|
13
13
|
validator: function (value) {
|
14
|
-
return ['club'].indexOf(value) !== -1;
|
14
|
+
return ['club', 'success', 'warning', 'error'].indexOf(value) !== -1;
|
15
15
|
},
|
16
16
|
}
|
17
17
|
},
|
@@ -21,6 +21,9 @@ export default {
|
|
21
21
|
return {
|
22
22
|
'mg-text': true,
|
23
23
|
'mg-text--theme-club': this.theme === 'club',
|
24
|
+
'mg-text--theme-success': this.theme === 'success',
|
25
|
+
'mg-text--theme-warning': this.theme === 'warning',
|
26
|
+
'mg-text--theme-error': this.theme === 'error',
|
24
27
|
};
|
25
28
|
}
|
26
29
|
},
|
@@ -39,6 +42,21 @@ export default {
|
|
39
42
|
-webkit-text-fill-color: transparent;
|
40
43
|
}
|
41
44
|
}
|
45
|
+
&-success {
|
46
|
+
> span {
|
47
|
+
color: map-get($palette, 'success');
|
48
|
+
}
|
49
|
+
}
|
50
|
+
&-warning {
|
51
|
+
> span {
|
52
|
+
color: map-get($palette, 'warning');
|
53
|
+
}
|
54
|
+
}
|
55
|
+
&-error {
|
56
|
+
> span {
|
57
|
+
color: map-get($palette, 'error');
|
58
|
+
}
|
59
|
+
}
|
42
60
|
}
|
43
61
|
}
|
44
62
|
</style>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import MgLabel from './Label.vue';
|
2
|
+
|
3
|
+
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
|
4
|
+
export default {
|
5
|
+
title: 'Components/Label',
|
6
|
+
component: MgLabel,
|
7
|
+
// More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
|
8
|
+
argTypes: {
|
9
|
+
size: {
|
10
|
+
control: { type: 'select' },
|
11
|
+
options: ['normal', 'small'],
|
12
|
+
defaultValue: 'normal'
|
13
|
+
},
|
14
|
+
theme: {
|
15
|
+
control: { type: 'select' },
|
16
|
+
options: ['light', 'dark', 'tag', 'target', 'club', 'trial', 'goalkeeper', 'defender', 'midfielder', 'forward', 'success'],
|
17
|
+
defaultValue: 'light'
|
18
|
+
},
|
19
|
+
default: {
|
20
|
+
description: "The default Vue slot",
|
21
|
+
control: {
|
22
|
+
type: 'text',
|
23
|
+
},
|
24
|
+
table: {
|
25
|
+
category: 'Slots',
|
26
|
+
type: {
|
27
|
+
summary: 'html',
|
28
|
+
},
|
29
|
+
}
|
30
|
+
}
|
31
|
+
},
|
32
|
+
};
|
33
|
+
|
34
|
+
// More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
|
35
|
+
const Template = (args, { argTypes }) => ({
|
36
|
+
props: Object.keys(argTypes),
|
37
|
+
components: { MgLabel },
|
38
|
+
template: `<mg-label v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-label>`,
|
39
|
+
});
|
40
|
+
|
41
|
+
export const Default = Template.bind({});
|
42
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
43
|
+
Default.args = {
|
44
|
+
default: 'etichetta'
|
45
|
+
};
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<template>
|
2
|
+
<div
|
3
|
+
class="position-relative"
|
4
|
+
:class="classes"
|
5
|
+
>
|
6
|
+
<slot></slot>
|
7
|
+
<div class="position-absolute h-100 w-100">
|
8
|
+
<slot name="layers"></slot>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
</template>
|
12
|
+
|
13
|
+
<script>
|
14
|
+
export default {
|
15
|
+
name: 'mg-stack',
|
16
|
+
|
17
|
+
computed: {
|
18
|
+
classes() {
|
19
|
+
return {
|
20
|
+
'mg-stack': true,
|
21
|
+
};
|
22
|
+
}
|
23
|
+
},
|
24
|
+
};
|
25
|
+
</script>
|
26
|
+
|
27
|
+
<style lang="scss">
|
28
|
+
@import '../../../assets/palette';
|
29
|
+
|
30
|
+
.mg-stack {
|
31
|
+
}
|
32
|
+
</style>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import MgLabel from './Label.vue';
|
2
|
+
|
3
|
+
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
|
4
|
+
export default {
|
5
|
+
title: 'Components/Label',
|
6
|
+
component: MgLabel,
|
7
|
+
// More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
|
8
|
+
argTypes: {
|
9
|
+
size: {
|
10
|
+
control: { type: 'select' },
|
11
|
+
options: ['normal', 'small'],
|
12
|
+
defaultValue: 'normal'
|
13
|
+
},
|
14
|
+
theme: {
|
15
|
+
control: { type: 'select' },
|
16
|
+
options: ['light', 'dark', 'tag', 'target', 'club', 'trial', 'goalkeeper', 'defender', 'midfielder', 'forward', 'success'],
|
17
|
+
defaultValue: 'light'
|
18
|
+
},
|
19
|
+
default: {
|
20
|
+
description: "The default Vue slot",
|
21
|
+
control: {
|
22
|
+
type: 'text',
|
23
|
+
},
|
24
|
+
table: {
|
25
|
+
category: 'Slots',
|
26
|
+
type: {
|
27
|
+
summary: 'html',
|
28
|
+
},
|
29
|
+
}
|
30
|
+
}
|
31
|
+
},
|
32
|
+
};
|
33
|
+
|
34
|
+
// More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
|
35
|
+
const Template = (args, { argTypes }) => ({
|
36
|
+
props: Object.keys(argTypes),
|
37
|
+
components: { MgLabel },
|
38
|
+
template: `<mg-label v-bind="$props"><template v-if="${'default' in args}" v-slot>${args.default}</template></mg-label>`,
|
39
|
+
});
|
40
|
+
|
41
|
+
export const Default = Template.bind({});
|
42
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
43
|
+
Default.args = {
|
44
|
+
default: 'etichetta'
|
45
|
+
};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<template>
|
2
|
+
<div
|
3
|
+
:class="classes"
|
4
|
+
>
|
5
|
+
<slot></slot>
|
6
|
+
</div>
|
7
|
+
</template>
|
8
|
+
|
9
|
+
<script>
|
10
|
+
export default {
|
11
|
+
name: 'mg-stack-layer',
|
12
|
+
|
13
|
+
computed: {
|
14
|
+
classes() {
|
15
|
+
return {
|
16
|
+
'mg-stack-layer': true,
|
17
|
+
};
|
18
|
+
}
|
19
|
+
},
|
20
|
+
};
|
21
|
+
</script>
|
22
|
+
|
23
|
+
<style lang="scss">
|
24
|
+
@import '../../../../assets/palette';
|
25
|
+
|
26
|
+
.mg-stack-layer {
|
27
|
+
|
28
|
+
}
|
29
|
+
</style>
|