@ojiepermana/angular 22.2.0 → 22.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/README.md +18 -7
  2. package/component/icon/README.md +40 -13
  3. package/fesm2022/ojiepermana-angular-chart-area.mjs +3 -3
  4. package/fesm2022/ojiepermana-angular-chart-bar.mjs +5 -5
  5. package/fesm2022/ojiepermana-angular-chart-core.mjs +33 -33
  6. package/fesm2022/ojiepermana-angular-chart-line.mjs +5 -5
  7. package/fesm2022/ojiepermana-angular-chart-pie.mjs +5 -5
  8. package/fesm2022/ojiepermana-angular-chart-primitives.mjs +33 -33
  9. package/fesm2022/ojiepermana-angular-chart-radar.mjs +5 -5
  10. package/fesm2022/ojiepermana-angular-chart-radial.mjs +5 -5
  11. package/fesm2022/ojiepermana-angular-chart-scatter.mjs +3 -3
  12. package/fesm2022/ojiepermana-angular-component-accordion.mjs +17 -17
  13. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +27 -27
  14. package/fesm2022/ojiepermana-angular-component-alert.mjs +12 -12
  15. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +3 -3
  16. package/fesm2022/ojiepermana-angular-component-avatar.mjs +18 -18
  17. package/fesm2022/ojiepermana-angular-component-badge.mjs +9 -9
  18. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +21 -21
  19. package/fesm2022/ojiepermana-angular-component-button-group.mjs +10 -10
  20. package/fesm2022/ojiepermana-angular-component-button.mjs +4 -4
  21. package/fesm2022/ojiepermana-angular-component-calendar.mjs +5 -5
  22. package/fesm2022/ojiepermana-angular-component-card.mjs +27 -24
  23. package/fesm2022/ojiepermana-angular-component-carousel.mjs +18 -18
  24. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +4 -4
  25. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +12 -12
  26. package/fesm2022/ojiepermana-angular-component-combobox.mjs +3 -3
  27. package/fesm2022/ojiepermana-angular-component-command.mjs +28 -28
  28. package/fesm2022/ojiepermana-angular-component-composer.mjs +22 -22
  29. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +3 -3
  30. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +5 -5
  31. package/fesm2022/ojiepermana-angular-component-dialog.mjs +22 -22
  32. package/fesm2022/ojiepermana-angular-component-drawer.mjs +1 -2
  33. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +39 -39
  34. package/fesm2022/ojiepermana-angular-component-editor.mjs +21 -21
  35. package/fesm2022/ojiepermana-angular-component-empty.mjs +19 -19
  36. package/fesm2022/ojiepermana-angular-component-form.mjs +36 -36
  37. package/fesm2022/ojiepermana-angular-component-hover-card.mjs +9 -9
  38. package/fesm2022/ojiepermana-angular-component-icon.mjs +114 -105
  39. package/fesm2022/ojiepermana-angular-component-input-group.mjs +19 -19
  40. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +16 -16
  41. package/fesm2022/ojiepermana-angular-component-input.mjs +6 -6
  42. package/fesm2022/ojiepermana-angular-component-item.mjs +31 -31
  43. package/fesm2022/ojiepermana-angular-component-kanban.mjs +29 -29
  44. package/fesm2022/ojiepermana-angular-component-kbd.mjs +7 -7
  45. package/fesm2022/ojiepermana-angular-component-label.mjs +3 -3
  46. package/fesm2022/ojiepermana-angular-component-menubar.mjs +13 -13
  47. package/fesm2022/ojiepermana-angular-component-native-select.mjs +14 -14
  48. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +21 -21
  49. package/fesm2022/ojiepermana-angular-component-pagination.mjs +3 -3
  50. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +16 -16
  51. package/fesm2022/ojiepermana-angular-component-popover.mjs +6 -6
  52. package/fesm2022/ojiepermana-angular-component-progress.mjs +3 -3
  53. package/fesm2022/ojiepermana-angular-component-radio.mjs +7 -7
  54. package/fesm2022/ojiepermana-angular-component-resizable.mjs +12 -12
  55. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +3 -3
  56. package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +6 -8
  57. package/fesm2022/ojiepermana-angular-component-select.mjs +8 -8
  58. package/fesm2022/ojiepermana-angular-component-separator.mjs +3 -3
  59. package/fesm2022/ojiepermana-angular-component-sheet.mjs +41 -28
  60. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +3 -3
  61. package/fesm2022/ojiepermana-angular-component-slider.mjs +10 -10
  62. package/fesm2022/ojiepermana-angular-component-spinner.mjs +3 -3
  63. package/fesm2022/ojiepermana-angular-component-switch.mjs +4 -4
  64. package/fesm2022/ojiepermana-angular-component-table.mjs +24 -24
  65. package/fesm2022/ojiepermana-angular-component-tabs.mjs +18 -18
  66. package/fesm2022/ojiepermana-angular-component-textarea.mjs +6 -6
  67. package/fesm2022/ojiepermana-angular-component-timeline.mjs +19 -19
  68. package/fesm2022/ojiepermana-angular-component-toast.mjs +5 -5
  69. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +9 -9
  70. package/fesm2022/ojiepermana-angular-component-toggle.mjs +5 -5
  71. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +15 -15
  72. package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +3 -3
  73. package/fesm2022/ojiepermana-angular-navigation-icon.mjs +3 -3
  74. package/fesm2022/{ojiepermana-angular-navigation-navigation-badge-count.component-BKCeWzml.mjs → ojiepermana-angular-navigation-navigation-badge-count.component-4RIokl1C.mjs} +3 -3
  75. package/fesm2022/{ojiepermana-angular-navigation-navigation-dockbar-menu.component-DFEJK2jD.mjs → ojiepermana-angular-navigation-navigation-dockbar-menu.component-CGfu2V6f.mjs} +23 -15
  76. package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-mpK9Ar08.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-zBCXDa4c.mjs} +38 -66
  77. package/fesm2022/{ojiepermana-angular-navigation-navigation-flyout-menu.component-BPgH7FJk.mjs → ojiepermana-angular-navigation-navigation-flyout-menu.component-DYkYIIHd.mjs} +14 -13
  78. package/fesm2022/{ojiepermana-angular-navigation-navigation-horizontal.component-DMpYcD9t.mjs → ojiepermana-angular-navigation-navigation-horizontal.component-LNTertHr.mjs} +5 -5
  79. package/fesm2022/{ojiepermana-angular-navigation-navigation-item.component-Basp5SIk.mjs → ojiepermana-angular-navigation-navigation-item.component-DiGOcizS.mjs} +42 -52
  80. package/fesm2022/{ojiepermana-angular-navigation-navigation-list.component-YUzHI9Pj.mjs → ojiepermana-angular-navigation-navigation-list.component-DB22Gl-5.mjs} +22 -6
  81. package/fesm2022/ojiepermana-angular-navigation-service.mjs +16 -6
  82. package/fesm2022/ojiepermana-angular-navigation-types.mjs +113 -1
  83. package/fesm2022/ojiepermana-angular-navigation.mjs +304 -93
  84. package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +137 -72
  85. package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +6 -6
  86. package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +265 -49
  87. package/fesm2022/ojiepermana-angular-theme-layout.mjs +30 -30
  88. package/fesm2022/ojiepermana-angular-theme-page-core.mjs +3 -3
  89. package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +7 -7
  90. package/fesm2022/ojiepermana-angular-theme-page-overview.mjs +3 -3
  91. package/fesm2022/ojiepermana-angular-theme-page-root.mjs +8 -6
  92. package/fesm2022/ojiepermana-angular-theme-page-side.mjs +7 -7
  93. package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +12 -12
  94. package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +3 -3
  95. package/fesm2022/ojiepermana-angular-theme-shell.mjs +16 -12
  96. package/fesm2022/ojiepermana-angular-theme-styles.mjs +17 -33
  97. package/navigation/README.md +70 -19
  98. package/package.json +3 -2
  99. package/theme/README.md +4 -10
  100. package/theme/page/README.md +2 -0
  101. package/theme/shell/README.md +5 -1
  102. package/theme/styles/README.md +32 -8
  103. package/theme/styles/css/base/components.css +13 -9
  104. package/theme/styles/css/base/tailwind.css +43 -0
  105. package/theme/styles/css/base/theme.css +4 -25
  106. package/theme/styles/css/base/tokens.css +21 -0
  107. package/theme/styles/css/fonts.css +85 -0
  108. package/types/ojiepermana-angular-chart-radar.d.ts +2 -1
  109. package/types/ojiepermana-angular-component-avatar.d.ts +2 -1
  110. package/types/ojiepermana-angular-component-calendar.d.ts +2 -1
  111. package/types/ojiepermana-angular-component-card.d.ts +7 -2
  112. package/types/ojiepermana-angular-component-command.d.ts +1 -1
  113. package/types/ojiepermana-angular-component-editor.d.ts +2 -1
  114. package/types/ojiepermana-angular-component-icon.d.ts +64 -79
  115. package/types/ojiepermana-angular-component-input-otp.d.ts +2 -1
  116. package/types/ojiepermana-angular-component-pillbox.d.ts +2 -1
  117. package/types/ojiepermana-angular-component-radio.d.ts +2 -1
  118. package/types/ojiepermana-angular-component-resizable.d.ts +2 -1
  119. package/types/ojiepermana-angular-component-segmented-control.d.ts +1 -1
  120. package/types/ojiepermana-angular-component-select.d.ts +2 -1
  121. package/types/ojiepermana-angular-navigation-service.d.ts +8 -0
  122. package/types/ojiepermana-angular-navigation-types.d.ts +48 -3
  123. package/types/ojiepermana-angular-navigation.d.ts +59 -8
  124. package/types/ojiepermana-angular-theme-component-settings.d.ts +5 -3
  125. package/types/ojiepermana-angular-theme-layout-services.d.ts +2 -1
  126. package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +52 -4
  127. package/types/ojiepermana-angular-theme-page-root.d.ts +1 -1
  128. package/types/ojiepermana-angular-theme-shell-services.d.ts +2 -1
  129. package/types/ojiepermana-angular-theme-styles.d.ts +0 -12
@@ -1,10 +1,11 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { Component, computed, inject, input, output, signal } from "@angular/core";
3
- import { RouterLink, RouterLinkActive } from "@angular/router";
3
+ import { ActivatedRoute, Router, RouterLink } from "@angular/router";
4
4
  import { cn } from "@ojiepermana/angular/component/utils/core";
5
- import { NAVIGATION_ADAPTER } from "@ojiepermana/angular/navigation/core";
5
+ import { NAVIGATION_ADAPTER, NAVIGATION_ROUTE_CONTEXT_ADAPTER } from "@ojiepermana/angular/navigation/core";
6
6
  import { NgTemplateOutlet } from "@angular/common";
7
- import { IconComponent } from "@ojiepermana/angular/component/icon";
7
+ import { LucideChevronRight } from "@lucide/angular";
8
+ import { IconComponent, provideIcons } from "@ojiepermana/angular/component/icon";
8
9
  import { TooltipDirective } from "@ojiepermana/angular/component/tooltip";
9
10
  var NavigationItemContentComponent = class NavigationItemContentComponent {
10
11
  nav = inject(NAVIGATION_ADAPTER);
@@ -14,7 +15,7 @@ var NavigationItemContentComponent = class NavigationItemContentComponent {
14
15
  orientation = input("vertical", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
15
16
  level = input(0, ...ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []);
16
17
  iconTemplate = input(void 0, ...ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []);
17
- iconSlotClasses = computed(() => cn("relative z-10 inline-flex shrink-0 items-center justify-center transition-colors duration-200", this.compact() && "mx-auto", this.active() ? "text-current" : "text-muted-foreground group-hover/nav:text-current"), ...ngDevMode ? [{ debugName: "iconSlotClasses" }] : /* istanbul ignore next */ []);
18
+ iconSlotClasses = computed(() => cn("relative z-10 inline-flex shrink-0 items-center justify-center transition-colors duration-normal", this.compact() && "mx-auto", this.active() ? "text-current" : "text-muted-foreground group-hover/nav:text-current"), ...ngDevMode ? [{ debugName: "iconSlotClasses" }] : /* istanbul ignore next */ []);
18
19
  titleClasses = computed(() => cn("block truncate", this.active() && "text-foreground", this.item().classes?.title), ...ngDevMode ? [{ debugName: "titleClasses" }] : /* istanbul ignore next */ []);
19
20
  showSubtitle = computed(() => !!this.item().subtitle && !(this.orientation() === "horizontal" && this.level() === 0), ...ngDevMode ? [{ debugName: "showSubtitle" }] : /* istanbul ignore next */ []);
20
21
  subtitleClasses = computed(() => cn("nav-subtitle block truncate text-muted-foreground", this.item().classes?.subtitle), ...ngDevMode ? [{ debugName: "subtitleClasses" }] : /* istanbul ignore next */ []);
@@ -27,7 +28,7 @@ var NavigationItemContentComponent = class NavigationItemContentComponent {
27
28
  }
28
29
  static ɵfac = i0.ɵɵngDeclareFactory({
29
30
  minVersion: "12.0.0",
30
- version: "22.2.0",
31
+ version: "22.2.3",
31
32
  ngImport: i0,
32
33
  type: NavigationItemContentComponent,
33
34
  deps: [],
@@ -35,7 +36,7 @@ var NavigationItemContentComponent = class NavigationItemContentComponent {
35
36
  });
36
37
  static ɵcmp = i0.ɵɵngDeclareComponent({
37
38
  minVersion: "17.0.0",
38
- version: "22.2.0",
39
+ version: "22.2.3",
39
40
  type: NavigationItemContentComponent,
40
41
  isStandalone: true,
41
42
  selector: "NavigationItemContent",
@@ -94,7 +95,7 @@ var NavigationItemContentComponent = class NavigationItemContentComponent {
94
95
  [ngTemplateOutletContext]="iconContext()"
95
96
  />
96
97
  } @else {
97
- <Icon [name]="iconName" [class]="defaultIconClasses()" size="inherit" [fill]="1" />
98
+ <Icon [name]="iconName" [class]="defaultIconClasses()" size="inherit" />
98
99
  }
99
100
  </span>
100
101
  }
@@ -134,17 +135,15 @@ var NavigationItemContentComponent = class NavigationItemContentComponent {
134
135
  "name",
135
136
  "class",
136
137
  "size",
137
- "fill",
138
- "weight",
139
- "grade",
140
- "opticalSize"
138
+ "strokeWidth",
139
+ "label"
141
140
  ]
142
141
  }]
143
142
  });
144
143
  };
145
144
  i0.ɵɵngDeclareClassMetadata({
146
145
  minVersion: "12.0.0",
147
- version: "22.2.0",
146
+ version: "22.2.3",
148
147
  ngImport: i0,
149
148
  type: NavigationItemContentComponent,
150
149
  decorators: [{
@@ -162,7 +161,7 @@ i0.ɵɵngDeclareClassMetadata({
162
161
  [ngTemplateOutletContext]="iconContext()"
163
162
  />
164
163
  } @else {
165
- <Icon [name]="iconName" [class]="defaultIconClasses()" size="inherit" [fill]="1" />
164
+ <Icon [name]="iconName" [class]="defaultIconClasses()" size="inherit" />
166
165
  }
167
166
  </span>
168
167
  }
@@ -248,6 +247,9 @@ function safeNavId(value) {
248
247
  }
249
248
  var NavigationItemComponent = class NavigationItemComponent {
250
249
  nav = inject(NAVIGATION_ADAPTER);
250
+ routeContext = inject(NAVIGATION_ROUTE_CONTEXT_ADAPTER);
251
+ router = inject(Router, { optional: true });
252
+ activatedRoute = inject(ActivatedRoute, { optional: true });
251
253
  navId = input("default", ...ngDevMode ? [{ debugName: "navId" }] : /* istanbul ignore next */ []);
252
254
  item = input.required(...ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []);
253
255
  level = input(0, ...ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []);
@@ -275,6 +277,12 @@ var NavigationItemComponent = class NavigationItemComponent {
275
277
  userToggled = signal(false, ...ngDevMode ? [{ debugName: "userToggled" }] : /* istanbul ignore next */ []);
276
278
  isHorizontalRoot = computed(() => this.orientation() === "horizontal" && this.level() === 0, ...ngDevMode ? [{ debugName: "isHorizontalRoot" }] : /* istanbul ignore next */ []);
277
279
  isActive = computed(() => this.nav.isItemActive(this.item(), this.activeIds(), this.activeUrl()), ...ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []);
280
+ isRouteActive = computed(() => {
281
+ const item = this.item();
282
+ if (item.disabled || !this.router?.lastSuccessfulNavigation()) return false;
283
+ return this.routeContext.isItemRouteActive(item, null, this.activatedRoute);
284
+ }, ...ngDevMode ? [{ debugName: "isRouteActive" }] : /* istanbul ignore next */ []);
285
+ isRouterItemActive = computed(() => this.isRouteActive() || this.isActive(), ...ngDevMode ? [{ debugName: "isRouterItemActive" }] : /* istanbul ignore next */ []);
278
286
  showChildren = computed(() => !this.compact() && this.isOpen(), ...ngDevMode ? [{ debugName: "showChildren" }] : /* istanbul ignore next */ []);
279
287
  hostClasses = computed(() => {
280
288
  if (this.item().type === "divider") return this.dividerClasses();
@@ -305,9 +313,6 @@ var NavigationItemComponent = class NavigationItemComponent {
305
313
  relFor() {
306
314
  return this.nav.relFor(this.item());
307
315
  }
308
- routerLinkActiveOptions() {
309
- return this.nav.routerLinkActiveOptions(this.item());
310
- }
311
316
  itemRole() {
312
317
  return this.nav.itemRole(this.orientation(), this.level());
313
318
  }
@@ -355,11 +360,11 @@ var NavigationItemComponent = class NavigationItemComponent {
355
360
  }
356
361
  interactiveStateClasses(active) {
357
362
  const showsNestedActiveConnector = active && this.orientation() === "vertical" && !this.compact() && this.stairsRail();
358
- 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-200 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))] 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");
359
364
  return active ? "text-foreground bg-accent" : "text-foreground/80 hover:bg-accent hover:text-accent-foreground";
360
365
  }
361
366
  chevronClasses() {
362
- return cn("ml-auto shrink-0 self-center text-(length:--nav-icon-size-sub) text-muted-foreground transition-transform duration-200", this.isOpen() && "rotate-90");
367
+ return cn("ml-auto shrink-0 self-center text-(length:--nav-icon-size-sub) text-muted-foreground transition-transform duration-normal", this.isOpen() && "rotate-90");
363
368
  }
364
369
  itemContainerClasses() {
365
370
  return cn(this.orientation() === "horizontal" && this.level() === 0 ? "relative" : "w-full", this.compact() && "flex justify-center", this.straightRailClasses());
@@ -390,7 +395,7 @@ var NavigationItemComponent = class NavigationItemComponent {
390
395
  }
391
396
  static ɵfac = i0.ɵɵngDeclareFactory({
392
397
  minVersion: "12.0.0",
393
- version: "22.2.0",
398
+ version: "22.2.3",
394
399
  ngImport: i0,
395
400
  type: NavigationItemComponent,
396
401
  deps: [],
@@ -398,7 +403,7 @@ var NavigationItemComponent = class NavigationItemComponent {
398
403
  });
399
404
  static ɵcmp = i0.ɵɵngDeclareComponent({
400
405
  minVersion: "17.0.0",
401
- version: "22.2.0",
406
+ version: "22.2.3",
402
407
  type: NavigationItemComponent,
403
408
  isStandalone: true,
404
409
  selector: "li[NavigationItem]",
@@ -533,6 +538,7 @@ var NavigationItemComponent = class NavigationItemComponent {
533
538
  "attr.data-navigation-item-key": "item().key",
534
539
  "attr.aria-hidden": "item().type === \"spacer\" || item().type === \"divider\" ? \"true\" : null"
535
540
  } },
541
+ providers: [provideIcons(LucideChevronRight)],
536
542
  ngImport: i0,
537
543
  template: `
538
544
  @switch (item().type) {
@@ -590,7 +596,7 @@ var NavigationItemComponent = class NavigationItemComponent {
590
596
  />
591
597
 
592
598
  @if (!compact()) {
593
- <Icon name="chevron_right" size="inherit" [class]="chevronClasses()" />
599
+ <Icon name="chevron-right" size="inherit" [class]="chevronClasses()" />
594
600
  }
595
601
  </button>
596
602
 
@@ -618,7 +624,7 @@ var NavigationItemComponent = class NavigationItemComponent {
618
624
  @default {
619
625
  @if (isRouterItem()) {
620
626
  <a
621
- [class]="leafClasses(routerActive.isActive || isActive())"
627
+ [class]="leafClasses(isRouterItemActive())"
622
628
  [routerLink]="routerLinkFor()"
623
629
  [queryParams]="item().queryParams ?? null"
624
630
  [queryParamsHandling]="item().queryParamsHandling ?? null"
@@ -626,10 +632,7 @@ var NavigationItemComponent = class NavigationItemComponent {
626
632
  [preserveFragment]="item().preserveFragment ?? false"
627
633
  [target]="item().target ?? undefined"
628
634
  [attr.rel]="relFor()"
629
- routerLinkActive
630
- #routerActive="routerLinkActive"
631
- [routerLinkActiveOptions]="routerLinkActiveOptions()"
632
- [attr.aria-current]="routerActive.isActive || isActive() ? 'page' : null"
635
+ [attr.aria-current]="isRouterItemActive() ? 'page' : null"
633
636
  [attr.aria-disabled]="item().disabled || null"
634
637
  [attr.tabindex]="leafTabIndex()"
635
638
  [attr.aria-label]="compactLabel()"
@@ -642,7 +645,7 @@ var NavigationItemComponent = class NavigationItemComponent {
642
645
  >
643
646
  <NavigationItemContent
644
647
  [item]="item()"
645
- [active]="routerActive.isActive || isActive()"
648
+ [active]="isRouterItemActive()"
646
649
  [compact]="compact()"
647
650
  [orientation]="orientation()"
648
651
  [level]="level()"
@@ -683,6 +686,8 @@ var NavigationItemComponent = class NavigationItemComponent {
683
686
  [attr.aria-current]="isActive() ? 'page' : null"
684
687
  [attr.aria-label]="compactLabel()"
685
688
  [attr.title]="titleFor()"
689
+ [Tooltip]="compact() ? (titleFor() ?? '') : ''"
690
+ [TooltipPosition]="tooltipPosition()"
686
691
  [attr.role]="itemRole()"
687
692
  [attr.data-navigation-root-item]="isHorizontalRoot() ? 'true' : null"
688
693
  (click)="selectItem($event)"
@@ -773,10 +778,8 @@ var NavigationItemComponent = class NavigationItemComponent {
773
778
  "name",
774
779
  "class",
775
780
  "size",
776
- "fill",
777
- "weight",
778
- "grade",
779
- "opticalSize"
781
+ "strokeWidth",
782
+ "label"
780
783
  ]
781
784
  },
782
785
  {
@@ -821,18 +824,6 @@ var NavigationItemComponent = class NavigationItemComponent {
821
824
  "routerLink"
822
825
  ]
823
826
  },
824
- {
825
- kind: "directive",
826
- type: RouterLinkActive,
827
- selector: "[routerLinkActive]",
828
- inputs: [
829
- "routerLinkActiveOptions",
830
- "ariaCurrentWhenActive",
831
- "routerLinkActive"
832
- ],
833
- outputs: ["isActiveChange"],
834
- exportAs: ["routerLinkActive"]
835
- },
836
827
  {
837
828
  kind: "directive",
838
829
  type: TooltipDirective,
@@ -851,7 +842,7 @@ var NavigationItemComponent = class NavigationItemComponent {
851
842
  };
852
843
  i0.ɵɵngDeclareClassMetadata({
853
844
  minVersion: "12.0.0",
854
- version: "22.2.0",
845
+ version: "22.2.3",
855
846
  ngImport: i0,
856
847
  type: NavigationItemComponent,
857
848
  decorators: [{
@@ -863,9 +854,9 @@ i0.ɵɵngDeclareClassMetadata({
863
854
  NavigationItemContentComponent,
864
855
  NgTemplateOutlet,
865
856
  RouterLink,
866
- RouterLinkActive,
867
857
  TooltipDirective
868
858
  ],
859
+ providers: [provideIcons(LucideChevronRight)],
869
860
  host: {
870
861
  "[class]": "hostClasses()",
871
862
  "[attr.role]": "hostRole()",
@@ -928,7 +919,7 @@ i0.ɵɵngDeclareClassMetadata({
928
919
  />
929
920
 
930
921
  @if (!compact()) {
931
- <Icon name="chevron_right" size="inherit" [class]="chevronClasses()" />
922
+ <Icon name="chevron-right" size="inherit" [class]="chevronClasses()" />
932
923
  }
933
924
  </button>
934
925
 
@@ -956,7 +947,7 @@ i0.ɵɵngDeclareClassMetadata({
956
947
  @default {
957
948
  @if (isRouterItem()) {
958
949
  <a
959
- [class]="leafClasses(routerActive.isActive || isActive())"
950
+ [class]="leafClasses(isRouterItemActive())"
960
951
  [routerLink]="routerLinkFor()"
961
952
  [queryParams]="item().queryParams ?? null"
962
953
  [queryParamsHandling]="item().queryParamsHandling ?? null"
@@ -964,10 +955,7 @@ i0.ɵɵngDeclareClassMetadata({
964
955
  [preserveFragment]="item().preserveFragment ?? false"
965
956
  [target]="item().target ?? undefined"
966
957
  [attr.rel]="relFor()"
967
- routerLinkActive
968
- #routerActive="routerLinkActive"
969
- [routerLinkActiveOptions]="routerLinkActiveOptions()"
970
- [attr.aria-current]="routerActive.isActive || isActive() ? 'page' : null"
958
+ [attr.aria-current]="isRouterItemActive() ? 'page' : null"
971
959
  [attr.aria-disabled]="item().disabled || null"
972
960
  [attr.tabindex]="leafTabIndex()"
973
961
  [attr.aria-label]="compactLabel()"
@@ -980,7 +968,7 @@ i0.ɵɵngDeclareClassMetadata({
980
968
  >
981
969
  <NavigationItemContent
982
970
  [item]="item()"
983
- [active]="routerActive.isActive || isActive()"
971
+ [active]="isRouterItemActive()"
984
972
  [compact]="compact()"
985
973
  [orientation]="orientation()"
986
974
  [level]="level()"
@@ -1021,6 +1009,8 @@ i0.ɵɵngDeclareClassMetadata({
1021
1009
  [attr.aria-current]="isActive() ? 'page' : null"
1022
1010
  [attr.aria-label]="compactLabel()"
1023
1011
  [attr.title]="titleFor()"
1012
+ [Tooltip]="compact() ? (titleFor() ?? '') : ''"
1013
+ [TooltipPosition]="tooltipPosition()"
1024
1014
  [attr.role]="itemRole()"
1025
1015
  [attr.data-navigation-root-item]="isHorizontalRoot() ? 'true' : null"
1026
1016
  (click)="selectItem($event)"
@@ -1,4 +1,4 @@
1
- import { t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-Basp5SIk.mjs";
1
+ import { t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DiGOcizS.mjs";
2
2
  import * as i0 from "@angular/core";
3
3
  import { Component, computed, input, output } from "@angular/core";
4
4
  import { cn } from "@ojiepermana/angular/component/utils/core";
@@ -7,6 +7,7 @@ var NavigationListComponent = class NavigationListComponent {
7
7
  items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
8
8
  collapsed = input(false, ...ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []);
9
9
  compact = input(false, ...ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []);
10
+ fill = input(false, ...ngDevMode ? [{ debugName: "fill" }] : /* istanbul ignore next */ []);
10
11
  position = input("left", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
11
12
  itemClass = input("", ...ngDevMode ? [{ debugName: "itemClass" }] : /* istanbul ignore next */ []);
12
13
  activeIds = input(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "activeIds" }] : /* istanbul ignore next */ []);
@@ -17,11 +18,11 @@ var NavigationListComponent = class NavigationListComponent {
17
18
  openedIdsChange = output();
18
19
  itemSelected = output();
19
20
  isCollapsed = computed(() => this.collapsed() || this.compact(), ...ngDevMode ? [{ debugName: "isCollapsed" }] : /* istanbul ignore next */ []);
20
- hostClasses = computed(() => cn("block", this.position() === "right" && "items-end text-right"), ...ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []);
21
- listClasses = computed(() => this.isCollapsed() ? cn("flex list-none flex-col items-center gap-0.5 p-0") : cn("flex list-none flex-col gap-0.5 p-0", this.position() === "right" && "items-end"), ...ngDevMode ? [{ debugName: "listClasses" }] : /* istanbul ignore next */ []);
21
+ hostClasses = computed(() => this.fill() ? cn("flex flex-1 flex-col", this.position() === "right" && "text-right") : cn("block", this.position() === "right" && "items-end text-right"), ...ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []);
22
+ listClasses = computed(() => cn(this.isCollapsed() ? "flex list-none flex-col items-center gap-0.5 p-0" : cn("flex list-none flex-col gap-0.5 p-0", this.position() === "right" && "items-end"), this.fill() && "flex-1"), ...ngDevMode ? [{ debugName: "listClasses" }] : /* istanbul ignore next */ []);
22
23
  static ɵfac = i0.ɵɵngDeclareFactory({
23
24
  minVersion: "12.0.0",
24
- version: "22.2.0",
25
+ version: "22.2.3",
25
26
  ngImport: i0,
26
27
  type: NavigationListComponent,
27
28
  deps: [],
@@ -29,7 +30,7 @@ var NavigationListComponent = class NavigationListComponent {
29
30
  });
30
31
  static ɵcmp = i0.ɵɵngDeclareComponent({
31
32
  minVersion: "17.0.0",
32
- version: "22.2.0",
33
+ version: "22.2.3",
33
34
  type: NavigationListComponent,
34
35
  isStandalone: true,
35
36
  selector: "NavigationList",
@@ -62,6 +63,13 @@ var NavigationListComponent = class NavigationListComponent {
62
63
  isRequired: false,
63
64
  transformFunction: null
64
65
  },
66
+ fill: {
67
+ classPropertyName: "fill",
68
+ publicName: "fill",
69
+ isSignal: true,
70
+ isRequired: false,
71
+ transformFunction: null
72
+ },
65
73
  position: {
66
74
  classPropertyName: "position",
67
75
  publicName: "position",
@@ -173,7 +181,7 @@ var NavigationListComponent = class NavigationListComponent {
173
181
  };
174
182
  i0.ɵɵngDeclareClassMetadata({
175
183
  minVersion: "12.0.0",
176
- version: "22.2.0",
184
+ version: "22.2.3",
177
185
  ngImport: i0,
178
186
  type: NavigationListComponent,
179
187
  decorators: [{
@@ -242,6 +250,14 @@ i0.ɵɵngDeclareClassMetadata({
242
250
  required: false
243
251
  }]
244
252
  }],
253
+ fill: [{
254
+ type: i0.Input,
255
+ args: [{
256
+ isSignal: true,
257
+ alias: "fill",
258
+ required: false
259
+ }]
260
+ }],
245
261
  position: [{
246
262
  type: i0.Input,
247
263
  args: [{
@@ -1,4 +1,4 @@
1
- import { DOCUMENT } from "@angular/common";
1
+ import { DOCUMENT, Location } from "@angular/common";
2
2
  import * as i0 from "@angular/core";
3
3
  import { Service, computed, inject, isDevMode, signal } from "@angular/core";
4
4
  import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
@@ -94,13 +94,14 @@ var NavigationPersistence = class {
94
94
  }
95
95
  persistedTypeMode(state) {
96
96
  if (state.type === "dockbar") return state.dockbarMode;
97
+ if (state.type === "minidock") return "default";
97
98
  return state.collapsed ? "collapsed" : "default";
98
99
  }
99
100
  isPersistedTypeMode(value) {
100
101
  return value === "default" || value === "collapsed" || this.isDockbarMode(value);
101
102
  }
102
103
  isTypeForOrientation(value, orientation) {
103
- return orientation === "vertical" ? value === "sidebar" || value === "dockbar" : value === "navbar" || value === "flyout";
104
+ return orientation === "vertical" ? value === "sidebar" || value === "dockbar" || value === "minidock" : value === "navbar" || value === "flyout";
104
105
  }
105
106
  isPositionForOrientation(value, orientation) {
106
107
  return orientation === "vertical" ? value === "left" || value === "right" : value === "top" || value === "bottom";
@@ -212,7 +213,8 @@ var NavigationService = class NavigationService {
212
213
  persistence = new NavigationPersistence(this.documentRef);
213
214
  router = inject(Router, { optional: true });
214
215
  urlResolver = new NavigationActiveUrlResolver(this.router);
215
- routerUrl = signal(this.router?.url ?? "/", ...ngDevMode ? [{ debugName: "routerUrl" }] : /* istanbul ignore next */ []);
216
+ location = inject(Location, { optional: true });
217
+ routerUrl = signal(this.initialUrl(), ...ngDevMode ? [{ debugName: "routerUrl" }] : /* istanbul ignore next */ []);
216
218
  states = signal({}, ...ngDevMode ? [{ debugName: "states" }] : /* istanbul ignore next */ []);
217
219
  openPanelKeys = signal({}, ...ngDevMode ? [{ debugName: "openPanelKeys" }] : /* istanbul ignore next */ []);
218
220
  drawerOpenState = signal({}, ...ngDevMode ? [{ debugName: "drawerOpenState" }] : /* istanbul ignore next */ []);
@@ -249,6 +251,13 @@ var NavigationService = class NavigationService {
249
251
  releasePanelsAfterNavigation() {
250
252
  this.openPanelKeys.update((state) => Object.values(state).some((key) => key !== null) ? {} : state);
251
253
  }
254
+ initialUrl() {
255
+ if (this.router && !this.router.navigated) {
256
+ const path = this.location?.path(true);
257
+ if (path) return path;
258
+ }
259
+ return this.router?.url ?? "/";
260
+ }
252
261
  urlPath(url) {
253
262
  const end = url.search(/[?#]/);
254
263
  return end === -1 ? url : url.slice(0, end);
@@ -374,6 +383,7 @@ var NavigationService = class NavigationService {
374
383
  id: navId,
375
384
  orientation: "vertical"
376
385
  });
386
+ if (current.type === "minidock") return current;
377
387
  return this.setCollapsed(navId, !current.collapsed);
378
388
  }
379
389
  setDockbarMode(id, mode) {
@@ -523,7 +533,7 @@ var NavigationService = class NavigationService {
523
533
  }
524
534
  static ɵfac = i0.ɵɵngDeclareFactory({
525
535
  minVersion: "12.0.0",
526
- version: "22.2.0",
536
+ version: "22.2.3",
527
537
  ngImport: i0,
528
538
  type: NavigationService,
529
539
  deps: [],
@@ -531,14 +541,14 @@ var NavigationService = class NavigationService {
531
541
  });
532
542
  static ɵprov = i0.ɵɵngDeclareService({
533
543
  minVersion: "22.0.0",
534
- version: "22.2.0",
544
+ version: "22.2.3",
535
545
  ngImport: i0,
536
546
  type: NavigationService
537
547
  });
538
548
  };
539
549
  i0.ɵɵngDeclareClassMetadata({
540
550
  minVersion: "12.0.0",
541
- version: "22.2.0",
551
+ version: "22.2.3",
542
552
  ngImport: i0,
543
553
  type: NavigationService,
544
554
  decorators: [{ type: Service }],
@@ -36,4 +36,116 @@ function formatNavigationBadgeCount(value) {
36
36
  if (count <= 0) return null;
37
37
  return count > 99 ? "99+" : String(count);
38
38
  }
39
- export { NAVIGATION_DOCKBAR_FALLBACK_ICON, formatNavigationBadgeCount, normalizeUiNavItems };
39
+ const MINIDOCK_REJECTED_TYPES = /* @__PURE__ */ new Set([
40
+ "group",
41
+ "collapsible",
42
+ "collapsable",
43
+ "mega",
44
+ "aside"
45
+ ]);
46
+ const MINIDOCK_ERROR_PREFIX = "[Navigation] Minidock hanya menerima item basic, divider, dan spacer.";
47
+ function ɵcompactNavigationDividers(items) {
48
+ const result = [];
49
+ let run = [];
50
+ for (const item of items) {
51
+ if (item.type === "divider") {
52
+ run.push(item);
53
+ continue;
54
+ }
55
+ if (run.length > 0 && result.length > 0) result.push(run.find((divider) => !divider.isHidden) ?? run[0]);
56
+ run = [];
57
+ result.push(item);
58
+ }
59
+ return result;
60
+ }
61
+ function ɵassertMinidockItems(items) {
62
+ items.forEach((item, index) => {
63
+ const label = `Item [${index}] "${item.title ?? item.id ?? ""}"`;
64
+ if (item.type && MINIDOCK_REJECTED_TYPES.has(item.type)) throw new Error(`${MINIDOCK_ERROR_PREFIX} ${label} bertipe "${item.type}".`);
65
+ if ((item.children?.length ?? 0) > 0) throw new Error(`${MINIDOCK_ERROR_PREFIX} ${label} punya children.`);
66
+ });
67
+ }
68
+ function toMinidockItems(items) {
69
+ const output = [];
70
+ const seenIds = /* @__PURE__ */ new Set();
71
+ let boundaryPending = false;
72
+ const visit = (list, ancestors) => {
73
+ const topLevel = ancestors.length === 0;
74
+ for (const item of list) {
75
+ const children = item.children ?? [];
76
+ if (item.type === "divider") {
77
+ output.push(withAncestorVisibility(withoutChildren(item), ancestors));
78
+ boundaryPending = false;
79
+ continue;
80
+ }
81
+ if (item.type === "spacer") {
82
+ if (topLevel) {
83
+ output.push(withoutChildren(item));
84
+ boundaryPending = false;
85
+ }
86
+ continue;
87
+ }
88
+ if (item.type === "group" || item.type === "mega") {
89
+ const start = output.length;
90
+ const pendingBefore = boundaryPending;
91
+ const divider = { type: "divider" };
92
+ const isHidden = chainedVisibility([...ancestors, item]);
93
+ output.push(isHidden ? {
94
+ ...divider,
95
+ isHidden
96
+ } : divider);
97
+ boundaryPending = false;
98
+ visit(children, [...ancestors, item]);
99
+ if (!output.slice(start + 1).some(isContent)) {
100
+ output.length = start;
101
+ boundaryPending = pendingBefore;
102
+ continue;
103
+ }
104
+ boundaryPending = true;
105
+ continue;
106
+ }
107
+ if (item.type && MINIDOCK_REJECTED_TYPES.has(item.type)) {
108
+ visit(children, [...ancestors, item]);
109
+ continue;
110
+ }
111
+ if (children.length > 0) {
112
+ visit(children, [...ancestors, item]);
113
+ continue;
114
+ }
115
+ if (item.id !== void 0) {
116
+ if (seenIds.has(item.id)) continue;
117
+ seenIds.add(item.id);
118
+ }
119
+ if (boundaryPending) {
120
+ output.push({ type: "divider" });
121
+ boundaryPending = false;
122
+ }
123
+ output.push(withAncestorVisibility(item, ancestors));
124
+ }
125
+ };
126
+ visit(items, []);
127
+ return ɵcompactNavigationDividers(output);
128
+ }
129
+ function isContent(item) {
130
+ return item.type !== "divider";
131
+ }
132
+ function withoutChildren(item) {
133
+ if (item.children === void 0) return item;
134
+ const copy = { ...item };
135
+ delete copy.children;
136
+ return copy;
137
+ }
138
+ function chainedVisibility(chain) {
139
+ const hiders = chain.filter((entry) => entry.isHidden !== void 0);
140
+ if (hiders.length === 0) return null;
141
+ return () => hiders.some((entry) => entry.isHidden?.(entry) === true);
142
+ }
143
+ function withAncestorVisibility(leaf, ancestors) {
144
+ const ancestorHidden = chainedVisibility(ancestors);
145
+ if (ancestorHidden === null) return leaf;
146
+ return {
147
+ ...leaf,
148
+ isHidden: () => ancestorHidden(leaf) || leaf.isHidden?.(leaf) === true
149
+ };
150
+ }
151
+ export { NAVIGATION_DOCKBAR_FALLBACK_ICON, formatNavigationBadgeCount, normalizeUiNavItems, toMinidockItems, ɵassertMinidockItems, ɵcompactNavigationDividers };