@xsolla/xui-context-menu 0.90.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/native/index.js +26 -25
- package/native/index.js.map +1 -1
- package/native/index.mjs +23 -22
- package/native/index.mjs.map +1 -1
- package/package.json +8 -8
- package/web/index.js +26 -25
- package/web/index.js.map +1 -1
- package/web/index.mjs +23 -22
- package/web/index.mjs.map +1 -1
package/web/index.mjs
CHANGED
|
@@ -1377,6 +1377,7 @@ import { jsx as jsx378 } from "react/jsx-runtime";
|
|
|
1377
1377
|
import { jsx as jsx379 } from "react/jsx-runtime";
|
|
1378
1378
|
import { jsx as jsx380 } from "react/jsx-runtime";
|
|
1379
1379
|
import { jsx as jsx381 } from "react/jsx-runtime";
|
|
1380
|
+
import { jsx as jsx382 } from "react/jsx-runtime";
|
|
1380
1381
|
var StyledIcon2 = styled5.div`
|
|
1381
1382
|
display: inline-flex;
|
|
1382
1383
|
align-items: center;
|
|
@@ -1394,15 +1395,15 @@ var BaseIcon = ({
|
|
|
1394
1395
|
variant = "line",
|
|
1395
1396
|
size = 24,
|
|
1396
1397
|
color = "currentColor",
|
|
1397
|
-
solidContent:
|
|
1398
|
-
lineContent:
|
|
1398
|
+
solidContent: solidContent382,
|
|
1399
|
+
lineContent: lineContent382,
|
|
1399
1400
|
className,
|
|
1400
1401
|
style,
|
|
1401
1402
|
"data-testid": testId,
|
|
1402
1403
|
"aria-label": ariaLabel,
|
|
1403
1404
|
"aria-hidden": ariaHidden
|
|
1404
1405
|
}) => {
|
|
1405
|
-
const svgContent = variant === "line" ?
|
|
1406
|
+
const svgContent = variant === "line" ? lineContent382 : solidContent382;
|
|
1406
1407
|
const sizeValue = typeof size === "number" ? `${size}px` : size;
|
|
1407
1408
|
return /* @__PURE__ */ jsx11(
|
|
1408
1409
|
StyledIcon2,
|
|
@@ -1419,13 +1420,13 @@ var BaseIcon = ({
|
|
|
1419
1420
|
}
|
|
1420
1421
|
);
|
|
1421
1422
|
};
|
|
1422
|
-
var
|
|
1423
|
-
var
|
|
1424
|
-
var Search = (props) => /* @__PURE__ */
|
|
1423
|
+
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>`;
|
|
1424
|
+
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>`;
|
|
1425
|
+
var Search = (props) => /* @__PURE__ */ jsx369(BaseIcon, { ...props, solidContent: solidContent368, lineContent: lineContent368 });
|
|
1425
1426
|
|
|
1426
1427
|
// src/ContextMenuSearch.tsx
|
|
1427
1428
|
import { Divider } from "@xsolla/xui-divider";
|
|
1428
|
-
import { jsx as
|
|
1429
|
+
import { jsx as jsx383, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1429
1430
|
var ContextMenuSearch = forwardRef7(
|
|
1430
1431
|
({
|
|
1431
1432
|
value,
|
|
@@ -1474,15 +1475,15 @@ var ContextMenuSearch = forwardRef7(
|
|
|
1474
1475
|
"data-testid": testId,
|
|
1475
1476
|
children: [
|
|
1476
1477
|
/* @__PURE__ */ jsxs5(Box, { flexDirection: "row", alignItems: "center", gap: 8, children: [
|
|
1477
|
-
/* @__PURE__ */
|
|
1478
|
+
/* @__PURE__ */ jsx383(
|
|
1478
1479
|
Icon,
|
|
1479
1480
|
{
|
|
1480
1481
|
size: sizeStyles.searchIconSize,
|
|
1481
1482
|
color: inputColors.placeholder,
|
|
1482
|
-
children: /* @__PURE__ */
|
|
1483
|
+
children: /* @__PURE__ */ jsx383(Search, {})
|
|
1483
1484
|
}
|
|
1484
1485
|
),
|
|
1485
|
-
/* @__PURE__ */
|
|
1486
|
+
/* @__PURE__ */ jsx383(Box, { flex: 1, children: /* @__PURE__ */ jsx383(
|
|
1486
1487
|
InputPrimitive,
|
|
1487
1488
|
{
|
|
1488
1489
|
ref: inputRef,
|
|
@@ -1501,7 +1502,7 @@ var ContextMenuSearch = forwardRef7(
|
|
|
1501
1502
|
}
|
|
1502
1503
|
) })
|
|
1503
1504
|
] }),
|
|
1504
|
-
/* @__PURE__ */
|
|
1505
|
+
/* @__PURE__ */ jsx383(Divider, {})
|
|
1505
1506
|
]
|
|
1506
1507
|
}
|
|
1507
1508
|
);
|
|
@@ -1510,7 +1511,7 @@ var ContextMenuSearch = forwardRef7(
|
|
|
1510
1511
|
ContextMenuSearch.displayName = "ContextMenuSearch";
|
|
1511
1512
|
|
|
1512
1513
|
// src/ContextMenu.tsx
|
|
1513
|
-
import { jsx as
|
|
1514
|
+
import { jsx as jsx384, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1514
1515
|
var ContextMenuRoot = forwardRef8(
|
|
1515
1516
|
({
|
|
1516
1517
|
children,
|
|
@@ -1689,7 +1690,7 @@ var ContextMenuRoot = forwardRef8(
|
|
|
1689
1690
|
"data-testid": `context-menu-item-${item.id || index}`
|
|
1690
1691
|
};
|
|
1691
1692
|
if (item.variant === "checkbox") {
|
|
1692
|
-
return /* @__PURE__ */
|
|
1693
|
+
return /* @__PURE__ */ jsx384(
|
|
1693
1694
|
ContextMenuCheckboxItem,
|
|
1694
1695
|
{
|
|
1695
1696
|
...commonProps,
|
|
@@ -1702,7 +1703,7 @@ var ContextMenuRoot = forwardRef8(
|
|
|
1702
1703
|
);
|
|
1703
1704
|
}
|
|
1704
1705
|
if (item.variant === "radio") {
|
|
1705
|
-
return /* @__PURE__ */
|
|
1706
|
+
return /* @__PURE__ */ jsx384(
|
|
1706
1707
|
ContextMenuRadioItem,
|
|
1707
1708
|
{
|
|
1708
1709
|
...commonProps,
|
|
@@ -1713,7 +1714,7 @@ var ContextMenuRoot = forwardRef8(
|
|
|
1713
1714
|
itemKey
|
|
1714
1715
|
);
|
|
1715
1716
|
}
|
|
1716
|
-
return /* @__PURE__ */
|
|
1717
|
+
return /* @__PURE__ */ jsx384(
|
|
1717
1718
|
ContextMenuItem,
|
|
1718
1719
|
{
|
|
1719
1720
|
...commonProps,
|
|
@@ -1732,8 +1733,8 @@ var ContextMenuRoot = forwardRef8(
|
|
|
1732
1733
|
};
|
|
1733
1734
|
const renderGroups = (groupsData) => {
|
|
1734
1735
|
return groupsData.map((group, groupIndex) => /* @__PURE__ */ jsxs6(React7.Fragment, { children: [
|
|
1735
|
-
groupIndex > 0 && /* @__PURE__ */
|
|
1736
|
-
/* @__PURE__ */
|
|
1736
|
+
groupIndex > 0 && /* @__PURE__ */ jsx384(ContextMenuSeparator, {}),
|
|
1737
|
+
/* @__PURE__ */ jsx384(
|
|
1737
1738
|
ContextMenuGroup,
|
|
1738
1739
|
{
|
|
1739
1740
|
label: group.label,
|
|
@@ -1747,14 +1748,14 @@ var ContextMenuRoot = forwardRef8(
|
|
|
1747
1748
|
const renderContent = () => {
|
|
1748
1749
|
if (isLoading) {
|
|
1749
1750
|
const brandColor = theme.colors.control.brand.primary.bg;
|
|
1750
|
-
return /* @__PURE__ */
|
|
1751
|
+
return /* @__PURE__ */ jsx384(
|
|
1751
1752
|
Box,
|
|
1752
1753
|
{
|
|
1753
1754
|
padding: 16,
|
|
1754
1755
|
alignItems: "center",
|
|
1755
1756
|
justifyContent: "center",
|
|
1756
1757
|
minHeight: 60,
|
|
1757
|
-
children: /* @__PURE__ */
|
|
1758
|
+
children: /* @__PURE__ */ jsx384(Spinner, { size: "md", color: brandColor })
|
|
1758
1759
|
}
|
|
1759
1760
|
);
|
|
1760
1761
|
}
|
|
@@ -1769,7 +1770,7 @@ var ContextMenuRoot = forwardRef8(
|
|
|
1769
1770
|
}
|
|
1770
1771
|
return null;
|
|
1771
1772
|
};
|
|
1772
|
-
return /* @__PURE__ */
|
|
1773
|
+
return /* @__PURE__ */ jsx384(ContextMenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs6(
|
|
1773
1774
|
"div",
|
|
1774
1775
|
{
|
|
1775
1776
|
ref: containerRef,
|
|
@@ -1780,7 +1781,7 @@ var ContextMenuRoot = forwardRef8(
|
|
|
1780
1781
|
},
|
|
1781
1782
|
"data-testid": testId,
|
|
1782
1783
|
children: [
|
|
1783
|
-
trigger && /* @__PURE__ */
|
|
1784
|
+
trigger && /* @__PURE__ */ jsx384(
|
|
1784
1785
|
"div",
|
|
1785
1786
|
{
|
|
1786
1787
|
onClick: toggleMenu,
|
|
@@ -1789,7 +1790,7 @@ var ContextMenuRoot = forwardRef8(
|
|
|
1789
1790
|
children: trigger
|
|
1790
1791
|
}
|
|
1791
1792
|
),
|
|
1792
|
-
isOpen && /* @__PURE__ */
|
|
1793
|
+
isOpen && /* @__PURE__ */ jsx384(
|
|
1793
1794
|
Box,
|
|
1794
1795
|
{
|
|
1795
1796
|
ref: (node) => {
|