@mediusinc/mng-commons-layout 7.4.0 → 8.0.0-rc.2

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.
Files changed (37) hide show
  1. package/fesm2022/mediusinc-mng-commons-layout-components-pages-error.mjs +6 -6
  2. package/fesm2022/mediusinc-mng-commons-layout-components-pages-error.mjs.map +1 -1
  3. package/fesm2022/mediusinc-mng-commons-layout-components-pages-main-lazy.mjs.map +1 -1
  4. package/fesm2022/mediusinc-mng-commons-layout-components-pages-main.mjs +17 -11
  5. package/fesm2022/mediusinc-mng-commons-layout-components-pages-main.mjs.map +1 -1
  6. package/fesm2022/mediusinc-mng-commons-layout-components-pages-not-found.mjs +6 -6
  7. package/fesm2022/mediusinc-mng-commons-layout-components-pages-not-found.mjs.map +1 -1
  8. package/fesm2022/mediusinc-mng-commons-layout-components.mjs +134 -124
  9. package/fesm2022/mediusinc-mng-commons-layout-components.mjs.map +1 -1
  10. package/fesm2022/mediusinc-mng-commons-layout.mjs +50 -38
  11. package/fesm2022/mediusinc-mng-commons-layout.mjs.map +1 -1
  12. package/package.json +11 -14
  13. package/styles/atlantis/index.scss +1 -15
  14. package/styles/atlantis/layout/_breadcrumb.scss +2 -2
  15. package/styles/atlantis/layout/_layout.scss +18 -0
  16. package/styles/atlantis/layout/_main.scss +1 -1
  17. package/styles/atlantis/layout/_responsive.scss +64 -68
  18. package/styles/atlantis/layout/_sidebar_drawer.scss +209 -193
  19. package/styles/atlantis/layout/_sidebar_horizontal.scss +115 -106
  20. package/styles/atlantis/layout/_sidebar_reveal.scss +138 -132
  21. package/styles/atlantis/layout/_sidebar_slim.scss +109 -96
  22. package/styles/atlantis/layout/_sidebar_slim_plus.scss +101 -101
  23. package/styles/atlantis/layout/_sidebar_vertical.scss +17 -5
  24. package/styles/atlantis/layout/_topbar.scss +34 -10
  25. package/styles/tailwindcss-commons/atlantis/layout/breadcrumb.css +2 -2
  26. package/styles/tailwindcss-commons/atlantis/layout/main.css +2 -1
  27. package/styles/tailwindcss-commons/atlantis/layout/responsive.css +64 -68
  28. package/styles/tailwindcss-commons/atlantis/layout/sidebar-drawer.css +186 -189
  29. package/styles/tailwindcss-commons/atlantis/layout/sidebar-reveal.css +128 -132
  30. package/styles/tailwindcss-commons/atlantis/layout/sidebar-slim-plus.css +98 -101
  31. package/styles/tailwindcss-commons/atlantis/layout/sidebar-slim.css +107 -96
  32. package/styles/tailwindcss-commons/atlantis/layout/sidebar-vertical.css +38 -24
  33. package/styles/tailwindcss-commons/atlantis/layout/topbar.css +34 -10
  34. package/types/mediusinc-mng-commons-layout-components.d.ts +9 -6
  35. package/types/mediusinc-mng-commons-layout.d.ts +5 -5
  36. package/styles/atlantis/layout/atlantis.scss +0 -0
  37. package/styles/atlantis/layout/layout.scss +0 -32
@@ -1,147 +1,158 @@
1
1
  @variant media-lg {
2
- .layout-container {
3
- &.layout-slim {
4
- .layout-topbar {
5
- .topbar-menubutton {
6
- display: none;
7
- }
2
+ .layout-slim {
3
+ .layout-topbar {
4
+ .topbar-menubutton {
5
+ display: none;
8
6
  }
7
+ }
9
8
 
10
- .sidebar-header {
11
- padding: 1.7rem 0;
12
- .app-logo {
13
- display: flex;
14
- align-items: center;
15
- justify-content: center;
9
+ .sidebar-header {
10
+ padding: 1.7rem 0;
11
+ .app-logo {
12
+ display: flex;
13
+ align-items: center;
14
+ justify-content: center;
16
15
 
17
- .app-logo-normal {
18
- display: none;
19
- img {
20
- height: 1.714rem;
21
- }
16
+ .app-logo-normal {
17
+ display: none;
18
+ img {
19
+ height: 1.714rem;
22
20
  }
21
+ }
23
22
 
24
- .app-logo-small {
25
- display: inline;
26
- img {
27
- height: 2.5rem;
28
- }
23
+ .app-logo-small {
24
+ display: inline;
25
+ img {
26
+ height: 2.5rem;
29
27
  }
30
28
  }
31
29
  }
30
+ }
32
31
 
33
- .layout-sidebar {
34
- width: 5.857rem;
35
- overflow: visible;
36
- z-index: 999;
37
- .layout-menu-container {
38
- overflow: auto;
32
+ .layout-sidebar {
33
+ width: 5.857rem;
34
+ overflow: visible;
35
+ z-index: 999;
36
+ .layout-menu-container {
37
+ overflow: auto;
39
38
 
40
- &::-webkit-scrollbar {
41
- display: none;
42
- }
39
+ &::-webkit-scrollbar {
40
+ display: none;
43
41
  }
44
42
  }
43
+ }
45
44
 
46
- .layout-content-wrapper {
47
- margin-left: 5.857rem;
45
+ .layout-content-wrapper {
46
+ margin-left: 5.857rem;
47
+ }
48
+
49
+ .layout-menu {
50
+ padding: 0 1rem;
51
+
52
+ ul {
53
+ display: none;
48
54
  }
49
55
 
50
- .layout-menu {
51
- padding: 0 1rem;
52
- .layout-root-menuitem {
53
- > .layout-menuitem-root-text {
56
+ li.active-menuitem {
57
+ background-color: unset;
58
+
59
+ > ul {
60
+ display: block;
61
+ }
62
+ }
63
+
64
+ .layout-root-menuitem {
65
+ > .layout-menuitem-root-text {
66
+ display: none;
67
+ }
68
+
69
+ > a {
70
+ display: flex;
71
+ align-items: center;
72
+ justify-content: center;
73
+ border-radius: 12px;
74
+ border: none;
75
+ cursor: pointer;
76
+ outline: none;
77
+ margin: 0px;
78
+ padding: 8px;
79
+ width: 40px;
80
+ height: 40px;
81
+ margin: 0 auto 1rem auto;
82
+
83
+ .layout-submenu-toggler {
54
84
  display: none;
55
85
  }
56
86
 
57
- > a {
58
- display: flex;
59
- align-items: center;
60
- justify-content: center;
61
- border-radius: 12px;
62
- border: none;
63
- cursor: pointer;
64
- outline: none;
65
- transition: background-color var(--layout-section-transition-duration);
66
- padding: 8px;
67
- width: 40px;
68
- height: 40px;
69
- margin: 0 auto 1rem auto;
70
-
71
- .layout-submenu-toggler {
72
- display: none;
73
- }
74
-
75
- .layout-menuitem-icon {
76
- font-size: 1.5rem;
77
- }
87
+ .layout-menuitem-icon {
88
+ font-size: 1.5rem;
89
+ }
78
90
 
79
- .layout-menuitem-text {
80
- display: none;
81
- }
91
+ .layout-menuitem-text {
92
+ display: none;
93
+ }
82
94
 
83
- &:hover {
84
- color: var(--primary-color-text);
85
- background-color: var(--primary-color);
86
- }
95
+ &:hover {
96
+ color: var(--primary-color-text);
97
+ background-color: var(--primary-color);
87
98
  }
99
+ }
88
100
 
89
- > ul {
90
- position: absolute;
91
- left: 5.857rem;
92
- top: 0;
93
- min-width: 15rem;
94
- background: var(--surface-ground);
101
+ > ul {
102
+ position: fixed;
103
+ left: 5.857rem;
104
+ top: auto;
105
+ min-width: 15rem;
106
+ background: var(--surface-ground);
107
+ border-radius: var(--border-radius);
108
+ box-shadow: var(--sidebar-shadow);
109
+ padding: 0.5rem;
110
+ max-height: 20rem;
111
+ overflow: auto;
112
+ z-index: 999;
113
+
114
+ a {
115
+ padding-right: 0.5rem;
116
+ color: var(--text-color);
95
117
  border-radius: var(--border-radius);
96
- box-shadow: var(--sidebar-shadow);
97
- padding: 0.5rem;
98
- max-height: 20rem;
99
- overflow: auto;
100
- z-index: 999;
101
118
 
102
- a {
103
- padding-right: 0.5rem;
119
+ .layout-menuitem-icon {
104
120
  color: var(--text-color);
105
- border-radius: var(--border-radius);
121
+ }
106
122
 
107
- .layout-menuitem-icon {
108
- color: var(--text-color);
109
- }
123
+ &:hover {
124
+ background-color: var(--root-menu-item-hover-bg);
125
+ }
126
+ }
110
127
 
111
- &:hover {
112
- background-color: var(--root-menu-item-hover-bg);
113
- }
128
+ li {
129
+ a {
130
+ padding-left: 0.5rem;
114
131
  }
115
132
 
116
133
  li {
117
134
  a {
118
- padding-left: 0.5rem;
135
+ padding-left: 1rem;
119
136
  }
120
137
 
121
138
  li {
122
139
  a {
123
- padding-left: 1rem;
140
+ padding-left: 1.5rem;
124
141
  }
125
142
 
126
143
  li {
127
144
  a {
128
- padding-left: 1.5rem;
145
+ padding-left: 2rem;
129
146
  }
130
147
 
131
148
  li {
132
149
  a {
133
- padding-left: 2rem;
150
+ padding-left: 2.5rem;
134
151
  }
135
152
 
136
153
  li {
137
154
  a {
138
- padding-left: 2.5rem;
139
- }
140
-
141
- li {
142
- a {
143
- padding-left: 3rem;
144
- }
155
+ padding-left: 3rem;
145
156
  }
146
157
  }
147
158
  }
@@ -19,8 +19,9 @@
19
19
 
20
20
  .app-logo-normal {
21
21
  display: inline;
22
+
22
23
  img {
23
- height: 1.714rem;
24
+ height: 2rem;
24
25
  border: 0 none;
25
26
  }
26
27
  }
@@ -39,6 +40,7 @@
39
40
  display: none;
40
41
  }
41
42
  }
43
+
42
44
  .layout-menu-container {
43
45
  overflow: auto;
44
46
  flex: 1;
@@ -52,20 +54,42 @@
52
54
 
53
55
  > li {
54
56
  margin-bottom: 2.25rem;
57
+
55
58
  &:first-child {
56
59
  margin-top: 2rem;
57
60
  }
58
61
  }
62
+
59
63
  li {
60
64
  border-radius: 8px;
65
+
61
66
  a {
62
67
  border-left: 8px solid transparent;
63
68
  }
69
+
70
+ &.active-menuitem {
71
+ background-color: var(--root-menu-item-hover-bg);
72
+
73
+ > a {
74
+ border-left-color: var(--primary-color);
75
+ background-color: var(--root-menu-item-hover-bg);
76
+
77
+ .layout-submenu-toggler {
78
+ transform: rotate(-180deg);
79
+ }
80
+ }
81
+
82
+ > ul {
83
+ max-height: 1000px;
84
+ transition: max-height 1s ease-in-out;
85
+ }
86
+ }
64
87
  }
65
88
 
66
89
  .layout-root-menuitem {
67
90
  > div {
68
91
  padding-left: 1.5rem;
92
+ padding-top: 0.5rem;
69
93
  margin-bottom: 0.5rem;
70
94
  font-size: 12px;
71
95
 
@@ -75,29 +99,21 @@
75
99
  text-transform: uppercase;
76
100
  }
77
101
  }
102
+
78
103
  > a {
79
104
  display: none;
80
105
  }
106
+
107
+ > ul > li.active-menuitem {
108
+ background-color: var(--root-menu-item-hover-bg);
109
+ }
81
110
  }
82
111
 
83
112
  a {
84
113
  user-select: none;
85
114
 
86
- &.active-menuitem {
87
- > .layout-submenu-toggler {
88
- transform: rotate(-180deg);
89
- }
90
- }
91
- }
92
-
93
- li.active-menuitem {
94
- background-color: var(--root-menu-item-hover-bg);
95
- > a {
96
- border-left-color: var(--primary-color);
97
- background-color: var(--root-menu-item-hover-bg);
98
- .layout-submenu-toggler {
99
- transform: rotate(-180deg);
100
- }
115
+ &.active-menuitem > .layout-submenu-toggler {
116
+ transform: rotate(-180deg);
101
117
  }
102
118
  }
103
119
 
@@ -115,9 +131,7 @@
115
131
  cursor: pointer;
116
132
  padding: 0.5rem 1rem;
117
133
  border-radius: 8px;
118
- transition:
119
- background-color var(--layout-section-transition-duration),
120
- box-shadow var(--layout-section-transition-duration);
134
+ transition: box-shadow var(--transition-duration);
121
135
 
122
136
  .layout-menuitem-icon {
123
137
  margin-right: 0.5rem;
@@ -126,7 +140,7 @@
126
140
  .layout-submenu-toggler {
127
141
  font-size: 75%;
128
142
  margin-left: auto;
129
- transition: transform var(--layout-section-transition-duration);
143
+ transition: transform var(--transition-duration);
130
144
  }
131
145
 
132
146
  &.active-route {
@@ -142,6 +156,8 @@
142
156
  ul {
143
157
  overflow: hidden;
144
158
  border-radius: var(--border-radius);
159
+ max-height: 0;
160
+ transition: max-height 0.45s cubic-bezier(0.86, 0, 0.07, 1);
145
161
 
146
162
  li {
147
163
  a {
@@ -168,10 +184,8 @@
168
184
  padding-left: 5.5rem;
169
185
  }
170
186
 
171
- li {
172
- a {
173
- padding-left: 5rem;
174
- }
187
+ li a {
188
+ padding-left: 5rem;
175
189
  }
176
190
  }
177
191
  }
@@ -16,6 +16,7 @@
16
16
  border-color: transparent;
17
17
  }
18
18
  }
19
+
19
20
  .layout-topbar {
20
21
  margin-bottom: 2rem;
21
22
  display: flex;
@@ -56,10 +57,10 @@
56
57
  &.topbar-item {
57
58
  margin-left: 1.5rem;
58
59
  display: inline-flex;
59
- flex-shrink: 0;
60
60
  align-items: center;
61
61
  justify-content: center;
62
62
  position: relative;
63
+ flex-shrink: 0;
63
64
 
64
65
  img {
65
66
  width: 2rem;
@@ -70,7 +71,7 @@
70
71
  border-radius: 50%;
71
72
  width: 2rem;
72
73
  height: 2rem;
73
- transition: box-shadow var(--layout-section-transition-duration);
74
+ transition: box-shadow var(--transition-duration);
74
75
 
75
76
  &:focus {
76
77
  box-shadow: var(--focus-ring-shadow);
@@ -83,7 +84,7 @@
83
84
  right: 0;
84
85
  display: none;
85
86
  color: var(--text-color);
86
- background: var(--surface-ground);
87
+ background: var(--surface-card);
87
88
 
88
89
  &.active-topbar-menu {
89
90
  display: block;
@@ -99,6 +100,7 @@
99
100
  display: flex;
100
101
  align-items: center;
101
102
  flex-shrink: 0;
103
+ overflow: hidden;
102
104
 
103
105
  .topbar-searchbutton {
104
106
  display: flex;
@@ -111,15 +113,20 @@
111
113
  visibility: hidden;
112
114
  transition: 400ms cubic-bezier(0.86, 0, 0.07, 1);
113
115
 
114
- .p-inputtext {
116
+ > div {
115
117
  width: 100%;
116
- position: relative;
117
- border-radius: 40px;
118
- }
119
118
 
120
- span {
121
- font-size: 18px;
122
- margin-top: -9px;
119
+ .p-inputtext {
120
+ width: 100%;
121
+ position: relative;
122
+ border-radius: 40px;
123
+ padding: 9px;
124
+ }
125
+
126
+ span {
127
+ font-size: 18px;
128
+ margin-top: -9px;
129
+ }
123
130
  }
124
131
  }
125
132
 
@@ -142,6 +149,7 @@
142
149
  i {
143
150
  display: block;
144
151
  }
152
+
145
153
  input {
146
154
  border-radius: var(--border-radius);
147
155
  }
@@ -201,3 +209,19 @@
201
209
  clip-path: inset(0 0 98% 0);
202
210
  }
203
211
  }
212
+
213
+ .layout-horizontal .layout-topbar .topbar-menu li .topbar-search {
214
+ position: relative;
215
+ width: 2rem;
216
+ overflow: visible;
217
+
218
+ .topbar-searchbutton {
219
+ position: absolute;
220
+ right: 0;
221
+ }
222
+
223
+ .search-input-wrapper {
224
+ position: absolute;
225
+ right: 0;
226
+ }
227
+ }
@@ -1,11 +1,10 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { Type, OnDestroy, Injector, ElementRef } from '@angular/core';
2
+ import { Type, OnDestroy, AfterViewInit, Injector, ElementRef } from '@angular/core';
3
3
  import * as _mediusinc_mng_commons_layout from '@mediusinc/mng-commons-layout';
4
4
  import { LayoutService, MenuService, LayoutMenuMode } from '@mediusinc/mng-commons-layout';
5
5
  import { CommonsService, InternalCommonsMenuItem, ColorScheme, IUser, VersionConfigType, VersionConfig } from '@mediusinc/mng-commons/core';
6
- import { MenuItem } from 'primeng/api';
6
+ import { MenuItem } from '@openng/optimus-ui/api';
7
7
  import * as _angular_router from '@angular/router';
8
- import { AnimationEvent } from '@angular/animations';
9
8
  import { TranslateService } from '@ngx-translate/core';
10
9
  import * as _angular_platform_browser from '@angular/platform-browser';
11
10
 
@@ -59,7 +58,7 @@ declare class MenuComponent {
59
58
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<MenuComponent, "mng-menu", never, {}, {}, never, never, true, never>;
60
59
  }
61
60
 
62
- declare class MenuItemComponent {
61
+ declare class MenuItemComponent implements AfterViewInit {
63
62
  private readonly menuService;
64
63
  private readonly permissionService;
65
64
  readonly layout: LayoutService;
@@ -72,11 +71,15 @@ declare class MenuItemComponent {
72
71
  private menuChangeEvents;
73
72
  active: _angular_core.Signal<boolean>;
74
73
  visible: _angular_core.Signal<boolean>;
75
- submenuAnimation: _angular_core.Signal<"collapsed" | "expanded" | "hidden" | "visible">;
74
+ protected isTooltipDisabled: _angular_core.Signal<boolean>;
75
+ protected initialized: _angular_core.WritableSignal<boolean>;
76
+ private menuHoverActive;
77
+ protected submenuVisible: _angular_core.Signal<boolean>;
76
78
  constructor();
79
+ ngAfterViewInit(): void;
77
80
  itemClick(event: Event): void;
78
- onSubmenuAnimated(event: AnimationEvent): void;
79
81
  onChildVisibleChange(visible: boolean, item: InternalCommonsMenuItem, idx: number): void;
82
+ protected onMouseEnter(): void;
80
83
  private calculatePosition;
81
84
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuItemComponent, never>;
82
85
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<MenuItemComponent, "[mng-menuitem]", never, { "item": { "alias": "item"; "required": true; "isSignal": true; }; "root": { "alias": "root"; "required": false; "isSignal": true; }; }, { "visibleChange": "visibleChange"; }, never, never, true, never>;
@@ -1,7 +1,7 @@
1
1
  import { CommonsMenuItem, InternalCommonsMenuItem, CommonsFeature } from '@mediusinc/mng-commons/core';
2
2
  import * as _angular_core from '@angular/core';
3
- import { Type, InjectionToken } from '@angular/core';
4
- import { MenuItem } from 'primeng/api';
3
+ import { InjectionToken, Type } from '@angular/core';
4
+ import { MenuItem } from '@openng/optimus-ui/api';
5
5
  import * as rxjs from 'rxjs';
6
6
  import { Observable } from 'rxjs';
7
7
 
@@ -196,11 +196,11 @@ declare class VersionService {
196
196
  */
197
197
  declare function withLayout(config?: LayoutFeatureConfig): CommonsFeature;
198
198
  /**
199
- * Configures PrimeNG theme dark mode selector.
199
+ * Configures Optimus UI theme dark mode selector.
200
200
  */
201
- declare const primeThemeDarkModeOpts: {
201
+ declare const optimusThemeDarkModeOpts: {
202
202
  darkModeSelector: string;
203
203
  };
204
204
 
205
- export { COMMONS_LAYOUT_FEATURE_CONFIG_IT, LayoutService, MenuService, VersionService, prepareMenuItemsToInternal, primeThemeDarkModeOpts, withLayout };
205
+ export { COMMONS_LAYOUT_FEATURE_CONFIG_IT, LayoutService, MenuService, VersionService, optimusThemeDarkModeOpts, prepareMenuItemsToInternal, withLayout };
206
206
  export type { ColorScheme, LayoutFeatureConfig, LayoutMenuMode, LayoutState, MenuChangeEvent };
File without changes
@@ -1,32 +0,0 @@
1
- @use './_sass_variables';
2
- @use './mng/variables/mng-variables-common';
3
- @use './variables/_common';
4
- @use './variables/_light';
5
- @use './variables/_dark';
6
- @use './_main';
7
- @use './_sidebar_slim';
8
- @use './_sidebar_slim_plus';
9
- @use './_sidebar_vertical';
10
- //@use './_sidebar_horizontal';
11
- @use './_sidebar_reveal';
12
- @use './_sidebar_drawer';
13
- @use './_responsive';
14
- @use './_topbar';
15
- @use './_breadcrumb';
16
- //@use './_profile';
17
- @use './_content';
18
- //@use './_config';
19
- @use './_utils';
20
-
21
- // mng layout
22
- @use './mng/layout/mng_layout';
23
- @use './mng/layout/mng_layout_footer';
24
- @use './mng/layout/mng_layout_menu';
25
- @use './mng/layout/mng_layout_topbar';
26
- @use './mng/layout/mng_sidebar_vertical';
27
-
28
- // mng theme (primeNG directly)
29
- @use './mng/theme/mng_theme_button';
30
- @use './mng/theme/mng_theme_dialog';
31
- @use './mng/theme/mng_theme_toast';
32
- @use './mng/theme/mng_theme_toggleswitch';