@progress/kendo-vue-inputs 3.4.3 → 3.4.5-dev.202207300828

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.
Files changed (102) hide show
  1. package/dist/cdn/js/kendo-vue-inputs.js +1 -1
  2. package/dist/es/checkbox/Checkbox.js +3 -3
  3. package/dist/es/colors/ColorContrastLabels.js +8 -4
  4. package/dist/es/colors/ColorContrastSvg.js +65 -44
  5. package/dist/es/colors/ColorGradient.d.ts +3 -1
  6. package/dist/es/colors/ColorGradient.js +160 -57
  7. package/dist/es/colors/ColorInput.d.ts +3 -0
  8. package/dist/es/colors/ColorInput.js +82 -58
  9. package/dist/es/colors/ColorPalette.js +31 -17
  10. package/dist/es/colors/ColorPicker.d.ts +1 -0
  11. package/dist/es/colors/ColorPicker.js +90 -70
  12. package/dist/es/colors/FlatColorPicker.d.ts +41 -5
  13. package/dist/es/colors/FlatColorPicker.js +307 -110
  14. package/dist/es/colors/HexInput.d.ts +1 -0
  15. package/dist/es/colors/HexInput.js +33 -13
  16. package/dist/es/colors/Picker.js +20 -12
  17. package/dist/es/colors/interfaces/ColorGradientChangeEvent.d.ts +4 -0
  18. package/dist/es/colors/interfaces/ColorGradientProps.d.ts +12 -0
  19. package/dist/es/colors/interfaces/ColorPaletteChangeEvent.d.ts +0 -3
  20. package/dist/es/colors/interfaces/ColorPaletteProps.d.ts +8 -3
  21. package/dist/es/colors/interfaces/ColorPickerActiveColorClick.d.ts +0 -3
  22. package/dist/es/colors/interfaces/ColorPickerBlurEvent.d.ts +0 -3
  23. package/dist/es/colors/interfaces/ColorPickerChangeEvent.d.ts +4 -3
  24. package/dist/es/colors/interfaces/ColorPickerFocusEvent.d.ts +0 -3
  25. package/dist/es/colors/interfaces/ColorPickerPaletteSettings.d.ts +0 -3
  26. package/dist/es/colors/interfaces/ColorPickerPopupSettings.d.ts +0 -3
  27. package/dist/es/colors/interfaces/ColorPickerProps.d.ts +30 -4
  28. package/dist/es/colors/interfaces/ColorPickerView.d.ts +0 -3
  29. package/dist/es/colors/interfaces/FlatColorPickerViewChangeEvent.d.ts +13 -0
  30. package/dist/es/colors/interfaces/FlatColorPickerViewChangeEvent.js +0 -0
  31. package/dist/es/colors/interfaces/PickerProps.d.ts +4 -0
  32. package/dist/es/colors/utils/color-cache.d.ts +13 -0
  33. package/dist/es/colors/utils/color-cache.js +14 -0
  34. package/dist/es/colors/utils/color-parser.d.ts +7 -1
  35. package/dist/es/colors/utils/color-parser.js +11 -2
  36. package/dist/es/input/Input.d.ts +4 -0
  37. package/dist/es/input/Input.js +9 -4
  38. package/dist/es/input-separator/InputSeparator.js +1 -1
  39. package/dist/es/maskedtextbox/MaskedTextBox.js +1 -1
  40. package/dist/es/messages/index.d.ts +45 -0
  41. package/dist/es/messages/index.js +46 -0
  42. package/dist/es/numerictextbox/NumericTextBox.js +4 -1
  43. package/dist/es/numerictextbox/interfaces/NumericTextBoxProps.d.ts +4 -0
  44. package/dist/es/package-metadata.js +1 -1
  45. package/dist/es/radiobutton/RadioButton.js +2 -2
  46. package/dist/es/radiobutton/RadioGroup.js +2 -2
  47. package/dist/es/range-slider/RangeSlider.js +2 -2
  48. package/dist/es/slider/Slider.js +3 -3
  49. package/dist/es/slider/SliderLabel.js +1 -1
  50. package/dist/es/switch/Switch.js +1 -1
  51. package/dist/es/textarea/TextArea.js +1 -1
  52. package/dist/npm/checkbox/Checkbox.js +3 -3
  53. package/dist/npm/colors/ColorContrastLabels.js +8 -4
  54. package/dist/npm/colors/ColorContrastSvg.js +65 -44
  55. package/dist/npm/colors/ColorGradient.d.ts +3 -1
  56. package/dist/npm/colors/ColorGradient.js +161 -56
  57. package/dist/npm/colors/ColorInput.d.ts +3 -0
  58. package/dist/npm/colors/ColorInput.js +82 -57
  59. package/dist/npm/colors/ColorPalette.js +31 -17
  60. package/dist/npm/colors/ColorPicker.d.ts +1 -0
  61. package/dist/npm/colors/ColorPicker.js +91 -71
  62. package/dist/npm/colors/FlatColorPicker.d.ts +41 -5
  63. package/dist/npm/colors/FlatColorPicker.js +307 -107
  64. package/dist/npm/colors/HexInput.d.ts +1 -0
  65. package/dist/npm/colors/HexInput.js +31 -11
  66. package/dist/npm/colors/Picker.js +19 -11
  67. package/dist/npm/colors/interfaces/ColorGradientChangeEvent.d.ts +4 -0
  68. package/dist/npm/colors/interfaces/ColorGradientProps.d.ts +12 -0
  69. package/dist/npm/colors/interfaces/ColorPaletteChangeEvent.d.ts +0 -3
  70. package/dist/npm/colors/interfaces/ColorPaletteProps.d.ts +8 -3
  71. package/dist/npm/colors/interfaces/ColorPickerActiveColorClick.d.ts +0 -3
  72. package/dist/npm/colors/interfaces/ColorPickerBlurEvent.d.ts +0 -3
  73. package/dist/npm/colors/interfaces/ColorPickerChangeEvent.d.ts +4 -3
  74. package/dist/npm/colors/interfaces/ColorPickerFocusEvent.d.ts +0 -3
  75. package/dist/npm/colors/interfaces/ColorPickerPaletteSettings.d.ts +0 -3
  76. package/dist/npm/colors/interfaces/ColorPickerPopupSettings.d.ts +0 -3
  77. package/dist/npm/colors/interfaces/ColorPickerProps.d.ts +30 -4
  78. package/dist/npm/colors/interfaces/ColorPickerView.d.ts +0 -3
  79. package/dist/npm/colors/interfaces/FlatColorPickerViewChangeEvent.d.ts +13 -0
  80. package/dist/npm/colors/interfaces/FlatColorPickerViewChangeEvent.js +2 -0
  81. package/dist/npm/colors/interfaces/PickerProps.d.ts +4 -0
  82. package/dist/npm/colors/utils/color-cache.d.ts +13 -0
  83. package/dist/npm/colors/utils/color-cache.js +15 -1
  84. package/dist/npm/colors/utils/color-parser.d.ts +7 -1
  85. package/dist/npm/colors/utils/color-parser.js +12 -3
  86. package/dist/npm/input/Input.d.ts +4 -0
  87. package/dist/npm/input/Input.js +9 -4
  88. package/dist/npm/input-separator/InputSeparator.js +1 -1
  89. package/dist/npm/maskedtextbox/MaskedTextBox.js +1 -1
  90. package/dist/npm/messages/index.d.ts +45 -0
  91. package/dist/npm/messages/index.js +47 -1
  92. package/dist/npm/numerictextbox/NumericTextBox.js +4 -1
  93. package/dist/npm/numerictextbox/interfaces/NumericTextBoxProps.d.ts +4 -0
  94. package/dist/npm/package-metadata.js +1 -1
  95. package/dist/npm/radiobutton/RadioButton.js +2 -2
  96. package/dist/npm/radiobutton/RadioGroup.js +2 -2
  97. package/dist/npm/range-slider/RangeSlider.js +2 -2
  98. package/dist/npm/slider/Slider.js +3 -3
  99. package/dist/npm/slider/SliderLabel.js +1 -1
  100. package/dist/npm/switch/Switch.js +1 -1
  101. package/dist/npm/textarea/TextArea.js +1 -1
  102. package/package.json +11 -11
@@ -2,7 +2,7 @@
2
2
  import * as Vue from 'vue';
3
3
  var allVue = Vue;
4
4
  var gh = allVue.h;
5
- var isV3 = allVue.version[0] === '3';
5
+ var isV3 = allVue.version && allVue.version[0] === '3';
6
6
  var ref = allVue.ref;
7
7
  var inject = allVue.inject;
8
8
  import { Keys, classNames, guid, getTabIndex, getDefaultSlots, validatePackage, templateRendering, getTemplate, getListeners, kendoThemeMaps, setRef, getRef } from '@progress/kendo-vue-common';
@@ -202,11 +202,11 @@ var CheckboxVue2 = {
202
202
  this.defaultValidationMessage = this.localizeMessage(checkboxValidation);
203
203
  this.optionalMessage = this.localizeMessage(checkboxOptionalText);
204
204
  var checkboxClasses = classNames({
205
- 'k-state-disabled': disabled
205
+ 'k-disabled': disabled
206
206
  });
207
207
  var inputClasses = classNames((_a = {
208
208
  'k-checkbox': true
209
- }, _a["k-checkbox-" + kendoThemeMaps.sizeMap[size]] = size, _a["k-rounded-" + kendoThemeMaps.roundedMap[rounded]] = rounded, _a['k-state-indeterminate'] = this.indeterminateProp, _a['k-state-invalid k-invalid'] = !(this.isValid || validityStyles !== undefined || validityStyles === true), _a));
209
+ }, _a["k-checkbox-" + kendoThemeMaps.sizeMap[size]] = size, _a["k-rounded-" + kendoThemeMaps.roundedMap[rounded]] = rounded, _a['k-indeterminate'] = this.indeterminateProp, _a['k-invalid k-invalid'] = !(this.isValid || validityStyles !== undefined || validityStyles === true), _a));
210
210
 
211
211
  var checkboxInput = function checkboxInput() {
212
212
  return h("input", {
@@ -2,7 +2,7 @@
2
2
  import * as Vue from 'vue';
3
3
  var allVue = Vue;
4
4
  var gh = allVue.h;
5
- var isV3 = allVue.version[0] === '3';
5
+ var isV3 = allVue.version && allVue.version[0] === '3';
6
6
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
7
7
  import { messages, colorGradientContrastRatio, colorGradientAALevel, colorGradientAAALevel, colorGradientPass, colorGradientFail } from '../messages';
8
8
  import { getContrastFromTwoRGBAs } from './utils/color-parser';
@@ -43,12 +43,16 @@ var ColorContrastLabelsVue2 = {
43
43
  var contrastText = contrastRatioMessage + ": " + contrast.toFixed(2);
44
44
  var aaText = AALevelMessage + ": " + requiredAAContrast;
45
45
  var aaaText = AAALevelMessage + ": " + requiredAAAContrast;
46
+ var aaPass = contrast >= 4.5;
47
+ var aaaPass = contrast >= 7;
46
48
  var success = h("span", {
49
+ key: 1,
47
50
  "class": "k-contrast-validation k-text-success"
48
51
  }, [passMessage, " ", h("span", {
49
52
  "class": "k-icon k-i-check"
50
53
  })]);
51
54
  var error = h("span", {
55
+ key: 2,
52
56
  "class": "k-contrast-validation k-text-error"
53
57
  }, [failMessage, " ", h("span", {
54
58
  "class": "k-icon k-i-close"
@@ -59,17 +63,17 @@ var ColorContrastLabelsVue2 = {
59
63
  "class": "k-contrast-ratio"
60
64
  }, [h("span", {
61
65
  "class": "k-contrast-ratio-text"
62
- }, [contrastText]), contrast >= 4.5 ? h("span", {
66
+ }, [contrastText]), aaPass ? h("span", {
63
67
  "class": "k-contrast-validation k-text-success"
64
68
  }, [h("span", {
65
69
  "class": "k-icon k-i-check"
66
- }), contrast >= 7 && h("span", {
70
+ }), aaaPass && h("span", {
67
71
  "class": "k-icon k-i-check"
68
72
  })]) : h("span", {
69
73
  "class": "k-contrast-validation k-text-error"
70
74
  }, [h("span", {
71
75
  "class": "k-icon k-i-close"
72
- })])]), h("div", [h("span", [aaText]), contrast >= 4.5 ? success : error]), h("div", [h("span", [aaaText]), contrast >= 7 ? success : error])]);
76
+ })])]), h("div", [h("span", [aaText]), aaPass ? success : error]), h("div", [h("span", [aaaText]), aaaPass ? success : error])]);
73
77
  }
74
78
  };
75
79
  /**
@@ -2,8 +2,8 @@
2
2
  import * as Vue from 'vue';
3
3
  var allVue = Vue;
4
4
  var gh = allVue.h;
5
- var isV3 = allVue.version[0] === '3';
6
- import { bezierCommand, controlPoint, line, svgPath } from './utils/svg-calc';
5
+ var isV3 = allVue.version && allVue.version[0] === '3';
6
+ import { bezierCommand, controlPoint, line } from './utils/svg-calc';
7
7
  import { getColorFromHSV, getRGBA, getContrastFromTwoRGBAs } from './utils/color-parser';
8
8
  var AA_CONTRAST = 4.5;
9
9
  var AAA_CONTRAST = 7;
@@ -28,62 +28,83 @@ var ColorContrastSvgVue2 = {
28
28
  },
29
29
  // @ts-ignore
30
30
  render: function render(createElement) {
31
+ var _this = this;
32
+
31
33
  var h = gh || createElement;
32
34
 
33
- var renderSvgCurveLine = function renderSvgCurveLine() {
34
- var _this = this;
35
+ var svgPath = function svgPath(points, command) {
36
+ if (points.length === 0) {
37
+ return '';
38
+ } // build the d attributes by looping over the points
35
39
 
36
- var gradientRectMetrics = this.$props.metrics;
37
40
 
38
- var findValue = function findValue(contrast, saturation, low, high, comparer) {
39
- var mid = (low + high) / 2;
40
- var hsva = Object.assign({}, _this.$props.hsva, {
41
- s: saturation / gradientRectMetrics.width,
42
- v: 1 - mid / gradientRectMetrics.height
43
- });
44
- var currentContrast = getContrastFromTwoRGBAs(getRGBA(getColorFromHSV(hsva)), getRGBA(_this.$props.backgroundColor || ''));
45
-
46
- if (low + 0.5 > high) {
47
- if (currentContrast < contrast + 1 && currentContrast > contrast - 1) {
48
- return mid;
49
- } else {
50
- return null;
51
- }
52
- }
41
+ var d = points.reduce(function (acc, point, i, a) {
42
+ return i === 0 ? // if first point
43
+ "M " + point[0] + "," + point[1] : // else
44
+ acc + " " + command(point, i, a);
45
+ }, '');
46
+ return h("path", {
47
+ d: d,
48
+ attrs: this.v3 ? undefined : {
49
+ d: d,
50
+ fill: "none",
51
+ stroke: "white",
52
+ "stroke-width": "1"
53
+ },
54
+ fill: "none",
55
+ stroke: "white",
56
+ "stroke-width": "1"
57
+ });
58
+ };
53
59
 
54
- if (comparer(currentContrast, contrast)) {
55
- return findValue(contrast, saturation, low, high - (high - low) / 2, comparer);
56
- }
60
+ var gradientRectMetrics = this.$props.metrics;
57
61
 
58
- return findValue(contrast, saturation, low + (high - low) / 2, high, comparer);
59
- };
62
+ var findValue = function findValue(contrast, saturation, low, high, comparer) {
63
+ var mid = (low + high) / 2;
64
+ var hsva = Object.assign({}, _this.$props.hsva, {
65
+ s: saturation / gradientRectMetrics.width,
66
+ v: 1 - mid / gradientRectMetrics.height
67
+ });
68
+ var currentContrast = getContrastFromTwoRGBAs(getRGBA(getColorFromHSV(hsva)), getRGBA(_this.$props.backgroundColor || ''));
60
69
 
61
- var getPaths = function getPaths(contrast, stepCount, reversed) {
62
- if (reversed === void 0) {
63
- reversed = false;
70
+ if (low + 0.5 > high) {
71
+ if (currentContrast < contrast + 1 && currentContrast > contrast - 1) {
72
+ return mid;
73
+ } else {
74
+ return null;
64
75
  }
76
+ }
65
77
 
66
- var points = [];
78
+ if (comparer(currentContrast, contrast)) {
79
+ return findValue(contrast, saturation, low, high - (high - low) / 2, comparer);
80
+ }
67
81
 
68
- for (var i = 0; i <= gradientRectMetrics.width; i += gradientRectMetrics.width / stepCount) {
69
- var value = findValue(contrast, i, 0, gradientRectMetrics.height, reversed ? function (a, b) {
70
- return a < b;
71
- } : function (a, b) {
72
- return a > b;
73
- });
82
+ return findValue(contrast, saturation, low + (high - low) / 2, high, comparer);
83
+ };
74
84
 
75
- if (value !== null) {
76
- points.push([i, value]);
77
- }
78
- }
85
+ var getPaths = function getPaths(contrast, stepCount, reversed) {
86
+ if (reversed === void 0) {
87
+ reversed = false;
88
+ }
79
89
 
80
- return points;
81
- };
90
+ var points = [];
91
+
92
+ for (var i = 0; i <= gradientRectMetrics.width; i += gradientRectMetrics.width / stepCount) {
93
+ var value = findValue(contrast, i, 0, gradientRectMetrics.height, reversed ? function (a, b) {
94
+ return a < b;
95
+ } : function (a, b) {
96
+ return a > b;
97
+ });
98
+
99
+ if (value !== null) {
100
+ points.push([i, value]);
101
+ }
102
+ }
82
103
 
83
- var bezierCommandCalc = bezierCommand(controlPoint(line));
84
- return svgPath(getPaths(AA_CONTRAST, STEP_COUNT), bezierCommandCalc) + svgPath(getPaths(AA_CONTRAST, STEP_COUNT, true), bezierCommandCalc) + svgPath(getPaths(AAA_CONTRAST, STEP_COUNT), bezierCommandCalc) + svgPath(getPaths(AAA_CONTRAST, STEP_COUNT, true), bezierCommandCalc);
104
+ return points;
85
105
  };
86
106
 
107
+ var bezierCommandCalc = bezierCommand(controlPoint(line));
87
108
  return h("svg", {
88
109
  xmlns: "http://www.w3.org/2000/svg",
89
110
  attrs: this.v3 ? undefined : {
@@ -98,7 +119,7 @@ var ColorContrastSvgVue2 = {
98
119
  top: 0,
99
120
  zIndex: 3
100
121
  }
101
- }, [renderSvgCurveLine.call(this)]);
122
+ }, [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)]);
102
123
  }
103
124
  };
104
125
  /**
@@ -13,6 +13,8 @@ export interface ColorGradientState {
13
13
  guidId: string;
14
14
  gradientWrapper: any;
15
15
  alphaSlider: any;
16
+ firstFocusable: any;
17
+ lastFocusable: any;
16
18
  }
17
19
  /**
18
20
  * @hidden
@@ -31,7 +33,7 @@ export interface ColorGradientMethods {
31
33
  */
32
34
  export interface ColorGradientData {
33
35
  hsva: HSVA;
34
- backgroundColor: string;
36
+ currentBgColor: string;
35
37
  rgba: RGBA;
36
38
  hex: string;
37
39
  isFirstRender: boolean;