@ojiepermana/angular-navigation 22.0.45 → 22.0.47

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.
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { inject, ElementRef, Injector, input, output, computed, signal, afterNextRender, Component } from '@angular/core';
3
3
  import { IconComponent } from '@ojiepermana/angular-component/icon';
4
4
  import { cn } from '@ojiepermana/angular-component/utils';
5
- import { N as NavigationItemComponent, a as NavigationItemContentComponent, b as NavigationListComponent } from './ojiepermana-angular-navigation-ojiepermana-angular-navigation-SlMGlTuA.mjs';
5
+ import { N as NavigationItemComponent, a as NavigationItemContentComponent, b as NavigationListComponent } from './ojiepermana-angular-navigation-ojiepermana-angular-navigation-Dh4Huk-N.mjs';
6
6
  import { NavigationService } from '@ojiepermana/angular-navigation/service';
7
7
 
8
8
  class NavigationDockbarMenuComponent {
@@ -4,7 +4,7 @@ import { inject, input, output, computed, signal, Component } from '@angular/cor
4
4
  import { RouterLink, RouterLinkActive } from '@angular/router';
5
5
  import { IconComponent } from '@ojiepermana/angular-component/icon';
6
6
  import { cn } from '@ojiepermana/angular-component/utils';
7
- import { N as NavigationItemComponent } from './ojiepermana-angular-navigation-ojiepermana-angular-navigation-SlMGlTuA.mjs';
7
+ import { N as NavigationItemComponent } from './ojiepermana-angular-navigation-ojiepermana-angular-navigation-Dh4Huk-N.mjs';
8
8
  import { NavigationService } from '@ojiepermana/angular-navigation/service';
9
9
 
10
10
  /**
@@ -2,8 +2,8 @@ import * as i0 from '@angular/core';
2
2
  import { inject, ElementRef, input, output, computed, signal, Component } from '@angular/core';
3
3
  import { IconComponent } from '@ojiepermana/angular-component/icon';
4
4
  import { cn } from '@ojiepermana/angular-component/utils';
5
- import { N as NavigationEntryGridComponent } from './ojiepermana-angular-navigation-navigation-entry-grid.component-BY-DXx81.mjs';
6
- import { N as NavigationItemComponent, a as NavigationItemContentComponent } from './ojiepermana-angular-navigation-ojiepermana-angular-navigation-SlMGlTuA.mjs';
5
+ import { N as NavigationEntryGridComponent } from './ojiepermana-angular-navigation-navigation-entry-grid.component-DN42NJ2l.mjs';
6
+ import { N as NavigationItemComponent, a as NavigationItemContentComponent } from './ojiepermana-angular-navigation-ojiepermana-angular-navigation-Dh4Huk-N.mjs';
7
7
  import { NavigationService } from '@ojiepermana/angular-navigation/service';
8
8
 
9
9
  class NavigationFlyoutMenuComponent {
@@ -3,8 +3,8 @@ import * as i0 from '@angular/core';
3
3
  import { inject, ElementRef, input, output, computed, signal, Component } from '@angular/core';
4
4
  import { IconComponent } from '@ojiepermana/angular-component/icon';
5
5
  import { cn } from '@ojiepermana/angular-component/utils';
6
- import { N as NavigationEntryGridComponent } from './ojiepermana-angular-navigation-navigation-entry-grid.component-BY-DXx81.mjs';
7
- import { N as NavigationItemComponent, a as NavigationItemContentComponent } from './ojiepermana-angular-navigation-ojiepermana-angular-navigation-SlMGlTuA.mjs';
6
+ import { N as NavigationEntryGridComponent } from './ojiepermana-angular-navigation-navigation-entry-grid.component-DN42NJ2l.mjs';
7
+ import { N as NavigationItemComponent, a as NavigationItemContentComponent } from './ojiepermana-angular-navigation-ojiepermana-angular-navigation-Dh4Huk-N.mjs';
8
8
  import { NavigationService } from '@ojiepermana/angular-navigation/service';
9
9
 
10
10
  class NavigationHorizontalComponent {
@@ -538,9 +538,9 @@ class NavigationItemComponent {
538
538
  }, /* @ts-ignore */
539
539
  ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
540
540
  hostRole = computed(() => {
541
- if (this.item().type === 'divider') {
542
- return 'separator';
543
- }
541
+ // Dividers are decorative (aria-hidden); a `separator` role is not a valid
542
+ // child of `list` and would trip axe's aria-required-children. Horizontal
543
+ // items are presentational `<li>` wrappers around the real menuitem.
544
544
  return this.orientation() === 'horizontal' ? 'none' : null;
545
545
  }, /* @ts-ignore */
546
546
  ...(ngDevMode ? [{ debugName: "hostRole" }] : /* istanbul ignore next */ []));
@@ -667,7 +667,7 @@ class NavigationItemComponent {
667
667
  return cn('relative', "before:pointer-events-none before:absolute before:left-[1.625rem] before:w-0 before:-z-10 before:border-l before:border-dotted before:content-['']", this.straightRailActive() ? 'before:border-primary/50' : 'before:border-border/50', this.firstInBranch() ? 'before:-top-9' : 'before:-top-0.5', this.lastInBranch() ? 'before:bottom-[calc(100%-1.25rem)]' : 'before:-bottom-0.5');
668
668
  }
669
669
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NavigationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
670
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: NavigationItemComponent, isStandalone: true, selector: "li[NavigationItem]", inputs: { navId: { classPropertyName: "navId", publicName: "navId", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, itemClass: { classPropertyName: "itemClass", publicName: "itemClass", isSignal: true, isRequired: false, transformFunction: null }, activeIds: { classPropertyName: "activeIds", publicName: "activeIds", isSignal: true, isRequired: false, transformFunction: null }, activeUrl: { classPropertyName: "activeUrl", publicName: "activeUrl", isSignal: true, isRequired: false, transformFunction: null }, iconTemplate: { classPropertyName: "iconTemplate", publicName: "iconTemplate", isSignal: true, isRequired: false, transformFunction: null }, collapseTree: { classPropertyName: "collapseTree", publicName: "collapseTree", isSignal: true, isRequired: false, transformFunction: null }, straightRail: { classPropertyName: "straightRail", publicName: "straightRail", isSignal: true, isRequired: false, transformFunction: null }, straightRailActive: { classPropertyName: "straightRailActive", publicName: "straightRailActive", isSignal: true, isRequired: false, transformFunction: null }, firstInBranch: { classPropertyName: "firstInBranch", publicName: "firstInBranch", isSignal: true, isRequired: false, transformFunction: null }, lastInBranch: { classPropertyName: "lastInBranch", publicName: "lastInBranch", isSignal: true, isRequired: false, transformFunction: null }, openedIds: { classPropertyName: "openedIds", publicName: "openedIds", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedIdsChange: "openedIdsChange", itemSelected: "itemSelected" }, host: { properties: { "class": "hostClasses()", "attr.role": "hostRole()", "attr.data-navigation-item-key": "item().key", "attr.aria-hidden": "item().type === \"spacer\" ? \"true\" : null" } }, ngImport: i0, template: `
670
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: NavigationItemComponent, isStandalone: true, selector: "li[NavigationItem]", inputs: { navId: { classPropertyName: "navId", publicName: "navId", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, itemClass: { classPropertyName: "itemClass", publicName: "itemClass", isSignal: true, isRequired: false, transformFunction: null }, activeIds: { classPropertyName: "activeIds", publicName: "activeIds", isSignal: true, isRequired: false, transformFunction: null }, activeUrl: { classPropertyName: "activeUrl", publicName: "activeUrl", isSignal: true, isRequired: false, transformFunction: null }, iconTemplate: { classPropertyName: "iconTemplate", publicName: "iconTemplate", isSignal: true, isRequired: false, transformFunction: null }, collapseTree: { classPropertyName: "collapseTree", publicName: "collapseTree", isSignal: true, isRequired: false, transformFunction: null }, straightRail: { classPropertyName: "straightRail", publicName: "straightRail", isSignal: true, isRequired: false, transformFunction: null }, straightRailActive: { classPropertyName: "straightRailActive", publicName: "straightRailActive", isSignal: true, isRequired: false, transformFunction: null }, firstInBranch: { classPropertyName: "firstInBranch", publicName: "firstInBranch", isSignal: true, isRequired: false, transformFunction: null }, lastInBranch: { classPropertyName: "lastInBranch", publicName: "lastInBranch", isSignal: true, isRequired: false, transformFunction: null }, openedIds: { classPropertyName: "openedIds", publicName: "openedIds", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedIdsChange: "openedIdsChange", itemSelected: "itemSelected" }, host: { properties: { "class": "hostClasses()", "attr.role": "hostRole()", "attr.data-navigation-item-key": "item().key", "attr.aria-hidden": "item().type === \"spacer\" || item().type === \"divider\" ? \"true\" : null" } }, ngImport: i0, template: `
671
671
  @switch (item().type) {
672
672
  @case ('divider') {
673
673
  <span class="block h-px w-full bg-border"></span>
@@ -682,7 +682,7 @@ class NavigationItemComponent {
682
682
 
683
683
  <ul
684
684
  [class]="childListClasses()"
685
- role="group"
685
+ role="list"
686
686
  [attr.aria-labelledby]="item().title ? headingId() : null"
687
687
  >
688
688
  @for (
@@ -742,7 +742,7 @@ class NavigationItemComponent {
742
742
  </button>
743
743
 
744
744
  @if (showChildren()) {
745
- <ul [id]="item().panelId" [class]="childListClasses()" role="group">
745
+ <ul [id]="item().panelId" [class]="childListClasses()" role="list">
746
746
  @for (
747
747
  child of item().children;
748
748
  track child.key;
@@ -781,7 +781,7 @@ class NavigationItemComponent {
781
781
 
782
782
  <ul
783
783
  [class]="childListClasses()"
784
- role="group"
784
+ role="list"
785
785
  [attr.aria-labelledby]="item().title ? headingId() : null"
786
786
  >
787
787
  @for (
@@ -905,7 +905,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
905
905
  '[class]': 'hostClasses()',
906
906
  '[attr.role]': 'hostRole()',
907
907
  '[attr.data-navigation-item-key]': 'item().key',
908
- '[attr.aria-hidden]': 'item().type === "spacer" ? "true" : null',
908
+ '[attr.aria-hidden]': 'item().type === "spacer" || item().type === "divider" ? "true" : null',
909
909
  },
910
910
  template: `
911
911
  @switch (item().type) {
@@ -922,7 +922,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
922
922
 
923
923
  <ul
924
924
  [class]="childListClasses()"
925
- role="group"
925
+ role="list"
926
926
  [attr.aria-labelledby]="item().title ? headingId() : null"
927
927
  >
928
928
  @for (
@@ -982,7 +982,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
982
982
  </button>
983
983
 
984
984
  @if (showChildren()) {
985
- <ul [id]="item().panelId" [class]="childListClasses()" role="group">
985
+ <ul [id]="item().panelId" [class]="childListClasses()" role="list">
986
986
  @for (
987
987
  child of item().children;
988
988
  track child.key;
@@ -1021,7 +1021,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
1021
1021
 
1022
1022
  <ul
1023
1023
  [class]="childListClasses()"
1024
- role="group"
1024
+ role="list"
1025
1025
  [attr.aria-labelledby]="item().title ? headingId() : null"
1026
1026
  >
1027
1027
  @for (
@@ -1329,14 +1329,14 @@ class NavigationContentComponent {
1329
1329
  />
1330
1330
  }
1331
1331
  `, isInline: true, dependencies: [{ kind: "component", type: NavigationListComponent, selector: "NavigationList", inputs: ["navId", "items", "collapsed", "compact", "position", "itemClass", "activeIds", "activeUrl", "iconTemplate", "collapseTree", "openedIds"], outputs: ["openedIdsChange", "itemSelected"] }], deferBlockDependencies: [() => [/* @ts-ignore */
1332
- import('./ojiepermana-angular-navigation-navigation-flyout-menu.component-CACN0O3T.mjs').then(m => m.NavigationFlyoutMenuComponent)], () => [/* @ts-ignore */
1333
- import('./ojiepermana-angular-navigation-navigation-horizontal.component-SK1lXswT.mjs').then(m => m.NavigationHorizontalComponent)], () => [/* @ts-ignore */
1334
- import('./ojiepermana-angular-navigation-navigation-dockbar-menu.component-BQgpBy1I.mjs').then(m => m.NavigationDockbarMenuComponent)]] });
1332
+ import('./ojiepermana-angular-navigation-navigation-flyout-menu.component-CjejQibu.mjs').then(m => m.NavigationFlyoutMenuComponent)], () => [/* @ts-ignore */
1333
+ import('./ojiepermana-angular-navigation-navigation-horizontal.component-DUJ4HEmh.mjs').then(m => m.NavigationHorizontalComponent)], () => [/* @ts-ignore */
1334
+ import('./ojiepermana-angular-navigation-navigation-dockbar-menu.component-FKJqBVRX.mjs').then(m => m.NavigationDockbarMenuComponent)]] });
1335
1335
  }
1336
1336
  i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.0.4", ngImport: i0, type: NavigationContentComponent, resolveDeferredDeps: () => [/* @ts-ignore */
1337
- import('./ojiepermana-angular-navigation-navigation-flyout-menu.component-CACN0O3T.mjs').then(m => m.NavigationFlyoutMenuComponent), /* @ts-ignore */
1338
- import('./ojiepermana-angular-navigation-navigation-horizontal.component-SK1lXswT.mjs').then(m => m.NavigationHorizontalComponent), /* @ts-ignore */
1339
- import('./ojiepermana-angular-navigation-navigation-dockbar-menu.component-BQgpBy1I.mjs').then(m => m.NavigationDockbarMenuComponent)], resolveMetadata: (NavigationFlyoutMenuComponent, NavigationHorizontalComponent, NavigationDockbarMenuComponent) => ({ decorators: [{
1337
+ import('./ojiepermana-angular-navigation-navigation-flyout-menu.component-CjejQibu.mjs').then(m => m.NavigationFlyoutMenuComponent), /* @ts-ignore */
1338
+ import('./ojiepermana-angular-navigation-navigation-horizontal.component-DUJ4HEmh.mjs').then(m => m.NavigationHorizontalComponent), /* @ts-ignore */
1339
+ import('./ojiepermana-angular-navigation-navigation-dockbar-menu.component-FKJqBVRX.mjs').then(m => m.NavigationDockbarMenuComponent)], resolveMetadata: (NavigationFlyoutMenuComponent, NavigationHorizontalComponent, NavigationDockbarMenuComponent) => ({ decorators: [{
1340
1340
  type: Component,
1341
1341
  args: [{
1342
1342
  selector: 'NavigationContent',
@@ -165,8 +165,12 @@ class NavigationService {
165
165
  routerLinkActiveOptions(item) {
166
166
  return item.isActiveMatchOptions ?? (item.exactMatch ? this.exactMatchOptions : this.subsetMatchOptions);
167
167
  }
168
- itemRole(orientation, level) {
169
- return orientation === 'horizontal' || level > 0 ? 'menuitem' : null;
168
+ itemRole(orientation, _level) {
169
+ // Horizontal navs are menubars/menus (arrow-key roving) menuitem. Vertical
170
+ // navs are plain lists of links (tab navigation, no menu keyboard model), so
171
+ // their items must NOT be menuitems — a menuitem inside a `list` is an invalid
172
+ // ARIA parent (axe `aria-required-parent`).
173
+ return orientation === 'horizontal' ? 'menuitem' : null;
170
174
  }
171
175
  compactLabel(item, compact) {
172
176
  return compact ? (item.tooltip ?? item.title ?? null) : null;
@@ -1 +1 @@
1
- export { c as NavigationCollapseExpandedDirective, d as NavigationCollapseRootDirective, e as NavigationContainerComponent, f as NavigationContentComponent, g as NavigationDockbarComponent, h as NavigationFlyoutComponent, i as NavigationFooterActionComponent, j as NavigationFooterComponent, k as NavigationFooterInitialComponent, l as NavigationFooterTitleComponent, m as NavigationHeaderComponent, n as NavigationHeaderInitialComponent, o as NavigationHeaderTitleComponent, p as NavigationIconDirective, q as NavigationNavbarComponent, r as NavigationSidebarComponent, s as deriveNavigationInitials, t as normalizeUiNavItems } from './ojiepermana-angular-navigation-ojiepermana-angular-navigation-SlMGlTuA.mjs';
1
+ export { c as NavigationCollapseExpandedDirective, d as NavigationCollapseRootDirective, e as NavigationContainerComponent, f as NavigationContentComponent, g as NavigationDockbarComponent, h as NavigationFlyoutComponent, i as NavigationFooterActionComponent, j as NavigationFooterComponent, k as NavigationFooterInitialComponent, l as NavigationFooterTitleComponent, m as NavigationHeaderComponent, n as NavigationHeaderInitialComponent, o as NavigationHeaderTitleComponent, p as NavigationIconDirective, q as NavigationNavbarComponent, r as NavigationSidebarComponent, s as deriveNavigationInitials, t as normalizeUiNavItems } from './ojiepermana-angular-navigation-ojiepermana-angular-navigation-Dh4Huk-N.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ojiepermana/angular-navigation",
3
- "version": "22.0.45",
3
+ "version": "22.0.47",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/edsis/angular.git"
@@ -13,7 +13,7 @@
13
13
  "@angular/common": ">=22.0.0",
14
14
  "@angular/core": ">=22.0.0",
15
15
  "@angular/router": ">=22.0.0",
16
- "@ojiepermana/angular-component": "^22.0.45",
16
+ "@ojiepermana/angular-component": "^22.0.47",
17
17
  "rxjs": ">=7.8.0"
18
18
  },
19
19
  "dependencies": {
@@ -115,7 +115,7 @@ declare class NavigationService {
115
115
  hrefFor(item: NavigationNormalizedItem): string | null;
116
116
  relFor(item: NavigationNormalizedItem): string | null;
117
117
  routerLinkActiveOptions(item: NavigationNormalizedItem): IsActiveMatchOptions;
118
- itemRole(orientation: NavigationOrientation, level: number): 'menuitem' | null;
118
+ itemRole(orientation: NavigationOrientation, _level: number): 'menuitem' | null;
119
119
  compactLabel(item: NavigationNormalizedItem, compact: boolean): string | null;
120
120
  titleFor(item: NavigationNormalizedItem, compact: boolean): string | null;
121
121
  compactFallback(item: NavigationNormalizedItem): string;