@xsolla/xui-multi-select 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/README.md +47 -44
- package/native/index.d.mts +2 -0
- package/native/index.d.ts +2 -0
- package/native/index.js +36 -9
- package/native/index.js.map +1 -1
- package/native/index.mjs +36 -9
- package/native/index.mjs.map +1 -1
- package/package.json +5 -5
- package/web/index.d.mts +2 -0
- package/web/index.d.ts +2 -0
- package/web/index.js +36 -9
- package/web/index.js.map +1 -1
- package/web/index.mjs +36 -9
- package/web/index.mjs.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-multi-select",
|
|
3
|
-
"version": "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",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"build:native": "PLATFORM=native tsup"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xsolla/xui-checkbox": "0.
|
|
14
|
-
"@xsolla/xui-core": "0.
|
|
15
|
-
"@xsolla/xui-dropdown": "0.
|
|
16
|
-
"@xsolla/xui-primitives-core": "0.
|
|
13
|
+
"@xsolla/xui-checkbox": "0.159.0",
|
|
14
|
+
"@xsolla/xui-core": "0.159.0",
|
|
15
|
+
"@xsolla/xui-dropdown": "0.159.0",
|
|
16
|
+
"@xsolla/xui-primitives-core": "0.159.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": ">=16.8.0",
|
package/web/index.d.mts
CHANGED
|
@@ -106,6 +106,8 @@ interface MultiSelectProps extends ThemeOverrideProps {
|
|
|
106
106
|
* no minimum. Ignored when the built-in dropdown is enabled.
|
|
107
107
|
*/
|
|
108
108
|
menuMinWidth?: number;
|
|
109
|
+
/** Test ID for testing frameworks */
|
|
110
|
+
testID?: string;
|
|
109
111
|
}
|
|
110
112
|
|
|
111
113
|
declare const MultiSelect: react.ForwardRefExoticComponent<MultiSelectProps & react.RefAttributes<HTMLDivElement>>;
|
package/web/index.d.ts
CHANGED
|
@@ -106,6 +106,8 @@ interface MultiSelectProps extends ThemeOverrideProps {
|
|
|
106
106
|
* no minimum. Ignored when the built-in dropdown is enabled.
|
|
107
107
|
*/
|
|
108
108
|
menuMinWidth?: number;
|
|
109
|
+
/** Test ID for testing frameworks */
|
|
110
|
+
testID?: string;
|
|
109
111
|
}
|
|
110
112
|
|
|
111
113
|
declare const MultiSelect: react.ForwardRefExoticComponent<MultiSelectProps & react.RefAttributes<HTMLDivElement>>;
|
package/web/index.js
CHANGED
|
@@ -307,6 +307,8 @@ var Text = ({
|
|
|
307
307
|
className,
|
|
308
308
|
id,
|
|
309
309
|
role,
|
|
310
|
+
testID,
|
|
311
|
+
"data-testid": dataTestId,
|
|
310
312
|
numberOfLines: _numberOfLines,
|
|
311
313
|
...props
|
|
312
314
|
}) => {
|
|
@@ -317,7 +319,8 @@ var Text = ({
|
|
|
317
319
|
style,
|
|
318
320
|
className,
|
|
319
321
|
id,
|
|
320
|
-
role
|
|
322
|
+
role,
|
|
323
|
+
"data-testid": dataTestId || testID
|
|
321
324
|
}
|
|
322
325
|
);
|
|
323
326
|
};
|
|
@@ -341,8 +344,13 @@ var StyledIcon = (0, import_styled_components3.default)(FilteredDiv2)`
|
|
|
341
344
|
stroke: currentColor;
|
|
342
345
|
}
|
|
343
346
|
`;
|
|
344
|
-
var Icon = ({
|
|
345
|
-
|
|
347
|
+
var Icon = ({
|
|
348
|
+
children,
|
|
349
|
+
testID,
|
|
350
|
+
"data-testid": dataTestId,
|
|
351
|
+
...props
|
|
352
|
+
}) => {
|
|
353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(StyledIcon, { "data-testid": dataTestId || testID, ...props, children });
|
|
346
354
|
};
|
|
347
355
|
|
|
348
356
|
// src/MultiSelect.tsx
|
|
@@ -1097,6 +1105,7 @@ var BaseIcon = ({
|
|
|
1097
1105
|
className,
|
|
1098
1106
|
style,
|
|
1099
1107
|
"data-testid": testId,
|
|
1108
|
+
testID,
|
|
1100
1109
|
"aria-label": ariaLabel,
|
|
1101
1110
|
"aria-hidden": ariaHidden
|
|
1102
1111
|
}) => {
|
|
@@ -1109,7 +1118,7 @@ var BaseIcon = ({
|
|
|
1109
1118
|
$color: color,
|
|
1110
1119
|
className,
|
|
1111
1120
|
style,
|
|
1112
|
-
"data-testid": testId,
|
|
1121
|
+
"data-testid": testId || testID,
|
|
1113
1122
|
role: ariaLabel ? "img" : void 0,
|
|
1114
1123
|
"aria-label": ariaLabel,
|
|
1115
1124
|
"aria-hidden": ariaHidden != null ? ariaHidden : ariaLabel ? void 0 : true,
|
|
@@ -1304,8 +1313,13 @@ var StyledIcon3 = (0, import_styled_components5.default)(FilteredDiv3)`
|
|
|
1304
1313
|
stroke: currentColor;
|
|
1305
1314
|
}
|
|
1306
1315
|
`;
|
|
1307
|
-
var Icon3 = ({
|
|
1308
|
-
|
|
1316
|
+
var Icon3 = ({
|
|
1317
|
+
children,
|
|
1318
|
+
testID,
|
|
1319
|
+
"data-testid": dataTestId,
|
|
1320
|
+
...props
|
|
1321
|
+
}) => {
|
|
1322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime725.jsx)(StyledIcon3, { "data-testid": dataTestId || testID, ...props, children });
|
|
1309
1323
|
};
|
|
1310
1324
|
var X2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime726.jsx)(Icon3, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime726.jsx)(X, { size: "100%" }) });
|
|
1311
1325
|
|
|
@@ -1562,6 +1576,8 @@ var Text2 = ({
|
|
|
1562
1576
|
className,
|
|
1563
1577
|
id,
|
|
1564
1578
|
role,
|
|
1579
|
+
testID,
|
|
1580
|
+
"data-testid": dataTestId,
|
|
1565
1581
|
numberOfLines: _numberOfLines,
|
|
1566
1582
|
...props
|
|
1567
1583
|
}) => {
|
|
@@ -1572,7 +1588,8 @@ var Text2 = ({
|
|
|
1572
1588
|
style,
|
|
1573
1589
|
className,
|
|
1574
1590
|
id,
|
|
1575
|
-
role
|
|
1591
|
+
role,
|
|
1592
|
+
"data-testid": dataTestId || testID
|
|
1576
1593
|
}
|
|
1577
1594
|
);
|
|
1578
1595
|
};
|
|
@@ -1592,8 +1609,13 @@ var StyledIcon4 = (0, import_styled_components8.default)(FilteredDiv22)`
|
|
|
1592
1609
|
stroke: currentColor;
|
|
1593
1610
|
}
|
|
1594
1611
|
`;
|
|
1595
|
-
var Icon4 = ({
|
|
1596
|
-
|
|
1612
|
+
var Icon4 = ({
|
|
1613
|
+
children,
|
|
1614
|
+
testID,
|
|
1615
|
+
"data-testid": dataTestId,
|
|
1616
|
+
...props
|
|
1617
|
+
}) => {
|
|
1618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime729.jsx)(StyledIcon4, { "data-testid": dataTestId || testID, ...props, children });
|
|
1597
1619
|
};
|
|
1598
1620
|
var Tag = ({
|
|
1599
1621
|
size = "md",
|
|
@@ -1603,6 +1625,7 @@ var Tag = ({
|
|
|
1603
1625
|
iconLeft,
|
|
1604
1626
|
iconRight,
|
|
1605
1627
|
onRemove,
|
|
1628
|
+
testID,
|
|
1606
1629
|
themeMode,
|
|
1607
1630
|
themeProductContext
|
|
1608
1631
|
}) => {
|
|
@@ -1666,6 +1689,7 @@ var Tag = ({
|
|
|
1666
1689
|
return /* @__PURE__ */ (0, import_jsx_runtime730.jsxs)(
|
|
1667
1690
|
Box2,
|
|
1668
1691
|
{
|
|
1692
|
+
testID,
|
|
1669
1693
|
backgroundColor: bg,
|
|
1670
1694
|
borderRadius: sizeStyles.radius,
|
|
1671
1695
|
height: sizeStyles.height,
|
|
@@ -2222,6 +2246,7 @@ var MultiSelect = (0, import_react11.forwardRef)(
|
|
|
2222
2246
|
onTriggerPress,
|
|
2223
2247
|
menuOpen = false,
|
|
2224
2248
|
menuMinWidth,
|
|
2249
|
+
testID,
|
|
2225
2250
|
themeMode,
|
|
2226
2251
|
themeProductContext
|
|
2227
2252
|
}, ref) => {
|
|
@@ -2279,6 +2304,7 @@ var MultiSelect = (0, import_react11.forwardRef)(
|
|
|
2279
2304
|
return /* @__PURE__ */ (0, import_jsx_runtime733.jsxs)(
|
|
2280
2305
|
Box,
|
|
2281
2306
|
{
|
|
2307
|
+
testID,
|
|
2282
2308
|
flexDirection: "column",
|
|
2283
2309
|
gap: sizeStyles.fieldGap,
|
|
2284
2310
|
style: externalFieldLayout,
|
|
@@ -2369,6 +2395,7 @@ var MultiSelect = (0, import_react11.forwardRef)(
|
|
|
2369
2395
|
return /* @__PURE__ */ (0, import_jsx_runtime733.jsx)(
|
|
2370
2396
|
Box,
|
|
2371
2397
|
{
|
|
2398
|
+
testID,
|
|
2372
2399
|
paddingHorizontal: sizeStyles.paddingHorizontal,
|
|
2373
2400
|
paddingVertical: 8,
|
|
2374
2401
|
onPress: () => {
|