@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
@@ -0,0 +1,6 @@
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
+ "use strict";
6
+ Object.defineProperty(exports, "__esModule", { value: true });
File without changes
@@ -75,17 +75,58 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
75
75
  */
76
76
  _this.imageUrl = '';
77
77
  /**
78
- * Adds visual weight to the default button and makes it primary.
78
+ * The size property specifies the width and height of the DropDownButton
79
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-size)).
80
+ *
81
+ * The possible values are:
82
+ * * `'small'`
83
+ * * `'medium'` (default)
84
+ * * `'large'`
85
+ * * `null`
79
86
  */
80
- _this.primary = false;
87
+ _this.size = 'medium';
81
88
  /**
82
- * Changes the visual appearance by using alternative styling options.
89
+ * The shape property specifies if the DropDownButton will be a square or rectangle.
90
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-shape)).
83
91
  *
84
- * The available values are:
85
- * * `flat`
86
- * * `outline`
92
+ * The possible values are:
93
+ * * `'rectangle'` (default)
94
+ * * `'square'`
95
+ * * `null`
96
+ */
97
+ _this.shape = 'rectangle';
98
+ /**
99
+ * The rounded property specifies the border radius of the DropDownButton
100
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-rounded)).
101
+ *
102
+ * The possible values are:
103
+ * * `'small'`
104
+ * * `'medium'` (default)
105
+ * * `'large'`
106
+ * * `'full'`
107
+ * * `null`
108
+ */
109
+ _this.rounded = 'medium';
110
+ /**
111
+ * The DropDownButton allows you to specify predefined theme colors.
112
+ * The theme color will be applied as a background and border color while also amending the text color accordingly
113
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-themeColor)).
114
+ *
115
+ * The possible values are:
116
+ * * `base` —Applies coloring based on the `base` theme color. (default)
117
+ * * `primary` —Applies coloring based on the `primary` theme color.
118
+ * * `secondary`—Applies coloring based on the `secondary` theme color.
119
+ * * `tertiary`— Applies coloring based on the `tertiary` theme color.
120
+ * * `info`—Applies coloring based on the `info` theme color.
121
+ * * `success`— Applies coloring based on the `success` theme color.
122
+ * * `warning`— Applies coloring based on the `warning` theme color.
123
+ * * `error`— Applies coloring based on the `error` theme color.
124
+ * * `dark`— Applies coloring based on the `dark` theme color.
125
+ * * `light`— Applies coloring based on the `light` theme color.
126
+ * * `inverse`— Applies coloring based on the `inverse` theme color.
127
+ * * `null` —Removes the default CSS class (no class would be rendered).
87
128
  */
88
- _this.look = 'default';
129
+ _this.themeColor = 'base';
89
130
  /**
90
131
  * Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
91
132
  */
@@ -113,6 +154,7 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
113
154
  */
114
155
  _this.onBlur = new core_1.EventEmitter(); //tslint:disable-line:no-output-rename
115
156
  _this.listId = kendo_angular_common_1.guid();
157
+ _this._fillMode = 'solid';
116
158
  _this._itemClick = _this.itemClick;
117
159
  _this._blur = _this.onBlur;
118
160
  return _this;
@@ -167,6 +209,28 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
167
209
  enumerable: true,
168
210
  configurable: true
169
211
  });
212
+ Object.defineProperty(DropDownButtonComponent.prototype, "fillMode", {
213
+ get: function () {
214
+ return this._fillMode;
215
+ },
216
+ /**
217
+ * The fillMode property specifies the background and border styles of the DropDownButton
218
+ * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-fillMode)).
219
+ *
220
+ * The available values are:
221
+ * * `solid` (default)
222
+ * * `flat`
223
+ * * `outline`
224
+ * * `link`
225
+ * * `null`
226
+ */
227
+ set: function (fillMode) {
228
+ // Temporary workaround for missing 'clear' styles
229
+ this._fillMode = fillMode === 'clear' ? 'flat' : fillMode;
230
+ },
231
+ enumerable: true,
232
+ configurable: true
233
+ });
170
234
  Object.defineProperty(DropDownButtonComponent.prototype, "openState", {
171
235
  /**
172
236
  * @hidden
@@ -224,20 +288,6 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
224
288
  enumerable: true,
225
289
  configurable: true
226
290
  });
227
- Object.defineProperty(DropDownButtonComponent.prototype, "isFlat", {
228
- get: function () {
229
- return this.look === 'flat';
230
- },
231
- enumerable: true,
232
- configurable: true
233
- });
234
- Object.defineProperty(DropDownButtonComponent.prototype, "isOutline", {
235
- get: function () {
236
- return this.look === 'outline';
237
- },
238
- enumerable: true,
239
- configurable: true
240
- });
241
291
  Object.defineProperty(DropDownButtonComponent.prototype, "widgetClasses", {
242
292
  get: function () {
243
293
  return true;
@@ -515,12 +565,25 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
515
565
  ], DropDownButtonComponent.prototype, "data", null);
516
566
  tslib_1.__decorate([
517
567
  core_1.Input(),
518
- tslib_1.__metadata("design:type", Boolean)
519
- ], DropDownButtonComponent.prototype, "primary", void 0);
568
+ tslib_1.__metadata("design:type", String)
569
+ ], DropDownButtonComponent.prototype, "size", void 0);
570
+ tslib_1.__decorate([
571
+ core_1.Input(),
572
+ tslib_1.__metadata("design:type", String)
573
+ ], DropDownButtonComponent.prototype, "shape", void 0);
574
+ tslib_1.__decorate([
575
+ core_1.Input(),
576
+ tslib_1.__metadata("design:type", String)
577
+ ], DropDownButtonComponent.prototype, "rounded", void 0);
578
+ tslib_1.__decorate([
579
+ core_1.Input(),
580
+ tslib_1.__metadata("design:type", String),
581
+ tslib_1.__metadata("design:paramtypes", [String])
582
+ ], DropDownButtonComponent.prototype, "fillMode", null);
520
583
  tslib_1.__decorate([
521
584
  core_1.Input(),
522
585
  tslib_1.__metadata("design:type", String)
523
- ], DropDownButtonComponent.prototype, "look", void 0);
586
+ ], DropDownButtonComponent.prototype, "themeColor", void 0);
524
587
  tslib_1.__decorate([
525
588
  core_1.Input(),
526
589
  tslib_1.__metadata("design:type", Object)
@@ -550,20 +613,10 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
550
613
  tslib_1.__metadata("design:type", core_1.EventEmitter)
551
614
  ], DropDownButtonComponent.prototype, "onBlur", void 0);
552
615
  tslib_1.__decorate([
553
- core_1.HostBinding('class.k-state-focused'),
616
+ core_1.HostBinding('class.k-focus'),
554
617
  tslib_1.__metadata("design:type", Boolean),
555
618
  tslib_1.__metadata("design:paramtypes", [])
556
619
  ], DropDownButtonComponent.prototype, "focused", null);
557
- tslib_1.__decorate([
558
- core_1.HostBinding('class.k-flat'),
559
- tslib_1.__metadata("design:type", Boolean),
560
- tslib_1.__metadata("design:paramtypes", [])
561
- ], DropDownButtonComponent.prototype, "isFlat", null);
562
- tslib_1.__decorate([
563
- core_1.HostBinding('class.k-outline'),
564
- tslib_1.__metadata("design:type", Boolean),
565
- tslib_1.__metadata("design:paramtypes", [])
566
- ], DropDownButtonComponent.prototype, "isOutline", null);
567
620
  tslib_1.__decorate([
568
621
  core_1.HostBinding('class.k-dropdown-button'),
569
622
  tslib_1.__metadata("design:type", Boolean),
@@ -638,7 +691,7 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
638
691
  }
639
692
  ],
640
693
  selector: 'kendo-dropdownbutton',
641
- 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 "
694
+ 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 "
642
695
  }),
643
696
  tslib_1.__metadata("design:paramtypes", [focus_service_1.FocusService,
644
697
  navigation_service_1.NavigationService,
@@ -88,7 +88,7 @@ var DialItemComponent = /** @class */ (function () {
88
88
  ], DialItemComponent.prototype, "role", void 0);
89
89
  tslib_1.__decorate([
90
90
  core_1.HostBinding('attr.aria-disabled'),
91
- core_1.HostBinding('class.k-state-disabled'),
91
+ core_1.HostBinding('class.k-disabled'),
92
92
  tslib_1.__metadata("design:type", Boolean),
93
93
  tslib_1.__metadata("design:paramtypes", [])
94
94
  ], DialItemComponent.prototype, "disabledClass", null);
@@ -39,12 +39,16 @@ var SIZE_CLASSES = {
39
39
  large: 'k-fab-lg'
40
40
  };
41
41
  var SHAPE_CLASSES = {
42
- pill: 'k-fab-pill',
43
- circle: 'k-fab-circle',
44
42
  rectangle: 'k-fab-rectangle',
45
- square: 'k-fab-square',
46
- rounded: 'k-fab-rounded'
43
+ square: 'k-fab-square'
47
44
  };
45
+ var ROUNDED_CLASSES = {
46
+ small: 'k-rounded-sm',
47
+ medium: 'k-rounded-md',
48
+ large: 'k-rounded-lg',
49
+ full: 'k-rounded-full'
50
+ };
51
+ var FILLMODE_CLASS = 'k-fab-solid';
48
52
  var DEFAULT_DURATION = 180;
49
53
  var DEFAULT_ITEM_GAP = 90;
50
54
  var DEFAULT_OFFSET = '16px';
@@ -125,13 +129,15 @@ var FloatingActionButtonComponent = /** @class */ (function () {
125
129
  this.id = "k-" + kendo_angular_common_1.guid();
126
130
  this._themeColor = 'primary';
127
131
  this._size = 'medium';
128
- this._shape = 'pill';
132
+ this._shape = 'rectangle';
129
133
  this._disabled = false;
130
134
  this._align = { horizontal: 'end', vertical: 'bottom' };
131
135
  this._offset = { x: DEFAULT_OFFSET, y: DEFAULT_OFFSET };
136
+ this._rounded = 'full';
132
137
  this.subscriptions = new rxjs_1.Subscription();
133
138
  this.rtl = false;
134
139
  this.animationEnd = new core_1.EventEmitter();
140
+ this.initialSetup = true;
135
141
  kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
136
142
  this.subscribeNavigationEvents();
137
143
  this.subscriptions.add(this.localizationService.changes.subscribe(function (_a) {
@@ -164,18 +170,16 @@ var FloatingActionButtonComponent = /** @class */ (function () {
164
170
  * The theme color will be applied as background color of the component.
165
171
  *
166
172
  * The possible values are:
167
- * * `primary` (Default)&mdash;Applies coloring based on the `primary` theme color.
168
- * * `secondary`&mdash;Applies coloring based on the `secondary` theme color.
169
- * * `tertiary`&mdash; Applies coloring based on the `tertiary` theme color.
170
- * * `inherit`&mdash; Applies inherited coloring value.
171
- * * `info`&mdash;Applies coloring based on the `info` theme color.
172
- * * `success`&mdash; Applies coloring based on the `success` theme color.
173
- * * `warning`&mdash; Applies coloring based on the `warning` theme color.
174
- * * `error`&mdash; Applies coloring based on the `error` theme color.
175
- * * `dark`&mdash; Applies coloring based on the `dark` theme color.
176
- * * `light`&mdash; Applies coloring based on the `light` theme color.
177
- * * `inverse`&mdash; Applies coloring based on the `inverse` theme color.
178
- *
173
+ * * `'primary'` (Default)&mdash;Applies coloring based on the `primary` theme color.
174
+ * * `'secondary'`&mdash;Applies coloring based on the `secondary` theme color.
175
+ * * `'tertiary'`&mdash; Applies coloring based on the `tertiary` theme color.
176
+ * * `'info'`&mdash;Applies coloring based on the `info` theme color.
177
+ * * `'success'`&mdash; Applies coloring based on the `success` theme color.
178
+ * * `'warning'`&mdash; Applies coloring based on the `warning` theme color.
179
+ * * `'error'`&mdash; Applies coloring based on the `error` theme color.
180
+ * * `'dark'`&mdash; Applies coloring based on the `dark` theme color.
181
+ * * `'light'`&mdash; Applies coloring based on the `light` theme color.
182
+ * * `'inverse'`&mdash; Applies coloring based on the `inverse` theme color.
179
183
  */
180
184
  set: function (themeColor) {
181
185
  this.handleClasses(themeColor, 'themeColor');
@@ -193,10 +197,9 @@ var FloatingActionButtonComponent = /** @class */ (function () {
193
197
  * ([see example]({% slug appearance_floatingactionbutton %}#toc-size)).
194
198
  *
195
199
  * The possible values are:
196
- * * `small`
197
- * * `medium` (Default)
198
- * * `large`
199
- *
200
+ * * `'small'`
201
+ * * `'medium'` (Default)
202
+ * * `'large'`
200
203
  */
201
204
  set: function (size) {
202
205
  this.handleClasses(size, 'size');
@@ -205,6 +208,27 @@ var FloatingActionButtonComponent = /** @class */ (function () {
205
208
  enumerable: true,
206
209
  configurable: true
207
210
  });
211
+ Object.defineProperty(FloatingActionButtonComponent.prototype, "rounded", {
212
+ get: function () {
213
+ return this._rounded;
214
+ },
215
+ /**
216
+ * The rounded property specifies the border radius of the FloatingActionButton.
217
+ *
218
+ * The possible values are:
219
+ * * `'small'`
220
+ * * `'medium'`
221
+ * * `'large'`
222
+ * * `'full'` (default)
223
+ * * `null`
224
+ */
225
+ set: function (rounded) {
226
+ this.handleClasses(rounded, 'rounded');
227
+ this._rounded = rounded;
228
+ },
229
+ enumerable: true,
230
+ configurable: true
231
+ });
208
232
  Object.defineProperty(FloatingActionButtonComponent.prototype, "shape", {
209
233
  get: function () {
210
234
  return this._shape;
@@ -214,10 +238,7 @@ var FloatingActionButtonComponent = /** @class */ (function () {
214
238
  * ([see example]({% slug appearance_floatingactionbutton %}#toc-shape)).
215
239
  *
216
240
  * The possible values are:
217
- * * `pill` (Default)&mdash;Applies border radius equal to half of the height of the FloatingActionButton.
218
- * * `circle`&mdash;Applies circle shape on the FloatingActionButton.
219
- * * `rectangle`&mdash;Applies rectangular shape on the FloatingActionButton.
220
- * * `rounded`&mdash;Applies rounded shape on the FloatingActionButton.
241
+ * * `rectangle` (Default)&mdash;Applies rectangular shape on the FloatingActionButton.
221
242
  * * `square`&mdash;Applies square shape on the FloatingActionButton.
222
243
  *
223
244
  */
@@ -291,8 +312,11 @@ var FloatingActionButtonComponent = /** @class */ (function () {
291
312
  configurable: true
292
313
  });
293
314
  FloatingActionButtonComponent.prototype.ngAfterViewInit = function () {
294
- this.applyClasses();
315
+ var _this = this;
316
+ ['shape', 'size', 'rounded', 'themeColor'].forEach(function (option) { return _this.handleClasses(_this[option], option); });
317
+ this.renderer.addClass(this.element.nativeElement, this.alignClass());
295
318
  this.offsetStyles();
319
+ this.initialSetup = false;
296
320
  };
297
321
  FloatingActionButtonComponent.prototype.ngOnDestroy = function () {
298
322
  this.subscriptions.unsubscribe();
@@ -456,20 +480,24 @@ var FloatingActionButtonComponent = /** @class */ (function () {
456
480
  this.toggleDialWithEvents(false);
457
481
  };
458
482
  FloatingActionButtonComponent.prototype.handleClasses = function (inputValue, input) {
459
- if (util_1.isPresent(this.button) && (this[input] !== inputValue)) {
483
+ if (util_1.isPresent(this.button) && (this[input] !== inputValue || this.initialSetup)) {
460
484
  var button = this.button.nativeElement;
461
485
  var classesToRemove = {
462
- themeColor: "k-fab-" + this.themeColor,
486
+ themeColor: FILLMODE_CLASS + "-" + this.themeColor,
463
487
  size: SIZE_CLASSES[this.size],
464
- shape: SHAPE_CLASSES[this.shape]
488
+ shape: SHAPE_CLASSES[this.shape],
489
+ rounded: ROUNDED_CLASSES[this.rounded]
465
490
  };
466
491
  var classesToAdd = {
467
- themeColor: "k-fab-" + inputValue,
492
+ themeColor: inputValue ? FILLMODE_CLASS + "-" + inputValue : null,
468
493
  size: SIZE_CLASSES[inputValue],
469
- shape: SHAPE_CLASSES[inputValue]
494
+ shape: SHAPE_CLASSES[inputValue],
495
+ rounded: ROUNDED_CLASSES[inputValue]
470
496
  };
471
497
  this.renderer.removeClass(button, classesToRemove[input]);
472
- this.renderer.addClass(button, classesToAdd[input]);
498
+ if (classesToAdd[input]) {
499
+ this.renderer.addClass(button, classesToAdd[input]);
500
+ }
473
501
  }
474
502
  };
475
503
  FloatingActionButtonComponent.prototype.onEnterPressed = function () {
@@ -526,14 +554,6 @@ var FloatingActionButtonComponent = /** @class */ (function () {
526
554
  FloatingActionButtonComponent.prototype.alignClass = function () {
527
555
  return "k-pos-" + this.align.vertical + "-" + this.align.horizontal;
528
556
  };
529
- FloatingActionButtonComponent.prototype.applyClasses = function () {
530
- var hostElement = this.element.nativeElement;
531
- var button = this.button.nativeElement;
532
- this.renderer.addClass(button, SHAPE_CLASSES[this.shape]);
533
- this.renderer.addClass(button, "k-fab-" + this.themeColor);
534
- this.renderer.addClass(button, SIZE_CLASSES[this.size]);
535
- this.renderer.addClass(hostElement, this.alignClass());
536
- };
537
557
  FloatingActionButtonComponent.prototype.toggleDialWithEvents = function (open) {
538
558
  if (open === this.isOpen) {
539
559
  return;
@@ -775,6 +795,11 @@ var FloatingActionButtonComponent = /** @class */ (function () {
775
795
  tslib_1.__metadata("design:type", String),
776
796
  tslib_1.__metadata("design:paramtypes", [String])
777
797
  ], FloatingActionButtonComponent.prototype, "size", null);
798
+ tslib_1.__decorate([
799
+ core_1.Input(),
800
+ tslib_1.__metadata("design:type", String),
801
+ tslib_1.__metadata("design:paramtypes", [String])
802
+ ], FloatingActionButtonComponent.prototype, "rounded", null);
778
803
  tslib_1.__decorate([
779
804
  core_1.Input(),
780
805
  tslib_1.__metadata("design:type", String),
@@ -864,7 +889,7 @@ var FloatingActionButtonComponent = /** @class */ (function () {
864
889
  useValue: 'kendo.floatingactionbutton'
865
890
  }
866
891
  ],
867
- template: "\n <button\n #button\n [attr.id]=\"id\"\n [attr.role]=\"role\"\n [tabIndex]=\"componentTabIndex\"\n type=\"button\"\n [class.k-fab]=\"true\"\n [class.k-state-disabled]=\"disabled\"\n [ngClass]=\"buttonClass\"\n [disabled]=\"disabled\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-haspopup]=\"ariaHasPopup\"\n (focus)=\"focusHandler()\"\n (blur)=\"blurHandler()\"\n [kendoEventsOutsideAngular]=\"{\n keydown: keyDownHandler,\n click: clickHandler\n }\"\n [scope]=\"this\"\n >\n <ng-template *ngIf=\"fabTemplate\"\n [ngTemplateOutlet]=\"fabTemplate?.templateRef\"\n >\n </ng-template>\n\n <ng-container *ngIf=\"!fabTemplate\">\n <span *ngIf=\"icon || iconClass\" [ngClass]=\"iconClasses\"></span>\n <span *ngIf=\"text\" class=\"k-fab-text\">{{ text }}</span>\n </ng-container>\n </button>\n\n <ng-template #popupTemplate>\n <ul\n kendoDialList\n [ngClass]=\"dialClass\"\n [dialItems]=\"dialItems\"\n [dialItemTemplate]='dialItemTemplate?.templateRef'\n [align]=\"align\"\n [attr.aria-labelledby]=\"id\"\n (click)=\"onItemClick($event)\"\n >\n </ul>\n </ng-template>\n "
892
+ template: "\n <button\n #button\n [attr.id]=\"id\"\n [attr.role]=\"role\"\n [tabIndex]=\"componentTabIndex\"\n type=\"button\"\n class=\"k-fab k-fab-solid\"\n [class.k-disabled]=\"disabled\"\n [ngClass]=\"buttonClass\"\n [disabled]=\"disabled\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-haspopup]=\"ariaHasPopup\"\n (focus)=\"focusHandler()\"\n (blur)=\"blurHandler()\"\n [kendoEventsOutsideAngular]=\"{\n keydown: keyDownHandler,\n click: clickHandler\n }\"\n [scope]=\"this\"\n >\n <ng-template *ngIf=\"fabTemplate\"\n [ngTemplateOutlet]=\"fabTemplate?.templateRef\"\n >\n </ng-template>\n\n <ng-container *ngIf=\"!fabTemplate\">\n <span *ngIf=\"icon || iconClass\" [ngClass]=\"iconClasses\"></span>\n <span *ngIf=\"text\" class=\"k-fab-text\">{{ text }}</span>\n </ng-container>\n </button>\n\n <ng-template #popupTemplate>\n <ul\n kendoDialList\n [ngClass]=\"dialClass\"\n [dialItems]=\"dialItems\"\n [dialItemTemplate]='dialItemTemplate?.templateRef'\n [align]=\"align\"\n [attr.aria-labelledby]=\"id\"\n (click)=\"onItemClick($event)\"\n >\n </ul>\n </ng-template>\n "
868
893
  }),
869
894
  tslib_1.__metadata("design:paramtypes", [core_1.Renderer2,
870
895
  core_1.ElementRef,
@@ -20,10 +20,10 @@ var FocusableDirective = /** @class */ (function () {
20
20
  }
21
21
  FocusableDirective.prototype.ngOnInit = function () {
22
22
  if (this.index === this.focusService.focused) {
23
- this.renderer.addClass(this.element, 'k-state-focused');
23
+ this.renderer.addClass(this.element, 'k-focus');
24
24
  }
25
25
  else {
26
- this.renderer.removeClass(this.element, 'k-state-focused');
26
+ this.renderer.removeClass(this.element, 'k-focus');
27
27
  }
28
28
  };
29
29
  /**
@@ -39,11 +39,11 @@ var FocusableDirective = /** @class */ (function () {
39
39
  }
40
40
  this.focusSubscription = this.focusService.onFocus.subscribe(function (index) {
41
41
  if (_this.index === index) {
42
- _this.renderer.addClass(_this.element, 'k-state-focused');
42
+ _this.renderer.addClass(_this.element, 'k-focus');
43
43
  _this.element.focus();
44
44
  }
45
45
  else {
46
- _this.renderer.removeClass(_this.element, 'k-state-focused');
46
+ _this.renderer.removeClass(_this.element, 'k-focus');
47
47
  }
48
48
  });
49
49
  };
@@ -11,6 +11,8 @@ var key_events_1 = require("./../navigation/key-events");
11
11
  var navigation_action_1 = require("./../navigation/navigation-action");
12
12
  var kendo_angular_common_1 = require("@progress/kendo-angular-common");
13
13
  var util_1 = require("./../util");
14
+ var kendo_licensing_1 = require("@progress/kendo-licensing");
15
+ var package_metadata_1 = require("../package-metadata");
14
16
  /**
15
17
  * @hidden
16
18
  */
@@ -28,6 +30,7 @@ var ListButton = /** @class */ (function () {
28
30
  this._popupSettings = { animate: true, popupClass: '' };
29
31
  this.listId = kendo_angular_common_1.guid();
30
32
  this._isFocused = false;
33
+ kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
31
34
  this.focusService = focusService;
32
35
  this.navigationService = navigationService;
33
36
  this.wrapper = wrapperRef.nativeElement;
@@ -39,7 +42,7 @@ var ListButton = /** @class */ (function () {
39
42
  }
40
43
  Object.defineProperty(ListButton.prototype, "popupClasses", {
41
44
  get: function () {
42
- var popupClasses = ['k-list-container', 'k-reset', 'k-group'];
45
+ var popupClasses = ['k-menu-popup'];
43
46
  if (this._popupSettings.popupClass) {
44
47
  popupClasses.push(this._popupSettings.popupClass);
45
48
  }
@@ -9,6 +9,7 @@ var core_1 = require("@angular/core");
9
9
  var kendo_licensing_1 = require("@progress/kendo-licensing");
10
10
  var package_metadata_1 = require("../package-metadata");
11
11
  var button_item_template_directive_1 = require("./button-item-template.directive");
12
+ var util_1 = require("../util");
12
13
  /**
13
14
  * @hidden
14
15
  */
@@ -16,8 +17,21 @@ var ListComponent = /** @class */ (function () {
16
17
  function ListComponent() {
17
18
  this.onItemClick = new core_1.EventEmitter();
18
19
  this.onItemBlur = new core_1.EventEmitter();
20
+ this.sizeClass = '';
19
21
  kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
20
22
  }
23
+ Object.defineProperty(ListComponent.prototype, "size", {
24
+ set: function (size) {
25
+ if (size) {
26
+ this.sizeClass = "k-menu-group-" + util_1.SIZES[size];
27
+ }
28
+ else {
29
+ this.sizeClass = '';
30
+ }
31
+ },
32
+ enumerable: true,
33
+ configurable: true
34
+ });
21
35
  ListComponent.prototype.getText = function (dataItem) {
22
36
  if (dataItem) {
23
37
  return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
@@ -56,10 +70,15 @@ var ListComponent = /** @class */ (function () {
56
70
  core_1.Output(),
57
71
  tslib_1.__metadata("design:type", core_1.EventEmitter)
58
72
  ], ListComponent.prototype, "onItemBlur", void 0);
73
+ tslib_1.__decorate([
74
+ core_1.Input(),
75
+ tslib_1.__metadata("design:type", String),
76
+ tslib_1.__metadata("design:paramtypes", [String])
77
+ ], ListComponent.prototype, "size", null);
59
78
  ListComponent = tslib_1.__decorate([
60
79
  core_1.Component({
61
80
  selector: 'kendo-button-list',
62
- template: "\n <ul class=\"k-list k-reset\" unselectable=\"on\" role=\"menu\">\n <li role=\"menuitem\" unselectable=\"on\" tabindex=\"-1\"\n kendoButtonFocusable\n *ngFor=\"let dataItem of data; let index = index;\"\n [index]=\"index\"\n [ngClass]=\"{'k-item': true, 'k-state-disabled': dataItem.disabled}\"\n (click)=\"onClick(index)\"\n (blur)=\"onBlur()\"\n [attr.aria-disabled]=\"dataItem.disabled ? true : false\">\n <ng-template *ngIf=\"itemTemplate?.templateRef\"\n [templateContext]=\"{\n templateRef: itemTemplate?.templateRef,\n $implicit: dataItem\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!itemTemplate?.templateRef\">\n <span\n *ngIf=\"dataItem.icon || dataItem.iconClass\"\n [ngClass]=\"getIconClasses(dataItem)\"\n ></span>\n <img\n *ngIf=\"dataItem.imageUrl\"\n class=\"k-image\"\n [src]=\"dataItem.imageUrl\"\n alt=\"\"\n >\n {{ getText(dataItem) }}\n </ng-template>\n </li>\n </ul>\n "
81
+ template: "\n <ul class=\"k-group k-menu-group k-reset\" [ngClass]=\"sizeClass\" unselectable=\"on\" role=\"menu\">\n <li role=\"menuitem\" unselectable=\"on\"\n kendoButtonFocusable\n *ngFor=\"let dataItem of data; let index = index;\"\n class=\"k-item k-menu-item\"\n (click)=\"onClick(index)\"\n (blur)=\"onBlur()\"\n [attr.aria-disabled]=\"dataItem.disabled ? true : false\">\n <ng-template [ngIf]=\"itemTemplate?.templateRef\">\n <span kendoButtonFocusable [index]=\"index\" class=\"k-link k-menu-link\" [class.k-disabled]=\"dataItem.disabled\" tabindex=\"-1\">\n <ng-template [templateContext]=\"{templateRef: itemTemplate?.templateRef, $implicit: dataItem}\"></ng-template>\n </span>\n </ng-template>\n <ng-template [ngIf]=\"!itemTemplate?.templateRef\">\n <span kendoButtonFocusable [index]=\"index\" class=\"k-link k-menu-link\" [class.k-disabled]=\"dataItem.disabled\" tabindex=\"-1\">\n <span\n *ngIf=\"dataItem.icon || dataItem.iconClass\"\n [ngClass]=\"getIconClasses(dataItem)\"\n ></span>\n <img\n *ngIf=\"dataItem.imageUrl\"\n class=\"k-image\"\n [src]=\"dataItem.imageUrl\"\n alt=\"\"\n >\n <span *ngIf=\"getText(dataItem)\" class=\"k-menu-link-text\">\n {{ getText(dataItem) }}\n </span>\n </span>\n </ng-template>\n </li>\n </ul>\n "
63
82
  }),
64
83
  tslib_1.__metadata("design:paramtypes", [])
65
84
  ], ListComponent);
@@ -11,7 +11,7 @@ exports.packageMetadata = {
11
11
  name: '@progress/kendo-angular-buttons',
12
12
  productName: 'Kendo UI for Angular',
13
13
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
14
- publishDate: 1635777529,
14
+ publishDate: 1641995114,
15
15
  version: '',
16
16
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
17
17
  };