@ojiepermana/angular 21.1.19 → 21.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ojiepermana-angular-component.mjs +5 -3
- package/fesm2022/ojiepermana-angular-component.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-navigation.mjs +19 -15
- package/fesm2022/ojiepermana-angular-navigation.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ojiepermana-angular-component.d.ts +3 -1
- package/types/ojiepermana-angular-navigation.d.ts +1 -0
|
@@ -11,6 +11,7 @@ import { BreakpointObserver } from '@angular/cdk/layout';
|
|
|
11
11
|
import { Overlay } from '@angular/cdk/overlay';
|
|
12
12
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
13
13
|
import { FocusTrapFactory } from '@angular/cdk/a11y';
|
|
14
|
+
import { ScrollAreaComponent } from '@ojiepermana/angular/component';
|
|
14
15
|
import { merge } from 'rxjs';
|
|
15
16
|
|
|
16
17
|
/** Default registry key used when no id is specified. */
|
|
@@ -843,14 +844,13 @@ class SidebarComponent {
|
|
|
843
844
|
return base.join(' ');
|
|
844
845
|
}, ...(ngDevMode ? [{ debugName: "headerSlotClasses" }] : /* istanbul ignore next */ []));
|
|
845
846
|
navClasses = computed(() => {
|
|
846
|
-
const base = [
|
|
847
|
-
'flex-1 overflow-y-auto overflow-x-hidden scrollbar-thin scrollbar-thumb-primary scrollbar-track-primary/10',
|
|
848
|
-
];
|
|
847
|
+
const base = ['min-h-full'];
|
|
849
848
|
if (this.isCompact()) {
|
|
850
849
|
base.push('px-2', '[&_.ui-nav-text]:mx-auto', '[&_.ui-nav-text]:w-10', '[&_.ui-nav-text]:justify-center', '[&_.ui-nav-text]:px-0');
|
|
851
850
|
}
|
|
852
851
|
return base.join(' ');
|
|
853
852
|
}, ...(ngDevMode ? [{ debugName: "navClasses" }] : /* istanbul ignore next */ []));
|
|
853
|
+
scrollViewportClasses = computed(() => 'overflow-y-auto overflow-x-hidden scrollbar-thin scrollbar-thumb-primary scrollbar-track-primary/10', ...(ngDevMode ? [{ debugName: "scrollViewportClasses" }] : /* istanbul ignore next */ []));
|
|
854
854
|
footerClasses = computed(() => {
|
|
855
855
|
const base = ['h-12 border-t border-brand'];
|
|
856
856
|
if (this.isCompact()) {
|
|
@@ -980,11 +980,13 @@ class SidebarComponent {
|
|
|
980
980
|
}
|
|
981
981
|
</div>
|
|
982
982
|
}
|
|
983
|
-
<
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
983
|
+
<ui-scroll-area class="min-h-0 flex-1" [viewportClass]="scrollViewportClasses()">
|
|
984
|
+
<nav [class]="navClasses()">
|
|
985
|
+
@for (item of resolvedItems(); track item.id) {
|
|
986
|
+
<ui-nav-item [item]="item" [compact]="isCompact()" />
|
|
987
|
+
}
|
|
988
|
+
</nav>
|
|
989
|
+
</ui-scroll-area>
|
|
988
990
|
<div [class]="footerClasses()">
|
|
989
991
|
<div [class]="footerSlotClasses()">
|
|
990
992
|
<ng-content select="[sidebar-footer]" />
|
|
@@ -1003,14 +1005,14 @@ class SidebarComponent {
|
|
|
1003
1005
|
<ng-container [ngTemplateOutlet]="body" />
|
|
1004
1006
|
</div>
|
|
1005
1007
|
</ng-template>
|
|
1006
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: UiNavIconComponent, selector: "ui-nav-icon", inputs: ["name", "class", "size"] }, { kind: "component", type: UiNavItemComponent, selector: "ui-nav-item", inputs: ["item", "level", "compact"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1008
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ScrollAreaComponent, selector: "ui-scroll-area", inputs: ["class", "viewportClass"] }, { kind: "component", type: UiNavIconComponent, selector: "ui-nav-icon", inputs: ["name", "class", "size"] }, { kind: "component", type: UiNavItemComponent, selector: "ui-nav-item", inputs: ["item", "level", "compact"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1007
1009
|
}
|
|
1008
1010
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: SidebarComponent, decorators: [{
|
|
1009
1011
|
type: Component,
|
|
1010
1012
|
args: [{
|
|
1011
1013
|
selector: 'sidebar',
|
|
1012
1014
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1013
|
-
imports: [NgTemplateOutlet, UiNavIconComponent, UiNavItemComponent],
|
|
1015
|
+
imports: [NgTemplateOutlet, ScrollAreaComponent, UiNavIconComponent, UiNavItemComponent],
|
|
1014
1016
|
host: {
|
|
1015
1017
|
role: 'navigation',
|
|
1016
1018
|
'[attr.aria-label]': 'ariaLabel()',
|
|
@@ -1049,11 +1051,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1049
1051
|
}
|
|
1050
1052
|
</div>
|
|
1051
1053
|
}
|
|
1052
|
-
<
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1054
|
+
<ui-scroll-area class="min-h-0 flex-1" [viewportClass]="scrollViewportClasses()">
|
|
1055
|
+
<nav [class]="navClasses()">
|
|
1056
|
+
@for (item of resolvedItems(); track item.id) {
|
|
1057
|
+
<ui-nav-item [item]="item" [compact]="isCompact()" />
|
|
1058
|
+
}
|
|
1059
|
+
</nav>
|
|
1060
|
+
</ui-scroll-area>
|
|
1057
1061
|
<div [class]="footerClasses()">
|
|
1058
1062
|
<div [class]="footerSlotClasses()">
|
|
1059
1063
|
<ng-content select="[sidebar-footer]" />
|