@xsolla/xui-input-pin 0.74.0 → 0.75.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.
@@ -0,0 +1,116 @@
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
+ declare interface OnInputPinCompleteProps {
10
+ isComplete: boolean;
11
+ value: string;
12
+ }
13
+ declare interface InputPinProps {
14
+ /**
15
+ * Current value of the input pin
16
+ */
17
+ value?: string;
18
+
19
+ /**
20
+ * Function that will be called when the input value changes
21
+ */
22
+ onChange?: (props: OnInputPinCompleteProps) => void;
23
+
24
+ /**
25
+ * Function that will be called when the input is completed
26
+ */
27
+ onComplete?: (props: OnInputPinCompleteProps) => void;
28
+
29
+ /**
30
+ * The length of the code to be input. Default is 4
31
+ */
32
+ codeLength?: number;
33
+
34
+ /**
35
+ * @deprecated Use codeLength instead
36
+ */
37
+ length?: number;
38
+
39
+ /**
40
+ * Property for changing the size of the input
41
+ */
42
+ size?: "xl" | "lg" | "md" | "sm" | "xs";
43
+
44
+ /**
45
+ * @deprecated Use disabled and error props instead
46
+ */
47
+ state?: "default" | "hover" | "disable" | "error";
48
+
49
+ /**
50
+ * Property for disabling the control
51
+ */
52
+ disabled?: boolean;
53
+
54
+ /**
55
+ * Property for displaying an error state
56
+ */
57
+ error?: boolean;
58
+
59
+ /**
60
+ * Property for displaying a label above the input
61
+ */
62
+ label?: string;
63
+
64
+ /**
65
+ * Property for displaying an error message
66
+ */
67
+ errorMessage?: string;
68
+
69
+ /**
70
+ * @deprecated Use errorMessage instead
71
+ */
72
+ errorLabel?: string;
73
+
74
+ /**
75
+ * Whether to hide the text (like a password field)
76
+ */
77
+ secureTextEntry?: boolean;
78
+
79
+ /**
80
+ * Show dot placeholders in empty inputs
81
+ */
82
+ showPlaceholderDots?: boolean;
83
+
84
+ /**
85
+ * Expands input cells to fill the width of the container
86
+ */
87
+ flexibleWidth?: boolean;
88
+
89
+ /**
90
+ * Boolean value indicating if the input is filled or not
91
+ */
92
+ isComplete?: boolean;
93
+
94
+ /**
95
+ * The current focused input index
96
+ */
97
+ currentFocus?: number;
98
+
99
+ /**
100
+ * Function to add a ref to an input element
101
+ */
102
+ addRef?: (index: number) => (element: HTMLInputElement | null) => void;
103
+
104
+ /**
105
+ * Test identifier for the component
106
+ */
107
+ testID?: string;
108
+
109
+ /**
110
+ * Accessible label for screen readers (use when no visible label)
111
+ */
112
+ "aria-label"?: string;
113
+ }
114
+ declare var InputPin: React.FC<InputPinProps>;
115
+ export type { InputPinProps, OnInputPinCompleteProps };
116
+ declare export { InputPin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-input-pin",
3
- "version": "0.74.0",
3
+ "version": "0.75.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-button": "0.74.0",
17
- "@xsolla/xui-core": "0.74.0",
18
- "@xsolla/xui-primitives-core": "0.74.0"
16
+ "@xsolla/xui-button": "0.75.0",
17
+ "@xsolla/xui-core": "0.75.0",
18
+ "@xsolla/xui-primitives-core": "0.75.0"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "react": ">=16.8.0",
@@ -0,0 +1,116 @@
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
+ declare interface OnInputPinCompleteProps {
10
+ isComplete: boolean;
11
+ value: string;
12
+ }
13
+ declare interface InputPinProps {
14
+ /**
15
+ * Current value of the input pin
16
+ */
17
+ value?: string;
18
+
19
+ /**
20
+ * Function that will be called when the input value changes
21
+ */
22
+ onChange?: (props: OnInputPinCompleteProps) => void;
23
+
24
+ /**
25
+ * Function that will be called when the input is completed
26
+ */
27
+ onComplete?: (props: OnInputPinCompleteProps) => void;
28
+
29
+ /**
30
+ * The length of the code to be input. Default is 4
31
+ */
32
+ codeLength?: number;
33
+
34
+ /**
35
+ * @deprecated Use codeLength instead
36
+ */
37
+ length?: number;
38
+
39
+ /**
40
+ * Property for changing the size of the input
41
+ */
42
+ size?: "xl" | "lg" | "md" | "sm" | "xs";
43
+
44
+ /**
45
+ * @deprecated Use disabled and error props instead
46
+ */
47
+ state?: "default" | "hover" | "disable" | "error";
48
+
49
+ /**
50
+ * Property for disabling the control
51
+ */
52
+ disabled?: boolean;
53
+
54
+ /**
55
+ * Property for displaying an error state
56
+ */
57
+ error?: boolean;
58
+
59
+ /**
60
+ * Property for displaying a label above the input
61
+ */
62
+ label?: string;
63
+
64
+ /**
65
+ * Property for displaying an error message
66
+ */
67
+ errorMessage?: string;
68
+
69
+ /**
70
+ * @deprecated Use errorMessage instead
71
+ */
72
+ errorLabel?: string;
73
+
74
+ /**
75
+ * Whether to hide the text (like a password field)
76
+ */
77
+ secureTextEntry?: boolean;
78
+
79
+ /**
80
+ * Show dot placeholders in empty inputs
81
+ */
82
+ showPlaceholderDots?: boolean;
83
+
84
+ /**
85
+ * Expands input cells to fill the width of the container
86
+ */
87
+ flexibleWidth?: boolean;
88
+
89
+ /**
90
+ * Boolean value indicating if the input is filled or not
91
+ */
92
+ isComplete?: boolean;
93
+
94
+ /**
95
+ * The current focused input index
96
+ */
97
+ currentFocus?: number;
98
+
99
+ /**
100
+ * Function to add a ref to an input element
101
+ */
102
+ addRef?: (index: number) => (element: HTMLInputElement | null) => void;
103
+
104
+ /**
105
+ * Test identifier for the component
106
+ */
107
+ testID?: string;
108
+
109
+ /**
110
+ * Accessible label for screen readers (use when no visible label)
111
+ */
112
+ "aria-label"?: string;
113
+ }
114
+ declare var InputPin: React.FC<InputPinProps>;
115
+ export type { InputPinProps, OnInputPinCompleteProps };
116
+ declare export { InputPin };