@progress/kendo-react-inputs 5.13.0-dev.202304211031 → 5.13.0-dev.202304251156
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 +2 -0
- package/dist/es/colors/ColorGradient.js +4 -2
- package/dist/es/colors/ColorInput.d.ts +5 -4
- package/dist/es/colors/ColorInput.js +3 -5
- package/dist/es/colors/FlatColorPicker.d.ts +13 -1
- package/dist/es/colors/FlatColorPicker.js +3 -1
- package/dist/es/colors/interfaces/ColorGradientProps.d.ts +6 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/colors/ColorGradient.d.ts +2 -0
- package/dist/npm/colors/ColorGradient.js +4 -2
- package/dist/npm/colors/ColorInput.d.ts +5 -4
- package/dist/npm/colors/ColorInput.js +3 -5
- package/dist/npm/colors/FlatColorPicker.d.ts +13 -1
- package/dist/npm/colors/FlatColorPicker.js +3 -1
- package/dist/npm/colors/interfaces/ColorGradientProps.d.ts +6 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-react-inputs.js +1 -1
- package/package.json +16 -16
|
@@ -29,6 +29,7 @@ export declare class ColorGradientWithoutContext extends React.Component<ColorGr
|
|
|
29
29
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
30
30
|
opacity: PropTypes.Requireable<boolean>;
|
|
31
31
|
backgroundColor: PropTypes.Requireable<string>;
|
|
32
|
+
format: PropTypes.Requireable<any>;
|
|
32
33
|
disabled: PropTypes.Requireable<boolean>;
|
|
33
34
|
style: PropTypes.Requireable<any>;
|
|
34
35
|
id: PropTypes.Requireable<string>;
|
|
@@ -43,6 +44,7 @@ export declare class ColorGradientWithoutContext extends React.Component<ColorGr
|
|
|
43
44
|
static defaultProps: {
|
|
44
45
|
opacity: boolean;
|
|
45
46
|
role: string;
|
|
47
|
+
format: "rgb" | "hex" | "rgba";
|
|
46
48
|
};
|
|
47
49
|
/**
|
|
48
50
|
* @hidden
|
|
@@ -253,7 +253,7 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
253
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]) }),
|
|
254
254
|
this.props.opacity &&
|
|
255
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; } }))),
|
|
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 }),
|
|
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, defaultInputMode: this.props.format }),
|
|
257
257
|
this.props.backgroundColor && (React.createElement(ColorContrastLabels, { bgColor: getRGBA(this.props.backgroundColor), rgba: this.state.rgba }))));
|
|
258
258
|
};
|
|
259
259
|
ColorGradientWithoutContext.displayName = 'ColorGradient';
|
|
@@ -267,6 +267,7 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
267
267
|
onFocus: PropTypes.func,
|
|
268
268
|
opacity: PropTypes.bool,
|
|
269
269
|
backgroundColor: PropTypes.string,
|
|
270
|
+
format: PropTypes.any,
|
|
270
271
|
disabled: PropTypes.bool,
|
|
271
272
|
style: PropTypes.any,
|
|
272
273
|
id: PropTypes.string,
|
|
@@ -280,7 +281,8 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
280
281
|
*/
|
|
281
282
|
ColorGradientWithoutContext.defaultProps = {
|
|
282
283
|
opacity: true,
|
|
283
|
-
role: 'textbox'
|
|
284
|
+
role: 'textbox',
|
|
285
|
+
format: 'rgb'
|
|
284
286
|
};
|
|
285
287
|
return ColorGradientWithoutContext;
|
|
286
288
|
}(React.Component));
|
|
@@ -11,14 +11,15 @@ export interface ColorInputProps {
|
|
|
11
11
|
onHexChange: any;
|
|
12
12
|
opacity: boolean;
|
|
13
13
|
disabled?: boolean;
|
|
14
|
+
defaultInputMode?: 'rgba' | 'rgb' | 'hex';
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* @hidden
|
|
17
18
|
*/
|
|
18
|
-
export default class ColorInput extends React.Component<ColorInputProps, {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
export default class ColorInput extends React.Component<ColorInputProps, {
|
|
20
|
+
inputMode: string;
|
|
21
|
+
}> {
|
|
22
|
+
constructor(props: ColorInputProps);
|
|
22
23
|
render(): JSX.Element;
|
|
23
24
|
private onRgbaRChange;
|
|
24
25
|
private onRgbaGChange;
|
|
@@ -41,11 +41,8 @@ var modes = ['rgba', 'rgb', 'hex'];
|
|
|
41
41
|
*/
|
|
42
42
|
var ColorInput = /** @class */ (function (_super) {
|
|
43
43
|
__extends(ColorInput, _super);
|
|
44
|
-
function ColorInput() {
|
|
45
|
-
var _this = _super
|
|
46
|
-
_this.state = {
|
|
47
|
-
inputMode: modes[1]
|
|
48
|
-
};
|
|
44
|
+
function ColorInput(props) {
|
|
45
|
+
var _this = _super.call(this, props) || this;
|
|
49
46
|
_this.onRgbaRChange = function (event) {
|
|
50
47
|
_this.dispatchRgbaChange({ r: event.value }, event);
|
|
51
48
|
};
|
|
@@ -58,6 +55,7 @@ var ColorInput = /** @class */ (function (_super) {
|
|
|
58
55
|
_this.onRgbaAChange = function (event) {
|
|
59
56
|
_this.dispatchRgbaChange({ a: event.value }, event);
|
|
60
57
|
};
|
|
58
|
+
_this.state = { inputMode: props.defaultInputMode || modes[1] };
|
|
61
59
|
return _this;
|
|
62
60
|
}
|
|
63
61
|
ColorInput.prototype.render = function () {
|
|
@@ -17,7 +17,7 @@ export interface FlatColorPickerChangeEvent {
|
|
|
17
17
|
nativeEvent: any;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* Represents the properties of [FlatColorPicker](% slug api_inputs_flatcolorpicker %) component.
|
|
20
|
+
* Represents the properties of [FlatColorPicker]({% slug api_inputs_flatcolorpicker %}) component.
|
|
21
21
|
*/
|
|
22
22
|
export interface FlatColorPickerProps {
|
|
23
23
|
/**
|
|
@@ -44,6 +44,18 @@ export interface FlatColorPickerProps {
|
|
|
44
44
|
* The event handler that will be fired when the user edits the value.
|
|
45
45
|
*/
|
|
46
46
|
onChange?: (event: FlatColorPickerChangeEvent) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Specifies whether we should display the opacity slider to allow selection of transparency.
|
|
49
|
+
*
|
|
50
|
+
* @default true
|
|
51
|
+
*/
|
|
52
|
+
opacity?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Sets the default input format in the gradient input editor.
|
|
55
|
+
*
|
|
56
|
+
* @default 'rgb'
|
|
57
|
+
*/
|
|
58
|
+
format?: 'hex' | 'rgba' | 'rgb';
|
|
47
59
|
/**
|
|
48
60
|
* Sets the `tabIndex` property of the FlatColorPicker.
|
|
49
61
|
*/
|
|
@@ -118,7 +118,7 @@ export var FlatColorPicker = React.forwardRef(function (props, ref) {
|
|
|
118
118
|
React.createElement("span", { className: "k-coloreditor-preview-color k-color-preview", style: { background: colorValue } }),
|
|
119
119
|
React.createElement("span", { className: "k-coloreditor-current-color k-color-preview", style: { background: prevColor }, onClick: handlePrevColorClick })))),
|
|
120
120
|
React.createElement("div", { className: "k-coloreditor-views k-vstack" }, colorGradientView
|
|
121
|
-
? React.createElement(ColorGradient, { ref: colorGradientRef, role: "none", tabIndex: -1, ariaLabel: undefined, value: colorValue, onChange: handleColorChange, onFocus: handleFocus })
|
|
121
|
+
? React.createElement(ColorGradient, { ref: colorGradientRef, role: "none", tabIndex: -1, ariaLabel: undefined, value: colorValue, onChange: handleColorChange, onFocus: handleFocus, opacity: props.opacity, format: props.format })
|
|
122
122
|
: React.createElement(ColorPalette, { ariaDisabled: true, ariaLabelledBy: 'required_label', value: colorValue, onChange: handleColorChange, onFocus: handleFocus })),
|
|
123
123
|
showButtons &&
|
|
124
124
|
React.createElement("div", { className: "k-coloreditor-footer k-actions k-actions-end" },
|
|
@@ -132,6 +132,8 @@ var propTypes = {
|
|
|
132
132
|
value: PropTypes.string,
|
|
133
133
|
defaultValue: PropTypes.string,
|
|
134
134
|
onChange: PropTypes.func,
|
|
135
|
+
opacity: PropTypes.bool,
|
|
136
|
+
format: PropTypes.any,
|
|
135
137
|
tabIndex: PropTypes.number,
|
|
136
138
|
ariaLabel: PropTypes.string,
|
|
137
139
|
ariaLabelledBy: PropTypes.string,
|
|
@@ -85,4 +85,10 @@ export interface ColorGradientProps {
|
|
|
85
85
|
* Represents the text rendered inside the `hsv` drag handle.
|
|
86
86
|
*/
|
|
87
87
|
ariaValueText?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Sets the default input format in the gradient input editor.
|
|
90
|
+
*
|
|
91
|
+
* @default 'rgb'
|
|
92
|
+
*/
|
|
93
|
+
format?: 'rgba' | 'rgb' | 'hex';
|
|
88
94
|
}
|
|
@@ -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: 1682422527,
|
|
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
|
};
|
|
@@ -29,6 +29,7 @@ export declare class ColorGradientWithoutContext extends React.Component<ColorGr
|
|
|
29
29
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
30
30
|
opacity: PropTypes.Requireable<boolean>;
|
|
31
31
|
backgroundColor: PropTypes.Requireable<string>;
|
|
32
|
+
format: PropTypes.Requireable<any>;
|
|
32
33
|
disabled: PropTypes.Requireable<boolean>;
|
|
33
34
|
style: PropTypes.Requireable<any>;
|
|
34
35
|
id: PropTypes.Requireable<string>;
|
|
@@ -43,6 +44,7 @@ export declare class ColorGradientWithoutContext extends React.Component<ColorGr
|
|
|
43
44
|
static defaultProps: {
|
|
44
45
|
opacity: boolean;
|
|
45
46
|
role: string;
|
|
47
|
+
format: "rgb" | "hex" | "rgba";
|
|
46
48
|
};
|
|
47
49
|
/**
|
|
48
50
|
* @hidden
|
|
@@ -256,7 +256,7 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
256
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]) }),
|
|
257
257
|
this.props.opacity &&
|
|
258
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; } }))),
|
|
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 }),
|
|
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, defaultInputMode: this.props.format }),
|
|
260
260
|
this.props.backgroundColor && (React.createElement(ColorContrastLabels_1.ColorContrastLabels, { bgColor: (0, color_parser_1.getRGBA)(this.props.backgroundColor), rgba: this.state.rgba }))));
|
|
261
261
|
};
|
|
262
262
|
ColorGradientWithoutContext.displayName = 'ColorGradient';
|
|
@@ -270,6 +270,7 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
270
270
|
onFocus: PropTypes.func,
|
|
271
271
|
opacity: PropTypes.bool,
|
|
272
272
|
backgroundColor: PropTypes.string,
|
|
273
|
+
format: PropTypes.any,
|
|
273
274
|
disabled: PropTypes.bool,
|
|
274
275
|
style: PropTypes.any,
|
|
275
276
|
id: PropTypes.string,
|
|
@@ -283,7 +284,8 @@ var ColorGradientWithoutContext = /** @class */ (function (_super) {
|
|
|
283
284
|
*/
|
|
284
285
|
ColorGradientWithoutContext.defaultProps = {
|
|
285
286
|
opacity: true,
|
|
286
|
-
role: 'textbox'
|
|
287
|
+
role: 'textbox',
|
|
288
|
+
format: 'rgb'
|
|
287
289
|
};
|
|
288
290
|
return ColorGradientWithoutContext;
|
|
289
291
|
}(React.Component));
|
|
@@ -11,14 +11,15 @@ export interface ColorInputProps {
|
|
|
11
11
|
onHexChange: any;
|
|
12
12
|
opacity: boolean;
|
|
13
13
|
disabled?: boolean;
|
|
14
|
+
defaultInputMode?: 'rgba' | 'rgb' | 'hex';
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* @hidden
|
|
17
18
|
*/
|
|
18
|
-
export default class ColorInput extends React.Component<ColorInputProps, {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
export default class ColorInput extends React.Component<ColorInputProps, {
|
|
20
|
+
inputMode: string;
|
|
21
|
+
}> {
|
|
22
|
+
constructor(props: ColorInputProps);
|
|
22
23
|
render(): JSX.Element;
|
|
23
24
|
private onRgbaRChange;
|
|
24
25
|
private onRgbaGChange;
|
|
@@ -43,11 +43,8 @@ var modes = ['rgba', 'rgb', 'hex'];
|
|
|
43
43
|
*/
|
|
44
44
|
var ColorInput = /** @class */ (function (_super) {
|
|
45
45
|
__extends(ColorInput, _super);
|
|
46
|
-
function ColorInput() {
|
|
47
|
-
var _this = _super
|
|
48
|
-
_this.state = {
|
|
49
|
-
inputMode: modes[1]
|
|
50
|
-
};
|
|
46
|
+
function ColorInput(props) {
|
|
47
|
+
var _this = _super.call(this, props) || this;
|
|
51
48
|
_this.onRgbaRChange = function (event) {
|
|
52
49
|
_this.dispatchRgbaChange({ r: event.value }, event);
|
|
53
50
|
};
|
|
@@ -60,6 +57,7 @@ var ColorInput = /** @class */ (function (_super) {
|
|
|
60
57
|
_this.onRgbaAChange = function (event) {
|
|
61
58
|
_this.dispatchRgbaChange({ a: event.value }, event);
|
|
62
59
|
};
|
|
60
|
+
_this.state = { inputMode: props.defaultInputMode || modes[1] };
|
|
63
61
|
return _this;
|
|
64
62
|
}
|
|
65
63
|
ColorInput.prototype.render = function () {
|
|
@@ -17,7 +17,7 @@ export interface FlatColorPickerChangeEvent {
|
|
|
17
17
|
nativeEvent: any;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* Represents the properties of [FlatColorPicker](% slug api_inputs_flatcolorpicker %) component.
|
|
20
|
+
* Represents the properties of [FlatColorPicker]({% slug api_inputs_flatcolorpicker %}) component.
|
|
21
21
|
*/
|
|
22
22
|
export interface FlatColorPickerProps {
|
|
23
23
|
/**
|
|
@@ -44,6 +44,18 @@ export interface FlatColorPickerProps {
|
|
|
44
44
|
* The event handler that will be fired when the user edits the value.
|
|
45
45
|
*/
|
|
46
46
|
onChange?: (event: FlatColorPickerChangeEvent) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Specifies whether we should display the opacity slider to allow selection of transparency.
|
|
49
|
+
*
|
|
50
|
+
* @default true
|
|
51
|
+
*/
|
|
52
|
+
opacity?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Sets the default input format in the gradient input editor.
|
|
55
|
+
*
|
|
56
|
+
* @default 'rgb'
|
|
57
|
+
*/
|
|
58
|
+
format?: 'hex' | 'rgba' | 'rgb';
|
|
47
59
|
/**
|
|
48
60
|
* Sets the `tabIndex` property of the FlatColorPicker.
|
|
49
61
|
*/
|
|
@@ -121,7 +121,7 @@ exports.FlatColorPicker = React.forwardRef(function (props, ref) {
|
|
|
121
121
|
React.createElement("span", { className: "k-coloreditor-preview-color k-color-preview", style: { background: colorValue } }),
|
|
122
122
|
React.createElement("span", { className: "k-coloreditor-current-color k-color-preview", style: { background: prevColor }, onClick: handlePrevColorClick })))),
|
|
123
123
|
React.createElement("div", { className: "k-coloreditor-views k-vstack" }, colorGradientView
|
|
124
|
-
? React.createElement(main_1.ColorGradient, { ref: colorGradientRef, role: "none", tabIndex: -1, ariaLabel: undefined, value: colorValue, onChange: handleColorChange, onFocus: handleFocus })
|
|
124
|
+
? React.createElement(main_1.ColorGradient, { ref: colorGradientRef, role: "none", tabIndex: -1, ariaLabel: undefined, value: colorValue, onChange: handleColorChange, onFocus: handleFocus, opacity: props.opacity, format: props.format })
|
|
125
125
|
: React.createElement(main_1.ColorPalette, { ariaDisabled: true, ariaLabelledBy: 'required_label', value: colorValue, onChange: handleColorChange, onFocus: handleFocus })),
|
|
126
126
|
showButtons &&
|
|
127
127
|
React.createElement("div", { className: "k-coloreditor-footer k-actions k-actions-end" },
|
|
@@ -135,6 +135,8 @@ var propTypes = {
|
|
|
135
135
|
value: PropTypes.string,
|
|
136
136
|
defaultValue: PropTypes.string,
|
|
137
137
|
onChange: PropTypes.func,
|
|
138
|
+
opacity: PropTypes.bool,
|
|
139
|
+
format: PropTypes.any,
|
|
138
140
|
tabIndex: PropTypes.number,
|
|
139
141
|
ariaLabel: PropTypes.string,
|
|
140
142
|
ariaLabelledBy: PropTypes.string,
|
|
@@ -85,4 +85,10 @@ export interface ColorGradientProps {
|
|
|
85
85
|
* Represents the text rendered inside the `hsv` drag handle.
|
|
86
86
|
*/
|
|
87
87
|
ariaValueText?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Sets the default input format in the gradient input editor.
|
|
90
|
+
*
|
|
91
|
+
* @default 'rgb'
|
|
92
|
+
*/
|
|
93
|
+
format?: 'rgba' | 'rgb' | 'hex';
|
|
88
94
|
}
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-inputs',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1682422527,
|
|
12
12
|
version: '',
|
|
13
13
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
14
14
|
};
|