@wistia/ui 0.8.26 → 0.8.27

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.26
3
+ * @license @wistia/ui v0.8.27
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
  }
@@ -10766,11 +10774,8 @@ MenuItem.displayName = "MenuItem";
10766
10774
  // src/components/Menu/MenuRadioGroup.tsx
10767
10775
  var import_react_dropdown_menu5 = require("@radix-ui/react-dropdown-menu");
10768
10776
  var import_jsx_runtime238 = require("react/jsx-runtime");
10769
- var MenuRadioGroup = ({ children, label, ...props }) => {
10770
- return /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children: [
10771
- /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(MenuLabel, { children: label }),
10772
- children
10773
- ] });
10777
+ var MenuRadioGroup = ({ children, ...props }) => {
10778
+ return /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children });
10774
10779
  };
10775
10780
  MenuRadioGroup.displayName = "MenuRadioGroup";
10776
10781