@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.
- package/dist/components/popover/components/popover.content.svelte +0 -1
- package/dist/components/popover/popover.svelte +21 -20
- package/dist/components/popover/types.d.ts +1 -0
- package/dist/components/select/select.svelte +3 -1
- package/dist/components/select/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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
|
-
{
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
{#
|
|
67
|
-
|
|
68
|
-
<div {...
|
|
69
|
-
{
|
|
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
|
-
|
|
72
|
-
{/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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>
|
|
@@ -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;
|