@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-multi-select",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.136.0",
|
|
4
4
|
"main": "./web/index.js",
|
|
5
5
|
"module": "./web/index.mjs",
|
|
6
6
|
"types": "./web/index.d.ts",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"build:native": "PLATFORM=native tsup"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xsolla/xui-checkbox": "0.
|
|
14
|
-
"@xsolla/xui-core": "0.
|
|
15
|
-
"@xsolla/xui-dropdown": "0.
|
|
16
|
-
"@xsolla/xui-primitives-core": "0.
|
|
13
|
+
"@xsolla/xui-checkbox": "0.136.0",
|
|
14
|
+
"@xsolla/xui-core": "0.136.0",
|
|
15
|
+
"@xsolla/xui-dropdown": "0.136.0",
|
|
16
|
+
"@xsolla/xui-primitives-core": "0.136.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": ">=16.8.0",
|
package/web/index.js
CHANGED
|
@@ -1045,14 +1045,10 @@ var StyledIcon4 = import_styled_components8.default.div`
|
|
|
1045
1045
|
var Icon4 = ({ children, ...props }) => {
|
|
1046
1046
|
return /* @__PURE__ */ (0, import_jsx_runtime395.jsx)(StyledIcon4, { ...props, children });
|
|
1047
1047
|
};
|
|
1048
|
-
var SELECTABLE_BORDER_RADIUS = 8;
|
|
1049
1048
|
var Tag = ({
|
|
1050
1049
|
size = "md",
|
|
1051
1050
|
tone = "primary",
|
|
1052
1051
|
type = "solid",
|
|
1053
|
-
variant = "default",
|
|
1054
|
-
selected = false,
|
|
1055
|
-
onPress,
|
|
1056
1052
|
children,
|
|
1057
1053
|
iconLeft,
|
|
1058
1054
|
iconRight,
|
|
@@ -1063,20 +1059,6 @@ var Tag = ({
|
|
|
1063
1059
|
const { theme } = (0, import_xui_core.useResolvedTheme)({ themeMode, themeProductContext });
|
|
1064
1060
|
const sizeStyles = theme.sizing.tag(size);
|
|
1065
1061
|
const resolveColors = () => {
|
|
1066
|
-
if (variant === "selectable") {
|
|
1067
|
-
if (selected) {
|
|
1068
|
-
return {
|
|
1069
|
-
bg: theme.colors.control.brand.secondary.bg,
|
|
1070
|
-
text: theme.colors.content.brand.primary,
|
|
1071
|
-
border: theme.colors.border.secondary
|
|
1072
|
-
};
|
|
1073
|
-
}
|
|
1074
|
-
return {
|
|
1075
|
-
bg: theme.colors.overlay.mono,
|
|
1076
|
-
text: theme.colors.content.primary,
|
|
1077
|
-
border: theme.colors.border.secondary
|
|
1078
|
-
};
|
|
1079
|
-
}
|
|
1080
1062
|
const isOutlined = type === "outlined";
|
|
1081
1063
|
switch (tone) {
|
|
1082
1064
|
case "primary":
|
|
@@ -1130,16 +1112,12 @@ var Tag = ({
|
|
|
1130
1112
|
}
|
|
1131
1113
|
};
|
|
1132
1114
|
const { bg, text, border } = resolveColors();
|
|
1133
|
-
const isSelectable = variant === "selectable";
|
|
1134
|
-
const borderRadius = isSelectable ? SELECTABLE_BORDER_RADIUS : sizeStyles.radius;
|
|
1135
1115
|
const isIconOnly = !children && (!!iconLeft || !!iconRight);
|
|
1136
1116
|
return /* @__PURE__ */ (0, import_jsx_runtime396.jsxs)(
|
|
1137
1117
|
Box2,
|
|
1138
1118
|
{
|
|
1139
|
-
as: isSelectable ? "button" : void 0,
|
|
1140
|
-
onPress: isSelectable ? onPress : void 0,
|
|
1141
1119
|
backgroundColor: bg,
|
|
1142
|
-
borderRadius,
|
|
1120
|
+
borderRadius: sizeStyles.radius,
|
|
1143
1121
|
height: sizeStyles.height,
|
|
1144
1122
|
width: isIconOnly ? sizeStyles.height : void 0,
|
|
1145
1123
|
paddingHorizontal: isIconOnly ? 0 : sizeStyles.padding,
|
|
@@ -1150,8 +1128,6 @@ var Tag = ({
|
|
|
1150
1128
|
borderWidth: sizeStyles.borderWidth,
|
|
1151
1129
|
borderColor: border,
|
|
1152
1130
|
borderStyle: "solid",
|
|
1153
|
-
cursor: isSelectable ? "pointer" : "default",
|
|
1154
|
-
hoverStyle: isSelectable && !selected ? { backgroundColor: theme.colors.control.brand.tertiary.bgHover } : void 0,
|
|
1155
1131
|
style: {
|
|
1156
1132
|
overflow: "hidden",
|
|
1157
1133
|
textOverflow: "ellipsis",
|