@progress/kendo-angular-buttons 13.6.0-develop.4 → 13.6.0-develop.6

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.
@@ -7,6 +7,7 @@ import { KendoButtonService } from './button.service';
7
7
  import { LocalizationService } from '@progress/kendo-angular-l10n';
8
8
  import { ButtonFillMode, ButtonRounded, ButtonSize, ButtonThemeColor } from '../common/models';
9
9
  import { SVGIcon } from '@progress/kendo-svg-icons';
10
+ import { ArrowIconSettings } from '../common/models/arrow-settings';
10
11
  import * as i0 from "@angular/core";
11
12
  /**
12
13
  * Represents the Kendo UI Button component for Angular.
@@ -15,6 +16,12 @@ export declare class ButtonComponent implements OnDestroy, AfterViewInit {
15
16
  renderer: Renderer2;
16
17
  private service;
17
18
  private ngZone;
19
+ /**
20
+ * @hidden
21
+ * @default false
22
+ * required for DropDownButton arrow icon.
23
+ */
24
+ arrowIcon: boolean | ArrowIconSettings;
18
25
  /**
19
26
  * Provides visual styling that indicates if the Button is active.
20
27
  *
@@ -120,6 +127,7 @@ export declare class ButtonComponent implements OnDestroy, AfterViewInit {
120
127
  click: EventEmitter<any>;
121
128
  element: HTMLElement;
122
129
  isDisabled: boolean;
130
+ caretAltDownIcon: SVGIcon;
123
131
  private _size;
124
132
  private _rounded;
125
133
  private _fillMode;
@@ -200,5 +208,5 @@ export declare class ButtonComponent implements OnDestroy, AfterViewInit {
200
208
  private handleClasses;
201
209
  private handleThemeColor;
202
210
  static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, [null, null, { optional: true; }, null, null]>;
203
- static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "button[kendoButton], span[kendoButton], kendo-button", ["kendoButton"], { "toggleable": "toggleable"; "togglable": "togglable"; "selected": "selected"; "tabIndex": "tabIndex"; "imageUrl": "imageUrl"; "iconClass": "iconClass"; "icon": "icon"; "disabled": "disabled"; "size": "size"; "rounded": "rounded"; "fillMode": "fillMode"; "themeColor": "themeColor"; "svgIcon": "svgIcon"; "role": "role"; "primary": "primary"; "look": "look"; }, { "selectedChange": "selectedChange"; "click": "click"; }, never, ["*"]>;
211
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "button[kendoButton], span[kendoButton], kendo-button", ["kendoButton"], { "arrowIcon": "arrowIcon"; "toggleable": "toggleable"; "togglable": "togglable"; "selected": "selected"; "tabIndex": "tabIndex"; "imageUrl": "imageUrl"; "iconClass": "iconClass"; "icon": "icon"; "disabled": "disabled"; "size": "size"; "rounded": "rounded"; "fillMode": "fillMode"; "themeColor": "themeColor"; "svgIcon": "svgIcon"; "role": "role"; "primary": "primary"; "look": "look"; }, { "selectedChange": "selectedChange"; "click": "click"; }, never, ["*"]>;
204
212
  }
@@ -0,0 +1,22 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { SVGIcon } from "@progress/kendo-angular-icons";
6
+ /**
7
+ * Used to customize the DropDownButton arrow icon.
8
+ */
9
+ export interface ArrowIconSettings {
10
+ /**
11
+ * The Kendo font icon to replace the default arrow down icon.
12
+ */
13
+ icon?: string;
14
+ /**
15
+ * The custom font icon class to replace the default arrow down icon.
16
+ */
17
+ iconClass?: string;
18
+ /**
19
+ * The SVG icon to replace the default arrow down SVG icon.
20
+ */
21
+ svgIcon?: SVGIcon;
22
+ }
@@ -7,3 +7,4 @@ export * from './models/theme-color';
7
7
  export * from './models/fillmode';
8
8
  export * from './models/rounded';
9
9
  export * from './models/styling-classes';
10
+ export * from './models/arrow-settings';
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2023 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 { TemplateRef, ViewContainerRef, ElementRef, EventEmitter, NgZone, ChangeDetectorRef, AfterViewInit } from '@angular/core';
5
+ import { TemplateRef, ViewContainerRef, ElementRef, EventEmitter, NgZone, ChangeDetectorRef, AfterViewInit, Renderer2 } from '@angular/core';
6
6
  import { LocalizationService } from '@progress/kendo-angular-l10n';
7
7
  import { PopupService } from '@progress/kendo-angular-popup';
8
8
  import { ButtonItemTemplateDirective } from '../listbutton/button-item-template.directive';
@@ -11,7 +11,7 @@ import { ListButton } from '../listbutton/list-button';
11
11
  import { ListComponent } from '../listbutton/list.component';
12
12
  import { FocusService } from '../focusable/focus.service';
13
13
  import { NavigationService } from '../navigation/navigation.service';
14
- import { ButtonFillMode, ButtonRounded, ButtonSize, ButtonThemeColor } from '../common/models';
14
+ import { ArrowIconSettings, ButtonFillMode, ButtonRounded, ButtonSize, ButtonThemeColor } from '../common/models';
15
15
  import { PopupContainerService } from '../listbutton/container.service';
16
16
  import { SVGIcon } from '@progress/kendo-svg-icons';
17
17
  import * as i0 from "@angular/core";
@@ -45,6 +45,12 @@ import * as i0 from "@angular/core";
45
45
  */
46
46
  export declare class DropDownButtonComponent extends ListButton implements AfterViewInit {
47
47
  protected containerService: PopupContainerService;
48
+ private renderer;
49
+ /**
50
+ * Allows showing the default arrow icon or providing alternative one instead.
51
+ * @default false
52
+ */
53
+ arrowIcon: boolean | ArrowIconSettings;
48
54
  /**
49
55
  * Defines the name of an existing icon in the Kendo UI theme.
50
56
  */
@@ -129,6 +135,15 @@ export declare class DropDownButtonComponent extends ListButton implements After
129
135
  * * `none` &mdash;Removes the default CSS class (no class would be rendered).
130
136
  */
131
137
  themeColor: ButtonThemeColor;
138
+ /**
139
+ * Sets attributes to the main button.
140
+ */
141
+ set buttonAttributes(buttonAttributes: {
142
+ [key: string]: string;
143
+ });
144
+ get buttonAttributes(): {
145
+ [key: string]: string;
146
+ };
132
147
  /**
133
148
  * Fires each time the user clicks on a drop-down list item. The event data contains the data item bound to the clicked list item.
134
149
  */
@@ -156,6 +171,7 @@ export declare class DropDownButtonComponent extends ListButton implements After
156
171
  listId: string;
157
172
  buttonId: string;
158
173
  private _fillMode;
174
+ private _buttonAttributes;
159
175
  /**
160
176
  * @hidden
161
177
  */
@@ -188,7 +204,7 @@ export declare class DropDownButtonComponent extends ListButton implements After
188
204
  * Blurs the DropDownButton component.
189
205
  */
190
206
  blur(): void;
191
- constructor(focusService: FocusService, navigationService: NavigationService, wrapperRef: ElementRef, zone: NgZone, popupService: PopupService, elRef: ElementRef, localization: LocalizationService, cdr: ChangeDetectorRef, containerService: PopupContainerService);
207
+ constructor(focusService: FocusService, navigationService: NavigationService, wrapperRef: ElementRef, zone: NgZone, popupService: PopupService, elRef: ElementRef, localization: LocalizationService, cdr: ChangeDetectorRef, containerService: PopupContainerService, renderer: Renderer2);
192
208
  ngAfterViewInit(): void;
193
209
  /**
194
210
  * @hidden
@@ -198,6 +214,7 @@ export declare class DropDownButtonComponent extends ListButton implements After
198
214
  * @hidden
199
215
  */
200
216
  wrapperContains(element: any): boolean;
217
+ private handleButtonAttributes;
201
218
  static ɵfac: i0.ɵɵFactoryDeclaration<DropDownButtonComponent, never>;
202
- static ɵcmp: i0.ɵɵComponentDeclaration<DropDownButtonComponent, "kendo-dropdownbutton", ["kendoDropDownButton"], { "icon": "icon"; "svgIcon": "svgIcon"; "iconClass": "iconClass"; "imageUrl": "imageUrl"; "textField": "textField"; "data": "data"; "size": "size"; "rounded": "rounded"; "fillMode": "fillMode"; "themeColor": "themeColor"; }, { "itemClick": "itemClick"; "onFocus": "focus"; "onBlur": "blur"; }, ["itemTemplate"], ["*"]>;
219
+ static ɵcmp: i0.ɵɵComponentDeclaration<DropDownButtonComponent, "kendo-dropdownbutton", ["kendoDropDownButton"], { "arrowIcon": "arrowIcon"; "icon": "icon"; "svgIcon": "svgIcon"; "iconClass": "iconClass"; "imageUrl": "imageUrl"; "textField": "textField"; "data": "data"; "size": "size"; "rounded": "rounded"; "fillMode": "fillMode"; "themeColor": "themeColor"; "buttonAttributes": "buttonAttributes"; }, { "itemClick": "itemClick"; "onFocus": "focus"; "onBlur": "blur"; }, ["itemTemplate"], ["*"]>;
203
220
  }
@@ -5,6 +5,7 @@
5
5
  import { Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, Renderer2, Output, Optional, NgZone, isDevMode } from '@angular/core';
6
6
  import { KendoButtonService } from './button.service';
7
7
  import { isDocumentAvailable, isChanged, hasObservers, Keys, isSafari, isFirefox } from '@progress/kendo-angular-common';
8
+ import { caretAltDownIcon } from '@progress/kendo-svg-icons';
8
9
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
9
10
  import { Subscription } from 'rxjs';
10
11
  import { validatePackage } from '@progress/kendo-licensing';
@@ -30,6 +31,12 @@ export class ButtonComponent {
30
31
  this.renderer = renderer;
31
32
  this.service = service;
32
33
  this.ngZone = ngZone;
34
+ /**
35
+ * @hidden
36
+ * @default false
37
+ * required for DropDownButton arrow icon.
38
+ */
39
+ this.arrowIcon = false;
33
40
  /**
34
41
  * Provides visual styling that indicates if the Button is active.
35
42
  *
@@ -51,6 +58,7 @@ export class ButtonComponent {
51
58
  */
52
59
  this.click = new EventEmitter();
53
60
  this.isDisabled = false;
61
+ this.caretAltDownIcon = caretAltDownIcon;
54
62
  this._size = DEFAULT_SIZE;
55
63
  this._rounded = DEFAULT_ROUNDED;
56
64
  this._fillMode = DEFAULT_FILL_MODE;
@@ -432,7 +440,7 @@ export class ButtonComponent {
432
440
  }
433
441
  }
434
442
  ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.KendoButtonService, optional: true }, { token: i2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
435
- ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: { toggleable: "toggleable", togglable: "togglable", selected: "selected", tabIndex: "tabIndex", imageUrl: "imageUrl", iconClass: "iconClass", icon: "icon", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", svgIcon: "svgIcon", role: "role", primary: "primary", look: "look" }, outputs: { selectedChange: "selectedChange", click: "click" }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()" }, properties: { "class.k-button": "this.classButton", "class.k-toggle-button": "this.isToggleable", "class.k-icon-button": "this.iconButtonClass", "attr.role": "this.roleSetter", "attr.aria-disabled": "this.classDisabled", "class.k-disabled": "this.classDisabled", "class.k-selected": "this.classActive", "attr.dir": "this.getDirection" } }, providers: [
443
+ ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: { arrowIcon: "arrowIcon", toggleable: "toggleable", togglable: "togglable", selected: "selected", tabIndex: "tabIndex", imageUrl: "imageUrl", iconClass: "iconClass", icon: "icon", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", svgIcon: "svgIcon", role: "role", primary: "primary", look: "look" }, outputs: { selectedChange: "selectedChange", click: "click" }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()" }, properties: { "class.k-button": "this.classButton", "class.k-toggle-button": "this.isToggleable", "class.k-icon-button": "this.iconButtonClass", "attr.role": "this.roleSetter", "attr.aria-disabled": "this.classDisabled", "class.k-disabled": "this.classDisabled", "class.k-selected": "this.classActive", "attr.dir": "this.getDirection" } }, providers: [
436
444
  LocalizationService,
437
445
  {
438
446
  provide: L10N_PREFIX,
@@ -449,6 +457,12 @@ ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
449
457
  </span>
450
458
  <span *ngIf="iconClass" class="k-button-icon" [ngClass]="iconClass"></span>
451
459
  <span class="k-button-text"><ng-content></ng-content></span>
460
+ <span *ngIf="$any(arrowIcon).iconClass" class="k-button-icon" [ngClass]="$any(arrowIcon).iconClass"></span>
461
+ <kendo-icon-wrapper
462
+ *ngIf="arrowIcon && !$any(arrowIcon).iconClass"
463
+ innerCssClass="k-button-icon"
464
+ [name]="$any(arrowIcon).icon || 'caret-alt-down'"
465
+ [svgIcon]="$any(arrowIcon).svgIcon || caretAltDownIcon"></kendo-icon-wrapper>
452
466
  `, isInline: true, components: [{ type: i3.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
453
467
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ButtonComponent, decorators: [{
454
468
  type: Component,
@@ -473,11 +487,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
473
487
  </span>
474
488
  <span *ngIf="iconClass" class="k-button-icon" [ngClass]="iconClass"></span>
475
489
  <span class="k-button-text"><ng-content></ng-content></span>
490
+ <span *ngIf="$any(arrowIcon).iconClass" class="k-button-icon" [ngClass]="$any(arrowIcon).iconClass"></span>
491
+ <kendo-icon-wrapper
492
+ *ngIf="arrowIcon && !$any(arrowIcon).iconClass"
493
+ innerCssClass="k-button-icon"
494
+ [name]="$any(arrowIcon).icon || 'caret-alt-down'"
495
+ [svgIcon]="$any(arrowIcon).svgIcon || caretAltDownIcon"></kendo-icon-wrapper>
476
496
  `
477
497
  }]
478
498
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.KendoButtonService, decorators: [{
479
499
  type: Optional
480
- }] }, { type: i2.LocalizationService }, { type: i0.NgZone }]; }, propDecorators: { toggleable: [{
500
+ }] }, { type: i2.LocalizationService }, { type: i0.NgZone }]; }, propDecorators: { arrowIcon: [{
501
+ type: Input
502
+ }], toggleable: [{
481
503
  type: Input
482
504
  }], togglable: [{
483
505
  type: Input
@@ -0,0 +1,5 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ export {};
@@ -7,3 +7,4 @@ export * from './models/theme-color';
7
7
  export * from './models/fillmode';
8
8
  export * from './models/rounded';
9
9
  export * from './models/styling-classes';
10
+ export * from './models/arrow-settings';
@@ -2,10 +2,10 @@
2
2
  * Copyright © 2023 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 { Component, ContentChild, TemplateRef, ViewChild, ViewContainerRef, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, NgZone, ChangeDetectorRef } from '@angular/core';
5
+ import { Component, ContentChild, TemplateRef, ViewChild, ViewContainerRef, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, NgZone, ChangeDetectorRef, Renderer2 } from '@angular/core';
6
6
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
7
7
  import { PopupService } from '@progress/kendo-angular-popup';
8
- import { isDocumentAvailable, guid, Keys } from '@progress/kendo-angular-common';
8
+ import { isDocumentAvailable, guid, Keys, isPresent } from '@progress/kendo-angular-common';
9
9
  import { ButtonItemTemplateDirective } from '../listbutton/button-item-template.directive';
10
10
  import { closest } from '../util';
11
11
  import { ListButton } from '../listbutton/list-button';
@@ -60,9 +60,15 @@ const DEFAULT_FILL_MODE = 'solid';
60
60
  * ```
61
61
  */
62
62
  export class DropDownButtonComponent extends ListButton {
63
- constructor(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr, containerService) {
63
+ constructor(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr, containerService, renderer) {
64
64
  super(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr, containerService);
65
65
  this.containerService = containerService;
66
+ this.renderer = renderer;
67
+ /**
68
+ * Allows showing the default arrow icon or providing alternative one instead.
69
+ * @default false
70
+ */
71
+ this.arrowIcon = false;
66
72
  /**
67
73
  * Defines the name of an existing icon in the Kendo UI theme.
68
74
  */
@@ -133,6 +139,7 @@ export class DropDownButtonComponent extends ListButton {
133
139
  this.listId = guid();
134
140
  this.buttonId = guid();
135
141
  this._fillMode = DEFAULT_FILL_MODE;
142
+ this._buttonAttributes = null;
136
143
  this._itemClick = this.itemClick;
137
144
  this._blur = this.onBlur;
138
145
  }
@@ -164,6 +171,17 @@ export class DropDownButtonComponent extends ListButton {
164
171
  get fillMode() {
165
172
  return this._fillMode;
166
173
  }
174
+ /**
175
+ * Sets attributes to the main button.
176
+ */
177
+ set buttonAttributes(buttonAttributes) {
178
+ const newButtonAttributes = buttonAttributes ? buttonAttributes : null;
179
+ this.handleButtonAttributes(newButtonAttributes);
180
+ this._buttonAttributes = newButtonAttributes;
181
+ }
182
+ get buttonAttributes() {
183
+ return this._buttonAttributes;
184
+ }
167
185
  get focused() {
168
186
  return this._isFocused && !this._disabled;
169
187
  }
@@ -251,6 +269,7 @@ export class DropDownButtonComponent extends ListButton {
251
269
  ngAfterViewInit() {
252
270
  this.containerService.container = this.container;
253
271
  this.containerService.template = this.popupTemplate;
272
+ this.handleButtonAttributes(this.buttonAttributes);
254
273
  }
255
274
  /**
256
275
  * @hidden
@@ -275,9 +294,22 @@ export class DropDownButtonComponent extends ListButton {
275
294
  || this.wrapper.contains(element)
276
295
  || (this.popupRef && this.popupRef.popupElement.contains(element));
277
296
  }
297
+ handleButtonAttributes(newButtonAttributes) {
298
+ const mainButton = this.button?.nativeElement;
299
+ if (isPresent(this.buttonAttributes) && isPresent(mainButton)) {
300
+ for (const attr in this.buttonAttributes) {
301
+ this.renderer.removeAttribute(mainButton, attr, this.buttonAttributes[attr]);
302
+ }
303
+ }
304
+ if (isPresent(newButtonAttributes) && isPresent(mainButton)) {
305
+ for (const attr in newButtonAttributes) {
306
+ this.renderer.setAttribute(mainButton, attr, newButtonAttributes[attr]);
307
+ }
308
+ }
309
+ }
278
310
  }
279
- DropDownButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DropDownButtonComponent, deps: [{ token: i1.FocusService }, { token: i2.NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i3.PopupService }, { token: i0.ElementRef }, { token: i4.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i5.PopupContainerService }], target: i0.ɵɵFactoryTarget.Component });
280
- DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: { icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", textField: "textField", data: "data", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor" }, outputs: { itemClick: "itemClick", onFocus: "focus", onBlur: "blur" }, host: { listeners: { "keydown": "keydown($event)", "keyup": "keyup($event)", "mousedown": "mousedown($event)", "mouseup": "mouseup($event)" }, properties: { "class.k-focus": "this.focused", "class.k-dropdown-button": "this.widgetClasses", "attr.dir": "this.dir" } }, providers: [
311
+ DropDownButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DropDownButtonComponent, deps: [{ token: i1.FocusService }, { token: i2.NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i3.PopupService }, { token: i0.ElementRef }, { token: i4.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i5.PopupContainerService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
312
+ DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: { arrowIcon: "arrowIcon", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", textField: "textField", data: "data", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", buttonAttributes: "buttonAttributes" }, outputs: { itemClick: "itemClick", onFocus: "focus", onBlur: "blur" }, host: { listeners: { "keydown": "keydown($event)", "keyup": "keyup($event)", "mousedown": "mousedown($event)", "mouseup": "mouseup($event)" }, properties: { "class.k-focus": "this.focused", "class.k-dropdown-button": "this.widgetClasses", "attr.dir": "this.dir" } }, providers: [
281
313
  FocusService,
282
314
  NavigationService,
283
315
  NAVIGATION_SETTINGS_PROVIDER,
@@ -296,6 +328,7 @@ DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
296
328
  [disabled]="disabled"
297
329
  [icon]="icon"
298
330
  [svgIcon]="svgIcon"
331
+ [arrowIcon]="arrowIcon"
299
332
  [iconClass]="iconClass"
300
333
  [imageUrl]="imageUrl"
301
334
  [ngClass]="buttonClass"
@@ -330,7 +363,7 @@ DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
330
363
  </kendo-button-list>
331
364
  </ng-template>
332
365
  <ng-container #container></ng-container>
333
- `, isInline: true, components: [{ type: i6.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i7.ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate", "size"], outputs: ["onItemClick", "onItemBlur"] }], directives: [{ type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
366
+ `, isInline: true, components: [{ type: i6.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i7.ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate", "size"], outputs: ["onItemClick", "onItemBlur"] }], directives: [{ type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
334
367
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DropDownButtonComponent, decorators: [{
335
368
  type: Component,
336
369
  args: [{
@@ -356,6 +389,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
356
389
  [disabled]="disabled"
357
390
  [icon]="icon"
358
391
  [svgIcon]="svgIcon"
392
+ [arrowIcon]="arrowIcon"
359
393
  [iconClass]="iconClass"
360
394
  [imageUrl]="imageUrl"
361
395
  [ngClass]="buttonClass"
@@ -392,7 +426,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
392
426
  <ng-container #container></ng-container>
393
427
  `
394
428
  }]
395
- }], ctorParameters: function () { return [{ type: i1.FocusService }, { type: i2.NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i3.PopupService }, { type: i0.ElementRef }, { type: i4.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i5.PopupContainerService }]; }, propDecorators: { icon: [{
429
+ }], ctorParameters: function () { return [{ type: i1.FocusService }, { type: i2.NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i3.PopupService }, { type: i0.ElementRef }, { type: i4.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i5.PopupContainerService }, { type: i0.Renderer2 }]; }, propDecorators: { arrowIcon: [{
430
+ type: Input
431
+ }], icon: [{
396
432
  type: Input
397
433
  }], svgIcon: [{
398
434
  type: Input
@@ -412,6 +448,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
412
448
  type: Input
413
449
  }], themeColor: [{
414
450
  type: Input
451
+ }], buttonAttributes: [{
452
+ type: Input
415
453
  }], itemClick: [{
416
454
  type: Output
417
455
  }], onFocus: [{
@@ -63,14 +63,20 @@ ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
63
63
  (blur)="onBlur()"
64
64
  [attr.aria-disabled]="dataItem.disabled ? true : false">
65
65
  <ng-template [ngIf]="itemTemplate?.templateRef">
66
- <span class="k-link k-menu-link" [class.k-disabled]="dataItem.disabled">
66
+ <span
67
+ class="k-link k-menu-link"
68
+ [class.k-disabled]="dataItem.disabled"
69
+ [ngClass]="dataItem.cssClass">
67
70
  <ng-template
68
71
  [templateContext]="{ templateRef: itemTemplate?.templateRef, $implicit: dataItem }"
69
72
  ></ng-template>
70
73
  </span>
71
74
  </ng-template>
72
75
  <ng-template [ngIf]="!itemTemplate?.templateRef">
73
- <span class="k-link k-menu-link" [class.k-disabled]="dataItem.disabled">
76
+ <span
77
+ class="k-link k-menu-link"
78
+ [class.k-disabled]="dataItem.disabled"
79
+ [ngClass]="dataItem.cssClass">
74
80
  <kendo-icon-wrapper
75
81
  *ngIf="dataItem.icon || dataItem.iconClass || dataItem.svgIcon"
76
82
  [name]="dataItem.icon"
@@ -108,14 +114,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
108
114
  (blur)="onBlur()"
109
115
  [attr.aria-disabled]="dataItem.disabled ? true : false">
110
116
  <ng-template [ngIf]="itemTemplate?.templateRef">
111
- <span class="k-link k-menu-link" [class.k-disabled]="dataItem.disabled">
117
+ <span
118
+ class="k-link k-menu-link"
119
+ [class.k-disabled]="dataItem.disabled"
120
+ [ngClass]="dataItem.cssClass">
112
121
  <ng-template
113
122
  [templateContext]="{ templateRef: itemTemplate?.templateRef, $implicit: dataItem }"
114
123
  ></ng-template>
115
124
  </span>
116
125
  </ng-template>
117
126
  <ng-template [ngIf]="!itemTemplate?.templateRef">
118
- <span class="k-link k-menu-link" [class.k-disabled]="dataItem.disabled">
127
+ <span
128
+ class="k-link k-menu-link"
129
+ [class.k-disabled]="dataItem.disabled"
130
+ [ngClass]="dataItem.cssClass">
119
131
  <kendo-icon-wrapper
120
132
  *ngIf="dataItem.icon || dataItem.iconClass || dataItem.svgIcon"
121
133
  [name]="dataItem.icon"
@@ -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: 1695732064,
13
- version: '13.6.0-develop.4',
12
+ publishDate: 1695882550,
13
+ version: '13.6.0-develop.6',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -221,6 +221,7 @@ export class SplitButtonComponent extends ListButton {
221
221
  this.arrowButtonClicked = false;
222
222
  this._rounded = DEFAULT_ROUNDED;
223
223
  this._fillMode = DEFAULT_FILL_MODE;
224
+ this._buttonAttributes = null;
224
225
  this._itemClick = this.itemClick;
225
226
  this._blur = this.onBlur;
226
227
  }
@@ -302,6 +303,17 @@ export class SplitButtonComponent extends ListButton {
302
303
  }
303
304
  return this._data;
304
305
  }
306
+ /**
307
+ * Sets attributes to the main button.
308
+ */
309
+ set buttonAttributes(buttonAttributes) {
310
+ const newButtonAttributes = buttonAttributes ? buttonAttributes : null;
311
+ this.handleButtonAttributes(newButtonAttributes);
312
+ this._buttonAttributes = newButtonAttributes;
313
+ }
314
+ get buttonAttributes() {
315
+ return this._buttonAttributes;
316
+ }
305
317
  /**
306
318
  * @hidden
307
319
  */
@@ -414,6 +426,7 @@ export class SplitButtonComponent extends ListButton {
414
426
  this.containerService.template = this.popupTemplate;
415
427
  this.updateButtonText();
416
428
  this.handleClasses(this.rounded, 'rounded');
429
+ this.handleButtonAttributes(this.buttonAttributes);
417
430
  }
418
431
  /**
419
432
  * @hidden
@@ -530,9 +543,22 @@ export class SplitButtonComponent extends ListButton {
530
543
  toggleButtonIconClass() {
531
544
  this.button.nativeElement.classList[this.isIconButton ? 'add' : 'remove']('k-button-icon');
532
545
  }
546
+ handleButtonAttributes(newButtonAttributes) {
547
+ const mainButton = this.button.nativeElement;
548
+ if (isPresent(this.buttonAttributes) && isPresent(mainButton)) {
549
+ for (const attr in this.buttonAttributes) {
550
+ this.renderer.removeAttribute(mainButton, attr, this.buttonAttributes[attr]);
551
+ }
552
+ }
553
+ if (isPresent(newButtonAttributes) && isPresent(mainButton)) {
554
+ for (const attr in newButtonAttributes) {
555
+ this.renderer.setAttribute(mainButton, attr, newButtonAttributes[attr]);
556
+ }
557
+ }
558
+ }
533
559
  }
534
560
  SplitButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SplitButtonComponent, deps: [{ token: i1.FocusService }, { token: i2.NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i3.PopupService }, { token: i0.ElementRef }, { token: i4.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i5.PopupContainerService }], target: i0.ɵɵFactoryTarget.Component });
535
- SplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SplitButtonComponent, selector: "kendo-splitbutton", inputs: { text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", type: "type", imageUrl: "imageUrl", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", disabled: "disabled", popupSettings: "popupSettings", tabIndex: "tabIndex", textField: "textField", data: "data", buttonClass: "buttonClass", arrowButtonClass: "arrowButtonClass", arrowButtonIcon: "arrowButtonIcon", arrowButtonSvgIcon: "arrowButtonSvgIcon" }, outputs: { buttonClick: "buttonClick", itemClick: "itemClick", onFocus: "focus", onBlur: "blur", open: "open", close: "close" }, host: { listeners: { "keydown": "keydown($event)", "keyup": "keyup($event)" }, properties: { "class.k-focus": "this.isFocused", "class.k-split-button": "this.widgetClasses", "class.k-button-group": "this.widgetClasses", "attr.dir": "this.dir" } }, providers: [
561
+ SplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SplitButtonComponent, selector: "kendo-splitbutton", inputs: { text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", type: "type", imageUrl: "imageUrl", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", disabled: "disabled", popupSettings: "popupSettings", tabIndex: "tabIndex", textField: "textField", data: "data", buttonClass: "buttonClass", arrowButtonClass: "arrowButtonClass", arrowButtonIcon: "arrowButtonIcon", arrowButtonSvgIcon: "arrowButtonSvgIcon", buttonAttributes: "buttonAttributes" }, outputs: { buttonClick: "buttonClick", itemClick: "itemClick", onFocus: "focus", onBlur: "blur", open: "open", close: "close" }, host: { listeners: { "keydown": "keydown($event)", "keyup": "keyup($event)" }, properties: { "class.k-focus": "this.isFocused", "class.k-split-button": "this.widgetClasses", "class.k-button-group": "this.widgetClasses", "attr.dir": "this.dir" } }, providers: [
536
562
  FocusService,
537
563
  NavigationService,
538
564
  NAVIGATION_SETTINGS_PROVIDER,
@@ -610,7 +636,7 @@ SplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
610
636
  </kendo-button-list>
611
637
  </ng-template>
612
638
  <ng-container #container></ng-container>
613
- `, isInline: true, components: [{ type: i6.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i7.ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate", "size"], outputs: ["onItemClick", "onItemBlur"] }], directives: [{ type: i8.LocalizedSplitButtonMessagesDirective, selector: "[kendoSplitButtonLocalizedMessages]" }, { type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
639
+ `, isInline: true, components: [{ type: i6.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i7.ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate", "size"], outputs: ["onItemClick", "onItemBlur"] }], directives: [{ type: i8.LocalizedSplitButtonMessagesDirective, selector: "[kendoSplitButtonLocalizedMessages]" }, { type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
614
640
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SplitButtonComponent, decorators: [{
615
641
  type: Component,
616
642
  args: [{
@@ -735,6 +761,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
735
761
  type: Input
736
762
  }], arrowButtonSvgIcon: [{
737
763
  type: Input
764
+ }], buttonAttributes: [{
765
+ type: Input
738
766
  }], buttonClick: [{
739
767
  type: Output
740
768
  }], itemClick: [{