@weni/unnnic-system 2.0.16 → 2.0.17
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/dist/style.css +1 -1
- package/dist/unnnic.mjs +1044 -1033
- package/dist/unnnic.umd.js +18 -18
- package/package.json +3 -2
- package/src/components/AudioRecorder/AudioHandler.vue +2 -0
- package/src/components/AudioRecorder/AudioPlayer.vue +2 -0
- package/src/components/AudioRecorder/AudioRecorder.vue +6 -4
- package/src/components/Card/CardData.vue +2 -2
- package/src/components/CardProject/CardProject.vue +6 -6
- package/src/components/ChartRainbow/ChartRainbow.vue +4 -4
- package/src/components/ChatsMessage/ChatsMessage.vue +11 -2
- package/src/components/ChatsMessage/ChatsMessageStatusBackdrop.vue +1 -4
- package/src/components/DateFilter/DateFilter.vue +2 -2
- package/src/components/DatePicker/DatePicker.vue +2 -2
- package/src/components/Dropdown/LanguageSelect.vue +7 -7
- package/src/components/ImportCard/ImportCard.vue +2 -2
- package/src/components/ProgressBar/ProgressBar.vue +3 -3
- package/src/components/Sidebar/SidebarPrimary.vue +15 -5
- package/src/components/TabsExpanded/TabsExpanded.vue +1 -0
- package/src/stories/Accordion.stories.js +35 -40
- package/src/stories/Alert.stories.js +98 -83
- package/src/stories/Breadcrumb.stories.js +12 -23
- package/src/stories/ButtonIcon.stories.js +2 -2
- package/src/stories/CardCompany.stories.js +52 -58
- package/src/stories/CardData.stories.js +8 -26
- package/src/stories/CardImage.stories.js +49 -48
- package/src/stories/CardInformation.stories.js +33 -54
- package/src/stories/CardProject.stories.js +50 -52
- package/src/stories/Carousel.stories.js +32 -27
- package/src/stories/ChartBar.stories.js +82 -102
- package/src/stories/ChartLine.stories.js +42 -52
- package/src/stories/ChartMultiLine.stories.js +39 -49
- package/src/stories/ChartRainbow.stories.js +2 -2
- package/src/stories/ChatText.stories.js +38 -44
- package/src/stories/ChatsContact.stories.js +57 -54
- package/src/stories/ChatsDashboardTagLive.stories.js +1 -8
- package/src/stories/ChatsHeader.stories.js +63 -74
- package/src/stories/ChatsMessage.stories.js +208 -216
- package/src/stories/CircleProgressBar.stories.js +4 -20
- package/src/stories/Collapse.stories.js +49 -55
- package/src/stories/Comment.stories.js +57 -54
- package/src/stories/DataArea.stories.js +60 -65
- package/src/stories/DateFilter.stories.js +7 -12
- package/src/stories/DatePicker.stories.js +50 -68
- package/src/stories/Disclaimer.stories.js +12 -27
- package/src/stories/Drawer.stories.js +116 -110
- package/src/stories/Dropdown.stories.js +22 -12
- package/src/stories/FormElement.stories.js +18 -23
- package/src/stories/Grid.stories.js +4 -10
- package/src/stories/Icon.stories.js +2 -2
- package/src/stories/IconLoading.stories.js +5 -11
- package/src/stories/ImportCard.stories.js +12 -19
- package/src/stories/Indicator.stories.js +8 -13
- package/src/stories/InputDatePicker.stories.js +27 -32
- package/src/stories/LanguageSelect.stories.js +12 -16
- package/src/stories/Modal.stories.js +66 -40
- package/src/stories/MoodRating.stories.js +27 -32
- package/src/stories/MultiSelect.stories.js +56 -50
- package/src/stories/Pagination.stories.js +21 -29
- package/src/stories/ProgressBar.stories.js +19 -54
- package/src/stories/Radio.stories.js +36 -35
- package/src/stories/Sidebar.stories.js +29 -27
- package/src/stories/SidebarPrimary.stories.js +87 -80
- package/src/stories/SkeletonLoading.stories.js +12 -29
- package/src/stories/StarRating.stories.js +29 -33
- package/src/stories/Switch.stories.js +26 -19
- package/src/stories/TabsExpanded.stories.js +56 -58
- package/src/stories/TextArea.stories.js +29 -34
- package/src/stories/TransitionRipple.stories.js +19 -18
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import UnnnicModal from '../components/Modal/Modal.vue';
|
|
2
|
+
import UnnnicCallModal from '../components/Modal/CallModal.vue';
|
|
3
|
+
import UnnnicButton from '../components/Button/Button.vue';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
title: 'Example/Modal',
|
|
7
|
-
component:
|
|
7
|
+
component: UnnnicModal,
|
|
8
8
|
argTypes: {
|
|
9
9
|
modalIcon: {
|
|
10
10
|
control: {
|
|
@@ -34,42 +34,68 @@ export default {
|
|
|
34
34
|
},
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
37
|
+
export const Normal = {
|
|
38
|
+
render: (args) => ({
|
|
39
|
+
components: { UnnnicModal, UnnnicButton },
|
|
40
|
+
setup() {
|
|
41
|
+
return { args };
|
|
42
|
+
},
|
|
43
|
+
template: `
|
|
44
|
+
<unnnic-modal v-bind="args">
|
|
45
|
+
Conteúdo do modal<br>
|
|
46
|
+
Conteúdo do modal<br>
|
|
47
|
+
Conteúdo do modal<br>
|
|
48
|
+
Conteúdo do modal<br>
|
|
49
|
+
Conteúdo do modal<br>
|
|
50
|
+
Conteúdo do modal<br>
|
|
51
|
+
Conteúdo do modal<br>
|
|
52
|
+
</unnnic-modal>
|
|
53
|
+
`,
|
|
54
|
+
}),
|
|
55
|
+
args: {
|
|
56
|
+
text: 'Title text',
|
|
57
|
+
description: 'Message body',
|
|
58
|
+
alertMessage: 'Message alert',
|
|
59
|
+
closeIcon: true,
|
|
60
|
+
showModal: true,
|
|
61
|
+
},
|
|
58
62
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
export const Buttons = {
|
|
64
|
+
render: (args) => ({
|
|
65
|
+
components: { UnnnicModal, UnnnicButton },
|
|
66
|
+
setup() {
|
|
67
|
+
return { args };
|
|
68
|
+
},
|
|
69
|
+
template: `
|
|
70
|
+
<unnnic-modal v-bind="args">
|
|
71
|
+
<template #message>
|
|
72
|
+
<span>Modal with Buttons</span>
|
|
73
|
+
</template>
|
|
74
|
+
<template #options>
|
|
75
|
+
<unnnic-button> Button 1 </unnnic-button>
|
|
76
|
+
<unnnic-button > Button 2 </unnnic-button>
|
|
77
|
+
</template>
|
|
78
|
+
</unnnic-modal>
|
|
79
|
+
`,
|
|
80
|
+
}),
|
|
81
|
+
args: {
|
|
82
|
+
text: 'Title text',
|
|
83
|
+
description: 'Message body',
|
|
84
|
+
alertMessage: 'Message alert',
|
|
85
|
+
closeIcon: true,
|
|
86
|
+
showModal: true,
|
|
87
|
+
},
|
|
67
88
|
};
|
|
68
89
|
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
90
|
+
export const Call = {
|
|
91
|
+
render: (args) => ({
|
|
92
|
+
components: { UnnnicCallModal },
|
|
93
|
+
setup() {
|
|
94
|
+
return { args };
|
|
95
|
+
},
|
|
96
|
+
template: `
|
|
97
|
+
<unnnic-call-modal />
|
|
98
|
+
`,
|
|
99
|
+
}),
|
|
100
|
+
args: {},
|
|
101
|
+
};
|
|
@@ -1,38 +1,33 @@
|
|
|
1
|
-
import
|
|
1
|
+
import UnnnicMoodRating from '../components/MoodRating/MoodRating.vue';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Rating/MoodRating',
|
|
5
|
-
component:
|
|
6
|
-
argTypes: {
|
|
7
|
-
|
|
5
|
+
component: UnnnicMoodRating,
|
|
6
|
+
argTypes: {},
|
|
7
|
+
render: (args) => ({
|
|
8
|
+
setup() {
|
|
9
|
+
return { args };
|
|
10
|
+
},
|
|
11
|
+
components: {
|
|
12
|
+
UnnnicMoodRating,
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
data() {
|
|
16
|
+
return {
|
|
17
|
+
mood: null,
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
template: `
|
|
22
|
+
<div>
|
|
23
|
+
<pre>v-model: {{ mood }}</pre>
|
|
24
|
+
<unnnic-mood-rating v-bind="args" v-model="mood" />
|
|
25
|
+
</div>
|
|
26
|
+
`,
|
|
27
|
+
}),
|
|
28
|
+
args: {
|
|
29
|
+
title: 'Avalie seu aprendizado nesta aula',
|
|
8
30
|
},
|
|
9
31
|
};
|
|
10
32
|
|
|
11
|
-
const
|
|
12
|
-
props: Object.keys(argTypes),
|
|
13
|
-
|
|
14
|
-
components: {
|
|
15
|
-
unnnicMoodRating,
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
data() {
|
|
19
|
-
return {
|
|
20
|
-
mood: null,
|
|
21
|
-
};
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
template: `
|
|
25
|
-
<div>
|
|
26
|
-
<pre>v-model: {{ mood }}</pre>
|
|
27
|
-
<unnnic-mood-rating v-bind="$props" v-model="mood" />
|
|
28
|
-
</div>
|
|
29
|
-
`,
|
|
30
|
-
|
|
31
|
-
methods: {},
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
export const Default = Template.bind({});
|
|
35
|
-
|
|
36
|
-
Default.args = {
|
|
37
|
-
title: 'Avalie seu aprendizado nesta aula',
|
|
38
|
-
};
|
|
33
|
+
export const Default = {};
|
|
@@ -1,56 +1,62 @@
|
|
|
1
|
-
import
|
|
1
|
+
import UnnnicMultiSelect from '../components/MultiSelect/MultiSelect.vue';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Form/MultiSelect',
|
|
5
|
-
component:
|
|
5
|
+
component: UnnnicMultiSelect,
|
|
6
6
|
argTypes: {},
|
|
7
|
+
render: (args) => ({
|
|
8
|
+
components: {
|
|
9
|
+
UnnnicMultiSelect,
|
|
10
|
+
},
|
|
11
|
+
setup() {
|
|
12
|
+
return { args };
|
|
13
|
+
},
|
|
14
|
+
data() {
|
|
15
|
+
return {
|
|
16
|
+
groups: [
|
|
17
|
+
{
|
|
18
|
+
title: 'Permissões Gerais',
|
|
19
|
+
selected: 0,
|
|
20
|
+
items: [
|
|
21
|
+
{
|
|
22
|
+
title: 'Moderador',
|
|
23
|
+
description:
|
|
24
|
+
'Gerencia membros do projeto e administra o rocket',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
title: 'Contribuidor',
|
|
28
|
+
description: 'Consegue editar o projeto',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
title: 'Vizualizador',
|
|
32
|
+
description: 'Apenas vizualiza o projeto',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
title: 'Permissões do módulo chat',
|
|
38
|
+
selected: 0,
|
|
39
|
+
items: [
|
|
40
|
+
{
|
|
41
|
+
title: 'Gerente de Atendimento',
|
|
42
|
+
description:
|
|
43
|
+
'Consegue responder mensagens e criar grupos no Rocket',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
title: 'Agente',
|
|
47
|
+
description: 'Consegue responder mensagens no Rocket',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
template: `
|
|
55
|
+
<div>
|
|
56
|
+
<UnnnicMultiSelect v-bind="args" v-model="groups" />
|
|
57
|
+
</div>
|
|
58
|
+
`,
|
|
59
|
+
}),
|
|
7
60
|
};
|
|
8
61
|
|
|
9
|
-
const
|
|
10
|
-
props: Object.keys(argTypes),
|
|
11
|
-
components: { unnnicMultiSelect },
|
|
12
|
-
data() {
|
|
13
|
-
return {
|
|
14
|
-
groups: [
|
|
15
|
-
{
|
|
16
|
-
title: 'Permissões Gerais',
|
|
17
|
-
selected: 0,
|
|
18
|
-
items: [
|
|
19
|
-
{
|
|
20
|
-
title: 'Moderador',
|
|
21
|
-
description: 'Gerencia membros do projeto e administra o rocket',
|
|
22
|
-
},
|
|
23
|
-
{ title: 'Contribuidor', description: 'Consegue editar o projeto' },
|
|
24
|
-
{
|
|
25
|
-
title: 'Vizualizador',
|
|
26
|
-
description: 'Apenas vizualiza o projeto',
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
title: 'Permissões do módulo chat',
|
|
32
|
-
selected: 0,
|
|
33
|
-
items: [
|
|
34
|
-
{
|
|
35
|
-
title: 'Gerente de Atendimento',
|
|
36
|
-
description:
|
|
37
|
-
'Consegue responder mensagens e criar grupos no Rocket',
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
title: 'Agente',
|
|
41
|
-
description: 'Consegue responder mensagens no Rocket',
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
};
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
// eslint-disable-next-line no-multi-str
|
|
50
|
-
template:
|
|
51
|
-
'<div><unnnicMultiSelect v-bind="$props" v-model="groups"></unnnicMultiSelect></div>',
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
export const Medium = Template.bind({});
|
|
55
|
-
|
|
56
|
-
Medium.args = {};
|
|
62
|
+
export const Medium = { args: {} };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ref } from 'vue';
|
|
1
|
+
import UnnnicPagination from '../components/Pagination/Pagination.vue';
|
|
3
2
|
|
|
4
3
|
export default {
|
|
5
4
|
title: 'example/Pagination',
|
|
6
|
-
component:
|
|
5
|
+
component: UnnnicPagination,
|
|
7
6
|
argTypes: {
|
|
8
7
|
max: {
|
|
9
8
|
control: {
|
|
@@ -17,29 +16,22 @@ export default {
|
|
|
17
16
|
},
|
|
18
17
|
};
|
|
19
18
|
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
</div>
|
|
40
|
-
`,
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
export const Default = Template.bind({});
|
|
44
|
-
|
|
45
|
-
Default.args = {};
|
|
19
|
+
export const Default = {
|
|
20
|
+
render: (args) => ({
|
|
21
|
+
components: { UnnnicPagination },
|
|
22
|
+
setup() {
|
|
23
|
+
return { args };
|
|
24
|
+
},
|
|
25
|
+
data() {
|
|
26
|
+
return {
|
|
27
|
+
page: 1,
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
template: `
|
|
31
|
+
<div>
|
|
32
|
+
<unnnic-pagination v-bind="args" v-model="page" :max="10" :show="5"/>
|
|
33
|
+
</div>
|
|
34
|
+
`,
|
|
35
|
+
}),
|
|
36
|
+
args: {},
|
|
37
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { action } from '@storybook/addon-actions';
|
|
2
|
+
import UnnnicProgressBar from '../components/ProgressBar/ProgressBar.vue';
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
5
|
title: 'Progress/ProgressBar',
|
|
5
|
-
component:
|
|
6
|
+
component: UnnnicProgressBar,
|
|
6
7
|
argTypes: {
|
|
7
8
|
type: {
|
|
8
9
|
control: {
|
|
@@ -11,63 +12,27 @@ export default {
|
|
|
11
12
|
options: ['primary', 'secondary'],
|
|
12
13
|
},
|
|
13
14
|
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
components: {
|
|
20
|
-
unnnicProgressBar,
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
data() {
|
|
24
|
-
return {
|
|
25
|
-
percentage: 25,
|
|
26
|
-
};
|
|
15
|
+
args: {
|
|
16
|
+
modelValue: 25,
|
|
17
|
+
title: 'Title name',
|
|
18
|
+
onClose: action('close'),
|
|
27
19
|
},
|
|
28
|
-
|
|
29
|
-
template: `
|
|
30
|
-
<div>
|
|
31
|
-
<pre>v-model: {{ percentage }}</pre>
|
|
32
|
-
<unnnic-progress-bar v-model="percentage" v-bind="$props">
|
|
33
|
-
</unnnic-progress-bar>
|
|
34
|
-
</div>
|
|
35
|
-
`,
|
|
36
|
-
|
|
37
|
-
methods: {},
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
export const Primary = Template.bind({});
|
|
41
|
-
|
|
42
|
-
Primary.args = {
|
|
43
|
-
title: 'Title name',
|
|
44
20
|
};
|
|
21
|
+
export const Primary = {};
|
|
45
22
|
|
|
46
|
-
export const Secondary =
|
|
23
|
+
export const Secondary = { args: { type: 'secondary' } };
|
|
47
24
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export const Inline = Template.bind({});
|
|
54
|
-
|
|
55
|
-
Inline.args = {
|
|
56
|
-
title: 'Title name',
|
|
57
|
-
inline: true,
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export const Subtitle = Template.bind({});
|
|
61
|
-
|
|
62
|
-
Subtitle.args = {
|
|
63
|
-
title: 'test',
|
|
64
|
-
subtitle: 'Subtitle or description',
|
|
25
|
+
export const Inline = {
|
|
26
|
+
args: {
|
|
27
|
+
inline: true,
|
|
28
|
+
},
|
|
65
29
|
};
|
|
66
30
|
|
|
67
|
-
export const
|
|
31
|
+
export const Subtitle = { args: { subtitle: 'Subtitle or description' } };
|
|
68
32
|
|
|
69
|
-
SubtitleCanClose
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
33
|
+
export const SubtitleCanClose = {
|
|
34
|
+
args: {
|
|
35
|
+
subtitle: 'Subtitle or description',
|
|
36
|
+
canClose: true,
|
|
37
|
+
},
|
|
73
38
|
};
|
|
@@ -1,48 +1,49 @@
|
|
|
1
|
-
import
|
|
1
|
+
import UnnnicRadio from '../components/Radio/Radio.vue';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Form/Radio',
|
|
5
|
-
component:
|
|
5
|
+
component: UnnnicRadio,
|
|
6
6
|
argTypes: {
|
|
7
|
-
'on-update:model-value': { action: '@update:model-value' },
|
|
8
7
|
value: { control: { type: 'text' } },
|
|
9
8
|
disabled: { control: { type: 'boolean' } },
|
|
10
9
|
size: { control: { type: 'select', options: ['md', 'sm'] } },
|
|
11
10
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
11
|
+
render: (args) => ({
|
|
12
|
+
components: {
|
|
13
|
+
UnnnicRadio,
|
|
14
|
+
},
|
|
15
|
+
setup() {
|
|
16
|
+
return { args };
|
|
17
|
+
},
|
|
18
|
+
data() {
|
|
19
|
+
return {
|
|
20
|
+
insideValue: 'option 1',
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
template: `
|
|
24
|
+
<div>
|
|
25
|
+
v-model: {{ insideValue }}
|
|
26
|
+
<br>
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
<unnnic-radio v-bind="args" v-model="insideValue" value="option 1">
|
|
29
|
+
Option 1
|
|
30
|
+
</unnnic-radio>
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
<unnnic-radio v-bind="args" v-model="insideValue" value="option 2">
|
|
33
|
+
Option 2
|
|
34
|
+
</unnnic-radio>
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
})
|
|
36
|
+
<unnnic-radio v-bind="args" v-model="insideValue" value="option 3">
|
|
37
|
+
Option 3
|
|
38
|
+
</unnnic-radio>
|
|
39
|
+
</div>
|
|
40
|
+
`,
|
|
41
|
+
}),
|
|
42
|
+
};
|
|
43
43
|
|
|
44
|
-
export const Default =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
export const Default = {
|
|
45
|
+
args: {
|
|
46
|
+
disabled: false,
|
|
47
|
+
size: 'md',
|
|
48
|
+
},
|
|
48
49
|
};
|
|
@@ -1,38 +1,40 @@
|
|
|
1
1
|
/* eslint-disable no-multi-str */
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import UnnnicSidebar from '../components/Sidebar/Sidebar.vue';
|
|
4
|
+
import UnnnicSidebarItem from '../components/Sidebar/SidebarItem.vue';
|
|
5
|
+
import UnnnicSidebarMenu from '../components/Sidebar/SidebarMenu.vue';
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
8
|
title: 'Example/Sidebar',
|
|
9
|
-
component:
|
|
9
|
+
component: UnnnicSidebar,
|
|
10
10
|
argTypes: {
|
|
11
11
|
expanded: { control: { type: 'boolean' } },
|
|
12
12
|
},
|
|
13
|
+
render: (args) => ({
|
|
14
|
+
setup() {
|
|
15
|
+
return { args };
|
|
16
|
+
},
|
|
17
|
+
components: { UnnnicSidebar, UnnnicSidebarItem, UnnnicSidebarMenu },
|
|
18
|
+
template: `
|
|
19
|
+
<unnnic-sidebar v-bind="args">
|
|
20
|
+
<template #header>
|
|
21
|
+
<p> Title </p>
|
|
22
|
+
</template>
|
|
23
|
+
<template #footer>
|
|
24
|
+
<unnnic-sidebar-item icon="expand-8-1" text="footer" />
|
|
25
|
+
</template>
|
|
26
|
+
<unnnic-sidebar-menu text="Submenu">
|
|
27
|
+
<unnnic-sidebar-item :enable-tooltip="!expanded" text="Item1" icon="developer-community-github-1-1" :active="true" /> \
|
|
28
|
+
<unnnic-sidebar-item :enable-tooltip="!expanded" text="Item2" icon="alarm-bell-2" />
|
|
29
|
+
</unnnic-sidebar-menu>
|
|
30
|
+
<unnnic-sidebar-menu text="Submenu 2">
|
|
31
|
+
<unnnic-sidebar-item :enable-tooltip="!expanded" text="Item3" icon="alarm-bell-2" />
|
|
32
|
+
</unnnic-sidebar-menu>
|
|
33
|
+
</unnnic-sidebar>
|
|
34
|
+
`,
|
|
35
|
+
}),
|
|
13
36
|
};
|
|
14
37
|
|
|
15
|
-
const
|
|
16
|
-
props: Object.keys(argTypes),
|
|
17
|
-
components: { unnnicSidebar, unnnicSidebarItem, unnnicSidebarMenu },
|
|
18
|
-
template:
|
|
19
|
-
'<unnnic-sidebar v-bind="$props"> \
|
|
20
|
-
<p slot="header"> Title </p> \
|
|
21
|
-
<unnnic-sidebar-item icon="expand-8-1" text="footer" slot="footer" /> \
|
|
22
|
-
<unnnic-sidebar-menu text="Submenu"> \
|
|
23
|
-
<unnnic-sidebar-item :enable-tooltip="!expanded" text="Item1" icon="developer-community-github-1-1" :active="true" /> \
|
|
24
|
-
<unnnic-sidebar-item :enable-tooltip="!expanded" text="Item2" icon="alarm-bell-2" /> \
|
|
25
|
-
</unnnic-sidebar-menu> \
|
|
26
|
-
<unnnic-sidebar-menu text="Submenu 2"> \
|
|
27
|
-
<unnnic-sidebar-item :enable-tooltip="!expanded" text="Item3" icon="alarm-bell-2" /> \
|
|
28
|
-
</unnnic-sidebar-menu> \
|
|
29
|
-
</unnnic-sidebar>',
|
|
30
|
-
});
|
|
38
|
+
export const Expanded = { args: {} };
|
|
31
39
|
|
|
32
|
-
export const
|
|
33
|
-
Expanded.args = {};
|
|
34
|
-
|
|
35
|
-
export const Contracted = Template.bind({});
|
|
36
|
-
Contracted.args = {
|
|
37
|
-
expanded: false,
|
|
38
|
-
};
|
|
40
|
+
export const Contracted = { args: { expanded: false } };
|