@edsis/angular 22.2.10 → 22.2.12
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/component/icon/README.md +17 -0
- package/fesm2022/edsis-angular-chart-area.mjs +3 -3
- package/fesm2022/edsis-angular-chart-bar.mjs +3 -3
- package/fesm2022/edsis-angular-chart-core.mjs +34 -34
- package/fesm2022/edsis-angular-chart-line.mjs +3 -3
- package/fesm2022/edsis-angular-chart-pie.mjs +3 -3
- package/fesm2022/edsis-angular-chart-primitives.mjs +33 -33
- package/fesm2022/edsis-angular-chart-radar.mjs +3 -3
- package/fesm2022/edsis-angular-chart-radial.mjs +3 -3
- package/fesm2022/edsis-angular-chart-scatter.mjs +3 -3
- package/fesm2022/edsis-angular-component-accordion.mjs +15 -15
- package/fesm2022/edsis-angular-component-alert-dialog.mjs +27 -27
- package/fesm2022/edsis-angular-component-alert.mjs +12 -12
- package/fesm2022/edsis-angular-component-aspect-ratio.mjs +3 -3
- package/fesm2022/edsis-angular-component-avatar.mjs +18 -18
- package/fesm2022/edsis-angular-component-badge.mjs +3 -3
- package/fesm2022/edsis-angular-component-breadcrumb.mjs +21 -21
- package/fesm2022/edsis-angular-component-button-group.mjs +9 -9
- package/fesm2022/edsis-angular-component-button.mjs +3 -3
- package/fesm2022/edsis-angular-component-calendar.mjs +3 -3
- package/fesm2022/edsis-angular-component-card.mjs +21 -21
- package/fesm2022/edsis-angular-component-carousel.mjs +18 -18
- package/fesm2022/edsis-angular-component-checkbox.mjs +3 -3
- package/fesm2022/edsis-angular-component-collapsible.mjs +12 -12
- package/fesm2022/edsis-angular-component-combobox.mjs +3 -3
- package/fesm2022/edsis-angular-component-command.mjs +27 -27
- package/fesm2022/edsis-angular-component-composer.mjs +21 -21
- package/fesm2022/edsis-angular-component-context-menu.mjs +3 -3
- package/fesm2022/edsis-angular-component-date-picker.mjs +3 -3
- package/fesm2022/edsis-angular-component-dialog.mjs +21 -21
- package/fesm2022/edsis-angular-component-dropdown-menu.mjs +39 -39
- package/fesm2022/edsis-angular-component-editor.mjs +18 -18
- package/fesm2022/edsis-angular-component-empty.mjs +18 -18
- package/fesm2022/edsis-angular-component-form.mjs +36 -36
- package/fesm2022/edsis-angular-component-hover-card.mjs +9 -9
- package/fesm2022/edsis-angular-component-icon.mjs +6 -6
- package/fesm2022/edsis-angular-component-input-group.mjs +18 -18
- package/fesm2022/edsis-angular-component-input-otp.mjs +15 -15
- package/fesm2022/edsis-angular-component-input.mjs +3 -3
- package/fesm2022/edsis-angular-component-item.mjs +30 -30
- package/fesm2022/edsis-angular-component-kanban.mjs +27 -27
- package/fesm2022/edsis-angular-component-kbd.mjs +6 -6
- package/fesm2022/edsis-angular-component-label.mjs +3 -3
- package/fesm2022/edsis-angular-component-menubar.mjs +12 -12
- package/fesm2022/edsis-angular-component-native-select.mjs +9 -9
- package/fesm2022/edsis-angular-component-navigation-menu.mjs +21 -21
- package/fesm2022/edsis-angular-component-pagination.mjs +3 -3
- package/fesm2022/edsis-angular-component-pillbox.mjs +15 -15
- package/fesm2022/edsis-angular-component-popover.mjs +6 -6
- package/fesm2022/edsis-angular-component-progress.mjs +3 -3
- package/fesm2022/edsis-angular-component-radio.mjs +6 -6
- package/fesm2022/edsis-angular-component-resizable.mjs +12 -12
- package/fesm2022/edsis-angular-component-scroll-area.mjs +3 -3
- package/fesm2022/edsis-angular-component-segmented-control.mjs +9 -7
- package/fesm2022/edsis-angular-component-select.mjs +6 -6
- package/fesm2022/edsis-angular-component-separator.mjs +3 -3
- package/fesm2022/edsis-angular-component-sheet.mjs +32 -24
- package/fesm2022/edsis-angular-component-skeleton.mjs +3 -3
- package/fesm2022/edsis-angular-component-slider.mjs +6 -6
- package/fesm2022/edsis-angular-component-spinner.mjs +3 -3
- package/fesm2022/edsis-angular-component-switch.mjs +3 -3
- package/fesm2022/edsis-angular-component-table.mjs +24 -24
- package/fesm2022/edsis-angular-component-tabs.mjs +18 -18
- package/fesm2022/edsis-angular-component-textarea.mjs +3 -3
- package/fesm2022/edsis-angular-component-timeline.mjs +18 -18
- package/fesm2022/edsis-angular-component-toast.mjs +3 -3
- package/fesm2022/edsis-angular-component-toggle-group.mjs +9 -9
- package/fesm2022/edsis-angular-component-toggle.mjs +3 -3
- package/fesm2022/edsis-angular-component-tooltip.mjs +15 -15
- package/fesm2022/edsis-angular-component-utils-core.mjs +420 -4
- package/fesm2022/edsis-angular-component-utils-scale.mjs +3 -3
- package/fesm2022/edsis-angular-navigation-icon.mjs +3 -3
- package/fesm2022/{edsis-angular-navigation-navigation-badge-count.component-D70Ju6_f.mjs → edsis-angular-navigation-navigation-badge-count.component-CLXtMyMX.mjs} +3 -3
- package/fesm2022/{edsis-angular-navigation-navigation-dockbar-menu.component-BaFnh48V.mjs → edsis-angular-navigation-navigation-dockbar-menu.component-CSXPm1pJ.mjs} +41 -10
- package/fesm2022/{edsis-angular-navigation-navigation-entry-grid.component-D39W0FQZ.mjs → edsis-angular-navigation-navigation-entry-grid.component-BJgfe_dF.mjs} +71 -24
- package/fesm2022/{edsis-angular-navigation-navigation-flyout-menu.component-CpmsY8hb.mjs → edsis-angular-navigation-navigation-flyout-menu.component-CacQc46w.mjs} +28 -10
- package/fesm2022/{edsis-angular-navigation-navigation-horizontal.component-D35IfX6r.mjs → edsis-angular-navigation-navigation-horizontal.component-B30vIs1R.mjs} +10 -8
- package/fesm2022/{edsis-angular-navigation-navigation-item.component-X6JFy-ya.mjs → edsis-angular-navigation-navigation-item.component-ByQVStr8.mjs} +188 -56
- package/fesm2022/{edsis-angular-navigation-navigation-list.component-D6Ms8H5g.mjs → edsis-angular-navigation-navigation-list.component-R-2HuZnv.mjs} +24 -4
- package/fesm2022/edsis-angular-navigation-service.mjs +7 -7
- package/fesm2022/edsis-angular-navigation.mjs +119 -71
- package/fesm2022/edsis-angular-theme-component-settings.mjs +329 -69
- package/fesm2022/edsis-angular-theme-layout-services.mjs +7 -7
- package/fesm2022/edsis-angular-theme-layout-wrapper.mjs +83 -35
- package/fesm2022/edsis-angular-theme-layout.mjs +25 -25
- package/fesm2022/edsis-angular-theme-on-fill.mjs +3 -3
- package/fesm2022/edsis-angular-theme-page-core.mjs +3 -3
- package/fesm2022/edsis-angular-theme-page-filter.mjs +6 -6
- package/fesm2022/edsis-angular-theme-page-overview.mjs +3 -3
- package/fesm2022/edsis-angular-theme-page-root.mjs +15 -6
- package/fesm2022/edsis-angular-theme-page-side.mjs +6 -6
- package/fesm2022/edsis-angular-theme-page-slots.mjs +12 -12
- package/fesm2022/edsis-angular-theme-shell-services.mjs +4 -4
- package/fesm2022/edsis-angular-theme-shell.mjs +21 -12
- package/fesm2022/edsis-angular-theme-styles.mjs +109 -178
- package/navigation/README.md +32 -2
- package/package.json +3 -2
- package/theme/README.md +5 -0
- package/theme/component/settings/README.md +15 -0
- package/theme/styles/README.md +71 -1
- package/theme/styles/css/base/components.css +29 -75
- package/theme/styles/css/base/theme.css +3 -3
- package/theme/styles/css/base/tokens.css +8 -0
- package/types/edsis-angular-component-card.d.ts +1 -1
- package/types/edsis-angular-component-command.d.ts +1 -1
- package/types/edsis-angular-component-segmented-control.d.ts +3 -3
- package/types/edsis-angular-component-utils-core.d.ts +147 -3
- package/types/edsis-angular-navigation-types.d.ts +2 -0
- package/types/edsis-angular-navigation.d.ts +8 -1
- package/types/edsis-angular-theme-component-settings.d.ts +11 -3
- package/types/edsis-angular-theme-layout-wrapper.d.ts +9 -2
- package/types/edsis-angular-theme-styles.d.ts +30 -26
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as navigationPanelId, o as NavigationItemBadgeComponent, t as NavigationItemComponent } from "./edsis-angular-navigation-navigation-item.component-ByQVStr8.mjs";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import { Component, computed, inject, input, output, signal } from "@angular/core";
|
|
4
4
|
import { ActivatedRoute, Router, RouterLink } from "@angular/router";
|
|
5
5
|
import { cn } from "@edsis/angular/component/utils/core";
|
|
6
6
|
import { NAVIGATION_ADAPTER, NAVIGATION_ROUTE_CONTEXT_ADAPTER } from "@edsis/angular/navigation/core";
|
|
7
7
|
import { NgTemplateOutlet } from "@angular/common";
|
|
8
|
-
import {
|
|
8
|
+
import { ChevronRight } from "lucide";
|
|
9
9
|
import { IconComponent, provideIcons } from "@edsis/angular/component/icon";
|
|
10
10
|
var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
11
11
|
nav = inject(NAVIGATION_ADAPTER);
|
|
@@ -25,7 +25,7 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
25
25
|
openedIdsChange = output();
|
|
26
26
|
itemSelected = output();
|
|
27
27
|
isBorderRail = computed(() => this.typeStyle() === "border-rail", ...ngDevMode ? [{ debugName: "isBorderRail" }] : /* istanbul ignore next */ []);
|
|
28
|
-
navItemClass = computed(() => cn(this.itemClass(), this.isBorderRail() && "rounded-none hover:bg-transparent hover:text-primary"), ...ngDevMode ? [{ debugName: "navItemClass" }] : /* istanbul ignore next */ []);
|
|
28
|
+
navItemClass = computed(() => cn(this.itemClass(), this.isBorderRail() && "rounded-none [&:not([aria-current=page]):hover]:bg-transparent [&:not([aria-current=page]):hover]:text-primary"), ...ngDevMode ? [{ debugName: "navItemClass" }] : /* istanbul ignore next */ []);
|
|
29
29
|
collapsedEntryKeys = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "collapsedEntryKeys" }] : /* istanbul ignore next */ []);
|
|
30
30
|
entryState = computed(() => {
|
|
31
31
|
const activeIds = this.activeIds();
|
|
@@ -34,7 +34,8 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
34
34
|
return new Map(this.branch().children.map((child) => [child, {
|
|
35
35
|
active: this.nav.isItemActive(child, activeIds, activeUrl),
|
|
36
36
|
routeActive: this.nav.isRouterItem(child) && this.isRouteActive(child),
|
|
37
|
-
panelId: navigationPanelId(navId, child)
|
|
37
|
+
panelId: navigationPanelId(navId, child),
|
|
38
|
+
lastActiveChild: child.children.reduce((last, nested, index) => this.nav.isItemActive(nested, activeIds, activeUrl) ? index : last, -1)
|
|
38
39
|
}]));
|
|
39
40
|
}, ...ngDevMode ? [{ debugName: "entryState" }] : /* istanbul ignore next */ []);
|
|
40
41
|
isItemActive(item) {
|
|
@@ -96,31 +97,37 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
96
97
|
const columns = Math.min(Math.max(branch.columns ?? 4, 1), 4);
|
|
97
98
|
return cn("m-0 grid list-none grid-cols-1 gap-1 p-0", columns >= 2 && "sm:grid-cols-2", columns >= 3 && "md:grid-cols-3", columns >= 4 && "lg:grid-cols-4");
|
|
98
99
|
}
|
|
100
|
+
childRailSegment(item, index) {
|
|
101
|
+
const lastActive = this.entryState().get(item)?.lastActiveChild ?? -1;
|
|
102
|
+
return index < lastActive ? "through" : index === lastActive ? "end" : null;
|
|
103
|
+
}
|
|
99
104
|
entryClasses(item, active) {
|
|
100
|
-
return cn("group/nav nav-text flex w-full items-center gap-
|
|
105
|
+
return cn("relative isolate group/nav nav-text flex w-full items-center gap-(--nav-item-gap) px-(--nav-item-padding-x) py-2 text-left transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", active ? "rounded-md bg-primary text-primary-foreground" : this.isBorderRail() ? "rounded-none text-foreground hover:text-primary" : "rounded-lg text-foreground hover:bg-accent hover:text-accent-foreground", active && item.children.length > 0 && this.isEntryOpen(item) && this.collapseTree() === "stairs" && "before:pointer-events-none before:absolute before:top-1/2 before:bottom-0 before:left-(--nav-rail-offset) before:-z-10 before:w-px before:-translate-x-1/2 before:bg-primary before:content-['']", item.disabled && "pointer-events-none opacity-50", item.classes?.wrapper, this.itemClass());
|
|
101
106
|
}
|
|
102
|
-
entryIconClasses(active) {
|
|
103
|
-
if (
|
|
104
|
-
return
|
|
107
|
+
entryIconClasses(active, parent) {
|
|
108
|
+
if (parent) return cn("relative inline-flex size-(--nav-icon-size) shrink-0 items-center justify-center self-center", active ? "text-current" : "text-muted-foreground group-hover/nav:text-current");
|
|
109
|
+
if (active) return "relative flex size-(--nav-entry-box-size) shrink-0 items-center justify-center self-center text-current";
|
|
110
|
+
if (this.isBorderRail()) return "relative flex size-(--nav-entry-box-size) shrink-0 items-center justify-center self-center text-foreground transition-colors group-hover/nav:text-primary";
|
|
111
|
+
return cn("relative flex size-(--nav-entry-box-size) shrink-0 items-center justify-center self-center rounded-lg border bg-background text-foreground shadow-sm transition-colors", "border-[hsl(var(--border)/var(--section-border-opacity))]");
|
|
105
112
|
}
|
|
106
113
|
entryIconGlyphClasses(item) {
|
|
107
114
|
return cn("text-(length:--nav-icon-size) text-current", item.classes?.icon);
|
|
108
115
|
}
|
|
109
116
|
entryTitleClasses(item) {
|
|
110
|
-
return cn("block truncate",
|
|
117
|
+
return cn("block truncate", "text-current", item.classes?.title);
|
|
111
118
|
}
|
|
112
|
-
entrySubtitleClasses(item) {
|
|
113
|
-
return cn("nav-subtitle mt-0.5 block truncate text-muted-foreground", item.classes?.subtitle);
|
|
119
|
+
entrySubtitleClasses(item, active) {
|
|
120
|
+
return cn("nav-subtitle mt-0.5 block truncate", active ? "text-current" : "text-muted-foreground", item.classes?.subtitle);
|
|
114
121
|
}
|
|
115
122
|
entryChevronClasses(item) {
|
|
116
|
-
return cn("shrink-0 self-center text-(length:--nav-icon-size-sub)
|
|
123
|
+
return cn("shrink-0 self-center text-(length:--nav-icon-size-sub) transition-transform duration-normal", this.isItemActive(item) ? "text-current" : "text-muted-foreground", this.isEntryOpen(item) && "rotate-90");
|
|
117
124
|
}
|
|
118
125
|
nestedListClasses() {
|
|
119
|
-
return cn("relative
|
|
126
|
+
return cn("relative flex list-none flex-col gap-0.5 p-0 pt-0.5", this.collapseTree() === "stairs" ? "ml-(--nav-rail-offset) pl-[calc(var(--nav-indent)-var(--nav-rail-offset))]" : "pl-(--nav-indent)");
|
|
120
127
|
}
|
|
121
128
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
122
129
|
minVersion: "12.0.0",
|
|
123
|
-
version: "22.2.
|
|
130
|
+
version: "22.2.6",
|
|
124
131
|
ngImport: i0,
|
|
125
132
|
type: NavigationEntryGridComponent,
|
|
126
133
|
deps: [],
|
|
@@ -128,7 +135,7 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
128
135
|
});
|
|
129
136
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
130
137
|
minVersion: "17.0.0",
|
|
131
|
-
version: "22.2.
|
|
138
|
+
version: "22.2.6",
|
|
132
139
|
type: NavigationEntryGridComponent,
|
|
133
140
|
isStandalone: true,
|
|
134
141
|
selector: "NavigationEntryGrid",
|
|
@@ -209,7 +216,11 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
209
216
|
itemSelected: "itemSelected"
|
|
210
217
|
},
|
|
211
218
|
host: { classAttribute: "contents" },
|
|
212
|
-
providers: [provideIcons(
|
|
219
|
+
providers: [provideIcons({
|
|
220
|
+
name: "chevron-right",
|
|
221
|
+
size: 24,
|
|
222
|
+
node: ChevronRight
|
|
223
|
+
})],
|
|
213
224
|
ngImport: i0,
|
|
214
225
|
template: `
|
|
215
226
|
@let branchItem = branch();
|
|
@@ -258,7 +269,13 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
258
269
|
|
|
259
270
|
@if (isEntryOpen(child)) {
|
|
260
271
|
<ul [id]="panelIdFor(child)" role="none" [class]="nestedListClasses()">
|
|
261
|
-
@for (
|
|
272
|
+
@for (
|
|
273
|
+
nested of child.children;
|
|
274
|
+
track nested.key;
|
|
275
|
+
let index = $index;
|
|
276
|
+
let first = $first;
|
|
277
|
+
let last = $last
|
|
278
|
+
) {
|
|
262
279
|
<li
|
|
263
280
|
NavigationItem
|
|
264
281
|
[navId]="navId()"
|
|
@@ -272,6 +289,12 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
272
289
|
[badgeContext]="badgeContext()"
|
|
273
290
|
[iconTemplate]="iconTemplate()"
|
|
274
291
|
[collapseTree]="collapseTree()"
|
|
292
|
+
[rail]="'rail-active'"
|
|
293
|
+
[stairsRail]="collapseTree() === 'stairs'"
|
|
294
|
+
[straightRail]="collapseTree() === 'straight'"
|
|
295
|
+
[railSegment]="childRailSegment(child, index)"
|
|
296
|
+
[firstInBranch]="first"
|
|
297
|
+
[lastInBranch]="last"
|
|
275
298
|
[openedIds]="openedIds()"
|
|
276
299
|
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
277
300
|
(itemSelected)="itemSelected.emit($event)"
|
|
@@ -352,7 +375,10 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
352
375
|
</div>
|
|
353
376
|
|
|
354
377
|
<ng-template #entryContent let-child let-active="active">
|
|
355
|
-
<span
|
|
378
|
+
<span
|
|
379
|
+
[class]="entryIconClasses(active, child.children.length > 0)"
|
|
380
|
+
data-navigation-icon-slot="true"
|
|
381
|
+
>
|
|
356
382
|
@if (isBorderRail()) {
|
|
357
383
|
<span
|
|
358
384
|
aria-hidden="true"
|
|
@@ -407,7 +433,7 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
407
433
|
<span class="min-w-0 flex-1">
|
|
408
434
|
<span [class]="entryTitleClasses(child)">{{ child.title }}</span>
|
|
409
435
|
@if (child.subtitle) {
|
|
410
|
-
<span [class]="entrySubtitleClasses(child)">{{ child.subtitle }}</span>
|
|
436
|
+
<span [class]="entrySubtitleClasses(child, active)">{{ child.subtitle }}</span>
|
|
411
437
|
}
|
|
412
438
|
</span>
|
|
413
439
|
|
|
@@ -478,6 +504,8 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
478
504
|
"iconTemplate",
|
|
479
505
|
"tooltip-position",
|
|
480
506
|
"collapseTree",
|
|
507
|
+
"rail",
|
|
508
|
+
"railSegment",
|
|
481
509
|
"straightRail",
|
|
482
510
|
"stairsRail",
|
|
483
511
|
"straightRailActive",
|
|
@@ -504,7 +532,7 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
504
532
|
};
|
|
505
533
|
i0.ɵɵngDeclareClassMetadata({
|
|
506
534
|
minVersion: "12.0.0",
|
|
507
|
-
version: "22.2.
|
|
535
|
+
version: "22.2.6",
|
|
508
536
|
ngImport: i0,
|
|
509
537
|
type: NavigationEntryGridComponent,
|
|
510
538
|
decorators: [{
|
|
@@ -518,7 +546,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
518
546
|
NavigationItemComponent,
|
|
519
547
|
NavigationItemBadgeComponent
|
|
520
548
|
],
|
|
521
|
-
providers: [provideIcons(
|
|
549
|
+
providers: [provideIcons({
|
|
550
|
+
name: "chevron-right",
|
|
551
|
+
size: 24,
|
|
552
|
+
node: ChevronRight
|
|
553
|
+
})],
|
|
522
554
|
host: { class: "contents" },
|
|
523
555
|
template: `
|
|
524
556
|
@let branchItem = branch();
|
|
@@ -567,7 +599,13 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
567
599
|
|
|
568
600
|
@if (isEntryOpen(child)) {
|
|
569
601
|
<ul [id]="panelIdFor(child)" role="none" [class]="nestedListClasses()">
|
|
570
|
-
@for (
|
|
602
|
+
@for (
|
|
603
|
+
nested of child.children;
|
|
604
|
+
track nested.key;
|
|
605
|
+
let index = $index;
|
|
606
|
+
let first = $first;
|
|
607
|
+
let last = $last
|
|
608
|
+
) {
|
|
571
609
|
<li
|
|
572
610
|
NavigationItem
|
|
573
611
|
[navId]="navId()"
|
|
@@ -581,6 +619,12 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
581
619
|
[badgeContext]="badgeContext()"
|
|
582
620
|
[iconTemplate]="iconTemplate()"
|
|
583
621
|
[collapseTree]="collapseTree()"
|
|
622
|
+
[rail]="'rail-active'"
|
|
623
|
+
[stairsRail]="collapseTree() === 'stairs'"
|
|
624
|
+
[straightRail]="collapseTree() === 'straight'"
|
|
625
|
+
[railSegment]="childRailSegment(child, index)"
|
|
626
|
+
[firstInBranch]="first"
|
|
627
|
+
[lastInBranch]="last"
|
|
584
628
|
[openedIds]="openedIds()"
|
|
585
629
|
(openedIdsChange)="openedIdsChange.emit($event)"
|
|
586
630
|
(itemSelected)="itemSelected.emit($event)"
|
|
@@ -661,7 +705,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
661
705
|
</div>
|
|
662
706
|
|
|
663
707
|
<ng-template #entryContent let-child let-active="active">
|
|
664
|
-
<span
|
|
708
|
+
<span
|
|
709
|
+
[class]="entryIconClasses(active, child.children.length > 0)"
|
|
710
|
+
data-navigation-icon-slot="true"
|
|
711
|
+
>
|
|
665
712
|
@if (isBorderRail()) {
|
|
666
713
|
<span
|
|
667
714
|
aria-hidden="true"
|
|
@@ -716,7 +763,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
716
763
|
<span class="min-w-0 flex-1">
|
|
717
764
|
<span [class]="entryTitleClasses(child)">{{ child.title }}</span>
|
|
718
765
|
@if (child.subtitle) {
|
|
719
|
-
<span [class]="entrySubtitleClasses(child)">{{ child.subtitle }}</span>
|
|
766
|
+
<span [class]="entrySubtitleClasses(child, active)">{{ child.subtitle }}</span>
|
|
720
767
|
}
|
|
721
768
|
</span>
|
|
722
769
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as NavigationItemContentComponent, t as NavigationItemComponent } from "./edsis-angular-navigation-navigation-item.component-
|
|
2
|
-
import { t as NavigationEntryGridComponent } from "./edsis-angular-navigation-navigation-entry-grid.component-
|
|
1
|
+
import { a as navigationInteractiveStateClasses, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./edsis-angular-navigation-navigation-item.component-ByQVStr8.mjs";
|
|
2
|
+
import { t as NavigationEntryGridComponent } from "./edsis-angular-navigation-navigation-entry-grid.component-BJgfe_dF.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 "@edsis/angular/component/utils/core";
|
|
6
6
|
import { NAVIGATION_ADAPTER } from "@edsis/angular/navigation/core";
|
|
7
7
|
import { DOCUMENT } from "@angular/common";
|
|
8
|
-
import {
|
|
8
|
+
import { ChevronRight, Menu } from "lucide";
|
|
9
9
|
import { IconComponent, provideIcons } from "@edsis/angular/component/icon";
|
|
10
10
|
var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
|
|
11
11
|
nav = inject(NAVIGATION_ADAPTER);
|
|
@@ -42,7 +42,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
|
|
|
42
42
|
isBottom = computed(() => this.position() === "bottom", ...ngDevMode ? [{ debugName: "isBottom" }] : /* istanbul ignore next */ []);
|
|
43
43
|
showIconOnly = computed(() => this.compact() || this.iconOnly(), ...ngDevMode ? [{ debugName: "showIconOnly" }] : /* istanbul ignore next */ []);
|
|
44
44
|
triggerIcon = computed(() => this.icon() ?? (this.showIconOnly() ? "menu" : null), ...ngDevMode ? [{ debugName: "triggerIcon" }] : /* istanbul ignore next */ []);
|
|
45
|
-
navItemClass = computed(() => cn(this.itemClass(), this.isBorderRail() && "h-(--nav-item-height) rounded-none hover:bg-transparent hover:text-primary"), ...ngDevMode ? [{ debugName: "navItemClass" }] : /* istanbul ignore next */ []);
|
|
45
|
+
navItemClass = computed(() => cn(this.itemClass(), this.isBorderRail() && "h-(--nav-item-height) rounded-none [&:not([aria-current=page]):hover]:bg-transparent [&:not([aria-current=page]):hover]:text-primary"), ...ngDevMode ? [{ debugName: "navItemClass" }] : /* istanbul ignore next */ []);
|
|
46
46
|
branches = computed(() => this.items().filter((item) => item.children.length > 0), ...ngDevMode ? [{ debugName: "branches" }] : /* istanbul ignore next */ []);
|
|
47
47
|
activeBranch = computed(() => {
|
|
48
48
|
const key = this.nav.currentPanelKey(this.navId());
|
|
@@ -174,7 +174,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
|
|
|
174
174
|
return this.itemState().get(item)?.tabClasses ?? "";
|
|
175
175
|
}
|
|
176
176
|
computeTabClasses(item, active, open) {
|
|
177
|
-
return cn("nav-trigger nav-text group/nav inline-flex h-full min-h-(--nav-item-height) min-w-0 items-center gap-(--nav-item-gap) rounded-md px-(--nav-item-padding-x) transition-colors", this.isBottom() ? "rounded-t-none" : "rounded-b-none", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", this.isBorderRail() ? open
|
|
177
|
+
return cn("nav-trigger nav-text group/nav inline-flex h-full min-h-(--nav-item-height) min-w-0 items-center gap-(--nav-item-gap) rounded-md px-(--nav-item-padding-x) transition-colors", active ? "rounded-md" : this.isBottom() ? "rounded-t-none" : "rounded-b-none", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", active ? navigationInteractiveStateClasses(true, "horizontal", false, item.children.length > 0, false, false) : this.isBorderRail() ? open ? "rounded-none text-primary" : "rounded-none text-foreground/80 hover:text-primary" : open ? "bg-accent text-foreground" : "text-foreground/80 hover:bg-accent hover:text-accent-foreground", item.classes?.wrapper, this.itemClass());
|
|
178
178
|
}
|
|
179
179
|
tabChevronClasses(item) {
|
|
180
180
|
return cn("shrink-0 self-center text-(length:--nav-icon-size-sub) text-current transition-transform duration-normal", this.isBranchOpen(item) && "rotate-90");
|
|
@@ -201,7 +201,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
|
|
|
201
201
|
}
|
|
202
202
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
203
203
|
minVersion: "12.0.0",
|
|
204
|
-
version: "22.2.
|
|
204
|
+
version: "22.2.6",
|
|
205
205
|
ngImport: i0,
|
|
206
206
|
type: NavigationFlyoutMenuComponent,
|
|
207
207
|
deps: [],
|
|
@@ -209,7 +209,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
|
|
|
209
209
|
});
|
|
210
210
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
211
211
|
minVersion: "17.0.0",
|
|
212
|
-
version: "22.2.
|
|
212
|
+
version: "22.2.6",
|
|
213
213
|
type: NavigationFlyoutMenuComponent,
|
|
214
214
|
isStandalone: true,
|
|
215
215
|
selector: "NavigationFlyoutMenu",
|
|
@@ -377,7 +377,15 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
|
|
|
377
377
|
listeners: { "keydown.escape": "onEscape($event)" },
|
|
378
378
|
properties: { "class": "hostClasses()" }
|
|
379
379
|
},
|
|
380
|
-
providers: [provideIcons(
|
|
380
|
+
providers: [provideIcons({
|
|
381
|
+
name: "chevron-right",
|
|
382
|
+
size: 24,
|
|
383
|
+
node: ChevronRight
|
|
384
|
+
}, {
|
|
385
|
+
name: "menu",
|
|
386
|
+
size: 24,
|
|
387
|
+
node: Menu
|
|
388
|
+
})],
|
|
381
389
|
ngImport: i0,
|
|
382
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",
|
|
383
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"],
|
|
@@ -429,6 +437,8 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
|
|
|
429
437
|
"iconTemplate",
|
|
430
438
|
"tooltip-position",
|
|
431
439
|
"collapseTree",
|
|
440
|
+
"rail",
|
|
441
|
+
"railSegment",
|
|
432
442
|
"straightRail",
|
|
433
443
|
"stairsRail",
|
|
434
444
|
"straightRailActive",
|
|
@@ -457,7 +467,7 @@ var NavigationFlyoutMenuComponent = class NavigationFlyoutMenuComponent {
|
|
|
457
467
|
};
|
|
458
468
|
i0.ɵɵngDeclareClassMetadata({
|
|
459
469
|
minVersion: "12.0.0",
|
|
460
|
-
version: "22.2.
|
|
470
|
+
version: "22.2.6",
|
|
461
471
|
ngImport: i0,
|
|
462
472
|
type: NavigationFlyoutMenuComponent,
|
|
463
473
|
decorators: [{
|
|
@@ -470,7 +480,15 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
470
480
|
NavigationItemComponent,
|
|
471
481
|
NavigationItemContentComponent
|
|
472
482
|
],
|
|
473
|
-
providers: [provideIcons(
|
|
483
|
+
providers: [provideIcons({
|
|
484
|
+
name: "chevron-right",
|
|
485
|
+
size: 24,
|
|
486
|
+
node: ChevronRight
|
|
487
|
+
}, {
|
|
488
|
+
name: "menu",
|
|
489
|
+
size: 24,
|
|
490
|
+
node: Menu
|
|
491
|
+
})],
|
|
474
492
|
host: {
|
|
475
493
|
"[class]": "hostClasses()",
|
|
476
494
|
"(keydown.escape)": "onEscape($event)"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as hasNavigationCountBadge } from "./edsis-angular-navigation-navigation-badge-count.component-
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
1
|
+
import { i as hasNavigationCountBadge } from "./edsis-angular-navigation-navigation-badge-count.component-CLXtMyMX.mjs";
|
|
2
|
+
import { t as NavigationEntryGridComponent } from "./edsis-angular-navigation-navigation-entry-grid.component-BJgfe_dF.mjs";
|
|
3
|
+
import { a as navigationInteractiveStateClasses, n as navigationPanelId, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./edsis-angular-navigation-navigation-item.component-ByQVStr8.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 "@edsis/angular/component/utils/core";
|
|
@@ -29,7 +29,7 @@ var NavigationHorizontalComponent = class NavigationHorizontalComponent {
|
|
|
29
29
|
itemSelected = output();
|
|
30
30
|
isBorderRail = computed(() => this.typeStyle() === "border-rail", ...ngDevMode ? [{ debugName: "isBorderRail" }] : /* istanbul ignore next */ []);
|
|
31
31
|
isBottom = computed(() => this.position() === "bottom", ...ngDevMode ? [{ debugName: "isBottom" }] : /* istanbul ignore next */ []);
|
|
32
|
-
navItemClass = computed(() => cn(this.itemClass(), this.isBorderRail() && "rounded-none hover:bg-transparent hover:text-primary"), ...ngDevMode ? [{ debugName: "navItemClass" }] : /* istanbul ignore next */ []);
|
|
32
|
+
navItemClass = computed(() => cn(this.itemClass(), this.isBorderRail() && "rounded-none [&:not([aria-current=page]):hover]:bg-transparent [&:not([aria-current=page]):hover]:text-primary"), ...ngDevMode ? [{ debugName: "navItemClass" }] : /* istanbul ignore next */ []);
|
|
33
33
|
listClasses = computed(() => cn("flex h-full min-w-0 items-center justify-center gap-1 list-none p-0"), ...ngDevMode ? [{ debugName: "listClasses" }] : /* istanbul ignore next */ []);
|
|
34
34
|
openPanelKey = computed(() => this.nav.currentPanelKey(this.navId()), ...ngDevMode ? [{ debugName: "openPanelKey" }] : /* istanbul ignore next */ []);
|
|
35
35
|
itemState = computed(() => {
|
|
@@ -108,7 +108,7 @@ var NavigationHorizontalComponent = class NavigationHorizontalComponent {
|
|
|
108
108
|
return this.itemState().get(item)?.triggerClasses ?? "";
|
|
109
109
|
}
|
|
110
110
|
computeTriggerClasses(item, active, open) {
|
|
111
|
-
return cn("nav-trigger nav-text group/nav inline-flex min-w-0 items-center gap-(--nav-item-gap) rounded-md transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", "h-(--nav-item-height) px-(--nav-item-padding-x)", this.compact() && "size-(--nav-rail-item-size) justify-center gap-0 px-0", this.isBorderRail() ? open
|
|
111
|
+
return cn("nav-trigger nav-text group/nav inline-flex min-w-0 items-center gap-(--nav-item-gap) rounded-md transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", "h-(--nav-item-height) px-(--nav-item-padding-x)", this.compact() && "size-(--nav-rail-item-size) justify-center gap-0 px-0", active ? navigationInteractiveStateClasses(true, "horizontal", this.compact(), item.children.length > 0, false, false) : this.isBorderRail() ? open ? "rounded-none text-primary" : "rounded-none text-foreground/80 hover:text-primary" : "text-foreground/80 hover:bg-accent hover:text-accent-foreground", item.classes?.wrapper, this.itemClass());
|
|
112
112
|
}
|
|
113
113
|
panelClasses() {
|
|
114
114
|
return cn("absolute z-50 bg-popover text-popover-foreground shadow-lg", "max-h-[calc(100dvh-5rem)] overflow-x-hidden overflow-y-auto overscroll-contain", this.isBottom() ? "bottom-full" : "top-full", !this.panelPlacement() && "inset-x-0", this.isBorderRail() ? "rounded-none border-y border-border" : cn("rounded-xl border border-[hsl(var(--border)/var(--section-border-opacity))]", this.isBottom() ? "rounded-b-none" : "rounded-t-none"));
|
|
@@ -158,7 +158,7 @@ var NavigationHorizontalComponent = class NavigationHorizontalComponent {
|
|
|
158
158
|
}
|
|
159
159
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
160
160
|
minVersion: "12.0.0",
|
|
161
|
-
version: "22.2.
|
|
161
|
+
version: "22.2.6",
|
|
162
162
|
ngImport: i0,
|
|
163
163
|
type: NavigationHorizontalComponent,
|
|
164
164
|
deps: [],
|
|
@@ -166,7 +166,7 @@ var NavigationHorizontalComponent = class NavigationHorizontalComponent {
|
|
|
166
166
|
});
|
|
167
167
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
168
168
|
minVersion: "17.0.0",
|
|
169
|
-
version: "22.2.
|
|
169
|
+
version: "22.2.6",
|
|
170
170
|
type: NavigationHorizontalComponent,
|
|
171
171
|
isStandalone: true,
|
|
172
172
|
selector: "NavigationHorizontal",
|
|
@@ -421,6 +421,8 @@ var NavigationHorizontalComponent = class NavigationHorizontalComponent {
|
|
|
421
421
|
"iconTemplate",
|
|
422
422
|
"tooltip-position",
|
|
423
423
|
"collapseTree",
|
|
424
|
+
"rail",
|
|
425
|
+
"railSegment",
|
|
424
426
|
"straightRail",
|
|
425
427
|
"stairsRail",
|
|
426
428
|
"straightRailActive",
|
|
@@ -449,7 +451,7 @@ var NavigationHorizontalComponent = class NavigationHorizontalComponent {
|
|
|
449
451
|
};
|
|
450
452
|
i0.ɵɵngDeclareClassMetadata({
|
|
451
453
|
minVersion: "12.0.0",
|
|
452
|
-
version: "22.2.
|
|
454
|
+
version: "22.2.6",
|
|
453
455
|
ngImport: i0,
|
|
454
456
|
type: NavigationHorizontalComponent,
|
|
455
457
|
decorators: [{
|