@progress/kendo-vue-buttons 2.7.3-dev.202201070829 → 2.8.0-dev.202201131525
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 +64 -19
- package/dist/es/ButtonGroup.d.ts +5 -6
- package/dist/es/ButtonGroup.js +4 -4
- package/dist/es/ButtonInterface.d.ts +4 -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 +65 -20
- package/dist/npm/ButtonGroup.d.ts +5 -6
- package/dist/npm/ButtonGroup.js +6 -6
- package/dist/npm/ButtonInterface.d.ts +4 -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/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/es/Button.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import * as Vue from 'vue';
|
|
3
3
|
var allVue = Vue;
|
|
4
4
|
var gh = allVue.h;
|
|
5
|
-
import { classNames, getDefaultSlots, validatePackage } from '@progress/kendo-vue-common';
|
|
5
|
+
import { classNames, getDefaultSlots, validatePackage, kendoThemeMaps } from '@progress/kendo-vue-common';
|
|
6
6
|
import { packageMetadata } from './package-metadata';
|
|
7
7
|
import util from './util';
|
|
8
8
|
var styles = util.styles; // tslint:enable:max-line-length
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var ButtonVue2 = {
|
|
11
11
|
name: 'KendoButton',
|
|
12
12
|
// @ts-ignore
|
|
13
13
|
emits: {
|
|
@@ -61,6 +61,36 @@ var Button = {
|
|
|
61
61
|
disabled: {
|
|
62
62
|
type: Boolean,
|
|
63
63
|
default: undefined
|
|
64
|
+
},
|
|
65
|
+
size: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: 'medium'
|
|
68
|
+
},
|
|
69
|
+
shape: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: 'rectangle',
|
|
72
|
+
validator: function validator(value) {
|
|
73
|
+
return [null, 'rectangle', 'square'].includes(value);
|
|
74
|
+
}
|
|
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', 'link', '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', 'dark', 'error', 'info', 'inverse', 'inverse', 'light', 'primary', 'secondary', 'success', 'tertiary', 'warning'].includes(value);
|
|
93
|
+
}
|
|
64
94
|
}
|
|
65
95
|
},
|
|
66
96
|
created: function created() {
|
|
@@ -76,6 +106,28 @@ var Button = {
|
|
|
76
106
|
computed: {
|
|
77
107
|
computedSelected: function computedSelected() {
|
|
78
108
|
return this._activeTemp !== undefined ? this._activeTemp : this.$props.selected !== undefined ? this.$props.selected : this.currentActive;
|
|
109
|
+
},
|
|
110
|
+
buttonClasses: function buttonClasses() {
|
|
111
|
+
var _a;
|
|
112
|
+
|
|
113
|
+
var _b = this.$props,
|
|
114
|
+
look = _b.look,
|
|
115
|
+
primary = _b.primary,
|
|
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 = getDefaultSlots(this);
|
|
128
|
+
var hasChildren = defaultSlot;
|
|
129
|
+
return _a = {}, _a[styles.button] = true, _a["k-button-" + (kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-button-" + shape] = shape && shape !== 'rectangle', _a["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-icon-button'] = !hasChildren && hasIcon, _a['k-disabled'] = disabled, _a['k-selected'] = this.currentActive, _a['k-rtl'] = dir === 'rtl', // Polyfills for deprecated properties,
|
|
130
|
+
_a['k-button-solid-primary'] = primary && look === 'default', _a['k-button-flat'] = look === 'flat', _a['k-button-flat-primary'] = primary && look === 'flat', _a['k-button-outline'] = look === 'outline', _a['k-button-outline-primary'] = primary && look === 'outline', _a["k-button-" + fillMode] = fillMode, _a["k-button-" + fillMode + "-" + themeColor] = fillMode && themeColor, _a;
|
|
79
131
|
}
|
|
80
132
|
},
|
|
81
133
|
updated: function updated() {
|
|
@@ -147,21 +199,14 @@ var Button = {
|
|
|
147
199
|
},
|
|
148
200
|
// @ts-ignore
|
|
149
201
|
render: function render(createElement) {
|
|
150
|
-
var _a;
|
|
151
|
-
|
|
152
202
|
var h = gh || createElement;
|
|
153
|
-
var
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
imageUrl = _b.imageUrl,
|
|
160
|
-
imageAlt = _b.imageAlt;
|
|
161
|
-
var hasIcon = icon !== undefined || iconClass !== undefined || imageUrl !== undefined;
|
|
203
|
+
var _a = this.$props,
|
|
204
|
+
togglable = _a.togglable,
|
|
205
|
+
icon = _a.icon,
|
|
206
|
+
iconClass = _a.iconClass,
|
|
207
|
+
imageUrl = _a.imageUrl,
|
|
208
|
+
imageAlt = _a.imageAlt;
|
|
162
209
|
var defaultSlot = getDefaultSlots(this);
|
|
163
|
-
var hasChildren = defaultSlot;
|
|
164
|
-
var buttonClasses = 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]]);
|
|
165
210
|
|
|
166
211
|
var iconElement = function iconElement() {
|
|
167
212
|
if (imageUrl) {
|
|
@@ -177,7 +222,7 @@ var Button = {
|
|
|
177
222
|
src: imageUrl
|
|
178
223
|
});
|
|
179
224
|
} else if (icon) {
|
|
180
|
-
var iconClasses = classNames('k-icon', 'k-i-' + icon);
|
|
225
|
+
var iconClasses = classNames('k-icon', 'k-button-icon', 'k-i-' + icon);
|
|
181
226
|
return h("span", {
|
|
182
227
|
role: "presentation",
|
|
183
228
|
attrs: this.v3 ? undefined : {
|
|
@@ -199,7 +244,7 @@ var Button = {
|
|
|
199
244
|
};
|
|
200
245
|
|
|
201
246
|
return h("button", {
|
|
202
|
-
"class": buttonClasses,
|
|
247
|
+
"class": this.buttonClasses,
|
|
203
248
|
onClick: this.handleClick,
|
|
204
249
|
on: this.v3 ? undefined : {
|
|
205
250
|
"click": this.handleClick,
|
|
@@ -230,5 +275,5 @@ var Button = {
|
|
|
230
275
|
}, [iconElement.call(this), defaultSlot]);
|
|
231
276
|
}
|
|
232
277
|
};
|
|
233
|
-
var
|
|
234
|
-
export { Button,
|
|
278
|
+
var Button = ButtonVue2;
|
|
279
|
+
export { Button, ButtonVue2 };
|
package/dist/es/ButtonGroup.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;
|
|
@@ -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/es/ButtonGroup.js
CHANGED
|
@@ -8,7 +8,7 @@ import { packageMetadata } from './package-metadata';
|
|
|
8
8
|
import util from './util';
|
|
9
9
|
var styles = util.styles; // tslint:enable:max-line-length
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var ButtonGroupVue2 = {
|
|
12
12
|
name: 'KendoButtonGroup',
|
|
13
13
|
props: {
|
|
14
14
|
disabled: {
|
|
@@ -69,7 +69,7 @@ var ButtonGroup = {
|
|
|
69
69
|
});
|
|
70
70
|
};
|
|
71
71
|
|
|
72
|
-
var groupClasses = classNames([styles['button-group']], (_a = {}, _a[
|
|
72
|
+
var groupClasses = classNames([styles['button-group']], (_a = {}, _a['k-disabled'] = this.$props.disabled, _a[styles['button-group-stretched']] = !!this.$props.width, _a));
|
|
73
73
|
return h("div", {
|
|
74
74
|
style: {
|
|
75
75
|
width: this.width
|
|
@@ -96,5 +96,5 @@ var ButtonGroup = {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
|
-
var
|
|
100
|
-
export { ButtonGroup,
|
|
99
|
+
var ButtonGroup = ButtonGroupVue2;
|
|
100
|
+
export { ButtonGroup, ButtonGroupVue2 };
|
|
@@ -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,6 +12,9 @@ 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
|
/**
|
package/dist/es/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/es/ButtonWrap.js
CHANGED
|
@@ -4,7 +4,7 @@ var allVue = Vue;
|
|
|
4
4
|
var gh = allVue.h;
|
|
5
5
|
import { getDefaultSlots } from '@progress/kendo-vue-common'; // tslint:enable:max-line-length
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var ButtonWrapVue2 = {
|
|
8
8
|
name: 'KendoButtonWrap',
|
|
9
9
|
props: {},
|
|
10
10
|
// @ts-ignore
|
|
@@ -21,5 +21,5 @@ var ButtonWrap = {
|
|
|
21
21
|
return defaultSlot[0];
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
var
|
|
25
|
-
export { ButtonWrap,
|
|
24
|
+
var ButtonWrap = ButtonWrapVue2;
|
|
25
|
+
export { ButtonWrap, ButtonWrapVue2 };
|
package/dist/es/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/es/Chip/Chip.js
CHANGED
|
@@ -4,7 +4,7 @@ var allVue = Vue;
|
|
|
4
4
|
var gh = allVue.h;
|
|
5
5
|
var ref = allVue.ref; // import { ChipListSelectionContext, ChipListFocusContext, ChipListDataContext } from './ChipList';
|
|
6
6
|
|
|
7
|
-
import { classNames, getTabIndex, Keys, noop, validatePackage } from '@progress/kendo-vue-common';
|
|
7
|
+
import { classNames, getTabIndex, Keys, noop, validatePackage, kendoThemeMaps } from '@progress/kendo-vue-common';
|
|
8
8
|
import { FOCUS_ACTION } from './focus-reducer';
|
|
9
9
|
import { DATA_ACTION } from './data-reducer';
|
|
10
10
|
import { SELECTION_ACTION } from './selection-reducer';
|
|
@@ -17,7 +17,7 @@ import { packageMetadata } from '../package-metadata';
|
|
|
17
17
|
* Represents the default `Chip` component.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var ChipVue2 = {
|
|
21
21
|
name: 'KendoVueChip',
|
|
22
22
|
props: {
|
|
23
23
|
id: String,
|
|
@@ -57,6 +57,29 @@ var Chip = {
|
|
|
57
57
|
return 'solid';
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
|
+
size: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: 'medium'
|
|
63
|
+
},
|
|
64
|
+
rounded: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: 'medium'
|
|
67
|
+
},
|
|
68
|
+
fillMode: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: 'solid',
|
|
71
|
+
validator: function validator(value) {
|
|
72
|
+
return [null, 'flat', 'outline', 'solid'].includes(value);
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
// eslint-disable-next-line max-len
|
|
76
|
+
themeColor: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: 'base',
|
|
79
|
+
validator: function validator(value) {
|
|
80
|
+
return [null, 'base', 'error', 'info', 'success', 'warning'].includes(value);
|
|
81
|
+
}
|
|
82
|
+
},
|
|
60
83
|
dataItem: Object,
|
|
61
84
|
selected: Boolean,
|
|
62
85
|
ariaDescribedBy: String
|
|
@@ -242,9 +265,18 @@ var Chip = {
|
|
|
242
265
|
};
|
|
243
266
|
},
|
|
244
267
|
render: function render(createElement) {
|
|
268
|
+
var _a;
|
|
269
|
+
|
|
245
270
|
var _this = this;
|
|
246
271
|
|
|
247
272
|
var h = gh || createElement;
|
|
273
|
+
var _b = this.$props,
|
|
274
|
+
size = _b.size,
|
|
275
|
+
rounded = _b.rounded,
|
|
276
|
+
themeColor = _b.themeColor,
|
|
277
|
+
fillMode = _b.fillMode,
|
|
278
|
+
look = _b.look,
|
|
279
|
+
type = _b.type;
|
|
248
280
|
return h("div", {
|
|
249
281
|
role: this.$props.role,
|
|
250
282
|
attrs: this.v3 ? undefined : {
|
|
@@ -262,19 +294,12 @@ var Chip = {
|
|
|
262
294
|
} : 'chip',
|
|
263
295
|
dir: this.currentDir,
|
|
264
296
|
tabIndex: getTabIndex(this.$props.tabIndex, this.$props.disabled, undefined),
|
|
265
|
-
"class": classNames('k-chip', {
|
|
297
|
+
"class": classNames('k-chip', (_a = {
|
|
266
298
|
'k-rtl': this.currentDir === 'rtl',
|
|
267
|
-
'k-
|
|
268
|
-
'k-
|
|
269
|
-
'k-
|
|
270
|
-
|
|
271
|
-
'k-chip-warning': this.$props.type === 'warning',
|
|
272
|
-
'k-chip-error': this.$props.type === 'error',
|
|
273
|
-
'k-chip-info': this.$props.type === 'info',
|
|
274
|
-
'k-chip-has-icon': this.$props.icon,
|
|
275
|
-
'k-chip-outline': this.$props.look === 'outline' || this.$props.look === 'outlined',
|
|
276
|
-
'k-chip-solid': this.$props.look === 'solid' || this.$props.look === 'filled'
|
|
277
|
-
}, this.$props.className),
|
|
299
|
+
'k-disabled': this.$props.disabled,
|
|
300
|
+
'k-selected': this.currentSelected,
|
|
301
|
+
'k-focus': this.computedFocused()
|
|
302
|
+
}, _a["k-chip-" + (kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-rounded-" + (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)),
|
|
278
303
|
"aria-checked": this.currentSelected,
|
|
279
304
|
"aria-disabled": this.$props.disabled,
|
|
280
305
|
"aria-describedby": this.$props.ariaDescribedBy,
|
|
@@ -288,12 +313,10 @@ var Chip = {
|
|
|
288
313
|
onBlur: this.handleBlur,
|
|
289
314
|
onClick: this.handleClick,
|
|
290
315
|
onKeydown: this.handleKeyDown
|
|
291
|
-
}, [this.currentSelected && h("span", {
|
|
292
|
-
"class": 'k-
|
|
293
|
-
},
|
|
294
|
-
"class":
|
|
295
|
-
})]), this.$props.icon && h("span", {
|
|
296
|
-
"class": "k-icon k-chip-icon " + this.$props.icon
|
|
316
|
+
}, [this.currentSelected && this.$props.selectedIcon && h("span", {
|
|
317
|
+
"class": classNames('k-chip-icon', 'k-icon', this.$props.selectedIcon)
|
|
318
|
+
}), this.$props.icon && h("span", {
|
|
319
|
+
"class": classNames('k-chip-icon', 'k-icon', this.$props.icon)
|
|
297
320
|
}), h("span", {
|
|
298
321
|
"class": 'k-chip-content'
|
|
299
322
|
}, [this.$props.text && h("span", {
|
|
@@ -303,15 +326,13 @@ var Chip = {
|
|
|
303
326
|
},
|
|
304
327
|
"class": 'k-chip-label'
|
|
305
328
|
}, [this.$props.text])]), this.$props.removable && h("span", {
|
|
306
|
-
"class": 'k-
|
|
329
|
+
"class": classNames('k-chip-icon', 'k-icon', this.$props.removeIcon),
|
|
307
330
|
onClick: this.handleRemove,
|
|
308
331
|
on: this.v3 ? undefined : {
|
|
309
332
|
"click": this.handleRemove
|
|
310
333
|
}
|
|
311
|
-
}
|
|
312
|
-
"class": "k-icon " + this.$props.removeIcon
|
|
313
|
-
})])]);
|
|
334
|
+
})]);
|
|
314
335
|
}
|
|
315
336
|
};
|
|
316
|
-
var
|
|
317
|
-
export { Chip,
|
|
337
|
+
var Chip = ChipVue2;
|
|
338
|
+
export { Chip, ChipVue2 };
|
|
@@ -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;
|
|
@@ -50,6 +49,43 @@ export interface ChipListProps extends FormComponentProps {
|
|
|
50
49
|
* Triggered after value change.
|
|
51
50
|
*/
|
|
52
51
|
onChange?: (event: ChipListChangeEvent) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Configures the `size` of the Chip.
|
|
54
|
+
*
|
|
55
|
+
* The available options are:
|
|
56
|
+
* - small
|
|
57
|
+
* - medium
|
|
58
|
+
* - large
|
|
59
|
+
* - null—Does not set a size `class`.
|
|
60
|
+
*
|
|
61
|
+
* @default `medium`
|
|
62
|
+
*/
|
|
63
|
+
size?: null | 'small' | 'medium' | 'large' | string;
|
|
64
|
+
/**
|
|
65
|
+
* Configures the `roundness` of the Chip.
|
|
66
|
+
*
|
|
67
|
+
* The available options are:
|
|
68
|
+
* - small
|
|
69
|
+
* - medium
|
|
70
|
+
* - large
|
|
71
|
+
* - full
|
|
72
|
+
* - null—Does not set a rounded `class`.
|
|
73
|
+
*
|
|
74
|
+
* @default `medium`
|
|
75
|
+
*/
|
|
76
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
|
|
77
|
+
/**
|
|
78
|
+
* Configures the `fillMode` of the Chip.
|
|
79
|
+
*
|
|
80
|
+
* The available options are:
|
|
81
|
+
* - solid
|
|
82
|
+
* - outline
|
|
83
|
+
* - flat
|
|
84
|
+
* - null—Does not set a fillMode `class`.
|
|
85
|
+
*
|
|
86
|
+
* @default `solid`
|
|
87
|
+
*/
|
|
88
|
+
fillMode?: null | 'solid' | 'outline' | 'flat' | string;
|
|
53
89
|
/**
|
|
54
90
|
* Represents the selection state of Chip component.
|
|
55
91
|
*/
|
|
@@ -125,7 +161,7 @@ export interface ChipListComputed {
|
|
|
125
161
|
/**
|
|
126
162
|
* @hidden
|
|
127
163
|
*/
|
|
128
|
-
export interface ChipListAll extends ChipListMethods, ChipListState, ChipListData, ChipListComputed,
|
|
164
|
+
export interface ChipListAll extends ChipListMethods, ChipListState, ChipListData, ChipListComputed, Vue2type {
|
|
129
165
|
}
|
|
130
166
|
/**
|
|
131
167
|
* @hidden
|
|
@@ -133,6 +169,6 @@ export interface ChipListAll extends ChipListMethods, ChipListState, ChipListDat
|
|
|
133
169
|
/**
|
|
134
170
|
* Represents the default `ChipList` component.
|
|
135
171
|
*/
|
|
136
|
-
declare let
|
|
137
|
-
declare const
|
|
138
|
-
export { ChipList,
|
|
172
|
+
declare let ChipListVue2: ComponentOptions<Vue2type, DefaultData<ChipListData>, DefaultMethods<ChipListAll>, ChipListComputed, RecordPropsDefinition<ChipListProps>>;
|
|
173
|
+
declare const ChipList: DefineComponent<ChipListProps, any, ChipListData, ChipListComputed, ChipListMethods, {}, {}, {}, string, ChipListProps, ChipListProps, {}>;
|
|
174
|
+
export { ChipList, ChipListVue2 };
|