@casinogate/ui 1.9.1 → 1.9.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.
@@ -34,7 +34,6 @@
34
34
  </script>
35
35
 
36
36
  <PopoverPrimitive.Content
37
- data-slot="popover-content"
38
37
  class={cn(popoverContentVariants({ shadow, variant, w, rounded }), className)}
39
38
  {side}
40
39
  {sideOffset}
@@ -7,8 +7,6 @@
7
7
  <script lang="ts" generics="T extends AnimationFn = AnimationFn">
8
8
  import { cubicInOut } from 'svelte/easing';
9
9
  import { fly } from 'svelte/transition';
10
- import Content from './components/popover.content.svelte';
11
- import Root from './components/popover.root.svelte';
12
10
  import * as Primitive from './exports-primitive.js';
13
11
 
14
12
  let {
@@ -22,6 +20,7 @@
22
20
  animationFn,
23
21
  animationParams,
24
22
  forceMount = false,
23
+ disabledPortal = false,
25
24
  ...restProps
26
25
  }: PopoverProps<T> = $props();
27
26
 
@@ -47,7 +46,7 @@
47
46
  );
48
47
  </script>
49
48
 
50
- <Root bind:open {onOpenChange} {onOpenChangeComplete}>
49
+ <Primitive.Root bind:open {onOpenChange} {onOpenChangeComplete}>
51
50
  {#if trigger !== undefined}
52
51
  {#if typeof trigger === 'string'}
53
52
  <Primitive.Trigger>{trigger}</Primitive.Trigger>
@@ -60,21 +59,23 @@
60
59
  {/if}
61
60
  {/if}
62
61
 
63
- {#if forceMount}
64
- <Content bind:ref forceMount {side} {...restProps}>
65
- {#snippet child({ wrapperProps, props, open })}
66
- {#if open}
67
- <div {...wrapperProps}>
68
- <div {...props} transition:currentAnimationFn={currentAnimationParams}>
69
- {@render children?.()}
62
+ <Primitive.Portal disabled={disabledPortal}>
63
+ {#if forceMount}
64
+ <Primitive.Content bind:ref forceMount {side} {...restProps}>
65
+ {#snippet child({ wrapperProps, props, open })}
66
+ {#if open}
67
+ <div {...wrapperProps}>
68
+ <div {...props} transition:currentAnimationFn={currentAnimationParams}>
69
+ {@render children?.()}
70
+ </div>
70
71
  </div>
71
- </div>
72
- {/if}
73
- {/snippet}
74
- </Content>
75
- {:else}
76
- <Content bind:ref {...restProps}>
77
- {@render children?.()}
78
- </Content>
79
- {/if}
80
- </Root>
72
+ {/if}
73
+ {/snippet}
74
+ </Primitive.Content>
75
+ {:else}
76
+ <Primitive.Content bind:ref {...restProps}>
77
+ {@render children?.()}
78
+ </Primitive.Content>
79
+ {/if}
80
+ </Primitive.Portal>
81
+ </Primitive.Root>
@@ -25,4 +25,5 @@ export type PopoverProps<TAnimationFn extends AnimationFn = AnimationFn> = Witho
25
25
  children?: Snippet;
26
26
  animationFn?: TAnimationFn;
27
27
  animationParams?: Parameters<TAnimationFn>[1];
28
+ disabledPortal?: boolean;
28
29
  };
@@ -60,6 +60,8 @@
60
60
 
61
61
  placeholder: placeholderProp,
62
62
 
63
+ disabledPortal = false,
64
+
63
65
  ...restProps
64
66
  }: SelectProps = $props();
65
67
 
@@ -139,7 +141,7 @@
139
141
  </Trigger>
140
142
  {/if}
141
143
 
142
- <Portal>
144
+ <Portal disabled={disabledPortal}>
143
145
  <Content bind:ref={contentRef} class={cn(contentClass)} {...contentProps}>
144
146
  <Viewport>
145
147
  {#if hasResults}
@@ -82,6 +82,7 @@ export type SelectProps = SelectRootProps & {
82
82
  contentProps?: Omit<SelectContentProps, 'class' | 'children' | 'child' | 'ref'>;
83
83
  contentRef?: HTMLDivElement | null;
84
84
  contentClass?: string;
85
+ disabledPortal?: boolean;
85
86
  };
86
87
  export type SelectAsyncCallbackParams = {
87
88
  page: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@casinogate/ui",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "svelte": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "type": "module",