@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.
- package/CHANGELOG.md +96 -0
- package/fesm2022/zambon-dev-library.mjs +68 -49
- package/fesm2022/zambon-dev-library.mjs.map +1 -1
- package/lib/components/sidebar/sidebar.component.d.ts +5 -7
- package/lib/components/sidebar-item/sidebar-item.component.d.ts +3 -2
- package/lib/models/sidebar/index.d.ts +1 -0
- package/lib/models/sidebar/sidebar-menu.d.ts +1 -0
- package/lib/models/sidebar/sidebar-region.d.ts +6 -0
- package/package.json +1 -1
- package/styles/variables.scss +22 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AfterViewInit, OnInit } from '@angular/core';
|
|
2
|
-
import {
|
|
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
|
|
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,
|
|
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
|
-
|
|
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, { "
|
|
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
|
}
|
package/package.json
CHANGED
package/styles/variables.scss
CHANGED
|
@@ -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
|
}
|