@ojiepermana/angular 22.1.11 → 22.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -26
- package/chart/README.md +272 -0
- package/component/README.md +89 -0
- package/component/accordion/README.md +195 -0
- package/component/alert/README.md +184 -0
- package/component/alert-dialog/README.md +255 -0
- package/component/aspect-ratio/README.md +116 -0
- package/component/avatar/README.md +182 -0
- package/component/badge/README.md +143 -0
- package/component/breadcrumb/README.md +223 -0
- package/component/button/README.md +141 -0
- package/component/button-group/README.md +214 -0
- package/component/calendar/README.md +137 -0
- package/component/card/README.md +232 -0
- package/component/carousel/README.md +276 -0
- package/component/checkbox/README.md +153 -0
- package/component/collapsible/README.md +216 -0
- package/component/combobox/README.md +202 -0
- package/component/command/README.md +287 -0
- package/component/composer/README.md +241 -0
- package/component/context-menu/README.md +268 -0
- package/component/date-picker/README.md +202 -0
- package/component/dialog/README.md +276 -0
- package/component/drawer/README.md +147 -0
- package/component/dropdown-menu/README.md +336 -0
- package/component/editor/README.md +152 -0
- package/component/empty/README.md +193 -0
- package/component/form/README.md +216 -0
- package/component/hover-card/README.md +150 -0
- package/component/icon/README.md +25 -0
- package/component/input/README.md +160 -0
- package/component/input-group/README.md +245 -0
- package/component/input-otp/README.md +331 -0
- package/component/item/README.md +254 -0
- package/component/kanban/README.md +81 -0
- package/component/kbd/README.md +141 -0
- package/component/label/README.md +137 -0
- package/component/menubar/README.md +270 -0
- package/component/native-select/README.md +176 -0
- package/component/navigation-menu/README.md +165 -0
- package/component/pagination/README.md +151 -0
- package/component/pillbox/README.md +68 -0
- package/component/popover/README.md +54 -0
- package/component/progress/README.md +160 -0
- package/component/radio/README.md +212 -0
- package/component/resizable/README.md +178 -0
- package/component/scroll-area/README.md +150 -0
- package/component/select/README.md +228 -0
- package/component/separator/README.md +175 -0
- package/component/sheet/README.md +190 -0
- package/component/skeleton/README.md +158 -0
- package/component/slider/README.md +207 -0
- package/component/spinner/README.md +160 -0
- package/component/switch/README.md +170 -0
- package/component/table/README.md +292 -0
- package/component/tabs/README.md +220 -0
- package/component/textarea/README.md +169 -0
- package/component/timeline/README.md +94 -0
- package/component/toast/README.md +173 -0
- package/component/toggle/README.md +133 -0
- package/component/toggle-group/README.md +234 -0
- package/component/tooltip/README.md +230 -0
- package/fesm2022/ojiepermana-angular-chart-area.mjs +289 -3
- package/fesm2022/ojiepermana-angular-chart-bar.mjs +722 -3
- package/fesm2022/ojiepermana-angular-chart-core.mjs +1482 -3
- package/fesm2022/ojiepermana-angular-chart-line.mjs +294 -3
- package/fesm2022/ojiepermana-angular-chart-pie.mjs +291 -3
- package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1301 -3
- package/fesm2022/ojiepermana-angular-chart-radar.mjs +421 -3
- package/fesm2022/ojiepermana-angular-chart-radial.mjs +295 -3
- package/fesm2022/ojiepermana-angular-chart-scatter.mjs +306 -3
- package/fesm2022/ojiepermana-angular-chart.mjs +12 -3
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +267 -3
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +359 -3
- package/fesm2022/ojiepermana-angular-component-alert.mjs +101 -3
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +31 -3
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +139 -3
- package/fesm2022/ojiepermana-angular-component-badge.mjs +57 -3
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +192 -3
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +95 -3
- package/fesm2022/ojiepermana-angular-component-button.mjs +73 -3
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +718 -3
- package/fesm2022/ojiepermana-angular-component-card.mjs +167 -3
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +326 -3
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +190 -3
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +117 -3
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +327 -3
- package/fesm2022/ojiepermana-angular-component-command.mjs +351 -3
- package/fesm2022/ojiepermana-angular-component-composer.mjs +359 -3
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +158 -3
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +482 -3
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +400 -3
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +1 -3
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +689 -3
- package/fesm2022/ojiepermana-angular-component-editor.mjs +511 -3
- package/fesm2022/ojiepermana-angular-component-empty.mjs +134 -3
- package/fesm2022/ojiepermana-angular-component-form.mjs +438 -3
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +273 -3
- package/fesm2022/ojiepermana-angular-component-icon.mjs +139 -3
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +176 -3
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +550 -3
- package/fesm2022/ojiepermana-angular-component-input.mjs +52 -3
- package/fesm2022/ojiepermana-angular-component-item.mjs +264 -3
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +310 -3
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +48 -3
- package/fesm2022/ojiepermana-angular-component-label.mjs +27 -3
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +327 -3
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +62 -3
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +378 -3
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +238 -3
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +999 -3
- package/fesm2022/ojiepermana-angular-component-popover.mjs +201 -3
- package/fesm2022/ojiepermana-angular-component-progress.mjs +57 -3
- package/fesm2022/ojiepermana-angular-component-radio.mjs +180 -3
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +493 -3
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +51 -3
- package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +227 -3
- package/fesm2022/ojiepermana-angular-component-select.mjs +609 -3
- package/fesm2022/ojiepermana-angular-component-separator.mjs +31 -3
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +407 -3
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +25 -3
- package/fesm2022/ojiepermana-angular-component-slider.mjs +456 -3
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +56 -3
- package/fesm2022/ojiepermana-angular-component-switch.mjs +145 -3
- package/fesm2022/ojiepermana-angular-component-table.mjs +155 -3
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +315 -3
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +46 -3
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +237 -3
- package/fesm2022/ojiepermana-angular-component-toast.mjs +241 -3
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +290 -3
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +76 -3
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +519 -3
- package/fesm2022/ojiepermana-angular-component-utils-core.mjs +310 -3
- package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +62 -3
- package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +34 -3
- package/fesm2022/ojiepermana-angular-component-utils.mjs +3 -2
- package/fesm2022/ojiepermana-angular-component.mjs +4 -4
- package/fesm2022/ojiepermana-angular-navigation-core.mjs +21 -3
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +20 -3
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-CDBxQ8rk.mjs +91 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DBQHdvGa.mjs +512 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-entry-grid.component-Cd-jh6tg.mjs +623 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BCGvhoYj.mjs +404 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-Dk_03e-6.mjs +466 -0
- package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs +2642 -0
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +725 -3
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +65 -4
- package/fesm2022/ojiepermana-angular-navigation.mjs +4 -10
- package/fesm2022/ojiepermana-angular-sdk.mjs +204 -4
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1387 -3
- package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +331 -3
- package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +45 -4
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1044 -3
- package/fesm2022/ojiepermana-angular-theme-layout.mjs +729 -3
- package/fesm2022/ojiepermana-angular-theme-page-core.mjs +381 -3
- package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +267 -3
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +361 -3
- package/fesm2022/ojiepermana-angular-theme-page-side.mjs +198 -3
- package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +110 -3
- package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -2
- package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +338 -3
- package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +160 -4
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +811 -3
- package/fesm2022/ojiepermana-angular-theme-styles.mjs +783 -3
- package/fesm2022/ojiepermana-angular-theme.mjs +4 -4
- package/fesm2022/ojiepermana-angular.mjs +6 -11
- package/navigation/README.md +374 -0
- package/package.json +81 -20
- package/sdk/README.md +212 -0
- package/sdk/schematics/collection.json +20 -0
- package/sdk/schematics/init/index.js +83 -0
- package/sdk/schematics/init/schema.json +19 -0
- package/sdk/schematics/ng-add/index.js +147 -0
- package/sdk/schematics/ng-add/schema.json +14 -0
- package/sdk/schematics/package.json +3 -0
- package/sdk/schematics/sdk/index.js +175 -0
- package/sdk/schematics/sdk/schema.json +19 -0
- package/sdk/sdk.config.example.json +24 -0
- package/sdk/src/config/loader.js +43 -0
- package/sdk/src/config/schema.js +59 -0
- package/sdk/src/emit/client.js +251 -0
- package/sdk/src/emit/metadata.js +310 -0
- package/sdk/src/emit/models.js +104 -0
- package/sdk/src/emit/navigation.js +56 -0
- package/sdk/src/emit/operations.js +118 -0
- package/sdk/src/emit/public-api.js +54 -0
- package/sdk/src/emit/services.js +110 -0
- package/sdk/src/engine.js +67 -0
- package/sdk/src/layout/per-domain.js +360 -0
- package/sdk/src/package.json +3 -0
- package/sdk/src/parser/bundle.js +25 -0
- package/sdk/src/parser/ir.js +429 -0
- package/sdk/src/parser/types.js +7 -0
- package/sdk/src/render/template.js +152 -0
- package/sdk/src/writer/index.js +286 -0
- package/theme/README.md +126 -0
- package/theme/component/settings/README.md +135 -0
- package/theme/layout/README.md +539 -0
- package/theme/page/README.md +453 -0
- package/theme/shell/README.md +340 -0
- package/theme/styles/README.md +178 -0
- package/theme/styles/css/base/components.css +553 -0
- package/theme/styles/css/base/index.css +14 -0
- package/theme/styles/css/base/package.css +9 -0
- package/theme/styles/css/base/prefers-dark.css +86 -0
- package/theme/styles/css/base/print.css +62 -0
- package/theme/styles/css/base/status.css +38 -0
- package/theme/styles/css/base/tailwind.css +165 -0
- package/theme/styles/css/base/theme.css +374 -0
- package/theme/styles/css/base/tokens.css +361 -0
- package/theme/styles/css/color/amber.css +72 -0
- package/theme/styles/css/color/blue.css +72 -0
- package/theme/styles/css/color/brand.css +38 -0
- package/theme/styles/css/color/cyan.css +72 -0
- package/theme/styles/css/color/emerald.css +72 -0
- package/theme/styles/css/color/fuchsia.css +72 -0
- package/theme/styles/css/color/green.css +72 -0
- package/theme/styles/css/color/index.css +19 -0
- package/theme/styles/css/color/indigo.css +72 -0
- package/theme/styles/css/color/lime.css +72 -0
- package/theme/styles/css/color/orange.css +72 -0
- package/theme/styles/css/color/pink.css +72 -0
- package/theme/styles/css/color/purple.css +72 -0
- package/theme/styles/css/color/red.css +72 -0
- package/theme/styles/css/color/rose.css +72 -0
- package/theme/styles/css/color/sky.css +72 -0
- package/theme/styles/css/color/teal.css +72 -0
- package/theme/styles/css/color/violet.css +72 -0
- package/theme/styles/css/color/yellow.css +72 -0
- package/theme/styles/css/index.css +18 -0
- package/theme/styles/css/neutral/gray.css +63 -0
- package/theme/styles/css/neutral/index.css +11 -0
- package/theme/styles/css/neutral/mauve.css +63 -0
- package/theme/styles/css/neutral/mist.css +63 -0
- package/theme/styles/css/neutral/neutral.css +63 -0
- package/theme/styles/css/neutral/olive.css +63 -0
- package/theme/styles/css/neutral/slate.css +63 -0
- package/theme/styles/css/neutral/stone.css +63 -0
- package/theme/styles/css/neutral/taupe.css +63 -0
- package/theme/styles/css/neutral/zinc.css +63 -0
- package/theme/styles/css/radius/index.css +30 -0
- package/theme/styles/css/space/index.css +20 -0
- package/types/ojiepermana-angular-chart-area.d.ts +76 -1
- package/types/ojiepermana-angular-chart-bar.d.ts +201 -1
- package/types/ojiepermana-angular-chart-core.d.ts +811 -1
- package/types/ojiepermana-angular-chart-line.d.ts +75 -1
- package/types/ojiepermana-angular-chart-pie.d.ts +131 -1
- package/types/ojiepermana-angular-chart-primitives.d.ts +291 -1
- package/types/ojiepermana-angular-chart-radar.d.ts +116 -1
- package/types/ojiepermana-angular-chart-radial.d.ts +116 -1
- package/types/ojiepermana-angular-chart-scatter.d.ts +125 -1
- package/types/ojiepermana-angular-chart.d.ts +2 -1
- package/types/ojiepermana-angular-component-accordion.d.ts +85 -1
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +140 -1
- package/types/ojiepermana-angular-component-alert.d.ts +42 -1
- package/types/ojiepermana-angular-component-aspect-ratio.d.ts +12 -1
- package/types/ojiepermana-angular-component-avatar.d.ts +56 -1
- package/types/ojiepermana-angular-component-badge.d.ts +24 -1
- package/types/ojiepermana-angular-component-breadcrumb.d.ts +46 -1
- package/types/ojiepermana-angular-component-button-group.d.ts +26 -1
- package/types/ojiepermana-angular-component-button.d.ts +27 -1
- package/types/ojiepermana-angular-component-calendar.d.ts +111 -1
- package/types/ojiepermana-angular-component-card.d.ts +69 -1
- package/types/ojiepermana-angular-component-carousel.d.ts +86 -1
- package/types/ojiepermana-angular-component-checkbox.d.ts +42 -1
- package/types/ojiepermana-angular-component-collapsible.d.ts +42 -1
- package/types/ojiepermana-angular-component-combobox.d.ts +60 -1
- package/types/ojiepermana-angular-component-command.d.ts +130 -1
- package/types/ojiepermana-angular-component-composer.d.ts +90 -1
- package/types/ojiepermana-angular-component-context-menu.d.ts +54 -1
- package/types/ojiepermana-angular-component-date-picker.d.ts +109 -1
- package/types/ojiepermana-angular-component-dialog.d.ts +136 -1
- package/types/ojiepermana-angular-component-drawer.d.ts +1 -1
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +248 -1
- package/types/ojiepermana-angular-component-editor.d.ts +135 -1
- package/types/ojiepermana-angular-component-empty.d.ts +50 -1
- package/types/ojiepermana-angular-component-form.d.ts +159 -1
- package/types/ojiepermana-angular-component-hover-card.d.ts +75 -1
- package/types/ojiepermana-angular-component-icon.d.ts +89 -1
- package/types/ojiepermana-angular-component-input-group.d.ts +51 -1
- package/types/ojiepermana-angular-component-input-otp.d.ts +155 -1
- package/types/ojiepermana-angular-component-input.d.ts +21 -1
- package/types/ojiepermana-angular-component-item.d.ts +93 -1
- package/types/ojiepermana-angular-component-kanban.d.ts +70 -1
- package/types/ojiepermana-angular-component-kbd.d.ts +16 -1
- package/types/ojiepermana-angular-component-label.d.ts +11 -1
- package/types/ojiepermana-angular-component-menubar.d.ts +93 -1
- package/types/ojiepermana-angular-component-native-select.d.ts +26 -1
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +104 -1
- package/types/ojiepermana-angular-component-pagination.d.ts +33 -1
- package/types/ojiepermana-angular-component-pillbox.d.ts +222 -1
- package/types/ojiepermana-angular-component-popover.d.ts +66 -1
- package/types/ojiepermana-angular-component-progress.d.ts +17 -1
- package/types/ojiepermana-angular-component-radio.d.ts +60 -1
- package/types/ojiepermana-angular-component-resizable.d.ts +117 -1
- package/types/ojiepermana-angular-component-scroll-area.d.ts +19 -1
- package/types/ojiepermana-angular-component-segmented-control.d.ts +58 -1
- package/types/ojiepermana-angular-component-select.d.ts +122 -1
- package/types/ojiepermana-angular-component-separator.d.ts +14 -1
- package/types/ojiepermana-angular-component-sheet.d.ts +130 -1
- package/types/ojiepermana-angular-component-skeleton.d.ts +10 -1
- package/types/ojiepermana-angular-component-slider.d.ts +83 -1
- package/types/ojiepermana-angular-component-spinner.d.ts +13 -1
- package/types/ojiepermana-angular-component-switch.d.ts +44 -1
- package/types/ojiepermana-angular-component-table.d.ts +57 -1
- package/types/ojiepermana-angular-component-tabs.d.ts +124 -1
- package/types/ojiepermana-angular-component-textarea.d.ts +17 -1
- package/types/ojiepermana-angular-component-timeline.d.ts +64 -1
- package/types/ojiepermana-angular-component-toast.d.ts +64 -1
- package/types/ojiepermana-angular-component-toggle-group.d.ts +90 -1
- package/types/ojiepermana-angular-component-toggle.d.ts +25 -1
- package/types/ojiepermana-angular-component-tooltip.d.ts +143 -1
- package/types/ojiepermana-angular-component-utils-core.d.ts +184 -1
- package/types/ojiepermana-angular-component-utils-overlay.d.ts +21 -1
- package/types/ojiepermana-angular-component-utils-scale.d.ts +19 -1
- package/types/ojiepermana-angular-component-utils.d.ts +2 -1
- package/types/ojiepermana-angular-component.d.ts +2 -1
- package/types/ojiepermana-angular-navigation-core.d.ts +59 -1
- package/types/ojiepermana-angular-navigation-icon.d.ts +12 -1
- package/types/ojiepermana-angular-navigation-service.d.ts +116 -1
- package/types/ojiepermana-angular-navigation-types.d.ts +144 -1
- package/types/ojiepermana-angular-navigation.d.ts +507 -1
- package/types/ojiepermana-angular-sdk.d.ts +89 -1
- package/types/ojiepermana-angular-theme-component-settings.d.ts +154 -1
- package/types/ojiepermana-angular-theme-layout-services.d.ts +147 -1
- package/types/ojiepermana-angular-theme-layout-types.d.ts +40 -1
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +299 -1
- package/types/ojiepermana-angular-theme-layout.d.ts +129 -1
- package/types/ojiepermana-angular-theme-page-core.d.ts +157 -1
- package/types/ojiepermana-angular-theme-page-filter.d.ts +77 -1
- package/types/ojiepermana-angular-theme-page-root.d.ts +88 -1
- package/types/ojiepermana-angular-theme-page-side.d.ts +50 -1
- package/types/ojiepermana-angular-theme-page-slots.d.ts +40 -1
- package/types/ojiepermana-angular-theme-page.d.ts +5 -1
- package/types/ojiepermana-angular-theme-shell-services.d.ts +193 -1
- package/types/ojiepermana-angular-theme-shell-types.d.ts +105 -1
- package/types/ojiepermana-angular-theme-shell.d.ts +100 -1
- package/types/ojiepermana-angular-theme-styles.d.ts +319 -1
- package/types/ojiepermana-angular-theme.d.ts +2 -1
- package/types/ojiepermana-angular.d.ts +5 -5
package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DBQHdvGa.mjs
ADDED
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, Injector, input, output, computed, signal, afterNextRender, Component } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import { IconComponent } from '@ojiepermana/angular/component/icon';
|
|
5
|
+
import { cn } from '@ojiepermana/angular/component/utils/core';
|
|
6
|
+
import { N as NavigationItemComponent, a as NavigationItemContentComponent, b as NavigationListComponent } from './ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs';
|
|
7
|
+
import { NAVIGATION_ADAPTER } from '@ojiepermana/angular/navigation/core';
|
|
8
|
+
import { NavigationBadgeCountComponent } from './ojiepermana-angular-navigation-navigation-badge-count.component-CDBxQ8rk.mjs';
|
|
9
|
+
|
|
10
|
+
const EMPTY_NAVIGATION_BADGE_CONTEXT = Object.freeze({});
|
|
11
|
+
class NavigationDockbarMenuComponent {
|
|
12
|
+
nav = inject(NAVIGATION_ADAPTER);
|
|
13
|
+
host = inject(ElementRef);
|
|
14
|
+
injector = inject(Injector);
|
|
15
|
+
navId = input('default', /* @ts-ignore */
|
|
16
|
+
...(ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []));
|
|
17
|
+
items = input([], /* @ts-ignore */
|
|
18
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
19
|
+
railItems = input(null, /* @ts-ignore */
|
|
20
|
+
...(ngDevMode ? [{ debugName: "railItems" }] : /* istanbul ignore next */ []));
|
|
21
|
+
badgeContext = input(EMPTY_NAVIGATION_BADGE_CONTEXT, /* @ts-ignore */
|
|
22
|
+
...(ngDevMode ? [{ debugName: "badgeContext" }] : /* istanbul ignore next */ []));
|
|
23
|
+
mode = input('sticky', /* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
25
|
+
position = input('left', /* @ts-ignore */
|
|
26
|
+
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
27
|
+
itemClass = input('', /* @ts-ignore */
|
|
28
|
+
...(ngDevMode ? [{ debugName: "itemClass" }] : /* istanbul ignore next */ []));
|
|
29
|
+
activeIds = input(new Set(), /* @ts-ignore */
|
|
30
|
+
...(ngDevMode ? [{ debugName: "activeIds" }] : /* istanbul ignore next */ []));
|
|
31
|
+
activeUrl = input(null, /* @ts-ignore */
|
|
32
|
+
...(ngDevMode ? [{ debugName: "activeUrl" }] : /* istanbul ignore next */ []));
|
|
33
|
+
/** Resolved by `<Navigation>` so route-aware and legacy panel state share one source of truth. */
|
|
34
|
+
resolvedGroup = input(undefined, /* @ts-ignore */
|
|
35
|
+
...(ngDevMode ? [{ debugName: "resolvedGroup" }] : /* istanbul ignore next */ []));
|
|
36
|
+
iconTemplate = input(undefined, /* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []));
|
|
38
|
+
collapseTree = input('stairs', /* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [{ debugName: "collapseTree" }] : /* istanbul ignore next */ []));
|
|
40
|
+
openedIds = input([], /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "openedIds" }] : /* istanbul ignore next */ []));
|
|
42
|
+
/** Template footer aside (slot `ng-template[NavigationAsideFooter]` di `<NavigationDockbar>`). */
|
|
43
|
+
asideFooterTemplate = input(null, /* @ts-ignore */
|
|
44
|
+
...(ngDevMode ? [{ debugName: "asideFooterTemplate" }] : /* istanbul ignore next */ []));
|
|
45
|
+
openedIdsChange = output();
|
|
46
|
+
itemSelected = output();
|
|
47
|
+
isDrawerMode = computed(() => this.mode() === 'drawer', /* @ts-ignore */
|
|
48
|
+
...(ngDevMode ? [{ debugName: "isDrawerMode" }] : /* istanbul ignore next */ []));
|
|
49
|
+
renderedRailItems = computed(() => this.railItems() ?? this.items(), /* @ts-ignore */
|
|
50
|
+
...(ngDevMode ? [{ debugName: "renderedRailItems" }] : /* istanbul ignore next */ []));
|
|
51
|
+
asideId = computed(() => `nav-dockbar-${this.safeId(this.navId())}`, /* @ts-ignore */
|
|
52
|
+
...(ngDevMode ? [{ debugName: "asideId" }] : /* istanbul ignore next */ []));
|
|
53
|
+
asideHeadingId = computed(() => `${this.asideId()}-heading`, /* @ts-ignore */
|
|
54
|
+
...(ngDevMode ? [{ debugName: "asideHeadingId" }] : /* istanbul ignore next */ []));
|
|
55
|
+
openGroup = computed(() => {
|
|
56
|
+
const resolved = this.resolvedGroup();
|
|
57
|
+
return resolved !== undefined
|
|
58
|
+
? resolved
|
|
59
|
+
: this.nav.resolveDockbarGroup(this.navId(), this.items(), this.mode(), this.activeIds(), this.activeUrl());
|
|
60
|
+
}, /* @ts-ignore */
|
|
61
|
+
...(ngDevMode ? [{ debugName: "openGroup" }] : /* istanbul ignore next */ []));
|
|
62
|
+
hostClasses = computed(() => cn('block w-(--layout-sidebar-collapsed-width)'), /* @ts-ignore */
|
|
63
|
+
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
64
|
+
railClasses = computed(() => cn('flex w-full list-none flex-col items-center gap-0.5 p-2',
|
|
65
|
+
// Mode drawer: rail tetap di atas backdrop (z-40) agar user bisa langsung
|
|
66
|
+
// berpindah group lain tanpa menutup drawer lebih dulu.
|
|
67
|
+
this.isDrawerMode() && this.openGroup() !== null && 'relative z-50'), /* @ts-ignore */
|
|
68
|
+
...(ngDevMode ? [{ debugName: "railClasses" }] : /* istanbul ignore next */ []));
|
|
69
|
+
asideClasses = computed(() => cn('absolute inset-y-0 flex w-(--layout-aside-width) flex-col bg-background',
|
|
70
|
+
// Border only on the CONTENT-facing edge. The dockbar rail already draws the
|
|
71
|
+
// rail-facing separator, so a rail-facing border here would double up
|
|
72
|
+
// (right of the mini-dock + left of the aside). Use `border-border` (the same
|
|
73
|
+
// solid token as the rail and the page) so the nav↔content divider is one
|
|
74
|
+
// consistent color across rail, aside, and page.
|
|
75
|
+
this.position() === 'right'
|
|
76
|
+
? 'right-(--layout-sidebar-collapsed-width) border-l border-border'
|
|
77
|
+
: 'left-(--layout-sidebar-collapsed-width) border-r border-border', this.isDrawerMode() && 'z-50 shadow-xl'), /* @ts-ignore */
|
|
78
|
+
...(ngDevMode ? [{ debugName: "asideClasses" }] : /* istanbul ignore next */ []));
|
|
79
|
+
/**
|
|
80
|
+
* Offset backdrop agar kolom navigasi (rail + header/footer) benar-benar bebas
|
|
81
|
+
* overlay — dockbar dan aside drawer berada di level yang sama di atas backdrop.
|
|
82
|
+
* `null` berarti pengukuran tidak tersedia (mis. jsdom) dan backdrop jatuh ke
|
|
83
|
+
* `inset-0` penuh seperti sebelumnya.
|
|
84
|
+
*/
|
|
85
|
+
backdropInset = signal({
|
|
86
|
+
left: null,
|
|
87
|
+
right: null,
|
|
88
|
+
}, /* @ts-ignore */
|
|
89
|
+
...(ngDevMode ? [{ debugName: "backdropInset" }] : /* istanbul ignore next */ []));
|
|
90
|
+
onWindowResize() {
|
|
91
|
+
if (this.isDrawerMode() && this.openGroup() !== null) {
|
|
92
|
+
this.measureBackdropInset();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
measureBackdropInset() {
|
|
96
|
+
const navEl = this.host.nativeElement.closest('[data-navigation-id]') ??
|
|
97
|
+
this.host.nativeElement;
|
|
98
|
+
const rect = navEl.getBoundingClientRect();
|
|
99
|
+
const viewportWidth = this.host.nativeElement.ownerDocument?.defaultView?.innerWidth ?? 0;
|
|
100
|
+
if (rect.width <= 0 || viewportWidth <= 0) {
|
|
101
|
+
this.backdropInset.set({ left: null, right: null });
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
// Containing block backdrop `fixed` bisa bergeser dari viewport (ancestor dengan
|
|
105
|
+
// filter/contain). Koreksi origin dihitung dari posisi aktual backdrop terhadap
|
|
106
|
+
// style left/right yang sedang berlaku — konvergen dalam satu langkah re-measure.
|
|
107
|
+
const backdrop = this.host.nativeElement.querySelector('[data-navigation-dockbar-backdrop="true"]');
|
|
108
|
+
const backdropRect = backdrop?.getBoundingClientRect() ?? null;
|
|
109
|
+
let originLeft = 0;
|
|
110
|
+
let originRight = viewportWidth;
|
|
111
|
+
if (backdrop && backdropRect && backdropRect.width > 0) {
|
|
112
|
+
originLeft = backdropRect.left - this.parsePx(backdrop.style.left);
|
|
113
|
+
originRight = backdropRect.right + this.parsePx(backdrop.style.right);
|
|
114
|
+
}
|
|
115
|
+
if (this.position() === 'right') {
|
|
116
|
+
this.backdropInset.set({ left: null, right: Math.max(originRight - rect.left, 0) });
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
this.backdropInset.set({ left: Math.max(rect.right - originLeft, 0), right: null });
|
|
120
|
+
}
|
|
121
|
+
parsePx(value) {
|
|
122
|
+
const parsed = Number.parseFloat(value);
|
|
123
|
+
return Number.isFinite(parsed) ? parsed : 0;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Template method calls re-run on every check; resolving the rail once per
|
|
127
|
+
* dependency change keeps a redraw from replaying an URL match — and a `cn()`
|
|
128
|
+
* merge — for every entry in it.
|
|
129
|
+
*/
|
|
130
|
+
entryState = computed(() => {
|
|
131
|
+
const activeIds = this.activeIds();
|
|
132
|
+
const activeUrl = this.activeUrl();
|
|
133
|
+
const openKey = this.openGroup()?.key ?? null;
|
|
134
|
+
return new Map(this.renderedRailItems().map((entry) => {
|
|
135
|
+
const active = this.nav.isItemActive(entry, activeIds, activeUrl);
|
|
136
|
+
const open = openKey === entry.key;
|
|
137
|
+
return [
|
|
138
|
+
entry,
|
|
139
|
+
{ active, open, triggerClasses: this.computeTriggerClasses(entry, active, open) },
|
|
140
|
+
];
|
|
141
|
+
}));
|
|
142
|
+
}, /* @ts-ignore */
|
|
143
|
+
...(ngDevMode ? [{ debugName: "entryState" }] : /* istanbul ignore next */ []));
|
|
144
|
+
isGroupOpen(entry) {
|
|
145
|
+
return this.entryState().get(entry)?.open ?? false;
|
|
146
|
+
}
|
|
147
|
+
isGroupActive(entry) {
|
|
148
|
+
return this.entryState().get(entry)?.active ?? false;
|
|
149
|
+
}
|
|
150
|
+
triggerClasses(entry) {
|
|
151
|
+
return this.entryState().get(entry)?.triggerClasses ?? '';
|
|
152
|
+
}
|
|
153
|
+
computeTriggerClasses(entry, active, open) {
|
|
154
|
+
return cn('nav-text group/nav inline-flex size-(--nav-rail-item-size) items-center justify-center rounded-md transition-colors', 'relative', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50', open || active
|
|
155
|
+
? 'bg-accent text-foreground'
|
|
156
|
+
: 'text-muted-foreground hover:bg-accent/60 hover:text-foreground', entry.classes?.wrapper, this.itemClass());
|
|
157
|
+
}
|
|
158
|
+
toggleGroup(entry) {
|
|
159
|
+
const wasOpen = this.isGroupOpen(entry);
|
|
160
|
+
if (!wasOpen && this.isDrawerMode()) {
|
|
161
|
+
this.measureBackdropInset();
|
|
162
|
+
}
|
|
163
|
+
this.nav.togglePanel(this.navId(), entry);
|
|
164
|
+
if (!this.isDrawerMode()) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if (wasOpen) {
|
|
168
|
+
this.afterRender(() => this.focusTrigger(entry.key));
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
this.afterRender(() => {
|
|
172
|
+
// Ukur ulang setelah render: geometri kolom bisa bergeser saat panel terbuka.
|
|
173
|
+
this.measureBackdropInset();
|
|
174
|
+
this.focusFirstAsideItem();
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
badgeFor(entry) {
|
|
178
|
+
const sourceKey = entry.badge?.source;
|
|
179
|
+
if (!sourceKey) {
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
return this.badgeContext()[sourceKey] ?? null;
|
|
183
|
+
}
|
|
184
|
+
badgeClassesFor(entry) {
|
|
185
|
+
return cn('absolute -right-1 -top-1', entry.badge?.classes);
|
|
186
|
+
}
|
|
187
|
+
closeAside() {
|
|
188
|
+
const openKey = this.openGroup()?.key ?? null;
|
|
189
|
+
this.nav.closePanel(this.navId());
|
|
190
|
+
if (openKey !== null) {
|
|
191
|
+
this.afterRender(() => this.focusTrigger(openKey));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
onEscape(event) {
|
|
195
|
+
if (!this.isDrawerMode() || this.openGroup() === null) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
event.preventDefault();
|
|
199
|
+
this.closeAside();
|
|
200
|
+
}
|
|
201
|
+
afterRender(callback) {
|
|
202
|
+
afterNextRender({ read: callback }, { injector: this.injector });
|
|
203
|
+
}
|
|
204
|
+
focusFirstAsideItem() {
|
|
205
|
+
const aside = this.host.nativeElement.querySelector(`#${this.asideId()}`);
|
|
206
|
+
const focusable = aside?.querySelector('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])');
|
|
207
|
+
focusable?.focus();
|
|
208
|
+
}
|
|
209
|
+
focusTrigger(key) {
|
|
210
|
+
const navigationRoot = this.host.nativeElement.closest('[data-navigation-id]') ??
|
|
211
|
+
this.host.nativeElement;
|
|
212
|
+
const trigger = Array.from(navigationRoot.querySelectorAll('[data-navigation-item-key]')).find((candidate) => candidate.getAttribute('data-navigation-item-key') === key &&
|
|
213
|
+
(candidate.hasAttribute('data-navigation-dockbar-trigger') ||
|
|
214
|
+
candidate.hasAttribute('data-navigation-dockbar-route-trigger')));
|
|
215
|
+
trigger?.focus();
|
|
216
|
+
}
|
|
217
|
+
safeId(value) {
|
|
218
|
+
const normalized = value
|
|
219
|
+
.trim()
|
|
220
|
+
.toLowerCase()
|
|
221
|
+
.replace(/[^a-z0-9_-]+/g, '-');
|
|
222
|
+
return normalized || 'default';
|
|
223
|
+
}
|
|
224
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NavigationDockbarMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
225
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NavigationDockbarMenuComponent, isStandalone: true, selector: "NavigationDockbarMenu", inputs: { navId: { classPropertyName: "navId", publicName: "navId", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, railItems: { classPropertyName: "railItems", publicName: "railItems", isSignal: true, isRequired: false, transformFunction: null }, badgeContext: { classPropertyName: "badgeContext", publicName: "badgeContext", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", 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 }, resolvedGroup: { classPropertyName: "resolvedGroup", publicName: "resolvedGroup", 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 }, openedIds: { classPropertyName: "openedIds", publicName: "openedIds", isSignal: true, isRequired: false, transformFunction: null }, asideFooterTemplate: { classPropertyName: "asideFooterTemplate", publicName: "asideFooterTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedIdsChange: "openedIdsChange", itemSelected: "itemSelected" }, host: { listeners: { "keydown.escape": "onEscape($event)", "window:resize": "onWindowResize()" }, properties: { "class": "hostClasses()", "attr.data-mode": "mode()", "attr.data-position": "position()" } }, ngImport: i0, template: `
|
|
226
|
+
<ul [class]="railClasses()" role="list">
|
|
227
|
+
@for (entry of renderedRailItems(); track entry.key) {
|
|
228
|
+
@if (entry.children.length > 0) {
|
|
229
|
+
<li class="flex w-full justify-center">
|
|
230
|
+
<button
|
|
231
|
+
type="button"
|
|
232
|
+
data-navigation-dockbar-trigger="true"
|
|
233
|
+
[class]="triggerClasses(entry)"
|
|
234
|
+
[attr.aria-expanded]="isGroupOpen(entry)"
|
|
235
|
+
[attr.aria-controls]="asideId()"
|
|
236
|
+
[attr.aria-label]="badgeFor(entry) ? null : (entry.tooltip ?? entry.title ?? null)"
|
|
237
|
+
[attr.title]="entry.tooltip ?? entry.title ?? null"
|
|
238
|
+
[attr.data-navigation-item-key]="entry.key"
|
|
239
|
+
[disabled]="entry.disabled || null"
|
|
240
|
+
(click)="toggleGroup(entry)"
|
|
241
|
+
>
|
|
242
|
+
@if (badgeFor(entry)) {
|
|
243
|
+
<span class="sr-only">{{ entry.tooltip ?? entry.title }}</span>
|
|
244
|
+
}
|
|
245
|
+
<NavigationItemContent
|
|
246
|
+
[item]="entry"
|
|
247
|
+
[active]="isGroupActive(entry)"
|
|
248
|
+
[compact]="true"
|
|
249
|
+
orientation="vertical"
|
|
250
|
+
[level]="0"
|
|
251
|
+
[iconTemplate]="iconTemplate()"
|
|
252
|
+
/>
|
|
253
|
+
@if (badgeFor(entry); as badge) {
|
|
254
|
+
<NavigationBadgeCount [badge]="badge" [class]="badgeClassesFor(entry)" />
|
|
255
|
+
}
|
|
256
|
+
</button>
|
|
257
|
+
</li>
|
|
258
|
+
} @else {
|
|
259
|
+
<li
|
|
260
|
+
NavigationItem
|
|
261
|
+
[navId]="navId()"
|
|
262
|
+
[item]="entry"
|
|
263
|
+
[level]="0"
|
|
264
|
+
orientation="vertical"
|
|
265
|
+
[compact]="true"
|
|
266
|
+
[itemClass]="itemClass()"
|
|
267
|
+
[activeIds]="activeIds()"
|
|
268
|
+
[activeUrl]="activeUrl()"
|
|
269
|
+
[iconTemplate]="iconTemplate()"
|
|
270
|
+
[collapseTree]="collapseTree()"
|
|
271
|
+
[openedIds]="openedIds()"
|
|
272
|
+
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
273
|
+
(itemSelected)="itemSelected.emit($event)"
|
|
274
|
+
></li>
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
</ul>
|
|
278
|
+
|
|
279
|
+
@if (openGroup(); as group) {
|
|
280
|
+
@if (isDrawerMode()) {
|
|
281
|
+
<div
|
|
282
|
+
class="fixed inset-0 z-40 bg-[hsl(var(--overlay-backdrop-strong))]"
|
|
283
|
+
data-navigation-dockbar-backdrop="true"
|
|
284
|
+
aria-hidden="true"
|
|
285
|
+
[style.left.px]="backdropInset().left"
|
|
286
|
+
[style.right.px]="backdropInset().right"
|
|
287
|
+
(click)="closeAside()"
|
|
288
|
+
></div>
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
<!-- Drawer non-modal: rail tetap interaktif di atas backdrop, jadi tanpa aria-modal. -->
|
|
292
|
+
<aside
|
|
293
|
+
[id]="asideId()"
|
|
294
|
+
[class]="asideClasses()"
|
|
295
|
+
data-navigation-dockbar-aside="true"
|
|
296
|
+
[attr.role]="isDrawerMode() ? 'dialog' : null"
|
|
297
|
+
[attr.aria-labelledby]="asideHeadingId()"
|
|
298
|
+
>
|
|
299
|
+
<header
|
|
300
|
+
class="flex h-(--layout-topbar-height) shrink-0 items-center gap-2 border-b border-[hsl(var(--border)/var(--section-border-opacity))] px-4"
|
|
301
|
+
>
|
|
302
|
+
<div class="min-w-0 flex-1">
|
|
303
|
+
<h2 [id]="asideHeadingId()" class="nav-text truncate text-foreground">
|
|
304
|
+
{{ group.title }}
|
|
305
|
+
</h2>
|
|
306
|
+
@if (group.subtitle) {
|
|
307
|
+
<p class="nav-subtitle -mt-0.5 truncate text-muted-foreground">
|
|
308
|
+
{{ group.subtitle }}
|
|
309
|
+
</p>
|
|
310
|
+
}
|
|
311
|
+
</div>
|
|
312
|
+
|
|
313
|
+
@if (isDrawerMode()) {
|
|
314
|
+
<button
|
|
315
|
+
type="button"
|
|
316
|
+
class="inline-flex size-8 shrink-0 items-center justify-center rounded-md text-foreground/80 transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
317
|
+
data-navigation-dockbar-close="true"
|
|
318
|
+
aria-label="Close navigation panel"
|
|
319
|
+
(click)="closeAside()"
|
|
320
|
+
>
|
|
321
|
+
<Icon name="close" size="inherit" class="text-(length:--nav-icon-size-sub)" />
|
|
322
|
+
</button>
|
|
323
|
+
}
|
|
324
|
+
</header>
|
|
325
|
+
|
|
326
|
+
<div
|
|
327
|
+
class="min-h-0 flex-1 overflow-y-auto px-2 py-3"
|
|
328
|
+
data-navigation-dockbar-aside-scroll="true"
|
|
329
|
+
>
|
|
330
|
+
<NavigationList
|
|
331
|
+
[navId]="navId()"
|
|
332
|
+
[items]="group.children"
|
|
333
|
+
[collapsed]="false"
|
|
334
|
+
position="left"
|
|
335
|
+
[itemClass]="itemClass()"
|
|
336
|
+
[activeIds]="activeIds()"
|
|
337
|
+
[activeUrl]="activeUrl()"
|
|
338
|
+
[iconTemplate]="iconTemplate()"
|
|
339
|
+
[collapseTree]="collapseTree()"
|
|
340
|
+
[openedIds]="openedIds()"
|
|
341
|
+
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
342
|
+
(itemSelected)="itemSelected.emit($event)"
|
|
343
|
+
/>
|
|
344
|
+
</div>
|
|
345
|
+
|
|
346
|
+
@if (asideFooterTemplate(); as asideFooter) {
|
|
347
|
+
<footer
|
|
348
|
+
class="flex h-(--layout-topbar-height) shrink-0 items-center gap-3 border-t border-[hsl(var(--border)/var(--section-border-opacity))] px-3"
|
|
349
|
+
data-navigation-dockbar-aside-footer="true"
|
|
350
|
+
>
|
|
351
|
+
<ng-container [ngTemplateOutlet]="asideFooter" />
|
|
352
|
+
</footer>
|
|
353
|
+
}
|
|
354
|
+
</aside>
|
|
355
|
+
}
|
|
356
|
+
`, isInline: true, dependencies: [{ kind: "component", type: IconComponent, selector: "Icon", inputs: ["name", "class", "size", "fill", "weight", "grade", "opticalSize"] }, { kind: "component", type: NavigationBadgeCountComponent, selector: "NavigationBadgeCount", inputs: ["badge", "class"] }, { kind: "component", type: NavigationItemComponent, selector: "li[NavigationItem]", inputs: ["navId", "item", "level", "orientation", "compact", "itemClass", "activeIds", "activeUrl", "iconTemplate", "collapseTree", "straightRail", "stairsRail", "straightRailActive", "firstInBranch", "lastInBranch", "openedIds"], outputs: ["openedIdsChange", "itemSelected"] }, { kind: "component", type: NavigationItemContentComponent, selector: "NavigationItemContent", inputs: ["item", "active", "compact", "orientation", "level", "iconTemplate"] }, { kind: "component", type: NavigationListComponent, selector: "NavigationList", inputs: ["navId", "items", "collapsed", "compact", "position", "itemClass", "activeIds", "activeUrl", "iconTemplate", "collapseTree", "openedIds"], outputs: ["openedIdsChange", "itemSelected"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
357
|
+
}
|
|
358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NavigationDockbarMenuComponent, decorators: [{
|
|
359
|
+
type: Component,
|
|
360
|
+
args: [{
|
|
361
|
+
selector: 'NavigationDockbarMenu',
|
|
362
|
+
imports: [
|
|
363
|
+
IconComponent,
|
|
364
|
+
NavigationBadgeCountComponent,
|
|
365
|
+
NavigationItemComponent,
|
|
366
|
+
NavigationItemContentComponent,
|
|
367
|
+
NavigationListComponent,
|
|
368
|
+
NgTemplateOutlet,
|
|
369
|
+
],
|
|
370
|
+
host: {
|
|
371
|
+
'[class]': 'hostClasses()',
|
|
372
|
+
'[attr.data-mode]': 'mode()',
|
|
373
|
+
'[attr.data-position]': 'position()',
|
|
374
|
+
'(keydown.escape)': 'onEscape($event)',
|
|
375
|
+
'(window:resize)': 'onWindowResize()',
|
|
376
|
+
},
|
|
377
|
+
template: `
|
|
378
|
+
<ul [class]="railClasses()" role="list">
|
|
379
|
+
@for (entry of renderedRailItems(); track entry.key) {
|
|
380
|
+
@if (entry.children.length > 0) {
|
|
381
|
+
<li class="flex w-full justify-center">
|
|
382
|
+
<button
|
|
383
|
+
type="button"
|
|
384
|
+
data-navigation-dockbar-trigger="true"
|
|
385
|
+
[class]="triggerClasses(entry)"
|
|
386
|
+
[attr.aria-expanded]="isGroupOpen(entry)"
|
|
387
|
+
[attr.aria-controls]="asideId()"
|
|
388
|
+
[attr.aria-label]="badgeFor(entry) ? null : (entry.tooltip ?? entry.title ?? null)"
|
|
389
|
+
[attr.title]="entry.tooltip ?? entry.title ?? null"
|
|
390
|
+
[attr.data-navigation-item-key]="entry.key"
|
|
391
|
+
[disabled]="entry.disabled || null"
|
|
392
|
+
(click)="toggleGroup(entry)"
|
|
393
|
+
>
|
|
394
|
+
@if (badgeFor(entry)) {
|
|
395
|
+
<span class="sr-only">{{ entry.tooltip ?? entry.title }}</span>
|
|
396
|
+
}
|
|
397
|
+
<NavigationItemContent
|
|
398
|
+
[item]="entry"
|
|
399
|
+
[active]="isGroupActive(entry)"
|
|
400
|
+
[compact]="true"
|
|
401
|
+
orientation="vertical"
|
|
402
|
+
[level]="0"
|
|
403
|
+
[iconTemplate]="iconTemplate()"
|
|
404
|
+
/>
|
|
405
|
+
@if (badgeFor(entry); as badge) {
|
|
406
|
+
<NavigationBadgeCount [badge]="badge" [class]="badgeClassesFor(entry)" />
|
|
407
|
+
}
|
|
408
|
+
</button>
|
|
409
|
+
</li>
|
|
410
|
+
} @else {
|
|
411
|
+
<li
|
|
412
|
+
NavigationItem
|
|
413
|
+
[navId]="navId()"
|
|
414
|
+
[item]="entry"
|
|
415
|
+
[level]="0"
|
|
416
|
+
orientation="vertical"
|
|
417
|
+
[compact]="true"
|
|
418
|
+
[itemClass]="itemClass()"
|
|
419
|
+
[activeIds]="activeIds()"
|
|
420
|
+
[activeUrl]="activeUrl()"
|
|
421
|
+
[iconTemplate]="iconTemplate()"
|
|
422
|
+
[collapseTree]="collapseTree()"
|
|
423
|
+
[openedIds]="openedIds()"
|
|
424
|
+
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
425
|
+
(itemSelected)="itemSelected.emit($event)"
|
|
426
|
+
></li>
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
</ul>
|
|
430
|
+
|
|
431
|
+
@if (openGroup(); as group) {
|
|
432
|
+
@if (isDrawerMode()) {
|
|
433
|
+
<div
|
|
434
|
+
class="fixed inset-0 z-40 bg-[hsl(var(--overlay-backdrop-strong))]"
|
|
435
|
+
data-navigation-dockbar-backdrop="true"
|
|
436
|
+
aria-hidden="true"
|
|
437
|
+
[style.left.px]="backdropInset().left"
|
|
438
|
+
[style.right.px]="backdropInset().right"
|
|
439
|
+
(click)="closeAside()"
|
|
440
|
+
></div>
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
<!-- Drawer non-modal: rail tetap interaktif di atas backdrop, jadi tanpa aria-modal. -->
|
|
444
|
+
<aside
|
|
445
|
+
[id]="asideId()"
|
|
446
|
+
[class]="asideClasses()"
|
|
447
|
+
data-navigation-dockbar-aside="true"
|
|
448
|
+
[attr.role]="isDrawerMode() ? 'dialog' : null"
|
|
449
|
+
[attr.aria-labelledby]="asideHeadingId()"
|
|
450
|
+
>
|
|
451
|
+
<header
|
|
452
|
+
class="flex h-(--layout-topbar-height) shrink-0 items-center gap-2 border-b border-[hsl(var(--border)/var(--section-border-opacity))] px-4"
|
|
453
|
+
>
|
|
454
|
+
<div class="min-w-0 flex-1">
|
|
455
|
+
<h2 [id]="asideHeadingId()" class="nav-text truncate text-foreground">
|
|
456
|
+
{{ group.title }}
|
|
457
|
+
</h2>
|
|
458
|
+
@if (group.subtitle) {
|
|
459
|
+
<p class="nav-subtitle -mt-0.5 truncate text-muted-foreground">
|
|
460
|
+
{{ group.subtitle }}
|
|
461
|
+
</p>
|
|
462
|
+
}
|
|
463
|
+
</div>
|
|
464
|
+
|
|
465
|
+
@if (isDrawerMode()) {
|
|
466
|
+
<button
|
|
467
|
+
type="button"
|
|
468
|
+
class="inline-flex size-8 shrink-0 items-center justify-center rounded-md text-foreground/80 transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
469
|
+
data-navigation-dockbar-close="true"
|
|
470
|
+
aria-label="Close navigation panel"
|
|
471
|
+
(click)="closeAside()"
|
|
472
|
+
>
|
|
473
|
+
<Icon name="close" size="inherit" class="text-(length:--nav-icon-size-sub)" />
|
|
474
|
+
</button>
|
|
475
|
+
}
|
|
476
|
+
</header>
|
|
477
|
+
|
|
478
|
+
<div
|
|
479
|
+
class="min-h-0 flex-1 overflow-y-auto px-2 py-3"
|
|
480
|
+
data-navigation-dockbar-aside-scroll="true"
|
|
481
|
+
>
|
|
482
|
+
<NavigationList
|
|
483
|
+
[navId]="navId()"
|
|
484
|
+
[items]="group.children"
|
|
485
|
+
[collapsed]="false"
|
|
486
|
+
position="left"
|
|
487
|
+
[itemClass]="itemClass()"
|
|
488
|
+
[activeIds]="activeIds()"
|
|
489
|
+
[activeUrl]="activeUrl()"
|
|
490
|
+
[iconTemplate]="iconTemplate()"
|
|
491
|
+
[collapseTree]="collapseTree()"
|
|
492
|
+
[openedIds]="openedIds()"
|
|
493
|
+
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
494
|
+
(itemSelected)="itemSelected.emit($event)"
|
|
495
|
+
/>
|
|
496
|
+
</div>
|
|
497
|
+
|
|
498
|
+
@if (asideFooterTemplate(); as asideFooter) {
|
|
499
|
+
<footer
|
|
500
|
+
class="flex h-(--layout-topbar-height) shrink-0 items-center gap-3 border-t border-[hsl(var(--border)/var(--section-border-opacity))] px-3"
|
|
501
|
+
data-navigation-dockbar-aside-footer="true"
|
|
502
|
+
>
|
|
503
|
+
<ng-container [ngTemplateOutlet]="asideFooter" />
|
|
504
|
+
</footer>
|
|
505
|
+
}
|
|
506
|
+
</aside>
|
|
507
|
+
}
|
|
508
|
+
`,
|
|
509
|
+
}]
|
|
510
|
+
}], propDecorators: { navId: [{ type: i0.Input, args: [{ isSignal: true, alias: "navId", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], railItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "railItems", required: false }] }], badgeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "badgeContext", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], itemClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemClass", required: false }] }], activeIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeIds", required: false }] }], activeUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeUrl", required: false }] }], resolvedGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "resolvedGroup", required: false }] }], iconTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconTemplate", required: false }] }], collapseTree: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseTree", required: false }] }], openedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "openedIds", required: false }] }], asideFooterTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "asideFooterTemplate", required: false }] }], openedIdsChange: [{ type: i0.Output, args: ["openedIdsChange"] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }] } });
|
|
511
|
+
|
|
512
|
+
export { NavigationDockbarMenuComponent };
|