@progress/kendo-vue-buttons 3.7.4-dev.202212020747 → 3.7.4-dev.202301091431

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 (57) hide show
  1. package/README.md +1 -1
  2. package/dist/cdn/js/kendo-vue-buttons.js +1 -1
  3. package/dist/es/Button.js +14 -7
  4. package/dist/es/ButtonInterface.d.ts +9 -0
  5. package/dist/es/Chip/Chip.d.ts +4 -0
  6. package/dist/es/Chip/Chip.js +32 -13
  7. package/dist/es/FloatingActionButton/FloatingActionButton.js +10 -10
  8. package/dist/es/FloatingActionButton/FloatingActionButtonItem.d.ts +5 -0
  9. package/dist/es/FloatingActionButton/FloatingActionButtonItem.js +12 -6
  10. package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +5 -0
  11. package/dist/es/ListButton/ButtonItem.js +11 -4
  12. package/dist/es/package-metadata.js +1 -1
  13. package/dist/es/toolbar/Toolbar.d.ts +12 -0
  14. package/dist/es/toolbar/Toolbar.js +16 -2
  15. package/dist/es/toolbar/tools/ToolbarItem.d.ts +2 -8
  16. package/dist/es/toolbar/tools/ToolbarItem.js +5 -9
  17. package/dist/es/toolbar/tools/ToolbarSeparator.d.ts +2 -8
  18. package/dist/es/toolbar/tools/ToolbarSeparator.js +5 -15
  19. package/dist/es/toolbar/tools/ToolbarSpacer.d.ts +2 -8
  20. package/dist/es/toolbar/tools/ToolbarSpacer.js +2 -8
  21. package/dist/esm/Button.js +14 -7
  22. package/dist/esm/ButtonInterface.d.ts +9 -0
  23. package/dist/esm/Chip/Chip.d.ts +4 -0
  24. package/dist/esm/Chip/Chip.js +32 -13
  25. package/dist/esm/FloatingActionButton/FloatingActionButton.js +10 -10
  26. package/dist/esm/FloatingActionButton/FloatingActionButtonItem.d.ts +5 -0
  27. package/dist/esm/FloatingActionButton/FloatingActionButtonItem.js +12 -6
  28. package/dist/esm/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +5 -0
  29. package/dist/esm/ListButton/ButtonItem.js +11 -4
  30. package/dist/esm/package-metadata.js +1 -1
  31. package/dist/esm/toolbar/Toolbar.d.ts +12 -0
  32. package/dist/esm/toolbar/Toolbar.js +16 -2
  33. package/dist/esm/toolbar/tools/ToolbarItem.d.ts +2 -8
  34. package/dist/esm/toolbar/tools/ToolbarItem.js +5 -9
  35. package/dist/esm/toolbar/tools/ToolbarSeparator.d.ts +2 -8
  36. package/dist/esm/toolbar/tools/ToolbarSeparator.js +5 -15
  37. package/dist/esm/toolbar/tools/ToolbarSpacer.d.ts +2 -8
  38. package/dist/esm/toolbar/tools/ToolbarSpacer.js +2 -8
  39. package/dist/npm/Button.js +13 -6
  40. package/dist/npm/ButtonInterface.d.ts +9 -0
  41. package/dist/npm/Chip/Chip.d.ts +4 -0
  42. package/dist/npm/Chip/Chip.js +31 -12
  43. package/dist/npm/FloatingActionButton/FloatingActionButton.js +9 -9
  44. package/dist/npm/FloatingActionButton/FloatingActionButtonItem.d.ts +5 -0
  45. package/dist/npm/FloatingActionButton/FloatingActionButtonItem.js +11 -5
  46. package/dist/npm/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +5 -0
  47. package/dist/npm/ListButton/ButtonItem.js +10 -3
  48. package/dist/npm/package-metadata.js +1 -1
  49. package/dist/npm/toolbar/Toolbar.d.ts +12 -0
  50. package/dist/npm/toolbar/Toolbar.js +15 -1
  51. package/dist/npm/toolbar/tools/ToolbarItem.d.ts +2 -8
  52. package/dist/npm/toolbar/tools/ToolbarItem.js +5 -9
  53. package/dist/npm/toolbar/tools/ToolbarSeparator.d.ts +2 -8
  54. package/dist/npm/toolbar/tools/ToolbarSeparator.js +5 -15
  55. package/dist/npm/toolbar/tools/ToolbarSpacer.d.ts +2 -8
  56. package/dist/npm/toolbar/tools/ToolbarSpacer.js +2 -8
  57. package/package.json +8 -6
@@ -3,7 +3,7 @@ import * as Vue from 'vue';
3
3
  var allVue = Vue;
4
4
  var gh = allVue.h;
5
5
  var isV3 = allVue.version && allVue.version[0] === '3';
6
- import { classNames, getDefaultSlots, validatePackage, kendoThemeMaps } from '@progress/kendo-vue-common';
6
+ import { classNames, getDefaultSlots, validatePackage, kendoThemeMaps, Icon } from '@progress/kendo-vue-common';
7
7
  import { packageMetadata } from './package-metadata.js';
8
8
  import util from './util.js';
9
9
  var styles = util.styles;
@@ -26,6 +26,7 @@ var ButtonVue2 = {
26
26
  },
27
27
  props: {
28
28
  ariaLabel: String,
29
+ title: String,
29
30
  dir: String,
30
31
  selected: {
31
32
  type: Boolean,
@@ -41,6 +42,7 @@ var ButtonVue2 = {
41
42
  return undefined;
42
43
  }
43
44
  },
45
+ svgIcon: Object,
44
46
  iconClass: {
45
47
  type: String,
46
48
  default: function _default() {
@@ -194,6 +196,7 @@ var ButtonVue2 = {
194
196
  var _a = this.$props,
195
197
  togglable = _a.togglable,
196
198
  icon = _a.icon,
199
+ svgIcon = _a.svgIcon,
197
200
  iconClass = _a.iconClass,
198
201
  imageUrl = _a.imageUrl,
199
202
  imageAlt = _a.imageAlt;
@@ -211,13 +214,15 @@ var ButtonVue2 = {
211
214
  alt: imageAlt,
212
215
  src: imageUrl
213
216
  });
214
- } else if (icon) {
215
- var iconClasses = classNames('k-icon', 'k-button-icon', 'k-i-' + icon, iconClass);
216
- return h("span", {
217
- role: "presentation",
217
+ } else if (icon || svgIcon) {
218
+ var iconClasses = classNames('k-button-icon', iconClass);
219
+ return h(Icon, {
220
+ name: icon,
218
221
  attrs: this.v3 ? undefined : {
219
- role: "presentation"
222
+ name: icon,
223
+ icon: svgIcon
220
224
  },
225
+ icon: svgIcon,
221
226
  "class": iconClasses
222
227
  });
223
228
  } else if (iconClass) {
@@ -255,12 +260,14 @@ var ButtonVue2 = {
255
260
  onKeypress: this.handleKeypress,
256
261
  onKeydown: this.handleKeydown,
257
262
  onContextmenu: this.handleContextmenu,
258
- "aria-label": this.ariaLabel,
263
+ title: this.title,
259
264
  attrs: this.v3 ? undefined : {
265
+ title: this.title,
260
266
  "aria-label": this.ariaLabel,
261
267
  "aria-disabled": this.$props.disabled || undefined,
262
268
  "aria-pressed": togglable ? this.currentActive ? true : undefined : undefined
263
269
  },
270
+ "aria-label": this.ariaLabel,
264
271
  "aria-disabled": this.$props.disabled || undefined,
265
272
  "aria-pressed": togglable ? this.currentActive ? true : undefined : undefined
266
273
  }, [iconElement.call(this), defaultSlot && h("span", {
@@ -1,3 +1,4 @@
1
+ import { SVGIcon } from '@progress/kendo-vue-common';
1
2
  /**
2
3
  * Inherits the native HTML Button. Represents the properties which can be set to a Button.
3
4
  */
@@ -25,6 +26,10 @@ export interface ButtonInterface {
25
26
  * Sets the aria-label of the Button.
26
27
  */
27
28
  ariaLabel?: string;
29
+ /**
30
+ * Sets the aria-label of the Button.
31
+ */
32
+ title?: string;
28
33
  /**
29
34
  * Sets the direction of the Button.
30
35
  */
@@ -41,6 +46,10 @@ export interface ButtonInterface {
41
46
  * Defines the name for an existing icon in a Kendo UI for Vue theme ([see example]({% slug icons_button %})). The icon is rendered inside the Button by a `span.k-icon` element.
42
47
  */
43
48
  icon?: string;
49
+ /**
50
+ * Defines the svg icon in a Kendo UI for Vue theme.
51
+ */
52
+ svgIcon?: SVGIcon;
44
53
  /**
45
54
  * Defines a CSS class—or multiple classes separated by spaces—which are applied to a `span` element inside the Button ([see example]({% slug icons_button %})). Allows the usage of custom icons.
46
55
  */
@@ -56,6 +56,10 @@ export interface ChipProps {
56
56
  * Determines if the Chip style is `filled` or `outlined`.
57
57
  */
58
58
  look?: string;
59
+ /**
60
+ * Defines the avatar template that will be shown. Accepts a slot name, a `render` function, or a Vue component.
61
+ */
62
+ avatar?: string | Function | Object;
59
63
  /**
60
64
  * Configures the `size` of the Chip.
61
65
  *
@@ -4,7 +4,7 @@ var allVue = Vue;
4
4
  var gh = allVue.h;
5
5
  var isV3 = allVue.version && allVue.version[0] === '3';
6
6
  var ref = allVue.ref;
7
- import { classNames, getTabIndex, Keys, noop, validatePackage, kendoThemeMaps, setRef, getRef } from '@progress/kendo-vue-common';
7
+ import { classNames, getTabIndex, Keys, noop, validatePackage, kendoThemeMaps, setRef, getRef, templateRendering, getListeners, getTemplate, Icon } from '@progress/kendo-vue-common';
8
8
  import { FOCUS_ACTION } from './focus-reducer.js';
9
9
  import { DATA_ACTION } from './data-reducer.js';
10
10
  import { SELECTION_ACTION } from './selection-reducer.js';
@@ -17,6 +17,7 @@ var ChipVue2 = {
17
17
  props: {
18
18
  id: String,
19
19
  text: String,
20
+ avatar: [String, Function, Object],
20
21
  value: [String, Object],
21
22
  type: String,
22
23
  dir: {
@@ -32,7 +33,7 @@ var ChipVue2 = {
32
33
  removeIcon: {
33
34
  type: String,
34
35
  default: function _default() {
35
- return 'k-i-x-circle';
36
+ return 'x-circle';
36
37
  }
37
38
  },
38
39
  disabled: {
@@ -130,6 +131,12 @@ var ChipVue2 = {
130
131
  return this.$props.selected || (Array.isArray(this.kendoSelection.value) ? this.kendoSelection.value.some(function (i) {
131
132
  return i === _this.$props.value;
132
133
  }) : this.kendoSelection.value === this.$props.value);
134
+ },
135
+ chipLabelClass: function chipLabelClass() {
136
+ return {
137
+ 'k-chip-label': true,
138
+ 'k-text-ellipsis': true
139
+ };
133
140
  }
134
141
  },
135
142
  methods: {
@@ -254,7 +261,14 @@ var ChipVue2 = {
254
261
  themeColor = _b.themeColor,
255
262
  fillMode = _b.fillMode,
256
263
  look = _b.look,
257
- type = _b.type;
264
+ type = _b.type,
265
+ avatar = _b.avatar,
266
+ icon = _b.icon;
267
+ var avatarTemplate = templateRendering.call(this, avatar, getListeners.call(this));
268
+ var avatarRender = getTemplate.call(this, {
269
+ h: h,
270
+ template: avatarTemplate
271
+ });
258
272
  return h("div", {
259
273
  role: this.$props.role,
260
274
  attrs: this.v3 ? undefined : {
@@ -262,7 +276,8 @@ var ChipVue2 = {
262
276
  id: this.$props.value,
263
277
  dir: this.currentDir,
264
278
  tabindex: getTabIndex(this.$props.tabIndex, this.$props.disabled, undefined),
265
- "aria-checked": this.currentSelected,
279
+ "aria-pressed": this.$props.role === 'button' ? this.currentSelected : undefined,
280
+ "aria-selected": this.$props.role === 'option' ? this.currentSelected : undefined,
266
281
  "aria-disabled": this.$props.disabled,
267
282
  "aria-describedby": this.$props.ariaDescribedBy
268
283
  },
@@ -276,7 +291,8 @@ var ChipVue2 = {
276
291
  'k-selected': this.currentSelected,
277
292
  'k-focus': this.computedFocused()
278
293
  }, _a["k-chip-".concat(kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-rounded-".concat(kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a["k-chip-".concat(fillMode)] = fillMode, _a["k-chip-".concat(fillMode, "-").concat(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)),
279
- "aria-checked": this.currentSelected,
294
+ "aria-pressed": this.$props.role === 'button' ? this.currentSelected : undefined,
295
+ "aria-selected": this.$props.role === 'option' ? this.currentSelected : undefined,
280
296
  "aria-disabled": this.$props.disabled,
281
297
  "aria-describedby": this.$props.ariaDescribedBy,
282
298
  onFocus: this.handleFocus,
@@ -289,24 +305,27 @@ var ChipVue2 = {
289
305
  onBlur: this.handleBlur,
290
306
  onClick: this.handleClick,
291
307
  onKeydown: this.handleKeyDown
292
- }, [this.currentSelected && this.$props.selectedIcon && h("span", {
293
- "class": classNames('k-chip-icon', 'k-icon', this.$props.selectedIcon)
294
- }), this.$props.icon && h("span", {
295
- "class": classNames('k-chip-icon', 'k-icon', this.$props.icon)
296
- }), h("span", {
308
+ }, [this.currentSelected && this.$props.selectedIcon && h(Icon, {
309
+ "class": classNames('k-chip-icon', this.$props.selectedIcon)
310
+ }), icon && h(Icon, {
311
+ "class": classNames('k-chip-icon', icon)
312
+ }), avatar && avatarRender, h("span", {
297
313
  "class": 'k-chip-content'
298
314
  }, [this.$props.text && h("span", {
299
315
  "aria-label": this.$props.text,
300
316
  attrs: this.v3 ? undefined : {
301
317
  "aria-label": this.$props.text
302
318
  },
303
- "class": 'k-chip-label'
319
+ "class": this.chipLabelClass
304
320
  }, [this.$props.text])]), this.$props.removable && h("span", {
305
321
  "class": "k-chip-actions"
306
322
  }, [h("span", {
307
323
  "class": "k-chip-action k-chip-remove-action"
308
- }, [h("span", {
309
- "class": classNames('k-icon', this.$props.removeIcon),
324
+ }, [h(Icon, {
325
+ name: this.$props.removeIcon,
326
+ attrs: this.v3 ? undefined : {
327
+ name: this.$props.removeIcon
328
+ },
310
329
  onClick: this.handleRemove,
311
330
  on: this.v3 ? undefined : {
312
331
  "click": this.handleRemove
@@ -4,7 +4,7 @@ var allVue = Vue;
4
4
  var gh = allVue.h;
5
5
  var isV3 = allVue.version && allVue.version[0] === '3';
6
6
  var ref = allVue.ref;
7
- import { classNames, guid, Keys, getTabIndex, templateRendering, getListeners, validatePackage, canUseDOM, kendoThemeMaps, setRef, getRef } from '@progress/kendo-vue-common';
7
+ import { classNames, guid, Keys, getTabIndex, templateRendering, getListeners, validatePackage, canUseDOM, kendoThemeMaps, setRef, getRef, Icon } from '@progress/kendo-vue-common';
8
8
  import { FloatingActionButtonItem } from './FloatingActionButtonItem.js';
9
9
  import { packageMetadata } from '../package-metadata.js';
10
10
  import { position, getAnchorAlign, getPopupAlign, getTextDirectionClass } from './utils.js';
@@ -21,6 +21,7 @@ var FloatingActionButtonVue2 = {
21
21
  accessKey: String,
22
22
  disabled: Boolean,
23
23
  icon: String,
24
+ svgIcon: Object,
24
25
  iconClass: String,
25
26
  items: [Object, Array],
26
27
  item: [String, Function, Object],
@@ -292,6 +293,7 @@ var FloatingActionButtonVue2 = {
292
293
  align = _a.align,
293
294
  disabled = _a.disabled,
294
295
  icon = _a.icon,
296
+ svgIcon = _a.svgIcon,
295
297
  iconClass = _a.iconClass,
296
298
  id = _a.id,
297
299
  items = _a.items,
@@ -384,17 +386,15 @@ var FloatingActionButtonVue2 = {
384
386
  onFocusin: this.handleFocus,
385
387
  onBlur: this.handleBlur,
386
388
  onKeydown: this.handleKeyDown
387
- }, [icon ? h("span", {
388
- role: "presentation",
389
+ }, [icon || svgIcon ? h(Icon, {
390
+ name: icon,
389
391
  attrs: this.v3 ? undefined : {
390
- role: "presentation"
391
- },
392
- "class": classNames("k-fab-icon k-icon k-i-".concat(icon))
393
- }) : iconClass ? h("span", {
394
- role: "presentation",
395
- attrs: this.v3 ? undefined : {
396
- role: "presentation"
392
+ name: icon,
393
+ icon: svgIcon
397
394
  },
395
+ icon: svgIcon,
396
+ "class": 'k-fab-icon'
397
+ }) : iconClass ? h(Icon, {
398
398
  "class": iconClass
399
399
  }) : null, text && h("span", {
400
400
  "class": "k-fab-text"
@@ -3,6 +3,7 @@ declare type DefaultData<V> = object | ((this: V) => {});
3
3
  declare type DefaultMethods<V> = {
4
4
  [key: string]: (this: V, ...args: any[]) => any;
5
5
  };
6
+ import { SVGIcon } from '@progress/kendo-vue-common';
6
7
  /**
7
8
  * The FloatingActionButtonItemHandle ref.
8
9
  */
@@ -36,6 +37,10 @@ export interface FloatingActionButtonItemProps {
36
37
  * [see example]({% slug databinding_floatingactionbutton %}).
37
38
  */
38
39
  icon?: string;
40
+ /**
41
+ * Defines the svg icon in a Kendo UI for Vue theme.
42
+ */
43
+ svgIcon?: SVGIcon;
39
44
  /**
40
45
  * Specifies the text of the FloatingActionButtonItem
41
46
  * [see example]({% slug databinding_floatingactionbutton %}).
@@ -4,7 +4,7 @@ var allVue = Vue;
4
4
  var gh = allVue.h;
5
5
  var isV3 = allVue.version && allVue.version[0] === '3';
6
6
  var ref = allVue.ref;
7
- import { classNames, getRef, getTabIndex, getTemplate, setRef } from '@progress/kendo-vue-common';
7
+ import { classNames, getRef, getTabIndex, getTemplate, Icon, setRef } from '@progress/kendo-vue-common';
8
8
  /**
9
9
  * @hidden
10
10
  */
@@ -67,10 +67,10 @@ var FloatingActionButtonItemVue2 = {
67
67
  disabled = _a.disabled,
68
68
  id = _a.id,
69
69
  tabIndex = _a.tabIndex,
70
- dataItem = _a.dataItem,
71
- customProp = _a.customProp;
70
+ dataItem = _a.dataItem;
72
71
  var text = dataItem.text,
73
- icon = dataItem.icon;
72
+ icon = dataItem.icon,
73
+ svgIcon = dataItem.svgIcon;
74
74
  var item;
75
75
  var itemDefaultRendering = h("li", {
76
76
  ref: setRef(this, 'element'),
@@ -97,8 +97,14 @@ var FloatingActionButtonItemVue2 = {
97
97
  onPointerdown: this.onDown
98
98
  }, [text && h("span", {
99
99
  "class": "k-fab-item-text"
100
- }, [text]), icon && h("span", {
101
- "class": classNames("k-fab-item-icon k-icon k-i-".concat(icon))
100
+ }, [text]), icon && h(Icon, {
101
+ name: icon,
102
+ attrs: this.v3 ? undefined : {
103
+ name: icon,
104
+ icon: svgIcon
105
+ },
106
+ icon: svgIcon,
107
+ "class": "k-fab-item-icon"
102
108
  })]);
103
109
  item = getTemplate.call(this, {
104
110
  h: h,
@@ -5,6 +5,7 @@ import { FloatingActionButtonEvent, FloatingActionButtonItemEvent } from '../mod
5
5
  import { FloatingActionButtonPositionMode } from '../models/position-mode';
6
6
  import { FloatingActionButtonSize } from '../models/size';
7
7
  import { FloatingActionButtonThemeColor } from '../models/theme-color';
8
+ import { SVGIcon } from '@progress/kendo-vue-common';
8
9
  /**
9
10
  * @hidden
10
11
  */
@@ -41,6 +42,10 @@ export interface FloatingActionButtonProps extends Omit<any, 'onBlur' | 'onFocus
41
42
  * Button [see example]({% slug contenttypes_floatingactionbutton %}).
42
43
  */
43
44
  icon?: string;
45
+ /**
46
+ * Defines the svg icon in a Kendo UI for Vue theme.
47
+ */
48
+ svgIcon?: SVGIcon;
44
49
  /**
45
50
  * Defines a CSS class or multiple classes separated by spaces which are applied
46
51
  * to a `span` element inside the Floating Action Button. Allows the usage of custom icons.
@@ -3,7 +3,7 @@ import * as Vue from 'vue';
3
3
  var allVue = Vue;
4
4
  var gh = allVue.h;
5
5
  var isV3 = allVue.version && allVue.version[0] === '3';
6
- import { getTemplate } from '@progress/kendo-vue-common';
6
+ import { getTemplate, Icon } from '@progress/kendo-vue-common';
7
7
  /**
8
8
  * @hidden
9
9
  */
@@ -65,7 +65,6 @@ var ButtonItemVue2 = {
65
65
  textField = _a.textField,
66
66
  index = _a.index;
67
67
  var text = dataItem.text !== undefined ? dataItem.text : textField ? dataItem[textField] : dataItem;
68
- var iconClass = dataItem.icon ? "k-icon k-i-".concat(dataItem.icon) : dataItem.iconClass;
69
68
  var itemContent = h("span", {
70
69
  tabindex: -1,
71
70
  attrs: this.v3 ? undefined : {
@@ -73,8 +72,16 @@ var ButtonItemVue2 = {
73
72
  },
74
73
  "class": this.innerClass,
75
74
  key: "icon"
76
- }, [iconClass && h("span", {
77
- "class": iconClass,
75
+ }, [dataItem.icon || dataItem.svgIcon ? h(Icon, {
76
+ name: dataItem.icon,
77
+ attrs: this.v3 ? undefined : {
78
+ name: dataItem.icon,
79
+ icon: dataItem.svgIcon
80
+ },
81
+ icon: dataItem.svgIcon,
82
+ "class": dataItem.iconClass
83
+ }) : dataItem.iconClass && h("span", {
84
+ "class": dataItem.iconClass,
78
85
  role: "presentation",
79
86
  attrs: this.v3 ? undefined : {
80
87
  role: "presentation"
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-vue-buttons',
6
6
  productName: 'Kendo UI for Vue',
7
7
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1669966329,
8
+ publishDate: 1673273361,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
11
11
  };
@@ -61,6 +61,18 @@ export interface ToolbarProps {
61
61
  * ].
62
62
  */
63
63
  buttons?: string[];
64
+ /**
65
+ * Configures the `size` of the Toolbar.
66
+ *
67
+ * The available options are:
68
+ * - small
69
+ * - medium
70
+ * - large
71
+ * - null&mdash;Does not set a size `class`.
72
+ *
73
+ * @default `medium`
74
+ */
75
+ size?: null | 'small' | 'medium' | 'large' | string;
64
76
  }
65
77
  /**
66
78
  * @hidden
@@ -15,7 +15,7 @@ import * as Vue from 'vue';
15
15
  var allVue = Vue;
16
16
  var gh = allVue.h;
17
17
  var isV3 = allVue.version && allVue.version[0] === '3';
18
- import { Keys, validatePackage, getDefaultSlots } from '@progress/kendo-vue-common';
18
+ import { Keys, validatePackage, getDefaultSlots, kendoThemeMaps } from '@progress/kendo-vue-common';
19
19
  import { toolbarButtons, internalButtons } from './../util.js';
20
20
  import { packageMetadata } from '../package-metadata.js';
21
21
  /**
@@ -38,6 +38,13 @@ var ToolbarVue2 = {
38
38
  default: function _default() {
39
39
  return undefined;
40
40
  }
41
+ },
42
+ size: {
43
+ type: String,
44
+ default: 'medium',
45
+ validator: function validator(value) {
46
+ return [null, 'small', 'medium', 'large'].includes(value);
47
+ }
41
48
  }
42
49
  },
43
50
  created: function created() {
@@ -52,6 +59,13 @@ var ToolbarVue2 = {
52
59
  computed: {
53
60
  selectors: function selectors() {
54
61
  return this.$props.buttons || toolbarButtons;
62
+ },
63
+ wrapperClass: function wrapperClass() {
64
+ var _a;
65
+ var size = this.$props.size;
66
+ return _a = {
67
+ 'k-toolbar': true
68
+ }, _a["k-toolbar-".concat(kendoThemeMaps.sizeMap[size] || size)] = size, _a['k-toolbar-resizable'] = true, _a;
55
69
  }
56
70
  },
57
71
  mounted: function mounted() {
@@ -94,7 +108,7 @@ var ToolbarVue2 = {
94
108
  var h = gh || createElement;
95
109
  var defaultSlot = getDefaultSlots(this);
96
110
  return h("div", {
97
- "class": 'k-toolbar',
111
+ "class": this.wrapperClass,
98
112
  role: "toolbar",
99
113
  attrs: this.v3 ? undefined : {
100
114
  role: "toolbar",
@@ -41,21 +41,15 @@ declare let ToolbarItemVue2: ComponentOptions<ToolbarItemAll, DefaultData<Toolba
41
41
  * ```jsx
42
42
  * <template>
43
43
  * <Toolbar>
44
- * <ToolbarItem>
45
44
  * <ButtonGroup>
46
45
  * <Button :icon="'bold'" :title="'Bold'" :togglable="true" />
47
46
  * <Button :icon="'italic'" :title="'Italic'" :togglable="true" />
48
47
  * <Button :icon="'underline'" :title="'Underline'" :togglable="true" />
49
48
  * </ButtonGroup>
50
- * </ToolbarItem>
51
- * <ToolbarSpacer />
52
- * <ToolbarItem>
49
+ * <ToolbarSpacer />
53
50
  * <SplitButton :text="'Insert'" :items="splitItems"> </SplitButton>
54
- * </ToolbarItem>
55
- * <ToolbarSeparator />
56
- * <ToolbarItem>
51
+ * <ToolbarSeparator />
57
52
  * <Button :icon="'cut'" :title="'Cut'"> Cut </Button>
58
- * </ToolbarItem>
59
53
  * </Toolbar>
60
54
  * </template>
61
55
  * ```
@@ -24,7 +24,9 @@ var ToolbarItemVue2 = {
24
24
  render: function render(createElement) {
25
25
  var h = gh || createElement;
26
26
  var defaultSlot = getDefaultSlots(this);
27
- return h("span", [defaultSlot]);
27
+ return h("div", {
28
+ "class": 'k-toolbar-item'
29
+ }, [defaultSlot]);
28
30
  }
29
31
  };
30
32
  /**
@@ -33,21 +35,15 @@ var ToolbarItemVue2 = {
33
35
  * ```jsx
34
36
  * <template>
35
37
  * <Toolbar>
36
- * <ToolbarItem>
37
38
  * <ButtonGroup>
38
39
  * <Button :icon="'bold'" :title="'Bold'" :togglable="true" />
39
40
  * <Button :icon="'italic'" :title="'Italic'" :togglable="true" />
40
41
  * <Button :icon="'underline'" :title="'Underline'" :togglable="true" />
41
42
  * </ButtonGroup>
42
- * </ToolbarItem>
43
- * <ToolbarSpacer />
44
- * <ToolbarItem>
43
+ * <ToolbarSpacer />
45
44
  * <SplitButton :text="'Insert'" :items="splitItems"> </SplitButton>
46
- * </ToolbarItem>
47
- * <ToolbarSeparator />
48
- * <ToolbarItem>
45
+ * <ToolbarSeparator />
49
46
  * <Button :icon="'cut'" :title="'Cut'"> Cut </Button>
50
- * </ToolbarItem>
51
47
  * </Toolbar>
52
48
  * </template>
53
49
  * ```
@@ -13,21 +13,15 @@ declare let ToolbarSeparatorVue2: ComponentOptions<Vue2type, DefaultData<{}>, De
13
13
  * ```jsx
14
14
  * <template>
15
15
  * <Toolbar>
16
- * <ToolbarItem>
17
16
  * <ButtonGroup>
18
17
  * <Button :icon="'bold'" :title="'Bold'" :togglable="true" />
19
18
  * <Button :icon="'italic'" :title="'Italic'" :togglable="true" />
20
19
  * <Button :icon="'underline'" :title="'Underline'" :togglable="true" />
21
20
  * </ButtonGroup>
22
- * </ToolbarItem>
23
- * <ToolbarSpacer />
24
- * <ToolbarItem>
21
+ * <ToolbarSpacer />
25
22
  * <SplitButton :text="'Insert'" :items="splitItems"> </SplitButton>
26
- * </ToolbarItem>
27
- * <ToolbarSeparator />
28
- * <ToolbarItem>
23
+ * <ToolbarSeparator />
29
24
  * <Button :icon="'cut'" :title="'Cut'"> Cut </Button>
30
- * </ToolbarItem>
31
25
  * </Toolbar>
32
26
  * </template>
33
27
  * ```
@@ -3,7 +3,6 @@ import * as Vue from 'vue';
3
3
  var allVue = Vue;
4
4
  var gh = allVue.h;
5
5
  var isV3 = allVue.version && allVue.version[0] === '3';
6
- import { ToolbarItem } from './ToolbarItem.js';
7
6
  /**
8
7
  * @hidden
9
8
  */
@@ -18,12 +17,9 @@ var ToolbarSeparatorVue2 = {
18
17
  },
19
18
  render: function render(createElement) {
20
19
  var h = gh || createElement;
21
- return (
22
- // @ts-ignore
23
- h(ToolbarItem, {
24
- "class": "k-separator"
25
- })
26
- );
20
+ return h("div", {
21
+ "class": "k-separator"
22
+ });
27
23
  }
28
24
  };
29
25
  /**
@@ -32,21 +28,15 @@ var ToolbarSeparatorVue2 = {
32
28
  * ```jsx
33
29
  * <template>
34
30
  * <Toolbar>
35
- * <ToolbarItem>
36
31
  * <ButtonGroup>
37
32
  * <Button :icon="'bold'" :title="'Bold'" :togglable="true" />
38
33
  * <Button :icon="'italic'" :title="'Italic'" :togglable="true" />
39
34
  * <Button :icon="'underline'" :title="'Underline'" :togglable="true" />
40
35
  * </ButtonGroup>
41
- * </ToolbarItem>
42
- * <ToolbarSpacer />
43
- * <ToolbarItem>
36
+ * <ToolbarSpacer />
44
37
  * <SplitButton :text="'Insert'" :items="splitItems"> </SplitButton>
45
- * </ToolbarItem>
46
- * <ToolbarSeparator />
47
- * <ToolbarItem>
38
+ * <ToolbarSeparator />
48
39
  * <Button :icon="'cut'" :title="'Cut'"> Cut </Button>
49
- * </ToolbarItem>
50
40
  * </Toolbar>
51
41
  * </template>
52
42
  * ```
@@ -13,21 +13,15 @@ declare let ToolbarSpacerVue2: ComponentOptions<Vue2type, DefaultData<{}>, Defau
13
13
  * ```jsx
14
14
  * <template>
15
15
  * <Toolbar>
16
- * <ToolbarItem>
17
16
  * <ButtonGroup>
18
17
  * <Button :icon="'bold'" :title="'Bold'" :togglable="true" />
19
18
  * <Button :icon="'italic'" :title="'Italic'" :togglable="true" />
20
19
  * <Button :icon="'underline'" :title="'Underline'" :togglable="true" />
21
20
  * </ButtonGroup>
22
- * </ToolbarItem>
23
- * <ToolbarSpacer />
24
- * <ToolbarItem>
21
+ * <ToolbarSpacer />
25
22
  * <SplitButton :text="'Insert'" :items="splitItems"> </SplitButton>
26
- * </ToolbarItem>
27
- * <ToolbarSeparator />
28
- * <ToolbarItem>
23
+ * <ToolbarSeparator />
29
24
  * <Button :icon="'cut'" :title="'Cut'"> Cut </Button>
30
- * </ToolbarItem>
31
25
  * </Toolbar>
32
26
  * </template>
33
27
  * ```
@@ -28,21 +28,15 @@ var ToolbarSpacerVue2 = {
28
28
  * ```jsx
29
29
  * <template>
30
30
  * <Toolbar>
31
- * <ToolbarItem>
32
31
  * <ButtonGroup>
33
32
  * <Button :icon="'bold'" :title="'Bold'" :togglable="true" />
34
33
  * <Button :icon="'italic'" :title="'Italic'" :togglable="true" />
35
34
  * <Button :icon="'underline'" :title="'Underline'" :togglable="true" />
36
35
  * </ButtonGroup>
37
- * </ToolbarItem>
38
- * <ToolbarSpacer />
39
- * <ToolbarItem>
36
+ * <ToolbarSpacer />
40
37
  * <SplitButton :text="'Insert'" :items="splitItems"> </SplitButton>
41
- * </ToolbarItem>
42
- * <ToolbarSeparator />
43
- * <ToolbarItem>
38
+ * <ToolbarSeparator />
44
39
  * <Button :icon="'cut'" :title="'Cut'"> Cut </Button>
45
- * </ToolbarItem>
46
40
  * </Toolbar>
47
41
  * </template>
48
42
  * ```