@zambon-dev/library 1.1.1 → 1.3.1

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
1
  import { AfterViewInit, OnInit } from '@angular/core';
2
- import { ISidebarProfile, SidebarMenu } from '../../models';
2
+ import { SidebarMenu, SidebarRegion } from '../../models';
3
3
  import { BaseComponent } from '../base.component';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class SidebarComponent extends BaseComponent implements AfterViewInit, OnInit {
@@ -10,25 +10,23 @@ export declare class SidebarComponent extends BaseComponent implements AfterView
10
10
  private sidebarConfigs;
11
11
  protected configErrorText: string;
12
12
  protected configLoadingText: string;
13
- protected configLogoCollapsedPath?: string;
14
- protected configLogoExpandedPath?: string;
15
13
  protected hasFailed: boolean;
16
14
  protected menus: SidebarMenu[];
17
- protected profile?: ISidebarProfile;
15
+ protected regions: SidebarRegion[];
18
16
  private sidebarService;
19
17
  private wasClickedOutside;
20
- protected get hasProfileImage(): boolean;
21
18
  protected get isActive(): boolean;
22
19
  protected get isCollapsed(): boolean;
23
20
  protected get isLoading(): boolean;
24
- protected get isProfileLoaded(): boolean;
25
21
  constructor();
26
22
  ngAfterViewInit(): void;
27
23
  ngOnInit(): void;
28
24
  collapse(): void;
29
25
  protected trackByFn(_index: number, item: SidebarMenu): number;
26
+ protected trackByRegion(_index: number, region: SidebarRegion): string;
27
+ private groupIntoRegions;
30
28
  private deactivate;
31
29
  private updateShouldActivate;
32
30
  static ɵfac: i0.ɵɵFactoryDeclaration<SidebarComponent, never>;
33
- static ɵcmp: i0.ɵɵComponentDeclaration<SidebarComponent, "lib-sidebar", never, {}, {}, never, never, true, never>;
31
+ static ɵcmp: i0.ɵɵComponentDeclaration<SidebarComponent, "lib-sidebar", never, {}, {}, never, ["*"], true, never>;
34
32
  }
@@ -4,8 +4,9 @@ import { BaseComponent } from '../base.component';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class SidebarItemComponent extends BaseComponent implements OnInit, AfterViewInit {
6
6
  private menuContainer;
7
- menu: SidebarMenu;
7
+ isLast: boolean;
8
8
  level: number;
9
+ menu: SidebarMenu;
9
10
  protected hasFailed: boolean;
10
11
  protected isLoading: boolean;
11
12
  protected isSelected: boolean;
@@ -26,5 +27,5 @@ export declare class SidebarItemComponent extends BaseComponent implements OnIni
26
27
  private getChildHeight;
27
28
  private updateSubMenuHeight;
28
29
  static ɵfac: i0.ɵɵFactoryDeclaration<SidebarItemComponent, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<SidebarItemComponent, "lib-sidebar-item", never, { "menu": { "alias": "menu"; "required": false; }; "level": { "alias": "level"; "required": false; }; }, {}, never, never, true, never>;
30
+ static ɵcmp: i0.ɵɵComponentDeclaration<SidebarItemComponent, "lib-sidebar-item", never, { "isLast": { "alias": "isLast"; "required": false; }; "level": { "alias": "level"; "required": false; }; "menu": { "alias": "menu"; "required": false; }; }, {}, never, never, true, never>;
30
31
  }
@@ -1,3 +1,4 @@
1
1
  export * from './sidebar-configs';
2
2
  export * from './sidebar-menu';
3
3
  export * from './sidebar-profile';
4
+ export * from './sidebar-region';
@@ -7,6 +7,7 @@ export declare class SidebarMenu {
7
7
  label: string;
8
8
  isSelected: boolean;
9
9
  parent: SidebarMenu | null;
10
+ region?: string;
10
11
  url?: string;
11
12
  constructor(options?: Partial<SidebarMenu>);
12
13
  }
@@ -0,0 +1,6 @@
1
+ import { SidebarMenu } from './sidebar-menu';
2
+ /** A named group of top-level sidebar menu items, rendered under a region header. */
3
+ export interface SidebarRegion {
4
+ items: SidebarMenu[];
5
+ name?: string;
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zambon-dev/library",
3
- "version": "1.1.1",
3
+ "version": "1.3.1",
4
4
  "description": "Angular UI components and shared presentation utilities for Zambon applications.",
5
5
  "keywords": [
6
6
  "angular",
@@ -1,4 +1,5 @@
1
1
  :root {
2
+ /* Dimensions */
2
3
  --sidebar-animation-duration: 600ms;
3
4
  --sidebar-collapsed-width: 70px;
4
5
  --sidebar-expanded-width: 220px;
@@ -6,4 +7,25 @@
6
7
  --sidebar-item-height: 2.75rem;
7
8
  --sidebar-logo-height: 50px;
8
9
  --sidebar-picture-size: 50px;
10
+
11
+ /* Surfaces & colors — translucent "glass" (brand-tinted) */
12
+ --sidebar-bg: color-mix(in srgb, theme('colors.primary.600') 82%, transparent);
13
+ --sidebar-nav-bg: color-mix(in srgb, white 5%, transparent);
14
+ --sidebar-text: theme('colors.gray.100');
15
+ --sidebar-text-muted: color-mix(in srgb, theme('colors.gray.100') 60%, transparent);
16
+ --sidebar-item-hover-bg: color-mix(in srgb, white 12%, transparent);
17
+ --sidebar-item-selected-bg: color-mix(in srgb, white 22%, transparent);
18
+ --sidebar-item-selected-text: theme('colors.white');
19
+ --sidebar-accent: theme('colors.gray.100');
20
+ --sidebar-tree-line: color-mix(in srgb, white 80%, theme('colors.primary.600'));
21
+
22
+ /* Glass */
23
+ --sidebar-blur: 16px;
24
+ --sidebar-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.45);
25
+ /* App background the glass sidebar floats over (tune to taste). */
26
+ --app-backdrop: linear-gradient(160deg, theme('colors.gray.100') 0%, theme('colors.gray.300') 100%);
27
+
28
+ /* Radii (rounded restyle) */
29
+ --sidebar-radius: 1.25rem;
30
+ --sidebar-item-radius: 10px;
9
31
  }