@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
|
@@ -25,6 +25,8 @@ import { cacheHsva, removeCachedColor, getCachedHsva, getCachedRgba, getCachedHe
|
|
|
25
25
|
import ColorInput from './ColorInput';
|
|
26
26
|
import { ColorContrastLabels } from './ColorContrastLabels';
|
|
27
27
|
import { ColorContrastSvg } from './ColorContrastSvg';
|
|
28
|
+
import { provideLocalizationService } from '@progress/kendo-react-intl';
|
|
29
|
+
import { messages, colorGradientHueSliderLabel, colorGradientAlphaSliderLabel } from './../messages';
|
|
28
30
|
var FORMAT = 'rgba';
|
|
29
31
|
var DEFAULT_SELECTED_COLOR = 'rgba(255, 255, 255, 1)';
|
|
30
32
|
/** @hidden */
|
|
@@ -238,6 +240,7 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
238
240
|
*/
|
|
239
241
|
ColorGradientWithoutContext.prototype.render = function () {
|
|
240
242
|
var _this = this;
|
|
243
|
+
var lS = provideLocalizationService(this);
|
|
241
244
|
var className = classNames('k-colorgradient', { 'k-disabled': this.props.disabled });
|
|
242
245
|
return (React.createElement("div", { id: this.props.id, className: className, "aria-disabled": this.props.disabled ? 'true' : undefined, style: this.props.style, ref: function (el) { return _this.wrapper = el; }, tabIndex: getTabIndex(this.props.tabIndex, this.props.disabled), "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, onFocus: this.onFocus },
|
|
243
246
|
React.createElement("div", { className: "k-colorgradient-canvas k-hstack" },
|
|
@@ -247,9 +250,9 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
247
250
|
this.props.backgroundColor && !this.state.isFirstRender &&
|
|
248
251
|
React.createElement(ColorContrastSvg, { metrics: this.gradientWrapper ? this.getGradientRectMetrics() : undefined, hsva: this.state.hsva, backgroundColor: this.props.backgroundColor })),
|
|
249
252
|
React.createElement("div", { className: "k-hsv-controls k-hstack" },
|
|
250
|
-
React.createElement(Slider, { value: this.state.hsva.h, buttons: false, vertical: true, min: 0, max: 360, step: 5, onChange: this.onHueSliderChange, className: "k-hue-slider k-colorgradient-slider", disabled: this.props.disabled }),
|
|
253
|
+
React.createElement(Slider, { value: this.state.hsva.h, buttons: false, vertical: true, min: 0, max: 360, step: 5, onChange: this.onHueSliderChange, className: "k-hue-slider k-colorgradient-slider", disabled: this.props.disabled, ariaLabel: lS.toLanguageString(colorGradientHueSliderLabel, messages[colorGradientHueSliderLabel]) }),
|
|
251
254
|
this.props.opacity &&
|
|
252
|
-
React.createElement(Slider, { value: isPresent(this.state.hsva.a) ? this.state.hsva.a * 100 : 100, buttons: false, vertical: true, min: 0, max: 100, step: 1, onChange: this.onAlphaSliderChange, className: "k-alpha-slider k-colorgradient-slider", disabled: this.props.disabled, ref: function (el) { return _this.alphaSlider = el; } }))),
|
|
255
|
+
React.createElement(Slider, { value: isPresent(this.state.hsva.a) ? this.state.hsva.a * 100 : 100, buttons: false, vertical: true, min: 0, max: 100, step: 1, ariaLabel: lS.toLanguageString(colorGradientAlphaSliderLabel, messages[colorGradientAlphaSliderLabel]), onChange: this.onAlphaSliderChange, className: "k-alpha-slider k-colorgradient-slider", disabled: this.props.disabled, ref: function (el) { return _this.alphaSlider = el; } }))),
|
|
253
256
|
React.createElement(ColorInput, { rgba: this.state.rgba, onRgbaChange: this.onRgbaChange, hex: this.state.hex, onHexChange: this.onHexChange, opacity: this.props.opacity, disabled: this.props.disabled }),
|
|
254
257
|
this.props.backgroundColor && (React.createElement(ColorContrastLabels, { bgColor: getRGBA(this.props.backgroundColor), rgba: this.state.rgba }))));
|
|
255
258
|
};
|
|
@@ -30,7 +30,7 @@ import HexInput from './HexInput';
|
|
|
30
30
|
import { Button } from '@progress/kendo-react-buttons';
|
|
31
31
|
import { Label } from '@progress/kendo-react-labels';
|
|
32
32
|
import { registerForIntl, registerForLocalization, provideLocalizationService } from '@progress/kendo-react-intl';
|
|
33
|
-
import { messages, colorGradientR, colorGradientHex, colorGradientA, colorGradientB, colorGradientG } from '../messages';
|
|
33
|
+
import { messages, colorGradientR, colorGradientHex, colorGradientA, colorGradientB, colorGradientG, colorGradientToggleInputsButton } from '../messages';
|
|
34
34
|
/**
|
|
35
35
|
* @hidden
|
|
36
36
|
*/
|
|
@@ -66,9 +66,10 @@ var ColorInput = /** @class */ (function (_super) {
|
|
|
66
66
|
var gMessage = localizationService.toLanguageString(colorGradientR, messages[colorGradientG]);
|
|
67
67
|
var bMessage = localizationService.toLanguageString(colorGradientR, messages[colorGradientB]);
|
|
68
68
|
var aMessage = localizationService.toLanguageString(colorGradientR, messages[colorGradientA]);
|
|
69
|
+
var toggleButtonMessage = localizationService.toLanguageString(colorGradientToggleInputsButton, messages[colorGradientToggleInputsButton]);
|
|
69
70
|
return (React.createElement("div", { className: "k-colorgradient-inputs k-hstack" },
|
|
70
71
|
React.createElement("div", { className: "k-vstack" },
|
|
71
|
-
React.createElement(Button, { fillMode: 'flat', icon: 'arrows-kpi', className: "k-colorgradient-toggle-mode k-icon-button", onClick: this.onToggleModeChange.bind(this) })),
|
|
72
|
+
React.createElement(Button, { "aria-label": toggleButtonMessage, fillMode: 'flat', icon: 'arrows-kpi', className: "k-colorgradient-toggle-mode k-icon-button", onClick: this.onToggleModeChange.bind(this) })),
|
|
72
73
|
this.state.inputMode === 'hex' &&
|
|
73
74
|
React.createElement("div", { className: "k-vstack k-flex-1" },
|
|
74
75
|
React.createElement("span", { className: "k-hex-value k-textbox k-input" },
|
|
@@ -77,18 +78,18 @@ var ColorInput = /** @class */ (function (_super) {
|
|
|
77
78
|
(this.state.inputMode === 'rgb' || this.state.inputMode === 'rgba') &&
|
|
78
79
|
React.createElement(React.Fragment, null,
|
|
79
80
|
React.createElement("div", { className: "k-vstack" },
|
|
80
|
-
React.createElement(NumericTextBox, { value: this.props.rgba.r, min: 0, max: 255, spinners: false, format: "n", onChange: this.onRgbaRChange, disabled: this.props.disabled }),
|
|
81
|
+
React.createElement(NumericTextBox, { inputType: 'number', value: this.props.rgba.r, ariaLabel: String(this.props.rgba.r), min: 0, max: 255, spinners: false, format: "n", onChange: this.onRgbaRChange, disabled: this.props.disabled }),
|
|
81
82
|
React.createElement(Label, { className: "k-colorgradient-input-label" }, rMessage)),
|
|
82
83
|
React.createElement("div", { className: "k-vstack" },
|
|
83
|
-
React.createElement(NumericTextBox, { value: this.props.rgba.g, min: 0, max: 255, spinners: false, format: "n", onChange: this.onRgbaGChange, disabled: this.props.disabled }),
|
|
84
|
+
React.createElement(NumericTextBox, { inputType: 'number', value: this.props.rgba.g, ariaLabel: String(this.props.rgba.g), min: 0, max: 255, spinners: false, format: "n", onChange: this.onRgbaGChange, disabled: this.props.disabled }),
|
|
84
85
|
React.createElement(Label, { className: "k-colorgradient-input-label" }, gMessage)),
|
|
85
86
|
React.createElement("div", { className: "k-vstack" },
|
|
86
|
-
React.createElement(NumericTextBox, { value: this.props.rgba.b, min: 0, max: 255, spinners: false, format: "n", onChange: this.onRgbaBChange, disabled: this.props.disabled }),
|
|
87
|
+
React.createElement(NumericTextBox, { inputType: 'number', value: this.props.rgba.b, ariaLabel: String(this.props.rgba.b), min: 0, max: 255, spinners: false, format: "n", onChange: this.onRgbaBChange, disabled: this.props.disabled }),
|
|
87
88
|
React.createElement(Label, { className: "k-colorgradient-input-label" }, bMessage))),
|
|
88
89
|
this.state.inputMode === 'rgba' &&
|
|
89
90
|
React.createElement("div", { className: "k-vstack" },
|
|
90
91
|
this.props.opacity &&
|
|
91
|
-
React.createElement(NumericTextBox, { value: this.props.rgba.a, min: 0, max: 1, step: 0.01, spinners: false, format: "n2", onChange: this.onRgbaAChange, disabled: this.props.disabled }),
|
|
92
|
+
React.createElement(NumericTextBox, { inputType: 'number', value: this.props.rgba.a, ariaLabel: String(this.props.rgba.a), min: 0, max: 1, step: 0.01, spinners: false, format: "n2", onChange: this.onRgbaAChange, disabled: this.props.disabled }),
|
|
92
93
|
this.props.opacity && (React.createElement(Label, { className: "k-colorgradient-input-label" }, aMessage)))));
|
|
93
94
|
};
|
|
94
95
|
ColorInput.prototype.dispatchRgbaChange = function (newValue, event) {
|
|
@@ -115,10 +115,10 @@ var ColorPaletteWithoutContext = /** @class */ (function (_super) {
|
|
|
115
115
|
var focusedCellCoords = svc.getCellCoordsFor(this.state.focusedColor);
|
|
116
116
|
var className = classNames('k-colorpalette', { 'k-disabled': this.props.disabled });
|
|
117
117
|
if (paletteInfo.colors.length) {
|
|
118
|
-
return (React.createElement("div", { id: this.props.id, className: className, onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, "aria-disabled": this.props.disabled ? 'true' : undefined, "aria-
|
|
118
|
+
return (React.createElement("div", { id: this.props.id, className: className, onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, "aria-disabled": this.props.disabled ? 'true' : undefined, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, tabIndex: getTabIndex(this.props.tabIndex, this.props.disabled), ref: function (el) { return _this.wrapper = el; } },
|
|
119
119
|
React.createElement("div", { className: "k-colorpalette-table-wrap", role: "grid" },
|
|
120
120
|
React.createElement("table", { className: "k-colorpalette-table k-palette", role: "presentation" },
|
|
121
|
-
React.createElement("tbody",
|
|
121
|
+
React.createElement("tbody", { role: "rowgroup" }, this.renderRows(svc.colorRows, selectedCellCoords, focusedCellCoords))))));
|
|
122
122
|
}
|
|
123
123
|
else {
|
|
124
124
|
// In this way, the code prevents an eventual focus of the component when no cells are available.
|
|
@@ -219,7 +219,7 @@ var ColorPaletteWithoutContext = /** @class */ (function (_super) {
|
|
|
219
219
|
'k-selected': isSelected,
|
|
220
220
|
'k-focus': rowIsFocused && focusedColumn === i
|
|
221
221
|
});
|
|
222
|
-
return (React.createElement("td", { className: className, "aria-label": color, "aria-selected": isSelected ? true : _this.props.disabled ? undefined : false, style: { backgroundColor: color, width: width, height: height, minWidth: width }, onClick: function (event) { return _this.onColorClick(color, event); }, id: _this.createCellId({ row: rowIndex, col: i }), key: i }));
|
|
222
|
+
return (React.createElement("td", { role: "gridcell", className: className, "aria-label": color, "aria-selected": isSelected ? true : _this.props.disabled ? undefined : false, style: { backgroundColor: color, width: width, height: height, minWidth: width }, onClick: function (event) { return _this.onColorClick(color, event); }, id: _this.createCellId({ row: rowIndex, col: i }), key: i }));
|
|
223
223
|
});
|
|
224
224
|
};
|
|
225
225
|
ColorPaletteWithoutContext.prototype.createCellId = function (cellCoords) {
|
package/dist/es/input/Input.d.ts
CHANGED
|
@@ -32,6 +32,10 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
32
32
|
* Identifies the element(s) which will label the component.
|
|
33
33
|
*/
|
|
34
34
|
ariaLabelledBy?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Defines a string value that labels an interactive element.
|
|
37
|
+
*/
|
|
38
|
+
ariaLabel?: string;
|
|
35
39
|
/**
|
|
36
40
|
* Triggered after value change.
|
|
37
41
|
*/
|
|
@@ -57,6 +61,7 @@ export declare class InputWithoutContext extends React.Component<InputProps, Inp
|
|
|
57
61
|
id: PropTypes.Requireable<string>;
|
|
58
62
|
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
59
63
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
64
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
60
65
|
};
|
|
61
66
|
/**
|
|
62
67
|
* @hidden
|
package/dist/es/input/Input.js
CHANGED
|
@@ -201,11 +201,11 @@ var InputWithoutContext = /** @class */ (function (_super) {
|
|
|
201
201
|
var _this = this;
|
|
202
202
|
var _a = this.props, className = _a.className, label = _a.label, id = _a.id, validationMessage = _a.validationMessage, defaultValue = _a.defaultValue, valid = _a.valid,
|
|
203
203
|
// Removed to support direct use in Form Field component
|
|
204
|
-
visited = _a.visited, touched = _a.touched, modified = _a.modified, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy, validityStyles = _a.validityStyles, style = _a.style, props = __rest(_a, ["className", "label", "id", "validationMessage", "defaultValue", "valid", "visited", "touched", "modified", "ariaLabelledBy", "ariaDescribedBy", "validityStyles", "style"]);
|
|
204
|
+
visited = _a.visited, touched = _a.touched, modified = _a.modified, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy, validityStyles = _a.validityStyles, style = _a.style, ariaLabel = _a.ariaLabel, props = __rest(_a, ["className", "label", "id", "validationMessage", "defaultValue", "valid", "visited", "touched", "modified", "ariaLabelledBy", "ariaDescribedBy", "validityStyles", "style", "ariaLabel"]);
|
|
205
205
|
var inputId = id || this._inputId;
|
|
206
206
|
var isValid = !this.validityStyles || this.validity.valid;
|
|
207
207
|
var inputClassName = classNames(className, 'k-input k-input-md k-rounded-md k-input-solid');
|
|
208
|
-
var textbox = (React.createElement("input", __assign({ "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-disabled": this.props.disabled || undefined, "aria-invalid": !isValid || undefined }, props, { style: !label
|
|
208
|
+
var textbox = (React.createElement("input", __assign({ "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-disabled": this.props.disabled || undefined, "aria-invalid": !isValid || undefined, "aria-label": ariaLabel || undefined }, props, { style: !label
|
|
209
209
|
? style
|
|
210
210
|
: undefined, value: this.value, id: inputId, className: inputClassName, onChange: this.handleChange, onAnimationStart: this.handleAutoFill, ref: function (el) {
|
|
211
211
|
_this._input = el;
|
|
@@ -225,7 +225,8 @@ var InputWithoutContext = /** @class */ (function (_super) {
|
|
|
225
225
|
validate: PropTypes.bool,
|
|
226
226
|
id: PropTypes.string,
|
|
227
227
|
ariaLabelledBy: PropTypes.string,
|
|
228
|
-
ariaDescribedBy: PropTypes.string
|
|
228
|
+
ariaDescribedBy: PropTypes.string,
|
|
229
|
+
ariaLabel: PropTypes.string
|
|
229
230
|
};
|
|
230
231
|
/**
|
|
231
232
|
* @hidden
|
|
@@ -58,6 +58,18 @@ export declare const colorGradientPass = "colorGradient.colorGradientPass";
|
|
|
58
58
|
* @hidden
|
|
59
59
|
*/
|
|
60
60
|
export declare const colorGradientFail = "colorGradient.colorGradientFail";
|
|
61
|
+
/**
|
|
62
|
+
* @hidden
|
|
63
|
+
*/
|
|
64
|
+
export declare const colorGradientHueSliderLabel = "colorGradient.hueSliderLabel";
|
|
65
|
+
/**
|
|
66
|
+
* @hidden
|
|
67
|
+
*/
|
|
68
|
+
export declare const colorGradientAlphaSliderLabel = "colorGradient.alphaSliderLabel";
|
|
69
|
+
/**
|
|
70
|
+
* @hidden
|
|
71
|
+
*/
|
|
72
|
+
export declare const colorGradientToggleInputsButton = "colorGradient.toggleInputsButton";
|
|
61
73
|
/**
|
|
62
74
|
* @hidden
|
|
63
75
|
*/
|
|
@@ -86,6 +98,10 @@ export declare const switchValidation = "switch.validation";
|
|
|
86
98
|
* @hidden
|
|
87
99
|
*/
|
|
88
100
|
export declare const colorPickerDropdownButtonAriaLabel = "colorPicker.dropdownButtonAriaLabel";
|
|
101
|
+
/**
|
|
102
|
+
* @hidden
|
|
103
|
+
*/
|
|
104
|
+
export declare const ratingAriaLabel = "rating.ariaLabel";
|
|
89
105
|
/**
|
|
90
106
|
* @hidden
|
|
91
107
|
*/
|
|
@@ -105,6 +121,9 @@ export declare const messages: {
|
|
|
105
121
|
"colorGradient.colorGradientAAALevel": string;
|
|
106
122
|
"colorGradient.colorGradientPass": string;
|
|
107
123
|
"colorGradient.colorGradientFail": string;
|
|
124
|
+
"colorGradient.hueSliderLabel": string;
|
|
125
|
+
"colorGradient.alphaSliderLabel": string;
|
|
126
|
+
"colorGradient.toggleInputsButton": string;
|
|
108
127
|
"flatColorPicker.cancelBtn": string;
|
|
109
128
|
"flatColorPicker.applyBtn": string;
|
|
110
129
|
"checkbox.validation": string;
|
|
@@ -112,4 +131,5 @@ export declare const messages: {
|
|
|
112
131
|
"radioButton.validation": string;
|
|
113
132
|
"switch.validation": string;
|
|
114
133
|
"colorPicker.dropdownButtonAriaLabel": string;
|
|
134
|
+
"rating.ariaLabel": string;
|
|
115
135
|
};
|
|
@@ -59,6 +59,18 @@ export var colorGradientPass = 'colorGradient.colorGradientPass';
|
|
|
59
59
|
* @hidden
|
|
60
60
|
*/
|
|
61
61
|
export var colorGradientFail = 'colorGradient.colorGradientFail';
|
|
62
|
+
/**
|
|
63
|
+
* @hidden
|
|
64
|
+
*/
|
|
65
|
+
export var colorGradientHueSliderLabel = 'colorGradient.hueSliderLabel';
|
|
66
|
+
/**
|
|
67
|
+
* @hidden
|
|
68
|
+
*/
|
|
69
|
+
export var colorGradientAlphaSliderLabel = 'colorGradient.alphaSliderLabel';
|
|
70
|
+
/**
|
|
71
|
+
* @hidden
|
|
72
|
+
*/
|
|
73
|
+
export var colorGradientToggleInputsButton = 'colorGradient.toggleInputsButton';
|
|
62
74
|
/**
|
|
63
75
|
* @hidden
|
|
64
76
|
*/
|
|
@@ -87,6 +99,10 @@ export var switchValidation = 'switch.validation';
|
|
|
87
99
|
* @hidden
|
|
88
100
|
*/
|
|
89
101
|
export var colorPickerDropdownButtonAriaLabel = 'colorPicker.dropdownButtonAriaLabel';
|
|
102
|
+
/**
|
|
103
|
+
* @hidden
|
|
104
|
+
*/
|
|
105
|
+
export var ratingAriaLabel = 'rating.ariaLabel';
|
|
90
106
|
/**
|
|
91
107
|
* @hidden
|
|
92
108
|
*/
|
|
@@ -106,6 +122,9 @@ export var messages = (_a = {},
|
|
|
106
122
|
_a[colorGradientAAALevel] = 'AAA',
|
|
107
123
|
_a[colorGradientPass] = 'Pass',
|
|
108
124
|
_a[colorGradientFail] = 'Fail',
|
|
125
|
+
_a[colorGradientHueSliderLabel] = 'Hue slider',
|
|
126
|
+
_a[colorGradientAlphaSliderLabel] = 'Alpha slider',
|
|
127
|
+
_a[colorGradientToggleInputsButton] = 'Toggle colorgradient inputs',
|
|
109
128
|
_a[flatColorPickerCancelBtn] = 'Cancel',
|
|
110
129
|
_a[flatColorPickerApplyBtn] = 'Apply',
|
|
111
130
|
_a[checkboxValidation] = 'Please check this box if you want to proceed!',
|
|
@@ -113,4 +132,5 @@ export var messages = (_a = {},
|
|
|
113
132
|
_a[radioButtonValidation] = 'Please select option if you want to proceed!',
|
|
114
133
|
_a[switchValidation] = 'Please turn on if you want to proceed!',
|
|
115
134
|
_a[colorPickerDropdownButtonAriaLabel] = 'Select',
|
|
135
|
+
_a[ratingAriaLabel] = 'Rating',
|
|
116
136
|
_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
|
*/
|
|
@@ -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:
|
|
8
|
+
publishDate: 1659604208,
|
|
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
|
};
|
|
@@ -212,12 +212,12 @@ export var RangeSlider = React.forwardRef(function (directProps, ref) {
|
|
|
212
212
|
setCurrentDrag('');
|
|
213
213
|
};
|
|
214
214
|
useDraggable(sliderTrackWrapRef, { onPress: handleTrackPress, onDrag: handleTrackDrag, onRelease: handleTrackRelease });
|
|
215
|
-
return (React.createElement("div", {
|
|
215
|
+
return (React.createElement("div", { id: props.id, style: props.style, ref: sliderRef, dir: dir, className: classNames('k-widget k-slider', {
|
|
216
216
|
'k-rtl': dir === 'rtl',
|
|
217
217
|
'k-disabled': props.disabled,
|
|
218
218
|
'k-slider-vertical': props.vertical,
|
|
219
219
|
'k-slider-horizontal': !props.vertical
|
|
220
|
-
}, props.className)
|
|
220
|
+
}, props.className) },
|
|
221
221
|
React.createElement("div", { ref: sliderTrackWrapRef, className: "k-slider-track-wrap", style: __assign({ flexGrow: 1, position: 'relative', touchAction: 'none' }, trackStyles) },
|
|
222
222
|
props.children && (React.createElement("ul", { className: "k-reset k-slider-items", style: __assign({}, sliderItemsStyle) }, React.Children.map(props.children, function (child) {
|
|
223
223
|
return child && React.cloneElement(child, {
|
|
@@ -235,11 +235,11 @@ export var RangeSlider = React.forwardRef(function (directProps, ref) {
|
|
|
235
235
|
_b[dir === 'rtl' ? 'right' : 'left'] = percentStart + '%',
|
|
236
236
|
_b.width = (percentEnd - percentStart) + '%',
|
|
237
237
|
_b) }),
|
|
238
|
-
React.createElement("
|
|
238
|
+
React.createElement("span", { ref: startHandle, role: "slider", tabIndex: 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(sliderDragTitle, messages[sliderDragTitle]), style: props.vertical
|
|
239
239
|
? { bottom: 'calc(' + percentStart + '%)', zIndex: 1 }
|
|
240
240
|
: dir === 'rtl' ? { right: 'calc(' + percentStart + '% - 13px)', zIndex: 1 }
|
|
241
241
|
: { left: 'calc(' + percentStart + '%)', zIndex: 1 }, onKeyDown: handleStartKeyDown }),
|
|
242
|
-
React.createElement("
|
|
242
|
+
React.createElement("span", { ref: endHandle, role: "slider", tabIndex: 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(sliderDragTitle, messages[sliderDragTitle]), style: props.vertical
|
|
243
243
|
? { bottom: 'calc(' + percentEnd + '%)', zIndex: 1 }
|
|
244
244
|
: dir === 'rtl' ? { right: 'calc(' + percentEnd + '% - 13px)', zIndex: 1 }
|
|
245
245
|
: { left: 'calc(' + percentEnd + '%)', zIndex: 1 }, onKeyDown: handleEndKeyDown })))));
|
package/dist/es/rating/Rating.js
CHANGED
|
@@ -15,6 +15,8 @@ import { classNames, useDir, Keys, getTabIndex, createPropsContext, usePropsCont
|
|
|
15
15
|
import { RatingItem } from './RatingItem';
|
|
16
16
|
import { ratingReducer, RATING_ACTION } from './rating-reducer';
|
|
17
17
|
import { isSelected, isHalf, calcIsFirstHalf, isCorrectValue, toRound, getRemainder } from './utils';
|
|
18
|
+
import { messages, ratingAriaLabel } from '../messages';
|
|
19
|
+
import { useLocalization } from '@progress/kendo-react-intl';
|
|
18
20
|
/**
|
|
19
21
|
* @hidden
|
|
20
22
|
*/
|
|
@@ -45,6 +47,7 @@ export var RatingPropsContext = createPropsContext();
|
|
|
45
47
|
export var Rating = React.forwardRef(function (directProps, ref) {
|
|
46
48
|
var _a, _b, _c, _d;
|
|
47
49
|
var props = usePropsContext(RatingPropsContext, directProps);
|
|
50
|
+
var localization = useLocalization();
|
|
48
51
|
var target = React.useRef(null);
|
|
49
52
|
var ratingRef = React.useRef(null);
|
|
50
53
|
var dir = useDir(ratingRef, props.dir);
|
|
@@ -225,7 +228,7 @@ export var Rating = React.forwardRef(function (directProps, ref) {
|
|
|
225
228
|
'k-rtl': dir === 'rtl',
|
|
226
229
|
'k-state-readonly': readonly,
|
|
227
230
|
'k-disabled': disabled
|
|
228
|
-
}, 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 },
|
|
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-label": localization.toLanguageString(ratingAriaLabel, messages[ratingAriaLabel]), "aria-labelledby": props.ariaLabelledBy, "aria-describedby": props.ariaDescribedBy },
|
|
229
232
|
React.createElement("input", { id: 'rating', className: 'k-hidden', readOnly: readonly, disabled: disabled }),
|
|
230
233
|
React.createElement("span", { className: 'k-rating-container' }, items),
|
|
231
234
|
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
|
package/dist/es/slider/Slider.js
CHANGED
|
@@ -176,7 +176,7 @@ var SliderWithoutContext = /** @class */ (function (_super) {
|
|
|
176
176
|
var sliderItemsStyle = this.props.vertical
|
|
177
177
|
? { paddingTop: 0, height: '100%' }
|
|
178
178
|
: {};
|
|
179
|
-
return (React.createElement("div", { ref: function (el) { return _this._element = el; },
|
|
179
|
+
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: classNames('k-slider k-widget', {
|
|
180
180
|
'k-focus': this.state.focused,
|
|
181
181
|
'k-disabled': this.props.disabled,
|
|
182
182
|
'k-slider-horizontal': !this.props.vertical,
|
|
@@ -198,7 +198,7 @@ var SliderWithoutContext = /** @class */ (function (_super) {
|
|
|
198
198
|
React.createElement("div", { className: "k-slider-selection", style: this.props.vertical
|
|
199
199
|
? { height: percentValue + '%' }
|
|
200
200
|
: { width: percentValue + '%' } }),
|
|
201
|
-
React.createElement("
|
|
201
|
+
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: getTabIndex(this.props.tabIndex, this.props.disabled, undefined), className: "k-draghandle", title: lS.toLanguageString(sliderDragTitle, messages[sliderDragTitle]), style: this.props.vertical
|
|
202
202
|
? { bottom: 'calc(' + percentValue + '%)', zIndex: 1 }
|
|
203
203
|
: this.state.dir === 'rtl' ? { right: 'calc(' + percentValue + '% - 13px)', zIndex: 1 }
|
|
204
204
|
: { left: 'calc(' + percentValue + '%)', zIndex: 1 } })))))));
|
|
@@ -229,7 +229,8 @@ var SliderWithoutContext = /** @class */ (function (_super) {
|
|
|
229
229
|
vertical: PropTypes.bool,
|
|
230
230
|
id: PropTypes.string,
|
|
231
231
|
ariaLabelledBy: PropTypes.string,
|
|
232
|
-
ariaDescribedBy: PropTypes.string
|
|
232
|
+
ariaDescribedBy: PropTypes.string,
|
|
233
|
+
ariaLabel: PropTypes.string
|
|
233
234
|
// TODO: validation when buttons is set to true, but no step is provided
|
|
234
235
|
};
|
|
235
236
|
return SliderWithoutContext;
|
|
@@ -26,6 +26,6 @@ export var SliderLabel = function (props) {
|
|
|
26
26
|
? { bottom: "".concat(props.position, "%") }
|
|
27
27
|
: (_a = {}, _a[dir === 'rtl' ? 'right' : 'left'] = "".concat(props.position, "%"), _a);
|
|
28
28
|
var tickStyle = props.vertical ? 'k-tick-vertical' : 'k-tick-horizontal';
|
|
29
|
-
return (React.createElement("li", { ref: sliderLabelRef,
|
|
29
|
+
return (React.createElement("li", { ref: sliderLabelRef, className: "k-tick k-tick-large ".concat(tickStyle), title: props.title, style: __assign({ zIndex: 1, position: 'absolute' }, style) },
|
|
30
30
|
React.createElement("span", __assign({}, (_b = {}, _b[SLIDER_LABEL_ATTRIBUTE] = true, _b), { className: "k-label", onClick: props.onClick }), props.children)));
|
|
31
31
|
};
|
|
@@ -28,6 +28,8 @@ var color_cache_1 = require("./utils/color-cache");
|
|
|
28
28
|
var ColorInput_1 = require("./ColorInput");
|
|
29
29
|
var ColorContrastLabels_1 = require("./ColorContrastLabels");
|
|
30
30
|
var ColorContrastSvg_1 = require("./ColorContrastSvg");
|
|
31
|
+
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
32
|
+
var messages_1 = require("./../messages");
|
|
31
33
|
var FORMAT = 'rgba';
|
|
32
34
|
var DEFAULT_SELECTED_COLOR = 'rgba(255, 255, 255, 1)';
|
|
33
35
|
/** @hidden */
|
|
@@ -241,6 +243,7 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
241
243
|
*/
|
|
242
244
|
ColorGradientWithoutContext.prototype.render = function () {
|
|
243
245
|
var _this = this;
|
|
246
|
+
var lS = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
244
247
|
var className = (0, kendo_react_common_1.classNames)('k-colorgradient', { 'k-disabled': this.props.disabled });
|
|
245
248
|
return (React.createElement("div", { id: this.props.id, className: className, "aria-disabled": this.props.disabled ? 'true' : undefined, style: this.props.style, ref: function (el) { return _this.wrapper = el; }, tabIndex: (0, kendo_react_common_1.getTabIndex)(this.props.tabIndex, this.props.disabled), "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, onFocus: this.onFocus },
|
|
246
249
|
React.createElement("div", { className: "k-colorgradient-canvas k-hstack" },
|
|
@@ -250,9 +253,9 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
250
253
|
this.props.backgroundColor && !this.state.isFirstRender &&
|
|
251
254
|
React.createElement(ColorContrastSvg_1.ColorContrastSvg, { metrics: this.gradientWrapper ? this.getGradientRectMetrics() : undefined, hsva: this.state.hsva, backgroundColor: this.props.backgroundColor })),
|
|
252
255
|
React.createElement("div", { className: "k-hsv-controls k-hstack" },
|
|
253
|
-
React.createElement(main_1.Slider, { value: this.state.hsva.h, buttons: false, vertical: true, min: 0, max: 360, step: 5, onChange: this.onHueSliderChange, className: "k-hue-slider k-colorgradient-slider", disabled: this.props.disabled }),
|
|
256
|
+
React.createElement(main_1.Slider, { value: this.state.hsva.h, buttons: false, vertical: true, min: 0, max: 360, step: 5, onChange: this.onHueSliderChange, className: "k-hue-slider k-colorgradient-slider", disabled: this.props.disabled, ariaLabel: lS.toLanguageString(messages_1.colorGradientHueSliderLabel, messages_1.messages[messages_1.colorGradientHueSliderLabel]) }),
|
|
254
257
|
this.props.opacity &&
|
|
255
|
-
React.createElement(main_1.Slider, { value: (0, misc_1.isPresent)(this.state.hsva.a) ? this.state.hsva.a * 100 : 100, buttons: false, vertical: true, min: 0, max: 100, step: 1, onChange: this.onAlphaSliderChange, className: "k-alpha-slider k-colorgradient-slider", disabled: this.props.disabled, ref: function (el) { return _this.alphaSlider = el; } }))),
|
|
258
|
+
React.createElement(main_1.Slider, { value: (0, misc_1.isPresent)(this.state.hsva.a) ? this.state.hsva.a * 100 : 100, buttons: false, vertical: true, min: 0, max: 100, step: 1, ariaLabel: lS.toLanguageString(messages_1.colorGradientAlphaSliderLabel, messages_1.messages[messages_1.colorGradientAlphaSliderLabel]), onChange: this.onAlphaSliderChange, className: "k-alpha-slider k-colorgradient-slider", disabled: this.props.disabled, ref: function (el) { return _this.alphaSlider = el; } }))),
|
|
256
259
|
React.createElement(ColorInput_1.default, { rgba: this.state.rgba, onRgbaChange: this.onRgbaChange, hex: this.state.hex, onHexChange: this.onHexChange, opacity: this.props.opacity, disabled: this.props.disabled }),
|
|
257
260
|
this.props.backgroundColor && (React.createElement(ColorContrastLabels_1.ColorContrastLabels, { bgColor: (0, color_parser_1.getRGBA)(this.props.backgroundColor), rgba: this.state.rgba }))));
|
|
258
261
|
};
|
|
@@ -68,9 +68,10 @@ var ColorInput = /** @class */ (function (_super) {
|
|
|
68
68
|
var gMessage = localizationService.toLanguageString(messages_1.colorGradientR, messages_1.messages[messages_1.colorGradientG]);
|
|
69
69
|
var bMessage = localizationService.toLanguageString(messages_1.colorGradientR, messages_1.messages[messages_1.colorGradientB]);
|
|
70
70
|
var aMessage = localizationService.toLanguageString(messages_1.colorGradientR, messages_1.messages[messages_1.colorGradientA]);
|
|
71
|
+
var toggleButtonMessage = localizationService.toLanguageString(messages_1.colorGradientToggleInputsButton, messages_1.messages[messages_1.colorGradientToggleInputsButton]);
|
|
71
72
|
return (React.createElement("div", { className: "k-colorgradient-inputs k-hstack" },
|
|
72
73
|
React.createElement("div", { className: "k-vstack" },
|
|
73
|
-
React.createElement(kendo_react_buttons_1.Button, { fillMode: 'flat', icon: 'arrows-kpi', className: "k-colorgradient-toggle-mode k-icon-button", onClick: this.onToggleModeChange.bind(this) })),
|
|
74
|
+
React.createElement(kendo_react_buttons_1.Button, { "aria-label": toggleButtonMessage, fillMode: 'flat', icon: 'arrows-kpi', className: "k-colorgradient-toggle-mode k-icon-button", onClick: this.onToggleModeChange.bind(this) })),
|
|
74
75
|
this.state.inputMode === 'hex' &&
|
|
75
76
|
React.createElement("div", { className: "k-vstack k-flex-1" },
|
|
76
77
|
React.createElement("span", { className: "k-hex-value k-textbox k-input" },
|
|
@@ -79,18 +80,18 @@ var ColorInput = /** @class */ (function (_super) {
|
|
|
79
80
|
(this.state.inputMode === 'rgb' || this.state.inputMode === 'rgba') &&
|
|
80
81
|
React.createElement(React.Fragment, null,
|
|
81
82
|
React.createElement("div", { className: "k-vstack" },
|
|
82
|
-
React.createElement(main_1.NumericTextBox, { value: this.props.rgba.r, min: 0, max: 255, spinners: false, format: "n", onChange: this.onRgbaRChange, disabled: this.props.disabled }),
|
|
83
|
+
React.createElement(main_1.NumericTextBox, { inputType: 'number', value: this.props.rgba.r, ariaLabel: String(this.props.rgba.r), min: 0, max: 255, spinners: false, format: "n", onChange: this.onRgbaRChange, disabled: this.props.disabled }),
|
|
83
84
|
React.createElement(kendo_react_labels_1.Label, { className: "k-colorgradient-input-label" }, rMessage)),
|
|
84
85
|
React.createElement("div", { className: "k-vstack" },
|
|
85
|
-
React.createElement(main_1.NumericTextBox, { value: this.props.rgba.g, min: 0, max: 255, spinners: false, format: "n", onChange: this.onRgbaGChange, disabled: this.props.disabled }),
|
|
86
|
+
React.createElement(main_1.NumericTextBox, { inputType: 'number', value: this.props.rgba.g, ariaLabel: String(this.props.rgba.g), min: 0, max: 255, spinners: false, format: "n", onChange: this.onRgbaGChange, disabled: this.props.disabled }),
|
|
86
87
|
React.createElement(kendo_react_labels_1.Label, { className: "k-colorgradient-input-label" }, gMessage)),
|
|
87
88
|
React.createElement("div", { className: "k-vstack" },
|
|
88
|
-
React.createElement(main_1.NumericTextBox, { value: this.props.rgba.b, min: 0, max: 255, spinners: false, format: "n", onChange: this.onRgbaBChange, disabled: this.props.disabled }),
|
|
89
|
+
React.createElement(main_1.NumericTextBox, { inputType: 'number', value: this.props.rgba.b, ariaLabel: String(this.props.rgba.b), min: 0, max: 255, spinners: false, format: "n", onChange: this.onRgbaBChange, disabled: this.props.disabled }),
|
|
89
90
|
React.createElement(kendo_react_labels_1.Label, { className: "k-colorgradient-input-label" }, bMessage))),
|
|
90
91
|
this.state.inputMode === 'rgba' &&
|
|
91
92
|
React.createElement("div", { className: "k-vstack" },
|
|
92
93
|
this.props.opacity &&
|
|
93
|
-
React.createElement(main_1.NumericTextBox, { value: this.props.rgba.a, min: 0, max: 1, step: 0.01, spinners: false, format: "n2", onChange: this.onRgbaAChange, disabled: this.props.disabled }),
|
|
94
|
+
React.createElement(main_1.NumericTextBox, { inputType: 'number', value: this.props.rgba.a, ariaLabel: String(this.props.rgba.a), min: 0, max: 1, step: 0.01, spinners: false, format: "n2", onChange: this.onRgbaAChange, disabled: this.props.disabled }),
|
|
94
95
|
this.props.opacity && (React.createElement(kendo_react_labels_1.Label, { className: "k-colorgradient-input-label" }, aMessage)))));
|
|
95
96
|
};
|
|
96
97
|
ColorInput.prototype.dispatchRgbaChange = function (newValue, event) {
|
|
@@ -118,10 +118,10 @@ var ColorPaletteWithoutContext = /** @class */ (function (_super) {
|
|
|
118
118
|
var focusedCellCoords = svc.getCellCoordsFor(this.state.focusedColor);
|
|
119
119
|
var className = (0, kendo_react_common_1.classNames)('k-colorpalette', { 'k-disabled': this.props.disabled });
|
|
120
120
|
if (paletteInfo.colors.length) {
|
|
121
|
-
return (React.createElement("div", { id: this.props.id, className: className, onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, "aria-disabled": this.props.disabled ? 'true' : undefined, "aria-
|
|
121
|
+
return (React.createElement("div", { id: this.props.id, className: className, onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, "aria-disabled": this.props.disabled ? 'true' : undefined, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, tabIndex: (0, kendo_react_common_1.getTabIndex)(this.props.tabIndex, this.props.disabled), ref: function (el) { return _this.wrapper = el; } },
|
|
122
122
|
React.createElement("div", { className: "k-colorpalette-table-wrap", role: "grid" },
|
|
123
123
|
React.createElement("table", { className: "k-colorpalette-table k-palette", role: "presentation" },
|
|
124
|
-
React.createElement("tbody",
|
|
124
|
+
React.createElement("tbody", { role: "rowgroup" }, this.renderRows(svc.colorRows, selectedCellCoords, focusedCellCoords))))));
|
|
125
125
|
}
|
|
126
126
|
else {
|
|
127
127
|
// In this way, the code prevents an eventual focus of the component when no cells are available.
|
|
@@ -222,7 +222,7 @@ var ColorPaletteWithoutContext = /** @class */ (function (_super) {
|
|
|
222
222
|
'k-selected': isSelected,
|
|
223
223
|
'k-focus': rowIsFocused && focusedColumn === i
|
|
224
224
|
});
|
|
225
|
-
return (React.createElement("td", { className: className, "aria-label": color, "aria-selected": isSelected ? true : _this.props.disabled ? undefined : false, style: { backgroundColor: color, width: width, height: height, minWidth: width }, onClick: function (event) { return _this.onColorClick(color, event); }, id: _this.createCellId({ row: rowIndex, col: i }), key: i }));
|
|
225
|
+
return (React.createElement("td", { role: "gridcell", className: className, "aria-label": color, "aria-selected": isSelected ? true : _this.props.disabled ? undefined : false, style: { backgroundColor: color, width: width, height: height, minWidth: width }, onClick: function (event) { return _this.onColorClick(color, event); }, id: _this.createCellId({ row: rowIndex, col: i }), key: i }));
|
|
226
226
|
});
|
|
227
227
|
};
|
|
228
228
|
ColorPaletteWithoutContext.prototype.createCellId = function (cellCoords) {
|
|
@@ -32,6 +32,10 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
32
32
|
* Identifies the element(s) which will label the component.
|
|
33
33
|
*/
|
|
34
34
|
ariaLabelledBy?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Defines a string value that labels an interactive element.
|
|
37
|
+
*/
|
|
38
|
+
ariaLabel?: string;
|
|
35
39
|
/**
|
|
36
40
|
* Triggered after value change.
|
|
37
41
|
*/
|
|
@@ -57,6 +61,7 @@ export declare class InputWithoutContext extends React.Component<InputProps, Inp
|
|
|
57
61
|
id: PropTypes.Requireable<string>;
|
|
58
62
|
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
59
63
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
64
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
60
65
|
};
|
|
61
66
|
/**
|
|
62
67
|
* @hidden
|
package/dist/npm/input/Input.js
CHANGED
|
@@ -204,11 +204,11 @@ var InputWithoutContext = /** @class */ (function (_super) {
|
|
|
204
204
|
var _this = this;
|
|
205
205
|
var _a = this.props, className = _a.className, label = _a.label, id = _a.id, validationMessage = _a.validationMessage, defaultValue = _a.defaultValue, valid = _a.valid,
|
|
206
206
|
// Removed to support direct use in Form Field component
|
|
207
|
-
visited = _a.visited, touched = _a.touched, modified = _a.modified, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy, validityStyles = _a.validityStyles, style = _a.style, props = __rest(_a, ["className", "label", "id", "validationMessage", "defaultValue", "valid", "visited", "touched", "modified", "ariaLabelledBy", "ariaDescribedBy", "validityStyles", "style"]);
|
|
207
|
+
visited = _a.visited, touched = _a.touched, modified = _a.modified, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy, validityStyles = _a.validityStyles, style = _a.style, ariaLabel = _a.ariaLabel, props = __rest(_a, ["className", "label", "id", "validationMessage", "defaultValue", "valid", "visited", "touched", "modified", "ariaLabelledBy", "ariaDescribedBy", "validityStyles", "style", "ariaLabel"]);
|
|
208
208
|
var inputId = id || this._inputId;
|
|
209
209
|
var isValid = !this.validityStyles || this.validity.valid;
|
|
210
210
|
var inputClassName = (0, kendo_react_common_1.classNames)(className, 'k-input k-input-md k-rounded-md k-input-solid');
|
|
211
|
-
var textbox = (React.createElement("input", __assign({ "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-disabled": this.props.disabled || undefined, "aria-invalid": !isValid || undefined }, props, { style: !label
|
|
211
|
+
var textbox = (React.createElement("input", __assign({ "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-disabled": this.props.disabled || undefined, "aria-invalid": !isValid || undefined, "aria-label": ariaLabel || undefined }, props, { style: !label
|
|
212
212
|
? style
|
|
213
213
|
: undefined, value: this.value, id: inputId, className: inputClassName, onChange: this.handleChange, onAnimationStart: this.handleAutoFill, ref: function (el) {
|
|
214
214
|
_this._input = el;
|
|
@@ -228,7 +228,8 @@ var InputWithoutContext = /** @class */ (function (_super) {
|
|
|
228
228
|
validate: PropTypes.bool,
|
|
229
229
|
id: PropTypes.string,
|
|
230
230
|
ariaLabelledBy: PropTypes.string,
|
|
231
|
-
ariaDescribedBy: PropTypes.string
|
|
231
|
+
ariaDescribedBy: PropTypes.string,
|
|
232
|
+
ariaLabel: PropTypes.string
|
|
232
233
|
};
|
|
233
234
|
/**
|
|
234
235
|
* @hidden
|
|
@@ -58,6 +58,18 @@ export declare const colorGradientPass = "colorGradient.colorGradientPass";
|
|
|
58
58
|
* @hidden
|
|
59
59
|
*/
|
|
60
60
|
export declare const colorGradientFail = "colorGradient.colorGradientFail";
|
|
61
|
+
/**
|
|
62
|
+
* @hidden
|
|
63
|
+
*/
|
|
64
|
+
export declare const colorGradientHueSliderLabel = "colorGradient.hueSliderLabel";
|
|
65
|
+
/**
|
|
66
|
+
* @hidden
|
|
67
|
+
*/
|
|
68
|
+
export declare const colorGradientAlphaSliderLabel = "colorGradient.alphaSliderLabel";
|
|
69
|
+
/**
|
|
70
|
+
* @hidden
|
|
71
|
+
*/
|
|
72
|
+
export declare const colorGradientToggleInputsButton = "colorGradient.toggleInputsButton";
|
|
61
73
|
/**
|
|
62
74
|
* @hidden
|
|
63
75
|
*/
|
|
@@ -86,6 +98,10 @@ export declare const switchValidation = "switch.validation";
|
|
|
86
98
|
* @hidden
|
|
87
99
|
*/
|
|
88
100
|
export declare const colorPickerDropdownButtonAriaLabel = "colorPicker.dropdownButtonAriaLabel";
|
|
101
|
+
/**
|
|
102
|
+
* @hidden
|
|
103
|
+
*/
|
|
104
|
+
export declare const ratingAriaLabel = "rating.ariaLabel";
|
|
89
105
|
/**
|
|
90
106
|
* @hidden
|
|
91
107
|
*/
|
|
@@ -105,6 +121,9 @@ export declare const messages: {
|
|
|
105
121
|
"colorGradient.colorGradientAAALevel": string;
|
|
106
122
|
"colorGradient.colorGradientPass": string;
|
|
107
123
|
"colorGradient.colorGradientFail": string;
|
|
124
|
+
"colorGradient.hueSliderLabel": string;
|
|
125
|
+
"colorGradient.alphaSliderLabel": string;
|
|
126
|
+
"colorGradient.toggleInputsButton": string;
|
|
108
127
|
"flatColorPicker.cancelBtn": string;
|
|
109
128
|
"flatColorPicker.applyBtn": string;
|
|
110
129
|
"checkbox.validation": string;
|
|
@@ -112,4 +131,5 @@ export declare const messages: {
|
|
|
112
131
|
"radioButton.validation": string;
|
|
113
132
|
"switch.validation": string;
|
|
114
133
|
"colorPicker.dropdownButtonAriaLabel": string;
|
|
134
|
+
"rating.ariaLabel": string;
|
|
115
135
|
};
|