@progress/kendo-angular-buttons 25.3.0-develop.12 → 25.3.0-develop.13
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.
|
@@ -49,8 +49,8 @@ const packageMetadata = {
|
|
|
49
49
|
productName: 'Kendo UI for Angular',
|
|
50
50
|
productCode: 'KENDOUIANGULAR',
|
|
51
51
|
productCodes: ['KENDOUIANGULAR'],
|
|
52
|
-
publishDate:
|
|
53
|
-
version: '25.3.0-develop.
|
|
52
|
+
publishDate: 1791376793,
|
|
53
|
+
version: '25.3.0-develop.13',
|
|
54
54
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
55
55
|
};
|
|
56
56
|
|
|
@@ -6770,6 +6770,14 @@ class SegmentedControlComponent {
|
|
|
6770
6770
|
* Fires when the selected button changes. Emits the index of the selected button.
|
|
6771
6771
|
*/
|
|
6772
6772
|
selectedChange = new EventEmitter();
|
|
6773
|
+
/**
|
|
6774
|
+
* @hidden
|
|
6775
|
+
*/
|
|
6776
|
+
get tabStopIndex() {
|
|
6777
|
+
const index = this.focusedButtonIndex() ?? this.selectedButtonIndex ?? 0;
|
|
6778
|
+
const isIndexInRange = index >= 0 && index < this._items.length;
|
|
6779
|
+
return isIndexInRange ? index : 0;
|
|
6780
|
+
}
|
|
6773
6781
|
/**
|
|
6774
6782
|
* @hidden
|
|
6775
6783
|
*/
|
|
@@ -6778,6 +6786,10 @@ class SegmentedControlComponent {
|
|
|
6778
6786
|
* @hidden
|
|
6779
6787
|
*/
|
|
6780
6788
|
isActiveTabStop = signal(true, ...(ngDevMode ? [{ debugName: "isActiveTabStop" }] : []));
|
|
6789
|
+
/**
|
|
6790
|
+
* @hidden
|
|
6791
|
+
*/
|
|
6792
|
+
focusedButtonIndex = signal(null, ...(ngDevMode ? [{ debugName: "focusedButtonIndex" }] : []));
|
|
6781
6793
|
_items = [];
|
|
6782
6794
|
_size;
|
|
6783
6795
|
_layoutMode = 'compact';
|
|
@@ -6793,6 +6805,9 @@ class SegmentedControlComponent {
|
|
|
6793
6805
|
this.subs.add(localization.changes.subscribe(({ rtl }) => {
|
|
6794
6806
|
this._direction.set(rtl ? 'rtl' : 'ltr');
|
|
6795
6807
|
}));
|
|
6808
|
+
this.zone.runOutsideAngular(() => {
|
|
6809
|
+
this.subs.add(this.renderer.listen(this.wrapper.nativeElement, 'focusout', this.handleFocusOut.bind(this)));
|
|
6810
|
+
});
|
|
6796
6811
|
}
|
|
6797
6812
|
ngAfterViewInit() {
|
|
6798
6813
|
this.handleSizeClass(this._size, null);
|
|
@@ -6828,7 +6843,8 @@ class SegmentedControlComponent {
|
|
|
6828
6843
|
return;
|
|
6829
6844
|
}
|
|
6830
6845
|
if (code === Keys.ArrowLeft || code === Keys.ArrowRight) {
|
|
6831
|
-
const
|
|
6846
|
+
const forwardKey = this.direction === 'rtl' ? Keys.ArrowLeft : Keys.ArrowRight;
|
|
6847
|
+
const moved = this.moveFocus(index, code === forwardKey ? 1 : -1);
|
|
6832
6848
|
if (moved) {
|
|
6833
6849
|
event.preventDefault();
|
|
6834
6850
|
}
|
|
@@ -6847,16 +6863,22 @@ class SegmentedControlComponent {
|
|
|
6847
6863
|
* Moves DOM focus to the currently selected button. Used by host toolbars.
|
|
6848
6864
|
*/
|
|
6849
6865
|
focusSelectedButton(preventScroll = true) {
|
|
6850
|
-
this.focusButtonAt(this.
|
|
6866
|
+
this.focusButtonAt(this.tabStopIndex, preventScroll);
|
|
6867
|
+
}
|
|
6868
|
+
handleFocusOut(event) {
|
|
6869
|
+
const next = event.relatedTarget;
|
|
6870
|
+
const isFocusLeavingControl = !next || !this.wrapper.nativeElement.contains(next);
|
|
6871
|
+
if (isFocusLeavingControl) {
|
|
6872
|
+
this.focusedButtonIndex.set(null);
|
|
6873
|
+
}
|
|
6851
6874
|
}
|
|
6852
6875
|
/**
|
|
6853
6876
|
* Moves DOM focus to the adjacent button in the given direction. Disabled buttons are not
|
|
6854
6877
|
* skipped so that keyboard users are still made aware of their presence and disabled state.
|
|
6855
6878
|
*/
|
|
6856
6879
|
moveFocus(currentIndex, step) {
|
|
6857
|
-
const count = this._items.length;
|
|
6858
6880
|
const index = currentIndex + step;
|
|
6859
|
-
if (index < 0 || index >=
|
|
6881
|
+
if (index < 0 || index >= this._items.length) {
|
|
6860
6882
|
return false;
|
|
6861
6883
|
}
|
|
6862
6884
|
this.focusButtonAt(index, false);
|
|
@@ -6922,7 +6944,8 @@ class SegmentedControlComponent {
|
|
|
6922
6944
|
[attr.aria-disabled]="button.disabled ? true : null"
|
|
6923
6945
|
[attr.title]="button.title"
|
|
6924
6946
|
[attr.aria-label]="button.title && !button.text ? button.title : null"
|
|
6925
|
-
[attr.tabindex]="isActiveTabStop() &&
|
|
6947
|
+
[attr.tabindex]="isActiveTabStop() && tabStopIndex === idx ? 0 : -1"
|
|
6948
|
+
(focus)="focusedButtonIndex.set(idx)"
|
|
6926
6949
|
(click)="handleClick(button, idx)"
|
|
6927
6950
|
(keydown)="handleKeydown($event, button, idx)"
|
|
6928
6951
|
[class.k-selected]="selectedButtonIndex === idx"
|
|
@@ -6966,7 +6989,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImpo
|
|
|
6966
6989
|
[attr.aria-disabled]="button.disabled ? true : null"
|
|
6967
6990
|
[attr.title]="button.title"
|
|
6968
6991
|
[attr.aria-label]="button.title && !button.text ? button.title : null"
|
|
6969
|
-
[attr.tabindex]="isActiveTabStop() &&
|
|
6992
|
+
[attr.tabindex]="isActiveTabStop() && tabStopIndex === idx ? 0 : -1"
|
|
6993
|
+
(focus)="focusedButtonIndex.set(idx)"
|
|
6970
6994
|
(click)="handleClick(button, idx)"
|
|
6971
6995
|
(keydown)="handleKeydown($event, button, idx)"
|
|
6972
6996
|
[class.k-selected]="selectedButtonIndex === idx"
|
package/index.d.ts
CHANGED
|
@@ -2862,6 +2862,10 @@ declare class SegmentedControlComponent implements AfterViewInit, OnDestroy {
|
|
|
2862
2862
|
* Fires when the selected button changes. Emits the index of the selected button.
|
|
2863
2863
|
*/
|
|
2864
2864
|
selectedChange: EventEmitter<number>;
|
|
2865
|
+
/**
|
|
2866
|
+
* @hidden
|
|
2867
|
+
*/
|
|
2868
|
+
get tabStopIndex(): number;
|
|
2865
2869
|
/**
|
|
2866
2870
|
* @hidden
|
|
2867
2871
|
*/
|
|
@@ -2870,6 +2874,10 @@ declare class SegmentedControlComponent implements AfterViewInit, OnDestroy {
|
|
|
2870
2874
|
* @hidden
|
|
2871
2875
|
*/
|
|
2872
2876
|
isActiveTabStop: i0.WritableSignal<boolean>;
|
|
2877
|
+
/**
|
|
2878
|
+
* @hidden
|
|
2879
|
+
*/
|
|
2880
|
+
focusedButtonIndex: i0.WritableSignal<number>;
|
|
2873
2881
|
private _items;
|
|
2874
2882
|
private _size;
|
|
2875
2883
|
private _layoutMode;
|
|
@@ -2897,6 +2905,7 @@ declare class SegmentedControlComponent implements AfterViewInit, OnDestroy {
|
|
|
2897
2905
|
* Moves DOM focus to the currently selected button. Used by host toolbars.
|
|
2898
2906
|
*/
|
|
2899
2907
|
focusSelectedButton(preventScroll?: boolean): void;
|
|
2908
|
+
private handleFocusOut;
|
|
2900
2909
|
/**
|
|
2901
2910
|
* Moves DOM focus to the adjacent button in the given direction. Disabled buttons are not
|
|
2902
2911
|
* skipped so that keyboard users are still made aware of their presence and disabled state.
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = {
|
|
|
7
7
|
"productCodes": [
|
|
8
8
|
"KENDOUIANGULAR"
|
|
9
9
|
],
|
|
10
|
-
"publishDate":
|
|
11
|
-
"version": "25.3.0-develop.
|
|
10
|
+
"publishDate": 1791376793,
|
|
11
|
+
"version": "25.3.0-develop.13",
|
|
12
12
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
13
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-buttons",
|
|
3
|
-
"version": "25.3.0-develop.
|
|
3
|
+
"version": "25.3.0-develop.13",
|
|
4
4
|
"description": "Buttons Package for Angular",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"package": {
|
|
57
57
|
"productName": "Kendo UI for Angular",
|
|
58
58
|
"productCode": "KENDOUIANGULAR",
|
|
59
|
-
"publishDate":
|
|
59
|
+
"publishDate": 1791376793,
|
|
60
60
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
61
61
|
}
|
|
62
62
|
},
|
|
@@ -66,15 +66,15 @@
|
|
|
66
66
|
"@angular/core": "20 - 22",
|
|
67
67
|
"@angular/platform-browser": "20 - 22",
|
|
68
68
|
"@progress/kendo-licensing": "^1.11.0",
|
|
69
|
-
"@progress/kendo-angular-common": "25.3.0-develop.
|
|
70
|
-
"@progress/kendo-angular-l10n": "25.3.0-develop.
|
|
71
|
-
"@progress/kendo-angular-popup": "25.3.0-develop.
|
|
72
|
-
"@progress/kendo-angular-icons": "25.3.0-develop.
|
|
69
|
+
"@progress/kendo-angular-common": "25.3.0-develop.13",
|
|
70
|
+
"@progress/kendo-angular-l10n": "25.3.0-develop.13",
|
|
71
|
+
"@progress/kendo-angular-popup": "25.3.0-develop.13",
|
|
72
|
+
"@progress/kendo-angular-icons": "25.3.0-develop.13",
|
|
73
73
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"tslib": "^2.3.1",
|
|
77
|
-
"@progress/kendo-angular-schematics": "25.3.0-develop.
|
|
77
|
+
"@progress/kendo-angular-schematics": "25.3.0-develop.13",
|
|
78
78
|
"@progress/kendo-common": "^1.0.1",
|
|
79
79
|
"@progress/kendo-webspeech-common": "1.0.1",
|
|
80
80
|
"@progress/kendo-smartpaste-common": "1.0.0"
|