@tagplus/components 2.0.4 → 2.0.5

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/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "email": "bruno@tagplus.com.br"
9
9
  }
10
10
  ],
11
- "version": "2.0.4",
11
+ "version": "2.0.5",
12
12
  "main": "./dist/tp.common.js",
13
13
  "directories": {
14
14
  "lib": "src/lib"
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <el-row
3
+ v-if="!title"
3
4
  :id="`${_id}`"
4
5
  type="flex"
5
6
  align="middle"
@@ -25,6 +26,34 @@
25
26
  />
26
27
  </el-col>
27
28
  </el-row>
29
+ <el-row
30
+ v-else
31
+ :id="`${_id}`"
32
+ type="flex"
33
+ align="middle"
34
+ justify="space-between"
35
+ :class="tptipclasses">
36
+ <el-col
37
+ :span="17"
38
+ >
39
+ <el-row align="middle" type="flex" style="min-width:25px; margin:15px; padding: auto">
40
+ <em class="far fa-lightbulb-on" />
41
+ <b class="tp-title">{{ title }}</b>
42
+ </el-row>
43
+ </el-col>
44
+ <el-col :span="3" class="flexContent justify-content-end">
45
+ <em class="fa fa-ellipsis-h tp-close-button" @click="closed = !closed" />
46
+ </el-col>
47
+
48
+ <el-col :span="24">
49
+ <div
50
+ :id="`${_id}-text`"
51
+ :class="'tp-text ' + (closed ? 'tp-vanish' : '' )"
52
+ style="margin:15px; margin-left:0px"
53
+ v-html="text"
54
+ />
55
+ </el-col>
56
+ </el-row>
28
57
  </template>
29
58
 
30
59
  <script>
@@ -43,12 +72,23 @@ export default {
43
72
  default: ''
44
73
  },
45
74
 
75
+ title: {
76
+ type: String,
77
+ default: ''
78
+ },
79
+
46
80
  type: {
47
81
  type: String,
48
82
  default: 'default'
49
83
  }
50
84
  },
51
85
 
86
+ data () {
87
+ return {
88
+ closed: false
89
+ }
90
+ },
91
+
52
92
  computed: {
53
93
  _id () {
54
94
  return this.id || this.$options.name
@@ -136,4 +176,26 @@ export default {
136
176
  color: #08a19e;
137
177
  }
138
178
  }
179
+
180
+ .tp-close-button {
181
+ padding: 10px;
182
+ cursor: pointer;
183
+ }
184
+
185
+ .tp-title {
186
+ font-size: 16px;
187
+ padding-left: 16px;
188
+ }
189
+
190
+ .tp-text {
191
+ height: auto;
192
+ transition: 0.4s opacity ease-out;
193
+ }
194
+
195
+ .tp-vanish {
196
+ position: absolute;
197
+ height:0;
198
+ opacity:0;
199
+ transition: 0s opacity linear;
200
+ }
139
201
  </style>