@xsolla/xui-context-menu 0.133.0 → 0.134.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/web/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/ContextMenu.tsx
2
- import React8, {
2
+ import React7, {
3
3
  forwardRef as forwardRef8,
4
4
  useState,
5
5
  useRef as useRef5,
@@ -9,117 +9,10 @@ import React8, {
9
9
  } from "react";
10
10
 
11
11
  // ../primitives-web/src/Box.tsx
12
- import React2 from "react";
13
- import styled from "styled-components";
14
-
15
- // ../primitives-web/src/filterDOMProps.ts
16
12
  import React from "react";
17
- var NON_HTML_PROPS = /* @__PURE__ */ new Set([
18
- // BoxProps — layout & styling
19
- "backgroundColor",
20
- "borderColor",
21
- "borderWidth",
22
- "borderBottomWidth",
23
- "borderBottomColor",
24
- "borderTopWidth",
25
- "borderTopColor",
26
- "borderLeftWidth",
27
- "borderLeftColor",
28
- "borderRightWidth",
29
- "borderRightColor",
30
- "borderRadius",
31
- "borderStyle",
32
- "flexDirection",
33
- "flexWrap",
34
- "alignItems",
35
- "justifyContent",
36
- "alignSelf",
37
- "flex",
38
- "flexShrink",
39
- "gap",
40
- "position",
41
- "top",
42
- "bottom",
43
- "left",
44
- "right",
45
- "outline",
46
- "overflow",
47
- "overflowX",
48
- "overflowY",
49
- "zIndex",
50
- "cursor",
51
- "padding",
52
- "paddingHorizontal",
53
- "paddingVertical",
54
- "paddingTop",
55
- "paddingBottom",
56
- "paddingLeft",
57
- "paddingRight",
58
- "margin",
59
- "marginTop",
60
- "marginBottom",
61
- "marginLeft",
62
- "marginRight",
63
- "minWidth",
64
- "minHeight",
65
- "maxWidth",
66
- "maxHeight",
67
- "hoverStyle",
68
- "pressStyle",
69
- "focusStyle",
70
- "outlineColor",
71
- "outlineWidth",
72
- "outlineOffset",
73
- "outlineStyle",
74
- // BoxProps — RN-only
75
- "onPress",
76
- "onLayout",
77
- "onMoveShouldSetResponder",
78
- "onResponderGrant",
79
- "onResponderMove",
80
- "onResponderRelease",
81
- "onResponderTerminate",
82
- "testID",
83
- // Box — custom element type
84
- "elementType",
85
- // TextProps
86
- "fontSize",
87
- "fontWeight",
88
- "fontFamily",
89
- "lineHeight",
90
- "whiteSpace",
91
- "textAlign",
92
- "textDecoration",
93
- "numberOfLines",
94
- "letterSpacing",
95
- "textTransform",
96
- // SpinnerProps
97
- "strokeWidth",
98
- // DividerProps
99
- "vertical",
100
- "dashStroke"
101
- ]);
102
- function createFilteredElement(defaultTag) {
103
- const Component = React.forwardRef(
104
- ({ children, elementType, ...props }, ref) => {
105
- const Tag = elementType || defaultTag;
106
- const htmlProps = {};
107
- for (const key of Object.keys(props)) {
108
- if (!NON_HTML_PROPS.has(key)) {
109
- htmlProps[key] = props[key];
110
- }
111
- }
112
- return React.createElement(Tag, { ref, ...htmlProps }, children);
113
- }
114
- );
115
- Component.displayName = `Filtered(${defaultTag})`;
116
- return Component;
117
- }
118
-
119
- // ../primitives-web/src/Box.tsx
13
+ import styled from "styled-components";
120
14
  import { jsx } from "react/jsx-runtime";
121
- var FilteredDiv = createFilteredElement("div");
122
- var StyledBox = styled(FilteredDiv)`
15
+ var StyledBox = styled.div`
123
16
  display: flex;
124
17
  box-sizing: border-box;
125
18
  background-color: ${(props) => props.backgroundColor || "transparent"};
@@ -206,7 +99,7 @@ var StyledBox = styled(FilteredDiv)`
206
99
  ${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
207
100
  }
208
101
  `;
209
- var Box = React2.forwardRef(
102
+ var Box = React.forwardRef(
210
103
  ({
211
104
  children,
212
105
  onPress,
@@ -258,7 +151,7 @@ var Box = React2.forwardRef(
258
151
  StyledBox,
259
152
  {
260
153
  ref,
261
- elementType: as,
154
+ as,
262
155
  id,
263
156
  type: as === "button" ? type || "button" : void 0,
264
157
  disabled: as === "button" ? disabled : void 0,
@@ -289,8 +182,7 @@ Box.displayName = "Box";
289
182
  // ../primitives-web/src/Text.tsx
290
183
  import styled2 from "styled-components";
291
184
  import { jsx as jsx2 } from "react/jsx-runtime";
292
- var FilteredSpan = createFilteredElement("span");
293
- var StyledText = styled2(FilteredSpan)`
185
+ var StyledText = styled2.span`
294
186
  color: ${(props) => props.color || "inherit"};
295
187
  font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
296
188
  font-weight: ${(props) => props.fontWeight || "normal"};
@@ -323,8 +215,7 @@ var Text = ({
323
215
  // ../primitives-web/src/Icon.tsx
324
216
  import styled3 from "styled-components";
325
217
  import { jsx as jsx3 } from "react/jsx-runtime";
326
- var FilteredDiv2 = createFilteredElement("div");
327
- var StyledIcon = styled3(FilteredDiv2)`
218
+ var StyledIcon = styled3.div`
328
219
  display: flex;
329
220
  align-items: center;
330
221
  justify-content: center;
@@ -1138,7 +1029,7 @@ var ContextMenuSeparator = ({
1138
1029
  ContextMenuSeparator.displayName = "ContextMenuSeparator";
1139
1030
 
1140
1031
  // src/ContextMenuSearch.tsx
1141
- import React7, { forwardRef as forwardRef7, useRef as useRef4, useEffect as useEffect4 } from "react";
1032
+ import React6, { forwardRef as forwardRef7, useRef as useRef4, useEffect as useEffect4 } from "react";
1142
1033
  import { useResolvedTheme as useResolvedTheme6 } from "@xsolla/xui-core";
1143
1034
 
1144
1035
  // ../icons-base/dist/web/index.mjs
@@ -1597,7 +1488,7 @@ var ContextMenuSearch = forwardRef7(
1597
1488
  const sizeStyles = theme.sizing.contextMenu(size);
1598
1489
  const inputRef = useRef4(null);
1599
1490
  const inputColors = theme.colors.control.input;
1600
- React7.useImperativeHandle(
1491
+ React6.useImperativeHandle(
1601
1492
  ref,
1602
1493
  () => inputRef.current,
1603
1494
  []
@@ -1888,7 +1779,7 @@ var ContextMenuRoot = forwardRef8(
1888
1779
  });
1889
1780
  };
1890
1781
  const renderGroups = (groupsData) => {
1891
- return groupsData.map((group, groupIndex) => /* @__PURE__ */ jsxs6(React8.Fragment, { children: [
1782
+ return groupsData.map((group, groupIndex) => /* @__PURE__ */ jsxs6(React7.Fragment, { children: [
1892
1783
  groupIndex > 0 && /* @__PURE__ */ jsx389(ContextMenuSeparator, {}),
1893
1784
  /* @__PURE__ */ jsx389(
1894
1785
  ContextMenuGroup,