|
1
|
{ |
|
2
|
"description": "A controlled segmented input for one-time passwords, PINs, and short numeric verification codes.", |
|
3
|
"methods": [], |
|
4
|
"displayName": "OtpInput", |
|
5
|
"props": { |
|
6
|
"autoFocus": { |
|
7
|
"required": false, |
|
8
|
"tsType": { |
|
9
|
"name": "boolean" |
|
10
|
}, |
|
11
|
"description": "Whether the inputs should focus the first field on mount." |
|
12
|
}, |
|
13
|
"disabled": { |
|
14
|
"required": false, |
|
15
|
"tsType": { |
|
16
|
"name": "boolean" |
|
17
|
}, |
|
18
|
"description": "Whether the inputs are disabled." |
|
19
|
}, |
|
20
|
"groupSize": { |
|
21
|
"required": false, |
|
22
|
"tsType": { |
|
23
|
"name": "number" |
|
24
|
}, |
|
25
|
"description": "How many digits to show before rendering a separator.", |
|
26
|
"defaultValue": { |
|
27
|
"value": "3", |
|
28
|
"computed": false |
|
29
|
} |
|
30
|
}, |
|
31
|
"inputClassName": { |
|
32
|
"required": false, |
|
33
|
"tsType": { |
|
34
|
"name": "string" |
|
35
|
}, |
|
36
|
"description": "Additional class name for each input." |
|
37
|
}, |
|
38
|
"length": { |
|
39
|
"required": false, |
|
40
|
"tsType": { |
|
41
|
"name": "number" |
|
42
|
}, |
|
43
|
"description": "The number of digits in the code.", |
|
44
|
"defaultValue": { |
|
45
|
"value": "6", |
|
46
|
"computed": false |
|
47
|
} |
|
48
|
}, |
|
49
|
"onChange": { |
|
50
|
"required": true, |
|
51
|
"tsType": { |
|
52
|
"name": "signature", |
|
53
|
"type": "function", |
|
54
|
"raw": "(value: string) => void", |
|
55
|
"signature": { |
|
56
|
"arguments": [ |
|
57
|
{ |
|
58
|
"type": { |
|
59
|
"name": "string" |
|
60
|
}, |
|
61
|
"name": "value" |
|
62
|
} |
|
63
|
], |
|
64
|
"return": { |
|
65
|
"name": "void" |
|
66
|
} |
|
67
|
} |
|
68
|
}, |
|
69
|
"description": "Called with the sanitized code whenever it changes." |
|
70
|
}, |
|
71
|
"onComplete": { |
|
72
|
"required": false, |
|
73
|
"tsType": { |
|
74
|
"name": "signature", |
|
75
|
"type": "function", |
|
76
|
"raw": "(value: string) => void", |
|
77
|
"signature": { |
|
78
|
"arguments": [ |
|
79
|
{ |
|
80
|
"type": { |
|
81
|
"name": "string" |
|
82
|
}, |
|
83
|
"name": "value" |
|
84
|
} |
|
85
|
], |
|
86
|
"return": { |
|
87
|
"name": "void" |
|
88
|
} |
|
89
|
} |
|
90
|
}, |
|
91
|
"description": "Called when the sanitized code reaches the configured length." |
|
92
|
}, |
|
93
|
"readOnly": { |
|
94
|
"required": false, |
|
95
|
"tsType": { |
|
96
|
"name": "boolean" |
|
97
|
}, |
|
98
|
"description": "Whether the inputs are read-only." |
|
99
|
}, |
|
100
|
"separator": { |
|
101
|
"required": false, |
|
102
|
"tsType": { |
|
103
|
"name": "ReactReactNode", |
|
104
|
"raw": "React.ReactNode" |
|
105
|
}, |
|
106
|
"description": "The separator rendered between groups.", |
|
107
|
"defaultValue": { |
|
108
|
"value": "\"-\"", |
|
109
|
"computed": false |
|
110
|
} |
|
111
|
}, |
|
112
|
"value": { |
|
113
|
"required": true, |
|
114
|
"tsType": { |
|
115
|
"name": "string" |
|
116
|
}, |
|
117
|
"description": "The controlled code value." |
|
118
|
}, |
|
119
|
"aria-label": { |
|
120
|
"defaultValue": { |
|
121
|
"value": "\"One-time password\"", |
|
122
|
"computed": false |
|
123
|
}, |
|
124
|
"description": "Defines a string value that labels the current element.", |
|
125
|
"tsType": { |
|
126
|
"name": "string" |
|
127
|
}, |
|
128
|
"required": false |
|
129
|
} |
|
130
|
}, |
|
131
|
"composes": [ |
|
132
|
"Omit" |
|
133
|
] |
|
134
|
} |