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

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 (82) hide show
  1. package/dist/cdn/js/kendo-angular-buttons.js +2 -2
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/button/button.directive.js +236 -89
  4. package/dist/es/button/button.service.js +1 -5
  5. package/dist/es/buttongroup/buttongroup.component.js +11 -60
  6. package/dist/es/chip/chip-list.component.js +57 -7
  7. package/dist/es/chip/chip.component.js +175 -86
  8. package/dist/es/{chip/models/chip-look.js → common/models/fillmode.js} +0 -0
  9. package/dist/es/{chip/models/type.js → common/models/rounded.js} +0 -0
  10. package/dist/{es2015/button-look.js → es/common/models/styling-classes.js} +0 -0
  11. package/dist/es/{button-look.js → common/models.js} +0 -0
  12. package/dist/es/dropdownbutton/dropdownbutton.component.js +89 -36
  13. package/dist/es/floatingactionbutton/dial-item.component.js +1 -1
  14. package/dist/es/floatingactionbutton/floatingactionbutton.component.js +66 -41
  15. package/dist/es/focusable/focusable.directive.js +4 -4
  16. package/dist/es/listbutton/list-button.js +4 -1
  17. package/dist/es/listbutton/list.component.js +20 -1
  18. package/dist/es/package-metadata.js +1 -1
  19. package/dist/es/splitbutton/splitbutton.component.js +107 -37
  20. package/dist/es/util.js +52 -0
  21. package/dist/es2015/button/button.directive.d.ts +85 -22
  22. package/dist/es2015/button/button.directive.js +219 -85
  23. package/dist/es2015/button/button.service.d.ts +1 -4
  24. package/dist/es2015/button/button.service.js +1 -5
  25. package/dist/es2015/buttongroup/buttongroup.component.d.ts +0 -15
  26. package/dist/es2015/buttongroup/buttongroup.component.js +11 -48
  27. package/dist/es2015/chip/chip-list.component.d.ts +19 -3
  28. package/dist/es2015/chip/chip-list.component.js +52 -7
  29. package/dist/es2015/chip/chip.component.d.ts +67 -32
  30. package/dist/es2015/chip/chip.component.js +186 -97
  31. package/dist/es2015/common/models/fillmode.d.ts +12 -0
  32. package/dist/es2015/{chip/models/type.js → common/models/fillmode.js} +0 -0
  33. package/dist/es2015/common/models/rounded.d.ts +12 -0
  34. package/dist/es2015/common/models/rounded.js +4 -0
  35. package/dist/es2015/common/models/shape.d.ts +2 -9
  36. package/dist/es2015/common/models/size.d.ts +9 -6
  37. package/dist/es2015/common/models/styling-classes.d.ts +11 -0
  38. package/dist/es2015/common/models/styling-classes.js +4 -0
  39. package/dist/es2015/common/models/theme-color.d.ts +15 -4
  40. package/dist/es2015/common/models.d.ts +10 -0
  41. package/dist/es2015/{chip/models/chip-look.js → common/models.js} +0 -0
  42. package/dist/es2015/dropdownbutton/dropdownbutton.component.d.ts +59 -7
  43. package/dist/es2015/dropdownbutton/dropdownbutton.component.js +92 -31
  44. package/dist/es2015/floatingactionbutton/dial-item.component.js +1 -1
  45. package/dist/es2015/floatingactionbutton/floatingactionbutton.component.d.ts +28 -21
  46. package/dist/es2015/floatingactionbutton/floatingactionbutton.component.js +62 -42
  47. package/dist/es2015/focusable/focusable.directive.js +4 -4
  48. package/dist/es2015/index.metadata.json +1 -1
  49. package/dist/es2015/listbutton/list-button.js +4 -1
  50. package/dist/es2015/listbutton/list.component.d.ts +3 -0
  51. package/dist/es2015/listbutton/list.component.js +37 -20
  52. package/dist/es2015/main.d.ts +4 -4
  53. package/dist/es2015/package-metadata.js +1 -1
  54. package/dist/es2015/splitbutton/splitbutton.component.d.ts +59 -12
  55. package/dist/es2015/splitbutton/splitbutton.component.js +113 -33
  56. package/dist/es2015/util.d.ts +21 -0
  57. package/dist/es2015/util.js +52 -0
  58. package/dist/fesm2015/index.js +862 -409
  59. package/dist/fesm5/index.js +853 -405
  60. package/dist/npm/button/button.directive.js +236 -89
  61. package/dist/npm/button/button.service.js +0 -4
  62. package/dist/npm/buttongroup/buttongroup.component.js +11 -60
  63. package/dist/npm/chip/chip-list.component.js +55 -5
  64. package/dist/npm/chip/chip.component.js +173 -84
  65. package/dist/npm/{chip/models/chip-look.js → common/models/fillmode.js} +0 -0
  66. package/dist/npm/{chip/models/type.js → common/models/rounded.js} +0 -0
  67. package/dist/npm/common/models/styling-classes.js +6 -0
  68. package/dist/npm/{button-look.js → common/models.js} +0 -0
  69. package/dist/npm/dropdownbutton/dropdownbutton.component.js +89 -36
  70. package/dist/npm/floatingactionbutton/dial-item.component.js +1 -1
  71. package/dist/npm/floatingactionbutton/floatingactionbutton.component.js +66 -41
  72. package/dist/npm/focusable/focusable.directive.js +4 -4
  73. package/dist/npm/listbutton/list-button.js +4 -1
  74. package/dist/npm/listbutton/list.component.js +20 -1
  75. package/dist/npm/package-metadata.js +1 -1
  76. package/dist/npm/splitbutton/splitbutton.component.js +105 -35
  77. package/dist/npm/util.js +52 -0
  78. package/dist/systemjs/kendo-angular-buttons.js +1 -1
  79. package/package.json +13 -10
  80. package/dist/es2015/button-look.d.ts +0 -21
  81. package/dist/es2015/chip/models/chip-look.d.ts +0 -20
  82. 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 @@ let ChipComponent = class ChipComponent {
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,21 +44,90 @@ let ChipComponent = class ChipComponent {
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
- get ariaChecked() {
70
- return this.selected;
55
+ /**
56
+ * The size property specifies the height, padding and line height of the Chip
57
+ * ([see example]({% slug appearance_chip %}#toc-size)).
58
+ *
59
+ * The possible values are:
60
+ * * `'small'`
61
+ * * `'medium'` (default)
62
+ * * `'large'`
63
+ * * `null`
64
+ */
65
+ set size(size) {
66
+ this.handleClasses(size, 'size');
67
+ this._size = size;
68
+ }
69
+ get size() {
70
+ return this._size;
71
+ }
72
+ /**
73
+ * The rounded property specifies the border radius of the Chip
74
+ * ([see example]({% slug appearance_chip %}#toc-rounded)).
75
+ *
76
+ * The possible values are:
77
+ * * `'small'`
78
+ * * `'medium'` (default)
79
+ * * `'large'`
80
+ * * `'full'`
81
+ * * `null`
82
+ */
83
+ set rounded(rounded) {
84
+ this.handleClasses(rounded, 'rounded');
85
+ this._rounded = rounded;
86
+ }
87
+ get rounded() {
88
+ return this._rounded;
89
+ }
90
+ /**
91
+ * The fillMode property specifies the background and border styles of the Chip
92
+ * ([see example]({% slug appearance_chip %}#toc-fillMode)).
93
+ *
94
+ * The possible values are:
95
+ * * `'solid'` (default)
96
+ * * `'outline'`
97
+ * * `null`
98
+ */
99
+ set fillMode(fillMode) {
100
+ this.handleClasses(fillMode, 'fillMode');
101
+ this._fillMode = fillMode;
102
+ }
103
+ get fillMode() {
104
+ return this._fillMode;
105
+ }
106
+ /**
107
+ * The Chip allows you to specify predefined theme colors.
108
+ * The theme color will be applied as a background and border color while also amending the text color accordingly
109
+ * ([see example]({% slug appearance_chip %}#toc-themeColor)).
110
+ *
111
+ * The possible values are:
112
+ * * `'base'` (default)
113
+ * * `'info'`
114
+ * * `'success'`
115
+ * * `'warning'`
116
+ * * `'error'`
117
+ * * `null`
118
+ */
119
+ set themeColor(themeColor) {
120
+ this.handleThemeColor(themeColor);
121
+ this._themeColor = themeColor;
71
122
  }
72
- get outlineClass() {
73
- return this.look === 'outline' || this.look === 'outlined';
123
+ get themeColor() {
124
+ return this._themeColor;
74
125
  }
75
- get solidClass() {
76
- return this.look === 'solid' || this.look === 'filled';
126
+ get ariaChecked() {
127
+ return this.selected;
77
128
  }
78
129
  get hasIconClass() {
79
- return this.icon || this.iconClass ? true : false;
130
+ return this.icon || this.iconClass || this.avatarClass ? true : false;
80
131
  }
81
132
  get disabledClass() {
82
133
  return this.disabled;
@@ -101,54 +152,41 @@ let ChipComponent = class ChipComponent {
101
152
  }
102
153
  ngAfterViewInit() {
103
154
  const chip = this.element.nativeElement;
104
- const typeClass = this.typeClass();
105
- if (this.type !== 'none') {
106
- this.renderer.addClass(chip, typeClass);
107
- }
155
+ const stylingOptions = ['size', 'rounded', 'fillMode'];
156
+ stylingOptions.forEach(input => {
157
+ this.handleClasses(this[input], input);
158
+ });
108
159
  this.attachElementEventHandlers(chip);
109
160
  }
110
161
  /**
111
162
  * @hidden
112
163
  */
113
- get iconClasses() {
114
- const classes = [];
115
- if (this.iconClass) {
116
- classes.push(`${this.iconClass}`);
117
- }
118
- if (this.icon) {
119
- classes.push(`k-icon k-i-${this.icon}`);
120
- }
121
- return classes;
164
+ get kendoIconClass() {
165
+ this.verifyIconSettings([this.iconClass, this.avatarClass]);
166
+ return `k-i-${this.icon}`;
122
167
  }
123
168
  /**
124
169
  * @hidden
125
170
  */
126
- get selectedIconClasses() {
127
- if (this.selectedIcon) {
128
- return `${this.selectedIcon}`;
129
- }
130
- return `k-icon k-i-check`;
171
+ get customIconClass() {
172
+ this.verifyIconSettings([this.icon, this.avatarClass]);
173
+ return `${this.iconClass}`;
131
174
  }
132
175
  /**
133
176
  * @hidden
134
177
  */
135
- get removeIconClasses() {
136
- if (this.removeIcon) {
137
- return `${this.removeIcon}`;
138
- }
139
- return `k-icon k-i-close-circle`;
178
+ get chipAvatarClass() {
179
+ this.verifyIconSettings([this.icon, this.iconClass]);
180
+ return `${this.avatarClass}`;
140
181
  }
141
182
  /**
142
183
  * @hidden
143
184
  */
144
- typeClass() {
145
- return {
146
- 'none': '',
147
- 'success': 'k-chip-success',
148
- 'warning': 'k-chip-warning',
149
- 'error': 'k-chip-error',
150
- 'info': 'k-chip-info'
151
- }[this.type];
185
+ get removeIconClass() {
186
+ if (this.removeIcon) {
187
+ return `${this.removeIcon}`;
188
+ }
189
+ return `k-i-close-circle`;
152
190
  }
153
191
  /**
154
192
  * Focuses the Chip component.
@@ -183,7 +221,7 @@ let ChipComponent = class ChipComponent {
183
221
  this.renderer.removeClass(chip, 'k-focus');
184
222
  });
185
223
  const contentClickListener = this.renderer.listen(chip, 'click', (e) => {
186
- const isRemoveClicked = closest(e.target, '.k-remove-icon');
224
+ const isRemoveClicked = closest(e.target, '.k-chip-remove-action');
187
225
  if (!isRemoveClicked) {
188
226
  this.ngZone.run(() => {
189
227
  this.contentClick.emit({ sender: this, originalEvent: e });
@@ -197,11 +235,43 @@ let ChipComponent = class ChipComponent {
197
235
  };
198
236
  });
199
237
  }
238
+ /**
239
+ * @hidden
240
+ */
241
+ verifyIconSettings(iconsToCheck) {
242
+ if (isDevMode()) {
243
+ if (iconsToCheck.filter(icon => icon !== null && icon !== undefined).length > 0) {
244
+ this.renderer.removeClass(this.element.nativeElement, 'k-chip-has-icon');
245
+ throw new Error('Invalid configuration: Having multiple icons is not supported. Only a single icon on a chip can be displayed.');
246
+ }
247
+ }
248
+ }
249
+ handleClasses(value, input) {
250
+ const elem = this.element.nativeElement;
251
+ const classes = getStylingClasses('chip', input, this[input], value);
252
+ if (input === 'fillMode') {
253
+ this.handleThemeColor(this.themeColor, this[input], value);
254
+ }
255
+ if (classes.toRemove) {
256
+ this.renderer.removeClass(elem, classes.toRemove);
257
+ }
258
+ if (classes.toAdd) {
259
+ this.renderer.addClass(elem, classes.toAdd);
260
+ }
261
+ }
262
+ handleThemeColor(value, prevFillMode, fillMode) {
263
+ const elem = this.element.nativeElement;
264
+ const removeFillMode = prevFillMode ? prevFillMode : this.fillMode;
265
+ const addFillMode = fillMode ? fillMode : this.fillMode;
266
+ const themeColorClass = getThemeColorClasses('chip', removeFillMode, addFillMode, this.themeColor, value);
267
+ this.renderer.removeClass(elem, themeColorClass.toRemove);
268
+ if (addFillMode !== null && fillMode !== null) {
269
+ if (themeColorClass.toAdd) {
270
+ this.renderer.addClass(elem, themeColorClass.toAdd);
271
+ }
272
+ }
273
+ }
200
274
  };
201
- tslib_1.__decorate([
202
- Input(),
203
- tslib_1.__metadata("design:type", String)
204
- ], ChipComponent.prototype, "look", void 0);
205
275
  tslib_1.__decorate([
206
276
  Input(),
207
277
  tslib_1.__metadata("design:type", String)
@@ -216,12 +286,12 @@ tslib_1.__decorate([
216
286
  ], ChipComponent.prototype, "iconClass", void 0);
217
287
  tslib_1.__decorate([
218
288
  Input(),
219
- tslib_1.__metadata("design:type", Boolean)
220
- ], ChipComponent.prototype, "selected", void 0);
289
+ tslib_1.__metadata("design:type", String)
290
+ ], ChipComponent.prototype, "avatarClass", void 0);
221
291
  tslib_1.__decorate([
222
292
  Input(),
223
- tslib_1.__metadata("design:type", String)
224
- ], ChipComponent.prototype, "selectedIcon", void 0);
293
+ tslib_1.__metadata("design:type", Boolean)
294
+ ], ChipComponent.prototype, "selected", void 0);
225
295
  tslib_1.__decorate([
226
296
  Input(),
227
297
  tslib_1.__metadata("design:type", Boolean)
@@ -230,14 +300,30 @@ tslib_1.__decorate([
230
300
  Input(),
231
301
  tslib_1.__metadata("design:type", String)
232
302
  ], ChipComponent.prototype, "removeIcon", void 0);
233
- tslib_1.__decorate([
234
- Input(),
235
- tslib_1.__metadata("design:type", String)
236
- ], ChipComponent.prototype, "type", void 0);
237
303
  tslib_1.__decorate([
238
304
  Input(),
239
305
  tslib_1.__metadata("design:type", Boolean)
240
306
  ], ChipComponent.prototype, "disabled", void 0);
307
+ tslib_1.__decorate([
308
+ Input(),
309
+ tslib_1.__metadata("design:type", String),
310
+ tslib_1.__metadata("design:paramtypes", [String])
311
+ ], ChipComponent.prototype, "size", null);
312
+ tslib_1.__decorate([
313
+ Input(),
314
+ tslib_1.__metadata("design:type", String),
315
+ tslib_1.__metadata("design:paramtypes", [String])
316
+ ], ChipComponent.prototype, "rounded", null);
317
+ tslib_1.__decorate([
318
+ Input(),
319
+ tslib_1.__metadata("design:type", String),
320
+ tslib_1.__metadata("design:paramtypes", [String])
321
+ ], ChipComponent.prototype, "fillMode", null);
322
+ tslib_1.__decorate([
323
+ Input(),
324
+ tslib_1.__metadata("design:type", String),
325
+ tslib_1.__metadata("design:paramtypes", [String])
326
+ ], ChipComponent.prototype, "themeColor", null);
241
327
  tslib_1.__decorate([
242
328
  Output(),
243
329
  tslib_1.__metadata("design:type", EventEmitter)
@@ -259,16 +345,6 @@ tslib_1.__decorate([
259
345
  HostBinding('class.k-chip'),
260
346
  tslib_1.__metadata("design:type", Boolean)
261
347
  ], ChipComponent.prototype, "hostClass", void 0);
262
- tslib_1.__decorate([
263
- HostBinding('class.k-chip-outline'),
264
- tslib_1.__metadata("design:type", Boolean),
265
- tslib_1.__metadata("design:paramtypes", [])
266
- ], ChipComponent.prototype, "outlineClass", null);
267
- tslib_1.__decorate([
268
- HostBinding('class.k-chip-solid'),
269
- tslib_1.__metadata("design:type", Boolean),
270
- tslib_1.__metadata("design:paramtypes", [])
271
- ], ChipComponent.prototype, "solidClass", null);
272
348
  tslib_1.__decorate([
273
349
  HostBinding('class.k-chip-has-icon'),
274
350
  tslib_1.__metadata("design:type", Boolean),
@@ -298,20 +374,27 @@ ChipComponent = tslib_1.__decorate([
298
374
  Component({
299
375
  selector: 'kendo-chip',
300
376
  template: `
301
- <span class="k-selected-icon-wrapper">
302
- <span *ngIf="selected"
303
- class="k-selected-icon"
304
- [ngClass]="selectedIconClasses"
305
- >
306
- </span>
377
+ <span
378
+ *ngIf="icon"
379
+ class="k-chip-icon k-icon"
380
+ [ngClass]="kendoIconClass"
381
+ >
307
382
  </span>
308
383
 
309
- <span *ngIf="icon || iconClass"
384
+ <span
385
+ *ngIf="iconClass"
310
386
  class="k-chip-icon"
311
- [ngClass]="iconClasses"
387
+ [ngClass]="customIconClass"
312
388
  >
313
389
  </span>
314
390
 
391
+ <span
392
+ *ngIf="avatarClass"
393
+ class="k-chip-avatar k-avatar k-rounded-full"
394
+ >
395
+ <span class="k-avatar-image" [ngClass]="chipAvatarClass"></span>
396
+ </span>
397
+
315
398
  <span class="k-chip-content">
316
399
  <span class="k-chip-label" *ngIf="label">
317
400
  {{ label }}
@@ -319,11 +402,17 @@ ChipComponent = tslib_1.__decorate([
319
402
  <ng-content *ngIf="!label"></ng-content>
320
403
  </span>
321
404
 
322
- <span *ngIf="removable"
323
- class="k-remove-icon"
324
- (click)="onRemoveClick($event)"
325
- >
326
- <span [ngClass]="removeIconClasses"></span>
405
+ <span class="k-chip-actions">
406
+ <span class="k-chip-action k-chip-remove-action"
407
+ *ngIf="removable"
408
+ (click)="onRemoveClick($event)"
409
+ >
410
+ <span
411
+ class="k-icon"
412
+ [ngClass]="removeIconClass"
413
+ >
414
+ </span>
415
+ </span>
327
416
  </span>
328
417
  `,
329
418
  providers: [
@@ -0,0 +1,12 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ /**
6
+ * Represents the possible fillMode options of the buttons.
7
+ */
8
+ export declare type ButtonFillMode = 'solid' | 'flat' | 'outline' | 'link' | 'clear';
9
+ /**
10
+ * Represents the possible fillMode options of the Chip.
11
+ */
12
+ export declare type ChipFillMode = 'solid' | 'outline';
@@ -0,0 +1,12 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ /**
6
+ * Represents the possible rounded options of the buttons.
7
+ */
8
+ export declare type ButtonRounded = 'small' | 'medium' | 'large' | 'full';
9
+ /**
10
+ * Represents the possible rounded options of the Chip.
11
+ */
12
+ export declare type ChipRounded = 'small' | 'medium' | 'large' | 'full';
@@ -0,0 +1,4 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
@@ -3,14 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
6
- * Specifies the shape of the Button.
7
- *
8
- * The possible values are:
9
- * * `pill`
10
- * * `circle`
11
- * * `rounded`
12
- * * `rectangle`
13
- * * `square`
6
+ * Represents the possible shapes of the buttons.
14
7
  *
15
8
  */
16
- export declare type ButtonShape = 'pill' | 'circle' | 'rounded' | 'rectangle' | 'square';
9
+ export declare type ButtonShape = 'rectangle' | 'square';
@@ -3,12 +3,15 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
6
- * Specifies the size of the Button.
7
- *
8
- * The possible values are:
9
- * * `small`
10
- * * `medium`
11
- * * `large`
6
+ * Specifies the possible sizes of the buttons.
12
7
  *
13
8
  */
14
9
  export declare type ButtonSize = 'small' | 'medium' | 'large';
10
+ /**
11
+ * Specifies the possible sizes of the Chip.
12
+ */
13
+ export declare type ChipSize = 'small' | 'medium' | 'large';
14
+ /**
15
+ * Specifies the possible gap between Chips in a ChipList.
16
+ */
17
+ export declare type ChipListSize = 'small' | 'medium' | 'large';
@@ -0,0 +1,11 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ /**
6
+ * @hidden
7
+ */
8
+ export interface ButtonStylingClasses {
9
+ toRemove?: string;
10
+ toAdd?: string;
11
+ }
@@ -0,0 +1,4 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
@@ -3,13 +3,13 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
6
- * Specifies the theme color of the Button.
6
+ * Specifies the possible theme colors of the buttons.
7
7
  *
8
8
  * The possible values are:
9
- * * `primary` (Default)&mdash;Applies coloring based on the `primary` theme color.
9
+ * * `base` &mdash;Applies coloring based on the `base` theme color.
10
+ * * `primary` &mdash;Applies coloring based on the `primary` theme color.
10
11
  * * `secondary`&mdash;Applies coloring based on the `secondary` theme color.
11
12
  * * `tertiary`&mdash; Applies coloring based on the `tertiary` theme color.
12
- * * `inherit`&mdash; Applies inherited coloring value.
13
13
  * * `info`&mdash;Applies coloring based on the `info` theme color.
14
14
  * * `success`&mdash; Applies coloring based on the `success` theme color.
15
15
  * * `warning`&mdash; Applies coloring based on the `warning` theme color.
@@ -19,4 +19,15 @@
19
19
  * * `inverse`&mdash; Applies coloring based on the `inverse` theme color.
20
20
  *
21
21
  */
22
- export declare type ButtonThemeColor = 'primary' | 'secondary' | 'tertiary' | 'inherit' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inverse';
22
+ export declare type ButtonThemeColor = 'base' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inverse';
23
+ /**
24
+ * Specifies the possible theme colors of the Chip.
25
+ *
26
+ * The possible values are:
27
+ * * `base` &mdash;Applies coloring based on the `base` theme color.
28
+ * * `info`&mdash;Applies coloring based on the `info` theme color.
29
+ * * `success`&mdash; Applies coloring based on the `success` theme color.
30
+ * * `warning`&mdash; Applies coloring based on the `warning` theme color.
31
+ * * `error`&mdash; Applies coloring based on the `error` theme color.
32
+ */
33
+ export declare type ChipThemeColor = 'base' | 'info' | 'success' | 'warning' | 'error';
@@ -0,0 +1,10 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ export * from './models/shape';
6
+ export * from './models/size';
7
+ export * from './models/theme-color';
8
+ export * from './models/fillmode';
9
+ export * from './models/rounded';
10
+ export * from './models/styling-classes';
@@ -13,7 +13,7 @@ import { ListComponent } from '../listbutton/list.component';
13
13
  import { FocusService } from '../focusable/focus.service';
14
14
  import { NavigationService } from '../navigation/navigation.service';
15
15
  import { PreventableEvent } from '../preventable-event';
16
- import { ButtonLook } from '../button-look';
16
+ import { ButtonFillMode, ButtonRounded, ButtonSize, ButtonThemeColor, ButtonShape } from '../common/models';
17
17
  /**
18
18
  * Represents the Kendo UI DropDownButton component for Angular.
19
19
  *
@@ -83,17 +83,70 @@ export declare class DropDownButtonComponent extends ListButton implements OnCha
83
83
  */
84
84
  data: any;
85
85
  /**
86
- * Adds visual weight to the default button and makes it primary.
86
+ * The size property specifies the width and height of the DropDownButton
87
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-size)).
88
+ *
89
+ * The possible values are:
90
+ * * `'small'`
91
+ * * `'medium'` (default)
92
+ * * `'large'`
93
+ * * `null`
87
94
  */
88
- primary: boolean;
95
+ size: ButtonSize;
89
96
  /**
90
- * Changes the visual appearance by using alternative styling options.
97
+ * The shape property specifies if the DropDownButton will be a square or rectangle.
98
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-shape)).
99
+ *
100
+ * The possible values are:
101
+ * * `'rectangle'` (default)
102
+ * * `'square'`
103
+ * * `null`
104
+ */
105
+ shape: ButtonShape;
106
+ /**
107
+ * The rounded property specifies the border radius of the DropDownButton
108
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-rounded)).
109
+ *
110
+ * The possible values are:
111
+ * * `'small'`
112
+ * * `'medium'` (default)
113
+ * * `'large'`
114
+ * * `'full'`
115
+ * * `null`
116
+ */
117
+ rounded: ButtonRounded;
118
+ /**
119
+ * The fillMode property specifies the background and border styles of the DropDownButton
120
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-fillMode)).
91
121
  *
92
122
  * The available values are:
123
+ * * `solid` (default)
93
124
  * * `flat`
94
125
  * * `outline`
126
+ * * `link`
127
+ * * `null`
95
128
  */
96
- look: ButtonLook;
129
+ fillMode: ButtonFillMode;
130
+ /**
131
+ * The DropDownButton allows you to specify predefined theme colors.
132
+ * The theme color will be applied as a background and border color while also amending the text color accordingly
133
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-themeColor)).
134
+ *
135
+ * The possible values are:
136
+ * * `base` &mdash;Applies coloring based on the `base` theme color. (default)
137
+ * * `primary` &mdash;Applies coloring based on the `primary` theme color.
138
+ * * `secondary`&mdash;Applies coloring based on the `secondary` theme color.
139
+ * * `tertiary`&mdash; Applies coloring based on the `tertiary` theme color.
140
+ * * `info`&mdash;Applies coloring based on the `info` theme color.
141
+ * * `success`&mdash; Applies coloring based on the `success` theme color.
142
+ * * `warning`&mdash; Applies coloring based on the `warning` theme color.
143
+ * * `error`&mdash; Applies coloring based on the `error` theme color.
144
+ * * `dark`&mdash; Applies coloring based on the `dark` theme color.
145
+ * * `light`&mdash; Applies coloring based on the `light` theme color.
146
+ * * `inverse`&mdash; Applies coloring based on the `inverse` theme color.
147
+ * * `null` &mdash;Removes the default CSS class (no class would be rendered).
148
+ */
149
+ themeColor: ButtonThemeColor;
97
150
  /**
98
151
  * The CSS classes that will be rendered on the main button.
99
152
  * Supports the type of values that are supported by [`ngClass`]({{ site.data.urls.angular['ngclassapi'] }}).
@@ -138,8 +191,6 @@ export declare class DropDownButtonComponent extends ListButton implements OnCha
138
191
  */
139
192
  onBlur: EventEmitter<any>;
140
193
  readonly focused: boolean;
141
- readonly isFlat: boolean;
142
- readonly isOutline: boolean;
143
194
  readonly widgetClasses: boolean;
144
195
  readonly dir: Direction;
145
196
  /**
@@ -153,6 +204,7 @@ export declare class DropDownButtonComponent extends ListButton implements OnCha
153
204
  container: ViewContainerRef;
154
205
  popupRef: PopupRef;
155
206
  listId: string;
207
+ private _fillMode;
156
208
  /**
157
209
  * @hidden
158
210
  */