@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.
@@ -9,8 +9,8 @@ type StepClickType = ({ number, step, }: {
9
9
  number: number;
10
10
  step: StepType;
11
11
  }) => void;
12
- type StepperSize = "s" | "m";
13
- type ProgressStepSize = "s" | "m";
12
+ type StepperSize = "sm" | "md";
13
+ type ProgressStepSize = "sm" | "md";
14
14
  type ProgressStepItemState = "active" | "default" | "hover";
15
15
  interface ProgressStepItemProps {
16
16
  state?: ProgressStepItemState;
package/native/index.d.ts CHANGED
@@ -9,8 +9,8 @@ type StepClickType = ({ number, step, }: {
9
9
  number: number;
10
10
  step: StepType;
11
11
  }) => void;
12
- type StepperSize = "s" | "m";
13
- type ProgressStepSize = "s" | "m";
12
+ type StepperSize = "sm" | "md";
13
+ type ProgressStepSize = "sm" | "md";
14
14
  type ProgressStepItemState = "active" | "default" | "hover";
15
15
  interface ProgressStepItemProps {
16
16
  state?: ProgressStepItemState;
package/native/index.js CHANGED
@@ -584,8 +584,8 @@ var StepTail = ({
584
584
  if (variantUI !== "current" || isLast) {
585
585
  return null;
586
586
  }
587
- const tailSize = size === "s" ? 3 : 5;
588
- const verticalTailWidth = size === "s" ? 2 : 4;
587
+ const tailSize = size === "sm" ? 3 : 5;
588
+ const verticalTailWidth = size === "sm" ? 2 : 4;
589
589
  const isHorizontal = direction === "horizontal";
590
590
  let tailBgColor = "transparent";
591
591
  let tailHeight = tailSize;
@@ -989,7 +989,7 @@ var StepState = ({
989
989
  }
990
990
  }
991
991
  }, [state, variantUI, disabled, noClick, theme, paletteColor]);
992
- const iconSize = size === "s" ? 18 : 18;
992
+ const iconSize = 18;
993
993
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
994
994
  Box,
995
995
  {
@@ -1003,11 +1003,11 @@ var StepState = ({
1003
1003
  alignItems: "center",
1004
1004
  justifyContent: "center",
1005
1005
  flexShrink: 0,
1006
- children: state === "loading" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Spinner, { size: size === "s" ? 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)(
1006
+ 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)(
1007
1007
  Text,
1008
1008
  {
1009
1009
  color: iconStyles.color,
1010
- fontSize: size === "s" ? 12 : 14,
1010
+ fontSize: size === "sm" ? 12 : 14,
1011
1011
  fontWeight: "600",
1012
1012
  children: step
1013
1013
  }
@@ -1109,13 +1109,13 @@ var Step = ({
1109
1109
  const titleStyles = (0, import_react5.useMemo)(() => {
1110
1110
  if (variantUI === "simple") {
1111
1111
  const sizeStylesMap = {
1112
- s: {
1112
+ sm: {
1113
1113
  fontSize: 14,
1114
1114
  lineHeight: 22,
1115
1115
  paddingTop: 1,
1116
1116
  paddingBottom: 1
1117
1117
  },
1118
- m: {
1118
+ md: {
1119
1119
  fontSize: 16,
1120
1120
  lineHeight: 24,
1121
1121
  paddingTop: 4,
@@ -1166,12 +1166,12 @@ var Step = ({
1166
1166
  }, [variantUI, direction, size, state, theme, palette]);
1167
1167
  const descriptionStyles = (0, import_react5.useMemo)(() => {
1168
1168
  const sizeStylesMap = {
1169
- s: {
1169
+ sm: {
1170
1170
  fontSize: 12,
1171
1171
  lineHeight: variantUI === "simple" ? 20 : 18,
1172
1172
  marginTop: variantUI === "simple" ? 0 : 2
1173
1173
  },
1174
- m: {
1174
+ md: {
1175
1175
  fontSize: 14,
1176
1176
  lineHeight: variantUI === "simple" ? 22 : 20,
1177
1177
  marginTop: variantUI === "simple" ? 0 : 4
@@ -1191,22 +1191,22 @@ var Step = ({
1191
1191
  if (variantUI === "simple") {
1192
1192
  if (direction === "horizontal") {
1193
1193
  return {
1194
- marginLeft: size === "s" ? 8 : 12,
1194
+ marginLeft: size === "sm" ? 8 : 12,
1195
1195
  flex: 1
1196
1196
  };
1197
1197
  }
1198
1198
  return {
1199
- marginLeft: size === "s" ? 8 : 12
1199
+ marginLeft: size === "sm" ? 8 : 12
1200
1200
  };
1201
1201
  } else {
1202
1202
  const baseStyles = {
1203
- marginTop: size === "s" ? 10 : 12
1203
+ marginTop: size === "sm" ? 10 : 12
1204
1204
  };
1205
1205
  if (direction === "horizontal") {
1206
1206
  return {
1207
1207
  ...baseStyles,
1208
- paddingLeft: size === "s" ? 20 : 24,
1209
- paddingRight: size === "s" ? 20 : 24,
1208
+ paddingLeft: size === "sm" ? 20 : 24,
1209
+ paddingRight: size === "sm" ? 20 : 24,
1210
1210
  gap: 12
1211
1211
  };
1212
1212
  } else {
@@ -1222,14 +1222,14 @@ var Step = ({
1222
1222
  flex: 1,
1223
1223
  minWidth: 0,
1224
1224
  flexShrink: 0,
1225
- paddingBottom: size === "s" ? 27 : 37
1225
+ paddingBottom: size === "sm" ? 27 : 37
1226
1226
  };
1227
1227
  } else {
1228
1228
  return {
1229
- paddingTop: size === "s" ? 20 : 24,
1230
- paddingBottom: size === "s" ? 20 : 24,
1231
- paddingLeft: size === "s" ? 24 : 32,
1232
- paddingRight: size === "s" ? 10 : 10,
1229
+ paddingTop: size === "sm" ? 20 : 24,
1230
+ paddingBottom: size === "sm" ? 20 : 24,
1231
+ paddingLeft: size === "sm" ? 24 : 32,
1232
+ paddingRight: size === "sm" ? 10 : 10,
1233
1233
  minWidth: 184
1234
1234
  };
1235
1235
  }
@@ -1237,7 +1237,7 @@ var Step = ({
1237
1237
  if (direction === "horizontal") {
1238
1238
  return {
1239
1239
  flexShrink: 0,
1240
- marginRight: isLast ? 0 : size === "s" ? 8 : 12
1240
+ marginRight: isLast ? 0 : size === "sm" ? 8 : 12
1241
1241
  };
1242
1242
  } else {
1243
1243
  return {
@@ -1291,8 +1291,8 @@ var Step = ({
1291
1291
  alignItems: "flex-start",
1292
1292
  justifyContent: "flex-start",
1293
1293
  gap: 12,
1294
- paddingLeft: size === "s" ? 20 : 24,
1295
- paddingRight: size === "s" ? 20 : 24,
1294
+ paddingLeft: size === "sm" ? 20 : 24,
1295
+ paddingRight: size === "sm" ? 20 : 24,
1296
1296
  width: "100%",
1297
1297
  children: [
1298
1298
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box, { flexDirection: "column", alignItems: "flex-start", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
@@ -1398,8 +1398,8 @@ var Step = ({
1398
1398
  flexDirection: "row",
1399
1399
  alignItems: "center",
1400
1400
  width: "100%",
1401
- paddingTop: variantUI === "simple" ? size === "s" ? 1 : 4 : void 0,
1402
- paddingBottom: variantUI === "simple" ? size === "s" ? 1 : 4 : void 0,
1401
+ paddingTop: variantUI === "simple" ? size === "sm" ? 1 : 4 : void 0,
1402
+ paddingBottom: variantUI === "simple" ? size === "sm" ? 1 : 4 : void 0,
1403
1403
  children: [
1404
1404
  typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1405
1405
  Text,
@@ -1416,7 +1416,7 @@ var Step = ({
1416
1416
  Box,
1417
1417
  {
1418
1418
  flex: 1,
1419
- marginLeft: size === "s" ? 8 : 12,
1419
+ marginLeft: size === "sm" ? 8 : 12,
1420
1420
  alignItems: "center",
1421
1421
  justifyContent: "center",
1422
1422
  children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Divider, { color: theme.colors.border.secondary })
@@ -1484,8 +1484,8 @@ var Step = ({
1484
1484
  alignItems: "flex-start",
1485
1485
  justifyContent: "flex-start",
1486
1486
  gap: 12,
1487
- paddingTop: size === "s" ? 20 : 24,
1488
- paddingBottom: size === "s" ? 20 : 24,
1487
+ paddingTop: size === "sm" ? 20 : 24,
1488
+ paddingBottom: size === "sm" ? 20 : 24,
1489
1489
  flex: 1,
1490
1490
  children: [
1491
1491
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box, { flexDirection: "column", alignItems: "flex-start", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
@@ -1629,7 +1629,7 @@ var Stepper = (0, import_react6.forwardRef)(
1629
1629
  ({
1630
1630
  direction = "horizontal",
1631
1631
  variantUI = "current",
1632
- size = "m",
1632
+ size = "md",
1633
1633
  steps,
1634
1634
  tail = false,
1635
1635
  onClick,
@@ -1642,7 +1642,7 @@ var Stepper = (0, import_react6.forwardRef)(
1642
1642
  const { theme } = (0, import_xui_core3.useDesignSystem)();
1643
1643
  const isHorizontal = direction === "horizontal";
1644
1644
  const isCurrentVariant = variantUI === "current";
1645
- const tailSize = size === "s" ? 3 : 5;
1645
+ const tailSize = size === "sm" ? 3 : 5;
1646
1646
  const tailOffset = tailSize / 2;
1647
1647
  const defaultAriaLabel = `Stepper with ${steps.length} step${steps.length !== 1 ? "s" : ""}`;
1648
1648
  const stepperAriaLabel = ariaLabel || defaultAriaLabel;
@@ -1720,7 +1720,7 @@ var import_xui_core4 = require("@xsolla/xui-core");
1720
1720
  var import_jsx_runtime11 = require("react/jsx-runtime");
1721
1721
  var ProgressStepItem = ({
1722
1722
  state = "default",
1723
- size = "m",
1723
+ size = "md",
1724
1724
  className,
1725
1725
  onPress,
1726
1726
  onMouseEnter,
@@ -1729,7 +1729,7 @@ var ProgressStepItem = ({
1729
1729
  const { theme } = (0, import_xui_core4.useDesignSystem)();
1730
1730
  const isActive = state === "active";
1731
1731
  const isHover = state === "hover";
1732
- const isMD = size === "m";
1732
+ const isMD = size === "md";
1733
1733
  const width = isActive ? isMD ? 24 : 18 : isMD ? 8 : 6;
1734
1734
  const height = isMD ? 8 : 6;
1735
1735
  const borderRadius = isMD ? 2 : 1;
@@ -1761,7 +1761,7 @@ var import_jsx_runtime12 = require("react/jsx-runtime");
1761
1761
  var ProgressStep = ({
1762
1762
  count,
1763
1763
  activeStep,
1764
- size = "m",
1764
+ size = "md",
1765
1765
  arrows = true,
1766
1766
  onStepPress,
1767
1767
  className
@@ -1777,8 +1777,8 @@ var ProgressStep = ({
1777
1777
  onStepPress(activeStep + 1);
1778
1778
  }
1779
1779
  };
1780
- const arrowSize = size === "m" ? 24 : 18;
1781
- const iconSize = size === "m" ? 18 : 14;
1780
+ const arrowSize = size === "md" ? 24 : 18;
1781
+ const iconSize = size === "md" ? 18 : 14;
1782
1782
  const isFirst = activeStep <= 0;
1783
1783
  const isLast = activeStep >= count - 1;
1784
1784
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
@@ -1789,7 +1789,7 @@ var ProgressStep = ({
1789
1789
  alignItems: "center",
1790
1790
  justifyContent: "center",
1791
1791
  gap: 4,
1792
- height: size === "m" ? 24 : 18,
1792
+ height: size === "md" ? 24 : 18,
1793
1793
  children: [
1794
1794
  arrows && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1795
1795
  Box,