@progress/kendo-vue-inputs 3.3.3 → 3.3.5-dev.202206141337

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 (100) hide show
  1. package/dist/cdn/js/kendo-vue-inputs.js +1 -1
  2. package/dist/es/additionalTypes.ts +11 -0
  3. package/dist/es/checkbox/Checkbox.d.ts +7 -1
  4. package/dist/es/checkbox/Checkbox.js +8 -0
  5. package/dist/es/colors/ColorPalette.d.ts +6 -0
  6. package/dist/es/colors/ColorPalette.js +8 -1
  7. package/dist/es/colors/ColorPicker.d.ts +6 -0
  8. package/dist/es/colors/ColorPicker.js +8 -1
  9. package/dist/es/colors/Picker.d.ts +6 -0
  10. package/dist/es/colors/Picker.js +8 -1
  11. package/dist/es/colors/interfaces/ColorPaletteChangeEvent.d.ts +3 -0
  12. package/dist/es/colors/interfaces/ColorPaletteProps.d.ts +4 -13
  13. package/dist/es/colors/interfaces/ColorPickerActiveColorClick.d.ts +3 -0
  14. package/dist/es/colors/interfaces/ColorPickerBlurEvent.d.ts +3 -0
  15. package/dist/es/colors/interfaces/ColorPickerChangeEvent.d.ts +3 -0
  16. package/dist/es/colors/interfaces/ColorPickerFocusEvent.d.ts +3 -0
  17. package/dist/es/colors/interfaces/ColorPickerPaletteSettings.d.ts +3 -0
  18. package/dist/es/colors/interfaces/ColorPickerPopupSettings.d.ts +3 -0
  19. package/dist/es/colors/interfaces/ColorPickerProps.d.ts +5 -2
  20. package/dist/es/colors/interfaces/ColorPickerView.d.ts +3 -0
  21. package/dist/es/input/Input.d.ts +19 -9
  22. package/dist/es/input/Input.js +19 -3
  23. package/dist/es/input-separator/InputSeparator.d.ts +19 -0
  24. package/dist/es/input-separator/InputSeparator.js +35 -0
  25. package/dist/es/main.d.ts +1 -0
  26. package/dist/es/main.js +1 -0
  27. package/dist/es/maskedtextbox/MaskedTextBox.d.ts +4 -1
  28. package/dist/es/maskedtextbox/MaskedTextBox.js +95 -20
  29. package/dist/es/maskedtextbox/MaskedTextBoxProps.d.ts +32 -0
  30. package/dist/es/numerictextbox/NumericTextBox.d.ts +6 -0
  31. package/dist/es/numerictextbox/NumericTextBox.js +101 -8
  32. package/dist/es/numerictextbox/interfaces/NumericTextBoxProps.d.ts +43 -3
  33. package/dist/es/package-metadata.js +1 -1
  34. package/dist/es/radiobutton/RadioButton.d.ts +7 -1
  35. package/dist/es/radiobutton/RadioButton.js +8 -0
  36. package/dist/es/radiobutton/RadioGroup.d.ts +7 -1
  37. package/dist/es/radiobutton/RadioGroup.js +8 -0
  38. package/dist/es/range-slider/RangeSlider.d.ts +8 -0
  39. package/dist/es/range-slider/RangeSlider.js +10 -0
  40. package/dist/es/slider/Slider.d.ts +8 -2
  41. package/dist/es/slider/Slider.js +8 -0
  42. package/dist/es/slider/SliderLabel.d.ts +8 -0
  43. package/dist/es/slider/SliderLabel.js +10 -1
  44. package/dist/es/switch/Switch.d.ts +8 -0
  45. package/dist/es/switch/Switch.js +10 -1
  46. package/dist/es/textarea/TextArea.d.ts +36 -0
  47. package/dist/es/textarea/TextArea.js +113 -28
  48. package/dist/es/textarea/interfaces/TextAreaProps.d.ts +39 -0
  49. package/dist/npm/additionalTypes.ts +11 -0
  50. package/dist/npm/checkbox/Checkbox.d.ts +7 -1
  51. package/dist/npm/checkbox/Checkbox.js +8 -0
  52. package/dist/npm/colors/ColorPalette.d.ts +6 -0
  53. package/dist/npm/colors/ColorPalette.js +8 -1
  54. package/dist/npm/colors/ColorPicker.d.ts +6 -0
  55. package/dist/npm/colors/ColorPicker.js +8 -1
  56. package/dist/npm/colors/Picker.d.ts +6 -0
  57. package/dist/npm/colors/Picker.js +8 -1
  58. package/dist/npm/colors/interfaces/ColorPaletteChangeEvent.d.ts +3 -0
  59. package/dist/npm/colors/interfaces/ColorPaletteProps.d.ts +4 -13
  60. package/dist/npm/colors/interfaces/ColorPickerActiveColorClick.d.ts +3 -0
  61. package/dist/npm/colors/interfaces/ColorPickerBlurEvent.d.ts +3 -0
  62. package/dist/npm/colors/interfaces/ColorPickerChangeEvent.d.ts +3 -0
  63. package/dist/npm/colors/interfaces/ColorPickerFocusEvent.d.ts +3 -0
  64. package/dist/npm/colors/interfaces/ColorPickerPaletteSettings.d.ts +3 -0
  65. package/dist/npm/colors/interfaces/ColorPickerPopupSettings.d.ts +3 -0
  66. package/dist/npm/colors/interfaces/ColorPickerProps.d.ts +5 -2
  67. package/dist/npm/colors/interfaces/ColorPickerView.d.ts +3 -0
  68. package/dist/npm/input/Input.d.ts +19 -9
  69. package/dist/npm/input/Input.js +19 -3
  70. package/dist/npm/input-separator/InputSeparator.d.ts +19 -0
  71. package/dist/npm/input-separator/InputSeparator.js +46 -0
  72. package/dist/npm/main.d.ts +1 -0
  73. package/dist/npm/main.js +1 -0
  74. package/dist/npm/maskedtextbox/MaskedTextBox.d.ts +4 -1
  75. package/dist/npm/maskedtextbox/MaskedTextBox.js +94 -19
  76. package/dist/npm/maskedtextbox/MaskedTextBoxProps.d.ts +32 -0
  77. package/dist/npm/numerictextbox/NumericTextBox.d.ts +6 -0
  78. package/dist/npm/numerictextbox/NumericTextBox.js +100 -7
  79. package/dist/npm/numerictextbox/interfaces/NumericTextBoxProps.d.ts +43 -3
  80. package/dist/npm/package-metadata.js +1 -1
  81. package/dist/npm/radiobutton/RadioButton.d.ts +7 -1
  82. package/dist/npm/radiobutton/RadioButton.js +8 -0
  83. package/dist/npm/radiobutton/RadioGroup.d.ts +7 -1
  84. package/dist/npm/radiobutton/RadioGroup.js +8 -0
  85. package/dist/npm/range-slider/RangeSlider.d.ts +8 -0
  86. package/dist/npm/range-slider/RangeSlider.js +10 -0
  87. package/dist/npm/slider/Slider.d.ts +8 -2
  88. package/dist/npm/slider/Slider.js +8 -0
  89. package/dist/npm/slider/SliderLabel.d.ts +8 -0
  90. package/dist/npm/slider/SliderLabel.js +10 -1
  91. package/dist/npm/switch/Switch.d.ts +8 -0
  92. package/dist/npm/switch/Switch.js +10 -1
  93. package/dist/npm/textarea/TextArea.d.ts +36 -0
  94. package/dist/npm/textarea/TextArea.js +112 -27
  95. package/dist/npm/textarea/interfaces/TextAreaProps.d.ts +39 -0
  96. package/package.json +10 -10
  97. package/dist/es/numerictextbox/interfaces/NumericTextBoxHandle.d.ts +0 -39
  98. package/dist/es/numerictextbox/interfaces/NumericTextBoxHandle.js +0 -0
  99. package/dist/npm/numerictextbox/interfaces/NumericTextBoxHandle.d.ts +0 -39
  100. package/dist/npm/numerictextbox/interfaces/NumericTextBoxHandle.js +0 -5
@@ -28,7 +28,10 @@ var gh = allVue.h;
28
28
 
29
29
  var kendo_vue_common_1 = require("@progress/kendo-vue-common");
30
30
 
31
- var package_metadata_1 = require("../package-metadata"); // tslint:enable:max-line-length
31
+ var package_metadata_1 = require("../package-metadata");
32
+ /**
33
+ * @hidden
34
+ */
32
35
 
33
36
 
34
37
  var TextAreaVue2 = {
@@ -93,7 +96,15 @@ var TextAreaVue2 = {
93
96
  validityStyles: {
94
97
  type: Boolean,
95
98
  default: true
96
- }
99
+ },
100
+ iconName: String,
101
+ inputPrefix: kendo_vue_common_1.templateDefinition,
102
+ inputSuffix: kendo_vue_common_1.templateDefinition,
103
+ showValidationIcon: Boolean,
104
+ showLoadingIcon: Boolean,
105
+ showClearButton: Boolean,
106
+ inputClass: String,
107
+ wrapperClass: String
97
108
  },
98
109
  created: function created() {
99
110
  kendo_vue_common_1.validatePackage(package_metadata_1.packageMetadata);
@@ -107,12 +118,20 @@ var TextAreaVue2 = {
107
118
  size = _b.size,
108
119
  fillMode = _b.fillMode,
109
120
  rounded = _b.rounded,
110
- required = _b.required;
121
+ required = _b.required,
122
+ showLoadingIcon = _b.showLoadingIcon;
111
123
  var invalid = this.validityStyles === true ? !this.isValid : false;
112
124
  return _a = {
113
125
  'k-input': true,
114
126
  'k-textarea': true
115
- }, _a["k-input-" + (kendo_vue_common_1.kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-input-" + fillMode] = fillMode, _a["k-rounded-" + (kendo_vue_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-disabled'] = this.$props.disabled, _a['k-invalid'] = invalid, _a['k-required'] = required, _a;
127
+ }, _a["k-input-" + (kendo_vue_common_1.kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-input-" + fillMode] = fillMode, _a["k-rounded-" + (kendo_vue_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-disabled'] = this.$props.disabled, _a['k-invalid'] = invalid, _a['k-required'] = required, _a['k-loading'] = showLoadingIcon, _a[this.wrapperClass] = this.wrapperClass, _a;
128
+ },
129
+ inputInnerClass: function inputInnerClass() {
130
+ var _a;
131
+
132
+ return _a = {
133
+ 'k-input-inner': true
134
+ }, _a[this.inputClass] = this.inputClass, _a;
116
135
  },
117
136
  computedValue: function computedValue() {
118
137
  return this.$props.value !== undefined ? this.$props.value : this.$props.modelValue !== undefined ? this.$props.modelValue : this.currentValue;
@@ -160,7 +179,11 @@ var TextAreaVue2 = {
160
179
  id = _a.id,
161
180
  name = _a.name,
162
181
  placeholder = _a.placeholder,
163
- tabIndex = _a.tabIndex;
182
+ tabIndex = _a.tabIndex,
183
+ iconName = _a.iconName,
184
+ showValidationIcon = _a.showValidationIcon,
185
+ showLoadingIcon = _a.showLoadingIcon,
186
+ showClearButton = _a.showClearButton;
164
187
 
165
188
  var textAreaAttrs = __assign({
166
189
  id: id || this.calculatedId,
@@ -177,9 +200,27 @@ var TextAreaVue2 = {
177
200
  'aria-disabled': disabled || undefined
178
201
  }, this.$attrs);
179
202
 
203
+ var inputPrefixTemplate = kendo_vue_common_1.templateRendering.call(this, this.$props.inputPrefix, kendo_vue_common_1.getListeners.call(this));
204
+ var inputSuffixTemplate = kendo_vue_common_1.templateRendering.call(this, this.$props.inputSuffix, kendo_vue_common_1.getListeners.call(this));
205
+ var inputPrefix = kendo_vue_common_1.getTemplate.call(this, {
206
+ h: h,
207
+ template: inputPrefixTemplate,
208
+ additionalProps: {
209
+ value: this.computedValue,
210
+ valid: this.isValid
211
+ }
212
+ });
213
+ var inputSuffix = kendo_vue_common_1.getTemplate.call(this, {
214
+ h: h,
215
+ template: inputSuffixTemplate,
216
+ additionalProps: {
217
+ value: this.computedValue,
218
+ valid: this.isValid
219
+ }
220
+ });
180
221
  var textarea = h('textarea', __assign(__assign({}, textAreaAttrs), {
181
222
  attrs: this.v3 ? undefined : textAreaAttrs,
182
- 'class': 'k-input-inner',
223
+ class: this.inputInnerClass,
183
224
  ref: this.v3 ? function (el) {
184
225
  _this.elementRef = el;
185
226
  } : 'element',
@@ -210,7 +251,27 @@ var TextAreaVue2 = {
210
251
  dir: this.currentDir
211
252
  },
212
253
  style: this.$attrs.style
213
- }, [textarea]);
254
+ }, [iconName && h("span", {
255
+ "class": "k-input-icon k-icon k-i-" + iconName
256
+ }), this.$props.inputPrefix && h("span", {
257
+ "class": "k-input-prefix"
258
+ }, [inputPrefix]), textarea, this.$props.inputSuffix && h("span", {
259
+ "class": "k-input-suffix"
260
+ }, [inputSuffix]), showValidationIcon && this.isValid && h("span", {
261
+ "class": "k-input-validation-icon k-icon k-i-check"
262
+ }), showValidationIcon && !this.isValid && h("span", {
263
+ "class": "k-input-validation-icon k-icon k-i-warning"
264
+ }), showLoadingIcon && h("span", {
265
+ "class": "k-input-loading-icon k-icon k-i-loading"
266
+ }), showClearButton && this.computedValue && h("span", {
267
+ onClick: this.clearClick,
268
+ on: this.v3 ? undefined : {
269
+ "click": this.clearClick
270
+ },
271
+ "class": "k-clear-value"
272
+ }, [h("span", {
273
+ "class": "k-icon k-i-x"
274
+ })])]);
214
275
  },
215
276
  methods: {
216
277
  setValidity: function setValidity() {
@@ -222,13 +283,16 @@ var TextAreaVue2 = {
222
283
  this.textAreaHeight = this.element.scrollHeight + "px";
223
284
  }
224
285
  },
286
+ clearClick: function clearClick(event) {
287
+ this.emitUpdate(event, 'change', '');
288
+ },
225
289
  focus: function focus() {
226
290
  if (this.element) {
227
291
  this.element.focus();
228
292
  }
229
293
  },
230
- handleChange: function handleChange(event) {
231
- var newValue = event.target.value;
294
+ emitUpdate: function emitUpdate(event, eventName, value) {
295
+ var newValue = value;
232
296
 
233
297
  if (!this.$props.disabled) {
234
298
  this.textAreaHeight = 'auto';
@@ -238,7 +302,7 @@ var TextAreaVue2 = {
238
302
  if (!this.$props.disabled) {
239
303
  this.$emit('changemodel', newValue);
240
304
  this.$emit('update:modelValue', newValue);
241
- this.$emit('change', {
305
+ this.$emit(eventName, {
242
306
  event: event,
243
307
  component: this,
244
308
  name: this.element.name,
@@ -246,24 +310,11 @@ var TextAreaVue2 = {
246
310
  });
247
311
  }
248
312
  },
313
+ handleChange: function handleChange(event) {
314
+ this.emitUpdate(event, 'change', event.target.value);
315
+ },
249
316
  handleInput: function handleInput(event) {
250
- var newValue = event.target.value;
251
-
252
- if (!this.$props.disabled) {
253
- this.textAreaHeight = 'auto';
254
- this.currentValue = newValue;
255
- }
256
-
257
- if (!this.$props.disabled) {
258
- this.$emit('changemodel', newValue);
259
- this.$emit('update:modelValue', newValue);
260
- this.$emit('input', {
261
- event: event,
262
- component: this,
263
- name: this.element.name,
264
- value: newValue
265
- });
266
- }
317
+ this.emitUpdate(event, 'input', event.target.value);
267
318
  },
268
319
  handleFocus: function handleFocus(event) {
269
320
  if (!this.$props.disabled) {
@@ -286,5 +337,39 @@ var TextAreaVue2 = {
286
337
  }
287
338
  };
288
339
  exports.TextAreaVue2 = TextAreaVue2;
340
+ /**
341
+ * Represents the [Kendo UI for Vue Native TextArea component]({% slug overview_textarea %}).
342
+ *
343
+ * Accepts properties of type [TextAreaProps]({% slug api_inputs_textareaprops %}).
344
+ * Obtaining the `ref` returns an object of type [TextAreaHandle]({% slug api_inputs_textareahandle %}).
345
+ *
346
+ *
347
+ * ```jsx
348
+ * <template>
349
+ * <k-form
350
+ * @submit="handleSubmit">
351
+ * <formcontent />
352
+ * </k-form>
353
+ * </template>
354
+ * <script>
355
+ * import { Form } from "@progress/kendo-vue-form";
356
+ * import FormContent from './FormContent.vue';
357
+ *
358
+ * export default {
359
+ * components: {
360
+ * 'k-form': Form,
361
+ * 'formcontent': FormContent
362
+ * },
363
+ * methods: {
364
+ * handleSubmit (dataItem) {
365
+ * alert(JSON.stringify(dataItem, null, 2));
366
+ * }
367
+ * }
368
+ * };
369
+ *
370
+ * </script>
371
+ * ```
372
+ */
373
+
289
374
  var TextArea = TextAreaVue2;
290
375
  exports.TextArea = TextArea;
@@ -105,7 +105,46 @@ export interface TextAreaProps extends FormComponentProps {
105
105
  * Sets the value to be submitted ([see example]({% slug controlled_textarea %})).
106
106
  */
107
107
  value?: string | string[] | number;
108
+ /**
109
+ * If set to `false`, no visual representation of the invalid state of the component will be applied.
110
+ *
111
+ * This property is part of the [FormComponentProps]({% slug api_common_formcomponentprops %}) interface.
112
+ *
113
+ * @default true
114
+ */
108
115
  validityStyles?: boolean;
116
+ /**
117
+ * Defines a string prop that controls the input icon.
118
+ */
119
+ iconName?: String;
120
+ /**
121
+ * Defines if the inputPrefix will be shown. Accepts a slot name, a `render` function, or a Vue component.
122
+ */
123
+ inputPrefix?: Boolean | String | Object | Function;
124
+ /**
125
+ * Defines if the inputSuffix will be shown. Accepts a slot name, a `render` function, or a Vue component.
126
+ */
127
+ inputSuffix?: Boolean | String | Object | Function;
128
+ /**
129
+ * Defines a boolean prop that controls whether to show the validation icon. Defaults to 'false'.
130
+ */
131
+ showValidationIcon?: Boolean;
132
+ /**
133
+ * Defines a boolean prop that controls whether to show the loading icon. Defaults to 'false'.
134
+ */
135
+ showLoadingIcon?: Boolean;
136
+ /**
137
+ * Defines a boolean prop that controls whether to show the clear icon. Defaults to 'false'.
138
+ */
139
+ showClearButton?: Boolean;
140
+ /**
141
+ * Defines additional class to the wrapper element.
142
+ */
143
+ wrapperClass?: String;
144
+ /**
145
+ * Defines additional class to the input element.
146
+ */
147
+ inputClass?: String;
109
148
  /**
110
149
  * The event handler that will be fired when the changes the selected value.
111
150
  */
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.3.3",
4
+ "version": "3.3.5-dev.202206141337",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/telerik/kendo-vue.git"
@@ -38,21 +38,21 @@
38
38
  "vue": "^2.6.12 || ^3.0.2"
39
39
  },
40
40
  "dependencies": {
41
- "@progress/kendo-vue-buttons": "3.3.3",
42
- "@progress/kendo-vue-common": "3.3.3",
43
- "@progress/kendo-vue-labels": "3.3.3",
44
- "@progress/kendo-vue-popup": "3.3.3"
41
+ "@progress/kendo-vue-buttons": "3.3.5-dev.202206141337",
42
+ "@progress/kendo-vue-common": "3.3.5-dev.202206141337",
43
+ "@progress/kendo-vue-labels": "3.3.5-dev.202206141337",
44
+ "@progress/kendo-vue-popup": "3.3.5-dev.202206141337"
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.3.3",
52
- "@progress/kendo-vue-form": "3.3.3",
53
- "@progress/kendo-vue-intl": "3.3.3",
54
- "@progress/kendo-vue-labels": "3.3.3",
55
- "@progress/kendo-vue-tooltip": "3.3.3",
51
+ "@progress/kendo-vue-buttons": "3.3.5-dev.202206141337",
52
+ "@progress/kendo-vue-form": "3.3.5-dev.202206141337",
53
+ "@progress/kendo-vue-intl": "3.3.5-dev.202206141337",
54
+ "@progress/kendo-vue-labels": "3.3.5-dev.202206141337",
55
+ "@progress/kendo-vue-tooltip": "3.3.5-dev.202206141337",
56
56
  "cldr-core": "^34.0.0",
57
57
  "cldr-dates-full": "^34.0.0",
58
58
  "cldr-numbers-full": "^34.0.0"
@@ -1,39 +0,0 @@
1
- import { FormComponentValidity } from '@progress/kendo-vue-common';
2
- import { NumericTextBoxProps } from './NumericTextBoxProps';
3
- /**
4
- * The NumericTextBox ref.
5
- */
6
- export interface NumericTextBoxHandle {
7
- /**
8
- * The NumericTextBox element.
9
- */
10
- element: any;
11
- /**
12
- * Focus the NumericTextBox.
13
- */
14
- focus: () => void;
15
- /**
16
- * Gets the `name` property of the NumericTextBox.
17
- */
18
- name: string | undefined;
19
- /**
20
- * Gets the value of the NumericTextBox.
21
- */
22
- value: number | null;
23
- /**
24
- * Represents the validity state into which the NumericTextBox is set.
25
- */
26
- validity: FormComponentValidity;
27
- /**
28
- * @hidden
29
- */
30
- props: NumericTextBoxProps;
31
- /**
32
- * @hidden
33
- */
34
- validityStyles: boolean;
35
- /**
36
- * @hidden
37
- */
38
- required: boolean;
39
- }
@@ -1,39 +0,0 @@
1
- import { FormComponentValidity } from '@progress/kendo-vue-common';
2
- import { NumericTextBoxProps } from './NumericTextBoxProps';
3
- /**
4
- * The NumericTextBox ref.
5
- */
6
- export interface NumericTextBoxHandle {
7
- /**
8
- * The NumericTextBox element.
9
- */
10
- element: any;
11
- /**
12
- * Focus the NumericTextBox.
13
- */
14
- focus: () => void;
15
- /**
16
- * Gets the `name` property of the NumericTextBox.
17
- */
18
- name: string | undefined;
19
- /**
20
- * Gets the value of the NumericTextBox.
21
- */
22
- value: number | null;
23
- /**
24
- * Represents the validity state into which the NumericTextBox is set.
25
- */
26
- validity: FormComponentValidity;
27
- /**
28
- * @hidden
29
- */
30
- props: NumericTextBoxProps;
31
- /**
32
- * @hidden
33
- */
34
- validityStyles: boolean;
35
- /**
36
- * @hidden
37
- */
38
- required: boolean;
39
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });