@ojiepermana/angular 22.2.4 → 22.2.6

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 (19) hide show
  1. package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-D-WgBF6d.mjs +234 -0
  2. package/fesm2022/{ojiepermana-angular-navigation-navigation-dockbar-menu.component-DC8rfxS5.mjs → ojiepermana-angular-navigation-navigation-dockbar-menu.component-UrcWBqBk.mjs} +25 -38
  3. package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-meQb_EWZ.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-1WiRlut1.mjs} +44 -20
  4. package/fesm2022/{ojiepermana-angular-navigation-navigation-flyout-menu.component-DRdw2G-c.mjs → ojiepermana-angular-navigation-navigation-flyout-menu.component-dAVUnvwq.mjs} +23 -4
  5. package/fesm2022/{ojiepermana-angular-navigation-navigation-horizontal.component-Bx1NcrWO.mjs → ojiepermana-angular-navigation-navigation-horizontal.component-OD_cAkg8.mjs} +31 -4
  6. package/fesm2022/{ojiepermana-angular-navigation-navigation-item.component-ERZNpmTZ.mjs → ojiepermana-angular-navigation-navigation-item.component-6mJbQ94G.mjs} +402 -108
  7. package/fesm2022/{ojiepermana-angular-navigation-navigation-list.component-D-oOKwHg.mjs → ojiepermana-angular-navigation-navigation-list.component-DefF7_rB.mjs} +20 -1
  8. package/fesm2022/ojiepermana-angular-navigation.mjs +95 -19
  9. package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +48 -2
  10. package/fesm2022/ojiepermana-angular-theme-page-root.mjs +1 -0
  11. package/fesm2022/ojiepermana-angular-theme-shell.mjs +1 -0
  12. package/navigation/README.md +148 -3
  13. package/package.json +2 -2
  14. package/theme/styles/css/base/components.css +20 -0
  15. package/theme/styles/css/base/tokens.css +6 -0
  16. package/types/ojiepermana-angular-navigation-types.d.ts +3 -3
  17. package/types/ojiepermana-angular-navigation.d.ts +17 -0
  18. package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +16 -2
  19. package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-4RIokl1C.mjs +0 -129
@@ -1,5 +1,5 @@
1
- import { r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-ERZNpmTZ.mjs";
2
- import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-meQb_EWZ.mjs";
1
+ import { r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-6mJbQ94G.mjs";
2
+ import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-1WiRlut1.mjs";
3
3
  import * as i0 from "@angular/core";
4
4
  import { Component, ElementRef, Injector, afterNextRender, computed, effect, inject, input, output, signal } from "@angular/core";
5
5
  import { cn } from "@ojiepermana/angular/component/utils/core";
@@ -12,6 +12,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
12
12
  host = inject(ElementRef);
13
13
  injector = inject(Injector);
14
14
  document = inject(DOCUMENT);
15
+ badgeContext = input({}, ...ngDevMode ? [{ debugName: "badgeContext" }] : /* istanbul ignore next */ []);
15
16
  navId = input("default", ...ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []);
16
17
  items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
17
18
  label = input("Menu", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
@@ -213,6 +214,13 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
213
214
  isStandalone: true,
214
215
  selector: "NavigationFlyoutMenu",
215
216
  inputs: {
217
+ badgeContext: {
218
+ classPropertyName: "badgeContext",
219
+ publicName: "badgeContext",
220
+ isSignal: true,
221
+ isRequired: false,
222
+ transformFunction: null
223
+ },
216
224
  navId: {
217
225
  classPropertyName: "navId",
218
226
  publicName: "navId",
@@ -371,7 +379,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
371
379
  },
372
380
  providers: [provideIcons(LucideChevronRight, LucideMenu)],
373
381
  ngImport: i0,
374
- template: "<button\n type=\"button\"\n data-navigation-flyout-trigger=\"true\"\n [class]=\"triggerClasses()\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId() : null\"\n [attr.aria-label]=\"showIconOnly() ? label() : null\"\n [attr.title]=\"showIconOnly() ? label() : null\"\n (click)=\"toggleFlyout()\"\n>\n @if (showIconOnly()) {\n <Icon\n [name]=\"triggerIcon() ?? 'menu'\"\n size=\"inherit\"\n class=\"text-(length:--nav-icon-size) text-current\"\n />\n } @else {\n @if (iconPosition() === 'start' && triggerIcon(); as iconName) {\n <Icon\n [name]=\"iconName\"\n size=\"inherit\"\n class=\"shrink-0 text-(length:--nav-icon-size) text-current\"\n />\n }\n\n <span class=\"truncate\">{{ label() }}</span>\n\n @if (iconPosition() === 'end' && triggerIcon(); as iconName) {\n <Icon\n [name]=\"iconName\"\n size=\"inherit\"\n class=\"shrink-0 text-(length:--nav-icon-size) text-current\"\n />\n }\n }\n</button>\n\n@if (isOpen()) {\n <div\n [id]=\"panelId()\"\n data-navigation-flyout-panel=\"true\"\n [attr.data-navigation-flyout-floating]=\"floating() ? 'true' : null\"\n [class]=\"panelWrapperClasses()\"\n [style.left.px]=\"floating() ? null : panelPlacement()?.left\"\n [style.top.px]=\"floating() || isBottom() ? null : panelPlacement()?.top\"\n [style.bottom.px]=\"!floating() && isBottom() ? panelPlacement()?.bottom : null\"\n [style.width.px]=\"floating() ? null : panelPlacement()?.width\"\n >\n <div\n [attr.data-navigation-flyout-floating-card]=\"floating() ? 'true' : null\"\n [class]=\"panelCardClasses()\"\n >\n <div data-navigation-flyout-menu-layout=\"true\" [class]=\"menuClasses()\">\n <!-- ROW 1 = bar (sticky, menutup bar trigger), struktur seperti bar navbar:\n Header (kiri) | menu item (tengah) | Footer (kanan). Hanya ROW 2 (grid child)\n di bawah bar yang ikut scroll. -->\n <div data-navigation-flyout-bar=\"true\" [class]=\"barRowClasses()\">\n <ng-content select=\"NavigationHeader\" />\n\n <ul\n role=\"menu\"\n tabindex=\"-1\"\n data-navigation-flyout-row=\"true\"\n [class]=\"rowClasses()\"\n [attr.aria-label]=\"label()\"\n (keydown)=\"onRowKeydown($event)\"\n >\n @for (item of items(); track item.key) {\n @switch (item.type) {\n @case ('divider') {\n <li role=\"separator\" class=\"mx-1 h-5 w-px bg-border\"></li>\n }\n @case ('spacer') {\n <li role=\"none\" aria-hidden=\"true\" class=\"flex-1\"></li>\n }\n @default {\n @if (item.children.length > 0) {\n <li\n role=\"none\"\n [class]=\"groupContainerClasses(item)\"\n [attr.data-navigation-item-key]=\"item.key\"\n >\n <button\n type=\"button\"\n role=\"menuitem\"\n data-navigation-flyout-tab=\"true\"\n [class]=\"tabClasses(item)\"\n [attr.aria-expanded]=\"isBranchOpen(item)\"\n [attr.aria-controls]=\"isBranchOpen(item) ? panelContentId() : null\"\n [disabled]=\"item.disabled || null\"\n (click)=\"openBranch(item)\"\n >\n <NavigationItemContent\n [item]=\"item\"\n [active]=\"isItemActive(item)\"\n [compact]=\"false\"\n [orientation]=\"'horizontal'\"\n [level]=\"0\"\n [iconTemplate]=\"iconTemplate()\"\n />\n <Icon\n name=\"chevron-right\"\n size=\"inherit\"\n [class]=\"tabChevronClasses(item)\"\n />\n </button>\n </li>\n } @else {\n <li\n NavigationItem\n [navId]=\"navId()\"\n [item]=\"item\"\n [level]=\"0\"\n [orientation]=\"'horizontal'\"\n [compact]=\"false\"\n [itemClass]=\"navItemClass()\"\n [activeIds]=\"activeIds()\"\n [activeUrl]=\"activeUrl()\"\n [iconTemplate]=\"iconTemplate()\"\n [collapseTree]=\"collapseTree()\"\n [openedIds]=\"openedIds()\"\n (openedIdsChange)=\"openedIdsChange.emit($event)\"\n (itemSelected)=\"itemSelected.emit($event)\"\n ></li>\n }\n }\n }\n }\n </ul>\n\n <ng-content select=\"NavigationFooter\" />\n </div>\n\n <!-- ROW 2 = child dari menu item aktif; HANYA area ini yang men-scroll. -->\n <div\n [id]=\"panelContentId()\"\n data-navigation-flyout-scroll=\"true\"\n [attr.role]=\"activeBranch() ? 'menu' : null\"\n [attr.aria-label]=\"activeBranch()?.title || null\"\n [class]=\"scrollRegionClasses()\"\n >\n @if (activeBranch(); as branch) {\n <NavigationEntryGrid\n [navId]=\"navId()\"\n [branch]=\"branch\"\n [typeStyle]=\"typeStyle()\"\n [itemClass]=\"itemClass()\"\n [activeIds]=\"activeIds()\"\n [activeUrl]=\"activeUrl()\"\n [iconTemplate]=\"iconTemplate()\"\n [collapseTree]=\"collapseTree()\"\n [openedIds]=\"openedIds()\"\n (openedIdsChange)=\"openedIdsChange.emit($event)\"\n (itemSelected)=\"itemSelected.emit($event)\"\n />\n }\n </div>\n </div>\n </div>\n </div>\n}\n",
382
+ template: "<button\n type=\"button\"\n data-navigation-flyout-trigger=\"true\"\n [class]=\"triggerClasses()\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId() : null\"\n [attr.aria-label]=\"showIconOnly() ? label() : null\"\n [attr.title]=\"showIconOnly() ? label() : null\"\n (click)=\"toggleFlyout()\"\n>\n @if (showIconOnly()) {\n <Icon\n [name]=\"triggerIcon() ?? 'menu'\"\n size=\"inherit\"\n class=\"text-(length:--nav-icon-size) text-current\"\n />\n } @else {\n @if (iconPosition() === 'start' && triggerIcon(); as iconName) {\n <Icon\n [name]=\"iconName\"\n size=\"inherit\"\n class=\"shrink-0 text-(length:--nav-icon-size) text-current\"\n />\n }\n\n <span class=\"truncate\">{{ label() }}</span>\n\n @if (iconPosition() === 'end' && triggerIcon(); as iconName) {\n <Icon\n [name]=\"iconName\"\n size=\"inherit\"\n class=\"shrink-0 text-(length:--nav-icon-size) text-current\"\n />\n }\n }\n</button>\n\n@if (isOpen()) {\n <div\n [id]=\"panelId()\"\n data-navigation-flyout-panel=\"true\"\n [attr.data-navigation-flyout-floating]=\"floating() ? 'true' : null\"\n [class]=\"panelWrapperClasses()\"\n [style.left.px]=\"floating() ? null : panelPlacement()?.left\"\n [style.top.px]=\"floating() || isBottom() ? null : panelPlacement()?.top\"\n [style.bottom.px]=\"!floating() && isBottom() ? panelPlacement()?.bottom : null\"\n [style.width.px]=\"floating() ? null : panelPlacement()?.width\"\n >\n <div\n [attr.data-navigation-flyout-floating-card]=\"floating() ? 'true' : null\"\n [class]=\"panelCardClasses()\"\n >\n <div data-navigation-flyout-menu-layout=\"true\" [class]=\"menuClasses()\">\n <!-- ROW 1 = bar (sticky, menutup bar trigger), struktur seperti bar navbar:\n Header (kiri) | menu item (tengah) | Footer (kanan). Hanya ROW 2 (grid child)\n di bawah bar yang ikut scroll. -->\n <div data-navigation-flyout-bar=\"true\" [class]=\"barRowClasses()\">\n <ng-content select=\"NavigationHeader\" />\n\n <ul\n role=\"menu\"\n tabindex=\"-1\"\n data-navigation-flyout-row=\"true\"\n [class]=\"rowClasses()\"\n [attr.aria-label]=\"label()\"\n (keydown)=\"onRowKeydown($event)\"\n >\n @for (item of items(); track item.key) {\n @switch (item.type) {\n @case ('divider') {\n <li role=\"separator\" class=\"mx-1 h-5 w-px bg-border\"></li>\n }\n @case ('spacer') {\n <li role=\"none\" aria-hidden=\"true\" class=\"flex-1\"></li>\n }\n @default {\n @if (item.children.length > 0) {\n <li\n role=\"none\"\n [class]=\"groupContainerClasses(item)\"\n [attr.data-navigation-item-key]=\"item.key\"\n >\n <button\n type=\"button\"\n role=\"menuitem\"\n data-navigation-flyout-tab=\"true\"\n [class]=\"tabClasses(item)\"\n [attr.aria-expanded]=\"isBranchOpen(item)\"\n [attr.aria-controls]=\"isBranchOpen(item) ? panelContentId() : null\"\n [disabled]=\"item.disabled || null\"\n (click)=\"openBranch(item)\"\n >\n <NavigationItemContent\n [item]=\"item\"\n [active]=\"isItemActive(item)\"\n [compact]=\"false\"\n [orientation]=\"'horizontal'\"\n [level]=\"0\"\n [badgeContext]=\"badgeContext()\"\n [iconTemplate]=\"iconTemplate()\"\n />\n <Icon\n name=\"chevron-right\"\n size=\"inherit\"\n [class]=\"tabChevronClasses(item)\"\n />\n </button>\n </li>\n } @else {\n <li\n NavigationItem\n [navId]=\"navId()\"\n [item]=\"item\"\n [level]=\"0\"\n [orientation]=\"'horizontal'\"\n [compact]=\"false\"\n [itemClass]=\"navItemClass()\"\n [activeIds]=\"activeIds()\"\n [activeUrl]=\"activeUrl()\"\n [badgeContext]=\"badgeContext()\"\n [iconTemplate]=\"iconTemplate()\"\n [collapseTree]=\"collapseTree()\"\n [openedIds]=\"openedIds()\"\n (openedIdsChange)=\"openedIdsChange.emit($event)\"\n (itemSelected)=\"itemSelected.emit($event)\"\n ></li>\n }\n }\n }\n }\n </ul>\n\n <ng-content select=\"NavigationFooter\" />\n </div>\n\n <!-- ROW 2 = child dari menu item aktif; HANYA area ini yang men-scroll. -->\n <div\n [id]=\"panelContentId()\"\n data-navigation-flyout-scroll=\"true\"\n [attr.role]=\"activeBranch() ? 'menu' : null\"\n [attr.aria-label]=\"activeBranch()?.title || null\"\n [class]=\"scrollRegionClasses()\"\n >\n @if (activeBranch(); as branch) {\n <NavigationEntryGrid\n [navId]=\"navId()\"\n [branch]=\"branch\"\n [typeStyle]=\"typeStyle()\"\n [itemClass]=\"itemClass()\"\n [activeIds]=\"activeIds()\"\n [activeUrl]=\"activeUrl()\"\n [badgeContext]=\"badgeContext()\"\n [iconTemplate]=\"iconTemplate()\"\n [collapseTree]=\"collapseTree()\"\n [openedIds]=\"openedIds()\"\n (openedIdsChange)=\"openedIdsChange.emit($event)\"\n (itemSelected)=\"itemSelected.emit($event)\"\n />\n }\n </div>\n </div>\n </div>\n </div>\n}\n",
375
383
  styles: ["[data-navigation-flyout-floating=true]{width:var(--nav-flyout-floating-width, min(22rem, 85vw));max-width:var(--nav-flyout-floating-max-width, 85vw)}[data-navigation-flyout-floating-card=true]{border-radius:var(--nav-flyout-floating-radius, var(--radius-xl))}[data-navigation-flyout-panel=true]{-webkit-app-region:no-drag;app-region:no-drag}\n"],
376
384
  dependencies: [
377
385
  {
@@ -391,6 +399,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
391
399
  type: NavigationEntryGridComponent,
392
400
  selector: "NavigationEntryGrid",
393
401
  inputs: [
402
+ "badgeContext",
394
403
  "navId",
395
404
  "branch",
396
405
  "typeStyle",
@@ -408,6 +417,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
408
417
  type: NavigationItemComponent,
409
418
  selector: "li[NavigationItem]",
410
419
  inputs: [
420
+ "badgeContext",
411
421
  "navId",
412
422
  "item",
413
423
  "level",
@@ -433,6 +443,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
433
443
  type: NavigationItemContentComponent,
434
444
  selector: "NavigationItemContent",
435
445
  inputs: [
446
+ "badgeContext",
436
447
  "item",
437
448
  "active",
438
449
  "compact",
@@ -464,12 +475,20 @@ i0.ɵɵngDeclareClassMetadata({
464
475
  "[class]": "hostClasses()",
465
476
  "(keydown.escape)": "onEscape($event)"
466
477
  },
467
- template: "<button\n type=\"button\"\n data-navigation-flyout-trigger=\"true\"\n [class]=\"triggerClasses()\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId() : null\"\n [attr.aria-label]=\"showIconOnly() ? label() : null\"\n [attr.title]=\"showIconOnly() ? label() : null\"\n (click)=\"toggleFlyout()\"\n>\n @if (showIconOnly()) {\n <Icon\n [name]=\"triggerIcon() ?? 'menu'\"\n size=\"inherit\"\n class=\"text-(length:--nav-icon-size) text-current\"\n />\n } @else {\n @if (iconPosition() === 'start' && triggerIcon(); as iconName) {\n <Icon\n [name]=\"iconName\"\n size=\"inherit\"\n class=\"shrink-0 text-(length:--nav-icon-size) text-current\"\n />\n }\n\n <span class=\"truncate\">{{ label() }}</span>\n\n @if (iconPosition() === 'end' && triggerIcon(); as iconName) {\n <Icon\n [name]=\"iconName\"\n size=\"inherit\"\n class=\"shrink-0 text-(length:--nav-icon-size) text-current\"\n />\n }\n }\n</button>\n\n@if (isOpen()) {\n <div\n [id]=\"panelId()\"\n data-navigation-flyout-panel=\"true\"\n [attr.data-navigation-flyout-floating]=\"floating() ? 'true' : null\"\n [class]=\"panelWrapperClasses()\"\n [style.left.px]=\"floating() ? null : panelPlacement()?.left\"\n [style.top.px]=\"floating() || isBottom() ? null : panelPlacement()?.top\"\n [style.bottom.px]=\"!floating() && isBottom() ? panelPlacement()?.bottom : null\"\n [style.width.px]=\"floating() ? null : panelPlacement()?.width\"\n >\n <div\n [attr.data-navigation-flyout-floating-card]=\"floating() ? 'true' : null\"\n [class]=\"panelCardClasses()\"\n >\n <div data-navigation-flyout-menu-layout=\"true\" [class]=\"menuClasses()\">\n <!-- ROW 1 = bar (sticky, menutup bar trigger), struktur seperti bar navbar:\n Header (kiri) | menu item (tengah) | Footer (kanan). Hanya ROW 2 (grid child)\n di bawah bar yang ikut scroll. -->\n <div data-navigation-flyout-bar=\"true\" [class]=\"barRowClasses()\">\n <ng-content select=\"NavigationHeader\" />\n\n <ul\n role=\"menu\"\n tabindex=\"-1\"\n data-navigation-flyout-row=\"true\"\n [class]=\"rowClasses()\"\n [attr.aria-label]=\"label()\"\n (keydown)=\"onRowKeydown($event)\"\n >\n @for (item of items(); track item.key) {\n @switch (item.type) {\n @case ('divider') {\n <li role=\"separator\" class=\"mx-1 h-5 w-px bg-border\"></li>\n }\n @case ('spacer') {\n <li role=\"none\" aria-hidden=\"true\" class=\"flex-1\"></li>\n }\n @default {\n @if (item.children.length > 0) {\n <li\n role=\"none\"\n [class]=\"groupContainerClasses(item)\"\n [attr.data-navigation-item-key]=\"item.key\"\n >\n <button\n type=\"button\"\n role=\"menuitem\"\n data-navigation-flyout-tab=\"true\"\n [class]=\"tabClasses(item)\"\n [attr.aria-expanded]=\"isBranchOpen(item)\"\n [attr.aria-controls]=\"isBranchOpen(item) ? panelContentId() : null\"\n [disabled]=\"item.disabled || null\"\n (click)=\"openBranch(item)\"\n >\n <NavigationItemContent\n [item]=\"item\"\n [active]=\"isItemActive(item)\"\n [compact]=\"false\"\n [orientation]=\"'horizontal'\"\n [level]=\"0\"\n [iconTemplate]=\"iconTemplate()\"\n />\n <Icon\n name=\"chevron-right\"\n size=\"inherit\"\n [class]=\"tabChevronClasses(item)\"\n />\n </button>\n </li>\n } @else {\n <li\n NavigationItem\n [navId]=\"navId()\"\n [item]=\"item\"\n [level]=\"0\"\n [orientation]=\"'horizontal'\"\n [compact]=\"false\"\n [itemClass]=\"navItemClass()\"\n [activeIds]=\"activeIds()\"\n [activeUrl]=\"activeUrl()\"\n [iconTemplate]=\"iconTemplate()\"\n [collapseTree]=\"collapseTree()\"\n [openedIds]=\"openedIds()\"\n (openedIdsChange)=\"openedIdsChange.emit($event)\"\n (itemSelected)=\"itemSelected.emit($event)\"\n ></li>\n }\n }\n }\n }\n </ul>\n\n <ng-content select=\"NavigationFooter\" />\n </div>\n\n <!-- ROW 2 = child dari menu item aktif; HANYA area ini yang men-scroll. -->\n <div\n [id]=\"panelContentId()\"\n data-navigation-flyout-scroll=\"true\"\n [attr.role]=\"activeBranch() ? 'menu' : null\"\n [attr.aria-label]=\"activeBranch()?.title || null\"\n [class]=\"scrollRegionClasses()\"\n >\n @if (activeBranch(); as branch) {\n <NavigationEntryGrid\n [navId]=\"navId()\"\n [branch]=\"branch\"\n [typeStyle]=\"typeStyle()\"\n [itemClass]=\"itemClass()\"\n [activeIds]=\"activeIds()\"\n [activeUrl]=\"activeUrl()\"\n [iconTemplate]=\"iconTemplate()\"\n [collapseTree]=\"collapseTree()\"\n [openedIds]=\"openedIds()\"\n (openedIdsChange)=\"openedIdsChange.emit($event)\"\n (itemSelected)=\"itemSelected.emit($event)\"\n />\n }\n </div>\n </div>\n </div>\n </div>\n}\n",
478
+ template: "<button\n type=\"button\"\n data-navigation-flyout-trigger=\"true\"\n [class]=\"triggerClasses()\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId() : null\"\n [attr.aria-label]=\"showIconOnly() ? label() : null\"\n [attr.title]=\"showIconOnly() ? label() : null\"\n (click)=\"toggleFlyout()\"\n>\n @if (showIconOnly()) {\n <Icon\n [name]=\"triggerIcon() ?? 'menu'\"\n size=\"inherit\"\n class=\"text-(length:--nav-icon-size) text-current\"\n />\n } @else {\n @if (iconPosition() === 'start' && triggerIcon(); as iconName) {\n <Icon\n [name]=\"iconName\"\n size=\"inherit\"\n class=\"shrink-0 text-(length:--nav-icon-size) text-current\"\n />\n }\n\n <span class=\"truncate\">{{ label() }}</span>\n\n @if (iconPosition() === 'end' && triggerIcon(); as iconName) {\n <Icon\n [name]=\"iconName\"\n size=\"inherit\"\n class=\"shrink-0 text-(length:--nav-icon-size) text-current\"\n />\n }\n }\n</button>\n\n@if (isOpen()) {\n <div\n [id]=\"panelId()\"\n data-navigation-flyout-panel=\"true\"\n [attr.data-navigation-flyout-floating]=\"floating() ? 'true' : null\"\n [class]=\"panelWrapperClasses()\"\n [style.left.px]=\"floating() ? null : panelPlacement()?.left\"\n [style.top.px]=\"floating() || isBottom() ? null : panelPlacement()?.top\"\n [style.bottom.px]=\"!floating() && isBottom() ? panelPlacement()?.bottom : null\"\n [style.width.px]=\"floating() ? null : panelPlacement()?.width\"\n >\n <div\n [attr.data-navigation-flyout-floating-card]=\"floating() ? 'true' : null\"\n [class]=\"panelCardClasses()\"\n >\n <div data-navigation-flyout-menu-layout=\"true\" [class]=\"menuClasses()\">\n <!-- ROW 1 = bar (sticky, menutup bar trigger), struktur seperti bar navbar:\n Header (kiri) | menu item (tengah) | Footer (kanan). Hanya ROW 2 (grid child)\n di bawah bar yang ikut scroll. -->\n <div data-navigation-flyout-bar=\"true\" [class]=\"barRowClasses()\">\n <ng-content select=\"NavigationHeader\" />\n\n <ul\n role=\"menu\"\n tabindex=\"-1\"\n data-navigation-flyout-row=\"true\"\n [class]=\"rowClasses()\"\n [attr.aria-label]=\"label()\"\n (keydown)=\"onRowKeydown($event)\"\n >\n @for (item of items(); track item.key) {\n @switch (item.type) {\n @case ('divider') {\n <li role=\"separator\" class=\"mx-1 h-5 w-px bg-border\"></li>\n }\n @case ('spacer') {\n <li role=\"none\" aria-hidden=\"true\" class=\"flex-1\"></li>\n }\n @default {\n @if (item.children.length > 0) {\n <li\n role=\"none\"\n [class]=\"groupContainerClasses(item)\"\n [attr.data-navigation-item-key]=\"item.key\"\n >\n <button\n type=\"button\"\n role=\"menuitem\"\n data-navigation-flyout-tab=\"true\"\n [class]=\"tabClasses(item)\"\n [attr.aria-expanded]=\"isBranchOpen(item)\"\n [attr.aria-controls]=\"isBranchOpen(item) ? panelContentId() : null\"\n [disabled]=\"item.disabled || null\"\n (click)=\"openBranch(item)\"\n >\n <NavigationItemContent\n [item]=\"item\"\n [active]=\"isItemActive(item)\"\n [compact]=\"false\"\n [orientation]=\"'horizontal'\"\n [level]=\"0\"\n [badgeContext]=\"badgeContext()\"\n [iconTemplate]=\"iconTemplate()\"\n />\n <Icon\n name=\"chevron-right\"\n size=\"inherit\"\n [class]=\"tabChevronClasses(item)\"\n />\n </button>\n </li>\n } @else {\n <li\n NavigationItem\n [navId]=\"navId()\"\n [item]=\"item\"\n [level]=\"0\"\n [orientation]=\"'horizontal'\"\n [compact]=\"false\"\n [itemClass]=\"navItemClass()\"\n [activeIds]=\"activeIds()\"\n [activeUrl]=\"activeUrl()\"\n [badgeContext]=\"badgeContext()\"\n [iconTemplate]=\"iconTemplate()\"\n [collapseTree]=\"collapseTree()\"\n [openedIds]=\"openedIds()\"\n (openedIdsChange)=\"openedIdsChange.emit($event)\"\n (itemSelected)=\"itemSelected.emit($event)\"\n ></li>\n }\n }\n }\n }\n </ul>\n\n <ng-content select=\"NavigationFooter\" />\n </div>\n\n <!-- ROW 2 = child dari menu item aktif; HANYA area ini yang men-scroll. -->\n <div\n [id]=\"panelContentId()\"\n data-navigation-flyout-scroll=\"true\"\n [attr.role]=\"activeBranch() ? 'menu' : null\"\n [attr.aria-label]=\"activeBranch()?.title || null\"\n [class]=\"scrollRegionClasses()\"\n >\n @if (activeBranch(); as branch) {\n <NavigationEntryGrid\n [navId]=\"navId()\"\n [branch]=\"branch\"\n [typeStyle]=\"typeStyle()\"\n [itemClass]=\"itemClass()\"\n [activeIds]=\"activeIds()\"\n [activeUrl]=\"activeUrl()\"\n [badgeContext]=\"badgeContext()\"\n [iconTemplate]=\"iconTemplate()\"\n [collapseTree]=\"collapseTree()\"\n [openedIds]=\"openedIds()\"\n (openedIdsChange)=\"openedIdsChange.emit($event)\"\n (itemSelected)=\"itemSelected.emit($event)\"\n />\n }\n </div>\n </div>\n </div>\n </div>\n}\n",
468
479
  styles: ["[data-navigation-flyout-floating=true]{width:var(--nav-flyout-floating-width, min(22rem, 85vw));max-width:var(--nav-flyout-floating-max-width, 85vw)}[data-navigation-flyout-floating-card=true]{border-radius:var(--nav-flyout-floating-radius, var(--radius-xl))}[data-navigation-flyout-panel=true]{-webkit-app-region:no-drag;app-region:no-drag}\n"]
469
480
  }]
470
481
  }],
471
482
  ctorParameters: () => [],
472
483
  propDecorators: {
484
+ badgeContext: [{
485
+ type: i0.Input,
486
+ args: [{
487
+ isSignal: true,
488
+ alias: "badgeContext",
489
+ required: false
490
+ }]
491
+ }],
473
492
  navId: [{
474
493
  type: i0.Input,
475
494
  args: [{
@@ -1,15 +1,18 @@
1
- import { n as navigationPanelId, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-ERZNpmTZ.mjs";
2
- import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-meQb_EWZ.mjs";
1
+ import { i as hasNavigationCountBadge } from "./ojiepermana-angular-navigation-navigation-badge-count.component-D-WgBF6d.mjs";
2
+ import { n as navigationPanelId, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-6mJbQ94G.mjs";
3
+ import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-1WiRlut1.mjs";
3
4
  import * as i0 from "@angular/core";
4
5
  import { Component, ElementRef, Injector, afterNextRender, computed, effect, inject, input, output, signal } from "@angular/core";
5
6
  import { cn } from "@ojiepermana/angular/component/utils/core";
6
7
  import { NAVIGATION_ADAPTER } from "@ojiepermana/angular/navigation/core";
7
8
  import { DOCUMENT, NgTemplateOutlet } from "@angular/common";
8
9
  var NavigationHorizontalComponent = class NavigationHorizontalComponent {
10
+ hasCountBadge = hasNavigationCountBadge;
9
11
  nav = inject(NAVIGATION_ADAPTER);
10
12
  host = inject(ElementRef);
11
13
  injector = inject(Injector);
12
14
  document = inject(DOCUMENT);
15
+ badgeContext = input({}, ...ngDevMode ? [{ debugName: "badgeContext" }] : /* istanbul ignore next */ []);
13
16
  navId = input("default", ...ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []);
14
17
  items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
15
18
  position = input("top", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
@@ -168,6 +171,13 @@ var NavigationHorizontalComponent = class NavigationHorizontalComponent {
168
171
  isStandalone: true,
169
172
  selector: "NavigationHorizontal",
170
173
  inputs: {
174
+ badgeContext: {
175
+ classPropertyName: "badgeContext",
176
+ publicName: "badgeContext",
177
+ isSignal: true,
178
+ isRequired: false,
179
+ transformFunction: null
180
+ },
171
181
  navId: {
172
182
  classPropertyName: "navId",
173
183
  publicName: "navId",
@@ -292,6 +302,7 @@ var NavigationHorizontalComponent = class NavigationHorizontalComponent {
292
302
  [itemClass]="navItemClass()"
293
303
  [activeIds]="activeIds()"
294
304
  [activeUrl]="activeUrl()"
305
+ [badgeContext]="badgeContext()"
295
306
  [iconTemplate]="iconTemplate()"
296
307
  [collapseTree]="collapseTree()"
297
308
  [openedIds]="openedIds()"
@@ -317,7 +328,7 @@ var NavigationHorizontalComponent = class NavigationHorizontalComponent {
317
328
  [attr.aria-expanded]="isPanelOpen(item)"
318
329
  [attr.aria-controls]="isPanelOpen(item) ? panelIdFor(item) : null"
319
330
  [attr.aria-haspopup]="'menu'"
320
- [attr.aria-label]="compactLabel(item)"
331
+ [attr.aria-label]="hasCountBadge(item) ? null : compactLabel(item)"
321
332
  [attr.title]="titleFor(item)"
322
333
  [disabled]="item.disabled || null"
323
334
  (click)="togglePanel(item)"
@@ -328,6 +339,7 @@ var NavigationHorizontalComponent = class NavigationHorizontalComponent {
328
339
  [compact]="compact()"
329
340
  [orientation]="'horizontal'"
330
341
  [level]="0"
342
+ [badgeContext]="badgeContext()"
331
343
  [iconTemplate]="iconTemplate()"
332
344
  />
333
345
  </button>
@@ -350,6 +362,7 @@ var NavigationHorizontalComponent = class NavigationHorizontalComponent {
350
362
  [itemClass]="itemClass()"
351
363
  [activeIds]="activeIds()"
352
364
  [activeUrl]="activeUrl()"
365
+ [badgeContext]="badgeContext()"
353
366
  [iconTemplate]="iconTemplate()"
354
367
  [collapseTree]="collapseTree()"
355
368
  [openedIds]="openedIds()"
@@ -378,6 +391,7 @@ var NavigationHorizontalComponent = class NavigationHorizontalComponent {
378
391
  type: NavigationEntryGridComponent,
379
392
  selector: "NavigationEntryGrid",
380
393
  inputs: [
394
+ "badgeContext",
381
395
  "navId",
382
396
  "branch",
383
397
  "typeStyle",
@@ -395,6 +409,7 @@ var NavigationHorizontalComponent = class NavigationHorizontalComponent {
395
409
  type: NavigationItemComponent,
396
410
  selector: "li[NavigationItem]",
397
411
  inputs: [
412
+ "badgeContext",
398
413
  "navId",
399
414
  "item",
400
415
  "level",
@@ -420,6 +435,7 @@ var NavigationHorizontalComponent = class NavigationHorizontalComponent {
420
435
  type: NavigationItemContentComponent,
421
436
  selector: "NavigationItemContent",
422
437
  inputs: [
438
+ "badgeContext",
423
439
  "item",
424
440
  "active",
425
441
  "compact",
@@ -480,6 +496,7 @@ i0.ɵɵngDeclareClassMetadata({
480
496
  [itemClass]="navItemClass()"
481
497
  [activeIds]="activeIds()"
482
498
  [activeUrl]="activeUrl()"
499
+ [badgeContext]="badgeContext()"
483
500
  [iconTemplate]="iconTemplate()"
484
501
  [collapseTree]="collapseTree()"
485
502
  [openedIds]="openedIds()"
@@ -505,7 +522,7 @@ i0.ɵɵngDeclareClassMetadata({
505
522
  [attr.aria-expanded]="isPanelOpen(item)"
506
523
  [attr.aria-controls]="isPanelOpen(item) ? panelIdFor(item) : null"
507
524
  [attr.aria-haspopup]="'menu'"
508
- [attr.aria-label]="compactLabel(item)"
525
+ [attr.aria-label]="hasCountBadge(item) ? null : compactLabel(item)"
509
526
  [attr.title]="titleFor(item)"
510
527
  [disabled]="item.disabled || null"
511
528
  (click)="togglePanel(item)"
@@ -516,6 +533,7 @@ i0.ɵɵngDeclareClassMetadata({
516
533
  [compact]="compact()"
517
534
  [orientation]="'horizontal'"
518
535
  [level]="0"
536
+ [badgeContext]="badgeContext()"
519
537
  [iconTemplate]="iconTemplate()"
520
538
  />
521
539
  </button>
@@ -538,6 +556,7 @@ i0.ɵɵngDeclareClassMetadata({
538
556
  [itemClass]="itemClass()"
539
557
  [activeIds]="activeIds()"
540
558
  [activeUrl]="activeUrl()"
559
+ [badgeContext]="badgeContext()"
541
560
  [iconTemplate]="iconTemplate()"
542
561
  [collapseTree]="collapseTree()"
543
562
  [openedIds]="openedIds()"
@@ -553,6 +572,14 @@ i0.ɵɵngDeclareClassMetadata({
553
572
  }],
554
573
  ctorParameters: () => [],
555
574
  propDecorators: {
575
+ badgeContext: [{
576
+ type: i0.Input,
577
+ args: [{
578
+ isSignal: true,
579
+ alias: "badgeContext",
580
+ required: false
581
+ }]
582
+ }],
556
583
  navId: [{
557
584
  type: i0.Input,
558
585
  args: [{