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