@progress/kendo-vue-buttons 3.10.2 → 3.11.0-dev.202305230751

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.
@@ -47,7 +47,7 @@ export interface ButtonInterface {
47
47
  */
48
48
  icon?: string;
49
49
  /**
50
- * Defines the svg icon in a Kendo UI for Vue theme.
50
+ * Defines an SVGIcon to be rendered within the button.
51
51
  */
52
52
  svgIcon?: SVGIcon;
53
53
  /**
@@ -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
  import { ChipRemoveEvent, ChipMouseEvent, ChipFocusEvent, ChipKeyboardEvent } from '../models/events';
7
8
  /**
8
9
  * Represents the properties of [Chip]({% slug api_buttons_chip %}) component.
@@ -36,6 +37,10 @@ export interface ChipProps {
36
37
  * Determines if the Chip has custom `removeIcon`.
37
38
  */
38
39
  removeIcon?: string;
40
+ /**
41
+ * Defines an remove SVGIcon to be rendered within the chip.
42
+ */
43
+ removeSvgIcon?: SVGIcon;
39
44
  /**
40
45
  * Determines if the Chip is disabled.
41
46
  */
@@ -44,10 +49,18 @@ export interface ChipProps {
44
49
  * Determines if the Chip has an `icon`.
45
50
  */
46
51
  icon?: string;
52
+ /**
53
+ * Defines an SVGIcon to be rendered within the chip.
54
+ */
55
+ svgIcon?: SVGIcon;
47
56
  /**
48
57
  * Determines if the Chip has custom selection `icon`.
49
58
  */
50
59
  selectedIcon?: string;
60
+ /**
61
+ * Defines an selection SVGIcon to be rendered within the chip.
62
+ */
63
+ selectedSvgIcon?: SVGIcon;
51
64
  /**
52
65
  * Determines if the Chip style is `filled` or `outlined`.
53
66
  */
@@ -4,7 +4,8 @@ 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, templateRendering, getListeners, getTemplate, Icon } from '@progress/kendo-vue-common';
7
+ import { classNames, getTabIndex, Keys, noop, validatePackage, kendoThemeMaps, setRef, getRef, templateRendering, getListeners, getTemplate, Icon, getIconName } from '@progress/kendo-vue-common';
8
+ import { checkIcon, xCircleIcon } from '@progress/kendo-svg-icons';
8
9
  import { FOCUS_ACTION } from './focus-reducer';
9
10
  import { DATA_ACTION } from './data-reducer';
10
11
  import { SELECTION_ACTION } from './selection-reducer';
@@ -35,17 +36,30 @@ var ChipVue2 = {
35
36
  return 'x-circle';
36
37
  }
37
38
  },
39
+ removeSvgIcon: {
40
+ type: Object,
41
+ default: function _default() {
42
+ return xCircleIcon;
43
+ }
44
+ },
38
45
  disabled: {
39
46
  type: Boolean,
40
47
  default: false
41
48
  },
42
49
  icon: String,
50
+ svgIcon: Object,
43
51
  selectedIcon: {
44
52
  type: String,
45
53
  default: function _default() {
46
54
  return 'check';
47
55
  }
48
56
  },
57
+ selectedSvgIcon: {
58
+ type: Object,
59
+ default: function _default() {
60
+ return checkIcon;
61
+ }
62
+ },
49
63
  look: {
50
64
  type: String,
51
65
  default: function _default() {
@@ -143,9 +157,6 @@ var ChipVue2 = {
143
157
  }
144
158
  },
145
159
  methods: {
146
- getIconName: function getIconName(currentIconName) {
147
- return currentIconName && currentIconName.indexOf('k-i-') !== -1 ? currentIconName.split('k-i-')[1] : currentIconName;
148
- },
149
160
  computedFocused: function computedFocused() {
150
161
  return this.kendoFocused.value === this.$props.value;
151
162
  },
@@ -268,7 +279,12 @@ var ChipVue2 = {
268
279
  fillMode = _b.fillMode,
269
280
  look = _b.look,
270
281
  avatar = _b.avatar,
271
- icon = _b.icon;
282
+ icon = _b.icon,
283
+ svgIcon = _b.svgIcon,
284
+ selectedIcon = _b.selectedIcon,
285
+ selectedSvgIcon = _b.selectedSvgIcon,
286
+ removeIcon = _b.removeIcon,
287
+ removeSvgIcon = _b.removeSvgIcon;
272
288
  var avatarTemplate = templateRendering.call(this, avatar, getListeners.call(this));
273
289
  var avatarRender = getTemplate.call(this, {
274
290
  h: h,
@@ -310,16 +326,24 @@ var ChipVue2 = {
310
326
  onBlur: this.handleBlur,
311
327
  onClick: this.handleClick,
312
328
  onKeydown: this.handleKeyDown
313
- }, [this.currentSelected && this.$props.selectedIcon && h(Icon, {
314
- name: this.getIconName(this.$props.selectedIcon),
329
+ }, [this.currentSelected && (selectedIcon || selectedSvgIcon) && h(Icon, {
330
+ name: getIconName(selectedIcon),
315
331
  attrs: this.v3 ? undefined : {
316
- name: this.getIconName(this.$props.selectedIcon)
317
- }
318
- }), icon && h(Icon, {
319
- name: this.getIconName(icon),
332
+ name: getIconName(selectedIcon),
333
+ icon: selectedSvgIcon,
334
+ size: 'small'
335
+ },
336
+ icon: selectedSvgIcon,
337
+ size: 'small'
338
+ }), (icon || svgIcon) && h(Icon, {
339
+ name: getIconName(icon),
320
340
  attrs: this.v3 ? undefined : {
321
- name: this.getIconName(icon)
322
- }
341
+ name: getIconName(icon),
342
+ icon: svgIcon,
343
+ size: 'small'
344
+ },
345
+ icon: svgIcon,
346
+ size: 'small'
323
347
  }), avatar && avatarRender, h("span", {
324
348
  "class": 'k-chip-content'
325
349
  }, [this.$props.text && h("span", {
@@ -333,10 +357,14 @@ var ChipVue2 = {
333
357
  }, [h("span", {
334
358
  "class": "k-chip-action k-chip-remove-action"
335
359
  }, [h(Icon, {
336
- name: this.getIconName(this.$props.removeIcon),
360
+ name: getIconName(removeIcon),
337
361
  attrs: this.v3 ? undefined : {
338
- name: this.getIconName(this.$props.removeIcon)
362
+ name: getIconName(removeIcon),
363
+ icon: removeSvgIcon,
364
+ size: 'small'
339
365
  },
366
+ icon: removeSvgIcon,
367
+ size: 'small',
340
368
  onClick: this.handleRemove,
341
369
  on: this.v3 ? undefined : {
342
370
  "click": this.handleRemove
@@ -52,6 +52,7 @@ var DropDownButtonVue2 = {
52
52
  tabIndex: Number,
53
53
  disabled: Boolean,
54
54
  icon: String,
55
+ svgIcon: Object,
55
56
  iconClass: String,
56
57
  imageUrl: String,
57
58
  popupSettings: Object,
@@ -274,6 +275,7 @@ var DropDownButtonVue2 = {
274
275
  tabIndex: tabIndex,
275
276
  accessKey: this.$props.accessKey,
276
277
  icon: this.$props.icon,
278
+ svgIcon: this.$props.svgIcon,
277
279
  iconClass: this.$props.iconClass,
278
280
  imageUrl: this.$props.imageUrl,
279
281
  look: this.$props.look,
@@ -301,6 +303,7 @@ var DropDownButtonVue2 = {
301
303
  tabIndex: tabIndex,
302
304
  accessKey: this.$props.accessKey,
303
305
  icon: this.$props.icon,
306
+ svgIcon: this.$props.svgIcon,
304
307
  iconClass: this.$props.iconClass,
305
308
  "class": this.$props.buttonClass,
306
309
  imageUrl: this.$props.imageUrl,
@@ -52,6 +52,7 @@ var SplitButtonVue2 = {
52
52
  tabIndex: Number,
53
53
  disabled: Boolean,
54
54
  icon: String,
55
+ svgIcon: Object,
55
56
  size: {
56
57
  type: String,
57
58
  default: 'medium'
@@ -269,6 +270,7 @@ var SplitButtonVue2 = {
269
270
  tabIndex: tabIndex,
270
271
  accessKey: this.$props.accessKey,
271
272
  icon: this.$props.icon,
273
+ svgIcon: this.$props.svgIcon,
272
274
  iconClass: this.$props.iconClass,
273
275
  imageUrl: this.$props.imageUrl,
274
276
  look: this.$props.look,
@@ -298,6 +300,7 @@ var SplitButtonVue2 = {
298
300
  accessKey: this.$props.accessKey,
299
301
  "class": this.$props.buttonClass,
300
302
  icon: this.$props.icon,
303
+ svgIcon: this.$props.svgIcon,
301
304
  iconClass: this.$props.iconClass,
302
305
  imageUrl: this.$props.imageUrl,
303
306
  look: this.$props.look,
@@ -1,6 +1,7 @@
1
1
  import { ButtonsPopupSettings } from './PopupSettings';
2
2
  import { SplitButtonClickEvent, SplitButtonItemClickEvent, SplitButtonFocusEvent, SplitButtonBlurEvent, SplitButtonOpenEvent, SplitButtonCloseEvent, DropDownButtonItemClickEvent, DropDownButtonFocusEvent, DropDownButtonBlurEvent, DropDownButtonOpenEvent, DropDownButtonCloseEvent } from './events';
3
3
  import { ButtonLook } from '../../buttonLook';
4
+ import { SVGIcon } from '@progress/kendo-vue-common';
4
5
  export interface DropDownButtonProps {
5
6
  /**
6
7
  * Specifies the `accessKey` of the main button.
@@ -38,6 +39,10 @@ export interface DropDownButtonProps {
38
39
  * Defines an icon that will be rendered next to the main button text ([see example]({% slug icons_dropdownbutton %})).
39
40
  */
40
41
  icon?: string;
42
+ /**
43
+ * Defines an SVGIcon to be rendered within the DropDownButton.
44
+ */
45
+ svgIcon?: SVGIcon;
41
46
  /**
42
47
  * Defines an icon with a custom CSS class that will be rendered next to the main button text ([see example]({% slug icons_dropdownbutton %})).
43
48
  */
@@ -199,6 +204,10 @@ export interface SplitButtonProps {
199
204
  * Defines an icon that will be rendered next to the main button text ([see example]({% slug icons_splitbutton %})).
200
205
  */
201
206
  icon?: string;
207
+ /**
208
+ * Defines an SVGIcon to be rendered within the SplitButton.
209
+ */
210
+ svgIcon?: SVGIcon;
202
211
  /**
203
212
  * Defines an icon with a custom CSS class that will be rendered next to the main button text ([see example]({% slug icons_splitbutton %})).
204
213
  */
@@ -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: 1684762545,
8
+ publishDate: 1684827554,
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
  };
@@ -47,7 +47,7 @@ export interface ButtonInterface {
47
47
  */
48
48
  icon?: string;
49
49
  /**
50
- * Defines the svg icon in a Kendo UI for Vue theme.
50
+ * Defines an SVGIcon to be rendered within the button.
51
51
  */
52
52
  svgIcon?: SVGIcon;
53
53
  /**
@@ -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
  import { ChipRemoveEvent, ChipMouseEvent, ChipFocusEvent, ChipKeyboardEvent } from '../models/events';
7
8
  /**
8
9
  * Represents the properties of [Chip]({% slug api_buttons_chip %}) component.
@@ -36,6 +37,10 @@ export interface ChipProps {
36
37
  * Determines if the Chip has custom `removeIcon`.
37
38
  */
38
39
  removeIcon?: string;
40
+ /**
41
+ * Defines an remove SVGIcon to be rendered within the chip.
42
+ */
43
+ removeSvgIcon?: SVGIcon;
39
44
  /**
40
45
  * Determines if the Chip is disabled.
41
46
  */
@@ -44,10 +49,18 @@ export interface ChipProps {
44
49
  * Determines if the Chip has an `icon`.
45
50
  */
46
51
  icon?: string;
52
+ /**
53
+ * Defines an SVGIcon to be rendered within the chip.
54
+ */
55
+ svgIcon?: SVGIcon;
47
56
  /**
48
57
  * Determines if the Chip has custom selection `icon`.
49
58
  */
50
59
  selectedIcon?: string;
60
+ /**
61
+ * Defines an selection SVGIcon to be rendered within the chip.
62
+ */
63
+ selectedSvgIcon?: SVGIcon;
51
64
  /**
52
65
  * Determines if the Chip style is `filled` or `outlined`.
53
66
  */
@@ -4,7 +4,8 @@ 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, templateRendering, getListeners, getTemplate, Icon } from '@progress/kendo-vue-common';
7
+ import { classNames, getTabIndex, Keys, noop, validatePackage, kendoThemeMaps, setRef, getRef, templateRendering, getListeners, getTemplate, Icon, getIconName } from '@progress/kendo-vue-common';
8
+ import { checkIcon, xCircleIcon } from '@progress/kendo-svg-icons';
8
9
  import { FOCUS_ACTION } from './focus-reducer.js';
9
10
  import { DATA_ACTION } from './data-reducer.js';
10
11
  import { SELECTION_ACTION } from './selection-reducer.js';
@@ -35,17 +36,30 @@ var ChipVue2 = {
35
36
  return 'x-circle';
36
37
  }
37
38
  },
39
+ removeSvgIcon: {
40
+ type: Object,
41
+ default: function _default() {
42
+ return xCircleIcon;
43
+ }
44
+ },
38
45
  disabled: {
39
46
  type: Boolean,
40
47
  default: false
41
48
  },
42
49
  icon: String,
50
+ svgIcon: Object,
43
51
  selectedIcon: {
44
52
  type: String,
45
53
  default: function _default() {
46
54
  return 'check';
47
55
  }
48
56
  },
57
+ selectedSvgIcon: {
58
+ type: Object,
59
+ default: function _default() {
60
+ return checkIcon;
61
+ }
62
+ },
49
63
  look: {
50
64
  type: String,
51
65
  default: function _default() {
@@ -143,9 +157,6 @@ var ChipVue2 = {
143
157
  }
144
158
  },
145
159
  methods: {
146
- getIconName: function getIconName(currentIconName) {
147
- return currentIconName && currentIconName.indexOf('k-i-') !== -1 ? currentIconName.split('k-i-')[1] : currentIconName;
148
- },
149
160
  computedFocused: function computedFocused() {
150
161
  return this.kendoFocused.value === this.$props.value;
151
162
  },
@@ -268,7 +279,12 @@ var ChipVue2 = {
268
279
  fillMode = _b.fillMode,
269
280
  look = _b.look,
270
281
  avatar = _b.avatar,
271
- icon = _b.icon;
282
+ icon = _b.icon,
283
+ svgIcon = _b.svgIcon,
284
+ selectedIcon = _b.selectedIcon,
285
+ selectedSvgIcon = _b.selectedSvgIcon,
286
+ removeIcon = _b.removeIcon,
287
+ removeSvgIcon = _b.removeSvgIcon;
272
288
  var avatarTemplate = templateRendering.call(this, avatar, getListeners.call(this));
273
289
  var avatarRender = getTemplate.call(this, {
274
290
  h: h,
@@ -310,16 +326,24 @@ var ChipVue2 = {
310
326
  onBlur: this.handleBlur,
311
327
  onClick: this.handleClick,
312
328
  onKeydown: this.handleKeyDown
313
- }, [this.currentSelected && this.$props.selectedIcon && h(Icon, {
314
- name: this.getIconName(this.$props.selectedIcon),
329
+ }, [this.currentSelected && (selectedIcon || selectedSvgIcon) && h(Icon, {
330
+ name: getIconName(selectedIcon),
315
331
  attrs: this.v3 ? undefined : {
316
- name: this.getIconName(this.$props.selectedIcon)
317
- }
318
- }), icon && h(Icon, {
319
- name: this.getIconName(icon),
332
+ name: getIconName(selectedIcon),
333
+ icon: selectedSvgIcon,
334
+ size: 'small'
335
+ },
336
+ icon: selectedSvgIcon,
337
+ size: 'small'
338
+ }), (icon || svgIcon) && h(Icon, {
339
+ name: getIconName(icon),
320
340
  attrs: this.v3 ? undefined : {
321
- name: this.getIconName(icon)
322
- }
341
+ name: getIconName(icon),
342
+ icon: svgIcon,
343
+ size: 'small'
344
+ },
345
+ icon: svgIcon,
346
+ size: 'small'
323
347
  }), avatar && avatarRender, h("span", {
324
348
  "class": 'k-chip-content'
325
349
  }, [this.$props.text && h("span", {
@@ -333,10 +357,14 @@ var ChipVue2 = {
333
357
  }, [h("span", {
334
358
  "class": "k-chip-action k-chip-remove-action"
335
359
  }, [h(Icon, {
336
- name: this.getIconName(this.$props.removeIcon),
360
+ name: getIconName(removeIcon),
337
361
  attrs: this.v3 ? undefined : {
338
- name: this.getIconName(this.$props.removeIcon)
362
+ name: getIconName(removeIcon),
363
+ icon: removeSvgIcon,
364
+ size: 'small'
339
365
  },
366
+ icon: removeSvgIcon,
367
+ size: 'small',
340
368
  onClick: this.handleRemove,
341
369
  on: this.v3 ? undefined : {
342
370
  "click": this.handleRemove
@@ -52,6 +52,7 @@ var DropDownButtonVue2 = {
52
52
  tabIndex: Number,
53
53
  disabled: Boolean,
54
54
  icon: String,
55
+ svgIcon: Object,
55
56
  iconClass: String,
56
57
  imageUrl: String,
57
58
  popupSettings: Object,
@@ -274,6 +275,7 @@ var DropDownButtonVue2 = {
274
275
  tabIndex: tabIndex,
275
276
  accessKey: this.$props.accessKey,
276
277
  icon: this.$props.icon,
278
+ svgIcon: this.$props.svgIcon,
277
279
  iconClass: this.$props.iconClass,
278
280
  imageUrl: this.$props.imageUrl,
279
281
  look: this.$props.look,
@@ -301,6 +303,7 @@ var DropDownButtonVue2 = {
301
303
  tabIndex: tabIndex,
302
304
  accessKey: this.$props.accessKey,
303
305
  icon: this.$props.icon,
306
+ svgIcon: this.$props.svgIcon,
304
307
  iconClass: this.$props.iconClass,
305
308
  "class": this.$props.buttonClass,
306
309
  imageUrl: this.$props.imageUrl,
@@ -52,6 +52,7 @@ var SplitButtonVue2 = {
52
52
  tabIndex: Number,
53
53
  disabled: Boolean,
54
54
  icon: String,
55
+ svgIcon: Object,
55
56
  size: {
56
57
  type: String,
57
58
  default: 'medium'
@@ -269,6 +270,7 @@ var SplitButtonVue2 = {
269
270
  tabIndex: tabIndex,
270
271
  accessKey: this.$props.accessKey,
271
272
  icon: this.$props.icon,
273
+ svgIcon: this.$props.svgIcon,
272
274
  iconClass: this.$props.iconClass,
273
275
  imageUrl: this.$props.imageUrl,
274
276
  look: this.$props.look,
@@ -298,6 +300,7 @@ var SplitButtonVue2 = {
298
300
  accessKey: this.$props.accessKey,
299
301
  "class": this.$props.buttonClass,
300
302
  icon: this.$props.icon,
303
+ svgIcon: this.$props.svgIcon,
301
304
  iconClass: this.$props.iconClass,
302
305
  imageUrl: this.$props.imageUrl,
303
306
  look: this.$props.look,
@@ -1,6 +1,7 @@
1
1
  import { ButtonsPopupSettings } from './PopupSettings';
2
2
  import { SplitButtonClickEvent, SplitButtonItemClickEvent, SplitButtonFocusEvent, SplitButtonBlurEvent, SplitButtonOpenEvent, SplitButtonCloseEvent, DropDownButtonItemClickEvent, DropDownButtonFocusEvent, DropDownButtonBlurEvent, DropDownButtonOpenEvent, DropDownButtonCloseEvent } from './events';
3
3
  import { ButtonLook } from '../../buttonLook';
4
+ import { SVGIcon } from '@progress/kendo-vue-common';
4
5
  export interface DropDownButtonProps {
5
6
  /**
6
7
  * Specifies the `accessKey` of the main button.
@@ -38,6 +39,10 @@ export interface DropDownButtonProps {
38
39
  * Defines an icon that will be rendered next to the main button text ([see example]({% slug icons_dropdownbutton %})).
39
40
  */
40
41
  icon?: string;
42
+ /**
43
+ * Defines an SVGIcon to be rendered within the DropDownButton.
44
+ */
45
+ svgIcon?: SVGIcon;
41
46
  /**
42
47
  * Defines an icon with a custom CSS class that will be rendered next to the main button text ([see example]({% slug icons_dropdownbutton %})).
43
48
  */
@@ -199,6 +204,10 @@ export interface SplitButtonProps {
199
204
  * Defines an icon that will be rendered next to the main button text ([see example]({% slug icons_splitbutton %})).
200
205
  */
201
206
  icon?: string;
207
+ /**
208
+ * Defines an SVGIcon to be rendered within the SplitButton.
209
+ */
210
+ svgIcon?: SVGIcon;
202
211
  /**
203
212
  * Defines an icon with a custom CSS class that will be rendered next to the main button text ([see example]({% slug icons_splitbutton %})).
204
213
  */
@@ -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: 1684762545,
8
+ publishDate: 1684827554,
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
  };
@@ -47,7 +47,7 @@ export interface ButtonInterface {
47
47
  */
48
48
  icon?: string;
49
49
  /**
50
- * Defines the svg icon in a Kendo UI for Vue theme.
50
+ * Defines an SVGIcon to be rendered within the button.
51
51
  */
52
52
  svgIcon?: SVGIcon;
53
53
  /**
@@ -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
  import { ChipRemoveEvent, ChipMouseEvent, ChipFocusEvent, ChipKeyboardEvent } from '../models/events';
7
8
  /**
8
9
  * Represents the properties of [Chip]({% slug api_buttons_chip %}) component.
@@ -36,6 +37,10 @@ export interface ChipProps {
36
37
  * Determines if the Chip has custom `removeIcon`.
37
38
  */
38
39
  removeIcon?: string;
40
+ /**
41
+ * Defines an remove SVGIcon to be rendered within the chip.
42
+ */
43
+ removeSvgIcon?: SVGIcon;
39
44
  /**
40
45
  * Determines if the Chip is disabled.
41
46
  */
@@ -44,10 +49,18 @@ export interface ChipProps {
44
49
  * Determines if the Chip has an `icon`.
45
50
  */
46
51
  icon?: string;
52
+ /**
53
+ * Defines an SVGIcon to be rendered within the chip.
54
+ */
55
+ svgIcon?: SVGIcon;
47
56
  /**
48
57
  * Determines if the Chip has custom selection `icon`.
49
58
  */
50
59
  selectedIcon?: string;
60
+ /**
61
+ * Defines an selection SVGIcon to be rendered within the chip.
62
+ */
63
+ selectedSvgIcon?: SVGIcon;
51
64
  /**
52
65
  * Determines if the Chip style is `filled` or `outlined`.
53
66
  */
@@ -11,6 +11,7 @@ var gh = allVue.h;
11
11
  var isV3 = allVue.version && allVue.version[0] === '3';
12
12
  var ref = allVue.ref;
13
13
  var kendo_vue_common_1 = require("@progress/kendo-vue-common");
14
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
14
15
  var focus_reducer_1 = require("./focus-reducer");
15
16
  var data_reducer_1 = require("./data-reducer");
16
17
  var selection_reducer_1 = require("./selection-reducer");
@@ -41,17 +42,30 @@ var ChipVue2 = {
41
42
  return 'x-circle';
42
43
  }
43
44
  },
45
+ removeSvgIcon: {
46
+ type: Object,
47
+ default: function _default() {
48
+ return kendo_svg_icons_1.xCircleIcon;
49
+ }
50
+ },
44
51
  disabled: {
45
52
  type: Boolean,
46
53
  default: false
47
54
  },
48
55
  icon: String,
56
+ svgIcon: Object,
49
57
  selectedIcon: {
50
58
  type: String,
51
59
  default: function _default() {
52
60
  return 'check';
53
61
  }
54
62
  },
63
+ selectedSvgIcon: {
64
+ type: Object,
65
+ default: function _default() {
66
+ return kendo_svg_icons_1.checkIcon;
67
+ }
68
+ },
55
69
  look: {
56
70
  type: String,
57
71
  default: function _default() {
@@ -149,9 +163,6 @@ var ChipVue2 = {
149
163
  }
150
164
  },
151
165
  methods: {
152
- getIconName: function getIconName(currentIconName) {
153
- return currentIconName && currentIconName.indexOf('k-i-') !== -1 ? currentIconName.split('k-i-')[1] : currentIconName;
154
- },
155
166
  computedFocused: function computedFocused() {
156
167
  return this.kendoFocused.value === this.$props.value;
157
168
  },
@@ -274,7 +285,12 @@ var ChipVue2 = {
274
285
  fillMode = _b.fillMode,
275
286
  look = _b.look,
276
287
  avatar = _b.avatar,
277
- icon = _b.icon;
288
+ icon = _b.icon,
289
+ svgIcon = _b.svgIcon,
290
+ selectedIcon = _b.selectedIcon,
291
+ selectedSvgIcon = _b.selectedSvgIcon,
292
+ removeIcon = _b.removeIcon,
293
+ removeSvgIcon = _b.removeSvgIcon;
278
294
  var avatarTemplate = kendo_vue_common_1.templateRendering.call(this, avatar, kendo_vue_common_1.getListeners.call(this));
279
295
  var avatarRender = kendo_vue_common_1.getTemplate.call(this, {
280
296
  h: h,
@@ -316,16 +332,24 @@ var ChipVue2 = {
316
332
  onBlur: this.handleBlur,
317
333
  onClick: this.handleClick,
318
334
  onKeydown: this.handleKeyDown
319
- }, [this.currentSelected && this.$props.selectedIcon && h(kendo_vue_common_1.Icon, {
320
- name: this.getIconName(this.$props.selectedIcon),
335
+ }, [this.currentSelected && (selectedIcon || selectedSvgIcon) && h(kendo_vue_common_1.Icon, {
336
+ name: (0, kendo_vue_common_1.getIconName)(selectedIcon),
321
337
  attrs: this.v3 ? undefined : {
322
- name: this.getIconName(this.$props.selectedIcon)
323
- }
324
- }), icon && h(kendo_vue_common_1.Icon, {
325
- name: this.getIconName(icon),
338
+ name: (0, kendo_vue_common_1.getIconName)(selectedIcon),
339
+ icon: selectedSvgIcon,
340
+ size: 'small'
341
+ },
342
+ icon: selectedSvgIcon,
343
+ size: 'small'
344
+ }), (icon || svgIcon) && h(kendo_vue_common_1.Icon, {
345
+ name: (0, kendo_vue_common_1.getIconName)(icon),
326
346
  attrs: this.v3 ? undefined : {
327
- name: this.getIconName(icon)
328
- }
347
+ name: (0, kendo_vue_common_1.getIconName)(icon),
348
+ icon: svgIcon,
349
+ size: 'small'
350
+ },
351
+ icon: svgIcon,
352
+ size: 'small'
329
353
  }), avatar && avatarRender, h("span", {
330
354
  "class": 'k-chip-content'
331
355
  }, [this.$props.text && h("span", {
@@ -339,10 +363,14 @@ var ChipVue2 = {
339
363
  }, [h("span", {
340
364
  "class": "k-chip-action k-chip-remove-action"
341
365
  }, [h(kendo_vue_common_1.Icon, {
342
- name: this.getIconName(this.$props.removeIcon),
366
+ name: (0, kendo_vue_common_1.getIconName)(removeIcon),
343
367
  attrs: this.v3 ? undefined : {
344
- name: this.getIconName(this.$props.removeIcon)
368
+ name: (0, kendo_vue_common_1.getIconName)(removeIcon),
369
+ icon: removeSvgIcon,
370
+ size: 'small'
345
371
  },
372
+ icon: removeSvgIcon,
373
+ size: 'small',
346
374
  onClick: this.handleRemove,
347
375
  on: this.v3 ? undefined : {
348
376
  "click": this.handleRemove