@xsolla/xui-stepper 0.64.0-pr56.1768440195

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/web/index.js ADDED
@@ -0,0 +1,1813 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.tsx
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ ProgressStep: () => ProgressStep,
34
+ ProgressStepItem: () => ProgressStepItem,
35
+ Step: () => Step,
36
+ Stepper: () => Stepper
37
+ });
38
+ module.exports = __toCommonJS(index_exports);
39
+
40
+ // src/Stepper.tsx
41
+ var import_react6 = require("react");
42
+
43
+ // ../primitives-web/src/Box.tsx
44
+ var import_react = __toESM(require("react"));
45
+ var import_styled_components = __toESM(require("styled-components"));
46
+ var import_jsx_runtime = require("react/jsx-runtime");
47
+ var StyledBox = import_styled_components.default.div`
48
+ display: flex;
49
+ box-sizing: border-box;
50
+ background-color: ${(props) => props.backgroundColor || "transparent"};
51
+ border-color: ${(props) => props.borderColor || "transparent"};
52
+ border-width: ${(props) => typeof props.borderWidth === "number" ? `${props.borderWidth}px` : props.borderWidth || 0};
53
+
54
+ ${(props) => props.borderBottomWidth !== void 0 && `
55
+ border-bottom-width: ${typeof props.borderBottomWidth === "number" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};
56
+ border-bottom-color: ${props.borderBottomColor || props.borderColor || "transparent"};
57
+ border-bottom-style: solid;
58
+ `}
59
+ ${(props) => props.borderTopWidth !== void 0 && `
60
+ border-top-width: ${typeof props.borderTopWidth === "number" ? `${props.borderTopWidth}px` : props.borderTopWidth};
61
+ border-top-color: ${props.borderTopColor || props.borderColor || "transparent"};
62
+ border-top-style: solid;
63
+ `}
64
+ ${(props) => props.borderLeftWidth !== void 0 && `
65
+ border-left-width: ${typeof props.borderLeftWidth === "number" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};
66
+ border-left-color: ${props.borderLeftColor || props.borderColor || "transparent"};
67
+ border-left-style: solid;
68
+ `}
69
+ ${(props) => props.borderRightWidth !== void 0 && `
70
+ border-right-width: ${typeof props.borderRightWidth === "number" ? `${props.borderRightWidth}px` : props.borderRightWidth};
71
+ border-right-color: ${props.borderRightColor || props.borderColor || "transparent"};
72
+ border-right-style: solid;
73
+ `}
74
+
75
+ border-style: ${(props) => props.borderStyle || (props.borderWidth || props.borderBottomWidth || props.borderTopWidth || props.borderLeftWidth || props.borderRightWidth ? "solid" : "none")};
76
+ border-radius: ${(props) => typeof props.borderRadius === "number" ? `${props.borderRadius}px` : props.borderRadius || 0};
77
+ height: ${(props) => typeof props.height === "number" ? `${props.height}px` : props.height || "auto"};
78
+ width: ${(props) => typeof props.width === "number" ? `${props.width}px` : props.width || "auto"};
79
+ min-width: ${(props) => typeof props.minWidth === "number" ? `${props.minWidth}px` : props.minWidth || "auto"};
80
+ min-height: ${(props) => typeof props.minHeight === "number" ? `${props.minHeight}px` : props.minHeight || "auto"};
81
+
82
+ padding: ${(props) => typeof props.padding === "number" ? `${props.padding}px` : props.padding || 0};
83
+ ${(props) => props.paddingHorizontal && `
84
+ padding-left: ${typeof props.paddingHorizontal === "number" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};
85
+ padding-right: ${typeof props.paddingHorizontal === "number" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};
86
+ `}
87
+ ${(props) => props.paddingVertical && `
88
+ padding-top: ${typeof props.paddingVertical === "number" ? `${props.paddingVertical}px` : props.paddingVertical};
89
+ padding-bottom: ${typeof props.paddingVertical === "number" ? `${props.paddingVertical}px` : props.paddingVertical};
90
+ `}
91
+ ${(props) => props.paddingTop !== void 0 && `padding-top: ${typeof props.paddingTop === "number" ? `${props.paddingTop}px` : props.paddingTop};`}
92
+ ${(props) => props.paddingBottom !== void 0 && `padding-bottom: ${typeof props.paddingBottom === "number" ? `${props.paddingBottom}px` : props.paddingBottom};`}
93
+ ${(props) => props.paddingLeft !== void 0 && `padding-left: ${typeof props.paddingLeft === "number" ? `${props.paddingLeft}px` : props.paddingLeft};`}
94
+ ${(props) => props.paddingRight !== void 0 && `padding-right: ${typeof props.paddingRight === "number" ? `${props.paddingRight}px` : props.paddingRight};`}
95
+
96
+ margin: ${(props) => typeof props.margin === "number" ? `${props.margin}px` : props.margin || 0};
97
+ ${(props) => props.marginTop !== void 0 && `margin-top: ${typeof props.marginTop === "number" ? `${props.marginTop}px` : props.marginTop};`}
98
+ ${(props) => props.marginBottom !== void 0 && `margin-bottom: ${typeof props.marginBottom === "number" ? `${props.marginBottom}px` : props.marginBottom};`}
99
+ ${(props) => props.marginLeft !== void 0 && `margin-left: ${typeof props.marginLeft === "number" ? `${props.marginLeft}px` : props.marginLeft};`}
100
+ ${(props) => props.marginRight !== void 0 && `margin-right: ${typeof props.marginRight === "number" ? `${props.marginRight}px` : props.marginRight};`}
101
+
102
+ flex-direction: ${(props) => props.flexDirection || "column"};
103
+ flex-wrap: ${(props) => props.flexWrap || "nowrap"};
104
+ align-items: ${(props) => props.alignItems || "stretch"};
105
+ justify-content: ${(props) => props.justifyContent || "flex-start"};
106
+ cursor: ${(props) => props.cursor ? props.cursor : props.onClick || props.onPress ? "pointer" : "inherit"};
107
+ position: ${(props) => props.position || "static"};
108
+ top: ${(props) => typeof props.top === "number" ? `${props.top}px` : props.top};
109
+ bottom: ${(props) => typeof props.bottom === "number" ? `${props.bottom}px` : props.bottom};
110
+ left: ${(props) => typeof props.left === "number" ? `${props.left}px` : props.left};
111
+ right: ${(props) => typeof props.right === "number" ? `${props.right}px` : props.right};
112
+ flex: ${(props) => props.flex};
113
+ flex-shrink: ${(props) => props.flexShrink ?? 1};
114
+ gap: ${(props) => typeof props.gap === "number" ? `${props.gap}px` : props.gap || 0};
115
+ align-self: ${(props) => props.alignSelf || "auto"};
116
+ overflow: ${(props) => props.overflow || "visible"};
117
+ overflow-x: ${(props) => props.overflowX || "visible"};
118
+ overflow-y: ${(props) => props.overflowY || "visible"};
119
+ z-index: ${(props) => props.zIndex};
120
+ opacity: ${(props) => props.disabled ? 0.5 : 1};
121
+ pointer-events: ${(props) => props.disabled ? "none" : "auto"};
122
+
123
+ &:hover {
124
+ ${(props) => props.hoverStyle?.backgroundColor && `background-color: ${props.hoverStyle.backgroundColor};`}
125
+ ${(props) => props.hoverStyle?.borderColor && `border-color: ${props.hoverStyle.borderColor};`}
126
+ }
127
+
128
+ &:active {
129
+ ${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
130
+ }
131
+ `;
132
+ var Box = import_react.default.forwardRef(
133
+ ({
134
+ children,
135
+ onPress,
136
+ onKeyDown,
137
+ onKeyUp,
138
+ role,
139
+ "aria-label": ariaLabel,
140
+ "aria-labelledby": ariaLabelledBy,
141
+ "aria-current": ariaCurrent,
142
+ "aria-disabled": ariaDisabled,
143
+ "aria-live": ariaLive,
144
+ "aria-busy": ariaBusy,
145
+ "aria-describedby": ariaDescribedBy,
146
+ "aria-expanded": ariaExpanded,
147
+ "aria-haspopup": ariaHasPopup,
148
+ "aria-pressed": ariaPressed,
149
+ "aria-controls": ariaControls,
150
+ tabIndex,
151
+ as,
152
+ src,
153
+ alt,
154
+ type,
155
+ disabled,
156
+ id,
157
+ ...props
158
+ }, ref) => {
159
+ if (as === "img" && src) {
160
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
161
+ "img",
162
+ {
163
+ src,
164
+ alt: alt || "",
165
+ style: {
166
+ display: "block",
167
+ objectFit: "cover",
168
+ width: typeof props.width === "number" ? `${props.width}px` : props.width,
169
+ height: typeof props.height === "number" ? `${props.height}px` : props.height,
170
+ borderRadius: typeof props.borderRadius === "number" ? `${props.borderRadius}px` : props.borderRadius,
171
+ position: props.position,
172
+ top: typeof props.top === "number" ? `${props.top}px` : props.top,
173
+ left: typeof props.left === "number" ? `${props.left}px` : props.left,
174
+ right: typeof props.right === "number" ? `${props.right}px` : props.right,
175
+ bottom: typeof props.bottom === "number" ? `${props.bottom}px` : props.bottom
176
+ }
177
+ }
178
+ );
179
+ }
180
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
181
+ StyledBox,
182
+ {
183
+ ref,
184
+ as,
185
+ id,
186
+ type: as === "button" ? type || "button" : void 0,
187
+ disabled: as === "button" ? disabled : void 0,
188
+ onClick: onPress,
189
+ onKeyDown,
190
+ onKeyUp,
191
+ role,
192
+ "aria-label": ariaLabel,
193
+ "aria-labelledby": ariaLabelledBy,
194
+ "aria-current": ariaCurrent,
195
+ "aria-disabled": ariaDisabled,
196
+ "aria-busy": ariaBusy,
197
+ "aria-describedby": ariaDescribedBy,
198
+ "aria-expanded": ariaExpanded,
199
+ "aria-haspopup": ariaHasPopup,
200
+ "aria-pressed": ariaPressed,
201
+ "aria-controls": ariaControls,
202
+ "aria-live": ariaLive,
203
+ tabIndex: tabIndex !== void 0 ? tabIndex : void 0,
204
+ ...props,
205
+ children
206
+ }
207
+ );
208
+ }
209
+ );
210
+ Box.displayName = "Box";
211
+
212
+ // ../primitives-web/src/Text.tsx
213
+ var import_styled_components2 = __toESM(require("styled-components"));
214
+ var import_jsx_runtime2 = require("react/jsx-runtime");
215
+ var StyledText = import_styled_components2.default.span`
216
+ color: ${(props) => props.color || "inherit"};
217
+ font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
218
+ font-weight: ${(props) => props.fontWeight || "normal"};
219
+ font-family: ${(props) => props.fontFamily || '"Pilat Wide Bold", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important'};
220
+ line-height: ${(props) => typeof props.lineHeight === "number" ? `${props.lineHeight}px` : props.lineHeight || "inherit"};
221
+ white-space: ${(props) => props.whiteSpace || "normal"};
222
+ text-align: ${(props) => props.textAlign || "inherit"};
223
+ text-decoration: ${(props) => props.textDecoration || "none"};
224
+ `;
225
+ var Text = ({
226
+ style,
227
+ className,
228
+ id,
229
+ role,
230
+ ...props
231
+ }) => {
232
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
233
+ StyledText,
234
+ {
235
+ ...props,
236
+ style,
237
+ className,
238
+ id,
239
+ role
240
+ }
241
+ );
242
+ };
243
+
244
+ // ../primitives-web/src/Spinner.tsx
245
+ var import_styled_components3 = __toESM(require("styled-components"));
246
+ var import_jsx_runtime3 = require("react/jsx-runtime");
247
+ var rotate = import_styled_components3.keyframes`
248
+ from {
249
+ transform: rotate(0deg);
250
+ }
251
+ to {
252
+ transform: rotate(360deg);
253
+ }
254
+ `;
255
+ var StyledSpinner = import_styled_components3.default.div`
256
+ width: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
257
+ height: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
258
+ border: ${(props) => props.strokeWidth || 2}px solid
259
+ ${(props) => props.color || "currentColor"};
260
+ border-bottom-color: transparent;
261
+ border-radius: 50%;
262
+ display: inline-block;
263
+ box-sizing: border-box;
264
+ animation: ${rotate} 1s linear infinite;
265
+ `;
266
+ var Spinner = ({
267
+ role = "status",
268
+ "aria-label": ariaLabel,
269
+ "aria-live": ariaLive = "polite",
270
+ "aria-describedby": ariaDescribedBy,
271
+ testID,
272
+ ...props
273
+ }) => {
274
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
275
+ StyledSpinner,
276
+ {
277
+ role,
278
+ "aria-label": ariaLabel,
279
+ "aria-live": ariaLive,
280
+ "aria-describedby": ariaDescribedBy,
281
+ "data-testid": testID,
282
+ ...props
283
+ }
284
+ );
285
+ };
286
+ Spinner.displayName = "Spinner";
287
+
288
+ // ../primitives-web/src/Icon.tsx
289
+ var import_styled_components4 = __toESM(require("styled-components"));
290
+ var import_jsx_runtime4 = require("react/jsx-runtime");
291
+ var StyledIcon = import_styled_components4.default.div`
292
+ display: flex;
293
+ align-items: center;
294
+ justify-content: center;
295
+ width: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
296
+ height: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
297
+ color: ${(props) => props.color || "currentColor"};
298
+
299
+ svg {
300
+ width: 100%;
301
+ height: 100%;
302
+ fill: none;
303
+ stroke: currentColor;
304
+ }
305
+ `;
306
+
307
+ // ../primitives-web/src/Divider.tsx
308
+ var import_styled_components5 = __toESM(require("styled-components"));
309
+ var import_jsx_runtime5 = require("react/jsx-runtime");
310
+ var StyledDivider = import_styled_components5.default.div`
311
+ background-color: ${(props) => props.dashStroke ? "transparent" : props.color || "rgba(255, 255, 255, 0.15)"};
312
+ width: ${(props) => props.vertical ? typeof props.width === "number" ? `${props.width}px` : props.width || "1px" : "100%"};
313
+ height: ${(props) => props.vertical ? "100%" : typeof props.height === "number" ? `${props.height}px` : props.height || "1px"};
314
+
315
+ ${(props) => props.dashStroke && `
316
+ border-style: dashed;
317
+ border-color: ${props.color || "rgba(255, 255, 255, 0.15)"};
318
+ border-width: 0;
319
+ ${props.vertical ? `
320
+ border-left-width: ${typeof props.width === "number" ? `${props.width}px` : props.width || "1px"};
321
+ height: 100%;
322
+ ` : `
323
+ border-top-width: ${typeof props.height === "number" ? `${props.height}px` : props.height || "1px"};
324
+ width: 100%;
325
+ `}
326
+ `}
327
+ `;
328
+ var Divider = (props) => {
329
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StyledDivider, { ...props });
330
+ };
331
+
332
+ // ../primitives-web/src/Input.tsx
333
+ var import_react2 = require("react");
334
+ var import_styled_components6 = __toESM(require("styled-components"));
335
+ var import_jsx_runtime6 = require("react/jsx-runtime");
336
+ var StyledInput = import_styled_components6.default.input`
337
+ background: transparent;
338
+ border: none;
339
+ outline: none;
340
+ width: 100%;
341
+ height: 100%;
342
+ padding: 0;
343
+ margin: 0;
344
+ color: ${(props) => props.color || "inherit"};
345
+ font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
346
+ font-family: inherit;
347
+ text-align: inherit;
348
+
349
+ &::placeholder {
350
+ color: ${(props) => props.placeholderTextColor || "rgba(255, 255, 255, 0.5)"};
351
+ }
352
+
353
+ &:disabled {
354
+ cursor: not-allowed;
355
+ }
356
+ `;
357
+ var InputPrimitive = (0, import_react2.forwardRef)(
358
+ ({
359
+ value,
360
+ placeholder,
361
+ onChange,
362
+ onChangeText,
363
+ onFocus,
364
+ onBlur,
365
+ onKeyDown,
366
+ disabled,
367
+ secureTextEntry,
368
+ style,
369
+ color,
370
+ fontSize,
371
+ placeholderTextColor,
372
+ maxLength,
373
+ name,
374
+ type,
375
+ inputMode,
376
+ autoComplete,
377
+ id,
378
+ "aria-invalid": ariaInvalid,
379
+ "aria-describedby": ariaDescribedBy,
380
+ "aria-labelledby": ariaLabelledBy,
381
+ "aria-label": ariaLabel,
382
+ "aria-disabled": ariaDisabled,
383
+ "data-testid": dataTestId,
384
+ ...rest
385
+ }, ref) => {
386
+ const handleChange = (e) => {
387
+ if (onChange) {
388
+ onChange(e);
389
+ }
390
+ if (onChangeText) {
391
+ onChangeText(e.target.value);
392
+ }
393
+ };
394
+ const inputValue = value !== void 0 ? value : "";
395
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
396
+ StyledInput,
397
+ {
398
+ ref,
399
+ id,
400
+ value: inputValue,
401
+ name,
402
+ placeholder,
403
+ onChange: handleChange,
404
+ onFocus,
405
+ onBlur,
406
+ onKeyDown,
407
+ disabled,
408
+ type: secureTextEntry ? "password" : type || "text",
409
+ inputMode,
410
+ autoComplete,
411
+ style,
412
+ color,
413
+ fontSize,
414
+ placeholderTextColor,
415
+ maxLength,
416
+ "aria-invalid": ariaInvalid,
417
+ "aria-describedby": ariaDescribedBy,
418
+ "aria-labelledby": ariaLabelledBy,
419
+ "aria-label": ariaLabel,
420
+ "aria-disabled": ariaDisabled,
421
+ "data-testid": dataTestId,
422
+ ...rest
423
+ }
424
+ );
425
+ }
426
+ );
427
+ InputPrimitive.displayName = "InputPrimitive";
428
+
429
+ // ../primitives-web/src/TextArea.tsx
430
+ var import_react3 = require("react");
431
+ var import_styled_components7 = __toESM(require("styled-components"));
432
+ var import_jsx_runtime7 = require("react/jsx-runtime");
433
+ var StyledTextArea = import_styled_components7.default.textarea`
434
+ background: transparent;
435
+ border: none;
436
+ outline: none;
437
+ width: 100%;
438
+ height: 100%;
439
+ padding: 0;
440
+ margin: 0;
441
+ color: ${(props) => props.color || "inherit"};
442
+ font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
443
+ font-family: inherit;
444
+ text-align: inherit;
445
+ resize: none;
446
+
447
+ &::placeholder {
448
+ color: ${(props) => props.placeholderTextColor || "rgba(255, 255, 255, 0.5)"};
449
+ }
450
+
451
+ &:disabled {
452
+ cursor: not-allowed;
453
+ }
454
+ `;
455
+ var TextAreaPrimitive = (0, import_react3.forwardRef)(
456
+ ({
457
+ value,
458
+ placeholder,
459
+ onChangeText,
460
+ onFocus,
461
+ onBlur,
462
+ onKeyDown,
463
+ disabled,
464
+ style,
465
+ color,
466
+ fontSize,
467
+ placeholderTextColor,
468
+ maxLength,
469
+ rows
470
+ }, ref) => {
471
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
472
+ StyledTextArea,
473
+ {
474
+ ref,
475
+ value,
476
+ placeholder,
477
+ onChange: (e) => onChangeText?.(e.target.value),
478
+ onFocus,
479
+ onBlur,
480
+ onKeyDown,
481
+ disabled,
482
+ style,
483
+ color,
484
+ fontSize,
485
+ placeholderTextColor,
486
+ maxLength,
487
+ rows
488
+ }
489
+ );
490
+ }
491
+ );
492
+ TextAreaPrimitive.displayName = "TextAreaPrimitive";
493
+
494
+ // src/Stepper.tsx
495
+ var import_xui_core3 = require("@xsolla/xui-core");
496
+
497
+ // src/Step.tsx
498
+ var import_react5 = require("react");
499
+ var import_xui_core2 = require("@xsolla/xui-core");
500
+ var import_xui_icons = require("@xsolla/xui-icons");
501
+
502
+ // src/utils/colors.ts
503
+ var getPaletteColor = (palette, theme, type = "text") => {
504
+ const fallback = type === "active" ? "#00d4ff" : "#00d4ff";
505
+ if (palette === "brand") {
506
+ const brandText2 = theme.colors?.content?.brand?.secondary;
507
+ const brandActive2 = theme.colors?.control?.brand?.primary?.bgHover || brandText2;
508
+ if (type === "active") {
509
+ return brandActive2 || fallback;
510
+ }
511
+ return brandText2 || fallback;
512
+ }
513
+ if (palette === "brandSecondary") {
514
+ const extraText = theme.colors?.content?.brandExtra?.primary;
515
+ const extraActive = theme.colors?.control?.brandExtra?.primary?.bgHover || extraText;
516
+ if (type === "active") {
517
+ return extraActive || "#d9ff66";
518
+ }
519
+ return extraText || "#d9ff66";
520
+ }
521
+ const brandText = theme.colors?.content?.brand?.secondary;
522
+ const brandActive = theme.colors?.control?.brand?.primary?.bgHover || brandText;
523
+ return (type === "active" ? brandActive : brandText) || fallback;
524
+ };
525
+ var hexToRgba = (hex, opacity) => {
526
+ const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
527
+ if (result) {
528
+ const r = parseInt(result[1], 16);
529
+ const g = parseInt(result[2], 16);
530
+ const b = parseInt(result[3], 16);
531
+ return `rgba(${r}, ${g}, ${b}, ${opacity})`;
532
+ }
533
+ return hex;
534
+ };
535
+
536
+ // src/utils/platform.ts
537
+ var isWeb = () => {
538
+ return typeof window !== "undefined" && typeof document !== "undefined";
539
+ };
540
+
541
+ // src/StepTail.tsx
542
+ var import_xui_core = require("@xsolla/xui-core");
543
+ var import_jsx_runtime8 = require("react/jsx-runtime");
544
+ var StepTail = ({
545
+ variantUI,
546
+ direction,
547
+ size,
548
+ state,
549
+ isLast,
550
+ isFirstColoredTail,
551
+ isLastColoredTail,
552
+ palette
553
+ }) => {
554
+ const { theme } = (0, import_xui_core.useDesignSystem)();
555
+ if (variantUI !== "current" || isLast) {
556
+ return null;
557
+ }
558
+ const tailSize = size === "sm" ? 3 : 5;
559
+ const verticalTailWidth = size === "sm" ? 2 : 4;
560
+ const isHorizontal = direction === "horizontal";
561
+ let tailBgColor = "transparent";
562
+ let tailHeight = tailSize;
563
+ let tailWidth = tailSize;
564
+ let borderRadius = 0;
565
+ let borderRadiusStyle;
566
+ try {
567
+ if (isFirstColoredTail && isLastColoredTail) {
568
+ borderRadius = 4;
569
+ } else if (isFirstColoredTail) {
570
+ if (isWeb()) {
571
+ borderRadiusStyle = isHorizontal ? { borderRadius: "4px 0 0 4px" } : { borderRadius: "4px 4px 0 0" };
572
+ } else {
573
+ if (isHorizontal) {
574
+ borderRadiusStyle = {
575
+ borderTopLeftRadius: 4,
576
+ borderBottomLeftRadius: 4
577
+ };
578
+ } else {
579
+ borderRadiusStyle = {
580
+ borderTopLeftRadius: 4,
581
+ borderTopRightRadius: 4
582
+ };
583
+ }
584
+ }
585
+ } else if (isLastColoredTail) {
586
+ if (isWeb()) {
587
+ borderRadiusStyle = isHorizontal ? { borderRadius: "0 4px 4px 0" } : { borderRadius: "0 0 4px 4px" };
588
+ } else {
589
+ if (isHorizontal) {
590
+ borderRadiusStyle = {
591
+ borderTopRightRadius: 4,
592
+ borderBottomRightRadius: 4
593
+ };
594
+ } else {
595
+ borderRadiusStyle = {
596
+ borderBottomLeftRadius: 4,
597
+ borderBottomRightRadius: 4
598
+ };
599
+ }
600
+ }
601
+ }
602
+ if (state === "current" || state === "loading") {
603
+ tailBgColor = getPaletteColor(palette, theme, "active");
604
+ tailHeight = tailSize;
605
+ tailWidth = isHorizontal ? tailSize : verticalTailWidth;
606
+ } else if (state === "alert") {
607
+ tailBgColor = theme.colors.content.alert.primary;
608
+ tailHeight = tailSize;
609
+ tailWidth = isHorizontal ? tailSize : verticalTailWidth;
610
+ } else if (state === "warning") {
611
+ tailBgColor = theme.colors.content.warning.primary;
612
+ tailHeight = tailSize;
613
+ tailWidth = isHorizontal ? tailSize : verticalTailWidth;
614
+ } else if (state === "complete") {
615
+ return null;
616
+ } else {
617
+ const paletteColor = getPaletteColor(palette, theme, "active");
618
+ tailBgColor = hexToRgba(paletteColor, 0.15);
619
+ tailHeight = 2;
620
+ tailWidth = isHorizontal ? 2 : 2;
621
+ borderRadius = 0;
622
+ }
623
+ } catch {
624
+ return null;
625
+ }
626
+ const borderOffset = isHorizontal ? -(tailHeight / 2 + 0.5) : -3;
627
+ if (isHorizontal) {
628
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
629
+ Box,
630
+ {
631
+ position: "absolute",
632
+ bottom: borderOffset,
633
+ left: 0,
634
+ width: "100%",
635
+ height: tailHeight,
636
+ backgroundColor: tailBgColor,
637
+ borderRadius,
638
+ zIndex: 1,
639
+ style: borderRadiusStyle
640
+ }
641
+ );
642
+ }
643
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
644
+ Box,
645
+ {
646
+ position: "absolute",
647
+ top: 0,
648
+ left: borderOffset,
649
+ height: "100%",
650
+ width: tailWidth,
651
+ backgroundColor: tailBgColor,
652
+ borderRadius,
653
+ zIndex: 1,
654
+ style: borderRadiusStyle
655
+ }
656
+ );
657
+ };
658
+
659
+ // src/hooks/useStepHoverStyles.ts
660
+ var import_react4 = require("react");
661
+ var useStepHoverStyles = (variantUI, state, className, theme, isLast, disabled, noClick, palette) => {
662
+ (0, import_react4.useEffect)(() => {
663
+ if (!isWeb()) {
664
+ return;
665
+ }
666
+ const styleId = `step-hover-styles-${className}`;
667
+ let styleElement = document.getElementById(
668
+ styleId
669
+ );
670
+ if (!styleElement) {
671
+ styleElement = document.createElement("style");
672
+ styleElement.id = styleId;
673
+ document.head.appendChild(styleElement);
674
+ }
675
+ const getHoverTextColor = () => {
676
+ if (state === "alert") {
677
+ return theme.colors.content.alert.primary;
678
+ } else if (state === "warning") {
679
+ return theme.colors.content.warning.primary;
680
+ } else {
681
+ return getPaletteColor(palette, theme, "text");
682
+ }
683
+ };
684
+ let hoverCss = "";
685
+ if (!disabled && !noClick) {
686
+ const hoverTextColor = getHoverTextColor();
687
+ const hoverPaletteColor = getPaletteColor(palette, theme, "active");
688
+ let circleHoverCss = "";
689
+ if (isLast) {
690
+ const whiteColor = theme.colors.content.static.light;
691
+ circleHoverCss = `
692
+ .step-icon-${className} {
693
+ background-color: ${hoverPaletteColor} !important;
694
+ border-color: ${hoverPaletteColor} !important;
695
+ color: ${whiteColor} !important;
696
+ }
697
+ `;
698
+ } else {
699
+ if (variantUI === "simple") {
700
+ if (state === "incomplete") {
701
+ const whiteColor = theme.colors.content.static.light;
702
+ circleHoverCss = `
703
+ .step-icon-${className} {
704
+ background-color: ${hoverPaletteColor} !important;
705
+ border-color: ${hoverPaletteColor} !important;
706
+ color: ${whiteColor} !important;
707
+ }
708
+ `;
709
+ } else if (state === "complete") {
710
+ circleHoverCss = `
711
+ .step-icon-${className} {
712
+ border-color: ${hoverPaletteColor} !important;
713
+ color: ${hoverPaletteColor} !important;
714
+ }
715
+ `;
716
+ } else if (state === "loading") {
717
+ circleHoverCss = `
718
+ .step-icon-${className} {
719
+ color: ${hoverPaletteColor} !important;
720
+ }
721
+ `;
722
+ }
723
+ } else {
724
+ if (state === "incomplete") {
725
+ const whiteColor = theme.colors.content.static.light;
726
+ circleHoverCss = `
727
+ .step-icon-${className} {
728
+ background-color: ${hoverPaletteColor} !important;
729
+ border-color: ${hoverPaletteColor} !important;
730
+ color: ${whiteColor} !important;
731
+ }
732
+ `;
733
+ } else if (state === "complete") {
734
+ circleHoverCss = `
735
+ .step-icon-${className} {
736
+ border-color: ${hoverPaletteColor} !important;
737
+ color: ${hoverPaletteColor} !important;
738
+ }
739
+ `;
740
+ } else if (state === "loading") {
741
+ circleHoverCss = `
742
+ .step-icon-${className} {
743
+ color: ${hoverPaletteColor} !important;
744
+ }
745
+ `;
746
+ }
747
+ }
748
+ }
749
+ hoverCss = `
750
+ &:hover {
751
+ .step-title-${className} {
752
+ color: ${hoverTextColor} !important;
753
+ }
754
+ .step-description-${className} {
755
+ color: ${hoverTextColor} !important;
756
+ }
757
+ ${circleHoverCss}
758
+ }
759
+ `;
760
+ }
761
+ const css = `
762
+ .${className} {
763
+ ${hoverCss}
764
+ }
765
+ `;
766
+ styleElement.textContent = css;
767
+ return () => {
768
+ if (styleElement && styleElement.parentNode) {
769
+ styleElement.parentNode.removeChild(styleElement);
770
+ }
771
+ };
772
+ }, [variantUI, state, className, isLast, disabled, noClick, palette, theme]);
773
+ };
774
+
775
+ // src/Step.tsx
776
+ var import_jsx_runtime9 = require("react/jsx-runtime");
777
+ var StepState = ({
778
+ state,
779
+ size,
780
+ step,
781
+ variantUI,
782
+ disabled,
783
+ noClick,
784
+ palette,
785
+ theme,
786
+ mode,
787
+ sizeStyles,
788
+ className,
789
+ isLast = false
790
+ }) => {
791
+ const paletteColor = getPaletteColor(palette, theme, "active");
792
+ const paletteTextColor = getPaletteColor(palette, theme, "text");
793
+ const iconStyles = (0, import_react5.useMemo)(() => {
794
+ if (variantUI === "simple") {
795
+ switch (state) {
796
+ case "current":
797
+ return {
798
+ backgroundColor: paletteColor,
799
+ borderColor: paletteColor,
800
+ color: theme.colors.content.static.light
801
+ };
802
+ case "incomplete":
803
+ return {
804
+ backgroundColor: "transparent",
805
+ borderColor: theme.colors.control.input.bgDisable,
806
+ color: theme.colors.control.input.textDisable
807
+ };
808
+ case "loading":
809
+ const loadingBg = hexToRgba(paletteColor, 0.05);
810
+ return {
811
+ backgroundColor: loadingBg,
812
+ borderColor: "transparent",
813
+ color: paletteColor
814
+ };
815
+ case "complete":
816
+ return {
817
+ backgroundColor: "transparent",
818
+ borderColor: paletteColor,
819
+ color: paletteColor
820
+ };
821
+ case "alert":
822
+ return {
823
+ backgroundColor: theme.colors.content.alert.primary,
824
+ borderColor: theme.colors.content.alert.primary,
825
+ color: theme.colors.content.static.light
826
+ };
827
+ case "warning":
828
+ return {
829
+ backgroundColor: theme.colors.content.warning.primary,
830
+ borderColor: theme.colors.content.warning.primary,
831
+ color: theme.colors.content.static.light
832
+ };
833
+ default:
834
+ return {
835
+ backgroundColor: "transparent",
836
+ borderColor: theme.colors.control.input.bgDisable,
837
+ color: theme.colors.control.input.textDisable
838
+ };
839
+ }
840
+ } else {
841
+ switch (state) {
842
+ case "current":
843
+ return {
844
+ backgroundColor: paletteColor,
845
+ borderColor: paletteColor,
846
+ color: theme.colors.content.static.light
847
+ };
848
+ case "incomplete":
849
+ if (mode === "light") {
850
+ return {
851
+ backgroundColor: theme.colors.content.static.dark,
852
+ borderColor: theme.colors.content.static.dark,
853
+ color: theme.colors.content.static.light
854
+ };
855
+ } else {
856
+ return {
857
+ backgroundColor: theme.colors.content.static.light,
858
+ borderColor: theme.colors.content.static.light,
859
+ color: theme.colors.content.static.dark
860
+ };
861
+ }
862
+ case "loading":
863
+ const loadingBg = hexToRgba(paletteColor, 0.05);
864
+ return {
865
+ backgroundColor: loadingBg,
866
+ borderColor: "transparent",
867
+ color: paletteColor
868
+ };
869
+ case "complete":
870
+ return {
871
+ backgroundColor: paletteColor,
872
+ borderColor: paletteColor,
873
+ color: theme.colors.content.static.light
874
+ };
875
+ case "alert":
876
+ return {
877
+ backgroundColor: theme.colors.content.alert.primary,
878
+ borderColor: theme.colors.content.alert.primary,
879
+ color: theme.colors.content.static.light
880
+ };
881
+ case "warning":
882
+ return {
883
+ backgroundColor: theme.colors.content.warning.primary,
884
+ borderColor: theme.colors.content.warning.primary,
885
+ color: theme.colors.content.static.light
886
+ };
887
+ default:
888
+ return {
889
+ backgroundColor: theme.colors.control.input.bg,
890
+ borderColor: theme.colors.control.input.bg,
891
+ color: theme.colors.control.brand.primary.text.primary
892
+ };
893
+ }
894
+ }
895
+ }, [state, variantUI, theme, paletteColor]);
896
+ const iconHoverStyles = (0, import_react5.useMemo)(() => {
897
+ if (disabled || noClick) return {};
898
+ if (variantUI === "simple") {
899
+ if (isLast) {
900
+ return {
901
+ backgroundColor: paletteColor,
902
+ borderColor: paletteColor,
903
+ color: theme.colors.content.static.light,
904
+ opacity: 0.9
905
+ };
906
+ }
907
+ switch (state) {
908
+ case "current":
909
+ return {
910
+ backgroundColor: paletteColor,
911
+ borderColor: paletteColor,
912
+ opacity: 0.9
913
+ };
914
+ case "incomplete":
915
+ return {
916
+ borderColor: paletteColor,
917
+ color: paletteColor,
918
+ opacity: 0.9
919
+ };
920
+ case "loading":
921
+ return {
922
+ color: paletteColor,
923
+ opacity: 0.9
924
+ };
925
+ case "complete":
926
+ return {
927
+ borderColor: paletteColor,
928
+ color: paletteColor,
929
+ opacity: 0.9
930
+ };
931
+ case "alert":
932
+ case "warning":
933
+ return {};
934
+ default:
935
+ return {};
936
+ }
937
+ } else {
938
+ switch (state) {
939
+ case "current":
940
+ return {
941
+ backgroundColor: theme.colors.control.brand.primary.bgHover
942
+ };
943
+ case "incomplete":
944
+ return {
945
+ backgroundColor: theme.colors.control.input.bgHover || theme.colors.control.input.bg
946
+ };
947
+ case "loading":
948
+ return {
949
+ color: theme.colors.control.brand.primary.bgHover
950
+ };
951
+ case "complete":
952
+ return {
953
+ backgroundColor: theme.colors.control.brand.primary.bgHover
954
+ };
955
+ case "alert":
956
+ case "warning":
957
+ return {};
958
+ default:
959
+ return {};
960
+ }
961
+ }
962
+ }, [state, variantUI, disabled, noClick, theme, paletteColor]);
963
+ const iconSize = size === "sm" ? 18 : 18;
964
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
965
+ Box,
966
+ {
967
+ className,
968
+ width: sizeStyles.iconSize,
969
+ height: sizeStyles.iconSize,
970
+ borderRadius: sizeStyles.iconSize / 2,
971
+ backgroundColor: iconStyles.backgroundColor,
972
+ borderColor: iconStyles.borderColor,
973
+ borderWidth: iconStyles.borderColor !== "transparent" ? 1 : 0,
974
+ alignItems: "center",
975
+ justifyContent: "center",
976
+ flexShrink: 0,
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
+ Text,
979
+ {
980
+ color: iconStyles.color,
981
+ fontSize: size === "sm" ? 12 : 14,
982
+ fontWeight: "600",
983
+ children: step
984
+ }
985
+ )
986
+ }
987
+ );
988
+ };
989
+ var Step = ({
990
+ title,
991
+ state = "incomplete",
992
+ description,
993
+ size,
994
+ onClick,
995
+ tail,
996
+ stepNumber,
997
+ disabled = false,
998
+ direction,
999
+ variantUI,
1000
+ noClick = false,
1001
+ palette = "brand",
1002
+ isLast = false,
1003
+ isFirstColoredTail = false,
1004
+ isLastColoredTail = false
1005
+ }) => {
1006
+ const { theme, mode } = (0, import_xui_core2.useDesignSystem)();
1007
+ const sizeStyles = theme.sizing.stepper(size);
1008
+ const stepClassName = (0, import_react5.useMemo)(
1009
+ () => `step-${stepNumber}-${variantUI}-${direction}-${size}-${state}-${palette}`,
1010
+ [stepNumber, variantUI, direction, size, state, palette]
1011
+ );
1012
+ useStepHoverStyles(
1013
+ variantUI,
1014
+ state,
1015
+ stepClassName,
1016
+ theme,
1017
+ isLast,
1018
+ disabled,
1019
+ noClick,
1020
+ palette
1021
+ );
1022
+ const stepClick = (0, import_react5.useCallback)(() => {
1023
+ if (onClick && !disabled && !noClick) {
1024
+ onClick({
1025
+ number: stepNumber,
1026
+ step: {
1027
+ title,
1028
+ description,
1029
+ state,
1030
+ disabled
1031
+ }
1032
+ });
1033
+ }
1034
+ }, [onClick, disabled, noClick, stepNumber, title, description, state]);
1035
+ const stepAriaLabel = (0, import_react5.useMemo)(() => {
1036
+ const stepNum = stepNumber + 1;
1037
+ const titleText = typeof title === "string" ? title : "Step";
1038
+ const descriptionText = description && typeof description === "string" ? description : "";
1039
+ const stateText = {
1040
+ current: "current",
1041
+ incomplete: "incomplete",
1042
+ loading: "loading",
1043
+ complete: "complete",
1044
+ alert: "alert",
1045
+ warning: "warning"
1046
+ }[state] || "incomplete";
1047
+ let label = `Step ${stepNum}: ${titleText}`;
1048
+ if (descriptionText) {
1049
+ label += `, ${descriptionText}`;
1050
+ }
1051
+ label += `, ${stateText}`;
1052
+ if (isLast) {
1053
+ label += ", last step";
1054
+ }
1055
+ return label;
1056
+ }, [stepNumber, title, description, state, isLast]);
1057
+ const handleKeyDown = (0, import_react5.useCallback)(
1058
+ (event) => {
1059
+ if (event.key === "Enter" && !disabled && !noClick) {
1060
+ event.preventDefault();
1061
+ stepClick();
1062
+ }
1063
+ if (event.key === " " && !disabled && !noClick) {
1064
+ event.preventDefault();
1065
+ }
1066
+ },
1067
+ [stepClick, disabled, noClick]
1068
+ );
1069
+ const handleKeyUp = (0, import_react5.useCallback)(
1070
+ (event) => {
1071
+ if (event.key === " " && !disabled && !noClick) {
1072
+ event.preventDefault();
1073
+ stepClick();
1074
+ }
1075
+ },
1076
+ [stepClick, disabled, noClick]
1077
+ );
1078
+ const isInteractive = !disabled && !noClick && !!onClick;
1079
+ const isCurrent = state === "current";
1080
+ const titleStyles = (0, import_react5.useMemo)(() => {
1081
+ if (variantUI === "simple") {
1082
+ const sizeStylesMap = {
1083
+ sm: {
1084
+ fontSize: 14,
1085
+ lineHeight: 22,
1086
+ paddingTop: 1,
1087
+ paddingBottom: 1
1088
+ },
1089
+ md: {
1090
+ fontSize: 16,
1091
+ lineHeight: 24,
1092
+ paddingTop: 4,
1093
+ paddingBottom: 4
1094
+ }
1095
+ };
1096
+ return {
1097
+ ...sizeStylesMap[size],
1098
+ color: state === "incomplete" ? theme.colors.control.input.textDisable : theme.colors.content.primary,
1099
+ fontWeight: "500"
1100
+ };
1101
+ } else {
1102
+ const sizeDirectionStyles = {
1103
+ sm_horizontal: {
1104
+ fontSize: 16,
1105
+ lineHeight: 20,
1106
+ fontWeight: "500"
1107
+ },
1108
+ md_horizontal: {
1109
+ fontSize: 18,
1110
+ lineHeight: 24,
1111
+ fontWeight: "500"
1112
+ },
1113
+ sm_vertical: {
1114
+ fontSize: 18,
1115
+ lineHeight: 20,
1116
+ fontWeight: "500"
1117
+ },
1118
+ md_vertical: {
1119
+ fontSize: 18,
1120
+ lineHeight: 24,
1121
+ fontWeight: "500"
1122
+ }
1123
+ };
1124
+ const stateColors = {
1125
+ incomplete: theme.colors.content.secondary,
1126
+ current: getPaletteColor(palette, theme, "text"),
1127
+ loading: getPaletteColor(palette, theme, "text"),
1128
+ alert: theme.colors.content.primary,
1129
+ warning: theme.colors.content.primary,
1130
+ complete: theme.colors.content.primary
1131
+ };
1132
+ return {
1133
+ ...sizeDirectionStyles[`${size}_${direction}`],
1134
+ color: stateColors[state] || theme.colors.content.primary
1135
+ };
1136
+ }
1137
+ }, [variantUI, direction, size, state, theme, palette]);
1138
+ const descriptionStyles = (0, import_react5.useMemo)(() => {
1139
+ const sizeStylesMap = {
1140
+ sm: {
1141
+ fontSize: 12,
1142
+ lineHeight: variantUI === "simple" ? 20 : 18,
1143
+ marginTop: variantUI === "simple" ? 0 : 2
1144
+ },
1145
+ md: {
1146
+ fontSize: 14,
1147
+ lineHeight: variantUI === "simple" ? 22 : 20,
1148
+ marginTop: variantUI === "simple" ? 0 : 4
1149
+ }
1150
+ };
1151
+ let descriptionColor = theme.colors.content.secondary;
1152
+ if (variantUI === "current" && (state === "incomplete" || !state)) {
1153
+ descriptionColor = theme.colors.content.tertiary || "rgba(24, 23, 28, 0.5)";
1154
+ }
1155
+ return {
1156
+ ...sizeStylesMap[size],
1157
+ color: descriptionColor,
1158
+ fontWeight: "400"
1159
+ };
1160
+ }, [size, variantUI, state, theme]);
1161
+ const contentWrapperStyles = (0, import_react5.useMemo)(() => {
1162
+ if (variantUI === "simple") {
1163
+ if (direction === "horizontal") {
1164
+ return {
1165
+ marginLeft: size === "sm" ? 8 : 12,
1166
+ flex: 1
1167
+ };
1168
+ }
1169
+ return {
1170
+ marginLeft: size === "sm" ? 8 : 12
1171
+ };
1172
+ } else {
1173
+ const baseStyles = {
1174
+ marginTop: size === "sm" ? 10 : 12
1175
+ };
1176
+ if (direction === "horizontal") {
1177
+ return {
1178
+ ...baseStyles,
1179
+ paddingLeft: size === "sm" ? 20 : 24,
1180
+ paddingRight: size === "sm" ? 20 : 24,
1181
+ gap: 12
1182
+ };
1183
+ } else {
1184
+ return {};
1185
+ }
1186
+ return baseStyles;
1187
+ }
1188
+ }, [variantUI, direction, size]);
1189
+ const stepWrapperStyles = (0, import_react5.useMemo)(() => {
1190
+ if (variantUI === "current") {
1191
+ if (direction === "horizontal") {
1192
+ return {
1193
+ flex: 1,
1194
+ minWidth: 0,
1195
+ flexShrink: 0,
1196
+ paddingBottom: size === "sm" ? 27 : 37
1197
+ };
1198
+ } else {
1199
+ return {
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
+ minWidth: 184
1205
+ };
1206
+ }
1207
+ } else {
1208
+ if (direction === "horizontal") {
1209
+ return {
1210
+ flexShrink: 0,
1211
+ marginRight: isLast ? 0 : size === "sm" ? 8 : 12
1212
+ };
1213
+ } else {
1214
+ return {
1215
+ marginBottom: isLast ? 0 : 8,
1216
+ minHeight: 56
1217
+ };
1218
+ }
1219
+ }
1220
+ }, [variantUI, direction, size, isLast]);
1221
+ if (variantUI === "current" && direction === "horizontal") {
1222
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1223
+ Box,
1224
+ {
1225
+ role: isWeb() ? "button" : void 0,
1226
+ "aria-label": isWeb() ? stepAriaLabel : void 0,
1227
+ "aria-current": isWeb() && isCurrent ? "step" : void 0,
1228
+ "aria-disabled": isWeb() && (disabled || noClick) ? true : void 0,
1229
+ tabIndex: isWeb() && isInteractive ? 0 : void 0,
1230
+ onPress: stepClick,
1231
+ onKeyDown: isWeb() && isInteractive ? handleKeyDown : void 0,
1232
+ onKeyUp: isWeb() && isInteractive ? handleKeyUp : void 0,
1233
+ disabled,
1234
+ "data-testid": "step",
1235
+ className: stepClassName,
1236
+ flexDirection: "column",
1237
+ alignItems: "flex-start",
1238
+ justifyContent: "flex-start",
1239
+ position: "relative",
1240
+ ...stepWrapperStyles,
1241
+ ...isWeb() && {
1242
+ cursor: disabled || noClick ? "default" : "pointer"
1243
+ },
1244
+ children: [
1245
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1246
+ StepTail,
1247
+ {
1248
+ variantUI,
1249
+ direction,
1250
+ size,
1251
+ state,
1252
+ isLast,
1253
+ isFirstColoredTail,
1254
+ isLastColoredTail,
1255
+ palette
1256
+ }
1257
+ ),
1258
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1259
+ Box,
1260
+ {
1261
+ flexDirection: "column",
1262
+ alignItems: "flex-start",
1263
+ justifyContent: "flex-start",
1264
+ gap: 12,
1265
+ paddingLeft: size === "sm" ? 20 : 24,
1266
+ paddingRight: size === "sm" ? 20 : 24,
1267
+ width: "100%",
1268
+ children: [
1269
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box, { flexDirection: "column", alignItems: "flex-start", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1270
+ StepState,
1271
+ {
1272
+ state,
1273
+ size,
1274
+ step: stepNumber + 1,
1275
+ variantUI,
1276
+ disabled,
1277
+ noClick,
1278
+ palette,
1279
+ theme,
1280
+ mode,
1281
+ sizeStyles,
1282
+ className: `step-icon-${stepClassName}`,
1283
+ isLast
1284
+ }
1285
+ ) }),
1286
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1287
+ Box,
1288
+ {
1289
+ flexDirection: "column",
1290
+ alignItems: "flex-start",
1291
+ justifyContent: "flex-start",
1292
+ gap: 4,
1293
+ width: "100%",
1294
+ children: [
1295
+ typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1296
+ Text,
1297
+ {
1298
+ className: `step-title-${stepClassName}`,
1299
+ color: titleStyles.color,
1300
+ fontSize: titleStyles.fontSize,
1301
+ fontWeight: titleStyles.fontWeight,
1302
+ lineHeight: titleStyles.lineHeight,
1303
+ children: title
1304
+ }
1305
+ ) : title,
1306
+ description && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box, { width: "100%", alignItems: "flex-start", children: typeof description === "string" || typeof description === "number" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1307
+ Text,
1308
+ {
1309
+ className: `step-description-${stepClassName}`,
1310
+ color: descriptionStyles.color,
1311
+ fontSize: descriptionStyles.fontSize,
1312
+ fontWeight: descriptionStyles.fontWeight,
1313
+ lineHeight: descriptionStyles.lineHeight,
1314
+ children: description
1315
+ }
1316
+ ) : description })
1317
+ ]
1318
+ }
1319
+ )
1320
+ ]
1321
+ }
1322
+ )
1323
+ ]
1324
+ }
1325
+ );
1326
+ }
1327
+ if (variantUI === "simple" && direction === "horizontal") {
1328
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1329
+ Box,
1330
+ {
1331
+ role: isWeb() ? "button" : void 0,
1332
+ "aria-label": isWeb() ? stepAriaLabel : void 0,
1333
+ "aria-current": isWeb() && isCurrent ? "step" : void 0,
1334
+ "aria-disabled": isWeb() && (disabled || noClick) ? true : void 0,
1335
+ tabIndex: isWeb() && isInteractive ? 0 : void 0,
1336
+ onPress: stepClick,
1337
+ onKeyDown: isWeb() && isInteractive ? handleKeyDown : void 0,
1338
+ onKeyUp: isWeb() && isInteractive ? handleKeyUp : void 0,
1339
+ disabled,
1340
+ "data-testid": "step",
1341
+ className: stepClassName,
1342
+ flexDirection: "row",
1343
+ alignItems: "flex-start",
1344
+ ...stepWrapperStyles,
1345
+ ...isWeb() && {
1346
+ cursor: disabled || noClick ? "default" : "pointer"
1347
+ },
1348
+ children: [
1349
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1350
+ StepState,
1351
+ {
1352
+ state,
1353
+ size,
1354
+ step: stepNumber + 1,
1355
+ variantUI,
1356
+ disabled,
1357
+ noClick,
1358
+ palette,
1359
+ theme,
1360
+ mode,
1361
+ sizeStyles,
1362
+ isLast
1363
+ }
1364
+ ) }),
1365
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Box, { ...contentWrapperStyles, children: [
1366
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1367
+ Box,
1368
+ {
1369
+ flexDirection: "row",
1370
+ alignItems: "center",
1371
+ width: "100%",
1372
+ paddingTop: variantUI === "simple" ? size === "sm" ? 1 : 4 : void 0,
1373
+ paddingBottom: variantUI === "simple" ? size === "sm" ? 1 : 4 : void 0,
1374
+ children: [
1375
+ typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1376
+ Text,
1377
+ {
1378
+ className: `step-title-${stepClassName}`,
1379
+ color: titleStyles.color,
1380
+ fontSize: titleStyles.fontSize,
1381
+ fontWeight: titleStyles.fontWeight,
1382
+ lineHeight: titleStyles.lineHeight,
1383
+ children: title
1384
+ }
1385
+ ) : title,
1386
+ tail && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1387
+ Box,
1388
+ {
1389
+ flex: 1,
1390
+ marginLeft: size === "sm" ? 8 : 12,
1391
+ alignItems: "center",
1392
+ justifyContent: "center",
1393
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Divider, { color: theme.colors.border.secondary })
1394
+ }
1395
+ )
1396
+ ]
1397
+ }
1398
+ ),
1399
+ description && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box, { children: typeof description === "string" || typeof description === "number" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1400
+ Text,
1401
+ {
1402
+ className: `step-description-${stepClassName}`,
1403
+ color: descriptionStyles.color,
1404
+ fontSize: descriptionStyles.fontSize,
1405
+ fontWeight: descriptionStyles.fontWeight,
1406
+ lineHeight: descriptionStyles.lineHeight,
1407
+ children: description
1408
+ }
1409
+ ) : description })
1410
+ ] })
1411
+ ]
1412
+ }
1413
+ );
1414
+ }
1415
+ if (variantUI === "current" && direction === "vertical") {
1416
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1417
+ Box,
1418
+ {
1419
+ role: isWeb() ? "button" : void 0,
1420
+ "aria-label": isWeb() ? stepAriaLabel : void 0,
1421
+ "aria-current": isWeb() && isCurrent ? "step" : void 0,
1422
+ "aria-disabled": isWeb() && (disabled || noClick) ? true : void 0,
1423
+ tabIndex: isWeb() && isInteractive ? 0 : void 0,
1424
+ onPress: stepClick,
1425
+ onKeyDown: isWeb() && isInteractive ? handleKeyDown : void 0,
1426
+ onKeyUp: isWeb() && isInteractive ? handleKeyUp : void 0,
1427
+ disabled,
1428
+ "data-testid": "step",
1429
+ className: stepClassName,
1430
+ flexDirection: "row",
1431
+ alignItems: "flex-start",
1432
+ position: "relative",
1433
+ ...stepWrapperStyles,
1434
+ ...isWeb() && {
1435
+ cursor: disabled || noClick ? "default" : "pointer"
1436
+ },
1437
+ children: [
1438
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1439
+ StepTail,
1440
+ {
1441
+ variantUI,
1442
+ direction,
1443
+ size,
1444
+ state,
1445
+ isLast,
1446
+ isFirstColoredTail,
1447
+ isLastColoredTail,
1448
+ palette
1449
+ }
1450
+ ),
1451
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1452
+ Box,
1453
+ {
1454
+ flexDirection: "column",
1455
+ alignItems: "flex-start",
1456
+ justifyContent: "flex-start",
1457
+ gap: 12,
1458
+ paddingTop: size === "sm" ? 20 : 24,
1459
+ paddingBottom: size === "sm" ? 20 : 24,
1460
+ flex: 1,
1461
+ children: [
1462
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box, { flexDirection: "column", alignItems: "flex-start", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1463
+ StepState,
1464
+ {
1465
+ state,
1466
+ size,
1467
+ step: stepNumber + 1,
1468
+ variantUI,
1469
+ disabled,
1470
+ noClick,
1471
+ palette,
1472
+ theme,
1473
+ mode,
1474
+ sizeStyles,
1475
+ className: `step-icon-${stepClassName}`,
1476
+ isLast
1477
+ }
1478
+ ) }),
1479
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1480
+ Box,
1481
+ {
1482
+ flexDirection: "column",
1483
+ alignItems: "flex-start",
1484
+ justifyContent: "flex-start",
1485
+ gap: 4,
1486
+ width: "100%",
1487
+ children: [
1488
+ typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1489
+ Text,
1490
+ {
1491
+ className: `step-title-${stepClassName}`,
1492
+ color: titleStyles.color,
1493
+ fontSize: titleStyles.fontSize,
1494
+ fontWeight: titleStyles.fontWeight,
1495
+ lineHeight: titleStyles.lineHeight,
1496
+ children: title
1497
+ }
1498
+ ) : title,
1499
+ description && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box, { children: typeof description === "string" || typeof description === "number" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1500
+ Text,
1501
+ {
1502
+ className: `step-description-${stepClassName}`,
1503
+ color: descriptionStyles.color,
1504
+ fontSize: descriptionStyles.fontSize,
1505
+ fontWeight: descriptionStyles.fontWeight,
1506
+ lineHeight: descriptionStyles.lineHeight,
1507
+ children: description
1508
+ }
1509
+ ) : description })
1510
+ ]
1511
+ }
1512
+ )
1513
+ ]
1514
+ }
1515
+ )
1516
+ ]
1517
+ }
1518
+ );
1519
+ }
1520
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1521
+ Box,
1522
+ {
1523
+ role: isWeb() ? "button" : void 0,
1524
+ "aria-label": isWeb() ? stepAriaLabel : void 0,
1525
+ "aria-current": isWeb() && isCurrent ? "step" : void 0,
1526
+ "aria-disabled": isWeb() && (disabled || noClick) ? true : void 0,
1527
+ tabIndex: isWeb() && isInteractive ? 0 : void 0,
1528
+ onPress: stepClick,
1529
+ onKeyDown: isWeb() && isInteractive ? handleKeyDown : void 0,
1530
+ onKeyUp: isWeb() && isInteractive ? handleKeyUp : void 0,
1531
+ disabled,
1532
+ "data-testid": "step",
1533
+ className: stepClassName,
1534
+ flexDirection: "row",
1535
+ alignItems: "flex-start",
1536
+ ...stepWrapperStyles,
1537
+ ...isWeb() && { cursor: disabled || noClick ? "default" : "pointer" },
1538
+ children: [
1539
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Box, { flexDirection: "column", alignItems: "center", flexShrink: 0, children: [
1540
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1541
+ StepState,
1542
+ {
1543
+ state,
1544
+ size,
1545
+ step: stepNumber + 1,
1546
+ variantUI,
1547
+ disabled,
1548
+ noClick,
1549
+ palette,
1550
+ theme,
1551
+ mode,
1552
+ sizeStyles
1553
+ }
1554
+ ),
1555
+ tail && !isLast && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1556
+ Box,
1557
+ {
1558
+ width: 1,
1559
+ flex: 1,
1560
+ minHeight: 24,
1561
+ marginTop: 8,
1562
+ alignItems: "stretch",
1563
+ justifyContent: "flex-start",
1564
+ position: "relative",
1565
+ backgroundColor: theme.colors.border.secondary
1566
+ }
1567
+ )
1568
+ ] }),
1569
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Box, { ...contentWrapperStyles, flex: 1, children: [
1570
+ typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1571
+ Text,
1572
+ {
1573
+ color: titleStyles.color,
1574
+ fontSize: titleStyles.fontSize,
1575
+ fontWeight: titleStyles.fontWeight,
1576
+ lineHeight: titleStyles.lineHeight,
1577
+ children: title
1578
+ }
1579
+ ) : title,
1580
+ description && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Box, { marginTop: descriptionStyles.marginTop, children: typeof description === "string" || typeof description === "number" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1581
+ Text,
1582
+ {
1583
+ color: descriptionStyles.color,
1584
+ fontSize: descriptionStyles.fontSize,
1585
+ fontWeight: descriptionStyles.fontWeight,
1586
+ lineHeight: descriptionStyles.lineHeight,
1587
+ children: description
1588
+ }
1589
+ ) : description })
1590
+ ] })
1591
+ ]
1592
+ }
1593
+ );
1594
+ };
1595
+
1596
+ // src/Stepper.tsx
1597
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1598
+ var import_react7 = require("react");
1599
+ var Stepper = (0, import_react6.forwardRef)(
1600
+ ({
1601
+ direction = "horizontal",
1602
+ variantUI = "current",
1603
+ size = "md",
1604
+ steps,
1605
+ tail = false,
1606
+ onClick,
1607
+ className,
1608
+ customClass,
1609
+ palette = "brand",
1610
+ "aria-label": ariaLabel,
1611
+ ...rest
1612
+ }, ref) => {
1613
+ const { theme } = (0, import_xui_core3.useDesignSystem)();
1614
+ const isHorizontal = direction === "horizontal";
1615
+ const isCurrentVariant = variantUI === "current";
1616
+ const tailSize = size === "sm" ? 3 : 5;
1617
+ const tailOffset = tailSize / 2;
1618
+ const defaultAriaLabel = `Stepper with ${steps.length} step${steps.length !== 1 ? "s" : ""}`;
1619
+ const stepperAriaLabel = ariaLabel || defaultAriaLabel;
1620
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1621
+ Box,
1622
+ {
1623
+ ref,
1624
+ role: "navigation",
1625
+ "aria-label": stepperAriaLabel,
1626
+ flexDirection: isHorizontal ? "row" : "column",
1627
+ justifyContent: isHorizontal ? "flex-start" : void 0,
1628
+ width: "100%",
1629
+ height: "auto",
1630
+ overflowX: isHorizontal ? "auto" : void 0,
1631
+ overflowY: isHorizontal ? "hidden" : void 0,
1632
+ paddingBottom: isHorizontal && isCurrentVariant ? tailOffset : void 0,
1633
+ borderBottomWidth: isHorizontal && isCurrentVariant ? 1 : 0,
1634
+ borderBottomColor: isHorizontal && isCurrentVariant ? theme.colors.border.secondary : void 0,
1635
+ borderLeftWidth: !isHorizontal && isCurrentVariant ? 1 : 0,
1636
+ borderLeftColor: !isHorizontal && isCurrentVariant ? theme.colors.border.secondary : void 0,
1637
+ className: [className, customClass].filter(Boolean).join(" "),
1638
+ ...rest,
1639
+ children: (() => {
1640
+ const coloredTailStates = [
1641
+ "current",
1642
+ "loading",
1643
+ "alert",
1644
+ "warning"
1645
+ ];
1646
+ let firstColoredTailIndex = -1;
1647
+ let lastColoredTailIndex = -1;
1648
+ steps.forEach((step, index) => {
1649
+ if (step.state && coloredTailStates.includes(step.state) && index < steps.length - 1) {
1650
+ if (firstColoredTailIndex === -1) {
1651
+ firstColoredTailIndex = index;
1652
+ }
1653
+ lastColoredTailIndex = index;
1654
+ }
1655
+ });
1656
+ return steps.map((step, index) => {
1657
+ const isLast = index === steps.length - 1;
1658
+ const isFirstColoredTail = index === firstColoredTailIndex;
1659
+ const isLastColoredTail = index === lastColoredTailIndex;
1660
+ return /* @__PURE__ */ (0, import_react7.createElement)(
1661
+ Step,
1662
+ {
1663
+ size,
1664
+ ...step,
1665
+ key: step.key || `stepper-${index}`,
1666
+ onClick,
1667
+ stepNumber: index,
1668
+ tail: tail && variantUI === "simple" && !isLast,
1669
+ direction,
1670
+ variantUI,
1671
+ palette,
1672
+ isLast,
1673
+ isFirstColoredTail,
1674
+ isLastColoredTail
1675
+ }
1676
+ );
1677
+ });
1678
+ })()
1679
+ }
1680
+ );
1681
+ }
1682
+ );
1683
+ Stepper.displayName = "Stepper";
1684
+
1685
+ // src/ProgressStep.tsx
1686
+ var import_xui_core5 = require("@xsolla/xui-core");
1687
+ var import_xui_icons2 = require("@xsolla/xui-icons");
1688
+
1689
+ // src/ProgressStepItem.tsx
1690
+ var import_xui_core4 = require("@xsolla/xui-core");
1691
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1692
+ var ProgressStepItem = ({
1693
+ state = "default",
1694
+ size = "md",
1695
+ className,
1696
+ onPress,
1697
+ onMouseEnter,
1698
+ onMouseLeave
1699
+ }) => {
1700
+ const { theme } = (0, import_xui_core4.useDesignSystem)();
1701
+ const isActive = state === "active";
1702
+ const isHover = state === "hover";
1703
+ const isMD = size === "md";
1704
+ const width = isActive ? isMD ? 24 : 18 : isMD ? 8 : 6;
1705
+ const height = isMD ? 8 : 6;
1706
+ const borderRadius = isMD ? 2 : 1;
1707
+ let backgroundColor = theme.colors.content.primary;
1708
+ let opacity = 1;
1709
+ if (!isActive) {
1710
+ backgroundColor = theme.colors.content.tertiary || "rgba(0, 0, 0, 0.6)";
1711
+ opacity = isHover ? 0.5 : 0.2;
1712
+ }
1713
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1714
+ Box,
1715
+ {
1716
+ className,
1717
+ width,
1718
+ height,
1719
+ borderRadius,
1720
+ backgroundColor,
1721
+ opacity,
1722
+ onPress,
1723
+ onMouseEnter,
1724
+ onMouseLeave,
1725
+ cursor: onPress ? "pointer" : "default"
1726
+ }
1727
+ );
1728
+ };
1729
+
1730
+ // src/ProgressStep.tsx
1731
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1732
+ var ProgressStep = ({
1733
+ count,
1734
+ activeStep,
1735
+ size = "md",
1736
+ arrows = true,
1737
+ onStepPress,
1738
+ className
1739
+ }) => {
1740
+ const { theme } = (0, import_xui_core5.useDesignSystem)();
1741
+ const handlePrev = () => {
1742
+ if (activeStep > 0 && onStepPress) {
1743
+ onStepPress(activeStep - 1);
1744
+ }
1745
+ };
1746
+ const handleNext = () => {
1747
+ if (activeStep < count - 1 && onStepPress) {
1748
+ onStepPress(activeStep + 1);
1749
+ }
1750
+ };
1751
+ const arrowSize = size === "md" ? 24 : 18;
1752
+ const iconSize = size === "md" ? 18 : 14;
1753
+ const isFirst = activeStep <= 0;
1754
+ const isLast = activeStep >= count - 1;
1755
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1756
+ Box,
1757
+ {
1758
+ className,
1759
+ flexDirection: "row",
1760
+ alignItems: "center",
1761
+ justifyContent: "center",
1762
+ gap: 4,
1763
+ height: size === "md" ? 24 : 18,
1764
+ children: [
1765
+ arrows && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1766
+ Box,
1767
+ {
1768
+ onPress: handlePrev,
1769
+ width: arrowSize,
1770
+ height: arrowSize,
1771
+ alignItems: "center",
1772
+ justifyContent: "center",
1773
+ borderRadius: 4,
1774
+ opacity: isFirst ? 0.2 : 1,
1775
+ cursor: isFirst ? "default" : "pointer",
1776
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_xui_icons2.ArrowLeft, { size: iconSize, color: theme.colors.content.primary })
1777
+ }
1778
+ ),
1779
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Box, { flexDirection: "row", alignItems: "center", gap: 4, children: Array.from({ length: count }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1780
+ ProgressStepItem,
1781
+ {
1782
+ size,
1783
+ state: i === activeStep ? "active" : "default",
1784
+ onPress: onStepPress ? () => onStepPress(i) : void 0
1785
+ },
1786
+ i
1787
+ )) }),
1788
+ arrows && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1789
+ Box,
1790
+ {
1791
+ onPress: handleNext,
1792
+ width: arrowSize,
1793
+ height: arrowSize,
1794
+ alignItems: "center",
1795
+ justifyContent: "center",
1796
+ borderRadius: 4,
1797
+ opacity: isLast ? 0.2 : 1,
1798
+ cursor: isLast ? "default" : "pointer",
1799
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_xui_icons2.ArrowRight, { size: iconSize, color: theme.colors.content.primary })
1800
+ }
1801
+ )
1802
+ ]
1803
+ }
1804
+ );
1805
+ };
1806
+ // Annotate the CommonJS export names for ESM import in node:
1807
+ 0 && (module.exports = {
1808
+ ProgressStep,
1809
+ ProgressStepItem,
1810
+ Step,
1811
+ Stepper
1812
+ });
1813
+ //# sourceMappingURL=index.js.map