@tagplus/components 4.7.1 → 4.7.3

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": "4.7.1",
11
+ "version": "4.7.3",
12
12
  "main": "./dist/tp.common.js",
13
13
  "directories": {
14
14
  "lib": "src/lib"
@@ -28,8 +28,8 @@
28
28
  </el-row>
29
29
  <div
30
30
  v-else
31
- :class="closed ? 'c-pointer' : ''"
32
- @click="closed = false"
31
+ class="c-pointer"
32
+ @click="onClick"
33
33
  >
34
34
  <el-row
35
35
  :id="`${_id}`"
@@ -50,13 +50,14 @@
50
50
 
51
51
  <!-- Close/Open Btn -->
52
52
  <el-col :span="3" class="flexContent justify-content-end">
53
- <em :class="closed ? 'fa fa-plus' : 'fa fa-minus'" class="tp-close-button" @click.stop="closed = !closed" />
53
+ <em :class="closed ? 'fa fa-plus' : 'fa fa-minus'" class="tp-close-button" />
54
54
  </el-col>
55
55
 
56
56
  <!-- Texto -->
57
57
  <el-col :class="'tp-text ' + (closed ? 'tp-vanish' : '' )" :span="24">
58
58
  <div
59
59
  :id="`${_id}-text`"
60
+ data-tp-tip-content
60
61
  style="margin:15px; margin-left:0px"
61
62
  v-html="text"
62
63
  />
@@ -120,6 +121,21 @@ export default {
120
121
 
121
122
  return classes
122
123
  }
124
+ },
125
+
126
+ methods: {
127
+ onClick (evt) {
128
+ // Permite clicar em link sem fechar Tip
129
+ const isLink = evt.target?.nodeName === 'A'
130
+ // Permite copiar texto sem fechar Tip
131
+ const isContent = evt.target?.closest('[data-tp-tip-content]')
132
+
133
+ if (isLink || isContent) {
134
+ return
135
+ }
136
+
137
+ this.closed = !this.closed
138
+ }
123
139
  }
124
140
  }
125
141
  </script>
@@ -141,6 +157,10 @@ export default {
141
157
  color: #586d93;
142
158
  }
143
159
 
160
+ [data-tp-tip-content] {
161
+ cursor: initial
162
+ }
163
+
144
164
  .info-text {
145
165
  font-size: 12px;
146
166
  font-stretch: normal;
@@ -182,7 +202,6 @@ export default {
182
202
 
183
203
  .tp-close-button {
184
204
  padding: 10px;
185
- cursor: pointer;
186
205
  }
187
206
 
188
207
  .tp-title {