@invopop/popui 0.1.80 → 0.1.81

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.
@@ -7,8 +7,10 @@
7
7
  sideOffset = 0,
8
8
  side = 'top',
9
9
  children,
10
+ showArrow = false,
10
11
  arrowClasses
11
12
  }: TooltipPrimitive.ContentProps & {
13
+ showArrow?: boolean
12
14
  arrowClasses?: string
13
15
  } = $props()
14
16
  </script>
@@ -25,20 +27,22 @@
25
27
  )}
26
28
  >
27
29
  {@render children?.()}
28
- <TooltipPrimitive.Arrow>
29
- {#snippet child({ props })}
30
- <div
31
- class={cn(
32
- 'bg-background-default-negative z-[1002] size-2.5 rotate-45 rounded-[2px]',
33
- 'data-[side=top]:translate-x-1/2 data-[side=top]:translate-y-[calc(-50%_+_2px)]',
34
- 'data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:-translate-y-[calc(-50%_+_1px)]',
35
- 'data-[side=right]:translate-x-[calc(50%_+_2px)] data-[side=right]:translate-y-1/2',
36
- 'data-[side=left]:-translate-y-[calc(50%_-_3px)]',
37
- arrowClasses
38
- )}
39
- {...props}
40
- ></div>
41
- {/snippet}
42
- </TooltipPrimitive.Arrow>
30
+ {#if showArrow}
31
+ <TooltipPrimitive.Arrow>
32
+ {#snippet child({ props })}
33
+ <div
34
+ class={cn(
35
+ 'bg-background-default-negative z-[1002] size-2.5 rotate-45 rounded-[2px]',
36
+ 'data-[side=top]:translate-x-1/2 data-[side=top]:translate-y-[calc(-50%_+_2px)]',
37
+ 'data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:-translate-y-[calc(-50%_+_1px)]',
38
+ 'data-[side=right]:translate-x-[calc(50%_+_2px)] data-[side=right]:translate-y-1/2',
39
+ 'data-[side=left]:-translate-y-[calc(50%_-_3px)]',
40
+ arrowClasses
41
+ )}
42
+ {...props}
43
+ ></div>
44
+ {/snippet}
45
+ </TooltipPrimitive.Arrow>
46
+ {/if}
43
47
  </TooltipPrimitive.Content>
44
48
  </TooltipPrimitive.Portal>
@@ -1,5 +1,6 @@
1
1
  import { Tooltip as TooltipPrimitive } from 'bits-ui';
2
2
  type $$ComponentProps = TooltipPrimitive.ContentProps & {
3
+ showArrow?: boolean;
3
4
  arrowClasses?: string;
4
5
  };
5
6
  declare const TooltipContent: import("svelte").Component<$$ComponentProps, {}, "ref">;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@invopop/popui",
3
3
  "license": "MIT",
4
- "version": "0.1.80",
4
+ "version": "0.1.81",
5
5
  "repository": {
6
6
  "url": "https://github.com/invopop/popui"
7
7
  },