@progress/kendo-react-inputs 5.6.0-next.202208151055 → 5.6.0-next.202208310638
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 +1 -1
- package/about.md +2 -2
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/dist/es/input/InputClearValue.d.ts +15 -0
- package/dist/es/input/InputClearValue.js +24 -0
- package/dist/es/input/InputPrefix.d.ts +15 -0
- package/dist/es/input/InputPrefix.js +24 -0
- package/dist/es/input/InputSeparator.d.ts +15 -0
- package/dist/es/input/InputSeparator.js +24 -0
- package/dist/es/input/InputSuffix.d.ts +15 -0
- package/dist/es/input/InputSuffix.js +24 -0
- package/dist/es/input/InputValidationIcon.d.ts +14 -0
- package/dist/es/input/InputValidationIcon.js +20 -0
- package/dist/es/main.d.ts +6 -0
- package/dist/es/main.js +6 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/radiobutton/RadioGroup.js +1 -1
- package/dist/es/textbox/Textbox.d.ts +69 -0
- package/dist/es/textbox/Textbox.js +111 -0
- package/dist/npm/input/InputClearValue.d.ts +15 -0
- package/dist/npm/input/InputClearValue.js +27 -0
- package/dist/npm/input/InputPrefix.d.ts +15 -0
- package/dist/npm/input/InputPrefix.js +27 -0
- package/dist/npm/input/InputSeparator.d.ts +15 -0
- package/dist/npm/input/InputSeparator.js +27 -0
- package/dist/npm/input/InputSuffix.d.ts +15 -0
- package/dist/npm/input/InputSuffix.js +27 -0
- package/dist/npm/input/InputValidationIcon.d.ts +14 -0
- package/dist/npm/input/InputValidationIcon.js +23 -0
- package/dist/npm/main.d.ts +6 -0
- package/dist/npm/main.js +13 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/radiobutton/RadioGroup.js +1 -1
- package/dist/npm/textbox/Textbox.d.ts +69 -0
- package/dist/npm/textbox/Textbox.js +114 -0
- package/dist/systemjs/kendo-react-inputs.js +1 -1
- package/package.json +16 -15
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Represent the `ref` of the `InputClearValue` component.
|
|
4
|
+
*/
|
|
5
|
+
export declare type InputClearValueHandle = {
|
|
6
|
+
element: HTMLSpanElement | null;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Represents the `props` of the `InputClearValue` component.
|
|
10
|
+
*/
|
|
11
|
+
export declare type InputClearValueProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
12
|
+
/**
|
|
13
|
+
* Represents the KendoReact InputClearValue component.
|
|
14
|
+
*/
|
|
15
|
+
export declare const InputClearValue: React.ForwardRefExoticComponent<InputClearValueProps & React.RefAttributes<InputClearValueHandle>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import * as React from 'react';
|
|
13
|
+
import { classNames } from '@progress/kendo-react-common';
|
|
14
|
+
/**
|
|
15
|
+
* Represents the KendoReact InputClearValue component.
|
|
16
|
+
*/
|
|
17
|
+
export var InputClearValue = React.forwardRef(function (props, ref) {
|
|
18
|
+
var target = React.useRef(null);
|
|
19
|
+
var element = React.useRef(null);
|
|
20
|
+
React.useImperativeHandle(target, function () { return ({ element: element.current }); });
|
|
21
|
+
React.useImperativeHandle(ref, function () { return target.current; });
|
|
22
|
+
return (React.createElement("span", __assign({}, props, { className: classNames('k-clear-value', props.className) })));
|
|
23
|
+
});
|
|
24
|
+
InputClearValue.displayName = 'KendoReactInputClearValue';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Represent the `ref` of the `InputPrefix` component.
|
|
4
|
+
*/
|
|
5
|
+
export declare type InputPrefixHandle = {
|
|
6
|
+
element: HTMLSpanElement | null;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Represents the `props` of the `InputPrefix` component.
|
|
10
|
+
*/
|
|
11
|
+
export declare type InputPrefixProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
12
|
+
/**
|
|
13
|
+
* Represents the KendoReact InputPrefix component.
|
|
14
|
+
*/
|
|
15
|
+
export declare const InputPrefix: React.ForwardRefExoticComponent<InputPrefixProps & React.RefAttributes<InputPrefixHandle>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { classNames } from '@progress/kendo-react-common';
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
/**
|
|
15
|
+
* Represents the KendoReact InputPrefix component.
|
|
16
|
+
*/
|
|
17
|
+
export var InputPrefix = React.forwardRef(function (props, ref) {
|
|
18
|
+
var target = React.useRef(null);
|
|
19
|
+
var element = React.useRef(null);
|
|
20
|
+
React.useImperativeHandle(target, function () { return ({ element: element.current }); });
|
|
21
|
+
React.useImperativeHandle(ref, function () { return target.current; });
|
|
22
|
+
return (React.createElement("span", __assign({}, props, { className: classNames('k-input-prefix', props.className) })));
|
|
23
|
+
});
|
|
24
|
+
InputPrefix.displayName = 'KendoReactInputPrefix';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Represent the `ref` of the `InputSeparator` component.
|
|
4
|
+
*/
|
|
5
|
+
export declare type InputSeparatorHandle = {
|
|
6
|
+
element: HTMLSpanElement | null;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Represents the `props` of the `InputSeparator` component.
|
|
10
|
+
*/
|
|
11
|
+
export declare type InputSeparatorProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
12
|
+
/**
|
|
13
|
+
* Represents the KendoReact InputSeparator component.
|
|
14
|
+
*/
|
|
15
|
+
export declare const InputSeparator: React.ForwardRefExoticComponent<InputSeparatorProps & React.RefAttributes<InputSeparatorHandle>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import * as React from 'react';
|
|
13
|
+
import { classNames } from '@progress/kendo-react-common';
|
|
14
|
+
/**
|
|
15
|
+
* Represents the KendoReact InputSeparator component.
|
|
16
|
+
*/
|
|
17
|
+
export var InputSeparator = React.forwardRef(function (props, ref) {
|
|
18
|
+
var target = React.useRef(null);
|
|
19
|
+
var element = React.useRef(null);
|
|
20
|
+
React.useImperativeHandle(target, function () { return ({ element: element.current }); });
|
|
21
|
+
React.useImperativeHandle(ref, function () { return target.current; });
|
|
22
|
+
return (React.createElement("span", __assign({}, props, { className: classNames('k-input-separator', props.className) })));
|
|
23
|
+
});
|
|
24
|
+
InputSeparator.displayName = 'KendoReactInputSeparator';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Represent the `ref` of the `InputSuffix` component.
|
|
4
|
+
*/
|
|
5
|
+
export declare type InputSuffixHandle = {
|
|
6
|
+
element: HTMLSpanElement | null;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Represents the `props` of the `InputSuffix` component.
|
|
10
|
+
*/
|
|
11
|
+
export declare type InputSuffixProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
12
|
+
/**
|
|
13
|
+
* Represents the KendoReact InputSuffix component.
|
|
14
|
+
*/
|
|
15
|
+
export declare const InputSuffix: React.ForwardRefExoticComponent<InputSuffixProps & React.RefAttributes<InputSuffixHandle>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import * as React from 'react';
|
|
13
|
+
import { classNames } from '@progress/kendo-react-common';
|
|
14
|
+
/**
|
|
15
|
+
* Represents the KendoReact InputSuffix component.
|
|
16
|
+
*/
|
|
17
|
+
export var InputSuffix = React.forwardRef(function (props, ref) {
|
|
18
|
+
var target = React.useRef(null);
|
|
19
|
+
var element = React.useRef(null);
|
|
20
|
+
React.useImperativeHandle(target, function () { return ({ element: element.current }); });
|
|
21
|
+
React.useImperativeHandle(ref, function () { return target.current; });
|
|
22
|
+
return (React.createElement("span", __assign({}, props, { className: classNames('k-input-suffix', props.className) })));
|
|
23
|
+
});
|
|
24
|
+
InputSuffix.displayName = 'KendoReactInputSuffix';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IconHandle, IconProps } from '@progress/kendo-react-common';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Represent the `ref` of the `InputValidationIcon` component.
|
|
5
|
+
*/
|
|
6
|
+
export declare type InputValidationIconHandle = IconHandle;
|
|
7
|
+
/**
|
|
8
|
+
* Represents the `props` of the `InputValidationIcon` component.
|
|
9
|
+
*/
|
|
10
|
+
export declare type InputValidationIconProps = IconProps;
|
|
11
|
+
/**
|
|
12
|
+
* Represents the KendoReact InputValidationIcon component.
|
|
13
|
+
*/
|
|
14
|
+
export declare const InputValidationIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<IconHandle>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { classNames, Icon } from '@progress/kendo-react-common';
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
/**
|
|
15
|
+
* Represents the KendoReact InputValidationIcon component.
|
|
16
|
+
*/
|
|
17
|
+
export var InputValidationIcon = React.forwardRef(function (props, ref) {
|
|
18
|
+
return React.createElement(Icon, __assign({ ref: ref }, props, { className: classNames('k-input-validation-icon', props.className) }));
|
|
19
|
+
});
|
|
20
|
+
InputValidationIcon.displayName = 'KendoReactInputValidationIcon';
|
package/dist/es/main.d.ts
CHANGED
|
@@ -50,3 +50,9 @@ export * from './textarea/interfaces/TextAreaFocusEvent';
|
|
|
50
50
|
export * from './rating/Rating';
|
|
51
51
|
export * from './rating/RatingItem';
|
|
52
52
|
export * from './rating/models/index';
|
|
53
|
+
export { TextBox, TextBoxProps, TextBoxHandle, TextBoxChangeEvent } from './textbox/Textbox';
|
|
54
|
+
export { InputClearValue, InputClearValueProps, InputClearValueHandle } from './input/InputClearValue';
|
|
55
|
+
export { InputPrefix, InputPrefixProps, InputPrefixHandle } from './input/InputPrefix';
|
|
56
|
+
export { InputSeparator, InputSeparatorProps, InputSeparatorHandle } from './input/InputSeparator';
|
|
57
|
+
export { InputSuffix, InputSuffixProps, InputSuffixHandle } from './input/InputSuffix';
|
|
58
|
+
export { InputValidationIcon, InputValidationIconProps, InputValidationIconHandle } from './input/InputValidationIcon';
|
package/dist/es/main.js
CHANGED
|
@@ -46,3 +46,9 @@ export * from './textarea/interfaces/TextAreaFocusEvent';
|
|
|
46
46
|
export * from './rating/Rating';
|
|
47
47
|
export * from './rating/RatingItem';
|
|
48
48
|
export * from './rating/models/index';
|
|
49
|
+
export { TextBox } from './textbox/Textbox';
|
|
50
|
+
export { InputClearValue } from './input/InputClearValue';
|
|
51
|
+
export { InputPrefix } from './input/InputPrefix';
|
|
52
|
+
export { InputSeparator } from './input/InputSeparator';
|
|
53
|
+
export { InputSuffix } from './input/InputSuffix';
|
|
54
|
+
export { InputValidationIcon } from './input/InputValidationIcon';
|
|
@@ -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: 1661926871,
|
|
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
|
};
|
|
@@ -74,7 +74,7 @@ export var RadioGroup = React.forwardRef(function (directProps, target) {
|
|
|
74
74
|
: (noOptionChecked && index === 0) || isCurrentlyChecked
|
|
75
75
|
? 0
|
|
76
76
|
: -1, index: index, name: name || radioGroupName, onChange: handleChange, onFocus: handleFocus });
|
|
77
|
-
return (React.createElement(Item, { className: classNames('k-radio-item', { 'k-disabled': radioButtonProps.disabled || disabled }), key: index, role: '
|
|
77
|
+
return (React.createElement(Item, { className: classNames('k-radio-item', { 'k-disabled': radioButtonProps.disabled || disabled }), key: index, role: 'none' },
|
|
78
78
|
React.createElement(RadioButton, __assign({}, radioButtonProps))));
|
|
79
79
|
}));
|
|
80
80
|
return (React.createElement("ul", { role: "radiogroup", className: radioGroupClasses, ref: elementRef, dir: dir, style: style, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy }, radioOptions));
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { BaseEvent, CustomComponent } from '@progress/kendo-react-common';
|
|
3
|
+
export interface TextBoxChangeEvent extends BaseEvent<TextBoxHandle> {
|
|
4
|
+
syntheticEvent: React.ChangeEvent<HTMLInputElement>;
|
|
5
|
+
value: React.InputHTMLAttributes<HTMLInputElement>['value'];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Represents the properties of the KendoReact [TextBox]({% slug api_inputs_textbox %}) component
|
|
9
|
+
*/
|
|
10
|
+
export interface TextBoxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix' | 'onChange'> {
|
|
11
|
+
/**
|
|
12
|
+
* Configures the `size` of the TextBox.
|
|
13
|
+
*
|
|
14
|
+
* The available options are:
|
|
15
|
+
* - small
|
|
16
|
+
* - medium
|
|
17
|
+
* - large
|
|
18
|
+
* - null—Does not set a size `className`.
|
|
19
|
+
*
|
|
20
|
+
* @default `medium`
|
|
21
|
+
*/
|
|
22
|
+
size?: null | 'small' | 'medium' | 'large';
|
|
23
|
+
/**
|
|
24
|
+
* Configures the `roundness` of the TextBox.
|
|
25
|
+
*
|
|
26
|
+
* The available options are:
|
|
27
|
+
* - small
|
|
28
|
+
* - medium
|
|
29
|
+
* - large
|
|
30
|
+
* - full
|
|
31
|
+
* - null—Does not set a rounded `className`.
|
|
32
|
+
*
|
|
33
|
+
* @default `medium`
|
|
34
|
+
*/
|
|
35
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full';
|
|
36
|
+
/**
|
|
37
|
+
* Configures the `fillMode` of the TextBox.
|
|
38
|
+
*
|
|
39
|
+
* The available options are:
|
|
40
|
+
* - solid
|
|
41
|
+
* - outline
|
|
42
|
+
* - flat
|
|
43
|
+
* - null—Does not set a fillMode `className`.
|
|
44
|
+
*
|
|
45
|
+
* @default `solid`
|
|
46
|
+
*/
|
|
47
|
+
fillMode?: null | 'solid' | 'flat' | 'outline';
|
|
48
|
+
/**
|
|
49
|
+
* The `onChange` callback of the `input` element inside the TextBox.
|
|
50
|
+
*/
|
|
51
|
+
onChange?: (event: TextBoxChangeEvent) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Indicates if the component is in `valid` state
|
|
54
|
+
*/
|
|
55
|
+
valid?: boolean;
|
|
56
|
+
prefix?: CustomComponent<any>;
|
|
57
|
+
suffix?: CustomComponent<any>;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Represent the `ref` of the TextBox component.
|
|
61
|
+
*/
|
|
62
|
+
export declare type TextBoxHandle = {
|
|
63
|
+
element: HTMLInputElement | null;
|
|
64
|
+
value: TextBoxProps['value'];
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Represents the [KendoReact TextBox component]({% slug overview_textbox %}).
|
|
68
|
+
*/
|
|
69
|
+
export declare const TextBox: React.ForwardRefExoticComponent<TextBoxProps & React.RefAttributes<TextBoxHandle | null>>;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import * as React from 'react';
|
|
24
|
+
import * as PropTypes from 'prop-types';
|
|
25
|
+
import { classNames, kendoThemeMaps, useAsyncFocusBlur, useCustomComponent, validatePackage } from '@progress/kendo-react-common';
|
|
26
|
+
import { packageMetadata } from '../package-metadata';
|
|
27
|
+
;
|
|
28
|
+
/**
|
|
29
|
+
* Represents the [KendoReact TextBox component]({% slug overview_textbox %}).
|
|
30
|
+
*/
|
|
31
|
+
export var TextBox = React.forwardRef(function (props, ref) {
|
|
32
|
+
var _a;
|
|
33
|
+
validatePackage(packageMetadata);
|
|
34
|
+
var element = React.useRef(null);
|
|
35
|
+
var target = React.useRef(null);
|
|
36
|
+
var valueDuringChangeRef = React.useRef();
|
|
37
|
+
var valueGetter = React.useCallback(function () {
|
|
38
|
+
var _a;
|
|
39
|
+
if (valueDuringChangeRef.current !== undefined) {
|
|
40
|
+
return valueDuringChangeRef.current;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return (_a = element.current) === null || _a === void 0 ? void 0 : _a.value;
|
|
44
|
+
}
|
|
45
|
+
}, []);
|
|
46
|
+
React.useImperativeHandle(target, function () {
|
|
47
|
+
var result = {
|
|
48
|
+
element: element.current
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(result, 'value', { get: valueGetter });
|
|
51
|
+
return result;
|
|
52
|
+
});
|
|
53
|
+
React.useImperativeHandle(ref, function () { return target.current; });
|
|
54
|
+
var _b = props, size = _b.size, fillMode = _b.fillMode, rounded = _b.rounded, className = _b.className, dir = _b.dir, style = _b.style, _c = _b.prefix, prefix = _c === void 0 ? defaultProps.prefix : _c, _d = _b.suffix, suffix = _d === void 0 ? defaultProps.suffix : _d, valid = _b.valid,
|
|
55
|
+
// Destruct to avoid warning when used inside a form field
|
|
56
|
+
_modified = _b.modified, _touched = _b.touched, _visited = _b.visited, other = __rest(_b, ["size", "fillMode", "rounded", "className", "dir", "style", "prefix", "suffix", "valid", "modified", "touched", "visited"]);
|
|
57
|
+
var Prefix = useCustomComponent(prefix)[0];
|
|
58
|
+
var Suffix = useCustomComponent(suffix)[0];
|
|
59
|
+
var _e = React.useState(false), focused = _e[0], setFocused = _e[1];
|
|
60
|
+
var handleFocus = function (_) {
|
|
61
|
+
setFocused(true);
|
|
62
|
+
};
|
|
63
|
+
var handleBlur = function (_) {
|
|
64
|
+
setFocused(false);
|
|
65
|
+
};
|
|
66
|
+
var handleChange = React.useCallback(function (event) {
|
|
67
|
+
valueDuringChangeRef.current = event.target.value;
|
|
68
|
+
if (props.onChange) {
|
|
69
|
+
props.onChange.call(undefined, {
|
|
70
|
+
syntheticEvent: event,
|
|
71
|
+
nativeEvent: event.nativeEvent,
|
|
72
|
+
value: event.target.value,
|
|
73
|
+
target: target.current
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
valueDuringChangeRef.current = undefined;
|
|
77
|
+
}, [props.onChange]);
|
|
78
|
+
var _f = useAsyncFocusBlur({
|
|
79
|
+
onFocus: handleFocus,
|
|
80
|
+
onBlur: handleBlur,
|
|
81
|
+
onSyncFocus: props.onFocus,
|
|
82
|
+
onSyncBlur: props.onBlur
|
|
83
|
+
}), onFocus = _f.onFocus, onBlur = _f.onBlur;
|
|
84
|
+
return (React.createElement("span", { style: style, dir: dir, className: classNames('k-input', (_a = {},
|
|
85
|
+
_a["k-input-".concat(kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
86
|
+
_a["k-input-".concat(fillMode)] = fillMode,
|
|
87
|
+
_a["k-rounded-".concat(kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
|
|
88
|
+
_a), {
|
|
89
|
+
'k-focus': focused,
|
|
90
|
+
'k-required': props.required,
|
|
91
|
+
'k-disabled': props.disabled,
|
|
92
|
+
'k-invalid': props.valid === false
|
|
93
|
+
}, className), onFocus: onFocus, onBlur: onBlur },
|
|
94
|
+
React.createElement(Prefix, null),
|
|
95
|
+
React.createElement("input", __assign({ ref: element, className: "k-input-inner" }, other, { onChange: handleChange })),
|
|
96
|
+
React.createElement(Suffix, null)));
|
|
97
|
+
});
|
|
98
|
+
var defaultProps = {
|
|
99
|
+
prefix: function (_) { return null; },
|
|
100
|
+
suffix: function (_) { return null; },
|
|
101
|
+
size: 'medium',
|
|
102
|
+
rounded: 'medium',
|
|
103
|
+
fillMode: 'solid'
|
|
104
|
+
};
|
|
105
|
+
TextBox.propTypes = {
|
|
106
|
+
size: PropTypes.oneOf([null, 'small', 'medium', 'large']),
|
|
107
|
+
rounded: PropTypes.oneOf([null, 'small', 'medium', 'large', 'full']),
|
|
108
|
+
fillMode: PropTypes.oneOf([null, 'solid', 'flat', 'outline'])
|
|
109
|
+
};
|
|
110
|
+
TextBox.displayName = 'KendoReactTextBoxComponent';
|
|
111
|
+
TextBox.defaultProps = defaultProps;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Represent the `ref` of the `InputClearValue` component.
|
|
4
|
+
*/
|
|
5
|
+
export declare type InputClearValueHandle = {
|
|
6
|
+
element: HTMLSpanElement | null;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Represents the `props` of the `InputClearValue` component.
|
|
10
|
+
*/
|
|
11
|
+
export declare type InputClearValueProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
12
|
+
/**
|
|
13
|
+
* Represents the KendoReact InputClearValue component.
|
|
14
|
+
*/
|
|
15
|
+
export declare const InputClearValue: React.ForwardRefExoticComponent<InputClearValueProps & React.RefAttributes<InputClearValueHandle>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.InputClearValue = void 0;
|
|
15
|
+
var React = require("react");
|
|
16
|
+
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
17
|
+
/**
|
|
18
|
+
* Represents the KendoReact InputClearValue component.
|
|
19
|
+
*/
|
|
20
|
+
exports.InputClearValue = React.forwardRef(function (props, ref) {
|
|
21
|
+
var target = React.useRef(null);
|
|
22
|
+
var element = React.useRef(null);
|
|
23
|
+
React.useImperativeHandle(target, function () { return ({ element: element.current }); });
|
|
24
|
+
React.useImperativeHandle(ref, function () { return target.current; });
|
|
25
|
+
return (React.createElement("span", __assign({}, props, { className: (0, kendo_react_common_1.classNames)('k-clear-value', props.className) })));
|
|
26
|
+
});
|
|
27
|
+
exports.InputClearValue.displayName = 'KendoReactInputClearValue';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Represent the `ref` of the `InputPrefix` component.
|
|
4
|
+
*/
|
|
5
|
+
export declare type InputPrefixHandle = {
|
|
6
|
+
element: HTMLSpanElement | null;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Represents the `props` of the `InputPrefix` component.
|
|
10
|
+
*/
|
|
11
|
+
export declare type InputPrefixProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
12
|
+
/**
|
|
13
|
+
* Represents the KendoReact InputPrefix component.
|
|
14
|
+
*/
|
|
15
|
+
export declare const InputPrefix: React.ForwardRefExoticComponent<InputPrefixProps & React.RefAttributes<InputPrefixHandle>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.InputPrefix = void 0;
|
|
15
|
+
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
16
|
+
var React = require("react");
|
|
17
|
+
/**
|
|
18
|
+
* Represents the KendoReact InputPrefix component.
|
|
19
|
+
*/
|
|
20
|
+
exports.InputPrefix = React.forwardRef(function (props, ref) {
|
|
21
|
+
var target = React.useRef(null);
|
|
22
|
+
var element = React.useRef(null);
|
|
23
|
+
React.useImperativeHandle(target, function () { return ({ element: element.current }); });
|
|
24
|
+
React.useImperativeHandle(ref, function () { return target.current; });
|
|
25
|
+
return (React.createElement("span", __assign({}, props, { className: (0, kendo_react_common_1.classNames)('k-input-prefix', props.className) })));
|
|
26
|
+
});
|
|
27
|
+
exports.InputPrefix.displayName = 'KendoReactInputPrefix';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Represent the `ref` of the `InputSeparator` component.
|
|
4
|
+
*/
|
|
5
|
+
export declare type InputSeparatorHandle = {
|
|
6
|
+
element: HTMLSpanElement | null;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Represents the `props` of the `InputSeparator` component.
|
|
10
|
+
*/
|
|
11
|
+
export declare type InputSeparatorProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
12
|
+
/**
|
|
13
|
+
* Represents the KendoReact InputSeparator component.
|
|
14
|
+
*/
|
|
15
|
+
export declare const InputSeparator: React.ForwardRefExoticComponent<InputSeparatorProps & React.RefAttributes<InputSeparatorHandle>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.InputSeparator = void 0;
|
|
15
|
+
var React = require("react");
|
|
16
|
+
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
17
|
+
/**
|
|
18
|
+
* Represents the KendoReact InputSeparator component.
|
|
19
|
+
*/
|
|
20
|
+
exports.InputSeparator = React.forwardRef(function (props, ref) {
|
|
21
|
+
var target = React.useRef(null);
|
|
22
|
+
var element = React.useRef(null);
|
|
23
|
+
React.useImperativeHandle(target, function () { return ({ element: element.current }); });
|
|
24
|
+
React.useImperativeHandle(ref, function () { return target.current; });
|
|
25
|
+
return (React.createElement("span", __assign({}, props, { className: (0, kendo_react_common_1.classNames)('k-input-separator', props.className) })));
|
|
26
|
+
});
|
|
27
|
+
exports.InputSeparator.displayName = 'KendoReactInputSeparator';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Represent the `ref` of the `InputSuffix` component.
|
|
4
|
+
*/
|
|
5
|
+
export declare type InputSuffixHandle = {
|
|
6
|
+
element: HTMLSpanElement | null;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Represents the `props` of the `InputSuffix` component.
|
|
10
|
+
*/
|
|
11
|
+
export declare type InputSuffixProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
12
|
+
/**
|
|
13
|
+
* Represents the KendoReact InputSuffix component.
|
|
14
|
+
*/
|
|
15
|
+
export declare const InputSuffix: React.ForwardRefExoticComponent<InputSuffixProps & React.RefAttributes<InputSuffixHandle>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.InputSuffix = void 0;
|
|
15
|
+
var React = require("react");
|
|
16
|
+
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
17
|
+
/**
|
|
18
|
+
* Represents the KendoReact InputSuffix component.
|
|
19
|
+
*/
|
|
20
|
+
exports.InputSuffix = React.forwardRef(function (props, ref) {
|
|
21
|
+
var target = React.useRef(null);
|
|
22
|
+
var element = React.useRef(null);
|
|
23
|
+
React.useImperativeHandle(target, function () { return ({ element: element.current }); });
|
|
24
|
+
React.useImperativeHandle(ref, function () { return target.current; });
|
|
25
|
+
return (React.createElement("span", __assign({}, props, { className: (0, kendo_react_common_1.classNames)('k-input-suffix', props.className) })));
|
|
26
|
+
});
|
|
27
|
+
exports.InputSuffix.displayName = 'KendoReactInputSuffix';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IconHandle, IconProps } from '@progress/kendo-react-common';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Represent the `ref` of the `InputValidationIcon` component.
|
|
5
|
+
*/
|
|
6
|
+
export declare type InputValidationIconHandle = IconHandle;
|
|
7
|
+
/**
|
|
8
|
+
* Represents the `props` of the `InputValidationIcon` component.
|
|
9
|
+
*/
|
|
10
|
+
export declare type InputValidationIconProps = IconProps;
|
|
11
|
+
/**
|
|
12
|
+
* Represents the KendoReact InputValidationIcon component.
|
|
13
|
+
*/
|
|
14
|
+
export declare const InputValidationIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<IconHandle>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.InputValidationIcon = void 0;
|
|
15
|
+
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
16
|
+
var React = require("react");
|
|
17
|
+
/**
|
|
18
|
+
* Represents the KendoReact InputValidationIcon component.
|
|
19
|
+
*/
|
|
20
|
+
exports.InputValidationIcon = React.forwardRef(function (props, ref) {
|
|
21
|
+
return React.createElement(kendo_react_common_1.Icon, __assign({ ref: ref }, props, { className: (0, kendo_react_common_1.classNames)('k-input-validation-icon', props.className) }));
|
|
22
|
+
});
|
|
23
|
+
exports.InputValidationIcon.displayName = 'KendoReactInputValidationIcon';
|