@xsolla/xui-multi-select 0.72.0 → 0.73.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 +36 -14
- package/native/index.js.map +1 -1
- package/native/index.mjs +36 -14
- package/native/index.mjs.map +1 -1
- package/package.json +5 -5
- package/web/index.js +36 -14
- package/web/index.js.map +1 -1
- package/web/index.mjs +36 -14
- package/web/index.mjs.map +1 -1
package/native/index.mjs
CHANGED
|
@@ -1950,9 +1950,27 @@ var Tag = ({
|
|
|
1950
1950
|
alignItems: "center",
|
|
1951
1951
|
justifyContent: "center",
|
|
1952
1952
|
gap: sizeStyles.gap,
|
|
1953
|
+
style: {
|
|
1954
|
+
overflow: "hidden",
|
|
1955
|
+
textOverflow: "ellipsis",
|
|
1956
|
+
whiteSpace: "nowrap"
|
|
1957
|
+
},
|
|
1953
1958
|
children: [
|
|
1954
1959
|
icon && /* @__PURE__ */ jsx811(Icon4, { size: sizeStyles.iconSize, color: text, children: icon }),
|
|
1955
|
-
/* @__PURE__ */ jsx811(
|
|
1960
|
+
/* @__PURE__ */ jsx811(
|
|
1961
|
+
Text2,
|
|
1962
|
+
{
|
|
1963
|
+
color: text,
|
|
1964
|
+
fontSize: sizeStyles.fontSize,
|
|
1965
|
+
fontWeight: "500",
|
|
1966
|
+
whiteSpace: "nowrap",
|
|
1967
|
+
style: {
|
|
1968
|
+
overflow: "hidden",
|
|
1969
|
+
textOverflow: "ellipsis"
|
|
1970
|
+
},
|
|
1971
|
+
children
|
|
1972
|
+
}
|
|
1973
|
+
),
|
|
1956
1974
|
onRemove && /* @__PURE__ */ jsx811(Box3, { onPress: onRemove, children: /* @__PURE__ */ jsx811(X2, { size: sizeStyles.iconSize, color: text }) })
|
|
1957
1975
|
]
|
|
1958
1976
|
}
|
|
@@ -2003,7 +2021,7 @@ var useMultiSelectControl = ({
|
|
|
2003
2021
|
}),
|
|
2004
2022
|
[stateList, variant, size, removeTagsButtons]
|
|
2005
2023
|
);
|
|
2006
|
-
const isWidthsDependenciesChanged =
|
|
2024
|
+
const isWidthsDependenciesChanged = () => {
|
|
2007
2025
|
const prev = savedWidthsRef.current?.dependencies;
|
|
2008
2026
|
if (!prev) return true;
|
|
2009
2027
|
if (prev.variant !== widthsDependencies.variant) return true;
|
|
@@ -2018,7 +2036,7 @@ var useMultiSelectControl = ({
|
|
|
2018
2036
|
i++;
|
|
2019
2037
|
}
|
|
2020
2038
|
return false;
|
|
2021
|
-
}
|
|
2039
|
+
};
|
|
2022
2040
|
const setPlaceholder = () => {
|
|
2023
2041
|
setSelectedContent(
|
|
2024
2042
|
/* @__PURE__ */ jsx386(
|
|
@@ -2080,10 +2098,7 @@ var useMultiSelectControl = ({
|
|
|
2080
2098
|
if (!disabled) removeValue(item.value, e);
|
|
2081
2099
|
} : void 0,
|
|
2082
2100
|
style: {
|
|
2083
|
-
|
|
2084
|
-
textOverflow: "ellipsis",
|
|
2085
|
-
whiteSpace: "nowrap",
|
|
2086
|
-
minWidth: isReducable ? void 0 : "fit-content",
|
|
2101
|
+
minWidth: isReducable ? 0 : "fit-content",
|
|
2087
2102
|
opacity: disabled ? 0.5 : 1,
|
|
2088
2103
|
cursor: disabled || isCount ? "not-allowed" : "pointer"
|
|
2089
2104
|
},
|
|
@@ -2167,7 +2182,7 @@ var useMultiSelectControl = ({
|
|
|
2167
2182
|
setItemsRender();
|
|
2168
2183
|
return;
|
|
2169
2184
|
}
|
|
2170
|
-
const needsMeasurement = !savedWidthsRef.current || isWidthsDependenciesChanged;
|
|
2185
|
+
const needsMeasurement = !savedWidthsRef.current || isWidthsDependenciesChanged();
|
|
2171
2186
|
if (needsMeasurement) {
|
|
2172
2187
|
if (itemsWidth === 0) return;
|
|
2173
2188
|
displayStateRef.current = 1 /* PreRender */;
|
|
@@ -2186,7 +2201,7 @@ var useMultiSelectControl = ({
|
|
|
2186
2201
|
size,
|
|
2187
2202
|
removeTagsButtons,
|
|
2188
2203
|
itemsWidth,
|
|
2189
|
-
|
|
2204
|
+
widthsDependencies,
|
|
2190
2205
|
stateList
|
|
2191
2206
|
]);
|
|
2192
2207
|
useEffect(() => {
|
|
@@ -2337,11 +2352,17 @@ var MultiSelectControl = forwardRef7(
|
|
|
2337
2352
|
removeAllValues();
|
|
2338
2353
|
},
|
|
2339
2354
|
style: { cursor: "pointer" },
|
|
2340
|
-
children: /* @__PURE__ */ jsx387(
|
|
2355
|
+
children: /* @__PURE__ */ jsx387(Remove, { size: 18, color: iconColor, variant: "line" })
|
|
2356
|
+
}
|
|
2357
|
+
),
|
|
2358
|
+
isError && /* @__PURE__ */ jsx387(
|
|
2359
|
+
ExclamationMarkCr,
|
|
2360
|
+
{
|
|
2361
|
+
size: 18,
|
|
2362
|
+
color: theme.colors.content.alert.primary
|
|
2341
2363
|
}
|
|
2342
2364
|
),
|
|
2343
|
-
|
|
2344
|
-
/* @__PURE__ */ jsx387(Icon, { size: 18, color: iconColor, children: iconRight ? iconRight : isOpen ? /* @__PURE__ */ jsx387(ChevronUp, { size: 18, variant: "line" }) : /* @__PURE__ */ jsx387(ChevronDown, { size: 18 }) })
|
|
2365
|
+
iconRight ? iconRight : isOpen ? /* @__PURE__ */ jsx387(ChevronUp, { size: 18, color: iconColor, variant: "line" }) : /* @__PURE__ */ jsx387(ChevronDown, { size: 18, color: iconColor })
|
|
2345
2366
|
] })
|
|
2346
2367
|
]
|
|
2347
2368
|
}
|
|
@@ -2506,7 +2527,7 @@ var MultiSelect = forwardRef8(
|
|
|
2506
2527
|
const newValues = checked ? [...values, value2] : values.filter((v) => v !== value2);
|
|
2507
2528
|
onChoose(newValues.map(String));
|
|
2508
2529
|
};
|
|
2509
|
-
return /* @__PURE__ */ jsxs4(Box, { flexDirection: "column", gap:
|
|
2530
|
+
return /* @__PURE__ */ jsxs4(Box, { flexDirection: "column", gap: sizeStyles.fieldGap, children: [
|
|
2510
2531
|
label && /* @__PURE__ */ jsx388(
|
|
2511
2532
|
Text,
|
|
2512
2533
|
{
|
|
@@ -2558,7 +2579,8 @@ var MultiSelect = forwardRef8(
|
|
|
2558
2579
|
left: 0,
|
|
2559
2580
|
right: 0,
|
|
2560
2581
|
bottom: 0,
|
|
2561
|
-
zIndex: 999
|
|
2582
|
+
zIndex: 999,
|
|
2583
|
+
cursor: "default"
|
|
2562
2584
|
},
|
|
2563
2585
|
onPress: onClose
|
|
2564
2586
|
}
|