@progress/kendo-angular-menu 24.0.0-develop.2 → 24.0.0-develop.21

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.
@@ -9,7 +9,7 @@ import * as i3 from '@progress/kendo-angular-l10n';
9
9
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
10
10
  import { validatePackage } from '@progress/kendo-licensing';
11
11
  import { PreventableEvent as PreventableEvent$1, hasObservers, Keys, normalizeKeys, isDocumentAvailable, isPresent, parseCSSClassNames, ResizeBatchService } from '@progress/kendo-angular-common';
12
- import { caretAltLeftIcon, caretAltRightIcon, caretAltDownIcon } from '@progress/kendo-svg-icons';
12
+ import { chevronDownIcon, chevronLeftIcon, chevronRightIcon } from '@progress/kendo-svg-icons';
13
13
  import * as i5 from '@progress/kendo-angular-popup';
14
14
  import { PopupService, POPUP_CONTAINER } from '@progress/kendo-angular-popup';
15
15
  import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
@@ -22,8 +22,8 @@ const packageMetadata = {
22
22
  productName: 'Kendo UI for Angular',
23
23
  productCode: 'KENDOUIANGULAR',
24
24
  productCodes: ['KENDOUIANGULAR'],
25
- publishDate: 1776936102,
26
- version: '24.0.0-develop.2',
25
+ publishDate: 1778160970,
26
+ version: '24.0.0-develop.21',
27
27
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
28
28
  };
29
29
 
@@ -1154,29 +1154,25 @@ const getSizeClass = (size) => {
1154
1154
  'medium': 'k-menu-group-md',
1155
1155
  'large': 'k-menu-group-lg'
1156
1156
  };
1157
- return SIZE_CLASSES[size];
1157
+ return SIZE_CLASSES[size] || '';
1158
1158
  };
1159
1159
  /**
1160
1160
  * @hidden
1161
1161
  */
1162
1162
  const getFontIcon = (horizontal, rtl) => {
1163
- const icon = horizontal ?
1164
- rtl ?
1165
- 'caret-alt-left' :
1166
- 'caret-alt-right' :
1167
- 'caret-alt-down';
1168
- return icon;
1163
+ if (!horizontal) {
1164
+ return 'chevron-down';
1165
+ }
1166
+ return rtl ? 'chevron-left' : 'chevron-right';
1169
1167
  };
1170
1168
  /**
1171
1169
  * @hidden
1172
1170
  */
1173
1171
  const getSVGIcon = (horizontal, rtl) => {
1174
- const icon = horizontal ?
1175
- rtl ?
1176
- caretAltLeftIcon :
1177
- caretAltRightIcon :
1178
- caretAltDownIcon;
1179
- return icon;
1172
+ if (!horizontal) {
1173
+ return chevronDownIcon;
1174
+ }
1175
+ return rtl ? chevronLeftIcon : chevronRightIcon;
1180
1176
  };
1181
1177
  /**
1182
1178
  * @hidden
@@ -1652,10 +1648,7 @@ class ItemComponent {
1652
1648
  return this.item.disabled;
1653
1649
  }
1654
1650
  get hasPopup() {
1655
- return this.hasContent ? true : null;
1656
- }
1657
- get label() {
1658
- return this.item.text ? this.item.text : null;
1651
+ return this.hasContent ? 'menu' : null;
1659
1652
  }
1660
1653
  get defaultPopupSettings() {
1661
1654
  const settings = this.rtl ? POPUP_SETTINGS_RTL : POPUP_SETTINGS;
@@ -1685,7 +1678,7 @@ class ItemComponent {
1685
1678
  }
1686
1679
  get menuListClasses() {
1687
1680
  const sizeClass = getSizeClass(this.size);
1688
- return this.isContextMenu ? `k-context-menu k-menu-group ${sizeClass}` : `k-menu-group ${sizeClass}`;
1681
+ return `k-menu-group ${sizeClass}`;
1689
1682
  }
1690
1683
  get children() {
1691
1684
  const item = this.item;
@@ -1835,20 +1828,20 @@ class ItemComponent {
1835
1828
  };
1836
1829
  }
1837
1830
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ItemComponent, deps: [{ token: ItemsService }, { token: NavigationService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i5.PopupService }, { token: i0.ElementRef }, { token: ContextMenuService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1838
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: ItemComponent, isStandalone: true, selector: "[kendoMenuItem]", inputs: { appendTo: "appendTo", item: "item", level: "level", index: "index", siblingIndex: "siblingIndex", animate: "animate", size: "size", vertical: "vertical", rtl: "rtl", openOnClick: "openOnClick", itemTemplate: "itemTemplate", itemLinkTemplate: "itemLinkTemplate", popupSettings: "popupSettings", trackBy: "trackBy" }, host: { properties: { "attr.aria-disabled": "this.disabled", "attr.aria-haspopup": "this.hasPopup", "attr.aria-label": "this.label" } }, providers: [PopupService, {
1831
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: ItemComponent, isStandalone: true, selector: "[kendoMenuItem]", inputs: { appendTo: "appendTo", item: "item", level: "level", index: "index", siblingIndex: "siblingIndex", animate: "animate", size: "size", vertical: "vertical", rtl: "rtl", openOnClick: "openOnClick", itemTemplate: "itemTemplate", itemLinkTemplate: "itemLinkTemplate", popupSettings: "popupSettings", trackBy: "trackBy" }, host: { properties: { "attr.aria-disabled": "this.disabled", "attr.aria-haspopup": "this.hasPopup" } }, providers: [PopupService, {
1839
1832
  provide: POPUP_CONTAINER,
1840
1833
  useFactory: bodyFactory
1841
1834
  }], viewQueries: [{ propertyName: "link", first: true, predicate: ["link"], descendants: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
1842
1835
  @if (!hasLink && !item.content && !linkTemplate) {
1843
1836
  <span class="k-link k-menu-link" #link
1844
- [class.k-active]="opened" role="presentation">
1837
+ [class.k-active]="opened" [class.k-disabled]="item.disabled && (level > 0 || isContextMenu)" role="presentation">
1845
1838
  <ng-template [ngTemplateOutlet]="itemcontent">
1846
1839
  </ng-template>
1847
1840
  </span>
1848
1841
  }
1849
1842
  @if (item.url && !linkTemplate) {
1850
1843
  <a class="k-link k-menu-link" #link [attr.href]="item.url"
1851
- [class.k-active]="opened" tabindex="-1" role="presentation">
1844
+ [class.k-active]="opened" [class.k-disabled]="item.disabled && (level > 0 || isContextMenu)" tabindex="-1" role="presentation">
1852
1845
  <ng-template [ngTemplateOutlet]="itemcontent">
1853
1846
  </ng-template>
1854
1847
  </a>
@@ -1915,14 +1908,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
1915
1908
  template: `
1916
1909
  @if (!hasLink && !item.content && !linkTemplate) {
1917
1910
  <span class="k-link k-menu-link" #link
1918
- [class.k-active]="opened" role="presentation">
1911
+ [class.k-active]="opened" [class.k-disabled]="item.disabled && (level > 0 || isContextMenu)" role="presentation">
1919
1912
  <ng-template [ngTemplateOutlet]="itemcontent">
1920
1913
  </ng-template>
1921
1914
  </span>
1922
1915
  }
1923
1916
  @if (item.url && !linkTemplate) {
1924
1917
  <a class="k-link k-menu-link" #link [attr.href]="item.url"
1925
- [class.k-active]="opened" tabindex="-1" role="presentation">
1918
+ [class.k-active]="opened" [class.k-disabled]="item.disabled && (level > 0 || isContextMenu)" tabindex="-1" role="presentation">
1926
1919
  <ng-template [ngTemplateOutlet]="itemcontent">
1927
1920
  </ng-template>
1928
1921
  </a>
@@ -2022,9 +2015,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
2022
2015
  }], hasPopup: [{
2023
2016
  type: HostBinding,
2024
2017
  args: ['attr.aria-haspopup']
2025
- }], label: [{
2026
- type: HostBinding,
2027
- args: ['attr.aria-label']
2028
2018
  }] } });
2029
2019
 
2030
2020
  /**
@@ -2089,8 +2079,9 @@ class MenuComponent extends MenuBase {
2089
2079
  */
2090
2080
  get ariaOrientation() {
2091
2081
  if (this.vertical) {
2092
- return 'vertical';
2082
+ return this.ariaRole === 'menubar' ? 'vertical' : null;
2093
2083
  }
2084
+ return this.ariaRole === 'menu' ? 'horizontal' : null;
2094
2085
  }
2095
2086
  /**
2096
2087
  * @hidden
@@ -2111,7 +2102,10 @@ class MenuComponent extends MenuBase {
2111
2102
  const sizeClass = getSizeClass(this.size);
2112
2103
  const staticClasses = 'k-reset k-header k-menu';
2113
2104
  if (this.isContextMenu) {
2114
- return `k-context-menu k-menu-group ${sizeClass || ''}`;
2105
+ const contextMenuClasses = this.vertical
2106
+ ? 'k-context-menu k-menu-group'
2107
+ : `${staticClasses} k-context-menu k-menu-horizontal`;
2108
+ return `${contextMenuClasses} ${sizeClass || ''}`;
2115
2109
  }
2116
2110
  return `${staticClasses} k-menu-${this.vertical ? 'vertical' : 'horizontal'}`;
2117
2111
  }
@@ -3308,7 +3302,7 @@ class ContextMenuComponent extends MenuBase {
3308
3302
  else {
3309
3303
  offset = { left: e.pageX, top: e.pageY };
3310
3304
  }
3311
- this.createPopup({ anchor, offset });
3305
+ this.createPopup(offset ? { anchor, offset } : { anchor });
3312
3306
  });
3313
3307
  }
3314
3308
  createPopup(options) {
@@ -73,7 +73,7 @@ export declare class MenuComponent extends MenuBase implements OnChanges, AfterV
73
73
  /**
74
74
  * @hidden
75
75
  */
76
- get ariaOrientation(): string;
76
+ get ariaOrientation(): string | null;
77
77
  /**
78
78
  * @hidden
79
79
  */
@@ -7,7 +7,7 @@ export const packageMetadata = {
7
7
  "productCodes": [
8
8
  "KENDOUIANGULAR"
9
9
  ],
10
- "publishDate": 1776936102,
11
- "version": "24.0.0-develop.2",
10
+ "publishDate": 1778160970,
11
+ "version": "24.0.0-develop.21",
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-menu",
3
- "version": "24.0.0-develop.2",
3
+ "version": "24.0.0-develop.21",
4
4
  "description": "Kendo UI Angular Menu component",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -19,7 +19,7 @@
19
19
  "package": {
20
20
  "productName": "Kendo UI for Angular",
21
21
  "productCode": "KENDOUIANGULAR",
22
- "publishDate": 1776936102,
22
+ "publishDate": 1778160970,
23
23
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
24
24
  }
25
25
  },
@@ -29,15 +29,15 @@
29
29
  "@angular/core": "19 - 21",
30
30
  "@angular/platform-browser": "19 - 21",
31
31
  "@progress/kendo-licensing": "^1.11.0",
32
- "@progress/kendo-angular-common": "24.0.0-develop.2",
33
- "@progress/kendo-angular-l10n": "24.0.0-develop.2",
34
- "@progress/kendo-angular-icons": "24.0.0-develop.2",
35
- "@progress/kendo-angular-popup": "24.0.0-develop.2",
32
+ "@progress/kendo-angular-common": "24.0.0-develop.21",
33
+ "@progress/kendo-angular-l10n": "24.0.0-develop.21",
34
+ "@progress/kendo-angular-icons": "24.0.0-develop.21",
35
+ "@progress/kendo-angular-popup": "24.0.0-develop.21",
36
36
  "rxjs": "^6.5.3 || ^7.0.0"
37
37
  },
38
38
  "dependencies": {
39
39
  "tslib": "^2.3.1",
40
- "@progress/kendo-angular-schematics": "24.0.0-develop.2"
40
+ "@progress/kendo-angular-schematics": "24.0.0-develop.21"
41
41
  },
42
42
  "schematics": "./schematics/collection.json",
43
43
  "module": "fesm2022/progress-kendo-angular-menu.mjs",
@@ -81,8 +81,7 @@ export declare class ItemComponent implements OnInit, OnChanges, AfterViewInit,
81
81
  link: ElementRef;
82
82
  popupTemplate: TemplateRef<any>;
83
83
  get disabled(): boolean;
84
- get hasPopup(): boolean;
85
- get label(): boolean;
84
+ get hasPopup(): string;
86
85
  get defaultPopupSettings(): any;
87
86
  get horizontal(): boolean;
88
87
  get hasLink(): boolean;