@xsolla/xui-primitives-core 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 +186 -0
- package/index.d.ts +186 -0
- package/index.js +18 -0
- package/index.mjs +0 -0
- package/package.json +17 -0
package/index.d.mts
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface BoxProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
borderColor?: string;
|
|
7
|
+
borderWidth?: number;
|
|
8
|
+
borderBottomWidth?: number;
|
|
9
|
+
borderBottomColor?: string;
|
|
10
|
+
borderTopWidth?: number;
|
|
11
|
+
borderTopColor?: string;
|
|
12
|
+
borderLeftWidth?: number;
|
|
13
|
+
borderLeftColor?: string;
|
|
14
|
+
borderRightWidth?: number;
|
|
15
|
+
borderRightColor?: string;
|
|
16
|
+
borderRadius?: number | string;
|
|
17
|
+
borderStyle?: "solid" | "dashed" | "dotted" | "none";
|
|
18
|
+
height?: number | string;
|
|
19
|
+
padding?: number | string;
|
|
20
|
+
paddingHorizontal?: number | string;
|
|
21
|
+
paddingVertical?: number | string;
|
|
22
|
+
paddingTop?: number | string;
|
|
23
|
+
paddingBottom?: number | string;
|
|
24
|
+
paddingLeft?: number | string;
|
|
25
|
+
paddingRight?: number | string;
|
|
26
|
+
margin?: number | string;
|
|
27
|
+
marginTop?: number | string;
|
|
28
|
+
marginBottom?: number | string;
|
|
29
|
+
marginLeft?: number | string;
|
|
30
|
+
marginRight?: number | string;
|
|
31
|
+
flexDirection?: "row" | "column";
|
|
32
|
+
flexWrap?: "wrap" | "nowrap" | "wrap-reverse";
|
|
33
|
+
alignItems?: "center" | "flex-start" | "flex-end" | "stretch";
|
|
34
|
+
justifyContent?: "center" | "flex-start" | "flex-end" | "space-between" | "space-around";
|
|
35
|
+
position?: "relative" | "absolute" | "static" | "fixed";
|
|
36
|
+
top?: number | string;
|
|
37
|
+
bottom?: number | string;
|
|
38
|
+
left?: number | string;
|
|
39
|
+
right?: number | string;
|
|
40
|
+
width?: number | string;
|
|
41
|
+
flex?: number;
|
|
42
|
+
flexShrink?: number;
|
|
43
|
+
gap?: number | string;
|
|
44
|
+
alignSelf?: "center" | "flex-start" | "flex-end" | "stretch";
|
|
45
|
+
overflow?: "visible" | "hidden" | "scroll";
|
|
46
|
+
overflowX?: "visible" | "hidden" | "scroll" | "auto";
|
|
47
|
+
overflowY?: "visible" | "hidden" | "scroll" | "auto";
|
|
48
|
+
zIndex?: number;
|
|
49
|
+
cursor?: "pointer" | "default" | "not-allowed" | "wait" | "text" | "move" | "grab" | "grabbing" | "inherit";
|
|
50
|
+
onPress?: () => void;
|
|
51
|
+
hoverStyle?: {
|
|
52
|
+
backgroundColor?: string;
|
|
53
|
+
borderColor?: string;
|
|
54
|
+
};
|
|
55
|
+
pressStyle?: {
|
|
56
|
+
backgroundColor?: string;
|
|
57
|
+
};
|
|
58
|
+
focusStyle?: {
|
|
59
|
+
outlineColor?: string;
|
|
60
|
+
outlineWidth?: number;
|
|
61
|
+
outlineOffset?: number;
|
|
62
|
+
outlineStyle?: "solid" | "dashed" | "dotted" | "none";
|
|
63
|
+
};
|
|
64
|
+
outline?: string;
|
|
65
|
+
outlineColor?: string;
|
|
66
|
+
outlineWidth?: number | string;
|
|
67
|
+
outlineOffset?: number | string;
|
|
68
|
+
outlineStyle?: "solid" | "dashed" | "dotted" | "none";
|
|
69
|
+
className?: string;
|
|
70
|
+
"data-testid"?: string;
|
|
71
|
+
testID?: string;
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
minWidth?: number | string;
|
|
74
|
+
minHeight?: number | string;
|
|
75
|
+
style?: React.CSSProperties;
|
|
76
|
+
role?: string;
|
|
77
|
+
"aria-label"?: string;
|
|
78
|
+
"aria-labelledby"?: string;
|
|
79
|
+
"aria-current"?: boolean | "time" | "false" | "true" | "page" | "step" | "location" | "date";
|
|
80
|
+
"aria-disabled"?: boolean;
|
|
81
|
+
"aria-live"?: "polite" | "assertive" | "off";
|
|
82
|
+
"aria-busy"?: boolean;
|
|
83
|
+
"aria-describedby"?: string;
|
|
84
|
+
"aria-expanded"?: boolean;
|
|
85
|
+
"aria-haspopup"?: boolean | "menu" | "listbox" | "tree" | "grid" | "dialog";
|
|
86
|
+
"aria-pressed"?: boolean | "mixed";
|
|
87
|
+
"aria-controls"?: string;
|
|
88
|
+
tabIndex?: number;
|
|
89
|
+
onKeyDown?: (e: React.KeyboardEvent) => void;
|
|
90
|
+
onKeyUp?: (e: React.KeyboardEvent) => void;
|
|
91
|
+
onLayout?: (event: any) => void;
|
|
92
|
+
onMouseEnter?: (e: any) => void;
|
|
93
|
+
onMouseLeave?: (e: any) => void;
|
|
94
|
+
onPaste?: (e: React.ClipboardEvent) => void;
|
|
95
|
+
onMoveShouldSetResponder?: (e: any) => boolean;
|
|
96
|
+
onResponderGrant?: (e: any) => void;
|
|
97
|
+
onResponderMove?: (e: any) => void;
|
|
98
|
+
onResponderRelease?: (e: any) => void;
|
|
99
|
+
onResponderTerminate?: (e: any) => void;
|
|
100
|
+
as?: keyof JSX.IntrinsicElements;
|
|
101
|
+
src?: string;
|
|
102
|
+
alt?: string;
|
|
103
|
+
/** HTML id attribute */
|
|
104
|
+
id?: string;
|
|
105
|
+
/** Button type attribute (only used when as="button") */
|
|
106
|
+
type?: "button" | "submit" | "reset";
|
|
107
|
+
}
|
|
108
|
+
interface TextProps {
|
|
109
|
+
children?: React.ReactNode;
|
|
110
|
+
color?: string;
|
|
111
|
+
fontSize?: number | string;
|
|
112
|
+
fontWeight?: string | number;
|
|
113
|
+
fontFamily?: string;
|
|
114
|
+
lineHeight?: number | string;
|
|
115
|
+
whiteSpace?: "normal" | "nowrap" | "pre" | "pre-line" | "pre-wrap";
|
|
116
|
+
textAlign?: "left" | "center" | "right" | "justify";
|
|
117
|
+
textDecoration?: "none" | "underline" | "line-through";
|
|
118
|
+
style?: React.CSSProperties;
|
|
119
|
+
className?: string;
|
|
120
|
+
id?: string;
|
|
121
|
+
role?: string;
|
|
122
|
+
}
|
|
123
|
+
interface SpinnerProps {
|
|
124
|
+
color?: string;
|
|
125
|
+
size?: number | string;
|
|
126
|
+
strokeWidth?: number;
|
|
127
|
+
/** Accessible role for the spinner */
|
|
128
|
+
role?: string;
|
|
129
|
+
/** Accessible label for screen readers */
|
|
130
|
+
"aria-label"?: string;
|
|
131
|
+
/** Aria live region behavior */
|
|
132
|
+
"aria-live"?: "polite" | "assertive" | "off";
|
|
133
|
+
/** ID of element that describes this spinner */
|
|
134
|
+
"aria-describedby"?: string;
|
|
135
|
+
/** Test ID for testing frameworks */
|
|
136
|
+
testID?: string;
|
|
137
|
+
}
|
|
138
|
+
interface IconProps {
|
|
139
|
+
name?: string;
|
|
140
|
+
color?: string;
|
|
141
|
+
size?: number | string;
|
|
142
|
+
children?: React.ReactNode;
|
|
143
|
+
}
|
|
144
|
+
interface DividerProps {
|
|
145
|
+
color?: string;
|
|
146
|
+
height?: number | string;
|
|
147
|
+
width?: number | string;
|
|
148
|
+
vertical?: boolean;
|
|
149
|
+
dashStroke?: boolean;
|
|
150
|
+
}
|
|
151
|
+
interface InputPrimitiveProps {
|
|
152
|
+
value?: string;
|
|
153
|
+
placeholder?: string;
|
|
154
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
155
|
+
onChangeText?: (text: string) => void;
|
|
156
|
+
onFocus?: () => void;
|
|
157
|
+
onBlur?: () => void;
|
|
158
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
159
|
+
disabled?: boolean;
|
|
160
|
+
secureTextEntry?: boolean;
|
|
161
|
+
style?: React.CSSProperties;
|
|
162
|
+
color?: string;
|
|
163
|
+
fontSize?: number | string;
|
|
164
|
+
placeholderTextColor?: string;
|
|
165
|
+
maxLength?: number;
|
|
166
|
+
name?: string;
|
|
167
|
+
type?: string;
|
|
168
|
+
/** Input mode for virtual keyboard (web: inputMode, native: keyboardType) */
|
|
169
|
+
inputMode?: "none" | "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url";
|
|
170
|
+
/** Autocomplete behavior (web: autocomplete, native: textContentType/autoComplete) */
|
|
171
|
+
autoComplete?: string;
|
|
172
|
+
id?: string;
|
|
173
|
+
"aria-invalid"?: boolean;
|
|
174
|
+
"aria-describedby"?: string;
|
|
175
|
+
"aria-labelledby"?: string;
|
|
176
|
+
"aria-label"?: string;
|
|
177
|
+
"aria-disabled"?: boolean;
|
|
178
|
+
"data-testid"?: string;
|
|
179
|
+
}
|
|
180
|
+
interface TextAreaPrimitiveProps extends Omit<InputPrimitiveProps, "onKeyDown" | "secureTextEntry"> {
|
|
181
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
182
|
+
rows?: number;
|
|
183
|
+
autoSize?: boolean;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export type { BoxProps, DividerProps, IconProps, InputPrimitiveProps, SpinnerProps, TextAreaPrimitiveProps, TextProps };
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface BoxProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
borderColor?: string;
|
|
7
|
+
borderWidth?: number;
|
|
8
|
+
borderBottomWidth?: number;
|
|
9
|
+
borderBottomColor?: string;
|
|
10
|
+
borderTopWidth?: number;
|
|
11
|
+
borderTopColor?: string;
|
|
12
|
+
borderLeftWidth?: number;
|
|
13
|
+
borderLeftColor?: string;
|
|
14
|
+
borderRightWidth?: number;
|
|
15
|
+
borderRightColor?: string;
|
|
16
|
+
borderRadius?: number | string;
|
|
17
|
+
borderStyle?: "solid" | "dashed" | "dotted" | "none";
|
|
18
|
+
height?: number | string;
|
|
19
|
+
padding?: number | string;
|
|
20
|
+
paddingHorizontal?: number | string;
|
|
21
|
+
paddingVertical?: number | string;
|
|
22
|
+
paddingTop?: number | string;
|
|
23
|
+
paddingBottom?: number | string;
|
|
24
|
+
paddingLeft?: number | string;
|
|
25
|
+
paddingRight?: number | string;
|
|
26
|
+
margin?: number | string;
|
|
27
|
+
marginTop?: number | string;
|
|
28
|
+
marginBottom?: number | string;
|
|
29
|
+
marginLeft?: number | string;
|
|
30
|
+
marginRight?: number | string;
|
|
31
|
+
flexDirection?: "row" | "column";
|
|
32
|
+
flexWrap?: "wrap" | "nowrap" | "wrap-reverse";
|
|
33
|
+
alignItems?: "center" | "flex-start" | "flex-end" | "stretch";
|
|
34
|
+
justifyContent?: "center" | "flex-start" | "flex-end" | "space-between" | "space-around";
|
|
35
|
+
position?: "relative" | "absolute" | "static" | "fixed";
|
|
36
|
+
top?: number | string;
|
|
37
|
+
bottom?: number | string;
|
|
38
|
+
left?: number | string;
|
|
39
|
+
right?: number | string;
|
|
40
|
+
width?: number | string;
|
|
41
|
+
flex?: number;
|
|
42
|
+
flexShrink?: number;
|
|
43
|
+
gap?: number | string;
|
|
44
|
+
alignSelf?: "center" | "flex-start" | "flex-end" | "stretch";
|
|
45
|
+
overflow?: "visible" | "hidden" | "scroll";
|
|
46
|
+
overflowX?: "visible" | "hidden" | "scroll" | "auto";
|
|
47
|
+
overflowY?: "visible" | "hidden" | "scroll" | "auto";
|
|
48
|
+
zIndex?: number;
|
|
49
|
+
cursor?: "pointer" | "default" | "not-allowed" | "wait" | "text" | "move" | "grab" | "grabbing" | "inherit";
|
|
50
|
+
onPress?: () => void;
|
|
51
|
+
hoverStyle?: {
|
|
52
|
+
backgroundColor?: string;
|
|
53
|
+
borderColor?: string;
|
|
54
|
+
};
|
|
55
|
+
pressStyle?: {
|
|
56
|
+
backgroundColor?: string;
|
|
57
|
+
};
|
|
58
|
+
focusStyle?: {
|
|
59
|
+
outlineColor?: string;
|
|
60
|
+
outlineWidth?: number;
|
|
61
|
+
outlineOffset?: number;
|
|
62
|
+
outlineStyle?: "solid" | "dashed" | "dotted" | "none";
|
|
63
|
+
};
|
|
64
|
+
outline?: string;
|
|
65
|
+
outlineColor?: string;
|
|
66
|
+
outlineWidth?: number | string;
|
|
67
|
+
outlineOffset?: number | string;
|
|
68
|
+
outlineStyle?: "solid" | "dashed" | "dotted" | "none";
|
|
69
|
+
className?: string;
|
|
70
|
+
"data-testid"?: string;
|
|
71
|
+
testID?: string;
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
minWidth?: number | string;
|
|
74
|
+
minHeight?: number | string;
|
|
75
|
+
style?: React.CSSProperties;
|
|
76
|
+
role?: string;
|
|
77
|
+
"aria-label"?: string;
|
|
78
|
+
"aria-labelledby"?: string;
|
|
79
|
+
"aria-current"?: boolean | "time" | "false" | "true" | "page" | "step" | "location" | "date";
|
|
80
|
+
"aria-disabled"?: boolean;
|
|
81
|
+
"aria-live"?: "polite" | "assertive" | "off";
|
|
82
|
+
"aria-busy"?: boolean;
|
|
83
|
+
"aria-describedby"?: string;
|
|
84
|
+
"aria-expanded"?: boolean;
|
|
85
|
+
"aria-haspopup"?: boolean | "menu" | "listbox" | "tree" | "grid" | "dialog";
|
|
86
|
+
"aria-pressed"?: boolean | "mixed";
|
|
87
|
+
"aria-controls"?: string;
|
|
88
|
+
tabIndex?: number;
|
|
89
|
+
onKeyDown?: (e: React.KeyboardEvent) => void;
|
|
90
|
+
onKeyUp?: (e: React.KeyboardEvent) => void;
|
|
91
|
+
onLayout?: (event: any) => void;
|
|
92
|
+
onMouseEnter?: (e: any) => void;
|
|
93
|
+
onMouseLeave?: (e: any) => void;
|
|
94
|
+
onPaste?: (e: React.ClipboardEvent) => void;
|
|
95
|
+
onMoveShouldSetResponder?: (e: any) => boolean;
|
|
96
|
+
onResponderGrant?: (e: any) => void;
|
|
97
|
+
onResponderMove?: (e: any) => void;
|
|
98
|
+
onResponderRelease?: (e: any) => void;
|
|
99
|
+
onResponderTerminate?: (e: any) => void;
|
|
100
|
+
as?: keyof JSX.IntrinsicElements;
|
|
101
|
+
src?: string;
|
|
102
|
+
alt?: string;
|
|
103
|
+
/** HTML id attribute */
|
|
104
|
+
id?: string;
|
|
105
|
+
/** Button type attribute (only used when as="button") */
|
|
106
|
+
type?: "button" | "submit" | "reset";
|
|
107
|
+
}
|
|
108
|
+
interface TextProps {
|
|
109
|
+
children?: React.ReactNode;
|
|
110
|
+
color?: string;
|
|
111
|
+
fontSize?: number | string;
|
|
112
|
+
fontWeight?: string | number;
|
|
113
|
+
fontFamily?: string;
|
|
114
|
+
lineHeight?: number | string;
|
|
115
|
+
whiteSpace?: "normal" | "nowrap" | "pre" | "pre-line" | "pre-wrap";
|
|
116
|
+
textAlign?: "left" | "center" | "right" | "justify";
|
|
117
|
+
textDecoration?: "none" | "underline" | "line-through";
|
|
118
|
+
style?: React.CSSProperties;
|
|
119
|
+
className?: string;
|
|
120
|
+
id?: string;
|
|
121
|
+
role?: string;
|
|
122
|
+
}
|
|
123
|
+
interface SpinnerProps {
|
|
124
|
+
color?: string;
|
|
125
|
+
size?: number | string;
|
|
126
|
+
strokeWidth?: number;
|
|
127
|
+
/** Accessible role for the spinner */
|
|
128
|
+
role?: string;
|
|
129
|
+
/** Accessible label for screen readers */
|
|
130
|
+
"aria-label"?: string;
|
|
131
|
+
/** Aria live region behavior */
|
|
132
|
+
"aria-live"?: "polite" | "assertive" | "off";
|
|
133
|
+
/** ID of element that describes this spinner */
|
|
134
|
+
"aria-describedby"?: string;
|
|
135
|
+
/** Test ID for testing frameworks */
|
|
136
|
+
testID?: string;
|
|
137
|
+
}
|
|
138
|
+
interface IconProps {
|
|
139
|
+
name?: string;
|
|
140
|
+
color?: string;
|
|
141
|
+
size?: number | string;
|
|
142
|
+
children?: React.ReactNode;
|
|
143
|
+
}
|
|
144
|
+
interface DividerProps {
|
|
145
|
+
color?: string;
|
|
146
|
+
height?: number | string;
|
|
147
|
+
width?: number | string;
|
|
148
|
+
vertical?: boolean;
|
|
149
|
+
dashStroke?: boolean;
|
|
150
|
+
}
|
|
151
|
+
interface InputPrimitiveProps {
|
|
152
|
+
value?: string;
|
|
153
|
+
placeholder?: string;
|
|
154
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
155
|
+
onChangeText?: (text: string) => void;
|
|
156
|
+
onFocus?: () => void;
|
|
157
|
+
onBlur?: () => void;
|
|
158
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
159
|
+
disabled?: boolean;
|
|
160
|
+
secureTextEntry?: boolean;
|
|
161
|
+
style?: React.CSSProperties;
|
|
162
|
+
color?: string;
|
|
163
|
+
fontSize?: number | string;
|
|
164
|
+
placeholderTextColor?: string;
|
|
165
|
+
maxLength?: number;
|
|
166
|
+
name?: string;
|
|
167
|
+
type?: string;
|
|
168
|
+
/** Input mode for virtual keyboard (web: inputMode, native: keyboardType) */
|
|
169
|
+
inputMode?: "none" | "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url";
|
|
170
|
+
/** Autocomplete behavior (web: autocomplete, native: textContentType/autoComplete) */
|
|
171
|
+
autoComplete?: string;
|
|
172
|
+
id?: string;
|
|
173
|
+
"aria-invalid"?: boolean;
|
|
174
|
+
"aria-describedby"?: string;
|
|
175
|
+
"aria-labelledby"?: string;
|
|
176
|
+
"aria-label"?: string;
|
|
177
|
+
"aria-disabled"?: boolean;
|
|
178
|
+
"data-testid"?: string;
|
|
179
|
+
}
|
|
180
|
+
interface TextAreaPrimitiveProps extends Omit<InputPrimitiveProps, "onKeyDown" | "secureTextEntry"> {
|
|
181
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
182
|
+
rows?: number;
|
|
183
|
+
autoSize?: boolean;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export type { BoxProps, DividerProps, IconProps, InputPrimitiveProps, SpinnerProps, TextAreaPrimitiveProps, TextProps };
|
package/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/index.ts
|
|
17
|
+
var index_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(index_exports);
|
package/index.mjs
ADDED
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xsolla/xui-primitives-core",
|
|
3
|
+
"version": "0.64.0-pr56.1768348754",
|
|
4
|
+
"main": "./index.js",
|
|
5
|
+
"module": "./index.mjs",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsup src/index.ts --format esm,cjs --dts --clean"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"tsup": "^8.0.0"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"peerDependencies": {
|
|
15
|
+
"react": "^16.8.0"
|
|
16
|
+
}
|
|
17
|
+
}
|