@xsolla/xui-slider 0.74.0 → 0.76.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.
- package/native/index.js.flow +142 -0
- package/package.json +4 -4
- package/web/index.js.flow +142 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for index
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from "react";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Available color options from the design system.
|
|
12
|
+
*/
|
|
13
|
+
declare type SliderColorScheme =
|
|
14
|
+
| "brand"
|
|
15
|
+
| "brandExtra"
|
|
16
|
+
| "success"
|
|
17
|
+
| "warning"
|
|
18
|
+
| "alert"
|
|
19
|
+
| "neutral";
|
|
20
|
+
declare interface SliderProps {
|
|
21
|
+
/**
|
|
22
|
+
* Current value for single slider mode.
|
|
23
|
+
*/
|
|
24
|
+
value?: number;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Minimum value of the range (for range mode).
|
|
28
|
+
*/
|
|
29
|
+
minValue?: number;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Maximum value of the range (for range mode).
|
|
33
|
+
*/
|
|
34
|
+
maxValue?: number;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Minimum bound of the slider.
|
|
38
|
+
*/
|
|
39
|
+
min?: number;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Maximum bound of the slider.
|
|
43
|
+
*/
|
|
44
|
+
max?: number;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Step increment.
|
|
48
|
+
*/
|
|
49
|
+
step?: number;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Callback for single value changes.
|
|
53
|
+
*/
|
|
54
|
+
onChange?: (value: number) => void;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Callback for range value changes (min, max).
|
|
58
|
+
*/
|
|
59
|
+
onRangeChange?: (minValue: number, maxValue: number) => void;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Size variant.
|
|
63
|
+
*/
|
|
64
|
+
size?: "sm" | "md" | "lg" | "xl";
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Whether the slider is disabled.
|
|
68
|
+
*/
|
|
69
|
+
disabled?: boolean;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Enable range mode with two thumbs.
|
|
73
|
+
*/
|
|
74
|
+
range?: boolean;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Position of input field(s).
|
|
78
|
+
*/
|
|
79
|
+
inputPosition?: "left" | "right" | "both" | "none";
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Show min/max labels next to the track.
|
|
83
|
+
*/
|
|
84
|
+
showLabels?: boolean;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Label text (displayed above the slider).
|
|
88
|
+
*/
|
|
89
|
+
label?: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Color scheme for the active/filled portion of the track and thumb.
|
|
93
|
+
* Uses colors from the design system.
|
|
94
|
+
* @default "brand"
|
|
95
|
+
*/
|
|
96
|
+
activeColor?: SliderColorScheme;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Test identifier.
|
|
100
|
+
*/
|
|
101
|
+
testID?: string;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Accessible label for the slider (used when no visible label).
|
|
105
|
+
*/
|
|
106
|
+
"aria-label"?: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Accessible label for the minimum thumb in range mode.
|
|
110
|
+
*/
|
|
111
|
+
minThumbAriaLabel?: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Accessible label for the maximum thumb in range mode.
|
|
115
|
+
*/
|
|
116
|
+
maxThumbAriaLabel?: string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Icon to display on the left side of the slider.
|
|
120
|
+
*/
|
|
121
|
+
iconLeft?: React.ReactNode;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Icon to display on the right side of the slider.
|
|
125
|
+
*/
|
|
126
|
+
iconRight?: React.ReactNode;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Icon to display inside the input field.
|
|
130
|
+
* Only works when inputPosition is not 'none'.
|
|
131
|
+
*/
|
|
132
|
+
iconInside?: React.ReactNode;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Position of the icon inside the input field.
|
|
136
|
+
* Defaults to the same side as inputPosition.
|
|
137
|
+
*/
|
|
138
|
+
iconInsidePosition?: "left" | "right";
|
|
139
|
+
}
|
|
140
|
+
declare var Slider: React.FC<SliderProps>;
|
|
141
|
+
export type { SliderColorScheme, SliderProps };
|
|
142
|
+
declare export { Slider };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-slider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.76.0",
|
|
4
4
|
"main": "./web/index.js",
|
|
5
5
|
"module": "./web/index.mjs",
|
|
6
6
|
"types": "./web/index.d.ts",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"test:coverage": "vitest run --coverage"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@xsolla/xui-core": "0.
|
|
17
|
-
"@xsolla/xui-input": "0.
|
|
18
|
-
"@xsolla/xui-primitives-core": "0.
|
|
16
|
+
"@xsolla/xui-core": "0.76.0",
|
|
17
|
+
"@xsolla/xui-input": "0.76.0",
|
|
18
|
+
"@xsolla/xui-primitives-core": "0.76.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": ">=16.8.0",
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for index
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from "react";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Available color options from the design system.
|
|
12
|
+
*/
|
|
13
|
+
declare type SliderColorScheme =
|
|
14
|
+
| "brand"
|
|
15
|
+
| "brandExtra"
|
|
16
|
+
| "success"
|
|
17
|
+
| "warning"
|
|
18
|
+
| "alert"
|
|
19
|
+
| "neutral";
|
|
20
|
+
declare interface SliderProps {
|
|
21
|
+
/**
|
|
22
|
+
* Current value for single slider mode.
|
|
23
|
+
*/
|
|
24
|
+
value?: number;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Minimum value of the range (for range mode).
|
|
28
|
+
*/
|
|
29
|
+
minValue?: number;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Maximum value of the range (for range mode).
|
|
33
|
+
*/
|
|
34
|
+
maxValue?: number;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Minimum bound of the slider.
|
|
38
|
+
*/
|
|
39
|
+
min?: number;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Maximum bound of the slider.
|
|
43
|
+
*/
|
|
44
|
+
max?: number;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Step increment.
|
|
48
|
+
*/
|
|
49
|
+
step?: number;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Callback for single value changes.
|
|
53
|
+
*/
|
|
54
|
+
onChange?: (value: number) => void;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Callback for range value changes (min, max).
|
|
58
|
+
*/
|
|
59
|
+
onRangeChange?: (minValue: number, maxValue: number) => void;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Size variant.
|
|
63
|
+
*/
|
|
64
|
+
size?: "sm" | "md" | "lg" | "xl";
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Whether the slider is disabled.
|
|
68
|
+
*/
|
|
69
|
+
disabled?: boolean;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Enable range mode with two thumbs.
|
|
73
|
+
*/
|
|
74
|
+
range?: boolean;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Position of input field(s).
|
|
78
|
+
*/
|
|
79
|
+
inputPosition?: "left" | "right" | "both" | "none";
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Show min/max labels next to the track.
|
|
83
|
+
*/
|
|
84
|
+
showLabels?: boolean;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Label text (displayed above the slider).
|
|
88
|
+
*/
|
|
89
|
+
label?: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Color scheme for the active/filled portion of the track and thumb.
|
|
93
|
+
* Uses colors from the design system.
|
|
94
|
+
* @default "brand"
|
|
95
|
+
*/
|
|
96
|
+
activeColor?: SliderColorScheme;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Test identifier.
|
|
100
|
+
*/
|
|
101
|
+
testID?: string;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Accessible label for the slider (used when no visible label).
|
|
105
|
+
*/
|
|
106
|
+
"aria-label"?: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Accessible label for the minimum thumb in range mode.
|
|
110
|
+
*/
|
|
111
|
+
minThumbAriaLabel?: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Accessible label for the maximum thumb in range mode.
|
|
115
|
+
*/
|
|
116
|
+
maxThumbAriaLabel?: string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Icon to display on the left side of the slider.
|
|
120
|
+
*/
|
|
121
|
+
iconLeft?: React.ReactNode;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Icon to display on the right side of the slider.
|
|
125
|
+
*/
|
|
126
|
+
iconRight?: React.ReactNode;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Icon to display inside the input field.
|
|
130
|
+
* Only works when inputPosition is not 'none'.
|
|
131
|
+
*/
|
|
132
|
+
iconInside?: React.ReactNode;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Position of the icon inside the input field.
|
|
136
|
+
* Defaults to the same side as inputPosition.
|
|
137
|
+
*/
|
|
138
|
+
iconInsidePosition?: "left" | "right";
|
|
139
|
+
}
|
|
140
|
+
declare var Slider: React.FC<SliderProps>;
|
|
141
|
+
export type { SliderColorScheme, SliderProps };
|
|
142
|
+
declare export { Slider };
|