@xsolla/xui-context-menu 0.91.0 → 0.92.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-context-menu",
3
- "version": "0.91.0",
3
+ "version": "0.92.0",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
@@ -13,13 +13,13 @@
13
13
  "test:coverage": "vitest run --coverage"
14
14
  },
15
15
  "dependencies": {
16
- "@xsolla/xui-checkbox": "0.91.0",
17
- "@xsolla/xui-core": "0.91.0",
18
- "@xsolla/xui-divider": "0.91.0",
19
- "@xsolla/xui-icons": "0.91.0",
20
- "@xsolla/xui-primitives-core": "0.91.0",
21
- "@xsolla/xui-radio": "0.91.0",
22
- "@xsolla/xui-spinner": "0.91.0"
16
+ "@xsolla/xui-checkbox": "0.92.0",
17
+ "@xsolla/xui-core": "0.92.0",
18
+ "@xsolla/xui-divider": "0.92.0",
19
+ "@xsolla/xui-icons": "0.92.0",
20
+ "@xsolla/xui-primitives-core": "0.92.0",
21
+ "@xsolla/xui-radio": "0.92.0",
22
+ "@xsolla/xui-spinner": "0.92.0"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": ">=16.8.0",
package/web/index.js CHANGED
@@ -1418,6 +1418,7 @@ var import_jsx_runtime388 = require("react/jsx-runtime");
1418
1418
  var import_jsx_runtime389 = require("react/jsx-runtime");
1419
1419
  var import_jsx_runtime390 = require("react/jsx-runtime");
1420
1420
  var import_jsx_runtime391 = require("react/jsx-runtime");
1421
+ var import_jsx_runtime392 = require("react/jsx-runtime");
1421
1422
  var StyledIcon2 = import_styled_components5.default.div`
1422
1423
  display: inline-flex;
1423
1424
  align-items: center;
@@ -1435,15 +1436,15 @@ var BaseIcon = ({
1435
1436
  variant = "line",
1436
1437
  size = 24,
1437
1438
  color = "currentColor",
1438
- solidContent: solidContent381,
1439
- lineContent: lineContent381,
1439
+ solidContent: solidContent382,
1440
+ lineContent: lineContent382,
1440
1441
  className,
1441
1442
  style,
1442
1443
  "data-testid": testId,
1443
1444
  "aria-label": ariaLabel,
1444
1445
  "aria-hidden": ariaHidden
1445
1446
  }) => {
1446
- const svgContent = variant === "line" ? lineContent381 : solidContent381;
1447
+ const svgContent = variant === "line" ? lineContent382 : solidContent382;
1447
1448
  const sizeValue = typeof size === "number" ? `${size}px` : size;
1448
1449
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1449
1450
  StyledIcon2,
@@ -1460,13 +1461,13 @@ var BaseIcon = ({
1460
1461
  }
1461
1462
  );
1462
1463
  };
1463
- var solidContent367 = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><g id="icon_search--line"><path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M10 2C14.4183 2 18 5.58172 18 10C18 11.8484 17.3711 13.5488 16.3184 14.9033L21.957 20.543L20.543 21.957L14.9033 16.3174C13.5487 17.3703 11.8486 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2ZM10 4C6.68629 4 4 6.68629 4 10C4 13.3137 6.68629 16 10 16C13.3137 16 16 13.3137 16 10C16 6.68629 13.3137 4 10 4Z" style="fill: currentColor"/></g></svg>`;
1464
- var lineContent367 = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><g id="icon_search--line"><path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M10 2C14.4183 2 18 5.58172 18 10C18 11.8484 17.3711 13.5488 16.3184 14.9033L21.957 20.543L20.543 21.957L14.9033 16.3174C13.5487 17.3703 11.8486 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2ZM10 4C6.68629 4 4 6.68629 4 10C4 13.3137 6.68629 16 10 16C13.3137 16 16 13.3137 16 10C16 6.68629 13.3137 4 10 4Z" style="fill: currentColor"/></g></svg>`;
1465
- var Search = (props) => /* @__PURE__ */ (0, import_jsx_runtime378.jsx)(BaseIcon, { ...props, solidContent: solidContent367, lineContent: lineContent367 });
1464
+ var solidContent368 = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><g id="icon_search--line"><path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M10 2C14.4183 2 18 5.58172 18 10C18 11.8484 17.3711 13.5488 16.3184 14.9033L21.957 20.543L20.543 21.957L14.9033 16.3174C13.5487 17.3703 11.8486 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2ZM10 4C6.68629 4 4 6.68629 4 10C4 13.3137 6.68629 16 10 16C13.3137 16 16 13.3137 16 10C16 6.68629 13.3137 4 10 4Z" style="fill: currentColor"/></g></svg>`;
1465
+ var lineContent368 = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><g id="icon_search--line"><path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M10 2C14.4183 2 18 5.58172 18 10C18 11.8484 17.3711 13.5488 16.3184 14.9033L21.957 20.543L20.543 21.957L14.9033 16.3174C13.5487 17.3703 11.8486 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2ZM10 4C6.68629 4 4 6.68629 4 10C4 13.3137 6.68629 16 10 16C13.3137 16 16 13.3137 16 10C16 6.68629 13.3137 4 10 4Z" style="fill: currentColor"/></g></svg>`;
1466
+ var Search = (props) => /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(BaseIcon, { ...props, solidContent: solidContent368, lineContent: lineContent368 });
1466
1467
 
1467
1468
  // src/ContextMenuSearch.tsx
1468
1469
  var import_xui_divider = require("@xsolla/xui-divider");
1469
- var import_jsx_runtime392 = require("react/jsx-runtime");
1470
+ var import_jsx_runtime393 = require("react/jsx-runtime");
1470
1471
  var ContextMenuSearch = (0, import_react9.forwardRef)(
1471
1472
  ({
1472
1473
  value,
@@ -1505,7 +1506,7 @@ var ContextMenuSearch = (0, import_react9.forwardRef)(
1505
1506
  context?.closeMenu();
1506
1507
  }
1507
1508
  };
1508
- return /* @__PURE__ */ (0, import_jsx_runtime392.jsxs)(
1509
+ return /* @__PURE__ */ (0, import_jsx_runtime393.jsxs)(
1509
1510
  Box,
1510
1511
  {
1511
1512
  flexDirection: "column",
@@ -1514,16 +1515,16 @@ var ContextMenuSearch = (0, import_react9.forwardRef)(
1514
1515
  paddingVertical: sizeStyles.searchPaddingVertical,
1515
1516
  "data-testid": testId,
1516
1517
  children: [
1517
- /* @__PURE__ */ (0, import_jsx_runtime392.jsxs)(Box, { flexDirection: "row", alignItems: "center", gap: 8, children: [
1518
- /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
1518
+ /* @__PURE__ */ (0, import_jsx_runtime393.jsxs)(Box, { flexDirection: "row", alignItems: "center", gap: 8, children: [
1519
+ /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
1519
1520
  Icon,
1520
1521
  {
1521
1522
  size: sizeStyles.searchIconSize,
1522
1523
  color: inputColors.placeholder,
1523
- children: /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(Search, {})
1524
+ children: /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(Search, {})
1524
1525
  }
1525
1526
  ),
1526
- /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(Box, { flex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
1527
+ /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(Box, { flex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
1527
1528
  InputPrimitive,
1528
1529
  {
1529
1530
  ref: inputRef,
@@ -1542,7 +1543,7 @@ var ContextMenuSearch = (0, import_react9.forwardRef)(
1542
1543
  }
1543
1544
  ) })
1544
1545
  ] }),
1545
- /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(import_xui_divider.Divider, {})
1546
+ /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(import_xui_divider.Divider, {})
1546
1547
  ]
1547
1548
  }
1548
1549
  );
@@ -1551,7 +1552,7 @@ var ContextMenuSearch = (0, import_react9.forwardRef)(
1551
1552
  ContextMenuSearch.displayName = "ContextMenuSearch";
1552
1553
 
1553
1554
  // src/ContextMenu.tsx
1554
- var import_jsx_runtime393 = require("react/jsx-runtime");
1555
+ var import_jsx_runtime394 = require("react/jsx-runtime");
1555
1556
  var ContextMenuRoot = (0, import_react10.forwardRef)(
1556
1557
  ({
1557
1558
  children,
@@ -1730,7 +1731,7 @@ var ContextMenuRoot = (0, import_react10.forwardRef)(
1730
1731
  "data-testid": `context-menu-item-${item.id || index}`
1731
1732
  };
1732
1733
  if (item.variant === "checkbox") {
1733
- return /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
1734
+ return /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
1734
1735
  ContextMenuCheckboxItem,
1735
1736
  {
1736
1737
  ...commonProps,
@@ -1743,7 +1744,7 @@ var ContextMenuRoot = (0, import_react10.forwardRef)(
1743
1744
  );
1744
1745
  }
1745
1746
  if (item.variant === "radio") {
1746
- return /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
1747
+ return /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
1747
1748
  ContextMenuRadioItem,
1748
1749
  {
1749
1750
  ...commonProps,
@@ -1754,7 +1755,7 @@ var ContextMenuRoot = (0, import_react10.forwardRef)(
1754
1755
  itemKey
1755
1756
  );
1756
1757
  }
1757
- return /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
1758
+ return /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
1758
1759
  ContextMenuItem,
1759
1760
  {
1760
1761
  ...commonProps,
@@ -1772,9 +1773,9 @@ var ContextMenuRoot = (0, import_react10.forwardRef)(
1772
1773
  });
1773
1774
  };
1774
1775
  const renderGroups = (groupsData) => {
1775
- return groupsData.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime393.jsxs)(import_react10.default.Fragment, { children: [
1776
- groupIndex > 0 && /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(ContextMenuSeparator, {}),
1777
- /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
1776
+ return groupsData.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime394.jsxs)(import_react10.default.Fragment, { children: [
1777
+ groupIndex > 0 && /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(ContextMenuSeparator, {}),
1778
+ /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
1778
1779
  ContextMenuGroup,
1779
1780
  {
1780
1781
  label: group.label,
@@ -1788,14 +1789,14 @@ var ContextMenuRoot = (0, import_react10.forwardRef)(
1788
1789
  const renderContent = () => {
1789
1790
  if (isLoading) {
1790
1791
  const brandColor = theme.colors.control.brand.primary.bg;
1791
- return /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
1792
+ return /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
1792
1793
  Box,
1793
1794
  {
1794
1795
  padding: 16,
1795
1796
  alignItems: "center",
1796
1797
  justifyContent: "center",
1797
1798
  minHeight: 60,
1798
- children: /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(import_xui_spinner.Spinner, { size: "md", color: brandColor })
1799
+ children: /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(import_xui_spinner.Spinner, { size: "md", color: brandColor })
1799
1800
  }
1800
1801
  );
1801
1802
  }
@@ -1810,7 +1811,7 @@ var ContextMenuRoot = (0, import_react10.forwardRef)(
1810
1811
  }
1811
1812
  return null;
1812
1813
  };
1813
- return /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(ContextMenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime393.jsxs)(
1814
+ return /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(ContextMenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime394.jsxs)(
1814
1815
  "div",
1815
1816
  {
1816
1817
  ref: containerRef,
@@ -1821,7 +1822,7 @@ var ContextMenuRoot = (0, import_react10.forwardRef)(
1821
1822
  },
1822
1823
  "data-testid": testId,
1823
1824
  children: [
1824
- trigger && /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
1825
+ trigger && /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
1825
1826
  "div",
1826
1827
  {
1827
1828
  onClick: toggleMenu,
@@ -1830,7 +1831,7 @@ var ContextMenuRoot = (0, import_react10.forwardRef)(
1830
1831
  children: trigger
1831
1832
  }
1832
1833
  ),
1833
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
1834
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
1834
1835
  Box,
1835
1836
  {
1836
1837
  ref: (node) => {