@devix-tecnologia/timeline-vue 1.1.1 → 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.
Files changed (41) hide show
  1. package/README.md +41 -36
  2. package/dist/style.css +1 -1
  3. package/dist/timeline-vue.es.js +47 -47
  4. package/dist/types/components/timeline/organismos/Timeline.vue.d.ts +1 -0
  5. package/package.json +2 -2
  6. package/src/assets/vue.svg +0 -1
  7. package/src/components/timeline/atomos/AvatarTimeline.stories.ts +0 -32
  8. package/src/components/timeline/atomos/AvatarTimeline.vue +0 -51
  9. package/src/components/timeline/atomos/BoxData.stories.ts +0 -41
  10. package/src/components/timeline/atomos/BoxData.vue +0 -57
  11. package/src/components/timeline/atomos/Destaque.stories.ts +0 -24
  12. package/src/components/timeline/atomos/Destaque.vue +0 -39
  13. package/src/components/timeline/atomos/Hora.stories.ts +0 -36
  14. package/src/components/timeline/atomos/Hora.vue +0 -50
  15. package/src/components/timeline/atomos/IconeCategoria.stories.ts +0 -60
  16. package/src/components/timeline/atomos/IconeCategoria.vue +0 -110
  17. package/src/components/timeline/atomos/IconeStatus.stories.ts +0 -38
  18. package/src/components/timeline/atomos/IconeStatus.vue +0 -73
  19. package/src/components/timeline/atomos/SubtituloEvento.stories.ts +0 -24
  20. package/src/components/timeline/atomos/SubtituloEvento.vue +0 -33
  21. package/src/components/timeline/atomos/TituloEvento.stories.ts +0 -24
  22. package/src/components/timeline/atomos/TituloEvento.vue +0 -32
  23. package/src/components/timeline/index.ts +0 -7
  24. package/src/components/timeline/moleculas/DescricaoEvento.stories.ts +0 -31
  25. package/src/components/timeline/moleculas/DescricaoEvento.vue +0 -59
  26. package/src/components/timeline/moleculas/EventoTimeline.stories.ts +0 -94
  27. package/src/components/timeline/moleculas/EventoTimeline.vue +0 -158
  28. package/src/components/timeline/moleculas/HoraEvento.stories.ts +0 -37
  29. package/src/components/timeline/moleculas/HoraEvento.vue +0 -74
  30. package/src/components/timeline/moleculas/PerfilTimeline.stories.ts +0 -40
  31. package/src/components/timeline/moleculas/PerfilTimeline.vue +0 -76
  32. package/src/components/timeline/moleculas/SeparadorPeriodo.stories.ts +0 -42
  33. package/src/components/timeline/moleculas/SeparadorPeriodo.vue +0 -100
  34. package/src/components/timeline/moleculas/Topo.vue +0 -38
  35. package/src/components/timeline/organismos/Timeline.mock.ts +0 -311
  36. package/src/components/timeline/organismos/Timeline.stories.ts +0 -48
  37. package/src/components/timeline/organismos/Timeline.vue +0 -217
  38. package/src/components/timeline/type.ts +0 -34
  39. package/src/global.css +0 -98
  40. package/src/index.ts +0 -16
  41. package/src/vite-env.d.ts +0 -1
@@ -1,158 +0,0 @@
1
- <template>
2
- <article
3
- class="eventoTimeline"
4
- :class="[status, 'criticidade-' + criticidade, eventoSelecionado, clicavel]"
5
- :onclick="aoCLicar"
6
- >
7
- <IconeStatus :status="status" />
8
- <HoraEvento :horaPrevista="previsto" :horaRealizada="realizado" />
9
- <IconeCategoria
10
- :iconeCategoria="categoria.icone"
11
- :categoria="categoria.nome"
12
- />
13
- <DescricaoEvento :titulo="titulo" :subtitulo="subtitulo" />
14
- <Destaque :destaque="destaque" />
15
- </article>
16
- </template>
17
- <script lang="ts">
18
- import { defineComponent, computed, PropType } from "vue";
19
- import IconeCategoria from "../atomos/IconeCategoria.vue";
20
- import IconeStatus from "../atomos/IconeStatus.vue";
21
- import DescricaoEvento from "./DescricaoEvento.vue";
22
- import HoraEvento from "./HoraEvento.vue";
23
- import Destaque from "../atomos/Destaque.vue";
24
- // import { Evento, Categoria } from "../type";
25
-
26
- interface Categoria {
27
- nome: string;
28
- icone: string;
29
- }
30
-
31
- export default defineComponent({
32
- props: {
33
- status: {
34
- required: true,
35
- type: String,
36
- },
37
- criticidade: {
38
- required: true,
39
- type: String,
40
- },
41
- ehAtual: {
42
- required: true,
43
- type: Boolean,
44
- },
45
- previsto: {
46
- required: true,
47
- type: Date,
48
- },
49
- realizado: {
50
- required: false,
51
- type: Date as PropType<Date | null>,
52
- },
53
- categoria: {
54
- required: true,
55
- type: Object as () => Categoria,
56
- },
57
- titulo: {
58
- required: true,
59
- type: String,
60
- },
61
- subtitulo: {
62
- required: true,
63
- type: String,
64
- },
65
- destaque: {
66
- required: true,
67
- type: String,
68
- },
69
- aoCLicar: {
70
- required: false,
71
- type: Function as PropType<VoidFunction>,
72
- },
73
- },
74
- components: {
75
- IconeStatus,
76
- IconeCategoria,
77
- HoraEvento,
78
- DescricaoEvento,
79
- Destaque,
80
- },
81
- setup(props) {
82
- return {
83
- eventoSelecionado: computed(() => ({
84
- atual: props.ehAtual,
85
- padrao: props.ehAtual,
86
- })),
87
- clicavel: computed(() => ({
88
- clicavel: props.aoCLicar !== undefined,
89
- })),
90
- };
91
- },
92
- });
93
- </script>
94
- <style scoped>
95
- /* BOX DO EVENTO */
96
-
97
- .eventoTimeline {
98
- position: relative;
99
- width: 100%;
100
- border-radius: 1rem;
101
- }
102
-
103
- .clicavel {
104
- cursor: pointer;
105
- }
106
-
107
- .eventoTimeline:hover {
108
- background: #f9f9f9;
109
- }
110
-
111
- .atual {
112
- background: var(--cor-selecao);
113
- }
114
-
115
- .atual:hover {
116
- background: var(--cor-selecao);
117
- }
118
-
119
- /* box com as informações */
120
-
121
- .eventoTimeline:before {
122
- content: "";
123
- background: var(--cor-linha);
124
- display: block;
125
- position: absolute;
126
- width: 2px;
127
- top: 0;
128
- height: 2.5rem;
129
- left: 11.9rem;
130
- }
131
-
132
- .eventoTimeline:after {
133
- content: "";
134
- background: var(--cor-linha);
135
- display: block;
136
- position: absolute;
137
- width: 2px;
138
- top: 6.1rem;
139
- bottom: 0;
140
- left: 11.9rem;
141
- }
142
-
143
- .eventoTimeline.atrasado:before {
144
- background: var(--cor-alerta);
145
- }
146
-
147
- .eventoTimeline.atrasado:after {
148
- background: var(--cor-alerta);
149
- }
150
-
151
- .eventoTimeline.atrasado:before {
152
- background: var(--cor-alerta);
153
- }
154
-
155
- .eventoTimeline.atrasado:after {
156
- background: var(--cor-alerta);
157
- }
158
- </style>
@@ -1,37 +0,0 @@
1
- import HoraEvento from './HoraEvento.vue';
2
- import { Meta, StoryFn } from '@storybook/vue3';
3
-
4
- export default {
5
- title: 'Devix/Timeline/Moleculas/HoraEvento',
6
- component: HoraEvento,
7
- argTypes: {
8
- // aparencia: {
9
- // control: { type: 'select' },
10
- // options: ['padrao', 'riscada'],
11
- // },
12
- },
13
- } as Meta<typeof HoraEvento>;
14
-
15
- const horaMock = '2023-12-10T11:00Z';
16
-
17
- const Template: StoryFn<typeof HoraEvento> = (args) => ({
18
- components: { HoraEvento: HoraEvento },
19
- setup() {
20
- return { args };
21
- },
22
- template: '<HoraEvento v-bind="args" />',
23
- });
24
-
25
- export const Padrao = Template.bind({});
26
- Padrao.args = {
27
- horaPrevista: horaMock,
28
- horaRealizada: '',
29
- // aparencia: 'padrao',
30
- };
31
-
32
- export const Atrasado = Template.bind({});
33
- Atrasado.args = {
34
- horaPrevista: horaMock,
35
- horaRealizada: '2023-12-10T12:00Z',
36
- // aparencia: 'riscada',
37
- };
@@ -1,74 +0,0 @@
1
- <template>
2
- <div class="areaHora">
3
- <div class="horaEvento">
4
- <Hora
5
- v-if="horaRealizada"
6
- class="horaRealizada texto-grande"
7
- :hora="horaRealizada"
8
- style="padding-top: 0.3rem"
9
- />
10
- <Hora
11
- v-if="horaRealizada"
12
- class="horaPlanejada texto-pequeno"
13
- :hora="horaPrevista"
14
- />
15
-
16
- <Hora
17
- v-else
18
- class="horaRealizada texto-grande"
19
- :hora="horaPrevista"
20
- style="padding-top: 1.2rem"
21
- />
22
- </div>
23
- </div>
24
- </template>
25
- <script lang="ts">
26
- import { defineComponent, PropType } from "vue";
27
- import Hora from "../atomos/Hora.vue";
28
-
29
- export default defineComponent({
30
- props: {
31
- horaPrevista: {
32
- type: Date,
33
- required: true,
34
- },
35
- horaRealizada: {
36
- required: false,
37
- type: Date as PropType<Date | null>,
38
- },
39
- // aparencia: {
40
- // type: String,
41
- // },
42
- },
43
- components: { Hora },
44
- setup() {
45
- return {};
46
- },
47
- });
48
- </script>
49
- <style scoped>
50
- .realizado .horaEvento,
51
- .cancelado .horaEvento,
52
- .adiado .horaEvento {
53
- opacity: 0.4;
54
- }
55
- .areaHora {
56
- width: 4.5rem;
57
- display: table-cell;
58
- vertical-align: top;
59
- text-align: right;
60
- padding: 2.4rem 0;
61
- }
62
- .horaEvento {
63
- line-height: 1.4rem;
64
- text-align: right;
65
- display: flex;
66
- flex-direction: column;
67
- }
68
- .horaRealizada {
69
- font-weight: 500;
70
- }
71
- .horaPlanejada {
72
- text-decoration: line-through;
73
- }
74
- </style>
@@ -1,40 +0,0 @@
1
- import PerfilTimeline from "./PerfilTimeline.vue";
2
- import { Meta, StoryFn } from "@storybook/vue3";
3
-
4
- export default {
5
- title: "Devix/Timeline/Moleculas/PerfilTimeline",
6
- component: PerfilTimeline,
7
- argTypes: {},
8
- } as Meta<typeof PerfilTimeline>;
9
-
10
- const avatar =
11
- "https://images.unsplash.com/photo-1526080652727-5b77f74eacd2?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1752&q=80";
12
-
13
- const Template: StoryFn<typeof PerfilTimeline> = (args) => ({
14
- components: { PerfilTimeline: PerfilTimeline },
15
- setup() {
16
- return { args };
17
- },
18
- template: '<PerfilTimeline v-bind="args" style="position: relative" />',
19
- });
20
-
21
- export const ComImagem = Template.bind({});
22
- ComImagem.args = {
23
- imagemPerfil: avatar,
24
- nomePerfil: "Dona Maria",
25
- iconePerfil: "",
26
- };
27
-
28
- export const ComIcone = Template.bind({});
29
- ComIcone.args = {
30
- imagemPerfil: "",
31
- nomePerfil: "Dona Maria",
32
- iconePerfil: "person",
33
- };
34
-
35
- export const ApenasTitulo = Template.bind({});
36
- ApenasTitulo.args = {
37
- imagemPerfil: "",
38
- nomePerfil: "Dona Maria",
39
- iconePerfil: "",
40
- };
@@ -1,76 +0,0 @@
1
- <template>
2
- <section class="perfilTimeline fixed" ref="elementoFixo" :style="style">
3
- <AvatarTimeline v-if="imagemPerfil" :imagem="imagemPerfil" />
4
- <AvatarTimeline v-else-if="iconePerfil" :icone="iconePerfil" />
5
- <h2 class="nome">{{ nomePerfil }}</h2>
6
- </section>
7
- </template>
8
-
9
- <script lang="ts">
10
- import {
11
- defineComponent,
12
- ref,
13
- onMounted,
14
- onUnmounted,
15
- reactive,
16
- computed,
17
- } from "vue";
18
- import AvatarTimeline from "../atomos/AvatarTimeline.vue";
19
-
20
- export default defineComponent({
21
- components: { AvatarTimeline },
22
- props: {
23
- imagemPerfil: {
24
- type: String,
25
- },
26
- nomePerfil: {
27
- type: String,
28
- },
29
- iconePerfil: {
30
- type: String,
31
- },
32
- backgroundColor: {
33
- type: String,
34
- default: "var(--cor-primaria)",
35
- },
36
- },
37
- setup(props) {
38
- props = reactive(props);
39
- // passando o background por props no style
40
- const style = computed(() => ({
41
- backgroundColor: props.backgroundColor,
42
- }));
43
-
44
- return {
45
- style,
46
- };
47
- },
48
- });
49
- </script>
50
-
51
- <style scoped>
52
- .perfilTimeline {
53
- background: var(--cor-primaria);
54
- padding: 1.4rem;
55
- display: flex;
56
- flex-direction: row;
57
- justify-content: center;
58
- align-items: center;
59
- gap: 1.4rem;
60
- z-index: 999;
61
- width: 100%;
62
- min-height: 8rem;
63
- transition: all 0.3s;
64
- }
65
-
66
- .nome {
67
- color: var(--cor-secundaria);
68
- }
69
-
70
- .fixed {
71
- position: fixed;
72
- top: 0;
73
- left: 0;
74
- transition: all 0.3s;
75
- }
76
- </style>
@@ -1,42 +0,0 @@
1
- import SeparadorPeriodo from './SeparadorPeriodo.vue';
2
- import { Meta, StoryFn } from '@storybook/vue3';
3
-
4
- export default {
5
- title: 'Devix/Timeline/Moleculas/SeparadorPeriodo',
6
- component: SeparadorPeriodo,
7
- argTypes: {
8
- aparencia: {
9
- control: { type: 'select' },
10
- options: ['padrao', 'escuro', 'claro'],
11
- },
12
- },
13
- } as Meta<typeof SeparadorPeriodo>;
14
-
15
- const Template: StoryFn<typeof SeparadorPeriodo> = (args) => ({
16
- components: { SeparadorPeriodo: SeparadorPeriodo },
17
- setup() {
18
- return { args };
19
- },
20
- template: '<SeparadorPeriodo v-bind="args" />',
21
- });
22
-
23
- export const Padrao = Template.bind({});
24
- Padrao.args = {
25
- dataSeparador: '01',
26
- mesNome: 'Janeiro',
27
- aparencia: 'padrao',
28
- };
29
-
30
- export const Escuro = Template.bind({});
31
- Escuro.args = {
32
- dataSeparador: '01',
33
- mesNome: 'Janeiro',
34
- aparencia: 'escuro',
35
- };
36
-
37
- export const Claro = Template.bind({});
38
- Claro.args = {
39
- dataSeparador: '01',
40
- mesNome: 'Janeiro',
41
- aparencia: 'claro',
42
- };
@@ -1,100 +0,0 @@
1
- <template>
2
- <div class="separadorPeriodo">
3
- <div class="areaData">
4
- <BoxData :dataNumero="dataSeparador.getDate()" :aparencia="aparencia" />
5
- </div>
6
- <h3 class="titulo" :class="aparencia">
7
- {{ mesCorrente(dataSeparador.getMonth()) }} de
8
- {{ dataSeparador.getFullYear() }}
9
- </h3>
10
- </div>
11
- </template>
12
-
13
- <script lang="ts">
14
- import { defineComponent, ref } from "vue";
15
- import BoxData from "../atomos/BoxData.vue";
16
-
17
- export default defineComponent({
18
- name: "SeparadorPeriodo",
19
- props: {
20
- dataSeparador: {
21
- required: true,
22
- type: Date,
23
- },
24
- aparencia: {
25
- type: String,
26
- },
27
- },
28
- components: { BoxData },
29
- setup(props) {
30
- const arrayMes = new Array(12);
31
- arrayMes[0] = "Janeiro";
32
- arrayMes[1] = "Fevereiro";
33
- arrayMes[2] = "Março";
34
- arrayMes[3] = "Abril";
35
- arrayMes[4] = "Maio";
36
- arrayMes[5] = "Junho";
37
- arrayMes[6] = "Julho";
38
- arrayMes[7] = "Agosto";
39
- arrayMes[8] = "Setembro";
40
- arrayMes[9] = "Outubro";
41
- arrayMes[10] = "Novembro";
42
- arrayMes[11] = "Dezembro";
43
-
44
- const mesCorrente = (mes: number) => {
45
- return arrayMes[mes];
46
- };
47
- return { mesCorrente };
48
- },
49
- });
50
- </script>
51
-
52
- <style scoped>
53
- /* SEPARADOR */
54
-
55
- .separadorPeriodo {
56
- display: table-row;
57
- width: 100%;
58
- position: relative;
59
- background: #fff;
60
- }
61
-
62
- .areaData {
63
- display: table-cell;
64
- padding: 2.8rem 1.4rem;
65
- padding-left: 10.1rem;
66
- position: relative;
67
- }
68
-
69
- .areaData:before {
70
- content: "";
71
- background: var(--cor-linha);
72
- display: block;
73
- position: absolute;
74
- width: 2px;
75
- height: 2.5rem;
76
- top: 0;
77
- left: 11.9rem;
78
- }
79
-
80
- .areaData:after {
81
- content: "";
82
- background: var(--cor-linha);
83
- display: block;
84
- position: absolute;
85
- width: 2px;
86
- height: 2.5rem;
87
- bottom: 0;
88
- left: 11.9rem;
89
- }
90
-
91
- .separadorPeriodo .titulo {
92
- text-transform: uppercase;
93
- padding-bottom: 3.45rem;
94
- color: var(--cor-texto);
95
- }
96
-
97
- .separadorPeriodo .titulo.claro {
98
- color: var(--cor-apoio);
99
- }
100
- </style>
@@ -1,38 +0,0 @@
1
- <template>
2
- <div class="topo">
3
- <div class="Topo">
4
- <!-- iconeSeta -->
5
- <span class="material-symbols-outlined"> arrow_back </span>
6
- <!-- titulo -->
7
- <h2 class="titulo">Linha do tempo</h2>
8
- <!-- menu -->
9
- <span class="material-symbols-outlined"> more_vert </span>
10
- </div>
11
- </div>
12
- </template>
13
-
14
- <script lang="ts">
15
- import { defineComponent } from 'vue';
16
-
17
- export default defineComponent({
18
- setup() {
19
- return {};
20
- },
21
- });
22
- </script>
23
-
24
- <style scoped>
25
- /* CABEÇALHO */
26
- .material-symbols-outlined {
27
- font-size: 2.6rem;
28
- }
29
- .Topo {
30
- background: var(--cor-secundaria);
31
- padding: 1.4rem;
32
- color: var(--cor-terciaria);
33
- display: flex;
34
- flex-direction: row;
35
- justify-content: space-between;
36
- align-items: center;
37
- }
38
- </style>