@progress/kendo-angular-buttons 21.4.1 → 22.0.0-develop.1
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.
- package/fesm2022/progress-kendo-angular-buttons.mjs +105 -105
- package/listbutton/list-button.d.ts +1 -1
- package/package.json +11 -19
- package/splitbutton/localization/messages.d.ts +1 -1
- package/esm2022/button/button-settings.mjs +0 -5
- package/esm2022/button/button.component.mjs +0 -558
- package/esm2022/button/button.module.mjs +0 -43
- package/esm2022/button/button.service.mjs +0 -22
- package/esm2022/button/selection-settings.mjs +0 -5
- package/esm2022/buttongroup/buttongroup.component.mjs +0 -340
- package/esm2022/buttongroup/buttongroup.module.mjs +0 -49
- package/esm2022/buttons.module.mjs +0 -58
- package/esm2022/chip/chip-content-click-event-args.interface.mjs +0 -5
- package/esm2022/chip/chip-list-remove-event-args.interface.mjs +0 -5
- package/esm2022/chip/chip-list.component.mjs +0 -360
- package/esm2022/chip/chip-remove-event-args.interface.mjs +0 -5
- package/esm2022/chip/chip.component.mjs +0 -585
- package/esm2022/chip/chip.module.mjs +0 -45
- package/esm2022/chip/models/avatar-settings.interface.mjs +0 -5
- package/esm2022/chip/models/selection.mjs +0 -5
- package/esm2022/common/models/arrow-settings.mjs +0 -5
- package/esm2022/common/models/fillmode.mjs +0 -5
- package/esm2022/common/models/rounded.mjs +0 -5
- package/esm2022/common/models/size.mjs +0 -5
- package/esm2022/common/models/styling-classes.mjs +0 -5
- package/esm2022/common/models/theme-color.mjs +0 -5
- package/esm2022/common/models.mjs +0 -10
- package/esm2022/direction.mjs +0 -5
- package/esm2022/directives.mjs +0 -176
- package/esm2022/dropdownbutton/dropdownbutton.component.mjs +0 -482
- package/esm2022/dropdownbutton/dropdownbutton.module.mjs +0 -50
- package/esm2022/floatingactionbutton/animations/animations.mjs +0 -33
- package/esm2022/floatingactionbutton/dial-item.component.mjs +0 -161
- package/esm2022/floatingactionbutton/dial-list.component.mjs +0 -98
- package/esm2022/floatingactionbutton/floatingactionbutton.component.mjs +0 -954
- package/esm2022/floatingactionbutton/floatingactionbutton.module.mjs +0 -47
- package/esm2022/floatingactionbutton/models/align.mjs +0 -5
- package/esm2022/floatingactionbutton/models/item-animation.interface.mjs +0 -5
- package/esm2022/floatingactionbutton/models/item-click.event.mjs +0 -5
- package/esm2022/floatingactionbutton/models/item.interface.mjs +0 -5
- package/esm2022/floatingactionbutton/models/offset.mjs +0 -5
- package/esm2022/floatingactionbutton/models/position-mode.mjs +0 -5
- package/esm2022/floatingactionbutton/templates/dial-item-template.directive.mjs +0 -37
- package/esm2022/floatingactionbutton/templates/fab-template.directive.mjs +0 -38
- package/esm2022/floatingactionbutton/utils.mjs +0 -38
- package/esm2022/focusable/focus.service.mjs +0 -38
- package/esm2022/focusable/focusable.directive.mjs +0 -67
- package/esm2022/index.mjs +0 -33
- package/esm2022/listbutton/button-item-template.directive.mjs +0 -47
- package/esm2022/listbutton/container.service.mjs +0 -18
- package/esm2022/listbutton/list-button.mjs +0 -461
- package/esm2022/listbutton/list-item-model.mjs +0 -5
- package/esm2022/listbutton/list.component.mjs +0 -177
- package/esm2022/listbutton/popup-settings.mjs +0 -5
- package/esm2022/navigation/key-events.mjs +0 -13
- package/esm2022/navigation/navigation-action.mjs +0 -20
- package/esm2022/navigation/navigation-config.mjs +0 -9
- package/esm2022/navigation/navigation.service.mjs +0 -111
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/preventable-event.mjs +0 -25
- package/esm2022/progress-kendo-angular-buttons.mjs +0 -8
- package/esm2022/speechtotextbutton/models/error-event.mjs +0 -5
- package/esm2022/speechtotextbutton/models/integration-mode.mjs +0 -5
- package/esm2022/speechtotextbutton/models/result-event.mjs +0 -5
- package/esm2022/speechtotextbutton/models/speechtotextbutton-settings.mjs +0 -5
- package/esm2022/speechtotextbutton/speechtotextbutton.component.mjs +0 -532
- package/esm2022/speechtotextbutton/speechtotextbutton.module.mjs +0 -31
- package/esm2022/splitbutton/localization/custom-messages.component.mjs +0 -40
- package/esm2022/splitbutton/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/splitbutton/localization/messages.mjs +0 -50
- package/esm2022/splitbutton/splitbutton.component.mjs +0 -761
- package/esm2022/splitbutton/splitbutton.module.mjs +0 -37
- package/esm2022/util.mjs +0 -108
|
@@ -160,5 +160,5 @@ export declare class ListButton extends MultiTabStop implements OnDestroy {
|
|
|
160
160
|
private createPopup;
|
|
161
161
|
private destroyPopup;
|
|
162
162
|
static ɵfac: i0.ɵɵFactoryDeclaration<ListButton, never>;
|
|
163
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ListButton, "ng-component", never, { "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "buttonClass": { "alias": "buttonClass"; "required": false; }; "popupSettings": { "alias": "popupSettings"; "required": false; }; }, { "open": "open"; "close": "close"; "escape": "escape"; }, never, never,
|
|
163
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ListButton, "ng-component", never, { "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "buttonClass": { "alias": "buttonClass"; "required": false; }; "popupSettings": { "alias": "popupSettings"; "required": false; }; }, { "open": "open"; "close": "close"; "escape": "escape"; }, never, never, true, never>;
|
|
164
164
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-buttons",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.0-develop.1",
|
|
4
4
|
"description": "Buttons Package for Angular",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -17,29 +17,23 @@
|
|
|
17
17
|
"Progress"
|
|
18
18
|
],
|
|
19
19
|
"@progress": {
|
|
20
|
-
"friendlyName": "Buttons"
|
|
21
|
-
"package": {
|
|
22
|
-
"productName": "Kendo UI for Angular",
|
|
23
|
-
"productCode": "KENDOUIANGULAR",
|
|
24
|
-
"publishDate": 1768393023,
|
|
25
|
-
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
26
|
-
}
|
|
20
|
+
"friendlyName": "Buttons"
|
|
27
21
|
},
|
|
28
22
|
"peerDependencies": {
|
|
29
|
-
"@angular/animations": "
|
|
30
|
-
"@angular/common": "
|
|
31
|
-
"@angular/core": "
|
|
32
|
-
"@angular/platform-browser": "
|
|
23
|
+
"@angular/animations": "19 - 21",
|
|
24
|
+
"@angular/common": "19 - 21",
|
|
25
|
+
"@angular/core": "19 - 21",
|
|
26
|
+
"@angular/platform-browser": "19 - 21",
|
|
33
27
|
"@progress/kendo-licensing": "^1.7.0",
|
|
34
|
-
"@progress/kendo-angular-common": "
|
|
35
|
-
"@progress/kendo-angular-l10n": "
|
|
36
|
-
"@progress/kendo-angular-popup": "
|
|
37
|
-
"@progress/kendo-angular-icons": "
|
|
28
|
+
"@progress/kendo-angular-common": "22.0.0-develop.1",
|
|
29
|
+
"@progress/kendo-angular-l10n": "22.0.0-develop.1",
|
|
30
|
+
"@progress/kendo-angular-popup": "22.0.0-develop.1",
|
|
31
|
+
"@progress/kendo-angular-icons": "22.0.0-develop.1",
|
|
38
32
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
39
33
|
},
|
|
40
34
|
"dependencies": {
|
|
41
35
|
"tslib": "^2.3.1",
|
|
42
|
-
"@progress/kendo-angular-schematics": "
|
|
36
|
+
"@progress/kendo-angular-schematics": "22.0.0-develop.1",
|
|
43
37
|
"@progress/kendo-common": "^1.0.1",
|
|
44
38
|
"@progress/kendo-webspeech-common": "1.0.1"
|
|
45
39
|
},
|
|
@@ -52,8 +46,6 @@
|
|
|
52
46
|
},
|
|
53
47
|
".": {
|
|
54
48
|
"types": "./index.d.ts",
|
|
55
|
-
"esm2022": "./esm2022/progress-kendo-angular-buttons.mjs",
|
|
56
|
-
"esm": "./esm2022/progress-kendo-angular-buttons.mjs",
|
|
57
49
|
"default": "./fesm2022/progress-kendo-angular-buttons.mjs"
|
|
58
50
|
}
|
|
59
51
|
},
|
|
@@ -34,5 +34,5 @@ export declare class Messages extends ComponentMessages {
|
|
|
34
34
|
*/
|
|
35
35
|
toggleButtonLabel: string;
|
|
36
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<Messages, never>;
|
|
37
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages, "kendo-splitbutton-messages-base", never, { "splitButtonLabel": { "alias": "splitButtonLabel"; "required": false; }; "toggleButtonLabel": { "alias": "toggleButtonLabel"; "required": false; }; }, {}, never, never,
|
|
37
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages, "kendo-splitbutton-messages-base", never, { "splitButtonLabel": { "alias": "splitButtonLabel"; "required": false; }; "toggleButtonLabel": { "alias": "toggleButtonLabel"; "required": false; }; }, {}, never, never, true, never>;
|
|
38
38
|
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,558 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, Renderer2, Output, Optional, NgZone, isDevMode } from '@angular/core';
|
|
6
|
-
import { KendoButtonService } from './button.service';
|
|
7
|
-
import { isDocumentAvailable, isChanged, hasObservers, isSafari, isFirefox } from '@progress/kendo-angular-common';
|
|
8
|
-
import { caretAltDownIcon } from '@progress/kendo-svg-icons';
|
|
9
|
-
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
|
-
import { Subscription } from 'rxjs';
|
|
11
|
-
import { validatePackage } from '@progress/kendo-licensing';
|
|
12
|
-
import { packageMetadata } from '../package-metadata';
|
|
13
|
-
import { getStylingClasses, getThemeColorClasses, toggleClass } from '../util';
|
|
14
|
-
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
15
|
-
import { NgClass } from '@angular/common';
|
|
16
|
-
import * as i0 from "@angular/core";
|
|
17
|
-
import * as i1 from "./button.service";
|
|
18
|
-
import * as i2 from "@progress/kendo-angular-l10n";
|
|
19
|
-
const DEFAULT_ROUNDED = 'medium';
|
|
20
|
-
const DEFAULT_SIZE = 'medium';
|
|
21
|
-
const DEFAULT_THEME_COLOR = 'base';
|
|
22
|
-
const DEFAULT_FILL_MODE = 'solid';
|
|
23
|
-
/**
|
|
24
|
-
* Represents the Kendo UI Button component for Angular.
|
|
25
|
-
*
|
|
26
|
-
* As of package v17, the `span[kendoButton]` and `kendo-button` selectors are removed.
|
|
27
|
-
* Use the `button[kendoButton]` selector only.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```html
|
|
31
|
-
* <button kendoButton [icon]="'save'" [themeColor]="'primary'">Save</button>
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export class ButtonComponent {
|
|
35
|
-
renderer;
|
|
36
|
-
service;
|
|
37
|
-
ngZone;
|
|
38
|
-
/**
|
|
39
|
-
* @hidden
|
|
40
|
-
* @default false
|
|
41
|
-
* required for DropDownButton arrow icon.
|
|
42
|
-
*/
|
|
43
|
-
arrowIcon = false;
|
|
44
|
-
/**
|
|
45
|
-
* Adds visual styling to indicate when the Button is active.
|
|
46
|
-
*
|
|
47
|
-
* @default false
|
|
48
|
-
*/
|
|
49
|
-
toggleable = false;
|
|
50
|
-
/**
|
|
51
|
-
* Backwards-compatible alias
|
|
52
|
-
*
|
|
53
|
-
* @hidden
|
|
54
|
-
*/
|
|
55
|
-
get togglable() {
|
|
56
|
-
return this.toggleable;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* @hidden
|
|
60
|
-
*/
|
|
61
|
-
set togglable(value) {
|
|
62
|
-
this.toggleable = value;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Sets the selected state of the Button.
|
|
66
|
-
* Use with the `toggleable` property.
|
|
67
|
-
*
|
|
68
|
-
* @default false
|
|
69
|
-
*/
|
|
70
|
-
get selected() {
|
|
71
|
-
return this._selected || false;
|
|
72
|
-
}
|
|
73
|
-
set selected(value) {
|
|
74
|
-
this._selected = value;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* @hidden
|
|
78
|
-
*/
|
|
79
|
-
set tabIndex(index) {
|
|
80
|
-
this.element.tabIndex = index;
|
|
81
|
-
}
|
|
82
|
-
get tabIndex() {
|
|
83
|
-
return this.element.tabIndex;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Specifies a URL for an `img` element inside the Button.
|
|
87
|
-
* The URL can be relative or absolute. If relative, it is evaluated with relation to the web page URL.
|
|
88
|
-
*/
|
|
89
|
-
imageUrl;
|
|
90
|
-
/**
|
|
91
|
-
* Defines a CSS class, or multiple classes separated by spaces applied to a `span` element inside the Button. Use the `iconClass` to add custom icons.
|
|
92
|
-
*/
|
|
93
|
-
set iconClass(value) {
|
|
94
|
-
if (isDevMode() && value && (this.icon || this.svgIcon)) {
|
|
95
|
-
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
96
|
-
}
|
|
97
|
-
this._iconClass = value;
|
|
98
|
-
}
|
|
99
|
-
get iconClass() {
|
|
100
|
-
return this._iconClass;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Sets the name of an existing font icon in the Kendo UI theme.
|
|
104
|
-
*/
|
|
105
|
-
set icon(name) {
|
|
106
|
-
if (isDevMode() && name && this.iconClass) {
|
|
107
|
-
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
108
|
-
}
|
|
109
|
-
this._icon = name;
|
|
110
|
-
}
|
|
111
|
-
get icon() {
|
|
112
|
-
return this._icon;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* When `true`, disables the Button and prevents user interaction.
|
|
116
|
-
*
|
|
117
|
-
* @default false
|
|
118
|
-
*/
|
|
119
|
-
set disabled(disabled) {
|
|
120
|
-
//Required, because in FF focused buttons are not blurred on disabled
|
|
121
|
-
if (disabled && isDocumentAvailable() && isFirefox(navigator.userAgent)) {
|
|
122
|
-
this.blur();
|
|
123
|
-
}
|
|
124
|
-
this.isDisabled = disabled;
|
|
125
|
-
this.renderer.setProperty(this.element, 'disabled', disabled);
|
|
126
|
-
}
|
|
127
|
-
get disabled() {
|
|
128
|
-
return this.isDisabled;
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Sets the padding of the Button.
|
|
132
|
-
* See [Button Appearance]({% slug appearance_button %}#size).
|
|
133
|
-
*
|
|
134
|
-
* @default 'medium'
|
|
135
|
-
*/
|
|
136
|
-
set size(size) {
|
|
137
|
-
const newSize = size || DEFAULT_SIZE;
|
|
138
|
-
this.handleClasses(newSize, 'size');
|
|
139
|
-
this._size = newSize;
|
|
140
|
-
}
|
|
141
|
-
get size() {
|
|
142
|
-
return this._size;
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Sets the border radius of the Button.
|
|
146
|
-
* See [Button Appearance](slug:appearance_button#roundness).
|
|
147
|
-
*
|
|
148
|
-
* @default 'medium'
|
|
149
|
-
*/
|
|
150
|
-
set rounded(rounded) {
|
|
151
|
-
const newRounded = rounded || DEFAULT_ROUNDED;
|
|
152
|
-
this.handleClasses(newRounded, 'rounded');
|
|
153
|
-
this._rounded = newRounded;
|
|
154
|
-
}
|
|
155
|
-
get rounded() {
|
|
156
|
-
return this._rounded;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Sets the background and border styles of the Button.
|
|
160
|
-
* See [Button Appearance](slug:appearance_button#fill-mode).
|
|
161
|
-
*
|
|
162
|
-
* @default 'solid'
|
|
163
|
-
*/
|
|
164
|
-
set fillMode(fillMode) {
|
|
165
|
-
const newFillMode = fillMode || DEFAULT_FILL_MODE;
|
|
166
|
-
this.handleClasses(newFillMode, 'fillMode');
|
|
167
|
-
this._fillMode = newFillMode;
|
|
168
|
-
}
|
|
169
|
-
get fillMode() {
|
|
170
|
-
return this._fillMode;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Sets a predefined theme color for the Button.
|
|
174
|
-
* The theme color applies as a background and border color and adjusts the text color.
|
|
175
|
-
* See [Button Appearance](slug:appearance_button#theme-colors).
|
|
176
|
-
*
|
|
177
|
-
* @default 'base'
|
|
178
|
-
*/
|
|
179
|
-
set themeColor(themeColor) {
|
|
180
|
-
const newThemeColor = themeColor || DEFAULT_THEME_COLOR;
|
|
181
|
-
this.handleThemeColor(newThemeColor);
|
|
182
|
-
this._themeColor = newThemeColor;
|
|
183
|
-
}
|
|
184
|
-
get themeColor() {
|
|
185
|
-
return this._themeColor;
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Sets an SVG icon to display inside the Button.
|
|
189
|
-
*/
|
|
190
|
-
set svgIcon(icon) {
|
|
191
|
-
if (isDevMode() && icon && this.iconClass) {
|
|
192
|
-
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
193
|
-
}
|
|
194
|
-
this._svgIcon = icon;
|
|
195
|
-
}
|
|
196
|
-
get svgIcon() {
|
|
197
|
-
return this._svgIcon;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Fires when the selected state of a toggleable button changes.
|
|
201
|
-
* The event argument is the new selected state (`boolean`).
|
|
202
|
-
*/
|
|
203
|
-
selectedChange = new EventEmitter();
|
|
204
|
-
/**
|
|
205
|
-
* Fires when the user clicks the Button.
|
|
206
|
-
*/
|
|
207
|
-
click = new EventEmitter();
|
|
208
|
-
element;
|
|
209
|
-
isDisabled = false;
|
|
210
|
-
caretAltDownIcon = caretAltDownIcon;
|
|
211
|
-
_size = DEFAULT_SIZE;
|
|
212
|
-
_rounded = DEFAULT_ROUNDED;
|
|
213
|
-
_fillMode = DEFAULT_FILL_MODE;
|
|
214
|
-
_themeColor = DEFAULT_THEME_COLOR;
|
|
215
|
-
_focused = false;
|
|
216
|
-
direction;
|
|
217
|
-
_selected;
|
|
218
|
-
subs = new Subscription();
|
|
219
|
-
_iconClass;
|
|
220
|
-
_icon;
|
|
221
|
-
_svgIcon;
|
|
222
|
-
set isFocused(isFocused) {
|
|
223
|
-
toggleClass('k-focus', isFocused, this.renderer, this.element);
|
|
224
|
-
this._focused = isFocused;
|
|
225
|
-
}
|
|
226
|
-
get isFocused() {
|
|
227
|
-
return this._focused;
|
|
228
|
-
}
|
|
229
|
-
get classButton() {
|
|
230
|
-
return true;
|
|
231
|
-
}
|
|
232
|
-
get isToggleable() {
|
|
233
|
-
return this.toggleable;
|
|
234
|
-
}
|
|
235
|
-
get iconButtonClass() {
|
|
236
|
-
const hasIcon = this.icon || this.iconClass || this.imageUrl || this.svgIcon;
|
|
237
|
-
return hasIcon && !this.hasText;
|
|
238
|
-
}
|
|
239
|
-
get classDisabled() {
|
|
240
|
-
return this.isDisabled;
|
|
241
|
-
}
|
|
242
|
-
get classActive() {
|
|
243
|
-
return this.selected;
|
|
244
|
-
}
|
|
245
|
-
get getDirection() {
|
|
246
|
-
return this.direction;
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* @hidden
|
|
250
|
-
*/
|
|
251
|
-
onFocus() {
|
|
252
|
-
this.isFocused = true;
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* @hidden
|
|
256
|
-
*/
|
|
257
|
-
onBlur() {
|
|
258
|
-
this.isFocused = false;
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* @hidden
|
|
262
|
-
*/
|
|
263
|
-
set primary(value) {
|
|
264
|
-
this.themeColor = value ? 'primary' : 'base';
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* @hidden
|
|
268
|
-
*/
|
|
269
|
-
set look(value) {
|
|
270
|
-
this.fillMode = (value === 'default') ? 'solid' : value;
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Alias for ElementRef.nativeElement to workaround
|
|
274
|
-
* ViewChild() selectors that used to return the host element before v11.
|
|
275
|
-
*
|
|
276
|
-
* @hidden
|
|
277
|
-
*/
|
|
278
|
-
get nativeElement() {
|
|
279
|
-
return this.element;
|
|
280
|
-
}
|
|
281
|
-
constructor(element, renderer, service, localization, ngZone) {
|
|
282
|
-
this.renderer = renderer;
|
|
283
|
-
this.service = service;
|
|
284
|
-
this.ngZone = ngZone;
|
|
285
|
-
validatePackage(packageMetadata);
|
|
286
|
-
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
287
|
-
this.subs.add(localization.changes.subscribe(({ rtl }) => (this.direction = rtl ? 'rtl' : 'ltr')));
|
|
288
|
-
this.element = element.nativeElement;
|
|
289
|
-
}
|
|
290
|
-
ngOnInit() {
|
|
291
|
-
if (!this.element.hasAttribute('role') && this.togglable) {
|
|
292
|
-
this.toggleAriaPressed(this.toggleable);
|
|
293
|
-
}
|
|
294
|
-
this.ngZone.runOutsideAngular(() => {
|
|
295
|
-
this.subs.add(this.renderer.listen(this.element, 'click', this._onButtonClick.bind(this)));
|
|
296
|
-
this.subs.add(this.renderer.listen(this.element, 'mousedown', (event) => {
|
|
297
|
-
const isBrowserSafari = isDocumentAvailable() && isSafari(navigator.userAgent);
|
|
298
|
-
if (!this.isDisabled && isBrowserSafari) {
|
|
299
|
-
event.preventDefault();
|
|
300
|
-
this.element.focus();
|
|
301
|
-
}
|
|
302
|
-
}));
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
ngOnChanges(change) {
|
|
306
|
-
if (isChanged('togglable', change) || isChanged('toggleable', change)) {
|
|
307
|
-
this.toggleAriaPressed(this.toggleable);
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
ngAfterViewInit() {
|
|
311
|
-
const stylingOptions = ['size', 'rounded', 'fillMode'];
|
|
312
|
-
stylingOptions.forEach(input => {
|
|
313
|
-
this.handleClasses(this[input], input);
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
ngOnDestroy() {
|
|
317
|
-
this.subs.unsubscribe();
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* @hidden
|
|
321
|
-
*/
|
|
322
|
-
get hasText() {
|
|
323
|
-
return isDocumentAvailable() && this.element.textContent.trim().length > 0;
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Focuses the Button component.
|
|
327
|
-
*/
|
|
328
|
-
focus() {
|
|
329
|
-
if (isDocumentAvailable()) {
|
|
330
|
-
this.element.focus();
|
|
331
|
-
this.isFocused = true;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Removes focus from the Button component.
|
|
336
|
-
*/
|
|
337
|
-
blur() {
|
|
338
|
-
if (isDocumentAvailable()) {
|
|
339
|
-
this.element.blur();
|
|
340
|
-
this.isFocused = false;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
* @hidden
|
|
345
|
-
*/
|
|
346
|
-
setAttribute(attribute, value) {
|
|
347
|
-
this.renderer.setAttribute(this.element, attribute, value);
|
|
348
|
-
}
|
|
349
|
-
/**
|
|
350
|
-
* @hidden
|
|
351
|
-
*/
|
|
352
|
-
removeAttribute(attribute) {
|
|
353
|
-
this.renderer.removeAttribute(this.element, attribute);
|
|
354
|
-
}
|
|
355
|
-
/**
|
|
356
|
-
* @hidden
|
|
357
|
-
*
|
|
358
|
-
* Internal setter that triggers selectedChange
|
|
359
|
-
*/
|
|
360
|
-
setSelected(value) {
|
|
361
|
-
const changed = this.selected !== value;
|
|
362
|
-
this.selected = value;
|
|
363
|
-
this.setAttribute('aria-pressed', this.selected.toString());
|
|
364
|
-
toggleClass('k-selected', this.selected, this.renderer, this.element);
|
|
365
|
-
if (changed && hasObservers(this.selectedChange)) {
|
|
366
|
-
this.ngZone.run(() => {
|
|
367
|
-
this.selectedChange.emit(value);
|
|
368
|
-
});
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
toggleAriaPressed(shouldSet) {
|
|
372
|
-
if (!isDocumentAvailable()) {
|
|
373
|
-
return;
|
|
374
|
-
}
|
|
375
|
-
if (shouldSet) {
|
|
376
|
-
this.setAttribute('aria-pressed', this.selected.toString());
|
|
377
|
-
}
|
|
378
|
-
else {
|
|
379
|
-
this.removeAttribute('aria-pressed');
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
_onButtonClick() {
|
|
383
|
-
if (!this.disabled && this.service) {
|
|
384
|
-
this.ngZone.run(() => {
|
|
385
|
-
this.service.click(this);
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
if (this.togglable && !this.service) {
|
|
389
|
-
this.setSelected(!this.selected);
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
handleClasses(value, input) {
|
|
393
|
-
const elem = this.element;
|
|
394
|
-
const classes = getStylingClasses('button', input, this[input], value);
|
|
395
|
-
if (input === 'fillMode') {
|
|
396
|
-
this.handleThemeColor(this.themeColor, this[input], value);
|
|
397
|
-
}
|
|
398
|
-
if (classes.toRemove) {
|
|
399
|
-
this.renderer.removeClass(elem, classes.toRemove);
|
|
400
|
-
}
|
|
401
|
-
if (classes.toAdd) {
|
|
402
|
-
this.renderer.addClass(elem, classes.toAdd);
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
handleThemeColor(value, prevFillMode, fillMode) {
|
|
406
|
-
const elem = this.element;
|
|
407
|
-
const removeFillMode = prevFillMode || this.fillMode;
|
|
408
|
-
const addFillMode = fillMode || this.fillMode;
|
|
409
|
-
const themeColorClass = getThemeColorClasses('button', removeFillMode, addFillMode, this.themeColor, value);
|
|
410
|
-
this.renderer.removeClass(elem, themeColorClass.toRemove);
|
|
411
|
-
if (addFillMode !== 'none' && fillMode !== 'none') {
|
|
412
|
-
if (themeColorClass.toAdd) {
|
|
413
|
-
this.renderer.addClass(elem, themeColorClass.toAdd);
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", 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 });
|
|
418
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ButtonComponent, isStandalone: true, selector: "button[kendoButton]", 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", 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", "class.k-disabled": "this.classDisabled", "class.k-selected": "this.classActive", "attr.dir": "this.getDirection" } }, providers: [
|
|
419
|
-
LocalizationService,
|
|
420
|
-
{
|
|
421
|
-
provide: L10N_PREFIX,
|
|
422
|
-
useValue: 'kendo.button'
|
|
423
|
-
}
|
|
424
|
-
], exportAs: ["kendoButton"], usesOnChanges: true, ngImport: i0, template: `
|
|
425
|
-
@if (icon || svgIcon) {
|
|
426
|
-
<kendo-icon-wrapper
|
|
427
|
-
innerCssClass="k-button-icon"
|
|
428
|
-
[name]="icon"
|
|
429
|
-
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
430
|
-
}
|
|
431
|
-
@if (imageUrl) {
|
|
432
|
-
<span class="k-button-icon k-icon">
|
|
433
|
-
<img [src]="imageUrl" class="k-image" role="presentation" />
|
|
434
|
-
</span>
|
|
435
|
-
}
|
|
436
|
-
@if (iconClass) {
|
|
437
|
-
<span class="k-button-icon" [ngClass]="iconClass"></span>
|
|
438
|
-
}
|
|
439
|
-
<span class="k-button-text"><ng-content></ng-content></span>
|
|
440
|
-
@if ($any(arrowIcon).iconClass) {
|
|
441
|
-
<span class="k-button-icon" [ngClass]="$any(arrowIcon).iconClass"></span>
|
|
442
|
-
}
|
|
443
|
-
@if (arrowIcon && !$any(arrowIcon).iconClass) {
|
|
444
|
-
<span class="k-button-arrow">
|
|
445
|
-
<kendo-icon-wrapper
|
|
446
|
-
[name]="$any(arrowIcon).icon || 'caret-alt-down'"
|
|
447
|
-
[svgIcon]="$any(arrowIcon).svgIcon || caretAltDownIcon"></kendo-icon-wrapper>
|
|
448
|
-
</span>
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
452
|
-
}
|
|
453
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
454
|
-
type: Component,
|
|
455
|
-
args: [{
|
|
456
|
-
exportAs: 'kendoButton',
|
|
457
|
-
providers: [
|
|
458
|
-
LocalizationService,
|
|
459
|
-
{
|
|
460
|
-
provide: L10N_PREFIX,
|
|
461
|
-
useValue: 'kendo.button'
|
|
462
|
-
}
|
|
463
|
-
],
|
|
464
|
-
selector: 'button[kendoButton]',
|
|
465
|
-
template: `
|
|
466
|
-
@if (icon || svgIcon) {
|
|
467
|
-
<kendo-icon-wrapper
|
|
468
|
-
innerCssClass="k-button-icon"
|
|
469
|
-
[name]="icon"
|
|
470
|
-
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
471
|
-
}
|
|
472
|
-
@if (imageUrl) {
|
|
473
|
-
<span class="k-button-icon k-icon">
|
|
474
|
-
<img [src]="imageUrl" class="k-image" role="presentation" />
|
|
475
|
-
</span>
|
|
476
|
-
}
|
|
477
|
-
@if (iconClass) {
|
|
478
|
-
<span class="k-button-icon" [ngClass]="iconClass"></span>
|
|
479
|
-
}
|
|
480
|
-
<span class="k-button-text"><ng-content></ng-content></span>
|
|
481
|
-
@if ($any(arrowIcon).iconClass) {
|
|
482
|
-
<span class="k-button-icon" [ngClass]="$any(arrowIcon).iconClass"></span>
|
|
483
|
-
}
|
|
484
|
-
@if (arrowIcon && !$any(arrowIcon).iconClass) {
|
|
485
|
-
<span class="k-button-arrow">
|
|
486
|
-
<kendo-icon-wrapper
|
|
487
|
-
[name]="$any(arrowIcon).icon || 'caret-alt-down'"
|
|
488
|
-
[svgIcon]="$any(arrowIcon).svgIcon || caretAltDownIcon"></kendo-icon-wrapper>
|
|
489
|
-
</span>
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
`,
|
|
493
|
-
standalone: true,
|
|
494
|
-
imports: [IconWrapperComponent, NgClass]
|
|
495
|
-
}]
|
|
496
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.KendoButtonService, decorators: [{
|
|
497
|
-
type: Optional
|
|
498
|
-
}] }, { type: i2.LocalizationService }, { type: i0.NgZone }], propDecorators: { arrowIcon: [{
|
|
499
|
-
type: Input
|
|
500
|
-
}], toggleable: [{
|
|
501
|
-
type: Input
|
|
502
|
-
}], togglable: [{
|
|
503
|
-
type: Input
|
|
504
|
-
}], selected: [{
|
|
505
|
-
type: Input
|
|
506
|
-
}], tabIndex: [{
|
|
507
|
-
type: Input
|
|
508
|
-
}], imageUrl: [{
|
|
509
|
-
type: Input
|
|
510
|
-
}], iconClass: [{
|
|
511
|
-
type: Input
|
|
512
|
-
}], icon: [{
|
|
513
|
-
type: Input
|
|
514
|
-
}], disabled: [{
|
|
515
|
-
type: Input
|
|
516
|
-
}], size: [{
|
|
517
|
-
type: Input
|
|
518
|
-
}], rounded: [{
|
|
519
|
-
type: Input
|
|
520
|
-
}], fillMode: [{
|
|
521
|
-
type: Input
|
|
522
|
-
}], themeColor: [{
|
|
523
|
-
type: Input
|
|
524
|
-
}], svgIcon: [{
|
|
525
|
-
type: Input
|
|
526
|
-
}], selectedChange: [{
|
|
527
|
-
type: Output
|
|
528
|
-
}], click: [{
|
|
529
|
-
type: Output
|
|
530
|
-
}], classButton: [{
|
|
531
|
-
type: HostBinding,
|
|
532
|
-
args: ['class.k-button']
|
|
533
|
-
}], isToggleable: [{
|
|
534
|
-
type: HostBinding,
|
|
535
|
-
args: ['class.k-toggle-button']
|
|
536
|
-
}], iconButtonClass: [{
|
|
537
|
-
type: HostBinding,
|
|
538
|
-
args: ['class.k-icon-button']
|
|
539
|
-
}], classDisabled: [{
|
|
540
|
-
type: HostBinding,
|
|
541
|
-
args: ['class.k-disabled']
|
|
542
|
-
}], classActive: [{
|
|
543
|
-
type: HostBinding,
|
|
544
|
-
args: ['class.k-selected']
|
|
545
|
-
}], getDirection: [{
|
|
546
|
-
type: HostBinding,
|
|
547
|
-
args: ['attr.dir']
|
|
548
|
-
}], onFocus: [{
|
|
549
|
-
type: HostListener,
|
|
550
|
-
args: ['focus']
|
|
551
|
-
}], onBlur: [{
|
|
552
|
-
type: HostListener,
|
|
553
|
-
args: ['blur']
|
|
554
|
-
}], primary: [{
|
|
555
|
-
type: Input
|
|
556
|
-
}], look: [{
|
|
557
|
-
type: Input
|
|
558
|
-
}] } });
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { NgModule } from '@angular/core';
|
|
6
|
-
import { ButtonComponent } from './button.component';
|
|
7
|
-
import { IconsService } from '@progress/kendo-angular-icons';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
//IMPORTANT: NgModule export kept for backwards compatibility
|
|
10
|
-
/**
|
|
11
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmodules'])
|
|
12
|
-
* definition for the Button directive.
|
|
13
|
-
*
|
|
14
|
-
* Required for adding Button features in NgModule-based Angular applications.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```typescript
|
|
18
|
-
* import { ButtonModule } from '@progress/kendo-angular-buttons';
|
|
19
|
-
* import { NgModule } from '@angular/core';
|
|
20
|
-
* import { BrowserModule } from '@angular/platform-browser';
|
|
21
|
-
* import { AppComponent } from './app.component';
|
|
22
|
-
*
|
|
23
|
-
* @NgModule({
|
|
24
|
-
* declarations: [AppComponent],
|
|
25
|
-
* imports: [BrowserModule, ButtonModule],
|
|
26
|
-
* bootstrap: [AppComponent]
|
|
27
|
-
* })
|
|
28
|
-
* export class AppModule {}
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
export class ButtonModule {
|
|
32
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
33
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: ButtonModule, imports: [ButtonComponent], exports: [ButtonComponent] });
|
|
34
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ButtonModule, providers: [IconsService], imports: [ButtonComponent] });
|
|
35
|
-
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ButtonModule, decorators: [{
|
|
37
|
-
type: NgModule,
|
|
38
|
-
args: [{
|
|
39
|
-
imports: [ButtonComponent],
|
|
40
|
-
exports: [ButtonComponent],
|
|
41
|
-
providers: [IconsService]
|
|
42
|
-
}]
|
|
43
|
-
}] });
|