@xsolla/xui-multi-select 0.133.0 → 0.135.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.mjs CHANGED
@@ -729,9 +729,8 @@ import {
729
729
  } from "react";
730
730
 
731
731
  // ../tag/dist/web/index.mjs
732
- import React22 from "react";
732
+ import React2 from "react";
733
733
  import styled3 from "styled-components";
734
- import React3 from "react";
735
734
  import { jsx as jsx389 } from "react/jsx-runtime";
736
735
  import styled22 from "styled-components";
737
736
  import { jsx as jsx2101 } from "react/jsx-runtime";
@@ -740,7 +739,6 @@ import { jsx as jsx390 } from "react/jsx-runtime";
740
739
  import { useResolvedTheme } from "@xsolla/xui-core";
741
740
 
742
741
  // ../icons/dist/web/index.mjs
743
- import React2 from "react";
744
742
  import styled2 from "styled-components";
745
743
  import { jsx as jsx388 } from "react/jsx-runtime";
746
744
 
@@ -823,109 +821,7 @@ var X = createLucideIcon("X", [
823
821
 
824
822
  // ../icons/dist/web/index.mjs
825
823
  import { jsx as jsx2100 } from "react/jsx-runtime";
826
- var NON_HTML_PROPS = /* @__PURE__ */ new Set([
827
- // BoxProps — layout & styling
828
- "backgroundColor",
829
- "borderColor",
830
- "borderWidth",
831
- "borderBottomWidth",
832
- "borderBottomColor",
833
- "borderTopWidth",
834
- "borderTopColor",
835
- "borderLeftWidth",
836
- "borderLeftColor",
837
- "borderRightWidth",
838
- "borderRightColor",
839
- "borderRadius",
840
- "borderStyle",
841
- "flexDirection",
842
- "flexWrap",
843
- "alignItems",
844
- "justifyContent",
845
- "alignSelf",
846
- "flex",
847
- "flexShrink",
848
- "gap",
849
- "position",
850
- "top",
851
- "bottom",
852
- "left",
853
- "right",
854
- "outline",
855
- "overflow",
856
- "overflowX",
857
- "overflowY",
858
- "zIndex",
859
- "cursor",
860
- "padding",
861
- "paddingHorizontal",
862
- "paddingVertical",
863
- "paddingTop",
864
- "paddingBottom",
865
- "paddingLeft",
866
- "paddingRight",
867
- "margin",
868
- "marginTop",
869
- "marginBottom",
870
- "marginLeft",
871
- "marginRight",
872
- "minWidth",
873
- "minHeight",
874
- "maxWidth",
875
- "maxHeight",
876
- "hoverStyle",
877
- "pressStyle",
878
- "focusStyle",
879
- "outlineColor",
880
- "outlineWidth",
881
- "outlineOffset",
882
- "outlineStyle",
883
- // BoxProps — RN-only
884
- "onPress",
885
- "onLayout",
886
- "onMoveShouldSetResponder",
887
- "onResponderGrant",
888
- "onResponderMove",
889
- "onResponderRelease",
890
- "onResponderTerminate",
891
- "testID",
892
- // Box — custom element type
893
- "elementType",
894
- // TextProps
895
- "fontSize",
896
- "fontWeight",
897
- "fontFamily",
898
- "lineHeight",
899
- "whiteSpace",
900
- "textAlign",
901
- "textDecoration",
902
- "numberOfLines",
903
- "letterSpacing",
904
- "textTransform",
905
- // SpinnerProps
906
- "strokeWidth",
907
- // DividerProps
908
- "vertical",
909
- "dashStroke"
910
- ]);
911
- function createFilteredElement(defaultTag) {
912
- const Component = React2.forwardRef(
913
- ({ children, elementType, ...props }, ref) => {
914
- const Tag2 = elementType || defaultTag;
915
- const htmlProps = {};
916
- for (const key of Object.keys(props)) {
917
- if (!NON_HTML_PROPS.has(key)) {
918
- htmlProps[key] = props[key];
919
- }
920
- }
921
- return React2.createElement(Tag2, { ref, ...htmlProps }, children);
922
- }
923
- );
924
- Component.displayName = `Filtered(${defaultTag})`;
925
- return Component;
926
- }
927
- var FilteredDiv = createFilteredElement("div");
928
- var StyledIcon2 = styled2(FilteredDiv)`
824
+ var StyledIcon2 = styled2.div`
929
825
  display: flex;
930
826
  align-items: center;
931
827
  justify-content: center;
@@ -947,109 +843,7 @@ var X2 = (props) => /* @__PURE__ */ jsx2100(Icon3, { ...props, children: /* @__P
947
843
 
948
844
  // ../tag/dist/web/index.mjs
949
845
  import { jsx as jsx410, jsxs } from "react/jsx-runtime";
950
- var NON_HTML_PROPS2 = /* @__PURE__ */ new Set([
951
- // BoxProps — layout & styling
952
- "backgroundColor",
953
- "borderColor",
954
- "borderWidth",
955
- "borderBottomWidth",
956
- "borderBottomColor",
957
- "borderTopWidth",
958
- "borderTopColor",
959
- "borderLeftWidth",
960
- "borderLeftColor",
961
- "borderRightWidth",
962
- "borderRightColor",
963
- "borderRadius",
964
- "borderStyle",
965
- "flexDirection",
966
- "flexWrap",
967
- "alignItems",
968
- "justifyContent",
969
- "alignSelf",
970
- "flex",
971
- "flexShrink",
972
- "gap",
973
- "position",
974
- "top",
975
- "bottom",
976
- "left",
977
- "right",
978
- "outline",
979
- "overflow",
980
- "overflowX",
981
- "overflowY",
982
- "zIndex",
983
- "cursor",
984
- "padding",
985
- "paddingHorizontal",
986
- "paddingVertical",
987
- "paddingTop",
988
- "paddingBottom",
989
- "paddingLeft",
990
- "paddingRight",
991
- "margin",
992
- "marginTop",
993
- "marginBottom",
994
- "marginLeft",
995
- "marginRight",
996
- "minWidth",
997
- "minHeight",
998
- "maxWidth",
999
- "maxHeight",
1000
- "hoverStyle",
1001
- "pressStyle",
1002
- "focusStyle",
1003
- "outlineColor",
1004
- "outlineWidth",
1005
- "outlineOffset",
1006
- "outlineStyle",
1007
- // BoxProps — RN-only
1008
- "onPress",
1009
- "onLayout",
1010
- "onMoveShouldSetResponder",
1011
- "onResponderGrant",
1012
- "onResponderMove",
1013
- "onResponderRelease",
1014
- "onResponderTerminate",
1015
- "testID",
1016
- // Box — custom element type
1017
- "elementType",
1018
- // TextProps
1019
- "fontSize",
1020
- "fontWeight",
1021
- "fontFamily",
1022
- "lineHeight",
1023
- "whiteSpace",
1024
- "textAlign",
1025
- "textDecoration",
1026
- "numberOfLines",
1027
- "letterSpacing",
1028
- "textTransform",
1029
- // SpinnerProps
1030
- "strokeWidth",
1031
- // DividerProps
1032
- "vertical",
1033
- "dashStroke"
1034
- ]);
1035
- function createFilteredElement2(defaultTag) {
1036
- const Component = React3.forwardRef(
1037
- ({ children, elementType, ...props }, ref) => {
1038
- const Tag2 = elementType || defaultTag;
1039
- const htmlProps = {};
1040
- for (const key of Object.keys(props)) {
1041
- if (!NON_HTML_PROPS2.has(key)) {
1042
- htmlProps[key] = props[key];
1043
- }
1044
- }
1045
- return React3.createElement(Tag2, { ref, ...htmlProps }, children);
1046
- }
1047
- );
1048
- Component.displayName = `Filtered(${defaultTag})`;
1049
- return Component;
1050
- }
1051
- var FilteredDiv2 = createFilteredElement2("div");
1052
- var StyledBox = styled3(FilteredDiv2)`
846
+ var StyledBox = styled3.div`
1053
847
  display: flex;
1054
848
  box-sizing: border-box;
1055
849
  background-color: ${(props) => props.backgroundColor || "transparent"};
@@ -1136,7 +930,7 @@ var StyledBox = styled3(FilteredDiv2)`
1136
930
  ${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
1137
931
  }
1138
932
  `;
1139
- var Box2 = React22.forwardRef(
933
+ var Box2 = React2.forwardRef(
1140
934
  ({
1141
935
  children,
1142
936
  onPress,
@@ -1188,7 +982,7 @@ var Box2 = React22.forwardRef(
1188
982
  StyledBox,
1189
983
  {
1190
984
  ref,
1191
- elementType: as,
985
+ as,
1192
986
  id,
1193
987
  type: as === "button" ? type || "button" : void 0,
1194
988
  disabled: as === "button" ? disabled : void 0,
@@ -1215,8 +1009,7 @@ var Box2 = React22.forwardRef(
1215
1009
  }
1216
1010
  );
1217
1011
  Box2.displayName = "Box";
1218
- var FilteredSpan = createFilteredElement2("span");
1219
- var StyledText = styled22(FilteredSpan)`
1012
+ var StyledText = styled22.span`
1220
1013
  color: ${(props) => props.color || "inherit"};
1221
1014
  font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
1222
1015
  font-weight: ${(props) => props.fontWeight || "normal"};
@@ -1245,8 +1038,7 @@ var Text2 = ({
1245
1038
  }
1246
1039
  );
1247
1040
  };
1248
- var FilteredDiv22 = createFilteredElement2("div");
1249
- var StyledIcon3 = styled32(FilteredDiv22)`
1041
+ var StyledIcon3 = styled32.div`
1250
1042
  display: flex;
1251
1043
  align-items: center;
1252
1044
  justify-content: center;
@@ -1264,14 +1056,10 @@ var StyledIcon3 = styled32(FilteredDiv22)`
1264
1056
  var Icon4 = ({ children, ...props }) => {
1265
1057
  return /* @__PURE__ */ jsx390(StyledIcon3, { ...props, children });
1266
1058
  };
1267
- var SELECTABLE_BORDER_RADIUS = 8;
1268
1059
  var Tag = ({
1269
1060
  size = "md",
1270
1061
  tone = "primary",
1271
1062
  type = "solid",
1272
- variant = "default",
1273
- selected = false,
1274
- onPress,
1275
1063
  children,
1276
1064
  iconLeft,
1277
1065
  iconRight,
@@ -1282,20 +1070,6 @@ var Tag = ({
1282
1070
  const { theme } = useResolvedTheme({ themeMode, themeProductContext });
1283
1071
  const sizeStyles = theme.sizing.tag(size);
1284
1072
  const resolveColors = () => {
1285
- if (variant === "selectable") {
1286
- if (selected) {
1287
- return {
1288
- bg: theme.colors.control.brand.secondary.bg,
1289
- text: theme.colors.content.brand.primary,
1290
- border: theme.colors.border.secondary
1291
- };
1292
- }
1293
- return {
1294
- bg: theme.colors.overlay.mono,
1295
- text: theme.colors.content.primary,
1296
- border: theme.colors.border.secondary
1297
- };
1298
- }
1299
1073
  const isOutlined = type === "outlined";
1300
1074
  switch (tone) {
1301
1075
  case "primary":
@@ -1349,16 +1123,12 @@ var Tag = ({
1349
1123
  }
1350
1124
  };
1351
1125
  const { bg, text, border } = resolveColors();
1352
- const isSelectable = variant === "selectable";
1353
- const borderRadius = isSelectable ? SELECTABLE_BORDER_RADIUS : sizeStyles.radius;
1354
1126
  const isIconOnly = !children && (!!iconLeft || !!iconRight);
1355
1127
  return /* @__PURE__ */ jsxs(
1356
1128
  Box2,
1357
1129
  {
1358
- as: isSelectable ? "button" : void 0,
1359
- onPress: isSelectable ? onPress : void 0,
1360
1130
  backgroundColor: bg,
1361
- borderRadius,
1131
+ borderRadius: sizeStyles.radius,
1362
1132
  height: sizeStyles.height,
1363
1133
  width: isIconOnly ? sizeStyles.height : void 0,
1364
1134
  paddingHorizontal: isIconOnly ? 0 : sizeStyles.padding,
@@ -1369,8 +1139,6 @@ var Tag = ({
1369
1139
  borderWidth: sizeStyles.borderWidth,
1370
1140
  borderColor: border,
1371
1141
  borderStyle: "solid",
1372
- cursor: isSelectable ? "pointer" : "default",
1373
- hoverStyle: isSelectable && !selected ? { backgroundColor: theme.colors.control.brand.tertiary.bgHover } : void 0,
1374
1142
  style: {
1375
1143
  overflow: "hidden",
1376
1144
  textOverflow: "ellipsis",