@wistia/ui 0.8.26 → 0.8.27-beta.a56322bd.6322bf1

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-beta.a56322bd.6322bf1
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -7790,7 +7790,6 @@ var makePolymorphic = (component) => {
7790
7790
 
7791
7791
  // src/components/Box/Box.tsx
7792
7792
  var import_jsx_runtime199 = require("react/jsx-runtime");
7793
- var isDev = process.env["NODE_ENV"] === "development" || process.env["NODE_ENV"] === "test";
7794
7793
  var getGapStyle = (gap) => {
7795
7794
  if ((0, import_type_guards20.isNotNil)(gap)) {
7796
7795
  if ((0, import_type_guards20.isRecord)(gap)) {
@@ -7885,22 +7884,6 @@ var StyledBoxComponent = import_styled_components27.default.div`
7885
7884
  justify-content: ${({ $justifyContent }) => $justifyContent};
7886
7885
  order: ${({ $order }) => (0, import_type_guards20.isNotNil)($order) ? $order : null};
7887
7886
  `;
7888
- var wrapChildren = (children) => {
7889
- if ((0, import_type_guards20.isNotNil)(children)) {
7890
- if (typeof children === "object" && isDev) {
7891
- return import_react26.Children.map(children, (child) => {
7892
- if ((0, import_type_guards20.isNil)(child)) return null;
7893
- const elementParams = {};
7894
- if (child.type?.displayName === "Box" || child.type?.displayName === "Box_UI") {
7895
- elementParams.hasBoxParent = true;
7896
- }
7897
- return (0, import_react26.cloneElement)(child, elementParams);
7898
- });
7899
- }
7900
- return children;
7901
- }
7902
- return null;
7903
- };
7904
7887
  var DEFAULT_ELEMENT = "div";
7905
7888
  var BoxComponent = (0, import_react26.forwardRef)(
7906
7889
  ({
@@ -7914,8 +7897,6 @@ var BoxComponent = (0, import_react26.forwardRef)(
7914
7897
  fillViewport = false,
7915
7898
  gap,
7916
7899
  grow,
7917
- hasBoxParent = false,
7918
- // eslint-disable-line @typescript-eslint/no-unused-vars
7919
7900
  height,
7920
7901
  inline = false,
7921
7902
  justifyContent = "flex-start",
@@ -7976,7 +7957,7 @@ var BoxComponent = (0, import_react26.forwardRef)(
7976
7957
  $wrapItems: wrapItems,
7977
7958
  as: renderAs ?? DEFAULT_ELEMENT,
7978
7959
  ...props,
7979
- children: wrapChildren(children)
7960
+ children
7980
7961
  }
7981
7962
  );
7982
7963
  }
@@ -8500,6 +8481,11 @@ Checkbox.displayName = "Checkbox";
8500
8481
 
8501
8482
  // src/components/ClickRegion/ClickRegion.tsx
8502
8483
  var import_react30 = require("react");
8484
+ var isClickableElement = (element) => {
8485
+ if (!element) return false;
8486
+ const el = element;
8487
+ 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;
8488
+ };
8503
8489
  var ClickRegion = ({ children, targetRef }) => {
8504
8490
  (0, import_react30.useEffect)(() => {
8505
8491
  if (targetRef.current && targetRef.current.tagName === "A") {
@@ -8512,7 +8498,10 @@ var ClickRegion = ({ children, targetRef }) => {
8512
8498
  const handleClick = (0, import_react30.useCallback)(
8513
8499
  (event) => {
8514
8500
  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")) {
8501
+ if (event.target === node) {
8502
+ return;
8503
+ }
8504
+ if (isClickableElement(event.target) && event.target !== node) {
8516
8505
  event.stopPropagation();
8517
8506
  return;
8518
8507
  }
@@ -10766,11 +10755,8 @@ MenuItem.displayName = "MenuItem";
10766
10755
  // src/components/Menu/MenuRadioGroup.tsx
10767
10756
  var import_react_dropdown_menu5 = require("@radix-ui/react-dropdown-menu");
10768
10757
  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
- ] });
10758
+ var MenuRadioGroup = ({ children, ...props }) => {
10759
+ return /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children });
10774
10760
  };
10775
10761
  MenuRadioGroup.displayName = "MenuRadioGroup";
10776
10762