@progress/kendo-vue-inputs 3.4.3 → 3.4.4-dev.202207220925
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-vue-inputs.js +1 -1
- package/dist/es/checkbox/Checkbox.js +1 -1
- package/dist/es/colors/ColorContrastLabels.js +8 -4
- package/dist/es/colors/ColorContrastSvg.js +65 -44
- package/dist/es/colors/ColorGradient.d.ts +1 -1
- package/dist/es/colors/ColorGradient.js +9 -11
- package/dist/es/colors/ColorInput.js +2 -2
- package/dist/es/colors/ColorPalette.js +1 -1
- package/dist/es/colors/ColorPicker.js +1 -1
- package/dist/es/colors/FlatColorPicker.js +1 -1
- package/dist/es/colors/HexInput.js +18 -12
- package/dist/es/colors/Picker.js +1 -1
- package/dist/es/input/Input.js +1 -1
- package/dist/es/input-separator/InputSeparator.js +1 -1
- package/dist/es/maskedtextbox/MaskedTextBox.js +1 -1
- package/dist/es/numerictextbox/NumericTextBox.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/radiobutton/RadioButton.js +1 -1
- package/dist/es/radiobutton/RadioGroup.js +1 -1
- package/dist/es/range-slider/RangeSlider.js +1 -1
- package/dist/es/slider/Slider.js +1 -1
- package/dist/es/slider/SliderLabel.js +1 -1
- package/dist/es/switch/Switch.js +1 -1
- package/dist/es/textarea/TextArea.js +1 -1
- package/dist/npm/checkbox/Checkbox.js +1 -1
- package/dist/npm/colors/ColorContrastLabels.js +8 -4
- package/dist/npm/colors/ColorContrastSvg.js +65 -44
- package/dist/npm/colors/ColorGradient.d.ts +1 -1
- package/dist/npm/colors/ColorGradient.js +9 -11
- package/dist/npm/colors/ColorInput.js +2 -2
- package/dist/npm/colors/ColorPalette.js +1 -1
- package/dist/npm/colors/ColorPicker.js +1 -1
- package/dist/npm/colors/FlatColorPicker.js +1 -1
- package/dist/npm/colors/HexInput.js +16 -10
- package/dist/npm/colors/Picker.js +1 -1
- package/dist/npm/input/Input.js +1 -1
- package/dist/npm/input-separator/InputSeparator.js +1 -1
- package/dist/npm/maskedtextbox/MaskedTextBox.js +1 -1
- package/dist/npm/numerictextbox/NumericTextBox.js +1 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/radiobutton/RadioButton.js +1 -1
- package/dist/npm/radiobutton/RadioGroup.js +1 -1
- package/dist/npm/range-slider/RangeSlider.js +1 -1
- package/dist/npm/slider/Slider.js +1 -1
- package/dist/npm/slider/SliderLabel.js +1 -1
- package/dist/npm/switch/Switch.js +1 -1
- package/dist/npm/textarea/TextArea.js +1 -1
- package/package.json +11 -11
|
@@ -9,7 +9,7 @@ var Vue = require("vue");
|
|
|
9
9
|
|
|
10
10
|
var allVue = Vue;
|
|
11
11
|
var gh = allVue.h;
|
|
12
|
-
var isV3 = allVue.version[0] === '3';
|
|
12
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
13
13
|
|
|
14
14
|
var svg_calc_1 = require("./utils/svg-calc");
|
|
15
15
|
|
|
@@ -38,62 +38,83 @@ var ColorContrastSvgVue2 = {
|
|
|
38
38
|
},
|
|
39
39
|
// @ts-ignore
|
|
40
40
|
render: function render(createElement) {
|
|
41
|
-
var
|
|
41
|
+
var _this = this;
|
|
42
42
|
|
|
43
|
-
var
|
|
44
|
-
var _this = this;
|
|
43
|
+
var h = gh || createElement;
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
var svgPath = function svgPath(points, command) {
|
|
46
|
+
if (points.length === 0) {
|
|
47
|
+
return '';
|
|
48
|
+
} // build the d attributes by looping over the points
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
var d = points.reduce(function (acc, point, i, a) {
|
|
52
|
+
return i === 0 ? // if first point
|
|
53
|
+
"M " + point[0] + "," + point[1] : // else
|
|
54
|
+
acc + " " + command(point, i, a);
|
|
55
|
+
}, '');
|
|
56
|
+
return h("path", {
|
|
57
|
+
d: d,
|
|
58
|
+
attrs: this.v3 ? undefined : {
|
|
59
|
+
d: d,
|
|
60
|
+
fill: "none",
|
|
61
|
+
stroke: "white",
|
|
62
|
+
"stroke-width": "1"
|
|
63
|
+
},
|
|
64
|
+
fill: "none",
|
|
65
|
+
stroke: "white",
|
|
66
|
+
"stroke-width": "1"
|
|
67
|
+
});
|
|
68
|
+
};
|
|
47
69
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
70
|
+
var gradientRectMetrics = this.$props.metrics;
|
|
71
|
+
|
|
72
|
+
var findValue = function findValue(contrast, saturation, low, high, comparer) {
|
|
73
|
+
var mid = (low + high) / 2;
|
|
74
|
+
var hsva = Object.assign({}, _this.$props.hsva, {
|
|
75
|
+
s: saturation / gradientRectMetrics.width,
|
|
76
|
+
v: 1 - mid / gradientRectMetrics.height
|
|
77
|
+
});
|
|
78
|
+
var currentContrast = color_parser_1.getContrastFromTwoRGBAs(color_parser_1.getRGBA(color_parser_1.getColorFromHSV(hsva)), color_parser_1.getRGBA(_this.$props.backgroundColor || ''));
|
|
79
|
+
|
|
80
|
+
if (low + 0.5 > high) {
|
|
81
|
+
if (currentContrast < contrast + 1 && currentContrast > contrast - 1) {
|
|
82
|
+
return mid;
|
|
83
|
+
} else {
|
|
84
|
+
return null;
|
|
62
85
|
}
|
|
86
|
+
}
|
|
63
87
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
88
|
+
if (comparer(currentContrast, contrast)) {
|
|
89
|
+
return findValue(contrast, saturation, low, high - (high - low) / 2, comparer);
|
|
90
|
+
}
|
|
67
91
|
|
|
68
|
-
|
|
69
|
-
|
|
92
|
+
return findValue(contrast, saturation, low + (high - low) / 2, high, comparer);
|
|
93
|
+
};
|
|
70
94
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
95
|
+
var getPaths = function getPaths(contrast, stepCount, reversed) {
|
|
96
|
+
if (reversed === void 0) {
|
|
97
|
+
reversed = false;
|
|
98
|
+
}
|
|
75
99
|
|
|
76
|
-
|
|
100
|
+
var points = [];
|
|
77
101
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
102
|
+
for (var i = 0; i <= gradientRectMetrics.width; i += gradientRectMetrics.width / stepCount) {
|
|
103
|
+
var value = findValue(contrast, i, 0, gradientRectMetrics.height, reversed ? function (a, b) {
|
|
104
|
+
return a < b;
|
|
105
|
+
} : function (a, b) {
|
|
106
|
+
return a > b;
|
|
107
|
+
});
|
|
84
108
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
109
|
+
if (value !== null) {
|
|
110
|
+
points.push([i, value]);
|
|
88
111
|
}
|
|
112
|
+
}
|
|
89
113
|
|
|
90
|
-
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
var bezierCommandCalc = svg_calc_1.bezierCommand(svg_calc_1.controlPoint(svg_calc_1.line));
|
|
94
|
-
return svg_calc_1.svgPath(getPaths(AA_CONTRAST, STEP_COUNT), bezierCommandCalc) + svg_calc_1.svgPath(getPaths(AA_CONTRAST, STEP_COUNT, true), bezierCommandCalc) + svg_calc_1.svgPath(getPaths(AAA_CONTRAST, STEP_COUNT), bezierCommandCalc) + svg_calc_1.svgPath(getPaths(AAA_CONTRAST, STEP_COUNT, true), bezierCommandCalc);
|
|
114
|
+
return points;
|
|
95
115
|
};
|
|
96
116
|
|
|
117
|
+
var bezierCommandCalc = svg_calc_1.bezierCommand(svg_calc_1.controlPoint(svg_calc_1.line));
|
|
97
118
|
return h("svg", {
|
|
98
119
|
xmlns: "http://www.w3.org/2000/svg",
|
|
99
120
|
attrs: this.v3 ? undefined : {
|
|
@@ -108,7 +129,7 @@ var ColorContrastSvgVue2 = {
|
|
|
108
129
|
top: 0,
|
|
109
130
|
zIndex: 3
|
|
110
131
|
}
|
|
111
|
-
}, [
|
|
132
|
+
}, [svgPath.call(this, getPaths(AA_CONTRAST, STEP_COUNT), bezierCommandCalc), svgPath.call(this, getPaths(AA_CONTRAST, STEP_COUNT, true), bezierCommandCalc), svgPath.call(this, getPaths(AAA_CONTRAST, STEP_COUNT), bezierCommandCalc), svgPath.call(this, getPaths(AAA_CONTRAST, STEP_COUNT, true), bezierCommandCalc)]);
|
|
112
133
|
}
|
|
113
134
|
};
|
|
114
135
|
exports.ColorContrastSvgVue2 = ColorContrastSvgVue2;
|
|
@@ -9,7 +9,7 @@ var Vue = require("vue");
|
|
|
9
9
|
|
|
10
10
|
var allVue = Vue;
|
|
11
11
|
var gh = allVue.h;
|
|
12
|
-
var isV3 = allVue.version[0] === '3';
|
|
12
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
13
13
|
|
|
14
14
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
15
15
|
|
|
@@ -87,7 +87,7 @@ var ColorGradientVue2 = {
|
|
|
87
87
|
return this.currentHex || color_cache_1.getCachedHex(this.guid, this.computedValue) || color_parser_1.parseColor(this.computedValue, 'hex');
|
|
88
88
|
},
|
|
89
89
|
computedBgColor: function computedBgColor() {
|
|
90
|
-
return this.
|
|
90
|
+
return this.currentBgColor || color_parser_1.getColorFromHue(this.hsva.h);
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
data: function data() {
|
|
@@ -214,15 +214,15 @@ var ColorGradientVue2 = {
|
|
|
214
214
|
on: _this2.v3 ? undefined : {
|
|
215
215
|
"click": _this2.onGradientWrapperClick
|
|
216
216
|
}
|
|
217
|
-
}, [renderRectangleDragHandle.call(_this2)])]), this.
|
|
217
|
+
}, [renderRectangleDragHandle.call(_this2)])]), this.backgroundColor && !this.isFirstRender && h(ColorContrastSvg_1.ColorContrastSvg, {
|
|
218
218
|
metrics: this.gradientWrapper ? this.getGradientRectMetrics() : undefined,
|
|
219
219
|
attrs: this.v3 ? undefined : {
|
|
220
220
|
metrics: this.gradientWrapper ? this.getGradientRectMetrics() : undefined,
|
|
221
221
|
hsva: this.hsva,
|
|
222
|
-
backgroundColor: this.
|
|
222
|
+
backgroundColor: this.backgroundColor
|
|
223
223
|
},
|
|
224
224
|
hsva: this.hsva,
|
|
225
|
-
backgroundColor: this.
|
|
225
|
+
backgroundColor: this.backgroundColor
|
|
226
226
|
})]), h("div", {
|
|
227
227
|
"class": "k-hsv-controls k-hstack"
|
|
228
228
|
}, [h(main_1.Slider, {
|
|
@@ -291,20 +291,18 @@ var ColorGradientVue2 = {
|
|
|
291
291
|
onRgbachange: this.onRgbaChange,
|
|
292
292
|
on: this.v3 ? undefined : {
|
|
293
293
|
"rgbachange": this.onRgbaChange,
|
|
294
|
-
"focus": this.onFocus,
|
|
295
294
|
"blur": this.onBlur,
|
|
296
295
|
"hexchange": this.onHexChange
|
|
297
296
|
},
|
|
298
297
|
hex: this.hex,
|
|
299
|
-
onFocus: this.onFocus,
|
|
300
298
|
onBlur: this.onBlur,
|
|
301
299
|
onHexchange: this.onHexChange,
|
|
302
300
|
opacity: this.$props.opacity,
|
|
303
301
|
disabled: this.$props.disabled
|
|
304
|
-
}), this.
|
|
305
|
-
bgColor: color_parser_1.getRGBA(this.
|
|
302
|
+
}), this.backgroundColor && h(ColorContrastLabels_1.ColorContrastLabels, {
|
|
303
|
+
bgColor: color_parser_1.getRGBA(this.backgroundColor),
|
|
306
304
|
attrs: this.v3 ? undefined : {
|
|
307
|
-
bgColor: color_parser_1.getRGBA(this.
|
|
305
|
+
bgColor: color_parser_1.getRGBA(this.backgroundColor),
|
|
308
306
|
rgba: this.rgba
|
|
309
307
|
},
|
|
310
308
|
rgba: this.rgba
|
|
@@ -332,7 +330,7 @@ var ColorGradientVue2 = {
|
|
|
332
330
|
color_cache_1.cacheHex(this.guid, value, hex);
|
|
333
331
|
}
|
|
334
332
|
|
|
335
|
-
this.dispatchChangeEvent(value, event, event.
|
|
333
|
+
this.dispatchChangeEvent(value, event, event.event);
|
|
336
334
|
},
|
|
337
335
|
onRgbaChange: function onRgbaChange(rgba, event) {
|
|
338
336
|
var value = color_parser_1.getColorFromRGBA(rgba);
|
|
@@ -25,7 +25,7 @@ var Vue = require("vue");
|
|
|
25
25
|
|
|
26
26
|
var allVue = Vue;
|
|
27
27
|
var gh = allVue.h;
|
|
28
|
-
var isV3 = allVue.version[0] === '3';
|
|
28
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
29
29
|
|
|
30
30
|
var main_1 = require("../main");
|
|
31
31
|
|
|
@@ -265,7 +265,7 @@ var ColorInputVue2 = {
|
|
|
265
265
|
this.$emit('blur', event);
|
|
266
266
|
},
|
|
267
267
|
onHexChange: function onHexChange(event) {
|
|
268
|
-
this.$emit('hexchange', event);
|
|
268
|
+
this.$emit('hexchange', event.hex, event.value, event);
|
|
269
269
|
},
|
|
270
270
|
onRgbaRChange: function onRgbaRChange(event) {
|
|
271
271
|
this.dispatchRgbaChange({
|
|
@@ -9,7 +9,7 @@ var Vue = require("vue");
|
|
|
9
9
|
|
|
10
10
|
var allVue = Vue;
|
|
11
11
|
var gh = allVue.h;
|
|
12
|
-
var isV3 = allVue.version[0] === '3';
|
|
12
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
13
13
|
|
|
14
14
|
var color_parser_1 = require("./utils/color-parser");
|
|
15
15
|
|
|
@@ -39,11 +39,6 @@ var HexInputVue2 = {
|
|
|
39
39
|
originalHex: this.$props.hex
|
|
40
40
|
};
|
|
41
41
|
},
|
|
42
|
-
computed: {
|
|
43
|
-
computedHex: function computedHex() {
|
|
44
|
-
return this.hex !== undefined ? this.hex : this.currentHex;
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
42
|
// @ts-ignore
|
|
48
43
|
setup: !isV3 ? undefined : function () {
|
|
49
44
|
var v3 = !!isV3;
|
|
@@ -51,21 +46,28 @@ var HexInputVue2 = {
|
|
|
51
46
|
v3: v3
|
|
52
47
|
};
|
|
53
48
|
},
|
|
49
|
+
watch: {
|
|
50
|
+
hex: function hex(newValue) {
|
|
51
|
+
this.currentHex = newValue;
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
54
|
// @ts-ignore
|
|
55
55
|
render: function render(createElement) {
|
|
56
56
|
var h = gh || createElement;
|
|
57
57
|
return h(Input_1.Input, {
|
|
58
|
-
value: this.
|
|
58
|
+
value: this.currentHex,
|
|
59
59
|
attrs: this.v3 ? undefined : {
|
|
60
|
-
value: this.
|
|
60
|
+
value: this.currentHex,
|
|
61
61
|
disabled: this.$props.disabled
|
|
62
62
|
},
|
|
63
|
-
|
|
63
|
+
onInput: this.onChange,
|
|
64
64
|
on: this.v3 ? undefined : {
|
|
65
|
+
"input": this.onChange,
|
|
65
66
|
"change": this.onChange,
|
|
66
67
|
"focus": this.onFocus,
|
|
67
68
|
"blur": this.onBlur
|
|
68
69
|
},
|
|
70
|
+
onChange: this.onChange,
|
|
69
71
|
onFocus: this.onFocus,
|
|
70
72
|
onBlur: this.onBlur,
|
|
71
73
|
disabled: this.$props.disabled
|
|
@@ -78,7 +80,11 @@ var HexInputVue2 = {
|
|
|
78
80
|
this.currentHex = hex;
|
|
79
81
|
|
|
80
82
|
if (misc_1.isPresent(value)) {
|
|
81
|
-
this.$emit('hexchange',
|
|
83
|
+
this.$emit('hexchange', {
|
|
84
|
+
hex: hex,
|
|
85
|
+
value: value,
|
|
86
|
+
event: event
|
|
87
|
+
});
|
|
82
88
|
}
|
|
83
89
|
},
|
|
84
90
|
onBlur: function onBlur(event) {
|
package/dist/npm/input/Input.js
CHANGED
|
@@ -25,7 +25,7 @@ var Vue = require("vue");
|
|
|
25
25
|
|
|
26
26
|
var allVue = Vue;
|
|
27
27
|
var gh = allVue.h;
|
|
28
|
-
var isV3 = allVue.version[0] === '3';
|
|
28
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
29
29
|
var ref = allVue.ref;
|
|
30
30
|
|
|
31
31
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-vue-inputs',
|
|
9
9
|
productName: 'Kendo UI for Vue',
|
|
10
10
|
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1658481454,
|
|
12
12
|
version: '',
|
|
13
13
|
licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
|
|
14
14
|
};
|
|
@@ -25,7 +25,7 @@ var Vue = require("vue");
|
|
|
25
25
|
|
|
26
26
|
var allVue = Vue;
|
|
27
27
|
var gh = allVue.h;
|
|
28
|
-
var isV3 = allVue.version[0] === '3';
|
|
28
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
29
29
|
var ref = allVue.ref;
|
|
30
30
|
|
|
31
31
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-inputs",
|
|
3
3
|
"description": "Kendo UI for Vue Input package",
|
|
4
|
-
"version": "3.4.
|
|
4
|
+
"version": "3.4.4-dev.202207220925",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/telerik/kendo-vue.git"
|
|
@@ -38,22 +38,22 @@
|
|
|
38
38
|
"vue": "^2.6.12 || ^3.0.2"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@progress/kendo-vue-buttons": "3.4.
|
|
42
|
-
"@progress/kendo-vue-common": "3.4.
|
|
43
|
-
"@progress/kendo-vue-labels": "3.4.
|
|
44
|
-
"@progress/kendo-vue-popup": "3.4.
|
|
41
|
+
"@progress/kendo-vue-buttons": "3.4.4-dev.202207220925",
|
|
42
|
+
"@progress/kendo-vue-common": "3.4.4-dev.202207220925",
|
|
43
|
+
"@progress/kendo-vue-labels": "3.4.4-dev.202207220925",
|
|
44
|
+
"@progress/kendo-vue-popup": "3.4.4-dev.202207220925"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@progress/kendo-data-query": "^1.5.5",
|
|
48
48
|
"@progress/kendo-date-math": "^1.5.4",
|
|
49
49
|
"@progress/kendo-drawing": "^1.8.0",
|
|
50
50
|
"@progress/kendo-licensing": "^1.1.0",
|
|
51
|
-
"@progress/kendo-vue-buttons": "3.4.
|
|
52
|
-
"@progress/kendo-vue-dropdowns": "3.4.
|
|
53
|
-
"@progress/kendo-vue-form": "3.4.
|
|
54
|
-
"@progress/kendo-vue-intl": "3.4.
|
|
55
|
-
"@progress/kendo-vue-labels": "3.4.
|
|
56
|
-
"@progress/kendo-vue-tooltip": "3.4.
|
|
51
|
+
"@progress/kendo-vue-buttons": "3.4.4-dev.202207220925",
|
|
52
|
+
"@progress/kendo-vue-dropdowns": "3.4.4-dev.202207220925",
|
|
53
|
+
"@progress/kendo-vue-form": "3.4.4-dev.202207220925",
|
|
54
|
+
"@progress/kendo-vue-intl": "3.4.4-dev.202207220925",
|
|
55
|
+
"@progress/kendo-vue-labels": "3.4.4-dev.202207220925",
|
|
56
|
+
"@progress/kendo-vue-tooltip": "3.4.4-dev.202207220925",
|
|
57
57
|
"cldr-core": "^41.0.0",
|
|
58
58
|
"cldr-dates-full": "^41.0.0",
|
|
59
59
|
"cldr-numbers-full": "^41.0.0"
|