c3-components 0.10.0 → 0.11.0

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,7 +1,9 @@
1
1
  import { TemplateRef } from '@angular/core';
2
+ import { C3CreateDialogFromComponentResult } from '../../services/c3-dialog.service';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class C3DialogTemplateComponent {
4
5
  readonly templateRef: import("@angular/core").Signal<TemplateRef<any> | undefined>;
6
+ readonly dialogRef: import("@angular/core").WritableSignal<C3CreateDialogFromComponentResult<unknown> | null>;
5
7
  static ɵfac: i0.ɵɵFactoryDeclaration<C3DialogTemplateComponent, never>;
6
8
  static ɵcmp: i0.ɵɵComponentDeclaration<C3DialogTemplateComponent, "c3-dialog-template", never, {}, {}, never, ["*"], false, never>;
7
9
  }
@@ -0,0 +1,11 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./components/c3-menu/c3-menu.component";
3
+ import * as i2 from "./components/c3-nav-item/c3-nav-item.component";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "@angular/router";
6
+ import * as i5 from "@angular/material/core";
7
+ export declare class C3MenuModule {
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<C3MenuModule, never>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<C3MenuModule, [typeof i1.C3MenuComponent, typeof i2.C3NavItemComponent], [typeof i3.CommonModule, typeof i4.RouterModule, typeof i5.MatRippleModule], [typeof i1.C3MenuComponent, typeof i2.C3NavItemComponent]>;
10
+ static ɵinj: i0.ɵɵInjectorDeclaration<C3MenuModule>;
11
+ }
@@ -0,0 +1,7 @@
1
+ import { C3MenuService } from '../../services/c3-menu.service';
2
+ import * as i0 from "@angular/core";
3
+ export declare class C3MenuComponent {
4
+ readonly _c3Menu: C3MenuService;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<C3MenuComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<C3MenuComponent, "c3-menu", never, {}, {}, never, ["*"], false, never>;
7
+ }
@@ -0,0 +1,3 @@
1
+ :host {
2
+ display: block;
3
+ }
@@ -0,0 +1,14 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class C3NavItemComponent {
3
+ readonly route: import("@angular/core").InputSignal<string>;
4
+ readonly itemTitle: import("@angular/core").InputSignal<string>;
5
+ readonly check: import("@angular/core").InputSignal<string | null>;
6
+ readonly isExternal: import("@angular/core").InputSignal<boolean>;
7
+ private readonly element;
8
+ private readonly _menu;
9
+ private readonly destroyRef;
10
+ private readonly currentRouteChangeSubscription;
11
+ constructor();
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<C3NavItemComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<C3NavItemComponent, "c3-nav-item", never, { "route": { "alias": "route"; "required": true; "isSignal": true; }; "itemTitle": { "alias": "itemTitle"; "required": true; "isSignal": true; }; "check": { "alias": "check"; "required": false; "isSignal": true; }; "isExternal": { "alias": "isExternal"; "required": false; "isSignal": true; }; }, {}, never, ["*"], false, never>;
14
+ }
@@ -0,0 +1,3 @@
1
+ :host {
2
+ display: block;
3
+ }
@@ -0,0 +1,15 @@
1
+ import { Observable } from 'rxjs';
2
+ import * as i0 from "@angular/core";
3
+ export declare class C3MenuService {
4
+ selectedElement: HTMLElement | null;
5
+ currentRouteChange: Observable<string>;
6
+ readonly currentRoute: import("@angular/core").WritableSignal<string>;
7
+ readonly isHeadless: import("@angular/core").WritableSignal<boolean>;
8
+ private readonly _router;
9
+ private readonly _ar;
10
+ constructor();
11
+ clickItem(event: any, route: string): void;
12
+ setSelectedItem(element: HTMLElement): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<C3MenuService, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<C3MenuService>;
15
+ }
@@ -0,0 +1,108 @@
1
+
2
+ @mixin c3-menu-theme() {
3
+ c3-menu {
4
+ #app-menu {
5
+ position: absolute;
6
+ top: 0;
7
+ min-width: 290px;
8
+ height: 100%;
9
+ left: -240px;
10
+ z-index: 999;
11
+ box-sizing: border-box;
12
+ transition: left 0.3s;
13
+ background-color: var(--background-background);
14
+ box-shadow: 3px 0 6px rgba(0, 0, 0, 0.3);
15
+
16
+ &:hover {
17
+ left: 0;
18
+ }
19
+
20
+ .ui-scroll {
21
+ height: 100%;
22
+ overflow-y: auto;
23
+ overflow-x: hidden;
24
+ scrollbar-width: thin; // Amélioration de l'affichage sur Firefox
25
+ scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
26
+
27
+ ul {
28
+ padding: 10px 0;
29
+ list-style-type: none;
30
+ margin: 0;
31
+ width: 100%;
32
+ box-sizing: border-box;
33
+ }
34
+ }
35
+
36
+ ul {
37
+ li {
38
+ padding: 4px 10px;
39
+ width: 100%;
40
+ box-sizing: border-box;
41
+
42
+ > a {
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: space-between;
46
+ width: 100%;
47
+ padding: 10px;
48
+ border-radius: 6px;
49
+ color: inherit;
50
+ text-decoration: none;
51
+ box-sizing: border-box;
52
+ transition: background-color 0.3s ease-in-out, transform 0.2s;
53
+ overflow: hidden;
54
+ position: relative;
55
+ z-index: 0;
56
+ line-height: 20px;
57
+ @media (prefers-color-scheme: dark) {
58
+ &:hover,
59
+ &:focus {
60
+ background-color: rgba(255, 255, 255, 0.2);
61
+ }
62
+ }
63
+ @media (prefers-color-scheme: light) {
64
+ &:hover,
65
+ &:focus {
66
+ background-color: rgba(0, 0, 0, 0.1);
67
+ }
68
+ }
69
+
70
+ .icon {
71
+ width: 24px;
72
+ height: 20px;
73
+ font-size: 20px;
74
+ position: absolute;
75
+ right: 5px;
76
+ top: 50%;
77
+ transform: translateY(-50%);
78
+ }
79
+
80
+ span {
81
+ display: inline-block;
82
+ max-width: 240px;
83
+ white-space: nowrap;
84
+ overflow: hidden;
85
+ text-overflow: ellipsis;
86
+ }
87
+ }
88
+
89
+ &.active-item > a {
90
+ background-color: var(--accent-color);
91
+ font-weight: bold;
92
+ color: inherit;
93
+ }
94
+ }
95
+ }
96
+ }
97
+
98
+ .layout-main {
99
+ margin-left: 60px;
100
+ box-sizing: border-box;
101
+ transition: margin-left 0.3s ease-in-out;
102
+
103
+ &.headless {
104
+ margin-left: 0;
105
+ }
106
+ }
107
+ }
108
+ }
@@ -3,6 +3,7 @@
3
3
  @use "../c3-file-viewer/styles/_c3-file-viewer" as *;
4
4
  @use "../c3-expansion/styles/_c3-expansion" as *;
5
5
  @use "../c3-flowing-menu/styles/c3-flowing-menu" as *;
6
+ @use "../c3-menu/styles/c3-menu" as *;
6
7
 
7
8
  @mixin c3-core($theme) {
8
9
  @include c3-root-variables($theme);
@@ -10,6 +11,7 @@
10
11
  @include c3-file-viewer($theme);
11
12
  @include c3-expansion($theme);
12
13
  @include c3-flowing-menu($theme);
14
+ @include c3-menu-theme();
13
15
  }
14
16
 
15
17
  @mixin c3-core-m3($theme) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c3-components",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "C3 Components Library",
5
5
  "author": "c3ulnta0rk",
6
6
  "license": "MIT",
package/public-api.d.ts CHANGED
@@ -82,3 +82,9 @@ export * from './lib/c3-trace-card/directives/align-right.directive';
82
82
  * C3 Prevent Event
83
83
  */
84
84
  export * from './lib/c3-prevent-event/index';
85
+ /**
86
+ * C3 Menu
87
+ */
88
+ export * from './lib/c3-menu/c3-menu.module';
89
+ export * from './lib/c3-menu/components/c3-menu/c3-menu.component';
90
+ export * from './lib/c3-menu/components/c3-nav-item/c3-nav-item.component';