@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
|
@@ -1,32 +0,0 @@
|
|
|
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>
|
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
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: 3.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: 2.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>
|
|
@@ -1,94 +0,0 @@
|
|
|
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:
|
|
25
|
-
'<EventoTimeline :status="args.status" :criticidade="args.criticidade" :ehAtual="args.ehAtual" :previsto="args.previsto" :realizado="args.realizado" :categoria="args.categoria" :titulo="args.titulo" :subtitulo="args.subtitulo" :destaque="args.destaque" />',
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export const Padrao = Template.bind({});
|
|
29
|
-
Padrao.args = {
|
|
30
|
-
previsto: new Date("2023-04-19T11:00Z"),
|
|
31
|
-
realizado: "",
|
|
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
|
-
ehAtual: false,
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export const Atual = Template.bind({});
|
|
46
|
-
Atual.args = {
|
|
47
|
-
previsto: new Date("2023-04-19T10:00Z"),
|
|
48
|
-
realizado: "",
|
|
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
|
-
ehAtual: true,
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const Importante = Template.bind({});
|
|
63
|
-
Importante.args = {
|
|
64
|
-
previsto: new Date("2023-04-19T18:00Z"),
|
|
65
|
-
realizado: "",
|
|
66
|
-
titulo: "Consulta cardiologista",
|
|
67
|
-
subtitulo: "Posto de saúde do bairro",
|
|
68
|
-
destaque: "",
|
|
69
|
-
categoria: {
|
|
70
|
-
nome: "Cardiologista",
|
|
71
|
-
icone: "cardiology",
|
|
72
|
-
},
|
|
73
|
-
status: "planejado",
|
|
74
|
-
criticidade: "alta",
|
|
75
|
-
acao: false,
|
|
76
|
-
ehAtual: false,
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export const Realizado = Template.bind({});
|
|
80
|
-
Realizado.args = {
|
|
81
|
-
previsto: new Date("2023-04-20T12:30Z"),
|
|
82
|
-
realizado: "",
|
|
83
|
-
titulo: "Vacina da gripe",
|
|
84
|
-
subtitulo: "Posto de saúde do bairro",
|
|
85
|
-
destaque: "",
|
|
86
|
-
categoria: {
|
|
87
|
-
nome: "Vacina",
|
|
88
|
-
icone: "vaccines",
|
|
89
|
-
},
|
|
90
|
-
status: "realizado",
|
|
91
|
-
criticidade: "media",
|
|
92
|
-
acao: true,
|
|
93
|
-
ehAtual: false,
|
|
94
|
-
};
|
|
@@ -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,102 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section
|
|
3
|
-
class="perfilTimeline"
|
|
4
|
-
ref="elementoFixo"
|
|
5
|
-
:style="style"
|
|
6
|
-
:class="{ fixed: isFixed }"
|
|
7
|
-
>
|
|
8
|
-
<!-- :class="{ fixed: isFixed }" -->
|
|
9
|
-
<AvatarTimeline v-if="imagemPerfil" :imagem="imagemPerfil" />
|
|
10
|
-
<AvatarTimeline v-else-if="iconePerfil" :icone="iconePerfil" />
|
|
11
|
-
<h2 class="nome">{{ nomePerfil }}</h2>
|
|
12
|
-
</section>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script lang="ts">
|
|
16
|
-
import {
|
|
17
|
-
defineComponent,
|
|
18
|
-
ref,
|
|
19
|
-
onMounted,
|
|
20
|
-
onUnmounted,
|
|
21
|
-
reactive,
|
|
22
|
-
computed,
|
|
23
|
-
} from "vue";
|
|
24
|
-
import AvatarTimeline from "../atomos/AvatarTimeline.vue";
|
|
25
|
-
|
|
26
|
-
export default defineComponent({
|
|
27
|
-
components: { AvatarTimeline },
|
|
28
|
-
props: {
|
|
29
|
-
imagemPerfil: {
|
|
30
|
-
type: String,
|
|
31
|
-
},
|
|
32
|
-
nomePerfil: {
|
|
33
|
-
type: String,
|
|
34
|
-
},
|
|
35
|
-
iconePerfil: {
|
|
36
|
-
type: String,
|
|
37
|
-
},
|
|
38
|
-
backgroundColor: {
|
|
39
|
-
type: String,
|
|
40
|
-
default: "var(--cor-primaria)",
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
setup(props) {
|
|
44
|
-
props = reactive(props);
|
|
45
|
-
// passando o background por props no style
|
|
46
|
-
const style = computed(() => ({
|
|
47
|
-
backgroundColor: props.backgroundColor,
|
|
48
|
-
}));
|
|
49
|
-
// fixando o box no topo da página
|
|
50
|
-
const elementoFixo = ref<HTMLElement | null>(null);
|
|
51
|
-
const isFixed = ref(false);
|
|
52
|
-
|
|
53
|
-
const handleScroll = () => {
|
|
54
|
-
if (elementoFixo.value) {
|
|
55
|
-
const scrollTop =
|
|
56
|
-
window.pageYOffset || document.documentElement.scrollTop;
|
|
57
|
-
const offset = elementoFixo.value.offsetTop;
|
|
58
|
-
isFixed.value = scrollTop > offset;
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
onMounted(() => {
|
|
63
|
-
window.addEventListener("scroll", handleScroll);
|
|
64
|
-
});
|
|
65
|
-
onUnmounted(() => {
|
|
66
|
-
window.removeEventListener("scroll", handleScroll);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
return {
|
|
70
|
-
style,
|
|
71
|
-
isFixed,
|
|
72
|
-
};
|
|
73
|
-
},
|
|
74
|
-
});
|
|
75
|
-
</script>
|
|
76
|
-
|
|
77
|
-
<style scoped>
|
|
78
|
-
.perfilTimeline {
|
|
79
|
-
background: var(--cor-primaria);
|
|
80
|
-
padding: 1.4rem;
|
|
81
|
-
display: flex;
|
|
82
|
-
flex-direction: row;
|
|
83
|
-
justify-content: center;
|
|
84
|
-
align-items: center;
|
|
85
|
-
gap: 1.4rem;
|
|
86
|
-
z-index: 999;
|
|
87
|
-
width: 100%;
|
|
88
|
-
min-height: 8rem;
|
|
89
|
-
transition: all 0.3s;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.nome {
|
|
93
|
-
color: var(--cor-secundaria);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.fixed {
|
|
97
|
-
position: fixed;
|
|
98
|
-
top: 0;
|
|
99
|
-
left: 0;
|
|
100
|
-
transition: all 0.3s;
|
|
101
|
-
}
|
|
102
|
-
</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
|
-
};
|