@xsolla/xui-multi-select 0.136.0 → 0.138.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 +172 -43
- package/native/index.js.map +1 -1
- package/native/index.mjs +144 -15
- package/native/index.mjs.map +1 -1
- package/package.json +5 -5
- package/web/index.js +262 -56
- package/web/index.js.map +1 -1
- package/web/index.mjs +227 -21
- package/web/index.mjs.map +1 -1
package/native/index.mjs
CHANGED
|
@@ -729,8 +729,9 @@ import {
|
|
|
729
729
|
} from "react";
|
|
730
730
|
|
|
731
731
|
// ../tag/dist/web/index.mjs
|
|
732
|
-
import
|
|
732
|
+
import React22 from "react";
|
|
733
733
|
import styled3 from "styled-components";
|
|
734
|
+
import React3 from "react";
|
|
734
735
|
import { jsx as jsx389 } from "react/jsx-runtime";
|
|
735
736
|
import styled22 from "styled-components";
|
|
736
737
|
import { jsx as jsx2101 } from "react/jsx-runtime";
|
|
@@ -739,6 +740,7 @@ import { jsx as jsx390 } from "react/jsx-runtime";
|
|
|
739
740
|
import { useResolvedTheme } from "@xsolla/xui-core";
|
|
740
741
|
|
|
741
742
|
// ../icons/dist/web/index.mjs
|
|
743
|
+
import React2 from "react";
|
|
742
744
|
import styled2 from "styled-components";
|
|
743
745
|
import { jsx as jsx388 } from "react/jsx-runtime";
|
|
744
746
|
|
|
@@ -747,8 +749,8 @@ import { forwardRef as forwardRef2, createElement as createElement2 } from "reac
|
|
|
747
749
|
|
|
748
750
|
// ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
749
751
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
750
|
-
var mergeClasses = (...classes) => classes.filter((className,
|
|
751
|
-
return Boolean(className) && className.trim() !== "" && array.indexOf(className) ===
|
|
752
|
+
var mergeClasses = (...classes) => classes.filter((className, index3, array) => {
|
|
753
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index3;
|
|
752
754
|
}).join(" ").trim();
|
|
753
755
|
|
|
754
756
|
// ../../node_modules/lucide-react/dist/esm/Icon.js
|
|
@@ -821,7 +823,68 @@ var X = createLucideIcon("X", [
|
|
|
821
823
|
|
|
822
824
|
// ../icons/dist/web/index.mjs
|
|
823
825
|
import { jsx as jsx2100 } from "react/jsx-runtime";
|
|
824
|
-
|
|
826
|
+
function memoize(fn) {
|
|
827
|
+
var cache = {};
|
|
828
|
+
return function(arg) {
|
|
829
|
+
if (cache[arg] === void 0) cache[arg] = fn(arg);
|
|
830
|
+
return cache[arg];
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
var memoize_esm_default = memoize;
|
|
834
|
+
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
|
|
835
|
+
var index = memoize_esm_default(
|
|
836
|
+
function(prop) {
|
|
837
|
+
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
|
|
838
|
+
}
|
|
839
|
+
/* Z+1 */
|
|
840
|
+
);
|
|
841
|
+
var is_prop_valid_esm_default = index;
|
|
842
|
+
var ADDITIONAL_BLOCKED_PROPS = /* @__PURE__ */ new Set([
|
|
843
|
+
// RN-only event handlers (pass isPropValid's on* pattern)
|
|
844
|
+
"onPress",
|
|
845
|
+
"onChangeText",
|
|
846
|
+
"onLayout",
|
|
847
|
+
"onMoveShouldSetResponder",
|
|
848
|
+
"onResponderGrant",
|
|
849
|
+
"onResponderMove",
|
|
850
|
+
"onResponderRelease",
|
|
851
|
+
"onResponderTerminate",
|
|
852
|
+
// SVG attributes that pass isPropValid
|
|
853
|
+
"strokeWidth",
|
|
854
|
+
// CSS properties that pass isPropValid but are used as component props
|
|
855
|
+
"overflow",
|
|
856
|
+
"cursor",
|
|
857
|
+
"fontSize",
|
|
858
|
+
"fontWeight",
|
|
859
|
+
"fontFamily",
|
|
860
|
+
"textDecoration"
|
|
861
|
+
]);
|
|
862
|
+
function shouldForwardProp(key) {
|
|
863
|
+
if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;
|
|
864
|
+
return is_prop_valid_esm_default(key);
|
|
865
|
+
}
|
|
866
|
+
function createFilteredElement(defaultTag) {
|
|
867
|
+
const Component = React2.forwardRef(
|
|
868
|
+
({ children, elementType, ...props }, ref) => {
|
|
869
|
+
const Tag2 = elementType || defaultTag;
|
|
870
|
+
const htmlProps = {};
|
|
871
|
+
for (const key of Object.keys(props)) {
|
|
872
|
+
if (shouldForwardProp(key)) {
|
|
873
|
+
htmlProps[key] = props[key];
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
return React2.createElement(
|
|
877
|
+
Tag2,
|
|
878
|
+
{ ref, ...htmlProps },
|
|
879
|
+
children
|
|
880
|
+
);
|
|
881
|
+
}
|
|
882
|
+
);
|
|
883
|
+
Component.displayName = `Filtered(${defaultTag})`;
|
|
884
|
+
return Component;
|
|
885
|
+
}
|
|
886
|
+
var FilteredDiv = createFilteredElement("div");
|
|
887
|
+
var StyledIcon2 = styled2(FilteredDiv)`
|
|
825
888
|
display: flex;
|
|
826
889
|
align-items: center;
|
|
827
890
|
justify-content: center;
|
|
@@ -843,7 +906,68 @@ var X2 = (props) => /* @__PURE__ */ jsx2100(Icon3, { ...props, children: /* @__P
|
|
|
843
906
|
|
|
844
907
|
// ../tag/dist/web/index.mjs
|
|
845
908
|
import { jsx as jsx410, jsxs } from "react/jsx-runtime";
|
|
846
|
-
|
|
909
|
+
function memoize2(fn) {
|
|
910
|
+
var cache = {};
|
|
911
|
+
return function(arg) {
|
|
912
|
+
if (cache[arg] === void 0) cache[arg] = fn(arg);
|
|
913
|
+
return cache[arg];
|
|
914
|
+
};
|
|
915
|
+
}
|
|
916
|
+
var memoize_esm_default2 = memoize2;
|
|
917
|
+
var reactPropsRegex2 = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
|
|
918
|
+
var index2 = memoize_esm_default2(
|
|
919
|
+
function(prop) {
|
|
920
|
+
return reactPropsRegex2.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
|
|
921
|
+
}
|
|
922
|
+
/* Z+1 */
|
|
923
|
+
);
|
|
924
|
+
var is_prop_valid_esm_default2 = index2;
|
|
925
|
+
var ADDITIONAL_BLOCKED_PROPS2 = /* @__PURE__ */ new Set([
|
|
926
|
+
// RN-only event handlers (pass isPropValid's on* pattern)
|
|
927
|
+
"onPress",
|
|
928
|
+
"onChangeText",
|
|
929
|
+
"onLayout",
|
|
930
|
+
"onMoveShouldSetResponder",
|
|
931
|
+
"onResponderGrant",
|
|
932
|
+
"onResponderMove",
|
|
933
|
+
"onResponderRelease",
|
|
934
|
+
"onResponderTerminate",
|
|
935
|
+
// SVG attributes that pass isPropValid
|
|
936
|
+
"strokeWidth",
|
|
937
|
+
// CSS properties that pass isPropValid but are used as component props
|
|
938
|
+
"overflow",
|
|
939
|
+
"cursor",
|
|
940
|
+
"fontSize",
|
|
941
|
+
"fontWeight",
|
|
942
|
+
"fontFamily",
|
|
943
|
+
"textDecoration"
|
|
944
|
+
]);
|
|
945
|
+
function shouldForwardProp2(key) {
|
|
946
|
+
if (ADDITIONAL_BLOCKED_PROPS2.has(key)) return false;
|
|
947
|
+
return is_prop_valid_esm_default2(key);
|
|
948
|
+
}
|
|
949
|
+
function createFilteredElement2(defaultTag) {
|
|
950
|
+
const Component = React3.forwardRef(
|
|
951
|
+
({ children, elementType, ...props }, ref) => {
|
|
952
|
+
const Tag2 = elementType || defaultTag;
|
|
953
|
+
const htmlProps = {};
|
|
954
|
+
for (const key of Object.keys(props)) {
|
|
955
|
+
if (shouldForwardProp2(key)) {
|
|
956
|
+
htmlProps[key] = props[key];
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
return React3.createElement(
|
|
960
|
+
Tag2,
|
|
961
|
+
{ ref, ...htmlProps },
|
|
962
|
+
children
|
|
963
|
+
);
|
|
964
|
+
}
|
|
965
|
+
);
|
|
966
|
+
Component.displayName = `Filtered(${defaultTag})`;
|
|
967
|
+
return Component;
|
|
968
|
+
}
|
|
969
|
+
var FilteredDiv2 = createFilteredElement2("div");
|
|
970
|
+
var StyledBox = styled3(FilteredDiv2)`
|
|
847
971
|
display: flex;
|
|
848
972
|
box-sizing: border-box;
|
|
849
973
|
background-color: ${(props) => props.backgroundColor || "transparent"};
|
|
@@ -930,7 +1054,7 @@ var StyledBox = styled3.div`
|
|
|
930
1054
|
${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
|
|
931
1055
|
}
|
|
932
1056
|
`;
|
|
933
|
-
var Box2 =
|
|
1057
|
+
var Box2 = React22.forwardRef(
|
|
934
1058
|
({
|
|
935
1059
|
children,
|
|
936
1060
|
onPress,
|
|
@@ -955,6 +1079,8 @@ var Box2 = React2.forwardRef(
|
|
|
955
1079
|
type,
|
|
956
1080
|
disabled,
|
|
957
1081
|
id,
|
|
1082
|
+
testID,
|
|
1083
|
+
"data-testid": dataTestId,
|
|
958
1084
|
...props
|
|
959
1085
|
}, ref) => {
|
|
960
1086
|
if (as === "img" && src) {
|
|
@@ -982,7 +1108,7 @@ var Box2 = React2.forwardRef(
|
|
|
982
1108
|
StyledBox,
|
|
983
1109
|
{
|
|
984
1110
|
ref,
|
|
985
|
-
as,
|
|
1111
|
+
elementType: as,
|
|
986
1112
|
id,
|
|
987
1113
|
type: as === "button" ? type || "button" : void 0,
|
|
988
1114
|
disabled: as === "button" ? disabled : void 0,
|
|
@@ -1002,6 +1128,7 @@ var Box2 = React2.forwardRef(
|
|
|
1002
1128
|
"aria-controls": ariaControls,
|
|
1003
1129
|
"aria-live": ariaLive,
|
|
1004
1130
|
tabIndex: tabIndex !== void 0 ? tabIndex : void 0,
|
|
1131
|
+
"data-testid": dataTestId || testID,
|
|
1005
1132
|
...props,
|
|
1006
1133
|
children
|
|
1007
1134
|
}
|
|
@@ -1009,7 +1136,8 @@ var Box2 = React2.forwardRef(
|
|
|
1009
1136
|
}
|
|
1010
1137
|
);
|
|
1011
1138
|
Box2.displayName = "Box";
|
|
1012
|
-
var
|
|
1139
|
+
var FilteredSpan = createFilteredElement2("span");
|
|
1140
|
+
var StyledText = styled22(FilteredSpan)`
|
|
1013
1141
|
color: ${(props) => props.color || "inherit"};
|
|
1014
1142
|
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
1015
1143
|
font-weight: ${(props) => props.fontWeight || "normal"};
|
|
@@ -1038,7 +1166,8 @@ var Text2 = ({
|
|
|
1038
1166
|
}
|
|
1039
1167
|
);
|
|
1040
1168
|
};
|
|
1041
|
-
var
|
|
1169
|
+
var FilteredDiv22 = createFilteredElement2("div");
|
|
1170
|
+
var StyledIcon3 = styled32(FilteredDiv22)`
|
|
1042
1171
|
display: flex;
|
|
1043
1172
|
align-items: center;
|
|
1044
1173
|
justify-content: center;
|
|
@@ -1278,9 +1407,9 @@ var useMultiSelectControl = ({
|
|
|
1278
1407
|
const countText = displayStateRef.current === 1 /* PreRender */ ? `+${itemsList.length}` : `+${itemsList.length - displayedItems.length}`;
|
|
1279
1408
|
displayedItems.push({ value: COUNT_ITEM_VALUE, label: countText });
|
|
1280
1409
|
}
|
|
1281
|
-
const content = displayedItems.map((item,
|
|
1410
|
+
const content = displayedItems.map((item, index3) => {
|
|
1282
1411
|
const isCount = item.value === COUNT_ITEM_VALUE;
|
|
1283
|
-
const isReducable =
|
|
1412
|
+
const isReducable = index3 === 0 && displayStateRef.current === 3 /* Render */ && displayedItemsCount === 0 || flexible;
|
|
1284
1413
|
if (variant === "tag") {
|
|
1285
1414
|
return /* @__PURE__ */ jsx391(
|
|
1286
1415
|
Box,
|
|
@@ -1311,7 +1440,7 @@ var useMultiSelectControl = ({
|
|
|
1311
1440
|
);
|
|
1312
1441
|
}
|
|
1313
1442
|
const isCountItem = hasHidden;
|
|
1314
|
-
const needsComma =
|
|
1443
|
+
const needsComma = index3 < displayedItems.length - 2 || index3 < displayedItems.length - 1 && !isCountItem;
|
|
1315
1444
|
return /* @__PURE__ */ jsxs2(
|
|
1316
1445
|
Text,
|
|
1317
1446
|
{
|
|
@@ -1347,11 +1476,11 @@ var useMultiSelectControl = ({
|
|
|
1347
1476
|
const countItemWidth = countEl.getBoundingClientRect().width;
|
|
1348
1477
|
const columnGap = parseInt(getComputedStyle(itemsRef.current).columnGap || "0", 10) || 0;
|
|
1349
1478
|
const tagsWidths = {};
|
|
1350
|
-
let
|
|
1479
|
+
let index3 = 0;
|
|
1351
1480
|
for (const el of allItems) {
|
|
1352
|
-
const key =
|
|
1481
|
+
const key = index3 < allItems.length - 1 ? stateList[index3].value : COUNT_ITEM_VALUE;
|
|
1353
1482
|
tagsWidths[key] = el.getBoundingClientRect().width;
|
|
1354
|
-
|
|
1483
|
+
index3++;
|
|
1355
1484
|
}
|
|
1356
1485
|
savedWidthsRef.current = {
|
|
1357
1486
|
tagsWidths,
|