@progress/kendo-react-inputs 5.10.0-dev.202212021149 → 5.10.0-dev.202212021346
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/README.md +19 -17
- package/about.md +1 -1
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/dist/es/maskedtextbox/MaskedTextBox.d.ts +4 -0
- package/dist/es/maskedtextbox/MaskedTextBox.js +11 -2
- package/dist/es/maskedtextbox/MaskedTextBoxProps.d.ts +9 -1
- package/dist/es/numerictextbox/NumericTextBox.js +7 -1
- package/dist/es/numerictextbox/interfaces/NumericTextBoxProps.d.ts +9 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/textbox/Textbox.d.ts +6 -0
- package/dist/npm/maskedtextbox/MaskedTextBox.d.ts +4 -0
- package/dist/npm/maskedtextbox/MaskedTextBox.js +10 -1
- package/dist/npm/maskedtextbox/MaskedTextBoxProps.d.ts +9 -1
- package/dist/npm/numerictextbox/NumericTextBox.js +6 -0
- package/dist/npm/numerictextbox/interfaces/NumericTextBoxProps.d.ts +9 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/textbox/Textbox.d.ts +6 -0
- package/dist/systemjs/kendo-react-inputs.js +1 -1
- package/package.json +16 -16
|
@@ -24,6 +24,8 @@ export declare class MaskedTextBoxWithoutContext extends React.Component<MaskedT
|
|
|
24
24
|
id: PropTypes.Requireable<string>;
|
|
25
25
|
style: PropTypes.Requireable<object>;
|
|
26
26
|
className: PropTypes.Requireable<string>;
|
|
27
|
+
prefix: PropTypes.Requireable<any>;
|
|
28
|
+
suffix: PropTypes.Requireable<any>;
|
|
27
29
|
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
28
30
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
29
31
|
width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
@@ -65,6 +67,8 @@ export declare class MaskedTextBoxWithoutContext extends React.Component<MaskedT
|
|
|
65
67
|
};
|
|
66
68
|
required: boolean;
|
|
67
69
|
validityStyles: boolean;
|
|
70
|
+
prefix: (_: any) => null;
|
|
71
|
+
suffix: (_: any) => null;
|
|
68
72
|
size: "small" | "medium" | "large" | null | undefined;
|
|
69
73
|
rounded: "small" | "medium" | "full" | "large" | null | undefined;
|
|
70
74
|
fillMode: "flat" | "outline" | "solid" | null | undefined;
|
|
@@ -28,7 +28,7 @@ import * as React from 'react';
|
|
|
28
28
|
import * as PropTypes from 'prop-types';
|
|
29
29
|
import { MaskingService } from './masking.service';
|
|
30
30
|
import { defaultRules, maskingChanged, returnFalse } from './utils';
|
|
31
|
-
import { guid, classNames, getTabIndex, withPropsContext, createPropsContext, kendoThemeMaps } from '@progress/kendo-react-common';
|
|
31
|
+
import { guid, classNames, getTabIndex, withPropsContext, createPropsContext, kendoThemeMaps, useCustomComponent } from '@progress/kendo-react-common';
|
|
32
32
|
import { FloatingLabel } from '@progress/kendo-react-labels';
|
|
33
33
|
import { validatePackage } from '@progress/kendo-react-common';
|
|
34
34
|
import { packageMetadata } from '../package-metadata';
|
|
@@ -285,6 +285,9 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
285
285
|
var inputId = this.props.id || this._inputId;
|
|
286
286
|
var isValid = !this.validityStyles || this.validity.valid;
|
|
287
287
|
var style = this.props.style || {};
|
|
288
|
+
var _f = this.props, _g = _f.prefix, prefix = _g === void 0 ? MaskedTextBoxWithoutContext.defaultProps.prefix : _g, _h = _f.suffix, suffix = _h === void 0 ? MaskedTextBoxWithoutContext.defaultProps.suffix : _h;
|
|
289
|
+
var Prefix = useCustomComponent(prefix)[0];
|
|
290
|
+
var Suffix = useCustomComponent(suffix)[0];
|
|
288
291
|
var component = (React.createElement("span", { dir: this.props.dir, className: classNames('k-maskedtextbox k-input', (_a = {},
|
|
289
292
|
_a["k-input-".concat(kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
290
293
|
_a["k-input-".concat(fillMode)] = fillMode,
|
|
@@ -294,7 +297,9 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
294
297
|
_a['k-disabled'] = this.props.disabled,
|
|
295
298
|
_a), this.props.className), style: !this.props.label
|
|
296
299
|
? __assign({ width: this.props.width }, style) : style },
|
|
297
|
-
React.createElement(
|
|
300
|
+
React.createElement(Prefix, null),
|
|
301
|
+
React.createElement("input", { type: "text", autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", spellCheck: false, className: "k-input-inner", value: this.value, id: inputId, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, name: this.props.name, tabIndex: getTabIndex(this.props.tabIndex, this.props.disabled, true), accessKey: this.props.accessKey, title: this.props.title, disabled: this.props.disabled || undefined, readOnly: this.props.readonly || undefined, placeholder: this.props.placeholder, ref: function (input) { return _this._input = input; }, onChange: this.onChangeHandler, onPaste: this.pasteHandler, onFocus: this.focusHandler, onBlur: this.blurHandler, onDragStart: returnFalse, onDrop: returnFalse }),
|
|
302
|
+
React.createElement(Suffix, null)));
|
|
298
303
|
return this.props.label
|
|
299
304
|
? (React.createElement(FloatingLabel, { label: this.props.label, editorId: inputId, editorValue: this.value, editorValid: isValid, editorDisabled: this.props.disabled, editorPlaceholder: this.props.placeholder, children: component, style: { width: this.props.width }, dir: this.props.dir }))
|
|
300
305
|
: component;
|
|
@@ -347,6 +352,8 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
347
352
|
id: PropTypes.string,
|
|
348
353
|
style: PropTypes.object,
|
|
349
354
|
className: PropTypes.string,
|
|
355
|
+
prefix: PropTypes.any,
|
|
356
|
+
suffix: PropTypes.any,
|
|
350
357
|
ariaLabelledBy: PropTypes.string,
|
|
351
358
|
ariaDescribedBy: PropTypes.string,
|
|
352
359
|
width: PropTypes.oneOfType([
|
|
@@ -400,6 +407,8 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
400
407
|
rules: defaultRules,
|
|
401
408
|
required: false,
|
|
402
409
|
validityStyles: true,
|
|
410
|
+
prefix: function (_) { return null; },
|
|
411
|
+
suffix: function (_) { return null; },
|
|
403
412
|
size: 'medium',
|
|
404
413
|
rounded: 'medium',
|
|
405
414
|
fillMode: 'solid'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { FormComponentProps } from '@progress/kendo-react-common';
|
|
2
|
+
import { CustomComponent, FormComponentProps } from '@progress/kendo-react-common';
|
|
3
3
|
import { MaskedTextBox } from './MaskedTextBox';
|
|
4
4
|
/**
|
|
5
5
|
* The arguments for a MaskedTextBox event.
|
|
@@ -91,6 +91,14 @@ export interface MaskedTextBoxProps extends FormComponentProps {
|
|
|
91
91
|
* Sets the `id` of the `input` DOM element.
|
|
92
92
|
*/
|
|
93
93
|
id?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Sets a custom prefix to the MaskedTextBox component.
|
|
96
|
+
*/
|
|
97
|
+
prefix?: CustomComponent<any>;
|
|
98
|
+
/**
|
|
99
|
+
* Sets a custom suffix to the MaskedTextBox component.
|
|
100
|
+
*/
|
|
101
|
+
suffix?: CustomComponent<any>;
|
|
94
102
|
/**
|
|
95
103
|
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
96
104
|
* For example these elements could contain error or hint message.
|
|
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import * as React from 'react';
|
|
13
13
|
import * as PropTypes from 'prop-types';
|
|
14
14
|
import { useInternationalization, useLocalization } from '@progress/kendo-react-intl';
|
|
15
|
-
import { classNames, guid, getTabIndex, dispatchEvent, createPropsContext, usePropsContext, kendoThemeMaps } from '@progress/kendo-react-common';
|
|
15
|
+
import { classNames, guid, getTabIndex, dispatchEvent, createPropsContext, usePropsContext, kendoThemeMaps, useCustomComponent } from '@progress/kendo-react-common';
|
|
16
16
|
import { FloatingLabel } from '@progress/kendo-react-labels';
|
|
17
17
|
import { validatePackage } from '@progress/kendo-react-common';
|
|
18
18
|
import { packageMetadata } from '../package-metadata';
|
|
@@ -49,6 +49,8 @@ export var NumericTextBox = React.forwardRef(function (directProps, target) {
|
|
|
49
49
|
stateRef.current.currentLooseValue :
|
|
50
50
|
getStateOrPropsValue(props.value, stateValueRef.current), props.format, intlService);
|
|
51
51
|
prevLooseValueRef.current = looseValue;
|
|
52
|
+
var Prefix = useCustomComponent(props.prefix)[0];
|
|
53
|
+
var Suffix = useCustomComponent(props.suffix)[0];
|
|
52
54
|
React.useEffect(function () {
|
|
53
55
|
if (elementRef.current && elementRef.current.setCustomValidity) {
|
|
54
56
|
elementRef.current.setCustomValidity(validityGetter().valid
|
|
@@ -270,7 +272,9 @@ export var NumericTextBox = React.forwardRef(function (directProps, target) {
|
|
|
270
272
|
_a['k-required'] = props.required,
|
|
271
273
|
_a['k-disabled'] = props.disabled,
|
|
272
274
|
_a), props.className), "aria-disabled": props.disabled ? 'true' : undefined },
|
|
275
|
+
React.createElement(Prefix, null),
|
|
273
276
|
React.createElement("input", { value: looseValue === null ? '' : looseValue, tabIndex: getTabIndex(props.tabIndex, props.disabled), accessKey: props.accessKey, disabled: props.disabled, title: props.title, "aria-valuemin": props.min, "aria-valuemax": props.max, "aria-label": props.ariaLabel, "aria-labelledby": props.ariaLabelledBy, "aria-describedby": props.ariaDescribedBy, placeholder: props.placeholder, spellCheck: false, autoComplete: 'off', autoCorrect: 'off', type: props.inputType || 'tel', className: 'k-input-inner', id: inputId, name: props.name, readOnly: props.readOnly, style: props.inputStyle, onChange: onChangeHandler, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onPaste: onPasteHandler, onWheel: onWheelHandler, ref: elementRef }),
|
|
277
|
+
React.createElement(Suffix, null),
|
|
274
278
|
props.children,
|
|
275
279
|
props.spinners &&
|
|
276
280
|
(React.createElement("span", { className: "k-input-spinner k-spin-button", onMouseDown: onMouseDown },
|
|
@@ -328,6 +332,8 @@ NumericTextBox.propTypes = {
|
|
|
328
332
|
};
|
|
329
333
|
NumericTextBox.displayName = 'KendoNumericTextBox';
|
|
330
334
|
NumericTextBox.defaultProps = {
|
|
335
|
+
prefix: function (_) { return null; },
|
|
336
|
+
suffix: function (_) { return null; },
|
|
331
337
|
step: 1,
|
|
332
338
|
spinners: true,
|
|
333
339
|
disabled: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { FormComponentProps } from '@progress/kendo-react-common';
|
|
2
|
+
import { CustomComponent, FormComponentProps } from '@progress/kendo-react-common';
|
|
3
3
|
import { NumberFormatOptions } from '@progress/kendo-react-intl';
|
|
4
4
|
import { NumericTextBoxChangeEvent } from './NumericTextBoxChangeEvent';
|
|
5
5
|
import { NumericTextBoxFocusEvent } from './NumericTextBoxFocusEvent';
|
|
@@ -81,6 +81,14 @@ export interface NumericTextBoxProps extends FormComponentProps {
|
|
|
81
81
|
* Sets the `id` of the `input` DOM element.
|
|
82
82
|
*/
|
|
83
83
|
id?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Sets a custom prefix to the NumericTextBox component.
|
|
86
|
+
*/
|
|
87
|
+
prefix?: CustomComponent<any>;
|
|
88
|
+
/**
|
|
89
|
+
* Sets a custom suffix to the NumericTextBox component.
|
|
90
|
+
*/
|
|
91
|
+
suffix?: CustomComponent<any>;
|
|
84
92
|
/**
|
|
85
93
|
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
86
94
|
* For example these elements could contain error or hint message.
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-inputs',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1669987761,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
11
11
|
};
|
|
@@ -53,7 +53,13 @@ export interface TextBoxProps extends Omit<React.InputHTMLAttributes<HTMLInputEl
|
|
|
53
53
|
* Indicates if the component is in `valid` state
|
|
54
54
|
*/
|
|
55
55
|
valid?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Sets a custom prefix to the TextBox component.
|
|
58
|
+
*/
|
|
56
59
|
prefix?: CustomComponent<any>;
|
|
60
|
+
/**
|
|
61
|
+
* Sets a custom suffix to the TextBox component.
|
|
62
|
+
*/
|
|
57
63
|
suffix?: CustomComponent<any>;
|
|
58
64
|
}
|
|
59
65
|
/**
|
|
@@ -24,6 +24,8 @@ export declare class MaskedTextBoxWithoutContext extends React.Component<MaskedT
|
|
|
24
24
|
id: PropTypes.Requireable<string>;
|
|
25
25
|
style: PropTypes.Requireable<object>;
|
|
26
26
|
className: PropTypes.Requireable<string>;
|
|
27
|
+
prefix: PropTypes.Requireable<any>;
|
|
28
|
+
suffix: PropTypes.Requireable<any>;
|
|
27
29
|
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
28
30
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
29
31
|
width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
@@ -65,6 +67,8 @@ export declare class MaskedTextBoxWithoutContext extends React.Component<MaskedT
|
|
|
65
67
|
};
|
|
66
68
|
required: boolean;
|
|
67
69
|
validityStyles: boolean;
|
|
70
|
+
prefix: (_: any) => null;
|
|
71
|
+
suffix: (_: any) => null;
|
|
68
72
|
size: "small" | "medium" | "large" | null | undefined;
|
|
69
73
|
rounded: "small" | "medium" | "full" | "large" | null | undefined;
|
|
70
74
|
fillMode: "flat" | "outline" | "solid" | null | undefined;
|
|
@@ -288,6 +288,9 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
288
288
|
var inputId = this.props.id || this._inputId;
|
|
289
289
|
var isValid = !this.validityStyles || this.validity.valid;
|
|
290
290
|
var style = this.props.style || {};
|
|
291
|
+
var _f = this.props, _g = _f.prefix, prefix = _g === void 0 ? MaskedTextBoxWithoutContext.defaultProps.prefix : _g, _h = _f.suffix, suffix = _h === void 0 ? MaskedTextBoxWithoutContext.defaultProps.suffix : _h;
|
|
292
|
+
var Prefix = (0, kendo_react_common_1.useCustomComponent)(prefix)[0];
|
|
293
|
+
var Suffix = (0, kendo_react_common_1.useCustomComponent)(suffix)[0];
|
|
291
294
|
var component = (React.createElement("span", { dir: this.props.dir, className: (0, kendo_react_common_1.classNames)('k-maskedtextbox k-input', (_a = {},
|
|
292
295
|
_a["k-input-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
293
296
|
_a["k-input-".concat(fillMode)] = fillMode,
|
|
@@ -297,7 +300,9 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
297
300
|
_a['k-disabled'] = this.props.disabled,
|
|
298
301
|
_a), this.props.className), style: !this.props.label
|
|
299
302
|
? __assign({ width: this.props.width }, style) : style },
|
|
300
|
-
React.createElement(
|
|
303
|
+
React.createElement(Prefix, null),
|
|
304
|
+
React.createElement("input", { type: "text", autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", spellCheck: false, className: "k-input-inner", value: this.value, id: inputId, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, name: this.props.name, tabIndex: (0, kendo_react_common_1.getTabIndex)(this.props.tabIndex, this.props.disabled, true), accessKey: this.props.accessKey, title: this.props.title, disabled: this.props.disabled || undefined, readOnly: this.props.readonly || undefined, placeholder: this.props.placeholder, ref: function (input) { return _this._input = input; }, onChange: this.onChangeHandler, onPaste: this.pasteHandler, onFocus: this.focusHandler, onBlur: this.blurHandler, onDragStart: utils_1.returnFalse, onDrop: utils_1.returnFalse }),
|
|
305
|
+
React.createElement(Suffix, null)));
|
|
301
306
|
return this.props.label
|
|
302
307
|
? (React.createElement(kendo_react_labels_1.FloatingLabel, { label: this.props.label, editorId: inputId, editorValue: this.value, editorValid: isValid, editorDisabled: this.props.disabled, editorPlaceholder: this.props.placeholder, children: component, style: { width: this.props.width }, dir: this.props.dir }))
|
|
303
308
|
: component;
|
|
@@ -350,6 +355,8 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
350
355
|
id: PropTypes.string,
|
|
351
356
|
style: PropTypes.object,
|
|
352
357
|
className: PropTypes.string,
|
|
358
|
+
prefix: PropTypes.any,
|
|
359
|
+
suffix: PropTypes.any,
|
|
353
360
|
ariaLabelledBy: PropTypes.string,
|
|
354
361
|
ariaDescribedBy: PropTypes.string,
|
|
355
362
|
width: PropTypes.oneOfType([
|
|
@@ -403,6 +410,8 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
403
410
|
rules: utils_1.defaultRules,
|
|
404
411
|
required: false,
|
|
405
412
|
validityStyles: true,
|
|
413
|
+
prefix: function (_) { return null; },
|
|
414
|
+
suffix: function (_) { return null; },
|
|
406
415
|
size: 'medium',
|
|
407
416
|
rounded: 'medium',
|
|
408
417
|
fillMode: 'solid'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { FormComponentProps } from '@progress/kendo-react-common';
|
|
2
|
+
import { CustomComponent, FormComponentProps } from '@progress/kendo-react-common';
|
|
3
3
|
import { MaskedTextBox } from './MaskedTextBox';
|
|
4
4
|
/**
|
|
5
5
|
* The arguments for a MaskedTextBox event.
|
|
@@ -91,6 +91,14 @@ export interface MaskedTextBoxProps extends FormComponentProps {
|
|
|
91
91
|
* Sets the `id` of the `input` DOM element.
|
|
92
92
|
*/
|
|
93
93
|
id?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Sets a custom prefix to the MaskedTextBox component.
|
|
96
|
+
*/
|
|
97
|
+
prefix?: CustomComponent<any>;
|
|
98
|
+
/**
|
|
99
|
+
* Sets a custom suffix to the MaskedTextBox component.
|
|
100
|
+
*/
|
|
101
|
+
suffix?: CustomComponent<any>;
|
|
94
102
|
/**
|
|
95
103
|
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
96
104
|
* For example these elements could contain error or hint message.
|
|
@@ -52,6 +52,8 @@ exports.NumericTextBox = React.forwardRef(function (directProps, target) {
|
|
|
52
52
|
stateRef.current.currentLooseValue :
|
|
53
53
|
(0, utils_1.getStateOrPropsValue)(props.value, stateValueRef.current), props.format, intlService);
|
|
54
54
|
prevLooseValueRef.current = looseValue;
|
|
55
|
+
var Prefix = (0, kendo_react_common_1.useCustomComponent)(props.prefix)[0];
|
|
56
|
+
var Suffix = (0, kendo_react_common_1.useCustomComponent)(props.suffix)[0];
|
|
55
57
|
React.useEffect(function () {
|
|
56
58
|
if (elementRef.current && elementRef.current.setCustomValidity) {
|
|
57
59
|
elementRef.current.setCustomValidity(validityGetter().valid
|
|
@@ -273,7 +275,9 @@ exports.NumericTextBox = React.forwardRef(function (directProps, target) {
|
|
|
273
275
|
_a['k-required'] = props.required,
|
|
274
276
|
_a['k-disabled'] = props.disabled,
|
|
275
277
|
_a), props.className), "aria-disabled": props.disabled ? 'true' : undefined },
|
|
278
|
+
React.createElement(Prefix, null),
|
|
276
279
|
React.createElement("input", { value: looseValue === null ? '' : looseValue, tabIndex: (0, kendo_react_common_1.getTabIndex)(props.tabIndex, props.disabled), accessKey: props.accessKey, disabled: props.disabled, title: props.title, "aria-valuemin": props.min, "aria-valuemax": props.max, "aria-label": props.ariaLabel, "aria-labelledby": props.ariaLabelledBy, "aria-describedby": props.ariaDescribedBy, placeholder: props.placeholder, spellCheck: false, autoComplete: 'off', autoCorrect: 'off', type: props.inputType || 'tel', className: 'k-input-inner', id: inputId, name: props.name, readOnly: props.readOnly, style: props.inputStyle, onChange: onChangeHandler, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onPaste: onPasteHandler, onWheel: onWheelHandler, ref: elementRef }),
|
|
280
|
+
React.createElement(Suffix, null),
|
|
277
281
|
props.children,
|
|
278
282
|
props.spinners &&
|
|
279
283
|
(React.createElement("span", { className: "k-input-spinner k-spin-button", onMouseDown: onMouseDown },
|
|
@@ -331,6 +335,8 @@ exports.NumericTextBox.propTypes = {
|
|
|
331
335
|
};
|
|
332
336
|
exports.NumericTextBox.displayName = 'KendoNumericTextBox';
|
|
333
337
|
exports.NumericTextBox.defaultProps = {
|
|
338
|
+
prefix: function (_) { return null; },
|
|
339
|
+
suffix: function (_) { return null; },
|
|
334
340
|
step: 1,
|
|
335
341
|
spinners: true,
|
|
336
342
|
disabled: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { FormComponentProps } from '@progress/kendo-react-common';
|
|
2
|
+
import { CustomComponent, FormComponentProps } from '@progress/kendo-react-common';
|
|
3
3
|
import { NumberFormatOptions } from '@progress/kendo-react-intl';
|
|
4
4
|
import { NumericTextBoxChangeEvent } from './NumericTextBoxChangeEvent';
|
|
5
5
|
import { NumericTextBoxFocusEvent } from './NumericTextBoxFocusEvent';
|
|
@@ -81,6 +81,14 @@ export interface NumericTextBoxProps extends FormComponentProps {
|
|
|
81
81
|
* Sets the `id` of the `input` DOM element.
|
|
82
82
|
*/
|
|
83
83
|
id?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Sets a custom prefix to the NumericTextBox component.
|
|
86
|
+
*/
|
|
87
|
+
prefix?: CustomComponent<any>;
|
|
88
|
+
/**
|
|
89
|
+
* Sets a custom suffix to the NumericTextBox component.
|
|
90
|
+
*/
|
|
91
|
+
suffix?: CustomComponent<any>;
|
|
84
92
|
/**
|
|
85
93
|
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
86
94
|
* For example these elements could contain error or hint message.
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-inputs',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1669987761,
|
|
12
12
|
version: '',
|
|
13
13
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
14
14
|
};
|
|
@@ -53,7 +53,13 @@ export interface TextBoxProps extends Omit<React.InputHTMLAttributes<HTMLInputEl
|
|
|
53
53
|
* Indicates if the component is in `valid` state
|
|
54
54
|
*/
|
|
55
55
|
valid?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Sets a custom prefix to the TextBox component.
|
|
58
|
+
*/
|
|
56
59
|
prefix?: CustomComponent<any>;
|
|
60
|
+
/**
|
|
61
|
+
* Sets a custom suffix to the TextBox component.
|
|
62
|
+
*/
|
|
57
63
|
suffix?: CustomComponent<any>;
|
|
58
64
|
}
|
|
59
65
|
/**
|