@xsolla/xui-b2b-stepper 0.147.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.d.mts +46 -0
- package/native/index.d.ts +46 -0
- package/native/index.js +942 -0
- package/native/index.js.map +1 -0
- package/native/index.mjs +922 -0
- package/native/index.mjs.map +1 -0
- package/package.json +58 -0
- package/web/index.d.mts +46 -0
- package/web/index.d.ts +46 -0
- package/web/index.js +1009 -0
- package/web/index.js.map +1 -0
- package/web/index.mjs +972 -0
- package/web/index.mjs.map +1 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { BoxProps } from '@xsolla/xui-primitives-core';
|
|
4
|
+
import { ThemeOverrideProps } from '@xsolla/xui-core';
|
|
5
|
+
|
|
6
|
+
type StepperDirection = "horizontal" | "vertical";
|
|
7
|
+
type StepStateType = "current" | "incomplete" | "loading" | "complete" | "warning" | "alert";
|
|
8
|
+
type StepClickType = (args: {
|
|
9
|
+
number: number;
|
|
10
|
+
step: StepType;
|
|
11
|
+
}) => void;
|
|
12
|
+
type StepType = {
|
|
13
|
+
title: ReactNode;
|
|
14
|
+
description?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Small caption rendered above the title (body-xs, tertiary color).
|
|
17
|
+
* Typical content: "Step 1", "Optional", etc.
|
|
18
|
+
*/
|
|
19
|
+
caption?: ReactNode;
|
|
20
|
+
state?: StepStateType;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
key?: string;
|
|
23
|
+
noClick?: boolean;
|
|
24
|
+
};
|
|
25
|
+
interface StepperProps extends Omit<BoxProps, "onClick">, ThemeOverrideProps {
|
|
26
|
+
steps: StepType[];
|
|
27
|
+
direction?: StepperDirection;
|
|
28
|
+
/**
|
|
29
|
+
* When true, wraps the steps in a tinted surface container
|
|
30
|
+
* (background-secondary + overlay-mono, radius 8, 16/8 inset).
|
|
31
|
+
* Defaults to false.
|
|
32
|
+
*/
|
|
33
|
+
surface?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* When true, each step renders the numbered chip only — no heading,
|
|
36
|
+
* description, or caption. Matches the Figma "Only number" variant.
|
|
37
|
+
*/
|
|
38
|
+
simple?: boolean;
|
|
39
|
+
onClick?: StepClickType;
|
|
40
|
+
className?: string;
|
|
41
|
+
"aria-label"?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare const Stepper: react.ForwardRefExoticComponent<StepperProps & react.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
|
|
46
|
+
export { type StepClickType, type StepStateType, type StepType, Stepper, type StepperDirection, type StepperProps };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { BoxProps } from '@xsolla/xui-primitives-core';
|
|
4
|
+
import { ThemeOverrideProps } from '@xsolla/xui-core';
|
|
5
|
+
|
|
6
|
+
type StepperDirection = "horizontal" | "vertical";
|
|
7
|
+
type StepStateType = "current" | "incomplete" | "loading" | "complete" | "warning" | "alert";
|
|
8
|
+
type StepClickType = (args: {
|
|
9
|
+
number: number;
|
|
10
|
+
step: StepType;
|
|
11
|
+
}) => void;
|
|
12
|
+
type StepType = {
|
|
13
|
+
title: ReactNode;
|
|
14
|
+
description?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Small caption rendered above the title (body-xs, tertiary color).
|
|
17
|
+
* Typical content: "Step 1", "Optional", etc.
|
|
18
|
+
*/
|
|
19
|
+
caption?: ReactNode;
|
|
20
|
+
state?: StepStateType;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
key?: string;
|
|
23
|
+
noClick?: boolean;
|
|
24
|
+
};
|
|
25
|
+
interface StepperProps extends Omit<BoxProps, "onClick">, ThemeOverrideProps {
|
|
26
|
+
steps: StepType[];
|
|
27
|
+
direction?: StepperDirection;
|
|
28
|
+
/**
|
|
29
|
+
* When true, wraps the steps in a tinted surface container
|
|
30
|
+
* (background-secondary + overlay-mono, radius 8, 16/8 inset).
|
|
31
|
+
* Defaults to false.
|
|
32
|
+
*/
|
|
33
|
+
surface?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* When true, each step renders the numbered chip only — no heading,
|
|
36
|
+
* description, or caption. Matches the Figma "Only number" variant.
|
|
37
|
+
*/
|
|
38
|
+
simple?: boolean;
|
|
39
|
+
onClick?: StepClickType;
|
|
40
|
+
className?: string;
|
|
41
|
+
"aria-label"?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare const Stepper: react.ForwardRefExoticComponent<StepperProps & react.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
|
|
46
|
+
export { type StepClickType, type StepStateType, type StepType, Stepper, type StepperDirection, type StepperProps };
|