@progress/kendo-react-inputs 5.4.0-dev.202205250548 → 5.4.0-dev.202206081230

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 (185) 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 +15 -10
  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/parsers.d.ts +2 -2
  63. package/dist/es/maskedtextbox/parsing/parsers.js +28 -32
  64. package/dist/es/maskedtextbox/parsing/result.js +1 -1
  65. package/dist/es/messages/index.d.ts +22 -22
  66. package/dist/es/numerictextbox/NumericTextBox.d.ts +1 -1
  67. package/dist/es/numerictextbox/NumericTextBox.js +3 -3
  68. package/dist/es/numerictextbox/interfaces/NumericTextBoxBlurEvent.js +1 -0
  69. package/dist/es/numerictextbox/interfaces/NumericTextBoxChangeEvent.js +1 -0
  70. package/dist/es/numerictextbox/interfaces/NumericTextBoxFocusEvent.js +1 -0
  71. package/dist/es/numerictextbox/interfaces/NumericTextBoxHandle.js +1 -0
  72. package/dist/es/numerictextbox/interfaces/NumericTextBoxProps.js +1 -0
  73. package/dist/es/numerictextbox/interfaces/NumericTextBoxState.js +1 -0
  74. package/dist/es/numerictextbox/utils/index.d.ts +7 -7
  75. package/dist/es/numerictextbox/utils/index.js +5 -5
  76. package/dist/es/package-metadata.js +1 -1
  77. package/dist/es/radiobutton/RadioButton.d.ts +1 -1
  78. package/dist/es/radiobutton/RadioButton.js +5 -3
  79. package/dist/es/radiobutton/RadioGroup.d.ts +1 -1
  80. package/dist/es/radiobutton/RadioGroup.js +1 -1
  81. package/dist/es/radiobutton/interfaces/RadioButtonBlurEvent.js +1 -0
  82. package/dist/es/radiobutton/interfaces/RadioButtonChangeEvent.js +1 -0
  83. package/dist/es/radiobutton/interfaces/RadioButtonFocusEvent.js +1 -0
  84. package/dist/es/radiobutton/interfaces/RadioButtonProps.js +1 -0
  85. package/dist/es/radiobutton/interfaces/RadioGroupChangeEvent.js +1 -0
  86. package/dist/es/radiobutton/interfaces/RadioGroupFocusEvent.js +1 -0
  87. package/dist/es/radiobutton/interfaces/RadioGroupProps.js +1 -0
  88. package/dist/es/range-slider/RangeSlider.d.ts +1 -1
  89. package/dist/es/range-slider/RangeSlider.js +8 -8
  90. package/dist/es/range-slider/range-raducer.js +12 -12
  91. package/dist/es/rating/Rating.d.ts +1 -1
  92. package/dist/es/rating/Rating.js +16 -13
  93. package/dist/es/rating/RatingItem.d.ts +1 -1
  94. package/dist/es/rating/models/index.d.ts +4 -0
  95. package/dist/es/rating/models/index.js +1 -0
  96. package/dist/es/rating/utils/index.d.ts +1 -1
  97. package/dist/es/slider/Slider.d.ts +3 -3
  98. package/dist/es/slider/Slider.js +7 -3
  99. package/dist/es/slider/SliderLabel.js +2 -2
  100. package/dist/es/switch/Switch.d.ts +13 -13
  101. package/dist/es/switch/Switch.js +18 -13
  102. package/dist/es/textarea/TextArea.d.ts +1 -1
  103. package/dist/es/textarea/TextArea.js +9 -7
  104. package/dist/es/textarea/interfaces/TextAreaBlurEvent.js +1 -0
  105. package/dist/es/textarea/interfaces/TextAreaChangeEvent.js +1 -0
  106. package/dist/es/textarea/interfaces/TextAreaFocusEvent.js +1 -0
  107. package/dist/es/textarea/interfaces/TextAreaProps.js +1 -0
  108. package/dist/es/utils.js +10 -1
  109. package/dist/npm/checkbox/Checkbox.d.ts +1 -1
  110. package/dist/npm/checkbox/Checkbox.js +20 -17
  111. package/dist/npm/colors/ColorContrastLabels.js +10 -7
  112. package/dist/npm/colors/ColorContrastSvg.js +10 -7
  113. package/dist/npm/colors/ColorGradient.d.ts +3 -3
  114. package/dist/npm/colors/ColorGradient.js +42 -35
  115. package/dist/npm/colors/ColorInput.js +6 -4
  116. package/dist/npm/colors/ColorPalette.d.ts +6 -3
  117. package/dist/npm/colors/ColorPalette.js +25 -15
  118. package/dist/npm/colors/ColorPicker.d.ts +1 -1
  119. package/dist/npm/colors/ColorPicker.js +14 -13
  120. package/dist/npm/colors/FlatColorPicker.d.ts +1 -1
  121. package/dist/npm/colors/FlatColorPicker.js +28 -26
  122. package/dist/npm/colors/HexInput.d.ts +1 -1
  123. package/dist/npm/colors/HexInput.js +6 -4
  124. package/dist/npm/colors/Picker.js +4 -2
  125. package/dist/npm/colors/models/palette-presets.js +1 -0
  126. package/dist/npm/colors/utils/color-cache.js +1 -0
  127. package/dist/npm/colors/utils/color-palette.service.js +7 -6
  128. package/dist/npm/colors/utils/color-parser.d.ts +1 -1
  129. package/dist/npm/colors/utils/color-parser.js +47 -36
  130. package/dist/npm/colors/utils/misc.d.ts +1 -1
  131. package/dist/npm/colors/utils/misc.js +6 -3
  132. package/dist/npm/colors/utils/svg-calc.js +13 -8
  133. package/dist/npm/common/SliderTooltip.js +7 -5
  134. package/dist/npm/common/SwitchController.d.ts +3 -3
  135. package/dist/npm/common/SwitchController.js +7 -3
  136. package/dist/npm/common/SwitchModel.d.ts +1 -1
  137. package/dist/npm/input/Input.d.ts +5 -5
  138. package/dist/npm/input/Input.js +21 -15
  139. package/dist/npm/main.js +69 -26
  140. package/dist/npm/maskedtextbox/MaskedTextBox.d.ts +15 -15
  141. package/dist/npm/maskedtextbox/MaskedTextBox.js +26 -22
  142. package/dist/npm/maskedtextbox/masking.service.d.ts +4 -4
  143. package/dist/npm/maskedtextbox/masking.service.js +24 -23
  144. package/dist/npm/maskedtextbox/parsing/combinators.js +5 -2
  145. package/dist/npm/maskedtextbox/parsing/parsers.d.ts +2 -2
  146. package/dist/npm/maskedtextbox/parsing/parsers.js +41 -37
  147. package/dist/npm/maskedtextbox/parsing/result.js +2 -1
  148. package/dist/npm/maskedtextbox/parsing/stream.js +1 -0
  149. package/dist/npm/maskedtextbox/utils.js +1 -0
  150. package/dist/npm/messages/index.d.ts +22 -22
  151. package/dist/npm/messages/index.js +2 -1
  152. package/dist/npm/numerictextbox/NumericTextBox.d.ts +1 -1
  153. package/dist/npm/numerictextbox/NumericTextBox.js +32 -31
  154. package/dist/npm/numerictextbox/utils/index.d.ts +7 -7
  155. package/dist/npm/numerictextbox/utils/index.js +118 -89
  156. package/dist/npm/package-metadata.js +2 -1
  157. package/dist/npm/radiobutton/RadioButton.d.ts +1 -1
  158. package/dist/npm/radiobutton/RadioButton.js +15 -12
  159. package/dist/npm/radiobutton/RadioGroup.d.ts +1 -1
  160. package/dist/npm/radiobutton/RadioGroup.js +12 -11
  161. package/dist/npm/range-slider/RangeSlider.d.ts +1 -1
  162. package/dist/npm/range-slider/RangeSlider.js +18 -17
  163. package/dist/npm/range-slider/range-raducer.js +15 -13
  164. package/dist/npm/rating/Rating.d.ts +1 -1
  165. package/dist/npm/rating/Rating.js +37 -33
  166. package/dist/npm/rating/RatingItem.d.ts +1 -1
  167. package/dist/npm/rating/RatingItem.js +3 -2
  168. package/dist/npm/rating/models/index.d.ts +4 -0
  169. package/dist/npm/rating/rating-reducer.js +7 -5
  170. package/dist/npm/rating/utils/index.d.ts +1 -1
  171. package/dist/npm/rating/utils/index.js +18 -11
  172. package/dist/npm/slider/Slider.d.ts +3 -3
  173. package/dist/npm/slider/Slider.js +15 -10
  174. package/dist/npm/slider/SliderLabel.js +6 -4
  175. package/dist/npm/switch/Switch.d.ts +13 -13
  176. package/dist/npm/switch/Switch.js +29 -23
  177. package/dist/npm/textarea/TextArea.d.ts +1 -1
  178. package/dist/npm/textarea/TextArea.js +18 -15
  179. package/dist/npm/utils.js +11 -1
  180. package/dist/systemjs/kendo-react-inputs.js +1 -1
  181. package/package.json +15 -15
  182. package/dist/es/switch/util.d.ts +0 -8
  183. package/dist/es/switch/util.js +0 -46
  184. package/dist/npm/switch/util.d.ts +0 -8
  185. package/dist/npm/switch/util.js +0 -48
@@ -11,4 +11,4 @@ export declare const NumericTextBoxPropsContext: React.Context<(p: NumericTextBo
11
11
  /**
12
12
  * Represents the [KendoReact NumericTextBox component]({% slug overview_numerictextbox %}).
13
13
  */
14
- export declare const NumericTextBox: React.ForwardRefExoticComponent<NumericTextBoxProps & React.RefAttributes<NumericTextBoxHandle>>;
14
+ export declare const NumericTextBox: React.ForwardRefExoticComponent<NumericTextBoxProps & React.RefAttributes<NumericTextBoxHandle | null>>;
@@ -261,9 +261,9 @@ export var NumericTextBox = React.forwardRef(function (directProps, target) {
261
261
  var isValid = !validityStylesGetter() || validityGetter().valid;
262
262
  var numerictextbox = (React.createElement("span", { dir: props.dir, style: !props.label
263
263
  ? __assign({ width: props.width }, props.style) : props.style, className: classNames('k-input', 'k-numerictextbox', (_a = {},
264
- _a["k-input-" + (kendoThemeMaps.sizeMap[props.size] || props.size)] = props.size,
265
- _a["k-input-" + props.fillMode] = props.fillMode,
266
- _a["k-rounded-" + (kendoThemeMaps.roundedMap[props.rounded] || props.rounded)] = props.rounded,
264
+ _a["k-input-".concat(kendoThemeMaps.sizeMap[props.size] || props.size)] = props.size,
265
+ _a["k-input-".concat(props.fillMode)] = props.fillMode,
266
+ _a["k-rounded-".concat(kendoThemeMaps.roundedMap[props.rounded] || props.rounded)] = props.rounded,
267
267
  _a['k-invalid'] = !isValid,
268
268
  _a['k-required'] = props.required,
269
269
  _a['k-disabled'] = props.disabled,
@@ -7,11 +7,11 @@ export declare const getInitialState: () => NumericTextBoxState;
7
7
  /**
8
8
  * @hidden
9
9
  */
10
- export declare const getStateOrPropsValue: (value: number, stateValue: number) => number;
10
+ export declare const getStateOrPropsValue: (value: number | null | undefined, stateValue: number | null | undefined) => number | null | undefined;
11
11
  /**
12
12
  * @hidden
13
13
  */
14
- export declare const formatValue: (value: string | number, format: string | NumberFormatOptions, intlService: any) => string;
14
+ export declare const formatValue: (value: string | number | null | undefined, format: string | NumberFormatOptions | undefined, intlService: any) => string;
15
15
  /**
16
16
  * @hidden
17
17
  */
@@ -35,7 +35,7 @@ export declare const decreaseValue: (value: any, newState: any, step: any, min:
35
35
  /**
36
36
  * @hidden
37
37
  */
38
- export declare const rangeValue: (value: number, min: any, max: any) => number;
38
+ export declare const rangeValue: (value: number | null, min?: number, max?: number) => number | null;
39
39
  /**
40
40
  * @hidden
41
41
  */
@@ -55,7 +55,7 @@ export declare const setSelection: (newState: NumericTextBoxState, newIndex: num
55
55
  /**
56
56
  * @hidden
57
57
  */
58
- export declare const setInvalid: (newState: NumericTextBoxState, format: string | NumberFormatOptions, formatInfo: string[][], intlService: any) => void;
58
+ export declare const setInvalid: (newState: NumericTextBoxState, format: string | NumberFormatOptions | undefined, formatInfo: string[][], intlService: any) => void;
59
59
  /**
60
60
  * @hidden
61
61
  */
@@ -71,7 +71,7 @@ export declare const isDecimalDuplicated: (newState: NumericTextBoxState, symbol
71
71
  /**
72
72
  * @hidden
73
73
  */
74
- export declare const getFormatPrefixSufix: (format: string | NumberFormatOptions, intlService: any) => {
74
+ export declare const getFormatPrefixSufix: (format: string | NumberFormatOptions | undefined, intlService: any) => {
75
75
  positiveInfo: string[];
76
76
  negativeInfo: string[];
77
77
  zeroInfo: string[];
@@ -80,7 +80,7 @@ export declare const getFormatPrefixSufix: (format: string | NumberFormatOptions
80
80
  /**
81
81
  * @hidden
82
82
  */
83
- export declare const getFormatSymbols: (format: string | NumberFormatOptions, intlService: any) => string;
83
+ export declare const getFormatSymbols: (format: string | NumberFormatOptions | undefined, intlService: any) => string;
84
84
  /**
85
85
  * @hidden
86
86
  */
@@ -116,4 +116,4 @@ export declare const changeBasedSelection: (currentValue: string, nextValue: str
116
116
  /**
117
117
  * @hidden
118
118
  */
119
- export declare const sanitizeNumber: (state: NumericTextBoxState, format: string | NumberFormatOptions, intlService: any) => NumericTextBoxState;
119
+ export declare const sanitizeNumber: (state: NumericTextBoxState, format: string | NumberFormatOptions | undefined, intlService: any) => NumericTextBoxState;
@@ -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);
@@ -350,7 +350,7 @@ export var sanitizeNumber = function (state, format, intlService) {
350
350
  var formatInfo = [positiveInfo, negativeInfo, zeroInfo, oneInfo];
351
351
  var isFormatContainPrefixSuffix = formatInfo.findIndex(function (info) { return info.findIndex(function (nestedInfo) { return Boolean(nestedInfo); }) !== -1; }) !== 1;
352
352
  var isDelete = currentLooseValueAsString.length > 0 && currentLooseValueAsString.length < prevLooseValueAsString.length;
353
- var isPercentFormat = format &&
353
+ var isPercentFormat = typeof format === 'string' &&
354
354
  format[0] === 'p' &&
355
355
  currentLooseValueAsString &&
356
356
  currentLooseValueAsString.indexOf(symbols.percentSign) === -1;
@@ -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: 1653456789,
8
+ publishDate: 1654690359,
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
  };