@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.mjs CHANGED
@@ -596,7 +596,7 @@ var OptionCell = ({
596
596
  if (hasSubmenu) scheduleClose();
597
597
  };
598
598
  const labelColor = disabled ? theme.colors.control.input.textDisable : destructive ? theme.colors.content.alert.primary : theme.colors.content.primary;
599
- const bg = inHoverState ? theme.colors.control.input.bgHover : "transparent";
599
+ const bg = checked ? theme.colors.overlay.brand : inHoverState ? theme.colors.overlay.mono : "transparent";
600
600
  const role = !hasSubmenu && checked !== void 0 ? leadingControl === "radio" ? "menuitemradio" : "menuitemcheckbox" : "menuitem";
601
601
  const ariaChecked = !hasSubmenu && checked !== void 0 ? checked ? "true" : "false" : void 0;
602
602
  const handleClick = () => {
@@ -1216,11 +1216,12 @@ var ContextMenuSubmenu = ({
1216
1216
  Box,
1217
1217
  {
1218
1218
  role: "menu",
1219
- backgroundColor: xuiTheme.colors.background.secondary,
1219
+ backgroundColor: xuiTheme.colors.layer.float,
1220
1220
  borderColor: xuiTheme.colors.border.secondary,
1221
1221
  borderWidth: 1,
1222
1222
  borderRadius,
1223
1223
  paddingVertical: sizeStyles.paddingVertical,
1224
+ paddingHorizontal: sizeStyles.paddingHorizontal,
1224
1225
  style: {
1225
1226
  boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
1226
1227
  minWidth: sizeStyles.minWidth
@@ -1582,7 +1583,7 @@ var ContextMenuRoot = forwardRef(
1582
1583
  position: "absolute",
1583
1584
  width: ARROW_SIZE,
1584
1585
  height: ARROW_SIZE,
1585
- backgroundColor: xuiTheme.colors.background.secondary,
1586
+ backgroundColor: xuiTheme.colors.layer.float,
1586
1587
  borderStyle: "solid",
1587
1588
  borderColor: xuiTheme.colors.border.secondary,
1588
1589
  // 1px outline only on the two outward-facing edges of the rotated square
@@ -1793,7 +1794,7 @@ var ContextMenuRoot = forwardRef(
1793
1794
  position: "sticky",
1794
1795
  top: 0,
1795
1796
  zIndex: 1,
1796
- backgroundColor: xuiTheme.colors.background.secondary
1797
+ backgroundColor: xuiTheme.colors.layer.float
1797
1798
  },
1798
1799
  children: /* @__PURE__ */ jsx4(
1799
1800
  ContextMenuItem,
@@ -1935,11 +1936,12 @@ var ContextMenuRoot = forwardRef(
1935
1936
  "data-testid": dataTestId ?? testID ?? "context-menu",
1936
1937
  "data-xui-context-menu-portal": trigger || position ? menuId : void 0,
1937
1938
  "data-placement": resolvedPlacement,
1938
- backgroundColor: xuiTheme.colors.background.secondary,
1939
+ backgroundColor: xuiTheme.colors.layer.float,
1939
1940
  borderColor: xuiTheme.colors.border.secondary,
1940
1941
  borderWidth: 1,
1941
1942
  borderRadius,
1942
1943
  paddingVertical: sizeStyles.paddingVertical,
1944
+ paddingHorizontal: sizeStyles.paddingHorizontal,
1943
1945
  width,
1944
1946
  minWidth: sizeStyles.minWidth,
1945
1947
  tabIndex: -1,
@@ -1954,7 +1956,9 @@ var ContextMenuRoot = forwardRef(
1954
1956
  overflow: "visible"
1955
1957
  } : {
1956
1958
  maxHeight,
1957
- overflowY: "auto"
1959
+ overflowY: "auto",
1960
+ // Panel still scrolls; the bar itself is hidden.
1961
+ scrollbarWidth: "none"
1958
1962
  },
1959
1963
  outline: "none"
1960
1964
  },
@@ -1970,7 +1974,12 @@ var ContextMenuRoot = forwardRef(
1970
1974
  /* @__PURE__ */ jsx4(
1971
1975
  "div",
1972
1976
  {
1973
- style: { maxHeight, overflowY: "auto", borderRadius },
1977
+ style: {
1978
+ maxHeight,
1979
+ overflowY: "auto",
1980
+ scrollbarWidth: "none",
1981
+ borderRadius
1982
+ },
1974
1983
  children: renderContent()
1975
1984
  }
1976
1985
  )