@progress/kendo-react-inputs 15.0.1-develop.9 → 15.1.0-develop.1
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/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/index.d.mts +8 -1
- package/index.d.ts +8 -1
- package/index.js +1 -1
- package/index.mjs +79 -76
- package/messages/index.d.ts +10 -0
- package/messages/index.js +1 -1
- package/messages/index.mjs +60 -56
- package/otpinput/OTPInput.d.ts +14 -0
- package/otpinput/OTPInput.js +8 -0
- package/otpinput/OTPInput.mjs +301 -0
- package/otpinput/OTPInputCell.d.ts +32 -0
- package/otpinput/OTPInputCell.js +8 -0
- package/otpinput/OTPInputCell.mjs +96 -0
- package/otpinput/OTPInputSeparator.d.ts +15 -0
- package/otpinput/OTPInputSeparator.js +8 -0
- package/otpinput/OTPInputSeparator.mjs +17 -0
- package/otpinput/interfaces/OTPInputBlurEvent.d.ts +23 -0
- package/otpinput/interfaces/OTPInputChangeEvent.d.ts +19 -0
- package/otpinput/interfaces/OTPInputFocusEvent.d.ts +27 -0
- package/otpinput/interfaces/OTPInputHandle.d.ts +33 -0
- package/otpinput/interfaces/OTPInputProps.d.ts +314 -0
- package/otpinput/interfaces/OTPSeparatorIcon.d.ts +27 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { WebMcpProps } from '@progress/kendo-react-common';
|
|
9
|
+
import { OTPSeparatorIcon } from './OTPSeparatorIcon';
|
|
10
|
+
import { OTPInputChangeEvent } from './OTPInputChangeEvent';
|
|
11
|
+
import { OTPInputFocusEvent } from './OTPInputFocusEvent';
|
|
12
|
+
import { OTPInputBlurEvent } from './OTPInputBlurEvent';
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
/**
|
|
15
|
+
* The input `type` options for the OTPInput.
|
|
16
|
+
*/
|
|
17
|
+
export type OTPInputType = 'text' | 'password' | 'number';
|
|
18
|
+
/**
|
|
19
|
+
* Represents the props for the KendoReact
|
|
20
|
+
* [OTPInput](https://www.telerik.com/kendo-react-ui/components/inputs/api/OTPInput) component.
|
|
21
|
+
*/
|
|
22
|
+
export interface OTPInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onFocus' | 'onBlur'> {
|
|
23
|
+
/**
|
|
24
|
+
* Sets the current value of the OTPInput (controlled mode).
|
|
25
|
+
* Unfilled input cells are represented with a space (`' '`).
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <OTPInput value="12 4" length={4} onChange={handleChange} />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
value?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the initial value of the OTPInput (uncontrolled mode).
|
|
35
|
+
* Once set, subsequent updates are managed internally.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <OTPInput defaultValue="12" length={6} />
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
defaultValue?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Sets the total number of individual input cells.
|
|
45
|
+
*
|
|
46
|
+
* @default 4
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```tsx
|
|
50
|
+
* <OTPInput length={6} />
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
length?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Sets the length of each group of input cells.
|
|
56
|
+
*
|
|
57
|
+
* - Provide a `number` to give all groups the same length.
|
|
58
|
+
* - Provide a `number[]` to assign different lengths to each group.
|
|
59
|
+
*
|
|
60
|
+
* The sum of all group lengths must equal `length`.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```tsx
|
|
64
|
+
* // Two groups of 3: "XXX-XXX"
|
|
65
|
+
* <OTPInput length={6} groupLength={3} separator="-" />
|
|
66
|
+
*
|
|
67
|
+
* // Groups of 4-4-4: "XXXX-XXXX-XXXX"
|
|
68
|
+
* <OTPInput length={12} groupLength={[4, 4, 4]} separator="-" />
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
groupLength?: number | number[];
|
|
72
|
+
/**
|
|
73
|
+
* Sets the separator rendered between groups of input cells.
|
|
74
|
+
* Only effective when `groupLength` is set.
|
|
75
|
+
*
|
|
76
|
+
* - Provide a `string` to render a text separator.
|
|
77
|
+
* - Provide an `OTPSeparatorIcon` to render an icon separator.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```tsx
|
|
81
|
+
* // Text separator
|
|
82
|
+
* <OTPInput length={6} groupLength={3} separator="-" />
|
|
83
|
+
*
|
|
84
|
+
* // SVG icon separator
|
|
85
|
+
* <OTPInput length={6} groupLength={3} separator={{ type: 'svgIcon', value: minusIcon }} />
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
separator?: string | OTPSeparatorIcon;
|
|
89
|
+
/**
|
|
90
|
+
* Sets the input type.
|
|
91
|
+
*
|
|
92
|
+
* @default 'text'
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```tsx
|
|
96
|
+
* <OTPInput type="number" length={6} />
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
type?: OTPInputType;
|
|
100
|
+
/**
|
|
101
|
+
* Sets a placeholder character shown in each empty input cell.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```tsx
|
|
105
|
+
* <OTPInput placeholder="·" length={6} />
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
placeholder?: string;
|
|
109
|
+
/**
|
|
110
|
+
* When `true`, renders the input cells as separate boxes with spacing
|
|
111
|
+
* between them. When `false`, renders them as adjacent (joined) cells.
|
|
112
|
+
*
|
|
113
|
+
* @default true
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```tsx
|
|
117
|
+
* <OTPInput spacing={false} length={6} />
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
spacing?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* When `true`, disables the OTPInput so that it cannot be interacted
|
|
123
|
+
* with and receives the `k-disabled` CSS class.
|
|
124
|
+
*
|
|
125
|
+
* @default false
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```tsx
|
|
129
|
+
* <OTPInput disabled={true} length={6} />
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
disabled?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* When `true`, sets the OTPInput to read-only mode.
|
|
135
|
+
*
|
|
136
|
+
* @default false
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```tsx
|
|
140
|
+
* <OTPInput readOnly={true} value="123456" length={6} />
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
readOnly?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Sets additional HTML attributes on every inner `<input>` element.
|
|
146
|
+
* Attributes that are required for the component to work correctly cannot be overridden.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```tsx
|
|
150
|
+
* <OTPInput inputAttributes={{ autoComplete: 'off' }} length={6} />
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
inputAttributes?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
154
|
+
/**
|
|
155
|
+
* Sets the `name` attribute used when the component participates in an
|
|
156
|
+
* HTML form. A hidden `<input>` with this name and the current value
|
|
157
|
+
* is rendered for native form submission.
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```tsx
|
|
161
|
+
* <form>
|
|
162
|
+
* <OTPInput name="verificationCode" length={6} />
|
|
163
|
+
* </form>
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
name?: string;
|
|
167
|
+
/**
|
|
168
|
+
* Marks the field as required for HTML5 constraint validation.
|
|
169
|
+
*
|
|
170
|
+
* @default false
|
|
171
|
+
*
|
|
172
|
+
* @remarks
|
|
173
|
+
* This property is related to accessibility.
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* ```tsx
|
|
177
|
+
* <OTPInput required={true} length={6} />
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
required?: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* When `false`, renders the component in an invalid visual state.
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```tsx
|
|
186
|
+
* <OTPInput valid={false} length={6} />
|
|
187
|
+
* ```
|
|
188
|
+
*/
|
|
189
|
+
valid?: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Configures the `size` of the component.
|
|
192
|
+
*
|
|
193
|
+
* The available options are:
|
|
194
|
+
* - `'small'`
|
|
195
|
+
* - `'medium'`
|
|
196
|
+
* - `'large'`
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* ```tsx
|
|
200
|
+
* <OTPInput size="large" length={6} />
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
203
|
+
size?: 'small' | 'medium' | 'large';
|
|
204
|
+
/**
|
|
205
|
+
* Configures the `fillMode` of the component.
|
|
206
|
+
*
|
|
207
|
+
* The available options are:
|
|
208
|
+
* - `'solid'`
|
|
209
|
+
* - `'flat'`
|
|
210
|
+
* - `'outline'`
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```tsx
|
|
214
|
+
* <OTPInput fillMode="outline" length={6} />
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
fillMode?: 'solid' | 'flat' | 'outline';
|
|
218
|
+
/**
|
|
219
|
+
* Configures the `rounded` property of the component.
|
|
220
|
+
*
|
|
221
|
+
* The available options are:
|
|
222
|
+
* - `'small'`
|
|
223
|
+
* - `'medium'`
|
|
224
|
+
* - `'large'`
|
|
225
|
+
* - `'full'`
|
|
226
|
+
* - `'none'
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```tsx
|
|
230
|
+
* <OTPInput rounded="full" length={6} />
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
rounded?: 'small' | 'medium' | 'large' | 'full' | 'none';
|
|
234
|
+
/**
|
|
235
|
+
* Fires when the user changes the value of any input cell.
|
|
236
|
+
*
|
|
237
|
+
* @example
|
|
238
|
+
* ```tsx
|
|
239
|
+
* <OTPInput onChange={(e) => console.log(e.value)} length={6} />
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
onChange?: (event: OTPInputChangeEvent) => void;
|
|
243
|
+
/**
|
|
244
|
+
* Fires when any input cell receives focus.
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
* ```tsx
|
|
248
|
+
* <OTPInput onFocus={(e) => console.log('focused cell index', e.cellIndex)} length={6} />
|
|
249
|
+
* ```
|
|
250
|
+
*/
|
|
251
|
+
onFocus?: (event: OTPInputFocusEvent) => void;
|
|
252
|
+
/**
|
|
253
|
+
* Fires when the entire OTPInput loses focus (not on every
|
|
254
|
+
* inter-cell navigation).
|
|
255
|
+
*
|
|
256
|
+
* @example
|
|
257
|
+
* ```tsx
|
|
258
|
+
* <OTPInput onBlur={(e) => console.log('blurred')} length={6} />
|
|
259
|
+
* ```
|
|
260
|
+
*/
|
|
261
|
+
onBlur?: (event: OTPInputBlurEvent) => void;
|
|
262
|
+
/**
|
|
263
|
+
* Sets the `aria-label` attribute on the OTPInput wrapper element.
|
|
264
|
+
*
|
|
265
|
+
* @remarks
|
|
266
|
+
* This property is related to accessibility.
|
|
267
|
+
*
|
|
268
|
+
* @example
|
|
269
|
+
* ```tsx
|
|
270
|
+
* <OTPInput ariaLabel="Enter your 6-digit code" length={6} />
|
|
271
|
+
* ```
|
|
272
|
+
*/
|
|
273
|
+
ariaLabel?: string;
|
|
274
|
+
/**
|
|
275
|
+
* Sets the `aria-labelledby` attribute on the OTPInput wrapper element.
|
|
276
|
+
*
|
|
277
|
+
* @remarks
|
|
278
|
+
* This property is related to accessibility.
|
|
279
|
+
*/
|
|
280
|
+
ariaLabelledBy?: string;
|
|
281
|
+
/**
|
|
282
|
+
* Sets the `aria-describedby` attribute on the OTPInput wrapper element.
|
|
283
|
+
*
|
|
284
|
+
* @remarks
|
|
285
|
+
* This property is related to accessibility.
|
|
286
|
+
*/
|
|
287
|
+
ariaDescribedBy?: string;
|
|
288
|
+
/**
|
|
289
|
+
* Sets the `id` attribute on the OTPInput wrapper element.
|
|
290
|
+
*
|
|
291
|
+
* @example
|
|
292
|
+
* ```tsx
|
|
293
|
+
* <OTPInput id="otp-code" length={6} />
|
|
294
|
+
* ```
|
|
295
|
+
*/
|
|
296
|
+
id?: string;
|
|
297
|
+
/**
|
|
298
|
+
* Enables Web MCP tool registration for this component.
|
|
299
|
+
* Requires a parent `WebMcpProvider` from `@progress/kendo-react-webmcp`.
|
|
300
|
+
*
|
|
301
|
+
* Pass `true` for defaults or an object for fine-grained control.
|
|
302
|
+
* When absent or `false`, zero webMcp overhead.
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* ```tsx
|
|
306
|
+
* // Boolean — use provider's dataName
|
|
307
|
+
* <OTPInput webMcp length={6} onChange={handleChange} />
|
|
308
|
+
*
|
|
309
|
+
* // Config object — override dataName per component
|
|
310
|
+
* <OTPInput webMcp={{ dataName: 'verificationCode' }} length={6} onChange={handleChange} />
|
|
311
|
+
* ```
|
|
312
|
+
*/
|
|
313
|
+
webMcp?: boolean | WebMcpProps;
|
|
314
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { SVGIcon } from '@progress/kendo-svg-icons';
|
|
9
|
+
/**
|
|
10
|
+
* Describes the icon separator for the OTPInput.
|
|
11
|
+
*/
|
|
12
|
+
export interface OTPSeparatorIcon {
|
|
13
|
+
/**
|
|
14
|
+
* Sets the type of icon to display as a separator.
|
|
15
|
+
*
|
|
16
|
+
* The available options are:
|
|
17
|
+
* - `'svgIcon'` — an SVG icon from `@progress/kendo-svg-icons`
|
|
18
|
+
* - `'iconClass'` — a CSS class-based icon
|
|
19
|
+
* - `'icon'` — a Kendo font icon name (e.g., `'home'`)
|
|
20
|
+
*/
|
|
21
|
+
type: 'svgIcon' | 'iconClass' | 'icon';
|
|
22
|
+
/**
|
|
23
|
+
* The icon to display. Provide a CSS class string for `'iconClass'`,
|
|
24
|
+
* a Kendo icon name string for `'icon'`, or an `SVGIcon` object for `'svgIcon'`.
|
|
25
|
+
*/
|
|
26
|
+
value: string | SVGIcon;
|
|
27
|
+
}
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-inputs",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-inputs",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1782140873,version:"15.1.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
|
|
|
7
7
|
productName: 'KendoReact',
|
|
8
8
|
productCode: 'KENDOUIREACT',
|
|
9
9
|
productCodes: ['KENDOUIREACT'],
|
|
10
|
-
publishDate:
|
|
11
|
-
version: '15.0
|
|
10
|
+
publishDate: 1782140873,
|
|
11
|
+
version: '15.1.0-develop.1',
|
|
12
12
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
|
|
13
13
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-inputs",
|
|
3
|
-
"version": "15.0
|
|
3
|
+
"version": "15.1.0-develop.1",
|
|
4
4
|
"description": "React Inputs offer a customizable interface for users to enter and pick different information. KendoReact Input package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"@progress/kendo-drawing": "^1.21.2",
|
|
29
29
|
"@progress/kendo-inputs-common": "^3.1.0",
|
|
30
30
|
"@progress/kendo-licensing": "^1.7.2",
|
|
31
|
-
"@progress/kendo-react-animation": "15.0
|
|
32
|
-
"@progress/kendo-react-buttons": "15.0
|
|
33
|
-
"@progress/kendo-react-common": "15.0
|
|
34
|
-
"@progress/kendo-react-dialogs": "15.0
|
|
35
|
-
"@progress/kendo-react-layout": "15.0
|
|
36
|
-
"@progress/kendo-react-intl": "15.0
|
|
37
|
-
"@progress/kendo-react-labels": "15.0
|
|
38
|
-
"@progress/kendo-react-popup": "15.0
|
|
31
|
+
"@progress/kendo-react-animation": "15.1.0-develop.1",
|
|
32
|
+
"@progress/kendo-react-buttons": "15.1.0-develop.1",
|
|
33
|
+
"@progress/kendo-react-common": "15.1.0-develop.1",
|
|
34
|
+
"@progress/kendo-react-dialogs": "15.1.0-develop.1",
|
|
35
|
+
"@progress/kendo-react-layout": "15.1.0-develop.1",
|
|
36
|
+
"@progress/kendo-react-intl": "15.1.0-develop.1",
|
|
37
|
+
"@progress/kendo-react-labels": "15.1.0-develop.1",
|
|
38
|
+
"@progress/kendo-react-popup": "15.1.0-develop.1",
|
|
39
39
|
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
40
40
|
"react": "^18.0.0 || ^19.0.0",
|
|
41
41
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"package": {
|
|
83
83
|
"productName": "KendoReact",
|
|
84
84
|
"productCode": "KENDOUIREACT",
|
|
85
|
-
"publishDate":
|
|
85
|
+
"publishDate": 1782140873,
|
|
86
86
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
87
87
|
}
|
|
88
88
|
},
|