@xsolla/xui-multi-select 0.134.0 → 0.136.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 +1 -25
- package/native/index.js.map +1 -1
- package/native/index.mjs +1 -25
- package/native/index.mjs.map +1 -1
- package/package.json +5 -5
- package/web/index.js +1 -25
- package/web/index.js.map +1 -1
- package/web/index.mjs +1 -25
- package/web/index.mjs.map +1 -1
package/native/index.mjs
CHANGED
|
@@ -1056,14 +1056,10 @@ var StyledIcon3 = styled32.div`
|
|
|
1056
1056
|
var Icon4 = ({ children, ...props }) => {
|
|
1057
1057
|
return /* @__PURE__ */ jsx390(StyledIcon3, { ...props, children });
|
|
1058
1058
|
};
|
|
1059
|
-
var SELECTABLE_BORDER_RADIUS = 8;
|
|
1060
1059
|
var Tag = ({
|
|
1061
1060
|
size = "md",
|
|
1062
1061
|
tone = "primary",
|
|
1063
1062
|
type = "solid",
|
|
1064
|
-
variant = "default",
|
|
1065
|
-
selected = false,
|
|
1066
|
-
onPress,
|
|
1067
1063
|
children,
|
|
1068
1064
|
iconLeft,
|
|
1069
1065
|
iconRight,
|
|
@@ -1074,20 +1070,6 @@ var Tag = ({
|
|
|
1074
1070
|
const { theme } = useResolvedTheme({ themeMode, themeProductContext });
|
|
1075
1071
|
const sizeStyles = theme.sizing.tag(size);
|
|
1076
1072
|
const resolveColors = () => {
|
|
1077
|
-
if (variant === "selectable") {
|
|
1078
|
-
if (selected) {
|
|
1079
|
-
return {
|
|
1080
|
-
bg: theme.colors.control.brand.secondary.bg,
|
|
1081
|
-
text: theme.colors.content.brand.primary,
|
|
1082
|
-
border: theme.colors.border.secondary
|
|
1083
|
-
};
|
|
1084
|
-
}
|
|
1085
|
-
return {
|
|
1086
|
-
bg: theme.colors.overlay.mono,
|
|
1087
|
-
text: theme.colors.content.primary,
|
|
1088
|
-
border: theme.colors.border.secondary
|
|
1089
|
-
};
|
|
1090
|
-
}
|
|
1091
1073
|
const isOutlined = type === "outlined";
|
|
1092
1074
|
switch (tone) {
|
|
1093
1075
|
case "primary":
|
|
@@ -1141,16 +1123,12 @@ var Tag = ({
|
|
|
1141
1123
|
}
|
|
1142
1124
|
};
|
|
1143
1125
|
const { bg, text, border } = resolveColors();
|
|
1144
|
-
const isSelectable = variant === "selectable";
|
|
1145
|
-
const borderRadius = isSelectable ? SELECTABLE_BORDER_RADIUS : sizeStyles.radius;
|
|
1146
1126
|
const isIconOnly = !children && (!!iconLeft || !!iconRight);
|
|
1147
1127
|
return /* @__PURE__ */ jsxs(
|
|
1148
1128
|
Box2,
|
|
1149
1129
|
{
|
|
1150
|
-
as: isSelectable ? "button" : void 0,
|
|
1151
|
-
onPress: isSelectable ? onPress : void 0,
|
|
1152
1130
|
backgroundColor: bg,
|
|
1153
|
-
borderRadius,
|
|
1131
|
+
borderRadius: sizeStyles.radius,
|
|
1154
1132
|
height: sizeStyles.height,
|
|
1155
1133
|
width: isIconOnly ? sizeStyles.height : void 0,
|
|
1156
1134
|
paddingHorizontal: isIconOnly ? 0 : sizeStyles.padding,
|
|
@@ -1161,8 +1139,6 @@ var Tag = ({
|
|
|
1161
1139
|
borderWidth: sizeStyles.borderWidth,
|
|
1162
1140
|
borderColor: border,
|
|
1163
1141
|
borderStyle: "solid",
|
|
1164
|
-
cursor: isSelectable ? "pointer" : "default",
|
|
1165
|
-
hoverStyle: isSelectable && !selected ? { backgroundColor: theme.colors.control.brand.tertiary.bgHover } : void 0,
|
|
1166
1142
|
style: {
|
|
1167
1143
|
overflow: "hidden",
|
|
1168
1144
|
textOverflow: "ellipsis",
|