|
1 | 1 | <div class="pt-4" *ngFor="let menu of menuService.pagesMenu">
|
2 | 2 | <div class="mx-1 mb-2 flex items-center justify-between">
|
3 |
| - <small class="text-muted-foreground text-xs font-semibold"> |
| 3 | + <small class="text-muted-foreground/50 text-xs font-semibold"> |
4 | 4 | {{ menu.group }}
|
5 | 5 | </small>
|
6 | 6 | </div>
|
7 |
| - <ul class="flex flex-col space-y-1"> |
| 7 | + <ul class="flex flex-col"> |
8 | 8 | <!-- List items -->
|
9 | 9 | <li *ngFor="let item of menu.items">
|
10 | 10 | <!-- Menu List -->
|
11 |
| - <div (click)="toggleMenu(item)" class="text-muted-foreground hover:text-foreground group relative"> |
| 11 | + <div |
| 12 | + (click)="toggleMenu(item)" |
| 13 | + class="text-muted-foreground hover:text-foreground group flex grow items-center gap-4"> |
12 | 14 | <!-- Icon -->
|
13 | 15 | <div
|
14 | 16 | [ngClass]="item.active && !menuService.showSideBar ? 'text-primary' : 'text-muted-foreground/50'"
|
15 |
| - class="pointer-events-none absolute m-2"> |
| 17 | + class="pointer-events-none"> |
16 | 18 | <svg-icon src="{{ item.icon }}" [svgClass]="'h-5 w-5'"> </svg-icon>
|
17 | 19 | </div>
|
18 | 20 |
|
|
26 | 28 | <ng-template #parentMenu let-item="item">
|
27 | 29 | <div
|
28 | 30 | routerLink="{{ item.route }}"
|
29 |
| - class="hover:bg-card flex h-9 cursor-pointer items-center justify-start rounded-sm"> |
| 31 | + class="text-muted-foreground hover:text-primary flex h-[36px] cursor-pointer items-center justify-start rounded-sm"> |
30 | 32 | <a
|
31 | 33 | routerLinkActive="text-primary"
|
32 |
| - (click)="closeMenu()" |
33 |
| - class="truncate text-xs font-semibold tracking-wide focus:outline-hidden ltr:ml-10 rtl:mr-10"> |
| 34 | + class="truncate text-xs font-semibold tracking-wide focus:outline-hidden"> |
34 | 35 | {{ item.label }}
|
35 | 36 | </a>
|
36 | 37 | </div>
|
37 | 38 | </ng-template>
|
38 | 39 |
|
39 | 40 | <!-- Workaround:: Disable routerLink -->
|
40 | 41 | <ng-template #childMenu let-item="item">
|
41 |
| - <div class="hover:bg-card flex h-9 cursor-pointer items-center justify-start rounded-sm"> |
42 |
| - <a class="truncate text-xs font-semibold tracking-wide focus:outline-hidden ltr:ml-10 rtl:mr-10"> |
| 42 | + <div class="flex h-9 grow cursor-pointer items-center justify-start rounded-sm"> |
| 43 | + <a |
| 44 | + class="text-muted-foreground group-hover:text-primary truncate text-xs font-semibold tracking-wide focus:outline-hidden"> |
43 | 45 | {{ item.label }}
|
44 | 46 | </a>
|
45 | 47 | </div>
|
|
48 | 50 | <!-- Arrow Icon -->
|
49 | 51 | <button
|
50 | 52 | *ngIf="item.children"
|
51 |
| - [ngClass]="{ hidden: !menuService.showSideBar, 'rotate-90': item.expanded }" |
52 |
| - class="text-muted-foreground/50 pointer-events-none absolute top-1 flex items-center p-1 transition-all duration-500 ltr:right-0 rtl:left-0"> |
53 |
| - <svg-icon src="assets/icons/heroicons/solid/chevron-right.svg" [svgClass]="'h-5 w-5'"> </svg-icon> |
| 53 | + [ngClass]="{ hidden: !menuService.showSideBar }" |
| 54 | + class="text-foreground/50 flex cursor-pointer items-center justify-end p-0 transition-all duration-500 ltr:right-0 rtl:left-0"> |
| 55 | + @if(!item.expanded){ |
| 56 | + <svg-icon src="assets/icons/heroicons/outline/plus.svg" svgClass="h-4 w-4"> </svg-icon> |
| 57 | + }@else { |
| 58 | + <svg-icon src="assets/icons/heroicons/outline/minus.svg" svgClass="h-4 w-4"> </svg-icon> |
| 59 | + } |
54 | 60 | </button>
|
55 | 61 | </div>
|
56 | 62 |
|
|
0 commit comments