@devix-tecnologia/timeline-vue 1.1.1 → 1.2.0
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 +39 -36
- package/dist/style.css +1 -1
- package/dist/timeline-vue.es.js +230 -257
- package/dist/types/components/timeline/EventoDetalhado.mock.d.ts +4 -0
- package/dist/types/components/timeline/Templates/AdiantarHorario.vue.d.ts +35 -0
- package/dist/types/components/timeline/Templates/AdicionarObservacao.vue.d.ts +29 -0
- package/dist/types/components/timeline/Templates/EditarStatus.vue.d.ts +36 -0
- package/dist/types/components/timeline/Templates/TemplateEvento.vue.d.ts +24 -0
- package/dist/types/components/timeline/atomos/AvatarTimeline.vue.d.ts +1 -1
- package/dist/types/components/timeline/atomos/Destaque.vue.d.ts +3 -3
- package/dist/types/components/timeline/atomos/Hora.vue.d.ts +70 -1
- package/dist/types/components/timeline/atomos/IconeCategoria.vue.d.ts +1 -0
- package/dist/types/components/timeline/atomos/IconeStatus.vue.d.ts +1 -0
- package/dist/types/components/timeline/atomos/SubtituloEvento.vue.d.ts +1 -1
- package/dist/types/components/timeline/atomos/TituloEvento.vue.d.ts +1 -1
- package/dist/types/components/timeline/index.d.ts +2 -1
- package/dist/types/components/timeline/moleculas/AreaSalvamento.vue.d.ts +15 -0
- package/dist/types/components/timeline/moleculas/Botao.vue.d.ts +43 -0
- package/dist/types/components/timeline/moleculas/BotaoStatus.vue.d.ts +33 -0
- package/dist/types/components/timeline/moleculas/CabecalhoEventoDetalhado.vue.d.ts +32 -0
- package/dist/types/components/timeline/moleculas/DescricaoEvento.vue.d.ts +3 -3
- package/dist/types/components/timeline/moleculas/EventoTimeline.vue.d.ts +9 -12
- package/dist/types/components/timeline/moleculas/HoraEvento.vue.d.ts +1 -1
- package/dist/types/components/timeline/moleculas/Observacoes.vue.d.ts +30 -0
- package/dist/types/components/timeline/moleculas/PerfilTimeline.vue.d.ts +11 -9
- package/dist/types/components/timeline/moleculas/SeparadorPeriodo.vue.d.ts +0 -6
- package/dist/types/components/timeline/moleculas/StatusEvento.vue.d.ts +29 -0
- package/dist/types/components/timeline/moleculas/Topo.vue.d.ts +28 -1
- package/dist/types/components/timeline/organismos/EditarEvento.vue.d.ts +28 -0
- package/dist/types/components/timeline/organismos/EventoDetalhado.vue.d.ts +24 -0
- package/dist/types/components/timeline/organismos/Timeline.vue.d.ts +3 -2
- package/dist/types/components/timeline/type.d.ts +2 -2
- package/dist/types/components/timeline/typeDetalhado.d.ts +15 -0
- package/package.json +3 -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 -76
- 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 -217
- 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
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PropType } from "vue";
|
|
2
|
+
import "material-symbols/outlined.css";
|
|
3
|
+
import { AoClicarEvento } from "../type";
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
aoClicar: {
|
|
6
|
+
required: false;
|
|
7
|
+
type: PropType<AoClicarEvento>;
|
|
8
|
+
};
|
|
9
|
+
salvarVisivel: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
};
|
|
12
|
+
}, {
|
|
13
|
+
classes: import("vue").ComputedRef<{
|
|
14
|
+
visivel: boolean;
|
|
15
|
+
invisivel: boolean;
|
|
16
|
+
}>;
|
|
17
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
aoClicar: {
|
|
19
|
+
required: false;
|
|
20
|
+
type: PropType<AoClicarEvento>;
|
|
21
|
+
};
|
|
22
|
+
salvarVisivel: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
};
|
|
25
|
+
}>>, {
|
|
26
|
+
salvarVisivel: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PropType } from "vue";
|
|
2
|
+
import "material-symbols/outlined.css";
|
|
3
|
+
import { Perfil } from "../type";
|
|
4
|
+
import { EventoDetalhado } from "../typeDetalhado";
|
|
5
|
+
declare const _default: import("vue").DefineComponent<{
|
|
6
|
+
perfilEvento: {
|
|
7
|
+
required: true;
|
|
8
|
+
type: PropType<Perfil>;
|
|
9
|
+
};
|
|
10
|
+
dadosEvento: {
|
|
11
|
+
required: true;
|
|
12
|
+
type: PropType<EventoDetalhado>;
|
|
13
|
+
};
|
|
14
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
perfilEvento: {
|
|
16
|
+
required: true;
|
|
17
|
+
type: PropType<Perfil>;
|
|
18
|
+
};
|
|
19
|
+
dadosEvento: {
|
|
20
|
+
required: true;
|
|
21
|
+
type: PropType<EventoDetalhado>;
|
|
22
|
+
};
|
|
23
|
+
}>>, {}>;
|
|
24
|
+
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Evento } from "../type";
|
|
2
|
+
import "material-symbols/outlined.css";
|
|
2
3
|
type TipoEventoTimeline = {
|
|
3
4
|
tipo: "dia";
|
|
4
5
|
valor: Date;
|
|
@@ -14,7 +15,7 @@ type TipoEventoTimeline = {
|
|
|
14
15
|
};
|
|
15
16
|
declare const _default: import("vue").DefineComponent<{
|
|
16
17
|
perfilTimeline: {
|
|
17
|
-
required:
|
|
18
|
+
required: false;
|
|
18
19
|
type: ObjectConstructor;
|
|
19
20
|
};
|
|
20
21
|
eventosTimeline: {
|
|
@@ -26,7 +27,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
27
|
scrollParaItemAtual: () => void;
|
|
27
28
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
29
|
perfilTimeline: {
|
|
29
|
-
required:
|
|
30
|
+
required: false;
|
|
30
31
|
type: ObjectConstructor;
|
|
31
32
|
};
|
|
32
33
|
eventosTimeline: {
|
|
@@ -7,8 +7,8 @@ export type Categoria = {
|
|
|
7
7
|
nome: string;
|
|
8
8
|
icone: string;
|
|
9
9
|
};
|
|
10
|
+
export type AoClicarEvento = (evento: Evento) => void;
|
|
10
11
|
export type Evento = {
|
|
11
|
-
id: string;
|
|
12
12
|
data: Date;
|
|
13
13
|
previsto: Date;
|
|
14
14
|
duracao: number | null;
|
|
@@ -20,7 +20,7 @@ export type Evento = {
|
|
|
20
20
|
categoria: Categoria;
|
|
21
21
|
status: "atrasado" | "adiantado" | "adiado" | "realizado" | "planejado" | "cancelado";
|
|
22
22
|
criticidade: "baixa" | "media" | "alta";
|
|
23
|
-
|
|
23
|
+
aoClicar?: AoClicarEvento;
|
|
24
24
|
atual: boolean;
|
|
25
25
|
scroll: boolean;
|
|
26
26
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Evento } from "./type";
|
|
2
|
+
export type Autor = {
|
|
3
|
+
nome: string;
|
|
4
|
+
};
|
|
5
|
+
export type Observacao = {
|
|
6
|
+
mensagem: string;
|
|
7
|
+
autor: Autor;
|
|
8
|
+
criadaEm: Date;
|
|
9
|
+
};
|
|
10
|
+
export type AoAlterarEvento = (eventoDetalhado: EventoDetalhado) => void;
|
|
11
|
+
export type AoAdicionarObservacao = (eventoDetalhado: EventoDetalhado, observacao: Observacao) => void;
|
|
12
|
+
export type AoFechar = () => void;
|
|
13
|
+
export type EventoDetalhado = Evento & {
|
|
14
|
+
observacoes: Observacao[];
|
|
15
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devix-tecnologia/timeline-vue",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite",
|
|
7
7
|
"build": "vue-tsc && vite build",
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@fontsource/material-icons": "^4.5.4",
|
|
15
|
+
"date-fns": "^2.30.0",
|
|
16
|
+
"material-symbols": "^0.5.5",
|
|
15
17
|
"vue": "^3.0.0"
|
|
16
18
|
},
|
|
17
19
|
"devDependencies": {
|
|
@@ -36,7 +38,6 @@
|
|
|
36
38
|
"vue-tsc": "^1.2.0"
|
|
37
39
|
},
|
|
38
40
|
"files": [
|
|
39
|
-
"src",
|
|
40
41
|
"dist"
|
|
41
42
|
],
|
|
42
43
|
"types": "./dist/types/index.d.ts",
|
package/src/assets/vue.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import AvatarTimeline from './AvatarTimeline.vue';
|
|
2
|
-
import { Meta, StoryFn } from '@storybook/vue3';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Devix/Timeline/Atomos/AvatarTimeline',
|
|
6
|
-
component: AvatarTimeline,
|
|
7
|
-
parameters: {
|
|
8
|
-
componentSubtitle: 'Imagem ou ícones do Materials Symbols do Google',
|
|
9
|
-
},
|
|
10
|
-
argTypes: {},
|
|
11
|
-
} as Meta<typeof AvatarTimeline>;
|
|
12
|
-
|
|
13
|
-
const Template: StoryFn<typeof AvatarTimeline> = (args) => ({
|
|
14
|
-
components: { AvatarTimeline },
|
|
15
|
-
setup() {
|
|
16
|
-
return { args };
|
|
17
|
-
},
|
|
18
|
-
template: '<AvatarTimeline v-bind="args" />',
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
const avatar =
|
|
22
|
-
'https://images.unsplash.com/photo-1526080652727-5b77f74eacd2?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1752&q=80';
|
|
23
|
-
|
|
24
|
-
export const Imagem = Template.bind({});
|
|
25
|
-
Imagem.args = {
|
|
26
|
-
imagem: avatar,
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const Icone = Template.bind({});
|
|
30
|
-
Icone.args = {
|
|
31
|
-
icone: 'person',
|
|
32
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="avatar">
|
|
3
|
-
<img v-if="imagem" :src="imagem" />
|
|
4
|
-
<span v-else-if="icone" class="material-symbols-outlined">
|
|
5
|
-
{{ icone }}
|
|
6
|
-
</span>
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
<script lang="ts">
|
|
10
|
-
import { defineComponent } from "vue";
|
|
11
|
-
export default defineComponent({
|
|
12
|
-
props: {
|
|
13
|
-
imagem: {
|
|
14
|
-
type: String,
|
|
15
|
-
},
|
|
16
|
-
icone: {
|
|
17
|
-
type: String,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
setup() {
|
|
21
|
-
return {};
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
</script>
|
|
25
|
-
<style scoped>
|
|
26
|
-
.avatar {
|
|
27
|
-
background: var(--cor-secundaria);
|
|
28
|
-
color: var(--cor-apoio);
|
|
29
|
-
width: 6rem;
|
|
30
|
-
height: 6rem;
|
|
31
|
-
border-radius: 50%;
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: row;
|
|
34
|
-
justify-content: center;
|
|
35
|
-
align-items: center;
|
|
36
|
-
aspect-ratio: 1 / 1;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.avatar img {
|
|
40
|
-
aspect-ratio: 1 / 1;
|
|
41
|
-
width: 100%;
|
|
42
|
-
height: 100%;
|
|
43
|
-
object-fit: cover;
|
|
44
|
-
object-position: center;
|
|
45
|
-
border-radius: 50%;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.avatar span {
|
|
49
|
-
font-size: 3rem;
|
|
50
|
-
}
|
|
51
|
-
</style>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import '@fontsource/material-icons';
|
|
2
|
-
import BoxData from './BoxData.vue';
|
|
3
|
-
import { Meta, StoryFn } from '@storybook/vue3';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Devix/Timeline/Atomos/BoxData',
|
|
7
|
-
component: BoxData,
|
|
8
|
-
argTypes: {
|
|
9
|
-
// dataBox: { control: { type: String } },
|
|
10
|
-
aparencia: {
|
|
11
|
-
control: { type: 'select' },
|
|
12
|
-
options: ['padrao', 'escuro', 'claro'],
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
} as Meta<typeof BoxData>;
|
|
16
|
-
|
|
17
|
-
const Template: StoryFn<typeof BoxData> = (args) => ({
|
|
18
|
-
components: { BoxData },
|
|
19
|
-
setup() {
|
|
20
|
-
return { args };
|
|
21
|
-
},
|
|
22
|
-
template: '<BoxData v-bind="args" />',
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
export const Padrao = Template.bind({});
|
|
26
|
-
Padrao.args = {
|
|
27
|
-
dataNumero: '01',
|
|
28
|
-
aparencia: 'padrao',
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const Escuro = Template.bind({});
|
|
32
|
-
Escuro.args = {
|
|
33
|
-
dataNumero: '01',
|
|
34
|
-
aparencia: 'escuro',
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const Claro = Template.bind({});
|
|
38
|
-
Claro.args = {
|
|
39
|
-
dataNumero: '01',
|
|
40
|
-
aparencia: 'claro',
|
|
41
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<h3 class="boxData padrao" :class="classes">{{ dataNumero }}</h3>
|
|
3
|
-
</template>
|
|
4
|
-
<script lang="ts">
|
|
5
|
-
import { defineComponent, reactive, computed } from 'vue';
|
|
6
|
-
|
|
7
|
-
export default defineComponent({
|
|
8
|
-
name: 'BoxData',
|
|
9
|
-
props: {
|
|
10
|
-
dataNumero: {
|
|
11
|
-
required: true,
|
|
12
|
-
type: Number,
|
|
13
|
-
},
|
|
14
|
-
aparencia: {
|
|
15
|
-
type: String,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
components: {},
|
|
19
|
-
setup(props) {
|
|
20
|
-
props = reactive(props);
|
|
21
|
-
return {
|
|
22
|
-
classes: computed(() => ({
|
|
23
|
-
[`${props.aparencia || 'padrao'}`]: true,
|
|
24
|
-
})),
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<style scoped>
|
|
31
|
-
.boxData {
|
|
32
|
-
line-height: 3.5rem;
|
|
33
|
-
border-radius: 0.5rem;
|
|
34
|
-
background: var(--cor-primaria);
|
|
35
|
-
color: var(--cor-secundaria);
|
|
36
|
-
margin: 0;
|
|
37
|
-
width: 3.5rem;
|
|
38
|
-
height: 3.5rem;
|
|
39
|
-
text-align: center;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.padrao {
|
|
43
|
-
background: var(--cor-primaria);
|
|
44
|
-
color: var(--cor-secundaria);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.escuro {
|
|
48
|
-
background: var(--cor-secundaria);
|
|
49
|
-
color: var(--cor-primaria);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.claro {
|
|
53
|
-
background: var(--cor-terciaria);
|
|
54
|
-
color: var(--cor-secundaria);
|
|
55
|
-
box-shadow: 0px 0px 10px 0px #0000001c;
|
|
56
|
-
}
|
|
57
|
-
</style>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import '@fontsource/material-icons';
|
|
2
|
-
import Destaque from './Destaque.vue';
|
|
3
|
-
import { Meta, StoryFn } from '@storybook/vue3';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Devix/Timeline/Atomos/Destaque',
|
|
7
|
-
component: Destaque,
|
|
8
|
-
argTypes: {
|
|
9
|
-
// subtitulo: { control: { type: String } },
|
|
10
|
-
},
|
|
11
|
-
} as Meta<typeof Destaque>;
|
|
12
|
-
|
|
13
|
-
const DestaqueoMock = 'Texto alinhado a direita';
|
|
14
|
-
|
|
15
|
-
const Template: StoryFn<typeof Destaque> = (args) => ({
|
|
16
|
-
components: { Destaque },
|
|
17
|
-
setup() {
|
|
18
|
-
return { args };
|
|
19
|
-
},
|
|
20
|
-
template: '<Destaque v-bind="args" />',
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export const Padrao = Template.bind({});
|
|
24
|
-
Padrao.args = { destaque: DestaqueoMock };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="destaqueEvento texto-pequeno">{{ destaque }}</div>
|
|
3
|
-
</template>
|
|
4
|
-
<script lang="ts">
|
|
5
|
-
import { defineComponent } from "vue";
|
|
6
|
-
|
|
7
|
-
export default defineComponent({
|
|
8
|
-
name: "destaque",
|
|
9
|
-
props: {
|
|
10
|
-
destaque: {
|
|
11
|
-
type: String,
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
components: {},
|
|
15
|
-
setup() {
|
|
16
|
-
return {};
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
</script>
|
|
20
|
-
<style scoped>
|
|
21
|
-
.realizado .destaqueEvento,
|
|
22
|
-
.cancelado .destaqueEvento,
|
|
23
|
-
.adiado .destaqueEvento {
|
|
24
|
-
opacity: 0.4;
|
|
25
|
-
}
|
|
26
|
-
.destaqueEvento {
|
|
27
|
-
display: table-cell;
|
|
28
|
-
text-align: right;
|
|
29
|
-
width: 15%;
|
|
30
|
-
line-height: 1em;
|
|
31
|
-
color: var(--cor-texto);
|
|
32
|
-
padding: 2.4rem 1.4rem;
|
|
33
|
-
vertical-align: middle;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.bg-selecionado .destaqueEvento {
|
|
37
|
-
color: var(--cor-texto-selecao);
|
|
38
|
-
}
|
|
39
|
-
</style>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import Hora from './Hora.vue';
|
|
2
|
-
import { Meta, StoryFn } from '@storybook/vue3';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Devix/Timeline/Atomos/Hora',
|
|
6
|
-
component: Hora,
|
|
7
|
-
argTypes: {
|
|
8
|
-
// hora: { control: { type: String } },
|
|
9
|
-
aparencia: {
|
|
10
|
-
control: { type: 'select' },
|
|
11
|
-
options: ['padrao', 'riscada'],
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
} as Meta<typeof Hora>;
|
|
15
|
-
|
|
16
|
-
const horaMock = '2023-12-10T09:00Z';
|
|
17
|
-
|
|
18
|
-
const Template: StoryFn<typeof Hora> = (args) => ({
|
|
19
|
-
components: { Hora },
|
|
20
|
-
setup() {
|
|
21
|
-
return { args };
|
|
22
|
-
},
|
|
23
|
-
template: '<Hora v-bind="args" />',
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export const Padrao = Template.bind({});
|
|
27
|
-
Padrao.args = {
|
|
28
|
-
hora: horaMock,
|
|
29
|
-
aparencia: 'padrao',
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const Riscada = Template.bind({});
|
|
33
|
-
Riscada.args = {
|
|
34
|
-
hora: horaMock,
|
|
35
|
-
aparencia: 'riscada',
|
|
36
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="hora" :class="classes">
|
|
3
|
-
{{ hora.getHours() }}:{{ hora.getMinutes().toString().padStart(2, "0") }}
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
<script lang="ts">
|
|
7
|
-
import { defineComponent, reactive, computed, ref } from "vue";
|
|
8
|
-
|
|
9
|
-
export default defineComponent({
|
|
10
|
-
name: "hora",
|
|
11
|
-
props: {
|
|
12
|
-
hora: {
|
|
13
|
-
required: true,
|
|
14
|
-
type: Date,
|
|
15
|
-
},
|
|
16
|
-
aparencia: {
|
|
17
|
-
type: String,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
components: {},
|
|
21
|
-
setup(props) {
|
|
22
|
-
const propsAparecia = ref(props.aparencia);
|
|
23
|
-
|
|
24
|
-
return {
|
|
25
|
-
classes: computed(() => ({
|
|
26
|
-
[`hora-${propsAparecia || ""}`]: true,
|
|
27
|
-
})),
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
</script>
|
|
32
|
-
<style scoped>
|
|
33
|
-
.hora {
|
|
34
|
-
color: var(--cor-texto);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.bg-selecionado .hora {
|
|
38
|
-
color: var(--cor-texto-selecao);
|
|
39
|
-
}
|
|
40
|
-
.hora-padrao,
|
|
41
|
-
.horaRealizada {
|
|
42
|
-
font-weight: 500;
|
|
43
|
-
font-size: 1.4rem;
|
|
44
|
-
}
|
|
45
|
-
.hora-riscada,
|
|
46
|
-
.horaPlanejada {
|
|
47
|
-
text-decoration: line-through;
|
|
48
|
-
font-size: 1rem;
|
|
49
|
-
}
|
|
50
|
-
</style>
|
|
@@ -1,60 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,110 +0,0 @@
|
|
|
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: 2.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>
|
|
@@ -1,38 +0,0 @@
|
|
|
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' };
|