@progress/kendo-vue-inputs 2.8.0-dev.202201111325 → 3.0.0-dev.202201161025
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/colors/ColorPalette.js +7 -0
- package/dist/es/colors/ColorPicker.js +22 -13
- package/dist/es/input/Input.d.ts +1 -1
- package/dist/es/input/Input.js +21 -19
- 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/switch/Switch.d.ts +4 -0
- package/dist/es/switch/Switch.js +3 -7
- package/dist/npm/colors/ColorPalette.js +7 -0
- package/dist/npm/colors/ColorPicker.js +21 -12
- package/dist/npm/input/Input.d.ts +1 -1
- package/dist/npm/input/Input.js +20 -18
- 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/switch/Switch.d.ts +4 -0
- package/dist/npm/switch/Switch.js +3 -7
- package/package.json +10 -10
|
@@ -26,6 +26,13 @@ export var DEFAULT_PRESET = 'office'; // tslint:enable:max-line-length
|
|
|
26
26
|
|
|
27
27
|
var ColorPaletteVue2 = {
|
|
28
28
|
name: 'KendoColorPalette',
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
emits: {
|
|
31
|
+
'keydown': null,
|
|
32
|
+
'focus': null,
|
|
33
|
+
'blur': null,
|
|
34
|
+
'change': null
|
|
35
|
+
},
|
|
29
36
|
props: {
|
|
30
37
|
palette: {
|
|
31
38
|
type: [String, Array],
|
|
@@ -157,19 +157,21 @@ var ColorPickerVue2 = {
|
|
|
157
157
|
var h = gh || createElement;
|
|
158
158
|
var _b = this.$props,
|
|
159
159
|
disabled = _b.disabled,
|
|
160
|
-
tabIndex = _b.tabIndex
|
|
160
|
+
tabIndex = _b.tabIndex,
|
|
161
|
+
dir = _b.dir; // const dir = useDir(focusableElementGuid, props.dir);
|
|
161
162
|
|
|
162
163
|
return h("span", {
|
|
163
|
-
"class": this.wrapperClassName
|
|
164
|
-
,
|
|
165
|
-
id: this.$props.id,
|
|
164
|
+
"class": this.wrapperClassName,
|
|
165
|
+
dir: dir,
|
|
166
166
|
attrs: this.v3 ? undefined : {
|
|
167
|
+
dir: dir,
|
|
167
168
|
id: this.$props.id,
|
|
168
169
|
"aria-labelledby": this.$props.ariaLabelledBy,
|
|
169
170
|
"aria-describedby": this.$props.ariaDescribedBy,
|
|
170
171
|
tabIndex: getTabIndex(tabIndex, disabled),
|
|
171
172
|
title: this.$props.title
|
|
172
173
|
},
|
|
174
|
+
id: this.$props.id,
|
|
173
175
|
"aria-labelledby": this.$props.ariaLabelledBy,
|
|
174
176
|
"aria-describedby": this.$props.ariaDescribedBy,
|
|
175
177
|
ref: this.focusableElementGuid,
|
|
@@ -218,13 +220,14 @@ var ColorPickerVue2 = {
|
|
|
218
220
|
"class": "k-input-button",
|
|
219
221
|
icon: 'arrow-s'
|
|
220
222
|
}), // @ts-ignore function children
|
|
221
|
-
h(Picker
|
|
222
|
-
|
|
223
|
-
open: this.computedOpen,
|
|
223
|
+
h(Picker, {
|
|
224
|
+
dir: dir,
|
|
224
225
|
attrs: this.v3 ? undefined : {
|
|
226
|
+
dir: dir,
|
|
225
227
|
open: this.computedOpen,
|
|
226
228
|
popupAnchor: this.focusableElementGuid
|
|
227
229
|
},
|
|
230
|
+
open: this.computedOpen,
|
|
228
231
|
onOpen: this.onOpenHandler,
|
|
229
232
|
on: this.v3 ? undefined : {
|
|
230
233
|
"open": this.onOpenHandler
|
|
@@ -237,7 +240,8 @@ var ColorPickerVue2 = {
|
|
|
237
240
|
,
|
|
238
241
|
on: _this2.v3 ? undefined : {
|
|
239
242
|
"keydown": _this2.onKeyDownHandler,
|
|
240
|
-
"change": _this2.onPaletteChangeHandler
|
|
243
|
+
"change": _this2.onPaletteChangeHandler,
|
|
244
|
+
"blur": _this2.onBlurHandler
|
|
241
245
|
},
|
|
242
246
|
ref: _this2.v3 ? function (el) {
|
|
243
247
|
_this.paletteRef = el;
|
|
@@ -246,13 +250,15 @@ var ColorPickerVue2 = {
|
|
|
246
250
|
attrs: _this2.v3 ? undefined : {
|
|
247
251
|
value: _this2.computedValue || undefined
|
|
248
252
|
},
|
|
249
|
-
onChange: _this2.onPaletteChangeHandler
|
|
253
|
+
onChange: _this2.onPaletteChangeHandler,
|
|
254
|
+
onBlur: _this2.onBlurHandler
|
|
250
255
|
})];
|
|
251
256
|
} : [h(ColorPalette, {
|
|
252
257
|
onKeydown: _this2.onKeyDownHandler,
|
|
253
258
|
on: _this2.v3 ? undefined : {
|
|
254
259
|
"keydown": _this2.onKeyDownHandler,
|
|
255
|
-
"change": _this2.onPaletteChangeHandler
|
|
260
|
+
"change": _this2.onPaletteChangeHandler,
|
|
261
|
+
"blur": _this2.onBlurHandler
|
|
256
262
|
},
|
|
257
263
|
ref: _this2.v3 ? function (el) {
|
|
258
264
|
_this.paletteRef = el;
|
|
@@ -261,7 +267,8 @@ var ColorPickerVue2 = {
|
|
|
261
267
|
attrs: _this2.v3 ? undefined : {
|
|
262
268
|
value: _this2.computedValue || undefined
|
|
263
269
|
},
|
|
264
|
-
onChange: _this2.onPaletteChangeHandler
|
|
270
|
+
onChange: _this2.onPaletteChangeHandler,
|
|
271
|
+
onBlur: _this2.onBlurHandler
|
|
265
272
|
})])]);
|
|
266
273
|
},
|
|
267
274
|
methods: {
|
|
@@ -342,11 +349,13 @@ var ColorPickerVue2 = {
|
|
|
342
349
|
});
|
|
343
350
|
},
|
|
344
351
|
onBlurTimeout: function onBlurTimeout() {
|
|
345
|
-
|
|
352
|
+
var paleteIsFocused = this.palette && document.activeElement === this.palette.$el;
|
|
353
|
+
|
|
354
|
+
if (!paleteIsFocused) {
|
|
346
355
|
this.setOpen(false, true);
|
|
347
|
-
this.focused = false;
|
|
348
356
|
}
|
|
349
357
|
|
|
358
|
+
this.focused = paleteIsFocused;
|
|
350
359
|
this.blurTimeoutRef = undefined;
|
|
351
360
|
},
|
|
352
361
|
onBlurHandler: function onBlurHandler(event) {
|
package/dist/es/input/Input.d.ts
CHANGED
|
@@ -91,7 +91,6 @@ export interface InputMethods {
|
|
|
91
91
|
emitBlur?: (_: any) => void;
|
|
92
92
|
emitFocus?: (_: any) => void;
|
|
93
93
|
focus?: () => void;
|
|
94
|
-
inputClassNames: () => any;
|
|
95
94
|
validity: () => any;
|
|
96
95
|
isInvalid: (state: any) => any;
|
|
97
96
|
setValidity: () => void;
|
|
@@ -107,6 +106,7 @@ export interface InputComputed {
|
|
|
107
106
|
[key: string]: any;
|
|
108
107
|
computedValue?: any;
|
|
109
108
|
spanClassNames?: any;
|
|
109
|
+
inputWrapperClass?: any;
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
112
|
* @hidden
|
package/dist/es/input/Input.js
CHANGED
|
@@ -19,14 +19,13 @@ import * as Vue from 'vue';
|
|
|
19
19
|
var allVue = Vue;
|
|
20
20
|
var gh = allVue.h;
|
|
21
21
|
var ref = allVue.ref;
|
|
22
|
-
import { guid, noop, validatePackage } from '@progress/kendo-vue-common';
|
|
22
|
+
import { guid, noop, validatePackage, kendoThemeMaps } from '@progress/kendo-vue-common';
|
|
23
23
|
import { packageMetadata } from '../package-metadata';
|
|
24
24
|
import { FloatingLabel } from '@progress/kendo-vue-labels';
|
|
25
25
|
var InputVue2 = {
|
|
26
26
|
model: {
|
|
27
27
|
event: 'changemodel'
|
|
28
28
|
},
|
|
29
|
-
inheritAttrs: false,
|
|
30
29
|
// @ts-ignore
|
|
31
30
|
emits: {
|
|
32
31
|
'input': null,
|
|
@@ -137,12 +136,6 @@ var InputVue2 = {
|
|
|
137
136
|
var h = gh || createElement;
|
|
138
137
|
var listeners = this.v3 ? this.$attrs : this.$listeners;
|
|
139
138
|
var isValid = !this.$props.validityStyles || this.validity().valid;
|
|
140
|
-
var hasInput = Object.keys(this.$attrs).some(function (attr) {
|
|
141
|
-
return attr === 'onInput';
|
|
142
|
-
});
|
|
143
|
-
var hasModel = Object.keys(this.$attrs).some(function (attr) {
|
|
144
|
-
return attr === 'onUpdate:modelValue';
|
|
145
|
-
});
|
|
146
139
|
var _a = this.$props,
|
|
147
140
|
label = _a.label,
|
|
148
141
|
id = _a.id,
|
|
@@ -160,7 +153,7 @@ var InputVue2 = {
|
|
|
160
153
|
id: inputId,
|
|
161
154
|
required: required,
|
|
162
155
|
value: this.computedValue,
|
|
163
|
-
class:
|
|
156
|
+
class: 'k-input-inner',
|
|
164
157
|
ref: this.v3 ? function (el) {
|
|
165
158
|
_this.inputRef = el;
|
|
166
159
|
} : 'input',
|
|
@@ -179,6 +172,9 @@ var InputVue2 = {
|
|
|
179
172
|
onAnimationstart: this.handleAutoFill,
|
|
180
173
|
onAnimationend: this.handleAutoFillEnd
|
|
181
174
|
}));
|
|
175
|
+
var inputWrapper = h("span", {
|
|
176
|
+
"class": this.inputWrapperClass
|
|
177
|
+
}, [textbox]);
|
|
182
178
|
return label ? // @ts-ignore function children
|
|
183
179
|
h(FloatingLabel, {
|
|
184
180
|
label: label,
|
|
@@ -198,8 +194,8 @@ var InputVue2 = {
|
|
|
198
194
|
editorPlaceholder: this.$data.focused ? this.$props.placeholder : '',
|
|
199
195
|
dir: this.$props.dir
|
|
200
196
|
}, this.v3 ? function () {
|
|
201
|
-
return [
|
|
202
|
-
} : [
|
|
197
|
+
return [inputWrapper];
|
|
198
|
+
} : [inputWrapper]) : inputWrapper;
|
|
203
199
|
},
|
|
204
200
|
methods: {
|
|
205
201
|
emitFocus: function emitFocus(e) {
|
|
@@ -215,13 +211,6 @@ var InputVue2 = {
|
|
|
215
211
|
this.$data.input.focus();
|
|
216
212
|
}
|
|
217
213
|
},
|
|
218
|
-
inputClassNames: function inputClassNames() {
|
|
219
|
-
var isValid = !this.$data.hasMounted || !this.$props.validityStyles || this.validity().valid;
|
|
220
|
-
return {
|
|
221
|
-
'k-input': true,
|
|
222
|
-
'k-invalid': !isValid && isValid !== undefined
|
|
223
|
-
};
|
|
224
|
-
},
|
|
225
214
|
validity: function validity() {
|
|
226
215
|
var result = {
|
|
227
216
|
badInput: this.$data.input ? this.$data.input.validity.badInput : false,
|
|
@@ -318,13 +307,26 @@ var InputVue2 = {
|
|
|
318
307
|
return {
|
|
319
308
|
'k-floating-label-container': true,
|
|
320
309
|
'k-focus': this.$data.focused,
|
|
321
|
-
'k-empty': !((this.computedValue === 0 ? true : this.computedValue) || this.$props.placeholder || this.$data.autofill),
|
|
310
|
+
'k-state-empty': !((this.computedValue === 0 ? true : this.computedValue) || this.$props.placeholder || this.$data.autofill),
|
|
322
311
|
'k-autofill': this.$data.autofill,
|
|
323
312
|
'k-invalid': !isValid && isValid !== undefined,
|
|
324
313
|
'k-rtl': this.$props.dir === 'rtl'
|
|
325
314
|
};
|
|
326
315
|
}
|
|
327
316
|
},
|
|
317
|
+
inputWrapperClass: function inputWrapperClass() {
|
|
318
|
+
var _a;
|
|
319
|
+
|
|
320
|
+
var _b = this.$props,
|
|
321
|
+
size = _b.size,
|
|
322
|
+
fillMode = _b.fillMode,
|
|
323
|
+
rounded = _b.rounded;
|
|
324
|
+
var isValid = !this.$data.hasMounted || !this.$props.validityStyles || this.validity().valid;
|
|
325
|
+
return _a = {
|
|
326
|
+
'k-textbox': true,
|
|
327
|
+
'k-input': true
|
|
328
|
+
}, _a["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-input-" + fillMode] = fillMode, _a["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-valid'] = isValid, _a['k-invalid'] = !isValid, _a['k-required'] = this.required, _a['k-disabled'] = this.$props.disabled, _a;
|
|
329
|
+
},
|
|
328
330
|
computedValue: {
|
|
329
331
|
get: function get() {
|
|
330
332
|
return this.$data.valueDuringOnChange !== undefined ? this.$data.valueDuringOnChange : this.$props.value !== undefined ? this.$props.value : this.$props.modelValue !== undefined ? this.$props.modelValue : this.$data.currentValue;
|
|
@@ -191,7 +191,7 @@ var MaskedTextBoxVue2 = {
|
|
|
191
191
|
return {
|
|
192
192
|
'k-floating-label-container': true,
|
|
193
193
|
'k-focus': this.currentFocused,
|
|
194
|
-
'k-empty': !this.computedValue(),
|
|
194
|
+
'k-state-empty': !this.computedValue(),
|
|
195
195
|
'k-invalid': !isValid && isValid !== undefined,
|
|
196
196
|
'k-rtl': this.$props.dir === 'rtl'
|
|
197
197
|
};
|
|
@@ -177,7 +177,7 @@ var NumericTextBoxVue2 = {
|
|
|
177
177
|
return {
|
|
178
178
|
'k-floating-label-container': true,
|
|
179
179
|
'k-focus': this.$data.focused,
|
|
180
|
-
'k-empty': !(compValue === 0 ? true : compValue || this.$props.placeholder),
|
|
180
|
+
'k-state-empty': !(compValue === 0 ? true : compValue || this.$props.placeholder),
|
|
181
181
|
'k-invalid': !isValid && isValid !== undefined,
|
|
182
182
|
'k-rtl': this.$props.dir === 'rtl'
|
|
183
183
|
};
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-vue-inputs',
|
|
6
6
|
productName: 'Kendo UI for Vue',
|
|
7
7
|
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1642328041,
|
|
9
9
|
version: '',
|
|
10
10
|
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'
|
|
11
11
|
};
|
|
@@ -19,6 +19,10 @@ export interface SwitchChangeEvent {
|
|
|
19
19
|
* Represents the props of the [Kendo UI for Vue Switch component]({% slug overview_switch %}).
|
|
20
20
|
*/
|
|
21
21
|
export interface SwitchProps extends ToggleBaseProps, FormComponentProps {
|
|
22
|
+
/**
|
|
23
|
+
* Specifies the `name` of the Switch.
|
|
24
|
+
*/
|
|
25
|
+
name?: string;
|
|
22
26
|
/**
|
|
23
27
|
* Specifies the `accessKey` of the Switch.
|
|
24
28
|
*/
|
package/dist/es/switch/Switch.js
CHANGED
|
@@ -21,6 +21,7 @@ var SwitchVue2 = {
|
|
|
21
21
|
'blur': null
|
|
22
22
|
},
|
|
23
23
|
props: {
|
|
24
|
+
name: String,
|
|
24
25
|
accessKey: String,
|
|
25
26
|
checked: {
|
|
26
27
|
type: Boolean,
|
|
@@ -74,10 +75,6 @@ var SwitchVue2 = {
|
|
|
74
75
|
},
|
|
75
76
|
tabIndex: Number,
|
|
76
77
|
valid: Boolean,
|
|
77
|
-
// validate: {
|
|
78
|
-
// type: Boolean,
|
|
79
|
-
// default: false
|
|
80
|
-
// },
|
|
81
78
|
validityStyles: {
|
|
82
79
|
type: Boolean,
|
|
83
80
|
default: false
|
|
@@ -204,6 +201,7 @@ var SwitchVue2 = {
|
|
|
204
201
|
attrs: this.v3 ? undefined : {
|
|
205
202
|
type: "checkbox",
|
|
206
203
|
tabIndex: -1,
|
|
204
|
+
name: this.$props.name,
|
|
207
205
|
required: required !== undefined ? required : false,
|
|
208
206
|
"aria-hidden": true
|
|
209
207
|
},
|
|
@@ -216,6 +214,7 @@ var SwitchVue2 = {
|
|
|
216
214
|
_this.inputRef = el;
|
|
217
215
|
} : 'input',
|
|
218
216
|
tabIndex: -1,
|
|
217
|
+
name: this.$props.name,
|
|
219
218
|
required: required !== undefined ? required : false,
|
|
220
219
|
"aria-hidden": true,
|
|
221
220
|
value: this.v3 ? this.computedValue : null,
|
|
@@ -250,9 +249,6 @@ var SwitchVue2 = {
|
|
|
250
249
|
element: function element() {
|
|
251
250
|
return this._element;
|
|
252
251
|
},
|
|
253
|
-
name: function name() {
|
|
254
|
-
return this.$props.name;
|
|
255
|
-
},
|
|
256
252
|
validity: function validity() {
|
|
257
253
|
var customError = this.$props.validationMessage !== undefined;
|
|
258
254
|
var isValid = this.$props.valid !== undefined ? this.$props.valid : !this.$props.required ? true : this.computedValue ? true : false;
|
|
@@ -40,6 +40,13 @@ exports.DEFAULT_PRESET = 'office'; // tslint:enable:max-line-length
|
|
|
40
40
|
|
|
41
41
|
var ColorPaletteVue2 = {
|
|
42
42
|
name: 'KendoColorPalette',
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
emits: {
|
|
45
|
+
'keydown': null,
|
|
46
|
+
'focus': null,
|
|
47
|
+
'blur': null,
|
|
48
|
+
'change': null
|
|
49
|
+
},
|
|
43
50
|
props: {
|
|
44
51
|
palette: {
|
|
45
52
|
type: [String, Array],
|
|
@@ -169,19 +169,21 @@ var ColorPickerVue2 = {
|
|
|
169
169
|
var h = gh || createElement;
|
|
170
170
|
var _b = this.$props,
|
|
171
171
|
disabled = _b.disabled,
|
|
172
|
-
tabIndex = _b.tabIndex
|
|
172
|
+
tabIndex = _b.tabIndex,
|
|
173
|
+
dir = _b.dir; // const dir = useDir(focusableElementGuid, props.dir);
|
|
173
174
|
|
|
174
175
|
return h("span", {
|
|
175
|
-
"class": this.wrapperClassName
|
|
176
|
-
,
|
|
177
|
-
id: this.$props.id,
|
|
176
|
+
"class": this.wrapperClassName,
|
|
177
|
+
dir: dir,
|
|
178
178
|
attrs: this.v3 ? undefined : {
|
|
179
|
+
dir: dir,
|
|
179
180
|
id: this.$props.id,
|
|
180
181
|
"aria-labelledby": this.$props.ariaLabelledBy,
|
|
181
182
|
"aria-describedby": this.$props.ariaDescribedBy,
|
|
182
183
|
tabIndex: kendo_vue_common_1.getTabIndex(tabIndex, disabled),
|
|
183
184
|
title: this.$props.title
|
|
184
185
|
},
|
|
186
|
+
id: this.$props.id,
|
|
185
187
|
"aria-labelledby": this.$props.ariaLabelledBy,
|
|
186
188
|
"aria-describedby": this.$props.ariaDescribedBy,
|
|
187
189
|
ref: this.focusableElementGuid,
|
|
@@ -231,12 +233,13 @@ var ColorPickerVue2 = {
|
|
|
231
233
|
icon: 'arrow-s'
|
|
232
234
|
}), // @ts-ignore function children
|
|
233
235
|
h(Picker_1.Picker, {
|
|
234
|
-
|
|
235
|
-
open: this.computedOpen,
|
|
236
|
+
dir: dir,
|
|
236
237
|
attrs: this.v3 ? undefined : {
|
|
238
|
+
dir: dir,
|
|
237
239
|
open: this.computedOpen,
|
|
238
240
|
popupAnchor: this.focusableElementGuid
|
|
239
241
|
},
|
|
242
|
+
open: this.computedOpen,
|
|
240
243
|
onOpen: this.onOpenHandler,
|
|
241
244
|
on: this.v3 ? undefined : {
|
|
242
245
|
"open": this.onOpenHandler
|
|
@@ -249,7 +252,8 @@ var ColorPickerVue2 = {
|
|
|
249
252
|
,
|
|
250
253
|
on: _this2.v3 ? undefined : {
|
|
251
254
|
"keydown": _this2.onKeyDownHandler,
|
|
252
|
-
"change": _this2.onPaletteChangeHandler
|
|
255
|
+
"change": _this2.onPaletteChangeHandler,
|
|
256
|
+
"blur": _this2.onBlurHandler
|
|
253
257
|
},
|
|
254
258
|
ref: _this2.v3 ? function (el) {
|
|
255
259
|
_this.paletteRef = el;
|
|
@@ -258,13 +262,15 @@ var ColorPickerVue2 = {
|
|
|
258
262
|
attrs: _this2.v3 ? undefined : {
|
|
259
263
|
value: _this2.computedValue || undefined
|
|
260
264
|
},
|
|
261
|
-
onChange: _this2.onPaletteChangeHandler
|
|
265
|
+
onChange: _this2.onPaletteChangeHandler,
|
|
266
|
+
onBlur: _this2.onBlurHandler
|
|
262
267
|
})];
|
|
263
268
|
} : [h(ColorPalette_1.ColorPalette, {
|
|
264
269
|
onKeydown: _this2.onKeyDownHandler,
|
|
265
270
|
on: _this2.v3 ? undefined : {
|
|
266
271
|
"keydown": _this2.onKeyDownHandler,
|
|
267
|
-
"change": _this2.onPaletteChangeHandler
|
|
272
|
+
"change": _this2.onPaletteChangeHandler,
|
|
273
|
+
"blur": _this2.onBlurHandler
|
|
268
274
|
},
|
|
269
275
|
ref: _this2.v3 ? function (el) {
|
|
270
276
|
_this.paletteRef = el;
|
|
@@ -273,7 +279,8 @@ var ColorPickerVue2 = {
|
|
|
273
279
|
attrs: _this2.v3 ? undefined : {
|
|
274
280
|
value: _this2.computedValue || undefined
|
|
275
281
|
},
|
|
276
|
-
onChange: _this2.onPaletteChangeHandler
|
|
282
|
+
onChange: _this2.onPaletteChangeHandler,
|
|
283
|
+
onBlur: _this2.onBlurHandler
|
|
277
284
|
})])]);
|
|
278
285
|
},
|
|
279
286
|
methods: {
|
|
@@ -354,11 +361,13 @@ var ColorPickerVue2 = {
|
|
|
354
361
|
});
|
|
355
362
|
},
|
|
356
363
|
onBlurTimeout: function onBlurTimeout() {
|
|
357
|
-
|
|
364
|
+
var paleteIsFocused = this.palette && document.activeElement === this.palette.$el;
|
|
365
|
+
|
|
366
|
+
if (!paleteIsFocused) {
|
|
358
367
|
this.setOpen(false, true);
|
|
359
|
-
this.focused = false;
|
|
360
368
|
}
|
|
361
369
|
|
|
370
|
+
this.focused = paleteIsFocused;
|
|
362
371
|
this.blurTimeoutRef = undefined;
|
|
363
372
|
},
|
|
364
373
|
onBlurHandler: function onBlurHandler(event) {
|
|
@@ -91,7 +91,6 @@ export interface InputMethods {
|
|
|
91
91
|
emitBlur?: (_: any) => void;
|
|
92
92
|
emitFocus?: (_: any) => void;
|
|
93
93
|
focus?: () => void;
|
|
94
|
-
inputClassNames: () => any;
|
|
95
94
|
validity: () => any;
|
|
96
95
|
isInvalid: (state: any) => any;
|
|
97
96
|
setValidity: () => void;
|
|
@@ -107,6 +106,7 @@ export interface InputComputed {
|
|
|
107
106
|
[key: string]: any;
|
|
108
107
|
computedValue?: any;
|
|
109
108
|
spanClassNames?: any;
|
|
109
|
+
inputWrapperClass?: any;
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
112
|
* @hidden
|
package/dist/npm/input/Input.js
CHANGED
|
@@ -37,7 +37,6 @@ var InputVue2 = {
|
|
|
37
37
|
model: {
|
|
38
38
|
event: 'changemodel'
|
|
39
39
|
},
|
|
40
|
-
inheritAttrs: false,
|
|
41
40
|
// @ts-ignore
|
|
42
41
|
emits: {
|
|
43
42
|
'input': null,
|
|
@@ -148,12 +147,6 @@ var InputVue2 = {
|
|
|
148
147
|
var h = gh || createElement;
|
|
149
148
|
var listeners = this.v3 ? this.$attrs : this.$listeners;
|
|
150
149
|
var isValid = !this.$props.validityStyles || this.validity().valid;
|
|
151
|
-
var hasInput = Object.keys(this.$attrs).some(function (attr) {
|
|
152
|
-
return attr === 'onInput';
|
|
153
|
-
});
|
|
154
|
-
var hasModel = Object.keys(this.$attrs).some(function (attr) {
|
|
155
|
-
return attr === 'onUpdate:modelValue';
|
|
156
|
-
});
|
|
157
150
|
var _a = this.$props,
|
|
158
151
|
label = _a.label,
|
|
159
152
|
id = _a.id,
|
|
@@ -171,7 +164,7 @@ var InputVue2 = {
|
|
|
171
164
|
id: inputId,
|
|
172
165
|
required: required,
|
|
173
166
|
value: this.computedValue,
|
|
174
|
-
class:
|
|
167
|
+
class: 'k-input-inner',
|
|
175
168
|
ref: this.v3 ? function (el) {
|
|
176
169
|
_this.inputRef = el;
|
|
177
170
|
} : 'input',
|
|
@@ -190,6 +183,9 @@ var InputVue2 = {
|
|
|
190
183
|
onAnimationstart: this.handleAutoFill,
|
|
191
184
|
onAnimationend: this.handleAutoFillEnd
|
|
192
185
|
}));
|
|
186
|
+
var inputWrapper = h("span", {
|
|
187
|
+
"class": this.inputWrapperClass
|
|
188
|
+
}, [textbox]);
|
|
193
189
|
return label ? // @ts-ignore function children
|
|
194
190
|
h(kendo_vue_labels_1.FloatingLabel, {
|
|
195
191
|
label: label,
|
|
@@ -209,8 +205,8 @@ var InputVue2 = {
|
|
|
209
205
|
editorPlaceholder: this.$data.focused ? this.$props.placeholder : '',
|
|
210
206
|
dir: this.$props.dir
|
|
211
207
|
}, this.v3 ? function () {
|
|
212
|
-
return [
|
|
213
|
-
} : [
|
|
208
|
+
return [inputWrapper];
|
|
209
|
+
} : [inputWrapper]) : inputWrapper;
|
|
214
210
|
},
|
|
215
211
|
methods: {
|
|
216
212
|
emitFocus: function emitFocus(e) {
|
|
@@ -226,13 +222,6 @@ var InputVue2 = {
|
|
|
226
222
|
this.$data.input.focus();
|
|
227
223
|
}
|
|
228
224
|
},
|
|
229
|
-
inputClassNames: function inputClassNames() {
|
|
230
|
-
var isValid = !this.$data.hasMounted || !this.$props.validityStyles || this.validity().valid;
|
|
231
|
-
return {
|
|
232
|
-
'k-input': true,
|
|
233
|
-
'k-invalid': !isValid && isValid !== undefined
|
|
234
|
-
};
|
|
235
|
-
},
|
|
236
225
|
validity: function validity() {
|
|
237
226
|
var result = {
|
|
238
227
|
badInput: this.$data.input ? this.$data.input.validity.badInput : false,
|
|
@@ -329,13 +318,26 @@ var InputVue2 = {
|
|
|
329
318
|
return {
|
|
330
319
|
'k-floating-label-container': true,
|
|
331
320
|
'k-focus': this.$data.focused,
|
|
332
|
-
'k-empty': !((this.computedValue === 0 ? true : this.computedValue) || this.$props.placeholder || this.$data.autofill),
|
|
321
|
+
'k-state-empty': !((this.computedValue === 0 ? true : this.computedValue) || this.$props.placeholder || this.$data.autofill),
|
|
333
322
|
'k-autofill': this.$data.autofill,
|
|
334
323
|
'k-invalid': !isValid && isValid !== undefined,
|
|
335
324
|
'k-rtl': this.$props.dir === 'rtl'
|
|
336
325
|
};
|
|
337
326
|
}
|
|
338
327
|
},
|
|
328
|
+
inputWrapperClass: function inputWrapperClass() {
|
|
329
|
+
var _a;
|
|
330
|
+
|
|
331
|
+
var _b = this.$props,
|
|
332
|
+
size = _b.size,
|
|
333
|
+
fillMode = _b.fillMode,
|
|
334
|
+
rounded = _b.rounded;
|
|
335
|
+
var isValid = !this.$data.hasMounted || !this.$props.validityStyles || this.validity().valid;
|
|
336
|
+
return _a = {
|
|
337
|
+
'k-textbox': true,
|
|
338
|
+
'k-input': true
|
|
339
|
+
}, _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-valid'] = isValid, _a['k-invalid'] = !isValid, _a['k-required'] = this.required, _a['k-disabled'] = this.$props.disabled, _a;
|
|
340
|
+
},
|
|
339
341
|
computedValue: {
|
|
340
342
|
get: function get() {
|
|
341
343
|
return this.$data.valueDuringOnChange !== undefined ? this.$data.valueDuringOnChange : this.$props.value !== undefined ? this.$props.value : this.$props.modelValue !== undefined ? this.$props.modelValue : this.$data.currentValue;
|
|
@@ -203,7 +203,7 @@ var MaskedTextBoxVue2 = {
|
|
|
203
203
|
return {
|
|
204
204
|
'k-floating-label-container': true,
|
|
205
205
|
'k-focus': this.currentFocused,
|
|
206
|
-
'k-empty': !this.computedValue(),
|
|
206
|
+
'k-state-empty': !this.computedValue(),
|
|
207
207
|
'k-invalid': !isValid && isValid !== undefined,
|
|
208
208
|
'k-rtl': this.$props.dir === 'rtl'
|
|
209
209
|
};
|
|
@@ -192,7 +192,7 @@ var NumericTextBoxVue2 = {
|
|
|
192
192
|
return {
|
|
193
193
|
'k-floating-label-container': true,
|
|
194
194
|
'k-focus': this.$data.focused,
|
|
195
|
-
'k-empty': !(compValue === 0 ? true : compValue || this.$props.placeholder),
|
|
195
|
+
'k-state-empty': !(compValue === 0 ? true : compValue || this.$props.placeholder),
|
|
196
196
|
'k-invalid': !isValid && isValid !== undefined,
|
|
197
197
|
'k-rtl': this.$props.dir === 'rtl'
|
|
198
198
|
};
|
|
@@ -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: 1642328041,
|
|
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
|
};
|
|
@@ -19,6 +19,10 @@ export interface SwitchChangeEvent {
|
|
|
19
19
|
* Represents the props of the [Kendo UI for Vue Switch component]({% slug overview_switch %}).
|
|
20
20
|
*/
|
|
21
21
|
export interface SwitchProps extends ToggleBaseProps, FormComponentProps {
|
|
22
|
+
/**
|
|
23
|
+
* Specifies the `name` of the Switch.
|
|
24
|
+
*/
|
|
25
|
+
name?: string;
|
|
22
26
|
/**
|
|
23
27
|
* Specifies the `accessKey` of the Switch.
|
|
24
28
|
*/
|
|
@@ -33,6 +33,7 @@ var SwitchVue2 = {
|
|
|
33
33
|
'blur': null
|
|
34
34
|
},
|
|
35
35
|
props: {
|
|
36
|
+
name: String,
|
|
36
37
|
accessKey: String,
|
|
37
38
|
checked: {
|
|
38
39
|
type: Boolean,
|
|
@@ -86,10 +87,6 @@ var SwitchVue2 = {
|
|
|
86
87
|
},
|
|
87
88
|
tabIndex: Number,
|
|
88
89
|
valid: Boolean,
|
|
89
|
-
// validate: {
|
|
90
|
-
// type: Boolean,
|
|
91
|
-
// default: false
|
|
92
|
-
// },
|
|
93
90
|
validityStyles: {
|
|
94
91
|
type: Boolean,
|
|
95
92
|
default: false
|
|
@@ -216,6 +213,7 @@ var SwitchVue2 = {
|
|
|
216
213
|
attrs: this.v3 ? undefined : {
|
|
217
214
|
type: "checkbox",
|
|
218
215
|
tabIndex: -1,
|
|
216
|
+
name: this.$props.name,
|
|
219
217
|
required: required !== undefined ? required : false,
|
|
220
218
|
"aria-hidden": true
|
|
221
219
|
},
|
|
@@ -228,6 +226,7 @@ var SwitchVue2 = {
|
|
|
228
226
|
_this.inputRef = el;
|
|
229
227
|
} : 'input',
|
|
230
228
|
tabIndex: -1,
|
|
229
|
+
name: this.$props.name,
|
|
231
230
|
required: required !== undefined ? required : false,
|
|
232
231
|
"aria-hidden": true,
|
|
233
232
|
value: this.v3 ? this.computedValue : null,
|
|
@@ -262,9 +261,6 @@ var SwitchVue2 = {
|
|
|
262
261
|
element: function element() {
|
|
263
262
|
return this._element;
|
|
264
263
|
},
|
|
265
|
-
name: function name() {
|
|
266
|
-
return this.$props.name;
|
|
267
|
-
},
|
|
268
264
|
validity: function validity() {
|
|
269
265
|
var customError = this.$props.validationMessage !== undefined;
|
|
270
266
|
var isValid = this.$props.valid !== undefined ? this.$props.valid : !this.$props.required ? true : this.computedValue ? true : false;
|
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": "
|
|
4
|
+
"version": "3.0.0-dev.202201161025",
|
|
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": "
|
|
42
|
-
"@progress/kendo-vue-common": "
|
|
43
|
-
"@progress/kendo-vue-labels": "
|
|
44
|
-
"@progress/kendo-vue-popup": "
|
|
41
|
+
"@progress/kendo-vue-buttons": "3.0.0-dev.202201161025",
|
|
42
|
+
"@progress/kendo-vue-common": "3.0.0-dev.202201161025",
|
|
43
|
+
"@progress/kendo-vue-labels": "3.0.0-dev.202201161025",
|
|
44
|
+
"@progress/kendo-vue-popup": "3.0.0-dev.202201161025"
|
|
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": "
|
|
52
|
-
"@progress/kendo-vue-form": "
|
|
53
|
-
"@progress/kendo-vue-intl": "
|
|
54
|
-
"@progress/kendo-vue-labels": "
|
|
55
|
-
"@progress/kendo-vue-tooltip": "
|
|
51
|
+
"@progress/kendo-vue-buttons": "3.0.0-dev.202201161025",
|
|
52
|
+
"@progress/kendo-vue-form": "3.0.0-dev.202201161025",
|
|
53
|
+
"@progress/kendo-vue-intl": "3.0.0-dev.202201161025",
|
|
54
|
+
"@progress/kendo-vue-labels": "3.0.0-dev.202201161025",
|
|
55
|
+
"@progress/kendo-vue-tooltip": "3.0.0-dev.202201161025",
|
|
56
56
|
"cldr-core": "^34.0.0",
|
|
57
57
|
"cldr-dates-full": "^34.0.0",
|
|
58
58
|
"cldr-numbers-full": "^34.0.0"
|