@ojiepermana/angular 22.2.15 → 22.2.18

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 (39) hide show
  1. package/README.md +2 -2
  2. package/SUPPORT.md +23 -9
  3. package/component/composer/README.md +3 -0
  4. package/component/editor/README.md +3 -0
  5. package/fesm2022/ojiepermana-angular-component-composer.mjs +68 -19
  6. package/fesm2022/ojiepermana-angular-component-editor.mjs +68 -12
  7. package/fesm2022/ojiepermana-angular-component-input.mjs +1 -1
  8. package/fesm2022/ojiepermana-angular-component-native-select.mjs +1 -1
  9. package/fesm2022/ojiepermana-angular-component-select.mjs +2 -2
  10. package/fesm2022/ojiepermana-angular-component-textarea.mjs +1 -1
  11. package/fesm2022/ojiepermana-angular-component-utils-core.mjs +7 -1
  12. package/fesm2022/{ojiepermana-angular-navigation-navigation-badge-count.component-Bx89vXtg.mjs → ojiepermana-angular-navigation-navigation-badge-count.component-RkecLYjX.mjs} +28 -18
  13. package/fesm2022/{ojiepermana-angular-navigation-navigation-dockbar-menu.component-CSs3QW5t.mjs → ojiepermana-angular-navigation-navigation-dockbar-menu.component-Dl7VAyfV.mjs} +3 -3
  14. package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-Cgq8iaRG.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-2Jw-868m.mjs} +3 -1
  15. package/fesm2022/{ojiepermana-angular-navigation-navigation-flyout-menu.component-7Drr8U4O.mjs → ojiepermana-angular-navigation-navigation-flyout-menu.component-QHUdqD1N.mjs} +4 -4
  16. package/fesm2022/{ojiepermana-angular-navigation-navigation-horizontal.component-BrRGBBcK.mjs → ojiepermana-angular-navigation-navigation-horizontal.component-CoX6X3C2.mjs} +3 -3
  17. package/fesm2022/{ojiepermana-angular-navigation-navigation-item.component-DAxMpuW_.mjs → ojiepermana-angular-navigation-navigation-item.component-DTVh0wjc.mjs} +13 -3
  18. package/fesm2022/{ojiepermana-angular-navigation-navigation-list.component-Bs6dssld.mjs → ojiepermana-angular-navigation-navigation-list.component-CRRaXJz4.mjs} +1 -1
  19. package/fesm2022/ojiepermana-angular-navigation.mjs +33 -12
  20. package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +2 -1
  21. package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +24 -0
  22. package/fesm2022/ojiepermana-angular-theme-page-core.mjs +160 -92
  23. package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +9 -17
  24. package/fesm2022/ojiepermana-angular-theme-page-root.mjs +15 -6
  25. package/fesm2022/ojiepermana-angular-theme-page-side.mjs +10 -18
  26. package/fesm2022/ojiepermana-angular-theme-shell.mjs +1 -0
  27. package/fesm2022/ojiepermana-angular-theme-styles.mjs +1 -1
  28. package/navigation/README.md +17 -0
  29. package/package.json +5 -5
  30. package/theme/page/README.md +5 -3
  31. package/theme/styles/css/base/components.css +90 -0
  32. package/theme/styles/css/base/tokens.css +13 -0
  33. package/types/ojiepermana-angular-component-composer.d.ts +5 -1
  34. package/types/ojiepermana-angular-component-editor.d.ts +4 -0
  35. package/types/ojiepermana-angular-navigation-types.d.ts +6 -0
  36. package/types/ojiepermana-angular-navigation.d.ts +12 -2
  37. package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +11 -1
  38. package/types/ojiepermana-angular-theme-page-core.d.ts +8 -9
  39. package/types/ojiepermana-angular-theme-page-root.d.ts +1 -0
@@ -1,5 +1,5 @@
1
- import { a as navigationInteractiveStateClasses, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DAxMpuW_.mjs";
2
- import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-Cgq8iaRG.mjs";
1
+ import { a as navigationInteractiveStateClasses, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DTVh0wjc.mjs";
2
+ import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-2Jw-868m.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";
@@ -387,7 +387,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
387
387
  node: Menu
388
388
  })],
389
389
  ngImport: i0,
390
- 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",
390
+ 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 data-navigation-chevron=\"true\"\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",
391
391
  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"],
392
392
  dependencies: [
393
393
  {
@@ -493,7 +493,7 @@ i0.ɵɵngDeclareClassMetadata({
493
493
  "[class]": "hostClasses()",
494
494
  "(keydown.escape)": "onEscape($event)"
495
495
  },
496
- 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",
496
+ 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 data-navigation-chevron=\"true\"\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",
497
497
  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"]
498
498
  }]
499
499
  }],
@@ -1,6 +1,6 @@
1
- import { i as hasNavigationCountBadge } from "./ojiepermana-angular-navigation-navigation-badge-count.component-Bx89vXtg.mjs";
2
- import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-Cgq8iaRG.mjs";
3
- import { a as navigationInteractiveStateClasses, n as navigationPanelId, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DAxMpuW_.mjs";
1
+ import { i as hasNavigationCountBadge } from "./ojiepermana-angular-navigation-navigation-badge-count.component-RkecLYjX.mjs";
2
+ import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-2Jw-868m.mjs";
3
+ import { a as navigationInteractiveStateClasses, n as navigationPanelId, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DTVh0wjc.mjs";
4
4
  import * as i0 from "@angular/core";
5
5
  import { Component, ElementRef, Injector, afterNextRender, computed, effect, inject, input, output, signal } from "@angular/core";
6
6
  import { cn } from "@ojiepermana/angular/component/utils/core";
@@ -1,4 +1,4 @@
1
- import { i as hasNavigationCountBadge, s as navigationDescendantBadgeSources, t as NavigationBadgeCountComponent } from "./ojiepermana-angular-navigation-navigation-badge-count.component-Bx89vXtg.mjs";
1
+ import { i as hasNavigationCountBadge, s as navigationDescendantBadgeSources, t as NavigationBadgeCountComponent } from "./ojiepermana-angular-navigation-navigation-badge-count.component-RkecLYjX.mjs";
2
2
  import * as i0 from "@angular/core";
3
3
  import { Component, InjectionToken, computed, inject, input, output, signal } from "@angular/core";
4
4
  import { ActivatedRoute, Router, RouterLink } from "@angular/router";
@@ -901,7 +901,12 @@ var NavigationItemComponent = class NavigationItemComponent {
901
901
  />
902
902
 
903
903
  @if (!compact()) {
904
- <Icon name="chevron-right" size="inherit" [class]="chevronClasses()" />
904
+ <Icon
905
+ name="chevron-right"
906
+ size="inherit"
907
+ data-navigation-chevron="true"
908
+ [class]="chevronClasses()"
909
+ />
905
910
  }
906
911
  </button>
907
912
 
@@ -1296,7 +1301,12 @@ i0.ɵɵngDeclareClassMetadata({
1296
1301
  />
1297
1302
 
1298
1303
  @if (!compact()) {
1299
- <Icon name="chevron-right" size="inherit" [class]="chevronClasses()" />
1304
+ <Icon
1305
+ name="chevron-right"
1306
+ size="inherit"
1307
+ data-navigation-chevron="true"
1308
+ [class]="chevronClasses()"
1309
+ />
1300
1310
  }
1301
1311
  </button>
1302
1312
 
@@ -1,4 +1,4 @@
1
- import { t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DAxMpuW_.mjs";
1
+ import { t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DTVh0wjc.mjs";
2
2
  import * as i0 from "@angular/core";
3
3
  import { Component, computed, input, output } from "@angular/core";
4
4
  import { cn } from "@ojiepermana/angular/component/utils/core";
@@ -1,6 +1,6 @@
1
- import { a as injectNavigationBadgeTotal, o as navigationBadgeSourceKeys, r as NAVIGATION_BADGE_STREAMS, s as navigationDescendantBadgeSources } from "./ojiepermana-angular-navigation-navigation-badge-count.component-Bx89vXtg.mjs";
2
- import { s as NAVIGATION_SHELL } from "./ojiepermana-angular-navigation-navigation-item.component-DAxMpuW_.mjs";
3
- import { t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-Bs6dssld.mjs";
1
+ import { a as injectNavigationBadgeTotal, o as navigationBadgeSourceKeys, r as NAVIGATION_BADGE_STREAMS, s as navigationDescendantBadgeSources } from "./ojiepermana-angular-navigation-navigation-badge-count.component-RkecLYjX.mjs";
2
+ import { s as NAVIGATION_SHELL } from "./ojiepermana-angular-navigation-navigation-item.component-DTVh0wjc.mjs";
3
+ import { t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-CRRaXJz4.mjs";
4
4
  import * as i0 from "@angular/core";
5
5
  import { Component, DestroyRef, Directive, ElementRef, Injector, TemplateRef, ViewContainerRef, afterNextRender, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, isDevMode, model, output, signal } from "@angular/core";
6
6
  import { ActivatedRoute } from "@angular/router";
@@ -86,6 +86,10 @@ var NavigationContainerComponent = class NavigationContainerComponent {
86
86
  alias: "collapse-tree"
87
87
  });
88
88
  rail = input("default", ...ngDevMode ? [{ debugName: "rail" }] : /* istanbul ignore next */ []);
89
+ badgeIndicator = input("chevron", {
90
+ ...ngDevMode ? { debugName: "badgeIndicator" } : /* istanbul ignore next */ {},
91
+ alias: "badge-indicator"
92
+ });
89
93
  class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
90
94
  itemClass = input("", ...ngDevMode ? [{ debugName: "itemClass" }] : /* istanbul ignore next */ []);
91
95
  groupClass = input("", {
@@ -390,6 +394,13 @@ var NavigationContainerComponent = class NavigationContainerComponent {
390
394
  isRequired: false,
391
395
  transformFunction: null
392
396
  },
397
+ badgeIndicator: {
398
+ classPropertyName: "badgeIndicator",
399
+ publicName: "badge-indicator",
400
+ isSignal: true,
401
+ isRequired: false,
402
+ transformFunction: null
403
+ },
393
404
  class: {
394
405
  classPropertyName: "class",
395
406
  publicName: "class",
@@ -457,6 +468,7 @@ var NavigationContainerComponent = class NavigationContainerComponent {
457
468
  "attr.data-type-style": "typeStyle()",
458
469
  "attr.data-position": "resolvedState().position",
459
470
  "attr.data-collapse-tree": "collapseTree()",
471
+ "attr.data-navigation-badge-indicator": "badgeIndicator() === \"dot\" ? \"dot\" : null",
460
472
  "attr.data-preview-expanded": "previewRailExpanded() ? \"true\" : null",
461
473
  "attr.data-motion": "motionArmed() ? null : \"off\""
462
474
  }
@@ -507,6 +519,7 @@ i0.ɵɵngDeclareClassMetadata({
507
519
  "[attr.data-type-style]": "typeStyle()",
508
520
  "[attr.data-position]": "resolvedState().position",
509
521
  "[attr.data-collapse-tree]": "collapseTree()",
522
+ "[attr.data-navigation-badge-indicator]": "badgeIndicator() === \"dot\" ? \"dot\" : null",
510
523
  "[attr.data-preview-expanded]": "previewRailExpanded() ? \"true\" : null",
511
524
  "[attr.data-motion]": "motionArmed() ? null : \"off\"",
512
525
  "(document:pointerdown)": "armMotion()",
@@ -585,6 +598,14 @@ i0.ɵɵngDeclareClassMetadata({
585
598
  required: false
586
599
  }]
587
600
  }],
601
+ badgeIndicator: [{
602
+ type: i0.Input,
603
+ args: [{
604
+ isSignal: true,
605
+ alias: "badge-indicator",
606
+ required: false
607
+ }]
608
+ }],
588
609
  class: [{
589
610
  type: i0.Input,
590
611
  args: [{
@@ -820,9 +841,9 @@ var NavigationContentComponent = class NavigationContentComponent {
820
841
  outputs: ["openedIdsChange", "itemSelected"]
821
842
  }],
822
843
  deferBlockDependencies: [
823
- () => [import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-7Drr8U4O.mjs").then((m) => m.NavigationFlyoutMenuComponent)],
824
- () => [import("./ojiepermana-angular-navigation-navigation-horizontal.component-BrRGBBcK.mjs").then((m) => m.NavigationHorizontalComponent)],
825
- () => [import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-CSs3QW5t.mjs").then((m) => m.NavigationDockbarMenuComponent)]
844
+ () => [import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-QHUdqD1N.mjs").then((m) => m.NavigationFlyoutMenuComponent)],
845
+ () => [import("./ojiepermana-angular-navigation-navigation-horizontal.component-CoX6X3C2.mjs").then((m) => m.NavigationHorizontalComponent)],
846
+ () => [import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-Dl7VAyfV.mjs").then((m) => m.NavigationDockbarMenuComponent)]
826
847
  ]
827
848
  });
828
849
  };
@@ -832,9 +853,9 @@ i0.ɵɵngDeclareClassMetadataAsync({
832
853
  ngImport: i0,
833
854
  type: NavigationContentComponent,
834
855
  resolveDeferredDeps: () => [
835
- import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-7Drr8U4O.mjs").then((m) => m.NavigationFlyoutMenuComponent),
836
- import("./ojiepermana-angular-navigation-navigation-horizontal.component-BrRGBBcK.mjs").then((m) => m.NavigationHorizontalComponent),
837
- import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-CSs3QW5t.mjs").then((m) => m.NavigationDockbarMenuComponent)
856
+ import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-QHUdqD1N.mjs").then((m) => m.NavigationFlyoutMenuComponent),
857
+ import("./ojiepermana-angular-navigation-navigation-horizontal.component-CoX6X3C2.mjs").then((m) => m.NavigationHorizontalComponent),
858
+ import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-Dl7VAyfV.mjs").then((m) => m.NavigationDockbarMenuComponent)
838
859
  ],
839
860
  resolveMetadata: (NavigationFlyoutMenuComponent, NavigationHorizontalComponent, NavigationDockbarMenuComponent) => ({
840
861
  decorators: [{
@@ -1773,7 +1794,7 @@ var NavigationDockbarComponent = class NavigationDockbarComponent {
1773
1794
  exportAs: ["Tooltip"]
1774
1795
  }
1775
1796
  ],
1776
- deferBlockDependencies: [() => [import("./ojiepermana-angular-navigation-navigation-badge-count.component-Bx89vXtg.mjs").then((n) => n.n).then((m) => m.NavigationBadgeCountComponent)]]
1797
+ deferBlockDependencies: [() => [import("./ojiepermana-angular-navigation-navigation-badge-count.component-RkecLYjX.mjs").then((n) => n.n).then((m) => m.NavigationBadgeCountComponent)]]
1777
1798
  });
1778
1799
  };
1779
1800
  i0.ɵɵngDeclareClassMetadataAsync({
@@ -1781,7 +1802,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
1781
1802
  version: "22.2.6",
1782
1803
  ngImport: i0,
1783
1804
  type: NavigationDockbarComponent,
1784
- resolveDeferredDeps: () => [import("./ojiepermana-angular-navigation-navigation-badge-count.component-Bx89vXtg.mjs").then((n) => n.n).then((m) => m.NavigationBadgeCountComponent)],
1805
+ resolveDeferredDeps: () => [import("./ojiepermana-angular-navigation-navigation-badge-count.component-RkecLYjX.mjs").then((n) => n.n).then((m) => m.NavigationBadgeCountComponent)],
1785
1806
  resolveMetadata: (NavigationBadgeCountComponent) => ({
1786
1807
  decorators: [{
1787
1808
  type: Component,
@@ -2778,7 +2799,7 @@ function deriveNavigationInitials(name) {
2778
2799
  const last = parts[parts.length - 1] ?? "";
2779
2800
  return (first.charAt(0) + last.charAt(0)).toUpperCase();
2780
2801
  }
2781
- const INITIAL_HOST_CLASSES = "inline-flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-md bg-primary/10 text-primary-ink";
2802
+ const INITIAL_HOST_CLASSES = "inline-flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-md bg-primary text-primary-foreground";
2782
2803
  function setupNavigationInitial(sources) {
2783
2804
  return {
2784
2805
  resolvedInitials: computed(() => sources.initials()?.slice(0, 2).toUpperCase() || deriveNavigationInitials(sources.name())),
@@ -249,8 +249,9 @@ const THEME_SETTINGS_ICONS = [
249
249
  node: Terminal
250
250
  },
251
251
  {
252
- name: "unfold-horizontal",
252
+ name: "arrows-from-axis-dashed-vertical",
253
253
  size: 24,
254
+ aliases: ["unfold-horizontal"],
254
255
  node: UnfoldHorizontal
255
256
  }
256
257
  ];
@@ -1637,6 +1637,10 @@ var LayoutWrapperDefault = class LayoutWrapperDefault {
1637
1637
  ...ngDevMode ? { debugName: "navRail" } : /* istanbul ignore next */ {},
1638
1638
  alias: "nav-rail"
1639
1639
  });
1640
+ navBadgeIndicator = input("chevron", {
1641
+ ...ngDevMode ? { debugName: "navBadgeIndicator" } : /* istanbul ignore next */ {},
1642
+ alias: "nav-badge-indicator"
1643
+ });
1640
1644
  dockbarRouteContext = input(null, {
1641
1645
  ...ngDevMode ? { debugName: "dockbarRouteContext" } : /* istanbul ignore next */ {},
1642
1646
  alias: "dockbar-route-context"
@@ -1802,6 +1806,13 @@ var LayoutWrapperDefault = class LayoutWrapperDefault {
1802
1806
  isRequired: false,
1803
1807
  transformFunction: null
1804
1808
  },
1809
+ navBadgeIndicator: {
1810
+ classPropertyName: "navBadgeIndicator",
1811
+ publicName: "nav-badge-indicator",
1812
+ isSignal: true,
1813
+ isRequired: false,
1814
+ transformFunction: null
1815
+ },
1805
1816
  dockbarRouteContext: {
1806
1817
  classPropertyName: "dockbarRouteContext",
1807
1818
  publicName: "dockbar-route-context",
@@ -1966,6 +1977,7 @@ var LayoutWrapperDefault = class LayoutWrapperDefault {
1966
1977
  data-id="main"
1967
1978
  [data]="data()"
1968
1979
  [rail]="navRail()"
1980
+ [badge-indicator]="navBadgeIndicator()"
1969
1981
  [badge-context]="resolvedBadgeContext()"
1970
1982
  ariaLabel="Primary navigation"
1971
1983
  class="h-full w-full"
@@ -1994,6 +2006,7 @@ var LayoutWrapperDefault = class LayoutWrapperDefault {
1994
2006
  [data-id]="desktopDataId()"
1995
2007
  [data]="desktopData()"
1996
2008
  [rail]="navRail()"
2009
+ [badge-indicator]="navBadgeIndicator()"
1997
2010
  [badge-context]="resolvedBadgeContext()"
1998
2011
  [class]="navClass()"
1999
2012
  >
@@ -2166,6 +2179,7 @@ var LayoutWrapperDefault = class LayoutWrapperDefault {
2166
2179
  "compact",
2167
2180
  "collapse-tree",
2168
2181
  "rail",
2182
+ "badge-indicator",
2169
2183
  "class",
2170
2184
  "itemClass",
2171
2185
  "nav-group-class",
@@ -2347,6 +2361,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
2347
2361
  data-id="main"
2348
2362
  [data]="data()"
2349
2363
  [rail]="navRail()"
2364
+ [badge-indicator]="navBadgeIndicator()"
2350
2365
  [badge-context]="resolvedBadgeContext()"
2351
2366
  ariaLabel="Primary navigation"
2352
2367
  class="h-full w-full"
@@ -2375,6 +2390,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
2375
2390
  [data-id]="desktopDataId()"
2376
2391
  [data]="desktopData()"
2377
2392
  [rail]="navRail()"
2393
+ [badge-indicator]="navBadgeIndicator()"
2378
2394
  [badge-context]="resolvedBadgeContext()"
2379
2395
  [class]="navClass()"
2380
2396
  >
@@ -2525,6 +2541,14 @@ i0.ɵɵngDeclareClassMetadataAsync({
2525
2541
  required: false
2526
2542
  }]
2527
2543
  }],
2544
+ navBadgeIndicator: [{
2545
+ type: i0.Input,
2546
+ args: [{
2547
+ isSignal: true,
2548
+ alias: "nav-badge-indicator",
2549
+ required: false
2550
+ }]
2551
+ }],
2528
2552
  dockbarRouteContext: [{
2529
2553
  type: i0.Input,
2530
2554
  args: [{
@@ -1,5 +1,6 @@
1
1
  import * as i0 from "@angular/core";
2
- import { Service, computed, effect, signal } from "@angular/core";
2
+ import { ElementRef, Injectable, Service, afterRenderEffect, computed, inject, signal } from "@angular/core";
3
+ import { Overlay, OverlayContainer } from "@angular/cdk/overlay";
3
4
  const PAGE_VARIANTS = ["stacked", "side"];
4
5
  const PAGE_SIDE_POSITIONS = ["left", "right"];
5
6
  const PAGE_SIDE_MODES = [
@@ -203,113 +204,180 @@ i0.ɵɵngDeclareClassMetadata({
203
204
  args: [{ autoProvided: false }]
204
205
  }]
205
206
  });
206
- const FOCUSABLE_SELECTOR = [
207
- "a[href]",
208
- "button:not([disabled])",
209
- "input:not([disabled])",
210
- "select:not([disabled])",
211
- "textarea:not([disabled])",
212
- "[tabindex]:not([tabindex=\"-1\"])"
213
- ].join(",");
214
- const inertLocks = /* @__PURE__ */ new WeakMap();
215
- const scrollLocks = /* @__PURE__ */ new WeakMap();
207
+ const FOCUSABLE_SELECTOR = "a[href], button, input, select, textarea, summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]";
208
+ const modalStacks = /* @__PURE__ */ new WeakMap();
209
+ function ɵisActivePageOverlay(document, id) {
210
+ return id !== null && modalStacks.get(document)?.active?.id === id;
211
+ }
216
212
  function ɵsetupOverlayFocusManagement(config) {
217
- effect((onCleanup) => {
213
+ afterRenderEffect({ mixedReadWrite: (onCleanup) => {
218
214
  if (!config.isInteractive() || !config.isOpen()) return;
219
- const document = config.document;
215
+ const { document, host } = config;
220
216
  const view = document?.defaultView;
221
- if (!document || !view) return;
217
+ if (!document || !view || !host.isConnected) return;
222
218
  const returnFocus = config.takeReturnFocus?.() ?? document.activeElement;
223
219
  const modal = config.isModal();
224
- const inertSnapshots = modal ? makeBackgroundInert(config.host) : [];
225
- if (modal) lockDocumentScroll(document);
226
- const handleKeydown = (event) => {
227
- if (!modal || event.key !== "Tab") return;
228
- const focusable = getFocusableElements(config.host);
229
- if (focusable.length === 0) {
230
- event.preventDefault();
231
- config.host.focus();
232
- return;
233
- }
234
- const active = document.activeElement;
235
- const first = focusable[0];
236
- const last = focusable.at(-1);
237
- const activeIndex = focusable.indexOf(active);
238
- if (event.shiftKey && activeIndex <= 0) {
239
- event.preventDefault();
240
- last.focus();
241
- } else if (!event.shiftKey && (activeIndex === -1 || active === last)) {
242
- event.preventDefault();
243
- first.focus();
244
- }
220
+ const stack = modal ? getModalStack(document) : void 0;
221
+ stack?.open(host);
222
+ let childEscape;
223
+ const onKeydownCapture = (event) => {
224
+ if (event.key === "Escape" && host.querySelector(".cdk-overlay-pane:not(:empty)")) childEscape = event;
245
225
  };
246
- config.host.addEventListener("keydown", handleKeydown);
226
+ const onKeydown = (event) => {
227
+ const activeModal = modalStacks.get(document)?.active;
228
+ if (event.defaultPrevented || activeModal && activeModal !== host) return;
229
+ if (event.key === "Escape" && config.closeOnEsc?.() && childEscape !== event) {
230
+ if (modal) event.preventDefault();
231
+ config.close?.();
232
+ } else if (modal && event.key === "Tab") trapTab(host, event);
233
+ };
234
+ view.addEventListener("keydown", onKeydownCapture, true);
235
+ view.addEventListener("keydown", onKeydown);
247
236
  const animationFrame = view.requestAnimationFrame(() => {
248
- (config.host.querySelector("[data-page-initial-focus], [autofocus]") ?? getFocusableElements(config.host)[0] ?? config.host).focus();
237
+ const activeModal = modalStacks.get(document)?.active;
238
+ if (!activeModal || activeModal === host) focusPanel(host);
249
239
  });
250
240
  onCleanup(() => {
251
241
  view.cancelAnimationFrame(animationFrame);
252
- config.host.removeEventListener("keydown", handleKeydown);
253
- restoreBackground(inertSnapshots);
254
- if (modal) unlockDocumentScroll(document);
255
- if (returnFocus?.isConnected && typeof returnFocus.focus === "function") view.requestAnimationFrame(() => returnFocus.focus());
242
+ view.removeEventListener("keydown", onKeydownCapture, true);
243
+ view.removeEventListener("keydown", onKeydown);
244
+ const wasTop = !stack || stack.active === host;
245
+ stack?.close(host);
246
+ if (wasTop) view.requestAnimationFrame(() => {
247
+ const active = modalStacks.get(document)?.active;
248
+ if (returnFocus instanceof HTMLElement && returnFocus.isConnected && !returnFocus.closest("[inert]") && (!active || active.contains(returnFocus))) returnFocus.focus({ preventScroll: true });
249
+ else if (active && !active.contains(document.activeElement)) focusPanel(active);
250
+ });
256
251
  });
257
- });
252
+ } });
253
+ }
254
+ function trapTab(host, event) {
255
+ const focusable = getFocusableElements(host);
256
+ const index = focusable.indexOf(host.ownerDocument.activeElement);
257
+ if (index < 0 || (event.shiftKey ? index === 0 : index === focusable.length - 1)) {
258
+ event.preventDefault();
259
+ ((event.shiftKey ? focusable.at(-1) : focusable[0]) ?? host).focus({ preventScroll: true });
260
+ }
261
+ }
262
+ function focusPanel(host) {
263
+ (host.querySelector("[data-page-initial-focus], [autofocus]") ?? getFocusableElements(host)[0] ?? host).focus({ preventScroll: true });
264
+ if (!host.contains(host.ownerDocument.activeElement)) (getFocusableElements(host)[0] ?? host).focus({ preventScroll: true });
258
265
  }
259
266
  function getFocusableElements(host) {
260
- return Array.from(host.querySelectorAll(FOCUSABLE_SELECTOR)).filter((element) => !element.hidden && !element.inert && element.getAttribute("aria-hidden") !== "true");
267
+ return Array.from(host.querySelectorAll(FOCUSABLE_SELECTOR)).filter((element) => !element.matches(":disabled, [tabindex=\"-1\"], input[type=\"hidden\"]") && !element.closest("[hidden], [inert], [aria-hidden=\"true\"]") && (element.checkVisibility?.({ visibilityProperty: true }) ?? host.ownerDocument.defaultView?.getComputedStyle(element).visibility !== "hidden"));
261
268
  }
262
- function makeBackgroundInert(host) {
263
- const snapshots = [];
264
- const pageRoot = host.closest("Page");
265
- if (!pageRoot) return snapshots;
266
- let branch = host;
267
- let parent = branch.parentElement;
268
- while (parent) {
269
- for (const sibling of Array.from(parent.children)) {
270
- if (sibling === branch || !(sibling instanceof HTMLElement) || sibling.hasAttribute("data-page-overlay-backdrop")) continue;
271
- const lock = inertLocks.get(sibling);
272
- if (lock) lock.count += 1;
273
- else inertLocks.set(sibling, {
274
- count: 1,
275
- initial: sibling.inert === true
276
- });
277
- snapshots.push({ element: sibling });
278
- sibling.inert = true;
279
- }
280
- if (parent === pageRoot) break;
281
- branch = parent;
282
- parent = parent.parentElement;
269
+ function getModalStack(document) {
270
+ let stack = modalStacks.get(document);
271
+ if (!stack) {
272
+ stack = new PageModalStack(document);
273
+ modalStacks.set(document, stack);
283
274
  }
284
- return snapshots;
275
+ return stack;
285
276
  }
286
- function restoreBackground(snapshots) {
287
- for (const snapshot of snapshots) {
288
- const lock = inertLocks.get(snapshot.element);
289
- if (!lock) continue;
290
- lock.count -= 1;
291
- if (lock.count === 0) {
292
- snapshot.element.inert = lock.initial;
293
- inertLocks.delete(snapshot.element);
277
+ var PageModalStack = class {
278
+ document;
279
+ panels = [];
280
+ background = /* @__PURE__ */ new Set();
281
+ ancestorOverflow = /* @__PURE__ */ new Map();
282
+ observer = new MutationObserver(() => this.isolate());
283
+ constructor(document) {
284
+ this.document = document;
285
+ }
286
+ get active() {
287
+ return this.panels.at(-1);
288
+ }
289
+ open(panel) {
290
+ this.panels.push(panel);
291
+ this.isolate();
292
+ }
293
+ close(panel) {
294
+ this.panels.splice(this.panels.indexOf(panel), 1);
295
+ this.isolate();
296
+ if (!this.active) modalStacks.delete(this.document);
297
+ }
298
+ isolate() {
299
+ this.observer.disconnect();
300
+ const keep = /* @__PURE__ */ new Set();
301
+ const host = this.active;
302
+ if (host?.isConnected) {
303
+ const backdrop = host.closest("[data-page-root]")?.querySelector(":scope > [data-page-overlay-backdrop]");
304
+ for (const node of [host, backdrop]) for (let branch = node; branch && branch !== this.document.body; branch = branch.parentElement) keep.add(branch);
305
+ }
306
+ this.lockAncestorScroll(host);
307
+ const blocked = /* @__PURE__ */ new Set();
308
+ for (const branch of keep) {
309
+ const parent = branch.parentElement;
310
+ if (parent) {
311
+ this.observer.observe(parent, { childList: true });
312
+ for (const sibling of parent.children) if (!keep.has(sibling)) blocked.add(sibling);
313
+ }
314
+ }
315
+ for (const element of this.background) if (!blocked.has(element)) {
316
+ if (!element.matches("[data-page-slot]:is([data-page-side-mode], [data-page-filter-mode])[aria-hidden=\"true\"]")) element.removeAttribute("inert");
317
+ this.background.delete(element);
318
+ }
319
+ for (const element of blocked) if (!element.hasAttribute("inert")) {
320
+ element.setAttribute("inert", "");
321
+ this.background.add(element);
294
322
  }
295
323
  }
296
- }
297
- function lockDocumentScroll(document) {
298
- const lock = scrollLocks.get(document);
299
- if (lock) lock.count += 1;
300
- else scrollLocks.set(document, {
301
- count: 1,
302
- initialOverflow: document.body.style.overflow
303
- });
304
- document.body.style.overflow = "hidden";
305
- }
306
- function unlockDocumentScroll(document) {
307
- const lock = scrollLocks.get(document);
308
- if (!lock) return;
309
- lock.count -= 1;
310
- if (lock.count === 0) {
311
- document.body.style.overflow = lock.initialOverflow;
312
- scrollLocks.delete(document);
324
+ lockAncestorScroll(host) {
325
+ for (const [element, previous] of this.ancestorOverflow) if (!host?.isConnected || !element.contains(host) || element === host) {
326
+ element.style.overflow = previous.value;
327
+ element.style.overflowX = previous.x;
328
+ element.style.overflowY = previous.y;
329
+ this.ancestorOverflow.delete(element);
330
+ }
331
+ for (let element = host?.isConnected ? host.parentElement : null; element && element !== this.document.documentElement; element = element.parentElement) {
332
+ if (this.ancestorOverflow.has(element)) continue;
333
+ const style = this.document.defaultView?.getComputedStyle(element);
334
+ if (element === this.document.body || style && /auto|scroll/.test(`${style.overflowX} ${style.overflowY}`)) {
335
+ this.ancestorOverflow.set(element, {
336
+ value: element.style.overflow,
337
+ x: element.style.overflowX,
338
+ y: element.style.overflowY
339
+ });
340
+ element.style.overflow = "hidden";
341
+ }
342
+ }
313
343
  }
314
- }
315
- export { PAGE_APPEARANCES, PAGE_DEFAULT_APPEARANCE, PAGE_DEFAULT_FILTER_MODE, PAGE_DEFAULT_FILTER_PLACEMENT, PAGE_DEFAULT_FILTER_POSITION, PAGE_DEFAULT_FILTER_WIDTH, PAGE_DEFAULT_HEIGHT, PAGE_DEFAULT_SCROLL, PAGE_DEFAULT_SIDE_MODE, PAGE_DEFAULT_SIDE_POSITION, PAGE_DEFAULT_SIDE_WIDTH, PAGE_DEFAULT_VARIANT, PAGE_FILTER_PLACEMENTS, PAGE_HEIGHT_VALUES, PAGE_SCROLL_VALUES, PAGE_SIDE_MODES, PAGE_SIDE_POSITIONS, PAGE_VARIANTS, PageStateService, isUiPageAppearance, isUiPageFilterPlacement, isUiPageHeight, isUiPageScroll, isUiPageSideMode, isUiPageSidePosition, isUiPageVariant, ɵsetupOverlayFocusManagement };
344
+ };
345
+ var PagePanelOverlayContainer = class PagePanelOverlayContainer extends OverlayContainer {
346
+ panel = inject(ElementRef).nativeElement;
347
+ parent = inject(OverlayContainer, { skipSelf: true });
348
+ getContainerElement() {
349
+ return this.panel.getAttribute("aria-modal") === "true" ? super.getContainerElement() : this.parent.getContainerElement();
350
+ }
351
+ _createContainer() {
352
+ const container = this.panel.ownerDocument.createElement("div");
353
+ container.classList.add("cdk-overlay-container");
354
+ this.panel.append(container);
355
+ this._containerElement = container;
356
+ }
357
+ static ɵfac = i0.ɵɵngDeclareFactory({
358
+ minVersion: "12.0.0",
359
+ version: "22.2.6",
360
+ ngImport: i0,
361
+ type: PagePanelOverlayContainer,
362
+ deps: null,
363
+ target: i0.ɵɵFactoryTarget.Injectable
364
+ });
365
+ static ɵprov = i0.ɵɵngDeclareInjectable({
366
+ minVersion: "12.0.0",
367
+ version: "22.2.6",
368
+ ngImport: i0,
369
+ type: PagePanelOverlayContainer
370
+ });
371
+ };
372
+ i0.ɵɵngDeclareClassMetadata({
373
+ minVersion: "12.0.0",
374
+ version: "22.2.6",
375
+ ngImport: i0,
376
+ type: PagePanelOverlayContainer,
377
+ decorators: [{ type: Injectable }]
378
+ });
379
+ const ɵPAGE_PANEL_OVERLAY_PROVIDERS = [Overlay, {
380
+ provide: OverlayContainer,
381
+ useClass: PagePanelOverlayContainer
382
+ }];
383
+ export { PAGE_APPEARANCES, PAGE_DEFAULT_APPEARANCE, PAGE_DEFAULT_FILTER_MODE, PAGE_DEFAULT_FILTER_PLACEMENT, PAGE_DEFAULT_FILTER_POSITION, PAGE_DEFAULT_FILTER_WIDTH, PAGE_DEFAULT_HEIGHT, PAGE_DEFAULT_SCROLL, PAGE_DEFAULT_SIDE_MODE, PAGE_DEFAULT_SIDE_POSITION, PAGE_DEFAULT_SIDE_WIDTH, PAGE_DEFAULT_VARIANT, PAGE_FILTER_PLACEMENTS, PAGE_HEIGHT_VALUES, PAGE_SCROLL_VALUES, PAGE_SIDE_MODES, PAGE_SIDE_POSITIONS, PAGE_VARIANTS, PageStateService, isUiPageAppearance, isUiPageFilterPlacement, isUiPageHeight, isUiPageScroll, isUiPageSideMode, isUiPageSidePosition, isUiPageVariant, ɵPAGE_PANEL_OVERLAY_PROVIDERS, ɵisActivePageOverlay, ɵsetupOverlayFocusManagement };