@progress/kendo-angular-buttons 6.4.1 → 7.0.0-dev.202201180832

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 (85) hide show
  1. package/LICENSE.md +1 -1
  2. package/NOTICE.txt +119 -79
  3. package/README.md +1 -1
  4. package/dist/cdn/js/kendo-angular-buttons.js +2 -2
  5. package/dist/cdn/main.js +1 -1
  6. package/dist/es/button/button.directive.js +236 -89
  7. package/dist/es/button/button.service.js +1 -5
  8. package/dist/es/buttongroup/buttongroup.component.js +11 -60
  9. package/dist/es/chip/chip-list.component.js +57 -7
  10. package/dist/es/chip/chip.component.js +175 -86
  11. package/dist/es/{chip/models/chip-look.js → common/models/fillmode.js} +0 -0
  12. package/dist/es/{chip/models/type.js → common/models/rounded.js} +0 -0
  13. package/dist/{es2015/button-look.js → es/common/models/styling-classes.js} +0 -0
  14. package/dist/es/{button-look.js → common/models.js} +0 -0
  15. package/dist/es/dropdownbutton/dropdownbutton.component.js +89 -36
  16. package/dist/es/floatingactionbutton/dial-item.component.js +1 -1
  17. package/dist/es/floatingactionbutton/floatingactionbutton.component.js +66 -41
  18. package/dist/es/focusable/focusable.directive.js +4 -4
  19. package/dist/es/listbutton/list-button.js +4 -1
  20. package/dist/es/listbutton/list.component.js +20 -1
  21. package/dist/es/package-metadata.js +1 -1
  22. package/dist/es/splitbutton/splitbutton.component.js +107 -37
  23. package/dist/es/util.js +52 -0
  24. package/dist/es2015/button/button.directive.d.ts +85 -22
  25. package/dist/es2015/button/button.directive.js +219 -85
  26. package/dist/es2015/button/button.service.d.ts +1 -4
  27. package/dist/es2015/button/button.service.js +1 -5
  28. package/dist/es2015/buttongroup/buttongroup.component.d.ts +0 -15
  29. package/dist/es2015/buttongroup/buttongroup.component.js +11 -48
  30. package/dist/es2015/chip/chip-list.component.d.ts +19 -3
  31. package/dist/es2015/chip/chip-list.component.js +52 -7
  32. package/dist/es2015/chip/chip.component.d.ts +67 -32
  33. package/dist/es2015/chip/chip.component.js +186 -97
  34. package/dist/es2015/common/models/fillmode.d.ts +12 -0
  35. package/dist/es2015/{chip/models/type.js → common/models/fillmode.js} +0 -0
  36. package/dist/es2015/common/models/rounded.d.ts +12 -0
  37. package/dist/es2015/common/models/rounded.js +4 -0
  38. package/dist/es2015/common/models/shape.d.ts +2 -9
  39. package/dist/es2015/common/models/size.d.ts +9 -6
  40. package/dist/es2015/common/models/styling-classes.d.ts +11 -0
  41. package/dist/es2015/common/models/styling-classes.js +4 -0
  42. package/dist/es2015/common/models/theme-color.d.ts +15 -4
  43. package/dist/es2015/common/models.d.ts +10 -0
  44. package/dist/es2015/{chip/models/chip-look.js → common/models.js} +0 -0
  45. package/dist/es2015/dropdownbutton/dropdownbutton.component.d.ts +59 -7
  46. package/dist/es2015/dropdownbutton/dropdownbutton.component.js +92 -31
  47. package/dist/es2015/floatingactionbutton/dial-item.component.js +1 -1
  48. package/dist/es2015/floatingactionbutton/floatingactionbutton.component.d.ts +28 -21
  49. package/dist/es2015/floatingactionbutton/floatingactionbutton.component.js +62 -42
  50. package/dist/es2015/focusable/focusable.directive.js +4 -4
  51. package/dist/es2015/index.metadata.json +1 -1
  52. package/dist/es2015/listbutton/list-button.js +4 -1
  53. package/dist/es2015/listbutton/list.component.d.ts +3 -0
  54. package/dist/es2015/listbutton/list.component.js +37 -20
  55. package/dist/es2015/main.d.ts +4 -4
  56. package/dist/es2015/package-metadata.js +1 -1
  57. package/dist/es2015/splitbutton/splitbutton.component.d.ts +59 -12
  58. package/dist/es2015/splitbutton/splitbutton.component.js +113 -33
  59. package/dist/es2015/util.d.ts +21 -0
  60. package/dist/es2015/util.js +52 -0
  61. package/dist/fesm2015/index.js +862 -409
  62. package/dist/fesm5/index.js +853 -405
  63. package/dist/npm/button/button.directive.js +236 -89
  64. package/dist/npm/button/button.service.js +0 -4
  65. package/dist/npm/buttongroup/buttongroup.component.js +11 -60
  66. package/dist/npm/chip/chip-list.component.js +55 -5
  67. package/dist/npm/chip/chip.component.js +173 -84
  68. package/dist/npm/{chip/models/chip-look.js → common/models/fillmode.js} +0 -0
  69. package/dist/npm/{chip/models/type.js → common/models/rounded.js} +0 -0
  70. package/dist/npm/common/models/styling-classes.js +6 -0
  71. package/dist/npm/{button-look.js → common/models.js} +0 -0
  72. package/dist/npm/dropdownbutton/dropdownbutton.component.js +89 -36
  73. package/dist/npm/floatingactionbutton/dial-item.component.js +1 -1
  74. package/dist/npm/floatingactionbutton/floatingactionbutton.component.js +66 -41
  75. package/dist/npm/focusable/focusable.directive.js +4 -4
  76. package/dist/npm/listbutton/list-button.js +4 -1
  77. package/dist/npm/listbutton/list.component.js +20 -1
  78. package/dist/npm/package-metadata.js +1 -1
  79. package/dist/npm/splitbutton/splitbutton.component.js +105 -35
  80. package/dist/npm/util.js +52 -0
  81. package/dist/systemjs/kendo-angular-buttons.js +1 -1
  82. package/package.json +14 -11
  83. package/dist/es2015/button-look.d.ts +0 -21
  84. package/dist/es2015/chip/models/chip-look.d.ts +0 -20
  85. package/dist/es2015/chip/models/type.d.ts +0 -21
@@ -3,12 +3,12 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as tslib_1 from "tslib";
6
- import { Component, HostBinding, Input, Output, EventEmitter, ElementRef, Renderer2, NgZone } from '@angular/core';
6
+ import { Component, HostBinding, Input, Output, EventEmitter, ElementRef, Renderer2, NgZone, isDevMode } from '@angular/core';
7
7
  import { isDocumentAvailable } from '@progress/kendo-angular-common';
8
8
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
9
9
  import { validatePackage } from '@progress/kendo-licensing';
10
10
  import { packageMetadata } from '../package-metadata';
11
- import { closest } from '../util';
11
+ import { closest, getStylingClasses, getThemeColorClasses } from '../util';
12
12
  /**
13
13
  * Displays a Chip that represents an input, attribute or an action.
14
14
  */
@@ -18,38 +18,20 @@ var ChipComponent = /** @class */ (function () {
18
18
  this.renderer = renderer;
19
19
  this.ngZone = ngZone;
20
20
  this.localizationService = localizationService;
21
- /**
22
- * Changes the visual appearance by using alternative styling options.
23
- *
24
- * The available values are:
25
- * * `solid`
26
- * * `outline`
27
- * * `filled` (The `filled` option will be deprecated. To apply identical styling, use `solid` instead).
28
- * * `outlined` (The `outlined` option will be deprecated. To apply identical styling, use `outline` instead).
29
- */
30
- this.look = 'solid';
31
21
  /**
32
22
  * Specifies the selected state of the Chip.
23
+ * @default false
33
24
  */
34
25
  this.selected = false;
35
26
  /**
36
27
  * Specifies if the Chip will be removable or not.
37
28
  * If the property is set to `true`, the Chip renders a remove icon.
29
+ * @default false
38
30
  */
39
31
  this.removable = false;
40
- /**
41
- * Specifies the Chip type.
42
- *
43
- * The possible values are:
44
- * - `none` (default)
45
- * - `success`
46
- * - `error`
47
- * - `warning`
48
- * - `info`
49
- */
50
- this.type = 'none';
51
32
  /**
52
33
  * If set to `true`, the Chip will be disabled.
34
+ * @default false
53
35
  */
54
36
  this.disabled = false;
55
37
  /**
@@ -62,34 +44,111 @@ var ChipComponent = /** @class */ (function () {
62
44
  this.contentClick = new EventEmitter();
63
45
  this.tabIndex = 0;
64
46
  this.hostClass = true;
47
+ this._size = 'medium';
48
+ this._rounded = 'medium';
49
+ this._fillMode = 'solid';
50
+ this._themeColor = 'base';
65
51
  this.focused = false;
66
52
  validatePackage(packageMetadata);
67
53
  this.direction = localizationService.rtl ? 'rtl' : 'ltr';
68
54
  }
69
- Object.defineProperty(ChipComponent.prototype, "ariaChecked", {
55
+ Object.defineProperty(ChipComponent.prototype, "size", {
70
56
  get: function () {
71
- return this.selected;
57
+ return this._size;
58
+ },
59
+ /**
60
+ * The size property specifies the height, padding and line height of the Chip
61
+ * ([see example]({% slug appearance_chip %}#toc-size)).
62
+ *
63
+ * The possible values are:
64
+ * * `'small'`
65
+ * * `'medium'` (default)
66
+ * * `'large'`
67
+ * * `null`
68
+ */
69
+ set: function (size) {
70
+ this.handleClasses(size, 'size');
71
+ this._size = size;
72
72
  },
73
73
  enumerable: true,
74
74
  configurable: true
75
75
  });
76
- Object.defineProperty(ChipComponent.prototype, "outlineClass", {
76
+ Object.defineProperty(ChipComponent.prototype, "rounded", {
77
77
  get: function () {
78
- return this.look === 'outline' || this.look === 'outlined';
78
+ return this._rounded;
79
+ },
80
+ /**
81
+ * The rounded property specifies the border radius of the Chip
82
+ * ([see example]({% slug appearance_chip %}#toc-rounded)).
83
+ *
84
+ * The possible values are:
85
+ * * `'small'`
86
+ * * `'medium'` (default)
87
+ * * `'large'`
88
+ * * `'full'`
89
+ * * `null`
90
+ */
91
+ set: function (rounded) {
92
+ this.handleClasses(rounded, 'rounded');
93
+ this._rounded = rounded;
79
94
  },
80
95
  enumerable: true,
81
96
  configurable: true
82
97
  });
83
- Object.defineProperty(ChipComponent.prototype, "solidClass", {
98
+ Object.defineProperty(ChipComponent.prototype, "fillMode", {
84
99
  get: function () {
85
- return this.look === 'solid' || this.look === 'filled';
100
+ return this._fillMode;
101
+ },
102
+ /**
103
+ * The fillMode property specifies the background and border styles of the Chip
104
+ * ([see example]({% slug appearance_chip %}#toc-fillMode)).
105
+ *
106
+ * The possible values are:
107
+ * * `'solid'` (default)
108
+ * * `'outline'`
109
+ * * `null`
110
+ */
111
+ set: function (fillMode) {
112
+ this.handleClasses(fillMode, 'fillMode');
113
+ this._fillMode = fillMode;
114
+ },
115
+ enumerable: true,
116
+ configurable: true
117
+ });
118
+ Object.defineProperty(ChipComponent.prototype, "themeColor", {
119
+ get: function () {
120
+ return this._themeColor;
121
+ },
122
+ /**
123
+ * The Chip allows you to specify predefined theme colors.
124
+ * The theme color will be applied as a background and border color while also amending the text color accordingly
125
+ * ([see example]({% slug appearance_chip %}#toc-themeColor)).
126
+ *
127
+ * The possible values are:
128
+ * * `'base'` (default)
129
+ * * `'info'`
130
+ * * `'success'`
131
+ * * `'warning'`
132
+ * * `'error'`
133
+ * * `null`
134
+ */
135
+ set: function (themeColor) {
136
+ this.handleThemeColor(themeColor);
137
+ this._themeColor = themeColor;
138
+ },
139
+ enumerable: true,
140
+ configurable: true
141
+ });
142
+ Object.defineProperty(ChipComponent.prototype, "ariaChecked", {
143
+ get: function () {
144
+ return this.selected;
86
145
  },
87
146
  enumerable: true,
88
147
  configurable: true
89
148
  });
90
149
  Object.defineProperty(ChipComponent.prototype, "hasIconClass", {
91
150
  get: function () {
92
- return this.icon || this.iconClass ? true : false;
151
+ return this.icon || this.iconClass || this.avatarClass ? true : false;
93
152
  },
94
153
  enumerable: true,
95
154
  configurable: true
@@ -132,44 +191,48 @@ var ChipComponent = /** @class */ (function () {
132
191
  }
133
192
  };
134
193
  ChipComponent.prototype.ngAfterViewInit = function () {
194
+ var _this = this;
135
195
  var chip = this.element.nativeElement;
136
- var typeClass = this.typeClass();
137
- if (this.type !== 'none') {
138
- this.renderer.addClass(chip, typeClass);
139
- }
196
+ var stylingOptions = ['size', 'rounded', 'fillMode'];
197
+ stylingOptions.forEach(function (input) {
198
+ _this.handleClasses(_this[input], input);
199
+ });
140
200
  this.attachElementEventHandlers(chip);
141
201
  };
142
- Object.defineProperty(ChipComponent.prototype, "iconClasses", {
202
+ Object.defineProperty(ChipComponent.prototype, "kendoIconClass", {
143
203
  /**
144
204
  * @hidden
145
205
  */
146
206
  get: function () {
147
- var classes = [];
148
- if (this.iconClass) {
149
- classes.push("" + this.iconClass);
150
- }
151
- if (this.icon) {
152
- classes.push("k-icon k-i-" + this.icon);
153
- }
154
- return classes;
207
+ this.verifyIconSettings([this.iconClass, this.avatarClass]);
208
+ return "k-i-" + this.icon;
155
209
  },
156
210
  enumerable: true,
157
211
  configurable: true
158
212
  });
159
- Object.defineProperty(ChipComponent.prototype, "selectedIconClasses", {
213
+ Object.defineProperty(ChipComponent.prototype, "customIconClass", {
160
214
  /**
161
215
  * @hidden
162
216
  */
163
217
  get: function () {
164
- if (this.selectedIcon) {
165
- return "" + this.selectedIcon;
166
- }
167
- return "k-icon k-i-check";
218
+ this.verifyIconSettings([this.icon, this.avatarClass]);
219
+ return "" + this.iconClass;
220
+ },
221
+ enumerable: true,
222
+ configurable: true
223
+ });
224
+ Object.defineProperty(ChipComponent.prototype, "chipAvatarClass", {
225
+ /**
226
+ * @hidden
227
+ */
228
+ get: function () {
229
+ this.verifyIconSettings([this.icon, this.iconClass]);
230
+ return "" + this.avatarClass;
168
231
  },
169
232
  enumerable: true,
170
233
  configurable: true
171
234
  });
172
- Object.defineProperty(ChipComponent.prototype, "removeIconClasses", {
235
+ Object.defineProperty(ChipComponent.prototype, "removeIconClass", {
173
236
  /**
174
237
  * @hidden
175
238
  */
@@ -177,23 +240,11 @@ var ChipComponent = /** @class */ (function () {
177
240
  if (this.removeIcon) {
178
241
  return "" + this.removeIcon;
179
242
  }
180
- return "k-icon k-i-close-circle";
243
+ return "k-i-close-circle";
181
244
  },
182
245
  enumerable: true,
183
246
  configurable: true
184
247
  });
185
- /**
186
- * @hidden
187
- */
188
- ChipComponent.prototype.typeClass = function () {
189
- return {
190
- 'none': '',
191
- 'success': 'k-chip-success',
192
- 'warning': 'k-chip-warning',
193
- 'error': 'k-chip-error',
194
- 'info': 'k-chip-info'
195
- }[this.type];
196
- };
197
248
  /**
198
249
  * Focuses the Chip component.
199
250
  */
@@ -228,7 +279,7 @@ var ChipComponent = /** @class */ (function () {
228
279
  _this.renderer.removeClass(chip, 'k-focus');
229
280
  });
230
281
  var contentClickListener = _this.renderer.listen(chip, 'click', function (e) {
231
- var isRemoveClicked = closest(e.target, '.k-remove-icon');
282
+ var isRemoveClicked = closest(e.target, '.k-chip-remove-action');
232
283
  if (!isRemoveClicked) {
233
284
  _this.ngZone.run(function () {
234
285
  _this.contentClick.emit({ sender: _this, originalEvent: e });
@@ -242,10 +293,42 @@ var ChipComponent = /** @class */ (function () {
242
293
  };
243
294
  });
244
295
  };
245
- tslib_1.__decorate([
246
- Input(),
247
- tslib_1.__metadata("design:type", String)
248
- ], ChipComponent.prototype, "look", void 0);
296
+ /**
297
+ * @hidden
298
+ */
299
+ ChipComponent.prototype.verifyIconSettings = function (iconsToCheck) {
300
+ if (isDevMode()) {
301
+ if (iconsToCheck.filter(function (icon) { return icon !== null && icon !== undefined; }).length > 0) {
302
+ this.renderer.removeClass(this.element.nativeElement, 'k-chip-has-icon');
303
+ throw new Error('Invalid configuration: Having multiple icons is not supported. Only a single icon on a chip can be displayed.');
304
+ }
305
+ }
306
+ };
307
+ ChipComponent.prototype.handleClasses = function (value, input) {
308
+ var elem = this.element.nativeElement;
309
+ var classes = getStylingClasses('chip', input, this[input], value);
310
+ if (input === 'fillMode') {
311
+ this.handleThemeColor(this.themeColor, this[input], value);
312
+ }
313
+ if (classes.toRemove) {
314
+ this.renderer.removeClass(elem, classes.toRemove);
315
+ }
316
+ if (classes.toAdd) {
317
+ this.renderer.addClass(elem, classes.toAdd);
318
+ }
319
+ };
320
+ ChipComponent.prototype.handleThemeColor = function (value, prevFillMode, fillMode) {
321
+ var elem = this.element.nativeElement;
322
+ var removeFillMode = prevFillMode ? prevFillMode : this.fillMode;
323
+ var addFillMode = fillMode ? fillMode : this.fillMode;
324
+ var themeColorClass = getThemeColorClasses('chip', removeFillMode, addFillMode, this.themeColor, value);
325
+ this.renderer.removeClass(elem, themeColorClass.toRemove);
326
+ if (addFillMode !== null && fillMode !== null) {
327
+ if (themeColorClass.toAdd) {
328
+ this.renderer.addClass(elem, themeColorClass.toAdd);
329
+ }
330
+ }
331
+ };
249
332
  tslib_1.__decorate([
250
333
  Input(),
251
334
  tslib_1.__metadata("design:type", String)
@@ -260,12 +343,12 @@ var ChipComponent = /** @class */ (function () {
260
343
  ], ChipComponent.prototype, "iconClass", void 0);
261
344
  tslib_1.__decorate([
262
345
  Input(),
263
- tslib_1.__metadata("design:type", Boolean)
264
- ], ChipComponent.prototype, "selected", void 0);
346
+ tslib_1.__metadata("design:type", String)
347
+ ], ChipComponent.prototype, "avatarClass", void 0);
265
348
  tslib_1.__decorate([
266
349
  Input(),
267
- tslib_1.__metadata("design:type", String)
268
- ], ChipComponent.prototype, "selectedIcon", void 0);
350
+ tslib_1.__metadata("design:type", Boolean)
351
+ ], ChipComponent.prototype, "selected", void 0);
269
352
  tslib_1.__decorate([
270
353
  Input(),
271
354
  tslib_1.__metadata("design:type", Boolean)
@@ -274,14 +357,30 @@ var ChipComponent = /** @class */ (function () {
274
357
  Input(),
275
358
  tslib_1.__metadata("design:type", String)
276
359
  ], ChipComponent.prototype, "removeIcon", void 0);
277
- tslib_1.__decorate([
278
- Input(),
279
- tslib_1.__metadata("design:type", String)
280
- ], ChipComponent.prototype, "type", void 0);
281
360
  tslib_1.__decorate([
282
361
  Input(),
283
362
  tslib_1.__metadata("design:type", Boolean)
284
363
  ], ChipComponent.prototype, "disabled", void 0);
364
+ tslib_1.__decorate([
365
+ Input(),
366
+ tslib_1.__metadata("design:type", String),
367
+ tslib_1.__metadata("design:paramtypes", [String])
368
+ ], ChipComponent.prototype, "size", null);
369
+ tslib_1.__decorate([
370
+ Input(),
371
+ tslib_1.__metadata("design:type", String),
372
+ tslib_1.__metadata("design:paramtypes", [String])
373
+ ], ChipComponent.prototype, "rounded", null);
374
+ tslib_1.__decorate([
375
+ Input(),
376
+ tslib_1.__metadata("design:type", String),
377
+ tslib_1.__metadata("design:paramtypes", [String])
378
+ ], ChipComponent.prototype, "fillMode", null);
379
+ tslib_1.__decorate([
380
+ Input(),
381
+ tslib_1.__metadata("design:type", String),
382
+ tslib_1.__metadata("design:paramtypes", [String])
383
+ ], ChipComponent.prototype, "themeColor", null);
285
384
  tslib_1.__decorate([
286
385
  Output(),
287
386
  tslib_1.__metadata("design:type", EventEmitter)
@@ -303,16 +402,6 @@ var ChipComponent = /** @class */ (function () {
303
402
  HostBinding('class.k-chip'),
304
403
  tslib_1.__metadata("design:type", Boolean)
305
404
  ], ChipComponent.prototype, "hostClass", void 0);
306
- tslib_1.__decorate([
307
- HostBinding('class.k-chip-outline'),
308
- tslib_1.__metadata("design:type", Boolean),
309
- tslib_1.__metadata("design:paramtypes", [])
310
- ], ChipComponent.prototype, "outlineClass", null);
311
- tslib_1.__decorate([
312
- HostBinding('class.k-chip-solid'),
313
- tslib_1.__metadata("design:type", Boolean),
314
- tslib_1.__metadata("design:paramtypes", [])
315
- ], ChipComponent.prototype, "solidClass", null);
316
405
  tslib_1.__decorate([
317
406
  HostBinding('class.k-chip-has-icon'),
318
407
  tslib_1.__metadata("design:type", Boolean),
@@ -341,7 +430,7 @@ var ChipComponent = /** @class */ (function () {
341
430
  ChipComponent = tslib_1.__decorate([
342
431
  Component({
343
432
  selector: 'kendo-chip',
344
- template: "\n <span class=\"k-selected-icon-wrapper\">\n <span *ngIf=\"selected\"\n class=\"k-selected-icon\"\n [ngClass]=\"selectedIconClasses\"\n >\n </span>\n </span>\n\n <span *ngIf=\"icon || iconClass\"\n class=\"k-chip-icon\"\n [ngClass]=\"iconClasses\"\n >\n </span>\n\n <span class=\"k-chip-content\">\n <span class=\"k-chip-label\" *ngIf=\"label\">\n {{ label }}\n </span>\n <ng-content *ngIf=\"!label\"></ng-content>\n </span>\n\n <span *ngIf=\"removable\"\n class=\"k-remove-icon\"\n (click)=\"onRemoveClick($event)\"\n >\n <span [ngClass]=\"removeIconClasses\"></span>\n </span>\n ",
433
+ template: "\n <span\n *ngIf=\"icon\"\n class=\"k-chip-icon k-icon\"\n [ngClass]=\"kendoIconClass\"\n >\n </span>\n\n <span\n *ngIf=\"iconClass\"\n class=\"k-chip-icon\"\n [ngClass]=\"customIconClass\"\n >\n </span>\n\n <span\n *ngIf=\"avatarClass\"\n class=\"k-chip-avatar k-avatar k-rounded-full\"\n >\n <span class=\"k-avatar-image\" [ngClass]=\"chipAvatarClass\"></span>\n </span>\n\n <span class=\"k-chip-content\">\n <span class=\"k-chip-label\" *ngIf=\"label\">\n {{ label }}\n </span>\n <ng-content *ngIf=\"!label\"></ng-content>\n </span>\n\n <span class=\"k-chip-actions\">\n <span class=\"k-chip-action k-chip-remove-action\"\n *ngIf=\"removable\"\n (click)=\"onRemoveClick($event)\"\n >\n <span\n class=\"k-icon\"\n [ngClass]=\"removeIconClass\"\n >\n </span>\n </span>\n </span>\n ",
345
434
  providers: [
346
435
  LocalizationService,
347
436
  {
File without changes
@@ -72,17 +72,58 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
72
72
  */
73
73
  _this.imageUrl = '';
74
74
  /**
75
- * Adds visual weight to the default button and makes it primary.
75
+ * The size property specifies the width and height of the DropDownButton
76
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-size)).
77
+ *
78
+ * The possible values are:
79
+ * * `'small'`
80
+ * * `'medium'` (default)
81
+ * * `'large'`
82
+ * * `null`
76
83
  */
77
- _this.primary = false;
84
+ _this.size = 'medium';
78
85
  /**
79
- * Changes the visual appearance by using alternative styling options.
86
+ * The shape property specifies if the DropDownButton will be a square or rectangle.
87
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-shape)).
80
88
  *
81
- * The available values are:
82
- * * `flat`
83
- * * `outline`
89
+ * The possible values are:
90
+ * * `'rectangle'` (default)
91
+ * * `'square'`
92
+ * * `null`
93
+ */
94
+ _this.shape = 'rectangle';
95
+ /**
96
+ * The rounded property specifies the border radius of the DropDownButton
97
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-rounded)).
98
+ *
99
+ * The possible values are:
100
+ * * `'small'`
101
+ * * `'medium'` (default)
102
+ * * `'large'`
103
+ * * `'full'`
104
+ * * `null`
105
+ */
106
+ _this.rounded = 'medium';
107
+ /**
108
+ * The DropDownButton allows you to specify predefined theme colors.
109
+ * The theme color will be applied as a background and border color while also amending the text color accordingly
110
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-themeColor)).
111
+ *
112
+ * The possible values are:
113
+ * * `base` &mdash;Applies coloring based on the `base` theme color. (default)
114
+ * * `primary` &mdash;Applies coloring based on the `primary` theme color.
115
+ * * `secondary`&mdash;Applies coloring based on the `secondary` theme color.
116
+ * * `tertiary`&mdash; Applies coloring based on the `tertiary` theme color.
117
+ * * `info`&mdash;Applies coloring based on the `info` theme color.
118
+ * * `success`&mdash; Applies coloring based on the `success` theme color.
119
+ * * `warning`&mdash; Applies coloring based on the `warning` theme color.
120
+ * * `error`&mdash; Applies coloring based on the `error` theme color.
121
+ * * `dark`&mdash; Applies coloring based on the `dark` theme color.
122
+ * * `light`&mdash; Applies coloring based on the `light` theme color.
123
+ * * `inverse`&mdash; Applies coloring based on the `inverse` theme color.
124
+ * * `null` &mdash;Removes the default CSS class (no class would be rendered).
84
125
  */
85
- _this.look = 'default';
126
+ _this.themeColor = 'base';
86
127
  /**
87
128
  * Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
88
129
  */
@@ -110,6 +151,7 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
110
151
  */
111
152
  _this.onBlur = new EventEmitter(); //tslint:disable-line:no-output-rename
112
153
  _this.listId = guid();
154
+ _this._fillMode = 'solid';
113
155
  _this._itemClick = _this.itemClick;
114
156
  _this._blur = _this.onBlur;
115
157
  return _this;
@@ -164,6 +206,28 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
164
206
  enumerable: true,
165
207
  configurable: true
166
208
  });
209
+ Object.defineProperty(DropDownButtonComponent.prototype, "fillMode", {
210
+ get: function () {
211
+ return this._fillMode;
212
+ },
213
+ /**
214
+ * The fillMode property specifies the background and border styles of the DropDownButton
215
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-fillMode)).
216
+ *
217
+ * The available values are:
218
+ * * `solid` (default)
219
+ * * `flat`
220
+ * * `outline`
221
+ * * `link`
222
+ * * `null`
223
+ */
224
+ set: function (fillMode) {
225
+ // Temporary workaround for missing 'clear' styles
226
+ this._fillMode = fillMode === 'clear' ? 'flat' : fillMode;
227
+ },
228
+ enumerable: true,
229
+ configurable: true
230
+ });
167
231
  Object.defineProperty(DropDownButtonComponent.prototype, "openState", {
168
232
  /**
169
233
  * @hidden
@@ -221,20 +285,6 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
221
285
  enumerable: true,
222
286
  configurable: true
223
287
  });
224
- Object.defineProperty(DropDownButtonComponent.prototype, "isFlat", {
225
- get: function () {
226
- return this.look === 'flat';
227
- },
228
- enumerable: true,
229
- configurable: true
230
- });
231
- Object.defineProperty(DropDownButtonComponent.prototype, "isOutline", {
232
- get: function () {
233
- return this.look === 'outline';
234
- },
235
- enumerable: true,
236
- configurable: true
237
- });
238
288
  Object.defineProperty(DropDownButtonComponent.prototype, "widgetClasses", {
239
289
  get: function () {
240
290
  return true;
@@ -512,12 +562,25 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
512
562
  ], DropDownButtonComponent.prototype, "data", null);
513
563
  tslib_1.__decorate([
514
564
  Input(),
515
- tslib_1.__metadata("design:type", Boolean)
516
- ], DropDownButtonComponent.prototype, "primary", void 0);
565
+ tslib_1.__metadata("design:type", String)
566
+ ], DropDownButtonComponent.prototype, "size", void 0);
567
+ tslib_1.__decorate([
568
+ Input(),
569
+ tslib_1.__metadata("design:type", String)
570
+ ], DropDownButtonComponent.prototype, "shape", void 0);
571
+ tslib_1.__decorate([
572
+ Input(),
573
+ tslib_1.__metadata("design:type", String)
574
+ ], DropDownButtonComponent.prototype, "rounded", void 0);
575
+ tslib_1.__decorate([
576
+ Input(),
577
+ tslib_1.__metadata("design:type", String),
578
+ tslib_1.__metadata("design:paramtypes", [String])
579
+ ], DropDownButtonComponent.prototype, "fillMode", null);
517
580
  tslib_1.__decorate([
518
581
  Input(),
519
582
  tslib_1.__metadata("design:type", String)
520
- ], DropDownButtonComponent.prototype, "look", void 0);
583
+ ], DropDownButtonComponent.prototype, "themeColor", void 0);
521
584
  tslib_1.__decorate([
522
585
  Input(),
523
586
  tslib_1.__metadata("design:type", Object)
@@ -547,20 +610,10 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
547
610
  tslib_1.__metadata("design:type", EventEmitter)
548
611
  ], DropDownButtonComponent.prototype, "onBlur", void 0);
549
612
  tslib_1.__decorate([
550
- HostBinding('class.k-state-focused'),
613
+ HostBinding('class.k-focus'),
551
614
  tslib_1.__metadata("design:type", Boolean),
552
615
  tslib_1.__metadata("design:paramtypes", [])
553
616
  ], DropDownButtonComponent.prototype, "focused", null);
554
- tslib_1.__decorate([
555
- HostBinding('class.k-flat'),
556
- tslib_1.__metadata("design:type", Boolean),
557
- tslib_1.__metadata("design:paramtypes", [])
558
- ], DropDownButtonComponent.prototype, "isFlat", null);
559
- tslib_1.__decorate([
560
- HostBinding('class.k-outline'),
561
- tslib_1.__metadata("design:type", Boolean),
562
- tslib_1.__metadata("design:paramtypes", [])
563
- ], DropDownButtonComponent.prototype, "isOutline", null);
564
617
  tslib_1.__decorate([
565
618
  HostBinding('class.k-dropdown-button'),
566
619
  tslib_1.__metadata("design:type", Boolean),
@@ -635,7 +688,7 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
635
688
  }
636
689
  ],
637
690
  selector: 'kendo-dropdownbutton',
638
- template: "\n <button kendoButton #button\n role=\"menu\"\n type=\"button\"\n [tabindex]=\"componentTabIndex\"\n [class.k-state-active]=\"active\"\n [disabled]=\"disabled\"\n [icon]=\"icon\"\n [iconClass]=\"iconClass\"\n [imageUrl]=\"imageUrl\"\n [ngClass]=\"buttonClass\"\n (click)=\"openPopup()\"\n (focus)=\"handleFocus()\"\n (blur)=\"onButtonBlur()\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-expanded]=\"openState\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-owns]=\"listId\"\n [look]=\"look\"\n [primary]=\"primary\"\n >\n <ng-content></ng-content>\n </button>\n <ng-template #popupTemplate>\n <kendo-button-list\n #buttonList\n [id]=\"listId\"\n [data]=\"data\"\n [textField]=\"textField\"\n [itemTemplate]=\"itemTemplate\"\n (onItemClick)=\"onItemClick($event)\"\n (keydown)=\"keyDownHandler($event)\"\n (keypress)=\"keyPressHandler($event)\"\n (keyup)=\"keyUpHandler($event)\"\n [attr.dir]=\"dir\"\n >\n </kendo-button-list>\n </ng-template>\n <ng-container #container></ng-container>\n "
691
+ template: "\n <button kendoButton #button\n role=\"menu\"\n type=\"button\"\n [tabindex]=\"componentTabIndex\"\n [class.k-active]=\"active\"\n [disabled]=\"disabled\"\n [icon]=\"icon\"\n [iconClass]=\"iconClass\"\n [imageUrl]=\"imageUrl\"\n [ngClass]=\"buttonClass\"\n [size]=\"size\"\n [shape]=\"shape\"\n [rounded]=\"rounded\"\n [fillMode]=\"fillMode\"\n [themeColor]=\"fillMode ? themeColor : null\"\n (click)=\"openPopup()\"\n (focus)=\"handleFocus()\"\n (blur)=\"onButtonBlur()\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-expanded]=\"openState\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-owns]=\"listId\"\n >\n <ng-content></ng-content>\n </button>\n <ng-template #popupTemplate>\n <kendo-button-list\n #buttonList\n [id]=\"listId\"\n [data]=\"data\"\n [textField]=\"textField\"\n [itemTemplate]=\"itemTemplate\"\n (onItemClick)=\"onItemClick($event)\"\n (keydown)=\"keyDownHandler($event)\"\n (keypress)=\"keyPressHandler($event)\"\n (keyup)=\"keyUpHandler($event)\"\n [attr.dir]=\"dir\"\n [size]=\"size\"\n >\n </kendo-button-list>\n </ng-template>\n <ng-container #container></ng-container>\n "
639
692
  }),
640
693
  tslib_1.__metadata("design:paramtypes", [FocusService,
641
694
  NavigationService,
@@ -86,7 +86,7 @@ var DialItemComponent = /** @class */ (function () {
86
86
  ], DialItemComponent.prototype, "role", void 0);
87
87
  tslib_1.__decorate([
88
88
  HostBinding('attr.aria-disabled'),
89
- HostBinding('class.k-state-disabled'),
89
+ HostBinding('class.k-disabled'),
90
90
  tslib_1.__metadata("design:type", Boolean),
91
91
  tslib_1.__metadata("design:paramtypes", [])
92
92
  ], DialItemComponent.prototype, "disabledClass", null);