@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.
Files changed (73) hide show
  1. package/fesm2022/progress-kendo-angular-buttons.mjs +105 -105
  2. package/listbutton/list-button.d.ts +1 -1
  3. package/package.json +11 -19
  4. package/splitbutton/localization/messages.d.ts +1 -1
  5. package/esm2022/button/button-settings.mjs +0 -5
  6. package/esm2022/button/button.component.mjs +0 -558
  7. package/esm2022/button/button.module.mjs +0 -43
  8. package/esm2022/button/button.service.mjs +0 -22
  9. package/esm2022/button/selection-settings.mjs +0 -5
  10. package/esm2022/buttongroup/buttongroup.component.mjs +0 -340
  11. package/esm2022/buttongroup/buttongroup.module.mjs +0 -49
  12. package/esm2022/buttons.module.mjs +0 -58
  13. package/esm2022/chip/chip-content-click-event-args.interface.mjs +0 -5
  14. package/esm2022/chip/chip-list-remove-event-args.interface.mjs +0 -5
  15. package/esm2022/chip/chip-list.component.mjs +0 -360
  16. package/esm2022/chip/chip-remove-event-args.interface.mjs +0 -5
  17. package/esm2022/chip/chip.component.mjs +0 -585
  18. package/esm2022/chip/chip.module.mjs +0 -45
  19. package/esm2022/chip/models/avatar-settings.interface.mjs +0 -5
  20. package/esm2022/chip/models/selection.mjs +0 -5
  21. package/esm2022/common/models/arrow-settings.mjs +0 -5
  22. package/esm2022/common/models/fillmode.mjs +0 -5
  23. package/esm2022/common/models/rounded.mjs +0 -5
  24. package/esm2022/common/models/size.mjs +0 -5
  25. package/esm2022/common/models/styling-classes.mjs +0 -5
  26. package/esm2022/common/models/theme-color.mjs +0 -5
  27. package/esm2022/common/models.mjs +0 -10
  28. package/esm2022/direction.mjs +0 -5
  29. package/esm2022/directives.mjs +0 -176
  30. package/esm2022/dropdownbutton/dropdownbutton.component.mjs +0 -482
  31. package/esm2022/dropdownbutton/dropdownbutton.module.mjs +0 -50
  32. package/esm2022/floatingactionbutton/animations/animations.mjs +0 -33
  33. package/esm2022/floatingactionbutton/dial-item.component.mjs +0 -161
  34. package/esm2022/floatingactionbutton/dial-list.component.mjs +0 -98
  35. package/esm2022/floatingactionbutton/floatingactionbutton.component.mjs +0 -954
  36. package/esm2022/floatingactionbutton/floatingactionbutton.module.mjs +0 -47
  37. package/esm2022/floatingactionbutton/models/align.mjs +0 -5
  38. package/esm2022/floatingactionbutton/models/item-animation.interface.mjs +0 -5
  39. package/esm2022/floatingactionbutton/models/item-click.event.mjs +0 -5
  40. package/esm2022/floatingactionbutton/models/item.interface.mjs +0 -5
  41. package/esm2022/floatingactionbutton/models/offset.mjs +0 -5
  42. package/esm2022/floatingactionbutton/models/position-mode.mjs +0 -5
  43. package/esm2022/floatingactionbutton/templates/dial-item-template.directive.mjs +0 -37
  44. package/esm2022/floatingactionbutton/templates/fab-template.directive.mjs +0 -38
  45. package/esm2022/floatingactionbutton/utils.mjs +0 -38
  46. package/esm2022/focusable/focus.service.mjs +0 -38
  47. package/esm2022/focusable/focusable.directive.mjs +0 -67
  48. package/esm2022/index.mjs +0 -33
  49. package/esm2022/listbutton/button-item-template.directive.mjs +0 -47
  50. package/esm2022/listbutton/container.service.mjs +0 -18
  51. package/esm2022/listbutton/list-button.mjs +0 -461
  52. package/esm2022/listbutton/list-item-model.mjs +0 -5
  53. package/esm2022/listbutton/list.component.mjs +0 -177
  54. package/esm2022/listbutton/popup-settings.mjs +0 -5
  55. package/esm2022/navigation/key-events.mjs +0 -13
  56. package/esm2022/navigation/navigation-action.mjs +0 -20
  57. package/esm2022/navigation/navigation-config.mjs +0 -9
  58. package/esm2022/navigation/navigation.service.mjs +0 -111
  59. package/esm2022/package-metadata.mjs +0 -16
  60. package/esm2022/preventable-event.mjs +0 -25
  61. package/esm2022/progress-kendo-angular-buttons.mjs +0 -8
  62. package/esm2022/speechtotextbutton/models/error-event.mjs +0 -5
  63. package/esm2022/speechtotextbutton/models/integration-mode.mjs +0 -5
  64. package/esm2022/speechtotextbutton/models/result-event.mjs +0 -5
  65. package/esm2022/speechtotextbutton/models/speechtotextbutton-settings.mjs +0 -5
  66. package/esm2022/speechtotextbutton/speechtotextbutton.component.mjs +0 -532
  67. package/esm2022/speechtotextbutton/speechtotextbutton.module.mjs +0 -31
  68. package/esm2022/splitbutton/localization/custom-messages.component.mjs +0 -40
  69. package/esm2022/splitbutton/localization/localized-messages.directive.mjs +0 -39
  70. package/esm2022/splitbutton/localization/messages.mjs +0 -50
  71. package/esm2022/splitbutton/splitbutton.component.mjs +0 -761
  72. package/esm2022/splitbutton/splitbutton.module.mjs +0 -37
  73. package/esm2022/util.mjs +0 -108
@@ -1,360 +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, Input, HostBinding, ContentChildren, QueryList, EventEmitter, Output, HostListener, Renderer2, ElementRef, NgZone } from '@angular/core';
6
- import { Subscription } from 'rxjs';
7
- import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
8
- import { ChipComponent } from './chip.component';
9
- import { closest, getStylingClasses } from '../util';
10
- import { validatePackage } from '@progress/kendo-licensing';
11
- import { packageMetadata } from '../package-metadata';
12
- import { isDocumentAvailable, Keys, normalizeKeys } from '@progress/kendo-angular-common';
13
- import * as i0 from "@angular/core";
14
- import * as i1 from "@progress/kendo-angular-l10n";
15
- /**
16
- * Represents the Kendo UI ChipList component for Angular. Displays a list of Chip components.
17
- *
18
- * @example
19
- * ```html
20
- * <kendo-chiplist selection="multiple">
21
- * <kendo-chip label="Chip 1"></kendo-chip>
22
- * <kendo-chip label="Chip 2"></kendo-chip>
23
- * </kendo-chiplist>
24
- * ```
25
- * @remarks
26
- * Supported children components are: {@link ChipComponent}.
27
- */
28
- export class ChipListComponent {
29
- localizationService;
30
- renderer;
31
- element;
32
- ngZone;
33
- hostClass = true;
34
- /**
35
- * @hidden
36
- */
37
- orientation = 'horizontal';
38
- /**
39
- * @hidden
40
- */
41
- direction;
42
- /**
43
- * Sets the selection mode of the ChipList.
44
- *
45
- * @default 'none'
46
- */
47
- selection = 'none';
48
- /**
49
- * Sets the gap between the Chips in the ChipList.
50
- * See [ChipList Appearance]({% slug appearance_chiplist %}#size).
51
- *
52
- * @default 'medium'
53
- */
54
- set size(size) {
55
- const sizeValue = size || 'medium';
56
- this.handleClasses(sizeValue, 'size');
57
- this.chips?.forEach(chip => this.setChipSize(chip, sizeValue));
58
- this._size = sizeValue;
59
- }
60
- get size() {
61
- return this._size;
62
- }
63
- /**
64
- * Fires when the ChipList selection changes.
65
- */
66
- selectedChange = new EventEmitter();
67
- /**
68
- * Fires when the user clicks the remove icon of a Chip in the ChipList.
69
- */
70
- remove = new EventEmitter();
71
- chips;
72
- get single() {
73
- return this.selection === 'single';
74
- }
75
- get multiple() {
76
- return this.selection === 'multiple' ? true : undefined;
77
- }
78
- /**
79
- * @hidden
80
- */
81
- role = 'listbox';
82
- dynamicRTLSubscription;
83
- _size = 'medium';
84
- subs = new Subscription();
85
- _navigable = true;
86
- /**
87
- * @hidden
88
- */
89
- onClick($event) {
90
- const target = $event.target;
91
- const isRemoveClicked = closest(target, '.k-chip-remove-action');
92
- const clickedChip = closest(target, '.k-chip');
93
- const chip = this.chips.find((chip) => clickedChip === chip.element.nativeElement);
94
- this.currentActiveIndex = this.chips.toArray().indexOf(chip);
95
- chip?.focus();
96
- if (chip && this.navigable) {
97
- this.chips.forEach((c) => {
98
- this.renderer.setAttribute(c.element.nativeElement, 'tabindex', '-1');
99
- });
100
- this.renderer.setAttribute(chip.element.nativeElement, 'tabindex', '0');
101
- }
102
- if (isRemoveClicked && clickedChip) {
103
- const removeEventArgs = { sender: this, originalEvent: $event, removedChip: chip };
104
- this.remove.emit(removeEventArgs);
105
- }
106
- if (this.selection !== 'none' && clickedChip && !isRemoveClicked) {
107
- this.setSelection(chip);
108
- }
109
- }
110
- /**
111
- * By default, keyboard navigation is available through arrow keys and roving tabindex.
112
- * When set to `false`, all chips are part of the default tabbing sequence of the page.
113
- *
114
- * @default true
115
- */
116
- set navigable(value) {
117
- this._navigable = value;
118
- this.chips?.forEach(c => this.renderer.setAttribute(c.element.nativeElement, 'tabindex', value ? '-1' : '0'));
119
- if (this.chips?.first) {
120
- this.renderer.setAttribute(this.chips.first.element.nativeElement, 'tabindex', '0');
121
- }
122
- }
123
- get navigable() {
124
- return this._navigable;
125
- }
126
- currentActiveIndex = 0;
127
- constructor(localizationService, renderer, element, ngZone) {
128
- this.localizationService = localizationService;
129
- this.renderer = renderer;
130
- this.element = element;
131
- this.ngZone = ngZone;
132
- validatePackage(packageMetadata);
133
- this.direction = localizationService.rtl ? 'rtl' : 'ltr';
134
- }
135
- ngOnInit() {
136
- this.dynamicRTLSubscription = this.localizationService.changes
137
- .subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr');
138
- }
139
- ngAfterViewInit() {
140
- const stylingInputs = ['size'];
141
- stylingInputs.forEach(input => {
142
- this.handleClasses(this[input], input);
143
- });
144
- this.attachElementEventHandlers();
145
- this.updateChips();
146
- }
147
- ngAfterContentInit() {
148
- this.subs.add(this.chips?.changes.subscribe(() => this.updateChips()));
149
- }
150
- ngOnDestroy() {
151
- if (this.dynamicRTLSubscription) {
152
- this.dynamicRTLSubscription.unsubscribe();
153
- }
154
- this.subs.unsubscribe();
155
- }
156
- selectedChips() {
157
- return this.chips.reduce((acc, cur, idx) => { return cur.selected ? acc.concat(idx) : acc; }, []);
158
- }
159
- /**
160
- * Updates the selection on click of a Chip. Emits events.
161
- */
162
- setSelection(chip) {
163
- if (this.selection === 'single') {
164
- this.clearSelection(chip);
165
- }
166
- chip.selected = !chip.selected;
167
- const chipEl = chip.element.nativeElement;
168
- this.renderer.setAttribute(chipEl, 'aria-selected', `${chip.selected}`);
169
- this.selectedChange.emit(this.selectedChips());
170
- }
171
- clearSelection(chip) {
172
- this.chips.forEach((c) => {
173
- if (chip !== c) {
174
- c.selected = false;
175
- this.renderer.setAttribute(c.element.nativeElement, 'aria-selected', 'false');
176
- }
177
- });
178
- }
179
- handleClasses(value, input) {
180
- const elem = this.element.nativeElement;
181
- const classes = getStylingClasses('chip-list', input, this[input], value);
182
- if (classes.toRemove) {
183
- this.renderer.removeClass(elem, classes.toRemove);
184
- }
185
- if (classes.toAdd) {
186
- this.renderer.addClass(elem, classes.toAdd);
187
- }
188
- }
189
- attachElementEventHandlers() {
190
- const chiplist = this.element.nativeElement;
191
- this.ngZone.runOutsideAngular(() => {
192
- this.subs.add(this.renderer.listen(chiplist, 'keydown', this.keyDownHandler.bind(this)));
193
- });
194
- }
195
- keyDownHandler(e) {
196
- // on some keyboards, arrow keys, page up/down, home/end, Enter are mapped to numpad keys
197
- const code = normalizeKeys(e);
198
- const isEnterOrSpace = code === Keys.Enter || code === Keys.Space;
199
- const isDeleteOrBackspace = code === Keys.Delete || code === Keys.Backspace;
200
- const isLeftArrow = code === Keys.ArrowLeft;
201
- const isRightArrow = code === Keys.ArrowRight;
202
- if (isEnterOrSpace) {
203
- const target = e.target;
204
- const clickedChip = closest(target, '.k-chip');
205
- const chip = this.chips.find((chip) => clickedChip === chip.element.nativeElement);
206
- this.currentActiveIndex = this.chips.toArray().findIndex((chip) => clickedChip === chip.element.nativeElement);
207
- if (this.selection !== 'none' && clickedChip) {
208
- this.ngZone.run(() => {
209
- this.setSelection(chip);
210
- });
211
- }
212
- }
213
- else if (isDeleteOrBackspace) {
214
- const target = e.target;
215
- const clickedChip = closest(target, '.k-chip');
216
- const chip = this.chips.find((chip) => clickedChip === chip.element.nativeElement);
217
- if (clickedChip) {
218
- const removeEventArgs = { sender: this, originalEvent: e, removedChip: chip };
219
- this.ngZone.run(() => {
220
- this.remove.emit(removeEventArgs);
221
- });
222
- }
223
- }
224
- else if (isLeftArrow) {
225
- this.handleArrowKeys('left');
226
- }
227
- else if (isRightArrow) {
228
- this.handleArrowKeys('right');
229
- }
230
- }
231
- handleArrowKeys(direction) {
232
- if (!this.navigable) {
233
- return;
234
- }
235
- const directionDelta = direction === 'left' ? -1 : 1;
236
- this.currentActiveIndex = this.currentActiveIndex + directionDelta;
237
- if (this.currentActiveIndex >= this.chips.length) {
238
- this.currentActiveIndex = 0;
239
- }
240
- else if (this.currentActiveIndex < 0) {
241
- this.currentActiveIndex = this.chips.length - 1;
242
- }
243
- this.chips.forEach((chip, idx) => {
244
- this.renderer.setAttribute(chip.element.nativeElement, 'tabindex', '-1');
245
- if (idx === this.currentActiveIndex) {
246
- this.renderer.setAttribute(chip.element.nativeElement, 'tabindex', '0');
247
- chip.focus();
248
- }
249
- });
250
- }
251
- updateChips() {
252
- this.normalizeActiveIndex();
253
- this.chips.forEach((chip, idx) => {
254
- const chipEl = chip.element.nativeElement;
255
- this.renderer.removeAttribute(chipEl, 'aria-pressed');
256
- if (this.selection !== 'none') {
257
- this.renderer.setAttribute(chipEl, 'aria-selected', `${chip.selected}`);
258
- }
259
- if (this.role === 'listbox') {
260
- this.renderer.setAttribute(chipEl, 'role', 'option');
261
- }
262
- if (!this.navigable) {
263
- return;
264
- }
265
- this.renderer.setAttribute(chipEl, 'tabindex', '-1');
266
- if (idx === this.currentActiveIndex) {
267
- this.renderer.setAttribute(chipEl, 'tabindex', '0');
268
- if (isDocumentAvailable() && document.activeElement.closest('.k-chip-list')) {
269
- chip.focus();
270
- }
271
- }
272
- if (chip.removable) {
273
- this.renderer.setAttribute(chipEl, 'aria-keyshortcuts', 'Enter Delete');
274
- }
275
- this.setChipSize(chip, this.size);
276
- });
277
- }
278
- normalizeActiveIndex() {
279
- if (this.currentActiveIndex >= this.chips.length) {
280
- this.currentActiveIndex = Math.max(this.chips.length - 1, 0);
281
- }
282
- }
283
- setChipSize(chip, size) {
284
- const hasSize = chip.sizeIsSet;
285
- if (!hasSize && chip.size !== size) {
286
- chip.size = size;
287
- }
288
- if (!hasSize) {
289
- chip.sizeIsSet = false;
290
- }
291
- }
292
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChipListComponent, deps: [{ token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
293
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ChipListComponent, isStandalone: true, selector: "kendo-chiplist, kendo-chip-list", inputs: { orientation: "orientation", selection: "selection", size: "size", role: "role", navigable: "navigable" }, outputs: { selectedChange: "selectedChange", remove: "remove" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.k-chip-list": "this.hostClass", "attr.aria-orientation": "this.orientation", "attr.dir": "this.direction", "class.k-selection-single": "this.single", "attr.aria-multiselectable": "this.multiple", "class.k-selection-multiple": "this.multiple", "attr.role": "this.role" } }, providers: [
294
- LocalizationService,
295
- {
296
- provide: L10N_PREFIX,
297
- useValue: 'kendo.chiplist'
298
- }
299
- ], queries: [{ propertyName: "chips", predicate: ChipComponent }], ngImport: i0, template: `
300
- <ng-content></ng-content>
301
- `, isInline: true });
302
- }
303
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChipListComponent, decorators: [{
304
- type: Component,
305
- args: [{
306
- selector: 'kendo-chiplist, kendo-chip-list',
307
- template: `
308
- <ng-content></ng-content>
309
- `,
310
- providers: [
311
- LocalizationService,
312
- {
313
- provide: L10N_PREFIX,
314
- useValue: 'kendo.chiplist'
315
- }
316
- ],
317
- standalone: true
318
- }]
319
- }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { hostClass: [{
320
- type: HostBinding,
321
- args: ['class.k-chip-list']
322
- }], orientation: [{
323
- type: HostBinding,
324
- args: ['attr.aria-orientation']
325
- }, {
326
- type: Input
327
- }], direction: [{
328
- type: HostBinding,
329
- args: ['attr.dir']
330
- }], selection: [{
331
- type: Input
332
- }], size: [{
333
- type: Input
334
- }], selectedChange: [{
335
- type: Output
336
- }], remove: [{
337
- type: Output
338
- }], chips: [{
339
- type: ContentChildren,
340
- args: [ChipComponent]
341
- }], single: [{
342
- type: HostBinding,
343
- args: ['class.k-selection-single']
344
- }], multiple: [{
345
- type: HostBinding,
346
- args: ['attr.aria-multiselectable']
347
- }, {
348
- type: HostBinding,
349
- args: ['class.k-selection-multiple']
350
- }], role: [{
351
- type: HostBinding,
352
- args: ['attr.role']
353
- }, {
354
- type: Input
355
- }], onClick: [{
356
- type: HostListener,
357
- args: ['click', ['$event']]
358
- }], navigable: [{
359
- type: Input
360
- }] } });
@@ -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 {};