compote-ui 0.38.1 → 0.38.2

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.
@@ -72,7 +72,6 @@
72
72
  if (!isMultiRowSelectionEnabled) return false;
73
73
  return headerGroupIndex === headerGroupCount - 1;
74
74
  }
75
-
76
75
  </script>
77
76
 
78
77
  <thead
@@ -1,23 +1,28 @@
1
1
  <script lang="ts">
2
2
  import { Menu } from '@ark-ui/svelte/menu';
3
+ import { Portal } from '@ark-ui/svelte/portal';
4
+ import type { MenuContentBaseProps } from '@ark-ui/svelte/menu';
3
5
  import type { Snippet } from 'svelte';
4
6
  import { cn } from 'tailwind-variants';
5
7
 
6
- type Props = {
8
+ type Props = MenuContentBaseProps & {
7
9
  class?: string;
8
10
  children: Snippet;
9
11
  };
10
12
 
11
- const { class: className, children }: Props = $props();
13
+ const { class: className, children, ...restProps }: Props = $props();
12
14
  </script>
13
15
 
14
- <Menu.Positioner>
15
- <Menu.Content
16
- class={cn(
17
- 'z-50 min-w-32 overflow-hidden rounded-md border bg-surface-1 p-1 text-ink shadow-md outline-none',
18
- className
19
- )}
20
- >
21
- {@render children()}
22
- </Menu.Content>
23
- </Menu.Positioner>
16
+ <Portal>
17
+ <Menu.Positioner>
18
+ <Menu.Content
19
+ {...restProps}
20
+ class={cn(
21
+ 'z-50 min-w-32 overflow-hidden rounded-md border bg-surface-1 p-1 text-ink shadow-md outline-none',
22
+ className
23
+ )}
24
+ >
25
+ {@render children()}
26
+ </Menu.Content>
27
+ </Menu.Positioner>
28
+ </Portal>
@@ -1,5 +1,6 @@
1
+ import type { MenuContentBaseProps } from '@ark-ui/svelte/menu';
1
2
  import type { Snippet } from 'svelte';
2
- type Props = {
3
+ type Props = MenuContentBaseProps & {
3
4
  class?: string;
4
5
  children: Snippet;
5
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compote-ui",
3
- "version": "0.38.1",
3
+ "version": "0.38.2",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "dev": "vite dev --open",