@progress/kendo-vue-buttons 3.12.0-dev.202307181339 → 3.12.1-dev.202308170413

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.
@@ -5,6 +5,27 @@ declare type DefaultMethods<V> = {
5
5
  };
6
6
  import { SVGIcon } from '@progress/kendo-vue-common';
7
7
  import { ChipRemoveEvent, ChipMouseEvent, ChipFocusEvent, ChipKeyboardEvent } from '../models/events';
8
+ /**
9
+ * Represents the properties of the Avatar in the Chip.
10
+ */
11
+ export interface ChipAvatarProps {
12
+ /**
13
+ * Sets the image of the avatar.
14
+ */
15
+ imageUrl: string;
16
+ /**
17
+ * Defines the alternative text of the avatar image.
18
+ */
19
+ imageAlt: string;
20
+ /**
21
+ * Configures the `roundness` of the avatar. Default is set to 'medium'.
22
+ */
23
+ rounded?: null | 'small' | 'medium' | 'large' | 'full';
24
+ /**
25
+ * Sets additional CSS styles to the avatar
26
+ */
27
+ style?: object;
28
+ }
8
29
  /**
9
30
  * Represents the properties of [Chip]({% slug api_buttons_chip %}) component.
10
31
  */
@@ -66,7 +87,8 @@ export interface ChipProps {
66
87
  */
67
88
  look?: string;
68
89
  /**
69
- * Defines the avatar template that will be shown. Accepts a slot name, a `render` function, or a Vue component.
90
+ * If set to object of type ChipAvatarProps with image and imageAlt it renders a default Avatar. If set to string or a `render` function it
91
+ * defines the avatar template that will be shown.
70
92
  */
71
93
  avatar?: string | Function | Object;
72
94
  /**
@@ -18,7 +18,12 @@ var ChipVue2 = {
18
18
  props: {
19
19
  id: String,
20
20
  text: String,
21
- avatar: [String, Function, Object],
21
+ avatar: {
22
+ type: [String, Function, Object],
23
+ default: function _default() {
24
+ return undefined;
25
+ }
26
+ },
22
27
  value: [String, Object],
23
28
  dir: {
24
29
  type: String,
@@ -286,6 +291,19 @@ var ChipVue2 = {
286
291
  removeIcon = _b.removeIcon,
287
292
  removeSvgIcon = _b.removeSvgIcon;
288
293
  var avatarTemplate = templateRendering.call(this, avatar, getListeners.call(this));
294
+ var avatarDefaultRendering = avatar ? h("div", {
295
+ "class": "k-chip-avatar k-avatar k-rounded-".concat(avatar.rounded || 'medium', " k-avatar-").concat(kendoThemeMaps.sizeMap[size] || size, " k-avatar-solid k-avatar-solid-primary"),
296
+ style: avatar.style
297
+ }, [h("span", {
298
+ "class": "k-avatar-image"
299
+ }, [h("img", {
300
+ src: avatar.imageUrl,
301
+ attrs: this.v3 ? undefined : {
302
+ src: avatar.imageUrl,
303
+ alt: avatar.imageAlt
304
+ },
305
+ alt: avatar.imageAlt
306
+ })])]) : null;
289
307
  var avatarRender = getTemplate.call(this, {
290
308
  h: h,
291
309
  template: avatarTemplate
@@ -344,7 +362,7 @@ var ChipVue2 = {
344
362
  },
345
363
  icon: svgIcon,
346
364
  size: 'small'
347
- }), avatar && avatarRender, h("span", {
365
+ }), avatar ? avatar.imageUrl ? avatarDefaultRendering : avatarRender : null, h("span", {
348
366
  "class": 'k-chip-content'
349
367
  }, [this.$props.text && h("span", {
350
368
  "aria-label": this.$props.text,
@@ -91,13 +91,17 @@ export interface ChipListProps extends FormComponentProps {
91
91
  */
92
92
  selection?: string;
93
93
  /**
94
- * Represents the `text` field of Chip, used for the `label`.
94
+ * Represents the `text` field of Chip, defaults to 'text'.
95
95
  */
96
96
  textField?: string;
97
97
  /**
98
- * Represents the `value` field of Chip, used for setting the Chip `id`.
98
+ * Represents the `value` field of the Chip, defaults to 'value'.
99
99
  */
100
100
  valueField?: string;
101
+ /**
102
+ * Represents the 'avatar' field in the Chip, defaults to 'avatar'.
103
+ */
104
+ avatarField?: object;
101
105
  /**
102
106
  * Determines of ChipList is disabled.
103
107
  */
@@ -78,6 +78,12 @@ var ChipListVue2 = {
78
78
  return 'value';
79
79
  }
80
80
  },
81
+ avatarField: {
82
+ type: String,
83
+ default: function _default() {
84
+ return 'avatar';
85
+ }
86
+ },
81
87
  disabled: {
82
88
  type: Boolean,
83
89
  default: false
@@ -228,6 +234,7 @@ var ChipListVue2 = {
228
234
  dataItem: item,
229
235
  text: item[this.$props.textField],
230
236
  value: item[this.$props.valueField],
237
+ avatar: item[this.$props.avatarField],
231
238
  size: this.$props.size,
232
239
  rounded: this.$props.rounded,
233
240
  fillMode: this.$props.fillMode
@@ -236,6 +243,7 @@ var ChipListVue2 = {
236
243
  key: item[this.$props.valueField],
237
244
  text: item[this.$props.textField],
238
245
  value: item[this.$props.valueField],
246
+ avatar: item[this.$props.avatarField],
239
247
  size: this.$props.size,
240
248
  rounded: this.$props.rounded,
241
249
  fillMode: this.$props.fillMode
@@ -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: 1689686872,
8
+ publishDate: 1692244674,
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
  };
@@ -5,6 +5,27 @@ declare type DefaultMethods<V> = {
5
5
  };
6
6
  import { SVGIcon } from '@progress/kendo-vue-common';
7
7
  import { ChipRemoveEvent, ChipMouseEvent, ChipFocusEvent, ChipKeyboardEvent } from '../models/events';
8
+ /**
9
+ * Represents the properties of the Avatar in the Chip.
10
+ */
11
+ export interface ChipAvatarProps {
12
+ /**
13
+ * Sets the image of the avatar.
14
+ */
15
+ imageUrl: string;
16
+ /**
17
+ * Defines the alternative text of the avatar image.
18
+ */
19
+ imageAlt: string;
20
+ /**
21
+ * Configures the `roundness` of the avatar. Default is set to 'medium'.
22
+ */
23
+ rounded?: null | 'small' | 'medium' | 'large' | 'full';
24
+ /**
25
+ * Sets additional CSS styles to the avatar
26
+ */
27
+ style?: object;
28
+ }
8
29
  /**
9
30
  * Represents the properties of [Chip]({% slug api_buttons_chip %}) component.
10
31
  */
@@ -66,7 +87,8 @@ export interface ChipProps {
66
87
  */
67
88
  look?: string;
68
89
  /**
69
- * Defines the avatar template that will be shown. Accepts a slot name, a `render` function, or a Vue component.
90
+ * If set to object of type ChipAvatarProps with image and imageAlt it renders a default Avatar. If set to string or a `render` function it
91
+ * defines the avatar template that will be shown.
70
92
  */
71
93
  avatar?: string | Function | Object;
72
94
  /**
@@ -18,7 +18,12 @@ var ChipVue2 = {
18
18
  props: {
19
19
  id: String,
20
20
  text: String,
21
- avatar: [String, Function, Object],
21
+ avatar: {
22
+ type: [String, Function, Object],
23
+ default: function _default() {
24
+ return undefined;
25
+ }
26
+ },
22
27
  value: [String, Object],
23
28
  dir: {
24
29
  type: String,
@@ -286,6 +291,19 @@ var ChipVue2 = {
286
291
  removeIcon = _b.removeIcon,
287
292
  removeSvgIcon = _b.removeSvgIcon;
288
293
  var avatarTemplate = templateRendering.call(this, avatar, getListeners.call(this));
294
+ var avatarDefaultRendering = avatar ? h("div", {
295
+ "class": "k-chip-avatar k-avatar k-rounded-".concat(avatar.rounded || 'medium', " k-avatar-").concat(kendoThemeMaps.sizeMap[size] || size, " k-avatar-solid k-avatar-solid-primary"),
296
+ style: avatar.style
297
+ }, [h("span", {
298
+ "class": "k-avatar-image"
299
+ }, [h("img", {
300
+ src: avatar.imageUrl,
301
+ attrs: this.v3 ? undefined : {
302
+ src: avatar.imageUrl,
303
+ alt: avatar.imageAlt
304
+ },
305
+ alt: avatar.imageAlt
306
+ })])]) : null;
289
307
  var avatarRender = getTemplate.call(this, {
290
308
  h: h,
291
309
  template: avatarTemplate
@@ -344,7 +362,7 @@ var ChipVue2 = {
344
362
  },
345
363
  icon: svgIcon,
346
364
  size: 'small'
347
- }), avatar && avatarRender, h("span", {
365
+ }), avatar ? avatar.imageUrl ? avatarDefaultRendering : avatarRender : null, h("span", {
348
366
  "class": 'k-chip-content'
349
367
  }, [this.$props.text && h("span", {
350
368
  "aria-label": this.$props.text,
@@ -91,13 +91,17 @@ export interface ChipListProps extends FormComponentProps {
91
91
  */
92
92
  selection?: string;
93
93
  /**
94
- * Represents the `text` field of Chip, used for the `label`.
94
+ * Represents the `text` field of Chip, defaults to 'text'.
95
95
  */
96
96
  textField?: string;
97
97
  /**
98
- * Represents the `value` field of Chip, used for setting the Chip `id`.
98
+ * Represents the `value` field of the Chip, defaults to 'value'.
99
99
  */
100
100
  valueField?: string;
101
+ /**
102
+ * Represents the 'avatar' field in the Chip, defaults to 'avatar'.
103
+ */
104
+ avatarField?: object;
101
105
  /**
102
106
  * Determines of ChipList is disabled.
103
107
  */
@@ -78,6 +78,12 @@ var ChipListVue2 = {
78
78
  return 'value';
79
79
  }
80
80
  },
81
+ avatarField: {
82
+ type: String,
83
+ default: function _default() {
84
+ return 'avatar';
85
+ }
86
+ },
81
87
  disabled: {
82
88
  type: Boolean,
83
89
  default: false
@@ -228,6 +234,7 @@ var ChipListVue2 = {
228
234
  dataItem: item,
229
235
  text: item[this.$props.textField],
230
236
  value: item[this.$props.valueField],
237
+ avatar: item[this.$props.avatarField],
231
238
  size: this.$props.size,
232
239
  rounded: this.$props.rounded,
233
240
  fillMode: this.$props.fillMode
@@ -236,6 +243,7 @@ var ChipListVue2 = {
236
243
  key: item[this.$props.valueField],
237
244
  text: item[this.$props.textField],
238
245
  value: item[this.$props.valueField],
246
+ avatar: item[this.$props.avatarField],
239
247
  size: this.$props.size,
240
248
  rounded: this.$props.rounded,
241
249
  fillMode: this.$props.fillMode
@@ -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: 1689686872,
8
+ publishDate: 1692244674,
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
  };
@@ -5,6 +5,27 @@ declare type DefaultMethods<V> = {
5
5
  };
6
6
  import { SVGIcon } from '@progress/kendo-vue-common';
7
7
  import { ChipRemoveEvent, ChipMouseEvent, ChipFocusEvent, ChipKeyboardEvent } from '../models/events';
8
+ /**
9
+ * Represents the properties of the Avatar in the Chip.
10
+ */
11
+ export interface ChipAvatarProps {
12
+ /**
13
+ * Sets the image of the avatar.
14
+ */
15
+ imageUrl: string;
16
+ /**
17
+ * Defines the alternative text of the avatar image.
18
+ */
19
+ imageAlt: string;
20
+ /**
21
+ * Configures the `roundness` of the avatar. Default is set to 'medium'.
22
+ */
23
+ rounded?: null | 'small' | 'medium' | 'large' | 'full';
24
+ /**
25
+ * Sets additional CSS styles to the avatar
26
+ */
27
+ style?: object;
28
+ }
8
29
  /**
9
30
  * Represents the properties of [Chip]({% slug api_buttons_chip %}) component.
10
31
  */
@@ -66,7 +87,8 @@ export interface ChipProps {
66
87
  */
67
88
  look?: string;
68
89
  /**
69
- * Defines the avatar template that will be shown. Accepts a slot name, a `render` function, or a Vue component.
90
+ * If set to object of type ChipAvatarProps with image and imageAlt it renders a default Avatar. If set to string or a `render` function it
91
+ * defines the avatar template that will be shown.
70
92
  */
71
93
  avatar?: string | Function | Object;
72
94
  /**
@@ -24,7 +24,12 @@ var ChipVue2 = {
24
24
  props: {
25
25
  id: String,
26
26
  text: String,
27
- avatar: [String, Function, Object],
27
+ avatar: {
28
+ type: [String, Function, Object],
29
+ default: function _default() {
30
+ return undefined;
31
+ }
32
+ },
28
33
  value: [String, Object],
29
34
  dir: {
30
35
  type: String,
@@ -292,6 +297,19 @@ var ChipVue2 = {
292
297
  removeIcon = _b.removeIcon,
293
298
  removeSvgIcon = _b.removeSvgIcon;
294
299
  var avatarTemplate = kendo_vue_common_1.templateRendering.call(this, avatar, kendo_vue_common_1.getListeners.call(this));
300
+ var avatarDefaultRendering = avatar ? h("div", {
301
+ "class": "k-chip-avatar k-avatar k-rounded-".concat(avatar.rounded || 'medium', " k-avatar-").concat(kendo_vue_common_1.kendoThemeMaps.sizeMap[size] || size, " k-avatar-solid k-avatar-solid-primary"),
302
+ style: avatar.style
303
+ }, [h("span", {
304
+ "class": "k-avatar-image"
305
+ }, [h("img", {
306
+ src: avatar.imageUrl,
307
+ attrs: this.v3 ? undefined : {
308
+ src: avatar.imageUrl,
309
+ alt: avatar.imageAlt
310
+ },
311
+ alt: avatar.imageAlt
312
+ })])]) : null;
295
313
  var avatarRender = kendo_vue_common_1.getTemplate.call(this, {
296
314
  h: h,
297
315
  template: avatarTemplate
@@ -350,7 +368,7 @@ var ChipVue2 = {
350
368
  },
351
369
  icon: svgIcon,
352
370
  size: 'small'
353
- }), avatar && avatarRender, h("span", {
371
+ }), avatar ? avatar.imageUrl ? avatarDefaultRendering : avatarRender : null, h("span", {
354
372
  "class": 'k-chip-content'
355
373
  }, [this.$props.text && h("span", {
356
374
  "aria-label": this.$props.text,
@@ -91,13 +91,17 @@ export interface ChipListProps extends FormComponentProps {
91
91
  */
92
92
  selection?: string;
93
93
  /**
94
- * Represents the `text` field of Chip, used for the `label`.
94
+ * Represents the `text` field of Chip, defaults to 'text'.
95
95
  */
96
96
  textField?: string;
97
97
  /**
98
- * Represents the `value` field of Chip, used for setting the Chip `id`.
98
+ * Represents the `value` field of the Chip, defaults to 'value'.
99
99
  */
100
100
  valueField?: string;
101
+ /**
102
+ * Represents the 'avatar' field in the Chip, defaults to 'avatar'.
103
+ */
104
+ avatarField?: object;
101
105
  /**
102
106
  * Determines of ChipList is disabled.
103
107
  */
@@ -84,6 +84,12 @@ var ChipListVue2 = {
84
84
  return 'value';
85
85
  }
86
86
  },
87
+ avatarField: {
88
+ type: String,
89
+ default: function _default() {
90
+ return 'avatar';
91
+ }
92
+ },
87
93
  disabled: {
88
94
  type: Boolean,
89
95
  default: false
@@ -234,6 +240,7 @@ var ChipListVue2 = {
234
240
  dataItem: item,
235
241
  text: item[this.$props.textField],
236
242
  value: item[this.$props.valueField],
243
+ avatar: item[this.$props.avatarField],
237
244
  size: this.$props.size,
238
245
  rounded: this.$props.rounded,
239
246
  fillMode: this.$props.fillMode
@@ -242,6 +249,7 @@ var ChipListVue2 = {
242
249
  key: item[this.$props.valueField],
243
250
  text: item[this.$props.textField],
244
251
  value: item[this.$props.valueField],
252
+ avatar: item[this.$props.avatarField],
245
253
  size: this.$props.size,
246
254
  rounded: this.$props.rounded,
247
255
  fillMode: this.$props.fillMode
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-vue-buttons',
9
9
  productName: 'Kendo UI for Vue',
10
10
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
11
- publishDate: 1689686872,
11
+ publishDate: 1692244674,
12
12
  version: '',
13
13
  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'
14
14
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-buttons",
3
3
  "description": "Kendo UI for Vue Buttons package",
4
- "version": "3.12.0-dev.202307181339",
4
+ "version": "3.12.1-dev.202308170413",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/telerik/kendo-vue.git"
@@ -41,15 +41,15 @@
41
41
  "vue": "^2.6.12 || ^3.0.2"
42
42
  },
43
43
  "dependencies": {
44
- "@progress/kendo-vue-common": "3.12.0-dev.202307181339",
45
- "@progress/kendo-vue-popup": "3.12.0-dev.202307181339"
44
+ "@progress/kendo-vue-common": "3.12.1-dev.202308170413",
45
+ "@progress/kendo-vue-popup": "3.12.1-dev.202308170413"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@progress/kendo-drawing": "^1.5.12",
49
49
  "@progress/kendo-svg-icons": "^1.0.0",
50
- "@progress/kendo-vue-dropdowns": "3.12.0-dev.202307181339",
51
- "@progress/kendo-vue-inputs": "3.12.0-dev.202307181339",
52
- "@progress/kendo-vue-layout": "3.12.0-dev.202307181339"
50
+ "@progress/kendo-vue-dropdowns": "3.12.1-dev.202308170413",
51
+ "@progress/kendo-vue-inputs": "3.12.1-dev.202308170413",
52
+ "@progress/kendo-vue-layout": "3.12.1-dev.202308170413"
53
53
  },
54
54
  "@progress": {
55
55
  "friendlyName": "Buttons",