@wistia/ui 0.15.13 → 0.15.14-beta.a458371c.6fd5976

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 CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.15.13
3
+ * @license @wistia/ui v0.15.14-beta.a458371c.6fd5976
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -13039,6 +13039,7 @@ var Combobox2 = ({
13039
13039
  // src/components/ContextMenu/ContextMenu.tsx
13040
13040
  var import_type_guards43 = require("@wistia/type-guards");
13041
13041
  var import_react61 = require("react");
13042
+ var import_react_dom = require("react-dom");
13042
13043
 
13043
13044
  // src/components/Menu/Menu.tsx
13044
13045
  var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
@@ -13708,7 +13709,8 @@ var ContextMenu = ({
13708
13709
  triggerRef,
13709
13710
  children,
13710
13711
  side = "bottom",
13711
- onRequestClose = () => null
13712
+ onRequestClose = () => null,
13713
+ compact = false
13712
13714
  }) => {
13713
13715
  const [isRightClicked, setIsRightClicked] = (0, import_react61.useState)(false);
13714
13716
  const [menuPosition, setMenuPosition] = (0, import_react61.useState)(position ?? { x: 0, y: 0 });
@@ -13728,9 +13730,13 @@ var ContextMenu = ({
13728
13730
  return () => null;
13729
13731
  }, [position, triggerRef]);
13730
13732
  const isOpen = (0, import_type_guards43.isNotNil)(position) || isRightClicked;
13731
- return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
13733
+ if (!isOpen) {
13734
+ return null;
13735
+ }
13736
+ const menu = /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
13732
13737
  Menu,
13733
13738
  {
13739
+ compact,
13734
13740
  isOpen,
13735
13741
  onOpenChange: (next) => {
13736
13742
  setIsRightClicked(next);
@@ -13756,7 +13762,11 @@ var ContextMenu = ({
13756
13762
  ),
13757
13763
  children
13758
13764
  }
13759
- ) : null;
13765
+ );
13766
+ if ((0, import_type_guards43.isNotNil)(triggerRef)) {
13767
+ return (0, import_react_dom.createPortal)(menu, document.body);
13768
+ }
13769
+ return menu;
13760
13770
  };
13761
13771
 
13762
13772
  // src/components/DataCards/DataCard.tsx
@@ -14927,6 +14937,7 @@ var FormField = ({
14927
14937
  label,
14928
14938
  labelPosition,
14929
14939
  name,
14940
+ required = false,
14930
14941
  value,
14931
14942
  ...props
14932
14943
  }) => {
@@ -14976,7 +14987,7 @@ var FormField = ({
14976
14987
  ...props,
14977
14988
  "data-label-position": labelPosition ?? formState.labelPosition,
14978
14989
  children: [
14979
- !isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(Label, { htmlFor: computedId, children: label }),
14990
+ !isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(Label, { htmlFor: computedId, required, children: label }),
14980
14991
  (0, import_type_guards49.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
14981
14992
  (0, import_react73.cloneElement)(children, childProps),
14982
14993
  (0, import_type_guards49.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_jsx_runtime283.Fragment, { children: [