@progress/kendo-react-inputs 5.5.0-dev.202206280851 → 5.5.1-dev.202207131015

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.
@@ -205,7 +205,7 @@ var InputWithoutContext = /** @class */ (function (_super) {
205
205
  var inputId = id || this._inputId;
206
206
  var isValid = !this.validityStyles || this.validity.valid;
207
207
  var inputClassName = classNames(className, 'k-input k-input-md k-rounded-md k-input-solid');
208
- var textbox = (React.createElement("input", __assign({ "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy }, props, { style: !label
208
+ var textbox = (React.createElement("input", __assign({ "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-disabled": this.props.disabled || undefined, "aria-invalid": !isValid || undefined }, props, { style: !label
209
209
  ? style
210
210
  : undefined, value: this.value, id: inputId, className: inputClassName, onChange: this.handleChange, onAnimationStart: this.handleAutoFill, ref: function (el) {
211
211
  _this._input = el;
@@ -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: 1656405248,
8
+ publishDate: 1657706303,
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
  };
@@ -7,6 +7,7 @@ export interface TextAreaHandle {
7
7
  element: React.RefObject<HTMLTextAreaElement | null>;
8
8
  focus: any;
9
9
  name?: string | null;
10
+ value?: string;
10
11
  }
11
12
  /**
12
13
  * Represents the PropsContext of the `TextArea` component.
@@ -59,20 +59,21 @@ export var TextArea = React.forwardRef(function (directProps, target) {
59
59
  elementRef.current.focus();
60
60
  }
61
61
  }, []);
62
+ var _c = React.useState(defaultValue), stateValue = _c[0], setStateValue = _c[1];
63
+ var isControlled = value !== undefined;
64
+ var currentValue = isControlled ? value : stateValue;
62
65
  var getImperativeHandle = React.useCallback(function () {
63
66
  return ({
64
67
  element: elementRef,
65
68
  focus: focusElement,
69
+ get value() { return currentValue; },
66
70
  get name() { return elementRef.current && elementRef.current.name; }
67
71
  });
68
- }, [focusElement]);
72
+ }, [focusElement, currentValue]);
69
73
  React.useImperativeHandle(target, getImperativeHandle);
70
- var _c = React.useState(defaultValue), stateValue = _c[0], setStateValue = _c[1];
71
74
  var _d = React.useState('auto'), textAreaHeight = _d[0], setTextAreaHeight = _d[1];
72
75
  var calculatedId = React.useMemo(function () { return guid(); }, []);
73
76
  var dir = useDir(elementRef, props.dir);
74
- var isControlled = value !== undefined;
75
- var currentValue = isControlled ? value : stateValue;
76
77
  var isValid = valid !== undefined ?
77
78
  valid :
78
79
  !required ?
@@ -97,7 +98,7 @@ export var TextArea = React.forwardRef(function (directProps, target) {
97
98
  setStateValue(newValue);
98
99
  }
99
100
  if (onChange && !disabled) {
100
- dispatchEvent(onChange, event, getImperativeHandle(), { value: newValue });
101
+ dispatchEvent(onChange, event, __assign(__assign({}, getImperativeHandle()), { value: newValue }), { value: newValue });
101
102
  }
102
103
  }, [setStateValue, onChange, disabled, isControlled]);
103
104
  var handleFocus = React.useCallback(function (event) {
@@ -208,7 +208,7 @@ var InputWithoutContext = /** @class */ (function (_super) {
208
208
  var inputId = id || this._inputId;
209
209
  var isValid = !this.validityStyles || this.validity.valid;
210
210
  var inputClassName = (0, kendo_react_common_1.classNames)(className, 'k-input k-input-md k-rounded-md k-input-solid');
211
- var textbox = (React.createElement("input", __assign({ "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy }, props, { style: !label
211
+ var textbox = (React.createElement("input", __assign({ "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-disabled": this.props.disabled || undefined, "aria-invalid": !isValid || undefined }, props, { style: !label
212
212
  ? style
213
213
  : undefined, value: this.value, id: inputId, className: inputClassName, onChange: this.handleChange, onAnimationStart: this.handleAutoFill, ref: function (el) {
214
214
  _this._input = el;
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-react-inputs',
9
9
  productName: 'KendoReact',
10
10
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
11
- publishDate: 1656405248,
11
+ publishDate: 1657706303,
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
  };
@@ -7,6 +7,7 @@ export interface TextAreaHandle {
7
7
  element: React.RefObject<HTMLTextAreaElement | null>;
8
8
  focus: any;
9
9
  name?: string | null;
10
+ value?: string;
10
11
  }
11
12
  /**
12
13
  * Represents the PropsContext of the `TextArea` component.
@@ -62,20 +62,21 @@ exports.TextArea = React.forwardRef(function (directProps, target) {
62
62
  elementRef.current.focus();
63
63
  }
64
64
  }, []);
65
+ var _c = React.useState(defaultValue), stateValue = _c[0], setStateValue = _c[1];
66
+ var isControlled = value !== undefined;
67
+ var currentValue = isControlled ? value : stateValue;
65
68
  var getImperativeHandle = React.useCallback(function () {
66
69
  return ({
67
70
  element: elementRef,
68
71
  focus: focusElement,
72
+ get value() { return currentValue; },
69
73
  get name() { return elementRef.current && elementRef.current.name; }
70
74
  });
71
- }, [focusElement]);
75
+ }, [focusElement, currentValue]);
72
76
  React.useImperativeHandle(target, getImperativeHandle);
73
- var _c = React.useState(defaultValue), stateValue = _c[0], setStateValue = _c[1];
74
77
  var _d = React.useState('auto'), textAreaHeight = _d[0], setTextAreaHeight = _d[1];
75
78
  var calculatedId = React.useMemo(function () { return (0, kendo_react_common_1.guid)(); }, []);
76
79
  var dir = (0, kendo_react_common_1.useDir)(elementRef, props.dir);
77
- var isControlled = value !== undefined;
78
- var currentValue = isControlled ? value : stateValue;
79
80
  var isValid = valid !== undefined ?
80
81
  valid :
81
82
  !required ?
@@ -100,7 +101,7 @@ exports.TextArea = React.forwardRef(function (directProps, target) {
100
101
  setStateValue(newValue);
101
102
  }
102
103
  if (onChange && !disabled) {
103
- (0, kendo_react_common_1.dispatchEvent)(onChange, event, getImperativeHandle(), { value: newValue });
104
+ (0, kendo_react_common_1.dispatchEvent)(onChange, event, __assign(__assign({}, getImperativeHandle()), { value: newValue }), { value: newValue });
104
105
  }
105
106
  }, [setStateValue, onChange, disabled, isControlled]);
106
107
  var handleFocus = React.useCallback(function (event) {