@magicgol/polyjuice 0.57.0 → 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/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
@@ -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>
|