@xsolla/xui-context-menu 0.158.0 → 0.159.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.158.0",
3
+ "version": "0.159.0",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
@@ -13,14 +13,14 @@
13
13
  "test:coverage": "vitest run --coverage"
14
14
  },
15
15
  "dependencies": {
16
- "@xsolla/xui-checkbox": "0.158.0",
17
- "@xsolla/xui-core": "0.158.0",
18
- "@xsolla/xui-divider": "0.158.0",
19
- "@xsolla/xui-icons": "0.158.0",
20
- "@xsolla/xui-primitives-core": "0.158.0",
21
- "@xsolla/xui-radio": "0.158.0",
22
- "@xsolla/xui-spinner": "0.158.0",
23
- "@xsolla/xui-typography": "0.158.0"
16
+ "@xsolla/xui-checkbox": "0.159.0",
17
+ "@xsolla/xui-core": "0.159.0",
18
+ "@xsolla/xui-divider": "0.159.0",
19
+ "@xsolla/xui-icons": "0.159.0",
20
+ "@xsolla/xui-primitives-core": "0.159.0",
21
+ "@xsolla/xui-radio": "0.159.0",
22
+ "@xsolla/xui-spinner": "0.159.0",
23
+ "@xsolla/xui-typography": "0.159.0"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": ">=16.8.0",
package/web/index.d.mts CHANGED
@@ -28,6 +28,8 @@ interface ContextMenuOptionItemProps {
28
28
  onSelect?: () => void;
29
29
  onCheckedChange?: (checked: boolean) => void;
30
30
  "data-testid"?: string;
31
+ /** Test ID for testing frameworks */
32
+ testID?: string;
31
33
  }
32
34
  interface ContextMenuSearchItemProps {
33
35
  type: "search";
@@ -38,6 +40,8 @@ interface ContextMenuSearchItemProps {
38
40
  autoFocus?: boolean;
39
41
  "aria-label"?: string;
40
42
  "data-testid"?: string;
43
+ /** Test ID for testing frameworks */
44
+ testID?: string;
41
45
  }
42
46
  interface ContextMenuHeadingItemProps {
43
47
  type: "heading";
@@ -45,11 +49,15 @@ interface ContextMenuHeadingItemProps {
45
49
  label: ReactNode;
46
50
  description?: ReactNode;
47
51
  "data-testid"?: string;
52
+ /** Test ID for testing frameworks */
53
+ testID?: string;
48
54
  }
49
55
  interface ContextMenuDividerItemProps {
50
56
  type: "divider";
51
57
  size?: ContextMenuSize;
52
58
  "data-testid"?: string;
59
+ /** Test ID for testing frameworks */
60
+ testID?: string;
53
61
  }
54
62
  type ContextMenuItemProps = ContextMenuOptionItemProps | ContextMenuSearchItemProps | ContextMenuHeadingItemProps | ContextMenuDividerItemProps;
55
63
  type ContextMenuPanelType = "list" | "phone" | "checkbox" | "status" | "brandLogo" | "radio" | "avatar";
@@ -78,6 +86,8 @@ interface ContextMenuProps {
78
86
  onSelect?: (item: ContextMenuOptionItemProps) => void;
79
87
  "aria-label"?: string;
80
88
  "data-testid"?: string;
89
+ /** Test ID for testing frameworks */
90
+ testID?: string;
81
91
  }
82
92
  interface ContextMenuCellMeta {
83
93
  type: ContextMenuItemType;
package/web/index.d.ts CHANGED
@@ -28,6 +28,8 @@ interface ContextMenuOptionItemProps {
28
28
  onSelect?: () => void;
29
29
  onCheckedChange?: (checked: boolean) => void;
30
30
  "data-testid"?: string;
31
+ /** Test ID for testing frameworks */
32
+ testID?: string;
31
33
  }
32
34
  interface ContextMenuSearchItemProps {
33
35
  type: "search";
@@ -38,6 +40,8 @@ interface ContextMenuSearchItemProps {
38
40
  autoFocus?: boolean;
39
41
  "aria-label"?: string;
40
42
  "data-testid"?: string;
43
+ /** Test ID for testing frameworks */
44
+ testID?: string;
41
45
  }
42
46
  interface ContextMenuHeadingItemProps {
43
47
  type: "heading";
@@ -45,11 +49,15 @@ interface ContextMenuHeadingItemProps {
45
49
  label: ReactNode;
46
50
  description?: ReactNode;
47
51
  "data-testid"?: string;
52
+ /** Test ID for testing frameworks */
53
+ testID?: string;
48
54
  }
49
55
  interface ContextMenuDividerItemProps {
50
56
  type: "divider";
51
57
  size?: ContextMenuSize;
52
58
  "data-testid"?: string;
59
+ /** Test ID for testing frameworks */
60
+ testID?: string;
53
61
  }
54
62
  type ContextMenuItemProps = ContextMenuOptionItemProps | ContextMenuSearchItemProps | ContextMenuHeadingItemProps | ContextMenuDividerItemProps;
55
63
  type ContextMenuPanelType = "list" | "phone" | "checkbox" | "status" | "brandLogo" | "radio" | "avatar";
@@ -78,6 +86,8 @@ interface ContextMenuProps {
78
86
  onSelect?: (item: ContextMenuOptionItemProps) => void;
79
87
  "aria-label"?: string;
80
88
  "data-testid"?: string;
89
+ /** Test ID for testing frameworks */
90
+ testID?: string;
81
91
  }
82
92
  interface ContextMenuCellMeta {
83
93
  type: ContextMenuItemType;
package/web/index.js CHANGED
@@ -28654,6 +28654,7 @@ var OptionCell = ({
28654
28654
  hasSubmenu,
28655
28655
  submenu,
28656
28656
  onSelect,
28657
+ testID,
28657
28658
  themeMode,
28658
28659
  themeProductContext,
28659
28660
  "data-testid": testId
@@ -28793,7 +28794,7 @@ var OptionCell = ({
28793
28794
  "aria-haspopup": hasSubmenu ? "menu" : void 0,
28794
28795
  "aria-expanded": hasSubmenu ? submenuOpen ? "true" : "false" : void 0,
28795
28796
  tabIndex: 0,
28796
- "data-testid": testId,
28797
+ "data-testid": testId || testID,
28797
28798
  "data-state": inHoverState ? "hover" : void 0,
28798
28799
  "data-destructive": destructive ? "true" : void 0,
28799
28800
  "aria-keyshortcuts": keyboardShortcut,
@@ -28969,6 +28970,7 @@ var HeadingCell = ({
28969
28970
  size: propSize,
28970
28971
  label,
28971
28972
  description,
28973
+ testID,
28972
28974
  themeMode,
28973
28975
  themeProductContext,
28974
28976
  "data-testid": testId
@@ -29028,6 +29030,7 @@ var SearchCell = ({
29028
29030
  autoFocus,
29029
29031
  "aria-label": ariaLabel = "Search options",
29030
29032
  "data-testid": testId,
29033
+ testID,
29031
29034
  themeMode,
29032
29035
  themeProductContext
29033
29036
  }) => {
@@ -29321,6 +29324,7 @@ var ContextMenu = (props) => {
29321
29324
  onSelect,
29322
29325
  "aria-label": ariaLabel,
29323
29326
  "data-testid": testId,
29327
+ testID,
29324
29328
  themeMode,
29325
29329
  themeProductContext
29326
29330
  } = props;
@@ -29640,7 +29644,7 @@ var ContextMenu = (props) => {
29640
29644
  ref: panelRef,
29641
29645
  role: "menu",
29642
29646
  "aria-label": ariaLabel,
29643
- "data-testid": testId,
29647
+ "data-testid": testId || testID,
29644
29648
  "data-placement": usePortal ? resolvedPlacement : void 0,
29645
29649
  tabIndex: -1,
29646
29650
  onKeyDown: handleKeyDown,