@wistia/ui 0.15.12-beta.4ccc4307.9870827 → 0.15.12-beta.bbcd8471.64c2d83
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.cjs +12 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -5
- package/dist/index.d.ts +1 -5
- package/dist/index.mjs +12 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.15.12-beta.
|
|
3
|
+
* @license @wistia/ui v0.15.12-beta.bbcd8471.64c2d83
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -12997,6 +12997,7 @@ var Combobox2 = ({
|
|
|
12997
12997
|
// src/components/ContextMenu/ContextMenu.tsx
|
|
12998
12998
|
var import_type_guards42 = require("@wistia/type-guards");
|
|
12999
12999
|
var import_react61 = require("react");
|
|
13000
|
+
var import_react_dom = require("react-dom");
|
|
13000
13001
|
|
|
13001
13002
|
// src/components/Menu/Menu.tsx
|
|
13002
13003
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
@@ -13666,8 +13667,7 @@ var ContextMenu = ({
|
|
|
13666
13667
|
triggerRef,
|
|
13667
13668
|
children,
|
|
13668
13669
|
side = "bottom",
|
|
13669
|
-
onRequestClose = () => null
|
|
13670
|
-
compact = false
|
|
13670
|
+
onRequestClose = () => null
|
|
13671
13671
|
}) => {
|
|
13672
13672
|
const [isRightClicked, setIsRightClicked] = (0, import_react61.useState)(false);
|
|
13673
13673
|
const [menuPosition, setMenuPosition] = (0, import_react61.useState)(position ?? { x: 0, y: 0 });
|
|
@@ -13687,10 +13687,12 @@ var ContextMenu = ({
|
|
|
13687
13687
|
return () => null;
|
|
13688
13688
|
}, [position, triggerRef]);
|
|
13689
13689
|
const isOpen = (0, import_type_guards42.isNotNil)(position) || isRightClicked;
|
|
13690
|
-
|
|
13690
|
+
if (!isOpen) {
|
|
13691
|
+
return null;
|
|
13692
|
+
}
|
|
13693
|
+
const menu = /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
|
|
13691
13694
|
Menu,
|
|
13692
13695
|
{
|
|
13693
|
-
compact,
|
|
13694
13696
|
isOpen,
|
|
13695
13697
|
onOpenChange: (next) => {
|
|
13696
13698
|
setIsRightClicked(next);
|
|
@@ -13716,7 +13718,11 @@ var ContextMenu = ({
|
|
|
13716
13718
|
),
|
|
13717
13719
|
children
|
|
13718
13720
|
}
|
|
13719
|
-
)
|
|
13721
|
+
);
|
|
13722
|
+
if ((0, import_type_guards42.isNotNil)(triggerRef)) {
|
|
13723
|
+
return (0, import_react_dom.createPortal)(menu, document.body);
|
|
13724
|
+
}
|
|
13725
|
+
return menu;
|
|
13720
13726
|
};
|
|
13721
13727
|
|
|
13722
13728
|
// src/components/DataCards/DataCard.tsx
|