@progress/kendo-react-inputs 5.10.0-dev.202301111405 → 5.10.0-dev.202301111905
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/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/dist/es/colors/ColorGradient.d.ts +3 -0
- package/dist/es/colors/ColorGradient.js +6 -3
- package/dist/es/colors/ColorPalette.js +2 -2
- package/dist/es/colors/ColorPicker.js +1 -1
- package/dist/es/colors/FlatColorPicker.d.ts +8 -0
- package/dist/es/colors/FlatColorPicker.js +9 -7
- package/dist/es/colors/interfaces/ColorGradientProps.d.ts +16 -0
- package/dist/es/colors/interfaces/ColorPaletteProps.d.ts +4 -0
- package/dist/es/colors/interfaces/ColorPickerProps.d.ts +4 -0
- package/dist/es/maskedtextbox/MaskedTextBox.js +1 -1
- package/dist/es/messages/index.d.ts +15 -0
- package/dist/es/messages/index.js +15 -0
- package/dist/es/numerictextbox/NumericTextBox.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/switch/Switch.js +8 -6
- package/dist/es/textarea/TextArea.js +1 -1
- package/dist/npm/colors/ColorGradient.d.ts +3 -0
- package/dist/npm/colors/ColorGradient.js +6 -3
- package/dist/npm/colors/ColorPalette.js +2 -2
- package/dist/npm/colors/ColorPicker.js +1 -1
- package/dist/npm/colors/FlatColorPicker.d.ts +8 -0
- package/dist/npm/colors/FlatColorPicker.js +8 -6
- package/dist/npm/colors/interfaces/ColorGradientProps.d.ts +16 -0
- package/dist/npm/colors/interfaces/ColorPaletteProps.d.ts +4 -0
- package/dist/npm/colors/interfaces/ColorPickerProps.d.ts +4 -0
- package/dist/npm/maskedtextbox/MaskedTextBox.js +1 -1
- package/dist/npm/messages/index.d.ts +15 -0
- package/dist/npm/messages/index.js +16 -1
- package/dist/npm/numerictextbox/NumericTextBox.js +1 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/switch/Switch.js +8 -6
- package/dist/npm/textarea/TextArea.js +1 -1
- package/dist/systemjs/kendo-react-inputs.js +1 -1
- package/package.json +18 -18
|
@@ -32,6 +32,8 @@ export declare class ColorGradientWithoutContext extends React.Component<ColorGr
|
|
|
32
32
|
disabled: PropTypes.Requireable<boolean>;
|
|
33
33
|
style: PropTypes.Requireable<any>;
|
|
34
34
|
id: PropTypes.Requireable<string>;
|
|
35
|
+
role: PropTypes.Requireable<string>;
|
|
36
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
35
37
|
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
36
38
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
37
39
|
};
|
|
@@ -40,6 +42,7 @@ export declare class ColorGradientWithoutContext extends React.Component<ColorGr
|
|
|
40
42
|
*/
|
|
41
43
|
static defaultProps: {
|
|
42
44
|
opacity: boolean;
|
|
45
|
+
role: string;
|
|
43
46
|
};
|
|
44
47
|
/**
|
|
45
48
|
* @hidden
|
|
@@ -173,7 +173,7 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
173
173
|
style.top = "".concat(top_1, "px");
|
|
174
174
|
style.left = "".concat(left, "px");
|
|
175
175
|
}
|
|
176
|
-
return React.createElement("div", { className: "k-hsv-draghandle k-draghandle", style: style });
|
|
176
|
+
return (React.createElement("div", { role: 'slider', tabIndex: getTabIndex(this.props.tabIndex, this.props.disabled), "aria-valuetext": this.props.ariaValueText, "aria-valuenow": parseInt(this.state.hex.substring(1), 16), "aria-label": this.props.ariaLabelHSV, "aria-orientation": undefined, "aria-disabled": this.props.disabled ? 'true' : undefined, className: "k-hsv-draghandle k-draghandle", style: style }));
|
|
177
177
|
};
|
|
178
178
|
/**
|
|
179
179
|
* @hidden
|
|
@@ -242,7 +242,7 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
242
242
|
var _this = this;
|
|
243
243
|
var lS = provideLocalizationService(this);
|
|
244
244
|
var className = classNames('k-colorgradient', { 'k-disabled': this.props.disabled });
|
|
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 },
|
|
245
|
+
return (React.createElement("div", { id: this.props.id, role: this.props.role, 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-label": this.props.ariaLabel, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, onFocus: this.onFocus },
|
|
246
246
|
React.createElement("div", { className: "k-colorgradient-canvas k-hstack" },
|
|
247
247
|
React.createElement("div", { className: "k-hsv-rectangle", style: { background: this.state.backgroundColor } },
|
|
248
248
|
React.createElement(Draggable, { onDrag: this.onDrag, onRelease: this.onRelease, ref: function (el) { return _this.gradientWrapper = el ? el.element : undefined; } },
|
|
@@ -270,6 +270,8 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
270
270
|
disabled: PropTypes.bool,
|
|
271
271
|
style: PropTypes.any,
|
|
272
272
|
id: PropTypes.string,
|
|
273
|
+
role: PropTypes.string,
|
|
274
|
+
ariaLabel: PropTypes.string,
|
|
273
275
|
ariaLabelledBy: PropTypes.string,
|
|
274
276
|
ariaDescribedBy: PropTypes.string
|
|
275
277
|
};
|
|
@@ -277,7 +279,8 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
277
279
|
* @hidden
|
|
278
280
|
*/
|
|
279
281
|
ColorGradientWithoutContext.defaultProps = {
|
|
280
|
-
opacity: true
|
|
282
|
+
opacity: true,
|
|
283
|
+
role: 'textbox'
|
|
281
284
|
};
|
|
282
285
|
return ColorGradientWithoutContext;
|
|
283
286
|
}(React.Component));
|
|
@@ -115,8 +115,8 @@ 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-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
|
-
React.createElement("div", { className: "k-colorpalette-table-wrap"
|
|
118
|
+
return (React.createElement("div", { id: this.props.id, role: "grid", className: className, onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, "aria-disabled": this.props.ariaDisabled || (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
|
+
React.createElement("div", { className: "k-colorpalette-table-wrap" },
|
|
120
120
|
React.createElement("table", { className: "k-colorpalette-table k-palette", role: "presentation" },
|
|
121
121
|
React.createElement("tbody", { role: "rowgroup" }, this.renderRows(svc.colorRows, selectedCellCoords, focusedCellCoords))))));
|
|
122
122
|
}
|
|
@@ -197,7 +197,7 @@ export var ColorPicker = React.forwardRef(function (directProps, target) {
|
|
|
197
197
|
var onPaletteChangeHandler = React.useCallback(function (event) { return onChangeHandler(event, true); }, [isControlled, onChangeHandler]);
|
|
198
198
|
var dir = useDir(focusableElementRef, props.dir);
|
|
199
199
|
var isValid = valid !== false;
|
|
200
|
-
return (React.createElement("span", { id: props.id, "aria-labelledby": props.ariaLabelledBy, "aria-describedby": props.ariaDescribedBy, className: classNames('k-colorpicker', 'k-picker', 'k-icon-picker', (_a = {},
|
|
200
|
+
return (React.createElement("span", { id: props.id, role: 'combobox', "aria-label": props.ariaLabel, "aria-labelledby": props.ariaLabelledBy, "aria-describedby": props.ariaDescribedBy, "aria-haspopup": 'dialog', "aria-expanded": open, "aria-disabled": disabled ? 'true' : undefined, className: classNames('k-colorpicker', 'k-picker', 'k-icon-picker', (_a = {},
|
|
201
201
|
_a["k-picker-".concat(kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
202
202
|
_a["k-picker-".concat(fillMode)] = fillMode,
|
|
203
203
|
_a["k-rounded-".concat(kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
|
|
@@ -23,6 +23,14 @@ export interface FlatColorPickerProps {
|
|
|
23
23
|
* Sets the `tabIndex` property of the FlatColorPicker.
|
|
24
24
|
*/
|
|
25
25
|
tabIndex?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Represents the label of the FlatColorPicker component.
|
|
28
|
+
*/
|
|
29
|
+
ariaLabel?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Identifies the element(s) which will label the component.
|
|
32
|
+
*/
|
|
33
|
+
ariaLabelledBy?: string;
|
|
26
34
|
/**
|
|
27
35
|
* Determines whether the FlatColorPicker is disabled.
|
|
28
36
|
*/
|
|
@@ -5,7 +5,8 @@ import { ButtonGroup, Button } from '@progress/kendo-react-buttons';
|
|
|
5
5
|
import { paletteIcon, dropletSlashIcon, dropletSliderIcon } from '@progress/kendo-svg-icons';
|
|
6
6
|
import { ColorPalette, ColorGradient } from '../main';
|
|
7
7
|
import { packageMetadata } from '../package-metadata';
|
|
8
|
-
import {
|
|
8
|
+
import { useLocalization } from '@progress/kendo-react-intl';
|
|
9
|
+
import { messages, flatColorPickerApplyBtn, flatColorPickerCancelBtn, flatColorPickerColorGradientBtn, flatColorPickerColorPaletteBtn, flatColorPickerClearBtn } from '../messages';
|
|
9
10
|
;
|
|
10
11
|
;
|
|
11
12
|
/**
|
|
@@ -19,6 +20,7 @@ export var FlatColorPicker = React.forwardRef(function (props, ref) {
|
|
|
19
20
|
var _a = React.useState((props.view || 'ColorGradient') === 'ColorGradient'), colorGradientView = _a[0], setColorGradientView = _a[1];
|
|
20
21
|
var _b = React.useState('rgba(255, 255, 255, 1)'), colorValue = _b[0], setColorValue = _b[1];
|
|
21
22
|
var _c = React.useState('rgba(255, 255, 255, 1)'), prevColor = _c[0], setPrevColor = _c[1];
|
|
23
|
+
var localizationService = useLocalization();
|
|
22
24
|
var focus = React.useCallback(function () {
|
|
23
25
|
if (target.current) {
|
|
24
26
|
target.current.focus();
|
|
@@ -58,7 +60,7 @@ export var FlatColorPicker = React.forwardRef(function (props, ref) {
|
|
|
58
60
|
var handleFlatColorPickerBlur = React.useCallback(function () {
|
|
59
61
|
setPrevColor(colorValue);
|
|
60
62
|
}, [colorValue]);
|
|
61
|
-
return (React.createElement("div", { id: props.id, style: props.style, ref: flatColorPickerRef, tabIndex: getTabIndex(props.tabIndex, props.disabled), className: classNames('k-flatcolorpicker k-coloreditor', {
|
|
63
|
+
return (React.createElement("div", { id: props.id, role: 'textbox', "aria-label": props.ariaLabel, "aria-labelledby": props.ariaLabelledBy, "aria-disabled": props.disabled ? 'true' : undefined, style: props.style, ref: flatColorPickerRef, tabIndex: getTabIndex(props.tabIndex, props.disabled), className: classNames('k-flatcolorpicker k-coloreditor', {
|
|
62
64
|
'k-disabled': props.disabled
|
|
63
65
|
}, props.className), onBlur: handleFlatColorPickerBlur },
|
|
64
66
|
React.createElement(React.Fragment, null,
|
|
@@ -66,19 +68,19 @@ export var FlatColorPicker = React.forwardRef(function (props, ref) {
|
|
|
66
68
|
React.createElement("div", { className: "k-coloreditor-header k-hstack" },
|
|
67
69
|
React.createElement("div", { className: "k-coloreditor-header-actions k-hstack" },
|
|
68
70
|
React.createElement(ButtonGroup, null,
|
|
69
|
-
React.createElement(Button, { type: "button", togglable: true, fillMode: 'flat', selected: colorGradientView, onClick: function () { return handleViewChange('ColorGradient'); }, icon: "droplet-slider", svgIcon: dropletSliderIcon }),
|
|
70
|
-
React.createElement(Button, { type: "button", togglable: true, fillMode: 'flat', selected: !colorGradientView, onClick: function () { return handleViewChange('ColorPalette'); }, icon: "palette", svgIcon: paletteIcon }))),
|
|
71
|
+
React.createElement(Button, { type: "button", "aria-label": localizationService.toLanguageString(flatColorPickerColorGradientBtn, messages[flatColorPickerColorGradientBtn]), togglable: true, fillMode: 'flat', selected: colorGradientView, onClick: function () { return handleViewChange('ColorGradient'); }, icon: "droplet-slider", svgIcon: dropletSliderIcon }),
|
|
72
|
+
React.createElement(Button, { type: "button", "aria-label": localizationService.toLanguageString(flatColorPickerColorPaletteBtn, messages[flatColorPickerColorPaletteBtn]), togglable: true, fillMode: 'flat', selected: !colorGradientView, onClick: function () { return handleViewChange('ColorPalette'); }, icon: "palette", svgIcon: paletteIcon }))),
|
|
71
73
|
React.createElement("div", { className: "k-spacer" }),
|
|
72
74
|
React.createElement("div", { className: "k-coloreditor-header-actions k-hstack" },
|
|
73
75
|
(props.showClearButton && defaultProps.showClearButton) &&
|
|
74
|
-
React.createElement(Button, { type: "button", fillMode: 'flat', onClick: handleResetColor, icon: "droplet-slash", svgIcon: dropletSlashIcon }),
|
|
76
|
+
React.createElement(Button, { type: "button", fillMode: 'flat', onClick: handleResetColor, "aria-label": localizationService.toLanguageString(flatColorPickerClearBtn, messages[flatColorPickerClearBtn]), icon: "droplet-slash", svgIcon: dropletSlashIcon }),
|
|
75
77
|
(props.showPreview && defaultProps.showPreview) &&
|
|
76
78
|
React.createElement("div", { className: "k-coloreditor-preview k-vstack" },
|
|
77
79
|
React.createElement("span", { className: "k-coloreditor-preview-color k-color-preview", style: { background: colorValue } }),
|
|
78
80
|
React.createElement("span", { className: "k-coloreditor-current-color k-color-preview", style: { background: prevColor }, onClick: handlePrevColorClick })))),
|
|
79
81
|
React.createElement("div", { className: "k-coloreditor-views k-vstack" }, colorGradientView
|
|
80
|
-
? React.createElement(ColorGradient, { ref: colorGradientRef, value: colorValue, onChange: handleColorChange, onFocus: handleFocus })
|
|
81
|
-
: React.createElement(ColorPalette, { value: colorValue, onChange: handleColorChange, onFocus: handleFocus })),
|
|
82
|
+
? React.createElement(ColorGradient, { ref: colorGradientRef, role: "none", tabIndex: -1, ariaLabel: undefined, value: colorValue, onChange: handleColorChange, onFocus: handleFocus })
|
|
83
|
+
: React.createElement(ColorPalette, { ariaDisabled: true, ariaLabelledBy: 'required_label', value: colorValue, onChange: handleColorChange, onFocus: handleFocus })),
|
|
82
84
|
(props.showButtons && defaultProps.showButtons) &&
|
|
83
85
|
React.createElement("div", { className: "k-coloreditor-footer k-actions k-actions-end" },
|
|
84
86
|
React.createElement(Button, { type: "button", className: "k-coloreditor-cancel", onClick: handleCancelBtnClick }, messages[flatColorPickerCancelBtn]),
|
|
@@ -12,6 +12,10 @@ export interface ColorGradientProps {
|
|
|
12
12
|
* The value of the ColorGradient.
|
|
13
13
|
*/
|
|
14
14
|
value?: string;
|
|
15
|
+
/**
|
|
16
|
+
* @hidden
|
|
17
|
+
*/
|
|
18
|
+
role?: string;
|
|
15
19
|
/**
|
|
16
20
|
* Determines the event handler that will be fired when the user edits the value.
|
|
17
21
|
*/
|
|
@@ -65,8 +69,20 @@ export interface ColorGradientProps {
|
|
|
65
69
|
* For example these elements could contain error or hint message.
|
|
66
70
|
*/
|
|
67
71
|
ariaDescribedBy?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Represents the label of the `hsv` drag handle component used inside the ColorGradient.
|
|
74
|
+
*/
|
|
75
|
+
ariaLabelHSV?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Represent the label of the component.
|
|
78
|
+
*/
|
|
79
|
+
ariaLabel?: string;
|
|
68
80
|
/**
|
|
69
81
|
* Identifies the element(s) which will label the component.
|
|
70
82
|
*/
|
|
71
83
|
ariaLabelledBy?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Represents the text rendered inside the `hsv` drag handle.
|
|
86
|
+
*/
|
|
87
|
+
ariaValueText?: string;
|
|
72
88
|
}
|
|
@@ -64,6 +64,10 @@ export interface ColorPaletteProps {
|
|
|
64
64
|
* Identifies the element(s) which will label the component.
|
|
65
65
|
*/
|
|
66
66
|
ariaLabelledBy?: string;
|
|
67
|
+
/**
|
|
68
|
+
* @hidden
|
|
69
|
+
*/
|
|
70
|
+
ariaDisabled?: boolean;
|
|
67
71
|
/**
|
|
68
72
|
* Determines the event handler that will be fired when the user edits the value.
|
|
69
73
|
*/
|
|
@@ -97,6 +97,10 @@ export interface ColorPickerProps {
|
|
|
97
97
|
* Identifies the element(s) which will label the component.
|
|
98
98
|
*/
|
|
99
99
|
ariaLabelledBy?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Represent the label of the component.
|
|
102
|
+
*/
|
|
103
|
+
ariaLabel?: string;
|
|
100
104
|
/**
|
|
101
105
|
* The event handler that will be fired when the user edits the value.
|
|
102
106
|
*/
|
|
@@ -298,7 +298,7 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
298
298
|
_a), this.props.className), style: !this.props.label
|
|
299
299
|
? __assign({ width: this.props.width }, style) : style },
|
|
300
300
|
React.createElement(Prefix, null),
|
|
301
|
-
React.createElement("input", { type: "text", autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", spellCheck: false, className: "k-input-inner", value: this.value, id: inputId, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, name: this.props.name, tabIndex: getTabIndex(this.props.tabIndex, this.props.disabled, true), accessKey: this.props.accessKey, title: this.props.title, disabled: this.props.disabled || undefined, readOnly: this.props.readonly || undefined, placeholder: this.props.placeholder, ref: function (input) { return _this._input = input; }, onChange: this.onChangeHandler, onPaste: this.pasteHandler, onFocus: this.focusHandler, onBlur: this.blurHandler, onDragStart: returnFalse, onDrop: returnFalse }),
|
|
301
|
+
React.createElement("input", { type: "text", autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", spellCheck: false, className: "k-input-inner", value: this.value, id: inputId, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, "aria-placeholder": this.props.mask, name: this.props.name, tabIndex: getTabIndex(this.props.tabIndex, this.props.disabled, true), accessKey: this.props.accessKey, title: this.props.title, disabled: this.props.disabled || undefined, readOnly: this.props.readonly || undefined, placeholder: this.props.placeholder, ref: function (input) { return _this._input = input; }, onChange: this.onChangeHandler, onPaste: this.pasteHandler, onFocus: this.focusHandler, onBlur: this.blurHandler, onDragStart: returnFalse, onDrop: returnFalse }),
|
|
302
302
|
React.createElement(Suffix, null)));
|
|
303
303
|
return this.props.label
|
|
304
304
|
? (React.createElement(FloatingLabel, { label: this.props.label, editorId: inputId, editorValue: this.value, editorValid: isValid, editorDisabled: this.props.disabled, editorPlaceholder: this.props.placeholder, children: component, style: { width: this.props.width }, dir: this.props.dir }))
|
|
@@ -78,6 +78,18 @@ export declare const flatColorPickerCancelBtn = "flatColorPicker.cancelBtn";
|
|
|
78
78
|
* @hidden
|
|
79
79
|
*/
|
|
80
80
|
export declare const flatColorPickerApplyBtn = "flatColorPicker.applyBtn";
|
|
81
|
+
/**
|
|
82
|
+
* @hidden
|
|
83
|
+
*/
|
|
84
|
+
export declare const flatColorPickerColorGradientBtn = "flatColorPicker.colorGradientBtn";
|
|
85
|
+
/**
|
|
86
|
+
* @hidden
|
|
87
|
+
*/
|
|
88
|
+
export declare const flatColorPickerColorPaletteBtn = "flatColorPicker.colorPaletteBtn";
|
|
89
|
+
/**
|
|
90
|
+
* @hidden
|
|
91
|
+
*/
|
|
92
|
+
export declare const flatColorPickerClearBtn = "flatColorPicker.clearBtn";
|
|
81
93
|
/**
|
|
82
94
|
* @hidden
|
|
83
95
|
*/
|
|
@@ -138,6 +150,9 @@ export declare const messages: {
|
|
|
138
150
|
"colorGradient.toggleInputsButton": string;
|
|
139
151
|
"flatColorPicker.cancelBtn": string;
|
|
140
152
|
"flatColorPicker.applyBtn": string;
|
|
153
|
+
"flatColorPicker.colorGradientBtn": string;
|
|
154
|
+
"flatColorPicker.colorPaletteBtn": string;
|
|
155
|
+
"flatColorPicker.clearBtn": string;
|
|
141
156
|
"checkbox.validation": string;
|
|
142
157
|
"checkbox.optionalText": string;
|
|
143
158
|
"radioButton.validation": string;
|
|
@@ -79,6 +79,18 @@ export var flatColorPickerCancelBtn = 'flatColorPicker.cancelBtn';
|
|
|
79
79
|
* @hidden
|
|
80
80
|
*/
|
|
81
81
|
export var flatColorPickerApplyBtn = 'flatColorPicker.applyBtn';
|
|
82
|
+
/**
|
|
83
|
+
* @hidden
|
|
84
|
+
*/
|
|
85
|
+
export var flatColorPickerColorGradientBtn = 'flatColorPicker.colorGradientBtn';
|
|
86
|
+
/**
|
|
87
|
+
* @hidden
|
|
88
|
+
*/
|
|
89
|
+
export var flatColorPickerColorPaletteBtn = 'flatColorPicker.colorPaletteBtn';
|
|
90
|
+
/**
|
|
91
|
+
* @hidden
|
|
92
|
+
*/
|
|
93
|
+
export var flatColorPickerClearBtn = 'flatColorPicker.clearBtn';
|
|
82
94
|
/**
|
|
83
95
|
* @hidden
|
|
84
96
|
*/
|
|
@@ -139,6 +151,9 @@ export var messages = (_a = {},
|
|
|
139
151
|
_a[colorGradientToggleInputsButton] = 'Toggle colorgradient inputs',
|
|
140
152
|
_a[flatColorPickerCancelBtn] = 'Cancel',
|
|
141
153
|
_a[flatColorPickerApplyBtn] = 'Apply',
|
|
154
|
+
_a[flatColorPickerColorGradientBtn] = 'Color Gradient view',
|
|
155
|
+
_a[flatColorPickerColorPaletteBtn] = 'Color Palette view',
|
|
156
|
+
_a[flatColorPickerClearBtn] = 'Clear color value',
|
|
142
157
|
_a[checkboxValidation] = 'Please check this box if you want to proceed!',
|
|
143
158
|
_a[checkboxOptionalText] = '(Optional)',
|
|
144
159
|
_a[radioButtonValidation] = 'Please select option if you want to proceed!',
|
|
@@ -274,7 +274,7 @@ export var NumericTextBox = React.forwardRef(function (directProps, target) {
|
|
|
274
274
|
_a['k-disabled'] = props.disabled,
|
|
275
275
|
_a), props.className), "aria-disabled": props.disabled ? 'true' : undefined },
|
|
276
276
|
React.createElement(Prefix, null),
|
|
277
|
-
React.createElement("input", { value: looseValue === null ? '' : looseValue, tabIndex: getTabIndex(props.tabIndex, props.disabled), accessKey: props.accessKey, disabled: props.disabled, title: props.title, "aria-valuemin": props.min, "aria-valuemax": props.max, "aria-label": props.ariaLabel, "aria-labelledby": props.ariaLabelledBy, "aria-describedby": props.ariaDescribedBy, placeholder: props.placeholder, spellCheck: false, autoComplete: 'off', autoCorrect: 'off', type: props.inputType || 'tel', className: 'k-input-inner', id: inputId, name: props.name, readOnly: props.readOnly, style: props.inputStyle, onChange: onChangeHandler, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onPaste: onPasteHandler, onWheel: onWheelHandler, ref: elementRef }),
|
|
277
|
+
React.createElement("input", { role: 'spinbutton', value: looseValue === null ? '' : looseValue, tabIndex: getTabIndex(props.tabIndex, props.disabled), accessKey: props.accessKey, disabled: props.disabled, title: props.title, "aria-disabled": props.disabled ? 'true' : undefined, "aria-valuemin": props.min, "aria-valuemax": props.max, "aria-label": props.ariaLabel, "aria-labelledby": props.ariaLabelledBy, "aria-describedby": props.ariaDescribedBy, placeholder: props.placeholder, spellCheck: false, autoComplete: 'off', autoCorrect: 'off', type: props.inputType || 'tel', className: 'k-input-inner', id: inputId, name: props.name, readOnly: props.readOnly, style: props.inputStyle, onChange: onChangeHandler, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onPaste: onPasteHandler, onWheel: onWheelHandler, ref: elementRef }),
|
|
278
278
|
React.createElement(Suffix, null),
|
|
279
279
|
props.children,
|
|
280
280
|
props.spinners &&
|
|
@@ -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: 1673462421,
|
|
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
|
};
|
package/dist/es/switch/Switch.js
CHANGED
|
@@ -252,16 +252,18 @@ var SwitchWithoutContext = /** @class */ (function (_super) {
|
|
|
252
252
|
_a), this.props.className);
|
|
253
253
|
var ariaAttributes = {
|
|
254
254
|
'aria-checked': this.value,
|
|
255
|
-
'aria-disabled': disabled || undefined
|
|
255
|
+
'aria-disabled': disabled || undefined,
|
|
256
|
+
'aria-labelledby': this.props.ariaLabelledBy,
|
|
257
|
+
'aria-describedby': this.props.ariaDescribedBy
|
|
256
258
|
};
|
|
257
|
-
return (React.createElement("span", { ref: function (span) {
|
|
259
|
+
return (React.createElement("span", __assign({ ref: function (span) {
|
|
258
260
|
_this._wrapper = span;
|
|
259
|
-
}, className: switchClassName, dir: this.dir, onKeyDown: this.handleKeyDown, onClick: this.handleClick, onBlur: this.handleWrapperBlur, onFocus: this.handleWrapperFocus },
|
|
260
|
-
React.createElement("span",
|
|
261
|
+
}, role: 'switch' }, ariaAttributes, { className: switchClassName, dir: this.dir, onKeyDown: this.handleKeyDown, onClick: this.handleClick, onBlur: this.handleWrapperBlur, onFocus: this.handleWrapperFocus }),
|
|
262
|
+
React.createElement("span", { className: classNames('k-switch-track', (_b = {},
|
|
261
263
|
_b["k-rounded-".concat(kendoThemeMaps.roundedMap[trackRounded] || trackRounded)] = trackRounded,
|
|
262
|
-
_b)), id: id || this._id,
|
|
264
|
+
_b)), id: id || this._id, ref: function (span) {
|
|
263
265
|
_this._element = span;
|
|
264
|
-
}, tabIndex: getTabIndex(tabIndex, disabled, undefined), accessKey: this.props.accessKey }
|
|
266
|
+
}, tabIndex: getTabIndex(tabIndex, disabled, undefined), accessKey: this.props.accessKey },
|
|
265
267
|
this.dummyInput(this.value),
|
|
266
268
|
React.createElement("span", { className: 'k-switch-label-on' }, onLabel),
|
|
267
269
|
React.createElement("span", { className: 'k-switch-label-off' }, offLabel)),
|
|
@@ -111,7 +111,7 @@ export var TextArea = React.forwardRef(function (directProps, target) {
|
|
|
111
111
|
dispatchEvent(onBlur, event, getImperativeHandle(), undefined);
|
|
112
112
|
}
|
|
113
113
|
}, [onBlur, disabled]);
|
|
114
|
-
var textAreaProps = __assign(__assign({ id: id || calculatedId, name: name, className: 'k-input-inner !k-overflow-auto', ref: elementRef, disabled: disabled, rows: rows, placeholder: placeholder, readOnly: readOnly, required: required, tabIndex: getTabIndex(tabIndex, disabled), style: autoSize ? { resize: 'none', overflow: 'hidden', height: textAreaHeight } : {}, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-multiline': true, 'aria-disabled': disabled || undefined, value: isControlled ? value : stateValue }, others), { onChange: handleChange, onFocus: handleFocus, onBlur: handleBlur });
|
|
114
|
+
var textAreaProps = __assign(__assign({ id: id || calculatedId, role: 'textbox', name: name, className: 'k-input-inner !k-overflow-auto', ref: elementRef, disabled: disabled, rows: rows, placeholder: placeholder, readOnly: readOnly, required: required, tabIndex: getTabIndex(tabIndex, disabled), style: autoSize ? { resize: 'none', overflow: 'hidden', height: textAreaHeight } : {}, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-multiline': true, 'aria-disabled': disabled || undefined, value: isControlled ? value : stateValue }, others), { onChange: handleChange, onFocus: handleFocus, onBlur: handleBlur });
|
|
115
115
|
return (React.createElement("span", { className: classNames('k-input', 'k-textarea', (_a = {},
|
|
116
116
|
_a["k-input-".concat(kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
117
117
|
_a["k-input-".concat(fillMode)] = fillMode,
|
|
@@ -32,6 +32,8 @@ export declare class ColorGradientWithoutContext extends React.Component<ColorGr
|
|
|
32
32
|
disabled: PropTypes.Requireable<boolean>;
|
|
33
33
|
style: PropTypes.Requireable<any>;
|
|
34
34
|
id: PropTypes.Requireable<string>;
|
|
35
|
+
role: PropTypes.Requireable<string>;
|
|
36
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
35
37
|
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
36
38
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
37
39
|
};
|
|
@@ -40,6 +42,7 @@ export declare class ColorGradientWithoutContext extends React.Component<ColorGr
|
|
|
40
42
|
*/
|
|
41
43
|
static defaultProps: {
|
|
42
44
|
opacity: boolean;
|
|
45
|
+
role: string;
|
|
43
46
|
};
|
|
44
47
|
/**
|
|
45
48
|
* @hidden
|
|
@@ -176,7 +176,7 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
176
176
|
style.top = "".concat(top_1, "px");
|
|
177
177
|
style.left = "".concat(left, "px");
|
|
178
178
|
}
|
|
179
|
-
return React.createElement("div", { className: "k-hsv-draghandle k-draghandle", style: style });
|
|
179
|
+
return (React.createElement("div", { role: 'slider', tabIndex: (0, kendo_react_common_1.getTabIndex)(this.props.tabIndex, this.props.disabled), "aria-valuetext": this.props.ariaValueText, "aria-valuenow": parseInt(this.state.hex.substring(1), 16), "aria-label": this.props.ariaLabelHSV, "aria-orientation": undefined, "aria-disabled": this.props.disabled ? 'true' : undefined, className: "k-hsv-draghandle k-draghandle", style: style }));
|
|
180
180
|
};
|
|
181
181
|
/**
|
|
182
182
|
* @hidden
|
|
@@ -245,7 +245,7 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
245
245
|
var _this = this;
|
|
246
246
|
var lS = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
247
247
|
var className = (0, kendo_react_common_1.classNames)('k-colorgradient', { 'k-disabled': this.props.disabled });
|
|
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 },
|
|
248
|
+
return (React.createElement("div", { id: this.props.id, role: this.props.role, 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-label": this.props.ariaLabel, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, onFocus: this.onFocus },
|
|
249
249
|
React.createElement("div", { className: "k-colorgradient-canvas k-hstack" },
|
|
250
250
|
React.createElement("div", { className: "k-hsv-rectangle", style: { background: this.state.backgroundColor } },
|
|
251
251
|
React.createElement(kendo_react_common_1.Draggable, { onDrag: this.onDrag, onRelease: this.onRelease, ref: function (el) { return _this.gradientWrapper = el ? el.element : undefined; } },
|
|
@@ -273,6 +273,8 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
273
273
|
disabled: PropTypes.bool,
|
|
274
274
|
style: PropTypes.any,
|
|
275
275
|
id: PropTypes.string,
|
|
276
|
+
role: PropTypes.string,
|
|
277
|
+
ariaLabel: PropTypes.string,
|
|
276
278
|
ariaLabelledBy: PropTypes.string,
|
|
277
279
|
ariaDescribedBy: PropTypes.string
|
|
278
280
|
};
|
|
@@ -280,7 +282,8 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
280
282
|
* @hidden
|
|
281
283
|
*/
|
|
282
284
|
ColorGradientWithoutContext.defaultProps = {
|
|
283
|
-
opacity: true
|
|
285
|
+
opacity: true,
|
|
286
|
+
role: 'textbox'
|
|
284
287
|
};
|
|
285
288
|
return ColorGradientWithoutContext;
|
|
286
289
|
}(React.Component));
|
|
@@ -118,8 +118,8 @@ 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-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
|
-
React.createElement("div", { className: "k-colorpalette-table-wrap"
|
|
121
|
+
return (React.createElement("div", { id: this.props.id, role: "grid", className: className, onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, "aria-disabled": this.props.ariaDisabled || (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
|
+
React.createElement("div", { className: "k-colorpalette-table-wrap" },
|
|
123
123
|
React.createElement("table", { className: "k-colorpalette-table k-palette", role: "presentation" },
|
|
124
124
|
React.createElement("tbody", { role: "rowgroup" }, this.renderRows(svc.colorRows, selectedCellCoords, focusedCellCoords))))));
|
|
125
125
|
}
|
|
@@ -200,7 +200,7 @@ exports.ColorPicker = React.forwardRef(function (directProps, target) {
|
|
|
200
200
|
var onPaletteChangeHandler = React.useCallback(function (event) { return onChangeHandler(event, true); }, [isControlled, onChangeHandler]);
|
|
201
201
|
var dir = (0, kendo_react_common_1.useDir)(focusableElementRef, props.dir);
|
|
202
202
|
var isValid = valid !== false;
|
|
203
|
-
return (React.createElement("span", { id: props.id, "aria-labelledby": props.ariaLabelledBy, "aria-describedby": props.ariaDescribedBy, className: (0, kendo_react_common_1.classNames)('k-colorpicker', 'k-picker', 'k-icon-picker', (_a = {},
|
|
203
|
+
return (React.createElement("span", { id: props.id, role: 'combobox', "aria-label": props.ariaLabel, "aria-labelledby": props.ariaLabelledBy, "aria-describedby": props.ariaDescribedBy, "aria-haspopup": 'dialog', "aria-expanded": open, "aria-disabled": disabled ? 'true' : undefined, className: (0, kendo_react_common_1.classNames)('k-colorpicker', 'k-picker', 'k-icon-picker', (_a = {},
|
|
204
204
|
_a["k-picker-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
205
205
|
_a["k-picker-".concat(fillMode)] = fillMode,
|
|
206
206
|
_a["k-rounded-".concat(kendo_react_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
|
|
@@ -23,6 +23,14 @@ export interface FlatColorPickerProps {
|
|
|
23
23
|
* Sets the `tabIndex` property of the FlatColorPicker.
|
|
24
24
|
*/
|
|
25
25
|
tabIndex?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Represents the label of the FlatColorPicker component.
|
|
28
|
+
*/
|
|
29
|
+
ariaLabel?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Identifies the element(s) which will label the component.
|
|
32
|
+
*/
|
|
33
|
+
ariaLabelledBy?: string;
|
|
26
34
|
/**
|
|
27
35
|
* Determines whether the FlatColorPicker is disabled.
|
|
28
36
|
*/
|
|
@@ -8,6 +8,7 @@ var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
|
|
|
8
8
|
var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
|
|
9
9
|
var main_1 = require("../main");
|
|
10
10
|
var package_metadata_1 = require("../package-metadata");
|
|
11
|
+
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
11
12
|
var messages_1 = require("../messages");
|
|
12
13
|
;
|
|
13
14
|
;
|
|
@@ -22,6 +23,7 @@ exports.FlatColorPicker = React.forwardRef(function (props, ref) {
|
|
|
22
23
|
var _a = React.useState((props.view || 'ColorGradient') === 'ColorGradient'), colorGradientView = _a[0], setColorGradientView = _a[1];
|
|
23
24
|
var _b = React.useState('rgba(255, 255, 255, 1)'), colorValue = _b[0], setColorValue = _b[1];
|
|
24
25
|
var _c = React.useState('rgba(255, 255, 255, 1)'), prevColor = _c[0], setPrevColor = _c[1];
|
|
26
|
+
var localizationService = (0, kendo_react_intl_1.useLocalization)();
|
|
25
27
|
var focus = React.useCallback(function () {
|
|
26
28
|
if (target.current) {
|
|
27
29
|
target.current.focus();
|
|
@@ -61,7 +63,7 @@ exports.FlatColorPicker = React.forwardRef(function (props, ref) {
|
|
|
61
63
|
var handleFlatColorPickerBlur = React.useCallback(function () {
|
|
62
64
|
setPrevColor(colorValue);
|
|
63
65
|
}, [colorValue]);
|
|
64
|
-
return (React.createElement("div", { id: props.id, style: props.style, ref: flatColorPickerRef, tabIndex: (0, kendo_react_common_1.getTabIndex)(props.tabIndex, props.disabled), className: (0, kendo_react_common_1.classNames)('k-flatcolorpicker k-coloreditor', {
|
|
66
|
+
return (React.createElement("div", { id: props.id, role: 'textbox', "aria-label": props.ariaLabel, "aria-labelledby": props.ariaLabelledBy, "aria-disabled": props.disabled ? 'true' : undefined, style: props.style, ref: flatColorPickerRef, tabIndex: (0, kendo_react_common_1.getTabIndex)(props.tabIndex, props.disabled), className: (0, kendo_react_common_1.classNames)('k-flatcolorpicker k-coloreditor', {
|
|
65
67
|
'k-disabled': props.disabled
|
|
66
68
|
}, props.className), onBlur: handleFlatColorPickerBlur },
|
|
67
69
|
React.createElement(React.Fragment, null,
|
|
@@ -69,19 +71,19 @@ exports.FlatColorPicker = React.forwardRef(function (props, ref) {
|
|
|
69
71
|
React.createElement("div", { className: "k-coloreditor-header k-hstack" },
|
|
70
72
|
React.createElement("div", { className: "k-coloreditor-header-actions k-hstack" },
|
|
71
73
|
React.createElement(kendo_react_buttons_1.ButtonGroup, null,
|
|
72
|
-
React.createElement(kendo_react_buttons_1.Button, { type: "button", togglable: true, fillMode: 'flat', selected: colorGradientView, onClick: function () { return handleViewChange('ColorGradient'); }, icon: "droplet-slider", svgIcon: kendo_svg_icons_1.dropletSliderIcon }),
|
|
73
|
-
React.createElement(kendo_react_buttons_1.Button, { type: "button", togglable: true, fillMode: 'flat', selected: !colorGradientView, onClick: function () { return handleViewChange('ColorPalette'); }, icon: "palette", svgIcon: kendo_svg_icons_1.paletteIcon }))),
|
|
74
|
+
React.createElement(kendo_react_buttons_1.Button, { type: "button", "aria-label": localizationService.toLanguageString(messages_1.flatColorPickerColorGradientBtn, messages_1.messages[messages_1.flatColorPickerColorGradientBtn]), togglable: true, fillMode: 'flat', selected: colorGradientView, onClick: function () { return handleViewChange('ColorGradient'); }, icon: "droplet-slider", svgIcon: kendo_svg_icons_1.dropletSliderIcon }),
|
|
75
|
+
React.createElement(kendo_react_buttons_1.Button, { type: "button", "aria-label": localizationService.toLanguageString(messages_1.flatColorPickerColorPaletteBtn, messages_1.messages[messages_1.flatColorPickerColorPaletteBtn]), togglable: true, fillMode: 'flat', selected: !colorGradientView, onClick: function () { return handleViewChange('ColorPalette'); }, icon: "palette", svgIcon: kendo_svg_icons_1.paletteIcon }))),
|
|
74
76
|
React.createElement("div", { className: "k-spacer" }),
|
|
75
77
|
React.createElement("div", { className: "k-coloreditor-header-actions k-hstack" },
|
|
76
78
|
(props.showClearButton && defaultProps.showClearButton) &&
|
|
77
|
-
React.createElement(kendo_react_buttons_1.Button, { type: "button", fillMode: 'flat', onClick: handleResetColor, icon: "droplet-slash", svgIcon: kendo_svg_icons_1.dropletSlashIcon }),
|
|
79
|
+
React.createElement(kendo_react_buttons_1.Button, { type: "button", fillMode: 'flat', onClick: handleResetColor, "aria-label": localizationService.toLanguageString(messages_1.flatColorPickerClearBtn, messages_1.messages[messages_1.flatColorPickerClearBtn]), icon: "droplet-slash", svgIcon: kendo_svg_icons_1.dropletSlashIcon }),
|
|
78
80
|
(props.showPreview && defaultProps.showPreview) &&
|
|
79
81
|
React.createElement("div", { className: "k-coloreditor-preview k-vstack" },
|
|
80
82
|
React.createElement("span", { className: "k-coloreditor-preview-color k-color-preview", style: { background: colorValue } }),
|
|
81
83
|
React.createElement("span", { className: "k-coloreditor-current-color k-color-preview", style: { background: prevColor }, onClick: handlePrevColorClick })))),
|
|
82
84
|
React.createElement("div", { className: "k-coloreditor-views k-vstack" }, colorGradientView
|
|
83
|
-
? React.createElement(main_1.ColorGradient, { ref: colorGradientRef, value: colorValue, onChange: handleColorChange, onFocus: handleFocus })
|
|
84
|
-
: React.createElement(main_1.ColorPalette, { value: colorValue, onChange: handleColorChange, onFocus: handleFocus })),
|
|
85
|
+
? React.createElement(main_1.ColorGradient, { ref: colorGradientRef, role: "none", tabIndex: -1, ariaLabel: undefined, value: colorValue, onChange: handleColorChange, onFocus: handleFocus })
|
|
86
|
+
: React.createElement(main_1.ColorPalette, { ariaDisabled: true, ariaLabelledBy: 'required_label', value: colorValue, onChange: handleColorChange, onFocus: handleFocus })),
|
|
85
87
|
(props.showButtons && defaultProps.showButtons) &&
|
|
86
88
|
React.createElement("div", { className: "k-coloreditor-footer k-actions k-actions-end" },
|
|
87
89
|
React.createElement(kendo_react_buttons_1.Button, { type: "button", className: "k-coloreditor-cancel", onClick: handleCancelBtnClick }, messages_1.messages[messages_1.flatColorPickerCancelBtn]),
|
|
@@ -12,6 +12,10 @@ export interface ColorGradientProps {
|
|
|
12
12
|
* The value of the ColorGradient.
|
|
13
13
|
*/
|
|
14
14
|
value?: string;
|
|
15
|
+
/**
|
|
16
|
+
* @hidden
|
|
17
|
+
*/
|
|
18
|
+
role?: string;
|
|
15
19
|
/**
|
|
16
20
|
* Determines the event handler that will be fired when the user edits the value.
|
|
17
21
|
*/
|
|
@@ -65,8 +69,20 @@ export interface ColorGradientProps {
|
|
|
65
69
|
* For example these elements could contain error or hint message.
|
|
66
70
|
*/
|
|
67
71
|
ariaDescribedBy?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Represents the label of the `hsv` drag handle component used inside the ColorGradient.
|
|
74
|
+
*/
|
|
75
|
+
ariaLabelHSV?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Represent the label of the component.
|
|
78
|
+
*/
|
|
79
|
+
ariaLabel?: string;
|
|
68
80
|
/**
|
|
69
81
|
* Identifies the element(s) which will label the component.
|
|
70
82
|
*/
|
|
71
83
|
ariaLabelledBy?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Represents the text rendered inside the `hsv` drag handle.
|
|
86
|
+
*/
|
|
87
|
+
ariaValueText?: string;
|
|
72
88
|
}
|
|
@@ -64,6 +64,10 @@ export interface ColorPaletteProps {
|
|
|
64
64
|
* Identifies the element(s) which will label the component.
|
|
65
65
|
*/
|
|
66
66
|
ariaLabelledBy?: string;
|
|
67
|
+
/**
|
|
68
|
+
* @hidden
|
|
69
|
+
*/
|
|
70
|
+
ariaDisabled?: boolean;
|
|
67
71
|
/**
|
|
68
72
|
* Determines the event handler that will be fired when the user edits the value.
|
|
69
73
|
*/
|
|
@@ -97,6 +97,10 @@ export interface ColorPickerProps {
|
|
|
97
97
|
* Identifies the element(s) which will label the component.
|
|
98
98
|
*/
|
|
99
99
|
ariaLabelledBy?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Represent the label of the component.
|
|
102
|
+
*/
|
|
103
|
+
ariaLabel?: string;
|
|
100
104
|
/**
|
|
101
105
|
* The event handler that will be fired when the user edits the value.
|
|
102
106
|
*/
|
|
@@ -301,7 +301,7 @@ var MaskedTextBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
301
301
|
_a), this.props.className), style: !this.props.label
|
|
302
302
|
? __assign({ width: this.props.width }, style) : style },
|
|
303
303
|
React.createElement(Prefix, null),
|
|
304
|
-
React.createElement("input", { type: "text", autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", spellCheck: false, className: "k-input-inner", value: this.value, id: inputId, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, name: this.props.name, tabIndex: (0, kendo_react_common_1.getTabIndex)(this.props.tabIndex, this.props.disabled, true), accessKey: this.props.accessKey, title: this.props.title, disabled: this.props.disabled || undefined, readOnly: this.props.readonly || undefined, placeholder: this.props.placeholder, ref: function (input) { return _this._input = input; }, onChange: this.onChangeHandler, onPaste: this.pasteHandler, onFocus: this.focusHandler, onBlur: this.blurHandler, onDragStart: utils_1.returnFalse, onDrop: utils_1.returnFalse }),
|
|
304
|
+
React.createElement("input", { type: "text", autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", spellCheck: false, className: "k-input-inner", value: this.value, id: inputId, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, "aria-placeholder": this.props.mask, name: this.props.name, tabIndex: (0, kendo_react_common_1.getTabIndex)(this.props.tabIndex, this.props.disabled, true), accessKey: this.props.accessKey, title: this.props.title, disabled: this.props.disabled || undefined, readOnly: this.props.readonly || undefined, placeholder: this.props.placeholder, ref: function (input) { return _this._input = input; }, onChange: this.onChangeHandler, onPaste: this.pasteHandler, onFocus: this.focusHandler, onBlur: this.blurHandler, onDragStart: utils_1.returnFalse, onDrop: utils_1.returnFalse }),
|
|
305
305
|
React.createElement(Suffix, null)));
|
|
306
306
|
return this.props.label
|
|
307
307
|
? (React.createElement(kendo_react_labels_1.FloatingLabel, { label: this.props.label, editorId: inputId, editorValue: this.value, editorValid: isValid, editorDisabled: this.props.disabled, editorPlaceholder: this.props.placeholder, children: component, style: { width: this.props.width }, dir: this.props.dir }))
|
|
@@ -78,6 +78,18 @@ export declare const flatColorPickerCancelBtn = "flatColorPicker.cancelBtn";
|
|
|
78
78
|
* @hidden
|
|
79
79
|
*/
|
|
80
80
|
export declare const flatColorPickerApplyBtn = "flatColorPicker.applyBtn";
|
|
81
|
+
/**
|
|
82
|
+
* @hidden
|
|
83
|
+
*/
|
|
84
|
+
export declare const flatColorPickerColorGradientBtn = "flatColorPicker.colorGradientBtn";
|
|
85
|
+
/**
|
|
86
|
+
* @hidden
|
|
87
|
+
*/
|
|
88
|
+
export declare const flatColorPickerColorPaletteBtn = "flatColorPicker.colorPaletteBtn";
|
|
89
|
+
/**
|
|
90
|
+
* @hidden
|
|
91
|
+
*/
|
|
92
|
+
export declare const flatColorPickerClearBtn = "flatColorPicker.clearBtn";
|
|
81
93
|
/**
|
|
82
94
|
* @hidden
|
|
83
95
|
*/
|
|
@@ -138,6 +150,9 @@ export declare const messages: {
|
|
|
138
150
|
"colorGradient.toggleInputsButton": string;
|
|
139
151
|
"flatColorPicker.cancelBtn": string;
|
|
140
152
|
"flatColorPicker.applyBtn": string;
|
|
153
|
+
"flatColorPicker.colorGradientBtn": string;
|
|
154
|
+
"flatColorPicker.colorPaletteBtn": string;
|
|
155
|
+
"flatColorPicker.clearBtn": string;
|
|
141
156
|
"checkbox.validation": string;
|
|
142
157
|
"checkbox.optionalText": string;
|
|
143
158
|
"radioButton.validation": string;
|