@avakhula/ui 0.0.127 → 0.0.129
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/index.js +166 -167
- package/dist/index.umd.cjs +18 -18
- package/package.json +1 -1
- package/src/App.vue +12 -2
- package/src/directives/tooltip/tooltip.js +2 -6
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="test">
|
|
3
|
-
<ib-
|
|
3
|
+
<ib-form-group class="form-group">
|
|
4
|
+
<ib-label for="first_name" required>
|
|
5
|
+
test
|
|
6
|
+
</ib-label>
|
|
7
|
+
|
|
8
|
+
<ib-input id="first_name" name="first_name"
|
|
9
|
+
v-tooltip="'Cannot be edited because user info were synchronized from another LMS.'"
|
|
10
|
+
readonly />
|
|
11
|
+
</ib-form-group>
|
|
4
12
|
</div>
|
|
5
13
|
</template>
|
|
6
14
|
|
|
7
15
|
<script>
|
|
8
16
|
import IbInput from "./components/Form/Input/Input.vue";
|
|
9
|
-
import { TooltipDirective as Tooltip } from "./index";
|
|
17
|
+
import { IbFormGroup, IbLabel, TooltipDirective as Tooltip } from "./index";
|
|
10
18
|
export default {
|
|
11
19
|
directives: {
|
|
12
20
|
Tooltip
|
|
@@ -21,6 +29,8 @@ export default {
|
|
|
21
29
|
},
|
|
22
30
|
components: {
|
|
23
31
|
IbInput,
|
|
32
|
+
IbFormGroup,
|
|
33
|
+
IbLabel
|
|
24
34
|
},
|
|
25
35
|
};
|
|
26
36
|
</script>
|
|
@@ -8,7 +8,6 @@ const createTooltip = (el, binding) => {
|
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
const destroyTooltip = (event, el) => {
|
|
11
|
-
console.log(destroyTooltip)
|
|
12
11
|
const tooltipContainer = tooltip.getTooltipContainer();
|
|
13
12
|
|
|
14
13
|
const isMouseOverEl = el !== event.target && !el.contains(event.target);
|
|
@@ -16,11 +15,8 @@ const destroyTooltip = (event, el) => {
|
|
|
16
15
|
tooltipContainer !== event.target &&
|
|
17
16
|
!tooltipContainer?.contains(event.target);
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (isMouseOverEl && isMouseOverTooltip) {
|
|
18
|
+
console.log(el.contains(event.target))
|
|
19
|
+
if (isMouseOverEl && isMouseOverTooltip) {
|
|
24
20
|
tooltip.destroyTooltip();
|
|
25
21
|
}
|
|
26
22
|
};
|