@devix-tecnologia/timeline-vue 1.0.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/README.md +18 -0
- package/dist/style.css +1 -0
- package/dist/timeline-vue.es.js +557 -0
- package/dist/types/components/timeline/atomos/AvatarTimeline.vue.d.ts +17 -0
- package/dist/types/components/timeline/atomos/BoxData.vue.d.ts +23 -0
- package/dist/types/components/timeline/atomos/Destaque.vue.d.ts +11 -0
- package/dist/types/components/timeline/atomos/Hora.vue.d.ts +24 -0
- package/dist/types/components/timeline/atomos/IconeCategoria.vue.d.ts +57 -0
- package/dist/types/components/timeline/atomos/IconeStatus.vue.d.ts +17 -0
- package/dist/types/components/timeline/atomos/SubtituloEvento.vue.d.ts +13 -0
- package/dist/types/components/timeline/atomos/TituloEvento.vue.d.ts +13 -0
- package/dist/types/components/timeline/index.d.ts +3 -0
- package/dist/types/components/timeline/moleculas/DescricaoEvento.vue.d.ts +21 -0
- package/dist/types/components/timeline/moleculas/EventoTimeline.vue.d.ts +18 -0
- package/dist/types/components/timeline/moleculas/HoraEvento.vue.d.ts +19 -0
- package/dist/types/components/timeline/moleculas/PerfilTimeline.vue.d.ts +39 -0
- package/dist/types/components/timeline/moleculas/SeparadorPeriodo.vue.d.ts +24 -0
- package/dist/types/components/timeline/moleculas/Topo.vue.d.ts +3 -0
- package/dist/types/components/timeline/organismos/Timeline.mock.d.ts +3 -0
- package/dist/types/components/timeline/organismos/Timeline.vue.d.ts +40 -0
- package/dist/types/components/timeline/type.d.ts +23 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/vite.svg +1 -0
- package/package.json +53 -0
- package/src/assets/vue.svg +1 -0
- package/src/components/timeline/atomos/AvatarTimeline.stories.ts +32 -0
- package/src/components/timeline/atomos/AvatarTimeline.vue +51 -0
- package/src/components/timeline/atomos/BoxData.stories.ts +41 -0
- package/src/components/timeline/atomos/BoxData.vue +57 -0
- package/src/components/timeline/atomos/Destaque.stories.ts +24 -0
- package/src/components/timeline/atomos/Destaque.vue +39 -0
- package/src/components/timeline/atomos/Hora.stories.ts +36 -0
- package/src/components/timeline/atomos/Hora.vue +53 -0
- package/src/components/timeline/atomos/IconeCategoria.stories.ts +60 -0
- package/src/components/timeline/atomos/IconeCategoria.vue +110 -0
- package/src/components/timeline/atomos/IconeStatus.stories.ts +38 -0
- package/src/components/timeline/atomos/IconeStatus.vue +72 -0
- package/src/components/timeline/atomos/SubtituloEvento.stories.ts +24 -0
- package/src/components/timeline/atomos/SubtituloEvento.vue +33 -0
- package/src/components/timeline/atomos/TituloEvento.stories.ts +24 -0
- package/src/components/timeline/atomos/TituloEvento.vue +32 -0
- package/src/components/timeline/index.ts +7 -0
- package/src/components/timeline/moleculas/DescricaoEvento.stories.ts +31 -0
- package/src/components/timeline/moleculas/DescricaoEvento.vue +59 -0
- package/src/components/timeline/moleculas/EventoTimeline.stories.ts +94 -0
- package/src/components/timeline/moleculas/EventoTimeline.vue +102 -0
- package/src/components/timeline/moleculas/HoraEvento.stories.ts +37 -0
- package/src/components/timeline/moleculas/HoraEvento.vue +73 -0
- package/src/components/timeline/moleculas/PerfilTimeline.stories.ts +40 -0
- package/src/components/timeline/moleculas/PerfilTimeline.vue +103 -0
- package/src/components/timeline/moleculas/SeparadorPeriodo.stories.ts +42 -0
- package/src/components/timeline/moleculas/SeparadorPeriodo.vue +101 -0
- package/src/components/timeline/moleculas/Topo.vue +38 -0
- package/src/components/timeline/organismos/Timeline.mock.ts +281 -0
- package/src/components/timeline/organismos/Timeline.stories.ts +31 -0
- package/src/components/timeline/organismos/Timeline.vue +188 -0
- package/src/components/timeline/type.ts +30 -0
- package/src/global.css +98 -0
- package/src/index.ts +16 -0
- package/src/vite-env.d.ts +1 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="hora" :class="classes">{{ horaString }}</div>
|
|
3
|
+
</template>
|
|
4
|
+
<script lang="ts">
|
|
5
|
+
import { defineComponent, reactive, computed } from 'vue';
|
|
6
|
+
|
|
7
|
+
export default defineComponent({
|
|
8
|
+
name: 'hora',
|
|
9
|
+
props: {
|
|
10
|
+
hora: {
|
|
11
|
+
required: true,
|
|
12
|
+
type: Date,
|
|
13
|
+
},
|
|
14
|
+
aparencia: {
|
|
15
|
+
type: String,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
components: {},
|
|
19
|
+
setup(props) {
|
|
20
|
+
props = reactive(props);
|
|
21
|
+
|
|
22
|
+
const data = props.hora;
|
|
23
|
+
const horaSimples = data.getHours();
|
|
24
|
+
const minutos = data.getMinutes();
|
|
25
|
+
const horaString = `${horaSimples}:${minutos.toString().padStart(2, '0')}`;
|
|
26
|
+
return {
|
|
27
|
+
classes: computed(() => ({
|
|
28
|
+
[`hora-${props.aparencia || ''}`]: true,
|
|
29
|
+
})),
|
|
30
|
+
horaString,
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
</script>
|
|
35
|
+
<style scoped>
|
|
36
|
+
.hora {
|
|
37
|
+
color: var(--cor-texto);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.bg-selecionado .hora {
|
|
41
|
+
color: var(--cor-texto-selecao);
|
|
42
|
+
}
|
|
43
|
+
.hora-padrao,
|
|
44
|
+
.horaRealizada {
|
|
45
|
+
font-weight: 500;
|
|
46
|
+
font-size: 1.4rem;
|
|
47
|
+
}
|
|
48
|
+
.hora-riscada,
|
|
49
|
+
.horaPlanejada {
|
|
50
|
+
text-decoration: line-through;
|
|
51
|
+
font-size: 1rem;
|
|
52
|
+
}
|
|
53
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import '@fontsource/material-icons';
|
|
2
|
+
import IconeCategoria from './IconeCategoria.vue';
|
|
3
|
+
import { Meta, StoryFn } from '@storybook/vue3';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Devix/Timeline/Atomos/IconeCategoria',
|
|
7
|
+
component: IconeCategoria,
|
|
8
|
+
argTypes: {
|
|
9
|
+
// categoria: { control: { type: String } },
|
|
10
|
+
tipo: {
|
|
11
|
+
control: { type: 'select' },
|
|
12
|
+
options: ['padrao', 'importante', 'alerta', 'sucesso'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
} as Meta<typeof IconeCategoria>;
|
|
16
|
+
|
|
17
|
+
const categoriaMock = 'call';
|
|
18
|
+
|
|
19
|
+
const Template: StoryFn<typeof IconeCategoria> = (args) => ({
|
|
20
|
+
components: { IconeCategoria },
|
|
21
|
+
setup() {
|
|
22
|
+
return { args };
|
|
23
|
+
},
|
|
24
|
+
template: '<IconeCategoria v-bind="args" />',
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const Escuro = Template.bind({});
|
|
28
|
+
Escuro.args = {
|
|
29
|
+
iconeCategoria: categoriaMock,
|
|
30
|
+
escuro: true,
|
|
31
|
+
tipo: 'padrao',
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const Claro = Template.bind({});
|
|
35
|
+
Claro.args = {
|
|
36
|
+
iconeCategoria: categoriaMock,
|
|
37
|
+
escuro: false,
|
|
38
|
+
tipo: 'padrao',
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const Importante = Template.bind({});
|
|
42
|
+
Importante.args = {
|
|
43
|
+
iconeCategoria: categoriaMock,
|
|
44
|
+
escuro: true,
|
|
45
|
+
tipo: 'importante',
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const Alerta = Template.bind({});
|
|
49
|
+
Alerta.args = {
|
|
50
|
+
iconeCategoria: categoriaMock,
|
|
51
|
+
escuro: true,
|
|
52
|
+
tipo: 'alerta',
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const Sucesso = Template.bind({});
|
|
56
|
+
Sucesso.args = {
|
|
57
|
+
iconeCategoria: categoriaMock,
|
|
58
|
+
escuro: true,
|
|
59
|
+
tipo: 'sucesso',
|
|
60
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="areaCategoria">
|
|
3
|
+
<div
|
|
4
|
+
class="iconeCategoria"
|
|
5
|
+
:class="classes"
|
|
6
|
+
:style="style"
|
|
7
|
+
:alt="categoria"
|
|
8
|
+
>
|
|
9
|
+
<span class="material-symbols-outlined"> {{ iconeCategoria }} </span>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
<script lang="ts">
|
|
14
|
+
import { defineComponent, reactive, computed } from 'vue';
|
|
15
|
+
export default defineComponent({
|
|
16
|
+
name: 'categoria',
|
|
17
|
+
props: {
|
|
18
|
+
iconeCategoria: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
categoria: {
|
|
23
|
+
type: String,
|
|
24
|
+
},
|
|
25
|
+
escuro: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true,
|
|
28
|
+
},
|
|
29
|
+
tipo: {
|
|
30
|
+
type: String,
|
|
31
|
+
},
|
|
32
|
+
borderColor: {
|
|
33
|
+
type: String,
|
|
34
|
+
},
|
|
35
|
+
backgroundColor: {
|
|
36
|
+
type: String,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
setup(props) {
|
|
40
|
+
props = reactive(props);
|
|
41
|
+
return {
|
|
42
|
+
classes: computed(() => ({
|
|
43
|
+
'bg-escuro': props.escuro,
|
|
44
|
+
'bg-claro': !props.escuro,
|
|
45
|
+
[`borda-${props.tipo || 'padrao'}`]: true,
|
|
46
|
+
})),
|
|
47
|
+
style: computed(() => ({
|
|
48
|
+
borderColor: props.borderColor,
|
|
49
|
+
backgroundColor: props.backgroundColor,
|
|
50
|
+
})),
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
</script>
|
|
55
|
+
<style scoped>
|
|
56
|
+
/* icone com categoria */
|
|
57
|
+
|
|
58
|
+
.areaCategoria {
|
|
59
|
+
display: table-cell;
|
|
60
|
+
align-items: center;
|
|
61
|
+
width: 3rem;
|
|
62
|
+
padding: 1.8rem 1.4rem;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.bg-escuro,
|
|
66
|
+
.iconeCategoria {
|
|
67
|
+
background: var(--cor-secundaria);
|
|
68
|
+
border-radius: 50%;
|
|
69
|
+
width: 3rem;
|
|
70
|
+
height: 3rem;
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: row;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
align-items: center;
|
|
75
|
+
color: var(--cor-terciaria);
|
|
76
|
+
border: 3px solid var(--cor-secundaria);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.iconeCategoria span {
|
|
80
|
+
font-size: 2rem;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.iconeCategoria.bg-claro,
|
|
84
|
+
.realizado .iconeCategoria,
|
|
85
|
+
.cancelado .iconeCategoria,
|
|
86
|
+
.adiado .iconeCategoria {
|
|
87
|
+
opacity: 0.3;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.iconeCategoria.borda-alerta,
|
|
91
|
+
.criticidade-media .iconeCategoria {
|
|
92
|
+
border-color: var(--cor-alerta);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.iconeCategoria.borda-importante,
|
|
96
|
+
.criticidade-alta .iconeCategoria {
|
|
97
|
+
border-color: var(--cor-importante);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.iconeCategoria.borda-sucesso {
|
|
101
|
+
border-color: var(--cor-sucesso);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.bg-claro.iconeCategoria.borda-importante,
|
|
105
|
+
.adiado.criticidade-alta .iconeCategoria,
|
|
106
|
+
.cancelado.criticidade-alta .iconeCategoria,
|
|
107
|
+
.realizado.criticidade-alta .iconeCategoria {
|
|
108
|
+
border-color: var(--cor-importante);
|
|
109
|
+
}
|
|
110
|
+
</style>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import '@fontsource/material-icons';
|
|
2
|
+
import IconeStatus from './IconeStatus.vue';
|
|
3
|
+
import { Meta, StoryFn } from '@storybook/vue3';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Devix/Timeline/Atomos/IconeStatus',
|
|
7
|
+
component: IconeStatus,
|
|
8
|
+
argTypes: {
|
|
9
|
+
// status: { control: { type: String } },
|
|
10
|
+
status: {
|
|
11
|
+
control: { type: 'select' },
|
|
12
|
+
options: ['planejado', 'realizado', 'cancelado', 'adiado', 'atrasado'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
} as Meta<typeof IconeStatus>;
|
|
16
|
+
|
|
17
|
+
const Template: StoryFn<typeof IconeStatus> = (args) => ({
|
|
18
|
+
components: { IconeStatus },
|
|
19
|
+
setup() {
|
|
20
|
+
return { args };
|
|
21
|
+
},
|
|
22
|
+
template: '<IconeStatus v-bind="args" />',
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export const Planejado = Template.bind({});
|
|
26
|
+
Planejado.args = { status: 'planejado' };
|
|
27
|
+
|
|
28
|
+
export const Realizado = Template.bind({});
|
|
29
|
+
Realizado.args = { status: 'realizado' };
|
|
30
|
+
|
|
31
|
+
export const Cancelado = Template.bind({});
|
|
32
|
+
Cancelado.args = { status: 'cancelado' };
|
|
33
|
+
|
|
34
|
+
export const Adiado = Template.bind({});
|
|
35
|
+
Adiado.args = { status: 'adiado' };
|
|
36
|
+
|
|
37
|
+
export const Atrasado = Template.bind({});
|
|
38
|
+
Atrasado.args = { status: 'atrasado' };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="classes" class="iconeStatus"></div>
|
|
3
|
+
</template>
|
|
4
|
+
<script lang="ts">
|
|
5
|
+
import { defineComponent, reactive, computed } from 'vue';
|
|
6
|
+
|
|
7
|
+
export default defineComponent({
|
|
8
|
+
name: 'status',
|
|
9
|
+
props: {
|
|
10
|
+
status: {
|
|
11
|
+
required: true,
|
|
12
|
+
type: String,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
components: {},
|
|
16
|
+
setup(props) {
|
|
17
|
+
props = reactive(props);
|
|
18
|
+
return {
|
|
19
|
+
classes: computed(() => ({
|
|
20
|
+
[`${props.status || 'planejado'}`]: true,
|
|
21
|
+
})),
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
</script>
|
|
26
|
+
<style scoped>
|
|
27
|
+
/* icones */
|
|
28
|
+
.iconeStatus {
|
|
29
|
+
font-size: 1.6rem;
|
|
30
|
+
line-height: 1rem;
|
|
31
|
+
color: var(--cor-secundaria);
|
|
32
|
+
width: 1.6rem;
|
|
33
|
+
display: table-cell;
|
|
34
|
+
padding: 1.4rem;
|
|
35
|
+
vertical-align: top;
|
|
36
|
+
padding-top: 2.7rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.realizado.iconeStatus {
|
|
40
|
+
color: var(--cor-sucesso);
|
|
41
|
+
}
|
|
42
|
+
.realizado.iconeStatus::before {
|
|
43
|
+
font-family: 'Material Symbols Outlined';
|
|
44
|
+
content: '\e86c';
|
|
45
|
+
}
|
|
46
|
+
.cancelado.iconeStatus {
|
|
47
|
+
color: var(--cor-importante);
|
|
48
|
+
}
|
|
49
|
+
.cancelado.iconeStatus::before {
|
|
50
|
+
font-family: 'Material Symbols Outlined';
|
|
51
|
+
content: '\e5c9';
|
|
52
|
+
}
|
|
53
|
+
.adiado.iconeStatus {
|
|
54
|
+
color: var(--cor-apoio);
|
|
55
|
+
}
|
|
56
|
+
.adiado.iconeStatus::before {
|
|
57
|
+
font-family: 'Material Symbols Outlined';
|
|
58
|
+
content: '\e923';
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.planejado.iconeStatus {
|
|
62
|
+
opacity: 0;
|
|
63
|
+
}
|
|
64
|
+
.planejado.iconeStatus::before {
|
|
65
|
+
font-family: 'Material Symbols Outlined';
|
|
66
|
+
content: '\e838';
|
|
67
|
+
}
|
|
68
|
+
.atrasado.iconeStatus::before {
|
|
69
|
+
font-family: 'Material Symbols Outlined';
|
|
70
|
+
content: '\e8b5';
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import '@fontsource/material-icons';
|
|
2
|
+
import SubtituloEvento from './SubtituloEvento.vue';
|
|
3
|
+
import { Meta, StoryFn } from '@storybook/vue3';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Devix/Timeline/Atomos/SubtituloEvento',
|
|
7
|
+
component: SubtituloEvento,
|
|
8
|
+
argTypes: {
|
|
9
|
+
// subtitulo: { control: { type: String } },
|
|
10
|
+
},
|
|
11
|
+
} as Meta<typeof SubtituloEvento>;
|
|
12
|
+
|
|
13
|
+
const subtituloEventooMock = 'subtitulo';
|
|
14
|
+
|
|
15
|
+
const Template: StoryFn<typeof SubtituloEvento> = (args) => ({
|
|
16
|
+
components: { SubtituloEvento },
|
|
17
|
+
setup() {
|
|
18
|
+
return { args };
|
|
19
|
+
},
|
|
20
|
+
template: '<SubtituloEvento v-bind="args" />',
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const Padrao = Template.bind({});
|
|
24
|
+
Padrao.args = { subtitulo: subtituloEventooMock };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<h4 class="subtitulo">{{ subtitulo }}</h4>
|
|
3
|
+
</template>
|
|
4
|
+
<script lang="ts">
|
|
5
|
+
import { defineComponent } from 'vue';
|
|
6
|
+
|
|
7
|
+
export default defineComponent({
|
|
8
|
+
props: {
|
|
9
|
+
subtitulo: {
|
|
10
|
+
required: true,
|
|
11
|
+
type: String,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
components: {},
|
|
16
|
+
setup() {
|
|
17
|
+
return {};
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<style scoped>
|
|
23
|
+
/* descrição do evento */
|
|
24
|
+
.descricaoEvento .subtitulo {
|
|
25
|
+
line-height: 1.4rem;
|
|
26
|
+
margin: 0;
|
|
27
|
+
color: var(--cor-texto);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.bg-selecionado .descricaoEvento .subtitulo {
|
|
31
|
+
color: var(--cor-texto-selecao);
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import '@fontsource/material-icons';
|
|
2
|
+
import TituloEvento from './TituloEvento.vue';
|
|
3
|
+
import { Meta, StoryFn } from '@storybook/vue3';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Devix/Timeline/Atomos/TituloEvento',
|
|
7
|
+
component: TituloEvento,
|
|
8
|
+
argTypes: {
|
|
9
|
+
// titulo: { control: { type: String } },
|
|
10
|
+
},
|
|
11
|
+
} as Meta<typeof TituloEvento>;
|
|
12
|
+
|
|
13
|
+
const tituloEventoMock = 'titulo';
|
|
14
|
+
|
|
15
|
+
const Template: StoryFn<typeof TituloEvento> = (args) => ({
|
|
16
|
+
components: { TituloEvento },
|
|
17
|
+
setup() {
|
|
18
|
+
return { args };
|
|
19
|
+
},
|
|
20
|
+
template: '<TituloEvento v-bind="args" />',
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const Padrao = Template.bind({});
|
|
24
|
+
Padrao.args = { titulo: tituloEventoMock };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<h3 class="titulo">{{ titulo }}</h3>
|
|
3
|
+
</template>
|
|
4
|
+
<script lang="ts">
|
|
5
|
+
import { defineComponent } from 'vue';
|
|
6
|
+
|
|
7
|
+
export default defineComponent({
|
|
8
|
+
props: {
|
|
9
|
+
titulo: {
|
|
10
|
+
required: true,
|
|
11
|
+
type: String,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
components: {},
|
|
15
|
+
setup() {
|
|
16
|
+
return {};
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style scoped>
|
|
22
|
+
/* descrição do evento */
|
|
23
|
+
.descricaoEvento .titulo {
|
|
24
|
+
line-height: 1.4rem;
|
|
25
|
+
margin: 0;
|
|
26
|
+
color: var(--cor-texto);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.bg-selecionado .descricaoEvento .titulo {
|
|
30
|
+
color: var(--cor-texto-selecao);
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import DescricaoEvento from './DescricaoEvento.vue';
|
|
2
|
+
import { Meta, StoryFn } from '@storybook/vue3';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Devix/Timeline/Moleculas/DescricaoEvento',
|
|
6
|
+
component: DescricaoEvento,
|
|
7
|
+
argTypes: {},
|
|
8
|
+
} as Meta<typeof DescricaoEvento>;
|
|
9
|
+
|
|
10
|
+
const tituloMock = 'Título';
|
|
11
|
+
const subtituloMock = 'Subtítulo';
|
|
12
|
+
|
|
13
|
+
const Template: StoryFn<typeof DescricaoEvento> = (args) => ({
|
|
14
|
+
components: { DescricaoEvento: DescricaoEvento },
|
|
15
|
+
setup() {
|
|
16
|
+
return { args };
|
|
17
|
+
},
|
|
18
|
+
template: '<DescricaoEvento v-bind="args" />',
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export const Simples = Template.bind({});
|
|
22
|
+
Simples.args = {
|
|
23
|
+
titulo: tituloMock,
|
|
24
|
+
subtitulo: '',
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const Completa = Template.bind({});
|
|
28
|
+
Completa.args = {
|
|
29
|
+
titulo: tituloMock,
|
|
30
|
+
subtitulo: subtituloMock,
|
|
31
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="subtitulo" class="descricaoEvento">
|
|
3
|
+
<TituloEvento :titulo="titulo" />
|
|
4
|
+
<SubtituloEvento :subtitulo="subtitulo" />
|
|
5
|
+
</div>
|
|
6
|
+
<div v-else class="descricaoEvento" style="padding-top: 2.3rem">
|
|
7
|
+
<TituloEvento :titulo="titulo" />
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
<script lang="ts">
|
|
11
|
+
import { defineComponent } from 'vue';
|
|
12
|
+
import SubtituloEvento from '../atomos/SubtituloEvento.vue';
|
|
13
|
+
import TituloEvento from '../atomos/TituloEvento.vue';
|
|
14
|
+
|
|
15
|
+
export default defineComponent({
|
|
16
|
+
props: {
|
|
17
|
+
titulo: {
|
|
18
|
+
required: true,
|
|
19
|
+
type: String,
|
|
20
|
+
},
|
|
21
|
+
subtitulo: {
|
|
22
|
+
required: true,
|
|
23
|
+
type: String,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
components: { TituloEvento, SubtituloEvento },
|
|
27
|
+
setup() {
|
|
28
|
+
return {};
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<style scoped>
|
|
34
|
+
/* descrição do evento */
|
|
35
|
+
|
|
36
|
+
.descricaoEvento {
|
|
37
|
+
display: table-cell;
|
|
38
|
+
vertical-align: top;
|
|
39
|
+
padding: 1.4rem;
|
|
40
|
+
padding-left: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.realizado .descricaoEvento,
|
|
44
|
+
.cancelado .descricaoEvento,
|
|
45
|
+
.adiado .descricaoEvento {
|
|
46
|
+
opacity: 0.4;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.descricaoEvento .titulo {
|
|
50
|
+
line-height: 1.8rem;
|
|
51
|
+
margin: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@media only screen and (max-width: 400px) {
|
|
55
|
+
.descricaoEvento {
|
|
56
|
+
max-width: 15rem;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import EventoTimeline from './EventoTimeline.vue';
|
|
2
|
+
import { Meta, StoryFn } from '@storybook/vue3';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Devix/Timeline/Moleculas/EventoTimeline',
|
|
6
|
+
component: EventoTimeline,
|
|
7
|
+
argTypes: {
|
|
8
|
+
status: {
|
|
9
|
+
control: { type: 'select' },
|
|
10
|
+
options: ['planejado', 'realizado', 'cancelado', 'adiado', 'atrasado'],
|
|
11
|
+
},
|
|
12
|
+
criticidade: {
|
|
13
|
+
control: { type: 'select' },
|
|
14
|
+
options: ['normal', 'media', 'alta'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
} as Meta<typeof EventoTimeline>;
|
|
18
|
+
|
|
19
|
+
const Template: StoryFn<typeof EventoTimeline> = (args) => ({
|
|
20
|
+
components: { EventoTimeline: EventoTimeline },
|
|
21
|
+
setup() {
|
|
22
|
+
return { args };
|
|
23
|
+
},
|
|
24
|
+
template: '<EventoTimeline :dadosEvento="args" />',
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const Padrao = Template.bind({});
|
|
28
|
+
Padrao.args = {
|
|
29
|
+
previsto: '2023-04-19T11:00Z',
|
|
30
|
+
realizado: '',
|
|
31
|
+
tolerancia: '',
|
|
32
|
+
titulo: 'Consulta Clinico geral',
|
|
33
|
+
subtitulo: 'Posto de saúde do bairro',
|
|
34
|
+
destaque: 'Estava passando mal',
|
|
35
|
+
categoria: {
|
|
36
|
+
nome: 'Cardiologista',
|
|
37
|
+
icone: 'cardiology',
|
|
38
|
+
},
|
|
39
|
+
status: 'planejado',
|
|
40
|
+
criticidade: 'media',
|
|
41
|
+
acao: false,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const Atual = Template.bind({});
|
|
45
|
+
Atual.args = {
|
|
46
|
+
previsto: '2023-04-19T10:00Z',
|
|
47
|
+
realizado: '',
|
|
48
|
+
tolerancia: '',
|
|
49
|
+
titulo: 'Consulta',
|
|
50
|
+
subtitulo: 'Posto de saúde',
|
|
51
|
+
destaque: '',
|
|
52
|
+
categoria: {
|
|
53
|
+
nome: 'Tele consulta',
|
|
54
|
+
icone: 'call',
|
|
55
|
+
},
|
|
56
|
+
status: 'realizado',
|
|
57
|
+
criticidade: 'alta',
|
|
58
|
+
acao: false,
|
|
59
|
+
selecionado: true,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const Importante = Template.bind({});
|
|
63
|
+
Importante.args = {
|
|
64
|
+
previsto: '2023-04-19T18:00Z',
|
|
65
|
+
realizado: '',
|
|
66
|
+
tolerancia: '',
|
|
67
|
+
titulo: 'Consulta cardiologista',
|
|
68
|
+
subtitulo: 'Posto de saúde do bairro',
|
|
69
|
+
destaque: '',
|
|
70
|
+
categoria: {
|
|
71
|
+
nome: 'Cardiologista',
|
|
72
|
+
icone: 'cardiology',
|
|
73
|
+
},
|
|
74
|
+
status: 'planejado',
|
|
75
|
+
criticidade: 'alta',
|
|
76
|
+
acao: false,
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const Realizado = Template.bind({});
|
|
80
|
+
Realizado.args = {
|
|
81
|
+
previsto: '2023-04-20T12:30Z',
|
|
82
|
+
realizado: '',
|
|
83
|
+
tolerancia: '',
|
|
84
|
+
titulo: 'Vacina da gripe',
|
|
85
|
+
subtitulo: 'Posto de saúde do bairro',
|
|
86
|
+
destaque: '',
|
|
87
|
+
categoria: {
|
|
88
|
+
nome: 'Vacina',
|
|
89
|
+
icone: 'vaccines',
|
|
90
|
+
},
|
|
91
|
+
status: 'realizado',
|
|
92
|
+
criticidade: 'media',
|
|
93
|
+
acao: true,
|
|
94
|
+
};
|