@progress/kendo-react-inputs 5.5.1-dev.202207141327 → 5.6.0-dev.202208040930
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/dist/es/colors/ColorGradient.js +5 -2
- package/dist/es/colors/ColorInput.js +7 -6
- package/dist/es/colors/ColorPalette.js +3 -3
- package/dist/es/input/Input.d.ts +5 -0
- package/dist/es/input/Input.js +4 -3
- package/dist/es/messages/index.d.ts +20 -0
- package/dist/es/messages/index.js +20 -0
- package/dist/es/numerictextbox/interfaces/NumericTextBoxProps.d.ts +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/range-slider/RangeSlider.js +4 -4
- package/dist/es/rating/Rating.js +4 -1
- package/dist/es/slider/Slider.d.ts +5 -0
- package/dist/es/slider/Slider.js +4 -3
- package/dist/es/slider/SliderLabel.js +1 -1
- package/dist/npm/colors/ColorGradient.js +5 -2
- package/dist/npm/colors/ColorInput.js +6 -5
- package/dist/npm/colors/ColorPalette.js +3 -3
- package/dist/npm/input/Input.d.ts +5 -0
- package/dist/npm/input/Input.js +4 -3
- package/dist/npm/messages/index.d.ts +20 -0
- package/dist/npm/messages/index.js +21 -1
- package/dist/npm/numerictextbox/interfaces/NumericTextBoxProps.d.ts +1 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/range-slider/RangeSlider.js +4 -4
- package/dist/npm/rating/Rating.js +4 -1
- package/dist/npm/slider/Slider.d.ts +5 -0
- package/dist/npm/slider/Slider.js +4 -3
- package/dist/npm/slider/SliderLabel.js +1 -1
- package/dist/systemjs/kendo-react-inputs.js +1 -1
- package/package.json +14 -14
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.messages = exports.colorPickerDropdownButtonAriaLabel = exports.switchValidation = exports.radioButtonValidation = exports.checkboxOptionalText = exports.checkboxValidation = exports.flatColorPickerApplyBtn = exports.flatColorPickerCancelBtn = exports.colorGradientFail = exports.colorGradientPass = exports.colorGradientAAALevel = exports.colorGradientAALevel = exports.colorGradientContrastRatio = exports.colorGradientHex = exports.colorGradientA = exports.colorGradientB = exports.colorGradientG = exports.colorGradientR = exports.sliderDragTitle = exports.sliderDecreaseValue = exports.sliderIncreaseValue = exports.numericDecreaseValue = exports.numericIncreaseValue = void 0;
|
|
4
|
+
exports.messages = exports.ratingAriaLabel = exports.colorPickerDropdownButtonAriaLabel = exports.switchValidation = exports.radioButtonValidation = exports.checkboxOptionalText = exports.checkboxValidation = exports.flatColorPickerApplyBtn = exports.flatColorPickerCancelBtn = exports.colorGradientToggleInputsButton = exports.colorGradientAlphaSliderLabel = exports.colorGradientHueSliderLabel = exports.colorGradientFail = exports.colorGradientPass = exports.colorGradientAAALevel = exports.colorGradientAALevel = exports.colorGradientContrastRatio = exports.colorGradientHex = exports.colorGradientA = exports.colorGradientB = exports.colorGradientG = exports.colorGradientR = exports.sliderDragTitle = exports.sliderDecreaseValue = exports.sliderIncreaseValue = exports.numericDecreaseValue = exports.numericIncreaseValue = void 0;
|
|
5
5
|
/**
|
|
6
6
|
* @hidden
|
|
7
7
|
*/
|
|
@@ -62,6 +62,18 @@ exports.colorGradientPass = 'colorGradient.colorGradientPass';
|
|
|
62
62
|
* @hidden
|
|
63
63
|
*/
|
|
64
64
|
exports.colorGradientFail = 'colorGradient.colorGradientFail';
|
|
65
|
+
/**
|
|
66
|
+
* @hidden
|
|
67
|
+
*/
|
|
68
|
+
exports.colorGradientHueSliderLabel = 'colorGradient.hueSliderLabel';
|
|
69
|
+
/**
|
|
70
|
+
* @hidden
|
|
71
|
+
*/
|
|
72
|
+
exports.colorGradientAlphaSliderLabel = 'colorGradient.alphaSliderLabel';
|
|
73
|
+
/**
|
|
74
|
+
* @hidden
|
|
75
|
+
*/
|
|
76
|
+
exports.colorGradientToggleInputsButton = 'colorGradient.toggleInputsButton';
|
|
65
77
|
/**
|
|
66
78
|
* @hidden
|
|
67
79
|
*/
|
|
@@ -90,6 +102,10 @@ exports.switchValidation = 'switch.validation';
|
|
|
90
102
|
* @hidden
|
|
91
103
|
*/
|
|
92
104
|
exports.colorPickerDropdownButtonAriaLabel = 'colorPicker.dropdownButtonAriaLabel';
|
|
105
|
+
/**
|
|
106
|
+
* @hidden
|
|
107
|
+
*/
|
|
108
|
+
exports.ratingAriaLabel = 'rating.ariaLabel';
|
|
93
109
|
/**
|
|
94
110
|
* @hidden
|
|
95
111
|
*/
|
|
@@ -109,6 +125,9 @@ exports.messages = (_a = {},
|
|
|
109
125
|
_a[exports.colorGradientAAALevel] = 'AAA',
|
|
110
126
|
_a[exports.colorGradientPass] = 'Pass',
|
|
111
127
|
_a[exports.colorGradientFail] = 'Fail',
|
|
128
|
+
_a[exports.colorGradientHueSliderLabel] = 'Hue slider',
|
|
129
|
+
_a[exports.colorGradientAlphaSliderLabel] = 'Alpha slider',
|
|
130
|
+
_a[exports.colorGradientToggleInputsButton] = 'Toggle colorgradient inputs',
|
|
112
131
|
_a[exports.flatColorPickerCancelBtn] = 'Cancel',
|
|
113
132
|
_a[exports.flatColorPickerApplyBtn] = 'Apply',
|
|
114
133
|
_a[exports.checkboxValidation] = 'Please check this box if you want to proceed!',
|
|
@@ -116,4 +135,5 @@ exports.messages = (_a = {},
|
|
|
116
135
|
_a[exports.radioButtonValidation] = 'Please select option if you want to proceed!',
|
|
117
136
|
_a[exports.switchValidation] = 'Please turn on if you want to proceed!',
|
|
118
137
|
_a[exports.colorPickerDropdownButtonAriaLabel] = 'Select',
|
|
138
|
+
_a[exports.ratingAriaLabel] = 'Rating',
|
|
119
139
|
_a);
|
|
@@ -4,7 +4,7 @@ import { NumberFormatOptions } from '@progress/kendo-react-intl';
|
|
|
4
4
|
import { NumericTextBoxChangeEvent } from './NumericTextBoxChangeEvent';
|
|
5
5
|
import { NumericTextBoxFocusEvent } from './NumericTextBoxFocusEvent';
|
|
6
6
|
import { NumericTextBoxBlurEvent } from './NumericTextBoxBlurEvent';
|
|
7
|
-
declare type NumericTextBoxInputType = 'tel' | 'text';
|
|
7
|
+
declare type NumericTextBoxInputType = 'tel' | 'text' | 'number';
|
|
8
8
|
/**
|
|
9
9
|
* Represents the props of the [KendoReact NumericTextBox component]({% slug overview_numerictextbox %}).
|
|
10
10
|
*/
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-inputs',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1659604208,
|
|
12
12
|
version: '',
|
|
13
13
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
14
14
|
};
|
|
@@ -215,12 +215,12 @@ exports.RangeSlider = React.forwardRef(function (directProps, ref) {
|
|
|
215
215
|
setCurrentDrag('');
|
|
216
216
|
};
|
|
217
217
|
(0, kendo_react_common_1.useDraggable)(sliderTrackWrapRef, { onPress: handleTrackPress, onDrag: handleTrackDrag, onRelease: handleTrackRelease });
|
|
218
|
-
return (React.createElement("div", {
|
|
218
|
+
return (React.createElement("div", { id: props.id, style: props.style, ref: sliderRef, dir: dir, className: (0, kendo_react_common_1.classNames)('k-widget k-slider', {
|
|
219
219
|
'k-rtl': dir === 'rtl',
|
|
220
220
|
'k-disabled': props.disabled,
|
|
221
221
|
'k-slider-vertical': props.vertical,
|
|
222
222
|
'k-slider-horizontal': !props.vertical
|
|
223
|
-
}, props.className)
|
|
223
|
+
}, props.className) },
|
|
224
224
|
React.createElement("div", { ref: sliderTrackWrapRef, className: "k-slider-track-wrap", style: __assign({ flexGrow: 1, position: 'relative', touchAction: 'none' }, trackStyles) },
|
|
225
225
|
props.children && (React.createElement("ul", { className: "k-reset k-slider-items", style: __assign({}, sliderItemsStyle) }, React.Children.map(props.children, function (child) {
|
|
226
226
|
return child && React.cloneElement(child, {
|
|
@@ -238,11 +238,11 @@ exports.RangeSlider = React.forwardRef(function (directProps, ref) {
|
|
|
238
238
|
_b[dir === 'rtl' ? 'right' : 'left'] = percentStart + '%',
|
|
239
239
|
_b.width = (percentEnd - percentStart) + '%',
|
|
240
240
|
_b) }),
|
|
241
|
-
React.createElement("
|
|
241
|
+
React.createElement("span", { ref: startHandle, role: "slider", tabIndex: (0, kendo_react_common_1.getTabIndex)(props.startTabIndex, props.disabled, undefined), "aria-valuemin": min, "aria-valuemax": Math.max(max, value.end), "aria-valuenow": value.start, "aria-disabled": props.disabled ? 'true' : undefined, "aria-valuetext": "".concat(value.start, " - ").concat(value.end), className: "k-draghandle", title: localization.toLanguageString(messages_1.sliderDragTitle, messages_1.messages[messages_1.sliderDragTitle]), style: props.vertical
|
|
242
242
|
? { bottom: 'calc(' + percentStart + '%)', zIndex: 1 }
|
|
243
243
|
: dir === 'rtl' ? { right: 'calc(' + percentStart + '% - 13px)', zIndex: 1 }
|
|
244
244
|
: { left: 'calc(' + percentStart + '%)', zIndex: 1 }, onKeyDown: handleStartKeyDown }),
|
|
245
|
-
React.createElement("
|
|
245
|
+
React.createElement("span", { ref: endHandle, role: "slider", tabIndex: (0, kendo_react_common_1.getTabIndex)(props.endTabIndex, props.disabled, undefined), "aria-valuemin": Math.min(min, value.start), "aria-valuemax": max, "aria-valuenow": value.end, "aria-disabled": props.disabled ? 'true' : undefined, "aria-valuetext": "".concat(value.start, " - ").concat(value.end), className: "k-draghandle", title: localization.toLanguageString(messages_1.sliderDragTitle, messages_1.messages[messages_1.sliderDragTitle]), style: props.vertical
|
|
246
246
|
? { bottom: 'calc(' + percentEnd + '%)', zIndex: 1 }
|
|
247
247
|
: dir === 'rtl' ? { right: 'calc(' + percentEnd + '% - 13px)', zIndex: 1 }
|
|
248
248
|
: { left: 'calc(' + percentEnd + '%)', zIndex: 1 }, onKeyDown: handleEndKeyDown })))));
|
|
@@ -18,6 +18,8 @@ var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
|
18
18
|
var RatingItem_1 = require("./RatingItem");
|
|
19
19
|
var rating_reducer_1 = require("./rating-reducer");
|
|
20
20
|
var utils_1 = require("./utils");
|
|
21
|
+
var messages_1 = require("../messages");
|
|
22
|
+
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
21
23
|
/**
|
|
22
24
|
* @hidden
|
|
23
25
|
*/
|
|
@@ -48,6 +50,7 @@ exports.RatingPropsContext = (0, kendo_react_common_1.createPropsContext)();
|
|
|
48
50
|
exports.Rating = React.forwardRef(function (directProps, ref) {
|
|
49
51
|
var _a, _b, _c, _d;
|
|
50
52
|
var props = (0, kendo_react_common_1.usePropsContext)(exports.RatingPropsContext, directProps);
|
|
53
|
+
var localization = (0, kendo_react_intl_1.useLocalization)();
|
|
51
54
|
var target = React.useRef(null);
|
|
52
55
|
var ratingRef = React.useRef(null);
|
|
53
56
|
var dir = (0, kendo_react_common_1.useDir)(ratingRef, props.dir);
|
|
@@ -228,7 +231,7 @@ exports.Rating = React.forwardRef(function (directProps, ref) {
|
|
|
228
231
|
'k-rtl': dir === 'rtl',
|
|
229
232
|
'k-state-readonly': readonly,
|
|
230
233
|
'k-disabled': disabled
|
|
231
|
-
}, props.className), onKeyDown: handleKeyDown, onFocus: handleFocus, onBlur: handleBlur, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value !== null ? value : undefined, "aria-disabled": disabled ? 'true' : undefined, "aria-labelledby": props.ariaLabelledBy, "aria-describedby": props.ariaDescribedBy },
|
|
234
|
+
}, props.className), onKeyDown: handleKeyDown, onFocus: handleFocus, onBlur: handleBlur, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value !== null ? value : undefined, "aria-disabled": disabled ? 'true' : undefined, "aria-label": localization.toLanguageString(messages_1.ratingAriaLabel, messages_1.messages[messages_1.ratingAriaLabel]), "aria-labelledby": props.ariaLabelledBy, "aria-describedby": props.ariaDescribedBy },
|
|
232
235
|
React.createElement("input", { id: 'rating', className: 'k-hidden', readOnly: readonly, disabled: disabled }),
|
|
233
236
|
React.createElement("span", { className: 'k-rating-container' }, items),
|
|
234
237
|
props.label &&
|
|
@@ -91,6 +91,10 @@ export interface SliderProps extends FormComponentProps {
|
|
|
91
91
|
* Identifies the element(s) which will label the component.
|
|
92
92
|
*/
|
|
93
93
|
ariaLabelledBy?: string;
|
|
94
|
+
/**
|
|
95
|
+
* The accessible label of the component.
|
|
96
|
+
*/
|
|
97
|
+
ariaLabel?: string;
|
|
94
98
|
dir?: Direction;
|
|
95
99
|
}
|
|
96
100
|
/**
|
|
@@ -115,6 +119,7 @@ export declare class SliderWithoutContext extends React.Component<SliderProps, S
|
|
|
115
119
|
id: PropTypes.Requireable<string>;
|
|
116
120
|
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
117
121
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
122
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
118
123
|
};
|
|
119
124
|
/**
|
|
120
125
|
* @hidden
|
|
@@ -179,7 +179,7 @@ var SliderWithoutContext = /** @class */ (function (_super) {
|
|
|
179
179
|
var sliderItemsStyle = this.props.vertical
|
|
180
180
|
? { paddingTop: 0, height: '100%' }
|
|
181
181
|
: {};
|
|
182
|
-
return (React.createElement("div", { ref: function (el) { return _this._element = el; },
|
|
182
|
+
return (React.createElement("div", { ref: function (el) { return _this._element = el; }, dir: this.state.dir, id: this.props.id, style: __assign({ gap: 0 }, this.props.style), onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, className: (0, kendo_react_common_1.classNames)('k-slider k-widget', {
|
|
183
183
|
'k-focus': this.state.focused,
|
|
184
184
|
'k-disabled': this.props.disabled,
|
|
185
185
|
'k-slider-horizontal': !this.props.vertical,
|
|
@@ -201,7 +201,7 @@ var SliderWithoutContext = /** @class */ (function (_super) {
|
|
|
201
201
|
React.createElement("div", { className: "k-slider-selection", style: this.props.vertical
|
|
202
202
|
? { height: percentValue + '%' }
|
|
203
203
|
: { width: percentValue + '%' } }),
|
|
204
|
-
React.createElement("
|
|
204
|
+
React.createElement("span", { role: "slider", "aria-valuemin": this.props.min, "aria-valuemax": this.props.max, "aria-valuenow": this.state.value, "aria-valuetext": String(this.state.value), "aria-orientation": this.props.vertical ? 'vertical' : undefined, "aria-disabled": this.props.disabled ? 'true' : undefined, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, "aria-label": this.props.ariaLabel, tabIndex: (0, kendo_react_common_1.getTabIndex)(this.props.tabIndex, this.props.disabled, undefined), className: "k-draghandle", title: lS.toLanguageString(messages_1.sliderDragTitle, messages_1.messages[messages_1.sliderDragTitle]), style: this.props.vertical
|
|
205
205
|
? { bottom: 'calc(' + percentValue + '%)', zIndex: 1 }
|
|
206
206
|
: this.state.dir === 'rtl' ? { right: 'calc(' + percentValue + '% - 13px)', zIndex: 1 }
|
|
207
207
|
: { left: 'calc(' + percentValue + '%)', zIndex: 1 } })))))));
|
|
@@ -232,7 +232,8 @@ var SliderWithoutContext = /** @class */ (function (_super) {
|
|
|
232
232
|
vertical: PropTypes.bool,
|
|
233
233
|
id: PropTypes.string,
|
|
234
234
|
ariaLabelledBy: PropTypes.string,
|
|
235
|
-
ariaDescribedBy: PropTypes.string
|
|
235
|
+
ariaDescribedBy: PropTypes.string,
|
|
236
|
+
ariaLabel: PropTypes.string
|
|
236
237
|
// TODO: validation when buttons is set to true, but no step is provided
|
|
237
238
|
};
|
|
238
239
|
return SliderWithoutContext;
|
|
@@ -29,7 +29,7 @@ var SliderLabel = function (props) {
|
|
|
29
29
|
? { bottom: "".concat(props.position, "%") }
|
|
30
30
|
: (_a = {}, _a[dir === 'rtl' ? 'right' : 'left'] = "".concat(props.position, "%"), _a);
|
|
31
31
|
var tickStyle = props.vertical ? 'k-tick-vertical' : 'k-tick-horizontal';
|
|
32
|
-
return (React.createElement("li", { ref: sliderLabelRef,
|
|
32
|
+
return (React.createElement("li", { ref: sliderLabelRef, className: "k-tick k-tick-large ".concat(tickStyle), title: props.title, style: __assign({ zIndex: 1, position: 'absolute' }, style) },
|
|
33
33
|
React.createElement("span", __assign({}, (_b = {}, _b[exports.SLIDER_LABEL_ATTRIBUTE] = true, _b), { className: "k-label", onClick: props.onClick }), props.children)));
|
|
34
34
|
};
|
|
35
35
|
exports.SliderLabel = SliderLabel;
|