@progress/kendo-angular-buttons 6.4.0-dev.202110280659 → 7.0.0-dev.202201061631

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 +239 -89
  4. package/dist/es/button/button.service.js +1 -5
  5. package/dist/es/buttongroup/buttongroup.component.js +1 -53
  6. package/dist/es/chip/chip-list.component.js +54 -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 +74 -33
  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 +1 -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 +62 -29
  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 +222 -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 +1 -41
  27. package/dist/es2015/chip/chip-list.component.d.ts +19 -3
  28. package/dist/es2015/chip/chip-list.component.js +49 -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 +58 -7
  43. package/dist/es2015/dropdownbutton/dropdownbutton.component.js +81 -28
  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 +1 -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 +48 -5
  55. package/dist/es2015/splitbutton/splitbutton.component.js +76 -25
  56. package/dist/es2015/util.d.ts +21 -0
  57. package/dist/es2015/util.js +52 -0
  58. package/dist/fesm2015/index.js +809 -393
  59. package/dist/fesm5/index.js +795 -396
  60. package/dist/npm/button/button.directive.js +239 -89
  61. package/dist/npm/button/button.service.js +0 -4
  62. package/dist/npm/buttongroup/buttongroup.component.js +1 -53
  63. package/dist/npm/chip/chip-list.component.js +52 -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 +74 -33
  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 +1 -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 +62 -29
  77. package/dist/npm/util.js +52 -0
  78. package/dist/systemjs/kendo-angular-buttons.js +1 -1
  79. package/package.json +17 -14
  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
@@ -32,7 +32,7 @@ export class ListButton {
32
32
  this.subscribeEvents();
33
33
  }
34
34
  get popupClasses() {
35
- const popupClasses = ['k-list-container', 'k-reset', 'k-group'];
35
+ const popupClasses = ['k-menu-popup'];
36
36
  if (this._popupSettings.popupClass) {
37
37
  popupClasses.push(this._popupSettings.popupClass);
38
38
  }
@@ -5,6 +5,7 @@
5
5
  import { EventEmitter } from '@angular/core';
6
6
  import { ListItemModel } from './list-item-model';
7
7
  import { ButtonItemTemplateDirective } from './button-item-template.directive';
8
+ import { ButtonSize } from '../common/models';
8
9
  /**
9
10
  * @hidden
10
11
  */
@@ -14,6 +15,8 @@ export declare class ListComponent {
14
15
  itemTemplate: ButtonItemTemplateDirective;
15
16
  onItemClick: EventEmitter<number>;
16
17
  onItemBlur: EventEmitter<any>;
18
+ size: ButtonSize;
19
+ sizeClass: string;
17
20
  constructor();
18
21
  getText(dataItem: any): any;
19
22
  getIconClasses(dataItem: ListItemModel): any;
@@ -7,6 +7,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
7
7
  import { validatePackage } from '@progress/kendo-licensing';
8
8
  import { packageMetadata } from '../package-metadata';
9
9
  import { ButtonItemTemplateDirective } from './button-item-template.directive';
10
+ import { SIZES } from '../util';
10
11
  /**
11
12
  * @hidden
12
13
  */
@@ -14,8 +15,17 @@ let ListComponent = class ListComponent {
14
15
  constructor() {
15
16
  this.onItemClick = new EventEmitter();
16
17
  this.onItemBlur = new EventEmitter();
18
+ this.sizeClass = '';
17
19
  validatePackage(packageMetadata);
18
20
  }
21
+ set size(size) {
22
+ if (size) {
23
+ this.sizeClass = `k-menu-group-${SIZES[size]}`;
24
+ }
25
+ else {
26
+ this.sizeClass = '';
27
+ }
28
+ }
19
29
  getText(dataItem) {
20
30
  if (dataItem) {
21
31
  return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
@@ -55,37 +65,44 @@ tslib_1.__decorate([
55
65
  Output(),
56
66
  tslib_1.__metadata("design:type", EventEmitter)
57
67
  ], ListComponent.prototype, "onItemBlur", void 0);
68
+ tslib_1.__decorate([
69
+ Input(),
70
+ tslib_1.__metadata("design:type", String),
71
+ tslib_1.__metadata("design:paramtypes", [String])
72
+ ], ListComponent.prototype, "size", null);
58
73
  ListComponent = tslib_1.__decorate([
59
74
  Component({
60
75
  selector: 'kendo-button-list',
61
76
  template: `
62
- <ul class="k-list k-reset" unselectable="on" role="menu">
63
- <li role="menuitem" unselectable="on" tabindex="-1"
77
+ <ul class="k-group k-menu-group k-reset" [ngClass]="sizeClass" unselectable="on" role="menu">
78
+ <li role="menuitem" unselectable="on"
64
79
  kendoButtonFocusable
65
80
  *ngFor="let dataItem of data; let index = index;"
66
- [index]="index"
67
- [ngClass]="{'k-item': true, 'k-state-disabled': dataItem.disabled}"
81
+ class="k-item k-menu-item"
68
82
  (click)="onClick(index)"
69
83
  (blur)="onBlur()"
70
84
  [attr.aria-disabled]="dataItem.disabled ? true : false">
71
- <ng-template *ngIf="itemTemplate?.templateRef"
72
- [templateContext]="{
73
- templateRef: itemTemplate?.templateRef,
74
- $implicit: dataItem
75
- }">
85
+ <ng-template [ngIf]="itemTemplate?.templateRef">
86
+ <span kendoButtonFocusable [index]="index" class="k-link k-menu-link" [class.k-disabled]="dataItem.disabled" tabindex="-1">
87
+ <ng-template [templateContext]="{templateRef: itemTemplate?.templateRef, $implicit: dataItem}"></ng-template>
88
+ </span>
76
89
  </ng-template>
77
90
  <ng-template [ngIf]="!itemTemplate?.templateRef">
78
- <span
79
- *ngIf="dataItem.icon || dataItem.iconClass"
80
- [ngClass]="getIconClasses(dataItem)"
81
- ></span>
82
- <img
83
- *ngIf="dataItem.imageUrl"
84
- class="k-image"
85
- [src]="dataItem.imageUrl"
86
- alt=""
87
- >
88
- {{ getText(dataItem) }}
91
+ <span kendoButtonFocusable [index]="index" class="k-link k-menu-link" [class.k-disabled]="dataItem.disabled" tabindex="-1">
92
+ <span
93
+ *ngIf="dataItem.icon || dataItem.iconClass"
94
+ [ngClass]="getIconClasses(dataItem)"
95
+ ></span>
96
+ <img
97
+ *ngIf="dataItem.imageUrl"
98
+ class="k-image"
99
+ [src]="dataItem.imageUrl"
100
+ alt=""
101
+ >
102
+ <span *ngIf="getText(dataItem)" class="k-menu-link-text">
103
+ {{ getText(dataItem) }}
104
+ </span>
105
+ </span>
89
106
  </ng-template>
90
107
  </li>
91
108
  </ul>
@@ -12,7 +12,6 @@ export { SplitButtonModule } from './splitbutton/splitbutton.module';
12
12
  export { SplitButtonCustomMessagesComponent } from './splitbutton/localization/custom-messages.component';
13
13
  export { DropDownButtonComponent, DropDownButtonComponent as DropDownButton } from './dropdownbutton/dropdownbutton.component';
14
14
  export { DropDownButtonModule } from './dropdownbutton/dropdownbutton.module';
15
- export { ButtonLook } from './button-look';
16
15
  export { ListItemModel } from './listbutton/list-item-model';
17
16
  export { PopupSettings } from './listbutton/popup-settings';
18
17
  export { ChipComponent } from './chip/chip.component';
@@ -21,7 +20,6 @@ export { ChipModule } from './chip/chip.module';
21
20
  export { ChipListSelection } from './chip/models/selection';
22
21
  export { ChipRemoveEvent } from './chip/chip-remove-event-args.interface';
23
22
  export { ChipListRemoveEvent } from './chip/chip-list-remove-event-args.interface';
24
- export { ChipType } from './chip/models/type';
25
23
  export { FloatingActionButtonModule } from './floatingactionbutton/floatingactionbutton.module';
26
24
  export { FloatingActionButtonComponent } from './floatingactionbutton/floatingactionbutton.component';
27
25
  export { FloatingActionButtonTemplateDirective } from './floatingactionbutton/templates/fab-template.directive';
@@ -32,6 +30,8 @@ export { DialItemAnimation } from './floatingactionbutton/models/item-animation.
32
30
  export { FabAlign } from './floatingactionbutton/models/align';
33
31
  export { FabPositionMode } from './floatingactionbutton/models/position-mode';
34
32
  export { FabOffset } from './floatingactionbutton/models/offset';
35
- export { ButtonSize } from './common/models/size';
36
- export { ButtonThemeColor } from './common/models/theme-color';
33
+ export { ButtonSize, ChipSize } from './common/models/size';
34
+ export { ButtonRounded, ChipRounded } from './common/models/rounded';
35
+ export { ButtonFillMode, ChipFillMode } from './common/models/fillmode';
36
+ export { ButtonThemeColor, ChipThemeColor } from './common/models/theme-color';
37
37
  export { ButtonShape } from './common/models/shape';
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-buttons',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1635404316,
12
+ publishDate: 1641486598,
13
13
  version: '',
14
14
  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'
15
15
  };
@@ -11,7 +11,7 @@ import { ButtonItemTemplateDirective } from './../listbutton/button-item-templat
11
11
  import { FocusService } from './../focusable/focus.service';
12
12
  import { NavigationService } from './../navigation/navigation.service';
13
13
  import { PreventableEvent } from '../preventable-event';
14
- import { ButtonLook } from '../button-look';
14
+ import { ButtonFillMode, ButtonRounded, ButtonSize, ButtonThemeColor } from '../common/models';
15
15
  /**
16
16
  * Represents the Kendo UI SplitButton component for Angular.
17
17
  *
@@ -81,13 +81,58 @@ export declare class SplitButtonComponent extends ListButton implements AfterVie
81
81
  */
82
82
  imageUrl: string;
83
83
  /**
84
- * Changes the visual appearance by using alternative styling options.
84
+ * The size property specifies the width and height of the SplitButton
85
+ * ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-size)).
86
+ *
87
+ * The possible values are:
88
+ * * `'small'`
89
+ * * `'medium'` (default)
90
+ * * `'large'`
91
+ * * `null`
92
+ */
93
+ size: ButtonSize;
94
+ /**
95
+ * The rounded property specifies the border radius of the SplitButton
96
+ * ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)).
97
+ *
98
+ * The possible values are:
99
+ * * `'small'`
100
+ * * `'medium'` (default)
101
+ * * `'large'`
102
+ * * `'full'`
103
+ * * `null`
104
+ */
105
+ rounded: ButtonRounded;
106
+ /**
107
+ * The fillMode property specifies the background and border styles of the SplitButton
108
+ * ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-fillMode)).
85
109
  *
86
110
  * The available values are:
111
+ * * `solid` (default)
87
112
  * * `flat`
88
113
  * * `outline`
114
+ * * `link`
89
115
  */
90
- look: ButtonLook;
116
+ fillMode: ButtonFillMode;
117
+ /**
118
+ * The SplitButton allows you to specify predefined theme colors.
119
+ * The theme color will be applied as a background and border color while also amending the text color accordingly
120
+ * ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-themeColor)).
121
+ *
122
+ * The possible values are:
123
+ * * `base` &mdash;Applies coloring based on the `base` theme color. (default)
124
+ * * `primary` &mdash;Applies coloring based on the `primary` theme color.
125
+ * * `secondary`&mdash;Applies coloring based on the `secondary` theme color.
126
+ * * `tertiary`&mdash; Applies coloring based on the `tertiary` theme color.
127
+ * * `info`&mdash;Applies coloring based on the `info` theme color.
128
+ * * `success`&mdash; Applies coloring based on the `success` theme color.
129
+ * * `warning`&mdash; Applies coloring based on the `warning` theme color.
130
+ * * `error`&mdash; Applies coloring based on the `error` theme color.
131
+ * * `dark`&mdash; Applies coloring based on the `dark` theme color.
132
+ * * `light`&mdash; Applies coloring based on the `light` theme color.
133
+ * * `inverse`&mdash; Applies coloring based on the `inverse` theme color.
134
+ */
135
+ themeColor: ButtonThemeColor;
91
136
  /**
92
137
  * When set to `true`, disables a SplitButton item
93
138
  * ([see example]({% slug databinding_splitbutton %}#toc-arrays-of-complex-data)).
@@ -232,8 +277,6 @@ export declare class SplitButtonComponent extends ListButton implements AfterVie
232
277
  private buttonText;
233
278
  private lockFocus;
234
279
  isFocused: boolean;
235
- readonly isFlat: boolean;
236
- readonly isOutline: boolean;
237
280
  readonly widgetClasses: boolean;
238
281
  readonly dir: string;
239
282
  /**
@@ -96,13 +96,58 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
96
96
  */
97
97
  this.imageUrl = '';
98
98
  /**
99
- * Changes the visual appearance by using alternative styling options.
99
+ * The size property specifies the width and height of the SplitButton
100
+ * ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-size)).
101
+ *
102
+ * The possible values are:
103
+ * * `'small'`
104
+ * * `'medium'` (default)
105
+ * * `'large'`
106
+ * * `null`
107
+ */
108
+ this.size = 'medium';
109
+ /**
110
+ * The rounded property specifies the border radius of the SplitButton
111
+ * ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)).
112
+ *
113
+ * The possible values are:
114
+ * * `'small'`
115
+ * * `'medium'` (default)
116
+ * * `'large'`
117
+ * * `'full'`
118
+ * * `null`
119
+ */
120
+ this.rounded = 'medium';
121
+ /**
122
+ * The fillMode property specifies the background and border styles of the SplitButton
123
+ * ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-fillMode)).
100
124
  *
101
125
  * The available values are:
126
+ * * `solid` (default)
102
127
  * * `flat`
103
128
  * * `outline`
129
+ * * `link`
104
130
  */
105
- this.look = 'default';
131
+ this.fillMode = 'solid';
132
+ /**
133
+ * The SplitButton allows you to specify predefined theme colors.
134
+ * The theme color will be applied as a background and border color while also amending the text color accordingly
135
+ * ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-themeColor)).
136
+ *
137
+ * The possible values are:
138
+ * * `base` &mdash;Applies coloring based on the `base` theme color. (default)
139
+ * * `primary` &mdash;Applies coloring based on the `primary` theme color.
140
+ * * `secondary`&mdash;Applies coloring based on the `secondary` theme color.
141
+ * * `tertiary`&mdash; Applies coloring based on the `tertiary` theme color.
142
+ * * `info`&mdash;Applies coloring based on the `info` theme color.
143
+ * * `success`&mdash; Applies coloring based on the `success` theme color.
144
+ * * `warning`&mdash; Applies coloring based on the `warning` theme color.
145
+ * * `error`&mdash; Applies coloring based on the `error` theme color.
146
+ * * `dark`&mdash; Applies coloring based on the `dark` theme color.
147
+ * * `light`&mdash; Applies coloring based on the `light` theme color.
148
+ * * `inverse`&mdash; Applies coloring based on the `inverse` theme color.
149
+ */
150
+ this.themeColor = 'base';
106
151
  /**
107
152
  * Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
108
153
  */
@@ -275,12 +320,6 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
275
320
  get isFocused() {
276
321
  return this._isFocused && !this._disabled;
277
322
  }
278
- get isFlat() {
279
- return this.look === 'flat';
280
- }
281
- get isOutline() {
282
- return this.look === 'outline';
283
- }
284
323
  get widgetClasses() {
285
324
  return true;
286
325
  }
@@ -538,7 +577,19 @@ tslib_1.__decorate([
538
577
  tslib_1.__decorate([
539
578
  Input(),
540
579
  tslib_1.__metadata("design:type", String)
541
- ], SplitButtonComponent.prototype, "look", void 0);
580
+ ], SplitButtonComponent.prototype, "size", void 0);
581
+ tslib_1.__decorate([
582
+ Input(),
583
+ tslib_1.__metadata("design:type", String)
584
+ ], SplitButtonComponent.prototype, "rounded", void 0);
585
+ tslib_1.__decorate([
586
+ Input(),
587
+ tslib_1.__metadata("design:type", String)
588
+ ], SplitButtonComponent.prototype, "fillMode", void 0);
589
+ tslib_1.__decorate([
590
+ Input(),
591
+ tslib_1.__metadata("design:type", String)
592
+ ], SplitButtonComponent.prototype, "themeColor", void 0);
542
593
  tslib_1.__decorate([
543
594
  Input(),
544
595
  tslib_1.__metadata("design:type", Boolean),
@@ -619,20 +670,10 @@ tslib_1.__decorate([
619
670
  tslib_1.__metadata("design:type", ViewContainerRef)
620
671
  ], SplitButtonComponent.prototype, "containerRef", void 0);
621
672
  tslib_1.__decorate([
622
- HostBinding('class.k-state-focused'),
673
+ HostBinding('class.k-focus'),
623
674
  tslib_1.__metadata("design:type", Boolean),
624
675
  tslib_1.__metadata("design:paramtypes", [Boolean])
625
676
  ], SplitButtonComponent.prototype, "isFocused", null);
626
- tslib_1.__decorate([
627
- HostBinding('class.k-flat'),
628
- tslib_1.__metadata("design:type", Boolean),
629
- tslib_1.__metadata("design:paramtypes", [])
630
- ], SplitButtonComponent.prototype, "isFlat", null);
631
- tslib_1.__decorate([
632
- HostBinding('class.k-outline'),
633
- tslib_1.__metadata("design:type", Boolean),
634
- tslib_1.__metadata("design:paramtypes", [])
635
- ], SplitButtonComponent.prototype, "isOutline", null);
636
677
  tslib_1.__decorate([
637
678
  HostBinding('class.k-split-button'),
638
679
  HostBinding('class.k-button-group'),
@@ -685,11 +726,15 @@ SplitButtonComponent = tslib_1.__decorate([
685
726
  kendoButton
686
727
  #button
687
728
  [type]="type"
688
- [look]="look"
689
729
  [tabindex]="componentTabIndex"
690
730
  [disabled]="disabled"
731
+ [size]="size"
732
+ [rounded]="rounded"
733
+ [fillMode]="fillMode"
734
+ [themeColor]="themeColor"
691
735
  [icon]="icon"
692
- [class.k-state-active]="active"
736
+ [class.k-active]="active"
737
+ [class.k-icon-button]="!text && icon"
693
738
  [iconClass]="iconClass"
694
739
  [imageUrl]="imageUrl"
695
740
  [ngClass]="buttonClass"
@@ -704,16 +749,21 @@ SplitButtonComponent = tslib_1.__decorate([
704
749
  [attr.aria-owns]="listId"
705
750
  [attr.aria-label]="ariaLabel"
706
751
  >
707
- {{ text }}<ng-content></ng-content>
752
+ <span *ngIf="text" class="k-button-text">
753
+ {{ text }}
754
+ </span><ng-content></ng-content>
708
755
  </button>
709
756
  <button
710
757
  kendoButton
711
758
  #arrowButton
712
759
  type="button"
713
- [class.k-state-active]="activeArrow"
760
+ [class.k-active]="activeArrow"
714
761
  [disabled]="disabled"
715
762
  [icon]="arrowButtonIcon"
716
- [look]="look"
763
+ [size]="size"
764
+ [rounded]="rounded"
765
+ [fillMode]="fillMode"
766
+ [themeColor]="fillMode ? themeColor : null"
717
767
  [tabindex]="-1"
718
768
  [ngClass]="arrowButtonClass"
719
769
  (click)="onArrowButtonClick()"
@@ -731,6 +781,7 @@ SplitButtonComponent = tslib_1.__decorate([
731
781
  (keypress)="keyPressHandler($event)"
732
782
  (keyup)="keyUpHandler($event)"
733
783
  [attr.dir]="dir"
784
+ [size]="size"
734
785
  >
735
786
  </kendo-button-list>
736
787
  </ng-template>
@@ -2,6 +2,7 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
+ import { ButtonStylingClasses } from "./common/models";
5
6
  /**
6
7
  * @hidden
7
8
  */
@@ -18,3 +19,23 @@ export declare function closest(element: any, selector: string): any;
18
19
  * @hidden
19
20
  */
20
21
  export declare const replaceMessagePlaceholder: (message: string, name: string, value: string) => string;
22
+ /**
23
+ * @hidden
24
+ */
25
+ export declare const SIZES: {
26
+ small: string;
27
+ medium: string;
28
+ large: string;
29
+ };
30
+ /**
31
+ * @hidden
32
+ *
33
+ * Returns the styling classes to be added and removed
34
+ */
35
+ export declare const getStylingClasses: (componentType: any, stylingOption: string, previousValue: any, newValue: any) => ButtonStylingClasses;
36
+ /**
37
+ * @hidden
38
+ *
39
+ * Returns the themeColor classes to be added and removed
40
+ */
41
+ export declare const getThemeColorClasses: (componentType: any, prevFillMode: any, fillMode: any, previousValue: any, newValue: any) => ButtonStylingClasses;
@@ -41,3 +41,55 @@ export function closest(element, selector) {
41
41
  * @hidden
42
42
  */
43
43
  export const replaceMessagePlaceholder = (message, name, value) => message.replace(new RegExp(`\{\\s*${name}\\s*\}`, 'g'), value);
44
+ /**
45
+ * @hidden
46
+ */
47
+ export const SIZES = {
48
+ small: 'sm',
49
+ medium: 'md',
50
+ large: 'lg'
51
+ };
52
+ const ROUNDNESS = {
53
+ small: 'sm',
54
+ medium: 'md',
55
+ large: 'lg',
56
+ full: 'full'
57
+ };
58
+ /**
59
+ * @hidden
60
+ *
61
+ * Returns the styling classes to be added and removed
62
+ */
63
+ export const getStylingClasses = (componentType, stylingOption, previousValue, newValue) => {
64
+ switch (stylingOption) {
65
+ case 'size':
66
+ return {
67
+ toRemove: `k-${componentType}-${SIZES[previousValue]}`,
68
+ toAdd: newValue ? `k-${componentType}-${SIZES[newValue]}` : null
69
+ };
70
+ case 'rounded':
71
+ return {
72
+ toRemove: `k-rounded-${ROUNDNESS[previousValue]}`,
73
+ toAdd: newValue ? `k-rounded-${ROUNDNESS[newValue]}` : null
74
+ };
75
+ case 'fillMode':
76
+ case 'shape':
77
+ return {
78
+ toRemove: `k-${componentType}-${previousValue}`,
79
+ toAdd: newValue ? `k-${componentType}-${newValue}` : null
80
+ };
81
+ default:
82
+ break;
83
+ }
84
+ };
85
+ /**
86
+ * @hidden
87
+ *
88
+ * Returns the themeColor classes to be added and removed
89
+ */
90
+ export const getThemeColorClasses = (componentType, prevFillMode, fillMode, previousValue, newValue) => {
91
+ return {
92
+ toRemove: `k-${componentType}-${prevFillMode}-${previousValue}`,
93
+ toAdd: newValue ? `k-${componentType}-${fillMode}-${newValue}` : null
94
+ };
95
+ };