@xsolla/xui-stepper-web 0.64.0-pr56.1768348754

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/index.d.mts ADDED
@@ -0,0 +1,90 @@
1
+ import React, { ReactElement } from 'react';
2
+ import { BoxProps } from '@xsolla/xui-primitives-core';
3
+
4
+ type StepperDirectionType = "horizontal" | "vertical";
5
+ type StepperUIVariantType = "current" | "simple";
6
+ type StepperPaletteType = "brand" | "brandSecondary";
7
+ type StepStateType = "current" | "incomplete" | "loading" | "complete" | "alert" | "warning";
8
+ type StepClickType = ({ number, step, }: {
9
+ number: number;
10
+ step: StepType;
11
+ }) => void;
12
+ type StepperSize = "sm" | "md";
13
+ type ProgressStepSize = "sm" | "md";
14
+ type ProgressStepItemState = "active" | "default" | "hover";
15
+ interface ProgressStepItemProps {
16
+ state?: ProgressStepItemState;
17
+ size?: ProgressStepSize;
18
+ className?: string;
19
+ onPress?: () => void;
20
+ onMouseEnter?: () => void;
21
+ onMouseLeave?: () => void;
22
+ }
23
+ interface ProgressStepProps {
24
+ count: number;
25
+ activeStep: number;
26
+ size?: ProgressStepSize;
27
+ arrows?: boolean;
28
+ onStepPress?: (step: number) => void;
29
+ className?: string;
30
+ }
31
+ type StepType = {
32
+ title: string | ReactElement;
33
+ description?: string | ReactElement;
34
+ state?: StepStateType;
35
+ disabled?: boolean;
36
+ key?: string;
37
+ noClick?: boolean;
38
+ };
39
+ interface StepProps extends StepType {
40
+ size: StepperSize;
41
+ onClick?: StepClickType;
42
+ stepNumber: number;
43
+ tail: boolean;
44
+ direction: StepperDirectionType;
45
+ variantUI: StepperUIVariantType;
46
+ palette?: StepperPaletteType;
47
+ isLast?: boolean;
48
+ isFirstColoredTail?: boolean;
49
+ isLastColoredTail?: boolean;
50
+ }
51
+ interface StepperProps extends Omit<BoxProps, "onClick"> {
52
+ /**
53
+ * List with steps for Stepper
54
+ */
55
+ steps: StepType[];
56
+ /**
57
+ * Parameter with type form for stepper. Default type "horizontal"
58
+ */
59
+ direction?: StepperDirectionType;
60
+ size?: StepperSize;
61
+ /**
62
+ *
63
+ */
64
+ tail?: boolean;
65
+ /**
66
+ * The step number in the array and an object with step data will be passed to the function
67
+ */
68
+ onClick?: StepClickType;
69
+ variantUI?: StepperUIVariantType;
70
+ /**
71
+ * Color palette variant. Default is "brand"
72
+ */
73
+ palette?: StepperPaletteType;
74
+ customClass?: string;
75
+ className?: string;
76
+ /**
77
+ * Accessibility label for the stepper. If not provided, a default label will be used.
78
+ */
79
+ "aria-label"?: string;
80
+ }
81
+
82
+ declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<any>>;
83
+
84
+ declare const ProgressStep: React.FC<ProgressStepProps>;
85
+
86
+ declare const ProgressStepItem: React.FC<ProgressStepItemProps>;
87
+
88
+ declare const Step: React.FC<StepProps>;
89
+
90
+ export { ProgressStep, ProgressStepItem, type ProgressStepItemProps, type ProgressStepItemState, type ProgressStepProps, type ProgressStepSize, Step, type StepClickType, type StepProps, type StepStateType, type StepType, Stepper, type StepperDirectionType, type StepperPaletteType, type StepperProps, type StepperSize, type StepperUIVariantType };
package/index.d.ts ADDED
@@ -0,0 +1,90 @@
1
+ import React, { ReactElement } from 'react';
2
+ import { BoxProps } from '@xsolla/xui-primitives-core';
3
+
4
+ type StepperDirectionType = "horizontal" | "vertical";
5
+ type StepperUIVariantType = "current" | "simple";
6
+ type StepperPaletteType = "brand" | "brandSecondary";
7
+ type StepStateType = "current" | "incomplete" | "loading" | "complete" | "alert" | "warning";
8
+ type StepClickType = ({ number, step, }: {
9
+ number: number;
10
+ step: StepType;
11
+ }) => void;
12
+ type StepperSize = "sm" | "md";
13
+ type ProgressStepSize = "sm" | "md";
14
+ type ProgressStepItemState = "active" | "default" | "hover";
15
+ interface ProgressStepItemProps {
16
+ state?: ProgressStepItemState;
17
+ size?: ProgressStepSize;
18
+ className?: string;
19
+ onPress?: () => void;
20
+ onMouseEnter?: () => void;
21
+ onMouseLeave?: () => void;
22
+ }
23
+ interface ProgressStepProps {
24
+ count: number;
25
+ activeStep: number;
26
+ size?: ProgressStepSize;
27
+ arrows?: boolean;
28
+ onStepPress?: (step: number) => void;
29
+ className?: string;
30
+ }
31
+ type StepType = {
32
+ title: string | ReactElement;
33
+ description?: string | ReactElement;
34
+ state?: StepStateType;
35
+ disabled?: boolean;
36
+ key?: string;
37
+ noClick?: boolean;
38
+ };
39
+ interface StepProps extends StepType {
40
+ size: StepperSize;
41
+ onClick?: StepClickType;
42
+ stepNumber: number;
43
+ tail: boolean;
44
+ direction: StepperDirectionType;
45
+ variantUI: StepperUIVariantType;
46
+ palette?: StepperPaletteType;
47
+ isLast?: boolean;
48
+ isFirstColoredTail?: boolean;
49
+ isLastColoredTail?: boolean;
50
+ }
51
+ interface StepperProps extends Omit<BoxProps, "onClick"> {
52
+ /**
53
+ * List with steps for Stepper
54
+ */
55
+ steps: StepType[];
56
+ /**
57
+ * Parameter with type form for stepper. Default type "horizontal"
58
+ */
59
+ direction?: StepperDirectionType;
60
+ size?: StepperSize;
61
+ /**
62
+ *
63
+ */
64
+ tail?: boolean;
65
+ /**
66
+ * The step number in the array and an object with step data will be passed to the function
67
+ */
68
+ onClick?: StepClickType;
69
+ variantUI?: StepperUIVariantType;
70
+ /**
71
+ * Color palette variant. Default is "brand"
72
+ */
73
+ palette?: StepperPaletteType;
74
+ customClass?: string;
75
+ className?: string;
76
+ /**
77
+ * Accessibility label for the stepper. If not provided, a default label will be used.
78
+ */
79
+ "aria-label"?: string;
80
+ }
81
+
82
+ declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<any>>;
83
+
84
+ declare const ProgressStep: React.FC<ProgressStepProps>;
85
+
86
+ declare const ProgressStepItem: React.FC<ProgressStepItemProps>;
87
+
88
+ declare const Step: React.FC<StepProps>;
89
+
90
+ export { ProgressStep, ProgressStepItem, type ProgressStepItemProps, type ProgressStepItemState, type ProgressStepProps, type ProgressStepSize, Step, type StepClickType, type StepProps, type StepStateType, type StepType, Stepper, type StepperDirectionType, type StepperPaletteType, type StepperProps, type StepperSize, type StepperUIVariantType };