@xsolla/xui-context-menu 0.69.0 → 0.71.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.d.mts +1 -1
- package/native/index.d.ts +1 -1
- package/native/index.js +20 -20
- package/native/index.js.map +1 -1
- package/native/index.mjs +20 -20
- package/native/index.mjs.map +1 -1
- package/package.json +8 -8
- package/web/index.d.mts +1 -1
- package/web/index.d.ts +1 -1
- package/web/index.js +20 -20
- package/web/index.js.map +1 -1
- package/web/index.mjs +20 -20
- package/web/index.mjs.map +1 -1
package/native/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React$1, { ReactNode, RefObject } from 'react';
|
|
2
2
|
|
|
3
3
|
/** Size variants for the context menu */
|
|
4
|
-
type ContextMenuSize = "
|
|
4
|
+
type ContextMenuSize = "sm" | "md" | "lg" | "xl";
|
|
5
5
|
/** Item variant types for data-driven API */
|
|
6
6
|
type ContextMenuItemVariant = "default" | "checkbox" | "radio";
|
|
7
7
|
/** Trailing element types */
|
package/native/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React$1, { ReactNode, RefObject } from 'react';
|
|
2
2
|
|
|
3
3
|
/** Size variants for the context menu */
|
|
4
|
-
type ContextMenuSize = "
|
|
4
|
+
type ContextMenuSize = "sm" | "md" | "lg" | "xl";
|
|
5
5
|
/** Item variant types for data-driven API */
|
|
6
6
|
type ContextMenuItemVariant = "default" | "checkbox" | "radio";
|
|
7
7
|
/** Trailing element types */
|
package/native/index.js
CHANGED
|
@@ -571,7 +571,7 @@ var ContextMenuItem = (0, import_react5.forwardRef)(
|
|
|
571
571
|
}, ref) => {
|
|
572
572
|
const { theme } = (0, import_xui_core.useDesignSystem)();
|
|
573
573
|
const context = useContextMenu();
|
|
574
|
-
const size = propSize || context?.size || "
|
|
574
|
+
const size = propSize || context?.size || "md";
|
|
575
575
|
const sizeStyles = theme.sizing.contextMenu(size);
|
|
576
576
|
const itemRef = (0, import_react5.useRef)(null);
|
|
577
577
|
const brandColors = theme.colors.control.brand.primary;
|
|
@@ -719,15 +719,15 @@ var import_xui_core2 = require("@xsolla/xui-core");
|
|
|
719
719
|
var import_xui_icons2 = require("@xsolla/xui-icons");
|
|
720
720
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
721
721
|
var checkboxSizeMap = {
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
722
|
+
sm: 14,
|
|
723
|
+
md: 16,
|
|
724
|
+
lg: 18,
|
|
725
725
|
xl: 20
|
|
726
726
|
};
|
|
727
727
|
var checkIconSizeMap = {
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
728
|
+
sm: 10,
|
|
729
|
+
md: 12,
|
|
730
|
+
lg: 14,
|
|
731
731
|
xl: 16
|
|
732
732
|
};
|
|
733
733
|
var CheckboxIndicator = ({
|
|
@@ -803,7 +803,7 @@ var ContextMenuCheckboxItem = (0, import_react6.forwardRef)(
|
|
|
803
803
|
}, ref) => {
|
|
804
804
|
const { theme } = (0, import_xui_core2.useDesignSystem)();
|
|
805
805
|
const context = useContextMenu();
|
|
806
|
-
const size = propSize || context?.size || "
|
|
806
|
+
const size = propSize || context?.size || "md";
|
|
807
807
|
const sizeStyles = theme.sizing.contextMenu(size);
|
|
808
808
|
const itemRef = (0, import_react6.useRef)(null);
|
|
809
809
|
const contentColors = theme.colors.content;
|
|
@@ -939,15 +939,15 @@ var import_react8 = require("react");
|
|
|
939
939
|
var import_xui_core3 = require("@xsolla/xui-core");
|
|
940
940
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
941
941
|
var radioSizeMap = {
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
942
|
+
sm: 14,
|
|
943
|
+
md: 16,
|
|
944
|
+
lg: 18,
|
|
945
945
|
xl: 20
|
|
946
946
|
};
|
|
947
947
|
var radioDotSizeMap = {
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
948
|
+
sm: 6,
|
|
949
|
+
md: 8,
|
|
950
|
+
lg: 8,
|
|
951
951
|
xl: 10
|
|
952
952
|
};
|
|
953
953
|
var RadioIndicator = ({
|
|
@@ -1012,7 +1012,7 @@ var ContextMenuRadioItem = (0, import_react8.forwardRef)(
|
|
|
1012
1012
|
const { theme } = (0, import_xui_core3.useDesignSystem)();
|
|
1013
1013
|
const context = useContextMenu();
|
|
1014
1014
|
const radioGroup = useRadioGroup();
|
|
1015
|
-
const size = propSize || context?.size || "
|
|
1015
|
+
const size = propSize || context?.size || "md";
|
|
1016
1016
|
const sizeStyles = theme.sizing.contextMenu(size);
|
|
1017
1017
|
const itemRef = (0, import_react8.useRef)(null);
|
|
1018
1018
|
const checked = radioGroup?.value === value;
|
|
@@ -1129,7 +1129,7 @@ var ContextMenuGroup = (0, import_react9.forwardRef)(
|
|
|
1129
1129
|
}, ref) => {
|
|
1130
1130
|
const { theme } = (0, import_xui_core4.useDesignSystem)();
|
|
1131
1131
|
const context = useContextMenu();
|
|
1132
|
-
const size = propSize || context?.size || "
|
|
1132
|
+
const size = propSize || context?.size || "md";
|
|
1133
1133
|
const sizeStyles = theme.sizing.contextMenu(size);
|
|
1134
1134
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Box, { ref, role: "group", "aria-label": label, "data-testid": testId, children: [
|
|
1135
1135
|
label && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
@@ -1175,7 +1175,7 @@ var ContextMenuSeparator = ({
|
|
|
1175
1175
|
}) => {
|
|
1176
1176
|
const { theme } = (0, import_xui_core5.useDesignSystem)();
|
|
1177
1177
|
const context = useContextMenu();
|
|
1178
|
-
const size = propSize || context?.size || "
|
|
1178
|
+
const size = propSize || context?.size || "md";
|
|
1179
1179
|
const sizeStyles = theme.sizing.contextMenu(size);
|
|
1180
1180
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1181
1181
|
Box,
|
|
@@ -1638,7 +1638,7 @@ var ContextMenuSearch = (0, import_react10.forwardRef)(
|
|
|
1638
1638
|
}, ref) => {
|
|
1639
1639
|
const { theme } = (0, import_xui_core6.useDesignSystem)();
|
|
1640
1640
|
const context = useContextMenu();
|
|
1641
|
-
const size = propSize || context?.size || "
|
|
1641
|
+
const size = propSize || context?.size || "md";
|
|
1642
1642
|
const sizeStyles = theme.sizing.contextMenu(size);
|
|
1643
1643
|
const inputRef = (0, import_react10.useRef)(null);
|
|
1644
1644
|
const inputColors = theme.colors.control.input;
|
|
@@ -1716,7 +1716,7 @@ var ContextMenuRoot = (0, import_react11.forwardRef)(
|
|
|
1716
1716
|
children,
|
|
1717
1717
|
list,
|
|
1718
1718
|
groups,
|
|
1719
|
-
size = "
|
|
1719
|
+
size = "md",
|
|
1720
1720
|
isOpen: propIsOpen,
|
|
1721
1721
|
onOpenChange,
|
|
1722
1722
|
position,
|
|
@@ -1951,7 +1951,7 @@ var ContextMenuRoot = (0, import_react11.forwardRef)(
|
|
|
1951
1951
|
alignItems: "center",
|
|
1952
1952
|
justifyContent: "center",
|
|
1953
1953
|
minHeight: 60,
|
|
1954
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(import_xui_spinner.Spinner, { size: "
|
|
1954
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(import_xui_spinner.Spinner, { size: "md", color: brandColor })
|
|
1955
1955
|
}
|
|
1956
1956
|
);
|
|
1957
1957
|
}
|