@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.js +36 -268
- package/native/index.js.map +1 -1
- package/native/index.mjs +8 -240
- package/native/index.mjs.map +1 -1
- package/package.json +5 -5
- package/web/index.js +36 -268
- package/web/index.js.map +1 -1
- package/web/index.mjs +8 -240
- package/web/index.mjs.map +1 -1
package/web/index.mjs
CHANGED
|
@@ -687,9 +687,8 @@ import {
|
|
|
687
687
|
} from "react";
|
|
688
688
|
|
|
689
689
|
// ../tag/dist/web/index.mjs
|
|
690
|
-
import
|
|
690
|
+
import React2 from "react";
|
|
691
691
|
import styled6 from "styled-components";
|
|
692
|
-
import React3 from "react";
|
|
693
692
|
import { jsx as jsx389 } from "react/jsx-runtime";
|
|
694
693
|
import styled22 from "styled-components";
|
|
695
694
|
import { jsx as jsx2101 } from "react/jsx-runtime";
|
|
@@ -698,7 +697,6 @@ import { jsx as jsx390 } from "react/jsx-runtime";
|
|
|
698
697
|
import { useResolvedTheme } from "@xsolla/xui-core";
|
|
699
698
|
|
|
700
699
|
// ../icons/dist/web/index.mjs
|
|
701
|
-
import React2 from "react";
|
|
702
700
|
import styled5 from "styled-components";
|
|
703
701
|
import { jsx as jsx388 } from "react/jsx-runtime";
|
|
704
702
|
|
|
@@ -781,109 +779,7 @@ var X = createLucideIcon("X", [
|
|
|
781
779
|
|
|
782
780
|
// ../icons/dist/web/index.mjs
|
|
783
781
|
import { jsx as jsx2100 } from "react/jsx-runtime";
|
|
784
|
-
var
|
|
785
|
-
// BoxProps — layout & styling
|
|
786
|
-
"backgroundColor",
|
|
787
|
-
"borderColor",
|
|
788
|
-
"borderWidth",
|
|
789
|
-
"borderBottomWidth",
|
|
790
|
-
"borderBottomColor",
|
|
791
|
-
"borderTopWidth",
|
|
792
|
-
"borderTopColor",
|
|
793
|
-
"borderLeftWidth",
|
|
794
|
-
"borderLeftColor",
|
|
795
|
-
"borderRightWidth",
|
|
796
|
-
"borderRightColor",
|
|
797
|
-
"borderRadius",
|
|
798
|
-
"borderStyle",
|
|
799
|
-
"flexDirection",
|
|
800
|
-
"flexWrap",
|
|
801
|
-
"alignItems",
|
|
802
|
-
"justifyContent",
|
|
803
|
-
"alignSelf",
|
|
804
|
-
"flex",
|
|
805
|
-
"flexShrink",
|
|
806
|
-
"gap",
|
|
807
|
-
"position",
|
|
808
|
-
"top",
|
|
809
|
-
"bottom",
|
|
810
|
-
"left",
|
|
811
|
-
"right",
|
|
812
|
-
"outline",
|
|
813
|
-
"overflow",
|
|
814
|
-
"overflowX",
|
|
815
|
-
"overflowY",
|
|
816
|
-
"zIndex",
|
|
817
|
-
"cursor",
|
|
818
|
-
"padding",
|
|
819
|
-
"paddingHorizontal",
|
|
820
|
-
"paddingVertical",
|
|
821
|
-
"paddingTop",
|
|
822
|
-
"paddingBottom",
|
|
823
|
-
"paddingLeft",
|
|
824
|
-
"paddingRight",
|
|
825
|
-
"margin",
|
|
826
|
-
"marginTop",
|
|
827
|
-
"marginBottom",
|
|
828
|
-
"marginLeft",
|
|
829
|
-
"marginRight",
|
|
830
|
-
"minWidth",
|
|
831
|
-
"minHeight",
|
|
832
|
-
"maxWidth",
|
|
833
|
-
"maxHeight",
|
|
834
|
-
"hoverStyle",
|
|
835
|
-
"pressStyle",
|
|
836
|
-
"focusStyle",
|
|
837
|
-
"outlineColor",
|
|
838
|
-
"outlineWidth",
|
|
839
|
-
"outlineOffset",
|
|
840
|
-
"outlineStyle",
|
|
841
|
-
// BoxProps — RN-only
|
|
842
|
-
"onPress",
|
|
843
|
-
"onLayout",
|
|
844
|
-
"onMoveShouldSetResponder",
|
|
845
|
-
"onResponderGrant",
|
|
846
|
-
"onResponderMove",
|
|
847
|
-
"onResponderRelease",
|
|
848
|
-
"onResponderTerminate",
|
|
849
|
-
"testID",
|
|
850
|
-
// Box — custom element type
|
|
851
|
-
"elementType",
|
|
852
|
-
// TextProps
|
|
853
|
-
"fontSize",
|
|
854
|
-
"fontWeight",
|
|
855
|
-
"fontFamily",
|
|
856
|
-
"lineHeight",
|
|
857
|
-
"whiteSpace",
|
|
858
|
-
"textAlign",
|
|
859
|
-
"textDecoration",
|
|
860
|
-
"numberOfLines",
|
|
861
|
-
"letterSpacing",
|
|
862
|
-
"textTransform",
|
|
863
|
-
// SpinnerProps
|
|
864
|
-
"strokeWidth",
|
|
865
|
-
// DividerProps
|
|
866
|
-
"vertical",
|
|
867
|
-
"dashStroke"
|
|
868
|
-
]);
|
|
869
|
-
function createFilteredElement(defaultTag) {
|
|
870
|
-
const Component = React2.forwardRef(
|
|
871
|
-
({ children, elementType, ...props }, ref) => {
|
|
872
|
-
const Tag2 = elementType || defaultTag;
|
|
873
|
-
const htmlProps = {};
|
|
874
|
-
for (const key of Object.keys(props)) {
|
|
875
|
-
if (!NON_HTML_PROPS.has(key)) {
|
|
876
|
-
htmlProps[key] = props[key];
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
return React2.createElement(Tag2, { ref, ...htmlProps }, children);
|
|
880
|
-
}
|
|
881
|
-
);
|
|
882
|
-
Component.displayName = `Filtered(${defaultTag})`;
|
|
883
|
-
return Component;
|
|
884
|
-
}
|
|
885
|
-
var FilteredDiv = createFilteredElement("div");
|
|
886
|
-
var StyledIcon3 = styled5(FilteredDiv)`
|
|
782
|
+
var StyledIcon3 = styled5.div`
|
|
887
783
|
display: flex;
|
|
888
784
|
align-items: center;
|
|
889
785
|
justify-content: center;
|
|
@@ -905,109 +801,7 @@ var X2 = (props) => /* @__PURE__ */ jsx2100(Icon3, { ...props, children: /* @__P
|
|
|
905
801
|
|
|
906
802
|
// ../tag/dist/web/index.mjs
|
|
907
803
|
import { jsx as jsx410, jsxs } from "react/jsx-runtime";
|
|
908
|
-
var
|
|
909
|
-
// BoxProps — layout & styling
|
|
910
|
-
"backgroundColor",
|
|
911
|
-
"borderColor",
|
|
912
|
-
"borderWidth",
|
|
913
|
-
"borderBottomWidth",
|
|
914
|
-
"borderBottomColor",
|
|
915
|
-
"borderTopWidth",
|
|
916
|
-
"borderTopColor",
|
|
917
|
-
"borderLeftWidth",
|
|
918
|
-
"borderLeftColor",
|
|
919
|
-
"borderRightWidth",
|
|
920
|
-
"borderRightColor",
|
|
921
|
-
"borderRadius",
|
|
922
|
-
"borderStyle",
|
|
923
|
-
"flexDirection",
|
|
924
|
-
"flexWrap",
|
|
925
|
-
"alignItems",
|
|
926
|
-
"justifyContent",
|
|
927
|
-
"alignSelf",
|
|
928
|
-
"flex",
|
|
929
|
-
"flexShrink",
|
|
930
|
-
"gap",
|
|
931
|
-
"position",
|
|
932
|
-
"top",
|
|
933
|
-
"bottom",
|
|
934
|
-
"left",
|
|
935
|
-
"right",
|
|
936
|
-
"outline",
|
|
937
|
-
"overflow",
|
|
938
|
-
"overflowX",
|
|
939
|
-
"overflowY",
|
|
940
|
-
"zIndex",
|
|
941
|
-
"cursor",
|
|
942
|
-
"padding",
|
|
943
|
-
"paddingHorizontal",
|
|
944
|
-
"paddingVertical",
|
|
945
|
-
"paddingTop",
|
|
946
|
-
"paddingBottom",
|
|
947
|
-
"paddingLeft",
|
|
948
|
-
"paddingRight",
|
|
949
|
-
"margin",
|
|
950
|
-
"marginTop",
|
|
951
|
-
"marginBottom",
|
|
952
|
-
"marginLeft",
|
|
953
|
-
"marginRight",
|
|
954
|
-
"minWidth",
|
|
955
|
-
"minHeight",
|
|
956
|
-
"maxWidth",
|
|
957
|
-
"maxHeight",
|
|
958
|
-
"hoverStyle",
|
|
959
|
-
"pressStyle",
|
|
960
|
-
"focusStyle",
|
|
961
|
-
"outlineColor",
|
|
962
|
-
"outlineWidth",
|
|
963
|
-
"outlineOffset",
|
|
964
|
-
"outlineStyle",
|
|
965
|
-
// BoxProps — RN-only
|
|
966
|
-
"onPress",
|
|
967
|
-
"onLayout",
|
|
968
|
-
"onMoveShouldSetResponder",
|
|
969
|
-
"onResponderGrant",
|
|
970
|
-
"onResponderMove",
|
|
971
|
-
"onResponderRelease",
|
|
972
|
-
"onResponderTerminate",
|
|
973
|
-
"testID",
|
|
974
|
-
// Box — custom element type
|
|
975
|
-
"elementType",
|
|
976
|
-
// TextProps
|
|
977
|
-
"fontSize",
|
|
978
|
-
"fontWeight",
|
|
979
|
-
"fontFamily",
|
|
980
|
-
"lineHeight",
|
|
981
|
-
"whiteSpace",
|
|
982
|
-
"textAlign",
|
|
983
|
-
"textDecoration",
|
|
984
|
-
"numberOfLines",
|
|
985
|
-
"letterSpacing",
|
|
986
|
-
"textTransform",
|
|
987
|
-
// SpinnerProps
|
|
988
|
-
"strokeWidth",
|
|
989
|
-
// DividerProps
|
|
990
|
-
"vertical",
|
|
991
|
-
"dashStroke"
|
|
992
|
-
]);
|
|
993
|
-
function createFilteredElement2(defaultTag) {
|
|
994
|
-
const Component = React3.forwardRef(
|
|
995
|
-
({ children, elementType, ...props }, ref) => {
|
|
996
|
-
const Tag2 = elementType || defaultTag;
|
|
997
|
-
const htmlProps = {};
|
|
998
|
-
for (const key of Object.keys(props)) {
|
|
999
|
-
if (!NON_HTML_PROPS2.has(key)) {
|
|
1000
|
-
htmlProps[key] = props[key];
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
-
return React3.createElement(Tag2, { ref, ...htmlProps }, children);
|
|
1004
|
-
}
|
|
1005
|
-
);
|
|
1006
|
-
Component.displayName = `Filtered(${defaultTag})`;
|
|
1007
|
-
return Component;
|
|
1008
|
-
}
|
|
1009
|
-
var FilteredDiv2 = createFilteredElement2("div");
|
|
1010
|
-
var StyledBox2 = styled6(FilteredDiv2)`
|
|
804
|
+
var StyledBox2 = styled6.div`
|
|
1011
805
|
display: flex;
|
|
1012
806
|
box-sizing: border-box;
|
|
1013
807
|
background-color: ${(props) => props.backgroundColor || "transparent"};
|
|
@@ -1094,7 +888,7 @@ var StyledBox2 = styled6(FilteredDiv2)`
|
|
|
1094
888
|
${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
|
|
1095
889
|
}
|
|
1096
890
|
`;
|
|
1097
|
-
var Box2 =
|
|
891
|
+
var Box2 = React2.forwardRef(
|
|
1098
892
|
({
|
|
1099
893
|
children,
|
|
1100
894
|
onPress,
|
|
@@ -1146,7 +940,7 @@ var Box2 = React22.forwardRef(
|
|
|
1146
940
|
StyledBox2,
|
|
1147
941
|
{
|
|
1148
942
|
ref,
|
|
1149
|
-
|
|
943
|
+
as,
|
|
1150
944
|
id,
|
|
1151
945
|
type: as === "button" ? type || "button" : void 0,
|
|
1152
946
|
disabled: as === "button" ? disabled : void 0,
|
|
@@ -1173,8 +967,7 @@ var Box2 = React22.forwardRef(
|
|
|
1173
967
|
}
|
|
1174
968
|
);
|
|
1175
969
|
Box2.displayName = "Box";
|
|
1176
|
-
var
|
|
1177
|
-
var StyledText2 = styled22(FilteredSpan)`
|
|
970
|
+
var StyledText2 = styled22.span`
|
|
1178
971
|
color: ${(props) => props.color || "inherit"};
|
|
1179
972
|
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
1180
973
|
font-weight: ${(props) => props.fontWeight || "normal"};
|
|
@@ -1203,8 +996,7 @@ var Text2 = ({
|
|
|
1203
996
|
}
|
|
1204
997
|
);
|
|
1205
998
|
};
|
|
1206
|
-
var
|
|
1207
|
-
var StyledIcon4 = styled32(FilteredDiv22)`
|
|
999
|
+
var StyledIcon4 = styled32.div`
|
|
1208
1000
|
display: flex;
|
|
1209
1001
|
align-items: center;
|
|
1210
1002
|
justify-content: center;
|
|
@@ -1222,14 +1014,10 @@ var StyledIcon4 = styled32(FilteredDiv22)`
|
|
|
1222
1014
|
var Icon4 = ({ children, ...props }) => {
|
|
1223
1015
|
return /* @__PURE__ */ jsx390(StyledIcon4, { ...props, children });
|
|
1224
1016
|
};
|
|
1225
|
-
var SELECTABLE_BORDER_RADIUS = 8;
|
|
1226
1017
|
var Tag = ({
|
|
1227
1018
|
size = "md",
|
|
1228
1019
|
tone = "primary",
|
|
1229
1020
|
type = "solid",
|
|
1230
|
-
variant = "default",
|
|
1231
|
-
selected = false,
|
|
1232
|
-
onPress,
|
|
1233
1021
|
children,
|
|
1234
1022
|
iconLeft,
|
|
1235
1023
|
iconRight,
|
|
@@ -1240,20 +1028,6 @@ var Tag = ({
|
|
|
1240
1028
|
const { theme } = useResolvedTheme({ themeMode, themeProductContext });
|
|
1241
1029
|
const sizeStyles = theme.sizing.tag(size);
|
|
1242
1030
|
const resolveColors = () => {
|
|
1243
|
-
if (variant === "selectable") {
|
|
1244
|
-
if (selected) {
|
|
1245
|
-
return {
|
|
1246
|
-
bg: theme.colors.control.brand.secondary.bg,
|
|
1247
|
-
text: theme.colors.content.brand.primary,
|
|
1248
|
-
border: theme.colors.border.secondary
|
|
1249
|
-
};
|
|
1250
|
-
}
|
|
1251
|
-
return {
|
|
1252
|
-
bg: theme.colors.overlay.mono,
|
|
1253
|
-
text: theme.colors.content.primary,
|
|
1254
|
-
border: theme.colors.border.secondary
|
|
1255
|
-
};
|
|
1256
|
-
}
|
|
1257
1031
|
const isOutlined = type === "outlined";
|
|
1258
1032
|
switch (tone) {
|
|
1259
1033
|
case "primary":
|
|
@@ -1307,16 +1081,12 @@ var Tag = ({
|
|
|
1307
1081
|
}
|
|
1308
1082
|
};
|
|
1309
1083
|
const { bg, text, border } = resolveColors();
|
|
1310
|
-
const isSelectable = variant === "selectable";
|
|
1311
|
-
const borderRadius = isSelectable ? SELECTABLE_BORDER_RADIUS : sizeStyles.radius;
|
|
1312
1084
|
const isIconOnly = !children && (!!iconLeft || !!iconRight);
|
|
1313
1085
|
return /* @__PURE__ */ jsxs(
|
|
1314
1086
|
Box2,
|
|
1315
1087
|
{
|
|
1316
|
-
as: isSelectable ? "button" : void 0,
|
|
1317
|
-
onPress: isSelectable ? onPress : void 0,
|
|
1318
1088
|
backgroundColor: bg,
|
|
1319
|
-
borderRadius,
|
|
1089
|
+
borderRadius: sizeStyles.radius,
|
|
1320
1090
|
height: sizeStyles.height,
|
|
1321
1091
|
width: isIconOnly ? sizeStyles.height : void 0,
|
|
1322
1092
|
paddingHorizontal: isIconOnly ? 0 : sizeStyles.padding,
|
|
@@ -1327,8 +1097,6 @@ var Tag = ({
|
|
|
1327
1097
|
borderWidth: sizeStyles.borderWidth,
|
|
1328
1098
|
borderColor: border,
|
|
1329
1099
|
borderStyle: "solid",
|
|
1330
|
-
cursor: isSelectable ? "pointer" : "default",
|
|
1331
|
-
hoverStyle: isSelectable && !selected ? { backgroundColor: theme.colors.control.brand.tertiary.bgHover } : void 0,
|
|
1332
1100
|
style: {
|
|
1333
1101
|
overflow: "hidden",
|
|
1334
1102
|
textOverflow: "ellipsis",
|