@progress/kendo-vue-inputs 3.6.4 → 3.7.0-dev.202210250731

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 (74) hide show
  1. package/dist/cdn/js/kendo-vue-inputs.js +1 -1
  2. package/dist/es/checkbox/Checkbox.js +17 -35
  3. package/dist/es/colors/ColorContrastLabels.js +0 -2
  4. package/dist/es/colors/ColorContrastSvg.js +6 -20
  5. package/dist/es/colors/ColorGradient.js +2 -28
  6. package/dist/es/colors/ColorInput.js +12 -20
  7. package/dist/es/colors/ColorPalette.js +0 -19
  8. package/dist/es/colors/ColorPicker.js +28 -52
  9. package/dist/es/colors/FlatColorPicker.js +14 -24
  10. package/dist/es/colors/HexInput.js +0 -4
  11. package/dist/es/colors/Picker.js +6 -9
  12. package/dist/es/input/Input.js +15 -29
  13. package/dist/es/input-separator/InputSeparator.js +0 -2
  14. package/dist/es/maskedtextbox/MaskedTextBox.js +13 -32
  15. package/dist/es/numerictextbox/NumericTextBox.js +15 -48
  16. package/dist/es/numerictextbox/utils/main.js +33 -132
  17. package/dist/es/package-metadata.js +1 -1
  18. package/dist/es/radiobutton/RadioButton.js +11 -16
  19. package/dist/es/radiobutton/RadioGroup.js +9 -12
  20. package/dist/es/range-slider/RangeSlider.js +9 -32
  21. package/dist/es/range-slider/range-raducer.js +0 -26
  22. package/dist/es/slider/Slider.js +8 -20
  23. package/dist/es/slider/SliderLabel.js +2 -12
  24. package/dist/es/switch/Switch.js +6 -18
  25. package/dist/es/textarea/TextArea.js +27 -40
  26. package/dist/esm/checkbox/Checkbox.js +17 -35
  27. package/dist/esm/colors/ColorContrastLabels.js +0 -2
  28. package/dist/esm/colors/ColorContrastSvg.js +6 -20
  29. package/dist/esm/colors/ColorGradient.js +2 -28
  30. package/dist/esm/colors/ColorInput.js +12 -20
  31. package/dist/esm/colors/ColorPalette.js +0 -19
  32. package/dist/esm/colors/ColorPicker.js +28 -52
  33. package/dist/esm/colors/FlatColorPicker.js +14 -24
  34. package/dist/esm/colors/HexInput.js +0 -4
  35. package/dist/esm/colors/Picker.js +6 -9
  36. package/dist/esm/input/Input.js +15 -29
  37. package/dist/esm/input-separator/InputSeparator.js +0 -2
  38. package/dist/esm/maskedtextbox/MaskedTextBox.js +13 -32
  39. package/dist/esm/numerictextbox/NumericTextBox.js +15 -48
  40. package/dist/esm/numerictextbox/utils/main.js +33 -132
  41. package/dist/esm/package-metadata.js +1 -1
  42. package/dist/esm/radiobutton/RadioButton.js +11 -16
  43. package/dist/esm/radiobutton/RadioGroup.js +9 -12
  44. package/dist/esm/range-slider/RangeSlider.js +9 -32
  45. package/dist/esm/range-slider/range-raducer.js +0 -26
  46. package/dist/esm/slider/Slider.js +8 -20
  47. package/dist/esm/slider/SliderLabel.js +2 -12
  48. package/dist/esm/switch/Switch.js +6 -18
  49. package/dist/esm/textarea/TextArea.js +27 -40
  50. package/dist/npm/checkbox/Checkbox.js +19 -43
  51. package/dist/npm/colors/ColorContrastLabels.js +2 -9
  52. package/dist/npm/colors/ColorContrastSvg.js +8 -26
  53. package/dist/npm/colors/ColorGradient.js +4 -44
  54. package/dist/npm/colors/ColorInput.js +12 -29
  55. package/dist/npm/colors/ColorPalette.js +2 -29
  56. package/dist/npm/colors/ColorPicker.js +26 -59
  57. package/dist/npm/colors/FlatColorPicker.js +14 -35
  58. package/dist/npm/colors/HexInput.js +2 -11
  59. package/dist/npm/colors/Picker.js +8 -15
  60. package/dist/npm/input/Input.js +15 -34
  61. package/dist/npm/input-separator/InputSeparator.js +2 -8
  62. package/dist/npm/maskedtextbox/MaskedTextBox.js +15 -40
  63. package/dist/npm/numerictextbox/NumericTextBox.js +17 -59
  64. package/dist/npm/numerictextbox/utils/main.js +33 -160
  65. package/dist/npm/package-metadata.js +1 -1
  66. package/dist/npm/radiobutton/RadioButton.js +13 -23
  67. package/dist/npm/radiobutton/RadioGroup.js +11 -19
  68. package/dist/npm/range-slider/RangeSlider.js +7 -38
  69. package/dist/npm/range-slider/range-raducer.js +0 -27
  70. package/dist/npm/slider/Slider.js +10 -30
  71. package/dist/npm/slider/SliderLabel.js +2 -15
  72. package/dist/npm/switch/Switch.js +8 -26
  73. package/dist/npm/textarea/TextArea.js +25 -43
  74. package/package.json +11 -11
@@ -12,7 +12,6 @@ import { messages, checkboxValidation, checkboxOptionalText } from '../messages/
12
12
  /**
13
13
  * @hidden
14
14
  */
15
-
16
15
  var CheckboxVue2 = {
17
16
  name: 'KendoCheckbox',
18
17
  // @ts-ignore
@@ -99,15 +98,12 @@ var CheckboxVue2 = {
99
98
  created: function created() {
100
99
  validatePackage(packageMetadata);
101
100
  this.calculatedId = guid();
102
-
103
101
  if (this.$props.defaultChecked !== undefined) {
104
102
  this.currentChecked = this.$props.defaultChecked;
105
103
  }
106
-
107
104
  if (this.$props.defaultValue !== undefined) {
108
105
  this.currentValue = this.$props.defaultValue;
109
106
  }
110
-
111
107
  this.currentDir = this.$props.dir;
112
108
  },
113
109
  computed: {
@@ -147,23 +143,19 @@ var CheckboxVue2 = {
147
143
  },
148
144
  mounted: function mounted() {
149
145
  this.input = getRef(this, 'input');
150
-
151
146
  if (!this.currentDir && window && this.$el) {
152
147
  // Note: getComputedStyle forces reflow
153
148
  var direction = window.getComputedStyle(this.$el).direction;
154
-
155
149
  if (direction) {
156
150
  this.currentDir = direction;
157
151
  }
158
152
  }
159
-
160
153
  this.setValidity();
161
154
  },
162
155
  updated: function updated() {
163
156
  if (!this.input) {
164
157
  this.input = getRef(this, 'input');
165
158
  }
166
-
167
159
  this.setValidity();
168
160
  },
169
161
  // @ts-ignore
@@ -179,23 +171,22 @@ var CheckboxVue2 = {
179
171
  },
180
172
  render: function render(createElement) {
181
173
  var _a;
182
-
183
174
  var h = gh || createElement;
184
175
  var _b = this.$props,
185
- ariaDescribedBy = _b.ariaDescribedBy,
186
- ariaLabelledBy = _b.ariaLabelledBy,
187
- disabled = _b.disabled,
188
- id = _b.id,
189
- label = _b.label,
190
- labelRender = _b.labelRender,
191
- labelPlacement = _b.labelPlacement,
192
- name = _b.name,
193
- labelOptional = _b.labelOptional,
194
- tabIndex = _b.tabIndex,
195
- required = _b.required,
196
- validityStyles = _b.validityStyles,
197
- size = _b.size,
198
- rounded = _b.rounded;
176
+ ariaDescribedBy = _b.ariaDescribedBy,
177
+ ariaLabelledBy = _b.ariaLabelledBy,
178
+ disabled = _b.disabled,
179
+ id = _b.id,
180
+ label = _b.label,
181
+ labelRender = _b.labelRender,
182
+ labelPlacement = _b.labelPlacement,
183
+ name = _b.name,
184
+ labelOptional = _b.labelOptional,
185
+ tabIndex = _b.tabIndex,
186
+ required = _b.required,
187
+ validityStyles = _b.validityStyles,
188
+ size = _b.size,
189
+ rounded = _b.rounded;
199
190
  var defaultSlot = getDefaultSlots(this);
200
191
  var renderedLabel = label;
201
192
  this.localizationService = provideLocalizationService(this);
@@ -207,7 +198,6 @@ var CheckboxVue2 = {
207
198
  var inputClasses = classNames((_a = {
208
199
  'k-checkbox': true
209
200
  }, _a["k-checkbox-".concat(kendoThemeMaps.sizeMap[size])] = size, _a["k-rounded-".concat(kendoThemeMaps.roundedMap[rounded])] = rounded, _a['k-indeterminate'] = this.indeterminateProp, _a['k-disabled'] = disabled, _a['k-invalid k-invalid'] = !(this.isValid || validityStyles !== undefined || validityStyles === true), _a));
210
-
211
201
  var checkboxInput = function checkboxInput() {
212
202
  return h("input", {
213
203
  type: 'checkbox',
@@ -252,7 +242,6 @@ var CheckboxVue2 = {
252
242
  onBlur: this.onBlurHandler
253
243
  });
254
244
  };
255
-
256
245
  if (labelRender) {
257
246
  var renderTemplate = labelRender ? templateRendering.call(this, labelRender, getListeners.call(this)) : null;
258
247
  renderedLabel = getTemplate.call(this, {
@@ -260,7 +249,6 @@ var CheckboxVue2 = {
260
249
  template: renderTemplate
261
250
  });
262
251
  }
263
-
264
252
  var checkboxLabel = function checkboxLabel() {
265
253
  return renderedLabel !== undefined ? h("label", {
266
254
  "class": 'k-checkbox-label',
@@ -275,7 +263,6 @@ var CheckboxVue2 = {
275
263
  "class": "k-label-optional"
276
264
  }, [this.optionalMessage])]) : null;
277
265
  };
278
-
279
266
  return labelPlacement === 'before' ? h("span", {
280
267
  "class": checkboxClasses,
281
268
  dir: 'rtl',
@@ -292,8 +279,8 @@ var CheckboxVue2 = {
292
279
  },
293
280
  methods: {
294
281
  setValidity: function setValidity() {
295
- var isValid = this.$props.valid !== undefined ? this.$props.valid : !this.$props.required ? true : this.computedChecked ? true : false; // @ts-ignore
296
-
282
+ var isValid = this.$props.valid !== undefined ? this.$props.valid : !this.$props.required ? true : this.computedChecked ? true : false;
283
+ // @ts-ignore
297
284
  if (this.input && this.input.setCustomValidity) {
298
285
  // @ts-ignore
299
286
  this.input.setCustomValidity(isValid ? '' : this.$props.validationMessage || this.defaultValidationMessage);
@@ -316,13 +303,12 @@ var CheckboxVue2 = {
316
303
  that.currentValue = val;
317
304
  that.currentChecked = val;
318
305
  }
319
-
320
306
  if (!that.$props.disabled) {
321
307
  var handle = {
322
308
  element: that.$el,
323
309
  focus: null // focusElement
324
-
325
310
  };
311
+
326
312
  that.$emit('changemodel', val);
327
313
  that.$emit('update:modelValue', val);
328
314
  that.$emit('change', {
@@ -331,7 +317,6 @@ var CheckboxVue2 = {
331
317
  value: val
332
318
  });
333
319
  }
334
-
335
320
  this.$data.valueDuringOnChange = undefined;
336
321
  });
337
322
  },
@@ -343,10 +328,8 @@ var CheckboxVue2 = {
343
328
  if (this.$props.disabled) {
344
329
  return;
345
330
  }
346
-
347
331
  var keyCode = e.keyCode;
348
332
  var currentVal = e.currentTarget.checked;
349
-
350
333
  if (keyCode === Keys.space) {
351
334
  e.preventDefault();
352
335
  e.stopPropagation();
@@ -368,6 +351,5 @@ var CheckboxVue2 = {
368
351
  /**
369
352
  * @hidden
370
353
  */
371
-
372
354
  var Checkbox = CheckboxVue2;
373
355
  export { Checkbox, CheckboxVue2 };
@@ -9,7 +9,6 @@ import { getContrastFromTwoRGBAs } from './utils/color-parser';
9
9
  /**
10
10
  * @hidden
11
11
  */
12
-
13
12
  var ColorContrastLabelsVue2 = {
14
13
  name: 'KendoColorContrastLabels',
15
14
  props: {
@@ -79,6 +78,5 @@ var ColorContrastLabelsVue2 = {
79
78
  /**
80
79
  * @hidden
81
80
  */
82
-
83
81
  var ColorContrastLabels = ColorContrastLabelsVue2;
84
82
  export { ColorContrastLabels, ColorContrastLabelsVue2 };
@@ -11,7 +11,6 @@ var STEP_COUNT = 16;
11
11
  /**
12
12
  * @hidden
13
13
  */
14
-
15
14
  var ColorContrastSvgVue2 = {
16
15
  name: 'KendoColorContrastSvg',
17
16
  props: {
@@ -29,18 +28,17 @@ var ColorContrastSvgVue2 = {
29
28
  // @ts-ignore
30
29
  render: function render(createElement) {
31
30
  var _this = this;
32
-
33
31
  var h = gh || createElement;
34
-
35
32
  var svgPath = function svgPath(points, command) {
36
33
  if (points.length === 0) {
37
34
  return '';
38
- } // build the d attributes by looping over the points
39
-
40
-
35
+ }
36
+ // build the d attributes by looping over the points
41
37
  var d = points.reduce(function (acc, point, i, a) {
42
- return i === 0 ? // if first point
43
- "M ".concat(point[0], ",").concat(point[1]) : // else
38
+ return i === 0 ?
39
+ // if first point
40
+ "M ".concat(point[0], ",").concat(point[1]) :
41
+ // else
44
42
  "".concat(acc, " ").concat(command(point, i, a));
45
43
  }, '');
46
44
  return h("path", {
@@ -56,9 +54,7 @@ var ColorContrastSvgVue2 = {
56
54
  "stroke-width": "1"
57
55
  });
58
56
  };
59
-
60
57
  var gradientRectMetrics = this.$props.metrics;
61
-
62
58
  var findValue = function findValue(contrast, saturation, low, high, comparer) {
63
59
  var mid = (low + high) / 2;
64
60
  var hsva = Object.assign({}, _this.$props.hsva, {
@@ -66,7 +62,6 @@ var ColorContrastSvgVue2 = {
66
62
  v: 1 - mid / gradientRectMetrics.height
67
63
  });
68
64
  var currentContrast = getContrastFromTwoRGBAs(getRGBA(getColorFromHSV(hsva)), getRGBA(_this.$props.backgroundColor || ''));
69
-
70
65
  if (low + 0.5 > high) {
71
66
  if (currentContrast < contrast + 1 && currentContrast > contrast - 1) {
72
67
  return mid;
@@ -74,36 +69,28 @@ var ColorContrastSvgVue2 = {
74
69
  return null;
75
70
  }
76
71
  }
77
-
78
72
  if (comparer(currentContrast, contrast)) {
79
73
  return findValue(contrast, saturation, low, high - (high - low) / 2, comparer);
80
74
  }
81
-
82
75
  return findValue(contrast, saturation, low + (high - low) / 2, high, comparer);
83
76
  };
84
-
85
77
  var getPaths = function getPaths(contrast, stepCount, reversed) {
86
78
  if (reversed === void 0) {
87
79
  reversed = false;
88
80
  }
89
-
90
81
  var points = [];
91
-
92
82
  for (var i = 0; i <= gradientRectMetrics.width; i += gradientRectMetrics.width / stepCount) {
93
83
  var value = findValue(contrast, i, 0, gradientRectMetrics.height, reversed ? function (a, b) {
94
84
  return a < b;
95
85
  } : function (a, b) {
96
86
  return a > b;
97
87
  });
98
-
99
88
  if (value !== null) {
100
89
  points.push([i, value]);
101
90
  }
102
91
  }
103
-
104
92
  return points;
105
93
  };
106
-
107
94
  var bezierCommandCalc = bezierCommand(controlPoint(line));
108
95
  return h("svg", {
109
96
  xmlns: "http://www.w3.org/2000/svg",
@@ -125,6 +112,5 @@ var ColorContrastSvgVue2 = {
125
112
  /**
126
113
  * @hidden
127
114
  */
128
-
129
115
  var ColorContrastSvg = ColorContrastSvgVue2;
130
116
  export { ColorContrastSvg, ColorContrastSvgVue2 };
@@ -20,7 +20,6 @@ var DEFAULT_SELECTED_COLOR = 'rgba(255, 255, 255, 1)';
20
20
  /**
21
21
  * @hidden
22
22
  */
23
-
24
23
  var ColorGradientVue2 = {
25
24
  name: 'KendoColorGradient',
26
25
  model: {
@@ -71,12 +70,10 @@ var ColorGradientVue2 = {
71
70
  },
72
71
  computedValue: function computedValue() {
73
72
  var value = this.valueSet || this.currentValue || this.defaultValue || parseColor(DEFAULT_SELECTED_COLOR, FORMAT);
74
-
75
73
  if (!isPresent(parseColor(value, 'hex', this.opacity))) {
76
74
  // Validate/sanitize the input.
77
75
  value = DEFAULT_SELECTED_COLOR;
78
76
  }
79
-
80
77
  return value;
81
78
  },
82
79
  hsva: function hsva() {
@@ -108,14 +105,11 @@ var ColorGradientVue2 = {
108
105
  },
109
106
  mounted: function mounted() {
110
107
  this.setAlphaSliderBackground(this.computedBgColor);
111
-
112
108
  if (this.$el) {
113
109
  this.draggable = this.$refs.draggable;
114
110
  this.gradientWrapper = this.draggable && this.draggable.element;
115
111
  }
116
-
117
112
  this.alphaSlider = this.v3 ? this.alphaSliderRef : this.$refs.alphaSlider;
118
-
119
113
  if (this.isFirstRender) {
120
114
  this.isFirstRender = false;
121
115
  }
@@ -136,19 +130,15 @@ var ColorGradientVue2 = {
136
130
  // @ts-ignore
137
131
  render: function render(createElement) {
138
132
  var _this2 = this;
139
-
140
133
  var _this = this;
141
-
142
134
  var h = gh || createElement;
143
135
  var className = classNames('k-colorgradient', {
144
136
  'k-disabled': this.$props.disabled
145
137
  });
146
138
  var localizationService = provideLocalizationService(this);
147
139
  var dragHandle = localizationService.toLanguageString(colorGradientDragHandle, messages[colorGradientDragHandle]);
148
-
149
140
  var renderRectangleDragHandle = function renderRectangleDragHandle() {
150
141
  var style = {};
151
-
152
142
  if (!this.isFirstRender) {
153
143
  var gradientRectMetrics = this.getGradientRectMetrics();
154
144
  var top_1 = (1 - this.hsva.v) * gradientRectMetrics.height;
@@ -156,7 +146,6 @@ var ColorGradientVue2 = {
156
146
  style.top = "".concat(top_1, "px");
157
147
  style.left = "".concat(left, "px");
158
148
  }
159
-
160
149
  return h("div", {
161
150
  "class": "k-hsv-draghandle k-draghandle",
162
151
  role: "slider",
@@ -179,7 +168,6 @@ var ColorGradientVue2 = {
179
168
  ref: setRef(this, 'draghandle')
180
169
  });
181
170
  };
182
-
183
171
  return h("div", {
184
172
  id: this.$props.id,
185
173
  attrs: this.v3 ? undefined : {
@@ -211,7 +199,8 @@ var ColorGradientVue2 = {
211
199
  style: {
212
200
  background: this.computedBgColor
213
201
  }
214
- }, [// @ts-ignore function children
202
+ }, [
203
+ // @ts-ignore function children
215
204
  h(Draggable, {
216
205
  onDrag: this.onDrag,
217
206
  on: this.v3 ? undefined : {
@@ -342,11 +331,9 @@ var ColorGradientVue2 = {
342
331
  methods: {
343
332
  onKeyDownHandler: function onKeyDownHandler(e) {
344
333
  var element = this.$el;
345
-
346
334
  if (this.innerTabIndex === undefined) {
347
335
  this.focused = focusContainer(e, element);
348
336
  }
349
-
350
337
  this.$emit('keydown', e);
351
338
  },
352
339
  onHexChange: function onHexChange(hex, value, event) {
@@ -387,25 +374,20 @@ var ColorGradientVue2 = {
387
374
  },
388
375
  onGradientWrapperClick: function onGradientWrapperClick(event) {
389
376
  this.firstFocusable = getRef(this, 'draghandle');
390
-
391
377
  if (this.firstFocusable) {
392
378
  this.firstFocusable.focus();
393
379
  }
394
-
395
380
  this.changePosition(event);
396
381
  },
397
382
  move: function move(e, prop, d) {
398
383
  var c = this.hsva;
399
384
  c[prop] += d * (e.shiftKey ? 0.01 : 0.05);
400
-
401
385
  if (c[prop] < 0) {
402
386
  c[prop] = 0;
403
387
  }
404
-
405
388
  if (c[prop] > 1) {
406
389
  c[prop] = 1;
407
390
  }
408
-
409
391
  e.preventDefault();
410
392
  this.handleHsvaChange(c, e);
411
393
  },
@@ -414,25 +396,19 @@ var ColorGradientVue2 = {
414
396
  case Keys.left:
415
397
  this.move(e, 's', -1);
416
398
  break;
417
-
418
399
  case Keys.right:
419
400
  this.move(e, 's', 1);
420
401
  break;
421
-
422
402
  case Keys.up:
423
403
  this.move(e, 'v', 1);
424
404
  break;
425
-
426
405
  case Keys.down:
427
406
  this.move(e, 'v', -1);
428
407
  break;
429
-
430
408
  case Keys.enter:
431
409
  break;
432
-
433
410
  case Keys.esc:
434
411
  break;
435
-
436
412
  default:
437
413
  break;
438
414
  }
@@ -503,7 +479,6 @@ var ColorGradientVue2 = {
503
479
  },
504
480
  focus: function focus() {
505
481
  var _this = this;
506
-
507
482
  this.focused = true;
508
483
  setTimeout(function () {
509
484
  focusFirstFocusableChild(_this.$el);
@@ -514,6 +489,5 @@ var ColorGradientVue2 = {
514
489
  /**
515
490
  * @hidden
516
491
  */
517
-
518
492
  var ColorGradient = ColorGradientVue2;
519
493
  export { ColorGradient, ColorGradientVue2 };
@@ -2,19 +2,15 @@ var __assign = this && this.__assign || function () {
2
2
  __assign = Object.assign || function (t) {
3
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
4
4
  s = arguments[i];
5
-
6
5
  for (var p in s) {
7
6
  if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
8
7
  }
9
8
  }
10
-
11
9
  return t;
12
10
  };
13
-
14
11
  return __assign.apply(this, arguments);
15
- }; // @ts-ignore
16
-
17
-
12
+ };
13
+ // @ts-ignore
18
14
  import * as Vue from 'vue';
19
15
  var allVue = Vue;
20
16
  var gh = allVue.h;
@@ -29,12 +25,10 @@ import { guid, Keys } from '@progress/kendo-vue-common';
29
25
  /**
30
26
  * @hidden
31
27
  */
32
-
33
28
  var modes = ['rgba', 'rgb', 'hex'];
34
29
  /**
35
30
  * @hidden
36
31
  */
37
-
38
32
  var ColorInputVue2 = {
39
33
  name: 'KendoColorInput',
40
34
  // @ts-ignore
@@ -138,7 +132,8 @@ var ColorInputVue2 = {
138
132
  },
139
133
  disabled: this.$props.disabled,
140
134
  ref: 'hexinput'
141
- })]), // @ts-ignore function children
135
+ })]),
136
+ // @ts-ignore function children
142
137
  h(Label, {
143
138
  "class": "k-colorgradient-input-label",
144
139
  "for": this.hexInputId,
@@ -174,7 +169,8 @@ var ColorInputVue2 = {
174
169
  "change": this.onRgbaRChange
175
170
  },
176
171
  disabled: this.$props.disabled
177
- }), // @ts-ignore function children
172
+ }),
173
+ // @ts-ignore function children
178
174
  h(Label, {
179
175
  "class": "k-colorgradient-input-label"
180
176
  }, this.v3 ? function () {
@@ -206,7 +202,8 @@ var ColorInputVue2 = {
206
202
  "change": this.onRgbaGChange
207
203
  },
208
204
  disabled: this.$props.disabled
209
- }), // @ts-ignore function children
205
+ }),
206
+ // @ts-ignore function children
210
207
  h(Label, {
211
208
  "class": "k-colorgradient-input-label"
212
209
  }, this.v3 ? function () {
@@ -239,7 +236,8 @@ var ColorInputVue2 = {
239
236
  },
240
237
  disabled: this.$props.disabled,
241
238
  ref: 'numericb'
242
- }), // @ts-ignore function children
239
+ }),
240
+ // @ts-ignore function children
243
241
  h(Label, {
244
242
  "class": "k-colorgradient-input-label"
245
243
  }, this.v3 ? function () {
@@ -274,7 +272,8 @@ var ColorInputVue2 = {
274
272
  },
275
273
  disabled: this.$props.disabled,
276
274
  ref: 'numerica'
277
- }), this.$props.opacity && // @ts-ignore function children
275
+ }), this.$props.opacity &&
276
+ // @ts-ignore function children
278
277
  h(Label, {
279
278
  "class": "k-colorgradient-input-label"
280
279
  }, this.v3 ? function () {
@@ -307,28 +306,22 @@ var ColorInputVue2 = {
307
306
  },
308
307
  dispatchRgbaChange: function dispatchRgbaChange(newValue, event) {
309
308
  var rgba = __assign({}, this.$props.rgba);
310
-
311
309
  if (newValue.r !== undefined) {
312
310
  rgba.r = newValue.r;
313
311
  }
314
-
315
312
  if (newValue.g !== undefined) {
316
313
  rgba.g = newValue.g;
317
314
  }
318
-
319
315
  if (newValue.b !== undefined) {
320
316
  rgba.b = newValue.b;
321
317
  }
322
-
323
318
  if (newValue.a !== undefined) {
324
319
  rgba.a = newValue.a;
325
320
  }
326
-
327
321
  this.$emit('rgbachange', rgba, event);
328
322
  },
329
323
  onToggleModeChange: function onToggleModeChange() {
330
324
  var index = modes.length - 1 === modes.indexOf(this.inputMode) ? 0 : modes.indexOf(this.inputMode) + 1;
331
-
332
325
  if (!this.$props.opacity) {
333
326
  var nextIndex = modes[index] === 'rgba' ? index + 1 : index;
334
327
  this.inputMode = modes[nextIndex];
@@ -346,6 +339,5 @@ var ColorInputVue2 = {
346
339
  /**
347
340
  * @hidden
348
341
  */
349
-
350
342
  var ColorInput = ColorInputVue2;
351
343
  export { ColorInput, ColorInputVue2 };
@@ -12,22 +12,18 @@ import { parseColor } from './utils/color-parser';
12
12
  /**
13
13
  * @hidden
14
14
  */
15
-
16
15
  export var DEFAULT_TILE_SIZE = 24;
17
16
  /**
18
17
  * @hidden
19
18
  */
20
-
21
19
  export var DEFAULT_COLUMNS_COUNT = 10;
22
20
  /**
23
21
  * @hidden
24
22
  */
25
-
26
23
  export var DEFAULT_PRESET = 'office';
27
24
  /**
28
25
  * @hidden
29
26
  */
30
-
31
27
  var ColorPaletteVue2 = {
32
28
  name: 'KendoColorPalette',
33
29
  model: {
@@ -108,7 +104,6 @@ var ColorPaletteVue2 = {
108
104
  var className = classNames('k-colorpalette', {
109
105
  'k-disabled': this.$props.disabled
110
106
  });
111
-
112
107
  var renderColumns = function renderColumns(columns, rowIndex, cSelectedCellCoords, cFocusedCellCoords) {
113
108
  var rowIsSelected = cSelectedCellCoords !== undefined && cSelectedCellCoords.row === rowIndex;
114
109
  var selectedColumn = cSelectedCellCoords && cSelectedCellCoords.col;
@@ -122,7 +117,6 @@ var ColorPaletteVue2 = {
122
117
  var height = tileSize.height + 'px';
123
118
  return columns.map(function (color, i) {
124
119
  var _this = this;
125
-
126
120
  var isSelected = rowIsSelected && selectedColumn === i;
127
121
  var tdClassName = classNames('k-colorpalette-tile', {
128
122
  'k-selected': isSelected,
@@ -164,7 +158,6 @@ var ColorPaletteVue2 = {
164
158
  });
165
159
  }, this);
166
160
  };
167
-
168
161
  var renderRows = function renderRows(rows, rSelectedCellCoords, rFocusedCellCoords) {
169
162
  return rows.map(function (row, i) {
170
163
  return h("tr", {
@@ -176,7 +169,6 @@ var ColorPaletteVue2 = {
176
169
  }, [renderColumns.call(this, row, i, rSelectedCellCoords, rFocusedCellCoords)]);
177
170
  }, this);
178
171
  };
179
-
180
172
  if (paletteInfo.colors.length) {
181
173
  return h("div", {
182
174
  id: this.$props.id,
@@ -231,28 +223,22 @@ var ColorPaletteVue2 = {
231
223
  case Keys.down:
232
224
  this.handleCellNavigation(event, 0, 1);
233
225
  break;
234
-
235
226
  case Keys.up:
236
227
  this.handleCellNavigation(event, 0, -1);
237
228
  break;
238
-
239
229
  case Keys.right:
240
230
  this.handleCellNavigation(event, 1, 0);
241
231
  break;
242
-
243
232
  case Keys.left:
244
233
  this.handleCellNavigation(event, -1, 0);
245
234
  break;
246
-
247
235
  case Keys.enter:
248
236
  this.handleEnter(event);
249
237
  break;
250
-
251
238
  default:
252
239
  this.$emit('keydown', event);
253
240
  return;
254
241
  }
255
-
256
242
  this.$emit('keydown', event);
257
243
  },
258
244
  onColorClick: function onColorClick(color, event) {
@@ -262,7 +248,6 @@ var ColorPaletteVue2 = {
262
248
  } else {
263
249
  this.focusedColor = color;
264
250
  }
265
-
266
251
  this.dispatchChangeEvent(color, event);
267
252
  },
268
253
  onFocus: function onFocus(event) {
@@ -281,7 +266,6 @@ var ColorPaletteVue2 = {
281
266
  },
282
267
  handleCellNavigation: function handleCellNavigation(event, horizontalStep, verticalStep) {
283
268
  event.preventDefault();
284
-
285
269
  if (this.focusedColorCooridanates) {
286
270
  var newCoords = this.paletteService.getNextCell(this.focusedColorCooridanates, horizontalStep, verticalStep);
287
271
  this.focusedColor = this.paletteService.getColorAt(newCoords);
@@ -293,7 +277,6 @@ var ColorPaletteVue2 = {
293
277
  if (this.isUncontrolled) {
294
278
  this.currentValue = this.focusedColor;
295
279
  }
296
-
297
280
  this.dispatchChangeEvent(this.focusedColor, event);
298
281
  },
299
282
  dispatchChangeEvent: function dispatchChangeEvent(value, event) {
@@ -311,7 +294,6 @@ var ColorPaletteVue2 = {
311
294
  getPaletteInfo: function getPaletteInfo() {
312
295
  if (typeof this.$props.palette === 'string') {
313
296
  var preset = PALETTEPRESETS[this.$props.palette];
314
-
315
297
  if (isPresent(preset)) {
316
298
  return {
317
299
  colors: preset.colors,
@@ -338,6 +320,5 @@ var ColorPaletteVue2 = {
338
320
  /**
339
321
  * @hidden
340
322
  */
341
-
342
323
  var ColorPalette = ColorPaletteVue2;
343
324
  export { ColorPalette, ColorPaletteVue2 };