@progress/kendo-react-inputs 4.13.0-dev.202111291459 → 4.13.0-dev.202111300702

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.
Files changed (71) hide show
  1. package/dist/cdn/js/kendo-react-inputs.js +1 -1
  2. package/dist/es/checkbox/Checkbox.d.ts +7 -0
  3. package/dist/es/checkbox/Checkbox.js +10 -2
  4. package/dist/es/colors/ColorGradient.d.ts +34 -14
  5. package/dist/es/colors/ColorGradient.js +50 -35
  6. package/dist/es/colors/ColorPalette.d.ts +33 -14
  7. package/dist/es/colors/ColorPalette.js +47 -33
  8. package/dist/es/colors/ColorPicker.d.ts +7 -0
  9. package/dist/es/colors/ColorPicker.js +10 -2
  10. package/dist/es/input/Input.d.ts +40 -4
  11. package/dist/es/input/Input.js +37 -21
  12. package/dist/es/main.d.ts +6 -6
  13. package/dist/es/main.js +6 -6
  14. package/dist/es/maskedtextbox/MaskedTextBox.d.ts +69 -4
  15. package/dist/es/maskedtextbox/MaskedTextBox.js +42 -27
  16. package/dist/es/numerictextbox/NumericTextBox.d.ts +7 -0
  17. package/dist/es/numerictextbox/NumericTextBox.js +10 -2
  18. package/dist/es/numerictextbox/interfaces/NumericTextBoxProps.d.ts +3 -0
  19. package/dist/es/package-metadata.js +1 -1
  20. package/dist/es/radiobutton/RadioButton.d.ts +13 -0
  21. package/dist/es/radiobutton/RadioButton.js +16 -2
  22. package/dist/es/radiobutton/RadioGroup.d.ts +13 -0
  23. package/dist/es/radiobutton/RadioGroup.js +16 -2
  24. package/dist/es/range-slider/RangeSlider.d.ts +11 -1
  25. package/dist/es/range-slider/RangeSlider.js +14 -3
  26. package/dist/es/rating/Rating.d.ts +11 -1
  27. package/dist/es/rating/Rating.js +14 -3
  28. package/dist/es/slider/Slider.d.ts +24 -4
  29. package/dist/es/slider/Slider.js +31 -16
  30. package/dist/es/switch/Switch.d.ts +40 -4
  31. package/dist/es/switch/Switch.js +39 -24
  32. package/dist/es/textarea/TextArea.d.ts +11 -0
  33. package/dist/es/textarea/TextArea.js +14 -2
  34. package/dist/es/utils.d.ts +4 -0
  35. package/dist/es/utils.js +20 -0
  36. package/dist/npm/checkbox/Checkbox.d.ts +7 -0
  37. package/dist/npm/checkbox/Checkbox.js +9 -1
  38. package/dist/npm/colors/ColorGradient.d.ts +34 -14
  39. package/dist/npm/colors/ColorGradient.js +49 -34
  40. package/dist/npm/colors/ColorPalette.d.ts +33 -14
  41. package/dist/npm/colors/ColorPalette.js +46 -32
  42. package/dist/npm/colors/ColorPicker.d.ts +7 -0
  43. package/dist/npm/colors/ColorPicker.js +9 -1
  44. package/dist/npm/input/Input.d.ts +40 -4
  45. package/dist/npm/input/Input.js +36 -20
  46. package/dist/npm/main.d.ts +6 -6
  47. package/dist/npm/main.js +18 -6
  48. package/dist/npm/maskedtextbox/MaskedTextBox.d.ts +69 -4
  49. package/dist/npm/maskedtextbox/MaskedTextBox.js +41 -26
  50. package/dist/npm/numerictextbox/NumericTextBox.d.ts +7 -0
  51. package/dist/npm/numerictextbox/NumericTextBox.js +9 -1
  52. package/dist/npm/numerictextbox/interfaces/NumericTextBoxProps.d.ts +3 -0
  53. package/dist/npm/package-metadata.js +1 -1
  54. package/dist/npm/radiobutton/RadioButton.d.ts +13 -0
  55. package/dist/npm/radiobutton/RadioButton.js +15 -1
  56. package/dist/npm/radiobutton/RadioGroup.d.ts +13 -0
  57. package/dist/npm/radiobutton/RadioGroup.js +15 -1
  58. package/dist/npm/range-slider/RangeSlider.d.ts +11 -1
  59. package/dist/npm/range-slider/RangeSlider.js +13 -2
  60. package/dist/npm/rating/Rating.d.ts +11 -1
  61. package/dist/npm/rating/Rating.js +13 -2
  62. package/dist/npm/slider/Slider.d.ts +24 -4
  63. package/dist/npm/slider/Slider.js +30 -15
  64. package/dist/npm/switch/Switch.d.ts +40 -4
  65. package/dist/npm/switch/Switch.js +38 -23
  66. package/dist/npm/textarea/TextArea.d.ts +11 -0
  67. package/dist/npm/textarea/TextArea.js +13 -1
  68. package/dist/npm/utils.d.ts +4 -0
  69. package/dist/npm/utils.js +23 -0
  70. package/dist/systemjs/kendo-react-inputs.js +1 -1
  71. package/package.json +16 -11
@@ -39,12 +39,10 @@ var kendo_react_common_1 = require("@progress/kendo-react-common");
39
39
  var kendo_react_labels_1 = require("@progress/kendo-react-labels");
40
40
  var kendo_react_common_2 = require("@progress/kendo-react-common");
41
41
  var package_metadata_1 = require("../package-metadata");
42
- /**
43
- * Represents the Input component.
44
- */
45
- var Input = /** @class */ (function (_super) {
46
- __extends(Input, _super);
47
- function Input(props) {
42
+ /** @hidden */
43
+ var InputWithoutContext = /** @class */ (function (_super) {
44
+ __extends(InputWithoutContext, _super);
45
+ function InputWithoutContext(props) {
48
46
  var _this = _super.call(this, props) || this;
49
47
  _this._inputId = kendo_react_common_1.guid();
50
48
  /**
@@ -105,11 +103,11 @@ var Input = /** @class */ (function (_super) {
105
103
  };
106
104
  kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
107
105
  _this.state = {
108
- value: _this.props.defaultValue || Input.defaultProps.defaultValue
106
+ value: _this.props.defaultValue || InputWithoutContext.defaultProps.defaultValue
109
107
  };
110
108
  return _this;
111
109
  }
112
- Object.defineProperty(Input.prototype, "element", {
110
+ Object.defineProperty(InputWithoutContext.prototype, "element", {
113
111
  /**
114
112
  * Gets the native input element of the Input component.
115
113
  */
@@ -119,7 +117,7 @@ var Input = /** @class */ (function (_super) {
119
117
  enumerable: true,
120
118
  configurable: true
121
119
  });
122
- Object.defineProperty(Input.prototype, "value", {
120
+ Object.defineProperty(InputWithoutContext.prototype, "value", {
123
121
  /**
124
122
  * Gets the value of the Input.
125
123
  */
@@ -133,7 +131,7 @@ var Input = /** @class */ (function (_super) {
133
131
  enumerable: true,
134
132
  configurable: true
135
133
  });
136
- Object.defineProperty(Input.prototype, "name", {
134
+ Object.defineProperty(InputWithoutContext.prototype, "name", {
137
135
  /**
138
136
  * Gets the `name` property of the Input.
139
137
  */
@@ -143,7 +141,7 @@ var Input = /** @class */ (function (_super) {
143
141
  enumerable: true,
144
142
  configurable: true
145
143
  });
146
- Object.defineProperty(Input.prototype, "validity", {
144
+ Object.defineProperty(InputWithoutContext.prototype, "validity", {
147
145
  /**
148
146
  * Represents the validity state into which the Input is set.
149
147
  */
@@ -169,14 +167,14 @@ var Input = /** @class */ (function (_super) {
169
167
  enumerable: true,
170
168
  configurable: true
171
169
  });
172
- Object.defineProperty(Input.prototype, "validityStyles", {
170
+ Object.defineProperty(InputWithoutContext.prototype, "validityStyles", {
173
171
  /**
174
172
  * @hidden
175
173
  */
176
174
  get: function () {
177
175
  return this.props.validityStyles !== undefined
178
176
  ? this.props.validityStyles
179
- : Input.defaultProps.validityStyles;
177
+ : InputWithoutContext.defaultProps.validityStyles;
180
178
  },
181
179
  enumerable: true,
182
180
  configurable: true
@@ -184,19 +182,19 @@ var Input = /** @class */ (function (_super) {
184
182
  /**
185
183
  * @hidden
186
184
  */
187
- Input.prototype.componentDidMount = function () {
185
+ InputWithoutContext.prototype.componentDidMount = function () {
188
186
  this.forceUpdate();
189
187
  };
190
188
  /**
191
189
  * @hidden
192
190
  */
193
- Input.prototype.componentDidUpdate = function () {
191
+ InputWithoutContext.prototype.componentDidUpdate = function () {
194
192
  this.setValidity();
195
193
  };
196
194
  /**
197
195
  * @hidden
198
196
  */
199
- Input.prototype.render = function () {
197
+ InputWithoutContext.prototype.render = function () {
200
198
  var _this = this;
201
199
  var _a = this.props, className = _a.className, label = _a.label, id = _a.id, validationMessage = _a.validationMessage, defaultValue = _a.defaultValue, valid = _a.valid,
202
200
  // Removed to support direct use in Form Field component
@@ -213,10 +211,11 @@ var Input = /** @class */ (function (_super) {
213
211
  (React.createElement(kendo_react_labels_1.FloatingLabel, { label: label, editorId: inputId, editorValue: String(this.value), editorValid: isValid, editorDisabled: props.disabled, editorPlaceholder: props.placeholder, children: textbox, style: style, dir: props.dir }))
214
212
  : textbox;
215
213
  };
214
+ InputWithoutContext.displayName = 'Input';
216
215
  /**
217
216
  * @hidden
218
217
  */
219
- Input.propTypes = {
218
+ InputWithoutContext.propTypes = {
220
219
  label: PropTypes.string,
221
220
  validationMessage: PropTypes.string,
222
221
  required: PropTypes.bool,
@@ -228,11 +227,28 @@ var Input = /** @class */ (function (_super) {
228
227
  /**
229
228
  * @hidden
230
229
  */
231
- Input.defaultProps = {
230
+ InputWithoutContext.defaultProps = {
232
231
  defaultValue: '',
233
232
  required: false,
234
233
  validityStyles: true
235
234
  };
236
- return Input;
235
+ return InputWithoutContext;
237
236
  }(React.Component));
238
- exports.Input = Input;
237
+ exports.InputWithoutContext = InputWithoutContext;
238
+ /**
239
+ * Represents the PropsContext of the `Input` component.
240
+ * Used for global configuration of all `Input` instances.
241
+ *
242
+ * For more information, refer to the [Inputs Props Context]({% slug props-context_inputs %}) article.
243
+ */
244
+ exports.InputPropsContext = kendo_react_common_1.createPropsContext();
245
+ ;
246
+ /* eslint-disable @typescript-eslint/no-redeclare -- intentionally naming the component the same as the type */
247
+ /**
248
+ * Represents the [KendoReact Input component]({% slug overview_textbox %}).
249
+ *
250
+ * Accepts properties of type [InputProps]({% slug api_inputs_inputprops %}).
251
+ * Obtaining the `ref` returns an object of type [InputHandle]({% slug api_inputs_inputhandle %}).
252
+ */
253
+ exports.Input = kendo_react_common_1.withPropsContext(exports.InputPropsContext, InputWithoutContext);
254
+ exports.Input.displayName = 'KendoReactInput';
@@ -2,8 +2,8 @@ import { FormComponentValidity } from '@progress/kendo-react-common';
2
2
  export { FormComponentValidity };
3
3
  import { InputChangeEvent } from './input/interfaces/InputChangeEvent';
4
4
  export { InputChangeEvent };
5
- export * from './colors/ColorGradient';
6
- export * from './colors/ColorPalette';
5
+ export { ColorGradient, ColorGradientHandle, ColorGradientPropsContext, ColorGradientState } from './colors/ColorGradient';
6
+ export { ColorPalette, ColorPaletteHandle, ColorPalettePropsContext, ColorPaletteState } from './colors/ColorPalette';
7
7
  export * from './colors/ColorPicker';
8
8
  export * from './colors/interfaces/ColorGradientChangeEvent';
9
9
  export * from './colors/interfaces/ColorGradientProps';
@@ -17,8 +17,8 @@ export * from './colors/interfaces/ColorPickerPaletteSettings';
17
17
  export * from './colors/interfaces/ColorPickerPopupSettings';
18
18
  export * from './colors/interfaces/ColorPickerProps';
19
19
  export * from './colors/FlatColorPicker';
20
- export * from './input/Input';
21
- export * from './maskedtextbox/MaskedTextBox';
20
+ export { Input, InputHandle, InputProps, InputPropsContext, InputState } from './input/Input';
21
+ export { MaskedTextBox, MaskedTextBoxHandle, MaskedTextBoxPropsContext } from './maskedtextbox/MaskedTextBox';
22
22
  export * from './maskedtextbox/MaskedTextBoxProps';
23
23
  export * from './numerictextbox/NumericTextBox';
24
24
  export * from './numerictextbox/interfaces/NumericTextBoxHandle';
@@ -26,11 +26,11 @@ export * from './numerictextbox/interfaces/NumericTextBoxChangeEvent';
26
26
  export * from './numerictextbox/interfaces/NumericTextBoxBlurEvent';
27
27
  export * from './numerictextbox/interfaces/NumericTextBoxFocusEvent';
28
28
  export * from './numerictextbox/interfaces/NumericTextBoxProps';
29
- export * from './slider/Slider';
29
+ export { Slider, SliderHandle, SliderProps, SliderPropsContext, SliderChangeEvent } from './slider/Slider';
30
30
  export * from './slider/SliderLabel';
31
31
  export * from './range-slider/RangeSlider';
32
32
  export * from './interfaces/ToggleBaseProps';
33
- export * from './switch/Switch';
33
+ export { Switch, SwitchHandle, SwitchProps, SwitchPropsContext, SwitchState, SwitchChangeEvent } from './switch/Switch';
34
34
  export * from './checkbox/interfaces/CheckboxProps';
35
35
  export * from './checkbox/interfaces/CheckboxChangeEvent';
36
36
  export * from './checkbox/interfaces/CheckboxFocusEvent';
package/dist/npm/main.js CHANGED
@@ -3,17 +3,29 @@ function __export(m) {
3
3
  for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
4
  }
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- __export(require("./colors/ColorGradient"));
7
- __export(require("./colors/ColorPalette"));
6
+ var ColorGradient_1 = require("./colors/ColorGradient");
7
+ exports.ColorGradient = ColorGradient_1.ColorGradient;
8
+ exports.ColorGradientPropsContext = ColorGradient_1.ColorGradientPropsContext;
9
+ var ColorPalette_1 = require("./colors/ColorPalette");
10
+ exports.ColorPalette = ColorPalette_1.ColorPalette;
11
+ exports.ColorPalettePropsContext = ColorPalette_1.ColorPalettePropsContext;
8
12
  __export(require("./colors/ColorPicker"));
9
13
  __export(require("./colors/FlatColorPicker"));
10
- __export(require("./input/Input"));
11
- __export(require("./maskedtextbox/MaskedTextBox"));
14
+ var Input_1 = require("./input/Input");
15
+ exports.Input = Input_1.Input;
16
+ exports.InputPropsContext = Input_1.InputPropsContext;
17
+ var MaskedTextBox_1 = require("./maskedtextbox/MaskedTextBox");
18
+ exports.MaskedTextBox = MaskedTextBox_1.MaskedTextBox;
19
+ exports.MaskedTextBoxPropsContext = MaskedTextBox_1.MaskedTextBoxPropsContext;
12
20
  __export(require("./numerictextbox/NumericTextBox"));
13
- __export(require("./slider/Slider"));
21
+ var Slider_1 = require("./slider/Slider");
22
+ exports.Slider = Slider_1.Slider;
23
+ exports.SliderPropsContext = Slider_1.SliderPropsContext;
14
24
  __export(require("./slider/SliderLabel"));
15
25
  __export(require("./range-slider/RangeSlider"));
16
- __export(require("./switch/Switch"));
26
+ var Switch_1 = require("./switch/Switch");
27
+ exports.Switch = Switch_1.Switch;
28
+ exports.SwitchPropsContext = Switch_1.SwitchPropsContext;
17
29
  __export(require("./checkbox/Checkbox"));
18
30
  __export(require("./radiobutton/RadioGroup"));
19
31
  __export(require("./radiobutton/RadioButton"));
@@ -9,10 +9,9 @@ interface MaskedTextBoxState {
9
9
  focused?: boolean;
10
10
  value?: string;
11
11
  }
12
- /**
13
- * Represents the props of the [KendoReact MaskedTextBox component]({% slug overview_maskedtextbox %}).
14
- */
15
- export declare class MaskedTextBox extends React.Component<MaskedTextBoxProps, MaskedTextBoxState> implements FormComponent {
12
+ /** @hidden */
13
+ export declare class MaskedTextBoxWithoutContext extends React.Component<MaskedTextBoxProps, MaskedTextBoxState> implements FormComponent {
14
+ static displayName: string;
16
15
  /**
17
16
  * @hidden
18
17
  */
@@ -156,4 +155,70 @@ export declare class MaskedTextBox extends React.Component<MaskedTextBoxProps, M
156
155
  private readonly rules;
157
156
  private setValidity;
158
157
  }
158
+ /**
159
+ * Represents the PropsContext of the `MaskedTextBox` component.
160
+ * Used for global configuration of all `MaskedTextBox` instances.
161
+ *
162
+ * For more information, refer to the [Inputs Props Context]({% slug props-context_inputs %}) article.
163
+ */
164
+ export declare const MaskedTextBoxPropsContext: React.Context<(p: MaskedTextBoxProps) => MaskedTextBoxProps>;
165
+ /**
166
+ * Represent the `ref` of the MaskedTextBox component.
167
+ */
168
+ export interface MaskedTextBoxHandle extends Pick<MaskedTextBoxWithoutContext, keyof MaskedTextBoxWithoutContext> {
169
+ /**
170
+ * Gets the element of the MaskedTextBox.
171
+ *
172
+ * ```jsx
173
+ * class App extends React.Component {
174
+ * constructor(props) {
175
+ * super(props);
176
+ * }
177
+ * element = null;
178
+ * render() {
179
+ * return (
180
+ * <div>
181
+ * <MaskedTextBox
182
+ * ref={(component) =>
183
+ * this.element = component ? component.element : null}
184
+ * />
185
+ * <button onClick={() => console.log(this.element)}>console.log the element</button>
186
+ * </div>
187
+ * );
188
+ * }
189
+ * }
190
+ *
191
+ * ReactDOM.render(
192
+ * <App />,
193
+ * document.getElementsByTagName('my-app')[0]
194
+ * );
195
+ * ```
196
+ */
197
+ element: HTMLInputElement | null;
198
+ /**
199
+ * Gets the `name` property of the MaskedTextBox.
200
+ */
201
+ name: string | undefined;
202
+ /**
203
+ * Gets the raw value without the mask of the MaskedTextBox.
204
+ */
205
+ rawValue: string;
206
+ /**
207
+ * Represents the validity state into which the MaskedTextBox is set.
208
+ */
209
+ validity: FormComponentValidity;
210
+ /**
211
+ * Gets the value with the mask of the MaskedTextBox.
212
+ */
213
+ value: string;
214
+ }
215
+ /** @hidden */
216
+ export declare type MaskedTextBox = MaskedTextBoxHandle;
217
+ /**
218
+ * Represents the props of the [KendoReact MaskedTextBox component]({% slug overview_maskedtextbox %}).
219
+ *
220
+ * Accepts properties of type [MaskedTextBoxProps]({% slug api_inputs_maskedtextboxprops %}).
221
+ * Obtaining the `ref` returns an object of type [MaskedTextBoxHandle]({% slug api_inputs_maskedtextboxhandle %}).
222
+ */
223
+ export declare const MaskedTextBox: React.ForwardRefExoticComponent<MaskedTextBoxProps & React.RefAttributes<any>>;
159
224
  export {};
@@ -32,12 +32,10 @@ var kendo_react_common_1 = require("@progress/kendo-react-common");
32
32
  var kendo_react_labels_1 = require("@progress/kendo-react-labels");
33
33
  var kendo_react_common_2 = require("@progress/kendo-react-common");
34
34
  var package_metadata_1 = require("../package-metadata");
35
- /**
36
- * Represents the props of the [KendoReact MaskedTextBox component]({% slug overview_maskedtextbox %}).
37
- */
38
- var MaskedTextBox = /** @class */ (function (_super) {
39
- __extends(MaskedTextBox, _super);
40
- function MaskedTextBox(props) {
35
+ /** @hidden */
36
+ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
37
+ __extends(MaskedTextBoxWithoutContext, _super);
38
+ function MaskedTextBoxWithoutContext(props) {
41
39
  var _this = _super.call(this, props) || this;
42
40
  /**
43
41
  * @hidden
@@ -123,7 +121,7 @@ var MaskedTextBox = /** @class */ (function (_super) {
123
121
  kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
124
122
  return _this;
125
123
  }
126
- Object.defineProperty(MaskedTextBox.prototype, "element", {
124
+ Object.defineProperty(MaskedTextBoxWithoutContext.prototype, "element", {
127
125
  /**
128
126
  * Gets the element of the MaskedTextBox.
129
127
  *
@@ -161,7 +159,7 @@ var MaskedTextBox = /** @class */ (function (_super) {
161
159
  enumerable: true,
162
160
  configurable: true
163
161
  });
164
- Object.defineProperty(MaskedTextBox.prototype, "value", {
162
+ Object.defineProperty(MaskedTextBoxWithoutContext.prototype, "value", {
165
163
  /**
166
164
  * Gets the value with the mask of the MaskedTextBox.
167
165
  */
@@ -183,7 +181,7 @@ var MaskedTextBox = /** @class */ (function (_super) {
183
181
  enumerable: true,
184
182
  configurable: true
185
183
  });
186
- Object.defineProperty(MaskedTextBox.prototype, "rawValue", {
184
+ Object.defineProperty(MaskedTextBoxWithoutContext.prototype, "rawValue", {
187
185
  /**
188
186
  * Gets the raw value without the mask of the MaskedTextBox.
189
187
  */
@@ -193,7 +191,7 @@ var MaskedTextBox = /** @class */ (function (_super) {
193
191
  enumerable: true,
194
192
  configurable: true
195
193
  });
196
- Object.defineProperty(MaskedTextBox.prototype, "validity", {
194
+ Object.defineProperty(MaskedTextBoxWithoutContext.prototype, "validity", {
197
195
  /**
198
196
  * Represents the validity state into which the MaskedTextBox is set.
199
197
  */
@@ -213,31 +211,31 @@ var MaskedTextBox = /** @class */ (function (_super) {
213
211
  enumerable: true,
214
212
  configurable: true
215
213
  });
216
- Object.defineProperty(MaskedTextBox.prototype, "validityStyles", {
214
+ Object.defineProperty(MaskedTextBoxWithoutContext.prototype, "validityStyles", {
217
215
  /**
218
216
  * @hidden
219
217
  */
220
218
  get: function () {
221
219
  return this.props.validityStyles !== undefined
222
220
  ? this.props.validityStyles
223
- : MaskedTextBox.defaultProps.validityStyles;
221
+ : MaskedTextBoxWithoutContext.defaultProps.validityStyles;
224
222
  },
225
223
  enumerable: true,
226
224
  configurable: true
227
225
  });
228
- Object.defineProperty(MaskedTextBox.prototype, "required", {
226
+ Object.defineProperty(MaskedTextBoxWithoutContext.prototype, "required", {
229
227
  /**
230
228
  * @hidden
231
229
  */
232
230
  get: function () {
233
231
  return this.props.required !== undefined
234
232
  ? this.props.required
235
- : MaskedTextBox.defaultProps.required;
233
+ : MaskedTextBoxWithoutContext.defaultProps.required;
236
234
  },
237
235
  enumerable: true,
238
236
  configurable: true
239
237
  });
240
- Object.defineProperty(MaskedTextBox.prototype, "name", {
238
+ Object.defineProperty(MaskedTextBoxWithoutContext.prototype, "name", {
241
239
  /**
242
240
  * Gets the `name` property of the MaskedTextBox.
243
241
  */
@@ -250,7 +248,7 @@ var MaskedTextBox = /** @class */ (function (_super) {
250
248
  /**
251
249
  * @hidden
252
250
  */
253
- MaskedTextBox.prototype.componentDidUpdate = function (prevProps, prevState) {
251
+ MaskedTextBoxWithoutContext.prototype.componentDidUpdate = function (prevProps, prevState) {
254
252
  if (this.element && this.state.focused && prevState.focused) {
255
253
  var _a = this._selection, start = _a[0], end = _a[1];
256
254
  var prevSelection = prevProps.selection;
@@ -273,14 +271,14 @@ var MaskedTextBox = /** @class */ (function (_super) {
273
271
  /**
274
272
  * @hidden
275
273
  */
276
- MaskedTextBox.prototype.componentDidMount = function () {
274
+ MaskedTextBoxWithoutContext.prototype.componentDidMount = function () {
277
275
  this.updateService();
278
276
  this.setValidity();
279
277
  };
280
278
  /**
281
279
  * @hidden
282
280
  */
283
- MaskedTextBox.prototype.render = function () {
281
+ MaskedTextBoxWithoutContext.prototype.render = function () {
284
282
  var _this = this;
285
283
  var inputId = this.props.id || this._inputId;
286
284
  var isValid = !this.validityStyles || this.validity.valid;
@@ -296,7 +294,7 @@ var MaskedTextBox = /** @class */ (function (_super) {
296
294
  ? (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 }))
297
295
  : component;
298
296
  };
299
- MaskedTextBox.prototype.triggerOnChange = function (maskedValue, event) {
297
+ MaskedTextBoxWithoutContext.prototype.triggerOnChange = function (maskedValue, event) {
300
298
  this.setState({
301
299
  value: maskedValue
302
300
  });
@@ -313,7 +311,7 @@ var MaskedTextBox = /** @class */ (function (_super) {
313
311
  this._valueDuringOnChange = undefined;
314
312
  }
315
313
  };
316
- MaskedTextBox.prototype.updateService = function (extra) {
314
+ MaskedTextBoxWithoutContext.prototype.updateService = function (extra) {
317
315
  var config = Object.assign({
318
316
  includeLiterals: this.props.includeLiterals,
319
317
  mask: this.props.mask,
@@ -323,17 +321,18 @@ var MaskedTextBox = /** @class */ (function (_super) {
323
321
  }, extra); // tslint:disable-line:align
324
322
  this._service.update(config);
325
323
  };
326
- Object.defineProperty(MaskedTextBox.prototype, "rules", {
324
+ Object.defineProperty(MaskedTextBoxWithoutContext.prototype, "rules", {
327
325
  get: function () {
328
326
  return Object.assign({}, utils_1.defaultRules, this.props.rules);
329
327
  },
330
328
  enumerable: true,
331
329
  configurable: true
332
330
  });
331
+ MaskedTextBoxWithoutContext.displayName = 'MaskedTextBox';
333
332
  /**
334
333
  * @hidden
335
334
  */
336
- MaskedTextBox.propTypes = {
335
+ MaskedTextBoxWithoutContext.propTypes = {
337
336
  value: PropTypes.string,
338
337
  defaultValue: PropTypes.string,
339
338
  placeholder: PropTypes.string,
@@ -366,8 +365,8 @@ var MaskedTextBox = /** @class */ (function (_super) {
366
365
  return new Error('Invalid prop `' + propName + '` supplied to' +
367
366
  ' `' + componentName + '`. Validation failed.');
368
367
  }
369
- return null;
370
368
  }
369
+ return null;
371
370
  },
372
371
  selection: PropTypes.shape({
373
372
  start: PropTypes.number.isRequired,
@@ -384,7 +383,7 @@ var MaskedTextBox = /** @class */ (function (_super) {
384
383
  /**
385
384
  * @hidden
386
385
  */
387
- MaskedTextBox.defaultProps = {
386
+ MaskedTextBoxWithoutContext.defaultProps = {
388
387
  prompt: '_',
389
388
  promptPlaceholder: ' ',
390
389
  includeLiterals: false,
@@ -393,6 +392,22 @@ var MaskedTextBox = /** @class */ (function (_super) {
393
392
  required: false,
394
393
  validityStyles: true
395
394
  };
396
- return MaskedTextBox;
395
+ return MaskedTextBoxWithoutContext;
397
396
  }(React.Component));
398
- exports.MaskedTextBox = MaskedTextBox;
397
+ exports.MaskedTextBoxWithoutContext = MaskedTextBoxWithoutContext;
398
+ /**
399
+ * Represents the PropsContext of the `MaskedTextBox` component.
400
+ * Used for global configuration of all `MaskedTextBox` instances.
401
+ *
402
+ * For more information, refer to the [Inputs Props Context]({% slug props-context_inputs %}) article.
403
+ */
404
+ exports.MaskedTextBoxPropsContext = kendo_react_common_1.createPropsContext();
405
+ /* eslint-disable @typescript-eslint/no-redeclare -- intentionally naming the component the same as the type */
406
+ /**
407
+ * Represents the props of the [KendoReact MaskedTextBox component]({% slug overview_maskedtextbox %}).
408
+ *
409
+ * Accepts properties of type [MaskedTextBoxProps]({% slug api_inputs_maskedtextboxprops %}).
410
+ * Obtaining the `ref` returns an object of type [MaskedTextBoxHandle]({% slug api_inputs_maskedtextboxhandle %}).
411
+ */
412
+ exports.MaskedTextBox = kendo_react_common_1.withPropsContext(exports.MaskedTextBoxPropsContext, MaskedTextBoxWithoutContext);
413
+ exports.MaskedTextBox.displayName = 'KendoReactMaskedTextBox';
@@ -1,6 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { NumericTextBoxProps } from './interfaces/NumericTextBoxProps';
3
3
  import { NumericTextBoxHandle } from './interfaces/NumericTextBoxHandle';
4
+ /**
5
+ * Represents the PropsContext of the `NumericTextBox` component.
6
+ * Used for global configuration of all `NumericTextBox` instances.
7
+ *
8
+ * For more information, refer to the [Inputs Props Context]({% slug props-context_inputs %}) article.
9
+ */
10
+ export declare const NumericTextBoxPropsContext: React.Context<(p: NumericTextBoxProps) => NumericTextBoxProps>;
4
11
  /**
5
12
  * Represents the [KendoReact NumericTextBox component]({% slug overview_numerictextbox %}).
6
13
  */
@@ -10,11 +10,19 @@ var package_metadata_1 = require("../package-metadata");
10
10
  var messages_1 = require("../messages");
11
11
  var utils_1 = require("./utils");
12
12
  var VALIDATION_MESSAGE = 'Please enter a valid value!';
13
+ /**
14
+ * Represents the PropsContext of the `NumericTextBox` component.
15
+ * Used for global configuration of all `NumericTextBox` instances.
16
+ *
17
+ * For more information, refer to the [Inputs Props Context]({% slug props-context_inputs %}) article.
18
+ */
19
+ exports.NumericTextBoxPropsContext = kendo_react_common_1.createPropsContext();
13
20
  /**
14
21
  * Represents the [KendoReact NumericTextBox component]({% slug overview_numerictextbox %}).
15
22
  */
16
- exports.NumericTextBox = React.forwardRef(function (props, target) {
23
+ exports.NumericTextBox = React.forwardRef(function (directProps, target) {
17
24
  kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
25
+ var props = kendo_react_common_1.usePropsContext(exports.NumericTextBoxPropsContext, directProps);
18
26
  var calculatedId = React.useMemo(function () { return kendo_react_common_1.guid(); }, []);
19
27
  var inputId = props.id || calculatedId;
20
28
  var intlService = kendo_react_intl_1.useInternationalization();
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FormComponentProps } from '@progress/kendo-react-common';
2
3
  import { NumberFormatOptions } from '@progress/kendo-react-intl';
3
4
  import { NumericTextBoxChangeEvent } from './NumericTextBoxChangeEvent';
@@ -121,5 +122,7 @@ export interface NumericTextBoxProps extends FormComponentProps {
121
122
  * The event handler that will be fired when NumericTextBox is blurred.
122
123
  */
123
124
  onBlur?: (event: NumericTextBoxBlurEvent) => void;
125
+ /** @hidden */
126
+ children?: React.ReactNode;
124
127
  }
125
128
  export {};
@@ -7,7 +7,7 @@ exports.packageMetadata = {
7
7
  name: '@progress/kendo-react-inputs',
8
8
  productName: 'KendoReact',
9
9
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
10
- publishDate: 1638196808,
10
+ publishDate: 1638254513,
11
11
  version: '',
12
12
  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'
13
13
  };
@@ -7,4 +7,17 @@ export interface RadioButtonHandle {
7
7
  element: HTMLInputElement | null;
8
8
  focus: any;
9
9
  }
10
+ /**
11
+ * Represents the PropsContext of the `RadioButton` component.
12
+ * Used for global configuration of all `RadioButton` instances.
13
+ *
14
+ * For more information, refer to the [Inputs Props Context]({% slug props-context_inputs %}) article.
15
+ */
16
+ export declare const RadioButtonPropsContext: React.Context<(p: RadioButtonProps) => RadioButtonProps>;
17
+ /**
18
+ * Represents the [KendoReact RadioButton component]({% slug overview_radiobutton %}).
19
+ *
20
+ * Accepts properties of type [RadioButtonProps]({% slug api_inputs_radiobuttonprops %}).
21
+ * Obtaining the `ref` returns an object of type [RadioButtonHandle]({% slug api_inputs_radiobuttonhandle %}).
22
+ */
10
23
  export declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & React.RefAttributes<RadioButtonHandle>>;
@@ -25,8 +25,22 @@ var PropTypes = require("prop-types");
25
25
  var kendo_react_common_1 = require("@progress/kendo-react-common");
26
26
  var kendo_react_common_2 = require("@progress/kendo-react-common");
27
27
  var package_metadata_1 = require("../package-metadata");
28
- exports.RadioButton = React.forwardRef(function (props, target) {
28
+ /**
29
+ * Represents the PropsContext of the `RadioButton` component.
30
+ * Used for global configuration of all `RadioButton` instances.
31
+ *
32
+ * For more information, refer to the [Inputs Props Context]({% slug props-context_inputs %}) article.
33
+ */
34
+ exports.RadioButtonPropsContext = kendo_react_common_1.createPropsContext();
35
+ /**
36
+ * Represents the [KendoReact RadioButton component]({% slug overview_radiobutton %}).
37
+ *
38
+ * Accepts properties of type [RadioButtonProps]({% slug api_inputs_radiobuttonprops %}).
39
+ * Obtaining the `ref` returns an object of type [RadioButtonHandle]({% slug api_inputs_radiobuttonhandle %}).
40
+ */
41
+ exports.RadioButton = React.forwardRef(function (directProps, target) {
29
42
  kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
43
+ var props = kendo_react_common_1.usePropsContext(exports.RadioButtonPropsContext, directProps);
30
44
  var ariaDescribedBy = props.ariaDescribedBy, checked = props.checked, children = props.children, className = props.className, disabled = props.disabled, id = props.id, label = props.label, labelPlacement = props.labelPlacement, name = props.name, style = props.style, tabIndex = props.tabIndex, value = props.value, valid = props.valid, onChange = props.onChange, onFocus = props.onFocus, onBlur = props.onBlur, others = __rest(props, ["ariaDescribedBy", "checked", "children", "className", "disabled", "id", "label", "labelPlacement", "name", "style", "tabIndex", "value", "valid", "onChange", "onFocus", "onBlur"]);
31
45
  var elementRef = React.useRef(null);
32
46
  var focusElement = React.useCallback(function () {
@@ -7,4 +7,17 @@ export interface RadioGroupHandle {
7
7
  element: HTMLUListElement | null;
8
8
  focus: any;
9
9
  }
10
+ /**
11
+ * Represents the PropsContext of the `RadioGroup` component.
12
+ * Used for global configuration of all `RadioGroup` instances.
13
+ *
14
+ * For more information, refer to the [Inputs Props Context]({% slug props-context_inputs %}) article.
15
+ */
16
+ export declare const RadioGroupPropsContext: React.Context<(p: RadioGroupProps) => RadioGroupProps>;
17
+ /**
18
+ * Represents the [KendoReact RadioGroup component]({% slug overview_radiogroup %}).
19
+ *
20
+ * Accepts properties of type [RadioGroupProps]({% slug api_inputs_radiogroupprops %}).
21
+ * Obtaining the `ref` returns an object of type [RadioGroupHandle]({% slug api_inputs_radiogrouphandle %}).
22
+ */
10
23
  export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<RadioGroupHandle>>;
@@ -17,8 +17,22 @@ var RadioButton_1 = require("./RadioButton");
17
17
  var kendo_react_common_1 = require("@progress/kendo-react-common");
18
18
  var kendo_react_common_2 = require("@progress/kendo-react-common");
19
19
  var package_metadata_1 = require("../package-metadata");
20
- exports.RadioGroup = React.forwardRef(function (props, target) {
20
+ /**
21
+ * Represents the PropsContext of the `RadioGroup` component.
22
+ * Used for global configuration of all `RadioGroup` instances.
23
+ *
24
+ * For more information, refer to the [Inputs Props Context]({% slug props-context_inputs %}) article.
25
+ */
26
+ exports.RadioGroupPropsContext = kendo_react_common_1.createPropsContext();
27
+ /**
28
+ * Represents the [KendoReact RadioGroup component]({% slug overview_radiogroup %}).
29
+ *
30
+ * Accepts properties of type [RadioGroupProps]({% slug api_inputs_radiogroupprops %}).
31
+ * Obtaining the `ref` returns an object of type [RadioGroupHandle]({% slug api_inputs_radiogrouphandle %}).
32
+ */
33
+ exports.RadioGroup = React.forwardRef(function (directProps, target) {
21
34
  kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
35
+ var props = kendo_react_common_1.usePropsContext(exports.RadioGroupPropsContext, directProps);
22
36
  var ariaLabelledBy = props.ariaLabelledBy, ariaDescribedBy = props.ariaDescribedBy, className = props.className, data = props.data, defaultValue = props.defaultValue, disabled = props.disabled, name = props.name, labelPlacement = props.labelPlacement, layout = props.layout, style = props.style, value = props.value, valid = props.valid, _a = props.item, Item = _a === void 0 ? defaultProps.item : _a, onChange = props.onChange, onFocus = props.onFocus;
23
37
  var elementRef = React.useRef(null);
24
38
  var focusElement = React.useCallback(function () {