@ojiepermana/angular 22.2.3 → 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.
@@ -1,5 +1,5 @@
1
+ import { n as NAVIGATION_SHELL, t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-D-oOKwHg.mjs";
1
2
  import { r as NavigationItemContentComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-ERZNpmTZ.mjs";
2
- import { t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-DfG6_3eF.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 [ngTemplateOutlet]="asideFooter" />
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 [ngTemplateOutlet]="asideFooter" />
713
+ <ng-container
714
+ [ngTemplateOutlet]="asideFooter"
715
+ [ngTemplateOutletInjector]="asideFooterInjector"
716
+ />
689
717
  </footer>
690
718
  }
691
719
  </aside>
@@ -1,7 +1,8 @@
1
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 };
@@ -1,6 +1,6 @@
1
- import { t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-DfG6_3eF.mjs";
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, InjectionToken, Injector, TemplateRef, ViewContainerRef, afterNextRender, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, isDevMode, model, output, signal } from "@angular/core";
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";
@@ -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 {
@@ -764,7 +763,7 @@ var NavigationContentComponent = class NavigationContentComponent {
764
763
  deferBlockDependencies: [
765
764
  () => [import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-DRdw2G-c.mjs").then((m) => m.NavigationFlyoutMenuComponent)],
766
765
  () => [import("./ojiepermana-angular-navigation-navigation-horizontal.component-Bx1NcrWO.mjs").then((m) => m.NavigationHorizontalComponent)],
767
- () => [import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-I-ln7fOq.mjs").then((m) => m.NavigationDockbarMenuComponent)]
766
+ () => [import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-DC8rfxS5.mjs").then((m) => m.NavigationDockbarMenuComponent)]
768
767
  ]
769
768
  });
770
769
  };
@@ -776,7 +775,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
776
775
  resolveDeferredDeps: () => [
777
776
  import("./ojiepermana-angular-navigation-navigation-flyout-menu.component-DRdw2G-c.mjs").then((m) => m.NavigationFlyoutMenuComponent),
778
777
  import("./ojiepermana-angular-navigation-navigation-horizontal.component-Bx1NcrWO.mjs").then((m) => m.NavigationHorizontalComponent),
779
- import("./ojiepermana-angular-navigation-navigation-dockbar-menu.component-I-ln7fOq.mjs").then((m) => m.NavigationDockbarMenuComponent)
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: [{
@@ -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="theme-settings-accent"
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="theme-settings-neutral"
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="theme-settings-accent"
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="theme-settings-neutral"
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 (showTrigger()) {
1548
- <button
1549
- type="button"
1550
- [class]="triggerClasses()"
1551
- [attr.aria-label]="triggerIconOnly() ? triggerLabel() : null"
1552
- [attr.title]="triggerIconOnly() ? triggerLabel() : null"
1553
- aria-haspopup="dialog"
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
- </button>
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
- @if (open()) {
1567
- <Drawer
1568
- [(open)]="open"
1569
- [side]="side()"
1570
- [showCloseButton]="false"
1571
- class="ThemeSettings w-full max-w-md gap-0! p-0! sm:w-100"
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
- <span
1577
- aria-hidden="true"
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
- Done
1590
- </button>
1591
- </DrawerHeader>
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
- <DrawerContent class="min-h-0 px-4 py-5 sm:px-5">
1594
- <div class="flex flex-col gap-8">
1595
- <ThemeSettingsThemeSection />
1596
- <ThemeSettingsShellSection />
1597
- @if (settings) {
1598
- <ThemeSettingsLayoutSection />
1599
- <ThemeSettingsNavigationSection />
1600
- }
1601
- </div>
1602
- </DrawerContent>
1603
- </Drawer>
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 (showTrigger()) {
1712
- <button
1713
- type="button"
1714
- [class]="triggerClasses()"
1715
- [attr.aria-label]="triggerIconOnly() ? triggerLabel() : null"
1716
- [attr.title]="triggerIconOnly() ? triggerLabel() : null"
1717
- aria-haspopup="dialog"
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
- </button>
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
- @if (open()) {
1731
- <Drawer
1732
- [(open)]="open"
1733
- [side]="side()"
1734
- [showCloseButton]="false"
1735
- class="ThemeSettings w-full max-w-md gap-0! p-0! sm:w-100"
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
- <span
1741
- aria-hidden="true"
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
- Done
1754
- </button>
1755
- </DrawerHeader>
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
- <DrawerContent class="min-h-0 px-4 py-5 sm:px-5">
1758
- <div class="flex flex-col gap-8">
1759
- <ThemeSettingsThemeSection />
1760
- <ThemeSettingsShellSection />
1761
- @if (settings) {
1762
- <ThemeSettingsLayoutSection />
1763
- <ThemeSettingsNavigationSection />
1764
- }
1765
- </div>
1766
- </DrawerContent>
1767
- </Drawer>
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: [{
@@ -1,11 +1,11 @@
1
1
  import * as i0 from "@angular/core";
2
- import { Component, Service, booleanAttribute, computed, effect, inject, input, model, output, signal, viewChild } from "@angular/core";
2
+ import { Component, InjectionToken, Service, booleanAttribute, computed, effect, inject, input, model, output, signal, viewChild } from "@angular/core";
3
3
  import { NavigationAsideFooterDirective, NavigationContainerComponent, NavigationDockbarComponent, NavigationFlyoutComponent, NavigationFooterActionComponent, NavigationFooterComponent, NavigationFooterInitialComponent, NavigationFooterTitleComponent, NavigationHeaderComponent, NavigationHeaderInitialComponent, NavigationHeaderTitleComponent, NavigationMinidockComponent, NavigationNavbarComponent, NavigationSidebarComponent } from "@ojiepermana/angular/navigation";
4
- import { LucideGrip, LucideLogOut } from "@lucide/angular";
4
+ import { cn } from "@ojiepermana/angular/component/utils/core";
5
+ import { LucideDoorOpen, LucideGrip, LucideLogOut } from "@lucide/angular";
5
6
  import { IconComponent, provideIcons } from "@ojiepermana/angular/component/icon";
6
7
  import { ThemeSettingsComponent } from "@ojiepermana/angular/theme/component/settings";
7
8
  import { DOCUMENT, NgTemplateOutlet } from "@angular/common";
8
- import { cn } from "@ojiepermana/angular/component/utils/core";
9
9
  import { LayoutComponent, LayoutContentComponent, LayoutEmptyComponent, LayoutFluidComponent, LayoutHorizontalComponent, LayoutNavigationComponent, LayoutVerticalComponent } from "@ojiepermana/angular/theme/layout";
10
10
  import { LAYOUT_DEFAULT_APPEARANCE, LAYOUT_DEFAULT_SURFACE, LAYOUT_DEFAULT_TYPE, LAYOUT_DEFAULT_WIDTH } from "@ojiepermana/angular/theme/layout/types";
11
11
  import { toMinidockItems } from "@ojiepermana/angular/navigation/types";
@@ -44,12 +44,21 @@ i0.ɵɵngDeclareClassMetadata({
44
44
  type: LayoutIdentityService,
45
45
  decorators: [{ type: Service }]
46
46
  });
47
+ const LAYOUT_USER_OPTIONS = new InjectionToken("LAYOUT_USER_OPTIONS");
48
+ function provideLayoutUserOptions(options) {
49
+ return [{
50
+ provide: LAYOUT_USER_OPTIONS,
51
+ useValue: options
52
+ }];
53
+ }
47
54
  var LayoutBrand = class LayoutBrand {
48
55
  brand = input.required(...ngDevMode ? [{ debugName: "brand" }] : /* istanbul ignore next */ []);
49
56
  compact = input(false, {
50
57
  ...ngDevMode ? { debugName: "compact" } : /* istanbul ignore next */ {},
51
58
  transform: booleanAttribute
52
59
  });
60
+ wordmarkClasses = computed(() => cn("block truncate font-semibold tracking-tight text-foreground", this.compact() ? "text-xs leading-none" : "nav-text in-data-[collapsed=true]:text-xs in-data-[collapsed=true]:leading-none"), ...ngDevMode ? [{ debugName: "wordmarkClasses" }] : /* istanbul ignore next */ []);
61
+ taglineClasses = computed(() => cn("block truncate text-muted-foreground", this.compact() ? "text-2xs leading-none" : "nav-subtitle in-data-[collapsed=true]:text-2xs in-data-[collapsed=true]:leading-none"), ...ngDevMode ? [{ debugName: "taglineClasses" }] : /* istanbul ignore next */ []);
53
62
  static ɵfac = i0.ɵɵngDeclareFactory({
54
63
  minVersion: "12.0.0",
55
64
  version: "22.2.3",
@@ -83,7 +92,22 @@ var LayoutBrand = class LayoutBrand {
83
92
  host: { classAttribute: "contents" },
84
93
  ngImport: i0,
85
94
  template: `
86
- <NavigationHeaderInitial [name]="brand().name" [icon]="brand().icon" [compact]="compact()" />
95
+ @if (brand().wordmark; as wordmark) {
96
+ <span
97
+ data-layout-brand-mark
98
+ role="img"
99
+ [attr.aria-label]="brand().name"
100
+ [attr.data-compact]="compact()"
101
+ class="inline-flex min-w-0 max-w-full flex-col justify-center"
102
+ >
103
+ <span data-layout-brand-wordmark [class]="wordmarkClasses()">{{ wordmark }}</span>
104
+ @if (brand().tagline; as tagline) {
105
+ <span data-layout-brand-tagline [class]="taglineClasses()">{{ tagline }}</span>
106
+ }
107
+ </span>
108
+ } @else {
109
+ <NavigationHeaderInitial [name]="brand().name" [icon]="brand().icon" [compact]="compact()" />
110
+ }
87
111
  @if (!compact()) {
88
112
  <NavigationHeaderTitle [title]="brand().title" [subtitle]="brand().subtitle" />
89
113
  }
@@ -125,7 +149,22 @@ i0.ɵɵngDeclareClassMetadata({
125
149
  imports: [NavigationHeaderInitialComponent, NavigationHeaderTitleComponent],
126
150
  host: { class: "contents" },
127
151
  template: `
128
- <NavigationHeaderInitial [name]="brand().name" [icon]="brand().icon" [compact]="compact()" />
152
+ @if (brand().wordmark; as wordmark) {
153
+ <span
154
+ data-layout-brand-mark
155
+ role="img"
156
+ [attr.aria-label]="brand().name"
157
+ [attr.data-compact]="compact()"
158
+ class="inline-flex min-w-0 max-w-full flex-col justify-center"
159
+ >
160
+ <span data-layout-brand-wordmark [class]="wordmarkClasses()">{{ wordmark }}</span>
161
+ @if (brand().tagline; as tagline) {
162
+ <span data-layout-brand-tagline [class]="taglineClasses()">{{ tagline }}</span>
163
+ }
164
+ </span>
165
+ } @else {
166
+ <NavigationHeaderInitial [name]="brand().name" [icon]="brand().icon" [compact]="compact()" />
167
+ }
129
168
  @if (!compact()) {
130
169
  <NavigationHeaderTitle [title]="brand().title" [subtitle]="brand().subtitle" />
131
170
  }
@@ -151,15 +190,39 @@ i0.ɵɵngDeclareClassMetadata({
151
190
  }]
152
191
  }
153
192
  });
193
+ function optionalBooleanAttribute(value) {
194
+ return value === null || value === void 0 ? null : booleanAttribute(value);
195
+ }
154
196
  var LayoutUser = class LayoutUser {
197
+ options = inject(LAYOUT_USER_OPTIONS, { optional: true });
155
198
  user = input.required(...ngDevMode ? [{ debugName: "user" }] : /* istanbul ignore next */ []);
156
199
  detailed = input(false, {
157
200
  ...ngDevMode ? { debugName: "detailed" } : /* istanbul ignore next */ {},
158
201
  transform: booleanAttribute
159
202
  });
160
- logoutLabel = input("Logout", ...ngDevMode ? [{ debugName: "logoutLabel" }] : /* istanbul ignore next */ []);
161
- logoutIcon = input("log-out", ...ngDevMode ? [{ debugName: "logoutIcon" }] : /* istanbul ignore next */ []);
203
+ showInitial = input(true, {
204
+ ...ngDevMode ? { debugName: "showInitial" } : /* istanbul ignore next */ {},
205
+ alias: "show-initial",
206
+ transform: booleanAttribute
207
+ });
208
+ showEmail = input(null, {
209
+ ...ngDevMode ? { debugName: "showEmail" } : /* istanbul ignore next */ {},
210
+ alias: "show-email",
211
+ transform: optionalBooleanAttribute
212
+ });
213
+ showThemeSettings = input(null, {
214
+ ...ngDevMode ? { debugName: "showThemeSettings" } : /* istanbul ignore next */ {},
215
+ alias: "show-theme-settings",
216
+ transform: optionalBooleanAttribute
217
+ });
218
+ logoutLabel = input(null, ...ngDevMode ? [{ debugName: "logoutLabel" }] : /* istanbul ignore next */ []);
219
+ logoutIcon = input(null, ...ngDevMode ? [{ debugName: "logoutIcon" }] : /* istanbul ignore next */ []);
162
220
  logout = output();
221
+ showsIdentity = computed(() => this.detailed() || this.options?.detailed === true, ...ngDevMode ? [{ debugName: "showsIdentity" }] : /* istanbul ignore next */ []);
222
+ showsEmail = computed(() => this.showEmail() ?? this.options?.showEmail ?? true, ...ngDevMode ? [{ debugName: "showsEmail" }] : /* istanbul ignore next */ []);
223
+ showsThemeSettings = computed(() => this.showThemeSettings() ?? this.options?.showThemeSettings ?? true, ...ngDevMode ? [{ debugName: "showsThemeSettings" }] : /* istanbul ignore next */ []);
224
+ resolvedLogoutLabel = computed(() => this.logoutLabel() ?? this.options?.logoutLabel ?? "Logout", ...ngDevMode ? [{ debugName: "resolvedLogoutLabel" }] : /* istanbul ignore next */ []);
225
+ resolvedLogoutIcon = computed(() => this.logoutIcon() ?? this.options?.logoutIcon ?? "log-out", ...ngDevMode ? [{ debugName: "resolvedLogoutIcon" }] : /* istanbul ignore next */ []);
163
226
  static ɵfac = i0.ɵɵngDeclareFactory({
164
227
  minVersion: "12.0.0",
165
228
  version: "22.2.3",
@@ -189,6 +252,27 @@ var LayoutUser = class LayoutUser {
189
252
  isRequired: false,
190
253
  transformFunction: null
191
254
  },
255
+ showInitial: {
256
+ classPropertyName: "showInitial",
257
+ publicName: "show-initial",
258
+ isSignal: true,
259
+ isRequired: false,
260
+ transformFunction: null
261
+ },
262
+ showEmail: {
263
+ classPropertyName: "showEmail",
264
+ publicName: "show-email",
265
+ isSignal: true,
266
+ isRequired: false,
267
+ transformFunction: null
268
+ },
269
+ showThemeSettings: {
270
+ classPropertyName: "showThemeSettings",
271
+ publicName: "show-theme-settings",
272
+ isSignal: true,
273
+ isRequired: false,
274
+ transformFunction: null
275
+ },
192
276
  logoutLabel: {
193
277
  classPropertyName: "logoutLabel",
194
278
  publicName: "logoutLabel",
@@ -206,25 +290,33 @@ var LayoutUser = class LayoutUser {
206
290
  },
207
291
  outputs: { logout: "logout" },
208
292
  host: { classAttribute: "contents" },
209
- providers: [provideIcons(LucideLogOut)],
293
+ providers: [provideIcons(LucideLogOut, LucideDoorOpen)],
210
294
  ngImport: i0,
211
295
  template: `
212
- @if (detailed()) {
213
- <NavigationFooterInitial [name]="user().name" />
214
- <NavigationFooterTitle class="flex-1" [title]="user().name" [subtitle]="user().email" />
296
+ @if (showsIdentity()) {
297
+ @if (showInitial()) {
298
+ <NavigationFooterInitial [name]="user().name" />
299
+ }
300
+ <NavigationFooterTitle
301
+ class="min-w-0 max-w-64 flex-1"
302
+ [title]="user().name"
303
+ [subtitle]="showsEmail() ? user().email : null"
304
+ />
215
305
  }
216
306
 
217
307
  <NavigationFooterAction class="ml-auto">
218
308
  <button
219
309
  type="button"
220
- [attr.aria-label]="logoutLabel()"
221
- [attr.title]="logoutLabel()"
222
- class="inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
310
+ [attr.aria-label]="resolvedLogoutLabel()"
311
+ [attr.title]="resolvedLogoutLabel()"
312
+ class="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
223
313
  (click)="logout.emit()"
224
314
  >
225
- <Icon [name]="logoutIcon()" [size]="18" />
315
+ <Icon [name]="resolvedLogoutIcon()" [size]="18" />
226
316
  </button>
227
- <ThemeSettings [trigger-icon-only]="true" class="size-8! min-h-8!" />
317
+ @if (showsThemeSettings()) {
318
+ <ThemeSettings [trigger-icon-only]="true" class="size-8! min-h-8!" />
319
+ }
228
320
  </NavigationFooterAction>
229
321
  `,
230
322
  isInline: true,
@@ -247,6 +339,7 @@ var LayoutUser = class LayoutUser {
247
339
  selector: "ThemeSettings",
248
340
  inputs: [
249
341
  "open",
342
+ "inline",
250
343
  "trigger",
251
344
  "triggerLabel",
252
345
  "trigger-icon-only",
@@ -296,7 +389,7 @@ i0.ɵɵngDeclareClassMetadata({
296
389
  type: Component,
297
390
  args: [{
298
391
  selector: "LayoutUser",
299
- providers: [provideIcons(LucideLogOut)],
392
+ providers: [provideIcons(LucideLogOut, LucideDoorOpen)],
300
393
  imports: [
301
394
  IconComponent,
302
395
  ThemeSettingsComponent,
@@ -306,22 +399,30 @@ i0.ɵɵngDeclareClassMetadata({
306
399
  ],
307
400
  host: { class: "contents" },
308
401
  template: `
309
- @if (detailed()) {
310
- <NavigationFooterInitial [name]="user().name" />
311
- <NavigationFooterTitle class="flex-1" [title]="user().name" [subtitle]="user().email" />
402
+ @if (showsIdentity()) {
403
+ @if (showInitial()) {
404
+ <NavigationFooterInitial [name]="user().name" />
405
+ }
406
+ <NavigationFooterTitle
407
+ class="min-w-0 max-w-64 flex-1"
408
+ [title]="user().name"
409
+ [subtitle]="showsEmail() ? user().email : null"
410
+ />
312
411
  }
313
412
 
314
413
  <NavigationFooterAction class="ml-auto">
315
414
  <button
316
415
  type="button"
317
- [attr.aria-label]="logoutLabel()"
318
- [attr.title]="logoutLabel()"
319
- class="inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
416
+ [attr.aria-label]="resolvedLogoutLabel()"
417
+ [attr.title]="resolvedLogoutLabel()"
418
+ class="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
320
419
  (click)="logout.emit()"
321
420
  >
322
- <Icon [name]="logoutIcon()" [size]="18" />
421
+ <Icon [name]="resolvedLogoutIcon()" [size]="18" />
323
422
  </button>
324
- <ThemeSettings [trigger-icon-only]="true" class="size-8! min-h-8!" />
423
+ @if (showsThemeSettings()) {
424
+ <ThemeSettings [trigger-icon-only]="true" class="size-8! min-h-8!" />
425
+ }
325
426
  </NavigationFooterAction>
326
427
  `
327
428
  }]
@@ -343,6 +444,30 @@ i0.ɵɵngDeclareClassMetadata({
343
444
  required: false
344
445
  }]
345
446
  }],
447
+ showInitial: [{
448
+ type: i0.Input,
449
+ args: [{
450
+ isSignal: true,
451
+ alias: "show-initial",
452
+ required: false
453
+ }]
454
+ }],
455
+ showEmail: [{
456
+ type: i0.Input,
457
+ args: [{
458
+ isSignal: true,
459
+ alias: "show-email",
460
+ required: false
461
+ }]
462
+ }],
463
+ showThemeSettings: [{
464
+ type: i0.Input,
465
+ args: [{
466
+ isSignal: true,
467
+ alias: "show-theme-settings",
468
+ required: false
469
+ }]
470
+ }],
346
471
  logoutLabel: [{
347
472
  type: i0.Input,
348
473
  args: [{
@@ -473,6 +598,9 @@ var LayoutNavSidebar = class LayoutNavSidebar {
473
598
  inputs: [
474
599
  "user",
475
600
  "detailed",
601
+ "show-initial",
602
+ "show-email",
603
+ "show-theme-settings",
476
604
  "logoutLabel",
477
605
  "logoutIcon"
478
606
  ],
@@ -634,7 +762,6 @@ var LayoutNavDockbar = class LayoutNavDockbar {
634
762
  },
635
763
  outputs: { logout: "logout" },
636
764
  host: { classAttribute: "contents" },
637
- providers: [provideIcons(LucideLogOut)],
638
765
  ngImport: i0,
639
766
  template: `
640
767
  <NavigationDockbar
@@ -653,41 +780,12 @@ var LayoutNavDockbar = class LayoutNavDockbar {
653
780
  </NavigationFooter>
654
781
 
655
782
  <ng-template NavigationAsideFooter>
656
- <div class="flex min-w-0 flex-col justify-center">
657
- <span class="block truncate text-sm font-semibold leading-tight text-foreground">{{
658
- user().name
659
- }}</span>
660
- <span class="block truncate text-xs leading-tight text-muted-foreground">{{
661
- user().email
662
- }}</span>
663
- </div>
664
-
665
- <button
666
- type="button"
667
- aria-label="Logout"
668
- title="Logout"
669
- class="ml-auto inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
670
- (click)="logout.emit()"
671
- >
672
- <Icon name="log-out" [size]="18" />
673
- </button>
783
+ <LayoutUser [user]="user()" detailed [show-initial]="false" (logout)="logout.emit()" />
674
784
  </ng-template>
675
785
  </NavigationDockbar>
676
786
  `,
677
787
  isInline: true,
678
788
  dependencies: [
679
- {
680
- kind: "component",
681
- type: IconComponent,
682
- selector: "Icon",
683
- inputs: [
684
- "name",
685
- "class",
686
- "size",
687
- "strokeWidth",
688
- "label"
689
- ]
690
- },
691
789
  {
692
790
  kind: "directive",
693
791
  type: NavigationAsideFooterDirective,
@@ -730,6 +828,9 @@ var LayoutNavDockbar = class LayoutNavDockbar {
730
828
  inputs: [
731
829
  "user",
732
830
  "detailed",
831
+ "show-initial",
832
+ "show-email",
833
+ "show-theme-settings",
733
834
  "logoutLabel",
734
835
  "logoutIcon"
735
836
  ],
@@ -747,9 +848,7 @@ i0.ɵɵngDeclareClassMetadata({
747
848
  type: Component,
748
849
  args: [{
749
850
  selector: "LayoutNavDockbar",
750
- providers: [provideIcons(LucideLogOut)],
751
851
  imports: [
752
- IconComponent,
753
852
  NavigationAsideFooterDirective,
754
853
  NavigationDockbarComponent,
755
854
  NavigationHeaderComponent,
@@ -775,24 +874,7 @@ i0.ɵɵngDeclareClassMetadata({
775
874
  </NavigationFooter>
776
875
 
777
876
  <ng-template NavigationAsideFooter>
778
- <div class="flex min-w-0 flex-col justify-center">
779
- <span class="block truncate text-sm font-semibold leading-tight text-foreground">{{
780
- user().name
781
- }}</span>
782
- <span class="block truncate text-xs leading-tight text-muted-foreground">{{
783
- user().email
784
- }}</span>
785
- </div>
786
-
787
- <button
788
- type="button"
789
- aria-label="Logout"
790
- title="Logout"
791
- class="ml-auto inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
792
- (click)="logout.emit()"
793
- >
794
- <Icon name="log-out" [size]="18" />
795
- </button>
877
+ <LayoutUser [user]="user()" detailed [show-initial]="false" (logout)="logout.emit()" />
796
878
  </ng-template>
797
879
  </NavigationDockbar>
798
880
  `
@@ -943,6 +1025,9 @@ var LayoutNavMinidock = class LayoutNavMinidock {
943
1025
  inputs: [
944
1026
  "user",
945
1027
  "detailed",
1028
+ "show-initial",
1029
+ "show-email",
1030
+ "show-theme-settings",
946
1031
  "logoutLabel",
947
1032
  "logoutIcon"
948
1033
  ],
@@ -1103,6 +1188,9 @@ var LayoutNavNavbar = class LayoutNavNavbar {
1103
1188
  inputs: [
1104
1189
  "user",
1105
1190
  "detailed",
1191
+ "show-initial",
1192
+ "show-email",
1193
+ "show-theme-settings",
1106
1194
  "logoutLabel",
1107
1195
  "logoutIcon"
1108
1196
  ],
@@ -1278,6 +1366,9 @@ var LayoutNavFlyout = class LayoutNavFlyout {
1278
1366
  inputs: [
1279
1367
  "user",
1280
1368
  "detailed",
1369
+ "show-initial",
1370
+ "show-email",
1371
+ "show-theme-settings",
1281
1372
  "logoutLabel",
1282
1373
  "logoutIcon"
1283
1374
  ],
@@ -2428,4 +2519,4 @@ i0.ɵɵngDeclareClassMetadataAsync({
2428
2519
  }
2429
2520
  })
2430
2521
  });
2431
- export { LAYOUT_DESKTOP_NAVIGATION_DATA_ID, LayoutBrand, LayoutIdentityService, LayoutNavDockbar, LayoutNavFlyout, LayoutNavMinidock, LayoutNavMinimal, LayoutNavNavbar, LayoutNavSidebar, LayoutUser, LayoutWrapperDefault };
2522
+ export { LAYOUT_DESKTOP_NAVIGATION_DATA_ID, LAYOUT_USER_OPTIONS, LayoutBrand, LayoutIdentityService, LayoutNavDockbar, LayoutNavFlyout, LayoutNavMinidock, LayoutNavMinimal, LayoutNavNavbar, LayoutNavSidebar, LayoutUser, LayoutWrapperDefault, provideLayoutUserOptions };
@@ -435,6 +435,9 @@ var PageComponent = class PageComponent {
435
435
  inputs: [
436
436
  "user",
437
437
  "detailed",
438
+ "show-initial",
439
+ "show-email",
440
+ "show-theme-settings",
438
441
  "logoutLabel",
439
442
  "logoutIcon"
440
443
  ],
@@ -167,6 +167,9 @@ var ShellNavigationFlyoutComponent = class ShellNavigationFlyoutComponent {
167
167
  inputs: [
168
168
  "user",
169
169
  "detailed",
170
+ "show-initial",
171
+ "show-email",
172
+ "show-theme-settings",
170
173
  "logoutLabel",
171
174
  "logoutIcon"
172
175
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ojiepermana/angular",
3
- "version": "22.2.3",
3
+ "version": "22.2.4",
4
4
  "description": "Accessible, tree-shakable Angular 22 design system from ojiepermana: UI components, charts, navigation shells, theme tokens, and an OpenAPI SDK generator.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -503,5 +503,5 @@
503
503
  "module": "fesm2022/ojiepermana-angular.mjs",
504
504
  "typings": "types/ojiepermana-angular.d.ts",
505
505
  "type": "module",
506
- "gitHead": "f5001a56a4c9a8b75b71254febe765be1e9a5b6d"
506
+ "gitHead": "9bf6b28075ea1896efc601f2228d5c9a568354d1"
507
507
  }
@@ -41,6 +41,25 @@ open; Escape, backdrop click, and the close controls dismiss it; focus returns
41
41
  to the opening trigger. Its header and footer use the navigation topbar height,
42
42
  semantic borders, and theme tokens so it sits naturally beside a layout shell.
43
43
 
44
+ ## Inline page
45
+
46
+ ```html
47
+ <ThemeSettings inline />
48
+ ```
49
+
50
+ `inline` renders the same sections directly in the page: no trigger, no drawer,
51
+ no backdrop, and `open` is ignored. It is the right shape for a dedicated
52
+ settings route, while a navigation footer keeps the drawer. Both modes share the
53
+ runtime services and the same `THEME_SETTINGS_ADAPTER` gate, so an inline page
54
+ and an open drawer always show the same values: a swatch chosen on one is
55
+ checked on the other at once. The container carries `data-theme-settings-inline`
56
+ as a styling hook. The default stays `false`, so existing drawers are untouched.
57
+
58
+ Each instance owns its accent and neutral radio groups (a per-application unique
59
+ `name`), so several instances on one document, inline and drawer together, never
60
+ uncheck each other through native radio grouping. The ids are deterministic per
61
+ application injector, so SSR and hydration agree.
62
+
44
63
  ## Shell
45
64
 
46
65
  Directly below **Theme** sits a **Shell** section with all three shell axes, driven
@@ -358,6 +358,73 @@ cookie, dan target redirect berbeda tiap aplikasi, jadi efeknya milik consumer.
358
358
  Consumer yang tidak mengikat `(logout)` tetap merender tanpa error; tombolnya
359
359
  sekadar tidak melakukan apa pun.
360
360
 
361
+ #### Identitas user di footer: `LayoutUser` dan `provideLayoutUserOptions()`
362
+
363
+ Setiap nav type merender footer user lewat satu komponen bersama, `LayoutUser`:
364
+ sidebar (termasuk Sheet mobile), rail dockbar beserta aside-nya, minidock, navbar,
365
+ dan panel flyout. Default yang lama tidak berubah: surface vertical menampilkan
366
+ inisial, nama, dan email; navbar dan flyout hanya tombol logout; di samping logout
367
+ ada shortcut `ThemeSettings`; ikonnya `log-out`.
368
+
369
+ Konfigurasi aplikasi-wide disediakan sekali lewat token, sehingga tampilannya
370
+ konsisten di semua surface tanpa menyentuh input komponen internal:
371
+
372
+ ```ts
373
+ import { provideLayoutUserOptions } from '@ojiepermana/angular/theme/layout/wrapper';
374
+
375
+ export const appConfig = {
376
+ providers: [
377
+ provideLayoutUserOptions({
378
+ detailed: true, // inisial + nama juga pada navbar dan flyout
379
+ showEmail: false, // sembunyikan baris email
380
+ showThemeSettings: false, // settings sudah tersedia di halaman tersendiri
381
+ logoutIcon: 'door-open', // 'log-out' dan 'door-open' terdaftar di library
382
+ logoutLabel: 'Keluar',
383
+ }),
384
+ ],
385
+ };
386
+ ```
387
+
388
+ | Opsi | Type | Default | Deskripsi |
389
+ | ------------------- | --------- | ----------- | --------------------------------------------------------------- |
390
+ | `detailed` | `boolean` | `false` | Tampilkan identitas pada semua surface, termasuk navbar/flyout. |
391
+ | `showEmail` | `boolean` | `true` | Render `user.email` di bawah nama. |
392
+ | `showThemeSettings` | `boolean` | `true` | Render shortcut `ThemeSettings` di samping logout. |
393
+ | `logoutLabel` | `string` | `'Logout'` | Accessible name tombol logout. |
394
+ | `logoutIcon` | `string` | `'log-out'` | Nama ikon Lucide; nama lain didaftarkan lewat `provideIcons()`. |
395
+
396
+ Input pada `<LayoutUser>` sendiri (`detailed`, `show-initial`, `show-email`,
397
+ `show-theme-settings`, `logoutLabel`, `logoutIcon`) selalu menang atas opsi
398
+ tersebut; nilai yang tidak diikat jatuh ke opsi, lalu ke default di atas.
399
+ `show-initial` ada untuk surface yang sudah menampilkan inisial di tempat lain,
400
+ seperti aside dockbar yang menampilkan inisialnya di rail. Nama panjang
401
+ dipotong (`truncate`) pada kolom judul yang `min-w-0 flex-1`, jadi tombol logout
402
+ tidak pernah terdorong atau terpotong.
403
+
404
+ #### Brand: inisial, ikon, atau wordmark
405
+
406
+ `BrandIdentity` menerima `wordmark` dan `tagline` opsional. Dengan `wordmark`,
407
+ `LayoutBrand` merender teks tersebut (plus tagline bila ada) menggantikan blok
408
+ inisial/ikon; tanpa `wordmark`, fallback `NavigationHeaderInitial` tetap dipakai.
409
+ Accessible name selalu `brand.name` (`role="img"`), dan `title`/`subtitle` tetap
410
+ mengikuti aturan `compact` yang sama.
411
+
412
+ ```ts
413
+ const brand: BrandIdentity = {
414
+ name: 'PT Contoh Nusantara',
415
+ icon: null,
416
+ title: 'Contoh Nusantara',
417
+ subtitle: 'Enterprise Operations',
418
+ wordmark: 'CONTOH',
419
+ tagline: 'NUSANTARA SYSTEM',
420
+ };
421
+ ```
422
+
423
+ Hook styling untuk consumer: `[data-layout-brand-mark]` (dengan `data-compact`
424
+ `"true"`/`"false"`), `[data-layout-brand-wordmark]`, dan
425
+ `[data-layout-brand-tagline]`. Library hanya mengatur tier tipografi dan
426
+ `truncate`; warna, ukuran, dan tata letak milik consumer.
427
+
361
428
  Saat viewport kembali ke desktop, Sheet ditutup otomatis. Pemilihan item mobile juga menutup
362
429
  Sheet dan mengembalikan fokus melalui primitive Sheet.
363
430
 
@@ -6,7 +6,14 @@ import { NavigationType } from "@ojiepermana/angular/navigation/types";
6
6
  import { ShellMode } from "@ojiepermana/angular/theme/shell/types";
7
7
  /** Native control styling exposed by the settings trigger. */
8
8
  type ThemeSettingsTrigger = 'button' | 'link';
9
- /** A navigation-aligned, right-side inspector for runtime theme and shell settings. */
9
+ /**
10
+ * A navigation-aligned, right-side inspector for runtime theme and shell settings.
11
+ *
12
+ * `inline` renders the same sections directly in the page instead: no trigger,
13
+ * no drawer, no backdrop. Both modes read and write the same services and the
14
+ * same adapter, so an inline page and an open drawer stay in sync without any
15
+ * extra wiring.
16
+ */
10
17
  export declare class ThemeSettingsComponent {
11
18
  /**
12
19
  * Present only when the app provided an adapter. It is a render gate here: the
@@ -15,6 +22,11 @@ export declare class ThemeSettingsComponent {
15
22
  */
16
23
  protected readonly settings: import("@ojiepermana/angular/theme/component/settings").ThemeSettingsAdapter | null;
17
24
  readonly open: import("@angular/core").ModelSignal<boolean>;
25
+ /**
26
+ * Render the sections in place, as page content, instead of behind a trigger
27
+ * and drawer. `open` is ignored while inline: there is no overlay to open.
28
+ */
29
+ readonly inline: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
18
30
  readonly trigger: import("@angular/core").InputSignal<ThemeSettingsTrigger>;
19
31
  readonly triggerLabel: import("@angular/core").InputSignal<string>;
20
32
  readonly triggerIconOnly: import("@angular/core").InputSignal<boolean>;
@@ -29,6 +41,11 @@ export declare class ThemeSettingsComponent {
29
41
  "required": false;
30
42
  "isSignal": true;
31
43
  };
44
+ "inline": {
45
+ "alias": "inline";
46
+ "required": false;
47
+ "isSignal": true;
48
+ };
32
49
  "trigger": {
33
50
  "alias": "trigger";
34
51
  "required": false;
@@ -1,5 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
- import { ElementRef } from "@angular/core";
2
+ import { ElementRef, InjectionToken, Provider } from "@angular/core";
3
3
  import { ThemeSettingsNavigationMode, ThemeSettingsNavigationType } from "@ojiepermana/angular/theme/component/settings";
4
4
  import { NavigationDockbarRouteContext } from "@ojiepermana/angular/navigation";
5
5
  import { NavigationDockbarRouteContext as NavigationDockbarRouteContext$1, NavigationItem, NavigationType } from "@ojiepermana/angular/navigation/types";
@@ -16,6 +16,13 @@ export interface BrandIdentity {
16
16
  readonly title: string;
17
17
  /** Subjudul brand. */
18
18
  readonly subtitle: string;
19
+ /**
20
+ * Optional typographic mark rendered in place of the initials or icon. The
21
+ * accessible name stays `name`; the wordmark itself is decorative text.
22
+ */
23
+ readonly wordmark?: string;
24
+ /** Optional line under the wordmark. Ignored without a `wordmark`. */
25
+ readonly tagline?: string;
19
26
  }
20
27
  export interface UserIdentity {
21
28
  /** Nama lengkap user (inisial + judul footer). */
@@ -41,19 +48,73 @@ export declare class LayoutIdentityService {
41
48
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
42
49
  }
43
50
  /**
44
- * The brand slot for `<NavigationHeader>`: initials or logo plus a title. Purely
45
- * input-driven.
51
+ * Application-wide defaults for every `<LayoutUser>` a layout wrapper renders:
52
+ * the sidebar and its mobile sheet, the dockbar rail and aside, the minidock
53
+ * rail, the navbar and the flyout panel. One provider therefore keeps the
54
+ * identity row and the logout control identical on every surface. A binding on
55
+ * an individual `<LayoutUser>` still wins over these defaults.
56
+ */
57
+ export interface LayoutUserOptions {
58
+ /**
59
+ * Show the initials and name on every surface, the horizontal navbar and
60
+ * flyout footers included. Off, those two render the logout control only.
61
+ */
62
+ readonly detailed?: boolean;
63
+ /** Render `user.email` under the name. Default `true`. */
64
+ readonly showEmail?: boolean;
65
+ /**
66
+ * Render the `ThemeSettings` shortcut beside logout. Default `true`; turn it
67
+ * off when the application offers the settings on a page of its own.
68
+ */
69
+ readonly showThemeSettings?: boolean;
70
+ /** Accessible name of the logout control. Default `'Logout'`. */
71
+ readonly logoutLabel?: string;
72
+ /**
73
+ * Lucide icon name of the logout control. `'log-out'` (the default) and
74
+ * `'door-open'` are registered by the library; register any other name with
75
+ * `provideIcons()`.
76
+ */
77
+ readonly logoutIcon?: string;
78
+ }
79
+ export declare const LAYOUT_USER_OPTIONS: InjectionToken<LayoutUserOptions>;
80
+ /**
81
+ * Provide {@link LayoutUserOptions} once, usually in the application config,
82
+ * so `<LayoutWrapperDefault>` and the standalone nav types all pick them up.
83
+ *
84
+ * ```ts
85
+ * provideLayoutUserOptions({ detailed: true, showEmail: false, logoutIcon: 'door-open' })
86
+ * ```
87
+ */
88
+ export declare function provideLayoutUserOptions(options: LayoutUserOptions): Provider[];
89
+ /**
90
+ * The brand slot for `<NavigationHeader>`: initials, logo, or wordmark plus a title.
91
+ * Purely input-driven.
46
92
  *
47
93
  * `compact` (dockbar, or an icon-only rail) hides the title. `host.class = 'contents'`
48
94
  * keeps `NavigationHeaderInitial` and `NavigationHeaderTitle` as direct flex children of
49
95
  * the header row; the title still auto-hides on a collapsed sidebar, because
50
96
  * `NAVIGATION_SHELL` reaches `<Navigation>` through the live injector tree.
97
+ *
98
+ * A `brand.wordmark` replaces the initials block with typographic text and an
99
+ * optional `brand.tagline`. The mark keeps `role="img"` and `brand.name` as its
100
+ * accessible name, so assistive technology announces the brand the same way in
101
+ * both renders. `data-layout-brand-mark`, `data-layout-brand-wordmark`,
102
+ * `data-layout-brand-tagline` and `data-compact` are the styling hooks: the
103
+ * library sets type and overflow only, the consumer owns the look.
51
104
  */
52
105
  export declare class LayoutBrand {
53
- /** Identitas brand (nama, ikon, judul, subjudul). */
106
+ /** Identitas brand (nama, ikon, judul, subjudul, wordmark opsional). */
54
107
  readonly brand: import("@angular/core").InputSignal<BrandIdentity>;
55
108
  /** Sembunyikan judul, sisakan inisial saja (dockbar / rail ikon-only). */
56
109
  readonly compact: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
110
+ /**
111
+ * Rail-sized type when compact, the nav text tier otherwise. A collapsed sidebar
112
+ * is a rail too, but `LayoutBrand` only knows `compact`; the header it sits in
113
+ * carries `data-collapsed`, so the `in-data-[collapsed=true]` variant shrinks
114
+ * the type there without the component reaching into the navigation state.
115
+ */
116
+ protected readonly wordmarkClasses: import("@angular/core").Signal<string>;
117
+ protected readonly taglineClasses: import("@angular/core").Signal<string>;
57
118
  static ɵfac: i0.ɵɵFactoryDeclaration<LayoutBrand, never>;
58
119
  static ɵcmp: i0.ɵɵComponentDeclaration<LayoutBrand, "LayoutBrand", never, {
59
120
  "brand": {
@@ -70,12 +131,14 @@ export declare class LayoutBrand {
70
131
  }
71
132
  /**
72
133
  * The user slot for `<NavigationFooter>`: an optional identity plus the logout action.
73
- * Purely input-driven.
134
+ * Input-driven, with application defaults from {@link LAYOUT_USER_OPTIONS}.
74
135
  *
75
136
  * `detailed` shows initials and name (a full sidebar); without it, only the logout
76
137
  * button. `host.class = 'contents'` makes the children direct flex children of the
77
138
  * footer, so `ml-auto` and the auto-hide on collapse (through `NAVIGATION_SHELL`) still
78
- * apply.
139
+ * apply. The title takes the remaining width, capped so a horizontal bar does not
140
+ * grow with the name, and truncates, so a long name never pushes the actions out
141
+ * of the row.
79
142
  *
80
143
  * The logout button only emits `(logout)`. Endpoint, cookie, and redirect target differ
81
144
  * per application, so the effect is entirely the consumer's — the library calls no
@@ -84,16 +147,34 @@ export declare class LayoutBrand {
84
147
  * existed.
85
148
  */
86
149
  export declare class LayoutUser {
150
+ private readonly options;
87
151
  /** Identitas user (nama + email). */
88
152
  readonly user: import("@angular/core").InputSignal<UserIdentity>;
89
153
  /** Show the user identity (initials and name), not only the logout button. */
90
154
  readonly detailed: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
91
- /** Accessible name for the logout button. */
92
- readonly logoutLabel: import("@angular/core").InputSignal<string>;
93
- /** Lucide icon name for the logout button; register a custom one with `provideIcons()`. */
94
- readonly logoutIcon: import("@angular/core").InputSignal<string>;
155
+ /**
156
+ * Render the initials block in front of the name. Off where another block already
157
+ * shows them, such as the dockbar aside whose rail carries the initials.
158
+ */
159
+ readonly showInitial: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
160
+ /** Render the email under the name; unset falls back to the options, then `true`. */
161
+ readonly showEmail: import("@angular/core").InputSignalWithTransform<boolean | null, unknown>;
162
+ /** Render the ThemeSettings shortcut; unset falls back to the options, then `true`. */
163
+ readonly showThemeSettings: import("@angular/core").InputSignalWithTransform<boolean | null, unknown>;
164
+ /** Accessible name for the logout button; unset falls back to the options, then `Logout`. */
165
+ readonly logoutLabel: import("@angular/core").InputSignal<string | null>;
166
+ /**
167
+ * Lucide icon name for the logout button; unset falls back to the options, then
168
+ * `log-out`. `door-open` is registered too; register any other name with `provideIcons()`.
169
+ */
170
+ readonly logoutIcon: import("@angular/core").InputSignal<string | null>;
95
171
  /** The user pressed logout. The effect is the consumer's; the library does not navigate. */
96
172
  readonly logout: import("@angular/core").OutputEmitterRef<void>;
173
+ protected readonly showsIdentity: import("@angular/core").Signal<boolean>;
174
+ protected readonly showsEmail: import("@angular/core").Signal<boolean>;
175
+ protected readonly showsThemeSettings: import("@angular/core").Signal<boolean>;
176
+ protected readonly resolvedLogoutLabel: import("@angular/core").Signal<string>;
177
+ protected readonly resolvedLogoutIcon: import("@angular/core").Signal<string>;
97
178
  static ɵfac: i0.ɵɵFactoryDeclaration<LayoutUser, never>;
98
179
  static ɵcmp: i0.ɵɵComponentDeclaration<LayoutUser, "LayoutUser", never, {
99
180
  "user": {
@@ -106,6 +187,21 @@ export declare class LayoutUser {
106
187
  "required": false;
107
188
  "isSignal": true;
108
189
  };
190
+ "showInitial": {
191
+ "alias": "show-initial";
192
+ "required": false;
193
+ "isSignal": true;
194
+ };
195
+ "showEmail": {
196
+ "alias": "show-email";
197
+ "required": false;
198
+ "isSignal": true;
199
+ };
200
+ "showThemeSettings": {
201
+ "alias": "show-theme-settings";
202
+ "required": false;
203
+ "isSignal": true;
204
+ };
109
205
  "logoutLabel": {
110
206
  "alias": "logoutLabel";
111
207
  "required": false;
@@ -179,7 +275,8 @@ export declare class LayoutNavSidebar {
179
275
  * header, the user's initials in the rail footer (title and actions auto-hide, because
180
276
  * the rail is always collapsed), and the full identity (name, email, logout) in the
181
277
  * aside footer — together with the rail initials they form one footer row, like an
182
- * expanded sidebar.
278
+ * expanded sidebar. Both rows are the one `LayoutUser`; the aside copy only drops the
279
+ * initials the rail already shows.
183
280
  *
184
281
  * Horizontal dividers: unlike the sidebar, which leaves the separator to Layout's inset
185
282
  * accent rail at `top-12`/`bottom-12` under `border-rail`, the dockbar ALWAYS uses the