@xsolla/xui-stepper 0.138.0 → 0.138.1
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 +38 -40
- package/native/index.js.map +1 -1
- package/native/index.mjs +38 -40
- package/native/index.mjs.map +1 -1
- package/package.json +4 -4
- package/web/index.js +38 -40
- package/web/index.js.map +1 -1
- package/web/index.mjs +38 -40
- package/web/index.mjs.map +1 -1
package/web/index.js
CHANGED
|
@@ -391,6 +391,9 @@ var Divider = (props) => {
|
|
|
391
391
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(StyledDivider, { ...props });
|
|
392
392
|
};
|
|
393
393
|
|
|
394
|
+
// ../primitives-web/src/index.tsx
|
|
395
|
+
var isWeb = true;
|
|
396
|
+
|
|
394
397
|
// src/Stepper.tsx
|
|
395
398
|
var import_xui_core3 = require("@xsolla/xui-core");
|
|
396
399
|
|
|
@@ -433,11 +436,6 @@ var hexToRgba = (hex, opacity) => {
|
|
|
433
436
|
return hex;
|
|
434
437
|
};
|
|
435
438
|
|
|
436
|
-
// src/utils/platform.ts
|
|
437
|
-
var isWeb = () => {
|
|
438
|
-
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
439
|
-
};
|
|
440
|
-
|
|
441
439
|
// src/StepTail.tsx
|
|
442
440
|
var import_xui_core = require("@xsolla/xui-core");
|
|
443
441
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
@@ -469,7 +467,7 @@ var StepTail = ({
|
|
|
469
467
|
if (isFirstColoredTail && isLastColoredTail) {
|
|
470
468
|
borderRadius = 4;
|
|
471
469
|
} else if (isFirstColoredTail) {
|
|
472
|
-
if (isWeb
|
|
470
|
+
if (isWeb) {
|
|
473
471
|
borderRadiusStyle = isHorizontal ? { borderRadius: "4px 0 0 4px" } : { borderRadius: "4px 4px 0 0" };
|
|
474
472
|
} else {
|
|
475
473
|
if (isHorizontal) {
|
|
@@ -485,7 +483,7 @@ var StepTail = ({
|
|
|
485
483
|
}
|
|
486
484
|
}
|
|
487
485
|
} else if (isLastColoredTail) {
|
|
488
|
-
if (isWeb
|
|
486
|
+
if (isWeb) {
|
|
489
487
|
borderRadiusStyle = isHorizontal ? { borderRadius: "0 4px 4px 0" } : { borderRadius: "0 0 4px 4px" };
|
|
490
488
|
} else {
|
|
491
489
|
if (isHorizontal) {
|
|
@@ -562,7 +560,7 @@ var StepTail = ({
|
|
|
562
560
|
var import_react3 = require("react");
|
|
563
561
|
var useStepHoverStyles = (variantUI, state, className, theme, isLast, disabled, noClick, palette) => {
|
|
564
562
|
(0, import_react3.useEffect)(() => {
|
|
565
|
-
if (!isWeb
|
|
563
|
+
if (!isWeb) {
|
|
566
564
|
return;
|
|
567
565
|
}
|
|
568
566
|
const styleId = `step-hover-styles-${className}`;
|
|
@@ -1055,14 +1053,14 @@ var Step = ({
|
|
|
1055
1053
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1056
1054
|
Box,
|
|
1057
1055
|
{
|
|
1058
|
-
role: isWeb
|
|
1059
|
-
"aria-label": isWeb
|
|
1060
|
-
"aria-current": isWeb
|
|
1061
|
-
"aria-disabled": isWeb
|
|
1062
|
-
tabIndex: isWeb
|
|
1056
|
+
role: isWeb ? "button" : void 0,
|
|
1057
|
+
"aria-label": isWeb ? stepAriaLabel : void 0,
|
|
1058
|
+
"aria-current": isWeb && isCurrent ? "step" : void 0,
|
|
1059
|
+
"aria-disabled": isWeb && (disabled || noClick) ? true : void 0,
|
|
1060
|
+
tabIndex: isWeb && isInteractive ? 0 : void 0,
|
|
1063
1061
|
onPress: stepClick,
|
|
1064
|
-
onKeyDown: isWeb
|
|
1065
|
-
onKeyUp: isWeb
|
|
1062
|
+
onKeyDown: isWeb && isInteractive ? handleKeyDown : void 0,
|
|
1063
|
+
onKeyUp: isWeb && isInteractive ? handleKeyUp : void 0,
|
|
1066
1064
|
disabled,
|
|
1067
1065
|
"data-testid": "step",
|
|
1068
1066
|
className: stepClassName,
|
|
@@ -1071,7 +1069,7 @@ var Step = ({
|
|
|
1071
1069
|
justifyContent: "flex-start",
|
|
1072
1070
|
position: "relative",
|
|
1073
1071
|
...stepWrapperStyles,
|
|
1074
|
-
...isWeb
|
|
1072
|
+
...isWeb && {
|
|
1075
1073
|
cursor: disabled || noClick ? "default" : "pointer"
|
|
1076
1074
|
},
|
|
1077
1075
|
children: [
|
|
@@ -1161,21 +1159,21 @@ var Step = ({
|
|
|
1161
1159
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1162
1160
|
Box,
|
|
1163
1161
|
{
|
|
1164
|
-
role: isWeb
|
|
1165
|
-
"aria-label": isWeb
|
|
1166
|
-
"aria-current": isWeb
|
|
1167
|
-
"aria-disabled": isWeb
|
|
1168
|
-
tabIndex: isWeb
|
|
1162
|
+
role: isWeb ? "button" : void 0,
|
|
1163
|
+
"aria-label": isWeb ? stepAriaLabel : void 0,
|
|
1164
|
+
"aria-current": isWeb && isCurrent ? "step" : void 0,
|
|
1165
|
+
"aria-disabled": isWeb && (disabled || noClick) ? true : void 0,
|
|
1166
|
+
tabIndex: isWeb && isInteractive ? 0 : void 0,
|
|
1169
1167
|
onPress: stepClick,
|
|
1170
|
-
onKeyDown: isWeb
|
|
1171
|
-
onKeyUp: isWeb
|
|
1168
|
+
onKeyDown: isWeb && isInteractive ? handleKeyDown : void 0,
|
|
1169
|
+
onKeyUp: isWeb && isInteractive ? handleKeyUp : void 0,
|
|
1172
1170
|
disabled,
|
|
1173
1171
|
"data-testid": "step",
|
|
1174
1172
|
className: stepClassName,
|
|
1175
1173
|
flexDirection: "row",
|
|
1176
1174
|
alignItems: "flex-start",
|
|
1177
1175
|
...stepWrapperStyles,
|
|
1178
|
-
...isWeb
|
|
1176
|
+
...isWeb && {
|
|
1179
1177
|
cursor: disabled || noClick ? "default" : "pointer"
|
|
1180
1178
|
},
|
|
1181
1179
|
children: [
|
|
@@ -1249,14 +1247,14 @@ var Step = ({
|
|
|
1249
1247
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1250
1248
|
Box,
|
|
1251
1249
|
{
|
|
1252
|
-
role: isWeb
|
|
1253
|
-
"aria-label": isWeb
|
|
1254
|
-
"aria-current": isWeb
|
|
1255
|
-
"aria-disabled": isWeb
|
|
1256
|
-
tabIndex: isWeb
|
|
1250
|
+
role: isWeb ? "button" : void 0,
|
|
1251
|
+
"aria-label": isWeb ? stepAriaLabel : void 0,
|
|
1252
|
+
"aria-current": isWeb && isCurrent ? "step" : void 0,
|
|
1253
|
+
"aria-disabled": isWeb && (disabled || noClick) ? true : void 0,
|
|
1254
|
+
tabIndex: isWeb && isInteractive ? 0 : void 0,
|
|
1257
1255
|
onPress: stepClick,
|
|
1258
|
-
onKeyDown: isWeb
|
|
1259
|
-
onKeyUp: isWeb
|
|
1256
|
+
onKeyDown: isWeb && isInteractive ? handleKeyDown : void 0,
|
|
1257
|
+
onKeyUp: isWeb && isInteractive ? handleKeyUp : void 0,
|
|
1260
1258
|
disabled,
|
|
1261
1259
|
"data-testid": "step",
|
|
1262
1260
|
className: stepClassName,
|
|
@@ -1264,7 +1262,7 @@ var Step = ({
|
|
|
1264
1262
|
alignItems: "flex-start",
|
|
1265
1263
|
position: "relative",
|
|
1266
1264
|
...stepWrapperStyles,
|
|
1267
|
-
...isWeb
|
|
1265
|
+
...isWeb && {
|
|
1268
1266
|
cursor: disabled || noClick ? "default" : "pointer"
|
|
1269
1267
|
},
|
|
1270
1268
|
children: [
|
|
@@ -1353,21 +1351,21 @@ var Step = ({
|
|
|
1353
1351
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1354
1352
|
Box,
|
|
1355
1353
|
{
|
|
1356
|
-
role: isWeb
|
|
1357
|
-
"aria-label": isWeb
|
|
1358
|
-
"aria-current": isWeb
|
|
1359
|
-
"aria-disabled": isWeb
|
|
1360
|
-
tabIndex: isWeb
|
|
1354
|
+
role: isWeb ? "button" : void 0,
|
|
1355
|
+
"aria-label": isWeb ? stepAriaLabel : void 0,
|
|
1356
|
+
"aria-current": isWeb && isCurrent ? "step" : void 0,
|
|
1357
|
+
"aria-disabled": isWeb && (disabled || noClick) ? true : void 0,
|
|
1358
|
+
tabIndex: isWeb && isInteractive ? 0 : void 0,
|
|
1361
1359
|
onPress: stepClick,
|
|
1362
|
-
onKeyDown: isWeb
|
|
1363
|
-
onKeyUp: isWeb
|
|
1360
|
+
onKeyDown: isWeb && isInteractive ? handleKeyDown : void 0,
|
|
1361
|
+
onKeyUp: isWeb && isInteractive ? handleKeyUp : void 0,
|
|
1364
1362
|
disabled,
|
|
1365
1363
|
"data-testid": "step",
|
|
1366
1364
|
className: stepClassName,
|
|
1367
1365
|
flexDirection: "row",
|
|
1368
1366
|
alignItems: "flex-start",
|
|
1369
1367
|
...stepWrapperStyles,
|
|
1370
|
-
...isWeb
|
|
1368
|
+
...isWeb && { cursor: disabled || noClick ? "default" : "pointer" },
|
|
1371
1369
|
children: [
|
|
1372
1370
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box, { flexDirection: "column", alignItems: "center", flexShrink: 0, children: [
|
|
1373
1371
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|