@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/native/index.mjs CHANGED
@@ -577,7 +577,7 @@ var OptionCell = ({
577
577
  if (hasSubmenu) scheduleClose();
578
578
  };
579
579
  const labelColor = disabled ? theme.colors.control.input.textDisable : destructive ? theme.colors.content.alert.primary : theme.colors.content.primary;
580
- const bg = inHoverState ? theme.colors.control.input.bgHover : "transparent";
580
+ const bg = checked ? theme.colors.overlay.brand : inHoverState ? theme.colors.overlay.mono : "transparent";
581
581
  const role = !hasSubmenu && checked !== void 0 ? leadingControl === "radio" ? "menuitemradio" : "menuitemcheckbox" : "menuitem";
582
582
  const ariaChecked = !hasSubmenu && checked !== void 0 ? checked ? "true" : "false" : void 0;
583
583
  const handleClick = () => {
@@ -1197,11 +1197,12 @@ var ContextMenuSubmenu = ({
1197
1197
  Box,
1198
1198
  {
1199
1199
  role: "menu",
1200
- backgroundColor: xuiTheme.colors.background.secondary,
1200
+ backgroundColor: xuiTheme.colors.layer.float,
1201
1201
  borderColor: xuiTheme.colors.border.secondary,
1202
1202
  borderWidth: 1,
1203
1203
  borderRadius,
1204
1204
  paddingVertical: sizeStyles.paddingVertical,
1205
+ paddingHorizontal: sizeStyles.paddingHorizontal,
1205
1206
  style: {
1206
1207
  boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
1207
1208
  minWidth: sizeStyles.minWidth
@@ -1563,7 +1564,7 @@ var ContextMenuRoot = forwardRef(
1563
1564
  position: "absolute",
1564
1565
  width: ARROW_SIZE,
1565
1566
  height: ARROW_SIZE,
1566
- backgroundColor: xuiTheme.colors.background.secondary,
1567
+ backgroundColor: xuiTheme.colors.layer.float,
1567
1568
  borderStyle: "solid",
1568
1569
  borderColor: xuiTheme.colors.border.secondary,
1569
1570
  // 1px outline only on the two outward-facing edges of the rotated square
@@ -1774,7 +1775,7 @@ var ContextMenuRoot = forwardRef(
1774
1775
  position: "sticky",
1775
1776
  top: 0,
1776
1777
  zIndex: 1,
1777
- backgroundColor: xuiTheme.colors.background.secondary
1778
+ backgroundColor: xuiTheme.colors.layer.float
1778
1779
  },
1779
1780
  children: /* @__PURE__ */ jsx4(
1780
1781
  ContextMenuItem,
@@ -1916,11 +1917,12 @@ var ContextMenuRoot = forwardRef(
1916
1917
  "data-testid": dataTestId ?? testID ?? "context-menu",
1917
1918
  "data-xui-context-menu-portal": trigger || position ? menuId : void 0,
1918
1919
  "data-placement": resolvedPlacement,
1919
- backgroundColor: xuiTheme.colors.background.secondary,
1920
+ backgroundColor: xuiTheme.colors.layer.float,
1920
1921
  borderColor: xuiTheme.colors.border.secondary,
1921
1922
  borderWidth: 1,
1922
1923
  borderRadius,
1923
1924
  paddingVertical: sizeStyles.paddingVertical,
1925
+ paddingHorizontal: sizeStyles.paddingHorizontal,
1924
1926
  width,
1925
1927
  minWidth: sizeStyles.minWidth,
1926
1928
  tabIndex: -1,
@@ -1935,7 +1937,9 @@ var ContextMenuRoot = forwardRef(
1935
1937
  overflow: "visible"
1936
1938
  } : {
1937
1939
  maxHeight,
1938
- overflowY: "auto"
1940
+ overflowY: "auto",
1941
+ // Panel still scrolls; the bar itself is hidden.
1942
+ scrollbarWidth: "none"
1939
1943
  },
1940
1944
  outline: "none"
1941
1945
  },
@@ -1951,7 +1955,12 @@ var ContextMenuRoot = forwardRef(
1951
1955
  /* @__PURE__ */ jsx4(
1952
1956
  "div",
1953
1957
  {
1954
- style: { maxHeight, overflowY: "auto", borderRadius },
1958
+ style: {
1959
+ maxHeight,
1960
+ overflowY: "auto",
1961
+ scrollbarWidth: "none",
1962
+ borderRadius
1963
+ },
1955
1964
  children: renderContent()
1956
1965
  }
1957
1966
  )