@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.
Files changed (78) hide show
  1. package/dist/cdn/js/kendo-vue-buttons.js +1 -1
  2. package/dist/es/Button.d.ts +75 -6
  3. package/dist/es/Button.js +64 -19
  4. package/dist/es/ButtonGroup.d.ts +5 -6
  5. package/dist/es/ButtonGroup.js +4 -4
  6. package/dist/es/ButtonInterface.d.ts +4 -1
  7. package/dist/es/ButtonWrap.d.ts +5 -6
  8. package/dist/es/ButtonWrap.js +3 -3
  9. package/dist/es/Chip/Chip.d.ts +56 -10
  10. package/dist/es/Chip/Chip.js +47 -26
  11. package/dist/es/Chip/ChipList.d.ts +42 -6
  12. package/dist/es/Chip/ChipList.js +39 -13
  13. package/dist/es/FloatingActionButton/FloatingActionButton.d.ts +5 -6
  14. package/dist/es/FloatingActionButton/FloatingActionButton.js +26 -11
  15. package/dist/es/FloatingActionButton/FloatingActionButtonItem.d.ts +5 -6
  16. package/dist/es/FloatingActionButton/FloatingActionButtonItem.js +3 -3
  17. package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +28 -2
  18. package/dist/es/FloatingActionButton/models/shape.d.ts +1 -1
  19. package/dist/es/ListButton/ButtonItem.d.ts +5 -6
  20. package/dist/es/ListButton/ButtonItem.js +25 -12
  21. package/dist/es/ListButton/DropDownButton.d.ts +5 -6
  22. package/dist/es/ListButton/DropDownButton.js +61 -19
  23. package/dist/es/ListButton/SplitButton.d.ts +5 -6
  24. package/dist/es/ListButton/SplitButton.js +67 -29
  25. package/dist/es/ListButton/models/ListButtonProps.d.ts +138 -0
  26. package/dist/es/additionalTypes.ts +7 -1
  27. package/dist/es/buttonLook.d.ts +0 -1
  28. package/dist/es/main.d.ts +13 -13
  29. package/dist/es/main.js +13 -13
  30. package/dist/es/package-metadata.js +1 -1
  31. package/dist/es/toolbar/Toolbar.d.ts +5 -6
  32. package/dist/es/toolbar/Toolbar.js +16 -9
  33. package/dist/es/toolbar/tools/ToolbarItem.d.ts +5 -6
  34. package/dist/es/toolbar/tools/ToolbarItem.js +3 -3
  35. package/dist/es/toolbar/tools/ToolbarSeparator.d.ts +4 -5
  36. package/dist/es/toolbar/tools/ToolbarSeparator.js +3 -3
  37. package/dist/es/toolbar/tools/ToolbarSpacer.d.ts +4 -5
  38. package/dist/es/toolbar/tools/ToolbarSpacer.js +3 -3
  39. package/dist/es/util.js +7 -7
  40. package/dist/npm/Button.d.ts +75 -6
  41. package/dist/npm/Button.js +65 -20
  42. package/dist/npm/ButtonGroup.d.ts +5 -6
  43. package/dist/npm/ButtonGroup.js +6 -6
  44. package/dist/npm/ButtonInterface.d.ts +4 -1
  45. package/dist/npm/ButtonWrap.d.ts +5 -6
  46. package/dist/npm/ButtonWrap.js +5 -5
  47. package/dist/npm/Chip/Chip.d.ts +56 -10
  48. package/dist/npm/Chip/Chip.js +48 -27
  49. package/dist/npm/Chip/ChipList.d.ts +42 -6
  50. package/dist/npm/Chip/ChipList.js +40 -14
  51. package/dist/npm/FloatingActionButton/FloatingActionButton.d.ts +5 -6
  52. package/dist/npm/FloatingActionButton/FloatingActionButton.js +27 -12
  53. package/dist/npm/FloatingActionButton/FloatingActionButtonItem.d.ts +5 -6
  54. package/dist/npm/FloatingActionButton/FloatingActionButtonItem.js +5 -5
  55. package/dist/npm/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +28 -2
  56. package/dist/npm/FloatingActionButton/models/shape.d.ts +1 -1
  57. package/dist/npm/ListButton/ButtonItem.d.ts +5 -6
  58. package/dist/npm/ListButton/ButtonItem.js +27 -14
  59. package/dist/npm/ListButton/DropDownButton.d.ts +5 -6
  60. package/dist/npm/ListButton/DropDownButton.js +62 -20
  61. package/dist/npm/ListButton/SplitButton.d.ts +5 -6
  62. package/dist/npm/ListButton/SplitButton.js +68 -31
  63. package/dist/npm/ListButton/models/ListButtonProps.d.ts +138 -0
  64. package/dist/npm/additionalTypes.ts +7 -1
  65. package/dist/npm/buttonLook.d.ts +0 -1
  66. package/dist/npm/main.d.ts +13 -13
  67. package/dist/npm/main.js +13 -12
  68. package/dist/npm/package-metadata.js +1 -1
  69. package/dist/npm/toolbar/Toolbar.d.ts +5 -6
  70. package/dist/npm/toolbar/Toolbar.js +18 -11
  71. package/dist/npm/toolbar/tools/ToolbarItem.d.ts +5 -6
  72. package/dist/npm/toolbar/tools/ToolbarItem.js +5 -5
  73. package/dist/npm/toolbar/tools/ToolbarSeparator.d.ts +4 -5
  74. package/dist/npm/toolbar/tools/ToolbarSeparator.js +5 -5
  75. package/dist/npm/toolbar/tools/ToolbarSpacer.d.ts +4 -5
  76. package/dist/npm/toolbar/tools/ToolbarSpacer.js +5 -5
  77. package/dist/npm/util.js +7 -7
  78. 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-state-selected',
10
+ 'state-selected': 'k-selected',
11
11
  'button-icon': 'k-button-icon',
12
12
  'button-icontext': 'k-button-icontext',
13
- 'state-disabled': 'k-state-disabled',
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 notDisabled = ':not(.k-state-disabled):not([disabled]):not([disabled="true"])';
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' + notDisabled,
27
- '.k-button-group > button' + notDisabled,
28
- '.k-dropdown > .k-dropdown-wrap' + notDisabled,
29
- '.k-colorpicker > .k-picker-wrap' + notDisabled
26
+ 'button' + notInternalButton,
27
+ '.k-button-group > button',
28
+ '.k-dropdownlist',
29
+ '.k-colorpicker'
30
30
  ];
31
31
  /**
32
32
  * @hidden
@@ -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&mdash;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&mdash;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&mdash;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&mdash;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&mdash;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 Vue, ButtonMethods, ButtonData, ButtonComputed, ButtonState {
117
+ export interface ButtonAll extends Vue2type, ButtonMethods, ButtonData, ButtonComputed, ButtonState {
49
118
  }
50
- declare let Button: ComponentOptions<ButtonAll, DefaultData<ButtonData>, DefaultMethods<ButtonAll>, ButtonComputed, RecordPropsDefinition<ButtonProps>>;
51
- declare const ButtonVue3: DefineComponent<ButtonProps, any, ButtonData, ButtonComputed, ButtonMethods, {}, {}, {}, string, ButtonProps, ButtonProps, {}>;
52
- export { Button, ButtonVue3 };
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 };
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ButtonVue3 = exports.Button = void 0; // @ts-ignore
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 Button = {
21
+ var ButtonVue2 = {
22
22
  name: 'KendoButton',
23
23
  // @ts-ignore
24
24
  emits: {
@@ -72,6 +72,36 @@ var Button = {
72
72
  disabled: {
73
73
  type: Boolean,
74
74
  default: undefined
75
+ },
76
+ size: {
77
+ type: String,
78
+ default: 'medium'
79
+ },
80
+ shape: {
81
+ type: String,
82
+ default: 'rectangle',
83
+ validator: function validator(value) {
84
+ return [null, 'rectangle', 'square'].includes(value);
85
+ }
86
+ },
87
+ rounded: {
88
+ type: String,
89
+ default: 'medium'
90
+ },
91
+ fillMode: {
92
+ type: String,
93
+ default: 'solid',
94
+ validator: function validator(value) {
95
+ return [null, 'flat', 'link', 'outline', 'solid'].includes(value);
96
+ }
97
+ },
98
+ // eslint-disable-next-line max-len
99
+ themeColor: {
100
+ type: String,
101
+ default: 'base',
102
+ validator: function validator(value) {
103
+ return [null, 'base', 'dark', 'error', 'info', 'inverse', 'inverse', 'light', 'primary', 'secondary', 'success', 'tertiary', 'warning'].includes(value);
104
+ }
75
105
  }
76
106
  },
77
107
  created: function created() {
@@ -87,6 +117,28 @@ var Button = {
87
117
  computed: {
88
118
  computedSelected: function computedSelected() {
89
119
  return this._activeTemp !== undefined ? this._activeTemp : this.$props.selected !== undefined ? this.$props.selected : this.currentActive;
120
+ },
121
+ buttonClasses: function buttonClasses() {
122
+ var _a;
123
+
124
+ var _b = this.$props,
125
+ look = _b.look,
126
+ primary = _b.primary,
127
+ disabled = _b.disabled,
128
+ icon = _b.icon,
129
+ iconClass = _b.iconClass,
130
+ imageUrl = _b.imageUrl,
131
+ dir = _b.dir,
132
+ size = _b.size,
133
+ shape = _b.shape,
134
+ rounded = _b.rounded,
135
+ fillMode = _b.fillMode,
136
+ themeColor = _b.themeColor;
137
+ var hasIcon = icon !== undefined || iconClass !== undefined || imageUrl !== undefined;
138
+ var defaultSlot = kendo_vue_common_1.getDefaultSlots(this);
139
+ var hasChildren = defaultSlot;
140
+ 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.currentActive, _a['k-rtl'] = dir === 'rtl', // Polyfills for deprecated properties,
141
+ _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;
90
142
  }
91
143
  },
92
144
  updated: function updated() {
@@ -158,21 +210,14 @@ var Button = {
158
210
  },
159
211
  // @ts-ignore
160
212
  render: function render(createElement) {
161
- var _a;
162
-
163
213
  var h = gh || createElement;
164
- var _b = this.$props,
165
- look = _b.look,
166
- primary = _b.primary,
167
- togglable = _b.togglable,
168
- icon = _b.icon,
169
- iconClass = _b.iconClass,
170
- imageUrl = _b.imageUrl,
171
- imageAlt = _b.imageAlt;
172
- var hasIcon = icon !== undefined || iconClass !== undefined || imageUrl !== undefined;
214
+ var _a = this.$props,
215
+ togglable = _a.togglable,
216
+ icon = _a.icon,
217
+ iconClass = _a.iconClass,
218
+ imageUrl = _a.imageUrl,
219
+ imageAlt = _a.imageAlt;
173
220
  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
221
 
177
222
  var iconElement = function iconElement() {
178
223
  if (imageUrl) {
@@ -188,7 +233,7 @@ var Button = {
188
233
  src: imageUrl
189
234
  });
190
235
  } else if (icon) {
191
- var iconClasses = kendo_vue_common_1.classNames('k-icon', 'k-i-' + icon);
236
+ var iconClasses = kendo_vue_common_1.classNames('k-icon', 'k-button-icon', 'k-i-' + icon);
192
237
  return h("span", {
193
238
  role: "presentation",
194
239
  attrs: this.v3 ? undefined : {
@@ -210,7 +255,7 @@ var Button = {
210
255
  };
211
256
 
212
257
  return h("button", {
213
- "class": buttonClasses,
258
+ "class": this.buttonClasses,
214
259
  onClick: this.handleClick,
215
260
  on: this.v3 ? undefined : {
216
261
  "click": this.handleClick,
@@ -241,6 +286,6 @@ var Button = {
241
286
  }, [iconElement.call(this), defaultSlot]);
242
287
  }
243
288
  };
244
- exports.Button = Button;
245
- var ButtonVue3 = Button;
246
- exports.ButtonVue3 = ButtonVue3;
289
+ exports.ButtonVue2 = ButtonVue2;
290
+ var Button = ButtonVue2;
291
+ 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 Vue, ButtonGroupMethods, ButtonGroupData, ButtonGroupState {
39
+ export interface ButtonGroupAll extends Vue2type, ButtonGroupMethods, ButtonGroupData, ButtonGroupState {
41
40
  }
42
- declare let ButtonGroup: ComponentOptions<ButtonGroupAll, DefaultData<ButtonGroupData>, DefaultMethods<ButtonGroupAll>, {}, RecordPropsDefinition<ButtonGroupProps>>;
43
- declare const ButtonGroupVue3: DefineComponent<ButtonGroupProps, any, ButtonGroupData, {}, ButtonGroupMethods, {}, {}, {}, string, ButtonGroupProps, ButtonGroupProps, {}>;
44
- export { ButtonGroup, ButtonGroupVue3 };
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 };
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ButtonGroupVue3 = exports.ButtonGroup = void 0; // @ts-ignore
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 ButtonGroup = {
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[styles['state-disabled']] = this.$props.disabled, _a[styles['button-group-stretched']] = !!this.$props.width, _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.ButtonGroup = ButtonGroup;
112
- var ButtonGroupVue3 = ButtonGroup;
113
- exports.ButtonGroupVue3 = ButtonGroupVue3;
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
- * Changes the visual appearance by using alternative styling options ([more information and examples]({% slug appearance_button %})).
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
  /**
@@ -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 Vue {
9
+ export interface ButtonAll extends Vue2type {
11
10
  }
12
- declare let ButtonWrap: ComponentOptions<ButtonAll, DefaultData<{}>, DefaultMethods<ButtonAll>, {}, RecordPropsDefinition<{}>>;
13
- declare const ButtonWrapVue3: DefineComponent<{}, any, {}, {}, {}, {}, {}, {}, string, {}, {}, {}>;
14
- export { ButtonWrap, ButtonWrapVue3 };
11
+ declare let ButtonWrapVue2: ComponentOptions<ButtonAll, DefaultData<{}>, DefaultMethods<ButtonAll>, {}, RecordPropsDefinition<{}>>;
12
+ declare const ButtonWrap: DefineComponent<{}, any, {}, {}, {}, {}, {}, {}, string, {}, {}, {}>;
13
+ export { ButtonWrap, ButtonWrapVue2 };
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ButtonWrapVue3 = exports.ButtonWrap = void 0; // @ts-ignore
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 ButtonWrap = {
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.ButtonWrap = ButtonWrap;
34
- var ButtonWrapVue3 = ButtonWrap;
35
- exports.ButtonWrapVue3 = ButtonWrapVue3;
33
+ exports.ButtonWrapVue2 = ButtonWrapVue2;
34
+ var ButtonWrap = ButtonWrapVue2;
35
+ exports.ButtonWrap = ButtonWrap;
@@ -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&mdash;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&mdash;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&mdash;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&mdash;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, Vue {
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 Chip: ComponentOptions<Vue, DefaultData<ChipData>, DefaultMethods<ChipAll>, ChipComputed, RecordPropsDefinition<ChipProps>>;
152
- declare const ChipVue3: DefineComponent<ChipProps, any, ChipData, ChipComputed, ChipMethods, {}, {}, {}, string, ChipProps, ChipProps, {}>;
153
- export { Chip, ChipVue3 };
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 };
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ChipVue3 = exports.Chip = void 0; // @ts-ignore
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 Chip = {
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-state-disabled': this.$props.disabled,
280
- 'k-state-selected': this.currentSelected,
281
- 'k-state-focus': this.computedFocused(),
282
- 'k-chip-success': this.$props.type === 'success',
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-selected-icon-wrapper'
305
- }, [h("span", {
306
- "class": "k-selected-icon k-icon " + this.$props.selectedIcon
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-remove-icon',
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
- }, [h("span", {
324
- "class": "k-icon " + this.$props.removeIcon
325
- })])]);
346
+ })]);
326
347
  }
327
348
  };
328
- exports.Chip = Chip;
329
- var ChipVue3 = Chip;
330
- exports.ChipVue3 = ChipVue3;
349
+ exports.ChipVue2 = ChipVue2;
350
+ var Chip = ChipVue2;
351
+ exports.Chip = Chip;