@avakhula/ui 0.0.25 → 0.0.27
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 +127 -123
- package/dist/index.umd.cjs +9 -9
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +5 -1
- package/src/components/TreeSelect/Select.vue +8 -0
- package/src/directives/tooltip/tooltip.js +8 -8
- package/src/index.js +1 -1
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
:options="options"
|
|
16
16
|
:is-required="true"
|
|
17
17
|
:is-multiple="false"
|
|
18
|
+
@close="onClose"
|
|
18
19
|
/>
|
|
19
20
|
|
|
20
21
|
<button @click="changeValue">Change value</button>
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
|
|
23
24
|
<ib-checkbox @input="test1" class="hello" />
|
|
24
25
|
|
|
25
|
-
<ib-button style="margin-bottom:
|
|
26
|
+
<ib-button style="margin-bottom: 1020px;" v-tooltip="'test'" >HOVER ME</ib-button>
|
|
26
27
|
<ib-button style="margin-bottom: 20px;" v-tooltip="'second test'" >HOVER ME</ib-button>
|
|
27
28
|
|
|
28
29
|
</template>
|
|
@@ -119,6 +120,9 @@ export default {
|
|
|
119
120
|
console.log("test");
|
|
120
121
|
this.test = testData[0].id;
|
|
121
122
|
},
|
|
123
|
+
onClose(a) {
|
|
124
|
+
console.log("onClose", a)
|
|
125
|
+
}
|
|
122
126
|
},
|
|
123
127
|
};
|
|
124
128
|
</script>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
:disabled="isLoading"
|
|
5
5
|
:is-resizable="isResizable"
|
|
6
6
|
:vertical="vertical"
|
|
7
|
+
@close="onClose"
|
|
7
8
|
ref="dropdown"
|
|
8
9
|
>
|
|
9
10
|
<template v-if="hasTrigger" v-slot:trigger>
|
|
@@ -831,6 +832,13 @@ export default {
|
|
|
831
832
|
});
|
|
832
833
|
this.filter(this.filterString, options);
|
|
833
834
|
},
|
|
835
|
+
onClose() {
|
|
836
|
+
if (this.isMultiple) {
|
|
837
|
+
this.$emit("close", Object.keys(this.selected));
|
|
838
|
+
} else {
|
|
839
|
+
this.$emit("close", Object.keys(this.selected)[0]);
|
|
840
|
+
}
|
|
841
|
+
},
|
|
834
842
|
},
|
|
835
843
|
computed: {
|
|
836
844
|
hasTrigger() {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
// import { createApp, h } from "vue";
|
|
2
|
-
import IbTooltip from "../../components/Tooltip/Tooltip.vue";
|
|
3
1
|
import { createApp } from "vue";
|
|
2
|
+
import IbTooltip from "../../components/Tooltip/Tooltip.vue";
|
|
4
3
|
|
|
5
4
|
export const TooltipDirective = {
|
|
6
5
|
mounted(el, binding) {
|
|
@@ -28,14 +27,15 @@ export const TooltipDirective = {
|
|
|
28
27
|
const { top, left, width } = el.getBoundingClientRect();
|
|
29
28
|
const { width: tooltipWidth, height: tooltipHeight } =
|
|
30
29
|
tooltipContainer.firstChild.getBoundingClientRect();
|
|
30
|
+
const scrollTop = document.documentElement.scrollTop;
|
|
31
31
|
|
|
32
32
|
const tooltipStyles = `
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
left: ${left + width / 2 - tooltipWidth / 2}px!important;
|
|
34
|
+
top: ${top - tooltipHeight + scrollTop - 5}px!important;
|
|
35
|
+
bottom: auto!important;
|
|
36
|
+
right: auto!important;
|
|
37
|
+
transform: none!important;
|
|
38
|
+
`;
|
|
39
39
|
|
|
40
40
|
tooltipContainer.firstChild.setAttribute("style", tooltipStyles);
|
|
41
41
|
}
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as IbIcon } from "./components/Icon.vue";
|
|
2
|
-
export { default as IbAlert } from "./components/Alert/Alert.vue";
|
|
3
2
|
export { default as IbAccordion } from "./components/Accordion/Accordion.vue";
|
|
3
|
+
export { default as IbAlert } from "./components/Alert/Alert.vue";
|
|
4
4
|
export { default as IbBadge } from "./components/Badge/Badge.vue";
|
|
5
5
|
export { default as IbButton } from "./components/Button/Button.vue";
|
|
6
6
|
export { default as IbButtonGroup } from "./components/ButtonGroup/ButtonGroup.vue";
|