@progress/kendo-vue-inputs 2.7.3 → 3.0.0-dev.202201141128
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/additionalTypes.ts +7 -1
- package/dist/es/checkbox/Checkbox.d.ts +5 -6
- package/dist/es/checkbox/Checkbox.js +38 -22
- package/dist/es/checkbox/interfaces/CheckboxProps.d.ts +24 -0
- package/dist/es/colors/ColorPalette.d.ts +6 -6
- package/dist/es/colors/ColorPalette.js +12 -4
- package/dist/es/colors/ColorPicker.d.ts +5 -6
- package/dist/es/colors/ColorPicker.js +66 -58
- package/dist/es/colors/Picker.d.ts +5 -6
- package/dist/es/colors/Picker.js +3 -3
- package/dist/es/colors/interfaces/ColorPickerProps.d.ts +2 -2
- package/dist/es/input/Input.d.ts +43 -7
- package/dist/es/input/Input.js +46 -23
- package/dist/es/main.d.ts +1 -1
- package/dist/es/main.js +1 -1
- package/dist/es/maskedtextbox/MaskedTextBox.d.ts +5 -6
- package/dist/es/maskedtextbox/MaskedTextBox.js +37 -13
- package/dist/es/maskedtextbox/MaskedTextBoxProps.d.ts +37 -0
- package/dist/es/numerictextbox/NumericTextBox.d.ts +5 -6
- package/dist/es/numerictextbox/NumericTextBox.js +60 -36
- package/dist/es/numerictextbox/interfaces/NumericTextBoxProps.d.ts +37 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/radiobutton/RadioButton.d.ts +5 -6
- package/dist/es/radiobutton/RadioButton.js +13 -8
- package/dist/es/radiobutton/RadioGroup.d.ts +5 -6
- package/dist/es/radiobutton/RadioGroup.js +3 -3
- package/dist/es/radiobutton/interfaces/RadioButtonProps.d.ts +12 -0
- package/dist/es/slider/Slider.d.ts +5 -6
- package/dist/es/slider/Slider.js +30 -25
- package/dist/es/slider/SliderLabel.d.ts +5 -6
- package/dist/es/slider/SliderLabel.js +3 -3
- package/dist/es/switch/Switch.d.ts +49 -6
- package/dist/es/switch/Switch.js +59 -27
- package/dist/es/textarea/TextArea.d.ts +5 -6
- package/dist/es/textarea/TextArea.js +40 -11
- package/dist/es/textarea/interfaces/TextAreaProps.d.ts +37 -0
- package/dist/npm/additionalTypes.ts +7 -1
- package/dist/npm/checkbox/Checkbox.d.ts +5 -6
- package/dist/npm/checkbox/Checkbox.js +39 -23
- package/dist/npm/checkbox/interfaces/CheckboxProps.d.ts +24 -0
- package/dist/npm/colors/ColorPalette.d.ts +6 -6
- package/dist/npm/colors/ColorPalette.js +13 -5
- package/dist/npm/colors/ColorPicker.d.ts +5 -6
- package/dist/npm/colors/ColorPicker.js +68 -60
- package/dist/npm/colors/Picker.d.ts +5 -6
- package/dist/npm/colors/Picker.js +5 -5
- package/dist/npm/colors/interfaces/ColorPickerProps.d.ts +2 -2
- package/dist/npm/input/Input.d.ts +43 -7
- package/dist/npm/input/Input.js +47 -24
- package/dist/npm/main.d.ts +1 -1
- package/dist/npm/main.js +1 -0
- package/dist/npm/maskedtextbox/MaskedTextBox.d.ts +5 -6
- package/dist/npm/maskedtextbox/MaskedTextBox.js +38 -14
- package/dist/npm/maskedtextbox/MaskedTextBoxProps.d.ts +37 -0
- package/dist/npm/numerictextbox/NumericTextBox.d.ts +5 -6
- package/dist/npm/numerictextbox/NumericTextBox.js +62 -37
- package/dist/npm/numerictextbox/interfaces/NumericTextBoxProps.d.ts +37 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/radiobutton/RadioButton.d.ts +5 -6
- package/dist/npm/radiobutton/RadioButton.js +14 -9
- package/dist/npm/radiobutton/RadioGroup.d.ts +5 -6
- package/dist/npm/radiobutton/RadioGroup.js +5 -5
- package/dist/npm/radiobutton/interfaces/RadioButtonProps.d.ts +12 -0
- package/dist/npm/slider/Slider.d.ts +5 -6
- package/dist/npm/slider/Slider.js +33 -27
- package/dist/npm/slider/SliderLabel.d.ts +5 -6
- package/dist/npm/slider/SliderLabel.js +5 -5
- package/dist/npm/switch/Switch.d.ts +49 -6
- package/dist/npm/switch/Switch.js +60 -28
- package/dist/npm/textarea/TextArea.d.ts +5 -6
- package/dist/npm/textarea/TextArea.js +41 -12
- package/dist/npm/textarea/interfaces/TextAreaProps.d.ts +37 -0
- package/package.json +10 -9
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.CheckboxVue2 = exports.Checkbox = void 0; // @ts-ignore
|
|
7
7
|
|
|
8
8
|
var Vue = require("vue");
|
|
9
9
|
|
|
@@ -20,7 +20,7 @@ var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
|
|
|
20
20
|
|
|
21
21
|
var messages_1 = require("./../messages");
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var CheckboxVue2 = {
|
|
24
24
|
name: 'KendoCheckbox',
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
emits: {
|
|
@@ -65,6 +65,20 @@ var Checkbox = {
|
|
|
65
65
|
labelPlacement: String,
|
|
66
66
|
labelOptional: Boolean,
|
|
67
67
|
name: String,
|
|
68
|
+
size: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: 'medium',
|
|
71
|
+
validator: function validator(value) {
|
|
72
|
+
return [null, 'small', 'medium', 'large'].includes(value);
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
rounded: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: 'medium',
|
|
78
|
+
validator: function validator(value) {
|
|
79
|
+
return [null, 'small', 'medium', 'large'].includes(value);
|
|
80
|
+
}
|
|
81
|
+
},
|
|
68
82
|
tabIndex: Number,
|
|
69
83
|
value: {
|
|
70
84
|
type: [String, Boolean],
|
|
@@ -171,20 +185,24 @@ var Checkbox = {
|
|
|
171
185
|
};
|
|
172
186
|
},
|
|
173
187
|
render: function render(createElement) {
|
|
188
|
+
var _a;
|
|
189
|
+
|
|
174
190
|
var h = gh || createElement;
|
|
175
|
-
var
|
|
176
|
-
ariaDescribedBy =
|
|
177
|
-
ariaLabelledBy =
|
|
178
|
-
disabled =
|
|
179
|
-
id =
|
|
180
|
-
label =
|
|
181
|
-
labelRender =
|
|
182
|
-
labelPlacement =
|
|
183
|
-
name =
|
|
184
|
-
labelOptional =
|
|
185
|
-
tabIndex =
|
|
186
|
-
required =
|
|
187
|
-
validityStyles =
|
|
191
|
+
var _b = this.$props,
|
|
192
|
+
ariaDescribedBy = _b.ariaDescribedBy,
|
|
193
|
+
ariaLabelledBy = _b.ariaLabelledBy,
|
|
194
|
+
disabled = _b.disabled,
|
|
195
|
+
id = _b.id,
|
|
196
|
+
label = _b.label,
|
|
197
|
+
labelRender = _b.labelRender,
|
|
198
|
+
labelPlacement = _b.labelPlacement,
|
|
199
|
+
name = _b.name,
|
|
200
|
+
labelOptional = _b.labelOptional,
|
|
201
|
+
tabIndex = _b.tabIndex,
|
|
202
|
+
required = _b.required,
|
|
203
|
+
validityStyles = _b.validityStyles,
|
|
204
|
+
size = _b.size,
|
|
205
|
+
rounded = _b.rounded;
|
|
188
206
|
var defaultSlot = kendo_vue_common_1.getDefaultSlots(this);
|
|
189
207
|
var renderedLabel = label;
|
|
190
208
|
this.localizationService = kendo_vue_intl_1.provideLocalizationService(this);
|
|
@@ -193,11 +211,9 @@ var Checkbox = {
|
|
|
193
211
|
var checkboxClasses = kendo_vue_common_1.classNames({
|
|
194
212
|
'k-state-disabled': disabled
|
|
195
213
|
});
|
|
196
|
-
var inputClasses = kendo_vue_common_1.classNames({
|
|
197
|
-
'k-checkbox': true
|
|
198
|
-
|
|
199
|
-
'k-state-invalid k-invalid': !(this.isValid || validityStyles !== undefined || validityStyles === true)
|
|
200
|
-
});
|
|
214
|
+
var inputClasses = kendo_vue_common_1.classNames((_a = {
|
|
215
|
+
'k-checkbox': true
|
|
216
|
+
}, _a["k-checkbox-" + kendo_vue_common_1.kendoThemeMaps.sizeMap[size]] = size, _a["k-rounded-" + kendo_vue_common_1.kendoThemeMaps.roundedMap[rounded]] = rounded, _a['k-state-indeterminate'] = this.indeterminateProp, _a['k-state-invalid k-invalid'] = !(this.isValid || validityStyles !== undefined || validityStyles === true), _a));
|
|
201
217
|
|
|
202
218
|
var checkboxInput = function checkboxInput() {
|
|
203
219
|
var _this = this;
|
|
@@ -360,6 +376,6 @@ var Checkbox = {
|
|
|
360
376
|
}
|
|
361
377
|
}
|
|
362
378
|
};
|
|
363
|
-
exports.
|
|
364
|
-
var
|
|
365
|
-
exports.
|
|
379
|
+
exports.CheckboxVue2 = CheckboxVue2;
|
|
380
|
+
var Checkbox = CheckboxVue2;
|
|
381
|
+
exports.Checkbox = Checkbox;
|
|
@@ -44,6 +44,30 @@ export interface CheckboxProps extends ToggleBaseProps, FormComponentProps {
|
|
|
44
44
|
* Sets the `id` of the Checkbox.
|
|
45
45
|
*/
|
|
46
46
|
id?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Configures the `size` of the Checkbox.
|
|
49
|
+
*
|
|
50
|
+
* The available options are:
|
|
51
|
+
* - small
|
|
52
|
+
* - medium
|
|
53
|
+
* - large
|
|
54
|
+
* - null—Does not set a size `className`.
|
|
55
|
+
*
|
|
56
|
+
* @default `medium`
|
|
57
|
+
*/
|
|
58
|
+
size?: null | 'small' | 'medium' | 'large' | string;
|
|
59
|
+
/**
|
|
60
|
+
* Configures the `rounded` style of the Checkbox.
|
|
61
|
+
*
|
|
62
|
+
* The available options are:
|
|
63
|
+
* - small
|
|
64
|
+
* - medium
|
|
65
|
+
* - large
|
|
66
|
+
* - null—Does not set a rounded `className`.
|
|
67
|
+
*
|
|
68
|
+
* @default `medium`
|
|
69
|
+
*/
|
|
70
|
+
rounded?: null | 'small' | 'medium' | 'large' | string;
|
|
47
71
|
/**
|
|
48
72
|
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
49
73
|
* For example these elements could contain error or hint message.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { DefineComponent } from '../additionalTypes';
|
|
2
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
3
2
|
declare type DefaultData<V> = object | ((this: V) => {});
|
|
4
3
|
declare type DefaultMethods<V> = {
|
|
5
4
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
@@ -24,6 +23,7 @@ export declare const DEFAULT_PRESET = "office";
|
|
|
24
23
|
export interface ColorPaletteState {
|
|
25
24
|
wrapper: HTMLDivElement | null;
|
|
26
25
|
paletteService: ColorPaletteService;
|
|
26
|
+
guid: string;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* @hidden
|
|
@@ -48,8 +48,8 @@ export interface ColorPaletteData {
|
|
|
48
48
|
/**
|
|
49
49
|
* @hidden
|
|
50
50
|
*/
|
|
51
|
-
export interface ColorPaletteAll extends
|
|
51
|
+
export interface ColorPaletteAll extends Vue2type, ColorPaletteMethods, ColorPaletteData, ColorPaletteComputed, ColorPaletteState {
|
|
52
52
|
}
|
|
53
|
-
declare let
|
|
54
|
-
declare const
|
|
55
|
-
export { ColorPalette,
|
|
53
|
+
declare let ColorPaletteVue2: ComponentOptions<ColorPaletteAll, DefaultData<ColorPaletteData>, DefaultMethods<ColorPaletteAll>, ColorPaletteComputed, RecordPropsDefinition<ColorPaletteProps>>;
|
|
54
|
+
declare const ColorPalette: DefineComponent<ColorPaletteProps, any, ColorPaletteData, ColorPaletteComputed, ColorPaletteMethods, {}, {}, {}, string, ColorPaletteProps, ColorPaletteProps, {}>;
|
|
55
|
+
export { ColorPalette, ColorPaletteVue2 };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.ColorPaletteVue2 = exports.ColorPalette = exports.DEFAULT_PRESET = exports.DEFAULT_COLUMNS_COUNT = exports.DEFAULT_TILE_SIZE = void 0; // @ts-ignore
|
|
7
7
|
|
|
8
8
|
var Vue = require("vue");
|
|
9
9
|
|
|
@@ -38,8 +38,15 @@ exports.DEFAULT_COLUMNS_COUNT = 10;
|
|
|
38
38
|
|
|
39
39
|
exports.DEFAULT_PRESET = 'office'; // tslint:enable:max-line-length
|
|
40
40
|
|
|
41
|
-
var
|
|
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],
|
|
@@ -60,6 +67,7 @@ var ColorPalette = {
|
|
|
60
67
|
},
|
|
61
68
|
created: function created() {
|
|
62
69
|
kendo_vue_common_1.validatePackage(package_metadata_1.packageMetadata);
|
|
70
|
+
this.guid = kendo_vue_common_1.guid();
|
|
63
71
|
},
|
|
64
72
|
mounted: function mounted() {
|
|
65
73
|
this.wrapper = this.v3 ? this.wrapperRef : this.$refs.wrapper;
|
|
@@ -350,6 +358,6 @@ var ColorPalette = {
|
|
|
350
358
|
}
|
|
351
359
|
}
|
|
352
360
|
};
|
|
353
|
-
exports.
|
|
354
|
-
var
|
|
355
|
-
exports.
|
|
361
|
+
exports.ColorPaletteVue2 = ColorPaletteVue2;
|
|
362
|
+
var ColorPalette = ColorPaletteVue2;
|
|
363
|
+
exports.ColorPalette = ColorPalette;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { DefineComponent } from '../additionalTypes';
|
|
2
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
3
2
|
declare type DefaultData<V> = object | ((this: V) => {});
|
|
4
3
|
declare type DefaultMethods<V> = {
|
|
5
4
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
@@ -45,8 +44,8 @@ export interface ColorPickerData {
|
|
|
45
44
|
/**
|
|
46
45
|
* @hidden
|
|
47
46
|
*/
|
|
48
|
-
export interface ColorPickerAll extends
|
|
47
|
+
export interface ColorPickerAll extends Vue2type, ColorPickerMethods, ColorPickerData, ColorPickerComputed, ColorPickerState {
|
|
49
48
|
}
|
|
50
|
-
declare let
|
|
51
|
-
declare const
|
|
52
|
-
export { ColorPicker,
|
|
49
|
+
declare let ColorPickerVue2: ComponentOptions<ColorPickerAll, DefaultData<ColorPickerData>, DefaultMethods<ColorPickerAll>, ColorPickerComputed, RecordPropsDefinition<ColorPickerProps>>;
|
|
50
|
+
declare const ColorPicker: DefineComponent<ColorPickerProps, any, ColorPickerData, ColorPickerComputed, ColorPickerMethods, {}, {}, {}, string, ColorPickerProps, ColorPickerProps, {}>;
|
|
51
|
+
export { ColorPicker, ColorPickerVue2 };
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.ColorPickerVue2 = exports.ColorPicker = void 0; // @ts-ignore
|
|
7
7
|
|
|
8
8
|
var Vue = require("vue");
|
|
9
9
|
|
|
10
10
|
var allVue = Vue;
|
|
11
11
|
var gh = allVue.h;
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
16
16
|
|
|
17
17
|
var package_metadata_1 = require("../package-metadata");
|
|
18
18
|
|
|
@@ -44,7 +44,7 @@ var isControlled = function isControlled(prop) {
|
|
|
44
44
|
}; // tslint:enable:max-line-length
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var ColorPickerVue2 = {
|
|
48
48
|
name: 'KendoColorPicker',
|
|
49
49
|
props: {
|
|
50
50
|
value: {
|
|
@@ -90,7 +90,7 @@ var ColorPicker = {
|
|
|
90
90
|
type: String,
|
|
91
91
|
default: 'medium',
|
|
92
92
|
validator: function validator(value) {
|
|
93
|
-
return [null, 'small', 'medium', 'large', '
|
|
93
|
+
return [null, 'small', 'medium', 'large', 'full'].includes(value);
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
fillMode: {
|
|
@@ -126,23 +126,20 @@ var ColorPicker = {
|
|
|
126
126
|
return this.$props.iconClassName || icon && "k-icon k-i-" + icon;
|
|
127
127
|
},
|
|
128
128
|
wrapperClassName: function wrapperClassName() {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
'k-state-disabled': disabled,
|
|
140
|
-
'k-state-focused': this.focused
|
|
141
|
-
};
|
|
129
|
+
var _a;
|
|
130
|
+
|
|
131
|
+
var _b = this.$props,
|
|
132
|
+
size = _b.size,
|
|
133
|
+
fillMode = _b.fillMode,
|
|
134
|
+
rounded = _b.rounded;
|
|
135
|
+
return _a = {
|
|
136
|
+
'k-picker': true,
|
|
137
|
+
'k-colorpicker': true
|
|
138
|
+
}, _a["k-picker-" + (kendo_vue_common_1.kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-picker-" + fillMode] = fillMode, _a["k-rounded-" + (kendo_vue_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-valid'] = this.valid, _a['k-invalid'] = !this.valid, _a['k-disabled'] = this.disabled, _a['k-focus'] = this.focused, _a;
|
|
142
139
|
}
|
|
143
140
|
},
|
|
144
141
|
created: function created() {
|
|
145
|
-
|
|
142
|
+
kendo_vue_common_1.validatePackage(package_metadata_1.packageMetadata);
|
|
146
143
|
this.focusableElementGuid = kendo_vue_common_1.guid();
|
|
147
144
|
},
|
|
148
145
|
mounted: function mounted() {
|
|
@@ -165,27 +162,30 @@ var ColorPicker = {
|
|
|
165
162
|
render: function render(createElement) {
|
|
166
163
|
var _this2 = this;
|
|
167
164
|
|
|
165
|
+
var _a;
|
|
166
|
+
|
|
168
167
|
var _this = this;
|
|
169
168
|
|
|
170
169
|
var h = gh || createElement;
|
|
171
|
-
var
|
|
172
|
-
disabled =
|
|
173
|
-
tabIndex =
|
|
170
|
+
var _b = this.$props,
|
|
171
|
+
disabled = _b.disabled,
|
|
172
|
+
tabIndex = _b.tabIndex,
|
|
173
|
+
dir = _b.dir; // const dir = useDir(focusableElementGuid, props.dir);
|
|
174
174
|
|
|
175
175
|
return h("span", {
|
|
176
|
-
"class": this.wrapperClassName
|
|
177
|
-
|
|
178
|
-
id: this.$props.id,
|
|
176
|
+
"class": this.wrapperClassName,
|
|
177
|
+
dir: dir,
|
|
179
178
|
attrs: this.v3 ? undefined : {
|
|
179
|
+
dir: dir,
|
|
180
180
|
id: this.$props.id,
|
|
181
181
|
"aria-labelledby": this.$props.ariaLabelledBy,
|
|
182
182
|
"aria-describedby": this.$props.ariaDescribedBy,
|
|
183
183
|
tabIndex: kendo_vue_common_1.getTabIndex(tabIndex, disabled),
|
|
184
184
|
title: this.$props.title
|
|
185
185
|
},
|
|
186
|
+
id: this.$props.id,
|
|
186
187
|
"aria-labelledby": this.$props.ariaLabelledBy,
|
|
187
188
|
"aria-describedby": this.$props.ariaDescribedBy,
|
|
188
|
-
"class": this.spanClassName,
|
|
189
189
|
ref: this.focusableElementGuid,
|
|
190
190
|
tabIndex: kendo_vue_common_1.getTabIndex(tabIndex, disabled),
|
|
191
191
|
title: this.$props.title,
|
|
@@ -197,47 +197,49 @@ var ColorPicker = {
|
|
|
197
197
|
},
|
|
198
198
|
onFocusin: this.onFocusHandler,
|
|
199
199
|
onFocusout: this.onBlurHandler
|
|
200
|
-
}, [
|
|
201
|
-
onClick: this.onActiveColorClickHandler,
|
|
202
|
-
on: this.v3 ? undefined : {
|
|
203
|
-
"click": this.onActiveColorClickHandler
|
|
204
|
-
},
|
|
205
|
-
"class": 'k-selected-color',
|
|
206
|
-
style: {
|
|
207
|
-
backgroundColor: this.computedValue
|
|
208
|
-
}
|
|
209
|
-
}, [!this.computedValue && h("span", {
|
|
210
|
-
"class": 'k-icon k-i-line'
|
|
211
|
-
})]) : h("span", {
|
|
200
|
+
}, [h("span", {
|
|
212
201
|
onClick: this.onActiveColorClickHandler,
|
|
213
202
|
on: this.v3 ? undefined : {
|
|
214
203
|
"click": this.onActiveColorClickHandler
|
|
215
204
|
},
|
|
216
|
-
"class":
|
|
205
|
+
"class": 'k-input-inner'
|
|
217
206
|
}, [h("span", {
|
|
218
|
-
"class": 'k-
|
|
207
|
+
"class": kendo_vue_common_1.classNames('k-value-icon', 'k-color-preview', {
|
|
208
|
+
'k-no-color': !this.computedValue,
|
|
209
|
+
'k-icon-color-preview': this.icon || this.iconClassName
|
|
210
|
+
})
|
|
211
|
+
}, [(this.iconClassName || this.icon) && h("span", {
|
|
212
|
+
"class": kendo_vue_common_1.classNames('k-color-preview-icon', this.iconClassName, (_a = {}, _a["k-icon k-i-" + this.icon] = this.icon && !this.iconClassName, _a))
|
|
213
|
+
}), h("span", {
|
|
214
|
+
"class": "k-color-preview-mask",
|
|
219
215
|
style: {
|
|
220
216
|
backgroundColor: this.computedValue
|
|
221
217
|
}
|
|
222
|
-
})]),
|
|
218
|
+
})])]), // @ts-ignore
|
|
219
|
+
h(kendo_vue_buttons_1.Button, {
|
|
220
|
+
type: "button",
|
|
221
|
+
attrs: this.v3 ? undefined : {
|
|
222
|
+
type: "button",
|
|
223
|
+
icon: 'arrow-s'
|
|
224
|
+
},
|
|
225
|
+
ref: this.v3 ? function (el) {
|
|
226
|
+
_this.buttonRef = el;
|
|
227
|
+
} : 'button',
|
|
223
228
|
onClick: this.onClickHandler,
|
|
224
229
|
on: this.v3 ? undefined : {
|
|
225
230
|
"click": this.onClickHandler
|
|
226
231
|
},
|
|
227
|
-
"class":
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
} : 'button'
|
|
231
|
-
}, [h("span", {
|
|
232
|
-
"class": 'k-icon k-i-arrow-s'
|
|
233
|
-
})]), // @ts-ignore function children
|
|
232
|
+
"class": "k-input-button",
|
|
233
|
+
icon: 'arrow-s'
|
|
234
|
+
}), // @ts-ignore function children
|
|
234
235
|
h(Picker_1.Picker, {
|
|
235
|
-
|
|
236
|
-
open: this.computedOpen,
|
|
236
|
+
dir: dir,
|
|
237
237
|
attrs: this.v3 ? undefined : {
|
|
238
|
+
dir: dir,
|
|
238
239
|
open: this.computedOpen,
|
|
239
240
|
popupAnchor: this.focusableElementGuid
|
|
240
241
|
},
|
|
242
|
+
open: this.computedOpen,
|
|
241
243
|
onOpen: this.onOpenHandler,
|
|
242
244
|
on: this.v3 ? undefined : {
|
|
243
245
|
"open": this.onOpenHandler
|
|
@@ -250,7 +252,8 @@ var ColorPicker = {
|
|
|
250
252
|
,
|
|
251
253
|
on: _this2.v3 ? undefined : {
|
|
252
254
|
"keydown": _this2.onKeyDownHandler,
|
|
253
|
-
"change": _this2.onPaletteChangeHandler
|
|
255
|
+
"change": _this2.onPaletteChangeHandler,
|
|
256
|
+
"blur": _this2.onBlurHandler
|
|
254
257
|
},
|
|
255
258
|
ref: _this2.v3 ? function (el) {
|
|
256
259
|
_this.paletteRef = el;
|
|
@@ -259,13 +262,15 @@ var ColorPicker = {
|
|
|
259
262
|
attrs: _this2.v3 ? undefined : {
|
|
260
263
|
value: _this2.computedValue || undefined
|
|
261
264
|
},
|
|
262
|
-
onChange: _this2.onPaletteChangeHandler
|
|
265
|
+
onChange: _this2.onPaletteChangeHandler,
|
|
266
|
+
onBlur: _this2.onBlurHandler
|
|
263
267
|
})];
|
|
264
268
|
} : [h(ColorPalette_1.ColorPalette, {
|
|
265
269
|
onKeydown: _this2.onKeyDownHandler,
|
|
266
270
|
on: _this2.v3 ? undefined : {
|
|
267
271
|
"keydown": _this2.onKeyDownHandler,
|
|
268
|
-
"change": _this2.onPaletteChangeHandler
|
|
272
|
+
"change": _this2.onPaletteChangeHandler,
|
|
273
|
+
"blur": _this2.onBlurHandler
|
|
269
274
|
},
|
|
270
275
|
ref: _this2.v3 ? function (el) {
|
|
271
276
|
_this.paletteRef = el;
|
|
@@ -274,8 +279,9 @@ var ColorPicker = {
|
|
|
274
279
|
attrs: _this2.v3 ? undefined : {
|
|
275
280
|
value: _this2.computedValue || undefined
|
|
276
281
|
},
|
|
277
|
-
onChange: _this2.onPaletteChangeHandler
|
|
278
|
-
|
|
282
|
+
onChange: _this2.onPaletteChangeHandler,
|
|
283
|
+
onBlur: _this2.onBlurHandler
|
|
284
|
+
})])]);
|
|
279
285
|
},
|
|
280
286
|
methods: {
|
|
281
287
|
focusElement: function focusElement() {
|
|
@@ -355,11 +361,13 @@ var ColorPicker = {
|
|
|
355
361
|
});
|
|
356
362
|
},
|
|
357
363
|
onBlurTimeout: function onBlurTimeout() {
|
|
358
|
-
|
|
364
|
+
var paleteIsFocused = this.palette && document.activeElement === this.palette.$el;
|
|
365
|
+
|
|
366
|
+
if (!paleteIsFocused) {
|
|
359
367
|
this.setOpen(false, true);
|
|
360
|
-
this.focused = false;
|
|
361
368
|
}
|
|
362
369
|
|
|
370
|
+
this.focused = paleteIsFocused;
|
|
363
371
|
this.blurTimeoutRef = undefined;
|
|
364
372
|
},
|
|
365
373
|
onBlurHandler: function onBlurHandler(event) {
|
|
@@ -390,6 +398,6 @@ var ColorPicker = {
|
|
|
390
398
|
}
|
|
391
399
|
}
|
|
392
400
|
};
|
|
393
|
-
exports.
|
|
394
|
-
var
|
|
395
|
-
exports.
|
|
401
|
+
exports.ColorPickerVue2 = ColorPickerVue2;
|
|
402
|
+
var ColorPicker = ColorPickerVue2;
|
|
403
|
+
exports.ColorPicker = ColorPicker;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { DefineComponent } from '../additionalTypes';
|
|
2
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
3
2
|
declare type DefaultData<V> = object | ((this: V) => {});
|
|
4
3
|
declare type DefaultMethods<V> = {
|
|
5
4
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
@@ -34,8 +33,8 @@ export interface PickerData {
|
|
|
34
33
|
/**
|
|
35
34
|
* @hidden
|
|
36
35
|
*/
|
|
37
|
-
export interface PickerAll extends
|
|
36
|
+
export interface PickerAll extends Vue2type, PickerMethods, PickerData, PickerComputed, PickerState {
|
|
38
37
|
}
|
|
39
|
-
declare let
|
|
40
|
-
declare const
|
|
41
|
-
export { Picker,
|
|
38
|
+
declare let PickerVue2: ComponentOptions<PickerAll, DefaultData<PickerData>, DefaultMethods<PickerAll>, PickerComputed, RecordPropsDefinition<PickerProps>>;
|
|
39
|
+
declare const Picker: DefineComponent<PickerProps, any, PickerData, PickerComputed, PickerMethods, {}, {}, {}, string, PickerProps, PickerProps, {}>;
|
|
40
|
+
export { Picker, PickerVue2 };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.PickerVue2 = exports.Picker = void 0; // @ts-ignore
|
|
7
7
|
|
|
8
8
|
var Vue = require("vue");
|
|
9
9
|
|
|
@@ -25,7 +25,7 @@ var ANCHOR_VERTICAL_ALIGN = 'bottom';
|
|
|
25
25
|
|
|
26
26
|
var POPUP_VERTICAL_ALIGN = 'top'; // tslint:enable:max-line-length
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var PickerVue2 = {
|
|
29
29
|
name: 'KendoPicker',
|
|
30
30
|
props: {
|
|
31
31
|
popupSettings: Object,
|
|
@@ -100,6 +100,6 @@ var Picker = {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
|
-
exports.
|
|
104
|
-
var
|
|
105
|
-
exports.
|
|
103
|
+
exports.PickerVue2 = PickerVue2;
|
|
104
|
+
var Picker = PickerVue2;
|
|
105
|
+
exports.Picker = Picker;
|
|
@@ -121,12 +121,12 @@ export interface ColorPickerProps {
|
|
|
121
121
|
* - small
|
|
122
122
|
* - medium
|
|
123
123
|
* - large
|
|
124
|
-
* -
|
|
124
|
+
* - full
|
|
125
125
|
* - null—Does not set a rounded `className`.
|
|
126
126
|
*
|
|
127
127
|
* @default `medium`
|
|
128
128
|
*/
|
|
129
|
-
rounded?: null | 'small' | 'medium' | 'large' | '
|
|
129
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
|
|
130
130
|
/**
|
|
131
131
|
* Configures the `fillMode` of the ColorPicker.
|
|
132
132
|
*
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { DefineComponent } from '../additionalTypes';
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
2
2
|
import { FormComponentProps } from '@progress/kendo-vue-common';
|
|
3
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
4
3
|
declare type DefaultData<V> = object | ((this: V) => InputData);
|
|
5
4
|
declare type DefaultMethods<V> = {
|
|
6
5
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
@@ -19,6 +18,43 @@ export interface InputProps extends FormComponentProps {
|
|
|
19
18
|
modelValue?: string | number;
|
|
20
19
|
defaultValue?: string | string[] | number | undefined;
|
|
21
20
|
validate?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Configures the `size` of the MaskedTextBox.
|
|
23
|
+
*
|
|
24
|
+
* The available options are:
|
|
25
|
+
* - small
|
|
26
|
+
* - medium
|
|
27
|
+
* - large
|
|
28
|
+
* - null—Does not set a size `class`.
|
|
29
|
+
*
|
|
30
|
+
* @default `medium`
|
|
31
|
+
*/
|
|
32
|
+
size?: null | 'small' | 'medium' | 'large' | string;
|
|
33
|
+
/**
|
|
34
|
+
* Configures the `roundness` of the MaskedTextBox.
|
|
35
|
+
*
|
|
36
|
+
* The available options are:
|
|
37
|
+
* - small
|
|
38
|
+
* - medium
|
|
39
|
+
* - large
|
|
40
|
+
* - full
|
|
41
|
+
* - null—Does not set a rounded `class`.
|
|
42
|
+
*
|
|
43
|
+
* @default `medium`
|
|
44
|
+
*/
|
|
45
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
|
|
46
|
+
/**
|
|
47
|
+
* Configures the `fillMode` of the MaskedTextBox.
|
|
48
|
+
*
|
|
49
|
+
* The available options are:
|
|
50
|
+
* - solid
|
|
51
|
+
* - outline
|
|
52
|
+
* - flat
|
|
53
|
+
* - null—Does not set a fillMode `class`.
|
|
54
|
+
*
|
|
55
|
+
* @default `solid`
|
|
56
|
+
*/
|
|
57
|
+
fillMode?: null | 'solid' | 'flat' | 'outline' | string;
|
|
22
58
|
dir?: string;
|
|
23
59
|
onChange?: Element;
|
|
24
60
|
onFocus?: (event: any) => void;
|
|
@@ -55,7 +91,6 @@ export interface InputMethods {
|
|
|
55
91
|
emitBlur?: (_: any) => void;
|
|
56
92
|
emitFocus?: (_: any) => void;
|
|
57
93
|
focus?: () => void;
|
|
58
|
-
inputClassNames: () => any;
|
|
59
94
|
validity: () => any;
|
|
60
95
|
isInvalid: (state: any) => any;
|
|
61
96
|
setValidity: () => void;
|
|
@@ -71,12 +106,13 @@ export interface InputComputed {
|
|
|
71
106
|
[key: string]: any;
|
|
72
107
|
computedValue?: any;
|
|
73
108
|
spanClassNames?: any;
|
|
109
|
+
inputWrapperClass?: any;
|
|
74
110
|
}
|
|
75
111
|
/**
|
|
76
112
|
* @hidden
|
|
77
113
|
*/
|
|
78
|
-
export interface InputAllMethods extends
|
|
114
|
+
export interface InputAllMethods extends Vue2type, InputMethods, InputComputed, InputState {
|
|
79
115
|
}
|
|
80
|
-
declare let
|
|
81
|
-
declare const
|
|
82
|
-
export { Input,
|
|
116
|
+
declare let InputVue2: ComponentOptions<InputAllMethods, DefaultData<InputData>, DefaultMethods<InputAllMethods>, InputComputed, RecordPropsDefinition<InputProps>>;
|
|
117
|
+
declare const Input: DefineComponent<InputProps, any, InputData, InputComputed, InputMethods, {}, {}, {}, string, InputProps, InputProps, {}>;
|
|
118
|
+
export { Input, InputVue2 };
|