@wistia/ui 0.8.25 → 0.8.26-beta.0dc49b0d.eceffc5

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.8.25
3
+ * @license @wistia/ui v0.8.26-beta.0dc49b0d.eceffc5
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -8500,6 +8500,11 @@ Checkbox.displayName = "Checkbox";
8500
8500
 
8501
8501
  // src/components/ClickRegion/ClickRegion.tsx
8502
8502
  var import_react30 = require("react");
8503
+ var isClickableElement = (element) => {
8504
+ if (!element) return false;
8505
+ const el = element;
8506
+ return el.closest("button") !== null || el.closest("a") !== null || el.closest("input") !== null || el.closest("select") !== null || el.closest("textarea") !== null || el.closest("label") !== null || el.closest("[data-wui-faux-input]") !== null;
8507
+ };
8503
8508
  var ClickRegion = ({ children, targetRef }) => {
8504
8509
  (0, import_react30.useEffect)(() => {
8505
8510
  if (targetRef.current && targetRef.current.tagName === "A") {
@@ -8512,7 +8517,10 @@ var ClickRegion = ({ children, targetRef }) => {
8512
8517
  const handleClick = (0, import_react30.useCallback)(
8513
8518
  (event) => {
8514
8519
  const node = targetRef.current;
8515
- if (event.target instanceof HTMLAnchorElement && !event.target.hasAttribute("data-click-region-target-link") || event.target instanceof HTMLButtonElement && !event.target.hasAttribute("data-click-region-target-button")) {
8520
+ if (event.target === node) {
8521
+ return;
8522
+ }
8523
+ if (isClickableElement(event.target) && event.target !== node) {
8516
8524
  event.stopPropagation();
8517
8525
  return;
8518
8526
  }
@@ -10485,6 +10493,7 @@ var Menu = ({
10485
10493
  ...props,
10486
10494
  $compact: compact,
10487
10495
  align,
10496
+ collisionPadding: 8,
10488
10497
  sideOffset: 6,
10489
10498
  onFocusOutside: (event) => {
10490
10499
  event.preventDefault();
@@ -10765,11 +10774,8 @@ MenuItem.displayName = "MenuItem";
10765
10774
  // src/components/Menu/MenuRadioGroup.tsx
10766
10775
  var import_react_dropdown_menu5 = require("@radix-ui/react-dropdown-menu");
10767
10776
  var import_jsx_runtime238 = require("react/jsx-runtime");
10768
- var MenuRadioGroup = ({ children, label, ...props }) => {
10769
- return /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children: [
10770
- /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(MenuLabel, { children: label }),
10771
- children
10772
- ] });
10777
+ var MenuRadioGroup = ({ children, ...props }) => {
10778
+ return /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children });
10773
10779
  };
10774
10780
  MenuRadioGroup.displayName = "MenuRadioGroup";
10775
10781