@wistia/ui 0.15.12-beta.e10a1dcd.8034c36 → 0.15.13-beta.a8953353.4dacd3e

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/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.15.12-beta.e10a1dcd.8034c36
3
+ * @license @wistia/ui v0.15.13-beta.a8953353.4dacd3e
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -12877,6 +12877,7 @@ var Combobox2 = ({
12877
12877
  // src/components/ContextMenu/ContextMenu.tsx
12878
12878
  import { isNil as isNil16, isNotNil as isNotNil24 } from "@wistia/type-guards";
12879
12879
  import { useEffect as useEffect16, useState as useState17 } from "react";
12880
+ import { createPortal } from "react-dom";
12880
12881
 
12881
12882
  // src/components/Menu/Menu.tsx
12882
12883
  import {
@@ -13578,7 +13579,10 @@ var ContextMenu = ({
13578
13579
  return () => null;
13579
13580
  }, [position, triggerRef]);
13580
13581
  const isOpen = isNotNil24(position) || isRightClicked;
13581
- return isOpen ? /* @__PURE__ */ jsx267(
13582
+ if (!isOpen) {
13583
+ return null;
13584
+ }
13585
+ const menu = /* @__PURE__ */ jsx267(
13582
13586
  Menu,
13583
13587
  {
13584
13588
  isOpen,
@@ -13606,7 +13610,11 @@ var ContextMenu = ({
13606
13610
  ),
13607
13611
  children
13608
13612
  }
13609
- ) : null;
13613
+ );
13614
+ if (isNotNil24(triggerRef)) {
13615
+ return createPortal(menu, document.body);
13616
+ }
13617
+ return menu;
13610
13618
  };
13611
13619
 
13612
13620
  // src/components/DataCards/DataCard.tsx