@xsolla/xui-input 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.
@@ -0,0 +1,103 @@
1
+ import React, { InputHTMLAttributes } from 'react';
2
+
3
+ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> {
4
+ /**
5
+ * Property for specifying the value of the control.
6
+ */
7
+ value?: string;
8
+ /**
9
+ * Property for specifying the placeholder of the control.
10
+ */
11
+ placeholder?: string;
12
+ /**
13
+ * Event handler when the value changes (for controlled mode).
14
+ */
15
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
16
+ /**
17
+ * Event handler when the text changes (alternative to onChange).
18
+ */
19
+ onChangeText?: (text: string) => void;
20
+ /**
21
+ * Property for changing the size of the input.
22
+ */
23
+ size?: "xl" | "l" | "m" | "s" | "xs";
24
+ /**
25
+ * Property for disabling the control.
26
+ */
27
+ disabled?: boolean;
28
+ /**
29
+ * Property for displaying a label above the input.
30
+ */
31
+ label?: string;
32
+ /**
33
+ * Property for displaying an error message and highlighting the control as invalid.
34
+ */
35
+ errorMessage?: string;
36
+ /**
37
+ * Property for displaying an error and highlighting the control as invalid.
38
+ */
39
+ error?: boolean;
40
+ /**
41
+ * Property to display an icon on the left side.
42
+ */
43
+ iconLeft?: React.ReactNode;
44
+ /**
45
+ * Property to display an icon on the right side.
46
+ */
47
+ iconRight?: React.ReactNode;
48
+ /**
49
+ * Add function clear for input.
50
+ */
51
+ extraClear?: boolean;
52
+ /**
53
+ * Function triggered when user clicks on extraClear button.
54
+ */
55
+ onRemove?: () => void;
56
+ /**
57
+ * Property for show checked status in input. Show only if not errorMessage.
58
+ */
59
+ checked?: boolean;
60
+ /**
61
+ * Property for passing a new icon to replace the default checked icon.
62
+ */
63
+ checkedIcon?: React.ReactNode;
64
+ /**
65
+ * Property to specify the size of the right icon.
66
+ */
67
+ iconRightSize?: number | string;
68
+ /**
69
+ * Unique identifier for the input element. Used for accessibility linking.
70
+ */
71
+ id?: string;
72
+ /**
73
+ * Accessible label for screen readers when no visible label is present.
74
+ */
75
+ "aria-label"?: string;
76
+ /**
77
+ * Override border radius for top-left corner.
78
+ */
79
+ borderTopLeftRadius?: number;
80
+ /**
81
+ * Override border radius for top-right corner.
82
+ */
83
+ borderTopRightRadius?: number;
84
+ /**
85
+ * Override border radius for bottom-left corner.
86
+ */
87
+ borderBottomLeftRadius?: number;
88
+ /**
89
+ * Override border radius for bottom-right corner.
90
+ */
91
+ borderBottomRightRadius?: number;
92
+ /**
93
+ * Custom background color for the input.
94
+ */
95
+ backgroundColor?: string;
96
+ /**
97
+ * Test identifier for the input.
98
+ */
99
+ testID?: string;
100
+ }
101
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
102
+
103
+ export { Input, type InputProps };
@@ -0,0 +1,103 @@
1
+ import React, { InputHTMLAttributes } from 'react';
2
+
3
+ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> {
4
+ /**
5
+ * Property for specifying the value of the control.
6
+ */
7
+ value?: string;
8
+ /**
9
+ * Property for specifying the placeholder of the control.
10
+ */
11
+ placeholder?: string;
12
+ /**
13
+ * Event handler when the value changes (for controlled mode).
14
+ */
15
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
16
+ /**
17
+ * Event handler when the text changes (alternative to onChange).
18
+ */
19
+ onChangeText?: (text: string) => void;
20
+ /**
21
+ * Property for changing the size of the input.
22
+ */
23
+ size?: "xl" | "l" | "m" | "s" | "xs";
24
+ /**
25
+ * Property for disabling the control.
26
+ */
27
+ disabled?: boolean;
28
+ /**
29
+ * Property for displaying a label above the input.
30
+ */
31
+ label?: string;
32
+ /**
33
+ * Property for displaying an error message and highlighting the control as invalid.
34
+ */
35
+ errorMessage?: string;
36
+ /**
37
+ * Property for displaying an error and highlighting the control as invalid.
38
+ */
39
+ error?: boolean;
40
+ /**
41
+ * Property to display an icon on the left side.
42
+ */
43
+ iconLeft?: React.ReactNode;
44
+ /**
45
+ * Property to display an icon on the right side.
46
+ */
47
+ iconRight?: React.ReactNode;
48
+ /**
49
+ * Add function clear for input.
50
+ */
51
+ extraClear?: boolean;
52
+ /**
53
+ * Function triggered when user clicks on extraClear button.
54
+ */
55
+ onRemove?: () => void;
56
+ /**
57
+ * Property for show checked status in input. Show only if not errorMessage.
58
+ */
59
+ checked?: boolean;
60
+ /**
61
+ * Property for passing a new icon to replace the default checked icon.
62
+ */
63
+ checkedIcon?: React.ReactNode;
64
+ /**
65
+ * Property to specify the size of the right icon.
66
+ */
67
+ iconRightSize?: number | string;
68
+ /**
69
+ * Unique identifier for the input element. Used for accessibility linking.
70
+ */
71
+ id?: string;
72
+ /**
73
+ * Accessible label for screen readers when no visible label is present.
74
+ */
75
+ "aria-label"?: string;
76
+ /**
77
+ * Override border radius for top-left corner.
78
+ */
79
+ borderTopLeftRadius?: number;
80
+ /**
81
+ * Override border radius for top-right corner.
82
+ */
83
+ borderTopRightRadius?: number;
84
+ /**
85
+ * Override border radius for bottom-left corner.
86
+ */
87
+ borderBottomLeftRadius?: number;
88
+ /**
89
+ * Override border radius for bottom-right corner.
90
+ */
91
+ borderBottomRightRadius?: number;
92
+ /**
93
+ * Custom background color for the input.
94
+ */
95
+ backgroundColor?: string;
96
+ /**
97
+ * Test identifier for the input.
98
+ */
99
+ testID?: string;
100
+ }
101
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
102
+
103
+ export { Input, type InputProps };