@progress/kendo-vue-buttons 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-buttons.js +1 -1
- package/dist/es/Button.d.ts +75 -6
- package/dist/es/Button.js +62 -29
- package/dist/es/ButtonGroup.d.ts +5 -6
- package/dist/es/ButtonGroup.js +4 -4
- package/dist/es/ButtonInterface.d.ts +8 -1
- package/dist/es/ButtonWrap.d.ts +5 -6
- package/dist/es/ButtonWrap.js +3 -3
- package/dist/es/Chip/Chip.d.ts +56 -10
- package/dist/es/Chip/Chip.js +47 -26
- package/dist/es/Chip/ChipList.d.ts +42 -6
- package/dist/es/Chip/ChipList.js +39 -13
- package/dist/es/FloatingActionButton/FloatingActionButton.d.ts +5 -6
- package/dist/es/FloatingActionButton/FloatingActionButton.js +26 -11
- package/dist/es/FloatingActionButton/FloatingActionButtonItem.d.ts +5 -6
- package/dist/es/FloatingActionButton/FloatingActionButtonItem.js +3 -3
- package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +28 -2
- package/dist/es/FloatingActionButton/models/shape.d.ts +1 -1
- package/dist/es/ListButton/ButtonItem.d.ts +5 -6
- package/dist/es/ListButton/ButtonItem.js +25 -12
- package/dist/es/ListButton/DropDownButton.d.ts +5 -6
- package/dist/es/ListButton/DropDownButton.js +61 -19
- package/dist/es/ListButton/SplitButton.d.ts +5 -6
- package/dist/es/ListButton/SplitButton.js +67 -29
- package/dist/es/ListButton/models/ListButtonProps.d.ts +138 -0
- package/dist/es/additionalTypes.ts +7 -1
- package/dist/es/buttonLook.d.ts +0 -1
- package/dist/es/main.d.ts +13 -13
- package/dist/es/main.js +13 -13
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/toolbar/Toolbar.d.ts +5 -6
- package/dist/es/toolbar/Toolbar.js +16 -9
- package/dist/es/toolbar/tools/ToolbarItem.d.ts +5 -6
- package/dist/es/toolbar/tools/ToolbarItem.js +3 -3
- package/dist/es/toolbar/tools/ToolbarSeparator.d.ts +4 -5
- package/dist/es/toolbar/tools/ToolbarSeparator.js +3 -3
- package/dist/es/toolbar/tools/ToolbarSpacer.d.ts +4 -5
- package/dist/es/toolbar/tools/ToolbarSpacer.js +3 -3
- package/dist/es/util.js +7 -7
- package/dist/npm/Button.d.ts +75 -6
- package/dist/npm/Button.js +63 -30
- package/dist/npm/ButtonGroup.d.ts +5 -6
- package/dist/npm/ButtonGroup.js +6 -6
- package/dist/npm/ButtonInterface.d.ts +8 -1
- package/dist/npm/ButtonWrap.d.ts +5 -6
- package/dist/npm/ButtonWrap.js +5 -5
- package/dist/npm/Chip/Chip.d.ts +56 -10
- package/dist/npm/Chip/Chip.js +48 -27
- package/dist/npm/Chip/ChipList.d.ts +42 -6
- package/dist/npm/Chip/ChipList.js +40 -14
- package/dist/npm/FloatingActionButton/FloatingActionButton.d.ts +5 -6
- package/dist/npm/FloatingActionButton/FloatingActionButton.js +27 -12
- package/dist/npm/FloatingActionButton/FloatingActionButtonItem.d.ts +5 -6
- package/dist/npm/FloatingActionButton/FloatingActionButtonItem.js +5 -5
- package/dist/npm/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +28 -2
- package/dist/npm/FloatingActionButton/models/shape.d.ts +1 -1
- package/dist/npm/ListButton/ButtonItem.d.ts +5 -6
- package/dist/npm/ListButton/ButtonItem.js +27 -14
- package/dist/npm/ListButton/DropDownButton.d.ts +5 -6
- package/dist/npm/ListButton/DropDownButton.js +62 -20
- package/dist/npm/ListButton/SplitButton.d.ts +5 -6
- package/dist/npm/ListButton/SplitButton.js +68 -31
- package/dist/npm/ListButton/models/ListButtonProps.d.ts +138 -0
- package/dist/npm/additionalTypes.ts +7 -1
- package/dist/npm/buttonLook.d.ts +0 -1
- package/dist/npm/main.d.ts +13 -13
- package/dist/npm/main.js +13 -12
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/toolbar/Toolbar.d.ts +5 -6
- package/dist/npm/toolbar/Toolbar.js +18 -11
- package/dist/npm/toolbar/tools/ToolbarItem.d.ts +5 -6
- package/dist/npm/toolbar/tools/ToolbarItem.js +5 -5
- package/dist/npm/toolbar/tools/ToolbarSeparator.d.ts +4 -5
- package/dist/npm/toolbar/tools/ToolbarSeparator.js +5 -5
- package/dist/npm/toolbar/tools/ToolbarSpacer.d.ts +4 -5
- package/dist/npm/toolbar/tools/ToolbarSpacer.js +5 -5
- package/dist/npm/util.js +7 -7
- package/package.json +5 -5
package/dist/es/Chip/ChipList.js
CHANGED
|
@@ -19,7 +19,7 @@ import * as Vue from 'vue';
|
|
|
19
19
|
var allVue = Vue;
|
|
20
20
|
var gh = allVue.h;
|
|
21
21
|
var ref = allVue.ref;
|
|
22
|
-
import { getTabIndex, classNames, getListeners, templateRendering, getTemplate, validatePackage } from '@progress/kendo-vue-common';
|
|
22
|
+
import { getTabIndex, classNames, getListeners, templateRendering, getTemplate, validatePackage, kendoThemeMaps } from '@progress/kendo-vue-common';
|
|
23
23
|
import { selectionReducer } from './selection-reducer';
|
|
24
24
|
import { focusReducer } from './focus-reducer';
|
|
25
25
|
import { dataReducer } from './data-reducer';
|
|
@@ -33,7 +33,7 @@ import { packageMetadata } from '../package-metadata';
|
|
|
33
33
|
* Represents the default `ChipList` component.
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var ChipListVue2 = {
|
|
37
37
|
name: 'KendoVueChipList',
|
|
38
38
|
props: {
|
|
39
39
|
id: String,
|
|
@@ -52,6 +52,21 @@ var ChipList = {
|
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
|
+
size: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: 'medium'
|
|
58
|
+
},
|
|
59
|
+
rounded: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: 'medium'
|
|
62
|
+
},
|
|
63
|
+
fillMode: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: 'solid',
|
|
66
|
+
validator: function validator(value) {
|
|
67
|
+
return [null, 'flat', 'outline', 'solid'].includes(value);
|
|
68
|
+
}
|
|
69
|
+
},
|
|
55
70
|
selection: {
|
|
56
71
|
type: String,
|
|
57
72
|
default: function _default() {
|
|
@@ -184,9 +199,12 @@ var ChipList = {
|
|
|
184
199
|
};
|
|
185
200
|
},
|
|
186
201
|
render: function render(createElement) {
|
|
202
|
+
var _a;
|
|
203
|
+
|
|
187
204
|
var _this = this;
|
|
188
205
|
|
|
189
206
|
var h = gh || createElement;
|
|
207
|
+
var size = this.$props.size;
|
|
190
208
|
return h("div", {
|
|
191
209
|
ref: this.v3 ? function (el) {
|
|
192
210
|
_this.chipListRef = el;
|
|
@@ -204,12 +222,7 @@ var ChipList = {
|
|
|
204
222
|
dir: this.currentDir,
|
|
205
223
|
style: this.$props.style,
|
|
206
224
|
tabIndex: getTabIndex(this.$props.tabIndex, this.$props.disabled, undefined),
|
|
207
|
-
"class": classNames('k-chip-list', {
|
|
208
|
-
'k-rtl': this.currentDir === 'rtl',
|
|
209
|
-
'k-selection-single': this.$props.selection === 'single',
|
|
210
|
-
'k-selection-multiple': this.$props.selection === 'multiple',
|
|
211
|
-
'k-state-disabled': this.$props.disabled
|
|
212
|
-
}, this.$props.className),
|
|
225
|
+
"class": classNames('k-chip-list', (_a = {}, _a["k-chip-list-" + (kendoThemeMaps.sizeMap[size] || size)] = size, _a['k-rtl'] = this.currentDir === 'rtl', _a['k-selection-single'] = this.$props.selection === 'single', _a['k-selection-multiple'] = this.$props.selection === 'multiple', _a['k-disabled'] = this.$props.disabled, _a)),
|
|
213
226
|
"aria-labelledby": this.$props.ariaLabelledBy,
|
|
214
227
|
"aria-describedby": this.$props.ariaDescribedBy
|
|
215
228
|
}, [this.computedDataItems.map(function (item) {
|
|
@@ -221,20 +234,33 @@ var ChipList = {
|
|
|
221
234
|
role: 'option',
|
|
222
235
|
dataItem: item,
|
|
223
236
|
text: item[this.$props.textField],
|
|
224
|
-
value: item[this.$props.valueField]
|
|
237
|
+
value: item[this.$props.valueField],
|
|
238
|
+
size: this.$props.size,
|
|
239
|
+
rounded: this.$props.rounded,
|
|
240
|
+
fillMode: this.$props.fillMode
|
|
225
241
|
},
|
|
226
242
|
dataItem: item,
|
|
227
243
|
key: item[this.$props.valueField],
|
|
228
244
|
text: item[this.$props.textField],
|
|
229
|
-
value: item[this.$props.valueField]
|
|
245
|
+
value: item[this.$props.valueField],
|
|
246
|
+
size: this.$props.size,
|
|
247
|
+
rounded: this.$props.rounded,
|
|
248
|
+
fillMode: this.$props.fillMode
|
|
230
249
|
});
|
|
231
250
|
return getTemplate.call(this, {
|
|
232
251
|
h: h,
|
|
233
252
|
template: chipTemplate,
|
|
234
|
-
defaultRendering: chipDefaultRendering
|
|
253
|
+
defaultRendering: chipDefaultRendering,
|
|
254
|
+
additionalProps: {
|
|
255
|
+
dataItem: item,
|
|
256
|
+
key: item[this.$props.valueField],
|
|
257
|
+
text: item[this.$props.textField],
|
|
258
|
+
value: item[this.$props.valueField],
|
|
259
|
+
size: this.$props.size
|
|
260
|
+
}
|
|
235
261
|
});
|
|
236
262
|
}, this)]);
|
|
237
263
|
}
|
|
238
264
|
};
|
|
239
|
-
var
|
|
240
|
-
export { ChipList,
|
|
265
|
+
var ChipList = ChipListVue2;
|
|
266
|
+
export { ChipList, ChipListVue2 };
|
|
@@ -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;
|
|
@@ -37,7 +36,7 @@ export interface FloatingActionButtonComputed {
|
|
|
37
36
|
/**
|
|
38
37
|
* @hidden
|
|
39
38
|
*/
|
|
40
|
-
export interface FloatingActionButtonAll extends FloatingActionButtonMethods, FloatingActionButtonState, FloatingActionButtonData, FloatingActionButtonComputed,
|
|
39
|
+
export interface FloatingActionButtonAll extends FloatingActionButtonMethods, FloatingActionButtonState, FloatingActionButtonData, FloatingActionButtonComputed, Vue2type {
|
|
41
40
|
}
|
|
42
41
|
/**
|
|
43
42
|
* @hidden
|
|
@@ -45,6 +44,6 @@ export interface FloatingActionButtonAll extends FloatingActionButtonMethods, Fl
|
|
|
45
44
|
/**
|
|
46
45
|
* Represents the default `FloatingActionButton` component.
|
|
47
46
|
*/
|
|
48
|
-
declare let
|
|
49
|
-
declare const
|
|
50
|
-
export { FloatingActionButton,
|
|
47
|
+
declare let FloatingActionButtonVue2: ComponentOptions<Vue2type, DefaultData<FloatingActionButtonData>, DefaultMethods<FloatingActionButtonAll>, FloatingActionButtonComputed, RecordPropsDefinition<FloatingActionButtonProps>>;
|
|
48
|
+
declare const FloatingActionButton: DefineComponent<FloatingActionButtonProps, any, FloatingActionButtonData, FloatingActionButtonComputed, FloatingActionButtonMethods, {}, {}, {}, string, FloatingActionButtonProps, FloatingActionButtonProps, {}>;
|
|
49
|
+
export { FloatingActionButton, FloatingActionButtonVue2 };
|
|
@@ -3,7 +3,7 @@ import * as Vue from 'vue';
|
|
|
3
3
|
var allVue = Vue;
|
|
4
4
|
var gh = allVue.h;
|
|
5
5
|
var ref = allVue.ref;
|
|
6
|
-
import { classNames, guid, Keys, getTabIndex, templateRendering, getListeners, validatePackage, canUseDOM } from '@progress/kendo-vue-common';
|
|
6
|
+
import { classNames, guid, Keys, getTabIndex, templateRendering, getListeners, validatePackage, canUseDOM, kendoThemeMaps } from '@progress/kendo-vue-common';
|
|
7
7
|
import { FloatingActionButtonItem } from './FloatingActionButtonItem';
|
|
8
8
|
import { packageMetadata } from '../package-metadata';
|
|
9
9
|
import { position, getAnchorAlign, getPopupAlign, getTextDirectionClass } from './utils';
|
|
@@ -16,7 +16,7 @@ import { Popup } from '@progress/kendo-vue-popup';
|
|
|
16
16
|
* Represents the default `FloatingActionButton` component.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var FloatingActionButtonVue2 = {
|
|
20
20
|
name: 'KendoVueFloatingActionButton',
|
|
21
21
|
props: {
|
|
22
22
|
id: String,
|
|
@@ -61,6 +61,17 @@ var FloatingActionButton = {
|
|
|
61
61
|
return 'pill';
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
+
rounded: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: 'full'
|
|
67
|
+
},
|
|
68
|
+
fillMode: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: 'solid',
|
|
71
|
+
validator: function validator(value) {
|
|
72
|
+
return [null, 'flat', 'link', 'outline', 'solid'].includes(value);
|
|
73
|
+
}
|
|
74
|
+
},
|
|
64
75
|
size: {
|
|
65
76
|
type: String,
|
|
66
77
|
default: function _default() {
|
|
@@ -122,13 +133,17 @@ var FloatingActionButton = {
|
|
|
122
133
|
},
|
|
123
134
|
computed: {
|
|
124
135
|
buttonClassNames: function buttonClassNames() {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
136
|
+
var _a;
|
|
137
|
+
|
|
138
|
+
var _b = this.$props,
|
|
139
|
+
size = _b.size,
|
|
140
|
+
icon = _b.icon,
|
|
141
|
+
themeColor = _b.themeColor,
|
|
142
|
+
fillMode = _b.fillMode,
|
|
143
|
+
rounded = _b.rounded;
|
|
144
|
+
return _a = {
|
|
145
|
+
'k-fab': true
|
|
146
|
+
}, _a["k-fab-" + (kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a["k-fab-" + fillMode] = fillMode, _a["k-fab-" + fillMode + "-" + themeColor] = fillMode && themeColor, _a['k-icon-button'] = icon, _a['k-disabled'] = this.$props.disabled, _a['k-focus'] = this.currentFocused, _a["k-" + this.$props.align.vertical + "-" + this.$props.align.horizontal] = true, _a;
|
|
132
147
|
},
|
|
133
148
|
computedOpened: function computedOpened() {
|
|
134
149
|
return this.$props.opened === undefined ? this.currentOpened : this.$props.opened;
|
|
@@ -479,5 +494,5 @@ var FloatingActionButton = {
|
|
|
479
494
|
}, [fabItems.call(_this2)])])]);
|
|
480
495
|
}
|
|
481
496
|
};
|
|
482
|
-
var
|
|
483
|
-
export { FloatingActionButton,
|
|
497
|
+
var FloatingActionButton = FloatingActionButtonVue2;
|
|
498
|
+
export { FloatingActionButton, FloatingActionButtonVue2 };
|
|
@@ -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;
|
|
@@ -106,12 +105,12 @@ export interface FloatingActionButtonItemComputed {
|
|
|
106
105
|
/**
|
|
107
106
|
* @hidden
|
|
108
107
|
*/
|
|
109
|
-
export interface FloatingActionButtonItemAll extends FloatingActionButtonItemMethods, FloatingActionButtonItemState, FloatingActionButtonItemData, FloatingActionButtonItemComputed,
|
|
108
|
+
export interface FloatingActionButtonItemAll extends FloatingActionButtonItemMethods, FloatingActionButtonItemState, FloatingActionButtonItemData, FloatingActionButtonItemComputed, Vue2type {
|
|
110
109
|
}
|
|
111
110
|
/**
|
|
112
111
|
* Represents the [Kendo UI for Vue FloatingActionButtonItem component]({% slug overview_floatingactionbutton %}).
|
|
113
112
|
*
|
|
114
113
|
*/
|
|
115
|
-
declare let
|
|
116
|
-
declare const
|
|
117
|
-
export { FloatingActionButtonItem,
|
|
114
|
+
declare let FloatingActionButtonItemVue2: ComponentOptions<Vue2type, DefaultData<FloatingActionButtonItemData>, DefaultMethods<FloatingActionButtonItemAll>, FloatingActionButtonItemComputed, RecordPropsDefinition<FloatingActionButtonItemProps>>;
|
|
115
|
+
declare const FloatingActionButtonItem: DefineComponent<FloatingActionButtonItemProps, any, FloatingActionButtonItemData, FloatingActionButtonItemComputed, FloatingActionButtonItemMethods, {}, {}, {}, string, FloatingActionButtonItemProps, FloatingActionButtonItemProps, {}>;
|
|
116
|
+
export { FloatingActionButtonItem, FloatingActionButtonItemVue2 };
|
|
@@ -9,7 +9,7 @@ import { classNames, getTabIndex, getTemplate } from '@progress/kendo-vue-common
|
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var FloatingActionButtonItemVue2 = {
|
|
13
13
|
name: 'KendoVueFloatingActionButtonItem',
|
|
14
14
|
props: {
|
|
15
15
|
disabled: Boolean,
|
|
@@ -119,5 +119,5 @@ var FloatingActionButtonItem = {
|
|
|
119
119
|
return item;
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
|
-
var
|
|
123
|
-
export { FloatingActionButtonItem,
|
|
122
|
+
var FloatingActionButtonItem = FloatingActionButtonItemVue2;
|
|
123
|
+
export { FloatingActionButtonItem, FloatingActionButtonItemVue2 };
|
|
@@ -3,7 +3,6 @@ import { FloatingActionButtonAlign } from '../models/align';
|
|
|
3
3
|
import { FloatingActionButtonAlignOffset } from '../models/align-offset';
|
|
4
4
|
import { FloatingActionButtonEvent, FloatingActionButtonItemEvent } from '../models/events';
|
|
5
5
|
import { FloatingActionButtonPositionMode } from '../models/position-mode';
|
|
6
|
-
import { FloatingActionButtonShape } from '../models/shape';
|
|
7
6
|
import { FloatingActionButtonSize } from '../models/size';
|
|
8
7
|
import { FloatingActionButtonThemeColor } from '../models/theme-color';
|
|
9
8
|
/**
|
|
@@ -114,7 +113,34 @@ export interface FloatingActionButtonProps extends Omit<any, 'onBlur' | 'onFocus
|
|
|
114
113
|
* * `square`—Applies square shape on the FloatingActionButton.
|
|
115
114
|
*
|
|
116
115
|
*/
|
|
117
|
-
shape?:
|
|
116
|
+
shape?: null | 'rectangle' | 'square' | string;
|
|
117
|
+
/**
|
|
118
|
+
* Configures the `roundness` of the Floating Action Button.
|
|
119
|
+
*
|
|
120
|
+
* The available options are:
|
|
121
|
+
* - small
|
|
122
|
+
* - medium
|
|
123
|
+
* - large
|
|
124
|
+
* - circle
|
|
125
|
+
* - full
|
|
126
|
+
* - null—Does not set a rounded `class`.
|
|
127
|
+
*
|
|
128
|
+
* @default `medium`
|
|
129
|
+
*/
|
|
130
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
|
|
131
|
+
/**
|
|
132
|
+
* Configures the `fillMode` of the Floating Action Button.
|
|
133
|
+
*
|
|
134
|
+
* The available options are:
|
|
135
|
+
* - solid
|
|
136
|
+
* - outline
|
|
137
|
+
* - flat
|
|
138
|
+
* - link
|
|
139
|
+
* - null—Does not set a fillMode `class`.
|
|
140
|
+
*
|
|
141
|
+
* @default `solid`
|
|
142
|
+
*/
|
|
143
|
+
fillMode?: null | 'solid' | 'outline' | 'flat' | 'link' | string;
|
|
118
144
|
/**
|
|
119
145
|
* Specifies the size of the Floating Action Button
|
|
120
146
|
* [see example]({% slug appearance_floatingactionbutton %}).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Specifies the shape of the Floating Action Button.
|
|
3
3
|
*
|
|
4
4
|
* The possible values are:
|
|
5
|
-
* * `
|
|
5
|
+
* * `full`(Default)—Applies border radius equal to half of the height of the FloatingActionButton.
|
|
6
6
|
* If the Floating Action Button contains only icon, the shape will be circle.
|
|
7
7
|
* * `circle`—Applies circle shape on the FloatingActionButton.
|
|
8
8
|
* * `rectangle`—Applies no border radius on the FloatingActionButton.
|
|
@@ -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;
|
|
@@ -46,8 +45,8 @@ export interface ButtonItemData {
|
|
|
46
45
|
/**
|
|
47
46
|
* @hidden
|
|
48
47
|
*/
|
|
49
|
-
export interface ButtonItemAll extends
|
|
48
|
+
export interface ButtonItemAll extends Vue2type, ButtonItemMethods, ButtonItemData, ButtonItemComputed, ButtonItemState {
|
|
50
49
|
}
|
|
51
|
-
declare let
|
|
52
|
-
declare const
|
|
53
|
-
export { ButtonItem,
|
|
50
|
+
declare let ButtonItemVue2: ComponentOptions<ButtonItemAll, DefaultData<ButtonItemData>, DefaultMethods<ButtonItemAll>, ButtonItemComputed, RecordPropsDefinition<ButtonItemProps>>;
|
|
51
|
+
declare const ButtonItem: DefineComponent<ButtonItemProps, any, ButtonItemData, ButtonItemComputed, ButtonItemMethods, {}, {}, {}, string, ButtonItemProps, ButtonItemProps, {}>;
|
|
52
|
+
export { ButtonItem, ButtonItemVue2 };
|
|
@@ -4,7 +4,7 @@ var allVue = Vue;
|
|
|
4
4
|
var gh = allVue.h;
|
|
5
5
|
import { getTemplate } from '@progress/kendo-vue-common'; // tslint:enable:max-line-length
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var ButtonItemVue2 = {
|
|
8
8
|
name: 'KendoButtonItem',
|
|
9
9
|
// @ts-ignore
|
|
10
10
|
emits: {
|
|
@@ -22,14 +22,19 @@ var ButtonItem = {
|
|
|
22
22
|
},
|
|
23
23
|
computed: {
|
|
24
24
|
wrapperClass: function wrapperClass() {
|
|
25
|
+
return {
|
|
26
|
+
'k-item': true
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
innerClass: function innerClass() {
|
|
25
30
|
var _a = this.$props,
|
|
26
31
|
dataItem = _a.dataItem,
|
|
27
32
|
focused = _a.focused;
|
|
28
33
|
return {
|
|
29
|
-
'k-
|
|
30
|
-
'k-
|
|
31
|
-
'k-
|
|
32
|
-
'k-
|
|
34
|
+
'k-link k-menu-link': true,
|
|
35
|
+
'k-focus': focused,
|
|
36
|
+
'k-selected': dataItem.selected,
|
|
37
|
+
'k-disabled': dataItem.disabled
|
|
33
38
|
};
|
|
34
39
|
}
|
|
35
40
|
},
|
|
@@ -61,15 +66,21 @@ var ButtonItem = {
|
|
|
61
66
|
index = _a.index;
|
|
62
67
|
var text = dataItem.text !== undefined ? dataItem.text : textField ? dataItem[textField] : dataItem;
|
|
63
68
|
var iconClass = dataItem.icon ? "k-icon k-i-" + dataItem.icon : dataItem.iconClass;
|
|
64
|
-
var itemContent =
|
|
69
|
+
var itemContent = h("span", {
|
|
70
|
+
tabIndex: -1,
|
|
71
|
+
attrs: this.v3 ? undefined : {
|
|
72
|
+
tabIndex: -1
|
|
73
|
+
},
|
|
74
|
+
"class": this.innerClass,
|
|
75
|
+
key: "icon"
|
|
76
|
+
}, [iconClass && h("span", {
|
|
65
77
|
"class": iconClass,
|
|
66
78
|
role: "presentation",
|
|
67
79
|
attrs: this.v3 ? undefined : {
|
|
68
80
|
role: "presentation"
|
|
69
|
-
}
|
|
70
|
-
key: "icon"
|
|
81
|
+
}
|
|
71
82
|
}), dataItem.imageUrl && h("img", {
|
|
72
|
-
"class": "k-
|
|
83
|
+
"class": "k-icon",
|
|
73
84
|
alt: "",
|
|
74
85
|
attrs: this.v3 ? undefined : {
|
|
75
86
|
alt: "",
|
|
@@ -79,7 +90,9 @@ var ButtonItem = {
|
|
|
79
90
|
src: dataItem.imageUrl,
|
|
80
91
|
role: "presentation",
|
|
81
92
|
key: "image"
|
|
82
|
-
}), text
|
|
93
|
+
}), text && h("span", {
|
|
94
|
+
"class": "k-menu-link-text"
|
|
95
|
+
}, [text])]);
|
|
83
96
|
return getTemplate.call(this, {
|
|
84
97
|
h: h,
|
|
85
98
|
template: this.$props.dataItem.render || render,
|
|
@@ -113,5 +126,5 @@ var ButtonItem = {
|
|
|
113
126
|
return item;
|
|
114
127
|
}
|
|
115
128
|
};
|
|
116
|
-
var
|
|
117
|
-
export { ButtonItem,
|
|
129
|
+
var ButtonItem = ButtonItemVue2;
|
|
130
|
+
export { ButtonItem, ButtonItemVue2 };
|
|
@@ -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;
|
|
@@ -54,8 +53,8 @@ export interface DropDownButtonState {
|
|
|
54
53
|
/**
|
|
55
54
|
* @hidden
|
|
56
55
|
*/
|
|
57
|
-
export interface DropDownButtonAll extends
|
|
56
|
+
export interface DropDownButtonAll extends Vue2type, DropDownButtonMethods, DropDownButtonData, DropDownButtonComputed, DropDownButtonState {
|
|
58
57
|
}
|
|
59
|
-
declare let
|
|
60
|
-
declare const
|
|
61
|
-
export { DropDownButton,
|
|
58
|
+
declare let DropDownButtonVue2: ComponentOptions<DropDownButtonAll, DefaultData<DropDownButtonData>, DefaultMethods<DropDownButtonAll>, DropDownButtonComputed, RecordPropsDefinition<DropDownButtonProps>>;
|
|
59
|
+
declare const DropDownButton: DefineComponent<DropDownButtonProps, any, DropDownButtonData, DropDownButtonComputed, DropDownButtonMethods, {}, {}, {}, string, DropDownButtonProps, DropDownButtonProps, {}>;
|
|
60
|
+
export { DropDownButton, DropDownButtonVue2 };
|
|
@@ -20,7 +20,7 @@ var allVue = Vue;
|
|
|
20
20
|
var gh = allVue.h;
|
|
21
21
|
var ref = allVue.ref;
|
|
22
22
|
import { Button as KendoButton } from '../Button';
|
|
23
|
-
import { classNames, guid, Keys } from '@progress/kendo-vue-common';
|
|
23
|
+
import { classNames, guid, Keys, kendoThemeMaps } from '@progress/kendo-vue-common';
|
|
24
24
|
import navigation from './utils/navigation';
|
|
25
25
|
import { ButtonItem } from './ButtonItem';
|
|
26
26
|
import { Popup } from '@progress/kendo-vue-popup';
|
|
@@ -28,7 +28,7 @@ import { getAnchorAlign, getPopupAlign } from './utils/popup';
|
|
|
28
28
|
import { validatePackage, templateRendering, getListeners, canUseDOM } from '@progress/kendo-vue-common';
|
|
29
29
|
import { packageMetadata } from '../package-metadata'; // tslint:enable:max-line-length
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var DropDownButtonVue2 = {
|
|
32
32
|
name: 'KendoDropDownButton',
|
|
33
33
|
// @ts-ignore
|
|
34
34
|
emits: {
|
|
@@ -57,6 +57,36 @@ var DropDownButton = {
|
|
|
57
57
|
popupSettings: Object,
|
|
58
58
|
itemRender: [String, Object, Function],
|
|
59
59
|
item: Function,
|
|
60
|
+
size: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: 'medium'
|
|
63
|
+
},
|
|
64
|
+
shape: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: 'rectangle',
|
|
67
|
+
validator: function validator(value) {
|
|
68
|
+
return [null, 'rectangle', 'square'].includes(value);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
rounded: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: 'medium'
|
|
74
|
+
},
|
|
75
|
+
fillMode: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: 'solid',
|
|
78
|
+
validator: function validator(value) {
|
|
79
|
+
return [null, 'flat', 'link', 'outline', 'solid'].includes(value);
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
// eslint-disable-next-line max-len
|
|
83
|
+
themeColor: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: 'base',
|
|
86
|
+
validator: function validator(value) {
|
|
87
|
+
return [null, 'base', 'dark', 'error', 'info', 'inverse', 'inverse', 'light', 'primary', 'secondary', 'success', 'tertiary', 'warning'].includes(value);
|
|
88
|
+
}
|
|
89
|
+
},
|
|
60
90
|
opened: {
|
|
61
91
|
type: Boolean,
|
|
62
92
|
default: undefined
|
|
@@ -105,9 +135,8 @@ var DropDownButton = {
|
|
|
105
135
|
},
|
|
106
136
|
wrapperClass: function wrapperClass() {
|
|
107
137
|
return {
|
|
108
|
-
'k-widget': true,
|
|
109
138
|
'k-dropdown-button': true,
|
|
110
|
-
'k-
|
|
139
|
+
'k-focus': this.focused
|
|
111
140
|
};
|
|
112
141
|
}
|
|
113
142
|
},
|
|
@@ -142,6 +171,7 @@ var DropDownButton = {
|
|
|
142
171
|
}) : dataItem;
|
|
143
172
|
return (// @ts-ignore
|
|
144
173
|
h(ButtonItem, {
|
|
174
|
+
"class": "k-menu-item",
|
|
145
175
|
dataItem: currentDataItem,
|
|
146
176
|
attrs: this.v3 ? undefined : {
|
|
147
177
|
dataItem: currentDataItem,
|
|
@@ -173,8 +203,10 @@ var DropDownButton = {
|
|
|
173
203
|
var renderPopup = function renderPopup() {
|
|
174
204
|
var _this = this;
|
|
175
205
|
|
|
176
|
-
var _a = this.$props
|
|
177
|
-
|
|
206
|
+
var _a = this.$props,
|
|
207
|
+
_b = _a.popupSettings,
|
|
208
|
+
popupSettings = _b === void 0 ? {} : _b,
|
|
209
|
+
size = _a.size;
|
|
178
210
|
return (// @ts-ignore function children
|
|
179
211
|
h(Popup, {
|
|
180
212
|
anchor: this._anchor,
|
|
@@ -182,13 +214,13 @@ var DropDownButton = {
|
|
|
182
214
|
anchor: this._anchor,
|
|
183
215
|
show: this.computedOpened,
|
|
184
216
|
animate: popupSettings.animate,
|
|
185
|
-
popupClass: classNames('k-
|
|
217
|
+
popupClass: classNames('k-menu-popup', popupSettings.popupClass),
|
|
186
218
|
anchorAlign: popupSettings.anchorAlign || getAnchorAlign(rtl),
|
|
187
219
|
popupAlign: popupSettings.popupAlign || getPopupAlign(rtl)
|
|
188
220
|
},
|
|
189
221
|
show: this.computedOpened,
|
|
190
222
|
animate: popupSettings.animate,
|
|
191
|
-
popupClass: classNames('k-
|
|
223
|
+
popupClass: classNames('k-menu-popup', popupSettings.popupClass),
|
|
192
224
|
anchorAlign: popupSettings.anchorAlign || getAnchorAlign(rtl),
|
|
193
225
|
popupAlign: popupSettings.popupAlign || getPopupAlign(rtl),
|
|
194
226
|
style: rtl ? {
|
|
@@ -196,7 +228,7 @@ var DropDownButton = {
|
|
|
196
228
|
} : undefined
|
|
197
229
|
}, this.v3 ? function () {
|
|
198
230
|
return [h("ul", {
|
|
199
|
-
"class": "k-
|
|
231
|
+
"class": "k-group k-menu-group k-reset k-menu-group-" + (kendoThemeMaps.sizeMap[size] || size),
|
|
200
232
|
role: "menu",
|
|
201
233
|
attrs: _this.v3 ? undefined : {
|
|
202
234
|
role: "menu",
|
|
@@ -205,7 +237,7 @@ var DropDownButton = {
|
|
|
205
237
|
id: _this.guid
|
|
206
238
|
}, [renderChildItems.call(_this)])];
|
|
207
239
|
} : [h("ul", {
|
|
208
|
-
"class": "k-
|
|
240
|
+
"class": "k-group k-menu-group k-reset k-menu-group-" + (kendoThemeMaps.sizeMap[size] || size),
|
|
209
241
|
role: "menu",
|
|
210
242
|
attrs: _this.v3 ? undefined : {
|
|
211
243
|
role: "menu",
|
|
@@ -232,14 +264,13 @@ var DropDownButton = {
|
|
|
232
264
|
}
|
|
233
265
|
}, [// @ts-ignore function children
|
|
234
266
|
h(KendoButton, {
|
|
235
|
-
|
|
236
|
-
on: this.v3 ? undefined : {
|
|
237
|
-
"click": this.onClickMainButton,
|
|
238
|
-
"mousedown": this.mouseDown
|
|
239
|
-
},
|
|
240
|
-
onMousedown: this.mouseDown,
|
|
241
|
-
disabled: disabled || undefined,
|
|
267
|
+
size: this.$props.size,
|
|
242
268
|
attrs: this.v3 ? undefined : {
|
|
269
|
+
size: this.$props.size,
|
|
270
|
+
shape: this.$props.shape,
|
|
271
|
+
rounded: this.$props.rounded,
|
|
272
|
+
fillMode: this.$props.fillMode,
|
|
273
|
+
themeColor: this.$props.themeColor,
|
|
243
274
|
disabled: disabled || undefined,
|
|
244
275
|
tabIndex: tabIndex,
|
|
245
276
|
accessKey: this.$props.accessKey,
|
|
@@ -257,6 +288,17 @@ var DropDownButton = {
|
|
|
257
288
|
"aria-owns": this.guid,
|
|
258
289
|
"aria-activedescendant": this.focusedIndex !== undefined && this.focusedIndex >= 0 ? this.guid + "-" + this.focusedIndex : undefined
|
|
259
290
|
},
|
|
291
|
+
shape: this.$props.shape,
|
|
292
|
+
rounded: this.$props.rounded,
|
|
293
|
+
fillMode: this.$props.fillMode,
|
|
294
|
+
themeColor: this.$props.themeColor,
|
|
295
|
+
onClick: this.onClickMainButton,
|
|
296
|
+
on: this.v3 ? undefined : {
|
|
297
|
+
"click": this.onClickMainButton,
|
|
298
|
+
"mousedown": this.mouseDown
|
|
299
|
+
},
|
|
300
|
+
onMousedown: this.mouseDown,
|
|
301
|
+
disabled: disabled || undefined,
|
|
260
302
|
tabIndex: tabIndex,
|
|
261
303
|
accessKey: this.$props.accessKey,
|
|
262
304
|
icon: this.$props.icon,
|
|
@@ -398,5 +440,5 @@ var DropDownButton = {
|
|
|
398
440
|
}
|
|
399
441
|
}
|
|
400
442
|
};
|
|
401
|
-
var
|
|
402
|
-
export { DropDownButton,
|
|
443
|
+
var DropDownButton = DropDownButtonVue2;
|
|
444
|
+
export { DropDownButton, DropDownButtonVue2 };
|
|
@@ -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;
|
|
@@ -55,8 +54,8 @@ export interface SplitButtonState {
|
|
|
55
54
|
/**
|
|
56
55
|
* @hidden
|
|
57
56
|
*/
|
|
58
|
-
export interface SplitButtonAll extends
|
|
57
|
+
export interface SplitButtonAll extends Vue2type, SplitButtonMethods, SplitButtonData, SplitButtonComputed, SplitButtonState {
|
|
59
58
|
}
|
|
60
|
-
declare let
|
|
61
|
-
declare const
|
|
62
|
-
export { SplitButton,
|
|
59
|
+
declare let SplitButtonVue2: ComponentOptions<SplitButtonAll, DefaultData<SplitButtonData>, DefaultMethods<SplitButtonAll>, SplitButtonComputed, RecordPropsDefinition<SplitButtonProps>>;
|
|
60
|
+
declare const SplitButton: DefineComponent<SplitButtonProps, any, SplitButtonData, SplitButtonComputed, SplitButtonMethods, {}, {}, {}, string, SplitButtonProps, SplitButtonProps, {}>;
|
|
61
|
+
export { SplitButton, SplitButtonVue2 };
|