@xsolla/xui-input-payment 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.
- package/native/index.d.mts +83 -0
- package/native/index.d.ts +83 -0
- package/native/index.js +957 -0
- package/native/index.js.map +1 -0
- package/native/index.mjs +944 -0
- package/native/index.mjs.map +1 -0
- package/package.json +58 -0
- package/web/index.d.mts +83 -0
- package/web/index.d.ts +83 -0
- package/web/index.js +945 -0
- package/web/index.js.map +1 -0
- package/web/index.mjs +928 -0
- package/web/index.mjs.map +1 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React, { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Supported payment system keys
|
|
5
|
+
*/
|
|
6
|
+
type PaymentSystemKey = "visa" | "mastercard" | "amex" | "diners" | "maestro" | "unionpay" | "discover" | "jcb" | "aura" | "cartesbancaires" | "cirrus" | "dankort" | "elo" | "hipercard" | "mir" | "naranja" | "paypal" | "sodexo" | "uatp";
|
|
7
|
+
interface InputPaymentProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> {
|
|
8
|
+
/**
|
|
9
|
+
* Property for specifying the value of the control.
|
|
10
|
+
*/
|
|
11
|
+
value?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Property to display the icon to the left of the content.
|
|
14
|
+
*/
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Property for specifying the placeholder of the control.
|
|
18
|
+
*/
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Event handler when the value changes (for controlled mode).
|
|
22
|
+
*/
|
|
23
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Event handler when the text changes (alternative to onChange).
|
|
26
|
+
*/
|
|
27
|
+
onChangeText?: (text: string) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Property for changing the size of the input.
|
|
30
|
+
*/
|
|
31
|
+
size?: "xl" | "l" | "m" | "s" | "xs";
|
|
32
|
+
/**
|
|
33
|
+
* Property for specifying the name of the control.
|
|
34
|
+
*/
|
|
35
|
+
name?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Property for disabling the control and highlighting it as an inactive state.
|
|
38
|
+
*/
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Property for displaying an error message and highlighting the control as invalid.
|
|
42
|
+
*/
|
|
43
|
+
errorMessage?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Property for displaying an error and highlighting the control as invalid.
|
|
46
|
+
*/
|
|
47
|
+
error?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Property to specify the possible payment systems displayed on the right.
|
|
50
|
+
*/
|
|
51
|
+
possiblePayments?: PaymentSystemKey[];
|
|
52
|
+
/**
|
|
53
|
+
* Property to set the maximum number of visible possible payment systems at the same time on the right side of the input.
|
|
54
|
+
*/
|
|
55
|
+
maxVisiblePossiblePayments?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Property to show the recognized payment system (all possible payment systems are hidden and only the current one passed by this prop is displayed).
|
|
58
|
+
*/
|
|
59
|
+
recognizedPayment?: PaymentSystemKey;
|
|
60
|
+
/**
|
|
61
|
+
* Callback when card type is auto-detected from the input value.
|
|
62
|
+
*/
|
|
63
|
+
onRecognizedPaymentChange?: (payment: PaymentSystemKey | null) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Property to enable automatic payment system detection from input value.
|
|
66
|
+
*/
|
|
67
|
+
autoDetect?: boolean;
|
|
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
|
+
* Test identifier for the component.
|
|
78
|
+
*/
|
|
79
|
+
testID?: string;
|
|
80
|
+
}
|
|
81
|
+
declare const InputPayment: React.ForwardRefExoticComponent<InputPaymentProps & React.RefAttributes<HTMLInputElement>>;
|
|
82
|
+
|
|
83
|
+
export { InputPayment, type InputPaymentProps, type PaymentSystemKey };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React, { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Supported payment system keys
|
|
5
|
+
*/
|
|
6
|
+
type PaymentSystemKey = "visa" | "mastercard" | "amex" | "diners" | "maestro" | "unionpay" | "discover" | "jcb" | "aura" | "cartesbancaires" | "cirrus" | "dankort" | "elo" | "hipercard" | "mir" | "naranja" | "paypal" | "sodexo" | "uatp";
|
|
7
|
+
interface InputPaymentProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> {
|
|
8
|
+
/**
|
|
9
|
+
* Property for specifying the value of the control.
|
|
10
|
+
*/
|
|
11
|
+
value?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Property to display the icon to the left of the content.
|
|
14
|
+
*/
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Property for specifying the placeholder of the control.
|
|
18
|
+
*/
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Event handler when the value changes (for controlled mode).
|
|
22
|
+
*/
|
|
23
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Event handler when the text changes (alternative to onChange).
|
|
26
|
+
*/
|
|
27
|
+
onChangeText?: (text: string) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Property for changing the size of the input.
|
|
30
|
+
*/
|
|
31
|
+
size?: "xl" | "l" | "m" | "s" | "xs";
|
|
32
|
+
/**
|
|
33
|
+
* Property for specifying the name of the control.
|
|
34
|
+
*/
|
|
35
|
+
name?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Property for disabling the control and highlighting it as an inactive state.
|
|
38
|
+
*/
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Property for displaying an error message and highlighting the control as invalid.
|
|
42
|
+
*/
|
|
43
|
+
errorMessage?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Property for displaying an error and highlighting the control as invalid.
|
|
46
|
+
*/
|
|
47
|
+
error?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Property to specify the possible payment systems displayed on the right.
|
|
50
|
+
*/
|
|
51
|
+
possiblePayments?: PaymentSystemKey[];
|
|
52
|
+
/**
|
|
53
|
+
* Property to set the maximum number of visible possible payment systems at the same time on the right side of the input.
|
|
54
|
+
*/
|
|
55
|
+
maxVisiblePossiblePayments?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Property to show the recognized payment system (all possible payment systems are hidden and only the current one passed by this prop is displayed).
|
|
58
|
+
*/
|
|
59
|
+
recognizedPayment?: PaymentSystemKey;
|
|
60
|
+
/**
|
|
61
|
+
* Callback when card type is auto-detected from the input value.
|
|
62
|
+
*/
|
|
63
|
+
onRecognizedPaymentChange?: (payment: PaymentSystemKey | null) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Property to enable automatic payment system detection from input value.
|
|
66
|
+
*/
|
|
67
|
+
autoDetect?: boolean;
|
|
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
|
+
* Test identifier for the component.
|
|
78
|
+
*/
|
|
79
|
+
testID?: string;
|
|
80
|
+
}
|
|
81
|
+
declare const InputPayment: React.ForwardRefExoticComponent<InputPaymentProps & React.RefAttributes<HTMLInputElement>>;
|
|
82
|
+
|
|
83
|
+
export { InputPayment, type InputPaymentProps, type PaymentSystemKey };
|