@avakhula/ui 0.0.25 → 0.0.26

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avakhula/ui",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.umd.cjs",
6
6
  "source": "src/index.js",
package/src/App.vue CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  <ib-checkbox @input="test1" class="hello" />
24
24
 
25
- <ib-button style="margin-bottom: 20px;" v-tooltip="'test'" >HOVER ME</ib-button>
25
+ <ib-button style="margin-bottom: 1020px;" v-tooltip="'test'" >HOVER ME</ib-button>
26
26
  <ib-button style="margin-bottom: 20px;" v-tooltip="'second test'" >HOVER ME</ib-button>
27
27
 
28
28
  </template>
@@ -28,14 +28,15 @@ export const TooltipDirective = {
28
28
  const { top, left, width } = el.getBoundingClientRect();
29
29
  const { width: tooltipWidth, height: tooltipHeight } =
30
30
  tooltipContainer.firstChild.getBoundingClientRect();
31
+ const scrollTop = document.documentElement.scrollTop;
31
32
 
32
33
  const tooltipStyles = `
33
- left: ${left + width / 2 - tooltipWidth / 2}px!important;
34
- top: ${top - tooltipHeight - 5}px!important;
35
- bottom: auto!important;
36
- right: auto!important;
37
- transform: none!important;
38
- `;
34
+ left: ${left + width / 2 - tooltipWidth / 2}px!important;
35
+ top: ${top - tooltipHeight + scrollTop - 5}px!important;
36
+ bottom: auto!important;
37
+ right: auto!important;
38
+ transform: none!important;
39
+ `;
39
40
 
40
41
  tooltipContainer.firstChild.setAttribute("style", tooltipStyles);
41
42
  }
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";