bits-ui 2.15.1 → 2.15.3
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/bits/context-menu/components/context-menu-content.svelte +17 -27
- package/dist/bits/tooltip/components/tooltip-content.svelte +2 -0
- package/dist/bits/tooltip/tooltip.svelte.d.ts +0 -1
- package/dist/bits/tooltip/tooltip.svelte.js +0 -1
- package/dist/bits/utilities/popper-layer/popper-layer-inner.svelte +3 -1
- package/dist/bits/utilities/popper-layer/popper-layer-inner.svelte.d.ts +1 -0
- package/dist/bits/utilities/popper-layer/types.d.ts +5 -0
- package/package.json +1 -1
|
@@ -39,7 +39,23 @@
|
|
|
39
39
|
onCloseAutoFocus: boxWith(() => onCloseAutoFocus),
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
-
const mergedProps = $derived(
|
|
42
|
+
const mergedProps = $derived(
|
|
43
|
+
mergeProps(restProps, contentState.props, {
|
|
44
|
+
side,
|
|
45
|
+
sideOffset,
|
|
46
|
+
align,
|
|
47
|
+
onOpenAutoFocus,
|
|
48
|
+
isValidEvent,
|
|
49
|
+
trapFocus,
|
|
50
|
+
loop,
|
|
51
|
+
id,
|
|
52
|
+
ref: contentState.opts.ref,
|
|
53
|
+
preventScroll,
|
|
54
|
+
onInteractOutside: handleInteractOutside,
|
|
55
|
+
onEscapeKeydown: handleEscapeKeydown,
|
|
56
|
+
shouldRender: contentState.shouldRender,
|
|
57
|
+
})
|
|
58
|
+
);
|
|
43
59
|
|
|
44
60
|
function handleInteractOutside(e: PointerEvent) {
|
|
45
61
|
onInteractOutside(e);
|
|
@@ -76,20 +92,7 @@
|
|
|
76
92
|
<PopperLayerForceMount
|
|
77
93
|
{...mergedProps}
|
|
78
94
|
{...contentState.popperProps}
|
|
79
|
-
ref={contentState.opts.ref}
|
|
80
|
-
{side}
|
|
81
|
-
{sideOffset}
|
|
82
|
-
{align}
|
|
83
95
|
enabled={contentState.parentMenu.opts.open.current}
|
|
84
|
-
{preventScroll}
|
|
85
|
-
onInteractOutside={handleInteractOutside}
|
|
86
|
-
onEscapeKeydown={handleEscapeKeydown}
|
|
87
|
-
{onOpenAutoFocus}
|
|
88
|
-
{isValidEvent}
|
|
89
|
-
{trapFocus}
|
|
90
|
-
{loop}
|
|
91
|
-
{id}
|
|
92
|
-
shouldRender={contentState.shouldRender}
|
|
93
96
|
>
|
|
94
97
|
{#snippet popper({ props, wrapperProps })}
|
|
95
98
|
{@const finalProps = mergeProps(props, {
|
|
@@ -110,20 +113,7 @@
|
|
|
110
113
|
<PopperLayer
|
|
111
114
|
{...mergedProps}
|
|
112
115
|
{...contentState.popperProps}
|
|
113
|
-
ref={contentState.opts.ref}
|
|
114
|
-
side="right"
|
|
115
|
-
sideOffset={2}
|
|
116
|
-
align="start"
|
|
117
116
|
open={contentState.parentMenu.opts.open.current}
|
|
118
|
-
{preventScroll}
|
|
119
|
-
onInteractOutside={handleInteractOutside}
|
|
120
|
-
onEscapeKeydown={handleEscapeKeydown}
|
|
121
|
-
{onOpenAutoFocus}
|
|
122
|
-
{isValidEvent}
|
|
123
|
-
{trapFocus}
|
|
124
|
-
{loop}
|
|
125
|
-
{id}
|
|
126
|
-
shouldRender={contentState.shouldRender}
|
|
127
117
|
>
|
|
128
118
|
{#snippet popper({ props, wrapperProps })}
|
|
129
119
|
{@const finalProps = mergeProps(props, {
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
ref={contentState.opts.ref}
|
|
69
69
|
tooltip={true}
|
|
70
70
|
shouldRender={contentState.shouldRender}
|
|
71
|
+
contentPointerEvents={contentState.root.disableHoverableContent ? "none" : "auto"}
|
|
71
72
|
>
|
|
72
73
|
{#snippet popper({ props, wrapperProps })}
|
|
73
74
|
{@const mergedProps = mergeProps(props, {
|
|
@@ -97,6 +98,7 @@
|
|
|
97
98
|
ref={contentState.opts.ref}
|
|
98
99
|
tooltip={true}
|
|
99
100
|
shouldRender={contentState.shouldRender}
|
|
101
|
+
contentPointerEvents={contentState.root.disableHoverableContent ? "none" : "auto"}
|
|
100
102
|
>
|
|
101
103
|
{#snippet popper({ props, wrapperProps })}
|
|
102
104
|
{@const mergedProps = mergeProps(props, {
|
|
@@ -109,7 +109,6 @@ export declare class TooltipContentState {
|
|
|
109
109
|
readonly "data-state": "closed" | "delayed-open" | "instant-open";
|
|
110
110
|
readonly "data-disabled": "" | undefined;
|
|
111
111
|
readonly style: {
|
|
112
|
-
readonly pointerEvents: "auto";
|
|
113
112
|
readonly outline: "none";
|
|
114
113
|
};
|
|
115
114
|
};
|
|
@@ -46,9 +46,11 @@
|
|
|
46
46
|
enabled,
|
|
47
47
|
ref,
|
|
48
48
|
tooltip = false,
|
|
49
|
+
contentPointerEvents = "auto",
|
|
49
50
|
...restProps
|
|
50
51
|
}: Omit<PopperLayerImplProps, "open" | "children" | "shouldRender"> & {
|
|
51
52
|
enabled: boolean;
|
|
53
|
+
contentPointerEvents?: "auto" | "none";
|
|
52
54
|
} = $props();
|
|
53
55
|
</script>
|
|
54
56
|
|
|
@@ -118,7 +120,7 @@
|
|
|
118
120
|
focusScopeProps,
|
|
119
121
|
{
|
|
120
122
|
style: {
|
|
121
|
-
pointerEvents:
|
|
123
|
+
pointerEvents: contentPointerEvents,
|
|
122
124
|
},
|
|
123
125
|
}
|
|
124
126
|
),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PopperLayerImplProps } from "./types.js";
|
|
2
2
|
type $$ComponentProps = Omit<PopperLayerImplProps, "open" | "children" | "shouldRender"> & {
|
|
3
3
|
enabled: boolean;
|
|
4
|
+
contentPointerEvents?: "auto" | "none";
|
|
4
5
|
};
|
|
5
6
|
declare const PopperLayerInner: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
6
7
|
type PopperLayerInner = ReturnType<typeof PopperLayerInner>;
|
|
@@ -35,4 +35,9 @@ export type PopperLayerImplProps = Omit<EscapeLayerImplProps & DismissibleLayerI
|
|
|
35
35
|
* Whether the popper layer should be rendered.
|
|
36
36
|
*/
|
|
37
37
|
shouldRender: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Override for the content's pointer-events style.
|
|
40
|
+
* @default "auto"
|
|
41
|
+
*/
|
|
42
|
+
contentPointerEvents?: "auto" | "none";
|
|
38
43
|
}, "enabled">;
|