@devix-tecnologia/timeline-vue 1.1.0 → 1.1.2
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 +50 -35
- package/dist/style.css +1 -1
- package/dist/timeline-vue.es.js +166 -176
- package/dist/types/components/timeline/moleculas/PerfilTimeline.vue.d.ts +0 -1
- package/dist/types/components/timeline/organismos/Timeline.vue.d.ts +1 -0
- package/package.json +2 -2
- package/src/assets/vue.svg +0 -1
- package/src/components/timeline/atomos/AvatarTimeline.stories.ts +0 -32
- package/src/components/timeline/atomos/AvatarTimeline.vue +0 -51
- package/src/components/timeline/atomos/BoxData.stories.ts +0 -41
- package/src/components/timeline/atomos/BoxData.vue +0 -57
- package/src/components/timeline/atomos/Destaque.stories.ts +0 -24
- package/src/components/timeline/atomos/Destaque.vue +0 -39
- package/src/components/timeline/atomos/Hora.stories.ts +0 -36
- package/src/components/timeline/atomos/Hora.vue +0 -50
- package/src/components/timeline/atomos/IconeCategoria.stories.ts +0 -60
- package/src/components/timeline/atomos/IconeCategoria.vue +0 -110
- package/src/components/timeline/atomos/IconeStatus.stories.ts +0 -38
- package/src/components/timeline/atomos/IconeStatus.vue +0 -73
- package/src/components/timeline/atomos/SubtituloEvento.stories.ts +0 -24
- package/src/components/timeline/atomos/SubtituloEvento.vue +0 -33
- package/src/components/timeline/atomos/TituloEvento.stories.ts +0 -24
- package/src/components/timeline/atomos/TituloEvento.vue +0 -32
- package/src/components/timeline/index.ts +0 -7
- package/src/components/timeline/moleculas/DescricaoEvento.stories.ts +0 -31
- package/src/components/timeline/moleculas/DescricaoEvento.vue +0 -59
- package/src/components/timeline/moleculas/EventoTimeline.stories.ts +0 -94
- package/src/components/timeline/moleculas/EventoTimeline.vue +0 -158
- package/src/components/timeline/moleculas/HoraEvento.stories.ts +0 -37
- package/src/components/timeline/moleculas/HoraEvento.vue +0 -74
- package/src/components/timeline/moleculas/PerfilTimeline.stories.ts +0 -40
- package/src/components/timeline/moleculas/PerfilTimeline.vue +0 -102
- package/src/components/timeline/moleculas/SeparadorPeriodo.stories.ts +0 -42
- package/src/components/timeline/moleculas/SeparadorPeriodo.vue +0 -100
- package/src/components/timeline/moleculas/Topo.vue +0 -38
- package/src/components/timeline/organismos/Timeline.mock.ts +0 -311
- package/src/components/timeline/organismos/Timeline.stories.ts +0 -48
- package/src/components/timeline/organismos/Timeline.vue +0 -212
- package/src/components/timeline/type.ts +0 -34
- package/src/global.css +0 -98
- package/src/index.ts +0 -16
- package/src/vite-env.d.ts +0 -1
package/README.md
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-

|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
|
|
2
4
|
|
|
3
5
|
# Timeline de Eventos DEVIX
|
|
4
6
|
|
|
5
7
|
Este é um projeto implementando uma linha do tempo de eventos utilizando Vue 3 e Typescript. Utiliza o Storybook para o desenvolvimento dos componentes seguindo o Design Atômico.
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
<div align="center">
|
|
10
|
+
<img src="https://github.com/devix-tecnologia/timeline-vue/blob/91c3b94c6167ca02364507d58dc59bb804b3b51f/docs/timeline01.gif" width="300px"/>
|
|
11
|
+
</div>
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
## 🛠 Como usar
|
|
@@ -24,55 +27,66 @@ yarn add @devix-tecnologia/timeline-vue
|
|
|
24
27
|
//exemplo.vue
|
|
25
28
|
|
|
26
29
|
<template>
|
|
27
|
-
<
|
|
30
|
+
<main>
|
|
31
|
+
<div class="telaTimeline">
|
|
32
|
+
<Timeline :perfilTimeline="perfilTimeline" :eventosTimeline="listaEventos" />
|
|
33
|
+
</div>
|
|
34
|
+
</main>
|
|
28
35
|
</template>
|
|
29
36
|
|
|
30
37
|
<script lang="ts">
|
|
31
|
-
import { defineComponent } from
|
|
32
|
-
import { Timeline } from
|
|
38
|
+
import { defineComponent } from 'vue'
|
|
39
|
+
import { Timeline } from '@devix-tecnologia/timeline-vue'
|
|
40
|
+
import '@devix-tecnologia/timeline-vue/dist/style.css'
|
|
33
41
|
|
|
34
42
|
export default defineComponent({
|
|
43
|
+
components: { Timeline },
|
|
35
44
|
setup() {
|
|
36
|
-
const
|
|
45
|
+
const perfilTimeline = {
|
|
46
|
+
nome: 'Maria do Socorro',
|
|
47
|
+
imagem: 'https://this-person-does-not-exist.com/img/avatar-gen11071f8e0802a35d66684ee9376722b2.jpg',
|
|
48
|
+
icone: 'person'
|
|
49
|
+
}
|
|
50
|
+
const listaEventos = [
|
|
37
51
|
{
|
|
38
|
-
id:
|
|
39
|
-
data: new Date(
|
|
40
|
-
previsto: new Date(
|
|
41
|
-
realizado: new Date(
|
|
52
|
+
id: '15ea7863-2402-4b84-8a8d-10a00ba07e2f2',
|
|
53
|
+
data: new Date('2023-04-26T18:10Z'),
|
|
54
|
+
previsto: new Date('2023-04-26T18:10Z'),
|
|
55
|
+
realizado: new Date('2023-04-26T18:15Z'),
|
|
42
56
|
duracao: null,
|
|
43
57
|
tolerancia: 20,
|
|
44
|
-
titulo:
|
|
45
|
-
subtitulo:
|
|
46
|
-
destaque:
|
|
58
|
+
titulo: 'Vacina da gripe',
|
|
59
|
+
subtitulo: 'Posto de saúde do bairro',
|
|
60
|
+
destaque: '',
|
|
47
61
|
categoria: {
|
|
48
|
-
nome:
|
|
49
|
-
icone:
|
|
62
|
+
nome: 'Vacina',
|
|
63
|
+
icone: 'vaccines'
|
|
50
64
|
},
|
|
51
|
-
status:
|
|
52
|
-
criticidade:
|
|
65
|
+
status: 'realizado',
|
|
66
|
+
criticidade: 'alta'
|
|
53
67
|
},
|
|
54
68
|
{
|
|
55
|
-
id:
|
|
56
|
-
data: new Date(
|
|
57
|
-
previsto: new Date(
|
|
69
|
+
id: '15ea7863-2402-4b84-8a8d-10a00ba07e2f14',
|
|
70
|
+
data: new Date('2023-05-09T17:00Z'),
|
|
71
|
+
previsto: new Date('2023-05-09T17:00Z'),
|
|
58
72
|
realizado: null,
|
|
59
73
|
duracao: null,
|
|
60
74
|
tolerancia: 10,
|
|
61
|
-
titulo:
|
|
62
|
-
subtitulo:
|
|
63
|
-
destaque:
|
|
75
|
+
titulo: 'Vitamina D',
|
|
76
|
+
subtitulo: '2 comprimidos',
|
|
77
|
+
destaque: '',
|
|
64
78
|
categoria: {
|
|
65
|
-
nome:
|
|
66
|
-
icone:
|
|
79
|
+
nome: 'Remédio',
|
|
80
|
+
icone: 'pill'
|
|
67
81
|
},
|
|
68
|
-
status:
|
|
69
|
-
criticidade:
|
|
70
|
-
aoCLicar: () => alert(
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
return {
|
|
74
|
-
}
|
|
75
|
-
})
|
|
82
|
+
status: 'planejado',
|
|
83
|
+
criticidade: 'baixa',
|
|
84
|
+
aoCLicar: () => alert('Olá, mundo!')
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
return { perfilTimeline, listaEventos }
|
|
88
|
+
}
|
|
89
|
+
})
|
|
76
90
|
</script>
|
|
77
91
|
|
|
78
92
|
<style>
|
|
@@ -124,7 +138,8 @@ A Timeline da DEVIX ordena e lista Eventos de forma crescente de acordo com a da
|
|
|
124
138
|
Cada Evento mostra a hora prevista, hora em que o evento foi realizado, título, subtítulo, ícone de categoria, ícone de status, indicação de criticidade e campo para informação em destaque.
|
|
125
139
|
|
|
126
140
|
|
|
127
|
-

|
|
142
|
+
|
|
128
143
|
|
|
129
144
|
## 🚀 Contribuindo
|
|
130
145
|
---
|