bits-ui 2.15.1 → 2.15.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.
@@ -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
  };
@@ -331,7 +331,6 @@ export class TooltipContentState {
331
331
  "data-state": this.root.stateAttr,
332
332
  "data-disabled": boolToEmptyStrOrUndef(this.root.disabled),
333
333
  style: {
334
- pointerEvents: "auto",
335
334
  outline: "none",
336
335
  },
337
336
  [tooltipAttrs.content]: "",
@@ -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: "auto",
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">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bits-ui",
3
- "version": "2.15.1",
3
+ "version": "2.15.2",
4
4
  "license": "MIT",
5
5
  "repository": "github:huntabyte/bits-ui",
6
6
  "funding": "https://github.com/sponsors/huntabyte",