@xsolla/xui-context-menu 0.202.3 → 0.203.0

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/web/index.js CHANGED
@@ -618,7 +618,7 @@ var OptionCell = ({
618
618
  if (hasSubmenu) scheduleClose();
619
619
  };
620
620
  const labelColor = disabled ? theme.colors.control.input.textDisable : destructive ? theme.colors.content.alert.primary : theme.colors.content.primary;
621
- const bg = inHoverState ? theme.colors.control.input.bgHover : "transparent";
621
+ const bg = checked ? theme.colors.overlay.brand : inHoverState ? theme.colors.overlay.mono : "transparent";
622
622
  const role = !hasSubmenu && checked !== void 0 ? leadingControl === "radio" ? "menuitemradio" : "menuitemcheckbox" : "menuitem";
623
623
  const ariaChecked = !hasSubmenu && checked !== void 0 ? checked ? "true" : "false" : void 0;
624
624
  const handleClick = () => {
@@ -1228,11 +1228,12 @@ var ContextMenuSubmenu = ({
1228
1228
  Box,
1229
1229
  {
1230
1230
  role: "menu",
1231
- backgroundColor: xuiTheme.colors.background.secondary,
1231
+ backgroundColor: xuiTheme.colors.layer.float,
1232
1232
  borderColor: xuiTheme.colors.border.secondary,
1233
1233
  borderWidth: 1,
1234
1234
  borderRadius,
1235
1235
  paddingVertical: sizeStyles.paddingVertical,
1236
+ paddingHorizontal: sizeStyles.paddingHorizontal,
1236
1237
  style: {
1237
1238
  boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
1238
1239
  minWidth: sizeStyles.minWidth
@@ -1594,7 +1595,7 @@ var ContextMenuRoot = (0, import_react8.forwardRef)(
1594
1595
  position: "absolute",
1595
1596
  width: ARROW_SIZE,
1596
1597
  height: ARROW_SIZE,
1597
- backgroundColor: xuiTheme.colors.background.secondary,
1598
+ backgroundColor: xuiTheme.colors.layer.float,
1598
1599
  borderStyle: "solid",
1599
1600
  borderColor: xuiTheme.colors.border.secondary,
1600
1601
  // 1px outline only on the two outward-facing edges of the rotated square
@@ -1805,7 +1806,7 @@ var ContextMenuRoot = (0, import_react8.forwardRef)(
1805
1806
  position: "sticky",
1806
1807
  top: 0,
1807
1808
  zIndex: 1,
1808
- backgroundColor: xuiTheme.colors.background.secondary
1809
+ backgroundColor: xuiTheme.colors.layer.float
1809
1810
  },
1810
1811
  children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1811
1812
  ContextMenuItem,
@@ -1947,11 +1948,12 @@ var ContextMenuRoot = (0, import_react8.forwardRef)(
1947
1948
  "data-testid": dataTestId ?? testID ?? "context-menu",
1948
1949
  "data-xui-context-menu-portal": trigger || position ? menuId : void 0,
1949
1950
  "data-placement": resolvedPlacement,
1950
- backgroundColor: xuiTheme.colors.background.secondary,
1951
+ backgroundColor: xuiTheme.colors.layer.float,
1951
1952
  borderColor: xuiTheme.colors.border.secondary,
1952
1953
  borderWidth: 1,
1953
1954
  borderRadius,
1954
1955
  paddingVertical: sizeStyles.paddingVertical,
1956
+ paddingHorizontal: sizeStyles.paddingHorizontal,
1955
1957
  width,
1956
1958
  minWidth: sizeStyles.minWidth,
1957
1959
  tabIndex: -1,
@@ -1966,7 +1968,9 @@ var ContextMenuRoot = (0, import_react8.forwardRef)(
1966
1968
  overflow: "visible"
1967
1969
  } : {
1968
1970
  maxHeight,
1969
- overflowY: "auto"
1971
+ overflowY: "auto",
1972
+ // Panel still scrolls; the bar itself is hidden.
1973
+ scrollbarWidth: "none"
1970
1974
  },
1971
1975
  outline: "none"
1972
1976
  },
@@ -1982,7 +1986,12 @@ var ContextMenuRoot = (0, import_react8.forwardRef)(
1982
1986
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1983
1987
  "div",
1984
1988
  {
1985
- style: { maxHeight, overflowY: "auto", borderRadius },
1989
+ style: {
1990
+ maxHeight,
1991
+ overflowY: "auto",
1992
+ scrollbarWidth: "none",
1993
+ borderRadius
1994
+ },
1986
1995
  children: renderContent()
1987
1996
  }
1988
1997
  )