@onsvisual/svelte-components 1.1.41 → 1.1.43

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.
@@ -17,7 +17,6 @@
17
17
 
18
18
  const callback = (entries, observer) => {
19
19
  entries.forEach((entry) => {
20
- console.log(entry);
21
20
  let intersecting = entry.isIntersecting;
22
21
  if (!entered && intersecting) {
23
22
  observer.unobserve(entry.target);
@@ -14,16 +14,19 @@
14
14
  * @type {number|null}
15
15
  */
16
16
  export let width = null;
17
+ /**
18
+ * Set z-index of tooltip, to ensure it appears in front of other elements
19
+ * @type {number}
20
+ */
21
+ export let zIndex = 1;
17
22
 
18
23
  let isHovered = false;
19
24
 
20
25
  function mouseOver() {
21
26
  isHovered = true;
22
- console.log("hovered");
23
27
  }
24
28
  function mouseLeave() {
25
29
  isHovered = false;
26
- console.log("unhovered");
27
30
  }
28
31
  </script>
29
32
 
@@ -39,6 +42,7 @@
39
42
  {#if isHovered}
40
43
  <div
41
44
  class="tooltip tooltip-{position}"
45
+ style:z-index={zIndex}
42
46
  style:width={width != null ? `${width}px` : null}
43
47
  style:white-space={width == null ? "nowrap" : "wrap"}
44
48
  >
@@ -5,6 +5,7 @@ export default class Tooltip extends SvelteComponentTyped<{
5
5
  width?: number | null | undefined;
6
6
  text?: string | undefined;
7
7
  position?: "top" | "bottom" | "left" | "right" | "middle" | undefined;
8
+ zIndex?: number | undefined;
8
9
  }, {
9
10
  [evt: string]: CustomEvent<any>;
10
11
  }, {
@@ -20,6 +21,7 @@ declare const __propDef: {
20
21
  width?: number | null | undefined;
21
22
  text?: string | undefined;
22
23
  position?: "top" | "bottom" | "left" | "right" | "middle" | undefined;
24
+ zIndex?: number | undefined;
23
25
  };
24
26
  events: {
25
27
  [evt: string]: CustomEvent<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onsvisual/svelte-components",
3
- "version": "1.1.41",
3
+ "version": "1.1.43",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "npm run build:package && npm run build:docs",