@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/util.js
CHANGED
|
@@ -7,10 +7,10 @@ var styles = {
|
|
|
7
7
|
'outline': 'k-outline',
|
|
8
8
|
'clear': 'k-button-clear',
|
|
9
9
|
'primary': 'k-primary',
|
|
10
|
-
'state-selected': 'k-
|
|
10
|
+
'state-selected': 'k-selected',
|
|
11
11
|
'button-icon': 'k-button-icon',
|
|
12
12
|
'button-icontext': 'k-button-icontext',
|
|
13
|
-
'state-disabled': 'k-
|
|
13
|
+
'state-disabled': 'k-disabled',
|
|
14
14
|
'group-start': 'k-group-start',
|
|
15
15
|
'group-end': 'k-group-end',
|
|
16
16
|
'button-group': 'k-button-group',
|
|
@@ -18,15 +18,15 @@ var styles = {
|
|
|
18
18
|
'ltr': 'k-ltr',
|
|
19
19
|
'rtl': 'k-rtl'
|
|
20
20
|
};
|
|
21
|
-
var
|
|
21
|
+
var notInternalButton = ':not(.k-dropdownlist > .k-button):not(.k-colorpicker > .k-button)';
|
|
22
22
|
/**
|
|
23
23
|
* @hidden
|
|
24
24
|
*/
|
|
25
25
|
export var toolbarButtons = [
|
|
26
|
-
'button' +
|
|
27
|
-
'.k-button-group > button'
|
|
28
|
-
'.k-
|
|
29
|
-
'.k-colorpicker
|
|
26
|
+
'button' + notInternalButton,
|
|
27
|
+
'.k-button-group > button',
|
|
28
|
+
'.k-dropdownlist',
|
|
29
|
+
'.k-colorpicker'
|
|
30
30
|
];
|
|
31
31
|
/**
|
|
32
32
|
* @hidden
|
package/dist/npm/Button.d.ts
CHANGED
|
@@ -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;
|
|
@@ -14,6 +13,75 @@ export interface ButtonProps extends ButtonInterface {
|
|
|
14
13
|
* @hidden
|
|
15
14
|
*/
|
|
16
15
|
children?: any;
|
|
16
|
+
/**
|
|
17
|
+
* Configures the `size` of the Button.
|
|
18
|
+
*
|
|
19
|
+
* The available options are:
|
|
20
|
+
* - small
|
|
21
|
+
* - medium
|
|
22
|
+
* - large
|
|
23
|
+
* - null—Does not set a size `className`.
|
|
24
|
+
*
|
|
25
|
+
* @default `medium`
|
|
26
|
+
*/
|
|
27
|
+
size?: null | 'small' | 'medium' | 'large' | string;
|
|
28
|
+
/**
|
|
29
|
+
* Configures the `shape` of the Button.
|
|
30
|
+
*
|
|
31
|
+
* The available options are:
|
|
32
|
+
* - rectangle
|
|
33
|
+
* - square
|
|
34
|
+
* - null—Does not set a shape `className`.
|
|
35
|
+
*
|
|
36
|
+
* @default `rectangle`
|
|
37
|
+
*/
|
|
38
|
+
shape?: null | 'rectangle' | 'square' | string;
|
|
39
|
+
/**
|
|
40
|
+
* Configures the `roundness` of the Button.
|
|
41
|
+
*
|
|
42
|
+
* The available options are:
|
|
43
|
+
* - small
|
|
44
|
+
* - medium
|
|
45
|
+
* - large
|
|
46
|
+
* - circle
|
|
47
|
+
* - full
|
|
48
|
+
* - null—Does not set a rounded `className`.
|
|
49
|
+
*
|
|
50
|
+
* @default `medium`
|
|
51
|
+
*/
|
|
52
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
|
|
53
|
+
/**
|
|
54
|
+
* Configures the `fillMode` of the Button.
|
|
55
|
+
*
|
|
56
|
+
* The available options are:
|
|
57
|
+
* - solid
|
|
58
|
+
* - outline
|
|
59
|
+
* - flat
|
|
60
|
+
* - link
|
|
61
|
+
* - null—Does not set a fillMode `className`.
|
|
62
|
+
*
|
|
63
|
+
* @default `solid`
|
|
64
|
+
*/
|
|
65
|
+
fillMode?: null | 'solid' | 'outline' | 'flat' | 'link' | string;
|
|
66
|
+
/**
|
|
67
|
+
* Configures the `themeColor` of the Button.
|
|
68
|
+
*
|
|
69
|
+
* The available options are:
|
|
70
|
+
* - base
|
|
71
|
+
* - primary
|
|
72
|
+
* - secondary
|
|
73
|
+
* - tertiary
|
|
74
|
+
* - info
|
|
75
|
+
* - success
|
|
76
|
+
* - warning
|
|
77
|
+
* - dark
|
|
78
|
+
* - light
|
|
79
|
+
* - inverse
|
|
80
|
+
* - null—Does not set a themeColor `className`.
|
|
81
|
+
*
|
|
82
|
+
* @default `base`
|
|
83
|
+
*/
|
|
84
|
+
themeColor?: null | 'base' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'dark' | 'light' | 'inverse' | string;
|
|
17
85
|
}
|
|
18
86
|
/**
|
|
19
87
|
* @hidden
|
|
@@ -26,6 +94,7 @@ export interface ButtonState {
|
|
|
26
94
|
*/
|
|
27
95
|
export interface ButtonComputed {
|
|
28
96
|
[key: string]: any;
|
|
97
|
+
buttonClasses: object;
|
|
29
98
|
}
|
|
30
99
|
/**
|
|
31
100
|
* @hidden
|
|
@@ -45,8 +114,8 @@ export interface ButtonData {
|
|
|
45
114
|
/**
|
|
46
115
|
* @hidden
|
|
47
116
|
*/
|
|
48
|
-
export interface ButtonAll extends
|
|
117
|
+
export interface ButtonAll extends Vue2type, ButtonMethods, ButtonData, ButtonComputed, ButtonState {
|
|
49
118
|
}
|
|
50
|
-
declare let
|
|
51
|
-
declare const
|
|
52
|
-
export { Button,
|
|
119
|
+
declare let ButtonVue2: ComponentOptions<ButtonAll, DefaultData<ButtonData>, DefaultMethods<ButtonAll>, ButtonComputed, RecordPropsDefinition<ButtonProps>>;
|
|
120
|
+
declare const Button: DefineComponent<ButtonProps, any, ButtonData, ButtonComputed, ButtonMethods, {}, {}, {}, string, ButtonProps, ButtonProps, {}>;
|
|
121
|
+
export { Button, ButtonVue2 };
|
package/dist/npm/Button.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.ButtonVue2 = exports.Button = void 0; // @ts-ignore
|
|
7
7
|
|
|
8
8
|
var Vue = require("vue");
|
|
9
9
|
|
|
@@ -18,7 +18,7 @@ var util_1 = require("./util");
|
|
|
18
18
|
|
|
19
19
|
var styles = util_1.default.styles; // tslint:enable:max-line-length
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var ButtonVue2 = {
|
|
22
22
|
name: 'KendoButton',
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
emits: {
|
|
@@ -32,16 +32,7 @@ var Button = {
|
|
|
32
32
|
keypress: null
|
|
33
33
|
},
|
|
34
34
|
props: {
|
|
35
|
-
|
|
36
|
-
type: String,
|
|
37
|
-
default: function _default() {
|
|
38
|
-
return 'default';
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
primary: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: false
|
|
44
|
-
},
|
|
35
|
+
dir: String,
|
|
45
36
|
selected: {
|
|
46
37
|
type: Boolean,
|
|
47
38
|
default: undefined
|
|
@@ -72,6 +63,36 @@ var Button = {
|
|
|
72
63
|
disabled: {
|
|
73
64
|
type: Boolean,
|
|
74
65
|
default: undefined
|
|
66
|
+
},
|
|
67
|
+
size: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: 'medium'
|
|
70
|
+
},
|
|
71
|
+
shape: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: 'rectangle',
|
|
74
|
+
validator: function validator(value) {
|
|
75
|
+
return [null, 'rectangle', 'square'].includes(value);
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
rounded: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: 'medium'
|
|
81
|
+
},
|
|
82
|
+
fillMode: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: 'solid',
|
|
85
|
+
validator: function validator(value) {
|
|
86
|
+
return [null, 'flat', 'link', 'outline', 'solid'].includes(value);
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
// eslint-disable-next-line max-len
|
|
90
|
+
themeColor: {
|
|
91
|
+
type: String,
|
|
92
|
+
default: 'base',
|
|
93
|
+
validator: function validator(value) {
|
|
94
|
+
return [null, 'base', 'dark', 'error', 'info', 'inverse', 'inverse', 'light', 'primary', 'secondary', 'success', 'tertiary', 'warning'].includes(value);
|
|
95
|
+
}
|
|
75
96
|
}
|
|
76
97
|
},
|
|
77
98
|
created: function created() {
|
|
@@ -87,6 +108,25 @@ var Button = {
|
|
|
87
108
|
computed: {
|
|
88
109
|
computedSelected: function computedSelected() {
|
|
89
110
|
return this._activeTemp !== undefined ? this._activeTemp : this.$props.selected !== undefined ? this.$props.selected : this.currentActive;
|
|
111
|
+
},
|
|
112
|
+
buttonClasses: function buttonClasses() {
|
|
113
|
+
var _a;
|
|
114
|
+
|
|
115
|
+
var _b = this.$props,
|
|
116
|
+
disabled = _b.disabled,
|
|
117
|
+
icon = _b.icon,
|
|
118
|
+
iconClass = _b.iconClass,
|
|
119
|
+
imageUrl = _b.imageUrl,
|
|
120
|
+
dir = _b.dir,
|
|
121
|
+
size = _b.size,
|
|
122
|
+
shape = _b.shape,
|
|
123
|
+
rounded = _b.rounded,
|
|
124
|
+
fillMode = _b.fillMode,
|
|
125
|
+
themeColor = _b.themeColor;
|
|
126
|
+
var hasIcon = icon !== undefined || iconClass !== undefined || imageUrl !== undefined;
|
|
127
|
+
var defaultSlot = kendo_vue_common_1.getDefaultSlots(this);
|
|
128
|
+
var hasChildren = defaultSlot;
|
|
129
|
+
return _a = {}, _a[styles.button] = true, _a["k-button-" + (kendo_vue_common_1.kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-button-" + shape] = shape && shape !== 'rectangle', _a["k-rounded-" + (kendo_vue_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-icon-button'] = !hasChildren && hasIcon, _a['k-disabled'] = disabled, _a['k-selected'] = this.computedSelected, _a['k-rtl'] = dir === 'rtl', _a["k-button-" + fillMode] = fillMode, _a["k-button-" + fillMode + "-" + themeColor] = fillMode && themeColor, _a;
|
|
90
130
|
}
|
|
91
131
|
},
|
|
92
132
|
updated: function updated() {
|
|
@@ -158,21 +198,14 @@ var Button = {
|
|
|
158
198
|
},
|
|
159
199
|
// @ts-ignore
|
|
160
200
|
render: function render(createElement) {
|
|
161
|
-
var _a;
|
|
162
|
-
|
|
163
201
|
var h = gh || createElement;
|
|
164
|
-
var
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
imageUrl = _b.imageUrl,
|
|
171
|
-
imageAlt = _b.imageAlt;
|
|
172
|
-
var hasIcon = icon !== undefined || iconClass !== undefined || imageUrl !== undefined;
|
|
202
|
+
var _a = this.$props,
|
|
203
|
+
togglable = _a.togglable,
|
|
204
|
+
icon = _a.icon,
|
|
205
|
+
iconClass = _a.iconClass,
|
|
206
|
+
imageUrl = _a.imageUrl,
|
|
207
|
+
imageAlt = _a.imageAlt;
|
|
173
208
|
var defaultSlot = kendo_vue_common_1.getDefaultSlots(this);
|
|
174
|
-
var hasChildren = defaultSlot;
|
|
175
|
-
var buttonClasses = kendo_vue_common_1.classNames([styles.button], (_a = {}, _a[styles["" + look]] = look !== 'default', _a[styles.primary] = primary, _a[styles['state-disabled']] = this.$props.disabled, _a[styles['state-selected']] = this.computedSelected, _a[styles['button-icon']] = !hasChildren && hasIcon, _a[styles['button-icontext']] = hasChildren && hasIcon, _a), [styles["" + this.$props.dir]]);
|
|
176
209
|
|
|
177
210
|
var iconElement = function iconElement() {
|
|
178
211
|
if (imageUrl) {
|
|
@@ -188,7 +221,7 @@ var Button = {
|
|
|
188
221
|
src: imageUrl
|
|
189
222
|
});
|
|
190
223
|
} else if (icon) {
|
|
191
|
-
var iconClasses = kendo_vue_common_1.classNames('k-icon', 'k-i-' + icon);
|
|
224
|
+
var iconClasses = kendo_vue_common_1.classNames('k-icon', 'k-button-icon', 'k-i-' + icon);
|
|
192
225
|
return h("span", {
|
|
193
226
|
role: "presentation",
|
|
194
227
|
attrs: this.v3 ? undefined : {
|
|
@@ -210,7 +243,7 @@ var Button = {
|
|
|
210
243
|
};
|
|
211
244
|
|
|
212
245
|
return h("button", {
|
|
213
|
-
"class": buttonClasses,
|
|
246
|
+
"class": this.buttonClasses,
|
|
214
247
|
onClick: this.handleClick,
|
|
215
248
|
on: this.v3 ? undefined : {
|
|
216
249
|
"click": this.handleClick,
|
|
@@ -241,6 +274,6 @@ var Button = {
|
|
|
241
274
|
}, [iconElement.call(this), defaultSlot]);
|
|
242
275
|
}
|
|
243
276
|
};
|
|
244
|
-
exports.
|
|
245
|
-
var
|
|
246
|
-
exports.
|
|
277
|
+
exports.ButtonVue2 = ButtonVue2;
|
|
278
|
+
var Button = ButtonVue2;
|
|
279
|
+
exports.Button = Button;
|
|
@@ -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,8 +36,8 @@ export interface ButtonGroupData {
|
|
|
37
36
|
/**
|
|
38
37
|
* @hidden
|
|
39
38
|
*/
|
|
40
|
-
export interface ButtonGroupAll extends
|
|
39
|
+
export interface ButtonGroupAll extends Vue2type, ButtonGroupMethods, ButtonGroupData, ButtonGroupState {
|
|
41
40
|
}
|
|
42
|
-
declare let
|
|
43
|
-
declare const
|
|
44
|
-
export { ButtonGroup,
|
|
41
|
+
declare let ButtonGroupVue2: ComponentOptions<ButtonGroupAll, DefaultData<ButtonGroupData>, DefaultMethods<ButtonGroupAll>, {}, RecordPropsDefinition<ButtonGroupProps>>;
|
|
42
|
+
declare const ButtonGroup: DefineComponent<ButtonGroupProps, any, ButtonGroupData, {}, ButtonGroupMethods, {}, {}, {}, string, ButtonGroupProps, ButtonGroupProps, {}>;
|
|
43
|
+
export { ButtonGroup, ButtonGroupVue2 };
|
package/dist/npm/ButtonGroup.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.ButtonGroupVue2 = exports.ButtonGroup = void 0; // @ts-ignore
|
|
7
7
|
|
|
8
8
|
var Vue = require("vue");
|
|
9
9
|
|
|
@@ -20,7 +20,7 @@ var util_1 = require("./util");
|
|
|
20
20
|
|
|
21
21
|
var styles = util_1.default.styles; // tslint:enable:max-line-length
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var ButtonGroupVue2 = {
|
|
24
24
|
name: 'KendoButtonGroup',
|
|
25
25
|
props: {
|
|
26
26
|
disabled: {
|
|
@@ -81,7 +81,7 @@ var ButtonGroup = {
|
|
|
81
81
|
});
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
-
var groupClasses = kendo_vue_common_1.classNames([styles['button-group']], (_a = {}, _a[
|
|
84
|
+
var groupClasses = kendo_vue_common_1.classNames([styles['button-group']], (_a = {}, _a['k-disabled'] = this.$props.disabled, _a[styles['button-group-stretched']] = !!this.$props.width, _a));
|
|
85
85
|
return h("div", {
|
|
86
86
|
style: {
|
|
87
87
|
width: this.width
|
|
@@ -108,6 +108,6 @@ var ButtonGroup = {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
|
-
exports.
|
|
112
|
-
var
|
|
113
|
-
exports.
|
|
111
|
+
exports.ButtonGroupVue2 = ButtonGroupVue2;
|
|
112
|
+
var ButtonGroup = ButtonGroupVue2;
|
|
113
|
+
exports.ButtonGroup = ButtonGroup;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface ButtonInterface {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* **Deprecated**. Use [`fillMode`]({% slug api_buttons_buttonprops %}#toc-fillmode) prop instead.
|
|
7
7
|
*
|
|
8
8
|
* The available values are:
|
|
9
9
|
* * [`ButtonLook`]({% slug api_buttons_buttonlook %}) = `flat` | `outline`
|
|
@@ -12,12 +12,19 @@ export interface ButtonInterface {
|
|
|
12
12
|
look?: string;
|
|
13
13
|
/**
|
|
14
14
|
* Adds visual weight to the Button and makes it primary ([see example]({% slug primary_button %})).
|
|
15
|
+
* **Deprecated**. Use [`themeColor`]({% slug api_buttons_buttonprops %}#toc-themecolor) prop instead.
|
|
16
|
+
*
|
|
17
|
+
* @deprecated
|
|
15
18
|
*/
|
|
16
19
|
primary?: boolean;
|
|
17
20
|
/**
|
|
18
21
|
* Specifies if the Button is disabled ([see example]({% slug disabled_button %})). Defaults to `false`.
|
|
19
22
|
*/
|
|
20
23
|
disabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Sets the direction of the Button.
|
|
26
|
+
*/
|
|
27
|
+
dir?: string;
|
|
21
28
|
/**
|
|
22
29
|
* Sets the selected state of the Button. Can be used for controlled state.
|
|
23
30
|
*/
|
package/dist/npm/ButtonWrap.d.ts
CHANGED
|
@@ -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;
|
|
@@ -7,8 +6,8 @@ declare type DefaultMethods<V> = {
|
|
|
7
6
|
/**
|
|
8
7
|
* @hidden
|
|
9
8
|
*/
|
|
10
|
-
export interface ButtonAll extends
|
|
9
|
+
export interface ButtonAll extends Vue2type {
|
|
11
10
|
}
|
|
12
|
-
declare let
|
|
13
|
-
declare const
|
|
14
|
-
export { ButtonWrap,
|
|
11
|
+
declare let ButtonWrapVue2: ComponentOptions<ButtonAll, DefaultData<{}>, DefaultMethods<ButtonAll>, {}, RecordPropsDefinition<{}>>;
|
|
12
|
+
declare const ButtonWrap: DefineComponent<{}, any, {}, {}, {}, {}, {}, {}, string, {}, {}, {}>;
|
|
13
|
+
export { ButtonWrap, ButtonWrapVue2 };
|
package/dist/npm/ButtonWrap.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.ButtonWrapVue2 = exports.ButtonWrap = void 0; // @ts-ignore
|
|
7
7
|
|
|
8
8
|
var Vue = require("vue");
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@ var gh = allVue.h;
|
|
|
13
13
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common"); // tslint:enable:max-line-length
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var ButtonWrapVue2 = {
|
|
17
17
|
name: 'KendoButtonWrap',
|
|
18
18
|
props: {},
|
|
19
19
|
// @ts-ignore
|
|
@@ -30,6 +30,6 @@ var ButtonWrap = {
|
|
|
30
30
|
return defaultSlot[0];
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
|
-
exports.
|
|
34
|
-
var
|
|
35
|
-
exports.
|
|
33
|
+
exports.ButtonWrapVue2 = ButtonWrapVue2;
|
|
34
|
+
var ButtonWrap = ButtonWrapVue2;
|
|
35
|
+
exports.ButtonWrap = ButtonWrap;
|
package/dist/npm/Chip/Chip.d.ts
CHANGED
|
@@ -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;
|
|
@@ -13,10 +12,6 @@ export interface ChipProps {
|
|
|
13
12
|
* Sets the `id` property of the top div element of the Chip.
|
|
14
13
|
*/
|
|
15
14
|
id?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Sets additional classes to the Chip.
|
|
18
|
-
*/
|
|
19
|
-
className?: string;
|
|
20
15
|
/**
|
|
21
16
|
* Sets the `tabIndex` attribute.
|
|
22
17
|
*/
|
|
@@ -61,6 +56,57 @@ export interface ChipProps {
|
|
|
61
56
|
* Determines if the Chip style is `filled` or `outlined`.
|
|
62
57
|
*/
|
|
63
58
|
look?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Configures the `size` of the Chip.
|
|
61
|
+
*
|
|
62
|
+
* The available options are:
|
|
63
|
+
* - small
|
|
64
|
+
* - medium
|
|
65
|
+
* - large
|
|
66
|
+
* - null—Does not set a size `class`.
|
|
67
|
+
*
|
|
68
|
+
* @default `medium`
|
|
69
|
+
*/
|
|
70
|
+
size?: null | 'small' | 'medium' | 'large' | string;
|
|
71
|
+
/**
|
|
72
|
+
* Configures the `roundness` of the Chip.
|
|
73
|
+
*
|
|
74
|
+
* The available options are:
|
|
75
|
+
* - small
|
|
76
|
+
* - medium
|
|
77
|
+
* - large
|
|
78
|
+
* - full
|
|
79
|
+
* - null—Does not set a rounded `class`.
|
|
80
|
+
*
|
|
81
|
+
* @default `medium`
|
|
82
|
+
*/
|
|
83
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
|
|
84
|
+
/**
|
|
85
|
+
* Configures the `fillMode` of the Chip.
|
|
86
|
+
*
|
|
87
|
+
* The available options are:
|
|
88
|
+
* - solid
|
|
89
|
+
* - outline
|
|
90
|
+
* - flat
|
|
91
|
+
* - null—Does not set a fillMode `class`.
|
|
92
|
+
*
|
|
93
|
+
* @default `solid`
|
|
94
|
+
*/
|
|
95
|
+
fillMode?: null | 'solid' | 'outline' | 'flat' | string;
|
|
96
|
+
/**
|
|
97
|
+
* Configures the `themeColor` of the Chip.
|
|
98
|
+
*
|
|
99
|
+
* The available options are:
|
|
100
|
+
* - base
|
|
101
|
+
* - info
|
|
102
|
+
* - success
|
|
103
|
+
* - warning
|
|
104
|
+
* - error
|
|
105
|
+
* - null—Does not set a themeColor `class`.
|
|
106
|
+
*
|
|
107
|
+
* @default `base`
|
|
108
|
+
*/
|
|
109
|
+
themeColor?: null | 'base' | 'info' | 'success' | 'warning' | 'error' | string;
|
|
64
110
|
/**
|
|
65
111
|
* Triggered on Chip removing.
|
|
66
112
|
*/
|
|
@@ -140,7 +186,7 @@ export interface ChipComputed {
|
|
|
140
186
|
/**
|
|
141
187
|
* @hidden
|
|
142
188
|
*/
|
|
143
|
-
export interface ChipAll extends ChipMethods, ChipState, ChipData, ChipComputed,
|
|
189
|
+
export interface ChipAll extends ChipMethods, ChipState, ChipData, ChipComputed, Vue2type {
|
|
144
190
|
}
|
|
145
191
|
/**
|
|
146
192
|
* @hidden
|
|
@@ -148,6 +194,6 @@ export interface ChipAll extends ChipMethods, ChipState, ChipData, ChipComputed,
|
|
|
148
194
|
/**
|
|
149
195
|
* Represents the default `Chip` component.
|
|
150
196
|
*/
|
|
151
|
-
declare let
|
|
152
|
-
declare const
|
|
153
|
-
export { Chip,
|
|
197
|
+
declare let ChipVue2: ComponentOptions<Vue2type, DefaultData<ChipData>, DefaultMethods<ChipAll>, ChipComputed, RecordPropsDefinition<ChipProps>>;
|
|
198
|
+
declare const Chip: DefineComponent<ChipProps, any, ChipData, ChipComputed, ChipMethods, {}, {}, {}, string, ChipProps, ChipProps, {}>;
|
|
199
|
+
export { Chip, ChipVue2 };
|
package/dist/npm/Chip/Chip.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.ChipVue2 = exports.Chip = void 0; // @ts-ignore
|
|
7
7
|
|
|
8
8
|
var Vue = require("vue");
|
|
9
9
|
|
|
@@ -29,7 +29,7 @@ var package_metadata_1 = require("../package-metadata");
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var ChipVue2 = {
|
|
33
33
|
name: 'KendoVueChip',
|
|
34
34
|
props: {
|
|
35
35
|
id: String,
|
|
@@ -69,6 +69,29 @@ var Chip = {
|
|
|
69
69
|
return 'solid';
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
|
+
size: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: 'medium'
|
|
75
|
+
},
|
|
76
|
+
rounded: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: 'medium'
|
|
79
|
+
},
|
|
80
|
+
fillMode: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: 'solid',
|
|
83
|
+
validator: function validator(value) {
|
|
84
|
+
return [null, 'flat', 'outline', 'solid'].includes(value);
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
// eslint-disable-next-line max-len
|
|
88
|
+
themeColor: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: 'base',
|
|
91
|
+
validator: function validator(value) {
|
|
92
|
+
return [null, 'base', 'error', 'info', 'success', 'warning'].includes(value);
|
|
93
|
+
}
|
|
94
|
+
},
|
|
72
95
|
dataItem: Object,
|
|
73
96
|
selected: Boolean,
|
|
74
97
|
ariaDescribedBy: String
|
|
@@ -254,9 +277,18 @@ var Chip = {
|
|
|
254
277
|
};
|
|
255
278
|
},
|
|
256
279
|
render: function render(createElement) {
|
|
280
|
+
var _a;
|
|
281
|
+
|
|
257
282
|
var _this = this;
|
|
258
283
|
|
|
259
284
|
var h = gh || createElement;
|
|
285
|
+
var _b = this.$props,
|
|
286
|
+
size = _b.size,
|
|
287
|
+
rounded = _b.rounded,
|
|
288
|
+
themeColor = _b.themeColor,
|
|
289
|
+
fillMode = _b.fillMode,
|
|
290
|
+
look = _b.look,
|
|
291
|
+
type = _b.type;
|
|
260
292
|
return h("div", {
|
|
261
293
|
role: this.$props.role,
|
|
262
294
|
attrs: this.v3 ? undefined : {
|
|
@@ -274,19 +306,12 @@ var Chip = {
|
|
|
274
306
|
} : 'chip',
|
|
275
307
|
dir: this.currentDir,
|
|
276
308
|
tabIndex: kendo_vue_common_1.getTabIndex(this.$props.tabIndex, this.$props.disabled, undefined),
|
|
277
|
-
"class": kendo_vue_common_1.classNames('k-chip', {
|
|
309
|
+
"class": kendo_vue_common_1.classNames('k-chip', (_a = {
|
|
278
310
|
'k-rtl': this.currentDir === 'rtl',
|
|
279
|
-
'k-
|
|
280
|
-
'k-
|
|
281
|
-
'k-
|
|
282
|
-
|
|
283
|
-
'k-chip-warning': this.$props.type === 'warning',
|
|
284
|
-
'k-chip-error': this.$props.type === 'error',
|
|
285
|
-
'k-chip-info': this.$props.type === 'info',
|
|
286
|
-
'k-chip-has-icon': this.$props.icon,
|
|
287
|
-
'k-chip-outline': this.$props.look === 'outline' || this.$props.look === 'outlined',
|
|
288
|
-
'k-chip-solid': this.$props.look === 'solid' || this.$props.look === 'filled'
|
|
289
|
-
}, this.$props.className),
|
|
311
|
+
'k-disabled': this.$props.disabled,
|
|
312
|
+
'k-selected': this.currentSelected,
|
|
313
|
+
'k-focus': this.computedFocused()
|
|
314
|
+
}, _a["k-chip-" + (kendo_vue_common_1.kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-rounded-" + (kendo_vue_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a["k-chip-" + fillMode] = fillMode, _a["k-chip-" + fillMode + "-" + themeColor] = Boolean(fillMode && themeColor), _a['k-chip-success'] = type === 'success', _a['k-chip-warning'] = type === 'warning', _a['k-chip-error'] = type === 'error', _a['k-chip-info'] = type === 'info', _a['k-chip-outline'] = look === 'outline' || look === 'outlined', _a['k-chip-solid'] = look === 'solid' || look === 'filled', _a)),
|
|
290
315
|
"aria-checked": this.currentSelected,
|
|
291
316
|
"aria-disabled": this.$props.disabled,
|
|
292
317
|
"aria-describedby": this.$props.ariaDescribedBy,
|
|
@@ -300,12 +325,10 @@ var Chip = {
|
|
|
300
325
|
onBlur: this.handleBlur,
|
|
301
326
|
onClick: this.handleClick,
|
|
302
327
|
onKeydown: this.handleKeyDown
|
|
303
|
-
}, [this.currentSelected && h("span", {
|
|
304
|
-
"class": 'k-
|
|
305
|
-
},
|
|
306
|
-
"class":
|
|
307
|
-
})]), this.$props.icon && h("span", {
|
|
308
|
-
"class": "k-icon k-chip-icon " + this.$props.icon
|
|
328
|
+
}, [this.currentSelected && this.$props.selectedIcon && h("span", {
|
|
329
|
+
"class": kendo_vue_common_1.classNames('k-chip-icon', 'k-icon', this.$props.selectedIcon)
|
|
330
|
+
}), this.$props.icon && h("span", {
|
|
331
|
+
"class": kendo_vue_common_1.classNames('k-chip-icon', 'k-icon', this.$props.icon)
|
|
309
332
|
}), h("span", {
|
|
310
333
|
"class": 'k-chip-content'
|
|
311
334
|
}, [this.$props.text && h("span", {
|
|
@@ -315,16 +338,14 @@ var Chip = {
|
|
|
315
338
|
},
|
|
316
339
|
"class": 'k-chip-label'
|
|
317
340
|
}, [this.$props.text])]), this.$props.removable && h("span", {
|
|
318
|
-
"class": 'k-
|
|
341
|
+
"class": kendo_vue_common_1.classNames('k-chip-icon', 'k-icon', this.$props.removeIcon),
|
|
319
342
|
onClick: this.handleRemove,
|
|
320
343
|
on: this.v3 ? undefined : {
|
|
321
344
|
"click": this.handleRemove
|
|
322
345
|
}
|
|
323
|
-
}
|
|
324
|
-
"class": "k-icon " + this.$props.removeIcon
|
|
325
|
-
})])]);
|
|
346
|
+
})]);
|
|
326
347
|
}
|
|
327
348
|
};
|
|
328
|
-
exports.
|
|
329
|
-
var
|
|
330
|
-
exports.
|
|
349
|
+
exports.ChipVue2 = ChipVue2;
|
|
350
|
+
var Chip = ChipVue2;
|
|
351
|
+
exports.Chip = Chip;
|