vue-intergrall-plugins 0.0.137 → 0.0.141
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/dist/vue-intergrall-plugins.esm.js +1153 -306
- package/dist/vue-intergrall-plugins.min.js +1 -1
- package/dist/vue-intergrall-plugins.ssr.js +928 -244
- package/package.json +1 -1
- package/src/lib-components/Cards/Card.vue +394 -0
- package/src/lib-components/Cards/CardCheck.vue +35 -0
- package/src/lib-components/Cards/CardFile.vue +213 -0
- package/src/lib-components/Messages/InteratividadeBotoes.vue +94 -4
- package/src/lib-components/Messages/InteratividadePopup.vue +78 -0
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="interatividade">
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
</
|
|
3
|
+
<transition name="show-x">
|
|
4
|
+
<InteratividadePopup v-if="listaEstaAberta" :lista="listaExpandida" :titulo="objItens.list.title" @close="listaEstaAberta = false" />
|
|
5
|
+
</transition>
|
|
6
|
+
<template v-if="arrBotoes.length">
|
|
7
|
+
<div v-for="(btn, index) in arrBotoes" :key="index" :title="btn.titulo" class="interatividade-btn">
|
|
8
|
+
<p v-text="btn.titulo" class="interatividade-titulo"></p>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
<template v-else-if="Object.keys(objItens).length">
|
|
12
|
+
<div class="interatividade-lista">
|
|
13
|
+
<div class="interatividade-lista-conteudo">
|
|
14
|
+
<p v-if="objItens.header.text" v-text="objItens.header.text" class="interatividade-lista-titulo"></p>
|
|
15
|
+
<p v-if="objItens.body.text" v-text="objItens.body.text" class="interatividade-lista-corpo"></p>
|
|
16
|
+
<p v-if="objItens.footer.text" v-text="objItens.footer.text" class="interatividade-lista-rodape"></p>
|
|
17
|
+
</div>
|
|
18
|
+
<p v-if="objItens.list.title" v-text="objItens.list.title" @click="expandirLista" class="interatividade-lista-link"></p>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
6
21
|
</div>
|
|
7
22
|
</template>
|
|
8
23
|
|
|
9
24
|
<script>
|
|
25
|
+
import InteratividadePopup from './InteratividadePopup'
|
|
26
|
+
|
|
10
27
|
export default {
|
|
28
|
+
components: {InteratividadePopup},
|
|
29
|
+
data() {
|
|
30
|
+
return {
|
|
31
|
+
listaEstaAberta: false
|
|
32
|
+
}
|
|
33
|
+
},
|
|
11
34
|
props: {
|
|
12
35
|
interatividade: {
|
|
13
36
|
type: Object,
|
|
@@ -19,13 +42,46 @@ export default {
|
|
|
19
42
|
return this.interatividade.tipo
|
|
20
43
|
},
|
|
21
44
|
arrBotoes() {
|
|
22
|
-
|
|
45
|
+
const { botoes } = this.interatividade
|
|
46
|
+
return botoes ? botoes : []
|
|
47
|
+
},
|
|
48
|
+
objItens() {
|
|
49
|
+
const { itens } = this.interatividade
|
|
50
|
+
return itens ? itens : {}
|
|
51
|
+
},
|
|
52
|
+
listaExpandida() {
|
|
53
|
+
try {
|
|
54
|
+
const { list } = this.objItens
|
|
55
|
+
const { sections } = list
|
|
56
|
+
return sections ? sections : []
|
|
57
|
+
}catch(e) {
|
|
58
|
+
console.error("Erro ao definir a lista a ser expandida")
|
|
59
|
+
console.error(e)
|
|
60
|
+
return []
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
methods: {
|
|
65
|
+
expandirLista() {
|
|
66
|
+
this.listaEstaAberta = !this.listaEstaAberta
|
|
23
67
|
}
|
|
24
68
|
}
|
|
25
69
|
}
|
|
26
70
|
</script>
|
|
27
71
|
|
|
28
72
|
<style>
|
|
73
|
+
.show-x-enter-active,
|
|
74
|
+
.show-x-leave-enter {
|
|
75
|
+
opacity: 1;
|
|
76
|
+
transform: translateX(0);
|
|
77
|
+
transition: all 200ms linear;
|
|
78
|
+
}
|
|
79
|
+
.show-x-enter,
|
|
80
|
+
.show-x-leave-to {
|
|
81
|
+
opacity: 0;
|
|
82
|
+
transform: translateX(5%);
|
|
83
|
+
}
|
|
84
|
+
|
|
29
85
|
.interatividade-btn {
|
|
30
86
|
width: 100%;
|
|
31
87
|
display: flex;
|
|
@@ -48,4 +104,38 @@ export default {
|
|
|
48
104
|
margin: 0;
|
|
49
105
|
padding: 0;
|
|
50
106
|
}
|
|
107
|
+
|
|
108
|
+
.interatividade-lista {
|
|
109
|
+
width: 100%;
|
|
110
|
+
min-width: 200px;
|
|
111
|
+
border-radius: 15px;
|
|
112
|
+
background-color: #FFF;
|
|
113
|
+
color: #333;
|
|
114
|
+
margin: 10px 0;
|
|
115
|
+
}
|
|
116
|
+
.interatividade-lista-conteudo {
|
|
117
|
+
padding: 10px;
|
|
118
|
+
border-bottom: 1px solid #D7D7D7;
|
|
119
|
+
}
|
|
120
|
+
.interatividade-lista-titulo {
|
|
121
|
+
font-weight: bold;
|
|
122
|
+
font-size: 1.2em;
|
|
123
|
+
margin-bottom: 10px;
|
|
124
|
+
}
|
|
125
|
+
.interatividade-lista-rodape {
|
|
126
|
+
color: #818181;
|
|
127
|
+
margin-top: 5px;
|
|
128
|
+
}
|
|
129
|
+
.interatividade-lista-link {
|
|
130
|
+
width: 100%;
|
|
131
|
+
text-align: center;
|
|
132
|
+
padding: 10px;
|
|
133
|
+
color: rgb(0, 110, 255);
|
|
134
|
+
cursor: pointer;
|
|
135
|
+
transition: color 200ms ease-in-out;
|
|
136
|
+
}
|
|
137
|
+
.interatividade-lista-link:hover {
|
|
138
|
+
color: rgb(0, 98, 143);
|
|
139
|
+
}
|
|
140
|
+
|
|
51
141
|
</style>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="interatividade-popup box-shadow" v-on-clickaway="away">
|
|
3
|
+
<div class="interatividade-popup-titulo" v-if="titulo">
|
|
4
|
+
<h1 v-text="titulo"></h1>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="interatividade-popup-conteudo" v-for="(objItem, index) in lista" :key="index">
|
|
7
|
+
<template v-if="objItem.items && objItem.items.length">
|
|
8
|
+
<div class="interatividade-popup-item" v-for="(item, indexItem) in objItem.items" :key="`${index}${indexItem}`">
|
|
9
|
+
<p v-if="item.title" v-text="item.title" class="interatividade-popup-item-titulo"></p>
|
|
10
|
+
<p v-if="item.description" v-text="item.description" class="interatividade-popup-item-desc"></p>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import { mixin as clickaway } from 'vue-clickaway'
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
mixins: [ clickaway ],
|
|
22
|
+
props: {
|
|
23
|
+
lista: {
|
|
24
|
+
type: [Array, Object],
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
titulo: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: false
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
methods: {
|
|
33
|
+
away() {
|
|
34
|
+
this.$emit("close")
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<style>
|
|
41
|
+
.box-shadow {
|
|
42
|
+
-webkit-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
|
|
43
|
+
-moz-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
|
|
44
|
+
box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.interatividade-popup {
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: -55px;
|
|
50
|
+
left: -265px;
|
|
51
|
+
width: 250px;
|
|
52
|
+
height: auto;
|
|
53
|
+
max-height: 300px;
|
|
54
|
+
overflow-y: auto;
|
|
55
|
+
overflow-x: hidden;
|
|
56
|
+
background-color: #FFF;
|
|
57
|
+
border-radius: 15px;
|
|
58
|
+
color: #333;
|
|
59
|
+
font-size: .875rem;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.interatividade-popup-titulo h1 {
|
|
63
|
+
padding: 4px 10px;
|
|
64
|
+
background-color: #333;
|
|
65
|
+
color: #FFF;
|
|
66
|
+
font-size: 1.2em;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.interatividade-popup-item {
|
|
70
|
+
padding: 10px;
|
|
71
|
+
border-bottom: 1px solid #D7D7D7;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.interatividade-popup-item-desc {
|
|
75
|
+
font-size: .9em;
|
|
76
|
+
color: #767676;
|
|
77
|
+
}
|
|
78
|
+
</style>
|