@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/web/index.mjs CHANGED
@@ -1918,9 +1918,27 @@ var Tag = ({
1918
1918
  alignItems: "center",
1919
1919
  justifyContent: "center",
1920
1920
  gap: sizeStyles.gap,
1921
+ style: {
1922
+ overflow: "hidden",
1923
+ textOverflow: "ellipsis",
1924
+ whiteSpace: "nowrap"
1925
+ },
1921
1926
  children: [
1922
1927
  icon && /* @__PURE__ */ jsx811(Icon4, { size: sizeStyles.iconSize, color: text, children: icon }),
1923
- /* @__PURE__ */ jsx811(Text2, { color: text, fontSize: sizeStyles.fontSize, fontWeight: "500", children }),
1928
+ /* @__PURE__ */ jsx811(
1929
+ Text2,
1930
+ {
1931
+ color: text,
1932
+ fontSize: sizeStyles.fontSize,
1933
+ fontWeight: "500",
1934
+ whiteSpace: "nowrap",
1935
+ style: {
1936
+ overflow: "hidden",
1937
+ textOverflow: "ellipsis"
1938
+ },
1939
+ children
1940
+ }
1941
+ ),
1924
1942
  onRemove && /* @__PURE__ */ jsx811(Box3, { onPress: onRemove, children: /* @__PURE__ */ jsx811(X2, { size: sizeStyles.iconSize, color: text }) })
1925
1943
  ]
1926
1944
  }
@@ -1971,7 +1989,7 @@ var useMultiSelectControl = ({
1971
1989
  }),
1972
1990
  [stateList, variant, size, removeTagsButtons]
1973
1991
  );
1974
- const isWidthsDependenciesChanged = useMemo(() => {
1992
+ const isWidthsDependenciesChanged = () => {
1975
1993
  const prev = savedWidthsRef.current?.dependencies;
1976
1994
  if (!prev) return true;
1977
1995
  if (prev.variant !== widthsDependencies.variant) return true;
@@ -1986,7 +2004,7 @@ var useMultiSelectControl = ({
1986
2004
  i++;
1987
2005
  }
1988
2006
  return false;
1989
- }, [widthsDependencies]);
2007
+ };
1990
2008
  const setPlaceholder = () => {
1991
2009
  setSelectedContent(
1992
2010
  /* @__PURE__ */ jsx386(
@@ -2048,10 +2066,7 @@ var useMultiSelectControl = ({
2048
2066
  if (!disabled) removeValue(item.value, e);
2049
2067
  } : void 0,
2050
2068
  style: {
2051
- overflow: "hidden",
2052
- textOverflow: "ellipsis",
2053
- whiteSpace: "nowrap",
2054
- minWidth: isReducable ? void 0 : "fit-content",
2069
+ minWidth: isReducable ? 0 : "fit-content",
2055
2070
  opacity: disabled ? 0.5 : 1,
2056
2071
  cursor: disabled || isCount ? "not-allowed" : "pointer"
2057
2072
  },
@@ -2135,7 +2150,7 @@ var useMultiSelectControl = ({
2135
2150
  setItemsRender();
2136
2151
  return;
2137
2152
  }
2138
- const needsMeasurement = !savedWidthsRef.current || isWidthsDependenciesChanged;
2153
+ const needsMeasurement = !savedWidthsRef.current || isWidthsDependenciesChanged();
2139
2154
  if (needsMeasurement) {
2140
2155
  if (itemsWidth === 0) return;
2141
2156
  displayStateRef.current = 1 /* PreRender */;
@@ -2154,7 +2169,7 @@ var useMultiSelectControl = ({
2154
2169
  size,
2155
2170
  removeTagsButtons,
2156
2171
  itemsWidth,
2157
- isWidthsDependenciesChanged,
2172
+ widthsDependencies,
2158
2173
  stateList
2159
2174
  ]);
2160
2175
  useEffect(() => {
@@ -2305,11 +2320,17 @@ var MultiSelectControl = forwardRef7(
2305
2320
  removeAllValues();
2306
2321
  },
2307
2322
  style: { cursor: "pointer" },
2308
- children: /* @__PURE__ */ jsx387(Icon, { size: 18, color: iconColor, children: /* @__PURE__ */ jsx387(Remove, { size: 18, variant: "line" }) })
2323
+ children: /* @__PURE__ */ jsx387(Remove, { size: 18, color: iconColor, variant: "line" })
2324
+ }
2325
+ ),
2326
+ isError && /* @__PURE__ */ jsx387(
2327
+ ExclamationMarkCr,
2328
+ {
2329
+ size: 18,
2330
+ color: theme.colors.content.alert.primary
2309
2331
  }
2310
2332
  ),
2311
- isError && /* @__PURE__ */ jsx387(Icon, { size: 18, color: theme.colors.content.alert.primary, children: /* @__PURE__ */ jsx387(ExclamationMarkCr, { size: 18 }) }),
2312
- /* @__PURE__ */ jsx387(Icon, { size: 18, color: iconColor, children: iconRight ? iconRight : isOpen ? /* @__PURE__ */ jsx387(ChevronUp, { size: 18, variant: "line" }) : /* @__PURE__ */ jsx387(ChevronDown, { size: 18 }) })
2333
+ iconRight ? iconRight : isOpen ? /* @__PURE__ */ jsx387(ChevronUp, { size: 18, color: iconColor, variant: "line" }) : /* @__PURE__ */ jsx387(ChevronDown, { size: 18, color: iconColor })
2313
2334
  ] })
2314
2335
  ]
2315
2336
  }
@@ -2474,7 +2495,7 @@ var MultiSelect = forwardRef8(
2474
2495
  const newValues = checked ? [...values, value2] : values.filter((v) => v !== value2);
2475
2496
  onChoose(newValues.map(String));
2476
2497
  };
2477
- return /* @__PURE__ */ jsxs4(Box, { flexDirection: "column", gap: 8, children: [
2498
+ return /* @__PURE__ */ jsxs4(Box, { flexDirection: "column", gap: sizeStyles.fieldGap, children: [
2478
2499
  label && /* @__PURE__ */ jsx388(
2479
2500
  Text,
2480
2501
  {
@@ -2526,7 +2547,8 @@ var MultiSelect = forwardRef8(
2526
2547
  left: 0,
2527
2548
  right: 0,
2528
2549
  bottom: 0,
2529
- zIndex: 999
2550
+ zIndex: 999,
2551
+ cursor: "default"
2530
2552
  },
2531
2553
  onPress: onClose
2532
2554
  }