@ojiepermana/angular 22.2.2 → 22.2.4
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/fesm2022/ojiepermana-angular-component-drawer.mjs +2 -1
- package/fesm2022/{ojiepermana-angular-navigation-navigation-dockbar-menu.component-CGfu2V6f.mjs → ojiepermana-angular-navigation-navigation-dockbar-menu.component-DC8rfxS5.mjs} +32 -4
- package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-zBCXDa4c.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-meQb_EWZ.mjs} +1 -1
- package/fesm2022/{ojiepermana-angular-navigation-navigation-flyout-menu.component-DYkYIIHd.mjs → ojiepermana-angular-navigation-navigation-flyout-menu.component-DRdw2G-c.mjs} +2 -2
- package/fesm2022/{ojiepermana-angular-navigation-navigation-horizontal.component-LNTertHr.mjs → ojiepermana-angular-navigation-navigation-horizontal.component-Bx1NcrWO.mjs} +2 -2
- package/fesm2022/{ojiepermana-angular-navigation-navigation-item.component-DiGOcizS.mjs → ojiepermana-angular-navigation-navigation-item.component-ERZNpmTZ.mjs} +2 -2
- package/fesm2022/{ojiepermana-angular-navigation-navigation-list.component-DB22Gl-5.mjs → ojiepermana-angular-navigation-navigation-list.component-D-oOKwHg.mjs} +4 -3
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +3 -2
- package/fesm2022/ojiepermana-angular-navigation.mjs +13 -15
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +152 -109
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +168 -77
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +3 -0
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +3 -0
- package/package.json +2 -2
- package/theme/component/settings/README.md +19 -0
- package/theme/layout/README.md +67 -0
- package/types/ojiepermana-angular-component-icon.d.ts +1 -15
- package/types/ojiepermana-angular-component-select.d.ts +0 -2
- package/types/ojiepermana-angular-navigation.d.ts +1 -3
- package/types/ojiepermana-angular-theme-component-settings.d.ts +18 -1
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +108 -11
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { SheetCloseDirective as DrawerCloseDirective, SheetComponent as DrawerComponent, SheetContentComponent as DrawerContentComponent, SheetDescriptionComponent as DrawerDescriptionComponent, SheetFooterComponent as DrawerFooterComponent, SheetHeaderComponent as DrawerHeaderComponent, SheetTitleComponent as DrawerTitleComponent } from "@ojiepermana/angular/component/sheet";
|
|
2
|
+
export { DrawerCloseDirective, DrawerComponent, DrawerContentComponent, DrawerDescriptionComponent, DrawerFooterComponent, DrawerHeaderComponent, DrawerTitleComponent };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
1
|
+
import { n as NAVIGATION_SHELL, t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-D-oOKwHg.mjs";
|
|
2
|
+
import { r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-ERZNpmTZ.mjs";
|
|
3
3
|
import { NavigationBadgeCountComponent } from "./ojiepermana-angular-navigation-navigation-badge-count.component-4RIokl1C.mjs";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
import { Component, ElementRef, Injector, afterNextRender, computed, inject, input, output, signal } from "@angular/core";
|
|
@@ -14,6 +14,8 @@ var NavigationDockbarMenuComponent = class NavigationDockbarMenuComponent {
|
|
|
14
14
|
nav = inject(NAVIGATION_ADAPTER);
|
|
15
15
|
host = inject(ElementRef);
|
|
16
16
|
injector = inject(Injector);
|
|
17
|
+
shell = inject(NAVIGATION_SHELL, { optional: true });
|
|
18
|
+
asideFooterInjector = this.createAsideFooterInjector();
|
|
17
19
|
navId = input("default", ...ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []);
|
|
18
20
|
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
19
21
|
railItems = input(null, ...ngDevMode ? [{ debugName: "railItems" }] : /* istanbul ignore next */ []);
|
|
@@ -154,6 +156,26 @@ var NavigationDockbarMenuComponent = class NavigationDockbarMenuComponent {
|
|
|
154
156
|
safeId(value) {
|
|
155
157
|
return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-") || "default";
|
|
156
158
|
}
|
|
159
|
+
createAsideFooterInjector() {
|
|
160
|
+
const shell = this.shell;
|
|
161
|
+
if (!shell) return this.injector;
|
|
162
|
+
const expanded = {
|
|
163
|
+
state: shell.state,
|
|
164
|
+
displayState: computed(() => ({
|
|
165
|
+
...shell.displayState(),
|
|
166
|
+
collapsed: false
|
|
167
|
+
})),
|
|
168
|
+
collapseEnabled: shell.collapseEnabled,
|
|
169
|
+
toggleCollapsed: () => shell.toggleCollapsed()
|
|
170
|
+
};
|
|
171
|
+
return Injector.create({
|
|
172
|
+
providers: [{
|
|
173
|
+
provide: NAVIGATION_SHELL,
|
|
174
|
+
useValue: expanded
|
|
175
|
+
}],
|
|
176
|
+
parent: this.injector
|
|
177
|
+
});
|
|
178
|
+
}
|
|
157
179
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
158
180
|
minVersion: "12.0.0",
|
|
159
181
|
version: "22.2.3",
|
|
@@ -417,7 +439,10 @@ var NavigationDockbarMenuComponent = class NavigationDockbarMenuComponent {
|
|
|
417
439
|
class="flex h-(--layout-topbar-height) shrink-0 items-center gap-3 border-t border-[hsl(var(--border)/var(--section-border-opacity))] px-3"
|
|
418
440
|
data-navigation-dockbar-aside-footer="true"
|
|
419
441
|
>
|
|
420
|
-
<ng-container
|
|
442
|
+
<ng-container
|
|
443
|
+
[ngTemplateOutlet]="asideFooter"
|
|
444
|
+
[ngTemplateOutletInjector]="asideFooterInjector"
|
|
445
|
+
/>
|
|
421
446
|
</footer>
|
|
422
447
|
}
|
|
423
448
|
</aside>
|
|
@@ -685,7 +710,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
685
710
|
class="flex h-(--layout-topbar-height) shrink-0 items-center gap-3 border-t border-[hsl(var(--border)/var(--section-border-opacity))] px-3"
|
|
686
711
|
data-navigation-dockbar-aside-footer="true"
|
|
687
712
|
>
|
|
688
|
-
<ng-container
|
|
713
|
+
<ng-container
|
|
714
|
+
[ngTemplateOutlet]="asideFooter"
|
|
715
|
+
[ngTemplateOutletInjector]="asideFooterInjector"
|
|
716
|
+
/>
|
|
689
717
|
</footer>
|
|
690
718
|
}
|
|
691
719
|
</aside>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as navigationPanelId, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-
|
|
1
|
+
import { n as navigationPanelId, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-ERZNpmTZ.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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-
|
|
2
|
-
import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-
|
|
1
|
+
import { r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-ERZNpmTZ.mjs";
|
|
2
|
+
import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-meQb_EWZ.mjs";
|
|
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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as navigationPanelId, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-
|
|
2
|
-
import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-
|
|
1
|
+
import { n as navigationPanelId, r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-ERZNpmTZ.mjs";
|
|
2
|
+
import { t as NavigationEntryGridComponent } from "./ojiepermana-angular-navigation-navigation-entry-grid.component-meQb_EWZ.mjs";
|
|
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";
|
|
@@ -360,7 +360,7 @@ var NavigationItemComponent = class NavigationItemComponent {
|
|
|
360
360
|
}
|
|
361
361
|
interactiveStateClasses(active) {
|
|
362
362
|
const showsNestedActiveConnector = active && this.orientation() === "vertical" && !this.compact() && this.stairsRail();
|
|
363
|
-
if (this.orientation() === "vertical" && !this.compact()) return cn("relative isolate", "before:pointer-events-none before:absolute before:inset-y-0 before:left-2 before:right-2 before:-z-10 before:rounded-md before:border before:border-transparent before:bg-transparent before:transition-colors before:duration-normal before:content-['']", showsNestedActiveConnector && "after:pointer-events-none after:absolute after:-left-[calc(var(--nav-indent)-var(--nav-rail-offset))] after:top-1/2 after:-z-10 after:h-px after:w-[calc(var(--nav-indent)-var(--nav-rail-offset))] after:-translate-y-1/2 after:rounded-full after:bg-current/25 after:content-['']", active ? "text-foreground before:bg-accent" : "text-foreground/80 hover:text-accent-foreground hover:before:bg-accent");
|
|
363
|
+
if (this.orientation() === "vertical" && !this.compact()) return cn("relative isolate", "before:pointer-events-none before:absolute before:inset-y-0 before:left-2 before:right-2 before:-z-10 before:rounded-md before:border before:border-transparent before:bg-transparent before:transition-colors before:duration-normal before:content-['']", showsNestedActiveConnector && "after:pointer-events-none after:absolute after:-left-[calc(var(--nav-indent)-var(--nav-rail-offset))] after:top-1/2 after:-z-10 after:h-px after:w-[calc(var(--nav-indent)-var(--nav-rail-offset)+var(--spacing-base)*2)] after:-translate-y-1/2 after:rounded-full after:bg-current/25 after:content-['']", active ? "text-foreground before:bg-accent" : "text-foreground/80 hover:text-accent-foreground hover:before:bg-accent");
|
|
364
364
|
return active ? "text-foreground bg-accent" : "text-foreground/80 hover:bg-accent hover:text-accent-foreground";
|
|
365
365
|
}
|
|
366
366
|
chevronClasses() {
|
|
@@ -381,7 +381,7 @@ var NavigationItemComponent = class NavigationItemComponent {
|
|
|
381
381
|
childListClasses() {
|
|
382
382
|
const isGroupedBranch = this.item().type === "group" || this.item().type === "mega";
|
|
383
383
|
const usesStairsTree = this.collapseTree() === "stairs";
|
|
384
|
-
return cn("flex list-none flex-col gap-0.5 p-0", !this.compact() && "mt-0.5", this.level() >= 0 && !this.compact() && !isGroupedBranch && usesStairsTree && cn("relative ml-(--nav-rail-offset) pl-[calc(var(--nav-indent)-var(--nav-rail-offset))] before:absolute before:-top-
|
|
384
|
+
return cn("flex list-none flex-col gap-0.5 p-0", !this.compact() && "mt-0.5", this.level() >= 0 && !this.compact() && !isGroupedBranch && usesStairsTree && cn("relative ml-(--nav-rail-offset) pl-[calc(var(--nav-indent)-var(--nav-rail-offset))] before:absolute before:-top-0.5 before:bottom-0 before:left-0 before:w-px before:-translate-x-1/2 before:rounded-full before:content-['']", this.isActive() ? "before:bg-current/25" : "before:bg-border"));
|
|
385
385
|
}
|
|
386
386
|
showsStairsRailForChildren() {
|
|
387
387
|
return !this.compact() && this.collapseTree() === "stairs" && this.item().type !== "group" && this.item().type !== "mega";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-
|
|
1
|
+
import { t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-ERZNpmTZ.mjs";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
import { Component, computed, input, output } from "@angular/core";
|
|
3
|
+
import { Component, InjectionToken, computed, input, output } from "@angular/core";
|
|
4
4
|
import { cn } from "@ojiepermana/angular/component/utils/core";
|
|
5
|
+
const NAVIGATION_SHELL = new InjectionToken("NAVIGATION_SHELL");
|
|
5
6
|
var NavigationListComponent = class NavigationListComponent {
|
|
6
7
|
navId = input("default", ...ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []);
|
|
7
8
|
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
@@ -324,4 +325,4 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
324
325
|
}]
|
|
325
326
|
}
|
|
326
327
|
});
|
|
327
|
-
export { NavigationListComponent as t };
|
|
328
|
+
export { NAVIGATION_SHELL as n, NavigationListComponent as t };
|
|
@@ -443,8 +443,9 @@ var NavigationService = class NavigationService {
|
|
|
443
443
|
}
|
|
444
444
|
activeMatch(explicitActiveUrl, relativeTo) {
|
|
445
445
|
const cachedUrl = this.routerUrl();
|
|
446
|
-
const
|
|
447
|
-
|
|
446
|
+
const currentUrl = this.router?.navigated ? this.router.url : cachedUrl;
|
|
447
|
+
const activeUrl = explicitActiveUrl ?? currentUrl;
|
|
448
|
+
return this.urlResolver.match(activeUrl, currentUrl, relativeTo);
|
|
448
449
|
}
|
|
449
450
|
isPanelOpen(navIdOrItem, item) {
|
|
450
451
|
const { navId, navItem } = this.resolvePanelArgs("isPanelOpen", navIdOrItem, item);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-
|
|
1
|
+
import { n as NAVIGATION_SHELL, t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-D-oOKwHg.mjs";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
import { Component, DestroyRef, Directive, ElementRef,
|
|
3
|
+
import { Component, DestroyRef, Directive, ElementRef, Injector, TemplateRef, ViewContainerRef, afterNextRender, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, isDevMode, model, output, signal } from "@angular/core";
|
|
4
4
|
import { ActivatedRoute } from "@angular/router";
|
|
5
5
|
import { cn } from "@ojiepermana/angular/component/utils/core";
|
|
6
6
|
import { NavigationIconDirective, NavigationIconDirective as NavigationIconDirective$1 } from "@ojiepermana/angular/navigation/icon";
|
|
7
7
|
import { NAVIGATION_ADAPTER, NAVIGATION_ROUTE_CONTEXT_ADAPTER } from "@ojiepermana/angular/navigation/core";
|
|
8
8
|
import { NAVIGATION_DOCKBAR_FALLBACK_ICON, NAVIGATION_DOCKBAR_FALLBACK_ICON as NAVIGATION_DOCKBAR_FALLBACK_ICON$1, formatNavigationBadgeCount, normalizeUiNavItems, normalizeUiNavItems as normalizeUiNavItems$1, toMinidockItems, ɵassertMinidockItems, ɵcompactNavigationDividers } from "@ojiepermana/angular/navigation/types";
|
|
9
9
|
import { NgTemplateOutlet } from "@angular/common";
|
|
10
|
-
import {
|
|
10
|
+
import { LucideCircle, LucideCircleDot, LucideRoute } from "@lucide/angular";
|
|
11
11
|
import { IconComponent, provideIcons } from "@ojiepermana/angular/component/icon";
|
|
12
12
|
import { TooltipDirective } from "@ojiepermana/angular/component/tooltip";
|
|
13
13
|
export * from "@ojiepermana/angular/navigation/core";
|
|
@@ -61,7 +61,6 @@ function fallbackType(orientation, type) {
|
|
|
61
61
|
if (orientation === "horizontal" && (type === "navbar" || type === "flyout")) return type;
|
|
62
62
|
return orientation === "horizontal" ? "navbar" : "sidebar";
|
|
63
63
|
}
|
|
64
|
-
const NAVIGATION_SHELL = new InjectionToken("NAVIGATION_SHELL");
|
|
65
64
|
const EMPTY_NAVIGATION_BADGE_CONTEXT$1 = Object.freeze({});
|
|
66
65
|
const EMPTY_NAVIGATION_ACTIVE_IDS = /* @__PURE__ */ new Set();
|
|
67
66
|
var NavigationContainerComponent = class NavigationContainerComponent {
|
|
@@ -762,9 +761,9 @@ var NavigationContentComponent = class NavigationContentComponent {
|
|
|
762
761
|
outputs: ["openedIdsChange", "itemSelected"]
|
|
763
762
|
}],
|
|
764
763
|
deferBlockDependencies: [
|
|
765
|
-
() => [import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-
|
|
766
|
-
() => [import("./ojiepermana-angular-navigation-navigation-horizontal.component-
|
|
767
|
-
() => [import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-
|
|
764
|
+
() => [import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-DRdw2G-c.mjs").then((m) => m.NavigationFlyoutMenuComponent)],
|
|
765
|
+
() => [import("./ojiepermana-angular-navigation-navigation-horizontal.component-Bx1NcrWO.mjs").then((m) => m.NavigationHorizontalComponent)],
|
|
766
|
+
() => [import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-DC8rfxS5.mjs").then((m) => m.NavigationDockbarMenuComponent)]
|
|
768
767
|
]
|
|
769
768
|
});
|
|
770
769
|
};
|
|
@@ -774,9 +773,9 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
774
773
|
ngImport: i0,
|
|
775
774
|
type: NavigationContentComponent,
|
|
776
775
|
resolveDeferredDeps: () => [
|
|
777
|
-
import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-
|
|
778
|
-
import("./ojiepermana-angular-navigation-navigation-horizontal.component-
|
|
779
|
-
import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-
|
|
776
|
+
import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-DRdw2G-c.mjs").then((m) => m.NavigationFlyoutMenuComponent),
|
|
777
|
+
import("./ojiepermana-angular-navigation-navigation-horizontal.component-Bx1NcrWO.mjs").then((m) => m.NavigationHorizontalComponent),
|
|
778
|
+
import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-DC8rfxS5.mjs").then((m) => m.NavigationDockbarMenuComponent)
|
|
780
779
|
],
|
|
781
780
|
resolveMetadata: (NavigationFlyoutMenuComponent, NavigationHorizontalComponent, NavigationDockbarMenuComponent) => ({
|
|
782
781
|
decorators: [{
|
|
@@ -1005,7 +1004,6 @@ var NavigationHeaderComponent = class NavigationHeaderComponent {
|
|
|
1005
1004
|
return this.toggle() || this.shell.collapseEnabled();
|
|
1006
1005
|
}, ...ngDevMode ? [{ debugName: "showToggle" }] : /* istanbul ignore next */ []);
|
|
1007
1006
|
toggleAriaLabel = computed(() => this.collapsed() ? "Expand navigation" : "Collapse navigation", ...ngDevMode ? [{ debugName: "toggleAriaLabel" }] : /* istanbul ignore next */ []);
|
|
1008
|
-
toggleIconName = computed(() => this.collapsed() ? "panel-left-open" : "panel-left-close", ...ngDevMode ? [{ debugName: "toggleIconName" }] : /* istanbul ignore next */ []);
|
|
1009
1007
|
rowClasses = computed(() => cn("flex h-full items-center", !this.isHorizontal() && this.displayCollapsed() ? "justify-center" : "gap-3 px-3"), ...ngDevMode ? [{ debugName: "rowClasses" }] : /* istanbul ignore next */ []);
|
|
1010
1008
|
contentClasses = computed(() => {
|
|
1011
1009
|
if (this.isHorizontal()) return "flex min-w-0 items-center gap-3";
|
|
@@ -1049,7 +1047,7 @@ var NavigationHeaderComponent = class NavigationHeaderComponent {
|
|
|
1049
1047
|
"class": "hostClasses()",
|
|
1050
1048
|
"attr.data-collapsed": "displayCollapsed()"
|
|
1051
1049
|
} },
|
|
1052
|
-
providers: [provideIcons(
|
|
1050
|
+
providers: [provideIcons(LucideCircle, LucideCircleDot)],
|
|
1053
1051
|
ngImport: i0,
|
|
1054
1052
|
template: `
|
|
1055
1053
|
<div [class]="rowClasses()">
|
|
@@ -1068,7 +1066,7 @@ var NavigationHeaderComponent = class NavigationHeaderComponent {
|
|
|
1068
1066
|
>
|
|
1069
1067
|
<Icon
|
|
1070
1068
|
data-navigation-header-toggle-icon="true"
|
|
1071
|
-
[name]="
|
|
1069
|
+
[name]="collapsed() ? 'circle' : 'circle-dot'"
|
|
1072
1070
|
size="inherit"
|
|
1073
1071
|
class="text-(length:--nav-icon-size)"
|
|
1074
1072
|
/>
|
|
@@ -1101,7 +1099,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1101
1099
|
args: [{
|
|
1102
1100
|
selector: "NavigationHeader",
|
|
1103
1101
|
imports: [IconComponent],
|
|
1104
|
-
providers: [provideIcons(
|
|
1102
|
+
providers: [provideIcons(LucideCircle, LucideCircleDot)],
|
|
1105
1103
|
host: {
|
|
1106
1104
|
"[class]": "hostClasses()",
|
|
1107
1105
|
"[attr.data-collapsed]": "displayCollapsed()"
|
|
@@ -1123,7 +1121,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1123
1121
|
>
|
|
1124
1122
|
<Icon
|
|
1125
1123
|
data-navigation-header-toggle-icon="true"
|
|
1126
|
-
[name]="
|
|
1124
|
+
[name]="collapsed() ? 'circle' : 'circle-dot'"
|
|
1127
1125
|
size="inherit"
|
|
1128
1126
|
class="text-(length:--nav-icon-size)"
|
|
1129
1127
|
/>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { Component, InjectionToken, PLATFORM_ID, Service, computed, effect, inject, input, model, signal } from "@angular/core";
|
|
2
|
+
import { Component, InjectionToken, PLATFORM_ID, Service, booleanAttribute, computed, effect, inject, input, model, signal } from "@angular/core";
|
|
3
3
|
import { LucideAppWindow, LucideAppWindowMac, LucideBot, LucideBraces, LucideChevronsLeft, LucideCircle, LucideColumns3, LucideCpu, LucideDropletOff, LucideEarth, LucideExternalLink, LucideGalleryVertical, LucideGlobe, LucideGrid3x3, LucideHexagon, LucideLaptop, LucideLaptopMinimal, LucideLayoutGrid, LucideMaximize, LucideMenu, LucideMinimize, LucideMonitor, LucideMoon, LucideMoveHorizontal, LucidePalette, LucidePanelLeft, LucidePanelLeftClose, LucidePanelLeftDashed, LucidePanelLeftOpen, LucidePanelRight, LucideRatio, LucideRows2, LucideRows3, LucideRows4, LucideScan, LucideSlidersHorizontal, LucideSmartphone, LucideSquare, LucideSquareRoundCorner, LucideStretchHorizontal, LucideSun, LucideTablet, LucideTerminal, LucideUnfoldHorizontal } from "@lucide/angular";
|
|
4
4
|
import { DrawerCloseDirective, DrawerComponent, DrawerContentComponent, DrawerHeaderComponent, DrawerTitleComponent } from "@ojiepermana/angular/component/drawer";
|
|
5
5
|
import { IconComponent, provideIcons } from "@ojiepermana/angular/component/icon";
|
|
@@ -1187,6 +1187,8 @@ var ThemeSettingsThemeSectionComponent = class ThemeSettingsThemeSectionComponen
|
|
|
1187
1187
|
neutralLabelId = injectUniqueId("theme-settings-neutral");
|
|
1188
1188
|
spaceLabelId = injectUniqueId("theme-settings-space");
|
|
1189
1189
|
radiusLabelId = injectUniqueId("theme-settings-radius");
|
|
1190
|
+
accentGroupName = injectUniqueId("theme-settings-accent-group");
|
|
1191
|
+
neutralGroupName = injectUniqueId("theme-settings-neutral-group");
|
|
1190
1192
|
swatchClasses(active) {
|
|
1191
1193
|
return cn("inline-flex size-[18px] rounded-full ring-1 ring-black/10 transition-[transform,box-shadow] duration-normal peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background motion-reduce:transition-none", active ? "ring-2 ring-ring ring-offset-2 ring-offset-background shadow-sm" : "hover:scale-105");
|
|
1192
1194
|
}
|
|
@@ -1266,7 +1268,7 @@ var ThemeSettingsThemeSectionComponent = class ThemeSettingsThemeSectionComponen
|
|
|
1266
1268
|
><input
|
|
1267
1269
|
class="peer sr-only"
|
|
1268
1270
|
type="radio"
|
|
1269
|
-
name="
|
|
1271
|
+
[name]="accentGroupName"
|
|
1270
1272
|
[value]="accent"
|
|
1271
1273
|
[checked]="color() === accent"
|
|
1272
1274
|
(change)="setColor(accent)"
|
|
@@ -1288,7 +1290,7 @@ var ThemeSettingsThemeSectionComponent = class ThemeSettingsThemeSectionComponen
|
|
|
1288
1290
|
><input
|
|
1289
1291
|
class="peer sr-only"
|
|
1290
1292
|
type="radio"
|
|
1291
|
-
name="
|
|
1293
|
+
[name]="neutralGroupName"
|
|
1292
1294
|
[value]="neutral"
|
|
1293
1295
|
[checked]="neutralColor() === neutral"
|
|
1294
1296
|
(change)="setNeutral(neutral)"
|
|
@@ -1393,7 +1395,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1393
1395
|
><input
|
|
1394
1396
|
class="peer sr-only"
|
|
1395
1397
|
type="radio"
|
|
1396
|
-
name="
|
|
1398
|
+
[name]="accentGroupName"
|
|
1397
1399
|
[value]="accent"
|
|
1398
1400
|
[checked]="color() === accent"
|
|
1399
1401
|
(change)="setColor(accent)"
|
|
@@ -1415,7 +1417,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1415
1417
|
><input
|
|
1416
1418
|
class="peer sr-only"
|
|
1417
1419
|
type="radio"
|
|
1418
|
-
name="
|
|
1420
|
+
[name]="neutralGroupName"
|
|
1419
1421
|
[value]="neutral"
|
|
1420
1422
|
[checked]="neutralColor() === neutral"
|
|
1421
1423
|
(change)="setNeutral(neutral)"
|
|
@@ -1458,6 +1460,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1458
1460
|
var ThemeSettingsComponent = class ThemeSettingsComponent {
|
|
1459
1461
|
settings = inject(THEME_SETTINGS_ADAPTER, { optional: true });
|
|
1460
1462
|
open = model(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
|
|
1463
|
+
inline = input(false, {
|
|
1464
|
+
...ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {},
|
|
1465
|
+
transform: booleanAttribute
|
|
1466
|
+
});
|
|
1461
1467
|
trigger = input("button", ...ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []);
|
|
1462
1468
|
triggerLabel = input("Theme settings", ...ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []);
|
|
1463
1469
|
triggerIconOnly = input(false, {
|
|
@@ -1496,6 +1502,13 @@ var ThemeSettingsComponent = class ThemeSettingsComponent {
|
|
|
1496
1502
|
isRequired: false,
|
|
1497
1503
|
transformFunction: null
|
|
1498
1504
|
},
|
|
1505
|
+
inline: {
|
|
1506
|
+
classPropertyName: "inline",
|
|
1507
|
+
publicName: "inline",
|
|
1508
|
+
isSignal: true,
|
|
1509
|
+
isRequired: false,
|
|
1510
|
+
transformFunction: null
|
|
1511
|
+
},
|
|
1499
1512
|
trigger: {
|
|
1500
1513
|
classPropertyName: "trigger",
|
|
1501
1514
|
publicName: "trigger",
|
|
@@ -1544,63 +1557,74 @@ var ThemeSettingsComponent = class ThemeSettingsComponent {
|
|
|
1544
1557
|
providers: [provideIcons(LucidePalette)],
|
|
1545
1558
|
ngImport: i0,
|
|
1546
1559
|
template: `
|
|
1547
|
-
@if (
|
|
1548
|
-
<
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
[attr.aria-expanded]="open()"
|
|
1555
|
-
(click)="open.set(true)"
|
|
1556
|
-
>
|
|
1557
|
-
<Icon name="palette" [size]="18" />
|
|
1558
|
-
@if (triggerIconOnly()) {
|
|
1559
|
-
<span class="sr-only">{{ triggerLabel() }}</span>
|
|
1560
|
-
} @else {
|
|
1561
|
-
<span>{{ triggerLabel() }}</span>
|
|
1560
|
+
@if (inline()) {
|
|
1561
|
+
<div data-theme-settings-inline class="flex flex-col gap-8">
|
|
1562
|
+
<ThemeSettingsThemeSection />
|
|
1563
|
+
<ThemeSettingsShellSection />
|
|
1564
|
+
@if (settings) {
|
|
1565
|
+
<ThemeSettingsLayoutSection />
|
|
1566
|
+
<ThemeSettingsNavigationSection />
|
|
1562
1567
|
}
|
|
1563
|
-
</
|
|
1564
|
-
}
|
|
1568
|
+
</div>
|
|
1569
|
+
} @else {
|
|
1570
|
+
@if (showTrigger()) {
|
|
1571
|
+
<button
|
|
1572
|
+
type="button"
|
|
1573
|
+
[class]="triggerClasses()"
|
|
1574
|
+
[attr.aria-label]="triggerIconOnly() ? triggerLabel() : null"
|
|
1575
|
+
[attr.title]="triggerIconOnly() ? triggerLabel() : null"
|
|
1576
|
+
aria-haspopup="dialog"
|
|
1577
|
+
[attr.aria-expanded]="open()"
|
|
1578
|
+
(click)="open.set(true)"
|
|
1579
|
+
>
|
|
1580
|
+
<Icon name="palette" [size]="18" />
|
|
1581
|
+
@if (triggerIconOnly()) {
|
|
1582
|
+
<span class="sr-only">{{ triggerLabel() }}</span>
|
|
1583
|
+
} @else {
|
|
1584
|
+
<span>{{ triggerLabel() }}</span>
|
|
1585
|
+
}
|
|
1586
|
+
</button>
|
|
1587
|
+
}
|
|
1565
1588
|
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
>
|
|
1573
|
-
<DrawerHeader
|
|
1574
|
-
class="flex h-(--layout-topbar-height) shrink-0 flex-row items-center gap-3 border-b border-border bg-background px-3 text-left"
|
|
1589
|
+
@if (open()) {
|
|
1590
|
+
<Drawer
|
|
1591
|
+
[(open)]="open"
|
|
1592
|
+
[side]="side()"
|
|
1593
|
+
[showCloseButton]="false"
|
|
1594
|
+
class="ThemeSettings w-full max-w-md gap-0! p-0! sm:w-100"
|
|
1575
1595
|
>
|
|
1576
|
-
<
|
|
1577
|
-
|
|
1578
|
-
class="grid size-8 shrink-0 place-items-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/20"
|
|
1579
|
-
><Icon name="palette" [size]="18"
|
|
1580
|
-
/></span>
|
|
1581
|
-
<div class="min-w-0 flex-1">
|
|
1582
|
-
<DrawerTitle>Theme settings</DrawerTitle>
|
|
1583
|
-
</div>
|
|
1584
|
-
<button
|
|
1585
|
-
type="button"
|
|
1586
|
-
DrawerClose
|
|
1587
|
-
class="inline-flex h-8 shrink-0 items-center rounded-md bg-primary px-2 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background motion-reduce:transition-none"
|
|
1596
|
+
<DrawerHeader
|
|
1597
|
+
class="flex h-(--layout-topbar-height) shrink-0 flex-row items-center gap-3 border-b border-border bg-background px-3 text-left"
|
|
1588
1598
|
>
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1599
|
+
<span
|
|
1600
|
+
aria-hidden="true"
|
|
1601
|
+
class="grid size-8 shrink-0 place-items-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/20"
|
|
1602
|
+
><Icon name="palette" [size]="18"
|
|
1603
|
+
/></span>
|
|
1604
|
+
<div class="min-w-0 flex-1">
|
|
1605
|
+
<DrawerTitle>Theme settings</DrawerTitle>
|
|
1606
|
+
</div>
|
|
1607
|
+
<button
|
|
1608
|
+
type="button"
|
|
1609
|
+
DrawerClose
|
|
1610
|
+
class="inline-flex h-8 shrink-0 items-center rounded-md bg-primary px-2 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background motion-reduce:transition-none"
|
|
1611
|
+
>
|
|
1612
|
+
Done
|
|
1613
|
+
</button>
|
|
1614
|
+
</DrawerHeader>
|
|
1592
1615
|
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1616
|
+
<DrawerContent class="min-h-0 px-4 py-5 sm:px-5">
|
|
1617
|
+
<div class="flex flex-col gap-8">
|
|
1618
|
+
<ThemeSettingsThemeSection />
|
|
1619
|
+
<ThemeSettingsShellSection />
|
|
1620
|
+
@if (settings) {
|
|
1621
|
+
<ThemeSettingsLayoutSection />
|
|
1622
|
+
<ThemeSettingsNavigationSection />
|
|
1623
|
+
}
|
|
1624
|
+
</div>
|
|
1625
|
+
</DrawerContent>
|
|
1626
|
+
</Drawer>
|
|
1627
|
+
}
|
|
1604
1628
|
}
|
|
1605
1629
|
`,
|
|
1606
1630
|
isInline: true,
|
|
@@ -1708,63 +1732,74 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1708
1732
|
],
|
|
1709
1733
|
host: { class: "contents" },
|
|
1710
1734
|
template: `
|
|
1711
|
-
@if (
|
|
1712
|
-
<
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
[attr.aria-expanded]="open()"
|
|
1719
|
-
(click)="open.set(true)"
|
|
1720
|
-
>
|
|
1721
|
-
<Icon name="palette" [size]="18" />
|
|
1722
|
-
@if (triggerIconOnly()) {
|
|
1723
|
-
<span class="sr-only">{{ triggerLabel() }}</span>
|
|
1724
|
-
} @else {
|
|
1725
|
-
<span>{{ triggerLabel() }}</span>
|
|
1735
|
+
@if (inline()) {
|
|
1736
|
+
<div data-theme-settings-inline class="flex flex-col gap-8">
|
|
1737
|
+
<ThemeSettingsThemeSection />
|
|
1738
|
+
<ThemeSettingsShellSection />
|
|
1739
|
+
@if (settings) {
|
|
1740
|
+
<ThemeSettingsLayoutSection />
|
|
1741
|
+
<ThemeSettingsNavigationSection />
|
|
1726
1742
|
}
|
|
1727
|
-
</
|
|
1728
|
-
}
|
|
1743
|
+
</div>
|
|
1744
|
+
} @else {
|
|
1745
|
+
@if (showTrigger()) {
|
|
1746
|
+
<button
|
|
1747
|
+
type="button"
|
|
1748
|
+
[class]="triggerClasses()"
|
|
1749
|
+
[attr.aria-label]="triggerIconOnly() ? triggerLabel() : null"
|
|
1750
|
+
[attr.title]="triggerIconOnly() ? triggerLabel() : null"
|
|
1751
|
+
aria-haspopup="dialog"
|
|
1752
|
+
[attr.aria-expanded]="open()"
|
|
1753
|
+
(click)="open.set(true)"
|
|
1754
|
+
>
|
|
1755
|
+
<Icon name="palette" [size]="18" />
|
|
1756
|
+
@if (triggerIconOnly()) {
|
|
1757
|
+
<span class="sr-only">{{ triggerLabel() }}</span>
|
|
1758
|
+
} @else {
|
|
1759
|
+
<span>{{ triggerLabel() }}</span>
|
|
1760
|
+
}
|
|
1761
|
+
</button>
|
|
1762
|
+
}
|
|
1729
1763
|
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
>
|
|
1737
|
-
<DrawerHeader
|
|
1738
|
-
class="flex h-(--layout-topbar-height) shrink-0 flex-row items-center gap-3 border-b border-border bg-background px-3 text-left"
|
|
1764
|
+
@if (open()) {
|
|
1765
|
+
<Drawer
|
|
1766
|
+
[(open)]="open"
|
|
1767
|
+
[side]="side()"
|
|
1768
|
+
[showCloseButton]="false"
|
|
1769
|
+
class="ThemeSettings w-full max-w-md gap-0! p-0! sm:w-100"
|
|
1739
1770
|
>
|
|
1740
|
-
<
|
|
1741
|
-
|
|
1742
|
-
class="grid size-8 shrink-0 place-items-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/20"
|
|
1743
|
-
><Icon name="palette" [size]="18"
|
|
1744
|
-
/></span>
|
|
1745
|
-
<div class="min-w-0 flex-1">
|
|
1746
|
-
<DrawerTitle>Theme settings</DrawerTitle>
|
|
1747
|
-
</div>
|
|
1748
|
-
<button
|
|
1749
|
-
type="button"
|
|
1750
|
-
DrawerClose
|
|
1751
|
-
class="inline-flex h-8 shrink-0 items-center rounded-md bg-primary px-2 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background motion-reduce:transition-none"
|
|
1771
|
+
<DrawerHeader
|
|
1772
|
+
class="flex h-(--layout-topbar-height) shrink-0 flex-row items-center gap-3 border-b border-border bg-background px-3 text-left"
|
|
1752
1773
|
>
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1774
|
+
<span
|
|
1775
|
+
aria-hidden="true"
|
|
1776
|
+
class="grid size-8 shrink-0 place-items-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/20"
|
|
1777
|
+
><Icon name="palette" [size]="18"
|
|
1778
|
+
/></span>
|
|
1779
|
+
<div class="min-w-0 flex-1">
|
|
1780
|
+
<DrawerTitle>Theme settings</DrawerTitle>
|
|
1781
|
+
</div>
|
|
1782
|
+
<button
|
|
1783
|
+
type="button"
|
|
1784
|
+
DrawerClose
|
|
1785
|
+
class="inline-flex h-8 shrink-0 items-center rounded-md bg-primary px-2 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background motion-reduce:transition-none"
|
|
1786
|
+
>
|
|
1787
|
+
Done
|
|
1788
|
+
</button>
|
|
1789
|
+
</DrawerHeader>
|
|
1756
1790
|
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1791
|
+
<DrawerContent class="min-h-0 px-4 py-5 sm:px-5">
|
|
1792
|
+
<div class="flex flex-col gap-8">
|
|
1793
|
+
<ThemeSettingsThemeSection />
|
|
1794
|
+
<ThemeSettingsShellSection />
|
|
1795
|
+
@if (settings) {
|
|
1796
|
+
<ThemeSettingsLayoutSection />
|
|
1797
|
+
<ThemeSettingsNavigationSection />
|
|
1798
|
+
}
|
|
1799
|
+
</div>
|
|
1800
|
+
</DrawerContent>
|
|
1801
|
+
</Drawer>
|
|
1802
|
+
}
|
|
1768
1803
|
}
|
|
1769
1804
|
`
|
|
1770
1805
|
}]
|
|
@@ -1781,6 +1816,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1781
1816
|
type: i0.Output,
|
|
1782
1817
|
args: ["openChange"]
|
|
1783
1818
|
}],
|
|
1819
|
+
inline: [{
|
|
1820
|
+
type: i0.Input,
|
|
1821
|
+
args: [{
|
|
1822
|
+
isSignal: true,
|
|
1823
|
+
alias: "inline",
|
|
1824
|
+
required: false
|
|
1825
|
+
}]
|
|
1826
|
+
}],
|
|
1784
1827
|
trigger: [{
|
|
1785
1828
|
type: i0.Input,
|
|
1786
1829
|
args: [{
|