@xsolla/xui-stepper 0.69.0 → 0.71.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.d.mts +2 -2
- package/native/index.d.ts +2 -2
- package/native/index.js +35 -35
- package/native/index.js.map +1 -1
- package/native/index.mjs +35 -35
- package/native/index.mjs.map +1 -1
- package/package.json +4 -4
- package/web/index.d.mts +2 -2
- package/web/index.d.ts +2 -2
- package/web/index.js +35 -35
- package/web/index.js.map +1 -1
- package/web/index.mjs +35 -35
- package/web/index.mjs.map +1 -1
package/web/index.js
CHANGED
|
@@ -555,8 +555,8 @@ var StepTail = ({
|
|
|
555
555
|
if (variantUI !== "current" || isLast) {
|
|
556
556
|
return null;
|
|
557
557
|
}
|
|
558
|
-
const tailSize = size === "
|
|
559
|
-
const verticalTailWidth = size === "
|
|
558
|
+
const tailSize = size === "sm" ? 3 : 5;
|
|
559
|
+
const verticalTailWidth = size === "sm" ? 2 : 4;
|
|
560
560
|
const isHorizontal = direction === "horizontal";
|
|
561
561
|
let tailBgColor = "transparent";
|
|
562
562
|
let tailHeight = tailSize;
|
|
@@ -960,7 +960,7 @@ var StepState = ({
|
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
962
|
}, [state, variantUI, disabled, noClick, theme, paletteColor]);
|
|
963
|
-
const iconSize =
|
|
963
|
+
const iconSize = 18;
|
|
964
964
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
965
965
|
Box,
|
|
966
966
|
{
|
|
@@ -974,11 +974,11 @@ var StepState = ({
|
|
|
974
974
|
alignItems: "center",
|
|
975
975
|
justifyContent: "center",
|
|
976
976
|
flexShrink: 0,
|
|
977
|
-
children: state === "loading" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Spinner, { size: size === "
|
|
977
|
+
children: state === "loading" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Spinner, { size: size === "sm" ? 16 : 20, color: iconStyles.color }) : state === "complete" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_xui_icons.Check, { size: iconSize, color: iconStyles.color }) : state === "alert" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_xui_icons.X, { size: iconSize, color: iconStyles.color }) : state === "warning" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_xui_icons.AlertCircle, { size: iconSize, color: iconStyles.color }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
978
978
|
Text,
|
|
979
979
|
{
|
|
980
980
|
color: iconStyles.color,
|
|
981
|
-
fontSize: size === "
|
|
981
|
+
fontSize: size === "sm" ? 12 : 14,
|
|
982
982
|
fontWeight: "600",
|
|
983
983
|
children: step
|
|
984
984
|
}
|
|
@@ -1080,13 +1080,13 @@ var Step = ({
|
|
|
1080
1080
|
const titleStyles = (0, import_react5.useMemo)(() => {
|
|
1081
1081
|
if (variantUI === "simple") {
|
|
1082
1082
|
const sizeStylesMap = {
|
|
1083
|
-
|
|
1083
|
+
sm: {
|
|
1084
1084
|
fontSize: 14,
|
|
1085
1085
|
lineHeight: 22,
|
|
1086
1086
|
paddingTop: 1,
|
|
1087
1087
|
paddingBottom: 1
|
|
1088
1088
|
},
|
|
1089
|
-
|
|
1089
|
+
md: {
|
|
1090
1090
|
fontSize: 16,
|
|
1091
1091
|
lineHeight: 24,
|
|
1092
1092
|
paddingTop: 4,
|
|
@@ -1137,12 +1137,12 @@ var Step = ({
|
|
|
1137
1137
|
}, [variantUI, direction, size, state, theme, palette]);
|
|
1138
1138
|
const descriptionStyles = (0, import_react5.useMemo)(() => {
|
|
1139
1139
|
const sizeStylesMap = {
|
|
1140
|
-
|
|
1140
|
+
sm: {
|
|
1141
1141
|
fontSize: 12,
|
|
1142
1142
|
lineHeight: variantUI === "simple" ? 20 : 18,
|
|
1143
1143
|
marginTop: variantUI === "simple" ? 0 : 2
|
|
1144
1144
|
},
|
|
1145
|
-
|
|
1145
|
+
md: {
|
|
1146
1146
|
fontSize: 14,
|
|
1147
1147
|
lineHeight: variantUI === "simple" ? 22 : 20,
|
|
1148
1148
|
marginTop: variantUI === "simple" ? 0 : 4
|
|
@@ -1162,22 +1162,22 @@ var Step = ({
|
|
|
1162
1162
|
if (variantUI === "simple") {
|
|
1163
1163
|
if (direction === "horizontal") {
|
|
1164
1164
|
return {
|
|
1165
|
-
marginLeft: size === "
|
|
1165
|
+
marginLeft: size === "sm" ? 8 : 12,
|
|
1166
1166
|
flex: 1
|
|
1167
1167
|
};
|
|
1168
1168
|
}
|
|
1169
1169
|
return {
|
|
1170
|
-
marginLeft: size === "
|
|
1170
|
+
marginLeft: size === "sm" ? 8 : 12
|
|
1171
1171
|
};
|
|
1172
1172
|
} else {
|
|
1173
1173
|
const baseStyles = {
|
|
1174
|
-
marginTop: size === "
|
|
1174
|
+
marginTop: size === "sm" ? 10 : 12
|
|
1175
1175
|
};
|
|
1176
1176
|
if (direction === "horizontal") {
|
|
1177
1177
|
return {
|
|
1178
1178
|
...baseStyles,
|
|
1179
|
-
paddingLeft: size === "
|
|
1180
|
-
paddingRight: size === "
|
|
1179
|
+
paddingLeft: size === "sm" ? 20 : 24,
|
|
1180
|
+
paddingRight: size === "sm" ? 20 : 24,
|
|
1181
1181
|
gap: 12
|
|
1182
1182
|
};
|
|
1183
1183
|
} else {
|
|
@@ -1193,14 +1193,14 @@ var Step = ({
|
|
|
1193
1193
|
flex: 1,
|
|
1194
1194
|
minWidth: 0,
|
|
1195
1195
|
flexShrink: 0,
|
|
1196
|
-
paddingBottom: size === "
|
|
1196
|
+
paddingBottom: size === "sm" ? 27 : 37
|
|
1197
1197
|
};
|
|
1198
1198
|
} else {
|
|
1199
1199
|
return {
|
|
1200
|
-
paddingTop: size === "
|
|
1201
|
-
paddingBottom: size === "
|
|
1202
|
-
paddingLeft: size === "
|
|
1203
|
-
paddingRight: size === "
|
|
1200
|
+
paddingTop: size === "sm" ? 20 : 24,
|
|
1201
|
+
paddingBottom: size === "sm" ? 20 : 24,
|
|
1202
|
+
paddingLeft: size === "sm" ? 24 : 32,
|
|
1203
|
+
paddingRight: size === "sm" ? 10 : 10,
|
|
1204
1204
|
minWidth: 184
|
|
1205
1205
|
};
|
|
1206
1206
|
}
|
|
@@ -1208,7 +1208,7 @@ var Step = ({
|
|
|
1208
1208
|
if (direction === "horizontal") {
|
|
1209
1209
|
return {
|
|
1210
1210
|
flexShrink: 0,
|
|
1211
|
-
marginRight: isLast ? 0 : size === "
|
|
1211
|
+
marginRight: isLast ? 0 : size === "sm" ? 8 : 12
|
|
1212
1212
|
};
|
|
1213
1213
|
} else {
|
|
1214
1214
|
return {
|
|
@@ -1262,8 +1262,8 @@ var Step = ({
|
|
|
1262
1262
|
alignItems: "flex-start",
|
|
1263
1263
|
justifyContent: "flex-start",
|
|
1264
1264
|
gap: 12,
|
|
1265
|
-
paddingLeft: size === "
|
|
1266
|
-
paddingRight: size === "
|
|
1265
|
+
paddingLeft: size === "sm" ? 20 : 24,
|
|
1266
|
+
paddingRight: size === "sm" ? 20 : 24,
|
|
1267
1267
|
width: "100%",
|
|
1268
1268
|
children: [
|
|
1269
1269
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box, { flexDirection: "column", alignItems: "flex-start", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
@@ -1369,8 +1369,8 @@ var Step = ({
|
|
|
1369
1369
|
flexDirection: "row",
|
|
1370
1370
|
alignItems: "center",
|
|
1371
1371
|
width: "100%",
|
|
1372
|
-
paddingTop: variantUI === "simple" ? size === "
|
|
1373
|
-
paddingBottom: variantUI === "simple" ? size === "
|
|
1372
|
+
paddingTop: variantUI === "simple" ? size === "sm" ? 1 : 4 : void 0,
|
|
1373
|
+
paddingBottom: variantUI === "simple" ? size === "sm" ? 1 : 4 : void 0,
|
|
1374
1374
|
children: [
|
|
1375
1375
|
typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1376
1376
|
Text,
|
|
@@ -1387,7 +1387,7 @@ var Step = ({
|
|
|
1387
1387
|
Box,
|
|
1388
1388
|
{
|
|
1389
1389
|
flex: 1,
|
|
1390
|
-
marginLeft: size === "
|
|
1390
|
+
marginLeft: size === "sm" ? 8 : 12,
|
|
1391
1391
|
alignItems: "center",
|
|
1392
1392
|
justifyContent: "center",
|
|
1393
1393
|
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Divider, { color: theme.colors.border.secondary })
|
|
@@ -1455,8 +1455,8 @@ var Step = ({
|
|
|
1455
1455
|
alignItems: "flex-start",
|
|
1456
1456
|
justifyContent: "flex-start",
|
|
1457
1457
|
gap: 12,
|
|
1458
|
-
paddingTop: size === "
|
|
1459
|
-
paddingBottom: size === "
|
|
1458
|
+
paddingTop: size === "sm" ? 20 : 24,
|
|
1459
|
+
paddingBottom: size === "sm" ? 20 : 24,
|
|
1460
1460
|
flex: 1,
|
|
1461
1461
|
children: [
|
|
1462
1462
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box, { flexDirection: "column", alignItems: "flex-start", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
@@ -1600,7 +1600,7 @@ var Stepper = (0, import_react6.forwardRef)(
|
|
|
1600
1600
|
({
|
|
1601
1601
|
direction = "horizontal",
|
|
1602
1602
|
variantUI = "current",
|
|
1603
|
-
size = "
|
|
1603
|
+
size = "md",
|
|
1604
1604
|
steps,
|
|
1605
1605
|
tail = false,
|
|
1606
1606
|
onClick,
|
|
@@ -1613,7 +1613,7 @@ var Stepper = (0, import_react6.forwardRef)(
|
|
|
1613
1613
|
const { theme } = (0, import_xui_core3.useDesignSystem)();
|
|
1614
1614
|
const isHorizontal = direction === "horizontal";
|
|
1615
1615
|
const isCurrentVariant = variantUI === "current";
|
|
1616
|
-
const tailSize = size === "
|
|
1616
|
+
const tailSize = size === "sm" ? 3 : 5;
|
|
1617
1617
|
const tailOffset = tailSize / 2;
|
|
1618
1618
|
const defaultAriaLabel = `Stepper with ${steps.length} step${steps.length !== 1 ? "s" : ""}`;
|
|
1619
1619
|
const stepperAriaLabel = ariaLabel || defaultAriaLabel;
|
|
@@ -1691,7 +1691,7 @@ var import_xui_core4 = require("@xsolla/xui-core");
|
|
|
1691
1691
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1692
1692
|
var ProgressStepItem = ({
|
|
1693
1693
|
state = "default",
|
|
1694
|
-
size = "
|
|
1694
|
+
size = "md",
|
|
1695
1695
|
className,
|
|
1696
1696
|
onPress,
|
|
1697
1697
|
onMouseEnter,
|
|
@@ -1700,7 +1700,7 @@ var ProgressStepItem = ({
|
|
|
1700
1700
|
const { theme } = (0, import_xui_core4.useDesignSystem)();
|
|
1701
1701
|
const isActive = state === "active";
|
|
1702
1702
|
const isHover = state === "hover";
|
|
1703
|
-
const isMD = size === "
|
|
1703
|
+
const isMD = size === "md";
|
|
1704
1704
|
const width = isActive ? isMD ? 24 : 18 : isMD ? 8 : 6;
|
|
1705
1705
|
const height = isMD ? 8 : 6;
|
|
1706
1706
|
const borderRadius = isMD ? 2 : 1;
|
|
@@ -1732,7 +1732,7 @@ var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
|
1732
1732
|
var ProgressStep = ({
|
|
1733
1733
|
count,
|
|
1734
1734
|
activeStep,
|
|
1735
|
-
size = "
|
|
1735
|
+
size = "md",
|
|
1736
1736
|
arrows = true,
|
|
1737
1737
|
onStepPress,
|
|
1738
1738
|
className
|
|
@@ -1748,8 +1748,8 @@ var ProgressStep = ({
|
|
|
1748
1748
|
onStepPress(activeStep + 1);
|
|
1749
1749
|
}
|
|
1750
1750
|
};
|
|
1751
|
-
const arrowSize = size === "
|
|
1752
|
-
const iconSize = size === "
|
|
1751
|
+
const arrowSize = size === "md" ? 24 : 18;
|
|
1752
|
+
const iconSize = size === "md" ? 18 : 14;
|
|
1753
1753
|
const isFirst = activeStep <= 0;
|
|
1754
1754
|
const isLast = activeStep >= count - 1;
|
|
1755
1755
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
@@ -1760,7 +1760,7 @@ var ProgressStep = ({
|
|
|
1760
1760
|
alignItems: "center",
|
|
1761
1761
|
justifyContent: "center",
|
|
1762
1762
|
gap: 4,
|
|
1763
|
-
height: size === "
|
|
1763
|
+
height: size === "md" ? 24 : 18,
|
|
1764
1764
|
children: [
|
|
1765
1765
|
arrows && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1766
1766
|
Box,
|