@progress/kendo-react-inputs 5.4.0-dev.202205200719 → 5.4.0-dev.202206061009

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 (182) hide show
  1. package/dist/cdn/js/kendo-react-inputs.js +1 -1
  2. package/dist/es/checkbox/Checkbox.d.ts +1 -1
  3. package/dist/es/checkbox/Checkbox.js +9 -7
  4. package/dist/es/checkbox/interfaces/CheckboxBlurEvent.js +1 -0
  5. package/dist/es/checkbox/interfaces/CheckboxChangeEvent.js +1 -0
  6. package/dist/es/checkbox/interfaces/CheckboxFocusEvent.js +1 -0
  7. package/dist/es/checkbox/interfaces/CheckboxProps.js +1 -0
  8. package/dist/es/colors/ColorContrastLabels.js +6 -4
  9. package/dist/es/colors/ColorContrastSvg.js +3 -1
  10. package/dist/es/colors/ColorGradient.d.ts +3 -3
  11. package/dist/es/colors/ColorGradient.js +11 -5
  12. package/dist/es/colors/ColorInput.js +3 -1
  13. package/dist/es/colors/ColorPalette.d.ts +6 -3
  14. package/dist/es/colors/ColorPalette.js +15 -6
  15. package/dist/es/colors/ColorPicker.d.ts +1 -1
  16. package/dist/es/colors/ColorPicker.js +4 -4
  17. package/dist/es/colors/FlatColorPicker.d.ts +1 -1
  18. package/dist/es/colors/FlatColorPicker.js +25 -24
  19. package/dist/es/colors/HexInput.d.ts +1 -1
  20. package/dist/es/colors/HexInput.js +3 -1
  21. package/dist/es/colors/Picker.js +1 -1
  22. package/dist/es/colors/interfaces/ColorGradientChangeEvent.js +1 -0
  23. package/dist/es/colors/interfaces/ColorGradientProps.js +1 -0
  24. package/dist/es/colors/interfaces/ColorPaletteChangeEvent.js +1 -0
  25. package/dist/es/colors/interfaces/ColorPaletteProps.js +1 -0
  26. package/dist/es/colors/interfaces/ColorPickerActiveColorClick.js +1 -0
  27. package/dist/es/colors/interfaces/ColorPickerBlurEvent.js +1 -0
  28. package/dist/es/colors/interfaces/ColorPickerChangeEvent.js +1 -0
  29. package/dist/es/colors/interfaces/ColorPickerFocusEvent.js +1 -0
  30. package/dist/es/colors/interfaces/ColorPickerGradientSettings.js +1 -0
  31. package/dist/es/colors/interfaces/ColorPickerPaletteSettings.js +1 -0
  32. package/dist/es/colors/interfaces/ColorPickerPopupSettings.js +1 -0
  33. package/dist/es/colors/interfaces/ColorPickerProps.js +1 -0
  34. package/dist/es/colors/interfaces/ColorPickerView.js +1 -0
  35. package/dist/es/colors/interfaces/PickerPopupSettings.js +1 -0
  36. package/dist/es/colors/interfaces/PickerProps.js +1 -0
  37. package/dist/es/colors/models/hsva.js +1 -0
  38. package/dist/es/colors/models/output-format.js +1 -0
  39. package/dist/es/colors/models/rgb.js +1 -0
  40. package/dist/es/colors/models/rgba.js +1 -0
  41. package/dist/es/colors/models/table-cell.js +1 -0
  42. package/dist/es/colors/models/tile-size.js +1 -0
  43. package/dist/es/colors/utils/color-parser.d.ts +1 -1
  44. package/dist/es/colors/utils/color-parser.js +2 -2
  45. package/dist/es/colors/utils/misc.d.ts +1 -1
  46. package/dist/es/colors/utils/svg-calc.js +4 -4
  47. package/dist/es/common/SliderTooltip.js +3 -3
  48. package/dist/es/common/SwitchController.d.ts +3 -3
  49. package/dist/es/common/SwitchController.js +7 -3
  50. package/dist/es/common/SwitchModel.d.ts +1 -1
  51. package/dist/es/input/Input.d.ts +5 -5
  52. package/dist/es/input/Input.js +14 -9
  53. package/dist/es/input/interfaces/InputChangeEvent.js +1 -0
  54. package/dist/es/interfaces/Direction.js +1 -0
  55. package/dist/es/interfaces/ToggleBaseProps.js +1 -0
  56. package/dist/es/main.js +31 -0
  57. package/dist/es/maskedtextbox/MaskedTextBox.d.ts +15 -15
  58. package/dist/es/maskedtextbox/MaskedTextBox.js +19 -16
  59. package/dist/es/maskedtextbox/MaskedTextBoxProps.js +1 -0
  60. package/dist/es/maskedtextbox/masking.service.d.ts +4 -4
  61. package/dist/es/maskedtextbox/masking.service.js +4 -4
  62. package/dist/es/maskedtextbox/parsing/result.js +1 -1
  63. package/dist/es/messages/index.d.ts +22 -22
  64. package/dist/es/numerictextbox/NumericTextBox.d.ts +1 -1
  65. package/dist/es/numerictextbox/NumericTextBox.js +3 -3
  66. package/dist/es/numerictextbox/interfaces/NumericTextBoxBlurEvent.js +1 -0
  67. package/dist/es/numerictextbox/interfaces/NumericTextBoxChangeEvent.js +1 -0
  68. package/dist/es/numerictextbox/interfaces/NumericTextBoxFocusEvent.js +1 -0
  69. package/dist/es/numerictextbox/interfaces/NumericTextBoxHandle.js +1 -0
  70. package/dist/es/numerictextbox/interfaces/NumericTextBoxProps.js +1 -0
  71. package/dist/es/numerictextbox/interfaces/NumericTextBoxState.js +1 -0
  72. package/dist/es/numerictextbox/utils/index.d.ts +7 -7
  73. package/dist/es/numerictextbox/utils/index.js +4 -4
  74. package/dist/es/package-metadata.js +1 -1
  75. package/dist/es/radiobutton/RadioButton.d.ts +1 -1
  76. package/dist/es/radiobutton/RadioButton.js +5 -3
  77. package/dist/es/radiobutton/RadioGroup.d.ts +1 -1
  78. package/dist/es/radiobutton/RadioGroup.js +1 -1
  79. package/dist/es/radiobutton/interfaces/RadioButtonBlurEvent.js +1 -0
  80. package/dist/es/radiobutton/interfaces/RadioButtonChangeEvent.js +1 -0
  81. package/dist/es/radiobutton/interfaces/RadioButtonFocusEvent.js +1 -0
  82. package/dist/es/radiobutton/interfaces/RadioButtonProps.js +1 -0
  83. package/dist/es/radiobutton/interfaces/RadioGroupChangeEvent.js +1 -0
  84. package/dist/es/radiobutton/interfaces/RadioGroupFocusEvent.js +1 -0
  85. package/dist/es/radiobutton/interfaces/RadioGroupProps.js +1 -0
  86. package/dist/es/range-slider/RangeSlider.d.ts +1 -1
  87. package/dist/es/range-slider/RangeSlider.js +8 -8
  88. package/dist/es/range-slider/range-raducer.js +12 -12
  89. package/dist/es/rating/Rating.d.ts +1 -1
  90. package/dist/es/rating/Rating.js +16 -13
  91. package/dist/es/rating/RatingItem.d.ts +1 -1
  92. package/dist/es/rating/models/index.d.ts +4 -0
  93. package/dist/es/rating/models/index.js +1 -0
  94. package/dist/es/rating/utils/index.d.ts +1 -1
  95. package/dist/es/slider/Slider.d.ts +3 -3
  96. package/dist/es/slider/Slider.js +7 -3
  97. package/dist/es/slider/SliderLabel.js +2 -2
  98. package/dist/es/switch/Switch.d.ts +13 -13
  99. package/dist/es/switch/Switch.js +18 -13
  100. package/dist/es/textarea/TextArea.d.ts +1 -1
  101. package/dist/es/textarea/TextArea.js +9 -7
  102. package/dist/es/textarea/interfaces/TextAreaBlurEvent.js +1 -0
  103. package/dist/es/textarea/interfaces/TextAreaChangeEvent.js +1 -0
  104. package/dist/es/textarea/interfaces/TextAreaFocusEvent.js +1 -0
  105. package/dist/es/textarea/interfaces/TextAreaProps.js +1 -0
  106. package/dist/es/utils.js +10 -1
  107. package/dist/npm/checkbox/Checkbox.d.ts +1 -1
  108. package/dist/npm/checkbox/Checkbox.js +20 -17
  109. package/dist/npm/colors/ColorContrastLabels.js +10 -7
  110. package/dist/npm/colors/ColorContrastSvg.js +10 -7
  111. package/dist/npm/colors/ColorGradient.d.ts +3 -3
  112. package/dist/npm/colors/ColorGradient.js +42 -35
  113. package/dist/npm/colors/ColorInput.js +6 -4
  114. package/dist/npm/colors/ColorPalette.d.ts +6 -3
  115. package/dist/npm/colors/ColorPalette.js +25 -15
  116. package/dist/npm/colors/ColorPicker.d.ts +1 -1
  117. package/dist/npm/colors/ColorPicker.js +14 -13
  118. package/dist/npm/colors/FlatColorPicker.d.ts +1 -1
  119. package/dist/npm/colors/FlatColorPicker.js +28 -26
  120. package/dist/npm/colors/HexInput.d.ts +1 -1
  121. package/dist/npm/colors/HexInput.js +6 -4
  122. package/dist/npm/colors/Picker.js +4 -2
  123. package/dist/npm/colors/models/palette-presets.js +1 -0
  124. package/dist/npm/colors/utils/color-cache.js +1 -0
  125. package/dist/npm/colors/utils/color-palette.service.js +7 -6
  126. package/dist/npm/colors/utils/color-parser.d.ts +1 -1
  127. package/dist/npm/colors/utils/color-parser.js +47 -36
  128. package/dist/npm/colors/utils/misc.d.ts +1 -1
  129. package/dist/npm/colors/utils/misc.js +6 -3
  130. package/dist/npm/colors/utils/svg-calc.js +13 -8
  131. package/dist/npm/common/SliderTooltip.js +7 -5
  132. package/dist/npm/common/SwitchController.d.ts +3 -3
  133. package/dist/npm/common/SwitchController.js +7 -3
  134. package/dist/npm/common/SwitchModel.d.ts +1 -1
  135. package/dist/npm/input/Input.d.ts +5 -5
  136. package/dist/npm/input/Input.js +20 -14
  137. package/dist/npm/main.js +69 -26
  138. package/dist/npm/maskedtextbox/MaskedTextBox.d.ts +15 -15
  139. package/dist/npm/maskedtextbox/MaskedTextBox.js +26 -22
  140. package/dist/npm/maskedtextbox/masking.service.d.ts +4 -4
  141. package/dist/npm/maskedtextbox/masking.service.js +24 -23
  142. package/dist/npm/maskedtextbox/parsing/combinators.js +5 -2
  143. package/dist/npm/maskedtextbox/parsing/parsers.js +15 -7
  144. package/dist/npm/maskedtextbox/parsing/result.js +2 -1
  145. package/dist/npm/maskedtextbox/parsing/stream.js +1 -0
  146. package/dist/npm/maskedtextbox/utils.js +1 -0
  147. package/dist/npm/messages/index.d.ts +22 -22
  148. package/dist/npm/messages/index.js +2 -1
  149. package/dist/npm/numerictextbox/NumericTextBox.d.ts +1 -1
  150. package/dist/npm/numerictextbox/NumericTextBox.js +32 -31
  151. package/dist/npm/numerictextbox/utils/index.d.ts +7 -7
  152. package/dist/npm/numerictextbox/utils/index.js +117 -88
  153. package/dist/npm/package-metadata.js +2 -1
  154. package/dist/npm/radiobutton/RadioButton.d.ts +1 -1
  155. package/dist/npm/radiobutton/RadioButton.js +15 -12
  156. package/dist/npm/radiobutton/RadioGroup.d.ts +1 -1
  157. package/dist/npm/radiobutton/RadioGroup.js +12 -11
  158. package/dist/npm/range-slider/RangeSlider.d.ts +1 -1
  159. package/dist/npm/range-slider/RangeSlider.js +18 -17
  160. package/dist/npm/range-slider/range-raducer.js +15 -13
  161. package/dist/npm/rating/Rating.d.ts +1 -1
  162. package/dist/npm/rating/Rating.js +37 -33
  163. package/dist/npm/rating/RatingItem.d.ts +1 -1
  164. package/dist/npm/rating/RatingItem.js +3 -2
  165. package/dist/npm/rating/models/index.d.ts +4 -0
  166. package/dist/npm/rating/rating-reducer.js +7 -5
  167. package/dist/npm/rating/utils/index.d.ts +1 -1
  168. package/dist/npm/rating/utils/index.js +18 -11
  169. package/dist/npm/slider/Slider.d.ts +3 -3
  170. package/dist/npm/slider/Slider.js +15 -10
  171. package/dist/npm/slider/SliderLabel.js +6 -4
  172. package/dist/npm/switch/Switch.d.ts +13 -13
  173. package/dist/npm/switch/Switch.js +29 -23
  174. package/dist/npm/textarea/TextArea.d.ts +1 -1
  175. package/dist/npm/textarea/TextArea.js +18 -15
  176. package/dist/npm/utils.js +11 -1
  177. package/dist/systemjs/kendo-react-inputs.js +1 -1
  178. package/package.json +15 -15
  179. package/dist/es/switch/util.d.ts +0 -8
  180. package/dist/es/switch/util.js +0 -46
  181. package/dist/npm/switch/util.d.ts +0 -8
  182. package/dist/npm/switch/util.js +0 -48
@@ -233,7 +233,7 @@ export var getFormatSymbols = function (format, intlService) {
233
233
  var zeroResult = intlService.formatNumber(ZERO_NUMBER, format);
234
234
  var oneResult = intlService.formatNumber(ONE_NUMBER, format);
235
235
  var symbols = intlService.numberSymbols();
236
- var sanitizeRegex = new RegExp("[\\d\\" + symbols.decimal + symbols.group + "]", 'g');
236
+ var sanitizeRegex = new RegExp("[\\d\\".concat(symbols.decimal).concat(symbols.group, "]"), 'g');
237
237
  var resultWithDuplicates = [positiveResult, negativeResult, zeroResult, oneResult]
238
238
  .map(function (result) { return result.replace(sanitizeRegex, ''); })
239
239
  .join('');
@@ -327,9 +327,9 @@ export var sanitizeNumber = function (state, format, intlService) {
327
327
  var restrictedSymbols = getFormatSymbols(format, intlService);
328
328
  var currentLooseValueAsString = String(newState.currentLooseValue);
329
329
  var prevLooseValueAsString = String(prevLooseValue);
330
- var sanitizeRegex = new RegExp("[^\\d\\" + symbols.decimal + "]", 'g');
331
- var sanitizeGroupRegex = new RegExp("[^\\d\\" + symbols.decimal + "\\" + symbols.group + "]", 'g');
332
- var allSymbolsRegex = new RegExp("[\\d\\" + symbols.decimal + "\\" + symbols.group + "]");
330
+ var sanitizeRegex = new RegExp("[^\\d\\".concat(symbols.decimal, "]"), 'g');
331
+ var sanitizeGroupRegex = new RegExp("[^\\d\\".concat(symbols.decimal, "\\").concat(symbols.group, "]"), 'g');
332
+ var allSymbolsRegex = new RegExp("[\\d\\".concat(symbols.decimal, "\\").concat(symbols.group, "]"));
333
333
  var sanitizedString = currentLooseValueAsString.replace(sanitizeRegex, '');
334
334
  var numberStart = getFirstNumberIndex(currentLooseValueAsString, DIGITS_REGEX);
335
335
  var numberEnd = numberStart === -1 ? -1 : getLastNumberIndex(currentLooseValueAsString, DIGITS_REGEX);
@@ -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: 1653030067,
8
+ publishDate: 1654509130,
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
  };
@@ -20,4 +20,4 @@ export declare const RadioButtonPropsContext: React.Context<(p: RadioButtonProps
20
20
  * Accepts properties of type [RadioButtonProps]({% slug api_inputs_radiobuttonprops %}).
21
21
  * Obtaining the `ref` returns an object of type [RadioButtonHandle]({% slug api_inputs_radiobuttonhandle %}).
22
22
  */
23
- export declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & React.RefAttributes<RadioButtonHandle>>;
23
+ export declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & React.RefAttributes<RadioButtonHandle | null>>;
@@ -14,8 +14,10 @@ var __rest = (this && this.__rest) || function (s, e) {
14
14
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
15
  t[p] = s[p];
16
16
  if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
18
- t[p[i]] = s[p[i]];
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
+ }
19
21
  return t;
20
22
  };
21
23
  import * as React from 'react';
@@ -67,7 +69,7 @@ export var RadioButton = React.forwardRef(function (directProps, target) {
67
69
  }
68
70
  }, [onBlur, disabled]);
69
71
  var inputProps = __assign({ type: 'radio', id: id || calculatedId, name: name, className: classNames('k-radio', (_a = {},
70
- _a["k-radio-" + (kendoThemeMaps.sizeMap[size] || size)] = size,
72
+ _a["k-radio-".concat(kendoThemeMaps.sizeMap[size] || size)] = size,
71
73
  _a['k-invalid'] = valid === false,
72
74
  _a), className), ref: elementRef, disabled: disabled, tabIndex: getTabIndex(tabIndex, disabled), checked: checked, style: style, 'aria-describedby': ariaDescribedBy, value: value, onChange: handleChange, onFocus: handleFocus, onBlur: handleBlur }, others);
73
75
  var radioButtonLabel = (React.createElement(React.Fragment, null, label !== undefined ? (React.createElement("label", { className: 'k-radio-label', htmlFor: id || calculatedId, style: { userSelect: 'none' }, "aria-label": label }, label)) : null));
@@ -20,4 +20,4 @@ export declare const RadioGroupPropsContext: React.Context<(p: RadioGroupProps)
20
20
  * Accepts properties of type [RadioGroupProps]({% slug api_inputs_radiogroupprops %}).
21
21
  * Obtaining the `ref` returns an object of type [RadioGroupHandle]({% slug api_inputs_radiogrouphandle %}).
22
22
  */
23
- export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<RadioGroupHandle>>;
23
+ export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<RadioGroupHandle | null>>;
@@ -69,7 +69,7 @@ export var RadioGroup = React.forwardRef(function (directProps, target) {
69
69
  var radioOptions = (data && data.map(function (option, index) {
70
70
  var isCurrentlyChecked = checkedRadioValue === option.value;
71
71
  var noOptionChecked = checkedRadioValue === null || checkedRadioValue === undefined;
72
- var radioButtonProps = __assign({}, option, { valid: valid, checked: isCurrentlyChecked, disabled: (option.disabled || disabled) ? true : false, labelPlacement: option.labelPlacement ? option.labelPlacement : labelPlacement, tabIndex: option.tabIndex
72
+ var radioButtonProps = __assign(__assign({}, option), { valid: valid, checked: isCurrentlyChecked, disabled: (option.disabled || disabled) ? true : false, labelPlacement: option.labelPlacement ? option.labelPlacement : labelPlacement, tabIndex: option.tabIndex
73
73
  ? option.tabIndex
74
74
  : (noOptionChecked && index === 0) || isCurrentlyChecked
75
75
  ? 0
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -135,4 +135,4 @@ export declare const RangeSliderPropsContext: React.Context<(p: RangeSliderProps
135
135
  * Accepts properties of type [RangeSliderProps]({% slug api_inputs_rangesliderprops %}).
136
136
  * Obtaining the `ref` returns an object of type [RangeSliderHandle]({% slug api_inputs_rangesliderhandle %}).
137
137
  */
138
- export declare const RangeSlider: React.ForwardRefExoticComponent<RangeSliderProps & React.RefAttributes<RangeSliderHandle>>;
138
+ export declare const RangeSlider: React.ForwardRefExoticComponent<RangeSliderProps & React.RefAttributes<RangeSliderHandle | null>>;
@@ -23,7 +23,7 @@ import { packageMetadata } from '../package-metadata';
23
23
  var useRange = function (defaultValue, args, callback) {
24
24
  var _a = React.useState(defaultValue), state = _a[0], setState = _a[1];
25
25
  var handleDispatchAction = React.useCallback(function (action) {
26
- var newState = rangeReducer(args.state || state, __assign({}, action, args));
26
+ var newState = rangeReducer(args.state || state, __assign(__assign({}, action), args));
27
27
  if (callback) {
28
28
  callback(newState, action.event);
29
29
  }
@@ -229,7 +229,7 @@ export var RangeSlider = React.forwardRef(function (directProps, ref) {
229
229
  React.createElement("div", { ref: sliderTrackRef, className: "k-slider-track", style: props.vertical
230
230
  ? { bottom: 0, height: '100%' }
231
231
  : (_a = {}, _a[dir === 'rtl' ? 'right' : 'left'] = 0, _a.width = '100%', _a) },
232
- (percentStart !== null && percentEnd !== null) && React.createElement("div", { "data-selection": true, ref: sliderSelectionRef, title: value.start + " - " + value.end, className: "k-slider-selection", style: props.vertical
232
+ (percentStart !== null && percentEnd !== null) && React.createElement("div", { "data-selection": true, ref: sliderSelectionRef, title: "".concat(value.start, " - ").concat(value.end), className: "k-slider-selection", style: props.vertical
233
233
  ? { height: (percentEnd - percentStart) + '%', bottom: percentStart + '%' }
234
234
  : (_b = {},
235
235
  _b[dir === 'rtl' ? 'right' : 'left'] = percentStart + '%',
@@ -252,7 +252,7 @@ var propTypes = {
252
252
  var min = props.min;
253
253
  var max = props.max;
254
254
  if (start > end || start > max || start < min || end > max || end < min || end < start) {
255
- return new Error("Invalid prop + " + propName + " supplied to " + componentName + ".\n The { start, end } value must be between the min & max value and { start, end } must be start < end.\n ");
255
+ return new Error("Invalid prop + ".concat(propName, " supplied to ").concat(componentName, ".\n The { start, end } value must be between the min & max value and { start, end } must be start < end.\n "));
256
256
  }
257
257
  }
258
258
  return null;
@@ -264,7 +264,7 @@ var propTypes = {
264
264
  var min = props.min;
265
265
  var max = props.max;
266
266
  if (start > end || start > max || start < min || end > max || end < min || end < start) {
267
- return new Error("Invalid prop + " + propName + " supplied to " + componentName + ".\n The { start, end } value must be between the min & max value and { start, end } must be start < end.\n ");
267
+ return new Error("Invalid prop + ".concat(propName, " supplied to ").concat(componentName, ".\n The { start, end } value must be between the min & max value and { start, end } must be start < end.\n "));
268
268
  }
269
269
  }
270
270
  return null;
@@ -276,10 +276,10 @@ var propTypes = {
276
276
  var min = props.min;
277
277
  var max = props.max;
278
278
  if (min === undefined) {
279
- return new Error("Invalid prop + " + propName + " supplied to " + componentName + ".\n " + propName + " value can not be undefined.\n ");
279
+ return new Error("Invalid prop + ".concat(propName, " supplied to ").concat(componentName, ".\n ").concat(propName, " value can not be undefined.\n "));
280
280
  }
281
281
  if (prop && min >= max) {
282
- return new Error("Invalid prop + " + propName + " supplied to " + componentName + ".\n " + propName + " value can not be equal to or bigger than the max value.\n ");
282
+ return new Error("Invalid prop + ".concat(propName, " supplied to ").concat(componentName, ".\n ").concat(propName, " value can not be equal to or bigger than the max value.\n "));
283
283
  }
284
284
  return null;
285
285
  },
@@ -288,10 +288,10 @@ var propTypes = {
288
288
  var min = props.min;
289
289
  var max = props.max;
290
290
  if (max === undefined) {
291
- return new Error("Invalid prop + " + propName + " supplied to " + componentName + ".\n " + propName + " value can not be undefined.\n ");
291
+ return new Error("Invalid prop + ".concat(propName, " supplied to ").concat(componentName, ".\n ").concat(propName, " value can not be undefined.\n "));
292
292
  }
293
293
  if (prop && max <= min) {
294
- return new Error("Invalid prop + " + propName + " supplied to " + componentName + ".\n " + propName + " value can not be equal to or smaller than the min value.\n ");
294
+ return new Error("Invalid prop + ".concat(propName, " supplied to ").concat(componentName, ".\n ").concat(propName, " value can not be equal to or smaller than the min value.\n "));
295
295
  }
296
296
  return null;
297
297
  },
@@ -48,18 +48,18 @@ export var rangeReducer = function (state, action) {
48
48
  break;
49
49
  case RANGE_ACTION.min:
50
50
  if (action.key === 'start') {
51
- newState = __assign({}, state, { start: action.min });
51
+ newState = __assign(__assign({}, state), { start: action.min });
52
52
  }
53
53
  else {
54
- newState = __assign({}, state, { end: Math.max(action.min, state.start) });
54
+ newState = __assign(__assign({}, state), { end: Math.max(action.min, state.start) });
55
55
  }
56
56
  break;
57
57
  case RANGE_ACTION.max:
58
58
  if (action.key === 'start') {
59
- newState = __assign({}, state, { start: Math.min(action.max, state.end) });
59
+ newState = __assign(__assign({}, state), { start: Math.min(action.max, state.end) });
60
60
  }
61
61
  else {
62
- newState = __assign({}, state, { end: action.max });
62
+ newState = __assign(__assign({}, state), { end: action.max });
63
63
  }
64
64
  break;
65
65
  case RANGE_ACTION.increase:
@@ -69,18 +69,18 @@ export var rangeReducer = function (state, action) {
69
69
  newValue = state[action.key] + action.step;
70
70
  if (action.key === 'start') {
71
71
  if (newValue < action.min) {
72
- newState = __assign({}, state, { start: action.min });
72
+ newState = __assign(__assign({}, state), { start: action.min });
73
73
  }
74
74
  else {
75
- newState = __assign({}, state, { start: Math.min(newValue, state.end) });
75
+ newState = __assign(__assign({}, state), { start: Math.min(newValue, state.end) });
76
76
  }
77
77
  }
78
78
  else {
79
79
  if (newValue > action.max) {
80
- newState = __assign({}, state, { end: action.max });
80
+ newState = __assign(__assign({}, state), { end: action.max });
81
81
  }
82
82
  else {
83
- newState = __assign({}, state, { end: Math.max(newValue, state.start) });
83
+ newState = __assign(__assign({}, state), { end: Math.max(newValue, state.start) });
84
84
  }
85
85
  }
86
86
  break;
@@ -91,18 +91,18 @@ export var rangeReducer = function (state, action) {
91
91
  newValue = state[action.key] - action.step;
92
92
  if (action.key === 'start') {
93
93
  if (newValue < action.min) {
94
- newState = __assign({}, state, { start: action.min });
94
+ newState = __assign(__assign({}, state), { start: action.min });
95
95
  }
96
96
  else {
97
- newState = __assign({}, state, { start: Math.min(newValue, state.end) });
97
+ newState = __assign(__assign({}, state), { start: Math.min(newValue, state.end) });
98
98
  }
99
99
  }
100
100
  else {
101
101
  if (newValue > action.max) {
102
- newState = __assign({}, state, { end: action.max });
102
+ newState = __assign(__assign({}, state), { end: action.max });
103
103
  }
104
104
  else {
105
- newState = __assign({}, state, { end: Math.max(newValue, state.start) });
105
+ newState = __assign(__assign({}, state), { end: Math.max(newValue, state.start) });
106
106
  }
107
107
  }
108
108
  break;
@@ -155,4 +155,4 @@ export declare const RatingPropsContext: React.Context<(p: RatingProps) => Ratin
155
155
  * Accepts properties of type [RatingProps]({% slug api_inputs_ratingprops %}).
156
156
  * Obtaining the `ref` returns an object of type [RatingHandle]({% slug api_inputs_ratinghandle %}).
157
157
  */
158
- export declare const Rating: React.ForwardRefExoticComponent<RatingProps & React.RefAttributes<RatingHandle>>;
158
+ export declare const Rating: React.ForwardRefExoticComponent<RatingProps & React.RefAttributes<RatingHandle | null>>;
@@ -21,7 +21,7 @@ import { isSelected, isHalf, calcIsFirstHalf, isCorrectValue, toRound, getRemain
21
21
  var useRating = function (defaultValue, args, callback) {
22
22
  var _a = React.useState(defaultValue), state = _a[0], setState = _a[1];
23
23
  var handleDispatchAction = function (action) {
24
- var newState = ratingReducer(args.state || state, __assign({}, action, args));
24
+ var newState = ratingReducer(args.state || state, __assign(__assign({}, action), args));
25
25
  if (callback) {
26
26
  callback(newState, action.event);
27
27
  }
@@ -100,11 +100,12 @@ export var Rating = React.forwardRef(function (directProps, ref) {
100
100
  dispatchStateValue({ type: RATING_ACTION.select, payload: event.target.value, event: event.syntheticEvent });
101
101
  }
102
102
  if (props.onClick) {
103
- props.onClick.call(undefined, {
103
+ var ev = {
104
104
  value: value,
105
105
  target: target.current,
106
106
  syntheticEvent: event.syntheticEvent
107
- });
107
+ };
108
+ props.onClick.call(undefined, ev);
108
109
  }
109
110
  }, [props.onClick, dispatchStateValue, value]);
110
111
  var handleKeyDown = React.useCallback(function (syntheticEvent) {
@@ -155,18 +156,20 @@ export var Rating = React.forwardRef(function (directProps, ref) {
155
156
  }, [props.onKeyDown, dispatchStateValue, value]);
156
157
  var handleFocus = React.useCallback(function (syntheticEvent) {
157
158
  if (props.onFocus) {
158
- props.onFocus.call(undefined, {
159
+ var ev = {
159
160
  target: target.current,
160
161
  syntheticEvent: syntheticEvent
161
- });
162
+ };
163
+ props.onFocus.call(undefined, ev);
162
164
  }
163
165
  }, [props.onFocus]);
164
166
  var handleBlur = React.useCallback(function (syntheticEvent) {
165
167
  if (props.onBlur) {
166
- props.onBlur.call(undefined, {
168
+ var ev = {
167
169
  target: target.current,
168
170
  syntheticEvent: syntheticEvent
169
- });
171
+ };
172
+ props.onBlur.call(undefined, ev);
170
173
  }
171
174
  }, [props.onBlur]);
172
175
  var handleItemMouseMove = React.useCallback(function (event) {
@@ -201,21 +204,21 @@ export var Rating = React.forwardRef(function (directProps, ref) {
201
204
  React.createElement("span", { className: classNames('k-icon', (_b = {
202
205
  'k-i-star-outline': !props.icon
203
206
  },
204
- _b[props.icon + "-outline"] = props.icon,
207
+ _b["".concat(props.icon, "-outline")] = props.icon,
205
208
  _b)) }))),
206
209
  half && (React.createElement("span", { className: 'k-rating-precision-part', style: { width: '12px' } },
207
210
  React.createElement("span", { className: classNames('k-icon', (_c = {
208
211
  'k-i-star': !props.icon
209
212
  },
210
- _c["" + props.icon] = props.icon,
213
+ _c["".concat(props.icon)] = props.icon,
211
214
  _c)) }))),
212
215
  half && (React.createElement("span", { style: { width: '24px', height: '24px', display: 'block' } })),
213
216
  !half && (React.createElement("span", { className: classNames('k-icon', (_d = {
214
217
  'k-i-star': !props.icon && (hovered || (selected && !hovered)),
215
218
  'k-i-star-outline': !props.icon && (!hovered)
216
219
  },
217
- _d["" + props.icon] = props.icon && (hovered || (selected && !hovered)),
218
- _d[props.icon + "-outline"] = props.icon && (!hovered),
220
+ _d["".concat(props.icon)] = props.icon && (hovered || (selected && !hovered)),
221
+ _d["".concat(props.icon, "-outline")] = props.icon && (!hovered),
219
222
  _d)) }))));
220
223
  }
221
224
  return (React.createElement("span", { id: props.id, style: props.style, ref: ratingRef, role: "slider", dir: dir, tabIndex: getTabIndex(props.tabIndex, props.disabled, undefined), className: classNames('k-rating k-widget', {
@@ -239,7 +242,7 @@ var propTypes = {
239
242
  ? isCorrectValue(props.min, props.max, props.step / 2, props.value)
240
243
  : isCorrectValue(props.min, props.max, props.step, props.value);
241
244
  if (!correctValue && props.precision === 'half') {
242
- return new Error("Invalid prop + " + propName + " supplied to " + componentName + ".\n The value of the { value } property is not correct, please check your values.\n ");
245
+ return new Error("Invalid prop + ".concat(propName, " supplied to ").concat(componentName, ".\n The value of the { value } property is not correct, please check your values.\n "));
243
246
  }
244
247
  }
245
248
  return null;
@@ -249,7 +252,7 @@ var propTypes = {
249
252
  max: PropTypes.number,
250
253
  step: function (props, propName, componentName) {
251
254
  if (props.step !== undefined && props.step <= 0) {
252
- return new Error("Invalid prop + " + propName + " supplied to " + componentName + ".\n The value of the { step } property is cannot be equal or less than \"0\", please check your values.\n ");
255
+ return new Error("Invalid prop + ".concat(propName, " supplied to ").concat(componentName, ".\n The value of the { step } property is cannot be equal or less than \"0\", please check your values.\n "));
253
256
  }
254
257
  return null;
255
258
  },
@@ -101,4 +101,4 @@ export interface RatingItemHandle {
101
101
  /**
102
102
  * Represents the RatingItem component.
103
103
  */
104
- export declare const RatingItem: React.ForwardRefExoticComponent<RatingItemProps & React.RefAttributes<RatingItemHandle>>;
104
+ export declare const RatingItem: React.ForwardRefExoticComponent<RatingItemProps & React.RefAttributes<RatingItemHandle | null>>;
@@ -13,6 +13,10 @@ export interface RatingItemMouseEvent {
13
13
  * The event of the RatingItemMouseEvent.
14
14
  */
15
15
  syntheticEvent: React.MouseEvent<any>;
16
+ /**
17
+ * @hidden
18
+ */
19
+ value?: number | null;
16
20
  }
17
21
  /**
18
22
  * Represents the return type of the RatingItemKeyboardEvent.
@@ -0,0 +1 @@
1
+ export {};
@@ -13,7 +13,7 @@ export declare const isHalf: (index: number, value: number, step: number) => boo
13
13
  /**
14
14
  * @hidden
15
15
  */
16
- export declare const isSelected: (index: number, value: number, step: number, selection: "single" | "continues") => boolean;
16
+ export declare const isSelected: (index: number, value: number | null, step: number, selection: 'single' | 'continues') => boolean;
17
17
  /**
18
18
  * @hidden
19
19
  */
@@ -121,14 +121,14 @@ export declare class SliderWithoutContext extends React.Component<SliderProps, S
121
121
  */
122
122
  static getDerivedStateFromProps(props: SliderProps, state: SliderState): {
123
123
  value: number;
124
- };
124
+ } | null;
125
125
  /**
126
126
  * @hidden
127
127
  */
128
128
  state: {
129
129
  value: number;
130
130
  focused: boolean;
131
- dir: Direction;
131
+ dir: Direction | undefined;
132
132
  };
133
133
  private _sliderTrack;
134
134
  private _element;
@@ -152,7 +152,7 @@ export declare class SliderWithoutContext extends React.Component<SliderProps, S
152
152
  /**
153
153
  * @hidden
154
154
  */
155
- readonly sliderTrack: HTMLDivElement | null;
155
+ get sliderTrack(): HTMLDivElement | null;
156
156
  private isLabel;
157
157
  private onFocus;
158
158
  private onBlur;
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
2
2
  var extendStatics = function (d, b) {
3
3
  extendStatics = Object.setPrototypeOf ||
4
4
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
6
  return extendStatics(d, b);
7
7
  };
8
8
  return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
9
11
  extendStatics(d, b);
10
12
  function __() { this.constructor = d; }
11
13
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -44,6 +46,8 @@ var SliderWithoutContext = /** @class */ (function (_super) {
44
46
  focused: false,
45
47
  dir: _this.props.dir
46
48
  };
49
+ _this._sliderTrack = null;
50
+ _this._element = null;
47
51
  /**
48
52
  * @hidden
49
53
  */
@@ -162,8 +166,8 @@ var SliderWithoutContext = /** @class */ (function (_super) {
162
166
  * @hidden
163
167
  */
164
168
  SliderWithoutContext.prototype.render = function () {
165
- var _this = this;
166
169
  var _a;
170
+ var _this = this;
167
171
  var lS = provideLocalizationService(this);
168
172
  var percentValue = ((this.state.value - this.props.min) / (this.props.max - this.props.min)) * 100;
169
173
  var trackStyles = this.props.vertical
@@ -206,7 +210,7 @@ var SliderWithoutContext = /** @class */ (function (_super) {
206
210
  get: function () {
207
211
  return this._sliderTrack;
208
212
  },
209
- enumerable: true,
213
+ enumerable: false,
210
214
  configurable: true
211
215
  });
212
216
  SliderWithoutContext.prototype.change = function (e, value) {
@@ -23,8 +23,8 @@ export var SliderLabel = function (props) {
23
23
  var sliderLabelRef = React.useRef(null);
24
24
  var dir = useDir(sliderLabelRef);
25
25
  var style = props.vertical
26
- ? { bottom: props.position + "%", height: '1px', width: '100%' }
27
- : (_a = {}, _a[dir === 'rtl' ? 'right' : 'left'] = props.position + "%", _a.width = '1px', _a.height = '-webkit-fill-available', _a);
26
+ ? { bottom: "".concat(props.position, "%"), height: '1px', width: '100%' }
27
+ : (_a = {}, _a[dir === 'rtl' ? 'right' : 'left'] = "".concat(props.position, "%"), _a.width = '1px', _a.height = '-webkit-fill-available', _a);
28
28
  return (React.createElement("li", { ref: sliderLabelRef, role: "presentation", className: "k-tick k-tick-large", title: props.title, style: __assign({ zIndex: 1, position: 'absolute' }, style) },
29
29
  React.createElement("span", __assign({}, (_b = {}, _b[SLIDER_LABEL_ATTRIBUTE] = true, _b), { className: "k-label", onClick: props.onClick }), props.children)));
30
30
  };
@@ -137,28 +137,28 @@ export declare class SwitchWithoutContext extends React.Component<SwitchProps, S
137
137
  /**
138
138
  * Gets the value of the Switch.
139
139
  */
140
- readonly value: boolean;
141
- readonly element: HTMLSpanElement | null;
140
+ get value(): boolean;
141
+ get element(): HTMLSpanElement | null;
142
142
  /**
143
143
  * @hidden
144
144
  */
145
- readonly actionElement: HTMLSpanElement | null;
145
+ get actionElement(): HTMLSpanElement | null;
146
146
  /**
147
147
  * Gets the `name` property of the Switch.
148
148
  */
149
- readonly name: string | undefined;
149
+ get name(): string | undefined;
150
150
  /**
151
151
  * Represents the validity state into which the Switch is set.
152
152
  */
153
- readonly validity: FormComponentValidity;
153
+ get validity(): FormComponentValidity;
154
154
  /**
155
155
  * @hidden
156
156
  */
157
- protected readonly validityStyles: boolean;
157
+ protected get validityStyles(): boolean;
158
158
  /**
159
159
  * @hidden
160
160
  */
161
- protected readonly required: boolean;
161
+ protected get required(): boolean;
162
162
  /**
163
163
  * @hidden
164
164
  */
@@ -174,9 +174,9 @@ export declare class SwitchWithoutContext extends React.Component<SwitchProps, S
174
174
  className: PropTypes.Requireable<string>;
175
175
  disabled: PropTypes.Requireable<boolean>;
176
176
  defaultChecked: PropTypes.Requireable<boolean>;
177
- size: PropTypes.Requireable<"small" | "medium" | "large">;
178
- trackRounded: PropTypes.Requireable<"small" | "medium" | "large" | "full">;
179
- thumbRounded: PropTypes.Requireable<"small" | "medium" | "large" | "full">;
177
+ size: PropTypes.Requireable<"small" | "medium" | "large" | null | undefined>;
178
+ trackRounded: PropTypes.Requireable<"small" | "medium" | "full" | "large" | null | undefined>;
179
+ thumbRounded: PropTypes.Requireable<"small" | "medium" | "full" | "large" | null | undefined>;
180
180
  dir: PropTypes.Requireable<string>;
181
181
  id: PropTypes.Requireable<string>;
182
182
  ariaLabelledBy: PropTypes.Requireable<string>;
@@ -198,9 +198,9 @@ export declare class SwitchWithoutContext extends React.Component<SwitchProps, S
198
198
  static defaultProps: {
199
199
  disabled: boolean;
200
200
  defaultChecked: boolean;
201
- size: "small" | "medium" | "large";
202
- trackRounded: "small" | "medium" | "large" | "full";
203
- thumbRounded: "small" | "medium" | "large" | "full";
201
+ size: "small" | "medium" | "large" | null | undefined;
202
+ trackRounded: "small" | "medium" | "full" | "large" | null | undefined;
203
+ thumbRounded: "small" | "medium" | "full" | "large" | null | undefined;
204
204
  offLabel: string;
205
205
  onBlur: () => void;
206
206
  onFocus: () => void;